@wavemaker/app-runtime-wm-build 11.7.3-next.26383 → 11.7.3-next.26384

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -502,7 +502,7 @@ const c="primary",d=Symbol("RouteTitle");class h{constructor(e){this.params=e||{
502
502
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
503
503
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
504
504
  PERFORMANCE OF THIS SOFTWARE.
505
- ***************************************************************************** */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)}function r(e){return"function"==typeof e}var i=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}i=e},get useDeprecatedSynchronousErrorHandling(){return i}};function s(e){setTimeout((function(){throw e}),0)}var a={closed:!0,next:function(e){},error:function(e){if(o.useDeprecatedSynchronousErrorHandling)throw e;s(e)},complete:function(){}},l=Array.isArray||function(e){return e&&"number"==typeof e.length};function u(e){return null!==e&&"object"==typeof e}var c=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),d=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,i=n._parentOrParents,o=n._unsubscribe,s=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof e)i.remove(this);else if(null!==i)for(var a=0;a<i.length;++a){i[a].remove(this)}if(r(o))try{o.call(this)}catch(e){t=e instanceof c?h(e.errors):[e]}if(l(s)){a=-1;for(var d=s.length;++a<d;){var p=s[a];if(u(p))try{p.unsubscribe()}catch(e){t=t||[],e instanceof c?t=t.concat(h(e.errors)):t.push(e)}}}if(t)throw new c(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var i=n._parentOrParents;if(null===i)n._parentOrParents=this;else if(i instanceof e){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[n]:o.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function h(e){return e.reduce((function(e,t){return e.concat(t instanceof c?t.errors:t)}),[])}var p="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),f=function(e){function t(n,r,i){var o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=a;break;case 1:if(!n){o.destination=a;break}if("object"==typeof n){n instanceof t?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new m(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new m(o,n,r,i)}return o}return n(t,e),t.prototype[p]=function(){return this},t.create=function(e,n,r){var i=new t(e,n,r);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(d),m=function(e){function t(t,n,i,o){var s,l=e.call(this)||this;l._parentSubscriber=t;var u=l;return r(n)?s=n:n&&(s=n.next,i=n.error,o=n.complete,n!==a&&(r((u=Object.create(n)).unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(l))),l._context=u,l._next=s,l._error=i,l._complete=o,l}return n(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;o.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=o.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):s(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;s(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};o.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),o.useDeprecatedSynchronousErrorHandling)throw e;s(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!o.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return o.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(s(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(f);function g(e){for(;e;){var t=e,n=t.closed,r=t.destination,i=t.isStopped;if(n||i)return!1;e=r&&r instanceof f?r:null}return!0}var v="function"==typeof Symbol&&Symbol.observable||"@@observable";function y(e){return e}function _(e){return 0===e.length?y:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var b=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,i=function(e,t,n){if(e){if(e instanceof f)return e;if(e[p])return e[p]()}return e||t||n?new f(e,t,n):new f(a)}(e,t,n);if(r?i.add(r.call(i,this.source)):i.add(this.source||o.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),o.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){o.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),g(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=w(t))((function(t,r){var i;i=n.subscribe((function(t){try{e(t)}catch(e){r(e),i&&i.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[v]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:_(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=w(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function w(e){if(e||(e=o.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var x=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),k=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return n(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(d),S=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return n(t,e),t}(f),T=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return n(t,e),t.prototype[p]=function(){return new S(this)},t.prototype.lift=function(e){var t=new E(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new x;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].next(e)},t.prototype.error=function(e){if(this.closed)throw new x;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new x;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new x;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new x;return this.hasError?(e.error(this.thrownError),d.EMPTY):this.isStopped?(e.complete(),d.EMPTY):(this.observers.push(e),new k(this,e))},t.prototype.asObservable=function(){var e=new b;return e.source=this,e},t.create=function(e,t){return new E(e,t)},t}(b),E=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return n(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):d.EMPTY},t}(T);var D=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new C(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i},e}(),C=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return n(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},t}(f),M=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return n(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new d).add(this.source.subscribe(new A(this.getSubject(),this))),e.closed&&(this._connection=null,e=d.EMPTY)),e},t.prototype.refCount=function(){return(e=this).lift(new D(e));var e},t}(b),A=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return n(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(S),I=function(e){function t(t,n,r){var i=e.call(this)||this;return i.key=t,i.groupSubject=n,i.refCountSubscription=r,i}return n(t,e),t.prototype._subscribe=function(e){var t=new d,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&t.add(new L(n)),t.add(r.subscribe(e)),t},t}(b),L=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return n(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(d),O=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return n(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new x;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(T),N=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return n(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,n){return e.call(this)||this}return n(t,e),t.prototype.schedule=function(e,t){return this},t}(d)),R=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return n(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(N),P=function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=function(){return Date.now()},e}(),F=function(e){function t(n,r){void 0===r&&(r=P.now);var i=e.call(this,n,(function(){return t.delegate&&t.delegate!==i?t.delegate.now():r()}))||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return n(t,e),t.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,i):e.prototype.schedule.call(this,n,r,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(P),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(F),Y=new j(R),V=Y,H=new b((function(e){return e.complete()}));function B(e){return e?function(e){return new b((function(t){return e.schedule((function(){return t.complete()}))}))}(e):H}function U(e){return e&&"function"==typeof e.schedule}var z,q=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}};function W(e,t){return new b((function(n){var r=new d,i=0;return r.add(t.schedule((function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}function $(e,t){return t?W(e,t):new b(q(e))}function G(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return U(n)?(e.pop(),W(e,n)):$(e)}function K(e,t){return new b(t?function(n){return t.schedule(Z,0,{error:e,subscriber:n})}:function(t){return t.error(e)})}function Z(e){var t=e.error;e.subscriber.error(t)}!function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(z||(z={}));var X=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return G(this.value);case"E":return K(this.error);case"C":return B()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}(),J=function(e){function t(t,n,r){void 0===r&&(r=0);var i=e.call(this,t)||this;return i.scheduler=n,i.delay=r,i}return n(t,e),t.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new Q(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(X.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(X.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(X.createComplete()),this.unsubscribe()},t}(f),Q=function(e,t){this.notification=e,this.destination=t},ee=function(e){function t(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=e.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=t<1?1:t,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return n(t,e),t.prototype.nextInfiniteTimeWindow=function(t){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift(),e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this._events.push(new te(this._getNow(),t)),this._trimBufferThenGetEvents(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new x;if(this.isStopped||this.hasError?t=d.EMPTY:(this.observers.push(e),t=new k(this,e)),i&&e.add(e=new J(e,i)),n)for(var s=0;s<o&&!e.closed;s++)e.next(r[s]);else for(s=0;s<o&&!e.closed;s++)e.next(r[s].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||V).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(e-r[o].time<n);)o++;return i>t&&(o=Math.max(o,i-t)),o>0&&r.splice(0,o),r},t}(T),te=function(e,t){this.time=e,this.value=t},ne=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return n(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),d.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),d.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(T),re=1,ie=Promise.resolve(),oe={};function se(e){return e in oe&&(delete oe[e],!0)}var ae=function(e){var t=re++;return oe[t]=!0,ie.then((function(){return se(t)&&e()})),t},le=function(e){se(e)},ue=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return n(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=ae(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(le(n),t.scheduled=void 0)},t}(N),ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,i=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++r<i&&(e=n.shift()));if(this.active=!1,t){for(;++r<i&&(e=n.shift());)e.unsubscribe();throw t}},t}(F),de=new ce(ue),he=de,pe=new F(N),fe=pe,me=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return n(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame((function(){return t.flush(null)}))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(cancelAnimationFrame(n),t.scheduled=void 0)},t}(N),ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,i=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++r<i&&(e=n.shift()));if(this.active=!1,t){for(;++r<i&&(e=n.shift());)e.unsubscribe();throw t}},t}(F),ve=new ge(me),ye=ve,_e=function(e){function t(t,n){void 0===t&&(t=be),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=e.call(this,t,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return n(t,e),t.prototype.flush=function(){for(var e,t,n=this.actions,r=this.maxFrames;(t=n[0])&&t.delay<=r&&(n.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=n.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(F),be=function(e){function t(t,n,r){void 0===r&&(r=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=r,i.active=!0,i.index=t.index=r,i}return n(t,e),t.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},t.prototype.requestAsyncId=function(e,n,r){void 0===r&&(r=0),this.delay=e.frame+r;var i=e.actions;return i.push(this),i.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,n){},t.prototype._execute=function(t,n){if(!0===this.active)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(N);function we(){}var xe=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}(),ke=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}(),Se=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}();function Te(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Ee(e,t))}}var Ee=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new De(e,this.project,this.thisArg))},e}(),De=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return n(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(f);function Ce(e){var t=this,n=e.args,r=e.subscriber,i=e.params,o=i.callbackFunc,s=i.context,a=i.scheduler,l=i.subject;if(!l){l=i.subject=new ne;try{o.apply(s,n.concat([function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.length<=1?e[0]:e;t.add(a.schedule(Me,0,{value:r,subject:l}))}]))}catch(e){l.error(e)}}this.add(l.subscribe(r))}function Me(e){var t=e.value,n=e.subject;n.next(t),n.complete()}function Ae(e){var t=this,n=e.params,r=e.subscriber,i=e.context,o=n.callbackFunc,s=n.args,a=n.scheduler,l=n.subject;if(!l){l=n.subject=new ne;try{o.apply(i,s.concat([function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.shift();if(r)t.add(a.schedule(Le,0,{err:r,subject:l}));else{var i=e.length<=1?e[0]:e;t.add(a.schedule(Ie,0,{value:i,subject:l}))}}]))}catch(e){this.add(a.schedule(Le,0,{err:e,subject:l}))}}this.add(l.subscribe(r))}function Ie(e){var t=e.value,n=e.subject;n.next(t),n.complete()}function Le(e){var t=e.err;e.subject.error(t)}var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(f),Ne=function(e){function t(t,n,r){var i=e.call(this)||this;return i.parent=t,i.outerValue=n,i.outerIndex=r,i.index=0,i}return n(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(f);var Re="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",Pe=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Fe(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var je=function(e){if(e&&"function"==typeof e[v])return r=e,function(e){var t=r[v]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(Pe(e))return q(e);if(Fe(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,s),e};if(e&&"function"==typeof e[Re])return t=e,function(e){for(var n=t[Re]();;){var r=void 0;try{r=n.next()}catch(t){return e.error(t),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,r,i=u(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+i+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function Ye(e,t,n,r,i){if(void 0===i&&(i=new Ne(e,n,r)),!i.closed)return t instanceof b?t.subscribe(i):je(t)(i)}var Ve={};var He=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new Be(e,this.resultSelector))},e}(),Be=function(e){function t(t,n){var r=e.call(this,t)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return n(t,e),t.prototype._next=function(e){this.values.push(Ve),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var r=e[n];this.add(Ye(this,r,r,n))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,i){var o=this.values,s=o[n],a=this.toRespond?s===Ve?--this.toRespond:this.toRespond:0;o[n]=t,0===a&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(Oe);function Ue(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[v]}(e))return function(e,t){return new b((function(n){var r=new d;return r.add(t.schedule((function(){var i=e[v]();r.add(i.subscribe({next:function(e){r.add(t.schedule((function(){return n.next(e)})))},error:function(e){r.add(t.schedule((function(){return n.error(e)})))},complete:function(){r.add(t.schedule((function(){return n.complete()})))}}))}))),r}))}(e,t);if(Fe(e))return function(e,t){return new b((function(n){var r=new d;return r.add(t.schedule((function(){return e.then((function(e){r.add(t.schedule((function(){n.next(e),r.add(t.schedule((function(){return n.complete()})))})))}),(function(e){r.add(t.schedule((function(){return n.error(e)})))}))}))),r}))}(e,t);if(Pe(e))return W(e,t);if(function(e){return e&&"function"==typeof e[Re]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new b((function(n){var r,i=new d;return i.add((function(){r&&"function"==typeof r.return&&r.return()})),i.add(t.schedule((function(){r=e[Re](),i.add(t.schedule((function(){if(!n.closed){var e,t;try{var i=r.next();e=i.value,t=i.done}catch(e){return void n.error(e)}t?n.complete():(n.next(e),this.schedule())}})))}))),i}))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}function ze(e,t){return t?Ue(e,t):e instanceof b?e:new b(je(e))}function qe(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(r){return r.pipe(qe((function(n,r){return ze(e(n,r)).pipe(Te((function(e,i){return t(n,e,r,i)})))}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new We(e,n))})}var We=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new $e(e,this.project,this.concurrent))},e}(),$e=function(e){function t(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=e.call(this,t)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return n(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(t,e,n)},t.prototype._innerSub=function(e,t,n){var r=new Ne(this,t,n),i=this.destination;i.add(r);var o=Ye(this,e,void 0,void 0,r);o!==r&&i.add(o)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(Oe);function Ge(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),qe(y,e)}function Ke(e){return new b((function(t){var n;try{n=e()}catch(e){return void t.error(e)}return(n?ze(n):B()).subscribe(t)}))}function Ze(e,t){return new b((function(n){var r=e.length;if(0!==r)for(var i=new Array(r),o=0,s=0,a=function(a){var l=ze(e[a]),u=!1;n.add(l.subscribe({next:function(e){u||(u=!0,s++),i[a]=e},error:function(e){return n.error(e)},complete:function(){++o!==r&&u||(s===r&&n.next(t?t.reduce((function(e,t,n){return e[t]=i[n],e}),{}):i),n.complete())}}))},l=0;l<r;l++)a(l);else n.complete()}))}function Xe(e,t,n,r,i){var o;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(e)){var s=e;e.addEventListener(t,n,i),o=function(){return s.removeEventListener(t,n,i)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(e)){var a=e;e.on(t,n),o=function(){return a.off(t,n)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(e)){var l=e;e.addListener(t,n),o=function(){return l.removeListener(t,n)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var u=0,c=e.length;u<c;u++)Xe(e[u],t,n,r,i)}r.add(o)}function Je(e){var t=e.subscriber,n=e.condition;if(!t.closed){if(e.needIterate)try{e.state=e.iterate(e.state)}catch(e){return void t.error(e)}else e.needIterate=!0;if(n){var r=void 0;try{r=n(e.state)}catch(e){return void t.error(e)}if(!r)return void t.complete();if(t.closed)return}var i;try{i=e.resultSelector(e.state)}catch(e){return void t.error(e)}if(!t.closed&&(t.next(i),!t.closed))return this.schedule(e)}}function Qe(e){return!l(e)&&e-parseFloat(e)+1>=0}function et(e){var t=e.subscriber,n=e.counter,r=e.period;t.next(n),this.schedule({subscriber:t,counter:n+1,period:r},r)}var tt=new b(we);function nt(e){var t=e.keys,n=e.index,r=e.subscriber,i=e.subscription,o=e.obj;if(!r.closed)if(n<t.length){var s=t[n];r.next([s,o[s]]),i.add(this.schedule({keys:t,index:n+1,subscriber:r,subscription:i,obj:o}))}else r.complete()}function rt(e,t){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=e,n.thisArg=t,n}function it(e,t){return function(n){return n.lift(new ot(e,t))}}var ot=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new st(e,this.predicate,this.thisArg))},e}(),st=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return n(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(f);var at=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new lt(e))},e}(),lt=function(e){function t(t){var n=e.call(this,t)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return n(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var n=0;n<t&&!this.hasFirst;n++){var r=e[n],i=Ye(this,r,r,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},t.prototype.notifyNext=function(e,t,n,r,i){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==n){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(t)},t}(Oe);function ut(e){var t=e.start,n=e.index,r=e.count,i=e.subscriber;n>=r?i.complete():(i.next(t),i.closed||(e.index=n+1,e.start=t+1,this.schedule(e)))}function ct(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}var dt=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new ht(e,this.resultSelector))},e}(),ht=function(e){function t(t,n,r){void 0===r&&(r=Object.create(null));var i=e.call(this,t)||this;return i.iterators=[],i.active=0,i.resultSelector="function"==typeof n?n:null,i.values=r,i}return n(t,e),t.prototype._next=function(e){var t=this.iterators;l(e)?t.push(new ft(e)):"function"==typeof e[Re]?t.push(new pt(e[Re]())):t.push(new mt(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0!==t){this.active=t;for(var n=0;n<t;n++){var r=e[n];if(r.stillUnsubscribed)this.destination.add(r.subscribe(r,n));else this.active--}}else this.destination.complete()},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,n=this.destination,r=0;r<t;r++){if("function"==typeof(s=e[r]).hasValue&&!s.hasValue())return}var i=!1,o=[];for(r=0;r<t;r++){var s,a=(s=e[r]).next();if(s.hasCompleted()&&(i=!0),a.done)return void n.complete();o.push(a.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(f),pt=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return e&&e.done},e}(),ft=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[Re]=function(){return this},e.prototype.next=function(e){var t=this.index++,n=this.array;return t<this.length?{value:n[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),mt=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return n(t,e),t.prototype[Re]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,i){this.buffer.push(t),this.parent.checkIterators()},t.prototype.subscribe=function(e,t){return Ye(this,this.observable,this,t)},t}(Oe),gt=Object.freeze({__proto__:null,ArgumentOutOfRangeError:xe,AsyncSubject:ne,BehaviorSubject:O,ConnectableObservable:M,EMPTY:H,EmptyError:ke,GroupedObservable:I,NEVER:tt,Notification:X,get NotificationKind(){return z},ObjectUnsubscribedError:x,Observable:b,ReplaySubject:ee,Scheduler:P,Subject:T,Subscriber:f,Subscription:d,TimeoutError:Se,UnsubscriptionError:c,VirtualAction:be,VirtualTimeScheduler:_e,animationFrame:ye,animationFrameScheduler:ve,asap:he,asapScheduler:de,async:fe,asyncScheduler:pe,bindCallback:function e(t,n,r){if(n){if(!U(n))return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return e(t,r).apply(void 0,i).pipe(Te((function(e){return l(e)?n.apply(void 0,e):n(e)})))};r=n}return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i,o=this,s={context:o,subject:i,callbackFunc:t,scheduler:r};return new b((function(n){if(r){var a={args:e,subscriber:n,params:s};return r.schedule(Ce,0,a)}if(!i){i=new ne;try{t.apply(o,e.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.next(e.length<=1?e[0]:e),i.complete()}]))}catch(e){g(i)?i.error(e):console.warn(e)}}return i.subscribe(n)}))}},bindNodeCallback:function e(t,n,r){if(n){if(!U(n))return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return e(t,r).apply(void 0,i).pipe(Te((function(e){return l(e)?n.apply(void 0,e):n(e)})))};r=n}return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i={subject:void 0,args:e,callbackFunc:t,scheduler:r,context:this};return new b((function(n){var o=i.context,s=i.subject;if(r)return r.schedule(Ae,0,{params:i,subscriber:n,context:o});if(!s){s=i.subject=new ne;try{t.apply(o,e.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.shift();n?s.error(n):(s.next(e.length<=1?e[0]:e),s.complete())}]))}catch(e){g(s)?s.error(e):console.warn(e)}}return s.subscribe(n)}))}},combineLatest:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=null,r=null;return U(e[e.length-1])&&(r=e.pop()),"function"==typeof e[e.length-1]&&(n=e.pop()),1===e.length&&l(e[0])&&(e=e[0]),$(e,r).lift(new He(n))},concat:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ge(1)(G.apply(void 0,e))},config:o,defer:Ke,empty:B,forkJoin:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var n=e[0];if(l(n))return Ze(n,null);if(u(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return Ze(r.map((function(e){return n[e]})),r)}}if("function"==typeof e[e.length-1]){var i=e.pop();return Ze(e=1===e.length&&l(e[0])?e[0]:e,null).pipe(Te((function(e){return i.apply(void 0,e)})))}return Ze(e,null)},from:ze,fromEvent:function e(t,n,i,o){return r(i)&&(o=i,i=void 0),o?e(t,n,i).pipe(Te((function(e){return l(e)?o.apply(void 0,e):o(e)}))):new b((function(e){Xe(t,n,(function(t){arguments.length>1?e.next(Array.prototype.slice.call(arguments)):e.next(t)}),e,i)}))},fromEventPattern:function e(t,n,i){return i?e(t,n).pipe(Te((function(e){return l(e)?i.apply(void 0,e):i(e)}))):new b((function(e){var i,o=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1===t.length?t[0]:t)};try{i=t(o)}catch(t){return void e.error(t)}if(r(n))return function(){return n(o,i)}}))},generate:function(e,t,n,r,i){var o,s;if(1==arguments.length){var a=e;s=a.initialState,t=a.condition,n=a.iterate,o=a.resultSelector||y,i=a.scheduler}else void 0===r||U(r)?(s=e,o=y,i=r):(s=e,o=r);return new b((function(e){var r=s;if(i)return i.schedule(Je,0,{subscriber:e,iterate:n,condition:t,resultSelector:o,state:r});for(;;){if(t){var a=void 0;try{a=t(r)}catch(t){return void e.error(t)}if(!a){e.complete();break}}var l=void 0;try{l=o(r)}catch(t){return void e.error(t)}if(e.next(l),e.closed)break;try{r=n(r)}catch(t){return void e.error(t)}}}))},identity:y,iif:function(e,t,n){return void 0===t&&(t=H),void 0===n&&(n=H),Ke((function(){return e()?t:n}))},interval:function(e,t){return void 0===e&&(e=0),void 0===t&&(t=fe),(!Qe(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=fe),new b((function(n){return n.add(t.schedule(et,e,{subscriber:n,counter:0,period:e})),n}))},isObservable:function(e){return!!e&&(e instanceof b||"function"==typeof e.lift&&"function"==typeof e.subscribe)},merge:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Number.POSITIVE_INFINITY,r=null,i=e[e.length-1];return U(i)?(r=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(n=e.pop())):"number"==typeof i&&(n=e.pop()),null===r&&1===e.length&&e[0]instanceof b?e[0]:Ge(n)($(e,r))},never:function(){return tt},noop:we,observable:v,of:G,onErrorResumeNext:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return H;var r=t[0],i=t.slice(1);return 1===t.length&&l(r)?e.apply(void 0,r):new b((function(t){var n=function(){return t.add(e.apply(void 0,i).subscribe(t))};return ze(r).subscribe({next:function(e){t.next(e)},error:n,complete:n})}))},pairs:function(e,t){return new b(t?function(n){var r=Object.keys(e),i=new d;return i.add(t.schedule(nt,0,{keys:r,index:0,subscriber:n,subscription:i,obj:e})),i}:function(t){for(var n=Object.keys(e),r=0;r<n.length&&!t.closed;r++){var i=n[r];e.hasOwnProperty(i)&&t.next([i,e[i]])}t.complete()})},partition:function(e,t,n){return[it(t,n)(new b(je(e))),it(rt(t,n))(new b(je(e)))]},pipe:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _(e)},queue:V,queueScheduler:Y,race:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){if(!l(e[0]))return e[0];e=e[0]}return $(e,void 0).lift(new at)},range:function(e,t,n){return void 0===e&&(e=0),new b((function(r){void 0===t&&(t=e,e=0);var i=0,o=e;if(n)return n.schedule(ut,0,{index:i,count:t,start:e,subscriber:r});for(;;){if(i++>=t){r.complete();break}if(r.next(o++),r.closed)break}}))},scheduled:Ue,throwError:K,timer:function(e,t,n){void 0===e&&(e=0);var r=-1;return Qe(t)?r=Number(t)<1?1:Number(t):U(t)&&(n=t),U(n)||(n=fe),new b((function(t){var i=Qe(e)?e:+e-n.now();return n.schedule(ct,i,{index:0,period:r,subscriber:t})}))},using:function(e,t){return new b((function(n){var r,i;try{r=e()}catch(e){return void n.error(e)}try{i=t(r)}catch(e){return void n.error(e)}var o=(i?ze(i):H).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe()}}))},zip:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return"function"==typeof n&&e.pop(),$(e,void 0).lift(new dt(n))}}),vt=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}(gt);return function(e){var t=vt,n=function(){function e(e,n,i,o){if(this.url=e,this.protocols=n,this.config=i,this.binaryType=o,this.reconnectAttempts=0,this.sendQueue=[],this.onOpenCallbacks=[],this.onMessageCallbacks=[],this.onErrorCallbacks=[],this.onCloseCallbacks=[],this.readyStateConstants={UNINITIALIZED:-1,CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3,RECONNECT_ABORTED:4},this.normalCloseCode=1e3,this.reconnectableStatusCodes=[4e3],this.send4Mode=r.Observable,!new RegExp("wss?://").test(e))throw new Error("Invalid url provided");this.config=Object.assign({initialTimeout:500,maxTimeout:3e5,reconnectIfNotNormalClose:!1},i),this.binaryType=o||"blob",this.dataStream=new t.Subject,this.errorMessages=new t.Subject,this.connect(!0)}return e.prototype.connect=function(e){var t=this;void 0===e&&(e=!1);var n=this;!e&&this.socket&&this.socket.readyState===this.readyStateConstants.OPEN||(n.socket=this.protocols?new WebSocket(this.url,this.protocols):new WebSocket(this.url),n.socket.binaryType=n.binaryType,n.socket.onopen=function(e){t.onOpenHandler(e)},n.socket.onmessage=function(e){n.onMessageHandler(e),t.dataStream.next(e)},this.socket.onclose=function(e){n.onCloseHandler(e)},this.socket.onerror=function(e){n.onErrorHandler(e),t.errorMessages.next(e)})},e.prototype.getErrorStream=function(){return this.errorMessages},e.prototype.send4Direct=function(e,t){var n=this;return this.getReadyState()!==this.readyStateConstants.OPEN&&this.getReadyState()!==this.readyStateConstants.CONNECTING&&this.connect(),n.sendQueue.push({message:e,binary:t}),n.socket.readyState===n.readyStateConstants.OPEN&&(n.fireQueue(),!0)},e.prototype.send4Promise=function(e,t){var n=this;return new Promise((function(r,i){return n.send4Direct(e,t)?r():i(Error("Socket connection has been closed"))}))},e.prototype.send4Observable=function(e,n){var r=this;return t.Observable.create((function(t){return r.send4Direct(e,n)?t.complete():t.error("Socket connection has been closed")}))},e.prototype.setSend4Mode=function(e){this.send4Mode=e},e.prototype.send=function(e,t,n){switch(void 0!==t?t:this.send4Mode){case r.Direct:return this.send4Direct(e,n);case r.Promise:return this.send4Promise(e,n);case r.Observable:return this.send4Observable(e,n);default:throw Error("WebSocketSendMode Error.")}},e.prototype.getDataStream=function(){return this.dataStream},e.prototype.onOpenHandler=function(e){this.reconnectAttempts=0,this.notifyOpenCallbacks(e),this.fireQueue()},e.prototype.notifyOpenCallbacks=function(e){for(var t=0;t<this.onOpenCallbacks.length;t++)this.onOpenCallbacks[t].call(this,e)},e.prototype.fireQueue=function(){for(;this.sendQueue.length&&this.socket.readyState===this.readyStateConstants.OPEN;){var t=this.sendQueue.shift();t.binary?this.socket.send(t.message):this.socket.send(e.Helpers.isString(t.message)?t.message:JSON.stringify(t.message))}},e.prototype.notifyCloseCallbacks=function(e){for(var t=0;t<this.onCloseCallbacks.length;t++)this.onCloseCallbacks[t].call(this,e)},e.prototype.notifyErrorCallbacks=function(e){for(var t=0;t<this.onErrorCallbacks.length;t++)this.onErrorCallbacks[t].call(this,e)},e.prototype.onOpen=function(e){return this.onOpenCallbacks.push(e),this},e.prototype.onClose=function(e){return this.onCloseCallbacks.push(e),this},e.prototype.onError=function(e){return this.onErrorCallbacks.push(e),this},e.prototype.onMessage=function(t,n){if(!e.Helpers.isFunction(t))throw new Error("Callback must be a function");return this.onMessageCallbacks.push({fn:t,pattern:n?n.filter:void 0,autoApply:!n||n.autoApply}),this},e.prototype.onMessageHandler=function(e){for(var t=this,n=0;n<t.onMessageCallbacks.length;n++)t.onMessageCallbacks[n].fn.apply(t,[e])},e.prototype.onCloseHandler=function(e){this.notifyCloseCallbacks(e),this.config.reconnectIfNotNormalClose&&e.code!==this.normalCloseCode||this.reconnectableStatusCodes.indexOf(e.code)>-1?this.reconnect():(this.sendQueue=[],this.dataStream.complete())},e.prototype.onErrorHandler=function(e){this.notifyErrorCallbacks(e)},e.prototype.reconnect=function(){var e=this;this.close(!0,!0);var t=this.getBackoffDelay(++this.reconnectAttempts);return setTimeout((function(){e.config.reconnectIfNotNormalClose&&e.connect()}),t),this},e.prototype.close=function(e,t){return void 0===e&&(e=!1),t||(this.config.reconnectIfNotNormalClose=!1),!e&&this.socket.bufferedAmount||this.socket.close(this.normalCloseCode),this},e.prototype.getBackoffDelay=function(e){var t=Math.random()+1,n=this.config.initialTimeout,r=e,i=this.config.maxTimeout;return Math.floor(Math.min(t*n*Math.pow(2,r),i))},e.prototype.setInternalState=function(e){if(Math.floor(e)!==e||e<0||e>4)throw new Error("state must be an integer between 0 and 4, got: "+e);this.internalConnectionState=e},e.prototype.getReadyState=function(){return null==this.socket?this.readyStateConstants.UNINITIALIZED:this.internalConnectionState||this.socket.readyState},e.Helpers=function(){function e(){}return e.isPresent=function(e){return null!=e},e.isString=function(e){return"string"==typeof e},e.isArray=function(e){return Array.isArray(e)},e.isFunction=function(e){return"function"==typeof e},e}(),e}();e.$WebSocket=n,function(e){e[e.Direct=0]="Direct",e[e.Promise=1]="Promise",e[e.Observable=2]="Observable"}(e.WebSocketSendMode||(e.WebSocketSendMode={}));var r=e.WebSocketSendMode}(e),e})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("rxjs")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","rxjs"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ngCircleProgress={},e.ng.core,e.ng.common,e.rxjs)}(this,(function(e,t,n,r){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o=i(t),s=i(n);class a{constructor(){this.class="",this.backgroundGradient=!1,this.backgroundColor="transparent",this.backgroundGradientStopColor="transparent",this.backgroundOpacity=1,this.backgroundStroke="transparent",this.backgroundStrokeWidth=0,this.backgroundPadding=5,this.percent=0,this.radius=90,this.space=4,this.toFixed=0,this.maxPercent=1e3,this.renderOnClick=!0,this.units="%",this.unitsFontSize="10",this.unitsFontWeight="normal",this.unitsColor="#444444",this.outerStrokeGradient=!1,this.outerStrokeWidth=8,this.outerStrokeColor="#78C000",this.outerStrokeGradientStopColor="transparent",this.outerStrokeLinecap="round",this.innerStrokeColor="#C7E596",this.innerStrokeWidth=4,this.titleFormat=void 0,this.title="auto",this.titleColor="#444444",this.titleFontSize="20",this.titleFontWeight="normal",this.subtitleFormat=void 0,this.subtitle="progress",this.subtitleColor="#A9A9A9",this.subtitleFontSize="10",this.subtitleFontWeight="normal",this.imageSrc=void 0,this.imageHeight=0,this.imageWidth=0,this.animation=!0,this.animateTitle=!0,this.animateSubtitle=!1,this.animationDuration=500,this.showTitle=!0,this.showSubtitle=!0,this.showUnits=!0,this.showImage=!1,this.showBackground=!0,this.showInnerStroke=!0,this.clockwise=!0,this.responsive=!1,this.startFromZero=!0,this.showZeroOuterStroke=!0,this.lazy=!1}}class l{constructor(e,i,o,s){this.ngZone=i,this.elRef=o,this.onClick=new t.EventEmitter,this.svgElement=null,this.isInViewport=!1,this.onViewportChanged=new t.EventEmitter,this._viewportChangedSubscriber=null,this.options=new a,this.defaultOptions=new a,this._lastPercent=0,this._gradientUUID=null,this.render=()=>{this.applyOptions(),this.options.lazy?(null===this.svgElement&&this.draw(this._lastPercent),this.isInViewport&&(this.options.animation&&this.options.animationDuration>0?this.animate(this._lastPercent,this.options.percent):this.draw(this.options.percent),this._lastPercent=this.options.percent)):(this.options.animation&&this.options.animationDuration>0?this.animate(this._lastPercent,this.options.percent):this.draw(this.options.percent),this._lastPercent=this.options.percent)},this.polarToCartesian=(e,t,n,r)=>{let i=r*Math.PI/180;return{x:e+Math.sin(i)*n,y:t-Math.cos(i)*n}},this.draw=e=>{let t=(e=void 0===e?this.options.percent:Math.abs(e))>100?100:e,n=2*this.options.radius+2*this.options.outerStrokeWidth;this.options.showBackground&&(n+=2*this.options.backgroundStrokeWidth+this.max(0,2*this.options.backgroundPadding));let r,i,o={x:n/2,y:n/2},s=o.x,a=o.y-this.options.radius,l=this.polarToCartesian(o.x,o.y,this.options.radius,360*(this.options.clockwise?t:100-t)/100);100===t&&(l.x=l.x+(this.options.clockwise?-.01:.01)),[r,i]=t>50?this.options.clockwise?[1,1]:[1,0]:this.options.clockwise?[0,1]:[0,0];let u=this.options.animateTitle?e:this.options.percent,c=u>this.options.maxPercent?`${this.options.maxPercent.toFixed(this.options.toFixed)}+`:u.toFixed(this.options.toFixed),d=this.options.animateSubtitle?e:this.options.percent,h={x:o.x,y:o.y,textAnchor:"middle",color:this.options.titleColor,fontSize:this.options.titleFontSize,fontWeight:this.options.titleFontWeight,texts:[],tspans:[]};if(void 0!==this.options.titleFormat&&"Function"===this.options.titleFormat.constructor.name){let e=this.options.titleFormat(u);e instanceof Array?h.texts=[...e]:h.texts.push(e.toString())}else"auto"===this.options.title?h.texts.push(c):this.options.title instanceof Array?h.texts=[...this.options.title]:h.texts.push(this.options.title.toString());let p={x:o.x,y:o.y,textAnchor:"middle",color:this.options.subtitleColor,fontSize:this.options.subtitleFontSize,fontWeight:this.options.subtitleFontWeight,texts:[],tspans:[]};if(void 0!==this.options.subtitleFormat&&"Function"===this.options.subtitleFormat.constructor.name){let e=this.options.subtitleFormat(d);e instanceof Array?p.texts=[...e]:p.texts.push(e.toString())}else this.options.subtitle instanceof Array?p.texts=[...this.options.subtitle]:p.texts.push(this.options.subtitle.toString());let f={text:`${this.options.units}`,fontSize:this.options.unitsFontSize,fontWeight:this.options.unitsFontWeight,color:this.options.unitsColor},m=0,g=1;if(this.options.showTitle&&(m+=h.texts.length),this.options.showSubtitle&&(m+=p.texts.length),this.options.showTitle)for(let e of h.texts)h.tspans.push({span:e,dy:this.getRelativeY(g,m)}),g++;if(this.options.showSubtitle)for(let e of p.texts)p.tspans.push({span:e,dy:this.getRelativeY(g,m)}),g++;null===this._gradientUUID&&(this._gradientUUID=this.uuid()),this.svg={viewBox:`0 0 ${n} ${n}`,width:this.options.responsive?"100%":n,height:this.options.responsive?"100%":n,backgroundCircle:{cx:o.x,cy:o.y,r:this.options.radius+this.options.outerStrokeWidth/2+this.options.backgroundPadding,fill:this.options.backgroundColor,fillOpacity:this.options.backgroundOpacity,stroke:this.options.backgroundStroke,strokeWidth:this.options.backgroundStrokeWidth},path:{d:`M ${s} ${a}\n A ${this.options.radius} ${this.options.radius} 0 ${r} ${i} ${l.x} ${l.y}`,stroke:this.options.outerStrokeColor,strokeWidth:this.options.outerStrokeWidth,strokeLinecap:this.options.outerStrokeLinecap,fill:"none"},circle:{cx:o.x,cy:o.y,r:this.options.radius-this.options.space-this.options.outerStrokeWidth/2-this.options.innerStrokeWidth/2,fill:"none",stroke:this.options.innerStrokeColor,strokeWidth:this.options.innerStrokeWidth},title:h,units:f,subtitle:p,image:{x:o.x-this.options.imageWidth/2,y:o.y-this.options.imageHeight/2,src:this.options.imageSrc,width:this.options.imageWidth,height:this.options.imageHeight},outerLinearGradient:{id:"outer-linear-"+this._gradientUUID,colorStop1:this.options.outerStrokeColor,colorStop2:"transparent"===this.options.outerStrokeGradientStopColor?"#FFF":this.options.outerStrokeGradientStopColor},radialGradient:{id:"radial-"+this._gradientUUID,colorStop1:this.options.backgroundColor,colorStop2:"transparent"===this.options.backgroundGradientStopColor?"#FFF":this.options.backgroundGradientStopColor}}},this.getAnimationParameters=(e,t)=>{let n,r,i,o=this.options.startFromZero||e<0?0:e,s=t<0?0:this.min(t,this.options.maxPercent),a=Math.abs(Math.round(s-o));return a>=100?(n=100,r=this.options.animateTitle||this.options.animateSubtitle?Math.round(a/n):1):(n=a,r=1),i=Math.round(this.options.animationDuration/n),i<10&&(i=10,n=this.options.animationDuration/i,r=!this.options.animateTitle&&!this.options.animateSubtitle&&a>100?Math.round(100/n):Math.round(a/n)),r<1&&(r=1),{times:n,step:r,interval:i}},this.animate=(e,t)=>{this._timerSubscription&&!this._timerSubscription.closed&&this._timerSubscription.unsubscribe();let n=this.options.startFromZero?0:e,i=t,{step:o,interval:s}=this.getAnimationParameters(n,i),a=n;this._timerSubscription=n<i?r.timer(0,s).subscribe((()=>{a+=o,a<=i?!this.options.animateTitle&&!this.options.animateSubtitle&&a>=100?(this.draw(i),this._timerSubscription.unsubscribe()):this.draw(a):(this.draw(i),this._timerSubscription.unsubscribe())})):r.timer(0,s).subscribe((()=>{a-=o,a>=i?!this.options.animateTitle&&!this.options.animateSubtitle&&i>=100?(this.draw(i),this._timerSubscription.unsubscribe()):this.draw(a):(this.draw(i),this._timerSubscription.unsubscribe())}))},this.applyOptions=()=>{for(let e of Object.keys(this.options))this.hasOwnProperty(e)&&void 0!==this[e]?this.options[e]=this[e]:this.templateOptions&&void 0!==this.templateOptions[e]&&(this.options[e]=this.templateOptions[e]);this.options.radius=Math.abs(+this.options.radius),this.options.space=+this.options.space,this.options.percent=+this.options.percent>0?+this.options.percent:0,this.options.maxPercent=Math.abs(+this.options.maxPercent),this.options.animationDuration=Math.abs(this.options.animationDuration),this.options.outerStrokeWidth=Math.abs(+this.options.outerStrokeWidth),this.options.innerStrokeWidth=Math.abs(+this.options.innerStrokeWidth),this.options.backgroundPadding=+this.options.backgroundPadding},this.getRelativeY=(e,t)=>(1*(e-t/2)-.18).toFixed(2)+"em",this.min=(e,t)=>e<t?e:t,this.max=(e,t)=>e>t?e:t,this.uuid=()=>{var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))},this.checkViewport=()=>{this.findSvgElement();let e=this.isInViewport;this.isInViewport=this.isElementInViewport(this.svgElement),e!==this.isInViewport&&this.onViewportChanged.observers.length>0&&this.ngZone.run((()=>{this.onViewportChanged.emit({oldValue:e,newValue:this.isInViewport})}))},this.onScroll=e=>{this.checkViewport()},this.loadEventsForLazyMode=()=>{if(this.options.lazy){this.ngZone.runOutsideAngular((()=>{this.document.addEventListener("scroll",this.onScroll,!0),this.window.addEventListener("resize",this.onScroll,!0)})),null===this._viewportChangedSubscriber&&(this._viewportChangedSubscriber=this.onViewportChanged.subscribe((({oldValue:e,newValue:t})=>{t&&this.render()})));let e=r.timer(0,50).subscribe((()=>{null===this.svgElement?this.checkViewport():e.unsubscribe()}))}},this.unloadEventsForLazyMode=()=>{this.document.removeEventListener("scroll",this.onScroll,!0),this.window.removeEventListener("resize",this.onScroll,!0),null!==this._viewportChangedSubscriber&&(this._viewportChangedSubscriber.unsubscribe(),this._viewportChangedSubscriber=null)},this.document=s.get(n.DOCUMENT),this.window=this.document.defaultView,Object.assign(this.options,e),Object.assign(this.defaultOptions,e)}emitClickEvent(e){this.options.renderOnClick&&this.animate(0,this.options.percent),this.onClick.observers.length>0&&this.onClick.emit(e)}isDrawing(){return this._timerSubscription&&!this._timerSubscription.closed}findSvgElement(){if(null===this.svgElement){let e=this.elRef.nativeElement.getElementsByTagName("svg");e.length>0&&(this.svgElement=e[0])}}isElementInViewport(e){if(null==e)return!1;let t,n=e.getBoundingClientRect(),r=e.parentNode;do{if(t=r.getBoundingClientRect(),n.top>=t.bottom)return!1;if(n.bottom<=t.top)return!1;if(n.left>=t.right)return!1;if(n.right<=t.left)return!1;r=r.parentNode}while(r!=this.document.body);return!(n.top>=(this.window.innerHeight||this.document.documentElement.clientHeight))&&(!(n.bottom<=0)&&(!(n.left>=(this.window.innerWidth||this.document.documentElement.clientWidth))&&!(n.right<=0)))}ngOnInit(){this.loadEventsForLazyMode()}ngOnDestroy(){this.unloadEventsForLazyMode()}ngOnChanges(e){this.render(),"lazy"in e&&(e.lazy.currentValue?this.loadEventsForLazyMode():this.unloadEventsForLazyMode())}}l.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"14.2.12",ngImport:o,type:l,deps:[{token:a},{token:o.NgZone},{token:o.ElementRef},{token:o.Injector}],target:o.\u0275\u0275FactoryTarget.Component}),l.\u0275cmp=o.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"14.2.12",type:l,selector:"circle-progress",inputs:{name:"name",class:"class",backgroundGradient:"backgroundGradient",backgroundColor:"backgroundColor",backgroundGradientStopColor:"backgroundGradientStopColor",backgroundOpacity:"backgroundOpacity",backgroundStroke:"backgroundStroke",backgroundStrokeWidth:"backgroundStrokeWidth",backgroundPadding:"backgroundPadding",radius:"radius",space:"space",percent:"percent",toFixed:"toFixed",maxPercent:"maxPercent",renderOnClick:"renderOnClick",units:"units",unitsFontSize:"unitsFontSize",unitsFontWeight:"unitsFontWeight",unitsColor:"unitsColor",outerStrokeGradient:"outerStrokeGradient",outerStrokeWidth:"outerStrokeWidth",outerStrokeColor:"outerStrokeColor",outerStrokeGradientStopColor:"outerStrokeGradientStopColor",outerStrokeLinecap:"outerStrokeLinecap",innerStrokeColor:"innerStrokeColor",innerStrokeWidth:"innerStrokeWidth",titleFormat:"titleFormat",title:"title",titleColor:"titleColor",titleFontSize:"titleFontSize",titleFontWeight:"titleFontWeight",subtitleFormat:"subtitleFormat",subtitle:"subtitle",subtitleColor:"subtitleColor",subtitleFontSize:"subtitleFontSize",subtitleFontWeight:"subtitleFontWeight",imageSrc:"imageSrc",imageHeight:"imageHeight",imageWidth:"imageWidth",animation:"animation",animateTitle:"animateTitle",animateSubtitle:"animateSubtitle",animationDuration:"animationDuration",showTitle:"showTitle",showSubtitle:"showSubtitle",showUnits:"showUnits",showImage:"showImage",showBackground:"showBackground",showInnerStroke:"showInnerStroke",clockwise:"clockwise",responsive:"responsive",startFromZero:"startFromZero",showZeroOuterStroke:"showZeroOuterStroke",lazy:"lazy",templateOptions:["options","templateOptions"]},outputs:{onClick:"onClick"},usesOnChanges:!0,ngImport:o,template:'\n <svg xmlns="http://www.w3.org/2000/svg" *ngIf="svg"\n [attr.viewBox]="svg.viewBox" preserveAspectRatio="xMidYMid meet"\n [attr.height]="svg.height" [attr.width]="svg.width" (click)="emitClickEvent($event)" [attr.class]="options.class">\n <defs>\n <linearGradient *ngIf="options.outerStrokeGradient" [attr.id]="svg.outerLinearGradient.id">\n <stop offset="5%" [attr.stop-color]="svg.outerLinearGradient.colorStop1" [attr.stop-opacity]="1"/>\n <stop offset="95%" [attr.stop-color]="svg.outerLinearGradient.colorStop2" [attr.stop-opacity]="1"/>\n </linearGradient>\n <radialGradient *ngIf="options.backgroundGradient" [attr.id]="svg.radialGradient.id">\n <stop offset="5%" [attr.stop-color]="svg.radialGradient.colorStop1" [attr.stop-opacity]="1"/>\n <stop offset="95%" [attr.stop-color]="svg.radialGradient.colorStop2" [attr.stop-opacity]="1"/>\n </radialGradient>\n </defs>\n <ng-container *ngIf="options.showBackground">\n <circle *ngIf="!options.backgroundGradient"\n [attr.cx]="svg.backgroundCircle.cx"\n [attr.cy]="svg.backgroundCircle.cy"\n [attr.r]="svg.backgroundCircle.r"\n [attr.fill]="svg.backgroundCircle.fill"\n [attr.fill-opacity]="svg.backgroundCircle.fillOpacity"\n [attr.stroke]="svg.backgroundCircle.stroke"\n [attr.stroke-width]="svg.backgroundCircle.strokeWidth"/>\n <circle *ngIf="options.backgroundGradient"\n [attr.cx]="svg.backgroundCircle.cx"\n [attr.cy]="svg.backgroundCircle.cy"\n [attr.r]="svg.backgroundCircle.r"\n attr.fill="url({{window.location.href}}#{{svg.radialGradient.id}})"\n [attr.fill-opacity]="svg.backgroundCircle.fillOpacity"\n [attr.stroke]="svg.backgroundCircle.stroke"\n [attr.stroke-width]="svg.backgroundCircle.strokeWidth"/>\n </ng-container> \n <circle *ngIf="options.showInnerStroke"\n [attr.cx]="svg.circle.cx"\n [attr.cy]="svg.circle.cy"\n [attr.r]="svg.circle.r"\n [attr.fill]="svg.circle.fill"\n [attr.stroke]="svg.circle.stroke"\n [attr.stroke-width]="svg.circle.strokeWidth"/>\n <ng-container *ngIf="+options.percent!==0 || options.showZeroOuterStroke">\n <path *ngIf="!options.outerStrokeGradient"\n [attr.d]="svg.path.d"\n [attr.stroke]="svg.path.stroke"\n [attr.stroke-width]="svg.path.strokeWidth"\n [attr.stroke-linecap]="svg.path.strokeLinecap"\n [attr.fill]="svg.path.fill"/>\n <path *ngIf="options.outerStrokeGradient"\n [attr.d]="svg.path.d"\n attr.stroke="url({{window.location.href}}#{{svg.outerLinearGradient.id}})"\n [attr.stroke-width]="svg.path.strokeWidth"\n [attr.stroke-linecap]="svg.path.strokeLinecap"\n [attr.fill]="svg.path.fill"/>\n </ng-container>\n <text *ngIf="!options.showImage && (options.showTitle || options.showUnits || options.showSubtitle)"\n alignment-baseline="baseline"\n [attr.x]="svg.circle.cx"\n [attr.y]="svg.circle.cy"\n [attr.text-anchor]="svg.title.textAnchor">\n <ng-container *ngIf="options.showTitle">\n <tspan *ngFor="let tspan of svg.title.tspans"\n [attr.x]="svg.title.x"\n [attr.y]="svg.title.y"\n [attr.dy]="tspan.dy"\n [attr.font-size]="svg.title.fontSize"\n [attr.font-weight]="svg.title.fontWeight"\n [attr.fill]="svg.title.color">{{tspan.span}}</tspan>\n </ng-container>\n <tspan *ngIf="options.showUnits"\n [attr.font-size]="svg.units.fontSize"\n [attr.font-weight]="svg.units.fontWeight"\n [attr.fill]="svg.units.color">{{svg.units.text}}</tspan>\n <ng-container *ngIf="options.showSubtitle">\n <tspan *ngFor="let tspan of svg.subtitle.tspans"\n [attr.x]="svg.subtitle.x"\n [attr.y]="svg.subtitle.y"\n [attr.dy]="tspan.dy"\n [attr.font-size]="svg.subtitle.fontSize"\n [attr.font-weight]="svg.subtitle.fontWeight"\n [attr.fill]="svg.subtitle.color">{{tspan.span}}</tspan>\n </ng-container>\n </text>\n <image *ngIf="options.showImage" preserveAspectRatio="none" \n [attr.height]="svg.image.height"\n [attr.width]="svg.image.width"\n [attr.xlink:href]="svg.image.src"\n [attr.x]="svg.image.x"\n [attr.y]="svg.image.y"\n />\n </svg>\n ',isInline:!0,dependencies:[{kind:"directive",type:s.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:s.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"14.2.12",ngImport:o,type:l,decorators:[{type:t.Component,args:[{selector:"circle-progress",template:'\n <svg xmlns="http://www.w3.org/2000/svg" *ngIf="svg"\n [attr.viewBox]="svg.viewBox" preserveAspectRatio="xMidYMid meet"\n [attr.height]="svg.height" [attr.width]="svg.width" (click)="emitClickEvent($event)" [attr.class]="options.class">\n <defs>\n <linearGradient *ngIf="options.outerStrokeGradient" [attr.id]="svg.outerLinearGradient.id">\n <stop offset="5%" [attr.stop-color]="svg.outerLinearGradient.colorStop1" [attr.stop-opacity]="1"/>\n <stop offset="95%" [attr.stop-color]="svg.outerLinearGradient.colorStop2" [attr.stop-opacity]="1"/>\n </linearGradient>\n <radialGradient *ngIf="options.backgroundGradient" [attr.id]="svg.radialGradient.id">\n <stop offset="5%" [attr.stop-color]="svg.radialGradient.colorStop1" [attr.stop-opacity]="1"/>\n <stop offset="95%" [attr.stop-color]="svg.radialGradient.colorStop2" [attr.stop-opacity]="1"/>\n </radialGradient>\n </defs>\n <ng-container *ngIf="options.showBackground">\n <circle *ngIf="!options.backgroundGradient"\n [attr.cx]="svg.backgroundCircle.cx"\n [attr.cy]="svg.backgroundCircle.cy"\n [attr.r]="svg.backgroundCircle.r"\n [attr.fill]="svg.backgroundCircle.fill"\n [attr.fill-opacity]="svg.backgroundCircle.fillOpacity"\n [attr.stroke]="svg.backgroundCircle.stroke"\n [attr.stroke-width]="svg.backgroundCircle.strokeWidth"/>\n <circle *ngIf="options.backgroundGradient"\n [attr.cx]="svg.backgroundCircle.cx"\n [attr.cy]="svg.backgroundCircle.cy"\n [attr.r]="svg.backgroundCircle.r"\n attr.fill="url({{window.location.href}}#{{svg.radialGradient.id}})"\n [attr.fill-opacity]="svg.backgroundCircle.fillOpacity"\n [attr.stroke]="svg.backgroundCircle.stroke"\n [attr.stroke-width]="svg.backgroundCircle.strokeWidth"/>\n </ng-container> \n <circle *ngIf="options.showInnerStroke"\n [attr.cx]="svg.circle.cx"\n [attr.cy]="svg.circle.cy"\n [attr.r]="svg.circle.r"\n [attr.fill]="svg.circle.fill"\n [attr.stroke]="svg.circle.stroke"\n [attr.stroke-width]="svg.circle.strokeWidth"/>\n <ng-container *ngIf="+options.percent!==0 || options.showZeroOuterStroke">\n <path *ngIf="!options.outerStrokeGradient"\n [attr.d]="svg.path.d"\n [attr.stroke]="svg.path.stroke"\n [attr.stroke-width]="svg.path.strokeWidth"\n [attr.stroke-linecap]="svg.path.strokeLinecap"\n [attr.fill]="svg.path.fill"/>\n <path *ngIf="options.outerStrokeGradient"\n [attr.d]="svg.path.d"\n attr.stroke="url({{window.location.href}}#{{svg.outerLinearGradient.id}})"\n [attr.stroke-width]="svg.path.strokeWidth"\n [attr.stroke-linecap]="svg.path.strokeLinecap"\n [attr.fill]="svg.path.fill"/>\n </ng-container>\n <text *ngIf="!options.showImage && (options.showTitle || options.showUnits || options.showSubtitle)"\n alignment-baseline="baseline"\n [attr.x]="svg.circle.cx"\n [attr.y]="svg.circle.cy"\n [attr.text-anchor]="svg.title.textAnchor">\n <ng-container *ngIf="options.showTitle">\n <tspan *ngFor="let tspan of svg.title.tspans"\n [attr.x]="svg.title.x"\n [attr.y]="svg.title.y"\n [attr.dy]="tspan.dy"\n [attr.font-size]="svg.title.fontSize"\n [attr.font-weight]="svg.title.fontWeight"\n [attr.fill]="svg.title.color">{{tspan.span}}</tspan>\n </ng-container>\n <tspan *ngIf="options.showUnits"\n [attr.font-size]="svg.units.fontSize"\n [attr.font-weight]="svg.units.fontWeight"\n [attr.fill]="svg.units.color">{{svg.units.text}}</tspan>\n <ng-container *ngIf="options.showSubtitle">\n <tspan *ngFor="let tspan of svg.subtitle.tspans"\n [attr.x]="svg.subtitle.x"\n [attr.y]="svg.subtitle.y"\n [attr.dy]="tspan.dy"\n [attr.font-size]="svg.subtitle.fontSize"\n [attr.font-weight]="svg.subtitle.fontWeight"\n [attr.fill]="svg.subtitle.color">{{tspan.span}}</tspan>\n </ng-container>\n </text>\n <image *ngIf="options.showImage" preserveAspectRatio="none" \n [attr.height]="svg.image.height"\n [attr.width]="svg.image.width"\n [attr.xlink:href]="svg.image.src"\n [attr.x]="svg.image.x"\n [attr.y]="svg.image.y"\n />\n </svg>\n '}]}],ctorParameters:function(){return[{type:a},{type:o.NgZone},{type:o.ElementRef},{type:o.Injector}]},propDecorators:{onClick:[{type:t.Output}],name:[{type:t.Input}],class:[{type:t.Input}],backgroundGradient:[{type:t.Input}],backgroundColor:[{type:t.Input}],backgroundGradientStopColor:[{type:t.Input}],backgroundOpacity:[{type:t.Input}],backgroundStroke:[{type:t.Input}],backgroundStrokeWidth:[{type:t.Input}],backgroundPadding:[{type:t.Input}],radius:[{type:t.Input}],space:[{type:t.Input}],percent:[{type:t.Input}],toFixed:[{type:t.Input}],maxPercent:[{type:t.Input}],renderOnClick:[{type:t.Input}],units:[{type:t.Input}],unitsFontSize:[{type:t.Input}],unitsFontWeight:[{type:t.Input}],unitsColor:[{type:t.Input}],outerStrokeGradient:[{type:t.Input}],outerStrokeWidth:[{type:t.Input}],outerStrokeColor:[{type:t.Input}],outerStrokeGradientStopColor:[{type:t.Input}],outerStrokeLinecap:[{type:t.Input}],innerStrokeColor:[{type:t.Input}],innerStrokeWidth:[{type:t.Input}],titleFormat:[{type:t.Input}],title:[{type:t.Input}],titleColor:[{type:t.Input}],titleFontSize:[{type:t.Input}],titleFontWeight:[{type:t.Input}],subtitleFormat:[{type:t.Input}],subtitle:[{type:t.Input}],subtitleColor:[{type:t.Input}],subtitleFontSize:[{type:t.Input}],subtitleFontWeight:[{type:t.Input}],imageSrc:[{type:t.Input}],imageHeight:[{type:t.Input}],imageWidth:[{type:t.Input}],animation:[{type:t.Input}],animateTitle:[{type:t.Input}],animateSubtitle:[{type:t.Input}],animationDuration:[{type:t.Input}],showTitle:[{type:t.Input}],showSubtitle:[{type:t.Input}],showUnits:[{type:t.Input}],showImage:[{type:t.Input}],showBackground:[{type:t.Input}],showInnerStroke:[{type:t.Input}],clockwise:[{type:t.Input}],responsive:[{type:t.Input}],startFromZero:[{type:t.Input}],showZeroOuterStroke:[{type:t.Input}],lazy:[{type:t.Input}],templateOptions:[{type:t.Input,args:["options"]}]}});class u{static forRoot(e={}){return{ngModule:u,providers:[{provide:a,useValue:e}]}}}u.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"14.2.12",ngImport:o,type:u,deps:[],target:o.\u0275\u0275FactoryTarget.NgModule}),u.\u0275mod=o.\u0275\u0275ngDeclareNgModule({minVersion:"14.0.0",version:"14.2.12",ngImport:o,type:u,declarations:[l],imports:[n.CommonModule],exports:[l]}),u.\u0275inj=o.\u0275\u0275ngDeclareInjector({minVersion:"12.0.0",version:"14.2.12",ngImport:o,type:u,imports:[n.CommonModule]}),o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"14.2.12",ngImport:o,type:u,decorators:[{type:t.NgModule,args:[{declarations:[l],imports:[n.CommonModule],exports:[l]}]}]}),e.CircleProgressComponent=l,e.CircleProgressOptions=a,e.NgCircleProgressModule=u})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ngxColorpicker={},e.ng.core,e.ng.common)}(this,(function(e,t,n){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i,o=r(t),s=r(n);!function(e){e[e.HEX=0]="HEX",e[e.RGBA=1]="RGBA",e[e.HSLA=2]="HSLA",e[e.CMYK=3]="CMYK"}(i||(i={}));class a{r;g;b;a;constructor(e,t,n,r){this.r=e,this.g=t,this.b=n,this.a=r}}class l{h;s;v;a;constructor(e,t,n,r){this.h=e,this.s=t,this.v=n,this.a=r}}class u{h;s;l;a;constructor(e,t,n,r){this.h=e,this.s=t,this.l=n,this.a=r}}class c{c;m;y;k;a;constructor(e,t,n,r,i=1){this.c=e,this.m=t,this.y=n,this.k=r,this.a=i}}class d{rg;text;newValue=new t.EventEmitter;inputChange(e){const t=e.target.value;if(void 0===this.rg)this.newValue.emit(t);else{const e=parseFloat(t);this.newValue.emit({v:e,rg:this.rg})}}static"\u0275fac"=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:d,deps:[],target:o.\u0275\u0275FactoryTarget.Directive});static"\u0275dir"=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"17.0.2",type:d,selector:"[text]",inputs:{rg:"rg",text:"text"},outputs:{newValue:"newValue"},host:{listeners:{input:"inputChange($event)"}},ngImport:o})}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:d,decorators:[{type:t.Directive,args:[{selector:"[text]"}]}],propDecorators:{rg:[{type:t.Input}],text:[{type:t.Input}],newValue:[{type:t.Output}],inputChange:[{type:t.HostListener,args:["input",["$event"]]}]}});class h{elRef;listenerMove;listenerStop;rgX;rgY;slider;dragEnd=new t.EventEmitter;dragStart=new t.EventEmitter;newValue=new t.EventEmitter;mouseDown(e){this.start(e)}touchStart(e){this.start(e)}constructor(e){this.elRef=e,this.listenerMove=e=>this.move(e),this.listenerStop=()=>this.stop()}move(e){e.preventDefault(),this.setCursor(e)}start(e){this.setCursor(e),e.stopPropagation(),document.addEventListener("mouseup",this.listenerStop),document.addEventListener("touchend",this.listenerStop),document.addEventListener("mousemove",this.listenerMove),document.addEventListener("touchmove",this.listenerMove),this.dragStart.emit()}stop(){document.removeEventListener("mouseup",this.listenerStop),document.removeEventListener("touchend",this.listenerStop),document.removeEventListener("mousemove",this.listenerMove),document.removeEventListener("touchmove",this.listenerMove),this.dragEnd.emit()}getX(e){const t=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==e.pageX?e.pageX:e.touches[0].pageX)-t.left-window.pageXOffset}getY(e){const t=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==e.pageY?e.pageY:e.touches[0].pageY)-t.top-window.pageYOffset}setCursor(e){const t=this.elRef.nativeElement.offsetWidth,n=this.elRef.nativeElement.offsetHeight,r=Math.max(0,Math.min(this.getX(e),t)),i=Math.max(0,Math.min(this.getY(e),n));void 0!==this.rgX&&void 0!==this.rgY?this.newValue.emit({s:r/t,v:1-i/n,rgX:this.rgX,rgY:this.rgY}):void 0===this.rgX&&void 0!==this.rgY?this.newValue.emit({v:i/n,rgY:this.rgY}):void 0!==this.rgX&&void 0===this.rgY&&this.newValue.emit({v:r/t,rgX:this.rgX})}static"\u0275fac"=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:h,deps:[{token:o.ElementRef}],target:o.\u0275\u0275FactoryTarget.Directive});static"\u0275dir"=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"17.0.2",type:h,selector:"[slider]",inputs:{rgX:"rgX",rgY:"rgY",slider:"slider"},outputs:{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"},host:{listeners:{mousedown:"mouseDown($event)",touchstart:"touchStart($event)"}},ngImport:o})}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:h,decorators:[{type:t.Directive,args:[{selector:"[slider]"}]}],ctorParameters:()=>[{type:o.ElementRef}],propDecorators:{rgX:[{type:t.Input}],rgY:[{type:t.Input}],slider:[{type:t.Input}],dragEnd:[{type:t.Output}],dragStart:[{type:t.Output}],newValue:[{type:t.Output}],mouseDown:[{type:t.HostListener,args:["mousedown",["$event"]]}],touchStart:[{type:t.HostListener,args:["touchstart",["$event"]]}]}});class p{h;s;v;a;constructor(e,t,n,r){this.h=e,this.s=t,this.v=n,this.a=r}}class f{h;s;v;a;constructor(e,t,n,r){this.h=e,this.s=t,this.v=n,this.a=r}}class m{active=null;setActive(e){this.active&&this.active!==e&&"inline"!==this.active.cpDialogDisplay&&this.active.closeDialog(),this.active=e}hsva2hsla(e){const t=e.h,n=e.s,r=e.v,i=e.a;if(0===r)return new u(t,0,0,i);if(0===n&&1===r)return new u(t,1,1,i);{const e=r*(2-n)/2;return new u(t,r*n/(1-Math.abs(2*e-1)),e,i)}}hsla2hsva(e){const t=Math.min(e.h,1),n=Math.min(e.s,1),r=Math.min(e.l,1),i=Math.min(e.a,1);if(0===r)return new l(t,0,0,i);{const e=r+n*(1-Math.abs(2*r-1))/2;return new l(t,2*(e-r)/e,e,i)}}hsvaToRgba(e){let t,n,r;const i=e.h,o=e.s,s=e.v,l=e.a,u=Math.floor(6*i),c=6*i-u,d=s*(1-o),h=s*(1-c*o),p=s*(1-(1-c)*o);switch(u%6){case 0:t=s,n=p,r=d;break;case 1:t=h,n=s,r=d;break;case 2:t=d,n=s,r=p;break;case 3:t=d,n=h,r=s;break;case 4:t=p,n=d,r=s;break;case 5:t=s,n=d,r=h;break;default:t=0,n=0,r=0}return new a(t,n,r,l)}cmykToRgb(e){const t=(1-e.c)*(1-e.k),n=(1-e.m)*(1-e.k),r=(1-e.y)*(1-e.k);return new a(t,n,r,e.a)}rgbaToCmyk(e){const t=1-Math.max(e.r,e.g,e.b);if(1===t)return new c(0,0,0,1,e.a);{const n=(1-e.r-t)/(1-t),r=(1-e.g-t)/(1-t),i=(1-e.b-t)/(1-t);return new c(n,r,i,t,e.a)}}rgbaToHsva(e){let t,n;const r=Math.min(e.r,1),i=Math.min(e.g,1),o=Math.min(e.b,1),s=Math.min(e.a,1),a=Math.max(r,i,o),u=Math.min(r,i,o),c=a,d=a-u;if(n=0===a?0:d/a,a===u)t=0;else{switch(a){case r:t=(i-o)/d+(i<o?6:0);break;case i:t=(o-r)/d+2;break;case o:t=(r-i)/d+4;break;default:t=0}t/=6}return new l(t,n,c,s)}rgbaToHex(e,t){let n="#"+(1<<24|e.r<<16|e.g<<8|e.b).toString(16).substr(1);return t&&(n+=(256|Math.round(255*e.a)).toString(16).substr(1)),n}normalizeCMYK(e){return new c(e.c/100,e.m/100,e.y/100,e.k/100,e.a)}denormalizeCMYK(e){return new c(Math.floor(100*e.c),Math.floor(100*e.m),Math.floor(100*e.y),Math.floor(100*e.k),e.a)}denormalizeRGBA(e){return new a(Math.round(255*e.r),Math.round(255*e.g),Math.round(255*e.b),e.a)}stringToHsva(e="",t=!1){let n=null;e=(e||"").toLowerCase();const r=[{re:/(rgb)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*%?,\s*(\d{1,3})\s*%?(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return new a(parseInt(e[2],10)/255,parseInt(e[3],10)/255,parseInt(e[4],10)/255,isNaN(parseFloat(e[5]))?1:parseFloat(e[5]))}},{re:/(hsl)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return new u(parseInt(e[2],10)/360,parseInt(e[3],10)/100,parseInt(e[4],10)/100,isNaN(parseFloat(e[5]))?1:parseFloat(e[5]))}}];t?r.push({re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/,parse:function(e){return new a(parseInt(e[1],16)/255,parseInt(e[2],16)/255,parseInt(e[3],16)/255,parseInt(e[4]||"FF",16)/255)}}):r.push({re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,parse:function(e){return new a(parseInt(e[1],16)/255,parseInt(e[2],16)/255,parseInt(e[3],16)/255,1)}}),r.push({re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,parse:function(e){return new a(parseInt(e[1]+e[1],16)/255,parseInt(e[2]+e[2],16)/255,parseInt(e[3]+e[3],16)/255,1)}});for(const t in r)if(r.hasOwnProperty(t)){const i=r[t],o=i.re.exec(e),s=o&&i.parse(o);if(s)return s instanceof a?n=this.rgbaToHsva(s):s instanceof u&&(n=this.hsla2hsva(s)),n}return n}outputFormat(e,t,n){switch("auto"===t&&(t=e.a<1?"rgba":"hex"),t){case"hsla":const t=this.hsva2hsla(e),r=new u(Math.round(360*t.h),Math.round(100*t.s),Math.round(100*t.l),Math.round(100*t.a)/100);return e.a<1||"always"===n?"hsla("+r.h+","+r.s+"%,"+r.l+"%,"+r.a+")":"hsl("+r.h+","+r.s+"%,"+r.l+"%)";case"rgba":const i=this.denormalizeRGBA(this.hsvaToRgba(e));return e.a<1||"always"===n?"rgba("+i.r+","+i.g+","+i.b+","+Math.round(100*i.a)/100+")":"rgb("+i.r+","+i.g+","+i.b+")";default:const o="always"===n||"forced"===n;return this.rgbaToHex(this.denormalizeRGBA(this.hsvaToRgba(e)),o)}}static"\u0275fac"=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:m,deps:[],target:o.\u0275\u0275FactoryTarget.Injectable});static"\u0275prov"=o.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:m})}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:m,decorators:[{type:t.Injectable}]});const g="undefined"!=typeof window&&"ontouchstart"in window;class v{ngZone;elRef;cdRef;document;platformId;service;isIE10=!1;cmyk;hsva;width;height;cmykColor;outputColor;initialColor;fallbackColor;listenerResize;listenerMouseDown;directiveInstance;sliderH;sliderDimMax;directiveElementRef;dialogArrowSize=10;dialogArrowOffset=15;dialogInputFields=[i.HEX,i.RGBA,i.HSLA,i.CMYK];useRootViewContainer=!1;show;hidden;top;left;position;format;slider;hexText;hexAlpha;cmykText;hslaText;rgbaText;arrowTop;selectedColor;hueSliderColor;alphaSliderColor;cpWidth;cpHeight;cpColorMode;cpCmykEnabled;cpAlphaChannel;cpOutputFormat;cpDisableInput;cpDialogDisplay;cpIgnoredElements;cpSaveClickOutside;cpCloseClickOutside;cpPosition;cpUsePosition;cpPositionOffset;cpOKButton;cpOKButtonText;cpOKButtonClass;cpCancelButton;cpCancelButtonText;cpCancelButtonClass;cpEyeDropper;eyeDropperSupported;cpPresetLabel;cpPresetColors;cpPresetColorsClass;cpMaxPresetColorsLength;cpPresetEmptyMessage;cpPresetEmptyMessageClass;cpAddColorButton;cpAddColorButtonText;cpAddColorButtonClass;cpRemoveColorButtonClass;cpArrowPosition;cpTriggerElement;cpExtraTemplate;dialogElement;hueSlider;alphaSlider;handleEsc(e){this.show&&"popup"===this.cpDialogDisplay&&this.onCancelColor(e)}handleEnter(e){this.show&&"popup"===this.cpDialogDisplay&&this.onAcceptColor(e)}constructor(e,t,r,i,o,s){this.ngZone=e,this.elRef=t,this.cdRef=r,this.document=i,this.platformId=o,this.service=s,this.eyeDropperSupported=n.isPlatformBrowser(this.platformId)&&"EyeDropper"in this.document.defaultView}ngOnInit(){this.slider=new p(0,0,0,0);const e=this.hueSlider.nativeElement.offsetWidth||140,t=this.alphaSlider.nativeElement.offsetWidth||140;this.sliderDimMax=new f(e,this.cpWidth,130,t),this.cpCmykEnabled?this.format=i.CMYK:"rgba"===this.cpOutputFormat?this.format=i.RGBA:"hsla"===this.cpOutputFormat?this.format=i.HSLA:this.format=i.HEX,this.listenerMouseDown=e=>{this.onMouseDown(e)},this.listenerResize=()=>{this.onResize()},this.openDialog(this.initialColor,!1)}ngOnDestroy(){this.closeDialog()}ngAfterViewInit(){if(230!==this.cpWidth||"inline"===this.cpDialogDisplay){const e=this.hueSlider.nativeElement.offsetWidth||140,t=this.alphaSlider.nativeElement.offsetWidth||140;this.sliderDimMax=new f(e,this.cpWidth,130,t),this.updateColorPicker(!1),this.cdRef.detectChanges()}}openDialog(e,t=!0){this.service.setActive(this),this.width||(this.cpWidth=this.directiveElementRef.nativeElement.offsetWidth),this.height||(this.height=320),this.setInitialColor(e),this.setColorFromString(e,t),this.openColorPicker()}closeDialog(){this.closeColorPicker()}setupDialog(e,t,n,r,i,o,s,a,l,u,c,d,h,p,f,m,g,v,y,_,b,w,x,k,S,T,E,D,C,M,A,I,L,O,N,R,P,F){this.setInitialColor(n),this.setColorMode(a),this.isIE10=10===function(){let e="";"undefined"!=typeof navigator&&(e=navigator.userAgent.toLowerCase());const t=e.indexOf("msie ");return t>0&&parseInt(e.substring(t+5,e.indexOf(".",t)),10)}(),this.directiveInstance=e,this.directiveElementRef=t,this.cpDisableInput=d,this.cpCmykEnabled=l,this.cpAlphaChannel=u,this.cpOutputFormat=c,this.cpDialogDisplay=o,this.cpIgnoredElements=h,this.cpSaveClickOutside=p,this.cpCloseClickOutside=f,this.useRootViewContainer=m,this.width=this.cpWidth=parseInt(r,10),this.height=this.cpHeight=parseInt(i,10),this.cpPosition=g,this.cpPositionOffset=parseInt(v,10),this.cpOKButton=T,this.cpOKButtonText=D,this.cpOKButtonClass=E,this.cpCancelButton=C,this.cpCancelButtonText=A,this.cpCancelButtonClass=M,this.cpEyeDropper=R,this.fallbackColor=s||"#fff",this.setPresetConfig(_,b),this.cpPresetColorsClass=w,this.cpMaxPresetColorsLength=x,this.cpPresetEmptyMessage=k,this.cpPresetEmptyMessageClass=S,this.cpAddColorButton=I,this.cpAddColorButtonText=O,this.cpAddColorButtonClass=L,this.cpRemoveColorButtonClass=N,this.cpTriggerElement=P,this.cpExtraTemplate=F,y||(this.dialogArrowOffset=0),"inline"===o&&(this.dialogArrowSize=0,this.dialogArrowOffset=0),"hex"===c&&"always"!==u&&"forced"!==u&&(this.cpAlphaChannel="disabled")}setColorMode(e){switch(e.toString().toUpperCase()){case"1":case"C":case"COLOR":default:this.cpColorMode=1;break;case"2":case"G":case"GRAYSCALE":this.cpColorMode=2;break;case"3":case"P":case"PRESETS":this.cpColorMode=3}}setInitialColor(e){this.initialColor=e}setPresetConfig(e,t){this.cpPresetLabel=e,this.cpPresetColors=t}setColorFromString(e,t=!0,n=!0){let r;"always"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel?(r=this.service.stringToHsva(e,!0),r||this.hsva||(r=this.service.stringToHsva(e,!1))):r=this.service.stringToHsva(e,!1),r||this.hsva||(r=this.service.stringToHsva(this.fallbackColor,!1)),r&&(this.hsva=r,this.sliderH=this.hsva.h,"hex"===this.cpOutputFormat&&"disabled"===this.cpAlphaChannel&&(this.hsva.a=1),this.updateColorPicker(t,n))}onResize(){"fixed"===this.position?this.setDialogPosition():"inline"!==this.cpDialogDisplay&&this.closeColorPicker()}onDragEnd(e){this.directiveInstance.sliderDragEnd({slider:e,color:this.outputColor})}onDragStart(e){this.directiveInstance.sliderDragStart({slider:e,color:this.outputColor})}onMouseDown(e){!this.show||this.isIE10||"popup"!==this.cpDialogDisplay||e.target===this.directiveElementRef.nativeElement||this.isDescendant(this.elRef.nativeElement,e.target)||this.isDescendant(this.directiveElementRef.nativeElement,e.target)||0!==this.cpIgnoredElements.filter((t=>t===e.target)).length||this.ngZone.run((()=>{this.cpSaveClickOutside?this.directiveInstance.colorSelected(this.outputColor):(this.hsva=null,this.setColorFromString(this.initialColor,!1),this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor),this.directiveInstance.colorCanceled()),this.cpCloseClickOutside&&this.closeColorPicker()}))}onAcceptColor(e){e.stopPropagation(),this.outputColor&&this.directiveInstance.colorSelected(this.outputColor),"popup"===this.cpDialogDisplay&&this.closeColorPicker()}onCancelColor(e){this.hsva=null,e.stopPropagation(),this.directiveInstance.colorCanceled(),this.setColorFromString(this.initialColor,!0),"popup"===this.cpDialogDisplay&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor,!0),this.closeColorPicker())}onEyeDropper(){if(!this.eyeDropperSupported)return;(new window.EyeDropper).open().then((e=>{this.setColorFromString(e.sRGBHex,!0)}))}onFormatToggle(e){const t=this.dialogInputFields.length-(this.cpCmykEnabled?0:1),n=((this.dialogInputFields.indexOf(this.format)+e)%t+t)%t;this.format=this.dialogInputFields[n]}onColorChange(e){this.hsva.s=e.s/e.rgX,this.hsva.v=e.v/e.rgY,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"lightness",value:this.hsva.v,color:this.outputColor}),this.directiveInstance.sliderChanged({slider:"saturation",value:this.hsva.s,color:this.outputColor})}onHueChange(e){this.hsva.h=e.v/e.rgX,this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"hue",value:this.hsva.h,color:this.outputColor})}onValueChange(e){this.hsva.v=e.v/e.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"value",value:this.hsva.v,color:this.outputColor})}onAlphaChange(e){this.hsva.a=e.v/e.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"alpha",value:this.hsva.a,color:this.outputColor})}onHexInput(e){if(null===e)this.updateColorPicker();else{e&&"#"!==e[0]&&(e="#"+e);let t=/^#([a-f0-9]{3}|[a-f0-9]{6})$/gi;"always"===this.cpAlphaChannel&&(t=/^#([a-f0-9]{3}|[a-f0-9]{6}|[a-f0-9]{8})$/gi);const n=t.test(e);n&&(e.length<5&&(e="#"+e.substring(1).split("").map((e=>e+e)).join("")),"forced"===this.cpAlphaChannel&&(e+=Math.round(255*this.hsva.a).toString(16)),this.setColorFromString(e,!0,!1)),this.directiveInstance.inputChanged({input:"hex",valid:n,value:e,color:this.outputColor})}}onRedInput(e){const t=this.service.hsvaToRgba(this.hsva),n=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;n&&(t.r=e.v/e.rg,this.hsva=this.service.rgbaToHsva(t),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"red",valid:n,value:t.r,color:this.outputColor})}onBlueInput(e){const t=this.service.hsvaToRgba(this.hsva),n=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;n&&(t.b=e.v/e.rg,this.hsva=this.service.rgbaToHsva(t),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"blue",valid:n,value:t.b,color:this.outputColor})}onGreenInput(e){const t=this.service.hsvaToRgba(this.hsva),n=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;n&&(t.g=e.v/e.rg,this.hsva=this.service.rgbaToHsva(t),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"green",valid:n,value:t.g,color:this.outputColor})}onHueInput(e){const t=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;t&&(this.hsva.h=e.v/e.rg,this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"hue",valid:t,value:this.hsva.h,color:this.outputColor})}onValueInput(e){const t=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;t&&(this.hsva.v=e.v/e.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"value",valid:t,value:this.hsva.v,color:this.outputColor})}onAlphaInput(e){const t=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;t&&(this.hsva.a=e.v/e.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"alpha",valid:t,value:this.hsva.a,color:this.outputColor})}onLightnessInput(e){const t=this.service.hsva2hsla(this.hsva),n=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;n&&(t.l=e.v/e.rg,this.hsva=this.service.hsla2hsva(t),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"lightness",valid:n,value:t.l,color:this.outputColor})}onSaturationInput(e){const t=this.service.hsva2hsla(this.hsva),n=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;n&&(t.s=e.v/e.rg,this.hsva=this.service.hsla2hsva(t),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"saturation",valid:n,value:t.s,color:this.outputColor})}onCyanInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.c=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"cyan",valid:!0,value:this.cmyk.c,color:this.outputColor})}onMagentaInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.m=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"magenta",valid:!0,value:this.cmyk.m,color:this.outputColor})}onYellowInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.y=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"yellow",valid:!0,value:this.cmyk.y,color:this.outputColor})}onBlackInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.k=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"black",valid:!0,value:this.cmyk.k,color:this.outputColor})}onAddPresetColor(e,t){e.stopPropagation(),this.cpPresetColors.filter((e=>e===t)).length||(this.cpPresetColors=this.cpPresetColors.concat(t),this.directiveInstance.presetColorsChanged(this.cpPresetColors))}onRemovePresetColor(e,t){e.stopPropagation(),this.cpPresetColors=this.cpPresetColors.filter((e=>e!==t)),this.directiveInstance.presetColorsChanged(this.cpPresetColors)}openColorPicker(){this.show||(this.show=!0,this.hidden=!0,setTimeout((()=>{this.hidden=!1,this.setDialogPosition(),this.cdRef.detectChanges()}),0),this.directiveInstance.stateChanged(!0),this.isIE10||this.ngZone.runOutsideAngular((()=>{g?document.addEventListener("touchstart",this.listenerMouseDown):document.addEventListener("mousedown",this.listenerMouseDown)})),window.addEventListener("resize",this.listenerResize))}closeColorPicker(){this.show&&(this.show=!1,this.directiveInstance.stateChanged(!1),this.isIE10||(g?document.removeEventListener("touchstart",this.listenerMouseDown):document.removeEventListener("mousedown",this.listenerMouseDown)),window.removeEventListener("resize",this.listenerResize),this.cdRef.destroyed||this.cdRef.detectChanges())}updateColorPicker(e=!0,t=!0,n=!1){if(this.sliderDimMax){let r,o,s;2===this.cpColorMode&&(this.hsva.s=0);const d=this.outputColor;if(o=this.service.hsva2hsla(this.hsva),this.cpCmykEnabled?(n?(s=this.service.cmykToRgb(this.service.normalizeCMYK(this.cmyk)),this.hsva=this.service.rgbaToHsva(s)):(s=this.service.hsvaToRgba(this.hsva),this.cmyk=this.service.denormalizeCMYK(this.service.rgbaToCmyk(s))),s=this.service.denormalizeRGBA(s),this.sliderH=this.hsva.h):s=this.service.denormalizeRGBA(this.service.hsvaToRgba(this.hsva)),r=this.service.denormalizeRGBA(this.service.hsvaToRgba(new l(this.sliderH||this.hsva.h,1,1,1))),t){this.hslaText=new u(Math.round(360*o.h),Math.round(100*o.s),Math.round(100*o.l),Math.round(100*o.a)/100),this.rgbaText=new a(s.r,s.g,s.b,Math.round(100*s.a)/100),this.cpCmykEnabled&&(this.cmykText=new c(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k,Math.round(100*this.cmyk.a)/100));const e="always"===this.cpAlphaChannel;this.hexText=this.service.rgbaToHex(s,e),this.hexAlpha=this.rgbaText.a}if("auto"===this.cpOutputFormat&&this.format!==i.RGBA&&this.format!==i.CMYK&&this.format!==i.HSLA&&this.hsva.a<1&&(this.format=this.hsva.a<1?i.RGBA:i.HEX),this.hueSliderColor="rgb("+r.r+","+r.g+","+r.b+")",this.alphaSliderColor="rgb("+s.r+","+s.g+","+s.b+")",this.outputColor=this.service.outputFormat(this.hsva,this.cpOutputFormat,this.cpAlphaChannel),this.selectedColor=this.service.outputFormat(this.hsva,"rgba",null),this.format!==i.CMYK)this.cmykColor="";else if("always"===this.cpAlphaChannel||"enabled"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel){const e=Math.round(100*this.cmyk.a)/100;this.cmykColor=`cmyka(${this.cmyk.c},${this.cmyk.m},${this.cmyk.y},${this.cmyk.k},${e})`}else this.cmykColor=`cmyk(${this.cmyk.c},${this.cmyk.m},${this.cmyk.y},${this.cmyk.k})`;this.slider=new p((this.sliderH||this.hsva.h)*this.sliderDimMax.h-8,this.hsva.s*this.sliderDimMax.s-8,(1-this.hsva.v)*this.sliderDimMax.v-8,this.hsva.a*this.sliderDimMax.a-8),e&&d!==this.outputColor&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.outputColor))}}setDialogPosition(){if("inline"===this.cpDialogDisplay)this.position="relative";else{let e,t="static",n="",r=null,i=null,o=this.directiveElementRef.nativeElement.parentNode;const s=this.dialogElement.nativeElement.offsetHeight;for(;null!==o&&"HTML"!==o.tagName;){if(e=window.getComputedStyle(o),t=e.getPropertyValue("position"),n=e.getPropertyValue("transform"),"static"!==t&&null===r&&(r=o),n&&"none"!==n&&null===i&&(i=o),"fixed"===t){r=i;break}o=o.parentNode}const a=this.createDialogBox(this.directiveElementRef.nativeElement,"fixed"!==t);if(this.useRootViewContainer||"fixed"===t&&(!r||r instanceof HTMLUnknownElement))this.top=a.top,this.left=a.left;else{null===r&&(r=o);const e=this.createDialogBox(r,"fixed"!==t);this.top=a.top-e.top,this.left=a.left-e.left}"fixed"===t&&(this.position="fixed");let l=this.cpPosition;const u=this.dialogElement.nativeElement.getBoundingClientRect();if("auto"===this.cpPosition){l=function(e,t){let n="right",r="bottom";const{height:i,width:o}=e,{top:s,left:a}=t,l=s+t.height,u=a+t.width,c=s-i<0,d=l+i>(window.innerHeight||document.documentElement.clientHeight),h=a-o<0,p=u+o>(window.innerWidth||document.documentElement.clientWidth);if(d&&(r="top"),c&&(r="bottom"),h&&(n="right"),p&&(n="left"),c&&d&&h&&p)return["left","right","top","bottom"].reduce(((t,n)=>e[t]>e[n]?t:n));return h&&p?c?"bottom":d||s>l?"top":"bottom":c&&d?h?"right":p||a>u?"left":"right":`${r}-${n}`}(u,this.cpTriggerElement.nativeElement.getBoundingClientRect())}switch(this.arrowTop="top"===l?s-1:void 0,this.cpArrowPosition=void 0,l){case"top":this.top-=s+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*a.width-this.dialogArrowOffset;break;case"bottom":this.top+=a.height+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*a.width-this.dialogArrowOffset;break;case"top-left":case"left-top":this.top-=s-a.height+a.height*this.cpPositionOffset/100,this.left-=this.cpWidth+this.dialogArrowSize-2-this.dialogArrowOffset;break;case"top-right":case"right-top":this.top-=s-a.height+a.height*this.cpPositionOffset/100,this.left+=a.width+this.dialogArrowSize-2-this.dialogArrowOffset;break;case"left":case"bottom-left":case"left-bottom":this.top+=a.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left-=this.cpWidth+this.dialogArrowSize-2;break;default:this.top+=a.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left+=a.width+this.dialogArrowSize-2}const c=window.innerHeight,d=window.innerWidth,h=this.elRef.nativeElement.getBoundingClientRect();this.top+u.height>c&&(this.top=c-u.height,this.cpArrowPosition=h.x/2-20);this.left+u.width>d&&(this.left=d-u.width,this.cpArrowPosition=h.x/2-20),this.cpUsePosition=l}}isDescendant(e,t){let n=t.parentNode;for(;null!==n;){if(n===e)return!0;n=n.parentNode}return!1}createDialogBox(e,t){const{top:n,left:r}=e.getBoundingClientRect();return{top:n+(t?window.pageYOffset:0),left:r+(t?window.pageXOffset:0),width:e.offsetWidth,height:e.offsetHeight}}static"\u0275fac"=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:v,deps:[{token:o.NgZone},{token:o.ElementRef},{token:o.ChangeDetectorRef},{token:n.DOCUMENT},{token:t.PLATFORM_ID},{token:m}],target:o.\u0275\u0275FactoryTarget.Component});static"\u0275cmp"=o.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"17.0.2",type:v,selector:"color-picker",host:{listeners:{"document:keyup.esc":"handleEsc($event)","document:keyup.enter":"handleEnter($event)"}},viewQueries:[{propertyName:"dialogElement",first:!0,predicate:["dialogPopup"],descendants:!0,static:!0},{propertyName:"hueSlider",first:!0,predicate:["hueSlider"],descendants:!0,static:!0},{propertyName:"alphaSlider",first:!0,predicate:["alphaSlider"],descendants:!0,static:!0}],ngImport:o,template:'<div #dialogPopup class="color-picker" [class.open]="show" [style.display]="!show ? \'none\' : \'block\'" [style.visibility]="hidden ? \'hidden\' : \'visible\'" [style.top.px]="top" [style.left.px]="left" [style.position]="position" [style.height.px]="cpHeight" [style.width.px]="cpWidth" (click)="$event.stopPropagation()">\n <div *ngIf="cpDialogDisplay === \'popup\'" [style.left]="cpArrowPosition" class="arrow arrow-{{cpUsePosition}}" [style.top.px]="arrowTop"></div>\n\n <div *ngIf="(cpColorMode ||\xa01) === 1" class="saturation-lightness" [slider] [rgX]="1" [rgY]="1" [style.background-color]="hueSliderColor" (newValue)="onColorChange($event)" (dragStart)="onDragStart(\'saturation-lightness\')" (dragEnd)="onDragEnd(\'saturation-lightness\')">\n <div class="cursor" [style.top.px]="slider?.v" [style.left.px]="slider?.s"></div>\n </div>\n\n <div class="hue-alpha box">\n <div class="left">\n <div class="selected-color-background"></div>\n\n <div class="selected-color" [style.background-color]="selectedColor" [style.cursor]="eyeDropperSupported && cpEyeDropper ? \'pointer\' : null" (click)="eyeDropperSupported && cpEyeDropper && onEyeDropper()">\n <svg *ngIf="eyeDropperSupported && cpEyeDropper" class="eyedropper-icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M17.66 5.41l.92.92-2.69 2.69-.92-.92 2.69-2.69M17.67 3c-.26 0-.51.1-.71.29l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42l-2.34-2.34c-.2-.19-.45-.29-.7-.29zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z"/></svg>\n </div>\n\n <button *ngIf="cpAddColorButton" type="button" class="{{cpAddColorButtonClass}}" [disabled]="cpPresetColors && cpPresetColors.length >= cpMaxPresetColorsLength" (click)="onAddPresetColor($event, selectedColor)">\n {{cpAddColorButtonText}}\n </button>\n </div>\n\n <div class="right">\n <div *ngIf="cpAlphaChannel===\'disabled\'" style="height: 16px;"></div>\n\n <div #hueSlider class="hue" [slider] [rgX]="1" [style.display]="(cpColorMode ||\xa01) === 1 ? \'block\' : \'none\'" (newValue)="onHueChange($event)" (dragStart)="onDragStart(\'hue\')" (dragEnd)="onDragEnd(\'hue\')">\n <div class="cursor" [style.left.px]="slider?.h"></div>\n </div>\n\n <div #valueSlider class="value" [slider] [rgX]="1" [style.display]="(cpColorMode ||\xa01) === 2 ? \'block\': \'none\'" (newValue)="onValueChange($event)" (dragStart)="onDragStart(\'value\')" (dragEnd)="onDragEnd(\'value\')">\n <div class="cursor" [style.right.px]="slider?.v"></div>\n </div>\n\n <div #alphaSlider class="alpha" [slider] [rgX]="1" [style.display]="cpAlphaChannel === \'disabled\' ? \'none\' : \'block\'" [style.background-color]="alphaSliderColor" (newValue)="onAlphaChange($event)" (dragStart)="onDragStart(\'alpha\')" (dragEnd)="onDragEnd(\'alpha\')">\n <div class="cursor" [style.left.px]="slider?.a"></div>\n </div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1" class="cmyk-text" [style.display]="format !== 3 ? \'none\' : \'block\'">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.c" (keyup.enter)="onAcceptColor($event)" (newValue)="onCyanInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.m" (keyup.enter)="onAcceptColor($event)" (newValue)="onMagentaInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.y" (keyup.enter)="onAcceptColor($event)" (newValue)="onYellowInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.k" (keyup.enter)="onAcceptColor($event)" (newValue)="onBlackInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="cmykText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>C</div><div>M</div><div>Y</div><div>K</div><div *ngIf="cpAlphaChannel!==\'disabled\'" >A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1 " class="hsla-text" [style.display]="format !== 2 ? \'none\' : \'block\'">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="360" [text] [rg]="360" [value]="hslaText?.h" (keyup.enter)="onAcceptColor($event)" (newValue)="onHueInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.s" (keyup.enter)="onAcceptColor($event)" (newValue)="onSaturationInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.l" (keyup.enter)="onAcceptColor($event)" (newValue)="onLightnessInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hslaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>H</div><div>S</div><div>L</div><div *ngIf="cpAlphaChannel!==\'disabled\'">A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1 " [style.display]="format !== 1 ? \'none\' : \'block\'" class="rgba-text">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.r" (keyup.enter)="onAcceptColor($event)" (newValue)="onRedInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.g" (keyup.enter)="onAcceptColor($event)" (newValue)="onGreenInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.b" (keyup.enter)="onAcceptColor($event)" (newValue)="onBlueInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="rgbaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>R</div><div>G</div><div>B</div><div *ngIf="cpAlphaChannel!==\'disabled\'" >A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1" class="hex-text" [class.hex-alpha]="cpAlphaChannel===\'forced\'"\n [style.display]="format !== 0 ? \'none\' : \'block\'">\n <div class="box">\n <input [text] [value]="hexText" (blur)="onHexInput(null)" (keyup.enter)="onAcceptColor($event)" (newValue)="onHexInput($event)"/>\n <input *ngIf="cpAlphaChannel===\'forced\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hexAlpha" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)"/>\n </div>\n\n <div class="box">\n <div>Hex</div>\n <div *ngIf="cpAlphaChannel===\'forced\'">A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 2" class="value-text">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.l" (keyup.enter)="onAcceptColor($event)" (newValue)="onValueInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hslaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>V</div><div>A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1" class="type-policy">\n <span class="type-policy-arrow" (click)="onFormatToggle(-1)"></span>\n <span class="type-policy-arrow" (click)="onFormatToggle(1)"></span>\n </div>\n\n <div *ngIf="cpPresetColors?.length || cpAddColorButton" class="preset-area">\n <hr>\n\n <div class="preset-label">{{cpPresetLabel}}</div>\n\n <div *ngIf="cpPresetColors?.length" class="{{cpPresetColorsClass}}">\n <div *ngFor="let color of cpPresetColors" class="preset-color" [style.backgroundColor]="color" (click)="setColorFromString(color)">\n <span *ngIf="cpAddColorButton" class="{{cpRemoveColorButtonClass}}" (click)="onRemovePresetColor($event, color)"></span>\n </div>\n </div>\n\n <div *ngIf="!cpPresetColors?.length && cpAddColorButton" class="{{cpPresetEmptyMessageClass}}">{{cpPresetEmptyMessage}}</div>\n </div>\n\n <div *ngIf="cpOKButton || cpCancelButton" class="button-area">\n <button *ngIf="cpCancelButton" type="button" class="{{cpCancelButtonClass}}" (click)="onCancelColor($event)">{{cpCancelButtonText}}</button>\n\n <button *ngIf="cpOKButton" type="button" class="{{cpOKButtonClass}}" (click)="onAcceptColor($event)">{{cpOKButtonText}}</button>\n </div>\n\n <div class="extra-template" *ngIf="cpExtraTemplate">\n <ng-container *ngTemplateOutlet="cpExtraTemplate"></ng-container>\n </div>\n</div>\n',styles:['.color-picker{position:absolute;z-index:1000;width:230px;height:auto;border:#777 solid 1px;cursor:default;-webkit-user-select:none;user-select:none;background-color:#fff}.color-picker *{box-sizing:border-box;margin:0;font-size:11px}.color-picker input{width:0;height:26px;min-width:0;font-size:13px;text-align:center;color:#000}.color-picker input:invalid,.color-picker input:-moz-ui-invalid,.color-picker input:-moz-submit-invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.color-picker .arrow{position:absolute;z-index:999999;width:0;height:0;border-style:solid}.color-picker .arrow.arrow-top{left:8px;border-width:10px 5px;border-color:#777 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .arrow.arrow-bottom{top:-20px;left:8px;border-width:10px 5px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #777 rgba(0,0,0,0)}.color-picker .arrow.arrow-top-left,.color-picker .arrow.arrow-left-top{right:-21px;bottom:8px;border-width:5px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #777}.color-picker .arrow.arrow-top-right,.color-picker .arrow.arrow-right-top{bottom:8px;left:-20px;border-width:5px 10px;border-color:rgba(0,0,0,0) #777 rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .arrow.arrow-left,.color-picker .arrow.arrow-left-bottom,.color-picker .arrow.arrow-bottom-left{top:8px;right:-21px;border-width:5px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #777}.color-picker .arrow.arrow-right,.color-picker .arrow.arrow-right-bottom,.color-picker .arrow.arrow-bottom-right{top:8px;left:-20px;border-width:5px 10px;border-color:rgba(0,0,0,0) #777 rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .cursor{position:relative;width:16px;height:16px;border:#222 solid 2px;border-radius:50%;cursor:default}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{position:relative;padding:16px 8px}.color-picker .right{flex:1 1 auto;padding:12px 8px}.color-picker .button-area{padding:0 16px 16px;text-align:right}.color-picker .button-area button{margin-left:8px}.color-picker .preset-area{padding:4px 15px}.color-picker .preset-area .preset-label{overflow:hidden;width:100%;padding:4px;font-size:11px;white-space:nowrap;text-align:left;text-overflow:ellipsis;color:#555}.color-picker .preset-area .preset-color{position:relative;display:inline-block;width:18px;height:18px;margin:4px 6px 8px;border:#a9a9a9 solid 1px;border-radius:25%;cursor:pointer}.color-picker .preset-area .preset-empty-message{min-height:18px;margin-top:4px;margin-bottom:8px;font-style:italic;text-align:center}.color-picker .hex-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .hex-text .box{padding:0 24px 8px 8px}.color-picker .hex-text .box div{float:left;flex:1 1 auto;text-align:center;color:#555;clear:left}.color-picker .hex-text .box input{flex:1 1 auto;padding:1px;border:#a9a9a9 solid 1px}.color-picker .hex-alpha .box div:first-child,.color-picker .hex-alpha .box input:first-child{flex-grow:3;margin-right:8px}.color-picker .cmyk-text,.color-picker .hsla-text,.color-picker .rgba-text,.color-picker .value-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .cmyk-text .box,.color-picker .hsla-text .box,.color-picker .rgba-text .box{padding:0 24px 8px 8px}.color-picker .value-text .box{padding:0 8px 8px}.color-picker .cmyk-text .box div,.color-picker .hsla-text .box div,.color-picker .rgba-text .box div,.color-picker .value-text .box div{flex:1 1 auto;margin-right:8px;text-align:center;color:#555}.color-picker .cmyk-text .box div:last-child,.color-picker .hsla-text .box div:last-child,.color-picker .rgba-text .box div:last-child,.color-picker .value-text .box div:last-child{margin-right:0}.color-picker .cmyk-text .box input,.color-picker .hsla-text .box input,.color-picker .rgba-text .box input,.color-picker .value-text .box input{float:left;flex:1;padding:1px;margin:0 8px 0 0;border:#a9a9a9 solid 1px}.color-picker .cmyk-text .box input:last-child,.color-picker .hsla-text .box input:last-child,.color-picker .rgba-text .box input:last-child,.color-picker .value-text .box input:last-child{margin-right:0}.color-picker .hue-alpha{align-items:center;margin-bottom:3px}.color-picker .hue{direction:ltr;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC)}.color-picker .value{direction:rtl;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAACTklEQVR42u3SYUcrABhA4U2SkmRJMmWSJklKJiWZZpKUJJskKUmaTFImKZOUzMySpGRmliRNJilJSpKSJEtmSpIpmWmSdO736/6D+x7OP3gUCoWCv1cqlSQlJZGcnExKSgqpqamkpaWRnp5ORkYGmZmZqFQqsrKyyM7OJicnh9zcXNRqNXl5eeTn56PRaCgoKKCwsJCioiK0Wi3FxcWUlJRQWlpKWVkZ5eXlVFRUUFlZiU6no6qqiurqampqaqitraWurg69Xk99fT0GgwGj0UhDQwONjY00NTXR3NxMS0sLra2ttLW10d7ejslkwmw209HRQWdnJ11dXXR3d9PT00Nvby99fX309/czMDDA4OAgFouFoaEhrFYrw8PDjIyMMDo6ytjYGDabjfHxcSYmJpicnGRqagq73c709DQzMzPMzs4yNzfH/Pw8DocDp9OJy+XC7XazsLDA4uIiS0tLLC8vs7KywurqKmtra3g8HrxeLz6fD7/fz/r6OhsbG2xubrK1tcX29jaBQICdnR2CwSC7u7vs7e2xv7/PwcEBh4eHHB0dcXx8zMnJCaenp5ydnXF+fs7FxQWXl5dcXV1xfX3Nzc0Nt7e33N3dEQqFuL+/5+HhgXA4TCQS4fHxkaenJ56fn3l5eeH19ZVoNMrb2xvv7+98fHwQi8WIx+N8fn6SSCT4+vri+/ubn58ffn9/+VcKgSWwBJbAElgCS2AJLIElsASWwBJYAktgCSyBJbAElsASWAJLYAksgSWwBJbAElgCS2AJLIElsP4/WH8AmJ5Z6jHS4h8AAAAASUVORK5CYII=)}.color-picker .alpha{direction:ltr;width:100%;height:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwYQlZMa3gAAAWVJREFUaN7tmEGO6jAQRCsOArHgBpyAJYGjcGocxAm4A2IHpmoWE0eBH+ezmFlNvU06shJ3W6VEelWMUQAIIF9f6qZpimsA1LYtS2uF51/u27YVAFZVRUkEoGHdPV/sIcbIEIIkUdI/9Xa7neyv61+SWFUVAVCSct00TWn2fv6u3+Ecfd3tXzy/0+nEUu+SPjo/kqzrmiQpScN6v98XewfA8/lMkiLJ2WxGSUopcT6fM6U0NX9/frfbjev1WtfrlZfLhYfDQQHG/AIOlnGwjINlHCxjHCzjYJm/TJWdCwquJXseFFzGwDNNeiKMOJTO8xQdDQaeB29+K9efeLaBo9J7vdvtJj1RjFFjfiv7qv95tjx/7leSQgh93e1ffMeIp6O+YQjho/N791t1XVOSSI7N//K+4/GoxWLBx+PB5/Op5XLJ+/3OlJJWqxU3m83ovv5iGf8KjYNlHCxjHCzjYBkHy5gf5gusvQU7U37jTAAAAABJRU5ErkJggg==)}.color-picker .type-policy{position:absolute;top:218px;right:12px;width:16px;height:24px;background-size:8px 16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-position:center}.color-picker .type-policy .type-policy-arrow{display:block;width:100%;height:50%}.color-picker .selected-color{position:absolute;top:16px;left:8px;width:40px;height:40px;border:1px solid #a9a9a9;border-radius:50%}.color-picker .selected-color-background{width:40px;height:40px;border-radius:50%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC)}.color-picker .saturation-lightness{direction:ltr;width:100%;height:130px;border:none;cursor:pointer;touch-action:manipulation;background-size:100% 100%;background-image:url(data:image/png;base64,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)}.color-picker .cp-add-color-button-class{position:absolute;display:inline;padding:0;margin:3px -3px;border:0;cursor:pointer;background:transparent}.color-picker .cp-add-color-button-class:hover{text-decoration:underline}.color-picker .cp-add-color-button-class:disabled{cursor:not-allowed;color:#999}.color-picker .cp-add-color-button-class:disabled:hover{text-decoration:none}.color-picker .cp-remove-color-button-class{position:absolute;top:-5px;right:-5px;display:block;width:10px;height:10px;border-radius:50%;cursor:pointer;text-align:center;background:#fff;box-shadow:1px 1px 5px #333}.color-picker .cp-remove-color-button-class:before{content:"x";position:relative;bottom:3.5px;display:inline-block;font-size:10px}.color-picker .eyedropper-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);fill:#fff;mix-blend-mode:exclusion}\n'],dependencies:[{kind:"directive",type:s.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:s.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:s.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:d,selector:"[text]",inputs:["rg","text"],outputs:["newValue"]},{kind:"directive",type:h,selector:"[slider]",inputs:["rgX","rgY","slider"],outputs:["dragEnd","dragStart","newValue"]}],encapsulation:o.ViewEncapsulation.None})}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:v,decorators:[{type:t.Component,args:[{selector:"color-picker",encapsulation:t.ViewEncapsulation.None,template:'<div #dialogPopup class="color-picker" [class.open]="show" [style.display]="!show ? \'none\' : \'block\'" [style.visibility]="hidden ? \'hidden\' : \'visible\'" [style.top.px]="top" [style.left.px]="left" [style.position]="position" [style.height.px]="cpHeight" [style.width.px]="cpWidth" (click)="$event.stopPropagation()">\n <div *ngIf="cpDialogDisplay === \'popup\'" [style.left]="cpArrowPosition" class="arrow arrow-{{cpUsePosition}}" [style.top.px]="arrowTop"></div>\n\n <div *ngIf="(cpColorMode ||\xa01) === 1" class="saturation-lightness" [slider] [rgX]="1" [rgY]="1" [style.background-color]="hueSliderColor" (newValue)="onColorChange($event)" (dragStart)="onDragStart(\'saturation-lightness\')" (dragEnd)="onDragEnd(\'saturation-lightness\')">\n <div class="cursor" [style.top.px]="slider?.v" [style.left.px]="slider?.s"></div>\n </div>\n\n <div class="hue-alpha box">\n <div class="left">\n <div class="selected-color-background"></div>\n\n <div class="selected-color" [style.background-color]="selectedColor" [style.cursor]="eyeDropperSupported && cpEyeDropper ? \'pointer\' : null" (click)="eyeDropperSupported && cpEyeDropper && onEyeDropper()">\n <svg *ngIf="eyeDropperSupported && cpEyeDropper" class="eyedropper-icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M17.66 5.41l.92.92-2.69 2.69-.92-.92 2.69-2.69M17.67 3c-.26 0-.51.1-.71.29l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42l-2.34-2.34c-.2-.19-.45-.29-.7-.29zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z"/></svg>\n </div>\n\n <button *ngIf="cpAddColorButton" type="button" class="{{cpAddColorButtonClass}}" [disabled]="cpPresetColors && cpPresetColors.length >= cpMaxPresetColorsLength" (click)="onAddPresetColor($event, selectedColor)">\n {{cpAddColorButtonText}}\n </button>\n </div>\n\n <div class="right">\n <div *ngIf="cpAlphaChannel===\'disabled\'" style="height: 16px;"></div>\n\n <div #hueSlider class="hue" [slider] [rgX]="1" [style.display]="(cpColorMode ||\xa01) === 1 ? \'block\' : \'none\'" (newValue)="onHueChange($event)" (dragStart)="onDragStart(\'hue\')" (dragEnd)="onDragEnd(\'hue\')">\n <div class="cursor" [style.left.px]="slider?.h"></div>\n </div>\n\n <div #valueSlider class="value" [slider] [rgX]="1" [style.display]="(cpColorMode ||\xa01) === 2 ? \'block\': \'none\'" (newValue)="onValueChange($event)" (dragStart)="onDragStart(\'value\')" (dragEnd)="onDragEnd(\'value\')">\n <div class="cursor" [style.right.px]="slider?.v"></div>\n </div>\n\n <div #alphaSlider class="alpha" [slider] [rgX]="1" [style.display]="cpAlphaChannel === \'disabled\' ? \'none\' : \'block\'" [style.background-color]="alphaSliderColor" (newValue)="onAlphaChange($event)" (dragStart)="onDragStart(\'alpha\')" (dragEnd)="onDragEnd(\'alpha\')">\n <div class="cursor" [style.left.px]="slider?.a"></div>\n </div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1" class="cmyk-text" [style.display]="format !== 3 ? \'none\' : \'block\'">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.c" (keyup.enter)="onAcceptColor($event)" (newValue)="onCyanInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.m" (keyup.enter)="onAcceptColor($event)" (newValue)="onMagentaInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.y" (keyup.enter)="onAcceptColor($event)" (newValue)="onYellowInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.k" (keyup.enter)="onAcceptColor($event)" (newValue)="onBlackInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="cmykText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>C</div><div>M</div><div>Y</div><div>K</div><div *ngIf="cpAlphaChannel!==\'disabled\'" >A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1 " class="hsla-text" [style.display]="format !== 2 ? \'none\' : \'block\'">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="360" [text] [rg]="360" [value]="hslaText?.h" (keyup.enter)="onAcceptColor($event)" (newValue)="onHueInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.s" (keyup.enter)="onAcceptColor($event)" (newValue)="onSaturationInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.l" (keyup.enter)="onAcceptColor($event)" (newValue)="onLightnessInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hslaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>H</div><div>S</div><div>L</div><div *ngIf="cpAlphaChannel!==\'disabled\'">A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1 " [style.display]="format !== 1 ? \'none\' : \'block\'" class="rgba-text">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.r" (keyup.enter)="onAcceptColor($event)" (newValue)="onRedInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.g" (keyup.enter)="onAcceptColor($event)" (newValue)="onGreenInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.b" (keyup.enter)="onAcceptColor($event)" (newValue)="onBlueInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="rgbaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>R</div><div>G</div><div>B</div><div *ngIf="cpAlphaChannel!==\'disabled\'" >A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1" class="hex-text" [class.hex-alpha]="cpAlphaChannel===\'forced\'"\n [style.display]="format !== 0 ? \'none\' : \'block\'">\n <div class="box">\n <input [text] [value]="hexText" (blur)="onHexInput(null)" (keyup.enter)="onAcceptColor($event)" (newValue)="onHexInput($event)"/>\n <input *ngIf="cpAlphaChannel===\'forced\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hexAlpha" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)"/>\n </div>\n\n <div class="box">\n <div>Hex</div>\n <div *ngIf="cpAlphaChannel===\'forced\'">A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 2" class="value-text">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.l" (keyup.enter)="onAcceptColor($event)" (newValue)="onValueInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hslaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>V</div><div>A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1" class="type-policy">\n <span class="type-policy-arrow" (click)="onFormatToggle(-1)"></span>\n <span class="type-policy-arrow" (click)="onFormatToggle(1)"></span>\n </div>\n\n <div *ngIf="cpPresetColors?.length || cpAddColorButton" class="preset-area">\n <hr>\n\n <div class="preset-label">{{cpPresetLabel}}</div>\n\n <div *ngIf="cpPresetColors?.length" class="{{cpPresetColorsClass}}">\n <div *ngFor="let color of cpPresetColors" class="preset-color" [style.backgroundColor]="color" (click)="setColorFromString(color)">\n <span *ngIf="cpAddColorButton" class="{{cpRemoveColorButtonClass}}" (click)="onRemovePresetColor($event, color)"></span>\n </div>\n </div>\n\n <div *ngIf="!cpPresetColors?.length && cpAddColorButton" class="{{cpPresetEmptyMessageClass}}">{{cpPresetEmptyMessage}}</div>\n </div>\n\n <div *ngIf="cpOKButton || cpCancelButton" class="button-area">\n <button *ngIf="cpCancelButton" type="button" class="{{cpCancelButtonClass}}" (click)="onCancelColor($event)">{{cpCancelButtonText}}</button>\n\n <button *ngIf="cpOKButton" type="button" class="{{cpOKButtonClass}}" (click)="onAcceptColor($event)">{{cpOKButtonText}}</button>\n </div>\n\n <div class="extra-template" *ngIf="cpExtraTemplate">\n <ng-container *ngTemplateOutlet="cpExtraTemplate"></ng-container>\n </div>\n</div>\n',styles:['.color-picker{position:absolute;z-index:1000;width:230px;height:auto;border:#777 solid 1px;cursor:default;-webkit-user-select:none;user-select:none;background-color:#fff}.color-picker *{box-sizing:border-box;margin:0;font-size:11px}.color-picker input{width:0;height:26px;min-width:0;font-size:13px;text-align:center;color:#000}.color-picker input:invalid,.color-picker input:-moz-ui-invalid,.color-picker input:-moz-submit-invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.color-picker .arrow{position:absolute;z-index:999999;width:0;height:0;border-style:solid}.color-picker .arrow.arrow-top{left:8px;border-width:10px 5px;border-color:#777 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .arrow.arrow-bottom{top:-20px;left:8px;border-width:10px 5px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #777 rgba(0,0,0,0)}.color-picker .arrow.arrow-top-left,.color-picker .arrow.arrow-left-top{right:-21px;bottom:8px;border-width:5px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #777}.color-picker .arrow.arrow-top-right,.color-picker .arrow.arrow-right-top{bottom:8px;left:-20px;border-width:5px 10px;border-color:rgba(0,0,0,0) #777 rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .arrow.arrow-left,.color-picker .arrow.arrow-left-bottom,.color-picker .arrow.arrow-bottom-left{top:8px;right:-21px;border-width:5px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #777}.color-picker .arrow.arrow-right,.color-picker .arrow.arrow-right-bottom,.color-picker .arrow.arrow-bottom-right{top:8px;left:-20px;border-width:5px 10px;border-color:rgba(0,0,0,0) #777 rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .cursor{position:relative;width:16px;height:16px;border:#222 solid 2px;border-radius:50%;cursor:default}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{position:relative;padding:16px 8px}.color-picker .right{flex:1 1 auto;padding:12px 8px}.color-picker .button-area{padding:0 16px 16px;text-align:right}.color-picker .button-area button{margin-left:8px}.color-picker .preset-area{padding:4px 15px}.color-picker .preset-area .preset-label{overflow:hidden;width:100%;padding:4px;font-size:11px;white-space:nowrap;text-align:left;text-overflow:ellipsis;color:#555}.color-picker .preset-area .preset-color{position:relative;display:inline-block;width:18px;height:18px;margin:4px 6px 8px;border:#a9a9a9 solid 1px;border-radius:25%;cursor:pointer}.color-picker .preset-area .preset-empty-message{min-height:18px;margin-top:4px;margin-bottom:8px;font-style:italic;text-align:center}.color-picker .hex-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .hex-text .box{padding:0 24px 8px 8px}.color-picker .hex-text .box div{float:left;flex:1 1 auto;text-align:center;color:#555;clear:left}.color-picker .hex-text .box input{flex:1 1 auto;padding:1px;border:#a9a9a9 solid 1px}.color-picker .hex-alpha .box div:first-child,.color-picker .hex-alpha .box input:first-child{flex-grow:3;margin-right:8px}.color-picker .cmyk-text,.color-picker .hsla-text,.color-picker .rgba-text,.color-picker .value-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .cmyk-text .box,.color-picker .hsla-text .box,.color-picker .rgba-text .box{padding:0 24px 8px 8px}.color-picker .value-text .box{padding:0 8px 8px}.color-picker .cmyk-text .box div,.color-picker .hsla-text .box div,.color-picker .rgba-text .box div,.color-picker .value-text .box div{flex:1 1 auto;margin-right:8px;text-align:center;color:#555}.color-picker .cmyk-text .box div:last-child,.color-picker .hsla-text .box div:last-child,.color-picker .rgba-text .box div:last-child,.color-picker .value-text .box div:last-child{margin-right:0}.color-picker .cmyk-text .box input,.color-picker .hsla-text .box input,.color-picker .rgba-text .box input,.color-picker .value-text .box input{float:left;flex:1;padding:1px;margin:0 8px 0 0;border:#a9a9a9 solid 1px}.color-picker .cmyk-text .box input:last-child,.color-picker .hsla-text .box input:last-child,.color-picker .rgba-text .box input:last-child,.color-picker .value-text .box input:last-child{margin-right:0}.color-picker .hue-alpha{align-items:center;margin-bottom:3px}.color-picker .hue{direction:ltr;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC)}.color-picker .value{direction:rtl;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAACTklEQVR42u3SYUcrABhA4U2SkmRJMmWSJklKJiWZZpKUJJskKUmaTFImKZOUzMySpGRmliRNJilJSpKSJEtmSpIpmWmSdO736/6D+x7OP3gUCoWCv1cqlSQlJZGcnExKSgqpqamkpaWRnp5ORkYGmZmZqFQqsrKyyM7OJicnh9zcXNRqNXl5eeTn56PRaCgoKKCwsJCioiK0Wi3FxcWUlJRQWlpKWVkZ5eXlVFRUUFlZiU6no6qqiurqampqaqitraWurg69Xk99fT0GgwGj0UhDQwONjY00NTXR3NxMS0sLra2ttLW10d7ejslkwmw209HRQWdnJ11dXXR3d9PT00Nvby99fX309/czMDDA4OAgFouFoaEhrFYrw8PDjIyMMDo6ytjYGDabjfHxcSYmJpicnGRqagq73c709DQzMzPMzs4yNzfH/Pw8DocDp9OJy+XC7XazsLDA4uIiS0tLLC8vs7KywurqKmtra3g8HrxeLz6fD7/fz/r6OhsbG2xubrK1tcX29jaBQICdnR2CwSC7u7vs7e2xv7/PwcEBh4eHHB0dcXx8zMnJCaenp5ydnXF+fs7FxQWXl5dcXV1xfX3Nzc0Nt7e33N3dEQqFuL+/5+HhgXA4TCQS4fHxkaenJ56fn3l5eeH19ZVoNMrb2xvv7+98fHwQi8WIx+N8fn6SSCT4+vri+/ubn58ffn9/+VcKgSWwBJbAElgCS2AJLIElsASWwBJYAktgCSyBJbAElsASWAJLYAksgSWwBJbAElgCS2AJLIElsP4/WH8AmJ5Z6jHS4h8AAAAASUVORK5CYII=)}.color-picker .alpha{direction:ltr;width:100%;height:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwYQlZMa3gAAAWVJREFUaN7tmEGO6jAQRCsOArHgBpyAJYGjcGocxAm4A2IHpmoWE0eBH+ezmFlNvU06shJ3W6VEelWMUQAIIF9f6qZpimsA1LYtS2uF51/u27YVAFZVRUkEoGHdPV/sIcbIEIIkUdI/9Xa7neyv61+SWFUVAVCSct00TWn2fv6u3+Ecfd3tXzy/0+nEUu+SPjo/kqzrmiQpScN6v98XewfA8/lMkiLJ2WxGSUopcT6fM6U0NX9/frfbjev1WtfrlZfLhYfDQQHG/AIOlnGwjINlHCxjHCzjYJm/TJWdCwquJXseFFzGwDNNeiKMOJTO8xQdDQaeB29+K9efeLaBo9J7vdvtJj1RjFFjfiv7qv95tjx/7leSQgh93e1ffMeIp6O+YQjho/N791t1XVOSSI7N//K+4/GoxWLBx+PB5/Op5XLJ+/3OlJJWqxU3m83ovv5iGf8KjYNlHCxjHCzjYBkHy5gf5gusvQU7U37jTAAAAABJRU5ErkJggg==)}.color-picker .type-policy{position:absolute;top:218px;right:12px;width:16px;height:24px;background-size:8px 16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-position:center}.color-picker .type-policy .type-policy-arrow{display:block;width:100%;height:50%}.color-picker .selected-color{position:absolute;top:16px;left:8px;width:40px;height:40px;border:1px solid #a9a9a9;border-radius:50%}.color-picker .selected-color-background{width:40px;height:40px;border-radius:50%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC)}.color-picker .saturation-lightness{direction:ltr;width:100%;height:130px;border:none;cursor:pointer;touch-action:manipulation;background-size:100% 100%;background-image:url(data:image/png;base64,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)}.color-picker .cp-add-color-button-class{position:absolute;display:inline;padding:0;margin:3px -3px;border:0;cursor:pointer;background:transparent}.color-picker .cp-add-color-button-class:hover{text-decoration:underline}.color-picker .cp-add-color-button-class:disabled{cursor:not-allowed;color:#999}.color-picker .cp-add-color-button-class:disabled:hover{text-decoration:none}.color-picker .cp-remove-color-button-class{position:absolute;top:-5px;right:-5px;display:block;width:10px;height:10px;border-radius:50%;cursor:pointer;text-align:center;background:#fff;box-shadow:1px 1px 5px #333}.color-picker .cp-remove-color-button-class:before{content:"x";position:relative;bottom:3.5px;display:inline-block;font-size:10px}.color-picker .eyedropper-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);fill:#fff;mix-blend-mode:exclusion}\n']}]}],ctorParameters:()=>[{type:o.NgZone},{type:o.ElementRef},{type:o.ChangeDetectorRef},{type:Document,decorators:[{type:t.Inject,args:[n.DOCUMENT]}]},{type:void 0,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:m}],propDecorators:{dialogElement:[{type:t.ViewChild,args:["dialogPopup",{static:!0}]}],hueSlider:[{type:t.ViewChild,args:["hueSlider",{static:!0}]}],alphaSlider:[{type:t.ViewChild,args:["alphaSlider",{static:!0}]}],handleEsc:[{type:t.HostListener,args:["document:keyup.esc",["$event"]]}],handleEnter:[{type:t.HostListener,args:["document:keyup.enter",["$event"]]}]}});const y="undefined"==typeof ngDevMode||!!ngDevMode;class _{injector;cfr;appRef;vcRef;elRef;_service;dialog;dialogCreated=!1;ignoreChanges=!1;cmpRef;viewAttachedToAppRef=!1;colorPicker;cpWidth="230px";cpHeight="auto";cpToggle=!1;cpDisabled=!1;cpIgnoredElements=[];cpFallbackColor="";cpColorMode="color";cpCmykEnabled=!1;cpOutputFormat="auto";cpAlphaChannel="enabled";cpDisableInput=!1;cpDialogDisplay="popup";cpSaveClickOutside=!0;cpCloseClickOutside=!0;cpUseRootViewContainer=!1;cpPosition="auto";cpPositionOffset="0%";cpPositionRelativeToArrow=!1;cpOKButton=!1;cpOKButtonText="OK";cpOKButtonClass="cp-ok-button-class";cpCancelButton=!1;cpCancelButtonText="Cancel";cpCancelButtonClass="cp-cancel-button-class";cpEyeDropper=!1;cpPresetLabel="Preset colors";cpPresetColors;cpPresetColorsClass="cp-preset-colors-class";cpMaxPresetColorsLength=6;cpPresetEmptyMessage="No colors added";cpPresetEmptyMessageClass="preset-empty-message";cpAddColorButton=!1;cpAddColorButtonText="Add color";cpAddColorButtonClass="cp-add-color-button-class";cpRemoveColorButtonClass="cp-remove-color-button-class";cpArrowPosition=0;cpExtraTemplate;cpInputChange=new t.EventEmitter(!0);cpToggleChange=new t.EventEmitter(!0);cpSliderChange=new t.EventEmitter(!0);cpSliderDragEnd=new t.EventEmitter(!0);cpSliderDragStart=new t.EventEmitter(!0);colorPickerOpen=new t.EventEmitter(!0);colorPickerClose=new t.EventEmitter(!0);colorPickerCancel=new t.EventEmitter(!0);colorPickerSelect=new t.EventEmitter(!0);colorPickerChange=new t.EventEmitter(!1);cpCmykColorChange=new t.EventEmitter(!0);cpPresetColorsChange=new t.EventEmitter(!0);handleClick(){this.inputFocus()}handleFocus(){this.inputFocus()}handleInput(e){this.inputChange(e)}constructor(e,t,n,r,i,o){this.injector=e,this.cfr=t,this.appRef=n,this.vcRef=r,this.elRef=i,this._service=o}ngOnDestroy(){null!=this.cmpRef&&(this.viewAttachedToAppRef&&this.appRef.detachView(this.cmpRef.hostView),this.cmpRef.destroy(),this.cmpRef=null,this.dialog=null)}ngOnChanges(e){e.cpToggle&&!this.cpDisabled&&(e.cpToggle.currentValue?this.openDialog():e.cpToggle.currentValue||this.closeDialog()),e.colorPicker&&(this.dialog&&!this.ignoreChanges&&("inline"===this.cpDialogDisplay&&this.dialog.setInitialColor(e.colorPicker.currentValue),this.dialog.setColorFromString(e.colorPicker.currentValue,!1),this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay&&this.cmpRef.changeDetectorRef.detectChanges()),this.ignoreChanges=!1),(e.cpPresetLabel||e.cpPresetColors)&&this.dialog&&this.dialog.setPresetConfig(this.cpPresetLabel,this.cpPresetColors)}openDialog(){if(this.dialogCreated)this.dialog&&this.dialog.openDialog(this.colorPicker);else{let e=this.vcRef;if(this.dialogCreated=!0,this.viewAttachedToAppRef=!1,this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay){const n=this.appRef.componentTypes[0],r=this.injector.get(n,t.Injector.NULL);r!==t.Injector.NULL?(e=r.vcRef||r.viewContainerRef||this.vcRef,y&&e===this.vcRef&&console.warn("You are using cpUseRootViewContainer, but the root component is not exposing viewContainerRef!Please expose it by adding 'public vcRef: ViewContainerRef' to the constructor.")):this.viewAttachedToAppRef=!0}const n=this.cfr.resolveComponentFactory(v);if(this.viewAttachedToAppRef)this.cmpRef=n.create(this.injector),this.appRef.attachView(this.cmpRef.hostView),document.body.appendChild(this.cmpRef.hostView.rootNodes[0]);else{const r=t.Injector.create({providers:[],parent:e.injector});this.cmpRef=e.createComponent(n,0,r,[])}this.cmpRef.instance.setupDialog(this,this.elRef,this.colorPicker,this.cpWidth,this.cpHeight,this.cpDialogDisplay,this.cpFallbackColor,this.cpColorMode,this.cpCmykEnabled,this.cpAlphaChannel,this.cpOutputFormat,this.cpDisableInput,this.cpIgnoredElements,this.cpSaveClickOutside,this.cpCloseClickOutside,this.cpUseRootViewContainer,this.cpPosition,this.cpPositionOffset,this.cpPositionRelativeToArrow,this.cpPresetLabel,this.cpPresetColors,this.cpPresetColorsClass,this.cpMaxPresetColorsLength,this.cpPresetEmptyMessage,this.cpPresetEmptyMessageClass,this.cpOKButton,this.cpOKButtonClass,this.cpOKButtonText,this.cpCancelButton,this.cpCancelButtonClass,this.cpCancelButtonText,this.cpAddColorButton,this.cpAddColorButtonClass,this.cpAddColorButtonText,this.cpRemoveColorButtonClass,this.cpEyeDropper,this.elRef,this.cpExtraTemplate),this.dialog=this.cmpRef.instance,this.vcRef!==e&&this.cmpRef.changeDetectorRef.detectChanges()}}closeDialog(){this.dialog&&"popup"===this.cpDialogDisplay&&this.dialog.closeDialog()}cmykChanged(e){this.cpCmykColorChange.emit(e)}stateChanged(e){this.cpToggleChange.emit(e),e?this.colorPickerOpen.emit(this.colorPicker):this.colorPickerClose.emit(this.colorPicker)}colorChanged(e,t=!0){this.ignoreChanges=t,this.colorPickerChange.emit(e)}colorSelected(e){this.colorPickerSelect.emit(e)}colorCanceled(){this.colorPickerCancel.emit()}inputFocus(){const e=this.elRef.nativeElement,t=this.cpIgnoredElements.filter((t=>t===e));this.cpDisabled||t.length||("undefined"!=typeof document&&e===document.activeElement?this.openDialog():this.dialog&&this.dialog.show?this.closeDialog():this.openDialog())}inputChange(e){this.dialog?this.dialog.setColorFromString(e.target.value,!0):(this.colorPicker=e.target.value,this.colorPickerChange.emit(this.colorPicker))}inputChanged(e){this.cpInputChange.emit(e)}sliderChanged(e){this.cpSliderChange.emit(e)}sliderDragEnd(e){this.cpSliderDragEnd.emit(e)}sliderDragStart(e){this.cpSliderDragStart.emit(e)}presetColorsChanged(e){this.cpPresetColorsChange.emit(e)}static"\u0275fac"=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:_,deps:[{token:o.Injector},{token:o.ComponentFactoryResolver},{token:o.ApplicationRef},{token:o.ViewContainerRef},{token:o.ElementRef},{token:m}],target:o.\u0275\u0275FactoryTarget.Directive});static"\u0275dir"=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"17.0.2",type:_,selector:"[colorPicker]",inputs:{colorPicker:"colorPicker",cpWidth:"cpWidth",cpHeight:"cpHeight",cpToggle:"cpToggle",cpDisabled:"cpDisabled",cpIgnoredElements:"cpIgnoredElements",cpFallbackColor:"cpFallbackColor",cpColorMode:"cpColorMode",cpCmykEnabled:"cpCmykEnabled",cpOutputFormat:"cpOutputFormat",cpAlphaChannel:"cpAlphaChannel",cpDisableInput:"cpDisableInput",cpDialogDisplay:"cpDialogDisplay",cpSaveClickOutside:"cpSaveClickOutside",cpCloseClickOutside:"cpCloseClickOutside",cpUseRootViewContainer:"cpUseRootViewContainer",cpPosition:"cpPosition",cpPositionOffset:"cpPositionOffset",cpPositionRelativeToArrow:"cpPositionRelativeToArrow",cpOKButton:"cpOKButton",cpOKButtonText:"cpOKButtonText",cpOKButtonClass:"cpOKButtonClass",cpCancelButton:"cpCancelButton",cpCancelButtonText:"cpCancelButtonText",cpCancelButtonClass:"cpCancelButtonClass",cpEyeDropper:"cpEyeDropper",cpPresetLabel:"cpPresetLabel",cpPresetColors:"cpPresetColors",cpPresetColorsClass:"cpPresetColorsClass",cpMaxPresetColorsLength:"cpMaxPresetColorsLength",cpPresetEmptyMessage:"cpPresetEmptyMessage",cpPresetEmptyMessageClass:"cpPresetEmptyMessageClass",cpAddColorButton:"cpAddColorButton",cpAddColorButtonText:"cpAddColorButtonText",cpAddColorButtonClass:"cpAddColorButtonClass",cpRemoveColorButtonClass:"cpRemoveColorButtonClass",cpArrowPosition:"cpArrowPosition",cpExtraTemplate:"cpExtraTemplate"},outputs:{cpInputChange:"cpInputChange",cpToggleChange:"cpToggleChange",cpSliderChange:"cpSliderChange",cpSliderDragEnd:"cpSliderDragEnd",cpSliderDragStart:"cpSliderDragStart",colorPickerOpen:"colorPickerOpen",colorPickerClose:"colorPickerClose",colorPickerCancel:"colorPickerCancel",colorPickerSelect:"colorPickerSelect",colorPickerChange:"colorPickerChange",cpCmykColorChange:"cpCmykColorChange",cpPresetColorsChange:"cpPresetColorsChange"},host:{listeners:{click:"handleClick()",focus:"handleFocus()",input:"handleInput($event)"}},exportAs:["ngxColorPicker"],usesOnChanges:!0,ngImport:o})}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:_,decorators:[{type:t.Directive,args:[{selector:"[colorPicker]",exportAs:"ngxColorPicker"}]}],ctorParameters:()=>[{type:o.Injector},{type:o.ComponentFactoryResolver},{type:o.ApplicationRef},{type:o.ViewContainerRef},{type:o.ElementRef},{type:m}],propDecorators:{colorPicker:[{type:t.Input}],cpWidth:[{type:t.Input}],cpHeight:[{type:t.Input}],cpToggle:[{type:t.Input}],cpDisabled:[{type:t.Input}],cpIgnoredElements:[{type:t.Input}],cpFallbackColor:[{type:t.Input}],cpColorMode:[{type:t.Input}],cpCmykEnabled:[{type:t.Input}],cpOutputFormat:[{type:t.Input}],cpAlphaChannel:[{type:t.Input}],cpDisableInput:[{type:t.Input}],cpDialogDisplay:[{type:t.Input}],cpSaveClickOutside:[{type:t.Input}],cpCloseClickOutside:[{type:t.Input}],cpUseRootViewContainer:[{type:t.Input}],cpPosition:[{type:t.Input}],cpPositionOffset:[{type:t.Input}],cpPositionRelativeToArrow:[{type:t.Input}],cpOKButton:[{type:t.Input}],cpOKButtonText:[{type:t.Input}],cpOKButtonClass:[{type:t.Input}],cpCancelButton:[{type:t.Input}],cpCancelButtonText:[{type:t.Input}],cpCancelButtonClass:[{type:t.Input}],cpEyeDropper:[{type:t.Input}],cpPresetLabel:[{type:t.Input}],cpPresetColors:[{type:t.Input}],cpPresetColorsClass:[{type:t.Input}],cpMaxPresetColorsLength:[{type:t.Input}],cpPresetEmptyMessage:[{type:t.Input}],cpPresetEmptyMessageClass:[{type:t.Input}],cpAddColorButton:[{type:t.Input}],cpAddColorButtonText:[{type:t.Input}],cpAddColorButtonClass:[{type:t.Input}],cpRemoveColorButtonClass:[{type:t.Input}],cpArrowPosition:[{type:t.Input}],cpExtraTemplate:[{type:t.Input}],cpInputChange:[{type:t.Output}],cpToggleChange:[{type:t.Output}],cpSliderChange:[{type:t.Output}],cpSliderDragEnd:[{type:t.Output}],cpSliderDragStart:[{type:t.Output}],colorPickerOpen:[{type:t.Output}],colorPickerClose:[{type:t.Output}],colorPickerCancel:[{type:t.Output}],colorPickerSelect:[{type:t.Output}],colorPickerChange:[{type:t.Output}],cpCmykColorChange:[{type:t.Output}],cpPresetColorsChange:[{type:t.Output}],handleClick:[{type:t.HostListener,args:["click"]}],handleFocus:[{type:t.HostListener,args:["focus"]}],handleInput:[{type:t.HostListener,args:["input",["$event"]]}]}});class b{static"\u0275fac"=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:b,deps:[],target:o.\u0275\u0275FactoryTarget.NgModule});static"\u0275mod"=o.\u0275\u0275ngDeclareNgModule({minVersion:"14.0.0",version:"17.0.2",ngImport:o,type:b,declarations:[v,_,d,h],imports:[n.CommonModule],exports:[_]});static"\u0275inj"=o.\u0275\u0275ngDeclareInjector({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:b,providers:[m],imports:[n.CommonModule]})}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:b,decorators:[{type:t.NgModule,args:[{imports:[n.CommonModule],exports:[_],providers:[m],declarations:[v,_,d,h]}]}]}),e.Cmyk=c,e.ColorPickerComponent=v,e.ColorPickerDirective=_,e.ColorPickerModule=b,e.ColorPickerService=m,e.Hsla=u,e.Hsva=l,e.Rgba=a,e.SliderDirective=h,e.TextDirective=d})),function(){var e,t="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",i=16,o=32,s=64,a=128,l=256,u=1/0,c=9007199254740991,d=NaN,h=4294967295,p=[["ary",a],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",o],["partialRight",s],["rearg",l]],f="[object Arguments]",m="[object Array]",g="[object Boolean]",v="[object Date]",y="[object Error]",_="[object Function]",b="[object GeneratorFunction]",w="[object Map]",x="[object Number]",k="[object Object]",S="[object Promise]",T="[object RegExp]",E="[object Set]",D="[object String]",C="[object Symbol]",M="[object WeakMap]",A="[object ArrayBuffer]",I="[object DataView]",L="[object Float32Array]",O="[object Float64Array]",N="[object Int8Array]",R="[object Int16Array]",P="[object Int32Array]",F="[object Uint8Array]",j="[object Uint8ClampedArray]",Y="[object Uint16Array]",V="[object Uint32Array]",H=/\b__p \+= '';/g,B=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,W=RegExp(z.source),$=RegExp(q.source),G=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ne=/^\s+/,re=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ae=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,fe=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,be="\\ud800-\\udfff",we="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",De="['\u2019]",Ce="["+be+"]",Me="["+Ee+"]",Ae="["+we+"]",Ie="\\d+",Le="["+xe+"]",Oe="["+ke+"]",Ne="[^"+be+Ee+Ie+xe+ke+Se+"]",Re="\\ud83c[\\udffb-\\udfff]",Pe="[^"+be+"]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",je="[\\ud800-\\udbff][\\udc00-\\udfff]",Ye="["+Se+"]",Ve="\\u200d",He="(?:"+Oe+"|"+Ne+")",Be="(?:"+Ye+"|"+Ne+")",Ue="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",ze="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Ae+"|"+Re+")"+"?",We="["+Te+"]?",$e=We+qe+("(?:"+Ve+"(?:"+[Pe,Fe,je].join("|")+")"+We+qe+")*"),Ge="(?:"+[Le,Fe,je].join("|")+")"+$e,Ke="(?:"+[Pe+Ae+"?",Ae,Fe,je,Ce].join("|")+")",Ze=RegExp(De,"g"),Xe=RegExp(Ae,"g"),Je=RegExp(Re+"(?="+Re+")|"+Ke+$e,"g"),Qe=RegExp([Ye+"?"+Oe+"+"+Ue+"(?="+[Me,Ye,"$"].join("|")+")",Be+"+"+ze+"(?="+[Me,Ye+He,"$"].join("|")+")",Ye+"?"+He+"+"+Ue,Ye+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Ge].join("|"),"g"),et=RegExp("["+Ve+be+we+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[L]=it[O]=it[N]=it[R]=it[P]=it[F]=it[j]=it[Y]=it[V]=!0,it[f]=it[m]=it[A]=it[g]=it[I]=it[v]=it[y]=it[_]=it[w]=it[x]=it[k]=it[T]=it[E]=it[D]=it[M]=!1;var ot={};ot[f]=ot[m]=ot[A]=ot[I]=ot[g]=ot[v]=ot[L]=ot[O]=ot[N]=ot[R]=ot[P]=ot[w]=ot[x]=ot[k]=ot[T]=ot[E]=ot[D]=ot[C]=ot[F]=ot[j]=ot[Y]=ot[V]=!0,ot[y]=ot[_]=ot[M]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,lt=parseInt,ut="object"==typeof global&&global&&global.Object===Object&&global,ct="object"==typeof self&&self&&self.Object===Object&&self,dt=ut||ct||Function("return this")(),ht="object"==typeof exports&&exports&&!exports.nodeType&&exports,pt=ht&&"object"==typeof module&&module&&!module.nodeType&&module,ft=pt&&pt.exports===ht,mt=ft&&ut.process,gt=function(){try{var e=pt&&pt.require&&pt.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),vt=gt&&gt.isArrayBuffer,yt=gt&&gt.isDate,_t=gt&&gt.isMap,bt=gt&&gt.isRegExp,wt=gt&&gt.isSet,xt=gt&&gt.isTypedArray;function kt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Dt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Ct(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function Mt(e,t){return!!(null==e?0:e.length)&&Yt(e,t,0)>-1}function At(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function It(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ot(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Nt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Pt=Ut("length");function Ft(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function jt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Yt(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):jt(e,Ht,n)}function Vt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Ht(e){return e!=e}function Bt(e,t){var n=null==e?0:e.length;return n?Wt(e,t)/n:d}function Ut(t){return function(n){return null==n?e:n[t]}}function zt(t){return function(n){return null==t?e:t[n]}}function qt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Wt(t,n){for(var r,i=-1,o=t.length;++i<o;){var s=n(t[i]);s!==e&&(r=r===e?s:r+s)}return r}function $t(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Gt(e){return e?e.slice(0,hn(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function Zt(e,t){return It(t,(function(t){return e[t]}))}function Xt(e,t){return e.has(t)}function Jt(e,t){for(var n=-1,r=e.length;++n<r&&Yt(t,e[n],0)>-1;);return n}function Qt(e,t){for(var n=e.length;n--&&Yt(t,e[n],0)>-1;);return n}var en=zt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),tn=zt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+st[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function sn(e,t){return function(n){return e(t(n))}}function an(e,t){for(var n=-1,i=e.length,o=0,s=[];++n<i;){var a=e[n];a!==t&&a!==r||(e[n]=r,s[o++]=n)}return s}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function cn(e){return rn(e)?function(e){var t=Je.lastIndex=0;for(;Je.test(e);)++t;return t}(e):Pt(e)}function dn(e){return rn(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function hn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var pn=zt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var fn=function re(be){var we,xe=(be=null==be?dt:fn.defaults(dt.Object(),be,fn.pick(dt,nt))).Array,ke=be.Date,Se=be.Error,Te=be.Function,Ee=be.Math,De=be.Object,Ce=be.RegExp,Me=be.String,Ae=be.TypeError,Ie=xe.prototype,Le=Te.prototype,Oe=De.prototype,Ne=be["__core-js_shared__"],Re=Le.toString,Pe=Oe.hasOwnProperty,Fe=0,je=(we=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+we:"",Ye=Oe.toString,Ve=Re.call(De),He=dt._,Be=Ce("^"+Re.call(Pe).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=ft?be.Buffer:e,ze=be.Symbol,qe=be.Uint8Array,We=Ue?Ue.allocUnsafe:e,$e=sn(De.getPrototypeOf,De),Ge=De.create,Ke=Oe.propertyIsEnumerable,Je=Ie.splice,et=ze?ze.isConcatSpreadable:e,st=ze?ze.iterator:e,ut=ze?ze.toStringTag:e,ct=function(){try{var e=po(De,"defineProperty");return e({},"",{}),e}catch(e){}}(),ht=be.clearTimeout!==dt.clearTimeout&&be.clearTimeout,pt=ke&&ke.now!==dt.Date.now&&ke.now,mt=be.setTimeout!==dt.setTimeout&&be.setTimeout,gt=Ee.ceil,Pt=Ee.floor,zt=De.getOwnPropertySymbols,mn=Ue?Ue.isBuffer:e,gn=be.isFinite,vn=Ie.join,yn=sn(De.keys,De),_n=Ee.max,bn=Ee.min,wn=ke.now,xn=be.parseInt,kn=Ee.random,Sn=Ie.reverse,Tn=po(be,"DataView"),En=po(be,"Map"),Dn=po(be,"Promise"),Cn=po(be,"Set"),Mn=po(be,"WeakMap"),An=po(De,"create"),In=Mn&&new Mn,Ln={},On=Yo(Tn),Nn=Yo(En),Rn=Yo(Dn),Pn=Yo(Cn),Fn=Yo(Mn),jn=ze?ze.prototype:e,Yn=jn?jn.valueOf:e,Vn=jn?jn.toString:e;function Hn(e){if(na(e)&&!qs(e)&&!(e instanceof qn)){if(e instanceof zn)return e;if(Pe.call(e,"__wrapped__"))return Vo(e)}return new zn(e)}var Bn=function(){function t(){}return function(n){if(!ta(n))return{};if(Ge)return Ge(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function Un(){}function zn(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function Zn(e){var t=this.__data__=new $n(e);this.size=t.size}function Xn(e,t){var n=qs(e),r=!n&&zs(e),i=!n&&!r&&Ks(e),o=!n&&!r&&!i&&ca(e),s=n||r||i||o,a=s?$t(e.length,Me):[],l=a.length;for(var u in e)!t&&!Pe.call(e,u)||s&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||bo(u,l))||a.push(u);return a}function Jn(t){var n=t.length;return n?t[Kr(0,n-1)]:e}function Qn(e,t){return Po(Ai(e),lr(t,0,e.length))}function er(e){return Po(Ai(e))}function tr(t,n,r){(r!==e&&!Hs(t[n],r)||r===e&&!(n in t))&&sr(t,n,r)}function nr(t,n,r){var i=t[n];Pe.call(t,n)&&Hs(i,r)&&(r!==e||n in t)||sr(t,n,r)}function rr(e,t){for(var n=e.length;n--;)if(Hs(e[n][0],t))return n;return-1}function ir(e,t,n,r){return pr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function or(e,t){return e&&Ii(t,La(t),e)}function sr(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(t,n){for(var r=-1,i=n.length,o=xe(i),s=null==t;++r<i;)o[r]=s?e:Da(t,n[r]);return o}function lr(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function ur(t,n,r,i,o,s){var a,l=1&n,u=2&n,c=4&n;if(r&&(a=o?r(t,i,o,s):r(t)),a!==e)return a;if(!ta(t))return t;var d=qs(t);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(t),!l)return Ai(t,a)}else{var h=go(t),p=h==_||h==b;if(Ks(t))return Si(t,l);if(h==k||h==f||p&&!o){if(a=u||p?{}:yo(t),!l)return u?function(e,t){return Ii(e,mo(e),t)}(t,function(e,t){return e&&Ii(t,Oa(t),e)}(a,t)):function(e,t){return Ii(e,fo(e),t)}(t,or(a,t))}else{if(!ot[h])return o?t:{};a=function(e,t,n){var r=e.constructor;switch(t){case A:return Ti(e);case g:case v:return new r(+e);case I:return function(e,t){var n=t?Ti(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case O:case N:case R:case P:case F:case j:case Y:case V:return Ei(e,n);case w:return new r;case x:case D:return new r(e);case T:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new r;case C:return i=e,Yn?De(Yn.call(i)):{}}var i}(t,h,l)}}s||(s=new Zn);var m=s.get(t);if(m)return m;s.set(t,a),aa(t)?t.forEach((function(e){a.add(ur(e,n,r,e,t,s))})):ra(t)&&t.forEach((function(e,i){a.set(i,ur(e,n,r,i,t,s))}));var y=d?e:(c?u?oo:io:u?Oa:La)(t);return Tt(y||t,(function(e,i){y&&(e=t[i=e]),nr(a,i,ur(e,n,r,i,t,s))})),a}function cr(t,n,r){var i=r.length;if(null==t)return!i;for(t=De(t);i--;){var o=r[i],s=n[o],a=t[o];if(a===e&&!(o in t)||!s(a))return!1}return!0}function dr(n,r,i){if("function"!=typeof n)throw new Ae(t);return Lo((function(){n.apply(e,i)}),r)}function hr(e,t,n,r){var i=-1,o=Mt,s=!0,a=e.length,l=[],u=t.length;if(!a)return l;n&&(t=It(t,Kt(n))),r?(o=At,s=!1):t.length>=200&&(o=Xt,s=!1,t=new Kn(t));e:for(;++i<a;){var c=e[i],d=null==n?c:n(c);if(c=r||0!==c?c:0,s&&d==d){for(var h=u;h--;)if(t[h]===d)continue e;l.push(c)}else o(t,d,r)||l.push(c)}return l}Hn.templateSettings={escape:G,evaluate:K,interpolate:Z,variable:"",imports:{_:Hn}},Hn.prototype=Un.prototype,Hn.prototype.constructor=Hn,zn.prototype=Bn(Un.prototype),zn.prototype.constructor=zn,qn.prototype=Bn(Un.prototype),qn.prototype.constructor=qn,Wn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(t){var r=this.__data__;if(An){var i=r[t];return i===n?e:i}return Pe.call(r,t)?r[t]:e},Wn.prototype.has=function(t){var n=this.__data__;return An?n[t]!==e:Pe.call(n,t)},Wn.prototype.set=function(t,r){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=An&&r===e?n:r,this},$n.prototype.clear=function(){this.__data__=[],this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=rr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Je.call(t,n,1),--this.size,!0)},$n.prototype.get=function(t){var n=this.__data__,r=rr(n,t);return r<0?e:n[r][1]},$n.prototype.has=function(e){return rr(this.__data__,e)>-1},$n.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(En||$n),string:new Wn}},Gn.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return co(this,e).get(e)},Gn.prototype.has=function(e){return co(this,e).has(e)},Gn.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,n),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new $n,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof $n){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var pr=Ni(wr),fr=Ni(xr,!0);function mr(e,t){var n=!0;return pr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function gr(t,n,r){for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n(s);if(null!=a&&(l===e?a==a&&!ua(a):r(a,l)))var l=a,u=s}return u}function vr(e,t){var n=[];return pr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=_o),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?yr(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var _r=Ri(),br=Ri(!0);function wr(e,t){return e&&_r(e,t,La)}function xr(e,t){return e&&br(e,t,La)}function kr(e,t){return Ct(t,(function(t){return Js(e[t])}))}function Sr(t,n){for(var r=0,i=(n=bi(n,t)).length;null!=t&&r<i;)t=t[jo(n[r++])];return r&&r==i?t:e}function Tr(e,t,n){var r=t(e);return qs(e)?r:Lt(r,n(e))}function Er(t){return null==t?t===e?"[object Undefined]":"[object Null]":ut&&ut in De(t)?function(t){var n=Pe.call(t,ut),r=t[ut];try{t[ut]=e;var i=!0}catch(e){}var o=Ye.call(t);i&&(n?t[ut]=r:delete t[ut]);return o}(t):function(e){return Ye.call(e)}(t)}function Dr(e,t){return e>t}function Cr(e,t){return null!=e&&Pe.call(e,t)}function Mr(e,t){return null!=e&&t in De(e)}function Ar(t,n,r){for(var i=r?At:Mt,o=t[0].length,s=t.length,a=s,l=xe(s),u=1/0,c=[];a--;){var d=t[a];a&&n&&(d=It(d,Kt(n))),u=bn(d.length,u),l[a]=!r&&(n||o>=120&&d.length>=120)?new Kn(a&&d):e}d=t[0];var h=-1,p=l[0];e:for(;++h<o&&c.length<u;){var f=d[h],m=n?n(f):f;if(f=r||0!==f?f:0,!(p?Xt(p,m):i(c,m,r))){for(a=s;--a;){var g=l[a];if(!(g?Xt(g,m):i(t[a],m,r)))continue e}p&&p.push(m),c.push(f)}}return c}function Ir(t,n,r){var i=null==(t=Mo(t,n=bi(n,t)))?t:t[jo(Xo(n))];return null==i?e:kt(i,t,r)}function Lr(e){return na(e)&&Er(e)==f}function Or(t,n,r,i,o){return t===n||(null==t||null==n||!na(t)&&!na(n)?t!=t&&n!=n:function(t,n,r,i,o,s){var a=qs(t),l=qs(n),u=a?m:go(t),c=l?m:go(n),d=(u=u==f?k:u)==k,h=(c=c==f?k:c)==k,p=u==c;if(p&&Ks(t)){if(!Ks(n))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new Zn),a||ca(t)?no(t,n,r,i,o,s):function(e,t,n,r,i,o,s){switch(n){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case A:return!(e.byteLength!=t.byteLength||!o(new qe(e),new qe(t)));case g:case v:case x:return Hs(+e,+t);case y:return e.name==t.name&&e.message==t.message;case T:case D:return e==t+"";case w:var a=on;case E:var l=1&r;if(a||(a=ln),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;r|=2,s.set(e,t);var c=no(a(e),a(t),r,i,o,s);return s.delete(e),c;case C:if(Yn)return Yn.call(e)==Yn.call(t)}return!1}(t,n,u,r,i,o,s);if(!(1&r)){var _=d&&Pe.call(t,"__wrapped__"),b=h&&Pe.call(n,"__wrapped__");if(_||b){var S=_?t.value():t,M=b?n.value():n;return s||(s=new Zn),o(S,M,r,i,s)}}if(!p)return!1;return s||(s=new Zn),function(t,n,r,i,o,s){var a=1&r,l=io(t),u=l.length,c=io(n),d=c.length;if(u!=d&&!a)return!1;var h=u;for(;h--;){var p=l[h];if(!(a?p in n:Pe.call(n,p)))return!1}var f=s.get(t),m=s.get(n);if(f&&m)return f==n&&m==t;var g=!0;s.set(t,n),s.set(n,t);var v=a;for(;++h<u;){var y=t[p=l[h]],_=n[p];if(i)var b=a?i(_,y,p,n,t,s):i(y,_,p,t,n,s);if(!(b===e?y===_||o(y,_,r,i,s):b)){g=!1;break}v||(v="constructor"==p)}if(g&&!v){var w=t.constructor,x=n.constructor;w==x||!("constructor"in t)||!("constructor"in n)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(t),s.delete(n),g}(t,n,r,i,o,s)}(t,n,r,i,Or,o))}function Nr(t,n,r,i){var o=r.length,s=o,a=!i;if(null==t)return!s;for(t=De(t);o--;){var l=r[o];if(a&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++o<s;){var u=(l=r[o])[0],c=t[u],d=l[1];if(a&&l[2]){if(c===e&&!(u in t))return!1}else{var h=new Zn;if(i)var p=i(c,d,u,t,n,h);if(!(p===e?Or(d,c,3,i,h):p))return!1}}return!0}function Rr(e){return!(!ta(e)||(t=e,je&&je in t))&&(Js(e)?Be:fe).test(Yo(e));var t}function Pr(e){return"function"==typeof e?e:null==e?il:"object"==typeof e?qs(e)?Br(e[0],e[1]):Hr(e):pl(e)}function Fr(e){if(!To(e))return yn(e);var t=[];for(var n in De(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in De(e))t.push(n);return t}(e);var t=To(e),n=[];for(var r in e)("constructor"!=r||!t&&Pe.call(e,r))&&n.push(r);return n}function Yr(e,t){return e<t}function Vr(e,t){var n=-1,r=$s(e)?xe(e.length):[];return pr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function Hr(e){var t=ho(e);return 1==t.length&&t[0][2]?Do(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function Br(t,n){return xo(t)&&Eo(n)?Do(jo(t),n):function(r){var i=Da(r,t);return i===e&&i===n?Ca(r,t):Or(n,i,3)}}function Ur(t,n,r,i,o){t!==n&&_r(n,(function(s,a){if(o||(o=new Zn),ta(s))!function(t,n,r,i,o,s,a){var l=Ao(t,r),u=Ao(n,r),c=a.get(u);if(c)return void tr(t,r,c);var d=s?s(l,u,r+"",t,n,a):e,h=d===e;if(h){var p=qs(u),f=!p&&Ks(u),m=!p&&!f&&ca(u);d=u,p||f||m?qs(l)?d=l:Gs(l)?d=Ai(l):f?(h=!1,d=Si(u,!0)):m?(h=!1,d=Ei(u,!0)):d=[]:oa(u)||zs(u)?(d=l,zs(l)?d=ya(l):ta(l)&&!Js(l)||(d=yo(u))):h=!1}h&&(a.set(u,d),o(d,u,i,s,a),a.delete(u));tr(t,r,d)}(t,n,a,r,Ur,i,o);else{var l=i?i(Ao(t,a),s,a+"",t,n,o):e;l===e&&(l=s),tr(t,a,l)}}),Oa)}function zr(t,n){var r=t.length;if(r)return bo(n+=n<0?r:0,r)?t[n]:e}function qr(e,t,n){t=t.length?It(t,(function(e){return qs(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e})):[il];var r=-1;t=It(t,Kt(uo()));var i=Vr(e,(function(e,n,i){var o=It(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;for(;++r<s;){var l=Di(i[r],o[r]);if(l)return r>=a?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Wr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Sr(e,s);n(a,s)&&ei(o,bi(s,e),a)}return o}function $r(e,t,n,r){var i=r?Vt:Yt,o=-1,s=t.length,a=e;for(e===t&&(t=Ai(t)),n&&(a=It(e,Kt(n)));++o<s;)for(var l=0,u=t[o],c=n?n(u):u;(l=i(a,c,l,r))>-1;)a!==e&&Je.call(a,l,1),Je.call(e,l,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Je.call(e,i,1):hi(e,i)}}return e}function Kr(e,t){return e+Pt(kn()*(t-e+1))}function Zr(e,t){var n="";if(!e||t<1||t>c)return n;do{t%2&&(n+=e),(t=Pt(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Oo(Co(e,t,il),e+"")}function Jr(e){return Jn(Ha(e))}function Qr(e,t){var n=Ha(e);return Po(n,lr(t,0,n.length))}function ei(t,n,r,i){if(!ta(t))return t;for(var o=-1,s=(n=bi(n,t)).length,a=s-1,l=t;null!=l&&++o<s;){var u=jo(n[o]),c=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(o!=a){var d=l[u];(c=i?i(d,u,l):e)===e&&(c=ta(d)?d:bo(n[o+1])?[]:{})}nr(l,u,c),l=l[u]}return t}var ti=In?function(e,t){return In.set(e,t),e}:il,ni=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:tl(t),writable:!0})}:il;function ri(e){return Po(Ha(e))}function ii(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=xe(i);++r<i;)o[r]=e[r+t];return o}function oi(e,t){var n;return pr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function si(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!ua(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return ai(e,t,il,n)}function ai(t,n,r,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(n=r(n))!=n,l=null===n,u=ua(n),c=n===e;o<s;){var d=Pt((o+s)/2),h=r(t[d]),p=h!==e,f=null===h,m=h==h,g=ua(h);if(a)var v=i||m;else v=c?m&&(i||p):l?m&&p&&(i||!f):u?m&&p&&!f&&(i||!g):!f&&!g&&(i?h<=n:h<n);v?o=d+1:s=d}return bn(s,4294967294)}function li(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!Hs(a,l)){var l=a;o[i++]=0===s?0:s}}return o}function ui(e){return"number"==typeof e?e:ua(e)?d:+e}function ci(e){if("string"==typeof e)return e;if(qs(e))return It(e,ci)+"";if(ua(e))return Vn?Vn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function di(e,t,n){var r=-1,i=Mt,o=e.length,s=!0,a=[],l=a;if(n)s=!1,i=At;else if(o>=200){var u=t?null:Zi(e);if(u)return ln(u);s=!1,i=Xt,l=new Kn}else l=t?[]:a;e:for(;++r<o;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,s&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(c)}else i(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}function hi(e,t){return null==(e=Mo(e,t=bi(t,e)))||delete e[jo(Xo(t))]}function pi(e,t,n,r){return ei(e,t,n(Sr(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ii(e,r?0:o,r?o+1:i):ii(e,r?o+1:0,r?i:o)}function mi(e,t){var n=e;return n instanceof qn&&(n=n.value()),Ot(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function gi(e,t,n){var r=e.length;if(r<2)return r?di(e[0]):[];for(var i=-1,o=xe(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=hr(o[i]||s,e[a],t,n));return di(yr(o,1),t,n)}function vi(t,n,r){for(var i=-1,o=t.length,s=n.length,a={};++i<o;){var l=i<s?n[i]:e;r(a,t[i],l)}return a}function yi(e){return Gs(e)?e:[]}function _i(e){return"function"==typeof e?e:il}function bi(e,t){return qs(e)?e:xo(e,t)?[e]:Fo(_a(e))}var wi=Xr;function xi(t,n,r){var i=t.length;return r=r===e?i:r,!n&&r>=i?t:ii(t,n,r)}var ki=ht||function(e){return dt.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function Ti(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Ei(e,t){var n=t?Ti(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Di(t,n){if(t!==n){var r=t!==e,i=null===t,o=t==t,s=ua(t),a=n!==e,l=null===n,u=n==n,c=ua(n);if(!l&&!c&&!s&&t>n||s&&a&&u&&!l&&!c||i&&a&&u||!r&&u||!o)return 1;if(!i&&!s&&!c&&t<n||c&&r&&o&&!i&&!s||l&&r&&o||!a&&o||!u)return-1}return 0}function Ci(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,l=t.length,u=_n(o-s,0),c=xe(l+u),d=!r;++a<l;)c[a]=t[a];for(;++i<s;)(d||i<o)&&(c[n[i]]=e[i]);for(;u--;)c[a++]=e[i++];return c}function Mi(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,l=-1,u=t.length,c=_n(o-a,0),d=xe(c+u),h=!r;++i<c;)d[i]=e[i];for(var p=i;++l<u;)d[p+l]=t[l];for(;++s<a;)(h||i<o)&&(d[p+n[s]]=e[i++]);return d}function Ai(e,t){var n=-1,r=e.length;for(t||(t=xe(r));++n<r;)t[n]=e[n];return t}function Ii(t,n,r,i){var o=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var l=n[s],u=i?i(r[l],t[l],l,r,t):e;u===e&&(u=t[l]),o?sr(r,l,u):nr(r,l,u)}return r}function Li(e,t){return function(n,r){var i=qs(n)?St:ir,o=t?t():{};return i(n,e,uo(r,2),o)}}function Oi(t){return Xr((function(n,r){var i=-1,o=r.length,s=o>1?r[o-1]:e,a=o>2?r[2]:e;for(s=t.length>3&&"function"==typeof s?(o--,s):e,a&&wo(r[0],r[1],a)&&(s=o<3?e:s,o=1),n=De(n);++i<o;){var l=r[i];l&&t(n,l,i,s)}return n}))}function Ni(e,t){return function(n,r){if(null==n)return n;if(!$s(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=De(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Ri(e){return function(t,n,r){for(var i=-1,o=De(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}function Pi(t){return function(n){var r=rn(n=_a(n))?dn(n):e,i=r?r[0]:n.charAt(0),o=r?xi(r,1).join(""):n.slice(1);return i[t]()+o}}function Fi(e){return function(t){return Ot(Ja(za(t).replace(Ze,"")),e,"")}}function ji(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return ta(r)?r:n}}function Yi(t){return function(n,r,i){var o=De(n);if(!$s(n)){var s=uo(r,3);n=La(n),r=function(e){return s(o[e],e,o)}}var a=t(n,r,i);return a>-1?o[s?n[a]:a]:e}}function Vi(n){return ro((function(r){var i=r.length,o=i,s=zn.prototype.thru;for(n&&r.reverse();o--;){var a=r[o];if("function"!=typeof a)throw new Ae(t);if(s&&!l&&"wrapper"==ao(a))var l=new zn([],!0)}for(o=l?o:i;++o<i;){var u=ao(a=r[o]),c="wrapper"==u?so(a):e;l=c&&ko(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[ao(c[0])].apply(l,c[3]):1==a.length&&ko(a)?l[u]():l.thru(a)}return function(){var e=arguments,t=e[0];if(l&&1==e.length&&qs(t))return l.plant(t).value();for(var n=0,o=i?r[n].apply(this,e):t;++n<i;)o=r[n].call(this,o);return o}}))}function Hi(t,n,r,i,o,s,l,u,c,d){var h=n&a,p=1&n,f=2&n,m=24&n,g=512&n,v=f?e:ji(t);return function a(){for(var y=arguments.length,_=xe(y),b=y;b--;)_[b]=arguments[b];if(m)var w=lo(a),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(_,w);if(i&&(_=Ci(_,i,o,m)),s&&(_=Mi(_,s,l,m)),y-=x,m&&y<d){var k=an(_,w);return Gi(t,n,Hi,a.placeholder,r,_,k,u,c,d-y)}var S=p?r:this,T=f?S[t]:t;return y=_.length,u?_=function(t,n){var r=t.length,i=bn(n.length,r),o=Ai(t);for(;i--;){var s=n[i];t[i]=bo(s,r)?o[s]:e}return t}(_,u):g&&y>1&&_.reverse(),h&&c<y&&(_.length=c),this&&this!==dt&&this instanceof a&&(T=v||ji(T)),T.apply(S,_)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Ui(t,n){return function(r,i){var o;if(r===e&&i===e)return n;if(r!==e&&(o=r),i!==e){if(o===e)return i;"string"==typeof r||"string"==typeof i?(r=ci(r),i=ci(i)):(r=ui(r),i=ui(i)),o=t(r,i)}return o}}function zi(e){return ro((function(t){return t=It(t,Kt(uo())),Xr((function(n){var r=this;return e(t,(function(e){return kt(e,r,n)}))}))}))}function qi(t,n){var r=(n=n===e?" ":ci(n)).length;if(r<2)return r?Zr(n,t):n;var i=Zr(n,gt(t/cn(n)));return rn(n)?xi(dn(i),0,t).join(""):i.slice(0,t)}function Wi(t){return function(n,r,i){return i&&"number"!=typeof i&&wo(n,r,i)&&(r=i=e),n=fa(n),r===e?(r=n,n=0):r=fa(r),function(e,t,n,r){for(var i=-1,o=_n(gt((t-e)/(n||1)),0),s=xe(o);o--;)s[r?o:++i]=e,e+=n;return s}(n,r,i=i===e?n<r?1:-1:fa(i),t)}}function $i(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=va(t),n=va(n)),e(t,n)}}function Gi(t,n,r,i,a,l,u,c,d,h){var p=8&n;n|=p?o:s,4&(n&=~(p?s:o))||(n&=-4);var f=[t,n,a,p?l:e,p?u:e,p?e:l,p?e:u,c,d,h],m=r.apply(e,f);return ko(t)&&Io(m,f),m.placeholder=i,No(m,t,n)}function Ki(e){var t=Ee[e];return function(e,n){if(e=va(e),(n=null==n?0:bn(ma(n),292))&&gn(e)){var r=(_a(e)+"e").split("e");return+((r=(_a(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Zi=Cn&&1/ln(new Cn([,-0]))[1]==u?function(e){return new Cn(e)}:ul;function Xi(e){return function(t){var n=go(t);return n==w?on(t):n==E?un(t):function(e,t){return It(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ji(n,u,c,d,h,p,f,m){var g=2&u;if(!g&&"function"!=typeof n)throw new Ae(t);var v=d?d.length:0;if(v||(u&=-97,d=h=e),f=f===e?f:_n(ma(f),0),m=m===e?m:ma(m),v-=h?h.length:0,u&s){var y=d,_=h;d=h=e}var b=g?e:so(n),w=[n,u,c,d,h,y,_,p,f,m];if(b&&function(e,t){var n=e[1],i=t[1],o=n|i,s=o<131,u=i==a&&8==n||i==a&&n==l&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!s&&!u)return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var d=e[3];e[3]=d?Ci(d,c,t[4]):c,e[4]=d?an(e[3],r):t[4]}(c=t[5])&&(d=e[5],e[5]=d?Mi(d,c,t[6]):c,e[6]=d?an(e[5],r):t[6]);(c=t[7])&&(e[7]=c);i&a&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(w,b),n=w[0],u=w[1],c=w[2],d=w[3],h=w[4],!(m=w[9]=w[9]===e?g?0:n.length:_n(w[9]-v,0))&&24&u&&(u&=-25),u&&1!=u)x=8==u||u==i?function(t,n,r){var i=ji(t);return function o(){for(var s=arguments.length,a=xe(s),l=s,u=lo(o);l--;)a[l]=arguments[l];var c=s<3&&a[0]!==u&&a[s-1]!==u?[]:an(a,u);return(s-=c.length)<r?Gi(t,n,Hi,o.placeholder,e,a,c,e,e,r-s):kt(this&&this!==dt&&this instanceof o?i:t,this,a)}}(n,u,m):u!=o&&33!=u||h.length?Hi.apply(e,w):function(e,t,n,r){var i=1&t,o=ji(e);return function t(){for(var s=-1,a=arguments.length,l=-1,u=r.length,c=xe(u+a),d=this&&this!==dt&&this instanceof t?o:e;++l<u;)c[l]=r[l];for(;a--;)c[l++]=arguments[++s];return kt(d,i?n:this,c)}}(n,u,c,d);else var x=function(e,t,n){var r=1&t,i=ji(e);return function t(){return(this&&this!==dt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(n,u,c);return No((b?ti:Io)(x,w),n,u)}function Qi(t,n,r,i){return t===e||Hs(t,Oe[r])&&!Pe.call(i,r)?n:t}function eo(t,n,r,i,o,s){return ta(t)&&ta(n)&&(s.set(n,t),Ur(t,n,e,eo,s),s.delete(n)),t}function to(t){return oa(t)?e:t}function no(t,n,r,i,o,s){var a=1&r,l=t.length,u=n.length;if(l!=u&&!(a&&u>l))return!1;var c=s.get(t),d=s.get(n);if(c&&d)return c==n&&d==t;var h=-1,p=!0,f=2&r?new Kn:e;for(s.set(t,n),s.set(n,t);++h<l;){var m=t[h],g=n[h];if(i)var v=a?i(g,m,h,n,t,s):i(m,g,h,t,n,s);if(v!==e){if(v)continue;p=!1;break}if(f){if(!Rt(n,(function(e,t){if(!Xt(f,t)&&(m===e||o(m,e,r,i,s)))return f.push(t)}))){p=!1;break}}else if(m!==g&&!o(m,g,r,i,s)){p=!1;break}}return s.delete(t),s.delete(n),p}function ro(t){return Oo(Co(t,e,Wo),t+"")}function io(e){return Tr(e,La,fo)}function oo(e){return Tr(e,Oa,mo)}var so=In?function(e){return In.get(e)}:ul;function ao(e){for(var t=e.name+"",n=Ln[t],r=Pe.call(Ln,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function lo(e){return(Pe.call(Hn,"placeholder")?Hn:e).placeholder}function uo(){var e=Hn.iteratee||ol;return e=e===ol?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function co(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function ho(e){for(var t=La(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Eo(i)]}return t}function po(t,n){var r=function(t,n){return null==t?e:t[n]}(t,n);return Rr(r)?r:e}var fo=zt?function(e){return null==e?[]:(e=De(e),Ct(zt(e),(function(t){return Ke.call(e,t)})))}:gl,mo=zt?function(e){for(var t=[];e;)Lt(t,fo(e)),e=$e(e);return t}:gl,go=Er;function vo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var s=jo(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ea(i)&&bo(s,i)&&(qs(e)||zs(e))}function yo(e){return"function"!=typeof e.constructor||To(e)?{}:Bn($e(e))}function _o(e){return qs(e)||zs(e)||!!(et&&e&&e[et])}function bo(e,t){var n=typeof e;return!!(t=null==t?c:t)&&("number"==n||"symbol"!=n&&ge.test(e))&&e>-1&&e%1==0&&e<t}function wo(e,t,n){if(!ta(n))return!1;var r=typeof t;return!!("number"==r?$s(n)&&bo(t,n.length):"string"==r&&t in n)&&Hs(n[t],e)}function xo(e,t){if(qs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ua(e))||(J.test(e)||!X.test(e)||null!=t&&e in De(t))}function ko(e){var t=ao(e),n=Hn[t];if("function"!=typeof n||!(t in qn.prototype))return!1;if(e===n)return!0;var r=so(n);return!!r&&e===r[0]}(Tn&&go(new Tn(new ArrayBuffer(1)))!=I||En&&go(new En)!=w||Dn&&go(Dn.resolve())!=S||Cn&&go(new Cn)!=E||Mn&&go(new Mn)!=M)&&(go=function(t){var n=Er(t),r=n==k?t.constructor:e,i=r?Yo(r):"";if(i)switch(i){case On:return I;case Nn:return w;case Rn:return S;case Pn:return E;case Fn:return M}return n});var So=Ne?Js:vl;function To(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)}function Eo(e){return e==e&&!ta(e)}function Do(t,n){return function(r){return null!=r&&(r[t]===n&&(n!==e||t in De(r)))}}function Co(t,n,r){return n=_n(n===e?t.length-1:n,0),function(){for(var e=arguments,i=-1,o=_n(e.length-n,0),s=xe(o);++i<o;)s[i]=e[n+i];i=-1;for(var a=xe(n+1);++i<n;)a[i]=e[i];return a[n]=r(s),kt(t,this,a)}}function Mo(e,t){return t.length<2?e:Sr(e,ii(t,0,-1))}function Ao(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Io=Ro(ti),Lo=mt||function(e,t){return dt.setTimeout(e,t)},Oo=Ro(ni);function No(e,t,n){var r=t+"";return Oo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Tt(p,(function(n){var r="_."+n[0];t&n[1]&&!Mt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(se):[]}(r),n)))}function Ro(t){var n=0,r=0;return function(){var i=wn(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Po(t,n){var r=-1,i=t.length,o=i-1;for(n=n===e?i:n;++r<n;){var s=Kr(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=n,t}var Fo=function(e){var t=Rs(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,(function(e,n,r,i){t.push(r?i.replace(ue,"$1"):n||e)})),t}));function jo(e){if("string"==typeof e||ua(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Yo(e){if(null!=e){try{return Re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Vo(e){if(e instanceof qn)return e.clone();var t=new zn(e.__wrapped__,e.__chain__);return t.__actions__=Ai(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ho=Xr((function(e,t){return Gs(e)?hr(e,yr(t,1,Gs,!0)):[]})),Bo=Xr((function(t,n){var r=Xo(n);return Gs(r)&&(r=e),Gs(t)?hr(t,yr(n,1,Gs,!0),uo(r,2)):[]})),Uo=Xr((function(t,n){var r=Xo(n);return Gs(r)&&(r=e),Gs(t)?hr(t,yr(n,1,Gs,!0),e,r):[]}));function zo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ma(n);return i<0&&(i=_n(r+i,0)),jt(e,uo(t,3),i)}function qo(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==e&&(o=ma(r),o=r<0?_n(i+o,0):bn(o,i-1)),jt(t,uo(n,3),o,!0)}function Wo(e){return(null==e?0:e.length)?yr(e,1):[]}function $o(t){return t&&t.length?t[0]:e}var Go=Xr((function(e){var t=It(e,yi);return t.length&&t[0]===e[0]?Ar(t):[]})),Ko=Xr((function(t){var n=Xo(t),r=It(t,yi);return n===Xo(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Ar(r,uo(n,2)):[]})),Zo=Xr((function(t){var n=Xo(t),r=It(t,yi);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Ar(r,e,n):[]}));function Xo(t){var n=null==t?0:t.length;return n?t[n-1]:e}var Jo=Xr(Qo);function Qo(e,t){return e&&e.length&&t&&t.length?$r(e,t):e}var es=ro((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Gr(e,It(t,(function(e){return bo(e,n)?+e:e})).sort(Di)),r}));function ts(e){return null==e?e:Sn.call(e)}var ns=Xr((function(e){return di(yr(e,1,Gs,!0))})),rs=Xr((function(t){var n=Xo(t);return Gs(n)&&(n=e),di(yr(t,1,Gs,!0),uo(n,2))})),is=Xr((function(t){var n=Xo(t);return n="function"==typeof n?n:e,di(yr(t,1,Gs,!0),e,n)}));function os(e){if(!e||!e.length)return[];var t=0;return e=Ct(e,(function(e){if(Gs(e))return t=_n(e.length,t),!0})),$t(t,(function(t){return It(e,Ut(t))}))}function ss(t,n){if(!t||!t.length)return[];var r=os(t);return null==n?r:It(r,(function(t){return kt(n,e,t)}))}var as=Xr((function(e,t){return Gs(e)?hr(e,t):[]})),ls=Xr((function(e){return gi(Ct(e,Gs))})),us=Xr((function(t){var n=Xo(t);return Gs(n)&&(n=e),gi(Ct(t,Gs),uo(n,2))})),cs=Xr((function(t){var n=Xo(t);return n="function"==typeof n?n:e,gi(Ct(t,Gs),e,n)})),ds=Xr(os);var hs=Xr((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,ss(t,r)}));function ps(e){var t=Hn(e);return t.__chain__=!0,t}function fs(e,t){return t(e)}var ms=ro((function(t){var n=t.length,r=n?t[0]:0,i=this.__wrapped__,o=function(e){return ar(e,t)};return!(n>1||this.__actions__.length)&&i instanceof qn&&bo(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:fs,args:[o],thisArg:e}),new zn(i,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(o)}));var gs=Li((function(e,t,n){Pe.call(e,n)?++e[n]:sr(e,n,1)}));var vs=Yi(zo),ys=Yi(qo);function _s(e,t){return(qs(e)?Tt:pr)(e,uo(t,3))}function bs(e,t){return(qs(e)?Et:fr)(e,uo(t,3))}var ws=Li((function(e,t,n){Pe.call(e,n)?e[n].push(t):sr(e,n,[t])}));var xs=Xr((function(e,t,n){var r=-1,i="function"==typeof t,o=$s(e)?xe(e.length):[];return pr(e,(function(e){o[++r]=i?kt(t,e,n):Ir(e,t,n)})),o})),ks=Li((function(e,t,n){sr(e,n,t)}));function Ss(e,t){return(qs(e)?It:Vr)(e,uo(t,3))}var Ts=Li((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Es=Xr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wo(e,t[0],t[1])?t=[]:n>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),qr(e,yr(t,1),[])})),Ds=pt||function(){return dt.Date.now()};function Cs(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,Ji(t,a,e,e,e,e,n)}function Ms(n,r){var i;if("function"!=typeof r)throw new Ae(t);return n=ma(n),function(){return--n>0&&(i=r.apply(this,arguments)),n<=1&&(r=e),i}}var As=Xr((function(e,t,n){var r=1;if(n.length){var i=an(n,lo(As));r|=o}return Ji(e,r,t,n,i)})),Is=Xr((function(e,t,n){var r=3;if(n.length){var i=an(n,lo(Is));r|=o}return Ji(t,r,e,n,i)}));function Ls(n,r,i){var o,s,a,l,u,c,d=0,h=!1,p=!1,f=!0;if("function"!=typeof n)throw new Ae(t);function m(t){var r=o,i=s;return o=s=e,d=t,l=n.apply(i,r)}function g(t){var n=t-c;return c===e||n>=r||n<0||p&&t-d>=a}function v(){var e=Ds();if(g(e))return y(e);u=Lo(v,function(e){var t=r-(e-c);return p?bn(t,a-(e-d)):t}(e))}function y(t){return u=e,f&&o?m(t):(o=s=e,l)}function _(){var t=Ds(),n=g(t);if(o=arguments,s=this,c=t,n){if(u===e)return function(e){return d=e,u=Lo(v,r),h?m(e):l}(c);if(p)return ki(u),u=Lo(v,r),m(c)}return u===e&&(u=Lo(v,r)),l}return r=va(r)||0,ta(i)&&(h=!!i.leading,a=(p="maxWait"in i)?_n(va(i.maxWait)||0,r):a,f="trailing"in i?!!i.trailing:f),_.cancel=function(){u!==e&&ki(u),d=0,o=c=s=u=e},_.flush=function(){return u===e?l:y(Ds())},_}var Os=Xr((function(e,t){return dr(e,1,t)})),Ns=Xr((function(e,t,n){return dr(e,va(t)||0,n)}));function Rs(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new Ae(t);var r=function(){var t=arguments,i=n?n.apply(this,t):t[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,t);return r.cache=o.set(i,s)||o,s};return r.cache=new(Rs.Cache||Gn),r}function Ps(e){if("function"!=typeof e)throw new Ae(t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Rs.Cache=Gn;var Fs=wi((function(e,t){var n=(t=1==t.length&&qs(t[0])?It(t[0],Kt(uo())):It(yr(t,1),Kt(uo()))).length;return Xr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return kt(e,this,r)}))})),js=Xr((function(t,n){var r=an(n,lo(js));return Ji(t,o,e,n,r)})),Ys=Xr((function(t,n){var r=an(n,lo(Ys));return Ji(t,s,e,n,r)})),Vs=ro((function(t,n){return Ji(t,l,e,e,e,n)}));function Hs(e,t){return e===t||e!=e&&t!=t}var Bs=$i(Dr),Us=$i((function(e,t){return e>=t})),zs=Lr(function(){return arguments}())?Lr:function(e){return na(e)&&Pe.call(e,"callee")&&!Ke.call(e,"callee")},qs=xe.isArray,Ws=vt?Kt(vt):function(e){return na(e)&&Er(e)==A};function $s(e){return null!=e&&ea(e.length)&&!Js(e)}function Gs(e){return na(e)&&$s(e)}var Ks=mn||vl,Zs=yt?Kt(yt):function(e){return na(e)&&Er(e)==v};function Xs(e){if(!na(e))return!1;var t=Er(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Js(e){if(!ta(e))return!1;var t=Er(e);return t==_||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qs(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ra=_t?Kt(_t):function(e){return na(e)&&go(e)==w};function ia(e){return"number"==typeof e||na(e)&&Er(e)==x}function oa(e){if(!na(e)||Er(e)!=k)return!1;var t=$e(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==Ve}var sa=bt?Kt(bt):function(e){return na(e)&&Er(e)==T};var aa=wt?Kt(wt):function(e){return na(e)&&go(e)==E};function la(e){return"string"==typeof e||!qs(e)&&na(e)&&Er(e)==D}function ua(e){return"symbol"==typeof e||na(e)&&Er(e)==C}var ca=xt?Kt(xt):function(e){return na(e)&&ea(e.length)&&!!it[Er(e)]};var da=$i(Yr),ha=$i((function(e,t){return e<=t}));function pa(e){if(!e)return[];if($s(e))return la(e)?dn(e):Ai(e);if(st&&e[st])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[st]());var t=go(e);return(t==w?on:t==E?ln:Ha)(e)}function fa(e){return e?(e=va(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=fa(e),n=t%1;return t==t?n?t-n:t:0}function ga(e){return e?lr(ma(e),0,h):0}function va(e){if("number"==typeof e)return e;if(ua(e))return d;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Gt(e);var n=pe.test(e);return n||me.test(e)?lt(e.slice(2),n?2:8):he.test(e)?d:+e}function ya(e){return Ii(e,Oa(e))}function _a(e){return null==e?"":ci(e)}var ba=Oi((function(e,t){if(To(t)||$s(t))Ii(t,La(t),e);else for(var n in t)Pe.call(t,n)&&nr(e,n,t[n])})),wa=Oi((function(e,t){Ii(t,Oa(t),e)})),xa=Oi((function(e,t,n,r){Ii(t,Oa(t),e,r)})),ka=Oi((function(e,t,n,r){Ii(t,La(t),e,r)})),Sa=ro(ar);var Ta=Xr((function(t,n){t=De(t);var r=-1,i=n.length,o=i>2?n[2]:e;for(o&&wo(n[0],n[1],o)&&(i=1);++r<i;)for(var s=n[r],a=Oa(s),l=-1,u=a.length;++l<u;){var c=a[l],d=t[c];(d===e||Hs(d,Oe[c])&&!Pe.call(t,c))&&(t[c]=s[c])}return t})),Ea=Xr((function(t){return t.push(e,eo),kt(Ra,e,t)}));function Da(t,n,r){var i=null==t?e:Sr(t,n);return i===e?r:i}function Ca(e,t){return null!=e&&vo(e,t,Mr)}var Ma=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ye.call(t)),e[t]=n}),tl(il)),Aa=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ye.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),uo),Ia=Xr(Ir);function La(e){return $s(e)?Xn(e):Fr(e)}function Oa(e){return $s(e)?Xn(e,!0):jr(e)}var Na=Oi((function(e,t,n){Ur(e,t,n)})),Ra=Oi((function(e,t,n,r){Ur(e,t,n,r)})),Pa=ro((function(e,t){var n={};if(null==e)return n;var r=!1;t=It(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ii(e,oo(e),n),r&&(n=ur(n,7,to));for(var i=t.length;i--;)hi(n,t[i]);return n}));var Fa=ro((function(e,t){return null==e?{}:function(e,t){return Wr(e,t,(function(t,n){return Ca(e,n)}))}(e,t)}));function ja(e,t){if(null==e)return{};var n=It(oo(e),(function(e){return[e]}));return t=uo(t),Wr(e,n,(function(e,n){return t(e,n[0])}))}var Ya=Xi(La),Va=Xi(Oa);function Ha(e){return null==e?[]:Zt(e,La(e))}var Ba=Fi((function(e,t,n){return t=t.toLowerCase(),e+(n?Ua(t):t)}));function Ua(e){return Xa(_a(e).toLowerCase())}function za(e){return(e=_a(e))&&e.replace(ve,en).replace(Xe,"")}var qa=Fi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Wa=Fi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),$a=Pi("toLowerCase");var Ga=Fi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ka=Fi((function(e,t,n){return e+(n?" ":"")+Xa(t)}));var Za=Fi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xa=Pi("toUpperCase");function Ja(t,n,r){return t=_a(t),(n=r?e:n)===e?function(e){return tt.test(e)}(t)?function(e){return e.match(Qe)||[]}(t):function(e){return e.match(ae)||[]}(t):t.match(n)||[]}var Qa=Xr((function(t,n){try{return kt(t,e,n)}catch(e){return Xs(e)?e:new Se(e)}})),el=ro((function(e,t){return Tt(t,(function(t){t=jo(t),sr(e,t,As(e[t],e))})),e}));function tl(e){return function(){return e}}var nl=Vi(),rl=Vi(!0);function il(e){return e}function ol(e){return Pr("function"==typeof e?e:ur(e,1))}var sl=Xr((function(e,t){return function(n){return Ir(n,e,t)}})),al=Xr((function(e,t){return function(n){return Ir(e,n,t)}}));function ll(e,t,n){var r=La(t),i=kr(t,r);null!=n||ta(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=kr(t,La(t)));var o=!(ta(n)&&"chain"in n&&!n.chain),s=Js(e);return Tt(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ai(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function ul(){}var cl=zi(It),dl=zi(Dt),hl=zi(Rt);function pl(e){return xo(e)?Ut(jo(e)):function(e){return function(t){return Sr(t,e)}}(e)}var fl=Wi(),ml=Wi(!0);function gl(){return[]}function vl(){return!1}var yl=Ui((function(e,t){return e+t}),0),_l=Ki("ceil"),bl=Ui((function(e,t){return e/t}),1),wl=Ki("floor");var xl,kl=Ui((function(e,t){return e*t}),1),Sl=Ki("round"),Tl=Ui((function(e,t){return e-t}),0);return Hn.after=function(e,n){if("function"!=typeof n)throw new Ae(t);return e=ma(e),function(){if(--e<1)return n.apply(this,arguments)}},Hn.ary=Cs,Hn.assign=ba,Hn.assignIn=wa,Hn.assignInWith=xa,Hn.assignWith=ka,Hn.at=Sa,Hn.before=Ms,Hn.bind=As,Hn.bindAll=el,Hn.bindKey=Is,Hn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qs(e)?e:[e]},Hn.chain=ps,Hn.chunk=function(t,n,r){n=(r?wo(t,n,r):n===e)?1:_n(ma(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,s=0,a=xe(gt(i/n));o<i;)a[s++]=ii(t,o,o+=n);return a},Hn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Hn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=xe(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Lt(qs(n)?Ai(n):[n],yr(t,1))},Hn.cond=function(e){var n=null==e?0:e.length,r=uo();return e=n?It(e,(function(e){if("function"!=typeof e[1])throw new Ae(t);return[r(e[0]),e[1]]})):[],Xr((function(t){for(var r=-1;++r<n;){var i=e[r];if(kt(i[0],this,t))return kt(i[1],this,t)}}))},Hn.conforms=function(e){return function(e){var t=La(e);return function(n){return cr(n,e,t)}}(ur(e,1))},Hn.constant=tl,Hn.countBy=gs,Hn.create=function(e,t){var n=Bn(e);return null==t?n:or(n,t)},Hn.curry=function t(n,r,i){var o=Ji(n,8,e,e,e,e,e,r=i?e:r);return o.placeholder=t.placeholder,o},Hn.curryRight=function t(n,r,o){var s=Ji(n,i,e,e,e,e,e,r=o?e:r);return s.placeholder=t.placeholder,s},Hn.debounce=Ls,Hn.defaults=Ta,Hn.defaultsDeep=Ea,Hn.defer=Os,Hn.delay=Ns,Hn.difference=Ho,Hn.differenceBy=Bo,Hn.differenceWith=Uo,Hn.drop=function(t,n,r){var i=null==t?0:t.length;return i?ii(t,(n=r||n===e?1:ma(n))<0?0:n,i):[]},Hn.dropRight=function(t,n,r){var i=null==t?0:t.length;return i?ii(t,0,(n=i-(n=r||n===e?1:ma(n)))<0?0:n):[]},Hn.dropRightWhile=function(e,t){return e&&e.length?fi(e,uo(t,3),!0,!0):[]},Hn.dropWhile=function(e,t){return e&&e.length?fi(e,uo(t,3),!0):[]},Hn.fill=function(t,n,r,i){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&wo(t,n,r)&&(r=0,i=o),function(t,n,r,i){var o=t.length;for((r=ma(r))<0&&(r=-r>o?0:o+r),(i=i===e||i>o?o:ma(i))<0&&(i+=o),i=r>i?0:ga(i);r<i;)t[r++]=n;return t}(t,n,r,i)):[]},Hn.filter=function(e,t){return(qs(e)?Ct:vr)(e,uo(t,3))},Hn.flatMap=function(e,t){return yr(Ss(e,t),1)},Hn.flatMapDeep=function(e,t){return yr(Ss(e,t),u)},Hn.flatMapDepth=function(t,n,r){return r=r===e?1:ma(r),yr(Ss(t,n),r)},Hn.flatten=Wo,Hn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,u):[]},Hn.flattenDepth=function(t,n){return(null==t?0:t.length)?yr(t,n=n===e?1:ma(n)):[]},Hn.flip=function(e){return Ji(e,512)},Hn.flow=nl,Hn.flowRight=rl,Hn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Hn.functions=function(e){return null==e?[]:kr(e,La(e))},Hn.functionsIn=function(e){return null==e?[]:kr(e,Oa(e))},Hn.groupBy=ws,Hn.initial=function(e){return(null==e?0:e.length)?ii(e,0,-1):[]},Hn.intersection=Go,Hn.intersectionBy=Ko,Hn.intersectionWith=Zo,Hn.invert=Ma,Hn.invertBy=Aa,Hn.invokeMap=xs,Hn.iteratee=ol,Hn.keyBy=ks,Hn.keys=La,Hn.keysIn=Oa,Hn.map=Ss,Hn.mapKeys=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){sr(n,t(e,r,i),e)})),n},Hn.mapValues=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){sr(n,r,t(e,r,i))})),n},Hn.matches=function(e){return Hr(ur(e,1))},Hn.matchesProperty=function(e,t){return Br(e,ur(t,1))},Hn.memoize=Rs,Hn.merge=Na,Hn.mergeWith=Ra,Hn.method=sl,Hn.methodOf=al,Hn.mixin=ll,Hn.negate=Ps,Hn.nthArg=function(e){return e=ma(e),Xr((function(t){return zr(t,e)}))},Hn.omit=Pa,Hn.omitBy=function(e,t){return ja(e,Ps(uo(t)))},Hn.once=function(e){return Ms(2,e)},Hn.orderBy=function(t,n,r,i){return null==t?[]:(qs(n)||(n=null==n?[]:[n]),qs(r=i?e:r)||(r=null==r?[]:[r]),qr(t,n,r))},Hn.over=cl,Hn.overArgs=Fs,Hn.overEvery=dl,Hn.overSome=hl,Hn.partial=js,Hn.partialRight=Ys,Hn.partition=Ts,Hn.pick=Fa,Hn.pickBy=ja,Hn.property=pl,Hn.propertyOf=function(t){return function(n){return null==t?e:Sr(t,n)}},Hn.pull=Jo,Hn.pullAll=Qo,Hn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?$r(e,t,uo(n,2)):e},Hn.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?$r(t,n,e,r):t},Hn.pullAt=es,Hn.range=fl,Hn.rangeRight=ml,Hn.rearg=Vs,Hn.reject=function(e,t){return(qs(e)?Ct:vr)(e,Ps(uo(t,3)))},Hn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=uo(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return Gr(e,i),n},Hn.rest=function(n,r){if("function"!=typeof n)throw new Ae(t);return Xr(n,r=r===e?r:ma(r))},Hn.reverse=ts,Hn.sampleSize=function(t,n,r){return n=(r?wo(t,n,r):n===e)?1:ma(n),(qs(t)?Qn:Qr)(t,n)},Hn.set=function(e,t,n){return null==e?e:ei(e,t,n)},Hn.setWith=function(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:ei(t,n,r,i)},Hn.shuffle=function(e){return(qs(e)?er:ri)(e)},Hn.slice=function(t,n,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&wo(t,n,r)?(n=0,r=i):(n=null==n?0:ma(n),r=r===e?i:ma(r)),ii(t,n,r)):[]},Hn.sortBy=Es,Hn.sortedUniq=function(e){return e&&e.length?li(e):[]},Hn.sortedUniqBy=function(e,t){return e&&e.length?li(e,uo(t,2)):[]},Hn.split=function(t,n,r){return r&&"number"!=typeof r&&wo(t,n,r)&&(n=r=e),(r=r===e?h:r>>>0)?(t=_a(t))&&("string"==typeof n||null!=n&&!sa(n))&&!(n=ci(n))&&rn(t)?xi(dn(t),0,r):t.split(n,r):[]},Hn.spread=function(e,n){if("function"!=typeof e)throw new Ae(t);return n=null==n?0:_n(ma(n),0),Xr((function(t){var r=t[n],i=xi(t,0,n);return r&&Lt(i,r),kt(e,this,i)}))},Hn.tail=function(e){var t=null==e?0:e.length;return t?ii(e,1,t):[]},Hn.take=function(t,n,r){return t&&t.length?ii(t,0,(n=r||n===e?1:ma(n))<0?0:n):[]},Hn.takeRight=function(t,n,r){var i=null==t?0:t.length;return i?ii(t,(n=i-(n=r||n===e?1:ma(n)))<0?0:n,i):[]},Hn.takeRightWhile=function(e,t){return e&&e.length?fi(e,uo(t,3),!1,!0):[]},Hn.takeWhile=function(e,t){return e&&e.length?fi(e,uo(t,3)):[]},Hn.tap=function(e,t){return t(e),e},Hn.throttle=function(e,n,r){var i=!0,o=!0;if("function"!=typeof e)throw new Ae(t);return ta(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),Ls(e,n,{leading:i,maxWait:n,trailing:o})},Hn.thru=fs,Hn.toArray=pa,Hn.toPairs=Ya,Hn.toPairsIn=Va,Hn.toPath=function(e){return qs(e)?It(e,jo):ua(e)?[e]:Ai(Fo(_a(e)))},Hn.toPlainObject=ya,Hn.transform=function(e,t,n){var r=qs(e),i=r||Ks(e)||ca(e);if(t=uo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ta(e)&&Js(o)?Bn($e(e)):{}}return(i?Tt:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Hn.unary=function(e){return Cs(e,1)},Hn.union=ns,Hn.unionBy=rs,Hn.unionWith=is,Hn.uniq=function(e){return e&&e.length?di(e):[]},Hn.uniqBy=function(e,t){return e&&e.length?di(e,uo(t,2)):[]},Hn.uniqWith=function(t,n){return n="function"==typeof n?n:e,t&&t.length?di(t,e,n):[]},Hn.unset=function(e,t){return null==e||hi(e,t)},Hn.unzip=os,Hn.unzipWith=ss,Hn.update=function(e,t,n){return null==e?e:pi(e,t,_i(n))},Hn.updateWith=function(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:pi(t,n,_i(r),i)},Hn.values=Ha,Hn.valuesIn=function(e){return null==e?[]:Zt(e,Oa(e))},Hn.without=as,Hn.words=Ja,Hn.wrap=function(e,t){return js(_i(t),e)},Hn.xor=ls,Hn.xorBy=us,Hn.xorWith=cs,Hn.zip=ds,Hn.zipObject=function(e,t){return vi(e||[],t||[],nr)},Hn.zipObjectDeep=function(e,t){return vi(e||[],t||[],ei)},Hn.zipWith=hs,Hn.entries=Ya,Hn.entriesIn=Va,Hn.extend=wa,Hn.extendWith=xa,ll(Hn,Hn),Hn.add=yl,Hn.attempt=Qa,Hn.camelCase=Ba,Hn.capitalize=Ua,Hn.ceil=_l,Hn.clamp=function(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=va(r))==r?r:0),n!==e&&(n=(n=va(n))==n?n:0),lr(va(t),n,r)},Hn.clone=function(e){return ur(e,4)},Hn.cloneDeep=function(e){return ur(e,5)},Hn.cloneDeepWith=function(t,n){return ur(t,5,n="function"==typeof n?n:e)},Hn.cloneWith=function(t,n){return ur(t,4,n="function"==typeof n?n:e)},Hn.conformsTo=function(e,t){return null==t||cr(e,t,La(t))},Hn.deburr=za,Hn.defaultTo=function(e,t){return null==e||e!=e?t:e},Hn.divide=bl,Hn.endsWith=function(t,n,r){t=_a(t),n=ci(n);var i=t.length,o=r=r===e?i:lr(ma(r),0,i);return(r-=n.length)>=0&&t.slice(r,o)==n},Hn.eq=Hs,Hn.escape=function(e){return(e=_a(e))&&$.test(e)?e.replace(q,tn):e},Hn.escapeRegExp=function(e){return(e=_a(e))&&te.test(e)?e.replace(ee,"\\$&"):e},Hn.every=function(t,n,r){var i=qs(t)?Dt:mr;return r&&wo(t,n,r)&&(n=e),i(t,uo(n,3))},Hn.find=vs,Hn.findIndex=zo,Hn.findKey=function(e,t){return Ft(e,uo(t,3),wr)},Hn.findLast=ys,Hn.findLastIndex=qo,Hn.findLastKey=function(e,t){return Ft(e,uo(t,3),xr)},Hn.floor=wl,Hn.forEach=_s,Hn.forEachRight=bs,Hn.forIn=function(e,t){return null==e?e:_r(e,uo(t,3),Oa)},Hn.forInRight=function(e,t){return null==e?e:br(e,uo(t,3),Oa)},Hn.forOwn=function(e,t){return e&&wr(e,uo(t,3))},Hn.forOwnRight=function(e,t){return e&&xr(e,uo(t,3))},Hn.get=Da,Hn.gt=Bs,Hn.gte=Us,Hn.has=function(e,t){return null!=e&&vo(e,t,Cr)},Hn.hasIn=Ca,Hn.head=$o,Hn.identity=il,Hn.includes=function(e,t,n,r){e=$s(e)?e:Ha(e),n=n&&!r?ma(n):0;var i=e.length;return n<0&&(n=_n(i+n,0)),la(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Yt(e,t,n)>-1},Hn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ma(n);return i<0&&(i=_n(r+i,0)),Yt(e,t,i)},Hn.inRange=function(t,n,r){return n=fa(n),r===e?(r=n,n=0):r=fa(r),function(e,t,n){return e>=bn(t,n)&&e<_n(t,n)}(t=va(t),n,r)},Hn.invoke=Ia,Hn.isArguments=zs,Hn.isArray=qs,Hn.isArrayBuffer=Ws,Hn.isArrayLike=$s,Hn.isArrayLikeObject=Gs,Hn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Er(e)==g},Hn.isBuffer=Ks,Hn.isDate=Zs,Hn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},Hn.isEmpty=function(e){if(null==e)return!0;if($s(e)&&(qs(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||ca(e)||zs(e)))return!e.length;var t=go(e);if(t==w||t==E)return!e.size;if(To(e))return!Fr(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},Hn.isEqual=function(e,t){return Or(e,t)},Hn.isEqualWith=function(t,n,r){var i=(r="function"==typeof r?r:e)?r(t,n):e;return i===e?Or(t,n,e,r):!!i},Hn.isError=Xs,Hn.isFinite=function(e){return"number"==typeof e&&gn(e)},Hn.isFunction=Js,Hn.isInteger=Qs,Hn.isLength=ea,Hn.isMap=ra,Hn.isMatch=function(e,t){return e===t||Nr(e,t,ho(t))},Hn.isMatchWith=function(t,n,r){return r="function"==typeof r?r:e,Nr(t,n,ho(n),r)},Hn.isNaN=function(e){return ia(e)&&e!=+e},Hn.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(e)},Hn.isNil=function(e){return null==e},Hn.isNull=function(e){return null===e},Hn.isNumber=ia,Hn.isObject=ta,Hn.isObjectLike=na,Hn.isPlainObject=oa,Hn.isRegExp=sa,Hn.isSafeInteger=function(e){return Qs(e)&&e>=-9007199254740991&&e<=c},Hn.isSet=aa,Hn.isString=la,Hn.isSymbol=ua,Hn.isTypedArray=ca,Hn.isUndefined=function(t){return t===e},Hn.isWeakMap=function(e){return na(e)&&go(e)==M},Hn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Er(e)},Hn.join=function(e,t){return null==e?"":vn.call(e,t)},Hn.kebabCase=qa,Hn.last=Xo,Hn.lastIndexOf=function(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==e&&(o=(o=ma(r))<0?_n(i+o,0):bn(o,i-1)),n==n?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(t,n,o):jt(t,Ht,o,!0)},Hn.lowerCase=Wa,Hn.lowerFirst=$a,Hn.lt=da,Hn.lte=ha,Hn.max=function(t){return t&&t.length?gr(t,il,Dr):e},Hn.maxBy=function(t,n){return t&&t.length?gr(t,uo(n,2),Dr):e},Hn.mean=function(e){return Bt(e,il)},Hn.meanBy=function(e,t){return Bt(e,uo(t,2))},Hn.min=function(t){return t&&t.length?gr(t,il,Yr):e},Hn.minBy=function(t,n){return t&&t.length?gr(t,uo(n,2),Yr):e},Hn.stubArray=gl,Hn.stubFalse=vl,Hn.stubObject=function(){return{}},Hn.stubString=function(){return""},Hn.stubTrue=function(){return!0},Hn.multiply=kl,Hn.nth=function(t,n){return t&&t.length?zr(t,ma(n)):e},Hn.noConflict=function(){return dt._===this&&(dt._=He),this},Hn.noop=ul,Hn.now=Ds,Hn.pad=function(e,t,n){e=_a(e);var r=(t=ma(t))?cn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return qi(Pt(i),n)+e+qi(gt(i),n)},Hn.padEnd=function(e,t,n){e=_a(e);var r=(t=ma(t))?cn(e):0;return t&&r<t?e+qi(t-r,n):e},Hn.padStart=function(e,t,n){e=_a(e);var r=(t=ma(t))?cn(e):0;return t&&r<t?qi(t-r,n)+e:e},Hn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),xn(_a(e).replace(ne,""),t||0)},Hn.random=function(t,n,r){if(r&&"boolean"!=typeof r&&wo(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=fa(t),n===e?(n=t,t=0):n=fa(n)),t>n){var i=t;t=n,n=i}if(r||t%1||n%1){var o=kn();return bn(t+o*(n-t+at("1e-"+((o+"").length-1))),n)}return Kr(t,n)},Hn.reduce=function(e,t,n){var r=qs(e)?Ot:qt,i=arguments.length<3;return r(e,uo(t,4),n,i,pr)},Hn.reduceRight=function(e,t,n){var r=qs(e)?Nt:qt,i=arguments.length<3;return r(e,uo(t,4),n,i,fr)},Hn.repeat=function(t,n,r){return n=(r?wo(t,n,r):n===e)?1:ma(n),Zr(_a(t),n)},Hn.replace=function(){var e=arguments,t=_a(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Hn.result=function(t,n,r){var i=-1,o=(n=bi(n,t)).length;for(o||(o=1,t=e);++i<o;){var s=null==t?e:t[jo(n[i])];s===e&&(i=o,s=r),t=Js(s)?s.call(t):s}return t},Hn.round=Sl,Hn.runInContext=re,Hn.sample=function(e){return(qs(e)?Jn:Jr)(e)},Hn.size=function(e){if(null==e)return 0;if($s(e))return la(e)?cn(e):e.length;var t=go(e);return t==w||t==E?e.size:Fr(e).length},Hn.snakeCase=Ga,Hn.some=function(t,n,r){var i=qs(t)?Rt:oi;return r&&wo(t,n,r)&&(n=e),i(t,uo(n,3))},Hn.sortedIndex=function(e,t){return si(e,t)},Hn.sortedIndexBy=function(e,t,n){return ai(e,t,uo(n,2))},Hn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=si(e,t);if(r<n&&Hs(e[r],t))return r}return-1},Hn.sortedLastIndex=function(e,t){return si(e,t,!0)},Hn.sortedLastIndexBy=function(e,t,n){return ai(e,t,uo(n,2),!0)},Hn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=si(e,t,!0)-1;if(Hs(e[n],t))return n}return-1},Hn.startCase=Ka,Hn.startsWith=function(e,t,n){return e=_a(e),n=null==n?0:lr(ma(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t},Hn.subtract=Tl,Hn.sum=function(e){return e&&e.length?Wt(e,il):0},Hn.sumBy=function(e,t){return e&&e.length?Wt(e,uo(t,2)):0},Hn.template=function(t,n,r){var i=Hn.templateSettings;r&&wo(t,n,r)&&(n=e),t=_a(t),n=xa({},n,i,Qi);var o,s,a=xa({},n.imports,i.imports,Qi),l=La(a),u=Zt(a,l),c=0,d=n.interpolate||ye,h="__p += '",p=Ce((n.escape||ye).source+"|"+d.source+"|"+(d===Z?ce:ye).source+"|"+(n.evaluate||ye).source+"|$","g"),f="//# sourceURL="+(Pe.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";t.replace(p,(function(e,n,r,i,a,l){return r||(r=i),h+=t.slice(c,l).replace(_e,nn),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+e.length,e})),h+="';\n";var m=Pe.call(n,"variable")&&n.variable;if(m){if(le.test(m))throw new Se("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(H,""):h).replace(B,"$1").replace(U,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=Qa((function(){return Te(l,f+"return "+h).apply(e,u)}));if(g.source=h,Xs(g))throw g;return g},Hn.times=function(e,t){if((e=ma(e))<1||e>c)return[];var n=h,r=bn(e,h);t=uo(t),e-=h;for(var i=$t(r,t);++n<e;)t(n);return i},Hn.toFinite=fa,Hn.toInteger=ma,Hn.toLength=ga,Hn.toLower=function(e){return _a(e).toLowerCase()},Hn.toNumber=va,Hn.toSafeInteger=function(e){return e?lr(ma(e),-9007199254740991,c):0===e?e:0},Hn.toString=_a,Hn.toUpper=function(e){return _a(e).toUpperCase()},Hn.trim=function(t,n,r){if((t=_a(t))&&(r||n===e))return Gt(t);if(!t||!(n=ci(n)))return t;var i=dn(t),o=dn(n);return xi(i,Jt(i,o),Qt(i,o)+1).join("")},Hn.trimEnd=function(t,n,r){if((t=_a(t))&&(r||n===e))return t.slice(0,hn(t)+1);if(!t||!(n=ci(n)))return t;var i=dn(t);return xi(i,0,Qt(i,dn(n))+1).join("")},Hn.trimStart=function(t,n,r){if((t=_a(t))&&(r||n===e))return t.replace(ne,"");if(!t||!(n=ci(n)))return t;var i=dn(t);return xi(i,Jt(i,dn(n))).join("")},Hn.truncate=function(t,n){var r=30,i="...";if(ta(n)){var o="separator"in n?n.separator:o;r="length"in n?ma(n.length):r,i="omission"in n?ci(n.omission):i}var s=(t=_a(t)).length;if(rn(t)){var a=dn(t);s=a.length}if(r>=s)return t;var l=r-cn(i);if(l<1)return i;var u=a?xi(a,0,l).join(""):t.slice(0,l);if(o===e)return u+i;if(a&&(l+=u.length-l),sa(o)){if(t.slice(l).search(o)){var c,d=u;for(o.global||(o=Ce(o.source,_a(de.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var h=c.index;u=u.slice(0,h===e?l:h)}}else if(t.indexOf(ci(o),l)!=l){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+i},Hn.unescape=function(e){return(e=_a(e))&&W.test(e)?e.replace(z,pn):e},Hn.uniqueId=function(e){var t=++Fe;return _a(e)+t},Hn.upperCase=Za,Hn.upperFirst=Xa,Hn.each=_s,Hn.eachRight=bs,Hn.first=$o,ll(Hn,(xl={},wr(Hn,(function(e,t){Pe.call(Hn.prototype,t)||(xl[t]=e)})),xl),{chain:!1}),Hn.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Hn[e].placeholder=Hn})),Tt(["drop","take"],(function(t,n){qn.prototype[t]=function(r){r=r===e?1:_n(ma(r),0);var i=this.__filtered__&&!n?new qn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(r,i.__takeCount__):i.__views__.push({size:bn(r,h),type:t+(i.__dir__<0?"Right":"")}),i},qn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Tt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");qn.prototype[e]=function(){return this[n](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");qn.prototype[e]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(il)},qn.prototype.find=function(e){return this.filter(e).head()},qn.prototype.findLast=function(e){return this.reverse().find(e)},qn.prototype.invokeMap=Xr((function(e,t){return"function"==typeof e?new qn(this):this.map((function(n){return Ir(n,e,t)}))})),qn.prototype.reject=function(e){return this.filter(Ps(uo(e)))},qn.prototype.slice=function(t,n){t=ma(t);var r=this;return r.__filtered__&&(t>0||n<0)?new qn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=ma(n))<0?r.dropRight(-n):r.take(n-t)),r)},qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qn.prototype.toArray=function(){return this.take(h)},wr(qn.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=Hn[i?"take"+("last"==n?"Right":""):n],s=i||/^find/.test(n);o&&(Hn.prototype[n]=function(){var n=this.__wrapped__,a=i?[1]:arguments,l=n instanceof qn,u=a[0],c=l||qs(n),d=function(e){var t=o.apply(Hn,Lt([e],a));return i&&h?t[0]:t};c&&r&&"function"==typeof u&&1!=u.length&&(l=c=!1);var h=this.__chain__,p=!!this.__actions__.length,f=s&&!h,m=l&&!p;if(!s&&c){n=m?n:new qn(this);var g=t.apply(n,a);return g.__actions__.push({func:fs,args:[d],thisArg:e}),new zn(g,h)}return f&&m?t.apply(this,a):(g=this.thru(d),f?i?g.value()[0]:g.value():g)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Hn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(qs(i)?i:[],e)}return this[n]((function(n){return t.apply(qs(n)?n:[],e)}))}})),wr(qn.prototype,(function(e,t){var n=Hn[t];if(n){var r=n.name+"";Pe.call(Ln,r)||(Ln[r]=[]),Ln[r].push({name:t,func:n})}})),Ln[Hi(e,2).name]=[{name:"wrapper",func:e}],qn.prototype.clone=function(){var e=new qn(this.__wrapped__);return e.__actions__=Ai(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ai(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ai(this.__views__),e},qn.prototype.reverse=function(){if(this.__filtered__){var e=new qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=qs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=bn(t,e+s);break;case"takeRight":e=_n(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,l=a-s,u=r?a:s-1,c=this.__iteratees__,d=c.length,h=0,p=bn(l,this.__takeCount__);if(!n||!r&&i==l&&p==l)return mi(e,this.__actions__);var f=[];e:for(;l--&&h<p;){for(var m=-1,g=e[u+=t];++m<d;){var v=c[m],y=v.iteratee,_=v.type,b=y(g);if(2==_)g=b;else if(!b){if(1==_)continue e;break e}}f[h++]=g}return f},Hn.prototype.at=ms,Hn.prototype.chain=function(){return ps(this)},Hn.prototype.commit=function(){return new zn(this.value(),this.__chain__)},Hn.prototype.next=function(){this.__values__===e&&(this.__values__=pa(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},Hn.prototype.plant=function(t){for(var n,r=this;r instanceof Un;){var i=Vo(r);i.__index__=0,i.__values__=e,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,n},Hn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qn){var n=t;return this.__actions__.length&&(n=new qn(this)),(n=n.reverse()).__actions__.push({func:fs,args:[ts],thisArg:e}),new zn(n,this.__chain__)}return this.thru(ts)},Hn.prototype.toJSON=Hn.prototype.valueOf=Hn.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Hn.prototype.first=Hn.prototype.head,st&&(Hn.prototype[st]=function(){return this}),Hn}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(dt._=fn,define((function(){return fn}))):pt?((pt.exports=fn)._=fn,ht._=fn):dt._=fn}.call(this),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,(function(){"use strict";var e,t;function n(){return e.apply(null,arguments)}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function a(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function d(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function h(e,t,n,r){return Lt(e,t,n,r,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function f(e){if(null==e._isValid){var n=p(e),r=t.call(n.parsedDateParts,(function(e){return null!=e})),i=!isNaN(e._d.getTime())&&n.overflow<0&&!n.empty&&!n.invalidEra&&!n.invalidMonth&&!n.invalidWeekday&&!n.weekdayMismatch&&!n.nullInput&&!n.invalidFormat&&!n.userInvalidated&&(!n.meridiem||n.meridiem&&r);if(e._strict&&(i=i&&0===n.charsLeftOver&&0===n.unusedTokens.length&&void 0===n.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function m(e){var t=h(NaN);return null!=e?d(p(t),e):p(t).userInvalidated=!0,t}t=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var g=n.momentProperties=[],v=!1;function y(e,t){var n,r,i,o=g.length;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=p(t)),a(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)a(i=t[r=g[n]])||(e[r]=i);return e}function _(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,n.updateOffset(this),v=!1)}function b(e){return e instanceof _||null!=e&&null!=e._isAMomentObject}function w(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function x(e,t){var r=!0;return d((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),r){var i,s,a,l=[],u=arguments.length;for(s=0;s<u;s++){if(i="","object"==typeof arguments[s]){for(a in i+="\n["+s+"] ",arguments[0])o(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[s];l.push(i)}w(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),r=!1}return t.apply(this,arguments)}),t)}var k,S={};function T(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),S[e]||(w(t),S[e]=!0)}function E(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function D(e,t){var n,r=d({},e);for(n in t)o(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},d(r[n],e[n]),d(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)o(e,n)&&!o(t,n)&&i(e[n])&&(r[n]=d({},r[n]));return r}function C(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,k=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};function M(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var A=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,I=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,L={},O={};function N(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(O[e]=i),t&&(O[t[0]]=function(){return M(i.apply(this,arguments),t[1],t[2])}),n&&(O[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function R(e,t){return e.isValid()?(t=P(t,e.localeData()),L[t]=L[t]||function(e){var t,n,r,i=e.match(A);for(t=0,n=i.length;t<n;t++)O[i[t]]?i[t]=O[i[t]]:i[t]=(r=i[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,o="";for(r=0;r<n;r++)o+=E(i[r])?i[r].call(t,e):i[r];return o}}(t),L[t](e)):e.localeData().invalidDate()}function P(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(I.lastIndex=0;n>=0&&I.test(e);)e=e.replace(I,r),I.lastIndex=0,n-=1;return e}var F={};function j(e,t){var n=e.toLowerCase();F[n]=F[n+"s"]=F[t]=e}function Y(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function V(e){var t,n,r={};for(n in e)o(e,n)&&(t=Y(n))&&(r[t]=e[n]);return r}var H={};function B(e,t){H[e]=t}function U(e){return e%4==0&&e%100!=0||e%400==0}function z(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function q(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=z(t)),n}function W(e,t){return function(r){return null!=r?(G(this,e,r),n.updateOffset(this,t),this):$(this,e)}}function $(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function G(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&U(e.year())&&1===e.month()&&29===e.date()?(n=q(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Me(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var K,Z=/\d/,X=/\d\d/,J=/\d{3}/,Q=/\d{4}/,ee=/[+-]?\d{6}/,te=/\d\d?/,ne=/\d\d\d\d?/,re=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,oe=/\d{1,4}/,se=/[+-]?\d{1,6}/,ae=/\d+/,le=/[+-]?\d+/,ue=/Z|[+-]\d\d:?\d\d/gi,ce=/Z|[+-]\d\d(?::?\d\d)?/gi,de=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function he(e,t,n){K[e]=E(t)?t:function(e,r){return e&&n?n:t}}function pe(e,t){return o(K,e)?K[e](t._strict,t._locale):new RegExp(fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}K={};var me={};function ge(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,n){n[t]=q(e)}),r=e.length,n=0;n<r;n++)me[e[n]]=i}function ve(e,t){ge(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function ye(e,t,n){null!=t&&o(me,e)&&me[e](t,n._a,n,e)}var _e,be=0,we=1,xe=2,ke=3,Se=4,Te=5,Ee=6,De=7,Ce=8;function Me(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?U(e)?29:28:31-r%7%2}_e=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},N("M",["MM",2],"Mo",(function(){return this.month()+1})),N("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),N("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),j("month","M"),B("month",8),he("M",te),he("MM",te,X),he("MMM",(function(e,t){return t.monthsShortRegex(e)})),he("MMMM",(function(e,t){return t.monthsRegex(e)})),ge(["M","MM"],(function(e,t){t[we]=q(e)-1})),ge(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[we]=i:p(n).invalidMonth=e}));var Ae="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ie="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Le=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Oe=de,Ne=de;function Re(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=_e.call(this._shortMonthsParse,s))?i:null:-1!==(i=_e.call(this._longMonthsParse,s))?i:null:"MMM"===t?-1!==(i=_e.call(this._shortMonthsParse,s))||-1!==(i=_e.call(this._longMonthsParse,s))?i:null:-1!==(i=_e.call(this._longMonthsParse,s))||-1!==(i=_e.call(this._shortMonthsParse,s))?i:null}function Pe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=q(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Me(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Fe(e){return null!=e?(Pe(this,e),n.updateOffset(this,!0),this):$(this,"Month")}function je(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],o=[];for(t=0;t<12;t++)n=h([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=fe(r[t]),i[t]=fe(i[t]);for(t=0;t<24;t++)o[t]=fe(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ye(e){return U(e)?366:365}N("Y",0,0,(function(){var e=this.year();return e<=9999?M(e,4):"+"+e})),N(0,["YY",2],0,(function(){return this.year()%100})),N(0,["YYYY",4],0,"year"),N(0,["YYYYY",5],0,"year"),N(0,["YYYYYY",6,!0],0,"year"),j("year","y"),B("year",1),he("Y",le),he("YY",te,X),he("YYYY",oe,Q),he("YYYYY",se,ee),he("YYYYYY",se,ee),ge(["YYYYY","YYYYYY"],be),ge("YYYY",(function(e,t){t[be]=2===e.length?n.parseTwoDigitYear(e):q(e)})),ge("YY",(function(e,t){t[be]=n.parseTwoDigitYear(e)})),ge("Y",(function(e,t){t[be]=parseInt(e,10)})),n.parseTwoDigitYear=function(e){return q(e)+(q(e)>68?1900:2e3)};var Ve=W("FullYear",!0);function He(e,t,n,r,i,o,s){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,i,o,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,i,o,s),a}function Be(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ue(e,t,n){var r=7+t-n;return-((7+Be(e,0,r).getUTCDay()-t)%7)+r-1}function ze(e,t,n,r,i){var o,s,a=1+7*(t-1)+(7+n-r)%7+Ue(e,r,i);return a<=0?s=Ye(o=e-1)+a:a>Ye(e)?(o=e+1,s=a-Ye(e)):(o=e,s=a),{year:o,dayOfYear:s}}function qe(e,t,n){var r,i,o=Ue(e.year(),t,n),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?r=s+We(i=e.year()-1,t,n):s>We(e.year(),t,n)?(r=s-We(e.year(),t,n),i=e.year()+1):(i=e.year(),r=s),{week:r,year:i}}function We(e,t,n){var r=Ue(e,t,n),i=Ue(e+1,t,n);return(Ye(e)-r+i)/7}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),B("week",5),B("isoWeek",5),he("w",te),he("ww",te,X),he("W",te),he("WW",te,X),ve(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=q(e)}));function $e(e,t){return e.slice(t,7).concat(e.slice(0,t))}N("d",0,"do","day"),N("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),N("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),N("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),B("day",11),B("weekday",11),B("isoWeekday",11),he("d",te),he("e",te),he("E",te),he("dd",(function(e,t){return t.weekdaysMinRegex(e)})),he("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),he("dddd",(function(e,t){return t.weekdaysRegex(e)})),ve(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:p(n).invalidWeekday=e})),ve(["d","e","E"],(function(e,t,n,r){t[r]=q(e)}));var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Xe=de,Je=de,Qe=de;function et(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=_e.call(this._weekdaysParse,s))?i:null:"ddd"===t?-1!==(i=_e.call(this._shortWeekdaysParse,s))?i:null:-1!==(i=_e.call(this._minWeekdaysParse,s))?i:null:"dddd"===t?-1!==(i=_e.call(this._weekdaysParse,s))||-1!==(i=_e.call(this._shortWeekdaysParse,s))||-1!==(i=_e.call(this._minWeekdaysParse,s))?i:null:"ddd"===t?-1!==(i=_e.call(this._shortWeekdaysParse,s))||-1!==(i=_e.call(this._weekdaysParse,s))||-1!==(i=_e.call(this._minWeekdaysParse,s))?i:null:-1!==(i=_e.call(this._minWeekdaysParse,s))||-1!==(i=_e.call(this._weekdaysParse,s))||-1!==(i=_e.call(this._shortWeekdaysParse,s))?i:null}function tt(){function e(e,t){return t.length-e.length}var t,n,r,i,o,s=[],a=[],l=[],u=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=fe(this.weekdaysMin(n,"")),i=fe(this.weekdaysShort(n,"")),o=fe(this.weekdays(n,"")),s.push(r),a.push(i),l.push(o),u.push(r),u.push(i),u.push(o);s.sort(e),a.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function nt(){return this.hours()%12||12}function rt(e,t){N(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function it(e,t){return t._meridiemParse}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,nt),N("k",["kk",2],0,(function(){return this.hours()||24})),N("hmm",0,0,(function(){return""+nt.apply(this)+M(this.minutes(),2)})),N("hmmss",0,0,(function(){return""+nt.apply(this)+M(this.minutes(),2)+M(this.seconds(),2)})),N("Hmm",0,0,(function(){return""+this.hours()+M(this.minutes(),2)})),N("Hmmss",0,0,(function(){return""+this.hours()+M(this.minutes(),2)+M(this.seconds(),2)})),rt("a",!0),rt("A",!1),j("hour","h"),B("hour",13),he("a",it),he("A",it),he("H",te),he("h",te),he("k",te),he("HH",te,X),he("hh",te,X),he("kk",te,X),he("hmm",ne),he("hmmss",re),he("Hmm",ne),he("Hmmss",re),ge(["H","HH"],ke),ge(["k","kk"],(function(e,t,n){var r=q(e);t[ke]=24===r?0:r})),ge(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),ge(["h","hh"],(function(e,t,n){t[ke]=q(e),p(n).bigHour=!0})),ge("hmm",(function(e,t,n){var r=e.length-2;t[ke]=q(e.substr(0,r)),t[Se]=q(e.substr(r)),p(n).bigHour=!0})),ge("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[ke]=q(e.substr(0,r)),t[Se]=q(e.substr(r,2)),t[Te]=q(e.substr(i)),p(n).bigHour=!0})),ge("Hmm",(function(e,t,n){var r=e.length-2;t[ke]=q(e.substr(0,r)),t[Se]=q(e.substr(r))})),ge("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[ke]=q(e.substr(0,r)),t[Se]=q(e.substr(r,2)),t[Te]=q(e.substr(i))}));var ot=W("Hours",!0);var st,at={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ae,monthsShort:Ie,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:Ze,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},lt={},ut={};function ct(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function dt(e){return e?e.toLowerCase().replace("_","-"):e}function ht(e){var t=null;if(void 0===lt[e]&&"undefined"!=typeof module&&module&&module.exports&&function(e){return null!=e.match("^[^/\\\\]*$")}(e))try{t=st._abbr,require("./locale/"+e),pt(t)}catch(t){lt[e]=null}return lt[e]}function pt(e,t){var n;return e&&((n=a(t)?mt(e):ft(e,t))?st=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),st._abbr}function ft(e,t){if(null!==t){var n,r=at;if(t.abbr=e,null!=lt[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=lt[e]._config;else if(null!=t.parentLocale)if(null!=lt[t.parentLocale])r=lt[t.parentLocale]._config;else{if(null==(n=ht(t.parentLocale)))return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;r=n._config}return lt[e]=new C(D(r,t)),ut[e]&&ut[e].forEach((function(e){ft(e.name,e.config)})),pt(e),lt[e]}return delete lt[e],null}function mt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return st;if(!r(e)){if(t=ht(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o<e.length;){for(t=(i=dt(e[o]).split("-")).length,n=(n=dt(e[o+1]))?n.split("-"):null;t>0;){if(r=ht(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&ct(i,n)>=t-1)break;t--}o++}return st}(e)}function gt(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[we]<0||n[we]>11?we:n[xe]<1||n[xe]>Me(n[be],n[we])?xe:n[ke]<0||n[ke]>24||24===n[ke]&&(0!==n[Se]||0!==n[Te]||0!==n[Ee])?ke:n[Se]<0||n[Se]>59?Se:n[Te]<0||n[Te]>59?Te:n[Ee]<0||n[Ee]>999?Ee:-1,p(e)._overflowDayOfYear&&(t<be||t>xe)&&(t=xe),p(e)._overflowWeeks&&-1===t&&(t=De),p(e)._overflowWeekday&&-1===t&&(t=Ce),p(e).overflow=t),e}var vt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,bt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],wt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],xt=/^\/?Date\((-?\d+)/i,kt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Tt(e){var t,n,r,i,o,s,a=e._i,l=vt.exec(a)||yt.exec(a),u=bt.length,c=wt.length;if(l){for(p(e).iso=!0,t=0,n=u;t<n;t++)if(bt[t][1].exec(l[1])){i=bt[t][0],r=!1!==bt[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=c;t<n;t++)if(wt[t][1].exec(l[3])){o=(l[2]||" ")+wt[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(l[4]){if(!_t.exec(l[4]))return void(e._isValid=!1);s="Z"}e._f=i+(o||"")+(s||""),At(e)}else e._isValid=!1}function Et(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Dt(e){var t,n,r,i,o,s,a,l,u=kt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){if(n=u[4],r=u[3],i=u[2],o=u[5],s=u[6],a=u[7],l=[Et(n),Ie.indexOf(r),parseInt(i,10),parseInt(o,10),parseInt(s,10)],a&&l.push(parseInt(a,10)),t=l,!function(e,t,n){return!e||Ke.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(p(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(u[8],u[9],u[10]),e._d=Be.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0}else e._isValid=!1}function Ct(e,t,n){return null!=e?e:null!=t?t:n}function Mt(e){var t,r,i,o,s,a=[];if(!e._d){for(i=function(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[xe]&&null==e._a[we]&&function(e){var t,n,r,i,o,s,a,l,u;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(o=1,s=4,n=Ct(t.GG,e._a[be],qe(Ot(),1,4).year),r=Ct(t.W,1),((i=Ct(t.E,1))<1||i>7)&&(l=!0)):(o=e._locale._week.dow,s=e._locale._week.doy,u=qe(Ot(),o,s),n=Ct(t.gg,e._a[be],u.year),r=Ct(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o);r<1||r>We(n,o,s)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(a=ze(n,r,i,o,s),e._a[be]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(s=Ct(e._a[be],i[be]),(e._dayOfYear>Ye(s)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),r=Be(s,0,e._dayOfYear),e._a[we]=r.getUTCMonth(),e._a[xe]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=i[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ke]&&0===e._a[Se]&&0===e._a[Te]&&0===e._a[Ee]&&(e._nextDay=!0,e._a[ke]=0),e._d=(e._useUTC?Be:He).apply(null,a),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ke]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}function At(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],p(e).empty=!0;var t,r,i,o,s,a,l,u=""+e._i,c=u.length,d=0;for(l=(i=P(e._f,e._locale).match(A)||[]).length,t=0;t<l;t++)o=i[t],(r=(u.match(pe(o,e))||[])[0])&&((s=u.substr(0,u.indexOf(r))).length>0&&p(e).unusedInput.push(s),u=u.slice(u.indexOf(r)+r.length),d+=r.length),O[o]?(r?p(e).empty=!1:p(e).unusedTokens.push(o),ye(o,r,e)):e._strict&&!r&&p(e).unusedTokens.push(o);p(e).charsLeftOver=c-d,u.length>0&&p(e).unusedInput.push(u),e._a[ke]<=12&&!0===p(e).bigHour&&e._a[ke]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[ke]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[ke],e._meridiem),null!==(a=p(e).era)&&(e._a[be]=e._locale.erasConvertYear(a,e._a[be])),Mt(e),gt(e)}else Dt(e);else Tt(e)}function It(e){var t=e._i,o=e._f;return e._locale=e._locale||mt(e._l),null===t||void 0===o&&""===t?m({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new _(gt(t)):(u(t)?e._d=t:r(o)?function(e){var t,n,r,i,o,s,a=!1,l=e._f.length;if(0===l)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)o=0,s=!1,t=y({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],At(t),f(t)&&(s=!0),o+=p(t).charsLeftOver,o+=10*p(t).unusedTokens.length,p(t).score=o,a?o<r&&(r=o,n=t):(null==r||o<r||s)&&(r=o,n=t,s&&(a=!0));d(e,n||t)}(e):o?At(e):function(e){var t=e._i;a(t)?e._d=new Date(n.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=xt.exec(e._i);null===t?(Tt(e),!1===e._isValid&&(delete e._isValid,Dt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:n.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):r(t)?(e._a=c(t.slice(0),(function(e){return parseInt(e,10)})),Mt(e)):i(t)?function(e){if(!e._d){var t=V(e._i),n=void 0===t.day?t.date:t.day;e._a=c([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Mt(e)}}(e):l(t)?e._d=new Date(t):n.createFromInputFallback(e)}(e),f(e)||(e._d=null),e))}function Lt(e,t,n,o,a){var l,u={};return!0!==t&&!1!==t||(o=t,t=void 0),!0!==n&&!1!==n||(o=n,n=void 0),(i(e)&&s(e)||r(e)&&0===e.length)&&(e=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=a,u._l=n,u._i=e,u._f=t,u._strict=o,(l=new _(gt(It(u))))._nextDay&&(l.add(1,"d"),l._nextDay=void 0),l}function Ot(e,t,n,r){return Lt(e,t,n,r,!1)}n.createFromInputFallback=x("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),n.ISO_8601=function(){},n.RFC_2822=function(){};var Nt=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:m()})),Rt=x("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:m()}));function Pt(e,t){var n,i;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return Ot();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}var Ft=["year","quarter","month","week","day","hour","minute","second","millisecond"];function jt(e){var t=V(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,a=t.day||0,l=t.hour||0,u=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,i=Ft.length;for(t in e)if(o(e,t)&&(-1===_e.call(Ft,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Ft[n]]){if(r)return!1;parseFloat(e[Ft[n]])!==q(e[Ft[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*c+6e4*u+1e3*l*60*60,this._days=+a+7*s,this._months=+i+3*r+12*n,this._data={},this._locale=mt(),this._bubble()}function Yt(e){return e instanceof jt}function Vt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ht(e,t){N(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+M(~~(e/60),2)+t+M(~~e%60,2)}))}Ht("Z",":"),Ht("ZZ",""),he("Z",ce),he("ZZ",ce),ge(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Ut(ce,e)}));var Bt=/([\+\-]|\d\d)/gi;function Ut(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(Bt)||["-",0,0])[1]+q(n[2]))?0:"+"===n[0]?r:-r}function zt(e,t){var r,i;return t._isUTC?(r=t.clone(),i=(b(e)||u(e)?e.valueOf():Ot(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),n.updateOffset(r,!1),r):Ot(e).local()}function qt(e){return-Math.round(e._d.getTimezoneOffset())}function Wt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}n.updateOffset=function(){};var $t=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Gt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Kt(e,t){var n,r,i,s=e,a=null;return Yt(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(a=$t.exec(e))?(n="-"===a[1]?-1:1,s={y:0,d:q(a[xe])*n,h:q(a[ke])*n,m:q(a[Se])*n,s:q(a[Te])*n,ms:q(Vt(1e3*a[Ee]))*n}):(a=Gt.exec(e))?(n="-"===a[1]?-1:1,s={y:Zt(a[2],n),M:Zt(a[3],n),w:Zt(a[4],n),d:Zt(a[5],n),h:Zt(a[6],n),m:Zt(a[7],n),s:Zt(a[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=zt(t,e),e.isBefore(t)?n=Xt(e,t):((n=Xt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Ot(s.from),Ot(s.to)),(s={}).ms=i.milliseconds,s.M=i.months),r=new jt(s),Yt(e)&&o(e,"_locale")&&(r._locale=e._locale),Yt(e)&&o(e,"_isValid")&&(r._isValid=e._isValid),r}function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Xt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Jt(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Qt(this,Kt(n,r),e),this}}function Qt(e,t,r,i){var o=t._milliseconds,s=Vt(t._days),a=Vt(t._months);e.isValid()&&(i=null==i||i,a&&Pe(e,$(e,"Month")+a*r),s&&G(e,"Date",$(e,"Date")+s*r),o&&e._d.setTime(e._d.valueOf()+o*r),i&&n.updateOffset(e,s||a))}Kt.fn=jt.prototype,Kt.invalid=function(){return Kt(NaN)};var en=Jt(1,"add"),tn=Jt(-1,"subtract");function nn(e){return"string"==typeof e||e instanceof String}function rn(e){return b(e)||u(e)||nn(e)||l(e)||function(e){var t=r(e),n=!1;t&&(n=0===e.filter((function(t){return!l(t)&&nn(e)})).length);return t&&n}(e)||function(e){var t,n,r=i(e)&&!s(e),a=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=l.length;for(t=0;t<u;t+=1)n=l[t],a=a||o(e,n);return r&&a}(e)||null==e}function on(e,t){if(e.date()<t.date())return-on(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function sn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=mt(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var an=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ln(){return this._locale}var un=1e3,cn=6e4,dn=36e5,hn=126227808e5;function pn(e,t){return(e%t+t)%t}function fn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-hn:new Date(e,t,n).valueOf()}function mn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-hn:Date.UTC(e,t,n)}function gn(e,t){return t.erasAbbrRegex(e)}function vn(){var e,t,n=[],r=[],i=[],o=[],s=this.eras();for(e=0,t=s.length;e<t;++e)r.push(fe(s[e].name)),n.push(fe(s[e].abbr)),i.push(fe(s[e].narrow)),o.push(fe(s[e].name)),o.push(fe(s[e].abbr)),o.push(fe(s[e].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}function yn(e,t){N(0,[e,e.length],0,t)}function _n(e,t,n,r,i){var o;return null==e?qe(this,r,i).year:(t>(o=We(e,r,i))&&(t=o),bn.call(this,e,t,n,r,i))}function bn(e,t,n,r,i){var o=ze(e,t,n,r,i),s=Be(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}N("N",0,0,"eraAbbr"),N("NN",0,0,"eraAbbr"),N("NNN",0,0,"eraAbbr"),N("NNNN",0,0,"eraName"),N("NNNNN",0,0,"eraNarrow"),N("y",["y",1],"yo","eraYear"),N("y",["yy",2],0,"eraYear"),N("y",["yyy",3],0,"eraYear"),N("y",["yyyy",4],0,"eraYear"),he("N",gn),he("NN",gn),he("NNN",gn),he("NNNN",(function(e,t){return t.erasNameRegex(e)})),he("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),ge(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?p(n).era=i:p(n).invalidEra=e})),he("y",ae),he("yy",ae),he("yyy",ae),he("yyyy",ae),he("yo",(function(e,t){return t._eraYearOrdinalRegex||ae})),ge(["y","yy","yyy","yyyy"],be),ge(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[be]=n._locale.eraYearOrdinalParse(e,i):t[be]=parseInt(e,10)})),N(0,["gg",2],0,(function(){return this.weekYear()%100})),N(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),yn("gggg","weekYear"),yn("ggggg","weekYear"),yn("GGGG","isoWeekYear"),yn("GGGGG","isoWeekYear"),j("weekYear","gg"),j("isoWeekYear","GG"),B("weekYear",1),B("isoWeekYear",1),he("G",le),he("g",le),he("GG",te,X),he("gg",te,X),he("GGGG",oe,Q),he("gggg",oe,Q),he("GGGGG",se,ee),he("ggggg",se,ee),ve(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=q(e)})),ve(["gg","GG"],(function(e,t,r,i){t[i]=n.parseTwoDigitYear(e)})),N("Q",0,"Qo","quarter"),j("quarter","Q"),B("quarter",7),he("Q",Z),ge("Q",(function(e,t){t[we]=3*(q(e)-1)})),N("D",["DD",2],"Do","date"),j("date","D"),B("date",9),he("D",te),he("DD",te,X),he("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ge(["D","DD"],xe),ge("Do",(function(e,t){t[xe]=q(e.match(te)[0])}));var wn=W("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),j("dayOfYear","DDD"),B("dayOfYear",4),he("DDD",ie),he("DDDD",J),ge(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=q(e)})),N("m",["mm",2],0,"minute"),j("minute","m"),B("minute",14),he("m",te),he("mm",te,X),ge(["m","mm"],Se);var xn=W("Minutes",!1);N("s",["ss",2],0,"second"),j("second","s"),B("second",15),he("s",te),he("ss",te,X),ge(["s","ss"],Te);var kn,Sn,Tn=W("Seconds",!1);for(N("S",0,0,(function(){return~~(this.millisecond()/100)})),N(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),N(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),N(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),N(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),N(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),N(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),j("millisecond","ms"),B("millisecond",16),he("S",ie,Z),he("SS",ie,X),he("SSS",ie,J),kn="SSSS";kn.length<=9;kn+="S")he(kn,ae);function En(e,t){t[Ee]=q(1e3*("0."+e))}for(kn="S";kn.length<=9;kn+="S")ge(kn,En);Sn=W("Milliseconds",!1),N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");var Dn=_.prototype;function Cn(e){return e}Dn.add=en,Dn.calendar=function(e,t){1===arguments.length&&(arguments[0]?rn(arguments[0])?(e=arguments[0],t=void 0):function(e){var t,n=i(e)&&!s(e),r=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)r=r||o(e,a[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Ot(),a=zt(r,this).startOf("day"),l=n.calendarFormat(this,a)||"sameElse",u=t&&(E(t[l])?t[l].call(this,r):t[l]);return this.format(u||this.localeData().calendar(l,this,Ot(r)))},Dn.clone=function(){return new _(this)},Dn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=zt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=Y(t)){case"year":o=on(this,r)/12;break;case"month":o=on(this,r);break;case"quarter":o=on(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:z(o)},Dn.endOf=function(e){var t,r;if(void 0===(e=Y(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mn:fn,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=dn-pn(t+(this._isUTC?0:this.utcOffset()*cn),dn)-1;break;case"minute":t=this._d.valueOf(),t+=cn-pn(t,cn)-1;break;case"second":t=this._d.valueOf(),t+=un-pn(t,un)-1}return this._d.setTime(t),n.updateOffset(this,!0),this},Dn.format=function(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=R(this,e);return this.localeData().postformat(t)},Dn.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Ot(e).isValid())?Kt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Dn.fromNow=function(e){return this.from(Ot(),e)},Dn.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Ot(e).isValid())?Kt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Dn.toNow=function(e){return this.to(Ot(),e)},Dn.get=function(e){return E(this[e=Y(e)])?this[e]():this},Dn.invalidAt=function(){return p(this).overflow},Dn.isAfter=function(e,t){var n=b(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=Y(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Dn.isBefore=function(e,t){var n=b(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=Y(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Dn.isBetween=function(e,t,n,r){var i=b(e)?e:Ot(e),o=b(t)?t:Ot(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&(("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n)))},Dn.isSame=function(e,t){var n,r=b(e)?e:Ot(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=Y(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Dn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Dn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Dn.isValid=function(){return f(this)},Dn.lang=an,Dn.locale=sn,Dn.localeData=ln,Dn.max=Rt,Dn.min=Nt,Dn.parsingFlags=function(){return d({},p(this))},Dn.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:H[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=V(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(E(this[e=Y(e)]))return this[e](t);return this},Dn.startOf=function(e){var t,r;if(void 0===(e=Y(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mn:fn,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=pn(t+(this._isUTC?0:this.utcOffset()*cn),dn);break;case"minute":t=this._d.valueOf(),t-=pn(t,cn);break;case"second":t=this._d.valueOf(),t-=pn(t,un)}return this._d.setTime(t),n.updateOffset(this,!0),this},Dn.subtract=tn,Dn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Dn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Dn.toDate=function(){return new Date(this.valueOf())},Dn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?R(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",R(n,"Z")):R(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Dn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",i="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Dn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Dn.toJSON=function(){return this.isValid()?this.toISOString():null},Dn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Dn.unix=function(){return Math.floor(this.valueOf()/1e3)},Dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Dn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},Dn.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},Dn.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},Dn.eraYear=function(){var e,t,r,i,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(r=o[e].since<=o[e].until?1:-1,i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-n(o[e].since).year())*r+o[e].offset;return this.year()},Dn.year=Ve,Dn.isLeapYear=function(){return U(this.year())},Dn.weekYear=function(e){return _n.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Dn.isoWeekYear=function(e){return _n.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Dn.quarter=Dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Dn.month=Fe,Dn.daysInMonth=function(){return Me(this.year(),this.month())},Dn.week=Dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Dn.isoWeek=Dn.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Dn.weeksInYear=function(){var e=this.localeData()._week;return We(this.year(),e.dow,e.doy)},Dn.weeksInWeekYear=function(){var e=this.localeData()._week;return We(this.weekYear(),e.dow,e.doy)},Dn.isoWeeksInYear=function(){return We(this.year(),1,4)},Dn.isoWeeksInISOWeekYear=function(){return We(this.isoWeekYear(),1,4)},Dn.date=wn,Dn.day=Dn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Dn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Dn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Dn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Dn.hour=Dn.hours=ot,Dn.minute=Dn.minutes=xn,Dn.second=Dn.seconds=Tn,Dn.millisecond=Dn.milliseconds=Sn,Dn.utcOffset=function(e,t,r){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(ce,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(i=qt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Qt(this,Kt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:qt(this)},Dn.utc=function(e){return this.utcOffset(0,e)},Dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qt(this),"m")),this},Dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(ue,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ot(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Dn.isUtc=Wt,Dn.isUTC=Wt,Dn.zoneAbbr=function(){return this._isUTC?"UTC":""},Dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Dn.dates=x("dates accessor is deprecated. Use date instead.",wn),Dn.months=x("months accessor is deprecated. Use month instead",Fe),Dn.years=x("years accessor is deprecated. Use year instead",Ve),Dn.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),Dn.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e,t={};return y(t,this),(t=It(t))._a?(e=t._isUTC?h(t._a):Ot(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&q(e[r])!==q(t[r]))&&s++;return s+o}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var Mn=C.prototype;function An(e,t,n,r){var i=mt(),o=h().set(r,t);return i[n](o,e)}function In(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return An(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=An(e,r,n,"month");return i}function Ln(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var i,o=mt(),s=e?o._week.dow:0,a=[];if(null!=n)return An(t,(n+s)%7,r,"day");for(i=0;i<7;i++)a[i]=An(t,(i+s)%7,r,"day");return a}Mn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return E(r)?r.call(t,n):r},Mn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(A).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Mn.invalidDate=function(){return this._invalidDate},Mn.ordinal=function(e){return this._ordinal.replace("%d",e)},Mn.preparse=Cn,Mn.postformat=Cn,Mn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return E(i)?i(e,t,n,r):i.replace(/%d/i,e)},Mn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return E(n)?n(t):n.replace(/%s/i,t)},Mn.set=function(e){var t,n;for(n in e)o(e,n)&&(E(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Mn.eras=function(e,t){var r,i,o,s=this._eras||mt("en")._eras;for(r=0,i=s.length;r<i;++r){if("string"==typeof s[r].since)o=n(s[r].since).startOf("day"),s[r].since=o.valueOf();switch(typeof s[r].until){case"undefined":s[r].until=1/0;break;case"string":o=n(s[r].until).startOf("day").valueOf(),s[r].until=o.valueOf()}}return s},Mn.erasParse=function(e,t,n){var r,i,o,s,a,l=this.eras();for(e=e.toUpperCase(),r=0,i=l.length;r<i;++r)if(o=l[r].name.toUpperCase(),s=l[r].abbr.toUpperCase(),a=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(s===e)return l[r];break;case"NNNN":if(o===e)return l[r];break;case"NNNNN":if(a===e)return l[r]}else if([o,s,a].indexOf(e)>=0)return l[r]},Mn.erasConvertYear=function(e,t){var r=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*r},Mn.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||vn.call(this),e?this._erasAbbrRegex:this._erasRegex},Mn.erasNameRegex=function(e){return o(this,"_erasNameRegex")||vn.call(this),e?this._erasNameRegex:this._erasRegex},Mn.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||vn.call(this),e?this._erasNarrowRegex:this._erasRegex},Mn.months=function(e,t){return e?r(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Le).test(t)?"format":"standalone"][e.month()]:r(this._months)?this._months:this._months.standalone},Mn.monthsShort=function(e,t){return e?r(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Le.test(t)?"format":"standalone"][e.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Mn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return Re.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},Mn.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Ne),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Mn.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Oe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Mn.week=function(e){return qe(e,this._week.dow,this._week.doy).week},Mn.firstDayOfYear=function(){return this._week.doy},Mn.firstDayOfWeek=function(){return this._week.dow},Mn.weekdays=function(e,t){var n=r(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?$e(n,this._week.dow):e?n[e.day()]:n},Mn.weekdaysMin=function(e){return!0===e?$e(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Mn.weekdaysShort=function(e){return!0===e?$e(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Mn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return et.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},Mn.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||tt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Mn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||tt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Je),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Mn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||tt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Qe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Mn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Mn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===q(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=x("moment.lang is deprecated. Use moment.locale instead.",pt),n.langData=x("moment.langData is deprecated. Use moment.localeData instead.",mt);var On=Math.abs;function Nn(e,t,n,r){var i=Kt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Rn(e){return e<0?Math.floor(e):Math.ceil(e)}function Pn(e){return 4800*e/146097}function Fn(e){return 146097*e/4800}function jn(e){return function(){return this.as(e)}}var Yn=jn("ms"),Vn=jn("s"),Hn=jn("m"),Bn=jn("h"),Un=jn("d"),zn=jn("w"),qn=jn("M"),Wn=jn("Q"),$n=jn("y");function Gn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Kn=Gn("milliseconds"),Zn=Gn("seconds"),Xn=Gn("minutes"),Jn=Gn("hours"),Qn=Gn("days"),er=Gn("months"),tr=Gn("years");var nr=Math.round,rr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ir(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var or=Math.abs;function sr(e){return(e>0)-(e<0)||+e}function ar(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,s,a,l=or(this._milliseconds)/1e3,u=or(this._days),c=or(this._months),d=this.asSeconds();return d?(e=z(l/60),t=z(e/60),l%=60,e%=60,n=z(c/12),c%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=sr(this._months)!==sr(d)?"-":"",s=sr(this._days)!==sr(d)?"-":"",a=sr(this._milliseconds)!==sr(d)?"-":"",i+"P"+(n?o+n+"Y":"")+(c?o+c+"M":"")+(u?s+u+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+r+"S":"")):"P0D"}var lr=jt.prototype;return lr.isValid=function(){return this._isValid},lr.abs=function(){var e=this._data;return this._milliseconds=On(this._milliseconds),this._days=On(this._days),this._months=On(this._months),e.milliseconds=On(e.milliseconds),e.seconds=On(e.seconds),e.minutes=On(e.minutes),e.hours=On(e.hours),e.months=On(e.months),e.years=On(e.years),this},lr.add=function(e,t){return Nn(this,e,t,1)},lr.subtract=function(e,t){return Nn(this,e,t,-1)},lr.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=Y(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Pn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Fn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},lr.asMilliseconds=Yn,lr.asSeconds=Vn,lr.asMinutes=Hn,lr.asHours=Bn,lr.asDays=Un,lr.asWeeks=zn,lr.asMonths=qn,lr.asQuarters=Wn,lr.asYears=$n,lr.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12):NaN},lr._bubble=function(){var e,t,n,r,i,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*Rn(Fn(a)+s),s=0,a=0),l.milliseconds=o%1e3,e=z(o/1e3),l.seconds=e%60,t=z(e/60),l.minutes=t%60,n=z(t/60),l.hours=n%24,s+=z(n/24),a+=i=z(Pn(s)),s-=Rn(Fn(i)),r=z(a/12),a%=12,l.days=s,l.months=a,l.years=r,this},lr.clone=function(){return Kt(this)},lr.get=function(e){return e=Y(e),this.isValid()?this[e+"s"]():NaN},lr.milliseconds=Kn,lr.seconds=Zn,lr.minutes=Xn,lr.hours=Jn,lr.days=Qn,lr.weeks=function(){return z(this.days()/7)},lr.months=er,lr.years=tr,lr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=rr;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},rr,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),r=function(e,t,n,r){var i=Kt(e).abs(),o=nr(i.as("s")),s=nr(i.as("m")),a=nr(i.as("h")),l=nr(i.as("d")),u=nr(i.as("M")),c=nr(i.as("w")),d=nr(i.as("y")),h=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(h=h||c<=1&&["w"]||c<n.w&&["ww",c]),(h=h||u<=1&&["M"]||u<n.M&&["MM",u]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,ir.apply(null,h)}(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},lr.toISOString=ar,lr.toString=ar,lr.toJSON=ar,lr.locale=sn,lr.localeData=ln,lr.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ar),lr.lang=an,N("X",0,0,"unix"),N("x",0,0,"valueOf"),he("x",le),he("X",/[+-]?\d+(\.\d{1,3})?/),ge("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),ge("x",(function(e,t,n){n._d=new Date(q(e))})),
505
+ ***************************************************************************** */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)}function r(e){return"function"==typeof e}var i=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}i=e},get useDeprecatedSynchronousErrorHandling(){return i}};function s(e){setTimeout((function(){throw e}),0)}var a={closed:!0,next:function(e){},error:function(e){if(o.useDeprecatedSynchronousErrorHandling)throw e;s(e)},complete:function(){}},l=Array.isArray||function(e){return e&&"number"==typeof e.length};function u(e){return null!==e&&"object"==typeof e}var c=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),d=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,i=n._parentOrParents,o=n._unsubscribe,s=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof e)i.remove(this);else if(null!==i)for(var a=0;a<i.length;++a){i[a].remove(this)}if(r(o))try{o.call(this)}catch(e){t=e instanceof c?h(e.errors):[e]}if(l(s)){a=-1;for(var d=s.length;++a<d;){var p=s[a];if(u(p))try{p.unsubscribe()}catch(e){t=t||[],e instanceof c?t=t.concat(h(e.errors)):t.push(e)}}}if(t)throw new c(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var i=n._parentOrParents;if(null===i)n._parentOrParents=this;else if(i instanceof e){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[n]:o.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function h(e){return e.reduce((function(e,t){return e.concat(t instanceof c?t.errors:t)}),[])}var p="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),f=function(e){function t(n,r,i){var o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=a;break;case 1:if(!n){o.destination=a;break}if("object"==typeof n){n instanceof t?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new m(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new m(o,n,r,i)}return o}return n(t,e),t.prototype[p]=function(){return this},t.create=function(e,n,r){var i=new t(e,n,r);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(d),m=function(e){function t(t,n,i,o){var s,l=e.call(this)||this;l._parentSubscriber=t;var u=l;return r(n)?s=n:n&&(s=n.next,i=n.error,o=n.complete,n!==a&&(r((u=Object.create(n)).unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(l))),l._context=u,l._next=s,l._error=i,l._complete=o,l}return n(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;o.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=o.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):s(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;s(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};o.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),o.useDeprecatedSynchronousErrorHandling)throw e;s(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!o.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return o.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(s(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(f);function g(e){for(;e;){var t=e,n=t.closed,r=t.destination,i=t.isStopped;if(n||i)return!1;e=r&&r instanceof f?r:null}return!0}var v="function"==typeof Symbol&&Symbol.observable||"@@observable";function y(e){return e}function _(e){return 0===e.length?y:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var b=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,i=function(e,t,n){if(e){if(e instanceof f)return e;if(e[p])return e[p]()}return e||t||n?new f(e,t,n):new f(a)}(e,t,n);if(r?i.add(r.call(i,this.source)):i.add(this.source||o.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),o.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){o.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),g(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=w(t))((function(t,r){var i;i=n.subscribe((function(t){try{e(t)}catch(e){r(e),i&&i.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[v]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:_(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=w(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function w(e){if(e||(e=o.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var x=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),k=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return n(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(d),S=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return n(t,e),t}(f),T=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return n(t,e),t.prototype[p]=function(){return new S(this)},t.prototype.lift=function(e){var t=new E(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new x;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].next(e)},t.prototype.error=function(e){if(this.closed)throw new x;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new x;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new x;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new x;return this.hasError?(e.error(this.thrownError),d.EMPTY):this.isStopped?(e.complete(),d.EMPTY):(this.observers.push(e),new k(this,e))},t.prototype.asObservable=function(){var e=new b;return e.source=this,e},t.create=function(e,t){return new E(e,t)},t}(b),E=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return n(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):d.EMPTY},t}(T);var D=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new C(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i},e}(),C=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return n(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},t}(f),M=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return n(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new d).add(this.source.subscribe(new A(this.getSubject(),this))),e.closed&&(this._connection=null,e=d.EMPTY)),e},t.prototype.refCount=function(){return(e=this).lift(new D(e));var e},t}(b),A=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return n(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(S),I=function(e){function t(t,n,r){var i=e.call(this)||this;return i.key=t,i.groupSubject=n,i.refCountSubscription=r,i}return n(t,e),t.prototype._subscribe=function(e){var t=new d,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&t.add(new L(n)),t.add(r.subscribe(e)),t},t}(b),L=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return n(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(d),O=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return n(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new x;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(T),N=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return n(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,n){return e.call(this)||this}return n(t,e),t.prototype.schedule=function(e,t){return this},t}(d)),R=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return n(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(N),P=function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=function(){return Date.now()},e}(),F=function(e){function t(n,r){void 0===r&&(r=P.now);var i=e.call(this,n,(function(){return t.delegate&&t.delegate!==i?t.delegate.now():r()}))||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return n(t,e),t.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,i):e.prototype.schedule.call(this,n,r,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(P),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(F),Y=new j(R),V=Y,H=new b((function(e){return e.complete()}));function B(e){return e?function(e){return new b((function(t){return e.schedule((function(){return t.complete()}))}))}(e):H}function U(e){return e&&"function"==typeof e.schedule}var z,q=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}};function W(e,t){return new b((function(n){var r=new d,i=0;return r.add(t.schedule((function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}function $(e,t){return t?W(e,t):new b(q(e))}function G(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return U(n)?(e.pop(),W(e,n)):$(e)}function K(e,t){return new b(t?function(n){return t.schedule(Z,0,{error:e,subscriber:n})}:function(t){return t.error(e)})}function Z(e){var t=e.error;e.subscriber.error(t)}!function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(z||(z={}));var X=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return G(this.value);case"E":return K(this.error);case"C":return B()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}(),J=function(e){function t(t,n,r){void 0===r&&(r=0);var i=e.call(this,t)||this;return i.scheduler=n,i.delay=r,i}return n(t,e),t.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new Q(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(X.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(X.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(X.createComplete()),this.unsubscribe()},t}(f),Q=function(e,t){this.notification=e,this.destination=t},ee=function(e){function t(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=e.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=t<1?1:t,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return n(t,e),t.prototype.nextInfiniteTimeWindow=function(t){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift(),e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this._events.push(new te(this._getNow(),t)),this._trimBufferThenGetEvents(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new x;if(this.isStopped||this.hasError?t=d.EMPTY:(this.observers.push(e),t=new k(this,e)),i&&e.add(e=new J(e,i)),n)for(var s=0;s<o&&!e.closed;s++)e.next(r[s]);else for(s=0;s<o&&!e.closed;s++)e.next(r[s].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||V).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(e-r[o].time<n);)o++;return i>t&&(o=Math.max(o,i-t)),o>0&&r.splice(0,o),r},t}(T),te=function(e,t){this.time=e,this.value=t},ne=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return n(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),d.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),d.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(T),re=1,ie=Promise.resolve(),oe={};function se(e){return e in oe&&(delete oe[e],!0)}var ae=function(e){var t=re++;return oe[t]=!0,ie.then((function(){return se(t)&&e()})),t},le=function(e){se(e)},ue=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return n(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=ae(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(le(n),t.scheduled=void 0)},t}(N),ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,i=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++r<i&&(e=n.shift()));if(this.active=!1,t){for(;++r<i&&(e=n.shift());)e.unsubscribe();throw t}},t}(F),de=new ce(ue),he=de,pe=new F(N),fe=pe,me=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return n(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame((function(){return t.flush(null)}))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(cancelAnimationFrame(n),t.scheduled=void 0)},t}(N),ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,i=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++r<i&&(e=n.shift()));if(this.active=!1,t){for(;++r<i&&(e=n.shift());)e.unsubscribe();throw t}},t}(F),ve=new ge(me),ye=ve,_e=function(e){function t(t,n){void 0===t&&(t=be),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=e.call(this,t,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return n(t,e),t.prototype.flush=function(){for(var e,t,n=this.actions,r=this.maxFrames;(t=n[0])&&t.delay<=r&&(n.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=n.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(F),be=function(e){function t(t,n,r){void 0===r&&(r=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=r,i.active=!0,i.index=t.index=r,i}return n(t,e),t.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},t.prototype.requestAsyncId=function(e,n,r){void 0===r&&(r=0),this.delay=e.frame+r;var i=e.actions;return i.push(this),i.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,n){},t.prototype._execute=function(t,n){if(!0===this.active)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(N);function we(){}var xe=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}(),ke=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}(),Se=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}();function Te(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Ee(e,t))}}var Ee=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new De(e,this.project,this.thisArg))},e}(),De=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return n(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(f);function Ce(e){var t=this,n=e.args,r=e.subscriber,i=e.params,o=i.callbackFunc,s=i.context,a=i.scheduler,l=i.subject;if(!l){l=i.subject=new ne;try{o.apply(s,n.concat([function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.length<=1?e[0]:e;t.add(a.schedule(Me,0,{value:r,subject:l}))}]))}catch(e){l.error(e)}}this.add(l.subscribe(r))}function Me(e){var t=e.value,n=e.subject;n.next(t),n.complete()}function Ae(e){var t=this,n=e.params,r=e.subscriber,i=e.context,o=n.callbackFunc,s=n.args,a=n.scheduler,l=n.subject;if(!l){l=n.subject=new ne;try{o.apply(i,s.concat([function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.shift();if(r)t.add(a.schedule(Le,0,{err:r,subject:l}));else{var i=e.length<=1?e[0]:e;t.add(a.schedule(Ie,0,{value:i,subject:l}))}}]))}catch(e){this.add(a.schedule(Le,0,{err:e,subject:l}))}}this.add(l.subscribe(r))}function Ie(e){var t=e.value,n=e.subject;n.next(t),n.complete()}function Le(e){var t=e.err;e.subject.error(t)}var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(f),Ne=function(e){function t(t,n,r){var i=e.call(this)||this;return i.parent=t,i.outerValue=n,i.outerIndex=r,i.index=0,i}return n(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(f);var Re="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",Pe=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Fe(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var je=function(e){if(e&&"function"==typeof e[v])return r=e,function(e){var t=r[v]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(Pe(e))return q(e);if(Fe(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,s),e};if(e&&"function"==typeof e[Re])return t=e,function(e){for(var n=t[Re]();;){var r=void 0;try{r=n.next()}catch(t){return e.error(t),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,r,i=u(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+i+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function Ye(e,t,n,r,i){if(void 0===i&&(i=new Ne(e,n,r)),!i.closed)return t instanceof b?t.subscribe(i):je(t)(i)}var Ve={};var He=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new Be(e,this.resultSelector))},e}(),Be=function(e){function t(t,n){var r=e.call(this,t)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return n(t,e),t.prototype._next=function(e){this.values.push(Ve),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var r=e[n];this.add(Ye(this,r,r,n))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,i){var o=this.values,s=o[n],a=this.toRespond?s===Ve?--this.toRespond:this.toRespond:0;o[n]=t,0===a&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(Oe);function Ue(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[v]}(e))return function(e,t){return new b((function(n){var r=new d;return r.add(t.schedule((function(){var i=e[v]();r.add(i.subscribe({next:function(e){r.add(t.schedule((function(){return n.next(e)})))},error:function(e){r.add(t.schedule((function(){return n.error(e)})))},complete:function(){r.add(t.schedule((function(){return n.complete()})))}}))}))),r}))}(e,t);if(Fe(e))return function(e,t){return new b((function(n){var r=new d;return r.add(t.schedule((function(){return e.then((function(e){r.add(t.schedule((function(){n.next(e),r.add(t.schedule((function(){return n.complete()})))})))}),(function(e){r.add(t.schedule((function(){return n.error(e)})))}))}))),r}))}(e,t);if(Pe(e))return W(e,t);if(function(e){return e&&"function"==typeof e[Re]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new b((function(n){var r,i=new d;return i.add((function(){r&&"function"==typeof r.return&&r.return()})),i.add(t.schedule((function(){r=e[Re](),i.add(t.schedule((function(){if(!n.closed){var e,t;try{var i=r.next();e=i.value,t=i.done}catch(e){return void n.error(e)}t?n.complete():(n.next(e),this.schedule())}})))}))),i}))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}function ze(e,t){return t?Ue(e,t):e instanceof b?e:new b(je(e))}function qe(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(r){return r.pipe(qe((function(n,r){return ze(e(n,r)).pipe(Te((function(e,i){return t(n,e,r,i)})))}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new We(e,n))})}var We=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new $e(e,this.project,this.concurrent))},e}(),$e=function(e){function t(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=e.call(this,t)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return n(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(t,e,n)},t.prototype._innerSub=function(e,t,n){var r=new Ne(this,t,n),i=this.destination;i.add(r);var o=Ye(this,e,void 0,void 0,r);o!==r&&i.add(o)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(Oe);function Ge(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),qe(y,e)}function Ke(e){return new b((function(t){var n;try{n=e()}catch(e){return void t.error(e)}return(n?ze(n):B()).subscribe(t)}))}function Ze(e,t){return new b((function(n){var r=e.length;if(0!==r)for(var i=new Array(r),o=0,s=0,a=function(a){var l=ze(e[a]),u=!1;n.add(l.subscribe({next:function(e){u||(u=!0,s++),i[a]=e},error:function(e){return n.error(e)},complete:function(){++o!==r&&u||(s===r&&n.next(t?t.reduce((function(e,t,n){return e[t]=i[n],e}),{}):i),n.complete())}}))},l=0;l<r;l++)a(l);else n.complete()}))}function Xe(e,t,n,r,i){var o;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(e)){var s=e;e.addEventListener(t,n,i),o=function(){return s.removeEventListener(t,n,i)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(e)){var a=e;e.on(t,n),o=function(){return a.off(t,n)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(e)){var l=e;e.addListener(t,n),o=function(){return l.removeListener(t,n)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var u=0,c=e.length;u<c;u++)Xe(e[u],t,n,r,i)}r.add(o)}function Je(e){var t=e.subscriber,n=e.condition;if(!t.closed){if(e.needIterate)try{e.state=e.iterate(e.state)}catch(e){return void t.error(e)}else e.needIterate=!0;if(n){var r=void 0;try{r=n(e.state)}catch(e){return void t.error(e)}if(!r)return void t.complete();if(t.closed)return}var i;try{i=e.resultSelector(e.state)}catch(e){return void t.error(e)}if(!t.closed&&(t.next(i),!t.closed))return this.schedule(e)}}function Qe(e){return!l(e)&&e-parseFloat(e)+1>=0}function et(e){var t=e.subscriber,n=e.counter,r=e.period;t.next(n),this.schedule({subscriber:t,counter:n+1,period:r},r)}var tt=new b(we);function nt(e){var t=e.keys,n=e.index,r=e.subscriber,i=e.subscription,o=e.obj;if(!r.closed)if(n<t.length){var s=t[n];r.next([s,o[s]]),i.add(this.schedule({keys:t,index:n+1,subscriber:r,subscription:i,obj:o}))}else r.complete()}function rt(e,t){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=e,n.thisArg=t,n}function it(e,t){return function(n){return n.lift(new ot(e,t))}}var ot=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new st(e,this.predicate,this.thisArg))},e}(),st=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return n(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(f);var at=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new lt(e))},e}(),lt=function(e){function t(t){var n=e.call(this,t)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return n(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var n=0;n<t&&!this.hasFirst;n++){var r=e[n],i=Ye(this,r,r,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},t.prototype.notifyNext=function(e,t,n,r,i){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==n){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(t)},t}(Oe);function ut(e){var t=e.start,n=e.index,r=e.count,i=e.subscriber;n>=r?i.complete():(i.next(t),i.closed||(e.index=n+1,e.start=t+1,this.schedule(e)))}function ct(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}var dt=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new ht(e,this.resultSelector))},e}(),ht=function(e){function t(t,n,r){void 0===r&&(r=Object.create(null));var i=e.call(this,t)||this;return i.iterators=[],i.active=0,i.resultSelector="function"==typeof n?n:null,i.values=r,i}return n(t,e),t.prototype._next=function(e){var t=this.iterators;l(e)?t.push(new ft(e)):"function"==typeof e[Re]?t.push(new pt(e[Re]())):t.push(new mt(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0!==t){this.active=t;for(var n=0;n<t;n++){var r=e[n];if(r.stillUnsubscribed)this.destination.add(r.subscribe(r,n));else this.active--}}else this.destination.complete()},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,n=this.destination,r=0;r<t;r++){if("function"==typeof(s=e[r]).hasValue&&!s.hasValue())return}var i=!1,o=[];for(r=0;r<t;r++){var s,a=(s=e[r]).next();if(s.hasCompleted()&&(i=!0),a.done)return void n.complete();o.push(a.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(f),pt=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return e&&e.done},e}(),ft=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[Re]=function(){return this},e.prototype.next=function(e){var t=this.index++,n=this.array;return t<this.length?{value:n[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),mt=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return n(t,e),t.prototype[Re]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,i){this.buffer.push(t),this.parent.checkIterators()},t.prototype.subscribe=function(e,t){return Ye(this,this.observable,this,t)},t}(Oe),gt=Object.freeze({__proto__:null,ArgumentOutOfRangeError:xe,AsyncSubject:ne,BehaviorSubject:O,ConnectableObservable:M,EMPTY:H,EmptyError:ke,GroupedObservable:I,NEVER:tt,Notification:X,get NotificationKind(){return z},ObjectUnsubscribedError:x,Observable:b,ReplaySubject:ee,Scheduler:P,Subject:T,Subscriber:f,Subscription:d,TimeoutError:Se,UnsubscriptionError:c,VirtualAction:be,VirtualTimeScheduler:_e,animationFrame:ye,animationFrameScheduler:ve,asap:he,asapScheduler:de,async:fe,asyncScheduler:pe,bindCallback:function e(t,n,r){if(n){if(!U(n))return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return e(t,r).apply(void 0,i).pipe(Te((function(e){return l(e)?n.apply(void 0,e):n(e)})))};r=n}return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i,o=this,s={context:o,subject:i,callbackFunc:t,scheduler:r};return new b((function(n){if(r){var a={args:e,subscriber:n,params:s};return r.schedule(Ce,0,a)}if(!i){i=new ne;try{t.apply(o,e.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.next(e.length<=1?e[0]:e),i.complete()}]))}catch(e){g(i)?i.error(e):console.warn(e)}}return i.subscribe(n)}))}},bindNodeCallback:function e(t,n,r){if(n){if(!U(n))return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return e(t,r).apply(void 0,i).pipe(Te((function(e){return l(e)?n.apply(void 0,e):n(e)})))};r=n}return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i={subject:void 0,args:e,callbackFunc:t,scheduler:r,context:this};return new b((function(n){var o=i.context,s=i.subject;if(r)return r.schedule(Ae,0,{params:i,subscriber:n,context:o});if(!s){s=i.subject=new ne;try{t.apply(o,e.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.shift();n?s.error(n):(s.next(e.length<=1?e[0]:e),s.complete())}]))}catch(e){g(s)?s.error(e):console.warn(e)}}return s.subscribe(n)}))}},combineLatest:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=null,r=null;return U(e[e.length-1])&&(r=e.pop()),"function"==typeof e[e.length-1]&&(n=e.pop()),1===e.length&&l(e[0])&&(e=e[0]),$(e,r).lift(new He(n))},concat:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ge(1)(G.apply(void 0,e))},config:o,defer:Ke,empty:B,forkJoin:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var n=e[0];if(l(n))return Ze(n,null);if(u(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return Ze(r.map((function(e){return n[e]})),r)}}if("function"==typeof e[e.length-1]){var i=e.pop();return Ze(e=1===e.length&&l(e[0])?e[0]:e,null).pipe(Te((function(e){return i.apply(void 0,e)})))}return Ze(e,null)},from:ze,fromEvent:function e(t,n,i,o){return r(i)&&(o=i,i=void 0),o?e(t,n,i).pipe(Te((function(e){return l(e)?o.apply(void 0,e):o(e)}))):new b((function(e){Xe(t,n,(function(t){arguments.length>1?e.next(Array.prototype.slice.call(arguments)):e.next(t)}),e,i)}))},fromEventPattern:function e(t,n,i){return i?e(t,n).pipe(Te((function(e){return l(e)?i.apply(void 0,e):i(e)}))):new b((function(e){var i,o=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1===t.length?t[0]:t)};try{i=t(o)}catch(t){return void e.error(t)}if(r(n))return function(){return n(o,i)}}))},generate:function(e,t,n,r,i){var o,s;if(1==arguments.length){var a=e;s=a.initialState,t=a.condition,n=a.iterate,o=a.resultSelector||y,i=a.scheduler}else void 0===r||U(r)?(s=e,o=y,i=r):(s=e,o=r);return new b((function(e){var r=s;if(i)return i.schedule(Je,0,{subscriber:e,iterate:n,condition:t,resultSelector:o,state:r});for(;;){if(t){var a=void 0;try{a=t(r)}catch(t){return void e.error(t)}if(!a){e.complete();break}}var l=void 0;try{l=o(r)}catch(t){return void e.error(t)}if(e.next(l),e.closed)break;try{r=n(r)}catch(t){return void e.error(t)}}}))},identity:y,iif:function(e,t,n){return void 0===t&&(t=H),void 0===n&&(n=H),Ke((function(){return e()?t:n}))},interval:function(e,t){return void 0===e&&(e=0),void 0===t&&(t=fe),(!Qe(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=fe),new b((function(n){return n.add(t.schedule(et,e,{subscriber:n,counter:0,period:e})),n}))},isObservable:function(e){return!!e&&(e instanceof b||"function"==typeof e.lift&&"function"==typeof e.subscribe)},merge:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Number.POSITIVE_INFINITY,r=null,i=e[e.length-1];return U(i)?(r=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(n=e.pop())):"number"==typeof i&&(n=e.pop()),null===r&&1===e.length&&e[0]instanceof b?e[0]:Ge(n)($(e,r))},never:function(){return tt},noop:we,observable:v,of:G,onErrorResumeNext:function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return H;var r=t[0],i=t.slice(1);return 1===t.length&&l(r)?e.apply(void 0,r):new b((function(t){var n=function(){return t.add(e.apply(void 0,i).subscribe(t))};return ze(r).subscribe({next:function(e){t.next(e)},error:n,complete:n})}))},pairs:function(e,t){return new b(t?function(n){var r=Object.keys(e),i=new d;return i.add(t.schedule(nt,0,{keys:r,index:0,subscriber:n,subscription:i,obj:e})),i}:function(t){for(var n=Object.keys(e),r=0;r<n.length&&!t.closed;r++){var i=n[r];e.hasOwnProperty(i)&&t.next([i,e[i]])}t.complete()})},partition:function(e,t,n){return[it(t,n)(new b(je(e))),it(rt(t,n))(new b(je(e)))]},pipe:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _(e)},queue:V,queueScheduler:Y,race:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){if(!l(e[0]))return e[0];e=e[0]}return $(e,void 0).lift(new at)},range:function(e,t,n){return void 0===e&&(e=0),new b((function(r){void 0===t&&(t=e,e=0);var i=0,o=e;if(n)return n.schedule(ut,0,{index:i,count:t,start:e,subscriber:r});for(;;){if(i++>=t){r.complete();break}if(r.next(o++),r.closed)break}}))},scheduled:Ue,throwError:K,timer:function(e,t,n){void 0===e&&(e=0);var r=-1;return Qe(t)?r=Number(t)<1?1:Number(t):U(t)&&(n=t),U(n)||(n=fe),new b((function(t){var i=Qe(e)?e:+e-n.now();return n.schedule(ct,i,{index:0,period:r,subscriber:t})}))},using:function(e,t){return new b((function(n){var r,i;try{r=e()}catch(e){return void n.error(e)}try{i=t(r)}catch(e){return void n.error(e)}var o=(i?ze(i):H).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe()}}))},zip:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return"function"==typeof n&&e.pop(),$(e,void 0).lift(new dt(n))}}),vt=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}(gt);return function(e){var t=vt,n=function(){function e(e,n,i,o){if(this.url=e,this.protocols=n,this.config=i,this.binaryType=o,this.reconnectAttempts=0,this.sendQueue=[],this.onOpenCallbacks=[],this.onMessageCallbacks=[],this.onErrorCallbacks=[],this.onCloseCallbacks=[],this.readyStateConstants={UNINITIALIZED:-1,CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3,RECONNECT_ABORTED:4},this.normalCloseCode=1e3,this.reconnectableStatusCodes=[4e3],this.send4Mode=r.Observable,!new RegExp("wss?://").test(e))throw new Error("Invalid url provided");this.config=Object.assign({initialTimeout:500,maxTimeout:3e5,reconnectIfNotNormalClose:!1},i),this.binaryType=o||"blob",this.dataStream=new t.Subject,this.errorMessages=new t.Subject,this.connect(!0)}return e.prototype.connect=function(e){var t=this;void 0===e&&(e=!1);var n=this;!e&&this.socket&&this.socket.readyState===this.readyStateConstants.OPEN||(n.socket=this.protocols?new WebSocket(this.url,this.protocols):new WebSocket(this.url),n.socket.binaryType=n.binaryType,n.socket.onopen=function(e){t.onOpenHandler(e)},n.socket.onmessage=function(e){n.onMessageHandler(e),t.dataStream.next(e)},this.socket.onclose=function(e){n.onCloseHandler(e)},this.socket.onerror=function(e){n.onErrorHandler(e),t.errorMessages.next(e)})},e.prototype.getErrorStream=function(){return this.errorMessages},e.prototype.send4Direct=function(e,t){var n=this;return this.getReadyState()!==this.readyStateConstants.OPEN&&this.getReadyState()!==this.readyStateConstants.CONNECTING&&this.connect(),n.sendQueue.push({message:e,binary:t}),n.socket.readyState===n.readyStateConstants.OPEN&&(n.fireQueue(),!0)},e.prototype.send4Promise=function(e,t){var n=this;return new Promise((function(r,i){return n.send4Direct(e,t)?r():i(Error("Socket connection has been closed"))}))},e.prototype.send4Observable=function(e,n){var r=this;return t.Observable.create((function(t){return r.send4Direct(e,n)?t.complete():t.error("Socket connection has been closed")}))},e.prototype.setSend4Mode=function(e){this.send4Mode=e},e.prototype.send=function(e,t,n){switch(void 0!==t?t:this.send4Mode){case r.Direct:return this.send4Direct(e,n);case r.Promise:return this.send4Promise(e,n);case r.Observable:return this.send4Observable(e,n);default:throw Error("WebSocketSendMode Error.")}},e.prototype.getDataStream=function(){return this.dataStream},e.prototype.onOpenHandler=function(e){this.reconnectAttempts=0,this.notifyOpenCallbacks(e),this.fireQueue()},e.prototype.notifyOpenCallbacks=function(e){for(var t=0;t<this.onOpenCallbacks.length;t++)this.onOpenCallbacks[t].call(this,e)},e.prototype.fireQueue=function(){for(;this.sendQueue.length&&this.socket.readyState===this.readyStateConstants.OPEN;){var t=this.sendQueue.shift();t.binary?this.socket.send(t.message):this.socket.send(e.Helpers.isString(t.message)?t.message:JSON.stringify(t.message))}},e.prototype.notifyCloseCallbacks=function(e){for(var t=0;t<this.onCloseCallbacks.length;t++)this.onCloseCallbacks[t].call(this,e)},e.prototype.notifyErrorCallbacks=function(e){for(var t=0;t<this.onErrorCallbacks.length;t++)this.onErrorCallbacks[t].call(this,e)},e.prototype.onOpen=function(e){return this.onOpenCallbacks.push(e),this},e.prototype.onClose=function(e){return this.onCloseCallbacks.push(e),this},e.prototype.onError=function(e){return this.onErrorCallbacks.push(e),this},e.prototype.onMessage=function(t,n){if(!e.Helpers.isFunction(t))throw new Error("Callback must be a function");return this.onMessageCallbacks.push({fn:t,pattern:n?n.filter:void 0,autoApply:!n||n.autoApply}),this},e.prototype.onMessageHandler=function(e){for(var t=this,n=0;n<t.onMessageCallbacks.length;n++)t.onMessageCallbacks[n].fn.apply(t,[e])},e.prototype.onCloseHandler=function(e){this.notifyCloseCallbacks(e),this.config.reconnectIfNotNormalClose&&e.code!==this.normalCloseCode||this.reconnectableStatusCodes.indexOf(e.code)>-1?this.reconnect():(this.sendQueue=[],this.dataStream.complete())},e.prototype.onErrorHandler=function(e){this.notifyErrorCallbacks(e)},e.prototype.reconnect=function(){var e=this;this.close(!0,!0);var t=this.getBackoffDelay(++this.reconnectAttempts);return setTimeout((function(){e.config.reconnectIfNotNormalClose&&e.connect()}),t),this},e.prototype.close=function(e,t){return void 0===e&&(e=!1),t||(this.config.reconnectIfNotNormalClose=!1),!e&&this.socket.bufferedAmount||this.socket.close(this.normalCloseCode),this},e.prototype.getBackoffDelay=function(e){var t=Math.random()+1,n=this.config.initialTimeout,r=e,i=this.config.maxTimeout;return Math.floor(Math.min(t*n*Math.pow(2,r),i))},e.prototype.setInternalState=function(e){if(Math.floor(e)!==e||e<0||e>4)throw new Error("state must be an integer between 0 and 4, got: "+e);this.internalConnectionState=e},e.prototype.getReadyState=function(){return null==this.socket?this.readyStateConstants.UNINITIALIZED:this.internalConnectionState||this.socket.readyState},e.Helpers=function(){function e(){}return e.isPresent=function(e){return null!=e},e.isString=function(e){return"string"==typeof e},e.isArray=function(e){return Array.isArray(e)},e.isFunction=function(e){return"function"==typeof e},e}(),e}();e.$WebSocket=n,function(e){e[e.Direct=0]="Direct",e[e.Promise=1]="Promise",e[e.Observable=2]="Observable"}(e.WebSocketSendMode||(e.WebSocketSendMode={}));var r=e.WebSocketSendMode}(e),e})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("rxjs")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","rxjs"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ngCircleProgress={},e.ng.core,e.ng.common,e.rxjs)}(this,(function(e,t,n,r){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o=i(t),s=i(n);class a{constructor(){this.class="",this.backgroundGradient=!1,this.backgroundColor="transparent",this.backgroundGradientStopColor="transparent",this.backgroundOpacity=1,this.backgroundStroke="transparent",this.backgroundStrokeWidth=0,this.backgroundPadding=5,this.percent=0,this.radius=90,this.space=4,this.toFixed=0,this.maxPercent=1e3,this.renderOnClick=!0,this.units="%",this.unitsFontSize="10",this.unitsFontWeight="normal",this.unitsColor="#444444",this.outerStrokeGradient=!1,this.outerStrokeWidth=8,this.outerStrokeColor="#78C000",this.outerStrokeGradientStopColor="transparent",this.outerStrokeLinecap="round",this.innerStrokeColor="#C7E596",this.innerStrokeWidth=4,this.titleFormat=void 0,this.title="auto",this.titleColor="#444444",this.titleFontSize="20",this.titleFontWeight="normal",this.subtitleFormat=void 0,this.subtitle="progress",this.subtitleColor="#A9A9A9",this.subtitleFontSize="10",this.subtitleFontWeight="normal",this.imageSrc=void 0,this.imageHeight=0,this.imageWidth=0,this.animation=!0,this.animateTitle=!0,this.animateSubtitle=!1,this.animationDuration=500,this.showTitle=!0,this.showSubtitle=!0,this.showUnits=!0,this.showImage=!1,this.showBackground=!0,this.showInnerStroke=!0,this.clockwise=!0,this.responsive=!1,this.startFromZero=!0,this.showZeroOuterStroke=!0,this.lazy=!1}}class l{constructor(e,i,o,s){this.ngZone=i,this.elRef=o,this.onClick=new t.EventEmitter,this.svgElement=null,this.isInViewport=!1,this.onViewportChanged=new t.EventEmitter,this._viewportChangedSubscriber=null,this.options=new a,this.defaultOptions=new a,this._lastPercent=0,this._gradientUUID=null,this.render=()=>{this.applyOptions(),this.options.lazy?(null===this.svgElement&&this.draw(this._lastPercent),this.isInViewport&&(this.options.animation&&this.options.animationDuration>0?this.animate(this._lastPercent,this.options.percent):this.draw(this.options.percent),this._lastPercent=this.options.percent)):(this.options.animation&&this.options.animationDuration>0?this.animate(this._lastPercent,this.options.percent):this.draw(this.options.percent),this._lastPercent=this.options.percent)},this.polarToCartesian=(e,t,n,r)=>{let i=r*Math.PI/180;return{x:e+Math.sin(i)*n,y:t-Math.cos(i)*n}},this.draw=e=>{let t=(e=void 0===e?this.options.percent:Math.abs(e))>100?100:e,n=2*this.options.radius+2*this.options.outerStrokeWidth;this.options.showBackground&&(n+=2*this.options.backgroundStrokeWidth+this.max(0,2*this.options.backgroundPadding));let r,i,o={x:n/2,y:n/2},s=o.x,a=o.y-this.options.radius,l=this.polarToCartesian(o.x,o.y,this.options.radius,360*(this.options.clockwise?t:100-t)/100);100===t&&(l.x=l.x+(this.options.clockwise?-.01:.01)),[r,i]=t>50?this.options.clockwise?[1,1]:[1,0]:this.options.clockwise?[0,1]:[0,0];let u=this.options.animateTitle?e:this.options.percent,c=u>this.options.maxPercent?`${this.options.maxPercent.toFixed(this.options.toFixed)}+`:u.toFixed(this.options.toFixed),d=this.options.animateSubtitle?e:this.options.percent,h={x:o.x,y:o.y,textAnchor:"middle",color:this.options.titleColor,fontSize:this.options.titleFontSize,fontWeight:this.options.titleFontWeight,texts:[],tspans:[]};if(void 0!==this.options.titleFormat&&"Function"===this.options.titleFormat.constructor.name){let e=this.options.titleFormat(u);e instanceof Array?h.texts=[...e]:h.texts.push(e.toString())}else"auto"===this.options.title?h.texts.push(c):this.options.title instanceof Array?h.texts=[...this.options.title]:h.texts.push(this.options.title.toString());let p={x:o.x,y:o.y,textAnchor:"middle",color:this.options.subtitleColor,fontSize:this.options.subtitleFontSize,fontWeight:this.options.subtitleFontWeight,texts:[],tspans:[]};if(void 0!==this.options.subtitleFormat&&"Function"===this.options.subtitleFormat.constructor.name){let e=this.options.subtitleFormat(d);e instanceof Array?p.texts=[...e]:p.texts.push(e.toString())}else this.options.subtitle instanceof Array?p.texts=[...this.options.subtitle]:p.texts.push(this.options.subtitle.toString());let f={text:`${this.options.units}`,fontSize:this.options.unitsFontSize,fontWeight:this.options.unitsFontWeight,color:this.options.unitsColor},m=0,g=1;if(this.options.showTitle&&(m+=h.texts.length),this.options.showSubtitle&&(m+=p.texts.length),this.options.showTitle)for(let e of h.texts)h.tspans.push({span:e,dy:this.getRelativeY(g,m)}),g++;if(this.options.showSubtitle)for(let e of p.texts)p.tspans.push({span:e,dy:this.getRelativeY(g,m)}),g++;null===this._gradientUUID&&(this._gradientUUID=this.uuid()),this.svg={viewBox:`0 0 ${n} ${n}`,width:this.options.responsive?"100%":n,height:this.options.responsive?"100%":n,backgroundCircle:{cx:o.x,cy:o.y,r:this.options.radius+this.options.outerStrokeWidth/2+this.options.backgroundPadding,fill:this.options.backgroundColor,fillOpacity:this.options.backgroundOpacity,stroke:this.options.backgroundStroke,strokeWidth:this.options.backgroundStrokeWidth},path:{d:`M ${s} ${a}\n A ${this.options.radius} ${this.options.radius} 0 ${r} ${i} ${l.x} ${l.y}`,stroke:this.options.outerStrokeColor,strokeWidth:this.options.outerStrokeWidth,strokeLinecap:this.options.outerStrokeLinecap,fill:"none"},circle:{cx:o.x,cy:o.y,r:this.options.radius-this.options.space-this.options.outerStrokeWidth/2-this.options.innerStrokeWidth/2,fill:"none",stroke:this.options.innerStrokeColor,strokeWidth:this.options.innerStrokeWidth},title:h,units:f,subtitle:p,image:{x:o.x-this.options.imageWidth/2,y:o.y-this.options.imageHeight/2,src:this.options.imageSrc,width:this.options.imageWidth,height:this.options.imageHeight},outerLinearGradient:{id:"outer-linear-"+this._gradientUUID,colorStop1:this.options.outerStrokeColor,colorStop2:"transparent"===this.options.outerStrokeGradientStopColor?"#FFF":this.options.outerStrokeGradientStopColor},radialGradient:{id:"radial-"+this._gradientUUID,colorStop1:this.options.backgroundColor,colorStop2:"transparent"===this.options.backgroundGradientStopColor?"#FFF":this.options.backgroundGradientStopColor}}},this.getAnimationParameters=(e,t)=>{let n,r,i,o=this.options.startFromZero||e<0?0:e,s=t<0?0:this.min(t,this.options.maxPercent),a=Math.abs(Math.round(s-o));return a>=100?(n=100,r=this.options.animateTitle||this.options.animateSubtitle?Math.round(a/n):1):(n=a,r=1),i=Math.round(this.options.animationDuration/n),i<10&&(i=10,n=this.options.animationDuration/i,r=!this.options.animateTitle&&!this.options.animateSubtitle&&a>100?Math.round(100/n):Math.round(a/n)),r<1&&(r=1),{times:n,step:r,interval:i}},this.animate=(e,t)=>{this._timerSubscription&&!this._timerSubscription.closed&&this._timerSubscription.unsubscribe();let n=this.options.startFromZero?0:e,i=t,{step:o,interval:s}=this.getAnimationParameters(n,i),a=n;this._timerSubscription=n<i?r.timer(0,s).subscribe((()=>{a+=o,a<=i?!this.options.animateTitle&&!this.options.animateSubtitle&&a>=100?(this.draw(i),this._timerSubscription.unsubscribe()):this.draw(a):(this.draw(i),this._timerSubscription.unsubscribe())})):r.timer(0,s).subscribe((()=>{a-=o,a>=i?!this.options.animateTitle&&!this.options.animateSubtitle&&i>=100?(this.draw(i),this._timerSubscription.unsubscribe()):this.draw(a):(this.draw(i),this._timerSubscription.unsubscribe())}))},this.applyOptions=()=>{for(let e of Object.keys(this.options))this.hasOwnProperty(e)&&void 0!==this[e]?this.options[e]=this[e]:this.templateOptions&&void 0!==this.templateOptions[e]&&(this.options[e]=this.templateOptions[e]);this.options.radius=Math.abs(+this.options.radius),this.options.space=+this.options.space,this.options.percent=+this.options.percent>0?+this.options.percent:0,this.options.maxPercent=Math.abs(+this.options.maxPercent),this.options.animationDuration=Math.abs(this.options.animationDuration),this.options.outerStrokeWidth=Math.abs(+this.options.outerStrokeWidth),this.options.innerStrokeWidth=Math.abs(+this.options.innerStrokeWidth),this.options.backgroundPadding=+this.options.backgroundPadding},this.getRelativeY=(e,t)=>(1*(e-t/2)-.18).toFixed(2)+"em",this.min=(e,t)=>e<t?e:t,this.max=(e,t)=>e>t?e:t,this.uuid=()=>{var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))},this.checkViewport=()=>{this.findSvgElement();let e=this.isInViewport;this.isInViewport=this.isElementInViewport(this.svgElement),e!==this.isInViewport&&this.onViewportChanged.observers.length>0&&this.ngZone.run((()=>{this.onViewportChanged.emit({oldValue:e,newValue:this.isInViewport})}))},this.onScroll=e=>{this.checkViewport()},this.loadEventsForLazyMode=()=>{if(this.options.lazy){this.ngZone.runOutsideAngular((()=>{this.document.addEventListener("scroll",this.onScroll,!0),this.window.addEventListener("resize",this.onScroll,!0)})),null===this._viewportChangedSubscriber&&(this._viewportChangedSubscriber=this.onViewportChanged.subscribe((({oldValue:e,newValue:t})=>{t&&this.render()})));let e=r.timer(0,50).subscribe((()=>{null===this.svgElement?this.checkViewport():e.unsubscribe()}))}},this.unloadEventsForLazyMode=()=>{this.document.removeEventListener("scroll",this.onScroll,!0),this.window.removeEventListener("resize",this.onScroll,!0),null!==this._viewportChangedSubscriber&&(this._viewportChangedSubscriber.unsubscribe(),this._viewportChangedSubscriber=null)},this.document=s.get(n.DOCUMENT),this.window=this.document.defaultView,Object.assign(this.options,e),Object.assign(this.defaultOptions,e)}emitClickEvent(e){this.options.renderOnClick&&this.animate(0,this.options.percent),this.onClick.observers.length>0&&this.onClick.emit(e)}isDrawing(){return this._timerSubscription&&!this._timerSubscription.closed}findSvgElement(){if(null===this.svgElement){let e=this.elRef.nativeElement.getElementsByTagName("svg");e.length>0&&(this.svgElement=e[0])}}isElementInViewport(e){if(null==e)return!1;let t,n=e.getBoundingClientRect(),r=e.parentNode;do{if(t=r.getBoundingClientRect(),n.top>=t.bottom)return!1;if(n.bottom<=t.top)return!1;if(n.left>=t.right)return!1;if(n.right<=t.left)return!1;r=r.parentNode}while(r!=this.document.body);return!(n.top>=(this.window.innerHeight||this.document.documentElement.clientHeight))&&(!(n.bottom<=0)&&(!(n.left>=(this.window.innerWidth||this.document.documentElement.clientWidth))&&!(n.right<=0)))}ngOnInit(){this.loadEventsForLazyMode()}ngOnDestroy(){this.unloadEventsForLazyMode()}ngOnChanges(e){this.render(),"lazy"in e&&(e.lazy.currentValue?this.loadEventsForLazyMode():this.unloadEventsForLazyMode())}}l.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"14.2.12",ngImport:o,type:l,deps:[{token:a},{token:o.NgZone},{token:o.ElementRef},{token:o.Injector}],target:o.\u0275\u0275FactoryTarget.Component}),l.\u0275cmp=o.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"14.2.12",type:l,selector:"circle-progress",inputs:{name:"name",class:"class",backgroundGradient:"backgroundGradient",backgroundColor:"backgroundColor",backgroundGradientStopColor:"backgroundGradientStopColor",backgroundOpacity:"backgroundOpacity",backgroundStroke:"backgroundStroke",backgroundStrokeWidth:"backgroundStrokeWidth",backgroundPadding:"backgroundPadding",radius:"radius",space:"space",percent:"percent",toFixed:"toFixed",maxPercent:"maxPercent",renderOnClick:"renderOnClick",units:"units",unitsFontSize:"unitsFontSize",unitsFontWeight:"unitsFontWeight",unitsColor:"unitsColor",outerStrokeGradient:"outerStrokeGradient",outerStrokeWidth:"outerStrokeWidth",outerStrokeColor:"outerStrokeColor",outerStrokeGradientStopColor:"outerStrokeGradientStopColor",outerStrokeLinecap:"outerStrokeLinecap",innerStrokeColor:"innerStrokeColor",innerStrokeWidth:"innerStrokeWidth",titleFormat:"titleFormat",title:"title",titleColor:"titleColor",titleFontSize:"titleFontSize",titleFontWeight:"titleFontWeight",subtitleFormat:"subtitleFormat",subtitle:"subtitle",subtitleColor:"subtitleColor",subtitleFontSize:"subtitleFontSize",subtitleFontWeight:"subtitleFontWeight",imageSrc:"imageSrc",imageHeight:"imageHeight",imageWidth:"imageWidth",animation:"animation",animateTitle:"animateTitle",animateSubtitle:"animateSubtitle",animationDuration:"animationDuration",showTitle:"showTitle",showSubtitle:"showSubtitle",showUnits:"showUnits",showImage:"showImage",showBackground:"showBackground",showInnerStroke:"showInnerStroke",clockwise:"clockwise",responsive:"responsive",startFromZero:"startFromZero",showZeroOuterStroke:"showZeroOuterStroke",lazy:"lazy",templateOptions:["options","templateOptions"]},outputs:{onClick:"onClick"},usesOnChanges:!0,ngImport:o,template:'\n <svg xmlns="http://www.w3.org/2000/svg" *ngIf="svg"\n [attr.viewBox]="svg.viewBox" preserveAspectRatio="xMidYMid meet"\n [attr.height]="svg.height" [attr.width]="svg.width" (click)="emitClickEvent($event)" [attr.class]="options.class">\n <defs>\n <linearGradient *ngIf="options.outerStrokeGradient" [attr.id]="svg.outerLinearGradient.id">\n <stop offset="5%" [attr.stop-color]="svg.outerLinearGradient.colorStop1" [attr.stop-opacity]="1"/>\n <stop offset="95%" [attr.stop-color]="svg.outerLinearGradient.colorStop2" [attr.stop-opacity]="1"/>\n </linearGradient>\n <radialGradient *ngIf="options.backgroundGradient" [attr.id]="svg.radialGradient.id">\n <stop offset="5%" [attr.stop-color]="svg.radialGradient.colorStop1" [attr.stop-opacity]="1"/>\n <stop offset="95%" [attr.stop-color]="svg.radialGradient.colorStop2" [attr.stop-opacity]="1"/>\n </radialGradient>\n </defs>\n <ng-container *ngIf="options.showBackground">\n <circle *ngIf="!options.backgroundGradient"\n [attr.cx]="svg.backgroundCircle.cx"\n [attr.cy]="svg.backgroundCircle.cy"\n [attr.r]="svg.backgroundCircle.r"\n [attr.fill]="svg.backgroundCircle.fill"\n [attr.fill-opacity]="svg.backgroundCircle.fillOpacity"\n [attr.stroke]="svg.backgroundCircle.stroke"\n [attr.stroke-width]="svg.backgroundCircle.strokeWidth"/>\n <circle *ngIf="options.backgroundGradient"\n [attr.cx]="svg.backgroundCircle.cx"\n [attr.cy]="svg.backgroundCircle.cy"\n [attr.r]="svg.backgroundCircle.r"\n attr.fill="url({{window.location.href}}#{{svg.radialGradient.id}})"\n [attr.fill-opacity]="svg.backgroundCircle.fillOpacity"\n [attr.stroke]="svg.backgroundCircle.stroke"\n [attr.stroke-width]="svg.backgroundCircle.strokeWidth"/>\n </ng-container> \n <circle *ngIf="options.showInnerStroke"\n [attr.cx]="svg.circle.cx"\n [attr.cy]="svg.circle.cy"\n [attr.r]="svg.circle.r"\n [attr.fill]="svg.circle.fill"\n [attr.stroke]="svg.circle.stroke"\n [attr.stroke-width]="svg.circle.strokeWidth"/>\n <ng-container *ngIf="+options.percent!==0 || options.showZeroOuterStroke">\n <path *ngIf="!options.outerStrokeGradient"\n [attr.d]="svg.path.d"\n [attr.stroke]="svg.path.stroke"\n [attr.stroke-width]="svg.path.strokeWidth"\n [attr.stroke-linecap]="svg.path.strokeLinecap"\n [attr.fill]="svg.path.fill"/>\n <path *ngIf="options.outerStrokeGradient"\n [attr.d]="svg.path.d"\n attr.stroke="url({{window.location.href}}#{{svg.outerLinearGradient.id}})"\n [attr.stroke-width]="svg.path.strokeWidth"\n [attr.stroke-linecap]="svg.path.strokeLinecap"\n [attr.fill]="svg.path.fill"/>\n </ng-container>\n <text *ngIf="!options.showImage && (options.showTitle || options.showUnits || options.showSubtitle)"\n alignment-baseline="baseline"\n [attr.x]="svg.circle.cx"\n [attr.y]="svg.circle.cy"\n [attr.text-anchor]="svg.title.textAnchor">\n <ng-container *ngIf="options.showTitle">\n <tspan *ngFor="let tspan of svg.title.tspans"\n [attr.x]="svg.title.x"\n [attr.y]="svg.title.y"\n [attr.dy]="tspan.dy"\n [attr.font-size]="svg.title.fontSize"\n [attr.font-weight]="svg.title.fontWeight"\n [attr.fill]="svg.title.color">{{tspan.span}}</tspan>\n </ng-container>\n <tspan *ngIf="options.showUnits"\n [attr.font-size]="svg.units.fontSize"\n [attr.font-weight]="svg.units.fontWeight"\n [attr.fill]="svg.units.color">{{svg.units.text}}</tspan>\n <ng-container *ngIf="options.showSubtitle">\n <tspan *ngFor="let tspan of svg.subtitle.tspans"\n [attr.x]="svg.subtitle.x"\n [attr.y]="svg.subtitle.y"\n [attr.dy]="tspan.dy"\n [attr.font-size]="svg.subtitle.fontSize"\n [attr.font-weight]="svg.subtitle.fontWeight"\n [attr.fill]="svg.subtitle.color">{{tspan.span}}</tspan>\n </ng-container>\n </text>\n <image *ngIf="options.showImage" preserveAspectRatio="none" \n [attr.height]="svg.image.height"\n [attr.width]="svg.image.width"\n [attr.xlink:href]="svg.image.src"\n [attr.x]="svg.image.x"\n [attr.y]="svg.image.y"\n />\n </svg>\n ',isInline:!0,dependencies:[{kind:"directive",type:s.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:s.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"14.2.12",ngImport:o,type:l,decorators:[{type:t.Component,args:[{selector:"circle-progress",template:'\n <svg xmlns="http://www.w3.org/2000/svg" *ngIf="svg"\n [attr.viewBox]="svg.viewBox" preserveAspectRatio="xMidYMid meet"\n [attr.height]="svg.height" [attr.width]="svg.width" (click)="emitClickEvent($event)" [attr.class]="options.class">\n <defs>\n <linearGradient *ngIf="options.outerStrokeGradient" [attr.id]="svg.outerLinearGradient.id">\n <stop offset="5%" [attr.stop-color]="svg.outerLinearGradient.colorStop1" [attr.stop-opacity]="1"/>\n <stop offset="95%" [attr.stop-color]="svg.outerLinearGradient.colorStop2" [attr.stop-opacity]="1"/>\n </linearGradient>\n <radialGradient *ngIf="options.backgroundGradient" [attr.id]="svg.radialGradient.id">\n <stop offset="5%" [attr.stop-color]="svg.radialGradient.colorStop1" [attr.stop-opacity]="1"/>\n <stop offset="95%" [attr.stop-color]="svg.radialGradient.colorStop2" [attr.stop-opacity]="1"/>\n </radialGradient>\n </defs>\n <ng-container *ngIf="options.showBackground">\n <circle *ngIf="!options.backgroundGradient"\n [attr.cx]="svg.backgroundCircle.cx"\n [attr.cy]="svg.backgroundCircle.cy"\n [attr.r]="svg.backgroundCircle.r"\n [attr.fill]="svg.backgroundCircle.fill"\n [attr.fill-opacity]="svg.backgroundCircle.fillOpacity"\n [attr.stroke]="svg.backgroundCircle.stroke"\n [attr.stroke-width]="svg.backgroundCircle.strokeWidth"/>\n <circle *ngIf="options.backgroundGradient"\n [attr.cx]="svg.backgroundCircle.cx"\n [attr.cy]="svg.backgroundCircle.cy"\n [attr.r]="svg.backgroundCircle.r"\n attr.fill="url({{window.location.href}}#{{svg.radialGradient.id}})"\n [attr.fill-opacity]="svg.backgroundCircle.fillOpacity"\n [attr.stroke]="svg.backgroundCircle.stroke"\n [attr.stroke-width]="svg.backgroundCircle.strokeWidth"/>\n </ng-container> \n <circle *ngIf="options.showInnerStroke"\n [attr.cx]="svg.circle.cx"\n [attr.cy]="svg.circle.cy"\n [attr.r]="svg.circle.r"\n [attr.fill]="svg.circle.fill"\n [attr.stroke]="svg.circle.stroke"\n [attr.stroke-width]="svg.circle.strokeWidth"/>\n <ng-container *ngIf="+options.percent!==0 || options.showZeroOuterStroke">\n <path *ngIf="!options.outerStrokeGradient"\n [attr.d]="svg.path.d"\n [attr.stroke]="svg.path.stroke"\n [attr.stroke-width]="svg.path.strokeWidth"\n [attr.stroke-linecap]="svg.path.strokeLinecap"\n [attr.fill]="svg.path.fill"/>\n <path *ngIf="options.outerStrokeGradient"\n [attr.d]="svg.path.d"\n attr.stroke="url({{window.location.href}}#{{svg.outerLinearGradient.id}})"\n [attr.stroke-width]="svg.path.strokeWidth"\n [attr.stroke-linecap]="svg.path.strokeLinecap"\n [attr.fill]="svg.path.fill"/>\n </ng-container>\n <text *ngIf="!options.showImage && (options.showTitle || options.showUnits || options.showSubtitle)"\n alignment-baseline="baseline"\n [attr.x]="svg.circle.cx"\n [attr.y]="svg.circle.cy"\n [attr.text-anchor]="svg.title.textAnchor">\n <ng-container *ngIf="options.showTitle">\n <tspan *ngFor="let tspan of svg.title.tspans"\n [attr.x]="svg.title.x"\n [attr.y]="svg.title.y"\n [attr.dy]="tspan.dy"\n [attr.font-size]="svg.title.fontSize"\n [attr.font-weight]="svg.title.fontWeight"\n [attr.fill]="svg.title.color">{{tspan.span}}</tspan>\n </ng-container>\n <tspan *ngIf="options.showUnits"\n [attr.font-size]="svg.units.fontSize"\n [attr.font-weight]="svg.units.fontWeight"\n [attr.fill]="svg.units.color">{{svg.units.text}}</tspan>\n <ng-container *ngIf="options.showSubtitle">\n <tspan *ngFor="let tspan of svg.subtitle.tspans"\n [attr.x]="svg.subtitle.x"\n [attr.y]="svg.subtitle.y"\n [attr.dy]="tspan.dy"\n [attr.font-size]="svg.subtitle.fontSize"\n [attr.font-weight]="svg.subtitle.fontWeight"\n [attr.fill]="svg.subtitle.color">{{tspan.span}}</tspan>\n </ng-container>\n </text>\n <image *ngIf="options.showImage" preserveAspectRatio="none" \n [attr.height]="svg.image.height"\n [attr.width]="svg.image.width"\n [attr.xlink:href]="svg.image.src"\n [attr.x]="svg.image.x"\n [attr.y]="svg.image.y"\n />\n </svg>\n '}]}],ctorParameters:function(){return[{type:a},{type:o.NgZone},{type:o.ElementRef},{type:o.Injector}]},propDecorators:{onClick:[{type:t.Output}],name:[{type:t.Input}],class:[{type:t.Input}],backgroundGradient:[{type:t.Input}],backgroundColor:[{type:t.Input}],backgroundGradientStopColor:[{type:t.Input}],backgroundOpacity:[{type:t.Input}],backgroundStroke:[{type:t.Input}],backgroundStrokeWidth:[{type:t.Input}],backgroundPadding:[{type:t.Input}],radius:[{type:t.Input}],space:[{type:t.Input}],percent:[{type:t.Input}],toFixed:[{type:t.Input}],maxPercent:[{type:t.Input}],renderOnClick:[{type:t.Input}],units:[{type:t.Input}],unitsFontSize:[{type:t.Input}],unitsFontWeight:[{type:t.Input}],unitsColor:[{type:t.Input}],outerStrokeGradient:[{type:t.Input}],outerStrokeWidth:[{type:t.Input}],outerStrokeColor:[{type:t.Input}],outerStrokeGradientStopColor:[{type:t.Input}],outerStrokeLinecap:[{type:t.Input}],innerStrokeColor:[{type:t.Input}],innerStrokeWidth:[{type:t.Input}],titleFormat:[{type:t.Input}],title:[{type:t.Input}],titleColor:[{type:t.Input}],titleFontSize:[{type:t.Input}],titleFontWeight:[{type:t.Input}],subtitleFormat:[{type:t.Input}],subtitle:[{type:t.Input}],subtitleColor:[{type:t.Input}],subtitleFontSize:[{type:t.Input}],subtitleFontWeight:[{type:t.Input}],imageSrc:[{type:t.Input}],imageHeight:[{type:t.Input}],imageWidth:[{type:t.Input}],animation:[{type:t.Input}],animateTitle:[{type:t.Input}],animateSubtitle:[{type:t.Input}],animationDuration:[{type:t.Input}],showTitle:[{type:t.Input}],showSubtitle:[{type:t.Input}],showUnits:[{type:t.Input}],showImage:[{type:t.Input}],showBackground:[{type:t.Input}],showInnerStroke:[{type:t.Input}],clockwise:[{type:t.Input}],responsive:[{type:t.Input}],startFromZero:[{type:t.Input}],showZeroOuterStroke:[{type:t.Input}],lazy:[{type:t.Input}],templateOptions:[{type:t.Input,args:["options"]}]}});class u{static forRoot(e={}){return{ngModule:u,providers:[{provide:a,useValue:e}]}}}u.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"14.2.12",ngImport:o,type:u,deps:[],target:o.\u0275\u0275FactoryTarget.NgModule}),u.\u0275mod=o.\u0275\u0275ngDeclareNgModule({minVersion:"14.0.0",version:"14.2.12",ngImport:o,type:u,declarations:[l],imports:[n.CommonModule],exports:[l]}),u.\u0275inj=o.\u0275\u0275ngDeclareInjector({minVersion:"12.0.0",version:"14.2.12",ngImport:o,type:u,imports:[n.CommonModule]}),o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"14.2.12",ngImport:o,type:u,decorators:[{type:t.NgModule,args:[{declarations:[l],imports:[n.CommonModule],exports:[l]}]}]}),e.CircleProgressComponent=l,e.CircleProgressOptions=a,e.NgCircleProgressModule=u})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ngxColorpicker={},e.ng.core,e.ng.common)}(this,(function(e,t,n){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i,o=r(t),s=r(n);!function(e){e[e.HEX=0]="HEX",e[e.RGBA=1]="RGBA",e[e.HSLA=2]="HSLA",e[e.CMYK=3]="CMYK"}(i||(i={}));class a{r;g;b;a;constructor(e,t,n,r){this.r=e,this.g=t,this.b=n,this.a=r}}class l{h;s;v;a;constructor(e,t,n,r){this.h=e,this.s=t,this.v=n,this.a=r}}class u{h;s;l;a;constructor(e,t,n,r){this.h=e,this.s=t,this.l=n,this.a=r}}class c{c;m;y;k;a;constructor(e,t,n,r,i=1){this.c=e,this.m=t,this.y=n,this.k=r,this.a=i}}class d{rg;text;newValue=new t.EventEmitter;inputChange(e){const t=e.target.value;if(void 0===this.rg)this.newValue.emit(t);else{const e=parseFloat(t);this.newValue.emit({v:e,rg:this.rg})}}static"\u0275fac"=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:d,deps:[],target:o.\u0275\u0275FactoryTarget.Directive});static"\u0275dir"=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"17.0.2",type:d,selector:"[text]",inputs:{rg:"rg",text:"text"},outputs:{newValue:"newValue"},host:{listeners:{input:"inputChange($event)"}},ngImport:o})}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:d,decorators:[{type:t.Directive,args:[{selector:"[text]"}]}],propDecorators:{rg:[{type:t.Input}],text:[{type:t.Input}],newValue:[{type:t.Output}],inputChange:[{type:t.HostListener,args:["input",["$event"]]}]}});class h{elRef;listenerMove;listenerStop;rgX;rgY;slider;dragEnd=new t.EventEmitter;dragStart=new t.EventEmitter;newValue=new t.EventEmitter;mouseDown(e){this.start(e)}touchStart(e){this.start(e)}constructor(e){this.elRef=e,this.listenerMove=e=>this.move(e),this.listenerStop=()=>this.stop()}move(e){e.preventDefault(),this.setCursor(e)}start(e){this.setCursor(e),e.stopPropagation(),document.addEventListener("mouseup",this.listenerStop),document.addEventListener("touchend",this.listenerStop),document.addEventListener("mousemove",this.listenerMove),document.addEventListener("touchmove",this.listenerMove),this.dragStart.emit()}stop(){document.removeEventListener("mouseup",this.listenerStop),document.removeEventListener("touchend",this.listenerStop),document.removeEventListener("mousemove",this.listenerMove),document.removeEventListener("touchmove",this.listenerMove),this.dragEnd.emit()}getX(e){const t=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==e.pageX?e.pageX:e.touches[0].pageX)-t.left-window.pageXOffset}getY(e){const t=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==e.pageY?e.pageY:e.touches[0].pageY)-t.top-window.pageYOffset}setCursor(e){const t=this.elRef.nativeElement.offsetWidth,n=this.elRef.nativeElement.offsetHeight,r=Math.max(0,Math.min(this.getX(e),t)),i=Math.max(0,Math.min(this.getY(e),n));void 0!==this.rgX&&void 0!==this.rgY?this.newValue.emit({s:r/t,v:1-i/n,rgX:this.rgX,rgY:this.rgY}):void 0===this.rgX&&void 0!==this.rgY?this.newValue.emit({v:i/n,rgY:this.rgY}):void 0!==this.rgX&&void 0===this.rgY&&this.newValue.emit({v:r/t,rgX:this.rgX})}static"\u0275fac"=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:h,deps:[{token:o.ElementRef}],target:o.\u0275\u0275FactoryTarget.Directive});static"\u0275dir"=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"17.0.2",type:h,selector:"[slider]",inputs:{rgX:"rgX",rgY:"rgY",slider:"slider"},outputs:{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"},host:{listeners:{mousedown:"mouseDown($event)",touchstart:"touchStart($event)"}},ngImport:o})}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:h,decorators:[{type:t.Directive,args:[{selector:"[slider]"}]}],ctorParameters:()=>[{type:o.ElementRef}],propDecorators:{rgX:[{type:t.Input}],rgY:[{type:t.Input}],slider:[{type:t.Input}],dragEnd:[{type:t.Output}],dragStart:[{type:t.Output}],newValue:[{type:t.Output}],mouseDown:[{type:t.HostListener,args:["mousedown",["$event"]]}],touchStart:[{type:t.HostListener,args:["touchstart",["$event"]]}]}});class p{h;s;v;a;constructor(e,t,n,r){this.h=e,this.s=t,this.v=n,this.a=r}}class f{h;s;v;a;constructor(e,t,n,r){this.h=e,this.s=t,this.v=n,this.a=r}}class m{active=null;setActive(e){this.active&&this.active!==e&&"inline"!==this.active.cpDialogDisplay&&this.active.closeDialog(),this.active=e}hsva2hsla(e){const t=e.h,n=e.s,r=e.v,i=e.a;if(0===r)return new u(t,0,0,i);if(0===n&&1===r)return new u(t,1,1,i);{const e=r*(2-n)/2;return new u(t,r*n/(1-Math.abs(2*e-1)),e,i)}}hsla2hsva(e){const t=Math.min(e.h,1),n=Math.min(e.s,1),r=Math.min(e.l,1),i=Math.min(e.a,1);if(0===r)return new l(t,0,0,i);{const e=r+n*(1-Math.abs(2*r-1))/2;return new l(t,2*(e-r)/e,e,i)}}hsvaToRgba(e){let t,n,r;const i=e.h,o=e.s,s=e.v,l=e.a,u=Math.floor(6*i),c=6*i-u,d=s*(1-o),h=s*(1-c*o),p=s*(1-(1-c)*o);switch(u%6){case 0:t=s,n=p,r=d;break;case 1:t=h,n=s,r=d;break;case 2:t=d,n=s,r=p;break;case 3:t=d,n=h,r=s;break;case 4:t=p,n=d,r=s;break;case 5:t=s,n=d,r=h;break;default:t=0,n=0,r=0}return new a(t,n,r,l)}cmykToRgb(e){const t=(1-e.c)*(1-e.k),n=(1-e.m)*(1-e.k),r=(1-e.y)*(1-e.k);return new a(t,n,r,e.a)}rgbaToCmyk(e){const t=1-Math.max(e.r,e.g,e.b);if(1===t)return new c(0,0,0,1,e.a);{const n=(1-e.r-t)/(1-t),r=(1-e.g-t)/(1-t),i=(1-e.b-t)/(1-t);return new c(n,r,i,t,e.a)}}rgbaToHsva(e){let t,n;const r=Math.min(e.r,1),i=Math.min(e.g,1),o=Math.min(e.b,1),s=Math.min(e.a,1),a=Math.max(r,i,o),u=Math.min(r,i,o),c=a,d=a-u;if(n=0===a?0:d/a,a===u)t=0;else{switch(a){case r:t=(i-o)/d+(i<o?6:0);break;case i:t=(o-r)/d+2;break;case o:t=(r-i)/d+4;break;default:t=0}t/=6}return new l(t,n,c,s)}rgbaToHex(e,t){let n="#"+(1<<24|e.r<<16|e.g<<8|e.b).toString(16).substr(1);return t&&(n+=(256|Math.round(255*e.a)).toString(16).substr(1)),n}normalizeCMYK(e){return new c(e.c/100,e.m/100,e.y/100,e.k/100,e.a)}denormalizeCMYK(e){return new c(Math.floor(100*e.c),Math.floor(100*e.m),Math.floor(100*e.y),Math.floor(100*e.k),e.a)}denormalizeRGBA(e){return new a(Math.round(255*e.r),Math.round(255*e.g),Math.round(255*e.b),e.a)}stringToHsva(e="",t=!1){let n=null;e=(e||"").toLowerCase();const r=[{re:/(rgb)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*%?,\s*(\d{1,3})\s*%?(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return new a(parseInt(e[2],10)/255,parseInt(e[3],10)/255,parseInt(e[4],10)/255,isNaN(parseFloat(e[5]))?1:parseFloat(e[5]))}},{re:/(hsl)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return new u(parseInt(e[2],10)/360,parseInt(e[3],10)/100,parseInt(e[4],10)/100,isNaN(parseFloat(e[5]))?1:parseFloat(e[5]))}}];t?r.push({re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/,parse:function(e){return new a(parseInt(e[1],16)/255,parseInt(e[2],16)/255,parseInt(e[3],16)/255,parseInt(e[4]||"FF",16)/255)}}):r.push({re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,parse:function(e){return new a(parseInt(e[1],16)/255,parseInt(e[2],16)/255,parseInt(e[3],16)/255,1)}}),r.push({re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,parse:function(e){return new a(parseInt(e[1]+e[1],16)/255,parseInt(e[2]+e[2],16)/255,parseInt(e[3]+e[3],16)/255,1)}});for(const t in r)if(r.hasOwnProperty(t)){const i=r[t],o=i.re.exec(e),s=o&&i.parse(o);if(s)return s instanceof a?n=this.rgbaToHsva(s):s instanceof u&&(n=this.hsla2hsva(s)),n}return n}outputFormat(e,t,n){switch("auto"===t&&(t=e.a<1?"rgba":"hex"),t){case"hsla":const t=this.hsva2hsla(e),r=new u(Math.round(360*t.h),Math.round(100*t.s),Math.round(100*t.l),Math.round(100*t.a)/100);return e.a<1||"always"===n?"hsla("+r.h+","+r.s+"%,"+r.l+"%,"+r.a+")":"hsl("+r.h+","+r.s+"%,"+r.l+"%)";case"rgba":const i=this.denormalizeRGBA(this.hsvaToRgba(e));return e.a<1||"always"===n?"rgba("+i.r+","+i.g+","+i.b+","+Math.round(100*i.a)/100+")":"rgb("+i.r+","+i.g+","+i.b+")";default:const o="always"===n||"forced"===n;return this.rgbaToHex(this.denormalizeRGBA(this.hsvaToRgba(e)),o)}}static"\u0275fac"=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:m,deps:[],target:o.\u0275\u0275FactoryTarget.Injectable});static"\u0275prov"=o.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:m})}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:m,decorators:[{type:t.Injectable}]});const g="undefined"!=typeof window&&"ontouchstart"in window;class v{ngZone;elRef;cdRef;document;platformId;service;isIE10=!1;cmyk;hsva;width;height;cmykColor;outputColor;initialColor;fallbackColor;listenerResize;listenerMouseDown;directiveInstance;sliderH;sliderDimMax;directiveElementRef;dialogArrowSize=10;dialogArrowOffset=15;dialogInputFields=[i.HEX,i.RGBA,i.HSLA,i.CMYK];useRootViewContainer=!1;show;hidden;top;left;position;format;slider;hexText;hexAlpha;cmykText;hslaText;rgbaText;arrowTop;selectedColor;hueSliderColor;alphaSliderColor;cpWidth;cpHeight;cpColorMode;cpCmykEnabled;cpAlphaChannel;cpOutputFormat;cpDisableInput;cpDialogDisplay;cpIgnoredElements;cpSaveClickOutside;cpCloseClickOutside;cpPosition;cpUsePosition;cpPositionOffset;cpOKButton;cpOKButtonText;cpOKButtonClass;cpCancelButton;cpCancelButtonText;cpCancelButtonClass;cpEyeDropper;eyeDropperSupported;cpPresetLabel;cpPresetColors;cpPresetColorsClass;cpMaxPresetColorsLength;cpPresetEmptyMessage;cpPresetEmptyMessageClass;cpAddColorButton;cpAddColorButtonText;cpAddColorButtonClass;cpRemoveColorButtonClass;cpArrowPosition;cpTriggerElement;cpExtraTemplate;dialogElement;hueSlider;alphaSlider;handleEsc(e){this.show&&"popup"===this.cpDialogDisplay&&this.onCancelColor(e)}handleEnter(e){this.show&&"popup"===this.cpDialogDisplay&&this.onAcceptColor(e)}constructor(e,t,r,i,o,s){this.ngZone=e,this.elRef=t,this.cdRef=r,this.document=i,this.platformId=o,this.service=s,this.eyeDropperSupported=n.isPlatformBrowser(this.platformId)&&"EyeDropper"in this.document.defaultView}ngOnInit(){this.slider=new p(0,0,0,0);const e=this.hueSlider.nativeElement.offsetWidth||140,t=this.alphaSlider.nativeElement.offsetWidth||140;this.sliderDimMax=new f(e,this.cpWidth,130,t),this.cpCmykEnabled?this.format=i.CMYK:"rgba"===this.cpOutputFormat?this.format=i.RGBA:"hsla"===this.cpOutputFormat?this.format=i.HSLA:this.format=i.HEX,this.listenerMouseDown=e=>{this.onMouseDown(e)},this.listenerResize=()=>{this.onResize()},this.openDialog(this.initialColor,!1)}ngOnDestroy(){this.closeDialog()}ngAfterViewInit(){if(230!==this.cpWidth||"inline"===this.cpDialogDisplay){const e=this.hueSlider.nativeElement.offsetWidth||140,t=this.alphaSlider.nativeElement.offsetWidth||140;this.sliderDimMax=new f(e,this.cpWidth,130,t),this.updateColorPicker(!1),this.cdRef.detectChanges()}}openDialog(e,t=!0){this.service.setActive(this),this.width||(this.cpWidth=this.directiveElementRef.nativeElement.offsetWidth),this.height||(this.height=320),this.setInitialColor(e),this.setColorFromString(e,t),this.openColorPicker()}closeDialog(){this.closeColorPicker()}setupDialog(e,t,n,r,i,o,s,a,l,u,c,d,h,p,f,m,g,v,y,_,b,w,x,k,S,T,E,D,C,M,A,I,L,O,N,R,P,F){this.setInitialColor(n),this.setColorMode(a),this.isIE10=10===function(){let e="";"undefined"!=typeof navigator&&(e=navigator.userAgent.toLowerCase());const t=e.indexOf("msie ");return t>0&&parseInt(e.substring(t+5,e.indexOf(".",t)),10)}(),this.directiveInstance=e,this.directiveElementRef=t,this.cpDisableInput=d,this.cpCmykEnabled=l,this.cpAlphaChannel=u,this.cpOutputFormat=c,this.cpDialogDisplay=o,this.cpIgnoredElements=h,this.cpSaveClickOutside=p,this.cpCloseClickOutside=f,this.useRootViewContainer=m,this.width=this.cpWidth=parseInt(r,10),this.height=this.cpHeight=parseInt(i,10),this.cpPosition=g,this.cpPositionOffset=parseInt(v,10),this.cpOKButton=T,this.cpOKButtonText=D,this.cpOKButtonClass=E,this.cpCancelButton=C,this.cpCancelButtonText=A,this.cpCancelButtonClass=M,this.cpEyeDropper=R,this.fallbackColor=s||"#fff",this.setPresetConfig(_,b),this.cpPresetColorsClass=w,this.cpMaxPresetColorsLength=x,this.cpPresetEmptyMessage=k,this.cpPresetEmptyMessageClass=S,this.cpAddColorButton=I,this.cpAddColorButtonText=O,this.cpAddColorButtonClass=L,this.cpRemoveColorButtonClass=N,this.cpTriggerElement=P,this.cpExtraTemplate=F,y||(this.dialogArrowOffset=0),"inline"===o&&(this.dialogArrowSize=0,this.dialogArrowOffset=0),"hex"===c&&"always"!==u&&"forced"!==u&&(this.cpAlphaChannel="disabled")}setColorMode(e){switch(e.toString().toUpperCase()){case"1":case"C":case"COLOR":default:this.cpColorMode=1;break;case"2":case"G":case"GRAYSCALE":this.cpColorMode=2;break;case"3":case"P":case"PRESETS":this.cpColorMode=3}}setInitialColor(e){this.initialColor=e}setPresetConfig(e,t){this.cpPresetLabel=e,this.cpPresetColors=t}setColorFromString(e,t=!0,n=!0){let r;"always"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel?(r=this.service.stringToHsva(e,!0),r||this.hsva||(r=this.service.stringToHsva(e,!1))):r=this.service.stringToHsva(e,!1),r||this.hsva||(r=this.service.stringToHsva(this.fallbackColor,!1)),r&&(this.hsva=r,this.sliderH=this.hsva.h,"hex"===this.cpOutputFormat&&"disabled"===this.cpAlphaChannel&&(this.hsva.a=1),this.updateColorPicker(t,n))}onResize(){"fixed"===this.position?this.setDialogPosition():"inline"!==this.cpDialogDisplay&&this.closeColorPicker()}onDragEnd(e){this.directiveInstance.sliderDragEnd({slider:e,color:this.outputColor})}onDragStart(e){this.directiveInstance.sliderDragStart({slider:e,color:this.outputColor})}onMouseDown(e){!this.show||this.isIE10||"popup"!==this.cpDialogDisplay||e.target===this.directiveElementRef.nativeElement||this.isDescendant(this.elRef.nativeElement,e.target)||this.isDescendant(this.directiveElementRef.nativeElement,e.target)||0!==this.cpIgnoredElements.filter((t=>t===e.target)).length||this.ngZone.run((()=>{this.cpSaveClickOutside?this.directiveInstance.colorSelected(this.outputColor):(this.hsva=null,this.setColorFromString(this.initialColor,!1),this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor),this.directiveInstance.colorCanceled()),this.cpCloseClickOutside&&this.closeColorPicker()}))}onAcceptColor(e){e.stopPropagation(),this.outputColor&&this.directiveInstance.colorSelected(this.outputColor),"popup"===this.cpDialogDisplay&&this.closeColorPicker()}onCancelColor(e){this.hsva=null,e.stopPropagation(),this.directiveInstance.colorCanceled(),this.setColorFromString(this.initialColor,!0),"popup"===this.cpDialogDisplay&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor,!0),this.closeColorPicker())}onEyeDropper(){if(!this.eyeDropperSupported)return;(new window.EyeDropper).open().then((e=>{this.setColorFromString(e.sRGBHex,!0)}))}onFormatToggle(e){const t=this.dialogInputFields.length-(this.cpCmykEnabled?0:1),n=((this.dialogInputFields.indexOf(this.format)+e)%t+t)%t;this.format=this.dialogInputFields[n]}onColorChange(e){this.hsva.s=e.s/e.rgX,this.hsva.v=e.v/e.rgY,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"lightness",value:this.hsva.v,color:this.outputColor}),this.directiveInstance.sliderChanged({slider:"saturation",value:this.hsva.s,color:this.outputColor})}onHueChange(e){this.hsva.h=e.v/e.rgX,this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"hue",value:this.hsva.h,color:this.outputColor})}onValueChange(e){this.hsva.v=e.v/e.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"value",value:this.hsva.v,color:this.outputColor})}onAlphaChange(e){this.hsva.a=e.v/e.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"alpha",value:this.hsva.a,color:this.outputColor})}onHexInput(e){if(null===e)this.updateColorPicker();else{e&&"#"!==e[0]&&(e="#"+e);let t=/^#([a-f0-9]{3}|[a-f0-9]{6})$/gi;"always"===this.cpAlphaChannel&&(t=/^#([a-f0-9]{3}|[a-f0-9]{6}|[a-f0-9]{8})$/gi);const n=t.test(e);n&&(e.length<5&&(e="#"+e.substring(1).split("").map((e=>e+e)).join("")),"forced"===this.cpAlphaChannel&&(e+=Math.round(255*this.hsva.a).toString(16)),this.setColorFromString(e,!0,!1)),this.directiveInstance.inputChanged({input:"hex",valid:n,value:e,color:this.outputColor})}}onRedInput(e){const t=this.service.hsvaToRgba(this.hsva),n=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;n&&(t.r=e.v/e.rg,this.hsva=this.service.rgbaToHsva(t),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"red",valid:n,value:t.r,color:this.outputColor})}onBlueInput(e){const t=this.service.hsvaToRgba(this.hsva),n=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;n&&(t.b=e.v/e.rg,this.hsva=this.service.rgbaToHsva(t),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"blue",valid:n,value:t.b,color:this.outputColor})}onGreenInput(e){const t=this.service.hsvaToRgba(this.hsva),n=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;n&&(t.g=e.v/e.rg,this.hsva=this.service.rgbaToHsva(t),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"green",valid:n,value:t.g,color:this.outputColor})}onHueInput(e){const t=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;t&&(this.hsva.h=e.v/e.rg,this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"hue",valid:t,value:this.hsva.h,color:this.outputColor})}onValueInput(e){const t=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;t&&(this.hsva.v=e.v/e.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"value",valid:t,value:this.hsva.v,color:this.outputColor})}onAlphaInput(e){const t=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;t&&(this.hsva.a=e.v/e.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"alpha",valid:t,value:this.hsva.a,color:this.outputColor})}onLightnessInput(e){const t=this.service.hsva2hsla(this.hsva),n=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;n&&(t.l=e.v/e.rg,this.hsva=this.service.hsla2hsva(t),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"lightness",valid:n,value:t.l,color:this.outputColor})}onSaturationInput(e){const t=this.service.hsva2hsla(this.hsva),n=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;n&&(t.s=e.v/e.rg,this.hsva=this.service.hsla2hsva(t),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"saturation",valid:n,value:t.s,color:this.outputColor})}onCyanInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.c=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"cyan",valid:!0,value:this.cmyk.c,color:this.outputColor})}onMagentaInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.m=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"magenta",valid:!0,value:this.cmyk.m,color:this.outputColor})}onYellowInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.y=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"yellow",valid:!0,value:this.cmyk.y,color:this.outputColor})}onBlackInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.k=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"black",valid:!0,value:this.cmyk.k,color:this.outputColor})}onAddPresetColor(e,t){e.stopPropagation(),this.cpPresetColors.filter((e=>e===t)).length||(this.cpPresetColors=this.cpPresetColors.concat(t),this.directiveInstance.presetColorsChanged(this.cpPresetColors))}onRemovePresetColor(e,t){e.stopPropagation(),this.cpPresetColors=this.cpPresetColors.filter((e=>e!==t)),this.directiveInstance.presetColorsChanged(this.cpPresetColors)}openColorPicker(){this.show||(this.show=!0,this.hidden=!0,setTimeout((()=>{this.hidden=!1,this.setDialogPosition(),this.cdRef.detectChanges()}),0),this.directiveInstance.stateChanged(!0),this.isIE10||this.ngZone.runOutsideAngular((()=>{g?document.addEventListener("touchstart",this.listenerMouseDown):document.addEventListener("mousedown",this.listenerMouseDown)})),window.addEventListener("resize",this.listenerResize))}closeColorPicker(){this.show&&(this.show=!1,this.directiveInstance.stateChanged(!1),this.isIE10||(g?document.removeEventListener("touchstart",this.listenerMouseDown):document.removeEventListener("mousedown",this.listenerMouseDown)),window.removeEventListener("resize",this.listenerResize),this.cdRef.destroyed||this.cdRef.detectChanges())}updateColorPicker(e=!0,t=!0,n=!1){if(this.sliderDimMax){let r,o,s;2===this.cpColorMode&&(this.hsva.s=0);const d=this.outputColor;if(o=this.service.hsva2hsla(this.hsva),this.cpCmykEnabled?(n?(s=this.service.cmykToRgb(this.service.normalizeCMYK(this.cmyk)),this.hsva=this.service.rgbaToHsva(s)):(s=this.service.hsvaToRgba(this.hsva),this.cmyk=this.service.denormalizeCMYK(this.service.rgbaToCmyk(s))),s=this.service.denormalizeRGBA(s),this.sliderH=this.hsva.h):s=this.service.denormalizeRGBA(this.service.hsvaToRgba(this.hsva)),r=this.service.denormalizeRGBA(this.service.hsvaToRgba(new l(this.sliderH||this.hsva.h,1,1,1))),t){this.hslaText=new u(Math.round(360*o.h),Math.round(100*o.s),Math.round(100*o.l),Math.round(100*o.a)/100),this.rgbaText=new a(s.r,s.g,s.b,Math.round(100*s.a)/100),this.cpCmykEnabled&&(this.cmykText=new c(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k,Math.round(100*this.cmyk.a)/100));const e="always"===this.cpAlphaChannel;this.hexText=this.service.rgbaToHex(s,e),this.hexAlpha=this.rgbaText.a}if("auto"===this.cpOutputFormat&&this.format!==i.RGBA&&this.format!==i.CMYK&&this.format!==i.HSLA&&this.hsva.a<1&&(this.format=this.hsva.a<1?i.RGBA:i.HEX),this.hueSliderColor="rgb("+r.r+","+r.g+","+r.b+")",this.alphaSliderColor="rgb("+s.r+","+s.g+","+s.b+")",this.outputColor=this.service.outputFormat(this.hsva,this.cpOutputFormat,this.cpAlphaChannel),this.selectedColor=this.service.outputFormat(this.hsva,"rgba",null),this.format!==i.CMYK)this.cmykColor="";else if("always"===this.cpAlphaChannel||"enabled"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel){const e=Math.round(100*this.cmyk.a)/100;this.cmykColor=`cmyka(${this.cmyk.c},${this.cmyk.m},${this.cmyk.y},${this.cmyk.k},${e})`}else this.cmykColor=`cmyk(${this.cmyk.c},${this.cmyk.m},${this.cmyk.y},${this.cmyk.k})`;this.slider=new p((this.sliderH||this.hsva.h)*this.sliderDimMax.h-8,this.hsva.s*this.sliderDimMax.s-8,(1-this.hsva.v)*this.sliderDimMax.v-8,this.hsva.a*this.sliderDimMax.a-8),e&&d!==this.outputColor&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.outputColor))}}setDialogPosition(){if("inline"===this.cpDialogDisplay)this.position="relative";else{let e,t="static",n="",r=null,i=null,o=this.directiveElementRef.nativeElement.parentNode;const s=this.dialogElement.nativeElement.offsetHeight;for(;null!==o&&"HTML"!==o.tagName;){if(e=window.getComputedStyle(o),t=e.getPropertyValue("position"),n=e.getPropertyValue("transform"),"static"!==t&&null===r&&(r=o),n&&"none"!==n&&null===i&&(i=o),"fixed"===t){r=i;break}o=o.parentNode}const a=this.createDialogBox(this.directiveElementRef.nativeElement,"fixed"!==t);if(this.useRootViewContainer||"fixed"===t&&(!r||r instanceof HTMLUnknownElement))this.top=a.top,this.left=a.left;else{null===r&&(r=o);const e=this.createDialogBox(r,"fixed"!==t);this.top=a.top-e.top,this.left=a.left-e.left}"fixed"===t&&(this.position="fixed");let l=this.cpPosition;const u=this.dialogElement.nativeElement.getBoundingClientRect();if("auto"===this.cpPosition){l=function(e,t){let n="right",r="bottom";const{height:i,width:o}=e,{top:s,left:a}=t,l=s+t.height,u=a+t.width,c=s-i<0,d=l+i>(window.innerHeight||document.documentElement.clientHeight),h=a-o<0,p=u+o>(window.innerWidth||document.documentElement.clientWidth);if(d&&(r="top"),c&&(r="bottom"),h&&(n="right"),p&&(n="left"),c&&d&&h&&p)return["left","right","top","bottom"].reduce(((t,n)=>e[t]>e[n]?t:n));return h&&p?c?"bottom":d||s>l?"top":"bottom":c&&d?h?"right":p||a>u?"left":"right":`${r}-${n}`}(u,this.cpTriggerElement.nativeElement.getBoundingClientRect())}switch(this.arrowTop="top"===l?s-1:void 0,this.cpArrowPosition=void 0,l){case"top":this.top-=s+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*a.width-this.dialogArrowOffset;break;case"bottom":this.top+=a.height+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*a.width-this.dialogArrowOffset;break;case"top-left":case"left-top":this.top-=s-a.height+a.height*this.cpPositionOffset/100,this.left-=this.cpWidth+this.dialogArrowSize-2-this.dialogArrowOffset;break;case"top-right":case"right-top":this.top-=s-a.height+a.height*this.cpPositionOffset/100,this.left+=a.width+this.dialogArrowSize-2-this.dialogArrowOffset;break;case"left":case"bottom-left":case"left-bottom":this.top+=a.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left-=this.cpWidth+this.dialogArrowSize-2;break;default:this.top+=a.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left+=a.width+this.dialogArrowSize-2}const c=window.innerHeight,d=window.innerWidth,h=this.elRef.nativeElement.getBoundingClientRect();this.top+u.height>c&&(this.top=c-u.height,this.cpArrowPosition=h.x/2-20);this.left+u.width>d&&(this.left=d-u.width,this.cpArrowPosition=h.x/2-20),this.cpUsePosition=l}}isDescendant(e,t){let n=t.parentNode;for(;null!==n;){if(n===e)return!0;n=n.parentNode}return!1}createDialogBox(e,t){const{top:n,left:r}=e.getBoundingClientRect();return{top:n+(t?window.pageYOffset:0),left:r+(t?window.pageXOffset:0),width:e.offsetWidth,height:e.offsetHeight}}static"\u0275fac"=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:v,deps:[{token:o.NgZone},{token:o.ElementRef},{token:o.ChangeDetectorRef},{token:n.DOCUMENT},{token:t.PLATFORM_ID},{token:m}],target:o.\u0275\u0275FactoryTarget.Component});static"\u0275cmp"=o.\u0275\u0275ngDeclareComponent({minVersion:"14.0.0",version:"17.0.2",type:v,selector:"color-picker",host:{listeners:{"document:keyup.esc":"handleEsc($event)","document:keyup.enter":"handleEnter($event)"}},viewQueries:[{propertyName:"dialogElement",first:!0,predicate:["dialogPopup"],descendants:!0,static:!0},{propertyName:"hueSlider",first:!0,predicate:["hueSlider"],descendants:!0,static:!0},{propertyName:"alphaSlider",first:!0,predicate:["alphaSlider"],descendants:!0,static:!0}],ngImport:o,template:'<div #dialogPopup class="color-picker" [class.open]="show" [style.display]="!show ? \'none\' : \'block\'" [style.visibility]="hidden ? \'hidden\' : \'visible\'" [style.top.px]="top" [style.left.px]="left" [style.position]="position" [style.height.px]="cpHeight" [style.width.px]="cpWidth" (click)="$event.stopPropagation()">\n <div *ngIf="cpDialogDisplay === \'popup\'" [style.left]="cpArrowPosition" class="arrow arrow-{{cpUsePosition}}" [style.top.px]="arrowTop"></div>\n\n <div *ngIf="(cpColorMode ||\xa01) === 1" class="saturation-lightness" [slider] [rgX]="1" [rgY]="1" [style.background-color]="hueSliderColor" (newValue)="onColorChange($event)" (dragStart)="onDragStart(\'saturation-lightness\')" (dragEnd)="onDragEnd(\'saturation-lightness\')">\n <div class="cursor" [style.top.px]="slider?.v" [style.left.px]="slider?.s"></div>\n </div>\n\n <div class="hue-alpha box">\n <div class="left">\n <div class="selected-color-background"></div>\n\n <div class="selected-color" [style.background-color]="selectedColor" [style.cursor]="eyeDropperSupported && cpEyeDropper ? \'pointer\' : null" (click)="eyeDropperSupported && cpEyeDropper && onEyeDropper()">\n <svg *ngIf="eyeDropperSupported && cpEyeDropper" class="eyedropper-icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M17.66 5.41l.92.92-2.69 2.69-.92-.92 2.69-2.69M17.67 3c-.26 0-.51.1-.71.29l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42l-2.34-2.34c-.2-.19-.45-.29-.7-.29zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z"/></svg>\n </div>\n\n <button *ngIf="cpAddColorButton" type="button" class="{{cpAddColorButtonClass}}" [disabled]="cpPresetColors && cpPresetColors.length >= cpMaxPresetColorsLength" (click)="onAddPresetColor($event, selectedColor)">\n {{cpAddColorButtonText}}\n </button>\n </div>\n\n <div class="right">\n <div *ngIf="cpAlphaChannel===\'disabled\'" style="height: 16px;"></div>\n\n <div #hueSlider class="hue" [slider] [rgX]="1" [style.display]="(cpColorMode ||\xa01) === 1 ? \'block\' : \'none\'" (newValue)="onHueChange($event)" (dragStart)="onDragStart(\'hue\')" (dragEnd)="onDragEnd(\'hue\')">\n <div class="cursor" [style.left.px]="slider?.h"></div>\n </div>\n\n <div #valueSlider class="value" [slider] [rgX]="1" [style.display]="(cpColorMode ||\xa01) === 2 ? \'block\': \'none\'" (newValue)="onValueChange($event)" (dragStart)="onDragStart(\'value\')" (dragEnd)="onDragEnd(\'value\')">\n <div class="cursor" [style.right.px]="slider?.v"></div>\n </div>\n\n <div #alphaSlider class="alpha" [slider] [rgX]="1" [style.display]="cpAlphaChannel === \'disabled\' ? \'none\' : \'block\'" [style.background-color]="alphaSliderColor" (newValue)="onAlphaChange($event)" (dragStart)="onDragStart(\'alpha\')" (dragEnd)="onDragEnd(\'alpha\')">\n <div class="cursor" [style.left.px]="slider?.a"></div>\n </div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1" class="cmyk-text" [style.display]="format !== 3 ? \'none\' : \'block\'">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.c" (keyup.enter)="onAcceptColor($event)" (newValue)="onCyanInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.m" (keyup.enter)="onAcceptColor($event)" (newValue)="onMagentaInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.y" (keyup.enter)="onAcceptColor($event)" (newValue)="onYellowInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.k" (keyup.enter)="onAcceptColor($event)" (newValue)="onBlackInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="cmykText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>C</div><div>M</div><div>Y</div><div>K</div><div *ngIf="cpAlphaChannel!==\'disabled\'" >A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1 " class="hsla-text" [style.display]="format !== 2 ? \'none\' : \'block\'">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="360" [text] [rg]="360" [value]="hslaText?.h" (keyup.enter)="onAcceptColor($event)" (newValue)="onHueInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.s" (keyup.enter)="onAcceptColor($event)" (newValue)="onSaturationInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.l" (keyup.enter)="onAcceptColor($event)" (newValue)="onLightnessInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hslaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>H</div><div>S</div><div>L</div><div *ngIf="cpAlphaChannel!==\'disabled\'">A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1 " [style.display]="format !== 1 ? \'none\' : \'block\'" class="rgba-text">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.r" (keyup.enter)="onAcceptColor($event)" (newValue)="onRedInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.g" (keyup.enter)="onAcceptColor($event)" (newValue)="onGreenInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.b" (keyup.enter)="onAcceptColor($event)" (newValue)="onBlueInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="rgbaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>R</div><div>G</div><div>B</div><div *ngIf="cpAlphaChannel!==\'disabled\'" >A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1" class="hex-text" [class.hex-alpha]="cpAlphaChannel===\'forced\'"\n [style.display]="format !== 0 ? \'none\' : \'block\'">\n <div class="box">\n <input [text] [value]="hexText" (blur)="onHexInput(null)" (keyup.enter)="onAcceptColor($event)" (newValue)="onHexInput($event)"/>\n <input *ngIf="cpAlphaChannel===\'forced\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hexAlpha" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)"/>\n </div>\n\n <div class="box">\n <div>Hex</div>\n <div *ngIf="cpAlphaChannel===\'forced\'">A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 2" class="value-text">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.l" (keyup.enter)="onAcceptColor($event)" (newValue)="onValueInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hslaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>V</div><div>A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1" class="type-policy">\n <span class="type-policy-arrow" (click)="onFormatToggle(-1)"></span>\n <span class="type-policy-arrow" (click)="onFormatToggle(1)"></span>\n </div>\n\n <div *ngIf="cpPresetColors?.length || cpAddColorButton" class="preset-area">\n <hr>\n\n <div class="preset-label">{{cpPresetLabel}}</div>\n\n <div *ngIf="cpPresetColors?.length" class="{{cpPresetColorsClass}}">\n <div *ngFor="let color of cpPresetColors" class="preset-color" [style.backgroundColor]="color" (click)="setColorFromString(color)">\n <span *ngIf="cpAddColorButton" class="{{cpRemoveColorButtonClass}}" (click)="onRemovePresetColor($event, color)"></span>\n </div>\n </div>\n\n <div *ngIf="!cpPresetColors?.length && cpAddColorButton" class="{{cpPresetEmptyMessageClass}}">{{cpPresetEmptyMessage}}</div>\n </div>\n\n <div *ngIf="cpOKButton || cpCancelButton" class="button-area">\n <button *ngIf="cpCancelButton" type="button" class="{{cpCancelButtonClass}}" (click)="onCancelColor($event)">{{cpCancelButtonText}}</button>\n\n <button *ngIf="cpOKButton" type="button" class="{{cpOKButtonClass}}" (click)="onAcceptColor($event)">{{cpOKButtonText}}</button>\n </div>\n\n <div class="extra-template" *ngIf="cpExtraTemplate">\n <ng-container *ngTemplateOutlet="cpExtraTemplate"></ng-container>\n </div>\n</div>\n',styles:['.color-picker{position:absolute;z-index:1000;width:230px;height:auto;border:#777 solid 1px;cursor:default;-webkit-user-select:none;user-select:none;background-color:#fff}.color-picker *{box-sizing:border-box;margin:0;font-size:11px}.color-picker input{width:0;height:26px;min-width:0;font-size:13px;text-align:center;color:#000}.color-picker input:invalid,.color-picker input:-moz-ui-invalid,.color-picker input:-moz-submit-invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.color-picker .arrow{position:absolute;z-index:999999;width:0;height:0;border-style:solid}.color-picker .arrow.arrow-top{left:8px;border-width:10px 5px;border-color:#777 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .arrow.arrow-bottom{top:-20px;left:8px;border-width:10px 5px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #777 rgba(0,0,0,0)}.color-picker .arrow.arrow-top-left,.color-picker .arrow.arrow-left-top{right:-21px;bottom:8px;border-width:5px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #777}.color-picker .arrow.arrow-top-right,.color-picker .arrow.arrow-right-top{bottom:8px;left:-20px;border-width:5px 10px;border-color:rgba(0,0,0,0) #777 rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .arrow.arrow-left,.color-picker .arrow.arrow-left-bottom,.color-picker .arrow.arrow-bottom-left{top:8px;right:-21px;border-width:5px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #777}.color-picker .arrow.arrow-right,.color-picker .arrow.arrow-right-bottom,.color-picker .arrow.arrow-bottom-right{top:8px;left:-20px;border-width:5px 10px;border-color:rgba(0,0,0,0) #777 rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .cursor{position:relative;width:16px;height:16px;border:#222 solid 2px;border-radius:50%;cursor:default}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{position:relative;padding:16px 8px}.color-picker .right{flex:1 1 auto;padding:12px 8px}.color-picker .button-area{padding:0 16px 16px;text-align:right}.color-picker .button-area button{margin-left:8px}.color-picker .preset-area{padding:4px 15px}.color-picker .preset-area .preset-label{overflow:hidden;width:100%;padding:4px;font-size:11px;white-space:nowrap;text-align:left;text-overflow:ellipsis;color:#555}.color-picker .preset-area .preset-color{position:relative;display:inline-block;width:18px;height:18px;margin:4px 6px 8px;border:#a9a9a9 solid 1px;border-radius:25%;cursor:pointer}.color-picker .preset-area .preset-empty-message{min-height:18px;margin-top:4px;margin-bottom:8px;font-style:italic;text-align:center}.color-picker .hex-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .hex-text .box{padding:0 24px 8px 8px}.color-picker .hex-text .box div{float:left;flex:1 1 auto;text-align:center;color:#555;clear:left}.color-picker .hex-text .box input{flex:1 1 auto;padding:1px;border:#a9a9a9 solid 1px}.color-picker .hex-alpha .box div:first-child,.color-picker .hex-alpha .box input:first-child{flex-grow:3;margin-right:8px}.color-picker .cmyk-text,.color-picker .hsla-text,.color-picker .rgba-text,.color-picker .value-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .cmyk-text .box,.color-picker .hsla-text .box,.color-picker .rgba-text .box{padding:0 24px 8px 8px}.color-picker .value-text .box{padding:0 8px 8px}.color-picker .cmyk-text .box div,.color-picker .hsla-text .box div,.color-picker .rgba-text .box div,.color-picker .value-text .box div{flex:1 1 auto;margin-right:8px;text-align:center;color:#555}.color-picker .cmyk-text .box div:last-child,.color-picker .hsla-text .box div:last-child,.color-picker .rgba-text .box div:last-child,.color-picker .value-text .box div:last-child{margin-right:0}.color-picker .cmyk-text .box input,.color-picker .hsla-text .box input,.color-picker .rgba-text .box input,.color-picker .value-text .box input{float:left;flex:1;padding:1px;margin:0 8px 0 0;border:#a9a9a9 solid 1px}.color-picker .cmyk-text .box input:last-child,.color-picker .hsla-text .box input:last-child,.color-picker .rgba-text .box input:last-child,.color-picker .value-text .box input:last-child{margin-right:0}.color-picker .hue-alpha{align-items:center;margin-bottom:3px}.color-picker .hue{direction:ltr;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC)}.color-picker .value{direction:rtl;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAACTklEQVR42u3SYUcrABhA4U2SkmRJMmWSJklKJiWZZpKUJJskKUmaTFImKZOUzMySpGRmliRNJilJSpKSJEtmSpIpmWmSdO736/6D+x7OP3gUCoWCv1cqlSQlJZGcnExKSgqpqamkpaWRnp5ORkYGmZmZqFQqsrKyyM7OJicnh9zcXNRqNXl5eeTn56PRaCgoKKCwsJCioiK0Wi3FxcWUlJRQWlpKWVkZ5eXlVFRUUFlZiU6no6qqiurqampqaqitraWurg69Xk99fT0GgwGj0UhDQwONjY00NTXR3NxMS0sLra2ttLW10d7ejslkwmw209HRQWdnJ11dXXR3d9PT00Nvby99fX309/czMDDA4OAgFouFoaEhrFYrw8PDjIyMMDo6ytjYGDabjfHxcSYmJpicnGRqagq73c709DQzMzPMzs4yNzfH/Pw8DocDp9OJy+XC7XazsLDA4uIiS0tLLC8vs7KywurqKmtra3g8HrxeLz6fD7/fz/r6OhsbG2xubrK1tcX29jaBQICdnR2CwSC7u7vs7e2xv7/PwcEBh4eHHB0dcXx8zMnJCaenp5ydnXF+fs7FxQWXl5dcXV1xfX3Nzc0Nt7e33N3dEQqFuL+/5+HhgXA4TCQS4fHxkaenJ56fn3l5eeH19ZVoNMrb2xvv7+98fHwQi8WIx+N8fn6SSCT4+vri+/ubn58ffn9/+VcKgSWwBJbAElgCS2AJLIElsASWwBJYAktgCSyBJbAElsASWAJLYAksgSWwBJbAElgCS2AJLIElsP4/WH8AmJ5Z6jHS4h8AAAAASUVORK5CYII=)}.color-picker .alpha{direction:ltr;width:100%;height:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwYQlZMa3gAAAWVJREFUaN7tmEGO6jAQRCsOArHgBpyAJYGjcGocxAm4A2IHpmoWE0eBH+ezmFlNvU06shJ3W6VEelWMUQAIIF9f6qZpimsA1LYtS2uF51/u27YVAFZVRUkEoGHdPV/sIcbIEIIkUdI/9Xa7neyv61+SWFUVAVCSct00TWn2fv6u3+Ecfd3tXzy/0+nEUu+SPjo/kqzrmiQpScN6v98XewfA8/lMkiLJ2WxGSUopcT6fM6U0NX9/frfbjev1WtfrlZfLhYfDQQHG/AIOlnGwjINlHCxjHCzjYJm/TJWdCwquJXseFFzGwDNNeiKMOJTO8xQdDQaeB29+K9efeLaBo9J7vdvtJj1RjFFjfiv7qv95tjx/7leSQgh93e1ffMeIp6O+YQjho/N791t1XVOSSI7N//K+4/GoxWLBx+PB5/Op5XLJ+/3OlJJWqxU3m83ovv5iGf8KjYNlHCxjHCzjYBkHy5gf5gusvQU7U37jTAAAAABJRU5ErkJggg==)}.color-picker .type-policy{position:absolute;top:218px;right:12px;width:16px;height:24px;background-size:8px 16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-position:center}.color-picker .type-policy .type-policy-arrow{display:block;width:100%;height:50%}.color-picker .selected-color{position:absolute;top:16px;left:8px;width:40px;height:40px;border:1px solid #a9a9a9;border-radius:50%}.color-picker .selected-color-background{width:40px;height:40px;border-radius:50%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC)}.color-picker .saturation-lightness{direction:ltr;width:100%;height:130px;border:none;cursor:pointer;touch-action:manipulation;background-size:100% 100%;background-image:url(data:image/png;base64,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)}.color-picker .cp-add-color-button-class{position:absolute;display:inline;padding:0;margin:3px -3px;border:0;cursor:pointer;background:transparent}.color-picker .cp-add-color-button-class:hover{text-decoration:underline}.color-picker .cp-add-color-button-class:disabled{cursor:not-allowed;color:#999}.color-picker .cp-add-color-button-class:disabled:hover{text-decoration:none}.color-picker .cp-remove-color-button-class{position:absolute;top:-5px;right:-5px;display:block;width:10px;height:10px;border-radius:50%;cursor:pointer;text-align:center;background:#fff;box-shadow:1px 1px 5px #333}.color-picker .cp-remove-color-button-class:before{content:"x";position:relative;bottom:3.5px;display:inline-block;font-size:10px}.color-picker .eyedropper-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);fill:#fff;mix-blend-mode:exclusion}\n'],dependencies:[{kind:"directive",type:s.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:s.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"directive",type:s.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"directive",type:d,selector:"[text]",inputs:["rg","text"],outputs:["newValue"]},{kind:"directive",type:h,selector:"[slider]",inputs:["rgX","rgY","slider"],outputs:["dragEnd","dragStart","newValue"]}],encapsulation:o.ViewEncapsulation.None})}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:v,decorators:[{type:t.Component,args:[{selector:"color-picker",encapsulation:t.ViewEncapsulation.None,template:'<div #dialogPopup class="color-picker" [class.open]="show" [style.display]="!show ? \'none\' : \'block\'" [style.visibility]="hidden ? \'hidden\' : \'visible\'" [style.top.px]="top" [style.left.px]="left" [style.position]="position" [style.height.px]="cpHeight" [style.width.px]="cpWidth" (click)="$event.stopPropagation()">\n <div *ngIf="cpDialogDisplay === \'popup\'" [style.left]="cpArrowPosition" class="arrow arrow-{{cpUsePosition}}" [style.top.px]="arrowTop"></div>\n\n <div *ngIf="(cpColorMode ||\xa01) === 1" class="saturation-lightness" [slider] [rgX]="1" [rgY]="1" [style.background-color]="hueSliderColor" (newValue)="onColorChange($event)" (dragStart)="onDragStart(\'saturation-lightness\')" (dragEnd)="onDragEnd(\'saturation-lightness\')">\n <div class="cursor" [style.top.px]="slider?.v" [style.left.px]="slider?.s"></div>\n </div>\n\n <div class="hue-alpha box">\n <div class="left">\n <div class="selected-color-background"></div>\n\n <div class="selected-color" [style.background-color]="selectedColor" [style.cursor]="eyeDropperSupported && cpEyeDropper ? \'pointer\' : null" (click)="eyeDropperSupported && cpEyeDropper && onEyeDropper()">\n <svg *ngIf="eyeDropperSupported && cpEyeDropper" class="eyedropper-icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M17.66 5.41l.92.92-2.69 2.69-.92-.92 2.69-2.69M17.67 3c-.26 0-.51.1-.71.29l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42l-2.34-2.34c-.2-.19-.45-.29-.7-.29zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z"/></svg>\n </div>\n\n <button *ngIf="cpAddColorButton" type="button" class="{{cpAddColorButtonClass}}" [disabled]="cpPresetColors && cpPresetColors.length >= cpMaxPresetColorsLength" (click)="onAddPresetColor($event, selectedColor)">\n {{cpAddColorButtonText}}\n </button>\n </div>\n\n <div class="right">\n <div *ngIf="cpAlphaChannel===\'disabled\'" style="height: 16px;"></div>\n\n <div #hueSlider class="hue" [slider] [rgX]="1" [style.display]="(cpColorMode ||\xa01) === 1 ? \'block\' : \'none\'" (newValue)="onHueChange($event)" (dragStart)="onDragStart(\'hue\')" (dragEnd)="onDragEnd(\'hue\')">\n <div class="cursor" [style.left.px]="slider?.h"></div>\n </div>\n\n <div #valueSlider class="value" [slider] [rgX]="1" [style.display]="(cpColorMode ||\xa01) === 2 ? \'block\': \'none\'" (newValue)="onValueChange($event)" (dragStart)="onDragStart(\'value\')" (dragEnd)="onDragEnd(\'value\')">\n <div class="cursor" [style.right.px]="slider?.v"></div>\n </div>\n\n <div #alphaSlider class="alpha" [slider] [rgX]="1" [style.display]="cpAlphaChannel === \'disabled\' ? \'none\' : \'block\'" [style.background-color]="alphaSliderColor" (newValue)="onAlphaChange($event)" (dragStart)="onDragStart(\'alpha\')" (dragEnd)="onDragEnd(\'alpha\')">\n <div class="cursor" [style.left.px]="slider?.a"></div>\n </div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1" class="cmyk-text" [style.display]="format !== 3 ? \'none\' : \'block\'">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.c" (keyup.enter)="onAcceptColor($event)" (newValue)="onCyanInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.m" (keyup.enter)="onAcceptColor($event)" (newValue)="onMagentaInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.y" (keyup.enter)="onAcceptColor($event)" (newValue)="onYellowInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="cmykText?.k" (keyup.enter)="onAcceptColor($event)" (newValue)="onBlackInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="cmykText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>C</div><div>M</div><div>Y</div><div>K</div><div *ngIf="cpAlphaChannel!==\'disabled\'" >A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1 " class="hsla-text" [style.display]="format !== 2 ? \'none\' : \'block\'">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="360" [text] [rg]="360" [value]="hslaText?.h" (keyup.enter)="onAcceptColor($event)" (newValue)="onHueInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.s" (keyup.enter)="onAcceptColor($event)" (newValue)="onSaturationInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.l" (keyup.enter)="onAcceptColor($event)" (newValue)="onLightnessInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hslaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>H</div><div>S</div><div>L</div><div *ngIf="cpAlphaChannel!==\'disabled\'">A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1 " [style.display]="format !== 1 ? \'none\' : \'block\'" class="rgba-text">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.r" (keyup.enter)="onAcceptColor($event)" (newValue)="onRedInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.g" (keyup.enter)="onAcceptColor($event)" (newValue)="onGreenInput($event)" />\n <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.b" (keyup.enter)="onAcceptColor($event)" (newValue)="onBlueInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="rgbaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>R</div><div>G</div><div>B</div><div *ngIf="cpAlphaChannel!==\'disabled\'" >A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1" class="hex-text" [class.hex-alpha]="cpAlphaChannel===\'forced\'"\n [style.display]="format !== 0 ? \'none\' : \'block\'">\n <div class="box">\n <input [text] [value]="hexText" (blur)="onHexInput(null)" (keyup.enter)="onAcceptColor($event)" (newValue)="onHexInput($event)"/>\n <input *ngIf="cpAlphaChannel===\'forced\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hexAlpha" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)"/>\n </div>\n\n <div class="box">\n <div>Hex</div>\n <div *ngIf="cpAlphaChannel===\'forced\'">A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 2" class="value-text">\n <div class="box">\n <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.l" (keyup.enter)="onAcceptColor($event)" (newValue)="onValueInput($event)" />\n <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hslaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)" />\n </div>\n\n <div class="box">\n <div>V</div><div>A</div>\n </div>\n </div>\n\n <div *ngIf="!cpDisableInput && (cpColorMode ||\xa01) === 1" class="type-policy">\n <span class="type-policy-arrow" (click)="onFormatToggle(-1)"></span>\n <span class="type-policy-arrow" (click)="onFormatToggle(1)"></span>\n </div>\n\n <div *ngIf="cpPresetColors?.length || cpAddColorButton" class="preset-area">\n <hr>\n\n <div class="preset-label">{{cpPresetLabel}}</div>\n\n <div *ngIf="cpPresetColors?.length" class="{{cpPresetColorsClass}}">\n <div *ngFor="let color of cpPresetColors" class="preset-color" [style.backgroundColor]="color" (click)="setColorFromString(color)">\n <span *ngIf="cpAddColorButton" class="{{cpRemoveColorButtonClass}}" (click)="onRemovePresetColor($event, color)"></span>\n </div>\n </div>\n\n <div *ngIf="!cpPresetColors?.length && cpAddColorButton" class="{{cpPresetEmptyMessageClass}}">{{cpPresetEmptyMessage}}</div>\n </div>\n\n <div *ngIf="cpOKButton || cpCancelButton" class="button-area">\n <button *ngIf="cpCancelButton" type="button" class="{{cpCancelButtonClass}}" (click)="onCancelColor($event)">{{cpCancelButtonText}}</button>\n\n <button *ngIf="cpOKButton" type="button" class="{{cpOKButtonClass}}" (click)="onAcceptColor($event)">{{cpOKButtonText}}</button>\n </div>\n\n <div class="extra-template" *ngIf="cpExtraTemplate">\n <ng-container *ngTemplateOutlet="cpExtraTemplate"></ng-container>\n </div>\n</div>\n',styles:['.color-picker{position:absolute;z-index:1000;width:230px;height:auto;border:#777 solid 1px;cursor:default;-webkit-user-select:none;user-select:none;background-color:#fff}.color-picker *{box-sizing:border-box;margin:0;font-size:11px}.color-picker input{width:0;height:26px;min-width:0;font-size:13px;text-align:center;color:#000}.color-picker input:invalid,.color-picker input:-moz-ui-invalid,.color-picker input:-moz-submit-invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.color-picker .arrow{position:absolute;z-index:999999;width:0;height:0;border-style:solid}.color-picker .arrow.arrow-top{left:8px;border-width:10px 5px;border-color:#777 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .arrow.arrow-bottom{top:-20px;left:8px;border-width:10px 5px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #777 rgba(0,0,0,0)}.color-picker .arrow.arrow-top-left,.color-picker .arrow.arrow-left-top{right:-21px;bottom:8px;border-width:5px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #777}.color-picker .arrow.arrow-top-right,.color-picker .arrow.arrow-right-top{bottom:8px;left:-20px;border-width:5px 10px;border-color:rgba(0,0,0,0) #777 rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .arrow.arrow-left,.color-picker .arrow.arrow-left-bottom,.color-picker .arrow.arrow-bottom-left{top:8px;right:-21px;border-width:5px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #777}.color-picker .arrow.arrow-right,.color-picker .arrow.arrow-right-bottom,.color-picker .arrow.arrow-bottom-right{top:8px;left:-20px;border-width:5px 10px;border-color:rgba(0,0,0,0) #777 rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .cursor{position:relative;width:16px;height:16px;border:#222 solid 2px;border-radius:50%;cursor:default}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{position:relative;padding:16px 8px}.color-picker .right{flex:1 1 auto;padding:12px 8px}.color-picker .button-area{padding:0 16px 16px;text-align:right}.color-picker .button-area button{margin-left:8px}.color-picker .preset-area{padding:4px 15px}.color-picker .preset-area .preset-label{overflow:hidden;width:100%;padding:4px;font-size:11px;white-space:nowrap;text-align:left;text-overflow:ellipsis;color:#555}.color-picker .preset-area .preset-color{position:relative;display:inline-block;width:18px;height:18px;margin:4px 6px 8px;border:#a9a9a9 solid 1px;border-radius:25%;cursor:pointer}.color-picker .preset-area .preset-empty-message{min-height:18px;margin-top:4px;margin-bottom:8px;font-style:italic;text-align:center}.color-picker .hex-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .hex-text .box{padding:0 24px 8px 8px}.color-picker .hex-text .box div{float:left;flex:1 1 auto;text-align:center;color:#555;clear:left}.color-picker .hex-text .box input{flex:1 1 auto;padding:1px;border:#a9a9a9 solid 1px}.color-picker .hex-alpha .box div:first-child,.color-picker .hex-alpha .box input:first-child{flex-grow:3;margin-right:8px}.color-picker .cmyk-text,.color-picker .hsla-text,.color-picker .rgba-text,.color-picker .value-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .cmyk-text .box,.color-picker .hsla-text .box,.color-picker .rgba-text .box{padding:0 24px 8px 8px}.color-picker .value-text .box{padding:0 8px 8px}.color-picker .cmyk-text .box div,.color-picker .hsla-text .box div,.color-picker .rgba-text .box div,.color-picker .value-text .box div{flex:1 1 auto;margin-right:8px;text-align:center;color:#555}.color-picker .cmyk-text .box div:last-child,.color-picker .hsla-text .box div:last-child,.color-picker .rgba-text .box div:last-child,.color-picker .value-text .box div:last-child{margin-right:0}.color-picker .cmyk-text .box input,.color-picker .hsla-text .box input,.color-picker .rgba-text .box input,.color-picker .value-text .box input{float:left;flex:1;padding:1px;margin:0 8px 0 0;border:#a9a9a9 solid 1px}.color-picker .cmyk-text .box input:last-child,.color-picker .hsla-text .box input:last-child,.color-picker .rgba-text .box input:last-child,.color-picker .value-text .box input:last-child{margin-right:0}.color-picker .hue-alpha{align-items:center;margin-bottom:3px}.color-picker .hue{direction:ltr;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC)}.color-picker .value{direction:rtl;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAACTklEQVR42u3SYUcrABhA4U2SkmRJMmWSJklKJiWZZpKUJJskKUmaTFImKZOUzMySpGRmliRNJilJSpKSJEtmSpIpmWmSdO736/6D+x7OP3gUCoWCv1cqlSQlJZGcnExKSgqpqamkpaWRnp5ORkYGmZmZqFQqsrKyyM7OJicnh9zcXNRqNXl5eeTn56PRaCgoKKCwsJCioiK0Wi3FxcWUlJRQWlpKWVkZ5eXlVFRUUFlZiU6no6qqiurqampqaqitraWurg69Xk99fT0GgwGj0UhDQwONjY00NTXR3NxMS0sLra2ttLW10d7ejslkwmw209HRQWdnJ11dXXR3d9PT00Nvby99fX309/czMDDA4OAgFouFoaEhrFYrw8PDjIyMMDo6ytjYGDabjfHxcSYmJpicnGRqagq73c709DQzMzPMzs4yNzfH/Pw8DocDp9OJy+XC7XazsLDA4uIiS0tLLC8vs7KywurqKmtra3g8HrxeLz6fD7/fz/r6OhsbG2xubrK1tcX29jaBQICdnR2CwSC7u7vs7e2xv7/PwcEBh4eHHB0dcXx8zMnJCaenp5ydnXF+fs7FxQWXl5dcXV1xfX3Nzc0Nt7e33N3dEQqFuL+/5+HhgXA4TCQS4fHxkaenJ56fn3l5eeH19ZVoNMrb2xvv7+98fHwQi8WIx+N8fn6SSCT4+vri+/ubn58ffn9/+VcKgSWwBJbAElgCS2AJLIElsASWwBJYAktgCSyBJbAElsASWAJLYAksgSWwBJbAElgCS2AJLIElsP4/WH8AmJ5Z6jHS4h8AAAAASUVORK5CYII=)}.color-picker .alpha{direction:ltr;width:100%;height:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwYQlZMa3gAAAWVJREFUaN7tmEGO6jAQRCsOArHgBpyAJYGjcGocxAm4A2IHpmoWE0eBH+ezmFlNvU06shJ3W6VEelWMUQAIIF9f6qZpimsA1LYtS2uF51/u27YVAFZVRUkEoGHdPV/sIcbIEIIkUdI/9Xa7neyv61+SWFUVAVCSct00TWn2fv6u3+Ecfd3tXzy/0+nEUu+SPjo/kqzrmiQpScN6v98XewfA8/lMkiLJ2WxGSUopcT6fM6U0NX9/frfbjev1WtfrlZfLhYfDQQHG/AIOlnGwjINlHCxjHCzjYJm/TJWdCwquJXseFFzGwDNNeiKMOJTO8xQdDQaeB29+K9efeLaBo9J7vdvtJj1RjFFjfiv7qv95tjx/7leSQgh93e1ffMeIp6O+YQjho/N791t1XVOSSI7N//K+4/GoxWLBx+PB5/Op5XLJ+/3OlJJWqxU3m83ovv5iGf8KjYNlHCxjHCzjYBkHy5gf5gusvQU7U37jTAAAAABJRU5ErkJggg==)}.color-picker .type-policy{position:absolute;top:218px;right:12px;width:16px;height:24px;background-size:8px 16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-position:center}.color-picker .type-policy .type-policy-arrow{display:block;width:100%;height:50%}.color-picker .selected-color{position:absolute;top:16px;left:8px;width:40px;height:40px;border:1px solid #a9a9a9;border-radius:50%}.color-picker .selected-color-background{width:40px;height:40px;border-radius:50%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC)}.color-picker .saturation-lightness{direction:ltr;width:100%;height:130px;border:none;cursor:pointer;touch-action:manipulation;background-size:100% 100%;background-image:url(data:image/png;base64,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)}.color-picker .cp-add-color-button-class{position:absolute;display:inline;padding:0;margin:3px -3px;border:0;cursor:pointer;background:transparent}.color-picker .cp-add-color-button-class:hover{text-decoration:underline}.color-picker .cp-add-color-button-class:disabled{cursor:not-allowed;color:#999}.color-picker .cp-add-color-button-class:disabled:hover{text-decoration:none}.color-picker .cp-remove-color-button-class{position:absolute;top:-5px;right:-5px;display:block;width:10px;height:10px;border-radius:50%;cursor:pointer;text-align:center;background:#fff;box-shadow:1px 1px 5px #333}.color-picker .cp-remove-color-button-class:before{content:"x";position:relative;bottom:3.5px;display:inline-block;font-size:10px}.color-picker .eyedropper-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);fill:#fff;mix-blend-mode:exclusion}\n']}]}],ctorParameters:()=>[{type:o.NgZone},{type:o.ElementRef},{type:o.ChangeDetectorRef},{type:Document,decorators:[{type:t.Inject,args:[n.DOCUMENT]}]},{type:void 0,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:m}],propDecorators:{dialogElement:[{type:t.ViewChild,args:["dialogPopup",{static:!0}]}],hueSlider:[{type:t.ViewChild,args:["hueSlider",{static:!0}]}],alphaSlider:[{type:t.ViewChild,args:["alphaSlider",{static:!0}]}],handleEsc:[{type:t.HostListener,args:["document:keyup.esc",["$event"]]}],handleEnter:[{type:t.HostListener,args:["document:keyup.enter",["$event"]]}]}});const y="undefined"==typeof ngDevMode||!!ngDevMode;class _{injector;cfr;appRef;vcRef;elRef;_service;dialog;dialogCreated=!1;ignoreChanges=!1;cmpRef;viewAttachedToAppRef=!1;colorPicker;cpWidth="230px";cpHeight="auto";cpToggle=!1;cpDisabled=!1;cpIgnoredElements=[];cpFallbackColor="";cpColorMode="color";cpCmykEnabled=!1;cpOutputFormat="auto";cpAlphaChannel="enabled";cpDisableInput=!1;cpDialogDisplay="popup";cpSaveClickOutside=!0;cpCloseClickOutside=!0;cpUseRootViewContainer=!1;cpPosition="auto";cpPositionOffset="0%";cpPositionRelativeToArrow=!1;cpOKButton=!1;cpOKButtonText="OK";cpOKButtonClass="cp-ok-button-class";cpCancelButton=!1;cpCancelButtonText="Cancel";cpCancelButtonClass="cp-cancel-button-class";cpEyeDropper=!1;cpPresetLabel="Preset colors";cpPresetColors;cpPresetColorsClass="cp-preset-colors-class";cpMaxPresetColorsLength=6;cpPresetEmptyMessage="No colors added";cpPresetEmptyMessageClass="preset-empty-message";cpAddColorButton=!1;cpAddColorButtonText="Add color";cpAddColorButtonClass="cp-add-color-button-class";cpRemoveColorButtonClass="cp-remove-color-button-class";cpArrowPosition=0;cpExtraTemplate;cpInputChange=new t.EventEmitter(!0);cpToggleChange=new t.EventEmitter(!0);cpSliderChange=new t.EventEmitter(!0);cpSliderDragEnd=new t.EventEmitter(!0);cpSliderDragStart=new t.EventEmitter(!0);colorPickerOpen=new t.EventEmitter(!0);colorPickerClose=new t.EventEmitter(!0);colorPickerCancel=new t.EventEmitter(!0);colorPickerSelect=new t.EventEmitter(!0);colorPickerChange=new t.EventEmitter(!1);cpCmykColorChange=new t.EventEmitter(!0);cpPresetColorsChange=new t.EventEmitter(!0);handleClick(){this.inputFocus()}handleFocus(){this.inputFocus()}handleInput(e){this.inputChange(e)}constructor(e,t,n,r,i,o){this.injector=e,this.cfr=t,this.appRef=n,this.vcRef=r,this.elRef=i,this._service=o}ngOnDestroy(){null!=this.cmpRef&&(this.viewAttachedToAppRef&&this.appRef.detachView(this.cmpRef.hostView),this.cmpRef.destroy(),this.cmpRef=null,this.dialog=null)}ngOnChanges(e){e.cpToggle&&!this.cpDisabled&&(e.cpToggle.currentValue?this.openDialog():e.cpToggle.currentValue||this.closeDialog()),e.colorPicker&&(this.dialog&&!this.ignoreChanges&&("inline"===this.cpDialogDisplay&&this.dialog.setInitialColor(e.colorPicker.currentValue),this.dialog.setColorFromString(e.colorPicker.currentValue,!1),this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay&&this.cmpRef.changeDetectorRef.detectChanges()),this.ignoreChanges=!1),(e.cpPresetLabel||e.cpPresetColors)&&this.dialog&&this.dialog.setPresetConfig(this.cpPresetLabel,this.cpPresetColors)}openDialog(){if(this.dialogCreated)this.dialog&&this.dialog.openDialog(this.colorPicker);else{let e=this.vcRef;if(this.dialogCreated=!0,this.viewAttachedToAppRef=!1,this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay){const n=this.appRef.componentTypes[0],r=this.injector.get(n,t.Injector.NULL);r!==t.Injector.NULL?(e=r.vcRef||r.viewContainerRef||this.vcRef,y&&e===this.vcRef&&console.warn("You are using cpUseRootViewContainer, but the root component is not exposing viewContainerRef!Please expose it by adding 'public vcRef: ViewContainerRef' to the constructor.")):this.viewAttachedToAppRef=!0}const n=this.cfr.resolveComponentFactory(v);if(this.viewAttachedToAppRef)this.cmpRef=n.create(this.injector),this.appRef.attachView(this.cmpRef.hostView),document.body.appendChild(this.cmpRef.hostView.rootNodes[0]);else{const r=t.Injector.create({providers:[],parent:e.injector});this.cmpRef=e.createComponent(n,0,r,[])}this.cmpRef.instance.setupDialog(this,this.elRef,this.colorPicker,this.cpWidth,this.cpHeight,this.cpDialogDisplay,this.cpFallbackColor,this.cpColorMode,this.cpCmykEnabled,this.cpAlphaChannel,this.cpOutputFormat,this.cpDisableInput,this.cpIgnoredElements,this.cpSaveClickOutside,this.cpCloseClickOutside,this.cpUseRootViewContainer,this.cpPosition,this.cpPositionOffset,this.cpPositionRelativeToArrow,this.cpPresetLabel,this.cpPresetColors,this.cpPresetColorsClass,this.cpMaxPresetColorsLength,this.cpPresetEmptyMessage,this.cpPresetEmptyMessageClass,this.cpOKButton,this.cpOKButtonClass,this.cpOKButtonText,this.cpCancelButton,this.cpCancelButtonClass,this.cpCancelButtonText,this.cpAddColorButton,this.cpAddColorButtonClass,this.cpAddColorButtonText,this.cpRemoveColorButtonClass,this.cpEyeDropper,this.elRef,this.cpExtraTemplate),this.dialog=this.cmpRef.instance,this.vcRef!==e&&this.cmpRef.changeDetectorRef.detectChanges()}}closeDialog(){this.dialog&&"popup"===this.cpDialogDisplay&&this.dialog.closeDialog()}cmykChanged(e){this.cpCmykColorChange.emit(e)}stateChanged(e){this.cpToggleChange.emit(e),e?this.colorPickerOpen.emit(this.colorPicker):this.colorPickerClose.emit(this.colorPicker)}colorChanged(e,t=!0){this.ignoreChanges=t,this.colorPickerChange.emit(e)}colorSelected(e){this.colorPickerSelect.emit(e)}colorCanceled(){this.colorPickerCancel.emit()}inputFocus(){const e=this.elRef.nativeElement,t=this.cpIgnoredElements.filter((t=>t===e));this.cpDisabled||t.length||("undefined"!=typeof document&&e===document.activeElement?this.openDialog():this.dialog&&this.dialog.show?this.closeDialog():this.openDialog())}inputChange(e){this.dialog?this.dialog.setColorFromString(e.target.value,!0):(this.colorPicker=e.target.value,this.colorPickerChange.emit(this.colorPicker))}inputChanged(e){this.cpInputChange.emit(e)}sliderChanged(e){this.cpSliderChange.emit(e)}sliderDragEnd(e){this.cpSliderDragEnd.emit(e)}sliderDragStart(e){this.cpSliderDragStart.emit(e)}presetColorsChanged(e){this.cpPresetColorsChange.emit(e)}static"\u0275fac"=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:_,deps:[{token:o.Injector},{token:o.ComponentFactoryResolver},{token:o.ApplicationRef},{token:o.ViewContainerRef},{token:o.ElementRef},{token:m}],target:o.\u0275\u0275FactoryTarget.Directive});static"\u0275dir"=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"17.0.2",type:_,selector:"[colorPicker]",inputs:{colorPicker:"colorPicker",cpWidth:"cpWidth",cpHeight:"cpHeight",cpToggle:"cpToggle",cpDisabled:"cpDisabled",cpIgnoredElements:"cpIgnoredElements",cpFallbackColor:"cpFallbackColor",cpColorMode:"cpColorMode",cpCmykEnabled:"cpCmykEnabled",cpOutputFormat:"cpOutputFormat",cpAlphaChannel:"cpAlphaChannel",cpDisableInput:"cpDisableInput",cpDialogDisplay:"cpDialogDisplay",cpSaveClickOutside:"cpSaveClickOutside",cpCloseClickOutside:"cpCloseClickOutside",cpUseRootViewContainer:"cpUseRootViewContainer",cpPosition:"cpPosition",cpPositionOffset:"cpPositionOffset",cpPositionRelativeToArrow:"cpPositionRelativeToArrow",cpOKButton:"cpOKButton",cpOKButtonText:"cpOKButtonText",cpOKButtonClass:"cpOKButtonClass",cpCancelButton:"cpCancelButton",cpCancelButtonText:"cpCancelButtonText",cpCancelButtonClass:"cpCancelButtonClass",cpEyeDropper:"cpEyeDropper",cpPresetLabel:"cpPresetLabel",cpPresetColors:"cpPresetColors",cpPresetColorsClass:"cpPresetColorsClass",cpMaxPresetColorsLength:"cpMaxPresetColorsLength",cpPresetEmptyMessage:"cpPresetEmptyMessage",cpPresetEmptyMessageClass:"cpPresetEmptyMessageClass",cpAddColorButton:"cpAddColorButton",cpAddColorButtonText:"cpAddColorButtonText",cpAddColorButtonClass:"cpAddColorButtonClass",cpRemoveColorButtonClass:"cpRemoveColorButtonClass",cpArrowPosition:"cpArrowPosition",cpExtraTemplate:"cpExtraTemplate"},outputs:{cpInputChange:"cpInputChange",cpToggleChange:"cpToggleChange",cpSliderChange:"cpSliderChange",cpSliderDragEnd:"cpSliderDragEnd",cpSliderDragStart:"cpSliderDragStart",colorPickerOpen:"colorPickerOpen",colorPickerClose:"colorPickerClose",colorPickerCancel:"colorPickerCancel",colorPickerSelect:"colorPickerSelect",colorPickerChange:"colorPickerChange",cpCmykColorChange:"cpCmykColorChange",cpPresetColorsChange:"cpPresetColorsChange"},host:{listeners:{click:"handleClick()",focus:"handleFocus()",input:"handleInput($event)"}},exportAs:["ngxColorPicker"],usesOnChanges:!0,ngImport:o})}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:_,decorators:[{type:t.Directive,args:[{selector:"[colorPicker]",exportAs:"ngxColorPicker"}]}],ctorParameters:()=>[{type:o.Injector},{type:o.ComponentFactoryResolver},{type:o.ApplicationRef},{type:o.ViewContainerRef},{type:o.ElementRef},{type:m}],propDecorators:{colorPicker:[{type:t.Input}],cpWidth:[{type:t.Input}],cpHeight:[{type:t.Input}],cpToggle:[{type:t.Input}],cpDisabled:[{type:t.Input}],cpIgnoredElements:[{type:t.Input}],cpFallbackColor:[{type:t.Input}],cpColorMode:[{type:t.Input}],cpCmykEnabled:[{type:t.Input}],cpOutputFormat:[{type:t.Input}],cpAlphaChannel:[{type:t.Input}],cpDisableInput:[{type:t.Input}],cpDialogDisplay:[{type:t.Input}],cpSaveClickOutside:[{type:t.Input}],cpCloseClickOutside:[{type:t.Input}],cpUseRootViewContainer:[{type:t.Input}],cpPosition:[{type:t.Input}],cpPositionOffset:[{type:t.Input}],cpPositionRelativeToArrow:[{type:t.Input}],cpOKButton:[{type:t.Input}],cpOKButtonText:[{type:t.Input}],cpOKButtonClass:[{type:t.Input}],cpCancelButton:[{type:t.Input}],cpCancelButtonText:[{type:t.Input}],cpCancelButtonClass:[{type:t.Input}],cpEyeDropper:[{type:t.Input}],cpPresetLabel:[{type:t.Input}],cpPresetColors:[{type:t.Input}],cpPresetColorsClass:[{type:t.Input}],cpMaxPresetColorsLength:[{type:t.Input}],cpPresetEmptyMessage:[{type:t.Input}],cpPresetEmptyMessageClass:[{type:t.Input}],cpAddColorButton:[{type:t.Input}],cpAddColorButtonText:[{type:t.Input}],cpAddColorButtonClass:[{type:t.Input}],cpRemoveColorButtonClass:[{type:t.Input}],cpArrowPosition:[{type:t.Input}],cpExtraTemplate:[{type:t.Input}],cpInputChange:[{type:t.Output}],cpToggleChange:[{type:t.Output}],cpSliderChange:[{type:t.Output}],cpSliderDragEnd:[{type:t.Output}],cpSliderDragStart:[{type:t.Output}],colorPickerOpen:[{type:t.Output}],colorPickerClose:[{type:t.Output}],colorPickerCancel:[{type:t.Output}],colorPickerSelect:[{type:t.Output}],colorPickerChange:[{type:t.Output}],cpCmykColorChange:[{type:t.Output}],cpPresetColorsChange:[{type:t.Output}],handleClick:[{type:t.HostListener,args:["click"]}],handleFocus:[{type:t.HostListener,args:["focus"]}],handleInput:[{type:t.HostListener,args:["input",["$event"]]}]}});class b{static"\u0275fac"=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:b,deps:[],target:o.\u0275\u0275FactoryTarget.NgModule});static"\u0275mod"=o.\u0275\u0275ngDeclareNgModule({minVersion:"14.0.0",version:"17.0.2",ngImport:o,type:b,declarations:[v,_,d,h],imports:[n.CommonModule],exports:[_]});static"\u0275inj"=o.\u0275\u0275ngDeclareInjector({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:b,providers:[m],imports:[n.CommonModule]})}o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"17.0.2",ngImport:o,type:b,decorators:[{type:t.NgModule,args:[{imports:[n.CommonModule],exports:[_],providers:[m],declarations:[v,_,d,h]}]}]}),e.Cmyk=c,e.ColorPickerComponent=v,e.ColorPickerDirective=_,e.ColorPickerModule=b,e.ColorPickerService=m,e.Hsla=u,e.Hsva=l,e.Rgba=a,e.SliderDirective=h,e.TextDirective=d})),function(){var e,t="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",i=16,o=32,s=64,a=128,l=256,u=1/0,c=9007199254740991,d=NaN,h=4294967295,p=[["ary",a],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",o],["partialRight",s],["rearg",l]],f="[object Arguments]",m="[object Array]",g="[object Boolean]",v="[object Date]",y="[object Error]",_="[object Function]",b="[object GeneratorFunction]",w="[object Map]",x="[object Number]",k="[object Object]",S="[object Promise]",T="[object RegExp]",E="[object Set]",D="[object String]",C="[object Symbol]",M="[object WeakMap]",A="[object ArrayBuffer]",I="[object DataView]",L="[object Float32Array]",O="[object Float64Array]",N="[object Int8Array]",R="[object Int16Array]",P="[object Int32Array]",F="[object Uint8Array]",j="[object Uint8ClampedArray]",Y="[object Uint16Array]",V="[object Uint32Array]",H=/\b__p \+= '';/g,B=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,W=RegExp(z.source),$=RegExp(q.source),G=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ne=/^\s+/,re=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ae=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,fe=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,be="\\ud800-\\udfff",we="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",De="['\u2019]",Ce="["+be+"]",Me="["+Ee+"]",Ae="["+we+"]",Ie="\\d+",Le="["+xe+"]",Oe="["+ke+"]",Ne="[^"+be+Ee+Ie+xe+ke+Se+"]",Re="\\ud83c[\\udffb-\\udfff]",Pe="[^"+be+"]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",je="[\\ud800-\\udbff][\\udc00-\\udfff]",Ye="["+Se+"]",Ve="\\u200d",He="(?:"+Oe+"|"+Ne+")",Be="(?:"+Ye+"|"+Ne+")",Ue="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",ze="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Ae+"|"+Re+")"+"?",We="["+Te+"]?",$e=We+qe+("(?:"+Ve+"(?:"+[Pe,Fe,je].join("|")+")"+We+qe+")*"),Ge="(?:"+[Le,Fe,je].join("|")+")"+$e,Ke="(?:"+[Pe+Ae+"?",Ae,Fe,je,Ce].join("|")+")",Ze=RegExp(De,"g"),Xe=RegExp(Ae,"g"),Je=RegExp(Re+"(?="+Re+")|"+Ke+$e,"g"),Qe=RegExp([Ye+"?"+Oe+"+"+Ue+"(?="+[Me,Ye,"$"].join("|")+")",Be+"+"+ze+"(?="+[Me,Ye+He,"$"].join("|")+")",Ye+"?"+He+"+"+Ue,Ye+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Ge].join("|"),"g"),et=RegExp("["+Ve+be+we+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[L]=it[O]=it[N]=it[R]=it[P]=it[F]=it[j]=it[Y]=it[V]=!0,it[f]=it[m]=it[A]=it[g]=it[I]=it[v]=it[y]=it[_]=it[w]=it[x]=it[k]=it[T]=it[E]=it[D]=it[M]=!1;var ot={};ot[f]=ot[m]=ot[A]=ot[I]=ot[g]=ot[v]=ot[L]=ot[O]=ot[N]=ot[R]=ot[P]=ot[w]=ot[x]=ot[k]=ot[T]=ot[E]=ot[D]=ot[C]=ot[F]=ot[j]=ot[Y]=ot[V]=!0,ot[y]=ot[_]=ot[M]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,lt=parseInt,ut="object"==typeof global&&global&&global.Object===Object&&global,ct="object"==typeof self&&self&&self.Object===Object&&self,dt=ut||ct||Function("return this")(),ht="object"==typeof exports&&exports&&!exports.nodeType&&exports,pt=ht&&"object"==typeof module&&module&&!module.nodeType&&module,ft=pt&&pt.exports===ht,mt=ft&&ut.process,gt=function(){try{var e=pt&&pt.require&&pt.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),vt=gt&&gt.isArrayBuffer,yt=gt&&gt.isDate,_t=gt&&gt.isMap,bt=gt&&gt.isRegExp,wt=gt&&gt.isSet,xt=gt&&gt.isTypedArray;function kt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Dt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Ct(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function Mt(e,t){return!!(null==e?0:e.length)&&Yt(e,t,0)>-1}function At(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function It(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ot(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Nt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Pt=Ut("length");function Ft(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function jt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Yt(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):jt(e,Ht,n)}function Vt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Ht(e){return e!=e}function Bt(e,t){var n=null==e?0:e.length;return n?Wt(e,t)/n:d}function Ut(t){return function(n){return null==n?e:n[t]}}function zt(t){return function(n){return null==t?e:t[n]}}function qt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Wt(t,n){for(var r,i=-1,o=t.length;++i<o;){var s=n(t[i]);s!==e&&(r=r===e?s:r+s)}return r}function $t(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Gt(e){return e?e.slice(0,hn(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function Zt(e,t){return It(t,(function(t){return e[t]}))}function Xt(e,t){return e.has(t)}function Jt(e,t){for(var n=-1,r=e.length;++n<r&&Yt(t,e[n],0)>-1;);return n}function Qt(e,t){for(var n=e.length;n--&&Yt(t,e[n],0)>-1;);return n}var en=zt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),tn=zt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+st[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function sn(e,t){return function(n){return e(t(n))}}function an(e,t){for(var n=-1,i=e.length,o=0,s=[];++n<i;){var a=e[n];a!==t&&a!==r||(e[n]=r,s[o++]=n)}return s}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function cn(e){return rn(e)?function(e){var t=Je.lastIndex=0;for(;Je.test(e);)++t;return t}(e):Pt(e)}function dn(e){return rn(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function hn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var pn=zt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var fn=function re(be){var we,xe=(be=null==be?dt:fn.defaults(dt.Object(),be,fn.pick(dt,nt))).Array,ke=be.Date,Se=be.Error,Te=be.Function,Ee=be.Math,De=be.Object,Ce=be.RegExp,Me=be.String,Ae=be.TypeError,Ie=xe.prototype,Le=Te.prototype,Oe=De.prototype,Ne=be["__core-js_shared__"],Re=Le.toString,Pe=Oe.hasOwnProperty,Fe=0,je=(we=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+we:"",Ye=Oe.toString,Ve=Re.call(De),He=dt._,Be=Ce("^"+Re.call(Pe).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=ft?be.Buffer:e,ze=be.Symbol,qe=be.Uint8Array,We=Ue?Ue.allocUnsafe:e,$e=sn(De.getPrototypeOf,De),Ge=De.create,Ke=Oe.propertyIsEnumerable,Je=Ie.splice,et=ze?ze.isConcatSpreadable:e,st=ze?ze.iterator:e,ut=ze?ze.toStringTag:e,ct=function(){try{var e=po(De,"defineProperty");return e({},"",{}),e}catch(e){}}(),ht=be.clearTimeout!==dt.clearTimeout&&be.clearTimeout,pt=ke&&ke.now!==dt.Date.now&&ke.now,mt=be.setTimeout!==dt.setTimeout&&be.setTimeout,gt=Ee.ceil,Pt=Ee.floor,zt=De.getOwnPropertySymbols,mn=Ue?Ue.isBuffer:e,gn=be.isFinite,vn=Ie.join,yn=sn(De.keys,De),_n=Ee.max,bn=Ee.min,wn=ke.now,xn=be.parseInt,kn=Ee.random,Sn=Ie.reverse,Tn=po(be,"DataView"),En=po(be,"Map"),Dn=po(be,"Promise"),Cn=po(be,"Set"),Mn=po(be,"WeakMap"),An=po(De,"create"),In=Mn&&new Mn,Ln={},On=Yo(Tn),Nn=Yo(En),Rn=Yo(Dn),Pn=Yo(Cn),Fn=Yo(Mn),jn=ze?ze.prototype:e,Yn=jn?jn.valueOf:e,Vn=jn?jn.toString:e;function Hn(e){if(na(e)&&!qs(e)&&!(e instanceof qn)){if(e instanceof zn)return e;if(Pe.call(e,"__wrapped__"))return Vo(e)}return new zn(e)}var Bn=function(){function t(){}return function(n){if(!ta(n))return{};if(Ge)return Ge(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function Un(){}function zn(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function Zn(e){var t=this.__data__=new $n(e);this.size=t.size}function Xn(e,t){var n=qs(e),r=!n&&zs(e),i=!n&&!r&&Ks(e),o=!n&&!r&&!i&&ca(e),s=n||r||i||o,a=s?$t(e.length,Me):[],l=a.length;for(var u in e)!t&&!Pe.call(e,u)||s&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||bo(u,l))||a.push(u);return a}function Jn(t){var n=t.length;return n?t[Kr(0,n-1)]:e}function Qn(e,t){return Po(Ai(e),lr(t,0,e.length))}function er(e){return Po(Ai(e))}function tr(t,n,r){(r!==e&&!Hs(t[n],r)||r===e&&!(n in t))&&sr(t,n,r)}function nr(t,n,r){var i=t[n];Pe.call(t,n)&&Hs(i,r)&&(r!==e||n in t)||sr(t,n,r)}function rr(e,t){for(var n=e.length;n--;)if(Hs(e[n][0],t))return n;return-1}function ir(e,t,n,r){return pr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function or(e,t){return e&&Ii(t,La(t),e)}function sr(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(t,n){for(var r=-1,i=n.length,o=xe(i),s=null==t;++r<i;)o[r]=s?e:Da(t,n[r]);return o}function lr(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function ur(t,n,r,i,o,s){var a,l=1&n,u=2&n,c=4&n;if(r&&(a=o?r(t,i,o,s):r(t)),a!==e)return a;if(!ta(t))return t;var d=qs(t);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(t),!l)return Ai(t,a)}else{var h=go(t),p=h==_||h==b;if(Ks(t))return Si(t,l);if(h==k||h==f||p&&!o){if(a=u||p?{}:yo(t),!l)return u?function(e,t){return Ii(e,mo(e),t)}(t,function(e,t){return e&&Ii(t,Oa(t),e)}(a,t)):function(e,t){return Ii(e,fo(e),t)}(t,or(a,t))}else{if(!ot[h])return o?t:{};a=function(e,t,n){var r=e.constructor;switch(t){case A:return Ti(e);case g:case v:return new r(+e);case I:return function(e,t){var n=t?Ti(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case O:case N:case R:case P:case F:case j:case Y:case V:return Ei(e,n);case w:return new r;case x:case D:return new r(e);case T:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new r;case C:return i=e,Yn?De(Yn.call(i)):{}}var i}(t,h,l)}}s||(s=new Zn);var m=s.get(t);if(m)return m;s.set(t,a),aa(t)?t.forEach((function(e){a.add(ur(e,n,r,e,t,s))})):ra(t)&&t.forEach((function(e,i){a.set(i,ur(e,n,r,i,t,s))}));var y=d?e:(c?u?oo:io:u?Oa:La)(t);return Tt(y||t,(function(e,i){y&&(e=t[i=e]),nr(a,i,ur(e,n,r,i,t,s))})),a}function cr(t,n,r){var i=r.length;if(null==t)return!i;for(t=De(t);i--;){var o=r[i],s=n[o],a=t[o];if(a===e&&!(o in t)||!s(a))return!1}return!0}function dr(n,r,i){if("function"!=typeof n)throw new Ae(t);return Lo((function(){n.apply(e,i)}),r)}function hr(e,t,n,r){var i=-1,o=Mt,s=!0,a=e.length,l=[],u=t.length;if(!a)return l;n&&(t=It(t,Kt(n))),r?(o=At,s=!1):t.length>=200&&(o=Xt,s=!1,t=new Kn(t));e:for(;++i<a;){var c=e[i],d=null==n?c:n(c);if(c=r||0!==c?c:0,s&&d==d){for(var h=u;h--;)if(t[h]===d)continue e;l.push(c)}else o(t,d,r)||l.push(c)}return l}Hn.templateSettings={escape:G,evaluate:K,interpolate:Z,variable:"",imports:{_:Hn}},Hn.prototype=Un.prototype,Hn.prototype.constructor=Hn,zn.prototype=Bn(Un.prototype),zn.prototype.constructor=zn,qn.prototype=Bn(Un.prototype),qn.prototype.constructor=qn,Wn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(t){var r=this.__data__;if(An){var i=r[t];return i===n?e:i}return Pe.call(r,t)?r[t]:e},Wn.prototype.has=function(t){var n=this.__data__;return An?n[t]!==e:Pe.call(n,t)},Wn.prototype.set=function(t,r){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=An&&r===e?n:r,this},$n.prototype.clear=function(){this.__data__=[],this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=rr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Je.call(t,n,1),--this.size,!0)},$n.prototype.get=function(t){var n=this.__data__,r=rr(n,t);return r<0?e:n[r][1]},$n.prototype.has=function(e){return rr(this.__data__,e)>-1},$n.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(En||$n),string:new Wn}},Gn.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return co(this,e).get(e)},Gn.prototype.has=function(e){return co(this,e).has(e)},Gn.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,n),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new $n,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof $n){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var pr=Ni(wr),fr=Ni(xr,!0);function mr(e,t){var n=!0;return pr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function gr(t,n,r){for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n(s);if(null!=a&&(l===e?a==a&&!ua(a):r(a,l)))var l=a,u=s}return u}function vr(e,t){var n=[];return pr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=_o),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?yr(a,t-1,n,r,i):Lt(i,a):r||(i[i.length]=a)}return i}var _r=Ri(),br=Ri(!0);function wr(e,t){return e&&_r(e,t,La)}function xr(e,t){return e&&br(e,t,La)}function kr(e,t){return Ct(t,(function(t){return Js(e[t])}))}function Sr(t,n){for(var r=0,i=(n=bi(n,t)).length;null!=t&&r<i;)t=t[jo(n[r++])];return r&&r==i?t:e}function Tr(e,t,n){var r=t(e);return qs(e)?r:Lt(r,n(e))}function Er(t){return null==t?t===e?"[object Undefined]":"[object Null]":ut&&ut in De(t)?function(t){var n=Pe.call(t,ut),r=t[ut];try{t[ut]=e;var i=!0}catch(e){}var o=Ye.call(t);i&&(n?t[ut]=r:delete t[ut]);return o}(t):function(e){return Ye.call(e)}(t)}function Dr(e,t){return e>t}function Cr(e,t){return null!=e&&Pe.call(e,t)}function Mr(e,t){return null!=e&&t in De(e)}function Ar(t,n,r){for(var i=r?At:Mt,o=t[0].length,s=t.length,a=s,l=xe(s),u=1/0,c=[];a--;){var d=t[a];a&&n&&(d=It(d,Kt(n))),u=bn(d.length,u),l[a]=!r&&(n||o>=120&&d.length>=120)?new Kn(a&&d):e}d=t[0];var h=-1,p=l[0];e:for(;++h<o&&c.length<u;){var f=d[h],m=n?n(f):f;if(f=r||0!==f?f:0,!(p?Xt(p,m):i(c,m,r))){for(a=s;--a;){var g=l[a];if(!(g?Xt(g,m):i(t[a],m,r)))continue e}p&&p.push(m),c.push(f)}}return c}function Ir(t,n,r){var i=null==(t=Mo(t,n=bi(n,t)))?t:t[jo(Xo(n))];return null==i?e:kt(i,t,r)}function Lr(e){return na(e)&&Er(e)==f}function Or(t,n,r,i,o){return t===n||(null==t||null==n||!na(t)&&!na(n)?t!=t&&n!=n:function(t,n,r,i,o,s){var a=qs(t),l=qs(n),u=a?m:go(t),c=l?m:go(n),d=(u=u==f?k:u)==k,h=(c=c==f?k:c)==k,p=u==c;if(p&&Ks(t)){if(!Ks(n))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new Zn),a||ca(t)?no(t,n,r,i,o,s):function(e,t,n,r,i,o,s){switch(n){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case A:return!(e.byteLength!=t.byteLength||!o(new qe(e),new qe(t)));case g:case v:case x:return Hs(+e,+t);case y:return e.name==t.name&&e.message==t.message;case T:case D:return e==t+"";case w:var a=on;case E:var l=1&r;if(a||(a=ln),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;r|=2,s.set(e,t);var c=no(a(e),a(t),r,i,o,s);return s.delete(e),c;case C:if(Yn)return Yn.call(e)==Yn.call(t)}return!1}(t,n,u,r,i,o,s);if(!(1&r)){var _=d&&Pe.call(t,"__wrapped__"),b=h&&Pe.call(n,"__wrapped__");if(_||b){var S=_?t.value():t,M=b?n.value():n;return s||(s=new Zn),o(S,M,r,i,s)}}if(!p)return!1;return s||(s=new Zn),function(t,n,r,i,o,s){var a=1&r,l=io(t),u=l.length,c=io(n),d=c.length;if(u!=d&&!a)return!1;var h=u;for(;h--;){var p=l[h];if(!(a?p in n:Pe.call(n,p)))return!1}var f=s.get(t),m=s.get(n);if(f&&m)return f==n&&m==t;var g=!0;s.set(t,n),s.set(n,t);var v=a;for(;++h<u;){var y=t[p=l[h]],_=n[p];if(i)var b=a?i(_,y,p,n,t,s):i(y,_,p,t,n,s);if(!(b===e?y===_||o(y,_,r,i,s):b)){g=!1;break}v||(v="constructor"==p)}if(g&&!v){var w=t.constructor,x=n.constructor;w==x||!("constructor"in t)||!("constructor"in n)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(t),s.delete(n),g}(t,n,r,i,o,s)}(t,n,r,i,Or,o))}function Nr(t,n,r,i){var o=r.length,s=o,a=!i;if(null==t)return!s;for(t=De(t);o--;){var l=r[o];if(a&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++o<s;){var u=(l=r[o])[0],c=t[u],d=l[1];if(a&&l[2]){if(c===e&&!(u in t))return!1}else{var h=new Zn;if(i)var p=i(c,d,u,t,n,h);if(!(p===e?Or(d,c,3,i,h):p))return!1}}return!0}function Rr(e){return!(!ta(e)||(t=e,je&&je in t))&&(Js(e)?Be:fe).test(Yo(e));var t}function Pr(e){return"function"==typeof e?e:null==e?il:"object"==typeof e?qs(e)?Br(e[0],e[1]):Hr(e):pl(e)}function Fr(e){if(!To(e))return yn(e);var t=[];for(var n in De(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in De(e))t.push(n);return t}(e);var t=To(e),n=[];for(var r in e)("constructor"!=r||!t&&Pe.call(e,r))&&n.push(r);return n}function Yr(e,t){return e<t}function Vr(e,t){var n=-1,r=$s(e)?xe(e.length):[];return pr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function Hr(e){var t=ho(e);return 1==t.length&&t[0][2]?Do(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function Br(t,n){return xo(t)&&Eo(n)?Do(jo(t),n):function(r){var i=Da(r,t);return i===e&&i===n?Ca(r,t):Or(n,i,3)}}function Ur(t,n,r,i,o){t!==n&&_r(n,(function(s,a){if(o||(o=new Zn),ta(s))!function(t,n,r,i,o,s,a){var l=Ao(t,r),u=Ao(n,r),c=a.get(u);if(c)return void tr(t,r,c);var d=s?s(l,u,r+"",t,n,a):e,h=d===e;if(h){var p=qs(u),f=!p&&Ks(u),m=!p&&!f&&ca(u);d=u,p||f||m?qs(l)?d=l:Gs(l)?d=Ai(l):f?(h=!1,d=Si(u,!0)):m?(h=!1,d=Ei(u,!0)):d=[]:oa(u)||zs(u)?(d=l,zs(l)?d=ya(l):ta(l)&&!Js(l)||(d=yo(u))):h=!1}h&&(a.set(u,d),o(d,u,i,s,a),a.delete(u));tr(t,r,d)}(t,n,a,r,Ur,i,o);else{var l=i?i(Ao(t,a),s,a+"",t,n,o):e;l===e&&(l=s),tr(t,a,l)}}),Oa)}function zr(t,n){var r=t.length;if(r)return bo(n+=n<0?r:0,r)?t[n]:e}function qr(e,t,n){t=t.length?It(t,(function(e){return qs(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e})):[il];var r=-1;t=It(t,Kt(uo()));var i=Vr(e,(function(e,n,i){var o=It(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;for(;++r<s;){var l=Di(i[r],o[r]);if(l)return r>=a?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Wr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Sr(e,s);n(a,s)&&ei(o,bi(s,e),a)}return o}function $r(e,t,n,r){var i=r?Vt:Yt,o=-1,s=t.length,a=e;for(e===t&&(t=Ai(t)),n&&(a=It(e,Kt(n)));++o<s;)for(var l=0,u=t[o],c=n?n(u):u;(l=i(a,c,l,r))>-1;)a!==e&&Je.call(a,l,1),Je.call(e,l,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Je.call(e,i,1):hi(e,i)}}return e}function Kr(e,t){return e+Pt(kn()*(t-e+1))}function Zr(e,t){var n="";if(!e||t<1||t>c)return n;do{t%2&&(n+=e),(t=Pt(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Oo(Co(e,t,il),e+"")}function Jr(e){return Jn(Ha(e))}function Qr(e,t){var n=Ha(e);return Po(n,lr(t,0,n.length))}function ei(t,n,r,i){if(!ta(t))return t;for(var o=-1,s=(n=bi(n,t)).length,a=s-1,l=t;null!=l&&++o<s;){var u=jo(n[o]),c=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(o!=a){var d=l[u];(c=i?i(d,u,l):e)===e&&(c=ta(d)?d:bo(n[o+1])?[]:{})}nr(l,u,c),l=l[u]}return t}var ti=In?function(e,t){return In.set(e,t),e}:il,ni=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:tl(t),writable:!0})}:il;function ri(e){return Po(Ha(e))}function ii(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=xe(i);++r<i;)o[r]=e[r+t];return o}function oi(e,t){var n;return pr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function si(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!ua(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return ai(e,t,il,n)}function ai(t,n,r,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(n=r(n))!=n,l=null===n,u=ua(n),c=n===e;o<s;){var d=Pt((o+s)/2),h=r(t[d]),p=h!==e,f=null===h,m=h==h,g=ua(h);if(a)var v=i||m;else v=c?m&&(i||p):l?m&&p&&(i||!f):u?m&&p&&!f&&(i||!g):!f&&!g&&(i?h<=n:h<n);v?o=d+1:s=d}return bn(s,4294967294)}function li(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!Hs(a,l)){var l=a;o[i++]=0===s?0:s}}return o}function ui(e){return"number"==typeof e?e:ua(e)?d:+e}function ci(e){if("string"==typeof e)return e;if(qs(e))return It(e,ci)+"";if(ua(e))return Vn?Vn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function di(e,t,n){var r=-1,i=Mt,o=e.length,s=!0,a=[],l=a;if(n)s=!1,i=At;else if(o>=200){var u=t?null:Zi(e);if(u)return ln(u);s=!1,i=Xt,l=new Kn}else l=t?[]:a;e:for(;++r<o;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,s&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(c)}else i(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}function hi(e,t){return null==(e=Mo(e,t=bi(t,e)))||delete e[jo(Xo(t))]}function pi(e,t,n,r){return ei(e,t,n(Sr(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ii(e,r?0:o,r?o+1:i):ii(e,r?o+1:0,r?i:o)}function mi(e,t){var n=e;return n instanceof qn&&(n=n.value()),Ot(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function gi(e,t,n){var r=e.length;if(r<2)return r?di(e[0]):[];for(var i=-1,o=xe(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=hr(o[i]||s,e[a],t,n));return di(yr(o,1),t,n)}function vi(t,n,r){for(var i=-1,o=t.length,s=n.length,a={};++i<o;){var l=i<s?n[i]:e;r(a,t[i],l)}return a}function yi(e){return Gs(e)?e:[]}function _i(e){return"function"==typeof e?e:il}function bi(e,t){return qs(e)?e:xo(e,t)?[e]:Fo(_a(e))}var wi=Xr;function xi(t,n,r){var i=t.length;return r=r===e?i:r,!n&&r>=i?t:ii(t,n,r)}var ki=ht||function(e){return dt.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function Ti(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Ei(e,t){var n=t?Ti(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Di(t,n){if(t!==n){var r=t!==e,i=null===t,o=t==t,s=ua(t),a=n!==e,l=null===n,u=n==n,c=ua(n);if(!l&&!c&&!s&&t>n||s&&a&&u&&!l&&!c||i&&a&&u||!r&&u||!o)return 1;if(!i&&!s&&!c&&t<n||c&&r&&o&&!i&&!s||l&&r&&o||!a&&o||!u)return-1}return 0}function Ci(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,l=t.length,u=_n(o-s,0),c=xe(l+u),d=!r;++a<l;)c[a]=t[a];for(;++i<s;)(d||i<o)&&(c[n[i]]=e[i]);for(;u--;)c[a++]=e[i++];return c}function Mi(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,l=-1,u=t.length,c=_n(o-a,0),d=xe(c+u),h=!r;++i<c;)d[i]=e[i];for(var p=i;++l<u;)d[p+l]=t[l];for(;++s<a;)(h||i<o)&&(d[p+n[s]]=e[i++]);return d}function Ai(e,t){var n=-1,r=e.length;for(t||(t=xe(r));++n<r;)t[n]=e[n];return t}function Ii(t,n,r,i){var o=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var l=n[s],u=i?i(r[l],t[l],l,r,t):e;u===e&&(u=t[l]),o?sr(r,l,u):nr(r,l,u)}return r}function Li(e,t){return function(n,r){var i=qs(n)?St:ir,o=t?t():{};return i(n,e,uo(r,2),o)}}function Oi(t){return Xr((function(n,r){var i=-1,o=r.length,s=o>1?r[o-1]:e,a=o>2?r[2]:e;for(s=t.length>3&&"function"==typeof s?(o--,s):e,a&&wo(r[0],r[1],a)&&(s=o<3?e:s,o=1),n=De(n);++i<o;){var l=r[i];l&&t(n,l,i,s)}return n}))}function Ni(e,t){return function(n,r){if(null==n)return n;if(!$s(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=De(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Ri(e){return function(t,n,r){for(var i=-1,o=De(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}function Pi(t){return function(n){var r=rn(n=_a(n))?dn(n):e,i=r?r[0]:n.charAt(0),o=r?xi(r,1).join(""):n.slice(1);return i[t]()+o}}function Fi(e){return function(t){return Ot(Ja(za(t).replace(Ze,"")),e,"")}}function ji(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return ta(r)?r:n}}function Yi(t){return function(n,r,i){var o=De(n);if(!$s(n)){var s=uo(r,3);n=La(n),r=function(e){return s(o[e],e,o)}}var a=t(n,r,i);return a>-1?o[s?n[a]:a]:e}}function Vi(n){return ro((function(r){var i=r.length,o=i,s=zn.prototype.thru;for(n&&r.reverse();o--;){var a=r[o];if("function"!=typeof a)throw new Ae(t);if(s&&!l&&"wrapper"==ao(a))var l=new zn([],!0)}for(o=l?o:i;++o<i;){var u=ao(a=r[o]),c="wrapper"==u?so(a):e;l=c&&ko(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[ao(c[0])].apply(l,c[3]):1==a.length&&ko(a)?l[u]():l.thru(a)}return function(){var e=arguments,t=e[0];if(l&&1==e.length&&qs(t))return l.plant(t).value();for(var n=0,o=i?r[n].apply(this,e):t;++n<i;)o=r[n].call(this,o);return o}}))}function Hi(t,n,r,i,o,s,l,u,c,d){var h=n&a,p=1&n,f=2&n,m=24&n,g=512&n,v=f?e:ji(t);return function a(){for(var y=arguments.length,_=xe(y),b=y;b--;)_[b]=arguments[b];if(m)var w=lo(a),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(_,w);if(i&&(_=Ci(_,i,o,m)),s&&(_=Mi(_,s,l,m)),y-=x,m&&y<d){var k=an(_,w);return Gi(t,n,Hi,a.placeholder,r,_,k,u,c,d-y)}var S=p?r:this,T=f?S[t]:t;return y=_.length,u?_=function(t,n){var r=t.length,i=bn(n.length,r),o=Ai(t);for(;i--;){var s=n[i];t[i]=bo(s,r)?o[s]:e}return t}(_,u):g&&y>1&&_.reverse(),h&&c<y&&(_.length=c),this&&this!==dt&&this instanceof a&&(T=v||ji(T)),T.apply(S,_)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Ui(t,n){return function(r,i){var o;if(r===e&&i===e)return n;if(r!==e&&(o=r),i!==e){if(o===e)return i;"string"==typeof r||"string"==typeof i?(r=ci(r),i=ci(i)):(r=ui(r),i=ui(i)),o=t(r,i)}return o}}function zi(e){return ro((function(t){return t=It(t,Kt(uo())),Xr((function(n){var r=this;return e(t,(function(e){return kt(e,r,n)}))}))}))}function qi(t,n){var r=(n=n===e?" ":ci(n)).length;if(r<2)return r?Zr(n,t):n;var i=Zr(n,gt(t/cn(n)));return rn(n)?xi(dn(i),0,t).join(""):i.slice(0,t)}function Wi(t){return function(n,r,i){return i&&"number"!=typeof i&&wo(n,r,i)&&(r=i=e),n=fa(n),r===e?(r=n,n=0):r=fa(r),function(e,t,n,r){for(var i=-1,o=_n(gt((t-e)/(n||1)),0),s=xe(o);o--;)s[r?o:++i]=e,e+=n;return s}(n,r,i=i===e?n<r?1:-1:fa(i),t)}}function $i(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=va(t),n=va(n)),e(t,n)}}function Gi(t,n,r,i,a,l,u,c,d,h){var p=8&n;n|=p?o:s,4&(n&=~(p?s:o))||(n&=-4);var f=[t,n,a,p?l:e,p?u:e,p?e:l,p?e:u,c,d,h],m=r.apply(e,f);return ko(t)&&Io(m,f),m.placeholder=i,No(m,t,n)}function Ki(e){var t=Ee[e];return function(e,n){if(e=va(e),(n=null==n?0:bn(ma(n),292))&&gn(e)){var r=(_a(e)+"e").split("e");return+((r=(_a(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Zi=Cn&&1/ln(new Cn([,-0]))[1]==u?function(e){return new Cn(e)}:ul;function Xi(e){return function(t){var n=go(t);return n==w?on(t):n==E?un(t):function(e,t){return It(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ji(n,u,c,d,h,p,f,m){var g=2&u;if(!g&&"function"!=typeof n)throw new Ae(t);var v=d?d.length:0;if(v||(u&=-97,d=h=e),f=f===e?f:_n(ma(f),0),m=m===e?m:ma(m),v-=h?h.length:0,u&s){var y=d,_=h;d=h=e}var b=g?e:so(n),w=[n,u,c,d,h,y,_,p,f,m];if(b&&function(e,t){var n=e[1],i=t[1],o=n|i,s=o<131,u=i==a&&8==n||i==a&&n==l&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!s&&!u)return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var d=e[3];e[3]=d?Ci(d,c,t[4]):c,e[4]=d?an(e[3],r):t[4]}(c=t[5])&&(d=e[5],e[5]=d?Mi(d,c,t[6]):c,e[6]=d?an(e[5],r):t[6]);(c=t[7])&&(e[7]=c);i&a&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(w,b),n=w[0],u=w[1],c=w[2],d=w[3],h=w[4],!(m=w[9]=w[9]===e?g?0:n.length:_n(w[9]-v,0))&&24&u&&(u&=-25),u&&1!=u)x=8==u||u==i?function(t,n,r){var i=ji(t);return function o(){for(var s=arguments.length,a=xe(s),l=s,u=lo(o);l--;)a[l]=arguments[l];var c=s<3&&a[0]!==u&&a[s-1]!==u?[]:an(a,u);return(s-=c.length)<r?Gi(t,n,Hi,o.placeholder,e,a,c,e,e,r-s):kt(this&&this!==dt&&this instanceof o?i:t,this,a)}}(n,u,m):u!=o&&33!=u||h.length?Hi.apply(e,w):function(e,t,n,r){var i=1&t,o=ji(e);return function t(){for(var s=-1,a=arguments.length,l=-1,u=r.length,c=xe(u+a),d=this&&this!==dt&&this instanceof t?o:e;++l<u;)c[l]=r[l];for(;a--;)c[l++]=arguments[++s];return kt(d,i?n:this,c)}}(n,u,c,d);else var x=function(e,t,n){var r=1&t,i=ji(e);return function t(){return(this&&this!==dt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(n,u,c);return No((b?ti:Io)(x,w),n,u)}function Qi(t,n,r,i){return t===e||Hs(t,Oe[r])&&!Pe.call(i,r)?n:t}function eo(t,n,r,i,o,s){return ta(t)&&ta(n)&&(s.set(n,t),Ur(t,n,e,eo,s),s.delete(n)),t}function to(t){return oa(t)?e:t}function no(t,n,r,i,o,s){var a=1&r,l=t.length,u=n.length;if(l!=u&&!(a&&u>l))return!1;var c=s.get(t),d=s.get(n);if(c&&d)return c==n&&d==t;var h=-1,p=!0,f=2&r?new Kn:e;for(s.set(t,n),s.set(n,t);++h<l;){var m=t[h],g=n[h];if(i)var v=a?i(g,m,h,n,t,s):i(m,g,h,t,n,s);if(v!==e){if(v)continue;p=!1;break}if(f){if(!Rt(n,(function(e,t){if(!Xt(f,t)&&(m===e||o(m,e,r,i,s)))return f.push(t)}))){p=!1;break}}else if(m!==g&&!o(m,g,r,i,s)){p=!1;break}}return s.delete(t),s.delete(n),p}function ro(t){return Oo(Co(t,e,Wo),t+"")}function io(e){return Tr(e,La,fo)}function oo(e){return Tr(e,Oa,mo)}var so=In?function(e){return In.get(e)}:ul;function ao(e){for(var t=e.name+"",n=Ln[t],r=Pe.call(Ln,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function lo(e){return(Pe.call(Hn,"placeholder")?Hn:e).placeholder}function uo(){var e=Hn.iteratee||ol;return e=e===ol?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function co(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function ho(e){for(var t=La(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Eo(i)]}return t}function po(t,n){var r=function(t,n){return null==t?e:t[n]}(t,n);return Rr(r)?r:e}var fo=zt?function(e){return null==e?[]:(e=De(e),Ct(zt(e),(function(t){return Ke.call(e,t)})))}:gl,mo=zt?function(e){for(var t=[];e;)Lt(t,fo(e)),e=$e(e);return t}:gl,go=Er;function vo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var s=jo(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ea(i)&&bo(s,i)&&(qs(e)||zs(e))}function yo(e){return"function"!=typeof e.constructor||To(e)?{}:Bn($e(e))}function _o(e){return qs(e)||zs(e)||!!(et&&e&&e[et])}function bo(e,t){var n=typeof e;return!!(t=null==t?c:t)&&("number"==n||"symbol"!=n&&ge.test(e))&&e>-1&&e%1==0&&e<t}function wo(e,t,n){if(!ta(n))return!1;var r=typeof t;return!!("number"==r?$s(n)&&bo(t,n.length):"string"==r&&t in n)&&Hs(n[t],e)}function xo(e,t){if(qs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ua(e))||(J.test(e)||!X.test(e)||null!=t&&e in De(t))}function ko(e){var t=ao(e),n=Hn[t];if("function"!=typeof n||!(t in qn.prototype))return!1;if(e===n)return!0;var r=so(n);return!!r&&e===r[0]}(Tn&&go(new Tn(new ArrayBuffer(1)))!=I||En&&go(new En)!=w||Dn&&go(Dn.resolve())!=S||Cn&&go(new Cn)!=E||Mn&&go(new Mn)!=M)&&(go=function(t){var n=Er(t),r=n==k?t.constructor:e,i=r?Yo(r):"";if(i)switch(i){case On:return I;case Nn:return w;case Rn:return S;case Pn:return E;case Fn:return M}return n});var So=Ne?Js:vl;function To(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)}function Eo(e){return e==e&&!ta(e)}function Do(t,n){return function(r){return null!=r&&(r[t]===n&&(n!==e||t in De(r)))}}function Co(t,n,r){return n=_n(n===e?t.length-1:n,0),function(){for(var e=arguments,i=-1,o=_n(e.length-n,0),s=xe(o);++i<o;)s[i]=e[n+i];i=-1;for(var a=xe(n+1);++i<n;)a[i]=e[i];return a[n]=r(s),kt(t,this,a)}}function Mo(e,t){return t.length<2?e:Sr(e,ii(t,0,-1))}function Ao(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Io=Ro(ti),Lo=mt||function(e,t){return dt.setTimeout(e,t)},Oo=Ro(ni);function No(e,t,n){var r=t+"";return Oo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Tt(p,(function(n){var r="_."+n[0];t&n[1]&&!Mt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(se):[]}(r),n)))}function Ro(t){var n=0,r=0;return function(){var i=wn(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Po(t,n){var r=-1,i=t.length,o=i-1;for(n=n===e?i:n;++r<n;){var s=Kr(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=n,t}var Fo=function(e){var t=Rs(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,(function(e,n,r,i){t.push(r?i.replace(ue,"$1"):n||e)})),t}));function jo(e){if("string"==typeof e||ua(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Yo(e){if(null!=e){try{return Re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Vo(e){if(e instanceof qn)return e.clone();var t=new zn(e.__wrapped__,e.__chain__);return t.__actions__=Ai(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ho=Xr((function(e,t){return Gs(e)?hr(e,yr(t,1,Gs,!0)):[]})),Bo=Xr((function(t,n){var r=Xo(n);return Gs(r)&&(r=e),Gs(t)?hr(t,yr(n,1,Gs,!0),uo(r,2)):[]})),Uo=Xr((function(t,n){var r=Xo(n);return Gs(r)&&(r=e),Gs(t)?hr(t,yr(n,1,Gs,!0),e,r):[]}));function zo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ma(n);return i<0&&(i=_n(r+i,0)),jt(e,uo(t,3),i)}function qo(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==e&&(o=ma(r),o=r<0?_n(i+o,0):bn(o,i-1)),jt(t,uo(n,3),o,!0)}function Wo(e){return(null==e?0:e.length)?yr(e,1):[]}function $o(t){return t&&t.length?t[0]:e}var Go=Xr((function(e){var t=It(e,yi);return t.length&&t[0]===e[0]?Ar(t):[]})),Ko=Xr((function(t){var n=Xo(t),r=It(t,yi);return n===Xo(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Ar(r,uo(n,2)):[]})),Zo=Xr((function(t){var n=Xo(t),r=It(t,yi);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Ar(r,e,n):[]}));function Xo(t){var n=null==t?0:t.length;return n?t[n-1]:e}var Jo=Xr(Qo);function Qo(e,t){return e&&e.length&&t&&t.length?$r(e,t):e}var es=ro((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Gr(e,It(t,(function(e){return bo(e,n)?+e:e})).sort(Di)),r}));function ts(e){return null==e?e:Sn.call(e)}var ns=Xr((function(e){return di(yr(e,1,Gs,!0))})),rs=Xr((function(t){var n=Xo(t);return Gs(n)&&(n=e),di(yr(t,1,Gs,!0),uo(n,2))})),is=Xr((function(t){var n=Xo(t);return n="function"==typeof n?n:e,di(yr(t,1,Gs,!0),e,n)}));function os(e){if(!e||!e.length)return[];var t=0;return e=Ct(e,(function(e){if(Gs(e))return t=_n(e.length,t),!0})),$t(t,(function(t){return It(e,Ut(t))}))}function ss(t,n){if(!t||!t.length)return[];var r=os(t);return null==n?r:It(r,(function(t){return kt(n,e,t)}))}var as=Xr((function(e,t){return Gs(e)?hr(e,t):[]})),ls=Xr((function(e){return gi(Ct(e,Gs))})),us=Xr((function(t){var n=Xo(t);return Gs(n)&&(n=e),gi(Ct(t,Gs),uo(n,2))})),cs=Xr((function(t){var n=Xo(t);return n="function"==typeof n?n:e,gi(Ct(t,Gs),e,n)})),ds=Xr(os);var hs=Xr((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,ss(t,r)}));function ps(e){var t=Hn(e);return t.__chain__=!0,t}function fs(e,t){return t(e)}var ms=ro((function(t){var n=t.length,r=n?t[0]:0,i=this.__wrapped__,o=function(e){return ar(e,t)};return!(n>1||this.__actions__.length)&&i instanceof qn&&bo(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:fs,args:[o],thisArg:e}),new zn(i,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(o)}));var gs=Li((function(e,t,n){Pe.call(e,n)?++e[n]:sr(e,n,1)}));var vs=Yi(zo),ys=Yi(qo);function _s(e,t){return(qs(e)?Tt:pr)(e,uo(t,3))}function bs(e,t){return(qs(e)?Et:fr)(e,uo(t,3))}var ws=Li((function(e,t,n){Pe.call(e,n)?e[n].push(t):sr(e,n,[t])}));var xs=Xr((function(e,t,n){var r=-1,i="function"==typeof t,o=$s(e)?xe(e.length):[];return pr(e,(function(e){o[++r]=i?kt(t,e,n):Ir(e,t,n)})),o})),ks=Li((function(e,t,n){sr(e,n,t)}));function Ss(e,t){return(qs(e)?It:Vr)(e,uo(t,3))}var Ts=Li((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Es=Xr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wo(e,t[0],t[1])?t=[]:n>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),qr(e,yr(t,1),[])})),Ds=pt||function(){return dt.Date.now()};function Cs(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,Ji(t,a,e,e,e,e,n)}function Ms(n,r){var i;if("function"!=typeof r)throw new Ae(t);return n=ma(n),function(){return--n>0&&(i=r.apply(this,arguments)),n<=1&&(r=e),i}}var As=Xr((function(e,t,n){var r=1;if(n.length){var i=an(n,lo(As));r|=o}return Ji(e,r,t,n,i)})),Is=Xr((function(e,t,n){var r=3;if(n.length){var i=an(n,lo(Is));r|=o}return Ji(t,r,e,n,i)}));function Ls(n,r,i){var o,s,a,l,u,c,d=0,h=!1,p=!1,f=!0;if("function"!=typeof n)throw new Ae(t);function m(t){var r=o,i=s;return o=s=e,d=t,l=n.apply(i,r)}function g(t){var n=t-c;return c===e||n>=r||n<0||p&&t-d>=a}function v(){var e=Ds();if(g(e))return y(e);u=Lo(v,function(e){var t=r-(e-c);return p?bn(t,a-(e-d)):t}(e))}function y(t){return u=e,f&&o?m(t):(o=s=e,l)}function _(){var t=Ds(),n=g(t);if(o=arguments,s=this,c=t,n){if(u===e)return function(e){return d=e,u=Lo(v,r),h?m(e):l}(c);if(p)return ki(u),u=Lo(v,r),m(c)}return u===e&&(u=Lo(v,r)),l}return r=va(r)||0,ta(i)&&(h=!!i.leading,a=(p="maxWait"in i)?_n(va(i.maxWait)||0,r):a,f="trailing"in i?!!i.trailing:f),_.cancel=function(){u!==e&&ki(u),d=0,o=c=s=u=e},_.flush=function(){return u===e?l:y(Ds())},_}var Os=Xr((function(e,t){return dr(e,1,t)})),Ns=Xr((function(e,t,n){return dr(e,va(t)||0,n)}));function Rs(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new Ae(t);var r=function(){var t=arguments,i=n?n.apply(this,t):t[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,t);return r.cache=o.set(i,s)||o,s};return r.cache=new(Rs.Cache||Gn),r}function Ps(e){if("function"!=typeof e)throw new Ae(t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Rs.Cache=Gn;var Fs=wi((function(e,t){var n=(t=1==t.length&&qs(t[0])?It(t[0],Kt(uo())):It(yr(t,1),Kt(uo()))).length;return Xr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return kt(e,this,r)}))})),js=Xr((function(t,n){var r=an(n,lo(js));return Ji(t,o,e,n,r)})),Ys=Xr((function(t,n){var r=an(n,lo(Ys));return Ji(t,s,e,n,r)})),Vs=ro((function(t,n){return Ji(t,l,e,e,e,n)}));function Hs(e,t){return e===t||e!=e&&t!=t}var Bs=$i(Dr),Us=$i((function(e,t){return e>=t})),zs=Lr(function(){return arguments}())?Lr:function(e){return na(e)&&Pe.call(e,"callee")&&!Ke.call(e,"callee")},qs=xe.isArray,Ws=vt?Kt(vt):function(e){return na(e)&&Er(e)==A};function $s(e){return null!=e&&ea(e.length)&&!Js(e)}function Gs(e){return na(e)&&$s(e)}var Ks=mn||vl,Zs=yt?Kt(yt):function(e){return na(e)&&Er(e)==v};function Xs(e){if(!na(e))return!1;var t=Er(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Js(e){if(!ta(e))return!1;var t=Er(e);return t==_||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qs(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ra=_t?Kt(_t):function(e){return na(e)&&go(e)==w};function ia(e){return"number"==typeof e||na(e)&&Er(e)==x}function oa(e){if(!na(e)||Er(e)!=k)return!1;var t=$e(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==Ve}var sa=bt?Kt(bt):function(e){return na(e)&&Er(e)==T};var aa=wt?Kt(wt):function(e){return na(e)&&go(e)==E};function la(e){return"string"==typeof e||!qs(e)&&na(e)&&Er(e)==D}function ua(e){return"symbol"==typeof e||na(e)&&Er(e)==C}var ca=xt?Kt(xt):function(e){return na(e)&&ea(e.length)&&!!it[Er(e)]};var da=$i(Yr),ha=$i((function(e,t){return e<=t}));function pa(e){if(!e)return[];if($s(e))return la(e)?dn(e):Ai(e);if(st&&e[st])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[st]());var t=go(e);return(t==w?on:t==E?ln:Ha)(e)}function fa(e){return e?(e=va(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=fa(e),n=t%1;return t==t?n?t-n:t:0}function ga(e){return e?lr(ma(e),0,h):0}function va(e){if("number"==typeof e)return e;if(ua(e))return d;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Gt(e);var n=pe.test(e);return n||me.test(e)?lt(e.slice(2),n?2:8):he.test(e)?d:+e}function ya(e){return Ii(e,Oa(e))}function _a(e){return null==e?"":ci(e)}var ba=Oi((function(e,t){if(To(t)||$s(t))Ii(t,La(t),e);else for(var n in t)Pe.call(t,n)&&nr(e,n,t[n])})),wa=Oi((function(e,t){Ii(t,Oa(t),e)})),xa=Oi((function(e,t,n,r){Ii(t,Oa(t),e,r)})),ka=Oi((function(e,t,n,r){Ii(t,La(t),e,r)})),Sa=ro(ar);var Ta=Xr((function(t,n){t=De(t);var r=-1,i=n.length,o=i>2?n[2]:e;for(o&&wo(n[0],n[1],o)&&(i=1);++r<i;)for(var s=n[r],a=Oa(s),l=-1,u=a.length;++l<u;){var c=a[l],d=t[c];(d===e||Hs(d,Oe[c])&&!Pe.call(t,c))&&(t[c]=s[c])}return t})),Ea=Xr((function(t){return t.push(e,eo),kt(Ra,e,t)}));function Da(t,n,r){var i=null==t?e:Sr(t,n);return i===e?r:i}function Ca(e,t){return null!=e&&vo(e,t,Mr)}var Ma=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ye.call(t)),e[t]=n}),tl(il)),Aa=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ye.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),uo),Ia=Xr(Ir);function La(e){return $s(e)?Xn(e):Fr(e)}function Oa(e){return $s(e)?Xn(e,!0):jr(e)}var Na=Oi((function(e,t,n){Ur(e,t,n)})),Ra=Oi((function(e,t,n,r){Ur(e,t,n,r)})),Pa=ro((function(e,t){var n={};if(null==e)return n;var r=!1;t=It(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ii(e,oo(e),n),r&&(n=ur(n,7,to));for(var i=t.length;i--;)hi(n,t[i]);return n}));var Fa=ro((function(e,t){return null==e?{}:function(e,t){return Wr(e,t,(function(t,n){return Ca(e,n)}))}(e,t)}));function ja(e,t){if(null==e)return{};var n=It(oo(e),(function(e){return[e]}));return t=uo(t),Wr(e,n,(function(e,n){return t(e,n[0])}))}var Ya=Xi(La),Va=Xi(Oa);function Ha(e){return null==e?[]:Zt(e,La(e))}var Ba=Fi((function(e,t,n){return t=t.toLowerCase(),e+(n?Ua(t):t)}));function Ua(e){return Xa(_a(e).toLowerCase())}function za(e){return(e=_a(e))&&e.replace(ve,en).replace(Xe,"")}var qa=Fi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Wa=Fi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),$a=Pi("toLowerCase");var Ga=Fi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ka=Fi((function(e,t,n){return e+(n?" ":"")+Xa(t)}));var Za=Fi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xa=Pi("toUpperCase");function Ja(t,n,r){return t=_a(t),(n=r?e:n)===e?function(e){return tt.test(e)}(t)?function(e){return e.match(Qe)||[]}(t):function(e){return e.match(ae)||[]}(t):t.match(n)||[]}var Qa=Xr((function(t,n){try{return kt(t,e,n)}catch(e){return Xs(e)?e:new Se(e)}})),el=ro((function(e,t){return Tt(t,(function(t){t=jo(t),sr(e,t,As(e[t],e))})),e}));function tl(e){return function(){return e}}var nl=Vi(),rl=Vi(!0);function il(e){return e}function ol(e){return Pr("function"==typeof e?e:ur(e,1))}var sl=Xr((function(e,t){return function(n){return Ir(n,e,t)}})),al=Xr((function(e,t){return function(n){return Ir(e,n,t)}}));function ll(e,t,n){var r=La(t),i=kr(t,r);null!=n||ta(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=kr(t,La(t)));var o=!(ta(n)&&"chain"in n&&!n.chain),s=Js(e);return Tt(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ai(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function ul(){}var cl=zi(It),dl=zi(Dt),hl=zi(Rt);function pl(e){return xo(e)?Ut(jo(e)):function(e){return function(t){return Sr(t,e)}}(e)}var fl=Wi(),ml=Wi(!0);function gl(){return[]}function vl(){return!1}var yl=Ui((function(e,t){return e+t}),0),_l=Ki("ceil"),bl=Ui((function(e,t){return e/t}),1),wl=Ki("floor");var xl,kl=Ui((function(e,t){return e*t}),1),Sl=Ki("round"),Tl=Ui((function(e,t){return e-t}),0);return Hn.after=function(e,n){if("function"!=typeof n)throw new Ae(t);return e=ma(e),function(){if(--e<1)return n.apply(this,arguments)}},Hn.ary=Cs,Hn.assign=ba,Hn.assignIn=wa,Hn.assignInWith=xa,Hn.assignWith=ka,Hn.at=Sa,Hn.before=Ms,Hn.bind=As,Hn.bindAll=el,Hn.bindKey=Is,Hn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qs(e)?e:[e]},Hn.chain=ps,Hn.chunk=function(t,n,r){n=(r?wo(t,n,r):n===e)?1:_n(ma(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,s=0,a=xe(gt(i/n));o<i;)a[s++]=ii(t,o,o+=n);return a},Hn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Hn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=xe(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Lt(qs(n)?Ai(n):[n],yr(t,1))},Hn.cond=function(e){var n=null==e?0:e.length,r=uo();return e=n?It(e,(function(e){if("function"!=typeof e[1])throw new Ae(t);return[r(e[0]),e[1]]})):[],Xr((function(t){for(var r=-1;++r<n;){var i=e[r];if(kt(i[0],this,t))return kt(i[1],this,t)}}))},Hn.conforms=function(e){return function(e){var t=La(e);return function(n){return cr(n,e,t)}}(ur(e,1))},Hn.constant=tl,Hn.countBy=gs,Hn.create=function(e,t){var n=Bn(e);return null==t?n:or(n,t)},Hn.curry=function t(n,r,i){var o=Ji(n,8,e,e,e,e,e,r=i?e:r);return o.placeholder=t.placeholder,o},Hn.curryRight=function t(n,r,o){var s=Ji(n,i,e,e,e,e,e,r=o?e:r);return s.placeholder=t.placeholder,s},Hn.debounce=Ls,Hn.defaults=Ta,Hn.defaultsDeep=Ea,Hn.defer=Os,Hn.delay=Ns,Hn.difference=Ho,Hn.differenceBy=Bo,Hn.differenceWith=Uo,Hn.drop=function(t,n,r){var i=null==t?0:t.length;return i?ii(t,(n=r||n===e?1:ma(n))<0?0:n,i):[]},Hn.dropRight=function(t,n,r){var i=null==t?0:t.length;return i?ii(t,0,(n=i-(n=r||n===e?1:ma(n)))<0?0:n):[]},Hn.dropRightWhile=function(e,t){return e&&e.length?fi(e,uo(t,3),!0,!0):[]},Hn.dropWhile=function(e,t){return e&&e.length?fi(e,uo(t,3),!0):[]},Hn.fill=function(t,n,r,i){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&wo(t,n,r)&&(r=0,i=o),function(t,n,r,i){var o=t.length;for((r=ma(r))<0&&(r=-r>o?0:o+r),(i=i===e||i>o?o:ma(i))<0&&(i+=o),i=r>i?0:ga(i);r<i;)t[r++]=n;return t}(t,n,r,i)):[]},Hn.filter=function(e,t){return(qs(e)?Ct:vr)(e,uo(t,3))},Hn.flatMap=function(e,t){return yr(Ss(e,t),1)},Hn.flatMapDeep=function(e,t){return yr(Ss(e,t),u)},Hn.flatMapDepth=function(t,n,r){return r=r===e?1:ma(r),yr(Ss(t,n),r)},Hn.flatten=Wo,Hn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,u):[]},Hn.flattenDepth=function(t,n){return(null==t?0:t.length)?yr(t,n=n===e?1:ma(n)):[]},Hn.flip=function(e){return Ji(e,512)},Hn.flow=nl,Hn.flowRight=rl,Hn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Hn.functions=function(e){return null==e?[]:kr(e,La(e))},Hn.functionsIn=function(e){return null==e?[]:kr(e,Oa(e))},Hn.groupBy=ws,Hn.initial=function(e){return(null==e?0:e.length)?ii(e,0,-1):[]},Hn.intersection=Go,Hn.intersectionBy=Ko,Hn.intersectionWith=Zo,Hn.invert=Ma,Hn.invertBy=Aa,Hn.invokeMap=xs,Hn.iteratee=ol,Hn.keyBy=ks,Hn.keys=La,Hn.keysIn=Oa,Hn.map=Ss,Hn.mapKeys=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){sr(n,t(e,r,i),e)})),n},Hn.mapValues=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){sr(n,r,t(e,r,i))})),n},Hn.matches=function(e){return Hr(ur(e,1))},Hn.matchesProperty=function(e,t){return Br(e,ur(t,1))},Hn.memoize=Rs,Hn.merge=Na,Hn.mergeWith=Ra,Hn.method=sl,Hn.methodOf=al,Hn.mixin=ll,Hn.negate=Ps,Hn.nthArg=function(e){return e=ma(e),Xr((function(t){return zr(t,e)}))},Hn.omit=Pa,Hn.omitBy=function(e,t){return ja(e,Ps(uo(t)))},Hn.once=function(e){return Ms(2,e)},Hn.orderBy=function(t,n,r,i){return null==t?[]:(qs(n)||(n=null==n?[]:[n]),qs(r=i?e:r)||(r=null==r?[]:[r]),qr(t,n,r))},Hn.over=cl,Hn.overArgs=Fs,Hn.overEvery=dl,Hn.overSome=hl,Hn.partial=js,Hn.partialRight=Ys,Hn.partition=Ts,Hn.pick=Fa,Hn.pickBy=ja,Hn.property=pl,Hn.propertyOf=function(t){return function(n){return null==t?e:Sr(t,n)}},Hn.pull=Jo,Hn.pullAll=Qo,Hn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?$r(e,t,uo(n,2)):e},Hn.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?$r(t,n,e,r):t},Hn.pullAt=es,Hn.range=fl,Hn.rangeRight=ml,Hn.rearg=Vs,Hn.reject=function(e,t){return(qs(e)?Ct:vr)(e,Ps(uo(t,3)))},Hn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=uo(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return Gr(e,i),n},Hn.rest=function(n,r){if("function"!=typeof n)throw new Ae(t);return Xr(n,r=r===e?r:ma(r))},Hn.reverse=ts,Hn.sampleSize=function(t,n,r){return n=(r?wo(t,n,r):n===e)?1:ma(n),(qs(t)?Qn:Qr)(t,n)},Hn.set=function(e,t,n){return null==e?e:ei(e,t,n)},Hn.setWith=function(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:ei(t,n,r,i)},Hn.shuffle=function(e){return(qs(e)?er:ri)(e)},Hn.slice=function(t,n,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&wo(t,n,r)?(n=0,r=i):(n=null==n?0:ma(n),r=r===e?i:ma(r)),ii(t,n,r)):[]},Hn.sortBy=Es,Hn.sortedUniq=function(e){return e&&e.length?li(e):[]},Hn.sortedUniqBy=function(e,t){return e&&e.length?li(e,uo(t,2)):[]},Hn.split=function(t,n,r){return r&&"number"!=typeof r&&wo(t,n,r)&&(n=r=e),(r=r===e?h:r>>>0)?(t=_a(t))&&("string"==typeof n||null!=n&&!sa(n))&&!(n=ci(n))&&rn(t)?xi(dn(t),0,r):t.split(n,r):[]},Hn.spread=function(e,n){if("function"!=typeof e)throw new Ae(t);return n=null==n?0:_n(ma(n),0),Xr((function(t){var r=t[n],i=xi(t,0,n);return r&&Lt(i,r),kt(e,this,i)}))},Hn.tail=function(e){var t=null==e?0:e.length;return t?ii(e,1,t):[]},Hn.take=function(t,n,r){return t&&t.length?ii(t,0,(n=r||n===e?1:ma(n))<0?0:n):[]},Hn.takeRight=function(t,n,r){var i=null==t?0:t.length;return i?ii(t,(n=i-(n=r||n===e?1:ma(n)))<0?0:n,i):[]},Hn.takeRightWhile=function(e,t){return e&&e.length?fi(e,uo(t,3),!1,!0):[]},Hn.takeWhile=function(e,t){return e&&e.length?fi(e,uo(t,3)):[]},Hn.tap=function(e,t){return t(e),e},Hn.throttle=function(e,n,r){var i=!0,o=!0;if("function"!=typeof e)throw new Ae(t);return ta(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),Ls(e,n,{leading:i,maxWait:n,trailing:o})},Hn.thru=fs,Hn.toArray=pa,Hn.toPairs=Ya,Hn.toPairsIn=Va,Hn.toPath=function(e){return qs(e)?It(e,jo):ua(e)?[e]:Ai(Fo(_a(e)))},Hn.toPlainObject=ya,Hn.transform=function(e,t,n){var r=qs(e),i=r||Ks(e)||ca(e);if(t=uo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ta(e)&&Js(o)?Bn($e(e)):{}}return(i?Tt:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Hn.unary=function(e){return Cs(e,1)},Hn.union=ns,Hn.unionBy=rs,Hn.unionWith=is,Hn.uniq=function(e){return e&&e.length?di(e):[]},Hn.uniqBy=function(e,t){return e&&e.length?di(e,uo(t,2)):[]},Hn.uniqWith=function(t,n){return n="function"==typeof n?n:e,t&&t.length?di(t,e,n):[]},Hn.unset=function(e,t){return null==e||hi(e,t)},Hn.unzip=os,Hn.unzipWith=ss,Hn.update=function(e,t,n){return null==e?e:pi(e,t,_i(n))},Hn.updateWith=function(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:pi(t,n,_i(r),i)},Hn.values=Ha,Hn.valuesIn=function(e){return null==e?[]:Zt(e,Oa(e))},Hn.without=as,Hn.words=Ja,Hn.wrap=function(e,t){return js(_i(t),e)},Hn.xor=ls,Hn.xorBy=us,Hn.xorWith=cs,Hn.zip=ds,Hn.zipObject=function(e,t){return vi(e||[],t||[],nr)},Hn.zipObjectDeep=function(e,t){return vi(e||[],t||[],ei)},Hn.zipWith=hs,Hn.entries=Ya,Hn.entriesIn=Va,Hn.extend=wa,Hn.extendWith=xa,ll(Hn,Hn),Hn.add=yl,Hn.attempt=Qa,Hn.camelCase=Ba,Hn.capitalize=Ua,Hn.ceil=_l,Hn.clamp=function(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=va(r))==r?r:0),n!==e&&(n=(n=va(n))==n?n:0),lr(va(t),n,r)},Hn.clone=function(e){return ur(e,4)},Hn.cloneDeep=function(e){return ur(e,5)},Hn.cloneDeepWith=function(t,n){return ur(t,5,n="function"==typeof n?n:e)},Hn.cloneWith=function(t,n){return ur(t,4,n="function"==typeof n?n:e)},Hn.conformsTo=function(e,t){return null==t||cr(e,t,La(t))},Hn.deburr=za,Hn.defaultTo=function(e,t){return null==e||e!=e?t:e},Hn.divide=bl,Hn.endsWith=function(t,n,r){t=_a(t),n=ci(n);var i=t.length,o=r=r===e?i:lr(ma(r),0,i);return(r-=n.length)>=0&&t.slice(r,o)==n},Hn.eq=Hs,Hn.escape=function(e){return(e=_a(e))&&$.test(e)?e.replace(q,tn):e},Hn.escapeRegExp=function(e){return(e=_a(e))&&te.test(e)?e.replace(ee,"\\$&"):e},Hn.every=function(t,n,r){var i=qs(t)?Dt:mr;return r&&wo(t,n,r)&&(n=e),i(t,uo(n,3))},Hn.find=vs,Hn.findIndex=zo,Hn.findKey=function(e,t){return Ft(e,uo(t,3),wr)},Hn.findLast=ys,Hn.findLastIndex=qo,Hn.findLastKey=function(e,t){return Ft(e,uo(t,3),xr)},Hn.floor=wl,Hn.forEach=_s,Hn.forEachRight=bs,Hn.forIn=function(e,t){return null==e?e:_r(e,uo(t,3),Oa)},Hn.forInRight=function(e,t){return null==e?e:br(e,uo(t,3),Oa)},Hn.forOwn=function(e,t){return e&&wr(e,uo(t,3))},Hn.forOwnRight=function(e,t){return e&&xr(e,uo(t,3))},Hn.get=Da,Hn.gt=Bs,Hn.gte=Us,Hn.has=function(e,t){return null!=e&&vo(e,t,Cr)},Hn.hasIn=Ca,Hn.head=$o,Hn.identity=il,Hn.includes=function(e,t,n,r){e=$s(e)?e:Ha(e),n=n&&!r?ma(n):0;var i=e.length;return n<0&&(n=_n(i+n,0)),la(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Yt(e,t,n)>-1},Hn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ma(n);return i<0&&(i=_n(r+i,0)),Yt(e,t,i)},Hn.inRange=function(t,n,r){return n=fa(n),r===e?(r=n,n=0):r=fa(r),function(e,t,n){return e>=bn(t,n)&&e<_n(t,n)}(t=va(t),n,r)},Hn.invoke=Ia,Hn.isArguments=zs,Hn.isArray=qs,Hn.isArrayBuffer=Ws,Hn.isArrayLike=$s,Hn.isArrayLikeObject=Gs,Hn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Er(e)==g},Hn.isBuffer=Ks,Hn.isDate=Zs,Hn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},Hn.isEmpty=function(e){if(null==e)return!0;if($s(e)&&(qs(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||ca(e)||zs(e)))return!e.length;var t=go(e);if(t==w||t==E)return!e.size;if(To(e))return!Fr(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},Hn.isEqual=function(e,t){return Or(e,t)},Hn.isEqualWith=function(t,n,r){var i=(r="function"==typeof r?r:e)?r(t,n):e;return i===e?Or(t,n,e,r):!!i},Hn.isError=Xs,Hn.isFinite=function(e){return"number"==typeof e&&gn(e)},Hn.isFunction=Js,Hn.isInteger=Qs,Hn.isLength=ea,Hn.isMap=ra,Hn.isMatch=function(e,t){return e===t||Nr(e,t,ho(t))},Hn.isMatchWith=function(t,n,r){return r="function"==typeof r?r:e,Nr(t,n,ho(n),r)},Hn.isNaN=function(e){return ia(e)&&e!=+e},Hn.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(e)},Hn.isNil=function(e){return null==e},Hn.isNull=function(e){return null===e},Hn.isNumber=ia,Hn.isObject=ta,Hn.isObjectLike=na,Hn.isPlainObject=oa,Hn.isRegExp=sa,Hn.isSafeInteger=function(e){return Qs(e)&&e>=-9007199254740991&&e<=c},Hn.isSet=aa,Hn.isString=la,Hn.isSymbol=ua,Hn.isTypedArray=ca,Hn.isUndefined=function(t){return t===e},Hn.isWeakMap=function(e){return na(e)&&go(e)==M},Hn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Er(e)},Hn.join=function(e,t){return null==e?"":vn.call(e,t)},Hn.kebabCase=qa,Hn.last=Xo,Hn.lastIndexOf=function(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==e&&(o=(o=ma(r))<0?_n(i+o,0):bn(o,i-1)),n==n?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(t,n,o):jt(t,Ht,o,!0)},Hn.lowerCase=Wa,Hn.lowerFirst=$a,Hn.lt=da,Hn.lte=ha,Hn.max=function(t){return t&&t.length?gr(t,il,Dr):e},Hn.maxBy=function(t,n){return t&&t.length?gr(t,uo(n,2),Dr):e},Hn.mean=function(e){return Bt(e,il)},Hn.meanBy=function(e,t){return Bt(e,uo(t,2))},Hn.min=function(t){return t&&t.length?gr(t,il,Yr):e},Hn.minBy=function(t,n){return t&&t.length?gr(t,uo(n,2),Yr):e},Hn.stubArray=gl,Hn.stubFalse=vl,Hn.stubObject=function(){return{}},Hn.stubString=function(){return""},Hn.stubTrue=function(){return!0},Hn.multiply=kl,Hn.nth=function(t,n){return t&&t.length?zr(t,ma(n)):e},Hn.noConflict=function(){return dt._===this&&(dt._=He),this},Hn.noop=ul,Hn.now=Ds,Hn.pad=function(e,t,n){e=_a(e);var r=(t=ma(t))?cn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return qi(Pt(i),n)+e+qi(gt(i),n)},Hn.padEnd=function(e,t,n){e=_a(e);var r=(t=ma(t))?cn(e):0;return t&&r<t?e+qi(t-r,n):e},Hn.padStart=function(e,t,n){e=_a(e);var r=(t=ma(t))?cn(e):0;return t&&r<t?qi(t-r,n)+e:e},Hn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),xn(_a(e).replace(ne,""),t||0)},Hn.random=function(t,n,r){if(r&&"boolean"!=typeof r&&wo(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=fa(t),n===e?(n=t,t=0):n=fa(n)),t>n){var i=t;t=n,n=i}if(r||t%1||n%1){var o=kn();return bn(t+o*(n-t+at("1e-"+((o+"").length-1))),n)}return Kr(t,n)},Hn.reduce=function(e,t,n){var r=qs(e)?Ot:qt,i=arguments.length<3;return r(e,uo(t,4),n,i,pr)},Hn.reduceRight=function(e,t,n){var r=qs(e)?Nt:qt,i=arguments.length<3;return r(e,uo(t,4),n,i,fr)},Hn.repeat=function(t,n,r){return n=(r?wo(t,n,r):n===e)?1:ma(n),Zr(_a(t),n)},Hn.replace=function(){var e=arguments,t=_a(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Hn.result=function(t,n,r){var i=-1,o=(n=bi(n,t)).length;for(o||(o=1,t=e);++i<o;){var s=null==t?e:t[jo(n[i])];s===e&&(i=o,s=r),t=Js(s)?s.call(t):s}return t},Hn.round=Sl,Hn.runInContext=re,Hn.sample=function(e){return(qs(e)?Jn:Jr)(e)},Hn.size=function(e){if(null==e)return 0;if($s(e))return la(e)?cn(e):e.length;var t=go(e);return t==w||t==E?e.size:Fr(e).length},Hn.snakeCase=Ga,Hn.some=function(t,n,r){var i=qs(t)?Rt:oi;return r&&wo(t,n,r)&&(n=e),i(t,uo(n,3))},Hn.sortedIndex=function(e,t){return si(e,t)},Hn.sortedIndexBy=function(e,t,n){return ai(e,t,uo(n,2))},Hn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=si(e,t);if(r<n&&Hs(e[r],t))return r}return-1},Hn.sortedLastIndex=function(e,t){return si(e,t,!0)},Hn.sortedLastIndexBy=function(e,t,n){return ai(e,t,uo(n,2),!0)},Hn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=si(e,t,!0)-1;if(Hs(e[n],t))return n}return-1},Hn.startCase=Ka,Hn.startsWith=function(e,t,n){return e=_a(e),n=null==n?0:lr(ma(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t},Hn.subtract=Tl,Hn.sum=function(e){return e&&e.length?Wt(e,il):0},Hn.sumBy=function(e,t){return e&&e.length?Wt(e,uo(t,2)):0},Hn.template=function(t,n,r){var i=Hn.templateSettings;r&&wo(t,n,r)&&(n=e),t=_a(t),n=xa({},n,i,Qi);var o,s,a=xa({},n.imports,i.imports,Qi),l=La(a),u=Zt(a,l),c=0,d=n.interpolate||ye,h="__p += '",p=Ce((n.escape||ye).source+"|"+d.source+"|"+(d===Z?ce:ye).source+"|"+(n.evaluate||ye).source+"|$","g"),f="//# sourceURL="+(Pe.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";t.replace(p,(function(e,n,r,i,a,l){return r||(r=i),h+=t.slice(c,l).replace(_e,nn),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+e.length,e})),h+="';\n";var m=Pe.call(n,"variable")&&n.variable;if(m){if(le.test(m))throw new Se("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(H,""):h).replace(B,"$1").replace(U,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=Qa((function(){return Te(l,f+"return "+h).apply(e,u)}));if(g.source=h,Xs(g))throw g;return g},Hn.times=function(e,t){if((e=ma(e))<1||e>c)return[];var n=h,r=bn(e,h);t=uo(t),e-=h;for(var i=$t(r,t);++n<e;)t(n);return i},Hn.toFinite=fa,Hn.toInteger=ma,Hn.toLength=ga,Hn.toLower=function(e){return _a(e).toLowerCase()},Hn.toNumber=va,Hn.toSafeInteger=function(e){return e?lr(ma(e),-9007199254740991,c):0===e?e:0},Hn.toString=_a,Hn.toUpper=function(e){return _a(e).toUpperCase()},Hn.trim=function(t,n,r){if((t=_a(t))&&(r||n===e))return Gt(t);if(!t||!(n=ci(n)))return t;var i=dn(t),o=dn(n);return xi(i,Jt(i,o),Qt(i,o)+1).join("")},Hn.trimEnd=function(t,n,r){if((t=_a(t))&&(r||n===e))return t.slice(0,hn(t)+1);if(!t||!(n=ci(n)))return t;var i=dn(t);return xi(i,0,Qt(i,dn(n))+1).join("")},Hn.trimStart=function(t,n,r){if((t=_a(t))&&(r||n===e))return t.replace(ne,"");if(!t||!(n=ci(n)))return t;var i=dn(t);return xi(i,Jt(i,dn(n))).join("")},Hn.truncate=function(t,n){var r=30,i="...";if(ta(n)){var o="separator"in n?n.separator:o;r="length"in n?ma(n.length):r,i="omission"in n?ci(n.omission):i}var s=(t=_a(t)).length;if(rn(t)){var a=dn(t);s=a.length}if(r>=s)return t;var l=r-cn(i);if(l<1)return i;var u=a?xi(a,0,l).join(""):t.slice(0,l);if(o===e)return u+i;if(a&&(l+=u.length-l),sa(o)){if(t.slice(l).search(o)){var c,d=u;for(o.global||(o=Ce(o.source,_a(de.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var h=c.index;u=u.slice(0,h===e?l:h)}}else if(t.indexOf(ci(o),l)!=l){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+i},Hn.unescape=function(e){return(e=_a(e))&&W.test(e)?e.replace(z,pn):e},Hn.uniqueId=function(e){var t=++Fe;return _a(e)+t},Hn.upperCase=Za,Hn.upperFirst=Xa,Hn.each=_s,Hn.eachRight=bs,Hn.first=$o,ll(Hn,(xl={},wr(Hn,(function(e,t){Pe.call(Hn.prototype,t)||(xl[t]=e)})),xl),{chain:!1}),Hn.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Hn[e].placeholder=Hn})),Tt(["drop","take"],(function(t,n){qn.prototype[t]=function(r){r=r===e?1:_n(ma(r),0);var i=this.__filtered__&&!n?new qn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(r,i.__takeCount__):i.__views__.push({size:bn(r,h),type:t+(i.__dir__<0?"Right":"")}),i},qn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Tt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");qn.prototype[e]=function(){return this[n](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");qn.prototype[e]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(il)},qn.prototype.find=function(e){return this.filter(e).head()},qn.prototype.findLast=function(e){return this.reverse().find(e)},qn.prototype.invokeMap=Xr((function(e,t){return"function"==typeof e?new qn(this):this.map((function(n){return Ir(n,e,t)}))})),qn.prototype.reject=function(e){return this.filter(Ps(uo(e)))},qn.prototype.slice=function(t,n){t=ma(t);var r=this;return r.__filtered__&&(t>0||n<0)?new qn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=ma(n))<0?r.dropRight(-n):r.take(n-t)),r)},qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qn.prototype.toArray=function(){return this.take(h)},wr(qn.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=Hn[i?"take"+("last"==n?"Right":""):n],s=i||/^find/.test(n);o&&(Hn.prototype[n]=function(){var n=this.__wrapped__,a=i?[1]:arguments,l=n instanceof qn,u=a[0],c=l||qs(n),d=function(e){var t=o.apply(Hn,Lt([e],a));return i&&h?t[0]:t};c&&r&&"function"==typeof u&&1!=u.length&&(l=c=!1);var h=this.__chain__,p=!!this.__actions__.length,f=s&&!h,m=l&&!p;if(!s&&c){n=m?n:new qn(this);var g=t.apply(n,a);return g.__actions__.push({func:fs,args:[d],thisArg:e}),new zn(g,h)}return f&&m?t.apply(this,a):(g=this.thru(d),f?i?g.value()[0]:g.value():g)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Hn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(qs(i)?i:[],e)}return this[n]((function(n){return t.apply(qs(n)?n:[],e)}))}})),wr(qn.prototype,(function(e,t){var n=Hn[t];if(n){var r=n.name+"";Pe.call(Ln,r)||(Ln[r]=[]),Ln[r].push({name:t,func:n})}})),Ln[Hi(e,2).name]=[{name:"wrapper",func:e}],qn.prototype.clone=function(){var e=new qn(this.__wrapped__);return e.__actions__=Ai(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ai(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ai(this.__views__),e},qn.prototype.reverse=function(){if(this.__filtered__){var e=new qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=qs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=bn(t,e+s);break;case"takeRight":e=_n(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,l=a-s,u=r?a:s-1,c=this.__iteratees__,d=c.length,h=0,p=bn(l,this.__takeCount__);if(!n||!r&&i==l&&p==l)return mi(e,this.__actions__);var f=[];e:for(;l--&&h<p;){for(var m=-1,g=e[u+=t];++m<d;){var v=c[m],y=v.iteratee,_=v.type,b=y(g);if(2==_)g=b;else if(!b){if(1==_)continue e;break e}}f[h++]=g}return f},Hn.prototype.at=ms,Hn.prototype.chain=function(){return ps(this)},Hn.prototype.commit=function(){return new zn(this.value(),this.__chain__)},Hn.prototype.next=function(){this.__values__===e&&(this.__values__=pa(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},Hn.prototype.plant=function(t){for(var n,r=this;r instanceof Un;){var i=Vo(r);i.__index__=0,i.__values__=e,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,n},Hn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qn){var n=t;return this.__actions__.length&&(n=new qn(this)),(n=n.reverse()).__actions__.push({func:fs,args:[ts],thisArg:e}),new zn(n,this.__chain__)}return this.thru(ts)},Hn.prototype.toJSON=Hn.prototype.valueOf=Hn.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Hn.prototype.first=Hn.prototype.head,st&&(Hn.prototype[st]=function(){return this}),Hn}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(dt._=fn,define((function(){return fn}))):pt?((pt.exports=fn)._=fn,ht._=fn):dt._=fn}.call(this),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,(function(){"use strict";var e,t;function n(){return e.apply(null,arguments)}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function a(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function d(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function h(e,t,n,r){return Lt(e,t,n,r,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function f(e){if(null==e._isValid){var n=p(e),r=t.call(n.parsedDateParts,(function(e){return null!=e})),i=!isNaN(e._d.getTime())&&n.overflow<0&&!n.empty&&!n.invalidEra&&!n.invalidMonth&&!n.invalidWeekday&&!n.weekdayMismatch&&!n.nullInput&&!n.invalidFormat&&!n.userInvalidated&&(!n.meridiem||n.meridiem&&r);if(e._strict&&(i=i&&0===n.charsLeftOver&&0===n.unusedTokens.length&&void 0===n.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function m(e){var t=h(NaN);return null!=e?d(p(t),e):p(t).userInvalidated=!0,t}t=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var g=n.momentProperties=[],v=!1;function y(e,t){var n,r,i,o=g.length;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=p(t)),a(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)a(i=t[r=g[n]])||(e[r]=i);return e}function _(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,n.updateOffset(this),v=!1)}function b(e){return e instanceof _||null!=e&&null!=e._isAMomentObject}function w(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function x(e,t){var r=!0;return d((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),r){var i,s,a,l=[],u=arguments.length;for(s=0;s<u;s++){if(i="","object"==typeof arguments[s]){for(a in i+="\n["+s+"] ",arguments[0])o(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[s];l.push(i)}w(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),r=!1}return t.apply(this,arguments)}),t)}var k,S={};function T(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),S[e]||(w(t),S[e]=!0)}function E(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function D(e,t){var n,r=d({},e);for(n in t)o(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},d(r[n],e[n]),d(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)o(e,n)&&!o(t,n)&&i(e[n])&&(r[n]=d({},r[n]));return r}function C(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,k=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};function M(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var A=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,I=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,L={},O={};function N(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(O[e]=i),t&&(O[t[0]]=function(){return M(i.apply(this,arguments),t[1],t[2])}),n&&(O[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function R(e,t){return e.isValid()?(t=P(t,e.localeData()),L[t]=L[t]||function(e){var t,n,r,i=e.match(A);for(t=0,n=i.length;t<n;t++)O[i[t]]?i[t]=O[i[t]]:i[t]=(r=i[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,o="";for(r=0;r<n;r++)o+=E(i[r])?i[r].call(t,e):i[r];return o}}(t),L[t](e)):e.localeData().invalidDate()}function P(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(I.lastIndex=0;n>=0&&I.test(e);)e=e.replace(I,r),I.lastIndex=0,n-=1;return e}var F={};function j(e,t){var n=e.toLowerCase();F[n]=F[n+"s"]=F[t]=e}function Y(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function V(e){var t,n,r={};for(n in e)o(e,n)&&(t=Y(n))&&(r[t]=e[n]);return r}var H={};function B(e,t){H[e]=t}function U(e){return e%4==0&&e%100!=0||e%400==0}function z(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function q(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=z(t)),n}function W(e,t){return function(r){return null!=r?(G(this,e,r),n.updateOffset(this,t),this):$(this,e)}}function $(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function G(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&U(e.year())&&1===e.month()&&29===e.date()?(n=q(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Me(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var K,Z=/\d/,X=/\d\d/,J=/\d{3}/,Q=/\d{4}/,ee=/[+-]?\d{6}/,te=/\d\d?/,ne=/\d\d\d\d?/,re=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,oe=/\d{1,4}/,se=/[+-]?\d{1,6}/,ae=/\d+/,le=/[+-]?\d+/,ue=/Z|[+-]\d\d:?\d\d/gi,ce=/Z|[+-]\d\d(?::?\d\d)?/gi,de=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function he(e,t,n){K[e]=E(t)?t:function(e,r){return e&&n?n:t}}function pe(e,t){return o(K,e)?K[e](t._strict,t._locale):new RegExp(fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}K={};var me={};function ge(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,n){n[t]=q(e)}),r=e.length,n=0;n<r;n++)me[e[n]]=i}function ve(e,t){ge(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function ye(e,t,n){null!=t&&o(me,e)&&me[e](t,n._a,n,e)}var _e,be=0,we=1,xe=2,ke=3,Se=4,Te=5,Ee=6,De=7,Ce=8;function Me(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?U(e)?29:28:31-r%7%2}_e=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},N("M",["MM",2],"Mo",(function(){return this.month()+1})),N("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),N("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),j("month","M"),B("month",8),he("M",te),he("MM",te,X),he("MMM",(function(e,t){return t.monthsShortRegex(e)})),he("MMMM",(function(e,t){return t.monthsRegex(e)})),ge(["M","MM"],(function(e,t){t[we]=q(e)-1})),ge(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[we]=i:p(n).invalidMonth=e}));var Ae="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ie="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Le=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Oe=de,Ne=de;function Re(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=_e.call(this._shortMonthsParse,s))?i:null:-1!==(i=_e.call(this._longMonthsParse,s))?i:null:"MMM"===t?-1!==(i=_e.call(this._shortMonthsParse,s))||-1!==(i=_e.call(this._longMonthsParse,s))?i:null:-1!==(i=_e.call(this._longMonthsParse,s))||-1!==(i=_e.call(this._shortMonthsParse,s))?i:null}function Pe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=q(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Me(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Fe(e){return null!=e?(Pe(this,e),n.updateOffset(this,!0),this):$(this,"Month")}function je(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],o=[];for(t=0;t<12;t++)n=h([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=fe(r[t]),i[t]=fe(i[t]);for(t=0;t<24;t++)o[t]=fe(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ye(e){return U(e)?366:365}N("Y",0,0,(function(){var e=this.year();return e<=9999?M(e,4):"+"+e})),N(0,["YY",2],0,(function(){return this.year()%100})),N(0,["YYYY",4],0,"year"),N(0,["YYYYY",5],0,"year"),N(0,["YYYYYY",6,!0],0,"year"),j("year","y"),B("year",1),he("Y",le),he("YY",te,X),he("YYYY",oe,Q),he("YYYYY",se,ee),he("YYYYYY",se,ee),ge(["YYYYY","YYYYYY"],be),ge("YYYY",(function(e,t){t[be]=2===e.length?n.parseTwoDigitYear(e):q(e)})),ge("YY",(function(e,t){t[be]=n.parseTwoDigitYear(e)})),ge("Y",(function(e,t){t[be]=parseInt(e,10)})),n.parseTwoDigitYear=function(e){return q(e)+(q(e)>68?1900:2e3)};var Ve=W("FullYear",!0);function He(e,t,n,r,i,o,s){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,i,o,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,i,o,s),a}function Be(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ue(e,t,n){var r=7+t-n;return-((7+Be(e,0,r).getUTCDay()-t)%7)+r-1}function ze(e,t,n,r,i){var o,s,a=1+7*(t-1)+(7+n-r)%7+Ue(e,r,i);return a<=0?s=Ye(o=e-1)+a:a>Ye(e)?(o=e+1,s=a-Ye(e)):(o=e,s=a),{year:o,dayOfYear:s}}function qe(e,t,n){var r,i,o=Ue(e.year(),t,n),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?r=s+We(i=e.year()-1,t,n):s>We(e.year(),t,n)?(r=s-We(e.year(),t,n),i=e.year()+1):(i=e.year(),r=s),{week:r,year:i}}function We(e,t,n){var r=Ue(e,t,n),i=Ue(e+1,t,n);return(Ye(e)-r+i)/7}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),B("week",5),B("isoWeek",5),he("w",te),he("ww",te,X),he("W",te),he("WW",te,X),ve(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=q(e)}));function $e(e,t){return e.slice(t,7).concat(e.slice(0,t))}N("d",0,"do","day"),N("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),N("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),N("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),B("day",11),B("weekday",11),B("isoWeekday",11),he("d",te),he("e",te),he("E",te),he("dd",(function(e,t){return t.weekdaysMinRegex(e)})),he("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),he("dddd",(function(e,t){return t.weekdaysRegex(e)})),ve(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:p(n).invalidWeekday=e})),ve(["d","e","E"],(function(e,t,n,r){t[r]=q(e)}));var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Xe=de,Je=de,Qe=de;function et(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=_e.call(this._weekdaysParse,s))?i:null:"ddd"===t?-1!==(i=_e.call(this._shortWeekdaysParse,s))?i:null:-1!==(i=_e.call(this._minWeekdaysParse,s))?i:null:"dddd"===t?-1!==(i=_e.call(this._weekdaysParse,s))||-1!==(i=_e.call(this._shortWeekdaysParse,s))||-1!==(i=_e.call(this._minWeekdaysParse,s))?i:null:"ddd"===t?-1!==(i=_e.call(this._shortWeekdaysParse,s))||-1!==(i=_e.call(this._weekdaysParse,s))||-1!==(i=_e.call(this._minWeekdaysParse,s))?i:null:-1!==(i=_e.call(this._minWeekdaysParse,s))||-1!==(i=_e.call(this._weekdaysParse,s))||-1!==(i=_e.call(this._shortWeekdaysParse,s))?i:null}function tt(){function e(e,t){return t.length-e.length}var t,n,r,i,o,s=[],a=[],l=[],u=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=fe(this.weekdaysMin(n,"")),i=fe(this.weekdaysShort(n,"")),o=fe(this.weekdays(n,"")),s.push(r),a.push(i),l.push(o),u.push(r),u.push(i),u.push(o);s.sort(e),a.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function nt(){return this.hours()%12||12}function rt(e,t){N(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function it(e,t){return t._meridiemParse}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,nt),N("k",["kk",2],0,(function(){return this.hours()||24})),N("hmm",0,0,(function(){return""+nt.apply(this)+M(this.minutes(),2)})),N("hmmss",0,0,(function(){return""+nt.apply(this)+M(this.minutes(),2)+M(this.seconds(),2)})),N("Hmm",0,0,(function(){return""+this.hours()+M(this.minutes(),2)})),N("Hmmss",0,0,(function(){return""+this.hours()+M(this.minutes(),2)+M(this.seconds(),2)})),rt("a",!0),rt("A",!1),j("hour","h"),B("hour",13),he("a",it),he("A",it),he("H",te),he("h",te),he("k",te),he("HH",te,X),he("hh",te,X),he("kk",te,X),he("hmm",ne),he("hmmss",re),he("Hmm",ne),he("Hmmss",re),ge(["H","HH"],ke),ge(["k","kk"],(function(e,t,n){var r=q(e);t[ke]=24===r?0:r})),ge(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),ge(["h","hh"],(function(e,t,n){t[ke]=q(e),p(n).bigHour=!0})),ge("hmm",(function(e,t,n){var r=e.length-2;t[ke]=q(e.substr(0,r)),t[Se]=q(e.substr(r)),p(n).bigHour=!0})),ge("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[ke]=q(e.substr(0,r)),t[Se]=q(e.substr(r,2)),t[Te]=q(e.substr(i)),p(n).bigHour=!0})),ge("Hmm",(function(e,t,n){var r=e.length-2;t[ke]=q(e.substr(0,r)),t[Se]=q(e.substr(r))})),ge("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[ke]=q(e.substr(0,r)),t[Se]=q(e.substr(r,2)),t[Te]=q(e.substr(i))}));var ot=W("Hours",!0);var st,at={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ae,monthsShort:Ie,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:Ze,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},lt={},ut={};function ct(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function dt(e){return e?e.toLowerCase().replace("_","-"):e}function ht(e){var t=null;if(void 0===lt[e]&&"undefined"!=typeof module&&module&&module.exports&&function(e){return null!=e.match("^[^/\\\\]*$")}(e))try{t=st._abbr,require("./locale/"+e),pt(t)}catch(t){lt[e]=null}return lt[e]}function pt(e,t){var n;return e&&((n=a(t)?mt(e):ft(e,t))?st=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),st._abbr}function ft(e,t){if(null!==t){var n,r=at;if(t.abbr=e,null!=lt[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=lt[e]._config;else if(null!=t.parentLocale)if(null!=lt[t.parentLocale])r=lt[t.parentLocale]._config;else{if(null==(n=ht(t.parentLocale)))return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;r=n._config}return lt[e]=new C(D(r,t)),ut[e]&&ut[e].forEach((function(e){ft(e.name,e.config)})),pt(e),lt[e]}return delete lt[e],null}function mt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return st;if(!r(e)){if(t=ht(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o<e.length;){for(t=(i=dt(e[o]).split("-")).length,n=(n=dt(e[o+1]))?n.split("-"):null;t>0;){if(r=ht(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&ct(i,n)>=t-1)break;t--}o++}return st}(e)}function gt(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[we]<0||n[we]>11?we:n[xe]<1||n[xe]>Me(n[be],n[we])?xe:n[ke]<0||n[ke]>24||24===n[ke]&&(0!==n[Se]||0!==n[Te]||0!==n[Ee])?ke:n[Se]<0||n[Se]>59?Se:n[Te]<0||n[Te]>59?Te:n[Ee]<0||n[Ee]>999?Ee:-1,p(e)._overflowDayOfYear&&(t<be||t>xe)&&(t=xe),p(e)._overflowWeeks&&-1===t&&(t=De),p(e)._overflowWeekday&&-1===t&&(t=Ce),p(e).overflow=t),e}var vt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,bt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],wt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],xt=/^\/?Date\((-?\d+)/i,kt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Tt(e){var t,n,r,i,o,s,a=e._i,l=vt.exec(a)||yt.exec(a),u=bt.length,c=wt.length;if(l){for(p(e).iso=!0,t=0,n=u;t<n;t++)if(bt[t][1].exec(l[1])){i=bt[t][0],r=!1!==bt[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=c;t<n;t++)if(wt[t][1].exec(l[3])){o=(l[2]||" ")+wt[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(l[4]){if(!_t.exec(l[4]))return void(e._isValid=!1);s="Z"}e._f=i+(o||"")+(s||""),At(e)}else e._isValid=!1}function Et(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Dt(e){var t,n,r,i,o,s,a,l,u=kt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){if(n=u[4],r=u[3],i=u[2],o=u[5],s=u[6],a=u[7],l=[Et(n),Ie.indexOf(r),parseInt(i,10),parseInt(o,10),parseInt(s,10)],a&&l.push(parseInt(a,10)),t=l,!function(e,t,n){return!e||Ke.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(p(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(u[8],u[9],u[10]),e._d=Be.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0}else e._isValid=!1}function Ct(e,t,n){return null!=e?e:null!=t?t:n}function Mt(e){var t,r,i,o,s,a=[];if(!e._d){for(i=function(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[xe]&&null==e._a[we]&&function(e){var t,n,r,i,o,s,a,l,u;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(o=1,s=4,n=Ct(t.GG,e._a[be],qe(Ot(),1,4).year),r=Ct(t.W,1),((i=Ct(t.E,1))<1||i>7)&&(l=!0)):(o=e._locale._week.dow,s=e._locale._week.doy,u=qe(Ot(),o,s),n=Ct(t.gg,e._a[be],u.year),r=Ct(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o);r<1||r>We(n,o,s)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(a=ze(n,r,i,o,s),e._a[be]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(s=Ct(e._a[be],i[be]),(e._dayOfYear>Ye(s)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),r=Be(s,0,e._dayOfYear),e._a[we]=r.getUTCMonth(),e._a[xe]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=i[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ke]&&0===e._a[Se]&&0===e._a[Te]&&0===e._a[Ee]&&(e._nextDay=!0,e._a[ke]=0),e._d=(e._useUTC?Be:He).apply(null,a),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ke]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}function At(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],p(e).empty=!0;var t,r,i,o,s,a,l,u=""+e._i,c=u.length,d=0;for(l=(i=P(e._f,e._locale).match(A)||[]).length,t=0;t<l;t++)o=i[t],(r=(u.match(pe(o,e))||[])[0])&&((s=u.substr(0,u.indexOf(r))).length>0&&p(e).unusedInput.push(s),u=u.slice(u.indexOf(r)+r.length),d+=r.length),O[o]?(r?p(e).empty=!1:p(e).unusedTokens.push(o),ye(o,r,e)):e._strict&&!r&&p(e).unusedTokens.push(o);p(e).charsLeftOver=c-d,u.length>0&&p(e).unusedInput.push(u),e._a[ke]<=12&&!0===p(e).bigHour&&e._a[ke]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[ke]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[ke],e._meridiem),null!==(a=p(e).era)&&(e._a[be]=e._locale.erasConvertYear(a,e._a[be])),Mt(e),gt(e)}else Dt(e);else Tt(e)}function It(e){var t=e._i,o=e._f;return e._locale=e._locale||mt(e._l),null===t||void 0===o&&""===t?m({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new _(gt(t)):(u(t)?e._d=t:r(o)?function(e){var t,n,r,i,o,s,a=!1,l=e._f.length;if(0===l)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)o=0,s=!1,t=y({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],At(t),f(t)&&(s=!0),o+=p(t).charsLeftOver,o+=10*p(t).unusedTokens.length,p(t).score=o,a?o<r&&(r=o,n=t):(null==r||o<r||s)&&(r=o,n=t,s&&(a=!0));d(e,n||t)}(e):o?At(e):function(e){var t=e._i;a(t)?e._d=new Date(n.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=xt.exec(e._i);null===t?(Tt(e),!1===e._isValid&&(delete e._isValid,Dt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:n.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):r(t)?(e._a=c(t.slice(0),(function(e){return parseInt(e,10)})),Mt(e)):i(t)?function(e){if(!e._d){var t=V(e._i),n=void 0===t.day?t.date:t.day;e._a=c([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Mt(e)}}(e):l(t)?e._d=new Date(t):n.createFromInputFallback(e)}(e),f(e)||(e._d=null),e))}function Lt(e,t,n,o,a){var l,u={};return!0!==t&&!1!==t||(o=t,t=void 0),!0!==n&&!1!==n||(o=n,n=void 0),(i(e)&&s(e)||r(e)&&0===e.length)&&(e=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=a,u._l=n,u._i=e,u._f=t,u._strict=o,(l=new _(gt(It(u))))._nextDay&&(l.add(1,"d"),l._nextDay=void 0),l}function Ot(e,t,n,r){return Lt(e,t,n,r,!1)}n.createFromInputFallback=x("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),n.ISO_8601=function(){},n.RFC_2822=function(){};var Nt=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:m()})),Rt=x("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:m()}));function Pt(e,t){var n,i;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return Ot();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}var Ft=["year","quarter","month","week","day","hour","minute","second","millisecond"];function jt(e){var t=V(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,a=t.day||0,l=t.hour||0,u=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,i=Ft.length;for(t in e)if(o(e,t)&&(-1===_e.call(Ft,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Ft[n]]){if(r)return!1;parseFloat(e[Ft[n]])!==q(e[Ft[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*c+6e4*u+1e3*l*60*60,this._days=+a+7*s,this._months=+i+3*r+12*n,this._data={},this._locale=mt(),this._bubble()}function Yt(e){return e instanceof jt}function Vt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ht(e,t){N(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+M(~~(e/60),2)+t+M(~~e%60,2)}))}Ht("Z",":"),Ht("ZZ",""),he("Z",ce),he("ZZ",ce),ge(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Ut(ce,e)}));var Bt=/([\+\-]|\d\d)/gi;function Ut(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(Bt)||["-",0,0])[1]+q(n[2]))?0:"+"===n[0]?r:-r}function zt(e,t){var r,i;return t._isUTC?(r=t.clone(),i=(b(e)||u(e)?e.valueOf():Ot(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),n.updateOffset(r,!1),r):Ot(e).local()}function qt(e){return-Math.round(e._d.getTimezoneOffset())}function Wt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}n.updateOffset=function(){};var $t=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Gt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Kt(e,t){var n,r,i,s=e,a=null;return Yt(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(a=$t.exec(e))?(n="-"===a[1]?-1:1,s={y:0,d:q(a[xe])*n,h:q(a[ke])*n,m:q(a[Se])*n,s:q(a[Te])*n,ms:q(Vt(1e3*a[Ee]))*n}):(a=Gt.exec(e))?(n="-"===a[1]?-1:1,s={y:Zt(a[2],n),M:Zt(a[3],n),w:Zt(a[4],n),d:Zt(a[5],n),h:Zt(a[6],n),m:Zt(a[7],n),s:Zt(a[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=zt(t,e),e.isBefore(t)?n=Xt(e,t):((n=Xt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Ot(s.from),Ot(s.to)),(s={}).ms=i.milliseconds,s.M=i.months),r=new jt(s),Yt(e)&&o(e,"_locale")&&(r._locale=e._locale),Yt(e)&&o(e,"_isValid")&&(r._isValid=e._isValid),r}function Zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Xt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Jt(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Qt(this,Kt(n,r),e),this}}function Qt(e,t,r,i){var o=t._milliseconds,s=Vt(t._days),a=Vt(t._months);e.isValid()&&(i=null==i||i,a&&Pe(e,$(e,"Month")+a*r),s&&G(e,"Date",$(e,"Date")+s*r),o&&e._d.setTime(e._d.valueOf()+o*r),i&&n.updateOffset(e,s||a))}Kt.fn=jt.prototype,Kt.invalid=function(){return Kt(NaN)};var en=Jt(1,"add"),tn=Jt(-1,"subtract");function nn(e){return"string"==typeof e||e instanceof String}function rn(e){return b(e)||u(e)||nn(e)||l(e)||function(e){var t=r(e),n=!1;t&&(n=0===e.filter((function(t){return!l(t)&&nn(e)})).length);return t&&n}(e)||function(e){var t,n,r=i(e)&&!s(e),a=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=l.length;for(t=0;t<u;t+=1)n=l[t],a=a||o(e,n);return r&&a}(e)||null==e}function on(e,t){if(e.date()<t.date())return-on(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function sn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=mt(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var an=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ln(){return this._locale}var un=1e3,cn=6e4,dn=36e5,hn=126227808e5;function pn(e,t){return(e%t+t)%t}function fn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-hn:new Date(e,t,n).valueOf()}function mn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-hn:Date.UTC(e,t,n)}function gn(e,t){return t.erasAbbrRegex(e)}function vn(){var e,t,n=[],r=[],i=[],o=[],s=this.eras();for(e=0,t=s.length;e<t;++e)r.push(fe(s[e].name)),n.push(fe(s[e].abbr)),i.push(fe(s[e].narrow)),o.push(fe(s[e].name)),o.push(fe(s[e].abbr)),o.push(fe(s[e].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}function yn(e,t){N(0,[e,e.length],0,t)}function _n(e,t,n,r,i){var o;return null==e?qe(this,r,i).year:(t>(o=We(e,r,i))&&(t=o),bn.call(this,e,t,n,r,i))}function bn(e,t,n,r,i){var o=ze(e,t,n,r,i),s=Be(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}N("N",0,0,"eraAbbr"),N("NN",0,0,"eraAbbr"),N("NNN",0,0,"eraAbbr"),N("NNNN",0,0,"eraName"),N("NNNNN",0,0,"eraNarrow"),N("y",["y",1],"yo","eraYear"),N("y",["yy",2],0,"eraYear"),N("y",["yyy",3],0,"eraYear"),N("y",["yyyy",4],0,"eraYear"),he("N",gn),he("NN",gn),he("NNN",gn),he("NNNN",(function(e,t){return t.erasNameRegex(e)})),he("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),ge(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?p(n).era=i:p(n).invalidEra=e})),he("y",ae),he("yy",ae),he("yyy",ae),he("yyyy",ae),he("yo",(function(e,t){return t._eraYearOrdinalRegex||ae})),ge(["y","yy","yyy","yyyy"],be),ge(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[be]=n._locale.eraYearOrdinalParse(e,i):t[be]=parseInt(e,10)})),N(0,["gg",2],0,(function(){return this.weekYear()%100})),N(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),yn("gggg","weekYear"),yn("ggggg","weekYear"),yn("GGGG","isoWeekYear"),yn("GGGGG","isoWeekYear"),j("weekYear","gg"),j("isoWeekYear","GG"),B("weekYear",1),B("isoWeekYear",1),he("G",le),he("g",le),he("GG",te,X),he("gg",te,X),he("GGGG",oe,Q),he("gggg",oe,Q),he("GGGGG",se,ee),he("ggggg",se,ee),ve(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=q(e)})),ve(["gg","GG"],(function(e,t,r,i){t[i]=n.parseTwoDigitYear(e)})),N("Q",0,"Qo","quarter"),j("quarter","Q"),B("quarter",7),he("Q",Z),ge("Q",(function(e,t){t[we]=3*(q(e)-1)})),N("D",["DD",2],"Do","date"),j("date","D"),B("date",9),he("D",te),he("DD",te,X),he("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ge(["D","DD"],xe),ge("Do",(function(e,t){t[xe]=q(e.match(te)[0])}));var wn=W("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),j("dayOfYear","DDD"),B("dayOfYear",4),he("DDD",ie),he("DDDD",J),ge(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=q(e)})),N("m",["mm",2],0,"minute"),j("minute","m"),B("minute",14),he("m",te),he("mm",te,X),ge(["m","mm"],Se);var xn=W("Minutes",!1);N("s",["ss",2],0,"second"),j("second","s"),B("second",15),he("s",te),he("ss",te,X),ge(["s","ss"],Te);var kn,Sn,Tn=W("Seconds",!1);for(N("S",0,0,(function(){return~~(this.millisecond()/100)})),N(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),N(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),N(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),N(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),N(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),N(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),j("millisecond","ms"),B("millisecond",16),he("S",ie,Z),he("SS",ie,X),he("SSS",ie,J),kn="SSSS";kn.length<=9;kn+="S")he(kn,ae);function En(e,t){t[Ee]=q(1e3*("0."+e))}for(kn="S";kn.length<=9;kn+="S")ge(kn,En);Sn=W("Milliseconds",!1),N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");var Dn=_.prototype;function Cn(e){return e}Dn.add=en,Dn.calendar=function(e,t){1===arguments.length&&(arguments[0]?rn(arguments[0])?(e=arguments[0],t=void 0):function(e){var t,n=i(e)&&!s(e),r=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)r=r||o(e,a[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Ot(),a=zt(r,this).startOf("day"),l=n.calendarFormat(this,a)||"sameElse",u=t&&(E(t[l])?t[l].call(this,r):t[l]);return this.format(u||this.localeData().calendar(l,this,Ot(r)))},Dn.clone=function(){return new _(this)},Dn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=zt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=Y(t)){case"year":o=on(this,r)/12;break;case"month":o=on(this,r);break;case"quarter":o=on(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:z(o)},Dn.endOf=function(e){var t,r;if(void 0===(e=Y(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mn:fn,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=dn-pn(t+(this._isUTC?0:this.utcOffset()*cn),dn)-1;break;case"minute":t=this._d.valueOf(),t+=cn-pn(t,cn)-1;break;case"second":t=this._d.valueOf(),t+=un-pn(t,un)-1}return this._d.setTime(t),n.updateOffset(this,!0),this},Dn.format=function(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=R(this,e);return this.localeData().postformat(t)},Dn.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Ot(e).isValid())?Kt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Dn.fromNow=function(e){return this.from(Ot(),e)},Dn.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Ot(e).isValid())?Kt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Dn.toNow=function(e){return this.to(Ot(),e)},Dn.get=function(e){return E(this[e=Y(e)])?this[e]():this},Dn.invalidAt=function(){return p(this).overflow},Dn.isAfter=function(e,t){var n=b(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=Y(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Dn.isBefore=function(e,t){var n=b(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=Y(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Dn.isBetween=function(e,t,n,r){var i=b(e)?e:Ot(e),o=b(t)?t:Ot(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&(("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n)))},Dn.isSame=function(e,t){var n,r=b(e)?e:Ot(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=Y(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Dn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Dn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Dn.isValid=function(){return f(this)},Dn.lang=an,Dn.locale=sn,Dn.localeData=ln,Dn.max=Rt,Dn.min=Nt,Dn.parsingFlags=function(){return d({},p(this))},Dn.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:H[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=V(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(E(this[e=Y(e)]))return this[e](t);return this},Dn.startOf=function(e){var t,r;if(void 0===(e=Y(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mn:fn,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=pn(t+(this._isUTC?0:this.utcOffset()*cn),dn);break;case"minute":t=this._d.valueOf(),t-=pn(t,cn);break;case"second":t=this._d.valueOf(),t-=pn(t,un)}return this._d.setTime(t),n.updateOffset(this,!0),this},Dn.subtract=tn,Dn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Dn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Dn.toDate=function(){return new Date(this.valueOf())},Dn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?R(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",R(n,"Z")):R(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Dn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",i="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY","-MM-DD[T]HH:mm:ss.SSS",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Dn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Dn.toJSON=function(){return this.isValid()?this.toISOString():null},Dn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Dn.unix=function(){return Math.floor(this.valueOf()/1e3)},Dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Dn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},Dn.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},Dn.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},Dn.eraYear=function(){var e,t,r,i,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(r=o[e].since<=o[e].until?1:-1,i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-n(o[e].since).year())*r+o[e].offset;return this.year()},Dn.year=Ve,Dn.isLeapYear=function(){return U(this.year())},Dn.weekYear=function(e){return _n.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Dn.isoWeekYear=function(e){return _n.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Dn.quarter=Dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Dn.month=Fe,Dn.daysInMonth=function(){return Me(this.year(),this.month())},Dn.week=Dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Dn.isoWeek=Dn.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Dn.weeksInYear=function(){var e=this.localeData()._week;return We(this.year(),e.dow,e.doy)},Dn.weeksInWeekYear=function(){var e=this.localeData()._week;return We(this.weekYear(),e.dow,e.doy)},Dn.isoWeeksInYear=function(){return We(this.year(),1,4)},Dn.isoWeeksInISOWeekYear=function(){return We(this.isoWeekYear(),1,4)},Dn.date=wn,Dn.day=Dn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Dn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Dn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Dn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Dn.hour=Dn.hours=ot,Dn.minute=Dn.minutes=xn,Dn.second=Dn.seconds=Tn,Dn.millisecond=Dn.milliseconds=Sn,Dn.utcOffset=function(e,t,r){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(ce,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(i=qt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Qt(this,Kt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:qt(this)},Dn.utc=function(e){return this.utcOffset(0,e)},Dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qt(this),"m")),this},Dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(ue,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ot(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Dn.isUtc=Wt,Dn.isUTC=Wt,Dn.zoneAbbr=function(){return this._isUTC?"UTC":""},Dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Dn.dates=x("dates accessor is deprecated. Use date instead.",wn),Dn.months=x("months accessor is deprecated. Use month instead",Fe),Dn.years=x("years accessor is deprecated. Use year instead",Ve),Dn.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),Dn.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e,t={};return y(t,this),(t=It(t))._a?(e=t._isUTC?h(t._a):Ot(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&q(e[r])!==q(t[r]))&&s++;return s+o}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var Mn=C.prototype;function An(e,t,n,r){var i=mt(),o=h().set(r,t);return i[n](o,e)}function In(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return An(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=An(e,r,n,"month");return i}function Ln(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var i,o=mt(),s=e?o._week.dow:0,a=[];if(null!=n)return An(t,(n+s)%7,r,"day");for(i=0;i<7;i++)a[i]=An(t,(i+s)%7,r,"day");return a}Mn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return E(r)?r.call(t,n):r},Mn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(A).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Mn.invalidDate=function(){return this._invalidDate},Mn.ordinal=function(e){return this._ordinal.replace("%d",e)},Mn.preparse=Cn,Mn.postformat=Cn,Mn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return E(i)?i(e,t,n,r):i.replace(/%d/i,e)},Mn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return E(n)?n(t):n.replace(/%s/i,t)},Mn.set=function(e){var t,n;for(n in e)o(e,n)&&(E(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Mn.eras=function(e,t){var r,i,o,s=this._eras||mt("en")._eras;for(r=0,i=s.length;r<i;++r){if("string"==typeof s[r].since)o=n(s[r].since).startOf("day"),s[r].since=o.valueOf();switch(typeof s[r].until){case"undefined":s[r].until=1/0;break;case"string":o=n(s[r].until).startOf("day").valueOf(),s[r].until=o.valueOf()}}return s},Mn.erasParse=function(e,t,n){var r,i,o,s,a,l=this.eras();for(e=e.toUpperCase(),r=0,i=l.length;r<i;++r)if(o=l[r].name.toUpperCase(),s=l[r].abbr.toUpperCase(),a=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(s===e)return l[r];break;case"NNNN":if(o===e)return l[r];break;case"NNNNN":if(a===e)return l[r]}else if([o,s,a].indexOf(e)>=0)return l[r]},Mn.erasConvertYear=function(e,t){var r=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*r},Mn.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||vn.call(this),e?this._erasAbbrRegex:this._erasRegex},Mn.erasNameRegex=function(e){return o(this,"_erasNameRegex")||vn.call(this),e?this._erasNameRegex:this._erasRegex},Mn.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||vn.call(this),e?this._erasNarrowRegex:this._erasRegex},Mn.months=function(e,t){return e?r(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Le).test(t)?"format":"standalone"][e.month()]:r(this._months)?this._months:this._months.standalone},Mn.monthsShort=function(e,t){return e?r(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Le.test(t)?"format":"standalone"][e.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Mn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return Re.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},Mn.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Ne),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Mn.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Oe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Mn.week=function(e){return qe(e,this._week.dow,this._week.doy).week},Mn.firstDayOfYear=function(){return this._week.doy},Mn.firstDayOfWeek=function(){return this._week.dow},Mn.weekdays=function(e,t){var n=r(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?$e(n,this._week.dow):e?n[e.day()]:n},Mn.weekdaysMin=function(e){return!0===e?$e(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Mn.weekdaysShort=function(e){return!0===e?$e(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Mn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return et.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},Mn.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||tt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Mn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||tt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Je),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Mn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||tt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Qe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Mn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Mn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===q(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=x("moment.lang is deprecated. Use moment.locale instead.",pt),n.langData=x("moment.langData is deprecated. Use moment.localeData instead.",mt);var On=Math.abs;function Nn(e,t,n,r){var i=Kt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Rn(e){return e<0?Math.floor(e):Math.ceil(e)}function Pn(e){return 4800*e/146097}function Fn(e){return 146097*e/4800}function jn(e){return function(){return this.as(e)}}var Yn=jn("ms"),Vn=jn("s"),Hn=jn("m"),Bn=jn("h"),Un=jn("d"),zn=jn("w"),qn=jn("M"),Wn=jn("Q"),$n=jn("y");function Gn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Kn=Gn("milliseconds"),Zn=Gn("seconds"),Xn=Gn("minutes"),Jn=Gn("hours"),Qn=Gn("days"),er=Gn("months"),tr=Gn("years");var nr=Math.round,rr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ir(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var or=Math.abs;function sr(e){return(e>0)-(e<0)||+e}function ar(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,s,a,l=or(this._milliseconds)/1e3,u=or(this._days),c=or(this._months),d=this.asSeconds();return d?(e=z(l/60),t=z(e/60),l%=60,e%=60,n=z(c/12),c%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=sr(this._months)!==sr(d)?"-":"",s=sr(this._days)!==sr(d)?"-":"",a=sr(this._milliseconds)!==sr(d)?"-":"",i+"P"+(n?o+n+"Y":"")+(c?o+c+"M":"")+(u?s+u+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+r+"S":"")):"P0D"}var lr=jt.prototype;return lr.isValid=function(){return this._isValid},lr.abs=function(){var e=this._data;return this._milliseconds=On(this._milliseconds),this._days=On(this._days),this._months=On(this._months),e.milliseconds=On(e.milliseconds),e.seconds=On(e.seconds),e.minutes=On(e.minutes),e.hours=On(e.hours),e.months=On(e.months),e.years=On(e.years),this},lr.add=function(e,t){return Nn(this,e,t,1)},lr.subtract=function(e,t){return Nn(this,e,t,-1)},lr.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=Y(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Pn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Fn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},lr.asMilliseconds=Yn,lr.asSeconds=Vn,lr.asMinutes=Hn,lr.asHours=Bn,lr.asDays=Un,lr.asWeeks=zn,lr.asMonths=qn,lr.asQuarters=Wn,lr.asYears=$n,lr.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12):NaN},lr._bubble=function(){var e,t,n,r,i,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*Rn(Fn(a)+s),s=0,a=0),l.milliseconds=o%1e3,e=z(o/1e3),l.seconds=e%60,t=z(e/60),l.minutes=t%60,n=z(t/60),l.hours=n%24,s+=z(n/24),a+=i=z(Pn(s)),s-=Rn(Fn(i)),r=z(a/12),a%=12,l.days=s,l.months=a,l.years=r,this},lr.clone=function(){return Kt(this)},lr.get=function(e){return e=Y(e),this.isValid()?this[e+"s"]():NaN},lr.milliseconds=Kn,lr.seconds=Zn,lr.minutes=Xn,lr.hours=Jn,lr.days=Qn,lr.weeks=function(){return z(this.days()/7)},lr.months=er,lr.years=tr,lr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=rr;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},rr,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),r=function(e,t,n,r){var i=Kt(e).abs(),o=nr(i.as("s")),s=nr(i.as("m")),a=nr(i.as("h")),l=nr(i.as("d")),u=nr(i.as("M")),c=nr(i.as("w")),d=nr(i.as("y")),h=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(h=h||c<=1&&["w"]||c<n.w&&["ww",c]),(h=h||u<=1&&["M"]||u<n.M&&["MM",u]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,ir.apply(null,h)}(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},lr.toISOString=ar,lr.toString=ar,lr.toJSON=ar,lr.locale=sn,lr.localeData=ln,lr.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ar),lr.lang=an,N("X",0,0,"unix"),N("x",0,0,"valueOf"),he("x",le),he("X",/[+-]?\d+(\.\d{1,3})?/),ge("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),ge("x",(function(e,t,n){n._d=new Date(q(e))})),
506
506
  //! moment.js
507
507
  n.version="2.29.4",e=Ot,n.fn=Dn,n.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},n.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},n.now=function(){return Date.now?Date.now():+new Date},n.utc=h,n.unix=function(e){return Ot(1e3*e)},n.months=function(e,t){return In(e,t,"months")},n.isDate=u,n.locale=pt,n.invalid=m,n.duration=Kt,n.isMoment=b,n.weekdays=function(e,t,n){return Ln(e,t,n,"weekdays")},n.parseZone=function(){return Ot.apply(null,arguments).parseZone()},n.localeData=mt,n.isDuration=Yt,n.monthsShort=function(e,t){return In(e,t,"monthsShort")},n.weekdaysMin=function(e,t,n){return Ln(e,t,n,"weekdaysMin")},n.defineLocale=ft,n.updateLocale=function(e,t){if(null!=t){var n,r,i=at;null!=lt[e]&&null!=lt[e].parentLocale?lt[e].set(D(lt[e]._config,t)):(null!=(r=ht(e))&&(i=r._config),t=D(i,t),null==r&&(t.abbr=e),(n=new C(t)).parentLocale=lt[e],lt[e]=n),pt(e)}else null!=lt[e]&&(null!=lt[e].parentLocale?(lt[e]=lt[e].parentLocale,e===pt()&&pt(e)):null!=lt[e]&&delete lt[e]);return lt[e]},n.locales=function(){return k(lt)},n.weekdaysShort=function(e,t,n){return Ln(e,t,n,"weekdaysShort")},n.normalizeUnits=Y,n.relativeTimeRounding=function(e){return void 0===e?nr:"function"==typeof e&&(nr=e,!0)},n.relativeTimeThreshold=function(e,t){return void 0!==rr[e]&&(void 0===t?rr[e]:(rr[e]=t,"s"===e&&(rr.ss=t-1),!0))},n.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},n.prototype=Dn,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n})),//! moment-timezone.js
508
508
  //! version : 0.5.45
@@ -515,7 +515,7 @@ FullCalendar v5.3.1
515
515
  Docs & License: https://fullcalendar.io/
516
516
  (c) 2020 Adam Shaw
517
517
  */
518
- var FullCalendar=function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};function n(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}var o,s,a,l,u,c,d,h={},p=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function m(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var r,i=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(i[r]);if(null!=n&&(o.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===o[r]&&(o[r]=e.defaultProps[r]);return y(e,o,t&&t.key,t&&t.ref,null)}function y(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(s.__v=s),o.vnode&&o.vnode(s),s}function _(e){return e.children}function b(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?w(e):null}function x(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return x(e)}}function k(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!a++||u!==o.debounceRendering)&&((u=o.debounceRendering)||l)(S)}function S(){for(var e;a=s.length;)e=s.sort((function(e,t){return e.__v.__b-t.__v.__b})),s=[],e.some((function(e){var t,n,r,i,o,s,a;e.__d&&(s=(o=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=m({},o)).__v=r,i=A(a,o,r,t.__n,void 0!==a.ownerSVGElement,null,n,null==s?w(o):s),I(n,o),i!=s&&x(o)))}))}function T(e,t,n,r,i,o,s,a,l){var u,c,d,f,m,v,y,_=n&&n.__k||p,b=_.length;if(a==h&&(a=null!=o?o[0]:b?w(n,0):null),u=0,t.__k=E(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=_[u])||d&&n.key==d.key&&n.type===d.type)_[u]=void 0;else for(c=0;c<b;c++){if((d=_[c])&&n.key==d.key&&n.type===d.type){_[c]=void 0;break}d=null}if(f=A(e,n,d=d||h,r,i,o,s,a,l),(c=n.ref)&&d.ref!=c&&(y||(y=[]),d.ref&&y.push(d.ref,null,n),y.push(c,n.__c||f,n)),null!=f){var p;if(null==v&&(v=f),void 0!==n.__d)p=n.__d,n.__d=void 0;else if(o==d||f!=a||null==f.parentNode){e:if(null==a||a.parentNode!==e)e.appendChild(f),p=null;else{for(m=a,c=0;(m=m.nextSibling)&&c<b;c+=2)if(m==f)break e;e.insertBefore(f,a),p=a}"option"==t.type&&(e.value="")}a=void 0!==p?p:f.nextSibling,"function"==typeof t.type&&(t.__d=a)}else a&&d.__e==a&&a.parentNode!=e&&(a=w(d))}return u++,n})),t.__e=v,null!=o&&"function"!=typeof t.type)for(u=o.length;u--;)null!=o[u]&&g(o[u]);for(u=b;u--;)null!=_[u]&&N(_[u],_[u]);if(y)for(u=0;u<y.length;u++)O(y[u],y[++u],y[++u])}function E(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)E(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?y(null,e,null,null,e):null!=e.__e||null!=e.__c?y(e.type,e.props,e.key,null,e.__v):e):e);return n}function D(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===f.test(t)?n+"px":null==n?"":n}function C(e,t,n,r,i){var o,s,a,l,u;if(i?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(o=e.style,"string"==typeof n)o.cssText=n;else{if("string"==typeof r&&(o.cssText="",r=null),r)for(l in r)n&&l in n||D(o,l,"");if(n)for(u in n)r&&n[u]===r[u]||D(o,u,n[u])}else"o"===t[0]&&"n"===t[1]?(s=t!==(t=t.replace(/Capture$/,"")),a=t.toLowerCase(),t=(a in e?a:t).slice(2),n?(r||e.addEventListener(t,M,s),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,M,s)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!i&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function M(e){this.l[e.type](o.event?o.event(e):e)}function A(e,t,n,r,i,s,a,l,u){var c,d,h,p,f,g,v,y,w,x,k=t.type;if(void 0!==t.constructor)return null;(c=o.__b)&&c(t);try{e:if("function"==typeof k){if(y=t.props,w=(c=k.contextType)&&r[c.__c],x=c?w?w.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(y,x):(t.__c=d=new b(y,x),d.constructor=k,d.render=R),w&&w.sub(d),d.props=y,d.state||(d.state={}),d.context=x,d.__n=r,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=m({},d.__s)),m(d.__s,k.getDerivedStateFromProps(y,d.__s))),p=d.props,f=d.state,h)null==k.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==k.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,x)||t.__v===n.__v&&!d.__){for(d.props=y,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,d.__h.length&&a.push(d),c=0;c<t.__k.length;c++)t.__k[c]&&(t.__k[c].__=t);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,g)}))}d.context=x,d.props=y,d.state=d.__s,(c=o.__r)&&c(t),d.__d=!1,d.__v=t,d.__P=e,c=d.render(d.props,d.state,d.context),t.__k=null!=c&&c.type==_&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=d.getChildContext&&(r=m(m({},r),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(p,f)),T(e,t,n,r,i,s,a,l,u),d.base=t.__e,d.__h.length&&a.push(d),v&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=L(n.__e,t,n,r,i,s,a,u);(c=o.diffed)&&c(t)}catch(e){t.__v=null,o.__e(e,t,n)}return t.__e}function I(e,t){o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function L(e,t,n,r,i,o,s,a){var l,u,c,d,f,m=n.props,g=t.props;if(i="svg"===t.type||i,null!=o)for(l=0;l<o.length;l++)if(null!=(u=o[l])&&((null===t.type?3===u.nodeType:u.localName===t.type)||e==u)){e=u,o[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,g.is&&{is:g.is}),o=null,a=!1}if(null===t.type)m!==g&&e.data!=g&&(e.data=g);else{if(null!=o&&(o=p.slice.call(e.childNodes)),c=(m=n.props||h).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!a){if(m===h)for(m={},f=0;f<e.attributes.length;f++)m[e.attributes[f].name]=e.attributes[f].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__html||""))}(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||C(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||C(e,o,t[o],n[o],r)})(e,g,m,i,a),d?t.__k=[]:(t.__k=t.props.children,T(e,t,n,r,"foreignObject"!==t.type&&i,o,s,h,a)),a||("value"in g&&void 0!==(l=g.value)&&l!==e.value&&C(e,"value",l,m.value,!1),"checked"in g&&void 0!==(l=g.checked)&&l!==e.checked&&C(e,"checked",l,m.checked,!1))}return e}function O(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){o.__e(e,n)}}function N(e,t,n){var r,i,s;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||O(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&N(r[s],t,n);null!=i&&g(i)}function R(e,t,n){return this.constructor(e,n)}function P(e,t,n){var r,i,s;o.__&&o.__(e,t),i=(r=n===c)?null:n&&n.__k||t.__k,e=v(_,null,[e]),s=[],A(t,(r?t:n||t).__k=e,i||h,h,void 0!==t.ownerSVGElement,n&&!r?[n]:i?null:p.slice.call(t.childNodes),s,n||h,r),I(s,e)}o={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return k(n.__E=n)}catch(t){e=t}throw e}},b.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),k(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},b.prototype.render=_,s=[],a=0,l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=h,d=0,("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:b,createElement:v,render:P,createRef:function(){return{}},Fragment:_,createContext:function(e){var t=function(e){var t={},n={__c:"__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,k(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}(e),n=t.Provider;return t.Provider=function(){var e=this,t=!this.getChildContext,r=n.apply(this,arguments);if(t){var i=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&i.some((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}}return r},t},flushToDom:function(){var e=o.debounceRendering,t=[];for(o.debounceRendering=function(e){t.push(e)},P(v(F,{}),document.createElement("div"));t.length;)t.shift()();o.debounceRendering=e}};var F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return v("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(b),j=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId]})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),e}();function Y(e){e.parentNode&&e.parentNode.removeChild(e)}function V(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(H(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function H(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function B(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].querySelectorAll(t),s=0;s<o.length;s++)r.push(o[s]);return r}var U=/(top|left|right|bottom|width|height)$/i;function z(e,t){for(var n in t)q(e,n,t[n])}function q(e,t,n){null==n?e.style[t]="":"number"==typeof n&&U.test(t)?e.style[t]=n+"px":e.style[t]=n}function W(e){e.preventDefault()}function $(e,t){return function(n){var r=V(n.target,e);r&&t.call(r,n,r)}}function G(e,t,n,r){var i=$(n,r);return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var K=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Z(e,t){var n=function(r){t(r),K.forEach((function(t){e.removeEventListener(t,n)}))};K.forEach((function(t){e.addEventListener(t,n)}))}var X=0;function J(){return String(X++)}function Q(){document.body.classList.add("fc-not-allowed")}function ee(){document.body.classList.remove("fc-not-allowed")}function te(e){e.classList.add("fc-unselectable"),e.addEventListener("selectstart",W)}function ne(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",W)}function re(e){e.addEventListener("contextmenu",W)}function ie(e){e.removeEventListener("contextmenu",W)}function oe(e){var t,n,r=[],i=[];for("string"==typeof e?i=e.split(/\s*,\s*/):"function"==typeof e?i=[e]:Array.isArray(e)&&(i=e),t=0;t<i.length;t++)"string"==typeof(n=i[t])?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function se(e,t,n){var r,i;for(r=0;r<n.length;r++)if(i=ae(e,t,n[r]))return i;return 0}function ae(e,t,n){return n.func?n.func(e,t):le(e[n.field],t[n.field])*(n.order||1)}function le(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}function ue(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function ce(e,t){return e-t}function de(e){return e%1==0}function he(e){var t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var pe=["sun","mon","tue","wed","thu","fri","sat"];function fe(e,t){var n=De(e);return n[2]+=7*t,Ce(n)}function me(e,t){var n=De(e);return n[2]+=t,Ce(n)}function ge(e,t){var n=De(e);return n[6]+=t,Ce(n)}function ve(e,t){return ye(e,t)/7}function ye(e,t){return(t.valueOf()-e.valueOf())/864e5}function _e(e,t){var n=xe(e),r=xe(t);return{years:0,months:0,days:Math.round(ye(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function be(e,t){var n=we(e,t);return null!==n&&n%7==0?n/7:null}function we(e,t){return Ae(e)===Ae(t)?Math.round(ye(e,t)):null}function xe(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function ke(e,t,n,r){var i=Ce([t,0,1+Se(t,n,r)]),o=xe(e),s=Math.round(ye(i,o));return Math.floor(s/7)+1}function Se(e,t,n){var r=7+t-n;return-(7+Ce([e,0,r]).getUTCDay()-t)%7+r-1}function Te(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Ee(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function De(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Ce(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function Me(e){return!isNaN(e.valueOf())}function Ae(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Ie(e,t,n,r){return{instanceId:J(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Le=Object.prototype.hasOwnProperty;function Oe(e,t){var n={};if(t)for(var r in t){for(var i=[],o=e.length-1;o>=0;o--){var s=e[o][r];if("object"==typeof s&&s)i.unshift(s);else if(void 0!==s){n[r]=s;break}}i.length&&(n[r]=Oe(i))}for(o=e.length-1;o>=0;o--){var a=e[o];for(var l in a)l in n||(n[l]=a[l])}return n}function Ne(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Re(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Pe(e){for(var t={},n=0,r=e;n<r.length;n++)t[r[n]]=!0;return t}function Fe(e){var t=[];for(var n in e)t.push(e[n]);return t}function je(e,t){if(e===t)return!0;for(var n in e)if(Le.call(e,n)&&!(n in t))return!1;for(var n in t)if(Le.call(t,n)&&e[n]!==t[n])return!1;return!0}function Ye(e,t){var n=[];for(var r in e)Le.call(e,r)&&(r in t||n.push(r));for(var r in t)Le.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function Ve(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!He(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function He(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Be(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var i=[];null==n&&(n=Object.keys(e).length);for(var o=t;o<n;o+=r){var s=e[o];void 0!==s&&i.push(s)}return i}function Ue(e,t,n){var r=n.dateEnv,i=n.pluginHooks,o=n.options,s=e.defs,a=e.instances;for(var l in a=Ne(a,(function(e){return!s[e.defId].recurringDef})),s){var u=s[l];if(u.recurringDef){var c=u.recurringDef.duration;c||(c=u.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration);for(var d=0,h=ze(u,c,t,r,i.recurringTypes);d<h.length;d++){var p=h[d],f=Ie(l,{start:p,end:r.add(p,c)});a[f.instanceId]=f}}}return{defs:s,instances:a}}function ze(e,t,n,r,i){var o=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(o=o.map(xe)),o}var qe=["years","months","days","milliseconds"],We=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function $e(e,t){var n;return"string"==typeof e?function(e){var t=We.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?Ge(e):"number"==typeof e?Ge(((n={})[t||"milliseconds"]=e,n)):null}function Ge(e){var t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function Ke(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function Ze(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function Xe(e){return Je(e)/864e5}function Je(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Qe(e,t){for(var n=null,r=0;r<qe.length;r++){var i=qe[r];if(t[i]){var o=e[i]/t[i];if(!de(o)||null!==n&&n!==o)return null;n=o}else if(e[i])return null}return n}function et(e){var t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function tt(e){return e.toISOString().replace(/T.*$/,"")}function nt(e){return ue(e.getUTCHours(),2)+":"+ue(e.getUTCMinutes(),2)+":"+ue(e.getUTCSeconds(),2)}function rt(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?n+ue(i,2)+":"+ue(o,2):"GMT"+n+i+(o?":"+ue(o,2):"")}function it(e,t,n){if(e===t)return!0;var r,i=e.length;if(i!==t.length)return!1;for(r=0;r<i;r++)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function ot(e,t,n){var r,i;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(r){if(!it(r,o)){n&&n(i);var a=e.apply(this,o);t&&t(a,i)||(i=a)}}else i=e.apply(this,o);return r=o,i}}function st(e,t,n){var r,i;return function(o){if(r){if(!je(r,o)){n&&n(i);var s=e.call(this,o);t&&t(s,i)||(i=s)}}else i=e.call(this,o);return r=o,i}}var at={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},lt={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},ut=/\s*([ap])\.?m\.?/i,ct=/,/g,dt=/\s+/g,ht=/\u200e/g,pt=/UTC|GMT/,ft=function(){function e(e){var t={},n={},r=0;for(var i in e)i in at?(n[i]=e[i],r=Math.max(at[i],r)):(t[i]=e[i],i in lt&&(r=Math.max(lt[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=ot(mt)}return e.prototype.format=function(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)},e.prototype.formatRange=function(e,t,n,r){var i=this.standardDateProps,o=this.extendedSettings,s=function(e,t,n){return n.getMarkerYear(e)!==n.getMarkerYear(t)?5:n.getMarkerMonth(e)!==n.getMarkerMonth(t)?4:n.getMarkerDay(e)!==n.getMarkerDay(t)?2:Ae(e)!==Ae(t)?1:0}(e.marker,t.marker,n.calendarSystem);if(!s)return this.format(e,n);var a=s;!(a>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(a=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=mt(function(e,t){var n={};for(var r in e)(!(r in lt)||lt[r]<=t)&&(n[r]=e[r]);return n}(i,a),o,n),d=c(e),h=c(t),p=function(e,t,n,r){for(var i=0;i<e.length;){var o=e.indexOf(t,i);if(-1===o)break;var s=e.substr(0,o);i=o+t.length;for(var a=e.substr(i),l=0;l<n.length;){var u=n.indexOf(r,l);if(-1===u)break;var c=n.substr(0,u);l=u+r.length;var d=n.substr(l);if(s===c&&a===d)return{before:s,after:a}}}return null}(l,d,u,h),f=o.separator||r||n.defaultSeparator||"";return p?p.before+d+f+h+p.after:l+f+u},e.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}},e}();function mt(e,t,n){var i=Object.keys(e).length;return 1===i&&"short"===e.timeZoneName?function(e){return rt(e.timeZoneOffset)}:0===i&&t.week?function(e){return function(e,t,n,r){var i=[];return"narrow"===r?i.push(t):"short"===r&&i.push(t," "),i.push(n.simpleNumberFormat.format(e)),"rtl"===n.options.direction&&i.reverse(),i.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.locale,t.week)}:function(e,t,n){e=r({},e),t=r({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";var i,o=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var s=r({},e);delete s.minute,i=new Intl.DateTimeFormat(n.locale.codes,s)}return function(r){var s=r.marker;return function(e,t,n,r,i){return e=e.replace(ht,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;return e=e.replace(pt,(function(){return n=!0,t})),n||(e+=" "+t),e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":rt(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(ct,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(ut,"").trim():"narrow"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(ut,(function(e){return e.toLocaleLowerCase()}))),(e=e.replace(dt," ")).trim()}((i&&!s.getUTCMinutes()?i:o).format(s),r,e,t,n)}}(e,t,n)}function gt(e,t){var n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function vt(e,t,n,r){var i=gt(e,n.calendarSystem);return{date:i,start:i,end:t?gt(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var yt=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,vt(e,t,n,r))},e}(),_t=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(vt(e,t,n,r))},e}();function bt(e){return"object"==typeof e&&e?new ft(e):"string"==typeof e?new yt(e):"function"==typeof e?new _t(e):void 0}var wt={navLinkDayClick:At,navLinkWeekClick:At,duration:$e,bootstrapFontAwesome:At,buttonIcons:At,customButtons:At,defaultAllDayEventDuration:$e,defaultTimedEventDuration:$e,nextDayThreshold:$e,scrollTime:$e,slotMinTime:$e,slotMaxTime:$e,dayPopoverFormat:bt,slotDuration:$e,snapDuration:$e,headerToolbar:At,footerToolbar:At,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:bt,dayHeaderClassNames:At,dayHeaderContent:At,dayHeaderDidMount:At,dayHeaderWillUnmount:At,dayCellClassNames:At,dayCellContent:At,dayCellDidMount:At,dayCellWillUnmount:At,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:At,weekNumbers:Boolean,weekNumberClassNames:At,weekNumberContent:At,weekNumberDidMount:At,weekNumberWillUnmount:At,editable:Boolean,viewClassNames:At,viewDidMount:At,viewWillUnmount:At,nowIndicator:Boolean,nowIndicatorClassNames:At,nowIndicatorContent:At,nowIndicatorDidMount:At,nowIndicatorWillUnmount:At,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:At,locale:At,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:At,eventOrder:oe,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:At,contentHeight:At,direction:String,weekNumberFormat:bt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,progressiveEventRendering:Boolean,businessHours:At,initialDate:At,now:At,eventDataTransform:At,stickyHeaderDates:At,stickyFooterScrollbar:At,viewHeight:At,defaultAllDay:Boolean,eventSourceFailure:At,eventSourceSuccess:At,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:At,eventConstraint:At,eventAllow:At,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:At,eventContent:At,eventDidMount:At,eventWillUnmount:At,selectConstraint:At,selectOverlap:At,selectAllow:At,droppable:Boolean,unselectCancel:String,slotLabelFormat:At,slotLaneClassNames:At,slotLaneContent:At,slotLaneDidMount:At,slotLaneWillUnmount:At,slotLabelClassNames:At,slotLabelContent:At,slotLabelDidMount:At,slotLabelWillUnmount:At,dayMaxEvents:At,dayMaxEventRows:At,dayMinWidth:Number,slotLabelInterval:$e,allDayText:String,allDayClassNames:At,allDayContent:At,allDayDidMount:At,allDayWillUnmount:At,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:bt,rerenderDelay:Number,moreLinkText:At,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMinHeight:Number,slotEventOverlap:Boolean,plugins:At,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:$e,hiddenDays:At,monthMode:Boolean,fixedWeekCount:Boolean,validRange:At,visibleRange:At,titleFormat:At,noEventsText:String},xt={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" \u2013 ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1},kt={datesSet:At,eventsSet:At,eventAdd:At,eventChange:At,eventRemove:At,windowResize:At,eventClick:At,eventMouseEnter:At,eventMouseLeave:At,select:At,unselect:At,loading:At,_unmount:At,_beforeprint:At,_afterprint:At,_noEventDrop:At,_noEventResize:At,_resize:At,_scrollRequest:At},St={buttonText:At,views:At,plugins:At,initialEvents:At,events:At,eventSources:At},Tt={headerToolbar:Et,footerToolbar:Et,buttonText:Et,buttonIcons:Et};function Et(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?je(e,t):e===t}var Dt={type:String,component:At,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:At,usesMinMaxTime:Boolean,classNames:At,content:At,didMount:At,willUnmount:At};function Ct(e){return Oe(e,Tt)}function Mt(e,t){var n={},r={};for(var i in t)i in e&&(n[i]=t[i](e[i]));for(var i in e)i in t||(r[i]=e[i]);return{refined:n,extra:r}}function At(e){return e}function It(e,t,n,r){for(var i={defs:{},instances:{}},o=$t(n),s=0,a=e;s<a.length;s++){var l=qt(a[s],t,n,r,o);l&&Lt(l,i)}return i}function Lt(e,t){return void 0===t&&(t={defs:{},instances:{}}),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function Ot(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],i=Rt(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return{defs:{},instances:{}}}function Nt(e,t){return{defs:r(r({},e.defs),t.defs),instances:r(r({},e.instances),t.instances)}}function Rt(e,t){var n=Ne(e.defs,t),r=Ne(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function Pt(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Ft={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:At,overlap:At,allow:At,className:Pt,classNames:Pt,color:String,backgroundColor:String,borderColor:String,textColor:String};function jt(e,t){var n=function(e,t){return Array.isArray(e)?It(e,null,t,!0):"object"==typeof e&&e?It([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function Yt(e){return e.reduce(Vt,Ht)}function Vt(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var Ht={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]},Bt={id:String,groupId:String,title:String,url:String},Ut={start:At,end:At,date:At,allDay:Boolean},zt=r(r(r({},Bt),Ut),{extendedProps:At});function qt(e,t,n,r,i){void 0===i&&(i=$t(n));var o=Wt(e,n,i),s=o.refined,a=o.extra,l=function(e,t){var n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),u=function(e,t,n,r){for(var i=0;i<r.length;i++){var o=r[i].parse(e,n);if(o){var s=e.allDay;return null==s&&null==(s=t)&&null==(s=o.allDayGuess)&&(s=!1),{allDay:s,duration:o.duration,typeData:o.typeData,typeId:i}}}return null}(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u)return(c=Gt(s,a,t?t.sourceId:"",u.allDay,Boolean(u.duration),n)).recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:c,instance:null};var c,d=function(e,t,n,r){var i,o,s=e.allDay,a=null,l=!1,u=null,c=null!=e.start?e.start:e.date;if(i=n.dateEnv.createMarkerMeta(c))a=i.marker;else if(!r)return null;return null!=e.end&&(o=n.dateEnv.createMarkerMeta(e.end)),null==s&&(s=null!=t?t:(!i||i.isTimeUnspecified)&&(!o||o.isTimeUnspecified)),s&&a&&(a=xe(a)),o&&(u=o.marker,s&&(u=xe(u)),a&&u<=a&&(u=null)),u?l=!0:r||(l=n.options.forceEventDuration||!1,u=n.dateEnv.add(a,s?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:s,hasEnd:l,range:{start:a,end:u},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:o?o.forcedTzo:null}}(s,l,n,r);return d?{def:c=Gt(s,a,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:Ie(c.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function Wt(e,t,n){return void 0===n&&(n=$t(t)),Mt(e,n)}function $t(e){return r(r(r({},Ft),zt),e.pluginHooks.eventRefiners)}function Gt(e,t,n,i,o,s){for(var a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:J(),sourceId:n,allDay:i,hasEnd:o,ui:jt(e,s),extendedProps:r(r({},e.extendedProps||{}),t)},l=0,u=s.pluginHooks.eventDefMemberAdders;l<u.length;l++){var c=u[l];r(a,c(e))}return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function Kt(e){var t=Math.floor(ye(e.start,e.end))||1,n=xe(e.start);return{start:n,end:me(n,t)}}function Zt(e,t){void 0===t&&(t=$e(0));var n=null,r=null;if(e.end){r=xe(e.end);var i=e.end.valueOf()-r.valueOf();i&&i>=Je(t)&&(r=me(r,1))}return e.start&&(n=xe(e.start),r&&r<=n&&(r=me(n,1))),{start:n,end:r}}function Xt(e){var t=Zt(e);return ye(t.start,t.end)>1}function Jt(e,t,n,r){return"year"===r?$e(n.diffWholeYears(e,t),"year"):"month"===r?$e(n.diffWholeMonths(e,t),"month"):_e(e,t)}function Qt(e,t){var n,r,i=[],o=t.start;for(e.sort(en),n=0;n<e.length;n++)(r=e[n]).start>o&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return o<t.end&&i.push({start:o,end:t.end}),i}function en(e,t){return e.start.valueOf()-t.start.valueOf()}function tn(e,t){var n=e.start,r=e.end,i=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(i={start:n,end:r}),i}function nn(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function rn(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function on(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function sn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function an(e,t,n,r){var i={},o={},s={},a=[],l=[],u=dn(e.defs,t);for(var c in e.defs)"inverse-background"===(p=u[(b=e.defs[c]).defId]).display&&(b.groupId?(i[b.groupId]=[],s[b.groupId]||(s[b.groupId]=b)):o[c]=[]);for(var d in e.instances){var h=e.instances[d],p=u[(b=e.defs[h.defId]).defId],f=h.range,m=!b.allDay&&r?Zt(f,r):f,g=tn(m,n);g&&("inverse-background"===p.display?b.groupId?i[b.groupId].push(g):o[h.defId].push(g):"none"!==p.display&&("background"===p.display?a:l).push({def:b,ui:p,instance:h,range:g,isStart:m.start&&m.start.valueOf()===g.start.valueOf(),isEnd:m.end&&m.end.valueOf()===g.end.valueOf()}))}for(var v in i)for(var y=0,_=Qt(i[v],n);y<_.length;y++){var b,w=_[y];p=u[(b=s[v]).defId],a.push({def:b,ui:p,instance:null,range:w,isStart:!1,isEnd:!1})}for(var c in o)for(var x=0,k=Qt(o[c],n);x<k.length;x++)w=k[x],a.push({def:e.defs[c],ui:u[c],instance:null,range:w,isStart:!1,isEnd:!1});return{bg:a,fg:l}}function ln(e){return"background"===e.ui.display||"inverse-background"===e.ui.display}function un(e,t){e.fcSeg=t}function cn(e){return e.fcSeg||e.parentNode.fcSeg||null}function dn(e,t){return Re(e,(function(e){return hn(e,t)}))}function hn(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Yt(n)}function pn(e,t){var n=e.map(fn);return n.sort((function(e,n){return se(e,n,t)})),n.map((function(e){return e._seg}))}function fn(e){var t=e.eventRange,n=t.def,i=t.instance?t.instance.range:t.range,o=i.start?i.start.valueOf():0,s=i.end?i.end.valueOf():0;return r(r(r({},n.extendedProps),n),{id:n.publicId,start:o,end:s,duration:s-o,allDay:Number(n.allDay),_seg:e})}function mn(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,i=r.def,o=r.ui,s=o.startEditable,a=0,l=n;a<l.length;a++)s=(0,l[a])(s,i,o,t);return s}function gn(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function vn(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function yn(e,t,n,r,i,o,s){var a=n.dateEnv,l=n.options,u=l.displayEventTime,c=l.displayEventEnd,d=e.eventRange.def,h=e.eventRange.instance;if(null==u&&(u=!1!==r),null==c&&(c=!1!==i),u&&!d.allDay&&(e.isStart||e.isEnd)){var p=o||(e.isStart?h.range.start:e.start||e.eventRange.range.start),f=s||(e.isEnd?h.range.end:e.end||e.eventRange.range.end);return c&&d.hasEnd?a.formatRange(p,f,t,{forcedStartTzo:o?null:h.forcedStartTzo,forcedEndTzo:s?null:h.forcedEndTzo}):a.format(p,t,{forcedTzo:o?null:h.forcedStartTzo})}return""}function _n(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&sn(t,r.start)}}function bn(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function wn(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}var xn={start:At,end:At,allDay:Boolean};function kn(e,t,n){var i=function(e,t){var n=Mt(e,xn),i=n.refined,o=n.extra,s=i.start?t.createMarkerMeta(i.start):null,a=i.end?t.createMarkerMeta(i.end):null,l=i.allDay;return null==l&&(l=s&&s.isTimeUnspecified&&(!a||a.isTimeUnspecified)),r({range:{start:s?s.marker:null,end:a?a.marker:null},allDay:l},o)}(e,t),o=i.range;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return i}function Sn(e,t){return nn(e.range,t.range)&&e.allDay===t.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(e,t)}function Tn(e,t,n){return r(r({},En(e,t,n)),{timeZone:t.timeZone})}function En(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function Dn(e,t,n){n.emitter.trigger("select",r(r({},Cn(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Cn(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.dateSpanTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,i=t.dateEnv,r(r({},En(n.range,i,n.allDay)),{allDay:n.allDay}))),o}function Mn(e,t,n){var r=n.dateEnv,i=n.options,o=t;return e?(o=xe(o),o=r.add(o,i.defaultAllDayEventDuration)):o=r.add(o,i.defaultTimedEventDuration),o}function An(e,t,n,r){var i=dn(e.defs,t),o={defs:{},instances:{}};for(var s in e.defs){var a=e.defs[s];o.defs[s]=In(a,i[s],n,r)}for(var l in e.instances){var u=e.instances[l];a=o.defs[u.defId],o.instances[l]=Ln(u,a,i[u.defId],n,r)}return o}function In(e,t,n,i){var o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);var s=r(r(r({},e),o),{ui:r(r({},e.ui),o.ui)});n.extendedProps&&(s.extendedProps=r(r({},s.extendedProps),n.extendedProps));for(var a=0,l=i.pluginHooks.eventDefMutationAppliers;a<l.length;a++)(0,l[a])(s,n,i);return!s.hasEnd&&i.options.forceEventDuration&&(s.hasEnd=!0),s}function Ln(e,t,n,i,o){var s=o.dateEnv,a=i.standardProps&&!0===i.standardProps.allDay,l=i.standardProps&&!1===i.standardProps.hasEnd,u=r({},e);return a&&(u.range=Kt(u.range)),i.datesDelta&&n.startEditable&&(u.range={start:s.add(u.range.start,i.datesDelta),end:s.add(u.range.end,i.datesDelta)}),i.startDelta&&n.durationEditable&&(u.range={start:s.add(u.range.start,i.startDelta),end:u.range.end}),i.endDelta&&n.durationEditable&&(u.range={start:u.range.start,end:s.add(u.range.end,i.endDelta)}),l&&(u.range={start:u.range.start,end:Mn(t.allDay,u.range.start,o)}),t.allDay&&(u.range={start:xe(u.range.start),end:xe(u.range.end)}),u.range.end<u.range.start&&(u.range.end=Mn(t.allDay,u.range.start,o)),u}var On=function(){function e(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}return Object.defineProperty(e.prototype,"calendar",{get:function(){return this.getCurrentData().calendarApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.getCurrentData().viewTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)},enumerable:!1,configurable:!0}),e.prototype.getOption=function(e){return this.getCurrentData().options[e]},e}(),Nn={id:String,defaultAllDay:Boolean,url:String,events:At,eventDataTransform:At,success:At,failure:At};function Rn(e,t,n){var r;if(void 0===n&&(n=Pn(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var i=Mt(r,n),o=i.refined,s=i.extra,a=function(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r--){var i=n[r].parseMeta(e);if(i)return{sourceDefId:r,meta:i}}return null}(o,t);if(a)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:J(),sourceDefId:a.sourceDefId,meta:a.meta,ui:jt(o,t),extendedProps:s}}return null}function Pn(e){return r(r(r({},Ft),Nn),e.pluginHooks.eventSourceRefiners)}function Fn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var jn=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.currentDataManager.emitter).trigger.apply(t,i([e],n))},e.prototype.changeView=function(e,t){var n=this;this.batchRendering((function(){if(n.unselect(),t)if(t.start&&t.end)n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),n.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{var r=n.getCurrentData().dateEnv;n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))},e.prototype.zoomTo=function(e,t){var n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})},e.prototype.getUnitViewSpec=function(e){var t,n,r=this.getCurrentData(),i=r.viewSpecs,o=r.toolbarConfig,s=[].concat(o.viewsWithButtons);for(var a in i)s.push(a);for(t=0;t<s.length;t++)if((n=i[s[t]])&&n.singleUnit===e)return n},e.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},e.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},e.prototype.prevYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})},e.prototype.nextYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})},e.prototype.today=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:Fn(e.calendarOptions.now,e.dateEnv)})},e.prototype.gotoDate=function(e){var t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})},e.prototype.incrementDate=function(e){var t=this.getCurrentData(),n=$e(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))},e.prototype.getDate=function(){var e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)},e.prototype.formatDate=function(e,t){var n=this.getCurrentData().dateEnv;return n.format(n.createMarker(e),bt(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),bt(n),n)},e.prototype.formatIso=function(e,t){var n=this.getCurrentData().dateEnv;return n.formatIso(n.createMarker(e),{omitTime:t})},e.prototype.select=function(e,t){var n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};var r=this.getCurrentData(),i=kn(n,r.dateEnv,$e({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),Dn(i,null,r))},e.prototype.unselect=function(e){var t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))},e.prototype.addEvent=function(e,t){if(e instanceof Yn){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Lt({def:n,instance:r})}),this.triggerEventAdd(e)),e}var i,o=this.getCurrentData();if(t instanceof j)i=t.internalEventSource;else if("boolean"==typeof t)t&&(i=Fe(o.eventSources)[0]);else if(null!=t){var s=this.getEventSourceById(t);if(!s)return console.warn('Could not find an event source with ID "'+t+'"'),null;i=s.internalEventSource}var a=qt(e,i,o,!1);if(a){var l=new Yn(o,a.def,a.def.recurringDef?null:a.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Lt(a)}),this.triggerEventAdd(l),l}return null},e.prototype.triggerEventAdd=function(e){var t=this;this.getCurrentData().emitter.trigger("eventAdd",{event:e,relatedEvents:[],revert:function(){t.dispatch({type:"REMOVE_EVENTS",eventStore:Vn(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,i=n.instances;for(var o in e=String(e),r){var s=r[o];if(s.publicId===e){if(s.recurringDef)return new Yn(t,s,null);for(var a in i){var l=i[a];if(l.defId===s.defId)return new Yn(t,s,l)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return Hn(e.eventStore,e)},e.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},e.prototype.getEventSources=function(){var e=this.getCurrentData(),t=e.eventSources,n=[];for(var r in t)n.push(new j(e,t[r]));return n},e.prototype.getEventSourceById=function(e){var t=this.getCurrentData(),n=t.eventSources;for(var r in e=String(e),n)if(n[r].publicId===e)return new j(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof j)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=Rn(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new j(t,n)):null},e.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},e.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES"})},e.prototype.scrollToTime=function(e){var t=$e(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),Yn=function(){function e(e,t,n){this._context=e,this._def=t,this._instance=n||null}return e.prototype.setProp=function(e,t){var n,r;if(e in Ut)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e in Bt)t=Bt[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in Ft){var i=Ft[e](t);"color"===e?i={backgroundColor:t,borderColor:t}:"editable"===e?i={startEditable:t,durationEditable:t}:((r={})[e]=t,i=r),this.mutate({standardProps:{ui:i}})}else console.warn("Could not set prop '"+e+"'. Use setExtendedProp instead.")},e.prototype.setExtendedProp=function(e,t){var n;this.mutate({extendedProps:(n={},n[e]=t,n)})},e.prototype.setStart=function(e,t){void 0===t&&(t={});var n=this._context.dateEnv,r=n.createMarker(e);if(r&&this._instance){var i=Jt(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}},e.prototype.setEnd=function(e,t){void 0===t&&(t={});var n,r=this._context.dateEnv;if((null==e||(n=r.createMarker(e)))&&this._instance)if(n){var i=Jt(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:i})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,i,o,s=this._context.dateEnv,a={allDay:n.allDay},l=s.createMarker(e);if(l&&(null==t||(r=s.createMarker(t)))&&this._instance){var u=this._instance.range;!0===n.allDay&&(u=Kt(u));var c=Jt(u.start,l,s,n.granularity);if(r){var d=Jt(u.end,r,s,n.granularity);o=d,(i=c).years===o.years&&i.months===o.months&&i.days===o.days&&i.milliseconds===o.milliseconds?this.mutate({datesDelta:c,standardProps:a}):this.mutate({startDelta:c,endDelta:d,standardProps:a})}else a.hasEnd=!1,this.mutate({datesDelta:c,standardProps:a})}},e.prototype.moveStart=function(e){var t=$e(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=$e(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=$e(e);t&&this.mutate({datesDelta:t})},e.prototype.setAllDay=function(e,t){void 0===t&&(t={});var n={allDay:e},r=t.maintainDuration;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})},e.prototype.formatRange=function(e){var t=this._context.dateEnv,n=this._instance,r=bt(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})},e.prototype.mutate=function(t){var n=this._instance;if(n){var r=this._def,i=this._context,o=Ot(i.getCurrentData().eventStore,n.instanceId);o=An(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,i);var s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:o}),i.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:Hn(o,i,n),revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:o})}})}},e.prototype.remove=function(){var e=this._context,t=Vn(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert:function(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})},Object.defineProperty(e.prototype,"source",{get:function(){var e=this._def.sourceId;return e?new j(this._context,this._context.getCurrentData().eventSources[e]):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startStr",{get:function(){var e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endStr",{get:function(){var e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._def.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._def.title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._def.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"display",{get:function(){return this._def.ui.display||"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!1,configurable:!0}),e.prototype.toPlainObject=function(e){void 0===e&&(e={});var t=this._def,n=t.ui,i=this.startStr,o=this.endStr,s={};return t.title&&(s.title=t.title),i&&(s.start=i),o&&(s.end=o),t.publicId&&(s.id=t.publicId),t.groupId&&(s.groupId=t.groupId),t.url&&(s.url=t.url),n.display&&"auto"!==n.display&&(s.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?s.color=n.backgroundColor:(n.backgroundColor&&(s.backgroundColor=n.backgroundColor),n.borderColor&&(s.borderColor=n.borderColor)),n.textColor&&(s.textColor=n.textColor),n.classNames.length&&(s.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?r(s,t.extendedProps):s.extendedProps=t.extendedProps),s},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function Vn(e){var t,n,r=e._def,i=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:i?(n={},n[i.instanceId]=i,n):{}}}function Hn(e,t,n){var r=e.defs,i=e.instances,o=[],s=n?n.instanceId:"";for(var a in i){var l=i[a],u=r[l.defId];l.instanceId!==s&&o.push(new Yn(t,u,l))}return o}var Bn,Un={},zn=function(){function e(){}return e.prototype.getMarkerYear=function(e){return e.getUTCFullYear()},e.prototype.getMarkerMonth=function(e){return e.getUTCMonth()},e.prototype.getMarkerDay=function(e){return e.getUTCDate()},e.prototype.arrayToMarker=function(e){return Ce(e)},e.prototype.markerToArray=function(e){return De(e)},e}();Bn=zn,Un.gregory=Bn;var qn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Wn(e){var t=qn.exec(e);if(t){var n=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number("0."+t[12]):0));if(Me(n)){var r=null;return t[13]&&(r=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}var $n=function(){function e(e){var t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new Un[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}return e.prototype.createMarker=function(e){var t=this.createMarkerMeta(e);return null===t?null:t.marker},e.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Ce(Te(new Date))},e.prototype.createMarkerMeta=function(e){if("string"==typeof e)return this.parse(e);var t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=Ce(e)),null!==t&&Me(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=Wn(e);if(null===t)return null;var n=t.marker,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}},e.prototype.getYear=function(e){return this.calendarSystem.getMarkerYear(e)},e.prototype.getMonth=function(e){return this.calendarSystem.getMarkerMonth(e)},e.prototype.add=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.subtract=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.addYears=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.addMonths=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.diffWholeYears=function(e,t){var n=this.calendarSystem;return Ae(e)===Ae(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null},e.prototype.diffWholeMonths=function(e,t){var n=this.calendarSystem;return Ae(e)===Ae(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null},e.prototype.greatestWholeUnit=function(e,t){var n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(e,t))?{unit:"month",value:n}:null!==(n=be(e,t))?{unit:"week",value:n}:null!==(n=we(e,t))?{unit:"day",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t))?{unit:"hour",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t))?{unit:"minute",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t))?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}},e.prototype.countDurationsBetween=function(e,t,n){var r;return n.years&&null!==(r=this.diffWholeYears(e,t))?r/(Xe(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Xe(e)/30}(n):n.days&&null!==(r=we(e,t))?r/Xe(n):(t.valueOf()-e.valueOf())/Je(n)},e.prototype.startOf=function(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?xe(e):"hour"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):void 0},e.prototype.startOfYear=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])},e.prototype.startOfMonth=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])},e.prototype.startOfWeek=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])},e.prototype.computeWeekNumber=function(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){var r=e.getUTCFullYear(),i=ke(e,r,t,n);if(i<1)return ke(e,r-1,t,n);var o=ke(e,r+1,t,n);return o>=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=ge(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",rt(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?Ce(Te(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Ce(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Ee(De(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(De(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Ee(De(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(De(e))*60):new Date(e.valueOf()-(t||0))},e}(),Gn=[],Kn={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"};function Zn(e){for(var t=e.length>0?e[0].code:"en",n=Gn.concat(e),r={en:Kn},i=0,o=n;i<o.length;i++){var s=o[i];r[s.code]=s}return{map:r,defaultCode:t}}function Xn(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){var n=[].concat(e||[]),r=function(e,t){for(var n=0;n<e.length;n++)for(var r=e[n].toLocaleLowerCase().split("-"),i=r.length;i>0;i--){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||Kn;return Jn(e,n,r)}(e,t):Jn(e.code,[e.code],e)}function Jn(e,t,n){var r=Oe([Kn,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function Qn(e){var t=Xn(e.locale||"en",Zn([]).map);return new $n(r(r({timeZone:xt.timeZone,calendarSystem:"gregory"},e),{locale:t}))}var er,tr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function nr(e,t){return It(function(e){return(!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[]).map((function(e){return r(r({},tr),e)}))}(e),null,t)}function rr(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function ir(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function or(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}}function sr(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function ar(e,t){return{left:e.left-t.left,top:e.top-t.top}}function lr(){return null==er&&(er=function(){if("undefined"==typeof document)return!0;var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),er}var ur={defs:{},instances:{}},cr=function(){function e(){this.getKeysForEventDefs=ot(this._getKeysForEventDefs),this.splitDateSelection=ot(this._splitDateSpan),this.splitEventStore=ot(this._splitEventStore),this.splitIndividualUi=ot(this._splitIndividualUi),this.splitEventDrag=ot(this._splitInteraction),this.splitEventResize=ot(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,r),s=this.splitEventStore(e.eventStore,r),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=Re(n,(function(e,n){return t.eventUiBuilders[n]||ot(dr)})),n){var d=n[c],h=s[c]||ur,p=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:i[c]||null,eventStore:h,eventUiBases:p(e.eventUiBases[""],d.ui,o[c]),eventSelection:h.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++)t[r[n]]=e;return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return Re(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,i={};for(var o in n)for(var s=0,a=t[o];s<a.length;s++)i[h=a[s]]||(i[h]={defs:{},instances:{}}),i[h].defs[o]=n[o];for(var l in r)for(var u=r[l],c=0,d=t[u.defId];c<d.length;c++){var h;i[h=d[c]]&&(i[h].instances[l]=u)}return i},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var i=0,o=t[r];i<o.length;i++){var s=o[i];n[s]||(n[s]={}),n[s][r]=e[r]}return n},e.prototype._splitInteraction=function(e){var t={};if(e){var n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),o=function(r){t[r]||(t[r]={affectedEvents:n[r]||ur,mutatedEvents:i[r]||ur,isEvent:e.isEvent})};for(var s in n)o(s);for(var s in i)o(s)}return t},e}();function dr(e,t,n){var i=[];e&&i.push(e),t&&i.push(t);var o={"":Yt(i)};return n&&r(o,n),o}function hr(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!sn(r.activeRange,e)),isOther:Boolean(r&&!sn(r.currentRange,e)),isToday:Boolean(t&&sn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function pr(e,t){var n=["fc-day","fc-day-"+pe[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}function fr(e,t){return void 0===t&&(t="day"),JSON.stringify({date:tt(e),type:t})}var mr,gr=null;function vr(){return null===gr&&(gr=function(){var e=document.createElement("div");z(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="<div></div>",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Y(e),t}()),gr}function yr(){return mr||(mr=function(){var e=document.createElement("div");e.style.overflow="scroll",document.body.appendChild(e);var t=_r(e);return document.body.removeChild(e),t}()),mr}function _r(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function br(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,s=parseInt(n.borderBottomWidth,10)||0,a=_r(e),l=a.y-r-i,u={borderLeft:r,borderRight:i,borderTop:o,borderBottom:s,scrollbarBottom:a.x-o-s,scrollbarLeft:0,scrollbarRight:0};return vr()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function wr(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():xr(e),i=br(e,t),o={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return t&&(o.left+=i.paddingLeft,o.right-=i.paddingRight,o.top+=i.paddingTop,o.bottom-=i.paddingBottom),o}function xr(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function kr(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 Sr(e,t,n){var r=!1,i=function(){r||(r=!0,t.apply(this,arguments))},o=function(){r||(r=!0,n&&n.apply(this,arguments))},s=e(i,o);s&&"function"==typeof s.then&&s.then(i,o)}var Tr=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=this.handlers[e]||[],i=this.options&&this.options[e],o=0,s=[].concat(i||[],r);o<s.length;o++){s[o].apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e]},e}(),Er=function(){function e(e,t,n,r){this.els=t;var i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.left-e),n.push(o.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.top-e),n.push(o.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.getWidth=function(e){return this.rights[e]-this.lefts[e]},e.prototype.getHeight=function(e){return this.bottoms[e]-this.tops[e]},e}(),Dr=function(){function e(){}return e.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},e.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},e.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},e.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},e.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},e}(),Cr=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return n(t,e),t.prototype.getScrollTop=function(){return this.el.scrollTop},t.prototype.getScrollLeft=function(){return this.el.scrollLeft},t.prototype.setScrollTop=function(e){this.el.scrollTop=e},t.prototype.setScrollLeft=function(e){this.el.scrollLeft=e},t.prototype.getScrollWidth=function(){return this.el.scrollWidth},t.prototype.getScrollHeight=function(){return this.el.scrollHeight},t.prototype.getClientHeight=function(){return this.el.clientHeight},t.prototype.getClientWidth=function(){return this.el.clientWidth},t}(Dr),Mr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getScrollTop=function(){return window.pageYOffset},t.prototype.getScrollLeft=function(){return window.pageXOffset},t.prototype.setScrollTop=function(e){window.scroll(window.pageXOffset,e)},t.prototype.setScrollLeft=function(e){window.scroll(e,window.pageYOffset)},t.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},t.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},t.prototype.getClientHeight=function(){return document.documentElement.clientHeight},t.prototype.getClientWidth=function(){return document.documentElement.clientWidth},t}(Dr),Ar=function(){function e(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}return e.prototype.setIconOverride=function(e){var t,n;if("object"==typeof e&&e){for(n in t=r({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e,t){var n;return(n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e])?this.baseIconClass+" "+n:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();if(Ar.prototype.classes={},Ar.prototype.iconClasses={},Ar.prototype.baseIconClass="",Ar.prototype.iconOverridePrefix="","undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Ir=FullCalendarVDom.Component,Lr=FullCalendarVDom.createElement,Or=FullCalendarVDom.render,Nr=FullCalendarVDom.createRef,Rr=FullCalendarVDom.Fragment,Pr=FullCalendarVDom.createContext,Fr=FullCalendarVDom.flushToDom,jr=function(){function e(e,t,n){var i=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.handleScrollRequest=function(e){i.queuedRequest=r({},i.queuedRequest||{},e),i.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}return e.prototype.detach=function(){this.emitter.off("_scrollRequest",this.handleScrollRequest)},e.prototype.update=function(e){e?this.fireInitialScroll():this.drain()},e.prototype.fireInitialScroll=function(){this.handleScrollRequest({time:this.scrollTime})},e.prototype.drain=function(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)},e}(),Yr=Pr({});function Vr(e,t,n,r,i,o,s,a,l,u,c,d,h){return{dateEnv:i,options:n,pluginHooks:s,emitter:u,dispatch:a,getCurrentData:l,calendarApi:c,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:"rtl"===n.direction,addResizeHandler:function(e){u.on("_resize",e)},removeResizeHandler:function(e){u.off("_resize",e)},createScrollResponder:function(e){return new jr(e,u,$e(n.scrollTime))},registerInteractiveComponent:d,unregisterInteractiveComponent:h}}var Hr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(Ye(e,this.props),Ye(t,this.state)),!Ve(this.props,e,this.propEquality)||!Ve(this.state,t,this.stateEquality)},t.addPropsEquality=Ur,t.addStateEquality=zr,t.contextType=Yr,t}(Ir);Hr.prototype.propEquality={},Hr.prototype.stateEquality={};var Br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.contextType=Yr,t}(Hr);function Ur(e){var t=Object.create(this.prototype.propEquality);r(t,e),this.prototype.propEquality=t}function zr(e){var t=Object.create(this.prototype.stateEquality);r(t,e),this.prototype.stateEquality=t}function qr(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Wr(e,t){var n;if(t){n=[];for(var r=0,i=e;r<i.length;r++){var o=i[r],s=t(o);s?n.push(s):null==s&&n.push(o)}}else n=e;return n}function $r(e,t){return Rt(e,(function(e){return e.sourceId!==t}))}function Gr(e,t){return Kr({eventDrag:e},t)}function Kr(e,t){var n=t.getCurrentData(),i=r({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||Zr)(i,t)}function Zr(e,t,n,i){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,i){var o=t.getCurrentData(),s=e.eventDrag,a=s.mutatedEvents,l=a.defs,u=a.instances,c=dn(l,s.isEvent?e.eventUiBases:{"":o.selectionConfig});i&&(c=Re(c,i));var d,h,p=(d=e.eventStore,h=s.affectedEvents.instances,{defs:d.defs,instances:Ne(d.instances,(function(e){return!h[e.instanceId]}))}),f=p.defs,m=p.instances,g=dn(f,e.eventUiBases);for(var v in u){var y=u[v],_=y.range,b=c[y.defId],w=l[y.defId];if(!Xr(b.constraints,_,p,e.businessHours,t))return!1;var x=t.options.eventOverlap,k="function"==typeof x?x:null;for(var S in m){var T=m[S];if(rn(_,T.range)){if(!1===g[T.defId].overlap&&s.isEvent)return!1;if(!1===b.overlap)return!1;if(k&&!k(new Yn(t,f[T.defId],T),new Yn(t,w,y)))return!1}}for(var E=o.eventStore,D=0,C=b.allows;D<C.length;D++){var M,A=C[D],I=r(r({},n),{range:y.range,allDay:w.allDay}),L=E.defs[w.defId],O=E.instances[v];if(M=L?new Yn(t,L,O):new Yn(t,w),!A(Cn(I,t),M))return!1}}return!0}(e,t,n,i)||e.dateSelection&&!function(e,t,n,i){var o=e.eventStore,s=o.defs,a=o.instances,l=e.dateSelection,u=l.range,c=t.getCurrentData().selectionConfig;if(i&&(c=i(c)),!Xr(c.constraints,u,o,e.businessHours,t))return!1;var d=t.options.selectOverlap,h="function"==typeof d?d:null;for(var p in a){var f=a[p];if(rn(u,f.range)){if(!1===c.overlap)return!1;if(h&&!h(new Yn(t,s[f.defId],f),null))return!1}}for(var m=0,g=c.allows;m<g.length;m++){if(!(0,g[m])(Cn(r(r({},n),l),t),null))return!1}return!0}(e,t,n,i))}function Xr(e,t,n,r,i){for(var o=0,s=e;o<s.length;o++)if(!ei(Jr(s[o],t,n,r,i),t))return!1;return!0}function Jr(e,t,n,r,i){return"businessHours"===e?Qr(Ue(r,t,i)):"string"==typeof e?Qr(Rt(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?Qr(Ue(e,t,i)):[]}function Qr(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function ei(e,t){for(var n=0,r=e;n<r.length;n++)if(on(r[n],t))return!0;return!1}var ti=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=J(),t}return n(t,e),t.prototype.prepareHits=function(){},t.prototype.queryHit=function(e,t,n,r){return null},t.prototype.isInteractionValid=function(e){var t=this.props.dateProfile,n=e.mutatedEvents.instances;if(t)for(var r in n)if(!on(t.validRange,n[r].range))return!1;return Gr(e,this.context)},t.prototype.isDateSelectionValid=function(e){var t=this.props.dateProfile;return!(t&&!on(t.validRange,e.range))&&Kr({dateSelection:e},this.context)},t.prototype.isValidSegDownEl=function(e){return!this.props.eventDrag&&!this.props.eventResize&&!V(e,".fc-event-mirror")&&(this.isPopover()||!this.isInPopover(e))},t.prototype.isValidDateDownEl=function(e){return!(V(e,".fc-event:not(.fc-bg-event)")||V(e,".fc-daygrid-more-link")||V(e,"a[data-navlink]")||this.isInPopover(e))},t.prototype.isPopover=function(){return!1},t.prototype.isInPopover=function(e){return Boolean(V(e,".fc-popover"))},t}(Br);function ni(e){return{id:J(),deps:e.deps||[],reducers:e.reducers||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],eventResizeJoinTransforms:e.eventResizeJoinTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,contentTypeHandlers:e.contentTypeHandlers||{},listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}var ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);function ii(e,t,n,i){if(t[e])return t[e];var o=function(e,t,n,i){var o=n[e],s=i[e],a=function(e){return o&&null!==o[e]?o[e]:s&&null!==s[e]?s[e]:null},l=a("component"),u=a("superType"),c=null;if(u){if(u===e)throw new Error("Can't have a custom view type that references itself");c=ii(u,t,n,i)}return!l&&c&&(l=c.component),l?{type:e,component:l,defaults:r(r({},c?c.defaults:{}),o?o.rawOptions:{}),overrides:r(r({},c?c.overrides:{}),s?s.rawOptions:{})}:null}(e,t,n,i);return o&&(t[e]=o),o}ri.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},ri.prototype.baseIconClass="fc-icon",ri.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},ri.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},ri.prototype.iconOverrideOption="buttonIcons",ri.prototype.iconOverrideCustomButtonOption="icon",ri.prototype.iconOverridePrefix="fc-icon-";var oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.handleRootEl=function(e){qr(t.rootElRef,e),t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return Lr(ui,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return Lr(ai,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,i){return t.children(r,di(t.classNames,n),e,i)}))}))},t}(Br),si=Pr(0);function ai(e){return Lr(si.Consumer,null,(function(t){return Lr(li,r({renderId:t},e))}))}var li=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Nr(),t}return n(t,e),t.prototype.render=function(){return this.props.children(this.innerElRef,this.renderInnerContent())},t.prototype.componentDidMount=function(){this.updateCustomContent()},t.prototype.componentDidUpdate=function(){this.updateCustomContent()},t.prototype.renderInnerContent=function(){var e=this.context.pluginHooks.contentTypeHandlers,t=this.props,n=this.customContentInfo,r=hi(t.content,t.hookProps),i=null;if(void 0===r&&(r=hi(t.defaultContent,t.hookProps)),void 0!==r){if(n)n.contentVal=r[n.contentKey];else if("object"==typeof r)for(var o in e)if(void 0!==r[o]){n=this.customContentInfo={contentKey:o,contentVal:r[o],handler:e[o]()};break}i=n?[]:r}return i},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.handler(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(Br),ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t}(Br);function ci(){var e,t,n=[];return function(r,i){return t&&je(t,i)&&r===e||(e=r,t=i,n=di(r,i)),n}}function di(e,t){return"function"==typeof e&&(e=e(t)),Pt(e)}function hi(e,t){return"function"==typeof e?e(t,Lr):e}var pi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=ci(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},i=this.normalizeClassNames(n.viewClassNames,r);return Lr(ui,{hookProps:r,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount,elRef:e.elRef},(function(t){return e.children(t,["fc-"+e.viewSpec.type+"-view","fc-view"].concat(i))}))},t}(Br);function fi(e){return Re(e,mi)}function mi(e){var t,n="function"==typeof e?{component:e}:e,i=n.component;return n.content&&(t=n,i=function(e){return Lr(Yr.Consumer,null,(function(n){return Lr(pi,{viewSpec:n.viewSpec},(function(i,o){var s=r(r({},e),{nextDayThreshold:n.options.nextDayThreshold});return Lr(oi,{hookProps:s,classNames:t.classNames,content:t.content,didMount:t.didMount,willUnmount:t.willUnmount,elRef:i},(function(e,t,n,r){return Lr("div",{className:o.concat(t).join(" "),ref:e},r)}))}))}))}),{superType:n.type,component:i,rawOptions:n}}function gi(e,t,n,i){var o=fi(e),s=fi(t.views);return Re(function(e,t){var n,r={};for(n in e)ii(n,r,e,t);for(n in t)ii(n,r,e,t);return r}(o,s),(function(e){return function(e,t,n,i,o){var s=e.overrides.duration||e.defaults.duration||i.duration||n.duration,a=null,l="",u="",c={};if(s&&(a=function(e){var t=JSON.stringify(e),n=vi[t];return void 0===n&&(n=$e(e),vi[t]=n),n}(s))){var d=et(a);l=d.unit,1===d.value&&(u=l,c=t[l]?t[l].rawOptions:{})}var h=function(t){var n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[u]?n[u]:void 0};return{type:e.type,component:e.component,duration:a,durationUnit:l,singleUnit:u,optionDefaults:e.defaults,optionOverrides:r(r({},c),e.overrides),buttonTextOverride:h(i)||h(n)||e.overrides.buttonText,buttonTextDefault:h(o)||e.defaults.buttonText||h(xt)||e.type}}(e,s,t,n,i)}))}var vi={},yi=function(){function e(e){this.props=e,this.nowDate=Fn(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,i,o,s,a,l,u,c,d=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(u=e,e=null!=(c=r).start&&u<c.start?c.start:null!=c.end&&u>=c.end?new Date(c.end.valueOf()-1):u),i=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(i.unit),s=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,o),a=s=this.trimHiddenDays(s),d.showNonCurrentDates||(a=tn(a,i.range)),a=tn(a=this.adjustActiveRange(a),r),l=rn(i.range,r),{validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:o,activeRange:a,renderRange:s,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,i=null,o=null,s=null;return r.duration?(i=r.duration,o=r.durationUnit,s=this.buildRangeFromDuration(e,t,i,o)):(n=this.props.dayCount)?(o="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?o=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(o=et(i=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,i,o)),{duration:i,unit:o,range:s}},e.prototype.getFallbackDuration=function(){return $e({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,i=t.slotMinTime,o=t.slotMaxTime,s=e.start,a=e.end;return r&&(Xe(i)<0&&(s=xe(s),s=n.add(s,i)),Xe(o)>1&&(a=me(a=xe(a),-1),a=n.add(a,o))),{start:s,end:a}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,s,a=this.props,l=a.dateEnv,u=a.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&Je(c)<Je(n)?et(c).unit:r}function d(){i=l.startOf(e,u),o=l.add(i,n),s={start:i,end:o}}return Xe(n)<=1&&this.isHiddenDay(i)&&(i=xe(i=this.skipHiddenDays(i,t))),d(),this.trimHiddenDays(s)||(e=this.skipHiddenDays(e,t),d()),s},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,i=this.props,o=i.dateEnv,s=i.dateAlignment,a=0,l=e;s&&(l=o.startOf(l,s)),l=xe(l),r=l=this.skipHiddenDays(l,t);do{r=me(r,1),this.isHiddenDay(r)||a++}while(a<n);return{start:l,end:r}},e.prototype.buildCustomVisibleRange=function(e){var t=this.props,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return!i||null!=i.start&&null!=i.end?i:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t;return this.props.dateIncrement||((t=this.props.dateAlignment)?$e(1,t):e||$e({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,i=null,o=null,n.start&&(i=r.createMarker(n.start)),n.end&&(o=r.createMarker(n.end)),i||o?i&&o&&o<i?null:{start:i,end:o}:null);return t&&(t=Zt(t)),t}var n,r,i,o;return null},e.prototype.initHiddenDays=function(){var e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e++)(n[e]=-1!==t.indexOf(e))||r++;if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(e){var t=e.start,n=e.end;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null},e.prototype.isHiddenDay=function(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]},e.prototype.skipHiddenDays=function(e,t,n){for(void 0===t&&(t=1),void 0===n&&(n=!1);this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=me(e,t);return e},e}();function _i(e){var t=0;for(var n in e)e[n].isFetching&&t++;return t}function bi(e,t,n,i){for(var o={},s=0,a=t;s<a.length;s++){var l=a[s];o[l.sourceId]=l}return n&&(o=wi(o,n,i)),r(r({},e),o)}function wi(e,t,n){return xi(e,Ne(e,(function(e){return function(e,t,n){return Ti(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}(e,t,n)})),t,n)}function xi(e,t,n,r){var i={};for(var o in e){var s=e[o];t[o]?i[o]=ki(s,n,r):i[o]=s}return i}function ki(e,t,n){var i=n.options,o=n.calendarApi,s=n.pluginHooks.eventSourceDefs[e.sourceDefId],a=J();return s.fetch({eventSource:e,range:t,context:n},(function(r){var s=r.rawEvents;i.eventSourceSuccess&&(s=i.eventSourceSuccess.call(o,s,r.xhr)||s),e.success&&(s=e.success.call(o,s,r.xhr)||s),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:s})}),(function(r){console.warn(r.message,r),i.eventSourceFailure&&i.eventSourceFailure.call(o,r),e.failure&&e.failure(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:r})})),r(r({},e),{isFetching:!0,latestFetchId:a})}function Si(e,t){return Ne(e,(function(e){return Ti(e,t)}))}function Ti(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Ei(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Di(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Ci(e,t){var n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Mi(e,t){var n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Ai(e,t,n,r,i){var o=[];return{headerToolbar:e.headerToolbar?Ii(e.headerToolbar,e,t,n,r,i,o):null,footerToolbar:e.footerToolbar?Ii(e.footerToolbar,e,t,n,r,i,o):null,viewsWithButtons:o}}function Ii(e,t,n,r,i,o,s){return Re(e,(function(e){return function(e,t,n,r,i,o,s){var a="rtl"===t.direction,l=t.customButtons||{},u=n.buttonText||{},c=t.buttonText||{};return(e?e.split(" "):[]).map((function(e){return e.split(",").map((function(e){if("title"===e)return{buttonName:e};var t,n=void 0,d=void 0,h=void 0,p=void 0;return(t=l[e])?(d=function(e){t.click&&t.click.call(e.target,e,e.target)},(h=r.getCustomButtonIconClass(t))||(h=r.getIconClass(e,a))||(p=t.text)):(n=i[e])?(s.push(e),d=function(){o.changeView(e)},(p=n.buttonTextOverride)||(h=r.getIconClass(e,a))||(p=n.buttonTextDefault)):o[e]&&(d=function(){o[e]()},(p=u[e])||(h=r.getIconClass(e,a))||(p=c[e])),{buttonName:e,buttonClick:d,buttonIcon:h,buttonText:p}}))}))}(e,t,n,r,i,o,s)}))}function Li(e,t,n,r,i){var o=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Oi(t)}(t,n):o=Oi(n);var s=new XMLHttpRequest;s.open(e,t,!0),"GET"!==e&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.onload=function(){if(s.status>=200&&s.status<400){var e=!1,t=void 0;try{t=JSON.parse(s.responseText),e=!0}catch(e){}e?r(t,s):i("Failure parsing JSON",s)}else i("Request failed",s)},s.onerror=function(){i("Request failed",s)},s.send(o)}function Oi(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function Ni(e,t){for(var n=Fe(t.getCurrentData().eventSources),r=[],i=0,o=e;i<o.length;i++){for(var s=o[i],a=!1,l=0;l<n.length;l++)if(n[l]._raw===s){n.splice(l,1),a=!0;break}a||r.push(s)}for(var u=0,c=n;u<c.length;u++){var d=c[u];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:d.sourceId})}for(var h=0,p=r;h<p.length;h++){var f=p[h];t.calendarApi.addEventSource(f)}}var Ri=[ni({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),ni({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;Sr(e.eventSource.meta.bind(null,Tn(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),ni({eventSourceRefiners:{method:String,extraParams:At,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta:function(e){return e.url?{url:e.url,method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch:function(e,t,n){var i=e.eventSource.meta,o=function(e,t,n){var i,o,s,a,l=n.dateEnv,u=n.options,c={};return null==(i=e.startParam)&&(i=u.startParam),null==(o=e.endParam)&&(o=u.endParam),null==(s=e.timeZoneParam)&&(s=u.timeZoneParam),a="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},r(c,a),c[i]=l.formatIso(t.start),c[o]=l.formatIso(t.end),"local"!==l.timeZone&&(c[s]=l.timeZone),c}(i,e.range,e.context);Li(i.method,i.url,o,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),ni({recurringTypes:[{parse:function(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){var n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null},r=void 0;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(i=e.endTime,o=e.startTime,r={years:i.years-o.years,months:i.months-o.months,days:i.days-o.days,milliseconds:i.milliseconds-o.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var i,o;return null},expand:function(e,t,n){var r=tn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){for(var i=e?Pe(e):null,o=xe(n.start),s=n.end,a=[];o<s;){var l=void 0;i&&!i[o.getUTCDay()]||(l=t?r.add(o,t):o,a.push(l)),o=me(o,1)}return a}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:At,startTime:$e,endTime:$e,duration:$e,startRecur:At,endRecur:At}}),ni({optionChangeHandlers:{events:function(e,t){Ni([e],t)},eventSources:Ni}}),ni({contentTypeHandlers:{html:function(){return Pi},domNodes:function(){return Fi}},propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",r(r({},Tn(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Hn(e,t))}}})];function Pi(e,t){e.innerHTML=t}function Fi(e,t){var n=Array.prototype.slice.call(e.childNodes),r=Array.prototype.slice.call(t);if(!it(n,r)){for(var i=0,o=r;i<o.length;i++){var s=o[i];e.appendChild(s)}n.forEach(Y)}}var ji=function(){function e(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}return e.prototype.request=function(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))},e.prototype.pause=function(e){void 0===e&&(e="");var t=this.pauseDepths;t[e]=(t[e]||0)+1,this.clearTimeout()},e.prototype.resume=function(e,t){void 0===e&&(e="");var n=this.pauseDepths;e in n&&((t||--n[e]<=0)&&delete n[e],this.tryDrain())},e.prototype.isPaused=function(){return Object.keys(this.pauseDepths).length},e.prototype.tryDrain=function(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}},e.prototype.clear=function(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}},e.prototype.clearTimeout=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)},e.prototype.drained=function(){this.drainedOption&&this.drainedOption()},e}(),Yi=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new ji(this.drain.bind(this))}return e.prototype.request=function(e,t){this.queue.push(e),this.delayedRunner.request(t)},e.prototype.pause=function(e){this.delayedRunner.pause(e)},e.prototype.resume=function(e,t){this.delayedRunner.resume(e,t)},e.prototype.drain=function(){for(var e=this.queue;e.length;){for(var t=[],n=void 0;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}},e.prototype.runTask=function(e){this.runTaskOption&&this.runTaskOption(e)},e.prototype.drained=function(e){this.drainedOption&&this.drainedOption(e)},e}();function Vi(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,bt(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=we(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var Hi=function(){function e(e){var t=this;this.computeOptionsData=ot(this._computeOptionsData),this.computeCurrentViewData=ot(this._computeCurrentViewData),this.organizeRawLocales=ot(Zn),this.buildLocale=ot(Xn),this.buildPluginHooks=function(){var e,t=[],n=[];return function(i,o){return e&&it(i,t)&&it(o,n)||(e=function(e,t){var n={},i={reducers:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],eventResizeJoinTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,contentTypeHandlers:{},listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(e){for(var t=0,s=e;t<s.length;t++){var a=s[t];n[a.id]||(n[a.id]=!0,o(a.deps),u=a,i={reducers:(l=i).reducers.concat(u.reducers),contextInit:l.contextInit.concat(u.contextInit),eventRefiners:r(r({},l.eventRefiners),u.eventRefiners),eventDefMemberAdders:l.eventDefMemberAdders.concat(u.eventDefMemberAdders),eventSourceRefiners:r(r({},l.eventSourceRefiners),u.eventSourceRefiners),isDraggableTransformers:l.isDraggableTransformers.concat(u.isDraggableTransformers),eventDragMutationMassagers:l.eventDragMutationMassagers.concat(u.eventDragMutationMassagers),eventDefMutationAppliers:l.eventDefMutationAppliers.concat(u.eventDefMutationAppliers),dateSelectionTransformers:l.dateSelectionTransformers.concat(u.dateSelectionTransformers),datePointTransforms:l.datePointTransforms.concat(u.datePointTransforms),dateSpanTransforms:l.dateSpanTransforms.concat(u.dateSpanTransforms),views:r(r({},l.views),u.views),viewPropsTransformers:l.viewPropsTransformers.concat(u.viewPropsTransformers),isPropsValid:u.isPropsValid||l.isPropsValid,externalDefTransforms:l.externalDefTransforms.concat(u.externalDefTransforms),eventResizeJoinTransforms:l.eventResizeJoinTransforms.concat(u.eventResizeJoinTransforms),viewContainerAppends:l.viewContainerAppends.concat(u.viewContainerAppends),eventDropTransformers:l.eventDropTransformers.concat(u.eventDropTransformers),calendarInteractions:l.calendarInteractions.concat(u.calendarInteractions),componentInteractions:l.componentInteractions.concat(u.componentInteractions),themeClasses:r(r({},l.themeClasses),u.themeClasses),eventSourceDefs:l.eventSourceDefs.concat(u.eventSourceDefs),cmdFormatter:u.cmdFormatter||l.cmdFormatter,recurringTypes:l.recurringTypes.concat(u.recurringTypes),namedTimeZonedImpl:u.namedTimeZonedImpl||l.namedTimeZonedImpl,initialView:l.initialView||u.initialView,elementDraggingImpl:l.elementDraggingImpl||u.elementDraggingImpl,optionChangeHandlers:r(r({},l.optionChangeHandlers),u.optionChangeHandlers),scrollGridImpl:u.scrollGridImpl||l.scrollGridImpl,contentTypeHandlers:r(r({},l.contentTypeHandlers),u.contentTypeHandlers),listenerRefiners:r(r({},l.listenerRefiners),u.listenerRefiners),optionRefiners:r(r({},l.optionRefiners),u.optionRefiners),propSetHandlers:r(r({},l.propSetHandlers),u.propSetHandlers)})}var l,u}return e&&o(e),o(t),i}(i,o)),t=i,n=o,e}}(),this.buildDateEnv=ot(Bi),this.buildTheme=ot(Ui),this.parseToolbars=ot(Ai),this.buildViewSpecs=ot(gi),this.buildDateProfileGenerator=st(zi),this.buildViewApi=ot(qi),this.buildViewUiProps=st(Gi),this.buildEventUiBySource=ot(Wi,je),this.buildEventUiBases=ot($i),this.parseContextBusinessHours=st(Ki),this.buildTitle=ot(Vi),this.emitter=new Tr,this.actionRunner=new Yi(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},i=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=i.calendarOptions.initialView||i.pluginHooks.initialView,s=this.computeCurrentViewData(o,i,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);var a,l,u,c=(a=i.calendarOptions,l=i.dateEnv,null!=(u=a.initialDate)?l.createMarker(u):Fn(a.now,l)),d=s.dateProfileGenerator.build(c);sn(d.activeRange,c)||(c=d.currentRange.start);for(var h={dateEnv:i.dateEnv,options:i.calendarOptions,pluginHooks:i.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p=0,f=i.pluginHooks.contextInit;p<f.length;p++)(0,f[p])(h);for(var m=function(e,t,n){var r=t?t.activeRange:null;return bi({},function(e,t){var n=Pn(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(var o=0,s=r;o<s.length;o++){var a=Rn(s[o],t,n);a&&i.push(a)}return i}(e,n),r,n)}(i.calendarOptions,d,h),g={dynamicOptionOverrides:n,currentViewType:o,currentDate:c,dateProfile:d,businessHours:this.parseContextBusinessHours(h),eventSources:m,eventUiBases:{},loadingLevel:_i(m),eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(h).selectionConfig},v=r(r({},h),g),y=0,_=i.pluginHooks.reducers;y<_.length;y++){var b=_[y];r(g,b(null,null,v))}g.loadingLevel&&this.emitter.trigger("loading",!0),this.state=g,this.updateData(),this.actionRunner.resume()}return e.prototype.resetOptions=function(e,t){var n=this.props;n.optionOverrides=t?r(r({},n.optionOverrides),e):e,this.actionRunner.request({type:"NOTHING"})},e.prototype._handleAction=function(e){var t=this.props,n=this.state,i=this.emitter,o=function(e,t){var n;return"SET_OPTION"===t.type?r(r({},e),((n={})[t.optionName]=t.rawOptionValue,n)):e}(n.dynamicOptionOverrides,e),s=this.computeOptionsData(t.optionOverrides,o,t.calendarApi),a=function(e,t){return"CHANGE_VIEW_TYPE"===t.type?t.viewType:e}(n.currentViewType,e),l=this.computeCurrentViewData(a,s,t.optionOverrides,o);t.calendarApi.currentDataManager=this,i.setThisContext(t.calendarApi),i.setOptions(l.options);var u={dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},c=n.currentDate,d=n.dateProfile;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(d=l.dateProfileGenerator.build(c)),d=function(e,t,n,r){var i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":if(!e.activeRange||!sn(e.currentRange,t.dateMarker))return r.build(t.dateMarker);break;case"PREV":if((i=r.buildPrev(e,n)).isValid)return i;break;case"NEXT":if((i=r.buildNext(e,n)).isValid)return i}return e}(d,e,c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),l.dateProfileGenerator),sn(d.currentRange,c)||(c=d.currentRange.start);for(var h=function(e,t,n,i){var o,s,a=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return bi(e,t.sources,a,i);case"REMOVE_EVENT_SOURCE":return o=e,s=t.sourceId,Ne(o,(function(e){return e.sourceId!==s}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?wi(e,a,i):e;case"FETCH_EVENT_SOURCES":return xi(e,t.sourceIds?Pe(t.sourceIds):Si(e,i),a,i);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,i){var o,s=e[t];return s&&n===s.latestFetchId?r(r({},e),((o={})[t]=r(r({},s),{isFetching:!1,fetchRange:i}),o)):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}(n.eventSources,e,d,u),p=_i(h),f=function(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,o){if(t&&n===t.latestFetchId){var s=It(function(e,t,n){var r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Wr(e,i)),r&&(e=Wr(e,r)),e}(i,t,o),t,o);return r&&(s=Ue(s,r,o)),Nt($r(e,t.sourceId),s)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=Ue(t,n,r)),Nt(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"MERGE_EVENTS":return Nt(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Ue(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,i={},o={};for(var s in n)t.defs[s]||(i[s]=n[s]);for(var a in r)!t.instances[a]&&i[r[a].defId]&&(o[a]=r[a]);return{defs:i,instances:o}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return $r(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Rt(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,h,d,u),m=p&&!l.options.progressiveEventRendering&&n.renderableEventStore||f,g=this.buildViewUiProps(u),v=g.eventUiSingleBase,y=g.selectionConfig,_=this.buildEventUiBySource(h),b=this.buildEventUiBases(m.defs,v,_),w=n.loadingLevel||0,x=p,k={dynamicOptionOverrides:o,currentViewType:a,currentDate:c,dateProfile:d,eventSources:h,eventStore:f,renderableEventStore:m,selectionConfig:y,eventUiBases:b,loadingLevel:x,businessHours:this.parseContextBusinessHours(u),dateSelection:Ei(n.dateSelection,e),eventSelection:Di(n.eventSelection,e),eventDrag:Ci(n.eventDrag,e),eventResize:Mi(n.eventResize,e)},S=r(r({},u),k),T=0,E=s.pluginHooks.reducers;T<E.length;T++){var D=E[T];r(k,D(n,e,S))}!w&&x?i.trigger("loading",!0):w&&!x&&i.trigger("loading",!1),this.state=k,t.onAction&&t.onAction(e)},e.prototype.updateData=function(){var e,t,n,i,o,s,a,l,u,c=this.props,d=this.state,h=this.data,p=this.computeOptionsData(c.optionOverrides,d.dynamicOptionOverrides,c.calendarApi),f=this.computeCurrentViewData(d.currentViewType,p,c.optionOverrides,d.dynamicOptionOverrides),m=this.data=r(r(r({viewTitle:this.buildTitle(d.dateProfile,f.options,p.dateEnv),calendarApi:c.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p),f),d),g=p.pluginHooks.optionChangeHandlers,v=h&&h.calendarOptions,y=p.calendarOptions;if(v&&v!==y)for(var _ in v.timeZone!==y.timeZone&&(d.eventSources=m.eventSources=(s=m.eventSources,l=m,u=(a=d.dateProfile)?a.activeRange:null,xi(s,Si(s,l),u,l)),d.eventStore=m.eventStore=(e=m.eventStore,t=h.dateEnv,n=m.dateEnv,i=e.defs,o=Re(e.instances,(function(e){var o=i[e.defId];return o.allDay||o.recurringDef?e:r(r({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})})),{defs:i,instances:o})),g)v[_]!==y[_]&&g[_](y[_],m);c.onData&&c.onData(m)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),i=r.refinedOptions,o=r.pluginHooks,s=r.localeDefaults,a=r.availableLocaleData;Zi(r.extra);var l=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,o,a,i.defaultRangeSeparator),u=this.buildViewSpecs(o.views,e,t,s),c=this.buildTheme(i,o);return{calendarOptions:i,pluginHooks:o,dateEnv:l,viewSpecs:u,theme:c,toolbarConfig:this.parseToolbars(i,e,c,u,n),localeDefaults:s,availableRawLocales:a.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=Ct([xt,e,t]),i=n.locales,o=n.locale,s=this.organizeRawLocales(i),a=s.map,l=this.buildLocale(o||s.defaultCode,a).options,u=this.buildPluginHooks(e.plugins||[],Ri),c=this.currentCalendarOptionsRefiners=r(r(r(r(r({},wt),kt),St),u.listenerRefiners),u.optionRefiners),d={},h=Ct([xt,l,e,t]),p={},f=this.currentCalendarOptionsInput,m=this.currentCalendarOptionsRefined,g=!1;for(var v in h)"plugins"!==v&&(h[v]===f[v]||Tt[v]&&v in f&&Tt[v](f[v],h[v])?p[v]=m[v]:c[v]?(p[v]=c[v](h[v]),g=!0):d[v]=f[v]);return g&&(this.currentCalendarOptionsInput=h,this.currentCalendarOptionsRefined=p),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:u,availableLocaleData:s,localeDefaults:l,extra:d}},e.prototype._computeCurrentViewData=function(e,t,n,r){var i=t.viewSpecs[e];if(!i)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var o=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r),s=o.refinedOptions;return Zi(o.extra),{viewSpec:i,options:s,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:s.slotMinTime,slotMaxTime:s.slotMaxTime,showNonCurrentDates:s.showNonCurrentDates,dayCount:s.dayCount,dateAlignment:s.dateAlignment,dateIncrement:s.dateIncrement,hiddenDays:s.hiddenDays,weekends:s.weekends,nowInput:s.now,validRangeInput:s.validRange,visibleRangeInput:s.visibleRange,monthMode:s.monthMode,fixedWeekCount:s.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,i,o){var s=Ct([xt,e.optionDefaults,n,i,e.optionOverrides,o]),a=r(r(r(r(r(r({},wt),kt),St),Dt),t.listenerRefiners),t.optionRefiners),l={},u=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,h={};for(var p in s)s[p]===u[p]?l[p]=c[p]:(s[p]===this.currentCalendarOptionsInput[p]?p in this.currentCalendarOptionsRefined&&(l[p]=this.currentCalendarOptionsRefined[p]):a[p]?l[p]=a[p](s[p]):h[p]=s[p],d=!0);return d&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:h}},e}();function Bi(e,t,n,r,i,o,s,a){var l=Xn(t||s.defaultCode,s.map);return new $n({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:o.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:o.cmdFormatter,defaultSeparator:a})}function Ui(e,t){return new(t.themeClasses[e.themeSystem]||ri)(e)}function zi(e){return new(e.dateProfileGeneratorClass||yi)(e)}function qi(e,t,n){return new On(e,t,n)}function Wi(e){return Re(e,(function(e){return e.ui}))}function $i(e,t,n){var r={"":t};for(var i in e){var o=e[i];o.sourceId&&n[o.sourceId]&&(r[i]=n[o.sourceId])}return r}function Gi(e){var t=e.options;return{eventUiSingleBase:jt({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:jt({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function Ki(e){return nr(e.options.businessHours,e)}function Zi(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var Xi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleData=function(e){n.dataManager?n.setState(e):n.state=e},n.dataManager=new Hi({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return n(t,e),t.prototype.render=function(){return this.props.children(this.state)},t.prototype.componentDidUpdate=function(e){var t=this.props.optionOverrides;t!==e.optionOverrides&&this.dataManager.resetOptions(t)},t}(Ir),Ji=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();function Qi(e){var t;return(t={})[e.component.uid]=e,t}var eo={},to=function(){function e(e,t){this.emitter=new Tr}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),no={},ro={startTime:$e,duration:$e,create:Boolean,sourceId:String};function io(e){var t=Mt(e,ro),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,i=n.extraClassName,o=!1,s=r.center;return r.left?(o=!0,e=r.left):e=r.start,r.right?(o=!0,t=r.right):t=r.end,Lr("div",{className:[i||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Lr(so,{key:e,widgetGroups:t,title:n.title,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled})},t}(Br),so=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return Lr.apply(void 0,i(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,o=[],s=!0,a=0,l=e;a<l.length;a++){var u=l[a],c=u.buttonName,d=u.buttonClick,h=u.buttonText,p=u.buttonIcon;if("title"===c)s=!1,o.push(Lr("h2",{className:"fc-toolbar-title"},t.title));else{var f=p?{"aria-label":c}:{},m=["fc-"+c+"-button",n.getClass("button")];c===t.activeButton&&m.push(n.getClass("buttonActive"));var g=!t.isTodayEnabled&&"today"===c||!t.isPrevEnabled&&"prev"===c||!t.isNextEnabled&&"next"===c;o.push(Lr("button",r({disabled:g,className:m.join(" "),onClick:d,type:"button"},f),h||(p?Lr("span",{className:p}):"")))}}if(o.length>1){var v=s&&n.getClass("buttonGroup")||"";return Lr.apply(void 0,i(["div",{className:v}],o))}return o[0]},t}(Br),ao=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,qr(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",o="";return n?null!==t.availableWidth?i=t.availableWidth/n:o=1/n*100+"%":i=e.height||"",Lr("div",{ref:this.handleEl,onClick:e.onClick,className:r.join(" "),style:{height:i,paddingBottom:o}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(Br),lo=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,i=r.context,o=cn(t);if(o&&r.isValidSegDownEl(e.target)){var s=V(e.target,".fc-event-forced-url"),a=s?s.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:t,event:new Yn(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:i.viewApi}),a&&!e.defaultPrevented&&(window.location.href=a)}},n.destroy=G(t.el,"click",".fc-event",n.handleSegClick),n}return n(t,e),t}(Ji),uo=function(e){function t(t){var n,r,i,o,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){cn(t)&&(s.currentSegEl=t,s.triggerEvent("eventMouseEnter",e,t))},s.handleSegLeave=function(e,t){s.currentSegEl&&(s.currentSegEl=null,s.triggerEvent("eventMouseLeave",e,t))},s.removeHoverListeners=(n=t.el,r=s.handleSegEnter,i=s.handleSegLeave,G(n,"mouseover",".fc-event",(function(e,t){if(t!==o){o=t,r(e,t);var n=function(e){o=null,i(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return n(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,i=r.context,o=cn(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Yn(i,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:i.viewApi})},t}(Ji),co=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=ot(Vr),t.buildViewPropTransformers=ot(po),t.buildToolbarProps=ot(ho),t.handleNavLinkClick=$("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Nr(),t.footerRef=Nr(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter}}(e,n),i=[lo,uo].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=i,eo[e.uid]=r},t.unregisterInteractiveComponent=function(e){for(var n=0,r=t.interactionsStore[e.uid];n<r.length;n++)r[n].destroy();delete t.interactionsStore[e.uid],delete eo[e.uid]},t.resizeRunner=new ji((function(){t.props.emitter.trigger("_resize",!0),t.props.emitter.trigger("windowResize",{view:t.props.viewApi})})),t.handleWindowResize=function(e){var n=t.props.options;n.handleWindowResize&&e.target===window&&t.resizeRunner.request(n.windowResizeDelay)},t}return n(t,e),t.prototype.render=function(){var e,t=this.props,n=t.toolbarConfig,i=t.options,o=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Fn(t.options.now,t.dateEnv),t.viewTitle),s=!1,a="";t.isHeightAuto||t.forPrint?a="":null!=i.height?s=!0:null!=i.contentHeight?a=i.contentHeight:e=Math.max(i.aspectRatio,.5);var l=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent);return Lr(Yr.Provider,{value:l},n.headerToolbar&&Lr(oo,r({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.headerToolbar},o)),Lr(ao,{liquid:s,height:a,aspectRatio:e,onClick:this.handleNavLinkClick},this.renderView(t),this.buildAppendContent()),n.footerToolbar&&Lr(oo,r({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footerToolbar},o)))},t.prototype.componentDidMount=function(){var e=this.props;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((function(t){return new t(e)})),window.addEventListener("resize",this.handleWindowResize);var t=e.pluginHooks.propSetHandlers;for(var n in t)t[n](e[n],e)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.pluginHooks.propSetHandlers;for(var r in n)t[r]!==e[r]&&n[r](t[r],t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(var e=0,t=this.calendarInteractions;e<t.length;e++)t[e].destroy();this.props.emitter.trigger("_unmount")},t.prototype._handleNavLinkClick=function(e,t){var n=this.props,r=n.dateEnv,i=n.options,o=n.calendarApi,s=t.getAttribute("data-navlink");s=s?JSON.parse(s):{};var a=r.createMarker(s.date),l=s.type,u="day"===l?i.navLinkDayClick:"week"===l?i.navLinkWeekClick:null;"function"==typeof u?u.call(o,r.toDate(a),e):("string"==typeof u&&(l=u),o.zoomTo(a,l))},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return Lr.apply(void 0,i([Rr,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,i={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},o=0,s=this.buildViewPropTransformers(t.viewPropsTransformers);o<s.length;o++){var a=s[o];r(i,a.transform(i,e))}var l=n.component;return Lr(l,r({},i))},t}(Hr);function ho(e,t,n,r,i,o){var s=n.build(i,void 0,!1),a=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:o,activeButton:e.type,isTodayEnabled:s.isValid&&!sn(t.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function po(e){return e.map((function(e){return new e}))}var fo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={forPrint:!1},t.handleBeforePrint=function(){t.setState({forPrint:!0})},t.handleAfterPrint=function(){t.setState({forPrint:!1})},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.options,n=this.state.forPrint,r=n||"auto"===t.height||"auto"===t.contentHeight,i=r||null==t.height?"":t.height,o=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return lr()||o.push("fc-liquid-hack"),e.children(o,i,r,n)},t.prototype.componentDidMount=function(){var e=this.props.emitter;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)},t.prototype.componentWillUnmount=function(){var e=this.props.emitter;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)},t}(Br);function mo(e,t){return bt(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var go="fc-col-header-cell",vo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,i=e.theme,o=e.viewApi,s=this.props,a=s.date,l=s.dateProfile,u=hr(a,s.todayRange,null,l),c=[go].concat(pr(u,i)),d=t.format(a,s.dayHeaderFormat),h=n.navLinks&&!u.isDisabled&&s.colCnt>1?{"data-navlink":fr(a),tabIndex:0}:{},p=r(r(r({date:t.toDate(a),view:o},s.extraHookProps),{text:d}),u);return Lr(oi,{hookProps:p,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:_o,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,i){return Lr("th",r({ref:e,className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:tt(a),colSpan:s.colSpan},s.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Lr("a",r({ref:n,className:["fc-col-header-cell-cushion",s.isSticky?"fc-sticky":""].join(" ")},h),i)))}))},t}(Br),yo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,i=t.theme,o=t.viewApi,s=t.options,a=me(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[go].concat(pr(l,i),e.extraClassNames||[]),c=n.format(a,e.dayHeaderFormat),d=r(r(r(r({date:a},l),{view:o}),e.extraHookProps),{text:c});return Lr(oi,{hookProps:d,classNames:s.dayHeaderClassNames,content:s.dayHeaderContent,defaultContent:_o,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},(function(t,n,i,o){return Lr("th",r({ref:t,className:u.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},Lr("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:i},o)))}))},t}(Br);function _o(e){return e.text}var bo=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Fn(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=ge(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,$e(1,e.unit)),o=i.valueOf()-n.valueOf();return{currentState:{nowDate:r,todayRange:wo(r)},nextState:{nowDate:i,todayRange:wo(i)},waitMs:o}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=Yr,t}(Ir);function wo(e){var t=xe(e);return{start:t,end:me(t,1)}}var xo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=ot(ko),t}return n(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,i=t.datesRepDistinctDays,o=t.renderIntro,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return Lr(bo,{unit:"day"},(function(e,t){return Lr("tr",null,o&&o(),n.map((function(e){return i?Lr(vo,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:s}):Lr(yo,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s})})))}))},t}(Br);function ko(e,t,n){return e||mo(t,n)}var So=function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],s=-1;n<r;)t.isHiddenDay(n)?i.push(s+.5):(s++,i.push(s),o.push(n)),n=me(n,1);this.dates=o,this.indices=i,this.cnt=o.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(me(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(i=Math.floor(i))?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null},e.prototype.getDateDayIndex=function(e){var t=this.indices,n=Math.floor(ye(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},e}(),To=function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;n<o.length&&o[n].getUTCDay()!==r;n++);i=Math.ceil(o.length/n)}else i=1,n=o.length;this.rowCnt=i,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}return e.prototype.buildCells=function(){for(var e=[],t=0;t<this.rowCnt;t++){for(var n=[],r=0;r<this.colCnt;r++)n.push(this.buildCell(t,r));e.push(n)}return e},e.prototype.buildCell=function(e,t){var n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}},e.prototype.buildHeaderDates=function(){for(var e=[],t=0;t<this.colCnt;t++)e.push(this.cells[0][t].date);return e},e.prototype.sliceRange=function(e){var t=this.colCnt,n=this.daySeries.sliceRange(e),r=[];if(n)for(var i=n.firstIndex,o=n.lastIndex,s=i;s<=o;){var a=Math.floor(s/t),l=Math.min((a+1)*t,o+1);r.push({row:a,firstCol:s%t,lastCol:(l-1)%t,isStart:n.isStart&&s===i,isEnd:n.isEnd&&l-1===o}),s=l}return r},e}(),Eo=function(){function e(){this.sliceBusinessHours=ot(this._sliceBusinessHours),this.sliceDateSelection=ot(this._sliceDateSpan),this.sliceEventStore=ot(this._sliceEventStore),this.sliceEventDrag=ot(this._sliceInteraction),this.sliceEventResize=ot(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];var a=e.eventUiBases,l=this.sliceEventStore.apply(this,i([e.eventStore,a,t,n],o));return{dateSelectionSegs:this.sliceDateSelection.apply(this,i([e.dateSelection,a,r],o)),businessHourSegs:this.sliceBusinessHours.apply(this,i([e.businessHours,t,n,r],o)),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag.apply(this,i([e.eventDrag,a,t,n],o)),eventResize:this.sliceEventResize.apply(this,i([e.eventResize,a,t,n],o)),eventSelection:e.eventSelection}},e.prototype.sliceNowDate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this._sliceDateSpan.apply(this,i([{range:{start:e,end:ge(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];return e?this._sliceEventStore.apply(this,i([Ue(e,Do(t,Boolean(n)),r),{},t,n],o)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(e){var s=an(e,t,Do(n,Boolean(r)),r);return{bg:this.sliceEventRanges(s.bg,i),fg:this.sliceEventRanges(s.fg,i)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(!e)return null;var s=an(e.mutatedEvents,t,Do(n,Boolean(r)),r);return{segs:this.sliceEventRanges(s.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];if(!e)return[];for(var s=function(e,t,n){var r=Wt({editable:!1},n),i=Gt(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:hn(i,t),instance:Ie(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e,t,n),a=this.sliceRange.apply(this,i([e.range],r)),l=0,u=a;l<u.length;l++){u[l].eventRange=s}return a},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.sliceEventRange(o,t))}return n},e.prototype.sliceEventRange=function(e,t){var n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:me(n.start,1)});for(var r=this.sliceRange.apply(this,i([n],t)),o=0,s=r;o<s.length;o++){var a=s[o];a.eventRange=e,a.isStart=e.isStart&&a.isStart,a.isEnd=e.isEnd&&a.isEnd}return r},e}();function Do(e,t){var n=e.activeRange;return t?n:{start:ge(n.start,e.slotMinTime.milliseconds),end:ge(n.end,e.slotMaxTime.milliseconds-864e5)}}var Co=/^(visible|hidden)$/,Mo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.liquid,n=e.liquidIsAbsolute,r=t&&n,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),Lr("div",{ref:this.handleEl,className:i.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)},t.prototype.needsXScrolling=function(){if(Co.test(this.props.overflowX))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),n=e.children,r=0;r<n.length;r++)if(n[r].getBoundingClientRect().width>t)return!0;return!1},t.prototype.needsYScrolling=function(){if(Co.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;r<n.length;r++)if(n[r].getBoundingClientRect().height>t)return!0;return!1},t.prototype.getXScrollbarWidth=function(){return Co.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Co.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(Br),Ao=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,i=r.depths,o=r.currentMap,s=!1,a=!1;null!==e?(s=n in o,o[n]=e,i[n]=(i[n]||0)+1,a=!0):0==--i[n]&&(delete o[n],delete t.callbackMap[n],s=!0),t.masterCallback&&(s&&t.masterCallback(null,String(n)),a&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return Be(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Fe(this.currentMap)},e}();function Io(e){for(var t=0,n=0,r=B(e,".fc-scrollgrid-shrink");n<r.length;n++){var i=r[n];t=Math.max(t,he(i))}return Math.ceil(t)}function Lo(e,t){return e.liquid&&t.liquid}function Oo(e,t){return null!=t.maxHeight||Lo(e,t)}function No(e,t,n){var r=n.expandRows;return"function"==typeof t.content?t.content(n):Lr("table",{className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:r?n.clientHeight:""}},n.tableColGroupNode,Lr("tbody",{},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function Ro(e,t){return it(e,t,je)}function Po(e,t){for(var n=[],r=0,o=e;r<o.length;r++)for(var s=o[r],a=s.span||1,l=0;l<a;l++)n.push(Lr("col",{style:{width:"shrink"===s.width?Fo(t):s.width||"",minWidth:s.minWidth||""}}));return Lr.apply(void 0,i(["colgroup",{}],n))}function Fo(e){return null==e?4:e}function jo(e){for(var t=0,n=e;t<n.length;t++)if("shrink"===n[t].width)return!0;return!1}function Yo(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function Vo(e,t){var n=["fc-scrollgrid-section","fc-scrollgrid-section-"+e.type,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function Ho(e){return Lr("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Bo(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Uo(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=ot((function(e){return e}),Ro),t.renderMicroColGroup=ot(Po),t.scrollerRefs=new Ao,t.scrollerElRefs=new Ao(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.setState(r({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return n(t,e),t.prototype.render=function(){for(var e,t=this.props,n=this.state,r=this.context,o=t.sections||[],s=this.processCols(t.cols),a=this.renderMicroColGroup(s,n.shrinkWidth),l=Yo(t.liquid,r),u=o.length,c=0,d=[],h=[],p=[];c<u&&"header"===(e=o[c]).type;)d.push(this.renderSection(e,c,a)),c++;for(;c<u&&"body"===(e=o[c]).type;)h.push(this.renderSection(e,c,a)),c++;for(;c<u&&"footer"===(e=o[c]).type;)p.push(this.renderSection(e,c,a)),c++;var f=!lr();return Lr("table",{className:l.join(" "),style:{height:t.height}},Boolean(!f&&d.length)&&Lr.apply(void 0,i(["thead",{}],d)),Boolean(!f&&h.length)&&Lr.apply(void 0,i(["tbody",{}],h)),Boolean(!f&&p.length)&&Lr.apply(void 0,i(["tfoot",{}],p)),f&&Lr.apply(void 0,i(["tbody",{}],d,h,p)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?Lr(Rr,{key:e.key},e.outerContent):Lr("tr",{key:e.key,className:Vo(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,n,e.chunk))},t.prototype.renderChunkTd=function(e,t,n,r){if("outerContent"in r)return r.outerContent;var i=this.props,o=this.state,s=o.forceYScrollbars,a=o.scrollerClientWidths,l=o.scrollerClientHeights,u=Oo(i,e),c=Lo(i,e),d=i.liquid?s?"scroll":u?"auto":"hidden":"visible",h=No(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:void 0!==a[t]?a[t]:null,clientHeight:void 0!==l[t]?l[t]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}});return Lr("td",{ref:r.elRef},Lr("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},Lr(Mo,{ref:this.scrollerRefs.createRef(t),elRef:this.scrollerElRefs.createRef(t),overflowY:d,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},h)))},t.prototype._handleScrollerEl=function(e,t){var n=parseInt(t,10);qr(this.props.sections[n].chunk.scrollerElRef,e)},t.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},t.prototype.componentDidUpdate=function(){this.handleSizing()},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},t.prototype.computeShrinkWidth=function(){return jo(this.props.cols)?Io(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){for(var e=yr(),t=this.props.sections.length,n=this.scrollerRefs,r=this.scrollerElRefs,i=!1,o={},s={},a=0;a<t;a++){var l=n.currentMap[a];if(l&&l.needsYScrolling()){i=!0;break}}for(a=0;a<t;a++){var u=r.currentMap[a];if(u){var c=u.parentNode;o[a]=Math.floor(c.getBoundingClientRect().width-(i?e.y:0)),s[a]=Math.floor(c.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:o,scrollerClientHeights:s}},t}(Br);zo.addStateEquality({scrollerClientWidths:je,scrollerClientHeights:je});var qo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,i=r.eventRange,o=i.ui,s={event:new Yn(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&mn(r,t),isStartResizable:!e.disableResizing&&gn(r,t),isEndResizable:!e.disableResizing&&vn(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)},a=bn(s).concat(o.classNames);return Lr(oi,{hookProps:s,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,i){return e.children(t,a.concat(n),r,i,s)}))},t.prototype.componentDidMount=function(){un(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&un(this.elRef.current,t)},t}(Br),Wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,i=t.options.eventTimeFormat||e.defaultTimeFormat,o=yn(n,i,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Lr(qo,{seg:n,timeText:o,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||$o,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,i,o,s,a){return Lr("a",r({className:e.extraClassNames.concat(i).join(" "),style:{borderColor:a.borderColor,backgroundColor:a.backgroundColor},ref:t},function(e){var t=e.eventRange.def.url;return t?{href:t}:{}}(n)),Lr("div",{className:"fc-event-main",ref:o,style:{color:a.textColor}},s),a.isStartResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-start"}),a.isEndResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(Br);function $o(e){return Lr("div",{className:"fc-event-main-frame"},e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title-container"},Lr("div",{className:"fc-event-title fc-sticky"},e.event.title||Lr(Rr,null,"\xa0"))))}var Go=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return Lr(oi,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},Ko=bt({day:"numeric"}),Zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=st(Jo),t.normalizeClassNames=ci(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=this.refineHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv}),i=pr(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),o=r.isDisabled?{}:{"data-date":tt(e.date)};return Lr(ui,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,i,o,r.isDisabled)}))},t}(Br),Xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=Jo({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return Lr(ai,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(Br);function Jo(e){var t=e.date,n=e.dateEnv,i=hr(t,e.todayRange,null,e.dateProfile);return r(r(r({date:n.toDate(t),view:e.viewApi},i),{dayNumberText:e.showDayNumber?n.format(t,Ko):""}),e.extraProps)}function Qo(e){return Lr("div",{className:"fc-"+e})}var es=function(e){return Lr(qo,{defaultContent:ts,seg:e.seg,timeText:"",disableDragging:!0,disableResizing:!0,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(e,t,n,r,i){return Lr("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:i.backgroundColor}},r)}))};function ts(e){return e.event.title&&Lr("div",{className:"fc-event-title"},e.event.title)}var ns=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,i=e.date,o=r.weekNumberFormat||e.defaultFormat,s=n.computeWeekNumber(i),a=n.format(i,o);return Lr(oi,{hookProps:{num:s,text:a,date:i},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:rs,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function rs(e){return e.text}var is=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this)||this;return i.isRendering=!1,i.isRendered=!1,i.currentClassNames=[],i.customContentRenderId=0,i.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":i.renderRunner.tryDrain()}},i.handleData=function(e){i.currentData=e,i.renderRunner.request(e.calendarOptions.rerenderDelay)},i.handleRenderRequest=function(){if(i.isRendering){i.isRendered=!0;var e=i.currentData;Or(Lr(fo,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,o,s){return i.setClassNames(t),i.setHeight(n),Lr(si.Provider,{value:i.customContentRenderId},Lr(co,r({isHeightAuto:o,forPrint:s},e)))})),i.el)}else i.isRendered&&(i.isRendered=!1,Or(null,i.el),i.setClassNames([]),i.setHeight(""));Fr()},i.el=t,i.renderRunner=new ji(i.handleRenderRequest),new Hi({optionOverrides:n,calendarApi:i,onAction:i.handleAction,onData:i.handleData}),i}return n(t,e),Object.defineProperty(t.prototype,"view",{get:function(){return this.currentData.viewApi},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.isRendering;e?this.customContentRenderId++:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()},t.prototype.destroy=function(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())},t.prototype.updateSize=function(){e.prototype.updateSize.call(this),Fr()},t.prototype.batchRendering=function(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")},t.prototype.pauseRendering=function(){this.renderRunner.pause("pauseRendering")},t.prototype.resumeRendering=function(){this.renderRunner.resume("pauseRendering",!0)},t.prototype.resetOptions=function(e,t){this.currentDataManager.resetOptions(e,t)},t.prototype.setClassNames=function(e){if(!it(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n<r.length;n++){var i=r[n];t.remove(i)}for(var o=0,s=e;o<s.length;o++)i=s[o],t.add(i);this.currentClassNames=e}},t.prototype.setHeight=function(e){q(this.el,"height",e)},t}(jn);no.touchMouseIgnoreWait=500;var os=0,ss=0,as=!1,ls=function(){function e(e){var t=this;this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(e){if(!t.shouldIgnoreMouse()&&function(e){return 0===e.button&&!e.ctrlKey}(e)&&t.tryStart(e)){var n=t.createEventFromMouse(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n),t.shouldIgnoreMove||document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp)}},this.handleMouseMove=function(e){var n=t.createEventFromMouse(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleMouseUp=function(e){document.removeEventListener("mousemove",t.handleMouseMove),document.removeEventListener("mouseup",t.handleMouseUp),t.emitter.trigger("pointerup",t.createEventFromMouse(e)),t.cleanup()},this.handleTouchStart=function(e){if(t.tryStart(e)){t.isTouchDragging=!0;var n=t.createEventFromTouch(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n);var r=e.target;t.shouldIgnoreMove||r.addEventListener("touchmove",t.handleTouchMove),r.addEventListener("touchend",t.handleTouchEnd),r.addEventListener("touchcancel",t.handleTouchEnd),window.addEventListener("scroll",t.handleTouchScroll,!0)}},this.handleTouchMove=function(e){var n=t.createEventFromTouch(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleTouchEnd=function(e){if(t.isDragging){var n=e.target;n.removeEventListener("touchmove",t.handleTouchMove),n.removeEventListener("touchend",t.handleTouchEnd),n.removeEventListener("touchcancel",t.handleTouchEnd),window.removeEventListener("scroll",t.handleTouchScroll,!0),t.emitter.trigger("pointerup",t.createEventFromTouch(e)),t.cleanup(),t.isTouchDragging=!1,os++,setTimeout((function(){os--}),no.touchMouseIgnoreWait)}},this.handleTouchScroll=function(){t.wasTouchScroll=!0},this.handleScroll=function(e){if(!t.shouldIgnoreMove){var n=window.pageXOffset-t.prevScrollX+t.prevPageX,r=window.pageYOffset-t.prevScrollY+t.prevPageY;t.emitter.trigger("pointermove",{origEvent:e,isTouch:t.isTouchDragging,subjectEl:t.subjectEl,pageX:n,pageY:r,deltaX:n-t.origPageX,deltaY:r-t.origPageY})}},this.containerEl=e,this.emitter=new Tr,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),ss++||window.addEventListener("touchmove",us,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),--ss||window.removeEventListener("touchmove",us,{passive:!1})},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!V(n,this.handleSelector)||(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,0))},e.prototype.cleanup=function(){as=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?V(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return os||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(as=!0)},e.prototype.initScrollWatch=function(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))},e.prototype.recordCoords=function(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},e.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},e.prototype.createEventFromMouse=function(e,t){var n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}},e.prototype.createEventFromTouch=function(e,t){var n,r,i=e.touches,o=0,s=0;return i&&i.length?(n=i[0].pageX,r=i[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(o=n-this.origPageX,s=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:o,deltaY:s}},e}();function us(e){as&&e.preventDefault()}var cs=function(){function e(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return e.prototype.start=function(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},e.prototype.handleMove=function(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()},e.prototype.setIsVisible=function(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)},e.prototype.stop=function(e,t){var n=this,r=function(){n.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)},e.prototype.doRevertAnimation=function(e,t){var n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",z(n,{left:r.left,top:r.top}),Z(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(Y(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&z(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},e.prototype.getMirrorEl=function(){var e=this.sourceElRect,t=this.mirrorEl;return t||((t=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),t.classList.add("fc-event-dragging"),z(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t},e}(),ds=function(e){function t(t,n){var r=e.call(this)||this;return r.handleScroll=function(){r.scrollTop=r.scrollController.getScrollTop(),r.scrollLeft=r.scrollController.getScrollLeft(),r.handleScrollChange()},r.scrollController=t,r.doesListening=n,r.scrollTop=r.origScrollTop=t.getScrollTop(),r.scrollLeft=r.origScrollLeft=t.getScrollLeft(),r.scrollWidth=t.getScrollWidth(),r.scrollHeight=t.getScrollHeight(),r.clientWidth=t.getClientWidth(),r.clientHeight=t.getClientHeight(),r.clientRect=r.computeClientRect(),r.doesListening&&r.getEventTarget().addEventListener("scroll",r.handleScroll),r}return n(t,e),t.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollTop=function(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())},t.prototype.setScrollLeft=function(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())},t.prototype.getClientWidth=function(){return this.clientWidth},t.prototype.getClientHeight=function(){return this.clientHeight},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.handleScrollChange=function(){},t}(Dr),hs=function(e){function t(t,n){return e.call(this,new Cr(t),n)||this}return n(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return wr(this.scrollController.el)},t}(ds),ps=function(e){function t(t){return e.call(this,new Mr,t)||this}return n(t,e),t.prototype.getEventTarget=function(){return window},t.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},t.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},t}(ds),fs="function"==typeof performance?performance.now:Date.now,ms=function(){function e(){var e=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(e.isAnimating){var t=e.computeBestEdge(e.pointerScreenX+window.pageXOffset,e.pointerScreenY+window.pageYOffset);if(t){var n=fs();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t){this.isEnabled&&(this.scrollCaches=this.buildCaches(),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))},e.prototype.handleMove=function(e,t){if(this.isEnabled){var n=e-window.pageXOffset,r=t-window.pageYOffset,i=null===this.pointerScreenY?0:r-this.pointerScreenY,o=null===this.pointerScreenX?0:n-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(fs()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e<t.length;e++)t[e].destroy();this.scrollCaches=null}},e.prototype.requestAnimation=function(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)},e.prototype.handleSide=function(e,t){var n=e.scrollCache,r=this.edgeThreshold,i=r-e.distance,o=i*i/(r*r)*this.maxVelocity*t,s=1;switch(e.name){case"left":s=-1;case"right":n.setScrollLeft(n.getScrollLeft()+o*s);break;case"top":s=-1;case"bottom":n.setScrollTop(n.getScrollTop()+o*s)}},e.prototype.computeBestEdge=function(e,t){for(var n=this.edgeThreshold,r=null,i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i],a=s.clientRect,l=e-a.left,u=a.right-e,c=t-a.top,d=a.bottom-t;l>=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&s.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:s,name:"top",distance:c}),d<=n&&this.everMovedDown&&s.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:s,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&s.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:s,name:"left",distance:l}),u<=n&&this.everMovedRight&&s.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:s,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map((function(e){return e===window?new ps(!1):new hs(e,!1)}))},e.prototype.queryScrollEls=function(){for(var e=[],t=0,n=this.scrollQuery;t<n.length;t++){var r=n[t];"object"==typeof r?e.push(r):e.push.apply(e,Array.prototype.slice.call(document.querySelectorAll(r)))}return e},e}(),gs=function(e){function t(t,n){var r=e.call(this,t)||this;r.delay=null,r.minDistance=0,r.touchScrollAllowed=!0,r.mirrorNeedsRevert=!1,r.isInteracting=!1,r.isDragging=!1,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,r.delayTimeoutId=null,r.onPointerDown=function(e){r.isDragging||(r.isInteracting=!0,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,te(document.body),re(document.body),e.isTouch||e.origEvent.preventDefault(),r.emitter.trigger("pointerdown",e),r.isInteracting&&!r.pointer.shouldIgnoreMove&&(r.mirror.setIsVisible(!1),r.mirror.start(e.subjectEl,e.pageX,e.pageY),r.startDelay(e),r.minDistance||r.handleDistanceSurpassed(e)))},r.onPointerMove=function(e){if(r.isInteracting){if(r.emitter.trigger("pointermove",e),!r.isDistanceSurpassed){var t=r.minDistance,n=e.deltaX,i=e.deltaY;n*n+i*i>=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,ne(document.body),ie(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var i=r.pointer=new ls(t);return i.emitter.on("pointerdown",r.onPointerDown),i.emitter.on("pointermove",r.onPointerMove),i.emitter.on("pointerup",r.onPointerUp),n&&(i.selector=n),r.mirror=new cs,r.autoScroller=new ms,r}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(to),vs=function(){function e(e){this.origRect=xr(e),this.scrollCaches=kr(e).map((function(e){return new hs(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e<t.length;e++)t[e].destroy()},e.prototype.computeLeft=function(){for(var e=this.origRect.left,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollLeft-r.getScrollLeft()}return e},e.prototype.computeTop=function(){for(var e=this.origRect.top,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollTop-r.getScrollTop()}return e},e.prototype.isWithinClipping=function(e,t){for(var n,r={left:e,top:t},i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i];if(void 0,"HTML"!==(n=s.getEventTarget().tagName)&&"BODY"!==n&&!rr(r,s.clientRect))return!1}return!0},e}(),ys=function(){function e(e,t){var n=this;this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=function(e){var t=n.dragging;n.initialHit=null,n.movingHit=null,n.finalHit=null,n.prepareHits(),n.processFirstCoord(e),n.initialHit||!n.requireInitial?(t.setIgnoreMove(!1),n.emitter.trigger("pointerdown",e)):t.setIgnoreMove(!0)},this.handleDragStart=function(e){n.emitter.trigger("dragstart",e),n.handleMove(e,!0)},this.handleDragMove=function(e){n.emitter.trigger("dragmove",e),n.handleMove(e)},this.handlePointerUp=function(e){n.releaseHits(),n.emitter.trigger("pointerup",e)},this.handleDragEnd=function(e){n.movingHit&&n.emitter.trigger("hitupdate",null,!0,e),n.finalHit=n.movingHit,n.movingHit=null,n.emitter.trigger("dragend",e)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Tr}return e.prototype.processFirstCoord=function(e){var t,n={left:e.pageX,top:e.pageY},r=n,i=e.subjectEl;i!==document&&(r=or(r,t=xr(i)));var o=this.initialHit=this.queryHitForOffset(r.left,r.top);if(o){if(this.useSubjectCenter&&t){var s=ir(t,o.rect);s&&(r=sr(s))}this.coordAdjust=ar(r,n)}else this.coordAdjust={left:0,top:0}},e.prototype.handleMove=function(e,t){var n=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);!t&&_s(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))},e.prototype.prepareHits=function(){this.offsetTrackers=Re(this.droppableStore,(function(e){return e.component.prepareHits(),new vs(e.el)}))},e.prototype.releaseHits=function(){var e=this.offsetTrackers;for(var t in e)e[t].destroy();this.offsetTrackers={}},e.prototype.queryHitForOffset=function(e,t){var n=this.droppableStore,r=this.offsetTrackers,i=null;for(var o in n){var s=n[o].component,a=r[o];if(a&&a.isWithinClipping(e,t)){var l=a.computeLeft(),u=a.computeTop(),c=e-l,d=t-u,h=a.origRect,p=h.right-h.left,f=h.bottom-h.top;if(c>=0&&c<p&&d>=0&&d<f){var m=s.queryHit(c,d,p,f),g=s.context.getCurrentData().dateProfile;m&&on(g.activeRange,m.dateSpan.range)&&(!i||m.layer>i.layer)&&(m.rect.left+=l,m.rect.right+=l,m.rect.top+=u,m.rect.bottom+=u,i=m)}}}return i},e}();function _s(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&Sn(e.dateSpan,t.dateSpan)}function bs(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.datePointTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,{date:(i=t.dateEnv).toDate(n.range.start),dateStr:i.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay})),o}var ws=function(e){function t(t){var n=e.call(this,t)||this;n.handlePointerDown=function(e){var t=n.dragging,r=e.origEvent.target;t.setIgnoreMove(!n.component.isValidDateDownEl(r))},n.handleDragEnd=function(e){var t=n.component;if(!n.dragging.pointer.wasTouchScroll){var i=n.hitDragging,o=i.initialHit,s=i.finalHit;if(o&&s&&_s(o,s)){var a=t.context,l=r(r({},bs(o.dateSpan,a)),{dayEl:o.dayEl,jsEvent:e.origEvent,view:a.viewApi||a.calendarApi.view});a.emitter.trigger("dateClick",l)}}},n.dragging=new gs(t.el),n.dragging.autoScroller.isEnabled=!1;var i=n.hitDragging=new ys(n.dragging,Qi(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),xs=function(e){function t(t){var n=e.call(this,t)||this;n.dragSelection=null,n.handlePointerDown=function(e){var t=n,r=t.component,i=t.dragging,o=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);i.setIgnoreMove(!o),i.delay=e.isTouch?function(e){var t=e.context.options,n=t.selectLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null},n.handleDragStart=function(e){n.component.context.calendarApi.unselect(e)},n.handleHitUpdate=function(e,t){var i=n.component.context,o=null,s=!1;e&&((o=function(e,t,n){var i=e.dateSpan,o=t.dateSpan,s=[i.range.start,i.range.end,o.range.start,o.range.end];s.sort(ce);for(var a={},l=0,u=n;l<u.length;l++){var c=(0,u[l])(e,t);if(!1===c)return null;c&&r(a,c)}return a.range={start:s[0],end:s[3]},a.allDay=i.allDay,a}(n.hitDragging.initialHit,e,i.pluginHooks.dateSelectionTransformers))&&n.component.isDateSelectionValid(o)||(s=!0,o=null)),o?i.dispatch({type:"SELECT_DATES",selection:o}):t||i.dispatch({type:"UNSELECT_DATES"}),s?Q():ee(),t||(n.dragSelection=o)},n.handlePointerUp=function(e){n.dragSelection&&(Dn(n.dragSelection,e,n.component.context),n.dragSelection=null)};var i=t.component.context.options,o=n.dragging=new gs(t.el);o.touchScrollAllowed=!1,o.minDistance=i.selectMinDistance||0,o.autoScroller.isEnabled=i.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),ks=function(e){function t(n){var i=e.call(this,n)||this;i.subjectEl=null,i.subjectSeg=null,i.isDragging=!1,i.eventRange=null,i.relevantEvents=null,i.receivingContext=null,i.validMutation=null,i.mutatedRelevantEvents=null,i.handlePointerDown=function(e){var t=e.origEvent.target,n=i,r=n.component,o=n.dragging,s=o.mirror,a=r.context.options,l=r.context;i.subjectEl=e.subjectEl;var u=i.subjectSeg=cn(e.subjectEl),c=(i.eventRange=u.eventRange).instance.instanceId;i.relevantEvents=Ot(l.getCurrentData().eventStore,c),o.minDistance=e.isTouch?0:a.eventDragMinDistance,o.delay=e.isTouch&&c!==r.props.eventSelection?function(e){var t=e.context.options,n=t.eventLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null,s.parentNode=V(t,".fc"),s.revertDuration=a.dragRevertDuration;var d=r.isValidSegDownEl(t)&&!V(t,".fc-event-resizer");o.setIgnoreMove(!d),i.isDragging=d&&e.subjectEl.classList.contains("fc-event-draggable")},i.handleDragStart=function(e){var t=i.component.context,n=i.eventRange,r=n.instance.instanceId;e.isTouch?r!==i.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:r}):t.dispatch({type:"UNSELECT_EVENT"}),i.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:i.subjectEl,event:new Yn(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},i.handleHitUpdate=function(e,t){if(i.isDragging){var n=i.relevantEvents,r=i.hitDragging.initialHit,o=i.component.context,s=null,a=null,l=null,u=!1,c={affectedEvents:n,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){var d=e.component,h=(s=d.context).options;o===s||h.editable&&h.droppable?(a=function(e,t,n){var r=e.dateSpan,i=t.dateSpan,o=r.range.start,s=i.range.start,a={};r.allDay!==i.allDay&&(a.allDay=i.allDay,a.hasEnd=t.component.context.options.allDayMaintainDuration,i.allDay&&(o=xe(o)));var l=Jt(o,s,e.component.context.dateEnv,e.component===t.component?e.component.largeUnit:null);l.milliseconds&&(a.allDay=!1);for(var u={datesDelta:l,standardProps:a},c=0,d=n;c<d.length;c++)(0,d[c])(u,e,t);return u}(r,e,s.getCurrentData().pluginHooks.eventDragMutationMassagers))&&(l=An(n,s.getCurrentData().eventUiBases,a,s),c.mutatedEvents=l,d.isInteractionValid(c)||(u=!0,a=null,l=null,c.mutatedEvents={defs:{},instances:{}})):s=null}i.displayDrag(s,c),u?Q():ee(),t||(o===s&&_s(r,e)&&(a=null),i.dragging.setMirrorNeedsRevert(!a),i.dragging.setMirrorIsVisible(!e||!document.querySelector(".fc-event-mirror")),i.receivingContext=s,i.validMutation=a,i.mutatedRelevantEvents=l)}},i.handlePointerUp=function(){i.isDragging||i.cleanup()},i.handleDragEnd=function(e){if(i.isDragging){var t=i.component.context,n=t.viewApi,o=i,s=o.receivingContext,a=o.validMutation,l=i.eventRange.def,u=i.eventRange.instance,c=new Yn(t,l,u),d=i.relevantEvents,h=i.mutatedRelevantEvents,p=i.hitDragging.finalHit;if(i.clearDrag(),t.emitter.trigger("eventDragStop",{el:i.subjectEl,event:c,jsEvent:e.origEvent,view:n}),a){if(s===t){var f=new Yn(t,h.defs[l.defId],u?h.instances[u.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:h});for(var m={oldEvent:c,event:f,relatedEvents:Hn(h,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}},g={},v=0,y=t.getCurrentData().pluginHooks.eventDropTransformers;v<y.length;v++){var _=y[v];r(g,_(a,t))}t.emitter.trigger("eventDrop",r(r(r({},m),g),{el:e.subjectEl,delta:a.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",m)}else if(s){var b={event:c,relatedEvents:Hn(d,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}};t.emitter.trigger("eventLeave",r(r({},b),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:d}),t.emitter.trigger("eventRemove",b);var w=h.defs[l.defId],x=h.instances[u.instanceId],k=new Yn(s,w,x);s.dispatch({type:"MERGE_EVENTS",eventStore:h});var S={event:k,relatedEvents:Hn(h,s,x),revert:function(){s.dispatch({type:"REMOVE_EVENTS",eventStore:h})}};s.emitter.trigger("eventAdd",S),e.isTouch&&s.dispatch({type:"SELECT_EVENT",eventInstanceId:u.instanceId}),s.emitter.trigger("drop",r(r({},bs(p.dateSpan,s)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:p.component.context.viewApi})),s.emitter.trigger("eventReceive",r(r({},S),{draggedEl:e.subjectEl,view:p.component.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}i.cleanup()};var o=i.component.context.options,s=i.dragging=new gs(n.el);s.pointer.selector=t.SELECTOR,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=o.dragScroll;var a=i.hitDragging=new ys(i.dragging,eo);return a.useSubjectCenter=n.useEventCenter,a.emitter.on("pointerdown",i.handlePointerDown),a.emitter.on("dragstart",i.handleDragStart),a.emitter.on("hitupdate",i.handleHitUpdate),a.emitter.on("pointerup",i.handlePointerUp),a.emitter.on("dragend",i.handleDragEnd),i}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.displayDrag=function(e,t){var n=this.component.context,r=this.receivingContext;r&&r!==e&&(r===n?r.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:{defs:{},instances:{}},isEvent:!0}}):r.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},t.prototype.clearDrag=function(){var e=this.component.context,t=this.receivingContext;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})},t.prototype.cleanup=function(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null},t.SELECTOR=".fc-event-draggable, .fc-event-resizable",t}(Ji),Ss=function(e){function t(t){var n=e.call(this,t)||this;n.draggingSegEl=null,n.draggingSeg=null,n.eventRange=null,n.relevantEvents=null,n.validMutation=null,n.mutatedRelevantEvents=null,n.handlePointerDown=function(e){var t=n.component,r=cn(n.querySegEl(e)),i=n.eventRange=r.eventRange;n.dragging.minDistance=t.context.options.eventDragMinDistance,n.dragging.setIgnoreMove(!n.component.isValidSegDownEl(e.origEvent.target)||e.isTouch&&n.component.props.eventSelection!==i.instance.instanceId)},n.handleDragStart=function(e){var t=n.component.context,r=n.eventRange;n.relevantEvents=Ot(t.getCurrentData().eventStore,n.eventRange.instance.instanceId);var i=n.querySegEl(e);n.draggingSegEl=i,n.draggingSeg=cn(i),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:i,event:new Yn(t,r.def,r.instance),jsEvent:e.origEvent,view:t.viewApi})},n.handleHitUpdate=function(e,t,i){var o=n.component.context,s=n.relevantEvents,a=n.hitDragging.initialHit,l=n.eventRange.instance,u=null,c=null,d=!1,h={affectedEvents:s,mutatedEvents:{defs:{},instances:{}},isEvent:!0};e&&(u=function(e,t,n,i,o){for(var s=e.component.context.dateEnv,a=Jt(e.dateSpan.range.start,t.dateSpan.range.start,s,e.component.largeUnit),l={},u=0,c=o;u<c.length;u++){var d=(0,c[u])(e,t);if(!1===d)return null;d&&r(l,d)}if(n){if(s.add(i.start,a)<i.end)return l.startDelta=a,l}else if(s.add(i.end,a)>i.start)return l.endDelta=a,l;return null}(a,e,i.subjectEl.classList.contains("fc-event-resizer-start"),l.range,o.pluginHooks.eventResizeJoinTransforms)),u&&(c=An(s,o.getCurrentData().eventUiBases,u,o),h.mutatedEvents=c,n.component.isInteractionValid(h)||(d=!0,u=null,c=null,h.mutatedEvents=null)),c?o.dispatch({type:"SET_EVENT_RESIZE",state:h}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),d?Q():ee(),t||(u&&_s(a,e)&&(u=null),n.validMutation=u,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,i=n.eventRange.def,o=n.eventRange.instance,s=new Yn(t,i,o),a=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:s,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new Yn(t,l.defs[i.defId],o?l.instances[o.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:s,event:u,relatedEvents:Hn(l,t,o),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",r(r({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||$e(0),endDelta:n.validMutation.endDelta||$e(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var i=t.component,o=n.dragging=new gs(t.el);o.pointer.selector=".fc-event-resizer",o.touchScrollAllowed=!1,o.autoScroller.isEnabled=i.context.options.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return V(e.subjectEl,".fc-event")},t}(Ji),Ts=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=e.origEvent.target;t.matchesCancel=!!V(r,n),t.matchesEvent=!!V(r,ks.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,i=n.getCurrentData();if(!r.wasTouchScroll){if(i.dateSelection&&!t.isRecentPointerDateSelect){var o=n.options.unselectAuto;!o||o&&t.matchesCancel||n.calendarApi.unselect(e)}i.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new ls(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),Es={dateClick:At,eventDragStart:At,eventDragStop:At,eventDrop:At,eventResizeStart:At,eventResizeStop:At,eventResize:At,drop:At,eventReceive:At,eventLeave:At},Ds=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,i){var o=n.hitDragging.dragging,s=null,a=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(s=e.component.context,n.canDropElOnCalendar(i.subjectEl,s)&&(a=function(e,t,n){for(var i=r({},t.leftoverProps),o=0,s=n.pluginHooks.externalDefTransforms;o<s.length;o++){var a=s[o];r(i,a(e,t))}var l=Wt(i,n),u=Gt(l.refined,l.extra,t.sourceId,e.allDay,n.options.forceEventDuration||Boolean(t.duration),n),c=e.range.start;e.allDay&&t.startTime&&(c=n.dateEnv.add(c,t.startTime));var d=t.duration?n.dateEnv.add(c,t.duration):Mn(e.allDay,c,n);return{def:u,instance:Ie(u.defId,{start:c,end:d})}}(e.dateSpan,n.dragMeta,s),u.mutatedEvents=Lt(a),(l=!Gr(u,s))&&(u.mutatedEvents={defs:{},instances:{}},a=null))),n.displayDrag(s,u),o.setMirrorIsVisible(t||!a||!document.querySelector(".fc-event-mirror")),l?Q():ee(),t||(o.setMirrorNeedsRevert(!a),n.receivingContext=s,n.droppableEvent=a)},this.handleDragEnd=function(e){var t=n,i=t.receivingContext,o=t.droppableEvent;if(n.clearDrag(),i&&o){var s=n.hitDragging.finalHit,a=s.component.context.viewApi,l=n.dragMeta;if(i.emitter.trigger("drop",r(r({},bs(s.dateSpan,i)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:a})),l.create){var u=Lt(o);i.dispatch({type:"MERGE_EVENTS",eventStore:u}),e.isTouch&&i.dispatch({type:"SELECT_EVENT",eventInstanceId:o.instance.instanceId}),i.emitter.trigger("eventReceive",{event:new Yn(i,o.def,o.instance),relatedEvents:[],revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:u})},draggedEl:e.subjectEl,view:a})}}n.receivingContext=null,n.droppableEvent=null};var i=this.hitDragging=new ys(e,eo);i.requireInitial=!1,i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}return e.prototype.buildDragMeta=function(e){return"object"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta(e)):io((t=function(e,t){var n=no.dataAttrPrefix,r=(n?n+"-":"")+"event";return e.getAttribute("data-"+r)||""}(e))?JSON.parse(t):{create:!1});var t},e.prototype.displayDrag=function(e,t){var n=this.receivingContext;n&&n!==e&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},e.prototype.clearDrag=function(){this.receivingContext&&this.receivingContext.dispatch({type:"UNSET_EVENT_DRAG"})},e.prototype.canDropElOnCalendar=function(e,t){var n=t.options.dropAccept;return"function"==typeof n?n.call(t.calendarApi,e):"string"!=typeof n||!n||Boolean(H(e,n))},e}();no.dataAttrPrefix="";var Cs=function(){function e(e,t){var n=this;void 0===t&&(t={}),this.handlePointerDown=function(e){var t=n.dragging,r=n.settings,i=r.minDistance,o=r.longPressDelay;t.minDistance=null!=i?i:e.isTouch?0:xt.eventDragMinDistance,t.delay=e.isTouch?null!=o?o:xt.longPressDelay:0},this.handleDragStart=function(e){e.isTouch&&n.dragging.delay&&e.subjectEl.classList.contains("fc-event")&&n.dragging.mirror.getMirrorEl().classList.add("fc-event-selected")},this.settings=t;var r=this.dragging=new gs(e);r.touchScrollAllowed=!1,null!=t.itemSelector&&(r.pointer.selector=t.itemSelector),null!=t.appendTo&&(r.mirror.parentNode=t.appendTo),r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),new Ds(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Ms=function(e){function t(t){var n=e.call(this,t)||this;n.shouldIgnoreMove=!1,n.mirrorSelector="",n.currentMirrorEl=null,n.handlePointerDown=function(e){n.emitter.trigger("pointerdown",e),n.shouldIgnoreMove||n.emitter.trigger("dragstart",e)},n.handlePointerMove=function(e){n.shouldIgnoreMove||n.emitter.trigger("dragmove",e)},n.handlePointerUp=function(e){n.emitter.trigger("pointerup",e),n.shouldIgnoreMove||n.emitter.trigger("dragend",e)};var r=n.pointer=new ls(t);return r.emitter.on("pointerdown",n.handlePointerDown),r.emitter.on("pointermove",n.handlePointerMove),r.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy()},t.prototype.setIgnoreMove=function(e){this.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){if(e)this.currentMirrorEl&&(this.currentMirrorEl.style.visibility="",this.currentMirrorEl=null);else{var t=this.mirrorSelector?document.querySelector(this.mirrorSelector):null;t&&(this.currentMirrorEl=t,t.style.visibility="hidden")}},t}(to),As=function(){function e(e,t){var n=document;e===document||e instanceof Element?(n=e,t=t||{}):t=e||{};var r=this.dragging=new Ms(n);"string"==typeof t.itemSelector?r.pointer.selector=t.itemSelector:n===document&&(r.pointer.selector="[data-event]"),"string"==typeof t.mirrorSelector&&(r.mirrorSelector=t.mirrorSelector),new Ds(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Is=ni({componentInteractions:[ws,xs,ks,Ss],calendarInteractions:[Ts],elementDraggingImpl:gs,listenerRefiners:Es}),Ls=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=Nr(),t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,i=[],o=Bo(r.options);return e&&i.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),Lr(pi,{viewSpec:r.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(zo,{liquid:!n.isHeightAuto&&!n.forPrint,cols:[],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r){var i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");var o=this.props,s=this.context,a=!o.forPrint&&Bo(s.options),l=!o.forPrint&&Uo(s.options),u=[];return e&&u.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),u.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&u.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Ho}]}),Lr(pi,{viewSpec:s.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(i,{liquid:!o.isHeightAuto&&!o.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:u}))}))},t}(ti);function Os(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.row].push(s)}return n}function Ns(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.firstCol].push(s)}return n}function Rs(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.row].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}var Ps=bt({week:"narrow"}),Fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.props;if(n.onMoreClick){var r=n.segsByEachCol,i=r.filter((function(e){return n.segIsHidden[e.eventRange.instance.instanceId]}));n.onMoreClick({date:n.date,allSegs:r,hiddenSegs:i,moreCnt:n.moreCnt,dayEl:t.rootEl,ev:e})}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.viewApi,o=this.props,s=o.date,a=o.dateProfile,l={num:o.moreCnt,text:o.buildMoreLinkText(o.moreCnt),view:i},u=n.navLinks?{"data-navlink":fr(s,"week"),tabIndex:0}:{};return Lr(Zo,{date:s,dateProfile:a,todayRange:o.todayRange,showDayNumber:o.showDayNumber,extraHookProps:o.extraHookProps,elRef:this.handleRootEl},(function(t,i,c,d){return Lr("td",r({ref:t,className:["fc-daygrid-day"].concat(i,o.extraClassNames||[]).join(" ")},c,o.extraDataAttrs),Lr("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:o.innerElRef},o.showWeekNumber&&Lr(ns,{date:s,defaultFormat:Ps},(function(e,t,n,i){return Lr("a",r({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},u),i)})),!d&&Lr(Vs,{date:s,dateProfile:a,showDayNumber:o.showDayNumber,forceDayTop:o.forceDayTop,todayRange:o.todayRange,extraHookProps:o.extraHookProps}),Lr("div",{className:"fc-daygrid-day-events",ref:o.fgContentElRef,style:{paddingBottom:o.fgPaddingBottom}},o.fgContent,Boolean(o.moreCnt)&&Lr("div",{className:"fc-daygrid-day-bottom",style:{marginTop:o.moreMarginTop}},Lr(oi,{hookProps:l,classNames:n.moreLinkClassNames,content:n.moreLinkContent,defaultContent:Ys,didMount:n.moreLinkDidMount,willUnmount:n.moreLinkWillUnmount},(function(t,n,r,i){return Lr("a",{onClick:e.handleMoreLinkClick,ref:t,className:["fc-daygrid-more-link"].concat(n).join(" ")},i)})))),Lr("div",{className:"fc-daygrid-day-bg"},o.bgContent)))}))},t}(ti);function js(e){return e.dayNumberText}function Ys(e){return e.text}var Vs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context.options.navLinks?{"data-navlink":fr(e.date),tabIndex:0}:{};return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:js},(function(n,i){return(i||e.forceDayTop)&&Lr("div",{className:"fc-daygrid-day-top",ref:n},Lr("a",r({className:"fc-daygrid-day-number"},t),i||Lr(Rr,null,"\xa0")))}))},t}(Br),Hs=bt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Bs(e){var t=e.eventRange.ui.display;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var Us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||Hs,i=yn(e.seg,n,t,!0,e.defaultDisplayEventEnd);return Lr(qo,{seg:e.seg,timeText:i,defaultContent:zs,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,i,o){return Lr("a",r({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(s=e.seg.eventRange.def.url)?{href:s}:{}),o);var s}))},t}(Br);function zs(e){return Lr(Rr,null,Lr("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title"},e.event.title||Lr(Rr,null,"\xa0")))}var qs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Lr(Wo,r({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Hs,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(Br);function Ws(e,t,n,i,o,s,a,l){for(var u=[],c=[],d={},h={},p={},f={},m={},g=0;g<a;g++)u.push([]),c.push(0);for(var v=0,y=t=pn(t,l);v<y.length;v++)E(S=y[v],o[S.eventRange.instance.instanceId+":"+S.firstCol]||0);!0===n||!0===i?function(e,t,n,r){Gs(e,t,n,!0,(function(e){return e.bottom<=r}))}(c,d,u,s):"number"==typeof n?function(e,t,n,r){Gs(e,t,n,!1,(function(e,t){return t<r}))}(c,d,u,n):"number"==typeof i&&function(e,t,n,r){Gs(e,t,n,!0,(function(e,t){return t<r}))}(c,d,u,i);for(var _=0;_<a;_++){for(var b=0,w=0,x=0,k=u[_];x<k.length;x++){var S,T=k[x];d[(S=T.seg).eventRange.instance.instanceId]||(h[S.eventRange.instance.instanceId]=T.top,S.firstCol===S.lastCol&&S.isStart&&S.isEnd?(p[S.eventRange.instance.instanceId]=T.top-b,w=0,b=T.bottom):w+=T.bottom-T.top)}w&&(c[_]?f[_]=w:m[_]=w)}function E(e,t){if(!D(e,t,0))for(var n=e.firstCol;n<=e.lastCol;n++)for(var r=0,i=u[n];r<i.length;r++)if(D(e,t,i[r].bottom))return}function D(e,t,n){if(function(e,t,n){for(var r=e.firstCol;r<=e.lastCol;r++)for(var i=0,o=u[r];i<o.length;i++){var s=o[i];if(n<s.bottom&&n+t>s.top)return!1}return!0}(e,t,n)){for(var r=e.firstCol;r<=e.lastCol;r++){for(var i=u[r],o=0;o<i.length&&n>=i[o].top;)o++;i.splice(o,0,{seg:e,top:n,bottom:n+t})}return!0}return!1}for(var C in o)o[C]||(d[C.split(":")[0]]=!0);return{segsByFirstCol:u.map($s),segsByEachCol:u.map((function(t,n){var i=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];t.push(i.seg)}return t}(t);return function(e,t,n){for(var i={start:t,end:me(t,1)},o=[],s=0,a=e;s<a.length;s++){var l=a[s],u=l.eventRange,c=u.range,d=tn(c,i);d&&o.push(r(r({},l),{firstCol:n,lastCol:n,eventRange:{def:u.def,ui:r(r({},u.ui),{durationEditable:!1}),instance:u.instance,range:d},isStart:l.isStart&&d.start.valueOf()===c.start.valueOf(),isEnd:l.isEnd&&d.end.valueOf()===c.end.valueOf()}))}return o}(i,e[n].date,n)})),segIsHidden:d,segTops:h,segMarginTops:p,moreCnts:c,moreTops:f,paddingBottoms:m}}function $s(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];o.seg.firstCol===t&&n.push(o.seg)}return n}function Gs(e,t,n,r,i){for(var o=e.length,s={},a=[],l=0;l<o;l++)a.push([]);for(l=0;l<o;l++)for(var u=0,c=0,d=n[l];c<d.length;c++){var h=d[c];i(h,u)?p(h):f(h,u,r),h.top!==h.bottom&&u++}function p(e){var t=e.seg,n=t.eventRange.instance.instanceId;if(!s[n]){s[n]=!0;for(var r=t.firstCol;r<=t.lastCol;r++)a[r].push(e)}}function f(n,r,i){var o=n.seg,s=o.eventRange.instance.instanceId;if(!t[s]){t[s]=!0;for(var l=o.firstCol;l<=o.lastCol;l++){var u=++e[l];if(i&&1===u)for(var c=r-1;a[l].length>c;)f(a[l].pop(),a[l].length,!1)}}}}var Ks=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Ao,t.frameElRefs=new Ao,t.fgElRefs=new Ao,t.segHarnessRefs=new Ao,t.rootElRef=Nr(),t.state={framePositions:null,maxContentHeight:null,segHeights:{}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context,i=t.cells.length,o=Ns(t.businessHourSegs,i),s=Ns(t.bgEventSegs,i),a=Ns(this.getHighlightSegs(),i),l=Ns(this.getMirrorSegs(),i),u=Ws(t.cells,t.fgEventSegs,t.dayMaxEvents,t.dayMaxEventRows,n.segHeights,n.maxContentHeight,i,r.options.eventOrder),c=u.paddingBottoms,d=u.segsByFirstCol,h=u.segsByEachCol,p=u.segIsHidden,f=u.segTops,m=u.segMarginTops,g=u.moreCnts,v=u.moreTops,y=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var i=e.renderFgSegs(d[r],p,f,m,y,t.todayRange),u=e.renderFgSegs(l[r],{},f,{},{},t.todayRange,Boolean(t.eventDrag),Boolean(t.eventResize),!1);return Lr(Fs,{key:n.key,elRef:e.cellElRefs.createRef(n.key),innerElRef:e.frameElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&0===r,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,moreCnt:g[r],buildMoreLinkText:t.buildMoreLinkText,onMoreClick:t.onMoreClick,segIsHidden:p,moreMarginTop:v[r],segsByEachCol:h[r],fgPaddingBottom:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:Lr(Rr,null,Lr(Rr,null,i),Lr(Rr,null,u)),bgContent:Lr(Rr,null,e.renderFillSegs(a[r],"highlight"),e.renderFillSegs(o[r],"non-business"),e.renderFillSegs(s[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!je(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,i,o,s,a,l,u){var c=this.context,d=this.props.eventSelection,h=this.state.framePositions,p=1===this.props.cells.length,f=[];if(h)for(var m=0,g=e;m<g.length;m++){var v=g[m],y=v.eventRange.instance.instanceId,_=a||l||u,b=o[y],w=t[y]||b,x=t[y]||_||v.firstCol!==v.lastCol||!v.isStart||!v.isEnd,k=void 0,S=void 0,T=void 0,E=void 0;x?(S=n[y],c.isRtl?(E=0,T=h.lefts[v.lastCol]-h.lefts[v.firstCol]):(T=0,E=h.rights[v.firstCol]-h.rights[v.lastCol])):k=i[y],f.push(Lr("div",{className:"fc-daygrid-event-harness"+(x?" fc-daygrid-event-harness-abs":""),key:y,ref:_?null:this.segHarnessRefs.createRef(y+":"+v.firstCol),style:{visibility:w?"hidden":"",marginTop:k||"",top:S||"",left:T||"",right:E||""}},Bs(v)?Lr(Us,r({seg:v,isDragging:a,isSelected:y===d,defaultDisplayEventEnd:p},_n(v,s))):Lr(qs,r({seg:v,isDragging:a,isResizing:l,isDateSelecting:u,isSelected:y===d,defaultDisplayEventEnd:p},_n(v,s)))))}return f},t.prototype.renderFillSegs=function(e,t){var n=this.context.isRtl,o=this.props.todayRange,s=this.state.framePositions,a=[];if(s)for(var l=0,u=e;l<u.length;l++){var c=u[l],d=n?{right:0,left:s.lefts[c.lastCol]-s.lefts[c.firstCol]}:{left:0,right:s.rights[c.firstCol]-s.rights[c.lastCol]};a.push(Lr("div",{key:wn(c.eventRange),className:"fc-daygrid-bg-harness",style:d},"bg-event"===t?Lr(es,r({seg:c},_n(c,o))):Qo(t)))}return Lr.apply(void 0,i([Rr,{}],a))},t.prototype.updateSizing=function(e){var t=this.props,n=this.frameElRefs;if(null!==t.clientWidth){if(e){var r=t.cells.map((function(e){return n.currentMap[e.key]}));if(r.length){var i=this.rootElRef.current;this.setState({framePositions:new Er(i,r,!0,!1)})}}var o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({segHeights:this.computeSegHeights(),maxContentHeight:o?this.computeMaxContentHeight():null})}},t.prototype.computeSegHeights=function(){return Re(this.segHarnessRefs.currentMap,(function(e){return e.getBoundingClientRect().height}))},t.prototype.computeMaxContentHeight=function(){var e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top},t.prototype.getCellEls=function(){var e=this.cellElRefs.currentMap;return this.props.cells.map((function(t){return e[t.key]}))},t}(ti);Ks.addStateEquality({segHeights:je});var Zs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.repositioner=new ji(t.updateSize.bind(t)),t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(t.props.elRef,e)},t.handleDocumentMousedown=function(e){var n=t.props.onClose;n&&!t.rootEl.contains(e.target)&&n()},t.handleDocumentScroll=function(){t.repositioner.request(10)},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return n(t,e),t.prototype.render=function(){var e=this.context.theme,t=this.props,n=["fc-popover",e.getClass("popover")].concat(t.extraClassNames||[]);return Lr("div",r({className:n.join(" ")},t.extraAttrs,{ref:this.handleRootEl}),Lr("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},Lr("span",{className:"fc-popover-title"},t.title),Lr("span",{className:"fc-popover-close "+e.getIconClass("close"),onClick:this.handleCloseClick})),Lr("div",{className:"fc-popover-body "+e.getClass("popoverContent")},t.children))},t.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleDocumentMousedown),document.addEventListener("scroll",this.handleDocumentScroll),this.updateSize()},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleDocumentMousedown),document.removeEventListener("scroll",this.handleDocumentScroll)},t.prototype.updateSize=function(){var e=this.props,t=e.alignmentEl,n=e.topAlignmentEl,r=this.rootEl;if(r){var i,o=r.getBoundingClientRect(),s=t.getBoundingClientRect(),a=n?n.getBoundingClientRect().top:s.top;a=Math.min(a,window.innerHeight-o.height-10),a=Math.max(a,10),i=this.context.isRtl?s.right-o.width:s.left,i=Math.min(i,window.innerWidth-o.width-10),z(r,{top:a,left:i=Math.max(i,10)})}},t}(Br),Xs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handlePopoverEl=function(e){t.popoverEl=e,e?t.context.registerInteractiveComponent(t,{el:e,useEventCenter:!1}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.options,n=e.dateEnv,i=this.props,o=i.date,s=i.hiddenInstances,a=i.todayRange,l=i.dateProfile,u=i.selectedInstanceId,c=n.format(o,t.dayPopoverFormat);return Lr(Zo,{date:o,dateProfile:l,todayRange:a,elRef:this.handlePopoverEl},(function(e,t,n){return Lr(Zs,{elRef:e,title:c,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,onClose:i.onCloseClick,alignmentEl:i.alignmentEl,topAlignmentEl:i.topAlignmentEl},Lr(Xo,{date:o,dateProfile:l,todayRange:a},(function(e,t){return t&&Lr("div",{className:"fc-more-popover-misc",ref:e},t)})),i.segs.map((function(e){var t=e.eventRange.instance.instanceId;return Lr("div",{className:"fc-daygrid-event-harness",key:t,style:{visibility:s[t]?"hidden":""}},Bs(e)?Lr(Us,r({seg:e,isDragging:!1,isSelected:t===u,defaultDisplayEventEnd:!1},_n(e,a))):Lr(qs,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:t===u,defaultDisplayEventEnd:!1},_n(e,a))))})))}))},t.prototype.queryHit=function(e,t,n,r){var i=this.props.date;if(e<n&&t<r)return{component:this,dateSpan:{allDay:!0,range:{start:i,end:me(i,1)}},dayEl:this.popoverEl,rect:{left:0,top:0,right:n,bottom:r},layer:1}},t.prototype.isPopover=function(){return!0},t}(ti),Js=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=ot(Os),t.splitBgEventSegs=ot(Os),t.splitFgEventSegs=ot(Os),t.splitDateSelectionSegs=ot(Os),t.splitEventDrag=ot(Rs),t.splitEventResize=ot(Rs),t.buildBuildMoreLinkText=ot(Qs),t.rowRefs=new Ao,t.state={morePopoverState:null},t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.context,i=n.dateEnv,o=n.options.moreLinkClick;function s(e){var t=e.eventRange,r=t.def,o=t.instance,s=t.range;return{event:new Yn(n,r,o),start:i.toDate(s.start),end:i.toDate(s.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof o&&(o=o({date:i.toDate(e.date),allDay:!0,allSegs:e.allSegs.map(s),hiddenSegs:e.hiddenSegs.map(s),jsEvent:e.ev,view:n.viewApi})),o&&"popover"!==o?"string"==typeof o&&n.calendarApi.zoomTo(e.date,o):t.setState({morePopoverState:r(r({},e),{currentFgEventSegs:t.props.fgEventSegs})})},t.handleMorePopoverClose=function(){t.setState({morePopoverState:null})},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.dateProfile,r=t.dayMaxEventRows,i=t.dayMaxEvents,o=t.expandRows,s=this.state.morePopoverState,a=t.cells.length,l=this.splitBusinessHourSegs(t.businessHourSegs,a),u=this.splitBgEventSegs(t.bgEventSegs,a),c=this.splitFgEventSegs(t.fgEventSegs,a),d=this.splitDateSelectionSegs(t.dateSelectionSegs,a),h=this.splitEventDrag(t.eventDrag,a),p=this.splitEventResize(t.eventResize,a),f=this.buildBuildMoreLinkText(this.context.options.moreLinkText),m=!0===i||!0===r;return m&&!o&&(m=!1,r=null,i=null),Lr("div",{className:["fc-daygrid-body",m?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",o?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},Lr(bo,{unit:"day"},(function(m,g){return Lr(Rr,null,Lr("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:o?t.clientHeight:""}},t.colGroupNode,Lr("tbody",null,t.cells.map((function(o,s){return Lr(Ks,{ref:e.rowRefs.createRef(s),key:o.length?o[0].date.toISOString():s,showDayNumbers:a>1,showWeekNumbers:t.showWeekNumbers,todayRange:g,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:l[s],eventSelection:t.eventSelection,bgEventSegs:u[s].filter(ea),fgEventSegs:c[s],dateSelectionSegs:d[s],eventDrag:h[s],eventResize:p[s],dayMaxEvents:i,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,buildMoreLinkText:f,onMoreClick:e.handleMoreLinkClick})})))),!t.forPrint&&s&&s.currentFgEventSegs===t.fgEventSegs&&Lr(Xs,{date:s.date,dateProfile:n,segs:s.allSegs,alignmentEl:s.dayEl,topAlignmentEl:1===a?t.headerAlignElRef.current:null,onCloseClick:e.handleMorePopoverClose,selectedInstanceId:t.eventSelection,hiddenInstances:(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{},todayRange:g}))})))},t.prototype.prepareHits=function(){this.rowPositions=new Er(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Er(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,i=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=i)return{row:o,col:i,dateSpan:{range:this.getCellRange(o,i),allDay:!0},dayEl:this.getCellEl(o,i),relativeRect:{left:n.lefts[i],right:n.rights[i],top:r.tops[o],bottom:r.bottoms[o]}}},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:me(n,1)}},t}(ti);function Qs(e){return"function"==typeof e?e:function(t){return"+"+t+" "+e}}function ea(e){return e.eventRange.def.allDay}var ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new na,t.tableRef=Nr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr(Js,r({ref:this.tableRef,elRef:this.handleRootEl},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t.prototype.prepareHits=function(){this.tableRef.current.prepareHits()},t.prototype.queryHit=function(e,t){var n=this.tableRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ti),na=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return n(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(Eo),ra=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=ot(ia),t.headerRef=Nr(),t.tableRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,i=this.props,o=this.buildDayTableModel(i.dateProfile,r),s=n.dayHeaders&&Lr(xo,{ref:this.headerRef,dateProfile:i.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),a=function(t){return Lr(ta,{ref:e.tableRef,dateProfile:i.dateProfile,dayTableModel:o,businessHours:i.businessHours,dateSelection:i.dateSelection,eventStore:i.eventStore,eventUiBases:i.eventUiBases,eventSelection:i.eventSelection,eventDrag:i.eventDrag,eventResize:i.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!i.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(s,a,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(s,a)},t}(Ls);function ia(e,t){var n=new So(e.renderRange,t);return new To(n,/year|month|week/.test(e.currentRangeUnit))}var oa=ni({initialView:"dayGridMonth",optionRefiners:{moreLinkClick:At,moreLinkClassNames:At,moreLinkContent:At,moreLinkDidMount:At,moreLinkWillUnmount:At},views:{dayGrid:{component:ra,dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.buildRenderRange=function(t,n,r){var i,o=this.props.dateEnv,s=e.prototype.buildRenderRange.call(this,t,n,r),a=s.start,l=s.end;return/^(year|month)$/.test(n)&&(a=o.startOfWeek(a),(i=o.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=fe(i,1))),this.props.monthMode&&this.props.fixedWeekCount&&(l=fe(l,6-Math.ceil(ve(a,l)))),{start:a,end:l}},t}(yi)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?ln(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(cr),aa=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slatMetas=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(sn(t.currentRange,e)){var n=xe(e),r=e.valueOf()-n.valueOf();if(r>=Je(t.slotMinTime)&&r<Je(t.slotMaxTime))return this.computeTimeTop($e(r))}},e.prototype.computeDateTop=function(e,t){return t||(t=xe(e)),this.computeTimeTop($e(e.valueOf()-t.valueOf()))},e.prototype.computeTimeTop=function(e){var t,n,r=this.positions,i=this.dateProfile,o=this.slatMetas,s=r.els.length,a=o[1].date.valueOf()-o[0].date.valueOf(),l=(e.milliseconds-Je(i.slotMinTime))/a;return l=Math.max(0,l),l=Math.min(s,l),t=Math.floor(l),n=l-(t=Math.min(t,s-1)),r.tops[t]+r.getHeight(t)*n},e}(),la=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],ua=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.slatElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr("div",{className:"fc-timegrid-slots",ref:this.rootElRef},Lr("table",{className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,Lr(ca,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))},t.prototype.componentDidMount=function(){this.updateSizing()},t.prototype.componentDidUpdate=function(){this.updateSizing()},t.prototype.componentWillUnmount=function(){this.props.onCoords&&this.props.onCoords(null)},t.prototype.updateSizing=function(){var e,t=this.props;t.onCoords&&null!==t.clientWidth&&this.rootElRef.current.offsetHeight&&t.onCoords(new aa(new Er(this.rootElRef.current,(e=this.slatElRefs.currentMap,t.slatMetas.map((function(t){return e[t.key]}))),!1,!0),this.props.dateProfile,t.slatMetas))},t}(Br),ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,i=e.slatElRefs;return Lr("tbody",null,e.slatMetas.map((function(o,s){var a={time:o.time,date:t.dateEnv.toDate(o.date),view:t.viewApi},l=["fc-timegrid-slot","fc-timegrid-slot-lane",o.isLabeled?"":"fc-timegrid-slot-minor"];return Lr("tr",{key:o.key,ref:i.createRef(o.key)},e.axis&&Lr(ha,r({},o)),Lr(oi,{hookProps:a,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,t,n,r){return Lr("td",{ref:e,className:l.concat(t).join(" "),"data-time":o.isoTimeStr},r)})))})))},t}(Br),da=bt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function ha(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Lr(Yr.Consumer,null,(function(n){if(e.isLabeled){var r=n.dateEnv,i=n.options,o=n.viewApi,s=null==i.slotLabelFormat?da:Array.isArray(i.slotLabelFormat)?bt(i.slotLabelFormat[0]):bt(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:o,text:r.format(e.date,s)};return Lr(oi,{hookProps:a,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:pa,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,o){return Lr("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Lr("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Lr("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},o)))}))}return Lr("td",{className:t.join(" "),"data-time":e.isoTimeStr})}))}function pa(e){return e.text}function fa(e,t,n,r,i){for(var o=new Date(0),s=e,a=$e(0),l=n||function(e){var t,n,r;for(t=la.length-1;t>=0;t--)if(null!==(r=Qe(n=$e(la[t]),e))&&r>1)return n;return e}(r),u=[];Je(s)<Je(t);){var c=i.add(o,s),d=null!==Qe(a,l);u.push({date:c,time:s,key:c.toISOString(),isoTimeStr:nt(c),isLabeled:d}),s=Ke(s,r),a=Ke(a,r)}return u}var ma=bt({week:"short"}),ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new sa,t.headerElRef=Nr(),t.rootElRef=Nr(),t.scrollerElRef=Nr(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e){void 0===e&&(e="");var n=t.context.options,i=t.props.dateProfile.renderRange,o=ye(i.start,i.end),s=n.navLinks&&1===o?{"data-navlink":fr(i.start,"week"),tabIndex:0}:{};return n.weekNumbers?Lr(ns,{date:i.start,defaultFormat:ma},(function(t,n,i,o){return Lr("th",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:e}},Lr("a",r({ref:i,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},s),o)))})):Lr("th",{className:"fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-axis-frame",style:{height:e}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,i=n.viewApi,o={text:r.allDayText,view:i};return Lr(oi,{hookProps:o,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:va,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,i){return Lr("td",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Lr("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},i)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,i=this.props,o=[],s=Bo(r.options);return e&&o.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(o.push({type:"body",key:"all-day",chunk:{content:t}}),o.push({type:"body",key:"all-day-divider",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Lr(pi,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(zo,{liquid:!i.isHeightAuto&&!i.forPrint,cols:[{width:"shrink"}],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,i,o,s){var a=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Bo(u.options),h=!c.forPrint&&Uo(u.options),p=[];e&&p.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderHeadAxis(e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(p.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),p.push({key:"all-day-divider",type:"body",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var f=u.options.nowIndicator;return p.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return Lr("div",{className:"fc-timegrid-axis-chunk"},Lr("table",{style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Lr("tbody",null,Lr(ya,{slatMetas:o}))),Lr("div",{className:"fc-timegrid-now-indicator-container"},Lr(bo,{unit:f?"minute":"day"},(function(e){var t=f&&s&&s.safeComputeTop(e);return"number"==typeof t?Lr(Go,{isAxis:!0,date:e},(function(e,n,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},i)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),h&&p.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Ho},{key:"cols",content:Ho}]}),Lr(pi,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(l,{liquid:!c.isHeightAuto&&!c.forPrint,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:p}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=5),{dayMaxEvents:t,dayMaxEventRows:n}},t}(ti);function va(e){return e.text}var ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return Lr("tr",{key:e.key},Lr(ha,r({},e)))}))},t}(Br);function _a(e,t){var n,r=[];for(n=0;n<t;n++)r.push([]);if(e)for(n=0;n<e.length;n++)r[e[n].col].push(e[n]);return r}function ba(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.col].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}function wa(e,t,n,r){for(var i=0,o=e;i<o.length;i++){var s=o[i];s.top=n.computeDateTop(s.start,t),s.bottom=Math.max(s.top+(r||0),n.computeDateTop(s.end,t))}}function xa(e,t,n){void 0===n&&(n=[]);for(var r=0;r<t.length;r++)i=e,o=t[r],i.bottom>o.top&&i.top<o.bottom&&n.push(t[r]);var i,o;return n}function ka(e){var t,n,r=e.forwardSegs,i=0;if(null==e.forwardPressure){for(t=0;t<r.length;t++)ka(n=r[t]),i=Math.max(i,1+n.forwardPressure);e.forwardPressure=i}}function Sa(e,t,n,r){var i,o=e.forwardSegs;if(null==e.forwardCoord)for(o.length?(function(e,t){var n=e.map(Ta),r=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(t);n.sort((function(e,t){return se(e,t,r)})),n.map((function(e){return e._seg}))}(o,r),Sa(o[0],t+1,n,r),e.forwardCoord=o[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),i=0;i<o.length;i++)Sa(o[i],0,e.forwardCoord,r)}function Ta(e){var t=fn(e);return t.forwardPressure=e.forwardPressure,t.backwardCoord=e.backwardCoord,t}var Ea=bt({hour:"numeric",minute:"2-digit",meridiem:!1}),Da=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=["fc-timegrid-event","fc-v-event"];return this.props.isCondensed&&e.push("fc-timegrid-event-condensed"),Lr(Wo,r({},this.props,{defaultTimeFormat:Ea,extraClassNames:e}))},t}(Br);no.timeGridEventCondensedHeight=30;var Ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.selectMirror,i=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||n&&t.dateSelectionSegs||[],o=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr(Zo,{elRef:t.elRef,date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps},(function(s,a,l){return Lr("td",r({ref:s,className:["fc-timegrid-col"].concat(a,t.extraClassNames||[]).join(" ")},l,t.extraDataAttrs),Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(t.businessHourSegs,"non-business"),e.renderFillSegs(t.bgEventSegs,"bg-event"),e.renderFillSegs(t.dateSelectionSegs,"highlight")),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(t.fgEventSegs,o)),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(i,{},Boolean(t.eventDrag),Boolean(t.eventResize),Boolean(n))),Lr("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(t.nowIndicatorSegs)),Lr(Ma,{date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps})))}))},t.prototype.renderFgSegs=function(e,t,n,r,i){var o=this.props;return o.forPrint?this.renderPrintFgSegs(e):o.slatCoords?this.renderPositionedFgSegs(e,t,n,r,i):void 0},t.prototype.renderPrintFgSegs=function(e){var t=this.props;return(e=pn(e,this.context.options.eventOrder)).map((function(e){return Lr("div",{className:"fc-timegrid-event-harness",key:e.eventRange.instance.instanceId},Lr(Da,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isCondensed:!1},_n(e,t.todayRange,t.nowDate))))}))},t.prototype.renderPositionedFgSegs=function(e,t,n,i,o){var s=this,a=this.context,l=this.props;return(e=function(e,t,n,r,i){return wa(e,t,n,r),function(e,t){for(var n=0,r=e;n<r.length;n++)(c=r[n]).level=null,c.forwardCoord=null,c.backwardCoord=null,c.forwardPressure=null;var i,o=function(e){var t,n,r,i=[];for(t=0;t<e.length;t++){for(n=e[t],r=0;r<i.length&&xa(n,i[r]).length;r++);n.level=r,(i[r]||(i[r]=[])).push(n)}return i}(e=pn(e,t));if(function(e){var t,n,r,i,o;for(t=0;t<e.length;t++)for(n=e[t],r=0;r<n.length;r++)for((i=n[r]).forwardSegs=[],o=t+1;o<e.length;o++)xa(i,e[o],i.forwardSegs)}(o),i=o[0]){for(var s=0,a=i;s<a.length;s++)ka(c=a[s]);for(var l=0,u=i;l<u.length;l++){var c;Sa(c=u[l],0,0,t)}}return e}(e,i)}(e,l.date,l.slatCoords,a.options.eventMinHeight,a.options.eventOrder)).map((function(e){var a=e.eventRange.instance.instanceId,u=n||i||o?r({left:0,right:0},s.computeSegTopBottomCss(e)):s.computeFgSegPositionCss(e);return Lr("div",{className:"fc-timegrid-event-harness"+(e.level>0?" fc-timegrid-event-harness-inset":""),key:a,style:r({visibility:t[a]?"hidden":""},u)},Lr(Da,r({seg:e,isDragging:n,isResizing:i,isDateSelecting:o,isSelected:a===l.eventSelection,isCondensed:e.bottom-e.top<no.timeGridEventCondensedHeight},_n(e,l.todayRange,l.nowDate))))}))},t.prototype.renderFillSegs=function(e,t){var n=this,i=this.context,o=this.props;if(o.slatCoords){wa(e,o.date,o.slatCoords,i.options.eventMinHeight);var s=e.map((function(e){return Lr("div",{key:wn(e.eventRange),className:"fc-timegrid-bg-harness",style:n.computeSegTopBottomCss(e)},"bg-event"===t?Lr(es,r({seg:e},_n(e,o.todayRange,o.nowDate))):Qo(t))}));return Lr(Rr,null,s)}},t.prototype.renderNowIndicator=function(e){var t=this.props,n=t.slatCoords,r=t.date;if(n)return e.map((function(e,t){return Lr(Go,{isAxis:!1,date:r,key:t},(function(t,i,o,s){return Lr("div",{ref:t,className:["fc-timegrid-now-indicator-line"].concat(i).join(" "),style:{top:n.computeDateTop(e.start,r)}},s)}))}))},t.prototype.computeFgSegPositionCss=function(e){var t,n,i=this.context,o=i.isRtl,s=i.options.slotEventOverlap,a=e.backwardCoord,l=e.forwardCoord;s&&(l=Math.min(1,a+2*(l-a))),o?(t=1-l,n=a):(t=a,n=1-l);var u={zIndex:e.level+1,left:100*t+"%",right:100*n+"%"};return s&&e.forwardPressure&&(u[o?"marginLeft":"marginRight"]=20),r(r({},u),this.computeSegTopBottomCss(e))},t.prototype.computeSegTopBottomCss=function(e){return{top:e.top,bottom:-e.bottom}},t}(Br),Ma=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,t){return t&&Lr("div",{className:"fc-timegrid-col-misc",ref:e},t)}))},t}(Br),Aa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitFgEventSegs=ot(_a),t.splitBgEventSegs=ot(_a),t.splitBusinessHourSegs=ot(_a),t.splitNowIndicatorSegs=ot(_a),t.splitDateSelectionSegs=ot(_a),t.splitEventDrag=ot(ba),t.splitEventResize=ot(ba),t.rootElRef=Nr(),t.cellElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.nowIndicator&&t.slatCoords&&t.slatCoords.safeComputeTop(t.nowDate),r=t.cells.length,i=this.splitFgEventSegs(t.fgEventSegs,r),o=this.splitBgEventSegs(t.bgEventSegs,r),s=this.splitBusinessHourSegs(t.businessHourSegs,r),a=this.splitNowIndicatorSegs(t.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),u=this.splitEventDrag(t.eventDrag,r),c=this.splitEventResize(t.eventResize,r);return Lr("div",{className:"fc-timegrid-cols",ref:this.rootElRef},Lr("table",{style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,Lr("tbody",null,Lr("tr",null,t.axis&&Lr("td",{className:"fc-timegrid-col fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&Lr(Go,{isAxis:!0,date:t.nowDate},(function(e,t,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(t).join(" "),style:{top:n}},i)}))))),t.cells.map((function(n,r){return Lr(Ca,{key:n.key,elRef:e.cellElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,nowDate:t.nowDate,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,fgEventSegs:i[r],bgEventSegs:o[r],businessHourSegs:s[r],nowIndicatorSegs:a[r],dateSelectionSegs:l[r],eventDrag:u[r],eventResize:c[r],slatCoords:t.slatCoords,eventSelection:t.eventSelection,forPrint:t.forPrint})}))))))},t.prototype.componentDidMount=function(){this.updateCoords()},t.prototype.componentDidUpdate=function(){this.updateCoords()},t.prototype.updateCoords=function(){var e,t=this.props;t.onColCoords&&null!==t.clientWidth&&t.onColCoords(new Er(this.rootElRef.current,(e=this.cellElRefs.currentMap,t.cells.map((function(t){return e[t.key]}))),!0,!1))},t}(Br),Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processSlotOptions=ot(La),t.state={slatCoords:null},t.handleScrollRequest=function(e){var n=t.props.onScrollTopRequest,r=t.state.slatCoords;if(n&&r){if(e.time){var i=r.computeTimeTop(e.time);(i=Math.ceil(i))&&i++,n(i)}return!0}},t.handleColCoords=function(e){t.colCoords=e},t.handleSlatCoords=function(e){t.setState({slatCoords:e}),t.props.onSlatCoords&&t.props.onSlatCoords(e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return Lr("div",{className:"fc-timegrid-body",ref:e.rootElRef,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Lr(ua,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),Lr(Aa,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))},t.prototype.componentDidMount=function(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},t.prototype.componentDidUpdate=function(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)},t.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},t.prototype.positionToHit=function(e,t){var n=this.context,r=n.dateEnv,i=n.options,o=this.colCoords,s=this.props.dateProfile,a=this.state.slatCoords,l=this.processSlotOptions(this.props.slotDuration,i.snapDuration),u=l.snapDuration,c=l.snapsPerSlot,d=o.leftToIndex(e),h=a.positions.topToIndex(t);if(null!=d&&null!=h){var p=a.positions.tops[h],f=a.positions.getHeight(h),m=(t-p)/f,g=h*c+Math.floor(m*c),v=this.props.cells[d].date,y=Ke(s.slotMinTime,Ze(u,g)),_=r.add(v,y);return{col:d,dateSpan:{range:{start:_,end:r.add(_,u)},allDay:!1},dayEl:o.els[d],relativeRect:{left:o.lefts[d],right:o.rights[d],top:p,bottom:p+f}}}},t}(Br);function La(e,t){var n=t||e,r=Qe(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var Oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayRanges=ot(Na),t.slicer=new Ra,t.timeColsRef=Nr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,i=t.dateProfile,o=t.dayTableModel,s=n.options.nowIndicator,a=this.buildDayRanges(o,i,n.dateEnv);return Lr(bo,{unit:s?"minute":"day"},(function(l,u){return Lr(Ia,r({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.slicer.sliceProps(t,i,null,n,a),{forPrint:t.forPrint,axis:t.axis,dateProfile:i,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:o.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:l,nowIndicatorSegs:s&&e.slicer.sliceNowDate(l,n,a),todayRange:u,onScrollTopRequest:t.onScrollTopRequest,onSlatCoords:t.onSlatCoords}))}))},t.prototype.queryHit=function(e,t){var n=this.timeColsRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ti);function Na(e,t,n){for(var r=[],i=0,o=e.headerDates;i<o.length;i++){var s=o[i];r.push({start:n.add(s,t.slotMinTime),end:n.add(s,t.slotMaxTime)})}return r}var Ra=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.sliceRange=function(e,t){for(var n=[],r=0;r<t.length;r++){var i=tn(e,t[r]);i&&n.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return n},t}(Eo),Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildTimeColsModel=ot(Fa),t.buildSlatMetas=ot(fa),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.dateEnv,o=t.dateProfileGenerator,s=this.props,a=s.dateProfile,l=this.buildTimeColsModel(a,o),u=this.allDaySplitter.splitProps(s),c=this.buildSlatMetas(a.slotMinTime,a.slotMaxTime,n.slotLabelInterval,n.slotDuration,i),d=n.dayMinWidth,h=!d,p=d,f=n.dayHeaders&&Lr(xo,{dates:l.headerDates,dateProfile:a,datesRepDistinctDays:!0,renderIntro:h?this.renderHeadAxis:null}),m=!1!==n.allDaySlot&&function(t){return Lr(ta,r({},u.allDay,{dateProfile:a,dayTableModel:l,nextDayThreshold:n.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:h?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:s.forPrint},e.getAllDayMaxEventProps()))},g=function(t){return Lr(Oa,r({},u.timed,{dayTableModel:l,dateProfile:a,axis:h,slotDuration:n.slotDuration,slatMetas:c,forPrint:s.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return p?this.renderHScrollLayout(f,m,g,l.colCnt,d,c,this.state.slatCoords):this.renderSimpleLayout(f,m,g)},t}(ga);function Fa(e,t){var n=new So(e.renderRange,t);return new To(n,!1)}var ja=ni({initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:Pa,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}}),Ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.dayDate,n=e.todayRange,i=this.context,o=i.theme,s=i.dateEnv,a=i.options,l=i.viewApi,u=hr(t,n),c=a.listDayFormat?s.format(t,a.listDayFormat):"",d=a.listDaySideFormat?s.format(t,a.listDaySideFormat):"",h=a.navLinks?fr(t):null,p=r({date:s.toDate(t),view:l,text:c,sideText:d,navLinkData:h},u),f=["fc-list-day"].concat(pr(u,o));return Lr(oi,{hookProps:p,classNames:a.dayHeaderClassNames,content:a.dayHeaderContent,defaultContent:Va,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},(function(e,n,r,i){return Lr("tr",{ref:e,className:f.concat(n).join(" "),"data-date":tt(t)},Lr("th",{colSpan:3},Lr("div",{className:"fc-list-day-cushion "+o.getClass("tableCellShaded"),ref:r},i)))}))},t}(Br);function Va(e){var t=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return Lr(Rr,null,e.text&&Lr("a",r({className:"fc-list-day-text"},t),e.text),e.sideText&&Lr("a",r({className:"fc-list-day-side-text"},t),e.sideText))}var Ha=bt({hour:"numeric",minute:"2-digit",meridiem:"short"}),Ba=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||Ha;return Lr(qo,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:Ua,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,i,o,s,a){return Lr("tr",{className:["fc-list-event",a.event.url?"fc-event-forced-url":""].concat(i).join(" "),ref:e},function(e,t,n){var r=n.options;if(!1!==r.displayEventTime){var i=e.eventRange.def,o=e.eventRange.instance,s=!1,a=void 0;if(i.allDay?s=!0:Xt(e.eventRange.range)?e.isStart?a=yn(e,t,n,null,null,o.range.start,e.end):e.isEnd?a=yn(e,t,n,null,null,e.start,o.range.end):s=!0:a=yn(e,t,n),s){var l={text:n.options.allDayText,view:n.viewApi};return Lr(oi,{hookProps:l,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:za,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return Lr("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return Lr("td",{className:"fc-list-event-time"},a)}return null}(n,r,t),Lr("td",{className:"fc-list-event-graphic"},Lr("span",{className:"fc-list-event-dot",style:{borderColor:a.borderColor||a.backgroundColor}})),Lr("td",{className:"fc-list-event-title",ref:o},s))}))},t}(Br);function Ua(e){var t=e.event,n=t.url;return Lr("a",r({},n?{href:n}:{}),t.title)}function za(e){return e.text}var qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=ot($a),t.eventStoreToSegs=ot(t._eventStoreToSegs),t.setRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=["fc-list",n.theme.getClass("table"),!1!==n.options.stickyHeaderDates?"fc-list-sticky":""],i=this.computeDateVars(t.dateProfile),o=i.dayDates,s=i.dayRanges,a=this.eventStoreToSegs(t.eventStore,t.eventUiBases,s);return Lr(pi,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,i){return Lr("div",{ref:n,className:r.concat(i).join(" ")},Lr(Mo,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},a.length>0?e.renderSegList(a,o):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Lr(oi,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:Wa,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Lr("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Lr("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,i=n.theme,o=n.options,s=function(e){var t,n,r=[];for(t=0;t<e.length;t++)(r[(n=e[t]).dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return Lr(bo,{unit:"day"},(function(e,n){for(var a=[],l=0;l<s.length;l++){var u=s[l];if(u){var c=t[l].toISOString();a.push(Lr(Ya,{key:c,dayDate:t[l],todayRange:n}));for(var d=0,h=u=pn(u,o.eventOrder);d<h.length;d++){var p=h[d];a.push(Lr(Ba,r({key:c+":"+p.eventRange.instance.instanceId,seg:p,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1},_n(p,n,e))))}}}return Lr("table",{className:"fc-list-table "+i.getClass("table")},Lr("tbody",null,a))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(an(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)},t.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.eventRangeToSegs(o,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,i,o=this.context.dateEnv,s=this.context.options.nextDayThreshold,a=e.range,l=e.def.allDay,u=[];for(n=0;n<t.length;n++)if((r=tn(a,t[n]))&&(i={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===a.end.valueOf(),dayIndex:n},u.push(i),!i.isEnd&&!l&&n+1<t.length&&a.end<o.add(t[n+1].start,s))){i.end=a.end,i.isEnd=!0;break}return u},t}(ti);function Wa(e){return e.text}function $a(e){for(var t=xe(e.renderRange.start),n=e.renderRange.end,r=[],i=[];t<n;)r.push(t),i.push({start:t,end:me(t,1)}),t=me(t,1);return{dayDates:r,dayRanges:i}}function Ga(e){return!1===e?null:bt(e)}var Ka=ni({optionRefiners:{listDayFormat:Ga,listDaySideFormat:Ga,noEventsClassNames:At,noEventsContent:At,noEventsDidMount:At,noEventsWillUnmount:At},views:{list:{component:qa,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}}),Za=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);Za.prototype.classes={root:"fc-theme-bootstrap",table:"table-bordered",tableCellShaded:"table-active",buttonGroup:"btn-group",button:"btn btn-primary",buttonActive:"active",popover:"popover",popoverHeader:"popover-header",popoverContent:"popover-body"},Za.prototype.baseIconClass="fa",Za.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},Za.prototype.rtlIconClasses={prev:"fa-chevron-right",next:"fa-chevron-left",prevYear:"fa-angle-double-right",nextYear:"fa-angle-double-left"},Za.prototype.iconOverrideOption="bootstrapFontAwesome",Za.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",Za.prototype.iconOverridePrefix="fa-";var Xa=ni({themeClasses:{bootstrap:Za}}),Ja=ni({eventSourceDefs:[{parseMeta:function(e){var t=e.googleCalendarId;return!t&&e.url&&(t=function(e){var t;return/^[^/]+@([^/.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^/]*)/.exec(e))?decodeURIComponent(t[1]):void 0}(e.url)),t?{googleCalendarId:t,googleCalendarApiKey:e.googleCalendarApiKey,googleCalendarApiBase:e.googleCalendarApiBase,extraParams:e.extraParams}:null},fetch:function(e,t,n){var i=e.context,o=i.dateEnv,s=i.options,a=e.eventSource.meta,l=a.googleCalendarApiKey||s.googleCalendarApiKey;if(l){var u=function(e){var t=e.googleCalendarApiBase;return t||(t="https://www.googleapis.com/calendar/v3/calendars"),t+"/"+encodeURIComponent(e.googleCalendarId)+"/events"}(a),c=a.extraParams,d="function"==typeof c?c():c,h=function(e,t,n,i){var o,s,a;return i.canComputeOffset?(s=i.formatIso(e.start),a=i.formatIso(e.end)):(s=me(e.start,-1).toISOString(),a=me(e.end,1).toISOString()),o=r(r({},n||{}),{key:t,timeMin:s,timeMax:a,singleEvents:!0,maxResults:9999}),"local"!==i.timeZone&&(o.timeZone=i.timeZone),o}(e.range,l,d,o);Li("GET",u,h,(function(e,r){var i,o;e.error?n({message:"Google Calendar API: "+e.error.message,errors:e.error.errors,xhr:r}):t({rawEvents:(i=e.items,o=h.timeZone,i.map((function(e){return function(e,t){var n=e.htmlLink||null;return n&&t&&(n=function(e,t){return e.replace(/(\?.*?)?(#|$)/,(function(e,n,r){return(n?n+"&":"?")+t+r}))}(n,"ctz="+t)),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:n,location:e.location,description:e.description}}(e,o)}))),xhr:r})}),(function(e,t){n({message:e,xhr:t})}))}else n({message:"Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"})}}],optionRefiners:{googleCalendarApiKey:String},eventSourceRefiners:{googleCalendarApiKey:String,googleCalendarId:String,googleCalendarApiBase:String,extraParams:At}});return Ri.push(Is,oa,ja,Ka,Xa,Ja),e.BASE_OPTION_DEFAULTS=xt,e.BASE_OPTION_REFINERS=wt,e.BaseComponent=Br,e.BgEvent=es,e.BootstrapTheme=Za,e.Calendar=is,e.CalendarApi=jn,e.CalendarContent=co,e.CalendarDataManager=Hi,e.CalendarDataProvider=Xi,e.CalendarRoot=fo,e.Component=Ir,e.ContentHook=ai,e.CustomContentRenderContext=si,e.DateComponent=ti,e.DateEnv=$n,e.DateProfileGenerator=yi,e.DayCellContent=Xo,e.DayCellRoot=Zo,e.DayGridView=ra,e.DayHeader=xo,e.DaySeriesModel=So,e.DayTable=ta,e.DayTableModel=To,e.DayTableSlicer=na,e.DayTimeCols=Oa,e.DayTimeColsSlicer=Ra,e.DayTimeColsView=Pa,e.DelayedRunner=ji,e.Draggable=Cs,e.ElementDragging=to,e.ElementScrollController=Cr,e.Emitter=Tr,e.EventApi=Yn,e.EventRoot=qo,e.EventSourceApi=j,e.FeaturefulElementDragging=gs,e.Fragment=Rr,e.Interaction=Ji,e.ListView=qa,e.MountHook=ui,e.NamedTimeZoneImpl=function(e){this.timeZoneName=e},e.NowIndicatorRoot=Go,e.NowTimer=bo,e.PointerDragging=ls,e.PositionCache=Er,e.RefMap=Ao,e.RenderHook=oi,e.ScrollController=Dr,e.ScrollResponder=jr,e.Scroller=Mo,e.SimpleScrollGrid=zo,e.Slicer=Eo,e.Splitter=cr,e.StandardEvent=Wo,e.Table=Js,e.TableDateCell=vo,e.TableDowCell=yo,e.TableView=Ls,e.Theme=Ar,e.ThirdPartyDraggable=As,e.TimeCols=Ia,e.TimeColsSlatsCoords=aa,e.TimeColsView=ga,e.ViewApi=On,e.ViewContextType=Yr,e.ViewRoot=pi,e.WeekNumberRoot=ns,e.WindowScrollController=Mr,e.addDays=me,e.addDurations=Ke,e.addMs=ge,e.addWeeks=fe,e.allowContextMenu=ie,e.allowSelection=ne,e.applyMutationToEventStore=An,e.applyStyle=z,e.applyStyleProp=q,e.asCleanDays=function(e){return e.years||e.months||e.milliseconds?0:e.days},e.asRoughMinutes=function(e){return Je(e)/6e4},e.asRoughMs=Je,e.asRoughSeconds=function(e){return Je(e)/1e3},e.buildClassNameNormalizer=ci,e.buildDayRanges=Na,e.buildDayTableModel=ia,e.buildEventApis=Hn,e.buildEventRangeKey=wn,e.buildHashFromArray=function(e,t){for(var n={},r=0;r<e.length;r++){var i=t(e[r],r);n[i[0]]=i[1]}return n},e.buildNavLinkData=fr,e.buildSegCompareObj=fn,e.buildSegTimeText=yn,e.buildSlatMetas=fa,e.buildTimeColsModel=Fa,e.collectFromHash=Be,e.combineEventUis=Yt,e.compareByFieldSpec=ae,e.compareByFieldSpecs=se,e.compareNumbers=ce,e.compareObjs=Ve,e.computeEdges=br,e.computeFallbackHeaderFormat=mo,e.computeHeightAndMargins=function(e){return e.getBoundingClientRect().height+function(e){var t=window.getComputedStyle(e);return parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(e)},e.computeInnerRect=wr,e.computeRect=xr,e.computeSegDraggable=mn,e.computeSegEndResizable=vn,e.computeSegStartResizable=gn,e.computeShrinkWidth=Io,e.computeSmallestCellWidth=he,e.computeVisibleDayRange=Zt,e.config=no,e.constrainPoint=or,e.createContext=Pr,e.createDuration=$e,e.createElement=Lr,e.createEmptyEventStore=function(){return{defs:{},instances:{}}},e.createEventInstance=Ie,e.createEventUi=jt,e.createFormatter=bt,e.createPlugin=ni,e.createRef=Nr,e.diffDates=Jt,e.diffDayAndTime=_e,e.diffDays=ye,e.diffPoints=ar,e.diffWeeks=ve,e.diffWholeDays=we,e.diffWholeWeeks=be,e.disableCursor=Q,e.elementClosest=V,e.elementMatches=H,e.enableCursor=ee,e.eventTupleToStore=Lt,e.filterEventStoreDefs=Rt,e.filterHash=Ne,e.findDirectChildren=function(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].children,s=0;s<o.length;s++){var a=o[s];t&&!H(a,t)||r.push(a)}return r},e.findElements=B,e.flexibleCompare=le,e.flushToDom=Fr,e.formatDate=function(e,t){void 0===t&&(t={});var n=Qn(t),r=bt(t),i=n.createMarkerMeta(e);return i?n.format(i.marker,r,{forcedTzo:i.forcedTzo}):""},e.formatDayString=tt,e.formatIsoTimeString=nt,e.formatRange=function(e,t,n){var r=Qn("object"==typeof n&&n?n:{}),i=bt(n),o=r.createMarkerMeta(e),s=r.createMarkerMeta(t);return o&&s?r.formatRange(o.marker,s.marker,i,{forcedStartTzo:o.forcedTzo,forcedEndTzo:s.forcedTzo,isEndExclusive:n.isEndExclusive,defaultSeparator:xt.defaultRangeSeparator}):""},e.getAllowYScrolling=Oo,e.getCanVGrowWithinCell=lr,e.getClippingParents=kr,e.getDateMeta=hr,e.getDayClassNames=pr,e.getDefaultEventEnd=Mn,e.getElSeg=cn,e.getEventClassNames=bn,e.getIsRtlScrollbarOnLeft=vr,e.getRectCenter=sr,e.getRelevantEvents=Ot,e.getScrollGridClassNames=Yo,e.getScrollbarWidths=yr,e.getSectionClassNames=Vo,e.getSectionHasLiquidHeight=Lo,e.getSegMeta=_n,e.getSlotClassNames=function(e,t){var n=["fc-slot","fc-slot-"+pe[e.dow]];return e.isDisabled?n.push("fc-slot-disabled"):(e.isToday&&(n.push("fc-slot-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-slot-past"),e.isFuture&&n.push("fc-slot-future")),n},e.getStickyFooterScrollbar=Uo,e.getStickyHeaderDates=Bo,e.getUnequalProps=Ye,e.globalLocales=Gn,e.globalPlugins=Ri,e.greatestDurationDenominator=et,e.guid=J,e.hasBgRendering=ln,e.hasShrinkWidth=jo,e.identity=At,e.interactionSettingsStore=eo,e.interactionSettingsToStore=Qi,e.intersectRanges=tn,e.intersectRects=ir,e.isArraysEqual=it,e.isColPropsEqual=Ro,e.isDateSpansEqual=Sn,e.isInt=de,e.isInteractionValid=Gr,e.isMultiDayRange=Xt,e.isPropsEqual=je,e.isPropsValid=Zr,e.isValidDate=Me,e.listenBySelector=G,e.mapHash=Re,e.memoize=ot,e.memoizeArraylike=function(e,t,n){var r=[],i=[];return function(o){for(var s=r.length,a=o.length,l=0;l<s;l++)if(o[l]){if(!it(r[l],o[l])){n&&n(i[l]);var u=e.apply(this,o[l]);t&&t(u,i[l])||(i[l]=u)}}else n&&n(i[l]);for(;l<a;l++)i[l]=e.apply(this,o[l]);return r=o,i.splice(a),i}},e.memoizeHashlike=function(e,t,n){var r={},i={};return function(o){var s={};for(var a in o)if(i[a])if(it(r[a],o[a]))s[a]=i[a];else{n&&n(i[a]);var l=e.apply(this,o[a]);s[a]=t&&t(l,i[a])?i[a]:l}else s[a]=e.apply(this,o[a]);return r=o,i=s,s}},e.memoizeObjArg=st,e.mergeEventStores=Nt,e.multiplyDuration=Ze,e.padStart=ue,e.parseBusinessHours=nr,e.parseClassNames=Pt,e.parseDragMeta=io,e.parseEventDef=Gt,e.parseFieldSpecs=oe,e.parseMarker=Wn,e.pointInsideRect=rr,e.preventContextMenu=re,e.preventDefault=W,e.preventSelection=te,e.rangeContainsMarker=sn,e.rangeContainsRange=on,e.rangesEqual=nn,e.rangesIntersect=rn,e.refineEventDef=Wt,e.refineProps=Mt,e.removeElement=Y,e.removeExact=function(e,t){for(var n=0,r=0;r<e.length;)e[r]===t?(e.splice(r,1),n++):r++;return n},e.render=Or,e.renderChunkContent=No,e.renderFill=Qo,e.renderMicroColGroup=Po,e.renderScrollShim=Ho,e.requestJson=Li,e.sanitizeShrinkWidth=Fo,e.setElSeg=un,e.setRef=qr,e.sliceEventStore=an,e.sliceEvents=function(e,t){return an(e.eventStore,e.eventUiBases,e.dateProfile.activeRange,t?e.nextDayThreshold:null).fg},e.sortEventSegs=pn,e.startOfDay=xe,e.translateRect=function(e,t,n){return{left:e.left+t,right:e.right+t,top:e.top+n,bottom:e.bottom+n}},e.triggerDateSelect=Dn,e.unpromisify=Sr,e.version="5.3.1",e.whenTransitionDone=Z,e.wholeDivideDurations=Qe,e}({});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).jsSHA=t()}(this,(function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,s,a=t||[0],l=(n=n||0)>>>3,u=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(s=i+l)>>>2,a.length<=o&&a.push(0),a[o]|=e[i]<<8*(u+r*(s%4));return{value:a,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,s,a;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var l=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(s=(a=(i>>>1)+u)>>>2;l.length<=s;)l.push(0);l[s]|=o<<8*(c+r*(a%4))}return{value:l,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,s,a,l,u,c,d,h,p=0,f=n||[0],m=(r=r||0)>>>3;if("UTF8"===t)for(d=-1===i?3:0,a=0;a<e.length;a+=1)for(s=[],128>(o=e.charCodeAt(a))?s.push(o):2048>o?(s.push(192|o>>>6),s.push(128|63&o)):55296>o||57344<=o?s.push(224|o>>>12,128|o>>>6&63,128|63&o):(a+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(a)),s.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),l=0;l<s.length;l+=1){for(u=(c=p+m)>>>2;f.length<=u;)f.push(0);f[u]|=s[l]<<8*(d+i*(c%4)),p+=1}else for(d=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,a=0;a<e.length;a+=1){for(o=e.charCodeAt(a),!0===h&&(o=(l=255&o)<<8|o>>>8),u=(c=p+m)>>>2;f.length<=u;)f.push(0);f[u]|=o<<8*(d+i*(c%4)),p+=2}return{value:f,binLen:8*p+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,s,a,l,u,c,d=0,h=n||[0],p=(r=r||0)>>>3,f=-1===i?3:0,m=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==m&&m<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(l=e.substr(o,4),a=0,s=0;s<l.length;s+=1)a|=t.indexOf(l.charAt(s))<<18-6*s;for(s=0;s<l.length-1;s+=1){for(u=(c=d+p)>>>2;h.length<=u;)h.push(0);h[u]|=(a>>>16-8*s&255)<<8*(f+i*(c%4)),d+=1}}return{value:h,binLen:8*d+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,s,a,l=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),s=(a=o+u)>>>2,l.length<=s&&l.push(0),l[s]|=i<<8*(c+r*(a%4));return{value:l,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,s="",a=t/8,l=-1===n?3:0;for(i=0;i<a;i+=1)o=e[i>>>2]>>>8*(l+n*(i%4)),s+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?s.toUpperCase():s}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,s,a,l,u,c="",d=n/8,h=-1===r?3:0;for(o=0;o<d;o+=3)for(l=o+1<d?e[o+1>>>2]:0,u=o+2<d?e[o+2>>>2]:0,a=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(l>>>8*(h+r*((o+1)%4))&255)<<8|u>>>8*(h+r*((o+2)%4))&255,s=0;s<4;s+=1)c+=8*o+6*s<=n?t.charAt(a>>>6*(3-s)&63):i.b64Pad;return c}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",s=t/8,a=-1===n?3:0;for(r=0;r<s;r+=1)i=e[r>>>2]>>>8*(a+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),s=new Uint8Array(o),a=-1===n?3:0;for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(a+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,s=new Uint8Array(i);for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return s}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],a=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function l(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function u(e,t){return e>>>t|e<<32-t}function c(e,t){return e>>>t}function d(e,t,n){return e&t^~e&n}function h(e,t,n){return e&t^e&n^t&n}function p(e){return u(e,2)^u(e,13)^u(e,22)}function f(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function m(e,t,n,r){var i=(65535&e)+(65535&t)+(65535&n)+(65535&r);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16))<<16|65535&i}function g(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function v(e){return u(e,7)^u(e,18)^c(e,3)}function y(e){return u(e,6)^u(e,11)^u(e,25)}function _(e){return"SHA-224"==e?s.slice():a.slice()}function b(e,t){var n,r,i,s,a,l,_,b,w,x,k,S,T=[];for(n=t[0],r=t[1],i=t[2],s=t[3],a=t[4],l=t[5],_=t[6],b=t[7],k=0;k<64;k+=1)T[k]=k<16?e[k]:m(u(S=T[k-2],17)^u(S,19)^c(S,10),T[k-7],v(T[k-15]),T[k-16]),w=g(b,y(a),d(a,l,_),o[k],T[k]),x=f(p(n),h(n,r,i)),b=_,_=l,l=a,a=f(s,w),s=i,i=r,r=n,n=f(w,x);return t[0]=f(n,t[0]),t[1]=f(r,t[1]),t[2]=f(i,t[2]),t[3]=f(s,t[3]),t[4]=f(a,t[4]),t[5]=f(l,t[5]),t[6]=f(_,t[6]),t[7]=f(b,t[7]),t}return function(t){function n(e,n,i){var o=this;if("SHA-224"!==e&&"SHA-256"!==e)throw new Error("Chosen SHA variant is not supported");var s=i||{};return(o=t.call(this,e,n,i)||this).t=o.i,o.o=!0,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=b,o.p=function(e){return e.slice()},o.l=_,o.R=function(t,n,r,i){return function(e,t,n,r,i){for(var o,s=15+(t+65>>>9<<4),a=t+n;e.length<=s;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[s]=4294967295&a,e[s-1]=a/4294967296|0,o=0;o<e.length;o+=16)r=b(e.slice(o,o+16),r);return"SHA-224"===i?[r[0],r[1],r[2],r[3],r[4],r[5],r[6]]:r}(t,n,r,i,e)},o.U=_(e),o.T=512,o.m="SHA-224"===e?224:256,o.F=!1,s.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,s.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.H=0,this.S=!1,this.I=0,this.C=!1,this.L=[],this.N=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.H),o=i.binLen,s=i.value,a=o>>>5;for(t=0;t<a;t+=r)n+this.T<=o&&(this.U=this.A(s.slice(t,t+r),this.U),n+=this.T);this.I+=n,this.Y=s.slice(n>>>5),this.H=o%this.T,this.S=!0},e.prototype.getHash=function(e,t){var n,r,o=this.m,s=l(t);if(this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");o=s.outputLen}var a=i(e,o,this.u,s);if(this.C&&this.t)return a(this.t(s));for(r=this.R(this.Y.slice(),this.H,this.I,this.p(this.U),o),n=1;n<this.numRounds;n+=1)this.F&&o%32!=0&&(r[r.length-1]&=16777215>>>24-o%32),r=this.R(r,o,0,this.l(this.g),o);return a(r)},e.prototype.setHMACKey=function(e,t,n){if(!this.o)throw new Error("Variant does not support HMAC");if(this.S)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(this.C)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.L[t]=909522486^e.value[t],this.N[t]=1549556828^e.value[t];this.U=this.A(this.L,this.U),this.I=this.T,this.C=!0},e.prototype.getHMAC=function(e,t){var n=l(t);return i(e,this.m,this.u,n)(this.i())},e.prototype.i=function(){var e;if(!this.C)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.H,this.I,this.p(this.U),this.m);return e=this.A(this.N,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())})),
518
+ var FullCalendar=function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};function n(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}var o,s,a,l,u,c,d,h={},p=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function m(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var r,i=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(i[r]);if(null!=n&&(o.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===o[r]&&(o[r]=e.defaultProps[r]);return y(e,o,t&&t.key,t&&t.ref,null)}function y(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(s.__v=s),o.vnode&&o.vnode(s),s}function _(e){return e.children}function b(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?w(e):null}function x(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return x(e)}}function k(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!a++||u!==o.debounceRendering)&&((u=o.debounceRendering)||l)(S)}function S(){for(var e;a=s.length;)e=s.sort((function(e,t){return e.__v.__b-t.__v.__b})),s=[],e.some((function(e){var t,n,r,i,o,s,a;e.__d&&(s=(o=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=m({},o)).__v=r,i=A(a,o,r,t.__n,void 0!==a.ownerSVGElement,null,n,null==s?w(o):s),I(n,o),i!=s&&x(o)))}))}function T(e,t,n,r,i,o,s,a,l){var u,c,d,f,m,v,y,_=n&&n.__k||p,b=_.length;if(a==h&&(a=null!=o?o[0]:b?w(n,0):null),u=0,t.__k=E(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=_[u])||d&&n.key==d.key&&n.type===d.type)_[u]=void 0;else for(c=0;c<b;c++){if((d=_[c])&&n.key==d.key&&n.type===d.type){_[c]=void 0;break}d=null}if(f=A(e,n,d=d||h,r,i,o,s,a,l),(c=n.ref)&&d.ref!=c&&(y||(y=[]),d.ref&&y.push(d.ref,null,n),y.push(c,n.__c||f,n)),null!=f){var p;if(null==v&&(v=f),void 0!==n.__d)p=n.__d,n.__d=void 0;else if(o==d||f!=a||null==f.parentNode){e:if(null==a||a.parentNode!==e)e.appendChild(f),p=null;else{for(m=a,c=0;(m=m.nextSibling)&&c<b;c+=2)if(m==f)break e;e.insertBefore(f,a),p=a}"option"==t.type&&(e.value="")}a=void 0!==p?p:f.nextSibling,"function"==typeof t.type&&(t.__d=a)}else a&&d.__e==a&&a.parentNode!=e&&(a=w(d))}return u++,n})),t.__e=v,null!=o&&"function"!=typeof t.type)for(u=o.length;u--;)null!=o[u]&&g(o[u]);for(u=b;u--;)null!=_[u]&&N(_[u],_[u]);if(y)for(u=0;u<y.length;u++)O(y[u],y[++u],y[++u])}function E(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)E(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?y(null,e,null,null,e):null!=e.__e||null!=e.__c?y(e.type,e.props,e.key,null,e.__v):e):e);return n}function D(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===f.test(t)?n+"px":null==n?"":n}function C(e,t,n,r,i){var o,s,a,l,u;if(i?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(o=e.style,"string"==typeof n)o.cssText=n;else{if("string"==typeof r&&(o.cssText="",r=null),r)for(l in r)n&&l in n||D(o,l,"");if(n)for(u in n)r&&n[u]===r[u]||D(o,u,n[u])}else"o"===t[0]&&"n"===t[1]?(s=t!==(t=t.replace(/Capture$/,"")),a=t.toLowerCase(),t=(a in e?a:t).slice(2),n?(r||e.addEventListener(t,M,s),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,M,s)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!i&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function M(e){this.l[e.type](o.event?o.event(e):e)}function A(e,t,n,r,i,s,a,l,u){var c,d,h,p,f,g,v,y,w,x,k=t.type;if(void 0!==t.constructor)return null;(c=o.__b)&&c(t);try{e:if("function"==typeof k){if(y=t.props,w=(c=k.contextType)&&r[c.__c],x=c?w?w.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(y,x):(t.__c=d=new b(y,x),d.constructor=k,d.render=R),w&&w.sub(d),d.props=y,d.state||(d.state={}),d.context=x,d.__n=r,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=m({},d.__s)),m(d.__s,k.getDerivedStateFromProps(y,d.__s))),p=d.props,f=d.state,h)null==k.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==k.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,x)||t.__v===n.__v&&!d.__){for(d.props=y,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,d.__h.length&&a.push(d),c=0;c<t.__k.length;c++)t.__k[c]&&(t.__k[c].__=t);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,g)}))}d.context=x,d.props=y,d.state=d.__s,(c=o.__r)&&c(t),d.__d=!1,d.__v=t,d.__P=e,c=d.render(d.props,d.state,d.context),t.__k=null!=c&&c.type==_&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=d.getChildContext&&(r=m(m({},r),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(p,f)),T(e,t,n,r,i,s,a,l,u),d.base=t.__e,d.__h.length&&a.push(d),v&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=L(n.__e,t,n,r,i,s,a,u);(c=o.diffed)&&c(t)}catch(e){t.__v=null,o.__e(e,t,n)}return t.__e}function I(e,t){o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function L(e,t,n,r,i,o,s,a){var l,u,c,d,f,m=n.props,g=t.props;if(i="svg"===t.type||i,null!=o)for(l=0;l<o.length;l++)if(null!=(u=o[l])&&((null===t.type?3===u.nodeType:u.localName===t.type)||e==u)){e=u,o[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,g.is&&{is:g.is}),o=null,a=!1}if(null===t.type)m!==g&&e.data!=g&&(e.data=g);else{if(null!=o&&(o=p.slice.call(e.childNodes)),c=(m=n.props||h).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!a){if(m===h)for(m={},f=0;f<e.attributes.length;f++)m[e.attributes[f].name]=e.attributes[f].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__html||""))}(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||C(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||C(e,o,t[o],n[o],r)})(e,g,m,i,a),d?t.__k=[]:(t.__k=t.props.children,T(e,t,n,r,"foreignObject"!==t.type&&i,o,s,h,a)),a||("value"in g&&void 0!==(l=g.value)&&l!==e.value&&C(e,"value",l,m.value,!1),"checked"in g&&void 0!==(l=g.checked)&&l!==e.checked&&C(e,"checked",l,m.checked,!1))}return e}function O(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){o.__e(e,n)}}function N(e,t,n){var r,i,s;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||O(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&N(r[s],t,n);null!=i&&g(i)}function R(e,t,n){return this.constructor(e,n)}function P(e,t,n){var r,i,s;o.__&&o.__(e,t),i=(r=n===c)?null:n&&n.__k||t.__k,e=v(_,null,[e]),s=[],A(t,(r?t:n||t).__k=e,i||h,h,void 0!==t.ownerSVGElement,n&&!r?[n]:i?null:p.slice.call(t.childNodes),s,n||h,r),I(s,e)}o={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return k(n.__E=n)}catch(t){e=t}throw e}},b.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),k(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},b.prototype.render=_,s=[],a=0,l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=h,d=0,("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:b,createElement:v,render:P,createRef:function(){return{}},Fragment:_,createContext:function(e){var t=function(e){var t={},n={__c:"__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,k(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}(e),n=t.Provider;return t.Provider=function(){var e=this,t=!this.getChildContext,r=n.apply(this,arguments);if(t){var i=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&i.some((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}}return r},t},flushToDom:function(){var e=o.debounceRendering,t=[];for(o.debounceRendering=function(e){t.push(e)},P(v(F,{}),document.createElement("div"));t.length;)t.shift()();o.debounceRendering=e}};var F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return v("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(b),j=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId]})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),e}();function Y(e){e.parentNode&&e.parentNode.removeChild(e)}function V(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(H(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function H(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function B(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].querySelectorAll(t),s=0;s<o.length;s++)r.push(o[s]);return r}var U=/(top|left|right|bottom|width|height)$/i;function z(e,t){for(var n in t)q(e,n,t[n])}function q(e,t,n){null==n?e.style[t]="":"number"==typeof n&&U.test(t)?e.style[t]=n+"px":e.style[t]=n}function W(e){e.preventDefault()}function $(e,t){return function(n){var r=V(n.target,e);r&&t.call(r,n,r)}}function G(e,t,n,r){var i=$(n,r);return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var K=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Z(e,t){var n=function(r){t(r),K.forEach((function(t){e.removeEventListener(t,n)}))};K.forEach((function(t){e.addEventListener(t,n)}))}var X=0;function J(){return String(X++)}function Q(){document.body.classList.add("fc-not-allowed")}function ee(){document.body.classList.remove("fc-not-allowed")}function te(e){e.classList.add("fc-unselectable"),e.addEventListener("selectstart",W)}function ne(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",W)}function re(e){e.addEventListener("contextmenu",W)}function ie(e){e.removeEventListener("contextmenu",W)}function oe(e){var t,n,r=[],i=[];for("string"==typeof e?i=e.split(/\s*,\s*/):"function"==typeof e?i=[e]:Array.isArray(e)&&(i=e),t=0;t<i.length;t++)"string"==typeof(n=i[t])?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function se(e,t,n){var r,i;for(r=0;r<n.length;r++)if(i=ae(e,t,n[r]))return i;return 0}function ae(e,t,n){return n.func?n.func(e,t):le(e[n.field],t[n.field])*(n.order||1)}function le(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}function ue(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function ce(e,t){return e-t}function de(e){return e%1==0}function he(e){var t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var pe=["sun","mon","tue","wed","thu","fri","sat"];function fe(e,t){var n=De(e);return n[2]+=7*t,Ce(n)}function me(e,t){var n=De(e);return n[2]+=t,Ce(n)}function ge(e,t){var n=De(e);return n[6]+=t,Ce(n)}function ve(e,t){return ye(e,t)/7}function ye(e,t){return(t.valueOf()-e.valueOf())/864e5}function _e(e,t){var n=xe(e),r=xe(t);return{years:0,months:0,days:Math.round(ye(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function be(e,t){var n=we(e,t);return null!==n&&n%7==0?n/7:null}function we(e,t){return Ae(e)===Ae(t)?Math.round(ye(e,t)):null}function xe(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function ke(e,t,n,r){var i=Ce([t,0,1+Se(t,n,r)]),o=xe(e),s=Math.round(ye(i,o));return Math.floor(s/7)+1}function Se(e,t,n){var r=7+t-n;return-(7+Ce([e,0,r]).getUTCDay()-t)%7+r-1}function Te(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Ee(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function De(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Ce(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function Me(e){return!isNaN(e.valueOf())}function Ae(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Ie(e,t,n,r){return{instanceId:J(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Le=Object.prototype.hasOwnProperty;function Oe(e,t){var n={};if(t)for(var r in t){for(var i=[],o=e.length-1;o>=0;o--){var s=e[o][r];if("object"==typeof s&&s)i.unshift(s);else if(void 0!==s){n[r]=s;break}}i.length&&(n[r]=Oe(i))}for(o=e.length-1;o>=0;o--){var a=e[o];for(var l in a)l in n||(n[l]=a[l])}return n}function Ne(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Re(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Pe(e){for(var t={},n=0,r=e;n<r.length;n++)t[r[n]]=!0;return t}function Fe(e){var t=[];for(var n in e)t.push(e[n]);return t}function je(e,t){if(e===t)return!0;for(var n in e)if(Le.call(e,n)&&!(n in t))return!1;for(var n in t)if(Le.call(t,n)&&e[n]!==t[n])return!1;return!0}function Ye(e,t){var n=[];for(var r in e)Le.call(e,r)&&(r in t||n.push(r));for(var r in t)Le.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function Ve(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!He(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function He(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Be(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var i=[];null==n&&(n=Object.keys(e).length);for(var o=t;o<n;o+=r){var s=e[o];void 0!==s&&i.push(s)}return i}function Ue(e,t,n){var r=n.dateEnv,i=n.pluginHooks,o=n.options,s=e.defs,a=e.instances;for(var l in a=Ne(a,(function(e){return!s[e.defId].recurringDef})),s){var u=s[l];if(u.recurringDef){var c=u.recurringDef.duration;c||(c=u.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration);for(var d=0,h=ze(u,c,t,r,i.recurringTypes);d<h.length;d++){var p=h[d],f=Ie(l,{start:p,end:r.add(p,c)});a[f.instanceId]=f}}}return{defs:s,instances:a}}function ze(e,t,n,r,i){var o=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(o=o.map(xe)),o}var qe=["years","months","days","milliseconds"],We=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function $e(e,t){var n;return"string"==typeof e?function(e){var t=We.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?Ge(e):"number"==typeof e?Ge(((n={})[t||"milliseconds"]=e,n)):null}function Ge(e){var t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function Ke(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function Ze(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function Xe(e){return Je(e)/864e5}function Je(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Qe(e,t){for(var n=null,r=0;r<qe.length;r++){var i=qe[r];if(t[i]){var o=e[i]/t[i];if(!de(o)||null!==n&&n!==o)return null;n=o}else if(e[i])return null}return n}function et(e){var t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function tt(e){return e.toISOString().replace(/T.*$/,"")}function nt(e){return ue(e.getUTCHours(),2)+":"+ue(e.getUTCMinutes(),2)+":"+ue(e.getUTCSeconds(),2)}function rt(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?n+ue(i,2)+":"+ue(o,2):"GMT"+n+i+(o?":"+ue(o,2):"")}function it(e,t,n){if(e===t)return!0;var r,i=e.length;if(i!==t.length)return!1;for(r=0;r<i;r++)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function ot(e,t,n){var r,i;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(r){if(!it(r,o)){n&&n(i);var a=e.apply(this,o);t&&t(a,i)||(i=a)}}else i=e.apply(this,o);return r=o,i}}function st(e,t,n){var r,i;return function(o){if(r){if(!je(r,o)){n&&n(i);var s=e.call(this,o);t&&t(s,i)||(i=s)}}else i=e.call(this,o);return r=o,i}}var at={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},lt={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},ut=/\s*([ap])\.?m\.?/i,ct=/,/g,dt=/\s+/g,ht=/\u200e/g,pt=/UTC|GMT/,ft=function(){function e(e){var t={},n={},r=0;for(var i in e)i in at?(n[i]=e[i],r=Math.max(at[i],r)):(t[i]=e[i],i in lt&&(r=Math.max(lt[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=ot(mt)}return e.prototype.format=function(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)},e.prototype.formatRange=function(e,t,n,r){var i=this.standardDateProps,o=this.extendedSettings,s=function(e,t,n){return n.getMarkerYear(e)!==n.getMarkerYear(t)?5:n.getMarkerMonth(e)!==n.getMarkerMonth(t)?4:n.getMarkerDay(e)!==n.getMarkerDay(t)?2:Ae(e)!==Ae(t)?1:0}(e.marker,t.marker,n.calendarSystem);if(!s)return this.format(e,n);var a=s;!(a>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(a=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=mt(function(e,t){var n={};for(var r in e)(!(r in lt)||lt[r]<=t)&&(n[r]=e[r]);return n}(i,a),o,n),d=c(e),h=c(t),p=function(e,t,n,r){for(var i=0;i<e.length;){var o=e.indexOf(t,i);if(-1===o)break;var s=e.substr(0,o);i=o+t.length;for(var a=e.substr(i),l=0;l<n.length;){var u=n.indexOf(r,l);if(-1===u)break;var c=n.substr(0,u);l=u+r.length;var d=n.substr(l);if(s===c&&a===d)return{before:s,after:a}}}return null}(l,d,u,h),f=o.separator||r||n.defaultSeparator||"";return p?p.before+d+f+h+p.after:l+f+u},e.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}},e}();function mt(e,t,n){var i=Object.keys(e).length;return 1===i&&"short"===e.timeZoneName?function(e){return rt(e.timeZoneOffset)}:0===i&&t.week?function(e){return function(e,t,n,r){var i=[];return"narrow"===r?i.push(t):"short"===r&&i.push(t," "),i.push(n.simpleNumberFormat.format(e)),"rtl"===n.options.direction&&i.reverse(),i.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.locale,t.week)}:function(e,t,n){e=r({},e),t=r({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";var i,o=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var s=r({},e);delete s.minute,i=new Intl.DateTimeFormat(n.locale.codes,s)}return function(r){var s=r.marker;return function(e,t,n,r,i){return e=e.replace(ht,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;return e=e.replace(pt,(function(){return n=!0,t})),n||(e+=" "+t),e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":rt(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(ct,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(ut,"").trim():"narrow"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(ut,(function(e){return e.toLocaleLowerCase()}))),(e=e.replace(dt," ")).trim()}((i&&!s.getUTCMinutes()?i:o).format(s),r,e,t,n)}}(e,t,n)}function gt(e,t){var n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function vt(e,t,n,r){var i=gt(e,n.calendarSystem);return{date:i,start:i,end:t?gt(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var yt=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,vt(e,t,n,r))},e}(),_t=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(vt(e,t,n,r))},e}();function bt(e){return"object"==typeof e&&e?new ft(e):"string"==typeof e?new yt(e):"function"==typeof e?new _t(e):void 0}var wt={navLinkDayClick:At,navLinkWeekClick:At,duration:$e,bootstrapFontAwesome:At,buttonIcons:At,customButtons:At,defaultAllDayEventDuration:$e,defaultTimedEventDuration:$e,nextDayThreshold:$e,scrollTime:$e,slotMinTime:$e,slotMaxTime:$e,dayPopoverFormat:bt,slotDuration:$e,snapDuration:$e,headerToolbar:At,footerToolbar:At,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:bt,dayHeaderClassNames:At,dayHeaderContent:At,dayHeaderDidMount:At,dayHeaderWillUnmount:At,dayCellClassNames:At,dayCellContent:At,dayCellDidMount:At,dayCellWillUnmount:At,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:At,weekNumbers:Boolean,weekNumberClassNames:At,weekNumberContent:At,weekNumberDidMount:At,weekNumberWillUnmount:At,editable:Boolean,viewClassNames:At,viewDidMount:At,viewWillUnmount:At,nowIndicator:Boolean,nowIndicatorClassNames:At,nowIndicatorContent:At,nowIndicatorDidMount:At,nowIndicatorWillUnmount:At,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:At,locale:At,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:At,eventOrder:oe,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:At,contentHeight:At,direction:String,weekNumberFormat:bt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,progressiveEventRendering:Boolean,businessHours:At,initialDate:At,now:At,eventDataTransform:At,stickyHeaderDates:At,stickyFooterScrollbar:At,viewHeight:At,defaultAllDay:Boolean,eventSourceFailure:At,eventSourceSuccess:At,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:At,eventConstraint:At,eventAllow:At,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:At,eventContent:At,eventDidMount:At,eventWillUnmount:At,selectConstraint:At,selectOverlap:At,selectAllow:At,droppable:Boolean,unselectCancel:String,slotLabelFormat:At,slotLaneClassNames:At,slotLaneContent:At,slotLaneDidMount:At,slotLaneWillUnmount:At,slotLabelClassNames:At,slotLabelContent:At,slotLabelDidMount:At,slotLabelWillUnmount:At,dayMaxEvents:At,dayMaxEventRows:At,dayMinWidth:Number,slotLabelInterval:$e,allDayText:String,allDayClassNames:At,allDayContent:At,allDayDidMount:At,allDayWillUnmount:At,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:bt,rerenderDelay:Number,moreLinkText:At,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMinHeight:Number,slotEventOverlap:Boolean,plugins:At,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:$e,hiddenDays:At,monthMode:Boolean,fixedWeekCount:Boolean,validRange:At,visibleRange:At,titleFormat:At,noEventsText:String},xt={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" \u2013 ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1},kt={datesSet:At,eventsSet:At,eventAdd:At,eventChange:At,eventRemove:At,windowResize:At,eventClick:At,eventMouseEnter:At,eventMouseLeave:At,select:At,unselect:At,loading:At,_unmount:At,_beforeprint:At,_afterprint:At,_noEventDrop:At,_noEventResize:At,_resize:At,_scrollRequest:At},St={buttonText:At,views:At,plugins:At,initialEvents:At,events:At,eventSources:At},Tt={headerToolbar:Et,footerToolbar:Et,buttonText:Et,buttonIcons:Et};function Et(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?je(e,t):e===t}var Dt={type:String,component:At,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:At,usesMinMaxTime:Boolean,classNames:At,content:At,didMount:At,willUnmount:At};function Ct(e){return Oe(e,Tt)}function Mt(e,t){var n={},r={};for(var i in t)i in e&&(n[i]=t[i](e[i]));for(var i in e)i in t||(r[i]=e[i]);return{refined:n,extra:r}}function At(e){return e}function It(e,t,n,r){for(var i={defs:{},instances:{}},o=$t(n),s=0,a=e;s<a.length;s++){var l=qt(a[s],t,n,r,o);l&&Lt(l,i)}return i}function Lt(e,t){return void 0===t&&(t={defs:{},instances:{}}),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function Ot(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],i=Rt(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return{defs:{},instances:{}}}function Nt(e,t){return{defs:r(r({},e.defs),t.defs),instances:r(r({},e.instances),t.instances)}}function Rt(e,t){var n=Ne(e.defs,t),r=Ne(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function Pt(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Ft={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:At,overlap:At,allow:At,className:Pt,classNames:Pt,color:String,backgroundColor:String,borderColor:String,textColor:String};function jt(e,t){var n=function(e,t){return Array.isArray(e)?It(e,null,t,!0):"object"==typeof e&&e?It([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function Yt(e){return e.reduce(Vt,Ht)}function Vt(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var Ht={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]},Bt={id:String,groupId:String,title:String,url:String},Ut={start:At,end:At,date:At,allDay:Boolean},zt=r(r(r({},Bt),Ut),{extendedProps:At});function qt(e,t,n,r,i){void 0===i&&(i=$t(n));var o=Wt(e,n,i),s=o.refined,a=o.extra,l=function(e,t){var n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),u=function(e,t,n,r){for(var i=0;i<r.length;i++){var o=r[i].parse(e,n);if(o){var s=e.allDay;return null==s&&null==(s=t)&&null==(s=o.allDayGuess)&&(s=!1),{allDay:s,duration:o.duration,typeData:o.typeData,typeId:i}}}return null}(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u)return(c=Gt(s,a,t?t.sourceId:"",u.allDay,Boolean(u.duration),n)).recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:c,instance:null};var c,d=function(e,t,n,r){var i,o,s=e.allDay,a=null,l=!1,u=null,c=null!=e.start?e.start:e.date;if(i=n.dateEnv.createMarkerMeta(c))a=i.marker;else if(!r)return null;return null!=e.end&&(o=n.dateEnv.createMarkerMeta(e.end)),null==s&&(s=null!=t?t:(!i||i.isTimeUnspecified)&&(!o||o.isTimeUnspecified)),s&&a&&(a=xe(a)),o&&(u=o.marker,s&&(u=xe(u)),a&&u<=a&&(u=null)),u?l=!0:r||(l=n.options.forceEventDuration||!1,u=n.dateEnv.add(a,s?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:s,hasEnd:l,range:{start:a,end:u},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:o?o.forcedTzo:null}}(s,l,n,r);return d?{def:c=Gt(s,a,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:Ie(c.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function Wt(e,t,n){return void 0===n&&(n=$t(t)),Mt(e,n)}function $t(e){return r(r(r({},Ft),zt),e.pluginHooks.eventRefiners)}function Gt(e,t,n,i,o,s){for(var a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:J(),sourceId:n,allDay:i,hasEnd:o,ui:jt(e,s),extendedProps:r(r({},e.extendedProps||{}),t)},l=0,u=s.pluginHooks.eventDefMemberAdders;l<u.length;l++){var c=u[l];r(a,c(e))}return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function Kt(e){var t=Math.floor(ye(e.start,e.end))||1,n=xe(e.start);return{start:n,end:me(n,t)}}function Zt(e,t){void 0===t&&(t=$e(0));var n=null,r=null;if(e.end){r=xe(e.end);var i=e.end.valueOf()-r.valueOf();i&&i>=Je(t)&&(r=me(r,1))}return e.start&&(n=xe(e.start),r&&r<=n&&(r=me(n,1))),{start:n,end:r}}function Xt(e){var t=Zt(e);return ye(t.start,t.end)>1}function Jt(e,t,n,r){return"year"===r?$e(n.diffWholeYears(e,t),"year"):"month"===r?$e(n.diffWholeMonths(e,t),"month"):_e(e,t)}function Qt(e,t){var n,r,i=[],o=t.start;for(e.sort(en),n=0;n<e.length;n++)(r=e[n]).start>o&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return o<t.end&&i.push({start:o,end:t.end}),i}function en(e,t){return e.start.valueOf()-t.start.valueOf()}function tn(e,t){var n=e.start,r=e.end,i=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(i={start:n,end:r}),i}function nn(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function rn(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function on(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function sn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function an(e,t,n,r){var i={},o={},s={},a=[],l=[],u=dn(e.defs,t);for(var c in e.defs)"inverse-background"===(p=u[(b=e.defs[c]).defId]).display&&(b.groupId?(i[b.groupId]=[],s[b.groupId]||(s[b.groupId]=b)):o[c]=[]);for(var d in e.instances){var h=e.instances[d],p=u[(b=e.defs[h.defId]).defId],f=h.range,m=!b.allDay&&r?Zt(f,r):f,g=tn(m,n);g&&("inverse-background"===p.display?b.groupId?i[b.groupId].push(g):o[h.defId].push(g):"none"!==p.display&&("background"===p.display?a:l).push({def:b,ui:p,instance:h,range:g,isStart:m.start&&m.start.valueOf()===g.start.valueOf(),isEnd:m.end&&m.end.valueOf()===g.end.valueOf()}))}for(var v in i)for(var y=0,_=Qt(i[v],n);y<_.length;y++){var b,w=_[y];p=u[(b=s[v]).defId],a.push({def:b,ui:p,instance:null,range:w,isStart:!1,isEnd:!1})}for(var c in o)for(var x=0,k=Qt(o[c],n);x<k.length;x++)w=k[x],a.push({def:e.defs[c],ui:u[c],instance:null,range:w,isStart:!1,isEnd:!1});return{bg:a,fg:l}}function ln(e){return"background"===e.ui.display||"inverse-background"===e.ui.display}function un(e,t){e.fcSeg=t}function cn(e){return e.fcSeg||e.parentNode.fcSeg||null}function dn(e,t){return Re(e,(function(e){return hn(e,t)}))}function hn(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Yt(n)}function pn(e,t){var n=e.map(fn);return n.sort((function(e,n){return se(e,n,t)})),n.map((function(e){return e._seg}))}function fn(e){var t=e.eventRange,n=t.def,i=t.instance?t.instance.range:t.range,o=i.start?i.start.valueOf():0,s=i.end?i.end.valueOf():0;return r(r(r({},n.extendedProps),n),{id:n.publicId,start:o,end:s,duration:s-o,allDay:Number(n.allDay),_seg:e})}function mn(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,i=r.def,o=r.ui,s=o.startEditable,a=0,l=n;a<l.length;a++)s=(0,l[a])(s,i,o,t);return s}function gn(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function vn(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function yn(e,t,n,r,i,o,s){var a=n.dateEnv,l=n.options,u=l.displayEventTime,c=l.displayEventEnd,d=e.eventRange.def,h=e.eventRange.instance;if(null==u&&(u=!1!==r),null==c&&(c=!1!==i),u&&!d.allDay&&(e.isStart||e.isEnd)){var p=o||(e.isStart?h.range.start:e.start||e.eventRange.range.start),f=s||(e.isEnd?h.range.end:e.end||e.eventRange.range.end);return c&&d.hasEnd?a.formatRange(p,f,t,{forcedStartTzo:o?null:h.forcedStartTzo,forcedEndTzo:s?null:h.forcedEndTzo}):a.format(p,t,{forcedTzo:o?null:h.forcedStartTzo})}return""}function _n(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&sn(t,r.start)}}function bn(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function wn(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}var xn={start:At,end:At,allDay:Boolean};function kn(e,t,n){var i=function(e,t){var n=Mt(e,xn),i=n.refined,o=n.extra,s=i.start?t.createMarkerMeta(i.start):null,a=i.end?t.createMarkerMeta(i.end):null,l=i.allDay;return null==l&&(l=s&&s.isTimeUnspecified&&(!a||a.isTimeUnspecified)),r({range:{start:s?s.marker:null,end:a?a.marker:null},allDay:l},o)}(e,t),o=i.range;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return i}function Sn(e,t){return nn(e.range,t.range)&&e.allDay===t.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(e,t)}function Tn(e,t,n){return r(r({},En(e,t,n)),{timeZone:t.timeZone})}function En(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function Dn(e,t,n){n.emitter.trigger("select",r(r({},Cn(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Cn(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.dateSpanTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,i=t.dateEnv,r(r({},En(n.range,i,n.allDay)),{allDay:n.allDay}))),o}function Mn(e,t,n){var r=n.dateEnv,i=n.options,o=t;return e?(o=xe(o),o=r.add(o,i.defaultAllDayEventDuration)):o=r.add(o,i.defaultTimedEventDuration),o}function An(e,t,n,r){var i=dn(e.defs,t),o={defs:{},instances:{}};for(var s in e.defs){var a=e.defs[s];o.defs[s]=In(a,i[s],n,r)}for(var l in e.instances){var u=e.instances[l];a=o.defs[u.defId],o.instances[l]=Ln(u,a,i[u.defId],n,r)}return o}function In(e,t,n,i){var o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);var s=r(r(r({},e),o),{ui:r(r({},e.ui),o.ui)});n.extendedProps&&(s.extendedProps=r(r({},s.extendedProps),n.extendedProps));for(var a=0,l=i.pluginHooks.eventDefMutationAppliers;a<l.length;a++)(0,l[a])(s,n,i);return!s.hasEnd&&i.options.forceEventDuration&&(s.hasEnd=!0),s}function Ln(e,t,n,i,o){var s=o.dateEnv,a=i.standardProps&&!0===i.standardProps.allDay,l=i.standardProps&&!1===i.standardProps.hasEnd,u=r({},e);return a&&(u.range=Kt(u.range)),i.datesDelta&&n.startEditable&&(u.range={start:s.add(u.range.start,i.datesDelta),end:s.add(u.range.end,i.datesDelta)}),i.startDelta&&n.durationEditable&&(u.range={start:s.add(u.range.start,i.startDelta),end:u.range.end}),i.endDelta&&n.durationEditable&&(u.range={start:u.range.start,end:s.add(u.range.end,i.endDelta)}),l&&(u.range={start:u.range.start,end:Mn(t.allDay,u.range.start,o)}),t.allDay&&(u.range={start:xe(u.range.start),end:xe(u.range.end)}),u.range.end<u.range.start&&(u.range.end=Mn(t.allDay,u.range.start,o)),u}var On=function(){function e(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}return Object.defineProperty(e.prototype,"calendar",{get:function(){return this.getCurrentData().calendarApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.getCurrentData().viewTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)},enumerable:!1,configurable:!0}),e.prototype.getOption=function(e){return this.getCurrentData().options[e]},e}(),Nn={id:String,defaultAllDay:Boolean,url:String,events:At,eventDataTransform:At,success:At,failure:At};function Rn(e,t,n){var r;if(void 0===n&&(n=Pn(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var i=Mt(r,n),o=i.refined,s=i.extra,a=function(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r--){var i=n[r].parseMeta(e);if(i)return{sourceDefId:r,meta:i}}return null}(o,t);if(a)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:J(),sourceDefId:a.sourceDefId,meta:a.meta,ui:jt(o,t),extendedProps:s}}return null}function Pn(e){return r(r(r({},Ft),Nn),e.pluginHooks.eventSourceRefiners)}function Fn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var jn=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.currentDataManager.emitter).trigger.apply(t,i([e],n))},e.prototype.changeView=function(e,t){var n=this;this.batchRendering((function(){if(n.unselect(),t)if(t.start&&t.end)n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),n.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{var r=n.getCurrentData().dateEnv;n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))},e.prototype.zoomTo=function(e,t){var n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})},e.prototype.getUnitViewSpec=function(e){var t,n,r=this.getCurrentData(),i=r.viewSpecs,o=r.toolbarConfig,s=[].concat(o.viewsWithButtons);for(var a in i)s.push(a);for(t=0;t<s.length;t++)if((n=i[s[t]])&&n.singleUnit===e)return n},e.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},e.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},e.prototype.prevYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})},e.prototype.nextYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})},e.prototype.today=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:Fn(e.calendarOptions.now,e.dateEnv)})},e.prototype.gotoDate=function(e){var t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})},e.prototype.incrementDate=function(e){var t=this.getCurrentData(),n=$e(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))},e.prototype.getDate=function(){var e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)},e.prototype.formatDate=function(e,t){var n=this.getCurrentData().dateEnv;return n.format(n.createMarker(e),bt(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),bt(n),n)},e.prototype.formatIso=function(e,t){var n=this.getCurrentData().dateEnv;return n.formatIso(n.createMarker(e),{omitTime:t})},e.prototype.select=function(e,t){var n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};var r=this.getCurrentData(),i=kn(n,r.dateEnv,$e({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),Dn(i,null,r))},e.prototype.unselect=function(e){var t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))},e.prototype.addEvent=function(e,t){if(e instanceof Yn){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Lt({def:n,instance:r})}),this.triggerEventAdd(e)),e}var i,o=this.getCurrentData();if(t instanceof j)i=t.internalEventSource;else if("boolean"==typeof t)t&&(i=Fe(o.eventSources)[0]);else if(null!=t){var s=this.getEventSourceById(t);if(!s)return console.warn('Could not find an event source with ID "'+t+'"'),null;i=s.internalEventSource}var a=qt(e,i,o,!1);if(a){var l=new Yn(o,a.def,a.def.recurringDef?null:a.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Lt(a)}),this.triggerEventAdd(l),l}return null},e.prototype.triggerEventAdd=function(e){var t=this;this.getCurrentData().emitter.trigger("eventAdd",{event:e,relatedEvents:[],revert:function(){t.dispatch({type:"REMOVE_EVENTS",eventStore:Vn(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,i=n.instances;for(var o in e=String(e),r){var s=r[o];if(s.publicId===e){if(s.recurringDef)return new Yn(t,s,null);for(var a in i){var l=i[a];if(l.defId===s.defId)return new Yn(t,s,l)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return Hn(e.eventStore,e)},e.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},e.prototype.getEventSources=function(){var e=this.getCurrentData(),t=e.eventSources,n=[];for(var r in t)n.push(new j(e,t[r]));return n},e.prototype.getEventSourceById=function(e){var t=this.getCurrentData(),n=t.eventSources;for(var r in e=String(e),n)if(n[r].publicId===e)return new j(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof j)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=Rn(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new j(t,n)):null},e.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},e.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES"})},e.prototype.scrollToTime=function(e){var t=$e(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),Yn=function(){function e(e,t,n){this._context=e,this._def=t,this._instance=n||null}return e.prototype.setProp=function(e,t){var n,r;if(e in Ut)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e in Bt)t=Bt[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in Ft){var i=Ft[e](t);"color"===e?i={backgroundColor:t,borderColor:t}:"editable"===e?i={startEditable:t,durationEditable:t}:((r={})[e]=t,i=r),this.mutate({standardProps:{ui:i}})}else console.warn("Could not set prop '"+e+"'. Use setExtendedProp instead.")},e.prototype.setExtendedProp=function(e,t){var n;this.mutate({extendedProps:(n={},n[e]=t,n)})},e.prototype.setStart=function(e,t){void 0===t&&(t={});var n=this._context.dateEnv,r=n.createMarker(e);if(r&&this._instance){var i=Jt(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}},e.prototype.setEnd=function(e,t){void 0===t&&(t={});var n,r=this._context.dateEnv;if((null==e||(n=r.createMarker(e)))&&this._instance)if(n){var i=Jt(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:i})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,i,o,s=this._context.dateEnv,a={allDay:n.allDay},l=s.createMarker(e);if(l&&(null==t||(r=s.createMarker(t)))&&this._instance){var u=this._instance.range;!0===n.allDay&&(u=Kt(u));var c=Jt(u.start,l,s,n.granularity);if(r){var d=Jt(u.end,r,s,n.granularity);o=d,(i=c).years===o.years&&i.months===o.months&&i.days===o.days&&i.milliseconds===o.milliseconds?this.mutate({datesDelta:c,standardProps:a}):this.mutate({startDelta:c,endDelta:d,standardProps:a})}else a.hasEnd=!1,this.mutate({datesDelta:c,standardProps:a})}},e.prototype.moveStart=function(e){var t=$e(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=$e(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=$e(e);t&&this.mutate({datesDelta:t})},e.prototype.setAllDay=function(e,t){void 0===t&&(t={});var n={allDay:e},r=t.maintainDuration;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})},e.prototype.formatRange=function(e){var t=this._context.dateEnv,n=this._instance,r=bt(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})},e.prototype.mutate=function(t){var n=this._instance;if(n){var r=this._def,i=this._context,o=Ot(i.getCurrentData().eventStore,n.instanceId);o=An(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,i);var s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:o}),i.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:Hn(o,i,n),revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:o})}})}},e.prototype.remove=function(){var e=this._context,t=Vn(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert:function(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})},Object.defineProperty(e.prototype,"source",{get:function(){var e=this._def.sourceId;return e?new j(this._context,this._context.getCurrentData().eventSources[e]):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startStr",{get:function(){var e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endStr",{get:function(){var e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._def.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._def.title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._def.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"display",{get:function(){return this._def.ui.display||"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!1,configurable:!0}),e.prototype.toPlainObject=function(e){void 0===e&&(e={});var t=this._def,n=t.ui,i=this.startStr,o=this.endStr,s={};return t.title&&(s.title=t.title),i&&(s.start=i),o&&(s.end=o),t.publicId&&(s.id=t.publicId),t.groupId&&(s.groupId=t.groupId),t.url&&(s.url=t.url),n.display&&"auto"!==n.display&&(s.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?s.color=n.backgroundColor:(n.backgroundColor&&(s.backgroundColor=n.backgroundColor),n.borderColor&&(s.borderColor=n.borderColor)),n.textColor&&(s.textColor=n.textColor),n.classNames.length&&(s.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?r(s,t.extendedProps):s.extendedProps=t.extendedProps),s},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function Vn(e){var t,n,r=e._def,i=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:i?(n={},n[i.instanceId]=i,n):{}}}function Hn(e,t,n){var r=e.defs,i=e.instances,o=[],s=n?n.instanceId:"";for(var a in i){var l=i[a],u=r[l.defId];l.instanceId!==s&&o.push(new Yn(t,u,l))}return o}var Bn,Un={},zn=function(){function e(){}return e.prototype.getMarkerYear=function(e){return e.getUTCFullYear()},e.prototype.getMarkerMonth=function(e){return e.getUTCMonth()},e.prototype.getMarkerDay=function(e){return e.getUTCDate()},e.prototype.arrayToMarker=function(e){return Ce(e)},e.prototype.markerToArray=function(e){return De(e)},e}();Bn=zn,Un.gregory=Bn;var qn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Wn(e){var t=qn.exec(e);if(t){var n=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number("0."+t[12]):0));if(Me(n)){var r=null;return t[13]&&(r=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}var $n=function(){function e(e){var t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new Un[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}return e.prototype.createMarker=function(e){var t=this.createMarkerMeta(e);return null===t?null:t.marker},e.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Ce(Te(new Date))},e.prototype.createMarkerMeta=function(e){if("string"==typeof e)return this.parse(e);var t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=Ce(e)),null!==t&&Me(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=Wn(e);if(null===t)return null;var n=t.marker,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}},e.prototype.getYear=function(e){return this.calendarSystem.getMarkerYear(e)},e.prototype.getMonth=function(e){return this.calendarSystem.getMarkerMonth(e)},e.prototype.add=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.subtract=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.addYears=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.addMonths=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.diffWholeYears=function(e,t){var n=this.calendarSystem;return Ae(e)===Ae(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null},e.prototype.diffWholeMonths=function(e,t){var n=this.calendarSystem;return Ae(e)===Ae(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null},e.prototype.greatestWholeUnit=function(e,t){var n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(e,t))?{unit:"month",value:n}:null!==(n=be(e,t))?{unit:"week",value:n}:null!==(n=we(e,t))?{unit:"day",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t))?{unit:"hour",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t))?{unit:"minute",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t))?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}},e.prototype.countDurationsBetween=function(e,t,n){var r;return n.years&&null!==(r=this.diffWholeYears(e,t))?r/(Xe(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Xe(e)/30}(n):n.days&&null!==(r=we(e,t))?r/Xe(n):(t.valueOf()-e.valueOf())/Je(n)},e.prototype.startOf=function(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?xe(e):"hour"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):void 0},e.prototype.startOfYear=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])},e.prototype.startOfMonth=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])},e.prototype.startOfWeek=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])},e.prototype.computeWeekNumber=function(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){var r=e.getUTCFullYear(),i=ke(e,r,t,n);if(i<1)return ke(e,r-1,t,n);var o=ke(e,r+1,t,n);return o>=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=ge(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",rt(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?Ce(Te(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Ce(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Ee(De(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(De(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Ee(De(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(De(e))*60):new Date(e.valueOf()-(t||0))},e}(),Gn=[],Kn={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"};function Zn(e){for(var t=e.length>0?e[0].code:"en",n=Gn.concat(e),r={en:Kn},i=0,o=n;i<o.length;i++){var s=o[i];r[s.code]=s}return{map:r,defaultCode:t}}function Xn(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){var n=[].concat(e||[]),r=function(e,t){for(var n=0;n<e.length;n++)for(var r=e[n].toLocaleLowerCase().split("-"),i=r.length;i>0;i--){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||Kn;return Jn(e,n,r)}(e,t):Jn(e.code,[e.code],e)}function Jn(e,t,n){var r=Oe([Kn,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function Qn(e){var t=Xn(e.locale||"en",Zn([]).map);return new $n(r(r({timeZone:xt.timeZone,calendarSystem:"gregory"},e),{locale:t}))}var er,tr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function nr(e,t){return It(function(e){return(!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[]).map((function(e){return r(r({},tr),e)}))}(e),null,t)}function rr(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function ir(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function or(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}}function sr(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function ar(e,t){return{left:e.left-t.left,top:e.top-t.top}}function lr(){return null==er&&(er=function(){if("undefined"==typeof document)return!0;var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),er}var ur={defs:{},instances:{}},cr=function(){function e(){this.getKeysForEventDefs=ot(this._getKeysForEventDefs),this.splitDateSelection=ot(this._splitDateSpan),this.splitEventStore=ot(this._splitEventStore),this.splitIndividualUi=ot(this._splitIndividualUi),this.splitEventDrag=ot(this._splitInteraction),this.splitEventResize=ot(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,r),s=this.splitEventStore(e.eventStore,r),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=Re(n,(function(e,n){return t.eventUiBuilders[n]||ot(dr)})),n){var d=n[c],h=s[c]||ur,p=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:i[c]||null,eventStore:h,eventUiBases:p(e.eventUiBases[""],d.ui,o[c]),eventSelection:h.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++)t[r[n]]=e;return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return Re(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,i={};for(var o in n)for(var s=0,a=t[o];s<a.length;s++)i[h=a[s]]||(i[h]={defs:{},instances:{}}),i[h].defs[o]=n[o];for(var l in r)for(var u=r[l],c=0,d=t[u.defId];c<d.length;c++){var h;i[h=d[c]]&&(i[h].instances[l]=u)}return i},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var i=0,o=t[r];i<o.length;i++){var s=o[i];n[s]||(n[s]={}),n[s][r]=e[r]}return n},e.prototype._splitInteraction=function(e){var t={};if(e){var n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),o=function(r){t[r]||(t[r]={affectedEvents:n[r]||ur,mutatedEvents:i[r]||ur,isEvent:e.isEvent})};for(var s in n)o(s);for(var s in i)o(s)}return t},e}();function dr(e,t,n){var i=[];e&&i.push(e),t&&i.push(t);var o={"":Yt(i)};return n&&r(o,n),o}function hr(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!sn(r.activeRange,e)),isOther:Boolean(r&&!sn(r.currentRange,e)),isToday:Boolean(t&&sn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function pr(e,t){var n=["fc-day","fc-day-"+pe[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}function fr(e,t){return void 0===t&&(t="day"),JSON.stringify({date:tt(e),type:t})}var mr,gr=null;function vr(){return null===gr&&(gr=function(){var e=document.createElement("div");z(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="<div></div>",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Y(e),t}()),gr}function yr(){return mr||(mr=function(){var e=document.createElement("div");e.style.overflow="scroll",document.body.appendChild(e);var t=_r(e);return document.body.removeChild(e),t}()),mr}function _r(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function br(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,s=parseInt(n.borderBottomWidth,10)||0,a=_r(e),l=a.y-r-i,u={borderLeft:r,borderRight:i,borderTop:o,borderBottom:s,scrollbarBottom:a.x-o-s,scrollbarLeft:0,scrollbarRight:0};return vr()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function wr(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():xr(e),i=br(e,t),o={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return t&&(o.left+=i.paddingLeft,o.right-=i.paddingRight,o.top+=i.paddingTop,o.bottom-=i.paddingBottom),o}function xr(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function kr(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 Sr(e,t,n){var r=!1,i=function(){r||(r=!0,t.apply(this,arguments))},o=function(){r||(r=!0,n&&n.apply(this,arguments))},s=e(i,o);s&&"function"==typeof s.then&&s.then(i,o)}var Tr=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=this.handlers[e]||[],i=this.options&&this.options[e],o=0,s=[].concat(i||[],r);o<s.length;o++){s[o].apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e]},e}(),Er=function(){function e(e,t,n,r){this.els=t;var i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.left-e),n.push(o.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.top-e),n.push(o.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.getWidth=function(e){return this.rights[e]-this.lefts[e]},e.prototype.getHeight=function(e){return this.bottoms[e]-this.tops[e]},e}(),Dr=function(){function e(){}return e.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},e.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},e.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},e.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},e.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},e}(),Cr=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return n(t,e),t.prototype.getScrollTop=function(){return this.el.scrollTop},t.prototype.getScrollLeft=function(){return this.el.scrollLeft},t.prototype.setScrollTop=function(e){this.el.scrollTop=e},t.prototype.setScrollLeft=function(e){this.el.scrollLeft=e},t.prototype.getScrollWidth=function(){return this.el.scrollWidth},t.prototype.getScrollHeight=function(){return this.el.scrollHeight},t.prototype.getClientHeight=function(){return this.el.clientHeight},t.prototype.getClientWidth=function(){return this.el.clientWidth},t}(Dr),Mr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getScrollTop=function(){return window.pageYOffset},t.prototype.getScrollLeft=function(){return window.pageXOffset},t.prototype.setScrollTop=function(e){window.scroll(window.pageXOffset,e)},t.prototype.setScrollLeft=function(e){window.scroll(e,window.pageYOffset)},t.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},t.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},t.prototype.getClientHeight=function(){return document.documentElement.clientHeight},t.prototype.getClientWidth=function(){return document.documentElement.clientWidth},t}(Dr),Ar=function(){function e(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}return e.prototype.setIconOverride=function(e){var t,n;if("object"==typeof e&&e){for(n in t=r({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e,t){var n;return(n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e])?this.baseIconClass+" "+n:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();if(Ar.prototype.classes={},Ar.prototype.iconClasses={},Ar.prototype.baseIconClass="",Ar.prototype.iconOverridePrefix="","undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Ir=FullCalendarVDom.Component,Lr=FullCalendarVDom.createElement,Or=FullCalendarVDom.render,Nr=FullCalendarVDom.createRef,Rr=FullCalendarVDom.Fragment,Pr=FullCalendarVDom.createContext,Fr=FullCalendarVDom.flushToDom,jr=function(){function e(e,t,n){var i=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.handleScrollRequest=function(e){i.queuedRequest=r({},i.queuedRequest||{},e),i.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}return e.prototype.detach=function(){this.emitter.off("_scrollRequest",this.handleScrollRequest)},e.prototype.update=function(e){e?this.fireInitialScroll():this.drain()},e.prototype.fireInitialScroll=function(){this.handleScrollRequest({time:this.scrollTime})},e.prototype.drain=function(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)},e}(),Yr=Pr({});function Vr(e,t,n,r,i,o,s,a,l,u,c,d,h){return{dateEnv:i,options:n,pluginHooks:s,emitter:u,dispatch:a,getCurrentData:l,calendarApi:c,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:"rtl"===n.direction,addResizeHandler:function(e){u.on("_resize",e)},removeResizeHandler:function(e){u.off("_resize",e)},createScrollResponder:function(e){return new jr(e,u,$e(n.scrollTime))},registerInteractiveComponent:d,unregisterInteractiveComponent:h}}var Hr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(Ye(e,this.props),Ye(t,this.state)),!Ve(this.props,e,this.propEquality)||!Ve(this.state,t,this.stateEquality)},t.addPropsEquality=Ur,t.addStateEquality=zr,t.contextType=Yr,t}(Ir);Hr.prototype.propEquality={},Hr.prototype.stateEquality={};var Br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.contextType=Yr,t}(Hr);function Ur(e){var t=Object.create(this.prototype.propEquality);r(t,e),this.prototype.propEquality=t}function zr(e){var t=Object.create(this.prototype.stateEquality);r(t,e),this.prototype.stateEquality=t}function qr(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Wr(e,t){var n;if(t){n=[];for(var r=0,i=e;r<i.length;r++){var o=i[r],s=t(o);s?n.push(s):null==s&&n.push(o)}}else n=e;return n}function $r(e,t){return Rt(e,(function(e){return e.sourceId!==t}))}function Gr(e,t){return Kr({eventDrag:e},t)}function Kr(e,t){var n=t.getCurrentData(),i=r({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||Zr)(i,t)}function Zr(e,t,n,i){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,i){var o=t.getCurrentData(),s=e.eventDrag,a=s.mutatedEvents,l=a.defs,u=a.instances,c=dn(l,s.isEvent?e.eventUiBases:{"":o.selectionConfig});i&&(c=Re(c,i));var d,h,p=(d=e.eventStore,h=s.affectedEvents.instances,{defs:d.defs,instances:Ne(d.instances,(function(e){return!h[e.instanceId]}))}),f=p.defs,m=p.instances,g=dn(f,e.eventUiBases);for(var v in u){var y=u[v],_=y.range,b=c[y.defId],w=l[y.defId];if(!Xr(b.constraints,_,p,e.businessHours,t))return!1;var x=t.options.eventOverlap,k="function"==typeof x?x:null;for(var S in m){var T=m[S];if(rn(_,T.range)){if(!1===g[T.defId].overlap&&s.isEvent)return!1;if(!1===b.overlap)return!1;if(k&&!k(new Yn(t,f[T.defId],T),new Yn(t,w,y)))return!1}}for(var E=o.eventStore,D=0,C=b.allows;D<C.length;D++){var M,A=C[D],I=r(r({},n),{range:y.range,allDay:w.allDay}),L=E.defs[w.defId],O=E.instances[v];if(M=L?new Yn(t,L,O):new Yn(t,w),!A(Cn(I,t),M))return!1}}return!0}(e,t,n,i)||e.dateSelection&&!function(e,t,n,i){var o=e.eventStore,s=o.defs,a=o.instances,l=e.dateSelection,u=l.range,c=t.getCurrentData().selectionConfig;if(i&&(c=i(c)),!Xr(c.constraints,u,o,e.businessHours,t))return!1;var d=t.options.selectOverlap,h="function"==typeof d?d:null;for(var p in a){var f=a[p];if(rn(u,f.range)){if(!1===c.overlap)return!1;if(h&&!h(new Yn(t,s[f.defId],f),null))return!1}}for(var m=0,g=c.allows;m<g.length;m++){if(!(0,g[m])(Cn(r(r({},n),l),t),null))return!1}return!0}(e,t,n,i))}function Xr(e,t,n,r,i){for(var o=0,s=e;o<s.length;o++)if(!ei(Jr(s[o],t,n,r,i),t))return!1;return!0}function Jr(e,t,n,r,i){return"businessHours"===e?Qr(Ue(r,t,i)):"string"==typeof e?Qr(Rt(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?Qr(Ue(e,t,i)):[]}function Qr(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function ei(e,t){for(var n=0,r=e;n<r.length;n++)if(on(r[n],t))return!0;return!1}var ti=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=J(),t}return n(t,e),t.prototype.prepareHits=function(){},t.prototype.queryHit=function(e,t,n,r){return null},t.prototype.isInteractionValid=function(e){var t=this.props.dateProfile,n=e.mutatedEvents.instances;if(t)for(var r in n)if(!on(t.validRange,n[r].range))return!1;return Gr(e,this.context)},t.prototype.isDateSelectionValid=function(e){var t=this.props.dateProfile;return!(t&&!on(t.validRange,e.range))&&Kr({dateSelection:e},this.context)},t.prototype.isValidSegDownEl=function(e){return!this.props.eventDrag&&!this.props.eventResize&&!V(e,".fc-event-mirror")&&(this.isPopover()||!this.isInPopover(e))},t.prototype.isValidDateDownEl=function(e){return!(V(e,".fc-event:not(.fc-bg-event)")||V(e,".fc-daygrid-more-link")||V(e,"a[data-navlink]")||this.isInPopover(e))},t.prototype.isPopover=function(){return!1},t.prototype.isInPopover=function(e){return Boolean(V(e,".fc-popover"))},t}(Br);function ni(e){return{id:J(),deps:e.deps||[],reducers:e.reducers||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],eventResizeJoinTransforms:e.eventResizeJoinTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,contentTypeHandlers:e.contentTypeHandlers||{},listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}var ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);function ii(e,t,n,i){if(t[e])return t[e];var o=function(e,t,n,i){var o=n[e],s=i[e],a=function(e){return o&&null!==o[e]?o[e]:s&&null!==s[e]?s[e]:null},l=a("component"),u=a("superType"),c=null;if(u){if(u===e)throw new Error("Can't have a custom view type that references itself");c=ii(u,t,n,i)}return!l&&c&&(l=c.component),l?{type:e,component:l,defaults:r(r({},c?c.defaults:{}),o?o.rawOptions:{}),overrides:r(r({},c?c.overrides:{}),s?s.rawOptions:{})}:null}(e,t,n,i);return o&&(t[e]=o),o}ri.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},ri.prototype.baseIconClass="fc-icon",ri.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},ri.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},ri.prototype.iconOverrideOption="buttonIcons",ri.prototype.iconOverrideCustomButtonOption="icon",ri.prototype.iconOverridePrefix="fc-icon-";var oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.handleRootEl=function(e){qr(t.rootElRef,e),t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return Lr(ui,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return Lr(ai,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,i){return t.children(r,di(t.classNames,n),e,i)}))}))},t}(Br),si=Pr(0);function ai(e){return Lr(si.Consumer,null,(function(t){return Lr(li,r({renderId:t},e))}))}var li=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Nr(),t}return n(t,e),t.prototype.render=function(){return this.props.children(this.innerElRef,this.renderInnerContent())},t.prototype.componentDidMount=function(){this.updateCustomContent()},t.prototype.componentDidUpdate=function(){this.updateCustomContent()},t.prototype.renderInnerContent=function(){var e=this.context.pluginHooks.contentTypeHandlers,t=this.props,n=this.customContentInfo,r=hi(t.content,t.hookProps),i=null;if(void 0===r&&(r=hi(t.defaultContent,t.hookProps)),void 0!==r){if(n)n.contentVal=r[n.contentKey];else if("object"==typeof r)for(var o in e)if(void 0!==r[o]){n=this.customContentInfo={contentKey:o,contentVal:r[o],handler:e[o]()};break}i=n?[]:r}return i},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.handler(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(Br),ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t}(Br);function ci(){var e,t,n=[];return function(r,i){return t&&je(t,i)&&r===e||(e=r,t=i,n=di(r,i)),n}}function di(e,t){return"function"==typeof e&&(e=e(t)),Pt(e)}function hi(e,t){return"function"==typeof e?e(t,Lr):e}var pi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=ci(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},i=this.normalizeClassNames(n.viewClassNames,r);return Lr(ui,{hookProps:r,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount,elRef:e.elRef},(function(t){return e.children(t,["fc-"+e.viewSpec.type+"-view","fc-view"].concat(i))}))},t}(Br);function fi(e){return Re(e,mi)}function mi(e){var t,n="function"==typeof e?{component:e}:e,i=n.component;return n.content&&(t=n,i=function(e){return Lr(Yr.Consumer,null,(function(n){return Lr(pi,{viewSpec:n.viewSpec},(function(i,o){var s=r(r({},e),{nextDayThreshold:n.options.nextDayThreshold});return Lr(oi,{hookProps:s,classNames:t.classNames,content:t.content,didMount:t.didMount,willUnmount:t.willUnmount,elRef:i},(function(e,t,n,r){return Lr("div",{className:o.concat(t).join(" "),ref:e},r)}))}))}))}),{superType:n.type,component:i,rawOptions:n}}function gi(e,t,n,i){var o=fi(e),s=fi(t.views);return Re(function(e,t){var n,r={};for(n in e)ii(n,r,e,t);for(n in t)ii(n,r,e,t);return r}(o,s),(function(e){return function(e,t,n,i,o){var s=e.overrides.duration||e.defaults.duration||i.duration||n.duration,a=null,l="",u="",c={};if(s&&(a=function(e){var t=JSON.stringify(e),n=vi[t];return void 0===n&&(n=$e(e),vi[t]=n),n}(s))){var d=et(a);l=d.unit,1===d.value&&(u=l,c=t[l]?t[l].rawOptions:{})}var h=function(t){var n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[u]?n[u]:void 0};return{type:e.type,component:e.component,duration:a,durationUnit:l,singleUnit:u,optionDefaults:e.defaults,optionOverrides:r(r({},c),e.overrides),buttonTextOverride:h(i)||h(n)||e.overrides.buttonText,buttonTextDefault:h(o)||e.defaults.buttonText||h(xt)||e.type}}(e,s,t,n,i)}))}var vi={},yi=function(){function e(e){this.props=e,this.nowDate=Fn(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,i,o,s,a,l,u,c,d=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(u=e,e=null!=(c=r).start&&u<c.start?c.start:null!=c.end&&u>=c.end?new Date(c.end.valueOf()-1):u),i=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(i.unit),s=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,o),a=s=this.trimHiddenDays(s),d.showNonCurrentDates||(a=tn(a,i.range)),a=tn(a=this.adjustActiveRange(a),r),l=rn(i.range,r),{validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:o,activeRange:a,renderRange:s,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,i=null,o=null,s=null;return r.duration?(i=r.duration,o=r.durationUnit,s=this.buildRangeFromDuration(e,t,i,o)):(n=this.props.dayCount)?(o="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?o=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(o=et(i=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,i,o)),{duration:i,unit:o,range:s}},e.prototype.getFallbackDuration=function(){return $e({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,i=t.slotMinTime,o=t.slotMaxTime,s=e.start,a=e.end;return r&&(Xe(i)<0&&(s=xe(s),s=n.add(s,i)),Xe(o)>1&&(a=me(a=xe(a),-1),a=n.add(a,o))),{start:s,end:a}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,s,a=this.props,l=a.dateEnv,u=a.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&Je(c)<Je(n)?et(c).unit:r}function d(){i=l.startOf(e,u),o=l.add(i,n),s={start:i,end:o}}return Xe(n)<=1&&this.isHiddenDay(i)&&(i=xe(i=this.skipHiddenDays(i,t))),d(),this.trimHiddenDays(s)||(e=this.skipHiddenDays(e,t),d()),s},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,i=this.props,o=i.dateEnv,s=i.dateAlignment,a=0,l=e;s&&(l=o.startOf(l,s)),l=xe(l),r=l=this.skipHiddenDays(l,t);do{r=me(r,1),this.isHiddenDay(r)||a++}while(a<n);return{start:l,end:r}},e.prototype.buildCustomVisibleRange=function(e){var t=this.props,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return!i||null!=i.start&&null!=i.end?i:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t;return this.props.dateIncrement||((t=this.props.dateAlignment)?$e(1,t):e||$e({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,i=null,o=null,n.start&&(i=r.createMarker(n.start)),n.end&&(o=r.createMarker(n.end)),i||o?i&&o&&o<i?null:{start:i,end:o}:null);return t&&(t=Zt(t)),t}var n,r,i,o;return null},e.prototype.initHiddenDays=function(){var e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e++)(n[e]=-1!==t.indexOf(e))||r++;if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(e){var t=e.start,n=e.end;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null},e.prototype.isHiddenDay=function(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]},e.prototype.skipHiddenDays=function(e,t,n){for(void 0===t&&(t=1),void 0===n&&(n=!1);this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=me(e,t);return e},e}();function _i(e){var t=0;for(var n in e)e[n].isFetching&&t++;return t}function bi(e,t,n,i){for(var o={},s=0,a=t;s<a.length;s++){var l=a[s];o[l.sourceId]=l}return n&&(o=wi(o,n,i)),r(r({},e),o)}function wi(e,t,n){return xi(e,Ne(e,(function(e){return function(e,t,n){return Ti(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}(e,t,n)})),t,n)}function xi(e,t,n,r){var i={};for(var o in e){var s=e[o];t[o]?i[o]=ki(s,n,r):i[o]=s}return i}function ki(e,t,n){var i=n.options,o=n.calendarApi,s=n.pluginHooks.eventSourceDefs[e.sourceDefId],a=J();return s.fetch({eventSource:e,range:t,context:n},(function(r){var s=r.rawEvents;i.eventSourceSuccess&&(s=i.eventSourceSuccess.call(o,s,r.xhr)||s),e.success&&(s=e.success.call(o,s,r.xhr)||s),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:s})}),(function(r){console.warn(r.message,r),i.eventSourceFailure&&i.eventSourceFailure.call(o,r),e.failure&&e.failure(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:r})})),r(r({},e),{isFetching:!0,latestFetchId:a})}function Si(e,t){return Ne(e,(function(e){return Ti(e,t)}))}function Ti(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Ei(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Di(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Ci(e,t){var n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Mi(e,t){var n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Ai(e,t,n,r,i){var o=[];return{headerToolbar:e.headerToolbar?Ii(e.headerToolbar,e,t,n,r,i,o):null,footerToolbar:e.footerToolbar?Ii(e.footerToolbar,e,t,n,r,i,o):null,viewsWithButtons:o}}function Ii(e,t,n,r,i,o,s){return Re(e,(function(e){return function(e,t,n,r,i,o,s){var a="rtl"===t.direction,l=t.customButtons||{},u=n.buttonText||{},c=t.buttonText||{};return(e?e.split(" "):[]).map((function(e){return e.split(",").map((function(e){if("title"===e)return{buttonName:e};var t,n=void 0,d=void 0,h=void 0,p=void 0;return(t=l[e])?(d=function(e){t.click&&t.click.call(e.target,e,e.target)},(h=r.getCustomButtonIconClass(t))||(h=r.getIconClass(e,a))||(p=t.text)):(n=i[e])?(s.push(e),d=function(){o.changeView(e)},(p=n.buttonTextOverride)||(h=r.getIconClass(e,a))||(p=n.buttonTextDefault)):o[e]&&(d=function(){o[e]()},(p=u[e])||(h=r.getIconClass(e,a))||(p=c[e])),{buttonName:e,buttonClick:d,buttonIcon:h,buttonText:p}}))}))}(e,t,n,r,i,o,s)}))}function Li(e,t,n,r,i){var o=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Oi(t)}(t,n):o=Oi(n);var s=new XMLHttpRequest;s.open(e,t,!0),"GET"!==e&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.onload=function(){if(s.status>=200&&s.status<400){var e=!1,t=void 0;try{t=JSON.parse(s.responseText),e=!0}catch(e){}e?r(t,s):i("Failure parsing JSON",s)}else i("Request failed",s)},s.onerror=function(){i("Request failed",s)},s.send(o)}function Oi(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function Ni(e,t){for(var n=Fe(t.getCurrentData().eventSources),r=[],i=0,o=e;i<o.length;i++){for(var s=o[i],a=!1,l=0;l<n.length;l++)if(n[l]._raw===s){n.splice(l,1),a=!0;break}a||r.push(s)}for(var u=0,c=n;u<c.length;u++){var d=c[u];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:d.sourceId})}for(var h=0,p=r;h<p.length;h++){var f=p[h];t.calendarApi.addEventSource(f)}}var Ri=[ni({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),ni({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;Sr(e.eventSource.meta.bind(null,Tn(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),ni({eventSourceRefiners:{method:String,extraParams:At,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta:function(e){return e.url?{url:e.url,method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch:function(e,t,n){var i=e.eventSource.meta,o=function(e,t,n){var i,o,s,a,l=n.dateEnv,u=n.options,c={};return null==(i=e.startParam)&&(i=u.startParam),null==(o=e.endParam)&&(o=u.endParam),null==(s=e.timeZoneParam)&&(s=u.timeZoneParam),a="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},r(c,a),c[i]=l.formatIso(t.start),c[o]=l.formatIso(t.end),"local"!==l.timeZone&&(c[s]=l.timeZone),c}(i,e.range,e.context);Li(i.method,i.url,o,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),ni({recurringTypes:[{parse:function(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){var n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null},r=void 0;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(i=e.endTime,o=e.startTime,r={years:i.years-o.years,months:i.months-o.months,days:i.days-o.days,milliseconds:i.milliseconds-o.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var i,o;return null},expand:function(e,t,n){var r=tn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){for(var i=e?Pe(e):null,o=xe(n.start),s=n.end,a=[];o<s;){var l=void 0;i&&!i[o.getUTCDay()]||(l=t?r.add(o,t):o,a.push(l)),o=me(o,1)}return a}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:At,startTime:$e,endTime:$e,duration:$e,startRecur:At,endRecur:At}}),ni({optionChangeHandlers:{events:function(e,t){Ni([e],t)},eventSources:Ni}}),ni({contentTypeHandlers:{html:function(){return Pi},domNodes:function(){return Fi}},propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",r(r({},Tn(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Hn(e,t))}}})];function Pi(e,t){e.innerHTML=t}function Fi(e,t){var n=Array.prototype.slice.call(e.childNodes),r=Array.prototype.slice.call(t);if(!it(n,r)){for(var i=0,o=r;i<o.length;i++){var s=o[i];e.appendChild(s)}n.forEach(Y)}}var ji=function(){function e(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}return e.prototype.request=function(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))},e.prototype.pause=function(e){void 0===e&&(e="");var t=this.pauseDepths;t[e]=(t[e]||0)+1,this.clearTimeout()},e.prototype.resume=function(e,t){void 0===e&&(e="");var n=this.pauseDepths;e in n&&((t||--n[e]<=0)&&delete n[e],this.tryDrain())},e.prototype.isPaused=function(){return Object.keys(this.pauseDepths).length},e.prototype.tryDrain=function(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}},e.prototype.clear=function(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}},e.prototype.clearTimeout=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)},e.prototype.drained=function(){this.drainedOption&&this.drainedOption()},e}(),Yi=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new ji(this.drain.bind(this))}return e.prototype.request=function(e,t){this.queue.push(e),this.delayedRunner.request(t)},e.prototype.pause=function(e){this.delayedRunner.pause(e)},e.prototype.resume=function(e,t){this.delayedRunner.resume(e,t)},e.prototype.drain=function(){for(var e=this.queue;e.length;){for(var t=[],n=void 0;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}},e.prototype.runTask=function(e){this.runTaskOption&&this.runTaskOption(e)},e.prototype.drained=function(e){this.drainedOption&&this.drainedOption(e)},e}();function Vi(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,bt(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=we(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var Hi=function(){function e(e){var t=this;this.computeOptionsData=ot(this._computeOptionsData),this.computeCurrentViewData=ot(this._computeCurrentViewData),this.organizeRawLocales=ot(Zn),this.buildLocale=ot(Xn),this.buildPluginHooks=function(){var e,t=[],n=[];return function(i,o){return e&&it(i,t)&&it(o,n)||(e=function(e,t){var n={},i={reducers:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],eventResizeJoinTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,contentTypeHandlers:{},listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(e){for(var t=0,s=e;t<s.length;t++){var a=s[t];n[a.id]||(n[a.id]=!0,o(a.deps),u=a,i={reducers:(l=i).reducers.concat(u.reducers),contextInit:l.contextInit.concat(u.contextInit),eventRefiners:r(r({},l.eventRefiners),u.eventRefiners),eventDefMemberAdders:l.eventDefMemberAdders.concat(u.eventDefMemberAdders),eventSourceRefiners:r(r({},l.eventSourceRefiners),u.eventSourceRefiners),isDraggableTransformers:l.isDraggableTransformers.concat(u.isDraggableTransformers),eventDragMutationMassagers:l.eventDragMutationMassagers.concat(u.eventDragMutationMassagers),eventDefMutationAppliers:l.eventDefMutationAppliers.concat(u.eventDefMutationAppliers),dateSelectionTransformers:l.dateSelectionTransformers.concat(u.dateSelectionTransformers),datePointTransforms:l.datePointTransforms.concat(u.datePointTransforms),dateSpanTransforms:l.dateSpanTransforms.concat(u.dateSpanTransforms),views:r(r({},l.views),u.views),viewPropsTransformers:l.viewPropsTransformers.concat(u.viewPropsTransformers),isPropsValid:u.isPropsValid||l.isPropsValid,externalDefTransforms:l.externalDefTransforms.concat(u.externalDefTransforms),eventResizeJoinTransforms:l.eventResizeJoinTransforms.concat(u.eventResizeJoinTransforms),viewContainerAppends:l.viewContainerAppends.concat(u.viewContainerAppends),eventDropTransformers:l.eventDropTransformers.concat(u.eventDropTransformers),calendarInteractions:l.calendarInteractions.concat(u.calendarInteractions),componentInteractions:l.componentInteractions.concat(u.componentInteractions),themeClasses:r(r({},l.themeClasses),u.themeClasses),eventSourceDefs:l.eventSourceDefs.concat(u.eventSourceDefs),cmdFormatter:u.cmdFormatter||l.cmdFormatter,recurringTypes:l.recurringTypes.concat(u.recurringTypes),namedTimeZonedImpl:u.namedTimeZonedImpl||l.namedTimeZonedImpl,initialView:l.initialView||u.initialView,elementDraggingImpl:l.elementDraggingImpl||u.elementDraggingImpl,optionChangeHandlers:r(r({},l.optionChangeHandlers),u.optionChangeHandlers),scrollGridImpl:u.scrollGridImpl||l.scrollGridImpl,contentTypeHandlers:r(r({},l.contentTypeHandlers),u.contentTypeHandlers),listenerRefiners:r(r({},l.listenerRefiners),u.listenerRefiners),optionRefiners:r(r({},l.optionRefiners),u.optionRefiners),propSetHandlers:r(r({},l.propSetHandlers),u.propSetHandlers)})}var l,u}return e&&o(e),o(t),i}(i,o)),t=i,n=o,e}}(),this.buildDateEnv=ot(Bi),this.buildTheme=ot(Ui),this.parseToolbars=ot(Ai),this.buildViewSpecs=ot(gi),this.buildDateProfileGenerator=st(zi),this.buildViewApi=ot(qi),this.buildViewUiProps=st(Gi),this.buildEventUiBySource=ot(Wi,je),this.buildEventUiBases=ot($i),this.parseContextBusinessHours=st(Ki),this.buildTitle=ot(Vi),this.emitter=new Tr,this.actionRunner=new Yi(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},i=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=i.calendarOptions.initialView||i.pluginHooks.initialView,s=this.computeCurrentViewData(o,i,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);var a,l,u,c=(a=i.calendarOptions,l=i.dateEnv,null!=(u=a.initialDate)?l.createMarker(u):Fn(a.now,l)),d=s.dateProfileGenerator.build(c);sn(d.activeRange,c)||(c=d.currentRange.start);for(var h={dateEnv:i.dateEnv,options:i.calendarOptions,pluginHooks:i.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p=0,f=i.pluginHooks.contextInit;p<f.length;p++)(0,f[p])(h);for(var m=function(e,t,n){var r=t?t.activeRange:null;return bi({},function(e,t){var n=Pn(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(var o=0,s=r;o<s.length;o++){var a=Rn(s[o],t,n);a&&i.push(a)}return i}(e,n),r,n)}(i.calendarOptions,d,h),g={dynamicOptionOverrides:n,currentViewType:o,currentDate:c,dateProfile:d,businessHours:this.parseContextBusinessHours(h),eventSources:m,eventUiBases:{},loadingLevel:_i(m),eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(h).selectionConfig},v=r(r({},h),g),y=0,_=i.pluginHooks.reducers;y<_.length;y++){var b=_[y];r(g,b(null,null,v))}g.loadingLevel&&this.emitter.trigger("loading",!0),this.state=g,this.updateData(),this.actionRunner.resume()}return e.prototype.resetOptions=function(e,t){var n=this.props;n.optionOverrides=t?r(r({},n.optionOverrides),e):e,this.actionRunner.request({type:"NOTHING"})},e.prototype._handleAction=function(e){var t=this.props,n=this.state,i=this.emitter,o=function(e,t){var n;return"SET_OPTION"===t.type?r(r({},e),((n={})[t.optionName]=t.rawOptionValue,n)):e}(n.dynamicOptionOverrides,e),s=this.computeOptionsData(t.optionOverrides,o,t.calendarApi),a=function(e,t){return"CHANGE_VIEW_TYPE"===t.type?t.viewType:e}(n.currentViewType,e),l=this.computeCurrentViewData(a,s,t.optionOverrides,o);t.calendarApi.currentDataManager=this,i.setThisContext(t.calendarApi),i.setOptions(l.options);var u={dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},c=n.currentDate,d=n.dateProfile;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(d=l.dateProfileGenerator.build(c)),d=function(e,t,n,r){var i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":if(!e.activeRange||!sn(e.currentRange,t.dateMarker))return r.build(t.dateMarker);break;case"PREV":if((i=r.buildPrev(e,n)).isValid)return i;break;case"NEXT":if((i=r.buildNext(e,n)).isValid)return i}return e}(d,e,c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),l.dateProfileGenerator),sn(d.currentRange,c)||(c=d.currentRange.start);for(var h=function(e,t,n,i){var o,s,a=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return bi(e,t.sources,a,i);case"REMOVE_EVENT_SOURCE":return o=e,s=t.sourceId,Ne(o,(function(e){return e.sourceId!==s}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?wi(e,a,i):e;case"FETCH_EVENT_SOURCES":return xi(e,t.sourceIds?Pe(t.sourceIds):Si(e,i),a,i);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,i){var o,s=e[t];return s&&n===s.latestFetchId?r(r({},e),((o={})[t]=r(r({},s),{isFetching:!1,fetchRange:i}),o)):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}(n.eventSources,e,d,u),p=_i(h),f=function(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,o){if(t&&n===t.latestFetchId){var s=It(function(e,t,n){var r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Wr(e,i)),r&&(e=Wr(e,r)),e}(i,t,o),t,o);return r&&(s=Ue(s,r,o)),Nt($r(e,t.sourceId),s)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=Ue(t,n,r)),Nt(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"MERGE_EVENTS":return Nt(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Ue(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,i={},o={};for(var s in n)t.defs[s]||(i[s]=n[s]);for(var a in r)!t.instances[a]&&i[r[a].defId]&&(o[a]=r[a]);return{defs:i,instances:o}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return $r(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Rt(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,h,d,u),m=p&&!l.options.progressiveEventRendering&&n.renderableEventStore||f,g=this.buildViewUiProps(u),v=g.eventUiSingleBase,y=g.selectionConfig,_=this.buildEventUiBySource(h),b=this.buildEventUiBases(m.defs,v,_),w=n.loadingLevel||0,x=p,k={dynamicOptionOverrides:o,currentViewType:a,currentDate:c,dateProfile:d,eventSources:h,eventStore:f,renderableEventStore:m,selectionConfig:y,eventUiBases:b,loadingLevel:x,businessHours:this.parseContextBusinessHours(u),dateSelection:Ei(n.dateSelection,e),eventSelection:Di(n.eventSelection,e),eventDrag:Ci(n.eventDrag,e),eventResize:Mi(n.eventResize,e)},S=r(r({},u),k),T=0,E=s.pluginHooks.reducers;T<E.length;T++){var D=E[T];r(k,D(n,e,S))}!w&&x?i.trigger("loading",!0):w&&!x&&i.trigger("loading",!1),this.state=k,t.onAction&&t.onAction(e)},e.prototype.updateData=function(){var e,t,n,i,o,s,a,l,u,c=this.props,d=this.state,h=this.data,p=this.computeOptionsData(c.optionOverrides,d.dynamicOptionOverrides,c.calendarApi),f=this.computeCurrentViewData(d.currentViewType,p,c.optionOverrides,d.dynamicOptionOverrides),m=this.data=r(r(r({viewTitle:this.buildTitle(d.dateProfile,f.options,p.dateEnv),calendarApi:c.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p),f),d),g=p.pluginHooks.optionChangeHandlers,v=h&&h.calendarOptions,y=p.calendarOptions;if(v&&v!==y)for(var _ in v.timeZone!==y.timeZone&&(d.eventSources=m.eventSources=(s=m.eventSources,l=m,u=(a=d.dateProfile)?a.activeRange:null,xi(s,Si(s,l),u,l)),d.eventStore=m.eventStore=(e=m.eventStore,t=h.dateEnv,n=m.dateEnv,i=e.defs,o=Re(e.instances,(function(e){var o=i[e.defId];return o.allDay||o.recurringDef?e:r(r({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})})),{defs:i,instances:o})),g)v[_]!==y[_]&&g[_](y[_],m);c.onData&&c.onData(m)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),i=r.refinedOptions,o=r.pluginHooks,s=r.localeDefaults,a=r.availableLocaleData;Zi(r.extra);var l=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,o,a,i.defaultRangeSeparator),u=this.buildViewSpecs(o.views,e,t,s),c=this.buildTheme(i,o);return{calendarOptions:i,pluginHooks:o,dateEnv:l,viewSpecs:u,theme:c,toolbarConfig:this.parseToolbars(i,e,c,u,n),localeDefaults:s,availableRawLocales:a.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=Ct([xt,e,t]),i=n.locales,o=n.locale,s=this.organizeRawLocales(i),a=s.map,l=this.buildLocale(o||s.defaultCode,a).options,u=this.buildPluginHooks(e.plugins||[],Ri),c=this.currentCalendarOptionsRefiners=r(r(r(r(r({},wt),kt),St),u.listenerRefiners),u.optionRefiners),d={},h=Ct([xt,l,e,t]),p={},f=this.currentCalendarOptionsInput,m=this.currentCalendarOptionsRefined,g=!1;for(var v in h)"plugins"!==v&&(h[v]===f[v]||Tt[v]&&v in f&&Tt[v](f[v],h[v])?p[v]=m[v]:c[v]?(p[v]=c[v](h[v]),g=!0):d[v]=f[v]);return g&&(this.currentCalendarOptionsInput=h,this.currentCalendarOptionsRefined=p),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:u,availableLocaleData:s,localeDefaults:l,extra:d}},e.prototype._computeCurrentViewData=function(e,t,n,r){var i=t.viewSpecs[e];if(!i)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var o=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r),s=o.refinedOptions;return Zi(o.extra),{viewSpec:i,options:s,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:s.slotMinTime,slotMaxTime:s.slotMaxTime,showNonCurrentDates:s.showNonCurrentDates,dayCount:s.dayCount,dateAlignment:s.dateAlignment,dateIncrement:s.dateIncrement,hiddenDays:s.hiddenDays,weekends:s.weekends,nowInput:s.now,validRangeInput:s.validRange,visibleRangeInput:s.visibleRange,monthMode:s.monthMode,fixedWeekCount:s.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,i,o){var s=Ct([xt,e.optionDefaults,n,i,e.optionOverrides,o]),a=r(r(r(r(r(r({},wt),kt),St),Dt),t.listenerRefiners),t.optionRefiners),l={},u=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,h={};for(var p in s)s[p]===u[p]?l[p]=c[p]:(s[p]===this.currentCalendarOptionsInput[p]?p in this.currentCalendarOptionsRefined&&(l[p]=this.currentCalendarOptionsRefined[p]):a[p]?l[p]=a[p](s[p]):h[p]=s[p],d=!0);return d&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:h}},e}();function Bi(e,t,n,r,i,o,s,a){var l=Xn(t||s.defaultCode,s.map);return new $n({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:o.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:o.cmdFormatter,defaultSeparator:a})}function Ui(e,t){return new(t.themeClasses[e.themeSystem]||ri)(e)}function zi(e){return new(e.dateProfileGeneratorClass||yi)(e)}function qi(e,t,n){return new On(e,t,n)}function Wi(e){return Re(e,(function(e){return e.ui}))}function $i(e,t,n){var r={"":t};for(var i in e){var o=e[i];o.sourceId&&n[o.sourceId]&&(r[i]=n[o.sourceId])}return r}function Gi(e){var t=e.options;return{eventUiSingleBase:jt({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:jt({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function Ki(e){return nr(e.options.businessHours,e)}function Zi(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var Xi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleData=function(e){n.dataManager?n.setState(e):n.state=e},n.dataManager=new Hi({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return n(t,e),t.prototype.render=function(){return this.props.children(this.state)},t.prototype.componentDidUpdate=function(e){var t=this.props.optionOverrides;t!==e.optionOverrides&&this.dataManager.resetOptions(t)},t}(Ir),Ji=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();function Qi(e){var t;return(t={})[e.component.uid]=e,t}var eo={},to=function(){function e(e,t){this.emitter=new Tr}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),no={},ro={startTime:$e,duration:$e,create:Boolean,sourceId:String};function io(e){var t=Mt(e,ro),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,i=n.extraClassName,o=!1,s=r.center;return r.left?(o=!0,e=r.left):e=r.start,r.right?(o=!0,t=r.right):t=r.end,Lr("div",{className:[i||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Lr(so,{key:e,widgetGroups:t,title:n.title,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled})},t}(Br),so=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return Lr.apply(void 0,i(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,o=[],s=!0,a=0,l=e;a<l.length;a++){var u=l[a],c=u.buttonName,d=u.buttonClick,h=u.buttonText,p=u.buttonIcon;if("title"===c)s=!1,o.push(Lr("h2",{className:"fc-toolbar-title"},t.title));else{var f=p?{"aria-label":c}:{},m=["fc-"+c+"-button",n.getClass("button")];c===t.activeButton&&m.push(n.getClass("buttonActive"));var g=!t.isTodayEnabled&&"today"===c||!t.isPrevEnabled&&"prev"===c||!t.isNextEnabled&&"next"===c;o.push(Lr("button",r({disabled:g,className:m.join(" "),onClick:d,type:"button"},f),h||(p?Lr("span",{className:p}):"")))}}if(o.length>1){var v=s&&n.getClass("buttonGroup")||"";return Lr.apply(void 0,i(["div",{className:v}],o))}return o[0]},t}(Br),ao=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,qr(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",o="";return n?null!==t.availableWidth?i=t.availableWidth/n:o=1/n*100+"%":i=e.height||"",Lr("div",{ref:this.handleEl,onClick:e.onClick,className:r.join(" "),style:{height:i,paddingBottom:o}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(Br),lo=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,i=r.context,o=cn(t);if(o&&r.isValidSegDownEl(e.target)){var s=V(e.target,".fc-event-forced-url"),a=s?s.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:t,event:new Yn(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:i.viewApi}),a&&!e.defaultPrevented&&(window.location.href=a)}},n.destroy=G(t.el,"click",".fc-event",n.handleSegClick),n}return n(t,e),t}(Ji),uo=function(e){function t(t){var n,r,i,o,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){cn(t)&&(s.currentSegEl=t,s.triggerEvent("eventMouseEnter",e,t))},s.handleSegLeave=function(e,t){s.currentSegEl&&(s.currentSegEl=null,s.triggerEvent("eventMouseLeave",e,t))},s.removeHoverListeners=(n=t.el,".fc-event",r=s.handleSegEnter,i=s.handleSegLeave,G(n,"mouseover",".fc-event",(function(e,t){if(t!==o){o=t,r(e,t);var n=function(e){o=null,i(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return n(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,i=r.context,o=cn(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Yn(i,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:i.viewApi})},t}(Ji),co=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=ot(Vr),t.buildViewPropTransformers=ot(po),t.buildToolbarProps=ot(ho),t.handleNavLinkClick=$("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Nr(),t.footerRef=Nr(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter}}(e,n),i=[lo,uo].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=i,eo[e.uid]=r},t.unregisterInteractiveComponent=function(e){for(var n=0,r=t.interactionsStore[e.uid];n<r.length;n++)r[n].destroy();delete t.interactionsStore[e.uid],delete eo[e.uid]},t.resizeRunner=new ji((function(){t.props.emitter.trigger("_resize",!0),t.props.emitter.trigger("windowResize",{view:t.props.viewApi})})),t.handleWindowResize=function(e){var n=t.props.options;n.handleWindowResize&&e.target===window&&t.resizeRunner.request(n.windowResizeDelay)},t}return n(t,e),t.prototype.render=function(){var e,t=this.props,n=t.toolbarConfig,i=t.options,o=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Fn(t.options.now,t.dateEnv),t.viewTitle),s=!1,a="";t.isHeightAuto||t.forPrint?a="":null!=i.height?s=!0:null!=i.contentHeight?a=i.contentHeight:e=Math.max(i.aspectRatio,.5);var l=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent);return Lr(Yr.Provider,{value:l},n.headerToolbar&&Lr(oo,r({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.headerToolbar},o)),Lr(ao,{liquid:s,height:a,aspectRatio:e,onClick:this.handleNavLinkClick},this.renderView(t),this.buildAppendContent()),n.footerToolbar&&Lr(oo,r({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footerToolbar},o)))},t.prototype.componentDidMount=function(){var e=this.props;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((function(t){return new t(e)})),window.addEventListener("resize",this.handleWindowResize);var t=e.pluginHooks.propSetHandlers;for(var n in t)t[n](e[n],e)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.pluginHooks.propSetHandlers;for(var r in n)t[r]!==e[r]&&n[r](t[r],t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(var e=0,t=this.calendarInteractions;e<t.length;e++)t[e].destroy();this.props.emitter.trigger("_unmount")},t.prototype._handleNavLinkClick=function(e,t){var n=this.props,r=n.dateEnv,i=n.options,o=n.calendarApi,s=t.getAttribute("data-navlink");s=s?JSON.parse(s):{};var a=r.createMarker(s.date),l=s.type,u="day"===l?i.navLinkDayClick:"week"===l?i.navLinkWeekClick:null;"function"==typeof u?u.call(o,r.toDate(a),e):("string"==typeof u&&(l=u),o.zoomTo(a,l))},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return Lr.apply(void 0,i([Rr,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,i={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},o=0,s=this.buildViewPropTransformers(t.viewPropsTransformers);o<s.length;o++){var a=s[o];r(i,a.transform(i,e))}var l=n.component;return Lr(l,r({},i))},t}(Hr);function ho(e,t,n,r,i,o){var s=n.build(i,void 0,!1),a=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:o,activeButton:e.type,isTodayEnabled:s.isValid&&!sn(t.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function po(e){return e.map((function(e){return new e}))}var fo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={forPrint:!1},t.handleBeforePrint=function(){t.setState({forPrint:!0})},t.handleAfterPrint=function(){t.setState({forPrint:!1})},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.options,n=this.state.forPrint,r=n||"auto"===t.height||"auto"===t.contentHeight,i=r||null==t.height?"":t.height,o=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return lr()||o.push("fc-liquid-hack"),e.children(o,i,r,n)},t.prototype.componentDidMount=function(){var e=this.props.emitter;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)},t.prototype.componentWillUnmount=function(){var e=this.props.emitter;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)},t}(Br);function mo(e,t){return bt(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var go="fc-col-header-cell",vo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,i=e.theme,o=e.viewApi,s=this.props,a=s.date,l=s.dateProfile,u=hr(a,s.todayRange,null,l),c=[go].concat(pr(u,i)),d=t.format(a,s.dayHeaderFormat),h=n.navLinks&&!u.isDisabled&&s.colCnt>1?{"data-navlink":fr(a),tabIndex:0}:{},p=r(r(r({date:t.toDate(a),view:o},s.extraHookProps),{text:d}),u);return Lr(oi,{hookProps:p,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:_o,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,i){return Lr("th",r({ref:e,className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:tt(a),colSpan:s.colSpan},s.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Lr("a",r({ref:n,className:["fc-col-header-cell-cushion",s.isSticky?"fc-sticky":""].join(" ")},h),i)))}))},t}(Br),yo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,i=t.theme,o=t.viewApi,s=t.options,a=me(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[go].concat(pr(l,i),e.extraClassNames||[]),c=n.format(a,e.dayHeaderFormat),d=r(r(r(r({date:a},l),{view:o}),e.extraHookProps),{text:c});return Lr(oi,{hookProps:d,classNames:s.dayHeaderClassNames,content:s.dayHeaderContent,defaultContent:_o,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},(function(t,n,i,o){return Lr("th",r({ref:t,className:u.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},Lr("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:i},o)))}))},t}(Br);function _o(e){return e.text}var bo=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Fn(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=ge(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,$e(1,e.unit)),o=i.valueOf()-n.valueOf();return{currentState:{nowDate:r,todayRange:wo(r)},nextState:{nowDate:i,todayRange:wo(i)},waitMs:o}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=Yr,t}(Ir);function wo(e){var t=xe(e);return{start:t,end:me(t,1)}}var xo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=ot(ko),t}return n(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,i=t.datesRepDistinctDays,o=t.renderIntro,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return Lr(bo,{unit:"day"},(function(e,t){return Lr("tr",null,o&&o(),n.map((function(e){return i?Lr(vo,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:s}):Lr(yo,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s})})))}))},t}(Br);function ko(e,t,n){return e||mo(t,n)}var So=function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],s=-1;n<r;)t.isHiddenDay(n)?i.push(s+.5):(s++,i.push(s),o.push(n)),n=me(n,1);this.dates=o,this.indices=i,this.cnt=o.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(me(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(i=Math.floor(i))?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null},e.prototype.getDateDayIndex=function(e){var t=this.indices,n=Math.floor(ye(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},e}(),To=function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;n<o.length&&o[n].getUTCDay()!==r;n++);i=Math.ceil(o.length/n)}else i=1,n=o.length;this.rowCnt=i,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}return e.prototype.buildCells=function(){for(var e=[],t=0;t<this.rowCnt;t++){for(var n=[],r=0;r<this.colCnt;r++)n.push(this.buildCell(t,r));e.push(n)}return e},e.prototype.buildCell=function(e,t){var n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}},e.prototype.buildHeaderDates=function(){for(var e=[],t=0;t<this.colCnt;t++)e.push(this.cells[0][t].date);return e},e.prototype.sliceRange=function(e){var t=this.colCnt,n=this.daySeries.sliceRange(e),r=[];if(n)for(var i=n.firstIndex,o=n.lastIndex,s=i;s<=o;){var a=Math.floor(s/t),l=Math.min((a+1)*t,o+1);r.push({row:a,firstCol:s%t,lastCol:(l-1)%t,isStart:n.isStart&&s===i,isEnd:n.isEnd&&l-1===o}),s=l}return r},e}(),Eo=function(){function e(){this.sliceBusinessHours=ot(this._sliceBusinessHours),this.sliceDateSelection=ot(this._sliceDateSpan),this.sliceEventStore=ot(this._sliceEventStore),this.sliceEventDrag=ot(this._sliceInteraction),this.sliceEventResize=ot(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];var a=e.eventUiBases,l=this.sliceEventStore.apply(this,i([e.eventStore,a,t,n],o));return{dateSelectionSegs:this.sliceDateSelection.apply(this,i([e.dateSelection,a,r],o)),businessHourSegs:this.sliceBusinessHours.apply(this,i([e.businessHours,t,n,r],o)),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag.apply(this,i([e.eventDrag,a,t,n],o)),eventResize:this.sliceEventResize.apply(this,i([e.eventResize,a,t,n],o)),eventSelection:e.eventSelection}},e.prototype.sliceNowDate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this._sliceDateSpan.apply(this,i([{range:{start:e,end:ge(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];return e?this._sliceEventStore.apply(this,i([Ue(e,Do(t,Boolean(n)),r),{},t,n],o)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(e){var s=an(e,t,Do(n,Boolean(r)),r);return{bg:this.sliceEventRanges(s.bg,i),fg:this.sliceEventRanges(s.fg,i)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(!e)return null;var s=an(e.mutatedEvents,t,Do(n,Boolean(r)),r);return{segs:this.sliceEventRanges(s.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];if(!e)return[];for(var s=function(e,t,n){var r=Wt({editable:!1},n),i=Gt(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:hn(i,t),instance:Ie(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e,t,n),a=this.sliceRange.apply(this,i([e.range],r)),l=0,u=a;l<u.length;l++){u[l].eventRange=s}return a},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.sliceEventRange(o,t))}return n},e.prototype.sliceEventRange=function(e,t){var n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:me(n.start,1)});for(var r=this.sliceRange.apply(this,i([n],t)),o=0,s=r;o<s.length;o++){var a=s[o];a.eventRange=e,a.isStart=e.isStart&&a.isStart,a.isEnd=e.isEnd&&a.isEnd}return r},e}();function Do(e,t){var n=e.activeRange;return t?n:{start:ge(n.start,e.slotMinTime.milliseconds),end:ge(n.end,e.slotMaxTime.milliseconds-864e5)}}var Co=/^(visible|hidden)$/,Mo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.liquid,n=e.liquidIsAbsolute,r=t&&n,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),Lr("div",{ref:this.handleEl,className:i.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)},t.prototype.needsXScrolling=function(){if(Co.test(this.props.overflowX))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),n=e.children,r=0;r<n.length;r++)if(n[r].getBoundingClientRect().width>t)return!0;return!1},t.prototype.needsYScrolling=function(){if(Co.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;r<n.length;r++)if(n[r].getBoundingClientRect().height>t)return!0;return!1},t.prototype.getXScrollbarWidth=function(){return Co.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Co.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(Br),Ao=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,i=r.depths,o=r.currentMap,s=!1,a=!1;null!==e?(s=n in o,o[n]=e,i[n]=(i[n]||0)+1,a=!0):0==--i[n]&&(delete o[n],delete t.callbackMap[n],s=!0),t.masterCallback&&(s&&t.masterCallback(null,String(n)),a&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return Be(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Fe(this.currentMap)},e}();function Io(e){for(var t=0,n=0,r=B(e,".fc-scrollgrid-shrink");n<r.length;n++){var i=r[n];t=Math.max(t,he(i))}return Math.ceil(t)}function Lo(e,t){return e.liquid&&t.liquid}function Oo(e,t){return null!=t.maxHeight||Lo(e,t)}function No(e,t,n){var r=n.expandRows;return"function"==typeof t.content?t.content(n):Lr("table",{className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:r?n.clientHeight:""}},n.tableColGroupNode,Lr("tbody",{},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function Ro(e,t){return it(e,t,je)}function Po(e,t){for(var n=[],r=0,o=e;r<o.length;r++)for(var s=o[r],a=s.span||1,l=0;l<a;l++)n.push(Lr("col",{style:{width:"shrink"===s.width?Fo(t):s.width||"",minWidth:s.minWidth||""}}));return Lr.apply(void 0,i(["colgroup",{}],n))}function Fo(e){return null==e?4:e}function jo(e){for(var t=0,n=e;t<n.length;t++)if("shrink"===n[t].width)return!0;return!1}function Yo(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function Vo(e,t){var n=["fc-scrollgrid-section","fc-scrollgrid-section-"+e.type,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function Ho(e){return Lr("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Bo(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Uo(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=ot((function(e){return e}),Ro),t.renderMicroColGroup=ot(Po),t.scrollerRefs=new Ao,t.scrollerElRefs=new Ao(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.setState(r({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return n(t,e),t.prototype.render=function(){for(var e,t=this.props,n=this.state,r=this.context,o=t.sections||[],s=this.processCols(t.cols),a=this.renderMicroColGroup(s,n.shrinkWidth),l=Yo(t.liquid,r),u=o.length,c=0,d=[],h=[],p=[];c<u&&"header"===(e=o[c]).type;)d.push(this.renderSection(e,c,a)),c++;for(;c<u&&"body"===(e=o[c]).type;)h.push(this.renderSection(e,c,a)),c++;for(;c<u&&"footer"===(e=o[c]).type;)p.push(this.renderSection(e,c,a)),c++;var f=!lr();return Lr("table",{className:l.join(" "),style:{height:t.height}},Boolean(!f&&d.length)&&Lr.apply(void 0,i(["thead",{}],d)),Boolean(!f&&h.length)&&Lr.apply(void 0,i(["tbody",{}],h)),Boolean(!f&&p.length)&&Lr.apply(void 0,i(["tfoot",{}],p)),f&&Lr.apply(void 0,i(["tbody",{}],d,h,p)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?Lr(Rr,{key:e.key},e.outerContent):Lr("tr",{key:e.key,className:Vo(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,n,e.chunk))},t.prototype.renderChunkTd=function(e,t,n,r){if("outerContent"in r)return r.outerContent;var i=this.props,o=this.state,s=o.forceYScrollbars,a=o.scrollerClientWidths,l=o.scrollerClientHeights,u=Oo(i,e),c=Lo(i,e),d=i.liquid?s?"scroll":u?"auto":"hidden":"visible",h=No(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:void 0!==a[t]?a[t]:null,clientHeight:void 0!==l[t]?l[t]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}});return Lr("td",{ref:r.elRef},Lr("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},Lr(Mo,{ref:this.scrollerRefs.createRef(t),elRef:this.scrollerElRefs.createRef(t),overflowY:d,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},h)))},t.prototype._handleScrollerEl=function(e,t){var n=parseInt(t,10);qr(this.props.sections[n].chunk.scrollerElRef,e)},t.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},t.prototype.componentDidUpdate=function(){this.handleSizing()},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},t.prototype.computeShrinkWidth=function(){return jo(this.props.cols)?Io(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){for(var e=yr(),t=this.props.sections.length,n=this.scrollerRefs,r=this.scrollerElRefs,i=!1,o={},s={},a=0;a<t;a++){var l=n.currentMap[a];if(l&&l.needsYScrolling()){i=!0;break}}for(a=0;a<t;a++){var u=r.currentMap[a];if(u){var c=u.parentNode;o[a]=Math.floor(c.getBoundingClientRect().width-(i?e.y:0)),s[a]=Math.floor(c.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:o,scrollerClientHeights:s}},t}(Br);zo.addStateEquality({scrollerClientWidths:je,scrollerClientHeights:je});var qo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,i=r.eventRange,o=i.ui,s={event:new Yn(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&mn(r,t),isStartResizable:!e.disableResizing&&gn(r,t),isEndResizable:!e.disableResizing&&vn(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)},a=bn(s).concat(o.classNames);return Lr(oi,{hookProps:s,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,i){return e.children(t,a.concat(n),r,i,s)}))},t.prototype.componentDidMount=function(){un(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&un(this.elRef.current,t)},t}(Br),Wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,i=t.options.eventTimeFormat||e.defaultTimeFormat,o=yn(n,i,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Lr(qo,{seg:n,timeText:o,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||$o,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,i,o,s,a){return Lr("a",r({className:e.extraClassNames.concat(i).join(" "),style:{borderColor:a.borderColor,backgroundColor:a.backgroundColor},ref:t},function(e){var t=e.eventRange.def.url;return t?{href:t}:{}}(n)),Lr("div",{className:"fc-event-main",ref:o,style:{color:a.textColor}},s),a.isStartResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-start"}),a.isEndResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(Br);function $o(e){return Lr("div",{className:"fc-event-main-frame"},e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title-container"},Lr("div",{className:"fc-event-title fc-sticky"},e.event.title||Lr(Rr,null,"\xa0"))))}var Go=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return Lr(oi,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},Ko=bt({day:"numeric"}),Zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=st(Jo),t.normalizeClassNames=ci(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=this.refineHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv}),i=pr(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),o=r.isDisabled?{}:{"data-date":tt(e.date)};return Lr(ui,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,i,o,r.isDisabled)}))},t}(Br),Xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=Jo({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return Lr(ai,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(Br);function Jo(e){var t=e.date,n=e.dateEnv,i=hr(t,e.todayRange,null,e.dateProfile);return r(r(r({date:n.toDate(t),view:e.viewApi},i),{dayNumberText:e.showDayNumber?n.format(t,Ko):""}),e.extraProps)}function Qo(e){return Lr("div",{className:"fc-"+e})}var es=function(e){return Lr(qo,{defaultContent:ts,seg:e.seg,timeText:"",disableDragging:!0,disableResizing:!0,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(e,t,n,r,i){return Lr("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:i.backgroundColor}},r)}))};function ts(e){return e.event.title&&Lr("div",{className:"fc-event-title"},e.event.title)}var ns=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,i=e.date,o=r.weekNumberFormat||e.defaultFormat,s=n.computeWeekNumber(i),a=n.format(i,o);return Lr(oi,{hookProps:{num:s,text:a,date:i},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:rs,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function rs(e){return e.text}var is=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this)||this;return i.isRendering=!1,i.isRendered=!1,i.currentClassNames=[],i.customContentRenderId=0,i.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":i.renderRunner.tryDrain()}},i.handleData=function(e){i.currentData=e,i.renderRunner.request(e.calendarOptions.rerenderDelay)},i.handleRenderRequest=function(){if(i.isRendering){i.isRendered=!0;var e=i.currentData;Or(Lr(fo,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,o,s){return i.setClassNames(t),i.setHeight(n),Lr(si.Provider,{value:i.customContentRenderId},Lr(co,r({isHeightAuto:o,forPrint:s},e)))})),i.el)}else i.isRendered&&(i.isRendered=!1,Or(null,i.el),i.setClassNames([]),i.setHeight(""));Fr()},i.el=t,i.renderRunner=new ji(i.handleRenderRequest),new Hi({optionOverrides:n,calendarApi:i,onAction:i.handleAction,onData:i.handleData}),i}return n(t,e),Object.defineProperty(t.prototype,"view",{get:function(){return this.currentData.viewApi},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.isRendering;e?this.customContentRenderId++:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()},t.prototype.destroy=function(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())},t.prototype.updateSize=function(){e.prototype.updateSize.call(this),Fr()},t.prototype.batchRendering=function(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")},t.prototype.pauseRendering=function(){this.renderRunner.pause("pauseRendering")},t.prototype.resumeRendering=function(){this.renderRunner.resume("pauseRendering",!0)},t.prototype.resetOptions=function(e,t){this.currentDataManager.resetOptions(e,t)},t.prototype.setClassNames=function(e){if(!it(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n<r.length;n++){var i=r[n];t.remove(i)}for(var o=0,s=e;o<s.length;o++)i=s[o],t.add(i);this.currentClassNames=e}},t.prototype.setHeight=function(e){q(this.el,"height",e)},t}(jn);no.touchMouseIgnoreWait=500;var os=0,ss=0,as=!1,ls=function(){function e(e){var t=this;this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(e){if(!t.shouldIgnoreMouse()&&function(e){return 0===e.button&&!e.ctrlKey}(e)&&t.tryStart(e)){var n=t.createEventFromMouse(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n),t.shouldIgnoreMove||document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp)}},this.handleMouseMove=function(e){var n=t.createEventFromMouse(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleMouseUp=function(e){document.removeEventListener("mousemove",t.handleMouseMove),document.removeEventListener("mouseup",t.handleMouseUp),t.emitter.trigger("pointerup",t.createEventFromMouse(e)),t.cleanup()},this.handleTouchStart=function(e){if(t.tryStart(e)){t.isTouchDragging=!0;var n=t.createEventFromTouch(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n);var r=e.target;t.shouldIgnoreMove||r.addEventListener("touchmove",t.handleTouchMove),r.addEventListener("touchend",t.handleTouchEnd),r.addEventListener("touchcancel",t.handleTouchEnd),window.addEventListener("scroll",t.handleTouchScroll,!0)}},this.handleTouchMove=function(e){var n=t.createEventFromTouch(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleTouchEnd=function(e){if(t.isDragging){var n=e.target;n.removeEventListener("touchmove",t.handleTouchMove),n.removeEventListener("touchend",t.handleTouchEnd),n.removeEventListener("touchcancel",t.handleTouchEnd),window.removeEventListener("scroll",t.handleTouchScroll,!0),t.emitter.trigger("pointerup",t.createEventFromTouch(e)),t.cleanup(),t.isTouchDragging=!1,os++,setTimeout((function(){os--}),no.touchMouseIgnoreWait)}},this.handleTouchScroll=function(){t.wasTouchScroll=!0},this.handleScroll=function(e){if(!t.shouldIgnoreMove){var n=window.pageXOffset-t.prevScrollX+t.prevPageX,r=window.pageYOffset-t.prevScrollY+t.prevPageY;t.emitter.trigger("pointermove",{origEvent:e,isTouch:t.isTouchDragging,subjectEl:t.subjectEl,pageX:n,pageY:r,deltaX:n-t.origPageX,deltaY:r-t.origPageY})}},this.containerEl=e,this.emitter=new Tr,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),ss++||window.addEventListener("touchmove",us,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),--ss||window.removeEventListener("touchmove",us,{passive:!1})},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!V(n,this.handleSelector)||(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,0))},e.prototype.cleanup=function(){as=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?V(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return os||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(as=!0)},e.prototype.initScrollWatch=function(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))},e.prototype.recordCoords=function(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},e.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},e.prototype.createEventFromMouse=function(e,t){var n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}},e.prototype.createEventFromTouch=function(e,t){var n,r,i=e.touches,o=0,s=0;return i&&i.length?(n=i[0].pageX,r=i[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(o=n-this.origPageX,s=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:o,deltaY:s}},e}();function us(e){as&&e.preventDefault()}var cs=function(){function e(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return e.prototype.start=function(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},e.prototype.handleMove=function(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()},e.prototype.setIsVisible=function(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)},e.prototype.stop=function(e,t){var n=this,r=function(){n.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)},e.prototype.doRevertAnimation=function(e,t){var n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",z(n,{left:r.left,top:r.top}),Z(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(Y(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&z(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},e.prototype.getMirrorEl=function(){var e=this.sourceElRect,t=this.mirrorEl;return t||((t=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),t.classList.add("fc-event-dragging"),z(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t},e}(),ds=function(e){function t(t,n){var r=e.call(this)||this;return r.handleScroll=function(){r.scrollTop=r.scrollController.getScrollTop(),r.scrollLeft=r.scrollController.getScrollLeft(),r.handleScrollChange()},r.scrollController=t,r.doesListening=n,r.scrollTop=r.origScrollTop=t.getScrollTop(),r.scrollLeft=r.origScrollLeft=t.getScrollLeft(),r.scrollWidth=t.getScrollWidth(),r.scrollHeight=t.getScrollHeight(),r.clientWidth=t.getClientWidth(),r.clientHeight=t.getClientHeight(),r.clientRect=r.computeClientRect(),r.doesListening&&r.getEventTarget().addEventListener("scroll",r.handleScroll),r}return n(t,e),t.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollTop=function(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())},t.prototype.setScrollLeft=function(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())},t.prototype.getClientWidth=function(){return this.clientWidth},t.prototype.getClientHeight=function(){return this.clientHeight},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.handleScrollChange=function(){},t}(Dr),hs=function(e){function t(t,n){return e.call(this,new Cr(t),n)||this}return n(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return wr(this.scrollController.el)},t}(ds),ps=function(e){function t(t){return e.call(this,new Mr,t)||this}return n(t,e),t.prototype.getEventTarget=function(){return window},t.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},t.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},t}(ds),fs="function"==typeof performance?performance.now:Date.now,ms=function(){function e(){var e=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(e.isAnimating){var t=e.computeBestEdge(e.pointerScreenX+window.pageXOffset,e.pointerScreenY+window.pageYOffset);if(t){var n=fs();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t){this.isEnabled&&(this.scrollCaches=this.buildCaches(),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))},e.prototype.handleMove=function(e,t){if(this.isEnabled){var n=e-window.pageXOffset,r=t-window.pageYOffset,i=null===this.pointerScreenY?0:r-this.pointerScreenY,o=null===this.pointerScreenX?0:n-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(fs()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e<t.length;e++)t[e].destroy();this.scrollCaches=null}},e.prototype.requestAnimation=function(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)},e.prototype.handleSide=function(e,t){var n=e.scrollCache,r=this.edgeThreshold,i=r-e.distance,o=i*i/(r*r)*this.maxVelocity*t,s=1;switch(e.name){case"left":s=-1;case"right":n.setScrollLeft(n.getScrollLeft()+o*s);break;case"top":s=-1;case"bottom":n.setScrollTop(n.getScrollTop()+o*s)}},e.prototype.computeBestEdge=function(e,t){for(var n=this.edgeThreshold,r=null,i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i],a=s.clientRect,l=e-a.left,u=a.right-e,c=t-a.top,d=a.bottom-t;l>=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&s.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:s,name:"top",distance:c}),d<=n&&this.everMovedDown&&s.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:s,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&s.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:s,name:"left",distance:l}),u<=n&&this.everMovedRight&&s.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:s,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map((function(e){return e===window?new ps(!1):new hs(e,!1)}))},e.prototype.queryScrollEls=function(){for(var e=[],t=0,n=this.scrollQuery;t<n.length;t++){var r=n[t];"object"==typeof r?e.push(r):e.push.apply(e,Array.prototype.slice.call(document.querySelectorAll(r)))}return e},e}(),gs=function(e){function t(t,n){var r=e.call(this,t)||this;r.delay=null,r.minDistance=0,r.touchScrollAllowed=!0,r.mirrorNeedsRevert=!1,r.isInteracting=!1,r.isDragging=!1,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,r.delayTimeoutId=null,r.onPointerDown=function(e){r.isDragging||(r.isInteracting=!0,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,te(document.body),re(document.body),e.isTouch||e.origEvent.preventDefault(),r.emitter.trigger("pointerdown",e),r.isInteracting&&!r.pointer.shouldIgnoreMove&&(r.mirror.setIsVisible(!1),r.mirror.start(e.subjectEl,e.pageX,e.pageY),r.startDelay(e),r.minDistance||r.handleDistanceSurpassed(e)))},r.onPointerMove=function(e){if(r.isInteracting){if(r.emitter.trigger("pointermove",e),!r.isDistanceSurpassed){var t=r.minDistance,n=e.deltaX,i=e.deltaY;n*n+i*i>=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,ne(document.body),ie(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var i=r.pointer=new ls(t);return i.emitter.on("pointerdown",r.onPointerDown),i.emitter.on("pointermove",r.onPointerMove),i.emitter.on("pointerup",r.onPointerUp),n&&(i.selector=n),r.mirror=new cs,r.autoScroller=new ms,r}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(to),vs=function(){function e(e){this.origRect=xr(e),this.scrollCaches=kr(e).map((function(e){return new hs(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e<t.length;e++)t[e].destroy()},e.prototype.computeLeft=function(){for(var e=this.origRect.left,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollLeft-r.getScrollLeft()}return e},e.prototype.computeTop=function(){for(var e=this.origRect.top,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollTop-r.getScrollTop()}return e},e.prototype.isWithinClipping=function(e,t){for(var n,r={left:e,top:t},i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i];if(void 0,"HTML"!==(n=s.getEventTarget().tagName)&&"BODY"!==n&&!rr(r,s.clientRect))return!1}return!0},e}(),ys=function(){function e(e,t){var n=this;this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=function(e){var t=n.dragging;n.initialHit=null,n.movingHit=null,n.finalHit=null,n.prepareHits(),n.processFirstCoord(e),n.initialHit||!n.requireInitial?(t.setIgnoreMove(!1),n.emitter.trigger("pointerdown",e)):t.setIgnoreMove(!0)},this.handleDragStart=function(e){n.emitter.trigger("dragstart",e),n.handleMove(e,!0)},this.handleDragMove=function(e){n.emitter.trigger("dragmove",e),n.handleMove(e)},this.handlePointerUp=function(e){n.releaseHits(),n.emitter.trigger("pointerup",e)},this.handleDragEnd=function(e){n.movingHit&&n.emitter.trigger("hitupdate",null,!0,e),n.finalHit=n.movingHit,n.movingHit=null,n.emitter.trigger("dragend",e)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Tr}return e.prototype.processFirstCoord=function(e){var t,n={left:e.pageX,top:e.pageY},r=n,i=e.subjectEl;i!==document&&(r=or(r,t=xr(i)));var o=this.initialHit=this.queryHitForOffset(r.left,r.top);if(o){if(this.useSubjectCenter&&t){var s=ir(t,o.rect);s&&(r=sr(s))}this.coordAdjust=ar(r,n)}else this.coordAdjust={left:0,top:0}},e.prototype.handleMove=function(e,t){var n=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);!t&&_s(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))},e.prototype.prepareHits=function(){this.offsetTrackers=Re(this.droppableStore,(function(e){return e.component.prepareHits(),new vs(e.el)}))},e.prototype.releaseHits=function(){var e=this.offsetTrackers;for(var t in e)e[t].destroy();this.offsetTrackers={}},e.prototype.queryHitForOffset=function(e,t){var n=this.droppableStore,r=this.offsetTrackers,i=null;for(var o in n){var s=n[o].component,a=r[o];if(a&&a.isWithinClipping(e,t)){var l=a.computeLeft(),u=a.computeTop(),c=e-l,d=t-u,h=a.origRect,p=h.right-h.left,f=h.bottom-h.top;if(c>=0&&c<p&&d>=0&&d<f){var m=s.queryHit(c,d,p,f),g=s.context.getCurrentData().dateProfile;m&&on(g.activeRange,m.dateSpan.range)&&(!i||m.layer>i.layer)&&(m.rect.left+=l,m.rect.right+=l,m.rect.top+=u,m.rect.bottom+=u,i=m)}}}return i},e}();function _s(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&Sn(e.dateSpan,t.dateSpan)}function bs(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.datePointTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,{date:(i=t.dateEnv).toDate(n.range.start),dateStr:i.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay})),o}var ws=function(e){function t(t){var n=e.call(this,t)||this;n.handlePointerDown=function(e){var t=n.dragging,r=e.origEvent.target;t.setIgnoreMove(!n.component.isValidDateDownEl(r))},n.handleDragEnd=function(e){var t=n.component;if(!n.dragging.pointer.wasTouchScroll){var i=n.hitDragging,o=i.initialHit,s=i.finalHit;if(o&&s&&_s(o,s)){var a=t.context,l=r(r({},bs(o.dateSpan,a)),{dayEl:o.dayEl,jsEvent:e.origEvent,view:a.viewApi||a.calendarApi.view});a.emitter.trigger("dateClick",l)}}},n.dragging=new gs(t.el),n.dragging.autoScroller.isEnabled=!1;var i=n.hitDragging=new ys(n.dragging,Qi(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),xs=function(e){function t(t){var n=e.call(this,t)||this;n.dragSelection=null,n.handlePointerDown=function(e){var t=n,r=t.component,i=t.dragging,o=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);i.setIgnoreMove(!o),i.delay=e.isTouch?function(e){var t=e.context.options,n=t.selectLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null},n.handleDragStart=function(e){n.component.context.calendarApi.unselect(e)},n.handleHitUpdate=function(e,t){var i=n.component.context,o=null,s=!1;e&&((o=function(e,t,n){var i=e.dateSpan,o=t.dateSpan,s=[i.range.start,i.range.end,o.range.start,o.range.end];s.sort(ce);for(var a={},l=0,u=n;l<u.length;l++){var c=(0,u[l])(e,t);if(!1===c)return null;c&&r(a,c)}return a.range={start:s[0],end:s[3]},a.allDay=i.allDay,a}(n.hitDragging.initialHit,e,i.pluginHooks.dateSelectionTransformers))&&n.component.isDateSelectionValid(o)||(s=!0,o=null)),o?i.dispatch({type:"SELECT_DATES",selection:o}):t||i.dispatch({type:"UNSELECT_DATES"}),s?Q():ee(),t||(n.dragSelection=o)},n.handlePointerUp=function(e){n.dragSelection&&(Dn(n.dragSelection,e,n.component.context),n.dragSelection=null)};var i=t.component.context.options,o=n.dragging=new gs(t.el);o.touchScrollAllowed=!1,o.minDistance=i.selectMinDistance||0,o.autoScroller.isEnabled=i.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),ks=function(e){function t(n){var i=e.call(this,n)||this;i.subjectEl=null,i.subjectSeg=null,i.isDragging=!1,i.eventRange=null,i.relevantEvents=null,i.receivingContext=null,i.validMutation=null,i.mutatedRelevantEvents=null,i.handlePointerDown=function(e){var t=e.origEvent.target,n=i,r=n.component,o=n.dragging,s=o.mirror,a=r.context.options,l=r.context;i.subjectEl=e.subjectEl;var u=i.subjectSeg=cn(e.subjectEl),c=(i.eventRange=u.eventRange).instance.instanceId;i.relevantEvents=Ot(l.getCurrentData().eventStore,c),o.minDistance=e.isTouch?0:a.eventDragMinDistance,o.delay=e.isTouch&&c!==r.props.eventSelection?function(e){var t=e.context.options,n=t.eventLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null,s.parentNode=V(t,".fc"),s.revertDuration=a.dragRevertDuration;var d=r.isValidSegDownEl(t)&&!V(t,".fc-event-resizer");o.setIgnoreMove(!d),i.isDragging=d&&e.subjectEl.classList.contains("fc-event-draggable")},i.handleDragStart=function(e){var t=i.component.context,n=i.eventRange,r=n.instance.instanceId;e.isTouch?r!==i.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:r}):t.dispatch({type:"UNSELECT_EVENT"}),i.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:i.subjectEl,event:new Yn(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},i.handleHitUpdate=function(e,t){if(i.isDragging){var n=i.relevantEvents,r=i.hitDragging.initialHit,o=i.component.context,s=null,a=null,l=null,u=!1,c={affectedEvents:n,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){var d=e.component,h=(s=d.context).options;o===s||h.editable&&h.droppable?(a=function(e,t,n){var r=e.dateSpan,i=t.dateSpan,o=r.range.start,s=i.range.start,a={};r.allDay!==i.allDay&&(a.allDay=i.allDay,a.hasEnd=t.component.context.options.allDayMaintainDuration,i.allDay&&(o=xe(o)));var l=Jt(o,s,e.component.context.dateEnv,e.component===t.component?e.component.largeUnit:null);l.milliseconds&&(a.allDay=!1);for(var u={datesDelta:l,standardProps:a},c=0,d=n;c<d.length;c++)(0,d[c])(u,e,t);return u}(r,e,s.getCurrentData().pluginHooks.eventDragMutationMassagers))&&(l=An(n,s.getCurrentData().eventUiBases,a,s),c.mutatedEvents=l,d.isInteractionValid(c)||(u=!0,a=null,l=null,c.mutatedEvents={defs:{},instances:{}})):s=null}i.displayDrag(s,c),u?Q():ee(),t||(o===s&&_s(r,e)&&(a=null),i.dragging.setMirrorNeedsRevert(!a),i.dragging.setMirrorIsVisible(!e||!document.querySelector(".fc-event-mirror")),i.receivingContext=s,i.validMutation=a,i.mutatedRelevantEvents=l)}},i.handlePointerUp=function(){i.isDragging||i.cleanup()},i.handleDragEnd=function(e){if(i.isDragging){var t=i.component.context,n=t.viewApi,o=i,s=o.receivingContext,a=o.validMutation,l=i.eventRange.def,u=i.eventRange.instance,c=new Yn(t,l,u),d=i.relevantEvents,h=i.mutatedRelevantEvents,p=i.hitDragging.finalHit;if(i.clearDrag(),t.emitter.trigger("eventDragStop",{el:i.subjectEl,event:c,jsEvent:e.origEvent,view:n}),a){if(s===t){var f=new Yn(t,h.defs[l.defId],u?h.instances[u.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:h});for(var m={oldEvent:c,event:f,relatedEvents:Hn(h,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}},g={},v=0,y=t.getCurrentData().pluginHooks.eventDropTransformers;v<y.length;v++){var _=y[v];r(g,_(a,t))}t.emitter.trigger("eventDrop",r(r(r({},m),g),{el:e.subjectEl,delta:a.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",m)}else if(s){var b={event:c,relatedEvents:Hn(d,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}};t.emitter.trigger("eventLeave",r(r({},b),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:d}),t.emitter.trigger("eventRemove",b);var w=h.defs[l.defId],x=h.instances[u.instanceId],k=new Yn(s,w,x);s.dispatch({type:"MERGE_EVENTS",eventStore:h});var S={event:k,relatedEvents:Hn(h,s,x),revert:function(){s.dispatch({type:"REMOVE_EVENTS",eventStore:h})}};s.emitter.trigger("eventAdd",S),e.isTouch&&s.dispatch({type:"SELECT_EVENT",eventInstanceId:u.instanceId}),s.emitter.trigger("drop",r(r({},bs(p.dateSpan,s)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:p.component.context.viewApi})),s.emitter.trigger("eventReceive",r(r({},S),{draggedEl:e.subjectEl,view:p.component.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}i.cleanup()};var o=i.component.context.options,s=i.dragging=new gs(n.el);s.pointer.selector=t.SELECTOR,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=o.dragScroll;var a=i.hitDragging=new ys(i.dragging,eo);return a.useSubjectCenter=n.useEventCenter,a.emitter.on("pointerdown",i.handlePointerDown),a.emitter.on("dragstart",i.handleDragStart),a.emitter.on("hitupdate",i.handleHitUpdate),a.emitter.on("pointerup",i.handlePointerUp),a.emitter.on("dragend",i.handleDragEnd),i}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.displayDrag=function(e,t){var n=this.component.context,r=this.receivingContext;r&&r!==e&&(r===n?r.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:{defs:{},instances:{}},isEvent:!0}}):r.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},t.prototype.clearDrag=function(){var e=this.component.context,t=this.receivingContext;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})},t.prototype.cleanup=function(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null},t.SELECTOR=".fc-event-draggable, .fc-event-resizable",t}(Ji),Ss=function(e){function t(t){var n=e.call(this,t)||this;n.draggingSegEl=null,n.draggingSeg=null,n.eventRange=null,n.relevantEvents=null,n.validMutation=null,n.mutatedRelevantEvents=null,n.handlePointerDown=function(e){var t=n.component,r=cn(n.querySegEl(e)),i=n.eventRange=r.eventRange;n.dragging.minDistance=t.context.options.eventDragMinDistance,n.dragging.setIgnoreMove(!n.component.isValidSegDownEl(e.origEvent.target)||e.isTouch&&n.component.props.eventSelection!==i.instance.instanceId)},n.handleDragStart=function(e){var t=n.component.context,r=n.eventRange;n.relevantEvents=Ot(t.getCurrentData().eventStore,n.eventRange.instance.instanceId);var i=n.querySegEl(e);n.draggingSegEl=i,n.draggingSeg=cn(i),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:i,event:new Yn(t,r.def,r.instance),jsEvent:e.origEvent,view:t.viewApi})},n.handleHitUpdate=function(e,t,i){var o=n.component.context,s=n.relevantEvents,a=n.hitDragging.initialHit,l=n.eventRange.instance,u=null,c=null,d=!1,h={affectedEvents:s,mutatedEvents:{defs:{},instances:{}},isEvent:!0};e&&(u=function(e,t,n,i,o){for(var s=e.component.context.dateEnv,a=Jt(e.dateSpan.range.start,t.dateSpan.range.start,s,e.component.largeUnit),l={},u=0,c=o;u<c.length;u++){var d=(0,c[u])(e,t);if(!1===d)return null;d&&r(l,d)}if(n){if(s.add(i.start,a)<i.end)return l.startDelta=a,l}else if(s.add(i.end,a)>i.start)return l.endDelta=a,l;return null}(a,e,i.subjectEl.classList.contains("fc-event-resizer-start"),l.range,o.pluginHooks.eventResizeJoinTransforms)),u&&(c=An(s,o.getCurrentData().eventUiBases,u,o),h.mutatedEvents=c,n.component.isInteractionValid(h)||(d=!0,u=null,c=null,h.mutatedEvents=null)),c?o.dispatch({type:"SET_EVENT_RESIZE",state:h}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),d?Q():ee(),t||(u&&_s(a,e)&&(u=null),n.validMutation=u,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,i=n.eventRange.def,o=n.eventRange.instance,s=new Yn(t,i,o),a=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:s,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new Yn(t,l.defs[i.defId],o?l.instances[o.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:s,event:u,relatedEvents:Hn(l,t,o),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",r(r({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||$e(0),endDelta:n.validMutation.endDelta||$e(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var i=t.component,o=n.dragging=new gs(t.el);o.pointer.selector=".fc-event-resizer",o.touchScrollAllowed=!1,o.autoScroller.isEnabled=i.context.options.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return V(e.subjectEl,".fc-event")},t}(Ji),Ts=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=e.origEvent.target;t.matchesCancel=!!V(r,n),t.matchesEvent=!!V(r,ks.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,i=n.getCurrentData();if(!r.wasTouchScroll){if(i.dateSelection&&!t.isRecentPointerDateSelect){var o=n.options.unselectAuto;!o||o&&t.matchesCancel||n.calendarApi.unselect(e)}i.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new ls(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),Es={dateClick:At,eventDragStart:At,eventDragStop:At,eventDrop:At,eventResizeStart:At,eventResizeStop:At,eventResize:At,drop:At,eventReceive:At,eventLeave:At},Ds=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,i){var o=n.hitDragging.dragging,s=null,a=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(s=e.component.context,n.canDropElOnCalendar(i.subjectEl,s)&&(a=function(e,t,n){for(var i=r({},t.leftoverProps),o=0,s=n.pluginHooks.externalDefTransforms;o<s.length;o++){var a=s[o];r(i,a(e,t))}var l=Wt(i,n),u=Gt(l.refined,l.extra,t.sourceId,e.allDay,n.options.forceEventDuration||Boolean(t.duration),n),c=e.range.start;e.allDay&&t.startTime&&(c=n.dateEnv.add(c,t.startTime));var d=t.duration?n.dateEnv.add(c,t.duration):Mn(e.allDay,c,n);return{def:u,instance:Ie(u.defId,{start:c,end:d})}}(e.dateSpan,n.dragMeta,s),u.mutatedEvents=Lt(a),(l=!Gr(u,s))&&(u.mutatedEvents={defs:{},instances:{}},a=null))),n.displayDrag(s,u),o.setMirrorIsVisible(t||!a||!document.querySelector(".fc-event-mirror")),l?Q():ee(),t||(o.setMirrorNeedsRevert(!a),n.receivingContext=s,n.droppableEvent=a)},this.handleDragEnd=function(e){var t=n,i=t.receivingContext,o=t.droppableEvent;if(n.clearDrag(),i&&o){var s=n.hitDragging.finalHit,a=s.component.context.viewApi,l=n.dragMeta;if(i.emitter.trigger("drop",r(r({},bs(s.dateSpan,i)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:a})),l.create){var u=Lt(o);i.dispatch({type:"MERGE_EVENTS",eventStore:u}),e.isTouch&&i.dispatch({type:"SELECT_EVENT",eventInstanceId:o.instance.instanceId}),i.emitter.trigger("eventReceive",{event:new Yn(i,o.def,o.instance),relatedEvents:[],revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:u})},draggedEl:e.subjectEl,view:a})}}n.receivingContext=null,n.droppableEvent=null};var i=this.hitDragging=new ys(e,eo);i.requireInitial=!1,i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}return e.prototype.buildDragMeta=function(e){return"object"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta(e)):io((t=function(e,t){var n=no.dataAttrPrefix,r=(n?n+"-":"")+"event";return e.getAttribute("data-"+r)||""}(e))?JSON.parse(t):{create:!1});var t},e.prototype.displayDrag=function(e,t){var n=this.receivingContext;n&&n!==e&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},e.prototype.clearDrag=function(){this.receivingContext&&this.receivingContext.dispatch({type:"UNSET_EVENT_DRAG"})},e.prototype.canDropElOnCalendar=function(e,t){var n=t.options.dropAccept;return"function"==typeof n?n.call(t.calendarApi,e):"string"!=typeof n||!n||Boolean(H(e,n))},e}();no.dataAttrPrefix="";var Cs=function(){function e(e,t){var n=this;void 0===t&&(t={}),this.handlePointerDown=function(e){var t=n.dragging,r=n.settings,i=r.minDistance,o=r.longPressDelay;t.minDistance=null!=i?i:e.isTouch?0:xt.eventDragMinDistance,t.delay=e.isTouch?null!=o?o:xt.longPressDelay:0},this.handleDragStart=function(e){e.isTouch&&n.dragging.delay&&e.subjectEl.classList.contains("fc-event")&&n.dragging.mirror.getMirrorEl().classList.add("fc-event-selected")},this.settings=t;var r=this.dragging=new gs(e);r.touchScrollAllowed=!1,null!=t.itemSelector&&(r.pointer.selector=t.itemSelector),null!=t.appendTo&&(r.mirror.parentNode=t.appendTo),r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),new Ds(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Ms=function(e){function t(t){var n=e.call(this,t)||this;n.shouldIgnoreMove=!1,n.mirrorSelector="",n.currentMirrorEl=null,n.handlePointerDown=function(e){n.emitter.trigger("pointerdown",e),n.shouldIgnoreMove||n.emitter.trigger("dragstart",e)},n.handlePointerMove=function(e){n.shouldIgnoreMove||n.emitter.trigger("dragmove",e)},n.handlePointerUp=function(e){n.emitter.trigger("pointerup",e),n.shouldIgnoreMove||n.emitter.trigger("dragend",e)};var r=n.pointer=new ls(t);return r.emitter.on("pointerdown",n.handlePointerDown),r.emitter.on("pointermove",n.handlePointerMove),r.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy()},t.prototype.setIgnoreMove=function(e){this.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){if(e)this.currentMirrorEl&&(this.currentMirrorEl.style.visibility="",this.currentMirrorEl=null);else{var t=this.mirrorSelector?document.querySelector(this.mirrorSelector):null;t&&(this.currentMirrorEl=t,t.style.visibility="hidden")}},t}(to),As=function(){function e(e,t){var n=document;e===document||e instanceof Element?(n=e,t=t||{}):t=e||{};var r=this.dragging=new Ms(n);"string"==typeof t.itemSelector?r.pointer.selector=t.itemSelector:n===document&&(r.pointer.selector="[data-event]"),"string"==typeof t.mirrorSelector&&(r.mirrorSelector=t.mirrorSelector),new Ds(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Is=ni({componentInteractions:[ws,xs,ks,Ss],calendarInteractions:[Ts],elementDraggingImpl:gs,listenerRefiners:Es}),Ls=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=Nr(),t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,i=[],o=Bo(r.options);return e&&i.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),Lr(pi,{viewSpec:r.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(zo,{liquid:!n.isHeightAuto&&!n.forPrint,cols:[],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r){var i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");var o=this.props,s=this.context,a=!o.forPrint&&Bo(s.options),l=!o.forPrint&&Uo(s.options),u=[];return e&&u.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),u.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&u.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Ho}]}),Lr(pi,{viewSpec:s.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(i,{liquid:!o.isHeightAuto&&!o.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:u}))}))},t}(ti);function Os(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.row].push(s)}return n}function Ns(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.firstCol].push(s)}return n}function Rs(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.row].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}var Ps=bt({week:"narrow"}),Fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.props;if(n.onMoreClick){var r=n.segsByEachCol,i=r.filter((function(e){return n.segIsHidden[e.eventRange.instance.instanceId]}));n.onMoreClick({date:n.date,allSegs:r,hiddenSegs:i,moreCnt:n.moreCnt,dayEl:t.rootEl,ev:e})}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.viewApi,o=this.props,s=o.date,a=o.dateProfile,l={num:o.moreCnt,text:o.buildMoreLinkText(o.moreCnt),view:i},u=n.navLinks?{"data-navlink":fr(s,"week"),tabIndex:0}:{};return Lr(Zo,{date:s,dateProfile:a,todayRange:o.todayRange,showDayNumber:o.showDayNumber,extraHookProps:o.extraHookProps,elRef:this.handleRootEl},(function(t,i,c,d){return Lr("td",r({ref:t,className:["fc-daygrid-day"].concat(i,o.extraClassNames||[]).join(" ")},c,o.extraDataAttrs),Lr("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:o.innerElRef},o.showWeekNumber&&Lr(ns,{date:s,defaultFormat:Ps},(function(e,t,n,i){return Lr("a",r({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},u),i)})),!d&&Lr(Vs,{date:s,dateProfile:a,showDayNumber:o.showDayNumber,forceDayTop:o.forceDayTop,todayRange:o.todayRange,extraHookProps:o.extraHookProps}),Lr("div",{className:"fc-daygrid-day-events",ref:o.fgContentElRef,style:{paddingBottom:o.fgPaddingBottom}},o.fgContent,Boolean(o.moreCnt)&&Lr("div",{className:"fc-daygrid-day-bottom",style:{marginTop:o.moreMarginTop}},Lr(oi,{hookProps:l,classNames:n.moreLinkClassNames,content:n.moreLinkContent,defaultContent:Ys,didMount:n.moreLinkDidMount,willUnmount:n.moreLinkWillUnmount},(function(t,n,r,i){return Lr("a",{onClick:e.handleMoreLinkClick,ref:t,className:["fc-daygrid-more-link"].concat(n).join(" ")},i)})))),Lr("div",{className:"fc-daygrid-day-bg"},o.bgContent)))}))},t}(ti);function js(e){return e.dayNumberText}function Ys(e){return e.text}var Vs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context.options.navLinks?{"data-navlink":fr(e.date),tabIndex:0}:{};return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:js},(function(n,i){return(i||e.forceDayTop)&&Lr("div",{className:"fc-daygrid-day-top",ref:n},Lr("a",r({className:"fc-daygrid-day-number"},t),i||Lr(Rr,null,"\xa0")))}))},t}(Br),Hs=bt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Bs(e){var t=e.eventRange.ui.display;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var Us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||Hs,i=yn(e.seg,n,t,!0,e.defaultDisplayEventEnd);return Lr(qo,{seg:e.seg,timeText:i,defaultContent:zs,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,i,o){return Lr("a",r({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(s=e.seg.eventRange.def.url)?{href:s}:{}),o);var s}))},t}(Br);function zs(e){return Lr(Rr,null,Lr("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title"},e.event.title||Lr(Rr,null,"\xa0")))}var qs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Lr(Wo,r({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Hs,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(Br);function Ws(e,t,n,i,o,s,a,l){for(var u=[],c=[],d={},h={},p={},f={},m={},g=0;g<a;g++)u.push([]),c.push(0);for(var v=0,y=t=pn(t,l);v<y.length;v++)E(S=y[v],o[S.eventRange.instance.instanceId+":"+S.firstCol]||0);!0===n||!0===i?function(e,t,n,r){Gs(e,t,n,!0,(function(e){return e.bottom<=r}))}(c,d,u,s):"number"==typeof n?function(e,t,n,r){Gs(e,t,n,!1,(function(e,t){return t<r}))}(c,d,u,n):"number"==typeof i&&function(e,t,n,r){Gs(e,t,n,!0,(function(e,t){return t<r}))}(c,d,u,i);for(var _=0;_<a;_++){for(var b=0,w=0,x=0,k=u[_];x<k.length;x++){var S,T=k[x];d[(S=T.seg).eventRange.instance.instanceId]||(h[S.eventRange.instance.instanceId]=T.top,S.firstCol===S.lastCol&&S.isStart&&S.isEnd?(p[S.eventRange.instance.instanceId]=T.top-b,w=0,b=T.bottom):w+=T.bottom-T.top)}w&&(c[_]?f[_]=w:m[_]=w)}function E(e,t){if(!D(e,t,0))for(var n=e.firstCol;n<=e.lastCol;n++)for(var r=0,i=u[n];r<i.length;r++)if(D(e,t,i[r].bottom))return}function D(e,t,n){if(function(e,t,n){for(var r=e.firstCol;r<=e.lastCol;r++)for(var i=0,o=u[r];i<o.length;i++){var s=o[i];if(n<s.bottom&&n+t>s.top)return!1}return!0}(e,t,n)){for(var r=e.firstCol;r<=e.lastCol;r++){for(var i=u[r],o=0;o<i.length&&n>=i[o].top;)o++;i.splice(o,0,{seg:e,top:n,bottom:n+t})}return!0}return!1}for(var C in o)o[C]||(d[C.split(":")[0]]=!0);return{segsByFirstCol:u.map($s),segsByEachCol:u.map((function(t,n){var i=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];t.push(i.seg)}return t}(t);return function(e,t,n){for(var i={start:t,end:me(t,1)},o=[],s=0,a=e;s<a.length;s++){var l=a[s],u=l.eventRange,c=u.range,d=tn(c,i);d&&o.push(r(r({},l),{firstCol:n,lastCol:n,eventRange:{def:u.def,ui:r(r({},u.ui),{durationEditable:!1}),instance:u.instance,range:d},isStart:l.isStart&&d.start.valueOf()===c.start.valueOf(),isEnd:l.isEnd&&d.end.valueOf()===c.end.valueOf()}))}return o}(i,e[n].date,n)})),segIsHidden:d,segTops:h,segMarginTops:p,moreCnts:c,moreTops:f,paddingBottoms:m}}function $s(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];o.seg.firstCol===t&&n.push(o.seg)}return n}function Gs(e,t,n,r,i){for(var o=e.length,s={},a=[],l=0;l<o;l++)a.push([]);for(l=0;l<o;l++)for(var u=0,c=0,d=n[l];c<d.length;c++){var h=d[c];i(h,u)?p(h):f(h,u,r),h.top!==h.bottom&&u++}function p(e){var t=e.seg,n=t.eventRange.instance.instanceId;if(!s[n]){s[n]=!0;for(var r=t.firstCol;r<=t.lastCol;r++)a[r].push(e)}}function f(n,r,i){var o=n.seg,s=o.eventRange.instance.instanceId;if(!t[s]){t[s]=!0;for(var l=o.firstCol;l<=o.lastCol;l++){var u=++e[l];if(i&&1===u)for(var c=r-1;a[l].length>c;)f(a[l].pop(),a[l].length,!1)}}}}var Ks=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Ao,t.frameElRefs=new Ao,t.fgElRefs=new Ao,t.segHarnessRefs=new Ao,t.rootElRef=Nr(),t.state={framePositions:null,maxContentHeight:null,segHeights:{}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context,i=t.cells.length,o=Ns(t.businessHourSegs,i),s=Ns(t.bgEventSegs,i),a=Ns(this.getHighlightSegs(),i),l=Ns(this.getMirrorSegs(),i),u=Ws(t.cells,t.fgEventSegs,t.dayMaxEvents,t.dayMaxEventRows,n.segHeights,n.maxContentHeight,i,r.options.eventOrder),c=u.paddingBottoms,d=u.segsByFirstCol,h=u.segsByEachCol,p=u.segIsHidden,f=u.segTops,m=u.segMarginTops,g=u.moreCnts,v=u.moreTops,y=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var i=e.renderFgSegs(d[r],p,f,m,y,t.todayRange),u=e.renderFgSegs(l[r],{},f,{},{},t.todayRange,Boolean(t.eventDrag),Boolean(t.eventResize),!1);return Lr(Fs,{key:n.key,elRef:e.cellElRefs.createRef(n.key),innerElRef:e.frameElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&0===r,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,moreCnt:g[r],buildMoreLinkText:t.buildMoreLinkText,onMoreClick:t.onMoreClick,segIsHidden:p,moreMarginTop:v[r],segsByEachCol:h[r],fgPaddingBottom:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:Lr(Rr,null,Lr(Rr,null,i),Lr(Rr,null,u)),bgContent:Lr(Rr,null,e.renderFillSegs(a[r],"highlight"),e.renderFillSegs(o[r],"non-business"),e.renderFillSegs(s[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!je(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,i,o,s,a,l,u){var c=this.context,d=this.props.eventSelection,h=this.state.framePositions,p=1===this.props.cells.length,f=[];if(h)for(var m=0,g=e;m<g.length;m++){var v=g[m],y=v.eventRange.instance.instanceId,_=a||l||u,b=o[y],w=t[y]||b,x=t[y]||_||v.firstCol!==v.lastCol||!v.isStart||!v.isEnd,k=void 0,S=void 0,T=void 0,E=void 0;x?(S=n[y],c.isRtl?(E=0,T=h.lefts[v.lastCol]-h.lefts[v.firstCol]):(T=0,E=h.rights[v.firstCol]-h.rights[v.lastCol])):k=i[y],f.push(Lr("div",{className:"fc-daygrid-event-harness"+(x?" fc-daygrid-event-harness-abs":""),key:y,ref:_?null:this.segHarnessRefs.createRef(y+":"+v.firstCol),style:{visibility:w?"hidden":"",marginTop:k||"",top:S||"",left:T||"",right:E||""}},Bs(v)?Lr(Us,r({seg:v,isDragging:a,isSelected:y===d,defaultDisplayEventEnd:p},_n(v,s))):Lr(qs,r({seg:v,isDragging:a,isResizing:l,isDateSelecting:u,isSelected:y===d,defaultDisplayEventEnd:p},_n(v,s)))))}return f},t.prototype.renderFillSegs=function(e,t){var n=this.context.isRtl,o=this.props.todayRange,s=this.state.framePositions,a=[];if(s)for(var l=0,u=e;l<u.length;l++){var c=u[l],d=n?{right:0,left:s.lefts[c.lastCol]-s.lefts[c.firstCol]}:{left:0,right:s.rights[c.firstCol]-s.rights[c.lastCol]};a.push(Lr("div",{key:wn(c.eventRange),className:"fc-daygrid-bg-harness",style:d},"bg-event"===t?Lr(es,r({seg:c},_n(c,o))):Qo(t)))}return Lr.apply(void 0,i([Rr,{}],a))},t.prototype.updateSizing=function(e){var t=this.props,n=this.frameElRefs;if(null!==t.clientWidth){if(e){var r=t.cells.map((function(e){return n.currentMap[e.key]}));if(r.length){var i=this.rootElRef.current;this.setState({framePositions:new Er(i,r,!0,!1)})}}var o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({segHeights:this.computeSegHeights(),maxContentHeight:o?this.computeMaxContentHeight():null})}},t.prototype.computeSegHeights=function(){return Re(this.segHarnessRefs.currentMap,(function(e){return e.getBoundingClientRect().height}))},t.prototype.computeMaxContentHeight=function(){var e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top},t.prototype.getCellEls=function(){var e=this.cellElRefs.currentMap;return this.props.cells.map((function(t){return e[t.key]}))},t}(ti);Ks.addStateEquality({segHeights:je});var Zs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.repositioner=new ji(t.updateSize.bind(t)),t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(t.props.elRef,e)},t.handleDocumentMousedown=function(e){var n=t.props.onClose;n&&!t.rootEl.contains(e.target)&&n()},t.handleDocumentScroll=function(){t.repositioner.request(10)},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return n(t,e),t.prototype.render=function(){var e=this.context.theme,t=this.props,n=["fc-popover",e.getClass("popover")].concat(t.extraClassNames||[]);return Lr("div",r({className:n.join(" ")},t.extraAttrs,{ref:this.handleRootEl}),Lr("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},Lr("span",{className:"fc-popover-title"},t.title),Lr("span",{className:"fc-popover-close "+e.getIconClass("close"),onClick:this.handleCloseClick})),Lr("div",{className:"fc-popover-body "+e.getClass("popoverContent")},t.children))},t.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleDocumentMousedown),document.addEventListener("scroll",this.handleDocumentScroll),this.updateSize()},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleDocumentMousedown),document.removeEventListener("scroll",this.handleDocumentScroll)},t.prototype.updateSize=function(){var e=this.props,t=e.alignmentEl,n=e.topAlignmentEl,r=this.rootEl;if(r){var i,o=r.getBoundingClientRect(),s=t.getBoundingClientRect(),a=n?n.getBoundingClientRect().top:s.top;a=Math.min(a,window.innerHeight-o.height-10),a=Math.max(a,10),i=this.context.isRtl?s.right-o.width:s.left,i=Math.min(i,window.innerWidth-o.width-10),z(r,{top:a,left:i=Math.max(i,10)})}},t}(Br),Xs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handlePopoverEl=function(e){t.popoverEl=e,e?t.context.registerInteractiveComponent(t,{el:e,useEventCenter:!1}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.options,n=e.dateEnv,i=this.props,o=i.date,s=i.hiddenInstances,a=i.todayRange,l=i.dateProfile,u=i.selectedInstanceId,c=n.format(o,t.dayPopoverFormat);return Lr(Zo,{date:o,dateProfile:l,todayRange:a,elRef:this.handlePopoverEl},(function(e,t,n){return Lr(Zs,{elRef:e,title:c,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,onClose:i.onCloseClick,alignmentEl:i.alignmentEl,topAlignmentEl:i.topAlignmentEl},Lr(Xo,{date:o,dateProfile:l,todayRange:a},(function(e,t){return t&&Lr("div",{className:"fc-more-popover-misc",ref:e},t)})),i.segs.map((function(e){var t=e.eventRange.instance.instanceId;return Lr("div",{className:"fc-daygrid-event-harness",key:t,style:{visibility:s[t]?"hidden":""}},Bs(e)?Lr(Us,r({seg:e,isDragging:!1,isSelected:t===u,defaultDisplayEventEnd:!1},_n(e,a))):Lr(qs,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:t===u,defaultDisplayEventEnd:!1},_n(e,a))))})))}))},t.prototype.queryHit=function(e,t,n,r){var i=this.props.date;if(e<n&&t<r)return{component:this,dateSpan:{allDay:!0,range:{start:i,end:me(i,1)}},dayEl:this.popoverEl,rect:{left:0,top:0,right:n,bottom:r},layer:1}},t.prototype.isPopover=function(){return!0},t}(ti),Js=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=ot(Os),t.splitBgEventSegs=ot(Os),t.splitFgEventSegs=ot(Os),t.splitDateSelectionSegs=ot(Os),t.splitEventDrag=ot(Rs),t.splitEventResize=ot(Rs),t.buildBuildMoreLinkText=ot(Qs),t.rowRefs=new Ao,t.state={morePopoverState:null},t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.context,i=n.dateEnv,o=n.options.moreLinkClick;function s(e){var t=e.eventRange,r=t.def,o=t.instance,s=t.range;return{event:new Yn(n,r,o),start:i.toDate(s.start),end:i.toDate(s.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof o&&(o=o({date:i.toDate(e.date),allDay:!0,allSegs:e.allSegs.map(s),hiddenSegs:e.hiddenSegs.map(s),jsEvent:e.ev,view:n.viewApi})),o&&"popover"!==o?"string"==typeof o&&n.calendarApi.zoomTo(e.date,o):t.setState({morePopoverState:r(r({},e),{currentFgEventSegs:t.props.fgEventSegs})})},t.handleMorePopoverClose=function(){t.setState({morePopoverState:null})},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.dateProfile,r=t.dayMaxEventRows,i=t.dayMaxEvents,o=t.expandRows,s=this.state.morePopoverState,a=t.cells.length,l=this.splitBusinessHourSegs(t.businessHourSegs,a),u=this.splitBgEventSegs(t.bgEventSegs,a),c=this.splitFgEventSegs(t.fgEventSegs,a),d=this.splitDateSelectionSegs(t.dateSelectionSegs,a),h=this.splitEventDrag(t.eventDrag,a),p=this.splitEventResize(t.eventResize,a),f=this.buildBuildMoreLinkText(this.context.options.moreLinkText),m=!0===i||!0===r;return m&&!o&&(m=!1,r=null,i=null),Lr("div",{className:["fc-daygrid-body",m?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",o?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},Lr(bo,{unit:"day"},(function(m,g){return Lr(Rr,null,Lr("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:o?t.clientHeight:""}},t.colGroupNode,Lr("tbody",null,t.cells.map((function(o,s){return Lr(Ks,{ref:e.rowRefs.createRef(s),key:o.length?o[0].date.toISOString():s,showDayNumbers:a>1,showWeekNumbers:t.showWeekNumbers,todayRange:g,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:l[s],eventSelection:t.eventSelection,bgEventSegs:u[s].filter(ea),fgEventSegs:c[s],dateSelectionSegs:d[s],eventDrag:h[s],eventResize:p[s],dayMaxEvents:i,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,buildMoreLinkText:f,onMoreClick:e.handleMoreLinkClick})})))),!t.forPrint&&s&&s.currentFgEventSegs===t.fgEventSegs&&Lr(Xs,{date:s.date,dateProfile:n,segs:s.allSegs,alignmentEl:s.dayEl,topAlignmentEl:1===a?t.headerAlignElRef.current:null,onCloseClick:e.handleMorePopoverClose,selectedInstanceId:t.eventSelection,hiddenInstances:(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{},todayRange:g}))})))},t.prototype.prepareHits=function(){this.rowPositions=new Er(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Er(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,i=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=i)return{row:o,col:i,dateSpan:{range:this.getCellRange(o,i),allDay:!0},dayEl:this.getCellEl(o,i),relativeRect:{left:n.lefts[i],right:n.rights[i],top:r.tops[o],bottom:r.bottoms[o]}}},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:me(n,1)}},t}(ti);function Qs(e){return"function"==typeof e?e:function(t){return"+"+t+" "+e}}function ea(e){return e.eventRange.def.allDay}var ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new na,t.tableRef=Nr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr(Js,r({ref:this.tableRef,elRef:this.handleRootEl},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t.prototype.prepareHits=function(){this.tableRef.current.prepareHits()},t.prototype.queryHit=function(e,t){var n=this.tableRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ti),na=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return n(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(Eo),ra=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=ot(ia),t.headerRef=Nr(),t.tableRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,i=this.props,o=this.buildDayTableModel(i.dateProfile,r),s=n.dayHeaders&&Lr(xo,{ref:this.headerRef,dateProfile:i.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),a=function(t){return Lr(ta,{ref:e.tableRef,dateProfile:i.dateProfile,dayTableModel:o,businessHours:i.businessHours,dateSelection:i.dateSelection,eventStore:i.eventStore,eventUiBases:i.eventUiBases,eventSelection:i.eventSelection,eventDrag:i.eventDrag,eventResize:i.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!i.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(s,a,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(s,a)},t}(Ls);function ia(e,t){var n=new So(e.renderRange,t);return new To(n,/year|month|week/.test(e.currentRangeUnit))}var oa=ni({initialView:"dayGridMonth",optionRefiners:{moreLinkClick:At,moreLinkClassNames:At,moreLinkContent:At,moreLinkDidMount:At,moreLinkWillUnmount:At},views:{dayGrid:{component:ra,dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.buildRenderRange=function(t,n,r){var i,o=this.props.dateEnv,s=e.prototype.buildRenderRange.call(this,t,n,r),a=s.start,l=s.end;return/^(year|month)$/.test(n)&&(a=o.startOfWeek(a),(i=o.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=fe(i,1))),this.props.monthMode&&this.props.fixedWeekCount&&(l=fe(l,6-Math.ceil(ve(a,l)))),{start:a,end:l}},t}(yi)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?ln(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(cr),aa=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slatMetas=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(sn(t.currentRange,e)){var n=xe(e),r=e.valueOf()-n.valueOf();if(r>=Je(t.slotMinTime)&&r<Je(t.slotMaxTime))return this.computeTimeTop($e(r))}},e.prototype.computeDateTop=function(e,t){return t||(t=xe(e)),this.computeTimeTop($e(e.valueOf()-t.valueOf()))},e.prototype.computeTimeTop=function(e){var t,n,r=this.positions,i=this.dateProfile,o=this.slatMetas,s=r.els.length,a=o[1].date.valueOf()-o[0].date.valueOf(),l=(e.milliseconds-Je(i.slotMinTime))/a;return l=Math.max(0,l),l=Math.min(s,l),t=Math.floor(l),n=l-(t=Math.min(t,s-1)),r.tops[t]+r.getHeight(t)*n},e}(),la=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],ua=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.slatElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr("div",{className:"fc-timegrid-slots",ref:this.rootElRef},Lr("table",{className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,Lr(ca,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))},t.prototype.componentDidMount=function(){this.updateSizing()},t.prototype.componentDidUpdate=function(){this.updateSizing()},t.prototype.componentWillUnmount=function(){this.props.onCoords&&this.props.onCoords(null)},t.prototype.updateSizing=function(){var e,t=this.props;t.onCoords&&null!==t.clientWidth&&this.rootElRef.current.offsetHeight&&t.onCoords(new aa(new Er(this.rootElRef.current,(e=this.slatElRefs.currentMap,t.slatMetas.map((function(t){return e[t.key]}))),!1,!0),this.props.dateProfile,t.slatMetas))},t}(Br),ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,i=e.slatElRefs;return Lr("tbody",null,e.slatMetas.map((function(o,s){var a={time:o.time,date:t.dateEnv.toDate(o.date),view:t.viewApi},l=["fc-timegrid-slot","fc-timegrid-slot-lane",o.isLabeled?"":"fc-timegrid-slot-minor"];return Lr("tr",{key:o.key,ref:i.createRef(o.key)},e.axis&&Lr(ha,r({},o)),Lr(oi,{hookProps:a,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,t,n,r){return Lr("td",{ref:e,className:l.concat(t).join(" "),"data-time":o.isoTimeStr},r)})))})))},t}(Br),da=bt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function ha(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Lr(Yr.Consumer,null,(function(n){if(e.isLabeled){var r=n.dateEnv,i=n.options,o=n.viewApi,s=null==i.slotLabelFormat?da:Array.isArray(i.slotLabelFormat)?bt(i.slotLabelFormat[0]):bt(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:o,text:r.format(e.date,s)};return Lr(oi,{hookProps:a,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:pa,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,o){return Lr("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Lr("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Lr("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},o)))}))}return Lr("td",{className:t.join(" "),"data-time":e.isoTimeStr})}))}function pa(e){return e.text}function fa(e,t,n,r,i){for(var o=new Date(0),s=e,a=$e(0),l=n||function(e){var t,n,r;for(t=la.length-1;t>=0;t--)if(null!==(r=Qe(n=$e(la[t]),e))&&r>1)return n;return e}(r),u=[];Je(s)<Je(t);){var c=i.add(o,s),d=null!==Qe(a,l);u.push({date:c,time:s,key:c.toISOString(),isoTimeStr:nt(c),isLabeled:d}),s=Ke(s,r),a=Ke(a,r)}return u}var ma=bt({week:"short"}),ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new sa,t.headerElRef=Nr(),t.rootElRef=Nr(),t.scrollerElRef=Nr(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e){void 0===e&&(e="");var n=t.context.options,i=t.props.dateProfile.renderRange,o=ye(i.start,i.end),s=n.navLinks&&1===o?{"data-navlink":fr(i.start,"week"),tabIndex:0}:{};return n.weekNumbers?Lr(ns,{date:i.start,defaultFormat:ma},(function(t,n,i,o){return Lr("th",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:e}},Lr("a",r({ref:i,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},s),o)))})):Lr("th",{className:"fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-axis-frame",style:{height:e}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,i=n.viewApi,o={text:r.allDayText,view:i};return Lr(oi,{hookProps:o,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:va,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,i){return Lr("td",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Lr("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},i)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,i=this.props,o=[],s=Bo(r.options);return e&&o.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(o.push({type:"body",key:"all-day",chunk:{content:t}}),o.push({type:"body",key:"all-day-divider",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Lr(pi,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(zo,{liquid:!i.isHeightAuto&&!i.forPrint,cols:[{width:"shrink"}],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,i,o,s){var a=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Bo(u.options),h=!c.forPrint&&Uo(u.options),p=[];e&&p.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderHeadAxis(e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(p.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),p.push({key:"all-day-divider",type:"body",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var f=u.options.nowIndicator;return p.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return Lr("div",{className:"fc-timegrid-axis-chunk"},Lr("table",{style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Lr("tbody",null,Lr(ya,{slatMetas:o}))),Lr("div",{className:"fc-timegrid-now-indicator-container"},Lr(bo,{unit:f?"minute":"day"},(function(e){var t=f&&s&&s.safeComputeTop(e);return"number"==typeof t?Lr(Go,{isAxis:!0,date:e},(function(e,n,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},i)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),h&&p.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Ho},{key:"cols",content:Ho}]}),Lr(pi,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(l,{liquid:!c.isHeightAuto&&!c.forPrint,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:p}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=5),{dayMaxEvents:t,dayMaxEventRows:n}},t}(ti);function va(e){return e.text}var ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return Lr("tr",{key:e.key},Lr(ha,r({},e)))}))},t}(Br);function _a(e,t){var n,r=[];for(n=0;n<t;n++)r.push([]);if(e)for(n=0;n<e.length;n++)r[e[n].col].push(e[n]);return r}function ba(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.col].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}function wa(e,t,n,r){for(var i=0,o=e;i<o.length;i++){var s=o[i];s.top=n.computeDateTop(s.start,t),s.bottom=Math.max(s.top+(r||0),n.computeDateTop(s.end,t))}}function xa(e,t,n){void 0===n&&(n=[]);for(var r=0;r<t.length;r++)i=e,o=t[r],i.bottom>o.top&&i.top<o.bottom&&n.push(t[r]);var i,o;return n}function ka(e){var t,n,r=e.forwardSegs,i=0;if(null==e.forwardPressure){for(t=0;t<r.length;t++)ka(n=r[t]),i=Math.max(i,1+n.forwardPressure);e.forwardPressure=i}}function Sa(e,t,n,r){var i,o=e.forwardSegs;if(null==e.forwardCoord)for(o.length?(function(e,t){var n=e.map(Ta),r=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(t);n.sort((function(e,t){return se(e,t,r)})),n.map((function(e){return e._seg}))}(o,r),Sa(o[0],t+1,n,r),e.forwardCoord=o[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),i=0;i<o.length;i++)Sa(o[i],0,e.forwardCoord,r)}function Ta(e){var t=fn(e);return t.forwardPressure=e.forwardPressure,t.backwardCoord=e.backwardCoord,t}var Ea=bt({hour:"numeric",minute:"2-digit",meridiem:!1}),Da=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=["fc-timegrid-event","fc-v-event"];return this.props.isCondensed&&e.push("fc-timegrid-event-condensed"),Lr(Wo,r({},this.props,{defaultTimeFormat:Ea,extraClassNames:e}))},t}(Br);no.timeGridEventCondensedHeight=30;var Ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.selectMirror,i=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||n&&t.dateSelectionSegs||[],o=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr(Zo,{elRef:t.elRef,date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps},(function(s,a,l){return Lr("td",r({ref:s,className:["fc-timegrid-col"].concat(a,t.extraClassNames||[]).join(" ")},l,t.extraDataAttrs),Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(t.businessHourSegs,"non-business"),e.renderFillSegs(t.bgEventSegs,"bg-event"),e.renderFillSegs(t.dateSelectionSegs,"highlight")),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(t.fgEventSegs,o)),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(i,{},Boolean(t.eventDrag),Boolean(t.eventResize),Boolean(n))),Lr("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(t.nowIndicatorSegs)),Lr(Ma,{date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps})))}))},t.prototype.renderFgSegs=function(e,t,n,r,i){var o=this.props;return o.forPrint?this.renderPrintFgSegs(e):o.slatCoords?this.renderPositionedFgSegs(e,t,n,r,i):void 0},t.prototype.renderPrintFgSegs=function(e){var t=this.props;return(e=pn(e,this.context.options.eventOrder)).map((function(e){return Lr("div",{className:"fc-timegrid-event-harness",key:e.eventRange.instance.instanceId},Lr(Da,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isCondensed:!1},_n(e,t.todayRange,t.nowDate))))}))},t.prototype.renderPositionedFgSegs=function(e,t,n,i,o){var s=this,a=this.context,l=this.props;return(e=function(e,t,n,r,i){return wa(e,t,n,r),function(e,t){for(var n=0,r=e;n<r.length;n++)(c=r[n]).level=null,c.forwardCoord=null,c.backwardCoord=null,c.forwardPressure=null;var i,o=function(e){var t,n,r,i=[];for(t=0;t<e.length;t++){for(n=e[t],r=0;r<i.length&&xa(n,i[r]).length;r++);n.level=r,(i[r]||(i[r]=[])).push(n)}return i}(e=pn(e,t));if(function(e){var t,n,r,i,o;for(t=0;t<e.length;t++)for(n=e[t],r=0;r<n.length;r++)for((i=n[r]).forwardSegs=[],o=t+1;o<e.length;o++)xa(i,e[o],i.forwardSegs)}(o),i=o[0]){for(var s=0,a=i;s<a.length;s++)ka(c=a[s]);for(var l=0,u=i;l<u.length;l++){var c;Sa(c=u[l],0,0,t)}}return e}(e,i)}(e,l.date,l.slatCoords,a.options.eventMinHeight,a.options.eventOrder)).map((function(e){var a=e.eventRange.instance.instanceId,u=n||i||o?r({left:0,right:0},s.computeSegTopBottomCss(e)):s.computeFgSegPositionCss(e);return Lr("div",{className:"fc-timegrid-event-harness"+(e.level>0?" fc-timegrid-event-harness-inset":""),key:a,style:r({visibility:t[a]?"hidden":""},u)},Lr(Da,r({seg:e,isDragging:n,isResizing:i,isDateSelecting:o,isSelected:a===l.eventSelection,isCondensed:e.bottom-e.top<no.timeGridEventCondensedHeight},_n(e,l.todayRange,l.nowDate))))}))},t.prototype.renderFillSegs=function(e,t){var n=this,i=this.context,o=this.props;if(o.slatCoords){wa(e,o.date,o.slatCoords,i.options.eventMinHeight);var s=e.map((function(e){return Lr("div",{key:wn(e.eventRange),className:"fc-timegrid-bg-harness",style:n.computeSegTopBottomCss(e)},"bg-event"===t?Lr(es,r({seg:e},_n(e,o.todayRange,o.nowDate))):Qo(t))}));return Lr(Rr,null,s)}},t.prototype.renderNowIndicator=function(e){var t=this.props,n=t.slatCoords,r=t.date;if(n)return e.map((function(e,t){return Lr(Go,{isAxis:!1,date:r,key:t},(function(t,i,o,s){return Lr("div",{ref:t,className:["fc-timegrid-now-indicator-line"].concat(i).join(" "),style:{top:n.computeDateTop(e.start,r)}},s)}))}))},t.prototype.computeFgSegPositionCss=function(e){var t,n,i=this.context,o=i.isRtl,s=i.options.slotEventOverlap,a=e.backwardCoord,l=e.forwardCoord;s&&(l=Math.min(1,a+2*(l-a))),o?(t=1-l,n=a):(t=a,n=1-l);var u={zIndex:e.level+1,left:100*t+"%",right:100*n+"%"};return s&&e.forwardPressure&&(u[o?"marginLeft":"marginRight"]=20),r(r({},u),this.computeSegTopBottomCss(e))},t.prototype.computeSegTopBottomCss=function(e){return{top:e.top,bottom:-e.bottom}},t}(Br),Ma=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,t){return t&&Lr("div",{className:"fc-timegrid-col-misc",ref:e},t)}))},t}(Br),Aa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitFgEventSegs=ot(_a),t.splitBgEventSegs=ot(_a),t.splitBusinessHourSegs=ot(_a),t.splitNowIndicatorSegs=ot(_a),t.splitDateSelectionSegs=ot(_a),t.splitEventDrag=ot(ba),t.splitEventResize=ot(ba),t.rootElRef=Nr(),t.cellElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.nowIndicator&&t.slatCoords&&t.slatCoords.safeComputeTop(t.nowDate),r=t.cells.length,i=this.splitFgEventSegs(t.fgEventSegs,r),o=this.splitBgEventSegs(t.bgEventSegs,r),s=this.splitBusinessHourSegs(t.businessHourSegs,r),a=this.splitNowIndicatorSegs(t.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),u=this.splitEventDrag(t.eventDrag,r),c=this.splitEventResize(t.eventResize,r);return Lr("div",{className:"fc-timegrid-cols",ref:this.rootElRef},Lr("table",{style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,Lr("tbody",null,Lr("tr",null,t.axis&&Lr("td",{className:"fc-timegrid-col fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&Lr(Go,{isAxis:!0,date:t.nowDate},(function(e,t,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(t).join(" "),style:{top:n}},i)}))))),t.cells.map((function(n,r){return Lr(Ca,{key:n.key,elRef:e.cellElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,nowDate:t.nowDate,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,fgEventSegs:i[r],bgEventSegs:o[r],businessHourSegs:s[r],nowIndicatorSegs:a[r],dateSelectionSegs:l[r],eventDrag:u[r],eventResize:c[r],slatCoords:t.slatCoords,eventSelection:t.eventSelection,forPrint:t.forPrint})}))))))},t.prototype.componentDidMount=function(){this.updateCoords()},t.prototype.componentDidUpdate=function(){this.updateCoords()},t.prototype.updateCoords=function(){var e,t=this.props;t.onColCoords&&null!==t.clientWidth&&t.onColCoords(new Er(this.rootElRef.current,(e=this.cellElRefs.currentMap,t.cells.map((function(t){return e[t.key]}))),!0,!1))},t}(Br),Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processSlotOptions=ot(La),t.state={slatCoords:null},t.handleScrollRequest=function(e){var n=t.props.onScrollTopRequest,r=t.state.slatCoords;if(n&&r){if(e.time){var i=r.computeTimeTop(e.time);(i=Math.ceil(i))&&i++,n(i)}return!0}},t.handleColCoords=function(e){t.colCoords=e},t.handleSlatCoords=function(e){t.setState({slatCoords:e}),t.props.onSlatCoords&&t.props.onSlatCoords(e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return Lr("div",{className:"fc-timegrid-body",ref:e.rootElRef,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Lr(ua,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),Lr(Aa,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))},t.prototype.componentDidMount=function(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},t.prototype.componentDidUpdate=function(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)},t.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},t.prototype.positionToHit=function(e,t){var n=this.context,r=n.dateEnv,i=n.options,o=this.colCoords,s=this.props.dateProfile,a=this.state.slatCoords,l=this.processSlotOptions(this.props.slotDuration,i.snapDuration),u=l.snapDuration,c=l.snapsPerSlot,d=o.leftToIndex(e),h=a.positions.topToIndex(t);if(null!=d&&null!=h){var p=a.positions.tops[h],f=a.positions.getHeight(h),m=(t-p)/f,g=h*c+Math.floor(m*c),v=this.props.cells[d].date,y=Ke(s.slotMinTime,Ze(u,g)),_=r.add(v,y);return{col:d,dateSpan:{range:{start:_,end:r.add(_,u)},allDay:!1},dayEl:o.els[d],relativeRect:{left:o.lefts[d],right:o.rights[d],top:p,bottom:p+f}}}},t}(Br);function La(e,t){var n=t||e,r=Qe(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var Oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayRanges=ot(Na),t.slicer=new Ra,t.timeColsRef=Nr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,i=t.dateProfile,o=t.dayTableModel,s=n.options.nowIndicator,a=this.buildDayRanges(o,i,n.dateEnv);return Lr(bo,{unit:s?"minute":"day"},(function(l,u){return Lr(Ia,r({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.slicer.sliceProps(t,i,null,n,a),{forPrint:t.forPrint,axis:t.axis,dateProfile:i,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:o.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:l,nowIndicatorSegs:s&&e.slicer.sliceNowDate(l,n,a),todayRange:u,onScrollTopRequest:t.onScrollTopRequest,onSlatCoords:t.onSlatCoords}))}))},t.prototype.queryHit=function(e,t){var n=this.timeColsRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ti);function Na(e,t,n){for(var r=[],i=0,o=e.headerDates;i<o.length;i++){var s=o[i];r.push({start:n.add(s,t.slotMinTime),end:n.add(s,t.slotMaxTime)})}return r}var Ra=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.sliceRange=function(e,t){for(var n=[],r=0;r<t.length;r++){var i=tn(e,t[r]);i&&n.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return n},t}(Eo),Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildTimeColsModel=ot(Fa),t.buildSlatMetas=ot(fa),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.dateEnv,o=t.dateProfileGenerator,s=this.props,a=s.dateProfile,l=this.buildTimeColsModel(a,o),u=this.allDaySplitter.splitProps(s),c=this.buildSlatMetas(a.slotMinTime,a.slotMaxTime,n.slotLabelInterval,n.slotDuration,i),d=n.dayMinWidth,h=!d,p=d,f=n.dayHeaders&&Lr(xo,{dates:l.headerDates,dateProfile:a,datesRepDistinctDays:!0,renderIntro:h?this.renderHeadAxis:null}),m=!1!==n.allDaySlot&&function(t){return Lr(ta,r({},u.allDay,{dateProfile:a,dayTableModel:l,nextDayThreshold:n.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:h?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:s.forPrint},e.getAllDayMaxEventProps()))},g=function(t){return Lr(Oa,r({},u.timed,{dayTableModel:l,dateProfile:a,axis:h,slotDuration:n.slotDuration,slatMetas:c,forPrint:s.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return p?this.renderHScrollLayout(f,m,g,l.colCnt,d,c,this.state.slatCoords):this.renderSimpleLayout(f,m,g)},t}(ga);function Fa(e,t){var n=new So(e.renderRange,t);return new To(n,!1)}var ja=ni({initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:Pa,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}}),Ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.dayDate,n=e.todayRange,i=this.context,o=i.theme,s=i.dateEnv,a=i.options,l=i.viewApi,u=hr(t,n),c=a.listDayFormat?s.format(t,a.listDayFormat):"",d=a.listDaySideFormat?s.format(t,a.listDaySideFormat):"",h=a.navLinks?fr(t):null,p=r({date:s.toDate(t),view:l,text:c,sideText:d,navLinkData:h},u),f=["fc-list-day"].concat(pr(u,o));return Lr(oi,{hookProps:p,classNames:a.dayHeaderClassNames,content:a.dayHeaderContent,defaultContent:Va,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},(function(e,n,r,i){return Lr("tr",{ref:e,className:f.concat(n).join(" "),"data-date":tt(t)},Lr("th",{colSpan:3},Lr("div",{className:"fc-list-day-cushion "+o.getClass("tableCellShaded"),ref:r},i)))}))},t}(Br);function Va(e){var t=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return Lr(Rr,null,e.text&&Lr("a",r({className:"fc-list-day-text"},t),e.text),e.sideText&&Lr("a",r({className:"fc-list-day-side-text"},t),e.sideText))}var Ha=bt({hour:"numeric",minute:"2-digit",meridiem:"short"}),Ba=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||Ha;return Lr(qo,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:Ua,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,i,o,s,a){return Lr("tr",{className:["fc-list-event",a.event.url?"fc-event-forced-url":""].concat(i).join(" "),ref:e},function(e,t,n){var r=n.options;if(!1!==r.displayEventTime){var i=e.eventRange.def,o=e.eventRange.instance,s=!1,a=void 0;if(i.allDay?s=!0:Xt(e.eventRange.range)?e.isStart?a=yn(e,t,n,null,null,o.range.start,e.end):e.isEnd?a=yn(e,t,n,null,null,e.start,o.range.end):s=!0:a=yn(e,t,n),s){var l={text:n.options.allDayText,view:n.viewApi};return Lr(oi,{hookProps:l,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:za,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return Lr("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return Lr("td",{className:"fc-list-event-time"},a)}return null}(n,r,t),Lr("td",{className:"fc-list-event-graphic"},Lr("span",{className:"fc-list-event-dot",style:{borderColor:a.borderColor||a.backgroundColor}})),Lr("td",{className:"fc-list-event-title",ref:o},s))}))},t}(Br);function Ua(e){var t=e.event,n=t.url;return Lr("a",r({},n?{href:n}:{}),t.title)}function za(e){return e.text}var qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=ot($a),t.eventStoreToSegs=ot(t._eventStoreToSegs),t.setRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=["fc-list",n.theme.getClass("table"),!1!==n.options.stickyHeaderDates?"fc-list-sticky":""],i=this.computeDateVars(t.dateProfile),o=i.dayDates,s=i.dayRanges,a=this.eventStoreToSegs(t.eventStore,t.eventUiBases,s);return Lr(pi,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,i){return Lr("div",{ref:n,className:r.concat(i).join(" ")},Lr(Mo,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},a.length>0?e.renderSegList(a,o):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Lr(oi,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:Wa,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Lr("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Lr("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,i=n.theme,o=n.options,s=function(e){var t,n,r=[];for(t=0;t<e.length;t++)(r[(n=e[t]).dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return Lr(bo,{unit:"day"},(function(e,n){for(var a=[],l=0;l<s.length;l++){var u=s[l];if(u){var c=t[l].toISOString();a.push(Lr(Ya,{key:c,dayDate:t[l],todayRange:n}));for(var d=0,h=u=pn(u,o.eventOrder);d<h.length;d++){var p=h[d];a.push(Lr(Ba,r({key:c+":"+p.eventRange.instance.instanceId,seg:p,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1},_n(p,n,e))))}}}return Lr("table",{className:"fc-list-table "+i.getClass("table")},Lr("tbody",null,a))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(an(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)},t.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.eventRangeToSegs(o,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,i,o=this.context.dateEnv,s=this.context.options.nextDayThreshold,a=e.range,l=e.def.allDay,u=[];for(n=0;n<t.length;n++)if((r=tn(a,t[n]))&&(i={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===a.end.valueOf(),dayIndex:n},u.push(i),!i.isEnd&&!l&&n+1<t.length&&a.end<o.add(t[n+1].start,s))){i.end=a.end,i.isEnd=!0;break}return u},t}(ti);function Wa(e){return e.text}function $a(e){for(var t=xe(e.renderRange.start),n=e.renderRange.end,r=[],i=[];t<n;)r.push(t),i.push({start:t,end:me(t,1)}),t=me(t,1);return{dayDates:r,dayRanges:i}}function Ga(e){return!1===e?null:bt(e)}var Ka=ni({optionRefiners:{listDayFormat:Ga,listDaySideFormat:Ga,noEventsClassNames:At,noEventsContent:At,noEventsDidMount:At,noEventsWillUnmount:At},views:{list:{component:qa,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}}),Za=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);Za.prototype.classes={root:"fc-theme-bootstrap",table:"table-bordered",tableCellShaded:"table-active",buttonGroup:"btn-group",button:"btn btn-primary",buttonActive:"active",popover:"popover",popoverHeader:"popover-header",popoverContent:"popover-body"},Za.prototype.baseIconClass="fa",Za.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},Za.prototype.rtlIconClasses={prev:"fa-chevron-right",next:"fa-chevron-left",prevYear:"fa-angle-double-right",nextYear:"fa-angle-double-left"},Za.prototype.iconOverrideOption="bootstrapFontAwesome",Za.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",Za.prototype.iconOverridePrefix="fa-";var Xa=ni({themeClasses:{bootstrap:Za}}),Ja=ni({eventSourceDefs:[{parseMeta:function(e){var t=e.googleCalendarId;return!t&&e.url&&(t=function(e){var t;return/^[^/]+@([^/.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^/]*)/.exec(e))?decodeURIComponent(t[1]):void 0}(e.url)),t?{googleCalendarId:t,googleCalendarApiKey:e.googleCalendarApiKey,googleCalendarApiBase:e.googleCalendarApiBase,extraParams:e.extraParams}:null},fetch:function(e,t,n){var i=e.context,o=i.dateEnv,s=i.options,a=e.eventSource.meta,l=a.googleCalendarApiKey||s.googleCalendarApiKey;if(l){var u=function(e){var t=e.googleCalendarApiBase;return t||(t="https://www.googleapis.com/calendar/v3/calendars"),t+"/"+encodeURIComponent(e.googleCalendarId)+"/events"}(a),c=a.extraParams,d="function"==typeof c?c():c,h=function(e,t,n,i){var o,s,a;return i.canComputeOffset?(s=i.formatIso(e.start),a=i.formatIso(e.end)):(s=me(e.start,-1).toISOString(),a=me(e.end,1).toISOString()),o=r(r({},n||{}),{key:t,timeMin:s,timeMax:a,singleEvents:!0,maxResults:9999}),"local"!==i.timeZone&&(o.timeZone=i.timeZone),o}(e.range,l,d,o);Li("GET",u,h,(function(e,r){var i,o;e.error?n({message:"Google Calendar API: "+e.error.message,errors:e.error.errors,xhr:r}):t({rawEvents:(i=e.items,o=h.timeZone,i.map((function(e){return function(e,t){var n=e.htmlLink||null;return n&&t&&(n=function(e,t){return e.replace(/(\?.*?)?(#|$)/,(function(e,n,r){return(n?n+"&":"?")+t+r}))}(n,"ctz="+t)),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:n,location:e.location,description:e.description}}(e,o)}))),xhr:r})}),(function(e,t){n({message:e,xhr:t})}))}else n({message:"Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"})}}],optionRefiners:{googleCalendarApiKey:String},eventSourceRefiners:{googleCalendarApiKey:String,googleCalendarId:String,googleCalendarApiBase:String,extraParams:At}});return Ri.push(Is,oa,ja,Ka,Xa,Ja),e.BASE_OPTION_DEFAULTS=xt,e.BASE_OPTION_REFINERS=wt,e.BaseComponent=Br,e.BgEvent=es,e.BootstrapTheme=Za,e.Calendar=is,e.CalendarApi=jn,e.CalendarContent=co,e.CalendarDataManager=Hi,e.CalendarDataProvider=Xi,e.CalendarRoot=fo,e.Component=Ir,e.ContentHook=ai,e.CustomContentRenderContext=si,e.DateComponent=ti,e.DateEnv=$n,e.DateProfileGenerator=yi,e.DayCellContent=Xo,e.DayCellRoot=Zo,e.DayGridView=ra,e.DayHeader=xo,e.DaySeriesModel=So,e.DayTable=ta,e.DayTableModel=To,e.DayTableSlicer=na,e.DayTimeCols=Oa,e.DayTimeColsSlicer=Ra,e.DayTimeColsView=Pa,e.DelayedRunner=ji,e.Draggable=Cs,e.ElementDragging=to,e.ElementScrollController=Cr,e.Emitter=Tr,e.EventApi=Yn,e.EventRoot=qo,e.EventSourceApi=j,e.FeaturefulElementDragging=gs,e.Fragment=Rr,e.Interaction=Ji,e.ListView=qa,e.MountHook=ui,e.NamedTimeZoneImpl=function(e){this.timeZoneName=e},e.NowIndicatorRoot=Go,e.NowTimer=bo,e.PointerDragging=ls,e.PositionCache=Er,e.RefMap=Ao,e.RenderHook=oi,e.ScrollController=Dr,e.ScrollResponder=jr,e.Scroller=Mo,e.SimpleScrollGrid=zo,e.Slicer=Eo,e.Splitter=cr,e.StandardEvent=Wo,e.Table=Js,e.TableDateCell=vo,e.TableDowCell=yo,e.TableView=Ls,e.Theme=Ar,e.ThirdPartyDraggable=As,e.TimeCols=Ia,e.TimeColsSlatsCoords=aa,e.TimeColsView=ga,e.ViewApi=On,e.ViewContextType=Yr,e.ViewRoot=pi,e.WeekNumberRoot=ns,e.WindowScrollController=Mr,e.addDays=me,e.addDurations=Ke,e.addMs=ge,e.addWeeks=fe,e.allowContextMenu=ie,e.allowSelection=ne,e.applyMutationToEventStore=An,e.applyStyle=z,e.applyStyleProp=q,e.asCleanDays=function(e){return e.years||e.months||e.milliseconds?0:e.days},e.asRoughMinutes=function(e){return Je(e)/6e4},e.asRoughMs=Je,e.asRoughSeconds=function(e){return Je(e)/1e3},e.buildClassNameNormalizer=ci,e.buildDayRanges=Na,e.buildDayTableModel=ia,e.buildEventApis=Hn,e.buildEventRangeKey=wn,e.buildHashFromArray=function(e,t){for(var n={},r=0;r<e.length;r++){var i=t(e[r],r);n[i[0]]=i[1]}return n},e.buildNavLinkData=fr,e.buildSegCompareObj=fn,e.buildSegTimeText=yn,e.buildSlatMetas=fa,e.buildTimeColsModel=Fa,e.collectFromHash=Be,e.combineEventUis=Yt,e.compareByFieldSpec=ae,e.compareByFieldSpecs=se,e.compareNumbers=ce,e.compareObjs=Ve,e.computeEdges=br,e.computeFallbackHeaderFormat=mo,e.computeHeightAndMargins=function(e){return e.getBoundingClientRect().height+function(e){var t=window.getComputedStyle(e);return parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(e)},e.computeInnerRect=wr,e.computeRect=xr,e.computeSegDraggable=mn,e.computeSegEndResizable=vn,e.computeSegStartResizable=gn,e.computeShrinkWidth=Io,e.computeSmallestCellWidth=he,e.computeVisibleDayRange=Zt,e.config=no,e.constrainPoint=or,e.createContext=Pr,e.createDuration=$e,e.createElement=Lr,e.createEmptyEventStore=function(){return{defs:{},instances:{}}},e.createEventInstance=Ie,e.createEventUi=jt,e.createFormatter=bt,e.createPlugin=ni,e.createRef=Nr,e.diffDates=Jt,e.diffDayAndTime=_e,e.diffDays=ye,e.diffPoints=ar,e.diffWeeks=ve,e.diffWholeDays=we,e.diffWholeWeeks=be,e.disableCursor=Q,e.elementClosest=V,e.elementMatches=H,e.enableCursor=ee,e.eventTupleToStore=Lt,e.filterEventStoreDefs=Rt,e.filterHash=Ne,e.findDirectChildren=function(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].children,s=0;s<o.length;s++){var a=o[s];t&&!H(a,t)||r.push(a)}return r},e.findElements=B,e.flexibleCompare=le,e.flushToDom=Fr,e.formatDate=function(e,t){void 0===t&&(t={});var n=Qn(t),r=bt(t),i=n.createMarkerMeta(e);return i?n.format(i.marker,r,{forcedTzo:i.forcedTzo}):""},e.formatDayString=tt,e.formatIsoTimeString=nt,e.formatRange=function(e,t,n){var r=Qn("object"==typeof n&&n?n:{}),i=bt(n),o=r.createMarkerMeta(e),s=r.createMarkerMeta(t);return o&&s?r.formatRange(o.marker,s.marker,i,{forcedStartTzo:o.forcedTzo,forcedEndTzo:s.forcedTzo,isEndExclusive:n.isEndExclusive,defaultSeparator:xt.defaultRangeSeparator}):""},e.getAllowYScrolling=Oo,e.getCanVGrowWithinCell=lr,e.getClippingParents=kr,e.getDateMeta=hr,e.getDayClassNames=pr,e.getDefaultEventEnd=Mn,e.getElSeg=cn,e.getEventClassNames=bn,e.getIsRtlScrollbarOnLeft=vr,e.getRectCenter=sr,e.getRelevantEvents=Ot,e.getScrollGridClassNames=Yo,e.getScrollbarWidths=yr,e.getSectionClassNames=Vo,e.getSectionHasLiquidHeight=Lo,e.getSegMeta=_n,e.getSlotClassNames=function(e,t){var n=["fc-slot","fc-slot-"+pe[e.dow]];return e.isDisabled?n.push("fc-slot-disabled"):(e.isToday&&(n.push("fc-slot-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-slot-past"),e.isFuture&&n.push("fc-slot-future")),n},e.getStickyFooterScrollbar=Uo,e.getStickyHeaderDates=Bo,e.getUnequalProps=Ye,e.globalLocales=Gn,e.globalPlugins=Ri,e.greatestDurationDenominator=et,e.guid=J,e.hasBgRendering=ln,e.hasShrinkWidth=jo,e.identity=At,e.interactionSettingsStore=eo,e.interactionSettingsToStore=Qi,e.intersectRanges=tn,e.intersectRects=ir,e.isArraysEqual=it,e.isColPropsEqual=Ro,e.isDateSpansEqual=Sn,e.isInt=de,e.isInteractionValid=Gr,e.isMultiDayRange=Xt,e.isPropsEqual=je,e.isPropsValid=Zr,e.isValidDate=Me,e.listenBySelector=G,e.mapHash=Re,e.memoize=ot,e.memoizeArraylike=function(e,t,n){var r=[],i=[];return function(o){for(var s=r.length,a=o.length,l=0;l<s;l++)if(o[l]){if(!it(r[l],o[l])){n&&n(i[l]);var u=e.apply(this,o[l]);t&&t(u,i[l])||(i[l]=u)}}else n&&n(i[l]);for(;l<a;l++)i[l]=e.apply(this,o[l]);return r=o,i.splice(a),i}},e.memoizeHashlike=function(e,t,n){var r={},i={};return function(o){var s={};for(var a in o)if(i[a])if(it(r[a],o[a]))s[a]=i[a];else{n&&n(i[a]);var l=e.apply(this,o[a]);s[a]=t&&t(l,i[a])?i[a]:l}else s[a]=e.apply(this,o[a]);return r=o,i=s,s}},e.memoizeObjArg=st,e.mergeEventStores=Nt,e.multiplyDuration=Ze,e.padStart=ue,e.parseBusinessHours=nr,e.parseClassNames=Pt,e.parseDragMeta=io,e.parseEventDef=Gt,e.parseFieldSpecs=oe,e.parseMarker=Wn,e.pointInsideRect=rr,e.preventContextMenu=re,e.preventDefault=W,e.preventSelection=te,e.rangeContainsMarker=sn,e.rangeContainsRange=on,e.rangesEqual=nn,e.rangesIntersect=rn,e.refineEventDef=Wt,e.refineProps=Mt,e.removeElement=Y,e.removeExact=function(e,t){for(var n=0,r=0;r<e.length;)e[r]===t?(e.splice(r,1),n++):r++;return n},e.render=Or,e.renderChunkContent=No,e.renderFill=Qo,e.renderMicroColGroup=Po,e.renderScrollShim=Ho,e.requestJson=Li,e.sanitizeShrinkWidth=Fo,e.setElSeg=un,e.setRef=qr,e.sliceEventStore=an,e.sliceEvents=function(e,t){return an(e.eventStore,e.eventUiBases,e.dateProfile.activeRange,t?e.nextDayThreshold:null).fg},e.sortEventSegs=pn,e.startOfDay=xe,e.translateRect=function(e,t,n){return{left:e.left+t,right:e.right+t,top:e.top+n,bottom:e.bottom+n}},e.triggerDateSelect=Dn,e.unpromisify=Sr,e.version="5.3.1",e.whenTransitionDone=Z,e.wholeDivideDurations=Qe,e}({});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).jsSHA=t()}(this,(function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,s,a=t||[0],l=(n=n||0)>>>3,u=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(s=i+l)>>>2,a.length<=o&&a.push(0),a[o]|=e[i]<<8*(u+r*(s%4));return{value:a,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,s,a;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var l=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(s=(a=(i>>>1)+u)>>>2;l.length<=s;)l.push(0);l[s]|=o<<8*(c+r*(a%4))}return{value:l,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,s,a,l,u,c,d,h,p=0,f=n||[0],m=(r=r||0)>>>3;if("UTF8"===t)for(d=-1===i?3:0,a=0;a<e.length;a+=1)for(s=[],128>(o=e.charCodeAt(a))?s.push(o):2048>o?(s.push(192|o>>>6),s.push(128|63&o)):55296>o||57344<=o?s.push(224|o>>>12,128|o>>>6&63,128|63&o):(a+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(a)),s.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),l=0;l<s.length;l+=1){for(u=(c=p+m)>>>2;f.length<=u;)f.push(0);f[u]|=s[l]<<8*(d+i*(c%4)),p+=1}else for(d=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,a=0;a<e.length;a+=1){for(o=e.charCodeAt(a),!0===h&&(o=(l=255&o)<<8|o>>>8),u=(c=p+m)>>>2;f.length<=u;)f.push(0);f[u]|=o<<8*(d+i*(c%4)),p+=2}return{value:f,binLen:8*p+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,s,a,l,u,c,d=0,h=n||[0],p=(r=r||0)>>>3,f=-1===i?3:0,m=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==m&&m<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(l=e.substr(o,4),a=0,s=0;s<l.length;s+=1)a|=t.indexOf(l.charAt(s))<<18-6*s;for(s=0;s<l.length-1;s+=1){for(u=(c=d+p)>>>2;h.length<=u;)h.push(0);h[u]|=(a>>>16-8*s&255)<<8*(f+i*(c%4)),d+=1}}return{value:h,binLen:8*d+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,s,a,l=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),s=(a=o+u)>>>2,l.length<=s&&l.push(0),l[s]|=i<<8*(c+r*(a%4));return{value:l,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,s="",a=t/8,l=-1===n?3:0;for(i=0;i<a;i+=1)o=e[i>>>2]>>>8*(l+n*(i%4)),s+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?s.toUpperCase():s}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,s,a,l,u,c="",d=n/8,h=-1===r?3:0;for(o=0;o<d;o+=3)for(l=o+1<d?e[o+1>>>2]:0,u=o+2<d?e[o+2>>>2]:0,a=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(l>>>8*(h+r*((o+1)%4))&255)<<8|u>>>8*(h+r*((o+2)%4))&255,s=0;s<4;s+=1)c+=8*o+6*s<=n?t.charAt(a>>>6*(3-s)&63):i.b64Pad;return c}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",s=t/8,a=-1===n?3:0;for(r=0;r<s;r+=1)i=e[r>>>2]>>>8*(a+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),s=new Uint8Array(o),a=-1===n?3:0;for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(a+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,s=new Uint8Array(i);for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return s}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],a=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function l(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function u(e,t){return e>>>t|e<<32-t}function c(e,t){return e>>>t}function d(e,t,n){return e&t^~e&n}function h(e,t,n){return e&t^e&n^t&n}function p(e){return u(e,2)^u(e,13)^u(e,22)}function f(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function m(e,t,n,r){var i=(65535&e)+(65535&t)+(65535&n)+(65535&r);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16))<<16|65535&i}function g(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function v(e){return u(e,7)^u(e,18)^c(e,3)}function y(e){return u(e,6)^u(e,11)^u(e,25)}function _(e){return"SHA-224"==e?s.slice():a.slice()}function b(e,t){var n,r,i,s,a,l,_,b,w,x,k,S,T=[];for(n=t[0],r=t[1],i=t[2],s=t[3],a=t[4],l=t[5],_=t[6],b=t[7],k=0;k<64;k+=1)T[k]=k<16?e[k]:m(u(S=T[k-2],17)^u(S,19)^c(S,10),T[k-7],v(T[k-15]),T[k-16]),w=g(b,y(a),d(a,l,_),o[k],T[k]),x=f(p(n),h(n,r,i)),b=_,_=l,l=a,a=f(s,w),s=i,i=r,r=n,n=f(w,x);return t[0]=f(n,t[0]),t[1]=f(r,t[1]),t[2]=f(i,t[2]),t[3]=f(s,t[3]),t[4]=f(a,t[4]),t[5]=f(l,t[5]),t[6]=f(_,t[6]),t[7]=f(b,t[7]),t}return function(t){function n(e,n,i){var o=this;if("SHA-224"!==e&&"SHA-256"!==e)throw new Error("Chosen SHA variant is not supported");var s=i||{};return(o=t.call(this,e,n,i)||this).t=o.i,o.o=!0,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=b,o.p=function(e){return e.slice()},o.l=_,o.R=function(t,n,r,i){return function(e,t,n,r,i){for(var o,s=15+(t+65>>>9<<4),a=t+n;e.length<=s;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[s]=4294967295&a,e[s-1]=a/4294967296|0,o=0;o<e.length;o+=16)r=b(e.slice(o,o+16),r);return"SHA-224"===i?[r[0],r[1],r[2],r[3],r[4],r[5],r[6]]:r}(t,n,r,i,e)},o.U=_(e),o.T=512,o.m="SHA-224"===e?224:256,o.F=!1,s.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,s.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.H=0,this.S=!1,this.I=0,this.C=!1,this.L=[],this.N=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.H),o=i.binLen,s=i.value,a=o>>>5;for(t=0;t<a;t+=r)n+this.T<=o&&(this.U=this.A(s.slice(t,t+r),this.U),n+=this.T);this.I+=n,this.Y=s.slice(n>>>5),this.H=o%this.T,this.S=!0},e.prototype.getHash=function(e,t){var n,r,o=this.m,s=l(t);if(this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");o=s.outputLen}var a=i(e,o,this.u,s);if(this.C&&this.t)return a(this.t(s));for(r=this.R(this.Y.slice(),this.H,this.I,this.p(this.U),o),n=1;n<this.numRounds;n+=1)this.F&&o%32!=0&&(r[r.length-1]&=16777215>>>24-o%32),r=this.R(r,o,0,this.l(this.g),o);return a(r)},e.prototype.setHMACKey=function(e,t,n){if(!this.o)throw new Error("Variant does not support HMAC");if(this.S)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(this.C)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.L[t]=909522486^e.value[t],this.N[t]=1549556828^e.value[t];this.U=this.A(this.L,this.U),this.I=this.T,this.C=!0},e.prototype.getHMAC=function(e,t){var n=l(t);return i(e,this.m,this.u,n)(this.i())},e.prototype.i=function(){var e;if(!this.C)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.H,this.I,this.p(this.U),this.m);return e=this.A(this.N,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())})),
519
519
  /*!
520
520
  *
521
521
  * Super simple wysiwyg editor v0.8.18
@@ -610,7 +610,7 @@ function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery",
610
610
  * http://jquery.org/license
611
611
  */
612
612
  function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./draggable","./mouse","../version","../widget"],e):e(jQuery)}((function(e){"use strict";return e.widget("ui.droppable",{version:"1.13.2",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,t=this.options,n=t.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof n?n:function(e){return e.is(n)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(t.scope),t.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,n){if("accept"===t)this.accept="function"==typeof n?n:function(e){return e.is(n)};else if("scope"===t){var r=e.ui.ddmanager.droppables[this.options.scope];this._splice(r),this._addToManager(n)}this._super(t,n)},_activate:function(t){var n=e.ui.ddmanager.current;this._addActiveClass(),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this._removeActiveClass(),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var r=n||e.ui.ddmanager.current,i=!1;return!(!r||(r.currentItem||r.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var n=e(this).droppable("instance");if(n.options.greedy&&!n.options.disabled&&n.options.scope===r.options.scope&&n.accept.call(n.element[0],r.currentItem||r.element)&&e.ui.intersect(r,e.extend(n,{offset:n.element.offset()}),n.options.tolerance,t))return i=!0,!1})),!i&&(!!this.accept.call(this.element[0],r.currentItem||r.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(r)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),e.ui.intersect=function(){function e(e,t,n){return e>=t&&e<t+n}return function(t,n,r,i){if(!n.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,s=(t.positionAbs||t.position.absolute).top+t.margins.top,a=o+t.helperProportions.width,l=s+t.helperProportions.height,u=n.offset.left,c=n.offset.top,d=u+n.proportions().width,h=c+n.proportions().height;switch(r){case"fit":return u<=o&&a<=d&&c<=s&&l<=h;case"intersect":return u<o+t.helperProportions.width/2&&a-t.helperProportions.width/2<d&&c<s+t.helperProportions.height/2&&l-t.helperProportions.height/2<h;case"pointer":return e(i.pageY,c,n.proportions().height)&&e(i.pageX,u,n.proportions().width);case"touch":return(s>=c&&s<=h||l>=c&&l<=h||s<c&&l>h)&&(o>=u&&o<=d||a>=u&&a<=d||o<u&&a>d);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,n){var r,i,o=e.ui.ddmanager.droppables[t.options.scope]||[],s=n?n.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(r=0;r<o.length;r++)if(!(o[r].options.disabled||t&&!o[r].accept.call(o[r].element[0],t.currentItem||t.element))){for(i=0;i<a.length;i++)if(a[i]===o[r].element[0]){o[r].proportions().height=0;continue e}o[r].visible="none"!==o[r].element.css("display"),o[r].visible&&("mousedown"===s&&o[r]._activate.call(o[r],n),o[r].offset=o[r].element.offset(),o[r].proportions({width:o[r].element[0].offsetWidth,height:o[r].element[0].offsetHeight}))}},drop:function(t,n){var r=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,n)&&(r=this._drop.call(this,n)||r),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,n)))})),r},dragStart:function(t,n){t.element.parentsUntil("body").on("scroll.droppable",(function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}))},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var r,i,o,s=e.ui.intersect(t,this,this.options.tolerance,n),a=!s&&this.isover?"isout":s&&!this.isover?"isover":null;a&&(this.options.greedy&&(i=this.options.scope,(o=this.element.parents(":data(ui-droppable)").filter((function(){return e(this).droppable("instance").options.scope===i}))).length&&((r=e(o[0]).droppable("instance")).greedyChild="isover"===a)),r&&"isover"===a&&(r.isover=!1,r.isout=!0,r._out.call(r,n)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,n),r&&"isout"===a&&(r.isout=!1,r.isover=!0,r._over.call(r,n)))}}))},dragStop:function(t,n){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}},!1!==e.uiBackCompat&&e.widget("ui.droppable",e.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),e.ui.droppable})),function(e,t,n,r){"use strict";function i(e,t,n){return setTimeout(u(e,n),t)}function o(e,t,n){return!!Array.isArray(e)&&(s(e,n[t],n),!0)}function s(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==r)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function a(t,n,r){var i="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,i,r),t.apply(this,arguments)}}function l(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&re(r,n)}function u(e,t){return function(){return e.apply(t,arguments)}}function c(e,t){return typeof e==se?e.apply(t&&t[0]||r,t):e}function d(e,t){return e===r?t:e}function h(e,t,n){s(g(t),(function(t){e.addEventListener(t,n,!1)}))}function p(e,t,n){s(g(t),(function(t){e.removeEventListener(t,n,!1)}))}function f(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function m(e,t){return e.indexOf(t)>-1}function g(e){return e.trim().split(/\s+/g)}function v(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function y(e){return Array.prototype.slice.call(e,0)}function _(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var s=t?e[o][t]:e[o];v(i,s)<0&&r.push(e[o]),i[o]=s,o++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}function b(e,t){for(var n,i,o=t[0].toUpperCase()+t.slice(1),s=0;s<ie.length;){if((i=(n=ie[s])?n+o:t)in e)return i;s++}return r}function w(t){var n=t.ownerDocument||t;return n.defaultView||n.parentWindow||e}function x(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){c(e.options.enable,[e])&&n.handler(t)},this.init()}function k(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,o=t&_e&&r-i==0,s=t&(we|xe)&&r-i==0;n.isFirst=!!o,n.isFinal=!!s,o&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||(n.firstInput=T(t)),i>1&&!n.firstMultiple?n.firstMultiple=T(t):1===i&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,a=s?s.center:o.center,l=t.center=E(r);t.timeStamp=ue(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=A(a,l),t.distance=M(a,l),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};t.eventType!==_e&&o.eventType!==we||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=C(t.deltaX,t.deltaY);var u=D(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=u.x,t.overallVelocityY=u.y,t.overallVelocity=le(u.x)>le(u.y)?u.x:u.y,t.scale=s?function(e,t){return M(t[0],t[1],Le)/M(e[0],e[1],Le)}(s.pointers,r):1,t.rotation=s?function(e,t){return A(t[1],t[0],Le)+A(e[1],e[0],Le)}(s.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,S(n,t);var c=e.element;f(t.srcEvent.target,c)&&(c=t.srcEvent.target),t.target=c}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function S(e,t){var n,i,o,s,a=e.lastInterval||t,l=t.timeStamp-a.timeStamp;if(t.eventType!=xe&&(l>ye||a.velocity===r)){var u=t.deltaX-a.deltaX,c=t.deltaY-a.deltaY,d=D(l,u,c);i=d.x,o=d.y,n=le(d.x)>le(d.y)?d.x:d.y,s=C(u,c),e.lastInterval=t}else n=a.velocity,i=a.velocityX,o=a.velocityY,s=a.direction;t.velocity=n,t.velocityX=i,t.velocityY=o,t.direction=s}function T(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:ae(e.pointers[n].clientX),clientY:ae(e.pointers[n].clientY)},n++;return{timeStamp:ue(),pointers:t,center:E(t),deltaX:e.deltaX,deltaY:e.deltaY}}function E(e){var t=e.length;if(1===t)return{x:ae(e[0].clientX),y:ae(e[0].clientY)};for(var n=0,r=0,i=0;t>i;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:ae(n/t),y:ae(r/t)}}function D(e,t,n){return{x:t/e||0,y:n/e||0}}function C(e,t){return e===t?ke:le(e)>=le(t)?0>e?Se:Te:0>t?Ee:De}function M(e,t,n){n||(n=Ie);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function A(e,t,n){n||(n=Ie);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}function I(){this.evEl=Ne,this.evWin=Re,this.pressed=!1,x.apply(this,arguments)}function L(){this.evEl=je,this.evWin=Ye,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function O(){this.evTarget=He,this.evWin=Be,this.started=!1,x.apply(this,arguments)}function N(e,t){var n=y(e.touches),r=y(e.changedTouches);return t&(we|xe)&&(n=_(n.concat(r),"identifier",!0)),[n,r]}function R(){this.evTarget=ze,this.targetIds={},x.apply(this,arguments)}function P(e,t){var n=y(e.touches),r=this.targetIds;if(t&(_e|be)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,s=y(e.changedTouches),a=[],l=this.target;if(o=n.filter((function(e){return f(e.target,l)})),t===_e)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<s.length;)r[s[i].identifier]&&a.push(s[i]),t&(we|xe)&&delete r[s[i].identifier],i++;return a.length?[_(o.concat(a),"identifier",!0),a]:void 0}function F(){x.apply(this,arguments);var e=u(this.handler,this);this.touch=new R(this.manager,e),this.mouse=new I(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function j(e,t){e&_e?(this.primaryTouch=t.changedPointers[0].identifier,Y.call(this,t)):e&(we|xe)&&Y.call(this,t)}function Y(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),qe)}}function V(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),s=Math.abs(n-i.y);if(We>=o&&We>=s)return!0}return!1}function H(e,t){this.manager=e,this.set(t)}function B(e){this.options=re({},this.defaults,e||{}),this.id=he++,this.manager=null,this.options.enable=d(this.options.enable,!0),this.state=nt,this.simultaneous={},this.requireFail=[]}function U(e){return e&at?"cancel":e&ot?"end":e&it?"move":e&rt?"start":""}function z(e){return e==De?"down":e==Ee?"up":e==Se?"left":e==Te?"right":""}function q(e,t){var n=t.manager;return n?n.get(e):e}function W(){B.apply(this,arguments)}function $(){W.apply(this,arguments),this.pX=null,this.pY=null}function G(){W.apply(this,arguments)}function K(){B.apply(this,arguments),this._timer=null,this._input=null}function Z(){W.apply(this,arguments)}function X(){W.apply(this,arguments)}function J(){B.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Q(e,t){return(t=t||{}).recognizers=d(t.recognizers,Q.defaults.preset),new ee(e,t)}function ee(e,t){this.options=re({},Q.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=function(e){var t=e.options.inputClass;return new(t||(fe?L:me?R:pe?F:I))(e,k)}(this),this.touchAction=new H(this,this.options.touchAction),te(this,!0),s(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function te(e,t){var n,r=e.element;r.style&&(s(e.options.cssProps,(function(i,o){n=b(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}function ne(e,n){var r=t.createEvent("Event");r.initEvent(e,!0,!0),r.gesture=n,n.target.dispatchEvent(r)}var re,ie=["","webkit","Moz","MS","ms","o"],oe=t.createElement("div"),se="function",ae=Math.round,le=Math.abs,ue=Date.now;re="function"!=typeof Object.assign?function(e){if(e===r||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==r&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:Object.assign;var ce=a((function(e,t,n){for(var i=Object.keys(t),o=0;o<i.length;)(!n||n&&e[i[o]]===r)&&(e[i[o]]=t[i[o]]),o++;return e}),"extend","Use `assign`."),de=a((function(e,t){return ce(e,t,!0)}),"merge","Use `assign`."),he=1,pe="ontouchstart"in e,fe=b(e,"PointerEvent")!==r,me=pe&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),ge="touch",ve="mouse",ye=25,_e=1,be=2,we=4,xe=8,ke=1,Se=2,Te=4,Ee=8,De=16,Ce=Se|Te,Me=Ee|De,Ae=Ce|Me,Ie=["x","y"],Le=["clientX","clientY"];x.prototype={handler:function(){},init:function(){this.evEl&&h(this.element,this.evEl,this.domHandler),this.evTarget&&h(this.target,this.evTarget,this.domHandler),this.evWin&&h(w(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&p(this.element,this.evEl,this.domHandler),this.evTarget&&p(this.target,this.evTarget,this.domHandler),this.evWin&&p(w(this.element),this.evWin,this.domHandler)}};var Oe={mousedown:_e,mousemove:be,mouseup:we},Ne="mousedown",Re="mousemove mouseup";l(I,x,{handler:function(e){var t=Oe[e.type];t&_e&&0===e.button&&(this.pressed=!0),t&be&&1!==e.which&&(t=we),this.pressed&&(t&we&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:ve,srcEvent:e}))}});var Pe={pointerdown:_e,pointermove:be,pointerup:we,pointercancel:xe,pointerout:xe},Fe={2:ge,3:"pen",4:ve,5:"kinect"},je="pointerdown",Ye="pointermove pointerup pointercancel";e.MSPointerEvent&&!e.PointerEvent&&(je="MSPointerDown",Ye="MSPointerMove MSPointerUp MSPointerCancel"),l(L,x,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Pe[r],o=Fe[e.pointerType]||e.pointerType,s=o==ge,a=v(t,e.pointerId,"pointerId");i&_e&&(0===e.button||s)?0>a&&(t.push(e),a=t.length-1):i&(we|xe)&&(n=!0),0>a||(t[a]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(a,1))}});var Ve={touchstart:_e,touchmove:be,touchend:we,touchcancel:xe},He="touchstart",Be="touchstart touchmove touchend touchcancel";l(O,x,{handler:function(e){var t=Ve[e.type];if(t===_e&&(this.started=!0),this.started){var n=N.call(this,e,t);t&(we|xe)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:ge,srcEvent:e})}}});var Ue={touchstart:_e,touchmove:be,touchend:we,touchcancel:xe},ze="touchstart touchmove touchend touchcancel";l(R,x,{handler:function(e){var t=Ue[e.type],n=P.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:ge,srcEvent:e})}});var qe=2500,We=25;l(F,x,{handler:function(e,t,n){var r=n.pointerType==ge,i=n.pointerType==ve;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)j.call(this,t,n);else if(i&&V.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var $e=b(oe.style,"touchAction"),Ge=$e!==r,Ke="compute",Ze="auto",Xe="manipulation",Je="none",Qe="pan-x",et="pan-y",tt=function(){if(!Ge)return!1;var t={},n=e.CSS&&e.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(r){t[r]=!n||e.CSS.supports("touch-action",r)})),t}();H.prototype={set:function(e){e==Ke&&(e=this.compute()),Ge&&this.manager.element.style&&tt[e]&&(this.manager.element.style[$e]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return s(this.manager.recognizers,(function(t){c(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(m(e,Je))return Je;var t=m(e,Qe),n=m(e,et);return t&&n?Je:t||n?t?Qe:et:m(e,Xe)?Xe:Ze}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(!this.manager.session.prevented){var r=this.actions,i=m(r,Je)&&!tt[Je],o=m(r,et)&&!tt[et],s=m(r,Qe)&&!tt[Qe];if(i){var a=1===e.pointers.length,l=e.distance<2,u=e.deltaTime<250;if(a&&l&&u)return}return s&&o?void 0:i||o&&n&Ce||s&&n&Me?this.preventSrc(t):void 0}t.preventDefault()},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var nt=1,rt=2,it=4,ot=8,st=ot,at=16,lt=32;B.prototype={defaults:{},set:function(e){return re(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(o(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=q(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return o(e,"dropRecognizeWith",this)||(e=q(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(o(e,"requireFailure",this))return this;var t=this.requireFail;return-1===v(t,e=q(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(o(e,"dropRequireFailure",this))return this;e=q(e,this);var t=v(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){n.manager.emit(t,e)}var n=this,r=this.state;ot>r&&t(n.options.event+U(r)),t(n.options.event),e.additionalEvent&&t(e.additionalEvent),r>=ot&&t(n.options.event+U(r))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=lt)},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(lt|nt)))return!1;e++}return!0},recognize:function(e){var t=re({},e);return c(this.options.enable,[this,t])?(this.state&(st|at|lt)&&(this.state=nt),this.state=this.process(t),void(this.state&(rt|it|ot|at)&&this.tryEmit(t))):(this.reset(),void(this.state=lt))},process:function(e){},getTouchAction:function(){},reset:function(){}},l(W,B,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=t&(rt|it),i=this.attrTest(e);return r&&(n&xe||!i)?t|at:r||i?n&we?t|ot:t&rt?t|it:rt:lt}}),l($,W,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ae},getTouchAction:function(){var e=this.options.direction,t=[];return e&Ce&&t.push(et),e&Me&&t.push(Qe),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,s=e.deltaY;return i&t.direction||(t.direction&Ce?(i=0===o?ke:0>o?Se:Te,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===s?ke:0>s?Ee:De,n=s!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return W.prototype.attrTest.call(this,e)&&(this.state&rt||!(this.state&rt)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=z(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),l(G,W,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Je]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&rt)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),l(K,B,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ze]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,o=e.deltaTime>t.time;if(this._input=e,!r||!n||e.eventType&(we|xe)&&!o)this.reset();else if(e.eventType&_e)this.reset(),this._timer=i((function(){this.state=st,this.tryEmit()}),t.time,this);else if(e.eventType&we)return st;return lt},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===st&&(e&&e.eventType&we?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=ue(),this.manager.emit(this.options.event,this._input)))}}),l(Z,W,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Je]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&rt)}}),l(X,W,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ce|Me,pointers:1},getTouchAction:function(){return $.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(Ce|Me)?t=e.overallVelocity:n&Ce?t=e.overallVelocityX:n&Me&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&le(t)>this.options.velocity&&e.eventType&we},emit:function(e){var t=z(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),l(J,B,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Xe]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,o=e.deltaTime<t.time;if(this.reset(),e.eventType&_e&&0===this.count)return this.failTimeout();if(r&&o&&n){if(e.eventType!=we)return this.failTimeout();var s=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||M(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&s?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=i((function(){this.state=st,this.tryEmit()}),t.interval,this),rt):st}return lt},failTimeout:function(){return this._timer=i((function(){this.state=lt}),this.options.interval,this),lt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==st&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Q.VERSION="2.0.7",Q.defaults={domEvents:!1,touchAction:Ke,enable:!0,inputTarget:null,inputClass:null,preset:[[Z,{enable:!1}],[G,{enable:!1},["rotate"]],[X,{direction:Ce}],[$,{direction:Ce},["swipe"]],[J],[J,{event:"doubletap",taps:2},["tap"]],[K]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};ee.prototype={set:function(e){return re(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&st)&&(i=t.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&n.state&(rt|it|ot)&&(i=t.curRecognizer=n),o++}},get:function(e){if(e instanceof B)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(o(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(o(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=v(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==r&&t!==r){var n=this.handlers;return s(g(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==r){var n=this.handlers;return s(g(e),(function(e){t?n[e]&&n[e].splice(v(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&ne(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},destroy:function(){this.element&&te(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},re(Q,{INPUT_START:_e,INPUT_MOVE:be,INPUT_END:we,INPUT_CANCEL:xe,STATE_POSSIBLE:nt,STATE_BEGAN:rt,STATE_CHANGED:it,STATE_ENDED:ot,STATE_RECOGNIZED:st,STATE_CANCELLED:at,STATE_FAILED:lt,DIRECTION_NONE:ke,DIRECTION_LEFT:Se,DIRECTION_RIGHT:Te,DIRECTION_UP:Ee,DIRECTION_DOWN:De,DIRECTION_HORIZONTAL:Ce,DIRECTION_VERTICAL:Me,DIRECTION_ALL:Ae,Manager:ee,Input:x,TouchAction:H,TouchInput:R,MouseInput:I,PointerEventInput:L,TouchMouseInput:F,SingleTouchInput:O,Recognizer:B,AttrRecognizer:W,Tap:J,Pan:$,Swipe:X,Pinch:G,Rotate:Z,Press:K,on:h,off:p,each:s,merge:de,extend:ce,assign:re,inherit:l,bindFn:u,prefixed:b}),(void 0!==e?e:"undefined"!=typeof self?self:{}).Hammer=Q,"function"==typeof define&&define.amd?define((function(){return Q})):"undefined"!=typeof module&&module.exports?module.exports=Q:e.Hammer=Q}(window,document),/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */
613
- function(e,t,n){var r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){e.setTimeout(t,1e3/60)},i=function(){var r={},i=t.createElement("div").style,o=function(){for(var e=["t","webkitT","MozT","msT","OT"],t=0,n=e.length;t<n;t++)if(e[t]+"ransform"in i)return e[t].substr(0,e[t].length-1);return!1}();function s(e){return!1!==o&&(""===o?e:o+e.charAt(0).toUpperCase()+e.substr(1))}r.getTime=Date.now||function(){return(new Date).getTime()},r.extend=function(e,t){for(var n in t)e[n]=t[n]},r.addEvent=function(e,t,n,r){e.addEventListener(t,n,!!r)},r.removeEvent=function(e,t,n,r){e.removeEventListener(t,n,!!r)},r.prefixPointerEvent=function(t){return e.MSPointerEvent?"MSPointer"+t.charAt(7).toUpperCase()+t.substr(8):t},r.momentum=function(e,t,r,i,o,s){var a,l,u=e-t,c=n.abs(u)/r;return l=c/(s=void 0===s?6e-4:s),(a=e+c*c/(2*s)*(u<0?-1:1))<i?(a=o?i-o/2.5*(c/8):i,l=(u=n.abs(a-e))/c):a>0&&(a=o?o/2.5*(c/8):0,l=(u=n.abs(e)+a)/c),{destination:n.round(a),duration:l}};var a=s("transform");return r.extend(r,{hasTransform:!1!==a,hasPerspective:s("perspective")in i,hasTouch:"ontouchstart"in e,hasPointer:!(!e.PointerEvent&&!e.MSPointerEvent),hasTransition:s("transition")in i}),r.isBadAndroid=function(){var t=e.navigator.appVersion;if(/Android/.test(t)&&!/Chrome\/\d/.test(t)){var n=t.match(/Safari\/(\d+.\d)/);return!(n&&"object"==typeof n&&n.length>=2)||parseFloat(n[1])<535.19}return!1}(),r.extend(r.style={},{transform:a,transitionTimingFunction:s("transitionTimingFunction"),transitionDuration:s("transitionDuration"),transitionDelay:s("transitionDelay"),transformOrigin:s("transformOrigin")}),r.hasClass=function(e,t){return new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},r.addClass=function(e,t){if(!r.hasClass(e,t)){var n=e.className.split(" ");n.push(t),e.className=n.join(" ")}},r.removeClass=function(e,t){if(r.hasClass(e,t)){var n=new RegExp("(^|\\s)"+t+"(\\s|$)","g");e.className=e.className.replace(n," ")}},r.offset=function(e){for(var t=-e.offsetLeft,n=-e.offsetTop;e=e.offsetParent;)t-=e.offsetLeft,n-=e.offsetTop;return{left:t,top:n}},r.preventDefaultException=function(e,t){for(var n in t)if(t[n].test(e[n]))return!0;return!1},r.extend(r.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}),r.extend(r.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(e){return e*(2-e)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(e){return n.sqrt(1- --e*e)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(e){return(e-=1)*e*(5*e+4)+1}},bounce:{style:"",fn:function(e){return(e/=1)<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}},elastic:{style:"",fn:function(e){return 0===e?0:1==e?1:.4*n.pow(2,-10*e)*n.sin((e-.055)*(2*n.PI)/.22)+1}}}),r.tap=function(e,n){var r=t.createEvent("Event");r.initEvent(n,!0,!0),r.pageX=e.pageX,r.pageY=e.pageY,e.target.dispatchEvent(r)},r.click=function(e){var n,r=e.target;/(SELECT|INPUT|TEXTAREA)/i.test(r.tagName)||((n=t.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,e.view,1,r.screenX,r.screenY,r.clientX,r.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,null),n._constructed=!0,r.dispatchEvent(n))},r}();function o(n,r){for(var o in this.wrapper="string"==typeof n?t.querySelector(n):n,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!i.hasPointer,disableTouch:i.hasPointer||!i.hasTouch,disableMouse:i.hasPointer||i.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:void 0===e.onmousedown},r)this.options[o]=r[o];this.translateZ=this.options.HWCompositing&&i.hasPerspective?" translateZ(0)":"",this.options.useTransition=i.hasTransition&&this.options.useTransition,this.options.useTransform=i.hasTransform&&this.options.useTransform,this.options.eventPassthrough=!0===this.options.eventPassthrough?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"!=this.options.eventPassthrough&&this.options.scrollY,this.options.scrollX="horizontal"!=this.options.eventPassthrough&&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="string"==typeof this.options.bounceEasing?i.ease[this.options.bounceEasing]||i.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,!0===this.options.tap&&(this.options.tap="tap"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),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()}function s(e,n,r){var i=t.createElement("div"),o=t.createElement("div");return!0===r&&(i.style.cssText="position:absolute;z-index:9999",o.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"),o.className="iScrollIndicator","h"==e?(!0===r&&(i.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",o.style.height="100%"),i.className="iScrollHorizontalScrollbar"):(!0===r&&(i.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",o.style.width="100%"),i.className="iScrollVerticalScrollbar"),i.style.cssText+=";overflow:hidden",n||(i.style.pointerEvents="none"),i.appendChild(o),i}function a(n,o){for(var s in this.wrapper="string"==typeof o.el?t.querySelector(o.el):o.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=n,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0},o)this.options[s]=o[s];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(i.addEvent(this.indicator,"touchstart",this),i.addEvent(e,"touchend",this)),this.options.disablePointer||(i.addEvent(this.indicator,i.prefixPointerEvent("pointerdown"),this),i.addEvent(e,i.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(i.addEvent(this.indicator,"mousedown",this),i.addEvent(e,"mouseup",this))),this.options.fade){this.wrapperStyle[i.style.transform]=this.scroller.translateZ;var a=i.style.transitionDuration;this.wrapperStyle[a]=i.isBadAndroid?"0.0001ms":"0ms";var l=this;i.isBadAndroid&&r((function(){"0.0001ms"===l.wrapperStyle[a]&&(l.wrapperStyle[a]="0s")})),this.wrapperStyle.opacity="0"}}o.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(e){e.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(e){if(1!=i.eventType[e.type]&&0!==(e.which?e.button:e.button<2?0:4==e.button?1:2))return;if(this.enabled&&(!this.initiated||i.eventType[e.type]===this.initiated)){!this.options.preventDefault||i.isBadAndroid||i.preventDefaultException(e.target,this.options.preventDefaultException)||e.preventDefault();var t,r=e.touches?e.touches[0]:e;this.initiated=i.eventType[e.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=i.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,t=this.getComputedPosition(),this._translate(n.round(t.x),n.round(t.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=r.pageX,this.pointY=r.pageY,this._execEvent("beforeScrollStart")}},_move:function(e){if(this.enabled&&i.eventType[e.type]===this.initiated){this.options.preventDefault&&e.preventDefault();var t,r,o,s,a=e.touches?e.touches[0]:e,l=a.pageX-this.pointX,u=a.pageY-this.pointY,c=i.getTime();if(this.pointX=a.pageX,this.pointY=a.pageY,this.distX+=l,this.distY+=u,o=n.abs(this.distX),s=n.abs(this.distY),!(c-this.endTime>300&&o<10&&s<10)){if(this.directionLocked||this.options.freeScroll||(o>s+this.options.directionLockThreshold?this.directionLocked="h":s>=o+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)e.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);u=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)e.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);l=0}l=this.hasHorizontalScroll?l:0,u=this.hasVerticalScroll?u:0,t=this.x+l,r=this.y+u,(t>0||t<this.maxScrollX)&&(t=this.options.bounce?this.x+l/3:t>0?0:this.maxScrollX),(r>0||r<this.maxScrollY)&&(r=this.options.bounce?this.y+u/3:r>0?0:this.maxScrollY),this.directionX=l>0?-1:l<0?1:0,this.directionY=u>0?-1:u<0?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(t,r),c-this.startTime>300&&(this.startTime=c,this.startX=this.x,this.startY=this.y)}}},_end:function(e){if(this.enabled&&i.eventType[e.type]===this.initiated){this.options.preventDefault&&!i.preventDefaultException(e.target,this.options.preventDefaultException)&&e.preventDefault();e.changedTouches&&e.changedTouches[0];var t,r,o=i.getTime()-this.startTime,s=n.round(this.x),a=n.round(this.y),l=n.abs(s-this.startX),u=n.abs(a-this.startY),c=0,d="";if(this.isInTransition=0,this.initiated=0,this.endTime=i.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(s,a),!this.moved)return this.options.tap&&i.tap(e,this.options.tap),this.options.click&&i.click(e),void this._execEvent("scrollCancel");if(this._events.flick&&o<200&&l<100&&u<100)this._execEvent("flick");else{if(this.options.momentum&&o<300&&(t=this.hasHorizontalScroll?i.momentum(this.x,this.startX,o,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:s,duration:0},r=this.hasVerticalScroll?i.momentum(this.y,this.startY,o,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:a,duration:0},s=t.destination,a=r.destination,c=n.max(t.duration,r.duration),this.isInTransition=1),this.options.snap){var h=this._nearestSnap(s,a);this.currentPage=h,c=this.options.snapSpeed||n.max(n.max(n.min(n.abs(s-h.x),1e3),n.min(n.abs(a-h.y),1e3)),300),s=h.x,a=h.y,this.directionX=0,this.directionY=0,d=this.options.bounceEasing}if(s!=this.x||a!=this.y)return(s>0||s<this.maxScrollX||a>0||a<this.maxScrollY)&&(d=i.ease.quadratic),void this.scrollTo(s,a,c,d);this._execEvent("scrollEnd")}}}},_resize:function(){var e=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){e.refresh()}),this.options.resizePolling)},resetPosition:function(e){var t=this.x,n=this.y;return e=e||0,!this.hasHorizontalScroll||this.x>0?t=0:this.x<this.maxScrollX&&(t=this.maxScrollX),!this.hasVerticalScroll||this.y>0?n=0:this.y<this.maxScrollY&&(n=this.maxScrollY),(t!=this.x||n!=this.y)&&(this.scrollTo(t,n,e,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){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,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=i.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(e,t){this._events[e]||(this._events[e]=[]),this._events[e].push(t)},off:function(e,t){if(this._events[e]){var n=this._events[e].indexOf(t);n>-1&&this._events[e].splice(n,1)}},_execEvent:function(e){if(this._events[e]){var t=0,n=this._events[e].length;if(n)for(;t<n;t++)this._events[e][t].apply(this,[].slice.call(arguments,1))}},scrollBy:function(e,t,n,r){e=this.x+e,t=this.y+t,n=n||0,this.scrollTo(e,t,n,r)},scrollTo:function(e,t,n,r){r=r||i.ease.circular,this.isInTransition=this.options.useTransition&&n>0;var o=this.options.useTransition&&r.style;!n||o?(o&&(this._transitionTimingFunction(r.style),this._transitionTime(n)),this._translate(e,t)):this._animate(e,t,n,r.fn)},scrollToElement:function(e,t,r,o,s){if(e=e.nodeType?e:this.scroller.querySelector(e)){var a=i.offset(e);a.left-=this.wrapperOffset.left,a.top-=this.wrapperOffset.top,!0===r&&(r=n.round(e.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===o&&(o=n.round(e.offsetHeight/2-this.wrapper.offsetHeight/2)),a.left-=r||0,a.top-=o||0,a.left=a.left>0?0:a.left<this.maxScrollX?this.maxScrollX:a.left,a.top=a.top>0?0:a.top<this.maxScrollY?this.maxScrollY:a.top,t=null==t||"auto"===t?n.max(n.abs(this.x-a.left),n.abs(this.y-a.top)):t,this.scrollTo(a.left,a.top,t,s)}},_transitionTime:function(e){e=e||0;var t=i.style.transitionDuration;if(this.scrollerStyle[t]=e+"ms",!e&&i.isBadAndroid){this.scrollerStyle[t]="0.0001ms";var n=this;r((function(){"0.0001ms"===n.scrollerStyle[t]&&(n.scrollerStyle[t]="0s")}))}if(this.indicators)for(var o=this.indicators.length;o--;)this.indicators[o].transitionTime(e)},_transitionTimingFunction:function(e){if(this.scrollerStyle[i.style.transitionTimingFunction]=e,this.indicators)for(var t=this.indicators.length;t--;)this.indicators[t].transitionTimingFunction(e)},_translate:function(e,t){if(this.options.useTransform?this.scrollerStyle[i.style.transform]="translate("+e+"px,"+t+"px)"+this.translateZ:(e=n.round(e),t=n.round(t),this.scrollerStyle.left=e+"px",this.scrollerStyle.top=t+"px"),this.x=e,this.y=t,this.indicators)for(var r=this.indicators.length;r--;)this.indicators[r].updatePosition()},_initEvents:function(t){var n=t?i.removeEvent:i.addEvent,r=this.options.bindToWrapper?this.wrapper:e;n(e,"orientationchange",this),n(e,"resize",this),this.options.click&&n(this.wrapper,"click",this,!0),this.options.disableMouse||(n(this.wrapper,"mousedown",this),n(r,"mousemove",this),n(r,"mousecancel",this),n(r,"mouseup",this)),i.hasPointer&&!this.options.disablePointer&&(n(this.wrapper,i.prefixPointerEvent("pointerdown"),this),n(r,i.prefixPointerEvent("pointermove"),this),n(r,i.prefixPointerEvent("pointercancel"),this),n(r,i.prefixPointerEvent("pointerup"),this)),i.hasTouch&&!this.options.disableTouch&&(n(this.wrapper,"touchstart",this),n(r,"touchmove",this),n(r,"touchcancel",this),n(r,"touchend",this)),n(this.scroller,"transitionend",this),n(this.scroller,"webkitTransitionEnd",this),n(this.scroller,"oTransitionEnd",this),n(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var t,n,r=e.getComputedStyle(this.scroller,null);return this.options.useTransform?(t=+((r=r[i.style.transform].split(")")[0].split(", "))[12]||r[4]),n=+(r[13]||r[5])):(t=+r.left.replace(/[^-\d.]/g,""),n=+r.top.replace(/[^-\d.]/g,"")),{x:t,y:n}},_initIndicators:function(){var e,t=this.options.interactiveScrollbars,n="string"!=typeof this.options.scrollbars,r=[],i=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(e={el:s("v",t,this.options.scrollbars),interactive:t,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(e.el),r.push(e)),this.options.scrollX&&(e={el:s("h",t,this.options.scrollbars),interactive:t,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(e.el),r.push(e))),this.options.indicators&&(r=r.concat(this.options.indicators));for(var o=r.length;o--;)this.indicators.push(new a(this,r[o]));function l(e){if(i.indicators)for(var t=i.indicators.length;t--;)e.call(i.indicators[t])}this.options.fadeScrollbars&&(this.on("scrollEnd",(function(){l((function(){this.fade()}))})),this.on("scrollCancel",(function(){l((function(){this.fade()}))})),this.on("scrollStart",(function(){l((function(){this.fade(1)}))})),this.on("beforeScrollStart",(function(){l((function(){this.fade(1,!0)}))}))),this.on("refresh",(function(){l((function(){this.refresh()}))})),this.on("destroy",(function(){l((function(){this.destroy()})),delete this.indicators}))},_initWheel:function(){i.addEvent(this.wrapper,"wheel",this),i.addEvent(this.wrapper,"mousewheel",this),i.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",(function(){clearTimeout(this.wheelTimeout),this.wheelTimeout=null,i.removeEvent(this.wrapper,"wheel",this),i.removeEvent(this.wrapper,"mousewheel",this),i.removeEvent(this.wrapper,"DOMMouseScroll",this)}))},_wheel:function(e){if(this.enabled){e.preventDefault();var t,r,i,o,s=this;if(void 0===this.wheelTimeout&&s._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout((function(){s.options.snap||s._execEvent("scrollEnd"),s.wheelTimeout=void 0}),400),"deltaX"in e)1===e.deltaMode?(t=-e.deltaX*this.options.mouseWheelSpeed,r=-e.deltaY*this.options.mouseWheelSpeed):(t=-e.deltaX,r=-e.deltaY);else if("wheelDeltaX"in e)t=e.wheelDeltaX/120*this.options.mouseWheelSpeed,r=e.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in e)t=r=e.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in e))return;t=r=-e.detail/3*this.options.mouseWheelSpeed}if(t*=this.options.invertWheelDirection,r*=this.options.invertWheelDirection,this.hasVerticalScroll||(t=r,r=0),this.options.snap)return i=this.currentPage.pageX,o=this.currentPage.pageY,t>0?i--:t<0&&i++,r>0?o--:r<0&&o++,void this.goToPage(i,o);i=this.x+n.round(this.hasHorizontalScroll?t:0),o=this.y+n.round(this.hasVerticalScroll?r:0),this.directionX=t>0?-1:t<0?1:0,this.directionY=r>0?-1:r<0?1:0,i>0?i=0:i<this.maxScrollX&&(i=this.maxScrollX),o>0?o=0:o<this.maxScrollY&&(o=this.maxScrollY),this.scrollTo(i,o,0)}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",(function(){var e,t,r,i,o,s,a=0,l=0,u=0,c=this.options.snapStepX||this.wrapperWidth,d=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(!0===this.options.snap)for(r=n.round(c/2),i=n.round(d/2);u>-this.scrollerWidth;){for(this.pages[a]=[],e=0,o=0;o>-this.scrollerHeight;)this.pages[a][e]={x:n.max(u,this.maxScrollX),y:n.max(o,this.maxScrollY),width:c,height:d,cx:u-r,cy:o-i},o-=d,e++;u-=c,a++}else for(e=(s=this.options.snap).length,t=-1;a<e;a++)(0===a||s[a].offsetLeft<=s[a-1].offsetLeft)&&(l=0,t++),this.pages[l]||(this.pages[l]=[]),u=n.max(-s[a].offsetLeft,this.maxScrollX),o=n.max(-s[a].offsetTop,this.maxScrollY),r=u-n.round(s[a].offsetWidth/2),i=o-n.round(s[a].offsetHeight/2),this.pages[l][t]={x:u,y:o,width:s[a].offsetWidth,height:s[a].offsetHeight,cx:r,cy:i},u>this.maxScrollX&&l++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1==0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=n.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=n.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}})),this.on("flick",(function(){var e=this.options.snapSpeed||n.max(n.max(n.min(n.abs(this.x-this.startX),1e3),n.min(n.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,e)}))},_nearestSnap:function(e,t){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var r=0,i=this.pages.length,o=0;if(n.abs(e-this.absStartX)<this.snapThresholdX&&n.abs(t-this.absStartY)<this.snapThresholdY)return this.currentPage;for(e>0?e=0:e<this.maxScrollX&&(e=this.maxScrollX),t>0?t=0:t<this.maxScrollY&&(t=this.maxScrollY);r<i;r++)if(e>=this.pages[r][0].cx){e=this.pages[r][0].x;break}for(i=this.pages[r].length;o<i;o++)if(t>=this.pages[0][o].cy){t=this.pages[0][o].y;break}return r==this.currentPage.pageX&&((r+=this.directionX)<0?r=0:r>=this.pages.length&&(r=this.pages.length-1),e=this.pages[r][0].x),o==this.currentPage.pageY&&((o+=this.directionY)<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),t=this.pages[0][o].y),{x:e,y:t,pageX:r,pageY:o}},goToPage:function(e,t,r,i){i=i||this.options.bounceEasing,e>=this.pages.length?e=this.pages.length-1:e<0&&(e=0),t>=this.pages[e].length?t=this.pages[e].length-1:t<0&&(t=0);var o=this.pages[e][t].x,s=this.pages[e][t].y;r=void 0===r?this.options.snapSpeed||n.max(n.max(n.min(n.abs(o-this.x),1e3),n.min(n.abs(s-this.y),1e3)),300):r,this.currentPage={x:o,y:s,pageX:e,pageY:t},this.scrollTo(o,s,r,i)},next:function(e,t){var n=this.currentPage.pageX,r=this.currentPage.pageY;++n>=this.pages.length&&this.hasVerticalScroll&&(n=0,r++),this.goToPage(n,r,e,t)},prev:function(e,t){var n=this.currentPage.pageX,r=this.currentPage.pageY;--n<0&&this.hasVerticalScroll&&(n=0,r--),this.goToPage(n,r,e,t)},_initKeys:function(t){var n,r={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(n in this.options.keyBindings)"string"==typeof this.options.keyBindings[n]&&(this.options.keyBindings[n]=this.options.keyBindings[n].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(n in r)this.options.keyBindings[n]=this.options.keyBindings[n]||r[n];i.addEvent(e,"keydown",this),this.on("destroy",(function(){i.removeEvent(e,"keydown",this)}))},_key:function(e){if(this.enabled){var t,r=this.options.snap,o=r?this.currentPage.pageX:this.x,s=r?this.currentPage.pageY:this.y,a=i.getTime(),l=this.keyTime||0;switch(this.options.useTransition&&this.isInTransition&&(t=this.getComputedPosition(),this._translate(n.round(t.x),n.round(t.y)),this.isInTransition=!1),this.keyAcceleration=a-l<200?n.min(this.keyAcceleration+.25,50):0,e.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?o+=r?1:this.wrapperWidth:s+=r?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?o-=r?1:this.wrapperWidth:s-=r?1:this.wrapperHeight;break;case this.options.keyBindings.end:o=r?this.pages.length-1:this.maxScrollX,s=r?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:o=0,s=0;break;case this.options.keyBindings.left:o+=r?-1:5+this.keyAcceleration|0;break;case this.options.keyBindings.up:s+=r?1:5+this.keyAcceleration|0;break;case this.options.keyBindings.right:o-=r?-1:5+this.keyAcceleration|0;break;case this.options.keyBindings.down:s-=r?1:5+this.keyAcceleration|0;break;default:return}r?this.goToPage(o,s):(o>0?(o=0,this.keyAcceleration=0):o<this.maxScrollX&&(o=this.maxScrollX,this.keyAcceleration=0),s>0?(s=0,this.keyAcceleration=0):s<this.maxScrollY&&(s=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(o,s,0),this.keyTime=a)}},_animate:function(e,t,n,o){var s=this,a=this.x,l=this.y,u=i.getTime(),c=u+n;this.isAnimating=!0,function d(){var h,p,f,m=i.getTime();if(m>=c)return s.isAnimating=!1,s._translate(e,t),void(s.resetPosition(s.options.bounceTime)||s._execEvent("scrollEnd"));f=o(m=(m-u)/n),h=(e-a)*f+a,p=(t-l)*f+l,s._translate(h,p),s.isAnimating&&r(d)}()},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":this.enabled&&!e._constructed&&(e.preventDefault(),e.stopPropagation())}}},a.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)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(i.removeEvent(this.indicator,"touchstart",this),i.removeEvent(this.indicator,i.prefixPointerEvent("pointerdown"),this),i.removeEvent(this.indicator,"mousedown",this),i.removeEvent(e,"touchmove",this),i.removeEvent(e,i.prefixPointerEvent("pointermove"),this),i.removeEvent(e,"mousemove",this),i.removeEvent(e,"touchend",this),i.removeEvent(e,i.prefixPointerEvent("pointerup"),this),i.removeEvent(e,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(t){var n=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=n.pageX,this.lastPointY=n.pageY,this.startTime=i.getTime(),this.options.disableTouch||i.addEvent(e,"touchmove",this),this.options.disablePointer||i.addEvent(e,i.prefixPointerEvent("pointermove"),this),this.options.disableMouse||i.addEvent(e,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(e){var t,n,r,o,s=e.touches?e.touches[0]:e;i.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,t=s.pageX-this.lastPointX,this.lastPointX=s.pageX,n=s.pageY-this.lastPointY,this.lastPointY=s.pageY,r=this.x+t,o=this.y+n,this._pos(r,o),e.preventDefault(),e.stopPropagation()},_end:function(t){if(this.initiated){if(this.initiated=!1,t.preventDefault(),t.stopPropagation(),i.removeEvent(e,"touchmove",this),i.removeEvent(e,i.prefixPointerEvent("pointermove"),this),i.removeEvent(e,"mousemove",this),this.scroller.options.snap){var r=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),o=this.options.snapSpeed||n.max(n.max(n.min(n.abs(this.scroller.x-r.x),1e3),n.min(n.abs(this.scroller.y-r.y),1e3)),300);this.scroller.x==r.x&&this.scroller.y==r.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=r,this.scroller.scrollTo(r.x,r.y,o,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(e){e=e||0;var t=i.style.transitionDuration;if(this.indicatorStyle[t]=e+"ms",!e&&i.isBadAndroid){this.indicatorStyle[t]="0.0001ms";var n=this;r((function(){"0.0001ms"===n.indicatorStyle[t]&&(n.indicatorStyle[t]="0s")}))}},transitionTimingFunction:function(e){this.indicatorStyle[i.style.transitionTimingFunction]=e},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(i.addClass(this.wrapper,"iScrollBothScrollbars"),i.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(i.removeClass(this.wrapper,"iScrollBothScrollbars"),i.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=n.max(n.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=8-this.indicatorWidth,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=n.max(n.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=8-this.indicatorHeight,this.maxBoundaryY=this.wrapperHeight-8):(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 e=this.options.listenX&&n.round(this.sizeRatioX*this.scroller.x)||0,t=this.options.listenY&&n.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(e<this.minBoundaryX?("scale"==this.options.shrink&&(this.width=n.max(this.indicatorWidth+e,8),this.indicatorStyle.width=this.width+"px"),e=this.minBoundaryX):e>this.maxBoundaryX?"scale"==this.options.shrink?(this.width=n.max(this.indicatorWidth-(e-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",e=this.maxPosX+this.indicatorWidth-this.width):e=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),t<this.minBoundaryY?("scale"==this.options.shrink&&(this.height=n.max(this.indicatorHeight+3*t,8),this.indicatorStyle.height=this.height+"px"),t=this.minBoundaryY):t>this.maxBoundaryY?"scale"==this.options.shrink?(this.height=n.max(this.indicatorHeight-3*(t-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",t=this.maxPosY+this.indicatorHeight-this.height):t=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=e,this.y=t,this.scroller.options.useTransform?this.indicatorStyle[i.style.transform]="translate("+e+"px,"+t+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=e+"px",this.indicatorStyle.top=t+"px")},_pos:function(e,t){e<0?e=0:e>this.maxPosX&&(e=this.maxPosX),t<0?t=0:t>this.maxPosY&&(t=this.maxPosY),e=this.options.listenX?n.round(e/this.sizeRatioX):this.scroller.x,t=this.options.listenY?n.round(t/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(e,t)},fade:function(e,t){if(!t||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var n=e?250:500,r=e?0:300;e=e?"1":"0",this.wrapperStyle[i.style.transitionDuration]=n+"ms",this.fadeTimeout=setTimeout(function(e){this.wrapperStyle.opacity=e,this.visible=+e}.bind(this,e),r)}}},o.utils=i,"undefined"!=typeof module&&module.exports?module.exports=o:"function"==typeof define&&define.amd?define((function(){return o})):e.IScroll=o}(window,document,Math),function(e){var t=!1;if("function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),!t){var n=window.Cookies,r=window.Cookies=e();r.noConflict=function(){return window.Cookies=n,r}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}return function t(n){function r(t,i,o){var s;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(o=e({path:"/"},r.defaults,o)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}o.expires=o.expires?o.expires.toUTCString():"";try{s=JSON.stringify(i),/^[\{\[]/.test(s)&&(i=s)}catch(e){}i=n.write?n.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var l="";for(var u in o)o[u]&&(l+="; "+u,!0!==o[u]&&(l+="="+o[u]));return document.cookie=t+"="+i+l}t||(s={});for(var c=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,h=0;h<c.length;h++){var p=c[h].split("="),f=p.slice(1).join("=");this.json||'"'!==f.charAt(0)||(f=f.slice(1,-1));try{var m=p[0].replace(d,decodeURIComponent);if(f=n.read?n.read(f,m):n(f,m)||f.replace(d,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(e){}if(t===m){s=f;break}t||(s[m]=f)}catch(e){}}return s}}return r.set=r,r.get=function(e){return r.call(r,e)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,n){r(t,"",e(n,{expires:-1}))},r.withConverter=t,r}((function(){}))})),$.widget("wm.datatable",{options:{data:[],statusMsg:"",colDefs:[],rowActions:[],headerConfig:[],sortInfo:{field:"",direction:""},isMobile:!1,enableSort:!0,filtermode:"",filteronkeypress:!1,activeRow:void 0,height:"100%",showHeader:!0,selectFirstRow:!1,showNewRow:!0,showRowIndex:!1,enableRowSelection:!0,enableColumnSelection:!1,multiselect:!1,filterNullRecords:!0,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:!0,new:!0},rowExpansionEnabled:!1,rowDef:{position:"0",closeothers:!1,columnwidth:"30px"},summaryRow:!1,summaryRowDefs:[],summaryRowDefsObject:[],searchHandler:function(){},sortHandler:function(){}},customColumnDefs:{checkbox:{field:"checkbox",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"width: 50px; text-align: center;",textAlignment:"center",isMultiSelectCol:!0,show:!0},radio:{field:"radio",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"width: 50px; text-align: center;",textAlignment:"center",show:!0},__expand:{field:"__expand",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"text-align: center;",textAlignment:"center",show:!0,width:"30px"},rowIndex:{field:"rowIndex",type:"custom",displayName:"S. No.",sortable:!1,searchable:!1,selectable:!1,readonly:!0,style:"text-align: left;",textAlignment:"left",show:!0}},CONSTANTS:{QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog",SEARCH:"search",MULTI_COLUMN:"multicolumn"},Utils:{random:function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},isDefined:function(e){return void 0!==e},isObject:function(e){return null!==e&&"object"==typeof e},getObjectIndex:function(e,t){var n=-1;return Array.isArray(e)?(e.some((function(e,r){if(_.isEqual(e,t))return n=r,!0})),n):-1},generateGuid:function(){var e=this.random;return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},isValidHtml:function(e){return/<[a-z][\s\S]*>/i.test(e)},isMac:function(){return navigator.platform.toUpperCase().indexOf("MAC")>=0},isDeleteKey:function(e){return this.isMac()&&8===e.which||46===e.which}},_setStyles:function(e,t){if(t)return t.split(";").forEach((function(t){var n,r,i=t.split(":");2===i.length&&(n=i[0].trim(),r=i[1].trim(),e.css(n,r))})),t},_getColumnSortDirection:function(e){var t=this.options.sortInfo;return e===t.field?t.direction:""},_toggleSpacingClasses:function(e){switch(e){case"normal":this.tableContainer.removeClass("table-condensed"),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"),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"))}},_getColSpan:function(e){var t=0,n=this;return _.forEach(e,(function(e){var r;e.isGroup?t+=n._getColSpan(e.columns):(r=_.find(n.preparedHeaderData,{field:e.field}),t=_.isUndefined(r.show)||r.show?t+1:t)})),t},_setColSpan:function(e){var t=this;_.forEach(e,(function(e){e.isGroup&&(e.colspan=t._getColSpan(e.columns),t.gridHeaderElement.find('th[data-col-group="'+e.field+'"]').attr("colspan",e.colspan),t._setColSpan(e.columns))}))},_getHeaderTemplate:function(){var e,t=$("<colgroup></colgroup>"),n=this.gridHeaderElement.empty(),r=this.Utils.isDefined,i=this.options.sortInfo,o=i.field,s=this,a=[],l=this.options.headerConfig,u=s.options.cssClassNames.groupHeaderCell;function c(e,n){var a,l,u,c,d,h=n,p=e.field,f=s.Utils.isDefined(e.displayName)?e.displayName:p||"",m=f,g=s.options.enableSort&&(_.isUndefined(e.show)||e.show)&&(_.isUndefined(e.sortable)||e.sortable),v=s.options.cssClassNames.headerCell,y="";return f=s.Utils.isDefined(f)&&""!==f?f:"&nbsp;",u=$("<col/>"),e.style&&s._setStyles(u,e.style),t.append(u),r(e.class)&&(v+=" "+e.class),e.selected&&(v+=" "+s.options.cssClassNames.selectedColumn+" "),"checkbox"!==p&&"radio"!==p||(v+=" grid-col-small"),y+="<th",(_.isUndefined(e.resizable)||e.resizable)&&(_.isUndefined(e.show)||e.show)&&(y+=" data-col-resizable"),s.options.enableColumnSelection&&(_.isUndefined(e.selectable)||e.selectable)&&(y+=" data-col-selectable"),g&&(y+=" data-col-sortable"),y+="></th>",(l=$(y)).attr({"data-col-id":h,"data-col-field":p,title:m}),s._setStyles(l,"text-align: "+e.textAlignment),l.addClass(v),"checkbox"===p&&l.append('<input type="checkbox" />'),l.append('<span class="header-data">'+f+"</span>"),g&&(c=$('<span class="sort-buttons-container"></span>'),d=$('<i class="sort-icon"></i>'),o&&o===e.field&&i.direction&&(a="asc"===i.direction?s.options.cssClassNames.ascIcon:s.options.cssClassNames.descIcon,c.addClass("active"),d.addClass(a+" "+i.direction)),l.append(c.append(d))),l}return _.isEmpty(l)?(e=$("<tr></tr>"),s.preparedHeaderData.forEach((function(t,n){e.append(c(t,n))})),n.append(e)):(!function e(t,n){var r=[];_.forEach(t,(function(t){var i,o,a,l,d;t.columns&&t.columns.length?(d=$("<th></th>"),a=u+" "+(t.class||""),l="text-align: "+t.textAlignment+";background-color: "+(t.backgroundColor||"")+";",d.attr({"data-col-group":t.field,class:a,title:t.displayName}),s._setStyles(d,l),d.append('<span class="header-data">'+t.displayName+"</span>"),r.push(d),e(t.columns,n+1)):(i=_.findIndex(s.preparedHeaderData,{field:t.field}),(o=s.preparedHeaderData[i])&&r.push(c(o,i)))})),a[n]=a[n]||[],a[n]=a[n].concat(r)}(l,0),a.forEach((function(t,r){e=$('<tr role="row" tabindex="0"></tr>');var i=a.length-r;t.forEach((function(t){i>1&&t.hasClass("app-datagrid-header-cell")&&t.attr("rowspan",i),e.append(t)})),n.append(e)}))),{colgroup:t,header:n}},_getSearchEl:function(){var e='<select name="wm-datatable" data-element="dgFilterValue" class="form-control app-select"><option value="" selected class="placeholder">'+this.options.messages.selectField+"</option>",t=this.Utils.isDefined(this.options.searchLabel)&&this.options.searchLabel.length?this.options.searchLabel:"";this.options.colDefs.forEach((function(t,n){"none"!==t.field&&"rowOperations"!==t.field&&t.searchable&&"false"!==_.toString(t.showinfilter)&&(e+='<option value="'+t.field+'" data-coldef-index="'+n+'">'+(t.displayName||t.field)+"</option>")})),e+="</select>";var n=$('<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="'+t+'"/></div><div class="input-append input-group">'+e+'<span class="input-group-addon"><button type="button" data-element="dgSearchButton" class="app-search-button" title="'+t+'"><i class="wi wi-search"></i></button></span></div></div></form>');return this._setStyles(n.find('[data-element="dgSearchText"]'),"display: inline-block;"),n},_appendRowExpansionButtons:function(e){var t=this;e.find("[data-identifier='rowExpansionButtons']").each((function(e){var n,r,i,o=e;r=$(this).closest("tr.app-datagrid-row"),i=parseInt(r.attr("data-row-id"),10),(n=_.clone(t.options.data[i])).$index=o+1,t.options.generateRowExpansionCell(n,o),$(this).empty().append(t.options.getRowExpansionAction(o))}))},setSummaryRowDef:function(e,t,n,r){this.options.summaryRow=!0,null==this.options.summaryRowDefs[n]&&(this.options.summaryRowDefs[n]={},this.options.summaryRowDefsObject[n]={}),this.options.summaryRowDefsObject[n][e]=t,this.options.summaryRowDefs[n][e]=t&&t.value?t.value:t,r&&this.refreshGridData()},_getSummaryRowTemplate:function(){var e=this,t=$('<tfoot class="'+this.options.cssClassNames.gridFooter+'"></tfoot>');return this._setStyles(t,"border-top: 3px solid #eee;"),_.forEach(this.options.summaryRowDefs,(function(n,r){n.$$pk=r,t.append(e._getRowTemplate(n,r,!0))})),t},getPageStartIndex:function(){var e=this.options.getCurrentPage(),t=this.options.getPageSize();return((this.options.actionRowPage<e?this.options.actionRowPage:e)-1)*t},_getPreparedDataForInfiniteScroll:function(e,t){return t=t.filter((function(t,n){if(!e.find("tr.app-datagrid-row[data-row-id="+t.$$pk+"]").length)return t}))},_updateTrData:function(e){var t,n,r=this;t=e.find("tr.app-datagrid-row[data-row-id="+r.options.actionRowIndex+"]"),n=r.preparedData[r.options.actionRowIndex],r.options.generateCustomExpressions(n,r.options.actionRowIndex);var i=r._getRowTemplate(n,r.options.actionRowIndex);t.replaceWith(i[0])},_handleCRUDForInfiniteScroll:function(e){var t=this;t.options.lastActionPerformed!==t.options.ACTIONS.SEARCH_OR_SORT&&t.options.lastActionPerformed!==t.options.ACTIONS.FILTER_CRITERIA&&t.options.lastActionPerformed!==t.options.ACTIONS.DATASET_UPDATE||!(t.options.isSearchTrigerred||t.options.isDatasetUpdated||t.options.isDataUpdatedByUser)?t.options.lastActionPerformed===t.options.ACTIONS.EDIT&&void 0!==t.options.actionRowIndex&&t.options.editmode!==this.CONSTANTS.QUICK_EDIT&&t._updateTrData(e):(e.html(""),"On-Demand"!==this.options.navigation||this.options.isLastPage||this.element.find(".on-demand-datagrid").show(),t.options.clearCustomExpression(),t.options.clearRowDetailExpression(),t.options.setIsSearchTrigerred(!1),t.options.setIsDatasetUpdated(!1))},_getGridTemplate:function(){var e,t,n=this,r=n.getPageStartIndex(),i=n.options.startRowIndex,o=n.options.isNavTypeScrollOrOndemand();return o?(t=this.gridElement,this.renderTableOnViewLess&&(t=this.gridElement.empty(),this.hideLoadingIndicator(),this.renderTableOnViewLess=!1)):t=this.gridElement.empty(),o?(this._handleCRUDForInfiniteScroll(t),n.options.lastActionPerformed===n.options.ACTIONS.DELETE&&(i=n.options.actionRowIndex+1),e=this._getPreparedDataForInfiniteScroll(t,this.preparedData.slice(r))):(this.options.clearCustomExpression(),this.options.clearRowDetailExpression(),e=this.preparedData),_.forEach(e,(function(e,r){var s,a=_.clone(e),l=o?i+r-1:r;if(a.$index=l+1,n.options.generateCustomExpressions(a,l),n.options.registerRowNgClassWatcher(a,l),s=n._getRowTemplate(e,l),t.append(s),n.options.rowExpansionEnabled){var u=n.options.rowDef.height,c=n.options.rowDef.position,d=_.filter(n.preparedHeaderData,(function(e){return e.show})).length-1,h=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+e.$$pk+'"><td></td><td colspan="'+d+'" class="app-datagrid-row-details-cell"><div class="row-overlay"><div class="row-status"><i class="'+n.options.loadingicon+'"></i></div></div><div class="details-section"></div></td></tr>');"-1"===c&&(h=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+e.$$pk+'"><td colspan="'+d+'" class="app-datagrid-row-details-cell"><div class="row-overlay"><div class="row-status"><i class="'+n.options.loadingicon+'"></i></div></div><div class="details-section"></div></td><td></td></tr>')),u&&h.find("div.row-overlay").css("min-height",u),h.css("display","none"),h.find(".details-section").css("display","none"),t.append(h)}})),this.options.isdynamictable||(this.options.setLastActionPerformed(this.options.ACTIONS.DEFAULT),this.options.setIsDataUpdatedByUser(!1),this.options.clearActionRowIndex()),t},_getRowTemplate:function(e,t,n){var r,i=this,o=i.options;return r=$('<tr role="row" tabindex="0" class="'+o.cssClassNames.tableRow+" "+(o.rowClass||"")+'" data-row-id="'+e.$$pk+'"></tr>'),this.preparedHeaderData.forEach((function(o,s){r.append(i._getColumnTemplate(e,s,o,t,n))})),r},_getRowActionsColumnDefIndex:function(){var e,t=this.preparedHeaderData.length;for(e=0;e<t;e+=1)if("rowOperations"===this.preparedHeaderData[e].field)return e;return-1},_getRowActionsColumnDef:function(){var e=this._getRowActionsColumnDefIndex();return-1!==e?this.preparedHeaderData[e]:null},_getCheckboxTemplate:function(e,t){return'<input name="'+(t?"gridMultiSelect":"")+'" type="checkbox"'+(!0===e._checked?" checked":"")+(e.disabed?" disabled":"")+"/>"},_getRadioTemplate:function(e){return'<input type="radio" rowSelectInput name="" value=""'+(!0===e._checked?" checked":"")+(e.disabed?" disabled":"")+"/>"},_getColumnTemplate:function(e,t,n,r,i){var o,s,a,l,u=this.options.cssClassNames.tableCell+" "+(n.class||""),c=n.customExpression,d="text-align: "+n.textAlignment+";position: relative;";if(o=$('<td class="'+u+'" data-col-id="'+t+'" role="cell"></td>'),this._setStyles(o,d),s=_.get(e,n.field),i)(a=this.options.summaryRowDefsObject[r][n.field])instanceof Object&&a.class&&o.addClass(a.class),s instanceof Promise?o.html('<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>'):(l=_.isUndefined(s)||null===s?"":s,o.html(l));else if(c)o.html(this.options.getCustomExpression(n.field,r));else if("custom"!==n.type)s=_.get(e,n.field),(this.options.filterNullRecords&&null===s||_.isUndefined(s))&&(s=""),o.attr("title",s),o.text(""+s);else{switch(n.field){case"checkbox":l=this._getCheckboxTemplate(e,n.isMultiSelectCol);break;case"__expand":l='<span class="row-expansion-column" data-identifier="rowExpansionButtons"></span>';break;case"radio":l=this._getRadioTemplate(e);break;case"rowOperations":l='<span class="actions-column" data-identifier="actionButtons"></span>';break;case"rowIndex":l=e.$$index;break;case"none":l="";break;default:l=_.isUndefined(s)||null===s?"":s}o.html(l)}return e.$index=r+1,this.options.registerColNgClassWatcher(e,n,r,t),o},_getEventTemplate:function(e){var t,n=_.filter(_.keys(e),(function(e){return _.startsWith(e,"on")})),r="";return t="autocomplete"===e.editWidgetType?"onSubmit":"onChange",n=_.union(n,[t]),_.forEach(n,(function(t){r+=" "+_.kebabCase(t)+'="',"onSubmit"!==t&&"onChange"!==t||(r+="_"+t+"Field($event, $scope, newVal, oldVal);"),r+=(e[t]||"")+'" '})),r},_insertFieldInHeaderConfig:function(e,t,n){var r=_.findIndex(e,{field:n}),i=this;-1===r?_.forEach(e,(function(e){e.isGroup&&i._insertFieldInHeaderConfig(e.columns,t,n)})):e.splice(r+1,0,{field:t,isPredefined:!0})},setHeaderConfigForDefaultFields:function(e,t){if(!_.isEmpty(this.options.headerConfig)){var n=this.customColumnDefs[e].field;_.remove(this.options.headerConfig,{field:n}),"0"===t?this.options.headerConfig.unshift({field:n,isPredefined:!0}):"-1"===t?this.options.headerConfig.push({field:n,isPredefined:!0}):this._insertFieldInHeaderConfig(this.options.headerConfig,n,t)}},setDefaultColsData:function(e){if(!_.isEmpty(this.preparedHeaderData)){var t,n;if(this.options.rowExpansionEnabled){if(t=this.options.rowDef.position,(n=_.clone(this.customColumnDefs.__expand)).width=this.options.rowDef.columnwidth,e)if("-1"===t)this.preparedHeaderData.push(n);else if("0"===t)this.preparedHeaderData.unshift(n);else{var r=_.findIndex(this.preparedHeaderData,{field:t});this.preparedHeaderData.splice(r+1,0,n)}this.setHeaderConfigForDefaultFields("__expand",t)}this.options.showRowIndex&&(e&&this.preparedHeaderData.unshift(this.customColumnDefs.rowIndex),this.setHeaderConfigForDefaultFields("rowIndex","0")),this.options.multiselect&&(e&&this.preparedHeaderData.unshift(this.customColumnDefs.checkbox),this.setHeaderConfigForDefaultFields("checkbox","0")),!this.options.multiselect&&this.options.showRadioColumn&&(e&&this.preparedHeaderData.unshift(this.customColumnDefs.radio),this.setHeaderConfigForDefaultFields("radio","0"))}},_prepareHeaderData:function(){this.preparedHeaderData=[],$.extend(this.preparedHeaderData,this.options.colDefs),this.setDefaultColsData(!0)},_generateCustomColDefs:function(){var e=[],t={};function n(n){if(!t[n]){var r={type:"string",field:n};e.push(r),t[n]=!0}}this.options.data.forEach((function(e){_.keys(e).forEach(n)})),this.options.colDefs=e,this._prepareHeaderData()},_prepareData:function(){var e=[],t=this.options.colDefs,n=this,r=n.getPageStartIndex(),i=this.Utils.isObject,o=this.Utils.isDefined;!this.options.colDefs.length&&this.options.data.length&&this._generateCustomColDefs(),(this.options.isNavTypeScrollOrOndemand()?this.options.data.slice(r):this.options.data).forEach((function(s,a){var l=$.extend(!0,{},s);t.forEach((function(e){if(e.field){var t,n,r,a=e.field.split("."),u=s,c=a.length;for(t=0;t<c;t++)if(r=void 0,-1!==(n=a[t]).indexOf("[0]")&&(n=n.replace("[0]",""),r=!0),i(u)&&!r)u=_.get(u,n);else{if(!r){u=void 0;break}u=_.get(u,n+"[0]")}o(u)?l[e.field]=u:a.length>1&&_.has(s,e.field)&&(l[e.field]=s[e.field])}})),l.$$index=r+a+1,l.$$pk=n.options.isNavTypeScrollOrOndemand()?r+a:a,e.push(l)})),n.options.isNavTypeScrollOrOndemand()?n.options.isSearchTrigerred&&!n.emptySearch||n.options.isDatasetUpdated?n.preparedData=e:n.preparedData.length?e.forEach((function(e,t){var i=r+t;n.preparedData[i]&&e.$$index===n.preparedData[i].$$index?n.preparedData[i]=e:n.preparedData.push(e)})):n.preparedData.push(...e):n.preparedData=e},_reselectColumns:function(){var e=[],t=this;this.gridHeaderElement&&this.options.enableColumnSelection&&(e=this.gridHeaderElement.find("th."+this.options.cssClassNames.selectedColumn)).length&&e.each((function(){t.columnSelectionHandler(void 0,$(this))})),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(e){this.__setStatus(e)}),100),this._debounceOnEnter=_.debounce((function(e,t,n,r){this._onEnter(e,t,n,r)}),150),this.options.summaryRow=!1,this.options.summaryRowDefs=[],this._prepareHeaderData(),this._prepareData(),this._render(!0)},_setGridEditMode:function(e){_.isFunction(this.options.setGridEditMode)&&this.options.setGridEditMode(e)},_refreshGrid:function(){this._prepareHeaderData(),this._prepareData(),this._render(),this.addOrRemoveScroll(),this._setGridEditMode(!1)},refreshGrid:function(){window.clearTimeout(this.refreshGridTimeout),this.refreshGridTimeout=window.setTimeout(this._refreshGrid.bind(this),50)},callRenderGridForInfiniteScroll:function(){this.gridFooter.remove();var e=this.gridElement.find("> tr.app-datagrid-row.always-new-row");e.length&&e.remove(),this._renderGrid(void 0)},refreshGridData:function(){this._prepareData(),this.options.isNavTypeScrollOrOndemand()?this.callRenderGridForInfiniteScroll():(this.gridFooter.remove(),this._renderGrid()),this._reselectColumns(),this.addOrRemoveScroll(),this._setGridEditMode(!1),this.toggleNewRowActions(!1)},setDefaultRowData:function(e){_.forEach(this.preparedHeaderData,(function(t){e[t.field]=t.defaultvalue}))},addNewRow:function(e,t){var n,r,i,o=this.gridElement.find("> tr.app-datagrid-row:visible").length||99999,s=this,a={};if(!t&&_.isFunction(this.options.beforeRowInsert)&&this.options.beforeRowInsert(),(i=(r=this.gridElement).find("> tr.app-datagrid-row.always-new-row")).length){if(this.setFocusOnElement(void 0,i),this.options.editmode===this.CONSTANTS.QUICK_EDIT){var l=i.find("input").length>0?$(i.find("input")[0]):null;if(null!==l){var u=$.Event("keydown");u.which=13,l.trigger(u)}}}else a.$index=o,a.$$pk=o,this.options.editmode!==this.CONSTANTS.FORM&&this.options.editmode!==this.CONSTANTS.DIALOG&&(n=$(this._getRowTemplate(a,a.$index)),this.preparedData.length||this.setStatus("ready",this.dataStatus.ready),"top"===this.options.formPosition?r.prepend(n):r.append(n),this._appendRowActions(n,!0,a),this.attachEventHandlers(n),(t||this.options.editmode!==this.CONSTANTS.QUICK_EDIT)&&(n.find(".delete-row-button").hide(),t&&n.find(".edit-row-button").hide()),this._findAndReplaceCompiledTemplates(),t?(this.setDefaultRowData(a),n.addClass("always-new-row").addClass("row-editing"),this.options.runInNgZone((function(){s.makeRowEditable(n,a,!0)}))):n.trigger("click",[void 0,{action:"edit",operation:"new",skipFocus:e}]),this.updateSelectAllCheckboxState(),this.addOrRemoveScroll(),this.options.timeoutCall((function(){s.setColGroupWidths()}),100))},addLoadMoreBtn:function(e,t,n,r){var i;if(!this.options.isLastPage||r){var o=this,s=$('<div class="on-demand-datagrid"><a class="app-button btn btn-block on-demand-load-btn"></a></div>');(i=s.find("a")).append(e),this.element.find(".app-grid-header-inner").append(s),r&&this.element.find(".on-demand-load-btn").length&&this.element.find(".on-demand-load-btn").text(this.options.viewlessmessage),i.on("click",(function(e){var s=o.options.getCurrentPage()==o.options.getPageCount();s||o.showLoadingIndicator(t,!1),o.options.showviewlessbutton||i.hide(),r&&s&&o.element.find(".on-demand-datagrid").remove(),s&&o.options.showviewlessbutton&&(i.hide(),o.renderTableOnViewLess=!0,o.renderPaginationOnViewLess=!0,o.options.enableNavigation(),o._renderGrid()),n&&"function"==typeof n&&n(e)}))}},showLoadingIndicator:function(e,t){var n=this.element.find(".loading-data-msg"),r=this.element.find(".on-demand-datagrid");if(n.length&&!t)n.show();else if(t&&r.length)r.show();else{var i=$('<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>');if(i.find(".loading-text").html(e),r.length)r.append(i);else{var o=$('<div class="on-demand-datagrid">'+i[0].outerHTML+"</div>");this.element.find(".app-grid-header-inner").append(o)}}},hideLoadingIndicator:function(e,t){e||t?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(),t&&(this.element.find(".on-demand-load-btn").length||this.options.addLoadMoreBtn(),this.element.find(".loading-data-msg").hide())):this.element.find(".on-demand-datagrid").hide():(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())},getSelectedRows:function(){this.getSelectedColumns();var e=[],t=this;return this.preparedData.forEach((function(n,r){n._selected&&e.push(t.options.data[r])})),e},selectRows:function(e){var t=this;t.gridElement.find("tr.app-datagrid-row").each((function(e){t.preparedData[e]&&!0===t.preparedData[e]._selected&&$(this).trigger("click",[$(this),{skipSingleCheck:!0}])})),_.isArray(e)?_.forEach(e,(function(e){t.selectRow(e,!0)})):t.selectRow(e,!0)},toggleRowFilter:function(e){this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this.gridSearch&&(e?this.gridSearch.show():this.gridSearch.hide())},setColGroupWidths:function(){var e=this,t=(this.options.isMobile,this.tableContainer.find("col")),n=this.tableContainer.find("col"),r=this.options.showHeader?this.gridContainer.find("th.app-datagrid-header-cell"):this.gridElement.find("tr.app-datagrid-row").first().find("td"),i=this.preparedHeaderData.length,o=this.gridElement.parent().prop("scrollLeft");if(t.length||r.length){this._setColSpan(this.options.headerConfig),this.toggleRowFilter();var s=0,a=t.length;t.each((function(){var e=$(this).width();e&&(s+=e,a-=1)})),r.each((function(){var r,i,o=Number($(this).attr("data-col-id")),s=e.preparedHeaderData[o],a=e.gridContainer.find('th[data-col-id="'+o+'"]'),l=e.gridElement.find('td.app-datagrid-cell[data-col-id="'+o+'"]'),u=e.tableContainer.find('tfoot tr.app-datagrid-row td.app-datagrid-cell[data-col-id="'+o+'"]'),c=$(t[o]),d=$(n[o]);s&&(r=s.width,_.isUndefined(s.show)||s.show?(a.show(),l.show(),c.show(),d.show(),u.show()):(a.hide(),l.hide(),c.hide(),d.hide(),u.hide()),c.length&&"90px"===c[0].style.width&&(i=_.isUndefined(r)?"":r,c.css("width",i),d.css("width",i)))})),r.each((function(){var r,o,l,u,c=$(this),d=Number(c.attr("data-col-id")),h=e.preparedHeaderData[d];if(h){if(r=h.width,_.isUndefined(h.show)||h.show)if(c.hasClass("grid-col-small"))o=50;else if(_.isUndefined(r)||""===r||_.includes(r,"%")){if((u=$(t[d])).length)if(""===(l=u[0].style.width)||"0px"===l||"90px"===l||_.includes(l,"%"))if((o=c.width())<=0){for(var p=c,f=o,m=0;f<=0;)f=(p=p.parent()).width(),p.find("table").length&&p.prop("style")&&(m=m+parseFloat(p.css("padding-left"))+parseFloat(p.css("padding-right")));if(f>0)if(m&&(f-=m),_.includes(l,"%"))o=f*(parseInt(l)/100);else o=(o=(s&&s>0?f-s:f)/(a||t.length))>90?i===d+1?o-17:o:90;else o=o>90?i===d+1?o-17:o:90}else o=o>90?i===d+1?o-17:o:90;else o=l}else o=r;else o=0;$(t[d]).css("width",o),$(n[d]).css("width",o)}})),this.toggleRowFilter(!0),this.gridElement.parent().prop("scrollLeft",o),this.gridHeaderElement.parent().prop("scrollLeft",o)}},getSelectedColumns:function(){var e,t,n,r={},i=[],o=this;return $.extend(i,this.preparedHeaderData),this.options.multiselect?(i.some((function(t,n){if("checkbox"===t.field)return e=n,!0})),i.splice(e,1)):this.options.showRadioColumn&&(i.some((function(e,n){if("radio"===e.field)return t=n,!0})),i.splice(t,1)),this.options.showRowIndex&&(i.some((function(e,t){if("rowIndex"===e.field)return n=t,!0})),i.splice(n,1)),i.forEach((function(e){var t=e.field;e.selected&&(r[t]={colDef:e,colData:o.options.data.map((function(e){return e[t]}))})})),r},_setOption:function(e,t){switch(this._super(e,t),e){case"showHeader":this._toggleHeader(),this._toggleSearch(),this.setColGroupWidths(),this.addOrRemoveScroll();break;case"filtermode":this._toggleSearch();break;case"searchLabel":this.gridSearch&&(this.gridSearch.find('[data-element="dgSearchText"]').attr("placeholder",t),this.gridSearch.find('[data-element="dgSearchButton"]').attr("title",t));break;case"selectFirstRow":this.selectFirstRow(t);break;case"data":this.isResetSortIconsDone||this.setSortIconDefault(),this.refreshGridData();break;case"dataStates":"nodata"===this.dataStatus.state?this.setStatus("nodata",this.dataStatus.nodata):"loading"===this.dataStatus.state&&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 n=this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid;this.options.rowExpansionEnabled&&(n=n+" "+this.options.cssClassNames.gridRowExpansionClass),this.tableContainer.attr("class",n),"condensed"===this.options.spacing&&this._toggleSpacingClasses("condensed");break;case"spacing":this._toggleSpacingClasses(t);break;case"messages":this.gridSearch&&this.gridSearch.find("option.placeholder").text(t&&t.selectField)}},getOptions:function(){return this.options},_toggleHeader:function(){this.gridHeaderElement&&this.gridHeaderElement.empty(),this.tableContainer&&(this.tableContainer.find("colgroup").remove(),this.tableContainer.find("thead").remove()),this.setDefaultColsData(),this.options.showHeader&&this._renderHeader()},_toggleSearch:function(){this.gridSearch&&this.gridSearch.remove(),this.options.filtermode===this.CONSTANTS.SEARCH?this._renderSearch():this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&(this._renderRowFilter(),this.setColGroupWidths())},selectFirstRow:function(e,t){var n,r;t&&this.gridElement.find("tr").is(":visible")?(this.__setStatus(),n=this.gridElement.find("tr.app-datagrid-row:visible:not(.always-new-row)").first()):n=this.gridElement.find("tr.app-datagrid-row:not(.always-new-row)").first(),r=n.attr("data-row-id"),n.length&&this.preparedData.length&&(this.preparedData[r]._selected=!e,n[0].click())},selectRow:function(e,t){var n,r,i=_.isNumber(e)?e:this.Utils.getObjectIndex(this.options.data,e);-1!==i&&(n="tr.app-datagrid-row[data-row-id="+i+"]",(r=this.gridElement.find(n)).length&&(this.preparedData[i]._selected=!t),t?r.trigger("click"):(this.toggleRowSelection(r,t),this.options.callOnRowDeselectEvent(this.preparedData[i])))},deselectRow:function(e){this.selectRow(e,!1)},toggleRowSelection:function(e,t,n,r){if(e.length){var i=e.attr("data-row-id");this.preparedData[i]&&(this.preparedData[i]._selected=t,t?e.addClass("active"):e.removeClass("active"),this.options.showRadioColumn&&(e.find("td input[rowSelectInput]:radio:not(:disabled)").prop("checked",t),this.preparedData[i]._checked=t),this.options.multiselect?(e.find('td input[name="gridMultiSelect"]:checkbox:not(:disabled)').prop("checked",t),this.preparedData[i]._checked=t,r||this.updateSelectAllCheckboxState()):this._deselectPreviousSelection(e,n))}},updateSelectAllCheckboxState:function(){if(this.options.showHeader&&this.options.multiselect){this.__setStatus();var e=this.gridHeaderElement.find("th.app-datagrid-header-cell input:checkbox"),t=this.gridElement,n=t.find('tr.app-datagrid-row:visible input[name="gridMultiSelect"]:checkbox:checked').length,r=t.find("tr.app-datagrid-row:visible").length;r&&n===r?e.prop("checked",!0):e.prop("checked",!1)}},rowClickHandlerOnCapture:function(e,t,n){if(!this.getColInfo(e)||"checkbox"==e.target.type){t=t||$(e.target).closest("tr.app-datagrid-row");var r=this.gridElement.find(t);if(r.length&&r.closest("tbody").attr("id")===this.gridElement.attr("id")){var i=t.attr("data-row-id"),o=this.preparedData[i],s=this.options.data[i];this.options.assignSelectedItems(s,e,{rowId:i,_selected:o?._selected})}}},rowSelectionHandler:function(e,t,n){if(!this.getColInfo(e)||"checkbox"==e.target.type){var r,i,o,s,a=this,l=(n=n||{}).action,u=$(e.target),c=this.options.editmode===this.CONSTANTS.QUICK_EDIT;t=t||u.closest("tr.app-datagrid-row"),(l||c&&(u.hasClass("app-datagrid-cell")||u.closest("td.app-datagrid-cell").length)&&!t.hasClass("always-new-row"))&&(n.action=n.action||"edit",("new"===n.operation||a.options.actionsEnabled.edit)&&a.toggleEditRow(e,n),n.skipSelect)||(r=t.attr("data-row-id"),i=this.preparedData[r],o=this.options.data[r],s=i&&i._selected||!1,n.skipSingleCheck||(!t.hasClass("active")||this.options.multiselect)&&i?(this.options.callOnRowClickEvent(o,e),s=!s,this.toggleRowSelection(t,s,e),d()):c||"new"===n.operation||d())}function d(){s&&_.isFunction(a.options.onRowSelect)&&a.options.onRowSelect(o,e),!s&&_.isFunction(a.options.onRowDeselect)&&a.options.onRowDeselect(o,e)}},rowDblClickHandler:function(e,t){e.stopPropagation();var n,r=(t=t||$(e.target).closest("tr.app-datagrid-row")).attr("data-row-id");(n=this.preparedData[r])&&_.isFunction(this.options.onRowDblClick)&&this.options.onRowDblClick(n,e)},closePopover:function(){this.options.closePopover(this.element)},headerClickHandler:function(e){var t=$(e.target).closest("th.app-datagrid-header-cell").attr("data-col-id");this.closePopover(),this.options.onHeaderClick(this.preparedHeaderData[t],e)},columnSelectionHandler:function(e,t){e&&e.stopImmediatePropagation();var n=e?$(e.target).closest("th.app-datagrid-header-cell"):t,r=n.attr("data-col-id"),i=this.preparedHeaderData[r],o=i.field,s='td[data-col-id="'+r+'"]',a=this.gridElement.find(s),l=a.data("selected")||!1,u={colDef:i,data:this.options.data.map((function(e){return e[o]})),sortDirection:this._getColumnSortDirection(i.field)},c=this.options.cssClassNames.selectedColumn;l=!l,i.selected=l,a.data("selected",l),l?(a.addClass(c),n.addClass(c),_.isFunction(this.options.onColumnSelect)&&e&&this.options.onColumnSelect(u,e)):(a.removeClass(c),n.removeClass(c),_.isFunction(this.options.onColumnDeselect)&&e&&this.options.onColumnDeselect(u,e))},getTextValue:function(e,t){return this.options.getFieldValue(t?e+"_new":e)},getUploadedFiles:function(e,t){return _.get(document.forms,[e.find("form").attr("name"),t,"files",0])},isDataModified:function(e,t,n){var r=!1,i=this;function o(e){return e?moment(e).valueOf():e}return e.each((function(){var e=$(this),s=e.attr("data-col-id"),a=i.preparedHeaderData[s],l=i.getTextValue(a.field,n),u=_.get(t,a.field);if(r="upload"===a.editWidgetType?i.getUploadedFiles(e,a.field)instanceof File:!(!i.Utils.isDefined(l)&&null==u)&&("datetime"===a.editWidgetType?!(o(u)===o(l)):!(u==l)))return!r})),r},focusActiveRow:function(){this.gridElement.find("tr.app-datagrid-row.active").focus()},focusNewRow:function(){var e=this.gridElement.find("tr.always-new-row"),t=e&&e.find("input")||[];t.length&&t[0].focus()},disableActions:function(e){var t=this.gridElement.find(".delete-row-button"),n=this.gridElement.find(".edit-row-button");e?(n.addClass("disabled-action"),t.addClass("disabled-action")):(n.removeClass("disabled-action"),t.removeClass("disabled-action"))},setFocusOnElement:function(e,t,n){var r,i,o=e&&$(e.target);o&&o.hasClass("app-datagrid-cell")?r=o.find("input"):(t?t.hasClass("app-datagrid-row")&&(t=t.find("td.cell-editing")):t=o.closest("tr.app-datagrid-row").find("td.cell-editing"),(r=$(t).first().find("input")).length||(r=$(t).first().find("textarea")),r.length||(r=$(t).first().find("select"))),r.length&&(i=r.first(),n?(i.focus(),i.select()):this.options.timeoutCall((function(){i.focus(),i.select()})))},removeNewRow:function(e){this.disableActions(!1),this._setGridEditMode(!1),e.hasClass("always-new-row")||(e.attr("data-removed",!0),e.remove(),this.preparedData.length||this.setStatus("nodata",this.dataStatus.nodata),this.addOrRemoveScroll(),this.toggleNewRowActions(!1))},saveRow:function(e){this.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").each((function(){$(this).trigger("click",[void 0,{action:"save",skipSelect:!0,noMsg:!0,success:e}])}))},makeRowEditable:function(e,t,n){var r,i=this,o=e.find("td.app-datagrid-cell"),s=parseInt(e.attr("data-row-id"),10),a=_.clone(t);a.$index=s+1,this.options.removeValidations(n),this.options.generateInlineEditRow(a,n),o.each((function(){var e,r,o=$(this),a=o.text(),l=o.attr("data-col-id"),u=i.preparedHeaderData[l];u.readonly||(e=_.get(t,u.field),r=i.options.getInlineEditWidget(u.field,e,n),u.customExpression||u.formatpattern&&"None"!==u.formatpattern?(o.addClass("cell-editing editable-expression").data("originalValue",{rowIndex:s,fieldName:u.field}),o.addClass("cell-editing editable-expression").html(r).data("originalText",a)):o.addClass("cell-editing").html(r).data("originalText",a),o.addClass("form-group"),"rowOperations"!==u.binding?i.options.timeoutCall((function(){i.options.applyValidations(u,n),u.required&&o.addClass("required-field")})):u.required&&o.addClass("required-field"))})),(r=e.find("td.cell-editing")).on("click",(function(e){e.stopPropagation()})),r.on("keydown",(function(e){38!==e.which&&40!==e.which||!e.currentTarget||e.currentTarget.closest(".always-new-row")||e.stopPropagation()}))},toggleNewRowActions:function(e){var t=this,n=$(this.element).siblings("div.panel-footer, div.panel-heading").find("div.app-datagrid-actions"),r=this.gridElement.find("tr.app-datagrid-row.row-editing"),i=n.find("i.wi-plus").closest(".app-button");this.options.editmode!==this.CONSTANTS.INLINE||0!==this.options.rowActions.length&&_.some(this.options.rowActions,{action:"editRow($event)"})||(e?(n.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>'),n.find(".cancelNewRow").on("click",(function(e){t.toggleEditRow(e,{action:"cancel",$row:r})})),n.find(".saveNewRow").on("click",(function(e){t.toggleEditRow(e,{action:"save",$row:r})})),i.hide()):($("typeahead-container").removeClass("open"),n.find(".cancelNewRow").remove(),n.find(".saveNewRow").remove(),i.show()))},_isNewRow:function(e){return parseInt(e.attr("data-row-id"),10)>=this.preparedData.length||e.hasClass("always-new-row")},toggleEditRow:function(e,t){t=t||{},e&&e.stopPropagation(),this.closePopover();var n,r,i,o,s=t.$row||$(e.target).closest("tr.app-datagrid-row"),a=s.find(".edit-row-button"),l=s.find(".cancel-edit-row-button"),u=s.find(".save-edit-row-button"),c=s.find(".delete-row-button"),d=_.cloneDeep(this.options.data[s.attr("data-row-id")])||{},h=this,p=s.hasClass("always-new-row"),f=h.options.editmode===h.CONSTANTS.QUICK_EDIT,m={};function g(e,n){_.isFunction(t.success)&&t.success(e,n),f&&!h.options.actionsEnabled.edit||h.focusActiveRow()}if(this.options.setActionRowIndex(s.attr("data-row-id")),this.options.setLastActionPerformed(this.options.ACTIONS.EDIT),"true"!==s.attr("data-removed")){if(t.selectRow&&this.selectRow(d,!0),(e=e||{}).data=e.data||{},"edit"===(n=e.data.action||t.action)){if(this.options.editmode===this.CONSTANTS.INLINE&&this.options.callLoadInlineWidgetData(),f&&h.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").length)return void h.saveRow((function(t,n){h.editSuccessHandler(t,n,e,s,!0)}));if(s.addClass("row-editing"),_.isFunction(this.options.beforeRowUpdate)&&this.options.beforeRowUpdate(d,e),h.options.editmode===h.CONSTANTS.FORM||h.options.editmode===h.CONSTANTS.DIALOG)return;if("new"===t.operation&&(h.setDefaultRowData(d),h.toggleNewRowActions(!0)),_.isFunction(this.options.onBeforeFormRender)&&!1===this.options.onBeforeFormRender(d,e,t.operation||n))return;this._setGridEditMode(!0),this.disableActions(!0),c.removeClass("disabled-action"),this.options.runInNgZone((function(){h.makeRowEditable(s,d)})),a.addClass("hidden"),l.removeClass("hidden"),u.removeClass("hidden"),i=s.find("td.cell-editing"),!t.skipFocus&&i&&this.options.timeoutCall((function(){h.setFocusOnElement(e,i)})),_.isFunction(this.options.onFormRender)&&this.options.onFormRender(s,e,t.operation||n,s.hasClass("always-new-row"))}else if(i=s.find("td.cell-editing"),r=h._isNewRow(s),"save"===n)if(!!r||this.isDataModified(i,d,p)){if(i.each((function(){var e,t=$(this),n=t.attr("data-col-id"),i=h.preparedHeaderData[n],o=_.split(i.field,".");e=h.getTextValue(i.field,p),1===o.length&&"upload"===i.editWidgetType?_.set(d,i.field,h.getUploadedFiles(t,i.field)):(e=1!==o.length&&!r||""!==e?e:void 0,h.Utils.isDefined(e)?null===(e="null"===e?null:e)?o.length>1?_.set(d,o[0],e):r||_.set(d,i.field,""):_.set(d,i.field,e):1!==o.length||r||_.set(d,i.field,e))})),i.find(".ng-pending").length>0)return void setTimeout(this.toggleEditRow.bind(this,e,t),200);if((o=i.find(".ng-invalid")).length>0)return o.each((function(e){var t=$(this).closest("td.app-datagrid-cell");0===e&&t.find("[focus-target]").focus(),h.options.setTouched(t.find("[formcontrolname]").attr("formcontrolname"))})),void(_.isFunction(t.success)&&t.success(!1,!0));if(r&&f&&_.isEmpty(d))return h.removeNewRow(s),void(_.isFunction(t.success)&&t.success(!1,void 0,!0));if(r){if(_.isFunction(this.options.onBeforeRowInsert)&&!1===this.options.onBeforeRowInsert(d,e,m))return;this.options.onRowInsert(d,e,g,m),h.toggleNewRowActions(!1),!s.hasClass("always-new-row")&&h.options.isNavTypeScrollOrOndemand()&&h.removeNewRow(s)}else{if(_.isFunction(this.options.onBeforeRowUpdate)&&!1===this.options.onBeforeRowUpdate(d,e,m))return;this.options.afterRowUpdate(d,e,g,m)}}else this.cancelEdit(s),t.noMsg||this.options.noChangesDetected(),_.isFunction(t.success)&&t.success(!1);else{if(r)return void h.removeNewRow(s);this.cancelEdit(s)}this.addOrRemoveScroll()}},cancelEdit:function(e){var t=this,n=e.find("td.cell-editing"),r=e.find(".cancel-edit-row-button"),i=e.find(".save-edit-row-button"),o=e.find(".edit-row-button");this.options.clearActionRowIndex(),this.disableActions(!1),e.removeClass("row-editing"),n.off("click"),n.each((function(){var e=$(this),n=e.data("originalValue");e.removeClass("datetime-wrapper cell-editing required-field form-group"),n?e.html(t.options.getCustomExpression(n.fieldName,n.rowIndex)):e.text(e.data("originalText")||"")})),$("typeahead-container").removeClass("open"),o.removeClass("hidden"),r.addClass("hidden"),i.addClass("hidden"),this._setGridEditMode(!1)},closeEditedRow:function(){var e=this.gridElement.find("tr.app-datagrid-row.row-editing");e.length&&(this._isNewRow(e)?this.removeNewRow(e):this.cancelEdit(e))},hideRowEditMode:function(e){if(e.hasClass("always-new-row")&&this.options.isNavTypeScrollOrOndemand())this.resetNewRow(e);else{var t=e.find("td.cell-editing"),n=e.find(".edit-row-button"),r=e.find(".cancel-edit-row-button"),i=e.find(".save-edit-row-button"),o=this;e.removeClass("row-editing"),t.off("click"),this.disableActions(!1),this._setGridEditMode(!1),t.each((function(){var e,t,n=$(this),r=n.data("originalValue");n.removeClass("datetime-wrapper cell-editing required-field form-group"),r?n.html(o.options.getCustomExpression(r.fieldName,r.rowIndex)):(t=o.preparedHeaderData[n.attr("data-col-id")],e=o.getTextValue(t.field),n.text(o.Utils.isDefined(e)?e:""))})),n.removeClass("hidden"),r.addClass("hidden"),i.addClass("hidden"),this.addOrRemoveScroll()}},deleteRow:function(e){e.stopPropagation();var t,n,r=$(e.target).closest("tr.app-datagrid-row"),i=r.attr("data-row-id"),o=this.options.data[i],s=this._isNewRow(r),a={},l=this;if(this.options.setActionRowIndex(i),this.options.setLastActionPerformed(this.options.ACTIONS.DELETE),_.isFunction(this.options.beforeRowDelete)&&this.options.beforeRowDelete(o,e),s)return this.disableActions(!1),this._setGridEditMode(!1),r.attr("data-removed",!0),r.remove(),this.preparedData.length||this.setStatus("nodata",this.dataStatus.nodata),void this.addOrRemoveScroll();_.isFunction(this.options.onBeforeRowDelete)&&!1===this.options.onBeforeRowDelete(o,e,a)||_.isFunction(this.options.onRowDelete)&&(t=this.options.cssClassNames.deleteRow,(n=-1!==r.attr("class").indexOf("active"))&&r.removeClass("active"),r.addClass(t),this.options.onRowDelete(o,(function(){n&&r.addClass("active"),r.removeClass(t),l.addOrRemoveScroll()}),e,(function(t,n){if(l.options.isNavTypeScrollOrOndemand()){var r=+$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),i=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+r+'"]');l.options.setDeletedRowIndex(r),l.preparedData.splice(r,1),l.options.data.splice(r,1),l.gridElement.find("tr.app-datagrid-row:gt("+r+")").each((function(e,t){i.is(":last-child")||$(t).hasClass("always-new-row")||($(t).attr("data-row-id",r),l.preparedData[r].$$pk--,l.preparedData[r].$$index--,l.preparedData[r].$index--,r++)})),i.remove()}var o,s;l.options.editmode===l.CONSTANTS.QUICK_EDIT&&($(e.target).hasClass("delete-row-button")||l.Utils.isDeleteKey(e))&&(l.__setStatus(),n||(o=+$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),(s=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+o+'"]')).length||(s=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+(o-1)+'"]')),s.trigger("click",[void 0,{action:"edit",skipFocus:t}])))}),a))},deleteRowAndUpdateSelectAll:function(e){this.deleteRow(e),this.updateSelectAllCheckboxState()},_deselectPreviousSelection:function(e,t){var n=this.gridElement.find("tr.app-datagrid-row.active"),r=e.attr("data-row-id"),i=this;n.each((function(){var e=$(this).attr("data-row-id"),n=i.preparedData[e];e!==r&&n&&($(this).find("input[rowSelectInput]:radio").prop("checked",!1),n._selected=n._checked=!1,$(this).removeClass("active"),i.options.callOnRowDeselectEvent(n,t))}))},resetSortIcons:function(e){var t;this.isResetSortIconsDone=!0,!e&&this.gridHeaderElement&&(e=(t=this.gridHeaderElement.find(".sort-buttons-container.active")).find("i.sort-icon"),t.removeClass("active")),e.removeClass("desc asc").removeClass(this.options.cssClassNames.descIcon).removeClass(this.options.cssClassNames.ascIcon)},setSortIconDefault:function(){const e=this.options.sortInfo,t=this.tableContainer.find("[data-col-field='"+e.field+"']").find(".sort-buttons-container"),n=t.find("i.sort-icon"),r=e.direction;"asc"===r?(n.addClass(r+" "+this.options.cssClassNames.ascIcon),t.addClass("active")):"desc"===r&&(n.addClass(r+" "+this.options.cssClassNames.descIcon),t.addClass("active"))},sortHandler:function(e){e.stopImmediatePropagation(),$(e.target).hasClass("header-data")&&this.options.enableColumnSelection&&this.headerClickHandler(e);var t,n,r,i=$(e.target).closest("th.app-datagrid-header-cell"),o=i.attr("data-col-id"),s=i.find(".sort-buttons-container"),a=s.find("i.sort-icon"),l=a.hasClass("asc")?"desc":"asc",u=this.options.sortInfo,c=this.gridHeaderElement.find(".sort-buttons-container.active"),d=i.attr("data-col-field");this.resetSortIcons(a),a.addClass(l),"asc"===l?(a.addClass(this.options.cssClassNames.ascIcon),s.addClass("active")):"desc"===l&&(a.addClass(this.options.cssClassNames.descIcon),s.addClass("active")),c.length&&(n=c.closest("th.app-datagrid-header-cell").attr("data-col-id"),r=this.preparedHeaderData[n],t=c.find("i.sort-icon"),r.field!==d&&(c.removeClass("active"),this.resetSortIcons(t)),r.sortInfo={sorted:!1,direction:""}),u.direction=l,u.field=d,""!==l&&(this.preparedHeaderData[o].sortInfo={sorted:!0,direction:l}),this._setGridEditMode(!1),this.closeEditedRow(),this.options.sortHandler.call(this,this.options.sortInfo,e,"sort")},processUpDownKeys:function(e,t,n){var r=this,i=t.find("input").val();t.hasClass("row-editing")&&r.options.editmode===r.CONSTANTS.QUICK_EDIT&&i?r.toggleEditRow(e,{action:"save",noMsg:!0,success:function(i,o){r.editSuccessHandler(i,o,e,t,!0,n)}}):(t="down"===n?t.next():t.prev(),this.options.rowExpansionEnabled&&!t.is(":visible")&&(t="down"===n?t.next():t.prev()),t.focus())},resetNewRow:function(e){var t={},n=this;this.options.clearForm(!0),n.setDefaultRowData(t),e.find("[data-field-name]").each((function(){var e=$(this),r=e.attr("data-field-name")+"_new";n.options.setFieldValue(r,t[e.attr("data-field-name")]||"")})),n.options.safeApply(),n.setFocusOnElement(void 0,e,!0)},_onEnter:function(e,t,n,r){var i=this;e.is("button")||(n&&e.hasClass("app-datagrid-row")&&!e.hasClass("row-editing")?t.trigger("click",[void 0,{action:"edit"}]):t.hasClass("row-editing")&&e.closest("[data-field-name]").length?(e.blur(),i.toggleEditRow(r,{action:"save",success:function(t,n){n?e.focus():(i.focusActiveRow(),i.focusNewRow())}})):(t.trigger("click"),n&&e.hasClass("always-new-row")&&e.hasClass("row-editing")&&i.focusNewRow()),e.is("button")||r.stopPropagation())},onKeyDown:function(e){var t,n=$(e.target),r=n.closest("tr.app-datagrid-row"),i=this.options.editmode===this.CONSTANTS.QUICK_EDIT;if(this.options.rowExpansionEnabled&&!r.length&&(r=n.closest("tr.app-datagrid-detail-row")),!this.Utils.isDeleteKey(e))return 27===e.which?((t=this._isNewRow(r))&&r.hasClass("always-new-row")?(n.blur(),this.resetNewRow(r)):r.trigger("click",[void 0,{action:"cancel"}]),void(t||r.focus())):13===e.which?(e.stopPropagation(),void this._debounceOnEnter(n,r,i,e)):void(38!==e.which?40===e.which&&this.processUpDownKeys(e,r,"down"):this.processUpDownKeys(e,r,"up"));!this.options.actionsEnabled.delete||n.is("input")||n.hasClass("form-control")||this.deleteRow(e)},editSuccessHandler:function(e,t,n,r,i,o){var s,a,l=this;if(l.__setStatus(),t)l.setFocusOnElement(n);else{if(s=+r.attr("data-row-id"),o)return s="down"===o?++s:--s,void((a=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+s+'"]')).length?a.focus():r.focus());i||_.isUndefined(i)||s++,(a=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+s+'"]')).hasClass("always-new-row")?("top"!==l.options.formPosition||r.hasClass("always-new-row"))&&l.addNewRow(e):a.length?a.trigger("click",[void 0,{action:"edit",skipFocus:e,skipSelect:l.options.multiselect}]):l.options.actionsEnabled.new&&l.addNewRow(e)}},isLastColumn:function(e){var t,n=e.closest("td.app-datagrid-cell");return!!n.is(":last-child")||!!n.hasClass("cell-editing")&&(t=n.closest("tr.app-datagrid-row").find(".cell-editing").has('> :not([disabled="disabled"])'),n.attr("data-col-id")===t.last().attr("data-col-id"))},getColInfo:function(e){var t=$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),n=$(e.target).closest("td.app-datagrid-cell").attr("data-col-id");return!!(this.columnClickInfo&&this.columnClickInfo[t]&&this.columnClickInfo[t][n])&&this.columnClickInfo[t][n]},attachEventHandlers:function(e){var t=this.gridHeaderElement,n=this;this.options.enableRowSelection&&(e[0].removeEventListener("click",this.rowClickHandlerOnCapture.bind(this)),e.off(),e[0].addEventListener("click",this.rowClickHandlerOnCapture.bind(this)),e.on("click",this.rowSelectionHandler.bind(this)),e.on("click","td *",(function(e){if("checkbox"!=e.target.type){var t=$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),r=$(e.target).closest("td.app-datagrid-cell").attr("data-col-id"),i=Number(r);n.preparedHeaderData[i].readonly&&(n.columnClickInfo[t]={},n.columnClickInfo[t][r]=!0)}})),e.on("dblclick",this.rowDblClickHandler.bind(this)),e.on("keydown",this.onKeyDown.bind(this))),t&&(this.options.enableColumnSelection?(t.find("th[data-col-selectable]").off("click",this.columnSelectionHandler.bind(this)),t.find("th[data-col-selectable]").on("click",this.columnSelectionHandler.bind(this))):t.find("th[data-col-selectable]").off("click"),this.options.enableSort?this.options.enableColumnSelection?(t.find("th[data-col-sortable] .header-data").off("click",this.sortHandler.bind(this)),t.find("th[data-col-sortable] .header-data").on("click",this.sortHandler.bind(this))):(t.find("th[data-col-sortable]").off("click",this.sortHandler.bind(this)),t.find("th[data-col-sortable]").on("click",this.sortHandler.bind(this))):this.options.enableColumnSelection?t.find("th[data-col-sortable] .header-data").off("click"):t.find("th[data-col-sortable]").off("click")),this.options.rowActions.length&&(e.find(".cancel-edit-row-button").off("click"),e.find(".save-edit-row-button").off("click"),e.find(".cancel-edit-row-button").on("click",{action:"cancel"},this.toggleEditRow.bind(this)),e.find(".save-edit-row-button").on("click",{action:"save"},this.toggleEditRow.bind(this))),n.options.editmode===n.CONSTANTS.QUICK_EDIT&&e.on("focusout","tr.app-datagrid-row",(function(e){var t=$(e.target),r=t.closest("tr.app-datagrid-row"),i=$(e.relatedTarget),o=n.isLastColumn(t,i),s=t.closest("span.actions-column").length>0,a=i.closest("span.actions-column").length>0,l=i.closest("div.app-datagrid-actions").length>0,u=i.closest("div.app-datagrid-actions").length>0;i.is("tr.app-datagrid-row")&&i.attr("data-row-id")===r.attr("data-row-id")||a||r.hasClass("danger")||u||s&&a||s&&null===e.relatedTarget||!i.closest(".app-grid").length||i.is('.row-editing:not(".always-new-row"), .row-action-button, .app-datagrid-cell, .caption, button.btn-time, button.btn-date')||""===i.attr("focus-target")||(l||s||!(!o||o&&null===e.relatedTarget||t.hasClass("file-upload")))&&n.options.timeoutCall((function(){n.toggleEditRow(e,{action:"save",noMsg:!0,success:function(t,i,o){o||n.editSuccessHandler(t,i,e,r)}})}))})),e.find('[data-identifier="rowExpansionButtons"]').off("click"),e.find('[data-identifier="rowExpansionButtons"]').on("click",(function(e){var t=$(e.target).closest("tr.app-datagrid-row");$(this).find(".app-button").attr("disabled")||n.toggleExpandRow(+t.attr("data-row-id"),void 0,e)}))},expandRow:function(e){this.toggleExpandRow(e,!0)},collapseRow:function(e){this.toggleExpandRow(e,!1)},_collapseRow:function(e,t,n,r,i){var o=this.gridElement,s=$(o.find('> tr.app-datagrid-row[data-row-id="'+n+'"]'));s.removeClass(this.options.cssClassNames.expandedRowClass),s.find("button, a").attr("aria-expanded","false").attr("aria-live","polite"),!1!==this.options.onBeforeRowCollapse(e,t,n)&&(i.length&&i.hasClass(this.options.cssClassNames.rowExpandIcon)&&i.removeClass(this.options.cssClassNames.rowExpandIcon).addClass(this.options.cssClassNames.rowCollapseIcon),r.hide(),this.options.onRowCollapse(e,t))},toggleExpandRow:function(e,t,n){var r=this,i=r.gridElement,o=$(i.find('> tr.app-datagrid-row[data-row-id="'+e+'"]')),s=_.clone(r.options.data[e]),a=o.next("tr.app-datagrid-detail-row"),l=!a.is(":visible"),u=o.find('[data-identifier="rowExpansionButtons"] i.app-icon');s.$index=e+1,t&&!l||!1===t&&l||(l?(o.addClass(r.options.cssClassNames.expandedRowClass),o.find("button, a").attr("aria-expanded","true"),n&&r.preparedData[e]._selected&&n.stopPropagation(),r.options.rowDef.closeothers&&i.find("> tr.app-datagrid-detail-row:visible").each((function(){var e=$(this),t=e.prev("tr.app-datagrid-row").find('[data-identifier="rowExpansionButtons"] i.app-icon'),i=+e.attr("data-row-id"),o=r.options.data[i];e.hide(),r._collapseRow(n,o,i,e,t)})),r.options.generateRowDetailView(n,s,e,a.find("td.app-datagrid-row-details-cell .details-section"),a.find("td.app-datagrid-row-details-cell .row-overlay"),(function(){u.length&&u.hasClass(r.options.cssClassNames.rowCollapseIcon)&&u.removeClass(r.options.cssClassNames.rowCollapseIcon).addClass(r.options.cssClassNames.rowExpandIcon),a.show()}))):r._collapseRow(n,s,e,a,u))},_findAndReplaceCompiledTemplates:function(){if(this.gridElement){var e=this.gridElement.find("td[data-compiled-template]"),t=this;e.each((function(){var e=$(this),n=e.attr("data-compiled-template");e.replaceWith(t.compiledCellTemplates[n])}))}},_renderSearch:function(){var e,t=$(this._getSearchEl()),n=this;function r(e){e.stopPropagation();var r=t.find('[data-element="dgSearchText"]')[0].value,i=t.find('[data-element="dgFilterValue"]')[0].value,o=t.find("option:selected").attr("data-coldef-index"),s=n.options.colDefs[o],a=s&&s.type?s.type:"";n.searchObj={field:i,value:r,type:a,event:e},n.options.searchHandler.call(n,n.searchObj,e,"search")}this.element.find(".form-search").remove(),t.insertBefore(this.gridContainer),this.gridSearch=this.element.find(".form-search"),e=this.gridSearch.find('[data-element="dgSearchText"]'),this.gridSearch.find(".app-search-button").on("click",r),this.gridSearch.find('[data-element="dgFilterValue"]').on("change",(function(e){n.dataStatusContainer.find(".status").text()===n.options.dataStates.nodata&&r(e)})),e.on("keyup",(function(e){e.stopPropagation(),$(this).val()?n.emptySearch=!1:(n.emptySearch=!0,n.searchObj.value&&(n.searchObj.value="",r(e))),(13===e.which||n.options.filteronkeypress)&&r(e)}))},_renderRowFilter:function(){var e=$('<tr class="filter-row"></tr>'),t=this,n=this.options.isMobile&&!this.options.showHeader?this.gridElement:this.gridHeaderElement;n.find(".filter-row").remove(),this.options.generateFilterRow(),this.preparedHeaderData.forEach((function(n,r){var i=n.field,o=$('<th data-col-id="'+r+'"></th>');n.searchable?(o.append(t.options.getFilterWidget(i)),e.append(o)):e.append(o)}),this),this.options.showHeader?this.gridHeaderElement.append(e):(this.options.isMobile,n.empty().append(e)),this.gridSearch=n.find(".filter-row")},_renderHeader:function(){var e,t=this._getHeaderTemplate(),n=t.colgroup,r=this;if(this.gridElement.parent().scroll((function(){r.gridHeaderElement.parent().prop("scrollLeft",this.scrollLeft)})),!this.options.showHeader)return this.tableContainer.append(n),void this.gridHeaderElement.hide();this.gridHeaderElement.show();var i=(e=t.header).find("th.app-datagrid-header-cell"),o=n.find("col");i.each((function(){var e=Number($(this).attr("data-col-id")),t=r.preparedHeaderData[e],n=$(o[e]);t&&(_.isUndefined(t.show)||t.show||($(this).hide(),n.hide()))})),this.options.isMobile,this.tableContainer.append(n),e.on("click",".app-datagrid-header-cell input:checkbox",(function(e){var t=$('tr.app-datagrid-row:not(.always-new-row):visible td input[name="gridMultiSelect"]:checkbox',r.gridElement),n=this.checked;t.prop("checked",n),t.each((function(){var t=$(this).closest("tr.app-datagrid-row"),i=t.attr("data-row-id"),o=r.options.data[i];r.options.assignSelectedItems(o,e,{rowId:i,_selected:r.preparedData[i]?._selected}),r.toggleRowSelection(t,n,e,!0),n&&_.isFunction(r.options.onRowSelect)&&r.options.onRowSelect(o,e),!n&&_.isFunction(r.options.onRowDeselect)&&r.options.onRowDeselect(o,e)}))})),_.isFunction(this.options.onHeaderClick)&&this.gridHeaderElement.find("th.app-datagrid-header-cell").on("click",this.headerClickHandler.bind(this)),!this.options.isMobile&&this.gridHeaderElement.length&&this.gridHeaderElement.find("th[data-col-resizable]").resizable({handles:"e",minWidth:50,resize:function(e,t){var n,i,o,s,a=+t.helper.attr("data-col-id")+1,l=t.helper.width(),u=t.size.width;i=r.tableContainer.find("colgroup > col:nth-child("+a+")"),n=r.tableContainer.find("colgroup > col:nth-child("+a+")"),o=r.gridElement.find("tr.app-datagrid-row > td:nth-child("+a+") > div"),n.width(u),i.width(u),o.width(u),$(this).css("height","auto"),u>t.originalSize.width&&(s=r.gridHeaderElement.width()+u-l,r.gridHeaderElement.width(s),r.gridElement.width(s)),r.addOrRemoveScroll(),r.options.redrawWidgets()}}),this.isResetSortIconsDone||this.setSortIconDefault()},addOrRemoveScroll:function(){var e=this.gridContainer.find("tbody"),t=this.gridContainer.find(".table-header");e.scrollHeight>e.clientHeight&&!this.Utils.isMac()?t.addClass("scroll-visible"):t.removeClass("scroll-visible")},_handleCustomEvents:function(e,t){this.options.handleCustomEvents(e,t)},_setActionsEnabled:function(){var e=this;_.forEach(this.options.rowActions,(function(t){_.includes(t.action,"editRow(")?e.options.actionsEnabled.edit=!0:_.includes(t.action,"deleteRow(")&&(e.options.actionsEnabled.delete=!0)}))},_appendRowActions:function(e,t,n){var r,i=this._getRowActionsColumnDef();(this.options.rowActions.length||i)&&(this._setActionsEnabled(),r=this,e.find("[data-identifier='actionButtons']").each((function(e){var i,o,s,a=e;t?i=n:(o=$(this).closest("tr.app-datagrid-row"),s=parseInt(o.attr("data-row-id"),10),(i=_.clone(r.options.data[s])).$index=a+1),r.options.generateRowActions(i,a),$(this).empty().append(r.options.getRowAction(a))})))},_renderGrid:function(e){var t,n=this.options.isNavTypeScrollOrOndemand();this.getPageStartIndex();if($("table.table-bordered").parents(".app-grid-header-inner").addClass("table_border"),n){var r=this.gridElement,i=this._getGridTemplate();t=$(i),i&&!r.length&&this.gridElement.append(t)}else{var o=this._getGridTemplate();t=$(o),o&&this.gridElement.append(t)}if(this.options.summaryRow){var s=$(this._getSummaryRowTemplate());this.tableContainer.find("tfoot").remove(),this.options.data.length&&this.tableContainer.append(s)}this.options.data.length||"nodata"!==this.dataStatus.state?(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,e)):this.setStatus("nodata"),this.gridBody=this.gridElement.find("tbody"),this.gridFooter=this.tableContainer.find("tfoot"),this._findAndReplaceCompiledTemplates(),this.options.clearRowActions(),this._appendRowExpansionButtons(t),this._appendRowActions(t),this.attachEventHandlers(t),this.__setStatus(e),this.options.editmode===this.CONSTANTS.QUICK_EDIT&&this.options.showNewRow&&this.addNewRow(!1,!0),e&&this._setColSpan(this.options.headerConfig),_.isFunction(this.options.onDataRender)&&this.options.onDataRender(),!e&&this.options.selectFirstRow&&(this.options.multiselect&&(this.options.selectFirstRow=!1),this.gridElement.find("tr.app-datagrid-row.active").length<=0&&this.selectFirstRow(!0,!0))},_render:function(e){this.tableId||(this.tableId=this.Utils.generateGuid());!this.options.isNavTypeScrollOrOndemand()||"100%"!==this.options.height&&this.options.height;var t='<div class="overlay"><div class="status"><i class="'+this.options.loadingicon+'"></i><span class="message"></span></div></div>',n='<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>',r=$(t),i=this.element.find(".table-container");this.gridContainer=$(n),this.gridHeaderElement=this.gridContainer.find(".table-header"),this._setStyles(r.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"),(!this.options.isNavTypeScrollOrOndemand()||i.length&&this.options.isNextPageData)&&this.options.isNavTypeScrollOrOndemand()||(this.element.find(".table-container").remove(),this.element.append(this.gridContainer)),this.options.setIsNextPageData(!1),this.gridContainer.find(".overlay").length||(this.dataStatusContainer=$(t),this.gridContainer.append(this.dataStatusContainer)),this.gridHeaderElement&&(this.gridHeaderElement.empty(),this.gridElement.find("colgroup").remove()),this._renderHeader(),this.options.filtermode===this.CONSTANTS.SEARCH&&(_.isEmpty(this.searchObj)||this.searchObj&&!this.searchObj.field&&!this.searchObj.value)?this._renderSearch():this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this._renderRowFilter(),"condensed"===this.options.spacing&&this._toggleSpacingClasses("condensed"),this._renderGrid(e),this.addNavigationControls()},addNavigationControls:function(){this.options.isdynamictable&&(this.element.find(".on-demand-datagrid").remove(),"On-Demand"!==this.options.navigation||this.element.find(".on-demand-datagrid").length?"Scroll"===this.options.navigation&&this.options.bindScrollEvt():this.options.addLoadMoreBtn())},__setStatus:function(e){var t=this.dataStatusContainer.find("i"),n=this.dataStatus.state,r=this.options.isNavTypeScrollOrOndemand();this.dataStatusContainer.find(".message").text(this.dataStatus.message),"loading"===n?t.removeClass("hidden"):t.addClass("hidden"),"ready"===n?this.dataStatusContainer.hide():(this.options.isNavTypeScrollOrOndemand()&&("nodata"===n||this.options.getCurrentPage()==this.options.getPageCount()&&!this.options.showviewlessbutton)&&this.element.find(".on-demand-datagrid a").hide(),this.dataStatusContainer.show()),"nodata"===n||"loading"===n||"error"===n?("100%"!==this.options.height&&"auto"!==this.options.height||("nodata"===n?(this.dataStatusContainer.css("height","auto"),this.dataStatus.contentHeight=0):this.options.isNavTypeScrollOrOndemand()&&this.options.getCurrentPage()>1?this.dataStatusContainer.hide():(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))),(!r||r&&1===this.options.getCurrentPage())&&this.gridContainer.addClass("show-msg")):(this.gridContainer.removeClass("show-msg"),this.options.editmode===this.CONSTANTS.QUICK_EDIT&&(this.options.activeRow&&this.attachHandlersToActiveRow(this.options.activeRow),this.options.activeRow=void 0)),e||this.setColGroupWidths(),this.addOrRemoveScroll()},attachHandlersToActiveRow(e){var t=this.Utils.getObjectIndex(this.options.data,e),n=this.gridElement.find("tr.app-datagrid-row[data-row-id="+t+"]");n.length&&(n.hasClass("active")||n.addClass("active"),this.focusActiveRow(),this.attachEventHandlers(n))},setActiveRow(e){this.options.activeRow=e},setStatus:function(e,t,n){var r;"nodata"===e&&(e=(r=this.gridElement&&this.gridElement.find("tr.app-datagrid-row.always-new-row"))&&r.length?"ready":e),this.dataStatus.state=e,this.options.setGridState(e),this.dataStatus.message=t||this.options.dataStates[e],this._setStatusCalled?this._setStatus(n):(this.__setStatus(n),this._setStatusCalled=!0)},setGridDimensions:function(e,t){if(-1===t.indexOf("px")&&-1===t.indexOf("%")&&-1===t.indexOf("em")&&"auto"!=t&&(t+="px"),this.options[e]=t,"height"===e){this.gridHeaderElement.find("th");this.gridContainer.find(".app-grid-header-inner").css(e,t),this.options.isNavTypeScrollOrOndemand()&&"100%"!=this.options.height&&"auto"!=this.options.height&&this.gridContainer.find(".app-grid-header-inner").css("overflow","auto"),this.dataStatusContainer.css(e,t)}this.addOrRemoveScroll()},setColumnProp:function(e,t,n,r){var i;"displayName"===t&&((i=r?this.gridHeaderElement.find('th[data-col-group="'+e+'"]'):this.gridHeaderElement.find('th[data-col-field="'+e+'"]')).attr("title",n),i.find(".header-data").html(n),this.options.filtermode===this.CONSTANTS.SEARCH&&this.gridSearch&&this.gridSearch.find('select option[value="'+e+'"]').text(n))},applyRowNgClass:function(e,t){var n=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+t+'"]');n.removeClass(e.toRemove),n.addClass(e.toAdd)},applyColNgClass:function(e,t,n){var r=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+t+'"] td.app-datagrid-cell[data-col-id="'+n+'"]');r.removeClass(e.toRemove),r.addClass(e.toAdd)},_destroy:function(){this.element.text(""),window.clearTimeout(this.refreshGridTimeout)}}),window.requestAnimationFrame=function(){"use strict";return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimaitonFrame||function(e){window.setTimeout(e,1e3/60)}}(),function(e){"use strict";var t,n,r={NONE:0,HORIZONTAL:1,LEFT_TO_RIGHT:2,RIGHT_TO_LEFT:3,VERTICAL:4,TOP_TO_DOWN:5,DOWN_TO_TOP:6},i=Math.abs,o=Math.max,s=["INPUT","SELECT","OPTION"],a=e("<div></div>");a.css({"background-color":"rgba(0, 0, 0, 0)",position:"fixed",top:0,width:"100vw",height:"100vh","z-index":1e5});var l=[],u=[],c=null,d=function(t){t&&(t.pointerId&&t.pointerId!==c||t.touches&&t.touches.length>1)&&h(t),e.each(l,(function(e,n){return n(t)}))},h=function(t){c=null,e.each(u,(function(e,n){return n(t)})),l.length=0,u.length=0};function p(e,t,n){(e.__zone_symbol__addEventListener||e.addEventListener).call(e,t,n,{passive:!0})}function f(t,n,r){var i=function(t){for(var r=n;r;)t.push({$ele:e(r),last:{scrollLeft:r.iscroll?r.iscroll.x:r.scrollLeft,scrollTop:r.iscroll?r.iscroll.y:r.scrollTop}}),r=r.parentElement;return t}([]);this.hasSrcolled=function(){return r===e.fn.swipey.DIRECTIONS.VERTICAL?(e.each(i,(function(){this.$ele[0].iscroll?isNaN(this.$ele[0].iscroll.y)||0===this.$ele[0].iscroll.y||(t=!0):0!==this.$ele[0].scrollTop&&(t=!0)})),t):r===e.fn.swipey.DIRECTIONS.HORIZONTAL?function(){var t;return e.each(i,(function(){this.$ele[0].iscroll?isNaN(this.$ele[0].iscroll.x)||0===this.$ele[0].iscroll.x||(t=!0):0!==this.$ele[0].scrollLeft&&(t=!0)})),t}():void 0;var t}}function m(e){return e.originalEvent&&"mouse"!==e.originalEvent.pointerType?e.originalEvent:e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches[0]||e&&e.touches&&e.touches[0]||e}function g(e,t,n){var s,a,l=0;return n===r.HORIZONTAL?l=t.x-e.x:n===r.LEFT_TO_RIGHT?l=o(t.x-e.x,0):n===r.RIGHT_TO_LEFT?l=o(e.x-t.x,0):n===r.VERTICAL?l=t.y-e.y:n===r.TOP_TO_DOWN?l=o(t.y-e.y,0):n===r.DOWN_TO_TOP?l=o(e.y-t.y,0):(s=t.x-e.x,a=t.y-e.y,l=o(i(s),i(a)),(s<0&&i(s)===l||a<0&&i(a)===l)&&(l=-l)),l}function v(e,r){var i=m(e);i&&r.data.path.push({x:i.pageX,y:i.pageY}),n.push((function(){t.onSwipeEnd(e,r.data),r.onSwipeEnd.call(r.target,e,r.data)})),n.process()}function y(r,o){var s,c,d,h=m(r),p=o.data.path[0],f={x:h.pageX,y:h.pageY};return d=g(p,f,o.direction),o.data.length=d<0?-1:1,o.lastDistance=o.data.length,o.data.path=[f],o.data.totalLength=i(o.data.length),o.data.startTime=Date.now(),!1!==o.onSwipeStart.call(o.target,r,o.data)&&(a.appendTo(e("body")),s=function(r){!function(r,o){var s,a,l=m(r),u=o.data.path[0],c={x:l.pageX,y:l.pageY},d=g(u,c,o.direction),h=[];if(o.renderInProgress=!1,d!==o.lastDistance){s=30*(d<o.lastDistance?-1:1),a=d-o.lastDistance;for(var p=s;s>0&&p<=a||s<0&&p>=a;p+=s)h.push(p+o.lastDistance);a%s!=0&&h.push(a%i(s)+(0===h.length?o.lastDistance:h[h.length-1])),o.lastDistance=d,e.each(h,(function(){var e=this;n.push((function(){o.data.length=e,o.data.totalLength+=i(e),o.data.velocity=i(o.data.totalLength/(Date.now()-o.data.startTime)),o.data.path.push(c),!1===o.onSwipe.call(o.target,r,o.data)&&v(r,o),t.onSwipe(r,o.data)}))})),n.process()}}(r,o)},c=function(e){a.remove(),v(e,o)},(l=[]).push(s),(u=[]).push(c),t.onSwipeStart(r,o.data),!0)}function b(e,t){var n=t.data.path[0],o={x:e.pageX,y:e.pageY},s=g(n,o,t.direction);return i(s)>t.threshold&&function(e,t,n){if(n===r.HORIZONTAL){if(Math.abs((t.y-e.y)/(t.x-e.x))<=.36397023426)return!0}else if(n===r.VERTICAL&&Math.abs((t.y-e.y)/(t.x-e.x))>=2.74747741945)return!0;return!1}(n,o,t.direction)}function w(e){var t=e.bindEvents,n="";_.includes(t,"touch")?n+="touchstart":_.includes(t,"mouse")?n+="mousedown":_.includes(t,"pointer")&&(n+="pointerdown"),n&&p(e.target[0],n,(function(t){if(!e.disableMouse||"mouse"!==t.pointerType){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(s.indexOf(t.target.tagName)<0))return;t.preventDefault()}var n=m(t);n&&function(e,t){var n;t.scrollObserver=new f(event.currentTarget,event.target,t.direction),n=function(e){if(b(m(e),t)&&(t.scrollObserver.hasSrcolled()||y(e,t)))return!1},l.push(n),t.data={path:[{x:e.pageX,y:e.pageY}]}}(n,e)}}))}window.PointerEvent&&function(){if(/iP(hone|od|ad)/.test(navigator.platform)){var e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return parseInt(e[1],10)}}()>=13?(p(document,"pointerdown",(function(e){c&&c!==e.pointerId?h(e):c=e.pointerId})),p(document,"pointermove",d),p(document,"pointerup",h),p(document,"pointercancel",h)):(p(document,"mousemove",d),p(document,"touchmove",d),p(document,"mouseup",h),p(document,"touchcancel",h),p(document,"touchend",h)),n=new function(){var e=[],t=!1;function n(){if(e.length>0){try{e.shift()()}catch(e){console.error("Function invocation failed",e)}window.requestAnimationFrame(n)}else t=!1}this.push=function(t){e.push(t)},this.process=function(){t||(t=!0,n())}},e.fn.swipey=function(t){return this.each((function(){w(e.extend({direction:r.NONE,target:e(this),bindEvents:["touch","mouse"],swipeTarget:document,threshold:30,onSwipeStart:e.noop,onSwipe:e.noop,onSwipeEnd:e.noop,disableMouse:!0},t))})),this},t={onSwipeStart:function(t,n){if(e.fn.swipey.trace){var r='<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'+n.path[0].x+" "+n.path[0].y+' " /> </svg>';r.css({position:"fixed",top:0,left:0,width:"100vw",height:"100vh","z-index":1e4}),e("body").append(r),n.tracer={pathd:e("#canvas path")}}},onSwipe:function(e,t){if(t.tracer){var n=t.tracer.pathd.attr("d"),r=t.path[t.path.length-1];t.tracer.pathd.attr("d",n+" L"+r.x+" "+r.y+" ")}},onSwipeEnd:function(t,n){if(n.tracer){var r=n.path[0],i=[r,{y:r.y-50},{x:r.x+50},{y:r.y+50}],o=0;_.forEach(n.path,(function(e){var t;o!==i.length&&(!(t=i[o]).x||t.x<=e.x)&&(!t.y||t.y<=e.y)&&o++})),setTimeout((function(){e("body >#canvas").remove()}),500)}}},e.fn.swipey.DIRECTIONS=r}(jQuery),function(e){var t,n=/\$\{\{[a-zA-Z\+-/%\.\*\s\(\)\d,\\'"\$_]*\}\}/;function r(r){var i,o=[];if(t=t||(e.fn.swipeAnimation.expressionEvaluator?e.fn.swipeAnimation.expressionEvaluator:window.exprEval&&window.exprEval.Parser?function(e){var t=(new window.exprEval.Parser).parse(e);return function(e){return t.evaluate(e)}}:void 0),_.isFunction(r))return r;if(t){for(;null!==(i=n.exec(r));){var s=i[0],a=r.substring(0,i.index);r=r.substring(i.index+s.length),s=s.substring(3,s.length-2),o.push(a),o.push(t(s).bind({}))}return o.push(r),function(){var e=arguments;return _.map(o,(function(t){return _.isFunction(t)?t.apply(void 0,e):t})).join("")}}}function i(e,t,n){return _.isFunction(e)?e.apply(t,n):e}function o(e,t,n){var r=0,o=i(t.bounds,e,n);return _.isUndefined(o.center)||(r=o.center),_.isUndefined(o.lower)||(o.lower=o.lower+r),_.isUndefined(o.upper)||(o.upper=o.upper+r),o}function s(e){_.forEach(e.animation,(function(e){(_.isFunction(e.target)||e.targetFn)&&(e.targetFn=_.isUndefined(e.targetFn)?e.target:e.targetFn,e.target=e.targetFn())}))}function a(){this.setSettings=function(e,t){t.data("swipeAnimationDefaults",e)},this.getSettings=function(e){return e.data("swipeAnimationDefaults")}}function l(t,n,r,i,o,s){_.forEach(t.animation,(function(t){t.target&&(t.target.length>1?t.target.each((function(r){n.$i=r,e(this).css(_.mapValues(t.css,(function(e,t){return e(n)})))})):(n.$i=0,t.target.css(_.mapValues(t.css,(function(e,t){return e(n)})))),t.target.css({transition:"all ease-out "+r+"ms"}),t.target.one("webkitTransitionEnd transitionend",(function(){t.target.css({transition:""})})))})),setTimeout((function(){window.requestAnimationFrame((function(){n.$D===n.bounds.lower?t.onLower.call(i,s):n.$D===n.bounds.upper&&t.onUpper.call(i,s),t.onAnimation(s,o)}))}),r)}var u={gotoUpper:function(){c(this,"upper",arguments[1])},gotoLower:function(e){c(this,"lower",arguments[1])}};function c(e,t,n){var r,u=(new a).getSettings(e),c={},d=o(e,u);s(u),n=n||300,r=i(u.context,e),(c=_.extend({},r)).$d=0,c.$D="lower"===t?d.lower:d.upper,c.bounds=d,l(u,c,n,e)}function d(t,n){var u={$D:0},c={max:Math.max,min:Math.min,abs:Math.abs};if(!_.isArray(n.animation)){var d=n.animation.target||t,h=n.animation.css||n.animation;delete h[t],n.animation=[{target:d,css:h}]}_.forEach(n.animation,(function(e){e.css=_.mapValues(e.css,(function(e,t){return r(e)}))})),(new a).setSettings(n,t),t.swipey({direction:n.direction,threshold:n.threshold,bindEvents:n.bindEvents,target:n.target,onSwipeStart:function(e,r){var a,l,d,h;if(u.$d=0,u.bounds=o(this,n,[e,r.length]),_.isUndefined(u.bounds.center)?u.$D=0:u.$D=u.bounds.center,a=u.$D+r.length,u.bounds.strictLower=!(!1===u.bounds.strict||!1===u.bounds.strictLower),u.bounds.strictUpper=!(!1===u.bounds.strict||!1===u.bounds.strictUpper),!n.enableGestures()||u.bounds.strictLower&&(_.isUndefined(u.bounds.lower)&&r.length<0||!_.isUndefined(u.bounds.lower)&&u.bounds.lower>a)||u.bounds.strictUpper&&(_.isUndefined(u.bounds.upper)&&r.length>0||!_.isUndefined(u.bounds.upper)&&u.bounds.upper<a))return!1;u.vc=(l=0,d=0,h=0,{addDistance:function(e){var t=Date.now();return Math.abs(e-l)>10&&t!==d&&(h=(e-l)/(t-d),l=e,d=t),h=h<0?Math.min(h,-1):Math.max(h,1),this},getVelocity:function(){return h},getTime:function(e){return Math.abs(e/h)}}),u.context=_.extend(c,i(n.context,t)),u.localState=_.extend({},u.context),s(n),_.forEach(n.animation,(function(e){e.target&&e.target.css({transition:"none"})}))},onSwipe:function(t,r){var i=u.localState,o=u.$D+r.length;i.$d=r.length,i.$D=u.$D,u.bounds.strictLower&&!_.isUndefined(u.bounds.lower)&&u.bounds.lower>o?i.$d=u.bounds.lower-u.$D:u.bounds.strictUpper&&!_.isUndefined(u.bounds.upper)&&u.bounds.upper<o&&(i.$d=u.bounds.upper-u.$D),u.vc.addDistance(r.length),_.forEach(n.animation,(function(t){t.target&&(t.target.length>1?t.target.each((function(n){i.$i=n,e(this).css(_.mapValues(t.css,(function(e,t){return e(i)})))})):(i.$i=0,t.target.css(_.mapValues(t.css,(function(e,t){return e(i)})))))}))},onSwipeEnd:function(e,r){var i,o=u.localState,s=u.$D+r.length,a=u.vc.getVelocity();o.$d=r.length,o.$D=u.$D,!_.isUndefined(u.bounds.lower)&&a<=0&&u.$D>s?o.$D=u.bounds.lower:!_.isUndefined(u.bounds.upper)&&a>=0&&u.$D<s&&(o.$D=u.bounds.upper),o.$d=0,o.bounds=u.bounds,u.$D=o.$D,i=u.vc.getTime(o.$D-s),l(n,o,i,t,s,e)}})}e.fn.swipeAnimation=function(t){return u[t]?u[t].apply(this,arguments):(this.each((function(){d(e(this),e.extend({direction:e.fn.swipey.DIRECTIONS.HORIZONTAL,target:e(this),threshold:30,enableGestures:function(){return!0},bindEvents:["touch"],bounds:{},context:{},animation:{},onLower:e.noop,onUpper:e.noop,onAnimation:e.noop},t))})),this)}}(jQuery),function(e){function t(e,t){if(!(e.originalEvent.touches.length>1)){$(e.target).is("input")||$(e.target).is("textarea")||$(e.target).is("select")||$(e.target).is("button")||$(e.target).is("option")?e.stopPropagation():e.preventDefault();var n=e.originalEvent.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent(t,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(r)}}if(e.support.touch="ontouchend"in document,e.support.touch){var n,r=e.ui.mouse.prototype,i=r._mouseInit,o=r._mouseDestroy;r._touchStart=function(e){!n&&this._mouseCapture(e.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,t(e,"mouseover"),t(e,"mousemove"),t(e,"mousedown"))},r._touchMove=function(e){n&&(this._touchMoved=!0,t(e,"mousemove"))},r._touchEnd=function(e){n&&(t(e,"mouseup"),t(e,"mouseout"),this._touchMoved||t(e,"click"),n=!1)},r._mouseInit=function(){var t=this;t.element.bind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),i.call(t)},r._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),o.call(t)}}}(jQuery),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.wm_common_variables=t():e.wm_common_variables=t()}(window,(()=>(()=>{var e={"./node_modules/@metrichor/jmespath/dist/jmespath.esm.js":
613
+ function(e,t,n){var r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){e.setTimeout(t,1e3/60)},i=function(){var r={},i=t.createElement("div").style,o=function(){for(var e=["t","webkitT","MozT","msT","OT"],t=0,n=e.length;t<n;t++)if(e[t]+"ransform"in i)return e[t].substr(0,e[t].length-1);return!1}();function s(e){return!1!==o&&(""===o?e:o+e.charAt(0).toUpperCase()+e.substr(1))}r.getTime=Date.now||function(){return(new Date).getTime()},r.extend=function(e,t){for(var n in t)e[n]=t[n]},r.addEvent=function(e,t,n,r){e.addEventListener(t,n,!!r)},r.removeEvent=function(e,t,n,r){e.removeEventListener(t,n,!!r)},r.prefixPointerEvent=function(t){return e.MSPointerEvent?"MSPointer"+t.charAt(7).toUpperCase()+t.substr(8):t},r.momentum=function(e,t,r,i,o,s){var a,l,u=e-t,c=n.abs(u)/r;return l=c/(s=void 0===s?6e-4:s),(a=e+c*c/(2*s)*(u<0?-1:1))<i?(a=o?i-o/2.5*(c/8):i,l=(u=n.abs(a-e))/c):a>0&&(a=o?o/2.5*(c/8):0,l=(u=n.abs(e)+a)/c),{destination:n.round(a),duration:l}};var a=s("transform");return r.extend(r,{hasTransform:!1!==a,hasPerspective:s("perspective")in i,hasTouch:"ontouchstart"in e,hasPointer:!(!e.PointerEvent&&!e.MSPointerEvent),hasTransition:s("transition")in i}),r.isBadAndroid=function(){var t=e.navigator.appVersion;if(/Android/.test(t)&&!/Chrome\/\d/.test(t)){var n=t.match(/Safari\/(\d+.\d)/);return!(n&&"object"==typeof n&&n.length>=2)||parseFloat(n[1])<535.19}return!1}(),r.extend(r.style={},{transform:a,transitionTimingFunction:s("transitionTimingFunction"),transitionDuration:s("transitionDuration"),transitionDelay:s("transitionDelay"),transformOrigin:s("transformOrigin")}),r.hasClass=function(e,t){return new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},r.addClass=function(e,t){if(!r.hasClass(e,t)){var n=e.className.split(" ");n.push(t),e.className=n.join(" ")}},r.removeClass=function(e,t){if(r.hasClass(e,t)){var n=new RegExp("(^|\\s)"+t+"(\\s|$)","g");e.className=e.className.replace(n," ")}},r.offset=function(e){for(var t=-e.offsetLeft,n=-e.offsetTop;e=e.offsetParent;)t-=e.offsetLeft,n-=e.offsetTop;return{left:t,top:n}},r.preventDefaultException=function(e,t){for(var n in t)if(t[n].test(e[n]))return!0;return!1},r.extend(r.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}),r.extend(r.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(e){return e*(2-e)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(e){return n.sqrt(1- --e*e)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(e){return(e-=1)*e*(5*e+4)+1}},bounce:{style:"",fn:function(e){return(e/=1)<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}},elastic:{style:"",fn:function(e){return 0===e?0:1==e?1:.4*n.pow(2,-10*e)*n.sin((e-.055)*(2*n.PI)/.22)+1}}}),r.tap=function(e,n){var r=t.createEvent("Event");r.initEvent(n,!0,!0),r.pageX=e.pageX,r.pageY=e.pageY,e.target.dispatchEvent(r)},r.click=function(e){var n,r=e.target;/(SELECT|INPUT|TEXTAREA)/i.test(r.tagName)||((n=t.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,e.view,1,r.screenX,r.screenY,r.clientX,r.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,null),n._constructed=!0,r.dispatchEvent(n))},r}();function o(n,r){for(var o in this.wrapper="string"==typeof n?t.querySelector(n):n,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!i.hasPointer,disableTouch:i.hasPointer||!i.hasTouch,disableMouse:i.hasPointer||i.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:void 0===e.onmousedown},r)this.options[o]=r[o];this.translateZ=this.options.HWCompositing&&i.hasPerspective?" translateZ(0)":"",this.options.useTransition=i.hasTransition&&this.options.useTransition,this.options.useTransform=i.hasTransform&&this.options.useTransform,this.options.eventPassthrough=!0===this.options.eventPassthrough?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"!=this.options.eventPassthrough&&this.options.scrollY,this.options.scrollX="horizontal"!=this.options.eventPassthrough&&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="string"==typeof this.options.bounceEasing?i.ease[this.options.bounceEasing]||i.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,!0===this.options.tap&&(this.options.tap="tap"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),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()}function s(e,n,r){var i=t.createElement("div"),o=t.createElement("div");return!0===r&&(i.style.cssText="position:absolute;z-index:9999",o.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"),o.className="iScrollIndicator","h"==e?(!0===r&&(i.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",o.style.height="100%"),i.className="iScrollHorizontalScrollbar"):(!0===r&&(i.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",o.style.width="100%"),i.className="iScrollVerticalScrollbar"),i.style.cssText+=";overflow:hidden",n||(i.style.pointerEvents="none"),i.appendChild(o),i}function a(n,o){for(var s in this.wrapper="string"==typeof o.el?t.querySelector(o.el):o.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=n,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0},o)this.options[s]=o[s];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(i.addEvent(this.indicator,"touchstart",this),i.addEvent(e,"touchend",this)),this.options.disablePointer||(i.addEvent(this.indicator,i.prefixPointerEvent("pointerdown"),this),i.addEvent(e,i.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(i.addEvent(this.indicator,"mousedown",this),i.addEvent(e,"mouseup",this))),this.options.fade){this.wrapperStyle[i.style.transform]=this.scroller.translateZ;var a=i.style.transitionDuration;this.wrapperStyle[a]=i.isBadAndroid?"0.0001ms":"0ms";var l=this;i.isBadAndroid&&r((function(){"0.0001ms"===l.wrapperStyle[a]&&(l.wrapperStyle[a]="0s")})),this.wrapperStyle.opacity="0"}}o.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(e){e.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(e){if(1!=i.eventType[e.type]&&0!==(e.which?e.button:e.button<2?0:4==e.button?1:2))return;if(this.enabled&&(!this.initiated||i.eventType[e.type]===this.initiated)){!this.options.preventDefault||i.isBadAndroid||i.preventDefaultException(e.target,this.options.preventDefaultException)||e.preventDefault();var t,r=e.touches?e.touches[0]:e;this.initiated=i.eventType[e.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=i.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,t=this.getComputedPosition(),this._translate(n.round(t.x),n.round(t.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=r.pageX,this.pointY=r.pageY,this._execEvent("beforeScrollStart")}},_move:function(e){if(this.enabled&&i.eventType[e.type]===this.initiated){this.options.preventDefault&&e.preventDefault();var t,r,o,s,a=e.touches?e.touches[0]:e,l=a.pageX-this.pointX,u=a.pageY-this.pointY,c=i.getTime();if(this.pointX=a.pageX,this.pointY=a.pageY,this.distX+=l,this.distY+=u,o=n.abs(this.distX),s=n.abs(this.distY),!(c-this.endTime>300&&o<10&&s<10)){if(this.directionLocked||this.options.freeScroll||(o>s+this.options.directionLockThreshold?this.directionLocked="h":s>=o+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)e.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);u=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)e.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);l=0}l=this.hasHorizontalScroll?l:0,u=this.hasVerticalScroll?u:0,t=this.x+l,r=this.y+u,(t>0||t<this.maxScrollX)&&(t=this.options.bounce?this.x+l/3:t>0?0:this.maxScrollX),(r>0||r<this.maxScrollY)&&(r=this.options.bounce?this.y+u/3:r>0?0:this.maxScrollY),this.directionX=l>0?-1:l<0?1:0,this.directionY=u>0?-1:u<0?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(t,r),c-this.startTime>300&&(this.startTime=c,this.startX=this.x,this.startY=this.y)}}},_end:function(e){if(this.enabled&&i.eventType[e.type]===this.initiated){this.options.preventDefault&&!i.preventDefaultException(e.target,this.options.preventDefaultException)&&e.preventDefault();e.changedTouches&&e.changedTouches[0];var t,r,o=i.getTime()-this.startTime,s=n.round(this.x),a=n.round(this.y),l=n.abs(s-this.startX),u=n.abs(a-this.startY),c=0,d="";if(this.isInTransition=0,this.initiated=0,this.endTime=i.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(s,a),!this.moved)return this.options.tap&&i.tap(e,this.options.tap),this.options.click&&i.click(e),void this._execEvent("scrollCancel");if(this._events.flick&&o<200&&l<100&&u<100)this._execEvent("flick");else{if(this.options.momentum&&o<300&&(t=this.hasHorizontalScroll?i.momentum(this.x,this.startX,o,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:s,duration:0},r=this.hasVerticalScroll?i.momentum(this.y,this.startY,o,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:a,duration:0},s=t.destination,a=r.destination,c=n.max(t.duration,r.duration),this.isInTransition=1),this.options.snap){var h=this._nearestSnap(s,a);this.currentPage=h,c=this.options.snapSpeed||n.max(n.max(n.min(n.abs(s-h.x),1e3),n.min(n.abs(a-h.y),1e3)),300),s=h.x,a=h.y,this.directionX=0,this.directionY=0,d=this.options.bounceEasing}if(s!=this.x||a!=this.y)return(s>0||s<this.maxScrollX||a>0||a<this.maxScrollY)&&(d=i.ease.quadratic),void this.scrollTo(s,a,c,d);this._execEvent("scrollEnd")}}}},_resize:function(){var e=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){e.refresh()}),this.options.resizePolling)},resetPosition:function(e){var t=this.x,n=this.y;return e=e||0,!this.hasHorizontalScroll||this.x>0?t=0:this.x<this.maxScrollX&&(t=this.maxScrollX),!this.hasVerticalScroll||this.y>0?n=0:this.y<this.maxScrollY&&(n=this.maxScrollY),(t!=this.x||n!=this.y)&&(this.scrollTo(t,n,e,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){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,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=i.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(e,t){this._events[e]||(this._events[e]=[]),this._events[e].push(t)},off:function(e,t){if(this._events[e]){var n=this._events[e].indexOf(t);n>-1&&this._events[e].splice(n,1)}},_execEvent:function(e){if(this._events[e]){var t=0,n=this._events[e].length;if(n)for(;t<n;t++)this._events[e][t].apply(this,[].slice.call(arguments,1))}},scrollBy:function(e,t,n,r){e=this.x+e,t=this.y+t,n=n||0,this.scrollTo(e,t,n,r)},scrollTo:function(e,t,n,r){r=r||i.ease.circular,this.isInTransition=this.options.useTransition&&n>0;var o=this.options.useTransition&&r.style;!n||o?(o&&(this._transitionTimingFunction(r.style),this._transitionTime(n)),this._translate(e,t)):this._animate(e,t,n,r.fn)},scrollToElement:function(e,t,r,o,s){if(e=e.nodeType?e:this.scroller.querySelector(e)){var a=i.offset(e);a.left-=this.wrapperOffset.left,a.top-=this.wrapperOffset.top,!0===r&&(r=n.round(e.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===o&&(o=n.round(e.offsetHeight/2-this.wrapper.offsetHeight/2)),a.left-=r||0,a.top-=o||0,a.left=a.left>0?0:a.left<this.maxScrollX?this.maxScrollX:a.left,a.top=a.top>0?0:a.top<this.maxScrollY?this.maxScrollY:a.top,t=null==t||"auto"===t?n.max(n.abs(this.x-a.left),n.abs(this.y-a.top)):t,this.scrollTo(a.left,a.top,t,s)}},_transitionTime:function(e){e=e||0;var t=i.style.transitionDuration;if(this.scrollerStyle[t]=e+"ms",!e&&i.isBadAndroid){this.scrollerStyle[t]="0.0001ms";var n=this;r((function(){"0.0001ms"===n.scrollerStyle[t]&&(n.scrollerStyle[t]="0s")}))}if(this.indicators)for(var o=this.indicators.length;o--;)this.indicators[o].transitionTime(e)},_transitionTimingFunction:function(e){if(this.scrollerStyle[i.style.transitionTimingFunction]=e,this.indicators)for(var t=this.indicators.length;t--;)this.indicators[t].transitionTimingFunction(e)},_translate:function(e,t){if(this.options.useTransform?this.scrollerStyle[i.style.transform]="translate("+e+"px,"+t+"px)"+this.translateZ:(e=n.round(e),t=n.round(t),this.scrollerStyle.left=e+"px",this.scrollerStyle.top=t+"px"),this.x=e,this.y=t,this.indicators)for(var r=this.indicators.length;r--;)this.indicators[r].updatePosition()},_initEvents:function(t){var n=t?i.removeEvent:i.addEvent,r=this.options.bindToWrapper?this.wrapper:e;n(e,"orientationchange",this),n(e,"resize",this),this.options.click&&n(this.wrapper,"click",this,!0),this.options.disableMouse||(n(this.wrapper,"mousedown",this),n(r,"mousemove",this),n(r,"mousecancel",this),n(r,"mouseup",this)),i.hasPointer&&!this.options.disablePointer&&(n(this.wrapper,i.prefixPointerEvent("pointerdown"),this),n(r,i.prefixPointerEvent("pointermove"),this),n(r,i.prefixPointerEvent("pointercancel"),this),n(r,i.prefixPointerEvent("pointerup"),this)),i.hasTouch&&!this.options.disableTouch&&(n(this.wrapper,"touchstart",this),n(r,"touchmove",this),n(r,"touchcancel",this),n(r,"touchend",this)),n(this.scroller,"transitionend",this),n(this.scroller,"webkitTransitionEnd",this),n(this.scroller,"oTransitionEnd",this),n(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var t,n,r=e.getComputedStyle(this.scroller,null);return this.options.useTransform?(t=+((r=r[i.style.transform].split(")")[0].split(", "))[12]||r[4]),n=+(r[13]||r[5])):(t=+r.left.replace(/[^-\d.]/g,""),n=+r.top.replace(/[^-\d.]/g,"")),{x:t,y:n}},_initIndicators:function(){var e,t=this.options.interactiveScrollbars,n="string"!=typeof this.options.scrollbars,r=[],i=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(e={el:s("v",t,this.options.scrollbars),interactive:t,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(e.el),r.push(e)),this.options.scrollX&&(e={el:s("h",t,this.options.scrollbars),interactive:t,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(e.el),r.push(e))),this.options.indicators&&(r=r.concat(this.options.indicators));for(var o=r.length;o--;)this.indicators.push(new a(this,r[o]));function l(e){if(i.indicators)for(var t=i.indicators.length;t--;)e.call(i.indicators[t])}this.options.fadeScrollbars&&(this.on("scrollEnd",(function(){l((function(){this.fade()}))})),this.on("scrollCancel",(function(){l((function(){this.fade()}))})),this.on("scrollStart",(function(){l((function(){this.fade(1)}))})),this.on("beforeScrollStart",(function(){l((function(){this.fade(1,!0)}))}))),this.on("refresh",(function(){l((function(){this.refresh()}))})),this.on("destroy",(function(){l((function(){this.destroy()})),delete this.indicators}))},_initWheel:function(){i.addEvent(this.wrapper,"wheel",this),i.addEvent(this.wrapper,"mousewheel",this),i.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",(function(){clearTimeout(this.wheelTimeout),this.wheelTimeout=null,i.removeEvent(this.wrapper,"wheel",this),i.removeEvent(this.wrapper,"mousewheel",this),i.removeEvent(this.wrapper,"DOMMouseScroll",this)}))},_wheel:function(e){if(this.enabled){e.preventDefault();var t,r,i,o,s=this;if(void 0===this.wheelTimeout&&s._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout((function(){s.options.snap||s._execEvent("scrollEnd"),s.wheelTimeout=void 0}),400),"deltaX"in e)1===e.deltaMode?(t=-e.deltaX*this.options.mouseWheelSpeed,r=-e.deltaY*this.options.mouseWheelSpeed):(t=-e.deltaX,r=-e.deltaY);else if("wheelDeltaX"in e)t=e.wheelDeltaX/120*this.options.mouseWheelSpeed,r=e.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in e)t=r=e.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in e))return;t=r=-e.detail/3*this.options.mouseWheelSpeed}if(t*=this.options.invertWheelDirection,r*=this.options.invertWheelDirection,this.hasVerticalScroll||(t=r,r=0),this.options.snap)return i=this.currentPage.pageX,o=this.currentPage.pageY,t>0?i--:t<0&&i++,r>0?o--:r<0&&o++,void this.goToPage(i,o);i=this.x+n.round(this.hasHorizontalScroll?t:0),o=this.y+n.round(this.hasVerticalScroll?r:0),this.directionX=t>0?-1:t<0?1:0,this.directionY=r>0?-1:r<0?1:0,i>0?i=0:i<this.maxScrollX&&(i=this.maxScrollX),o>0?o=0:o<this.maxScrollY&&(o=this.maxScrollY),this.scrollTo(i,o,0)}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",(function(){var e,t,r,i,o,s,a=0,l=0,u=0,c=this.options.snapStepX||this.wrapperWidth,d=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(!0===this.options.snap)for(r=n.round(c/2),i=n.round(d/2);u>-this.scrollerWidth;){for(this.pages[a]=[],e=0,o=0;o>-this.scrollerHeight;)this.pages[a][e]={x:n.max(u,this.maxScrollX),y:n.max(o,this.maxScrollY),width:c,height:d,cx:u-r,cy:o-i},o-=d,e++;u-=c,a++}else for(e=(s=this.options.snap).length,t=-1;a<e;a++)(0===a||s[a].offsetLeft<=s[a-1].offsetLeft)&&(l=0,t++),this.pages[l]||(this.pages[l]=[]),u=n.max(-s[a].offsetLeft,this.maxScrollX),o=n.max(-s[a].offsetTop,this.maxScrollY),r=u-n.round(s[a].offsetWidth/2),i=o-n.round(s[a].offsetHeight/2),this.pages[l][t]={x:u,y:o,width:s[a].offsetWidth,height:s[a].offsetHeight,cx:r,cy:i},u>this.maxScrollX&&l++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1==0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=n.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=n.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}})),this.on("flick",(function(){var e=this.options.snapSpeed||n.max(n.max(n.min(n.abs(this.x-this.startX),1e3),n.min(n.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,e)}))},_nearestSnap:function(e,t){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var r=0,i=this.pages.length,o=0;if(n.abs(e-this.absStartX)<this.snapThresholdX&&n.abs(t-this.absStartY)<this.snapThresholdY)return this.currentPage;for(e>0?e=0:e<this.maxScrollX&&(e=this.maxScrollX),t>0?t=0:t<this.maxScrollY&&(t=this.maxScrollY);r<i;r++)if(e>=this.pages[r][0].cx){e=this.pages[r][0].x;break}for(i=this.pages[r].length;o<i;o++)if(t>=this.pages[0][o].cy){t=this.pages[0][o].y;break}return r==this.currentPage.pageX&&((r+=this.directionX)<0?r=0:r>=this.pages.length&&(r=this.pages.length-1),e=this.pages[r][0].x),o==this.currentPage.pageY&&((o+=this.directionY)<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),t=this.pages[0][o].y),{x:e,y:t,pageX:r,pageY:o}},goToPage:function(e,t,r,i){i=i||this.options.bounceEasing,e>=this.pages.length?e=this.pages.length-1:e<0&&(e=0),t>=this.pages[e].length?t=this.pages[e].length-1:t<0&&(t=0);var o=this.pages[e][t].x,s=this.pages[e][t].y;r=void 0===r?this.options.snapSpeed||n.max(n.max(n.min(n.abs(o-this.x),1e3),n.min(n.abs(s-this.y),1e3)),300):r,this.currentPage={x:o,y:s,pageX:e,pageY:t},this.scrollTo(o,s,r,i)},next:function(e,t){var n=this.currentPage.pageX,r=this.currentPage.pageY;++n>=this.pages.length&&this.hasVerticalScroll&&(n=0,r++),this.goToPage(n,r,e,t)},prev:function(e,t){var n=this.currentPage.pageX,r=this.currentPage.pageY;--n<0&&this.hasVerticalScroll&&(n=0,r--),this.goToPage(n,r,e,t)},_initKeys:function(t){var n,r={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(n in this.options.keyBindings)"string"==typeof this.options.keyBindings[n]&&(this.options.keyBindings[n]=this.options.keyBindings[n].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(n in r)this.options.keyBindings[n]=this.options.keyBindings[n]||r[n];i.addEvent(e,"keydown",this),this.on("destroy",(function(){i.removeEvent(e,"keydown",this)}))},_key:function(e){if(this.enabled){var t,r=this.options.snap,o=r?this.currentPage.pageX:this.x,s=r?this.currentPage.pageY:this.y,a=i.getTime(),l=this.keyTime||0;switch(this.options.useTransition&&this.isInTransition&&(t=this.getComputedPosition(),this._translate(n.round(t.x),n.round(t.y)),this.isInTransition=!1),this.keyAcceleration=a-l<200?n.min(this.keyAcceleration+.25,50):0,e.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?o+=r?1:this.wrapperWidth:s+=r?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?o-=r?1:this.wrapperWidth:s-=r?1:this.wrapperHeight;break;case this.options.keyBindings.end:o=r?this.pages.length-1:this.maxScrollX,s=r?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:o=0,s=0;break;case this.options.keyBindings.left:o+=r?-1:5+this.keyAcceleration|0;break;case this.options.keyBindings.up:s+=r?1:5+this.keyAcceleration|0;break;case this.options.keyBindings.right:o-=r?-1:5+this.keyAcceleration|0;break;case this.options.keyBindings.down:s-=r?1:5+this.keyAcceleration|0;break;default:return}r?this.goToPage(o,s):(o>0?(o=0,this.keyAcceleration=0):o<this.maxScrollX&&(o=this.maxScrollX,this.keyAcceleration=0),s>0?(s=0,this.keyAcceleration=0):s<this.maxScrollY&&(s=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(o,s,0),this.keyTime=a)}},_animate:function(e,t,n,o){var s=this,a=this.x,l=this.y,u=i.getTime(),c=u+n;this.isAnimating=!0,function d(){var h,p,f,m=i.getTime();if(m>=c)return s.isAnimating=!1,s._translate(e,t),void(s.resetPosition(s.options.bounceTime)||s._execEvent("scrollEnd"));f=o(m=(m-u)/n),h=(e-a)*f+a,p=(t-l)*f+l,s._translate(h,p),s.isAnimating&&r(d)}()},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":this.enabled&&!e._constructed&&(e.preventDefault(),e.stopPropagation())}}},a.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)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(i.removeEvent(this.indicator,"touchstart",this),i.removeEvent(this.indicator,i.prefixPointerEvent("pointerdown"),this),i.removeEvent(this.indicator,"mousedown",this),i.removeEvent(e,"touchmove",this),i.removeEvent(e,i.prefixPointerEvent("pointermove"),this),i.removeEvent(e,"mousemove",this),i.removeEvent(e,"touchend",this),i.removeEvent(e,i.prefixPointerEvent("pointerup"),this),i.removeEvent(e,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(t){var n=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=n.pageX,this.lastPointY=n.pageY,this.startTime=i.getTime(),this.options.disableTouch||i.addEvent(e,"touchmove",this),this.options.disablePointer||i.addEvent(e,i.prefixPointerEvent("pointermove"),this),this.options.disableMouse||i.addEvent(e,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(e){var t,n,r,o,s=e.touches?e.touches[0]:e;i.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,t=s.pageX-this.lastPointX,this.lastPointX=s.pageX,n=s.pageY-this.lastPointY,this.lastPointY=s.pageY,r=this.x+t,o=this.y+n,this._pos(r,o),e.preventDefault(),e.stopPropagation()},_end:function(t){if(this.initiated){if(this.initiated=!1,t.preventDefault(),t.stopPropagation(),i.removeEvent(e,"touchmove",this),i.removeEvent(e,i.prefixPointerEvent("pointermove"),this),i.removeEvent(e,"mousemove",this),this.scroller.options.snap){var r=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),o=this.options.snapSpeed||n.max(n.max(n.min(n.abs(this.scroller.x-r.x),1e3),n.min(n.abs(this.scroller.y-r.y),1e3)),300);this.scroller.x==r.x&&this.scroller.y==r.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=r,this.scroller.scrollTo(r.x,r.y,o,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(e){e=e||0;var t=i.style.transitionDuration;if(this.indicatorStyle[t]=e+"ms",!e&&i.isBadAndroid){this.indicatorStyle[t]="0.0001ms";var n=this;r((function(){"0.0001ms"===n.indicatorStyle[t]&&(n.indicatorStyle[t]="0s")}))}},transitionTimingFunction:function(e){this.indicatorStyle[i.style.transitionTimingFunction]=e},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(i.addClass(this.wrapper,"iScrollBothScrollbars"),i.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(i.removeClass(this.wrapper,"iScrollBothScrollbars"),i.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=n.max(n.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=8-this.indicatorWidth,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=n.max(n.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=8-this.indicatorHeight,this.maxBoundaryY=this.wrapperHeight-8):(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 e=this.options.listenX&&n.round(this.sizeRatioX*this.scroller.x)||0,t=this.options.listenY&&n.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(e<this.minBoundaryX?("scale"==this.options.shrink&&(this.width=n.max(this.indicatorWidth+e,8),this.indicatorStyle.width=this.width+"px"),e=this.minBoundaryX):e>this.maxBoundaryX?"scale"==this.options.shrink?(this.width=n.max(this.indicatorWidth-(e-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",e=this.maxPosX+this.indicatorWidth-this.width):e=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),t<this.minBoundaryY?("scale"==this.options.shrink&&(this.height=n.max(this.indicatorHeight+3*t,8),this.indicatorStyle.height=this.height+"px"),t=this.minBoundaryY):t>this.maxBoundaryY?"scale"==this.options.shrink?(this.height=n.max(this.indicatorHeight-3*(t-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",t=this.maxPosY+this.indicatorHeight-this.height):t=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=e,this.y=t,this.scroller.options.useTransform?this.indicatorStyle[i.style.transform]="translate("+e+"px,"+t+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=e+"px",this.indicatorStyle.top=t+"px")},_pos:function(e,t){e<0?e=0:e>this.maxPosX&&(e=this.maxPosX),t<0?t=0:t>this.maxPosY&&(t=this.maxPosY),e=this.options.listenX?n.round(e/this.sizeRatioX):this.scroller.x,t=this.options.listenY?n.round(t/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(e,t)},fade:function(e,t){if(!t||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var n=e?250:500,r=e?0:300;e=e?"1":"0",this.wrapperStyle[i.style.transitionDuration]=n+"ms",this.fadeTimeout=setTimeout(function(e){this.wrapperStyle.opacity=e,this.visible=+e}.bind(this,e),r)}}},o.utils=i,"undefined"!=typeof module&&module.exports?module.exports=o:"function"==typeof define&&define.amd?define((function(){return o})):e.IScroll=o}(window,document,Math),function(e){var t=!1;if("function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),!t){var n=window.Cookies,r=window.Cookies=e();r.noConflict=function(){return window.Cookies=n,r}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}return function t(n){function r(t,i,o){var s;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(o=e({path:"/"},r.defaults,o)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}o.expires=o.expires?o.expires.toUTCString():"";try{s=JSON.stringify(i),/^[\{\[]/.test(s)&&(i=s)}catch(e){}i=n.write?n.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var l="";for(var u in o)o[u]&&(l+="; "+u,!0!==o[u]&&(l+="="+o[u]));return document.cookie=t+"="+i+l}t||(s={});for(var c=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,h=0;h<c.length;h++){var p=c[h].split("="),f=p.slice(1).join("=");this.json||'"'!==f.charAt(0)||(f=f.slice(1,-1));try{var m=p[0].replace(d,decodeURIComponent);if(f=n.read?n.read(f,m):n(f,m)||f.replace(d,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(e){}if(t===m){s=f;break}t||(s[m]=f)}catch(e){}}return s}}return r.set=r,r.get=function(e){return r.call(r,e)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,n){r(t,"",e(n,{expires:-1}))},r.withConverter=t,r}((function(){}))})),$.widget("wm.datatable",{options:{data:[],statusMsg:"",colDefs:[],rowActions:[],headerConfig:[],sortInfo:{field:"",direction:""},isMobile:!1,enableSort:!0,filtermode:"",filteronkeypress:!1,activeRow:void 0,height:"100%",showHeader:!0,selectFirstRow:!1,showNewRow:!0,showRowIndex:!1,enableRowSelection:!0,enableColumnSelection:!1,multiselect:!1,filterNullRecords:!0,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:!0,new:!0},rowExpansionEnabled:!1,rowDef:{position:"0",closeothers:!1,columnwidth:"30px"},summaryRow:!1,summaryRowDefs:[],summaryRowDefsObject:[],searchHandler:function(){},sortHandler:function(){}},customColumnDefs:{checkbox:{field:"checkbox",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"width: 50px; text-align: center;",textAlignment:"center",isMultiSelectCol:!0,show:!0},radio:{field:"radio",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"width: 50px; text-align: center;",textAlignment:"center",show:!0},__expand:{field:"__expand",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"text-align: center;",textAlignment:"center",show:!0,width:"30px"},rowIndex:{field:"rowIndex",type:"custom",displayName:"S. No.",sortable:!1,searchable:!1,selectable:!1,readonly:!0,style:"text-align: left;",textAlignment:"left",show:!0}},CONSTANTS:{QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog",SEARCH:"search",MULTI_COLUMN:"multicolumn"},Utils:{random:function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},isDefined:function(e){return void 0!==e},isObject:function(e){return null!==e&&"object"==typeof e},getObjectIndex:function(e,t){var n=-1;return Array.isArray(e)?(e.some((function(e,r){if(_.isEqual(e,t))return n=r,!0})),n):-1},generateGuid:function(){var e=this.random;return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},isValidHtml:function(e){return/<[a-z][\s\S]*>/i.test(e)},isMac:function(){return navigator.platform.toUpperCase().indexOf("MAC")>=0},isDeleteKey:function(e){return this.isMac()&&8===e.which||46===e.which}},_setStyles:function(e,t){if(t)return t.split(";").forEach((function(t){var n,r,i=t.split(":");2===i.length&&(n=i[0].trim(),r=i[1].trim(),e.css(n,r))})),t},_getColumnSortDirection:function(e){var t=this.options.sortInfo;return e===t.field?t.direction:""},_toggleSpacingClasses:function(e){switch(e){case"normal":this.tableContainer.removeClass("table-condensed"),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"),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"))}},_getColSpan:function(e){var t=0,n=this;return _.forEach(e,(function(e){var r;e.isGroup?t+=n._getColSpan(e.columns):(r=_.find(n.preparedHeaderData,{field:e.field}),t=_.isUndefined(r.show)||r.show?t+1:t)})),t},_setColSpan:function(e){var t=this;_.forEach(e,(function(e){e.isGroup&&(e.colspan=t._getColSpan(e.columns),t.gridHeaderElement.find('th[data-col-group="'+e.field+'"]').attr("colspan",e.colspan),t._setColSpan(e.columns))}))},_getHeaderTemplate:function(){var e,t=$("<colgroup></colgroup>"),n=this.gridHeaderElement.empty(),r=this.Utils.isDefined,i=this.options.sortInfo,o=i.field,s=this,a=[],l=this.options.headerConfig,u=s.options.cssClassNames.groupHeaderCell;function c(e,n){var a,l,u,c,d,h=n,p=e.field,f=s.Utils.isDefined(e.displayName)?e.displayName:p||"",m=f,g=s.options.enableSort&&(_.isUndefined(e.show)||e.show)&&(_.isUndefined(e.sortable)||e.sortable),v=s.options.cssClassNames.headerCell,y="";return f=s.Utils.isDefined(f)&&""!==f?f:"&nbsp;",u=$("<col/>"),e.style&&s._setStyles(u,e.style),t.append(u),r(e.class)&&(v+=" "+e.class),e.selected&&(v+=" "+s.options.cssClassNames.selectedColumn+" "),"checkbox"!==p&&"radio"!==p||(v+=" grid-col-small"),y+="<th",(_.isUndefined(e.resizable)||e.resizable)&&(_.isUndefined(e.show)||e.show)&&(y+=" data-col-resizable"),s.options.enableColumnSelection&&(_.isUndefined(e.selectable)||e.selectable)&&(y+=" data-col-selectable"),g&&(y+=" data-col-sortable"),y+="></th>",(l=$(y)).attr({"data-col-id":h,"data-col-field":p,title:m}),s._setStyles(l,"text-align: "+e.textAlignment),l.addClass(v),"checkbox"===p&&l.append('<input type="checkbox" />'),l.append('<span class="header-data">'+f+"</span>"),g&&(c=$('<span class="sort-buttons-container"></span>'),d=$('<i class="sort-icon"></i>'),o&&o===e.field&&i.direction&&(a="asc"===i.direction?s.options.cssClassNames.ascIcon:s.options.cssClassNames.descIcon,c.addClass("active"),d.addClass(a+" "+i.direction)),l.append(c.append(d))),l}return _.isEmpty(l)?(e=$("<tr></tr>"),s.preparedHeaderData.forEach((function(t,n){e.append(c(t,n))})),n.append(e)):(!function e(t,n){var r=[];_.forEach(t,(function(t){var i,o,a,l,d;t.columns&&t.columns.length?(d=$("<th></th>"),a=u+" "+(t.class||""),l="text-align: "+t.textAlignment+";background-color: "+(t.backgroundColor||"")+";",d.attr({"data-col-group":t.field,class:a,title:t.displayName}),s._setStyles(d,l),d.append('<span class="header-data">'+t.displayName+"</span>"),r.push(d),e(t.columns,n+1)):(i=_.findIndex(s.preparedHeaderData,{field:t.field}),(o=s.preparedHeaderData[i])&&r.push(c(o,i)))})),a[n]=a[n]||[],a[n]=a[n].concat(r)}(l,0),a.forEach((function(t,r){e=$('<tr role="row" tabindex="0"></tr>');var i=a.length-r;t.forEach((function(t){i>1&&t.hasClass("app-datagrid-header-cell")&&t.attr("rowspan",i),e.append(t)})),n.append(e)}))),{colgroup:t,header:n}},_getSearchEl:function(){var e='<select name="wm-datatable" data-element="dgFilterValue" class="form-control app-select"><option value="" selected class="placeholder">'+this.options.messages.selectField+"</option>",t=this.Utils.isDefined(this.options.searchLabel)&&this.options.searchLabel.length?this.options.searchLabel:"";this.options.colDefs.forEach((function(t,n){"none"!==t.field&&"rowOperations"!==t.field&&t.searchable&&"false"!==_.toString(t.showinfilter)&&(e+='<option value="'+t.field+'" data-coldef-index="'+n+'">'+(t.displayName||t.field)+"</option>")})),e+="</select>";var n=$('<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="'+t+'"/></div><div class="input-append input-group">'+e+'<span class="input-group-addon"><button type="button" data-element="dgSearchButton" class="app-search-button" title="'+t+'"><i class="wi wi-search"></i></button></span></div></div></form>');return this._setStyles(n.find('[data-element="dgSearchText"]'),"display: inline-block;"),n},_appendRowExpansionButtons:function(e){var t=this;e.find("[data-identifier='rowExpansionButtons']").each((function(e){var n,r,i,o=e;r=$(this).closest("tr.app-datagrid-row"),i=parseInt(r.attr("data-row-id"),10),(n=_.clone(t.options.data[i])).$index=o+1,t.options.generateRowExpansionCell(n,o),$(this).empty().append(t.options.getRowExpansionAction(o))}))},setSummaryRowDef:function(e,t,n,r){this.options.summaryRow=!0,null==this.options.summaryRowDefs[n]&&(this.options.summaryRowDefs[n]={},this.options.summaryRowDefsObject[n]={}),this.options.summaryRowDefsObject[n][e]=t,this.options.summaryRowDefs[n][e]=t&&t.value?t.value:t,r&&this.refreshGridData()},_getSummaryRowTemplate:function(){var e=this,t=$('<tfoot class="'+this.options.cssClassNames.gridFooter+'"></tfoot>');return this._setStyles(t,"border-top: 3px solid #eee;"),_.forEach(this.options.summaryRowDefs,(function(n,r){n.$$pk=r,t.append(e._getRowTemplate(n,r,!0))})),t},getPageStartIndex:function(){var e=this.options.getCurrentPage(),t=this.options.getPageSize();return((this.options.actionRowPage<e?this.options.actionRowPage:e)-1)*t},_getPreparedDataForInfiniteScroll:function(e,t){return t=t.filter((function(t,n){if(!e.find("tr.app-datagrid-row[data-row-id="+t.$$pk+"]").length)return t}))},_updateTrData:function(e){var t,n,r=this;t=e.find("tr.app-datagrid-row[data-row-id="+r.options.actionRowIndex+"]"),n=r.preparedData[r.options.actionRowIndex],r.options.generateCustomExpressions(n,r.options.actionRowIndex);var i=r._getRowTemplate(n,r.options.actionRowIndex);t.replaceWith(i[0])},_handleCRUDForInfiniteScroll:function(e){var t=this;t.options.lastActionPerformed!==t.options.ACTIONS.SEARCH_OR_SORT&&t.options.lastActionPerformed!==t.options.ACTIONS.FILTER_CRITERIA&&t.options.lastActionPerformed!==t.options.ACTIONS.DATASET_UPDATE||!(t.options.isSearchTrigerred||t.options.isDatasetUpdated||t.options.isDataUpdatedByUser)?t.options.lastActionPerformed===t.options.ACTIONS.EDIT&&void 0!==t.options.actionRowIndex&&t.options.editmode!==this.CONSTANTS.QUICK_EDIT&&t._updateTrData(e):(e.html(""),"On-Demand"!==this.options.navigation||this.options.isLastPage||this.element.find(".on-demand-datagrid").show(),t.options.clearCustomExpression(),t.options.clearRowDetailExpression(),t.options.setIsSearchTrigerred(!1),t.options.setIsDatasetUpdated(!1))},_getGridTemplate:function(){var e,t,n=this,r=n.getPageStartIndex(),i=n.options.startRowIndex,o=n.options.isNavTypeScrollOrOndemand();return o?(t=this.gridElement,this.renderTableOnViewLess&&(t=this.gridElement.empty(),this.hideLoadingIndicator(),this.renderTableOnViewLess=!1)):t=this.gridElement.empty(),o?(this._handleCRUDForInfiniteScroll(t),n.options.lastActionPerformed===n.options.ACTIONS.DELETE&&(i=n.options.actionRowIndex+1),e=this._getPreparedDataForInfiniteScroll(t,this.preparedData.slice(r))):(this.options.clearCustomExpression(),this.options.clearRowDetailExpression(),e=this.preparedData),_.forEach(e,(function(e,r){var s,a=_.clone(e),l=o?i+r-1:r;if(a.$index=l+1,n.options.generateCustomExpressions(a,l),n.options.registerRowNgClassWatcher(a,l),s=n._getRowTemplate(e,l),t.append(s),n.options.rowExpansionEnabled){var u=n.options.rowDef.height,c=n.options.rowDef.position,d=_.filter(n.preparedHeaderData,(function(e){return e.show})).length-1,h=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+e.$$pk+'"><td></td><td colspan="'+d+'" class="app-datagrid-row-details-cell"><div class="row-overlay"><div class="row-status"><i class="'+n.options.loadingicon+'"></i></div></div><div class="details-section"></div></td></tr>');"-1"===c&&(h=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+e.$$pk+'"><td colspan="'+d+'" class="app-datagrid-row-details-cell"><div class="row-overlay"><div class="row-status"><i class="'+n.options.loadingicon+'"></i></div></div><div class="details-section"></div></td><td></td></tr>')),u&&h.find("div.row-overlay").css("min-height",u),h.css("display","none"),h.find(".details-section").css("display","none"),t.append(h)}})),this.options.isdynamictable||(this.options.setLastActionPerformed(this.options.ACTIONS.DEFAULT),this.options.setIsDataUpdatedByUser(!1),this.options.clearActionRowIndex()),t},_getRowTemplate:function(e,t,n){var r,i=this,o=i.options;return r=$('<tr role="row" tabindex="0" class="'+o.cssClassNames.tableRow+" "+(o.rowClass||"")+'" data-row-id="'+e.$$pk+'"></tr>'),this.preparedHeaderData.forEach((function(o,s){r.append(i._getColumnTemplate(e,s,o,t,n))})),r},_getRowActionsColumnDefIndex:function(){var e,t=this.preparedHeaderData.length;for(e=0;e<t;e+=1)if("rowOperations"===this.preparedHeaderData[e].field)return e;return-1},_getRowActionsColumnDef:function(){var e=this._getRowActionsColumnDefIndex();return-1!==e?this.preparedHeaderData[e]:null},_getCheckboxTemplate:function(e,t){return'<input name="'+(t?"gridMultiSelect":"")+'" type="checkbox"'+(!0===e._checked?" checked":"")+(e.disabed?" disabled":"")+"/>"},_getRadioTemplate:function(e){return'<input type="radio" rowSelectInput name="" value=""'+(!0===e._checked?" checked":"")+(e.disabed?" disabled":"")+"/>"},_getColumnTemplate:function(e,t,n,r,i){var o,s,a,l,u=this.options.cssClassNames.tableCell+" "+(n.class||""),c=n.customExpression,d="text-align: "+n.textAlignment+";position: relative;";if(o=$('<td class="'+u+'" data-col-id="'+t+'" role="cell"></td>'),this._setStyles(o,d),s=_.get(e,n.field),i)(a=this.options.summaryRowDefsObject[r][n.field])instanceof Object&&a.class&&o.addClass(a.class),s instanceof Promise?('<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>',o.html('<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>')):(l=_.isUndefined(s)||null===s?"":s,o.html(l));else if(c)o.html(this.options.getCustomExpression(n.field,r));else if("custom"!==n.type)s=_.get(e,n.field),(this.options.filterNullRecords&&null===s||_.isUndefined(s))&&(s=""),o.attr("title",s),o.text(""+s);else{switch(n.field){case"checkbox":l=this._getCheckboxTemplate(e,n.isMultiSelectCol);break;case"__expand":l='<span class="row-expansion-column" data-identifier="rowExpansionButtons"></span>';break;case"radio":l=this._getRadioTemplate(e);break;case"rowOperations":l='<span class="actions-column" data-identifier="actionButtons"></span>';break;case"rowIndex":l=e.$$index;break;case"none":l="";break;default:l=_.isUndefined(s)||null===s?"":s}o.html(l)}return e.$index=r+1,this.options.registerColNgClassWatcher(e,n,r,t),o},_getEventTemplate:function(e){var t,n=_.filter(_.keys(e),(function(e){return _.startsWith(e,"on")})),r="";return t="autocomplete"===e.editWidgetType?"onSubmit":"onChange",n=_.union(n,[t]),_.forEach(n,(function(t){r+=" "+_.kebabCase(t)+'="',"onSubmit"!==t&&"onChange"!==t||(r+="_"+t+"Field($event, $scope, newVal, oldVal);"),r+=(e[t]||"")+'" '})),r},_insertFieldInHeaderConfig:function(e,t,n){var r=_.findIndex(e,{field:n}),i=this;-1===r?_.forEach(e,(function(e){e.isGroup&&i._insertFieldInHeaderConfig(e.columns,t,n)})):e.splice(r+1,0,{field:t,isPredefined:!0})},setHeaderConfigForDefaultFields:function(e,t){if(!_.isEmpty(this.options.headerConfig)){var n=this.customColumnDefs[e].field;_.remove(this.options.headerConfig,{field:n}),"0"===t?this.options.headerConfig.unshift({field:n,isPredefined:!0}):"-1"===t?this.options.headerConfig.push({field:n,isPredefined:!0}):this._insertFieldInHeaderConfig(this.options.headerConfig,n,t)}},setDefaultColsData:function(e){if(!_.isEmpty(this.preparedHeaderData)){var t,n;if(this.options.rowExpansionEnabled){if(t=this.options.rowDef.position,(n=_.clone(this.customColumnDefs.__expand)).width=this.options.rowDef.columnwidth,e)if("-1"===t)this.preparedHeaderData.push(n);else if("0"===t)this.preparedHeaderData.unshift(n);else{var r=_.findIndex(this.preparedHeaderData,{field:t});this.preparedHeaderData.splice(r+1,0,n)}this.setHeaderConfigForDefaultFields("__expand",t)}this.options.showRowIndex&&(e&&this.preparedHeaderData.unshift(this.customColumnDefs.rowIndex),this.setHeaderConfigForDefaultFields("rowIndex","0")),this.options.multiselect&&(e&&this.preparedHeaderData.unshift(this.customColumnDefs.checkbox),this.setHeaderConfigForDefaultFields("checkbox","0")),!this.options.multiselect&&this.options.showRadioColumn&&(e&&this.preparedHeaderData.unshift(this.customColumnDefs.radio),this.setHeaderConfigForDefaultFields("radio","0"))}},_prepareHeaderData:function(){this.preparedHeaderData=[],$.extend(this.preparedHeaderData,this.options.colDefs),this.setDefaultColsData(!0)},_generateCustomColDefs:function(){var e=[],t={};function n(n){if(!t[n]){var r={type:"string",field:n};e.push(r),t[n]=!0}}this.options.data.forEach((function(e){_.keys(e).forEach(n)})),this.options.colDefs=e,this._prepareHeaderData()},_prepareData:function(){var e=[],t=this.options.colDefs,n=this,r=n.getPageStartIndex(),i=this.Utils.isObject,o=this.Utils.isDefined;!this.options.colDefs.length&&this.options.data.length&&this._generateCustomColDefs(),(this.options.isNavTypeScrollOrOndemand()?this.options.data.slice(r):this.options.data).forEach((function(s,a){var l=$.extend(!0,{},s);t.forEach((function(e){if(e.field){var t,n,r,a=e.field.split("."),u=s,c=a.length;for(t=0;t<c;t++)if(r=void 0,-1!==(n=a[t]).indexOf("[0]")&&(n=n.replace("[0]",""),r=!0),i(u)&&!r)u=_.get(u,n);else{if(!r){u=void 0;break}u=_.get(u,n+"[0]")}o(u)?l[e.field]=u:a.length>1&&_.has(s,e.field)&&(l[e.field]=s[e.field])}})),l.$$index=r+a+1,l.$$pk=n.options.isNavTypeScrollOrOndemand()?r+a:a,e.push(l)})),n.options.isNavTypeScrollOrOndemand()?n.options.isSearchTrigerred&&!n.emptySearch||n.options.isDatasetUpdated?n.preparedData=e:n.preparedData.length?e.forEach((function(e,t){var i=r+t;n.preparedData[i]&&e.$$index===n.preparedData[i].$$index?n.preparedData[i]=e:n.preparedData.push(e)})):n.preparedData.push(...e):n.preparedData=e},_reselectColumns:function(){var e=[],t=this;this.gridHeaderElement&&this.options.enableColumnSelection&&(e=this.gridHeaderElement.find("th."+this.options.cssClassNames.selectedColumn)).length&&e.each((function(){t.columnSelectionHandler(void 0,$(this))})),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(e){this.__setStatus(e)}),100),this._debounceOnEnter=_.debounce((function(e,t,n,r){this._onEnter(e,t,n,r)}),150),this.options.summaryRow=!1,this.options.summaryRowDefs=[],this._prepareHeaderData(),this._prepareData(),this._render(!0)},_setGridEditMode:function(e){_.isFunction(this.options.setGridEditMode)&&this.options.setGridEditMode(e)},_refreshGrid:function(){this._prepareHeaderData(),this._prepareData(),this._render(),this.addOrRemoveScroll(),this._setGridEditMode(!1)},refreshGrid:function(){window.clearTimeout(this.refreshGridTimeout),this.refreshGridTimeout=window.setTimeout(this._refreshGrid.bind(this),50)},callRenderGridForInfiniteScroll:function(){this.gridFooter.remove();var e=this.gridElement.find("> tr.app-datagrid-row.always-new-row");e.length&&e.remove(),this._renderGrid(void 0)},refreshGridData:function(){this._prepareData(),this.options.isNavTypeScrollOrOndemand()?this.callRenderGridForInfiniteScroll():(this.gridFooter.remove(),this._renderGrid()),this._reselectColumns(),this.addOrRemoveScroll(),this._setGridEditMode(!1),this.toggleNewRowActions(!1)},setDefaultRowData:function(e){_.forEach(this.preparedHeaderData,(function(t){e[t.field]=t.defaultvalue}))},addNewRow:function(e,t){var n,r,i,o=this.gridElement.find("> tr.app-datagrid-row:visible").length||99999,s=this,a={};if(!t&&_.isFunction(this.options.beforeRowInsert)&&this.options.beforeRowInsert(),(i=(r=this.gridElement).find("> tr.app-datagrid-row.always-new-row")).length){if(this.setFocusOnElement(void 0,i),this.options.editmode===this.CONSTANTS.QUICK_EDIT){var l=i.find("input").length>0?$(i.find("input")[0]):null;if(null!==l){var u=$.Event("keydown");u.which=13,l.trigger(u)}}}else a.$index=o,a.$$pk=o,this.options.editmode!==this.CONSTANTS.FORM&&this.options.editmode!==this.CONSTANTS.DIALOG&&(n=$(this._getRowTemplate(a,a.$index)),this.preparedData.length||this.setStatus("ready",this.dataStatus.ready),"top"===this.options.formPosition?r.prepend(n):r.append(n),this._appendRowActions(n,!0,a),this.attachEventHandlers(n),(t||this.options.editmode!==this.CONSTANTS.QUICK_EDIT)&&(n.find(".delete-row-button").hide(),t&&n.find(".edit-row-button").hide()),this._findAndReplaceCompiledTemplates(),t?(this.setDefaultRowData(a),n.addClass("always-new-row").addClass("row-editing"),this.options.runInNgZone((function(){s.makeRowEditable(n,a,!0)}))):n.trigger("click",[void 0,{action:"edit",operation:"new",skipFocus:e}]),this.updateSelectAllCheckboxState(),this.addOrRemoveScroll(),this.options.timeoutCall((function(){s.setColGroupWidths()}),100))},addLoadMoreBtn:function(e,t,n,r){var i;if(!this.options.isLastPage||r){var o=this,s=$('<div class="on-demand-datagrid"><a class="app-button btn btn-block on-demand-load-btn"></a></div>');(i=s.find("a")).append(e),this.element.find(".app-grid-header-inner").append(s),r&&this.element.find(".on-demand-load-btn").length&&this.element.find(".on-demand-load-btn").text(this.options.viewlessmessage),i.on("click",(function(e){var s=o.options.getCurrentPage()==o.options.getPageCount();s||o.showLoadingIndicator(t,!1),o.options.showviewlessbutton||i.hide(),r&&s&&o.element.find(".on-demand-datagrid").remove(),s&&o.options.showviewlessbutton&&(i.hide(),o.renderTableOnViewLess=!0,o.renderPaginationOnViewLess=!0,o.options.enableNavigation(),o._renderGrid()),n&&"function"==typeof n&&n(e)}))}},showLoadingIndicator:function(e,t){var n=this.element.find(".loading-data-msg"),r=this.element.find(".on-demand-datagrid");if(n.length&&!t)n.show();else if(t&&r.length)r.show();else{var i=$('<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>');if(i.find(".loading-text").html(e),r.length)r.append(i);else{var o=$('<div class="on-demand-datagrid">'+i[0].outerHTML+"</div>");this.element.find(".app-grid-header-inner").append(o)}}},hideLoadingIndicator:function(e,t){e||t?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(),t&&(this.element.find(".on-demand-load-btn").length||this.options.addLoadMoreBtn(),this.element.find(".loading-data-msg").hide())):this.element.find(".on-demand-datagrid").hide():(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())},getSelectedRows:function(){this.getSelectedColumns();var e=[],t=this;return this.preparedData.forEach((function(n,r){n._selected&&e.push(t.options.data[r])})),e},selectRows:function(e){var t=this;t.gridElement.find("tr.app-datagrid-row").each((function(e){t.preparedData[e]&&!0===t.preparedData[e]._selected&&$(this).trigger("click",[$(this),{skipSingleCheck:!0}])})),_.isArray(e)?_.forEach(e,(function(e){t.selectRow(e,!0)})):t.selectRow(e,!0)},toggleRowFilter:function(e){this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this.gridSearch&&(e?this.gridSearch.show():this.gridSearch.hide())},setColGroupWidths:function(){var e=this,t=(this.options.isMobile,this.tableContainer.find("col")),n=this.tableContainer.find("col"),r=this.options.showHeader?this.gridContainer.find("th.app-datagrid-header-cell"):this.gridElement.find("tr.app-datagrid-row").first().find("td"),i=this.preparedHeaderData.length,o=this.gridElement.parent().prop("scrollLeft");if(t.length||r.length){this._setColSpan(this.options.headerConfig),this.toggleRowFilter();var s=0,a=t.length;t.each((function(){var e=$(this).width();e&&(s+=e,a-=1)})),r.each((function(){var r,i,o=Number($(this).attr("data-col-id")),s=e.preparedHeaderData[o],a=e.gridContainer.find('th[data-col-id="'+o+'"]'),l=e.gridElement.find('td.app-datagrid-cell[data-col-id="'+o+'"]'),u=e.tableContainer.find('tfoot tr.app-datagrid-row td.app-datagrid-cell[data-col-id="'+o+'"]'),c=$(t[o]),d=$(n[o]);s&&(r=s.width,_.isUndefined(s.show)||s.show?(a.show(),l.show(),c.show(),d.show(),u.show()):(a.hide(),l.hide(),c.hide(),d.hide(),u.hide()),c.length&&"90px"===c[0].style.width&&(i=_.isUndefined(r)?"":r,c.css("width",i),d.css("width",i)))})),r.each((function(){var r,o,l,u,c=$(this),d=Number(c.attr("data-col-id")),h=e.preparedHeaderData[d];if(h){if(r=h.width,_.isUndefined(h.show)||h.show)if(c.hasClass("grid-col-small"))o=50;else if(_.isUndefined(r)||""===r||_.includes(r,"%")){if((u=$(t[d])).length)if(""===(l=u[0].style.width)||"0px"===l||"90px"===l||_.includes(l,"%"))if((o=c.width())<=0){for(var p=c,f=o,m=0;f<=0;)f=(p=p.parent()).width(),p.find("table").length&&p.prop("style")&&(m=m+parseFloat(p.css("padding-left"))+parseFloat(p.css("padding-right")));if(f>0)if(m&&(f-=m),_.includes(l,"%"))o=f*(parseInt(l)/100);else o=(o=(s&&s>0?f-s:f)/(a||t.length))>90?i===d+1?o-17:o:90;else o=o>90?i===d+1?o-17:o:90}else o=o>90?i===d+1?o-17:o:90;else o=l}else o=r;else o=0;$(t[d]).css("width",o),$(n[d]).css("width",o)}})),this.toggleRowFilter(!0),this.gridElement.parent().prop("scrollLeft",o),this.gridHeaderElement.parent().prop("scrollLeft",o)}},getSelectedColumns:function(){var e,t,n,r={},i=[],o=this;return $.extend(i,this.preparedHeaderData),this.options.multiselect?(i.some((function(t,n){if("checkbox"===t.field)return e=n,!0})),i.splice(e,1)):this.options.showRadioColumn&&(i.some((function(e,n){if("radio"===e.field)return t=n,!0})),i.splice(t,1)),this.options.showRowIndex&&(i.some((function(e,t){if("rowIndex"===e.field)return n=t,!0})),i.splice(n,1)),i.forEach((function(e){var t=e.field;e.selected&&(r[t]={colDef:e,colData:o.options.data.map((function(e){return e[t]}))})})),r},_setOption:function(e,t){switch(this._super(e,t),e){case"showHeader":this._toggleHeader(),this._toggleSearch(),this.setColGroupWidths(),this.addOrRemoveScroll();break;case"filtermode":this._toggleSearch();break;case"searchLabel":this.gridSearch&&(this.gridSearch.find('[data-element="dgSearchText"]').attr("placeholder",t),this.gridSearch.find('[data-element="dgSearchButton"]').attr("title",t));break;case"selectFirstRow":this.selectFirstRow(t);break;case"data":this.isResetSortIconsDone||this.setSortIconDefault(),this.refreshGridData();break;case"dataStates":"nodata"===this.dataStatus.state?this.setStatus("nodata",this.dataStatus.nodata):"loading"===this.dataStatus.state&&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 n=this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid;this.options.rowExpansionEnabled&&(n=n+" "+this.options.cssClassNames.gridRowExpansionClass),this.tableContainer.attr("class",n),"condensed"===this.options.spacing&&this._toggleSpacingClasses("condensed");break;case"spacing":this._toggleSpacingClasses(t);break;case"messages":this.gridSearch&&this.gridSearch.find("option.placeholder").text(t&&t.selectField)}},getOptions:function(){return this.options},_toggleHeader:function(){this.gridHeaderElement&&this.gridHeaderElement.empty(),this.tableContainer&&(this.tableContainer.find("colgroup").remove(),this.tableContainer.find("thead").remove()),this.setDefaultColsData(),this.options.showHeader&&this._renderHeader()},_toggleSearch:function(){this.gridSearch&&this.gridSearch.remove(),this.options.filtermode===this.CONSTANTS.SEARCH?this._renderSearch():this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&(this._renderRowFilter(),this.setColGroupWidths())},selectFirstRow:function(e,t){var n,r;t&&this.gridElement.find("tr").is(":visible")?(this.__setStatus(),n=this.gridElement.find("tr.app-datagrid-row:visible:not(.always-new-row)").first()):n=this.gridElement.find("tr.app-datagrid-row:not(.always-new-row)").first(),r=n.attr("data-row-id"),n.length&&this.preparedData.length&&(this.preparedData[r]._selected=!e,n[0].click())},selectRow:function(e,t){var n,r,i=_.isNumber(e)?e:this.Utils.getObjectIndex(this.options.data,e);-1!==i&&(n="tr.app-datagrid-row[data-row-id="+i+"]",(r=this.gridElement.find(n)).length&&(this.preparedData[i]._selected=!t),t?r.trigger("click"):(this.toggleRowSelection(r,t),this.options.callOnRowDeselectEvent(this.preparedData[i])))},deselectRow:function(e){this.selectRow(e,!1)},toggleRowSelection:function(e,t,n,r){if(e.length){var i=e.attr("data-row-id");this.preparedData[i]&&(this.preparedData[i]._selected=t,t?e.addClass("active"):e.removeClass("active"),this.options.showRadioColumn&&(e.find("td input[rowSelectInput]:radio:not(:disabled)").prop("checked",t),this.preparedData[i]._checked=t),this.options.multiselect?(e.find('td input[name="gridMultiSelect"]:checkbox:not(:disabled)').prop("checked",t),this.preparedData[i]._checked=t,r||this.updateSelectAllCheckboxState()):this._deselectPreviousSelection(e,n))}},updateSelectAllCheckboxState:function(){if(this.options.showHeader&&this.options.multiselect){this.__setStatus();var e=this.gridHeaderElement.find("th.app-datagrid-header-cell input:checkbox"),t=this.gridElement,n=t.find('tr.app-datagrid-row:visible input[name="gridMultiSelect"]:checkbox:checked').length,r=t.find("tr.app-datagrid-row:visible").length;r&&n===r?e.prop("checked",!0):e.prop("checked",!1)}},rowClickHandlerOnCapture:function(e,t,n){if(!this.getColInfo(e)||"checkbox"==e.target.type){t=t||$(e.target).closest("tr.app-datagrid-row");var r=this.gridElement.find(t);if(r.length&&r.closest("tbody").attr("id")===this.gridElement.attr("id")){var i=t.attr("data-row-id"),o=this.preparedData[i],s=this.options.data[i];this.options.assignSelectedItems(s,e,{rowId:i,_selected:o?._selected})}}},rowSelectionHandler:function(e,t,n){if(!this.getColInfo(e)||"checkbox"==e.target.type){var r,i,o,s,a=this,l=(n=n||{}).action,u=$(e.target),c=this.options.editmode===this.CONSTANTS.QUICK_EDIT;t=t||u.closest("tr.app-datagrid-row"),(l||c&&(u.hasClass("app-datagrid-cell")||u.closest("td.app-datagrid-cell").length)&&!t.hasClass("always-new-row"))&&(n.action=n.action||"edit",("new"===n.operation||a.options.actionsEnabled.edit)&&a.toggleEditRow(e,n),n.skipSelect)||(r=t.attr("data-row-id"),i=this.preparedData[r],o=this.options.data[r],s=i&&i._selected||!1,n.skipSingleCheck||(!t.hasClass("active")||this.options.multiselect)&&i?(this.options.callOnRowClickEvent(o,e),s=!s,this.toggleRowSelection(t,s,e),d()):c||"new"===n.operation||d())}function d(){s&&_.isFunction(a.options.onRowSelect)&&a.options.onRowSelect(o,e),!s&&_.isFunction(a.options.onRowDeselect)&&a.options.onRowDeselect(o,e)}},rowDblClickHandler:function(e,t){e.stopPropagation();var n,r=(t=t||$(e.target).closest("tr.app-datagrid-row")).attr("data-row-id");(n=this.preparedData[r])&&_.isFunction(this.options.onRowDblClick)&&this.options.onRowDblClick(n,e)},closePopover:function(){this.options.closePopover(this.element)},headerClickHandler:function(e){var t=$(e.target).closest("th.app-datagrid-header-cell").attr("data-col-id");this.closePopover(),this.options.onHeaderClick(this.preparedHeaderData[t],e)},columnSelectionHandler:function(e,t){e&&e.stopImmediatePropagation();var n=e?$(e.target).closest("th.app-datagrid-header-cell"):t,r=n.attr("data-col-id"),i=this.preparedHeaderData[r],o=i.field,s='td[data-col-id="'+r+'"]',a=this.gridElement.find(s),l=a.data("selected")||!1,u={colDef:i,data:this.options.data.map((function(e){return e[o]})),sortDirection:this._getColumnSortDirection(i.field)},c=this.options.cssClassNames.selectedColumn;l=!l,i.selected=l,a.data("selected",l),l?(a.addClass(c),n.addClass(c),_.isFunction(this.options.onColumnSelect)&&e&&this.options.onColumnSelect(u,e)):(a.removeClass(c),n.removeClass(c),_.isFunction(this.options.onColumnDeselect)&&e&&this.options.onColumnDeselect(u,e))},getTextValue:function(e,t){return this.options.getFieldValue(t?e+"_new":e)},getUploadedFiles:function(e,t){return _.get(document.forms,[e.find("form").attr("name"),t,"files",0])},isDataModified:function(e,t,n){var r=!1,i=this;function o(e){return e?moment(e).valueOf():e}return e.each((function(){var e=$(this),s=e.attr("data-col-id"),a=i.preparedHeaderData[s],l=i.getTextValue(a.field,n),u=_.get(t,a.field);if(r="upload"===a.editWidgetType?i.getUploadedFiles(e,a.field)instanceof File:!(!i.Utils.isDefined(l)&&null==u)&&("datetime"===a.editWidgetType?!(o(u)===o(l)):!(u==l)))return!r})),r},focusActiveRow:function(){this.gridElement.find("tr.app-datagrid-row.active").focus()},focusNewRow:function(){var e=this.gridElement.find("tr.always-new-row"),t=e&&e.find("input")||[];t.length&&t[0].focus()},disableActions:function(e){var t=this.gridElement.find(".delete-row-button"),n=this.gridElement.find(".edit-row-button");e?(n.addClass("disabled-action"),t.addClass("disabled-action")):(n.removeClass("disabled-action"),t.removeClass("disabled-action"))},setFocusOnElement:function(e,t,n){var r,i,o=e&&$(e.target);o&&o.hasClass("app-datagrid-cell")?r=o.find("input"):(t?t.hasClass("app-datagrid-row")&&(t=t.find("td.cell-editing")):t=o.closest("tr.app-datagrid-row").find("td.cell-editing"),(r=$(t).first().find("input")).length||(r=$(t).first().find("textarea")),r.length||(r=$(t).first().find("select"))),r.length&&(i=r.first(),n?(i.focus(),i.select()):this.options.timeoutCall((function(){i.focus(),i.select()})))},removeNewRow:function(e){this.disableActions(!1),this._setGridEditMode(!1),e.hasClass("always-new-row")||(e.attr("data-removed",!0),e.remove(),this.preparedData.length||this.setStatus("nodata",this.dataStatus.nodata),this.addOrRemoveScroll(),this.toggleNewRowActions(!1))},saveRow:function(e){this.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").each((function(){$(this).trigger("click",[void 0,{action:"save",skipSelect:!0,noMsg:!0,success:e}])}))},makeRowEditable:function(e,t,n){var r,i=this,o=e.find("td.app-datagrid-cell"),s=parseInt(e.attr("data-row-id"),10),a=_.clone(t);a.$index=s+1,this.options.removeValidations(n),this.options.generateInlineEditRow(a,n),o.each((function(){var e,r,o=$(this),a=o.text(),l=o.attr("data-col-id"),u=i.preparedHeaderData[l];u.readonly||(e=_.get(t,u.field),r=i.options.getInlineEditWidget(u.field,e,n),u.customExpression||u.formatpattern&&"None"!==u.formatpattern?(o.addClass("cell-editing editable-expression").data("originalValue",{rowIndex:s,fieldName:u.field}),o.addClass("cell-editing editable-expression").html(r).data("originalText",a)):o.addClass("cell-editing").html(r).data("originalText",a),o.addClass("form-group"),"rowOperations"!==u.binding?i.options.timeoutCall((function(){i.options.applyValidations(u,n),u.required&&o.addClass("required-field")})):u.required&&o.addClass("required-field"))})),(r=e.find("td.cell-editing")).on("click",(function(e){e.stopPropagation()})),r.on("keydown",(function(e){38!==e.which&&40!==e.which||!e.currentTarget||e.currentTarget.closest(".always-new-row")||e.stopPropagation()}))},toggleNewRowActions:function(e){var t=this,n=$(this.element).siblings("div.panel-footer, div.panel-heading").find("div.app-datagrid-actions"),r=this.gridElement.find("tr.app-datagrid-row.row-editing"),i=n.find("i.wi-plus").closest(".app-button");this.options.editmode!==this.CONSTANTS.INLINE||0!==this.options.rowActions.length&&_.some(this.options.rowActions,{action:"editRow($event)"})||(e?(n.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>'),n.find(".cancelNewRow").on("click",(function(e){t.toggleEditRow(e,{action:"cancel",$row:r})})),n.find(".saveNewRow").on("click",(function(e){t.toggleEditRow(e,{action:"save",$row:r})})),i.hide()):($("typeahead-container").removeClass("open"),n.find(".cancelNewRow").remove(),n.find(".saveNewRow").remove(),i.show()))},_isNewRow:function(e){return parseInt(e.attr("data-row-id"),10)>=this.preparedData.length||e.hasClass("always-new-row")},toggleEditRow:function(e,t){t=t||{},e&&e.stopPropagation(),this.closePopover();var n,r,i,o,s=t.$row||$(e.target).closest("tr.app-datagrid-row"),a=s.find(".edit-row-button"),l=s.find(".cancel-edit-row-button"),u=s.find(".save-edit-row-button"),c=s.find(".delete-row-button"),d=_.cloneDeep(this.options.data[s.attr("data-row-id")])||{},h=this,p=s.hasClass("always-new-row"),f=h.options.editmode===h.CONSTANTS.QUICK_EDIT,m={};function g(e,n){_.isFunction(t.success)&&t.success(e,n),f&&!h.options.actionsEnabled.edit||h.focusActiveRow()}if(this.options.setActionRowIndex(s.attr("data-row-id")),this.options.setLastActionPerformed(this.options.ACTIONS.EDIT),"true"!==s.attr("data-removed")){if(t.selectRow&&this.selectRow(d,!0),(e=e||{}).data=e.data||{},"edit"===(n=e.data.action||t.action)){if(this.options.editmode===this.CONSTANTS.INLINE&&this.options.callLoadInlineWidgetData(),f&&h.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").length)return void h.saveRow((function(t,n){h.editSuccessHandler(t,n,e,s,!0)}));if(s.addClass("row-editing"),_.isFunction(this.options.beforeRowUpdate)&&this.options.beforeRowUpdate(d,e),h.options.editmode===h.CONSTANTS.FORM||h.options.editmode===h.CONSTANTS.DIALOG)return;if("new"===t.operation&&(h.setDefaultRowData(d),h.toggleNewRowActions(!0)),_.isFunction(this.options.onBeforeFormRender)&&!1===this.options.onBeforeFormRender(d,e,t.operation||n))return;this._setGridEditMode(!0),this.disableActions(!0),c.removeClass("disabled-action"),this.options.runInNgZone((function(){h.makeRowEditable(s,d)})),a.addClass("hidden"),l.removeClass("hidden"),u.removeClass("hidden"),i=s.find("td.cell-editing"),!t.skipFocus&&i&&this.options.timeoutCall((function(){h.setFocusOnElement(e,i)})),_.isFunction(this.options.onFormRender)&&this.options.onFormRender(s,e,t.operation||n,s.hasClass("always-new-row"))}else if(i=s.find("td.cell-editing"),r=h._isNewRow(s),"save"===n)if(!!r||this.isDataModified(i,d,p)){if(i.each((function(){var e,t=$(this),n=t.attr("data-col-id"),i=h.preparedHeaderData[n],o=_.split(i.field,".");e=h.getTextValue(i.field,p),1===o.length&&"upload"===i.editWidgetType?_.set(d,i.field,h.getUploadedFiles(t,i.field)):(e=1!==o.length&&!r||""!==e?e:void 0,h.Utils.isDefined(e)?null===(e="null"===e?null:e)?o.length>1?_.set(d,o[0],e):r||_.set(d,i.field,""):_.set(d,i.field,e):1!==o.length||r||_.set(d,i.field,e))})),i.find(".ng-pending").length>0)return void setTimeout(this.toggleEditRow.bind(this,e,t),200);if((o=i.find(".ng-invalid")).length>0)return o.each((function(e){var t=$(this).closest("td.app-datagrid-cell");0===e&&t.find("[focus-target]").focus(),h.options.setTouched(t.find("[formcontrolname]").attr("formcontrolname"))})),void(_.isFunction(t.success)&&t.success(!1,!0));if(r&&f&&_.isEmpty(d))return h.removeNewRow(s),void(_.isFunction(t.success)&&t.success(!1,void 0,!0));if(r){if(_.isFunction(this.options.onBeforeRowInsert)&&!1===this.options.onBeforeRowInsert(d,e,m))return;this.options.onRowInsert(d,e,g,m),h.toggleNewRowActions(!1),!s.hasClass("always-new-row")&&h.options.isNavTypeScrollOrOndemand()&&h.removeNewRow(s)}else{if(_.isFunction(this.options.onBeforeRowUpdate)&&!1===this.options.onBeforeRowUpdate(d,e,m))return;this.options.afterRowUpdate(d,e,g,m)}}else this.cancelEdit(s),t.noMsg||this.options.noChangesDetected(),_.isFunction(t.success)&&t.success(!1);else{if(r)return void h.removeNewRow(s);this.cancelEdit(s)}this.addOrRemoveScroll()}},cancelEdit:function(e){var t=this,n=e.find("td.cell-editing"),r=e.find(".cancel-edit-row-button"),i=e.find(".save-edit-row-button"),o=e.find(".edit-row-button");this.options.clearActionRowIndex(),this.disableActions(!1),e.removeClass("row-editing"),n.off("click"),n.each((function(){var e=$(this),n=e.data("originalValue");e.removeClass("datetime-wrapper cell-editing required-field form-group"),n?e.html(t.options.getCustomExpression(n.fieldName,n.rowIndex)):e.text(e.data("originalText")||"")})),$("typeahead-container").removeClass("open"),o.removeClass("hidden"),r.addClass("hidden"),i.addClass("hidden"),this._setGridEditMode(!1)},closeEditedRow:function(){var e=this.gridElement.find("tr.app-datagrid-row.row-editing");e.length&&(this._isNewRow(e)?this.removeNewRow(e):this.cancelEdit(e))},hideRowEditMode:function(e){if(e.hasClass("always-new-row")&&this.options.isNavTypeScrollOrOndemand())this.resetNewRow(e);else{var t=e.find("td.cell-editing"),n=e.find(".edit-row-button"),r=e.find(".cancel-edit-row-button"),i=e.find(".save-edit-row-button"),o=this;e.removeClass("row-editing"),t.off("click"),this.disableActions(!1),this._setGridEditMode(!1),t.each((function(){var e,t,n=$(this),r=n.data("originalValue");n.removeClass("datetime-wrapper cell-editing required-field form-group"),r?n.html(o.options.getCustomExpression(r.fieldName,r.rowIndex)):(t=o.preparedHeaderData[n.attr("data-col-id")],e=o.getTextValue(t.field),n.text(o.Utils.isDefined(e)?e:""))})),n.removeClass("hidden"),r.addClass("hidden"),i.addClass("hidden"),this.addOrRemoveScroll()}},deleteRow:function(e){e.stopPropagation();var t,n,r=$(e.target).closest("tr.app-datagrid-row"),i=r.attr("data-row-id"),o=this.options.data[i],s=this._isNewRow(r),a={},l=this;if(this.options.setActionRowIndex(i),this.options.setLastActionPerformed(this.options.ACTIONS.DELETE),_.isFunction(this.options.beforeRowDelete)&&this.options.beforeRowDelete(o,e),s)return this.disableActions(!1),this._setGridEditMode(!1),r.attr("data-removed",!0),r.remove(),this.preparedData.length||this.setStatus("nodata",this.dataStatus.nodata),void this.addOrRemoveScroll();_.isFunction(this.options.onBeforeRowDelete)&&!1===this.options.onBeforeRowDelete(o,e,a)||_.isFunction(this.options.onRowDelete)&&(t=this.options.cssClassNames.deleteRow,(n=-1!==r.attr("class").indexOf("active"))&&r.removeClass("active"),r.addClass(t),this.options.onRowDelete(o,(function(){n&&r.addClass("active"),r.removeClass(t),l.addOrRemoveScroll()}),e,(function(t,n){if(l.options.isNavTypeScrollOrOndemand()){var r=+$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),i=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+r+'"]');l.options.setDeletedRowIndex(r),l.preparedData.splice(r,1),l.options.data.splice(r,1),l.gridElement.find("tr.app-datagrid-row:gt("+r+")").each((function(e,t){i.is(":last-child")||$(t).hasClass("always-new-row")||($(t).attr("data-row-id",r),l.preparedData[r].$$pk--,l.preparedData[r].$$index--,l.preparedData[r].$index--,r++)})),i.remove()}var o,s;l.options.editmode===l.CONSTANTS.QUICK_EDIT&&($(e.target).hasClass("delete-row-button")||l.Utils.isDeleteKey(e))&&(l.__setStatus(),n||(o=+$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),(s=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+o+'"]')).length||(s=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+(o-1)+'"]')),s.trigger("click",[void 0,{action:"edit",skipFocus:t}])))}),a))},deleteRowAndUpdateSelectAll:function(e){this.deleteRow(e),this.updateSelectAllCheckboxState()},_deselectPreviousSelection:function(e,t){var n=this.gridElement.find("tr.app-datagrid-row.active"),r=e.attr("data-row-id"),i=this;n.each((function(){var e=$(this).attr("data-row-id"),n=i.preparedData[e];e!==r&&n&&($(this).find("input[rowSelectInput]:radio").prop("checked",!1),n._selected=n._checked=!1,$(this).removeClass("active"),i.options.callOnRowDeselectEvent(n,t))}))},resetSortIcons:function(e){var t;this.isResetSortIconsDone=!0,!e&&this.gridHeaderElement&&(e=(t=this.gridHeaderElement.find(".sort-buttons-container.active")).find("i.sort-icon"),t.removeClass("active")),e.removeClass("desc asc").removeClass(this.options.cssClassNames.descIcon).removeClass(this.options.cssClassNames.ascIcon)},setSortIconDefault:function(){const e=this.options.sortInfo,t=this.tableContainer.find("[data-col-field='"+e.field+"']").find(".sort-buttons-container"),n=t.find("i.sort-icon"),r=e.direction;"asc"===r?(n.addClass(r+" "+this.options.cssClassNames.ascIcon),t.addClass("active")):"desc"===r&&(n.addClass(r+" "+this.options.cssClassNames.descIcon),t.addClass("active"))},sortHandler:function(e){e.stopImmediatePropagation(),$(e.target).hasClass("header-data")&&this.options.enableColumnSelection&&this.headerClickHandler(e);var t,n,r,i=$(e.target).closest("th.app-datagrid-header-cell"),o=i.attr("data-col-id"),s=i.find(".sort-buttons-container"),a=s.find("i.sort-icon"),l=a.hasClass("asc")?"desc":"asc",u=this.options.sortInfo,c=this.gridHeaderElement.find(".sort-buttons-container.active"),d=i.attr("data-col-field");this.resetSortIcons(a),a.addClass(l),"asc"===l?(a.addClass(this.options.cssClassNames.ascIcon),s.addClass("active")):"desc"===l&&(a.addClass(this.options.cssClassNames.descIcon),s.addClass("active")),c.length&&(n=c.closest("th.app-datagrid-header-cell").attr("data-col-id"),r=this.preparedHeaderData[n],t=c.find("i.sort-icon"),r.field!==d&&(c.removeClass("active"),this.resetSortIcons(t)),r.sortInfo={sorted:!1,direction:""}),u.direction=l,u.field=d,""!==l&&(this.preparedHeaderData[o].sortInfo={sorted:!0,direction:l}),this._setGridEditMode(!1),this.closeEditedRow(),this.options.sortHandler.call(this,this.options.sortInfo,e,"sort")},processUpDownKeys:function(e,t,n){var r=this,i=t.find("input").val();t.hasClass("row-editing")&&r.options.editmode===r.CONSTANTS.QUICK_EDIT&&i?r.toggleEditRow(e,{action:"save",noMsg:!0,success:function(i,o){r.editSuccessHandler(i,o,e,t,!0,n)}}):(t="down"===n?t.next():t.prev(),this.options.rowExpansionEnabled&&!t.is(":visible")&&(t="down"===n?t.next():t.prev()),t.focus())},resetNewRow:function(e){var t={},n=this;this.options.clearForm(!0),n.setDefaultRowData(t),e.find("[data-field-name]").each((function(){var e=$(this),r=e.attr("data-field-name")+"_new";n.options.setFieldValue(r,t[e.attr("data-field-name")]||"")})),n.options.safeApply(),n.setFocusOnElement(void 0,e,!0)},_onEnter:function(e,t,n,r){var i=this;e.is("button")||(n&&e.hasClass("app-datagrid-row")&&!e.hasClass("row-editing")?t.trigger("click",[void 0,{action:"edit"}]):t.hasClass("row-editing")&&e.closest("[data-field-name]").length?(e.blur(),i.toggleEditRow(r,{action:"save",success:function(t,n){n?e.focus():(i.focusActiveRow(),i.focusNewRow())}})):(t.trigger("click"),n&&e.hasClass("always-new-row")&&e.hasClass("row-editing")&&i.focusNewRow()),e.is("button")||r.stopPropagation())},onKeyDown:function(e){var t,n=$(e.target),r=n.closest("tr.app-datagrid-row"),i=this.options.editmode===this.CONSTANTS.QUICK_EDIT;if(this.options.rowExpansionEnabled&&!r.length&&(r=n.closest("tr.app-datagrid-detail-row")),!this.Utils.isDeleteKey(e))return 27===e.which?((t=this._isNewRow(r))&&r.hasClass("always-new-row")?(n.blur(),this.resetNewRow(r)):r.trigger("click",[void 0,{action:"cancel"}]),void(t||r.focus())):13===e.which?(e.stopPropagation(),void this._debounceOnEnter(n,r,i,e)):void(38!==e.which?40===e.which&&this.processUpDownKeys(e,r,"down"):this.processUpDownKeys(e,r,"up"));!this.options.actionsEnabled.delete||n.is("input")||n.hasClass("form-control")||this.deleteRow(e)},editSuccessHandler:function(e,t,n,r,i,o){var s,a,l=this;if(l.__setStatus(),t)l.setFocusOnElement(n);else{if(s=+r.attr("data-row-id"),o)return s="down"===o?++s:--s,void((a=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+s+'"]')).length?a.focus():r.focus());i||_.isUndefined(i)||s++,(a=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+s+'"]')).hasClass("always-new-row")?("top"!==l.options.formPosition||r.hasClass("always-new-row"))&&l.addNewRow(e):a.length?a.trigger("click",[void 0,{action:"edit",skipFocus:e,skipSelect:l.options.multiselect}]):l.options.actionsEnabled.new&&l.addNewRow(e)}},isLastColumn:function(e){var t,n=e.closest("td.app-datagrid-cell");return!!n.is(":last-child")||!!n.hasClass("cell-editing")&&(t=n.closest("tr.app-datagrid-row").find(".cell-editing").has('> :not([disabled="disabled"])'),n.attr("data-col-id")===t.last().attr("data-col-id"))},getColInfo:function(e){var t=$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),n=$(e.target).closest("td.app-datagrid-cell").attr("data-col-id");return!!(this.columnClickInfo&&this.columnClickInfo[t]&&this.columnClickInfo[t][n])&&this.columnClickInfo[t][n]},attachEventHandlers:function(e){var t=this.gridHeaderElement,n=this;this.options.enableRowSelection&&(e[0].removeEventListener("click",this.rowClickHandlerOnCapture.bind(this)),e.off(),e[0].addEventListener("click",this.rowClickHandlerOnCapture.bind(this)),e.on("click",this.rowSelectionHandler.bind(this)),e.on("click","td *",(function(e){if("checkbox"!=e.target.type){var t=$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),r=$(e.target).closest("td.app-datagrid-cell").attr("data-col-id"),i=Number(r);n.preparedHeaderData[i].readonly&&(n.columnClickInfo[t]={},n.columnClickInfo[t][r]=!0)}})),e.on("dblclick",this.rowDblClickHandler.bind(this)),e.on("keydown",this.onKeyDown.bind(this))),t&&(this.options.enableColumnSelection?(t.find("th[data-col-selectable]").off("click",this.columnSelectionHandler.bind(this)),t.find("th[data-col-selectable]").on("click",this.columnSelectionHandler.bind(this))):t.find("th[data-col-selectable]").off("click"),this.options.enableSort?this.options.enableColumnSelection?(t.find("th[data-col-sortable] .header-data").off("click",this.sortHandler.bind(this)),t.find("th[data-col-sortable] .header-data").on("click",this.sortHandler.bind(this))):(t.find("th[data-col-sortable]").off("click",this.sortHandler.bind(this)),t.find("th[data-col-sortable]").on("click",this.sortHandler.bind(this))):this.options.enableColumnSelection?t.find("th[data-col-sortable] .header-data").off("click"):t.find("th[data-col-sortable]").off("click")),this.options.rowActions.length&&(e.find(".cancel-edit-row-button").off("click"),e.find(".save-edit-row-button").off("click"),e.find(".cancel-edit-row-button").on("click",{action:"cancel"},this.toggleEditRow.bind(this)),e.find(".save-edit-row-button").on("click",{action:"save"},this.toggleEditRow.bind(this))),n.options.editmode===n.CONSTANTS.QUICK_EDIT&&e.on("focusout","tr.app-datagrid-row",(function(e){var t=$(e.target),r=t.closest("tr.app-datagrid-row"),i=$(e.relatedTarget),o=n.isLastColumn(t,i),s=t.closest("span.actions-column").length>0,a=i.closest("span.actions-column").length>0,l=i.closest("div.app-datagrid-actions").length>0,u=i.closest("div.app-datagrid-actions").length>0;i.is("tr.app-datagrid-row")&&i.attr("data-row-id")===r.attr("data-row-id")||a||r.hasClass("danger")||u||s&&a||s&&null===e.relatedTarget||!i.closest(".app-grid").length||i.is('.row-editing:not(".always-new-row"), .row-action-button, .app-datagrid-cell, .caption, button.btn-time, button.btn-date')||""===i.attr("focus-target")||(l||s||!(!o||o&&null===e.relatedTarget||t.hasClass("file-upload")))&&n.options.timeoutCall((function(){n.toggleEditRow(e,{action:"save",noMsg:!0,success:function(t,i,o){o||n.editSuccessHandler(t,i,e,r)}})}))})),e.find('[data-identifier="rowExpansionButtons"]').off("click"),e.find('[data-identifier="rowExpansionButtons"]').on("click",(function(e){var t=$(e.target).closest("tr.app-datagrid-row");$(this).find(".app-button").attr("disabled")||n.toggleExpandRow(+t.attr("data-row-id"),void 0,e)}))},expandRow:function(e){this.toggleExpandRow(e,!0)},collapseRow:function(e){this.toggleExpandRow(e,!1)},_collapseRow:function(e,t,n,r,i){var o=this.gridElement,s=$(o.find('> tr.app-datagrid-row[data-row-id="'+n+'"]'));s.removeClass(this.options.cssClassNames.expandedRowClass),s.find("button, a").attr("aria-expanded","false").attr("aria-live","polite"),!1!==this.options.onBeforeRowCollapse(e,t,n)&&(i.length&&i.hasClass(this.options.cssClassNames.rowExpandIcon)&&i.removeClass(this.options.cssClassNames.rowExpandIcon).addClass(this.options.cssClassNames.rowCollapseIcon),r.hide(),this.options.onRowCollapse(e,t))},toggleExpandRow:function(e,t,n){var r=this,i=r.gridElement,o=$(i.find('> tr.app-datagrid-row[data-row-id="'+e+'"]')),s=_.clone(r.options.data[e]),a=o.next("tr.app-datagrid-detail-row"),l=!a.is(":visible"),u=o.find('[data-identifier="rowExpansionButtons"] i.app-icon');s.$index=e+1,t&&!l||!1===t&&l||(l?(o.addClass(r.options.cssClassNames.expandedRowClass),o.find("button, a").attr("aria-expanded","true"),n&&r.preparedData[e]._selected&&n.stopPropagation(),r.options.rowDef.closeothers&&i.find("> tr.app-datagrid-detail-row:visible").each((function(){var e=$(this),t=e.prev("tr.app-datagrid-row").find('[data-identifier="rowExpansionButtons"] i.app-icon'),i=+e.attr("data-row-id"),o=r.options.data[i];e.hide(),r._collapseRow(n,o,i,e,t)})),r.options.generateRowDetailView(n,s,e,a.find("td.app-datagrid-row-details-cell .details-section"),a.find("td.app-datagrid-row-details-cell .row-overlay"),(function(){u.length&&u.hasClass(r.options.cssClassNames.rowCollapseIcon)&&u.removeClass(r.options.cssClassNames.rowCollapseIcon).addClass(r.options.cssClassNames.rowExpandIcon),a.show()}))):r._collapseRow(n,s,e,a,u))},_findAndReplaceCompiledTemplates:function(){if(this.gridElement){var e=this.gridElement.find("td[data-compiled-template]"),t=this;e.each((function(){var e=$(this),n=e.attr("data-compiled-template");e.replaceWith(t.compiledCellTemplates[n])}))}},_renderSearch:function(){var e,t=$(this._getSearchEl()),n=this;function r(e){e.stopPropagation();var r=t.find('[data-element="dgSearchText"]')[0].value,i=t.find('[data-element="dgFilterValue"]')[0].value,o=t.find("option:selected").attr("data-coldef-index"),s=n.options.colDefs[o],a=s&&s.type?s.type:"";n.searchObj={field:i,value:r,type:a,event:e},n.options.searchHandler.call(n,n.searchObj,e,"search")}this.element.find(".form-search").remove(),t.insertBefore(this.gridContainer),this.gridSearch=this.element.find(".form-search"),e=this.gridSearch.find('[data-element="dgSearchText"]'),this.gridSearch.find(".app-search-button").on("click",r),this.gridSearch.find('[data-element="dgFilterValue"]').on("change",(function(e){n.dataStatusContainer.find(".status").text()===n.options.dataStates.nodata&&r(e)})),e.on("keyup",(function(e){e.stopPropagation(),$(this).val()?n.emptySearch=!1:(n.emptySearch=!0,n.searchObj.value&&(n.searchObj.value="",r(e))),(13===e.which||n.options.filteronkeypress)&&r(e)}))},_renderRowFilter:function(){var e=$('<tr class="filter-row"></tr>'),t=this,n=this.options.isMobile&&!this.options.showHeader?this.gridElement:this.gridHeaderElement;n.find(".filter-row").remove(),this.options.generateFilterRow(),this.preparedHeaderData.forEach((function(n,r){var i=n.field,o=$('<th data-col-id="'+r+'"></th>');n.searchable?(o.append(t.options.getFilterWidget(i)),e.append(o)):e.append(o)}),this),this.options.showHeader?this.gridHeaderElement.append(e):(this.options.isMobile,n.empty().append(e)),this.gridSearch=n.find(".filter-row")},_renderHeader:function(){var e,t=this._getHeaderTemplate(),n=t.colgroup,r=this;if(this.gridElement.parent().scroll((function(){r.gridHeaderElement.parent().prop("scrollLeft",this.scrollLeft)})),!this.options.showHeader)return this.tableContainer.append(n),void this.gridHeaderElement.hide();this.gridHeaderElement.show();var i=(e=t.header).find("th.app-datagrid-header-cell"),o=n.find("col");i.each((function(){var e=Number($(this).attr("data-col-id")),t=r.preparedHeaderData[e],n=$(o[e]);t&&(_.isUndefined(t.show)||t.show||($(this).hide(),n.hide()))})),this.options.isMobile,this.tableContainer.append(n),e.on("click",".app-datagrid-header-cell input:checkbox",(function(e){var t=$('tr.app-datagrid-row:not(.always-new-row):visible td input[name="gridMultiSelect"]:checkbox',r.gridElement),n=this.checked;t.prop("checked",n),t.each((function(){var t=$(this).closest("tr.app-datagrid-row"),i=t.attr("data-row-id"),o=r.options.data[i];r.options.assignSelectedItems(o,e,{rowId:i,_selected:r.preparedData[i]?._selected}),r.toggleRowSelection(t,n,e,!0),n&&_.isFunction(r.options.onRowSelect)&&r.options.onRowSelect(o,e),!n&&_.isFunction(r.options.onRowDeselect)&&r.options.onRowDeselect(o,e)}))})),_.isFunction(this.options.onHeaderClick)&&this.gridHeaderElement.find("th.app-datagrid-header-cell").on("click",this.headerClickHandler.bind(this)),!this.options.isMobile&&this.gridHeaderElement.length&&this.gridHeaderElement.find("th[data-col-resizable]").resizable({handles:"e",minWidth:50,resize:function(e,t){var n,i,o,s,a=+t.helper.attr("data-col-id")+1,l=t.helper.width(),u=t.size.width;i=r.tableContainer.find("colgroup > col:nth-child("+a+")"),n=r.tableContainer.find("colgroup > col:nth-child("+a+")"),o=r.gridElement.find("tr.app-datagrid-row > td:nth-child("+a+") > div"),n.width(u),i.width(u),o.width(u),$(this).css("height","auto"),u>t.originalSize.width&&(s=r.gridHeaderElement.width()+u-l,r.gridHeaderElement.width(s),r.gridElement.width(s)),r.addOrRemoveScroll(),r.options.redrawWidgets()}}),this.isResetSortIconsDone||this.setSortIconDefault()},addOrRemoveScroll:function(){var e=this.gridContainer.find("tbody"),t=this.gridContainer.find(".table-header");e.scrollHeight>e.clientHeight&&!this.Utils.isMac()?t.addClass("scroll-visible"):t.removeClass("scroll-visible")},_handleCustomEvents:function(e,t){this.options.handleCustomEvents(e,t)},_setActionsEnabled:function(){var e=this;_.forEach(this.options.rowActions,(function(t){_.includes(t.action,"editRow(")?e.options.actionsEnabled.edit=!0:_.includes(t.action,"deleteRow(")&&(e.options.actionsEnabled.delete=!0)}))},_appendRowActions:function(e,t,n){var r,i=this._getRowActionsColumnDef();(this.options.rowActions.length||i)&&(this._setActionsEnabled(),r=this,e.find("[data-identifier='actionButtons']").each((function(e){var i,o,s,a=e;t?i=n:(o=$(this).closest("tr.app-datagrid-row"),s=parseInt(o.attr("data-row-id"),10),(i=_.clone(r.options.data[s])).$index=a+1),r.options.generateRowActions(i,a),$(this).empty().append(r.options.getRowAction(a))})))},_renderGrid:function(e){var t,n=this.options.isNavTypeScrollOrOndemand();this.getPageStartIndex();if($("table.table-bordered").parents(".app-grid-header-inner").addClass("table_border"),n){var r=this.gridElement,i=this._getGridTemplate();t=$(i),i&&!r.length&&this.gridElement.append(t)}else{var o=this._getGridTemplate();t=$(o),o&&this.gridElement.append(t)}if(this.options.summaryRow){var s=$(this._getSummaryRowTemplate());this.tableContainer.find("tfoot").remove(),this.options.data.length&&this.tableContainer.append(s)}this.options.data.length||"nodata"!==this.dataStatus.state?(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,e)):this.setStatus("nodata"),this.gridBody=this.gridElement.find("tbody"),this.gridFooter=this.tableContainer.find("tfoot"),this._findAndReplaceCompiledTemplates(),this.options.clearRowActions(),this._appendRowExpansionButtons(t),this._appendRowActions(t),this.attachEventHandlers(t),this.__setStatus(e),this.options.editmode===this.CONSTANTS.QUICK_EDIT&&this.options.showNewRow&&this.addNewRow(!1,!0),e&&this._setColSpan(this.options.headerConfig),_.isFunction(this.options.onDataRender)&&this.options.onDataRender(),!e&&this.options.selectFirstRow&&(this.options.multiselect&&(this.options.selectFirstRow=!1),this.gridElement.find("tr.app-datagrid-row.active").length<=0&&this.selectFirstRow(!0,!0))},_render:function(e){this.tableId||(this.tableId=this.Utils.generateGuid());!this.options.isNavTypeScrollOrOndemand()||"100%"!==this.options.height&&this.options.height;var t='<div class="overlay"><div class="status"><i class="'+this.options.loadingicon+'"></i><span class="message"></span></div></div>',n='<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>',r=$(t),i=this.element.find(".table-container");this.gridContainer=$(n),this.gridHeaderElement=this.gridContainer.find(".table-header"),this._setStyles(r.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"),(!this.options.isNavTypeScrollOrOndemand()||i.length&&this.options.isNextPageData)&&this.options.isNavTypeScrollOrOndemand()||(this.element.find(".table-container").remove(),this.element.append(this.gridContainer)),this.options.setIsNextPageData(!1),this.gridContainer.find(".overlay").length||(this.dataStatusContainer=$(t),this.gridContainer.append(this.dataStatusContainer)),this.gridHeaderElement&&(this.gridHeaderElement.empty(),this.gridElement.find("colgroup").remove()),this._renderHeader(),this.options.filtermode===this.CONSTANTS.SEARCH&&(_.isEmpty(this.searchObj)||this.searchObj&&!this.searchObj.field&&!this.searchObj.value)?this._renderSearch():this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this._renderRowFilter(),"condensed"===this.options.spacing&&this._toggleSpacingClasses("condensed"),this._renderGrid(e),this.addNavigationControls()},addNavigationControls:function(){this.options.isdynamictable&&(this.element.find(".on-demand-datagrid").remove(),"On-Demand"!==this.options.navigation||this.element.find(".on-demand-datagrid").length?"Scroll"===this.options.navigation&&this.options.bindScrollEvt():this.options.addLoadMoreBtn())},__setStatus:function(e){var t=this.dataStatusContainer.find("i"),n=this.dataStatus.state,r=this.options.isNavTypeScrollOrOndemand();this.dataStatusContainer.find(".message").text(this.dataStatus.message),"loading"===n?t.removeClass("hidden"):t.addClass("hidden"),"ready"===n?this.dataStatusContainer.hide():(this.options.isNavTypeScrollOrOndemand()&&("nodata"===n||this.options.getCurrentPage()==this.options.getPageCount()&&!this.options.showviewlessbutton)&&this.element.find(".on-demand-datagrid a").hide(),this.dataStatusContainer.show()),"nodata"===n||"loading"===n||"error"===n?("100%"!==this.options.height&&"auto"!==this.options.height||("nodata"===n?(this.dataStatusContainer.css("height","auto"),this.dataStatus.contentHeight=0):this.options.isNavTypeScrollOrOndemand()&&this.options.getCurrentPage()>1?this.dataStatusContainer.hide():(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))),(!r||r&&1===this.options.getCurrentPage())&&this.gridContainer.addClass("show-msg")):(this.gridContainer.removeClass("show-msg"),this.options.editmode===this.CONSTANTS.QUICK_EDIT&&(this.options.activeRow&&this.attachHandlersToActiveRow(this.options.activeRow),this.options.activeRow=void 0)),e||this.setColGroupWidths(),this.addOrRemoveScroll()},attachHandlersToActiveRow(e){var t=this.Utils.getObjectIndex(this.options.data,e),n=this.gridElement.find("tr.app-datagrid-row[data-row-id="+t+"]");n.length&&(n.hasClass("active")||n.addClass("active"),this.focusActiveRow(),this.attachEventHandlers(n))},setActiveRow(e){this.options.activeRow=e},setStatus:function(e,t,n){var r;"nodata"===e&&(e=(r=this.gridElement&&this.gridElement.find("tr.app-datagrid-row.always-new-row"))&&r.length?"ready":e),this.dataStatus.state=e,this.options.setGridState(e),this.dataStatus.message=t||this.options.dataStates[e],this._setStatusCalled?this._setStatus(n):(this.__setStatus(n),this._setStatusCalled=!0)},setGridDimensions:function(e,t){if(-1===t.indexOf("px")&&-1===t.indexOf("%")&&-1===t.indexOf("em")&&"auto"!=t&&(t+="px"),this.options[e]=t,"height"===e){this.gridHeaderElement.find("th");this.gridContainer.find(".app-grid-header-inner").css(e,t),this.options.isNavTypeScrollOrOndemand()&&"100%"!=this.options.height&&"auto"!=this.options.height&&this.gridContainer.find(".app-grid-header-inner").css("overflow","auto"),this.dataStatusContainer.css(e,t)}this.addOrRemoveScroll()},setColumnProp:function(e,t,n,r){var i;"displayName"===t&&((i=r?this.gridHeaderElement.find('th[data-col-group="'+e+'"]'):this.gridHeaderElement.find('th[data-col-field="'+e+'"]')).attr("title",n),i.find(".header-data").html(n),this.options.filtermode===this.CONSTANTS.SEARCH&&this.gridSearch&&this.gridSearch.find('select option[value="'+e+'"]').text(n))},applyRowNgClass:function(e,t){var n=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+t+'"]');n.removeClass(e.toRemove),n.addClass(e.toAdd)},applyColNgClass:function(e,t,n){var r=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+t+'"] td.app-datagrid-cell[data-col-id="'+n+'"]');r.removeClass(e.toRemove),r.addClass(e.toAdd)},_destroy:function(){this.element.text(""),window.clearTimeout(this.refreshGridTimeout)}}),window.requestAnimationFrame=function(){"use strict";return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimaitonFrame||function(e){window.setTimeout(e,1e3/60)}}(),function(e){"use strict";var t,n,r={NONE:0,HORIZONTAL:1,LEFT_TO_RIGHT:2,RIGHT_TO_LEFT:3,VERTICAL:4,TOP_TO_DOWN:5,DOWN_TO_TOP:6},i=Math.abs,o=Math.max,s=["INPUT","SELECT","OPTION"],a=e("<div></div>");a.css({"background-color":"rgba(0, 0, 0, 0)",position:"fixed",top:0,width:"100vw",height:"100vh","z-index":1e5});var l=[],u=[],c=null,d=function(t){t&&(t.pointerId&&t.pointerId!==c||t.touches&&t.touches.length>1)&&h(t),e.each(l,(function(e,n){return n(t)}))},h=function(t){c=null,e.each(u,(function(e,n){return n(t)})),l.length=0,u.length=0};function p(e,t,n){(e.__zone_symbol__addEventListener||e.addEventListener).call(e,t,n,{passive:!0})}function f(t,n,r){var i=function(t){for(var r=n;r;)t.push({$ele:e(r),last:{scrollLeft:r.iscroll?r.iscroll.x:r.scrollLeft,scrollTop:r.iscroll?r.iscroll.y:r.scrollTop}}),r=r.parentElement;return t}([]);this.hasSrcolled=function(){return r===e.fn.swipey.DIRECTIONS.VERTICAL?(e.each(i,(function(){this.$ele[0].iscroll?isNaN(this.$ele[0].iscroll.y)||0===this.$ele[0].iscroll.y||(t=!0):0!==this.$ele[0].scrollTop&&(t=!0)})),t):r===e.fn.swipey.DIRECTIONS.HORIZONTAL?function(){var t;return e.each(i,(function(){this.$ele[0].iscroll?isNaN(this.$ele[0].iscroll.x)||0===this.$ele[0].iscroll.x||(t=!0):0!==this.$ele[0].scrollLeft&&(t=!0)})),t}():void 0;var t}}function m(e){return e.originalEvent&&"mouse"!==e.originalEvent.pointerType?e.originalEvent:e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches[0]||e&&e.touches&&e.touches[0]||e}function g(e,t,n){var s,a,l=0;return n===r.HORIZONTAL?l=t.x-e.x:n===r.LEFT_TO_RIGHT?l=o(t.x-e.x,0):n===r.RIGHT_TO_LEFT?l=o(e.x-t.x,0):n===r.VERTICAL?l=t.y-e.y:n===r.TOP_TO_DOWN?l=o(t.y-e.y,0):n===r.DOWN_TO_TOP?l=o(e.y-t.y,0):(s=t.x-e.x,a=t.y-e.y,l=o(i(s),i(a)),(s<0&&i(s)===l||a<0&&i(a)===l)&&(l=-l)),l}function v(e,r){var i=m(e);i&&r.data.path.push({x:i.pageX,y:i.pageY}),n.push((function(){t.onSwipeEnd(e,r.data),r.onSwipeEnd.call(r.target,e,r.data)})),n.process()}function y(r,o){var s,c,d,h=m(r),p=o.data.path[0],f={x:h.pageX,y:h.pageY};return d=g(p,f,o.direction),o.data.length=d<0?-1:1,o.lastDistance=o.data.length,o.data.path=[f],o.data.totalLength=i(o.data.length),o.data.startTime=Date.now(),!1!==o.onSwipeStart.call(o.target,r,o.data)&&(a.appendTo(e("body")),s=function(r){!function(r,o){var s,a,l=m(r),u=o.data.path[0],c={x:l.pageX,y:l.pageY},d=g(u,c,o.direction),h=[];if(o.renderInProgress=!1,d!==o.lastDistance){s=30*(d<o.lastDistance?-1:1),a=d-o.lastDistance;for(var p=s;s>0&&p<=a||s<0&&p>=a;p+=s)h.push(p+o.lastDistance);a%s!=0&&h.push(a%i(s)+(0===h.length?o.lastDistance:h[h.length-1])),o.lastDistance=d,e.each(h,(function(){var e=this;n.push((function(){o.data.length=e,o.data.totalLength+=i(e),o.data.velocity=i(o.data.totalLength/(Date.now()-o.data.startTime)),o.data.path.push(c),!1===o.onSwipe.call(o.target,r,o.data)&&v(r,o),t.onSwipe(r,o.data)}))})),n.process()}}(r,o)},c=function(e){a.remove(),v(e,o)},(l=[]).push(s),(u=[]).push(c),t.onSwipeStart(r,o.data),!0)}function b(e,t){var n=t.data.path[0],o={x:e.pageX,y:e.pageY},s=g(n,o,t.direction);return i(s)>t.threshold&&function(e,t,n){if(n===r.HORIZONTAL){if(Math.abs((t.y-e.y)/(t.x-e.x))<=.36397023426)return!0}else if(n===r.VERTICAL&&Math.abs((t.y-e.y)/(t.x-e.x))>=2.74747741945)return!0;return!1}(n,o,t.direction)}function w(e){var t=e.bindEvents,n="";_.includes(t,"touch")?n+="touchstart":_.includes(t,"mouse")?n+="mousedown":_.includes(t,"pointer")&&(n+="pointerdown"),n&&p(e.target[0],n,(function(t){if(!e.disableMouse||"mouse"!==t.pointerType){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(s.indexOf(t.target.tagName)<0))return;t.preventDefault()}var n=m(t);n&&function(e,t){var n;t.scrollObserver=new f(event.currentTarget,event.target,t.direction),n=function(e){if(b(m(e),t)&&(t.scrollObserver.hasSrcolled()||y(e,t)))return!1},l.push(n),t.data={path:[{x:e.pageX,y:e.pageY}]}}(n,e)}}))}window.PointerEvent&&function(){if(/iP(hone|od|ad)/.test(navigator.platform)){var e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return parseInt(e[1],10)}}()>=13?(p(document,"pointerdown",(function(e){c&&c!==e.pointerId?h(e):c=e.pointerId})),p(document,"pointermove",d),p(document,"pointerup",h),p(document,"pointercancel",h)):(p(document,"mousemove",d),p(document,"touchmove",d),p(document,"mouseup",h),p(document,"touchcancel",h),p(document,"touchend",h)),n=new function(){var e=[],t=!1;function n(){if(e.length>0){try{e.shift()()}catch(e){console.error("Function invocation failed",e)}window.requestAnimationFrame(n)}else t=!1}this.push=function(t){e.push(t)},this.process=function(){t||(t=!0,n())}},e.fn.swipey=function(t){return this.each((function(){w(e.extend({direction:r.NONE,target:e(this),bindEvents:["touch","mouse"],swipeTarget:document,threshold:30,onSwipeStart:e.noop,onSwipe:e.noop,onSwipeEnd:e.noop,disableMouse:!0},t))})),this},t={onSwipeStart:function(t,n){if(e.fn.swipey.trace){var r='<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'+n.path[0].x+" "+n.path[0].y+' " /> </svg>';r.css({position:"fixed",top:0,left:0,width:"100vw",height:"100vh","z-index":1e4}),e("body").append(r),n.tracer={pathd:e("#canvas path")}}},onSwipe:function(e,t){if(t.tracer){var n=t.tracer.pathd.attr("d"),r=t.path[t.path.length-1];t.tracer.pathd.attr("d",n+" L"+r.x+" "+r.y+" ")}},onSwipeEnd:function(t,n){if(n.tracer){var r=n.path[0],i=[r,{y:r.y-50},{x:r.x+50},{y:r.y+50}],o=0;_.forEach(n.path,(function(e){var t;o!==i.length&&(!(t=i[o]).x||t.x<=e.x)&&(!t.y||t.y<=e.y)&&o++})),setTimeout((function(){e("body >#canvas").remove()}),500)}}},e.fn.swipey.DIRECTIONS=r}(jQuery),function(e){var t,n=/\$\{\{[a-zA-Z\+-/%\.\*\s\(\)\d,\\'"\$_]*\}\}/;function r(r){var i,o=[];if(t=t||(e.fn.swipeAnimation.expressionEvaluator?e.fn.swipeAnimation.expressionEvaluator:window.exprEval&&window.exprEval.Parser?function(e){var t=(new window.exprEval.Parser).parse(e);return function(e){return t.evaluate(e)}}:void 0),_.isFunction(r))return r;if(t){for(;null!==(i=n.exec(r));){var s=i[0],a=r.substring(0,i.index);r=r.substring(i.index+s.length),s=s.substring(3,s.length-2),o.push(a),o.push(t(s).bind({}))}return o.push(r),function(){var e=arguments;return _.map(o,(function(t){return _.isFunction(t)?t.apply(void 0,e):t})).join("")}}}function i(e,t,n){return _.isFunction(e)?e.apply(t,n):e}function o(e,t,n){var r=0,o=i(t.bounds,e,n);return _.isUndefined(o.center)||(r=o.center),_.isUndefined(o.lower)||(o.lower=o.lower+r),_.isUndefined(o.upper)||(o.upper=o.upper+r),o}function s(e){_.forEach(e.animation,(function(e){(_.isFunction(e.target)||e.targetFn)&&(e.targetFn=_.isUndefined(e.targetFn)?e.target:e.targetFn,e.target=e.targetFn())}))}function a(){this.setSettings=function(e,t){t.data("swipeAnimationDefaults",e)},this.getSettings=function(e){return e.data("swipeAnimationDefaults")}}function l(t,n,r,i,o,s){_.forEach(t.animation,(function(t){t.target&&(t.target.length>1?t.target.each((function(r){n.$i=r,e(this).css(_.mapValues(t.css,(function(e,t){return e(n)})))})):(n.$i=0,t.target.css(_.mapValues(t.css,(function(e,t){return e(n)})))),t.target.css({transition:"all ease-out "+r+"ms"}),t.target.one("webkitTransitionEnd transitionend",(function(){t.target.css({transition:""})})))})),setTimeout((function(){window.requestAnimationFrame((function(){n.$D===n.bounds.lower?t.onLower.call(i,s):n.$D===n.bounds.upper&&t.onUpper.call(i,s),t.onAnimation(s,o)}))}),r)}var u={gotoUpper:function(){c(this,"upper",arguments[1])},gotoLower:function(e){c(this,"lower",arguments[1])}};function c(e,t,n){var r,u=(new a).getSettings(e),c={},d=o(e,u);s(u),n=n||300,r=i(u.context,e),(c=_.extend({},r)).$d=0,c.$D="lower"===t?d.lower:d.upper,c.bounds=d,l(u,c,n,e)}function d(t,n){var u={$D:0},c={max:Math.max,min:Math.min,abs:Math.abs};if(!_.isArray(n.animation)){var d=n.animation.target||t,h=n.animation.css||n.animation;delete h[t],n.animation=[{target:d,css:h}]}_.forEach(n.animation,(function(e){e.css=_.mapValues(e.css,(function(e,t){return r(e)}))})),(new a).setSettings(n,t),t.swipey({direction:n.direction,threshold:n.threshold,bindEvents:n.bindEvents,target:n.target,onSwipeStart:function(e,r){var a,l,d,h;if(u.$d=0,u.bounds=o(this,n,[e,r.length]),_.isUndefined(u.bounds.center)?u.$D=0:u.$D=u.bounds.center,a=u.$D+r.length,u.bounds.strictLower=!(!1===u.bounds.strict||!1===u.bounds.strictLower),u.bounds.strictUpper=!(!1===u.bounds.strict||!1===u.bounds.strictUpper),!n.enableGestures()||u.bounds.strictLower&&(_.isUndefined(u.bounds.lower)&&r.length<0||!_.isUndefined(u.bounds.lower)&&u.bounds.lower>a)||u.bounds.strictUpper&&(_.isUndefined(u.bounds.upper)&&r.length>0||!_.isUndefined(u.bounds.upper)&&u.bounds.upper<a))return!1;u.vc=(l=0,d=0,h=0,{addDistance:function(e){var t=Date.now();return Math.abs(e-l)>10&&t!==d&&(h=(e-l)/(t-d),l=e,d=t),h=h<0?Math.min(h,-1):Math.max(h,1),this},getVelocity:function(){return h},getTime:function(e){return Math.abs(e/h)}}),u.context=_.extend(c,i(n.context,t)),u.localState=_.extend({},u.context),s(n),_.forEach(n.animation,(function(e){e.target&&e.target.css({transition:"none"})}))},onSwipe:function(t,r){var i=u.localState,o=u.$D+r.length;i.$d=r.length,i.$D=u.$D,u.bounds.strictLower&&!_.isUndefined(u.bounds.lower)&&u.bounds.lower>o?i.$d=u.bounds.lower-u.$D:u.bounds.strictUpper&&!_.isUndefined(u.bounds.upper)&&u.bounds.upper<o&&(i.$d=u.bounds.upper-u.$D),u.vc.addDistance(r.length),_.forEach(n.animation,(function(t){t.target&&(t.target.length>1?t.target.each((function(n){i.$i=n,e(this).css(_.mapValues(t.css,(function(e,t){return e(i)})))})):(i.$i=0,t.target.css(_.mapValues(t.css,(function(e,t){return e(i)})))))}))},onSwipeEnd:function(e,r){var i,o=u.localState,s=u.$D+r.length,a=u.vc.getVelocity();o.$d=r.length,o.$D=u.$D,!_.isUndefined(u.bounds.lower)&&a<=0&&u.$D>s?o.$D=u.bounds.lower:!_.isUndefined(u.bounds.upper)&&a>=0&&u.$D<s&&(o.$D=u.bounds.upper),o.$d=0,o.bounds=u.bounds,u.$D=o.$D,i=u.vc.getTime(o.$D-s),l(n,o,i,t,s,e)}})}e.fn.swipeAnimation=function(t){return u[t]?u[t].apply(this,arguments):(this.each((function(){d(e(this),e.extend({direction:e.fn.swipey.DIRECTIONS.HORIZONTAL,target:e(this),threshold:30,enableGestures:function(){return!0},bindEvents:["touch"],bounds:{},context:{},animation:{},onLower:e.noop,onUpper:e.noop,onAnimation:e.noop},t))})),this)}}(jQuery),function(e){function t(e,t){if(!(e.originalEvent.touches.length>1)){$(e.target).is("input")||$(e.target).is("textarea")||$(e.target).is("select")||$(e.target).is("button")||$(e.target).is("option")?e.stopPropagation():e.preventDefault();var n=e.originalEvent.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent(t,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(r)}}if(e.support.touch="ontouchend"in document,e.support.touch){var n,r=e.ui.mouse.prototype,i=r._mouseInit,o=r._mouseDestroy;r._touchStart=function(e){!n&&this._mouseCapture(e.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,t(e,"mouseover"),t(e,"mousemove"),t(e,"mousedown"))},r._touchMove=function(e){n&&(this._touchMoved=!0,t(e,"mousemove"))},r._touchEnd=function(e){n&&(t(e,"mouseup"),t(e,"mouseout"),this._touchMoved||t(e,"click"),n=!1)},r._mouseInit=function(){var t=this;t.element.bind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),i.call(t)},r._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),o.call(t)}}}(jQuery),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.wm_common_variables=t():e.wm_common_variables=t()}(window,(()=>(()=>{var e={"./node_modules/@metrichor/jmespath/dist/jmespath.esm.js":
614
614
  /*!***************************************************************!*\
615
615
  !*** ./node_modules/@metrichor/jmespath/dist/jmespath.esm.js ***!
616
616
  \***************************************************************/
@@ -1486,7 +1486,7 @@ i.version="2.30.1",o(Zn),i.fn=uo,i.min=er,i.max=tr,i.now=nr,i.utc=m,i.unix=co,i.
1486
1486
  /*!*******************************************************!*\
1487
1487
  !*** ./src/manager/variable/live-variable.manager.ts ***!
1488
1488
  \*******************************************************/
1489
- (e,t,n)=>{"use strict";n.r(t),n.d(t,{LiveVariableManager:()=>g});var r,i=n(/*! ../../util/utils */"./src/util/utils.ts"),o=n(/*! ./base-variable.manager */"./src/manager/variable/base-variable.manager.ts"),s=n(/*! ./../../util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),a=n(/*! ../../util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),l=n(/*! ../../util/inflight-queue */"./src/util/inflight-queue.ts"),u=n(/*! ../../constants/variables.constants */"./src/constants/variables.constants.ts"),c=n(/*! ../../util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts"),d=n(/*! ../../model/base-variable */"./src/model/base-variable.ts"),h=n(/*! lodash */"./node_modules/lodash/lodash.js"),p=n.n(h),f=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=[],g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.getFilterExprFields=function(e){var t=!1;return a.LiveVariableUtils.traverseFilterExpressions(e,(function(e,n){if(n&&n.required&&-1===p().indexOf(["null","isnotnull","empty","isnotempty","nullorempty"],n.matchMode)&&""===n.value)return t=!0,!1})),t?!t:e},t.getDataFilterObj=function(e){return t=e,{getFilterFields:function(){return t},getCriteria:function(e){var n=[];return a.LiveVariableUtils.traverseFilterExpressions(t,(function(t,r){e===r.target&&n.push(r)})),n}};var t},t}return f(t,e),t.prototype.initFilterExpressionBinding=function(e){var t=e._context;t.registerDestroyListener?t.registerDestroyListener.bind(t):p().noop},t.prototype.updateDataset=function(e,t,n,r){e.pagination=r,e.dataSet=t,Object.defineProperty(e.dataSet,"data",{get:function(){return e.dataSet}}),Object.defineProperty(e.dataSet,"pagination",{get:function(){return e.pagination}})},t.prototype.setVariableOptions=function(e,t){e._options=e._options||{},e._options.orderBy=t&&t.orderBy,e._options.filterFields=t&&t.filterFields,e._options.logicalOp=t&&t.logicalOp},t.prototype.handleError=function(e,t,n,r,o){var a;(0,i.triggerFn)(t,n),(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.RESULT,e,n,o),r.skipDataSetUpdate||this.updateDataset(e,m,e.propertiesMap,null),a=this.prepareCallbackOptions(r.errorDetails),(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.ERROR,e,n,a),e.canUpdate=!0,(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,e,n,o)},t.prototype.makeCall=function(e,t,n){var r=this;return new Promise((function(i,o){var a=(0,c.generateConnectionParams)(n,t);a={url:a.url,method:a.method,data:a.data,headers:a.headers},n.operation=t,r.httpCall(a,e,n).then((function(e){!function(e,t){(e&&e.type||e&&e.status)&&t(e)}(e,i)}),(function(t){!function(t,n){var i=(0,s.getErrMessage)(t,e.httpService.getLocale());r.notifyInflight(e,!1),n({error:i,details:t})}(t,o)}))}))},t.prototype.getEntityData=function(e,t,n,r){var o,c,h,f,m,g,v,y,_,b=this,w={};m=this.getFilterExprFields((0,i.getClonedObject)(e.filterExpressions||{})),h=(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE,e,this.getDataFilterObj(m),t);var x=p().isObject(h)?(0,i.getClonedObject)(h):void 0;return!1===h?(l.$queue.process(e),(0,i.triggerFn)(r,"Call stopped from the event: "+u.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE),Promise.reject("Call stopped from the event: "+u.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE)):(e.canUpdate=!1,o=a.LiveVariableUtils.prepareTableOptions(e,t,p().isObject(h)?h:m),t.searchWithQuery?(c="searchTableDataWithQuery",g=o.query?"q="+o.query:""):(c=o.filter&&o.filter.length?"searchTableData":"readTableData",g=o.filter),v={projectID:u.$rootScope.project.id,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:e.type,page:t.page||1,size:t.pagesize||(u.CONSTANTS.isRunMode?e.maxResults||20:e.designMaxResults||20),sort:o.sort,data:g,filter:a.LiveVariableUtils.getWhereClauseGenerator(e,t,x),url:e.getPrefabName()?u.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():u.$rootScope.project.deployedUrl},y=function(o,l){if(o&&(o.type||o.status)){o=o.body||o.data,w.data=o.content,w.pagination=p().omit(o,"content");var c=b.prepareCallbackOptions(o,{pagination:w.pagination});return o&&o.error||!o||!p().isArray(o.content)?(b.handleError(e,r,o.error,t,c),Promise.reject(o.error)):((0,s.decodeData)(o.content),a.LiveVariableUtils.processBlobColumns(o.content,e),t.skipDataSetUpdate||((0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.RESULT,e,w.data,c),(f=(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA,e,w.data,c))&&(w.data=f),b.updateDataset(e,w.data,e.propertiesMap,w.pagination),b.setVariableOptions(e,t),e.notify(d.VariableEvents.AFTER_INVOKE,[b,w.data]),setTimeout((function(){(0,i.triggerFn)(n,w.data,e.propertiesMap,w.pagination),(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.SUCCESS,e,w.data,c),e.canUpdate=!0,(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,e,w.data,c)}))),l({data:w.data,pagination:w.pagination}))}},_=function(n,i){return b.setVariableOptions(e,t),b.handleError(e,r,n.error,p().extend(t,{errorDetails:n.details})),i(n.error)},new Promise((function(t,n){b.makeCall(e,c,v).then((function(e){y(e,t)}),(function(e){_(e,n)}))})))},t.prototype.performCUD=function(e,t,n,r,o){var s=this;return(n=n||{}).inputFields=n.inputFields||(0,i.getClonedObject)(t.inputFields),l.$queue.submit(t).then((function(){return s.notifyInflight(t,!n.skipToggleState),s.doCUD(e,t,n,r,o).then((function(e){return l.$queue.process(t),s.notifyInflight(t,!1,e),Promise.resolve(e)}),(function(e){return l.$queue.process(t),s.notifyInflight(t,!1,e),Promise.reject(e)}))}),o)},t.prototype.doCUD=function(e,t,n,r,o){var c,h,f,m,g,v,y,_,b=this,w=u.$rootScope.project.id||u.$rootScope.projectName,x=a.LiveVariableUtils.getPrimaryKey(t),k=window.File&&window.FileReader&&window.FileList&&window.Blob,S="",T={},E={},D={},C=n.inputFields||t.inputFields;if(g=(0,i.getClonedObject)(C),!1===(v=(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE,t,g,n)))return(0,i.triggerFn)(o),Promise.reject("Call stopped from the event: "+u.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE);switch(C=p().isObject(v)?v:g,t.canUpdate=!1,n.row?(T=n.row,p().forEach(T,(function(e,n){var r,o=a.LiveVariableUtils.getFieldType(n,t);(0,i.isDateTimeType)(o)?(r=(0,s.formatDate)(e,o,t.dateFormatter),T[n]=r):p().isArray(e)&&a.LiveVariableUtils.isStringType(o)&&(r=p().join(e,","),T[n]=r)})),p().forEach(C,(function(e,t){!(0,i.isDefined)(e)||""===e||(0,i.isDefined)(T[t])&&""!==T[t]||(T[t]=e)}))):p().forEach(C,(function(n,r){var o,l=t.propertiesMap.primaryFields||t.propertiesMap.primaryKeys;p().isUndefined(n)||""===n||("deleteTableData"===e&&(S=n),"updateTableData"===e&&l.forEach((function(e){r===e&&(S=n)})),("deleteTableData"!==e||a.LiveVariableUtils.isCompositeKey(x))&&(o=a.LiveVariableUtils.getFieldType(r,t),(0,i.isDateTimeType)(o)?n=(0,s.formatDate)(n,o,t.dateFormatter):p().isArray(n)&&a.LiveVariableUtils.isStringType(o)&&(n=p().join(n,",")),T[r]=n),p().isObject(n)&&!p().isArray(n)&&p().forEach(n,(function(e,i){"blob"===a.LiveVariableUtils.getFieldType(r,t,i)&&(n[i]=null===e?e:"")})))})),e){case"updateTableData":h=n.prevData||{},a.LiveVariableUtils.isCompositeKey(x)?(a.LiveVariableUtils.isNoPrimaryKey(x)?(D=h||n.rowData||T,E=T):x.forEach((function(e){E[e]=T[e],n.period?D[e]=T[e]:D[e]=h[e]||n.rowData&&n.rowData[e]||T[e]})),n.row=E,n.compositeKeysData=D):(x.forEach((function(e){-1===e.indexOf(".")?f=h[e]||n.rowData&&n.rowData[e]||T[e]:(m=e.split("."),f=h[m[0]][m[1]])})),n.id=f,n.row=T);break;case"deleteTableData":a.LiveVariableUtils.isCompositeKey(x)?(a.LiveVariableUtils.isNoPrimaryKey(x)?E=T:x.forEach((function(e){E[e]=T[e]})),n.compositeKeysData=E):p().isEmpty(T)||(x.forEach((function(e){-1===e.indexOf(".")?f=T[e]:(m=e.split("."),f=T[m[0]][m[1]])})),n.id=f)}if(("updateTableData"===e||"insertTableData"===e)&&a.LiveVariableUtils.hasBlob(t)&&k&&(e="updateTableData"===e?"updateMultiPartTableData":"insertMultiPartTableData",T=a.LiveVariableUtils.prepareFormData(t,T)),n.compositeKeysData){switch(e){case"updateTableData":e="updateCompositeTableData";break;case"deleteTableData":e="deleteCompositeTableData";break;case"updateMultiPartTableData":e="updateMultiPartCompositeTableData"}S=a.LiveVariableUtils.getCompositeIDURL(n.compositeKeysData)}c=t.liveSource,p().isEmpty(T)&&"deleteTableData"===e&&(T=void 0),"updateCompositeTableData"!==e&&"deleteCompositeTableData"!==e||!n.period||(e="period"+e.charAt(0).toUpperCase()+e.substr(1));var M={projectID:w,service:t._prefabName?"":"services",dataModelName:c,entityName:t.type,id:p().isUndefined(n.id)?S:encodeURIComponent(n.id),data:T,url:t._prefabName?u.$rootScope.project.deployedUrl+"/prefabs/"+t._prefabName:u.$rootScope.project.deployedUrl};return y=function(e,r){var a=e.error,l=b.prepareCallbackOptions(e);(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.RESULT,t,a,l),n.skipNotification||(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.ERROR,t,a,l),t.canUpdate=!0,(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,t,a,l),(0,i.triggerFn)(o,a),r(a)},_=function(e,n){var a=e.body||e.data,c=b.prepareCallbackOptions(e);if(l.$queue.process(t),a&&a.error)return(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.RESULT,t,a,c),(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.ERROR,t,a.error,c),t.canUpdate=!0,(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,t,a.error,c),(0,i.triggerFn)(o,a.error),Promise.reject(a.error);if((0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.RESULT,t,a,c),"read"!==t.operation){var h=(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA,t,a,c);h&&(a=h),t.dataSet=a}t.notify(d.VariableEvents.AFTER_INVOKE,[b,a]),setTimeout((function(){(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.SUCCESS,t,a,c),t.canUpdate=!0,(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,t,a,c)})),(0,i.triggerFn)(r,a),n(a)},new Promise((function(n,r){b.makeCall(t,e,M).then((function(e){_(e,n)}),(function(e){y(e,r)}))}))},t.prototype.aggregateData=function(e,t,n,r,o){var s,l,u,c,d=this;return(n=n||{}).skipEncode=!0,t.filterFields&&(s=a.LiveVariableUtils.prepareTableOptions(t,n),n.aggregations.filter=s.query),l={dataModelName:t.liveSource,entityName:t.type,page:n.page||1,size:n.size||t.maxResults,sort:n.sort||"",url:e,data:n.aggregations},u=function(e,t){if(e&&e.type){if(e&&e.error||!e)return void(0,i.triggerFn)(o,e.error);(0,i.triggerFn)(r,e),t(e)}},c=function(e,t){(0,i.triggerFn)(o,e),t(e)},new Promise((function(e,n){d.makeCall(t,"executeAggregateQuery",l).then((function(t){u(t,e)}),(function(e){c(e,n)}))}))},t.prototype.listRecords=function(e,t,n,r){var o=this;return(t=t||{}).filterFields=t.filterFields||(0,i.getClonedObject)(e.filterFields),l.$queue.submit(e).then((function(){return o.notifyInflight(e,!t.skipToggleState,void 0,t),o.getEntityData(e,t,n,r).then((function(t){return l.$queue.process(e),o.notifyInflight(e,!1,t),Promise.resolve(t)}),(function(t){return l.$queue.process(e),o.notifyInflight(e,!1,t),Promise.reject(t)}))}),r)},t.prototype.insertRecord=function(e,t,n,r){return this.performCUD("insertTableData",e,t,n,r)},t.prototype.updateRecord=function(e,t,n,r){return this.performCUD("updateTableData",e,t,n,r)},t.prototype.deleteRecord=function(e,t,n,r){return this.performCUD("deleteTableData",e,t,n,r)},t.prototype.setInput=function(e,t,n,r){return e.inputFields=e.inputFields||{},(0,s.setInput)(e.inputFields,t,n,r)},t.prototype.setFilter=function(e,t,n){var r={},i={};return p().isObject(t)?r=t:r[t]=n,e.filterExpressions&&!p().isEmpty(e.filterExpressions)||(e.filterExpressions={condition:"AND",rules:[]}),i=e.filterExpressions,p().forEach(r,(function(e,t){var n=function(e){var t=null;return a.LiveVariableUtils.traverseFilterExpressions(i,(function(n,r){if(e===r.target)return t=r})),t}(t);null!==n?n.value=e:i.rules.push({target:t,type:"",matchMode:"",value:e,required:!1})})),i},t.prototype.download=function(e,t,n,r){var o,l,c,d,h=this;t=t||{};var p={},f=u.$rootScope.project.id||u.$rootScope.projectName;return t.data.searchWithQuery=!0,t.data.skipEncode=!0,o=a.LiveVariableUtils.prepareTableOptions(e,t.data,void 0),p.query=o.query?o.query:"",p.exportSize=t.data.exportSize,p.exportType=t.data.exportType,p.fields=(0,s.formatExportExpression)(t.data.fields),t.data.fileName&&(p.fileName=t.data.fileName),l={projectID:f,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:e.type,sort:o.sort,url:e.getPrefabName()?u.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():u.$rootScope.project.deployedUrl,data:p,filter:a.LiveVariableUtils.getWhereClauseGenerator(e,t)},c=function(e,t){e&&e.type&&(window.location.href=e.body.result,(0,i.triggerFn)(n,e),t(e))},d=function(t,n){var o=h.prepareCallbackOptions(t.details);(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.ERROR,e,t.error,o),(0,i.triggerFn)(r,t.error),n(t)},new Promise((function(t,n){h.makeCall(e,"exportTableData",l).then((function(e){c(e,t)}),(function(e){d(e,n)}))}))},t.prototype.getRelatedTablePrimaryKeys=function(e,t){var n,r,i;if(e.propertiesMap&&(r=p().find(e.propertiesMap.columns||[],{fieldName:t}))){if(i=r.columns,(n=p().map(p().filter(i,"isPrimaryKey"),"fieldName")).length)return n;if(i&&i.length)return(i=p().find(i,{isRelated:!1}))&&i.fieldName}},t.prototype.getRelatedTableData=function(e,t,n,r,o){var l,c,d,h,f,m,g=this,v=u.$rootScope.project.id||u.$rootScope.projectName,y=p().find(e.relatedTables,(function(e){return e.relationName===t||e.columnName===t})),_=p().map(p().filter(e.relatedTables,(function(t){return t.type===e.type})),"relationName"),b=[];if(p().forEach(n.filterFields,(function(n,r){n.fieldName=r,n.type=a.LiveVariableUtils.getFieldType(t,e,r),n.filterCondition!==u.DB_CONSTANTS.DATABASE_MATCH_MODES.in.toLowerCase()&&n.filterCondition!==u.DB_CONSTANTS.DATABASE_MATCH_MODES.between.toLowerCase()||(n.value=n.value.split(",")),b.push(n)})),c=a.LiveVariableUtils.getFilterOptions(e,b,n),d=a.LiveVariableUtils.getSearchQuery(c," "+(n.logicalOp||"AND")+" ",e.ignoreCase),n.filterExpr){var w=(0,i.getClonedObject)(p().isObject(n.filterExpr)?n.filterExpr:JSON.parse(n.filterExpr));a.LiveVariableUtils.processFilterFields(w.rules,e,n);var x=a.LiveVariableUtils.generateSearchQuery(w.rules,w.condition,e.ignoreCase,n.skipEncode);""!==d?""!==x&&(d="("+d+") AND ("+x+")"):""!==x&&(d=x)}return d=d?"q="+d:"",l=p().isEmpty(n.orderBy)?"":"sort="+n.orderBy,h={projectID:v,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:y?y.type:"",page:n.page||1,size:n.pagesize||void 0,url:e.getPrefabName()?u.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():u.$rootScope.project.deployedUrl,data:d||"",filter:a.LiveVariableUtils.getWhereClauseGenerator(e,n),sort:l},f=function(e,t){if(e&&(e.type||e.status)){var n=e.body||e.data,o=p().map(n.content,(function(e){return p().omit(e,_)})),a=Object.assign({},n);delete a.content,(0,s.decodeData)(o);var l={data:o,pagination:a};(0,i.triggerFn)(r,l),t(l)}},m=function(e,t){(0,i.triggerFn)(o,e),t(e)},new Promise((function(t,n){g.makeCall(e,"searchTableDataWithQuery",h).then((function(e){f(e,t)}),(function(e){m(e,n)}))}))},t.prototype.getDistinctDataByFields=function(e,t,n,r){var o,s,l,c,d,h=this,f=u.$rootScope.project.id||u.$rootScope.projectName,m={};return t.skipEncode=!0,t.operation="read",t=t||{},(s=a.LiveVariableUtils.prepareTableOptions(e,t)).query&&(m.filter=s.query),m.groupByFields=p().isArray(t.fields)?t.fields:[t.fields],o=(o=t.sort||m.groupByFields[0]+" asc")?"sort="+o:"",l={projectID:f,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:t.entityName||e.type,page:t.page||1,size:t.pagesize,sort:o,data:m,filter:a.LiveVariableUtils.getWhereClauseGenerator(e,t),url:e.getPrefabName()?u.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():u.$rootScope.project.deployedUrl},c=function(e,t){if(e&&e.type){if(e&&e.error||!e)return(0,i.triggerFn)(r,e.error),Promise.reject(e.error);var o=e.body,s=Object.assign({},e.body);delete s.content,o={data:o.content,pagination:s},(0,i.triggerFn)(n,o),t(o)}},d=function(e,t){(0,i.triggerFn)(r,e),t(e)},new Promise((function(t,n){h.makeCall(e,"getDistinctDataByFields",l).then((function(e){c(e,t)}),(function(){d(r,n)}))}))},t.prototype.getAggregatedData=function(e,t,n,r){var i=s.appManager.getDeployedURL();if(i)return this.aggregateData(i,e,t,n,r)},t.prototype.defineFirstLastRecord=function(e){"read"===e.operation&&(Object.defineProperty(e,"firstRecord",{configurable:!0,get:function(){return p().get(e.dataSet,"data[0]",{})}}),Object.defineProperty(e,"lastRecord",{configurable:!0,get:function(){var t=p().get(e.dataSet,"data",[]);return t[t.length-1]}}))},t.prototype.getPrimaryKey=function(e){return a.LiveVariableUtils.getPrimaryKey(e)},t.prototype.prepareRequestParams=function(e){var t,n=p().split(e.searchKey,","),r=p().split(e.matchMode,","),i={};return p().forEach(n,(function(t,n){i[t]={value:e.query,logicalOp:"AND",matchMode:r[n]||r[0]||"startignorecase"}})),t={filterFields:i,page:e.page,pagesize:e.limit||e.pagesize,skipDataSetUpdate:!0,skipToggleState:!0,inFlightBehavior:"executeAll",logicalOp:"OR",orderBy:e.orderby?p().replace(e.orderby,/:/g," "):""},e.onBeforeservicecall&&e.onBeforeservicecall(i),t},t.prototype.searchRecords=function(e,t,n,r){var i=this.prepareRequestParams(t);return this.listRecords(e,i,n,r)},t.prototype.upgradeInputDataToFilterExpressions=function(e,t,n){p().isObject(t)&&((n=t).condition="AND",n.rules=[]);var r=p().cloneDeep(n.rules);return n.rules=[],p().forEach(n,(function(e,t){if("condition"!==t&&"rules"!==t){var i=p().find(r,(function(e){return e.target===t}));i?(i.value=e.value,i.matchMode=e.matchMode||e.filterCondition||i.matchMode||"",n.rules.push(i)):n.rules.push({target:t,type:"",matchMode:e.matchMode||e.filterCondition||"",value:e.value,required:!1}),delete n[t]}})),n},t.prototype.downgradeFilterExpressionsToInputData=function(e,t){return t.hasOwnProperty("getFilterFields")&&(t=t.getFilterFields()),p().forEach(t.rules,(function(e){p().isNil(e.target)||""===e.target||(t[e.target]={value:e.value,matchMode:e.matchMode})})),t},t.prototype.cancel=function(e,t){l.$queue.requestsQueue.has(e)&&e._observable&&(e._observable.unsubscribe(),l.$queue.process(e),this.notifyInflight(e,!1))},t}(o.BaseVariableManager)},"./src/manager/variable/model-variable.manager.ts":
1489
+ (e,t,n)=>{"use strict";n.r(t),n.d(t,{LiveVariableManager:()=>g});var r,i=n(/*! ../../util/utils */"./src/util/utils.ts"),o=n(/*! ./base-variable.manager */"./src/manager/variable/base-variable.manager.ts"),s=n(/*! ./../../util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),a=n(/*! ../../util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),l=n(/*! ../../util/inflight-queue */"./src/util/inflight-queue.ts"),u=n(/*! ../../constants/variables.constants */"./src/constants/variables.constants.ts"),c=n(/*! ../../util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts"),d=n(/*! ../../model/base-variable */"./src/model/base-variable.ts"),h=n(/*! lodash */"./node_modules/lodash/lodash.js"),p=n.n(h),f=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=[],g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.getFilterExprFields=function(e){var t=!1;return a.LiveVariableUtils.traverseFilterExpressions(e,(function(e,n){if(n&&n.required&&-1===p().indexOf(["null","isnotnull","empty","isnotempty","nullorempty"],n.matchMode)&&""===n.value)return t=!0,!1})),t?!t:e},t.getDataFilterObj=function(e){return t=e,{getFilterFields:function(){return t},getCriteria:function(e){var n=[];return a.LiveVariableUtils.traverseFilterExpressions(t,(function(t,r){e===r.target&&n.push(r)})),n}};var t},t}return f(t,e),t.prototype.initFilterExpressionBinding=function(e){var t=e._context;t.registerDestroyListener?t.registerDestroyListener.bind(t):p().noop},t.prototype.updateDataset=function(e,t,n,r){e.pagination=r,e.dataSet=t,Object.defineProperty(e.dataSet,"data",{get:function(){return e.dataSet}}),Object.defineProperty(e.dataSet,"pagination",{get:function(){return e.pagination}})},t.prototype.setVariableOptions=function(e,t){e._options=e._options||{},e._options.orderBy=t&&t.orderBy,e._options.filterFields=t&&t.filterFields,e._options.logicalOp=t&&t.logicalOp},t.prototype.handleError=function(e,t,n,r,o){var a;(0,i.triggerFn)(t,n),(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.RESULT,e,n,o),r.skipDataSetUpdate||this.updateDataset(e,m,e.propertiesMap,null),a=this.prepareCallbackOptions(r.errorDetails),(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.ERROR,e,n,a),e.canUpdate=!0,(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,e,n,o)},t.prototype.makeCall=function(e,t,n){var r=this;return new Promise((function(i,o){var a=(0,c.generateConnectionParams)(n,t);a={url:a.url,method:a.method,data:a.data,headers:a.headers},n.operation=t,r.httpCall(a,e,n).then((function(e){!function(e,t){(e&&e.type||e&&e.status)&&t(e)}(e,i)}),(function(t){!function(t,n){var i=(0,s.getErrMessage)(t,e.httpService.getLocale());r.notifyInflight(e,!1),n({error:i,details:t})}(t,o)}))}))},t.prototype.getEntityData=function(e,t,n,r){var o,c,h,f,m,g,v,y,_,b=this,w={};m=this.getFilterExprFields((0,i.getClonedObject)(e.filterExpressions||{})),h=(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE,e,this.getDataFilterObj(m),t);var x=p().isObject(h)?(0,i.getClonedObject)(h):void 0;return!1===h?(l.$queue.process(e),(0,i.triggerFn)(r,"Call stopped from the event: "+u.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE),Promise.reject("Call stopped from the event: "+u.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE)):(e.canUpdate=!1,o=a.LiveVariableUtils.prepareTableOptions(e,t,p().isObject(h)?h:m),t.searchWithQuery?(c="searchTableDataWithQuery",g=o.query?"q="+o.query:""):(c=o.filter&&o.filter.length?"searchTableData":"readTableData",g=o.filter),v={projectID:u.$rootScope.project.id,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:e.type,page:t.page||1,size:t.pagesize||(u.CONSTANTS.isRunMode?e.maxResults||20:e.designMaxResults||20),sort:o.sort,data:g,filter:a.LiveVariableUtils.getWhereClauseGenerator(e,t,x),url:e.getPrefabName()?u.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():u.$rootScope.project.deployedUrl},y=function(o,l){if(o&&(o.type||o.status)){o=o.body||o.data,w.data=o.content,w.pagination=p().omit(o,"content");var c=b.prepareCallbackOptions(o,{pagination:w.pagination});return o&&o.error||!o||!p().isArray(o.content)?(b.handleError(e,r,o.error,t,c),Promise.reject(o.error)):((0,s.decodeData)(o.content),a.LiveVariableUtils.processBlobColumns(o.content,e),t.skipDataSetUpdate||((0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.RESULT,e,w.data,c),(f=(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA,e,w.data,c))&&(w.data=f),b.updateDataset(e,w.data,e.propertiesMap,w.pagination),b.setVariableOptions(e,t),e.notify(d.VariableEvents.AFTER_INVOKE,[b,w.data]),setTimeout((function(){(0,i.triggerFn)(n,w.data,e.propertiesMap,w.pagination),(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.SUCCESS,e,w.data,c),e.canUpdate=!0,(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,e,w.data,c)}))),l({data:w.data,pagination:w.pagination}))}},_=function(n,i){return b.setVariableOptions(e,t),b.handleError(e,r,n.error,p().extend(t,{errorDetails:n.details})),i(n.error)},new Promise((function(t,n){b.makeCall(e,c,v).then((function(e){y(e,t)}),(function(e){_(e,n)}))})))},t.prototype.performCUD=function(e,t,n,r,o){var s=this;return(n=n||{}).inputFields=n.inputFields||(0,i.getClonedObject)(t.inputFields),l.$queue.submit(t).then((function(){return s.notifyInflight(t,!n.skipToggleState),s.doCUD(e,t,n,r,o).then((function(e){return l.$queue.process(t),s.notifyInflight(t,!1,e),Promise.resolve(e)}),(function(e){return l.$queue.process(t),s.notifyInflight(t,!1,e),Promise.reject(e)}))}),o)},t.prototype.doCUD=function(e,t,n,r,o){var c,h,f,m,g,v,y,_,b=this,w=u.$rootScope.project.id||u.$rootScope.projectName,x=a.LiveVariableUtils.getPrimaryKey(t),k=window.File&&window.FileReader&&window.FileList&&window.Blob,S="",T={},E={},D={},C=n.inputFields||t.inputFields;if(g=(0,i.getClonedObject)(C),!1===(v=(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE,t,g,n)))return(0,i.triggerFn)(o),Promise.reject("Call stopped from the event: "+u.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE);switch(C=p().isObject(v)?v:g,t.canUpdate=!1,n.row?(T=n.row,p().forEach(T,(function(e,n){var r,o=a.LiveVariableUtils.getFieldType(n,t);(0,i.isDateTimeType)(o)?(r=(0,s.formatDate)(e,o,t.dateFormatter),T[n]=r):p().isArray(e)&&a.LiveVariableUtils.isStringType(o)&&(r=p().join(e,","),T[n]=r)})),p().forEach(C,(function(e,t){!(0,i.isDefined)(e)||""===e||(0,i.isDefined)(T[t])&&""!==T[t]||(T[t]=e)}))):p().forEach(C,(function(n,r){var o,l=t.propertiesMap.primaryFields||t.propertiesMap.primaryKeys;p().isUndefined(n)||""===n||("deleteTableData"===e&&(S=n),"updateTableData"===e&&l.forEach((function(e){r===e&&(S=n)})),("deleteTableData"!==e||a.LiveVariableUtils.isCompositeKey(x))&&(o=a.LiveVariableUtils.getFieldType(r,t),(0,i.isDateTimeType)(o)?n=(0,s.formatDate)(n,o,t.dateFormatter):p().isArray(n)&&a.LiveVariableUtils.isStringType(o)&&(n=p().join(n,",")),T[r]=n),p().isObject(n)&&!p().isArray(n)&&p().forEach(n,(function(e,i){"blob"===a.LiveVariableUtils.getFieldType(r,t,i)&&(n[i]=null===e?e:"")})))})),e){case"updateTableData":h=n.prevData||{},a.LiveVariableUtils.isCompositeKey(x)?(a.LiveVariableUtils.isNoPrimaryKey(x)?(D=h||n.rowData||T,E=T):x.forEach((function(e){E[e]=T[e],n.period?D[e]=T[e]:D[e]=h[e]||n.rowData&&n.rowData[e]||T[e]})),n.row=E,n.compositeKeysData=D):(x.forEach((function(e){-1===e.indexOf(".")?f=h[e]||n.rowData&&n.rowData[e]||T[e]:(m=e.split("."),f=h[m[0]][m[1]])})),n.id=f,n.row=T);break;case"deleteTableData":a.LiveVariableUtils.isCompositeKey(x)?(a.LiveVariableUtils.isNoPrimaryKey(x)?E=T:x.forEach((function(e){E[e]=T[e]})),n.compositeKeysData=E):p().isEmpty(T)||(x.forEach((function(e){-1===e.indexOf(".")?f=T[e]:(m=e.split("."),f=T[m[0]][m[1]])})),n.id=f)}if(("updateTableData"===e||"insertTableData"===e)&&a.LiveVariableUtils.hasBlob(t)&&k&&(e="updateTableData"===e?"updateMultiPartTableData":"insertMultiPartTableData",T=a.LiveVariableUtils.prepareFormData(t,T)),n.compositeKeysData){switch(e){case"updateTableData":e="updateCompositeTableData";break;case"deleteTableData":e="deleteCompositeTableData";break;case"updateMultiPartTableData":e="updateMultiPartCompositeTableData"}S=a.LiveVariableUtils.getCompositeIDURL(n.compositeKeysData)}c=t.liveSource,p().isEmpty(T)&&"deleteTableData"===e&&(T=void 0),"updateCompositeTableData"!==e&&"deleteCompositeTableData"!==e||!n.period||(e="period"+e.charAt(0).toUpperCase()+e.substr(1));var M={projectID:w,service:t._prefabName?"":"services",dataModelName:c,entityName:t.type,id:p().isUndefined(n.id)?S:encodeURIComponent(n.id),data:T,url:t._prefabName?u.$rootScope.project.deployedUrl+"/prefabs/"+t._prefabName:u.$rootScope.project.deployedUrl};return y=function(e,r){var a=e.error,l=b.prepareCallbackOptions(e);(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.RESULT,t,a,l),n.skipNotification||(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.ERROR,t,a,l),t.canUpdate=!0,(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,t,a,l),(0,i.triggerFn)(o,a),r(a)},_=function(e,n){var a=e.body||e.data,c=b.prepareCallbackOptions(e);if(l.$queue.process(t),a&&a.error)return(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.RESULT,t,a,c),(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.ERROR,t,a.error,c),t.canUpdate=!0,(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,t,a.error,c),(0,i.triggerFn)(o,a.error),Promise.reject(a.error);if((0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.RESULT,t,a,c),"read"!==t.operation){var h=(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA,t,a,c);h&&(a=h),t.dataSet=a}t.notify(d.VariableEvents.AFTER_INVOKE,[b,a]),setTimeout((function(){(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.SUCCESS,t,a,c),t.canUpdate=!0,(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,t,a,c)})),(0,i.triggerFn)(r,a),n(a)},new Promise((function(n,r){b.makeCall(t,e,M).then((function(e){_(e,n)}),(function(e){y(e,r)}))}))},t.prototype.aggregateData=function(e,t,n,r,o){var s,l,u,c,d=this;return(n=n||{}).skipEncode=!0,t.filterFields&&(s=a.LiveVariableUtils.prepareTableOptions(t,n),n.aggregations.filter=s.query),l={dataModelName:t.liveSource,entityName:t.type,page:n.page||1,size:n.size||t.maxResults,sort:n.sort||"",url:e,data:n.aggregations},u=function(e,t){if(e&&e.type){if(e&&e.error||!e)return void(0,i.triggerFn)(o,e.error);(0,i.triggerFn)(r,e),t(e)}},c=function(e,t){(0,i.triggerFn)(o,e),t(e)},new Promise((function(e,n){d.makeCall(t,"executeAggregateQuery",l).then((function(t){u(t,e)}),(function(e){c(e,n)}))}))},t.prototype.listRecords=function(e,t,n,r){var o=this;return(t=t||{}).filterFields=t.filterFields||(0,i.getClonedObject)(e.filterFields),l.$queue.submit(e).then((function(){return o.notifyInflight(e,!t.skipToggleState,void 0,t),o.getEntityData(e,t,n,r).then((function(t){return l.$queue.process(e),o.notifyInflight(e,!1,t),Promise.resolve(t)}),(function(t){return l.$queue.process(e),o.notifyInflight(e,!1,t),Promise.reject(t)}))}),r)},t.prototype.insertRecord=function(e,t,n,r){return this.performCUD("insertTableData",e,t,n,r)},t.prototype.updateRecord=function(e,t,n,r){return this.performCUD("updateTableData",e,t,n,r)},t.prototype.deleteRecord=function(e,t,n,r){return this.performCUD("deleteTableData",e,t,n,r)},t.prototype.setInput=function(e,t,n,r){return e.inputFields=e.inputFields||{},(0,s.setInput)(e.inputFields,t,n,r)},t.prototype.setFilter=function(e,t,n){var r={},i={};return p().isObject(t)?r=t:r[t]=n,e.filterExpressions&&!p().isEmpty(e.filterExpressions)||(e.filterExpressions={condition:"AND",rules:[]}),i=e.filterExpressions,p().forEach(r,(function(e,t){var n=function(e){var t=null;return a.LiveVariableUtils.traverseFilterExpressions(i,(function(n,r){if(e===r.target)return t=r})),t}(t);null!==n?n.value=e:i.rules.push({target:t,type:"",matchMode:"",value:e,required:!1})})),i},t.prototype.download=function(e,t,n,r){var o,l,c,d,h=this;t=t||{};var p={},f=u.$rootScope.project.id||u.$rootScope.projectName;return t.data.searchWithQuery=!0,t.data.skipEncode=!0,o=a.LiveVariableUtils.prepareTableOptions(e,t.data,void 0),p.query=o.query?o.query:"",p.exportSize=t.data.exportSize,p.exportType=t.data.exportType,p.fields=(0,s.formatExportExpression)(t.data.fields),t.data.fileName&&(p.fileName=t.data.fileName),l={projectID:f,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:e.type,sort:o.sort,url:e.getPrefabName()?u.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():u.$rootScope.project.deployedUrl,data:p,filter:a.LiveVariableUtils.getWhereClauseGenerator(e,t)},c=function(e,t){e&&e.type&&(window.location.href=e.body.result,(0,i.triggerFn)(n,e),t(e))},d=function(t,n){var o=h.prepareCallbackOptions(t.details);(0,s.initiateCallback)(u.VARIABLE_CONSTANTS.EVENT.ERROR,e,t.error,o),(0,i.triggerFn)(r,t.error),n(t)},new Promise((function(t,n){h.makeCall(e,"exportTableData",l).then((function(e){c(e,t)}),(function(e){d(e,n)}))}))},t.prototype.getRelatedTablePrimaryKeys=function(e,t){var n,r,i;if(e.propertiesMap&&(r=p().find(e.propertiesMap.columns||[],{fieldName:t}))){if(i=r.columns,(n=p().map(p().filter(i,"isPrimaryKey"),"fieldName")).length)return n;if(i&&i.length)return(i=p().find(i,{isRelated:!1}))&&i.fieldName}},t.prototype.getRelatedTableData=function(e,t,n,r,o){var l,c,d,h,f,m,g=this,v=u.$rootScope.project.id||u.$rootScope.projectName,y=p().find(e.relatedTables,(function(e){return e.relationName===t||e.columnName===t})),_=p().map(p().filter(e.relatedTables,(function(t){return t.type===e.type})),"relationName"),b=[];if(p().forEach(n.filterFields,(function(n,r){n.fieldName=r,n.type=a.LiveVariableUtils.getFieldType(t,e,r),n.filterCondition!==u.DB_CONSTANTS.DATABASE_MATCH_MODES.in.toLowerCase()&&n.filterCondition!==u.DB_CONSTANTS.DATABASE_MATCH_MODES.between.toLowerCase()||(n.value=n.value.split(",")),b.push(n)})),c=a.LiveVariableUtils.getFilterOptions(e,b,n),d=a.LiveVariableUtils.getSearchQuery(c," "+(n.logicalOp||"AND")+" ",e.ignoreCase),n.filterExpr){var w=(0,i.getClonedObject)(p().isObject(n.filterExpr)?n.filterExpr:JSON.parse(n.filterExpr));a.LiveVariableUtils.processFilterFields(w.rules,e,n);var x=a.LiveVariableUtils.generateSearchQuery(w.rules,w.condition,e.ignoreCase,n.skipEncode);""!==d?""!==x&&(d="("+d+") AND ("+x+")"):""!==x&&(d=x)}return d=d?"q="+d:"","searchTableDataWithQuery",l=p().isEmpty(n.orderBy)?"":"sort="+n.orderBy,h={projectID:v,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:y?y.type:"",page:n.page||1,size:n.pagesize||void 0,url:e.getPrefabName()?u.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():u.$rootScope.project.deployedUrl,data:d||"",filter:a.LiveVariableUtils.getWhereClauseGenerator(e,n),sort:l},f=function(e,t){if(e&&(e.type||e.status)){var n=e.body||e.data,o=p().map(n.content,(function(e){return p().omit(e,_)})),a=Object.assign({},n);delete a.content,(0,s.decodeData)(o);var l={data:o,pagination:a};(0,i.triggerFn)(r,l),t(l)}},m=function(e,t){(0,i.triggerFn)(o,e),t(e)},new Promise((function(t,n){g.makeCall(e,"searchTableDataWithQuery",h).then((function(e){f(e,t)}),(function(e){m(e,n)}))}))},t.prototype.getDistinctDataByFields=function(e,t,n,r){var o,s,l,c,d,h=this,f=u.$rootScope.project.id||u.$rootScope.projectName,m={};return t.skipEncode=!0,t.operation="read",t=t||{},(s=a.LiveVariableUtils.prepareTableOptions(e,t)).query&&(m.filter=s.query),m.groupByFields=p().isArray(t.fields)?t.fields:[t.fields],o=(o=t.sort||m.groupByFields[0]+" asc")?"sort="+o:"",l={projectID:f,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:t.entityName||e.type,page:t.page||1,size:t.pagesize,sort:o,data:m,filter:a.LiveVariableUtils.getWhereClauseGenerator(e,t),url:e.getPrefabName()?u.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():u.$rootScope.project.deployedUrl},c=function(e,t){if(e&&e.type){if(e&&e.error||!e)return(0,i.triggerFn)(r,e.error),Promise.reject(e.error);var o=e.body,s=Object.assign({},e.body);delete s.content,o={data:o.content,pagination:s},(0,i.triggerFn)(n,o),t(o)}},d=function(e,t){(0,i.triggerFn)(r,e),t(e)},new Promise((function(t,n){h.makeCall(e,"getDistinctDataByFields",l).then((function(e){c(e,t)}),(function(){d(r,n)}))}))},t.prototype.getAggregatedData=function(e,t,n,r){var i=s.appManager.getDeployedURL();if(i)return this.aggregateData(i,e,t,n,r)},t.prototype.defineFirstLastRecord=function(e){"read"===e.operation&&(Object.defineProperty(e,"firstRecord",{configurable:!0,get:function(){return p().get(e.dataSet,"data[0]",{})}}),Object.defineProperty(e,"lastRecord",{configurable:!0,get:function(){var t=p().get(e.dataSet,"data",[]);return t[t.length-1]}}))},t.prototype.getPrimaryKey=function(e){return a.LiveVariableUtils.getPrimaryKey(e)},t.prototype.prepareRequestParams=function(e){var t,n=p().split(e.searchKey,","),r=p().split(e.matchMode,","),i={};return p().forEach(n,(function(t,n){i[t]={value:e.query,logicalOp:"AND",matchMode:r[n]||r[0]||"startignorecase"}})),t={filterFields:i,page:e.page,pagesize:e.limit||e.pagesize,skipDataSetUpdate:!0,skipToggleState:!0,inFlightBehavior:"executeAll",logicalOp:"OR",orderBy:e.orderby?p().replace(e.orderby,/:/g," "):""},e.onBeforeservicecall&&e.onBeforeservicecall(i),t},t.prototype.searchRecords=function(e,t,n,r){var i=this.prepareRequestParams(t);return this.listRecords(e,i,n,r)},t.prototype.upgradeInputDataToFilterExpressions=function(e,t,n){p().isObject(t)&&((n=t).condition="AND",n.rules=[]);var r=p().cloneDeep(n.rules);return n.rules=[],p().forEach(n,(function(e,t){if("condition"!==t&&"rules"!==t){var i=p().find(r,(function(e){return e.target===t}));i?(i.value=e.value,i.matchMode=e.matchMode||e.filterCondition||i.matchMode||"",n.rules.push(i)):n.rules.push({target:t,type:"",matchMode:e.matchMode||e.filterCondition||"",value:e.value,required:!1}),delete n[t]}})),n},t.prototype.downgradeFilterExpressionsToInputData=function(e,t){return t.hasOwnProperty("getFilterFields")&&(t=t.getFilterFields()),p().forEach(t.rules,(function(e){p().isNil(e.target)||""===e.target||(t[e.target]={value:e.value,matchMode:e.matchMode})})),t},t.prototype.cancel=function(e,t){l.$queue.requestsQueue.has(e)&&e._observable&&(e._observable.unsubscribe(),l.$queue.process(e),this.notifyInflight(e,!1))},t}(o.BaseVariableManager)},"./src/manager/variable/model-variable.manager.ts":
1490
1490
  /*!********************************************************!*\
1491
1491
  !*** ./src/manager/variable/model-variable.manager.ts ***!
1492
1492
  \********************************************************/
@@ -1799,4 +1799,4 @@ function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"f
1799
1799
  * @wavemaker/focus-trap 1.0.0
1800
1800
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
1801
1801
  */
1802
- function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tabbable")):"function"==typeof define&&define.amd?define(["exports","tabbable"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.focusTrap,r=e.focusTrap={};t(r,e.tabbable),r.noConflict=function(){return e.focusTrap=n,r}}())}(this,(function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=function(e,t){if(e.length>0){var n=e[e.length-1];n!==t&&n.pause()}var r=e.indexOf(t);-1===r||e.splice(r,1),e.push(t)},s=function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()},a=function(e){return"Tab"===e.key||9===e.keyCode},l=function(e){return a(e)&&!e.shiftKey},u=function(e){return a(e)&&e.shiftKey},c=function(e){return setTimeout(e,0)},d=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},h=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},p=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},f=[];e.createFocusTrap=function(e,n){var i,m=(null==n?void 0:n.document)||document,g=(null==n?void 0:n.trapStack)||f,v=r({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:l,isKeyBackward:u},n),y={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},_=function(e,t,n){return e&&void 0!==e[t]?e[t]:v[n||t]},b=function(e){return y.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},w=function(e){var t=v[e];if("function"==typeof t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t=t.apply(void 0,r)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var o=t;if("string"==typeof t&&!(o=m.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return o},x=function(){var e=w("initialFocus");if(!1===e)return!1;if(void 0===e)if(b(m.activeElement)>=0)e=m.activeElement;else{var t=y.tabbableGroups[0];e=t&&t.firstTabbableNode||w("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},k=function(){if(y.containerGroups=y.containers.map((function(e){var n=t.tabbable(e,v.tabbableOptions),r=t.focusable(e,v.tabbableOptions);return{container:e,tabbableNodes:n,focusableNodes:r,firstTabbableNode:n.length>0?n[0]:null,lastTabbableNode:n.length>0?n[n.length-1]:null,nextTabbableNode:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=r.findIndex((function(t){return t===e}));if(!(i<0))return n?r.slice(i+1).find((function(e){return t.isTabbable(e,v.tabbableOptions)})):r.slice(0,i).reverse().find((function(e){return t.isTabbable(e,v.tabbableOptions)}))}}})),y.tabbableGroups=y.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),y.tabbableGroups.length<=0&&!w("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},S=function e(t){!1!==t&&t!==m.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!v.preventScroll}),y.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(x()))},T=function(e){var t=w("setReturnFocus",e);return t||!1!==t&&e},E=function(e){var n=p(e);b(n)>=0||(h(v.clickOutsideDeactivates,e)?i.deactivate({returnFocus:v.returnFocusOnDeactivate&&!t.isFocusable(n,v.tabbableOptions)}):h(v.allowOutsideClick,e)||e.preventDefault())},D=function(e){var t=p(e),n=b(t)>=0;if(n||t instanceof Document)n&&(y.mostRecentlyFocusedNode=t);else{if(y.containers[0].nextSibling)return;e.stopImmediatePropagation(),S(y.mostRecentlyFocusedNode||x())}},C=function(e){if(!(n=e,"Escape"!==n.key&&"Esc"!==n.key&&27!==n.keyCode||!1===h(v.escapeDeactivates,e)))return e.preventDefault(),void i.deactivate();var n;(v.isKeyForward(e)||v.isKeyBackward(e))&&function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=p(e);k();var i=null;if(y.tabbableGroups.length>0){var o=b(r),s=o>=0?y.containerGroups[o]:void 0;if(o<0)i=n?y.tabbableGroups[y.tabbableGroups.length-1].lastTabbableNode:y.tabbableGroups[0].firstTabbableNode;else if(n){var l=d(y.tabbableGroups,(function(e){var t=e.firstTabbableNode;return r===t}));if(l<0&&(s.container===r||t.isFocusable(r,v.tabbableOptions)&&!t.isTabbable(r,v.tabbableOptions)&&!s.nextTabbableNode(r,!1))&&(l=o),l>=0){var u=0===l?y.tabbableGroups.length-1:l-1;i=y.tabbableGroups[u].lastTabbableNode}else a(e)||(i=s.nextTabbableNode(r,!1))}else{var c=d(y.tabbableGroups,(function(e){var t=e.lastTabbableNode;return r===t}));if(c<0&&(s.container===r||t.isFocusable(r,v.tabbableOptions)&&!t.isTabbable(r,v.tabbableOptions)&&!s.nextTabbableNode(r))&&(c=o),c>=0){var h=c===y.tabbableGroups.length-1?0:c+1;i=y.tabbableGroups[h].firstTabbableNode}else a(e)||(i=s.nextTabbableNode(r))}}else i=w("fallbackFocus");i&&(a(e)&&e.preventDefault(),S(i))}(e,v.isKeyBackward(e))},M=function(e){var t=p(e);b(t)>=0||h(v.clickOutsideDeactivates,e)||h(v.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},A=function(){if(y.active)return o(g,i),y.delayInitialFocusTimer=v.delayInitialFocus?c((function(){S(x())})):S(x()),m.addEventListener("focusin",D,!0),m.addEventListener("mousedown",E,{capture:!0,passive:!1}),m.addEventListener("touchstart",E,{capture:!0,passive:!1}),m.addEventListener("click",M,{capture:!0,passive:!1}),m.addEventListener("keydown",C,{capture:!0,passive:!1}),i},I=function(){if(y.active)return m.removeEventListener("focusin",D,!0),m.removeEventListener("mousedown",E,!0),m.removeEventListener("touchstart",E,!0),m.removeEventListener("click",M,!0),m.removeEventListener("keydown",C,!0),i};return(i={get active(){return y.active},get paused(){return y.paused},activate:function(e){if(y.active)return this;var t=_(e,"onActivate"),n=_(e,"onPostActivate"),r=_(e,"checkCanFocusTrap");r||k(),y.active=!0,y.paused=!1,y.nodeFocusedBeforeActivation=m.activeElement,t&&t();var i=function(){r&&k(),A(),n&&n()};return r?(r(y.containers.concat()).then(i,i),this):(i(),this)},deactivate:function(e){if(!y.active)return this;var t=r({onDeactivate:v.onDeactivate,onPostDeactivate:v.onPostDeactivate,checkCanReturnFocus:v.checkCanReturnFocus},e);clearTimeout(y.delayInitialFocusTimer),y.delayInitialFocusTimer=void 0,I(),y.active=!1,y.paused=!1,s(g,i);var n=_(t,"onDeactivate"),o=_(t,"onPostDeactivate"),a=_(t,"checkCanReturnFocus"),l=_(t,"returnFocus","returnFocusOnDeactivate");n&&n();var u=function(){c((function(){l&&S(T(y.nodeFocusedBeforeActivation)),o&&o()}))};return l&&a?(a(T(y.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return y.paused||!y.active||(y.paused=!0,I()),this},unpause:function(){return y.paused&&y.active?(y.paused=!1,k(),A(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return y.containers=t.map((function(e){return"string"==typeof e?m.querySelector(e):e})),y.active&&k(),this}}).updateContainerElements(e),i},Object.defineProperty(e,"__esModule",{value:!0})})),function($){var settings={},roots={},caches={},_consts={className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch",NAME:"node_name"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_setting={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nodeClasses:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{isParent:"isParent",children:"children",name:"name",title:"",url:"url",icon:"icon"},render:{name:null,title:null},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",headers:{},xhrFields:{},url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},_initRoot=function(e){var t=data.getRoot(e);t||(t={},data.setRoot(e,t)),data.nodeChildren(e,t,[]),t.expandTriggerFlag=!1,t.curSelectedList=[],t.noSelection=!0,t.createdNodes=[],t.zId=0,t._ver=(new Date).getTime()},_initCache=function(e){var t=data.getCache(e);t||(t={},data.setCache(e,t)),t.nodes=[],t.doms=[]},_bindEvent=function(e){var t=e.treeObj,n=consts.event;t.bind(n.NODECREATED,(function(t,n,r){tools.apply(e.callback.onNodeCreated,[t,n,r])})),t.bind(n.CLICK,(function(t,n,r,i,o){tools.apply(e.callback.onClick,[n,r,i,o])})),t.bind(n.EXPAND,(function(t,n,r){tools.apply(e.callback.onExpand,[t,n,r])})),t.bind(n.COLLAPSE,(function(t,n,r){tools.apply(e.callback.onCollapse,[t,n,r])})),t.bind(n.ASYNC_SUCCESS,(function(t,n,r,i){tools.apply(e.callback.onAsyncSuccess,[t,n,r,i])})),t.bind(n.ASYNC_ERROR,(function(t,n,r,i,o,s){tools.apply(e.callback.onAsyncError,[t,n,r,i,o,s])})),t.bind(n.REMOVE,(function(t,n,r){tools.apply(e.callback.onRemove,[t,n,r])})),t.bind(n.SELECTED,(function(t,n,r){tools.apply(e.callback.onSelected,[n,r])})),t.bind(n.UNSELECTED,(function(t,n,r){tools.apply(e.callback.onUnSelected,[n,r])}))},_unbindEvent=function(e){var t=e.treeObj,n=consts.event;t.unbind(n.NODECREATED).unbind(n.CLICK).unbind(n.EXPAND).unbind(n.COLLAPSE).unbind(n.ASYNC_SUCCESS).unbind(n.ASYNC_ERROR).unbind(n.REMOVE).unbind(n.SELECTED).unbind(n.UNSELECTED)},_eventProxy=function(e){var t=e.target,n=data.getSetting(e.data.treeId),r="",i=null,o="",s="",a=null,l=null,u=null;if(tools.eqs(e.type,"mousedown")?s="mousedown":tools.eqs(e.type,"mouseup")?s="mouseup":tools.eqs(e.type,"contextmenu")?s="contextmenu":tools.eqs(e.type,"click")?tools.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+consts.id.SWITCH)?(r=tools.getNodeMainDom(t).id,o="switchNode"):(u=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(r=tools.getNodeMainDom(u).id,o="clickNode"):tools.eqs(e.type,"dblclick")&&(s="dblclick",(u=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(r=tools.getNodeMainDom(u).id,o="switchNode")),s.length>0&&0==r.length&&(u=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(r=tools.getNodeMainDom(u).id),r.length>0)switch(i=data.getNodeCache(n,r),o){case"switchNode":data.nodeIsParent(n,i)&&(tools.eqs(e.type,"click")||tools.eqs(e.type,"dblclick")&&tools.apply(n.view.dblClickExpand,[n.treeId,i],n.view.dblClickExpand))?a=handler.onSwitchNode:o="";break;case"clickNode":a=handler.onClickNode}switch(s){case"mousedown":l=handler.onZTreeMousedown;break;case"mouseup":l=handler.onZTreeMouseup;break;case"dblclick":l=handler.onZTreeDblclick;break;case"contextmenu":l=handler.onZTreeContextmenu}return{stop:!1,node:i,nodeEventType:o,nodeEventCallback:a,treeEventType:s,treeEventCallback:l}},_initNode=function(e,t,n,r,i,o,s){if(n){var a=data.getRoot(e),l=data.nodeChildren(e,n);n.level=t,n.tId=e.treeId+"_"+ ++a.zId,n.parentTId=r?r.tId:null,n.open="string"==typeof n.open?tools.eqs(n.open,"true"):!!n.open;var u=data.nodeIsParent(e,n);tools.isArray(l)?(data.nodeIsParent(e,n,!0),n.zAsync=!0):(u=data.nodeIsParent(e,n,u),n.open=!(!u||e.async.enable)&&n.open,n.zAsync=!u),n.isFirstNode=i,n.isLastNode=o,n.getParentNode=function(){return data.getNodeCache(e,n.parentTId)},n.getPreNode=function(){return data.getPreNode(e,n)},n.getNextNode=function(){return data.getNextNode(e,n)},n.getIndex=function(){return data.getNodeIndex(e,n)},n.getPath=function(){return data.getNodePath(e,n)},n.isAjaxing=!1,data.fixPIdKeyValue(e,n)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(e,t){data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=t},getNodeCacheId:function(e){return e.substring(e.lastIndexOf("_")+1)},addAfterA:function(e){_init.afterA.push(e)},addBeforeA:function(e){_init.beforeA.push(e)},addInnerAfterA:function(e){_init.innerAfterA.push(e)},addInnerBeforeA:function(e){_init.innerBeforeA.push(e)},addInitBind:function(e){_init.bind.push(e)},addInitUnBind:function(e){_init.unbind.push(e)},addInitCache:function(e){_init.caches.push(e)},addInitNode:function(e){_init.nodes.push(e)},addInitProxy:function(e,t){t?_init.proxys.splice(0,0,e):_init.proxys.push(e)},addInitRoot:function(e){_init.roots.push(e)},addNodesData:function(e,t,n,r){var i,o=data.nodeChildren(e,t);o?n>=o.length&&(n=-1):(o=data.nodeChildren(e,t,[]),n=-1),o.length>0&&0===n?(o[0].isFirstNode=!1,view.setNodeLineIcos(e,o[0])):o.length>0&&n<0&&(o[o.length-1].isLastNode=!1,view.setNodeLineIcos(e,o[o.length-1])),data.nodeIsParent(e,t,!0),n<0?data.nodeChildren(e,t,o.concat(r)):(i=[n,0].concat(r),o.splice.apply(o,i))},addSelectedNode:function(e,t){var n=data.getRoot(e);data.isSelectedNode(e,t)||n.curSelectedList.push(t)},addCreatedNode:function(e,t){(e.callback.onNodeCreated||e.view.addDiyDom)&&data.getRoot(e).createdNodes.push(t)},addZTreeTools:function(e){_init.zTreeTools.push(e)},exSetting:function(e){$.extend(!0,_setting,e)},fixPIdKeyValue:function(e,t){e.data.simpleData.enable&&(t[e.data.simpleData.pIdKey]=t.parentTId?t.getParentNode()[e.data.simpleData.idKey]:e.data.simpleData.rootPId)},getAfterA:function(e,t,n){for(var r=0,i=_init.afterA.length;r<i;r++)_init.afterA[r].apply(this,arguments)},getBeforeA:function(e,t,n){for(var r=0,i=_init.beforeA.length;r<i;r++)_init.beforeA[r].apply(this,arguments)},getInnerAfterA:function(e,t,n){for(var r=0,i=_init.innerAfterA.length;r<i;r++)_init.innerAfterA[r].apply(this,arguments)},getInnerBeforeA:function(e,t,n){for(var r=0,i=_init.innerBeforeA.length;r<i;r++)_init.innerBeforeA[r].apply(this,arguments)},getCache:function(e){return caches[e.treeId]},getNodeIndex:function(e,t){if(!t)return null;for(var n=t.parentTId?t.getParentNode():data.getRoot(e),r=data.nodeChildren(e,n),i=0,o=r.length-1;i<=o;i++)if(r[i]===t)return i;return-1},getNextNode:function(e,t){if(!t)return null;for(var n=t.parentTId?t.getParentNode():data.getRoot(e),r=data.nodeChildren(e,n),i=0,o=r.length-1;i<=o;i++)if(r[i]===t)return i==o?null:r[i+1];return null},getNodeByParam:function(e,t,n,r){if(!t||!n)return null;for(var i=0,o=t.length;i<o;i++){var s=t[i];if(s[n]==r)return t[i];var a=data.nodeChildren(e,s),l=data.getNodeByParam(e,a,n,r);if(l)return l}return null},getNodeCache:function(e,t){if(!t)return null;var n=caches[e.treeId].nodes[data.getNodeCacheId(t)];return n||null},getNodePath:function(e,t){return t?((n=t.parentTId?t.getParentNode().getPath():[])&&n.push(t),n):null;var n},getNodes:function(e){return data.nodeChildren(e,data.getRoot(e))},getNodesByParam:function(e,t,n,r){if(!t||!n)return[];for(var i=[],o=0,s=t.length;o<s;o++){var a=t[o];a[n]==r&&i.push(a);var l=data.nodeChildren(e,a);i=i.concat(data.getNodesByParam(e,l,n,r))}return i},getNodesByParamFuzzy:function(e,t,n,r){if(!t||!n)return[];var i=[];r=r.toLowerCase();for(var o=0,s=t.length;o<s;o++){var a=t[o];"string"==typeof a[n]&&t[o][n].toLowerCase().indexOf(r)>-1&&i.push(a);var l=data.nodeChildren(e,a);i=i.concat(data.getNodesByParamFuzzy(e,l,n,r))}return i},getNodesByFilter:function(e,t,n,r,i){if(!t)return r?null:[];for(var o=r?null:[],s=0,a=t.length;s<a;s++){var l=t[s];if(tools.apply(n,[l,i],!1)){if(r)return l;o.push(l)}var u=data.nodeChildren(e,l),c=data.getNodesByFilter(e,u,n,r,i);if(r&&c)return c;o=r?c:o.concat(c)}return o},getPreNode:function(e,t){if(!t)return null;for(var n=t.parentTId?t.getParentNode():data.getRoot(e),r=data.nodeChildren(e,n),i=0,o=r.length;i<o;i++)if(r[i]===t)return 0==i?null:r[i-1];return null},getRoot:function(e){return e?roots[e.treeId]:null},getRoots:function(){return roots},getSetting:function(e){return settings[e]},getSettings:function(){return settings},getZTreeTools:function(e){var t=this.getRoot(this.getSetting(e));return t?t.treeTools:null},initCache:function(e){for(var t=0,n=_init.caches.length;t<n;t++)_init.caches[t].apply(this,arguments)},initNode:function(e,t,n,r,i,o){for(var s=0,a=_init.nodes.length;s<a;s++)_init.nodes[s].apply(this,arguments)},initRoot:function(e){for(var t=0,n=_init.roots.length;t<n;t++)_init.roots[t].apply(this,arguments)},isSelectedNode:function(e,t){for(var n=data.getRoot(e),r=0,i=n.curSelectedList.length;r<i;r++)if(t===n.curSelectedList[r])return!0;return!1},nodeChildren:function(e,t,n){if(!t)return null;var r=e.data.key.children;return void 0!==n&&(t[r]=n),t[r]},nodeIsParent:function(e,t,n){if(!t)return!1;var r=e.data.key.isParent;return void 0!==n?("string"==typeof n&&(n=tools.eqs(n,"true")),n=!!n,t[r]=n):"string"==typeof t[r]?t[r]=tools.eqs(t[r],"true"):t[r]=!!t[r],t[r]},nodeName:function(e,t,n){var r=e.data.key.name;void 0!==n&&(t[r]=n);var i=""+t[r];return"function"==typeof e.data.render.name?e.data.render.name.call(this,i,t):i},nodeTitle:function(e,t){var n=""+t[""===e.data.key.title?e.data.key.name:e.data.key.title];return"function"==typeof e.data.render.title?e.data.render.title.call(this,n,t):n},removeNodeCache:function(e,t){var n=data.nodeChildren(e,t);if(n)for(var r=0,i=n.length;r<i;r++)data.removeNodeCache(e,n[r]);data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=null},removeSelectedNode:function(e,t){for(var n=data.getRoot(e),r=0,i=n.curSelectedList.length;r<i;r++)t!==n.curSelectedList[r]&&data.getNodeCache(e,n.curSelectedList[r].tId)||(n.curSelectedList.splice(r,1),e.treeObj.trigger(consts.event.UNSELECTED,[e.treeId,t]),r--,i--)},setCache:function(e,t){caches[e.treeId]=t},setRoot:function(e,t){roots[e.treeId]=t},setZTreeTools:function(e,t){for(var n=0,r=_init.zTreeTools.length;n<r;n++)_init.zTreeTools[n].apply(this,arguments)},transformToArrayFormat:function(e,t){if(!t)return[];var n=[];if(tools.isArray(t))for(var r=0,i=t.length;r<i;r++){o(t[r])}else o(t);return n;function o(t){n.push(t);var r=data.nodeChildren(e,t);r&&(n=n.concat(data.transformToArrayFormat(e,r)))}},transformTozTreeFormat:function(e,t){var n,r,i=e.data.simpleData.idKey,o=e.data.simpleData.pIdKey;if(!i||""==i||!t)return[];if(tools.isArray(t)){var s=[],a={};for(n=0,r=t.length;n<r;n++)a[t[n][i]]=t[n];for(n=0,r=t.length;n<r;n++){var l=a[t[n][o]];if(l&&t[n][i]!=t[n][o]){var u=data.nodeChildren(e,l);u||(u=data.nodeChildren(e,l,[])),u.push(t[n])}else s.push(t[n])}return s}return[t]}},event={bindEvent:function(e){for(var t=0,n=_init.bind.length;t<n;t++)_init.bind[t].apply(this,arguments)},unbindEvent:function(e){for(var t=0,n=_init.unbind.length;t<n;t++)_init.unbind[t].apply(this,arguments)},bindTree:function(e){var t={treeId:e.treeId},n=e.treeObj;e.view.txtSelectedEnable||n.bind("selectstart",handler.onSelectStart).css({"-moz-user-select":"-moz-none"}),n.bind("click",t,event.proxy),n.bind("dblclick",t,event.proxy),n.bind("mouseover",t,event.proxy),n.bind("mouseout",t,event.proxy),n.bind("mousedown",t,event.proxy),n.bind("mouseup",t,event.proxy),n.bind("contextmenu",t,event.proxy)},unbindTree:function(e){e.treeObj.unbind("selectstart",handler.onSelectStart).unbind("click",event.proxy).unbind("dblclick",event.proxy).unbind("mouseover",event.proxy).unbind("mouseout",event.proxy).unbind("mousedown",event.proxy).unbind("mouseup",event.proxy).unbind("contextmenu",event.proxy)},doProxy:function(e){for(var t=[],n=0,r=_init.proxys.length;n<r;n++){var i=_init.proxys[n].apply(this,arguments);if(t.push(i),i.stop)break}return t},proxy:function(e){var t=data.getSetting(e.data.treeId);if(!tools.uCanDo(t,e))return!0;for(var n=event.doProxy(e),r=!0,i=0,o=n.length;i<o;i++){var s=n[i];s.nodeEventCallback&&(r=s.nodeEventCallback.apply(s,[e,s.node])&&r),s.treeEventCallback&&(r=s.treeEventCallback.apply(s,[e,s.node])&&r)}return r}},handler={onSwitchNode:function(e,t){var n=data.getSetting(e.data.treeId);if(t.open){if(0==tools.apply(n.callback.beforeCollapse,[n.treeId,t],!0))return!0;data.getRoot(n).expandTriggerFlag=!0,view.switchNode(n,t)}else{if(0==tools.apply(n.callback.beforeExpand,[n.treeId,t],!0))return!0;data.getRoot(n).expandTriggerFlag=!0,view.switchNode(n,t)}return!0},onClickNode:function(e,t){var n=data.getSetting(e.data.treeId),r=n.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&data.isSelectedNode(n,t)?0:n.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&n.view.selectedMulti?2:1;return 0==tools.apply(n.callback.beforeClick,[n.treeId,t,r],!0)||(0===r?view.cancelPreSelectedNode(n,t):view.selectNode(n,t,2===r),n.treeObj.trigger(consts.event.CLICK,[e,n.treeId,t,r])),!0},onZTreeMousedown:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeMouseDown,[n.treeId,t],!0)&&tools.apply(n.callback.onMouseDown,[e,n.treeId,t]),!0},onZTreeMouseup:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeMouseUp,[n.treeId,t],!0)&&tools.apply(n.callback.onMouseUp,[e,n.treeId,t]),!0},onZTreeDblclick:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeDblClick,[n.treeId,t],!0)&&tools.apply(n.callback.onDblClick,[e,n.treeId,t]),!0},onZTreeContextmenu:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeRightClick,[n.treeId,t],!0)&&tools.apply(n.callback.onRightClick,[e,n.treeId,t]),"function"!=typeof n.callback.onRightClick},onSelectStart:function(e){var t=e.originalEvent.srcElement.nodeName.toLowerCase();return"input"===t||"textarea"===t}},tools={apply:function(e,t,n){return"function"==typeof e?e.apply(zt,t||[]):n},canAsync:function(e,t){var n=data.nodeChildren(e,t),r=data.nodeIsParent(e,t);return e.async.enable&&t&&r&&!(t.zAsync||n&&n.length>0)},clone:function(e){if(null===e)return null;var t=tools.isArray(e)?[]:{};for(var n in e)t[n]=e[n]instanceof Date?new Date(e[n].getTime()):"object"==typeof e[n]?tools.clone(e[n]):e[n];return t},eqs:function(e,t){return e.toLowerCase()===t.toLowerCase()},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isElement:function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},$:function(e,t,n){return t&&"string"!=typeof t&&(n=t,t=""),"string"==typeof e?$(e,n?n.treeObj.get(0).ownerDocument:null):$("#"+e.tId+t,n?n.treeObj:null)},getMDom:function(e,t,n){if(!t)return null;for(;t&&t.id!==e.treeId;){for(var r=0,i=n.length;t.tagName&&r<i;r++)if(tools.eqs(t.tagName,n[r].tagName)&&null!==t.getAttribute(n[r].attrName))return t;t=t.parentNode}return null},getNodeMainDom:function(e){return $(e).parent("li").get(0)||$(e).parentsUntil("li").parent().get(0)},isChildOrSelf:function(e,t){return $(e).closest("#"+t).length>0},uCanDo:function(e,t){return!0}},view={addNodes:function(e,t,n,r,i){var o=data.nodeIsParent(e,t);if(!e.data.keep.leaf||!t||o)if(tools.isArray(r)||(r=[r]),e.data.simpleData.enable&&(r=data.transformTozTreeFormat(e,r)),t){var s=$$(t,consts.id.SWITCH,e),a=$$(t,consts.id.ICON,e),l=$$(t,consts.id.UL,e);t.open||(view.replaceSwitchClass(t,s,consts.folder.CLOSE),view.replaceIcoClass(t,a,consts.folder.CLOSE),t.open=!1,l.css({display:"none"})),data.addNodesData(e,t,n,r),view.createNodes(e,t.level+1,r,t,n),i||view.expandCollapseParentNode(e,t,!0)}else data.addNodesData(e,data.getRoot(e),n,r),view.createNodes(e,0,r,null,n)},appendNodes:function(e,t,n,r,i,o,s){if(!n)return[];var a,l,u=[],c=r||data.getRoot(e),d=data.nodeChildren(e,c);(!d||i>=d.length-n.length)&&(i=-1);for(var h=0,p=n.length;h<p;h++){var f=n[h];o&&(a=(0===i||d.length==n.length)&&0==h,l=i<0&&h==n.length-1,data.initNode(e,t,f,r,a,l,s),data.addNodeCache(e,f));var m=data.nodeIsParent(e,f),g=[],v=data.nodeChildren(e,f);v&&v.length>0&&(g=view.appendNodes(e,t+1,v,f,-1,o,s&&f.open)),s&&(view.makeDOMNodeMainBefore(u,e,f),view.makeDOMNodeLine(u,e,f),data.getBeforeA(e,f,u),view.makeDOMNodeNameBefore(u,e,f),data.getInnerBeforeA(e,f,u),view.makeDOMNodeIcon(u,e,f),data.getInnerAfterA(e,f,u),view.makeDOMNodeNameAfter(u,e,f),data.getAfterA(e,f,u),m&&f.open&&view.makeUlHtml(e,f,u,g.join("")),view.makeDOMNodeMainAfter(u,e,f),data.addCreatedNode(e,f))}return u},appendParentULDom:function(e,t){var n=[],r=$$(t,e);!r.get(0)&&t.parentTId&&(view.appendParentULDom(e,t.getParentNode()),r=$$(t,e));var i=$$(t,consts.id.UL,e);i.get(0)&&i.remove();var o=data.nodeChildren(e,t),s=view.appendNodes(e,t.level+1,o,t,-1,!1,!0);view.makeUlHtml(e,t,n,s.join("")),r.append(n.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l,isParent=data.nodeIsParent(setting,node);if(node&&!isParent)return tools.apply(callback),!1;if(node&&node.isAjaxing)return!1;if(0==tools.apply(setting.callback.beforeAsync,[setting.treeId,node],!0))return tools.apply(callback),!1;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"",class:consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={},autoParam=tools.apply(setting.async.autoParam,[setting.treeId,node],setting.async.autoParam);for(i=0,l=autoParam.length;node&&i<l;i++){var pKey=autoParam[i].split("="),spKey=pKey;pKey.length>1&&(spKey=pKey[1],pKey=pKey[0]),tmpParam[spKey]=node[pKey]}var otherParam=tools.apply(setting.async.otherParam,[setting.treeId,node],setting.async.otherParam);if(tools.isArray(otherParam))for(i=0,l=otherParam.length;i<l;i+=2)tmpParam[otherParam[i]]=otherParam[i+1];else for(var p in otherParam)tmpParam[p]=otherParam[p];var _tmpV=data.getRoot(setting)._ver;return $.ajax({contentType:setting.async.contentType,cache:!1,type:setting.async.type,url:tools.apply(setting.async.url,[setting.treeId,node],setting.async.url),data:setting.async.contentType.indexOf("application/json")>-1?JSON.stringify(tmpParam):tmpParam,dataType:setting.async.dataType,headers:setting.async.headers,xhrFields:setting.async.xhrFields,success:function(msg){if(_tmpV==data.getRoot(setting)._ver){var newNodes=[];try{newNodes=msg&&0!=msg.length?"string"==typeof msg?eval("("+msg+")"):msg:[]}catch(e){newNodes=msg}node&&(node.isAjaxing=null,node.zAsync=!0),view.setNodeLineIcos(setting,node),newNodes&&""!==newNodes?(newNodes=tools.apply(setting.async.dataFilter,[setting.treeId,node,newNodes],newNodes),view.addNodes(setting,node,-1,newNodes?tools.clone(newNodes):[],!!isSilent)):view.addNodes(setting,node,-1,[],!!isSilent),setting.treeObj.trigger(consts.event.ASYNC_SUCCESS,[setting.treeId,node,msg]),tools.apply(callback)}},error:function(e,t,n){_tmpV==data.getRoot(setting)._ver&&(node&&(node.isAjaxing=null),view.setNodeLineIcos(setting,node),setting.treeObj.trigger(consts.event.ASYNC_ERROR,[setting.treeId,node,e,t,n]))}}),!0},cancelPreSelectedNode:function(e,t,n){var r,i,o=data.getRoot(e).curSelectedList;for(r=o.length-1;r>=0;r--)if(t===(i=o[r])||!t&&(!n||n!==i)){if($$(i,consts.id.A,e).removeClass(consts.node.CURSELECTED),t){data.removeSelectedNode(e,t);break}o.splice(r,1),e.treeObj.trigger(consts.event.UNSELECTED,[e.treeId,i])}},createNodeCallback:function(e){if(e.callback.onNodeCreated||e.view.addDiyDom)for(var t=data.getRoot(e);t.createdNodes.length>0;){var n=t.createdNodes.shift();tools.apply(e.view.addDiyDom,[e.treeId,n]),e.callback.onNodeCreated&&e.treeObj.trigger(consts.event.NODECREATED,[e.treeId,n])}},createNodes:function(e,t,n,r,i){if(n&&0!=n.length){var o=data.getRoot(e),s=!r||r.open||!!$$(data.nodeChildren(e,r)[0],e).get(0);o.createdNodes=[];var a,l,u=view.appendNodes(e,t,n,r,i,!0,s);if(r){var c=$$(r,consts.id.UL,e);c.get(0)&&(a=c)}else a=e.treeObj;a&&(i>=0&&(l=a.children()[i]),i>=0&&l?$(l).before(u.join("")):a.append(u.join(""))),view.createNodeCallback(e)}},destroy:function(e){e&&(data.initCache(e),data.initRoot(e),event.unbindTree(e),event.unbindEvent(e),e.treeObj.empty(),delete settings[e.treeId])},expandCollapseNode:function(e,t,n,r,i){var o,s=data.getRoot(e);if(t){var a=data.nodeChildren(e,t),l=data.nodeIsParent(e,t);if(s.expandTriggerFlag&&(o=i,i=function(){o&&o(),t.open?e.treeObj.trigger(consts.event.EXPAND,[e.treeId,t]):e.treeObj.trigger(consts.event.COLLAPSE,[e.treeId,t])},s.expandTriggerFlag=!1),!t.open&&l&&(!$$(t,consts.id.UL,e).get(0)||a&&a.length>0&&!$$(a[0],e).get(0))&&(view.appendParentULDom(e,t),view.createNodeCallback(e)),t.open!=n){var u=$$(t,consts.id.UL,e),c=$$(t,consts.id.SWITCH,e),d=$$(t,consts.id.ICON,e);l?(t.open=!t.open,t.iconOpen&&t.iconClose&&d.attr("style",view.makeNodeIcoStyle(e,t)),t.open?(view.replaceSwitchClass(t,c,consts.folder.OPEN),view.replaceIcoClass(t,d,consts.folder.OPEN),0==r||""==e.view.expandSpeed?(u.show(),tools.apply(i,[])):a&&a.length>0?u.slideDown(e.view.expandSpeed,i):(u.show(),tools.apply(i,[]))):(view.replaceSwitchClass(t,c,consts.folder.CLOSE),view.replaceIcoClass(t,d,consts.folder.CLOSE),0!=r&&""!=e.view.expandSpeed&&a&&a.length>0?u.slideUp(e.view.expandSpeed,i):(u.hide(),tools.apply(i,[])))):tools.apply(i,[])}else tools.apply(i,[])}else tools.apply(i,[])},expandCollapseParentNode:function(e,t,n,r,i){t&&(t.parentTId?(view.expandCollapseNode(e,t,n,r),t.parentTId&&view.expandCollapseParentNode(e,t.getParentNode(),n,r,i)):view.expandCollapseNode(e,t,n,r,i))},expandCollapseSonNode:function(e,t,n,r,i){var o=data.getRoot(e),s=t?data.nodeChildren(e,t):data.nodeChildren(e,o),a=!t&&r,l=data.getRoot(e).expandTriggerFlag;if(data.getRoot(e).expandTriggerFlag=!1,s)for(var u=0,c=s.length;u<c;u++)s[u]&&view.expandCollapseSonNode(e,s[u],n,a);data.getRoot(e).expandTriggerFlag=l,view.expandCollapseNode(e,t,n,r,i)},isSelectedNode:function(e,t){if(!t)return!1;var n,r=data.getRoot(e).curSelectedList;for(n=r.length-1;n>=0;n--)if(t===r[n])return!0;return!1},makeDOMNodeIcon:function(e,t,n){var r=data.nodeName(t,n),i=t.view.nameIsHTML?r:r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");e.push("<span id='",n.tId,consts.id.ICON,"' title='' treeNode",consts.id.ICON," class='",view.makeNodeIcoClass(t,n),"' style='",view.makeNodeIcoStyle(t,n),"'></span><span id='",n.tId,consts.id.SPAN,"' class='",consts.className.NAME,"'>",i,"</span>")},makeDOMNodeLine:function(e,t,n){e.push("<span id='",n.tId,consts.id.SWITCH,"' title='' class='",view.makeNodeLineClass(t,n),"' treeNode",consts.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(e,t,n){e.push("</li>")},makeDOMNodeMainBefore:function(e,t,n){e.push("<li id='",n.tId,"' class='",consts.className.LEVEL,n.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(e,t,n){e.push("</a>")},makeDOMNodeNameBefore:function(e,t,n){var r=data.nodeTitle(t,n),i=view.makeNodeUrl(t,n),o=view.makeNodeFontCss(t,n),s=view.makeNodeClasses(t,n),a=[];for(var l in o)a.push(l,":",o[l],";");e.push("<a id='",n.tId,consts.id.A,"' class='",consts.className.LEVEL,n.level,s.add?" "+s.add.join(" "):"","' treeNode",consts.id.A,n.click?' onclick="'+n.click+'"':"",null!=i&&i.length>0?" href='"+i+"'":""," target='",view.makeNodeTarget(n),"' style='",a.join(""),"'"),tools.apply(t.view.showTitle,[t.treeId,n],t.view.showTitle)&&r&&e.push("title='",r.replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'"),e.push(">")},makeNodeFontCss:function(e,t){var n=tools.apply(e.view.fontCss,[e.treeId,t],e.view.fontCss);return n&&"function"!=typeof n?n:{}},makeNodeClasses:function(e,t){var n=tools.apply(e.view.nodeClasses,[e.treeId,t],e.view.nodeClasses);return n&&"function"!=typeof n?n:{add:[],remove:[]}},makeNodeIcoClass:function(e,t){var n=["ico"];if(!t.isAjaxing){var r=data.nodeIsParent(e,t);n[0]=(t.iconSkin?t.iconSkin+"_":"")+n[0],r?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU)}return consts.className.BUTTON+" "+n.join("_")},makeNodeIcoStyle:function(e,t){var n=[];if(!t.isAjaxing){var r=data.nodeIsParent(e,t)&&t.iconOpen&&t.iconClose?t.open?t.iconOpen:t.iconClose:t[e.data.key.icon];r&&n.push("background:url(",r,") 0 0 no-repeat;"),0!=e.view.showIcon&&tools.apply(e.view.showIcon,[e.treeId,t],!0)||n.push("display:none;")}return n.join("")},makeNodeLineClass:function(e,t){var n=[];return e.view.showLine?0==t.level&&t.isFirstNode&&t.isLastNode?n.push(consts.line.ROOT):0==t.level&&t.isFirstNode?n.push(consts.line.ROOTS):t.isLastNode?n.push(consts.line.BOTTOM):n.push(consts.line.CENTER):n.push(consts.line.NOLINE),data.nodeIsParent(e,t)?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU),view.makeNodeLineClassEx(t)+n.join("_")},makeNodeLineClassEx:function(e){return consts.className.BUTTON+" "+consts.className.LEVEL+e.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(e){return e.target||"_blank"},makeNodeUrl:function(e,t){var n=e.data.key.url;return t[n]?t[n]:null},makeUlHtml:function(e,t,n,r){n.push("<ul id='",t.tId,consts.id.UL,"' class='",consts.className.LEVEL,t.level," ",view.makeUlLineClass(e,t),"' style='display:",t.open?"block":"none","'>"),n.push(r),n.push("</ul>")},makeUlLineClass:function(e,t){return e.view.showLine&&!t.isLastNode?consts.line.LINE:""},removeChildNodes:function(e,t){if(t){var n=data.nodeChildren(e,t);if(n){for(var r=0,i=n.length;r<i;r++)data.removeNodeCache(e,n[r]);if(data.removeSelectedNode(e),delete t[e.data.key.children],e.data.keep.parent)$$(t,consts.id.UL,e).empty();else{data.nodeIsParent(e,t,!1),t.open=!1;var o=$$(t,consts.id.SWITCH,e),s=$$(t,consts.id.ICON,e);view.replaceSwitchClass(t,o,consts.folder.DOCU),view.replaceIcoClass(t,s,consts.folder.DOCU),$$(t,consts.id.UL,e).remove()}}}},scrollIntoView:function(e,t){if(t)if("undefined"!=typeof Element&&"undefined"!=typeof HTMLElement)Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(e){"use strict";function t(e,t){return{start:e,length:t,end:e+t}}function n(t,n){return!1===e||n.start<t.end&&t.start<n.end?Math.max(t.end-n.length,Math.min(n.start,t.start)):(t.start+t.end-n.length)/2}function r(e,t){return{x:e,y:t,translate:function(n,i){return r(e+n,t+i)}}}function i(e,t){for(;e;)t=t.translate(e.offsetLeft,e.offsetTop),e=e.offsetParent;return t}for(var o,s=i(this,r(0,0)),a=r(this.offsetWidth,this.offsetHeight),l=this.parentNode;l instanceof HTMLElement;)o=i(l,r(l.clientLeft,l.clientTop)),l.scrollLeft=n(t(s.x-o.x,a.x),t(l.scrollLeft,l.clientWidth)),l.scrollTop=n(t(s.y-o.y,a.y),t(l.scrollTop,l.clientHeight)),s=s.translate(-l.scrollLeft,-l.scrollTop),l=l.parentNode}),t.scrollIntoViewIfNeeded();else{var n=e.treeObj.get(0).getBoundingClientRect(),r=t.getBoundingClientRect();(r.top<n.top||r.bottom>n.bottom||r.right>n.right||r.left<n.left)&&t.scrollIntoView()}},setFirstNode:function(e,t){var n=data.nodeChildren(e,t);n.length>0&&(n[0].isFirstNode=!0)},setLastNode:function(e,t){var n=data.nodeChildren(e,t);n.length>0&&(n[n.length-1].isLastNode=!0)},removeNode:function(e,t){var n=data.getRoot(e),r=t.parentTId?t.getParentNode():n;if(t.isFirstNode=!1,t.isLastNode=!1,t.getPreNode=function(){return null},t.getNextNode=function(){return null},data.getNodeCache(e,t.tId)){$$(t,e).remove(),data.removeNodeCache(e,t),data.removeSelectedNode(e,t);for(var i=data.nodeChildren(e,r),o=0,s=i.length;o<s;o++)if(i[o].tId==t.tId){i.splice(o,1);break}view.setFirstNode(e,r),view.setLastNode(e,r);var a,l,u,c=i.length;if(e.data.keep.parent||0!=c){if(e.view.showLine&&c>0){var d=i[c-1];if(a=$$(d,consts.id.UL,e),l=$$(d,consts.id.SWITCH,e),u=$$(d,consts.id.ICON,e),r==n)if(1==i.length)view.replaceSwitchClass(d,l,consts.line.ROOT);else{var h=$$(i[0],consts.id.SWITCH,e);view.replaceSwitchClass(i[0],h,consts.line.ROOTS),view.replaceSwitchClass(d,l,consts.line.BOTTOM)}else view.replaceSwitchClass(d,l,consts.line.BOTTOM);a.removeClass(consts.line.LINE)}}else data.nodeIsParent(e,r,!1),r.open=!1,delete r[e.data.key.children],a=$$(r,consts.id.UL,e),l=$$(r,consts.id.SWITCH,e),u=$$(r,consts.id.ICON,e),view.replaceSwitchClass(r,l,consts.folder.DOCU),view.replaceIcoClass(r,u,consts.folder.DOCU),a.css("display","none")}},replaceIcoClass:function(e,t,n){if(t&&!e.isAjaxing){var r=t.attr("class");if(null!=r){var i=r.split("_");switch(n){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:i[i.length-1]=n}t.attr("class",i.join("_"))}}},replaceSwitchClass:function(e,t,n){if(t){var r=t.attr("class");if(null!=r){var i=r.split("_");switch(n){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:i[0]=view.makeNodeLineClassEx(e)+n;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:i[1]=n}t.attr("class",i.join("_")),n!==consts.folder.DOCU?t.removeAttr("disabled"):t.attr("disabled","disabled")}}},selectNode:function(e,t,n){n||view.cancelPreSelectedNode(e,null,t),$$(t,consts.id.A,e).addClass(consts.node.CURSELECTED),data.addSelectedNode(e,t),e.treeObj.trigger(consts.event.SELECTED,[e.treeId,t])},setNodeFontCss:function(e,t){var n=$$(t,consts.id.A,e),r=view.makeNodeFontCss(e,t);r&&n.css(r)},setNodeClasses:function(e,t){var n=$$(t,consts.id.A,e),r=view.makeNodeClasses(e,t);"add"in r&&r.add.length&&n.addClass(r.add.join(" ")),"remove"in r&&r.remove.length&&n.removeClass(r.remove.join(" "))},setNodeLineIcos:function(e,t){if(t){var n=$$(t,consts.id.SWITCH,e),r=$$(t,consts.id.UL,e),i=$$(t,consts.id.ICON,e),o=view.makeUlLineClass(e,t);0==o.length?r.removeClass(consts.line.LINE):r.addClass(o),n.attr("class",view.makeNodeLineClass(e,t)),data.nodeIsParent(e,t)?n.removeAttr("disabled"):n.attr("disabled","disabled"),i.removeAttr("style"),i.attr("style",view.makeNodeIcoStyle(e,t)),i.attr("class",view.makeNodeIcoClass(e,t))}},setNodeName:function(e,t){var n=data.nodeTitle(e,t),r=$$(t,consts.id.SPAN,e);(r.empty(),e.view.nameIsHTML?r.html(data.nodeName(e,t)):r.text(data.nodeName(e,t)),tools.apply(e.view.showTitle,[e.treeId,t],e.view.showTitle))&&$$(t,consts.id.A,e).attr("title",n||"")},setNodeTarget:function(e,t){$$(t,consts.id.A,e).attr("target",view.makeNodeTarget(t))},setNodeUrl:function(e,t){var n=$$(t,consts.id.A,e),r=view.makeNodeUrl(e,t);null==r||0==r.length?n.removeAttr("href"):n.attr("href",r)},switchNode:function(e,t){if(t.open||!tools.canAsync(e,t))view.expandCollapseNode(e,t,!t.open);else if(e.async.enable){if(!view.asyncNode(e,t))return void view.expandCollapseNode(e,t,!t.open)}else t&&view.expandCollapseNode(e,t,!t.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(e){var t=data.getZTreeTools(e);return t||null},destroy:function(e){if(e&&e.length>0)view.destroy(data.getSetting(e));else for(var t in settings)view.destroy(settings[t])},init:function(e,t,n){var r=tools.clone(_setting);$.extend(!0,r,t),r.treeId=e.attr("id"),r.treeObj=e,r.treeObj.empty(),settings[r.treeId]=r,void 0===document.body.style.maxHeight&&(r.view.expandSpeed=""),data.initRoot(r);var i=data.getRoot(r);n=n?tools.clone(tools.isArray(n)?n:[n]):[],r.data.simpleData.enable?data.nodeChildren(r,i,data.transformTozTreeFormat(r,n)):data.nodeChildren(r,i,n),data.initCache(r),event.unbindTree(r),event.bindTree(r),event.unbindEvent(r),event.bindEvent(r);var o={setting:r,addNodes:function(e,t,n,i){e||(e=null);var o=data.nodeIsParent(r,e);if(e&&!o&&r.data.keep.leaf)return null;var s=parseInt(t,10);if(isNaN(s)?(i=!!n,n=t,t=-1):t=s,!n)return null;var a=tools.clone(tools.isArray(n)?n:[n]);function l(){view.addNodes(r,e,t,a,1==i)}return tools.canAsync(r,e)?view.asyncNode(r,e,i,l):l(),a},cancelSelectedNode:function(e){view.cancelPreSelectedNode(r,e)},destroy:function(){view.destroy(r)},expandAll:function(e){return e=!!e,view.expandCollapseSonNode(r,null,e,!0),e},expandNode:function(e,t,n,i,o){return e&&data.nodeIsParent(r,e)?(!0!==t&&!1!==t&&(t=!e.open),(o=!!o)&&t&&0==tools.apply(r.callback.beforeExpand,[r.treeId,e],!0)||o&&!t&&0==tools.apply(r.callback.beforeCollapse,[r.treeId,e],!0)?null:(t&&e.parentTId&&view.expandCollapseParentNode(r,e.getParentNode(),t,!1),t!==e.open||n?(data.getRoot(r).expandTriggerFlag=o,!tools.canAsync(r,e)&&n?view.expandCollapseSonNode(r,e,t,!0,s):(e.open=!t,view.switchNode(this.setting,e),s()),t):null)):null;function s(){var t=$$(e,consts.id.A,r).get(0);t&&!1!==i&&view.scrollIntoView(r,t)}},getNodes:function(){return data.getNodes(r)},getNodeByParam:function(e,t,n){return e?data.getNodeByParam(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t):null},getNodeByTId:function(e){return data.getNodeCache(r,e)},getNodesByParam:function(e,t,n){return e?data.getNodesByParam(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t):null},getNodesByParamFuzzy:function(e,t,n){return e?data.getNodesByParamFuzzy(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t):null},getNodesByFilter:function(e,t,n,i){return t=!!t,e&&"function"==typeof e?data.getNodesByFilter(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t,i):t?null:[]},getNodeIndex:function(e){if(!e)return null;for(var t=e.parentTId?e.getParentNode():data.getRoot(r),n=data.nodeChildren(r,t),i=0,o=n.length;i<o;i++)if(n[i]==e)return i;return-1},getSelectedNodes:function(){for(var e=[],t=data.getRoot(r).curSelectedList,n=0,i=t.length;n<i;n++)e.push(t[n]);return e},isSelectedNode:function(e){return data.isSelectedNode(r,e)},reAsyncChildNodesPromise:function(e,t,n){return new Promise((function(r,i){try{o.reAsyncChildNodes(e,t,n,(function(){r(e)}))}catch(e){i(e)}}))},reAsyncChildNodes:function(e,t,n,i){if(this.setting.async.enable){var o=!e;if(o&&(e=data.getRoot(r)),"refresh"==t){for(var s=data.nodeChildren(r,e),a=0,l=s?s.length:0;a<l;a++)data.removeNodeCache(r,s[a]);if(data.removeSelectedNode(r),data.nodeChildren(r,e,[]),o)this.setting.treeObj.empty();else $$(e,consts.id.UL,r).empty()}view.asyncNode(this.setting,o?null:e,!!n,i)}},refresh:function(){this.setting.treeObj.empty();var e=data.getRoot(r),t=data.nodeChildren(r,e);data.initRoot(r),data.nodeChildren(r,e,t),data.initCache(r),view.createNodes(r,0,data.nodeChildren(r,e),null,-1)},removeChildNodes:function(e){if(!e)return null;var t=data.nodeChildren(r,e);return view.removeChildNodes(r,e),t||null},removeNode:function(e,t){e&&((t=!!t)&&0==tools.apply(r.callback.beforeRemove,[r.treeId,e],!0)||(view.removeNode(r,e),t&&this.setting.treeObj.trigger(consts.event.REMOVE,[r.treeId,e])))},selectNode:function(e,t,n){if(e&&tools.uCanDo(r)){if(t=r.view.selectedMulti&&t,e.parentTId)view.expandCollapseParentNode(r,e.getParentNode(),!0,!1,(function(){if(n)return;var t=$$(e,r).get(0);view.scrollIntoView(r,t)}));else if(!n)try{$$(e,r).focus().blur()}catch(e){}view.selectNode(r,e,t)}},transformTozTreeNodes:function(e){return data.transformTozTreeFormat(r,e)},transformToArray:function(e){return data.transformToArrayFormat(r,e)},updateNode:function(e,t){e&&($$(e,r).get(0)&&tools.uCanDo(r)&&(view.setNodeName(r,e),view.setNodeTarget(r,e),view.setNodeUrl(r,e),view.setNodeLineIcos(r,e),view.setNodeFontCss(r,e),view.setNodeClasses(r,e)))}};i.treeTools=o,data.setZTreeTools(r,o);var s=data.nodeChildren(r,i);return s&&s.length>0?view.createNodes(r,0,s,null,-1):r.async.enable&&r.async.url&&""!==r.async.url&&view.asyncNode(r),o}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(e){var t={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},n={check:{enable:!1,autoCheckTrigger:!1,chkStyle:t.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:t.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},r={onCheckNode:function(e,t){if(!0===t.chkDisabled)return!1;var n=u.getSetting(e.data.treeId);if(0==s.apply(n.callback.beforeCheck,[n.treeId,t],!0))return!0;var r=u.nodeChecked(n,t);u.nodeChecked(n,t,!r),l.checkNodeRelation(n,t);var i=c(t,a.id.CHECK,n);return l.setChkClass(n,i,t),l.repairParentChkClassWithSelf(n,t),n.treeObj.trigger(a.event.CHECK,[e,n.treeId,t]),!0},onMouseoverCheck:function(e,t){if(!0===t.chkDisabled)return!1;var n=u.getSetting(e.data.treeId),r=c(t,a.id.CHECK,n);return t.check_Focus=!0,l.setChkClass(n,r,t),!0},onMouseoutCheck:function(e,t){if(!0===t.chkDisabled)return!1;var n=u.getSetting(e.data.treeId),r=c(t,a.id.CHECK,n);return t.check_Focus=!1,l.setChkClass(n,r,t),!0}},i={tools:{},view:{checkNodeRelation:function(e,t){var n,r,i,o=a.radio,s=u.nodeChecked(e,t);if(e.check.chkStyle==o.STYLE){var d=u.getRadioCheckedList(e);if(s)if(e.check.radioType==o.TYPE_ALL){for(r=d.length-1;r>=0;r--){n=d[r],u.nodeChecked(e,n)&&n!=t&&(u.nodeChecked(e,n,!1),d.splice(r,1),l.setChkClass(e,c(n,a.id.CHECK,e),n),n.parentTId!=t.parentTId&&l.repairParentChkClassWithSelf(e,n))}d.push(t)}else{var h=t.parentTId?t.getParentNode():u.getRoot(e);for(r=0,i=(p=u.nodeChildren(e,h)).length;r<i;r++){n=p[r],u.nodeChecked(e,n)&&n!=t&&(u.nodeChecked(e,n,!1),l.setChkClass(e,c(n,a.id.CHECK,e),n))}}else if(e.check.radioType==o.TYPE_ALL)for(r=0,i=d.length;r<i;r++)if(t==d[r]){d.splice(r,1);break}}else{var p=u.nodeChildren(e,t);s&&(!p||0==p.length||e.check.chkboxType.Y.indexOf("s")>-1)&&l.setSonNodeCheckBox(e,t,!0),s||p&&0!=p.length&&!(e.check.chkboxType.N.indexOf("s")>-1)||l.setSonNodeCheckBox(e,t,!1),s&&e.check.chkboxType.Y.indexOf("p")>-1&&l.setParentNodeCheckBox(e,t,!0),!s&&e.check.chkboxType.N.indexOf("p")>-1&&l.setParentNodeCheckBox(e,t,!1)}},makeChkClass:function(e,t){var n=a.checkbox,r=a.radio,i="",o=u.nodeChecked(e,t);i=!0===t.chkDisabled?n.DISABLED:t.halfCheck?n.PART:e.check.chkStyle==r.STYLE?t.check_Child_State<1?n.FULL:n.PART:o?2===t.check_Child_State||-1===t.check_Child_State?n.FULL:n.PART:t.check_Child_State<1?n.FULL:n.PART;var s=e.check.chkStyle+"_"+(o?n.TRUE:n.FALSE)+"_"+i;return s=t.check_Focus&&!0!==t.chkDisabled?s+"_"+n.FOCUS:s,a.className.BUTTON+" "+n.DEFAULT+" "+s},repairAllChk:function(e,t){if(e.check.enable&&e.check.chkStyle===a.checkbox.STYLE)for(var n=u.getRoot(e),r=u.nodeChildren(e,n),i=0,o=r.length;i<o;i++){var s=r[i];!0!==s.nocheck&&!0!==s.chkDisabled&&u.nodeChecked(e,s,t),l.setSonNodeCheckBox(e,s,t)}},repairChkClass:function(e,t){if(t&&(u.makeChkFlag(e,t),!0!==t.nocheck)){var n=c(t,a.id.CHECK,e);l.setChkClass(e,n,t)}},repairParentChkClass:function(e,t){if(t&&t.parentTId){var n=t.getParentNode();l.repairChkClass(e,n),l.repairParentChkClass(e,n)}},repairParentChkClassWithSelf:function(e,t){if(t){var n=u.nodeChildren(e,t);n&&n.length>0?l.repairParentChkClass(e,n[0]):l.repairParentChkClass(e,t)}},repairSonChkDisabled:function(e,t,n,r){if(t){t.chkDisabled!=n&&(t.chkDisabled=n),l.repairChkClass(e,t);var i=u.nodeChildren(e,t);if(i&&r)for(var o=0,s=i.length;o<s;o++){var a=i[o];l.repairSonChkDisabled(e,a,n,r)}}},repairParentChkDisabled:function(e,t,n,r){t&&(t.chkDisabled!=n&&r&&(t.chkDisabled=n),l.repairChkClass(e,t),l.repairParentChkDisabled(e,t.getParentNode(),n,r))},setChkClass:function(e,t,n){t&&(!0===n.nocheck?t.hide():t.show(),t.attr("class",l.makeChkClass(e,n)))},setParentNodeCheckBox:function(e,t,n,r){var i=c(t,a.id.CHECK,e);if(r||(r=t),u.makeChkFlag(e,t),!0!==t.nocheck&&!0!==t.chkDisabled&&(u.nodeChecked(e,t,n),l.setChkClass(e,i,t),e.check.autoCheckTrigger&&t!=r&&e.treeObj.trigger(a.event.CHECK,[null,e.treeId,t])),t.parentTId){var o=!0;if(!n)for(var s=u.nodeChildren(e,t.getParentNode()),d=0,h=s.length;d<h;d++){var p=s[d],f=u.nodeChecked(e,p);if(!0!==p.nocheck&&!0!==p.chkDisabled&&f||(!0===p.nocheck||!0===p.chkDisabled)&&p.check_Child_State>0){o=!1;break}}o&&l.setParentNodeCheckBox(e,t.getParentNode(),n,r)}},setSonNodeCheckBox:function(e,t,n,r){if(t){var i=c(t,a.id.CHECK,e);r||(r=t);var o=!1,s=u.nodeChildren(e,t);if(s)for(var d=0,h=s.length;d<h;d++){var p=s[d];l.setSonNodeCheckBox(e,p,n,r),!0===p.chkDisabled&&(o=!0)}t!=u.getRoot(e)&&!0!==t.chkDisabled&&(o&&!0!==t.nocheck&&u.makeChkFlag(e,t),!0!==t.nocheck&&!0!==t.chkDisabled?(u.nodeChecked(e,t,n),o||(t.check_Child_State=s&&s.length>0?n?2:0:-1)):t.check_Child_State=-1,l.setChkClass(e,i,t),e.check.autoCheckTrigger&&t!=r&&!0!==t.nocheck&&!0!==t.chkDisabled&&e.treeObj.trigger(a.event.CHECK,[null,e.treeId,t]))}}},event:{},data:{getRadioCheckedList:function(e){for(var t=u.getRoot(e).radioCheckedList,n=0,r=t.length;n<r;n++)u.getNodeCache(e,t[n].tId)||(t.splice(n,1),n--,r--);return t},getCheckStatus:function(e,t){if(!e.check.enable||t.nocheck||t.chkDisabled)return null;var n=u.nodeChecked(e,t);return{checked:n,half:t.halfCheck?t.halfCheck:e.check.chkStyle==a.radio.STYLE?2===t.check_Child_State:n?t.check_Child_State>-1&&t.check_Child_State<2:t.check_Child_State>0}},getTreeCheckedNodes:function(e,t,n,r){if(!t)return[];var i=n&&e.check.chkStyle==a.radio.STYLE&&e.check.radioType==a.radio.TYPE_ALL;r=r||[];for(var o=0,s=t.length;o<s;o++){var l=t[o],c=u.nodeChildren(e,l),d=u.nodeChecked(e,l);if(!0!==l.nocheck&&!0!==l.chkDisabled&&d==n&&(r.push(l),i))break;if(u.getTreeCheckedNodes(e,c,n,r),i&&r.length>0)break}return r},getTreeChangeCheckedNodes:function(e,t,n){if(!t)return[];n=n||[];for(var r=0,i=t.length;r<i;r++){var o=t[r],s=u.nodeChildren(e,o),a=u.nodeChecked(e,o);!0!==o.nocheck&&!0!==o.chkDisabled&&a!=o.checkedOld&&n.push(o),u.getTreeChangeCheckedNodes(e,s,n)}return n},makeChkFlag:function(e,t){if(t){var n=-1,r=u.nodeChildren(e,t);if(r)for(var i=0,o=r.length;i<o;i++){var s=r[i],l=u.nodeChecked(e,s),c=-1;if(e.check.chkStyle==a.radio.STYLE){if(2==(c=!0===s.nocheck||!0===s.chkDisabled?s.check_Child_State:!0===s.halfCheck||l||s.check_Child_State>0?2:0)){n=2;break}0==c&&(n=0)}else if(e.check.chkStyle==a.checkbox.STYLE){if(1===(c=!0===s.nocheck||!0===s.chkDisabled?s.check_Child_State:!0===s.halfCheck?1:l?-1===s.check_Child_State||2===s.check_Child_State?2:1:s.check_Child_State>0?1:0)){n=1;break}if(2===c&&n>-1&&i>0&&c!==n){n=1;break}if(2===n&&c>-1&&c<2){n=1;break}c>-1&&(n=c)}}t.check_Child_State=n}}}};e.extend(!0,e.fn.zTree.consts,t),e.extend(!0,e.fn.zTree._z,i);var o=e.fn.zTree,s=o._z.tools,a=o.consts,l=o._z.view,u=o._z.data,c=(o._z.event,s.$);u.nodeChecked=function(e,t,n){if(!t)return!1;var r=e.data.key.checked;return void 0!==n?("string"==typeof n&&(n=s.eqs(n,"true")),n=!!n,t[r]=n):"string"==typeof t[r]?t[r]=s.eqs(t[r],"true"):t[r]=!!t[r],t[r]},u.exSetting(n),u.addInitBind((function(e){var t=e.treeObj,n=a.event;t.bind(n.CHECK,(function(t,n,r,i){t.srcEvent=n,s.apply(e.callback.onCheck,[t,r,i])}))})),u.addInitUnBind((function(e){var t=e.treeObj,n=a.event;t.unbind(n.CHECK)})),u.addInitCache((function(e){})),u.addInitNode((function(e,t,n,r,i,o,l){if(n){var c=u.nodeChecked(e,n);if(n.checkedOld=c,"string"==typeof n.nocheck&&(n.nocheck=s.eqs(n.nocheck,"true")),n.nocheck=!!n.nocheck||e.check.nocheckInherit&&r&&!!r.nocheck,"string"==typeof n.chkDisabled&&(n.chkDisabled=s.eqs(n.chkDisabled,"true")),n.chkDisabled=!!n.chkDisabled||e.check.chkDisabledInherit&&r&&!!r.chkDisabled,"string"==typeof n.halfCheck&&(n.halfCheck=s.eqs(n.halfCheck,"true")),n.halfCheck=!!n.halfCheck,n.check_Child_State=-1,n.check_Focus=!1,n.getCheckStatus=function(){return u.getCheckStatus(e,n)},e.check.chkStyle==a.radio.STYLE&&e.check.radioType==a.radio.TYPE_ALL&&c)u.getRoot(e).radioCheckedList.push(n)}})),u.addInitProxy((function(e){var t=e.target,n=u.getSetting(e.data.treeId),i="",o=null,l="",c=null;if(s.eqs(e.type,"mouseover")?n.check.enable&&s.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+a.id.CHECK)&&(i=s.getNodeMainDom(t).id,l="mouseoverCheck"):s.eqs(e.type,"mouseout")?n.check.enable&&s.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+a.id.CHECK)&&(i=s.getNodeMainDom(t).id,l="mouseoutCheck"):s.eqs(e.type,"click")&&n.check.enable&&s.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+a.id.CHECK)&&(i=s.getNodeMainDom(t).id,l="checkNode"),i.length>0)switch(o=u.getNodeCache(n,i),l){case"checkNode":c=r.onCheckNode;break;case"mouseoverCheck":c=r.onMouseoverCheck;break;case"mouseoutCheck":c=r.onMouseoutCheck}return{stop:"checkNode"===l,node:o,nodeEventType:l,nodeEventCallback:c,treeEventType:"",treeEventCallback:null}}),!0),u.addInitRoot((function(e){u.getRoot(e).radioCheckedList=[]})),u.addBeforeA((function(e,t,n){e.check.enable&&(u.makeChkFlag(e,t),n.push("<span ID='",t.tId,a.id.CHECK,"' class='",l.makeChkClass(e,t),"' treeNode",a.id.CHECK,!0===t.nocheck?" style='display:none;'":"","></span>"))})),u.addZTreeTools((function(e,t){t.checkNode=function(t,n,r,i){var o=u.nodeChecked(e,t);if(!0!==t.chkDisabled&&(!0!==n&&!1!==n&&(n=!o),i=!!i,(o!==n||r)&&(!i||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,t],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&!0!==t.nocheck)){u.nodeChecked(e,t,n);var d=c(t,a.id.CHECK,this.setting);(r||this.setting.check.chkStyle===a.radio.STYLE)&&l.checkNodeRelation(this.setting,t),l.setChkClass(this.setting,d,t),l.repairParentChkClassWithSelf(this.setting,t),i&&this.setting.treeObj.trigger(a.event.CHECK,[null,this.setting.treeId,t])}},t.checkAllNodes=function(e){l.repairAllChk(this.setting,!!e)},t.getCheckedNodes=function(t){t=!1!==t;var n=u.nodeChildren(e,u.getRoot(this.setting));return u.getTreeCheckedNodes(this.setting,n,t)},t.getChangeCheckedNodes=function(){var t=u.nodeChildren(e,u.getRoot(this.setting));return u.getTreeChangeCheckedNodes(this.setting,t)},t.setChkDisabled=function(e,t,n,r){t=!!t,n=!!n,r=!!r,l.repairSonChkDisabled(this.setting,e,t,r),l.repairParentChkDisabled(this.setting,e.getParentNode(),t,n)};var n=t.updateNode;t.updateNode=function(e,r){if((n&&n.apply(t,arguments),e&&this.setting.check.enable)&&(c(e,this.setting).get(0)&&s.uCanDo(this.setting))){var i=c(e,a.id.CHECK,this.setting);1!=r&&this.setting.check.chkStyle!==a.radio.STYLE||l.checkNodeRelation(this.setting,e),l.setChkClass(this.setting,i,e),l.repairParentChkClassWithSelf(this.setting,e)}}}));var d=l.createNodes;l.createNodes=function(e,t,n,r,i){d&&d.apply(l,arguments),n&&l.repairParentChkClassWithSelf(e,r)};var h=l.removeNode;l.removeNode=function(e,t){var n=t.getParentNode();h&&h.apply(l,arguments),t&&n&&(l.repairChkClass(e,n),l.repairParentChkClass(e,n))};var p=l.appendNodes;l.appendNodes=function(e,t,n,r,i,o,s){var a="";return p&&(a=p.apply(l,arguments)),r&&u.makeChkFlag(e,r),a}}(jQuery),function(e){var t={event:{DRAG:"ztree_drag",DROP:"ztree_drop",RENAME:"ztree_rename",DRAGMOVE:"ztree_dragmove"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},n={onHoverOverNode:function(e,t){var r=u.getSetting(e.data.treeId),i=u.getRoot(r);i.curHoverNode!=t&&n.onHoverOutNode(e),i.curHoverNode=t,l.addHoverDom(r,t)},onHoverOutNode:function(e,t){var n=u.getSetting(e.data.treeId),r=u.getRoot(n);r.curHoverNode&&!u.isSelectedNode(n,r.curHoverNode)&&(l.removeTreeDom(n,r.curHoverNode),r.curHoverNode=null)},onMousedownNode:function(n,r){var i,o,d=u.getSetting(n.data.treeId),h=u.getRoot(d),p=u.getRoots();if(2==n.button||!d.edit.enable||!d.edit.drag.isCopy&&!d.edit.drag.isMove)return!0;var f=n.target,m=u.getRoot(d).curSelectedList,g=[];if(u.isSelectedNode(d,r))for(i=0,o=m.length;i<o;i++){if(m[i].editNameFlag&&s.eqs(f.tagName,"input")&&null!==f.getAttribute("treeNode"+a.id.INPUT))return!0;if(g.push(m[i]),g[0].parentTId!==m[i].parentTId){g=[r];break}}else g=[r];l.editNodeBlur=!0,l.cancelCurEditNode(d);var v,y,_,b,w,x=e(d.treeObj.get(0).ownerDocument),k=e(d.treeObj.get(0).ownerDocument.body),S=!1,T=d,E=d,D=null,C=null,M=null,A=a.move.TYPE_INNER,I=n.clientX,L=n.clientY,O=(new Date).getTime();function N(n){if(0==h.dragFlag&&Math.abs(I-n.clientX)<d.edit.drag.minMoveSize&&Math.abs(L-n.clientY)<d.edit.drag.minMoveSize)return!0;var r,i,o,f,m;if(k.css("cursor","pointer"),0==h.dragFlag){if(0==s.apply(d.callback.beforeDrag,[d.treeId,g],!0))return R(n),!0;for(r=0,i=g.length;r<i;r++)0==r&&(h.dragNodeShowBefore=[]),o=g[r],u.nodeIsParent(d,o)&&o.open?(l.expandCollapseNode(d,o,!o.open),h.dragNodeShowBefore[o.tId]=!0):h.dragNodeShowBefore[o.tId]=!1;h.dragFlag=1,p.showHoverDom=!1,s.showIfameMask(d,!0);var E=!0,N=-1;if(g.length>1){var P=g[0].parentTId?u.nodeChildren(d,g[0].getParentNode()):u.getNodes(d);for(m=[],r=0,i=P.length;r<i;r++)if(void 0!==h.dragNodeShowBefore[P[r].tId]&&(E&&N>-1&&N+1!==r&&(E=!1),m.push(P[r]),N=r),g.length===m.length){g=m;break}}for(E&&(b=g[0].getPreNode(),w=g[g.length-1].getNextNode()),v=c("<ul class='zTreeDragUL'></ul>",d),r=0,i=g.length;r<i;r++)(o=g[r]).editNameFlag=!1,l.selectNode(d,o,r>0),l.removeTreeDom(d,o),r>d.edit.drag.maxShowNodeNum-1||((f=c("<li id='"+o.tId+"_tmp'></li>",d)).append(c(o,a.id.A,d).clone()),f.css("padding","0"),f.children("#"+o.tId+a.id.A).removeClass(a.node.CURSELECTED),v.append(f),r==d.edit.drag.maxShowNodeNum-1&&(f=c("<li id='"+o.tId+"_moretmp'><a> ... </a></li>",d),v.append(f)));v.attr("id",g[0].tId+a.id.UL+"_tmp"),v.addClass(d.treeObj.attr("class")),v.appendTo(k),(y=c("<span class='tmpzTreeMove_arrow'></span>",d)).attr("id","zTreeMove_arrow_tmp"),y.appendTo(k),d.treeObj.trigger(a.event.DRAG,[n,d.treeId,g])}if(1==h.dragFlag){if(_&&y.attr("id")==n.target.id&&M&&n.clientX+x.scrollLeft()+2>e("#"+M+a.id.A,_).offset().left){var F=e("#"+M+a.id.A,_);n.target=F.length>0?F.get(0):n.target}else _&&(_.removeClass(a.node.TMPTARGET_TREE),M&&e("#"+M+a.id.A,_).removeClass(a.node.TMPTARGET_NODE+"_"+a.move.TYPE_PREV).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_NEXT).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_INNER));_=null,M=null,S=!1,T=d;var j=u.getSettings();for(var Y in j)j[Y].treeId&&j[Y].edit.enable&&j[Y].treeId!=d.treeId&&(n.target.id==j[Y].treeId||e(n.target).parents("#"+j[Y].treeId).length>0)&&(S=!0,T=j[Y]);var V=x.scrollTop(),H=x.scrollLeft(),B=T.treeObj.offset(),U=T.treeObj.get(0).scrollHeight,z=T.treeObj.get(0).scrollWidth,q=n.clientY+V-B.top,W=T.treeObj.height()+B.top-n.clientY-V,$=n.clientX+H-B.left,G=T.treeObj.width()+B.left-n.clientX-H,K=q<d.edit.drag.borderMax&&q>d.edit.drag.borderMin,Z=W<d.edit.drag.borderMax&&W>d.edit.drag.borderMin,X=$<d.edit.drag.borderMax&&$>d.edit.drag.borderMin,J=G<d.edit.drag.borderMax&&G>d.edit.drag.borderMin,Q=q>d.edit.drag.borderMin&&W>d.edit.drag.borderMin&&$>d.edit.drag.borderMin&&G>d.edit.drag.borderMin,ee=K&&T.treeObj.scrollTop()<=0,te=Z&&T.treeObj.scrollTop()+T.treeObj.height()+10>=U,ne=X&&T.treeObj.scrollLeft()<=0,re=J&&T.treeObj.scrollLeft()+T.treeObj.width()+10>=z;if(n.target&&s.isChildOrSelf(n.target,T.treeId)){for(var ie=n.target;ie&&ie.tagName&&!s.eqs(ie.tagName,"li")&&ie.id!=T.treeId;)ie=ie.parentNode;var oe=!0;for(r=0,i=g.length;r<i;r++){if(o=g[r],ie.id===o.tId){oe=!1;break}if(c(o,d).find("#"+ie.id).length>0){oe=!1;break}}oe&&n.target&&s.isChildOrSelf(n.target,ie.id+a.id.A)&&(_=e(ie),M=ie.id)}o=g[0],Q&&s.isChildOrSelf(n.target,T.treeId)&&(!_&&(n.target.id==T.treeId||ee||te||ne||re)&&(S||!S&&o.parentTId)&&(_=T.treeObj),K?T.treeObj.scrollTop(T.treeObj.scrollTop()-10):Z&&T.treeObj.scrollTop(T.treeObj.scrollTop()+10),X?T.treeObj.scrollLeft(T.treeObj.scrollLeft()-10):J&&T.treeObj.scrollLeft(T.treeObj.scrollLeft()+10),_&&_!=T.treeObj&&_.offset().left<T.treeObj.offset().left&&T.treeObj.scrollLeft(T.treeObj.scrollLeft()+_.offset().left-T.treeObj.offset().left)),v.css({top:n.clientY+V+3+"px",left:n.clientX+H+3+"px"});var se=0,ae=0;if(_&&_.attr("id")!=T.treeId){var le=null==M?null:u.getNodeCache(T,M),ue=(n.ctrlKey||n.metaKey)&&d.edit.drag.isMove&&d.edit.drag.isCopy||!d.edit.drag.isMove&&d.edit.drag.isCopy,ce=!(!b||M!==b.tId),de=!(!w||M!==w.tId),he=o.parentTId&&o.parentTId==M,pe=(ue||!de)&&s.apply(T.edit.drag.prev,[T.treeId,g,le],!!T.edit.drag.prev),fe=(ue||!ce)&&s.apply(T.edit.drag.next,[T.treeId,g,le],!!T.edit.drag.next),me=(ue||!he)&&!(T.data.keep.leaf&&!u.nodeIsParent(d,le))&&s.apply(T.edit.drag.inner,[T.treeId,g,le],!!T.edit.drag.inner);function ge(){_=null,M="",A=a.move.TYPE_INNER,y.css({display:"none"}),window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null)}if(pe||fe||me){var ve=e("#"+M+a.id.A,_),ye=le.isLastNode?null:e("#"+le.getNextNode().tId+a.id.A,_.next()),_e=ve.offset().top,be=ve.offset().left,we=pe?me?.25:fe?.5:1:-1,xe=fe?me?.75:pe?.5:0:-1,ke=(n.clientY+V-_e)/ve.height();if((1==we||ke<=we&&ke>=-.2)&&pe?(se=1-y.width(),ae=_e-y.height()/2,A=a.move.TYPE_PREV):(0==xe||ke>=xe&&ke<=1.2)&&fe?(se=1-y.width(),ae=null==ye||u.nodeIsParent(d,le)&&le.open?_e+ve.height()-y.height()/2:ye.offset().top-y.height()/2,A=a.move.TYPE_NEXT):me?(se=5-y.width(),ae=_e,A=a.move.TYPE_INNER):ge(),_&&(y.css({display:"block",top:ae+"px",left:be+se+"px"}),ve.addClass(a.node.TMPTARGET_NODE+"_"+A),D==M&&C==A||(O=(new Date).getTime()),le&&u.nodeIsParent(d,le)&&A==a.move.TYPE_INNER)){var Se=!0;window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId!==le.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===le.tId&&(Se=!1),Se&&(window.zTreeMoveTimer=setTimeout((function(){A==a.move.TYPE_INNER&&le&&u.nodeIsParent(d,le)&&!le.open&&(new Date).getTime()-O>T.edit.drag.autoOpenTime&&s.apply(T.callback.beforeDragOpen,[T.treeId,le],!0)&&(l.switchNode(T,le),T.edit.drag.autoExpandTrigger&&T.treeObj.trigger(a.event.EXPAND,[T.treeId,le]))}),T.edit.drag.autoOpenTime+50),window.zTreeMoveTargetNodeTId=le.tId)}}else ge()}else A=a.move.TYPE_INNER,_&&s.apply(T.edit.drag.inner,[T.treeId,g,null],!!T.edit.drag.inner)?_.addClass(a.node.TMPTARGET_TREE):_=null,y.css({display:"none"}),window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null);D=M,C=A,d.treeObj.trigger(a.event.DRAGMOVE,[n,d.treeId,g])}return!1}function R(n){if(window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null),D=null,C=null,x.unbind("mousemove",N),x.unbind("mouseup",R),x.unbind("selectstart",P),k.css("cursor",""),_&&(_.removeClass(a.node.TMPTARGET_TREE),M&&e("#"+M+a.id.A,_).removeClass(a.node.TMPTARGET_NODE+"_"+a.move.TYPE_PREV).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_NEXT).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_INNER)),s.showIfameMask(d,!1),p.showHoverDom=!0,0!=h.dragFlag){var r,i,o;for(h.dragFlag=0,r=0,i=g.length;r<i;r++)o=g[r],u.nodeIsParent(d,o)&&h.dragNodeShowBefore[o.tId]&&!o.open&&(l.expandCollapseNode(d,o,!o.open),delete h.dragNodeShowBefore[o.tId]);v&&v.remove(),y&&y.remove();var f=(n.ctrlKey||n.metaKey)&&d.edit.drag.isMove&&d.edit.drag.isCopy||!d.edit.drag.isMove&&d.edit.drag.isCopy;if(!f&&_&&M&&g[0].parentTId&&M==g[0].parentTId&&A==a.move.TYPE_INNER&&(_=null),_){var m=null==M?null:u.getNodeCache(T,M);if(0==s.apply(d.callback.beforeDrop,[T.treeId,g,m,A,f],!0))return void l.selectNodes(E,g);var b=f?s.clone(g):g;function w(){if(S){if(!f)for(var e=0,t=g.length;e<t;e++)l.removeNode(d,g[e]);A==a.move.TYPE_INNER?l.addNodes(T,m,-1,b):l.addNodes(T,m.getParentNode(),A==a.move.TYPE_PREV?m.getIndex():m.getIndex()+1,b)}else if(f&&A==a.move.TYPE_INNER)l.addNodes(T,m,-1,b);else if(f)l.addNodes(T,m.getParentNode(),A==a.move.TYPE_PREV?m.getIndex():m.getIndex()+1,b);else if(A!=a.move.TYPE_NEXT)for(e=0,t=b.length;e<t;e++)l.moveNode(T,m,b[e],A,!1);else for(e=-1,t=b.length-1;e<t;t--)l.moveNode(T,m,b[t],A,!1);l.selectNodes(T,b);var r=c(b[0],d).get(0);l.scrollIntoView(d,r),d.treeObj.trigger(a.event.DROP,[n,T.treeId,b,m,A,f])}A==a.move.TYPE_INNER&&s.canAsync(T,m)?l.asyncNode(T,m,!1,w):w()}else l.selectNodes(E,g),d.treeObj.trigger(a.event.DROP,[n,d.treeId,g,null,null,null])}}function P(){return!1}return s.uCanDo(d)&&x.bind("mousemove",N),x.bind("mouseup",R),x.bind("selectstart",P),!0}},r={addEditBtn:function(e,t){if(!(t.editNameFlag||c(t,a.id.EDIT,e).length>0)&&s.apply(e.edit.showRenameBtn,[e.treeId,t],e.edit.showRenameBtn)){var n=c(t,a.id.A,e),r="<span class='"+a.className.BUTTON+" edit' id='"+t.tId+a.id.EDIT+"' title='"+s.apply(e.edit.renameTitle,[e.treeId,t],e.edit.renameTitle)+"' treeNode"+a.id.EDIT+" style='display:none;'></span>";n.append(r),c(t,a.id.EDIT,e).bind("click",(function(){return!(!s.uCanDo(e)||0==s.apply(e.callback.beforeEditName,[e.treeId,t],!0))&&(l.editNode(e,t),!1)})).show()}},addRemoveBtn:function(e,t){if(!(t.editNameFlag||c(t,a.id.REMOVE,e).length>0)&&s.apply(e.edit.showRemoveBtn,[e.treeId,t],e.edit.showRemoveBtn)){var n=c(t,a.id.A,e),r="<span class='"+a.className.BUTTON+" remove' id='"+t.tId+a.id.REMOVE+"' title='"+s.apply(e.edit.removeTitle,[e.treeId,t],e.edit.removeTitle)+"' treeNode"+a.id.REMOVE+" style='display:none;'></span>";n.append(r),c(t,a.id.REMOVE,e).bind("click",(function(){return!(!s.uCanDo(e)||0==s.apply(e.callback.beforeRemove,[e.treeId,t],!0))&&(l.removeNode(e,t),e.treeObj.trigger(a.event.REMOVE,[e.treeId,t]),!1)})).bind("mousedown",(function(e){return!0})).show()}},addHoverDom:function(e,t){u.getRoots().showHoverDom&&(t.isHover=!0,e.edit.enable&&(l.addEditBtn(e,t),l.addRemoveBtn(e,t)),s.apply(e.view.addHoverDom,[e.treeId,t]))},cancelCurEditNode:function(e,t,n){var r=u.getRoot(e),i=r.curEditNode;if(i){var o=r.curEditInput,d=t||(n?u.nodeName(e,i):o.val());if(!1===s.apply(e.callback.beforeRename,[e.treeId,i,d,n],!0))return!1;u.nodeName(e,i,d),c(i,a.id.A,e).removeClass(a.node.CURSELECTED_EDIT),o.unbind(),l.setNodeName(e,i),i.editNameFlag=!1,r.curEditNode=null,r.curEditInput=null,l.selectNode(e,i,!1),e.treeObj.trigger(a.event.RENAME,[e.treeId,i,n])}return r.noSelection=!0,!0},editNode:function(e,t){var n=u.getRoot(e);if(l.editNodeBlur=!1,u.isSelectedNode(e,t)&&n.curEditNode==t&&t.editNameFlag)setTimeout((function(){s.inputFocus(n.curEditInput)}),0);else{t.editNameFlag=!0,l.removeTreeDom(e,t),l.cancelCurEditNode(e),l.selectNode(e,t,!1),c(t,a.id.SPAN,e).html("<input type=text class='rename' id='"+t.tId+a.id.INPUT+"' treeNode"+a.id.INPUT+" >");var r=c(t,a.id.INPUT,e);r.attr("value",u.nodeName(e,t)),e.edit.editNameSelectAll?s.inputSelect(r):s.inputFocus(r),r.bind("blur",(function(t){l.editNodeBlur||l.cancelCurEditNode(e)})).bind("keydown",(function(t){"13"==t.keyCode?(l.editNodeBlur=!0,l.cancelCurEditNode(e)):"27"==t.keyCode&&l.cancelCurEditNode(e,null,!0)})).bind("click",(function(e){return!1})).bind("dblclick",(function(e){return!1})),c(t,a.id.A,e).addClass(a.node.CURSELECTED_EDIT),n.curEditInput=r,n.noSelection=!1,n.curEditNode=t}},moveNode:function(e,t,n,r,i,o){var s=u.getRoot(e);if(t!=n&&(!e.data.keep.leaf||!t||u.nodeIsParent(e,t)||r!=a.move.TYPE_INNER)){var d=n.parentTId?n.getParentNode():s,h=null===t||t==s;h&&null===t&&(t=s),h&&(r=a.move.TYPE_INNER);var p,f,m=t.parentTId?t.getParentNode():s;if(r!=a.move.TYPE_PREV&&r!=a.move.TYPE_NEXT&&(r=a.move.TYPE_INNER),r==a.move.TYPE_INNER&&(h?n.parentTId=null:(u.nodeIsParent(e,t)||(u.nodeIsParent(e,t,!0),t.open=!!t.open,l.setNodeLineIcos(e,t)),n.parentTId=t.tId)),h)f=p=e.treeObj;else{if(o||r!=a.move.TYPE_INNER?o||l.expandCollapseNode(e,t.getParentNode(),!0,!1):l.expandCollapseNode(e,t,!0,!1),p=c(t,e),f=c(t,a.id.UL,e),p.get(0)&&!f.get(0)){var g=[];l.makeUlHtml(e,t,g,""),p.append(g.join(""))}f=c(t,a.id.UL,e)}var v=c(n,e);v.get(0)?p.get(0)||v.remove():v=l.appendNodes(e,n.level,[n],null,-1,!1,!0).join(""),f.get(0)&&r==a.move.TYPE_INNER?f.append(v):p.get(0)&&r==a.move.TYPE_PREV?p.before(v):p.get(0)&&r==a.move.TYPE_NEXT&&p.after(v);var y,_,b=-1,w=0,x=null,k=null,S=n.level,T=u.nodeChildren(e,d),E=u.nodeChildren(e,m),D=u.nodeChildren(e,t);if(n.isFirstNode)b=0,T.length>1&&((x=T[1]).isFirstNode=!0);else if(n.isLastNode)(x=T[(b=T.length-1)-1]).isLastNode=!0;else for(y=0,_=T.length;y<_;y++)if(T[y].tId==n.tId){b=y;break}if(b>=0&&T.splice(b,1),r!=a.move.TYPE_INNER)for(y=0,_=E.length;y<_;y++)E[y].tId==t.tId&&(w=y);if(r==a.move.TYPE_INNER?(D||(D=u.nodeChildren(e,t,[])),D.length>0&&((k=D[D.length-1]).isLastNode=!1),D.splice(D.length,0,n),n.isLastNode=!0,n.isFirstNode=1==D.length):t.isFirstNode&&r==a.move.TYPE_PREV?(E.splice(w,0,n),(k=t).isFirstNode=!1,n.parentTId=t.parentTId,n.isFirstNode=!0,n.isLastNode=!1):t.isLastNode&&r==a.move.TYPE_NEXT?(E.splice(w+1,0,n),(k=t).isLastNode=!1,n.parentTId=t.parentTId,n.isFirstNode=!1,n.isLastNode=!0):(r==a.move.TYPE_PREV?E.splice(w,0,n):E.splice(w+1,0,n),n.parentTId=t.parentTId,n.isFirstNode=!1,n.isLastNode=!1),u.fixPIdKeyValue(e,n),u.setSonNodeLevel(e,n.getParentNode(),n),l.setNodeLineIcos(e,n),l.repairNodeLevelClass(e,n,S),!e.data.keep.parent&&T.length<1){u.nodeIsParent(e,d,!1),d.open=!1;var C=c(d,a.id.UL,e),M=c(d,a.id.SWITCH,e),A=c(d,a.id.ICON,e);l.replaceSwitchClass(d,M,a.folder.DOCU),l.replaceIcoClass(d,A,a.folder.DOCU),C.css("display","none")}else x&&l.setNodeLineIcos(e,x);k&&l.setNodeLineIcos(e,k),e.check&&e.check.enable&&l.repairChkClass&&(l.repairChkClass(e,d),l.repairParentChkClassWithSelf(e,d),d!=n.parent&&l.repairParentChkClassWithSelf(e,n)),o||l.expandCollapseParentNode(e,n.getParentNode(),!0,i)}},removeEditBtn:function(e,t){c(t,a.id.EDIT,e).unbind().remove()},removeRemoveBtn:function(e,t){c(t,a.id.REMOVE,e).unbind().remove()},removeTreeDom:function(e,t){t.isHover=!1,l.removeEditBtn(e,t),l.removeRemoveBtn(e,t),s.apply(e.view.removeHoverDom,[e.treeId,t])},repairNodeLevelClass:function(e,t,n){if(n!==t.level){var r=c(t,e),i=c(t,a.id.A,e),o=c(t,a.id.UL,e),s=a.className.LEVEL+n,l=a.className.LEVEL+t.level;r.removeClass(s),r.addClass(l),i.removeClass(s),i.addClass(l),o.removeClass(s),o.addClass(l)}},selectNodes:function(e,t){for(var n=0,r=t.length;n<r;n++)l.selectNode(e,t[n],n>0)}},i={tools:{getAbs:function(e){var t=e.getBoundingClientRect(),n=document.body.scrollTop+document.documentElement.scrollTop,r=document.body.scrollLeft+document.documentElement.scrollLeft;return[t.left+r,t.top+n]},inputFocus:function(e){e.get(0)&&(e.focus(),s.setCursorPosition(e.get(0),e.val().length))},inputSelect:function(e){e.get(0)&&(e.focus(),e.select())},setCursorPosition:function(e,t){if(e.setSelectionRange)e.focus(),e.setSelectionRange(t,t);else if(e.createTextRange){var n=e.createTextRange();n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select()}},showIfameMask:function(e,t){for(var n=u.getRoot(e);n.dragMaskList.length>0;)n.dragMaskList[0].remove(),n.dragMaskList.shift();if(t)for(var r=c("iframe",e),i=0,o=r.length;i<o;i++){var a=r.get(i),l=s.getAbs(a),d=c("<div id='zTreeMask_"+i+"' class='zTreeMask' style='top:"+l[1]+"px; left:"+l[0]+"px; width:"+a.offsetWidth+"px; height:"+a.offsetHeight+"px;'></div>",e);d.appendTo(c("body",e)),n.dragMaskList.push(d)}}},view:r,event:{},data:{setSonNodeLevel:function(e,t,n){if(n){var r=u.nodeChildren(e,n),i=n.level;if(n.level=t?t.level+1:0,l.repairNodeLevelClass(e,n,i),r)for(var o=0,s=r.length;o<s;o++)r[o]&&u.setSonNodeLevel(e,n,r[o])}}}};e.extend(!0,e.fn.zTree.consts,t),e.extend(!0,e.fn.zTree._z,i);var o=e.fn.zTree,s=o._z.tools,a=o.consts,l=o._z.view,u=o._z.data,c=(o._z.event,s.$);u.exSetting({edit:{enable:!1,editNameSelectAll:!1,showRemoveBtn:!0,showRenameBtn:!0,removeTitle:"remove",renameTitle:"rename",drag:{autoExpandTrigger:!1,isCopy:!0,isMove:!0,prev:!0,next:!0,inner:!0,minMoveSize:5,borderMax:10,borderMin:-5,maxShowNodeNum:5,autoOpenTime:500}},view:{addHoverDom:null,removeHoverDom:null},callback:{beforeDrag:null,beforeDragOpen:null,beforeDrop:null,beforeEditName:null,beforeRename:null,onDrag:null,onDragMove:null,onDrop:null,onRename:null}}),u.addInitBind((function(e){var t=e.treeObj,n=a.event;t.bind(n.RENAME,(function(t,n,r,i){s.apply(e.callback.onRename,[t,n,r,i])})),t.bind(n.DRAG,(function(t,n,r,i){s.apply(e.callback.onDrag,[n,r,i])})),t.bind(n.DRAGMOVE,(function(t,n,r,i){s.apply(e.callback.onDragMove,[n,r,i])})),t.bind(n.DROP,(function(t,n,r,i,o,a,l){s.apply(e.callback.onDrop,[n,r,i,o,a,l])}))})),u.addInitUnBind((function(e){var t=e.treeObj,n=a.event;t.unbind(n.RENAME),t.unbind(n.DRAG),t.unbind(n.DRAGMOVE),t.unbind(n.DROP)})),u.addInitCache((function(e){})),u.addInitNode((function(e,t,n,r,i,o,s){n&&(n.isHover=!1,n.editNameFlag=!1)})),u.addInitProxy((function(e){var t=e.target,r=u.getSetting(e.data.treeId),i=e.relatedTarget,o="",l=null,c="",d=null,h=null;if(s.eqs(e.type,"mouseover")?(h=s.getMDom(r,t,[{tagName:"a",attrName:"treeNode"+a.id.A}]))&&(o=s.getNodeMainDom(h).id,c="hoverOverNode"):s.eqs(e.type,"mouseout")?(h=s.getMDom(r,i,[{tagName:"a",attrName:"treeNode"+a.id.A}]))||(o="remove",c="hoverOutNode"):s.eqs(e.type,"mousedown")&&(h=s.getMDom(r,t,[{tagName:"a",attrName:"treeNode"+a.id.A}]))&&(o=s.getNodeMainDom(h).id,c="mousedownNode"),o.length>0)switch(l=u.getNodeCache(r,o),c){case"mousedownNode":d=n.onMousedownNode;break;case"hoverOverNode":d=n.onHoverOverNode;break;case"hoverOutNode":d=n.onHoverOutNode}return{stop:!1,node:l,nodeEventType:c,nodeEventCallback:d,treeEventType:"",treeEventCallback:null}})),u.addInitRoot((function(e){var t=u.getRoot(e),n=u.getRoots();t.curEditNode=null,t.curEditInput=null,t.curHoverNode=null,t.dragFlag=0,t.dragNodeShowBefore=[],t.dragMaskList=new Array,n.showHoverDom=!0})),u.addZTreeTools((function(e,t){t.cancelEditName=function(e){u.getRoot(this.setting).curEditNode&&l.cancelCurEditNode(this.setting,e||null,!0)},t.copyNode=function(t,n,r,i){if(!n)return null;var o=u.nodeIsParent(e,t);if(t&&!o&&this.setting.data.keep.leaf&&r===a.move.TYPE_INNER)return null;var c=this,d=s.clone(n);if(t||(t=null,r=a.move.TYPE_INNER),r==a.move.TYPE_INNER){function h(){l.addNodes(c.setting,t,-1,[d],i)}s.canAsync(this.setting,t)?l.asyncNode(this.setting,t,i,h):h()}else l.addNodes(this.setting,t.parentNode,-1,[d],i),l.moveNode(this.setting,t,d,r,!1,i);return d},t.editName=function(e){e&&e.tId&&e===u.getNodeCache(this.setting,e.tId)&&(e.parentTId&&l.expandCollapseParentNode(this.setting,e.getParentNode(),!0),l.editNode(this.setting,e))},t.moveNode=function(t,n,r,i){if(!n)return n;var o=u.nodeIsParent(e,t);if(t&&!o&&this.setting.data.keep.leaf&&r===a.move.TYPE_INNER)return null;if(t&&(n.parentTId==t.tId&&r==a.move.TYPE_INNER||c(n,this.setting).find("#"+t.tId).length>0))return null;t||(t=null);var d=this;function h(){l.moveNode(d.setting,t,n,r,!1,i)}return s.canAsync(this.setting,t)&&r===a.move.TYPE_INNER?l.asyncNode(this.setting,t,i,h):h(),n},t.setEditable=function(e){return this.setting.edit.enable=e,this.refresh()}}));var d=l.cancelPreSelectedNode;l.cancelPreSelectedNode=function(e,t){for(var n=u.getRoot(e).curSelectedList,r=0,i=n.length;r<i&&(t&&t!==n[r]||(l.removeTreeDom(e,n[r]),!t));r++);d&&d.apply(l,arguments)};var h=l.createNodes;l.createNodes=function(e,t,n,r,i){h&&h.apply(l,arguments),n&&l.repairParentChkClassWithSelf&&l.repairParentChkClassWithSelf(e,r)};var p=l.makeNodeUrl;l.makeNodeUrl=function(e,t){return e.edit.enable?null:p.apply(l,arguments)};var f=l.removeNode;l.removeNode=function(e,t){var n=u.getRoot(e);n.curEditNode===t&&(n.curEditNode=null),f&&f.apply(l,arguments)};var m=l.selectNode;l.selectNode=function(e,t,n){var r=u.getRoot(e);return(!u.isSelectedNode(e,t)||r.curEditNode!=t||!t.editNameFlag)&&(m&&m.apply(l,arguments),l.addHoverDom(e,t),!0)};var g=s.uCanDo;s.uCanDo=function(e,t){var n=u.getRoot(e);return!(!t||!(s.eqs(t.type,"mouseover")||s.eqs(t.type,"mouseout")||s.eqs(t.type,"mousedown")||s.eqs(t.type,"mouseup")))||(n.curEditNode&&(l.editNodeBlur=!1,n.curEditInput.focus()),!n.curEditNode&&(!g||g.apply(l,arguments)))}}(jQuery),function(e){e.fn.zTreeKeyboardNavigationDestroy=function(){},e.fn.zTreeKeyboardNavigation=function(t,n,r=null,i){("string"==typeof n||n instanceof String)&&(n=e(n));var o=t.getNodes();if(o){var s=function(){(r=t.getSelectedNodes())&&r.length&&e("#"+r[0].tId).focus()};e.fn.zTreeKeyboardNavigationDestroy(),e.fn.zTreeKeyboardNavigationDestroy=function(){e(n).off("keydown")},e.fn.changeTreeIcons=function(){let t=e(".app-tree li span.button.switch");e(t).map(((t,n)=>{e(n).addClass(i),e(n).on("click",(function(t){setTimeout((()=>{e(n).addClass(i)}),0)}))}))},e(n).on("keydown",(function(n){var r=t.getSelectedNodes(),i=r.length?r[0]:null,a=function(){t.selectNode(o[0],!1,!0)},l=function(){var e=t.transformToArray(o);t.selectNode(e[e.length-1])};switch(n.keyCode){case 32:return void(i&&i.isParent&&(t.expandNode(i,!i.open,!0,!0),e.fn.changeTreeIcons()));case 36:a();break;case 35:l();break;case 33:case 34:break;case 37:!function(){if(i){var e=i.getParentNode(),n=i.getPreNode();if(e||n)if(n){if(n.isParent){for(;n&&n.isParent&&n.open&&n.children;)n=n.children[n.children.length-1];return void t.selectNode(n)}t.selectNode(n)}else e&&t.selectNode(e,!1,!0)}}();break;case 38:!function(){var e;if(i){if(!(e=i.getPreNode()))return}else l();e&&t.selectNode(e)}();break;case 39:!function(){if(i)if(i.isParent&&i.open&&i.children)t.selectNode(i.children[0]);else if(n=i.getNextNode())t.selectNode(n);else for(var e=i;e=e.getParentNode();){var n;if(n=e.getNextNode()){t.selectNode(n);break}}}();break;case 40:!function(){var e;if(i){if(!(e=i.getNextNode()))return}else a();e&&t.selectNode(e)}();break;default:if(!function(e){if(!Array.from({length:26},((e,t)=>t+65)).includes(95&e))return!1;var n=t.transformToArray(o);if(!(n=n.filter((t=>"accesskey"in t&&t.accesskey.length&&(95&t.accesskey.charCodeAt(0))==e))).length)return!1;var r=t.getSelectedNodes();return!!r.length&&r[0]!=n[0]&&(t.selectNode(n[0]),!0)}(95&n.keyCode))return}s()})),r&&r.length?(t.selectNode(r[0]),s()):e(n).trigger({type:"keydown",which:36,keyCode:36})}}}(jQuery);
1802
+ function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tabbable")):"function"==typeof define&&define.amd?define(["exports","tabbable"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.focusTrap,r=e.focusTrap={};t(r,e.tabbable),r.noConflict=function(){return e.focusTrap=n,r}}())}(this,(function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=function(e,t){if(e.length>0){var n=e[e.length-1];n!==t&&n.pause()}var r=e.indexOf(t);-1===r||e.splice(r,1),e.push(t)},s=function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()},a=function(e){return"Tab"===e.key||9===e.keyCode},l=function(e){return a(e)&&!e.shiftKey},u=function(e){return a(e)&&e.shiftKey},c=function(e){return setTimeout(e,0)},d=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},h=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},p=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},f=[];e.createFocusTrap=function(e,n){var i,m=(null==n?void 0:n.document)||document,g=(null==n?void 0:n.trapStack)||f,v=r({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:l,isKeyBackward:u},n),y={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},_=function(e,t,n){return e&&void 0!==e[t]?e[t]:v[n||t]},b=function(e){return y.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},w=function(e){var t=v[e];if("function"==typeof t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t=t.apply(void 0,r)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var o=t;if("string"==typeof t&&!(o=m.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return o},x=function(){var e=w("initialFocus");if(!1===e)return!1;if(void 0===e)if(b(m.activeElement)>=0)e=m.activeElement;else{var t=y.tabbableGroups[0];e=t&&t.firstTabbableNode||w("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},k=function(){if(y.containerGroups=y.containers.map((function(e){var n=t.tabbable(e,v.tabbableOptions),r=t.focusable(e,v.tabbableOptions);return{container:e,tabbableNodes:n,focusableNodes:r,firstTabbableNode:n.length>0?n[0]:null,lastTabbableNode:n.length>0?n[n.length-1]:null,nextTabbableNode:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=r.findIndex((function(t){return t===e}));if(!(i<0))return n?r.slice(i+1).find((function(e){return t.isTabbable(e,v.tabbableOptions)})):r.slice(0,i).reverse().find((function(e){return t.isTabbable(e,v.tabbableOptions)}))}}})),y.tabbableGroups=y.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),y.tabbableGroups.length<=0&&!w("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},S=function e(t){!1!==t&&t!==m.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!v.preventScroll}),y.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(x()))},T=function(e){var t=w("setReturnFocus",e);return t||!1!==t&&e},E=function(e){var n=p(e);b(n)>=0||(h(v.clickOutsideDeactivates,e)?i.deactivate({returnFocus:v.returnFocusOnDeactivate&&!t.isFocusable(n,v.tabbableOptions)}):h(v.allowOutsideClick,e)||e.preventDefault())},D=function(e){var t=p(e),n=b(t)>=0;if(n||t instanceof Document)n&&(y.mostRecentlyFocusedNode=t);else{if(y.containers[0].nextSibling)return;e.stopImmediatePropagation(),S(y.mostRecentlyFocusedNode||x())}},C=function(e){if(!(n=e,"Escape"!==n.key&&"Esc"!==n.key&&27!==n.keyCode||!1===h(v.escapeDeactivates,e)))return e.preventDefault(),void i.deactivate();var n;(v.isKeyForward(e)||v.isKeyBackward(e))&&function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=p(e);k();var i=null;if(y.tabbableGroups.length>0){var o=b(r),s=o>=0?y.containerGroups[o]:void 0;if(o<0)i=n?y.tabbableGroups[y.tabbableGroups.length-1].lastTabbableNode:y.tabbableGroups[0].firstTabbableNode;else if(n){var l=d(y.tabbableGroups,(function(e){var t=e.firstTabbableNode;return r===t}));if(l<0&&(s.container===r||t.isFocusable(r,v.tabbableOptions)&&!t.isTabbable(r,v.tabbableOptions)&&!s.nextTabbableNode(r,!1))&&(l=o),l>=0){var u=0===l?y.tabbableGroups.length-1:l-1;i=y.tabbableGroups[u].lastTabbableNode}else a(e)||(i=s.nextTabbableNode(r,!1))}else{var c=d(y.tabbableGroups,(function(e){var t=e.lastTabbableNode;return r===t}));if(c<0&&(s.container===r||t.isFocusable(r,v.tabbableOptions)&&!t.isTabbable(r,v.tabbableOptions)&&!s.nextTabbableNode(r))&&(c=o),c>=0){var h=c===y.tabbableGroups.length-1?0:c+1;i=y.tabbableGroups[h].firstTabbableNode}else a(e)||(i=s.nextTabbableNode(r))}}else i=w("fallbackFocus");i&&(a(e)&&e.preventDefault(),S(i))}(e,v.isKeyBackward(e))},M=function(e){var t=p(e);b(t)>=0||h(v.clickOutsideDeactivates,e)||h(v.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},A=function(){if(y.active)return o(g,i),y.delayInitialFocusTimer=v.delayInitialFocus?c((function(){S(x())})):S(x()),m.addEventListener("focusin",D,!0),m.addEventListener("mousedown",E,{capture:!0,passive:!1}),m.addEventListener("touchstart",E,{capture:!0,passive:!1}),m.addEventListener("click",M,{capture:!0,passive:!1}),m.addEventListener("keydown",C,{capture:!0,passive:!1}),i},I=function(){if(y.active)return m.removeEventListener("focusin",D,!0),m.removeEventListener("mousedown",E,!0),m.removeEventListener("touchstart",E,!0),m.removeEventListener("click",M,!0),m.removeEventListener("keydown",C,!0),i};return(i={get active(){return y.active},get paused(){return y.paused},activate:function(e){if(y.active)return this;var t=_(e,"onActivate"),n=_(e,"onPostActivate"),r=_(e,"checkCanFocusTrap");r||k(),y.active=!0,y.paused=!1,y.nodeFocusedBeforeActivation=m.activeElement,t&&t();var i=function(){r&&k(),A(),n&&n()};return r?(r(y.containers.concat()).then(i,i),this):(i(),this)},deactivate:function(e){if(!y.active)return this;var t=r({onDeactivate:v.onDeactivate,onPostDeactivate:v.onPostDeactivate,checkCanReturnFocus:v.checkCanReturnFocus},e);clearTimeout(y.delayInitialFocusTimer),y.delayInitialFocusTimer=void 0,I(),y.active=!1,y.paused=!1,s(g,i);var n=_(t,"onDeactivate"),o=_(t,"onPostDeactivate"),a=_(t,"checkCanReturnFocus"),l=_(t,"returnFocus","returnFocusOnDeactivate");n&&n();var u=function(){c((function(){l&&S(T(y.nodeFocusedBeforeActivation)),o&&o()}))};return l&&a?(a(T(y.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return y.paused||!y.active||(y.paused=!0,I()),this},unpause:function(){return y.paused&&y.active?(y.paused=!1,k(),A(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return y.containers=t.map((function(e){return"string"==typeof e?m.querySelector(e):e})),y.active&&k(),this}}).updateContainerElements(e),i},Object.defineProperty(e,"__esModule",{value:!0})})),function($){var settings={},roots={},caches={},_consts={className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch",NAME:"node_name"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_setting={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nodeClasses:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{isParent:"isParent",children:"children",name:"name",title:"",url:"url",icon:"icon"},render:{name:null,title:null},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",headers:{},xhrFields:{},url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},_initRoot=function(e){var t=data.getRoot(e);t||(t={},data.setRoot(e,t)),data.nodeChildren(e,t,[]),t.expandTriggerFlag=!1,t.curSelectedList=[],t.noSelection=!0,t.createdNodes=[],t.zId=0,t._ver=(new Date).getTime()},_initCache=function(e){var t=data.getCache(e);t||(t={},data.setCache(e,t)),t.nodes=[],t.doms=[]},_bindEvent=function(e){var t=e.treeObj,n=consts.event;t.bind(n.NODECREATED,(function(t,n,r){tools.apply(e.callback.onNodeCreated,[t,n,r])})),t.bind(n.CLICK,(function(t,n,r,i,o){tools.apply(e.callback.onClick,[n,r,i,o])})),t.bind(n.EXPAND,(function(t,n,r){tools.apply(e.callback.onExpand,[t,n,r])})),t.bind(n.COLLAPSE,(function(t,n,r){tools.apply(e.callback.onCollapse,[t,n,r])})),t.bind(n.ASYNC_SUCCESS,(function(t,n,r,i){tools.apply(e.callback.onAsyncSuccess,[t,n,r,i])})),t.bind(n.ASYNC_ERROR,(function(t,n,r,i,o,s){tools.apply(e.callback.onAsyncError,[t,n,r,i,o,s])})),t.bind(n.REMOVE,(function(t,n,r){tools.apply(e.callback.onRemove,[t,n,r])})),t.bind(n.SELECTED,(function(t,n,r){tools.apply(e.callback.onSelected,[n,r])})),t.bind(n.UNSELECTED,(function(t,n,r){tools.apply(e.callback.onUnSelected,[n,r])}))},_unbindEvent=function(e){var t=e.treeObj,n=consts.event;t.unbind(n.NODECREATED).unbind(n.CLICK).unbind(n.EXPAND).unbind(n.COLLAPSE).unbind(n.ASYNC_SUCCESS).unbind(n.ASYNC_ERROR).unbind(n.REMOVE).unbind(n.SELECTED).unbind(n.UNSELECTED)},_eventProxy=function(e){var t=e.target,n=data.getSetting(e.data.treeId),r="",i=null,o="",s="",a=null,l=null,u=null;if(tools.eqs(e.type,"mousedown")?s="mousedown":tools.eqs(e.type,"mouseup")?s="mouseup":tools.eqs(e.type,"contextmenu")?s="contextmenu":tools.eqs(e.type,"click")?tools.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+consts.id.SWITCH)?(r=tools.getNodeMainDom(t).id,o="switchNode"):(u=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(r=tools.getNodeMainDom(u).id,o="clickNode"):tools.eqs(e.type,"dblclick")&&(s="dblclick",(u=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(r=tools.getNodeMainDom(u).id,o="switchNode")),s.length>0&&0==r.length&&(u=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(r=tools.getNodeMainDom(u).id),r.length>0)switch(i=data.getNodeCache(n,r),o){case"switchNode":data.nodeIsParent(n,i)&&(tools.eqs(e.type,"click")||tools.eqs(e.type,"dblclick")&&tools.apply(n.view.dblClickExpand,[n.treeId,i],n.view.dblClickExpand))?a=handler.onSwitchNode:o="";break;case"clickNode":a=handler.onClickNode}switch(s){case"mousedown":l=handler.onZTreeMousedown;break;case"mouseup":l=handler.onZTreeMouseup;break;case"dblclick":l=handler.onZTreeDblclick;break;case"contextmenu":l=handler.onZTreeContextmenu}return{stop:!1,node:i,nodeEventType:o,nodeEventCallback:a,treeEventType:s,treeEventCallback:l}},_initNode=function(e,t,n,r,i,o,s){if(n){var a=data.getRoot(e),l=data.nodeChildren(e,n);n.level=t,n.tId=e.treeId+"_"+ ++a.zId,n.parentTId=r?r.tId:null,n.open="string"==typeof n.open?tools.eqs(n.open,"true"):!!n.open;var u=data.nodeIsParent(e,n);tools.isArray(l)?(data.nodeIsParent(e,n,!0),n.zAsync=!0):(u=data.nodeIsParent(e,n,u),n.open=!(!u||e.async.enable)&&n.open,n.zAsync=!u),n.isFirstNode=i,n.isLastNode=o,n.getParentNode=function(){return data.getNodeCache(e,n.parentTId)},n.getPreNode=function(){return data.getPreNode(e,n)},n.getNextNode=function(){return data.getNextNode(e,n)},n.getIndex=function(){return data.getNodeIndex(e,n)},n.getPath=function(){return data.getNodePath(e,n)},n.isAjaxing=!1,data.fixPIdKeyValue(e,n)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(e,t){data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=t},getNodeCacheId:function(e){return e.substring(e.lastIndexOf("_")+1)},addAfterA:function(e){_init.afterA.push(e)},addBeforeA:function(e){_init.beforeA.push(e)},addInnerAfterA:function(e){_init.innerAfterA.push(e)},addInnerBeforeA:function(e){_init.innerBeforeA.push(e)},addInitBind:function(e){_init.bind.push(e)},addInitUnBind:function(e){_init.unbind.push(e)},addInitCache:function(e){_init.caches.push(e)},addInitNode:function(e){_init.nodes.push(e)},addInitProxy:function(e,t){t?_init.proxys.splice(0,0,e):_init.proxys.push(e)},addInitRoot:function(e){_init.roots.push(e)},addNodesData:function(e,t,n,r){var i,o=data.nodeChildren(e,t);o?n>=o.length&&(n=-1):(o=data.nodeChildren(e,t,[]),n=-1),o.length>0&&0===n?(o[0].isFirstNode=!1,view.setNodeLineIcos(e,o[0])):o.length>0&&n<0&&(o[o.length-1].isLastNode=!1,view.setNodeLineIcos(e,o[o.length-1])),data.nodeIsParent(e,t,!0),n<0?data.nodeChildren(e,t,o.concat(r)):(i=[n,0].concat(r),o.splice.apply(o,i))},addSelectedNode:function(e,t){var n=data.getRoot(e);data.isSelectedNode(e,t)||n.curSelectedList.push(t)},addCreatedNode:function(e,t){(e.callback.onNodeCreated||e.view.addDiyDom)&&data.getRoot(e).createdNodes.push(t)},addZTreeTools:function(e){_init.zTreeTools.push(e)},exSetting:function(e){$.extend(!0,_setting,e)},fixPIdKeyValue:function(e,t){e.data.simpleData.enable&&(t[e.data.simpleData.pIdKey]=t.parentTId?t.getParentNode()[e.data.simpleData.idKey]:e.data.simpleData.rootPId)},getAfterA:function(e,t,n){for(var r=0,i=_init.afterA.length;r<i;r++)_init.afterA[r].apply(this,arguments)},getBeforeA:function(e,t,n){for(var r=0,i=_init.beforeA.length;r<i;r++)_init.beforeA[r].apply(this,arguments)},getInnerAfterA:function(e,t,n){for(var r=0,i=_init.innerAfterA.length;r<i;r++)_init.innerAfterA[r].apply(this,arguments)},getInnerBeforeA:function(e,t,n){for(var r=0,i=_init.innerBeforeA.length;r<i;r++)_init.innerBeforeA[r].apply(this,arguments)},getCache:function(e){return caches[e.treeId]},getNodeIndex:function(e,t){if(!t)return null;for(var n=t.parentTId?t.getParentNode():data.getRoot(e),r=data.nodeChildren(e,n),i=0,o=r.length-1;i<=o;i++)if(r[i]===t)return i;return-1},getNextNode:function(e,t){if(!t)return null;for(var n=t.parentTId?t.getParentNode():data.getRoot(e),r=data.nodeChildren(e,n),i=0,o=r.length-1;i<=o;i++)if(r[i]===t)return i==o?null:r[i+1];return null},getNodeByParam:function(e,t,n,r){if(!t||!n)return null;for(var i=0,o=t.length;i<o;i++){var s=t[i];if(s[n]==r)return t[i];var a=data.nodeChildren(e,s),l=data.getNodeByParam(e,a,n,r);if(l)return l}return null},getNodeCache:function(e,t){if(!t)return null;var n=caches[e.treeId].nodes[data.getNodeCacheId(t)];return n||null},getNodePath:function(e,t){return t?((n=t.parentTId?t.getParentNode().getPath():[])&&n.push(t),n):null;var n},getNodes:function(e){return data.nodeChildren(e,data.getRoot(e))},getNodesByParam:function(e,t,n,r){if(!t||!n)return[];for(var i=[],o=0,s=t.length;o<s;o++){var a=t[o];a[n]==r&&i.push(a);var l=data.nodeChildren(e,a);i=i.concat(data.getNodesByParam(e,l,n,r))}return i},getNodesByParamFuzzy:function(e,t,n,r){if(!t||!n)return[];var i=[];r=r.toLowerCase();for(var o=0,s=t.length;o<s;o++){var a=t[o];"string"==typeof a[n]&&t[o][n].toLowerCase().indexOf(r)>-1&&i.push(a);var l=data.nodeChildren(e,a);i=i.concat(data.getNodesByParamFuzzy(e,l,n,r))}return i},getNodesByFilter:function(e,t,n,r,i){if(!t)return r?null:[];for(var o=r?null:[],s=0,a=t.length;s<a;s++){var l=t[s];if(tools.apply(n,[l,i],!1)){if(r)return l;o.push(l)}var u=data.nodeChildren(e,l),c=data.getNodesByFilter(e,u,n,r,i);if(r&&c)return c;o=r?c:o.concat(c)}return o},getPreNode:function(e,t){if(!t)return null;for(var n=t.parentTId?t.getParentNode():data.getRoot(e),r=data.nodeChildren(e,n),i=0,o=r.length;i<o;i++)if(r[i]===t)return 0==i?null:r[i-1];return null},getRoot:function(e){return e?roots[e.treeId]:null},getRoots:function(){return roots},getSetting:function(e){return settings[e]},getSettings:function(){return settings},getZTreeTools:function(e){var t=this.getRoot(this.getSetting(e));return t?t.treeTools:null},initCache:function(e){for(var t=0,n=_init.caches.length;t<n;t++)_init.caches[t].apply(this,arguments)},initNode:function(e,t,n,r,i,o){for(var s=0,a=_init.nodes.length;s<a;s++)_init.nodes[s].apply(this,arguments)},initRoot:function(e){for(var t=0,n=_init.roots.length;t<n;t++)_init.roots[t].apply(this,arguments)},isSelectedNode:function(e,t){for(var n=data.getRoot(e),r=0,i=n.curSelectedList.length;r<i;r++)if(t===n.curSelectedList[r])return!0;return!1},nodeChildren:function(e,t,n){if(!t)return null;var r=e.data.key.children;return void 0!==n&&(t[r]=n),t[r]},nodeIsParent:function(e,t,n){if(!t)return!1;var r=e.data.key.isParent;return void 0!==n?("string"==typeof n&&(n=tools.eqs(n,"true")),n=!!n,t[r]=n):"string"==typeof t[r]?t[r]=tools.eqs(t[r],"true"):t[r]=!!t[r],t[r]},nodeName:function(e,t,n){var r=e.data.key.name;void 0!==n&&(t[r]=n);var i=""+t[r];return"function"==typeof e.data.render.name?e.data.render.name.call(this,i,t):i},nodeTitle:function(e,t){var n=""+t[""===e.data.key.title?e.data.key.name:e.data.key.title];return"function"==typeof e.data.render.title?e.data.render.title.call(this,n,t):n},removeNodeCache:function(e,t){var n=data.nodeChildren(e,t);if(n)for(var r=0,i=n.length;r<i;r++)data.removeNodeCache(e,n[r]);data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=null},removeSelectedNode:function(e,t){for(var n=data.getRoot(e),r=0,i=n.curSelectedList.length;r<i;r++)t!==n.curSelectedList[r]&&data.getNodeCache(e,n.curSelectedList[r].tId)||(n.curSelectedList.splice(r,1),e.treeObj.trigger(consts.event.UNSELECTED,[e.treeId,t]),r--,i--)},setCache:function(e,t){caches[e.treeId]=t},setRoot:function(e,t){roots[e.treeId]=t},setZTreeTools:function(e,t){for(var n=0,r=_init.zTreeTools.length;n<r;n++)_init.zTreeTools[n].apply(this,arguments)},transformToArrayFormat:function(e,t){if(!t)return[];var n=[];if(tools.isArray(t))for(var r=0,i=t.length;r<i;r++){o(t[r])}else o(t);return n;function o(t){n.push(t);var r=data.nodeChildren(e,t);r&&(n=n.concat(data.transformToArrayFormat(e,r)))}},transformTozTreeFormat:function(e,t){var n,r,i=e.data.simpleData.idKey,o=e.data.simpleData.pIdKey;if(!i||""==i||!t)return[];if(tools.isArray(t)){var s=[],a={};for(n=0,r=t.length;n<r;n++)a[t[n][i]]=t[n];for(n=0,r=t.length;n<r;n++){var l=a[t[n][o]];if(l&&t[n][i]!=t[n][o]){var u=data.nodeChildren(e,l);u||(u=data.nodeChildren(e,l,[])),u.push(t[n])}else s.push(t[n])}return s}return[t]}},event={bindEvent:function(e){for(var t=0,n=_init.bind.length;t<n;t++)_init.bind[t].apply(this,arguments)},unbindEvent:function(e){for(var t=0,n=_init.unbind.length;t<n;t++)_init.unbind[t].apply(this,arguments)},bindTree:function(e){var t={treeId:e.treeId},n=e.treeObj;e.view.txtSelectedEnable||n.bind("selectstart",handler.onSelectStart).css({"-moz-user-select":"-moz-none"}),n.bind("click",t,event.proxy),n.bind("dblclick",t,event.proxy),n.bind("mouseover",t,event.proxy),n.bind("mouseout",t,event.proxy),n.bind("mousedown",t,event.proxy),n.bind("mouseup",t,event.proxy),n.bind("contextmenu",t,event.proxy)},unbindTree:function(e){e.treeObj.unbind("selectstart",handler.onSelectStart).unbind("click",event.proxy).unbind("dblclick",event.proxy).unbind("mouseover",event.proxy).unbind("mouseout",event.proxy).unbind("mousedown",event.proxy).unbind("mouseup",event.proxy).unbind("contextmenu",event.proxy)},doProxy:function(e){for(var t=[],n=0,r=_init.proxys.length;n<r;n++){var i=_init.proxys[n].apply(this,arguments);if(t.push(i),i.stop)break}return t},proxy:function(e){var t=data.getSetting(e.data.treeId);if(!tools.uCanDo(t,e))return!0;for(var n=event.doProxy(e),r=!0,i=0,o=n.length;i<o;i++){var s=n[i];s.nodeEventCallback&&(!0,r=s.nodeEventCallback.apply(s,[e,s.node])&&r),s.treeEventCallback&&(!0,r=s.treeEventCallback.apply(s,[e,s.node])&&r)}return r}},handler={onSwitchNode:function(e,t){var n=data.getSetting(e.data.treeId);if(t.open){if(0==tools.apply(n.callback.beforeCollapse,[n.treeId,t],!0))return!0;data.getRoot(n).expandTriggerFlag=!0,view.switchNode(n,t)}else{if(0==tools.apply(n.callback.beforeExpand,[n.treeId,t],!0))return!0;data.getRoot(n).expandTriggerFlag=!0,view.switchNode(n,t)}return!0},onClickNode:function(e,t){var n=data.getSetting(e.data.treeId),r=n.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&data.isSelectedNode(n,t)?0:n.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&n.view.selectedMulti?2:1;return 0==tools.apply(n.callback.beforeClick,[n.treeId,t,r],!0)||(0===r?view.cancelPreSelectedNode(n,t):view.selectNode(n,t,2===r),n.treeObj.trigger(consts.event.CLICK,[e,n.treeId,t,r])),!0},onZTreeMousedown:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeMouseDown,[n.treeId,t],!0)&&tools.apply(n.callback.onMouseDown,[e,n.treeId,t]),!0},onZTreeMouseup:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeMouseUp,[n.treeId,t],!0)&&tools.apply(n.callback.onMouseUp,[e,n.treeId,t]),!0},onZTreeDblclick:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeDblClick,[n.treeId,t],!0)&&tools.apply(n.callback.onDblClick,[e,n.treeId,t]),!0},onZTreeContextmenu:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeRightClick,[n.treeId,t],!0)&&tools.apply(n.callback.onRightClick,[e,n.treeId,t]),"function"!=typeof n.callback.onRightClick},onSelectStart:function(e){var t=e.originalEvent.srcElement.nodeName.toLowerCase();return"input"===t||"textarea"===t}},tools={apply:function(e,t,n){return"function"==typeof e?e.apply(zt,t||[]):n},canAsync:function(e,t){var n=data.nodeChildren(e,t),r=data.nodeIsParent(e,t);return e.async.enable&&t&&r&&!(t.zAsync||n&&n.length>0)},clone:function(e){if(null===e)return null;var t=tools.isArray(e)?[]:{};for(var n in e)t[n]=e[n]instanceof Date?new Date(e[n].getTime()):"object"==typeof e[n]?tools.clone(e[n]):e[n];return t},eqs:function(e,t){return e.toLowerCase()===t.toLowerCase()},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isElement:function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},$:function(e,t,n){return t&&"string"!=typeof t&&(n=t,t=""),"string"==typeof e?$(e,n?n.treeObj.get(0).ownerDocument:null):$("#"+e.tId+t,n?n.treeObj:null)},getMDom:function(e,t,n){if(!t)return null;for(;t&&t.id!==e.treeId;){for(var r=0,i=n.length;t.tagName&&r<i;r++)if(tools.eqs(t.tagName,n[r].tagName)&&null!==t.getAttribute(n[r].attrName))return t;t=t.parentNode}return null},getNodeMainDom:function(e){return $(e).parent("li").get(0)||$(e).parentsUntil("li").parent().get(0)},isChildOrSelf:function(e,t){return $(e).closest("#"+t).length>0},uCanDo:function(e,t){return!0}},view={addNodes:function(e,t,n,r,i){var o=data.nodeIsParent(e,t);if(!e.data.keep.leaf||!t||o)if(tools.isArray(r)||(r=[r]),e.data.simpleData.enable&&(r=data.transformTozTreeFormat(e,r)),t){var s=$$(t,consts.id.SWITCH,e),a=$$(t,consts.id.ICON,e),l=$$(t,consts.id.UL,e);t.open||(view.replaceSwitchClass(t,s,consts.folder.CLOSE),view.replaceIcoClass(t,a,consts.folder.CLOSE),t.open=!1,l.css({display:"none"})),data.addNodesData(e,t,n,r),view.createNodes(e,t.level+1,r,t,n),i||view.expandCollapseParentNode(e,t,!0)}else data.addNodesData(e,data.getRoot(e),n,r),view.createNodes(e,0,r,null,n)},appendNodes:function(e,t,n,r,i,o,s){if(!n)return[];var a,l,u=[],c=r||data.getRoot(e),d=data.nodeChildren(e,c);(!d||i>=d.length-n.length)&&(i=-1);for(var h=0,p=n.length;h<p;h++){var f=n[h];o&&(a=(0===i||d.length==n.length)&&0==h,l=i<0&&h==n.length-1,data.initNode(e,t,f,r,a,l,s),data.addNodeCache(e,f));var m=data.nodeIsParent(e,f),g=[],v=data.nodeChildren(e,f);v&&v.length>0&&(g=view.appendNodes(e,t+1,v,f,-1,o,s&&f.open)),s&&(view.makeDOMNodeMainBefore(u,e,f),view.makeDOMNodeLine(u,e,f),data.getBeforeA(e,f,u),view.makeDOMNodeNameBefore(u,e,f),data.getInnerBeforeA(e,f,u),view.makeDOMNodeIcon(u,e,f),data.getInnerAfterA(e,f,u),view.makeDOMNodeNameAfter(u,e,f),data.getAfterA(e,f,u),m&&f.open&&view.makeUlHtml(e,f,u,g.join("")),view.makeDOMNodeMainAfter(u,e,f),data.addCreatedNode(e,f))}return u},appendParentULDom:function(e,t){var n=[],r=$$(t,e);!r.get(0)&&t.parentTId&&(view.appendParentULDom(e,t.getParentNode()),r=$$(t,e));var i=$$(t,consts.id.UL,e);i.get(0)&&i.remove();var o=data.nodeChildren(e,t),s=view.appendNodes(e,t.level+1,o,t,-1,!1,!0);view.makeUlHtml(e,t,n,s.join("")),r.append(n.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l,isParent=data.nodeIsParent(setting,node);if(node&&!isParent)return tools.apply(callback),!1;if(node&&node.isAjaxing)return!1;if(0==tools.apply(setting.callback.beforeAsync,[setting.treeId,node],!0))return tools.apply(callback),!1;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"",class:consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={},autoParam=tools.apply(setting.async.autoParam,[setting.treeId,node],setting.async.autoParam);for(i=0,l=autoParam.length;node&&i<l;i++){var pKey=autoParam[i].split("="),spKey=pKey;pKey.length>1&&(spKey=pKey[1],pKey=pKey[0]),tmpParam[spKey]=node[pKey]}var otherParam=tools.apply(setting.async.otherParam,[setting.treeId,node],setting.async.otherParam);if(tools.isArray(otherParam))for(i=0,l=otherParam.length;i<l;i+=2)tmpParam[otherParam[i]]=otherParam[i+1];else for(var p in otherParam)tmpParam[p]=otherParam[p];var _tmpV=data.getRoot(setting)._ver;return $.ajax({contentType:setting.async.contentType,cache:!1,type:setting.async.type,url:tools.apply(setting.async.url,[setting.treeId,node],setting.async.url),data:setting.async.contentType.indexOf("application/json")>-1?JSON.stringify(tmpParam):tmpParam,dataType:setting.async.dataType,headers:setting.async.headers,xhrFields:setting.async.xhrFields,success:function(msg){if(_tmpV==data.getRoot(setting)._ver){var newNodes=[];try{newNodes=msg&&0!=msg.length?"string"==typeof msg?eval("("+msg+")"):msg:[]}catch(e){newNodes=msg}node&&(node.isAjaxing=null,node.zAsync=!0),view.setNodeLineIcos(setting,node),newNodes&&""!==newNodes?(newNodes=tools.apply(setting.async.dataFilter,[setting.treeId,node,newNodes],newNodes),view.addNodes(setting,node,-1,newNodes?tools.clone(newNodes):[],!!isSilent)):view.addNodes(setting,node,-1,[],!!isSilent),setting.treeObj.trigger(consts.event.ASYNC_SUCCESS,[setting.treeId,node,msg]),tools.apply(callback)}},error:function(e,t,n){_tmpV==data.getRoot(setting)._ver&&(node&&(node.isAjaxing=null),view.setNodeLineIcos(setting,node),setting.treeObj.trigger(consts.event.ASYNC_ERROR,[setting.treeId,node,e,t,n]))}}),!0},cancelPreSelectedNode:function(e,t,n){var r,i,o=data.getRoot(e).curSelectedList;for(r=o.length-1;r>=0;r--)if(t===(i=o[r])||!t&&(!n||n!==i)){if($$(i,consts.id.A,e).removeClass(consts.node.CURSELECTED),t){data.removeSelectedNode(e,t);break}o.splice(r,1),e.treeObj.trigger(consts.event.UNSELECTED,[e.treeId,i])}},createNodeCallback:function(e){if(e.callback.onNodeCreated||e.view.addDiyDom)for(var t=data.getRoot(e);t.createdNodes.length>0;){var n=t.createdNodes.shift();tools.apply(e.view.addDiyDom,[e.treeId,n]),e.callback.onNodeCreated&&e.treeObj.trigger(consts.event.NODECREATED,[e.treeId,n])}},createNodes:function(e,t,n,r,i){if(n&&0!=n.length){var o=data.getRoot(e),s=!r||r.open||!!$$(data.nodeChildren(e,r)[0],e).get(0);o.createdNodes=[];var a,l,u=view.appendNodes(e,t,n,r,i,!0,s);if(r){var c=$$(r,consts.id.UL,e);c.get(0)&&(a=c)}else a=e.treeObj;a&&(i>=0&&(l=a.children()[i]),i>=0&&l?$(l).before(u.join("")):a.append(u.join(""))),view.createNodeCallback(e)}},destroy:function(e){e&&(data.initCache(e),data.initRoot(e),event.unbindTree(e),event.unbindEvent(e),e.treeObj.empty(),delete settings[e.treeId])},expandCollapseNode:function(e,t,n,r,i){var o,s=data.getRoot(e);if(t){var a=data.nodeChildren(e,t),l=data.nodeIsParent(e,t);if(s.expandTriggerFlag&&(o=i,i=function(){o&&o(),t.open?e.treeObj.trigger(consts.event.EXPAND,[e.treeId,t]):e.treeObj.trigger(consts.event.COLLAPSE,[e.treeId,t])},s.expandTriggerFlag=!1),!t.open&&l&&(!$$(t,consts.id.UL,e).get(0)||a&&a.length>0&&!$$(a[0],e).get(0))&&(view.appendParentULDom(e,t),view.createNodeCallback(e)),t.open!=n){var u=$$(t,consts.id.UL,e),c=$$(t,consts.id.SWITCH,e),d=$$(t,consts.id.ICON,e);l?(t.open=!t.open,t.iconOpen&&t.iconClose&&d.attr("style",view.makeNodeIcoStyle(e,t)),t.open?(view.replaceSwitchClass(t,c,consts.folder.OPEN),view.replaceIcoClass(t,d,consts.folder.OPEN),0==r||""==e.view.expandSpeed?(u.show(),tools.apply(i,[])):a&&a.length>0?u.slideDown(e.view.expandSpeed,i):(u.show(),tools.apply(i,[]))):(view.replaceSwitchClass(t,c,consts.folder.CLOSE),view.replaceIcoClass(t,d,consts.folder.CLOSE),0!=r&&""!=e.view.expandSpeed&&a&&a.length>0?u.slideUp(e.view.expandSpeed,i):(u.hide(),tools.apply(i,[])))):tools.apply(i,[])}else tools.apply(i,[])}else tools.apply(i,[])},expandCollapseParentNode:function(e,t,n,r,i){t&&(t.parentTId?(view.expandCollapseNode(e,t,n,r),t.parentTId&&view.expandCollapseParentNode(e,t.getParentNode(),n,r,i)):view.expandCollapseNode(e,t,n,r,i))},expandCollapseSonNode:function(e,t,n,r,i){var o=data.getRoot(e),s=t?data.nodeChildren(e,t):data.nodeChildren(e,o),a=!t&&r,l=data.getRoot(e).expandTriggerFlag;if(data.getRoot(e).expandTriggerFlag=!1,s)for(var u=0,c=s.length;u<c;u++)s[u]&&view.expandCollapseSonNode(e,s[u],n,a);data.getRoot(e).expandTriggerFlag=l,view.expandCollapseNode(e,t,n,r,i)},isSelectedNode:function(e,t){if(!t)return!1;var n,r=data.getRoot(e).curSelectedList;for(n=r.length-1;n>=0;n--)if(t===r[n])return!0;return!1},makeDOMNodeIcon:function(e,t,n){var r=data.nodeName(t,n),i=t.view.nameIsHTML?r:r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");e.push("<span id='",n.tId,consts.id.ICON,"' title='' treeNode",consts.id.ICON," class='",view.makeNodeIcoClass(t,n),"' style='",view.makeNodeIcoStyle(t,n),"'></span><span id='",n.tId,consts.id.SPAN,"' class='",consts.className.NAME,"'>",i,"</span>")},makeDOMNodeLine:function(e,t,n){e.push("<span id='",n.tId,consts.id.SWITCH,"' title='' class='",view.makeNodeLineClass(t,n),"' treeNode",consts.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(e,t,n){e.push("</li>")},makeDOMNodeMainBefore:function(e,t,n){e.push("<li id='",n.tId,"' class='",consts.className.LEVEL,n.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(e,t,n){e.push("</a>")},makeDOMNodeNameBefore:function(e,t,n){var r=data.nodeTitle(t,n),i=view.makeNodeUrl(t,n),o=view.makeNodeFontCss(t,n),s=view.makeNodeClasses(t,n),a=[];for(var l in o)a.push(l,":",o[l],";");e.push("<a id='",n.tId,consts.id.A,"' class='",consts.className.LEVEL,n.level,s.add?" "+s.add.join(" "):"","' treeNode",consts.id.A,n.click?' onclick="'+n.click+'"':"",null!=i&&i.length>0?" href='"+i+"'":""," target='",view.makeNodeTarget(n),"' style='",a.join(""),"'"),tools.apply(t.view.showTitle,[t.treeId,n],t.view.showTitle)&&r&&e.push("title='",r.replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'"),e.push(">")},makeNodeFontCss:function(e,t){var n=tools.apply(e.view.fontCss,[e.treeId,t],e.view.fontCss);return n&&"function"!=typeof n?n:{}},makeNodeClasses:function(e,t){var n=tools.apply(e.view.nodeClasses,[e.treeId,t],e.view.nodeClasses);return n&&"function"!=typeof n?n:{add:[],remove:[]}},makeNodeIcoClass:function(e,t){var n=["ico"];if(!t.isAjaxing){var r=data.nodeIsParent(e,t);n[0]=(t.iconSkin?t.iconSkin+"_":"")+n[0],r?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU)}return consts.className.BUTTON+" "+n.join("_")},makeNodeIcoStyle:function(e,t){var n=[];if(!t.isAjaxing){var r=data.nodeIsParent(e,t)&&t.iconOpen&&t.iconClose?t.open?t.iconOpen:t.iconClose:t[e.data.key.icon];r&&n.push("background:url(",r,") 0 0 no-repeat;"),0!=e.view.showIcon&&tools.apply(e.view.showIcon,[e.treeId,t],!0)||n.push("display:none;")}return n.join("")},makeNodeLineClass:function(e,t){var n=[];return e.view.showLine?0==t.level&&t.isFirstNode&&t.isLastNode?n.push(consts.line.ROOT):0==t.level&&t.isFirstNode?n.push(consts.line.ROOTS):t.isLastNode?n.push(consts.line.BOTTOM):n.push(consts.line.CENTER):n.push(consts.line.NOLINE),data.nodeIsParent(e,t)?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU),view.makeNodeLineClassEx(t)+n.join("_")},makeNodeLineClassEx:function(e){return consts.className.BUTTON+" "+consts.className.LEVEL+e.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(e){return e.target||"_blank"},makeNodeUrl:function(e,t){var n=e.data.key.url;return t[n]?t[n]:null},makeUlHtml:function(e,t,n,r){n.push("<ul id='",t.tId,consts.id.UL,"' class='",consts.className.LEVEL,t.level," ",view.makeUlLineClass(e,t),"' style='display:",t.open?"block":"none","'>"),n.push(r),n.push("</ul>")},makeUlLineClass:function(e,t){return e.view.showLine&&!t.isLastNode?consts.line.LINE:""},removeChildNodes:function(e,t){if(t){var n=data.nodeChildren(e,t);if(n){for(var r=0,i=n.length;r<i;r++)data.removeNodeCache(e,n[r]);if(data.removeSelectedNode(e),delete t[e.data.key.children],e.data.keep.parent)$$(t,consts.id.UL,e).empty();else{data.nodeIsParent(e,t,!1),t.open=!1;var o=$$(t,consts.id.SWITCH,e),s=$$(t,consts.id.ICON,e);view.replaceSwitchClass(t,o,consts.folder.DOCU),view.replaceIcoClass(t,s,consts.folder.DOCU),$$(t,consts.id.UL,e).remove()}}}},scrollIntoView:function(e,t){if(t)if("undefined"!=typeof Element&&"undefined"!=typeof HTMLElement)Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(e){"use strict";function t(e,t){return{start:e,length:t,end:e+t}}function n(t,n){return!1===e||n.start<t.end&&t.start<n.end?Math.max(t.end-n.length,Math.min(n.start,t.start)):(t.start+t.end-n.length)/2}function r(e,t){return{x:e,y:t,translate:function(n,i){return r(e+n,t+i)}}}function i(e,t){for(;e;)t=t.translate(e.offsetLeft,e.offsetTop),e=e.offsetParent;return t}for(var o,s=i(this,r(0,0)),a=r(this.offsetWidth,this.offsetHeight),l=this.parentNode;l instanceof HTMLElement;)o=i(l,r(l.clientLeft,l.clientTop)),l.scrollLeft=n(t(s.x-o.x,a.x),t(l.scrollLeft,l.clientWidth)),l.scrollTop=n(t(s.y-o.y,a.y),t(l.scrollTop,l.clientHeight)),s=s.translate(-l.scrollLeft,-l.scrollTop),l=l.parentNode}),t.scrollIntoViewIfNeeded();else{var n=e.treeObj.get(0).getBoundingClientRect(),r=t.getBoundingClientRect();(r.top<n.top||r.bottom>n.bottom||r.right>n.right||r.left<n.left)&&t.scrollIntoView()}},setFirstNode:function(e,t){var n=data.nodeChildren(e,t);n.length>0&&(n[0].isFirstNode=!0)},setLastNode:function(e,t){var n=data.nodeChildren(e,t);n.length>0&&(n[n.length-1].isLastNode=!0)},removeNode:function(e,t){var n=data.getRoot(e),r=t.parentTId?t.getParentNode():n;if(t.isFirstNode=!1,t.isLastNode=!1,t.getPreNode=function(){return null},t.getNextNode=function(){return null},data.getNodeCache(e,t.tId)){$$(t,e).remove(),data.removeNodeCache(e,t),data.removeSelectedNode(e,t);for(var i=data.nodeChildren(e,r),o=0,s=i.length;o<s;o++)if(i[o].tId==t.tId){i.splice(o,1);break}view.setFirstNode(e,r),view.setLastNode(e,r);var a,l,u,c=i.length;if(e.data.keep.parent||0!=c){if(e.view.showLine&&c>0){var d=i[c-1];if(a=$$(d,consts.id.UL,e),l=$$(d,consts.id.SWITCH,e),u=$$(d,consts.id.ICON,e),r==n)if(1==i.length)view.replaceSwitchClass(d,l,consts.line.ROOT);else{var h=$$(i[0],consts.id.SWITCH,e);view.replaceSwitchClass(i[0],h,consts.line.ROOTS),view.replaceSwitchClass(d,l,consts.line.BOTTOM)}else view.replaceSwitchClass(d,l,consts.line.BOTTOM);a.removeClass(consts.line.LINE)}}else data.nodeIsParent(e,r,!1),r.open=!1,delete r[e.data.key.children],a=$$(r,consts.id.UL,e),l=$$(r,consts.id.SWITCH,e),u=$$(r,consts.id.ICON,e),view.replaceSwitchClass(r,l,consts.folder.DOCU),view.replaceIcoClass(r,u,consts.folder.DOCU),a.css("display","none")}},replaceIcoClass:function(e,t,n){if(t&&!e.isAjaxing){var r=t.attr("class");if(null!=r){var i=r.split("_");switch(n){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:i[i.length-1]=n}t.attr("class",i.join("_"))}}},replaceSwitchClass:function(e,t,n){if(t){var r=t.attr("class");if(null!=r){var i=r.split("_");switch(n){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:i[0]=view.makeNodeLineClassEx(e)+n;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:i[1]=n}t.attr("class",i.join("_")),n!==consts.folder.DOCU?t.removeAttr("disabled"):t.attr("disabled","disabled")}}},selectNode:function(e,t,n){n||view.cancelPreSelectedNode(e,null,t),$$(t,consts.id.A,e).addClass(consts.node.CURSELECTED),data.addSelectedNode(e,t),e.treeObj.trigger(consts.event.SELECTED,[e.treeId,t])},setNodeFontCss:function(e,t){var n=$$(t,consts.id.A,e),r=view.makeNodeFontCss(e,t);r&&n.css(r)},setNodeClasses:function(e,t){var n=$$(t,consts.id.A,e),r=view.makeNodeClasses(e,t);"add"in r&&r.add.length&&n.addClass(r.add.join(" ")),"remove"in r&&r.remove.length&&n.removeClass(r.remove.join(" "))},setNodeLineIcos:function(e,t){if(t){var n=$$(t,consts.id.SWITCH,e),r=$$(t,consts.id.UL,e),i=$$(t,consts.id.ICON,e),o=view.makeUlLineClass(e,t);0==o.length?r.removeClass(consts.line.LINE):r.addClass(o),n.attr("class",view.makeNodeLineClass(e,t)),data.nodeIsParent(e,t)?n.removeAttr("disabled"):n.attr("disabled","disabled"),i.removeAttr("style"),i.attr("style",view.makeNodeIcoStyle(e,t)),i.attr("class",view.makeNodeIcoClass(e,t))}},setNodeName:function(e,t){var n=data.nodeTitle(e,t),r=$$(t,consts.id.SPAN,e);(r.empty(),e.view.nameIsHTML?r.html(data.nodeName(e,t)):r.text(data.nodeName(e,t)),tools.apply(e.view.showTitle,[e.treeId,t],e.view.showTitle))&&$$(t,consts.id.A,e).attr("title",n||"")},setNodeTarget:function(e,t){$$(t,consts.id.A,e).attr("target",view.makeNodeTarget(t))},setNodeUrl:function(e,t){var n=$$(t,consts.id.A,e),r=view.makeNodeUrl(e,t);null==r||0==r.length?n.removeAttr("href"):n.attr("href",r)},switchNode:function(e,t){if(t.open||!tools.canAsync(e,t))view.expandCollapseNode(e,t,!t.open);else if(e.async.enable){if(!view.asyncNode(e,t))return void view.expandCollapseNode(e,t,!t.open)}else t&&view.expandCollapseNode(e,t,!t.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(e){var t=data.getZTreeTools(e);return t||null},destroy:function(e){if(e&&e.length>0)view.destroy(data.getSetting(e));else for(var t in settings)view.destroy(settings[t])},init:function(e,t,n){var r=tools.clone(_setting);$.extend(!0,r,t),r.treeId=e.attr("id"),r.treeObj=e,r.treeObj.empty(),settings[r.treeId]=r,void 0===document.body.style.maxHeight&&(r.view.expandSpeed=""),data.initRoot(r);var i=data.getRoot(r);n=n?tools.clone(tools.isArray(n)?n:[n]):[],r.data.simpleData.enable?data.nodeChildren(r,i,data.transformTozTreeFormat(r,n)):data.nodeChildren(r,i,n),data.initCache(r),event.unbindTree(r),event.bindTree(r),event.unbindEvent(r),event.bindEvent(r);var o={setting:r,addNodes:function(e,t,n,i){e||(e=null);var o=data.nodeIsParent(r,e);if(e&&!o&&r.data.keep.leaf)return null;var s=parseInt(t,10);if(isNaN(s)?(i=!!n,n=t,t=-1):t=s,!n)return null;var a=tools.clone(tools.isArray(n)?n:[n]);function l(){view.addNodes(r,e,t,a,1==i)}return tools.canAsync(r,e)?view.asyncNode(r,e,i,l):l(),a},cancelSelectedNode:function(e){view.cancelPreSelectedNode(r,e)},destroy:function(){view.destroy(r)},expandAll:function(e){return e=!!e,view.expandCollapseSonNode(r,null,e,!0),e},expandNode:function(e,t,n,i,o){return e&&data.nodeIsParent(r,e)?(!0!==t&&!1!==t&&(t=!e.open),(o=!!o)&&t&&0==tools.apply(r.callback.beforeExpand,[r.treeId,e],!0)||o&&!t&&0==tools.apply(r.callback.beforeCollapse,[r.treeId,e],!0)?null:(t&&e.parentTId&&view.expandCollapseParentNode(r,e.getParentNode(),t,!1),t!==e.open||n?(data.getRoot(r).expandTriggerFlag=o,!tools.canAsync(r,e)&&n?view.expandCollapseSonNode(r,e,t,!0,s):(e.open=!t,view.switchNode(this.setting,e),s()),t):null)):null;function s(){var t=$$(e,consts.id.A,r).get(0);t&&!1!==i&&view.scrollIntoView(r,t)}},getNodes:function(){return data.getNodes(r)},getNodeByParam:function(e,t,n){return e?data.getNodeByParam(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t):null},getNodeByTId:function(e){return data.getNodeCache(r,e)},getNodesByParam:function(e,t,n){return e?data.getNodesByParam(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t):null},getNodesByParamFuzzy:function(e,t,n){return e?data.getNodesByParamFuzzy(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t):null},getNodesByFilter:function(e,t,n,i){return t=!!t,e&&"function"==typeof e?data.getNodesByFilter(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t,i):t?null:[]},getNodeIndex:function(e){if(!e)return null;for(var t=e.parentTId?e.getParentNode():data.getRoot(r),n=data.nodeChildren(r,t),i=0,o=n.length;i<o;i++)if(n[i]==e)return i;return-1},getSelectedNodes:function(){for(var e=[],t=data.getRoot(r).curSelectedList,n=0,i=t.length;n<i;n++)e.push(t[n]);return e},isSelectedNode:function(e){return data.isSelectedNode(r,e)},reAsyncChildNodesPromise:function(e,t,n){return new Promise((function(r,i){try{o.reAsyncChildNodes(e,t,n,(function(){r(e)}))}catch(e){i(e)}}))},reAsyncChildNodes:function(e,t,n,i){if(this.setting.async.enable){var o=!e;if(o&&(e=data.getRoot(r)),"refresh"==t){for(var s=data.nodeChildren(r,e),a=0,l=s?s.length:0;a<l;a++)data.removeNodeCache(r,s[a]);if(data.removeSelectedNode(r),data.nodeChildren(r,e,[]),o)this.setting.treeObj.empty();else $$(e,consts.id.UL,r).empty()}view.asyncNode(this.setting,o?null:e,!!n,i)}},refresh:function(){this.setting.treeObj.empty();var e=data.getRoot(r),t=data.nodeChildren(r,e);data.initRoot(r),data.nodeChildren(r,e,t),data.initCache(r),view.createNodes(r,0,data.nodeChildren(r,e),null,-1)},removeChildNodes:function(e){if(!e)return null;var t=data.nodeChildren(r,e);return view.removeChildNodes(r,e),t||null},removeNode:function(e,t){e&&((t=!!t)&&0==tools.apply(r.callback.beforeRemove,[r.treeId,e],!0)||(view.removeNode(r,e),t&&this.setting.treeObj.trigger(consts.event.REMOVE,[r.treeId,e])))},selectNode:function(e,t,n){if(e&&tools.uCanDo(r)){if(t=r.view.selectedMulti&&t,e.parentTId)view.expandCollapseParentNode(r,e.getParentNode(),!0,!1,(function(){if(n)return;var t=$$(e,r).get(0);view.scrollIntoView(r,t)}));else if(!n)try{$$(e,r).focus().blur()}catch(e){}view.selectNode(r,e,t)}},transformTozTreeNodes:function(e){return data.transformTozTreeFormat(r,e)},transformToArray:function(e){return data.transformToArrayFormat(r,e)},updateNode:function(e,t){e&&($$(e,r).get(0)&&tools.uCanDo(r)&&(view.setNodeName(r,e),view.setNodeTarget(r,e),view.setNodeUrl(r,e),view.setNodeLineIcos(r,e),view.setNodeFontCss(r,e),view.setNodeClasses(r,e)))}};i.treeTools=o,data.setZTreeTools(r,o);var s=data.nodeChildren(r,i);return s&&s.length>0?view.createNodes(r,0,s,null,-1):r.async.enable&&r.async.url&&""!==r.async.url&&view.asyncNode(r),o}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(e){var t={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},n={check:{enable:!1,autoCheckTrigger:!1,chkStyle:t.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:t.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},r={onCheckNode:function(e,t){if(!0===t.chkDisabled)return!1;var n=u.getSetting(e.data.treeId);if(0==s.apply(n.callback.beforeCheck,[n.treeId,t],!0))return!0;var r=u.nodeChecked(n,t);u.nodeChecked(n,t,!r),l.checkNodeRelation(n,t);var i=c(t,a.id.CHECK,n);return l.setChkClass(n,i,t),l.repairParentChkClassWithSelf(n,t),n.treeObj.trigger(a.event.CHECK,[e,n.treeId,t]),!0},onMouseoverCheck:function(e,t){if(!0===t.chkDisabled)return!1;var n=u.getSetting(e.data.treeId),r=c(t,a.id.CHECK,n);return t.check_Focus=!0,l.setChkClass(n,r,t),!0},onMouseoutCheck:function(e,t){if(!0===t.chkDisabled)return!1;var n=u.getSetting(e.data.treeId),r=c(t,a.id.CHECK,n);return t.check_Focus=!1,l.setChkClass(n,r,t),!0}},i={tools:{},view:{checkNodeRelation:function(e,t){var n,r,i,o=a.radio,s=u.nodeChecked(e,t);if(e.check.chkStyle==o.STYLE){var d=u.getRadioCheckedList(e);if(s)if(e.check.radioType==o.TYPE_ALL){for(r=d.length-1;r>=0;r--){n=d[r],u.nodeChecked(e,n)&&n!=t&&(u.nodeChecked(e,n,!1),d.splice(r,1),l.setChkClass(e,c(n,a.id.CHECK,e),n),n.parentTId!=t.parentTId&&l.repairParentChkClassWithSelf(e,n))}d.push(t)}else{var h=t.parentTId?t.getParentNode():u.getRoot(e);for(r=0,i=(p=u.nodeChildren(e,h)).length;r<i;r++){n=p[r],u.nodeChecked(e,n)&&n!=t&&(u.nodeChecked(e,n,!1),l.setChkClass(e,c(n,a.id.CHECK,e),n))}}else if(e.check.radioType==o.TYPE_ALL)for(r=0,i=d.length;r<i;r++)if(t==d[r]){d.splice(r,1);break}}else{var p=u.nodeChildren(e,t);s&&(!p||0==p.length||e.check.chkboxType.Y.indexOf("s")>-1)&&l.setSonNodeCheckBox(e,t,!0),s||p&&0!=p.length&&!(e.check.chkboxType.N.indexOf("s")>-1)||l.setSonNodeCheckBox(e,t,!1),s&&e.check.chkboxType.Y.indexOf("p")>-1&&l.setParentNodeCheckBox(e,t,!0),!s&&e.check.chkboxType.N.indexOf("p")>-1&&l.setParentNodeCheckBox(e,t,!1)}},makeChkClass:function(e,t){var n=a.checkbox,r=a.radio,i="",o=u.nodeChecked(e,t);i=!0===t.chkDisabled?n.DISABLED:t.halfCheck?n.PART:e.check.chkStyle==r.STYLE?t.check_Child_State<1?n.FULL:n.PART:o?2===t.check_Child_State||-1===t.check_Child_State?n.FULL:n.PART:t.check_Child_State<1?n.FULL:n.PART;var s=e.check.chkStyle+"_"+(o?n.TRUE:n.FALSE)+"_"+i;return s=t.check_Focus&&!0!==t.chkDisabled?s+"_"+n.FOCUS:s,a.className.BUTTON+" "+n.DEFAULT+" "+s},repairAllChk:function(e,t){if(e.check.enable&&e.check.chkStyle===a.checkbox.STYLE)for(var n=u.getRoot(e),r=u.nodeChildren(e,n),i=0,o=r.length;i<o;i++){var s=r[i];!0!==s.nocheck&&!0!==s.chkDisabled&&u.nodeChecked(e,s,t),l.setSonNodeCheckBox(e,s,t)}},repairChkClass:function(e,t){if(t&&(u.makeChkFlag(e,t),!0!==t.nocheck)){var n=c(t,a.id.CHECK,e);l.setChkClass(e,n,t)}},repairParentChkClass:function(e,t){if(t&&t.parentTId){var n=t.getParentNode();l.repairChkClass(e,n),l.repairParentChkClass(e,n)}},repairParentChkClassWithSelf:function(e,t){if(t){var n=u.nodeChildren(e,t);n&&n.length>0?l.repairParentChkClass(e,n[0]):l.repairParentChkClass(e,t)}},repairSonChkDisabled:function(e,t,n,r){if(t){t.chkDisabled!=n&&(t.chkDisabled=n),l.repairChkClass(e,t);var i=u.nodeChildren(e,t);if(i&&r)for(var o=0,s=i.length;o<s;o++){var a=i[o];l.repairSonChkDisabled(e,a,n,r)}}},repairParentChkDisabled:function(e,t,n,r){t&&(t.chkDisabled!=n&&r&&(t.chkDisabled=n),l.repairChkClass(e,t),l.repairParentChkDisabled(e,t.getParentNode(),n,r))},setChkClass:function(e,t,n){t&&(!0===n.nocheck?t.hide():t.show(),t.attr("class",l.makeChkClass(e,n)))},setParentNodeCheckBox:function(e,t,n,r){var i=c(t,a.id.CHECK,e);if(r||(r=t),u.makeChkFlag(e,t),!0!==t.nocheck&&!0!==t.chkDisabled&&(u.nodeChecked(e,t,n),l.setChkClass(e,i,t),e.check.autoCheckTrigger&&t!=r&&e.treeObj.trigger(a.event.CHECK,[null,e.treeId,t])),t.parentTId){var o=!0;if(!n)for(var s=u.nodeChildren(e,t.getParentNode()),d=0,h=s.length;d<h;d++){var p=s[d],f=u.nodeChecked(e,p);if(!0!==p.nocheck&&!0!==p.chkDisabled&&f||(!0===p.nocheck||!0===p.chkDisabled)&&p.check_Child_State>0){o=!1;break}}o&&l.setParentNodeCheckBox(e,t.getParentNode(),n,r)}},setSonNodeCheckBox:function(e,t,n,r){if(t){var i=c(t,a.id.CHECK,e);r||(r=t);var o=!1,s=u.nodeChildren(e,t);if(s)for(var d=0,h=s.length;d<h;d++){var p=s[d];l.setSonNodeCheckBox(e,p,n,r),!0===p.chkDisabled&&(o=!0)}t!=u.getRoot(e)&&!0!==t.chkDisabled&&(o&&!0!==t.nocheck&&u.makeChkFlag(e,t),!0!==t.nocheck&&!0!==t.chkDisabled?(u.nodeChecked(e,t,n),o||(t.check_Child_State=s&&s.length>0?n?2:0:-1)):t.check_Child_State=-1,l.setChkClass(e,i,t),e.check.autoCheckTrigger&&t!=r&&!0!==t.nocheck&&!0!==t.chkDisabled&&e.treeObj.trigger(a.event.CHECK,[null,e.treeId,t]))}}},event:{},data:{getRadioCheckedList:function(e){for(var t=u.getRoot(e).radioCheckedList,n=0,r=t.length;n<r;n++)u.getNodeCache(e,t[n].tId)||(t.splice(n,1),n--,r--);return t},getCheckStatus:function(e,t){if(!e.check.enable||t.nocheck||t.chkDisabled)return null;var n=u.nodeChecked(e,t);return{checked:n,half:t.halfCheck?t.halfCheck:e.check.chkStyle==a.radio.STYLE?2===t.check_Child_State:n?t.check_Child_State>-1&&t.check_Child_State<2:t.check_Child_State>0}},getTreeCheckedNodes:function(e,t,n,r){if(!t)return[];var i=n&&e.check.chkStyle==a.radio.STYLE&&e.check.radioType==a.radio.TYPE_ALL;r=r||[];for(var o=0,s=t.length;o<s;o++){var l=t[o],c=u.nodeChildren(e,l),d=u.nodeChecked(e,l);if(!0!==l.nocheck&&!0!==l.chkDisabled&&d==n&&(r.push(l),i))break;if(u.getTreeCheckedNodes(e,c,n,r),i&&r.length>0)break}return r},getTreeChangeCheckedNodes:function(e,t,n){if(!t)return[];n=n||[];for(var r=0,i=t.length;r<i;r++){var o=t[r],s=u.nodeChildren(e,o),a=u.nodeChecked(e,o);!0!==o.nocheck&&!0!==o.chkDisabled&&a!=o.checkedOld&&n.push(o),u.getTreeChangeCheckedNodes(e,s,n)}return n},makeChkFlag:function(e,t){if(t){var n=-1,r=u.nodeChildren(e,t);if(r)for(var i=0,o=r.length;i<o;i++){var s=r[i],l=u.nodeChecked(e,s),c=-1;if(e.check.chkStyle==a.radio.STYLE){if(2==(c=!0===s.nocheck||!0===s.chkDisabled?s.check_Child_State:!0===s.halfCheck||l||s.check_Child_State>0?2:0)){n=2;break}0==c&&(n=0)}else if(e.check.chkStyle==a.checkbox.STYLE){if(1===(c=!0===s.nocheck||!0===s.chkDisabled?s.check_Child_State:!0===s.halfCheck?1:l?-1===s.check_Child_State||2===s.check_Child_State?2:1:s.check_Child_State>0?1:0)){n=1;break}if(2===c&&n>-1&&i>0&&c!==n){n=1;break}if(2===n&&c>-1&&c<2){n=1;break}c>-1&&(n=c)}}t.check_Child_State=n}}}};e.extend(!0,e.fn.zTree.consts,t),e.extend(!0,e.fn.zTree._z,i);var o=e.fn.zTree,s=o._z.tools,a=o.consts,l=o._z.view,u=o._z.data,c=(o._z.event,s.$);u.nodeChecked=function(e,t,n){if(!t)return!1;var r=e.data.key.checked;return void 0!==n?("string"==typeof n&&(n=s.eqs(n,"true")),n=!!n,t[r]=n):"string"==typeof t[r]?t[r]=s.eqs(t[r],"true"):t[r]=!!t[r],t[r]},u.exSetting(n),u.addInitBind((function(e){var t=e.treeObj,n=a.event;t.bind(n.CHECK,(function(t,n,r,i){t.srcEvent=n,s.apply(e.callback.onCheck,[t,r,i])}))})),u.addInitUnBind((function(e){var t=e.treeObj,n=a.event;t.unbind(n.CHECK)})),u.addInitCache((function(e){})),u.addInitNode((function(e,t,n,r,i,o,l){if(n){var c=u.nodeChecked(e,n);if(n.checkedOld=c,"string"==typeof n.nocheck&&(n.nocheck=s.eqs(n.nocheck,"true")),n.nocheck=!!n.nocheck||e.check.nocheckInherit&&r&&!!r.nocheck,"string"==typeof n.chkDisabled&&(n.chkDisabled=s.eqs(n.chkDisabled,"true")),n.chkDisabled=!!n.chkDisabled||e.check.chkDisabledInherit&&r&&!!r.chkDisabled,"string"==typeof n.halfCheck&&(n.halfCheck=s.eqs(n.halfCheck,"true")),n.halfCheck=!!n.halfCheck,n.check_Child_State=-1,n.check_Focus=!1,n.getCheckStatus=function(){return u.getCheckStatus(e,n)},e.check.chkStyle==a.radio.STYLE&&e.check.radioType==a.radio.TYPE_ALL&&c)u.getRoot(e).radioCheckedList.push(n)}})),u.addInitProxy((function(e){var t=e.target,n=u.getSetting(e.data.treeId),i="",o=null,l="",c=null;if(s.eqs(e.type,"mouseover")?n.check.enable&&s.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+a.id.CHECK)&&(i=s.getNodeMainDom(t).id,l="mouseoverCheck"):s.eqs(e.type,"mouseout")?n.check.enable&&s.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+a.id.CHECK)&&(i=s.getNodeMainDom(t).id,l="mouseoutCheck"):s.eqs(e.type,"click")&&n.check.enable&&s.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+a.id.CHECK)&&(i=s.getNodeMainDom(t).id,l="checkNode"),i.length>0)switch(o=u.getNodeCache(n,i),l){case"checkNode":c=r.onCheckNode;break;case"mouseoverCheck":c=r.onMouseoverCheck;break;case"mouseoutCheck":c=r.onMouseoutCheck}return{stop:"checkNode"===l,node:o,nodeEventType:l,nodeEventCallback:c,treeEventType:"",treeEventCallback:null}}),!0),u.addInitRoot((function(e){u.getRoot(e).radioCheckedList=[]})),u.addBeforeA((function(e,t,n){e.check.enable&&(u.makeChkFlag(e,t),n.push("<span ID='",t.tId,a.id.CHECK,"' class='",l.makeChkClass(e,t),"' treeNode",a.id.CHECK,!0===t.nocheck?" style='display:none;'":"","></span>"))})),u.addZTreeTools((function(e,t){t.checkNode=function(t,n,r,i){var o=u.nodeChecked(e,t);if(!0!==t.chkDisabled&&(!0!==n&&!1!==n&&(n=!o),i=!!i,(o!==n||r)&&(!i||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,t],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&!0!==t.nocheck)){u.nodeChecked(e,t,n);var d=c(t,a.id.CHECK,this.setting);(r||this.setting.check.chkStyle===a.radio.STYLE)&&l.checkNodeRelation(this.setting,t),l.setChkClass(this.setting,d,t),l.repairParentChkClassWithSelf(this.setting,t),i&&this.setting.treeObj.trigger(a.event.CHECK,[null,this.setting.treeId,t])}},t.checkAllNodes=function(e){l.repairAllChk(this.setting,!!e)},t.getCheckedNodes=function(t){t=!1!==t;var n=u.nodeChildren(e,u.getRoot(this.setting));return u.getTreeCheckedNodes(this.setting,n,t)},t.getChangeCheckedNodes=function(){var t=u.nodeChildren(e,u.getRoot(this.setting));return u.getTreeChangeCheckedNodes(this.setting,t)},t.setChkDisabled=function(e,t,n,r){t=!!t,n=!!n,r=!!r,l.repairSonChkDisabled(this.setting,e,t,r),l.repairParentChkDisabled(this.setting,e.getParentNode(),t,n)};var n=t.updateNode;t.updateNode=function(e,r){if((n&&n.apply(t,arguments),e&&this.setting.check.enable)&&(c(e,this.setting).get(0)&&s.uCanDo(this.setting))){var i=c(e,a.id.CHECK,this.setting);1!=r&&this.setting.check.chkStyle!==a.radio.STYLE||l.checkNodeRelation(this.setting,e),l.setChkClass(this.setting,i,e),l.repairParentChkClassWithSelf(this.setting,e)}}}));var d=l.createNodes;l.createNodes=function(e,t,n,r,i){d&&d.apply(l,arguments),n&&l.repairParentChkClassWithSelf(e,r)};var h=l.removeNode;l.removeNode=function(e,t){var n=t.getParentNode();h&&h.apply(l,arguments),t&&n&&(l.repairChkClass(e,n),l.repairParentChkClass(e,n))};var p=l.appendNodes;l.appendNodes=function(e,t,n,r,i,o,s){var a="";return p&&(a=p.apply(l,arguments)),r&&u.makeChkFlag(e,r),a}}(jQuery),function(e){var t={event:{DRAG:"ztree_drag",DROP:"ztree_drop",RENAME:"ztree_rename",DRAGMOVE:"ztree_dragmove"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},n={onHoverOverNode:function(e,t){var r=u.getSetting(e.data.treeId),i=u.getRoot(r);i.curHoverNode!=t&&n.onHoverOutNode(e),i.curHoverNode=t,l.addHoverDom(r,t)},onHoverOutNode:function(e,t){var n=u.getSetting(e.data.treeId),r=u.getRoot(n);r.curHoverNode&&!u.isSelectedNode(n,r.curHoverNode)&&(l.removeTreeDom(n,r.curHoverNode),r.curHoverNode=null)},onMousedownNode:function(n,r){var i,o,d=u.getSetting(n.data.treeId),h=u.getRoot(d),p=u.getRoots();if(2==n.button||!d.edit.enable||!d.edit.drag.isCopy&&!d.edit.drag.isMove)return!0;var f=n.target,m=u.getRoot(d).curSelectedList,g=[];if(u.isSelectedNode(d,r))for(i=0,o=m.length;i<o;i++){if(m[i].editNameFlag&&s.eqs(f.tagName,"input")&&null!==f.getAttribute("treeNode"+a.id.INPUT))return!0;if(g.push(m[i]),g[0].parentTId!==m[i].parentTId){g=[r];break}}else g=[r];l.editNodeBlur=!0,l.cancelCurEditNode(d);var v,y,_,b,w,x=e(d.treeObj.get(0).ownerDocument),k=e(d.treeObj.get(0).ownerDocument.body),S=!1,T=d,E=d,D=null,C=null,M=null,A=a.move.TYPE_INNER,I=n.clientX,L=n.clientY,O=(new Date).getTime();function N(n){if(0==h.dragFlag&&Math.abs(I-n.clientX)<d.edit.drag.minMoveSize&&Math.abs(L-n.clientY)<d.edit.drag.minMoveSize)return!0;var r,i,o,f,m;if(k.css("cursor","pointer"),0==h.dragFlag){if(0==s.apply(d.callback.beforeDrag,[d.treeId,g],!0))return R(n),!0;for(r=0,i=g.length;r<i;r++)0==r&&(h.dragNodeShowBefore=[]),o=g[r],u.nodeIsParent(d,o)&&o.open?(l.expandCollapseNode(d,o,!o.open),h.dragNodeShowBefore[o.tId]=!0):h.dragNodeShowBefore[o.tId]=!1;h.dragFlag=1,p.showHoverDom=!1,s.showIfameMask(d,!0);var E=!0,N=-1;if(g.length>1){var P=g[0].parentTId?u.nodeChildren(d,g[0].getParentNode()):u.getNodes(d);for(m=[],r=0,i=P.length;r<i;r++)if(void 0!==h.dragNodeShowBefore[P[r].tId]&&(E&&N>-1&&N+1!==r&&(E=!1),m.push(P[r]),N=r),g.length===m.length){g=m;break}}for(E&&(b=g[0].getPreNode(),w=g[g.length-1].getNextNode()),v=c("<ul class='zTreeDragUL'></ul>",d),r=0,i=g.length;r<i;r++)(o=g[r]).editNameFlag=!1,l.selectNode(d,o,r>0),l.removeTreeDom(d,o),r>d.edit.drag.maxShowNodeNum-1||((f=c("<li id='"+o.tId+"_tmp'></li>",d)).append(c(o,a.id.A,d).clone()),f.css("padding","0"),f.children("#"+o.tId+a.id.A).removeClass(a.node.CURSELECTED),v.append(f),r==d.edit.drag.maxShowNodeNum-1&&(f=c("<li id='"+o.tId+"_moretmp'><a> ... </a></li>",d),v.append(f)));v.attr("id",g[0].tId+a.id.UL+"_tmp"),v.addClass(d.treeObj.attr("class")),v.appendTo(k),(y=c("<span class='tmpzTreeMove_arrow'></span>",d)).attr("id","zTreeMove_arrow_tmp"),y.appendTo(k),d.treeObj.trigger(a.event.DRAG,[n,d.treeId,g])}if(1==h.dragFlag){if(_&&y.attr("id")==n.target.id&&M&&n.clientX+x.scrollLeft()+2>e("#"+M+a.id.A,_).offset().left){var F=e("#"+M+a.id.A,_);n.target=F.length>0?F.get(0):n.target}else _&&(_.removeClass(a.node.TMPTARGET_TREE),M&&e("#"+M+a.id.A,_).removeClass(a.node.TMPTARGET_NODE+"_"+a.move.TYPE_PREV).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_NEXT).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_INNER));_=null,M=null,S=!1,T=d;var j=u.getSettings();for(var Y in j)j[Y].treeId&&j[Y].edit.enable&&j[Y].treeId!=d.treeId&&(n.target.id==j[Y].treeId||e(n.target).parents("#"+j[Y].treeId).length>0)&&(S=!0,T=j[Y]);var V=x.scrollTop(),H=x.scrollLeft(),B=T.treeObj.offset(),U=T.treeObj.get(0).scrollHeight,z=T.treeObj.get(0).scrollWidth,q=n.clientY+V-B.top,W=T.treeObj.height()+B.top-n.clientY-V,$=n.clientX+H-B.left,G=T.treeObj.width()+B.left-n.clientX-H,K=q<d.edit.drag.borderMax&&q>d.edit.drag.borderMin,Z=W<d.edit.drag.borderMax&&W>d.edit.drag.borderMin,X=$<d.edit.drag.borderMax&&$>d.edit.drag.borderMin,J=G<d.edit.drag.borderMax&&G>d.edit.drag.borderMin,Q=q>d.edit.drag.borderMin&&W>d.edit.drag.borderMin&&$>d.edit.drag.borderMin&&G>d.edit.drag.borderMin,ee=K&&T.treeObj.scrollTop()<=0,te=Z&&T.treeObj.scrollTop()+T.treeObj.height()+10>=U,ne=X&&T.treeObj.scrollLeft()<=0,re=J&&T.treeObj.scrollLeft()+T.treeObj.width()+10>=z;if(n.target&&s.isChildOrSelf(n.target,T.treeId)){for(var ie=n.target;ie&&ie.tagName&&!s.eqs(ie.tagName,"li")&&ie.id!=T.treeId;)ie=ie.parentNode;var oe=!0;for(r=0,i=g.length;r<i;r++){if(o=g[r],ie.id===o.tId){oe=!1;break}if(c(o,d).find("#"+ie.id).length>0){oe=!1;break}}oe&&n.target&&s.isChildOrSelf(n.target,ie.id+a.id.A)&&(_=e(ie),M=ie.id)}o=g[0],Q&&s.isChildOrSelf(n.target,T.treeId)&&(!_&&(n.target.id==T.treeId||ee||te||ne||re)&&(S||!S&&o.parentTId)&&(_=T.treeObj),K?T.treeObj.scrollTop(T.treeObj.scrollTop()-10):Z&&T.treeObj.scrollTop(T.treeObj.scrollTop()+10),X?T.treeObj.scrollLeft(T.treeObj.scrollLeft()-10):J&&T.treeObj.scrollLeft(T.treeObj.scrollLeft()+10),_&&_!=T.treeObj&&_.offset().left<T.treeObj.offset().left&&T.treeObj.scrollLeft(T.treeObj.scrollLeft()+_.offset().left-T.treeObj.offset().left)),v.css({top:n.clientY+V+3+"px",left:n.clientX+H+3+"px"});var se=0,ae=0;if(_&&_.attr("id")!=T.treeId){var le=null==M?null:u.getNodeCache(T,M),ue=(n.ctrlKey||n.metaKey)&&d.edit.drag.isMove&&d.edit.drag.isCopy||!d.edit.drag.isMove&&d.edit.drag.isCopy,ce=!(!b||M!==b.tId),de=!(!w||M!==w.tId),he=o.parentTId&&o.parentTId==M,pe=(ue||!de)&&s.apply(T.edit.drag.prev,[T.treeId,g,le],!!T.edit.drag.prev),fe=(ue||!ce)&&s.apply(T.edit.drag.next,[T.treeId,g,le],!!T.edit.drag.next),me=(ue||!he)&&!(T.data.keep.leaf&&!u.nodeIsParent(d,le))&&s.apply(T.edit.drag.inner,[T.treeId,g,le],!!T.edit.drag.inner);function ge(){_=null,M="",A=a.move.TYPE_INNER,y.css({display:"none"}),window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null)}if(pe||fe||me){var ve=e("#"+M+a.id.A,_),ye=le.isLastNode?null:e("#"+le.getNextNode().tId+a.id.A,_.next()),_e=ve.offset().top,be=ve.offset().left,we=pe?me?.25:fe?.5:1:-1,xe=fe?me?.75:pe?.5:0:-1,ke=(n.clientY+V-_e)/ve.height();if((1==we||ke<=we&&ke>=-.2)&&pe?(se=1-y.width(),ae=_e-y.height()/2,A=a.move.TYPE_PREV):(0==xe||ke>=xe&&ke<=1.2)&&fe?(se=1-y.width(),ae=null==ye||u.nodeIsParent(d,le)&&le.open?_e+ve.height()-y.height()/2:ye.offset().top-y.height()/2,A=a.move.TYPE_NEXT):me?(se=5-y.width(),ae=_e,A=a.move.TYPE_INNER):ge(),_&&(y.css({display:"block",top:ae+"px",left:be+se+"px"}),ve.addClass(a.node.TMPTARGET_NODE+"_"+A),D==M&&C==A||(O=(new Date).getTime()),le&&u.nodeIsParent(d,le)&&A==a.move.TYPE_INNER)){var Se=!0;window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId!==le.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===le.tId&&(Se=!1),Se&&(window.zTreeMoveTimer=setTimeout((function(){A==a.move.TYPE_INNER&&le&&u.nodeIsParent(d,le)&&!le.open&&(new Date).getTime()-O>T.edit.drag.autoOpenTime&&s.apply(T.callback.beforeDragOpen,[T.treeId,le],!0)&&(l.switchNode(T,le),T.edit.drag.autoExpandTrigger&&T.treeObj.trigger(a.event.EXPAND,[T.treeId,le]))}),T.edit.drag.autoOpenTime+50),window.zTreeMoveTargetNodeTId=le.tId)}}else ge()}else A=a.move.TYPE_INNER,_&&s.apply(T.edit.drag.inner,[T.treeId,g,null],!!T.edit.drag.inner)?_.addClass(a.node.TMPTARGET_TREE):_=null,y.css({display:"none"}),window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null);D=M,C=A,d.treeObj.trigger(a.event.DRAGMOVE,[n,d.treeId,g])}return!1}function R(n){if(window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null),D=null,C=null,x.unbind("mousemove",N),x.unbind("mouseup",R),x.unbind("selectstart",P),k.css("cursor",""),_&&(_.removeClass(a.node.TMPTARGET_TREE),M&&e("#"+M+a.id.A,_).removeClass(a.node.TMPTARGET_NODE+"_"+a.move.TYPE_PREV).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_NEXT).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_INNER)),s.showIfameMask(d,!1),p.showHoverDom=!0,0!=h.dragFlag){var r,i,o;for(h.dragFlag=0,r=0,i=g.length;r<i;r++)o=g[r],u.nodeIsParent(d,o)&&h.dragNodeShowBefore[o.tId]&&!o.open&&(l.expandCollapseNode(d,o,!o.open),delete h.dragNodeShowBefore[o.tId]);v&&v.remove(),y&&y.remove();var f=(n.ctrlKey||n.metaKey)&&d.edit.drag.isMove&&d.edit.drag.isCopy||!d.edit.drag.isMove&&d.edit.drag.isCopy;if(!f&&_&&M&&g[0].parentTId&&M==g[0].parentTId&&A==a.move.TYPE_INNER&&(_=null),_){var m=null==M?null:u.getNodeCache(T,M);if(0==s.apply(d.callback.beforeDrop,[T.treeId,g,m,A,f],!0))return void l.selectNodes(E,g);var b=f?s.clone(g):g;function w(){if(S){if(!f)for(var e=0,t=g.length;e<t;e++)l.removeNode(d,g[e]);A==a.move.TYPE_INNER?l.addNodes(T,m,-1,b):l.addNodes(T,m.getParentNode(),A==a.move.TYPE_PREV?m.getIndex():m.getIndex()+1,b)}else if(f&&A==a.move.TYPE_INNER)l.addNodes(T,m,-1,b);else if(f)l.addNodes(T,m.getParentNode(),A==a.move.TYPE_PREV?m.getIndex():m.getIndex()+1,b);else if(A!=a.move.TYPE_NEXT)for(e=0,t=b.length;e<t;e++)l.moveNode(T,m,b[e],A,!1);else for(e=-1,t=b.length-1;e<t;t--)l.moveNode(T,m,b[t],A,!1);l.selectNodes(T,b);var r=c(b[0],d).get(0);l.scrollIntoView(d,r),d.treeObj.trigger(a.event.DROP,[n,T.treeId,b,m,A,f])}A==a.move.TYPE_INNER&&s.canAsync(T,m)?l.asyncNode(T,m,!1,w):w()}else l.selectNodes(E,g),d.treeObj.trigger(a.event.DROP,[n,d.treeId,g,null,null,null])}}function P(){return!1}return s.uCanDo(d)&&x.bind("mousemove",N),x.bind("mouseup",R),x.bind("selectstart",P),!0}},r={addEditBtn:function(e,t){if(!(t.editNameFlag||c(t,a.id.EDIT,e).length>0)&&s.apply(e.edit.showRenameBtn,[e.treeId,t],e.edit.showRenameBtn)){var n=c(t,a.id.A,e),r="<span class='"+a.className.BUTTON+" edit' id='"+t.tId+a.id.EDIT+"' title='"+s.apply(e.edit.renameTitle,[e.treeId,t],e.edit.renameTitle)+"' treeNode"+a.id.EDIT+" style='display:none;'></span>";n.append(r),c(t,a.id.EDIT,e).bind("click",(function(){return!(!s.uCanDo(e)||0==s.apply(e.callback.beforeEditName,[e.treeId,t],!0))&&(l.editNode(e,t),!1)})).show()}},addRemoveBtn:function(e,t){if(!(t.editNameFlag||c(t,a.id.REMOVE,e).length>0)&&s.apply(e.edit.showRemoveBtn,[e.treeId,t],e.edit.showRemoveBtn)){var n=c(t,a.id.A,e),r="<span class='"+a.className.BUTTON+" remove' id='"+t.tId+a.id.REMOVE+"' title='"+s.apply(e.edit.removeTitle,[e.treeId,t],e.edit.removeTitle)+"' treeNode"+a.id.REMOVE+" style='display:none;'></span>";n.append(r),c(t,a.id.REMOVE,e).bind("click",(function(){return!(!s.uCanDo(e)||0==s.apply(e.callback.beforeRemove,[e.treeId,t],!0))&&(l.removeNode(e,t),e.treeObj.trigger(a.event.REMOVE,[e.treeId,t]),!1)})).bind("mousedown",(function(e){return!0})).show()}},addHoverDom:function(e,t){u.getRoots().showHoverDom&&(t.isHover=!0,e.edit.enable&&(l.addEditBtn(e,t),l.addRemoveBtn(e,t)),s.apply(e.view.addHoverDom,[e.treeId,t]))},cancelCurEditNode:function(e,t,n){var r=u.getRoot(e),i=r.curEditNode;if(i){var o=r.curEditInput,d=t||(n?u.nodeName(e,i):o.val());if(!1===s.apply(e.callback.beforeRename,[e.treeId,i,d,n],!0))return!1;u.nodeName(e,i,d),c(i,a.id.A,e).removeClass(a.node.CURSELECTED_EDIT),o.unbind(),l.setNodeName(e,i),i.editNameFlag=!1,r.curEditNode=null,r.curEditInput=null,l.selectNode(e,i,!1),e.treeObj.trigger(a.event.RENAME,[e.treeId,i,n])}return r.noSelection=!0,!0},editNode:function(e,t){var n=u.getRoot(e);if(l.editNodeBlur=!1,u.isSelectedNode(e,t)&&n.curEditNode==t&&t.editNameFlag)setTimeout((function(){s.inputFocus(n.curEditInput)}),0);else{t.editNameFlag=!0,l.removeTreeDom(e,t),l.cancelCurEditNode(e),l.selectNode(e,t,!1),c(t,a.id.SPAN,e).html("<input type=text class='rename' id='"+t.tId+a.id.INPUT+"' treeNode"+a.id.INPUT+" >");var r=c(t,a.id.INPUT,e);r.attr("value",u.nodeName(e,t)),e.edit.editNameSelectAll?s.inputSelect(r):s.inputFocus(r),r.bind("blur",(function(t){l.editNodeBlur||l.cancelCurEditNode(e)})).bind("keydown",(function(t){"13"==t.keyCode?(l.editNodeBlur=!0,l.cancelCurEditNode(e)):"27"==t.keyCode&&l.cancelCurEditNode(e,null,!0)})).bind("click",(function(e){return!1})).bind("dblclick",(function(e){return!1})),c(t,a.id.A,e).addClass(a.node.CURSELECTED_EDIT),n.curEditInput=r,n.noSelection=!1,n.curEditNode=t}},moveNode:function(e,t,n,r,i,o){var s=u.getRoot(e);if(t!=n&&(!e.data.keep.leaf||!t||u.nodeIsParent(e,t)||r!=a.move.TYPE_INNER)){var d=n.parentTId?n.getParentNode():s,h=null===t||t==s;h&&null===t&&(t=s),h&&(r=a.move.TYPE_INNER);var p,f,m=t.parentTId?t.getParentNode():s;if(r!=a.move.TYPE_PREV&&r!=a.move.TYPE_NEXT&&(r=a.move.TYPE_INNER),r==a.move.TYPE_INNER&&(h?n.parentTId=null:(u.nodeIsParent(e,t)||(u.nodeIsParent(e,t,!0),t.open=!!t.open,l.setNodeLineIcos(e,t)),n.parentTId=t.tId)),h)f=p=e.treeObj;else{if(o||r!=a.move.TYPE_INNER?o||l.expandCollapseNode(e,t.getParentNode(),!0,!1):l.expandCollapseNode(e,t,!0,!1),p=c(t,e),f=c(t,a.id.UL,e),p.get(0)&&!f.get(0)){var g=[];l.makeUlHtml(e,t,g,""),p.append(g.join(""))}f=c(t,a.id.UL,e)}var v=c(n,e);v.get(0)?p.get(0)||v.remove():v=l.appendNodes(e,n.level,[n],null,-1,!1,!0).join(""),f.get(0)&&r==a.move.TYPE_INNER?f.append(v):p.get(0)&&r==a.move.TYPE_PREV?p.before(v):p.get(0)&&r==a.move.TYPE_NEXT&&p.after(v);var y,_,b=-1,w=0,x=null,k=null,S=n.level,T=u.nodeChildren(e,d),E=u.nodeChildren(e,m),D=u.nodeChildren(e,t);if(n.isFirstNode)b=0,T.length>1&&((x=T[1]).isFirstNode=!0);else if(n.isLastNode)(x=T[(b=T.length-1)-1]).isLastNode=!0;else for(y=0,_=T.length;y<_;y++)if(T[y].tId==n.tId){b=y;break}if(b>=0&&T.splice(b,1),r!=a.move.TYPE_INNER)for(y=0,_=E.length;y<_;y++)E[y].tId==t.tId&&(w=y);if(r==a.move.TYPE_INNER?(D||(D=u.nodeChildren(e,t,[])),D.length>0&&((k=D[D.length-1]).isLastNode=!1),D.splice(D.length,0,n),n.isLastNode=!0,n.isFirstNode=1==D.length):t.isFirstNode&&r==a.move.TYPE_PREV?(E.splice(w,0,n),(k=t).isFirstNode=!1,n.parentTId=t.parentTId,n.isFirstNode=!0,n.isLastNode=!1):t.isLastNode&&r==a.move.TYPE_NEXT?(E.splice(w+1,0,n),(k=t).isLastNode=!1,n.parentTId=t.parentTId,n.isFirstNode=!1,n.isLastNode=!0):(r==a.move.TYPE_PREV?E.splice(w,0,n):E.splice(w+1,0,n),n.parentTId=t.parentTId,n.isFirstNode=!1,n.isLastNode=!1),u.fixPIdKeyValue(e,n),u.setSonNodeLevel(e,n.getParentNode(),n),l.setNodeLineIcos(e,n),l.repairNodeLevelClass(e,n,S),!e.data.keep.parent&&T.length<1){u.nodeIsParent(e,d,!1),d.open=!1;var C=c(d,a.id.UL,e),M=c(d,a.id.SWITCH,e),A=c(d,a.id.ICON,e);l.replaceSwitchClass(d,M,a.folder.DOCU),l.replaceIcoClass(d,A,a.folder.DOCU),C.css("display","none")}else x&&l.setNodeLineIcos(e,x);k&&l.setNodeLineIcos(e,k),e.check&&e.check.enable&&l.repairChkClass&&(l.repairChkClass(e,d),l.repairParentChkClassWithSelf(e,d),d!=n.parent&&l.repairParentChkClassWithSelf(e,n)),o||l.expandCollapseParentNode(e,n.getParentNode(),!0,i)}},removeEditBtn:function(e,t){c(t,a.id.EDIT,e).unbind().remove()},removeRemoveBtn:function(e,t){c(t,a.id.REMOVE,e).unbind().remove()},removeTreeDom:function(e,t){t.isHover=!1,l.removeEditBtn(e,t),l.removeRemoveBtn(e,t),s.apply(e.view.removeHoverDom,[e.treeId,t])},repairNodeLevelClass:function(e,t,n){if(n!==t.level){var r=c(t,e),i=c(t,a.id.A,e),o=c(t,a.id.UL,e),s=a.className.LEVEL+n,l=a.className.LEVEL+t.level;r.removeClass(s),r.addClass(l),i.removeClass(s),i.addClass(l),o.removeClass(s),o.addClass(l)}},selectNodes:function(e,t){for(var n=0,r=t.length;n<r;n++)l.selectNode(e,t[n],n>0)}},i={tools:{getAbs:function(e){var t=e.getBoundingClientRect(),n=document.body.scrollTop+document.documentElement.scrollTop,r=document.body.scrollLeft+document.documentElement.scrollLeft;return[t.left+r,t.top+n]},inputFocus:function(e){e.get(0)&&(e.focus(),s.setCursorPosition(e.get(0),e.val().length))},inputSelect:function(e){e.get(0)&&(e.focus(),e.select())},setCursorPosition:function(e,t){if(e.setSelectionRange)e.focus(),e.setSelectionRange(t,t);else if(e.createTextRange){var n=e.createTextRange();n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select()}},showIfameMask:function(e,t){for(var n=u.getRoot(e);n.dragMaskList.length>0;)n.dragMaskList[0].remove(),n.dragMaskList.shift();if(t)for(var r=c("iframe",e),i=0,o=r.length;i<o;i++){var a=r.get(i),l=s.getAbs(a),d=c("<div id='zTreeMask_"+i+"' class='zTreeMask' style='top:"+l[1]+"px; left:"+l[0]+"px; width:"+a.offsetWidth+"px; height:"+a.offsetHeight+"px;'></div>",e);d.appendTo(c("body",e)),n.dragMaskList.push(d)}}},view:r,event:{},data:{setSonNodeLevel:function(e,t,n){if(n){var r=u.nodeChildren(e,n),i=n.level;if(n.level=t?t.level+1:0,l.repairNodeLevelClass(e,n,i),r)for(var o=0,s=r.length;o<s;o++)r[o]&&u.setSonNodeLevel(e,n,r[o])}}}};e.extend(!0,e.fn.zTree.consts,t),e.extend(!0,e.fn.zTree._z,i);var o=e.fn.zTree,s=o._z.tools,a=o.consts,l=o._z.view,u=o._z.data,c=(o._z.event,s.$);u.exSetting({edit:{enable:!1,editNameSelectAll:!1,showRemoveBtn:!0,showRenameBtn:!0,removeTitle:"remove",renameTitle:"rename",drag:{autoExpandTrigger:!1,isCopy:!0,isMove:!0,prev:!0,next:!0,inner:!0,minMoveSize:5,borderMax:10,borderMin:-5,maxShowNodeNum:5,autoOpenTime:500}},view:{addHoverDom:null,removeHoverDom:null},callback:{beforeDrag:null,beforeDragOpen:null,beforeDrop:null,beforeEditName:null,beforeRename:null,onDrag:null,onDragMove:null,onDrop:null,onRename:null}}),u.addInitBind((function(e){var t=e.treeObj,n=a.event;t.bind(n.RENAME,(function(t,n,r,i){s.apply(e.callback.onRename,[t,n,r,i])})),t.bind(n.DRAG,(function(t,n,r,i){s.apply(e.callback.onDrag,[n,r,i])})),t.bind(n.DRAGMOVE,(function(t,n,r,i){s.apply(e.callback.onDragMove,[n,r,i])})),t.bind(n.DROP,(function(t,n,r,i,o,a,l){s.apply(e.callback.onDrop,[n,r,i,o,a,l])}))})),u.addInitUnBind((function(e){var t=e.treeObj,n=a.event;t.unbind(n.RENAME),t.unbind(n.DRAG),t.unbind(n.DRAGMOVE),t.unbind(n.DROP)})),u.addInitCache((function(e){})),u.addInitNode((function(e,t,n,r,i,o,s){n&&(n.isHover=!1,n.editNameFlag=!1)})),u.addInitProxy((function(e){var t=e.target,r=u.getSetting(e.data.treeId),i=e.relatedTarget,o="",l=null,c="",d=null,h=null;if(s.eqs(e.type,"mouseover")?(h=s.getMDom(r,t,[{tagName:"a",attrName:"treeNode"+a.id.A}]))&&(o=s.getNodeMainDom(h).id,c="hoverOverNode"):s.eqs(e.type,"mouseout")?(h=s.getMDom(r,i,[{tagName:"a",attrName:"treeNode"+a.id.A}]))||(o="remove",c="hoverOutNode"):s.eqs(e.type,"mousedown")&&(h=s.getMDom(r,t,[{tagName:"a",attrName:"treeNode"+a.id.A}]))&&(o=s.getNodeMainDom(h).id,c="mousedownNode"),o.length>0)switch(l=u.getNodeCache(r,o),c){case"mousedownNode":d=n.onMousedownNode;break;case"hoverOverNode":d=n.onHoverOverNode;break;case"hoverOutNode":d=n.onHoverOutNode}return{stop:!1,node:l,nodeEventType:c,nodeEventCallback:d,treeEventType:"",treeEventCallback:null}})),u.addInitRoot((function(e){var t=u.getRoot(e),n=u.getRoots();t.curEditNode=null,t.curEditInput=null,t.curHoverNode=null,t.dragFlag=0,t.dragNodeShowBefore=[],t.dragMaskList=new Array,n.showHoverDom=!0})),u.addZTreeTools((function(e,t){t.cancelEditName=function(e){u.getRoot(this.setting).curEditNode&&l.cancelCurEditNode(this.setting,e||null,!0)},t.copyNode=function(t,n,r,i){if(!n)return null;var o=u.nodeIsParent(e,t);if(t&&!o&&this.setting.data.keep.leaf&&r===a.move.TYPE_INNER)return null;var c=this,d=s.clone(n);if(t||(t=null,r=a.move.TYPE_INNER),r==a.move.TYPE_INNER){function h(){l.addNodes(c.setting,t,-1,[d],i)}s.canAsync(this.setting,t)?l.asyncNode(this.setting,t,i,h):h()}else l.addNodes(this.setting,t.parentNode,-1,[d],i),l.moveNode(this.setting,t,d,r,!1,i);return d},t.editName=function(e){e&&e.tId&&e===u.getNodeCache(this.setting,e.tId)&&(e.parentTId&&l.expandCollapseParentNode(this.setting,e.getParentNode(),!0),l.editNode(this.setting,e))},t.moveNode=function(t,n,r,i){if(!n)return n;var o=u.nodeIsParent(e,t);if(t&&!o&&this.setting.data.keep.leaf&&r===a.move.TYPE_INNER)return null;if(t&&(n.parentTId==t.tId&&r==a.move.TYPE_INNER||c(n,this.setting).find("#"+t.tId).length>0))return null;t||(t=null);var d=this;function h(){l.moveNode(d.setting,t,n,r,!1,i)}return s.canAsync(this.setting,t)&&r===a.move.TYPE_INNER?l.asyncNode(this.setting,t,i,h):h(),n},t.setEditable=function(e){return this.setting.edit.enable=e,this.refresh()}}));var d=l.cancelPreSelectedNode;l.cancelPreSelectedNode=function(e,t){for(var n=u.getRoot(e).curSelectedList,r=0,i=n.length;r<i&&(t&&t!==n[r]||(l.removeTreeDom(e,n[r]),!t));r++);d&&d.apply(l,arguments)};var h=l.createNodes;l.createNodes=function(e,t,n,r,i){h&&h.apply(l,arguments),n&&l.repairParentChkClassWithSelf&&l.repairParentChkClassWithSelf(e,r)};var p=l.makeNodeUrl;l.makeNodeUrl=function(e,t){return e.edit.enable?null:p.apply(l,arguments)};var f=l.removeNode;l.removeNode=function(e,t){var n=u.getRoot(e);n.curEditNode===t&&(n.curEditNode=null),f&&f.apply(l,arguments)};var m=l.selectNode;l.selectNode=function(e,t,n){var r=u.getRoot(e);return(!u.isSelectedNode(e,t)||r.curEditNode!=t||!t.editNameFlag)&&(m&&m.apply(l,arguments),l.addHoverDom(e,t),!0)};var g=s.uCanDo;s.uCanDo=function(e,t){var n=u.getRoot(e);return!(!t||!(s.eqs(t.type,"mouseover")||s.eqs(t.type,"mouseout")||s.eqs(t.type,"mousedown")||s.eqs(t.type,"mouseup")))||(n.curEditNode&&(l.editNodeBlur=!1,n.curEditInput.focus()),!n.curEditNode&&(!g||g.apply(l,arguments)))}}(jQuery),function(e){e.fn.zTreeKeyboardNavigationDestroy=function(){},e.fn.zTreeKeyboardNavigation=function(t,n,r=null,i){("string"==typeof n||n instanceof String)&&(n=e(n));var o=t.getNodes();if(o){var s=function(){(r=t.getSelectedNodes())&&r.length&&e("#"+r[0].tId).focus()};e.fn.zTreeKeyboardNavigationDestroy(),e.fn.zTreeKeyboardNavigationDestroy=function(){e(n).off("keydown")},e.fn.changeTreeIcons=function(){let t=e(".app-tree li span.button.switch");e(t).map(((t,n)=>{e(n).addClass(i),e(n).on("click",(function(t){setTimeout((()=>{e(n).addClass(i)}),0)}))}))},e(n).on("keydown",(function(n){var r=t.getSelectedNodes(),i=r.length?r[0]:null,a=function(){t.selectNode(o[0],!1,!0)},l=function(){var e=t.transformToArray(o);t.selectNode(e[e.length-1])};switch(n.keyCode){case 32:return void(i&&i.isParent&&(t.expandNode(i,!i.open,!0,!0),e.fn.changeTreeIcons()));case 36:a();break;case 35:l();break;case 33:case 34:break;case 37:!function(){if(i){var e=i.getParentNode(),n=i.getPreNode();if(e||n)if(n){if(n.isParent){for(;n&&n.isParent&&n.open&&n.children;)n=n.children[n.children.length-1];return void t.selectNode(n)}t.selectNode(n)}else e&&t.selectNode(e,!1,!0)}}();break;case 38:!function(){var e;if(i){if(!(e=i.getPreNode()))return}else l();e&&t.selectNode(e)}();break;case 39:!function(){if(i)if(i.isParent&&i.open&&i.children)t.selectNode(i.children[0]);else if(n=i.getNextNode())t.selectNode(n);else for(var e=i;e=e.getParentNode();){var n;if(n=e.getNextNode()){t.selectNode(n);break}}}();break;case 40:!function(){var e;if(i){if(!(e=i.getNextNode()))return}else a();e&&t.selectNode(e)}();break;default:if(!function(e){if(!Array.from({length:26},((e,t)=>t+65)).includes(95&e))return!1;var n=t.transformToArray(o);if(!(n=n.filter((t=>"accesskey"in t&&t.accesskey.length&&(95&t.accesskey.charCodeAt(0))==e))).length)return!1;var r=t.getSelectedNodes();return!!r.length&&r[0]!=n[0]&&(t.selectNode(n[0]),!0)}(95&n.keyCode))return}s()})),r&&r.length?(t.selectNode(r[0]),s()):e(n).trigger({type:"keydown",which:36,keyCode:36})}}}(jQuery);