@progress/kendo-angular-upload 8.0.1-dev.202202251429 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-angular-upload.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +1 -1
- package/dist/fesm5/index.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-upload.js +1 -1
- package/package.json +2 -2
package/dist/cdn/main.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("rxjs"),require("@progress/kendo-angular-common"),require("@angular/common"),require("@angular/forms"),require("@progress/kendo-licensing"),require("@angular/animations")):"function"==typeof define&&define.amd?define([,,,,,,,,],e):"object"==typeof exports?exports.KendoAngularUpload=e(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("rxjs"),require("@progress/kendo-angular-common"),require("@angular/common"),require("@angular/forms"),require("@progress/kendo-licensing"),require("@angular/animations")):t.KendoAngularUpload=e(t.self,t.ng.core,t.KendoAngularL10N,t.rxjs,t.KendoAngularCommon,t.ng.common,t.ng.forms,t.KendoLicensing,t.ng.animations)}(window,(function(t,e,n,i,r,o,s,a,u){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=74)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(0),r=n(26),o=n(28),s=n(6),a=n(25),u=n(11),c=n(22),l=function(t){function e(n,i,r){var s=t.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=o.a;break;case 1:if(!n){s.destination=o.a;break}if("object"==typeof n){n instanceof e?(s.syncErrorThrowable=n.syncErrorThrowable,s.destination=n,n.add(s)):(s.syncErrorThrowable=!0,s.destination=new p(s,n));break}default:s.syncErrorThrowable=!0,s.destination=new p(s,n,i,r)}return s}return i.__extends(e,t),e.prototype[a.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),p=function(t){function e(e,n,i,s){var a,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return Object(r.a)(n)?a=n:n&&(a=n.next,i=n.error,s=n.complete,n!==o.a&&(c=Object.create(n),Object(r.a)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=a,u._error=i,u._complete=s,u}return i.__extends(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.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=u.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)};u.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(),u.a.useDeprecatedSynchronousErrorHandling)throw t;Object(c.a)(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!u.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return u.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}(l)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(10),r=n(36);function o(t,e,n,o,s){if(void 0===s&&(s=new i.a(t,n,o)),!s.closed)return Object(r.a)(e)(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.__extends(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,n){t.exports=e},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(1);var r=n(25),o=n(28);var s=n(21),a=n(33),u=n(11),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,a=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?a.add(s.call(a,this.source)):a.add(this.source||u.a.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),u.a.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){u.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),!function(t){for(;t;){var e=t,n=e.closed,r=e.destination,o=e.isStopped;if(n||o)return!1;t=r&&r instanceof i.a?r:null}return!0}(t)?console.warn(e):t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=l(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(a.b)(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=l(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 l(t){if(t||(t=u.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(8),r=n(35),o=n(26);function s(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}s.prototype=Object.create(Error.prototype);var a=s,u=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,s=this._parents,u=this._unsubscribe,l=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var p=-1,d=s?s.length:0;n;)n.remove(this),n=++p<d&&s[p]||null;if(Object(o.a)(u))try{u.call(this)}catch(n){e=!0,t=n instanceof a?c(n.errors):[n]}if(Object(i.a)(l))for(p=-1,d=l.length;++p<d;){var h=l[p];if(Object(r.a)(h))try{h.unsubscribe()}catch(n){e=!0,t=t||[],n instanceof a?t=t.concat(c(n.errors)):t.push(n)}}if(e)throw new a(t)}},t.prototype.add=function(e){var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var i=n;(n=new t)._subscriptions=[i]}break;default:if(!e)return t.EMPTY;throw new Error("unrecognized teardown "+e+" added to Subscription.")}if(n._addParent(this)){var r=this._subscriptions;r?r.push(n):this._subscriptions=[n]}return 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;return e!==t&&(e?n?-1===n.indexOf(t)&&(n.push(t),!0):(this._parents=[t],!0):(this._parent=t,!0))},t.EMPTY=((e=new t).closed=!0,e),t}();function c(t){return t.reduce((function(t,e){return t.concat(e instanceof a?e.errors:e)}),[])}},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 a(t,this.project,this.thisArg))},t}(),a=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.__extends(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 i}));var i=Array.isArray||function(t){return t&&"number"==typeof t.length}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(5),r=n(6),o=n(39);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=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.__extends(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)},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(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",(function(){return r}));var r=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){return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg))},t}(),a=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.thisArg=i,r.count=0,r}return i.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var i=n(5),r=n(40),o=n(38),s=n(21);var a=n(12);var u=n(9),c=n(6),l=n(41);var p=n(42);var d=n(37);var h=n(36);function f(t,e){if(!e)return t instanceof i.a?t:new i.a(Object(h.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(d.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(l.a)(t))}(t,e);if(Object(o.a)(t))return Object(u.a)(t,e);if(function(t){return t&&"function"==typeof t[a.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[a.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(p.a)(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(52),o=n(4),s=n(17),a=n(54),u=n(55),c=n(20),l=n(86),p=function(){function t(t){this.http=t,this.cancelEvent=new o.EventEmitter,this.clearEvent=new o.EventEmitter,this.completeEvent=new o.EventEmitter,this.errorEvent=new o.EventEmitter,this.pauseEvent=new o.EventEmitter,this.removeEvent=new o.EventEmitter,this.resumeEvent=new o.EventEmitter,this.selectEvent=new o.EventEmitter,this.successEvent=new o.EventEmitter,this.uploadEvent=new o.EventEmitter,this.uploadProgressEvent=new o.EventEmitter,this.changeEvent=new o.EventEmitter,this.async={autoUpload:!0,batch:!1,chunk:!1,concurrent:!0,removeField:"fileNames",removeHeaders:new r.HttpHeaders,removeMethod:"POST",removeUrl:"",responseType:"json",saveField:"files",saveHeaders:new r.HttpHeaders,saveMethod:"POST",saveUrl:"",withCredentials:!0},this.chunk={autoRetryAfter:100,size:1048576,maxAutoRetries:1,resumable:!0},this.component="Upload",this.chunkMap=new l.ChunkMap,this.fileList=new a.FileMap}return Object.defineProperty(t.prototype,"files",{get:function(){return this.fileList},enumerable:!0,configurable:!0}),t.prototype.setChunkSettings=function(t){!1!==t&&(this.async.chunk=!0,"object"==typeof t&&(this.chunk=Object.assign({},this.chunk,t)))},t.prototype.onChange=function(){var t=this.fileList.filesFlat.filter((function(t){return t.state===s.FileState.Initial||t.state===s.FileState.Uploaded}));this.changeEvent.emit(t.length>0?t:null)},t.prototype.addFiles=function(t){var e=new u.SelectEvent(t);if(this.selectEvent.emit(e),!e.isDefaultPrevented()){for(var n=0,i=t;n<i.length;n++){var r=i[n];this.fileList.add(r)}this.async.autoUpload&&this.uploadFiles()}if("FileSelect"===this.component){var o=this.fileList.filesFlat;this.changeEvent.emit(o.length>0?o:null)}},t.prototype.addInitialFiles=function(t){var e=this;this.fileList.clear(),t.forEach((function(t){var n=c.getInitialFileInfo(t);e.fileList.add(n)}))},t.prototype.addInitialFileSelectFiles=function(t){var e=this;this.fileList.clear(),t.forEach((function(t){t instanceof File?e.fileList.add(c.convertFileToFileInfo(t)):e.fileList.add(c.getInitialFileInfo(t))}))},t.prototype.resumeFile=function(t){var e=this.fileList.get(t);this.resumeEvent.emit(new u.ResumeEvent(e[0])),this.fileList.setFilesStateByUid(t,s.FileState.Uploading),this._uploadFiles([e])},t.prototype.pauseFile=function(t){var e=this.fileList.get(t)[0];this.pauseEvent.emit(new u.PauseEvent(e)),this.fileList.setFilesStateByUid(t,s.FileState.Paused)},t.prototype.removeFiles=function(t){var e=this.fileList.get(t),n=new u.RemoveEvent(e,this.cloneRequestHeaders(this.async.removeHeaders));if(this.removeEvent.emit(n),!n.isDefaultPrevented())if("Upload"!==this.component||e[0].state!==s.FileState.Uploaded&&e[0].state!==s.FileState.Initial){if(this.fileList.remove(t),"FileSelect"===this.component){var i=this.fileList.filesFlat;this.changeEvent.emit(i.length>0?i:null)}}else this.performRemove(e,n)},t.prototype.cancelFiles=function(t){var e=this.fileList.get(t),n=new u.CancelEvent(e);this.cancelEvent.emit(n);for(var i=0,r=e;i<r.length;i++){var o=r[i];o.httpSubscription&&o.httpSubscription.unsubscribe()}this.fileList.remove(t),this.checkAllComplete()},t.prototype.clearFiles=function(){var t=new u.ClearEvent;if(this.clearEvent.emit(t),!t.isDefaultPrevented()){var e=this.fileList.hasFileWithState([s.FileState.Initial,s.FileState.Uploaded]);this.fileList.clear(),e&&this.onChange()}},t.prototype.uploadFiles=function(){var t=[];this.async.concurrent&&(t=this.fileList.filesToUpload),this.async.concurrent||this.fileList.hasFileWithState([s.FileState.Uploading])||(t=this.fileList.firstFileToUpload?[this.fileList.firstFileToUpload]:[]),t&&t.length>0&&this._uploadFiles(t)},t.prototype.retryFiles=function(t){var e=[this.fileList.get(t)];e&&this._uploadFiles(e)},t.prototype._uploadFiles=function(t){for(var e=function(t){if(t[0].state===s.FileState.Paused)return{value:void 0};var e=new u.UploadEvent(t,n.cloneRequestHeaders(n.async.saveHeaders));if(n.uploadEvent.emit(e),e.isDefaultPrevented())n.fileList.remove(t[0].uid);else{n.fileList.setFilesState(t,s.FileState.Uploading);var i=n.performUpload(t,e);t.forEach((function(t){t.httpSubscription=i}))}},n=this,i=0,r=t;i<r.length;i++){var o=e(r[i]);if("object"==typeof o)return o.value}},t.prototype.performRemove=function(t,e){var n=this,i=this.async,o=t.map((function(t){return t.name})),s=this.populateRemoveFormData(o,e.data),a=this.populateRequestOptions(e.headers),u=new r.HttpRequest(i.removeMethod,i.removeUrl,s,a);this.http.request(u).subscribe((function(e){n.onSuccess(e,t,"remove")}),(function(e){n.onError(e,t,"remove")}))},t.prototype.performUpload=function(t,e){var n=this,i=this.async,o=this.populateUploadFormData(t,e.data),s=this.populateRequestOptions(e.headers),a=new r.HttpRequest(i.saveMethod,i.saveUrl,o,s);return this.http.request(a).subscribe((function(e){e.type!==r.HttpEventType.UploadProgress||n.async.chunk?e instanceof r.HttpResponse&&(n.onSuccess(e,t,"upload"),n.checkAllComplete()):n.onProgress(e,t)}),(function(e){n.onError(e,t,"upload"),n.checkAllComplete()}))},t.prototype.onSuccess=function(t,e,n){if("upload"===n&&this.async.chunk){if(this.onChunkProgress(e),!this.isChunkUploadComplete(e[0].uid))return this.updateChunkInfo(e[0].uid),void this._uploadFiles([e]);this.removeChunkInfo(e[0].uid)}var i=new u.SuccessEvent(e,n,t);this.successEvent.emit(i),"upload"===n?this.fileList.setFilesState(e,i.isDefaultPrevented()?s.FileState.Failed:s.FileState.Uploaded):i.isDefaultPrevented()||this.fileList.remove(e[0].uid),i.isDefaultPrevented()||this.onChange()},t.prototype.onError=function(t,e,n){var i=this;if("upload"===n&&this.async.chunk){var r=this.chunk.maxAutoRetries,o=this.chunkMap.get(e[0].uid);if(o.retries<r)return o.retries+=1,void setTimeout((function(){i.retryFiles(e[0].uid)}),this.chunk.autoRetryAfter)}var a=new u.ErrorEvent(e,n,t);this.errorEvent.emit(a),"upload"===n&&this.fileList.setFilesState(e,s.FileState.Failed)},t.prototype.onProgress=function(t,e){var n=Math.round(100*t.loaded/t.total),i=new u.UploadProgressEvent(e,n<100?n:100);this.uploadProgressEvent.emit(i)},t.prototype.onChunkProgress=function(t){var e=this.chunkMap.get(t[0].uid),n=0;e&&(n=e.index===e.totalChunks-1?100:Math.round((e.index+1)/e.totalChunks*100));var i=new u.UploadProgressEvent(t,n<100?n:100);this.uploadProgressEvent.emit(i)},t.prototype.checkAllComplete=function(){!this.fileList.hasFileWithState([s.FileState.Uploading,s.FileState.Paused])&&this.areAllSelectedFilesHandled()?this.completeEvent.emit():this.shouldUploadNextFile()&&this.uploadFiles()},t.prototype.shouldUploadNextFile=function(){return!this.async.concurrent&&this.fileList.hasFileWithState([s.FileState.Selected])&&!this.fileList.hasFileWithState([s.FileState.Uploading])},t.prototype.areAllSelectedFilesHandled=function(){return 0===this.fileList.getFilesWithState(s.FileState.Selected).filter((function(t){return!t.validationErrors})).length},t.prototype.cloneRequestHeaders=function(t){var e={};return t&&t.keys().forEach((function(n){e[n]=t.get(n)})),new r.HttpHeaders(e)},t.prototype.populateRequestOptions=function(t){return{headers:t,reportProgress:!0,responseType:this.async.responseType,withCredentials:this.async.withCredentials}},t.prototype.populateUploadFormData=function(t,e){var n=this.async.saveField,i=new FormData;if(this.populateClientFormData(i,e),this.async.chunk)i.append(n,this.getNextChunk(t[0])),i.append("metadata",this.getChunkMetadata(t[0]));else for(var r=0,o=t;r<o.length;r++){var s=o[r];i.append(n,s.rawFile)}return i},t.prototype.populateRemoveFormData=function(t,e){var n=new FormData;this.populateClientFormData(n,e);for(var i=0,r=t;i<r.length;i++){var o=r[i];n.append(this.async.removeField,o)}return n},t.prototype.populateClientFormData=function(t,e){for(var n in e)e.hasOwnProperty(n)&&t.append(n,e[n])},t.prototype.getNextChunk=function(t){var e=this.getChunkInfo(t),n=e.position+this.chunk.size;return t.rawFile.slice(e.position,n)},t.prototype.getChunkInfo=function(t){var e=this.chunkMap.get(t.uid);if(!e){var n=Math.ceil(t.size/this.chunk.size);e=this.chunkMap.add(t.uid,n)}return e},t.prototype.updateChunkInfo=function(t){var e=this.chunkMap.get(t);e.index<e.totalChunks-1&&(e.index+=1,e.position+=this.chunk.size,e.retries=0)},t.prototype.removeChunkInfo=function(t){this.chunkMap.remove(t)},t.prototype.getChunkMetadata=function(t){var e=this.chunkMap.get(t.uid),n={chunkIndex:e.index,contentType:t.rawFile.type,fileName:t.name,fileSize:t.size,fileUid:t.uid,totalChunks:e.totalChunks};return JSON.stringify(n)},t.prototype.isChunkUploadComplete=function(t){var e=this.chunkMap.get(t);return!!e&&e.index+1===e.totalChunks},t=i.__decorate([o.Injectable(),i.__metadata("design:paramtypes",[r.HttpClient])],t)}();e.UploadService=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(53);e.FileState=i.FileState},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(0),r=n(2),o=n(3),s=n(10),a=n(7),u=n(14);function c(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(i){return i.pipe(c((function(n,i){return Object(u.a)(t(n,i)).pipe(Object(a.a)((function(t,r){return e(n,t,i,r)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new l(t,n))})}var l=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 p(t,this.project,this.concurrent))},t}(),p=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.__extends(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){var i=new s.a(this,void 0,void 0);this.destination.add(i),Object(r.a)(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},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";function i(){}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),r=n(29),o=n(85);e.getTotalFilesSizeMessage=function(t){var e,n=0;if("number"!=typeof t[0].size)return"";for(e=0;e<t.length;e++)t[e].size&&(n+=t[e].size);return(n/=1024)<1024?n.toFixed(2)+" KB":(n/1024).toFixed(2)+" MB"};var s=function(t){var e=t.match(/\.([^\.]+)$/);return e?e[0]:""};e.validateInitialFileInfo=function(t){return!!(t instanceof Object&&t.hasOwnProperty("name"))},e.validateInitialFileSelectFile=function(t){return!!(t instanceof File||e.validateInitialFileInfo(t))},e.getInitialFileInfo=function(t){return t.extension=t.extension||s(t.name),t.name=t.name,t.size=t.size||0,t.hasOwnProperty("state")||(t.state=i.FileState.Initial),t.hasOwnProperty("uid")||(t.uid=r.guid()),t},e.convertFileToFileInfo=function(t){var e=a(t);return e.uid=r.guid(),e.state=i.FileState.Selected,e};var a=function(t){var e=t.name,n=t.size;return{extension:s(e),name:e,rawFile:t,size:n,state:i.FileState.Selected}};e.getAllFileInfo=function(t){var e,n=new Array;for(e=0;e<t.length;e++)n.push(a(t[e]));return n},e.fileHasValidationErrors=function(t){return!!(t.validationErrors&&t.validationErrors.length>0)},e.filesHaveValidationErrors=function(t){for(var n=0,i=t;n<i.length;n++){var r=i[n];if(e.fileHasValidationErrors(r))return!0}return!1},e.inputFiles=function(t){return t.files?e.getAllFileInfo(t.files):t.value.split("|").map((function(t,e){var n,r,o=t.trim();return{extension:s(o),name:(n=o,r=n.lastIndexOf("\\"),-1!==r?n.substr(r+1):n),rawFile:null,size:1e3*(e+1),state:i.FileState.Selected}}))},e.assignGuidToFiles=function(t,e){var n=r.guid();return t.map((function(t){return t.uid=e?r.guid():n,t}))},e.supportsFormData=function(){return"undefined"!=typeof FormData},e.userAgent=function(){return navigator.userAgent};var u=/^(?:a|input|select|textarea|button|object)$/i;e.IGNORE_TARGET_CLASSES="k-icon k-select k-input k-multiselect-wrap",e.UPLOAD_CLASSES="k-upload-button k-clear-selected k-upload-selected k-upload-action";var c=function(t){return String(t).trim().split(" ")};e.hasClasses=function(t,e){var n=c(e);return Boolean(c(t.className).find((function(t){return n.indexOf(t)>=0})))},e.isFocusable=function(t,e){if(void 0===e&&(e=!0),t.tagName){var n=t.tagName.toLowerCase(),i=t.getAttribute("tabIndex"),r=null!==i&&!isNaN(i)&&i>-1;return(u.test(n)?!t.disabled:r)&&(!e||function(t){var e=t.getBoundingClientRect();return!(!e.width||!e.height)&&"hidden"!==window.getComputedStyle(t).visibility}(t))}return!1},e.getFileGroupCssClass=function(t){for(var e in o.fileGroupMap)if(o.fileGroupMap[e].indexOf(t)>=0)return"k-i-file-"+e;return"k-i-file"},e.isPresent=function(t){return null!=t}},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";function i(t){setTimeout((function(){throw t}))}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(16),s=n(29),a=function(){function t(t){this.uploadService=t,this.onActionButtonAction=new r.EventEmitter,this.onActionButtonFocus=new r.EventEmitter,this.onFileAction=new r.EventEmitter,this.onFileFocus=new r.EventEmitter,this.onTab=new r.EventEmitter,this.onWrapperFocus=new r.EventEmitter,this.onSelectButtonFocus=new r.EventEmitter,this.actionButtonsVisible=!1,this.focused=!1,this._focusedIndex=-1}return t.prototype.action=function(t){var e=t.keyCode;return this.keyBindings[e]},t.prototype.process=function(t){var e=this.action(t);e&&e(t.shiftKey)},t.prototype.computeKeys=function(t){var e,n=this;this.keyBindings=((e={})[s.Keys.Enter]=function(){return n.handleEnter()},e[s.Keys.Escape]=function(){return n.handleEscape()},e[s.Keys.Delete]=function(){return n.handleDelete()},e[s.Keys.Tab]=function(t){return n.handleTab(t)},e[s.Keys.ArrowUp]=function(){return n.handleUp()},e[s.Keys.ArrowDown]=function(){return n.handleDown()},e[this.invertKeys(t,s.Keys.ArrowLeft,s.Keys.ArrowRight)]=function(){return n.handleLeft()},e[this.invertKeys(t,s.Keys.ArrowRight,s.Keys.ArrowLeft)]=function(){return n.handleRight()},e)},t.prototype.invertKeys=function(t,e,n){return"rtl"===t?n:e},t.prototype.focusSelectButton=function(){this.focused=!0,this._focusedIndex=-1,this.onSelectButtonFocus.emit()},t.prototype.handleEnter=function(){if(this.lastIndex>=0){if(this.focusedIndex<=this.lastFileIndex)return void this.onFileAction.emit(s.Keys.Enter);this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&this.onActionButtonAction.emit(this.focusedIndex<this.lastIndex?"clear":"upload")}},t.prototype.handleDelete=function(){this.focusedIndex>=0&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(s.Keys.Delete)},t.prototype.handleEscape=function(){this.focusedIndex>=0&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(s.Keys.Escape)},t.prototype.handleLeft=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex&&(this.focusedIndex-=1,this.onActionButtonFocus.emit("clear"))},t.prototype.handleRight=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex-1&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("upload"))},t.prototype.handleTab=function(t){this.focusedIndex>=0&&t?this.focusedIndex=-1:this.onTab.emit()},t.prototype.handleDown=function(){if(this.lastIndex>=0&&this.focusedIndex<this.lastIndex){if(this.focusedIndex<this.lastFileIndex)return this.focusedIndex+=1,void this.onFileFocus.emit(this.focusedIndex);this.actionButtonsVisible&&this.focusedIndex===this.lastFileIndex&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("clear"))}},t.prototype.handleUp=function(){if(this.lastIndex>=0&&this.focusedIndex>-1){if(this.focusedIndex-=1,-1===this.focusedIndex)return void this.onSelectButtonFocus.emit();if(this.focusedIndex<=this.lastFileIndex)return void this.onFileFocus.emit(this.focusedIndex);this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&(this.focusedIndex=this.lastFileIndex,this.onFileFocus.emit(this.focusedIndex))}},Object.defineProperty(t.prototype,"focusedIndex",{get:function(){return this._focusedIndex},set:function(t){this.focused||this.onWrapperFocus.emit(),this._focusedIndex=t,this.focused=!0,this._focusedIndex>=0&&this._focusedIndex<=this.lastFileIndex&&this.onFileFocus.emit(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastFileIndex",{get:function(){return this.actionButtonsVisible?this.lastIndex-2:this.lastIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastIndex",{get:function(){var t=this.uploadService.files.count;return this.actionButtonsVisible?t+1:t-1},enumerable:!0,configurable:!0}),t=i.__decorate([r.Injectable(),i.__metadata("design:paramtypes",[o.UploadService])],t)}();e.NavigationService=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=function(){function t(t){this.templateRef=t}return t=i.__decorate([r.Directive({selector:"[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]"}),i.__metadata("design:paramtypes",[r.TemplateRef])],t)}();e.FileInfoTemplateDirective=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.d(e,"a",(function(){return i}))},function(t,e){t.exports=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(11),r=n(22),o={closed:!0,next:function(t){},error:function(t){if(i.a.useDeprecatedSynchronousErrorHandling)throw t;Object(r.a)(t)},complete:function(){}}},function(t,e){t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.prevented=!1}return t.prototype.preventDefault=function(){this.prevented=!0},t.prototype.isDefaultPrevented=function(){return this.prevented},t}();e.PreventableEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=function(){function t(t){this.templateRef=t}return t=i.__decorate([r.Directive({selector:"[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]"}),i.__metadata("design:paramtypes",[r.TemplateRef])],t)}();e.FileTemplateDirective=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(18);function r(t,e){return Object(i.a)(t,e,1)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var i=n(19);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){t.exports=o},function(t,e,n){"use strict";function i(t){return null!==t&&"object"==typeof t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n(5),r=n(39),o=n(41),s=n(42),a=n(37),u=n(38),c=n(40),l=n(35),p=n(12),d=n(21),h=function(t){if(t instanceof i.a)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[d.a])return Object(a.a)(t);if(Object(u.a)(t))return Object(r.a)(t);if(Object(c.a)(t))return Object(o.a)(t);if(t&&"function"==typeof t[p.a])return Object(s.a)(t);var e=Object(l.a)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(21),r=function(t){return function(e){var n=t[i.a]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){return function(e){for(var n=0,i=t.length;n<i&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()}}},function(t,e,n){"use strict";function i(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(22),r=function(t){return function(e){return t.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,i.a),e}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(12),r=function(t){return function(e){for(var n=t[i.a]();;){var r=n.next();if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o={},s=function(){function t(){}return t.prototype.addComponent=function(t,e){this.has(e)?o[e].push(t):o[e]=[t]},t.prototype.getComponents=function(t){return o[t]},t.prototype.has=function(t){return t in o},t=i.__decorate([r.Injectable()],t)}();e.DropZoneService=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INVALIDMAXFILESIZE="invalidMaxFileSize",e.INVALIDMINFILESIZE="invalidMinFileSize",e.INVALIDFILEEXTENSION="invalidFileExtension";var i=function(t,n){n.length>0&&n.indexOf(t.extension.toLowerCase())<0&&(t.validationErrors=t.validationErrors||[],t.validationErrors.indexOf(e.INVALIDFILEEXTENSION)<0&&t.validationErrors.push(e.INVALIDFILEEXTENSION))},r=function(t,n,i){0!==n&&t.size<n&&(t.validationErrors=t.validationErrors||[],t.validationErrors.indexOf(e.INVALIDMINFILESIZE)<0&&t.validationErrors.push(e.INVALIDMINFILESIZE)),0!==i&&t.size>i&&(t.validationErrors=t.validationErrors||[],t.validationErrors.indexOf(e.INVALIDMAXFILESIZE)<0&&t.validationErrors.push(e.INVALIDMAXFILESIZE))};e.validateFiles=function(t,e){var n,o=e.allowedExtensions.map((function(t){return("."===t.substring(0,1)?t:"."+t).toLowerCase()})),s=e.maxFileSize,a=e.minFileSize;for(n=0;n<t.length;n++)i(t[n],o),r(t[n],a,s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(52),o=n(4),s=n(49),a=n(29),u=n(15),c=n(27),l=n(46),p=n(50),d=n(51),h=n(17),f=n(23),v=n(31),b=n(16),y=n(20),m=n(43),_=n(24);e.UPLOAD_VALUE_ACCESSOR={multi:!0,provide:s.NG_VALUE_ACCESSOR,useExisting:o.forwardRef((function(){return g}))};var g=function(){function t(t,e,n,i,r,s,u,c){var l=this;this.uploadService=t,this.localization=e,this.navigation=n,this.dropZoneService=i,this._ngZone=r,this.renderer=s,this.cdr=u,this.chunkable=!1,this.multiple=!0,this.disabled=!1,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+a.guid(),this.actionsLayout="end",this.onBlur=new o.EventEmitter,this.cancel=new o.EventEmitter,this.clear=new o.EventEmitter,this.complete=new o.EventEmitter,this.error=new o.EventEmitter,this.onFocus=new o.EventEmitter,this.pause=new o.EventEmitter,this.remove=new o.EventEmitter,this.resume=new o.EventEmitter,this.select=new o.EventEmitter,this.success=new o.EventEmitter,this.upload=new o.EventEmitter,this.uploadProgress=new o.EventEmitter,this.valueChange=new o.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(t){},this.onChangeCallback=function(t){},p.validatePackage(d.packageMetadata),this.fileList=this.uploadService.files,this.localizationChangeSubscription=e.changes.subscribe((function(t){var e=t.rtl;l.direction=e?"rtl":"ltr",l.navigation.computeKeys(l.direction)})),this.direction=e.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.wrapper=c.nativeElement,this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers()}var n;return n=t,Object.defineProperty(t.prototype,"autoUpload",{get:function(){return this.uploadService.async.autoUpload},set:function(t){this.uploadService.async.autoUpload=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"batch",{get:function(){return this.uploadService.async.batch},set:function(t){this.uploadService.async.batch=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"withCredentials",{get:function(){return this.uploadService.async.withCredentials},set:function(t){this.uploadService.async.withCredentials=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"saveField",{get:function(){return this.uploadService.async.saveField},set:function(t){this.uploadService.async.saveField=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"saveHeaders",{get:function(){return this.uploadService.async.saveHeaders},set:function(t){this.uploadService.async.saveHeaders=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"saveMethod",{get:function(){return this.uploadService.async.saveMethod},set:function(t){this.uploadService.async.saveMethod=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"saveUrl",{get:function(){return this.uploadService.async.saveUrl},set:function(t){this.uploadService.async.saveUrl=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"responseType",{get:function(){return this.uploadService.async.responseType},set:function(t){this.uploadService.async.responseType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"removeField",{get:function(){return this.uploadService.async.removeField},set:function(t){this.uploadService.async.removeField=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"removeHeaders",{get:function(){return this.uploadService.async.removeHeaders},set:function(t){this.uploadService.async.removeHeaders=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"removeMethod",{get:function(){return this.uploadService.async.removeMethod},set:function(t){this.uploadService.async.removeMethod=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"removeUrl",{get:function(){return this.uploadService.async.removeUrl},set:function(t){this.uploadService.async.removeUrl=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"concurrent",{get:function(){return this.uploadService.async.concurrent},set:function(t){this.uploadService.async.concurrent=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return this.tabindex},set:function(t){this.tabindex=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"restrictions",{get:function(){return this._restrictions},set:function(t){var e=Object.assign({},this._restrictions,t);this._restrictions=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.verifySettings(),this.renderer.removeAttribute(this.wrapper,"tabindex"),this.uploadService.setChunkSettings(this.chunkable),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},t.prototype.ngOnChanges=function(t){if(a.isChanged("chunkable",t)){var e=t.chunkable.currentValue;"boolean"==typeof e&&(this.uploadService.async.chunk=e),"object"==typeof e&&null!==e&&(this.uploadService.async.chunk=!0,this.uploadService.chunk=Object.assign({},this.uploadService.chunk,e))}},t.prototype.ngOnDestroy=function(){this.fileList.clear(),this.blurSubscription&&this.blurSubscription.unsubscribe(),this.wrapperFocusSubscription&&this.wrapperFocusSubscription.unsubscribe(),this.selectButtonFocusSubscription&&this.selectButtonFocusSubscription.unsubscribe(),this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe(),this.subs&&this.subs.unsubscribe()},t.prototype.handleKeydown=function(t){if(!this.disabled)return t.keyCode!==a.Keys.Enter&&t.keyCode!==a.Keys.Space||t.target!==this.fileSelectButton.nativeElement?void((y.hasClasses(t.target,y.UPLOAD_CLASSES)||!y.isFocusable(t.target)&&!y.hasClasses(t.target,y.IGNORE_TARGET_CLASSES))&&this.navigation.process(t)):(t.preventDefault(),void this.fileSelect.nativeElement.click())},t.prototype.writeValue=function(t){var e=!0;t instanceof Array&&(t.forEach((function(t){y.validateInitialFileInfo(t)||(e=!1)})),e&&this.uploadService.addInitialFiles(t)),null===t&&this.fileList.clear(),this.cdr.markForCheck()},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.setDisabledState=function(t){this.disabled=t},Object.defineProperty(t.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabIndex},enumerable:!0,configurable:!0}),t.prototype.onFileSelectButtonFocus=function(t){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-focus"),this.navigation.focused||(this.navigation.focusedIndex=-1)},t.prototype.onFileSelectButtonBlur=function(t){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-focus")},Object.defineProperty(t.prototype,"showActionButtons",{get:function(){var t=!1;if(!this.autoUpload){var e=this.fileList.filesToUpload.length>0,n=this.fileList.hasFileWithState([h.FileState.Uploading]);this.concurrent&&e&&(t=!0),this.concurrent||!e||n||(t=!0)}return this.navigation.actionButtonsVisible=t,t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showTotalStatus",{get:function(){var t=[h.FileState.Uploaded,h.FileState.Uploading,h.FileState.Failed,h.FileState.Paused];return!!this.fileList.hasFileWithState(t)},enumerable:!0,configurable:!0}),t.prototype.textFor=function(t){return this.localization.get(t)},t.prototype.focus=function(){var t=this;setTimeout((function(){t.fileSelectButton.nativeElement.focus()}))},t.prototype.focusComponent=function(){this.focus()},t.prototype.blur=function(){this.navigation.focused&&(this.navigation.focused=!1,document.activeElement.blur(),this.onBlur.emit())},t.prototype.blurComponent=function(){this.blur()},t.prototype.pauseFileByUid=function(t){this.uploadService.pauseFile(t)},t.prototype.resumeFileByUid=function(t){this.uploadService.resumeFile(t)},t.prototype.removeFilesByUid=function(t){this.uploadService.removeFiles(t)},t.prototype.retryUploadByUid=function(t){this.uploadService.retryFiles(t)},t.prototype.cancelUploadByUid=function(t){this.uploadService.cancelFiles(t)},t.prototype.uploadFiles=function(){this.fileList.filesToUpload.length&&this.uploadService.uploadFiles()},t.prototype.clearFiles=function(){this.uploadService.clearFiles()},t.prototype.addFiles=function(t){this.uploadService.addFiles(t)},t.prototype.isEmpty=function(){return!1},t.prototype.verifySettings=function(){if(o.isDevMode()&&this.batch&&!1!==this.chunkable)throw new Error("The file chunking functionality requires the batch setting to be disabled.")},t.prototype.subscribeBlur=function(){var t=this;a.isDocumentAvailable()&&this._ngZone.runOutsideAngular((function(){t.documentClick=c.fromEvent(document,"click").pipe(l.filter((function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))}))),t.blurSubscription=c.merge(t.documentClick,t.navigation.onTab).subscribe((function(){t.navigation.focused&&t._ngZone.run((function(){t.navigation.focused=!1,t.onTouchedCallback(),t.onBlur.emit()}))}))}))},t.prototype.subscribeFocus=function(){var t=this;this.wrapperFocusSubscription=this.navigation.onWrapperFocus.subscribe((function(){t.onFocus.emit()})),this.selectButtonFocusSubscription=this.navigation.onSelectButtonFocus.subscribe((function(){t.fileSelectButton.nativeElement.focus()}))},t.prototype.attachEventHandlers=function(){var t=this;this.subs=this.uploadService.cancelEvent.subscribe((function(e){t.cancel.emit(e)})),this.subs.add(this.uploadService.changeEvent.subscribe((function(e){t.onChangeCallback(e),t.valueChange.emit(e)}))),this.subs.add(this.uploadService.clearEvent.subscribe((function(e){t.clear.emit(e)}))),this.subs.add(this.uploadService.completeEvent.subscribe((function(){t.complete.emit()}))),this.subs.add(this.uploadService.errorEvent.subscribe((function(e){t.error.emit(e)}))),this.subs.add(this.uploadService.pauseEvent.subscribe((function(e){t.pause.emit(e)}))),this.subs.add(this.uploadService.removeEvent.subscribe((function(e){t.remove.emit(e)}))),this.subs.add(this.uploadService.resumeEvent.subscribe((function(e){t.resume.emit(e)}))),this.subs.add(this.uploadService.selectEvent.subscribe((function(e){t.select.emit(e)}))),this.subs.add(this.uploadService.successEvent.subscribe((function(e){t.success.emit(e)}))),this.subs.add(this.uploadService.uploadEvent.subscribe((function(e){t.upload.emit(e)}))),this.subs.add(this.uploadService.uploadProgressEvent.subscribe((function(e){t.uploadProgress.emit(e)})))},i.__decorate([o.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"autoUpload",null),i.__decorate([o.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"batch",null),i.__decorate([o.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"withCredentials",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"saveField",null),i.__decorate([o.Input(),i.__metadata("design:type",r.HttpHeaders),i.__metadata("design:paramtypes",[r.HttpHeaders])],t.prototype,"saveHeaders",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"saveMethod",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"saveUrl",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"responseType",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"removeField",null),i.__decorate([o.Input(),i.__metadata("design:type",r.HttpHeaders),i.__metadata("design:paramtypes",[r.HttpHeaders])],t.prototype,"removeHeaders",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"removeMethod",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"removeUrl",null),i.__decorate([o.Input(),i.__metadata("design:type",Object)],t.prototype,"chunkable",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"concurrent",null),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],t.prototype,"multiple",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],t.prototype,"showFileList",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Number)],t.prototype,"tabindex",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"zoneId",void 0),i.__decorate([o.Input("tabIndex"),i.__metadata("design:type",Number),i.__metadata("design:paramtypes",[Number])],t.prototype,"tabIndex",null),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"accept",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],t.prototype,"restrictions",null),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"focusableId",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"actionsLayout",void 0),i.__decorate([o.ContentChild(v.FileTemplateDirective,{static:!1}),i.__metadata("design:type",v.FileTemplateDirective)],t.prototype,"fileTemplate",void 0),i.__decorate([o.ContentChild(_.FileInfoTemplateDirective,{static:!1}),i.__metadata("design:type",_.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),i.__decorate([o.ViewChild("fileSelect",{static:!0}),i.__metadata("design:type",o.ElementRef)],t.prototype,"fileSelect",void 0),i.__decorate([o.ViewChild("fileSelectButton",{static:!0}),i.__metadata("design:type",o.ElementRef)],t.prototype,"fileSelectButton",void 0),i.__decorate([o.Output("blur"),i.__metadata("design:type",o.EventEmitter)],t.prototype,"onBlur",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"cancel",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"clear",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"complete",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"error",void 0),i.__decorate([o.Output("focus"),i.__metadata("design:type",o.EventEmitter)],t.prototype,"onFocus",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"pause",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"remove",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"resume",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"select",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"success",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"upload",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"uploadProgress",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"valueChange",void 0),i.__decorate([o.HostBinding("class.k-widget"),o.HostBinding("class.k-upload"),i.__metadata("design:type",Boolean)],t.prototype,"hostDefaultClasses",void 0),i.__decorate([o.HostBinding("class.k-disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"hostDisabledClass",null),i.__decorate([o.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"dir",null),i.__decorate([o.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleKeydown",null),t=n=i.__decorate([o.Component({exportAs:"kendoUpload",providers:[u.LocalizationService,f.NavigationService,b.UploadService,m.DropZoneService,e.UPLOAD_VALUE_ACCESSOR,{provide:u.L10N_PREFIX,useValue:"kendo.upload"},{provide:a.KendoInput,useExisting:o.forwardRef((function(){return n}))}],selector:"kendo-upload",template:'\n <ng-container kendoUploadLocalizedMessages\n i18n-cancel="kendo.upload.cancel|The text for the Cancel button"\n cancel="Cancel"\n\n i18n-clearSelectedFiles="kendo.upload.clearSelectedFiles|The text for the Clear button"\n clearSelectedFiles="Clear"\n\n i18n-dropFilesHere="kendo.upload.dropFilesHere|The drop zone hint"\n dropFilesHere="Drop files here to upload"\n\n i18n-filesBatchStatus="kendo.upload.filesBatchStatus|The status message for a batch of files"\n filesBatchStatus="files"\n\n i18n-filesBatchStatusFailed="kendo.upload.filesBatchStatusFailed|The status message for a batch of files after failed upload"\n filesBatchStatusFailed="files failed to upload."\n\n i18n-filesBatchStatusUploaded="kendo.upload.filesBatchStatusUploaded|The status message for a batch of files after successful upload"\n filesBatchStatusUploaded="files successfully uploaded."\n\n i18n-fileStatusFailed="kendo.upload.fileStatusFailed|The file status message after failed upload"\n fileStatusFailed="File failed to upload."\n\n i18n-fileStatusUploaded="kendo.upload.fileStatusUploaded|The file status message after successful upload"\n fileStatusUploaded="File successfully uploaded."\n\n i18n-headerStatusPaused="kendo.upload.headerStatusPaused|The header status message when the file upload is paused"\n headerStatusPaused="Paused"\n\n i18n-headerStatusUploaded="kendo.upload.headerStatusUploaded|The header status message after file upload completion"\n headerStatusUploaded="Done"\n\n i18n-headerStatusUploading="kendo.upload.headerStatusUploading|The header status message during file upload"\n headerStatusUploading="Uploading..."\n\n i18n-invalidFileExtension="kendo.upload.invalidFileExtension|The text for the invalid allowed extensions restriction message"\n invalidFileExtension="File type not allowed."\n\n i18n-invalidMaxFileSize="kendo.upload.invalidMaxFileSize|The text for the invalid max file size restriction message"\n invalidMaxFileSize="File size too large."\n\n i18n-invalidMinFileSize="kendo.upload.invalidMinFileSize|The text for the invalid min file size restriction message"\n invalidMinFileSize="File size too small."\n\n i18n-pause="kendo.upload.pause|The text for the Pause button"\n pause="Pause"\n\n i18n-remove="kendo.upload.remove|The text for the Remove button"\n remove="Remove"\n\n i18n-resume="kendo.upload.resume|The text for the Resume button"\n resume="Resume"\n\n i18n-retry="kendo.upload.retry|The text for the Retry button"\n retry="Retry"\n\n i18n-select="kendo.upload.select|The text for the Select button"\n select="Select files..."\n\n i18n-uploadSelectedFiles="kendo.upload.uploadSelectedFiles|The text for the Upload files button"\n uploadSelectedFiles="Upload"\n >\n </ng-container>\n <div kendoUploadInternalDropZone\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled">\n <div role="button" #fileSelectButton\n [id]="focusableId"\n [attr.aria-label]="textFor(\'select\')"\n [attr.tabindex]="selectButtonTabIndex"\n (focus)="onFileSelectButtonFocus($event)"\n (blur)="onFileSelectButtonBlur($event)"\n class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-upload-button">\n <input #fileSelect kendoFileSelect\n [attr.accept]="accept ? accept : null"\n [attr.aria-hidden]="true"\n [dir]="direction"\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled" />\n <span>{{textFor(\'select\')}}</span>\n </div>\n <kendo-upload-status-total *ngIf="showTotalStatus"\n class="k-upload-status k-upload-status-total"\n [fileList]="fileList">\n </kendo-upload-status-total>\n <div class="k-dropzone-hint">{{textFor(\'dropFilesHere\')}}</div>\n </div>\n <ul kendo-upload-file-list *ngIf="showFileList && fileList.count > 0"\n class="k-upload-files k-reset"\n [disabled]="disabled"\n [fileList]="fileList.files"\n [fileTemplate]="fileTemplate"\n [fileInfoTemplate]="fileInfoTemplate">\n </ul>\n <kendo-upload-action-buttons\n *ngIf="showActionButtons"\n [disabled]="disabled"\n [actionsLayout]="actionsLayout">\n </kendo-upload-action-buttons>\n '}),i.__metadata("design:paramtypes",[b.UploadService,u.LocalizationService,f.NavigationService,m.DropZoneService,o.NgZone,o.Renderer2,o.ChangeDetectorRef,o.ElementRef])],t)}();e.UploadComponent=g},function(t,e,n){"use strict";n.r(e),n.d(e,"audit",(function(){return s})),n.d(e,"auditTime",(function(){return _})),n.d(e,"buffer",(function(){return g})),n.d(e,"bufferCount",(function(){return E})),n.d(e,"bufferTime",(function(){return O})),n.d(e,"bufferToggle",(function(){return U})),n.d(e,"bufferWhen",(function(){return L})),n.d(e,"catchError",(function(){return V})),n.d(e,"combineAll",(function(){return Y})),n.d(e,"combineLatest",(function(){return J})),n.d(e,"concat",(function(){return at})),n.d(e,"concatAll",(function(){return ot})),n.d(e,"concatMap",(function(){return ut.a})),n.d(e,"concatMapTo",(function(){return ct})),n.d(e,"count",(function(){return lt})),n.d(e,"debounce",(function(){return ht})),n.d(e,"debounceTime",(function(){return bt})),n.d(e,"defaultIfEmpty",(function(){return gt})),n.d(e,"delay",(function(){return Ot})),n.d(e,"delayWhen",(function(){return Pt})),n.d(e,"dematerialize",(function(){return At})),n.d(e,"distinct",(function(){return zt})),n.d(e,"distinctUntilChanged",(function(){return Ht})),n.d(e,"distinctUntilKeyChanged",(function(){return qt})),n.d(e,"elementAt",(function(){return ue})),n.d(e,"endWith",(function(){return ce})),n.d(e,"every",(function(){return le})),n.d(e,"exhaust",(function(){return he})),n.d(e,"exhaustMap",(function(){return ye})),n.d(e,"expand",(function(){return ge})),n.d(e,"filter",(function(){return Yt.a})),n.d(e,"finalize",(function(){return we})),n.d(e,"find",(function(){return Ie})),n.d(e,"findIndex",(function(){return ke})),n.d(e,"first",(function(){return je})),n.d(e,"groupBy",(function(){return Le})),n.d(e,"ignoreElements",(function(){return We})),n.d(e,"isEmpty",(function(){return Ze})),n.d(e,"last",(function(){return Qe})),n.d(e,"map",(function(){return be.a})),n.d(e,"mapTo",(function(){return tn})),n.d(e,"materialize",(function(){return rn})),n.d(e,"max",(function(){return dn})),n.d(e,"merge",(function(){return fn})),n.d(e,"mergeAll",(function(){return rt})),n.d(e,"mergeMap",(function(){return nt.a})),n.d(e,"flatMap",(function(){return nt.a})),n.d(e,"mergeMapTo",(function(){return vn})),n.d(e,"mergeScan",(function(){return bn})),n.d(e,"min",(function(){return _n})),n.d(e,"multicast",(function(){return In})),n.d(e,"observeOn",(function(){return On})),n.d(e,"onErrorResumeNext",(function(){return Pn})),n.d(e,"pairwise",(function(){return Un})),n.d(e,"partition",(function(){return Mn})),n.d(e,"pluck",(function(){return zn})),n.d(e,"publish",(function(){return Vn})),n.d(e,"publishBehavior",(function(){return Wn})),n.d(e,"publishLast",(function(){return qn})),n.d(e,"publishReplay",(function(){return Jn})),n.d(e,"race",(function(){return ei})),n.d(e,"reduce",(function(){return pn})),n.d(e,"repeat",(function(){return ni})),n.d(e,"repeatWhen",(function(){return oi})),n.d(e,"retry",(function(){return ui})),n.d(e,"retryWhen",(function(){return pi})),n.d(e,"refCount",(function(){return gn})),n.d(e,"sample",(function(){return fi})),n.d(e,"sampleTime",(function(){return yi})),n.d(e,"scan",(function(){return an})),n.d(e,"sequenceEqual",(function(){return Si})),n.d(e,"share",(function(){return Ii})),n.d(e,"shareReplay",(function(){return Ci})),n.d(e,"single",(function(){return Oi})),n.d(e,"skip",(function(){return Ti})),n.d(e,"skipLast",(function(){return Ni})),n.d(e,"skipUntil",(function(){return Ai})),n.d(e,"skipWhile",(function(){return zi})),n.d(e,"startWith",(function(){return Hi})),n.d(e,"subscribeOn",(function(){return Ji})),n.d(e,"switchAll",(function(){return nr})),n.d(e,"switchMap",(function(){return Qi})),n.d(e,"switchMapTo",(function(){return ir})),n.d(e,"take",(function(){return oe})),n.d(e,"takeLast",(function(){return Xe})),n.d(e,"takeUntil",(function(){return rr})),n.d(e,"takeWhile",(function(){return ar})),n.d(e,"tap",(function(){return $t})),n.d(e,"throttle",(function(){return pr})),n.d(e,"throttleTime",(function(){return fr})),n.d(e,"throwIfEmpty",(function(){return ie})),n.d(e,"timeInterval",(function(){return mr})),n.d(e,"timeout",(function(){return Fr})),n.d(e,"timeoutWith",(function(){return xr})),n.d(e,"timestamp",(function(){return Ir})),n.d(e,"toArray",(function(){return kr})),n.d(e,"window",(function(){return jr})),n.d(e,"windowCount",(function(){return Br})),n.d(e,"windowTime",(function(){return Dr})),n.d(e,"windowToggle",(function(){return Hr})),n.d(e,"windowWhen",(function(){return qr})),n.d(e,"withLatestFrom",(function(){return Yr})),n.d(e,"zip",(function(){return oo})),n.d(e,"zipAll",(function(){return so}));var i=n(0),r=n(3),o=n(2);function s(t){return function(e){return e.lift(new a(t))}}var a=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.durationSelector))},t}(),u=function(t){function e(e,n){var i=t.call(this,e)||this;return i.durationSelector=n,i.hasValue=!1,i}return i.__extends(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=Object(o.a)(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,i){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(r.a),c=n(6),l=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.__extends(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}(function(t){function e(e,n){return t.call(this)||this}return i.__extends(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(c.a)),p=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}(),d=function(t){function e(n,i){void 0===i&&(i=p.now);var r=t.call(this,n,(function(){return e.delegate&&e.delegate!==r?e.delegate.now():i()}))||this;return r.actions=[],r.active=!1,r.scheduled=void 0,r}return i.__extends(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}(p),h=new d(l),f=n(5),v=n(8);function b(t){return!Object(v.a)(t)&&t-parseFloat(t)+1>=0}function y(t){return t&&"function"==typeof t.schedule}function m(t){var e=t.index,n=t.period,i=t.subscriber;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function _(t,e){return void 0===e&&(e=h),s((function(){return function(t,e,n){void 0===t&&(t=0);var i=-1;return b(e)?i=Number(e)<1?1:Number(e):y(e)&&(n=e),y(n)||(n=h),new f.a((function(e){var r=b(t)?t:+t-n.now();return n.schedule(m,r,{index:0,period:i,subscriber:e})}))}(t,e)}))}function g(t){return function(e){return e.lift(new S(t))}}var S=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new x(t,this.closingNotifier))},t}(),x=function(t){function e(e,n){var i=t.call(this,e)||this;return i.buffer=[],i.add(Object(o.a)(i,n)),i}return i.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,e,n,i,r){var o=this.buffer;this.buffer=[],this.destination.next(o)},e}(r.a),w=n(1);function E(t,e){return void 0===e&&(e=null),function(n){return n.lift(new F(t,e))}}var F=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?C:I}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),I=function(t){function e(e,n){var i=t.call(this,e)||this;return i.bufferSize=n,i.buffer=[],i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(w.a),C=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.bufferSize=n,r.startBufferEvery=i,r.buffers=[],r.count=0,r}return i.__extends(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,i=this.buffers,r=this.count;this.count++,r%n==0&&i.push([]);for(var o=i.length;o--;){var s=i[o];s.push(t),s.length===e&&(i.splice(o,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var i=e.shift();i.length>0&&n.next(i)}t.prototype._complete.call(this)},e}(w.a);function O(t){var e=arguments.length,n=h;y(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var i=null;e>=2&&(i=arguments[1]);var r=Number.POSITIVE_INFINITY;return e>=3&&(r=arguments[2]),function(e){return e.lift(new k(t,i,r,n))}}var k=function(){function t(t,e,n,i){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new T(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),j=function(){return function(){this.buffer=[]}}(),T=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=i,s.maxBufferSize=r,s.scheduler=o,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==i||i<0,s.timespanOnly){var u={subscriber:s,context:a,bufferTimeSpan:n};s.add(a.closeAction=o.schedule(P,n,u))}else{var c={subscriber:s,context:a},l={bufferTimeSpan:n,bufferCreationInterval:i,subscriber:s,scheduler:o};s.add(a.closeAction=o.schedule(N,n,c)),s.add(o.schedule(B,i,l))}return s}return i.__extends(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,i=n.length,r=0;r<i;r++){var o=n[r],s=o.buffer;s.push(t),s.length==this.maxBufferSize&&(e=o)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var i=e.shift();n.next(i.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,i={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(P,n,i))}},e.prototype.openContext=function(){var t=new j;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(w.a);function P(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function B(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,i=t.subscriber,r=t.scheduler,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(N,n,{subscriber:i,context:o})),this.schedule(t,e))}function N(t){var e=t.subscriber,n=t.context;e.closeContext(n)}function U(t,e){return function(n){return n.lift(new D(t,e))}}var D=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new A(t,this.openings,this.closingSelector))},t}(),A=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.openings=n,r.closingSelector=i,r.contexts=[],r.add(Object(o.a)(r,n)),r}return i.__extends(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,i=0;i<n;i++)e[i].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var i=n.shift();i.subscription.unsubscribe(),i.buffer=null,i.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,i,r){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,i=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(i),i.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new c.a,i={buffer:[],subscription:n};e.push(i);var r=Object(o.a)(this,t,i);!r||r.closed?this.closeBuffer(i):(r.context=i,this.add(r),n.add(r))},e}(r.a);function L(t){return function(e){return e.lift(new M(t))}}var M=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new z(t,this.closingSelector))},t}(),z=function(t){function e(e,n){var i=t.call(this,e)||this;return i.closingSelector=n,i.subscribing=!1,i.openBuffer(),i}return i.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,e,n,i,r){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new c.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(o.a)(this,e)),this.subscribing=!1},e}(r.a),R=n(10);function V(t){return function(e){var n=new H(t),i=e.lift(n);return n.caught=i}}var H=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new W(t,this.selector,this.caught))},t}(),W=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.selector=n,r.caught=i,r}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var i=new R.a(this,void 0,void 0);this.add(i),Object(o.a)(this,n,void 0,void 0,i)}},e}(r.a),K=n(9),q={};var Z=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new G(t,this.resultSelector))},t}(),G=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.__extends(e,t),e.prototype._next=function(t){this.values.push(q),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(o.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],a=this.toRespond?s===q?--this.toRespond:this.toRespond:0;o[n]=e,0===a&&(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}(r.a);function Y(t){return function(e){return e.lift(new Z(t))}}var X=n(14);function J(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(v.a)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(Object(X.a)([e].concat(t)),new Z(n))}}var $=new f.a((function(t){return t.complete()}));function Q(t){return t?function(t){return new f.a((function(e){return t.schedule((function(){return e.complete()}))}))}(t):$}function tt(t){var e=new f.a((function(e){e.next(t),e.complete()}));return e._isScalar=!0,e.value=t,e}function et(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];switch(y(n)?t.pop():n=void 0,t.length){case 0:return Q(n);case 1:return n?Object(K.a)(t,n):tt(t[0]);default:return Object(K.a)(t,n)}}var nt=n(18);function it(t){return t}function rt(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(nt.a)(it,t)}function ot(){return rt(1)}function st(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return ot()(et.apply(void 0,t))}function at(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(st.apply(void 0,[e].concat(t)))}}var ut=n(32);function ct(t,e){return Object(ut.a)((function(){return t}),e)}function lt(t){return function(e){return e.lift(new pt(t,e))}}var pt=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new dt(t,this.predicate,this.source))},t}(),dt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.source=i,r.count=0,r.index=0,r}return i.__extends(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(w.a);function ht(t){return function(e){return e.lift(new ft(t))}}var ft=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new vt(t,this.durationSelector))},t}(),vt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.durationSelector=n,i.hasValue=!1,i.durationSubscription=null,i}return i.__extends(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=Object(o.a)(this,e))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,e,n,i,r){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=null,n.unsubscribe(),this.remove(n)),this.value=null,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(r.a);function bt(t,e){return void 0===e&&(e=h),function(n){return n.lift(new yt(t,e))}}var yt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new mt(t,this.dueTime,this.scheduler))},t}(),mt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.dueTime=n,r.scheduler=i,r.debouncedSubscription=null,r.lastValue=null,r.hasValue=!1,r}return i.__extends(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(_t,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(w.a);function _t(t){t.debouncedNext()}function gt(t){return void 0===t&&(t=null),function(e){return e.lift(new xt(t))}}var St,xt=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new wt(t,this.defaultValue))},t}(),wt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.defaultValue=n,i.isEmpty=!0,i}return i.__extends(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(w.a);function Et(t){return t instanceof Date&&!isNaN(+t)}function Ft(t,e){return e?new f.a((function(n){return e.schedule(It,0,{error:t,subscriber:n})})):new f.a((function(e){return e.error(t)}))}function It(t){var e=t.error;t.subscriber.error(e)}St||(St={});var Ct=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 et(this.value);case"E":return Ft(this.error);case"C":return Q()}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 Ot(t,e){void 0===e&&(e=h);var n=Et(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new kt(n,e))}}var kt=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new jt(t,this.delay,this.scheduler))},t}(),jt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.delay=n,r.scheduler=i,r.queue=[],r.active=!1,r.errored=!1,r}return i.__extends(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,i=t.scheduler,r=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var o=Math.max(0,n[0].time-i.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new Tt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(Ct.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(Ct.createComplete()),this.unsubscribe()},e}(w.a),Tt=function(){return function(t,e){this.time=t,this.notification=e}}();function Pt(t,e){return e?function(n){return new Ut(n,e).lift(new Bt(t))}:function(e){return e.lift(new Bt(t))}}var Bt=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Nt(t,this.delayDurationSelector))},t}(),Nt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.delayDurationSelector=n,i.completed=!1,i.delayNotifierSubscriptions=[],i.index=0,i}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(t),this.removeSubscription(r),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=Object(o.a)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(r.a),Ut=function(t){function e(e,n){var i=t.call(this)||this;return i.source=e,i.subscriptionDelay=n,i}return i.__extends(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new Dt(t,this.source))},e}(f.a),Dt=function(t){function e(e,n){var i=t.call(this)||this;return i.parent=e,i.source=n,i.sourceSubscribed=!1,i}return i.__extends(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(w.a);function At(){return function(t){return t.lift(new Lt)}}var Lt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Mt(t))},t}(),Mt=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(w.a);function zt(t,e){return function(n){return n.lift(new Rt(t,e))}}var Rt=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new Vt(t,this.keySelector,this.flushes))},t}(),Vt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.keySelector=n,r.values=new Set,i&&r.add(Object(o.a)(r,i)),r}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.values.clear()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(r.a);function Ht(t,e){return function(n){return n.lift(new Wt(t,e))}}var Wt=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Kt(t,this.compare,this.keySelector))},t}(),Kt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.keySelector=i,r.hasKey=!1,"function"==typeof n&&(r.compare=n),r}return i.__extends(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var i=!1;if(this.hasKey)try{i=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))},e}(w.a);function qt(t,e){return Ht((function(n,i){return e?e(n[t],i[t]):n[t]===i[t]}))}function Zt(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}Zt.prototype=Object.create(Error.prototype);var Gt=Zt,Yt=n(13),Xt=n(19),Jt=n(26);function $t(t,e,n){return function(i){return i.lift(new Qt(t,e,n))}}var Qt=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new te(t,this.nextOrObserver,this.error,this.complete))},t}(),te=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o._tapNext=Xt.a,o._tapError=Xt.a,o._tapComplete=Xt.a,o._tapError=i||Xt.a,o._tapComplete=r||Xt.a,Object(Jt.a)(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||Xt.a,o._tapError=n.error||Xt.a,o._tapComplete=n.complete||Xt.a),o}return i.__extends(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(w.a);function ee(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}ee.prototype=Object.create(Error.prototype);var ne=ee,ie=function(t){return void 0===t&&(t=re),$t({hasValue:!1,next:function(){this.hasValue=!0},complete:function(){if(!this.hasValue)throw t()}})};function re(){return new ne}function oe(t){return function(e){return 0===t?Q():e.lift(new se(t))}}var se=function(){function t(t){if(this.total=t,this.total<0)throw new Gt}return t.prototype.call=function(t,e){return e.subscribe(new ae(t,this.total))},t}(),ae=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.count=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(w.a);function ue(t,e){if(t<0)throw new Gt;var n=arguments.length>=2;return function(i){return i.pipe(Object(Yt.a)((function(e,n){return n===t})),oe(1),n?gt(e):ie((function(){return new Gt})))}}function ce(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];y(n)?t.pop():n=null;var i=t.length;return st(e,1!==i||n?i>0?Object(K.a)(t,n):Q(n):tt(t[0]))}}function le(t,e){return function(n){return n.lift(new pe(t,e,n))}}var pe=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new de(t,this.predicate,this.thisArg,this.source))},t}(),de=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=i,o.source=r,o.index=0,o.thisArg=i||o,o}return i.__extends(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(w.a);function he(){return function(t){return t.lift(new fe)}}var fe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return i.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(o.a)(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(r.a),be=n(7);function ye(t,e){return e?function(n){return n.pipe(ye((function(n,i){return Object(X.a)(t(n,i)).pipe(Object(be.a)((function(t,r){return e(n,t,i,r)})))})))}:function(e){return e.lift(new me(t))}}var me=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new _e(t,this.project))},t}(),_e=function(t){function e(e,n){var i=t.call(this,e)||this;return i.project=n,i.hasSubscription=!1,i.hasCompleted=!1,i.index=0,i}return i.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(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.hasSubscription=!0,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=new R.a(this,void 0,void 0);this.destination.add(i),Object(o.a)(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(r.a);function ge(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(i){return i.lift(new Se(t,e,n))}}var Se=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new xe(t,this.project,this.concurrent,this.scheduler))},t}(),xe=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.project=n,o.concurrent=i,o.scheduler=r,o.index=0,o.active=0,o.hasCompleted=!1,i<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return i.__extends(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,i=t.value,r=t.index;e.subscribeToProjection(n,i,r)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var i=this.index++;if(this.active<this.concurrent){n.next(t);try{var r=(0,this.project)(t,i);if(this.scheduler){var o={subscriber:this,result:r,value:t,index:i};this.destination.add(this.scheduler.schedule(e.dispatch,0,o))}else this.subscribeToProjection(r,t,i)}catch(t){n.error(t)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(Object(o.a)(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){this._next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(r.a);function we(t){return function(e){return e.lift(new Ee(t))}}var Ee=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new Fe(t,this.callback))},t}(),Fe=function(t){function e(e,n){var i=t.call(this,e)||this;return i.add(new c.a(n)),i}return i.__extends(e,t),e}(w.a);function Ie(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new Ce(t,n,!1,e))}}var Ce=function(){function t(t,e,n,i){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=i}return t.prototype.call=function(t,e){return e.subscribe(new Oe(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),Oe=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.predicate=n,s.source=i,s.yieldIndex=r,s.thisArg=o,s.index=0,s}return i.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,i=this.index++;try{e.call(n||this,t,i,this.source)&&this.notifyComplete(this.yieldIndex?i:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(w.a);function ke(t,e){return function(n){return n.lift(new Ce(t,n,!0,e))}}function je(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Object(Yt.a)((function(e,n){return t(e,n,i)})):it,oe(1),n?gt(e):ie((function(){return new ne})))}}function Te(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}Te.prototype=Object.create(Error.prototype);var Pe=Te,Be=function(t){function e(e,n){var i=t.call(this)||this;return i.subject=e,i.subscriber=n,i.closed=!1,i}return i.__extends(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(c.a),Ne=n(25),Ue=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return i.__extends(e,t),e}(w.a),De=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.__extends(e,t),e.prototype[Ne.a]=function(){return new Ue(this)},e.prototype.lift=function(t){var e=new Ae(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new Pe;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 Pe;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 Pe;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 Pe;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new Pe;return this.hasError?(t.error(this.thrownError),c.a.EMPTY):this.isStopped?(t.complete(),c.a.EMPTY):(this.observers.push(t),new Be(this,t))},e.prototype.asObservable=function(){var t=new f.a;return t.source=this,t},e.create=function(t,e){return new Ae(t,e)},e}(f.a),Ae=function(t){function e(e,n){var i=t.call(this)||this;return i.destination=e,i.source=n,i}return i.__extends(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):c.a.EMPTY},e}(De);function Le(t,e,n,i){return function(r){return r.lift(new Me(t,e,n,i))}}var Me=function(){function t(t,e,n,i){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=i}return t.prototype.call=function(t,e){return e.subscribe(new ze(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),ze=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=i,s.durationSelector=r,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return i.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var i,r=n.get(e);if(this.elementSelector)try{i=this.elementSelector(t)}catch(t){this.error(t)}else i=t;if(!r){r=this.subjectSelector?this.subjectSelector():new De,n.set(e,r);var o=new Ve(e,r,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new Ve(e,r))}catch(t){return void this.error(t)}this.add(s.subscribe(new Re(e,r,this)))}}r.closed||r.next(i)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(w.a),Re=function(t){function e(e,n,i){var r=t.call(this,n)||this;return r.key=e,r.group=n,r.parent=i,r}return i.__extends(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(w.a),Ve=function(t){function e(e,n,i){var r=t.call(this)||this;return r.key=e,r.groupSubject=n,r.refCountSubscription=i,r}return i.__extends(e,t),e.prototype._subscribe=function(t){var e=new c.a,n=this.refCountSubscription,i=this.groupSubject;return n&&!n.closed&&e.add(new He(n)),e.add(i.subscribe(t)),e},e}(f.a),He=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return i.__extends(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(c.a);function We(){return function(t){return t.lift(new Ke)}}var Ke=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new qe(t))},t}(),qe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype._next=function(t){},e}(w.a);function Ze(){return function(t){return t.lift(new Ge)}}var Ge=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ye(t))},t}(),Ye=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(w.a);function Xe(t){return function(e){return 0===t?Q():e.lift(new Je(t))}}var Je=function(){function t(t){if(this.total=t,this.total<0)throw new Gt}return t.prototype.call=function(t,e){return e.subscribe(new $e(t,this.total))},t}(),$e=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.ring=new Array,i.count=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,i=this.count++;e.length<n?e.push(t):e[i%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,i=this.ring,r=0;r<n;r++){var o=e++%n;t.next(i[o])}t.complete()},e}(w.a);function Qe(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Object(Yt.a)((function(e,n){return t(e,n,i)})):it,Xe(1),n?gt(e):ie((function(){return new ne})))}}function tn(t){return function(e){return e.lift(new en(t))}}var en=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new nn(t,this.value))},t}(),nn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.value=n,i}return i.__extends(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(w.a);function rn(){return function(t){return t.lift(new on)}}var on=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new sn(t))},t}(),sn=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype._next=function(t){this.destination.next(Ct.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(Ct.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(Ct.createComplete()),t.complete()},e}(w.a);function an(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new un(t,e,n))}}var un=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new cn(t,this.accumulator,this.seed,this.hasSeed))},t}(),cn=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=i,o.hasSeed=r,o.index=0,o}return i.__extends(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(w.a),ln=n(33);function pn(t,e){return arguments.length>=2?function(n){return Object(ln.a)(an(t,e),Xe(1),gt(e))(n)}:function(e){return Object(ln.a)(an((function(e,n,i){return t(e,n,i+1)})),Xe(1))(e)}}function dn(t){return pn("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}function hn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,i=null,r=t[t.length-1];return y(r)?(i=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof r&&(n=t.pop()),null===i&&1===t.length&&t[0]instanceof f.a?t[0]:rt(n)(Object(K.a)(t,i))}function fn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(hn.apply(void 0,[e].concat(t)))}}function vn(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?Object(nt.a)((function(){return t}),e,n):("number"==typeof e&&(n=e),Object(nt.a)((function(){return t}),n))}function bn(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(i){return i.lift(new yn(t,e,n))}}var yn=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new mn(t,this.accumulator,this.seed,this.concurrent))},t}(),mn=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.accumulator=n,o.acc=i,o.concurrent=r,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return i.__extends(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,i=void 0;try{i=(0,this.accumulator)(this.acc,t,e)}catch(t){return n.error(t)}this.active++,this._innerSub(i,t,e)}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,n){var i=new R.a(this,void 0,void 0);this.destination.add(i),Object(o.a)(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){var o=this.destination;this.acc=e,this.hasValue=!0,o.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(r.a);function _n(t){return pn("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}function gn(){return function(t){return t.lift(new Sn(t))}}var Sn=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var i=new xn(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r},t}(),xn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return i.__extends(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}(w.a),wn=function(t){function e(e,n){var i=t.call(this)||this;return i.source=e,i.subjectFactory=n,i._refCount=0,i._isComplete=!1,i}return i.__extends(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new c.a).add(this.source.subscribe(new Fn(this.getSubject(),this))),t.closed?(this._connection=null,t=c.a.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return gn()(this)},e}(f.a).prototype,En={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:wn._subscribe},_isComplete:{value:wn._isComplete,writable:!0},getSubject:{value:wn.getSubject},connect:{value:wn.connect},refCount:{value:wn.refCount}},Fn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return i.__extends(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(Ue);w.a;function In(t,e){return function(n){var i;if(i="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new Cn(i,e));var r=Object.create(n,En);return r.source=n,r.subjectFactory=i,r}}var Cn=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,i=this.subjectFactory(),r=n(i).subscribe(t);return r.add(e.subscribe(i)),r},t}();function On(t,e){return void 0===e&&(e=0),function(n){return n.lift(new kn(t,e))}}var kn=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new jn(t,this.scheduler,this.delay))},t}(),jn=function(t){function e(e,n,i){void 0===i&&(i=0);var r=t.call(this,e)||this;return r.scheduler=n,r.delay=i,r}return i.__extends(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new Tn(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(Ct.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(Ct.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(Ct.createComplete()),this.unsubscribe()},e}(w.a),Tn=function(){return function(t,e){this.notification=t,this.destination=e}}();function Pn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Object(v.a)(t[0])&&(t=t[0]),function(e){return e.lift(new Bn(t))}}var Bn=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new Nn(t,this.nextSources))},t}(),Nn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.destination=e,i.nextSources=n,i}return i.__extends(e,t),e.prototype.notifyError=function(t,e){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new R.a(this,void 0,void 0);this.destination.add(e),Object(o.a)(this,t,void 0,void 0,e)}else this.destination.complete()},e}(r.a);function Un(){return function(t){return t.lift(new Dn)}}var Dn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new An(t))},t}(),An=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return i.__extends(e,t),e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t},e}(w.a);function Ln(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}function Mn(t,e){return function(n){return[Object(Yt.a)(t,e)(n),Object(Yt.a)(Ln(t,e))(n)]}}function zn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(be.a)(Rn(t,n))(e)}}function Rn(t,e){return function(n){for(var i=n,r=0;r<e;r++){var o=i[t[r]];if(void 0===o)return;i=o}return i}}function Vn(t){return t?In((function(){return new De}),t):In(new De)}var Hn=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return i.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Pe;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(De);function Wn(t){return function(e){return In(new Hn(t))(e)}}var Kn=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.__extends(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),c.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),c.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}(De);function qn(){return function(t){return In(new Kn)(t)}}var Zn=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return i.__extends(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,i):e.flush(this)},e}(l),Gn=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e}(d))(Zn),Yn=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.__extends(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 Xn(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 Pe;if(this.isStopped||this.hasError?e=c.a.EMPTY:(this.observers.push(t),e=new Be(this,t)),r&&t.add(t=new jn(t,r)),n)for(var s=0;s<o&&!t.closed;s++)t.next(i[s]);else for(s=0;s<o&&!t.closed;s++)t.next(i[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||Gn).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}(De),Xn=function(){return function(t,e){this.time=t,this.value=e}}();function Jn(t,e,n,i){n&&"function"!=typeof n&&(i=n);var r="function"==typeof n?n:void 0,o=new Yn(t,e,i);return function(t){return In((function(){return o}),r)(t)}}function $n(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!Object(v.a)(t[0]))return t[0];t=t[0]}return Object(K.a)(t,void 0).lift(new Qn)}var Qn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ti(t))},t}(),ti=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return i.__extends(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var i=t[n],r=Object(o.a)(this,i,i,n);this.subscriptions&&this.subscriptions.push(r),this.add(r)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,i,r){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==n){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)},e}(r.a);function ei(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&Object(v.a)(t[0])&&(t=t[0]),e.lift.call($n.apply(void 0,[e].concat(t)))}}function ni(t){return void 0===t&&(t=-1),function(e){return 0===t?Q():t<0?e.lift(new ii(-1,e)):e.lift(new ii(t-1,e))}}var ii=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new ri(t,this.count,this.source))},t}(),ri=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.count=n,r.source=i,r}return i.__extends(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(w.a);function oi(t){return function(e){return e.lift(new si(t))}}var si=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new ai(t,this.notifier,e))},t}(),ai=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.notifier=n,r.source=i,r.sourceIsBeingSubscribedTo=!0,r}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(e){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new De;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(o.a)(this,e)},e}(r.a);function ui(t){return void 0===t&&(t=-1),function(e){return e.lift(new ci(t,e))}}var ci=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new li(t,this.count,this.source))},t}(),li=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.count=n,r.source=i,r}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,i=this.count;if(0===i)return t.prototype.error.call(this,e);i>-1&&(this.count=i-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(w.a);function pi(t){return function(e){return e.lift(new di(t,e))}}var di=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new hi(t,this.notifier,this.source))},t}(),hi=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.notifier=n,r.source=i,r}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,i=this.retries,r=this.retriesSubscription;if(i)this.errors=null,this.retriesSubscription=null;else{n=new De;try{i=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}r=Object(o.a)(this,i)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=i,this.retriesSubscription=r,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,n,i,r){var o=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=o,this.source.subscribe(this)},e}(r.a);function fi(t){return function(e){return e.lift(new vi(t))}}var vi=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new bi(t),i=e.subscribe(n);return i.add(Object(o.a)(n,this.notifier)),i},t}(),bi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return i.__extends(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,e,n,i,r){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(r.a);function yi(t,e){return void 0===e&&(e=h),function(n){return n.lift(new mi(t,e))}}var mi=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new _i(t,this.period,this.scheduler))},t}(),_i=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.period=n,r.scheduler=i,r.hasValue=!1,r.add(i.schedule(gi,n,{subscriber:r,period:n})),r}return i.__extends(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(w.a);function gi(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Si(t,e){return function(n){return n.lift(new xi(t,e))}}var xi=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new wi(t,this.compareTo,this.comparator))},t}(),wi=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.compareTo=n,r.comparator=i,r._a=[],r._b=[],r._oneComplete=!1,r.destination.add(n.subscribe(new Ei(e,r))),r}return i.__extends(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparator;t.length>0&&e.length>0;){var i=t.shift(),r=e.shift(),o=!1;try{o=n?n(i,r):i===r}catch(t){this.destination.error(t)}o||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(w.a),Ei=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=n,i}return i.__extends(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(w.a);function Fi(){return new De}function Ii(){return function(t){return gn()(In(Fi)(t))}}function Ci(t,e,n){var i;return i=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,i=t.bufferSize,r=void 0===i?Number.POSITIVE_INFINITY:i,o=t.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,a=t.refCount,u=t.scheduler,c=0,l=!1,p=!1;return function(t){c++,e&&!l||(l=!1,e=new Yn(r,s,u),n=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){p=!0,e.complete()}}));var i=e.subscribe(this);this.add((function(){c--,i.unsubscribe(),n&&!p&&a&&0===c&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(i))}}function Oi(t){return function(e){return e.lift(new ki(t,e))}}var ki=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new ji(t,this.predicate,this.source))},t}(),ji=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.source=i,r.seenValue=!1,r.index=0,r}return i.__extends(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new ne)},e}(w.a);function Ti(t){return function(e){return e.lift(new Pi(t))}}var Pi=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Bi(t,this.total))},t}(),Bi=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.count=0,i}return i.__extends(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(w.a);function Ni(t){return function(e){return e.lift(new Ui(t))}}var Ui=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Gt}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new w.a(t)):e.subscribe(new Di(t,this._skipCount))},t}(),Di=function(t){function e(e,n){var i=t.call(this,e)||this;return i._skipCount=n,i._count=0,i._ring=new Array(n),i}return i.__extends(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var i=n%e,r=this._ring,o=r[i];r[i]=t,this.destination.next(o)}},e}(w.a);function Ai(t){return function(e){return e.lift(new Li(t))}}var Li=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Mi(t,this.notifier))},t}(),Mi=function(t){function e(e,n){var i=t.call(this,e)||this;i.hasValue=!1;var r=new R.a(i,void 0,void 0);return i.add(r),i.innerSubscription=r,Object(o.a)(i,n,void 0,void 0,r),i}return i.__extends(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(t,e,n,i,r){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(r.a);function zi(t){return function(e){return e.lift(new Ri(t))}}var Ri=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new Vi(t,this.predicate))},t}(),Vi=function(t){function e(e,n){var i=t.call(this,e)||this;return i.predicate=n,i.skipping=!0,i.index=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},e}(w.a);function Hi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];y(n)?t.pop():n=null;var i=t.length;return st(1!==i||n?i>0?Object(K.a)(t,n):Q(n):tt(t[0]),e)}}var Wi=1,Ki={};var qi=function(t){var e=Wi++;return Ki[e]=t,Promise.resolve().then((function(){return function(t){var e=Ki[t];e&&e()}(e)})),e},Zi=function(t){delete Ki[t]},Gi=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return i.__extends(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=qi(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&&(Zi(n),e.scheduled=void 0)},e}(l),Yi=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(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}(d))(Gi),Xi=function(t){function e(e,n,i){void 0===n&&(n=0),void 0===i&&(i=Yi);var r=t.call(this)||this;return r.source=e,r.delayTime=n,r.scheduler=i,(!b(n)||n<0)&&(r.delayTime=0),i&&"function"==typeof i.schedule||(r.scheduler=Yi),r}return i.__extends(e,t),e.create=function(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=Yi),new e(t,n,i)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,i=this.source;return this.scheduler.schedule(e.dispatch,n,{source:i,subscriber:t})},e}(f.a);function Ji(t,e){return void 0===e&&(e=0),function(n){return n.lift(new $i(t,e))}}var $i=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new Xi(e,this.delay,this.scheduler).subscribe(t)},t}();function Qi(t,e){return"function"==typeof e?function(n){return n.pipe(Qi((function(n,i){return Object(X.a)(t(n,i)).pipe(Object(be.a)((function(t,r){return e(n,t,i,r)})))})))}:function(e){return e.lift(new tr(t))}}var tr=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new er(t,this.project))},t}(),er=function(t){function e(e,n){var i=t.call(this,e)||this;return i.project=n,i.index=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=this.innerSubscription;i&&i.unsubscribe();var r=new R.a(this,void 0,void 0);this.destination.add(r),this.innerSubscription=Object(o.a)(this,t,e,n,r)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e}(r.a);function nr(){return Qi(it)}function ir(t,e){return e?Qi((function(){return t}),e):Qi((function(){return t}))}function rr(t){return function(e){return e.lift(new or(t))}}var or=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new sr(t),i=Object(o.a)(n,this.notifier);return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n},t}(),sr=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(r.a);function ar(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new ur(t,e))}}var ur=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new cr(t,this.predicate,this.inclusive))},t}(),cr=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.inclusive=i,r.index=0,r}return i.__extends(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(w.a),lr={leading:!0,trailing:!1};function pr(t,e){return void 0===e&&(e=lr),function(n){return n.lift(new dr(t,e.leading,e.trailing))}}var dr=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new hr(t,this.durationSelector,this.leading,this.trailing))},t}(),hr=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=i,o._trailing=r,o._hasValue=!1,o}return i.__extends(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=null},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=Object(o.a)(this,e))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=null,e&&this.send()},e.prototype.notifyNext=function(t,e,n,i,r){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(r.a);function fr(t,e,n){return void 0===e&&(e=h),void 0===n&&(n=lr),function(i){return i.lift(new vr(t,e,n.leading,n.trailing))}}var vr=function(){function t(t,e,n,i){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=i}return t.prototype.call=function(t,e){return e.subscribe(new br(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),br=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=i,s.leading=r,s.trailing=o,s._hasTrailingValue=!1,s._trailingValue=null,s}return i.__extends(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(yr,this.duration,{subscriber:this})),this.leading&&this.destination.next(t))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(w.a);function yr(t){t.subscriber.clearThrottle()}function mr(t){return void 0===t&&(t=h),function(e){return n=function(){return e.pipe(an((function(e,n){var i=e.current;return{value:n,current:t.now(),last:i}}),{current:t.now(),value:void 0,last:void 0}),Object(be.a)((function(t){var e=t.current,n=t.last,i=t.value;return new _r(i,e-n)})))},new f.a((function(t){var e;try{e=n()}catch(e){return void t.error(e)}return(e?Object(X.a)(e):Q()).subscribe(t)}));var n}}var _r=function(){return function(t,e){this.value=t,this.interval=e}}();function gr(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}gr.prototype=Object.create(Error.prototype);var Sr=gr;function xr(t,e,n){return void 0===n&&(n=h),function(i){var r=Et(t),o=r?+t-n.now():Math.abs(t);return i.lift(new wr(o,r,e,n))}}var wr=function(){function t(t,e,n,i){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new Er(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Er=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=i,s.withObservable=r,s.scheduler=o,s.action=null,s.scheduleTimeout(),s}return i.__extends(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(Object(o.a)(t,e))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},e}(r.a);function Fr(t,e){return void 0===e&&(e=h),xr(t,Ft(new Sr),e)}function Ir(t){return void 0===t&&(t=h),Object(be.a)((function(e){return new Cr(e,t.now())}))}var Cr=function(){return function(t,e){this.value=t,this.timestamp=e}}();function Or(t,e,n){return 0===n?[e]:(t.push(e),t)}function kr(){return pn(Or,[])}function jr(t){return function(e){return e.lift(new Tr(t))}}var Tr=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new Pr(t),i=e.subscribe(n);return i.closed||n.add(Object(o.a)(n,this.windowBoundaries)),i},t}(),Pr=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new De,e.next(n.window),n}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.openWindow()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new De;e.next(n)},e}(r.a);function Br(t,e){return void 0===e&&(e=0),function(n){return n.lift(new Nr(t,e))}}var Nr=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new Ur(t,this.windowSize,this.startWindowEvery))},t}(),Ur=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.destination=e,r.windowSize=n,r.startWindowEvery=i,r.windows=[new De],r.count=0,e.next(r.windows[0]),r}return i.__extends(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,i=this.windowSize,r=this.windows,o=r.length,s=0;s<o&&!this.closed;s++)r[s].next(t);var a=this.count-i+1;if(a>=0&&a%e==0&&!this.closed&&r.shift().complete(),++this.count%e==0&&!this.closed){var u=new De;r.push(u),n.next(u)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(w.a);function Dr(t){var e=h,n=null,i=Number.POSITIVE_INFINITY;return y(arguments[3])&&(e=arguments[3]),y(arguments[2])?e=arguments[2]:b(arguments[2])&&(i=arguments[2]),y(arguments[1])?e=arguments[1]:b(arguments[1])&&(n=arguments[1]),function(r){return r.lift(new Ar(t,n,i,e))}}var Ar=function(){function t(t,e,n,i){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new Mr(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),Lr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return i.__extends(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(De),Mr=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=i,s.maxWindowSize=r,s.scheduler=o,s.windows=[];var a=s.openWindow();if(null!==i&&i>=0){var u={subscriber:s,window:a,context:null},c={windowTimeSpan:n,windowCreationInterval:i,subscriber:s,scheduler:o};s.add(o.schedule(Vr,n,u)),s.add(o.schedule(Rr,i,c))}else{var l={subscriber:s,window:a,windowTimeSpan:n};s.add(o.schedule(zr,n,l))}return s}return i.__extends(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,i=0;i<n;i++){var r=e[i];r.closed||(r.next(t),r.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(r))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new Lr;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(w.a);function zr(t){var e=t.subscriber,n=t.windowTimeSpan,i=t.window;i&&e.closeWindow(i),t.window=e.openWindow(),this.schedule(t,n)}function Rr(t){var e=t.windowTimeSpan,n=t.subscriber,i=t.scheduler,r=t.windowCreationInterval,o=n.openWindow(),s={action:this,subscription:null},a={subscriber:n,window:o,context:s};s.subscription=i.schedule(Vr,e,a),this.add(s.subscription),this.schedule(t,r)}function Vr(t){var e=t.subscriber,n=t.window,i=t.context;i&&i.action&&i.subscription&&i.action.remove(i.subscription),e.closeWindow(n)}function Hr(t,e){return function(n){return n.lift(new Wr(t,e))}}var Wr=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Kr(t,this.openings,this.closingSelector))},t}(),Kr=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.openings=n,r.closingSelector=i,r.contexts=[],r.add(r.openSubscription=Object(o.a)(r,n,n)),r}return i.__extends(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,i=0;i<n;i++)e[i].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var i=n.length,r=-1;++r<i;){var o=n[r];o.window.error(e),o.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,i=-1;++i<n;){var r=e[i];r.window.complete(),r.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var i=t[n];i.window.unsubscribe(),i.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,i,r){if(t===this.openings){var s=void 0;try{s=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var a=new De,u=new c.a,l={window:a,subscription:u};this.contexts.push(l);var p=Object(o.a)(this,s,l);p.closed?this.closeWindow(this.contexts.length-1):(p.context=l,u.add(p)),this.destination.next(a)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],i=n.window,r=n.subscription;e.splice(t,1),i.complete(),r.unsubscribe()}},e}(r.a);function qr(t){return function(e){return e.lift(new Zr(t))}}var Zr=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Gr(t,this.closingSelector))},t}(),Gr=function(t){function e(e,n){var i=t.call(this,e)||this;return i.destination=e,i.closingSelector=n,i.openWindow(),i}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.openWindow(r)},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,i=this.window=new De;this.destination.next(i);try{n=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=Object(o.a)(this,n))},e}(r.a);function Yr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var i=t;return e.lift(new Xr(i,n))}}var Xr=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new Jr(t,this.observables,this.project))},t}(),Jr=function(t){function e(e,n,i){var r=t.call(this,e)||this;r.observables=n,r.project=i,r.toRespond=[];var s=n.length;r.values=new Array(s);for(var a=0;a<s;a++)r.toRespond.push(a);for(a=0;a<s;a++){var u=n[a];r.add(Object(o.a)(r,u,u,a))}return r}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.values[n]=e;var o=this.toRespond;if(o.length>0){var s=o.indexOf(n);-1!==s&&o.splice(s,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(r.a),$r=n(12);function Qr(){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(K.a)(t,void 0).lift(new to(n))}var to=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new eo(t,this.resultSelector))},t}(),eo=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.__extends(e,t),e.prototype._next=function(t){var e=this.iterators;Object(v.a)(t)?e.push(new io(t)):"function"==typeof t[$r.a]?e.push(new no(t[$r.a]())):e.push(new ro(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var i=t[n];if(i.stillUnsubscribed)this.destination.add(i.subscribe(i,n));else 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,a=(s=t[i]).next();if(s.hasCompleted()&&(r=!0),a.done)return void n.complete();o.push(a.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}(w.a),no=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}(),io=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[$r.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}(),ro=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.__extends(e,t),e.prototype[$r.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(o.a)(this,this.observable,this,e)},e}(r.a);function oo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Qr.apply(void 0,[e].concat(t)))}}function so(t){return function(e){return e.lift(new to(t))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(48),s=n(56),a=[o.FileSelectComponent],u=function(){function t(){}return t=i.__decorate([r.NgModule({declarations:[a],exports:[s.PUBLIC_DIRECTIVES,a],imports:[s.SharedModule]})],t)}();e.FileSelectModule=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(49),s=n(15),a=n(29),u=n(27),c=n(46),l=n(50),p=n(51),d=n(16),h=n(23),f=n(20),v=n(31),b=n(53),y=n(43),m=n(24);e.FILESELECT_VALUE_ACCESSOR={multi:!0,provide:o.NG_VALUE_ACCESSOR,useExisting:r.forwardRef((function(){return _}))};var _=function(){function t(t,e,n,i,o,s,u,c){var d=this;this.uploadService=t,this.localization=e,this.navigation=n,this.dropZoneService=i,this.ngZone=o,this.renderer=s,this.cdr=u,this.disabled=!1,this.multiple=!0,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+a.guid(),this.onBlur=new r.EventEmitter,this.onFocus=new r.EventEmitter,this.select=new r.EventEmitter,this.remove=new r.EventEmitter,this.valueChange=new r.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(t){},this.onChangeCallback=function(t){},l.validatePackage(p.packageMetadata),this.wrapper=c.nativeElement,this.direction=e.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.fileList=this.uploadService.files,this.localizationChangeSubscription=e.changes.subscribe((function(t){var e=t.rtl;d.direction=e?"rtl":"ltr",d.navigation.computeKeys(d.direction)})),this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers(),this.setDefaultSettings()}var n;return n=t,Object.defineProperty(t.prototype,"name",{get:function(){return this.uploadService.async.saveField},set:function(t){this.uploadService.async.saveField=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"restrictions",{get:function(){return this._restrictions},set:function(t){var e=Object.assign({},this._restrictions,t);this._restrictions=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.wrapper,"tabindex"),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},t.prototype.textFor=function(t){return this.localization.get(t)},t.prototype.focus=function(){var t=this;setTimeout((function(){t.fileSelectButton.nativeElement.focus()}))},t.prototype.ngOnDestroy=function(){this.fileList.clear(),this.blurSubscription&&this.blurSubscription.unsubscribe(),this.wrapperFocusSubscription&&this.wrapperFocusSubscription.unsubscribe(),this.selectButtonFocusSubscription&&this.selectButtonFocusSubscription.unsubscribe(),this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe(),this.subs&&this.subs.unsubscribe()},t.prototype.handleKeydown=function(t){if(!this.disabled)return t.keyCode!==a.Keys.Enter&&t.keyCode!==a.Keys.Space||t.target!==this.fileSelectButton.nativeElement?void((f.hasClasses(t.target,f.UPLOAD_CLASSES)||!f.isFocusable(t.target)&&!f.hasClasses(t.target,f.IGNORE_TARGET_CLASSES))&&this.navigation.process(t)):(t.preventDefault(),void this.fileSelect.nativeElement.click())},t.prototype.writeValue=function(t){var e=!0;t instanceof Array&&(t.forEach((function(t){f.validateInitialFileSelectFile(t)||(e=!1)})),e&&this.uploadService.addInitialFileSelectFiles(t)),null===t&&this.fileList.clear(),this.cdr.markForCheck()},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.setDisabledState=function(t){this.disabled=t},t.prototype.removeFileByUid=function(t){this.uploadService.removeFiles(t)},t.prototype.clearFiles=function(){this.uploadService.clearFiles()},t.prototype.isEmpty=function(){return!1},t.prototype.addFiles=function(t){this.uploadService.addFiles(t)},Object.defineProperty(t.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabindex},enumerable:!0,configurable:!0}),t.prototype.onFileSelectButtonFocus=function(t){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-focus"),this.navigation.focused||(this.navigation.focusedIndex=-1)},t.prototype.onFileSelectButtonBlur=function(t){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-focus")},t.prototype.subscribeBlur=function(){var t=this;a.isDocumentAvailable()&&this.ngZone.runOutsideAngular((function(){t.documentClick=u.fromEvent(document,"click").pipe(c.filter((function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))}))),t.blurSubscription=u.merge(t.documentClick,t.navigation.onTab).subscribe((function(){t.navigation.focused&&t.ngZone.run((function(){t.navigation.focused=!1,t.onTouchedCallback(),t.onBlur.emit()}))}))}))},t.prototype.subscribeFocus=function(){var t=this;this.wrapperFocusSubscription=this.navigation.onWrapperFocus.subscribe((function(){t.onFocus.emit()})),this.selectButtonFocusSubscription=this.navigation.onSelectButtonFocus.subscribe((function(){t.fileSelectButton.nativeElement.focus()}))},t.prototype.attachEventHandlers=function(){var t=this;this.subs=this.uploadService.changeEvent.subscribe((function(e){var n=[];null!==e&&e.forEach((function(t){t.state===b.FileState.Initial&&n.push(t),t.state===b.FileState.Selected&&t.rawFile&&!t.validationErrors&&n.push(t.rawFile)})),0===n.length&&(n=null),t.onChangeCallback(n),t.valueChange.emit(n)})),this.subs.add(this.uploadService.removeEvent.subscribe((function(e){t.remove.emit(e)}))),this.subs.add(this.uploadService.selectEvent.subscribe((function(e){t.select.emit(e)})))},t.prototype.setDefaultSettings=function(){this.uploadService.async.autoUpload=!1,this.uploadService.component="FileSelect"},i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"accept",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"multiple",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"name",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"showFileList",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Number)],t.prototype,"tabindex",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],t.prototype,"restrictions",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"zoneId",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"focusableId",void 0),i.__decorate([r.ContentChild(v.FileTemplateDirective,{static:!1}),i.__metadata("design:type",v.FileTemplateDirective)],t.prototype,"fileTemplate",void 0),i.__decorate([r.ContentChild(m.FileInfoTemplateDirective,{static:!1}),i.__metadata("design:type",m.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),i.__decorate([r.ViewChild("fileSelect",{static:!0}),i.__metadata("design:type",r.ElementRef)],t.prototype,"fileSelect",void 0),i.__decorate([r.ViewChild("fileSelectButton",{static:!0}),i.__metadata("design:type",r.ElementRef)],t.prototype,"fileSelectButton",void 0),i.__decorate([r.Output("blur"),i.__metadata("design:type",r.EventEmitter)],t.prototype,"onBlur",void 0),i.__decorate([r.Output("focus"),i.__metadata("design:type",r.EventEmitter)],t.prototype,"onFocus",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"select",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"remove",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"valueChange",void 0),i.__decorate([r.HostBinding("class.k-widget"),r.HostBinding("class.k-upload"),i.__metadata("design:type",Boolean)],t.prototype,"hostDefaultClasses",void 0),i.__decorate([r.HostBinding("class.k-disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"hostDisabledClass",null),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"dir",null),i.__decorate([r.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleKeydown",null),t=n=i.__decorate([r.Component({exportAs:"kendoFileSelect",providers:[s.LocalizationService,h.NavigationService,d.UploadService,y.DropZoneService,e.FILESELECT_VALUE_ACCESSOR,{provide:s.L10N_PREFIX,useValue:"kendo.fileselect"},{provide:a.KendoInput,useExisting:r.forwardRef((function(){return n}))}],selector:"kendo-fileselect",template:'\n <ng-container kendoFileSelectLocalizedMessages\n i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"\n dropFilesHere="Drop files here to select"\n\n i18n-invalidFileExtension="kendo.fileselect.invalidFileExtension|The text for the invalid allowed extensions restriction message"\n invalidFileExtension="File type not allowed."\n\n i18n-invalidMaxFileSize="kendo.fileselect.invalidMaxFileSize|The text for the invalid max file size restriction message"\n invalidMaxFileSize="File size too large."\n\n i18n-invalidMinFileSize="kendo.fileselect.invalidMinFileSize|The text for the invalid min file size restriction message"\n invalidMinFileSize="File size too small."\n\n i18n-remove="kendo.fileselect.remove|The text for the Remove button"\n remove="Remove"\n\n i18n-select="kendo.fileselect.select|The text for the Select button"\n select="Select files..."\n >\n </ng-container>\n <div kendoFileSelectInternalDropZone\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled">\n <div role="button" #fileSelectButton\n [id]="focusableId"\n [attr.aria-label]="textFor(\'select\')"\n [attr.tabindex]="selectButtonTabIndex"\n (focus)="onFileSelectButtonFocus($event)"\n (blur)="onFileSelectButtonBlur($event)"\n class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-upload-button">\n <input #fileSelect kendoFileSelect\n [attr.accept]="accept ? accept : null"\n [dir]="direction"\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled" />\n <span>{{textFor(\'select\')}}</span>\n </div>\n <div class="k-dropzone-hint">{{textFor(\'dropFilesHere\')}}</div>\n </div>\n <ul kendo-upload-file-list\n class="k-upload-files k-reset"\n *ngIf="showFileList && fileList.count > 0"\n [disabled]="disabled"\n [fileList]="fileList.files"\n [fileTemplate]="fileTemplate"\n [fileInfoTemplate]="fileInfoTemplate">\n </ul>\n '}),i.__metadata("design:paramtypes",[d.UploadService,s.LocalizationService,h.NavigationService,y.DropZoneService,r.NgZone,r.Renderer2,r.ChangeDetectorRef,r.ElementRef])],t)}();e.FileSelectComponent=_},function(t,e){t.exports=s},function(t,e){t.exports=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata={name:"@progress/kendo-angular-upload",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1645799273,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(t,e,n){"use strict";n.r(e),n.d(e,"ɵangular_packages_common_http_http_a",(function(){return k})),n.d(e,"ɵangular_packages_common_http_http_b",(function(){return T})),n.d(e,"ɵangular_packages_common_http_http_c",(function(){return W})),n.d(e,"ɵangular_packages_common_http_http_d",(function(){return D})),n.d(e,"ɵangular_packages_common_http_http_g",(function(){return R})),n.d(e,"ɵangular_packages_common_http_http_h",(function(){return V})),n.d(e,"ɵangular_packages_common_http_http_e",(function(){return L})),n.d(e,"ɵangular_packages_common_http_http_f",(function(){return M})),n.d(e,"HttpBackend",(function(){return p})),n.d(e,"HttpHandler",(function(){return l})),n.d(e,"HttpClient",(function(){return I})),n.d(e,"HttpHeaders",(function(){return d})),n.d(e,"HTTP_INTERCEPTORS",(function(){return O})),n.d(e,"JsonpClientBackend",(function(){return P})),n.d(e,"JsonpInterceptor",(function(){return B})),n.d(e,"HttpClientJsonpModule",(function(){return Z})),n.d(e,"HttpClientModule",(function(){return q})),n.d(e,"HttpClientXsrfModule",(function(){return K})),n.d(e,"ɵHttpInterceptingHandler",(function(){return H})),n.d(e,"HttpParams",(function(){return v})),n.d(e,"HttpUrlEncodingCodec",(function(){return h})),n.d(e,"HttpRequest",(function(){return g})),n.d(e,"HttpErrorResponse",(function(){return E})),n.d(e,"HttpEventType",(function(){return _})),n.d(e,"HttpHeaderResponse",(function(){return x})),n.d(e,"HttpResponse",(function(){return w})),n.d(e,"HttpResponseBase",(function(){return S})),n.d(e,"HttpXhrBackend",(function(){return A})),n.d(e,"XhrFactory",(function(){return U})),n.d(e,"HttpXsrfTokenExtractor",(function(){return z}));var i=n(0),r=n(4),o=n(27),s=n(32),a=n(13),u=n(7),c=n(34),l=function(){},p=function(){},d=function(){function t(t){var e=this;this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?function(){e.headers=new Map,t.split("\n").forEach((function(t){var n=t.indexOf(":");if(n>0){var i=t.slice(0,n),r=i.toLowerCase(),o=t.slice(n+1).trim();e.maybeSetNormalizedName(i,r),e.headers.has(r)?e.headers.get(r).push(o):e.headers.set(r,[o])}}))}:function(){e.headers=new Map,Object.keys(t).forEach((function(n){var i=t[n],r=n.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(e.headers.set(r,i),e.maybeSetNormalizedName(n,r))}))}:this.headers=new Map}return t.prototype.has=function(t){return this.init(),this.headers.has(t.toLowerCase())},t.prototype.get=function(t){this.init();var e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null},t.prototype.keys=function(){return this.init(),Array.from(this.normalizedNames.values())},t.prototype.getAll=function(t){return this.init(),this.headers.get(t.toLowerCase())||null},t.prototype.append=function(t,e){return this.clone({name:t,value:e,op:"a"})},t.prototype.set=function(t,e){return this.clone({name:t,value:e,op:"s"})},t.prototype.delete=function(t,e){return this.clone({name:t,value:e,op:"d"})},t.prototype.maybeSetNormalizedName=function(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)},t.prototype.init=function(){var e=this;this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach((function(t){return e.applyUpdate(t)})),this.lazyUpdate=null))},t.prototype.copyFrom=function(t){var e=this;t.init(),Array.from(t.headers.keys()).forEach((function(n){e.headers.set(n,t.headers.get(n)),e.normalizedNames.set(n,t.normalizedNames.get(n))}))},t.prototype.clone=function(e){var n=new t;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n},t.prototype.applyUpdate=function(t){var e=t.name.toLowerCase();switch(t.op){case"a":case"s":var n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);var r=("a"===t.op?this.headers.get(e):void 0)||[];r.push.apply(r,Object(i.__spread)(n)),this.headers.set(e,r);break;case"d":var o=t.value;if(o){var s=this.headers.get(e);if(!s)return;0===(s=s.filter((function(t){return-1===o.indexOf(t)}))).length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}},t.prototype.forEach=function(t){var e=this;this.init(),Array.from(this.normalizedNames.keys()).forEach((function(n){return t(e.normalizedNames.get(n),e.headers.get(n))}))},t}(),h=function(){function t(){}return t.prototype.encodeKey=function(t){return f(t)},t.prototype.encodeValue=function(t){return f(t)},t.prototype.decodeKey=function(t){return decodeURIComponent(t)},t.prototype.decodeValue=function(t){return decodeURIComponent(t)},t}();function f(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var v=function(){function t(t){var e,n,r,o=this;if(void 0===t&&(t={}),this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new h,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=(e=t.fromString,n=this.encoder,r=new Map,e.length>0&&e.split("&").forEach((function(t){var e=t.indexOf("="),o=Object(i.__read)(-1==e?[n.decodeKey(t),""]:[n.decodeKey(t.slice(0,e)),n.decodeValue(t.slice(e+1))],2),s=o[0],a=o[1],u=r.get(s)||[];u.push(a),r.set(s,u)})),r)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach((function(e){var n=t.fromObject[e];o.map.set(e,Array.isArray(n)?n:[n])}))):this.map=null}return t.prototype.has=function(t){return this.init(),this.map.has(t)},t.prototype.get=function(t){this.init();var e=this.map.get(t);return e?e[0]:null},t.prototype.getAll=function(t){return this.init(),this.map.get(t)||null},t.prototype.keys=function(){return this.init(),Array.from(this.map.keys())},t.prototype.append=function(t,e){return this.clone({param:t,value:e,op:"a"})},t.prototype.set=function(t,e){return this.clone({param:t,value:e,op:"s"})},t.prototype.delete=function(t,e){return this.clone({param:t,value:e,op:"d"})},t.prototype.toString=function(){var t=this;return this.init(),this.keys().map((function(e){var n=t.encoder.encodeKey(e);return t.map.get(e).map((function(e){return n+"="+t.encoder.encodeValue(e)})).join("&")})).join("&")},t.prototype.clone=function(e){var n=new t({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([e]),n},t.prototype.init=function(){var t=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach((function(e){return t.map.set(e,t.cloneFrom.map.get(e))})),this.updates.forEach((function(e){switch(e.op){case"a":case"s":var n=("a"===e.op?t.map.get(e.param):void 0)||[];n.push(e.value),t.map.set(e.param,n);break;case"d":if(void 0===e.value){t.map.delete(e.param);break}var i=t.map.get(e.param)||[],r=i.indexOf(e.value);-1!==r&&i.splice(r,1),i.length>0?t.map.set(e.param,i):t.map.delete(e.param)}})),this.cloneFrom=this.updates=null)},t}();
|
|
5
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("rxjs"),require("@progress/kendo-angular-common"),require("@angular/common"),require("@angular/forms"),require("@progress/kendo-licensing"),require("@angular/animations")):"function"==typeof define&&define.amd?define([,,,,,,,,],e):"object"==typeof exports?exports.KendoAngularUpload=e(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("rxjs"),require("@progress/kendo-angular-common"),require("@angular/common"),require("@angular/forms"),require("@progress/kendo-licensing"),require("@angular/animations")):t.KendoAngularUpload=e(t.self,t.ng.core,t.KendoAngularL10N,t.rxjs,t.KendoAngularCommon,t.ng.common,t.ng.forms,t.KendoLicensing,t.ng.animations)}(window,(function(t,e,n,i,r,o,s,a,u){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=74)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(0),r=n(26),o=n(28),s=n(6),a=n(25),u=n(11),c=n(22),l=function(t){function e(n,i,r){var s=t.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=o.a;break;case 1:if(!n){s.destination=o.a;break}if("object"==typeof n){n instanceof e?(s.syncErrorThrowable=n.syncErrorThrowable,s.destination=n,n.add(s)):(s.syncErrorThrowable=!0,s.destination=new p(s,n));break}default:s.syncErrorThrowable=!0,s.destination=new p(s,n,i,r)}return s}return i.__extends(e,t),e.prototype[a.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),p=function(t){function e(e,n,i,s){var a,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return Object(r.a)(n)?a=n:n&&(a=n.next,i=n.error,s=n.complete,n!==o.a&&(c=Object.create(n),Object(r.a)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=a,u._error=i,u._complete=s,u}return i.__extends(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.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=u.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)};u.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(),u.a.useDeprecatedSynchronousErrorHandling)throw t;Object(c.a)(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!u.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return u.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}(l)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(10),r=n(36);function o(t,e,n,o,s){if(void 0===s&&(s=new i.a(t,n,o)),!s.closed)return Object(r.a)(e)(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.__extends(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,n){t.exports=e},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(1);var r=n(25),o=n(28);var s=n(21),a=n(33),u=n(11),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,a=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?a.add(s.call(a,this.source)):a.add(this.source||u.a.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),u.a.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){u.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),!function(t){for(;t;){var e=t,n=e.closed,r=e.destination,o=e.isStopped;if(n||o)return!1;t=r&&r instanceof i.a?r:null}return!0}(t)?console.warn(e):t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=l(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(a.b)(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=l(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 l(t){if(t||(t=u.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(8),r=n(35),o=n(26);function s(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}s.prototype=Object.create(Error.prototype);var a=s,u=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,s=this._parents,u=this._unsubscribe,l=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var p=-1,d=s?s.length:0;n;)n.remove(this),n=++p<d&&s[p]||null;if(Object(o.a)(u))try{u.call(this)}catch(n){e=!0,t=n instanceof a?c(n.errors):[n]}if(Object(i.a)(l))for(p=-1,d=l.length;++p<d;){var h=l[p];if(Object(r.a)(h))try{h.unsubscribe()}catch(n){e=!0,t=t||[],n instanceof a?t=t.concat(c(n.errors)):t.push(n)}}if(e)throw new a(t)}},t.prototype.add=function(e){var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var i=n;(n=new t)._subscriptions=[i]}break;default:if(!e)return t.EMPTY;throw new Error("unrecognized teardown "+e+" added to Subscription.")}if(n._addParent(this)){var r=this._subscriptions;r?r.push(n):this._subscriptions=[n]}return 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;return e!==t&&(e?n?-1===n.indexOf(t)&&(n.push(t),!0):(this._parents=[t],!0):(this._parent=t,!0))},t.EMPTY=((e=new t).closed=!0,e),t}();function c(t){return t.reduce((function(t,e){return t.concat(e instanceof a?e.errors:e)}),[])}},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 a(t,this.project,this.thisArg))},t}(),a=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.__extends(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 i}));var i=Array.isArray||function(t){return t&&"number"==typeof t.length}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(5),r=n(6),o=n(39);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=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.__extends(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)},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(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",(function(){return r}));var r=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){return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg))},t}(),a=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.thisArg=i,r.count=0,r}return i.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var i=n(5),r=n(40),o=n(38),s=n(21);var a=n(12);var u=n(9),c=n(6),l=n(41);var p=n(42);var d=n(37);var h=n(36);function f(t,e){if(!e)return t instanceof i.a?t:new i.a(Object(h.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(d.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(l.a)(t))}(t,e);if(Object(o.a)(t))return Object(u.a)(t,e);if(function(t){return t&&"function"==typeof t[a.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[a.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(p.a)(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(52),o=n(4),s=n(17),a=n(54),u=n(55),c=n(20),l=n(86),p=function(){function t(t){this.http=t,this.cancelEvent=new o.EventEmitter,this.clearEvent=new o.EventEmitter,this.completeEvent=new o.EventEmitter,this.errorEvent=new o.EventEmitter,this.pauseEvent=new o.EventEmitter,this.removeEvent=new o.EventEmitter,this.resumeEvent=new o.EventEmitter,this.selectEvent=new o.EventEmitter,this.successEvent=new o.EventEmitter,this.uploadEvent=new o.EventEmitter,this.uploadProgressEvent=new o.EventEmitter,this.changeEvent=new o.EventEmitter,this.async={autoUpload:!0,batch:!1,chunk:!1,concurrent:!0,removeField:"fileNames",removeHeaders:new r.HttpHeaders,removeMethod:"POST",removeUrl:"",responseType:"json",saveField:"files",saveHeaders:new r.HttpHeaders,saveMethod:"POST",saveUrl:"",withCredentials:!0},this.chunk={autoRetryAfter:100,size:1048576,maxAutoRetries:1,resumable:!0},this.component="Upload",this.chunkMap=new l.ChunkMap,this.fileList=new a.FileMap}return Object.defineProperty(t.prototype,"files",{get:function(){return this.fileList},enumerable:!0,configurable:!0}),t.prototype.setChunkSettings=function(t){!1!==t&&(this.async.chunk=!0,"object"==typeof t&&(this.chunk=Object.assign({},this.chunk,t)))},t.prototype.onChange=function(){var t=this.fileList.filesFlat.filter((function(t){return t.state===s.FileState.Initial||t.state===s.FileState.Uploaded}));this.changeEvent.emit(t.length>0?t:null)},t.prototype.addFiles=function(t){var e=new u.SelectEvent(t);if(this.selectEvent.emit(e),!e.isDefaultPrevented()){for(var n=0,i=t;n<i.length;n++){var r=i[n];this.fileList.add(r)}this.async.autoUpload&&this.uploadFiles()}if("FileSelect"===this.component){var o=this.fileList.filesFlat;this.changeEvent.emit(o.length>0?o:null)}},t.prototype.addInitialFiles=function(t){var e=this;this.fileList.clear(),t.forEach((function(t){var n=c.getInitialFileInfo(t);e.fileList.add(n)}))},t.prototype.addInitialFileSelectFiles=function(t){var e=this;this.fileList.clear(),t.forEach((function(t){t instanceof File?e.fileList.add(c.convertFileToFileInfo(t)):e.fileList.add(c.getInitialFileInfo(t))}))},t.prototype.resumeFile=function(t){var e=this.fileList.get(t);this.resumeEvent.emit(new u.ResumeEvent(e[0])),this.fileList.setFilesStateByUid(t,s.FileState.Uploading),this._uploadFiles([e])},t.prototype.pauseFile=function(t){var e=this.fileList.get(t)[0];this.pauseEvent.emit(new u.PauseEvent(e)),this.fileList.setFilesStateByUid(t,s.FileState.Paused)},t.prototype.removeFiles=function(t){var e=this.fileList.get(t),n=new u.RemoveEvent(e,this.cloneRequestHeaders(this.async.removeHeaders));if(this.removeEvent.emit(n),!n.isDefaultPrevented())if("Upload"!==this.component||e[0].state!==s.FileState.Uploaded&&e[0].state!==s.FileState.Initial){if(this.fileList.remove(t),"FileSelect"===this.component){var i=this.fileList.filesFlat;this.changeEvent.emit(i.length>0?i:null)}}else this.performRemove(e,n)},t.prototype.cancelFiles=function(t){var e=this.fileList.get(t),n=new u.CancelEvent(e);this.cancelEvent.emit(n);for(var i=0,r=e;i<r.length;i++){var o=r[i];o.httpSubscription&&o.httpSubscription.unsubscribe()}this.fileList.remove(t),this.checkAllComplete()},t.prototype.clearFiles=function(){var t=new u.ClearEvent;if(this.clearEvent.emit(t),!t.isDefaultPrevented()){var e=this.fileList.hasFileWithState([s.FileState.Initial,s.FileState.Uploaded]);this.fileList.clear(),e&&this.onChange()}},t.prototype.uploadFiles=function(){var t=[];this.async.concurrent&&(t=this.fileList.filesToUpload),this.async.concurrent||this.fileList.hasFileWithState([s.FileState.Uploading])||(t=this.fileList.firstFileToUpload?[this.fileList.firstFileToUpload]:[]),t&&t.length>0&&this._uploadFiles(t)},t.prototype.retryFiles=function(t){var e=[this.fileList.get(t)];e&&this._uploadFiles(e)},t.prototype._uploadFiles=function(t){for(var e=function(t){if(t[0].state===s.FileState.Paused)return{value:void 0};var e=new u.UploadEvent(t,n.cloneRequestHeaders(n.async.saveHeaders));if(n.uploadEvent.emit(e),e.isDefaultPrevented())n.fileList.remove(t[0].uid);else{n.fileList.setFilesState(t,s.FileState.Uploading);var i=n.performUpload(t,e);t.forEach((function(t){t.httpSubscription=i}))}},n=this,i=0,r=t;i<r.length;i++){var o=e(r[i]);if("object"==typeof o)return o.value}},t.prototype.performRemove=function(t,e){var n=this,i=this.async,o=t.map((function(t){return t.name})),s=this.populateRemoveFormData(o,e.data),a=this.populateRequestOptions(e.headers),u=new r.HttpRequest(i.removeMethod,i.removeUrl,s,a);this.http.request(u).subscribe((function(e){n.onSuccess(e,t,"remove")}),(function(e){n.onError(e,t,"remove")}))},t.prototype.performUpload=function(t,e){var n=this,i=this.async,o=this.populateUploadFormData(t,e.data),s=this.populateRequestOptions(e.headers),a=new r.HttpRequest(i.saveMethod,i.saveUrl,o,s);return this.http.request(a).subscribe((function(e){e.type!==r.HttpEventType.UploadProgress||n.async.chunk?e instanceof r.HttpResponse&&(n.onSuccess(e,t,"upload"),n.checkAllComplete()):n.onProgress(e,t)}),(function(e){n.onError(e,t,"upload"),n.checkAllComplete()}))},t.prototype.onSuccess=function(t,e,n){if("upload"===n&&this.async.chunk){if(this.onChunkProgress(e),!this.isChunkUploadComplete(e[0].uid))return this.updateChunkInfo(e[0].uid),void this._uploadFiles([e]);this.removeChunkInfo(e[0].uid)}var i=new u.SuccessEvent(e,n,t);this.successEvent.emit(i),"upload"===n?this.fileList.setFilesState(e,i.isDefaultPrevented()?s.FileState.Failed:s.FileState.Uploaded):i.isDefaultPrevented()||this.fileList.remove(e[0].uid),i.isDefaultPrevented()||this.onChange()},t.prototype.onError=function(t,e,n){var i=this;if("upload"===n&&this.async.chunk){var r=this.chunk.maxAutoRetries,o=this.chunkMap.get(e[0].uid);if(o.retries<r)return o.retries+=1,void setTimeout((function(){i.retryFiles(e[0].uid)}),this.chunk.autoRetryAfter)}var a=new u.ErrorEvent(e,n,t);this.errorEvent.emit(a),"upload"===n&&this.fileList.setFilesState(e,s.FileState.Failed)},t.prototype.onProgress=function(t,e){var n=Math.round(100*t.loaded/t.total),i=new u.UploadProgressEvent(e,n<100?n:100);this.uploadProgressEvent.emit(i)},t.prototype.onChunkProgress=function(t){var e=this.chunkMap.get(t[0].uid),n=0;e&&(n=e.index===e.totalChunks-1?100:Math.round((e.index+1)/e.totalChunks*100));var i=new u.UploadProgressEvent(t,n<100?n:100);this.uploadProgressEvent.emit(i)},t.prototype.checkAllComplete=function(){!this.fileList.hasFileWithState([s.FileState.Uploading,s.FileState.Paused])&&this.areAllSelectedFilesHandled()?this.completeEvent.emit():this.shouldUploadNextFile()&&this.uploadFiles()},t.prototype.shouldUploadNextFile=function(){return!this.async.concurrent&&this.fileList.hasFileWithState([s.FileState.Selected])&&!this.fileList.hasFileWithState([s.FileState.Uploading])},t.prototype.areAllSelectedFilesHandled=function(){return 0===this.fileList.getFilesWithState(s.FileState.Selected).filter((function(t){return!t.validationErrors})).length},t.prototype.cloneRequestHeaders=function(t){var e={};return t&&t.keys().forEach((function(n){e[n]=t.get(n)})),new r.HttpHeaders(e)},t.prototype.populateRequestOptions=function(t){return{headers:t,reportProgress:!0,responseType:this.async.responseType,withCredentials:this.async.withCredentials}},t.prototype.populateUploadFormData=function(t,e){var n=this.async.saveField,i=new FormData;if(this.populateClientFormData(i,e),this.async.chunk)i.append(n,this.getNextChunk(t[0])),i.append("metadata",this.getChunkMetadata(t[0]));else for(var r=0,o=t;r<o.length;r++){var s=o[r];i.append(n,s.rawFile)}return i},t.prototype.populateRemoveFormData=function(t,e){var n=new FormData;this.populateClientFormData(n,e);for(var i=0,r=t;i<r.length;i++){var o=r[i];n.append(this.async.removeField,o)}return n},t.prototype.populateClientFormData=function(t,e){for(var n in e)e.hasOwnProperty(n)&&t.append(n,e[n])},t.prototype.getNextChunk=function(t){var e=this.getChunkInfo(t),n=e.position+this.chunk.size;return t.rawFile.slice(e.position,n)},t.prototype.getChunkInfo=function(t){var e=this.chunkMap.get(t.uid);if(!e){var n=Math.ceil(t.size/this.chunk.size);e=this.chunkMap.add(t.uid,n)}return e},t.prototype.updateChunkInfo=function(t){var e=this.chunkMap.get(t);e.index<e.totalChunks-1&&(e.index+=1,e.position+=this.chunk.size,e.retries=0)},t.prototype.removeChunkInfo=function(t){this.chunkMap.remove(t)},t.prototype.getChunkMetadata=function(t){var e=this.chunkMap.get(t.uid),n={chunkIndex:e.index,contentType:t.rawFile.type,fileName:t.name,fileSize:t.size,fileUid:t.uid,totalChunks:e.totalChunks};return JSON.stringify(n)},t.prototype.isChunkUploadComplete=function(t){var e=this.chunkMap.get(t);return!!e&&e.index+1===e.totalChunks},t=i.__decorate([o.Injectable(),i.__metadata("design:paramtypes",[r.HttpClient])],t)}();e.UploadService=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(53);e.FileState=i.FileState},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(0),r=n(2),o=n(3),s=n(10),a=n(7),u=n(14);function c(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(i){return i.pipe(c((function(n,i){return Object(u.a)(t(n,i)).pipe(Object(a.a)((function(t,r){return e(n,t,i,r)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new l(t,n))})}var l=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 p(t,this.project,this.concurrent))},t}(),p=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.__extends(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){var i=new s.a(this,void 0,void 0);this.destination.add(i),Object(r.a)(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},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";function i(){}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),r=n(29),o=n(85);e.getTotalFilesSizeMessage=function(t){var e,n=0;if("number"!=typeof t[0].size)return"";for(e=0;e<t.length;e++)t[e].size&&(n+=t[e].size);return(n/=1024)<1024?n.toFixed(2)+" KB":(n/1024).toFixed(2)+" MB"};var s=function(t){var e=t.match(/\.([^\.]+)$/);return e?e[0]:""};e.validateInitialFileInfo=function(t){return!!(t instanceof Object&&t.hasOwnProperty("name"))},e.validateInitialFileSelectFile=function(t){return!!(t instanceof File||e.validateInitialFileInfo(t))},e.getInitialFileInfo=function(t){return t.extension=t.extension||s(t.name),t.name=t.name,t.size=t.size||0,t.hasOwnProperty("state")||(t.state=i.FileState.Initial),t.hasOwnProperty("uid")||(t.uid=r.guid()),t},e.convertFileToFileInfo=function(t){var e=a(t);return e.uid=r.guid(),e.state=i.FileState.Selected,e};var a=function(t){var e=t.name,n=t.size;return{extension:s(e),name:e,rawFile:t,size:n,state:i.FileState.Selected}};e.getAllFileInfo=function(t){var e,n=new Array;for(e=0;e<t.length;e++)n.push(a(t[e]));return n},e.fileHasValidationErrors=function(t){return!!(t.validationErrors&&t.validationErrors.length>0)},e.filesHaveValidationErrors=function(t){for(var n=0,i=t;n<i.length;n++){var r=i[n];if(e.fileHasValidationErrors(r))return!0}return!1},e.inputFiles=function(t){return t.files?e.getAllFileInfo(t.files):t.value.split("|").map((function(t,e){var n,r,o=t.trim();return{extension:s(o),name:(n=o,r=n.lastIndexOf("\\"),-1!==r?n.substr(r+1):n),rawFile:null,size:1e3*(e+1),state:i.FileState.Selected}}))},e.assignGuidToFiles=function(t,e){var n=r.guid();return t.map((function(t){return t.uid=e?r.guid():n,t}))},e.supportsFormData=function(){return"undefined"!=typeof FormData},e.userAgent=function(){return navigator.userAgent};var u=/^(?:a|input|select|textarea|button|object)$/i;e.IGNORE_TARGET_CLASSES="k-icon k-select k-input k-multiselect-wrap",e.UPLOAD_CLASSES="k-upload-button k-clear-selected k-upload-selected k-upload-action";var c=function(t){return String(t).trim().split(" ")};e.hasClasses=function(t,e){var n=c(e);return Boolean(c(t.className).find((function(t){return n.indexOf(t)>=0})))},e.isFocusable=function(t,e){if(void 0===e&&(e=!0),t.tagName){var n=t.tagName.toLowerCase(),i=t.getAttribute("tabIndex"),r=null!==i&&!isNaN(i)&&i>-1;return(u.test(n)?!t.disabled:r)&&(!e||function(t){var e=t.getBoundingClientRect();return!(!e.width||!e.height)&&"hidden"!==window.getComputedStyle(t).visibility}(t))}return!1},e.getFileGroupCssClass=function(t){for(var e in o.fileGroupMap)if(o.fileGroupMap[e].indexOf(t)>=0)return"k-i-file-"+e;return"k-i-file"},e.isPresent=function(t){return null!=t}},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";function i(t){setTimeout((function(){throw t}))}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(16),s=n(29),a=function(){function t(t){this.uploadService=t,this.onActionButtonAction=new r.EventEmitter,this.onActionButtonFocus=new r.EventEmitter,this.onFileAction=new r.EventEmitter,this.onFileFocus=new r.EventEmitter,this.onTab=new r.EventEmitter,this.onWrapperFocus=new r.EventEmitter,this.onSelectButtonFocus=new r.EventEmitter,this.actionButtonsVisible=!1,this.focused=!1,this._focusedIndex=-1}return t.prototype.action=function(t){var e=t.keyCode;return this.keyBindings[e]},t.prototype.process=function(t){var e=this.action(t);e&&e(t.shiftKey)},t.prototype.computeKeys=function(t){var e,n=this;this.keyBindings=((e={})[s.Keys.Enter]=function(){return n.handleEnter()},e[s.Keys.Escape]=function(){return n.handleEscape()},e[s.Keys.Delete]=function(){return n.handleDelete()},e[s.Keys.Tab]=function(t){return n.handleTab(t)},e[s.Keys.ArrowUp]=function(){return n.handleUp()},e[s.Keys.ArrowDown]=function(){return n.handleDown()},e[this.invertKeys(t,s.Keys.ArrowLeft,s.Keys.ArrowRight)]=function(){return n.handleLeft()},e[this.invertKeys(t,s.Keys.ArrowRight,s.Keys.ArrowLeft)]=function(){return n.handleRight()},e)},t.prototype.invertKeys=function(t,e,n){return"rtl"===t?n:e},t.prototype.focusSelectButton=function(){this.focused=!0,this._focusedIndex=-1,this.onSelectButtonFocus.emit()},t.prototype.handleEnter=function(){if(this.lastIndex>=0){if(this.focusedIndex<=this.lastFileIndex)return void this.onFileAction.emit(s.Keys.Enter);this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&this.onActionButtonAction.emit(this.focusedIndex<this.lastIndex?"clear":"upload")}},t.prototype.handleDelete=function(){this.focusedIndex>=0&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(s.Keys.Delete)},t.prototype.handleEscape=function(){this.focusedIndex>=0&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(s.Keys.Escape)},t.prototype.handleLeft=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex&&(this.focusedIndex-=1,this.onActionButtonFocus.emit("clear"))},t.prototype.handleRight=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex-1&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("upload"))},t.prototype.handleTab=function(t){this.focusedIndex>=0&&t?this.focusedIndex=-1:this.onTab.emit()},t.prototype.handleDown=function(){if(this.lastIndex>=0&&this.focusedIndex<this.lastIndex){if(this.focusedIndex<this.lastFileIndex)return this.focusedIndex+=1,void this.onFileFocus.emit(this.focusedIndex);this.actionButtonsVisible&&this.focusedIndex===this.lastFileIndex&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("clear"))}},t.prototype.handleUp=function(){if(this.lastIndex>=0&&this.focusedIndex>-1){if(this.focusedIndex-=1,-1===this.focusedIndex)return void this.onSelectButtonFocus.emit();if(this.focusedIndex<=this.lastFileIndex)return void this.onFileFocus.emit(this.focusedIndex);this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&(this.focusedIndex=this.lastFileIndex,this.onFileFocus.emit(this.focusedIndex))}},Object.defineProperty(t.prototype,"focusedIndex",{get:function(){return this._focusedIndex},set:function(t){this.focused||this.onWrapperFocus.emit(),this._focusedIndex=t,this.focused=!0,this._focusedIndex>=0&&this._focusedIndex<=this.lastFileIndex&&this.onFileFocus.emit(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastFileIndex",{get:function(){return this.actionButtonsVisible?this.lastIndex-2:this.lastIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastIndex",{get:function(){var t=this.uploadService.files.count;return this.actionButtonsVisible?t+1:t-1},enumerable:!0,configurable:!0}),t=i.__decorate([r.Injectable(),i.__metadata("design:paramtypes",[o.UploadService])],t)}();e.NavigationService=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=function(){function t(t){this.templateRef=t}return t=i.__decorate([r.Directive({selector:"[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]"}),i.__metadata("design:paramtypes",[r.TemplateRef])],t)}();e.FileInfoTemplateDirective=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.d(e,"a",(function(){return i}))},function(t,e){t.exports=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(11),r=n(22),o={closed:!0,next:function(t){},error:function(t){if(i.a.useDeprecatedSynchronousErrorHandling)throw t;Object(r.a)(t)},complete:function(){}}},function(t,e){t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.prevented=!1}return t.prototype.preventDefault=function(){this.prevented=!0},t.prototype.isDefaultPrevented=function(){return this.prevented},t}();e.PreventableEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=function(){function t(t){this.templateRef=t}return t=i.__decorate([r.Directive({selector:"[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]"}),i.__metadata("design:paramtypes",[r.TemplateRef])],t)}();e.FileTemplateDirective=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(18);function r(t,e){return Object(i.a)(t,e,1)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var i=n(19);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){t.exports=o},function(t,e,n){"use strict";function i(t){return null!==t&&"object"==typeof t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n(5),r=n(39),o=n(41),s=n(42),a=n(37),u=n(38),c=n(40),l=n(35),p=n(12),d=n(21),h=function(t){if(t instanceof i.a)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[d.a])return Object(a.a)(t);if(Object(u.a)(t))return Object(r.a)(t);if(Object(c.a)(t))return Object(o.a)(t);if(t&&"function"==typeof t[p.a])return Object(s.a)(t);var e=Object(l.a)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(21),r=function(t){return function(e){var n=t[i.a]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){return function(e){for(var n=0,i=t.length;n<i&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()}}},function(t,e,n){"use strict";function i(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(22),r=function(t){return function(e){return t.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,i.a),e}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(12),r=function(t){return function(e){for(var n=t[i.a]();;){var r=n.next();if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o={},s=function(){function t(){}return t.prototype.addComponent=function(t,e){this.has(e)?o[e].push(t):o[e]=[t]},t.prototype.getComponents=function(t){return o[t]},t.prototype.has=function(t){return t in o},t=i.__decorate([r.Injectable()],t)}();e.DropZoneService=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INVALIDMAXFILESIZE="invalidMaxFileSize",e.INVALIDMINFILESIZE="invalidMinFileSize",e.INVALIDFILEEXTENSION="invalidFileExtension";var i=function(t,n){n.length>0&&n.indexOf(t.extension.toLowerCase())<0&&(t.validationErrors=t.validationErrors||[],t.validationErrors.indexOf(e.INVALIDFILEEXTENSION)<0&&t.validationErrors.push(e.INVALIDFILEEXTENSION))},r=function(t,n,i){0!==n&&t.size<n&&(t.validationErrors=t.validationErrors||[],t.validationErrors.indexOf(e.INVALIDMINFILESIZE)<0&&t.validationErrors.push(e.INVALIDMINFILESIZE)),0!==i&&t.size>i&&(t.validationErrors=t.validationErrors||[],t.validationErrors.indexOf(e.INVALIDMAXFILESIZE)<0&&t.validationErrors.push(e.INVALIDMAXFILESIZE))};e.validateFiles=function(t,e){var n,o=e.allowedExtensions.map((function(t){return("."===t.substring(0,1)?t:"."+t).toLowerCase()})),s=e.maxFileSize,a=e.minFileSize;for(n=0;n<t.length;n++)i(t[n],o),r(t[n],a,s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(52),o=n(4),s=n(49),a=n(29),u=n(15),c=n(27),l=n(46),p=n(50),d=n(51),h=n(17),f=n(23),v=n(31),b=n(16),y=n(20),m=n(43),_=n(24);e.UPLOAD_VALUE_ACCESSOR={multi:!0,provide:s.NG_VALUE_ACCESSOR,useExisting:o.forwardRef((function(){return g}))};var g=function(){function t(t,e,n,i,r,s,u,c){var l=this;this.uploadService=t,this.localization=e,this.navigation=n,this.dropZoneService=i,this._ngZone=r,this.renderer=s,this.cdr=u,this.chunkable=!1,this.multiple=!0,this.disabled=!1,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+a.guid(),this.actionsLayout="end",this.onBlur=new o.EventEmitter,this.cancel=new o.EventEmitter,this.clear=new o.EventEmitter,this.complete=new o.EventEmitter,this.error=new o.EventEmitter,this.onFocus=new o.EventEmitter,this.pause=new o.EventEmitter,this.remove=new o.EventEmitter,this.resume=new o.EventEmitter,this.select=new o.EventEmitter,this.success=new o.EventEmitter,this.upload=new o.EventEmitter,this.uploadProgress=new o.EventEmitter,this.valueChange=new o.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(t){},this.onChangeCallback=function(t){},p.validatePackage(d.packageMetadata),this.fileList=this.uploadService.files,this.localizationChangeSubscription=e.changes.subscribe((function(t){var e=t.rtl;l.direction=e?"rtl":"ltr",l.navigation.computeKeys(l.direction)})),this.direction=e.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.wrapper=c.nativeElement,this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers()}var n;return n=t,Object.defineProperty(t.prototype,"autoUpload",{get:function(){return this.uploadService.async.autoUpload},set:function(t){this.uploadService.async.autoUpload=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"batch",{get:function(){return this.uploadService.async.batch},set:function(t){this.uploadService.async.batch=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"withCredentials",{get:function(){return this.uploadService.async.withCredentials},set:function(t){this.uploadService.async.withCredentials=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"saveField",{get:function(){return this.uploadService.async.saveField},set:function(t){this.uploadService.async.saveField=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"saveHeaders",{get:function(){return this.uploadService.async.saveHeaders},set:function(t){this.uploadService.async.saveHeaders=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"saveMethod",{get:function(){return this.uploadService.async.saveMethod},set:function(t){this.uploadService.async.saveMethod=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"saveUrl",{get:function(){return this.uploadService.async.saveUrl},set:function(t){this.uploadService.async.saveUrl=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"responseType",{get:function(){return this.uploadService.async.responseType},set:function(t){this.uploadService.async.responseType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"removeField",{get:function(){return this.uploadService.async.removeField},set:function(t){this.uploadService.async.removeField=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"removeHeaders",{get:function(){return this.uploadService.async.removeHeaders},set:function(t){this.uploadService.async.removeHeaders=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"removeMethod",{get:function(){return this.uploadService.async.removeMethod},set:function(t){this.uploadService.async.removeMethod=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"removeUrl",{get:function(){return this.uploadService.async.removeUrl},set:function(t){this.uploadService.async.removeUrl=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"concurrent",{get:function(){return this.uploadService.async.concurrent},set:function(t){this.uploadService.async.concurrent=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return this.tabindex},set:function(t){this.tabindex=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"restrictions",{get:function(){return this._restrictions},set:function(t){var e=Object.assign({},this._restrictions,t);this._restrictions=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.verifySettings(),this.renderer.removeAttribute(this.wrapper,"tabindex"),this.uploadService.setChunkSettings(this.chunkable),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},t.prototype.ngOnChanges=function(t){if(a.isChanged("chunkable",t)){var e=t.chunkable.currentValue;"boolean"==typeof e&&(this.uploadService.async.chunk=e),"object"==typeof e&&null!==e&&(this.uploadService.async.chunk=!0,this.uploadService.chunk=Object.assign({},this.uploadService.chunk,e))}},t.prototype.ngOnDestroy=function(){this.fileList.clear(),this.blurSubscription&&this.blurSubscription.unsubscribe(),this.wrapperFocusSubscription&&this.wrapperFocusSubscription.unsubscribe(),this.selectButtonFocusSubscription&&this.selectButtonFocusSubscription.unsubscribe(),this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe(),this.subs&&this.subs.unsubscribe()},t.prototype.handleKeydown=function(t){if(!this.disabled)return t.keyCode!==a.Keys.Enter&&t.keyCode!==a.Keys.Space||t.target!==this.fileSelectButton.nativeElement?void((y.hasClasses(t.target,y.UPLOAD_CLASSES)||!y.isFocusable(t.target)&&!y.hasClasses(t.target,y.IGNORE_TARGET_CLASSES))&&this.navigation.process(t)):(t.preventDefault(),void this.fileSelect.nativeElement.click())},t.prototype.writeValue=function(t){var e=!0;t instanceof Array&&(t.forEach((function(t){y.validateInitialFileInfo(t)||(e=!1)})),e&&this.uploadService.addInitialFiles(t)),null===t&&this.fileList.clear(),this.cdr.markForCheck()},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.setDisabledState=function(t){this.disabled=t},Object.defineProperty(t.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabIndex},enumerable:!0,configurable:!0}),t.prototype.onFileSelectButtonFocus=function(t){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-focus"),this.navigation.focused||(this.navigation.focusedIndex=-1)},t.prototype.onFileSelectButtonBlur=function(t){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-focus")},Object.defineProperty(t.prototype,"showActionButtons",{get:function(){var t=!1;if(!this.autoUpload){var e=this.fileList.filesToUpload.length>0,n=this.fileList.hasFileWithState([h.FileState.Uploading]);this.concurrent&&e&&(t=!0),this.concurrent||!e||n||(t=!0)}return this.navigation.actionButtonsVisible=t,t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showTotalStatus",{get:function(){var t=[h.FileState.Uploaded,h.FileState.Uploading,h.FileState.Failed,h.FileState.Paused];return!!this.fileList.hasFileWithState(t)},enumerable:!0,configurable:!0}),t.prototype.textFor=function(t){return this.localization.get(t)},t.prototype.focus=function(){var t=this;setTimeout((function(){t.fileSelectButton.nativeElement.focus()}))},t.prototype.focusComponent=function(){this.focus()},t.prototype.blur=function(){this.navigation.focused&&(this.navigation.focused=!1,document.activeElement.blur(),this.onBlur.emit())},t.prototype.blurComponent=function(){this.blur()},t.prototype.pauseFileByUid=function(t){this.uploadService.pauseFile(t)},t.prototype.resumeFileByUid=function(t){this.uploadService.resumeFile(t)},t.prototype.removeFilesByUid=function(t){this.uploadService.removeFiles(t)},t.prototype.retryUploadByUid=function(t){this.uploadService.retryFiles(t)},t.prototype.cancelUploadByUid=function(t){this.uploadService.cancelFiles(t)},t.prototype.uploadFiles=function(){this.fileList.filesToUpload.length&&this.uploadService.uploadFiles()},t.prototype.clearFiles=function(){this.uploadService.clearFiles()},t.prototype.addFiles=function(t){this.uploadService.addFiles(t)},t.prototype.isEmpty=function(){return!1},t.prototype.verifySettings=function(){if(o.isDevMode()&&this.batch&&!1!==this.chunkable)throw new Error("The file chunking functionality requires the batch setting to be disabled.")},t.prototype.subscribeBlur=function(){var t=this;a.isDocumentAvailable()&&this._ngZone.runOutsideAngular((function(){t.documentClick=c.fromEvent(document,"click").pipe(l.filter((function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))}))),t.blurSubscription=c.merge(t.documentClick,t.navigation.onTab).subscribe((function(){t.navigation.focused&&t._ngZone.run((function(){t.navigation.focused=!1,t.onTouchedCallback(),t.onBlur.emit()}))}))}))},t.prototype.subscribeFocus=function(){var t=this;this.wrapperFocusSubscription=this.navigation.onWrapperFocus.subscribe((function(){t.onFocus.emit()})),this.selectButtonFocusSubscription=this.navigation.onSelectButtonFocus.subscribe((function(){t.fileSelectButton.nativeElement.focus()}))},t.prototype.attachEventHandlers=function(){var t=this;this.subs=this.uploadService.cancelEvent.subscribe((function(e){t.cancel.emit(e)})),this.subs.add(this.uploadService.changeEvent.subscribe((function(e){t.onChangeCallback(e),t.valueChange.emit(e)}))),this.subs.add(this.uploadService.clearEvent.subscribe((function(e){t.clear.emit(e)}))),this.subs.add(this.uploadService.completeEvent.subscribe((function(){t.complete.emit()}))),this.subs.add(this.uploadService.errorEvent.subscribe((function(e){t.error.emit(e)}))),this.subs.add(this.uploadService.pauseEvent.subscribe((function(e){t.pause.emit(e)}))),this.subs.add(this.uploadService.removeEvent.subscribe((function(e){t.remove.emit(e)}))),this.subs.add(this.uploadService.resumeEvent.subscribe((function(e){t.resume.emit(e)}))),this.subs.add(this.uploadService.selectEvent.subscribe((function(e){t.select.emit(e)}))),this.subs.add(this.uploadService.successEvent.subscribe((function(e){t.success.emit(e)}))),this.subs.add(this.uploadService.uploadEvent.subscribe((function(e){t.upload.emit(e)}))),this.subs.add(this.uploadService.uploadProgressEvent.subscribe((function(e){t.uploadProgress.emit(e)})))},i.__decorate([o.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"autoUpload",null),i.__decorate([o.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"batch",null),i.__decorate([o.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"withCredentials",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"saveField",null),i.__decorate([o.Input(),i.__metadata("design:type",r.HttpHeaders),i.__metadata("design:paramtypes",[r.HttpHeaders])],t.prototype,"saveHeaders",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"saveMethod",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"saveUrl",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"responseType",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"removeField",null),i.__decorate([o.Input(),i.__metadata("design:type",r.HttpHeaders),i.__metadata("design:paramtypes",[r.HttpHeaders])],t.prototype,"removeHeaders",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"removeMethod",null),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"removeUrl",null),i.__decorate([o.Input(),i.__metadata("design:type",Object)],t.prototype,"chunkable",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"concurrent",null),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],t.prototype,"multiple",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],t.prototype,"showFileList",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Number)],t.prototype,"tabindex",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"zoneId",void 0),i.__decorate([o.Input("tabIndex"),i.__metadata("design:type",Number),i.__metadata("design:paramtypes",[Number])],t.prototype,"tabIndex",null),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"accept",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],t.prototype,"restrictions",null),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"focusableId",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"actionsLayout",void 0),i.__decorate([o.ContentChild(v.FileTemplateDirective,{static:!1}),i.__metadata("design:type",v.FileTemplateDirective)],t.prototype,"fileTemplate",void 0),i.__decorate([o.ContentChild(_.FileInfoTemplateDirective,{static:!1}),i.__metadata("design:type",_.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),i.__decorate([o.ViewChild("fileSelect",{static:!0}),i.__metadata("design:type",o.ElementRef)],t.prototype,"fileSelect",void 0),i.__decorate([o.ViewChild("fileSelectButton",{static:!0}),i.__metadata("design:type",o.ElementRef)],t.prototype,"fileSelectButton",void 0),i.__decorate([o.Output("blur"),i.__metadata("design:type",o.EventEmitter)],t.prototype,"onBlur",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"cancel",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"clear",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"complete",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"error",void 0),i.__decorate([o.Output("focus"),i.__metadata("design:type",o.EventEmitter)],t.prototype,"onFocus",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"pause",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"remove",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"resume",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"select",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"success",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"upload",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"uploadProgress",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],t.prototype,"valueChange",void 0),i.__decorate([o.HostBinding("class.k-widget"),o.HostBinding("class.k-upload"),i.__metadata("design:type",Boolean)],t.prototype,"hostDefaultClasses",void 0),i.__decorate([o.HostBinding("class.k-disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"hostDisabledClass",null),i.__decorate([o.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"dir",null),i.__decorate([o.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleKeydown",null),t=n=i.__decorate([o.Component({exportAs:"kendoUpload",providers:[u.LocalizationService,f.NavigationService,b.UploadService,m.DropZoneService,e.UPLOAD_VALUE_ACCESSOR,{provide:u.L10N_PREFIX,useValue:"kendo.upload"},{provide:a.KendoInput,useExisting:o.forwardRef((function(){return n}))}],selector:"kendo-upload",template:'\n <ng-container kendoUploadLocalizedMessages\n i18n-cancel="kendo.upload.cancel|The text for the Cancel button"\n cancel="Cancel"\n\n i18n-clearSelectedFiles="kendo.upload.clearSelectedFiles|The text for the Clear button"\n clearSelectedFiles="Clear"\n\n i18n-dropFilesHere="kendo.upload.dropFilesHere|The drop zone hint"\n dropFilesHere="Drop files here to upload"\n\n i18n-filesBatchStatus="kendo.upload.filesBatchStatus|The status message for a batch of files"\n filesBatchStatus="files"\n\n i18n-filesBatchStatusFailed="kendo.upload.filesBatchStatusFailed|The status message for a batch of files after failed upload"\n filesBatchStatusFailed="files failed to upload."\n\n i18n-filesBatchStatusUploaded="kendo.upload.filesBatchStatusUploaded|The status message for a batch of files after successful upload"\n filesBatchStatusUploaded="files successfully uploaded."\n\n i18n-fileStatusFailed="kendo.upload.fileStatusFailed|The file status message after failed upload"\n fileStatusFailed="File failed to upload."\n\n i18n-fileStatusUploaded="kendo.upload.fileStatusUploaded|The file status message after successful upload"\n fileStatusUploaded="File successfully uploaded."\n\n i18n-headerStatusPaused="kendo.upload.headerStatusPaused|The header status message when the file upload is paused"\n headerStatusPaused="Paused"\n\n i18n-headerStatusUploaded="kendo.upload.headerStatusUploaded|The header status message after file upload completion"\n headerStatusUploaded="Done"\n\n i18n-headerStatusUploading="kendo.upload.headerStatusUploading|The header status message during file upload"\n headerStatusUploading="Uploading..."\n\n i18n-invalidFileExtension="kendo.upload.invalidFileExtension|The text for the invalid allowed extensions restriction message"\n invalidFileExtension="File type not allowed."\n\n i18n-invalidMaxFileSize="kendo.upload.invalidMaxFileSize|The text for the invalid max file size restriction message"\n invalidMaxFileSize="File size too large."\n\n i18n-invalidMinFileSize="kendo.upload.invalidMinFileSize|The text for the invalid min file size restriction message"\n invalidMinFileSize="File size too small."\n\n i18n-pause="kendo.upload.pause|The text for the Pause button"\n pause="Pause"\n\n i18n-remove="kendo.upload.remove|The text for the Remove button"\n remove="Remove"\n\n i18n-resume="kendo.upload.resume|The text for the Resume button"\n resume="Resume"\n\n i18n-retry="kendo.upload.retry|The text for the Retry button"\n retry="Retry"\n\n i18n-select="kendo.upload.select|The text for the Select button"\n select="Select files..."\n\n i18n-uploadSelectedFiles="kendo.upload.uploadSelectedFiles|The text for the Upload files button"\n uploadSelectedFiles="Upload"\n >\n </ng-container>\n <div kendoUploadInternalDropZone\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled">\n <div role="button" #fileSelectButton\n [id]="focusableId"\n [attr.aria-label]="textFor(\'select\')"\n [attr.tabindex]="selectButtonTabIndex"\n (focus)="onFileSelectButtonFocus($event)"\n (blur)="onFileSelectButtonBlur($event)"\n class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-upload-button">\n <input #fileSelect kendoFileSelect\n [attr.accept]="accept ? accept : null"\n [attr.aria-hidden]="true"\n [dir]="direction"\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled" />\n <span>{{textFor(\'select\')}}</span>\n </div>\n <kendo-upload-status-total *ngIf="showTotalStatus"\n class="k-upload-status k-upload-status-total"\n [fileList]="fileList">\n </kendo-upload-status-total>\n <div class="k-dropzone-hint">{{textFor(\'dropFilesHere\')}}</div>\n </div>\n <ul kendo-upload-file-list *ngIf="showFileList && fileList.count > 0"\n class="k-upload-files k-reset"\n [disabled]="disabled"\n [fileList]="fileList.files"\n [fileTemplate]="fileTemplate"\n [fileInfoTemplate]="fileInfoTemplate">\n </ul>\n <kendo-upload-action-buttons\n *ngIf="showActionButtons"\n [disabled]="disabled"\n [actionsLayout]="actionsLayout">\n </kendo-upload-action-buttons>\n '}),i.__metadata("design:paramtypes",[b.UploadService,u.LocalizationService,f.NavigationService,m.DropZoneService,o.NgZone,o.Renderer2,o.ChangeDetectorRef,o.ElementRef])],t)}();e.UploadComponent=g},function(t,e,n){"use strict";n.r(e),n.d(e,"audit",(function(){return s})),n.d(e,"auditTime",(function(){return _})),n.d(e,"buffer",(function(){return g})),n.d(e,"bufferCount",(function(){return E})),n.d(e,"bufferTime",(function(){return O})),n.d(e,"bufferToggle",(function(){return U})),n.d(e,"bufferWhen",(function(){return L})),n.d(e,"catchError",(function(){return V})),n.d(e,"combineAll",(function(){return Y})),n.d(e,"combineLatest",(function(){return J})),n.d(e,"concat",(function(){return at})),n.d(e,"concatAll",(function(){return ot})),n.d(e,"concatMap",(function(){return ut.a})),n.d(e,"concatMapTo",(function(){return ct})),n.d(e,"count",(function(){return lt})),n.d(e,"debounce",(function(){return ht})),n.d(e,"debounceTime",(function(){return bt})),n.d(e,"defaultIfEmpty",(function(){return gt})),n.d(e,"delay",(function(){return Ot})),n.d(e,"delayWhen",(function(){return Pt})),n.d(e,"dematerialize",(function(){return At})),n.d(e,"distinct",(function(){return zt})),n.d(e,"distinctUntilChanged",(function(){return Ht})),n.d(e,"distinctUntilKeyChanged",(function(){return qt})),n.d(e,"elementAt",(function(){return ue})),n.d(e,"endWith",(function(){return ce})),n.d(e,"every",(function(){return le})),n.d(e,"exhaust",(function(){return he})),n.d(e,"exhaustMap",(function(){return ye})),n.d(e,"expand",(function(){return ge})),n.d(e,"filter",(function(){return Yt.a})),n.d(e,"finalize",(function(){return we})),n.d(e,"find",(function(){return Ie})),n.d(e,"findIndex",(function(){return ke})),n.d(e,"first",(function(){return je})),n.d(e,"groupBy",(function(){return Le})),n.d(e,"ignoreElements",(function(){return We})),n.d(e,"isEmpty",(function(){return Ze})),n.d(e,"last",(function(){return Qe})),n.d(e,"map",(function(){return be.a})),n.d(e,"mapTo",(function(){return tn})),n.d(e,"materialize",(function(){return rn})),n.d(e,"max",(function(){return dn})),n.d(e,"merge",(function(){return fn})),n.d(e,"mergeAll",(function(){return rt})),n.d(e,"mergeMap",(function(){return nt.a})),n.d(e,"flatMap",(function(){return nt.a})),n.d(e,"mergeMapTo",(function(){return vn})),n.d(e,"mergeScan",(function(){return bn})),n.d(e,"min",(function(){return _n})),n.d(e,"multicast",(function(){return In})),n.d(e,"observeOn",(function(){return On})),n.d(e,"onErrorResumeNext",(function(){return Pn})),n.d(e,"pairwise",(function(){return Un})),n.d(e,"partition",(function(){return Mn})),n.d(e,"pluck",(function(){return zn})),n.d(e,"publish",(function(){return Vn})),n.d(e,"publishBehavior",(function(){return Wn})),n.d(e,"publishLast",(function(){return qn})),n.d(e,"publishReplay",(function(){return Jn})),n.d(e,"race",(function(){return ei})),n.d(e,"reduce",(function(){return pn})),n.d(e,"repeat",(function(){return ni})),n.d(e,"repeatWhen",(function(){return oi})),n.d(e,"retry",(function(){return ui})),n.d(e,"retryWhen",(function(){return pi})),n.d(e,"refCount",(function(){return gn})),n.d(e,"sample",(function(){return fi})),n.d(e,"sampleTime",(function(){return yi})),n.d(e,"scan",(function(){return an})),n.d(e,"sequenceEqual",(function(){return Si})),n.d(e,"share",(function(){return Ii})),n.d(e,"shareReplay",(function(){return Ci})),n.d(e,"single",(function(){return Oi})),n.d(e,"skip",(function(){return Ti})),n.d(e,"skipLast",(function(){return Ni})),n.d(e,"skipUntil",(function(){return Ai})),n.d(e,"skipWhile",(function(){return zi})),n.d(e,"startWith",(function(){return Hi})),n.d(e,"subscribeOn",(function(){return Ji})),n.d(e,"switchAll",(function(){return nr})),n.d(e,"switchMap",(function(){return Qi})),n.d(e,"switchMapTo",(function(){return ir})),n.d(e,"take",(function(){return oe})),n.d(e,"takeLast",(function(){return Xe})),n.d(e,"takeUntil",(function(){return rr})),n.d(e,"takeWhile",(function(){return ar})),n.d(e,"tap",(function(){return $t})),n.d(e,"throttle",(function(){return pr})),n.d(e,"throttleTime",(function(){return fr})),n.d(e,"throwIfEmpty",(function(){return ie})),n.d(e,"timeInterval",(function(){return mr})),n.d(e,"timeout",(function(){return Fr})),n.d(e,"timeoutWith",(function(){return xr})),n.d(e,"timestamp",(function(){return Ir})),n.d(e,"toArray",(function(){return kr})),n.d(e,"window",(function(){return jr})),n.d(e,"windowCount",(function(){return Br})),n.d(e,"windowTime",(function(){return Dr})),n.d(e,"windowToggle",(function(){return Hr})),n.d(e,"windowWhen",(function(){return qr})),n.d(e,"withLatestFrom",(function(){return Yr})),n.d(e,"zip",(function(){return oo})),n.d(e,"zipAll",(function(){return so}));var i=n(0),r=n(3),o=n(2);function s(t){return function(e){return e.lift(new a(t))}}var a=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.durationSelector))},t}(),u=function(t){function e(e,n){var i=t.call(this,e)||this;return i.durationSelector=n,i.hasValue=!1,i}return i.__extends(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=Object(o.a)(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,i){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(r.a),c=n(6),l=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.__extends(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}(function(t){function e(e,n){return t.call(this)||this}return i.__extends(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(c.a)),p=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}(),d=function(t){function e(n,i){void 0===i&&(i=p.now);var r=t.call(this,n,(function(){return e.delegate&&e.delegate!==r?e.delegate.now():i()}))||this;return r.actions=[],r.active=!1,r.scheduled=void 0,r}return i.__extends(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}(p),h=new d(l),f=n(5),v=n(8);function b(t){return!Object(v.a)(t)&&t-parseFloat(t)+1>=0}function y(t){return t&&"function"==typeof t.schedule}function m(t){var e=t.index,n=t.period,i=t.subscriber;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function _(t,e){return void 0===e&&(e=h),s((function(){return function(t,e,n){void 0===t&&(t=0);var i=-1;return b(e)?i=Number(e)<1?1:Number(e):y(e)&&(n=e),y(n)||(n=h),new f.a((function(e){var r=b(t)?t:+t-n.now();return n.schedule(m,r,{index:0,period:i,subscriber:e})}))}(t,e)}))}function g(t){return function(e){return e.lift(new S(t))}}var S=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new x(t,this.closingNotifier))},t}(),x=function(t){function e(e,n){var i=t.call(this,e)||this;return i.buffer=[],i.add(Object(o.a)(i,n)),i}return i.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,e,n,i,r){var o=this.buffer;this.buffer=[],this.destination.next(o)},e}(r.a),w=n(1);function E(t,e){return void 0===e&&(e=null),function(n){return n.lift(new F(t,e))}}var F=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?C:I}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),I=function(t){function e(e,n){var i=t.call(this,e)||this;return i.bufferSize=n,i.buffer=[],i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(w.a),C=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.bufferSize=n,r.startBufferEvery=i,r.buffers=[],r.count=0,r}return i.__extends(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,i=this.buffers,r=this.count;this.count++,r%n==0&&i.push([]);for(var o=i.length;o--;){var s=i[o];s.push(t),s.length===e&&(i.splice(o,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var i=e.shift();i.length>0&&n.next(i)}t.prototype._complete.call(this)},e}(w.a);function O(t){var e=arguments.length,n=h;y(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var i=null;e>=2&&(i=arguments[1]);var r=Number.POSITIVE_INFINITY;return e>=3&&(r=arguments[2]),function(e){return e.lift(new k(t,i,r,n))}}var k=function(){function t(t,e,n,i){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new T(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),j=function(){return function(){this.buffer=[]}}(),T=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=i,s.maxBufferSize=r,s.scheduler=o,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==i||i<0,s.timespanOnly){var u={subscriber:s,context:a,bufferTimeSpan:n};s.add(a.closeAction=o.schedule(P,n,u))}else{var c={subscriber:s,context:a},l={bufferTimeSpan:n,bufferCreationInterval:i,subscriber:s,scheduler:o};s.add(a.closeAction=o.schedule(N,n,c)),s.add(o.schedule(B,i,l))}return s}return i.__extends(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,i=n.length,r=0;r<i;r++){var o=n[r],s=o.buffer;s.push(t),s.length==this.maxBufferSize&&(e=o)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var i=e.shift();n.next(i.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,i={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(P,n,i))}},e.prototype.openContext=function(){var t=new j;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(w.a);function P(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function B(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,i=t.subscriber,r=t.scheduler,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(N,n,{subscriber:i,context:o})),this.schedule(t,e))}function N(t){var e=t.subscriber,n=t.context;e.closeContext(n)}function U(t,e){return function(n){return n.lift(new D(t,e))}}var D=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new A(t,this.openings,this.closingSelector))},t}(),A=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.openings=n,r.closingSelector=i,r.contexts=[],r.add(Object(o.a)(r,n)),r}return i.__extends(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,i=0;i<n;i++)e[i].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var i=n.shift();i.subscription.unsubscribe(),i.buffer=null,i.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,i,r){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,i=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(i),i.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new c.a,i={buffer:[],subscription:n};e.push(i);var r=Object(o.a)(this,t,i);!r||r.closed?this.closeBuffer(i):(r.context=i,this.add(r),n.add(r))},e}(r.a);function L(t){return function(e){return e.lift(new M(t))}}var M=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new z(t,this.closingSelector))},t}(),z=function(t){function e(e,n){var i=t.call(this,e)||this;return i.closingSelector=n,i.subscribing=!1,i.openBuffer(),i}return i.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,e,n,i,r){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new c.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(o.a)(this,e)),this.subscribing=!1},e}(r.a),R=n(10);function V(t){return function(e){var n=new H(t),i=e.lift(n);return n.caught=i}}var H=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new W(t,this.selector,this.caught))},t}(),W=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.selector=n,r.caught=i,r}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var i=new R.a(this,void 0,void 0);this.add(i),Object(o.a)(this,n,void 0,void 0,i)}},e}(r.a),K=n(9),q={};var Z=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new G(t,this.resultSelector))},t}(),G=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.__extends(e,t),e.prototype._next=function(t){this.values.push(q),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(o.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],a=this.toRespond?s===q?--this.toRespond:this.toRespond:0;o[n]=e,0===a&&(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}(r.a);function Y(t){return function(e){return e.lift(new Z(t))}}var X=n(14);function J(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(v.a)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(Object(X.a)([e].concat(t)),new Z(n))}}var $=new f.a((function(t){return t.complete()}));function Q(t){return t?function(t){return new f.a((function(e){return t.schedule((function(){return e.complete()}))}))}(t):$}function tt(t){var e=new f.a((function(e){e.next(t),e.complete()}));return e._isScalar=!0,e.value=t,e}function et(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];switch(y(n)?t.pop():n=void 0,t.length){case 0:return Q(n);case 1:return n?Object(K.a)(t,n):tt(t[0]);default:return Object(K.a)(t,n)}}var nt=n(18);function it(t){return t}function rt(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(nt.a)(it,t)}function ot(){return rt(1)}function st(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return ot()(et.apply(void 0,t))}function at(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(st.apply(void 0,[e].concat(t)))}}var ut=n(32);function ct(t,e){return Object(ut.a)((function(){return t}),e)}function lt(t){return function(e){return e.lift(new pt(t,e))}}var pt=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new dt(t,this.predicate,this.source))},t}(),dt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.source=i,r.count=0,r.index=0,r}return i.__extends(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(w.a);function ht(t){return function(e){return e.lift(new ft(t))}}var ft=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new vt(t,this.durationSelector))},t}(),vt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.durationSelector=n,i.hasValue=!1,i.durationSubscription=null,i}return i.__extends(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=Object(o.a)(this,e))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,e,n,i,r){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=null,n.unsubscribe(),this.remove(n)),this.value=null,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(r.a);function bt(t,e){return void 0===e&&(e=h),function(n){return n.lift(new yt(t,e))}}var yt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new mt(t,this.dueTime,this.scheduler))},t}(),mt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.dueTime=n,r.scheduler=i,r.debouncedSubscription=null,r.lastValue=null,r.hasValue=!1,r}return i.__extends(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(_t,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(w.a);function _t(t){t.debouncedNext()}function gt(t){return void 0===t&&(t=null),function(e){return e.lift(new xt(t))}}var St,xt=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new wt(t,this.defaultValue))},t}(),wt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.defaultValue=n,i.isEmpty=!0,i}return i.__extends(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(w.a);function Et(t){return t instanceof Date&&!isNaN(+t)}function Ft(t,e){return e?new f.a((function(n){return e.schedule(It,0,{error:t,subscriber:n})})):new f.a((function(e){return e.error(t)}))}function It(t){var e=t.error;t.subscriber.error(e)}St||(St={});var Ct=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 et(this.value);case"E":return Ft(this.error);case"C":return Q()}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 Ot(t,e){void 0===e&&(e=h);var n=Et(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new kt(n,e))}}var kt=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new jt(t,this.delay,this.scheduler))},t}(),jt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.delay=n,r.scheduler=i,r.queue=[],r.active=!1,r.errored=!1,r}return i.__extends(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,i=t.scheduler,r=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var o=Math.max(0,n[0].time-i.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new Tt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(Ct.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(Ct.createComplete()),this.unsubscribe()},e}(w.a),Tt=function(){return function(t,e){this.time=t,this.notification=e}}();function Pt(t,e){return e?function(n){return new Ut(n,e).lift(new Bt(t))}:function(e){return e.lift(new Bt(t))}}var Bt=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Nt(t,this.delayDurationSelector))},t}(),Nt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.delayDurationSelector=n,i.completed=!1,i.delayNotifierSubscriptions=[],i.index=0,i}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(t),this.removeSubscription(r),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=Object(o.a)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(r.a),Ut=function(t){function e(e,n){var i=t.call(this)||this;return i.source=e,i.subscriptionDelay=n,i}return i.__extends(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new Dt(t,this.source))},e}(f.a),Dt=function(t){function e(e,n){var i=t.call(this)||this;return i.parent=e,i.source=n,i.sourceSubscribed=!1,i}return i.__extends(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(w.a);function At(){return function(t){return t.lift(new Lt)}}var Lt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Mt(t))},t}(),Mt=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(w.a);function zt(t,e){return function(n){return n.lift(new Rt(t,e))}}var Rt=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new Vt(t,this.keySelector,this.flushes))},t}(),Vt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.keySelector=n,r.values=new Set,i&&r.add(Object(o.a)(r,i)),r}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.values.clear()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(r.a);function Ht(t,e){return function(n){return n.lift(new Wt(t,e))}}var Wt=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Kt(t,this.compare,this.keySelector))},t}(),Kt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.keySelector=i,r.hasKey=!1,"function"==typeof n&&(r.compare=n),r}return i.__extends(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var i=!1;if(this.hasKey)try{i=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))},e}(w.a);function qt(t,e){return Ht((function(n,i){return e?e(n[t],i[t]):n[t]===i[t]}))}function Zt(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}Zt.prototype=Object.create(Error.prototype);var Gt=Zt,Yt=n(13),Xt=n(19),Jt=n(26);function $t(t,e,n){return function(i){return i.lift(new Qt(t,e,n))}}var Qt=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new te(t,this.nextOrObserver,this.error,this.complete))},t}(),te=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o._tapNext=Xt.a,o._tapError=Xt.a,o._tapComplete=Xt.a,o._tapError=i||Xt.a,o._tapComplete=r||Xt.a,Object(Jt.a)(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||Xt.a,o._tapError=n.error||Xt.a,o._tapComplete=n.complete||Xt.a),o}return i.__extends(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(w.a);function ee(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}ee.prototype=Object.create(Error.prototype);var ne=ee,ie=function(t){return void 0===t&&(t=re),$t({hasValue:!1,next:function(){this.hasValue=!0},complete:function(){if(!this.hasValue)throw t()}})};function re(){return new ne}function oe(t){return function(e){return 0===t?Q():e.lift(new se(t))}}var se=function(){function t(t){if(this.total=t,this.total<0)throw new Gt}return t.prototype.call=function(t,e){return e.subscribe(new ae(t,this.total))},t}(),ae=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.count=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(w.a);function ue(t,e){if(t<0)throw new Gt;var n=arguments.length>=2;return function(i){return i.pipe(Object(Yt.a)((function(e,n){return n===t})),oe(1),n?gt(e):ie((function(){return new Gt})))}}function ce(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];y(n)?t.pop():n=null;var i=t.length;return st(e,1!==i||n?i>0?Object(K.a)(t,n):Q(n):tt(t[0]))}}function le(t,e){return function(n){return n.lift(new pe(t,e,n))}}var pe=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new de(t,this.predicate,this.thisArg,this.source))},t}(),de=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=i,o.source=r,o.index=0,o.thisArg=i||o,o}return i.__extends(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(w.a);function he(){return function(t){return t.lift(new fe)}}var fe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return i.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(o.a)(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(r.a),be=n(7);function ye(t,e){return e?function(n){return n.pipe(ye((function(n,i){return Object(X.a)(t(n,i)).pipe(Object(be.a)((function(t,r){return e(n,t,i,r)})))})))}:function(e){return e.lift(new me(t))}}var me=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new _e(t,this.project))},t}(),_e=function(t){function e(e,n){var i=t.call(this,e)||this;return i.project=n,i.hasSubscription=!1,i.hasCompleted=!1,i.index=0,i}return i.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(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.hasSubscription=!0,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=new R.a(this,void 0,void 0);this.destination.add(i),Object(o.a)(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(r.a);function ge(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(i){return i.lift(new Se(t,e,n))}}var Se=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new xe(t,this.project,this.concurrent,this.scheduler))},t}(),xe=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.project=n,o.concurrent=i,o.scheduler=r,o.index=0,o.active=0,o.hasCompleted=!1,i<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return i.__extends(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,i=t.value,r=t.index;e.subscribeToProjection(n,i,r)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var i=this.index++;if(this.active<this.concurrent){n.next(t);try{var r=(0,this.project)(t,i);if(this.scheduler){var o={subscriber:this,result:r,value:t,index:i};this.destination.add(this.scheduler.schedule(e.dispatch,0,o))}else this.subscribeToProjection(r,t,i)}catch(t){n.error(t)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(Object(o.a)(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){this._next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(r.a);function we(t){return function(e){return e.lift(new Ee(t))}}var Ee=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new Fe(t,this.callback))},t}(),Fe=function(t){function e(e,n){var i=t.call(this,e)||this;return i.add(new c.a(n)),i}return i.__extends(e,t),e}(w.a);function Ie(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new Ce(t,n,!1,e))}}var Ce=function(){function t(t,e,n,i){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=i}return t.prototype.call=function(t,e){return e.subscribe(new Oe(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),Oe=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.predicate=n,s.source=i,s.yieldIndex=r,s.thisArg=o,s.index=0,s}return i.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,i=this.index++;try{e.call(n||this,t,i,this.source)&&this.notifyComplete(this.yieldIndex?i:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(w.a);function ke(t,e){return function(n){return n.lift(new Ce(t,n,!0,e))}}function je(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Object(Yt.a)((function(e,n){return t(e,n,i)})):it,oe(1),n?gt(e):ie((function(){return new ne})))}}function Te(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}Te.prototype=Object.create(Error.prototype);var Pe=Te,Be=function(t){function e(e,n){var i=t.call(this)||this;return i.subject=e,i.subscriber=n,i.closed=!1,i}return i.__extends(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(c.a),Ne=n(25),Ue=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return i.__extends(e,t),e}(w.a),De=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.__extends(e,t),e.prototype[Ne.a]=function(){return new Ue(this)},e.prototype.lift=function(t){var e=new Ae(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new Pe;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 Pe;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 Pe;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 Pe;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new Pe;return this.hasError?(t.error(this.thrownError),c.a.EMPTY):this.isStopped?(t.complete(),c.a.EMPTY):(this.observers.push(t),new Be(this,t))},e.prototype.asObservable=function(){var t=new f.a;return t.source=this,t},e.create=function(t,e){return new Ae(t,e)},e}(f.a),Ae=function(t){function e(e,n){var i=t.call(this)||this;return i.destination=e,i.source=n,i}return i.__extends(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):c.a.EMPTY},e}(De);function Le(t,e,n,i){return function(r){return r.lift(new Me(t,e,n,i))}}var Me=function(){function t(t,e,n,i){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=i}return t.prototype.call=function(t,e){return e.subscribe(new ze(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),ze=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=i,s.durationSelector=r,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return i.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var i,r=n.get(e);if(this.elementSelector)try{i=this.elementSelector(t)}catch(t){this.error(t)}else i=t;if(!r){r=this.subjectSelector?this.subjectSelector():new De,n.set(e,r);var o=new Ve(e,r,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new Ve(e,r))}catch(t){return void this.error(t)}this.add(s.subscribe(new Re(e,r,this)))}}r.closed||r.next(i)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(w.a),Re=function(t){function e(e,n,i){var r=t.call(this,n)||this;return r.key=e,r.group=n,r.parent=i,r}return i.__extends(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(w.a),Ve=function(t){function e(e,n,i){var r=t.call(this)||this;return r.key=e,r.groupSubject=n,r.refCountSubscription=i,r}return i.__extends(e,t),e.prototype._subscribe=function(t){var e=new c.a,n=this.refCountSubscription,i=this.groupSubject;return n&&!n.closed&&e.add(new He(n)),e.add(i.subscribe(t)),e},e}(f.a),He=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return i.__extends(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(c.a);function We(){return function(t){return t.lift(new Ke)}}var Ke=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new qe(t))},t}(),qe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype._next=function(t){},e}(w.a);function Ze(){return function(t){return t.lift(new Ge)}}var Ge=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ye(t))},t}(),Ye=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(w.a);function Xe(t){return function(e){return 0===t?Q():e.lift(new Je(t))}}var Je=function(){function t(t){if(this.total=t,this.total<0)throw new Gt}return t.prototype.call=function(t,e){return e.subscribe(new $e(t,this.total))},t}(),$e=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.ring=new Array,i.count=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,i=this.count++;e.length<n?e.push(t):e[i%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,i=this.ring,r=0;r<n;r++){var o=e++%n;t.next(i[o])}t.complete()},e}(w.a);function Qe(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Object(Yt.a)((function(e,n){return t(e,n,i)})):it,Xe(1),n?gt(e):ie((function(){return new ne})))}}function tn(t){return function(e){return e.lift(new en(t))}}var en=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new nn(t,this.value))},t}(),nn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.value=n,i}return i.__extends(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(w.a);function rn(){return function(t){return t.lift(new on)}}var on=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new sn(t))},t}(),sn=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype._next=function(t){this.destination.next(Ct.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(Ct.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(Ct.createComplete()),t.complete()},e}(w.a);function an(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new un(t,e,n))}}var un=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new cn(t,this.accumulator,this.seed,this.hasSeed))},t}(),cn=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=i,o.hasSeed=r,o.index=0,o}return i.__extends(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(w.a),ln=n(33);function pn(t,e){return arguments.length>=2?function(n){return Object(ln.a)(an(t,e),Xe(1),gt(e))(n)}:function(e){return Object(ln.a)(an((function(e,n,i){return t(e,n,i+1)})),Xe(1))(e)}}function dn(t){return pn("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}function hn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,i=null,r=t[t.length-1];return y(r)?(i=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof r&&(n=t.pop()),null===i&&1===t.length&&t[0]instanceof f.a?t[0]:rt(n)(Object(K.a)(t,i))}function fn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(hn.apply(void 0,[e].concat(t)))}}function vn(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?Object(nt.a)((function(){return t}),e,n):("number"==typeof e&&(n=e),Object(nt.a)((function(){return t}),n))}function bn(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(i){return i.lift(new yn(t,e,n))}}var yn=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new mn(t,this.accumulator,this.seed,this.concurrent))},t}(),mn=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.accumulator=n,o.acc=i,o.concurrent=r,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return i.__extends(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,i=void 0;try{i=(0,this.accumulator)(this.acc,t,e)}catch(t){return n.error(t)}this.active++,this._innerSub(i,t,e)}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,n){var i=new R.a(this,void 0,void 0);this.destination.add(i),Object(o.a)(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){var o=this.destination;this.acc=e,this.hasValue=!0,o.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(r.a);function _n(t){return pn("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}function gn(){return function(t){return t.lift(new Sn(t))}}var Sn=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var i=new xn(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r},t}(),xn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return i.__extends(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}(w.a),wn=function(t){function e(e,n){var i=t.call(this)||this;return i.source=e,i.subjectFactory=n,i._refCount=0,i._isComplete=!1,i}return i.__extends(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new c.a).add(this.source.subscribe(new Fn(this.getSubject(),this))),t.closed?(this._connection=null,t=c.a.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return gn()(this)},e}(f.a).prototype,En={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:wn._subscribe},_isComplete:{value:wn._isComplete,writable:!0},getSubject:{value:wn.getSubject},connect:{value:wn.connect},refCount:{value:wn.refCount}},Fn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return i.__extends(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(Ue);w.a;function In(t,e){return function(n){var i;if(i="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new Cn(i,e));var r=Object.create(n,En);return r.source=n,r.subjectFactory=i,r}}var Cn=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,i=this.subjectFactory(),r=n(i).subscribe(t);return r.add(e.subscribe(i)),r},t}();function On(t,e){return void 0===e&&(e=0),function(n){return n.lift(new kn(t,e))}}var kn=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new jn(t,this.scheduler,this.delay))},t}(),jn=function(t){function e(e,n,i){void 0===i&&(i=0);var r=t.call(this,e)||this;return r.scheduler=n,r.delay=i,r}return i.__extends(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new Tn(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(Ct.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(Ct.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(Ct.createComplete()),this.unsubscribe()},e}(w.a),Tn=function(){return function(t,e){this.notification=t,this.destination=e}}();function Pn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Object(v.a)(t[0])&&(t=t[0]),function(e){return e.lift(new Bn(t))}}var Bn=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new Nn(t,this.nextSources))},t}(),Nn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.destination=e,i.nextSources=n,i}return i.__extends(e,t),e.prototype.notifyError=function(t,e){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new R.a(this,void 0,void 0);this.destination.add(e),Object(o.a)(this,t,void 0,void 0,e)}else this.destination.complete()},e}(r.a);function Un(){return function(t){return t.lift(new Dn)}}var Dn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new An(t))},t}(),An=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return i.__extends(e,t),e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t},e}(w.a);function Ln(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}function Mn(t,e){return function(n){return[Object(Yt.a)(t,e)(n),Object(Yt.a)(Ln(t,e))(n)]}}function zn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(be.a)(Rn(t,n))(e)}}function Rn(t,e){return function(n){for(var i=n,r=0;r<e;r++){var o=i[t[r]];if(void 0===o)return;i=o}return i}}function Vn(t){return t?In((function(){return new De}),t):In(new De)}var Hn=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return i.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Pe;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(De);function Wn(t){return function(e){return In(new Hn(t))(e)}}var Kn=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.__extends(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),c.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),c.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}(De);function qn(){return function(t){return In(new Kn)(t)}}var Zn=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return i.__extends(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,i):e.flush(this)},e}(l),Gn=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e}(d))(Zn),Yn=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.__extends(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 Xn(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 Pe;if(this.isStopped||this.hasError?e=c.a.EMPTY:(this.observers.push(t),e=new Be(this,t)),r&&t.add(t=new jn(t,r)),n)for(var s=0;s<o&&!t.closed;s++)t.next(i[s]);else for(s=0;s<o&&!t.closed;s++)t.next(i[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||Gn).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}(De),Xn=function(){return function(t,e){this.time=t,this.value=e}}();function Jn(t,e,n,i){n&&"function"!=typeof n&&(i=n);var r="function"==typeof n?n:void 0,o=new Yn(t,e,i);return function(t){return In((function(){return o}),r)(t)}}function $n(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!Object(v.a)(t[0]))return t[0];t=t[0]}return Object(K.a)(t,void 0).lift(new Qn)}var Qn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ti(t))},t}(),ti=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return i.__extends(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var i=t[n],r=Object(o.a)(this,i,i,n);this.subscriptions&&this.subscriptions.push(r),this.add(r)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,i,r){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==n){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)},e}(r.a);function ei(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&Object(v.a)(t[0])&&(t=t[0]),e.lift.call($n.apply(void 0,[e].concat(t)))}}function ni(t){return void 0===t&&(t=-1),function(e){return 0===t?Q():t<0?e.lift(new ii(-1,e)):e.lift(new ii(t-1,e))}}var ii=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new ri(t,this.count,this.source))},t}(),ri=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.count=n,r.source=i,r}return i.__extends(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(w.a);function oi(t){return function(e){return e.lift(new si(t))}}var si=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new ai(t,this.notifier,e))},t}(),ai=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.notifier=n,r.source=i,r.sourceIsBeingSubscribedTo=!0,r}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(e){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new De;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(o.a)(this,e)},e}(r.a);function ui(t){return void 0===t&&(t=-1),function(e){return e.lift(new ci(t,e))}}var ci=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new li(t,this.count,this.source))},t}(),li=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.count=n,r.source=i,r}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,i=this.count;if(0===i)return t.prototype.error.call(this,e);i>-1&&(this.count=i-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(w.a);function pi(t){return function(e){return e.lift(new di(t,e))}}var di=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new hi(t,this.notifier,this.source))},t}(),hi=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.notifier=n,r.source=i,r}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,i=this.retries,r=this.retriesSubscription;if(i)this.errors=null,this.retriesSubscription=null;else{n=new De;try{i=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}r=Object(o.a)(this,i)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=i,this.retriesSubscription=r,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,n,i,r){var o=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=o,this.source.subscribe(this)},e}(r.a);function fi(t){return function(e){return e.lift(new vi(t))}}var vi=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new bi(t),i=e.subscribe(n);return i.add(Object(o.a)(n,this.notifier)),i},t}(),bi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return i.__extends(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,e,n,i,r){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(r.a);function yi(t,e){return void 0===e&&(e=h),function(n){return n.lift(new mi(t,e))}}var mi=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new _i(t,this.period,this.scheduler))},t}(),_i=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.period=n,r.scheduler=i,r.hasValue=!1,r.add(i.schedule(gi,n,{subscriber:r,period:n})),r}return i.__extends(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(w.a);function gi(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Si(t,e){return function(n){return n.lift(new xi(t,e))}}var xi=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new wi(t,this.compareTo,this.comparator))},t}(),wi=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.compareTo=n,r.comparator=i,r._a=[],r._b=[],r._oneComplete=!1,r.destination.add(n.subscribe(new Ei(e,r))),r}return i.__extends(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparator;t.length>0&&e.length>0;){var i=t.shift(),r=e.shift(),o=!1;try{o=n?n(i,r):i===r}catch(t){this.destination.error(t)}o||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(w.a),Ei=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=n,i}return i.__extends(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(w.a);function Fi(){return new De}function Ii(){return function(t){return gn()(In(Fi)(t))}}function Ci(t,e,n){var i;return i=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,i=t.bufferSize,r=void 0===i?Number.POSITIVE_INFINITY:i,o=t.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,a=t.refCount,u=t.scheduler,c=0,l=!1,p=!1;return function(t){c++,e&&!l||(l=!1,e=new Yn(r,s,u),n=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){p=!0,e.complete()}}));var i=e.subscribe(this);this.add((function(){c--,i.unsubscribe(),n&&!p&&a&&0===c&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(i))}}function Oi(t){return function(e){return e.lift(new ki(t,e))}}var ki=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new ji(t,this.predicate,this.source))},t}(),ji=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.source=i,r.seenValue=!1,r.index=0,r}return i.__extends(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new ne)},e}(w.a);function Ti(t){return function(e){return e.lift(new Pi(t))}}var Pi=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Bi(t,this.total))},t}(),Bi=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.count=0,i}return i.__extends(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(w.a);function Ni(t){return function(e){return e.lift(new Ui(t))}}var Ui=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Gt}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new w.a(t)):e.subscribe(new Di(t,this._skipCount))},t}(),Di=function(t){function e(e,n){var i=t.call(this,e)||this;return i._skipCount=n,i._count=0,i._ring=new Array(n),i}return i.__extends(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var i=n%e,r=this._ring,o=r[i];r[i]=t,this.destination.next(o)}},e}(w.a);function Ai(t){return function(e){return e.lift(new Li(t))}}var Li=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Mi(t,this.notifier))},t}(),Mi=function(t){function e(e,n){var i=t.call(this,e)||this;i.hasValue=!1;var r=new R.a(i,void 0,void 0);return i.add(r),i.innerSubscription=r,Object(o.a)(i,n,void 0,void 0,r),i}return i.__extends(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(t,e,n,i,r){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(r.a);function zi(t){return function(e){return e.lift(new Ri(t))}}var Ri=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new Vi(t,this.predicate))},t}(),Vi=function(t){function e(e,n){var i=t.call(this,e)||this;return i.predicate=n,i.skipping=!0,i.index=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},e}(w.a);function Hi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];y(n)?t.pop():n=null;var i=t.length;return st(1!==i||n?i>0?Object(K.a)(t,n):Q(n):tt(t[0]),e)}}var Wi=1,Ki={};var qi=function(t){var e=Wi++;return Ki[e]=t,Promise.resolve().then((function(){return function(t){var e=Ki[t];e&&e()}(e)})),e},Zi=function(t){delete Ki[t]},Gi=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return i.__extends(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=qi(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&&(Zi(n),e.scheduled=void 0)},e}(l),Yi=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(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}(d))(Gi),Xi=function(t){function e(e,n,i){void 0===n&&(n=0),void 0===i&&(i=Yi);var r=t.call(this)||this;return r.source=e,r.delayTime=n,r.scheduler=i,(!b(n)||n<0)&&(r.delayTime=0),i&&"function"==typeof i.schedule||(r.scheduler=Yi),r}return i.__extends(e,t),e.create=function(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=Yi),new e(t,n,i)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,i=this.source;return this.scheduler.schedule(e.dispatch,n,{source:i,subscriber:t})},e}(f.a);function Ji(t,e){return void 0===e&&(e=0),function(n){return n.lift(new $i(t,e))}}var $i=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new Xi(e,this.delay,this.scheduler).subscribe(t)},t}();function Qi(t,e){return"function"==typeof e?function(n){return n.pipe(Qi((function(n,i){return Object(X.a)(t(n,i)).pipe(Object(be.a)((function(t,r){return e(n,t,i,r)})))})))}:function(e){return e.lift(new tr(t))}}var tr=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new er(t,this.project))},t}(),er=function(t){function e(e,n){var i=t.call(this,e)||this;return i.project=n,i.index=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=this.innerSubscription;i&&i.unsubscribe();var r=new R.a(this,void 0,void 0);this.destination.add(r),this.innerSubscription=Object(o.a)(this,t,e,n,r)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e}(r.a);function nr(){return Qi(it)}function ir(t,e){return e?Qi((function(){return t}),e):Qi((function(){return t}))}function rr(t){return function(e){return e.lift(new or(t))}}var or=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new sr(t),i=Object(o.a)(n,this.notifier);return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n},t}(),sr=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(r.a);function ar(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new ur(t,e))}}var ur=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new cr(t,this.predicate,this.inclusive))},t}(),cr=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.inclusive=i,r.index=0,r}return i.__extends(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(w.a),lr={leading:!0,trailing:!1};function pr(t,e){return void 0===e&&(e=lr),function(n){return n.lift(new dr(t,e.leading,e.trailing))}}var dr=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new hr(t,this.durationSelector,this.leading,this.trailing))},t}(),hr=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=i,o._trailing=r,o._hasValue=!1,o}return i.__extends(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=null},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=Object(o.a)(this,e))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=null,e&&this.send()},e.prototype.notifyNext=function(t,e,n,i,r){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(r.a);function fr(t,e,n){return void 0===e&&(e=h),void 0===n&&(n=lr),function(i){return i.lift(new vr(t,e,n.leading,n.trailing))}}var vr=function(){function t(t,e,n,i){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=i}return t.prototype.call=function(t,e){return e.subscribe(new br(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),br=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=i,s.leading=r,s.trailing=o,s._hasTrailingValue=!1,s._trailingValue=null,s}return i.__extends(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(yr,this.duration,{subscriber:this})),this.leading&&this.destination.next(t))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(w.a);function yr(t){t.subscriber.clearThrottle()}function mr(t){return void 0===t&&(t=h),function(e){return n=function(){return e.pipe(an((function(e,n){var i=e.current;return{value:n,current:t.now(),last:i}}),{current:t.now(),value:void 0,last:void 0}),Object(be.a)((function(t){var e=t.current,n=t.last,i=t.value;return new _r(i,e-n)})))},new f.a((function(t){var e;try{e=n()}catch(e){return void t.error(e)}return(e?Object(X.a)(e):Q()).subscribe(t)}));var n}}var _r=function(){return function(t,e){this.value=t,this.interval=e}}();function gr(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}gr.prototype=Object.create(Error.prototype);var Sr=gr;function xr(t,e,n){return void 0===n&&(n=h),function(i){var r=Et(t),o=r?+t-n.now():Math.abs(t);return i.lift(new wr(o,r,e,n))}}var wr=function(){function t(t,e,n,i){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new Er(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Er=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=i,s.withObservable=r,s.scheduler=o,s.action=null,s.scheduleTimeout(),s}return i.__extends(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(Object(o.a)(t,e))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},e}(r.a);function Fr(t,e){return void 0===e&&(e=h),xr(t,Ft(new Sr),e)}function Ir(t){return void 0===t&&(t=h),Object(be.a)((function(e){return new Cr(e,t.now())}))}var Cr=function(){return function(t,e){this.value=t,this.timestamp=e}}();function Or(t,e,n){return 0===n?[e]:(t.push(e),t)}function kr(){return pn(Or,[])}function jr(t){return function(e){return e.lift(new Tr(t))}}var Tr=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new Pr(t),i=e.subscribe(n);return i.closed||n.add(Object(o.a)(n,this.windowBoundaries)),i},t}(),Pr=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new De,e.next(n.window),n}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.openWindow()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new De;e.next(n)},e}(r.a);function Br(t,e){return void 0===e&&(e=0),function(n){return n.lift(new Nr(t,e))}}var Nr=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new Ur(t,this.windowSize,this.startWindowEvery))},t}(),Ur=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.destination=e,r.windowSize=n,r.startWindowEvery=i,r.windows=[new De],r.count=0,e.next(r.windows[0]),r}return i.__extends(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,i=this.windowSize,r=this.windows,o=r.length,s=0;s<o&&!this.closed;s++)r[s].next(t);var a=this.count-i+1;if(a>=0&&a%e==0&&!this.closed&&r.shift().complete(),++this.count%e==0&&!this.closed){var u=new De;r.push(u),n.next(u)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(w.a);function Dr(t){var e=h,n=null,i=Number.POSITIVE_INFINITY;return y(arguments[3])&&(e=arguments[3]),y(arguments[2])?e=arguments[2]:b(arguments[2])&&(i=arguments[2]),y(arguments[1])?e=arguments[1]:b(arguments[1])&&(n=arguments[1]),function(r){return r.lift(new Ar(t,n,i,e))}}var Ar=function(){function t(t,e,n,i){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new Mr(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),Lr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return i.__extends(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(De),Mr=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=i,s.maxWindowSize=r,s.scheduler=o,s.windows=[];var a=s.openWindow();if(null!==i&&i>=0){var u={subscriber:s,window:a,context:null},c={windowTimeSpan:n,windowCreationInterval:i,subscriber:s,scheduler:o};s.add(o.schedule(Vr,n,u)),s.add(o.schedule(Rr,i,c))}else{var l={subscriber:s,window:a,windowTimeSpan:n};s.add(o.schedule(zr,n,l))}return s}return i.__extends(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,i=0;i<n;i++){var r=e[i];r.closed||(r.next(t),r.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(r))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new Lr;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(w.a);function zr(t){var e=t.subscriber,n=t.windowTimeSpan,i=t.window;i&&e.closeWindow(i),t.window=e.openWindow(),this.schedule(t,n)}function Rr(t){var e=t.windowTimeSpan,n=t.subscriber,i=t.scheduler,r=t.windowCreationInterval,o=n.openWindow(),s={action:this,subscription:null},a={subscriber:n,window:o,context:s};s.subscription=i.schedule(Vr,e,a),this.add(s.subscription),this.schedule(t,r)}function Vr(t){var e=t.subscriber,n=t.window,i=t.context;i&&i.action&&i.subscription&&i.action.remove(i.subscription),e.closeWindow(n)}function Hr(t,e){return function(n){return n.lift(new Wr(t,e))}}var Wr=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Kr(t,this.openings,this.closingSelector))},t}(),Kr=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.openings=n,r.closingSelector=i,r.contexts=[],r.add(r.openSubscription=Object(o.a)(r,n,n)),r}return i.__extends(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,i=0;i<n;i++)e[i].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var i=n.length,r=-1;++r<i;){var o=n[r];o.window.error(e),o.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,i=-1;++i<n;){var r=e[i];r.window.complete(),r.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var i=t[n];i.window.unsubscribe(),i.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,i,r){if(t===this.openings){var s=void 0;try{s=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var a=new De,u=new c.a,l={window:a,subscription:u};this.contexts.push(l);var p=Object(o.a)(this,s,l);p.closed?this.closeWindow(this.contexts.length-1):(p.context=l,u.add(p)),this.destination.next(a)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],i=n.window,r=n.subscription;e.splice(t,1),i.complete(),r.unsubscribe()}},e}(r.a);function qr(t){return function(e){return e.lift(new Zr(t))}}var Zr=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Gr(t,this.closingSelector))},t}(),Gr=function(t){function e(e,n){var i=t.call(this,e)||this;return i.destination=e,i.closingSelector=n,i.openWindow(),i}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.openWindow(r)},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,i=this.window=new De;this.destination.next(i);try{n=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=Object(o.a)(this,n))},e}(r.a);function Yr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var i=t;return e.lift(new Xr(i,n))}}var Xr=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new Jr(t,this.observables,this.project))},t}(),Jr=function(t){function e(e,n,i){var r=t.call(this,e)||this;r.observables=n,r.project=i,r.toRespond=[];var s=n.length;r.values=new Array(s);for(var a=0;a<s;a++)r.toRespond.push(a);for(a=0;a<s;a++){var u=n[a];r.add(Object(o.a)(r,u,u,a))}return r}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.values[n]=e;var o=this.toRespond;if(o.length>0){var s=o.indexOf(n);-1!==s&&o.splice(s,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(r.a),$r=n(12);function Qr(){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(K.a)(t,void 0).lift(new to(n))}var to=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new eo(t,this.resultSelector))},t}(),eo=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.__extends(e,t),e.prototype._next=function(t){var e=this.iterators;Object(v.a)(t)?e.push(new io(t)):"function"==typeof t[$r.a]?e.push(new no(t[$r.a]())):e.push(new ro(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var i=t[n];if(i.stillUnsubscribed)this.destination.add(i.subscribe(i,n));else 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,a=(s=t[i]).next();if(s.hasCompleted()&&(r=!0),a.done)return void n.complete();o.push(a.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}(w.a),no=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}(),io=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[$r.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}(),ro=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.__extends(e,t),e.prototype[$r.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(o.a)(this,this.observable,this,e)},e}(r.a);function oo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Qr.apply(void 0,[e].concat(t)))}}function so(t){return function(e){return e.lift(new to(t))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(48),s=n(56),a=[o.FileSelectComponent],u=function(){function t(){}return t=i.__decorate([r.NgModule({declarations:[a],exports:[s.PUBLIC_DIRECTIVES,a],imports:[s.SharedModule]})],t)}();e.FileSelectModule=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(49),s=n(15),a=n(29),u=n(27),c=n(46),l=n(50),p=n(51),d=n(16),h=n(23),f=n(20),v=n(31),b=n(53),y=n(43),m=n(24);e.FILESELECT_VALUE_ACCESSOR={multi:!0,provide:o.NG_VALUE_ACCESSOR,useExisting:r.forwardRef((function(){return _}))};var _=function(){function t(t,e,n,i,o,s,u,c){var d=this;this.uploadService=t,this.localization=e,this.navigation=n,this.dropZoneService=i,this.ngZone=o,this.renderer=s,this.cdr=u,this.disabled=!1,this.multiple=!0,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+a.guid(),this.onBlur=new r.EventEmitter,this.onFocus=new r.EventEmitter,this.select=new r.EventEmitter,this.remove=new r.EventEmitter,this.valueChange=new r.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(t){},this.onChangeCallback=function(t){},l.validatePackage(p.packageMetadata),this.wrapper=c.nativeElement,this.direction=e.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.fileList=this.uploadService.files,this.localizationChangeSubscription=e.changes.subscribe((function(t){var e=t.rtl;d.direction=e?"rtl":"ltr",d.navigation.computeKeys(d.direction)})),this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers(),this.setDefaultSettings()}var n;return n=t,Object.defineProperty(t.prototype,"name",{get:function(){return this.uploadService.async.saveField},set:function(t){this.uploadService.async.saveField=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"restrictions",{get:function(){return this._restrictions},set:function(t){var e=Object.assign({},this._restrictions,t);this._restrictions=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.wrapper,"tabindex"),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},t.prototype.textFor=function(t){return this.localization.get(t)},t.prototype.focus=function(){var t=this;setTimeout((function(){t.fileSelectButton.nativeElement.focus()}))},t.prototype.ngOnDestroy=function(){this.fileList.clear(),this.blurSubscription&&this.blurSubscription.unsubscribe(),this.wrapperFocusSubscription&&this.wrapperFocusSubscription.unsubscribe(),this.selectButtonFocusSubscription&&this.selectButtonFocusSubscription.unsubscribe(),this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe(),this.subs&&this.subs.unsubscribe()},t.prototype.handleKeydown=function(t){if(!this.disabled)return t.keyCode!==a.Keys.Enter&&t.keyCode!==a.Keys.Space||t.target!==this.fileSelectButton.nativeElement?void((f.hasClasses(t.target,f.UPLOAD_CLASSES)||!f.isFocusable(t.target)&&!f.hasClasses(t.target,f.IGNORE_TARGET_CLASSES))&&this.navigation.process(t)):(t.preventDefault(),void this.fileSelect.nativeElement.click())},t.prototype.writeValue=function(t){var e=!0;t instanceof Array&&(t.forEach((function(t){f.validateInitialFileSelectFile(t)||(e=!1)})),e&&this.uploadService.addInitialFileSelectFiles(t)),null===t&&this.fileList.clear(),this.cdr.markForCheck()},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.setDisabledState=function(t){this.disabled=t},t.prototype.removeFileByUid=function(t){this.uploadService.removeFiles(t)},t.prototype.clearFiles=function(){this.uploadService.clearFiles()},t.prototype.isEmpty=function(){return!1},t.prototype.addFiles=function(t){this.uploadService.addFiles(t)},Object.defineProperty(t.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabindex},enumerable:!0,configurable:!0}),t.prototype.onFileSelectButtonFocus=function(t){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-focus"),this.navigation.focused||(this.navigation.focusedIndex=-1)},t.prototype.onFileSelectButtonBlur=function(t){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-focus")},t.prototype.subscribeBlur=function(){var t=this;a.isDocumentAvailable()&&this.ngZone.runOutsideAngular((function(){t.documentClick=u.fromEvent(document,"click").pipe(c.filter((function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))}))),t.blurSubscription=u.merge(t.documentClick,t.navigation.onTab).subscribe((function(){t.navigation.focused&&t.ngZone.run((function(){t.navigation.focused=!1,t.onTouchedCallback(),t.onBlur.emit()}))}))}))},t.prototype.subscribeFocus=function(){var t=this;this.wrapperFocusSubscription=this.navigation.onWrapperFocus.subscribe((function(){t.onFocus.emit()})),this.selectButtonFocusSubscription=this.navigation.onSelectButtonFocus.subscribe((function(){t.fileSelectButton.nativeElement.focus()}))},t.prototype.attachEventHandlers=function(){var t=this;this.subs=this.uploadService.changeEvent.subscribe((function(e){var n=[];null!==e&&e.forEach((function(t){t.state===b.FileState.Initial&&n.push(t),t.state===b.FileState.Selected&&t.rawFile&&!t.validationErrors&&n.push(t.rawFile)})),0===n.length&&(n=null),t.onChangeCallback(n),t.valueChange.emit(n)})),this.subs.add(this.uploadService.removeEvent.subscribe((function(e){t.remove.emit(e)}))),this.subs.add(this.uploadService.selectEvent.subscribe((function(e){t.select.emit(e)})))},t.prototype.setDefaultSettings=function(){this.uploadService.async.autoUpload=!1,this.uploadService.component="FileSelect"},i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"accept",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"multiple",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"name",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"showFileList",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Number)],t.prototype,"tabindex",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],t.prototype,"restrictions",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"zoneId",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"focusableId",void 0),i.__decorate([r.ContentChild(v.FileTemplateDirective,{static:!1}),i.__metadata("design:type",v.FileTemplateDirective)],t.prototype,"fileTemplate",void 0),i.__decorate([r.ContentChild(m.FileInfoTemplateDirective,{static:!1}),i.__metadata("design:type",m.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),i.__decorate([r.ViewChild("fileSelect",{static:!0}),i.__metadata("design:type",r.ElementRef)],t.prototype,"fileSelect",void 0),i.__decorate([r.ViewChild("fileSelectButton",{static:!0}),i.__metadata("design:type",r.ElementRef)],t.prototype,"fileSelectButton",void 0),i.__decorate([r.Output("blur"),i.__metadata("design:type",r.EventEmitter)],t.prototype,"onBlur",void 0),i.__decorate([r.Output("focus"),i.__metadata("design:type",r.EventEmitter)],t.prototype,"onFocus",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"select",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"remove",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"valueChange",void 0),i.__decorate([r.HostBinding("class.k-widget"),r.HostBinding("class.k-upload"),i.__metadata("design:type",Boolean)],t.prototype,"hostDefaultClasses",void 0),i.__decorate([r.HostBinding("class.k-disabled"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"hostDisabledClass",null),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"dir",null),i.__decorate([r.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"handleKeydown",null),t=n=i.__decorate([r.Component({exportAs:"kendoFileSelect",providers:[s.LocalizationService,h.NavigationService,d.UploadService,y.DropZoneService,e.FILESELECT_VALUE_ACCESSOR,{provide:s.L10N_PREFIX,useValue:"kendo.fileselect"},{provide:a.KendoInput,useExisting:r.forwardRef((function(){return n}))}],selector:"kendo-fileselect",template:'\n <ng-container kendoFileSelectLocalizedMessages\n i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"\n dropFilesHere="Drop files here to select"\n\n i18n-invalidFileExtension="kendo.fileselect.invalidFileExtension|The text for the invalid allowed extensions restriction message"\n invalidFileExtension="File type not allowed."\n\n i18n-invalidMaxFileSize="kendo.fileselect.invalidMaxFileSize|The text for the invalid max file size restriction message"\n invalidMaxFileSize="File size too large."\n\n i18n-invalidMinFileSize="kendo.fileselect.invalidMinFileSize|The text for the invalid min file size restriction message"\n invalidMinFileSize="File size too small."\n\n i18n-remove="kendo.fileselect.remove|The text for the Remove button"\n remove="Remove"\n\n i18n-select="kendo.fileselect.select|The text for the Select button"\n select="Select files..."\n >\n </ng-container>\n <div kendoFileSelectInternalDropZone\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled">\n <div role="button" #fileSelectButton\n [id]="focusableId"\n [attr.aria-label]="textFor(\'select\')"\n [attr.tabindex]="selectButtonTabIndex"\n (focus)="onFileSelectButtonFocus($event)"\n (blur)="onFileSelectButtonBlur($event)"\n class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-upload-button">\n <input #fileSelect kendoFileSelect\n [attr.accept]="accept ? accept : null"\n [dir]="direction"\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled" />\n <span>{{textFor(\'select\')}}</span>\n </div>\n <div class="k-dropzone-hint">{{textFor(\'dropFilesHere\')}}</div>\n </div>\n <ul kendo-upload-file-list\n class="k-upload-files k-reset"\n *ngIf="showFileList && fileList.count > 0"\n [disabled]="disabled"\n [fileList]="fileList.files"\n [fileTemplate]="fileTemplate"\n [fileInfoTemplate]="fileInfoTemplate">\n </ul>\n '}),i.__metadata("design:paramtypes",[d.UploadService,s.LocalizationService,h.NavigationService,y.DropZoneService,r.NgZone,r.Renderer2,r.ChangeDetectorRef,r.ElementRef])],t)}();e.FileSelectComponent=_},function(t,e){t.exports=s},function(t,e){t.exports=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata={name:"@progress/kendo-angular-upload",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1646219377,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(t,e,n){"use strict";n.r(e),n.d(e,"ɵangular_packages_common_http_http_a",(function(){return k})),n.d(e,"ɵangular_packages_common_http_http_b",(function(){return T})),n.d(e,"ɵangular_packages_common_http_http_c",(function(){return W})),n.d(e,"ɵangular_packages_common_http_http_d",(function(){return D})),n.d(e,"ɵangular_packages_common_http_http_g",(function(){return R})),n.d(e,"ɵangular_packages_common_http_http_h",(function(){return V})),n.d(e,"ɵangular_packages_common_http_http_e",(function(){return L})),n.d(e,"ɵangular_packages_common_http_http_f",(function(){return M})),n.d(e,"HttpBackend",(function(){return p})),n.d(e,"HttpHandler",(function(){return l})),n.d(e,"HttpClient",(function(){return I})),n.d(e,"HttpHeaders",(function(){return d})),n.d(e,"HTTP_INTERCEPTORS",(function(){return O})),n.d(e,"JsonpClientBackend",(function(){return P})),n.d(e,"JsonpInterceptor",(function(){return B})),n.d(e,"HttpClientJsonpModule",(function(){return Z})),n.d(e,"HttpClientModule",(function(){return q})),n.d(e,"HttpClientXsrfModule",(function(){return K})),n.d(e,"ɵHttpInterceptingHandler",(function(){return H})),n.d(e,"HttpParams",(function(){return v})),n.d(e,"HttpUrlEncodingCodec",(function(){return h})),n.d(e,"HttpRequest",(function(){return g})),n.d(e,"HttpErrorResponse",(function(){return E})),n.d(e,"HttpEventType",(function(){return _})),n.d(e,"HttpHeaderResponse",(function(){return x})),n.d(e,"HttpResponse",(function(){return w})),n.d(e,"HttpResponseBase",(function(){return S})),n.d(e,"HttpXhrBackend",(function(){return A})),n.d(e,"XhrFactory",(function(){return U})),n.d(e,"HttpXsrfTokenExtractor",(function(){return z}));var i=n(0),r=n(4),o=n(27),s=n(32),a=n(13),u=n(7),c=n(34),l=function(){},p=function(){},d=function(){function t(t){var e=this;this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?function(){e.headers=new Map,t.split("\n").forEach((function(t){var n=t.indexOf(":");if(n>0){var i=t.slice(0,n),r=i.toLowerCase(),o=t.slice(n+1).trim();e.maybeSetNormalizedName(i,r),e.headers.has(r)?e.headers.get(r).push(o):e.headers.set(r,[o])}}))}:function(){e.headers=new Map,Object.keys(t).forEach((function(n){var i=t[n],r=n.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(e.headers.set(r,i),e.maybeSetNormalizedName(n,r))}))}:this.headers=new Map}return t.prototype.has=function(t){return this.init(),this.headers.has(t.toLowerCase())},t.prototype.get=function(t){this.init();var e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null},t.prototype.keys=function(){return this.init(),Array.from(this.normalizedNames.values())},t.prototype.getAll=function(t){return this.init(),this.headers.get(t.toLowerCase())||null},t.prototype.append=function(t,e){return this.clone({name:t,value:e,op:"a"})},t.prototype.set=function(t,e){return this.clone({name:t,value:e,op:"s"})},t.prototype.delete=function(t,e){return this.clone({name:t,value:e,op:"d"})},t.prototype.maybeSetNormalizedName=function(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)},t.prototype.init=function(){var e=this;this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach((function(t){return e.applyUpdate(t)})),this.lazyUpdate=null))},t.prototype.copyFrom=function(t){var e=this;t.init(),Array.from(t.headers.keys()).forEach((function(n){e.headers.set(n,t.headers.get(n)),e.normalizedNames.set(n,t.normalizedNames.get(n))}))},t.prototype.clone=function(e){var n=new t;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n},t.prototype.applyUpdate=function(t){var e=t.name.toLowerCase();switch(t.op){case"a":case"s":var n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);var r=("a"===t.op?this.headers.get(e):void 0)||[];r.push.apply(r,Object(i.__spread)(n)),this.headers.set(e,r);break;case"d":var o=t.value;if(o){var s=this.headers.get(e);if(!s)return;0===(s=s.filter((function(t){return-1===o.indexOf(t)}))).length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}},t.prototype.forEach=function(t){var e=this;this.init(),Array.from(this.normalizedNames.keys()).forEach((function(n){return t(e.normalizedNames.get(n),e.headers.get(n))}))},t}(),h=function(){function t(){}return t.prototype.encodeKey=function(t){return f(t)},t.prototype.encodeValue=function(t){return f(t)},t.prototype.decodeKey=function(t){return decodeURIComponent(t)},t.prototype.decodeValue=function(t){return decodeURIComponent(t)},t}();function f(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var v=function(){function t(t){var e,n,r,o=this;if(void 0===t&&(t={}),this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new h,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=(e=t.fromString,n=this.encoder,r=new Map,e.length>0&&e.split("&").forEach((function(t){var e=t.indexOf("="),o=Object(i.__read)(-1==e?[n.decodeKey(t),""]:[n.decodeKey(t.slice(0,e)),n.decodeValue(t.slice(e+1))],2),s=o[0],a=o[1],u=r.get(s)||[];u.push(a),r.set(s,u)})),r)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach((function(e){var n=t.fromObject[e];o.map.set(e,Array.isArray(n)?n:[n])}))):this.map=null}return t.prototype.has=function(t){return this.init(),this.map.has(t)},t.prototype.get=function(t){this.init();var e=this.map.get(t);return e?e[0]:null},t.prototype.getAll=function(t){return this.init(),this.map.get(t)||null},t.prototype.keys=function(){return this.init(),Array.from(this.map.keys())},t.prototype.append=function(t,e){return this.clone({param:t,value:e,op:"a"})},t.prototype.set=function(t,e){return this.clone({param:t,value:e,op:"s"})},t.prototype.delete=function(t,e){return this.clone({param:t,value:e,op:"d"})},t.prototype.toString=function(){var t=this;return this.init(),this.keys().map((function(e){var n=t.encoder.encodeKey(e);return t.map.get(e).map((function(e){return n+"="+t.encoder.encodeValue(e)})).join("&")})).join("&")},t.prototype.clone=function(e){var n=new t({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([e]),n},t.prototype.init=function(){var t=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach((function(e){return t.map.set(e,t.cloneFrom.map.get(e))})),this.updates.forEach((function(e){switch(e.op){case"a":case"s":var n=("a"===e.op?t.map.get(e.param):void 0)||[];n.push(e.value),t.map.set(e.param,n);break;case"d":if(void 0===e.value){t.map.delete(e.param);break}var i=t.map.get(e.param)||[],r=i.indexOf(e.value);-1!==r&&i.splice(r,1),i.length>0?t.map.set(e.param,i):t.map.delete(e.param)}})),this.cloneFrom=this.updates=null)},t}();
|
|
6
6
|
/**
|
|
7
7
|
* @license
|
|
8
8
|
* Copyright Google Inc. All Rights Reserved.
|