@progress/kendo-angular-upload 8.0.1-dev.202202251429 → 8.0.2
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 +2 -31
- package/dist/cdn/main.js +1 -30
- 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,33 +2,4 @@
|
|
|
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}();
|
|
6
|
-
/**
|
|
7
|
-
* @license
|
|
8
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
9
|
-
*
|
|
10
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11
|
-
* found in the LICENSE file at https://angular.io/license
|
|
12
|
-
*/function b(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function y(t){return"undefined"!=typeof Blob&&t instanceof Blob}function m(t){return"undefined"!=typeof FormData&&t instanceof FormData}var _,g=function(){function t(t,e,n,i){var r;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==n?n:null,r=i):r=n,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.params&&(this.params=r.params)),this.headers||(this.headers=new d),this.params){var o=this.params.toString();if(0===o.length)this.urlWithParams=e;else{var s=e.indexOf("?"),a=-1===s?"?":s<e.length-1?"&":"";this.urlWithParams=e+a+o}}else this.params=new v,this.urlWithParams=e}return t.prototype.serializeBody=function(){return null===this.body?null:b(this.body)||y(this.body)||m(this.body)||"string"==typeof this.body?this.body:this.body instanceof v?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()},t.prototype.detectContentTypeHeader=function(){return null===this.body||m(this.body)?null:y(this.body)?this.body.type||null:b(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof v?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null},t.prototype.clone=function(e){void 0===e&&(e={});var n=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,o=void 0!==e.body?e.body:this.body,s=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,a=void 0!==e.reportProgress?e.reportProgress:this.reportProgress,u=e.headers||this.headers,c=e.params||this.params;return void 0!==e.setHeaders&&(u=Object.keys(e.setHeaders).reduce((function(t,n){return t.set(n,e.setHeaders[n])}),u)),e.setParams&&(c=Object.keys(e.setParams).reduce((function(t,n){return t.set(n,e.setParams[n])}),c)),new t(n,i,o,{params:c,headers:u,reportProgress:a,responseType:r,withCredentials:s})},t}();
|
|
13
|
-
/**
|
|
14
|
-
* @license
|
|
15
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
16
|
-
*
|
|
17
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
18
|
-
* found in the LICENSE file at https://angular.io/license
|
|
19
|
-
*/!function(t){t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User"}(_||(_={}));var S=function(t,e,n){void 0===e&&(e=200),void 0===n&&(n="OK"),this.headers=t.headers||new d,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300},x=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.type=_.ResponseHeader,n}return Object(i.__extends)(e,t),e.prototype.clone=function(t){return void 0===t&&(t={}),new e({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})},e}(S),w=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.type=_.Response,n.body=void 0!==e.body?e.body:null,n}return Object(i.__extends)(e,t),e.prototype.clone=function(t){return void 0===t&&(t={}),new e({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})},e}(S),E=function(t){function e(e){var n=t.call(this,e,0,"Unknown Error")||this;return n.name="HttpErrorResponse",n.ok=!1,n.status>=200&&n.status<300?n.message="Http failure during parsing for "+(e.url||"(unknown url)"):n.message="Http failure response for "+(e.url||"(unknown url)")+": "+e.status+" "+e.statusText,n.error=e.error||null,n}return Object(i.__extends)(e,t),e}(S);
|
|
20
|
-
/**
|
|
21
|
-
* @license
|
|
22
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
23
|
-
*
|
|
24
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
25
|
-
* found in the LICENSE file at https://angular.io/license
|
|
26
|
-
*/
|
|
27
|
-
function F(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}var I=function(){function t(t){this.handler=t}return t.prototype.request=function(t,e,n){var i,r=this;if(void 0===n&&(n={}),t instanceof g)i=t;else{var c=void 0;c=n.headers instanceof d?n.headers:new d(n.headers);var l=void 0;n.params&&(l=n.params instanceof v?n.params:new v({fromObject:n.params})),i=new g(t,e,void 0!==n.body?n.body:null,{headers:c,params:l,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}var p=Object(o.of)(i).pipe(Object(s.a)((function(t){return r.handler.handle(t)})));if(t instanceof g||"events"===n.observe)return p;var h=p.pipe(Object(a.a)((function(t){return t instanceof w})));switch(n.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return h.pipe(Object(u.a)((function(t){if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body})));case"blob":return h.pipe(Object(u.a)((function(t){if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body})));case"text":return h.pipe(Object(u.a)((function(t){if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body})));case"json":default:return h.pipe(Object(u.a)((function(t){return t.body})))}case"response":return h;default:throw new Error("Unreachable: unhandled observe type "+n.observe+"}")}},t.prototype.delete=function(t,e){return void 0===e&&(e={}),this.request("DELETE",t,e)},t.prototype.get=function(t,e){return void 0===e&&(e={}),this.request("GET",t,e)},t.prototype.head=function(t,e){return void 0===e&&(e={}),this.request("HEAD",t,e)},t.prototype.jsonp=function(t,e){return this.request("JSONP",t,{params:(new v).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})},t.prototype.options=function(t,e){return void 0===e&&(e={}),this.request("OPTIONS",t,e)},t.prototype.patch=function(t,e,n){return void 0===n&&(n={}),this.request("PATCH",t,F(n,e))},t.prototype.post=function(t,e,n){return void 0===n&&(n={}),this.request("POST",t,F(n,e))},t.prototype.put=function(t,e,n){return void 0===n&&(n={}),this.request("PUT",t,F(n,e))},t=Object(i.__decorate)([Object(r.Injectable)(),Object(i.__metadata)("design:paramtypes",[l])],t)}(),C=function(){function t(t,e){this.next=t,this.interceptor=e}return t.prototype.handle=function(t){return this.interceptor.intercept(t,this.next)},t}(),O=new r.InjectionToken("HTTP_INTERCEPTORS"),k=function(){function t(){}return t.prototype.intercept=function(t,e){return e.handle(t)},t=Object(i.__decorate)([Object(r.Injectable)()],t)}(),j=0,T=function(){},P=function(){function t(t,e){this.callbackMap=t,this.document=e}return t.prototype.nextCallback=function(){return"ng_jsonp_callback_"+j++},t.prototype.handle=function(t){var e=this;if("JSONP"!==t.method)throw new Error("JSONP requests must use JSONP request method.");if("json"!==t.responseType)throw new Error("JSONP requests must use Json response type.");return new o.Observable((function(n){var i=e.nextCallback(),r=t.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/,"="+i+"$1"),o=e.document.createElement("script");o.src=r;var s=null,a=!1,u=!1;e.callbackMap[i]=function(t){delete e.callbackMap[i],u||(s=t,a=!0)};var c=function(){o.parentNode&&o.parentNode.removeChild(o),delete e.callbackMap[i]},l=function(t){u||(c(),a?(n.next(new w({body:s,status:200,statusText:"OK",url:r})),n.complete()):n.error(new E({url:r,status:0,statusText:"JSONP Error",error:new Error("JSONP injected script did not invoke callback.")})))},p=function(t){u||(c(),n.error(new E({error:t,status:0,statusText:"JSONP Error",url:r})))};return o.addEventListener("load",l),o.addEventListener("error",p),e.document.body.appendChild(o),n.next({type:_.Sent}),function(){u=!0,o.removeEventListener("load",l),o.removeEventListener("error",p),c()}}))},t=Object(i.__decorate)([Object(r.Injectable)(),Object(i.__param)(1,Object(r.Inject)(c.DOCUMENT)),Object(i.__metadata)("design:paramtypes",[T,Object])],t)}(),B=function(){function t(t){this.jsonp=t}return t.prototype.intercept=function(t,e){return"JSONP"===t.method?this.jsonp.handle(t):e.handle(t)},t=Object(i.__decorate)([Object(r.Injectable)(),Object(i.__metadata)("design:paramtypes",[P])],t)}(),N=/^\)\]\}',?\n/;
|
|
28
|
-
/**
|
|
29
|
-
* @license
|
|
30
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
31
|
-
*
|
|
32
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
33
|
-
* found in the LICENSE file at https://angular.io/license
|
|
34
|
-
*/var U=function(){},D=function(){function t(){}return t.prototype.build=function(){return new XMLHttpRequest},t=Object(i.__decorate)([Object(r.Injectable)(),Object(i.__metadata)("design:paramtypes",[])],t)}(),A=function(){function t(t){this.xhrFactory=t}return t.prototype.handle=function(t){var e=this;if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new o.Observable((function(n){var i=e.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((function(t,e){return i.setRequestHeader(t,e.join(","))})),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){var r=t.detectContentTypeHeader();null!==r&&i.setRequestHeader("Content-Type",r)}if(t.responseType){var o=t.responseType.toLowerCase();i.responseType="json"!==o?o:"text"}var s=t.serializeBody(),a=null,u=function(){if(null!==a)return a;var e=1223===i.status?204:i.status,n=i.statusText||"OK",r=new d(i.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(i)||t.url;return a=new x({headers:r,status:e,statusText:n,url:o})},c=function(){var e=u(),r=e.headers,o=e.status,s=e.statusText,a=e.url,c=null;204!==o&&(c=void 0===i.response?i.responseText:i.response),0===o&&(o=c?200:0);var l=o>=200&&o<300;if("json"===t.responseType&&"string"==typeof c){var p=c;c=c.replace(N,"");try{c=""!==c?JSON.parse(c):null}catch(t){c=p,l&&(l=!1,c={error:t,text:c})}}l?(n.next(new w({body:c,headers:r,status:o,statusText:s,url:a||void 0})),n.complete()):n.error(new E({error:c,headers:r,status:o,statusText:s,url:a||void 0}))},l=function(t){var e=u().url,r=new E({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error",url:e||void 0});n.error(r)},p=!1,h=function(e){p||(n.next(u()),p=!0);var r={type:_.DownloadProgress,loaded:e.loaded};e.lengthComputable&&(r.total=e.total),"text"===t.responseType&&i.responseText&&(r.partialText=i.responseText),n.next(r)},f=function(t){var e={type:_.UploadProgress,loaded:t.loaded};t.lengthComputable&&(e.total=t.total),n.next(e)};return i.addEventListener("load",c),i.addEventListener("error",l),t.reportProgress&&(i.addEventListener("progress",h),null!==s&&i.upload&&i.upload.addEventListener("progress",f)),i.send(s),n.next({type:_.Sent}),function(){i.removeEventListener("error",l),i.removeEventListener("load",c),t.reportProgress&&(i.removeEventListener("progress",h),null!==s&&i.upload&&i.upload.removeEventListener("progress",f)),i.abort()}}))},t=Object(i.__decorate)([Object(r.Injectable)(),Object(i.__metadata)("design:paramtypes",[U])],t)}(),L=new r.InjectionToken("XSRF_COOKIE_NAME"),M=new r.InjectionToken("XSRF_HEADER_NAME"),z=function(){},R=function(){function t(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return t.prototype.getToken=function(){if("server"===this.platform)return null;var t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Object(c["ɵparseCookieValue"])(t,this.cookieName),this.lastCookieString=t),this.lastToken},t=Object(i.__decorate)([Object(r.Injectable)(),Object(i.__param)(0,Object(r.Inject)(c.DOCUMENT)),Object(i.__param)(1,Object(r.Inject)(r.PLATFORM_ID)),Object(i.__param)(2,Object(r.Inject)(L)),Object(i.__metadata)("design:paramtypes",[Object,String,String])],t)}(),V=function(){function t(t,e){this.tokenService=t,this.headerName=e}return t.prototype.intercept=function(t,e){var n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);var i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)},t=Object(i.__decorate)([Object(r.Injectable)(),Object(i.__param)(1,Object(r.Inject)(M)),Object(i.__metadata)("design:paramtypes",[z,String])],t)}(),H=function(){function t(t,e){this.backend=t,this.injector=e,this.chain=null}return t.prototype.handle=function(t){if(null===this.chain){var e=this.injector.get(O,[]);this.chain=e.reduceRight((function(t,e){return new C(t,e)}),this.backend)}return this.chain.handle(t)},t=Object(i.__decorate)([Object(r.Injectable)(),Object(i.__metadata)("design:paramtypes",[p,r.Injector])],t)}();function W(){return"object"==typeof window?window:{}}var K=function(){function t(){}var e;return e=t,t.disable=function(){return{ngModule:e,providers:[{provide:V,useClass:k}]}},t.withOptions=function(t){return void 0===t&&(t={}),{ngModule:e,providers:[t.cookieName?{provide:L,useValue:t.cookieName}:[],t.headerName?{provide:M,useValue:t.headerName}:[]]}},t=e=Object(i.__decorate)([Object(r.NgModule)({providers:[V,{provide:O,useExisting:V,multi:!0},{provide:z,useClass:R},{provide:L,useValue:"XSRF-TOKEN"},{provide:M,useValue:"X-XSRF-TOKEN"}]})],t)}(),q=function(){function t(){}return t=Object(i.__decorate)([Object(r.NgModule)({imports:[K.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})],providers:[I,{provide:l,useClass:H},A,{provide:p,useExisting:A},D,{provide:U,useExisting:D}]})],t)}(),Z=function(){function t(){}return t=Object(i.__decorate)([Object(r.NgModule)({providers:[P,{provide:T,useFactory:W},{provide:O,useClass:B,multi:!0}]})],t)}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.Failed=0]="Failed",t[t.Initial=1]="Initial",t[t.Selected=2]="Selected",t[t.Uploaded=3]="Uploaded",t[t.Uploading=4]="Uploading",t[t.Paused=5]="Paused"}(e.FileState||(e.FileState={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),r=function(){function t(){this._files={}}return t.prototype.add=function(t){var e=t.uid;this.has(e)?t.validationErrors&&t.validationErrors.length>0?this._files[e].unshift(t):this._files[e].push(t):this._files[e]=[t]},t.prototype.remove=function(t){this.has(t)&&(this._files[t]=null,delete this._files[t])},t.prototype.clear=function(){var t=this._files;for(var e in t)if(t.hasOwnProperty(e)){for(var n=0,i=t[e];n<i.length;n++){var r=i[n];r.httpSubscription&&r.httpSubscription.unsubscribe()}t[e]=null,delete t[e]}},t.prototype.has=function(t){return t in this._files},t.prototype.get=function(t){return this._files[t]},t.prototype.setFilesState=function(t,e){for(var n=0,i=t;n<i.length;n++){var r=i[n];this.setFilesStateByUid(r.uid,e)}},t.prototype.setFilesStateByUid=function(t,e){this.get(t).forEach((function(t){t.state=e}))},Object.defineProperty(t.prototype,"count",{get:function(){return Object.getOwnPropertyNames(this._files).length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"files",{get:function(){var t=this._files,e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filesFlat",{get:function(){var t=this._files,e=[];for(var n in t){if(t.hasOwnProperty(n))t[n].forEach((function(t){e.push(t)}))}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filesToUpload",{get:function(){var t=this._files,e=[];for(var n in t)if(t.hasOwnProperty(n)){for(var r=t[n],o=!0,s=0,a=r;s<a.length;s++){var u=a[s];(u.state!==i.FileState.Selected||u.validationErrors&&u.validationErrors.length>0)&&(o=!1)}o&&e.push(r)}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstFileToUpload",{get:function(){var t=this._files;for(var e in t)if(t.hasOwnProperty(e)){for(var n=t[e],r=!0,o=0,s=n;o<s.length;o++){var a=s[o];(a.state!==i.FileState.Selected||a.validationErrors&&a.validationErrors.length>0)&&(r=!1)}if(r)return n}return null},enumerable:!0,configurable:!0}),t.prototype.getFilesWithState=function(t){return this.filesFlat.filter((function(e){return e.state===t}))},t.prototype.hasFileWithState=function(t){var e=this._files;for(var n in e)if(e.hasOwnProperty(n))for(var i=0,r=e[n];i<r.length;i++){var o=r[i];if(t.indexOf(o.state)>=0)return!0}return!1},t}();e.FileMap=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(75);e.CancelEvent=i.CancelEvent;var r=n(76);e.ClearEvent=r.ClearEvent;var o=n(77);e.ErrorEvent=o.ErrorEvent;var s=n(78);e.PauseEvent=s.PauseEvent;var a=n(79);e.RemoveEvent=a.RemoveEvent;var u=n(80);e.ResumeEvent=u.ResumeEvent;var c=n(81);e.SelectEvent=c.SelectEvent;var l=n(82);e.SuccessEvent=l.SuccessEvent;var p=n(83);e.UploadEvent=p.UploadEvent;var d=n(84);e.UploadProgressEvent=d.UploadProgressEvent},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(24),o=n(4),s=n(34),a=n(57),u=n(87),c=n(60),l=n(61),p=n(62),d=n(63),h=n(66),f=n(67),v=n(31),b=n(88),y=n(68),m=n(69),_=n(70);e.SHARED_DECLARATIONS=[u.DropZoneInternalDirective,c.FileListComponent,l.FileListItemDirective,p.FileListItemActionButtonComponent,d.FileListMultipleItemsComponent,h.FileListSingleItemComponent,f.FileSelectDirective,b.LocalizedMessagesDirective,y.TemplateContextDirective],e.PUBLIC_DIRECTIVES=[v.FileTemplateDirective,r.FileInfoTemplateDirective,a.CustomMessagesComponent,m.UploadDropZoneDirective,_.UploadDropZoneComponent];var g=function(){function t(){}return t=i.__decorate([o.NgModule({declarations:[e.PUBLIC_DIRECTIVES,e.SHARED_DECLARATIONS],exports:[e.PUBLIC_DIRECTIVES,e.SHARED_DECLARATIONS,s.CommonModule],imports:[s.CommonModule]})],t)}();e.SharedModule=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(58),s=n(15),a=function(t){function e(e){var n=t.call(this)||this;return n.service=e,n}var n;return i.__extends(e,t),n=e,Object.defineProperty(e.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),e=n=i.__decorate([r.Component({providers:[{provide:o.Messages,useExisting:r.forwardRef((function(){return n}))}],selector:"kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages",template:""}),i.__metadata("design:paramtypes",[s.LocalizationService])],e)}(o.Messages);e.CustomMessagesComponent=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"cancel",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"clearSelectedFiles",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"dropFilesHere",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"externalDropFilesHere",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"filesBatchStatus",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"filesBatchStatusFailed",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"filesBatchStatusUploaded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"fileStatusFailed",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"fileStatusUploaded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"headerStatusPaused",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"headerStatusUploaded",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"headerStatusUploading",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"invalidFileExtension",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"invalidMaxFileSize",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"invalidMinFileSize",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"pause",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"remove",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"resume",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"retry",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"select",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"uploadSelectedFiles",void 0),e}(n(15).ComponentMessages);e.Messages=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=function(){function t(t,e,n){this.element=t,this.renderer=e,this.hideIntervalElement=null,this.hoverClass=n}return t.prototype.onElementDragEnterListener=function(){var t=this;return this.addClass(this.hoverClass),this.lastDragElement=new Date,this.hideIntervalElement||(this.hideIntervalElement=setInterval((function(){t.calculateTimeDiff(t.lastDragElement)<100||(t.removeClass(t.hoverClass),clearInterval(t.hideIntervalElement),t.hideIntervalElement=null)}),100)),!1},t.prototype.onElementDragOverListener=function(){return this.lastDragElement=new Date,!1},t.prototype.calculateTimeDiff=function(t){return(new Date).getTime()-t.getTime()},t.prototype.addClass=function(t){this.renderer.addClass(this.element.nativeElement,t)},t.prototype.removeClass=function(t){this.renderer.removeClass(this.element.nativeElement,t)},i.__decorate([r.HostListener("dragenter"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Boolean)],t.prototype,"onElementDragEnterListener",null),i.__decorate([r.HostListener("dragover"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Boolean)],t.prototype,"onElementDragOverListener",null),t}();e.DropZoneBase=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(29),s=n(17),a=n(31),u=n(61),c=n(23),l=n(16),p=n(24),d=function(){function t(t,e){this.uploadService=t,this.navigation=e,this.onItemFocus(),this.onItemAction()}return t.prototype.onItemFocus=function(){var t=this;this.focusSubscription=this.navigation.onFileFocus.subscribe((function(e){t.fileListItems.toArray()[e].focus()}))},t.prototype.onItemAction=function(){var t=this;this.actionSubscription=this.navigation.onFileAction.subscribe((function(e){t.itemActionHandler(e)}))},t.prototype.itemActionHandler=function(t){var e=this.navigation.focusedIndex,n=this.fileListItems.toArray()[e],i=n.uidAttribute,r=this.uploadService.files.get(i);if(t===o.Keys.Escape&&r[0].state===s.FileState.Uploading)return this.uploadService.cancelFiles(i),void this.navigation.focusSelectButton();t!==o.Keys.Enter||r[0].state!==s.FileState.Failed?t===o.Keys.Delete&&(r[0].state===s.FileState.Uploading?this.uploadService.cancelFiles(i):this.hasDelete(n)&&this.uploadService.removeFiles(i),this.navigation.focusSelectButton()):this.uploadService.retryFiles(i)},t.prototype.hasDelete=function(t){return t.element.nativeElement.getElementsByClassName("k-delete").length>0},t.prototype.ngOnDestroy=function(){this.focusSubscription.unsubscribe(),this.actionSubscription.unsubscribe()},i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],t.prototype,"fileList",void 0),i.__decorate([r.Input(),i.__metadata("design:type",a.FileTemplateDirective)],t.prototype,"fileTemplate",void 0),i.__decorate([r.Input(),i.__metadata("design:type",p.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),i.__decorate([r.ViewChildren(u.FileListItemDirective),i.__metadata("design:type",r.QueryList)],t.prototype,"fileListItems",void 0),t=i.__decorate([r.Component({selector:"[kendo-upload-file-list]",template:"\n <ng-template ngFor\n [ngForOf]=\"fileList\"\n let-files\n let-index=\"index\">\n <li kendoUploadFileListItem [files]='files' [index]='index'>\n <kendo-upload-file-list-single-item\n class='k-file-single'\n *ngIf='files.length === 1 && !fileTemplate'\n [disabled]='disabled'\n [file]='files[0]'\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </kendo-upload-file-list-single-item>\n <kendo-upload-file-list-multiple-items\n class='k-file-multiple'\n *ngIf='files.length > 1 && !fileTemplate'\n [disabled]='disabled'\n [files]='files'\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </kendo-upload-file-list-multiple-items>\n <ng-template *ngIf=\"fileTemplate\"\n [templateContext]=\"{\n templateRef: fileTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }\"></ng-template>\n </li>\n </ng-template>\n "}),i.__metadata("design:paramtypes",[l.UploadService,c.NavigationService])],t)}();e.FileListComponent=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(17),s=n(23),a=n(20),u=n(16),c=function(){function t(t,e,n){this.navigationService=e,this.uploadService=n,this.fileClass=!0,this.focused=!1,this.element=t}return t.prototype.focus=function(){this.element.nativeElement.focus()},Object.defineProperty(t.prototype,"uidAttribute",{get:function(){return this.files[0].uid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return"-1"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kFileError",{get:function(){return this.files[0].state===o.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kFileInvalid",{get:function(){return a.filesHaveValidationErrors(this.files)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kFileProgress",{get:function(){return this.files[0].state===o.FileState.Uploading||this.files[0].state===o.FileState.Paused},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kFileSuccess",{get:function(){return"Upload"===this.uploadService.component&&(this.files[0].state===o.FileState.Uploaded||this.files[0].state===o.FileState.Initial)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kStateFocused",{get:function(){return this.focused},enumerable:!0,configurable:!0}),t.prototype.onFocus=function(){this.focused=!0},t.prototype.onBlur=function(){this.focused=!1},t.prototype.onClick=function(t){a.isFocusable(t.target)||a.hasClasses(t.target,a.IGNORE_TARGET_CLASSES)||(this.navigationService.focusedIndex=this.index)},i.__decorate([r.Input(),i.__metadata("design:type",Array)],t.prototype,"files",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Number)],t.prototype,"index",void 0),i.__decorate([r.HostBinding("class.k-file"),i.__metadata("design:type",Boolean)],t.prototype,"fileClass",void 0),i.__decorate([r.HostBinding("attr.data-uid"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"uidAttribute",null),i.__decorate([r.HostBinding("attr.tabIndex"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"tabIndex",null),i.__decorate([r.HostBinding("class.k-file-error"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kFileError",null),i.__decorate([r.HostBinding("class.k-file-invalid"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kFileInvalid",null),i.__decorate([r.HostBinding("class.k-file-progress"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kFileProgress",null),i.__decorate([r.HostBinding("class.k-file-success"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kFileSuccess",null),i.__decorate([r.HostBinding("class.k-state-focused"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kStateFocused",null),i.__decorate([r.HostListener("focus"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"onFocus",null),i.__decorate([r.HostListener("blur"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"onBlur",null),i.__decorate([r.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"onClick",null),t=i.__decorate([r.Directive({selector:"[kendoUploadFileListItem]"}),i.__metadata("design:paramtypes",[r.ElementRef,s.NavigationService,u.UploadService])],t)}();e.FileListItemDirective=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(17),s=n(16),a=n(15),u=n(23),c=function(){function t(t,e,n){this.uploadService=t,this.localization=e,this.navigation=n,this.actionFocused=!1,this.retryFocused=!1,this.pauseResumeFocused=!1}return t.prototype.onFocus=function(t){"action"===t&&(this.actionFocused=!0),"retry"===t&&(this.retryFocused=!0),"pauseResume"===t&&(this.pauseResumeFocused=!0)},t.prototype.onBlur=function(t){"retry"===t&&(this.retryFocused=!1),"action"===t&&(this.actionFocused=!1),"pauseResume"===t&&(this.pauseResumeFocused=!1)},t.prototype.onRetryClick=function(){this.disabled||this.uploadService.retryFiles(this.file.uid)},t.prototype.onRemoveCancelClick=function(t){if(!this.disabled){t.stopImmediatePropagation();var e=this.file.uid;this.file.state===o.FileState.Uploading?this.uploadService.cancelFiles(e):this.uploadService.removeFiles(e),this.navigation.focusSelectButton()}},t.prototype.onPauseResumeClick=function(){if(!this.disabled){var t=this.file.uid;this.file.state===o.FileState.Paused?this.uploadService.resumeFile(t):this.uploadService.pauseFile(t)}},Object.defineProperty(t.prototype,"actionButtonTitle",{get:function(){return this.file.state===o.FileState.Uploading?this.localization.get("cancel"):this.localization.get("remove")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"retryButtonTitle",{get:function(){return this.localization.get("retry")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pauseResumeButtonTitle",{get:function(){return this.file.state===o.FileState.Uploading?this.localization.get("pause"):this.localization.get("resume")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUploading",{get:function(){return this.file.state===o.FileState.Uploading},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isFailed",{get:function(){return this.file.state===o.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPaused",{get:function(){return this.file.state===o.FileState.Paused},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isResumable",{get:function(){var t=this.uploadService,e=t.async.chunk&&t.chunk.resumable,n=this.file.state===o.FileState.Paused||this.file.state===o.FileState.Uploading;return e&&n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isActionButtonVisible",{get:function(){return!!(this.file.state!==o.FileState.Uploaded&&this.file.state!==o.FileState.Initial||this.uploadService.async.removeUrl||"Upload"!==this.uploadService.component)},enumerable:!0,configurable:!0}),i.__decorate([r.Input(),i.__metadata("design:type",Object)],t.prototype,"file",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Number)],t.prototype,"progress",void 0),t=i.__decorate([r.Component({selector:"kendo-upload-file-list-item-action-button",template:'\n <strong class="k-upload-status">\n <span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>\n\n <button type="button" *ngIf="isFailed" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.retryFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'retry\')"\n (blur)="onBlur(\'retry\')"\n (click)="onRetryClick()">\n <span class="k-icon k-button-icon k-retry k-i-refresh-sm"\n [attr.aria-label]="retryButtonTitle"\n [attr.title]="retryButtonTitle">\n </span>\n </button>\n\n <button *ngIf="isResumable" type="button" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.pauseResumeFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'pauseResume\')"\n (blur)="onBlur(\'pauseResume\')"\n (click)="onPauseResumeClick()">\n <span class="k-icon k-button-icon"\n [ngClass]="{\n \'k-i-play-sm\': isPaused,\n \'k-i-pause-sm\': !isPaused\n }"\n [attr.aria-label]=\'pauseResumeButtonTitle\'\n [attr.title]=\'pauseResumeButtonTitle\'>\n </span>\n </button>\n\n <button type="button" *ngIf="isActionButtonVisible" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.actionFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'action\')"\n (blur)="onBlur(\'action\')"\n (click)="onRemoveCancelClick($event)">\n <span class="k-icon k-button-icon"\n [ngClass]="{\n \'k-i-cancel\': isUploading,\n \'k-delete k-i-x\': !isUploading\n }"\n [attr.aria-label]=\'actionButtonTitle\'\n [attr.title]=\'actionButtonTitle\'>\n </span>\n </button>\n </strong>\n '}),i.__metadata("design:paramtypes",[s.UploadService,a.LocalizationService,u.NavigationService])],t)}();e.FileListItemActionButtonComponent=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(64),s=n(17),a=n(65),u=n(15),c=n(16),l=n(20),p=n(24),d=function(t){function e(e,n){var i=t.call(this,n)||this;return i.localization=e,i.subscribeUploadProgress((function(t){t.files[0].uid===i.files[0].uid&&(i.progressComplete=t.percentComplete)})),i}return i.__extends(e,t),Object.defineProperty(e.prototype,"showProgress",{get:function(){return this.files[0].state===s.FileState.Uploading||this.files[0].state===s.FileState.Paused?"active":"inactive"},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.filesHaveErrors=t.prototype.filesHaveValidationErrors.call(this,this.files)},e.prototype.fileStatusText=function(t){var e=t.validationErrors;return l.isPresent(e)?this.getFileValidationMessage(t):this.getTotalFilesSizeMessage([t])},Object.defineProperty(e.prototype,"batchStatusText",{get:function(){var t=this.files[0].state,e=this.files.length;return t===s.FileState.Uploaded?e+" "+this.textFor("filesBatchStatusUploaded"):t===s.FileState.Failed?e+" "+this.textFor("filesBatchStatusFailed"):e+" "+this.textFor("filesBatchStatus")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploadSuccessful",{get:function(){return this.files[0].state===s.FileState.Uploaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploadFailed",{get:function(){return this.files[0].state===s.FileState.Failed},enumerable:!0,configurable:!0}),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"files",void 0),i.__decorate([r.Input(),i.__metadata("design:type",p.FileInfoTemplateDirective)],e.prototype,"fileInfoTemplate",void 0),e=i.__decorate([r.Component({animations:[o.trigger("progressState",[o.state("active",o.style({opacity:1})),o.state("inactive",o.style({opacity:0})),o.transition("void => active",o.style({opacity:0})),o.transition("inactive => active",o.style({opacity:1})),o.transition("active => inactive",o.animate("1s 2s ease-out"))])],selector:"kendo-upload-file-list-multiple-items",template:'\n <div class="k-progressbar" [@progressState]="showProgress">\n <span class="k-progress" [style.width]="progressComplete + \'%\'"></span>\n </div>\n <span class="k-multiple-files-group-wrapper">\n <span class="k-file-group k-icon k-i-copy"></span>\n </span>\n <span class="k-multiple-files-wrapper">\n <ng-container *ngIf="!fileInfoTemplate">\n <span *ngFor="let file of files" class="k-file-name-size-wrapper">\n <span [title]="file.name" class="k-file-name">\n {{file.name}}\n </span>\n <span [ngClass]="{\n \'k-text-error\': file.validationErrors,\n \'k-file-validation-message\': file.validationErrors,\n \'k-file-size\': !file.validationErrors\n }"\n >{{fileStatusText(file)}}</span>\n </span>\n <span class="k-file-information"\n [ngClass]="{\n \'k-text-success\': isUploadSuccessful,\n \'k-text-error\': isUploadFailed\n }"\n >{{batchStatusText}}</span>\n </ng-container>\n <ng-template *ngIf="fileInfoTemplate"\n [templateContext]="{\n templateRef: fileInfoTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }">\n </ng-template>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]=\'files[0]\'\n [disabled]=\'disabled\'\n [progress]=\'progressComplete\'>\n </kendo-upload-file-list-item-action-button>\n '}),i.__metadata("design:paramtypes",[u.LocalizationService,c.UploadService])],e)}(a.FileListItemBase);e.FileListMultipleItemsComponent=d},function(t,e){t.exports=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(20),r=function(){function t(t){this.uploadService=t,this.progressComplete=0}return t.prototype.subscribeUploadProgress=function(t){this.uploadProgressSubscription=this.uploadService.uploadProgressEvent.subscribe(t)},t.prototype.fileHasValidationErrors=function(t){return i.fileHasValidationErrors(t)},t.prototype.filesHaveValidationErrors=function(t){return i.filesHaveValidationErrors(t)},t.prototype.ngOnDestroy=function(){this.uploadProgressSubscription.unsubscribe()},t.prototype.getFileValidationMessage=function(t){var e;return t.validationErrors&&t.validationErrors.length>0&&(e=this.localization.get(t.validationErrors[0])),e},t.prototype.getTotalFilesSizeMessage=function(t){return i.getTotalFilesSizeMessage(t)},t.prototype.textFor=function(t){return this.localization.get(t)},t}();e.FileListItemBase=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(64),s=n(17),a=n(65),u=n(15),c=n(16),l=n(20),p=n(24),d=function(t){function e(e,n){var i=t.call(this,n)||this;return i.localization=e,i.subscribeUploadProgress((function(t){t.files[0].uid===i.file.uid&&(i.progressComplete=t.percentComplete)})),i}return i.__extends(e,t),Object.defineProperty(e.prototype,"fileStatusText",{get:function(){var t=this.file.validationErrors;return this.file.state===s.FileState.Uploaded?""+this.textFor("fileStatusUploaded"):this.file.state===s.FileState.Failed?""+this.textFor("fileStatusFailed"):l.isPresent(t)?this.getFileValidationMessage(this.file):this.getTotalFilesSizeMessage([this.file])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showProgress",{get:function(){return this.file.state===s.FileState.Uploading||this.file.state===s.FileState.Paused?"active":"inactive"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fileGroupClass",{get:function(){return l.getFileGroupCssClass(this.file.extension?this.file.extension:"")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploadSuccessful",{get:function(){return this.file.state===s.FileState.Uploaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploadFailed",{get:function(){return this.file.state===s.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isNotYetUploaded",{get:function(){return!this.isUploadFailed&&!this.isUploadSuccessful},enumerable:!0,configurable:!0}),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"file",void 0),i.__decorate([r.Input(),i.__metadata("design:type",p.FileInfoTemplateDirective)],e.prototype,"fileInfoTemplate",void 0),e=i.__decorate([r.Component({animations:[o.trigger("progressState",[o.state("active",o.style({opacity:1})),o.state("inactive",o.style({opacity:0})),o.transition("void => active",o.style({opacity:0})),o.transition("inactive => active",o.style({opacity:1})),o.transition("active => inactive",o.animate("1s 2s ease-out"))])],selector:"kendo-upload-file-list-single-item",template:'\n <div class="k-progressbar" [@progressState]="showProgress">\n <span class="k-progress" [style.width]="progressComplete + \'%\'"></span>\n </div>\n <span class="k-file-group-wrapper">\n <span class="k-file-group k-icon" [ngClass]="fileGroupClass"></span>\n </span>\n <span class="k-file-name-size-wrapper">\n <ng-container *ngIf="!fileInfoTemplate">\n <span class="k-file-name" [title]="file.name">{{ file.name }}</span>\n <span [ngClass]="{\n \'k-file-validation-message\': file.validationErrors,\n \'k-file-size\': !file.validationErrors && isNotYetUploaded,\n \'k-text-success\': isUploadSuccessful,\n \'k-text-error\': file.validationErrors || isUploadFailed,\n \'k-file-information\': isUploadSuccessful || isUploadFailed\n }"\n >{{fileStatusText}}</span>\n </ng-container>\n <ng-template *ngIf="fileInfoTemplate"\n [templateContext]="{\n templateRef: fileInfoTemplate.templateRef,\n state: file.state,\n $implicit: [file]\n }">\n </ng-template>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]=\'file\'\n [disabled]=\'disabled\'\n [progress]=\'progressComplete\'>\n </kendo-upload-file-list-item-action-button>\n '}),i.__metadata("design:paramtypes",[u.LocalizationService,c.UploadService])],e)}(a.FileListItemBase);e.FileListSingleItemComponent=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(23),s=n(16),a=n(20),u=n(44),c=function(){function t(t,e,n){this.uploadService=t,this.navigation=e,this.type="file",this.autocomplete="off",this.tabIndex=-1,this.element=n}return Object.defineProperty(t.prototype,"nameAttribute",{get:function(){return this.uploadService.async.saveField},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"multipleAttribute",{get:function(){return this.multiple?"multiple":null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirAttribute",{get:function(){return this.dir},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabledAttribute",{get:function(){return this.disabled?"true":null},enumerable:!0,configurable:!0}),t.prototype.onInputChange=function(t){var e=this,n=navigator.userAgent,i=a.inputFiles(t.target);i=a.assignGuidToFiles(i,!this.uploadService.async.batch),u.validateFiles(i,this.restrictions),this.multiple||this.uploadService.clearFiles(),this.uploadService.addFiles(i);var r=this.element.nativeElement;(n.match(/(webkit)[ \/]([\w.]+)/i)||n.match(/(windows)[ \/]([\w.]+)/i))&&(r.type="",r.type="file"),setTimeout((function(){e.navigation.focusedIndex=-1}))},i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"dir",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",Object)],t.prototype,"restrictions",void 0),i.__decorate([r.HostBinding("attr.type"),i.__metadata("design:type",String)],t.prototype,"type",void 0),i.__decorate([r.HostBinding("attr.autocomplete"),i.__metadata("design:type",String)],t.prototype,"autocomplete",void 0),i.__decorate([r.HostBinding("attr.tabindex"),i.__metadata("design:type",Number)],t.prototype,"tabIndex",void 0),i.__decorate([r.HostBinding("attr.name"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"nameAttribute",null),i.__decorate([r.HostBinding("attr.multiple"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"multipleAttribute",null),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"dirAttribute",null),i.__decorate([r.HostBinding("attr.disabled"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"disabledAttribute",null),i.__decorate([r.HostListener("change",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"onInputChange",null),t=i.__decorate([r.Directive({selector:"[kendoFileSelect]"}),i.__metadata("design:paramtypes",[s.UploadService,o.NavigationService,r.ElementRef])],t)}();e.FileSelectDirective=c},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.viewContainerRef=t}return Object.defineProperty(t.prototype,"templateContext",{set:function(t){this.insertedViewRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)),this.insertedViewRef=void 0),t.templateRef&&(this.insertedViewRef=this.viewContainerRef.createEmbeddedView(t.templateRef,t))},enumerable:!0,configurable:!0}),i.__decorate([r.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],t.prototype,"templateContext",null),t=i.__decorate([r.Directive({selector:"[templateContext]"}),i.__metadata("design:paramtypes",[r.ViewContainerRef])],t)}();e.TemplateContextDirective=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(20),s=n(44),a=n(43),u=n(45),c=function(){function t(t){this.dropZoneService=t}return t.prototype.onElementDragEnter=function(){return!1},t.prototype.onElementDragOver=function(){return!1},t.prototype.onDropListener=function(t){var e=this.componentInstance;if(o.isPresent(e))return e.forEach((function(e){var n=t.dataTransfer.files;if(n.length>0&&!e.disabled){var i=o.getAllFileInfo(n);i=e instanceof u.UploadComponent?o.assignGuidToFiles(i,!e.batch):o.assignGuidToFiles(i,!0),e.multiple||(i.splice(1,i.length-1),e.clearFiles()),s.validateFiles(i,e.restrictions),e.addFiles(i)}})),!1},Object.defineProperty(t.prototype,"componentInstance",{get:function(){return this.dropZoneService.getComponents(this.zoneId)},enumerable:!0,configurable:!0}),i.__decorate([r.Input("kendoUploadDropZone"),i.__metadata("design:type",String)],t.prototype,"zoneId",void 0),i.__decorate([r.HostListener("dragenter"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Boolean)],t.prototype,"onElementDragEnter",null),i.__decorate([r.HostListener("dragover"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Boolean)],t.prototype,"onElementDragOver",null),i.__decorate([r.HostListener("drop",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",Boolean)],t.prototype,"onDropListener",null),t=i.__decorate([r.Directive({providers:[a.DropZoneService],selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]"}),i.__metadata("design:paramtypes",[a.DropZoneService])],t)}();e.UploadDropZoneDirective=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(15),s=function(t){function e(e,n,i){var r=t.call(this,e,n,"k-external-dropzone-hover")||this;return r.localization=i,r.hostClass=!0,r.localizationChangeSubscription=r.localization.changes.subscribe((function(t){var e=t.rtl;r.direction=e?"rtl":"ltr"})),r}return i.__extends(e,t),Object.defineProperty(e.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!0,configurable:!0}),e.prototype.textFor=function(t){return this.localization.get(t)},Object.defineProperty(e.prototype,"iconClasses",{get:function(){return this.icon?"k-icon k-i-"+this.icon:this.iconClass?""+this.iconClass:"k-icon k-i-upload"},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},i.__decorate([r.HostBinding("class.k-external-dropzone"),i.__metadata("design:type",Boolean)],e.prototype,"hostClass",void 0),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],e.prototype,"dirAttribute",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"zoneId",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"icon",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"iconClass",void 0),e=i.__decorate([r.Component({exportAs:"kendoUploadDropZone",providers:[o.LocalizationService,{provide:o.L10N_PREFIX,useValue:"kendo.uploaddropzone"}],selector:"kendo-uploaddropzone",template:"\n <ng-container kendoUploadDropZoneLocalizedMessages\n i18n-externalDropFilesHere='kendo.uploaddropzone.externalDropFilesHere|Sets the external drop-zone hint'\n externalDropFilesHere='Drag and drop files here to upload'\n >\n </ng-container>\n <div class='k-dropzone-inner' [kendoUploadDropZone]=\"zoneId\">\n <span [ngClass]=\"iconClasses\"></span>\n <span class=\"k-dropzone-hint\">{{ textFor('externalDropFilesHere') }}</span>\n <span class=\"k-dropzone-note\">\n <ng-content></ng-content>\n </span>\n </div>\n "}),i.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2,o.LocalizationService])],e)}(n(59).DropZoneBase);e.UploadDropZoneComponent=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(45),s=n(72),a=n(73),u=n(56),c=[o.UploadComponent,s.UploadActionButtonsComponent,a.UploadStatusTotalComponent],l=function(){function t(){}return t=i.__decorate([r.NgModule({declarations:[c],exports:[u.PUBLIC_DIRECTIVES,c],imports:[u.SharedModule]})],t)}();e.UploadModule=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(16),s=n(15),a=n(23),u=function(){function t(t,e,n){this.uploadService=t,this.localization=e,this.navigation=n,this.hostDefaultClass=!0,this.onAction(),this.onFocus()}return Object.defineProperty(t.prototype,"actionButtonsEndClassName",{get:function(){return"end"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionButtonsStretchedClassName",{get:function(){return"stretched"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionButtonsStartClassName",{get:function(){return"start"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionButtonsCenterClassName",{get:function(){return"center"===this.actionsLayout},enumerable:!0,configurable:!0}),t.prototype.onAction=function(){var t=this;this.actionSubscription=this.navigation.onActionButtonAction.subscribe((function(e){"clear"===e?t.clearFiles():t.performUpload()}))},t.prototype.onFocus=function(){var t=this;this.focusSubscription=this.navigation.onActionButtonFocus.subscribe((function(e){t.focusButton(e)}))},t.prototype.focusButton=function(t){("clear"===t?this.clearButton:this.uploadButton).nativeElement.focus()},t.prototype.ngOnDestroy=function(){this.actionSubscription.unsubscribe(),this.focusSubscription.unsubscribe()},t.prototype.onUploadButtonClick=function(t){t.stopImmediatePropagation(),this.performUpload()},t.prototype.performUpload=function(){this.disabled||(this.uploadService.uploadFiles(),this.navigation.focusSelectButton())},t.prototype.onClearButtonClick=function(t){t.stopImmediatePropagation(),this.clearFiles()},t.prototype.clearFiles=function(){this.disabled||(this.uploadService.clearFiles(),this.navigation.focusSelectButton())},t.prototype.textFor=function(t){return this.localization.get(t)},i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"actionsLayout",void 0),i.__decorate([r.ViewChild("clearButton",{static:!0}),i.__metadata("design:type",r.ElementRef)],t.prototype,"clearButton",void 0),i.__decorate([r.ViewChild("uploadButton",{static:!0}),i.__metadata("design:type",r.ElementRef)],t.prototype,"uploadButton",void 0),i.__decorate([r.HostBinding("class.k-actions"),i.__metadata("design:type",Boolean)],t.prototype,"hostDefaultClass",void 0),i.__decorate([r.HostBinding("class.k-actions-end"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"actionButtonsEndClassName",null),i.__decorate([r.HostBinding("class.k-actions-stretched"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"actionButtonsStretchedClassName",null),i.__decorate([r.HostBinding("class.k-actions-start"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"actionButtonsStartClassName",null),i.__decorate([r.HostBinding("class.k-actions-center"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"actionButtonsCenterClassName",null),t=i.__decorate([r.Component({selector:"kendo-upload-action-buttons",template:'\n <button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"\n [attr.tabIndex]="-1"\n (click)="onClearButtonClick($event)">\n {{textFor(\'clearSelectedFiles\')}}\n </button>\n <button #uploadButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"\n [attr.tabIndex]="-1"\n (click)="onUploadButtonClick($event)">\n {{textFor(\'uploadSelectedFiles\')}}\n </button>\n '}),i.__metadata("design:paramtypes",[o.UploadService,s.LocalizationService,a.NavigationService])],t)}();e.UploadActionButtonsComponent=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(54),s=n(17),a=n(15),u=function(){function t(t){this.localization=t}return t.prototype.ngDoCheck=function(){this.isPaused=this.fileList.hasFileWithState([s.FileState.Paused]),this.isFailed=this.fileList.hasFileWithState([s.FileState.Failed]),this.isUploading=this.fileList.hasFileWithState([s.FileState.Uploading]),this.isPaused&&!this.isUploading?this.statusText=this.localization.get("headerStatusPaused"):this.statusText=this.isUploading?this.localization.get("headerStatusUploading"):this.localization.get("headerStatusUploaded")},i.__decorate([r.Input(),i.__metadata("design:type",o.FileMap)],t.prototype,"fileList",void 0),t=i.__decorate([r.Component({selector:"kendo-upload-status-total",template:"\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-checkmark': !this.isUploading && !this.isFailed,\n 'k-i-exception': !this.isUploading && this.isFailed,\n 'k-i-upload': this.isUploading,\n 'k-i-pause-sm': this.isPaused\n }\">\n </span>\n {{statusText}}\n "}),i.__metadata("design:paramtypes",[a.LocalizationService])],t)}();e.UploadStatusTotalComponent=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(47);e.FileSelectModule=r.FileSelectModule;var o=n(71);e.UploadModule=o.UploadModule;var s=n(89);e.UploadsModule=s.UploadsModule;var a=n(45);e.UploadComponent=a.UploadComponent;var u=n(48);e.FileSelectComponent=u.FileSelectComponent;var c=n(70);e.UploadDropZoneComponent=c.UploadDropZoneComponent;var l=n(67);e.FileSelectDirective=l.FileSelectDirective;var p=n(60);e.FileListComponent=p.FileListComponent;var d=n(66);e.FileListSingleItemComponent=d.FileListSingleItemComponent;var h=n(62);e.FileListItemActionButtonComponent=h.FileListItemActionButtonComponent;var f=n(63);e.FileListMultipleItemsComponent=f.FileListMultipleItemsComponent;var v=n(31);e.FileTemplateDirective=v.FileTemplateDirective;var b=n(24);e.FileInfoTemplateDirective=b.FileInfoTemplateDirective;var y=n(68);e.TemplateContextDirective=y.TemplateContextDirective;var m=n(73);e.UploadStatusTotalComponent=m.UploadStatusTotalComponent;var _=n(72);e.UploadActionButtonsComponent=_.UploadActionButtonsComponent;var g=n(69);e.UploadDropZoneDirective=g.UploadDropZoneDirective;var S=n(57);e.CustomMessagesComponent=S.CustomMessagesComponent,i.__exportStar(n(55),e),i.__exportStar(n(17),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){this.files=t};e.CancelEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(t){function e(){return t.call(this)||this}return i.__extends(e,t),e}(n(30).PreventableEvent);e.ClearEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e,n){this.files=t,this.operation=e,this.response=n};e.ErrorEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){this.file=t};e.PauseEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(t){function e(e,n){var i=t.call(this)||this;return i.files=e,i.headers=n,i}return i.__extends(e,t),e}(n(30).PreventableEvent);e.RemoveEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){this.file=t};e.ResumeEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(t){function e(e){var n=t.call(this)||this;return n.files=e,n}return i.__extends(e,t),e}(n(30).PreventableEvent);e.SelectEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(t){function e(e,n,i){var r=t.call(this)||this;return r.files=e,r.operation=n,r.response=i,r}return i.__extends(e,t),e}(n(30).PreventableEvent);e.SuccessEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(t){function e(e,n){var i=t.call(this)||this;return i.files=e,i.headers=n,i}return i.__extends(e,t),e}(n(30).PreventableEvent);e.UploadEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){this.files=t,this.percentComplete=e};e.UploadProgressEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fileGroupMap={audio:[".aif",".iff",".m3u",".m4a",".mid",".mp3",".mpa",".wav",".wma",".ogg",".wav",".wma",".wpl"],video:[".3g2",".3gp",".avi",".asf",".flv",".m4u",".rm",".h264",".m4v",".mkv",".mov",".mp4",".mpg",".rm",".swf",".vob",".wmv"],image:[".ai",".dds",".heic",".jpe","jfif",".jif",".jp2",".jps",".eps",".bmp",".gif",".jpeg",".jpg",".png",".ps",".psd",".svg",".svgz",".tif",".tiff"],txt:[".doc",".docx",".log",".pages",".tex",".wpd",".wps",".odt",".rtf",".text",".txt",".wks"],presentation:[".key",".odp",".pps",".ppt",".pptx"],data:[".xlr",".xls",".xlsx"],programming:[".tmp",".bak",".msi",".cab",".cpl",".cur",".dll",".dmp",".drv",".icns",".ico",".link",".sys",".cfg",".ini",".asp",".aspx",".cer",".csr",".css",".dcr",".htm",".html",".js",".php",".rss",".xhtml"],pdf:[".pdf"],config:[".apk",".app",".bat",".cgi",".com",".exe",".gadget",".jar",".wsf"],zip:[".7z",".cbr",".gz",".sitx",".arj",".deb",".pkg",".rar",".rpm",".tar.gz",".z",".zip",".zipx"],discImage:[".dmg",".iso",".toast",".vcd",".bin",".cue",".mdf"]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this._files={}}return t.prototype.add=function(t,e){var n={index:0,position:0,retries:0,totalChunks:e};return this._files[t]=n,n},t.prototype.remove=function(t){this.has(t)&&(this._files[t]=null,delete this._files[t])},t.prototype.has=function(t){return t in this._files},t.prototype.get=function(t){return this._files[t]},t}();e.ChunkMap=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(20),s=n(44),a=n(59),u=n(16),c=function(t){function e(e,n,i,r){var o=t.call(this,e,n,"k-dropzone-hover")||this;return o.ngZone=i,o.uploadService=r,o.initialClassName=!0,o.hideIntervalDocument=null,o.activeClass="k-dropzone-active",o.ngZone.runOutsideAngular((function(){o.unsubscribeDocumentDragEnter=o.renderer.listen("document","dragenter",(function(){return o.onDocumentDragEnter()})),o.unsubscribeDocumentDragOver=o.renderer.listen("document","dragover",(function(){return o.onDocumentDragOver()}))})),o}return i.__extends(e,t),e.prototype.ngOnDestroy=function(){var t=this;this.ngZone.runOutsideAngular((function(){t.unsubscribeDocumentDragEnter&&t.unsubscribeDocumentDragEnter(),t.unsubscribeDocumentDragOver&&t.unsubscribeDocumentDragOver()}))},e.prototype.onDocumentDragEnter=function(){var t=this;return this.addClass(this.activeClass),this.lastDragDocument=new Date,this.hideIntervalDocument||(this.hideIntervalDocument=setInterval((function(){t.calculateTimeDiff(t.lastDragDocument)<100||(t.removeClass(t.activeClass),clearInterval(t.hideIntervalDocument),t.hideIntervalDocument=null)}),100)),!1},e.prototype.onDocumentDragOver=function(){return this.lastDragDocument=new Date,!1},e.prototype.onDropListener=function(t){var e=t.dataTransfer.files;if(e.length>0&&!this.disabled){var n=o.getAllFileInfo(e);n=o.assignGuidToFiles(n,!this.uploadService.async.batch),this.multiple||(n.splice(1,n.length-1),this.uploadService.clearFiles()),s.validateFiles(n,this.restrictions),this.uploadService.addFiles(n)}return!1},i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"multiple",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"restrictions",void 0),i.__decorate([r.HostBinding("class.k-dropzone"),i.__metadata("design:type",Boolean)],e.prototype,"initialClassName",void 0),i.__decorate([r.HostListener("drop",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",Boolean)],e.prototype,"onDropListener",null),e=i.__decorate([r.Directive({selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n "}),i.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2,r.NgZone,u.UploadService])],e)}(a.DropZoneBase);e.DropZoneInternalDirective=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(58),s=n(15),a=function(t){function e(e){var n=t.call(this)||this;return n.service=e,n}var n;return i.__extends(e,t),n=e,e=n=i.__decorate([r.Directive({providers:[{provide:o.Messages,useExisting:r.forwardRef((function(){return n}))}],selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "}),i.__metadata("design:paramtypes",[s.LocalizationService])],e)}(o.Messages);e.LocalizedMessagesDirective=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(4),o=n(47),s=n(71),a=function(){function t(){}return t=i.__decorate([r.NgModule({exports:[o.FileSelectModule,s.UploadModule]})],t)}();e.UploadsModule=a}])}));
|
|
5
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@angular/forms"),require("rxjs"),require("@progress/kendo-licensing"),require("@angular/common/http"),require("@angular/animations"),require("@angular/common")):"function"==typeof define&&define.amd?define([,,,,,,,,,],e):"object"==typeof exports?exports.KendoAngularUpload=e(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@angular/forms"),require("rxjs"),require("@progress/kendo-licensing"),require("@angular/common/http"),require("@angular/animations"),require("@angular/common")):t.KendoAngularUpload=e(t.self,t.ng.core,t.KendoAngularL10N,t.KendoAngularCommon,t.ng.forms,t.rxjs,t.KendoLicensing,t.ng.common.http,t.ng.animations,t.ng.common)}(window,(function(t,e,n,i,o,r,s,u,a,c){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.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 o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));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=43)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(20),r=n(1),s=n(4),u=n(22),a=n(23),c=n(5),l=n(55),p=function(){function t(t){this.http=t,this.cancelEvent=new r.EventEmitter,this.clearEvent=new r.EventEmitter,this.completeEvent=new r.EventEmitter,this.errorEvent=new r.EventEmitter,this.pauseEvent=new r.EventEmitter,this.removeEvent=new r.EventEmitter,this.resumeEvent=new r.EventEmitter,this.selectEvent=new r.EventEmitter,this.successEvent=new r.EventEmitter,this.uploadEvent=new r.EventEmitter,this.uploadProgressEvent=new r.EventEmitter,this.changeEvent=new r.EventEmitter,this.async={autoUpload:!0,batch:!1,chunk:!1,concurrent:!0,removeField:"fileNames",removeHeaders:new o.HttpHeaders,removeMethod:"POST",removeUrl:"",responseType:"json",saveField:"files",saveHeaders:new o.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 u.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 a.SelectEvent(t);if(this.selectEvent.emit(e),!e.isDefaultPrevented()){for(var n=0,i=t;n<i.length;n++){var o=i[n];this.fileList.add(o)}this.async.autoUpload&&this.uploadFiles()}if("FileSelect"===this.component){var r=this.fileList.filesFlat;this.changeEvent.emit(r.length>0?r: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 a.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 a.PauseEvent(e)),this.fileList.setFilesStateByUid(t,s.FileState.Paused)},t.prototype.removeFiles=function(t){var e=this.fileList.get(t),n=new a.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 a.CancelEvent(e);this.cancelEvent.emit(n);for(var i=0,o=e;i<o.length;i++){var r=o[i];r.httpSubscription&&r.httpSubscription.unsubscribe()}this.fileList.remove(t),this.checkAllComplete()},t.prototype.clearFiles=function(){var t=new a.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 a.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,o=t;i<o.length;i++){var r=e(o[i]);if("object"==typeof r)return r.value}},t.prototype.performRemove=function(t,e){var n=this,i=this.async,r=t.map((function(t){return t.name})),s=this.populateRemoveFormData(r,e.data),u=this.populateRequestOptions(e.headers),a=new o.HttpRequest(i.removeMethod,i.removeUrl,s,u);this.http.request(a).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,r=this.populateUploadFormData(t,e.data),s=this.populateRequestOptions(e.headers),u=new o.HttpRequest(i.saveMethod,i.saveUrl,r,s);return this.http.request(u).subscribe((function(e){e.type!==o.HttpEventType.UploadProgress||n.async.chunk?e instanceof o.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 a.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 o=this.chunk.maxAutoRetries,r=this.chunkMap.get(e[0].uid);if(r.retries<o)return r.retries+=1,void setTimeout((function(){i.retryFiles(e[0].uid)}),this.chunk.autoRetryAfter)}var u=new a.ErrorEvent(e,n,t);this.errorEvent.emit(u),"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 a.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 a.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 o.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 o=0,r=t;o<r.length;o++){var s=r[o];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,o=t;i<o.length;i++){var r=o[i];n.append(this.async.removeField,r)}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([r.Injectable(),i.__metadata("design:paramtypes",[o.HttpClient])],t)}();e.UploadService=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(21);e.FileState=i.FileState},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),o=n(8),r=n(54);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=o.guid()),t},e.convertFileToFileInfo=function(t){var e=u(t);return e.uid=o.guid(),e.state=i.FileState.Selected,e};var u=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(u(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 o=i[n];if(e.fileHasValidationErrors(o))return!0}return!1},e.inputFiles=function(t){return t.files?e.getAllFileInfo(t.files):t.value.split("|").map((function(t,e){var n,o,r=t.trim();return{extension:s(r),name:(n=r,o=n.lastIndexOf("\\"),-1!==o?n.substr(o+1):n),rawFile:null,size:1e3*(e+1),state:i.FileState.Selected}}))},e.assignGuidToFiles=function(t,e){var n=o.guid();return t.map((function(t){return t.uid=e?o.guid():n,t}))},e.supportsFormData=function(){return"undefined"!=typeof FormData},e.userAgent=function(){return navigator.userAgent};var a=/^(?: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"),o=null!==i&&!isNaN(i)&&i>-1;return(a.test(n)?!t.disabled:o)&&(!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 r.fileGroupMap)if(r.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";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(3),s=n(8),u=function(){function t(t){this.uploadService=t,this.onActionButtonAction=new o.EventEmitter,this.onActionButtonFocus=new o.EventEmitter,this.onFileAction=new o.EventEmitter,this.onFileFocus=new o.EventEmitter,this.onTab=new o.EventEmitter,this.onWrapperFocus=new o.EventEmitter,this.onSelectButtonFocus=new o.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([o.Injectable(),i.__metadata("design:paramtypes",[r.UploadService])],t)}();e.NavigationService=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=function(){function t(t){this.templateRef=t}return t=i.__decorate([o.Directive({selector:"[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]"}),i.__metadata("design:paramtypes",[o.TemplateRef])],t)}();e.FileInfoTemplateDirective=r},function(t,e){t.exports=i},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),o=n(1),r=function(){function t(t){this.templateRef=t}return t=i.__decorate([o.Directive({selector:"[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]"}),i.__metadata("design:paramtypes",[o.TemplateRef])],t)}();e.FileTemplateDirective=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r={},s=function(){function t(){}return t.prototype.addComponent=function(t,e){this.has(e)?r[e].push(t):r[e]=[t]},t.prototype.getComponents=function(t){return r[t]},t.prototype.has=function(t){return t in r},t=i.__decorate([o.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))},o=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,r=e.allowedExtensions.map((function(t){return("."===t.substring(0,1)?t:"."+t).toLowerCase()})),s=e.maxFileSize,u=e.minFileSize;for(n=0;n<t.length;n++)i(t[n],r),o(t[n],u,s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(20),r=n(1),s=n(16),u=n(8),a=n(2),c=n(17),l=n(42),p=n(18),d=n(19),h=n(4),f=n(6),v=n(10),y=n(3),b=n(5),m=n(11),_=n(7);e.UPLOAD_VALUE_ACCESSOR={multi:!0,provide:s.NG_VALUE_ACCESSOR,useExisting:r.forwardRef((function(){return g}))};var g=function(){function t(t,e,n,i,o,s,a,c){var l=this;this.uploadService=t,this.localization=e,this.navigation=n,this.dropZoneService=i,this._ngZone=o,this.renderer=s,this.cdr=a,this.chunkable=!1,this.multiple=!0,this.disabled=!1,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+u.guid(),this.actionsLayout="end",this.onBlur=new r.EventEmitter,this.cancel=new r.EventEmitter,this.clear=new r.EventEmitter,this.complete=new r.EventEmitter,this.error=new r.EventEmitter,this.onFocus=new r.EventEmitter,this.pause=new r.EventEmitter,this.remove=new r.EventEmitter,this.resume=new r.EventEmitter,this.select=new r.EventEmitter,this.success=new r.EventEmitter,this.upload=new r.EventEmitter,this.uploadProgress=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){},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(u.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!==u.Keys.Enter&&t.keyCode!==u.Keys.Space||t.target!==this.fileSelectButton.nativeElement?void((b.hasClasses(t.target,b.UPLOAD_CLASSES)||!b.isFocusable(t.target)&&!b.hasClasses(t.target,b.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){b.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(r.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;u.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([r.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"autoUpload",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"batch",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"withCredentials",null),i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"saveField",null),i.__decorate([r.Input(),i.__metadata("design:type",o.HttpHeaders),i.__metadata("design:paramtypes",[o.HttpHeaders])],t.prototype,"saveHeaders",null),i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"saveMethod",null),i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"saveUrl",null),i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"responseType",null),i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"removeField",null),i.__decorate([r.Input(),i.__metadata("design:type",o.HttpHeaders),i.__metadata("design:paramtypes",[o.HttpHeaders])],t.prototype,"removeHeaders",null),i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"removeMethod",null),i.__decorate([r.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"removeUrl",null),i.__decorate([r.Input(),i.__metadata("design:type",Object)],t.prototype,"chunkable",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],t.prototype,"concurrent",null),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"multiple",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,"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",String)],t.prototype,"zoneId",void 0),i.__decorate([r.Input("tabIndex"),i.__metadata("design:type",Number),i.__metadata("design:paramtypes",[Number])],t.prototype,"tabIndex",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"accept",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,"focusableId",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"actionsLayout",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(_.FileInfoTemplateDirective,{static:!1}),i.__metadata("design:type",_.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(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"cancel",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"clear",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"complete",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"error",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,"pause",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,"resume",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,"success",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"upload",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"uploadProgress",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:"kendoUpload",providers:[a.LocalizationService,f.NavigationService,y.UploadService,m.DropZoneService,e.UPLOAD_VALUE_ACCESSOR,{provide:a.L10N_PREFIX,useValue:"kendo.upload"},{provide:u.KendoInput,useExisting:r.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",[y.UploadService,a.LocalizationService,f.NavigationService,m.DropZoneService,r.NgZone,r.Renderer2,r.ChangeDetectorRef,r.ElementRef])],t)}();e.UploadComponent=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(15),s=n(24),u=[r.FileSelectComponent],a=function(){function t(){}return t=i.__decorate([o.NgModule({declarations:[u],exports:[s.PUBLIC_DIRECTIVES,u],imports:[s.SharedModule]})],t)}();e.FileSelectModule=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(16),s=n(2),u=n(8),a=n(17),c=n(42),l=n(18),p=n(19),d=n(3),h=n(6),f=n(5),v=n(10),y=n(21),b=n(11),m=n(7);e.FILESELECT_VALUE_ACCESSOR={multi:!0,provide:r.NG_VALUE_ACCESSOR,useExisting:o.forwardRef((function(){return _}))};var _=function(){function t(t,e,n,i,r,s,a,c){var d=this;this.uploadService=t,this.localization=e,this.navigation=n,this.dropZoneService=i,this.ngZone=r,this.renderer=s,this.cdr=a,this.disabled=!1,this.multiple=!0,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+u.guid(),this.onBlur=new o.EventEmitter,this.onFocus=new o.EventEmitter,this.select=new o.EventEmitter,this.remove=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){},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!==u.Keys.Enter&&t.keyCode!==u.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;u.isDocumentAvailable()&&this.ngZone.runOutsideAngular((function(){t.documentClick=a.fromEvent(document,"click").pipe(c.filter((function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))}))),t.blurSubscription=a.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===y.FileState.Initial&&n.push(t),t.state===y.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([o.Input(),i.__metadata("design:type",String)],t.prototype,"accept",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,"multiple",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[String])],t.prototype,"name",null),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",Object),i.__metadata("design:paramtypes",[Object])],t.prototype,"restrictions",null),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"zoneId",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"focusableId",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(m.FileInfoTemplateDirective,{static:!1}),i.__metadata("design:type",m.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("focus"),i.__metadata("design:type",o.EventEmitter)],t.prototype,"onFocus",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,"remove",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:"kendoFileSelect",providers:[s.LocalizationService,h.NavigationService,d.UploadService,b.DropZoneService,e.FILESELECT_VALUE_ACCESSOR,{provide:s.L10N_PREFIX,useValue:"kendo.fileselect"},{provide:u.KendoInput,useExisting:o.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,b.DropZoneService,o.NgZone,o.Renderer2,o.ChangeDetectorRef,o.ElementRef])],t)}();e.FileSelectComponent=_},function(t,e){t.exports=o},function(t,e){t.exports=r},function(t,e){t.exports=s},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:1646671545,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){t.exports=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.Failed=0]="Failed",t[t.Initial=1]="Initial",t[t.Selected=2]="Selected",t[t.Uploaded=3]="Uploaded",t[t.Uploading=4]="Uploading",t[t.Paused=5]="Paused"}(e.FileState||(e.FileState={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),o=function(){function t(){this._files={}}return t.prototype.add=function(t){var e=t.uid;this.has(e)?t.validationErrors&&t.validationErrors.length>0?this._files[e].unshift(t):this._files[e].push(t):this._files[e]=[t]},t.prototype.remove=function(t){this.has(t)&&(this._files[t]=null,delete this._files[t])},t.prototype.clear=function(){var t=this._files;for(var e in t)if(t.hasOwnProperty(e)){for(var n=0,i=t[e];n<i.length;n++){var o=i[n];o.httpSubscription&&o.httpSubscription.unsubscribe()}t[e]=null,delete t[e]}},t.prototype.has=function(t){return t in this._files},t.prototype.get=function(t){return this._files[t]},t.prototype.setFilesState=function(t,e){for(var n=0,i=t;n<i.length;n++){var o=i[n];this.setFilesStateByUid(o.uid,e)}},t.prototype.setFilesStateByUid=function(t,e){this.get(t).forEach((function(t){t.state=e}))},Object.defineProperty(t.prototype,"count",{get:function(){return Object.getOwnPropertyNames(this._files).length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"files",{get:function(){var t=this._files,e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filesFlat",{get:function(){var t=this._files,e=[];for(var n in t){if(t.hasOwnProperty(n))t[n].forEach((function(t){e.push(t)}))}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filesToUpload",{get:function(){var t=this._files,e=[];for(var n in t)if(t.hasOwnProperty(n)){for(var o=t[n],r=!0,s=0,u=o;s<u.length;s++){var a=u[s];(a.state!==i.FileState.Selected||a.validationErrors&&a.validationErrors.length>0)&&(r=!1)}r&&e.push(o)}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstFileToUpload",{get:function(){var t=this._files;for(var e in t)if(t.hasOwnProperty(e)){for(var n=t[e],o=!0,r=0,s=n;r<s.length;r++){var u=s[r];(u.state!==i.FileState.Selected||u.validationErrors&&u.validationErrors.length>0)&&(o=!1)}if(o)return n}return null},enumerable:!0,configurable:!0}),t.prototype.getFilesWithState=function(t){return this.filesFlat.filter((function(e){return e.state===t}))},t.prototype.hasFileWithState=function(t){var e=this._files;for(var n in e)if(e.hasOwnProperty(n))for(var i=0,o=e[n];i<o.length;i++){var r=o[i];if(t.indexOf(r.state)>=0)return!0}return!1},t}();e.FileMap=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(44);e.CancelEvent=i.CancelEvent;var o=n(45);e.ClearEvent=o.ClearEvent;var r=n(46);e.ErrorEvent=r.ErrorEvent;var s=n(47);e.PauseEvent=s.PauseEvent;var u=n(48);e.RemoveEvent=u.RemoveEvent;var a=n(49);e.ResumeEvent=a.ResumeEvent;var c=n(50);e.SelectEvent=c.SelectEvent;var l=n(51);e.SuccessEvent=l.SuccessEvent;var p=n(52);e.UploadEvent=p.UploadEvent;var d=n(53);e.UploadProgressEvent=d.UploadProgressEvent},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(7),r=n(1),s=n(56),u=n(25),a=n(57),c=n(28),l=n(29),p=n(30),d=n(31),h=n(34),f=n(35),v=n(10),y=n(58),b=n(36),m=n(37),_=n(38);e.SHARED_DECLARATIONS=[a.DropZoneInternalDirective,c.FileListComponent,l.FileListItemDirective,p.FileListItemActionButtonComponent,d.FileListMultipleItemsComponent,h.FileListSingleItemComponent,f.FileSelectDirective,y.LocalizedMessagesDirective,b.TemplateContextDirective],e.PUBLIC_DIRECTIVES=[v.FileTemplateDirective,o.FileInfoTemplateDirective,u.CustomMessagesComponent,m.UploadDropZoneDirective,_.UploadDropZoneComponent];var g=function(){function t(){}return t=i.__decorate([r.NgModule({declarations:[e.PUBLIC_DIRECTIVES,e.SHARED_DECLARATIONS],exports:[e.PUBLIC_DIRECTIVES,e.SHARED_DECLARATIONS,s.CommonModule],imports:[s.CommonModule]})],t)}();e.SharedModule=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(26),s=n(2),u=function(t){function e(e){var n=t.call(this)||this;return n.service=e,n}var n;return i.__extends(e,t),n=e,Object.defineProperty(e.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),e=n=i.__decorate([o.Component({providers:[{provide:r.Messages,useExisting:o.forwardRef((function(){return n}))}],selector:"kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages",template:""}),i.__metadata("design:paramtypes",[s.LocalizationService])],e)}(r.Messages);e.CustomMessagesComponent=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"cancel",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"clearSelectedFiles",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"dropFilesHere",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"externalDropFilesHere",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"filesBatchStatus",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"filesBatchStatusFailed",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"filesBatchStatusUploaded",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"fileStatusFailed",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"fileStatusUploaded",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"headerStatusPaused",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"headerStatusUploaded",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"headerStatusUploading",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"invalidFileExtension",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"invalidMaxFileSize",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"invalidMinFileSize",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"pause",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"remove",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"resume",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"retry",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"select",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"uploadSelectedFiles",void 0),e}(n(2).ComponentMessages);e.Messages=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=function(){function t(t,e,n){this.element=t,this.renderer=e,this.hideIntervalElement=null,this.hoverClass=n}return t.prototype.onElementDragEnterListener=function(){var t=this;return this.addClass(this.hoverClass),this.lastDragElement=new Date,this.hideIntervalElement||(this.hideIntervalElement=setInterval((function(){t.calculateTimeDiff(t.lastDragElement)<100||(t.removeClass(t.hoverClass),clearInterval(t.hideIntervalElement),t.hideIntervalElement=null)}),100)),!1},t.prototype.onElementDragOverListener=function(){return this.lastDragElement=new Date,!1},t.prototype.calculateTimeDiff=function(t){return(new Date).getTime()-t.getTime()},t.prototype.addClass=function(t){this.renderer.addClass(this.element.nativeElement,t)},t.prototype.removeClass=function(t){this.renderer.removeClass(this.element.nativeElement,t)},i.__decorate([o.HostListener("dragenter"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Boolean)],t.prototype,"onElementDragEnterListener",null),i.__decorate([o.HostListener("dragover"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Boolean)],t.prototype,"onElementDragOverListener",null),t}();e.DropZoneBase=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(8),s=n(4),u=n(10),a=n(29),c=n(6),l=n(3),p=n(7),d=function(){function t(t,e){this.uploadService=t,this.navigation=e,this.onItemFocus(),this.onItemAction()}return t.prototype.onItemFocus=function(){var t=this;this.focusSubscription=this.navigation.onFileFocus.subscribe((function(e){t.fileListItems.toArray()[e].focus()}))},t.prototype.onItemAction=function(){var t=this;this.actionSubscription=this.navigation.onFileAction.subscribe((function(e){t.itemActionHandler(e)}))},t.prototype.itemActionHandler=function(t){var e=this.navigation.focusedIndex,n=this.fileListItems.toArray()[e],i=n.uidAttribute,o=this.uploadService.files.get(i);if(t===r.Keys.Escape&&o[0].state===s.FileState.Uploading)return this.uploadService.cancelFiles(i),void this.navigation.focusSelectButton();t!==r.Keys.Enter||o[0].state!==s.FileState.Failed?t===r.Keys.Delete&&(o[0].state===s.FileState.Uploading?this.uploadService.cancelFiles(i):this.hasDelete(n)&&this.uploadService.removeFiles(i),this.navigation.focusSelectButton()):this.uploadService.retryFiles(i)},t.prototype.hasDelete=function(t){return t.element.nativeElement.getElementsByClassName("k-delete").length>0},t.prototype.ngOnDestroy=function(){this.focusSubscription.unsubscribe(),this.actionSubscription.unsubscribe()},i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Array)],t.prototype,"fileList",void 0),i.__decorate([o.Input(),i.__metadata("design:type",u.FileTemplateDirective)],t.prototype,"fileTemplate",void 0),i.__decorate([o.Input(),i.__metadata("design:type",p.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),i.__decorate([o.ViewChildren(a.FileListItemDirective),i.__metadata("design:type",o.QueryList)],t.prototype,"fileListItems",void 0),t=i.__decorate([o.Component({selector:"[kendo-upload-file-list]",template:"\n <ng-template ngFor\n [ngForOf]=\"fileList\"\n let-files\n let-index=\"index\">\n <li kendoUploadFileListItem [files]='files' [index]='index'>\n <kendo-upload-file-list-single-item\n class='k-file-single'\n *ngIf='files.length === 1 && !fileTemplate'\n [disabled]='disabled'\n [file]='files[0]'\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </kendo-upload-file-list-single-item>\n <kendo-upload-file-list-multiple-items\n class='k-file-multiple'\n *ngIf='files.length > 1 && !fileTemplate'\n [disabled]='disabled'\n [files]='files'\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </kendo-upload-file-list-multiple-items>\n <ng-template *ngIf=\"fileTemplate\"\n [templateContext]=\"{\n templateRef: fileTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }\"></ng-template>\n </li>\n </ng-template>\n "}),i.__metadata("design:paramtypes",[l.UploadService,c.NavigationService])],t)}();e.FileListComponent=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(4),s=n(6),u=n(5),a=n(3),c=function(){function t(t,e,n){this.navigationService=e,this.uploadService=n,this.fileClass=!0,this.focused=!1,this.element=t}return t.prototype.focus=function(){this.element.nativeElement.focus()},Object.defineProperty(t.prototype,"uidAttribute",{get:function(){return this.files[0].uid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return"-1"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kFileError",{get:function(){return this.files[0].state===r.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kFileInvalid",{get:function(){return u.filesHaveValidationErrors(this.files)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kFileProgress",{get:function(){return this.files[0].state===r.FileState.Uploading||this.files[0].state===r.FileState.Paused},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kFileSuccess",{get:function(){return"Upload"===this.uploadService.component&&(this.files[0].state===r.FileState.Uploaded||this.files[0].state===r.FileState.Initial)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kStateFocused",{get:function(){return this.focused},enumerable:!0,configurable:!0}),t.prototype.onFocus=function(){this.focused=!0},t.prototype.onBlur=function(){this.focused=!1},t.prototype.onClick=function(t){u.isFocusable(t.target)||u.hasClasses(t.target,u.IGNORE_TARGET_CLASSES)||(this.navigationService.focusedIndex=this.index)},i.__decorate([o.Input(),i.__metadata("design:type",Array)],t.prototype,"files",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Number)],t.prototype,"index",void 0),i.__decorate([o.HostBinding("class.k-file"),i.__metadata("design:type",Boolean)],t.prototype,"fileClass",void 0),i.__decorate([o.HostBinding("attr.data-uid"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"uidAttribute",null),i.__decorate([o.HostBinding("attr.tabIndex"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"tabIndex",null),i.__decorate([o.HostBinding("class.k-file-error"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kFileError",null),i.__decorate([o.HostBinding("class.k-file-invalid"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kFileInvalid",null),i.__decorate([o.HostBinding("class.k-file-progress"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kFileProgress",null),i.__decorate([o.HostBinding("class.k-file-success"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kFileSuccess",null),i.__decorate([o.HostBinding("class.k-state-focused"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"kStateFocused",null),i.__decorate([o.HostListener("focus"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"onFocus",null),i.__decorate([o.HostListener("blur"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"onBlur",null),i.__decorate([o.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"onClick",null),t=i.__decorate([o.Directive({selector:"[kendoUploadFileListItem]"}),i.__metadata("design:paramtypes",[o.ElementRef,s.NavigationService,a.UploadService])],t)}();e.FileListItemDirective=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(4),s=n(3),u=n(2),a=n(6),c=function(){function t(t,e,n){this.uploadService=t,this.localization=e,this.navigation=n,this.actionFocused=!1,this.retryFocused=!1,this.pauseResumeFocused=!1}return t.prototype.onFocus=function(t){"action"===t&&(this.actionFocused=!0),"retry"===t&&(this.retryFocused=!0),"pauseResume"===t&&(this.pauseResumeFocused=!0)},t.prototype.onBlur=function(t){"retry"===t&&(this.retryFocused=!1),"action"===t&&(this.actionFocused=!1),"pauseResume"===t&&(this.pauseResumeFocused=!1)},t.prototype.onRetryClick=function(){this.disabled||this.uploadService.retryFiles(this.file.uid)},t.prototype.onRemoveCancelClick=function(t){if(!this.disabled){t.stopImmediatePropagation();var e=this.file.uid;this.file.state===r.FileState.Uploading?this.uploadService.cancelFiles(e):this.uploadService.removeFiles(e),this.navigation.focusSelectButton()}},t.prototype.onPauseResumeClick=function(){if(!this.disabled){var t=this.file.uid;this.file.state===r.FileState.Paused?this.uploadService.resumeFile(t):this.uploadService.pauseFile(t)}},Object.defineProperty(t.prototype,"actionButtonTitle",{get:function(){return this.file.state===r.FileState.Uploading?this.localization.get("cancel"):this.localization.get("remove")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"retryButtonTitle",{get:function(){return this.localization.get("retry")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pauseResumeButtonTitle",{get:function(){return this.file.state===r.FileState.Uploading?this.localization.get("pause"):this.localization.get("resume")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUploading",{get:function(){return this.file.state===r.FileState.Uploading},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isFailed",{get:function(){return this.file.state===r.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPaused",{get:function(){return this.file.state===r.FileState.Paused},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isResumable",{get:function(){var t=this.uploadService,e=t.async.chunk&&t.chunk.resumable,n=this.file.state===r.FileState.Paused||this.file.state===r.FileState.Uploading;return e&&n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isActionButtonVisible",{get:function(){return!!(this.file.state!==r.FileState.Uploaded&&this.file.state!==r.FileState.Initial||this.uploadService.async.removeUrl||"Upload"!==this.uploadService.component)},enumerable:!0,configurable:!0}),i.__decorate([o.Input(),i.__metadata("design:type",Object)],t.prototype,"file",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Number)],t.prototype,"progress",void 0),t=i.__decorate([o.Component({selector:"kendo-upload-file-list-item-action-button",template:'\n <strong class="k-upload-status">\n <span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>\n\n <button type="button" *ngIf="isFailed" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.retryFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'retry\')"\n (blur)="onBlur(\'retry\')"\n (click)="onRetryClick()">\n <span class="k-icon k-button-icon k-retry k-i-refresh-sm"\n [attr.aria-label]="retryButtonTitle"\n [attr.title]="retryButtonTitle">\n </span>\n </button>\n\n <button *ngIf="isResumable" type="button" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.pauseResumeFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'pauseResume\')"\n (blur)="onBlur(\'pauseResume\')"\n (click)="onPauseResumeClick()">\n <span class="k-icon k-button-icon"\n [ngClass]="{\n \'k-i-play-sm\': isPaused,\n \'k-i-pause-sm\': !isPaused\n }"\n [attr.aria-label]=\'pauseResumeButtonTitle\'\n [attr.title]=\'pauseResumeButtonTitle\'>\n </span>\n </button>\n\n <button type="button" *ngIf="isActionButtonVisible" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.actionFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'action\')"\n (blur)="onBlur(\'action\')"\n (click)="onRemoveCancelClick($event)">\n <span class="k-icon k-button-icon"\n [ngClass]="{\n \'k-i-cancel\': isUploading,\n \'k-delete k-i-x\': !isUploading\n }"\n [attr.aria-label]=\'actionButtonTitle\'\n [attr.title]=\'actionButtonTitle\'>\n </span>\n </button>\n </strong>\n '}),i.__metadata("design:paramtypes",[s.UploadService,u.LocalizationService,a.NavigationService])],t)}();e.FileListItemActionButtonComponent=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(32),s=n(4),u=n(33),a=n(2),c=n(3),l=n(5),p=n(7),d=function(t){function e(e,n){var i=t.call(this,n)||this;return i.localization=e,i.subscribeUploadProgress((function(t){t.files[0].uid===i.files[0].uid&&(i.progressComplete=t.percentComplete)})),i}return i.__extends(e,t),Object.defineProperty(e.prototype,"showProgress",{get:function(){return this.files[0].state===s.FileState.Uploading||this.files[0].state===s.FileState.Paused?"active":"inactive"},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.filesHaveErrors=t.prototype.filesHaveValidationErrors.call(this,this.files)},e.prototype.fileStatusText=function(t){var e=t.validationErrors;return l.isPresent(e)?this.getFileValidationMessage(t):this.getTotalFilesSizeMessage([t])},Object.defineProperty(e.prototype,"batchStatusText",{get:function(){var t=this.files[0].state,e=this.files.length;return t===s.FileState.Uploaded?e+" "+this.textFor("filesBatchStatusUploaded"):t===s.FileState.Failed?e+" "+this.textFor("filesBatchStatusFailed"):e+" "+this.textFor("filesBatchStatus")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploadSuccessful",{get:function(){return this.files[0].state===s.FileState.Uploaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploadFailed",{get:function(){return this.files[0].state===s.FileState.Failed},enumerable:!0,configurable:!0}),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Array)],e.prototype,"files",void 0),i.__decorate([o.Input(),i.__metadata("design:type",p.FileInfoTemplateDirective)],e.prototype,"fileInfoTemplate",void 0),e=i.__decorate([o.Component({animations:[r.trigger("progressState",[r.state("active",r.style({opacity:1})),r.state("inactive",r.style({opacity:0})),r.transition("void => active",r.style({opacity:0})),r.transition("inactive => active",r.style({opacity:1})),r.transition("active => inactive",r.animate("1s 2s ease-out"))])],selector:"kendo-upload-file-list-multiple-items",template:'\n <div class="k-progressbar" [@progressState]="showProgress">\n <span class="k-progress" [style.width]="progressComplete + \'%\'"></span>\n </div>\n <span class="k-multiple-files-group-wrapper">\n <span class="k-file-group k-icon k-i-copy"></span>\n </span>\n <span class="k-multiple-files-wrapper">\n <ng-container *ngIf="!fileInfoTemplate">\n <span *ngFor="let file of files" class="k-file-name-size-wrapper">\n <span [title]="file.name" class="k-file-name">\n {{file.name}}\n </span>\n <span [ngClass]="{\n \'k-text-error\': file.validationErrors,\n \'k-file-validation-message\': file.validationErrors,\n \'k-file-size\': !file.validationErrors\n }"\n >{{fileStatusText(file)}}</span>\n </span>\n <span class="k-file-information"\n [ngClass]="{\n \'k-text-success\': isUploadSuccessful,\n \'k-text-error\': isUploadFailed\n }"\n >{{batchStatusText}}</span>\n </ng-container>\n <ng-template *ngIf="fileInfoTemplate"\n [templateContext]="{\n templateRef: fileInfoTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }">\n </ng-template>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]=\'files[0]\'\n [disabled]=\'disabled\'\n [progress]=\'progressComplete\'>\n </kendo-upload-file-list-item-action-button>\n '}),i.__metadata("design:paramtypes",[a.LocalizationService,c.UploadService])],e)}(u.FileListItemBase);e.FileListMultipleItemsComponent=d},function(t,e){t.exports=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=function(){function t(t){this.uploadService=t,this.progressComplete=0}return t.prototype.subscribeUploadProgress=function(t){this.uploadProgressSubscription=this.uploadService.uploadProgressEvent.subscribe(t)},t.prototype.fileHasValidationErrors=function(t){return i.fileHasValidationErrors(t)},t.prototype.filesHaveValidationErrors=function(t){return i.filesHaveValidationErrors(t)},t.prototype.ngOnDestroy=function(){this.uploadProgressSubscription.unsubscribe()},t.prototype.getFileValidationMessage=function(t){var e;return t.validationErrors&&t.validationErrors.length>0&&(e=this.localization.get(t.validationErrors[0])),e},t.prototype.getTotalFilesSizeMessage=function(t){return i.getTotalFilesSizeMessage(t)},t.prototype.textFor=function(t){return this.localization.get(t)},t}();e.FileListItemBase=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(32),s=n(4),u=n(33),a=n(2),c=n(3),l=n(5),p=n(7),d=function(t){function e(e,n){var i=t.call(this,n)||this;return i.localization=e,i.subscribeUploadProgress((function(t){t.files[0].uid===i.file.uid&&(i.progressComplete=t.percentComplete)})),i}return i.__extends(e,t),Object.defineProperty(e.prototype,"fileStatusText",{get:function(){var t=this.file.validationErrors;return this.file.state===s.FileState.Uploaded?""+this.textFor("fileStatusUploaded"):this.file.state===s.FileState.Failed?""+this.textFor("fileStatusFailed"):l.isPresent(t)?this.getFileValidationMessage(this.file):this.getTotalFilesSizeMessage([this.file])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showProgress",{get:function(){return this.file.state===s.FileState.Uploading||this.file.state===s.FileState.Paused?"active":"inactive"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fileGroupClass",{get:function(){return l.getFileGroupCssClass(this.file.extension?this.file.extension:"")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploadSuccessful",{get:function(){return this.file.state===s.FileState.Uploaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploadFailed",{get:function(){return this.file.state===s.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isNotYetUploaded",{get:function(){return!this.isUploadFailed&&!this.isUploadSuccessful},enumerable:!0,configurable:!0}),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],e.prototype,"file",void 0),i.__decorate([o.Input(),i.__metadata("design:type",p.FileInfoTemplateDirective)],e.prototype,"fileInfoTemplate",void 0),e=i.__decorate([o.Component({animations:[r.trigger("progressState",[r.state("active",r.style({opacity:1})),r.state("inactive",r.style({opacity:0})),r.transition("void => active",r.style({opacity:0})),r.transition("inactive => active",r.style({opacity:1})),r.transition("active => inactive",r.animate("1s 2s ease-out"))])],selector:"kendo-upload-file-list-single-item",template:'\n <div class="k-progressbar" [@progressState]="showProgress">\n <span class="k-progress" [style.width]="progressComplete + \'%\'"></span>\n </div>\n <span class="k-file-group-wrapper">\n <span class="k-file-group k-icon" [ngClass]="fileGroupClass"></span>\n </span>\n <span class="k-file-name-size-wrapper">\n <ng-container *ngIf="!fileInfoTemplate">\n <span class="k-file-name" [title]="file.name">{{ file.name }}</span>\n <span [ngClass]="{\n \'k-file-validation-message\': file.validationErrors,\n \'k-file-size\': !file.validationErrors && isNotYetUploaded,\n \'k-text-success\': isUploadSuccessful,\n \'k-text-error\': file.validationErrors || isUploadFailed,\n \'k-file-information\': isUploadSuccessful || isUploadFailed\n }"\n >{{fileStatusText}}</span>\n </ng-container>\n <ng-template *ngIf="fileInfoTemplate"\n [templateContext]="{\n templateRef: fileInfoTemplate.templateRef,\n state: file.state,\n $implicit: [file]\n }">\n </ng-template>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]=\'file\'\n [disabled]=\'disabled\'\n [progress]=\'progressComplete\'>\n </kendo-upload-file-list-item-action-button>\n '}),i.__metadata("design:paramtypes",[a.LocalizationService,c.UploadService])],e)}(u.FileListItemBase);e.FileListSingleItemComponent=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(6),s=n(3),u=n(5),a=n(12),c=function(){function t(t,e,n){this.uploadService=t,this.navigation=e,this.type="file",this.autocomplete="off",this.tabIndex=-1,this.element=n}return Object.defineProperty(t.prototype,"nameAttribute",{get:function(){return this.uploadService.async.saveField},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"multipleAttribute",{get:function(){return this.multiple?"multiple":null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirAttribute",{get:function(){return this.dir},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabledAttribute",{get:function(){return this.disabled?"true":null},enumerable:!0,configurable:!0}),t.prototype.onInputChange=function(t){var e=this,n=navigator.userAgent,i=u.inputFiles(t.target);i=u.assignGuidToFiles(i,!this.uploadService.async.batch),a.validateFiles(i,this.restrictions),this.multiple||this.uploadService.clearFiles(),this.uploadService.addFiles(i);var o=this.element.nativeElement;(n.match(/(webkit)[ \/]([\w.]+)/i)||n.match(/(windows)[ \/]([\w.]+)/i))&&(o.type="",o.type="file"),setTimeout((function(){e.navigation.focusedIndex=-1}))},i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"dir",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,"multiple",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],t.prototype,"restrictions",void 0),i.__decorate([o.HostBinding("attr.type"),i.__metadata("design:type",String)],t.prototype,"type",void 0),i.__decorate([o.HostBinding("attr.autocomplete"),i.__metadata("design:type",String)],t.prototype,"autocomplete",void 0),i.__decorate([o.HostBinding("attr.tabindex"),i.__metadata("design:type",Number)],t.prototype,"tabIndex",void 0),i.__decorate([o.HostBinding("attr.name"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"nameAttribute",null),i.__decorate([o.HostBinding("attr.multiple"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"multipleAttribute",null),i.__decorate([o.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"dirAttribute",null),i.__decorate([o.HostBinding("attr.disabled"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"disabledAttribute",null),i.__decorate([o.HostListener("change",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"onInputChange",null),t=i.__decorate([o.Directive({selector:"[kendoFileSelect]"}),i.__metadata("design:paramtypes",[s.UploadService,r.NavigationService,o.ElementRef])],t)}();e.FileSelectDirective=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=function(){function t(t){this.viewContainerRef=t}return Object.defineProperty(t.prototype,"templateContext",{set:function(t){this.insertedViewRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)),this.insertedViewRef=void 0),t.templateRef&&(this.insertedViewRef=this.viewContainerRef.createEmbeddedView(t.templateRef,t))},enumerable:!0,configurable:!0}),i.__decorate([o.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],t.prototype,"templateContext",null),t=i.__decorate([o.Directive({selector:"[templateContext]"}),i.__metadata("design:paramtypes",[o.ViewContainerRef])],t)}();e.TemplateContextDirective=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(5),s=n(12),u=n(11),a=n(13),c=function(){function t(t){this.dropZoneService=t}return t.prototype.onElementDragEnter=function(){return!1},t.prototype.onElementDragOver=function(){return!1},t.prototype.onDropListener=function(t){var e=this.componentInstance;if(r.isPresent(e))return e.forEach((function(e){var n=t.dataTransfer.files;if(n.length>0&&!e.disabled){var i=r.getAllFileInfo(n);i=e instanceof a.UploadComponent?r.assignGuidToFiles(i,!e.batch):r.assignGuidToFiles(i,!0),e.multiple||(i.splice(1,i.length-1),e.clearFiles()),s.validateFiles(i,e.restrictions),e.addFiles(i)}})),!1},Object.defineProperty(t.prototype,"componentInstance",{get:function(){return this.dropZoneService.getComponents(this.zoneId)},enumerable:!0,configurable:!0}),i.__decorate([o.Input("kendoUploadDropZone"),i.__metadata("design:type",String)],t.prototype,"zoneId",void 0),i.__decorate([o.HostListener("dragenter"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Boolean)],t.prototype,"onElementDragEnter",null),i.__decorate([o.HostListener("dragover"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",Boolean)],t.prototype,"onElementDragOver",null),i.__decorate([o.HostListener("drop",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",Boolean)],t.prototype,"onDropListener",null),t=i.__decorate([o.Directive({providers:[u.DropZoneService],selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]"}),i.__metadata("design:paramtypes",[u.DropZoneService])],t)}();e.UploadDropZoneDirective=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(2),s=function(t){function e(e,n,i){var o=t.call(this,e,n,"k-external-dropzone-hover")||this;return o.localization=i,o.hostClass=!0,o.localizationChangeSubscription=o.localization.changes.subscribe((function(t){var e=t.rtl;o.direction=e?"rtl":"ltr"})),o}return i.__extends(e,t),Object.defineProperty(e.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!0,configurable:!0}),e.prototype.textFor=function(t){return this.localization.get(t)},Object.defineProperty(e.prototype,"iconClasses",{get:function(){return this.icon?"k-icon k-i-"+this.icon:this.iconClass?""+this.iconClass:"k-icon k-i-upload"},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},i.__decorate([o.HostBinding("class.k-external-dropzone"),i.__metadata("design:type",Boolean)],e.prototype,"hostClass",void 0),i.__decorate([o.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],e.prototype,"dirAttribute",null),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"zoneId",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"icon",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],e.prototype,"iconClass",void 0),e=i.__decorate([o.Component({exportAs:"kendoUploadDropZone",providers:[r.LocalizationService,{provide:r.L10N_PREFIX,useValue:"kendo.uploaddropzone"}],selector:"kendo-uploaddropzone",template:"\n <ng-container kendoUploadDropZoneLocalizedMessages\n i18n-externalDropFilesHere='kendo.uploaddropzone.externalDropFilesHere|Sets the external drop-zone hint'\n externalDropFilesHere='Drag and drop files here to upload'\n >\n </ng-container>\n <div class='k-dropzone-inner' [kendoUploadDropZone]=\"zoneId\">\n <span [ngClass]=\"iconClasses\"></span>\n <span class=\"k-dropzone-hint\">{{ textFor('externalDropFilesHere') }}</span>\n <span class=\"k-dropzone-note\">\n <ng-content></ng-content>\n </span>\n </div>\n "}),i.__metadata("design:paramtypes",[o.ElementRef,o.Renderer2,r.LocalizationService])],e)}(n(27).DropZoneBase);e.UploadDropZoneComponent=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(13),s=n(40),u=n(41),a=n(24),c=[r.UploadComponent,s.UploadActionButtonsComponent,u.UploadStatusTotalComponent],l=function(){function t(){}return t=i.__decorate([o.NgModule({declarations:[c],exports:[a.PUBLIC_DIRECTIVES,c],imports:[a.SharedModule]})],t)}();e.UploadModule=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(3),s=n(2),u=n(6),a=function(){function t(t,e,n){this.uploadService=t,this.localization=e,this.navigation=n,this.hostDefaultClass=!0,this.onAction(),this.onFocus()}return Object.defineProperty(t.prototype,"actionButtonsEndClassName",{get:function(){return"end"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionButtonsStretchedClassName",{get:function(){return"stretched"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionButtonsStartClassName",{get:function(){return"start"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionButtonsCenterClassName",{get:function(){return"center"===this.actionsLayout},enumerable:!0,configurable:!0}),t.prototype.onAction=function(){var t=this;this.actionSubscription=this.navigation.onActionButtonAction.subscribe((function(e){"clear"===e?t.clearFiles():t.performUpload()}))},t.prototype.onFocus=function(){var t=this;this.focusSubscription=this.navigation.onActionButtonFocus.subscribe((function(e){t.focusButton(e)}))},t.prototype.focusButton=function(t){("clear"===t?this.clearButton:this.uploadButton).nativeElement.focus()},t.prototype.ngOnDestroy=function(){this.actionSubscription.unsubscribe(),this.focusSubscription.unsubscribe()},t.prototype.onUploadButtonClick=function(t){t.stopImmediatePropagation(),this.performUpload()},t.prototype.performUpload=function(){this.disabled||(this.uploadService.uploadFiles(),this.navigation.focusSelectButton())},t.prototype.onClearButtonClick=function(t){t.stopImmediatePropagation(),this.clearFiles()},t.prototype.clearFiles=function(){this.disabled||(this.uploadService.clearFiles(),this.navigation.focusSelectButton())},t.prototype.textFor=function(t){return this.localization.get(t)},i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],t.prototype,"actionsLayout",void 0),i.__decorate([o.ViewChild("clearButton",{static:!0}),i.__metadata("design:type",o.ElementRef)],t.prototype,"clearButton",void 0),i.__decorate([o.ViewChild("uploadButton",{static:!0}),i.__metadata("design:type",o.ElementRef)],t.prototype,"uploadButton",void 0),i.__decorate([o.HostBinding("class.k-actions"),i.__metadata("design:type",Boolean)],t.prototype,"hostDefaultClass",void 0),i.__decorate([o.HostBinding("class.k-actions-end"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"actionButtonsEndClassName",null),i.__decorate([o.HostBinding("class.k-actions-stretched"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"actionButtonsStretchedClassName",null),i.__decorate([o.HostBinding("class.k-actions-start"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"actionButtonsStartClassName",null),i.__decorate([o.HostBinding("class.k-actions-center"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],t.prototype,"actionButtonsCenterClassName",null),t=i.__decorate([o.Component({selector:"kendo-upload-action-buttons",template:'\n <button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"\n [attr.tabIndex]="-1"\n (click)="onClearButtonClick($event)">\n {{textFor(\'clearSelectedFiles\')}}\n </button>\n <button #uploadButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"\n [attr.tabIndex]="-1"\n (click)="onUploadButtonClick($event)">\n {{textFor(\'uploadSelectedFiles\')}}\n </button>\n '}),i.__metadata("design:paramtypes",[r.UploadService,s.LocalizationService,u.NavigationService])],t)}();e.UploadActionButtonsComponent=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(22),s=n(4),u=n(2),a=function(){function t(t){this.localization=t}return t.prototype.ngDoCheck=function(){this.isPaused=this.fileList.hasFileWithState([s.FileState.Paused]),this.isFailed=this.fileList.hasFileWithState([s.FileState.Failed]),this.isUploading=this.fileList.hasFileWithState([s.FileState.Uploading]),this.isPaused&&!this.isUploading?this.statusText=this.localization.get("headerStatusPaused"):this.statusText=this.isUploading?this.localization.get("headerStatusUploading"):this.localization.get("headerStatusUploaded")},i.__decorate([o.Input(),i.__metadata("design:type",r.FileMap)],t.prototype,"fileList",void 0),t=i.__decorate([o.Component({selector:"kendo-upload-status-total",template:"\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-checkmark': !this.isUploading && !this.isFailed,\n 'k-i-exception': !this.isUploading && this.isFailed,\n 'k-i-upload': this.isUploading,\n 'k-i-pause-sm': this.isPaused\n }\">\n </span>\n {{statusText}}\n "}),i.__metadata("design:paramtypes",[u.LocalizationService])],t)}();e.UploadStatusTotalComponent=a},function(t,e,n){"use strict";n.r(e),n.d(e,"audit",(function(){return N})),n.d(e,"auditTime",(function(){return K})),n.d(e,"buffer",(function(){return q})),n.d(e,"bufferCount",(function(){return $})),n.d(e,"bufferTime",(function(){return tt})),n.d(e,"bufferToggle",(function(){return ut})),n.d(e,"bufferWhen",(function(){return lt})),n.d(e,"catchError",(function(){return ht})),n.d(e,"combineAll",(function(){return gt})),n.d(e,"combineLatest",(function(){return xt})),n.d(e,"concat",(function(){return At})),n.d(e,"concatAll",(function(){return Ut})),n.d(e,"concatMap",(function(){return Lt})),n.d(e,"concatMapTo",(function(){return Mt})),n.d(e,"count",(function(){return Vt})),n.d(e,"debounce",(function(){return Ht})),n.d(e,"debounceTime",(function(){return Kt})),n.d(e,"defaultIfEmpty",(function(){return $t})),n.d(e,"delay",(function(){return oe})),n.d(e,"delayWhen",(function(){return ae})),n.d(e,"dematerialize",(function(){return he})),n.d(e,"distinct",(function(){return ye})),n.d(e,"distinctUntilChanged",(function(){return _e})),n.d(e,"distinctUntilKeyChanged",(function(){return xe})),n.d(e,"elementAt",(function(){return Le})),n.d(e,"endWith",(function(){return Me})),n.d(e,"every",(function(){return Ve})),n.d(e,"exhaust",(function(){return He})),n.d(e,"exhaustMap",(function(){return Ke})),n.d(e,"expand",(function(){return Ge})),n.d(e,"filter",(function(){return Ee})),n.d(e,"finalize",(function(){return Je})),n.d(e,"find",(function(){return en})),n.d(e,"findIndex",(function(){return rn})),n.d(e,"first",(function(){return sn})),n.d(e,"groupBy",(function(){return hn})),n.d(e,"ignoreElements",(function(){return _n})),n.d(e,"isEmpty",(function(){return xn})),n.d(e,"last",(function(){return kn})),n.d(e,"map",(function(){return Ct})),n.d(e,"mapTo",(function(){return Tn})),n.d(e,"materialize",(function(){return Bn})),n.d(e,"max",(function(){return Mn})),n.d(e,"merge",(function(){return zn})),n.d(e,"mergeAll",(function(){return jt})),n.d(e,"mergeMap",(function(){return Ot})),n.d(e,"flatMap",(function(){return Ot})),n.d(e,"mergeMapTo",(function(){return Rn})),n.d(e,"mergeScan",(function(){return Hn})),n.d(e,"min",(function(){return Kn})),n.d(e,"multicast",(function(){return Qn})),n.d(e,"observeOn",(function(){return ei})),n.d(e,"onErrorResumeNext",(function(){return ri})),n.d(e,"pairwise",(function(){return ai})),n.d(e,"partition",(function(){return di})),n.d(e,"pluck",(function(){return hi})),n.d(e,"publish",(function(){return vi})),n.d(e,"publishBehavior",(function(){return bi})),n.d(e,"publishLast",(function(){return _i})),n.d(e,"publishReplay",(function(){return Fi})),n.d(e,"race",(function(){return ki})),n.d(e,"reduce",(function(){return Ln})),n.d(e,"repeat",(function(){return Ti})),n.d(e,"repeatWhen",(function(){return Bi})),n.d(e,"retry",(function(){return Ui})),n.d(e,"retryWhen",(function(){return Li})),n.d(e,"refCount",(function(){return qn})),n.d(e,"sample",(function(){return zi})),n.d(e,"sampleTime",(function(){return Wi})),n.d(e,"scan",(function(){return Un})),n.d(e,"sequenceEqual",(function(){return Yi})),n.d(e,"share",(function(){return Qi})),n.d(e,"shareReplay",(function(){return to})),n.d(e,"single",(function(){return eo})),n.d(e,"skip",(function(){return oo})),n.d(e,"skipLast",(function(){return uo})),n.d(e,"skipUntil",(function(){return lo})),n.d(e,"skipWhile",(function(){return fo})),n.d(e,"startWith",(function(){return bo})),n.d(e,"subscribeOn",(function(){return Eo})),n.d(e,"switchAll",(function(){return Oo})),n.d(e,"switchMap",(function(){return Co})),n.d(e,"switchMapTo",(function(){return Po})),n.d(e,"take",(function(){return Ue})),n.d(e,"takeLast",(function(){return En})),n.d(e,"takeUntil",(function(){return Bo})),n.d(e,"takeWhile",(function(){return Uo})),n.d(e,"tap",(function(){return ke})),n.d(e,"throttle",(function(){return Mo})),n.d(e,"throttleTime",(function(){return Ro})),n.d(e,"throwIfEmpty",(function(){return De})),n.d(e,"timeInterval",(function(){return Ko})),n.d(e,"timeout",(function(){return Qo})),n.d(e,"timeoutWith",(function(){return $o})),n.d(e,"timestamp",(function(){return tr})),n.d(e,"toArray",(function(){return ir})),n.d(e,"window",(function(){return or})),n.d(e,"windowCount",(function(){return ur})),n.d(e,"windowTime",(function(){return lr})),n.d(e,"windowToggle",(function(){return br})),n.d(e,"windowWhen",(function(){return gr})),n.d(e,"withLatestFrom",(function(){return wr})),n.d(e,"zip",(function(){return Br})),n.d(e,"zipAll",(function(){return Dr}));var i=n(0);function o(t){return"function"==typeof t}var r=!1,s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;r=t},get useDeprecatedSynchronousErrorHandling(){return r}};function u(t){setTimeout((function(){throw t}))}var a={closed:!0,next:function(t){},error:function(t){if(s.useDeprecatedSynchronousErrorHandling)throw t;u(t)},complete:function(){}},c=Array.isArray||function(t){return t&&"number"==typeof t.length};function l(t){return null!==t&&"object"==typeof t}function p(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}p.prototype=Object.create(Error.prototype);var d=p,h=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,i=this._parents,r=this._unsubscribe,s=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var u=-1,a=i?i.length:0;n;)n.remove(this),n=++u<a&&i[u]||null;if(o(r))try{r.call(this)}catch(n){e=!0,t=n instanceof d?f(n.errors):[n]}if(c(s))for(u=-1,a=s.length;++u<a;){var p=s[u];if(l(p))try{p.unsubscribe()}catch(n){e=!0,t=t||[],n instanceof d?t=t.concat(f(n.errors)):t.push(n)}}if(e)throw new d(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 o=this._subscriptions;o?o.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=function(t){return t.closed=!0,t}(new t),t}();function f(t){return t.reduce((function(t,e){return t.concat(e instanceof d?e.errors:e)}),[])}var v="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),y=function(t){function e(n,i,o){var r=t.call(this)||this;switch(r.syncErrorValue=null,r.syncErrorThrown=!1,r.syncErrorThrowable=!1,r.isStopped=!1,arguments.length){case 0:r.destination=a;break;case 1:if(!n){r.destination=a;break}if("object"==typeof n){n instanceof e?(r.syncErrorThrowable=n.syncErrorThrowable,r.destination=n,n.add(r)):(r.syncErrorThrowable=!0,r.destination=new b(r,n));break}default:r.syncErrorThrowable=!0,r.destination=new b(r,n,i,o)}return r}return i.__extends(e,t),e.prototype[v]=function(){return this},e.create=function(t,n,i){var o=new e(t,n,i);return o.syncErrorThrowable=!1,o},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}(h),b=function(t){function e(e,n,i,r){var s,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return o(n)?s=n:n&&(s=n.next,i=n.error,r=n.complete,n!==a&&(o((c=Object.create(n)).unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=s,u._error=i,u._complete=r,u}return i.__extends(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;s.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=s.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):u(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;u(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)};s.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(),s.useDeprecatedSynchronousErrorHandling)throw t;u(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return s.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(u(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(y),m=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,o){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(y),_=function(t){function e(e,n,i){var o=t.call(this)||this;return o.parent=e,o.outerValue=n,o.outerIndex=i,o.index=0,o}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}(y);var g="function"==typeof Symbol&&Symbol.observable||"@@observable";function S(){}function x(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return w(t)}function w(t){return t?1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}:S}var F=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 i=this.operator,o=function(t,e,n){if(t){if(t instanceof y)return t;if(t[v])return t[v]()}return t||e||n?new y(t,e,n):new y(a)}(t,e,n);if(i?o.add(i.call(o,this.source)):o.add(this.source||s.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),s.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){s.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),!function(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof y?i:null}return!0}(t)?console.warn(e):t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=E(e))((function(e,i){var o;o=n.subscribe((function(e){try{t(e)}catch(t){i(t),o&&o.unsubscribe()}}),i,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[g]=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:w(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=E(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 E(t){if(t||(t=s.Promise||Promise),!t)throw new Error("no Promise impl found");return t}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()}},C=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,u),e}};function k(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var T=k(),O=function(t){return function(e){for(var n=t[T]();;){var i=n.next();if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e}},P=function(t){return function(e){var n=t[g]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}},B=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function D(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}var j=function(t){if(t instanceof F)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[g])return P(t);if(B(t))return I(t);if(D(t))return C(t);if(t&&"function"==typeof t[T])return O(t);var e=l(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 U(t,e,n,i,o){if(void 0===o&&(o=new _(t,n,i)),!o.closed)return j(e)(o)}function N(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 L(t,this.durationSelector))},t}(),L=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=U(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}(m),M=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}(h)),V=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}(),z=function(t){function e(n,i){void 0===i&&(i=V.now);var o=t.call(this,n,(function(){return e.delegate&&e.delegate!==o?e.delegate.now():i()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return i.__extends(e,t),e.prototype.schedule=function(n,i,o){return void 0===i&&(i=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,i,o):t.prototype.schedule.call(this,n,i,o)},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}(V),R=new z(M);function H(t){return!c(t)&&t-parseFloat(t)+1>=0}function W(t){return t&&"function"==typeof t.schedule}function Z(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 K(t,e){return void 0===e&&(e=R),N((function(){return function(t,e,n){void 0===t&&(t=0);var i=-1;return H(e)?i=Number(e)<1?1:Number(e):W(e)&&(n=e),W(n)||(n=R),new F((function(e){var o=H(t)?t:+t-n.now();return n.schedule(Z,o,{index:0,period:i,subscriber:e})}))}(t,e)}))}function q(t){return function(e){return e.lift(new Y(t))}}var Y=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new G(t,this.closingNotifier))},t}(),G=function(t){function e(e,n){var i=t.call(this,e)||this;return i.buffer=[],i.add(U(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,o){var r=this.buffer;this.buffer=[],this.destination.next(r)},e}(m);function $(t,e){return void 0===e&&(e=null),function(n){return n.lift(new X(t,e))}}var X=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?Q:J}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),J=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}(y),Q=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.bufferSize=n,o.startBufferEvery=i,o.buffers=[],o.count=0,o}return i.__extends(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,i=this.buffers,o=this.count;this.count++,o%n==0&&i.push([]);for(var r=i.length;r--;){var s=i[r];s.push(t),s.length===e&&(i.splice(r,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}(y);function tt(t){var e=arguments.length,n=R;W(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var i=null;e>=2&&(i=arguments[1]);var o=Number.POSITIVE_INFINITY;return e>=3&&(o=arguments[2]),function(e){return e.lift(new et(t,i,o,n))}}var et=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 it(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),nt=function(){return function(){this.buffer=[]}}(),it=function(t){function e(e,n,i,o,r){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=i,s.maxBufferSize=o,s.scheduler=r,s.contexts=[];var u=s.openContext();if(s.timespanOnly=null==i||i<0,s.timespanOnly){var a={subscriber:s,context:u,bufferTimeSpan:n};s.add(u.closeAction=r.schedule(ot,n,a))}else{var c={subscriber:s,context:u},l={bufferTimeSpan:n,bufferCreationInterval:i,subscriber:s,scheduler:r};s.add(u.closeAction=r.schedule(st,n,c)),s.add(r.schedule(rt,i,l))}return s}return i.__extends(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,i=n.length,o=0;o<i;o++){var r=n[o],s=r.buffer;s.push(t),s.length==this.maxBufferSize&&(e=r)}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(ot,n,i))}},e.prototype.openContext=function(){var t=new nt;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}(y);function ot(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 rt(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,i=t.subscriber,o=t.scheduler,r=i.openContext();i.closed||(i.add(r.closeAction=o.schedule(st,n,{subscriber:i,context:r})),this.schedule(t,e))}function st(t){var e=t.subscriber,n=t.context;e.closeContext(n)}function ut(t,e){return function(n){return n.lift(new at(t,e))}}var at=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new ct(t,this.openings,this.closingSelector))},t}(),ct=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.openings=n,o.closingSelector=i,o.contexts=[],o.add(U(o,n)),o}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,o){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 h,i={buffer:[],subscription:n};e.push(i);var o=U(this,t,i);!o||o.closed?this.closeBuffer(i):(o.context=i,this.add(o),n.add(o))},e}(m);function lt(t){return function(e){return e.lift(new pt(t))}}var pt=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new dt(t,this.closingSelector))},t}(),dt=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,o){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 h,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(U(this,e)),this.subscribing=!1},e}(m);function ht(t){return function(e){var n=new ft(t),i=e.lift(n);return n.caught=i}}var ft=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new vt(t,this.selector,this.caught))},t}(),vt=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.selector=n,o.caught=i,o}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 _(this,void 0,void 0);this.add(i),U(this,n,void 0,void 0,i)}},e}(m);function yt(t,e){return new F(e?function(n){var i=new h,o=0;return i.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||i.add(this.schedule())):n.complete()}))),i}:I(t))}var bt={};var mt=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new _t(t,this.resultSelector))},t}(),_t=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(bt),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(U(this,i,i,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,i,o){var r=this.values,s=r[n],u=this.toRespond?s===bt?--this.toRespond:this.toRespond:0;r[n]=e,0===u&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.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}(m);function gt(t){return function(e){return e.lift(new mt(t))}}function St(t,e){if(!e)return t instanceof F?t:new F(j(t));if(null!=t){if(function(t){return t&&"function"==typeof t[g]}(t))return function(t,e){return new F(e?function(n){var i=new h;return i.add(e.schedule((function(){var o=t[g]();i.add(o.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}:P(t))}(t,e);if(D(t))return function(t,e){return new F(e?function(n){var i=new h;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}:C(t))}(t,e);if(B(t))return yt(t,e);if(function(t){return t&&"function"==typeof t[T]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new F(e?function(n){var i,o=new h;return o.add((function(){i&&"function"==typeof i.return&&i.return()})),o.add(e.schedule((function(){i=t[T](),o.add(e.schedule((function(){if(!n.closed){var t,e;try{var o=i.next();t=o.value,e=o.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),o}:O(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}function xt(){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&&c(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(St([e].concat(t)),new mt(n))}}var wt=new F((function(t){return t.complete()}));function Ft(t){return t?function(t){return new F((function(e){return t.schedule((function(){return e.complete()}))}))}(t):wt}function Et(t){var e=new F((function(e){e.next(t),e.complete()}));return e._isScalar=!0,e.value=t,e}function It(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];switch(W(n)?t.pop():n=void 0,t.length){case 0:return Ft(n);case 1:return n?yt(t,n):Et(t[0]);default:return yt(t,n)}}function Ct(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 kt(t,e))}}var kt=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Tt(t,this.project,this.thisArg))},t}(),Tt=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=i||o,o}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}(y);function Ot(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(i){return i.pipe(Ot((function(n,i){return St(t(n,i)).pipe(Ct((function(t,o){return e(n,t,i,o)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new Pt(t,n))})}var Pt=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 Bt(t,this.project,this.concurrent))},t}(),Bt=function(t){function e(e,n,i){void 0===i&&(i=Number.POSITIVE_INFINITY);var o=t.call(this,e)||this;return o.project=n,o.concurrent=i,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}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 _(this,void 0,void 0);this.destination.add(i),U(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,o){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}(m);function Dt(t){return t}function jt(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Ot(Dt,t)}function Ut(){return jt(1)}function Nt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ut()(It.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(Nt.apply(void 0,[e].concat(t)))}}function Lt(t,e){return Ot(t,e,1)}function Mt(t,e){return Lt((function(){return t}),e)}function Vt(t){return function(e){return e.lift(new zt(t,e))}}var zt=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Rt(t,this.predicate,this.source))},t}(),Rt=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.predicate=n,o.source=i,o.count=0,o.index=0,o}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}(y);function Ht(t){return function(e){return e.lift(new Wt(t))}}var Wt=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Zt(t,this.durationSelector))},t}(),Zt=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=U(this,e))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,e,n,i,o){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}(m);function Kt(t,e){return void 0===e&&(e=R),function(n){return n.lift(new qt(t,e))}}var qt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Yt(t,this.dueTime,this.scheduler))},t}(),Yt=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.dueTime=n,o.scheduler=i,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}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(Gt,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}(y);function Gt(t){t.debouncedNext()}function $t(t){return void 0===t&&(t=null),function(e){return e.lift(new Jt(t))}}var Xt,Jt=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new Qt(t,this.defaultValue))},t}(),Qt=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}(y);function te(t){return t instanceof Date&&!isNaN(+t)}function ee(t,e){return new F(e?function(n){return e.schedule(ne,0,{error:t,subscriber:n})}:function(e){return e.error(t)})}function ne(t){var e=t.error;t.subscriber.error(e)}Xt||(Xt={});var ie=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 It(this.value);case"E":return ee(this.error);case"C":return Ft()}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 oe(t,e){void 0===e&&(e=R);var n=te(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new re(n,e))}}var re=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new se(t,this.delay,this.scheduler))},t}(),se=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.delay=n,o.scheduler=i,o.queue=[],o.active=!1,o.errored=!1,o}return i.__extends(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,i=t.scheduler,o=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var r=Math.max(0,n[0].time-i.now());this.schedule(t,r)}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 ue(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(ie.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(ie.createComplete()),this.unsubscribe()},e}(y),ue=function(){return function(t,e){this.time=t,this.notification=e}}();function ae(t,e){return e?function(n){return new pe(n,e).lift(new ce(t))}:function(e){return e.lift(new ce(t))}}var ce=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new le(t,this.delayDurationSelector))},t}(),le=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,o){this.destination.next(t),this.removeSubscription(o),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=U(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}(m),pe=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 de(t,this.source))},e}(F),de=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}(y);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){return t.call(this,e)||this}return i.__extends(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(y);function ye(t,e){return function(n){return n.lift(new be(t,e))}}var be=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new me(t,this.keySelector,this.flushes))},t}(),me=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,i&&o.add(U(o,i)),o}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,o){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}(m);function _e(t,e){return function(n){return n.lift(new ge(t,e))}}var ge=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Se(t,this.compare,this.keySelector))},t}(),Se=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.keySelector=i,o.hasKey=!1,"function"==typeof n&&(o.compare=n),o}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}(y);function xe(t,e){return _e((function(n,i){return e?e(n[t],i[t]):n[t]===i[t]}))}function we(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}we.prototype=Object.create(Error.prototype);var Fe=we;function Ee(t,e){return function(n){return n.lift(new Ie(t,e))}}var Ie=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Ce(t,this.predicate,this.thisArg))},t}(),Ce=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=i,o.count=0,o}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}(y);function ke(t,e,n){return function(i){return i.lift(new Te(t,e,n))}}var Te=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 Oe(t,this.nextOrObserver,this.error,this.complete))},t}(),Oe=function(t){function e(e,n,i,r){var s=t.call(this,e)||this;return s._tapNext=S,s._tapError=S,s._tapComplete=S,s._tapError=i||S,s._tapComplete=r||S,o(n)?(s._context=s,s._tapNext=n):n&&(s._context=n,s._tapNext=n.next||S,s._tapError=n.error||S,s._tapComplete=n.complete||S),s}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}(y);function Pe(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}Pe.prototype=Object.create(Error.prototype);var Be=Pe,De=function(t){return void 0===t&&(t=je),ke({hasValue:!1,next:function(){this.hasValue=!0},complete:function(){if(!this.hasValue)throw t()}})};function je(){return new Be}function Ue(t){return function(e){return 0===t?Ft():e.lift(new Ne(t))}}var Ne=function(){function t(t){if(this.total=t,this.total<0)throw new Fe}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}(y);function Le(t,e){if(t<0)throw new Fe;var n=arguments.length>=2;return function(i){return i.pipe(Ee((function(e,n){return n===t})),Ue(1),n?$t(e):De((function(){return new Fe})))}}function Me(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];W(n)?t.pop():n=null;var i=t.length;return Nt(e,1!==i||n?i>0?yt(t,n):Ft(n):Et(t[0]))}}function Ve(t,e){return function(n){return n.lift(new ze(t,e,n))}}var ze=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 Re(t,this.predicate,this.thisArg,this.source))},t}(),Re=function(t){function e(e,n,i,o){var r=t.call(this,e)||this;return r.predicate=n,r.thisArg=i,r.source=o,r.index=0,r.thisArg=i||r,r}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}(y);function He(){return function(t){return t.lift(new We)}}var We=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ze(t))},t}(),Ze=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(U(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}(m);function Ke(t,e){return e?function(n){return n.pipe(Ke((function(n,i){return St(t(n,i)).pipe(Ct((function(t,o){return e(n,t,i,o)})))})))}:function(e){return e.lift(new qe(t))}}var qe=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new Ye(t,this.project))},t}(),Ye=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 _(this,void 0,void 0);this.destination.add(i),U(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,o){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}(m);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 $e(t,e,n))}}var $e=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,o){var r=t.call(this,e)||this;return r.project=n,r.concurrent=i,r.scheduler=o,r.index=0,r.active=0,r.hasCompleted=!1,i<Number.POSITIVE_INFINITY&&(r.buffer=[]),r}return i.__extends(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,i=t.value,o=t.index;e.subscribeToProjection(n,i,o)},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 o=(0,this.project)(t,i);if(this.scheduler){var r={subscriber:this,result:o,value:t,index:i};this.destination.add(this.scheduler.schedule(e.dispatch,0,r))}else this.subscribeToProjection(o,t,i)}catch(t){n.error(t)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(U(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,o){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}(m);function Je(t){return function(e){return e.lift(new Qe(t))}}var Qe=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new tn(t,this.callback))},t}(),tn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.add(new h(n)),i}return i.__extends(e,t),e}(y);function en(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new nn(t,n,!1,e))}}var nn=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 on(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),on=function(t){function e(e,n,i,o,r){var s=t.call(this,e)||this;return s.predicate=n,s.source=i,s.yieldIndex=o,s.thisArg=r,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}(y);function rn(t,e){return function(n){return n.lift(new nn(t,n,!0,e))}}function sn(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Ee((function(e,n){return t(e,n,i)})):Dt,Ue(1),n?$t(e):De((function(){return new Be})))}}function un(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}un.prototype=Object.create(Error.prototype);var an=un,cn=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}(h),ln=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return i.__extends(e,t),e}(y),pn=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[v]=function(){return new ln(this)},e.prototype.lift=function(t){var e=new dn(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new an;if(!this.isStopped)for(var e=this.observers,n=e.length,i=e.slice(),o=0;o<n;o++)i[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new an;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,i=e.slice(),o=0;o<n;o++)i[o].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new an;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 an;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new an;return this.hasError?(t.error(this.thrownError),h.EMPTY):this.isStopped?(t.complete(),h.EMPTY):(this.observers.push(t),new cn(this,t))},e.prototype.asObservable=function(){var t=new F;return t.source=this,t},e.create=function(t,e){return new dn(t,e)},e}(F),dn=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):h.EMPTY},e}(pn);function hn(t,e,n,i){return function(o){return o.lift(new fn(t,e,n,i))}}var fn=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 vn(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),vn=function(t){function e(e,n,i,o,r){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=i,s.durationSelector=o,s.subjectSelector=r,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,o=n.get(e);if(this.elementSelector)try{i=this.elementSelector(t)}catch(t){this.error(t)}else i=t;if(!o){o=this.subjectSelector?this.subjectSelector():new pn,n.set(e,o);var r=new bn(e,o,this);if(this.destination.next(r),this.durationSelector){var s=void 0;try{s=this.durationSelector(new bn(e,o))}catch(t){return void this.error(t)}this.add(s.subscribe(new yn(e,o,this)))}}o.closed||o.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}(y),yn=function(t){function e(e,n,i){var o=t.call(this,n)||this;return o.key=e,o.group=n,o.parent=i,o}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}(y),bn=function(t){function e(e,n,i){var o=t.call(this)||this;return o.key=e,o.groupSubject=n,o.refCountSubscription=i,o}return i.__extends(e,t),e.prototype._subscribe=function(t){var e=new h,n=this.refCountSubscription,i=this.groupSubject;return n&&!n.closed&&e.add(new mn(n)),e.add(i.subscribe(t)),e},e}(F),mn=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}(h);function _n(){return function(t){return t.lift(new gn)}}var gn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Sn(t))},t}(),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype._next=function(t){},e}(y);function xn(){return function(t){return t.lift(new wn)}}var wn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Fn(t))},t}(),Fn=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}(y);function En(t){return function(e){return 0===t?Ft():e.lift(new In(t))}}var In=function(){function t(t){if(this.total=t,this.total<0)throw new Fe}return t.prototype.call=function(t,e){return e.subscribe(new Cn(t,this.total))},t}(),Cn=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,o=0;o<n;o++){var r=e++%n;t.next(i[r])}t.complete()},e}(y);function kn(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Ee((function(e,n){return t(e,n,i)})):Dt,En(1),n?$t(e):De((function(){return new Be})))}}function Tn(t){return function(e){return e.lift(new On(t))}}var On=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new Pn(t,this.value))},t}(),Pn=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}(y);function Bn(){return function(t){return t.lift(new Dn)}}var Dn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new jn(t))},t}(),jn=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype._next=function(t){this.destination.next(ie.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(ie.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(ie.createComplete()),t.complete()},e}(y);function Un(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new Nn(t,e,n))}}var Nn=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 An(t,this.accumulator,this.seed,this.hasSeed))},t}(),An=function(t){function e(e,n,i,o){var r=t.call(this,e)||this;return r.accumulator=n,r._seed=i,r.hasSeed=o,r.index=0,r}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}(y);function Ln(t,e){return arguments.length>=2?function(n){return x(Un(t,e),En(1),$t(e))(n)}:function(e){return x(Un((function(e,n,i){return t(e,n,i+1)})),En(1))(e)}}function Mn(t){return Ln("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}function Vn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,i=null,o=t[t.length-1];return W(o)?(i=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof o&&(n=t.pop()),null===i&&1===t.length&&t[0]instanceof F?t[0]:jt(n)(yt(t,i))}function zn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Vn.apply(void 0,[e].concat(t)))}}function Rn(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?Ot((function(){return t}),e,n):("number"==typeof e&&(n=e),Ot((function(){return t}),n))}function Hn(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(i){return i.lift(new Wn(t,e,n))}}var Wn=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 Zn(t,this.accumulator,this.seed,this.concurrent))},t}(),Zn=function(t){function e(e,n,i,o){var r=t.call(this,e)||this;return r.accumulator=n,r.acc=i,r.concurrent=o,r.hasValue=!1,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}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 _(this,void 0,void 0);this.destination.add(i),U(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,o){var r=this.destination;this.acc=e,this.hasValue=!0,r.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}(m);function Kn(t){return Ln("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}function qn(){return function(t){return t.lift(new Yn(t))}}var Yn=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var i=new Gn(t,n),o=e.subscribe(i);return i.closed||(i.connection=n.connect()),o},t}(),Gn=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}(y),$n=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 h).add(this.source.subscribe(new Jn(this.getSubject(),this))),t.closed?(this._connection=null,t=h.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return qn()(this)},e}(F).prototype,Xn={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:$n._subscribe},_isComplete:{value:$n._isComplete,writable:!0},getSubject:{value:$n.getSubject},connect:{value:$n.connect},refCount:{value:$n.refCount}},Jn=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}(ln);function Qn(t,e){return function(n){var i;if(i="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new ti(i,e));var o=Object.create(n,Xn);return o.source=n,o.subjectFactory=i,o}}var ti=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(),o=n(i).subscribe(t);return o.add(e.subscribe(i)),o},t}();function ei(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ni(t,e))}}var ni=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 ii(t,this.scheduler,this.delay))},t}(),ii=function(t){function e(e,n,i){void 0===i&&(i=0);var o=t.call(this,e)||this;return o.scheduler=n,o.delay=i,o}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 oi(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(ie.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(ie.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(ie.createComplete()),this.unsubscribe()},e}(y),oi=function(){return function(t,e){this.notification=t,this.destination=e}}();function ri(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&c(t[0])&&(t=t[0]),function(e){return e.lift(new si(t))}}var si=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new ui(t,this.nextSources))},t}(),ui=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 _(this,void 0,void 0);this.destination.add(e),U(this,t,void 0,void 0,e)}else this.destination.complete()},e}(m);function ai(){return function(t){return t.lift(new ci)}}var ci=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new li(t))},t}(),li=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}(y);function pi(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}function di(t,e){return function(n){return[Ee(t,e)(n),Ee(pi(t,e))(n)]}}function hi(){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 Ct(fi(t,n))(e)}}function fi(t,e){return function(n){for(var i=n,o=0;o<e;o++){var r=i[t[o]];if(void 0===r)return;i=r}return i}}function vi(t){return t?Qn((function(){return new pn}),t):Qn(new pn)}var yi=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 an;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(pn);function bi(t){return function(e){return Qn(new yi(t))(e)}}var mi=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),h.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),h.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}(pn);function _i(){return function(t){return Qn(new mi)(t)}}var 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.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}(M),Si=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e}(z))(gi),xi=function(t){function e(e,n,i){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var o=t.call(this)||this;return o.scheduler=i,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=e<1?1:e,o._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}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 wi(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(),o=this.scheduler,r=i.length;if(this.closed)throw new an;if(this.isStopped||this.hasError?e=h.EMPTY:(this.observers.push(t),e=new cn(this,t)),o&&t.add(t=new ii(t,o)),n)for(var s=0;s<r&&!t.closed;s++)t.next(i[s]);else for(s=0;s<r&&!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||Si).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,i=this._events,o=i.length,r=0;r<o&&!(t-i[r].time<n);)r++;return o>e&&(r=Math.max(r,o-e)),r>0&&i.splice(0,r),i},e}(pn),wi=function(){return function(t,e){this.time=t,this.value=e}}();function Fi(t,e,n,i){n&&"function"!=typeof n&&(i=n);var o="function"==typeof n?n:void 0,r=new xi(t,e,i);return function(t){return Qn((function(){return r}),o)(t)}}function Ei(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!c(t[0]))return t[0];t=t[0]}return yt(t,void 0).lift(new Ii)}var Ii=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ci(t))},t}(),Ci=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],o=U(this,i,i,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,i,o){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var s=this.subscriptions[r];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)},e}(m);function ki(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&c(t[0])&&(t=t[0]),e.lift.call(Ei.apply(void 0,[e].concat(t)))}}function Ti(t){return void 0===t&&(t=-1),function(e){return 0===t?Ft():t<0?e.lift(new Oi(-1,e)):e.lift(new Oi(t-1,e))}}var Oi=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Pi(t,this.count,this.source))},t}(),Pi=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.count=n,o.source=i,o}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}(y);function Bi(t){return function(e){return e.lift(new Di(t))}}var Di=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new ji(t,this.notifier,e))},t}(),ji=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.notifier=n,o.source=i,o.sourceIsBeingSubscribedTo=!0,o}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,o){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 pn;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=U(this,e)},e}(m);function Ui(t){return void 0===t&&(t=-1),function(e){return e.lift(new Ni(t,e))}}var Ni=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Ai(t,this.count,this.source))},t}(),Ai=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.count=n,o.source=i,o}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}(y);function Li(t){return function(e){return e.lift(new Mi(t,e))}}var Mi=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Vi(t,this.notifier,this.source))},t}(),Vi=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.notifier=n,o.source=i,o}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,i=this.retries,o=this.retriesSubscription;if(i)this.errors=null,this.retriesSubscription=null;else{n=new pn;try{i=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}o=U(this,i)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=i,this.retriesSubscription=o,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,o){var r=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=r,this.source.subscribe(this)},e}(m);function zi(t){return function(e){return e.lift(new Ri(t))}}var Ri=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Hi(t),i=e.subscribe(n);return i.add(U(n,this.notifier)),i},t}(),Hi=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,o){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(m);function Wi(t,e){return void 0===e&&(e=R),function(n){return n.lift(new Zi(t,e))}}var Zi=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Ki(t,this.period,this.scheduler))},t}(),Ki=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.period=n,o.scheduler=i,o.hasValue=!1,o.add(i.schedule(qi,n,{subscriber:o,period:n})),o}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}(y);function qi(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Yi(t,e){return function(n){return n.lift(new Gi(t,e))}}var Gi=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new $i(t,this.compareTo,this.comparator))},t}(),$i=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.compareTo=n,o.comparator=i,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(n.subscribe(new Xi(e,o))),o}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(),o=e.shift(),r=!1;try{r=n?n(i,o):i===o}catch(t){this.destination.error(t)}r||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}(y),Xi=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}(y);function Ji(){return new pn}function Qi(){return function(t){return qn()(Qn(Ji)(t))}}function to(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,o=void 0===i?Number.POSITIVE_INFINITY:i,r=t.windowTime,s=void 0===r?Number.POSITIVE_INFINITY:r,u=t.refCount,a=t.scheduler,c=0,l=!1,p=!1;return function(t){c++,e&&!l||(l=!1,e=new xi(o,s,a),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&&u&&0===c&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(i))}}function eo(t){return function(e){return e.lift(new no(t,e))}}var no=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new io(t,this.predicate,this.source))},t}(),io=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.predicate=n,o.source=i,o.seenValue=!1,o.index=0,o}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 Be)},e}(y);function oo(t){return function(e){return e.lift(new ro(t))}}var ro=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new so(t,this.total))},t}(),so=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}(y);function uo(t){return function(e){return e.lift(new ao(t))}}var ao=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Fe}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new y(t)):e.subscribe(new co(t,this._skipCount))},t}(),co=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,o=this._ring,r=o[i];o[i]=t,this.destination.next(r)}},e}(y);function lo(t){return function(e){return e.lift(new po(t))}}var po=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new ho(t,this.notifier))},t}(),ho=function(t){function e(e,n){var i=t.call(this,e)||this;i.hasValue=!1;var o=new _(i,void 0,void 0);return i.add(o),i.innerSubscription=o,U(i,n,void 0,void 0,o),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,o){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(m);function fo(t){return function(e){return e.lift(new vo(t))}}var vo=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new yo(t,this.predicate))},t}(),yo=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}(y);function bo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];W(n)?t.pop():n=null;var i=t.length;return Nt(1!==i||n?i>0?yt(t,n):Ft(n):Et(t[0]),e)}}var mo=1,_o={};var go=function(t){var e=mo++;return _o[e]=t,Promise.resolve().then((function(){return function(t){var e=_o[t];e&&e()}(e)})),e},So=function(t){delete _o[t]},xo=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=go(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&&(So(n),e.scheduled=void 0)},e}(M),wo=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,o=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i<o&&(t=n.shift()));if(this.active=!1,e){for(;++i<o&&(t=n.shift());)t.unsubscribe();throw e}},e}(z))(xo),Fo=function(t){function e(e,n,i){void 0===n&&(n=0),void 0===i&&(i=wo);var o=t.call(this)||this;return o.source=e,o.delayTime=n,o.scheduler=i,(!H(n)||n<0)&&(o.delayTime=0),i&&"function"==typeof i.schedule||(o.scheduler=wo),o}return i.__extends(e,t),e.create=function(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=wo),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);function Eo(t,e){return void 0===e&&(e=0),function(n){return n.lift(new Io(t,e))}}var Io=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new Fo(e,this.delay,this.scheduler).subscribe(t)},t}();function Co(t,e){return"function"==typeof e?function(n){return n.pipe(Co((function(n,i){return St(t(n,i)).pipe(Ct((function(t,o){return e(n,t,i,o)})))})))}:function(e){return e.lift(new ko(t))}}var ko=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new To(t,this.project))},t}(),To=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 o=new _(this,void 0,void 0);this.destination.add(o),this.innerSubscription=U(this,t,e,n,o)},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,o){this.destination.next(e)},e}(m);function Oo(){return Co(Dt)}function Po(t,e){return e?Co((function(){return t}),e):Co((function(){return t}))}function Bo(t){return function(e){return e.lift(new Do(t))}}var Do=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new jo(t),i=U(n,this.notifier);return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n},t}(),jo=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,o){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(m);function Uo(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new No(t,e))}}var No=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new Ao(t,this.predicate,this.inclusive))},t}(),Ao=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.predicate=n,o.inclusive=i,o.index=0,o}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}(y),Lo={leading:!0,trailing:!1};function Mo(t,e){return void 0===e&&(e=Lo),function(n){return n.lift(new Vo(t,e.leading,e.trailing))}}var Vo=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 zo(t,this.durationSelector,this.leading,this.trailing))},t}(),zo=function(t){function e(e,n,i,o){var r=t.call(this,e)||this;return r.destination=e,r.durationSelector=n,r._leading=i,r._trailing=o,r._hasValue=!1,r}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=U(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,o){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(m);function Ro(t,e,n){return void 0===e&&(e=R),void 0===n&&(n=Lo),function(i){return i.lift(new Ho(t,e,n.leading,n.trailing))}}var Ho=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 Wo(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Wo=function(t){function e(e,n,i,o,r){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=i,s.leading=o,s.trailing=r,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(Zo,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}(y);function Zo(t){t.subscriber.clearThrottle()}function Ko(t){return void 0===t&&(t=R),function(e){return n=function(){return e.pipe(Un((function(e,n){var i=e.current;return{value:n,current:t.now(),last:i}}),{current:t.now(),value:void 0,last:void 0}),Ct((function(t){var e=t.current,n=t.last,i=t.value;return new qo(i,e-n)})))},new F((function(t){var e;try{e=n()}catch(e){return void t.error(e)}return(e?St(e):Ft()).subscribe(t)}));var n}}var qo=function(){return function(t,e){this.value=t,this.interval=e}}();function Yo(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}Yo.prototype=Object.create(Error.prototype);var Go=Yo;function $o(t,e,n){return void 0===n&&(n=R),function(i){var o=te(t),r=o?+t-n.now():Math.abs(t);return i.lift(new Xo(r,o,e,n))}}var Xo=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 Jo(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Jo=function(t){function e(e,n,i,o,r){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=i,s.withObservable=o,s.scheduler=r,s.action=null,s.scheduleTimeout(),s}return i.__extends(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(U(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}(m);function Qo(t,e){return void 0===e&&(e=R),$o(t,ee(new Go),e)}function tr(t){return void 0===t&&(t=R),Ct((function(e){return new er(e,t.now())}))}var er=function(){return function(t,e){this.value=t,this.timestamp=e}}();function nr(t,e,n){return 0===n?[e]:(t.push(e),t)}function ir(){return Ln(nr,[])}function or(t){return function(e){return e.lift(new rr(t))}}var rr=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new sr(t),i=e.subscribe(n);return i.closed||n.add(U(n,this.windowBoundaries)),i},t}(),sr=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new pn,e.next(n.window),n}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,o){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 pn;e.next(n)},e}(m);function ur(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ar(t,e))}}var ar=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new cr(t,this.windowSize,this.startWindowEvery))},t}(),cr=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.destination=e,o.windowSize=n,o.startWindowEvery=i,o.windows=[new pn],o.count=0,e.next(o.windows[0]),o}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,o=this.windows,r=o.length,s=0;s<r&&!this.closed;s++)o[s].next(t);var u=this.count-i+1;if(u>=0&&u%e==0&&!this.closed&&o.shift().complete(),++this.count%e==0&&!this.closed){var a=new pn;o.push(a),n.next(a)}},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}(y);function lr(t){var e=R,n=null,i=Number.POSITIVE_INFINITY;return W(arguments[3])&&(e=arguments[3]),W(arguments[2])?e=arguments[2]:H(arguments[2])&&(i=arguments[2]),W(arguments[1])?e=arguments[1]:H(arguments[1])&&(n=arguments[1]),function(o){return o.lift(new pr(t,n,i,e))}}var pr=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 hr(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),dr=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}(pn),hr=function(t){function e(e,n,i,o,r){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=i,s.maxWindowSize=o,s.scheduler=r,s.windows=[];var u=s.openWindow();if(null!==i&&i>=0){var a={subscriber:s,window:u,context:null},c={windowTimeSpan:n,windowCreationInterval:i,subscriber:s,scheduler:r};s.add(r.schedule(yr,n,a)),s.add(r.schedule(vr,i,c))}else{var l={subscriber:s,window:u,windowTimeSpan:n};s.add(r.schedule(fr,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 o=e[i];o.closed||(o.next(t),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},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 dr;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}(y);function fr(t){var e=t.subscriber,n=t.windowTimeSpan,i=t.window;i&&e.closeWindow(i),t.window=e.openWindow(),this.schedule(t,n)}function vr(t){var e=t.windowTimeSpan,n=t.subscriber,i=t.scheduler,o=t.windowCreationInterval,r=n.openWindow(),s={action:this,subscription:null},u={subscriber:n,window:r,context:s};s.subscription=i.schedule(yr,e,u),this.add(s.subscription),this.schedule(t,o)}function yr(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 br(t,e){return function(n){return n.lift(new mr(t,e))}}var mr=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new _r(t,this.openings,this.closingSelector))},t}(),_r=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.openings=n,o.closingSelector=i,o.contexts=[],o.add(o.openSubscription=U(o,n,n)),o}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,o=-1;++o<i;){var r=n[o];r.window.error(e),r.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 o=e[i];o.window.complete(),o.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,o){if(t===this.openings){var r=void 0;try{r=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var s=new pn,u=new h,a={window:s,subscription:u};this.contexts.push(a);var c=U(this,r,a);c.closed?this.closeWindow(this.contexts.length-1):(c.context=a,u.add(c)),this.destination.next(s)}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,o=n.subscription;e.splice(t,1),i.complete(),o.unsubscribe()}},e}(m);function gr(t){return function(e){return e.lift(new Sr(t))}}var Sr=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new xr(t,this.closingSelector))},t}(),xr=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,o){this.openWindow(o)},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 pn;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=U(this,n))},e}(m);function wr(){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 Fr(i,n))}}var Fr=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new Er(t,this.observables,this.project))},t}(),Er=function(t){function e(e,n,i){var o=t.call(this,e)||this;o.observables=n,o.project=i,o.toRespond=[];var r=n.length;o.values=new Array(r);for(var s=0;s<r;s++)o.toRespond.push(s);for(s=0;s<r;s++){var u=n[s];o.add(U(o,u,u,s))}return o}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,o){this.values[n]=e;var r=this.toRespond;if(r.length>0){var s=r.indexOf(n);-1!==s&&r.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}(m);function Ir(){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(),yt(t,void 0).lift(new Cr(n))}var Cr=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new kr(t,this.resultSelector))},t}(),kr=function(t){function e(e,n,i){void 0===i&&(i=Object.create(null));var o=t.call(this,e)||this;return o.iterators=[],o.active=0,o.resultSelector="function"==typeof n?n:null,o.values=i,o}return i.__extends(e,t),e.prototype._next=function(t){var e=this.iterators;c(t)?e.push(new Or(t)):"function"==typeof t[T]?e.push(new Tr(t[T]())):e.push(new Pr(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 o=!1,r=[];for(i=0;i<e;i++){var s,u=(s=t[i]).next();if(s.hasCompleted()&&(o=!0),u.done)return void n.complete();r.push(u.value)}this.resultSelector?this._tryresultSelector(r):n.next(r),o&&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}(y),Tr=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}(),Or=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[T]=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}(),Pr=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.parent=n,o.observable=i,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return i.__extends(e,t),e.prototype[T]=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,o){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return U(this,this.observable,this,e)},e}(m);function Br(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Ir.apply(void 0,[e].concat(t)))}}function Dr(t){return function(e){return e.lift(new Cr(t))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(14);e.FileSelectModule=o.FileSelectModule;var r=n(39);e.UploadModule=r.UploadModule;var s=n(59);e.UploadsModule=s.UploadsModule;var u=n(13);e.UploadComponent=u.UploadComponent;var a=n(15);e.FileSelectComponent=a.FileSelectComponent;var c=n(38);e.UploadDropZoneComponent=c.UploadDropZoneComponent;var l=n(35);e.FileSelectDirective=l.FileSelectDirective;var p=n(28);e.FileListComponent=p.FileListComponent;var d=n(34);e.FileListSingleItemComponent=d.FileListSingleItemComponent;var h=n(30);e.FileListItemActionButtonComponent=h.FileListItemActionButtonComponent;var f=n(31);e.FileListMultipleItemsComponent=f.FileListMultipleItemsComponent;var v=n(10);e.FileTemplateDirective=v.FileTemplateDirective;var y=n(7);e.FileInfoTemplateDirective=y.FileInfoTemplateDirective;var b=n(36);e.TemplateContextDirective=b.TemplateContextDirective;var m=n(41);e.UploadStatusTotalComponent=m.UploadStatusTotalComponent;var _=n(40);e.UploadActionButtonsComponent=_.UploadActionButtonsComponent;var g=n(37);e.UploadDropZoneDirective=g.UploadDropZoneDirective;var S=n(25);e.CustomMessagesComponent=S.CustomMessagesComponent,i.__exportStar(n(23),e),i.__exportStar(n(4),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){this.files=t};e.CancelEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=function(t){function e(){return t.call(this)||this}return i.__extends(e,t),e}(n(9).PreventableEvent);e.ClearEvent=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e,n){this.files=t,this.operation=e,this.response=n};e.ErrorEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){this.file=t};e.PauseEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=function(t){function e(e,n){var i=t.call(this)||this;return i.files=e,i.headers=n,i}return i.__extends(e,t),e}(n(9).PreventableEvent);e.RemoveEvent=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){this.file=t};e.ResumeEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=function(t){function e(e){var n=t.call(this)||this;return n.files=e,n}return i.__extends(e,t),e}(n(9).PreventableEvent);e.SelectEvent=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=function(t){function e(e,n,i){var o=t.call(this)||this;return o.files=e,o.operation=n,o.response=i,o}return i.__extends(e,t),e}(n(9).PreventableEvent);e.SuccessEvent=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=function(t){function e(e,n){var i=t.call(this)||this;return i.files=e,i.headers=n,i}return i.__extends(e,t),e}(n(9).PreventableEvent);e.UploadEvent=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){this.files=t,this.percentComplete=e};e.UploadProgressEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fileGroupMap={audio:[".aif",".iff",".m3u",".m4a",".mid",".mp3",".mpa",".wav",".wma",".ogg",".wav",".wma",".wpl"],video:[".3g2",".3gp",".avi",".asf",".flv",".m4u",".rm",".h264",".m4v",".mkv",".mov",".mp4",".mpg",".rm",".swf",".vob",".wmv"],image:[".ai",".dds",".heic",".jpe","jfif",".jif",".jp2",".jps",".eps",".bmp",".gif",".jpeg",".jpg",".png",".ps",".psd",".svg",".svgz",".tif",".tiff"],txt:[".doc",".docx",".log",".pages",".tex",".wpd",".wps",".odt",".rtf",".text",".txt",".wks"],presentation:[".key",".odp",".pps",".ppt",".pptx"],data:[".xlr",".xls",".xlsx"],programming:[".tmp",".bak",".msi",".cab",".cpl",".cur",".dll",".dmp",".drv",".icns",".ico",".link",".sys",".cfg",".ini",".asp",".aspx",".cer",".csr",".css",".dcr",".htm",".html",".js",".php",".rss",".xhtml"],pdf:[".pdf"],config:[".apk",".app",".bat",".cgi",".com",".exe",".gadget",".jar",".wsf"],zip:[".7z",".cbr",".gz",".sitx",".arj",".deb",".pkg",".rar",".rpm",".tar.gz",".z",".zip",".zipx"],discImage:[".dmg",".iso",".toast",".vcd",".bin",".cue",".mdf"]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this._files={}}return t.prototype.add=function(t,e){var n={index:0,position:0,retries:0,totalChunks:e};return this._files[t]=n,n},t.prototype.remove=function(t){this.has(t)&&(this._files[t]=null,delete this._files[t])},t.prototype.has=function(t){return t in this._files},t.prototype.get=function(t){return this._files[t]},t}();e.ChunkMap=i},function(t,e){t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(5),s=n(12),u=n(27),a=n(3),c=function(t){function e(e,n,i,o){var r=t.call(this,e,n,"k-dropzone-hover")||this;return r.ngZone=i,r.uploadService=o,r.initialClassName=!0,r.hideIntervalDocument=null,r.activeClass="k-dropzone-active",r.ngZone.runOutsideAngular((function(){r.unsubscribeDocumentDragEnter=r.renderer.listen("document","dragenter",(function(){return r.onDocumentDragEnter()})),r.unsubscribeDocumentDragOver=r.renderer.listen("document","dragover",(function(){return r.onDocumentDragOver()}))})),r}return i.__extends(e,t),e.prototype.ngOnDestroy=function(){var t=this;this.ngZone.runOutsideAngular((function(){t.unsubscribeDocumentDragEnter&&t.unsubscribeDocumentDragEnter(),t.unsubscribeDocumentDragOver&&t.unsubscribeDocumentDragOver()}))},e.prototype.onDocumentDragEnter=function(){var t=this;return this.addClass(this.activeClass),this.lastDragDocument=new Date,this.hideIntervalDocument||(this.hideIntervalDocument=setInterval((function(){t.calculateTimeDiff(t.lastDragDocument)<100||(t.removeClass(t.activeClass),clearInterval(t.hideIntervalDocument),t.hideIntervalDocument=null)}),100)),!1},e.prototype.onDocumentDragOver=function(){return this.lastDragDocument=new Date,!1},e.prototype.onDropListener=function(t){var e=t.dataTransfer.files;if(e.length>0&&!this.disabled){var n=r.getAllFileInfo(e);n=r.assignGuidToFiles(n,!this.uploadService.async.batch),this.multiple||(n.splice(1,n.length-1),this.uploadService.clearFiles()),s.validateFiles(n,this.restrictions),this.uploadService.addFiles(n)}return!1},i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],e.prototype,"multiple",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Object)],e.prototype,"restrictions",void 0),i.__decorate([o.HostBinding("class.k-dropzone"),i.__metadata("design:type",Boolean)],e.prototype,"initialClassName",void 0),i.__decorate([o.HostListener("drop",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",Boolean)],e.prototype,"onDropListener",null),e=i.__decorate([o.Directive({selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n "}),i.__metadata("design:paramtypes",[o.ElementRef,o.Renderer2,o.NgZone,a.UploadService])],e)}(u.DropZoneBase);e.DropZoneInternalDirective=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(26),s=n(2),u=function(t){function e(e){var n=t.call(this)||this;return n.service=e,n}var n;return i.__extends(e,t),n=e,e=n=i.__decorate([o.Directive({providers:[{provide:r.Messages,useExisting:o.forwardRef((function(){return n}))}],selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "}),i.__metadata("design:paramtypes",[s.LocalizationService])],e)}(r.Messages);e.LocalizedMessagesDirective=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(1),r=n(14),s=n(39),u=function(){function t(){}return t=i.__decorate([o.NgModule({exports:[r.FileSelectModule,s.UploadModule]})],t)}();e.UploadsModule=u}])}));
|