Repository navigation
Expand file tree
/
Copy pathrx.compat.min.js
More file actions
5 lines (5 loc) · 66.7 KB
/
Copy pathrx.compat.min.js
File metadata and controls
5 lines (5 loc) · 66.7 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){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function c(a){return function(){try{return a.apply(this,arguments)}catch(b){return fa.e=b,fa}}}function d(a){throw a}function e(a,b){if(ha&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(la)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var e=c.join("\n"+la+"\n");a.stack=f(e)}}function f(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var f=b[d];g(f)||h(f)||!f||c.push(f)}return c.join("\n")}function g(a){var b=j(a);if(!b)return!1;var c=b[0],d=b[1];return c===ja&&d>=ka&&Oc>=d}function h(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function i(){if(ha)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=j(c);if(!d)return;return ja=d[0],d[1]}}function j(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 k(a){var b=[];if(!Va(a))return b;Ua.nonEnumArgs&&a.length&&Wa(a)&&(a=Ya.call(a));var c=Ua.enumPrototypes&&"function"==typeof a,d=Ua.enumErrorProps&&(a===Oa||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Ua.nonEnumShadows&&a!==Pa){var f=a.constructor,g=-1,h=Aa;if(a===(f&&f.prototype))var i=a===Qa?Ka:a===Oa?Fa:La.call(a),j=Ta[i];for(;++g<h;)e=za[g],j&&j[e]||!Ma.call(a,e)||b.push(e)}return b}function l(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 m(a,b){return l(a,b,k)}function n(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function o(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=La.call(a),h=La.call(b);if(g==Ba&&(g=Ia),h==Ba&&(h=Ia),g!=h)return!1;switch(g){case Da:case Ea:return+a==+b;case Ha:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Ja:case Ka:return a==String(b)}var i=g==Ca;if(!i){if(g!=Ia||!Ua.nodeClass&&(n(a)||n(b)))return!1;var j=!Ua.argsObject&&Wa(a)?Object:a.constructor,k=!Ua.argsObject&&Wa(b)?Object:b.constructor;if(!(j==k||Ma.call(a,"constructor")&&Ma.call(b,"constructor")||ea(j)&&j instanceof j&&ea(k)&&k instanceof k||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var l=c.length;l--;)if(c[l]==a)return d[l]==b;var p=0,q=!0;if(c.push(a),d.push(b),i){if(l=a.length,p=b.length,q=p==l)for(;p--;){var r=b[p];if(!(q=o(a[p],r,c,d)))break}}else m(b,function(b,e,f){return Ma.call(f,e)?(p++,q=Ma.call(a,e)&&o(a[e],b,c,d)):void 0}),q&&m(a,function(a,b,c){return Ma.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function r(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function s(a){this._s=a}function t(a){this._s=a,this._l=a.length,this._i=0}function u(a){this._a=a}function v(a){this._a=a,this._l=z(a),this._i=0}function w(a){return"number"==typeof a&&X.isFinite(a)}function x(b){var c,d=b[ta];if(!d&&"string"==typeof b)return c=new s(b),c[ta]();if(!d&&b.length!==a)return c=new u(b),c[ta]();if(!d)throw new TypeError("Object is not iterable");return b[ta]()}function y(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function z(a){var b=+a.length;return isNaN(b)?0:0!==b&&w(b)?(b=y(b)*Math.floor(Math.abs(b)),0>=b?0:b>ac?ac:b):b}function A(a,b){this.observer=a,this.parent=b}function B(a,b){return pb(a)||(a=tb),new cc(b,a)}function C(a,b){this.observer=a,this.parent=b}function D(a,b){this.observer=a,this.parent=b}function E(a,b){return a.amb(b)}function F(a,b){return new Jc(function(c){var d=new jb,e=new kb;return e.setDisposable(d),d.setDisposable(a.subscribe(new oc(c,e,b))),e},a)}function G(){return!1}function H(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function G(){return!1}function G(){return!1}function I(){return[]}function H(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function G(){return!1}function I(){return[]}function H(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function J(a){return function(b){return a.subscribe(b)}}function K(a){return a.toArray()}function L(a){return a.length>0}function M(a,b){this.o=a,this.accumulator=b.accumulator,this.hasSeed=b.hasSeed,this.seed=b.seed,this.hasAccumulation=!1,this.accumulation=null,this.hasValue=!1,this.isStopped=!1}function N(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function O(a){this.comparer=a,this.set=[]}function P(b,c){return 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}}var Q={"function":!0,object:!0},R=Q[typeof exports]&&exports&&!exports.nodeType&&exports,S=Q[typeof self]&&self.Object&&self,T=Q[typeof window]&&window&&window.Object&&window,U=Q[typeof module]&&module&&!module.nodeType&&module,V=U&&U.exports===R&&R,W=R&&U&&"object"==typeof global&&global&&global.Object&&global,X=X=W||T!==(this&&this.window)&&T||S||this,Y={internals:{},config:{Promise:X.Promise},helpers:{}},Z=Y.helpers.noop=function(){},$=Y.helpers.identity=function(a){return a},_=Y.helpers.defaultNow=function(){return Date.now?Date.now:function(){return+new Date}}(),aa=Y.helpers.defaultComparer=function(a,b){return Xa(a,b)},ba=Y.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},ca=(Y.helpers.defaultKeySerializer=function(a){return a.toString()},Y.helpers.defaultError=function(a){throw a}),da=Y.helpers.isPromise=function(a){return!!a&&"function"!=typeof a.subscribe&&"function"==typeof a.then},ea=Y.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==La.call(a)}),a}(),fa={e:{}},ga=Y.internals.tryCatch=function(a){if(!ea(a))throw new TypeError("fn must be a function");return c(a)};Y.config.longStackSupport=!1;var ha=!1,ia=ga(function(){throw new Error})();ha=!!ia.e&&!!ia.e.stack;var ja,ka=i(),la="From previous event:",ma=Y.EmptyError=function(){this.message="Sequence contains no elements.",this.name="EmptyError",Error.call(this)};ma.prototype=Object.create(Error.prototype);var na=Y.ObjectDisposedError=function(){this.message="Object has been disposed",this.name="ObjectDisposedError",Error.call(this)};na.prototype=Object.create(Error.prototype);var oa=Y.ArgumentOutOfRangeError=function(){this.message="Argument out of range",this.name="ArgumentOutOfRangeError",Error.call(this)};oa.prototype=Object.create(Error.prototype);var pa=Y.NotSupportedError=function(a){this.message=a||"This operation is not supported",this.name="NotSupportedError",Error.call(this)};pa.prototype=Object.create(Error.prototype);var qa=Y.NotImplementedError=function(a){this.message=a||"This operation is not implemented",this.name="NotImplementedError",Error.call(this)};qa.prototype=Object.create(Error.prototype);var ra=Y.helpers.notImplemented=function(){throw new qa},sa=Y.helpers.notSupported=function(){throw new pa},ta="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";X.Set&&"function"==typeof(new X.Set)["@@iterator"]&&(ta="@@iterator");var ua=Y.doneEnumerator={done:!0,value:a},va=Y.helpers.isIterable=function(b){return b[ta]!==a},wa=Y.helpers.isArrayLike=function(b){return b&&b.length!==a};Y.helpers.iterator=ta;var xa,ya=Y.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)}},za=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Aa=za.length,Ba="[object Arguments]",Ca="[object Array]",Da="[object Boolean]",Ea="[object Date]",Fa="[object Error]",Ga="[object Function]",Ha="[object Number]",Ia="[object Object]",Ja="[object RegExp]",Ka="[object String]",La=Object.prototype.toString,Ma=Object.prototype.hasOwnProperty,Na=La.call(arguments)==Ba,Oa=Error.prototype,Pa=Object.prototype,Qa=String.prototype,Ra=Pa.propertyIsEnumerable;try{xa=!(La.call(document)==Ia&&!({toString:0}+""))}catch(Sa){xa=!0}var Ta={};Ta[Ca]=Ta[Ea]=Ta[Ha]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Ta[Da]=Ta[Ka]={constructor:!0,toString:!0,valueOf:!0},Ta[Fa]=Ta[Ga]=Ta[Ja]={constructor:!0,toString:!0},Ta[Ia]={constructor:!0};var Ua={};!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);Ua.enumErrorProps=Ra.call(Oa,"message")||Ra.call(Oa,"name"),Ua.enumPrototypes=Ra.call(a,"prototype"),Ua.nonEnumArgs=0!=c,Ua.nonEnumShadows=!/valueOf/.test(b)}(1);var Va=Y.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Wa=function(a){return a&&"object"==typeof a?La.call(a)==Ba:!1};Na||(Wa=function(a){return a&&"object"==typeof a?Ma.call(a,"callee"):!1});var Xa=Y.internals.isEqual=function(a,b){return o(a,b,[],[])},Ya=({}.hasOwnProperty,Array.prototype.slice),Za=Y.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},$a=Y.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]}},_a=Y.internals.addRef=function(a,b){return new Jc(function(c){return new cb(b.getDisposable(),a.subscribe(c))})},Ya=Array.prototype.slice,La=Object.prototype.toString;Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Ya.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(Ya.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(Ya.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 ab=Object("a"),bb="a"!==ab[0]||!(0 in ab);Array.prototype.every||(Array.prototype.every=function(a){var b=Object(this),c=bb&&La.call(this)===Ka?this.split(""):b,d=c.length>>>0,e=arguments[1];if(La.call(a)!==Ga)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=bb&&La.call(this)===Ka?this.split(""):b,d=c.length>>>0,e=new Array(d),f=arguments[1];if(La.call(a)!==Ga)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 La.call(a)===Ca}),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&&d!==1/0&&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;Aa>e;e++)a.call(c,za[e])&&f.push(za[e]);return f}}()),"function"!=typeof Object.create&&(Object.create=function(){function a(){}var b=Object.prototype.hasOwnProperty;return function(c){if("object"!=typeof c)throw new TypeError("Object prototype may only be an Object or null");a.prototype=c;var d=new a;if(a.prototype=null,arguments.length>1){var e=Object(arguments[1]);for(var f in e)b.call(e,f)&&(d[f]=e[f])}return d}}());var cb=Y.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(!hb(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length},db=cb.prototype;db.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},db.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},db.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 eb=Y.Disposable=function(a){this.isDisposed=!1,this.action=a||Z};eb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var fb=eb.create=function(a){return new eb(a)},gb=eb.empty={dispose:Z},hb=eb.isDisposable=function(a){return a&&ea(a.dispose)},ib=eb.checkDisposed=function(a){if(a.isDisposed)throw new na},jb=Y.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};jb.prototype.getDisposable=function(){return this.current},jb.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},jb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var kb=Y.SerialDisposable=function(){this.isDisposed=!1,this.current=null};kb.prototype.getDisposable=function(){return this.current},kb.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},kb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var lb=Y.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?gb:new a(this)},b}();q.prototype.dispose=function(){this.scheduler.scheduleWithState(this,r)};var mb=Y.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||ba,this.disposable=new jb};mb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},mb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},mb.prototype.isCancelled=function(){return this.disposable.isDisposed},mb.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var nb=Y.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(),gb}a.isScheduler=function(b){return b instanceof a};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=_,a.normalize=function(a){return 0>a&&(a=0),a},a}(),ob=nb.normalize,pb=nb.isScheduler;!function(a){function b(a,b){function c(b){function d(a,b){return g?f.remove(i):h=!0,e(b,c),gb}var g=!1,h=!1,i=a.scheduleWithState(b,d);h||(f.add(i),g=!0)}var d=b[0],e=b[1],f=new cb;return e(d,c),f}function c(a,b,c){function d(b,e){function h(a,b){return i?g.remove(k):j=!0,f(b,d),gb}var i=!1,j=!1,k=a[c](b,e,h);j||(g.add(k),i=!0)}var e=b[0],f=b[1],g=new cb;return f(e,d),g}function d(a,b){return c(a,b,"scheduleWithRelativeAndState")}function e(a,b){return c(a,b,"scheduleWithAbsoluteAndState")}function f(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,f)},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState([a,c],b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,f)},a.scheduleRecursiveWithRelativeAndState=function(a,b,c){return this._scheduleRelative([a,c],b,d)},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,f)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute([a,c],b,e)}}(nb.prototype),function(a){nb.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},nb.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof X.setInterval)throw new pa;b=ob(b);var d=a,e=X.setInterval(function(){d=c(d)},b);return fb(function(){X.clearInterval(e)})}}(nb.prototype),function(a){a.catchError=a["catch"]=function(a){return new xb(this,a)}}(nb.prototype);var qb,rb,sb=(Y.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 jb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),nb.immediate=function(){function a(a,b){return b(this,a)}return new nb(_,a,sa,sa)}()),tb=nb.currentThread=function(){function a(){for(;c.length>0;){var a=c.shift();!a.isCancelled()&&a.invoke()}}function b(b,e){var f=new mb(this,b,e,this.now());if(c)c.push(f);else{c=[f];var g=ga(a)();if(c=null,g===fa)return d(g.e)}return f.disposable}var c,e=new nb(_,b,sa,sa);return e.scheduleRequired=function(){return!c},e}(),ub=function(){var a,b=Z;if(X.setTimeout)a=X.setTimeout,b=X.clearTimeout;else{if(!X.WScript)throw new pa;a=function(a,b){X.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}(),vb=ub.setTimeout,wb=ub.clearTimeout;!function(){function a(b){if(g)vb(function(){a(b)},0);else{var c=f[b];if(c){g=!0;var e=ga(c)();if(rb(b),g=!1,e===fa)return d(e.e)}}}function b(){if(!X.postMessage||X.importScripts)return!1;var a=!1,b=X.onmessage;return X. c(b){"string"==typeof b.data&&b.data.substring(0,j.length)===j&&a(b.data.substring(j.length))}var e=1,f={},g=!1;rb=function(a){delete f[a]};var h=RegExp("^"+String(La).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),i="function"==typeof(i=W&&V&&W.setImmediate)&&!h.test(i)&&i;if(ea(i))qb=function(b){var c=e++;return f[c]=b,i(function(){a(c)}),c};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))qb=function(b){var c=e++;return f[c]=b,process.nextTick(function(){a(c)}),c};else if(b()){var j="ms.rx.schedule"+Math.random();X.addEventListener?X.addEventListener("message",c,!1):X.attachEvent?X.attachEvent("onmessage",c):X. b=e++;return f[b]=a,X.postMessage(j+currentId,"*"),b}}else if(X.MessageChannel){var k=new X.MessageChannel;k.port1. b=e++;return f[b]=a,k.port2.postMessage(b),b}}else qb="document"in X&&"onreadystatechange"in X.document.createElement("script")?function(b){var c=X.document.createElement("script"),d=e++;return f[d]=b,c. c=e++;return f[c]=b,vb(function(){a(c)},0),c}}();var xb=(nb.timeout=nb["default"]=function(){function a(a,b){var c=this,d=new jb,e=qb(function(){!d.isDisposed&&d.setDisposable(b(c,a))});return new cb(d,fb(function(){rb(e)}))}function b(a,b,c){var d=this,e=nb.normalize(b),f=new jb;if(0===e)return d.scheduleWithState(a,c);var g=vb(function(){!f.isDisposed&&f.setDisposable(c(d,a))},e);return new cb(f,fb(function(){wb(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new nb(_,a,b,c)}(),function(a){function b(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function c(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function d(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function e(e,f){this._scheduler=e,this._handler=f,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,this._scheduler.now.bind(this._scheduler),b,c,d)}return Za(e,a),e.prototype._clone=function(a){return new e(a,this._handler)},e.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return gb}}},e.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},e.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new jb;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},e}(nb)),yb=Y.Notification=function(){function a(a,b,c,d,e,f){this.kind=a,this.value=b,this.exception=c,this._accept=d,this._acceptObservable=e,this.toString=f}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 pb(a)||(a=sb),new Jc(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),zb=yb.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){return new yb("N",d,null,a,b,c)}}(),Ab=yb.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){return new yb("E",null,d,a,b,c)}}(),Bb=yb.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new yb("C",null,null,a,b,c)}}(),Cb=Y.Observer=function(){};Cb.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},Cb.prototype.asObserver=function(){var a=this;return new Gb(function(b){a.onNext(b)},function(b){a.onError(b)},function(){a.onCompleted()})},Cb.prototype.checked=function(){return new Hb(this)};var Db=Cb.create=function(a,b,c){return a||(a=Z),b||(b=ca),c||(c=Z),new Gb(a,b,c)};Cb.fromNotifier=function(a,b){var c=ya(a,b,1);return new Gb(function(a){return c(zb(a))},function(a){return c(Ab(a))},function(){return c(Bb())})},Cb.prototype.notifyOn=function(a){return new Jb(a,this)},Cb.prototype.makeSafe=function(a){return new AnonymousSafeObserver(this._on
8000
Next,this._onError,this._onCompleted,a)};var Eb,Fb=Y.internals.AbstractObserver=function(a){function b(){this.isStopped=!1}return Za(b,a),b.prototype.next=ra,b.prototype.error=ra,b.prototype.completed=ra,b.prototype. this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(Cb),Gb=Y.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return Za(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}(Fb),Hb=function(a){function b(b){a.call(this),this._observer=b,this._state=0}Za(b,a);var c=b.prototype;return c. b=ga(this._observer.onNext).call(this._observer,a);this._state=0,b===fa&&d(b.e)},c. b=ga(this._observer.onError).call(this._observer,a);this._state=2,b===fa&&d(b.e)},c. a=ga(this._observer.onCompleted).call(this._observer);this._state=2,a===fa&&d(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(Cb),Ib=Y.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 kb}return Za(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;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursiveWithState(this,function(a,b){var c;if(!(a.queue.length>0))return void(a.isAcquired=!1);c=a.queue.shift();var e=ga(c)();return e===fa?(a.queue=[],a.hasFaulted=!0,d(e.e)):void b(a)}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Fb),Jb=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return Za(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(Ib),Kb=Y.Observable=function(){function a(a,b){return function(c){var d=c.onError;return c. b(b){if(Y.config.longStackSupport&&ha){var c=ga(d)(new Error).e;this.stack=c.stack.substring(c.stack.indexOf("\n")+1),this._subscribe=a(this,b)}else this._subscribe=b}return Eb=b.prototype,b.isObservable=function(a){return a&&ea(a.subscribe)},Eb.subscribe=Eb.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Db(a,b,c))},Eb.subscribeOnNext=function(a,b){return this._subscribe(Db("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Eb.subscribeOnError=function(a,b){return this._subscribe(Db(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Eb.subscribeOnCompleted=function(a,b){return this._subscribe(Db(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},b}(),Lb=Y.ObservableBase=function(a){function b(a){return a&&ea(a.dispose)?a:ea(a)?fb(a):gb}function c(a,c){var e=c[0],f=c[1],g=ga(f.subscribeCore).call(f,e);return g!==fa||e.fail(fa.e)?void e.setDisposable(b(g)):d(fa.e)}function e(a){var b=new Kc(a),d=[b,this];return tb.scheduleRequired()?tb.scheduleWithState(d,c):c(null,d),b}function f(){a.call(this,e)}return Za(f,a),f.prototype.subscribeCore=ra,f}(Kb),Mb=function(a){function b(b,c,d,e){this.resultSelector=Y.helpers.isFunction(d)?d:null,this.selector=Y.internals.bindCallback(Y.helpers.isFunction(c)?c:function(){return c},e,3),this.source=b,a.call(this)}function c(a,b,c,d){this.i=0,this.selector=b,this.resultSelector=c,this.source=d,this.isStopped=!1,this.o=a}return Za(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.selector,this.resultSelector,this))},c.prototype._wrapResult=function(a,b,c){return this.resultSelector?a.map(function(a,d){return this.resultSelector(b,a,c,d)},this):a},c.prototype. b=this.i++,c=ga(this.selector)(a,b,this.source);if(c===fa)return this.o.onError(c.e);Y.helpers.isPromise(c)&&(c=Y.Observable.fromPromise(c)),(Y.helpers.isArrayLike(c)||Y.helpers.isIterable(c))&&(c=Y.Observable.from(c)),this.o.onNext(this._wrapResult(c,a,b))}},c.prototype. b(b){this.sources=b,a.call(this)}function c(a,b,c){this.o=a,this.s=b,this.e=c,this.isStopped=!1}return Za(b,a),b.prototype.subscribeCore=function(a){var b,d=new kb,e=sb.scheduleRecursiveWithState(this.sources[ta](),function(e,f){if(!b){var g=ga(e.next).call(e);if(g===fa)return a.onError(g.e);if(g.done)return a.onCompleted();var h=g.value;da(h)&&(h=Vb(h));var i=new jb;d.setDisposable(i),i.setDisposable(h.subscribe(new c(a,f,e)))}});return new cb(d,e,fb(function(){b=!0}))},c.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Lb);Nb.prototype.concat=function(){return new Ob(this)};var Pb=function(a){function b(b){this.sources=b,a.call(this)}return Za(b,a),b.prototype.subscribeCore=function(a){var b,c=this.sources[ta](),d=new kb,e=sb.scheduleRecursiveWithState(null,function(e,f){if(!b){var g=ga(c.next).call(c);if(g===fa)return a.onError(g.e);if(g.done)return null!==e?a.onError(e):a.onCompleted();var h=g.value;da(h)&&(h=Vb(h));var i=new jb;d.setDisposable(i),i.setDisposable(h.subscribe(function(b){a.onNext(b)},f,function(){a.onCompleted()}))}});return new cb(d,e,fb(function(){b=!0}))},b}(Lb);Nb.prototype.catchError=function(){return new Pb(this)},Nb.prototype.catchErrorWhen=function(a){var b=this;return new Jc(function(c){var d,e,f=new Mc,g=new Mc,h=a(f),i=h.subscribe(g),j=b[ta](),k=new kb,l=sb.scheduleRecursive(function(a){if(!d){var b=ga(j.next).call(j);if(b===fa)return c.onError(b.e);if(b.done)return void(e?c.onError(e):c.onCompleted());var h=b.value;da(h)&&(h=Vb(h));var i=new jb,l=new jb;k.setDisposable(new cb(l,i)),i.setDisposable(h.subscribe(function(a){c.onNext(a)},function(b){l.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new cb(i,k,l,fb(function(){d=!0}))})};var Qb=function(a){function b(a,b){this.v=a,this.c=null==b?-1:b}function c(a){this.v=a.v,this.l=a.c}return Za(b,a),b.prototype[ta]=function(){return new c(this)},c.prototype.next=function(){return 0===this.l?ua:(this.l>0&&this.l--,{done:!1,value:this.v})},b}(Nb),Rb=Nb.repeat=function(a,b){return new Qb(a,b)},Sb=function(a){function b(a,b,c){this.s=a,this.fn=b?ya(b,c,3):null}function c(a){this.i=-1,this.s=a.s,
this.l=this.s.length,this.fn=a.fn}return Za(b,a),b.prototype[ta]=function(){return new c(this)},c.prototype.next=function(){return++this.i<this.l?{done:!1,value:this.fn?this.fn(this.s[this.i],this.i,this.s):this.s[this.i]}:ua},b}(Nb),Tb=Nb.of=function(a,b,c){return new Sb(a,b,c)};Eb.observeOn=function(a){var b=this;return new Jc(function(c){return b.subscribe(new Jb(a,c))},b)},Eb.subscribeOn=function(a){var b=this;return new Jc(function(c){var d=new jb,e=new kb;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new q(a,b.subscribe(c)))})),e},b)};var Ub=function(a){function b(b){this.p=b,a.call(this)}return Za(b,a),b.prototype.subscribeCore=function(a){return this.p.then(function(b){a.onNext(b),a.onCompleted()},function(b){a.onError(b)}),gb},b}(Lb),Vb=Kb.fromPromise=function(a){return new Ub(a)};Eb.toPromise=function(a){if(a||(a=Y.config.Promise),!a)throw new pa("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)})})};var Wb=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.a=[],this.isStopped=!1}return Za(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Lb);Eb.toArray=function(){return new Wb(this)},Kb.create=function(a,b){return new Jc(a,b)};var Xb=(Kb.defer=function(a){return new Jc(function(b){var c;try{c=a()}catch(d){return nc(d).subscribe(b)}return da(c)&&(c=Vb(c)),c.subscribe(b)})},function(a){function b(b){this.scheduler=b,a.call(this)}function c(a,b){this.observer=a,this.scheduler=b}function d(a,b){return b.onCompleted(),gb}return Za(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this.scheduler);return b.run()},c.prototype.run=function(){return this.scheduler.scheduleWithState(this.observer,d)},b}(Lb)),Yb=new Xb(sb),Zb=Kb.empty=function(a){return pb(a)||(a=sb),a===sb?Yb:new Xb(a)},$b=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return Za(b,a),b.prototype.subscribeCore=function(a){var b=new _b(a,this);return b.run()},b}(Lb),_b=function(){function a(a,b){this.o=a,this.parent=b}return a.prototype.run=function(){function a(a,b){var f=ga(c.next).call(c);if(f===fa)return d.onError(f.e);if(f.done)return d.onCompleted();var g=f.value;return ea(e)&&(g=ga(e)(g,a),g===fa)?d.onError(g.e):(d.onNext(g),void b(a+1))}var b=Object(this.parent.iterable),c=x(b),d=this.o,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),ac=Math.pow(2,53)-1;s.prototype[ta]=function(){return new t(this._s)},t.prototype[ta]=function(){return this},t.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:ua},u.prototype[ta]=function(){return new v(this._a)},v.prototype[ta]=function(){return this},v.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:ua};var bc=Kb.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!ea(b))throw new Error("mapFn when provided must be a function");if(b)var e=ya(b,c,2);return pb(d)||(d=tb),new $b(a,e,d)},cc=function(a){function b(b,c){this.args=b,this.scheduler=c,a.call(this)}return Za(b,a),b.prototype.subscribeCore=function(a){var b=new A(a,this);return b.run()},b}(Lb);A.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 dc=Kb.fromArray=function(a,b){return pb(b)||(b=tb),new cc(a,b)};Kb.generate=function(a,b,c,d,e){return pb(e)||(e=tb),new Jc(function(f){var g=!0;return e.scheduleRecursiveWithState(a,function(a,e){var h,i;try{g?g=!1:a=c(a),h=b(a),h&&(i=d(a))}catch(j){return f.onError(j)}h?(f.onNext(i),e(a)):f.onCompleted()})})};var ec=function(a){function b(){a.call(this)}return Za(b,a),b.prototype.subscribeCore=function(a){return gb},b}(Lb),fc=new ec,gc=Kb.never=function(){return fc};Kb.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new cc(b,tb)},Kb.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 cc(c,a)};var hc=function(a){function b(b,c){this.obj=b,this.keys=Object.keys(b),this.scheduler=c,a.call(this)}return Za(b,a),b.prototype.subscribeCore=function(a){var b=new C(a,this);return b.run()},b}(Lb);C.prototype.run=function(){function a(a,f){if(e>a){var g=d[a];b.onNext([g,c[g]]),f(a+1)}else b.onCompleted()}var b=this.observer,c=this.parent.obj,d=this.parent.keys,e=d.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},Kb.pairs=function(a,b){return b||(b=tb),new hc(a,b)};var ic=function(a){function b(b,c,d){this.start=b,this.rangeCount=c,this.scheduler=d,a.call(this)}return Za(b,a),b.prototype.subscribeCore=function(a){var b=new jc(a,this);return b.run()},b}(Lb),jc=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.rangeCount,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();Kb.range=function(a,b,c){return pb(c)||(c=tb),new ic(a,b,c)};var kc=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return Za(b,a),b.prototype.subscribeCore=function(a){var b=new D(a,this);return b.run()},b}(Lb);D.prototype.run=function(){function a(a,d){return(-1===a||a>0)&&(b.onNext(c),a>0&&a--),0===a?b.onCompleted():void d(a)}var b=this.observer,c=this.parent.value;return this.parent.scheduler.scheduleRecursiveWithState(this.parent.repeatCount,a)},Kb.repeat=function(a,b,c){return pb(c)||(c=tb),new kc(a,b,c)};var lc=function(a){function b(b,c){this.value=b,this.scheduler=c,a.call(this)}function c(a,b,c){this.observer=a,this.value=b,this.scheduler=c}function d(a,b){var c=b[0],d=b[1];return d.onNext(c),d.onCompleted(),gb}return Za(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this.value,this.scheduler);return b.run()},c.prototype.run=function(){var a=[this.value,this.observer];return this.scheduler===sb?d(null,a):this.scheduler.scheduleWithState(a,d)},b}(Lb),mc=(Kb["return"]=Kb.just=function(a,b){return pb(b)||(b=sb),new lc(a,b)},function(a){function b(b,c){this.error=b,this.scheduler=c,a.call(this)}function c(a,b){this.o=a,this.p=b}function d(a,b){var c=b[0],d=b[1];d.onError(c)}return Za(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.p.scheduler.scheduleWithState([this.p.error,this.o],d)},b}(Lb)),nc=Kb["throw"]=function(a,b){return pb(b)||(b=sb),new mc(a,b)};Kb.using=function(a,b){return new Jc(function(c){var d=gb,e=ga(a)();if(e===fa)return new cb(nc(e.e).subscribe(c),d);e&&(d=e);var f=ga(b)(e);return f===fa?new cb(nc(f.e).subscribe(c),d):new cb(f.subscribe(c),d)})},Eb.amb=function(a){var b=this;return new Jc(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new jb,j=new jb;da(a)&&(a=Vb(a));var k=Db(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()}),l=Db(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()});return i.setDisposable(b.subscribe(k)),j.setDisposable(a.subscribe(l)),new cb(i,j)})},Kb.amb=function(){var a,b=gc();if(Array.isArray(arguments[0]))a=arguments[0];else{var c=arguments.length;a=new Array(a);for(var d=0;c>d;d++)a[d]=arguments[d]}for(var d=0,c=a.length;c>d;d++)b=E(b,a[d]);return b};var oc=function(a){function b(b,c,d){this._o=b,this._s=c,this._fn=d,a.call(this)}return Za(b,a),b.prototype.next=function(a){this._o.onNext(a)},b.prototype.completed=function(){return this._o.onCompleted()},b.prototype.error=function(a){var b=ga(this._fn)(a);if(b===fa)return this._o.onError(b.e);da(b)&&(b=Vb(b));var c=new jb;this._s.setDisposable(c),c.setDisposable(b.subscribe(this._o))},b}(Fb);Eb["catch"]=function(a){return ea(a)?F(this,a):pc([this,a])};var pc=Kb["catch"]=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 Tb(a).catchError()};Eb.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),qc.apply(this,b)};var qc=Kb.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ea(b[a-1])?b.pop():H;return Array.isArray(b[0])&&(b=b[0]),new Jc(function(a){function c(b){if(g[b]=!0,h||(h=g.every($))){try{var c=d.apply(null,j)}catch(e){return a.onError(e)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every($)&&a.onCompleted()}function e(b){i[b]=!0,i.every($)&&a.onCompleted()}for(var f=b.length,g=p(f,G),h=!1,i=p(f,G),j=new Array(f),k=new Array(f),l=0;f>l;l++)!function(d){var f=b[d],g=new jb;da(f)&&(f=Vb(f)),g.setDisposable(f.subscribe(function(a){j[d]=a,c(d)},function(b){a.onError(b)},function(){e(d)})),k[d]=g}(l);return new cb(k)},this)};Eb.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),sc.apply(null,a)};var rc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){this.sources=a,this.o=b}return Za(b,a),b.prototype.subscribeCore=function(a){var b=new c(this.sources,a);return b.run()},c.prototype.run=function(){var a,b=new kb,c=this.sources,d=c.length,e=this.o,f=sb.scheduleRecursiveWithState(0,function(f,g){if(!a){if(f===d)return e.onCompleted();var h=c[f];da(h)&&(h=Vb(h));var i=new jb;b.setDisposable(i),i.setDisposable(h.subscribe(function(a){e.onNext(a)},function(a){e.onError(a)},function(){g(f+1)}))}});return new cb(b,f,fb(function(){a=!0}))},b}(Lb),sc=Kb.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 new rc(a)};Eb.concatAll=function(){return this.merge(1)};var tc=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return Za(b,a),b.prototype.subscribeCore=function(a){var b=new cb;return b.add(this.source.subscribe(new uc(a,this.maxConcurrent,b))),b},b}(Lb),uc=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 jb;this.g.add(c),da(a)&&(a=Vb(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}();Eb.merge=function(a){return"number"!=typeof a?vc(this,a):new tc(this,a)};var vc=Kb.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(pb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=sb,b=0;d>b;b++)c.push(arguments[b]);else for(a=sb,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),B(a,c).mergeAll()},wc=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function d(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return Za(b,a),b.prototype.subscribeCore=function(a){var b=new cb,d=new jb;return b.add(d),d.setDisposable(this.source.subscribe(new c(a,b))),b},c.prototype. b=new jb;this.g.add(b),da(a)&&(a=Vb(a)),b.setDisposable(a.subscribe(new d(this,b)))}},c.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},d.prototype. a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a.done&&1===a.g.length&&a.o.onCompleted()}},d.prototype.dispose=function(){this.isStopped=!0},d.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},b}(Lb);Eb.mergeAll=function(){return new wc(this)};var xc=Y.CompositeError=function(a){this.name="NotImplementedError",this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};xc.prototype=Error.prototype,Kb.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=B(null,a);return new Jc(function(a){function b(){0===g.length?a.onCompleted():1===g.length?a.onError(g[0]):a.onError(new xc(g))}var c=new cb,e=new jb,f=!1,g=[];return c.add(e),e.setDisposable(d.subscribe(function(d){var e=new jb;c.add(e),da(d)&&(d=Vb(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})},Eb. new Error("Second observable is required");return yc([this,a])};var yc=Kb. 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 new Jc(function(b){var c=0,d=new kb,e=sb.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],da(f)&&(f=Vb(f)),g=new jb,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new cb(d,e)})};Eb.skipUntil=function(a){var b=this;return new Jc(function(c){var d=!1,e=new cb(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));da(a)&&(a=Vb(a));var f=new jb;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)};var zc=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.inner=b,this.stopped=!1,this.latest=0,this.hasLatest=!1,this.isStopped=!1}function d(a,b){this.parent=a,this.id=b,this.isStopped=!1}return Za(b,a),b.prototype.subscribeCore=function(a){var b=new kb,d=this.source.subscribe(new c(a,b));return new cb(d,b)},c.prototype. b=new jb,c=++this.latest;this.hasLatest=!0,this.inner.setDisposable(b),da(a)&&(a=Vb(a)),b.setDisposable(a.subscribe(new d(this,c)))}},c.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},d.prototype. this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},b}(Lb);Eb["switch"]=Eb.switchLatest=function(){return new zc(this)};var Ac=function(a){function b(b,c){this.source=b,this.other=da(c)?Vb(c):c,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return Za(b,a),b.prototype.subscribeCore=function(a){return new cb(this.source.subscribe(a),this.other.subscribe(new c(a)))},c.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Lb);Eb.takeUntil=function(a){return new Ac(this,a)},Eb.withLatestFrom=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop(),e=this;return Array.isArray(b[0])&&(b=b[0]),new Jc(function(a){for(var c=b.length,f=p(c,G),g=!1,h=new Array(c),i=new Array(c+1),j=0;c>j;j++)!function(c){var d=b[c],e=new jb;da(d)&&(d=Vb(d)),e.setDisposable(d.subscribe(function(a){h[c]=a,f[c]=!0,g=f.every($)},function(b){a.onError(b)},Z)),i[c]=e}(j);var k=new jb;return k.setDisposable(e.subscribe(function(b){var c=[b].concat(h);if(g){var e=ga(d).apply(null,c);return e===fa?a.onError(e.e):void a.onNext(e)}},function(b){a.onError(b)},function(){a.onCompleted()})),i[c]=k,new cb(i)},this)},Eb.zip=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ea(b[a-1])?b.pop():H;Array.isArray(b[0])&&(b=b[0]);var e=this;return b.unshift(e),new Jc(function(a){for(var c=b.length,f=p(c,I),g=p(c,G),h=new Array(c),i=0;c>i;i++)!function(c){var i=b[c],j=new jb;da(i)&&(i=Vb(i)),j.setDisposable(i.subscribe(function(b){if(f[c].push(b),f.every(function(a){return a.length>0})){var h=f.map(function(a){return a.shift()}),i=ga(d).apply(e,h);if(i===fa)return a.onError(i.e);a.onNext(i)}else g.filter(function(a,b){return b!==c}).every($)&&a.onCompleted()},function(b){a.onError(b)},function(){g[c]=!0,g.every($)&&a.onCompleted()})),h[c]=j}(i);return new cb(h)},e)},Kb.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];Array.isArray(b[0])&&(b=ea(b[1])?b[0].concat(b[1]):b[0]);var d=b.shift();return d.zip.apply(d,b)},Eb.zipIterable=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ea(b[a-1])?b.pop():H,e=this;return b.unshift(e),new Jc(function(a){for(var c=b.length,f=p(c,I),g=p(c,G),h=new Array(c),i=0;c>i;i++)!function(c){var i=b[c],j=new jb;(wa(i)||va(i))&&(i=bc(i)),j.setDisposable(i.subscribe(function(b){if(f[c].push(b),f.every(function(a){return a.length>0})){var h=f.map(function(a){return a.shift()}),i=ga(d).apply(e,h);if(i===fa)return a.onError(i.e);a.onNext(i)}else g.filter(function(a,b){return b!==c}).every($)&&a.onCompleted()},function(b){a.onError(b)},function(){g[c]=!0,g.every($)&&a.onCompleted()})),h[c]=j}(i);return new cb(h)},e)},Eb.asObservable=function(){return new Jc(J(this),this)},Eb.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).flatMap(K).filter(L)},Eb.dematerialize=function(){var a=this;return new Jc(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)};var Bc=function(a){function b(b,c,d){this.source=b,this.keyFn=c,this.comparer=d,a.call(this)}return Za(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Cc(a,this.keyFn,this.comparer))},b}(Lb),Cc=function(a){function b(b,c,d){this.o=b,this.keyFn=c,this.comparer=d,this.hasCurrentKey=!1,this.currentKey=null,a.call(this)}return Za(b,a),b.prototype.next=function(a){var b,c=a;return ea(this.keyFn)&&(c=ga(this.keyFn)(a),c===fa)?this.o.onError(c.e):this.hasCurrentKey&&(b=ga(this.comparer)(this.currentKey,c),b===fa)?this.o.onError(b.e):void(this.hasCurrentKey&&b||(this.hasCurrentKey=!0,this.currentKey=c,this.o.onNext(a)))},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.o.onCompleted()},b}(Fb);Eb.distinctUntilChanged=function(a,b){return b||(b=aa),new Bc(this,a,b)};var Dc=function(a){function b(b,c,d,e){this.source=b,this._oN=c,this._oE=d,this._oC=e,a.call(this)}function c(a,b){this.o=a,this.t=!b._oN||ea(b._oN)?Db(b._oN||Z,b._oE||Z,b._oC||Z):b._oN,this.isStopped=!1}return Za(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},c.prototype. b=ga(this.t.onNext).call(this.t,a);b===fa&&this.o.onError(b.e),this.o.onNext(a)}},c.prototype. b=ga(this.t.onError).call(this.t,a);if(b===fa)return this.o.onError(b.e);this.o.onError(a)}},c.prototype. a=ga(this.t.onCompleted).call(this.t);if(a===fa)return this.o.onError(a.e);this.o.onCompleted()}},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Lb);Eb["do"]=Eb.tap=Eb.doAction=function(a,b,c){return new Dc(this,a,b,c)},Eb.doOnNext=Eb.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Eb.doOnError=Eb.tapOnError=function(a,b){return this.tap(Z,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Eb.doOnCompleted=Eb.tapOnCompleted=function(a,b){return this.tap(Z,null,"undefined"!=typeof b?function(){a.call(b)}:a)},Eb["finally"]=function(a){var b=this;return new Jc(function(c){var e=ga(b.subscribe).call(b,c);return e===fa?(a(),d(e.e)):fb(function(){var b=ga(e.dispose).call(e);a(),b===fa&&d(b.e)})},this)};var Ec=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return Za(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype. this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},b}(Lb);Eb.ignoreElements=function(){return new Ec(this)},Eb.materialize=function(){var a=this;return new Jc(function(b){return a.subscribe(function(a){b.onNext(zb(a))},function(a){b.onNext(Ab(a)),b.onCompleted()},function(){b.onNext(Bb()),b.onCompleted()})},a)},Eb.repeat=function(a){retur
6260
n Rb(this,a).concat()},Eb.retry=function(a){return Rb(this,a).catchError()},Eb.retryWhen=function(a){return Rb(this).catchErrorWhen(a)};var Fc=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return Za(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new M(a,this))},b}(Lb);M.prototype={onNext:function(a){return this.isStopped?void 0:(!this.hasValue&&(this.hasValue=!0),this.hasAccumulation?this.accumulation=ga(this.accumulator)(this.accumulation,a):(this.accumulation=this.hasSeed?ga(this.accumulator)(this.seed,a):a,this.hasAccumulation=!0),this.accumulation===fa?this.o.onError(this.accumulation.e):void this.o.onNext(this.accumulation))},onError:function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},onCompleted:function(){this.isStopped||(this.isStopped=!0,!this.hasValue&&this.hasSeed&&this.o.onNext(this.seed),this.o.onCompleted())},dispose:function(){this.isStopped=!0},fail:function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)}},Eb.scan=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new Fc(this,c,b,a)},Eb.skipLast=function(a){if(0>a)throw new oa;var b=this;return new Jc(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)},Eb.startWith=function(){var a,b=0;arguments.length&&pb(arguments[0])?(a=arguments[0],b=1):a=sb;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return Tb([dc(c,a),this]).concat()},Eb.takeLast=function(a){if(0>a)throw new oa;var b=this;return new Jc(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)},Eb.takeLastBuffer=function(a){var b=this;return new Jc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},Eb.windowWithCount=function(a,b){var c=this;if(+a||(a=0),Math.abs(a)===1/0&&(a=0),0>=a)throw new oa;if(null==b&&(b=a),+b||(b=0),Math.abs(b)===1/0&&(b=0),0>=b)throw new oa;return new Jc(function(d){function e(){var a=new Mc;i.push(a),d.onNext(_a(a,g))}var f=new jb,g=new lb(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},Eb.flatMapConcat=Eb.concatMap=function(a,b,c){return new Mb(this,a,b,c).merge(1)},Eb.concatMapObserver=Eb.selectConcatObserver=function(a,b,c,d){var e=this,f=ya(a,d,2),g=ya(b,d,1),h=ya(c,d,0);return new Jc(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}da(d)&&(d=Vb(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}da(c)&&(c=Vb(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}da(b)&&(b=Vb(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},Eb.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Jc(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},O.prototype.push=function(a){var b=-1===N(this.set,a,this.comparer);return b&&this.set.push(a),b},Eb.distinct=function(a,b){var c=this;return b||(b=aa),new Jc(function(d){var e=new O(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},function(a){d.onError(a)},function(){d.onCompleted()})},this)};var Gc=function(a){function b(b,c,d){this.source=b,this.selector=ya(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return a.call(this,b.selector(c,d,e),d,e)}}function d(a,b,c){this.o=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}return Za(b,a),b.prototype.internalMap=function(a,d){return new b(this.source,c(a,this),d)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new d(a,this.selector,this))},d.prototype. b=ga(this.selector)(a,this.i++,this.source);return b===fa?this.o.onError(b.e):void this.o.onNext(b)}},d.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Lb);Eb.map=Eb.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Gc?this.internalMap(c,b):new Gc(this,c,b)},Eb.pluck=function(){var a=arguments.length,b=new Array(a);if(0===a)throw new Error("List of properties cannot be empty.");for(var c=0;a>c;c++)b[c]=arguments[c];return this.map(P(b,a))},Eb.flatMap=Eb.selectMany=function(a,b,c){return new Mb(this,a,b,c).mergeAll()},Eb.flatMapObserver=Eb.selectManyObserver=function(a,b,c,d){var e=this;return new Jc(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}da(c)&&(c=Vb(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}da(c)&&(c=Vb(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}da(a)&&(a=Vb(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},Y.Observable.prototype.flatMapLatest=function(a,b,c){return new Mb(this,a,b,c).switchLatest()};var Hc=function(a){function b(b,c){this.source=b,this.skipCount=c,a.call(this)}function c(a,b){this.c=b,this.r=b,this.o=a,this.isStopped=!1}return Za(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.skipCount))},c.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Lb);Eb.skip=function(a){if(0>a)throw new oa;return new Hc(this,a)},Eb.skipWhile=function(a,b){var c=this,d=ya(a,b,3);return new Jc(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)},Eb.take=function(a,b){if(0>a)throw new oa;if(0===a)return Zb(b);var c=this;return new Jc(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)},Eb.takeWhile=function(a,b){var c=this,d=ya(a,b,3);return new Jc(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 Ic=function(a){function b(b,c,d){this.source=b,this.predicate=ya(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return b.predicate(c,d,e)&&a.call(this,c,d,e)}}function d(a,b,c){this.o=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}return Za(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new d(a,this.predicate,this))},b.prototype.internalFilter=function(a,d){return new b(this.source,c(a,this),d)},d.prototype. b=ga(this.predicate)(a,this.i++,this.source);return b===fa?this.o.onError(b.e):void(b&&this.o.onNext(a))}},d.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Lb);Eb.filter=Eb.where=function(a,b){return this instanceof Ic?this.internalFilter(a,b):new Ic(this,a,b)},Eb.transduce=function(a){function b(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){
return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var c=this;return new Jc(function(d){var e=a(b(d));return c.subscribe(function(a){var b=ga(e["@@transducer/step"]).call(e,d,a);b===fa&&d.onError(b.e)},function(a){d.onError(a)},function(){e["@@transducer/result"](d)})},c)};var Jc=Y.AnonymousObservable=function(a){function b(a){return a&&ea(a.dispose)?a:ea(a)?fb(a):gb}function c(a,c){var e=c[0],f=c[1],g=ga(f.__subscribe).call(f,e);return g!==fa||e.fail(fa.e)?void e.setDisposable(b(g)):d(fa.e)}function e(a){var b=new Kc(a),d=[b,this];return tb.scheduleRequired()?tb.scheduleWithState(d,c):c(null,d),b}function f(b,c){this.source=c,this.__subscribe=b,a.call(this,e)}return Za(f,a),f}(Kb),Kc=function(a){function b(b){a.call(this),this.observer=b,this.m=new jb}Za(b,a);var c=b.prototype;return c.next=function(a){var b=ga(this.observer.onNext).call(this.observer,a);b===fa&&(this.dispose(),d(b.e))},c.error=function(a){var b=ga(this.observer.onError).call(this.observer,a);this.dispose(),b===fa&&d(b.e)},c.completed=function(){var a=ga(this.observer.onCompleted).call(this.observer);this.dispose(),a===fa&&d(a.e)},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}(Fb),Lc=function(a,b){this.subject=a,this.observer=b};Lc.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 Mc=Y.Subject=function(a){function c(a){return ib(this),this.isStopped?this.hasError?(a.onError(this.error),gb):(a.onCompleted(),gb):(this.observers.push(a),new Lc(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Za(d,a),$a(d.prototype,Cb.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(ib(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(ib(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(ib(this),!this.isStopped)for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Nc(a,b)},d}(Kb),Nc=(Y.AsyncSubject=function(a){function c(a){return ib(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),gb):(this.observers.push(a),new Lc(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Za(d,a),$a(d.prototype,Cb,{hasObservers:function(){return ib(this),this.observers.length>0},onCompleted:function(){var a,c;if(ib(this),!this.isStopped){this.isStopped=!0;var d=b(this.observers),c=d.length;if(this.hasValue)for(a=0;c>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;c>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(ib(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){ib(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Kb),Y.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 Za(c,a),$a(c.prototype,Cb.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Kb));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(X.Rx=Y,define(function(){return Y})):R&&U?V?(U.exports=Y).Rx=Y:R.Rx=Y:X.Rx=Y;var Oc=i()}).call(this);
//# sourceMappingURL=rx.compat.map