zone-node.min.js 32.5 KB
/**
* @license Angular v9.1.0-next.4+61.sha-e552591.with-local-changes
* (c) 2010-2020 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";
/**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */!function(e){var t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function r(e,n){t&&t.measure&&t.measure(e,n)}n("Zone");var o=e.__Zone_symbol_prefix||"__zone_symbol__";function i(e){return o+e}var a=!0===e[i("forceDuplicateZoneCheck")];if(e.Zone){if(a||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}var s=function(){function t(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}return t.assertZonePatched=function(){if(e.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(t,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"current",{get:function(){return z.zone},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTask",{get:function(){return C},enumerable:!0,configurable:!0}),t.__load_patch=function(o,i){if(O.hasOwnProperty(o)){if(a)throw Error("Already loaded patch: "+o)}else if(!e["__Zone_disable_"+o]){var s="Zone:"+o;n(s),O[o]=i(e,t,j),r(s,s)}},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},t.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},t.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},t.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},t.prototype.run=function(e,t,n,r){z={parent:z,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{z=z.parent}},t.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),z={parent:z,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{z=z.parent}},t.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");if(e.state!==m||e.type!==P&&e.type!==D){var r=e.state!=w;r&&e._transitionTo(w,b),e.runCount++;var o=C;C=e,z={parent:z,zone:this};try{e.type==D&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==m&&e.state!==Z&&(e.type==P||e.data&&e.data.isPeriodic?r&&e._transitionTo(b,w):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(m,w,m))),z=z.parent,C=o}}},t.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+e.zone.name);t=t.parent}e._transitionTo(T,m);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(Z,T,m),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==T&&e._transitionTo(b,T),e},t.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new f(S,e,t,n,r,void 0))},t.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new f(D,e,t,n,r,o))},t.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new f(P,e,t,n,r,o))},t.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");e._transitionTo(E,b,w);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(Z,E),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(m,E),e.runCount=0,e},t.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},t}();s.__symbol__=i;var c,u={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,i){return e.invokeTask(n,r,o,i)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},l=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:u,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=u,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=u,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=u,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new s(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=S)throw new Error("Task is missing scheduleFn.");_(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),f=function(){function t(n,r,o,i,a,s){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=i,this.scheduleFn=a,this.cancelFn=s,!o)throw new Error("callback is not defined");this.callback=o;var c=this;this.invoke=n===P&&i&&i.useG?t.invokeTask:function(){return t.invokeTask.call(e,c,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),I++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==I&&y(),I--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(m,T)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+e+"', expecting state '"+t+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=e,e==m&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),h=i("setTimeout"),p=i("Promise"),d=i("then"),v=[],k=!1;function _(t){if(0===I&&0===v.length)if(c||e[p]&&(c=e[p].resolve(0)),c){var n=c[d];n||(n=c.then),n.call(c,y)}else e[h](y,0);t&&v.push(t)}function y(){if(!k){for(k=!0;v.length;){var e=v;v=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){j.onUnhandledError(e)}}}j.microtaskDrainDone(),k=!1}}var g={name:"NO ZONE"},m="notScheduled",T="scheduling",b="scheduled",w="running",E="canceling",Z="unknown",S="microTask",D="macroTask",P="eventTask",O={},j={symbol:i,currentZoneFrame:function(){return z},onUnhandledError:N,microtaskDrainDone:N,scheduleMicroTask:_,showUncaughtError:function(){return!s[i("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:N,patchMethod:function(){return N},bindArguments:function(){return[]},patchThen:function(){return N},patchMacroTask:function(){return N},setNativePromise:function(e){e&&"function"==typeof e.resolve&&(c=e.resolve(0))},patchEventPrototype:function(){return N},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return N},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return N},wrapWithCurrentZone:function(){return N},filterProperties:function(){return[]},attachOriginToPatched:function(){return N},_redefineProperty:function(){return N},patchCallbacks:function(){return N}},z={parent:null,zone:new s(null,null)},C=null,I=0;function N(){}r("Zone","Zone"),e.Zone=s}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),
/**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */
Zone.__load_patch("ZoneAwarePromise",(function(e,t,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,i=n.symbol,a=[],s=!0===e[i("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=i("Promise"),u=i("then"),l="__creationTrace__";n.onUnhandledError=function(e){if(n.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=function(){for(var e=function(){var e=a.shift();try{e.zone.runGuarded((function(){throw e}))}catch(e){!function r(e){n.onUnhandledError(e);try{var r=t[f];"function"==typeof r&&r.call(this,e)}catch(e){}}(e)}};a.length;)e()};var f=i("unhandledPromiseRejectionHandler");function h(e){return e&&e.then}function p(e){return e}function d(e){return N.reject(e)}var v=i("state"),k=i("value"),_=i("finally"),y=i("parentPromiseValue"),g=i("parentPromiseState"),m="Promise.then",T=null,b=!0,w=!1,E=0;function Z(e,t){return function(n){try{O(e,t,n)}catch(t){O(e,!1,t)}}}var S=function(){var e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},D="Promise resolved with itself",P=i("currentTaskTrace");function O(e,r,i){var c=S();if(e===i)throw new TypeError(D);if(e[v]===T){var u=null;try{"object"!=typeof i&&"function"!=typeof i||(u=i&&i.then)}catch(t){return c((function(){O(e,!1,t)}))(),e}if(r!==w&&i instanceof N&&i.hasOwnProperty(v)&&i.hasOwnProperty(k)&&i[v]!==T)z(i),O(e,i[v],i[k]);else if(r!==w&&"function"==typeof u)try{u.call(i,c(Z(e,r)),c(Z(e,!1)))}catch(t){c((function(){O(e,!1,t)}))()}else{e[v]=r;var f=e[k];if(e[k]=i,e[_]===_&&r===b&&(e[v]=e[g],e[k]=e[y]),r===w&&i instanceof Error){var h=t.currentTask&&t.currentTask.data&&t.currentTask.data[l];h&&o(i,P,{configurable:!0,enumerable:!1,writable:!0,value:h})}for(var p=0;p<f.length;)C(e,f[p++],f[p++],f[p++],f[p++]);if(0==f.length&&r==w){e[v]=E;var d=i;if(!s)try{throw new Error("Uncaught (in promise): "+function m(e){return e&&e.toString===Object.prototype.toString?(e.constructor&&e.constructor.name||"")+": "+JSON.stringify(e):e?e.toString():Object.prototype.toString.call(e)}(i)+(i&&i.stack?"\n"+i.stack:""))}catch(e){d=e}d.rejection=i,d.promise=e,d.zone=t.current,d.task=t.currentTask,a.push(d),n.scheduleMicroTask()}}}return e}var j=i("rejectionHandledHandler");function z(e){if(e[v]===E){try{var n=t[j];n&&"function"==typeof n&&n.call(this,{rejection:e[k],promise:e})}catch(e){}e[v]=w;for(var r=0;r<a.length;r++)e===a[r].promise&&a.splice(r,1)}}function C(e,t,n,r,o){z(e);var i=e[v],a=i?"function"==typeof r?r:p:"function"==typeof o?o:d;t.scheduleMicroTask(m,(function(){try{var r=e[k],o=!!n&&_===n[_];o&&(n[y]=r,n[g]=i);var s=t.run(a,void 0,o&&a!==d&&a!==p?[]:[r]);O(n,!0,s)}catch(e){O(n,!1,e)}}),n)}var I=function(){},N=function(){function e(t){if(!(this instanceof e))throw new Error("Must be an instanceof Promise.");this[v]=T,this[k]=[];try{t&&t(Z(this,b),Z(this,w))}catch(e){O(this,!1,e)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(e){return O(new this(null),b,e)},e.reject=function(e){return O(new this(null),w,e)},e.race=function(e){var t,n,r=new this((function(e,r){t=e,n=r}));function o(e){t(e)}function i(e){n(e)}for(var a=0,s=e;a<s.length;a++){var c=s[a];h(c)||(c=this.resolve(c)),c.then(o,i)}return r},e.all=function(t){return e.allWithCallback(t)},e.allSettled=function(t){return(this&&this.prototype instanceof e?this:e).allWithCallback(t,{thenCallback:function(e){return{status:"fulfilled",value:e}},errorCallback:function(e){return{status:"rejected",reason:e}}})},e.allWithCallback=function(e,t){for(var n,r,o=new this((function(e,t){n=e,r=t})),i=2,a=0,s=[],c=function(e){h(e)||(e=u.resolve(e));var o=a;try{e.then((function(e){s[o]=t?t.thenCallback(e):e,0==--i&&n(s)}),(function(e){t?(s[o]=t.errorCallback(e),0==--i&&n(s)):r(e)}))}catch(e){r(e)}i++,a++},u=this,l=0,f=e;l<f.length;l++)c(f[l]);return 0==(i-=2)&&n(s),o},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,Symbol.species,{get:function(){return e},enumerable:!0,configurable:!0}),e.prototype.then=function(n,r){var o=this.constructor[Symbol.species];o&&"function"==typeof o||(o=this.constructor||e);var i=new o(I),a=t.current;return this[v]==T?this[k].push(a,i,n,r):C(this,a,i,n,r),i},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(n){var r=this.constructor[Symbol.species];r&&"function"==typeof r||(r=e);var o=new r(I);o[_]=_;var i=t.current;return this[v]==T?this[k].push(i,o,n,n):C(this,i,o,n,n),o},e}();N.resolve=N.resolve,N.reject=N.reject,N.race=N.race,N.all=N.all;var x=e[c]=e.Promise,A=t.__symbol__("ZoneAwarePromise"),L=r(e,"Promise");L&&!L.configurable||(L&&delete L.writable,L&&delete L.value,L||(L={configurable:!0,enumerable:!0}),L.get=function(){return e[A]?e[A]:e[c]},L.set=function(t){t===N?e[A]=t:(e[c]=t,t.prototype[u]||F(t),n.setNativePromise(t))},o(e,"Promise",L)),e.Promise=N;var R=i("thenPatched");function F(e){var t=e.prototype,n=r(t,"then");if(!n||!1!==n.writable&&n.configurable){var o=t.then;t[u]=o,e.prototype.then=function(e,t){var n=this;return new N((function(e,t){o.call(n,e,t)})).then(e,t)},e[R]=!0}}if(n.patchThen=F,x){F(x);var H=e.fetch;"function"==typeof H&&(e[n.symbol("fetch")]=H,e.fetch=function M(e){return function(){var t=e.apply(this,arguments);if(t instanceof N)return t;var n=t.constructor;return n[R]||F(n),t}}(H))}return Promise[t.__symbol__("uncaughtPromiseErrors")]=a,N}));
/**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */
var e=Object.getOwnPropertyDescriptor,t=Object.defineProperty,n=Object.getPrototypeOf,r=Array.prototype.slice,o=(Zone.__symbol__("addEventListener"),Zone.__symbol__("removeEventListener"),"true"),i="false",a=Zone.__symbol__("");function s(e,t){return Zone.current.wrap(e,t)}function c(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var u=Zone.__symbol__,l="undefined"!=typeof window,f=l?window:void 0,h=l&&f||"object"==typeof self&&self||global,p="removeAttribute",d=[null];function v(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=s(e[n],t+"_"+n));return e}var k="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,_=!("nw"in h)&&void 0!==h.process&&"[object process]"==={}.toString.call(h.process),y=!_&&!k&&!(!l||!f.HTMLElement),g=void 0!==h.process&&"[object process]"==={}.toString.call(h.process)&&!k&&!(!l||!f.HTMLElement),m={},T=function(e){if(e=e||h.event){var t=m[e.type];t||(t=m[e.type]=u("ON_PROPERTY"+e.type));var n,r=this||e.target||h,o=r[t];if(y&&r===f&&"error"===e.type){var i=e;!0===(n=o&&o.call(this,i.message,i.filename,i.lineno,i.colno,i.error))&&e.preventDefault()}else null==(n=o&&o.apply(this,arguments))||n||e.preventDefault();return n}};function b(n,r,o){var i=e(n,r);if(!i&&o&&e(o,r)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){var a=u("on"+r+"patched");if(!n.hasOwnProperty(a)||!n[a]){delete i.writable,delete i.value;var s=i.get,c=i.set,l=r.substr(2),f=m[l];f||(f=m[l]=u("ON_PROPERTY"+l)),i.set=function(e){var t=this;t||n!==h||(t=h),t&&(t[f]&&t.removeEventListener(l,T),c&&c.apply(t,d),"function"==typeof e?(t[f]=e,t.addEventListener(l,T,!1)):t[f]=null)},i.get=function(){var e=this;if(e||n!==h||(e=h),!e)return null;var t=e[f];if(t)return t;if(s){var o=s&&s.call(this);if(o)return i.set.call(this,o),"function"==typeof e[p]&&e.removeAttribute(r),o}return null},t(n,r,i),n[a]=!0}}}function w(e,t,n){if(t)for(var r=0;r<t.length;r++)b(e,"on"+t[r],n);else{var o=[];for(var i in e)"on"==i.substr(0,2)&&o.push(i);for(var a=0;a<o.length;a++)b(e,o[a],n)}}u("originalInstance");var E=!1;function Z(t,r,o){for(var i=t;i&&!i.hasOwnProperty(r);)i=n(i);!i&&t[r]&&(i=t);var a=u(r),s=null;if(i&&!(s=i[a])&&(s=i[a]=i[r],function c(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}(i&&e(i,r)))){var l=o(s,a,r);i[r]=function(){return l(this,arguments)},D(i[r],s),E&&function f(e,t){"function"==typeof Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){(!r||r.writable&&"function"==typeof r.set)&&(e[n]=t)},enumerable:!r||r.enumerable,configurable:!r||r.configurable})}))}(s,i[r])}return s}function S(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=Z(e,t,(function(e){return function(t,r){var i=n(t,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?c(i.name,r[i.cbIdx],i,o):e.apply(t,r)}}))}function D(e,t){e[u("OriginalDelegate")]=t}
/**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */Zone.__load_patch("toString",(function(e){var t=Function.prototype.toString,n=u("OriginalDelegate"),r=u("Promise"),o=u("Error"),i=function i(){if("function"==typeof this){var a=this[n];if(a)return"function"==typeof a?t.call(a):Object.prototype.toString.call(a);if(this===Promise){var s=e[r];if(s)return t.call(s)}if(this===Error){var c=e[o];if(c)return t.call(c)}}return t.call(this)};i[n]=t,Function.prototype.toString=i;var a=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":a.call(this)}})),
/**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */
Zone.__load_patch("node_util",(function(e,t,n){n.patchOnProperties=w,n.patchMethod=Z,n.bindArguments=v,n.patchMacroTask=S,function r(e){E=e}(!0)}));
/**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */
var P=!1;if("undefined"!=typeof window)try{var O=Object.defineProperty({},"passive",{get:function(){P=!0}});window.addEventListener("test",O,O),window.removeEventListener("test",O,O)}catch(e){P=!1}var j={useG:!0},z={},C={},I=new RegExp("^"+a+"(\\w+)(true|false)$"),N=u("propagationStopped");function x(e,t){var n=(t?t(e):e)+i,r=(t?t(e):e)+o,s=a+n,c=a+r;z[e]={},z[e][i]=s,z[e][o]=c}function A(e,t){if(!t){var n=[];for(var r in e){var a=I.exec(r),s=a&&a[1];if(s&&(!t||s===t)){var c=e[r];if(c)for(var u=0;u<c.length;u++)n.push(c[u])}}return n}var l=z[t];l||(x(t),l=z[t]);var f=e[l[i]],h=e[l[o]];return f?h?f.concat(h):f.slice():h?h.slice():[]}
/**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */Zone.__load_patch("EventEmitter",(function(e){var t,r=function(e,t){return e.callback===t||e.callback.listener===t},s=function(e){return"string"==typeof e?e:e?e.toString().replace("(","_").replace(")","_"):""};try{t=require("events")}catch(e){}t&&t.EventEmitter&&function c(t){var c=function l(e,t,r){var s=r&&r.add||"addEventListener",c=r&&r.rm||"removeEventListener",l=r&&r.listeners||"eventListeners",f=r&&r.rmAll||"removeAllListeners",h=u(s),p="."+s+":",d="prependListener",v="."+d+":",k=function(e,t,n){if(!e.isRemoved){var r=e.callback;"object"==typeof r&&r.handleEvent&&(e.callback=function(e){return r.handleEvent(e)},e.originalDelegate=r),e.invoke(e,t,[n]);var o=e.options;o&&"object"==typeof o&&o.once&&t[c].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,o)}},y=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[z[t.type][i]];if(r)if(1===r.length)k(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length&&(!t||!0!==t[N]);a++)k(o[a],n,t)}},g=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[z[t.type][o]];if(r)if(1===r.length)k(r[0],n,t);else for(var i=r.slice(),a=0;a<i.length&&(!t||!0!==t[N]);a++)k(i[a],n,t)}};function m(t,r){if(!t)return!1;var k=!0;r&&void 0!==r.useG&&(k=r.useG);var m=r&&r.vh,T=!0;r&&void 0!==r.chkDup&&(T=r.chkDup);var b=!1;r&&void 0!==r.rt&&(b=r.rt);for(var w=t;w&&!w.hasOwnProperty(s);)w=n(w);if(!w&&t[s]&&(w=t),!w)return!1;if(w[h])return!1;var E,Z=r&&r.eventNameToString,S={},O=w[h]=w[s],N=w[u(c)]=w[c],L=w[u(l)]=w[l],R=w[u(f)]=w[f];function F(e,t){return!P&&"object"==typeof e&&e?!!e.capture:P&&t?"boolean"==typeof e?{capture:e,passive:!0}:e?"object"==typeof e&&!1!==e.passive?Object.assign(Object.assign({},e),{passive:!0}):e:{passive:!0}:e}r&&r.prepend&&(E=w[u(r.prepend)]=w[r.prepend]);var H=k?function(e){if(!S.isExisting)return O.call(S.target,S.eventName,S.capture?g:y,S.options)}:function(e){return O.call(S.target,S.eventName,e.invoke,S.options)},M=k?function(e){if(!e.isRemoved){var t=z[e.eventName],n=void 0;t&&(n=t[e.capture?o:i]);var r=n&&e.target[n];if(r)for(var a=0;a<r.length;a++)if(r[a]===e){r.splice(a,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return N.call(e.target,e.eventName,e.capture?g:y,e.options)}:function(e){return N.call(e.target,e.eventName,e.invoke,e.options)},G=r&&r.diff?r.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},U=Zone[u("BLACK_LISTED_EVENTS")],W=e[u("PASSIVE_EVENTS")],q=function(t,n,a,s,c,u){return void 0===c&&(c=!1),void 0===u&&(u=!1),function(){var l=this||e,f=arguments[0];r&&r.transferEventName&&(f=r.transferEventName(f));var h=arguments[1];if(!h)return t.apply(this,arguments);if(_&&"uncaughtException"===f)return t.apply(this,arguments);var p=!1;if("function"!=typeof h){if(!h.handleEvent)return t.apply(this,arguments);p=!0}if(!m||m(t,h,l,arguments)){var d=P&&!!W&&-1!==W.indexOf(f),v=F(arguments[2],d);if(U)for(var y=0;y<U.length;y++)if(f===U[y])return d?t.call(l,f,h,v):t.apply(this,arguments);var g=!!v&&("boolean"==typeof v||v.capture),b=!(!v||"object"!=typeof v)&&v.once,w=Zone.current,E=z[f];E||(x(f,Z),E=z[f]);var D,O=E[g?o:i],I=l[O],N=!1;if(I){if(N=!0,T)for(y=0;y<I.length;y++)if(G(I[y],h))return}else I=l[O]=[];var A=l.constructor.name,L=C[A];L&&(D=L[f]),D||(D=A+n+(Z?Z(f):f)),S.options=v,b&&(S.options.once=!1),S.target=l,S.capture=g,S.eventName=f,S.isExisting=N;var R=k?j:void 0;R&&(R.taskData=S);var H=w.scheduleEventTask(D,h,R,a,s);return S.target=null,R&&(R.taskData=null),b&&(v.once=!0),(P||"boolean"!=typeof H.options)&&(H.options=v),H.target=l,H.capture=g,H.eventName=f,p&&(H.originalDelegate=h),u?I.unshift(H):I.push(H),c?l:void 0}}};return w[s]=q(O,p,H,M,b),E&&(w[d]=q(E,v,(function(e){return E.call(S.target,S.eventName,e.invoke,S.options)}),M,b,!0)),w[c]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));var s=arguments[2],c=!!s&&("boolean"==typeof s||s.capture),u=arguments[1];if(!u)return N.apply(this,arguments);if(!m||m(N,u,t,arguments)){var l,f=z[n];f&&(l=f[c?o:i]);var h=l&&t[l];if(h)for(var p=0;p<h.length;p++){var d=h[p];if(G(d,u)){if(h.splice(p,1),d.isRemoved=!0,0===h.length&&(d.allRemoved=!0,t[l]=null,"string"==typeof n)){var v=a+"ON_PROPERTY"+n;t[v]=null}return d.zone.cancelTask(d),b?t:void 0}}return N.apply(this,arguments)}},w[l]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));for(var o=[],i=A(t,Z?Z(n):n),a=0;a<i.length;a++){var s=i[a],c=s.originalDelegate?s.originalDelegate:s.callback;o.push(c)}return o},w[f]=function(){var t=this||e,n=arguments[0];if(n){r&&r.transferEventName&&(n=r.transferEventName(n));var a=z[n];if(a){var s=a[i],u=a[o],l=t[s],h=t[u];if(l){var p=l.slice();for(k=0;k<p.length;k++)this[c].call(this,n,(d=p[k]).originalDelegate?d.originalDelegate:d.callback,d.options)}if(h)for(p=h.slice(),k=0;k<p.length;k++){var d;this[c].call(this,n,(d=p[k]).originalDelegate?d.originalDelegate:d.callback,d.options)}}}else{for(var v=Object.keys(t),k=0;k<v.length;k++){var _=v[k],y=I.exec(_),g=y&&y[1];g&&"removeListener"!==g&&this[f].call(this,g)}this[f].call(this,"removeListener")}if(b)return this},D(w[s],O),D(w[c],N),R&&D(w[f],R),L&&D(w[l],L),!0}for(var T=[],b=0;b<t.length;b++)T[b]=m(t[b],r);return T}(e,[t],{useG:!1,add:"addListener",rm:"removeListener",prepend:"prependListener",rmAll:"removeAllListeners",listeners:"listeners",chkDup:!1,rt:!0,diff:r,eventNameToString:s});c&&c[0]&&(t.on=t.addListener)}(t.EventEmitter.prototype)})),
/**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */
Zone.__load_patch("fs",(function(){var e;try{e=require("fs")}catch(e){}e&&["access","appendFile","chmod","chown","close","exists","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","read","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile"].filter((function(t){return!!e[t]&&"function"==typeof e[t]})).forEach((function(t){S(e,t,(function(e,n){return{name:"fs."+t,args:n,cbIdx:n.length>0?n.length-1:-1,target:e}}))}))}));
/**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */
var L=u("zoneTask");function R(e,t,n,r){var o=null,i=null;n+=r;var a={};function s(t){var n=t.data;return n.args[0]=function r(){try{t.invoke.apply(this,arguments)}finally{t.data&&t.data.isPeriodic||("number"==typeof n.handleId?delete a[n.handleId]:n.handleId&&(n.handleId[L]=null))}},n.handleId=o.apply(e,n.args),t}function u(e){return i(e.data.handleId)}o=Z(e,t+=r,(function(n){return function(o,i){if("function"==typeof i[0]){var l=c(t,i[0],{isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},s,u);if(!l)return l;var f=l.data.handleId;return"number"==typeof f?a[f]=l:f&&(f[L]=l),f&&f.ref&&f.unref&&"function"==typeof f.ref&&"function"==typeof f.unref&&(l.ref=f.ref.bind(f),l.unref=f.unref.bind(f)),"number"==typeof f||f?f:l}return n.apply(e,i)}})),i=Z(e,n,(function(t){return function(n,r){var o,i=r[0];"number"==typeof i?o=a[i]:(o=i&&i[L])||(o=i),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof i?delete a[i]:i&&(i[L]=null),o.zone.cancelTask(o)):t.apply(e,r)}}))}
/**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */var F="set";Zone.__load_patch("node_timers",(function(e,t){var n=!1;try{var r=require("timers");if(e.setTimeout!==r.setTimeout&&!g){var o=r.setTimeout;r.setTimeout=function(){return n=!0,o.apply(this,arguments)};var i=e.setTimeout((function(){}),100);clearTimeout(i),r.setTimeout=o}R(r,F,"clear","Timeout"),R(r,F,"clear","Interval"),R(r,F,"clear","Immediate")}catch(e){}g||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(R(e,F,"clear","Timeout"),R(e,F,"clear","Interval"),R(e,F,"clear","Immediate")))})),Zone.__load_patch("nextTick",(function(){!function e(t,n,r){var o=null;function i(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=Z(t,n,(function(e){return function(t,n){var o=r(t,n);return o.cbIdx>=0&&"function"==typeof n[o.cbIdx]?Zone.current.scheduleMicroTask(o.name,n[o.cbIdx],o,i):e.apply(t,n)}}))}(process,"nextTick",(function(e,t){return{name:"process.nextTick",args:t,cbIdx:t.length>0&&"function"==typeof t[0]?0:-1,target:process}}))})),Zone.__load_patch("handleUnhandledPromiseRejection",(function(e,t,n){function r(e){return function(t){A(process,e).forEach((function(n){"unhandledRejection"===e?n.invoke(t.rejection,t.promise):"rejectionHandled"===e&&n.invoke(t.promise)}))}}t[n.symbol("unhandledPromiseRejectionHandler")]=r("unhandledRejection"),t[n.symbol("rejectionHandledHandler")]=r("rejectionHandled")})),Zone.__load_patch("crypto",(function(){var e;try{e=require("crypto")}catch(e){}e&&["randomBytes","pbkdf2"].forEach((function(t){S(e,t,(function(n,r){return{name:"crypto."+t,args:r,cbIdx:r.length>0&&"function"==typeof r[r.length-1]?r.length-1:-1,target:e}}))}))})),Zone.__load_patch("console",(function(e,t){["dir","log","info","error","warn","assert","debug","timeEnd","trace"].forEach((function(e){var n=console[t.__symbol__(e)]=console[e];n&&(console[e]=function(){var e=r.call(arguments);return t.current===t.root?n.apply(this,e):t.root.run(n,this,e)})}))}))}));