Repository navigation
Expand file tree
/
Copy pathrx.lite.compat.min.js
More file actions
5 lines (5 loc) · 64.4 KB
/
Copy pathrx.lite.compat.min.js
File metadata and controls
5 lines (5 loc) · 64.4 KB
1
2
3
4
5
/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
(function(a){function b(a){if(a.isDisposed)throw new Error(nb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(ob&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(sb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+sb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=i(a);if(!b)return!1;var c=b[0],d=b[1];return c===qb&&d>=rb&&zd>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(ob)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=i(c);if(!d)return;return qb=d[0],d[1]}}function i(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function j(a){var b=[];if(!Ub(a))return b;Tb.nonEnumArgs&&a.length&&Vb(a)&&(a=Zb.call(a));var c=Tb.enumPrototypes&&"function"==typeof a,d=Tb.enumErrorProps&&(a===Ob||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Tb.nonEnumShadows&&a!==Pb){var f=a.constructor,g=-1,h=Ab;if(a===(f&&f.prototype))var i=a===Qb?Kb:a===Ob?Fb:Lb.call(a),j=Sb[i];for(;++g<h;)e=zb[g],j&&j[e]||!Mb.call(a,e)||b.push(e)}return b}function k(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function l(a,b){return k(a,b,j)}function m(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function n(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=Lb.call(a),h=Lb.call(b);if(g==Bb&&(g=Ib),h==Bb&&(h=Ib),g!=h)return!1;switch(g){case Db:case Eb:return+a==+b;case Hb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Jb:case Kb:return a==String(b)}var i=g==Cb;if(!i){if(g!=Ib||!Tb.nodeClass&&(m(a)||m(b)))return!1;var j=!Tb.argsObject&&Vb(a)?Object:a.constructor,k=!Tb.argsObject&&Vb(b)?Object:b.constructor;if(!(j==k||Mb.call(a,"constructor")&&Mb.call(b,"constructor")||lb(j)&&j instanceof j&&lb(k)&&k instanceof k||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var o=c.length;o--;)if(c[o]==a)return d[o]==b;var p=0,q=!0;if(c.push(a),d.push(b),i){if(o=a.length,p=b.length,q=p==o)for(;p--;){var r=b[p];if(!(q=n(a[p],r,c,d)))break}}else l(b,function(b,e,f){return Mb.call(f,e)?(p++,q=Mb.call(a,e)&&n(a[e],b,c,d)):void 0}),q&&l(a,function(a,b,c){return Mb.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function o(){try{return Wb.apply(this,arguments)}catch(a){return Yb.e=a,Yb}}function p(a){if(!lb(a))throw new TypeError("fn must be a function");return Wb=a,o}function q(a){throw a}function r(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function t(a,b){this.id=a,this.value=b}function u(a){this.observer=a,this.a=[],this.isStopped=!1}function v(){this._s=s}function w(){this._s=s,this._l=s.length,this._i=0}function x(a){this._a=a}function y(a){this._a=a,this._l=C(a),this._i=0}function z(a){return"number"==typeof a&&Z.isFinite(a)}function A(b){var c,d=b[tb];if(!d&&"string"==typeof b)return c=new v(b),c[tb]();if(!d&&b.length!==a)return c=new x(b),c[tb]();if(!d)throw new TypeError("Object is not iterable");return b[tb]()}function B(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function C(a){var b=+a.length;return isNaN(b)?0:0!==b&&z(b)?(b=B(b)*Math.floor(Math.abs(b)),0>=b?0:b>Sc?Sc:b):b}function D(a,b){this.observer=a,this.parent=b}function E(a,b){return new Uc(b,a)}function F(a,b){return new rd(function(c){var d=new kc,e=new lc;return e.setDisposable(d),d.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){try{var d=b(a)}catch(f){return c.onError(f)}kb(d)&&(d=kd(d));var g=new kc;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function G(a,b){var c=this;return new rd(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function H(){return!1}function I(){return[]}function J(a,b,c){var d=yb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return kb(e)&&(e=kd(e)),(wb(e)||vb(e))&&(e=Tc(e)),e}).concatAll()}function K(a,b,c){this.observer=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}function L(a,b,c){var d=yb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return kb(e)&&(e=kd(e)),(wb(e)||vb(e))&&(e=Tc(e)),e}).mergeAll()}function M(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}function N(a){var b=function(){this.cancelBubble=!0},c=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(a||(a=Z.event),!a.target)switch(a.target=a.target||a.srcElement,"mouseover"==a.type&&(a.relatedTarget=a.fromElement),"mouseout"==a.type&&(a.relatedTarget=a.toElement),a.stopPropagation||(a.stopPropagation=b,a.preventDefault=c),a.type){case"keypress":var d="charCode"in a?a.charCode:a.keyCode;10==d?(d=0,a.keyCode=13):13==d||27==d?d=0:3==d&&(d=99),a.charCode=d,a.keyChar=a.charCode?String.fromCharCode(a.charCode):""}return a}function O(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),hc(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(N(a))};return a.attachEvent("on"+b,d),hc(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,hc(function(){a["on"+b]=null})}function P(a,b,c){var d=new ec;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(P(a.item(e),b,c));else a&&d.add(O(a,b,c));return d}function Q(a,b){return new rd(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function R(a,b,c){return new rd(function(d){var e=a,f=oc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function S(a,b){return new rd(function(c){return b.scheduleWithRelative(oc(a),function(){c.onNext(0),c.onCompleted()})})}function T(a,b,c){return a===b?new rd(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Oc(function(){return R(c.now()+a,b,c)})}function U(a,b,c){return new rd(function(d){var e,f=!1,g=new lc,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new kc,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new ec(e,g)},a)}function V(a,b,c){return Oc(function(){return U(a,b-c.now(),c)})}function W(a,b){return new rd(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new ec(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}function X(a,b,c){return new rd(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(fb))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new ec(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var Y={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},Z=Y[typeof window]&&window||this,$=Y[typeof exports]&&exports&&!exports.nodeType&&exports,_=Y[typeof module]&&module&&!module.nodeType&&module,ab=_&&_.exports===$&&$,bb=Y[typeof global]&&global;!bb||bb.global!==bb&&bb.window!==bb||(Z=bb);var cb={internals:{},config:{Promise:Z.Promise},helpers:{}},db=cb.helpers.noop=function(){},eb=(cb.helpers.notDefined=function(a){return"undefined"==typeof a},cb.helpers.isScheduler=function(a){return a instanceof cb.Scheduler}),fb=cb.helpers.identity=function(a){return a},gb=(cb.helpers.pluck=function(a){return function(b){return b[a]}},cb.helpers.just=function(a){return function(){return a}},cb.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}()),hb=cb.helpers.defaultComparer=function(a,b){return Xb(a,b)},ib=cb.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},jb=(cb.helpers.defaultKeySerializer=function(a){return a.toString()},cb.helpers.defaultError=function(a){throw a}),kb=cb.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},lb=(cb.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},cb.helpers.not=function(a){return!a},cb.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Lb.call(a)}),a}()),mb="Argument out of range",nb="Object has been disposed";cb.config.longStackSupport=!1;var ob=!1;try{throw new Error}catch(pb){ob=!!pb.stack}var qb,rb=h(),sb="From previous event:",tb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";Z.Set&&"function"==typeof(new Z.Set)["@@iterator"]&&(tb="@@iterator");var ub=cb.doneEnumerator={done:!0,value:a},vb=cb.helpers.isIterable=function(b){return b[tb]!==a},wb=cb.helpers.isArrayLike=function(b){return b&&b.length!==a};cb.helpers.iterator=tb;var xb,yb=cb.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},zb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ab=zb.length,Bb="[object Arguments]",Cb="[object Array]",Db="[object Boolean]",Eb="[object Date]",Fb="[object Error]",Gb="[object Function]",Hb="[object Number]",Ib="[object Object]",Jb="[object RegExp]",Kb="[object String]",Lb=Object.prototype.toString,Mb=Object.prototype.hasOwnProperty,Nb=Lb.call(arguments)==Bb,Ob=Error.prototype,Pb=Object.prototype,Qb=String.prototype,Rb=Pb.propertyIsEnumerable;try{xb=!(Lb.call(document)==Ib&&!({toString:0}+""))}catch(pb){xb=!0}var Sb={};Sb[Cb]=Sb[Eb]=Sb[Hb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Sb[Db]=Sb[Kb]={constructor:!0,toString:!0,valueOf:!0},Sb[Fb]=Sb[Gb]=Sb[Jb]={constructor:!0,toString:!0},Sb[Ib]={constructor:!0};var Tb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Tb.enumErrorProps=Rb.call(Ob,"message")||Rb.call(Ob,"name"),Tb.enumPrototypes=Rb.call(a,"prototype"),Tb.nonEnumArgs=0!=c,Tb.nonEnumShadows=!/valueOf/.test(b)}(1);var Ub=cb.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Vb=function(a){return a&&"object"==typeof a?Lb.call(a)==Bb:!1};Nb||(Vb=function(a){return a&&"object"==typeof a?Mb.call(a,"callee"):!1});{var Wb,Xb=cb.internals.isEqual=function(a,b){return n(a,b,[],[])},Yb={e:{}},Zb=({}.hasOwnProperty,Array.prototype.slice),$b=this.inherits=cb.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},_b=cb.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}};cb.internals.addRef=function(a,b){return new rd(function(c){return new ec(b.getDisposable(),a.subscribe(c))})}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Zb.call(arguments,1),d=function(){function e(){}if(this instanceof d){e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(Zb.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(Zb.call(arguments)))};return d}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if(null==this)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=0;f>d;){var g;d in e&&(g=e[d],a.call(c,g,d,e)),d++}});var ac=Object("a"),bc="a"!=ac[0]||!(0 in ac);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=bc&&{}.toString.call(this)==Kb?this.split(""):b,d=c.length>>>0,e=arguments[1];if({}.toString.call(a)!=Gb)throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(a){var b=Object(this),c=bc&&{}.toString.call(this)==Kb?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if({}.toString.call(a)!=Gb)throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){for(var b,c=[],d=new Object(this),e=0,f=d.length>>>0;f>e;e++)b=d[e],e in d&&a.call(arguments[1],b,e,d)&&c.push(b);return c}),Array.isArray||(Array.isArray=function(a){return{}.toString.call(a)==Cb}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!=d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),Object.prototype.propertyIsEnumerable||(Object.prototype.propertyIsEnumerable=function(a){for(var b in this)if(b===a)return!0;return!1}),Object.keys||(Object.keys=function(){"use strict";var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString");return function(c){if("object"!=typeof c&&("function"!=typeof c||null===c))throw new TypeError("Object.keys called on non-object");var d,e,f=[];for(d in c)a.call(c,d)&&f.push(d);if(b)for(e=0;Ab>e;e++)a.call(c,zb[e])&&f.push(zb[e]);return f}}()),t.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var cc=cb.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},dc=cc.prototype;dc.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},dc.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},dc.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},dc.peek=function(){return this.items[0].value},dc.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},dc.dequeue=function(){var a=this.peek();return this.removeAt(0),a},dc.enqueue=function(a){var b=this.length++;this.items[b]=new t(cc.count++,a),this.percolate(b)},dc.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},cc.count=0;var ec=cb.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!jc(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length},fc=ec.prototype;fc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},fc.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},fc.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var gc=cb.Disposable=function(a){this.isDisposed=!1,this.action=a||db};gc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var hc=gc.create=function(a){return new gc(a)},ic=gc.empty={dispose:db},jc=gc.isDisposable=function(a){return a&&lb(a.dispose)},kc=cb.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),lc=cb.SerialDisposable=kc,mc=(cb.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?ic:new a(this)},b}(),cb.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||ib,this.disposable=new kc});mc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},mc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},mc.prototype.isCancelled=function(){return this.disposable.isDisposed},mc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var nc=cb.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),ic}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=gb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),oc=nc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new ec,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),ic});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new ec,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),ic});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(nc.prototype),function(){nc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},nc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof Z.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=Z.setInterval(function(){d=c(d)},b);return hc(function(){Z.clearInterval(e)})}}(nc.prototype);var pc,qc=nc.immediate=function(){function a(a,b){return b(this,a)}function b(){throw new Error("Not supported")}return new nc(gb,a,b,b)}(),rc=nc.currentThread=function(){function a(){for(;d.length>0;){var a=d.dequeue();a.isCancelled()||!a.isCancelled()&&a.invoke()}}function b(b,c){var e=new mc(this,b,c,this.now());if(d)d.enqueue(e);else{d=new cc(4),d.enqueue(e);var f=p(a)();if(d=null,f===Yb)return q(f.e)}return e.disposable}function c(){throw new Error("Not supported")}var d,e=new nc(gb,b,c,c);return e.scheduleRequired=function(){return!d},e.ensureTrampoline=function(a){d?a():this.schedule(a)},e}(),sc=(cb.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new kc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),db),tc=function(){var a,b=db;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!Z.setTimeout)throw new Error("No concurrency detected!");a=Z.setTimeout,b=Z.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),uc=tc.setTimeout,vc=tc.clearTimeout;!function(){function a(){if(!Z.postMessage||Z.importScripts)return!1;var a=!1,b=Z.onmessage;return Z. b=RegExp("^"+String(Lb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=bb&&ab&&bb.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=bb&&ab&&bb.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)pc=c,sc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))pc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};Z.addEventListener?Z.addEventListener("message",h,!1):Z.attachEvent("onmessage",h,!1),pc=function(a){var b=g++;f[b]=a,Z.postMessage(e+b,"*")}}else if(Z.MessageChannel){var i=new Z.MessageChannel,j={},k=0;i.port1. b=a.data,c=j[b];c(),delete j[b]},pc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in Z&&"onreadystatechange"in Z.document.createElement("script")?pc=function(a){var b=Z.document.createElement("script");b. uc(a,0)},sc=vc)}();var wc=nc.timeout=function(){function a(a,b){var c=this,d=new kc,e=pc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new ec(d,hc(function(){sc(e)}))}function b(a,b,c){var d=this,e=nc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new kc,g=uc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new ec(f,hc(function(){vc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new nc(gb,a,b,c)}(),xc=cb.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return eb(a)||(a=qc),new rd(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),yc=xc.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new xc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),zc=xc.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new xc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Ac=xc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new xc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),Bc=cb.internals.Enumerator=function(a){this._next=a};Bc.prototype.next=function(){return this._next()},Bc.prototype[tb]=function(){return this};var Cc=cb.internals.Enumerable=function(a){this._iterator=a};Cc.prototype[tb]=function(){return this._iterator()},Cc.prototype.concat=function(){var a=this;return new rd(function(b){var c,d=a[tb](),e=new lc,f=qc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;kb(h)&&(h=kd(h));var i=new kc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new ec(e,f,hc(function(){c=!0}))})},Cc.prototype.catchError=function(){var a=this;return new rd(function(b){var c,d=a[tb](),e=new lc,f=qc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;kb(i)&&(i=kd(i));var j=new kc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new ec(e,f,hc(function(){c=!0}))})},Cc.prototype.catchErrorWhen=function(a){var b=this;return new rd(function(c){var d,e,f=new ud,g=new ud,h=a(f),i=h.subscribe(g),j=b[tb](),k=new lc,l=qc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;kb(i)&&(i=kd(i));var l=new kc,m=new kc;k.setDisposable(new ec(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new ec(i,k,l,hc(function(){d=!0}))})};var Dc,Ec=Cc.repeat=function(a,b){return null==b&&(b=-1),new Cc(function(){var c=b;return new Bc(function(){return 0===c?ub:(c>0&&c--,{done:!1,value:a})})})},Fc=Cc.of=function(a,b,c){if(b)var d=yb(b,c,3);return new Cc(function(){var c=-1;return new Bc(function(){return++c<a.length?{done:!1,value:b?d(a[c],c,a):a[c]}:ub})})},Gc=cb.Observer=function(){},Hc=Gc.create=function(a,b,c){return a||(a=db),b||(b=jb),c||(c=db),new Jc(a,b,c)},Ic=cb.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}function c(){throw new Error("Method not implemented")}return $b(b,a),b.prototype.next=c,b.prototype.error=c,b.prototype.completed=c,b.prototype. this.isStopped?!1:(this.isStopped=!0,thi
8000
s.error(a),!0)},b}(Gc),Jc=cb.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return $b(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(Ic),Kc=cb.Observable=function(){function a(a){if(cb.config.longStackSupport&&ob){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var c=this;this._subscribe=function(b){var e=b.onError.bind(b);return b. this._subscribe=a}return Dc=a.prototype,Dc.subscribe=Dc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Hc(a,b,c))},Dc.subscribeOnNext=function(a,b){return this._subscribe(Hc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Dc.subscribeOnError=function(a,b){return this._subscribe(Hc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Dc.subscribeOnCompleted=function(a,b){return this._subscribe(Hc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),Lc=cb.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?hc(a):ic}function c(a,c){var d=c[0],e=c[1],f=p(e.subscribeCore).call(e,d);return f!==Yb||d.fail(Yb.e)?void d.setDisposable(b(f)):q(Yb.e)}function d(a){var b=new sd(a),d=[b,this];return rc.scheduleRequired()?rc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return $b(e,a),e.prototype.subscribeCore=function(){throw new Error("Not implemeneted")},e}(Kc),Mc=cb.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new lc}return $b(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Ic),Nc=function(a){function b(b){this.source=b,a.call(this)}return $b(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new u(a))},b}(Lc);u.prototype. this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Dc.toArray=function(){return new Nc(this)},Kc.create=Kc.createWithDisposable=function(a,b){return new rd(a,b)};var Oc=Kc.defer=function(a){return new rd(function(b){var c;try{c=a()}catch(d){return Zc(d).subscribe(b)}return kb(c)&&(c=kd(c)),c.subscribe(b)})},Pc=Kc.empty=function(a){return eb(a)||(a=qc),new rd(function(b){return a.schedule(function(){b.onCompleted()})})},Qc=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return $b(b,a),b.prototype.subscribeCore=function(a){var b=new Rc(a,this);return b.run()},b}(Lc),Rc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,b){try{var f=c.next()}catch(g){return d.onError(g)}if(f.done)return d.onCompleted();var h=f.value;if(e)try{h=e(h,a)}catch(g){return d.onError(g)}d.onNext(h),b(a+1)}var b=Object(this.parent.iterable),c=A(b),d=this.observer,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),Sc=Math.pow(2,53)-1;v.prototype[tb]=function(){return new w(this._s)},w.prototype[tb]=function(){return this},w.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:ub},x.prototype[tb]=function(){return new y(this._a)
},y.prototype[tb]=function(){return this},y.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:ub};var Tc=Kc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!lb(b))throw new Error("mapFn when provided must be a function");if(b)var e=yb(b,c,2);return eb(d)||(d=rc),new Qc(a,e,d)},Uc=function(a){function b(b,c){this.args=b,this.scheduler=c||rc,a.call(this)}return $b(b,a),b.prototype.subscribeCore=function(a){var b=new D(a,this);return b.run()},b}(Lc);D.prototype.run=function(){function a(a,e){d>a?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};{var Vc=Kc.fromArray=function(a,b){return new Uc(a,b)};Kc.never=function(){return new rd(function(){return ic})}}Kc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Uc(b)},Kc.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new Uc(c,a)},Kc.pairs=function(a,b){return b||(b=cb.Scheduler.currentThread),new rd(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})};var Wc=function(a){function b(b,c,d){this.start=b,this.count=c,this.scheduler=d,a.call(this)}return $b(b,a),b.prototype.subscribeCore=function(a){var b=new Xc(a,this);return b.run()},b}(Lc),Xc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()}var b=this.parent.start,c=this.parent.count,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();Kc.range=function(a,b,c){return eb(c)||(c=rc),new Wc(a,b,c)},Kc.repeat=function(a,b,c){return eb(c)||(c=rc),Yc(a,c).repeat(null==b?-1:b)};var Yc=Kc["return"]=Kc.just=function(a,b){return eb(b)||(b=qc),new rd(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Kc.returnValue=function(){return Yc.apply(null,arguments)};var Zc=Kc["throw"]=Kc.throwError=function(a,b){return eb(b)||(b=qc),new rd(function(c){return b.schedule(function(){c.onError(a)})})};Kc.throwException=function(){return Kc.throwError.apply(null,arguments)},Dc["catch"]=Dc.catchError=Dc.catchException=function(a){return"function"==typeof a?F(this,a):$c([this,a])};var $c=Kc.catchError=Kc["catch"]=Kc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Fc(a).catchError()};Dc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),_c.apply(this,b)};var _c=Kc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop();return a--,Array.isArray(b[0])&&(b=b[0]),new rd(function(c){function e(a){if(h[a]=!0,i||(i=h.every(fb))){try{var b=d.apply(null,k)}catch(e){return void c.onError(e)}c.onNext(b)}else j.filter(function(b,c){return c!==a}).every(fb)&&c.onCompleted()}function f(a){j[a]=!0,j.every(fb)&&c.onCompleted()}for(var g=function(){return!1},h=r(a,g),i=!1,j=r(a,g),k=new Array(a),l=new Array(a),m=0;a>m;m++)!function(a){var d=b[a],g=new kc;kb(d)&&(d=kd(d)),g.setDisposable(d.subscribe(function(b){k[a]=b,e(a)},function(a){c.onError(a)},function(){f(a)})),l[a]=g}(m);return new ec(l)},this)};Dc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),ad.apply(null,a)};var ad=Kc.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return Fc(a).concat()};Dc.concatAll=Dc.concatObservable=function(){return this.merge(1)};var bd=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return $b(b,a),b.prototype.subscribeCore=function(a){var b=new ec;return b.add(this.source.subscribe(new cd(a,this.maxConcurrent,b))),b},b}(Lc),cd=function(){function a(a,b,c){this.o=a,this.max=b,this.g=c,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function b(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return a.prototype.handleSubscribe=function(a){var c=new kc;this.g.add(c),kb(a)&&(a=kd(a)),c.setDisposable(a.subscribe(new b(this,c)))},a.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype. a=this.parent;a.g.remove(this.sad),a.q.length>0?a.handleSubscribe(a.q.shift()):(a.activeCount--,a.done&&0===a.activeCount&&a.o.onCompleted())}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Dc.merge=function(a){return"number"!=typeof a?dd(this,a):new bd(this,a)};var dd=Kc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(eb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=qc,b=0;d>b;b++)c.push(arguments[b]);else for(a=qc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),E(a,c).mergeAll()},ed=function(a){function b(b){this.source=b,a.call(this)}return $b(b,a),b.prototype.subscribeCore=function(a){var b=new ec,c=new kc;return b.add(c),c.setDisposable(this.source.subscribe(new fd(a,b))),b},b}(Lc),fd=function(){function a(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function b(a,b,c){this.parent=a,this.g=b,this.sad=c,this.isStopped=!1}return a.prototype. c=new kc;this.g.add(c),kb(a)&&(a=kd(a)),c.setDisposable(a.subscribe(new b(this,this.g,c)))}},a.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype. a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a.done&&1===a.g.length&&a.o.onCompleted()}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Dc.mergeAll=Dc.mergeObservable=function(){return new ed(this)};var gd=cb.CompositeError=function(a){this.name="NotImplementedError",this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};gd.prototype=Error.prototype,Kc.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=E(null,a);return new rd(function(a){function b(){0===g.length?a.onCompleted():a.onError(1===g.length?g[0]:new gd(g))}var c=new ec,e=new kc,f=!1,g=[];return c.add(e),e.setDisposable(d.subscribe(function(d){var e=new kc;c.add(e),kb(d)&&(d=kd(d)),e.setDisposable(d.subscribe(function(b){a.onNext(b)},function(a){g.push(a),c.remove(e),f&&1===c.length&&b()},function(){c.remove(e),f&&1===c.length&&b()}))},function(a){g.push(a),f=!0,1===c.length&&b()},function(){f=!0,1===c.length&&b()})),c})},Dc.skipUntil=function(a){var b=this;return new rd(function(c){var d=!1,e=new ec(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));kb(a)&&(a=kd(a));var f=new kc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},Dc["switch"]=Dc.switchLatest=function(){var a=this;return new rd(function(b){var c=!1,d=new lc,e=!1,f=0,g=a.subscribe(function(a){var g=new kc,h=++f;c=!0,d.setDisposable(g),kb(a)&&(a=kd(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},function(a){b.onError(a)},function(){e=!0,!c&&b.onCompleted()});return new ec(g,d)},a)},Dc.takeUntil=function(a){var b=this;return new rd(function(c){return kb(a)&&(a=kd(a)),new ec(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},db))},b)},Dc.withLatestFrom=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new rd(function(b){for(var c=function(){return!1},f=a.length,g=r(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new kc;kb(d)&&(d=kd(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(fb)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new kc;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new ec(j)},this)},Dc.zip=function(){if(Array.isArray(arguments[0]))return G.apply(this,arguments);for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=this,e=b.pop();return b.unshift(d),new rd(function(a){function c(b){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void a.onError(g)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every(fb)&&a.onCompleted()}function f(b){i[b]=!0,i.every(function(a){return a})&&a.onCompleted()}for(var g=b.length,h=r(g,I),i=r(g,H),j=new Array(g),k=0;g>k;k++)!function(d){var e=b[d],g=new kc;kb(e)&&(e=kd(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(b){a.onError(b)},function(){f(d)})),j[d]=g}(k);return new ec(j)},d)},Kc.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.shift();return d.zip.apply(d,b)},Kc.zipArray=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new rd(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(fb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(fb)?void b.onCompleted():void 0}for(var e=a.length,f=r(e,function(){return[]}),g=r(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new kc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new ec(h)})},Dc.asObservable=function(){var a=this;return new rd(function(b){return a.subscribe(b)},this)},Dc.dematerialize=function(){var a=this;return new rd(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},Dc.distinctUntilChanged=function(a,b){var c=this;return b||(b=hb),new rd(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},Dc["do"]=Dc.tap=Dc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?Hc(a||db,b||db,c||db):a;return new rd(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},Dc.doOnNext=Dc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Dc.doOnError=Dc.tapOnError=function(a,b){return this.tap(db,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Dc.doOnCompleted=Dc.tapOnCompleted=function(a,b){return this.tap(db,null,"undefined"!=typeof b?function(){a.call(b)}:a)},Dc["finally"]=Dc.ensure=function(a){var b=this;return new rd(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return hc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},Dc.finallyAction=function(a){return this.ensure(a)},Dc.ignoreElements=function(){var a=this;return new rd(function(b){return a.subscribe(db,function(a){b.onError(a)},function(){b.onCompleted()})},a)},Dc.materialize=function(){var a=this;return new rd(function(b){return a.subscribe(function(a){b.onNext(yc(a))},function(a){b.onNext(zc(a)),b.onCompleted()},function(){b.onNext(Ac()),b.onCompleted()})},a)},Dc.repeat=function(a){return Ec(this,a).concat()},Dc.retry=function(a){return Ec(this,a).catchError()},Dc.retryWhen=function(a){return Ec(this).catchErrorWhen(a)},Dc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new rd(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},Dc.skipLast=function(a){var b=this;return new rd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},Dc.startWith=function(){var a,b=0;arguments.length&&eb(arguments[0])?(a=arguments[0],b=1):a=qc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return Fc([Vc(c,a),this]).concat()},Dc.takeLast=function(a){var b=this;return new rd(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},Dc.selectConcat=Dc.concatMap=function(a,b,c){return lb(a)&&lb(b)?this.concatMap(function(c,d){var e=a(c,d);return kb(e)&&(e=kd(e)),(wb(e)||vb(e))&&(e=Tc(e)),e.map(function(a,e){return b(c,a,d,e)})}):lb(a)?J(this,a,c):J(this,function(){return a})};var hd=function(a){function b(b,c,d){this.source=b,this.selector=yb(c,d,3),a.call(this)}return $b(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new K(a,this.selector,this))},b}(Lc);K.prototype. b=p(this.selector).call(this,a,this.i++,this.source);return b===Yb?this.observer.onError(b.e):void this.observer.onNext(b)}},K.prototype. this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Dc.map=Dc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof hd?this.internalMap(c,b):new hd(this,c,b)},Dc.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},Dc.selectMany=Dc.flatMap=function(a,b,c){return lb(a)&&lb(b)?this.flatMap(function(c,d){var e=a(c,d);return kb(e)&&(e=kd(e)),(wb(e)||vb(e))&&(e=Tc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):lb(a)?L(this,a,c):L(this,function(){return a})},Dc.selectSwitch=Dc.flatMapLatest=Dc.switchMap=function(a,b){return this.select(a,b).switchLatest()},Dc.skip=function(a){if(0>a)throw new Error(mb);var b=this;return new rd(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},Dc.skipWhile=function(a,b){var c=this,d=yb(a,b,3);return new rd(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},Dc.take=function(a,b){if(0>a)throw new RangeError(mb);if(0===a)return Pc(b);var c=this;return new rd(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},Dc.takeWhile=function(a,b){var c=this,d=yb(a,b,3);return new rd(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var id=function(a){function b(b,c,d){this.source=b,this.predicate=yb(c,d,3),a.call(this)}return $b(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new M(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Lc);M.prototype. b=p(this.predicate).call(this,a,this.i++,this.source);return b===Yb?this.observer.onError(b.e):void(b&&this.observer.onNext(a))}},M.prototype. this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Dc.filter=Dc.where=function(a,b){return this instanceof id?this.internalFilter(a,b):new id(this,a,b)},Kc.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new rd(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Kc.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new rd(function(e){function f(a){if(a)return void e.onError(a);for(var b=[],d=1,f=arguments.length;f>d;d++)b.push(arguments[d]);if(c){try{b=c(b)}catch(g){return e.onError(g)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},cb.config.useNativeEvents=!1,Kc.fromEvent=function(a,b,c){return a.addListener?jd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):cb.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new rd(function(d){return P(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount():jd(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var jd=Kc.fromEventPattern=function(a,b,c){return new rd(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return hc(function(){b&&b(e,f)})}).publish().refCount()},kd=Kc.fromPromise=function(a){return Oc(function(){var b=new cb.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};Dc.toPromise=function(a){if(a||(a=cb.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Kc.startAsync=function(a){var b;try{b=a()}catch(c){return Zc(c)}return kd(b)},Dc.multicast=function(a,b){var c=this;return"function"==typeof a?new rd(function(d){var e=c.multicast(a());return new ec(b(e).subscribe(d),e.connect())},c):new ld(c,a)},Dc.publish=function(a){return a&&lb(a)?this.multicast(function(){return new ud},a):this.multicast(new ud)},Dc.share=function(){return this.publish().refCount()},Dc.publishLast=function(a){return a&&lb(a)?this.multicast(function(){return new vd},a):this.multicast(new vd)},Dc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new xd(b)},a):this.multicast(new xd(a))},Dc.shareValue=function(a){return this.publishValue(a).refCount()},Dc.replay=function(a,b,c,d){return a&&lb(a)?this.multicast(function(){return new yd(b,c,d)},a):this.multicast(new yd(b,c,d))},Dc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var ld=cb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new ec(f.subscribe(c),hc(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return $b(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new rd(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Kc),md=Kc.interval=function(a,b){return T(a,a,eb(b)?b:wc)};Kc.timer=function(b,c,d){var e;return eb(d)||(d=wc),c!==a&&"number"==typeof c?e=c:eb(c)&&(d=c),b instanceof Date&&e===a?Q(b.getTime(),d):b instanceof Date&&e!==a?(e=c,R(b.getTime(),e,d)):e===a?S(b,d):T(b,e,d)}}Dc.delay=function(a,b){return eb(b)||(b=wc),a instanceof Date?V(this,a.getTime(),b):U(this,a,b)},Dc.debounce=Dc.throttleWithTimeout=function(a,b){eb(b)||(b=wc);var c=this;return new rd(function(d){var e,f=new lc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new kc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new ec(i,f)},this)},Dc.throttle=function(a,b){return this.debounce(a,b)},Dc.timestamp=function(a){return eb(a)||(a=wc),this.map(function(b){return{value:b,timestamp:a.now()}})},Dc.sample=Dc.throttleLatest=function(a,b){return eb(b)||(b=wc),"number"==typeof a?W(this,md(a,b)):W(this,a)},Dc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=Zc(new Error(b||"Timeout"))),eb(c)||(c=wc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new rd(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(kb(b)&&(b=kd(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new kc,j=new lc,k=!1,l=new lc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new ec(j,l)},d)},Dc.throttleFirst=function(a,b){eb(b)||(b=wc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new rd(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var nd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=ic,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=ic)});return new ec(c,d,e)}function c(c,d){this.source=c,this.controller=new ud,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return $b(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Kc);Dc.pausable=function(a){return new nd(this,a)};var od=function(b){function c(b){var c,d=[],e=X(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new ud,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return $b(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Kc);Dc.pausableBuffered=function(a){return new od(this,a)};var pd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new qd(d),this.source=c.multicast(this.subject).refCount()}return $b(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Kc),qd=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new ud,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=ic,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=ic}return $b(c,a),_b(c.prototype,Gc,{onCompleted:function(){this.hasCompleted=!0,(!this.enableQueue||0===this.queue.length)&&this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,(!this.enableQueue||0===this.queue.length)&&this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=ic):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=ic),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?ic:(this.requestedCount=a,this.requestedDisposable=hc(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=ic}}),c}(Kc);Dc.controlled=function(a){return null==a&&(a=!0),new pd(this,a)},Dc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onC
4B0E
ompleted()}}}var c=this;return new rd(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})},c)};var rd=cb.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?hc(a):ic}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new sd(a),e=[d,b];return rc.scheduleRequired()?rc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return $b(d,a),d}(Kc),sd=function(a){function b(b){a.call(this),this.observer=b,this.m=new kc}$b(b,a);var c=b.prototype;return c.next=function(a){var b=p(this.observer.onNext).call(this.observer,a);return b===Yb?(this.dispose(),q(b.e)):void 0},c.error=function(a){var b=p(this.observer.onError).call(this.observer,a);return this.dispose(),b===Yb?q(b.e):void 0},c.completed=function(){var a=p(this.observer.onCompleted).call(this.observer);return this.dispose(),a===Yb?q(a.e):void 0},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Ic),td=function(a,b){this.subject=a,this.observer=b};td.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var ud=cb.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),ic):(a.onCompleted(),ic):(this.observers.push(a),new td(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return $b(e,a),_b(e.prototype,Gc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new wd(a,b)},e}(Kc),vd=cb.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),ic):(this.observers.push(a),new td(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return $b(e,a),_b(e.prototype,Gc,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(Kc),wd=cb.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return $b(c,a),_b(c.prototype,Gc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Kc),xd=cb.BehaviorSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),ic):(this.observers.push(a),a.onNext(this.value),new td(this,a))}function e(b){a.call(this,d),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return $b(e,a),_b(e.prototype,Gc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped){this.value=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),e}(Kc),yd=cb.ReplaySubject=function(a){function d(a,b){return hc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function e(a){var c=new Mc(this.scheduler,a),e=d(this,c);b(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=0,g=this.q.length;g>f;f++)c.onNext(this.q[f].value);
return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),e}function f(b,c,d){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=d||rc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,e)}return $b(f,a),_b(f.prototype,Gc.prototype,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b(this),!this.isStopped){var d=this.scheduler.now();this.q.push({interval:d,value:a}),this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onNext(a),h.ensureActive()}}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var d=this.scheduler.now();this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onError(a),h.ensureActive()}this.observers.length=0}},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onCompleted(),g.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),f}(Kc);cb.Pauser=function(a){function b(){a.call(this)}return $b(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(ud),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Z.Rx=cb,define(function(){return cb})):$&&_?ab?(_.exports=cb).Rx=cb:$.Rx=cb:Z.Rx=cb;var zd=h()}).call(this);
//# sourceMappingURL=rx.lite.compat.map