-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path984.822992464524708593cf.js
1 lines (1 loc) · 265 KB
/
984.822992464524708593cf.js
1
(self.webpackChunkvyr=self.webpackChunkvyr||[]).push([[984],{2057:(t,e)=>{"use strict";var i={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,e),window.removeEventListener("testPassiveEventSupport",n,e),i.hasSupport=t}}};i.update(),e.Z=i},7090:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2503),s=i(3326),o=function(t){function e(){t.apply(this,arguments),this.value=null,this.hasNext=!1,this.hasCompleted=!1}return n(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),s.Subscription.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(r.Subject);e.AsyncSubject=o},5140:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2503),s=i(2e3),o=function(t){function e(e){t.call(this),this._value=e}return n(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var i=t.prototype._subscribe.call(this,e);return i&&!i.closed&&e.next(this._value),i},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new s.ObjectUnsubscribedError;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(r.Subject);e.BehaviorSubject=o},2731:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=function(t){function e(e,i,n){t.call(this),this.parent=e,this.outerValue=i,this.outerIndex=n,this.index=0}return n(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(i(4164).Subscriber);e.InnerSubscriber=r},2995:(t,e,i)=>{"use strict";var n=i(6437);e.Notification=function(){function t(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,i){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}},t.prototype.accept=function(t,e,i){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,i)},t.prototype.toObservable=function(){switch(this.kind){case"N":return n.Observable.of(this.value);case"E":return n.Observable.throw(this.error);case"C":return n.Observable.empty()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},6437:(t,e,i)=>{"use strict";var n=i(276),r=i(7622),s=i(1275),o=i(8187);e.Observable=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var i=new t;return i.source=this,i.operator=e,i},t.prototype.subscribe=function(t,e,i){var n=this.operator,s=r.toSubscriber(t,e,i);if(n?n.call(s,this.source):s.add(this.source||!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.syncErrorThrown=!0,t.syncErrorValue=e,t.error(e)}},t.prototype.forEach=function(t,e){var i=this;if(e||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?e=n.root.Rx.config.Promise:n.root.Promise&&(e=n.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,n){var r;r=i.subscribe(function(e){if(r)try{t(e)}catch(i){n(i),r.unsubscribe()}else t(e)},n,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[s.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 0===t.length?this:o.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;if(t||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?t=n.root.Rx.config.Promise:n.root.Promise&&(t=n.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,i){var n;e.subscribe(function(t){return n=t},function(t){return i(t)},function(){return t(n)})})},t.create=function(e){return new t(e)},t}()},9377:(t,e)=>{"use strict";e.empty={closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}}},257:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=function(t){function e(){t.apply(this,arguments)}return n(e,t),e.prototype.notifyNext=function(t,e,i,n,r){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(i(4164).Subscriber);e.OuterSubscriber=r},4336:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2503),s=i(7869),o=i(3326),a=i(2921),l=i(2e3),c=i(7046),u=function(t){function e(e,i,n){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===i&&(i=Number.POSITIVE_INFINITY),t.call(this),this.scheduler=n,this._events=[],this._bufferSize=e<1?1:e,this._windowTime=i<1?1:i}return n(e,t),e.prototype.next=function(e){var i=this._getNow();this._events.push(new h(i,e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,i=this._trimBufferThenGetEvents(),n=this.scheduler;if(this.closed)throw new l.ObjectUnsubscribedError;this.hasError||this.isStopped?e=o.Subscription.EMPTY:(this.observers.push(t),e=new c.SubjectSubscription(this,t)),n&&t.add(t=new a.ObserveOnSubscriber(t,n));for(var r=i.length,s=0;s<r&&!t.closed;s++)t.next(i[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||s.queue).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,i=this._windowTime,n=this._events,r=n.length,s=0;s<r&&!(t-n[s].time<i);)s++;return r>e&&(s=Math.max(s,r-e)),s>0&&n.splice(0,s),n},e}(r.Subject);e.ReplaySubject=u;var h=function(){return function(t,e){this.time=t,this.value=e}}()},1984:(t,e)=>{"use strict";e.Scheduler=function(){function t(e,i){void 0===i&&(i=t.now),this.SchedulerAction=e,this.now=i}return t.prototype.schedule=function(t,e,i){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(i,e)},t.now=Date.now?Date.now:function(){return+new Date},t}()},2503:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(6437),s=i(4164),o=i(3326),a=i(2e3),l=i(7046),c=i(9903),u=function(t){function e(e){t.call(this,e),this.destination=e}return n(e,t),e}(s.Subscriber);e.SubjectSubscriber=u;var h=function(t){function e(){t.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return n(e,t),e.prototype[c.rxSubscriber]=function(){return new u(this)},e.prototype.lift=function(t){var e=new p(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new a.ObjectUnsubscribedError;if(!this.isStopped)for(var e=this.observers,i=e.length,n=e.slice(),r=0;r<i;r++)n[r].next(t)},e.prototype.error=function(t){if(this.closed)throw new a.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,i=e.length,n=e.slice(),r=0;r<i;r++)n[r].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new a.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,e=t.length,i=t.slice(),n=0;n<e;n++)i[n].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new a.ObjectUnsubscribedError;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new a.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),o.Subscription.EMPTY):this.isStopped?(t.complete(),o.Subscription.EMPTY):(this.observers.push(t),new l.SubjectSubscription(this,t))},e.prototype.asObservable=function(){var t=new r.Observable;return t.source=this,t},e.create=function(t,e){return new p(t,e)},e}(r.Observable);e.Subject=h;var p=function(t){function e(e,i){t.call(this),this.destination=e,this.source=i}return n(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):o.Subscription.EMPTY},e}(h);e.AnonymousSubject=p},7046:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=function(t){function e(e,i){t.call(this),this.subject=e,this.subscriber=i,this.closed=!1}return n(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}},e}(i(3326).Subscription);e.SubjectSubscription=r},4164:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(8398),s=i(3326),o=i(9377),a=i(9903),l=function(t){function e(e,i,n){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=o.empty;break;case 1:if(!e){this.destination=o.empty;break}if("object"==typeof e){if(u(e)){var r=e[a.rxSubscriber]();this.syncErrorThrowable=r.syncErrorThrowable,this.destination=r,r.add(this)}else this.syncErrorThrowable=!0,this.destination=new c(this,e);break}default:this.syncErrorThrowable=!0,this.destination=new c(this,e,i,n)}}return n(e,t),e.prototype[a.rxSubscriber]=function(){return this},e.create=function(t,i,n){var r=new e(t,i,n);return r.syncErrorThrowable=!1,r},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(s.Subscription);e.Subscriber=l;var c=function(t){function e(e,i,n,s){var a;t.call(this),this._parentSubscriber=e;var l=this;r.isFunction(i)?a=i:i&&(a=i.next,n=i.error,s=i.complete,i!==o.empty&&(l=Object.create(i),r.isFunction(l.unsubscribe)&&this.add(l.unsubscribe.bind(l)),l.unsubscribe=this.unsubscribe.bind(this))),this._context=l,this._next=a,this._error=n,this._complete=s}return n(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var i=function(){return t._complete.call(t._context)};e.syncErrorThrowable?(this.__tryOrSetError(e,i),this.unsubscribe()):(this.__tryOrUnsub(i),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(i){throw this.unsubscribe(),i}},e.prototype.__tryOrSetError=function(t,e,i){try{e.call(this._context,i)}catch(n){return t.syncErrorValue=n,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l);function u(t){return t instanceof l||"syncErrorThrowable"in t&&t[a.rxSubscriber]}},3326:(t,e,i)=>{"use strict";var n=i(9939),r=i(1953),s=i(8398),o=i(6226),a=i(7812),l=i(3369);function c(t){return t.reduce(function(t,e){return t.concat(e instanceof l.UnsubscriptionError?e.errors:e)},[])}e.Subscription=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var i=this,u=i._parent,h=i._parents,p=i._unsubscribe,d=i._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var f=-1,b=h?h.length:0;u;)u.remove(this),u=++f<b&&h[f]||null;if(s.isFunction(p)&&o.tryCatch(p).call(this)===a.errorObject&&(e=!0,t=t||(a.errorObject.e instanceof l.UnsubscriptionError?c(a.errorObject.e.errors):[a.errorObject.e])),n.isArray(d))for(f=-1,b=d.length;++f<b;){var m=d[f];if(r.isObject(m)&&o.tryCatch(m.unsubscribe).call(m)===a.errorObject){e=!0,t=t||[];var v=a.errorObject.e;v instanceof l.UnsubscriptionError?t=t.concat(c(v.errors)):t.push(v)}}if(e)throw new l.UnsubscriptionError(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var i=e;switch(typeof e){case"function":i=new t(e);case"object":if(i.closed||"function"!=typeof i.unsubscribe)return i;if(this.closed)return i.unsubscribe(),i;if("function"!=typeof i._addParent){var n=i;(i=new t)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(i),i._addParent(this),i},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var i=e.indexOf(t);-1!==i&&e.splice(i,1)}},t.prototype._addParent=function(t){var e=this._parent,i=this._parents;e&&e!==t?i?-1===i.indexOf(t)&&i.push(t):this._parents=[t]:this._parent=t},t.EMPTY=((e=new t).closed=!0,e),t}()},6159:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(6437),s=i(6027),o=i(699),a=function(t){function e(e,i){t.call(this),this.arrayLike=e,this.scheduler=i,i||1!==e.length||(this._isScalar=!0,this.value=e[0])}return n(e,t),e.create=function(t,i){var n=t.length;return 0===n?new o.EmptyObservable:1===n?new s.ScalarObservable(t[0],i):new e(t,i)},e.dispatch=function(t){var e=t.arrayLike,i=t.index,n=t.subscriber;n.closed||(i>=t.length?n.complete():(n.next(e[i]),t.index=i+1,this.schedule(t)))},e.prototype._subscribe=function(t){var i=this.arrayLike,n=this.scheduler,r=i.length;if(n)return n.schedule(e.dispatch,0,{arrayLike:i,index:0,length:r,subscriber:t});for(var s=0;s<r&&!t.closed;s++)t.next(i[s]);t.complete()},e}(r.Observable);e.ArrayLikeObservable=a},4655:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(6437),s=i(6027),o=i(699),a=i(2774),l=function(t){function e(e,i){t.call(this),this.array=e,this.scheduler=i,i||1!==e.length||(this._isScalar=!0,this.value=e[0])}return n(e,t),e.create=function(t,i){return new e(t,i)},e.of=function(){for(var t=[],i=0;i<arguments.length;i++)t[i-0]=arguments[i];var n=t[t.length-1];a.isScheduler(n)?t.pop():n=null;var r=t.length;return r>1?new e(t,n):1===r?new s.ScalarObservable(t[0],n):new o.EmptyObservable(n)},e.dispatch=function(t){var e=t.array,i=t.index,n=t.subscriber;i>=t.count?n.complete():(n.next(e[i]),n.closed||(t.index=i+1,this.schedule(t)))},e.prototype._subscribe=function(t){var i=this.array,n=i.length,r=this.scheduler;if(r)return r.schedule(e.dispatch,0,{array:i,index:0,count:n,subscriber:t});for(var s=0;s<n&&!t.closed;s++)t.next(i[s]);t.complete()},e}(r.Observable);e.ArrayObservable=l},5569:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2503),s=i(6437),o=i(4164),a=i(3326),l=i(4702),c=function(t){function e(e,i){t.call(this),this.source=e,this.subjectFactory=i,this._refCount=0,this._isComplete=!1}return n(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new a.Subscription).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed?(this._connection=null,t=a.Subscription.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return l.refCount()(this)},e}(s.Observable);e.ConnectableObservable=c;var u=c.prototype;e.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:u._subscribe},_isComplete:{value:u._isComplete,writable:!0},getSubject:{value:u.getSubject},connect:{value:u.connect},refCount:{value:u.refCount}};var h=function(t){function e(e,i){t.call(this,e),this.connectable=i}return n(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(r.SubjectSubscriber);!function(t){function e(e,i){t.call(this,e),this.connectable=i}n(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var i=this.connection,n=t._connection;this.connection=null,!n||i&&n!==i||n.unsubscribe()}}else this.connection=null}}(o.Subscriber)},699:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=function(t){function e(e){t.call(this),this.scheduler=e}return n(e,t),e.create=function(t){return new e(t)},e.dispatch=function(t){t.subscriber.complete()},e.prototype._subscribe=function(t){var i=this.scheduler;if(i)return i.schedule(e.dispatch,0,{subscriber:t});t.complete()},e}(i(6437).Observable);e.EmptyObservable=r},4843:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(9939),s=i(899),o=i(8598),a=i(4293),l=i(3744),c=i(4655),u=i(6159),h=i(3950),p=i(6437),d=i(2921),f=i(1275),b=function(t){function e(e,i){t.call(this,null),this.ish=e,this.scheduler=i}return n(e,t),e.create=function(t,i){if(null!=t){if("function"==typeof t[f.observable])return t instanceof p.Observable&&!i?t:new e(t,i);if(r.isArray(t))return new c.ArrayObservable(t,i);if(o.isPromise(t))return new a.PromiseObservable(t,i);if("function"==typeof t[h.iterator]||"string"==typeof t)return new l.IteratorObservable(t,i);if(s.isArrayLike(t))return new u.ArrayLikeObservable(t,i)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")},e.prototype._subscribe=function(t){var e=this.ish,i=this.scheduler;return null==i?e[f.observable]().subscribe(t):e[f.observable]().subscribe(new d.ObserveOnSubscriber(t,i,0))},e}(p.Observable);e.FromObservable=b},3744:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(276),s=i(6437),o=i(3950),a=function(t){function e(e,i){if(t.call(this),this.scheduler=i,null==e)throw new Error("iterator cannot be null.");this.iterator=function(t){var e=t[o.iterator];if(!e&&"string"==typeof t)return new l(t);if(!e&&void 0!==t.length)return new c(t);if(!e)throw new TypeError("object is not iterable");return t[o.iterator]()}(e)}return n(e,t),e.create=function(t,i){return new e(t,i)},e.dispatch=function(t){var e=t.index,i=t.iterator,n=t.subscriber;if(t.hasError)n.error(t.error);else{var r=i.next();r.done?n.complete():(n.next(r.value),t.index=e+1,n.closed?"function"==typeof i.return&&i.return():this.schedule(t))}},e.prototype._subscribe=function(t){var i=this.iterator,n=this.scheduler;if(n)return n.schedule(e.dispatch,0,{index:0,iterator:i,subscriber:t});for(;;){var r=i.next();if(r.done){t.complete();break}if(t.next(r.value),t.closed){"function"==typeof i.return&&i.return();break}}},e}(s.Observable);e.IteratorObservable=a;var l=function(){function t(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length),this.str=t,this.idx=e,this.len=i}return t.prototype[o.iterator]=function(){return this},t.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}},t}(),c=function(){function t(t,e,i){void 0===e&&(e=0),void 0===i&&(i=function(t){var e,i=+t.length;return isNaN(i)?0:0!==i&&"number"==typeof(e=i)&&r.root.isFinite(e)?(i=function(t){var e=+t;return 0===e||isNaN(e)?e:e<0?-1:1}(i)*Math.floor(Math.abs(i)))<=0?0:i>u?u:i:i}(t)),this.arr=t,this.idx=e,this.len=i}return t.prototype[o.iterator]=function(){return this},t.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}},t}(),u=Math.pow(2,53)-1},4293:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(276),s=function(t){function e(e,i){t.call(this),this.promise=e,this.scheduler=i}return n(e,t),e.create=function(t,i){return new e(t,i)},e.prototype._subscribe=function(t){var e=this,i=this.promise,n=this.scheduler;if(null==n)this._isScalar?t.closed||(t.next(this.value),t.complete()):i.then(function(i){e.value=i,e._isScalar=!0,t.closed||(t.next(i),t.complete())},function(e){t.closed||t.error(e)}).then(null,function(t){r.root.setTimeout(function(){throw t})});else if(this._isScalar){if(!t.closed)return n.schedule(o,0,{value:this.value,subscriber:t})}else i.then(function(i){e.value=i,e._isScalar=!0,t.closed||t.add(n.schedule(o,0,{value:i,subscriber:t}))},function(e){t.closed||t.add(n.schedule(a,0,{err:e,subscriber:t}))}).then(null,function(t){r.root.setTimeout(function(){throw t})})},e}(i(6437).Observable);function o(t){var e=t.subscriber;e.closed||(e.next(t.value),e.complete())}function a(t){var e=t.subscriber;e.closed||e.error(t.err)}e.PromiseObservable=s},6027:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=function(t){function e(e,i){t.call(this),this.value=e,this.scheduler=i,this._isScalar=!0,i&&(this._isScalar=!1)}return n(e,t),e.create=function(t,i){return new e(t,i)},e.dispatch=function(t){var e=t.value,i=t.subscriber;t.done?i.complete():(i.next(e),i.closed||(t.done=!0,this.schedule(t)))},e.prototype._subscribe=function(t){var i=this.value,n=this.scheduler;if(n)return n.schedule(e.dispatch,0,{done:!1,value:i,subscriber:t});t.next(i),t.closed||t.complete()},e}(i(6437).Observable);e.ScalarObservable=r},6586:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(5593),s=i(6437),o=i(2640),a=i(2774),l=i(9286),c=function(t){function e(e,i,n){void 0===e&&(e=0),t.call(this),this.period=-1,this.dueTime=0,r.isNumeric(i)?this.period=Number(i)<1?1:Number(i):a.isScheduler(i)&&(n=i),a.isScheduler(n)||(n=o.async),this.scheduler=n,this.dueTime=l.isDate(e)?+e-this.scheduler.now():e}return n(e,t),e.create=function(t,i,n){return void 0===t&&(t=0),new e(t,i,n)},e.dispatch=function(t){var e=t.index,i=t.period,n=t.subscriber;if(n.next(e),!n.closed){if(-1===i)return n.complete();t.index=e+1,this.schedule(t,i)}},e.prototype._subscribe=function(t){var i=this;return i.scheduler.schedule(e.dispatch,i.dueTime,{index:0,period:i.period,subscriber:t})},e}(s.Observable);e.TimerObservable=c},1948:(t,e,i)=>{"use strict";var n=i(2774),r=i(7246),s=i(873),o=i(5659);e.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 1===t.length||2===t.length&&n.isScheduler(t[1])?s.from(t[0]):o.concatAll()(r.of.apply(void 0,t))}},873:(t,e,i)=>{"use strict";e.from=i(4843).FromObservable.create},5067:(t,e,i)=>{"use strict";var n=i(6437),r=i(4655),s=i(2774),o=i(3455);e.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var i=Number.POSITIVE_INFINITY,a=null,l=t[t.length-1];return s.isScheduler(l)?(a=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(i=t.pop())):"number"==typeof l&&(i=t.pop()),null===a&&1===t.length&&t[0]instanceof n.Observable?t[0]:o.mergeAll(i)(new r.ArrayObservable(t,a))}},7246:(t,e,i)=>{"use strict";e.of=i(4655).ArrayObservable.of},9360:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(9939),s=i(4655),o=i(257),a=i(4620);e.race=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];if(1===t.length){if(!r.isArray(t[0]))return t[0];t=t[0]}return new s.ArrayObservable(t).lift(new l)};var l=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new c(t))},t}();e.RaceOperator=l;var c=function(t){function e(e){t.call(this,e),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}return n(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var i=0;i<e&&!this.hasFirst;i++){var n=t[i],r=a.subscribeToResult(this,n,n,i);this.subscriptions&&this.subscriptions.push(r),this.add(r)}this.observables=null}},e.prototype.notifyNext=function(t,e,i,n,r){if(!this.hasFirst){this.hasFirst=!0;for(var s=0;s<this.subscriptions.length;s++)if(s!==i){var o=this.subscriptions[s];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(e)},e}(o.OuterSubscriber);e.RaceSubscriber=c},3156:(t,e,i)=>{"use strict";e.timer=i(6586).TimerObservable.create},2069:(t,e,i)=>{"use strict";e.xb=i(8817).distinctUntilChanged,e.hX=i(4057).filter,e.bw=i(4642).tap,e.pO=i(7786).throttleTime},4578:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(6226),s=i(7812),o=i(257),a=i(4620);e.audit=function(t){return function(e){return e.lift(new l(t))}};var l=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.durationSelector))},t}(),c=function(t){function e(e,i){t.call(this,e),this.durationSelector=i,this.hasValue=!1}return n(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=r.tryCatch(this.durationSelector)(t);if(e===s.errorObject)this.destination.error(s.errorObject.e);else{var i=a.subscribeToResult(this,e);i.closed?this.clearThrottle():this.add(this.throttled=i)}}},e.prototype.clearThrottle=function(){var t=this,e=t.value,i=t.hasValue,n=t.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),i&&(this.value=null,this.hasValue=!1,this.destination.next(e))},e.prototype.notifyNext=function(t,e,i,n){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(o.OuterSubscriber)},3505:(t,e,i)=>{"use strict";var n=i(2640),r=i(4578),s=i(3156);e.auditTime=function(t,e){return void 0===e&&(e=n.async),r.audit(function(){return s.timer(t,e)})}},4757:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.buffer=function(t){return function(e){return e.lift(new o(t))}};var o=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.closingNotifier))},t}(),a=function(t){function e(e,i){t.call(this,e),this.buffer=[],this.add(s.subscribeToResult(this,i))}return n(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,e,i,n,r){var s=this.buffer;this.buffer=[],this.destination.next(s)},e}(r.OuterSubscriber)},101:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.bufferCount=function(t,e){return void 0===e&&(e=null),function(i){return i.lift(new s(t,e))}};var s=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?a:o}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),o=function(t){function e(e,i){t.call(this,e),this.bufferSize=i,this.buffer=[]}return n(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(r.Subscriber),a=function(t){function e(e,i,n){t.call(this,e),this.bufferSize=i,this.startBufferEvery=n,this.buffers=[],this.count=0}return n(e,t),e.prototype._next=function(t){var e=this,i=e.bufferSize,n=e.startBufferEvery,r=e.buffers,s=e.count;this.count++,s%n==0&&r.push([]);for(var o=r.length;o--;){var a=r[o];a.push(t),a.length===i&&(r.splice(o,1),this.destination.next(a))}},e.prototype._complete=function(){for(var e=this.buffers,i=this.destination;e.length>0;){var n=e.shift();n.length>0&&i.next(n)}t.prototype._complete.call(this)},e}(r.Subscriber)},5102:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2640),s=i(4164),o=i(2774);e.bufferTime=function(t){var e=arguments.length,i=r.async;o.isScheduler(arguments[arguments.length-1])&&(i=arguments[arguments.length-1],e--);var n=null;e>=2&&(n=arguments[1]);var s=Number.POSITIVE_INFINITY;return e>=3&&(s=arguments[2]),function(e){return e.lift(new a(t,n,s,i))}};var a=function(){function t(t,e,i,n){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),l=function(){return function(){this.buffer=[]}}(),c=function(t){function e(e,i,n,r,s){t.call(this,e),this.bufferTimeSpan=i,this.bufferCreationInterval=n,this.maxBufferSize=r,this.scheduler=s,this.contexts=[];var o=this.openContext();if(this.timespanOnly=null==n||n<0,this.timespanOnly)this.add(o.closeAction=s.schedule(u,i,{subscriber:this,context:o,bufferTimeSpan:i}));else{var a={bufferTimeSpan:i,bufferCreationInterval:n,subscriber:this,scheduler:s};this.add(o.closeAction=s.schedule(p,i,{subscriber:this,context:o})),this.add(s.schedule(h,n,a))}}return n(e,t),e.prototype._next=function(t){for(var e,i=this.contexts,n=i.length,r=0;r<n;r++){var s=i[r],o=s.buffer;o.push(t),o.length==this.maxBufferSize&&(e=s)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,i=this.destination;e.length>0;){var n=e.shift();i.next(n.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var i=this.bufferTimeSpan;this.add(t.closeAction=this.scheduler.schedule(u,i,{subscriber:this,context:t,bufferTimeSpan:i}))}},e.prototype.openContext=function(){var t=new l;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(s.Subscriber);function u(t){var e=t.subscriber,i=t.context;i&&e.closeContext(i),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function h(t){var e=t.bufferCreationInterval,i=t.bufferTimeSpan,n=t.subscriber,r=t.scheduler,s=n.openContext();n.closed||(n.add(s.closeAction=r.schedule(p,i,{subscriber:n,context:s})),this.schedule(t,e))}function p(t){t.subscriber.closeContext(t.context)}},435:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(3326),s=i(4620),o=i(257);e.bufferToggle=function(t,e){return function(i){return i.lift(new a(t,e))}};var a=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.openings,this.closingSelector))},t}(),l=function(t){function e(e,i,n){t.call(this,e),this.openings=i,this.closingSelector=n,this.contexts=[],this.add(s.subscribeToResult(this,i))}return n(e,t),e.prototype._next=function(t){for(var e=this.contexts,i=e.length,n=0;n<i;n++)e[n].buffer.push(t)},e.prototype._error=function(e){for(var i=this.contexts;i.length>0;){var n=i.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var i=e.shift();this.destination.next(i.buffer),i.subscription.unsubscribe(),i.buffer=null,i.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,i,n,r){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(i){this._error(i)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var i=t.subscription;this.destination.next(t.buffer),e.splice(e.indexOf(t),1),this.remove(i),i.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,i=new r.Subscription,n={buffer:[],subscription:i};e.push(n);var o=s.subscribeToResult(this,t,n);!o||o.closed?this.closeBuffer(n):(o.context=n,this.add(o),i.add(o))},e}(o.OuterSubscriber)},8322:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(3326),s=i(6226),o=i(7812),a=i(257),l=i(4620);e.bufferWhen=function(t){return function(e){return e.lift(new c(t))}};var c=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.closingSelector))},t}(),u=function(t){function e(e,i){t.call(this,e),this.closingSelector=i,this.subscribing=!1,this.openBuffer()}return n(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,e,i,n,r){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe()),this.buffer&&this.destination.next(this.buffer),this.buffer=[];var e=s.tryCatch(this.closingSelector)();e===o.errorObject?this.error(o.errorObject.e):(t=new r.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(l.subscribeToResult(this,e)),this.subscribing=!1)},e}(a.OuterSubscriber)},2546:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.catchError=function(t){return function(e){var i=new o(t),n=e.lift(i);return i.caught=n}};var o=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.selector,this.caught))},t}(),a=function(t){function e(e,i,n){t.call(this,e),this.selector=i,this.caught=n}return n(e,t),e.prototype.error=function(e){if(!this.isStopped){var i=void 0;try{i=this.selector(e,this.caught)}catch(n){return void t.prototype.error.call(this,n)}this._unsubscribeAndRecycle(),this.add(s.subscribeToResult(this,i))}},e}(r.OuterSubscriber)},2255:(t,e,i)=>{"use strict";var n=i(7305);e.combineAll=function(t){return function(e){return e.lift(new n.CombineLatestOperator(t))}}},7305:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4655),s=i(9939),o=i(257),a=i(4620),l={};e.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var i=null;return"function"==typeof t[t.length-1]&&(i=t.pop()),1===t.length&&s.isArray(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(new r.ArrayObservable([e].concat(t)),new c(i))}};var c=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.project))},t}();e.CombineLatestOperator=c;var u=function(t){function e(e,i){t.call(this,e),this.project=i,this.active=0,this.values=[],this.observables=[]}return n(e,t),e.prototype._next=function(t){this.values.push(l),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var i=0;i<e;i++){var n=t[i];this.add(a.subscribeToResult(this,n,n,i))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,i,n,r){var s=this.values,o=this.toRespond?s[i]===l?--this.toRespond:this.toRespond:0;s[i]=e,0===o&&(this.project?this._tryProject(s):this.destination.next(s.slice()))},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(i){return void this.destination.error(i)}this.destination.next(e)},e}(o.OuterSubscriber);e.CombineLatestSubscriber=u},3923:(t,e,i)=>{"use strict";var n=i(1948);e.concatStatic=i(1948).concat,e.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){return e.lift.call(n.concat.apply(void 0,[e].concat(t)))}}},5659:(t,e,i)=>{"use strict";var n=i(3455);e.concatAll=function(){return n.mergeAll(1)}},1743:(t,e,i)=>{"use strict";var n=i(5049);e.concatMap=function(t,e){return n.mergeMap(t,e,1)}},252:(t,e,i)=>{"use strict";var n=i(1743);e.concatMapTo=function(t,e){return n.concatMap(function(){return t},e)}},9507:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.count=function(t){return function(e){return e.lift(new s(t,e))}};var s=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.predicate,this.source))},t}(),o=function(t){function e(e,i,n){t.call(this,e),this.predicate=i,this.source=n,this.count=0,this.index=0}return n(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(i){return void this.destination.error(i)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(r.Subscriber)},9126:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.debounce=function(t){return function(e){return e.lift(new o(t))}};var o=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector))},t}(),a=function(t){function e(e,i){t.call(this,e),this.durationSelector=i,this.hasValue=!1,this.durationSubscription=null}return n(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(i){this.destination.error(i)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var i=this.durationSubscription;this.value=t,this.hasValue=!0,i&&(i.unsubscribe(),this.remove(i)),(i=s.subscribeToResult(this,e)).closed||this.add(this.durationSubscription=i)},e.prototype.notifyNext=function(t,e,i,n,r){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,i=this.durationSubscription;i&&(this.durationSubscription=null,i.unsubscribe(),this.remove(i)),this.value=null,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(r.OuterSubscriber)},746:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(2640);e.debounceTime=function(t,e){return void 0===e&&(e=s.async),function(i){return i.lift(new o(t,e))}};var o=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.dueTime,this.scheduler))},t}(),a=function(t){function e(e,i,n){t.call(this,e),this.dueTime=i,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}return n(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(l,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){this.clearDebounce(),this.hasValue&&(this.destination.next(this.lastValue),this.lastValue=null,this.hasValue=!1)},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(r.Subscriber);function l(t){t.debouncedNext()}},1583:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.defaultIfEmpty=function(t){return void 0===t&&(t=null),function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.defaultValue))},t}(),o=function(t){function e(e,i){t.call(this,e),this.defaultValue=i,this.isEmpty=!0}return n(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(r.Subscriber)},9786:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2640),s=i(9286),o=i(4164),a=i(2995);e.delay=function(t,e){void 0===e&&(e=r.async);var i=s.isDate(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new l(i,e))}};var l=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.delay,this.scheduler))},t}(),c=function(t){function e(e,i,n){t.call(this,e),this.delay=i,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}return n(e,t),e.dispatch=function(t){for(var e=t.source,i=e.queue,n=t.scheduler,r=t.destination;i.length>0&&i[0].time-n.now()<=0;)i.shift().notification.observe(r);if(i.length>0){var s=Math.max(0,i[0].time-n.now());this.schedule(t,s)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,i=new u(e.now()+this.delay,t);this.queue.push(i),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(a.Notification.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t)},e.prototype._complete=function(){this.scheduleNotification(a.Notification.createComplete())},e}(o.Subscriber),u=function(){return function(t,e){this.time=t,this.notification=e}}()},3534:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(6437),o=i(257),a=i(4620);e.delayWhen=function(t,e){return e?function(i){return new u(i,e).lift(new l(t))}:function(e){return e.lift(new l(t))}};var l=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.delayDurationSelector))},t}(),c=function(t){function e(e,i){t.call(this,e),this.delayDurationSelector=i,this.completed=!1,this.delayNotifierSubscriptions=[],this.values=[]}return n(e,t),e.prototype.notifyNext=function(t,e,i,n,r){this.destination.next(t),this.removeSubscription(r),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){try{var e=this.delayDurationSelector(t);e&&this.tryDelay(e,t)}catch(i){this.destination.error(i)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t),i=null;return-1!==e&&(i=this.values[e],this.delayNotifierSubscriptions.splice(e,1),this.values.splice(e,1)),i},e.prototype.tryDelay=function(t,e){var i=a.subscribeToResult(this,t,e);i&&!i.closed&&(this.add(i),this.delayNotifierSubscriptions.push(i)),this.values.push(e)},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(o.OuterSubscriber),u=function(t){function e(e,i){t.call(this),this.source=e,this.subscriptionDelay=i}return n(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new h(t,this.source))},e}(s.Observable),h=function(t){function e(e,i){t.call(this),this.parent=e,this.source=i,this.sourceSubscribed=!1}return n(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(r.Subscriber)},5745:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.dematerialize=function(){return function(t){return t.lift(new s)}};var s=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new o(t))},t}(),o=function(t){function e(e){t.call(this,e)}return n(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(r.Subscriber)},2334:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620),o=i(4888);e.distinct=function(t,e){return function(i){return i.lift(new a(t,e))}};var a=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.keySelector,this.flushes))},t}(),l=function(t){function e(e,i,n){t.call(this,e),this.keySelector=i,this.values=new o.Set,n&&this.add(s.subscribeToResult(this,n))}return n(e,t),e.prototype.notifyNext=function(t,e,i,n,r){this.values.clear()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,i=this.destination;try{e=this.keySelector(t)}catch(n){return void i.error(n)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var i=this.values;i.has(t)||(i.add(t),this.destination.next(e))},e}(r.OuterSubscriber);e.DistinctSubscriber=l},8817:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(6226),o=i(7812);e.distinctUntilChanged=function(t,e){return function(i){return i.lift(new a(t,e))}};var a=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.compare,this.keySelector))},t}(),l=function(t){function e(e,i,n){t.call(this,e),this.keySelector=n,this.hasKey=!1,"function"==typeof i&&(this.compare=i)}return n(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e=t;if(this.keySelector&&(e=s.tryCatch(this.keySelector)(t))===o.errorObject)return this.destination.error(o.errorObject.e);var i=!1;if(this.hasKey){if((i=s.tryCatch(this.compare)(this.key,e))===o.errorObject)return this.destination.error(o.errorObject.e)}else this.hasKey=!0;!1===Boolean(i)&&(this.key=e,this.destination.next(t))},e}(r.Subscriber)},8738:(t,e,i)=>{"use strict";var n=i(8817);e.distinctUntilKeyChanged=function(t,e){return n.distinctUntilChanged(function(i,n){return e?e(i[t],n[t]):i[t]===n[t]})}},7207:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(4589);e.elementAt=function(t,e){return function(i){return i.lift(new o(t,e))}};var o=function(){function t(t,e){if(this.index=t,this.defaultValue=e,t<0)throw new s.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.index,this.defaultValue))},t}(),a=function(t){function e(e,i,n){t.call(this,e),this.index=i,this.defaultValue=n}return n(e,t),e.prototype._next=function(t){0==this.index--&&(this.destination.next(t),this.destination.complete())},e.prototype._complete=function(){var t=this.destination;this.index>=0&&(void 0!==this.defaultValue?t.next(this.defaultValue):t.error(new s.ArgumentOutOfRangeError)),t.complete()},e}(r.Subscriber)},5514:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.every=function(t,e){return function(i){return i.lift(new s(t,e,i))}};var s=function(){function t(t,e,i){this.predicate=t,this.thisArg=e,this.source=i}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.predicate,this.thisArg,this.source))},t}(),o=function(t){function e(e,i,n,r){t.call(this,e),this.predicate=i,this.thisArg=n,this.source=r,this.index=0,this.thisArg=n||this}return n(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(i){return void this.destination.error(i)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(r.Subscriber)},4333:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.exhaust=function(){return function(t){return t.lift(new o)}};var o=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new a(t))},t}(),a=function(t){function e(e){t.call(this,e),this.hasCompleted=!1,this.hasSubscription=!1}return n(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(s.subscribeToResult(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(r.OuterSubscriber)},7292:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.exhaustMap=function(t,e){return function(i){return i.lift(new o(t,e))}};var o=function(){function t(t,e){this.project=t,this.resultSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.resultSelector))},t}(),a=function(t){function e(e,i,n){t.call(this,e),this.project=i,this.resultSelector=n,this.hasSubscription=!1,this.hasCompleted=!1,this.index=0}return n(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e=this.index++,i=this.destination;try{var n=this.project(t,e);this.hasSubscription=!0,this.add(s.subscribeToResult(this,n,t,e))}catch(r){i.error(r)}},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyNext=function(t,e,i,n,r){var s=this.destination;this.resultSelector?this.trySelectResult(t,e,i,n):s.next(e)},e.prototype.trySelectResult=function(t,e,i,n){var r=this.resultSelector,s=this.destination;try{var o=r(t,e,i,n);s.next(o)}catch(a){s.error(a)}},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(r.OuterSubscriber)},5011:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(6226),s=i(7812),o=i(257),a=i(4620);e.expand=function(t,e,i){return void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===i&&(i=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(n){return n.lift(new l(t,e,i))}};var l=function(){function t(t,e,i){this.project=t,this.concurrent=e,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.project,this.concurrent,this.scheduler))},t}();e.ExpandOperator=l;var c=function(t){function e(e,i,n,r){t.call(this,e),this.project=i,this.concurrent=n,this.scheduler=r,this.index=0,this.active=0,this.hasCompleted=!1,n<Number.POSITIVE_INFINITY&&(this.buffer=[])}return n(e,t),e.dispatch=function(t){t.subscriber.subscribeToProjection(t.result,t.value,t.index)},e.prototype._next=function(t){var i=this.destination;if(i.closed)this._complete();else{var n=this.index++;if(this.active<this.concurrent){i.next(t);var o=r.tryCatch(this.project)(t,n);o===s.errorObject?i.error(s.errorObject.e):this.scheduler?this.add(this.scheduler.schedule(e.dispatch,0,{subscriber:this,result:o,value:t,index:n})):this.subscribeToProjection(o,t,n)}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,i){this.active++,this.add(a.subscribeToResult(this,t,e,i))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete()},e.prototype.notifyNext=function(t,e,i,n,r){this._next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(o.OuterSubscriber);e.ExpandSubscriber=c},4057:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.filter=function(t,e){return function(i){return i.lift(new s(t,e))}};var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.predicate,this.thisArg))},t}(),o=function(t){function e(e,i,n){t.call(this,e),this.predicate=i,this.thisArg=n,this.count=0}return n(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(t)},e}(r.Subscriber)},1469:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(3326);e.finalize=function(t){return function(e){return e.lift(new o(t))}};var o=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.callback))},t}(),a=function(t){function e(e,i){t.call(this,e),this.add(new s.Subscription(i))}return n(e,t),e}(r.Subscriber)},1968:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.find=function(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(i){return i.lift(new s(t,i,!1,e))}};var s=function(){function t(t,e,i,n){this.predicate=t,this.source=e,this.yieldIndex=i,this.thisArg=n}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}();e.FindValueOperator=s;var o=function(t){function e(e,i,n,r,s){t.call(this,e),this.predicate=i,this.source=n,this.yieldIndex=r,this.thisArg=s,this.index=0}return n(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){var e=this.predicate,i=this.thisArg,n=this.index++;try{e.call(i||this,t,n,this.source)&&this.notifyComplete(this.yieldIndex?n:t)}catch(r){this.destination.error(r)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(r.Subscriber);e.FindValueSubscriber=o},2555:(t,e,i)=>{"use strict";var n=i(1968);e.findIndex=function(t,e){return function(i){return i.lift(new n.FindValueOperator(t,i,!0,e))}}},362:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(6042);e.first=function(t,e,i){return function(n){return n.lift(new o(t,e,i,n))}};var o=function(){function t(t,e,i,n){this.predicate=t,this.resultSelector=e,this.defaultValue=i,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.resultSelector,this.defaultValue,this.source))},t}(),a=function(t){function e(e,i,n,r,s){t.call(this,e),this.predicate=i,this.resultSelector=n,this.defaultValue=r,this.source=s,this.index=0,this.hasCompleted=!1,this._emitted=!1}return n(e,t),e.prototype._next=function(t){var e=this.index++;this.predicate?this._tryPredicate(t,e):this._emit(t,e)},e.prototype._tryPredicate=function(t,e){var i;try{i=this.predicate(t,e,this.source)}catch(n){return void this.destination.error(n)}i&&this._emit(t,e)},e.prototype._emit=function(t,e){this.resultSelector?this._tryResultSelector(t,e):this._emitFinal(t)},e.prototype._tryResultSelector=function(t,e){var i;try{i=this.resultSelector(t,e)}catch(n){return void this.destination.error(n)}this._emitFinal(i)},e.prototype._emitFinal=function(t){var e=this.destination;this._emitted||(this._emitted=!0,e.next(t),e.complete(),this.hasCompleted=!0)},e.prototype._complete=function(){var t=this.destination;this.hasCompleted||void 0===this.defaultValue?this.hasCompleted||t.error(new s.EmptyError):(t.next(this.defaultValue),t.complete())},e}(r.Subscriber)},9136:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(3326),o=i(6437),a=i(2503),l=i(4930),c=i(2758);e.groupBy=function(t,e,i,n){return function(r){return r.lift(new u(t,e,i,n))}};var u=function(){function t(t,e,i,n){this.keySelector=t,this.elementSelector=e,this.durationSelector=i,this.subjectSelector=n}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),h=function(t){function e(e,i,n,r,s){t.call(this,e),this.keySelector=i,this.elementSelector=n,this.durationSelector=r,this.subjectSelector=s,this.groups=null,this.attemptedToUnsubscribe=!1,this.count=0}return n(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(i){return void this.error(i)}this._group(t,e)},e.prototype._group=function(t,e){var i=this.groups;i||(i=this.groups="string"==typeof e?new c.FastMap:new l.Map);var n,r=i.get(e);if(this.elementSelector)try{n=this.elementSelector(t)}catch(u){this.error(u)}else n=t;if(!r){r=this.subjectSelector?this.subjectSelector():new a.Subject,i.set(e,r);var s=new d(e,r,this);if(this.destination.next(s),this.durationSelector){var o=void 0;try{o=this.durationSelector(new d(e,r))}catch(u){return void this.error(u)}this.add(o.subscribe(new p(e,r,this)))}}r.closed||r.next(n)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach(function(e,i){e.error(t)}),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach(function(t,e){t.complete()}),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(r.Subscriber),p=function(t){function e(e,i,n){t.call(this,i),this.key=e,this.group=i,this.parent=n}return n(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(r.Subscriber),d=function(t){function e(e,i,n){t.call(this),this.key=e,this.groupSubject=i,this.refCountSubscription=n}return n(e,t),e.prototype._subscribe=function(t){var e=new s.Subscription,i=this.refCountSubscription,n=this.groupSubject;return i&&!i.closed&&e.add(new f(i)),e.add(n.subscribe(t)),e},e}(o.Observable);e.GroupedObservable=d;var f=function(t){function e(e){t.call(this),this.parent=e,e.count++}return n(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(s.Subscription)},1766:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(3617);e.ignoreElements=function(){return function(t){return t.lift(new o)}};var o=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new a(t))},t}(),a=function(t){function e(){t.apply(this,arguments)}return n(e,t),e.prototype._next=function(t){s.noop()},e}(r.Subscriber)},605:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.isEmpty=function(){return function(t){return t.lift(new s)}};var s=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new o(t))},t}(),o=function(t){function e(e){t.call(this,e)}return n(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(r.Subscriber)},3490:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(6042);e.last=function(t,e,i){return function(n){return n.lift(new o(t,e,i,n))}};var o=function(){function t(t,e,i,n){this.predicate=t,this.resultSelector=e,this.defaultValue=i,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.resultSelector,this.defaultValue,this.source))},t}(),a=function(t){function e(e,i,n,r,s){t.call(this,e),this.predicate=i,this.resultSelector=n,this.defaultValue=r,this.source=s,this.hasValue=!1,this.index=0,void 0!==r&&(this.lastValue=r,this.hasValue=!0)}return n(e,t),e.prototype._next=function(t){var e=this.index++;if(this.predicate)this._tryPredicate(t,e);else{if(this.resultSelector)return void this._tryResultSelector(t,e);this.lastValue=t,this.hasValue=!0}},e.prototype._tryPredicate=function(t,e){var i;try{i=this.predicate(t,e,this.source)}catch(n){return void this.destination.error(n)}if(i){if(this.resultSelector)return void this._tryResultSelector(t,e);this.lastValue=t,this.hasValue=!0}},e.prototype._tryResultSelector=function(t,e){var i;try{i=this.resultSelector(t,e)}catch(n){return void this.destination.error(n)}this.lastValue=i,this.hasValue=!0},e.prototype._complete=function(){var t=this.destination;this.hasValue?(t.next(this.lastValue),t.complete()):t.error(new s.EmptyError)},e}(r.Subscriber)},6589:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.map=function(t,e){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new s(t,e))}};var s=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.project,this.thisArg))},t}();e.MapOperator=s;var o=function(t){function e(e,i,n){t.call(this,e),this.project=i,this.count=0,this.thisArg=n||this}return n(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)},e}(r.Subscriber)},330:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.mapTo=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.value))},t}(),o=function(t){function e(e,i){t.call(this,e),this.value=i}return n(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(r.Subscriber)},1626:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(2995);e.materialize=function(){return function(t){return t.lift(new o)}};var o=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new a(t))},t}(),a=function(t){function e(e){t.call(this,e)}return n(e,t),e.prototype._next=function(t){this.destination.next(s.Notification.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(s.Notification.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(s.Notification.createComplete()),t.complete()},e}(r.Subscriber)},2874:(t,e,i)=>{"use strict";var n=i(9203);e.max=function(t){return n.reduce("function"==typeof t?function(e,i){return t(e,i)>0?e:i}:function(t,e){return t>e?t:e})}},3066:(t,e,i)=>{"use strict";var n=i(5067);e.mergeStatic=i(5067).merge,e.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){return e.lift.call(n.merge.apply(void 0,[e].concat(t)))}}},3455:(t,e,i)=>{"use strict";var n=i(5049),r=i(5032);e.mergeAll=function(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),n.mergeMap(r.identity,null,t)}},5049:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4620),s=i(257);e.mergeMap=function(t,e,i){return void 0===i&&(i=Number.POSITIVE_INFINITY),function(n){return"number"==typeof e&&(i=e,e=null),n.lift(new o(t,e,i))}};var o=function(){function t(t,e,i){void 0===i&&(i=Number.POSITIVE_INFINITY),this.project=t,this.resultSelector=e,this.concurrent=i}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.resultSelector,this.concurrent))},t}();e.MergeMapOperator=o;var a=function(t){function e(e,i,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY),t.call(this,e),this.project=i,this.resultSelector=n,this.concurrent=r,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return n(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,i=this.index++;try{e=this.project(t,i)}catch(n){return void this.destination.error(n)}this.active++,this._innerSub(e,t,i)},e.prototype._innerSub=function(t,e,i){this.add(r.subscribeToResult(this,t,e,i))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},e.prototype.notifyNext=function(t,e,i,n,r){this.resultSelector?this._notifyResultSelector(t,e,i,n):this.destination.next(e)},e.prototype._notifyResultSelector=function(t,e,i,n){var r;try{r=this.resultSelector(t,e,i,n)}catch(s){return void this.destination.error(s)}this.destination.next(r)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(s.OuterSubscriber);e.MergeMapSubscriber=a},7165:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.mergeMapTo=function(t,e,i){return void 0===i&&(i=Number.POSITIVE_INFINITY),"number"==typeof e&&(i=e,e=null),function(n){return n.lift(new o(t,e,i))}};var o=function(){function t(t,e,i){void 0===i&&(i=Number.POSITIVE_INFINITY),this.ish=t,this.resultSelector=e,this.concurrent=i}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.ish,this.resultSelector,this.concurrent))},t}();e.MergeMapToOperator=o;var a=function(t){function e(e,i,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY),t.call(this,e),this.ish=i,this.resultSelector=n,this.concurrent=r,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return n(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.resultSelector,i=this.index++,n=this.ish,r=this.destination;this.active++,this._innerSub(n,r,e,t,i)}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,i,n,r){this.add(s.subscribeToResult(this,t,n,r))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},e.prototype.notifyNext=function(t,e,i,n,r){var s=this.destination;this.resultSelector?this.trySelectResult(t,e,i,n):s.next(e)},e.prototype.trySelectResult=function(t,e,i,n){var r,s=this.resultSelector,o=this.destination;try{r=s(t,e,i,n)}catch(a){return void o.error(a)}o.next(r)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(r.OuterSubscriber);e.MergeMapToSubscriber=a},83:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(6226),s=i(7812),o=i(4620),a=i(257);e.mergeScan=function(t,e,i){return void 0===i&&(i=Number.POSITIVE_INFINITY),function(n){return n.lift(new l(t,e,i))}};var l=function(){function t(t,e,i){this.accumulator=t,this.seed=e,this.concurrent=i}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.accumulator,this.seed,this.concurrent))},t}();e.MergeScanOperator=l;var c=function(t){function e(e,i,n,r){t.call(this,e),this.accumulator=i,this.acc=n,this.concurrent=r,this.hasValue=!1,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return n(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,i=r.tryCatch(this.accumulator)(this.acc,t);i===s.errorObject?this.destination.error(s.errorObject.e):(this.active++,this._innerSub(i,t,e))}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,i){this.add(o.subscribeToResult(this,t,e,i))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e.prototype.notifyNext=function(t,e,i,n,r){var s=this.destination;this.acc=e,this.hasValue=!0,s.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(a.OuterSubscriber);e.MergeScanSubscriber=c},9626:(t,e,i)=>{"use strict";var n=i(9203);e.min=function(t){return n.reduce("function"==typeof t?function(e,i){return t(e,i)<0?e:i}:function(t,e){return t<e?t:e})}},5068:(t,e,i)=>{"use strict";var n=i(5569);e.multicast=function(t,e){return function(i){var s;if(s="function"==typeof t?t:function(){return t},"function"==typeof e)return i.lift(new r(s,e));var o=Object.create(i,n.connectableObservableDescriptor);return o.source=i,o.subjectFactory=s,o}};var r=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var i=this.selector,n=this.subjectFactory(),r=i(n).subscribe(t);return r.add(e.subscribe(n)),r},t}();e.MulticastOperator=r},2921:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(2995);e.observeOn=function(t,e){return void 0===e&&(e=0),function(i){return i.lift(new o(t,e))}};var o=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.scheduler,this.delay))},t}();e.ObserveOnOperator=o;var a=function(t){function e(e,i,n){void 0===n&&(n=0),t.call(this,e),this.scheduler=i,this.delay=n}return n(e,t),e.dispatch=function(t){t.notification.observe(t.destination),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new l(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(s.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(s.Notification.createError(t))},e.prototype._complete=function(){this.scheduleMessage(s.Notification.createComplete())},e}(r.Subscriber);e.ObserveOnSubscriber=a;var l=function(){return function(t,e){this.notification=t,this.destination=e}}();e.ObserveOnMessage=l},9582:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4843),s=i(9939),o=i(257),a=i(4620);e.onErrorResumeNext=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 1===t.length&&s.isArray(t[0])&&(t=t[0]),function(e){return e.lift(new l(t))}},e.onErrorResumeNextStatic=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var i=null;return 1===t.length&&s.isArray(t[0])&&(t=t[0]),i=t.shift(),new r.FromObservable(i,null).lift(new l(t))};var l=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.nextSources))},t}(),c=function(t){function e(e,i){t.call(this,e),this.destination=e,this.nextSources=i}return n(e,t),e.prototype.notifyError=function(t,e){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource()},e.prototype._complete=function(){this.subscribeToNextSource()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();t?this.add(a.subscribeToResult(this,t)):this.destination.complete()},e}(o.OuterSubscriber)},1132:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.pairwise=function(){return function(t){return t.lift(new s)}};var s=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new o(t))},t}(),o=function(t){function e(e){t.call(this,e),this.hasPrev=!1}return n(e,t),e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t},e}(r.Subscriber)},3407:(t,e,i)=>{"use strict";var n=i(7127),r=i(4057);e.partition=function(t,e){return function(i){return[r.filter(t,e)(i),r.filter(n.not(t,e))(i)]}}},9798:(t,e,i)=>{"use strict";var n=i(6589);function r(t,e){return function(i){for(var n=i,r=0;r<e;r++){var s=n[t[r]];if(void 0===s)return;n=s}return n}}e.pluck=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var i=t.length;if(0===i)throw new Error("list of properties cannot be empty.");return function(e){return n.map(r(t,i))(e)}}},9948:(t,e,i)=>{"use strict";var n=i(2503),r=i(5068);e.publish=function(t){return t?r.multicast(function(){return new n.Subject},t):r.multicast(new n.Subject)}},1228:(t,e,i)=>{"use strict";var n=i(5140),r=i(5068);e.publishBehavior=function(t){return function(e){return r.multicast(new n.BehaviorSubject(t))(e)}}},9172:(t,e,i)=>{"use strict";var n=i(7090),r=i(5068);e.publishLast=function(){return function(t){return r.multicast(new n.AsyncSubject)(t)}}},1781:(t,e,i)=>{"use strict";var n=i(4336),r=i(5068);e.publishReplay=function(t,e,i,s){i&&"function"!=typeof i&&(s=i);var o="function"==typeof i?i:void 0,a=new n.ReplaySubject(t,e,s);return function(t){return r.multicast(function(){return a},o)(t)}}},7109:(t,e,i)=>{"use strict";var n=i(9939),r=i(9360);e.race=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){return 1===t.length&&n.isArray(t[0])&&(t=t[0]),e.lift.call(r.race.apply(void 0,[e].concat(t)))}}},9203:(t,e,i)=>{"use strict";var n=i(9042),r=i(2699),s=i(1583),o=i(8187);e.reduce=function(t,e){return arguments.length>=2?function(i){return o.pipe(n.scan(t,e),r.takeLast(1),s.defaultIfEmpty(e))(i)}:function(e){return o.pipe(n.scan(function(e,i,n){return t(e,i,n+1)}),r.takeLast(1))(e)}}},4702:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.refCount=function(){return function(t){return t.lift(new s(t))}};var s=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var i=this.connectable;i._refCount++;var n=new o(t,i),r=e.subscribe(n);return n.closed||(n.connection=i.connect()),r},t}(),o=function(t){function e(e,i){t.call(this,e),this.connectable=i}return n(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var i=this.connection,n=t._connection;this.connection=null,!n||i&&n!==i||n.unsubscribe()}}else this.connection=null},e}(r.Subscriber)},2983:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(699);e.repeat=function(t){return void 0===t&&(t=-1),function(e){return 0===t?new s.EmptyObservable:e.lift(new o(t<0?-1:t-1,e))}};var o=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.count,this.source))},t}(),a=function(t){function e(e,i,n){t.call(this,e),this.count=i,this.source=n}return n(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,i=this.count;if(0===i)return t.prototype.complete.call(this);i>-1&&(this.count=i-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(r.Subscriber)},3027:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2503),s=i(6226),o=i(7812),a=i(257),l=i(4620);e.repeatWhen=function(t){return function(e){return e.lift(new c(t))}};var c=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.notifier,e))},t}(),u=function(t){function e(e,i,n){t.call(this,e),this.notifier=i,this.source=n,this.sourceIsBeingSubscribedTo=!0}return n(e,t),e.prototype.notifyNext=function(t,e,i,n,r){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(e){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var e=this,i=e.notifications,n=e.retries,r=e.retriesSubscription;return this.notifications=null,this.retries=null,this.retriesSubscription=null,t.prototype._unsubscribeAndRecycle.call(this),this.notifications=i,this.retries=n,this.retriesSubscription=r,this},e.prototype.subscribeToRetries=function(){this.notifications=new r.Subject;var e=s.tryCatch(this.notifier)(this.notifications);if(e===o.errorObject)return t.prototype.complete.call(this);this.retries=e,this.retriesSubscription=l.subscribeToResult(this,e)},e}(a.OuterSubscriber)},1043:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.retry=function(t){return void 0===t&&(t=-1),function(e){return e.lift(new s(t,e))}};var s=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.count,this.source))},t}(),o=function(t){function e(e,i,n){t.call(this,e),this.count=i,this.source=n}return n(e,t),e.prototype.error=function(e){if(!this.isStopped){var i=this.source,n=this.count;if(0===n)return t.prototype.error.call(this,e);n>-1&&(this.count=n-1),i.subscribe(this._unsubscribeAndRecycle())}},e}(r.Subscriber)},8164:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2503),s=i(6226),o=i(7812),a=i(257),l=i(4620);e.retryWhen=function(t){return function(e){return e.lift(new c(t,e))}};var c=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.notifier,this.source))},t}(),u=function(t){function e(e,i,n){t.call(this,e),this.notifier=i,this.source=n}return n(e,t),e.prototype.error=function(e){if(!this.isStopped){var i=this.errors,n=this.retries,a=this.retriesSubscription;if(n)this.errors=null,this.retriesSubscription=null;else{if(i=new r.Subject,(n=s.tryCatch(this.notifier)(i))===o.errorObject)return t.prototype.error.call(this,o.errorObject.e);a=l.subscribeToResult(this,n)}this._unsubscribeAndRecycle(),this.errors=i,this.retries=n,this.retriesSubscription=a,i.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,i,n,r){var s=this,o=s.errors,a=s.retries,l=s.retriesSubscription;this.errors=null,this.retries=null,this.retriesSubscription=null,this._unsubscribeAndRecycle(),this.errors=o,this.retries=a,this.retriesSubscription=l,this.source.subscribe(this)},e}(a.OuterSubscriber)},540:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.sample=function(t){return function(e){return e.lift(new o(t))}};var o=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var i=new a(t),n=e.subscribe(i);return n.add(s.subscribeToResult(i,this.notifier)),n},t}(),a=function(t){function e(){t.apply(this,arguments),this.hasValue=!1}return n(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,e,i,n,r){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(r.OuterSubscriber)},8744:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(2640);e.sampleTime=function(t,e){return void 0===e&&(e=s.async),function(i){return i.lift(new o(t,e))}};var o=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.period,this.scheduler))},t}(),a=function(t){function e(e,i,n){t.call(this,e),this.period=i,this.scheduler=n,this.hasValue=!1,this.add(n.schedule(l,i,{subscriber:this,period:i}))}return n(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(r.Subscriber);function l(t){var e=t.period;t.subscriber.notifyNext(),this.schedule(t,e)}},9042:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.scan=function(t,e){var i=!1;return arguments.length>=2&&(i=!0),function(n){return n.lift(new s(t,e,i))}};var s=function(){function t(t,e,i){void 0===i&&(i=!1),this.accumulator=t,this.seed=e,this.hasSeed=i}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.accumulator,this.seed,this.hasSeed))},t}(),o=function(t){function e(e,i,n,r){t.call(this,e),this.accumulator=i,this._seed=n,this.hasSeed=r,this.index=0}return n(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,i=this.index++;try{e=this.accumulator(this.seed,t,i)}catch(n){this.destination.error(n)}this.seed=e,this.destination.next(e)},e}(r.Subscriber)},2198:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(6226),o=i(7812);e.sequenceEqual=function(t,e){return function(i){return i.lift(new a(t,e))}};var a=function(){function t(t,e){this.compareTo=t,this.comparor=e}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.compareTo,this.comparor))},t}();e.SequenceEqualOperator=a;var l=function(t){function e(e,i,n){t.call(this,e),this.compareTo=i,this.comparor=n,this._a=[],this._b=[],this._oneComplete=!1,this.add(i.subscribe(new c(e,this)))}return n(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e.prototype.checkValues=function(){for(var t=this,e=t._a,i=t._b,n=t.comparor;e.length>0&&i.length>0;){var r=e.shift(),a=i.shift(),l=!1;n?(l=s.tryCatch(n)(r,a))===o.errorObject&&this.destination.error(o.errorObject.e):l=r===a,l||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e}(r.Subscriber);e.SequenceEqualSubscriber=l;var c=function(t){function e(e,i){t.call(this,e),this.parent=i}return n(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t)},e.prototype._complete=function(){this.parent._complete()},e}(r.Subscriber)},3361:(t,e,i)=>{"use strict";var n=i(5068),r=i(4702),s=i(2503);function o(){return new s.Subject}e.share=function(){return function(t){return r.refCount()(n.multicast(o)(t))}}},6555:(t,e,i)=>{"use strict";var n=i(4336);e.shareReplay=function(t,e,i){return function(r){return r.lift(function(t,e,i){var r,s,o=0,a=!1,l=!1;return function(c){o++,r&&!a||(a=!1,r=new n.ReplaySubject(t,e,i),s=c.subscribe({next:function(t){r.next(t)},error:function(t){a=!0,r.error(t)},complete:function(){l=!0,r.complete()}}));var u=r.subscribe(this);return function(){o--,u.unsubscribe(),s&&0===o&&l&&s.unsubscribe()}}}(t,e,i))}}},3970:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(6042);e.single=function(t){return function(e){return e.lift(new o(t,e))}};var o=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.source))},t}(),a=function(t){function e(e,i,n){t.call(this,e),this.predicate=i,this.source=n,this.seenValue=!1,this.index=0}return n(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(i){this.destination.error(i)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new s.EmptyError)},e}(r.Subscriber)},8097:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.skip=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.total))},t}(),o=function(t){function e(e,i){t.call(this,e),this.total=i,this.count=0}return n(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(r.Subscriber)},2687:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(4589);e.skipLast=function(t){return function(e){return e.lift(new o(t))}};var o=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new s.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return e.subscribe(0===this._skipCount?new r.Subscriber(t):new a(t,this._skipCount))},t}(),a=function(t){function e(e,i){t.call(this,e),this._skipCount=i,this._count=0,this._ring=new Array(i)}return n(e,t),e.prototype._next=function(t){var e=this._skipCount,i=this._count++;if(i<e)this._ring[i]=t;else{var n=i%e,r=this._ring,s=r[n];r[n]=t,this.destination.next(s)}},e}(r.Subscriber)},7136:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.skipUntil=function(t){return function(e){return e.lift(new o(t))}};var o=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.notifier))},t}(),a=function(t){function e(e,i){t.call(this,e),this.hasValue=!1,this.isInnerStopped=!1,this.add(s.subscribeToResult(this,i))}return n(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype._complete=function(){this.isInnerStopped?t.prototype._complete.call(this):this.unsubscribe()},e.prototype.notifyNext=function(t,e,i,n,r){this.hasValue=!0},e.prototype.notifyComplete=function(){this.isInnerStopped=!0,this.isStopped&&t.prototype._complete.call(this)},e}(r.OuterSubscriber)},4460:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.skipWhile=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.predicate))},t}(),o=function(t){function e(e,i){t.call(this,e),this.predicate=i,this.skipping=!0,this.index=0}return n(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(i){this.destination.error(i)}},e}(r.Subscriber)},3690:(t,e,i)=>{"use strict";var n=i(4655),r=i(6027),s=i(699),o=i(1948),a=i(2774);e.startWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){var i=t[t.length-1];a.isScheduler(i)?t.pop():i=null;var l=t.length;return o.concat(1===l?new r.ScalarObservable(t[0],i):l>1?new n.ArrayObservable(t,i):new s.EmptyObservable(i),e)}}},7211:(t,e,i)=>{"use strict";var n=i(7232),r=i(5032);e.switchAll=function(){return n.switchMap(r.identity)}},7232:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.switchMap=function(t,e){return function(i){return i.lift(new o(t,e))}};var o=function(){function t(t,e){this.project=t,this.resultSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.resultSelector))},t}(),a=function(t){function e(e,i,n){t.call(this,e),this.project=i,this.resultSelector=n,this.index=0}return n(e,t),e.prototype._next=function(t){var e,i=this.index++;try{e=this.project(t,i)}catch(n){return void this.destination.error(n)}this._innerSub(e,t,i)},e.prototype._innerSub=function(t,e,i){var n=this.innerSubscription;n&&n.unsubscribe(),this.add(this.innerSubscription=s.subscribeToResult(this,t,e,i))},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,i,n,r){this.resultSelector?this._tryNotifyNext(t,e,i,n):this.destination.next(e)},e.prototype._tryNotifyNext=function(t,e,i,n){var r;try{r=this.resultSelector(t,e,i,n)}catch(s){return void this.destination.error(s)}this.destination.next(r)},e}(r.OuterSubscriber)},2744:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.switchMapTo=function(t,e){return function(i){return i.lift(new o(t,e))}};var o=function(){function t(t,e){this.observable=t,this.resultSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.observable,this.resultSelector))},t}(),a=function(t){function e(e,i,n){t.call(this,e),this.inner=i,this.resultSelector=n,this.index=0}return n(e,t),e.prototype._next=function(t){var e=this.innerSubscription;e&&e.unsubscribe(),this.add(this.innerSubscription=s.subscribeToResult(this,this.inner,t,this.index++))},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,i,n,r){var s=this.destination;this.resultSelector?this.tryResultSelector(t,e,i,n):s.next(e)},e.prototype.tryResultSelector=function(t,e,i,n){var r,s=this.resultSelector,o=this.destination;try{r=s(t,e,i,n)}catch(a){return void o.error(a)}o.next(r)},e}(r.OuterSubscriber)},9806:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(4589),o=i(699);e.take=function(t){return function(e){return 0===t?new o.EmptyObservable:e.lift(new a(t))}};var a=function(){function t(t){if(this.total=t,this.total<0)throw new s.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.total))},t}(),l=function(t){function e(e,i){t.call(this,e),this.total=i,this.count=0}return n(e,t),e.prototype._next=function(t){var e=this.total,i=++this.count;i<=e&&(this.destination.next(t),i===e&&(this.destination.complete(),this.unsubscribe()))},e}(r.Subscriber)},2699:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(4589),o=i(699);e.takeLast=function(t){return function(e){return 0===t?new o.EmptyObservable:e.lift(new a(t))}};var a=function(){function t(t){if(this.total=t,this.total<0)throw new s.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.total))},t}(),l=function(t){function e(e,i){t.call(this,e),this.total=i,this.ring=new Array,this.count=0}return n(e,t),e.prototype._next=function(t){var e=this.ring,i=this.total,n=this.count++;e.length<i?e.push(t):e[n%i]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var i=this.count>=this.total?this.total:this.count,n=this.ring,r=0;r<i;r++){var s=e++%i;t.next(n[s])}t.complete()},e}(r.Subscriber)},2887:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.takeUntil=function(t){return function(e){return e.lift(new o(t))}};var o=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.notifier))},t}(),a=function(t){function e(e,i){t.call(this,e),this.notifier=i,this.add(s.subscribeToResult(this,i))}return n(e,t),e.prototype.notifyNext=function(t,e,i,n,r){this.complete()},e.prototype.notifyComplete=function(){},e}(r.OuterSubscriber)},496:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.takeWhile=function(t){return function(e){return e.lift(new s(t))}};var s=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.predicate))},t}(),o=function(t){function e(e,i){t.call(this,e),this.predicate=i,this.index=0}return n(e,t),e.prototype._next=function(t){var e,i=this.destination;try{e=this.predicate(t,this.index++)}catch(n){return void i.error(n)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var i=this.destination;Boolean(e)?i.next(t):i.complete()},e}(r.Subscriber)},4642:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164);e.tap=function(t,e,i){return function(n){return n.lift(new s(t,e,i))}};var s=function(){function t(t,e,i){this.nextOrObserver=t,this.error=e,this.complete=i}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.nextOrObserver,this.error,this.complete))},t}(),o=function(t){function e(e,i,n,s){t.call(this,e);var o=new r.Subscriber(i,n,s);o.syncErrorThrowable=!0,this.add(o),this.safeSubscriber=o}return n(e,t),e.prototype._next=function(t){var e=this.safeSubscriber;e.next(t),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.next(t)},e.prototype._error=function(t){var e=this.safeSubscriber;e.error(t),this.destination.error(e.syncErrorThrown?e.syncErrorValue:t)},e.prototype._complete=function(){var t=this.safeSubscriber;t.complete(),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.complete()},e}(r.Subscriber)},9378:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.defaultThrottleConfig={leading:!0,trailing:!1},e.throttle=function(t,i){return void 0===i&&(i=e.defaultThrottleConfig),function(e){return e.lift(new o(t,i.leading,i.trailing))}};var o=function(){function t(t,e,i){this.durationSelector=t,this.leading=e,this.trailing=i}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector,this.leading,this.trailing))},t}(),a=function(t){function e(e,i,n,r){t.call(this,e),this.destination=e,this.durationSelector=i,this._leading=n,this._trailing=r,this._hasTrailingValue=!1}return n(e,t),e.prototype._next=function(t){if(this.throttled)this._trailing&&(this._hasTrailingValue=!0,this._trailingValue=t);else{var e=this.tryDurationSelector(t);e&&this.add(this.throttled=s.subscribeToResult(this,e)),this._leading&&(this.destination.next(t),this._trailing&&(this._hasTrailingValue=!0,this._trailingValue=t))}},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(e){return this.destination.error(e),null}},e.prototype._unsubscribe=function(){var t=this.throttled;this._trailingValue=null,this._hasTrailingValue=!1,t&&(this.remove(t),this.throttled=null,t.unsubscribe())},e.prototype._sendTrailing=function(){var t=this;t.throttled&&t._trailing&&t._hasTrailingValue&&(t.destination.next(t._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1)},e.prototype.notifyNext=function(t,e,i,n,r){this._sendTrailing(),this._unsubscribe()},e.prototype.notifyComplete=function(){this._sendTrailing(),this._unsubscribe()},e}(r.OuterSubscriber)},7786:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(2640),o=i(9378);e.throttleTime=function(t,e,i){return void 0===e&&(e=s.async),void 0===i&&(i=o.defaultThrottleConfig),function(n){return n.lift(new a(t,e,i.leading,i.trailing))}};var a=function(){function t(t,e,i,n){this.duration=t,this.scheduler=e,this.leading=i,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),l=function(t){function e(e,i,n,r,s){t.call(this,e),this.duration=i,this.scheduler=n,this.leading=r,this.trailing=s,this._hasTrailingValue=!1,this._trailingValue=null}return n(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading&&this.destination.next(t))},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(r.Subscriber);function c(t){t.subscriber.clearThrottle()}},1401:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(2640);e.timeInterval=function(t){return void 0===t&&(t=s.async),function(e){return e.lift(new a(t))}};var o=function(){return function(t,e){this.value=t,this.interval=e}}();e.TimeInterval=o;var a=function(){function t(t){this.scheduler=t}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.scheduler))},t}(),l=function(t){function e(e,i){t.call(this,e),this.scheduler=i,this.lastTime=0,this.lastTime=i.now()}return n(e,t),e.prototype._next=function(t){var e=this.scheduler.now(),i=e-this.lastTime;this.lastTime=e,this.destination.next(new o(t,i))},e}(r.Subscriber)},1196:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2640),s=i(9286),o=i(4164),a=i(3003);e.timeout=function(t,e){void 0===e&&(e=r.async);var i=s.isDate(t),n=i?+t-e.now():Math.abs(t);return function(t){return t.lift(new l(n,i,e,new a.TimeoutError))}};var l=function(){function t(t,e,i,n){this.waitFor=t,this.absoluteTimeout=e,this.scheduler=i,this.errorInstance=n}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.absoluteTimeout,this.waitFor,this.scheduler,this.errorInstance))},t}(),c=function(t){function e(e,i,n,r,s){t.call(this,e),this.absoluteTimeout=i,this.waitFor=n,this.scheduler=r,this.errorInstance=s,this.action=null,this.scheduleTimeout()}return n(e,t),e.dispatchTimeout=function(t){t.error(t.errorInstance)},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.errorInstance=null},e}(o.Subscriber)},5252:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2640),s=i(9286),o=i(257),a=i(4620);e.timeoutWith=function(t,e,i){return void 0===i&&(i=r.async),function(n){var r=s.isDate(t),o=r?+t-i.now():Math.abs(t);return n.lift(new l(o,r,e,i))}};var l=function(){function t(t,e,i,n){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=i,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),c=function(t){function e(e,i,n,r,s){t.call(this,e),this.absoluteTimeout=i,this.waitFor=n,this.withObservable=r,this.scheduler=s,this.action=null,this.scheduleTimeout()}return n(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(a.subscribeToResult(t,e))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},e}(o.OuterSubscriber)},1609:(t,e,i)=>{"use strict";var n=i(2640),r=i(6589);e.timestamp=function(t){return void 0===t&&(t=n.async),r.map(function(e){return new s(e,t.now())})};var s=function(){return function(t,e){this.value=t,this.timestamp=e}}();e.Timestamp=s},3056:(t,e,i)=>{"use strict";var n=i(9203);function r(t,e,i){return 0===i?[e]:(t.push(e),t)}e.toArray=function(){return n.reduce(r,[])}},9883:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2503),s=i(257),o=i(4620);e.window=function(t){return function(e){return e.lift(new a(t))}};var a=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var i=new l(t),n=e.subscribe(i);return n.closed||i.add(o.subscribeToResult(i,this.windowBoundaries)),n},t}(),l=function(t){function e(e){t.call(this,e),this.window=new r.Subject,e.next(this.window)}return n(e,t),e.prototype.notifyNext=function(t,e,i,n,r){this.openWindow()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,i=this.window=new r.Subject;e.next(i)},e}(s.OuterSubscriber)},5588:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4164),s=i(2503);e.windowCount=function(t,e){return void 0===e&&(e=0),function(i){return i.lift(new o(t,e))}};var o=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.windowSize,this.startWindowEvery))},t}(),a=function(t){function e(e,i,n){t.call(this,e),this.destination=e,this.windowSize=i,this.startWindowEvery=n,this.windows=[new s.Subject],this.count=0,e.next(this.windows[0])}return n(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,i=this.destination,n=this.windowSize,r=this.windows,o=r.length,a=0;a<o&&!this.closed;a++)r[a].next(t);var l=this.count-n+1;if(l>=0&&l%e==0&&!this.closed&&r.shift().complete(),++this.count%e==0&&!this.closed){var c=new s.Subject;r.push(c),i.next(c)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(r.Subscriber)},5795:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2503),s=i(2640),o=i(4164),a=i(5593),l=i(2774);e.windowTime=function(t){var e=s.async,i=null,n=Number.POSITIVE_INFINITY;return l.isScheduler(arguments[3])&&(e=arguments[3]),l.isScheduler(arguments[2])?e=arguments[2]:a.isNumeric(arguments[2])&&(n=arguments[2]),l.isScheduler(arguments[1])?e=arguments[1]:a.isNumeric(arguments[1])&&(i=arguments[1]),function(r){return r.lift(new c(t,i,n,e))}};var c=function(){function t(t,e,i,n){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=i,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),u=function(t){function e(){t.apply(this,arguments),this._numberOfNextedValues=0}return n(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(r.Subject),h=function(t){function e(e,i,n,r,s){t.call(this,e),this.destination=e,this.windowTimeSpan=i,this.windowCreationInterval=n,this.maxWindowSize=r,this.scheduler=s,this.windows=[];var o=this.openWindow();if(null!==n&&n>=0){var a={windowTimeSpan:i,windowCreationInterval:n,subscriber:this,scheduler:s};this.add(s.schedule(f,i,{subscriber:this,window:o,context:null})),this.add(s.schedule(d,n,a))}else this.add(s.schedule(p,i,{subscriber:this,window:o,windowTimeSpan:i}))}return n(e,t),e.prototype._next=function(t){for(var e=this.windows,i=e.length,n=0;n<i;n++){var r=e[n];r.closed||(r.next(t),r.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(r))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new u;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(o.Subscriber);function p(t){var e=t.subscriber,i=t.windowTimeSpan,n=t.window;n&&e.closeWindow(n),t.window=e.openWindow(),this.schedule(t,i)}function d(t){var e=t.windowTimeSpan,i=t.subscriber,n=t.scheduler,r=t.windowCreationInterval,s=i.openWindow(),o=this,a={action:o,subscription:null};a.subscription=n.schedule(f,e,{subscriber:i,window:s,context:a}),o.add(a.subscription),o.schedule(t,r)}function f(t){var e=t.subscriber,i=t.window,n=t.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),e.closeWindow(i)}},3375:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2503),s=i(3326),o=i(6226),a=i(7812),l=i(257),c=i(4620);e.windowToggle=function(t,e){return function(i){return i.lift(new u(t,e))}};var u=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.openings,this.closingSelector))},t}(),h=function(t){function e(e,i,n){t.call(this,e),this.openings=i,this.closingSelector=n,this.contexts=[],this.add(this.openSubscription=c.subscribeToResult(this,i,i))}return n(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var i=e.length,n=0;n<i;n++)e[n].window.next(t)},e.prototype._error=function(e){var i=this.contexts;if(this.contexts=null,i)for(var n=i.length,r=-1;++r<n;){var s=i[r];s.window.error(e),s.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var i=e.length,n=-1;++n<i;){var r=e[n];r.window.complete(),r.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,i=-1;++i<e;){var n=t[i];n.window.unsubscribe(),n.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,i,n,l){if(t===this.openings){var u=o.tryCatch(this.closingSelector)(e);if(u===a.errorObject)return this.error(a.errorObject.e);var h=new r.Subject,p=new s.Subscription,d={window:h,subscription:p};this.contexts.push(d);var f=c.subscribeToResult(this,u,d);f.closed?this.closeWindow(this.contexts.length-1):(f.context=d,p.add(f)),this.destination.next(h)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,i=e[t],n=i.window,r=i.subscription;e.splice(t,1),n.complete(),r.unsubscribe()}},e}(l.OuterSubscriber)},5937:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(2503),s=i(6226),o=i(7812),a=i(257),l=i(4620);e.windowWhen=function(t){return function(e){return e.lift(new c(t))}};var c=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.closingSelector))},t}(),u=function(t){function e(e,i){t.call(this,e),this.destination=e,this.closingSelector=i,this.openWindow()}return n(e,t),e.prototype.notifyNext=function(t,e,i,n,r){this.openWindow(r)},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var i=this.window=new r.Subject;this.destination.next(i);var n=s.tryCatch(this.closingSelector)();if(n===o.errorObject){var a=o.errorObject.e;this.destination.error(a),this.window.error(a)}else this.add(this.closingNotification=l.subscribeToResult(this,n))},e}(a.OuterSubscriber)},3252:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(257),s=i(4620);e.withLatestFrom=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){var i;return"function"==typeof t[t.length-1]&&(i=t.pop()),e.lift(new o(t,i))}};var o=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.observables,this.project))},t}(),a=function(t){function e(e,i,n){t.call(this,e),this.observables=i,this.project=n,this.toRespond=[];var r=i.length;this.values=new Array(r);for(var o=0;o<r;o++)this.toRespond.push(o);for(o=0;o<r;o++){var a=i[o];this.add(s.subscribeToResult(this,a,a,o))}}return n(e,t),e.prototype.notifyNext=function(t,e,i,n,r){this.values[i]=e;var s=this.toRespond;if(s.length>0){var o=s.indexOf(i);-1!==o&&s.splice(o,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(i){return void this.destination.error(i)}this.destination.next(e)},e}(r.OuterSubscriber)},2902:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(4655),s=i(9939),o=i(4164),a=i(257),l=i(4620),c=i(3950);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var i=t[t.length-1];return"function"==typeof i&&t.pop(),new r.ArrayObservable(t).lift(new h(i))}e.zip=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){return e.lift.call(u.apply(void 0,[e].concat(t)))}},e.zipStatic=u;var h=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.project))},t}();e.ZipOperator=h;var p=function(t){function e(e,i,n){void 0===n&&(n=Object.create(null)),t.call(this,e),this.iterators=[],this.active=0,this.project="function"==typeof i?i:null,this.values=n}return n(e,t),e.prototype._next=function(t){var e=this.iterators;s.isArray(t)?e.push(new f(t)):e.push("function"==typeof t[c.iterator]?new d(t[c.iterator]()):new b(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(0!==e){this.active=e;for(var i=0;i<e;i++){var n=t[i];n.stillUnsubscribed?this.add(n.subscribe(n,i)):this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,i=this.destination,n=0;n<e;n++)if("function"==typeof(o=t[n]).hasValue&&!o.hasValue())return;var r=!1,s=[];for(n=0;n<e;n++){var o,a=(o=t[n]).next();if(o.hasCompleted()&&(r=!0),a.done)return void i.complete();s.push(a.value)}this.project?this._tryProject(s):i.next(s),r&&i.complete()},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(i){return void this.destination.error(i)}this.destination.next(e)},e}(o.Subscriber);e.ZipSubscriber=p;var d=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}(),f=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[c.iterator]=function(){return this},t.prototype.next=function(t){var e=this.index++;return e<this.length?{value:this.array[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),b=function(t){function e(e,i,n){t.call(this,e),this.parent=i,this.observable=n,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}return n(e,t),e.prototype[c.iterator]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,i,n,r){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return l.subscribeToResult(this,this.observable,this,e)},e}(a.OuterSubscriber)},4575:(t,e,i)=>{"use strict";var n=i(2902);e.zipAll=function(t){return function(e){return e.lift(new n.ZipOperator(t))}}},8733:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=function(t){function e(e,i){t.call(this)}return n(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(i(3326).Subscription);e.Action=r},9748:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=i(276),s=function(t){function e(e,i){t.call(this,e,i),this.scheduler=e,this.pending=!1,this.work=i}return n(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t,this.pending=!0;var i=this.id,n=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(n,i,e)),this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this},e.prototype.requestAsyncId=function(t,e,i){return void 0===i&&(i=0),r.root.setInterval(t.flush.bind(t,this),i)},e.prototype.recycleAsyncId=function(t,e,i){if(void 0===i&&(i=0),null!==i&&this.delay===i&&!1===this.pending)return e;r.root.clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var i=!1,n=void 0;try{this.work(t)}catch(r){i=!0,n=!!r&&r||new Error(r)}if(i)return this.unsubscribe(),n},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,i=e.actions,n=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&i.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(i(8733).Action);e.AsyncAction=s},987:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=function(t){function e(){t.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return n(e,t),e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var i;this.active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}},e}(i(1984).Scheduler);e.AsyncScheduler=r},3832:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=function(t){function e(e,i){t.call(this,e,i),this.scheduler=e,this.work=i}return n(e,t),e.prototype.schedule=function(e,i){return void 0===i&&(i=0),i>0?t.prototype.schedule.call(this,e,i):(this.delay=i,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,i){return i>0||this.closed?t.prototype.execute.call(this,e,i):this._execute(e,i)},e.prototype.requestAsyncId=function(e,i,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,i,n):e.flush(this)},e}(i(9748).AsyncAction);e.QueueAction=r},2274:function(t,e,i){"use strict";var n=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(i(987).AsyncScheduler);e.QueueScheduler=r},2640:(t,e,i)=>{"use strict";var n=i(9748);e.async=new(i(987).AsyncScheduler)(n.AsyncAction)},7869:(t,e,i)=>{"use strict";var n=i(3832);e.queue=new(i(2274).QueueScheduler)(n.QueueAction)},3950:(t,e,i)=>{"use strict";var n=i(276);function r(t){var e=t.Symbol;if("function"==typeof e)return e.iterator||(e.iterator=e("iterator polyfill")),e.iterator;var i=t.Set;if(i&&"function"==typeof(new i)["@@iterator"])return"@@iterator";var n=t.Map;if(n)for(var r=Object.getOwnPropertyNames(n.prototype),s=0;s<r.length;++s){var o=r[s];if("entries"!==o&&"size"!==o&&n.prototype[o]===n.prototype.entries)return o}return"@@iterator"}e.symbolIteratorPonyfill=r,e.iterator=r(n.root),e.$$iterator=e.iterator},1275:(t,e,i)=>{"use strict";var n=i(276);function r(t){var e,i=t.Symbol;return"function"==typeof i?i.observable?e=i.observable:(e=i("observable"),i.observable=e):e="@@observable",e}e.getSymbolObservable=r,e.observable=r(n.root),e.$$observable=e.observable},9903:(t,e,i)=>{"use strict";var n=i(276).root.Symbol;e.rxSubscriber="function"==typeof n&&"function"==typeof n.for?n.for("rxSubscriber"):"@@rxSubscriber",e.$$rxSubscriber=e.rxSubscriber},4589:function(t,e){"use strict";var i=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n=function(t){function e(){var e=t.call(this,"argument out of range");this.name=e.name="ArgumentOutOfRangeError",this.stack=e.stack,this.message=e.message}return i(e,t),e}(Error);e.ArgumentOutOfRangeError=n},6042:function(t,e){"use strict";var i=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n=function(t){function e(){var e=t.call(this,"no elements in sequence");this.name=e.name="EmptyError",this.stack=e.stack,this.message=e.message}return i(e,t),e}(Error);e.EmptyError=n},2758:(t,e)=>{"use strict";e.FastMap=function(){function t(){this.values={}}return t.prototype.delete=function(t){return this.values[t]=null,!0},t.prototype.set=function(t,e){return this.values[t]=e,this},t.prototype.get=function(t){return this.values[t]},t.prototype.forEach=function(t,e){var i=this.values;for(var n in i)i.hasOwnProperty(n)&&null!==i[n]&&t.call(e,i[n],n)},t.prototype.clear=function(){this.values={}},t}()},4930:(t,e,i)=>{"use strict";var n=i(276),r=i(8481);e.Map=n.root.Map||function(){return r.MapPolyfill}()},8481:(t,e)=>{"use strict";e.MapPolyfill=function(){function t(){this.size=0,this._values=[],this._keys=[]}return t.prototype.get=function(t){var e=this._keys.indexOf(t);return-1===e?void 0:this._values[e]},t.prototype.set=function(t,e){var i=this._keys.indexOf(t);return-1===i?(this._keys.push(t),this._values.push(e),this.size++):this._values[i]=e,this},t.prototype.delete=function(t){var e=this._keys.indexOf(t);return-1!==e&&(this._values.splice(e,1),this._keys.splice(e,1),this.size--,!0)},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this.size=0},t.prototype.forEach=function(t,e){for(var i=0;i<this.size;i++)t.call(e,this._values[i],this._keys[i])},t}()},2e3:function(t,e){"use strict";var i=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n=function(t){function e(){var e=t.call(this,"object unsubscribed");this.name=e.name="ObjectUnsubscribedError",this.stack=e.stack,this.message=e.message}return i(e,t),e}(Error);e.ObjectUnsubscribedError=n},4888:(t,e,i)=>{"use strict";var n=i(276);function r(){return function(){function t(){this._values=[]}return t.prototype.add=function(t){this.has(t)||this._values.push(t)},t.prototype.has=function(t){return-1!==this._values.indexOf(t)},Object.defineProperty(t.prototype,"size",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),t.prototype.clear=function(){this._values.length=0},t}()}e.minimalSetImpl=r,e.Set=n.root.Set||r()},3003:function(t,e){"use strict";var i=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n=function(t){function e(){var e=t.call(this,"Timeout has occurred");this.name=e.name="TimeoutError",this.stack=e.stack,this.message=e.message}return i(e,t),e}(Error);e.TimeoutError=n},3369:function(t,e){"use strict";var i=this&&this.__extends||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n=function(t){function e(e){t.call(this),this.errors=e;var i=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"");this.name=i.name="UnsubscriptionError",this.stack=i.stack,this.message=i.message}return i(e,t),e}(Error);e.UnsubscriptionError=n},7812:(t,e)=>{"use strict";e.errorObject={e:{}}},5032:(t,e)=>{"use strict";e.identity=function(t){return t}},9939:(t,e)=>{"use strict";e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},899:(t,e)=>{"use strict";e.isArrayLike=function(t){return t&&"number"==typeof t.length}},9286:(t,e)=>{"use strict";e.isDate=function(t){return t instanceof Date&&!isNaN(+t)}},8398:(t,e)=>{"use strict";e.isFunction=function(t){return"function"==typeof t}},5593:(t,e,i)=>{"use strict";var n=i(9939);e.isNumeric=function(t){return!n.isArray(t)&&t-parseFloat(t)+1>=0}},1953:(t,e)=>{"use strict";e.isObject=function(t){return null!=t&&"object"==typeof t}},8598:(t,e)=>{"use strict";e.isPromise=function(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}},2774:(t,e)=>{"use strict";e.isScheduler=function(t){return t&&"function"==typeof t.schedule}},3617:(t,e)=>{"use strict";e.noop=function(){}},7127:(t,e)=>{"use strict";e.not=function(t,e){function i(){return!i.pred.apply(i.thisArg,arguments)}return i.pred=t,i.thisArg=e,i}},8187:(t,e,i)=>{"use strict";var n=i(3617);function r(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:n.noop}e.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return r(t)},e.pipeFromArray=r},276:(t,e)=>{"use strict";var i="undefined"!=typeof window&&window,n="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,r="undefined"!=typeof global&&global;e.root=i||r||n},4620:(t,e,i)=>{"use strict";var n=i(276),r=i(899),s=i(8598),o=i(1953),a=i(6437),l=i(3950),c=i(2731),u=i(1275);e.subscribeToResult=function(t,e,i,h){var p=new c.InnerSubscriber(t,i,h);if(p.closed)return null;if(e instanceof a.Observable)return e._isScalar?(p.next(e.value),p.complete(),null):(p.syncErrorThrowable=!0,e.subscribe(p));if(r.isArrayLike(e)){for(var d=0,f=e.length;d<f&&!p.closed;d++)p.next(e[d]);p.closed||p.complete()}else{if(s.isPromise(e))return e.then(function(t){p.closed||(p.next(t),p.complete())},function(t){return p.error(t)}).then(null,function(t){n.root.setTimeout(function(){throw t})}),p;if(e&&"function"==typeof e[l.iterator])for(var b=e[l.iterator]();;){var m=b.next();if(m.done){p.complete();break}if(p.next(m.value),p.closed)break}else if(e&&"function"==typeof e[u.observable]){var v=e[u.observable]();if("function"==typeof v.subscribe)return v.subscribe(new c.InnerSubscriber(t,i,h));p.error(new TypeError("Provided object does not correctly implement Symbol.observable"))}else{var g=o.isObject(e)?"an invalid object":"'"+e+"'";p.error(new TypeError("You provided "+g+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable."))}}return null}},7622:(t,e,i)=>{"use strict";var n=i(4164),r=i(9903),s=i(9377);e.toSubscriber=function(t,e,i){if(t){if(t instanceof n.Subscriber)return t;if(t[r.rxSubscriber])return t[r.rxSubscriber]()}return t||e||i?new n.Subscriber(t,e,i):new n.Subscriber(s.empty)}},6226:(t,e,i)=>{"use strict";var n,r=i(7812);function s(){try{return n.apply(this,arguments)}catch(t){return r.errorObject.e=t,r.errorObject}}e.tryCatch=function(t){return n=t,s}},4743:(t,e,i)=>{"use strict";i.d(e,{R:()=>l});const{ma:n,dma:r,ema:s,sma:o,wma:a}=window;var l;!function(t){t.between=function(t,e,i,n=!0){return n?t>=e&&t<=i:t>e&&t<i},t.percentage=function(t,e){return 0===t?0:100*e/t},t.average=function(t){return t.reduce((t,e)=>e+t,0)/t.length},t.simpleMovingAverage=function(t,e){return n(t,e)},t.dynamicWeightedMovingAverage=function(t,e,i){return r(t,e,i)},t.exponentialMovingAverage=function(t,e){return s(t,e)},t.smoothedMovingAverage=function(t,e,i=1){return o(t,e,i)},t.weightedMovingAverage=function(t,e){return a(t,e)},t.formatValues=function(t){if(t<1e3)return t;let e=t,i=0;for(;e>=1e3;)e/=1e3,i++;return e=parseInt(e).toPrecision(3),e+=["","K","M","B","T"][i],i<5?e:t}}(l||(l={}))},7984:(t,e,i)=>{"use strict";i.r(e),i.d(e,{MapViewModule:()=>Le});var n=i(649),r=i(4311),s=i(4369),o=i(7307),a=i(1116),l=i(5366);let c=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=l.oAB({type:t}),t.\u0275inj=l.cJS({imports:[[a.ez,o.Ps,r.AV,n.aw,s.ot]]}),t})();var u=i(408),h=i(4446),p=i(3337),d=i(1041),f=i(3070),b=i(3841);let m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=l.oAB({type:t}),t.\u0275inj=l.cJS({imports:[[a.ez]]}),t})();var v=i(4743),g=i(3835),y=i(7701),w=i(5627),x=i(1305),O=i(3837),S=i(5634),_=i(9348),k=i(7672);function E(t,e){1&t&&l._UZ(0,"mat-spinner",3)}let T=(()=>{class t{constructor(t,e,i,n){this.pubsub=t,this.regionService=e,this.cdr=i,this.translate=n,this.applyZoom=!0,this.selectionChanged=new l.vpe,this.mapHasBeenLoaded=!1,this.zoomTransitionDuration=400,this.subscriptions=[],this.translations={},this.identifiers={mesoregion:"mesoregion",microregion:"microregion",municipalities:"municipalities"}}ngOnInit(){this.subscriptions.push((0,x.aj)([this.translate.get("map-view.state-map.selected-locality"),this.translate.get("model-constants.state"),this.translate.get("model-constants.microregion"),this.translate.get("model-constants.mesoregion"),this.translate.get("model-constants.municipy"),this.translate.get("map-view.state-map.not-informed")]).subscribe(([t,e,i,n,r,s])=>{this.translations.locality=t,this.translations["model-constants.state"]=e,this.translations["model-constants.microregion"]=i,this.translations["model-constants.mesoregion"]=n,this.translations["model-constants.municipy"]=r,this.translations.notInformed=s}),this.pubsub.getAsBehaviorSubject(O.Y.GLOBAL_STATE_CHANGE).pipe((0,g.h)(t=>{var e;return(null==t?void 0:t.id)!==(null===(e=this.selectedState)||void 0===e?void 0:e.id)})).subscribe(t=>{this.selectedState=t,this.mapHasBeenLoaded=!1,this.svgMapUrl=`assets/img/svgs/states/br-${(null==t?void 0:t.initials.toLowerCase())||"ba"}.svg`,this.emitLabel(),this.initMap()}),this.pubsub.get(O.Y.MAP_CHANGE_COLOR_STRATEGY).pipe((0,y.b)(300)).subscribe(this.handleColorStrategyChange.bind(this)),this.pubsub.get(O.Y.MAP_ZOOM_RESET).pipe((0,g.h)(()=>{var t,e;return null===(e=null===(t=this.selectedElement)||void 0===t?void 0:t.element)||void 0===e?void 0:e.locationParent})).subscribe(()=>{this.zoomOut(this.selectedElement.element),this.regions[this.identifiers.municipalities].items.forEach(t=>this.setClassToElement(t,"active",!1)),this.emitLabel()}))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}ngOnChanges(t){t.mapFilters&&t.mapFilters.currentValue&&this.deactivateBasedOnFilters(),t.selectedMeta&&t.selectedMeta.currentValue&&this.handleColorStrategyChange(this.selectedColorStrategy)}triggerHoverData(t){var e,i;const n=parseInt(null==t?void 0:t.locationId),r=null===(e=this.mapFilters[t.locationType])||void 0===e?void 0:e.find(t=>(null==t?void 0:t.id)===n);if(r){let e=null===(i=this.mapFilters)||void 0===i?void 0:i.meta.map(({label:t,id:e})=>{var i;const n=null===(i=r.values[e])||void 0===i?void 0:i.value;return`• ${t}: ${v.R.formatValues(parseFloat(n)||0)}`}).join(" ");e+=" "+(this.mapFilters.categories||[]).map(({index:t,name:e})=>{var i;return`• ${e}: ${(null===(i=r.categories[t])||void 0===i?void 0:i.join(", "))||this.translations.notInformed}`}).join(" "),t.node.innerHTML=`<title>${r.label} ${e}</title>`,t.hasTitle=!0,this.cdr.detectChanges()}}resetMap(){var t,e,i;null===(t=this.regions[this.identifiers.microregion])||void 0===t||t.items.forEach(t=>this.changeNodeVisibilityStatus(t)),null===(e=this.regions[this.identifiers.mesoregion])||void 0===e||e.items.forEach(t=>this.changeNodeVisibilityStatus(t)),null===(i=this.rootGroup)||void 0===i||i.animateSvgFocus(this.zoomTransitionDuration,mina.easein)}zoomOut({locationParent:t}){this.selectedElement=this.getFormattedPayload(t);const e=t,{locationType:i}=e,n=[];i&&i!==this.identifiers.mesoregion?i===this.identifiers.microregion&&n.push(this.identifiers.microregion):n.push(...Object.values(this.identifiers)),n.forEach(t=>{var e;null===(e=this.regions[t])||void 0===e||e.forEach(t=>this.changeNodeVisibilityStatus(t))}),"map-location-wrapper"===e.node.id&&(this.resizeRegionReference=null),this.applyZoom&&e.animateSvgFocus(this.zoomTransitionDuration,mina.easein)}zoomIn(t,e){this.selectedElement=this.getFormattedPayload(e),t===this.identifiers.mesoregion?this.toggleDatasetFocus(this.identifiers.mesoregion,this.identifiers.microregion):t===this.identifiers.microregion&&this.toggleDatasetFocus(this.identifiers.microregion,this.identifiers.municipalities),t===this.identifiers.municipalities&&this.setClassToElement(e,"active"),this.applyZoom&&e.animateSvgFocus(this.zoomTransitionDuration,mina.easein)}resize(){(this.resizeRegionReference||this.rootGroup).animateSvgFocus(this.zoomTransitionDuration,mina.easein)}handleColorStrategyChange(t){var e,i,n;if(!this.mapHasBeenLoaded)return void setTimeout(()=>this.handleColorStrategyChange(t),300);if(this.selectedColorStrategy=t,!(null===(e=this.regions)||void 0===e?void 0:e.municipalities)||!this.selectedColorStrategy)return;const r={positive:"balance-positive",halfPositive:"balance-half-positive",halfNegative:"balance-half-negative",negative:"balance-negative",zero:"balance-zero"},s=this.generateMinMaxRatioGroups(),o=this.generateLogGroups(),a=this.generateBalanceGroups(),l=this.mapFilters.meta[0].percentile.map(t=>t.class);null===(i=this.regions)||void 0===i||i.municipalities.forEach(t=>{var e,i;this.cleanMunicipyAppliedClasses(t,l,s,o,Object.values(r));const n=t.locationData.values[null===(e=this.selectedMeta)||void 0===e?void 0:e.id];switch(null===(i=this.selectedColorStrategy)||void 0===i?void 0:i.id){case 1:this.applyMinMaxColorStrategy(n,t,s);break;case 2:this.applyPercentileColorStrategy(n,t);break;case 3:this.applyLogColorStrategy(n,t,o);break;case 4:this.applyBalanceColorStrategy(n,t,a,r)}}),this.pubsub.emit(O.Y.MAP_APPLIED_COLOR_STRATEGY,{minMaxRatioGroups:s,logRatioGroups:o,balanceGroups:a,percentilesGroups:this.mapFilters.meta[null===(n=this.selectedMeta)||void 0===n?void 0:n.id].percentile}),this.cdr.detectChanges()}cleanMunicipyAppliedClasses(t,e,i,n,r){e.forEach(e=>this.setClassToElement(t,e,!1)),[...i,...n,...r,{class:"percentile-4"},{class:"empty"}].forEach(e=>this.setClassToElement(t,e.class||e,!1))}generateBalanceGroups(){var t,e,i;const n=null===(i=null===(e=null===(t=this.regions)||void 0===t?void 0:t.municipalities)||void 0===e?void 0:e.items)||void 0===i?void 0:i.map(({locationData:t})=>{var e;return null===(e=t.values[this.selectedMeta.id])||void 0===e?void 0:e.value}),r=n.filter(t=>t>0),s=n.filter(t=>t<0);let o,a;return r.length&&(o=Math.max(...r)),s.length&&(a=Math.min(...s)),{maxPositive:o,maxNegative:a,halfPositive:o?o/2:null,halfNegative:a?a/2:null}}generateLogGroups(){const t=0===this.selectedMeta.min?0:Math.log10(this.selectedMeta.min),e=(Math.log10(this.selectedMeta.max||1)-t)/5,i=[{class:"log-0",value:t+e}];for(let n=1;n<5;n++)i[n]={class:`log-${n}`,value:i[n-1].value+e};return i}generateMinMaxRatioGroups(){const t=(this.selectedMeta.max-this.selectedMeta.min)/5,e=[{class:"min-max-0",value:this.selectedMeta.min+t}];for(let i=1;i<5;i++)e[i]={class:`min-max-${i}`,value:e[i-1].value+t};return e}applyLogColorStrategy(t,e,i){if(t)if(0===t.value&&this.showZero)this.setClassToElement(e,"empty");else{const n=Math.log10(t.value),r=i.find(t=>n<=t.value);r&&this.setClassToElement(e,r.class)}}applyBalanceColorStrategy(t,e,i,n){if(t){const{value:r}=t;0===r?this.setClassToElement(e,n.zero):r>0?this.setClassToElement(e,i.halfPositive&&r<i.halfPositive?n.halfPositive:n.positive):r<0&&this.setClassToElement(e,i.halfNegative&&r>i.halfNegative?n.halfNegative:n.negative)}}applyMinMaxColorStrategy(t,e,i){if(t)if(0===t.value&&this.showZero)this.setClassToElement(e,"empty");else{const n=i.find(e=>t.value<=e.value);n&&this.setClassToElement(e,n.class)}}applyPercentileColorStrategy(t,e){var i;const n=S.B.safeGet(this.selectedMeta.percentile,(null===(i=this.selectedMeta.percentile)||void 0===i?void 0:i.length)-1);if(0===t.value&&this.showZero)this.setClassToElement(e,"empty");else if(this.selectedMeta.percentile.length&&t.value>n.value)this.setClassToElement(e,"percentile-4");else{const i=this.selectedMeta.percentile.filter(({value:e})=>t.value<=e),n=S.B.safeGet(i,0);n&&this.setClassToElement(e,n.class)}}initMap(){this.mapRef=Snap("#map-svg-ref"),Snap.load(this.svgMapUrl,this.onSnapLoad.bind(this))}onSnapLoad(t){this.mapRef.append(t),this.rootGroup=this.mapRef.select("#map-location-wrapper"),this.regions={},Object.keys(this.identifiers).forEach(t=>{var e;return this.regions[t]=null===(e=this.mapRef.select(`#${this.identifiers[t]}`))||void 0===e?void 0:e.selectAll("path")}),this.regions[this.identifiers.mesoregion].forEach(t=>this.setupElement(t,this.identifiers.mesoregion)),this.deactivateBasedOnFilters(),setTimeout(()=>this.mapHasBeenLoaded=!0,300)}setupElement(t,e){var i;switch(t.locationId=null===(i=null==t?void 0:t.node)||void 0===i?void 0:i.id,t.locationType=e,t.locationIsLoaded=!0,e){case this.identifiers.mesoregion:t.locationParent=this.rootGroup;break;case this.identifiers.microregion:{const e=t.node.getAttribute(this.identifiers.mesoregion);t.locationParent=this.regions[this.identifiers.mesoregion].items.find(({locationId:t})=>t===e)||this.rootGroup}break;case this.identifiers.municipalities:{const e=t.node.getAttribute(this.identifiers.microregion);t.locationParent=this.regions[this.identifiers.microregion].items.find(({locationId:t})=>t===e)||this.rootGroup}}t.hover(()=>this.triggerHoverData(t)),t.click(({altKey:i,metaKey:n,ctrlKey:r,shiftKey:s})=>{if(this.regions[this.identifiers.municipalities].items.forEach(t=>this.setClassToElement(t,"active",!1)),this.resizeRegionReference=t,i||n||r||s)this.zoomOut(t);else{if(t.disabled)return;this.zoomIn(e,t)}this.emitLabel()})}toggleDatasetFocus(t,e){this.regions[t].forEach(t=>this.changeNodeVisibilityStatus(t,!0)),this.regions[e].forEach(t=>!t.locationIsLoaded&&this.setupElement(t,e))}changeNodeVisibilityStatus(t,e=!1){t.node.style.fill=e?"none":""}getFormattedPayload(t){return t.locationId&&t.locationType?{id:t.locationId,type:t.locationType,element:t}:null}emitLabel(){var t;if(!this.selectedElement)return void this.selectionChanged.emit(this.selectedState);const e=parseInt(null===(t=this.selectedElement)||void 0===t?void 0:t.id);let i=null;switch(this.selectedElement.type){case this.identifiers.mesoregion:i=this.regionService.getMesoregions(this.selectedState.initials);break;case this.identifiers.microregion:i=this.regionService.getMicroregions(this.selectedState.initials);break;case this.identifiers.municipalities:i=this.regionService.getMunicipalities(this.selectedState.initials)}this.subscriptions.push(i.subscribe(t=>{const i=t.find(t=>(null==t?void 0:t.id)===e);i&&(this.selectionChanged.emit(i),this.pubsub.emit(O.Y.PUSH_MOBILE_ONLY_SNACKBAR,{message:`${this.translations.locality} - ${this.translations[i.descriptor]}: ${i.name}`,config:{verticalPosition:"top",duration:1e3}}))}))}deactivateBasedOnFilters(){var t;const e=null===(t=this.mapFilters)||void 0===t?void 0:t.municipalities.map(t=>null==t?void 0:t.id);this.regions&&this.identifiers&&e&&this.regions[this.identifiers.municipalities].forEach(t=>{var i;const n=parseInt(null===(i=null==t?void 0:t.node)||void 0===i?void 0:i.id);e.indexOf(n)<0?(this.setClassToElement(t,"disabled"),t.disabled=!0):(t.locationData=this.mapFilters.municipalities.find(t=>(null==t?void 0:t.id)===n),this.setClassToElement(t,"disabled",!1),t.disabled=!1)})}setClassToElement(t,e,i=!0){t.node.classList[i?"add":"remove"](e)}}return t.COLOR_STRATEGIES={minMax:"MIN-MAX",percentile:"PERCENTILE",log:"LOG",balance:"BALANCE"},t.\u0275fac=function(e){return new(e||t)(l.Y36(_.A),l.Y36(w.o),l.Y36(l.sBO),l.Y36(n.sK))},t.\u0275cmp=l.Xpm({type:t,selectors:[["state-map"]],inputs:{mapFilters:"mapFilters",showZero:"showZero",selectedMeta:"selectedMeta",applyZoom:"applyZoom"},outputs:{selectionChanged:"selectionChanged"},features:[l._Bn([w.o]),l.TTD],decls:3,vars:1,consts:[[1,"map-wrapper","state-map"],["diameter","100","color","accent",4,"ngIf"],["id","map-svg-ref"],["diameter","100","color","accent"]],template:function(t,e){1&t&&(l.TgZ(0,"div",0),l.YNc(1,E,1,0,"mat-spinner",1),l.O4$(),l._UZ(2,"svg",2),l.qZA()),2&t&&(l.xp6(1),l.Q6J("ngIf",!e.mapHasBeenLoaded))},directives:[a.O5,k.$g],styles:["[_ngcontent-%COMP%]:root{--pallete-primary:#000;--pallete-accent:#000;--sidenav-width:200px} .map-wrapper.state-map .options{display:flex} .map-wrapper.state-map .options{align-items:center;justify-content:center;flex-direction:column} .map-wrapper.state-map{height:350px;width:100%;overflow:hidden;position:relative} .map-wrapper.state-map mat-spinner{position:absolute;top:calc(50% - 100px);left:calc(50%)} .map-wrapper.state-map svg{max-width:100vw;width:100%;height:100%} .map-wrapper.state-map .options{position:absolute;top:10px;left:10px} .map-wrapper.state-map .options button{color:#fff;margin-bottom:8px} .map-wrapper.state-map .municipy:not(.disabled):not(.active).empty{fill:var(--map-color-value-0)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).min-max-0{fill:var(--state-map-min-max-municipy-0)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).min-max-1{fill:var(--state-map-min-max-municipy-1)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).min-max-2{fill:var(--state-map-min-max-municipy-2)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).min-max-3{fill:var(--state-map-min-max-municipy-3)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).min-max-4{fill:var(--state-map-min-max-municipy-4)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).percentile-0{fill:var(--state-map-percentile-municipy-0)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).percentile-1{fill:var(--state-map-percentile-municipy-1)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).percentile-2{fill:var(--state-map-percentile-municipy-2)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).percentile-3{fill:var(--state-map-percentile-municipy-3)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).percentile-4{fill:var(--state-map-percentile-municipy-4)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).log-0{fill:var(--state-map-log-municipy-0)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).log-1{fill:var(--state-map-log-municipy-1)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).log-2{fill:var(--state-map-log-municipy-2)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).log-3{fill:var(--state-map-log-municipy-3)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).log-4{fill:var(--state-map-log-municipy-4)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).balance-positive{fill:var(--state-map-pallete-balance-positive)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).balance-half-positive{fill:var(--state-map-pallete-balance-half-positive)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).balance-negative{fill:var(--state-map-pallete-balance-negative)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).balance-half-negative{fill:var(--state-map-pallete-balance-half-negative)} .map-wrapper.state-map .municipy:not(.disabled):not(.active).balance-zero{fill:var(--state-map-pallete-balance-zero)} .map-wrapper.state-map .municipy{stroke-width:100;stroke-linecap:round;stroke-linejoin:round;stroke:#72706f;fill:#eeddb3;stroke:var(--state-map-stroke-municipy);fill:var(--state-map-fill);cursor:pointer;fill-opacity:1;transition:fill .3s ease-out} .map-wrapper.state-map .municipy.active{fill:var(--state-map-fill-hover)} .map-wrapper.state-map .municipy:not(.disabled):not(.active):hover{fill:var(--state-map-fill-hover);fill-opacity:.6} .map-wrapper.state-map .microregion{stroke-width:100;stroke-linecap:round;stroke-linejoin:round;stroke:red;fill:#0000;stroke:var(--state-map-stroke-microregion);cursor:pointer;fill-opacity:.4;transition:fill .3s ease-out} .map-wrapper.state-map .microregion:not(.disabled):hover{fill:var(--state-map-fill-hover)} .map-wrapper.state-map .ghost-mesoregion, .map-wrapper.state-map .mesoregion{stroke-width:400;stroke-linecap:round;stroke-linejoin:round;stroke:#1f1a17;stroke:var(--state-map-stroke-mesoregion);fill:#0000;cursor:pointer;fill-opacity:.4;transition:fill .3s ease-out} .map-wrapper.state-map .ghost-mesoregion:not(.disabled):hover, .map-wrapper.state-map .mesoregion:not(.disabled):hover{fill:var(--state-map-fill-hover)} .map-wrapper.state-map .disabled #municipalities path, .map-wrapper.state-map .mesoregion.disabled, .map-wrapper.state-map .microregion.disabled, .map-wrapper.state-map .municipy.disabled{fill:var(--state-map-fill-disabled);cursor:not-allowed}"]}),t})();var C,V=i(4689),L=i(1723),P=i(1840),A=i(4884),M=i(2935),N=i(7723),j=i(7064),H=i(4232);!function(t){t.clone=function(t){return JSON.parse(JSON.stringify(t))}}(C||(C={}));var R=i(2503),I=(i(3326),i(2069)),Z=i(2057);const B=["tooltipTemplate"],F=["leftOuterSelectionBar"],D=["rightOuterSelectionBar"],U=["fullBar"],q=["selectionBar"],z=["minHandle"],Y=["maxHandle"],G=["floorLabel"],J=["ceilLabel"],Q=["minHandleLabel"],$=["maxHandleLabel"],W=["combinedLabel"],K=["ticksElement"];function X(t,e){if(1&t&&l._UZ(0,"ng5-slider-tooltip-wrapper",31),2&t){const t=l.oxw().$implicit,e=l.oxw();l.Q6J("template",e.tooltipTemplate)("tooltip",t.valueTooltip)("placement",t.valueTooltipPlacement)("content",t.value)}}function tt(t,e){if(1&t&&l._UZ(0,"span",32),2&t){const t=l.oxw().$implicit;l.Q6J("innerHTML",t.legend,l.oJD)}}const et=function(t){return{"ng5-slider-selected":t}};function it(t,e){if(1&t&&(l.TgZ(0,"span",27),l._UZ(1,"ng5-slider-tooltip-wrapper",28),l.YNc(2,X,1,4,"ng5-slider-tooltip-wrapper",29),l.YNc(3,tt,1,1,"span",30),l.qZA()),2&t){const t=e.$implicit,i=l.oxw();l.Q6J("ngClass",l.VKq(7,et,t.selected))("ngStyle",t.style),l.xp6(1),l.Q6J("template",i.tooltipTemplate)("tooltip",t.tooltip)("placement",t.tooltipPlacement),l.xp6(1),l.Q6J("ngIf",null!=t.value),l.xp6(1),l.Q6J("ngIf",null!=t.legend)}}function nt(t,e){}function rt(t,e){1&t&&l.YNc(0,nt,0,0,"ng-template")}const st=function(t,e,i){return{tooltip:t,placement:e,content:i}};function ot(t,e){if(1&t&&(l.ynx(0),l.YNc(1,rt,1,0,void 0,1),l.BQk()),2&t){const t=l.oxw();l.xp6(1),l.Q6J("ngTemplateOutlet",t.template)("ngTemplateOutletContext",l.kEZ(2,st,t.tooltip,t.placement,t.content))}}function at(t,e){if(1&t&&(l.ynx(0),l.TgZ(1,"div",2),l._uU(2),l.qZA(),l.BQk()),2&t){const t=l.oxw();l.xp6(1),l.uIk("title",t.tooltip)("data-tooltip-placement",t.placement),l.xp6(1),l.hij(" ",t.content," ")}}const lt={Min:0,Max:1};lt[lt.Min]="Min",lt[lt.Max]="Max";const ct={Low:0,High:1,Floor:2,Ceil:3,TickValue:4};ct[ct.Low]="Low",ct[ct.High]="High",ct[ct.Floor]="Floor",ct[ct.Ceil]="Ceil",ct[ct.TickValue]="TickValue";class ut{constructor(){this.floor=0,this.ceil=null,this.step=1,this.minRange=null,this.maxRange=null,this.pushRange=!1,this.minLimit=null,this.maxLimit=null,this.translate=null,this.combineLabels=null,this.getLegend=null,this.stepsArray=null,this.bindIndexForStepsArray=!1,this.draggableRange=!1,this.draggableRangeOnly=!1,this.showSelectionBar=!1,this.showSelectionBarEnd=!1,this.showSelectionBarFromValue=null,this.showOuterSelectionBars=!1,this.hidePointerLabels=!1,this.hideLimitLabels=!1,this.autoHideLimitLabels=!0,this.readOnly=!1,this.disabled=!1,this.mouseEventsInterval=50,this.touchEventsInterval=50,this.inputEventsInterval=100,this.outputEventsInterval=100,this.showTicks=!1,this.showTicksValues=!1,this.tickStep=null,this.tickValueStep=1,this.ticksArray=null,this.ticksTooltip=null,this.ticksValuesTooltip=null,this.vertical=!1,this.getSelectionBarColor=null,this.getTickColor=null,this.getPointerColor=null,this.keyboardSupport=!0,this.scale=1,this.enforceStep=!0,this.enforceRange=!0,this.noSwitching=!1,this.onlyBindHandles=!1,this.rightToLeft=!1,this.reversedControls=!1,this.boundPointerLabels=!0,this.logScale=!1,this.customValueToPosition=null,this.customPositionToValue=null,this.precisionLimit=12,this.selectionBarGradient=null,this.ariaLabel=null,this.ariaLabelledBy=null,this.ariaLabelHigh=null,this.ariaLabelledByHigh=null,this.handleDimension=null,this.barDimension=null,this.animate=!0}}class ht{}class pt{static isNullOrUndefined(t){return null==t}static linearValueToPosition(t,e,i){return(t-e)/(i-e)}static logValueToPosition(t,e,i){return((t=Math.log(t))-(e=Math.log(e)))/((i=Math.log(i))-e)}static linearPositionToValue(t,e,i){return t*(i-e)+e}static logPositionToValue(t,e,i){return e=Math.log(e),i=Math.log(i),Math.exp(t*(i-e)+e)}static findStepIndex(t,e){const i=e.map(e=>Math.abs(t-e.value));let n=0;for(let r=0;r<e.length;r++)i[r]!==i[n]&&i[r]<i[n]&&(n=r);return n}}class dt{static isTouchEvent(t){return void 0!==window.TouchEvent?t instanceof TouchEvent:void 0!==t.touches}static isResizeObserverAvailable(){return void 0!==window.ResizeObserver}}class ft{static roundToPrecisionLimit(t,e){return+t.toPrecision(e)}static clampToRange(t,e,i){return Math.min(Math.max(t,e),i)}}class bt{constructor(){this.eventName=null,this.events=null,this.eventsSubscription=null,this.teardownCallback=null}}class mt{constructor(t){this.renderer=t}attachPassiveEventListener(t,e,i,n){if(!0!==Z.Z.hasSupport)return this.attachEventListener(t,e,i,n);const r=new bt;r.eventName=e,r.events=new R.Subject;const s=t=>{r.events.next(t)};return t.addEventListener(e,s,{passive:!0,capture:!1}),r.teardownCallback=()=>{t.removeEventListener(e,s,{passive:!0,capture:!1})},r.eventsSubscription=r.events.pipe(pt.isNullOrUndefined(n)?(0,I.bw)(()=>{}):(0,I.pO)(n,void 0,{leading:!0,trailing:!0})).subscribe(t=>{i(t)}),r}detachEventListener(t){pt.isNullOrUndefined(t.eventsSubscription)||(t.eventsSubscription.unsubscribe(),t.eventsSubscription=null),pt.isNullOrUndefined(t.events)||(t.events.complete(),t.events=null),pt.isNullOrUndefined(t.teardownCallback)||(t.teardownCallback(),t.teardownCallback=null)}attachEventListener(t,e,i,n){const r=new bt;return r.eventName=e,r.events=new R.Subject,r.teardownCallback=this.renderer.listen(t,e,t=>{r.events.next(t)}),r.eventsSubscription=r.events.pipe(pt.isNullOrUndefined(n)?(0,I.bw)(()=>{}):(0,I.pO)(n,void 0,{leading:!0,trailing:!0})).subscribe(t=>{i(t)}),r}}let vt=(()=>{class t{constructor(t,e){this.elemRef=t,this.renderer=e,this._position=0,this._dimension=0,this._alwaysHide=!1,this._vertical=!1,this._scale=1,this.opacity=1,this.visibility="visible",this.left="",this.bottom="",this.height="",this.width="",this.eventListeners=[],this.eventListenerHelper=new mt(this.renderer)}get position(){return this._position}get dimension(){return this._dimension}get alwaysHide(){return this._alwaysHide}get vertical(){return this._vertical}get scale(){return this._scale}setAlwaysHide(t){this._alwaysHide=t,this.visibility=t?"hidden":"visible"}hide(){this.opacity=0}show(){this.alwaysHide||(this.opacity=1)}isVisible(){return!this.alwaysHide&&0!==this.opacity}setVertical(t){this._vertical=t,this._vertical?(this.left="",this.width=""):(this.bottom="",this.height="")}setScale(t){this._scale=t}setPosition(t){this._position=t,this._vertical?this.bottom=Math.round(t)+"px":this.left=Math.round(t)+"px"}calculateDimension(){const t=this.getBoundingClientRect();this._dimension=this.vertical?(t.bottom-t.top)*this.scale:(t.right-t.left)*this.scale}setDimension(t){this._dimension=t,this._vertical?this.height=Math.round(t)+"px":this.width=Math.round(t)+"px"}getBoundingClientRect(){return this.elemRef.nativeElement.getBoundingClientRect()}on(t,e,i){const n=this.eventListenerHelper.attachEventListener(this.elemRef.nativeElement,t,e,i);this.eventListeners.push(n)}onPassive(t,e,i){const n=this.eventListenerHelper.attachPassiveEventListener(this.elemRef.nativeElement,t,e,i);this.eventListeners.push(n)}off(t){let e,i;pt.isNullOrUndefined(t)?(e=[],i=this.eventListeners):(e=this.eventListeners.filter(e=>e.eventName!==t),i=this.eventListeners.filter(e=>e.eventName===t));for(const n of i)this.eventListenerHelper.detachEventListener(n);this.eventListeners=e}}return t.\u0275fac=function(e){return new(e||t)(l.Y36(l.SBq),l.Y36(l.Qsj))},t.\u0275dir=l.lG2({type:t,selectors:[["","ng5SliderElement",""]],hostVars:12,hostBindings:function(t,e){2&t&&l.Udp("opacity",e.opacity)("visibility",e.visibility)("left",e.left)("bottom",e.bottom)("height",e.height)("width",e.width)}}),t})(),gt=(()=>{class t extends vt{constructor(t,e){super(t,e),this.active=!1,this.role="",this.tabindex="",this.ariaOrientation="",this.ariaLabel="",this.ariaLabelledBy="",this.ariaValueNow="",this.ariaValueText="",this.ariaValueMin="",this.ariaValueMax=""}focus(){this.elemRef.nativeElement.focus()}}return t.\u0275fac=function(e){return new(e||t)(l.Y36(l.SBq),l.Y36(l.Qsj))},t.\u0275dir=l.lG2({type:t,selectors:[["","ng5SliderHandle",""]],hostVars:11,hostBindings:function(t,e){2&t&&(l.uIk("role",e.role)("tabindex",e.tabindex)("aria-orientation",e.ariaOrientation)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-valuenow",e.ariaValueNow)("aria-valuetext",e.ariaValueText)("aria-valuemin",e.ariaValueMin)("aria-valuemax",e.ariaValueMax),l.ekj("ng5-slider-active",e.active))},features:[l.qOj]}),t})(),yt=(()=>{class t extends vt{constructor(t,e){super(t,e),this._value=null}get value(){return this._value}setValue(t){let e=!1;!this.alwaysHide&&(pt.isNullOrUndefined(this.value)||this.value.length!==t.length||this.value.length>0&&0===this.dimension)&&(e=!0),this._value=t,this.elemRef.nativeElement.innerHTML=t,e&&this.calculateDimension()}}return t.\u0275fac=function(e){return new(e||t)(l.Y36(l.SBq),l.Y36(l.Qsj))},t.\u0275dir=l.lG2({type:t,selectors:[["","ng5SliderLabel",""]],features:[l.qOj]}),t})();class wt{constructor(){this.selected=!1,this.style={},this.tooltip=null,this.tooltipPlacement=null,this.value=null,this.valueTooltip=null,this.valueTooltipPlacement=null,this.legend=null}}class xt{constructor(){this.active=!1,this.value=0,this.difference=0,this.position=0,this.lowLimit=0,this.highLimit=0}}class Ot{static compare(t,e){return!(pt.isNullOrUndefined(t)&&pt.isNullOrUndefined(e)||pt.isNullOrUndefined(t)!==pt.isNullOrUndefined(e)||t.value!==e.value||t.highValue!==e.highValue)}}class St extends Ot{static compare(t,e){return!(pt.isNullOrUndefined(t)&&pt.isNullOrUndefined(e)||pt.isNullOrUndefined(t)!==pt.isNullOrUndefined(e)||t.value!==e.value||t.highValue!==e.highValue||t.forceChange!==e.forceChange)}}const _t={provide:d.JU,useExisting:(0,l.Gpc)(()=>kt),multi:!0};let kt=(()=>{class t{constructor(t,e,i,n){this.renderer=t,this.elementRef=e,this.changeDetectionRef=i,this.zone=n,this.value=null,this.valueChange=new l.vpe,this.highValue=null,this.highValueChange=new l.vpe,this.options=new ut,this.userChangeStart=new l.vpe,this.userChange=new l.vpe,this.userChangeEnd=new l.vpe,this.initHasRun=!1,this.inputModelChangeSubject=new R.Subject,this.inputModelChangeSubscription=null,this.outputModelChangeSubject=new R.Subject,this.outputModelChangeSubscription=null,this.viewLowValue=null,this.viewHighValue=null,this.viewOptions=new ut,this.handleHalfDimension=0,this.maxHandlePosition=0,this.currentTrackingPointer=null,this.currentFocusPointer=null,this.firstKeyDown=!1,this.touchId=null,this.dragging=new xt,this.sliderElementVerticalClass=!1,this.sliderElementAnimateClass=!1,this.sliderElementDisabledAttr=null,this.barStyle={},this.minPointerStyle={},this.maxPointerStyle={},this.fullBarTransparentClass=!1,this.selectionBarDraggableClass=!1,this.ticksUnderValuesClass=!1,this.intermediateTicks=!1,this.ticks=[],this.eventListenerHelper=null,this.onMoveEventListener=null,this.onEndEventListener=null,this.resizeObserver=null,this.onTouchedCallback=null,this.onChangeCallback=null,this.eventListenerHelper=new mt(this.renderer)}set manualRefresh(t){this.unsubscribeManualRefresh(),this.manualRefreshSubscription=t.subscribe(()=>{setTimeout(()=>this.calculateViewDimensionsAndDetectChanges())})}set triggerFocus(t){this.unsubscribeTriggerFocus(),this.triggerFocusSubscription=t.subscribe(t=>{this.focusPointer(t)})}get range(){return!pt.isNullOrUndefined(this.value)&&!pt.isNullOrUndefined(this.highValue)}get showTicks(){return this.viewOptions.showTicks}ngOnInit(){this.viewOptions=new ut,Object.assign(this.viewOptions,this.options),this.updateDisabledState(),this.updateVerticalState()}ngAfterViewInit(){this.applyOptions(),this.subscribeInputModelChangeSubject(this.viewOptions.inputEventsInterval),this.subscribeOutputModelChangeSubject(this.viewOptions.outputEventsInterval),this.renormaliseModelValues(),this.viewLowValue=this.modelValueToViewValue(this.value),this.viewHighValue=this.range?this.modelValueToViewValue(this.highValue):null,this.updateVerticalState(),this.manageElementsStyle(),this.updateDisabledState(),this.calculateViewDimensions(),this.addAccessibility(),this.updateCeilLabel(),this.updateFloorLabel(),this.initHandles(),this.manageEventsBindings(),this.subscribeResizeObserver(),this.initHasRun=!0,this.changeDetectionRef.detectChanges()}ngOnChanges(t){pt.isNullOrUndefined(t.options)||this.onChangeOptions(),pt.isNullOrUndefined(t.value)&&pt.isNullOrUndefined(t.highValue)||this.inputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!1,internalChange:!1})}ngOnDestroy(){this.unbindEvents(),this.unsubscribeResizeObserver(),this.unsubscribeInputModelChangeSubject(),this.unsubscribeOutputModelChangeSubject(),this.unsubscribeManualRefresh(),this.unsubscribeTriggerFocus()}writeValue(t){t instanceof Array?(this.value=t[0],this.highValue=t[1]):this.value=t,this.inputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!1,internalChange:!1})}registerOnChange(t){this.onChangeCallback=t}registerOnTouched(t){this.onTouchedCallback=t}setDisabledState(t){this.viewOptions.disabled=t,this.updateDisabledState()}onResize(t){this.calculateViewDimensionsAndDetectChanges()}subscribeInputModelChangeSubject(t){this.inputModelChangeSubscription=this.inputModelChangeSubject.pipe((0,I.xb)(St.compare),(0,I.hX)(t=>!t.forceChange&&!t.internalChange),pt.isNullOrUndefined(t)?(0,I.bw)(()=>{}):(0,I.pO)(t,void 0,{leading:!0,trailing:!0})).subscribe(t=>this.applyInputModelChange(t))}subscribeOutputModelChangeSubject(t){this.outputModelChangeSubscription=this.outputModelChangeSubject.pipe((0,I.xb)(St.compare),pt.isNullOrUndefined(t)?(0,I.bw)(()=>{}):(0,I.pO)(t,void 0,{leading:!0,trailing:!0})).subscribe(t=>this.publishOutputModelChange(t))}subscribeResizeObserver(){dt.isResizeObserverAvailable()&&(this.resizeObserver=new ResizeObserver(()=>this.calculateViewDimensionsAndDetectChanges()),this.resizeObserver.observe(this.elementRef.nativeElement))}unsubscribeResizeObserver(){dt.isResizeObserverAvailable()&&null!==this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}unsubscribeOnMove(){pt.isNullOrUndefined(this.onMoveEventListener)||(this.eventListenerHelper.detachEventListener(this.onMoveEventListener),this.onMoveEventListener=null)}unsubscribeOnEnd(){pt.isNullOrUndefined(this.onEndEventListener)||(this.eventListenerHelper.detachEventListener(this.onEndEventListener),this.onEndEventListener=null)}unsubscribeInputModelChangeSubject(){pt.isNullOrUndefined(this.inputModelChangeSubscription)||(this.inputModelChangeSubscription.unsubscribe(),this.inputModelChangeSubscription=null)}unsubscribeOutputModelChangeSubject(){pt.isNullOrUndefined(this.outputModelChangeSubscription)||(this.outputModelChangeSubscription.unsubscribe(),this.outputModelChangeSubscription=null)}unsubscribeManualRefresh(){pt.isNullOrUndefined(this.manualRefreshSubscription)||(this.manualRefreshSubscription.unsubscribe(),this.manualRefreshSubscription=null)}unsubscribeTriggerFocus(){pt.isNullOrUndefined(this.triggerFocusSubscription)||(this.triggerFocusSubscription.unsubscribe(),this.triggerFocusSubscription=null)}getPointerElement(t){return t===lt.Min?this.minHandleElement:t===lt.Max?this.maxHandleElement:null}getCurrentTrackingValue(){return this.currentTrackingPointer===lt.Min?this.viewLowValue:this.currentTrackingPointer===lt.Max?this.viewHighValue:null}modelValueToViewValue(t){return pt.isNullOrUndefined(t)?NaN:pt.isNullOrUndefined(this.viewOptions.stepsArray)||this.viewOptions.bindIndexForStepsArray?+t:pt.findStepIndex(+t,this.viewOptions.stepsArray)}viewValueToModelValue(t){return pt.isNullOrUndefined(this.viewOptions.stepsArray)||this.viewOptions.bindIndexForStepsArray?t:this.getStepValue(t)}getStepValue(t){const e=this.viewOptions.stepsArray[t];return pt.isNullOrUndefined(e)?NaN:e.value}applyViewChange(){this.value=this.viewValueToModelValue(this.viewLowValue),this.range&&(this.highValue=this.viewValueToModelValue(this.viewHighValue)),this.outputModelChangeSubject.next({value:this.value,highValue:this.highValue,userEventInitiated:!0,forceChange:!1}),this.inputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!1,internalChange:!0})}applyInputModelChange(t){const e=this.normaliseModelValues(t),i=!Ot.compare(t,e);i&&(this.value=e.value,this.highValue=e.highValue),this.viewLowValue=this.modelValueToViewValue(e.value),this.viewHighValue=this.range?this.modelValueToViewValue(e.highValue):null,this.updateLowHandle(this.valueToPosition(this.viewLowValue)),this.range&&this.updateHighHandle(this.valueToPosition(this.viewHighValue)),this.updateSelectionBar(),this.updateTicksScale(),this.updateAriaAttributes(),this.range&&this.updateCombinedLabel(),this.outputModelChangeSubject.next({value:e.value,highValue:e.highValue,forceChange:i,userEventInitiated:!1})}publishOutputModelChange(t){const e=()=>{this.valueChange.emit(t.value),this.range&&this.highValueChange.emit(t.highValue),pt.isNullOrUndefined(this.onChangeCallback)||this.onChangeCallback(this.range?[t.value,t.highValue]:t.value),pt.isNullOrUndefined(this.onTouchedCallback)||this.onTouchedCallback(this.range?[t.value,t.highValue]:t.value)};t.userEventInitiated?(e(),this.userChange.emit(this.getChangeContext())):setTimeout(()=>{e()})}normaliseModelValues(t){const e=new Ot;if(e.value=t.value,e.highValue=t.highValue,this.viewOptions.enforceStep&&(e.value=this.roundStep(e.value),this.range&&(e.highValue=this.roundStep(e.highValue))),!pt.isNullOrUndefined(this.viewOptions.stepsArray)||!this.viewOptions.enforceRange)return e;if(e.value=ft.clampToRange(e.value,this.viewOptions.floor,this.viewOptions.ceil),this.range&&(e.highValue=ft.clampToRange(e.highValue,this.viewOptions.floor,this.viewOptions.ceil)),this.range&&t.value>t.highValue)if(this.viewOptions.noSwitching)e.value=e.highValue;else{const i=t.value;e.value=t.highValue,e.highValue=i}return e}renormaliseModelValues(){const t={value:this.value,highValue:this.highValue},e=this.normaliseModelValues(t);Ot.compare(e,t)||(this.value=e.value,this.highValue=e.highValue,this.outputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!0,userEventInitiated:!1}))}onChangeOptions(){if(!this.initHasRun)return;const t=this.viewOptions.inputEventsInterval,e=this.viewOptions.outputEventsInterval;this.applyOptions(),t!==this.viewOptions.inputEventsInterval&&(this.unsubscribeInputModelChangeSubject(),this.subscribeInputModelChangeSubject(this.viewOptions.inputEventsInterval)),e!==this.viewOptions.outputEventsInterval&&(this.unsubscribeInputModelChangeSubject(),this.subscribeInputModelChangeSubject(this.viewOptions.outputEventsInterval)),this.renormaliseModelValues(),this.viewLowValue=this.modelValueToViewValue(this.value),this.viewHighValue=this.range?this.modelValueToViewValue(this.highValue):null,this.resetSlider()}applyOptions(){if(this.viewOptions=new ut,Object.assign(this.viewOptions,this.options),this.viewOptions.draggableRange=this.range&&this.viewOptions.draggableRange,this.viewOptions.draggableRangeOnly=this.range&&this.viewOptions.draggableRangeOnly,this.viewOptions.draggableRangeOnly&&(this.viewOptions.draggableRange=!0),this.viewOptions.showTicks=this.viewOptions.showTicks||this.viewOptions.showTicksValues||!pt.isNullOrUndefined(this.viewOptions.ticksArray),!this.viewOptions.showTicks||pt.isNullOrUndefined(this.viewOptions.tickStep)&&pt.isNullOrUndefined(this.viewOptions.ticksArray)||(this.intermediateTicks=!0),this.viewOptions.showSelectionBar=this.viewOptions.showSelectionBar||this.viewOptions.showSelectionBarEnd||!pt.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue),pt.isNullOrUndefined(this.viewOptions.stepsArray)?this.applyFloorCeilOptions():this.applyStepsArrayOptions(),pt.isNullOrUndefined(this.viewOptions.combineLabels)&&(this.viewOptions.combineLabels=(t,e)=>t+" - "+e),this.viewOptions.logScale&&0===this.viewOptions.floor)throw Error("Can't use floor=0 with logarithmic scale")}applyStepsArrayOptions(){this.viewOptions.floor=0,this.viewOptions.ceil=this.viewOptions.stepsArray.length-1,this.viewOptions.step=1,pt.isNullOrUndefined(this.viewOptions.translate)&&(this.viewOptions.translate=t=>String(this.viewOptions.bindIndexForStepsArray?this.getStepValue(t):t)),this.viewOptions.getLegend=t=>this.viewOptions.stepsArray[t].legend}applyFloorCeilOptions(){if(pt.isNullOrUndefined(this.viewOptions.step)?this.viewOptions.step=1:(this.viewOptions.step=+this.viewOptions.step,this.viewOptions.step<=0&&(this.viewOptions.step=1)),pt.isNullOrUndefined(this.viewOptions.ceil)||pt.isNullOrUndefined(this.viewOptions.floor))throw Error("floor and ceil options must be supplied");this.viewOptions.ceil=+this.viewOptions.ceil,this.viewOptions.floor=+this.viewOptions.floor,pt.isNullOrUndefined(this.viewOptions.translate)&&(this.viewOptions.translate=t=>String(t))}resetSlider(){this.manageElementsStyle(),this.addAccessibility(),this.updateCeilLabel(),this.updateFloorLabel(),this.unbindEvents(),this.manageEventsBindings(),this.updateDisabledState(),this.calculateViewDimensions(),this.refocusPointerIfNeeded()}focusPointer(t){t!==lt.Min&&t!==lt.Max&&(t=lt.Min),t===lt.Min?this.minHandleElement.focus():this.range&&t===lt.Max&&this.maxHandleElement.focus()}refocusPointerIfNeeded(){pt.isNullOrUndefined(this.currentFocusPointer)||(this.onPointerFocus(this.currentFocusPointer),this.getPointerElement(this.currentFocusPointer).focus())}manageElementsStyle(){this.updateScale(),this.floorLabelElement.setAlwaysHide(this.viewOptions.showTicksValues||this.viewOptions.hideLimitLabels),this.ceilLabelElement.setAlwaysHide(this.viewOptions.showTicksValues||this.viewOptions.hideLimitLabels);const t=this.viewOptions.showTicksValues&&!this.intermediateTicks;this.minHandleLabelElement.setAlwaysHide(t||this.viewOptions.hidePointerLabels),this.maxHandleLabelElement.setAlwaysHide(t||!this.range||this.viewOptions.hidePointerLabels),this.combinedLabelElement.setAlwaysHide(t||!this.range||this.viewOptions.hidePointerLabels),this.selectionBarElement.setAlwaysHide(!this.range&&!this.viewOptions.showSelectionBar),this.leftOuterSelectionBarElement.setAlwaysHide(!this.range||!this.viewOptions.showOuterSelectionBars),this.rightOuterSelectionBarElement.setAlwaysHide(!this.range||!this.viewOptions.showOuterSelectionBars),this.fullBarTransparentClass=this.range&&this.viewOptions.showOuterSelectionBars,this.selectionBarDraggableClass=this.viewOptions.draggableRange&&!this.viewOptions.onlyBindHandles,this.ticksUnderValuesClass=this.intermediateTicks&&this.options.showTicksValues,this.sliderElementVerticalClass!==this.viewOptions.vertical&&(this.updateVerticalState(),setTimeout(()=>{this.resetSlider()})),this.sliderElementAnimateClass!==this.viewOptions.animate&&setTimeout(()=>{this.sliderElementAnimateClass=this.viewOptions.animate})}manageEventsBindings(){this.viewOptions.disabled||this.viewOptions.readOnly?this.unbindEvents():this.bindEvents()}updateDisabledState(){this.sliderElementDisabledAttr=this.viewOptions.disabled?"disabled":null}updateVerticalState(){this.sliderElementVerticalClass=this.viewOptions.vertical;for(const t of this.getAllSliderElements())pt.isNullOrUndefined(t)||t.setVertical(this.viewOptions.vertical)}updateScale(){for(const t of this.getAllSliderElements())t.setScale(this.viewOptions.scale)}getAllSliderElements(){return[this.leftOuterSelectionBarElement,this.rightOuterSelectionBarElement,this.fullBarElement,this.selectionBarElement,this.minHandleElement,this.maxHandleElement,this.floorLabelElement,this.ceilLabelElement,this.minHandleLabelElement,this.maxHandleLabelElement,this.combinedLabelElement,this.ticksElement]}initHandles(){this.updateLowHandle(this.valueToPosition(this.viewLowValue)),this.range&&this.updateHighHandle(this.valueToPosition(this.viewHighValue)),this.updateSelectionBar(),this.range&&this.updateCombinedLabel(),this.updateTicksScale()}addAccessibility(){this.updateAriaAttributes(),this.minHandleElement.role="slider",this.minHandleElement.tabindex=!this.viewOptions.keyboardSupport||this.viewOptions.readOnly||this.viewOptions.disabled?"":"0",this.viewOptions.vertical&&(this.minHandleElement.ariaOrientation="vertical"),pt.isNullOrUndefined(this.viewOptions.ariaLabel)?pt.isNullOrUndefined(this.viewOptions.ariaLabelledBy)||(this.minHandleElement.ariaLabelledBy=this.viewOptions.ariaLabelledBy):this.minHandleElement.ariaLabel=this.viewOptions.ariaLabel,this.range&&(this.maxHandleElement.role="slider",this.maxHandleElement.tabindex=!this.viewOptions.keyboardSupport||this.viewOptions.readOnly||this.viewOptions.disabled?"":"0",this.maxHandleElement.ariaOrientation=this.viewOptions.vertical?"vertical":"horizontal",pt.isNullOrUndefined(this.viewOptions.ariaLabelHigh)?pt.isNullOrUndefined(this.viewOptions.ariaLabelledByHigh)||(this.maxHandleElement.ariaLabelledBy=this.viewOptions.ariaLabelledByHigh):this.maxHandleElement.ariaLabel=this.viewOptions.ariaLabelHigh)}updateAriaAttributes(){this.minHandleElement.ariaValueNow=(+this.value).toString(),this.minHandleElement.ariaValueText=this.viewOptions.translate(+this.value,ct.Low),this.minHandleElement.ariaValueMin=this.viewOptions.floor.toString(),this.minHandleElement.ariaValueMax=this.viewOptions.ceil.toString(),this.range&&(this.maxHandleElement.ariaValueNow=(+this.highValue).toString(),this.maxHandleElement.ariaValueText=this.viewOptions.translate(+this.highValue,ct.High),this.maxHandleElement.ariaValueMin=this.viewOptions.floor.toString(),this.maxHandleElement.ariaValueMax=this.viewOptions.ceil.toString())}calculateViewDimensions(){pt.isNullOrUndefined(this.viewOptions.handleDimension)?this.minHandleElement.calculateDimension():this.minHandleElement.setDimension(this.viewOptions.handleDimension);const t=this.minHandleElement.dimension;this.handleHalfDimension=t/2,pt.isNullOrUndefined(this.viewOptions.barDimension)?this.fullBarElement.calculateDimension():this.fullBarElement.setDimension(this.viewOptions.barDimension),this.maxHandlePosition=this.fullBarElement.dimension-t,this.initHasRun&&(this.updateFloorLabel(),this.updateCeilLabel(),this.initHandles())}calculateViewDimensionsAndDetectChanges(){this.calculateViewDimensions(),this.changeDetectionRef.detectChanges()}updateTicksScale(){if(!this.viewOptions.showTicks)return;const t=pt.isNullOrUndefined(this.viewOptions.ticksArray)?this.getTicksArray():this.viewOptions.ticksArray,e=this.viewOptions.vertical?"translateY":"translateX";this.viewOptions.rightToLeft&&t.reverse();const i=t.map(t=>{let i=this.valueToPosition(t);this.viewOptions.vertical&&(i=this.maxHandlePosition-i);const n=e+"("+Math.round(i)+"px)",r=new wt;if(r.selected=this.isTickSelected(t),r.style={"-webkit-transform":n,"-moz-transform":n,"-o-transform":n,"-ms-transform":n,transform:n},r.selected&&!pt.isNullOrUndefined(this.viewOptions.getSelectionBarColor)&&(r.style["background-color"]=this.getSelectionBarColor()),r.selected||pt.isNullOrUndefined(this.viewOptions.getTickColor)||(r.style["background-color"]=this.getTickColor(t)),pt.isNullOrUndefined(this.viewOptions.ticksTooltip)||(r.tooltip=this.viewOptions.ticksTooltip(t),r.tooltipPlacement=this.viewOptions.vertical?"right":"top"),this.viewOptions.showTicksValues&&t%this.viewOptions.tickValueStep==0&&(r.value=this.getDisplayValue(t,ct.TickValue),pt.isNullOrUndefined(this.viewOptions.ticksValuesTooltip)||(r.valueTooltip=this.viewOptions.ticksValuesTooltip(t),r.valueTooltipPlacement=this.viewOptions.vertical?"right":"top")),!pt.isNullOrUndefined(this.viewOptions.getLegend)){const e=this.viewOptions.getLegend(t);pt.isNullOrUndefined(e)||(r.legend=e)}return r});if(pt.isNullOrUndefined(this.ticks)||this.ticks.length!==i.length)this.ticks=i;else for(let n=0;n<i.length;++n)Object.assign(this.ticks[n],i[n]);this.changeDetectionRef.detectChanges()}getTicksArray(){const t=pt.isNullOrUndefined(this.viewOptions.tickStep)?this.viewOptions.step:this.viewOptions.tickStep,e=[];for(let i=this.viewOptions.floor;i<=this.viewOptions.ceil;i+=t)e.push(i);return e}isTickSelected(t){if(!this.range)if(pt.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue)){if(this.viewOptions.showSelectionBarEnd){if(t>=this.viewLowValue)return!0}else if(this.viewOptions.showSelectionBar&&t<=this.viewLowValue)return!0}else{const e=this.viewOptions.showSelectionBarFromValue;if(this.viewLowValue>e&&t>=e&&t<=this.viewLowValue)return!0;if(this.viewLowValue<e&&t<=e&&t>=this.viewLowValue)return!0}return!!(this.range&&t>=this.viewLowValue&&t<=this.viewHighValue)}updateFloorLabel(){this.floorLabelElement.alwaysHide||(this.floorLabelElement.setValue(this.getDisplayValue(this.viewOptions.floor,ct.Floor)),this.floorLabelElement.calculateDimension(),this.floorLabelElement.setPosition(this.viewOptions.rightToLeft?this.fullBarElement.dimension-this.floorLabelElement.dimension:0))}updateCeilLabel(){this.ceilLabelElement.alwaysHide||(this.ceilLabelElement.setValue(this.getDisplayValue(this.viewOptions.ceil,ct.Ceil)),this.ceilLabelElement.calculateDimension(),this.ceilLabelElement.setPosition(this.viewOptions.rightToLeft?0:this.fullBarElement.dimension-this.ceilLabelElement.dimension))}updateHandles(t,e){t===lt.Min?this.updateLowHandle(e):t===lt.Max&&this.updateHighHandle(e),this.updateSelectionBar(),this.updateTicksScale(),this.range&&this.updateCombinedLabel()}getHandleLabelPos(t,e){const i=t===lt.Min?this.minHandleLabelElement.dimension:this.maxHandleLabelElement.dimension,n=e-i/2+this.handleHalfDimension,r=this.fullBarElement.dimension-i;return this.viewOptions.boundPointerLabels?this.viewOptions.rightToLeft&&t===lt.Min||!this.viewOptions.rightToLeft&&t===lt.Max?Math.min(n,r):Math.min(Math.max(n,0),r):n}updateLowHandle(t){this.minHandleElement.setPosition(t),this.minHandleLabelElement.setValue(this.getDisplayValue(this.viewLowValue,ct.Low)),this.minHandleLabelElement.setPosition(this.getHandleLabelPos(lt.Min,t)),pt.isNullOrUndefined(this.viewOptions.getPointerColor)||(this.minPointerStyle={backgroundColor:this.getPointerColor(lt.Min)}),this.viewOptions.autoHideLimitLabels&&this.updateFloorAndCeilLabelsVisibility()}updateHighHandle(t){this.maxHandleElement.setPosition(t),this.maxHandleLabelElement.setValue(this.getDisplayValue(this.viewHighValue,ct.High)),this.maxHandleLabelElement.setPosition(this.getHandleLabelPos(lt.Max,t)),pt.isNullOrUndefined(this.viewOptions.getPointerColor)||(this.maxPointerStyle={backgroundColor:this.getPointerColor(lt.Max)}),this.viewOptions.autoHideLimitLabels&&this.updateFloorAndCeilLabelsVisibility()}updateFloorAndCeilLabelsVisibility(){if(this.viewOptions.hidePointerLabels)return;let t=!1,e=!1;const i=this.isLabelBelowFloorLabel(this.minHandleLabelElement),n=this.isLabelAboveCeilLabel(this.minHandleLabelElement),r=this.isLabelAboveCeilLabel(this.maxHandleLabelElement),s=this.isLabelBelowFloorLabel(this.combinedLabelElement),o=this.isLabelAboveCeilLabel(this.combinedLabelElement);if(i?(t=!0,this.floorLabelElement.hide()):(t=!1,this.floorLabelElement.show()),n?(e=!0,this.ceilLabelElement.hide()):(e=!1,this.ceilLabelElement.show()),this.range){const n=this.combinedLabelElement.isVisible()?o:r,a=this.combinedLabelElement.isVisible()?s:i;n?this.ceilLabelElement.hide():e||this.ceilLabelElement.show(),a?this.floorLabelElement.hide():t||this.floorLabelElement.show()}}isLabelBelowFloorLabel(t){const e=t.position,i=this.floorLabelElement.position;return this.viewOptions.rightToLeft?e+t.dimension>=i-2:e<=i+this.floorLabelElement.dimension+2}isLabelAboveCeilLabel(t){const e=t.position,i=this.ceilLabelElement.position;return this.viewOptions.rightToLeft?e<=i+this.ceilLabelElement.dimension+2:e+t.dimension>=i-2}updateSelectionBar(){let t=0,e=0;const i=this.viewOptions.rightToLeft?!this.viewOptions.showSelectionBarEnd:this.viewOptions.showSelectionBarEnd,n=this.viewOptions.rightToLeft?this.maxHandleElement.position+this.handleHalfDimension:this.minHandleElement.position+this.handleHalfDimension;if(this.range)e=Math.abs(this.maxHandleElement.position-this.minHandleElement.position),t=n;else if(pt.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue))i?(e=Math.ceil(Math.abs(this.maxHandlePosition-this.minHandleElement.position)+this.handleHalfDimension),t=Math.floor(this.minHandleElement.position+this.handleHalfDimension)):(e=this.minHandleElement.position+this.handleHalfDimension,t=0);else{const i=this.viewOptions.showSelectionBarFromValue,n=this.valueToPosition(i);(this.viewOptions.rightToLeft?this.viewLowValue<=i:this.viewLowValue>i)?(e=this.minHandleElement.position-n,t=n+this.handleHalfDimension):(e=n-this.minHandleElement.position,t=this.minHandleElement.position+this.handleHalfDimension)}if(this.selectionBarElement.setDimension(e),this.selectionBarElement.setPosition(t),this.range&&this.viewOptions.showOuterSelectionBars&&(this.viewOptions.rightToLeft?(this.rightOuterSelectionBarElement.setDimension(t),this.rightOuterSelectionBarElement.setPosition(0),this.fullBarElement.calculateDimension(),this.leftOuterSelectionBarElement.setDimension(this.fullBarElement.dimension-(t+e)),this.leftOuterSelectionBarElement.setPosition(t+e)):(this.leftOuterSelectionBarElement.setDimension(t),this.leftOuterSelectionBarElement.setPosition(0),this.fullBarElement.calculateDimension(),this.rightOuterSelectionBarElement.setDimension(this.fullBarElement.dimension-(t+e)),this.rightOuterSelectionBarElement.setPosition(t+e))),pt.isNullOrUndefined(this.viewOptions.getSelectionBarColor)){if(!pt.isNullOrUndefined(this.viewOptions.selectionBarGradient)){const n=pt.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue)?0:this.valueToPosition(this.viewOptions.showSelectionBarFromValue),r=n-t>0&&!i||n-t<=0&&i;this.barStyle={backgroundImage:"linear-gradient(to "+(this.viewOptions.vertical?r?"bottom":"top":r?"left":"right")+", "+this.viewOptions.selectionBarGradient.from+" 0%,"+this.viewOptions.selectionBarGradient.to+" 100%)"},this.viewOptions.vertical?(this.barStyle.backgroundPosition="center "+(n+e+t+(r?-this.handleHalfDimension:0))+"px",this.barStyle.backgroundSize="100% "+(this.fullBarElement.dimension-this.handleHalfDimension)+"px"):(this.barStyle.backgroundPosition=n-t+(r?this.handleHalfDimension:0)+"px center",this.barStyle.backgroundSize=this.fullBarElement.dimension-this.handleHalfDimension+"px 100%")}}else{const t=this.getSelectionBarColor();this.barStyle={backgroundColor:t}}}getSelectionBarColor(){return this.range?this.viewOptions.getSelectionBarColor(this.value,this.highValue):this.viewOptions.getSelectionBarColor(this.value)}getPointerColor(t){return this.viewOptions.getPointerColor(t===lt.Max?this.highValue:this.value,t)}getTickColor(t){return this.viewOptions.getTickColor(t)}updateCombinedLabel(){let t=null;if(t=this.viewOptions.rightToLeft?this.minHandleLabelElement.position-this.minHandleLabelElement.dimension-10<=this.maxHandleLabelElement.position:this.minHandleLabelElement.position+this.minHandleLabelElement.dimension+10>=this.maxHandleLabelElement.position,t){const t=this.getDisplayValue(this.viewLowValue,ct.Low),e=this.getDisplayValue(this.viewHighValue,ct.High),i=this.viewOptions.rightToLeft?this.viewOptions.combineLabels(e,t):this.viewOptions.combineLabels(t,e);this.combinedLabelElement.setValue(i);const n=this.viewOptions.boundPointerLabels?Math.min(Math.max(this.selectionBarElement.position+this.selectionBarElement.dimension/2-this.combinedLabelElement.dimension/2,0),this.fullBarElement.dimension-this.combinedLabelElement.dimension):this.selectionBarElement.position+this.selectionBarElement.dimension/2-this.combinedLabelElement.dimension/2;this.combinedLabelElement.setPosition(n),this.minHandleLabelElement.hide(),this.maxHandleLabelElement.hide(),this.combinedLabelElement.show()}else this.updateHighHandle(this.valueToPosition(this.viewHighValue)),this.updateLowHandle(this.valueToPosition(this.viewLowValue)),this.maxHandleLabelElement.show(),this.minHandleLabelElement.show(),this.combinedLabelElement.hide();this.viewOptions.autoHideLimitLabels&&this.updateFloorAndCeilLabelsVisibility()}getDisplayValue(t,e){return pt.isNullOrUndefined(this.viewOptions.stepsArray)||this.viewOptions.bindIndexForStepsArray||(t=this.getStepValue(t)),this.viewOptions.translate(t,e)}roundStep(t,e){const i=pt.isNullOrUndefined(e)?this.viewOptions.step:e;let n=ft.roundToPrecisionLimit((t-this.viewOptions.floor)/i,this.viewOptions.precisionLimit);return n=Math.round(n)*i,ft.roundToPrecisionLimit(this.viewOptions.floor+n,this.viewOptions.precisionLimit)}valueToPosition(t){let e=pt.linearValueToPosition;pt.isNullOrUndefined(this.viewOptions.customValueToPosition)?this.viewOptions.logScale&&(e=pt.logValueToPosition):e=this.viewOptions.customValueToPosition;let i=e(t=ft.clampToRange(t,this.viewOptions.floor,this.viewOptions.ceil),this.viewOptions.floor,this.viewOptions.ceil);return pt.isNullOrUndefined(i)&&(i=0),this.viewOptions.rightToLeft&&(i=1-i),i*this.maxHandlePosition}positionToValue(t){let e=t/this.maxHandlePosition;this.viewOptions.rightToLeft&&(e=1-e);let i=pt.linearPositionToValue;pt.isNullOrUndefined(this.viewOptions.customPositionToValue)?this.viewOptions.logScale&&(i=pt.logPositionToValue):i=this.viewOptions.customPositionToValue;const n=i(e,this.viewOptions.floor,this.viewOptions.ceil);return pt.isNullOrUndefined(n)?0:n}getEventXY(t,e){if(t instanceof MouseEvent)return this.viewOptions.vertical?t.clientY:t.clientX;let i=0;const n=t.touches;if(!pt.isNullOrUndefined(e))for(let r=0;r<n.length;r++)if(n[r].identifier===e){i=r;break}return this.viewOptions.vertical?n[i].clientY:n[i].clientX}getEventPosition(t,e){const i=this.elementRef.nativeElement.getBoundingClientRect(),n=this.viewOptions.vertical?i.bottom:i.left;let r=0;return r=this.viewOptions.vertical?-this.getEventXY(t,e)+n:this.getEventXY(t,e)-n,r*this.viewOptions.scale-this.handleHalfDimension}getNearestHandle(t){if(!this.range)return lt.Min;const e=this.getEventPosition(t),i=Math.abs(e-this.minHandleElement.position),n=Math.abs(e-this.maxHandleElement.position);return i<n?lt.Min:i>n?lt.Max:this.viewOptions.rightToLeft?e>this.minHandleElement.position?lt.Min:lt.Max:e<this.minHandleElement.position?lt.Min:lt.Max}bindEvents(){const t=this.viewOptions.draggableRange;this.viewOptions.onlyBindHandles||this.selectionBarElement.on("mousedown",e=>this.onBarStart(null,t,e,!0,!0,!0)),this.viewOptions.draggableRangeOnly?(this.minHandleElement.on("mousedown",e=>this.onBarStart(lt.Min,t,e,!0,!0)),this.maxHandleElement.on("mousedown",e=>this.onBarStart(lt.Max,t,e,!0,!0))):(this.minHandleElement.on("mousedown",t=>this.onStart(lt.Min,t,!0,!0)),this.range&&this.maxHandleElement.on("mousedown",t=>this.onStart(lt.Max,t,!0,!0)),this.viewOptions.onlyBindHandles||(this.fullBarElement.on("mousedown",t=>this.onStart(null,t,!0,!0,!0)),this.ticksElement.on("mousedown",t=>this.onStart(null,t,!0,!0,!0,!0)))),this.viewOptions.onlyBindHandles||this.selectionBarElement.onPassive("touchstart",e=>this.onBarStart(null,t,e,!0,!0,!0)),this.viewOptions.draggableRangeOnly?(this.minHandleElement.onPassive("touchstart",e=>this.onBarStart(lt.Min,t,e,!0,!0)),this.maxHandleElement.onPassive("touchstart",e=>this.onBarStart(lt.Max,t,e,!0,!0))):(this.minHandleElement.onPassive("touchstart",t=>this.onStart(lt.Min,t,!0,!0)),this.range&&this.maxHandleElement.onPassive("touchstart",t=>this.onStart(lt.Max,t,!0,!0)),this.viewOptions.onlyBindHandles||(this.fullBarElement.onPassive("touchstart",t=>this.onStart(null,t,!0,!0,!0)),this.ticksElement.onPassive("touchstart",t=>this.onStart(null,t,!1,!1,!0,!0)))),this.viewOptions.keyboardSupport&&(this.minHandleElement.on("focus",()=>this.onPointerFocus(lt.Min)),this.range&&this.maxHandleElement.on("focus",()=>this.onPointerFocus(lt.Max)))}unbindEvents(){this.unsubscribeOnMove(),this.unsubscribeOnEnd();for(const t of this.getAllSliderElements())t.off()}onBarStart(t,e,i,n,r,s,o){e?this.onDragStart(t,i,n,r):this.onStart(t,i,n,r,s,o)}onStart(t,e,i,n,r,s){e.stopPropagation(),dt.isTouchEvent(e)&&Z.Z.hasSupport||e.preventDefault(),this.calculateViewDimensions(),pt.isNullOrUndefined(t)&&(t=this.getNearestHandle(e)),this.currentTrackingPointer=t;const o=this.getPointerElement(t);if(o.active=!0,this.viewOptions.keyboardSupport&&o.focus(),i){this.unsubscribeOnMove();const t=t=>this.dragging.active?this.onDragMove(t):this.onMove(t);this.onMoveEventListener=dt.isTouchEvent(e)?this.eventListenerHelper.attachPassiveEventListener(document,"touchmove",t,this.viewOptions.touchEventsInterval):this.eventListenerHelper.attachEventListener(document,"mousemove",t,this.viewOptions.mouseEventsInterval)}if(n){this.unsubscribeOnEnd();const t=t=>this.onEnd(t);this.onEndEventListener=dt.isTouchEvent(e)?this.eventListenerHelper.attachPassiveEventListener(document,"touchend",t):this.eventListenerHelper.attachEventListener(document,"mouseup",t)}this.userChangeStart.emit(this.getChangeContext()),dt.isTouchEvent(e)&&!pt.isNullOrUndefined(e.changedTouches)&&pt.isNullOrUndefined(this.touchId)&&(this.touchId=e.changedTouches[0].identifier),r&&this.onMove(e,!0),s&&this.onEnd(e)}onMove(t,e){let i=null;if(dt.isTouchEvent(t)){const e=t.changedTouches;for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchId){i=e[t];break}if(pt.isNullOrUndefined(i))return}const n=pt.isNullOrUndefined(i)?this.getEventPosition(t):this.getEventPosition(t,i.identifier);let r;n<=0?r=this.viewOptions.rightToLeft?this.viewOptions.ceil:this.viewOptions.floor:n>=this.maxHandlePosition?r=this.viewOptions.rightToLeft?this.viewOptions.floor:this.viewOptions.ceil:(r=this.positionToValue(n),r=e&&!pt.isNullOrUndefined(this.viewOptions.tickStep)?this.roundStep(r,this.viewOptions.tickStep):this.roundStep(r)),this.positionTrackingHandle(r)}onEnd(t){dt.isTouchEvent(t)&&t.changedTouches[0].identifier!==this.touchId||(this.touchId=null,this.viewOptions.keyboardSupport||(this.minHandleElement.active=!1,this.maxHandleElement.active=!1,this.currentTrackingPointer=null),this.dragging.active=!1,this.unsubscribeOnMove(),this.unsubscribeOnEnd(),this.userChangeEnd.emit(this.getChangeContext()))}onPointerFocus(t){const e=this.getPointerElement(t);e.on("blur",()=>this.onPointerBlur(e)),e.on("keydown",t=>this.onKeyboardEvent(t)),e.on("keyup",()=>this.onKeyUp()),e.active=!0,this.currentTrackingPointer=t,this.currentFocusPointer=t,this.firstKeyDown=!0}onKeyUp(){this.firstKeyDown=!0,this.userChangeEnd.emit(this.getChangeContext())}onPointerBlur(t){t.off("blur"),t.off("keydown"),t.off("keyup"),t.active=!1,pt.isNullOrUndefined(this.touchId)&&(this.currentTrackingPointer=null,this.currentFocusPointer=null)}getKeyActions(t){const e=this.viewOptions.ceil-this.viewOptions.floor;let i=t+this.viewOptions.step,n=t-this.viewOptions.step,r=t+e/10,s=t-e/10;this.viewOptions.reversedControls&&(i=t-this.viewOptions.step,n=t+this.viewOptions.step,r=t-e/10,s=t+e/10);const o={UP:i,DOWN:n,LEFT:n,RIGHT:i,PAGEUP:r,PAGEDOWN:s,HOME:this.viewOptions.reversedControls?this.viewOptions.ceil:this.viewOptions.floor,END:this.viewOptions.reversedControls?this.viewOptions.floor:this.viewOptions.ceil};return this.viewOptions.rightToLeft&&(o.LEFT=i,o.RIGHT=n,this.viewOptions.vertical&&(o.UP=n,o.DOWN=i)),o}onKeyboardEvent(t){const e=this.getCurrentTrackingValue(),i=pt.isNullOrUndefined(t.keyCode)?t.which:t.keyCode,n=this.getKeyActions(e)[{38:"UP",40:"DOWN",37:"LEFT",39:"RIGHT",33:"PAGEUP",34:"PAGEDOWN",36:"HOME",35:"END"}[i]];if(pt.isNullOrUndefined(n)||pt.isNullOrUndefined(this.currentTrackingPointer))return;t.preventDefault(),this.firstKeyDown&&(this.firstKeyDown=!1,this.userChangeStart.emit(this.getChangeContext()));const r=ft.clampToRange(n,this.viewOptions.floor,this.viewOptions.ceil),s=this.roundStep(r);if(this.viewOptions.draggableRangeOnly){const t=this.viewHighValue-this.viewLowValue;let e,i;this.currentTrackingPointer===lt.Min?(e=s,i=s+t,i>this.viewOptions.ceil&&(i=this.viewOptions.ceil,e=i-t)):this.currentTrackingPointer===lt.Max&&(i=s,e=s-t,e<this.viewOptions.floor&&(e=this.viewOptions.floor,i=e+t)),this.positionTrackingBar(e,i)}else this.positionTrackingHandle(s)}onDragStart(t,e,i,n){const r=this.getEventPosition(e);this.dragging=new xt,this.dragging.active=!0,this.dragging.value=this.positionToValue(r),this.dragging.difference=this.viewHighValue-this.viewLowValue,this.dragging.lowLimit=this.viewOptions.rightToLeft?this.minHandleElement.position-r:r-this.minHandleElement.position,this.dragging.highLimit=this.viewOptions.rightToLeft?r-this.maxHandleElement.position:this.maxHandleElement.position-r,this.onStart(t,e,i,n)}getMinValue(t,e,i){const n=this.viewOptions.rightToLeft;let r=null;return r=e?i?n?this.viewOptions.floor:this.viewOptions.ceil-this.dragging.difference:n?this.viewOptions.ceil-this.dragging.difference:this.viewOptions.floor:this.positionToValue(n?t+this.dragging.lowLimit:t-this.dragging.lowLimit),this.roundStep(r)}getMaxValue(t,e,i){const n=this.viewOptions.rightToLeft;let r=null;return r=e?i?n?this.viewOptions.floor+this.dragging.difference:this.viewOptions.ceil:n?this.viewOptions.ceil:this.viewOptions.floor+this.dragging.difference:n?this.positionToValue(t+this.dragging.lowLimit)+this.dragging.difference:this.positionToValue(t-this.dragging.lowLimit)+this.dragging.difference,this.roundStep(r)}onDragMove(t){const e=this.getEventPosition(t);let i,n,r,s;this.viewOptions.rightToLeft?(i=this.dragging.lowLimit,n=this.dragging.highLimit,r=this.maxHandleElement,s=this.minHandleElement):(i=this.dragging.highLimit,n=this.dragging.lowLimit,r=this.minHandleElement,s=this.maxHandleElement);const o=e>=this.maxHandlePosition-i;let a,l;if(e<=n){if(0===r.position)return;a=this.getMinValue(e,!0,!1),l=this.getMaxValue(e,!0,!1)}else if(o){if(s.position===this.maxHandlePosition)return;l=this.getMaxValue(e,!0,!0),a=this.getMinValue(e,!0,!0)}else a=this.getMinValue(e,!1,!1),l=this.getMaxValue(e,!1,!1);this.positionTrackingBar(a,l)}positionTrackingBar(t,e){!pt.isNullOrUndefined(this.viewOptions.minLimit)&&t<this.viewOptions.minLimit&&(e=ft.roundToPrecisionLimit((t=this.viewOptions.minLimit)+this.dragging.difference,this.viewOptions.precisionLimit)),!pt.isNullOrUndefined(this.viewOptions.maxLimit)&&e>this.viewOptions.maxLimit&&(t=ft.roundToPrecisionLimit((e=this.viewOptions.maxLimit)-this.dragging.difference,this.viewOptions.precisionLimit)),this.viewLowValue=t,this.viewHighValue=e,this.applyViewChange(),this.updateHandles(lt.Min,this.valueToPosition(t)),this.updateHandles(lt.Max,this.valueToPosition(e))}positionTrackingHandle(t){t=this.applyMinMaxLimit(t),this.range&&(this.viewOptions.pushRange?t=this.applyPushRange(t):(this.viewOptions.noSwitching&&(this.currentTrackingPointer===lt.Min&&t>this.viewHighValue?t=this.applyMinMaxRange(this.viewHighValue):this.currentTrackingPointer===lt.Max&&t<this.viewLowValue&&(t=this.applyMinMaxRange(this.viewLowValue))),t=this.applyMinMaxRange(t),this.currentTrackingPointer===lt.Min&&t>this.viewHighValue?(this.viewLowValue=this.viewHighValue,this.applyViewChange(),this.updateHandles(lt.Min,this.maxHandleElement.position),this.updateAriaAttributes(),this.currentTrackingPointer=lt.Max,this.minHandleElement.active=!1,this.maxHandleElement.active=!0,this.viewOptions.keyboardSupport&&this.maxHandleElement.focus()):this.currentTrackingPointer===lt.Max&&t<this.viewLowValue&&(this.viewHighValue=this.viewLowValue,this.applyViewChange(),this.updateHandles(lt.Max,this.minHandleElement.position),this.updateAriaAttributes(),this.currentTrackingPointer=lt.Min,this.maxHandleElement.active=!1,this.minHandleElement.active=!0,this.viewOptions.keyboardSupport&&this.minHandleElement.focus()))),this.getCurrentTrackingValue()!==t&&(this.currentTrackingPointer===lt.Min?(this.viewLowValue=t,this.applyViewChange()):this.currentTrackingPointer===lt.Max&&(this.viewHighValue=t,this.applyViewChange()),this.updateHandles(this.currentTrackingPointer,this.valueToPosition(t)),this.updateAriaAttributes())}applyMinMaxLimit(t){return!pt.isNullOrUndefined(this.viewOptions.minLimit)&&t<this.viewOptions.minLimit?this.viewOptions.minLimit:!pt.isNullOrUndefined(this.viewOptions.maxLimit)&&t>this.viewOptions.maxLimit?this.viewOptions.maxLimit:t}applyMinMaxRange(t){const e=Math.abs(t-(this.currentTrackingPointer===lt.Min?this.viewHighValue:this.viewLowValue));if(!pt.isNullOrUndefined(this.viewOptions.minRange)&&e<this.viewOptions.minRange){if(this.currentTrackingPointer===lt.Min)return ft.roundToPrecisionLimit(this.viewHighValue-this.viewOptions.minRange,this.viewOptions.precisionLimit);if(this.currentTrackingPointer===lt.Max)return ft.roundToPrecisionLimit(this.viewLowValue+this.viewOptions.minRange,this.viewOptions.precisionLimit)}if(!pt.isNullOrUndefined(this.viewOptions.maxRange)&&e>this.viewOptions.maxRange){if(this.currentTrackingPointer===lt.Min)return ft.roundToPrecisionLimit(this.viewHighValue-this.viewOptions.maxRange,this.viewOptions.precisionLimit);if(this.currentTrackingPointer===lt.Max)return ft.roundToPrecisionLimit(this.viewLowValue+this.viewOptions.maxRange,this.viewOptions.precisionLimit)}return t}applyPushRange(t){const e=this.currentTrackingPointer===lt.Min?this.viewHighValue-t:t-this.viewLowValue,i=pt.isNullOrUndefined(this.viewOptions.minRange)?this.viewOptions.step:this.viewOptions.minRange,n=this.viewOptions.maxRange;return e<i?(this.currentTrackingPointer===lt.Min?(this.viewHighValue=ft.roundToPrecisionLimit(Math.min(t+i,this.viewOptions.ceil),this.viewOptions.precisionLimit),t=ft.roundToPrecisionLimit(this.viewHighValue-i,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(lt.Max,this.valueToPosition(this.viewHighValue))):this.currentTrackingPointer===lt.Max&&(this.viewLowValue=ft.roundToPrecisionLimit(Math.max(t-i,this.viewOptions.floor),this.viewOptions.precisionLimit),t=ft.roundToPrecisionLimit(this.viewLowValue+i,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(lt.Min,this.valueToPosition(this.viewLowValue))),this.updateAriaAttributes()):!pt.isNullOrUndefined(n)&&e>n&&(this.currentTrackingPointer===lt.Min?(this.viewHighValue=ft.roundToPrecisionLimit(t+n,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(lt.Max,this.valueToPosition(this.viewHighValue))):this.currentTrackingPointer===lt.Max&&(this.viewLowValue=ft.roundToPrecisionLimit(t-n,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(lt.Min,this.valueToPosition(this.viewLowValue))),this.updateAriaAttributes()),t}getChangeContext(){const t=new ht;return t.pointerType=this.currentTrackingPointer,t.value=+this.value,this.range&&(t.highValue=+this.highValue),t}}return t.\u0275fac=function(e){return new(e||t)(l.Y36(l.Qsj),l.Y36(l.SBq),l.Y36(l.sBO),l.Y36(l.R0b))},t.\u0275cmp=l.Xpm({type:t,selectors:[["ng5-slider"]],contentQueries:function(t,e,i){if(1&t&&l.Suo(i,B,5),2&t){let t;l.iGM(t=l.CRH())&&(e.tooltipTemplate=t.first)}},viewQuery:function(t,e){if(1&t&&(l.Gf(F,5,vt),l.Gf(D,5,vt),l.Gf(U,5,vt),l.Gf(q,5,vt),l.Gf(z,5,gt),l.Gf(Y,5,gt),l.Gf(G,5,yt),l.Gf(J,5,yt),l.Gf(Q,5,yt),l.Gf($,5,yt),l.Gf(W,5,yt),l.Gf(K,5,vt)),2&t){let t;l.iGM(t=l.CRH())&&(e.leftOuterSelectionBarElement=t.first),l.iGM(t=l.CRH())&&(e.rightOuterSelectionBarElement=t.first),l.iGM(t=l.CRH())&&(e.fullBarElement=t.first),l.iGM(t=l.CRH())&&(e.selectionBarElement=t.first),l.iGM(t=l.CRH())&&(e.minHandleElement=t.first),l.iGM(t=l.CRH())&&(e.maxHandleElement=t.first),l.iGM(t=l.CRH())&&(e.floorLabelElement=t.first),l.iGM(t=l.CRH())&&(e.ceilLabelElement=t.first),l.iGM(t=l.CRH())&&(e.minHandleLabelElement=t.first),l.iGM(t=l.CRH())&&(e.maxHandleLabelElement=t.first),l.iGM(t=l.CRH())&&(e.combinedLabelElement=t.first),l.iGM(t=l.CRH())&&(e.ticksElement=t.first)}},hostAttrs:[1,"ng5-slider"],hostVars:5,hostBindings:function(t,e){1&t&&l.NdJ("resize",function(t){return e.onResize(t)},!1,l.Jf7),2&t&&(l.uIk("disabled",e.sliderElementDisabledAttr),l.ekj("vertical",e.sliderElementVerticalClass)("animate",e.sliderElementAnimateClass))},inputs:{value:"value",highValue:"highValue",options:"options",manualRefresh:"manualRefresh",triggerFocus:"triggerFocus"},outputs:{valueChange:"valueChange",highValueChange:"highValueChange",userChangeStart:"userChangeStart",userChange:"userChange",userChangeEnd:"userChangeEnd"},features:[l._Bn([_t]),l.TTD],decls:29,vars:13,consts:[["ng5SliderElement","",1,"ng5-slider-span","ng5-slider-bar-wrapper","ng5-slider-left-out-selection"],["leftOuterSelectionBar",""],[1,"ng5-slider-span","ng5-slider-bar"],["ng5SliderElement","",1,"ng5-slider-span","ng5-slider-bar-wrapper","ng5-slider-right-out-selection"],["rightOuterSelectionBar",""],["ng5SliderElement","",1,"ng5-slider-span","ng5-slider-bar-wrapper","ng5-slider-full-bar"],["fullBar",""],["ng5SliderElement","",1,"ng5-slider-span","ng5-slider-bar-wrapper","ng5-slider-selection-bar"],["selectionBar",""],[1,"ng5-slider-span","ng5-slider-bar","ng5-slider-selection",3,"ngStyle"],["ng5SliderHandle","",1,"ng5-slider-span","ng5-slider-pointer","ng5-slider-pointer-min",3,"ngStyle"],["minHandle",""],["ng5SliderHandle","",1,"ng5-slider-span","ng5-slider-pointer","ng5-slider-pointer-max",3,"ngStyle"],["maxHandle",""],["ng5SliderLabel","",1,"ng5-slider-span","ng5-slider-bubble","ng5-slider-limit","ng5-slider-floor"],["floorLabel",""],["ng5SliderLabel","",1,"ng5-slider-span","ng5-slider-bubble","ng5-slider-limit","ng5-slider-ceil"],["ceilLabel",""],["ng5SliderLabel","",1,"ng5-slider-span","ng5-slider-bubble","ng5-slider-model-value"],["minHandleLabel",""],["ng5SliderLabel","",1,"ng5-slider-span","ng5-slider-bubble","ng5-slider-model-high"],["maxHandleLabel",""],["ng5SliderLabel","",1,"ng5-slider-span","ng5-slider-bubble","ng5-slider-combined"],["combinedLabel",""],["ng5SliderElement","",1,"ng5-slider-ticks",3,"hidden"],["ticksElement",""],["class","ng5-slider-tick",3,"ngClass","ngStyle",4,"ngFor","ngForOf"],[1,"ng5-slider-tick",3,"ngClass","ngStyle"],[3,"template","tooltip","placement"],["class","ng5-slider-span ng5-slider-tick-value",3,"template","tooltip","placement","content",4,"ngIf"],["class","ng5-slider-span ng5-slider-tick-legend",3,"innerHTML",4,"ngIf"],[1,"ng5-slider-span","ng5-slider-tick-value",3,"template","tooltip","placement","content"],[1,"ng5-slider-span","ng5-slider-tick-legend",3,"innerHTML"]],template:function(t,e){1&t&&(l.TgZ(0,"span",0,1),l._UZ(2,"span",2),l.qZA(),l.TgZ(3,"span",3,4),l._UZ(5,"span",2),l.qZA(),l.TgZ(6,"span",5,6),l._UZ(8,"span",2),l.qZA(),l.TgZ(9,"span",7,8),l._UZ(11,"span",9),l.qZA(),l._UZ(12,"span",10,11),l._UZ(14,"span",12,13),l._UZ(16,"span",14,15),l._UZ(18,"span",16,17),l._UZ(20,"span",18,19),l._UZ(22,"span",20,21),l._UZ(24,"span",22,23),l.TgZ(26,"span",24,25),l.YNc(28,it,4,9,"span",26),l.qZA()),2&t&&(l.xp6(6),l.ekj("ng5-slider-transparent",e.fullBarTransparentClass),l.xp6(3),l.ekj("ng5-slider-draggable",e.selectionBarDraggableClass),l.xp6(2),l.Q6J("ngStyle",e.barStyle),l.xp6(1),l.Q6J("ngStyle",e.minPointerStyle),l.xp6(2),l.Udp("display",e.range?"inherit":"none"),l.Q6J("ngStyle",e.maxPointerStyle),l.xp6(12),l.ekj("ng5-slider-ticks-values-under",e.ticksUnderValuesClass),l.Q6J("hidden",!e.showTicks),l.xp6(2),l.Q6J("ngForOf",e.ticks))},directives:function(){return[vt,a.PC,gt,yt,a.sg,a.mk,Et,a.O5]},styles:[".ng5-slider{display:inline-block;position:relative;height:4px;width:100%;margin:35px 0 15px;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-touch-action:pan-y;touch-action:pan-y} .ng5-slider.with-legend{margin-bottom:40px} .ng5-slider[disabled]{cursor:not-allowed} .ng5-slider[disabled] .ng5-slider-pointer{cursor:not-allowed;background-color:#d8e0f3} .ng5-slider[disabled] .ng5-slider-draggable{cursor:not-allowed} .ng5-slider[disabled] .ng5-slider-selection{background:#8b91a2} .ng5-slider[disabled] .ng5-slider-tick{cursor:not-allowed} .ng5-slider[disabled] .ng5-slider-tick.ng5-slider-selected{background:#8b91a2} .ng5-slider .ng5-slider-span{white-space:nowrap;position:absolute;display:inline-block} .ng5-slider .ng5-slider-base{width:100%;height:100%;padding:0} .ng5-slider .ng5-slider-bar-wrapper{left:0;-webkit-box-sizing:border-box;box-sizing:border-box;margin-top:-16px;padding-top:16px;width:100%;height:32px;z-index:1} .ng5-slider .ng5-slider-draggable{cursor:move} .ng5-slider .ng5-slider-bar{left:0;width:100%;height:4px;z-index:1;background:#d8e0f3;border-radius:2px} .ng5-slider .ng5-slider-bar-wrapper.ng5-slider-transparent .ng5-slider-bar{background:0 0} .ng5-slider .ng5-slider-bar-wrapper.ng5-slider-left-out-selection .ng5-slider-bar{background:#df002d} .ng5-slider .ng5-slider-bar-wrapper.ng5-slider-right-out-selection .ng5-slider-bar{background:#03a688} .ng5-slider .ng5-slider-selection{z-index:2;background:#0db9f0;border-radius:2px} .ng5-slider .ng5-slider-pointer{cursor:pointer;width:32px;height:32px;top:-14px;background-color:#0db9f0;z-index:3;border-radius:16px} .ng5-slider .ng5-slider-pointer:after{content:'';width:8px;height:8px;position:absolute;top:12px;left:12px;border-radius:4px;background:#fff} .ng5-slider .ng5-slider-pointer:hover:after{background-color:#fff} .ng5-slider .ng5-slider-pointer.ng5-slider-active{z-index:4} .ng5-slider .ng5-slider-pointer.ng5-slider-active:after{background-color:#451aff} .ng5-slider .ng5-slider-bubble{cursor:default;bottom:16px;padding:1px 3px;color:#55637d;font-size:16px} .ng5-slider .ng5-slider-bubble.ng5-slider-limit{color:#55637d} .ng5-slider .ng5-slider-ticks{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:0;position:absolute;left:0;top:-3px;margin:0;z-index:1;list-style:none} .ng5-slider .ng5-slider-ticks-values-under .ng5-slider-tick-value{top:auto;bottom:-36px} .ng5-slider .ng5-slider-tick{text-align:center;cursor:pointer;width:10px;height:10px;background:#d8e0f3;border-radius:50%;position:absolute;top:0;left:0;margin-left:11px} .ng5-slider .ng5-slider-tick.ng5-slider-selected{background:#0db9f0} .ng5-slider .ng5-slider-tick-value{position:absolute;top:-34px;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)} .ng5-slider .ng5-slider-tick-legend{position:absolute;top:24px;-webkit-transform:translate(-50%,0);transform:translate(-50%,0);max-width:50px;white-space:normal} .ng5-slider.vertical{position:relative;width:4px;height:100%;margin:0 20px;padding:0;vertical-align:baseline;-ms-touch-action:pan-x;touch-action:pan-x} .ng5-slider.vertical .ng5-slider-base{width:100%;height:100%;padding:0} .ng5-slider.vertical .ng5-slider-bar-wrapper{top:auto;left:0;margin:0 0 0 -16px;padding:0 0 0 16px;height:100%;width:32px} .ng5-slider.vertical .ng5-slider-bar{bottom:0;left:auto;width:4px;height:100%} .ng5-slider.vertical .ng5-slider-pointer{left:-14px!important;top:auto;bottom:0} .ng5-slider.vertical .ng5-slider-bubble{left:16px!important;bottom:0} .ng5-slider.vertical .ng5-slider-ticks{height:100%;width:0;left:-3px;top:0;z-index:1} .ng5-slider.vertical .ng5-slider-tick{vertical-align:middle;margin-left:auto;margin-top:11px} .ng5-slider.vertical .ng5-slider-tick-value{left:24px;top:auto;-webkit-transform:translate(0,-28%);transform:translate(0,-28%)} .ng5-slider.vertical .ng5-slider-tick-legend{top:auto;right:24px;-webkit-transform:translate(0,-28%);transform:translate(0,-28%);max-width:none;white-space:nowrap} .ng5-slider.vertical .ng5-slider-ticks-values-under .ng5-slider-tick-value{bottom:auto;left:auto;right:24px} .ng5-slider *{-webkit-transition:none;transition:none} .ng5-slider.animate .ng5-slider-bar-wrapper{-webkit-transition:all linear .3s;transition:all linear .3s} .ng5-slider.animate .ng5-slider-selection{-webkit-transition:background-color linear .3s;transition:background-color linear .3s} .ng5-slider.animate .ng5-slider-pointer{-webkit-transition:all linear .3s;transition:all linear .3s} .ng5-slider.animate .ng5-slider-bubble{-webkit-transition:all linear .3s;transition:all linear .3s} .ng5-slider.animate .ng5-slider-bubble.ng5-slider-limit{-webkit-transition:opacity linear .3s;transition:opacity linear .3s} .ng5-slider.animate .ng5-slider-bubble.ng5-slider-combined{-webkit-transition:opacity linear .3s;transition:opacity linear .3s} .ng5-slider.animate .ng5-slider-tick{-webkit-transition:background-color linear .3s;transition:background-color linear .3s}"]}),t})(),Et=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=l.Xpm({type:t,selectors:[["ng5-slider-tooltip-wrapper"]],inputs:{template:"template",tooltip:"tooltip",placement:"placement",content:"content"},decls:2,vars:2,consts:[[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ng5-slider-inner-tooltip"]],template:function(t,e){1&t&&(l.YNc(0,ot,2,6,"ng-container",0),l.YNc(1,at,3,3,"ng-container",0)),2&t&&(l.Q6J("ngIf",e.template),l.xp6(1),l.Q6J("ngIf",!e.template))},directives:[a.O5,a.tP],styles:[".ng5-slider-inner-tooltip[_ngcontent-%COMP%]{height:100%}"]}),t})(),Tt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=l.oAB({type:t}),t.\u0275inj=l.cJS({imports:[[a.ez]]}),t})(),Ct=(()=>{class t{constructor(t,e){this.pubsub=t,this.decimalPipe=e,this.onValueChange=new l.vpe,this.getResetTrigger=new l.vpe,this.minValue=0,this.maxValue=100,this.prefix="",this.suffix="",this.decimalSeparator=".",this.applyDecimalFormat=!0,this.value={start:this.minValue,end:this.maxValue},this.manualRefresh=new l.vpe,this.subscriptions=[],this.id=H.Z(),this.options={floor:this.minValue,ceil:this.maxValue,translate:t=>{let e=this.prefix;return e+=this.applyDecimalFormat?this.decimalPipe.transform(t).split(",").join(this.decimalSeparator):t,e+=this.suffix,e}}}ngOnInit(){this.subscriptions.push(this.pubsub.get(this.id).pipe((0,y.b)(300)).subscribe(()=>this.onValueChange.next(this.value)))}ngOnChanges(t){const{minValue:e,maxValue:i,loadValue:n}=t;(null==e?void 0:e.currentValue)&&(this.options.floor=e.currentValue,this.value.start=e.currentValue),(null==i?void 0:i.currentValue)&&(this.options.ceil=i.currentValue,this.value.end=i.currentValue),(null==n?void 0:n.currentValue)&&(this.value=C.clone(n.currentValue),this.manualRefresh.next())}ngOnDestroy(){this.subscriptions.forEach(t=>null==t?void 0:t.unsubscribe())}ngAfterViewInit(){this.handleReset(),setTimeout(()=>this.manualRefresh.next(),300)}handleReset(){const t=new l.vpe;this.getResetTrigger.emit(t),this.subscriptions.push(t.subscribe(()=>{this.value.start=this.minValue,this.value.end=this.maxValue}))}handleValueChange(){this.pubsub.emit(this.id)}}return t.\u0275fac=function(e){return new(e||t)(l.Y36(_.A),l.Y36(a.JJ))},t.\u0275cmp=l.Xpm({type:t,selectors:[["range"]],inputs:{minValue:"minValue",maxValue:"maxValue",prefix:"prefix",suffix:"suffix",decimalSeparator:"decimalSeparator",applyDecimalFormat:"applyDecimalFormat",value:"value",loadValue:"loadValue"},outputs:{onValueChange:"onValueChange",getResetTrigger:"getResetTrigger"},features:[l._Bn([a.JJ]),l.TTD],decls:2,vars:4,consts:[[1,"range"],[3,"manualRefresh","value","highValue","options","valueChange","highValueChange"]],template:function(t,e){1&t&&(l.TgZ(0,"div",0),l.TgZ(1,"ng5-slider",1),l.NdJ("valueChange",function(){return e.handleValueChange()})("valueChange",function(t){return e.value.start=t})("highValueChange",function(t){return e.value.end=t}),l.qZA(),l.qZA()),2&t&&(l.xp6(1),l.Q6J("manualRefresh",e.manualRefresh)("value",e.value.start)("highValue",e.value.end)("options",e.options))},directives:[kt],styles:['[_ngcontent-%COMP%]:root{--pallete-primary:#000;--pallete-accent:#000;--sidenav-width:200px} .range ng5-slider .ng5-slider-pointer{display:flex} .range ng5-slider .ng5-slider-pointer{align-items:center;justify-content:center} .range ng5-slider .ng5-slider-limit{background:#0000;padding:4px 0;display:none} .range ng5-slider .ng5-slider-selection-bar .ng5-slider-selection{background:var(--pallete-accent)} .range ng5-slider .ng5-slider-bar{background:#e8e8e8;height:8px;border-radius:30px;margin-top:-3px} .range ng5-slider .ng5-slider-pointer{display:flex!important;height:18px;width:18px;background-color:#fff;top:-8px} .range ng5-slider .ng5-slider-pointer.ng5-slider-active{outline:none} .range ng5-slider .ng5-slider-pointer.ng5-slider-active:after{background-color:var(--pallete-accent)} .range ng5-slider .ng5-slider-pointer:hover:after{background-color:var(--pallete-accent)} .range ng5-slider .ng5-slider-pointer:after{height:12px;width:12px;background:var(--pallete-accent);position:relative;border-radius:100%;top:0;left:0} .range ng5-slider .ng5-slider-pointer:before{content:" ";width:0;height:0;border-left:6px solid #0000;border-right:6px solid #0000;border-top:6px solid var(--pallete-accent);top:-5px;position:absolute} .range ng5-slider .ng5-slider-bubble{background-color:var(--pallete-accent);color:#fff;border-radius:4px;padding:4px 12px}']}),t})();function Vt(t,e){if(1&t&&(l.TgZ(0,"mat-option",15),l._uU(1),l.qZA()),2&t){const t=e.$implicit;l.Q6J("value",t),l.xp6(1),l.hij(" ",t," ")}}function Lt(t,e){if(1&t&&(l.TgZ(0,"mat-form-field",12),l.TgZ(1,"mat-label"),l._uU(2),l.qZA(),l.TgZ(3,"mat-select",13),l.NdJ("ngModelChange",function(t){return e.$implicit.selected=t}),l.YNc(4,Vt,2,2,"mat-option",14),l.qZA(),l.qZA()),2&t){const t=e.$implicit;l.xp6(2),l.Oqu(t.name),l.xp6(1),l.Q6J("ngModel",t.selected),l.xp6(1),l.Q6J("ngForOf",t.values)}}const Pt=function(){return{}};function At(t,e){if(1&t){const t=l.EpF();l.TgZ(0,"div",16),l.TgZ(1,"div",17),l._uU(2),l.qZA(),l.TgZ(3,"div",18),l.TgZ(4,"range",19),l.NdJ("getResetTrigger",function(e){return l.CHM(t),l.oxw().resetTriggers.push(e)})("onValueChange",function(e){const i=l.CHM(t).$implicit;return l.oxw().valueChanged(e,i.id,i.label)}),l.qZA(),l.qZA(),l.qZA()}if(2&t){const t=e.$implicit,i=l.oxw();l.xp6(2),l.Oqu(t.label),l.xp6(2),l.Q6J("loadValue",(i.loadedValues||l.DdM(4,Pt))[t.id])("minValue",t.min)("maxValue",t.max)}}let Mt=(()=>{class t{constructor(t,e,i,n){this.dialogRef=t,this.data=e,this.pubsub=i,this.engineService=n,this.resetTriggers=[],this.values={},this.subscriptions=[]}ngOnInit(){this.subscriptions.push((0,x.aj)([this.pubsub.getAsBehaviorSubject(O.Y.GLOBAL_STATE_CHANGE),this.pubsub.getAsBehaviorSubject(O.Y.GLOBAL_PERIOD_CHANGE)]).pipe((0,V.w)(([t,e])=>this.engineService.getEngineData(t,e))).subscribe(t=>{var e,i,n,r,s,o;this.filterPayload=t,null===(i=null===(e=this.filterPayload)||void 0===e?void 0:e.meta)||void 0===i||i.forEach(t=>this.values[null==t?void 0:t.id]={start:this.data.selectedValues?this.data.selectedValues[t.id].start:t.min,end:this.data.selectedValues?this.data.selectedValues[t.id].end:t.max}),(null===(n=this.filterPayload)||void 0===n?void 0:n.categories)&&(null===(s=null===(r=this.data)||void 0===r?void 0:r.categories)||void 0===s||s.forEach(t=>{this.filterPayload.categories[t.index].selected=t.selected})),this.loadedValues=null===(o=this.data)||void 0===o?void 0:o.selectedValues,this.applyFilters(!1)}))}ngOnDestroy(){var t;null===(t=this.subscriptions)||void 0===t||t.forEach(t=>t.unsubscribe())}valueChanged(t,e){this.values[e]=t}resetAll(){var t,e,i;null===(e=null===(t=this.filterPayload)||void 0===t?void 0:t.categories)||void 0===e||e.forEach(t=>t.selected=!1),null===(i=this.resetTriggers)||void 0===i||i.forEach(t=>t.next())}applyFilters(t=!0){var e,i,n,r,s,o,a,l,c,u,h,p,d;let f=[...(null===(e=this.filterPayload)||void 0===e?void 0:e.municipalities)||[]];null===(n=null===(i=this.filterPayload)||void 0===i?void 0:i.meta)||void 0===n||n.forEach(({id:t})=>{const{start:e,end:i}=this.values[t];f=null==f?void 0:f.filter(n=>v.R.between(n.values[t].value,e,i))}),null===(o=null===(s=null===(r=this.filterPayload)||void 0===r?void 0:r.categories)||void 0===s?void 0:s.filter(({selected:t})=>null==t?void 0:t.length))||void 0===o||o.forEach(({index:t,selected:e})=>{f=null==f?void 0:f.filter(i=>{var n;return null===(n=null==i?void 0:i.categories[t])||void 0===n?void 0:n.some(t=>(null==e?void 0:e.indexOf(t))>=0)})});let b=null===(a=this.data.categories)||void 0===a?void 0:a.filter(t=>{var e;const i=this.filterPayload.categories[t.index];return!(!i.selected||0===(null===(e=i.selected)||void 0===e?void 0:e.length))}).length;b+=(null===(u=null===(c=null===(l=this.filterPayload)||void 0===l?void 0:l.meta)||void 0===c?void 0:c.filter(({id:t,min:e,max:i})=>{const{start:n,end:r}=this.values[t];return n!==e||r!==i}))||void 0===u?void 0:u.length)||0;const m={categories:null===(p=null===(h=this.filterPayload)||void 0===h?void 0:h.categories)||void 0===p?void 0:p.map(({selected:t,name:e,index:i})=>({selected:t,name:e,index:i})),values:this.values,filtersUsed:b,municipalities:f,meta:Object.values((null===(d=this.filterPayload)||void 0===d?void 0:d.meta)||{}).map(({id:t,label:e,percentile:i})=>({id:t,label:e,percentile:i}))};t&&this.dialogRef.close(m)}}return t.\u0275fac=function(e){return new(e||t)(l.Y36(M.so),l.Y36(M.WI),l.Y36(_.A),l.Y36(N.S))},t.\u0275cmp=l.Xpm({type:t,selectors:[["app-map-view-filters-modal"]],decls:20,vars:11,consts:[[1,"map-view-filters-modal","modal"],[1,"modal-header"],[1,"modal-title"],["mat-icon-button","",3,"click"],[1,"modal-content"],[1,"categories-filter-wrapper"],["class","category-item","color","accent","appearance","outline",4,"ngFor","ngForOf"],[1,"numeric-filters-wrapper"],["class","filter-item",4,"ngFor","ngForOf"],[1,"modal-footer"],["mat-button","","color","accent",3,"click"],["mat-raised-button","","color","accent",3,"click"],["color","accent","appearance","outline",1,"category-item"],["multiple","",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"filter-item"],[1,"filter-item-label"],[1,"filter-item-slider"],[3,"loadValue","minValue","maxValue","getResetTrigger","onValueChange"]],template:function(t,e){1&t&&(l.TgZ(0,"div",0),l.TgZ(1,"div",1),l.TgZ(2,"div",2),l._uU(3),l.ALo(4,"translate"),l.qZA(),l.TgZ(5,"button",3),l.NdJ("click",function(){return e.dialogRef.close(null)}),l.TgZ(6,"mat-icon"),l._uU(7,"close"),l.qZA(),l.qZA(),l.qZA(),l.TgZ(8,"div",4),l.TgZ(9,"div",5),l.YNc(10,Lt,5,3,"mat-form-field",6),l.qZA(),l.TgZ(11,"div",7),l.YNc(12,At,5,5,"div",8),l.qZA(),l.qZA(),l.TgZ(13,"div",9),l.TgZ(14,"button",10),l.NdJ("click",function(){return e.resetAll()}),l._uU(15),l.ALo(16,"translate"),l.qZA(),l.TgZ(17,"button",11),l.NdJ("click",function(){return e.applyFilters()}),l._uU(18),l.ALo(19,"translate"),l.qZA(),l.qZA(),l.qZA()),2&t&&(l.xp6(3),l.hij(" ",l.lcZ(4,5,"map-view.filters-modal.title")," "),l.xp6(7),l.Q6J("ngForOf",null==e.filterPayload?null:e.filterPayload.categories),l.xp6(2),l.Q6J("ngForOf",null==e.filterPayload?null:e.filterPayload.meta),l.xp6(3),l.hij(" ",l.lcZ(16,7,"map-view.filters-modal.reset")," "),l.xp6(3),l.hij(" ",l.lcZ(19,9,"map-view.filters-modal.apply")," "))},directives:[s.lW,o.Hw,a.sg,f.KE,f.hX,b.gD,d.JJ,d.On,j.ey,Ct],pipes:[n.X$],styles:["[_ngcontent-%COMP%]:root{--pallete-primary:#000;--pallete-accent:#000;--sidenav-width:200px} .map-view-filters-modal .categories-filter-wrapper, .map-view-filters-modal .numeric-filters-wrapper{display:flex} .map-view-filters-modal .categories-filter-wrapper, .map-view-filters-modal .numeric-filters-wrapper{align-items:center;justify-content:space-between} .map-view-filters-modal .modal-footer, .map-view-filters-modal .modal-header{justify-content:space-between} .map-view-filters-modal .categories-filter-wrapper{flex-wrap:wrap} .map-view-filters-modal .categories-filter-wrapper .category-item{width:320px;margin-bottom:24px} .map-view-filters-modal .numeric-filters-wrapper{flex-wrap:wrap} .map-view-filters-modal .numeric-filters-wrapper .filter-item{width:320px;margin-bottom:24px} .map-view-filters-modal .numeric-filters-wrapper .filter-item-label{font-size:14px;font-weight:500;margin-bottom:8px} .is-phone .map-view-filters-modal .categories-filter-wrapper .category-item{width:100%} .is-phone .map-view-filters-modal .numeric-filters-wrapper .filter-item{width:100%}"]}),t})();var Nt=i(1744),jt=i(7007),Ht=i(5420);function Rt(t,e){1&t&&(l.TgZ(0,"mat-icon"),l._uU(1,"open_with"),l.qZA())}function It(t,e){1&t&&(l.TgZ(0,"mat-icon"),l._uU(1,"close"),l.qZA())}function Zt(t,e){if(1&t){const t=l.EpF();l.TgZ(0,"button",1),l.NdJ("click",function(){l.CHM(t);const e=l.oxw();return e.opened?e.close():e.expand()}),l.ALo(1,"translate"),l.YNc(2,Rt,2,0,"mat-icon",2),l.YNc(3,It,2,0,"mat-icon",2),l.qZA()}if(2&t){const t=l.oxw();l.Q6J("matTooltip",l.lcZ(1,3,"components.expander."+(t.opened?"close":"expand"))),l.xp6(2),l.Q6J("ngIf",!t.opened),l.xp6(1),l.Q6J("ngIf",t.opened)}}let Bt=(()=>{class t{constructor(){this.onExpand=new l.vpe,this.onClose=new l.vpe}expand(){this.opened=!0,this.parent.classList.add("expanded-element"),this.toggleOverflowers(),this.onExpand.next()}close(){this.opened=!1,this.parent.classList.remove("expanded-element"),this.toggleOverflowers(!1),this.onClose.next()}toggleOverflowers(t=!0){this.overflowParents.forEach(e=>e.classList[t?"add":"remove"]("expander-no-overflow"))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=l.Xpm({type:t,selectors:[["expander"]],inputs:{overflowParents:"overflowParents",parent:"parent"},outputs:{onExpand:"onExpand",onClose:"onClose"},decls:1,vars:1,consts:[["mat-mini-fab","","class","expander",3,"matTooltip","click",4,"ngIf"],["mat-mini-fab","",1,"expander",3,"matTooltip","click"],[4,"ngIf"]],template:function(t,e){1&t&&l.YNc(0,Zt,4,5,"button",0),2&t&&l.Q6J("ngIf",e.parent)},directives:[a.O5,s.lW,r.gM,o.Hw],pipes:[n.X$],styles:["[_ngcontent-%COMP%]:root{--pallete-primary:#000;--pallete-accent:#000;--sidenav-width:200px} .expanded-element{position:fixed;z-index:2;top:0;bottom:0;left:0;right:0} .expander.mat-mini-fab{box-shadow:none} .expanded-element{border-radius:0;z-index:10000000;margin:0 0 0 var(--sidenav-width)!important;width:calc(var(--innerWidth) - var(--sidenav-width))!important} .is-mobile .expanded-element{margin-left:0!important;width:100vw!important} .expander-no-overflow{overflow:unset!important}"]}),t})();var Ft=i(7217),Dt=i(373),Ut=i(9861),qt=i(6136),zt=i(7853),Yt=i(7388);const Gt=["input"],Jt=function(t){return{enterDuration:t}},Qt=["*"],$t=new l.OlP("mat-checkbox-default-options",{providedIn:"root",factory:Wt});function Wt(){return{color:"accent",clickAction:"check-indeterminate"}}let Kt=0;const Xt=Wt(),te={provide:d.JU,useExisting:(0,l.Gpc)(()=>re),multi:!0};class ee{}class ie{constructor(t){this._elementRef=t}}const ne=(0,j.sb)((0,j.pj)((0,j.Kr)((0,j.Id)(ie))));let re=(()=>{class t extends ne{constructor(t,e,i,n,r,s,o){super(t),this._changeDetectorRef=e,this._focusMonitor=i,this._ngZone=n,this._animationMode=s,this._options=o,this.ariaLabel="",this.ariaLabelledby=null,this._uniqueId="mat-checkbox-"+ ++Kt,this.id=this._uniqueId,this.labelPosition="after",this.name=null,this.change=new l.vpe,this.indeterminateChange=new l.vpe,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||Xt,this.color=this.defaultColor=this._options.color||Xt.color,this.tabIndex=parseInt(r)||0}get inputId(){return`${this.id||this._uniqueId}-input`}get required(){return this._required}set required(t){this._required=(0,Ut.Ig)(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{t||Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}),this._syncIndeterminate(this._indeterminate)}ngAfterViewChecked(){}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}get checked(){return this._checked}set checked(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){const e=(0,Ut.Ig)(t);e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(t){const e=t!=this._indeterminate;this._indeterminate=(0,Ut.Ig)(t),e&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(t){this.checked=!!t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_getAriaChecked(){return this.checked?"true":this.indeterminate?"mixed":"false"}_transitionCheckState(t){let e=this._currentCheckState,i=this._elementRef.nativeElement;if(e!==t&&(this._currentAnimationClass.length>0&&i.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){i.classList.add(this._currentAnimationClass);const t=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{i.classList.remove(t)},1e3)})}}_emitChangeEvent(){const t=new ee;t.source=this,t.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(t),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked}_onInputClick(t){var e;const i=null===(e=this._options)||void 0===e?void 0:e.clickAction;t.stopPropagation(),this.disabled||"noop"===i?this.disabled||"noop"!==i||(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==i&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this.toggle(),this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}focus(t,e){t?this._focusMonitor.focusVia(this._inputElement,t,e):this._inputElement.nativeElement.focus(e)}_onInteractionEvent(t){t.stopPropagation()}_getAnimationClassForCheckStateTransition(t,e){if("NoopAnimations"===this._animationMode)return"";let i="";switch(t){case 0:if(1===e)i="unchecked-checked";else{if(3!=e)return"";i="unchecked-indeterminate"}break;case 2:i=1===e?"unchecked-checked":"unchecked-indeterminate";break;case 1:i=2===e?"checked-unchecked":"checked-indeterminate";break;case 3:i=1===e?"indeterminate-checked":"indeterminate-unchecked"}return`mat-checkbox-anim-${i}`}_syncIndeterminate(t){const e=this._inputElement;e&&(e.nativeElement.indeterminate=t)}}return t.\u0275fac=function(e){return new(e||t)(l.Y36(l.SBq),l.Y36(l.sBO),l.Y36(Yt.tE),l.Y36(l.R0b),l.$8M("tabindex"),l.Y36(qt.Qb,8),l.Y36($t,8))},t.\u0275cmp=l.Xpm({type:t,selectors:[["mat-checkbox"]],viewQuery:function(t,e){if(1&t&&(l.Gf(Gt,5),l.Gf(j.wG,5)),2&t){let t;l.iGM(t=l.CRH())&&(e._inputElement=t.first),l.iGM(t=l.CRH())&&(e.ripple=t.first)}},hostAttrs:[1,"mat-checkbox"],hostVars:12,hostBindings:function(t,e){2&t&&(l.Ikx("id",e.id),l.uIk("tabindex",null),l.ekj("mat-checkbox-indeterminate",e.indeterminate)("mat-checkbox-checked",e.checked)("mat-checkbox-disabled",e.disabled)("mat-checkbox-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],id:"id",labelPosition:"labelPosition",name:"name",required:"required",checked:"checked",disabled:"disabled",indeterminate:"indeterminate",ariaDescribedby:["aria-describedby","ariaDescribedby"],value:"value"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[l._Bn([te]),l.qOj],ngContentSelectors:Qt,decls:17,vars:21,consts:[[1,"mat-checkbox-layout"],["label",""],[1,"mat-checkbox-inner-container"],["type","checkbox",1,"mat-checkbox-input","cdk-visually-hidden",3,"id","required","checked","disabled","tabIndex","change","click"],["input",""],["matRipple","",1,"mat-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleRadius","matRippleCentered","matRippleAnimation"],[1,"mat-ripple-element","mat-checkbox-persistent-ripple"],[1,"mat-checkbox-frame"],[1,"mat-checkbox-background"],["version","1.1","focusable","false","viewBox","0 0 24 24",0,"xml","space","preserve",1,"mat-checkbox-checkmark"],["fill","none","stroke","white","d","M4.1,12.7 9,17.6 20.3,6.3",1,"mat-checkbox-checkmark-path"],[1,"mat-checkbox-mixedmark"],[1,"mat-checkbox-label",3,"cdkObserveContent"],["checkboxLabel",""],[2,"display","none"]],template:function(t,e){if(1&t&&(l.F$t(),l.TgZ(0,"label",0,1),l.TgZ(2,"span",2),l.TgZ(3,"input",3,4),l.NdJ("change",function(t){return e._onInteractionEvent(t)})("click",function(t){return e._onInputClick(t)}),l.qZA(),l.TgZ(5,"span",5),l._UZ(6,"span",6),l.qZA(),l._UZ(7,"span",7),l.TgZ(8,"span",8),l.O4$(),l.TgZ(9,"svg",9),l._UZ(10,"path",10),l.qZA(),l.kcU(),l._UZ(11,"span",11),l.qZA(),l.qZA(),l.TgZ(12,"span",12,13),l.NdJ("cdkObserveContent",function(){return e._onLabelTextChange()}),l.TgZ(14,"span",14),l._uU(15,"\xa0"),l.qZA(),l.Hsn(16),l.qZA(),l.qZA()),2&t){const t=l.MAs(1),i=l.MAs(13);l.uIk("for",e.inputId),l.xp6(2),l.ekj("mat-checkbox-inner-container-no-side-margin",!i.textContent||!i.textContent.trim()),l.xp6(1),l.Q6J("id",e.inputId)("required",e.required)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex),l.uIk("value",e.value)("name",e.name)("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby)("aria-checked",e._getAriaChecked())("aria-describedby",e.ariaDescribedby),l.xp6(2),l.Q6J("matRippleTrigger",t)("matRippleDisabled",e._isRippleDisabled())("matRippleRadius",20)("matRippleCentered",!0)("matRippleAnimation",l.VKq(19,Jt,"NoopAnimations"===e._animationMode?0:150))}},directives:[j.wG,zt.wD],styles:["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-ripple{outline:solid 3px}.mat-checkbox-layout{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}\n"],encapsulation:2,changeDetection:0}),t})(),se=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=l.oAB({type:t}),t.\u0275inj=l.cJS({}),t})(),oe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=l.oAB({type:t}),t.\u0275inj=l.cJS({imports:[[j.si,j.BQ,zt.Q8,se],j.BQ,se]}),t})(),ae=(()=>{class t{transform(t,e,i){return e&&i?t.split(e).join(i):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=l.Yjl({name:"replace",type:t,pure:!0}),t})();function le(t,e){1&t&&l._UZ(0,"select-project-warning")}function ce(t,e){1&t&&(l.TgZ(0,"div",7),l._uU(1),l.ALo(2,"translate"),l.qZA()),2&t&&(l.xp6(1),l.hij(" ",l.lcZ(2,1,"map-view.toolbar-title")," "))}function ue(t,e){if(1&t&&(l.TgZ(0,"div",10),l.ALo(1,"translate"),l.ALo(2,"replace"),l.ALo(3,"number"),l.TgZ(4,"div",11),l._uU(5),l.ALo(6,"translate"),l.qZA(),l.TgZ(7,"div",12),l._uU(8),l.ALo(9,"replace"),l.ALo(10,"number"),l.qZA(),l.qZA()),2&t){const t=e.$implicit,i=l.oxw(2);l.Q6J("matTooltipShowDelay",1e3)("matTooltip",t.label+l.lcZ(1,5,"map-view.on-state")+": "+l.Dn7(2,7,l.lcZ(3,11,i.stateData[t.id].value),",",".")),l.xp6(5),l.AsE(" ",t.label," ",l.lcZ(6,13,"map-view.on-state")," "),l.xp6(3),l.hij(" ",l.Dn7(9,15,l.lcZ(10,19,i.stateData[t.id].value),",",".")," ")}}function he(t,e){if(1&t&&(l.TgZ(0,"div",8),l.YNc(1,ue,11,21,"div",9),l.ALo(2,"slice"),l.qZA()),2&t){const t=l.oxw();l.xp6(1),l.Q6J("ngForOf",l.Dn7(2,1,t.mapFilters.meta,0,t.maxShownFeaturedCards))}}function pe(t,e){if(1&t&&(l.TgZ(0,"span"),l._uU(1),l.ALo(2,"translate"),l.qZA()),2&t){const t=l.oxw(3);l.xp6(1),l.hij(" ",l.lcZ(2,1,null==t.selectedMapRegion?null:t.selectedMapRegion.descriptor),": ")}}function de(t,e){if(1&t&&(l.TgZ(0,"mat-option",41),l._uU(1),l.qZA()),2&t){const t=e.$implicit;l.Q6J("value",t),l.xp6(1),l.hij(" ",t.label," ")}}function fe(t,e){if(1&t&&(l.TgZ(0,"mat-option",42),l._uU(1),l.ALo(2,"translate"),l._UZ(3,"help-icon",43),l.qZA()),2&t){const t=e.$implicit;l.Q6J("value",t),l.xp6(1),l.hij(" ",l.lcZ(2,4,t.label)," "),l.xp6(2),l.Q6J("diameter",24)("text",t.labelHelp)}}function be(t,e){if(1&t&&(l.TgZ(0,"mat-option",41),l._uU(1),l.ALo(2,"translate"),l.qZA()),2&t){const t=e.$implicit;l.Q6J("value",t),l.xp6(1),l.hij(" ",l.lcZ(2,2,t)," ")}}const me=function(){return["DF","RO","MT","PE","MA","SC"]};function ve(t,e){if(1&t){const t=l.EpF();l.TgZ(0,"state-map",44,45),l.NdJ("selectionChanged",function(e){return l.CHM(t),l.oxw(3).changeSelectedRegion(e)}),l.qZA()}if(2&t){const t=l.oxw(3);l.Q6J("applyZoom",l.DdM(4,me).indexOf(t.lastSelectedState.initials)<0)("showZero",t.showZero)("selectedMeta",t.selectedMeta)("mapFilters",t.mapFilters)}}function ge(t,e){if(1&t){const t=l.EpF();l.TgZ(0,"mat-checkbox",46),l.NdJ("ngModelChange",function(){return l.CHM(t),l.oxw(3).onZeroRuleChange()})("ngModelChange",function(e){return l.CHM(t),l.oxw(3).showZero=e}),l._uU(1),l.ALo(2,"translate"),l.qZA()}if(2&t){const t=l.oxw(3);l.Q6J("ngModel",t.showZero),l.xp6(1),l.hij(" ",l.lcZ(2,2,"map-view.state-map.ignore-zero")," ")}}const ye=function(t){return{"display-none":t}};function we(t,e){if(1&t&&(l._UZ(0,"div",47),l.ALo(1,"translate")),2&t){const t=e.$implicit,i=e.index,n=l.oxw(3);l.Gre("legend-item ",t.class,""),l.Q6J("ngClass",l.VKq(7,ye,0===i&&!n.showZero&&"BALANCE"!==(null==n.selectedChip?null:n.selectedChip.value)))("matTooltip",l.lcZ(1,5,t.tooltip))}}const xe=function(t){return[t]};function Oe(t,e){if(1&t){const t=l.EpF();l.TgZ(0,"div",23,24),l.TgZ(2,"div",17),l.TgZ(3,"div",18),l.YNc(4,pe,3,3,"span",1),l._uU(5),l.qZA(),l.TgZ(6,"div",20),l.TgZ(7,"button",25),l.NdJ("click",function(){return l.CHM(t),l.oxw(2).openFilters()}),l.TgZ(8,"mat-icon"),l._uU(9,"filter_alt"),l.qZA(),l.qZA(),l.TgZ(10,"expander",21),l.NdJ("onExpand",function(){l.CHM(t);const e=l.MAs(1),i=l.oxw(2);return e.classList.add("big-map"),i.stateMap.resize()})("onClose",function(){l.CHM(t);const e=l.MAs(1),i=l.oxw(2);return e.classList.remove("big-map"),i.stateMap.resize()}),l.qZA(),l.qZA(),l.qZA(),l.TgZ(11,"div",26),l.TgZ(12,"mat-form-field",27),l.TgZ(13,"mat-label"),l._uU(14),l.ALo(15,"translate"),l.qZA(),l.TgZ(16,"mat-select",28),l.NdJ("ngModelChange",function(e){return l.CHM(t),l.oxw(2).onMetaChange(e)})("ngModelChange",function(e){return l.CHM(t),l.oxw(2).selectedMeta=e}),l.YNc(17,de,2,2,"mat-option",29),l.qZA(),l.qZA(),l.TgZ(18,"mat-form-field",27),l.TgZ(19,"mat-label"),l._uU(20),l.ALo(21,"translate"),l.qZA(),l.TgZ(22,"mat-select",28),l.NdJ("ngModelChange",function(e){return l.CHM(t),l.oxw(2).changeColorStrategy(e)})("ngModelChange",function(e){return l.CHM(t),l.oxw(2).selectedChip=e}),l.TgZ(23,"mat-select-trigger"),l._uU(24),l.ALo(25,"translate"),l.qZA(),l.YNc(26,fe,4,6,"mat-option",30),l.qZA(),l.qZA(),l.TgZ(27,"mat-form-field",27),l.TgZ(28,"mat-label"),l._uU(29),l.ALo(30,"translate"),l.qZA(),l.TgZ(31,"button",31),l.NdJ("click",function(e){return l.CHM(t),l.oxw(2).changePeriod(-1),e.stopPropagation()}),l.TgZ(32,"mat-icon"),l._uU(33,"arrow_back_ios"),l.qZA(),l.qZA(),l.TgZ(34,"button",32),l.NdJ("click",function(e){return l.CHM(t),l.oxw(2).changePeriod(1),e.stopPropagation()}),l.TgZ(35,"mat-icon"),l._uU(36,"arrow_forward_ios"),l.qZA(),l.qZA(),l.TgZ(37,"mat-select",28),l.NdJ("ngModelChange",function(e){return l.CHM(t),l.oxw(2).onPeriodChange(e)})("ngModelChange",function(e){return l.CHM(t),l.oxw(2).selectedPeriod=e}),l.TgZ(38,"mat-select-trigger"),l._uU(39),l.qZA(),l.YNc(40,be,3,4,"mat-option",29),l.qZA(),l.qZA(),l.qZA(),l.YNc(41,ve,2,5,"state-map",33),l.TgZ(42,"div",34),l.TgZ(43,"div",18),l.YNc(44,ge,3,4,"mat-checkbox",35),l.TgZ(45,"div",36),l.YNc(46,we,2,9,"div",37),l.qZA(),l.qZA(),l.TgZ(47,"div",38),l.TgZ(48,"button",39),l.NdJ("click",function(){return l.CHM(t),l.oxw(2).seeMoreDetails()}),l.ALo(49,"translate"),l.TgZ(50,"mat-icon"),l._uU(51,"read_more"),l.qZA(),l.qZA(),l.TgZ(52,"button",40),l.NdJ("click",function(){return l.CHM(t),l.oxw(2).resetMap()}),l.TgZ(53,"mat-icon"),l._uU(54,"zoom_out"),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.qZA()}if(2&t){const t=l.MAs(1),e=l.oxw(2),i=l.MAs(4);l.xp6(4),l.Q6J("ngIf",null==e.selectedMapRegion?null:e.selectedMapRegion.descriptor),l.xp6(1),l.hij(" ",null==e.selectedMapRegion?null:e.selectedMapRegion.name," "),l.xp6(2),l.Q6J("matBadge",e.filtersUsed)("matBadgeHidden",0===e.filtersUsed),l.xp6(3),l.Q6J("overflowParents",l.VKq(35,xe,i))("parent",t),l.xp6(4),l.Oqu(l.lcZ(15,25,"map-view.state-map.interest-data")),l.xp6(2),l.Q6J("ngModel",e.selectedMeta),l.xp6(1),l.Q6J("ngForOf",e.interestDataOptions),l.xp6(3),l.Oqu(l.lcZ(21,27,"map-view.state-map.color-strategy")),l.xp6(2),l.Q6J("ngModel",e.selectedChip),l.xp6(2),l.hij(" ",l.lcZ(25,29,null==e.selectedChip?null:e.selectedChip.label)," "),l.xp6(2),l.Q6J("ngForOf",e.colorStrategyChips),l.xp6(3),l.Oqu(l.lcZ(30,31,"app.header.period-selector-label")),l.xp6(2),l.Q6J("disabled",!e.periodArrowState.backward),l.xp6(3),l.Q6J("disabled",!e.periodArrowState.forward),l.xp6(3),l.Q6J("ngModel",e.selectedPeriod),l.xp6(2),l.Oqu(e.selectedPeriod),l.xp6(1),l.Q6J("ngForOf",e.periods),l.xp6(1),l.Q6J("ngIf",e.showingMap),l.xp6(3),l.Q6J("ngIf","BALANCE"!==(null==e.selectedChip?null:e.selectedChip.value)),l.xp6(2),l.Q6J("ngForOf",null==e.selectedChip?null:e.selectedChip.legend),l.xp6(2),l.Q6J("matTooltip",l.lcZ(49,33,"map-view.more-details")),l.xp6(4),l.Q6J("disabled","model-constants.state"===(null==e.selectedMapRegion?null:e.selectedMapRegion.descriptor))("matTooltip",e.zoomOutTooltip)}}function Se(t,e){if(1&t&&(l.TgZ(0,"span"),l._uU(1),l.ALo(2,"translate"),l.qZA()),2&t){const t=l.oxw(2);l.xp6(1),l.hij(" ",l.lcZ(2,1,null==t.selectedMapRegion?null:t.selectedMapRegion.descriptor),": ")}}function _e(t,e){if(1&t){const t=l.EpF();l.TgZ(0,"div",13),l.YNc(1,Oe,55,37,"div",14),l.TgZ(2,"div",15,16),l.TgZ(4,"div",17),l.TgZ(5,"div",18),l._uU(6),l.ALo(7,"translate"),l.TgZ(8,"span",19),l.YNc(9,Se,3,3,"span",1),l._uU(10),l.qZA(),l.qZA(),l.TgZ(11,"div",20),l.TgZ(12,"expander",21),l.NdJ("onExpand",function(){l.CHM(t);const e=l.oxw();return e.filterEvolution(e.selectedMapRegion)})("onClose",function(){l.CHM(t);const e=l.oxw();return e.filterEvolution(e.selectedMapRegion)}),l.qZA(),l.qZA(),l.qZA(),l._UZ(13,"div",22),l.qZA(),l.qZA()}if(2&t){const t=l.MAs(3),e=l.oxw(),i=l.MAs(4);l.xp6(1),l.Q6J("ngIf",e.mapFilters),l.xp6(5),l.hij(" ",l.lcZ(7,6,"map-view.evolution.title")," - "),l.xp6(3),l.Q6J("ngIf",null==e.selectedMapRegion?null:e.selectedMapRegion.descriptor),l.xp6(1),l.hij(" ",null==e.selectedMapRegion?null:e.selectedMapRegion.name," "),l.xp6(2),l.Q6J("overflowParents",l.VKq(8,xe,i))("parent",t)}}let ke=(()=>{class t{constructor(t,e,i,n,r,s,o){this.cdr=t,this.dialog=e,this.pubsub=i,this.engineService=n,this.translateService=r,this.userAgent=s,this.router=o,this.filtersUsed=0,this.canChangeInterestData=!0,this.periods=[],this.maxShownFeaturedCards=4,this.interestDataOptions=[],this.showingMap=!0,this.showZero=!0,this.periodArrowState={forward:!1,backward:!0},this.colorStrategyChips=[{id:1,label:"map-view.state-map.chips.min-max",labelHelp:"map-view.state-map.chips-help.min-max",value:T.COLOR_STRATEGIES.minMax,legend:[{tooltip:"",class:"level-0"},{tooltip:"",class:"level-1"},{tooltip:"",class:"level-2"},{tooltip:"",class:"level-3"},{tooltip:"",class:"level-4"},{tooltip:"",class:"level-5"}]},{id:2,label:"map-view.state-map.chips.percentile",labelHelp:"map-view.state-map.chips-help.percentile",value:T.COLOR_STRATEGIES.percentile,legend:[{tooltip:"",class:"level-0"},{tooltip:"",class:"level-1"},{tooltip:"",class:"level-2"},{tooltip:"",class:"level-3"},{tooltip:"",class:"level-4"},{tooltip:"",class:"level-5"}]},{id:3,label:"map-view.state-map.chips.log",labelHelp:"map-view.state-map.chips-help.log",value:T.COLOR_STRATEGIES.log,legend:[{tooltip:"",class:"level-0"},{tooltip:"",class:"level-1"},{tooltip:"",class:"level-2"},{tooltip:"",class:"level-3"},{tooltip:"",class:"level-4"},{tooltip:"",class:"level-5"}]},{id:4,label:"map-view.state-map.chips.balance",labelHelp:"map-view.state-map.chips-help.balance",value:T.COLOR_STRATEGIES.balance,legend:[{tooltip:"",class:"balance-negative"},{tooltip:"",class:"balance-half-negative"},{tooltip:"",class:"balance-zero"},{tooltip:"",class:"balance-half-positive"},{tooltip:"",class:"balance-positive"}]}],this.evolutionDataChartOptions={curveType:"function",height:400,legend:{position:"top"}},this.subscriptions=[]}ngOnInit(){var t;this.subscriptions.push(this.pubsub.get(O.Y.GLOBAL_PROJECT_CHANGE).pipe((0,g.h)(Boolean)).subscribe(t=>{this.lastSelectedProject&&t.slug!==this.lastSelectedProject.slug&&this.loadEvolutionData(this.lastSelectedState,()=>{this.filterEvolution(this.selectedMapRegion,this.lastSelectedPlotlyDescriptor)}),this.lastSelectedProject=t}),this.pubsub.getAsBehaviorSubject(O.Y.GET_GLOBAL_PERIODS).pipe((0,g.h)(Boolean)).subscribe(t=>this.periods=t),this.pubsub.getAsBehaviorSubject(O.Y.GLOBAL_PERIOD_CHANGE).pipe((0,g.h)(t=>t!==this.selectedPeriod)).subscribe(t=>this.selectedPeriod=t)),this.subscriptions.push((0,x.aj)([this.pubsub.getAsBehaviorSubject(O.Y.GLOBAL_STATE_CHANGE),this.pubsub.getAsBehaviorSubject(O.Y.GLOBAL_PERIOD_CHANGE)]).pipe((0,g.h)(([t,e])=>Boolean(t)&&Boolean(e)),(0,y.b)(100),(0,V.w)(([t,e])=>(this.lastSelectedState=t,this.showingMap=!1,setTimeout(()=>this.showingMap=!0,0),this.engineService.getEngineData(t,e)))).subscribe(t=>{var e,i;this.interestDataOptions=t.meta,this.mapFilters=t,this.stateData=null===(i=null===(e=this.mapFilters)||void 0===e?void 0:e.uf)||void 0===i?void 0:i.values;const n=sessionStorage.getItem("last-selected-meta");let r=this.mapFilters.meta[0];n&&(r=this.mapFilters.meta.find(({id:t})=>`${t}`===n)),this.selectedMeta=r;const s=sessionStorage.getItem("last-loaded-chip");let o=this.colorStrategyChips[0];s&&(o=this.colorStrategyChips.find(({id:t})=>`${t}`===s)),setTimeout(()=>{this.changeColorStrategy(o),this.applyFilters()},100),this.loadedStateData=!1,this.selectedChip=null,this.initiated=!0})),this.subscriptions.push(this.pubsub.get(O.Y.MAP_APPLIED_COLOR_STRATEGY).pipe((0,y.b)(300)).subscribe(t=>{this.updateLegends(t),this.canChangeInterestData=!0,this.cdr.detectChanges()})),this.subscriptions.push((0,x.aj)([null===(t=this.translateService)||void 0===t?void 0:t.get("map-view.zoom-out-tooltip"),this.translateService.get("map-view.zoom-out-tooltip-ios")]).subscribe(([t,e])=>this.zoomOutTooltip=this.userAgent.isIOS()?e:t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}onPeriodChange(t){this.pubsub.emitAsBehaviorSubject(O.Y.GLOBAL_PERIOD_CHANGE,t),this.pubsub.emit(O.Y.MAP_CHANGE_COLOR_STRATEGY,this.selectedChip)}changePeriod(t){const e=this.periods.findIndex(t=>t===this.selectedPeriod),i=e+t;if(this.periodArrowState.backward=!0,this.periodArrowState.forward=!0,0===e&&i<0)return void(this.periodArrowState.backward=!1);if(i>=this.periods.length)return void(this.periodArrowState.forward=!1);const n=this.periods[e+t];this.selectedPeriod=n,this.onPeriodChange(n)}changeColorStrategy(t,e=!1){var i;((null===(i=this.selectedChip)||void 0===i?void 0:i.id)!==t.id||e)&&(sessionStorage.setItem("last-loaded-chip",t.id),this.selectedChip=t,this.pubsub.emit(O.Y.MAP_CHANGE_COLOR_STRATEGY,t))}openFilters(){var t,e;const i=this.dialog.open(Mt,{maxWidth:"750px",maxHeight:"500px",width:"100vw",height:`${innerHeight}px`,panelClass:"modal-panel",data:{selectedValues:null===(t=this.mapFilters)||void 0===t?void 0:t.values,categories:null===(e=this.mapFilters)||void 0===e?void 0:e.categories}});this.subscriptions.push(i.afterClosed().pipe((0,g.h)(Boolean)).subscribe(t=>{this.filtersUsed=t.filtersUsed,this.lastFilterState=C.clone(t),this.applyFilters()}))}seeMoreDetails(){localStorage.setItem("details-dataset",JSON.stringify(this.selectedMapRegion)),this.router.navigate(["region-details"])}resetMap(){this.pubsub.emit(O.Y.MAP_ZOOM_RESET)}changeSelectedRegion(t){var e,i,n,r,s,o,a,l;this.selectedMapRegion=t;let c=[];t instanceof A.Z&&!this.loadedStateData?(this.stateData=null===(i=null===(e=this.mapFilters)||void 0===e?void 0:e.uf)||void 0===i?void 0:i.values,this.loadedStateData=!0,this.loadEvolutionData(t,()=>{this.filterEvolution(t,"uf")})):t instanceof P.y?(c=null===(r=null===(n=this.mapFilters.mesoregion)||void 0===n?void 0:n.find(e=>e.id===t.id))||void 0===r?void 0:r.values,this.filterEvolution(t,"mesoregion")):t instanceof L.d?(c=null===(o=null===(s=this.mapFilters.microregion)||void 0===s?void 0:s.find(e=>e.id===t.id))||void 0===o?void 0:o.values,this.filterEvolution(t,"microregion")):(c=null===(l=null===(a=this.mapFilters.municipalities)||void 0===a?void 0:a.find(e=>e.id===t.id))||void 0===l?void 0:l.values,this.filterEvolution(t,"municipalities")),this.selectedMapRegionFilterData=c,this.cdr.detectChanges()}onMetaChange(t){this.canChangeInterestData=!1,sessionStorage.setItem("last-selected-meta",t.id),this.pubsub.emit(O.Y.MAP_CHANGE_COLOR_STRATEGY,this.selectedChip)}onZeroRuleChange(){setTimeout(()=>this.changeColorStrategy(this.selectedChip,!0),0)}loadEvolutionData(t,e=null){this.subscriptions.push(this.engineService.getEngineEvolution(t).subscribe(t=>{this.evolutionData=t,e&&e()}))}applyFilters(){this.lastFilterState&&(this.mapFilters=C.clone(this.lastFilterState),this.changeSelectedRegion(this.selectedMapRegion))}updateLegends(t){switch(this.selectedChip.id){case 1:this.colorStrategyChips[0].legend.forEach((e,i)=>{0===i?e.tooltip="Zero":(e.tooltip=`A partir de ${v.R.formatValues(t.minMaxRatioGroups[i-1].value)}`,1!==i||this.showZero||(e.tooltip+=" ou zero"))});break;case 2:this.colorStrategyChips[1].legend.forEach((e,i)=>{0===i?e.tooltip="Zero":1===i?(e.tooltip=`At\xe9 ${v.R.formatValues(t.percentilesGroups[i-1].value)}`,1!==i||this.showZero||(e.tooltip+=" ou zero")):e.tooltip=`A partir de ${v.R.formatValues(t.percentilesGroups[i-2].value)}`});break;case 3:this.colorStrategyChips[2].legend.forEach((e,i)=>{0===i?e.tooltip="Zero":(e.tooltip=`A partir de ${v.R.formatValues(t.logRatioGroups[i-1].value)}`,1!==i||this.showZero||(e.tooltip+=" ou zero"))});break;case 4:this.colorStrategyChips[3].legend[0].tooltip=t.balanceGroups.maxNegative?`A partir de ${v.R.formatValues(t.balanceGroups.maxNegative)}`:"Indefinido",this.colorStrategyChips[3].legend[1].tooltip=t.balanceGroups.halfNegative?`A partir de ${v.R.formatValues(t.balanceGroups.halfNegative)}`:"Indefinido",this.colorStrategyChips[3].legend[2].tooltip="Zero",this.colorStrategyChips[3].legend[3].tooltip=t.balanceGroups.halfPositive?`At\xe9 ${v.R.formatValues(t.balanceGroups.halfPositive)}`:"Indefinido",this.colorStrategyChips[3].legend[4].tooltip=t.balanceGroups.maxPositive?`At\xe9 ${v.R.formatValues(t.balanceGroups.maxPositive)}`:"Indefinido"}}filterEvolution(t,e=this.lastSelectedPlotlyDescriptor){setTimeout(()=>{this.lastSelectedPlotlyDescriptor=e;const i=document.querySelector("#evolution-chart"),n=this.evolutionData[e][t.id];if(!n)return;const r=this.evolutionData.dataFor.map((t,e)=>({y:n.numericEvolution[e].value,x:this.evolutionData.periods,mode:"lines",name:t})),s={xaxis:{type:"category",title:"Per\xedodo"},yaxis:{title:"Incid\xeancia"}};innerWidth<1700&&(s.legend={orientation:"h",y:-.75}),Nt.newPlot(i,r,s,{responsive:!0})},0)}}return t.\u0275fac=function(e){return new(e||t)(l.Y36(l.sBO),l.Y36(M.uw),l.Y36(_.A),l.Y36(N.S),l.Y36(n.sK),l.Y36(jt.V),l.Y36(p.F0))},t.\u0275cmp=l.Xpm({type:t,selectors:[["app-map-view"]],decls:7,vars:4,consts:[[1,"map-view-wrapper"],[4,"ngIf"],["class","toolbar",4,"ngIf"],[1,"scroll-wrapper"],["scrollWrapper",""],["class","featured-data-wrapper",4,"ngIf"],["class","map-view-content",4,"ngIf"],[1,"toolbar"],[1,"featured-data-wrapper"],["class","featured-data-item","matTooltipPosition","above",3,"matTooltipShowDelay","matTooltip",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"featured-data-item",3,"matTooltipShowDelay","matTooltip"],[1,"featured-data-item-label"],[1,"featured-data-item-value"],[1,"map-view-content"],["class","map-card card",4,"ngIf"],[1,"evolution-card","card"],["evolutionCard",""],[1,"card-title"],[1,"left"],[1,"locality"],[1,"right"],[2,"margin-left","16px",3,"overflowParents","parent","onExpand","onClose"],["id","evolution-chart"],[1,"map-card","card"],["mapCard",""],["matBadgePosition","before","mat-mini-fab","",1,"filter",3,"matBadge","matBadgeHidden","click"],[1,"map-options"],["appearance","outline",1,"select-data-parameter-map"],[3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","color-strategy-option",3,"value",4,"ngFor","ngForOf"],["matPrefix","","mat-icon-button","",3,"disabled","click"],["matSuffix","","mat-icon-button","",3,"disabled","click"],[3,"applyZoom","showZero","selectedMeta","mapFilters","selectionChanged",4,"ngIf"],[1,"card-footer"],["class","ignore-zero",3,"ngModel","ngModelChange",4,"ngIf"],[1,"legend"],["matTooltipPosition","above",3,"ngClass","class","matTooltip",4,"ngFor","ngForOf"],[1,"button-wrapper"],["mat-mini-fab","","color","accent",1,"more-details-button",3,"matTooltip","click"],["mat-mini-fab","","color","accent",3,"disabled","matTooltip","click"],[3,"value"],[1,"color-strategy-option",3,"value"],["tooltipPosition","before",3,"diameter","text"],[3,"applyZoom","showZero","selectedMeta","mapFilters","selectionChanged"],["stateMap",""],[1,"ignore-zero",3,"ngModel","ngModelChange"],["matTooltipPosition","above",3,"ngClass","matTooltip"]],template:function(t,e){1&t&&(l.TgZ(0,"div",0),l.YNc(1,le,1,0,"select-project-warning",1),l.YNc(2,ce,3,3,"div",2),l.TgZ(3,"div",3,4),l.YNc(5,he,3,5,"div",5),l.YNc(6,_e,14,10,"div",6),l.qZA(),l.qZA()),2&t&&(l.xp6(1),l.Q6J("ngIf",!e.initiated),l.xp6(1),l.Q6J("ngIf",e.initiated),l.xp6(3),l.Q6J("ngIf",(null==e.stateData?null:e.stateData.length)&&(null==e.mapFilters||null==e.mapFilters.meta?null:e.mapFilters.meta.length)&&e.initiated),l.xp6(1),l.Q6J("ngIf",e.initiated))},directives:[a.O5,Ht.D,a.sg,r.gM,Bt,s.lW,Ft.k,o.Hw,f.KE,f.hX,b.gD,d.JJ,d.On,b.$L,f.qo,f.R9,j.ey,Dt.w,T,re,a.mk],pipes:[n.X$,a.OU,ae,a.JJ],styles:["[_ngcontent-%COMP%]:root{--pallete-primary:#000;--pallete-accent:#000;--sidenav-width:200px} .color-strategy-option .mat-option-text, .map-view-wrapper .card-footer, .map-view-wrapper .card-footer .legend, .map-view-wrapper .map-card .card-title, .map-view-wrapper .map-card .map-options, .map-view-wrapper .map-view-content, .map-view-wrapper .toolbar{display:flex} .map-view-wrapper .card-footer .legend{align-items:center;justify-content:flex-start} .color-strategy-option .mat-option-text, .map-view-wrapper .card-footer, .map-view-wrapper .map-card .card-title, .map-view-wrapper .toolbar{align-items:center;justify-content:space-between} .map-view-wrapper .map-card .map-options{align-items:flex-start;justify-content:space-between} .map-view-wrapper .map-view-content{align-items:flex-start;justify-content:flex-start} .map-view-wrapper{overflow:hidden} .map-view-wrapper .scroll-wrapper{height:calc(var(--innerHeight) - 128px);overflow-y:auto;padding-bottom:24px} .map-view-wrapper .card-title{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .map-view-wrapper .card-title .left{width:calc(100% - 96px);white-space:normal} .map-view-wrapper .more-details-button{margin-right:12px} .map-view-wrapper .map-options{flex-wrap:wrap} .map-view-wrapper .select-data-parameter-map{min-width:250px;width:49%} .map-view-wrapper .select-data-parameter-map:first-child{width:100%} .map-view-wrapper .card-footer .legend-item{width:30px;height:30px;border-radius:100%;background-color:#e8e8e8;margin-right:16px;border:2px solid #333} .map-view-wrapper .card-footer .legend-item.balance-positive{margin-right:0;background:var(--state-map-pallete-balance-positive)} .map-view-wrapper .card-footer .legend-item.balance-half-positive{background:var(--state-map-pallete-balance-half-positive)} .map-view-wrapper .card-footer .legend-item.balance-negative{background:var(--state-map-pallete-balance-negative)} .map-view-wrapper .card-footer .legend-item.balance-half-negative{background:var(--state-map-pallete-balance-half-negative)} .map-view-wrapper .card-footer .legend-item.balance-zero{background:var(--state-map-pallete-balance-zero)} .map-view-wrapper .card-footer .legend-item.level-0{background:var(--map-color-value-0)} .map-view-wrapper .card-footer .legend-item.level-1{background:var(--state-map-pallete-type-1-level-1)} .map-view-wrapper .card-footer .legend-item.level-2{background:var(--state-map-pallete-type-1-level-2)} .map-view-wrapper .card-footer .legend-item.level-3{background:var(--state-map-pallete-type-1-level-3)} .map-view-wrapper .card-footer .legend-item.level-4{background:var(--state-map-pallete-type-1-level-4)} .map-view-wrapper .card-footer .legend-item.level-5{background:var(--state-map-pallete-type-1-level-5);margin-right:0} .map-view-wrapper .map-view-content{flex-wrap:wrap;padding:0 16px} .map-view-wrapper .evolution-card{width:calc(100% - 616px)} .map-view-wrapper .map-card{width:600px;padding:16px 0 0;margin-right:16px} .map-view-wrapper .map-card .ignore-zero{margin-bottom:16px} .map-view-wrapper .map-card.big-map{overflow-y:auto} .map-view-wrapper .map-card.big-map .map-wrapper.state-map{height:calc(var(--innerHeight) - (16px + 48px + 155px + 100px))} .map-view-wrapper .map-card .filter{box-shadow:none} .map-view-wrapper .map-card .mat-badge-content{margin-top:20px} .map-view-wrapper .map-card .card-title{padding:0 16px 8px} .map-view-wrapper .map-card .card-footer{padding:6px 16px 16px} .map-view-wrapper .map-card .map-options{padding:0 16px} .is-mobile .map-view-wrapper .evolution-card{width:100%;margin-top:16px} .is-mobile .map-view-wrapper .map-card{width:100%;margin-right:0} .is-mobile .map-view-wrapper .map-view-content{padding:0 16px 16px} .is-phone .map-view-wrapper .map-options{justify-content:center;align-items:center} .is-phone .map-view-wrapper .map-options .select-data-parameter-map{width:100%} .is-phone .map-card.big-map .map-wrapper.state-map{height:calc(var(--innerHeight) - (16px + 48px + 155px + 108px + 48px + 64px))} .is-phone .toolbar button{margin-left:10px} .is-phone .map-wrapper.state-map{height:320px;transition:height .3s ease-out} .is-phone .card-footer{flex-direction:column} .is-phone .card-footer button{margin-top:16px} .is-phone .card-footer .legend{justify-content:center} .is-phone .map-options{padding-top:36px;flex-direction:column} .is-phone .map-options .chipset{width:100%;justify-content:center} .is-phone .map-options .interest-data{margin-top:6px;width:100%} .is-phone .featured-data-item-label{font-size:12px!important} .is-phone .featured-data-item-value{font-size:20px!important;overflow:hidden;text-overflow:ellipsis} .color-strategy-option .mat-icon{margin-right:0!important}"]}),t})(),Ee=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=l.oAB({type:t}),t.\u0275inj=l.cJS({imports:[[a.ez,p.Bz.forChild([{path:"",component:ke}])],p.Bz]}),t})(),Te=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=l.oAB({type:t}),t.\u0275inj=l.cJS({imports:[[a.ez,k.Cq]]}),t})(),Ce=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=l.oAB({type:t}),t.\u0275inj=l.cJS({imports:[[a.ez,Tt]]}),t})(),Ve=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=l.oAB({type:t}),t.\u0275inj=l.cJS({imports:[[a.ez,M.Is,n.aw,Ce,s.ot,o.Ps,b.LD,f.lN,d.u5]]}),t})(),Le=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=l.oAB({type:t}),t.\u0275inj=l.cJS({imports:[[a.ez,Te,Ee,n.aw,p.Bz,h.q,u.q,m,s.ot,o.Ps,M.Is,Ve,b.LD,f.lN,d.u5,Ft.g,c,oe,r.AV]]}),t})()}}]);