(function(g,y){"object"===typeofexports&&"undefined"!==typeofmodule?y(exports):"function"===typeofdefine&&define.amd?define("rxjs",["exports"],y):y(g.rxjs={})})(this,function(g){functiony(b,a){functionc(){this.constructor=b}if("function"!==typeofa&&null!==a)thrownewTypeError("Class extends value "+String(a)+" is not a constructor or null");Ta(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,newc)}functionZd(b,a){varc={},d;for(dinb)Object.prototype.hasOwnProperty.call(b,
e(a.value).then(f,k)}w((d=d.apply(b,a||[])).next())})}functionUa(b,a){functionc(a){returnfunction(b){returnd([a,b])}}functiond(c){if(f)thrownewTypeError("Generator is already executing.");for(;e;)try{if(f=1,h&&(l=c[0]&2?h["return"]:c[0]?h["throw"]||((l=h["return"])&&l.call(h),0):h.next)&&!(l=l.call(h,c[1])).done)returnl;if(h=0,l)c=[c[0]&2,l.value];switch(c[0]){case0:case1:l=c;break;case4:returne.label++,{value:c[1],done:!1};case5:e.label++;h=c[1];c=[0];continue;case7:c=e.ops.pop();e.trys.pop();
{next:c(0),"throw":c(1),"return":c(2)},"function"===typeofSymbol&&(k[Symbol.iterator]=function(){returnthis}),k}functionF(b){vara="function"===typeofSymbol&&Symbol.iterator,c=a&&b[a],d=0;if(c)returnc.call(b);if(b&&"number"===typeofb.length)return{next:function(){b&&d>=b.length&&(b=void0);return{value:b&&b[d++],done:!b}}};thrownewTypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.");}functionx(b,a){varc="function"===typeofSymbol&&b[Symbol.iterator];if(!c)returnb;b=
function(c){returnnewPromise(function(b,d){1<g.push([a,c,b,d])||e(a,c)})})}functione(a,c){try{varb=k[a](c);b.valueinstanceofea?Promise.resolve(b.value.v).then(f,h):l(g[0][2],b)}catch(u){l(g[0][3],u)}}functionf(a){e("next",a)}functionh(a){e("throw",a)}functionl(a,c){(a(c),g.shift(),g.length)&&e(g[0][0],g[0][1])}if(!Symbol.asyncIterator)thrownewTypeError("Symbol.asyncIterator is not defined.");vark=c.apply(b,a||[]),w,g=[];returnw={},d("next"),d("throw"),d("return"),w[Symbol.asyncIterator]=
function(){returnthis},w}functionbe(b){functiona(a){e[a]=b[a]&&function(d){returnnewPromise(function(e,f){d=b[a](d);c(e,f,d.done,d.value)})}}functionc(a,c,b,d){Promise.resolve(d).then(function(c){a({value:c,done:b})},c)}if(!Symbol.asyncIterator)thrownewTypeError("Symbol.asyncIterator is not defined.");vard=b[Symbol.asyncIterator],e;returnd?d.call(b):(b="function"===typeofF?F(b):b[Symbol.iterator](),e={},a("next"),a("throw"),a("return"),e[Symbol.asyncIterator]=function(){returnthis},e)}
functionFa(b){returnb&&q(b.schedule)}functionoa(b){returnq(b[b.length-1])?b.pop():void0}functionO(b){returnFa(b[b.length-1])?b.pop():void0}functionOb(b){returnSymbol.asyncIterator&&q(null===b||void0===b?void0:b[Symbol.asyncIterator])}functionPb(b){returnnewTypeError("You provided "+(null!==b&&"object"===typeofb?"an invalid object":"'"+b+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}functionQb(b){returnq(null===
p)returnb;if(null!=b){if(q(b[pa]))returnee(b);if($a(b))returnfe(b);if(q(null===b||void0===b?void0:b.then))returnge(b);if(Ob(b))returnSb(b);if(Qb(b))returnhe(b);if(q(null===b||void0===b?void0:b.getReader))returnSb(Rb(b))}throwPb(b);}functionee(b){returnnewp(function(a){varc=b[pa]();if(q(c.subscribe))returnc.subscribe(a);thrownewTypeError("Provided object does not correctly implement Symbol.observable");})}functionfe(b){returnnewp(function(a){for(varc=0;c<b.length&&!a.closed;c++)a.next(b[c]);
d.return()}})}functionUb(b,a){if(!b)throwError("Iterable cannot be null");returnnewp(function(c){G(c,a,function(){vard=b[Symbol.asyncIterator]();G(c,a,function(){d.next().then(function(a){a.done?c.complete():c.next(a.value)})},0,!0)})})}functionVb(b,a){if(null!=b){if(q(b[pa]))returnt(b).pipe(ra(a),qa(a));if($a(b))returnje(b,a);if(q(null===b||void0===b?void0:b.then))returnt(b).pipe(ra(a),qa(a));if(Ob(b))returnUb(b,a);if(Qb(b))returnTb(b,a);if(q(null===b||void0===b?void0:b.getReader))returnUb(Rb(b),
function(a,c){return0>b(a,c)?a:c}:function(a,c){returna<c?a:c})}functionQa(b,a){varc=q(b)?b:function(){returnb};returnq(a)?Ma(a,{connector:c}):function(a){returnnewRa(a,c)}}functionUc(){returnn(function(b,a){varc,d=!1;b.subscribe(m(a,function(b){vare=c;c=b;d&&a.next([e,b]);d=!0}))})}functionVc(){for(varb=[],a=0;a<arguments.length;a++)b[a]=arguments[a];varc=b.length;if(0===c)throwError("list of properties cannot be empty.");returnP(function(a){vard=a;for(a=0;a<c;a++)if(d=null===d||
functionJe(b,a,c){returnda({method:"PUT",url:b,body:a,headers:c})}functionKe(b,a,c){returnda({method:"PATCH",url:b,body:a,headers:c})}functionLe(b,a){returnMe(da({method:"GET",url:b,headers:a}))}functionNe(b){returnnewp(function(a){varc,d,e=U({async:!0,crossDomain:!1,withCredentials:!1,method:"GET",timeout:0,responseType:"json"},b),f=e.queryParams,h=e.body,g=e.headers,k=e.url;if(!k)thrownewTypeError("url is required");if(f){varm;if(k.includes("?")){k=k.split("?");if(2<k.length)thrownewTypeError("invalid url");
if("undefined"!==typeofArrayBuffer&&ArrayBuffer.isView(b))returnb.buffer;if("object"===typeofb)returna["content-type"]=null!==(c=a["content-type"])&&void0!==c?c:"application/json;charset\x3dutf-8",JSON.stringify(b);thrownewTypeError("Unknown body type");}functionAb(b,a){returnQe.call(b)==="[object "+a+"]"}varTa=function(b,a){Ta=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(a,b){a.__proto__=b}||function(a,b){for(varcinb)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=
b[c])};returnTa(b,a)},U=function(){U=Object.assign||function(b){for(vara,c=1,d=arguments.length;c<d;c++){a=arguments[c];for(vareina)Object.prototype.hasOwnProperty.call(a,e)&&(b[e]=a[e])}returnb};returnU.apply(this,arguments)},Sa=R(function(b){returnfunction(a){b(this);this.message=a?a.length+" errors occurred during unsubscription:\n"+a.map(function(a,b){returnb+1+") "+a.toString()}).join("\n "):"";this.name="UnsubscriptionError";this.errors=a}}),C=function(){functionb(a){this.initialTeardown=
"N"===a?ab(b):"E"===a?Wb(function(){returnd}):"C"===a?L:0;if(!b)thrownewTypeError("Unexpected notification kind "+a);returnb};b.createNext=function(a){returnnewb("N",a)};b.createError=function(a){returnnewb("E",void0,a)};b.createComplete=function(){returnb.completeNotification};b.completeNotification=newb("C");returnb}(),ca=R(function(b){returnfunction(){b(this);this.name="EmptyError";this.message="no elements in sequence"}}),pb=R(function(b){returnfunction(){b(this);this.name="ArgumentOutOfRangeError";
this.message="argument out of range"}}),kd=R(function(b){returnfunction(a){b(this);this.name="NotFoundError";this.message=a}}),jd=R(function(b){returnfunction(a){b(this);this.name="SequenceError";this.message=a}}),Xb=R(function(b){returnfunction(a){void0===a&&(a=null);b(this);this.message="Timeout has occurred";this.name="TimeoutError";this.info=a}}),le=Array.isArray,me=Array.isArray,ne=Object.getPrototypeOf,oe=Object.prototype,pe=Object.keys,$e={connector:function(){returnnewB},resetOnDisconnect:!0},
c.runMode=!1;returnc}y(a,b);a.prototype.createTime=function(b){b=this.runMode?b.trim().indexOf("|"):b.indexOf("|");if(-1===b)throwError('marble diagram for time should have a completion marker "|"');returnb*a.frameTimeFactor};a.prototype.createColdObservable=function(b,d,e){if(-1!==b.indexOf("^"))throwError('cold observable cannot have subscription offset "^"');if(-1!==b.indexOf("!"))throwError('cold observable cannot have unsubscription marker "!"');b=a.parseMarbles(b,d,e,void0,this.runMode);
b=newGb(b,this);this.coldObservables.push(b);returnb};a.prototype.createHotObservable=function(b,d,e){if(-1!==b.indexOf("!"))throwError('hot observable cannot have unsubscription marker "!"');b=a.parseMarbles(b,d,e,void0,this.runMode);b=newXd(b,this);this.hotObservables.push(b);returnb};a.prototype.materializeInnerObservable=function(a,b){varc=this,d=[];a.subscribe({next:function(a){d.push({frame:c.frame-b,notification:J("N",a,void0)})},error:function(a){d.push({frame:c.frame-b,notification:J("E",
break;case"(":g=m;f(1);break;case")":g=-1;f(1);break;case"^":if(Infinity!==l)throwError("found a second subscription point '^' in a subscription marble diagram. There can only be one.");l=-1<g?g:m;f(1);break;case"!":if(Infinity!==k)throwError("found a second unsubscription point '!' in a subscription marble diagram. There can only be one.");k=-1<g?g:m;break;default:if(b&&h.match(/^[0-9]$/)&&(0===a||" "===d[a-1])){varn=d.slice(a).join("").match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /);if(n){a+=n[0].length-
1;varh=parseFloat(n[1]),r=void0;switch(n[2]){case"ms":r=h;break;case"s":r=1E3*h;break;case"m":r=6E4*h}f(r/p.frameTimeFactor);break}}throwError("there can only be '^' and '!' markers in a subscription marble diagram. Found instead '"+h+"'.");}m=e;q=a},p=this,q,t=0;t<a;t++)n(t),t=q;return0>k?newBa(l):newBa(l,k)};a.parseMarbles=function(a,b,e,f,g){varc=this;void0===f&&(f=!1);void0===g&&(g=!1);if(-1!==a.indexOf("!"))throwError('conventional marble diagrams cannot have the unsubscription marker "!"');
default:if(g&&k.match(/^[0-9]$/)&&(0===a||" "===d[a-1])){varl=d.slice(a).join("").match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /);if(l){a+=l[0].length-1;vark=parseFloat(l[1]),r=void0;switch(l[2]){case"ms":r=k;break;case"s":r=1E3*k;break;case"m":r=6E4*k}f(r/u.frameTimeFactor);break}}h=J("N",q(k),void0);f(1)}h&&m.push({frame:-1<p?p:n,notification:h});n=b;t=a};for(varu=this,t,y=0;y<h;y++)a(y),y=t;returnm};a.prototype.createAnimator=function(){varb=this;if(!this.runMode)throwError("animate() must only be used in run mode");
vard=0,e;return{animate:function(c){vard,f;if(e)throwError("animate() must not be called more than once within run()");if(/[|#]/.test(c))throwError("animate() must not complete or error");e=newMap;c=a.parseMarbles(c,void0,void0,void0,!0);try{for(varg=F(c),m=g.next();!m.done;m=g.next())b.schedule(function(){vara,c,d=b.now(),f=Array.from(e.values());e.clear();try{for(varg=(a=void0,F(f)),h=g.next();!h.done;h=g.next()){vark=h.value;k(d)}}catch(Y){a={error:Y}}finally{try{h&&!h.done&&(c=g.return)&&
c.call(g)}finally{if(a)throwa.error;}}},m.value.frame)}catch(r){d={error:r}}finally{try{m&&!m.done&&(f=g.return)&&f.call(g)}finally{if(d)throwd.error;}}},delegate:{requestAnimationFrame:function(a){if(!e)throwError("animate() was not called within run()");varb=++d;e.set(b,a);returnb},cancelAnimationFrame:function(a){if(!e)throwError("animate() was not called within run()");e.delete(a)}}}};a.prototype.createDelegates=function(){vara=this,b=0,e=newMap,f=function(){varb=a.now(),c=Array.from(e.values()).filter(function(a){returna.due<=
b}),d=c.filter(function(a){return"immediate"===a.type});if(0<d.length)d=d[0],c=d.handle,d=d.handler,e.delete(c),d();elseif(d=c.filter(function(a){return"interval"===a.type}),0<d.length){varc=d[0],g=c.duration,d=c.handler;c.due=b+g;c.subscription=a.schedule(f,g);d()}elseif(c=c.filter(function(a){return"timeout"===a.type}),0<c.length)d=c[0],c=d.handle,d=d.handler,e.delete(c),d();elsethrowError("Expected a due immediate or interval");};return{immediate:{setImmediate:function(c){vard=++b;e.set(d,
newB;if("string"===typeofa)d.url=a;elsefor(varfina)a.hasOwnProperty(f)&&(d[f]=a[f]);if(!d.WebSocketCtor&&WebSocket)d.WebSocketCtor=WebSocket;elseif(!d.WebSocketCtor)throwError("no WebSocket constructor can be found");c.destination=newia}returnc}y(a,b);a.prototype.lift=function(b){varc=newa(this._config,this.destination);c.operator=b;c.source=this;returnc};a.prototype._resetState=function(){this._socket=null;this.source||(this.destination=newia);this._output=newB};a.prototype.multiplex=
b&&(this._socket.binaryType=b)}catch(r){l.error(r);return}varm=newC(function(){a._socket=null;k&&1===k.readyState&&k.close()});k.onopen=function(b){if(a._socket){varc=a._config.openObserver;c&&c.next(b);b=a.destination;a.destination=na.create(function(b){if(1===k.readyState)try{varc=a._config.serializer;k.send(c(b))}catch(u){a.destination.error(u)}},function(b){varc=a._config.closingObserver;c&&c.next(void0);b&&b.code?k.close(b.code,b.reason):l.error(newTypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }"));