poplar-annotation
Version:
web-based annotation tool for natural language processing (NLP) needs, inspired by brat rapid annotation tool.
16 lines (14 loc) • 242 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Poplar=e():t.Poplar=e()}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=78)}([function(t,e,n){"use strict";n.d(e,"a",function(){return r});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},function(t,e,n){"use strict";n.d(e,"a",function(){return h});var i=n(0),r=n(26),o=n(47),s=n(5),u=n(33),a=n(16),c=n(32),h=function(t){function e(e,n,i){var r=t.call(this)||this;switch(r.syncErrorValue=null,r.syncErrorThrown=!1,r.syncErrorThrowable=!1,r.isStopped=!1,arguments.length){case 0:r.destination=o.a;break;case 1:if(!e){r.destination=o.a;break}if("object"==typeof e){if(f(e)){var s=e[u.a]();r.syncErrorThrowable=s.syncErrorThrowable,r.destination=s,s.add(r)}else r.syncErrorThrowable=!0,r.destination=new l(r,e);break}default:r.syncErrorThrowable=!0,r.destination=new l(r,e,n,i)}return r}return i.a(e,t),e.prototype[u.a]=function(){return this},e.create=function(t,n,i){var r=new e(t,n,i);return r.syncErrorThrowable=!1,r},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(s.a),l=function(t){function e(e,n,i,s){var u,a=t.call(this)||this;a._parentSubscriber=e;var c=a;return Object(r.a)(n)?u=n:n&&(u=n.next,i=n.error,s=n.complete,n!==o.a&&(c=Object.create(n),Object(r.a)(c.unsubscribe)&&a.add(c.unsubscribe.bind(c)),c.unsubscribe=a.unsubscribe.bind(a))),a._context=c,a._next=u,a._error=i,a._complete=s,a}return i.a(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;a.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=a.a.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(c.a)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Object(c.a)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};a.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),a.a.useDeprecatedSynchronousErrorHandling)throw t;Object(c.a)(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!a.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return a.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(Object(c.a)(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(h);function f(t){return t instanceof h||"syncErrorThrowable"in t&&t[u.a]}},function(t,e,n){"use strict";var i=n(1),r=n(33),o=n(47);var s=n(21),u=n(35),a=n(16);n.d(e,"a",function(){return c});var c=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var s=this.operator,u=function(t,e,n){if(t){if(t instanceof i.a)return t;if(t[r.a])return t[r.a]()}return t||e||n?new i.a(t,e,n):new i.a(o.a)}(t,e,n);if(s?s.call(u,this.source):u.add(this.source||a.a.useDeprecatedSynchronousErrorHandling&&!u.syncErrorThrowable?this._subscribe(u):this._trySubscribe(u)),a.a.useDeprecatedSynchronousErrorHandling&&u.syncErrorThrowable&&(u.syncErrorThrowable=!1,u.syncErrorThrown))throw u.syncErrorValue;return u},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){a.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=h(e))(function(e,i){var r;r=n.subscribe(function(e){try{t(e)}catch(t){i(t),r&&r.unsubscribe()}},i,e)})},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[s.a]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:Object(u.b)(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=h(t))(function(t,n){var i;e.subscribe(function(t){return i=t},function(t){return n(t)},function(){return t(i)})})},t.create=function(e){return new t(e)},t}();function h(t){if(t||(t=a.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},function(t,e,n){"use strict";var i=n(0),r=function(t){function e(e,n,i){var r=t.call(this)||this;return r.parent=e,r.outerValue=n,r.outerIndex=i,r.index=0,r}return i.a(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(1).a),o=n(65);function s(t,e,n,i){var s=new r(t,n,i);return Object(o.a)(e)(s)}n.d(e,"a",function(){return s})},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(0),r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.a(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(1).a)},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var i=n(10),r=n(62),o=n(26),s=n(13),u=n(6),a=n(36),c=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,c=this._parents,l=this._unsubscribe,f=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var p=-1,d=c?c.length:0;n;)n.remove(this),n=++p<d&&c[p]||null;if(Object(o.a)(l))Object(s.a)(l).call(this)===u.a&&(e=!0,t=t||(u.a.e instanceof a.a?h(u.a.e.errors):[u.a.e]));if(Object(i.a)(f))for(p=-1,d=f.length;++p<d;){var y=f[p];if(Object(r.a)(y))if(Object(s.a)(y.unsubscribe).call(y)===u.a){e=!0,t=t||[];var v=u.a.e;v instanceof a.a?t=t.concat(h(v.errors)):t.push(v)}}if(e)throw new a.a(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var i=n;(n=new t)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;e&&e!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();function h(t){return t.reduce(function(t,e){return t.concat(e instanceof a.a?e.errors:e)},[])}},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var i={e:{}}},function(t,e,n){"use strict";n.d(e,"b",function(){return h}),n.d(e,"a",function(){return l});var i=n(0),r=n(2),o=n(1),s=n(5),u=n(22),a=n(63),c=n(33),h=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return i.a(e,t),e}(o.a),l=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return i.a(e,t),e.prototype[c.a]=function(){return new h(this)},e.prototype.lift=function(t){var e=new f(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new u.a;if(!this.isStopped)for(var e=this.observers,n=e.length,i=e.slice(),r=0;r<n;r++)i[r].next(t)},e.prototype.error=function(t){if(this.closed)throw new u.a;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,i=e.slice(),r=0;r<n;r++)i[r].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new u.a;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),i=0;i<e;i++)n[i].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new u.a;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new u.a;return this.hasError?(t.error(this.thrownError),s.a.EMPTY):this.isStopped?(t.complete(),s.a.EMPTY):(this.observers.push(t),new a.a(this,t))},e.prototype.asObservable=function(){var t=new r.a;return t.source=this,t},e.create=function(t,e){return new f(t,e)},e}(r.a),f=function(t){function e(e,n){var i=t.call(this)||this;return i.destination=e,i.source=n,i}return i.a(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):s.a.EMPTY},e}(l)},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return o});var i=n(2),r=new i.a(function(t){return t.complete()});function o(t){return t?function(t){return new i.a(function(e){return t.schedule(function(){return e.complete()})})}(t):r}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(30),r=new(n(28).a)(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var i=Array.isArray||function(t){return t&&"number"==typeof t.length}},function(t,e,n){"use strict";function i(t){return t&&"function"==typeof t.schedule}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var i=n(0),r=n(1);function o(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.project,this.thisArg))},t}(),u=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.project=n,r.count=0,r.thisArg=i||r,r}return i.a(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var i,r=n(6);function o(){try{return i.apply(this,arguments)}catch(t){return r.a.e=t,r.a}}function s(t){return i=t,o}},function(t,e,n){"use strict";var i=n(2),r=n(68),o=n(67),s=n(21);var u=n(20);var a=n(15),c=n(5),h=n(69);var l=n(70);var f=n(66);var p=n(65);function d(t,e){if(!e)return t instanceof i.a?t:new i.a(Object(p.a)(t));if(null!=t){if(function(t){return t&&"function"==typeof t[s.a]}(t))return function(t,e){return e?new i.a(function(n){var i=new c.a;return i.add(e.schedule(function(){var r=t[s.a]();i.add(r.subscribe({next:function(t){i.add(e.schedule(function(){return n.next(t)}))},error:function(t){i.add(e.schedule(function(){return n.error(t)}))},complete:function(){i.add(e.schedule(function(){return n.complete()}))}}))})),i}):new i.a(Object(f.a)(t))}(t,e);if(Object(r.a)(t))return function(t,e){return e?new i.a(function(n){var i=new c.a;return i.add(e.schedule(function(){return t.then(function(t){i.add(e.schedule(function(){n.next(t),i.add(e.schedule(function(){return n.complete()}))}))},function(t){i.add(e.schedule(function(){return n.error(t)}))})})),i}):new i.a(Object(h.a)(t))}(t,e);if(Object(o.a)(t))return Object(a.a)(t,e);if(function(t){return t&&"function"==typeof t[u.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return e?new i.a(function(n){var i,r=new c.a;return r.add(function(){i&&"function"==typeof i.return&&i.return()}),r.add(e.schedule(function(){i=t[u.a](),r.add(e.schedule(function(){if(!n.closed){var t,e;try{var r=i.next();t=r.value,e=r.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}}))})),r}):new i.a(Object(l.a)(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}n.d(e,"a",function(){return d})},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var i=n(2),r=n(5),o=n(64);function s(t,e){return e?new i.a(function(n){var i=new r.a,o=0;return i.add(e.schedule(function(){o!==t.length?(n.next(t[o++]),n.closed||i.add(this.schedule())):n.complete()})),i}):new i.a(Object(o.a)(t))}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=!1,r={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;i=t},get useDeprecatedSynchronousErrorHandling(){return i}}},function(t,e,n){"use strict";function i(){}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";function i(t){return t}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var i=n(8),r=n(39),o=n(40),s=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return Object(r.a)(this.value);case"E":return Object(o.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var i=function(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}()},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var i="function"==typeof Symbol&&Symbol.observable||"@@observable"},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(0),r=function(t){function e(){var n=t.call(this,"object unsubscribed")||this;return n.name="ObjectUnsubscribedError",Object.setPrototypeOf(n,e.prototype),n}return i.a(e,t),e}(Error)},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var i=n(11),r=n(39),o=n(14),s=n(57);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length||2===t.length&&Object(i.a)(t[1])?Object(o.a)(t[0]):Object(s.a)()(r.a.apply(void 0,t))}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var i=n(0),r=n(3),o=n(4),s=n(12),u=n(14);function a(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(i){return i.pipe(a(function(n,i){return Object(u.a)(t(n,i)).pipe(Object(s.a)(function(t,r){return e(n,t,i,r)}))},n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new c(t,n))})}var c=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.project,this.concurrent))},t}(),h=function(t){function e(e,n,i){void 0===i&&(i=Number.POSITIVE_INFINITY);var r=t.call(this,e)||this;return r.project=n,r.concurrent=i,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return i.a(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){this.add(Object(r.a)(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(0),r=function(t){function e(){var n=t.call(this,"argument out of range")||this;return n.name="ArgumentOutOfRangeError",Object.setPrototypeOf(n,e.prototype),n}return i.a(e,t),e}(Error)},function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(0),r=function(t){function e(){var n=t.call(this,"no elements in sequence")||this;return n.name="EmptyError",Object.setPrototypeOf(n,e.prototype),n}return i.a(e,t),e}(Error)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var i=n(0),r=n(49),o=function(t){function e(n,i){void 0===i&&(i=r.a.now);var o=t.call(this,n,function(){return e.delegate&&e.delegate!==o?e.delegate.now():i()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return i.a(e,t),e.prototype.schedule=function(n,i,r){return void 0===i&&(i=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,i,r):t.prototype.schedule.call(this,n,i,r)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var i=n(0),r=n(7),o=n(5),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return i.a(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),o.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),o.a.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(r.a)},function(t,e,n){"use strict";var i=n(0),r=function(t){function e(e,n){return t.call(this)||this}return i.a(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(5).a);n.d(e,"a",function(){return o});var o=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.pending=!1,i}return i.a(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,i=void 0;try{this.work(t)}catch(t){n=!0,i=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),i},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(r)},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(10);function r(t){return!Object(i.a)(t)&&t-parseFloat(t)+1>=0}},function(t,e,n){"use strict";function i(t){setTimeout(function(){throw t})}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("rxSubscriber"):"@@rxSubscriber"},function(t,e,n){"use strict";var i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}},r=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s};Object.defineProperty(e,"__esModule",{value:!0});var o=n(50),s=n(48),u=n(52);!function(t){var e=function(){function t(t){this.root=t,this.entities=new Map,this.eventEmitter=new o.EventEmitter,this.created$=s.fromEvent(this.eventEmitter,"created"),this.updated$=s.fromEvent(this.eventEmitter,"updated"),this.deleted$=s.fromEvent(this.eventEmitter,"deleted"),this.nextId=0}return Object.defineProperty(t.prototype,"json",{get:function(){var t,e,n=[];try{for(var o=i(this),s=o.next();!s.done;s=o.next()){var u=r(s.value,2),a=(u[0],u[1]);"json"in a?n.push(a.json):n.push(JSON.parse(JSON.stringify(a)))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.nextId},enumerable:!0,configurable:!0}),t.prototype.get=function(t){return u.assert(this.has(t),"There's no Entity which id="+t+" in repo!"),this.entities.get(t)},t.prototype.has=function(t){return this.entities.has(t)},t.prototype.set=function(t,e){var n=this.has(t);return this.entities.set(t,e),n?this.eventEmitter.emit("updated",t):(this.nextId<t+1&&(this.nextId=t+1),this.eventEmitter.emit("created",t)),this},t.prototype.add=function(t){if("id"in t){var e=t.id;return u.assert(!this.has(e),"reAdd "+e+"!"),null===e?(t.id=this.nextId,this.add(t)):(this.set(e,t),e)}var n=this.nextId;return this.set(n,t),n},t.prototype[Symbol.iterator]=function(){return this.entities[Symbol.iterator]()},t.prototype.delete=function(t){if("number"==typeof t&&this.has(t)){var e=this.entities.get(t);return this.entities.delete(t),this.eventEmitter.emit("deleted",e),!0}return"number"!=typeof t&&"id"in t&&this.delete(t.id)},t}();t.Repository=e}(e.Base||(e.Base={}))},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return o});var i=n(17);function r(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)}function o(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:i.a}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(0),r=function(t){function e(n){var i=t.call(this,n?n.length+" errors occurred during unsubscription:\n "+n.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"")||this;return i.errors=n,i.name="UnsubscriptionError",Object.setPrototypeOf(i,e.prototype),i}return i.a(e,t),e}(Error)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var i=n(0),r=n(1);function o(){return function(t){return t.lift(new s(t))}}var s=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var i=new u(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r},t}(),u=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return i.a(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return h});var i=n(0),r=n(7),o=n(61),s=n(5),u=n(55),a=n(22),c=n(63),h=function(t){function e(e,n,i){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this)||this;return r.scheduler=i,r._events=[],r._infiniteTimeWindow=!1,r._bufferSize=e<1?1:e,r._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(r._infiniteTimeWindow=!0,r.next=r.nextInfiniteTimeWindow):r.next=r.nextTimeWindow,r}return i.a(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new l(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,i=n?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;if(this.closed)throw new a.a;if(this.isStopped||this.hasError?e=s.a.EMPTY:(this.observers.push(t),e=new c.a(this,t)),r&&t.add(t=new u.a(t,r)),n)for(var h=0;h<o&&!t.closed;h++)t.next(i[h]);else for(h=0;h<o&&!t.closed;h++)t.next(i[h].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||o.a).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,i=this._events,r=i.length,o=0;o<r&&!(t-i[o].time<n);)o++;return r>e&&(o=Math.max(o,r-e)),o>0&&i.splice(0,o),i},e}(r.a),l=function(){return function(t,e){this.time=t,this.value=e}}()},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var i=n(11),r=n(15),o=n(8),s=n(45);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];switch(Object(i.a)(n)?t.pop():n=void 0,t.length){case 0:return Object(o.b)(n);case 1:return n?Object(r.a)(t,n):Object(s.a)(t[0]);default:return Object(r.a)(t,n)}}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(2);function r(t,e){return e?new i.a(function(n){return e.schedule(o,0,{error:t,subscriber:n})}):new i.a(function(e){return e.error(t)})}function o(t){var e=t.error;t.subscriber.error(e)}},function(t,e,n){"use strict";n.d(e,"b",function(){return h}),n.d(e,"a",function(){return l});var i=n(0),r=n(11),o=n(10),s=n(4),u=n(3),a=n(15),c={};function h(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null,i=null;return Object(r.a)(t[t.length-1])&&(i=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(o.a)(t[0])&&(t=t[0]),Object(a.a)(t,i).lift(new l(n))}var l=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.resultSelector))},t}(),f=function(t){function e(e,n){var i=t.call(this,e)||this;return i.resultSelector=n,i.active=0,i.values=[],i.observables=[],i}return i.a(e,t),e.prototype._next=function(t){this.values.push(c),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var i=t[n];this.add(Object(u.a)(this,i,i,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,i,r){var o=this.values,s=o[n],u=this.toRespond?s===c?--this.toRespond:this.toRespond:0;o[n]=e,0===u&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(s.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var i=n(24),r=n(18);function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(i.a)(r.a,t)}},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var i=n(2),r=n(14),o=n(8);function s(t){return new i.a(function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?Object(r.a)(n):Object(o.b)()).subscribe(e)})}},function(t,e,n){"use strict";n.d(e,"b",function(){return h}),n.d(e,"a",function(){return l});var i=n(0),r=n(15),o=n(10),s=n(1),u=n(4),a=n(3),c=n(20);function h(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"==typeof n&&t.pop(),Object(r.a)(t,void 0).lift(new l(n))}var l=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.resultSelector))},t}(),f=function(t){function e(e,n,i){void 0===i&&(i=Object.create(null));var r=t.call(this,e)||this;return r.iterators=[],r.active=0,r.resultSelector="function"==typeof n?n:null,r.values=i,r}return i.a(e,t),e.prototype._next=function(t){var e=this.iterators;Object(o.a)(t)?e.push(new d(t)):"function"==typeof t[c.a]?e.push(new p(t[c.a]())):e.push(new y(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(0!==e){this.active=e;for(var n=0;n<e;n++){var i=t[n];i.stillUnsubscribed?this.add(i.subscribe(i,n)):this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,i=0;i<e;i++){if("function"==typeof(s=t[i]).hasValue&&!s.hasValue())return}var r=!1,o=[];for(i=0;i<e;i++){var s,u=(s=t[i]).next();if(s.hasCompleted()&&(r=!0),u.done)return void n.complete();o.push(u.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),r&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(s.a),p=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}(),d=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[c.a]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),y=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.parent=n,r.observable=i,r.stillUnsubscribed=!0,r.buffer=[],r.isComplete=!1,r}return i.a(e,t),e.prototype[c.a]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,i,r){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return Object(a.a)(this,this.observable,this,e)},e}(u.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(2);function r(t){var e=new i.a(function(e){e.next(t),e.complete()});return e._isScalar=!0,e.value=t,e}},function(t,e,n){"use strict";var i=n(0),r=1,o={};var s=function(t){var e=r++;return o[e]=t,Promise.resolve().then(function(){return function(t){var e=o[t];e&&e()}(e)}),e},u=function(t){delete o[t]},a=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return i.a(e,t),e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0?t.prototype.requestAsyncId.call(this,e,n,i):(e.actions.push(this),e.scheduled||(e.scheduled=s(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,i){if(void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,i);0===e.actions.length&&(u(n),e.scheduled=void 0)},e}(n(30).a),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i<r&&(t=n.shift()));if(this.active=!1,e){for(;++i<r&&(t=n.shift());)t.unsubscribe();throw e}},e}(n(28).a);n.d(e,"a",function(){return h});var h=new c(a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var i=n(16),r=n(32),o={closed:!0,next:function(t){},error:function(t){if(i.a.useDeprecatedSynchronousErrorHandling)throw t;Object(r.a)(t)},complete:function(){}}},function(t,e,n){"use strict";n.r(e);var i=n(2),r=n(53),o=n(51),s=n(21),u=n(7),a=n(54),c=n(38),h=n(29),l=n(46),f=n(9),p=n(61),d=n(0),y=n(30),v=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return d.a(e,t),e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0?t.prototype.requestAsyncId.call(this,e,n,i):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(function(){return e.flush(null)})))},e.prototype.recycleAsyncId=function(e,n,i){if(void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,i);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(y.a),b=n(28),m=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i<r&&(t=n.shift()));if(this.active=!1,e){for(;++i<r&&(t=n.shift());)t.unsubscribe();throw e}},e}(b.a))(v),x=function(t){function e(e,n){void 0===e&&(e=g),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this,e,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return d.a(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,i=this.maxFrames;(e=n.shift())&&(this.frame=e.delay)<=i&&!(t=e.execute(e.state,e.delay)););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(b.a),g=function(t){function e(e,n,i){void 0===i&&(i=e.index+=1);var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.index=i,r.active=!0,r.index=e.index=i,r}return d.a(e,t),e.prototype.schedule=function(n,i){if(void 0===i&&(i=0),!this.id)return t.prototype.schedule.call(this,n,i);this.active=!1;var r=new e(this.scheduler,this.work);return this.add(r),r.schedule(n,i)},e.prototype.requestAsyncId=function(t,n,i){void 0===i&&(i=0),this.delay=t.frame+i;var r=t.actions;return r.push(this),r.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){void 0===n&&(n=0)},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(y.a),w=n(49),_=n(5),S=n(1),E=n(19),C=n(35),O=n(17),j=n(18);function T(t){return!!t&&(t instanceof i.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var N=n(25),I=n(27),P=n(22),A=n(36),k=n(56),V=n(12),M=n(10),R=n(11);function L(t,e,n){if(e){if(!Object(R.a)(e))return function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];return L(t,n).apply(void 0,i).pipe(Object(V.a)(function(t){return Object(M.a)(t)?e.apply(void 0,t):e(t)}))};n=e}return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o,s=this,u={context:s,subject:o,callbackFunc:t,scheduler:n};return new i.a(function(i){if(n){var r={args:e,subscriber:i,params:u};return n.schedule(B,0,r)}if(!o){o=new h.a;try{t.apply(s,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];o.next(t.length<=1?t[0]:t),o.complete()}]))}catch(t){o.error(t)}}return o.subscribe(i)})}}function B(t){var e=this,n=t.args,i=t.subscriber,r=t.params,o=r.callbackFunc,s=r.context,u=r.scheduler,a=r.subject;if(!a){a=r.subject=new h.a;try{o.apply(s,n.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=t.length<=1?t[0]:t;e.add(u.schedule(D,0,{value:i,subject:a}))}]))}catch(t){a.error(t)}}this.add(a.subscribe(i))}function D(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function F(t,e,n){if(e){if(!Object(R.a)(e))return function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];return F(t,n).apply(void 0,i).pipe(Object(V.a)(function(t){return Object(M.a)(t)?e.apply(void 0,t):e(t)}))};n=e}return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new i.a(function(i){var r=o.context,s=o.subject;if(n)return n.schedule(z,0,{params:o,subscriber:i,context:r});if(!s){s=o.subject=new h.a;try{t.apply(r,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();n?s.error(n):(s.next(t.length<=1?t[0]:t),s.complete())}]))}catch(t){s.error(t)}}return s.subscribe(i)})}}function z(t){var e=this,n=t.params,i=t.subscriber,r=t.context,o=n.callbackFunc,s=n.args,u=n.scheduler,a=n.subject;if(!a){a=n.subject=new h.a;try{o.apply(r,s.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=t.shift();if(i)e.add(u.schedule(W,0,{err:i,subject:a}));else{var r=t.length<=1?t[0]:t;e.add(u.schedule(Y,0,{value:r,subject:a}))}}]))}catch(t){this.add(u.schedule(W,0,{err:t,subject:a}))}}this.add(a.subscribe(i))}function Y(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function W(t){var e=t.err;t.subject.error(e)}var X=n(41),q=n(23),H=n(43),U=n(8),G=n(3);function $(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return"function"==typeof e[e.length-1]&&(t=e.pop()),1===e.length&&Object(M.a)(e[0])&&(e=e[0]),0===e.length?U.a:t?$(e).pipe(Object(V.a)(function(e){return t.apply(void 0,e)})):new i.a(function(t){return new Q(t,e)})}var Q=function(t){function e(e,n){var i=t.call(this,e)||this;i.sources=n,i.completed=0,i.haveValues=0;var r=n.length;i.values=new Array(r);for(var o=0;o<r;o++){var s=n[o],u=Object(G.a)(i,s,null,o);u&&i.add(u)}return i}return d.a(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.values[n]=e,r._hasValue||(r._hasValue=!0,this.haveValues++)},e.prototype.notifyComplete=function(t){var e=this.destination,n=this.haveValues,i=this.values,r=i.length;t._hasValue?(this.completed++,this.completed===r&&(n===r&&e.next(i),e.complete())):e.complete()},e}(n(4).a),J=n(14),K=n(26);Object.prototype.toString;function Z(t,e,n,r){return Object(K.a)(n)&&(r=n,n=void 0),r?Z(t,e,n).pipe(Object(V.a)(function(t){return Object(M.a)(t)?r.apply(void 0,t):r(t)})):new i.a(function(i){!function t(e,n,i,r,o){var s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var u=e;e.addEventListener(n,i,o),s=function(){return u.removeEventListener(n,i,o)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var a=e;e.on(n,i),s=function(){return a.off(n,i)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var c=e;e.addListener(n,i),s=function(){return c.removeListener(n,i)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var h=0,l=e.length;h<l;h++)t(e[h],n,i,r,o)}r.add(s)}(t,e,function(t){arguments.length>1?i.next(Array.prototype.slice.call(arguments)):i.next(t)},i,n)})}function tt(t,e,n){return n?tt(t,e).pipe(Object(V.a)(function(t){return Object(M.a)(t)?n.apply(void 0,t):n(t)})):new i.a(function(n){var i,r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.next(1===t.length?t[0]:t)};try{i=t(r)}catch(t){return void n.error(t)}if(Object(K.a)(e))return function(){return e(r,i)}})}function et(t,e,n,r,o){var s,u;if(1==arguments.length){var a=t;u=a.initialState,e=a.condition,n=a.iterate,s=a.resultSelector||j.a,o=a.scheduler}else void 0===r||Object(R.a)(r)?(u=t,s=j.a,o=r):(u=t,s=r);return new i.a(function(t){var i=u;if(o)return o.schedule(nt,0,{subscriber:t,iterate:n,condition:e,resultSelector:s,state:i});for(;;){if(e){var r=void 0;try{r=e(i)}catch(e){return void t.error(e)}if(!r){t.complete();break}}var a=void 0;try{a=s(i)}catch(e){return void t.error(e)}if(t.next(a),t.closed)break;try{i=n(i)}catch(e){return void t.error(e)}}})}function nt(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(t){return void e.error(t)}else t.needIterate=!0;if(n){var i=void 0;try{i=n(t.state)}catch(t){return void e.error(t)}if(!i)return void e.complete();if(e.closed)return}var r;try{r=t.resultSelector(t.state)}catch(t){return void e.error(t)}if(!e.closed&&(e.next(r),!e.closed))return this.schedule(t)}}function it(t,e,n){return void 0===e&&(e=U.a),void 0===n&&(n=U.a),Object(H.a)(function(){return t()?e:n})}var rt=n(31);function ot(t,e){return void 0===t&&(t=0),void 0===e&&(e=f.a),(!Object(rt.a)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=f.a),new i.a(function(n){return n.add(e.schedule(st,t,{subscriber:n,counter:0,period:t})),n})}function st(t){var e=t.subscriber,n=t.counter,i=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:i},i)}var ut=n(58),at=new i.a(O.a);function ct(){return at}var ht=n(39);function lt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return U.a;var n=t[0],r=t.slice(1);return 1===t.length&&Object(M.a)(n)?lt.apply(void 0,n):new i.a(function(t){var e=function(){return t.add(lt.apply(void 0,r).subscribe(t))};return Object(J.a)(n).subscribe({next:function(e){t.next(e)},error:e,complete:e})})}function ft(t,e){return e?new i.a(function(n){var i=Object.keys(t),r=new _.a;return r.add(e.schedule(pt,0,{keys:i,index:0,subscriber:n,subscription:r,obj:t})),r}):new i.a(function(e){for(var n=Object.keys(t),i=0;i<n.length&&!e.closed;i++){var r=n[i];t.hasOwnProperty(r)&&e.next([r,t[r]])}e.complete()})}function pt(t){var e=t.keys,n=t.index,i=t.subscriber,r=t.subscription,o=t.obj;if(!i.closed)if(n<e.length){var s=e[n];i.next([s,o[s]]),r.add(this.schedule({keys:e,index:n+1,subscriber:i,subscription:r,obj:o}))}else i.complete()}var dt=n(59);function yt(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=0),new i.a(function(i){var r=0,o=t;if(n)return n.schedule(vt,0,{index:r,count:e,start:t,subscriber:i});for(;;){if(r++>=e){i.complete();break}if(i.next(o++),i.closed)break}})}function vt(t){var e=t.start,n=t.index,i=t.count,r=t.subscriber;n>=i?r.complete():(r.next(e),r.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}var bt=n(40),mt=n(60);function xt(t,e){return new i.a(function(n){var i,r;try{i=t()}catch(t){return void n.error(t)}try{r=e(i)}catch(t){return void n.error(t)}var o=(r?Object(J.a)(r):U.a).subscribe(n);return function(){o.unsubscribe(),i&&i.unsubscribe()}})}var gt=n(44),wt=n(16);n.d(e,"Observable",function(){return i.a}),n.d(e,"ConnectableObservable",function(){return r.a}),n.d(e,"GroupedObservable",function(){return o.a}),n.d(e,"observable",function(){return s.a}),n.d(e,"Subject",function(){return u.a}),n.d(e,"BehaviorSubject",function(){return a.a}),n.d(e,"ReplaySubject",function(){return c.a}),n.d(e,"AsyncSubject",function(){return h.a}),n.d(e,"asapScheduler",function(){return l.a}),n.d(e,"asyncScheduler",function(){return f.a}),n.d(e,"queueScheduler",function(){return p.a}),n.d(e,"animationFrameScheduler",function(){return m}),n.d(e,"VirtualTimeScheduler",function(){return x}),n.d(e,"VirtualAction",function(){return g}),n.d(e,"Scheduler",function(){return w.a}),n.d(e,"Subscription",function(){return _.a}),n.d(e,"Subscriber",function(){return S.a}),n.d(e,"Notification",function(){return E.a}),n.d(e,"pipe",function(){return C.a}),n.d(e,"noop",function(){return O.a}),n.d(e,"identity",function(){return j.a}),n.d(e,"isObservable",function(){return T}),n.d(e,"ArgumentOutOfRangeError",function(){return N.a}),n.d(e,"EmptyError",function(){return I.a}),n.d(e,"ObjectUnsubscribedError",function(){return P.a}),n.d(e,"UnsubscriptionError",function(){return A.a}),n.d(e,"TimeoutError",function(){return k.a}),n.d(e,"bindCallback",function(){return L}),n.d(e,"bindNodeCallback",function(){return F}),n.d(e,"combineLatest",function(){return X.b}),n.d(e,"concat",function(){return q.a}),n.d(e,"defer",function(){return H.a}),n.d(e,"empty",function(){return U.b}),n.d(e,"forkJoin",function(){return $}),n.d(e,"from",function(){return J.a}),n.d(e,"fromEvent",function(){return Z}),n.d(e,"fromEventPattern",function(){return tt}),n.d(e,"generate",function(){return et}),n.d(e,"iif",function(){return it}),n.d(e,"interval",function(){return ot}),n.d(e,"merge",function(){return ut.a}),n.d(e,"never",function(){return ct}),n.d(e,"of",function(){return ht.a}),n.d(e,"onErrorResumeNext",function(){return lt}),n.d(e,"pairs",function(){return ft}),n.d(e,"race",function(){return dt.a}),n.d(e,"range",function(){return yt}),n.d(e,"throwError",function(){return bt.a}),n.d(e,"timer",function(){return mt.a}),n.d(e,"using",function(){return xt}),n.d(e,"zip",function(){return gt.b}),n.d(e,"EMPTY",function(){return U.a}),n.d(e,"NEVER",function(){return at}),n.d(e,"config",function(){return wt.a})},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var i=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function r(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!function(t){return"number"==typeof t}(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,s,u,a,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var h=new Error('Uncaught, unspecified "error" event. ('+e+")");throw h.context=e,h}if(o(n=this._events[t]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:u=Array.prototype.slice.call(arguments,1),n.apply(this,u)}else if(r(n))for(u=Array.prototype.slice.call(arguments,1),s=(c=n.slice()).length,a=0;a<s;a++)c[a].apply(this,u);return!0},n.prototype.addListener