/** @license Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt **/ /** @license Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt **/ /* ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. *****************************************************************************/ var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,d,l){if(l.get||l.set)throw new TypeError("ES3 does not support getters and setters.");e!=Array.prototype&&e!=Object.prototype&&(e[d]=l.value)};$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global&&null!=global?global:e};$jscomp.global=$jscomp.getGlobal(this); $jscomp.polyfill=function(e,d,l,k){if(d){l=$jscomp.global;e=e.split(".");for(k=0;k=b.length?b[0]:b);d.complete()}]))}catch(ga){I(d)?d.error(ga):console.warn(ga)}}return d.subscribe(f)})}}function Vb(c){var a=this,b=c.args,f=c.subscriber;c=c.params;var g=c.callbackFunc,h=c.context,d=c.scheduler,e=c.subject;if(!e){e=c.subject=new aa;try{g.apply(h,b.concat([function(){for(var b= [],c=0;c=b.length?b[0]:b,subject:e}))}]))}catch(U){e.error(U)}}this.add(e.subscribe(f))}function Wb(c){var a=c.subject;a.next(c.value);a.complete()}function Ta(c,a,b){if(a)if(B(a))b=a;else return function(){for(var f=[],g=0;g=b.length?b[0]:b),d.complete())}]))}catch(ga){I(d)?d.error(ga):console.warn(ga)}}return d.subscribe(f)})}}function Xb(c){var a=this,b=c.params,f=c.subscriber;c=c.context; var g=b.callbackFunc,h=b.args,d=b.scheduler,e=b.subject;if(!e){e=b.subject=new aa;try{g.apply(c,h.concat([function(){for(var b=[],c=0;c=b.length?b[0]:b,subject:e}))}]))}catch(U){this.add(d.schedule(Ua,0,{err:U,subject:e}))}}this.add(e.subscribe(f))}function Yb(c){var a=c.subject;a.next(c.value);a.complete()}function Ua(c){c.subject.error(c.err)}function Va(c){return c&&"function"!== typeof c.subscribe&&"function"===typeof c.then}function u(c,a,b,f,g){void 0===g&&(g=new O(c,b,f));if(!g.closed)return Wa(a)(g)}function Zb(c,a){return a?new r(function(b){var f=new w;f.add(a.schedule(function(){return c.then(function(c){f.add(a.schedule(function(){b.next(c);f.add(a.schedule(function(){return b.complete()}))}))},function(c){f.add(a.schedule(function(){return b.error(c)}))})}));return f}):new r(Xa(c))}function $b(c,a){if(!c)throw Error("Iterable cannot be null");return a?new r(function(b){var f= new w,g;f.add(function(){g&&"function"===typeof g.return&&g.return()});f.add(a.schedule(function(){g=c[M]();f.add(a.schedule(function(){if(!b.closed){var a,c;try{var f=g.next();a=f.value;c=f.done}catch(U){b.error(U);return}c?b.complete():(b.next(a),this.schedule())}}))}));return f}):new r(Ya(c))}function ac(c,a){return a?new r(function(b){var f=new w;f.add(a.schedule(function(){var g=c[ba]();f.add(g.subscribe({next:function(c){f.add(a.schedule(function(){return b.next(c)}))},error:function(c){f.add(a.schedule(function(){return b.error(c)}))}, complete:function(){f.add(a.schedule(function(){return b.complete()}))}}))}));return f}):new r(Za(c))}function N(c,a){if(!a)return c instanceof r?c:new r(Wa(c));if(null!=c){if(c&&"function"===typeof c[ba])return ac(c,a);if(Va(c))return Zb(c,a);if($a(c))return L(c,a);if(c&&"function"===typeof c[M]||"string"===typeof c)return $b(c,a)}throw new TypeError((null!==c&&typeof c||c)+" is not observable");}function V(c,a,b){void 0===b&&(b=Number.POSITIVE_INFINITY);if("function"===typeof a)return function(f){return f.pipe(V(function(b, f){return N(c(b,f)).pipe(G(function(c,g){return a(b,c,f,g)}))},b))};"number"===typeof a&&(b=a);return function(a){return a.lift(new bc(c,b))}}function Ca(c){void 0===c&&(c=Number.POSITIVE_INFINITY);return V(S,c)}function ab(){return Ca(1)}function P(){for(var c=[],a=0;a=c.count?f.complete():(f.next(a),f.closed|| (c.index=b+1,c.start=a+1,this.schedule(c)))}function hb(c,a,b){void 0===c&&(c=0);var f=-1;ca(a)?f=1>Number(a)&&1||Number(a):B(a)&&(b=a);B(b)||(b=C);return new r(function(a){var g=ca(c)?c:+c-b.now();return b.schedule(ic,g,{index:0,period:f,subscriber:a})})}function ic(c){var a=c.index,b=c.period,f=c.subscriber;f.next(a);if(!f.closed){if(-1===b)return f.complete();c.index=a+1;this.schedule(c,b)}}function ib(){for(var c=[],a=0;a=a?this.connection=null:(b._refCount=a-1,1=a?this.connection=null:(b._refCount=a-1,1b?1:b;f._windowTime=1>a?1:a;a===Number.POSITIVE_INFINITY?(f._infiniteTimeWindow=!0,f.next=f.nextInfiniteTimeWindow):f.next=f.nextTimeWindow;return f}d(a,c);a.prototype.nextInfiniteTimeWindow=function(b){var a=this._events;a.push(b);a.length>this._bufferSize&& a.shift();c.prototype.next.call(this,b)};a.prototype.nextTimeWindow=function(b){this._events.push(new $c(this._getNow(),b));this._trimBufferThenGetEvents();c.prototype.next.call(this,b)};a.prototype._subscribe=function(b){var a=this._infiniteTimeWindow,c=a?this._events:this._trimBufferThenGetEvents(),h=this.scheduler,d=c.length,e;if(this.closed)throw new J;this.isStopped||this.hasError?e=w.EMPTY:(this.observers.push(b),e=new xb(this,b));h&&b.add(b=new Cb(b,h));if(a)for(a=0;aa&&(e=Math.max(e,d-a));0a.index?1:-1:b.delay>a.delay?1:-1};return a}(la);T.prototype=Object.create(Error.prototype);Ra.prototype=Object.create(Error.prototype);var ia=Ra;Aa.prototype=Object.create(Error.prototype);var Ub=function(){function c(a,b){this.project=a;this.thisArg=b}c.prototype.call= function(a,b){return b.subscribe(new ed(a,this.project,this.thisArg))};return c}(),ed=function(c){function a(b,a,g){b=c.call(this,b)||this;b.project=a;b.count=0;b.thisArg=g||b;return b}d(a,c);a.prototype._next=function(b){var a;try{a=this.project.call(this.thisArg,b,this.count++)}catch(g){this.destination.error(g);return}this.destination.next(a)};return a}(q),v=function(c){function a(){return null!==c&&c.apply(this,arguments)||this}d(a,c);a.prototype.notifyNext=function(b,a,c,h,d){this.destination.next(a)}; a.prototype.notifyError=function(b,a){this.destination.error(b)};a.prototype.notifyComplete=function(b){this.destination.complete()};return a}(q),O=function(c){function a(b,a,g){var f=c.call(this)||this;f.parent=b;f.outerValue=a;f.outerIndex=g;f.index=0;return f}d(a,c);a.prototype._next=function(b){this.parent.notifyNext(this.outerValue,b,this.outerIndex,this.index++,this)};a.prototype._error=function(b){this.parent.notifyError(b,this);this.unsubscribe()};a.prototype._complete=function(){this.parent.notifyComplete(this); this.unsubscribe()};return a}(q),Xa=function(c){return function(a){c.then(function(b){a.closed||(a.next(b),a.complete())},function(b){return a.error(b)}).then(null,k);return a}},M;M="function"===typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";var Ya=function(c){return function(a){var b=c[M]();do{var f=b.next();if(f.done){a.complete();break}a.next(f.value);if(a.closed)break}while(1);"function"===typeof b.return&&a.add(function(){b.return&&b.return()});return a}},Za=function(c){return function(a){var b= c[ba]();if("function"!==typeof b.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return b.subscribe(a)}},$a=function(c){return c&&"number"===typeof c.length&&"function"!==typeof c},Wa=function(c){if(c instanceof r)return function(a){if(c._isScalar)a.next(c.value),a.complete();else return c.subscribe(a)};if(c&&"function"===typeof c[ba])return Za(c);if($a(c))return Qa(c);if(Va(c))return Xa(c);if(c&&"function"===typeof c[M])return Ya(c);throw new TypeError("You provided "+ (null!=c&&"object"===typeof c?"an invalid object":"'"+c+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.");},Fb={},Ma=function(){function c(a){this.resultSelector=a}c.prototype.call=function(a,b){return b.subscribe(new fd(a,this.resultSelector))};return c}(),fd=function(c){function a(b,a){b=c.call(this,b)||this;b.resultSelector=a;b.active=0;b.values=[];b.observables=[];return b}d(a,c);a.prototype._next=function(b){this.values.push(Fb);this.observables.push(b)}; a.prototype._complete=function(){var b=this.observables,a=b.length;if(0===a)this.destination.complete();else{this.toRespond=this.active=a;for(var c=0;cthis.index};c.prototype.hasCompleted=function(){return this.array.length===this.index};return c}(),ld=function(c){function a(b,a,g){b=c.call(this,b)||this;b.parent=a;b.observable=g;b.stillUnsubscribed=!0;b.buffer=[];b.isComplete=!1;return b}d(a,c);a.prototype[M]=function(){return this};a.prototype.next=function(){var b=this.buffer;return 0===b.length&&this.isComplete?{value:null,done:!0}:{value:b.shift(),done:!1}};a.prototype.hasValue=function(){return 0< this.buffer.length};a.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete};a.prototype.notifyComplete=function(){0g;if(b.timespanOnly)b.add(h.closeAction=d.schedule(lb,a,{subscriber:b,context:h,bufferTimeSpan:a}));else{var f={bufferTimeSpan:a,bufferCreationInterval:g,subscriber:b,scheduler:d};b.add(h.closeAction=d.schedule(mb,a,{subscriber:b,context:h}));b.add(d.schedule(kc, g,f))}return b}d(a,c);a.prototype._next=function(b){for(var a=this.contexts,c=a.length,d,e=0;e=c[0].time-d.now();)c.shift().notification.observe(e);0this.total)throw new T;}c.prototype.call=function(a,b){return b.subscribe(new Vd(a,this.total))};return c}(),Vd=function(c){function a(b,a){b=c.call(this,b)||this;b.total=a;b.count=0;return b}d(a,c);a.prototype._next=function(b){var a=this.total,c=++this.count;c<=a&&(this.destination.next(b),c===a&&(this.destination.complete(),this.unsubscribe()))};return a}(q),Xd=function(){function c(a,b,c){this.predicate=a;this.thisArg=b;this.source=c}c.prototype.call= function(a,b){return b.subscribe(new Wd(a,this.predicate,this.thisArg,this.source))};return c}(),Wd=function(c){function a(b,a,g,d){b=c.call(this,b)||this;b.predicate=a;b.thisArg=g;b.source=d;b.index=0;b.thisArg=g||b;return b}d(a,c);a.prototype.notifyComplete=function(b){this.destination.next(b);this.destination.complete()};a.prototype._next=function(b){var a=!1;try{a=this.predicate.call(this.thisArg,b,this.index++,this.source)}catch(g){this.destination.error(g);return}a||this.notifyComplete(!1)}; a.prototype._complete=function(){this.notifyComplete(!0)};return a}(q),Zd=function(){function c(){}c.prototype.call=function(a,b){return b.subscribe(new Yd(a))};return c}(),Yd=function(c){function a(b){b=c.call(this,b)||this;b.hasCompleted=!1;b.hasSubscription=!1;return b}d(a,c);a.prototype._next=function(b){this.hasSubscription||(this.hasSubscription=!0,this.add(u(this,b)))};a.prototype._complete=function(){this.hasCompleted=!0;this.hasSubscription||this.destination.complete()};a.prototype.notifyComplete= function(b){this.remove(b);this.hasSubscription=!1;this.hasCompleted&&this.destination.complete()};return a}(v),sc=function(){function c(a){this.project=a}c.prototype.call=function(a,b){return b.subscribe(new $d(a,this.project))};return c}(),$d=function(c){function a(b,a){b=c.call(this,b)||this;b.project=a;b.hasSubscription=!1;b.hasCompleted=!1;b.index=0;return b}d(a,c);a.prototype._next=function(b){this.hasSubscription||this.tryNext(b)};a.prototype.tryNext=function(b){var a,c=this.index++;try{a= this.project(b,c)}catch(h){this.destination.error(h);return}this.hasSubscription=!0;this._innerSub(a,b,c)};a.prototype._innerSub=function(b,a,c){var f=new O(this,void 0,void 0);this.destination.add(f);u(this,b,a,c,f)};a.prototype._complete=function(){this.hasCompleted=!0;this.hasSubscription||this.destination.complete();this.unsubscribe()};a.prototype.notifyNext=function(b,a,c,d,e){this.destination.next(a)};a.prototype.notifyError=function(b){this.destination.error(b)};a.prototype.notifyComplete= function(b){this.destination.remove(b);this.hasSubscription=!1;this.hasCompleted&&this.destination.complete()};return a}(v),be=function(){function c(a,b,c){this.project=a;this.concurrent=b;this.scheduler=c}c.prototype.call=function(a,b){return b.subscribe(new ae(a,this.project,this.concurrent,this.scheduler))};return c}(),ae=function(c){function a(b,a,g,d){b=c.call(this,b)||this;b.project=a;b.concurrent=g;b.scheduler=d;b.index=0;b.active=0;b.hasCompleted=!1;gthis.total)throw new T;}c.prototype.call=function(a,b){return b.subscribe(new je(a,this.total))};return c}(),je=function(c){function a(b,a){b=c.call(this,b)||this;b.total=a;b.ring=[];b.count=0;return b}d(a,c);a.prototype._next=function(b){var a=this.ring,c=this.total,d=this.count++;a.length= this.total?this.total:this.count,d=this.ring,e=0;ethis.total&&this.destination.next(b)};return a}(q),Oe=function(){function c(a){this._skipCount=a;if(0>this._skipCount)throw new T;}c.prototype.call=function(a,b){return 0===this._skipCount?b.subscribe(new q(a)):b.subscribe(new Ne(a,this._skipCount))};return c}(),Ne=function(c){function a(b,a){b=c.call(this,b)||this;b._skipCount=a;b._count=0; b._ring=Array(a);return b}d(a,c);a.prototype._next=function(b){var a=this._skipCount,c=this._count++;if(cf)b.delayTime=0;g&&"function"===typeof g.schedule||(b.scheduler=sa);return b}d(a,c);a.create=function(b,c,g){void 0=== c&&(c=0);void 0===g&&(g=sa);return new a(b,c,g)};a.dispatch=function(a){return this.add(a.source.subscribe(a.subscriber))};a.prototype._subscribe=function(b){return this.scheduler.schedule(a.dispatch,this.delayTime,{source:this.source,subscriber:b})};return a}(r),Ue=function(){function c(a,b){this.scheduler=a;this.delay=b}c.prototype.call=function(a,b){return(new Te(b,this.delay,this.scheduler)).subscribe(a)};return c}(),Cc=function(){function c(a){this.project=a}c.prototype.call=function(a,b){return b.subscribe(new Ve(a, this.project))};return c}(),Ve=function(c){function a(a,f){a=c.call(this,a)||this;a.project=f;a.index=0;return a}d(a,c);a.prototype._next=function(a){var b,c=this.index++;try{b=this.project(a,c)}catch(h){this.destination.error(h);return}this._innerSub(b,a,c)};a.prototype._innerSub=function(a,c,g){var b=this.innerSubscription;b&&b.unsubscribe();b=new O(this,void 0,void 0);this.destination.add(b);this.innerSubscription=u(this,a,c,g,b)};a.prototype._complete=function(){var a=this.innerSubscription;a&& !a.closed||c.prototype._complete.call(this);this.unsubscribe()};a.prototype._unsubscribe=function(){this.innerSubscription=null};a.prototype.notifyComplete=function(a){this.destination.remove(a);this.innerSubscription=null;this.isStopped&&c.prototype._complete.call(this)};a.prototype.notifyNext=function(a,c,g,d,e){this.destination.next(c)};return a}(v),Xe=function(){function c(a){this.notifier=a}c.prototype.call=function(a,b){a=new We(a);var c=u(a,this.notifier);return c&&!a.seenValue?(a.add(c),b.subscribe(a)): a};return c}(),We=function(c){function a(a){a=c.call(this,a)||this;a.seenValue=!1;return a}d(a,c);a.prototype.notifyNext=function(a,c,g,d,e){this.seenValue=!0;this.complete()};a.prototype.notifyComplete=function(){};return a}(v),Ze=function(){function c(a){this.predicate=a}c.prototype.call=function(a,b){return b.subscribe(new Ye(a,this.predicate))};return c}(),Ye=function(c){function a(a,f){a=c.call(this,a)||this;a.predicate=f;a.index=0;return a}d(a,c);a.prototype._next=function(a){var b=this.destination, c;try{c=this.predicate(a,this.index++)}catch(h){b.error(h);return}this.nextOrComplete(a,c)};a.prototype.nextOrComplete=function(a,c){var b=this.destination;c?b.next(a):b.complete()};return a}(q),Kb={leading:!0,trailing:!1},af=function(){function c(a,b,c){this.durationSelector=a;this.leading=b;this.trailing=c}c.prototype.call=function(a,b){return b.subscribe(new $e(a,this.durationSelector,this.leading,this.trailing))};return c}(),$e=function(c){function a(a,f,g,d){var b=c.call(this,a)||this;b.destination= a;b.durationSelector=f;b._leading=g;b._trailing=d;b._hasValue=!1;return b}d(a,c);a.prototype._next=function(a){this._hasValue=!0;this._sendValue=a;this._throttled||(this._leading?this.send():this.throttle(a))};a.prototype.send=function(){var a=this._sendValue;this._hasValue&&(this.destination.next(a),this.throttle(a));this._hasValue=!1;this._sendValue=null};a.prototype.throttle=function(a){(a=this.tryDurationSelector(a))&&this.add(this._throttled=u(this,a))};a.prototype.tryDurationSelector=function(a){try{return this.durationSelector(a)}catch(f){return this.destination.error(f), null}};a.prototype.throttlingDone=function(){var a=this._throttled,c=this._trailing;a&&a.unsubscribe();this._throttled=null;c&&this.send()};a.prototype.notifyNext=function(a,c,g,d,e){this.throttlingDone()};a.prototype.notifyComplete=function(){this.throttlingDone()};return a}(v),cf=function(){function c(a,b,c,g){this.duration=a;this.scheduler=b;this.leading=c;this.trailing=g}c.prototype.call=function(a,b){return b.subscribe(new bf(a,this.duration,this.scheduler,this.leading,this.trailing))};return c}(), bf=function(c){function a(a,f,g,d,e){a=c.call(this,a)||this;a.duration=f;a.scheduler=g;a.leading=d;a.trailing=e;a._hasTrailingValue=!1;a._trailingValue=null;return a}d(a,c);a.prototype._next=function(a){this.throttled?this.trailing&&(this._trailingValue=a,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Dc,this.duration,{subscriber:this})),this.leading&&this.destination.next(a))};a.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue); this.destination.complete()};a.prototype.clearThrottle=function(){var a=this.throttled;a&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),a.unsubscribe(),this.remove(a),this.throttled=null)};return a}(q),df=function(){return function(c,a){this.value=c;this.interval=a}}(),Ec=function(){function c(a,b,c,g){this.waitFor=a;this.absoluteTimeout=b;this.withObservable=c;this.scheduler=g}c.prototype.call=function(a,b){return b.subscribe(new ef(a, this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))};return c}(),ef=function(c){function a(a,f,g,d,e){a=c.call(this,a)||this;a.absoluteTimeout=f;a.waitFor=g;a.withObservable=d;a.scheduler=e;a.action=null;a.scheduleTimeout();return a}d(a,c);a.dispatchTimeout=function(a){var b=a.withObservable;a._unsubscribeAndRecycle();a.add(u(a,b))};a.prototype.scheduleTimeout=function(){var b=this.action;b?this.action=b.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(a.dispatchTimeout, this.waitFor,this))};a.prototype._next=function(a){this.absoluteTimeout||this.scheduleTimeout();c.prototype._next.call(this,a)};a.prototype._unsubscribe=function(){this.withObservable=this.scheduler=this.action=null};return a}(v),ff=function(){return function(c,a){this.value=c;this.timestamp=a}}(),hf=function(){function c(a){this.windowBoundaries=a}c.prototype.call=function(a,b){a=new gf(a);b=b.subscribe(a);b.closed||a.add(u(a,this.windowBoundaries));return b};return c}(),gf=function(c){function a(a){var b= c.call(this,a)||this;b.window=new y;a.next(b.window);return b}d(a,c);a.prototype.notifyNext=function(a,c,d,h,e){this.openWindow()};a.prototype.notifyError=function(a,c){this._error(a)};a.prototype.notifyComplete=function(a){this._complete()};a.prototype._next=function(a){this.window.next(a)};a.prototype._error=function(a){this.window.error(a);this.destination.error(a)};a.prototype._complete=function(){this.window.complete();this.destination.complete()};a.prototype._unsubscribe=function(){this.window= null};a.prototype.openWindow=function(){var a=this.window;a&&a.complete();var a=this.destination,c=this.window=new y;a.next(c)};return a}(v),kf=function(){function c(a,b){this.windowSize=a;this.startWindowEvery=b}c.prototype.call=function(a,b){return b.subscribe(new jf(a,this.windowSize,this.startWindowEvery))};return c}(),jf=function(c){function a(a,f,d){var b=c.call(this,a)||this;b.destination=a;b.windowSize=f;b.startWindowEvery=d;b.windows=[new y];b.count=0;a.next(b.windows[0]);return b}d(a,c); a.prototype._next=function(a){for(var b=0=this.maxWindowSize&&this.closeWindow(e))}};a.prototype._error=function(a){for(var b=this.windows;0c)throw new T;var b=2<=arguments.length;return function(d){return d.pipe(da(function(a,b){return b===c}),Fa(1),b?ha(a):ta(function(){return new T}))}},endWith:function(){for(var c=[],a=0;a(a||0)?Number.POSITIVE_INFINITY:a;return function(d){return d.lift(new be(c,a,b))}},filter:da,finalize:function(c){return function(a){return a.lift(new de(c))}},find:function(c,a){if("function"!==typeof c)throw new TypeError("predicate is not a function");return function(b){return b.lift(new Ib(c, b,!1,a))}},findIndex:function(c,a){return function(b){return b.lift(new Ib(c,b,!0,a))}},first:function(c,a){var b=2<=arguments.length;return function(d){return d.pipe(c?da(function(a,b){return c(a,b,d)}):S,Fa(1),b?ha(a):ta(function(){return new ia}))}},groupBy:function(c,a,b,d){return function(f){return f.lift(new Uc(c,a,b,d))}},ignoreElements:function(){return function(c){return c.lift(new ge)}},isEmpty:function(){return function(c){return c.lift(new ie)}},last:function(c,a){var b=2<=arguments.length; return function(d){return d.pipe(c?da(function(a,b){return c(a,b,d)}):S,na(1),b?ha(a):ta(function(){return new ia}))}},map:G,mapTo:function(c){return function(a){return a.lift(new le(c))}},materialize:function(){return function(c){return c.lift(new ne)}},max:function(c){return pa("function"===typeof c?function(a,b){return 0b?a:b})},merge:function(){for(var c=[],a=0;ac(a,b)?a:b}:function(a,b){return ac?a.lift(new Jb(-1,a)):a.lift(new Jb(c-1,a))}},repeatWhen:function(c){return function(a){return a.lift(new xe(c))}},retry:function(c){void 0===c&&(c=-1);return function(a){return a.lift(new ze(c,a))}},retryWhen:function(c){return function(a){return a.lift(new Be(c,a))}},refCount:ea,sample:function(c){return function(a){return a.lift(new De(c))}}, sampleTime:function(c,a){void 0===a&&(a=C);return function(b){return b.lift(new Fe(c,a))}},scan:oa,sequenceEqual:function(c,a){return function(b){return b.lift(new He(c,a))}},share:function(){return function(c){return ea()(W(Ac)(c))}},shareReplay:function(c,a,b){void 0===c&&(c=Number.POSITIVE_INFINITY);void 0===a&&(a=Number.POSITIVE_INFINITY);return function(d){return d.lift(Bc(c,a,b))}},single:function(c){return function(a){return a.lift(new Ke(c,a))}},skip:function(c){return function(a){return a.lift(new Me(c))}}, skipLast:function(c){return function(a){return a.lift(new Oe(c))}},skipUntil:function(c){return function(a){return a.lift(new Qe(c))}},skipWhile:function(c){return function(a){return a.lift(new Se(c))}},startWith:function(){for(var c=[],a=0;ak?new ma(e):new ma(e,k)};a.parseMarbles=function(a,c,d,e,k){var b=this;void 0===e&&(e=!1);void 0===k&&(k=!1);if(-1!==a.indexOf("!"))throw Error('conventional marble diagrams cannot have the unsubscription marker "!"');for(var f=a.length,g=[],h=k?a.replace(/^[ ]+/,"").indexOf("^"):a.indexOf("^"),l=-1===h?0:h*-this.frameTimeFactor,m="object"!==typeof c?function(a){return a}:function(a){return e&&c[a]instanceof Na?c[a].messages:c[a]},p=-1,h=function(c){var f= l,e=function(a){f+=a*b.frameTimeFactor},h=void 0,t=a[c];switch(t){case " ":k||e(1);break;case "-":e(1);break;case "(":p=l;e(1);break;case ")":p=-1;e(1);break;case "|":h=z.createComplete();e(1);break;case "^":e(1);break;case "#":h=z.createError(d||"error");e(1);break;default:if(k&&t.match(/^[0-9]$/)&&(0===c||" "===a[c-1])){var r=a.slice(c).match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /);if(r){c+=r[0].length-1;var t=parseFloat(r[1]),E=void 0;switch(r[2]){case "ms":E=t;break;case "s":E=1E3*t;break;case "m":E= 6E4*t}e(E/n.frameTimeFactor);break}}h=z.createNext(m(t));e(1)}h&&g.push({frame:-1d;d++)try{b=c[d];new F.ActiveXObject(b);break}catch(t){}a=new F.ActiveXObject(b)}catch(t){throw Error("XMLHttpRequest is not supported by your browser"); }}return a},crossDomain:!0,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"===typeof a)d.url=a;else for(var e in a)a.hasOwnProperty(e)&&(d[e]=a[e]);b.request=d;return b}d(a,c);a.prototype._subscribe=function(a){return new zf(a,this.request)};a.create=function(){var b=function(b){return new a(b)};b.get=Ic;b.post=Jc;b.delete=Kc;b.put=Lc;b.patch=Mc;b.getJSON=Nc;return b}();return a}(r),zf=function(c){function a(a,d){a=c.call(this,a)||this;a.request=d;a.done=!1;var b= d.headers=d.headers||{};d.crossDomain||b["X-Requested-With"]||(b["X-Requested-With"]="XMLHttpRequest");"Content-Type"in b||F.FormData&&d.body instanceof F.FormData||"undefined"===typeof d.body||(b["Content-Type"]="application/x-www-form-urlencoded; charset\x3dUTF-8");d.body=a.serializeBody(d.body,d.headers["Content-Type"]);a.send();return a}d(a,c);a.prototype.next=function(a){this.done=!0;var b=this.destination;a=new Nb(a,this.xhr,this.request);a.response===p?b.error(p.e):b.next(a)};a.prototype.send= function(){var a=this.request,c=this.request,d=c.user,e=c.method,k=c.url,l=c.async,n=c.password,q=c.headers,c=c.body,t=m(a.createXHR).call(a);if(t===p)this.error(p.e);else{this.xhr=t;this.setupEvents(t,a);d=d?m(t.open).call(t,e,k,l,d,n):m(t.open).call(t,e,k,l);if(d===p)return this.error(p.e),null;l&&(t.timeout=a.timeout,t.responseType=a.responseType);"withCredentials"in t&&(t.withCredentials=!!a.withCredentials);this.setHeaders(t,q);d=c?m(t.send).call(t,c):m(t.send).call(t);if(d===p)return this.error(p.e), null}return t};a.prototype.serializeBody=function(a,c){if(!a||"string"===typeof a||F.FormData&&a instanceof F.FormData)return a;if(c){var b=c.indexOf(";");-1!==b&&(c=c.substring(0,b))}switch(c){case "application/x-www-form-urlencoded":return Object.keys(a).map(function(b){return encodeURIComponent(b)+"\x3d"+encodeURIComponent(a[b])}).join("\x26");case "application/json":return JSON.stringify(a);default:return a}};a.prototype.setHeaders=function(a,c){for(var b in c)c.hasOwnProperty(b)&&a.setRequestHeader(b, c[b])};a.prototype.setupEvents=function(a,c){function b(a){var c=b.subscriber,d=b.progressSubscriber,f=b.request;d&&d.error(a);a=new Ob(this,f);a.response===p?c.error(p.e):c.error(a)}function d(a){}function f(a){var b=f.subscriber,c=f.progressSubscriber,d=f.request;if(4===this.readyState){var e=1223===this.status?204:this.status,g="text"===this.responseType?this.response||this.responseText:this.response;0===e&&(e=g?200:0);400>e?(c&&c.complete(),b.next(a),b.complete()):(c&&c.error(a),a=new ua("ajax error "+ e,this,d),a.response===p?b.error(p.e):b.error(a))}}var e=c.progressSubscriber;a.ontimeout=b;b.request=c;b.subscriber=this;b.progressSubscriber=e;if(a.upload&&"withCredentials"in a){if(e){var k;k=function(a){k.progressSubscriber.next(a)};F.XDomainRequest?a.onprogress=k:a.upload.onprogress=k;k.progressSubscriber=e}var l;l=function(a){var b=l.progressSubscriber,c=l.subscriber,d=l.request;b&&b.error(a);a=new ua("ajax error",this,d);a.response===p?c.error(p.e):c.error(a)};a.onerror=l;l.request=c;l.subscriber= this;l.progressSubscriber=e}a.onreadystatechange=d;d.subscriber=this;d.progressSubscriber=e;d.request=c;a.onload=f;f.subscriber=this;f.progressSubscriber=e;f.request=c};a.prototype.unsubscribe=function(){var a=this.xhr;!this.done&&a&&4!==a.readyState&&"function"===typeof a.abort&&a.abort();c.prototype.unsubscribe.call(this)};return a}(q),Nb=function(){return function(c,a,b){this.originalEvent=c;this.xhr=a;this.request=b;this.status=a.status;this.responseType=a.responseType||b.responseType;this.response= vb(this.responseType,a)}}();ub.prototype=Object.create(Error.prototype);var ua=ub,Ob=function(c,a){ua.call(this,"ajax timeout",c,a);this.name="AjaxTimeoutError";return this},Af=Object.freeze({ajax:Y.create,AjaxResponse:Nb,AjaxError:ua,AjaxTimeoutError:Ob}),Bf={url:"",deserializer:function(c){return JSON.parse(c.data)},serializer:function(c){return JSON.stringify(c)}},Pb=function(c){function a(a,d){var b=c.call(this)||this;if(a instanceof r)b.destination=d,b.source=a;else{d=b._config=Qc({},Bf);b._output= new y;if("string"===typeof a)d.url=a;else for(var f in a)a.hasOwnProperty(f)&&(d[f]=a[f]);if(!d.WebSocketCtor&&WebSocket)d.WebSocketCtor=WebSocket;else if(!d.WebSocketCtor)throw Error("no WebSocket constructor can be found");b.destination=new X}return b}d(a,c);a.prototype.lift=function(b){var c=new a(this._config,this.destination);c.operator=b;c.source=this;return c};a.prototype._resetState=function(){this._socket=null;this.source||(this.destination=new X);this._output=new y};a.prototype.multiplex= function(a,c,d){var b=this;return new r(function(f){var e=m(a)();e===p?f.error(p.e):b.next(e);var g=b.subscribe(function(a){var b=m(d)(a);b===p?f.error(p.e):b&&f.next(a)},function(a){return f.error(a)},function(){return f.complete()});return function(){var a=m(c)();a===p?f.error(p.e):b.next(a);g.unsubscribe()}})};a.prototype._connectSocket=function(){var a=this,c=this._config,d=c.WebSocketCtor,e=c.protocol,k=c.url,c=c.binaryType,l=this._output,n=null;try{this._socket=n=e?new d(k,e):new d(k),c&&(this._socket.binaryType= c)}catch(t){l.error(t);return}var r=new w(function(){a._socket=null;n&&1===n.readyState&&n.close()});n.onopen=function(b){var c=a._config.openObserver;c&&c.next(b);b=a.destination;a.destination=q.create(function(b){1===n.readyState&&(b=m(a._config.serializer)(b),b===p?a.destination.error(p.e):n.send(b))},function(b){var c=a._config.closingObserver;c&&c.next(void 0);b&&b.code?n.close(b.code,b.reason):l.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")); a._resetState()},function(){var b=a._config.closingObserver;b&&b.next(void 0);n.close();a._resetState()});b&&b instanceof X&&r.add(b.subscribe(a.destination))};n.onerror=function(b){a._resetState();l.error(b)};n.onclose=function(b){a._resetState();var c=a._config.closeObserver;c&&c.next(b);b.wasClean?l.complete():l.error(b)};n.onmessage=function(b){b=m(a._config.deserializer)(b);b===p?l.error(p.e):l.next(b)}};a.prototype._subscribe=function(a){var b=this,c=this.source;if(c)return c.subscribe(a);this._socket|| this._connectSocket();this._output.subscribe(a);a.add(function(){var a=b._socket;0===b._output.observers.length&&(a&&1===a.readyState&&a.close(),b._resetState())});return a};a.prototype.unsubscribe=function(){var a=this.source,d=this._socket;d&&1===d.readyState&&(d.close(),this._resetState());c.prototype.unsubscribe.call(this);a||(this.destination=new X)};return a}(Ha),Cf=Object.freeze({webSocket:function(c){return new Pb(c)},WebSocketSubject:Pb});e.operators=uf;e.testing=wf;e.ajax=Af;e.webSocket= Cf;e.Observable=r;e.ConnectableObservable=zb;e.GroupedObservable=Ia;e.observable=ba;e.Subject=y;e.BehaviorSubject=Ab;e.ReplaySubject=X;e.AsyncSubject=aa;e.asapScheduler=sa;e.asyncScheduler=C;e.queueScheduler=Bb;e.animationFrameScheduler=dd;e.VirtualTimeScheduler=Eb;e.VirtualAction=La;e.Scheduler=Ja;e.Subscription=w;e.Subscriber=q;e.Notification=z;e.pipe=wa;e.noop=A;e.identity=S;e.isObservable=function(c){return!!c&&(c instanceof r||"function"===typeof c.lift&&"function"===typeof c.subscribe)};e.ArgumentOutOfRangeError= T;e.EmptyError=ia;e.ObjectUnsubscribedError=J;e.UnsubscriptionError=fa;e.TimeoutError=Aa;e.bindCallback=Sa;e.bindNodeCallback=Ta;e.combineLatest=function(){for(var c=[],a=0;ac)c=0;a&&"function"===typeof a.schedule||(a=C);return new r(function(b){b.add(a.schedule(ec,c,{subscriber:b,counter:0,period:c}));return b})};e.merge=fb;e.never=function(){return Gb};e.of=ya;e.onErrorResumeNext=Ea;e.pairs=function(c,a){return a?new r(function(b){var d=Object.keys(c),e=new w;e.add(a.schedule(fc,0,{keys:d,index:0,subscriber:b,subscription:e,obj:c})); return e}):new r(function(a){for(var b=Object.keys(c),d=0;d=a){d.complete();break}d.next(f++);if(d.closed)break}while(1)})};e.throwError=za;e.timer=hb;e.using=function(c,a){return new r(function(b){var d;try{d=c()}catch(E){b.error(E); return}var e;try{e=a(d)}catch(E){b.error(E);return}var h=(e?N(e):R).subscribe(b);return function(){h.unsubscribe();d&&d.unsubscribe()}})};e.zip=ib;e.EMPTY=R;e.NEVER=Gb;e.config=H;Object.defineProperty(e,"__esModule",{value:!0})});