var __spreadArrays=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}; /** * @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!==C.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 j.zone},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTask",{get:function(){return A},enumerable:!0,configurable:!0}),t.__load_patch=function(o,i){if(C.hasOwnProperty(o)){if(a)throw Error("Already loaded patch: "+o)}else if(!e["__Zone_disable_"+o]){var s="Zone:"+o;n(s),C[o]=i(e,t,I),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){j={parent:j,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{j=j.parent}},t.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),j={parent:j,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{j=j.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||m).name+"; Execution: "+this.name+")");if(e.state!==g||e.type!==D&&e.type!==Z){var r=e.state!=w;r&&e._transitionTo(w,b),e.runCount++;var o=A;A=e,j={parent:j,zone:this};try{e.type==Z&&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!==g&&e.state!==E&&(e.type==D||e.data&&e.data.isPeriodic?r&&e._transitionTo(b,w):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(g,w,g))),j=j.parent,A=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,g);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(E,T,g),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 h(S,e,t,n,r,void 0))},t.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new h(Z,e,t,n,r,o))},t.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new h(D,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||m).name+"; Execution: "+this.name+")");e._transitionTo(P,b,w);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(E,P),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(g,P),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.");v(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}(),h=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===D&&i&&i.useG?t.invokeTask:function(){return t.invokeTask.call(e,c,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),O++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==O&&k(),O--}},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(g,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==g&&(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}(),f=i("setTimeout"),p=i("Promise"),d=i("then"),_=[],y=!1;function v(t){if(0===O&&0===_.length)if(c||e[p]&&(c=e[p].resolve(0)),c){var n=c[d];n||(n=c.then),n.call(c,k)}else e[f](k,0);t&&_.push(t)}function k(){if(!y){for(y=!0;_.length;){var e=_;_=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){I.onUnhandledError(e)}}}I.microtaskDrainDone(),y=!1}}var m={name:"NO ZONE"},g="notScheduled",T="scheduling",b="scheduled",w="running",P="canceling",E="unknown",S="microTask",Z="macroTask",D="eventTask",C={},I={symbol:i,currentZoneFrame:function(){return j},onUnhandledError:x,microtaskDrainDone:x,scheduleMicroTask:v,showUncaughtError:function(){return!s[i("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:x,patchMethod:function(){return x},bindArguments:function(){return[]},patchThen:function(){return x},patchMacroTask:function(){return x},setNativePromise:function(e){e&&"function"==typeof e.resolve&&(c=e.resolve(0))},patchEventPrototype:function(){return x},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return x},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return x},wrapWithCurrentZone:function(){return x},filterProperties:function(){return[]},attachOriginToPatched:function(){return x},_redefineProperty:function(){return x},patchCallbacks:function(){return x}},j={parent:null,zone:new s(null,null)},A=null,O=0;function x(){}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[h];"function"==typeof r&&r.call(this,e)}catch(e){}}(e)}};a.length;)e()};var h=i("unhandledPromiseRejectionHandler");function f(e){return e&&e.then}function p(e){return e}function d(e){return x.reject(e)}var _=i("state"),y=i("value"),v=i("finally"),k=i("parentPromiseValue"),m=i("parentPromiseState"),g="Promise.then",T=null,b=!0,w=!1,P=0;function E(e,t){return function(n){try{C(e,t,n)}catch(t){C(e,!1,t)}}}var S=function(){var e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},Z="Promise resolved with itself",D=i("currentTaskTrace");function C(e,r,i){var c=S();if(e===i)throw new TypeError(Z);if(e[_]===T){var u=null;try{"object"!=typeof i&&"function"!=typeof i||(u=i&&i.then)}catch(t){return c((function(){C(e,!1,t)}))(),e}if(r!==w&&i instanceof x&&i.hasOwnProperty(_)&&i.hasOwnProperty(y)&&i[_]!==T)j(i),C(e,i[_],i[y]);else if(r!==w&&"function"==typeof u)try{u.call(i,c(E(e,r)),c(E(e,!1)))}catch(t){c((function(){C(e,!1,t)}))()}else{e[_]=r;var h=e[y];if(e[y]=i,e[v]===v&&r===b&&(e[_]=e[m],e[y]=e[k]),r===w&&i instanceof Error){var f=t.currentTask&&t.currentTask.data&&t.currentTask.data[l];f&&o(i,D,{configurable:!0,enumerable:!1,writable:!0,value:f})}for(var p=0;p<h.length;)A(e,h[p++],h[p++],h[p++],h[p++]);if(0==h.length&&r==w){e[_]=P;var d=i;if(!s)try{throw new Error("Uncaught (in promise): "+function g(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 I=i("rejectionHandledHandler");function j(e){if(e[_]===P){try{var n=t[I];n&&"function"==typeof n&&n.call(this,{rejection:e[y],promise:e})}catch(e){}e[_]=w;for(var r=0;r<a.length;r++)e===a[r].promise&&a.splice(r,1)}}function A(e,t,n,r,o){j(e);var i=e[_],a=i?"function"==typeof r?r:p:"function"==typeof o?o:d;t.scheduleMicroTask(g,(function(){try{var r=e[y],o=!!n&&v===n[v];o&&(n[k]=r,n[m]=i);var s=t.run(a,void 0,o&&a!==d&&a!==p?[]:[r]);C(n,!0,s)}catch(e){C(n,!1,e)}}),n)}var O=function(){},x=function(){function e(t){if(!(this instanceof e))throw new Error("Must be an instanceof Promise.");this[_]=T,this[y]=[];try{t&&t(E(this,b),E(this,w))}catch(e){C(this,!1,e)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(e){return C(new this(null),b,e)},e.reject=function(e){return C(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];f(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){f(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,h=e;l<h.length;l++)c(h[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(O),a=t.current;return this[_]==T?this[y].push(a,i,n,r):A(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(O);o[v]=v;var i=t.current;return this[_]==T?this[y].push(i,o,n,n):A(this,i,o,n,n),o},e}();x.resolve=x.resolve,x.reject=x.reject,x.race=x.race,x.all=x.all;var z=e[c]=e.Promise,R=t.__symbol__("ZoneAwarePromise"),F=r(e,"Promise");F&&!F.configurable||(F&&delete F.writable,F&&delete F.value,F||(F={configurable:!0,enumerable:!0}),F.get=function(){return e[R]?e[R]:e[c]},F.set=function(t){t===x?e[R]=t:(e[c]=t,t.prototype[u]||N(t),n.setNativePromise(t))},o(e,"Promise",F)),e.Promise=x;var M=i("thenPatched");function N(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 x((function(e,t){o.call(n,e,t)})).then(e,t)},e[M]=!0}}if(n.patchThen=N,z){N(z);var L=e.fetch;"function"==typeof L&&(e[n.symbol("fetch")]=L,e.fetch=function q(e){return function(){var t=e.apply(this,arguments);if(t instanceof x)return t;var n=t.constructor;return n[M]||N(n),t}}(L))}return Promise[t.__symbol__("uncaughtPromiseErrors")]=a,x})); /** * @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,h=l?window:void 0,f=l&&h||"object"==typeof self&&self||global,p="removeAttribute",d=[null];function _(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 y="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,v=!("nw"in f)&&void 0!==f.process&&"[object process]"==={}.toString.call(f.process),k=!v&&!y&&!(!l||!h.HTMLElement),m=void 0!==f.process&&"[object process]"==={}.toString.call(f.process)&&!y&&!(!l||!h.HTMLElement),g={},T=function(e){if(e=e||f.event){var t=g[e.type];t||(t=g[e.type]=u("ON_PROPERTY"+e.type));var n,r=this||e.target||f,o=r[t];if(k&&r===h&&"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),h=g[l];h||(h=g[l]=u("ON_PROPERTY"+l)),i.set=function(e){var t=this;t||n!==f||(t=f),t&&(t[h]&&t.removeEventListener(l,T),c&&c.apply(t,d),"function"==typeof e?(t[h]=e,t.addEventListener(l,T,!1)):t[h]=null)},i.get=function(){var e=this;if(e||n!==f||(e=f),!e)return null;var t=e[h];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 P=!1;function E(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)},Z(i[r],s),P&&function h(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=E(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 Z(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=E,n.bindArguments=_,n.patchMacroTask=S,function r(e){P=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 D=!1;if("undefined"!=typeof window)try{var C=Object.defineProperty({},"passive",{get:function(){D=!0}});window.addEventListener("test",C,C),window.removeEventListener("test",C,C)}catch(e){D=!1}var I={useG:!0},j={},A={},O=new RegExp("^"+a+"(\\w+)(true|false)$"),x=u("propagationStopped");function z(e,t){var n=(t?t(e):e)+i,r=(t?t(e):e)+o,s=a+n,c=a+r;j[e]={},j[e][i]=s,j[e][o]=c}function R(e,t){if(!t){var n=[];for(var r in e){var a=O.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=j[t];l||(z(t),l=j[t]);var h=e[l[i]],f=e[l[o]];return h?f?h.concat(f):h.slice():f?f.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",h=r&&r.rmAll||"removeAllListeners",f=u(s),p="."+s+":",d="prependListener",_="."+d+":",y=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)}},k=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[j[t.type][i]];if(r)if(1===r.length)y(r[0],n,t);else for(var o=r.slice(),a=0;a<o.length&&(!t||!0!==t[x]);a++)y(o[a],n,t)}},m=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[j[t.type][o]];if(r)if(1===r.length)y(r[0],n,t);else for(var i=r.slice(),a=0;a<i.length&&(!t||!0!==t[x]);a++)y(i[a],n,t)}};function g(t,r){if(!t)return!1;var y=!0;r&&void 0!==r.useG&&(y=r.useG);var g=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[f])return!1;var P,E=r&&r.eventNameToString,S={},C=w[f]=w[s],x=w[u(c)]=w[c],F=w[u(l)]=w[l],M=w[u(h)]=w[h];function N(e,t){return!D&&"object"==typeof e&&e?!!e.capture:D&&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&&(P=w[u(r.prepend)]=w[r.prepend]);var L=y?function(e){if(!S.isExisting)return C.call(S.target,S.eventName,S.capture?m:k,S.options)}:function(e){return C.call(S.target,S.eventName,e.invoke,S.options)},q=y?function(e){if(!e.isRemoved){var t=j[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 x.call(e.target,e.eventName,e.capture?m:k,e.options)}:function(e){return x.call(e.target,e.eventName,e.invoke,e.options)},H=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")],G=e[u("PASSIVE_EVENTS")],W=function(t,n,a,s,c,u){return void 0===c&&(c=!1),void 0===u&&(u=!1),function(){var l=this||e,h=arguments[0];r&&r.transferEventName&&(h=r.transferEventName(h));var f=arguments[1];if(!f)return t.apply(this,arguments);if(v&&"uncaughtException"===h)return t.apply(this,arguments);var p=!1;if("function"!=typeof f){if(!f.handleEvent)return t.apply(this,arguments);p=!0}if(!g||g(t,f,l,arguments)){var d=D&&!!G&&-1!==G.indexOf(h),_=N(arguments[2],d);if(U)for(var k=0;k<U.length;k++)if(h===U[k])return d?t.call(l,h,f,_):t.apply(this,arguments);var m=!!_&&("boolean"==typeof _||_.capture),b=!(!_||"object"!=typeof _)&&_.once,w=Zone.current,P=j[h];P||(z(h,E),P=j[h]);var Z,C=P[m?o:i],O=l[C],x=!1;if(O){if(x=!0,T)for(k=0;k<O.length;k++)if(H(O[k],f))return}else O=l[C]=[];var R=l.constructor.name,F=A[R];F&&(Z=F[h]),Z||(Z=R+n+(E?E(h):h)),S.options=_,b&&(S.options.once=!1),S.target=l,S.capture=m,S.eventName=h,S.isExisting=x;var M=y?I:void 0;M&&(M.taskData=S);var L=w.scheduleEventTask(Z,f,M,a,s);return S.target=null,M&&(M.taskData=null),b&&(_.once=!0),(D||"boolean"!=typeof L.options)&&(L.options=_),L.target=l,L.capture=m,L.eventName=h,p&&(L.originalDelegate=f),u?O.unshift(L):O.push(L),c?l:void 0}}};return w[s]=W(C,p,L,q,b),P&&(w[d]=W(P,_,(function(e){return P.call(S.target,S.eventName,e.invoke,S.options)}),q,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 x.apply(this,arguments);if(!g||g(x,u,t,arguments)){var l,h=j[n];h&&(l=h[c?o:i]);var f=l&&t[l];if(f)for(var p=0;p<f.length;p++){var d=f[p];if(H(d,u)){if(f.splice(p,1),d.isRemoved=!0,0===f.length&&(d.allRemoved=!0,t[l]=null,"string"==typeof n)){var _=a+"ON_PROPERTY"+n;t[_]=null}return d.zone.cancelTask(d),b?t:void 0}}return x.apply(this,arguments)}},w[l]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));for(var o=[],i=R(t,E?E(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[h]=function(){var t=this||e,n=arguments[0];if(n){r&&r.transferEventName&&(n=r.transferEventName(n));var a=j[n];if(a){var s=a[i],u=a[o],l=t[s],f=t[u];if(l){var p=l.slice();for(y=0;y<p.length;y++)this[c].call(this,n,(d=p[y]).originalDelegate?d.originalDelegate:d.callback,d.options)}if(f)for(p=f.slice(),y=0;y<p.length;y++){var d;this[c].call(this,n,(d=p[y]).originalDelegate?d.originalDelegate:d.callback,d.options)}}}else{for(var _=Object.keys(t),y=0;y<_.length;y++){var v=_[y],k=O.exec(v),m=k&&k[1];m&&"removeListener"!==m&&this[h].call(this,m)}this[h].call(this,"removeListener")}if(b)return this},Z(w[s],C),Z(w[c],x),M&&Z(w[h],M),F&&Z(w[l],F),!0}for(var T=[],b=0;b<t.length;b++)T[b]=g(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 F=u("zoneTask");function M(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[F]=null))}},n.handleId=o.apply(e,n.args),t}function u(e){return i(e.data.handleId)}o=E(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 h=l.data.handleId;return"number"==typeof h?a[h]=l:h&&(h[F]=l),h&&h.ref&&h.unref&&"function"==typeof h.ref&&"function"==typeof h.unref&&(l.ref=h.ref.bind(h),l.unref=h.unref.bind(h)),"number"==typeof h||h?h:l}return n.apply(e,i)}})),i=E(e,n,(function(t){return function(n,r){var o,i=r[0];"number"==typeof i?o=a[i]:(o=i&&i[F])||(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[F]=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 N="set";Zone.__load_patch("node_timers",(function(e,t){var n=!1;try{var r=require("timers");if(e.setTimeout!==r.setTimeout&&!m){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}M(r,N,"clear","Timeout"),M(r,N,"clear","Interval"),M(r,N,"clear","Immediate")}catch(e){}m||(n?(e[t.__symbol__("setTimeout")]=e.setTimeout,e[t.__symbol__("setInterval")]=e.setInterval,e[t.__symbol__("setImmediate")]=e.setImmediate):(M(e,N,"clear","Timeout"),M(e,N,"clear","Interval"),M(e,N,"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=E(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){R(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)})}))})); /** * @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="\n",q={},H="STACKTRACE TRACKING",U="__SEP_TAG__",G=U+"@[native]",W=function W(){this.error=J(),this.timestamp=new Date};function Q(){return new Error(H)}function K(){try{throw Q()}catch(e){return e}}var V=Q(),B=K(),J=V.stack?Q:B.stack?K:Q;function Y(e){return e.stack?e.stack.split(L):[]}function X(e,t){for(var n=Y(t),r=0;r<n.length;r++)q.hasOwnProperty(n[r])||e.push(n[r])}function $(e,t){var n=[t?t.trim():""];if(e)for(var r=(new Date).getTime(),o=0;o<e.length;o++){var i=e[o],a=i.timestamp,s="____________________Elapsed "+(r-a.getTime())+" ms; At: "+a;s=s.replace(/[^\w\d]/g,"_"),n.push(G.replace(U,s)),X(n,i.error),r=a.getTime()}return n.join(L)}function ee(){return Error.stackTraceLimit>0}Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(e){if(e){var t=e[Zone.__symbol__("currentTaskTrace")];return t?$(t,e.stack):e.stack}},onScheduleTask:function(e,t,n,r){if(ee()){var o=Zone.currentTask,i=o&&o.data&&o.data.__creationTrace__||[];(i=[new W].concat(i)).length>this.longStackTraceLimit&&(i.length=this.longStackTraceLimit),r.data||(r.data={}),"eventTask"===r.type&&(r.data=Object.assign({},r.data)),r.data.__creationTrace__=i}return e.scheduleTask(n,r)},onHandleError:function(e,t,n,r){if(ee()){var o=Zone.currentTask||r.task;if(r instanceof Error&&o){var i=$(o.data&&o.data.__creationTrace__,r.stack);try{r.stack=r.longStack=i}catch(e){}}}return e.handleError(n,r)}},function te(){if(ee()){var e=[];!function e(t,n){n>0&&(t.push(Y((new W).error)),e(t,n-1))}(e,2);for(var t=e[0],n=e[1],r=0;r<t.length;r++)if(-1==(i=t[r]).indexOf(H)){var o=i.match(/^\s*at\s+/);if(o){G=o[0]+U+" (http://localhost)";break}}for(r=0;r<t.length;r++){var i;if((i=t[r])!==n[r])break;q[i]=!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 ne=function(){function e(e){void 0===e&&(e=null),this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}return e.get=function(){return Zone.current.get("ProxyZoneSpec")},e.isLoaded=function(){return e.get()instanceof e},e.assertPresent=function(){if(!e.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return e.get()},e.prototype.setDelegate=function(e){var t=this,n=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((function(e){return delete t.properties[e]})),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((function(n){return t.properties[n]=e.properties[n]}))),n&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)},e.prototype.getDelegate=function(){return this._delegateSpec},e.prototype.resetDelegate=function(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)},e.prototype.tryTriggerHasTask=function(e,t,n){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,n,this.lastTaskState))},e.prototype.removeFromTasks=function(e){if(this.tasks)for(var t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)},e.prototype.getAndClearPendingTasksInfo=function(){if(0===this.tasks.length)return"";var e="--Pending async tasks are: ["+this.tasks.map((function(e){var t=e.data&&Object.keys(e.data).map((function(t){return t+":"+e.data[t]})).join(",");return"type: "+e.type+", source: "+e.source+", args: {"+t+"}"}))+"]";return this.tasks=[],e},e.prototype.onFork=function(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,n,r):e.fork(n,r)},e.prototype.onIntercept=function(e,t,n,r,o){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,n,r,o):e.intercept(n,r,o)},e.prototype.onInvoke=function(e,t,n,r,o,i,a){return this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t,n,r,o,i,a):e.invoke(n,r,o,i,a)},e.prototype.onHandleError=function(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onHandleError?this._delegateSpec.onHandleError(e,t,n,r):e.handleError(n,r)},e.prototype.onScheduleTask=function(e,t,n,r){return"eventTask"!==r.type&&this.tasks.push(r),this._delegateSpec&&this._delegateSpec.onScheduleTask?this._delegateSpec.onScheduleTask(e,t,n,r):e.scheduleTask(n,r)},e.prototype.onInvokeTask=function(e,t,n,r,o,i){return"eventTask"!==r.type&&this.removeFromTasks(r),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvokeTask?this._delegateSpec.onInvokeTask(e,t,n,r,o,i):e.invokeTask(n,r,o,i)},e.prototype.onCancelTask=function(e,t,n,r){return"eventTask"!==r.type&&this.removeFromTasks(r),this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onCancelTask?this._delegateSpec.onCancelTask(e,t,n,r):e.cancelTask(n,r)},e.prototype.onHasTask=function(e,t,n,r){this.lastTaskState=r,this._delegateSpec&&this._delegateSpec.onHasTask?this._delegateSpec.onHasTask(e,t,n,r):e.hasTask(n,r)},e}();Zone.ProxyZoneSpec=ne; /** * @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 re=function(){function e(e){this.runZone=Zone.current,this.name="syncTestZone for "+e}return e.prototype.onScheduleTask=function(e,t,n,r){switch(r.type){case"microTask":case"macroTask":throw new Error("Cannot call "+r.source+" from within a sync test.");case"eventTask":r=e.scheduleTask(n,r)}return r},e}();Zone.SyncTestZoneSpec=re, /** * @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("jasmine",(function(e,t,n){if(!t)throw new Error("Missing: zone.js");if("undefined"==typeof jest&&"undefined"!=typeof jasmine&&!jasmine.__zone_patch__){jasmine.__zone_patch__=!0;var r=t.SyncTestZoneSpec,o=t.ProxyZoneSpec;if(!r)throw new Error("Missing: SyncTestZoneSpec");if(!o)throw new Error("Missing: ProxyZoneSpec");var i=t.current,a=i.fork(new r("jasmine.describe")),s=t.__symbol__,c=!0===e[s("fakeAsyncDisablePatchingClock")],u=!c&&(!0===e[s("fakeAsyncPatchLock")]||!0===e[s("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[s("ignoreUnhandledRejection")]){var l=jasmine.GlobalErrors;l&&!jasmine[s("GlobalErrors")]&&(jasmine[s("GlobalErrors")]=l,jasmine.GlobalErrors=function(){var e=new l,t=e.install;return t&&!e[s("install")]&&(e[s("install")]=t,e.install=function(){var e=process.listeners("unhandledRejection"),n=t.apply(this,arguments);return process.removeAllListeners("unhandledRejection"),e&&e.forEach((function(e){return process.on("unhandledRejection",e)})),n}),e})}var h=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((function(e){var t=h[e];h[e]=function(e,n){return t.call(this,e,function r(e){return function(){return a.run(e,this,arguments)}}(n))}})),["it","xit","fit"].forEach((function(e){var t=h[e];h[s(e)]=t,h[e]=function(e,n,r){return arguments[1]=_(n),t.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((function(e){var t=h[e];h[s(e)]=t,h[e]=function(e,n){return arguments[0]=_(e),t.apply(this,arguments)}})),!c){var f=jasmine[s("clock")]=jasmine.clock;jasmine.clock=function(){var e=f.apply(this,arguments);if(!e[s("patched")]){e[s("patched")]=s("patched");var n=e[s("tick")]=e.tick;e.tick=function(){var e=t.current.get("FakeAsyncTestZoneSpec");return e?e.tick.apply(e,arguments):n.apply(this,arguments)};var r=e[s("mockDate")]=e.mockDate;e.mockDate=function(){var e=t.current.get("FakeAsyncTestZoneSpec");if(e){var n=arguments.length>0?arguments[0]:new Date;return e.setCurrentRealTime.apply(e,n&&"function"==typeof n.getTime?[n.getTime()]:arguments)}return r.apply(this,arguments)},u&&["install","uninstall"].forEach((function(n){var r=e[s(n)]=e[n];e[n]=function(){var e=t.FakeAsyncTestZoneSpec;if(!e)return r.apply(this,arguments);jasmine[s("clockInstalled")]="install"===n}}))}return e}}var p=jasmine.QueueRunner;jasmine.QueueRunner=function(n){function r(r){var o,a=this;r.onComplete&&(r.onComplete=(o=r.onComplete,function(){a.testProxyZone=null,a.testProxyZoneSpec=null,i.scheduleMicroTask("jasmine.onComplete",o)}));var s=e[t.__symbol__("setTimeout")],c=e[t.__symbol__("clearTimeout")];s&&(r.timeout={setTimeout:s||e.setTimeout,clearTimeout:c||e.clearTimeout}),jasmine.UserContext?(r.userContext||(r.userContext=new jasmine.UserContext),r.userContext.queueRunner=this):(r.userContext||(r.userContext={}),r.userContext.queueRunner=this);var u=r.onException;r.onException=function(e){if(e&&"Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL."===e.message){var t=this&&this.testProxyZoneSpec;if(t){var n=t.getAndClearPendingTasksInfo();try{e.message+=n}catch(e){}}}u&&u.call(this,e)},n.call(this,r)}return function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(r,n),r.prototype.execute=function(){for(var e=this,r=t.current,a=!1;r;){if(r===i){a=!0;break}r=r.parent}if(!a)throw new Error("Unexpected Zone: "+t.current.name);this.testProxyZoneSpec=new o,this.testProxyZone=i.fork(this.testProxyZoneSpec),t.currentTask?n.prototype.execute.call(this):t.current.scheduleMicroTask("jasmine.execute().forceTask",(function(){return p.prototype.execute.call(e)}))},r}(p)}function d(e,n,r,o){var i=!!jasmine[s("clockInstalled")],a=r.testProxyZone;if(i&&u){var c=t[t.__symbol__("fakeAsyncTest")];c&&"function"==typeof c.fakeAsync&&(e=c.fakeAsync(e))}return o?a.run(e,n,[o]):a.run(e,n)}function _(e){return e&&(e.length?function(t){return d(e,this,this.queueRunner,t)}:function(){return d(e,this,this.queueRunner)})}})), /** * @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("jest",(function(e,t){if("undefined"!=typeof jest&&!jest.__zone_patch__){if(jest.__zone_patch__=!0,void 0===t)throw new Error("Missing Zone.js");var n=t.ProxyZoneSpec,r=t.SyncTestZoneSpec;if(!n)throw new Error("Missing ProxyZoneSpec");var o=t.current,i=o.fork(new r("jest.describe")),a=o.fork(new n);["describe","xdescribe","fdescribe"].forEach((function(n){var r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=s(e[1]),r.apply(this,e)},e[n].each=function o(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.apply(this,t);return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=s(e[1]),r.apply(this,e)}}}(r.each))})),e.describe.only=e.fdescribe,e.describe.skip=e.xdescribe,["it","xit","fit","test","xtest"].forEach((function(n){var r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=c(e[1]),r.apply(this,e)},e[n].each=function o(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.apply(this,t);return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1]=c(e[1]),r.apply(this,e)}}}(r.each),e[n].todo=r.todo)})),e.it.only=e.fit,e.it.skip=e.xit,e.test.only=e.fit,e.test.skip=e.xit,["beforeEach","afterEach","beforeAll","afterAll"].forEach((function(n){var r=e[n];e[t.__symbol__(n)]||(e[t.__symbol__(n)]=r,e[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[0]=c(e[0]),r.apply(this,e)})}))}function s(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return i.run(e,this,t)}}function c(e){return"function"!=typeof e?e:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return a.run(e,this,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("mocha",(function(e,t){var n=e.Mocha;if(void 0!==n){if(void 0===t)throw new Error("Missing Zone.js");var r=t.ProxyZoneSpec,o=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(n.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');n.__zone_patch__=!0;var i,a,s=t.current,c=s.fork(new o("Mocha.describe")),u=null,l=s.fork(new r),h={after:n.after,afterEach:n.afterEach,before:n.before,beforeEach:n.beforeEach,describe:n.describe,it:n.it};e.describe=e.suite=n.describe=function(){return h.describe.apply(this,p(arguments))},e.xdescribe=e.suite.skip=n.describe.skip=function(){return h.describe.skip.apply(this,p(arguments))},e.describe.only=e.suite.only=n.describe.only=function(){return h.describe.only.apply(this,p(arguments))},e.it=e.specify=e.test=n.it=function(){return h.it.apply(this,d(arguments))},e.xit=e.xspecify=n.it.skip=function(){return h.it.skip.apply(this,d(arguments))},e.it.only=e.test.only=n.it.only=function(){return h.it.only.apply(this,d(arguments))},e.after=e.suiteTeardown=n.after=function(){return h.after.apply(this,_(arguments))},e.afterEach=e.teardown=n.afterEach=function(){return h.afterEach.apply(this,d(arguments))},e.before=e.suiteSetup=n.before=function(){return h.before.apply(this,_(arguments))},e.beforeEach=e.setup=n.beforeEach=function(){return h.beforeEach.apply(this,d(arguments))},i=n.Runner.prototype.runTest,a=n.Runner.prototype.run,n.Runner.prototype.runTest=function(e){var n=this;t.current.scheduleMicroTask("mocha.forceTask",(function(){i.call(n,e)}))},n.Runner.prototype.run=function(e){return this.on("test",(function(e){u=s.fork(new r)})),this.on("fail",(function(e,t){var n=u&&u.get("ProxyZoneSpec");if(n&&t)try{t.message+=n.getAndClearPendingTasksInfo()}catch(e){}})),a.call(this,e)}}function f(e,t,n){for(var r=function(r){var o=e[r];"function"==typeof o&&(e[r]=0===o.length?t(o):n(o),e[r].toString=function(){return o.toString()})},o=0;o<e.length;o++)r(o);return e}function p(e){return f(e,(function(e){return function(){return c.run(e,this,arguments)}}))}function d(e){return f(e,(function(e){return function(){return u.run(e,this)}}),(function(e){return function(t){return u.run(e,this,[t])}}))}function _(e){return f(e,(function(e){return function(){return l.run(e,this)}}),(function(e){return function(t){return l.run(e,this,[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 */ function(e){var t=function(){function t(t,n,r){this.finishCallback=t,this.failCallback=n,this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this.runZone=Zone.current,this.unresolvedChainedPromiseCount=0,this.supportWaitUnresolvedChainedPromise=!1,this.name="asyncTestZone for "+r,this.properties={AsyncTestZoneSpec:this},this.supportWaitUnresolvedChainedPromise=!0===e[Zone.__symbol__("supportWaitUnResolvedChainedPromise")]}return t.prototype.isUnresolvedChainedPromisePending=function(){return this.unresolvedChainedPromiseCount>0},t.prototype._finishCallbackIfDone=function(){var e=this;this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((function(){setTimeout((function(){e._alreadyErrored||e._pendingMicroTasks||e._pendingMacroTasks||e.finishCallback()}),0)}))},t.prototype.patchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}},t.prototype.unPatchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}},t.prototype.onScheduleTask=function(e,n,r,o){return"eventTask"!==o.type&&(this._isSync=!1),"microTask"===o.type&&o.data&&o.data instanceof Promise&&!0===o.data[t.symbolParentUnresolved]&&this.unresolvedChainedPromiseCount--,e.scheduleTask(r,o)},t.prototype.onInvokeTask=function(e,t,n,r,o,i){return"eventTask"!==r.type&&(this._isSync=!1),e.invokeTask(n,r,o,i)},t.prototype.onCancelTask=function(e,t,n,r){return"eventTask"!==r.type&&(this._isSync=!1),e.cancelTask(n,r)},t.prototype.onInvoke=function(e,t,n,r,o,i,a){try{return this._isSync=!0,e.invoke(n,r,o,i,a)}finally{this._isSync&&this._finishCallbackIfDone()}},t.prototype.onHandleError=function(e,t,n,r){return e.handleError(n,r)&&(this.failCallback(r),this._alreadyErrored=!0),!1},t.prototype.onHasTask=function(e,t,n,r){e.hasTask(n,r),"microTask"==r.change?(this._pendingMicroTasks=r.microTask,this._finishCallbackIfDone()):"macroTask"==r.change&&(this._pendingMacroTasks=r.macroTask,this._finishCallbackIfDone())},t}();t.symbolParentUnresolved=Zone.__symbol__("parentUnresolved"),Zone.AsyncTestZoneSpec=t}("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("asynctest",(function(e,t,n){function r(e,n,r,o){var i=t.current,a=t.AsyncTestZoneSpec;if(void 0===a)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/dist/async-test.js");var s=t.ProxyZoneSpec;if(void 0===s)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/dist/proxy.js");var c=s.get();s.assertPresent();var u=t.current.getZoneWith("ProxyZoneSpec"),l=c.getDelegate();return u.parent.run((function(){var e=new a((function(){c.getDelegate()==e&&c.setDelegate(l),e.unPatchPromiseForTest(),i.run((function(){r()}))}),(function(t){c.getDelegate()==e&&c.setDelegate(l),e.unPatchPromiseForTest(),i.run((function(){o(t)}))}),"test");c.setDelegate(e),e.patchPromiseForTest()})),t.current.runGuarded(e,n)}t[n.symbol("asyncTest")]=function t(n){return e.jasmine?function(e){e||((e=function(){}).fail=function(e){throw e}),r(n,this,e,(function(t){if("string"==typeof t)return e.fail(new Error(t));e.fail(t)}))}:function(){var e=this;return new Promise((function(t,o){r(n,e,t,o)}))}}})), /** * @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.Date,n=function(){function e(){if(0===arguments.length){var n=new t;return n.setTime(e.now()),n}var r=Array.prototype.slice.call(arguments);return new(t.bind.apply(t,__spreadArrays([void 0],r)))}return e.now=function(){var e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getCurrentRealTime()+e.getCurrentTime():t.now.apply(this,arguments)},e}();n.UTC=t.UTC,n.parse=t.parse;var r={setTimeout:e.setTimeout,setInterval:e.setInterval,clearTimeout:e.clearTimeout,clearInterval:e.clearInterval},o=function(){function n(){this._schedulerQueue=[],this._currentTime=0,this._currentRealTime=t.now(),this._currentTickRequeuePeriodicEntries=[]}return n.prototype.getCurrentTime=function(){return this._currentTime},n.prototype.getCurrentRealTime=function(){return this._currentRealTime},n.prototype.setCurrentRealTime=function(e){this._currentRealTime=e},n.prototype.scheduleFunction=function(e,t,r){var o=(r=Object.assign({args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1},r)).id<0?n.nextId++:r.id,i={endTime:this._currentTime+t,id:o,func:e,args:r.args,delay:t,isPeriodic:r.isPeriodic,isRequestAnimationFrame:r.isRequestAnimationFrame};r.isRequeuePeriodic&&this._currentTickRequeuePeriodicEntries.push(i);for(var a=0;a<this._schedulerQueue.length&&!(i.endTime<this._schedulerQueue[a].endTime);a++);return this._schedulerQueue.splice(a,0,i),o},n.prototype.removeScheduledFunctionWithId=function(e){for(var t=0;t<this._schedulerQueue.length;t++)if(this._schedulerQueue[t].id==e){this._schedulerQueue.splice(t,1);break}},n.prototype.tick=function(t,n,r){void 0===t&&(t=0);var o=this._currentTime+t,i=0,a=(r=Object.assign({processNewMacroTasksSynchronously:!0},r)).processNewMacroTasksSynchronously?this._schedulerQueue:this._schedulerQueue.slice();if(0===a.length&&n)n(t);else{for(;a.length>0&&(this._currentTickRequeuePeriodicEntries=[],!(o<a[0].endTime));){var s=a.shift();if(!r.processNewMacroTasksSynchronously){var c=this._schedulerQueue.indexOf(s);c>=0&&this._schedulerQueue.splice(c,1)}if(i=this._currentTime,this._currentTime=s.endTime,n&&n(this._currentTime-i),!s.func.apply(e,s.isRequestAnimationFrame?[this._currentTime]:s.args))break;r.processNewMacroTasksSynchronously||this._currentTickRequeuePeriodicEntries.forEach((function(e){for(var t=0;t<a.length&&!(e.endTime<a[t].endTime);t++);a.splice(t,0,e)}))}i=this._currentTime,this._currentTime=o,n&&n(this._currentTime-i)}},n.prototype.flush=function(e,t,n){return void 0===e&&(e=20),void 0===t&&(t=!1),t?this.flushPeriodic(n):this.flushNonPeriodic(e,n)},n.prototype.flushPeriodic=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e),this._currentTime-t},n.prototype.flushNonPeriodic=function(t,n){for(var r=this._currentTime,o=0,i=0;this._schedulerQueue.length>0;){if(++i>t)throw new Error("flush failed after reaching the limit of "+t+" tasks. Does your code use a polling timeout?");if(0===this._schedulerQueue.filter((function(e){return!e.isPeriodic&&!e.isRequestAnimationFrame})).length)break;var a=this._schedulerQueue.shift();if(o=this._currentTime,this._currentTime=a.endTime,n&&n(this._currentTime-o),!a.func.apply(e,a.args))break}return this._currentTime-r},n}();o.nextId=1;var i=function(){function i(t,n,r){void 0===n&&(n=!1),this.trackPendingRequestAnimationFrame=n,this.macroTaskOptions=r,this._scheduler=new o,this._microtasks=[],this._lastError=null,this._uncaughtPromiseErrors=Promise[Zone.__symbol__("uncaughtPromiseErrors")],this.pendingPeriodicTimers=[],this.pendingTimers=[],this.patchDateLocked=!1,this.properties={FakeAsyncTestZoneSpec:this},this.name="fakeAsyncTestZone for "+t,this.macroTaskOptions||(this.macroTaskOptions=e[Zone.__symbol__("FakeAsyncTestMacroTask")])}return i.assertInZone=function(){if(null==Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("The code should be running in the fakeAsync zone to call this function")},i.prototype._fnAndFlush=function(t,n){var r=this;return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return t.apply(e,o),null===r._lastError?(null!=n.onSuccess&&n.onSuccess.apply(e),r.flushMicrotasks()):null!=n.onError&&n.onError.apply(e),null===r._lastError}},i._removeTimer=function(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)},i.prototype._dequeueTimer=function(e){var t=this;return function(){i._removeTimer(t.pendingTimers,e)}},i.prototype._requeuePeriodicTimer=function(e,t,n,r){var o=this;return function(){-1!==o.pendingPeriodicTimers.indexOf(r)&&o._scheduler.scheduleFunction(e,t,{args:n,isPeriodic:!0,id:r,isRequeuePeriodic:!0})}},i.prototype._dequeuePeriodicTimer=function(e){var t=this;return function(){i._removeTimer(t.pendingPeriodicTimers,e)}},i.prototype._setTimeout=function(e,t,n,r){void 0===r&&(r=!0);var i=this._dequeueTimer(o.nextId),a=this._fnAndFlush(e,{onSuccess:i,onError:i}),s=this._scheduler.scheduleFunction(a,t,{args:n,isRequestAnimationFrame:!r});return r&&this.pendingTimers.push(s),s},i.prototype._clearTimeout=function(e){i._removeTimer(this.pendingTimers,e),this._scheduler.removeScheduledFunctionWithId(e)},i.prototype._setInterval=function(e,t,n){var r=o.nextId,i={onSuccess:null,onError:this._dequeuePeriodicTimer(r)},a=this._fnAndFlush(e,i);return i.onSuccess=this._requeuePeriodicTimer(a,t,n,r),this._scheduler.scheduleFunction(a,t,{args:n,isPeriodic:!0}),this.pendingPeriodicTimers.push(r),r},i.prototype._clearInterval=function(e){i._removeTimer(this.pendingPeriodicTimers,e),this._scheduler.removeScheduledFunctionWithId(e)},i.prototype._resetLastErrorAndThrow=function(){var e=this._lastError||this._uncaughtPromiseErrors[0];throw this._uncaughtPromiseErrors.length=0,this._lastError=null,e},i.prototype.getCurrentTime=function(){return this._scheduler.getCurrentTime()},i.prototype.getCurrentRealTime=function(){return this._scheduler.getCurrentRealTime()},i.prototype.setCurrentRealTime=function(e){this._scheduler.setCurrentRealTime(e)},i.patchDate=function(){e[Zone.__symbol__("disableDatePatching")]||e.Date!==n&&(e.Date=n,n.prototype=t.prototype,i.checkTimerPatch())},i.resetDate=function(){e.Date===n&&(e.Date=t)},i.checkTimerPatch=function(){e.setTimeout!==r.setTimeout&&(e.setTimeout=r.setTimeout,e.clearTimeout=r.clearTimeout),e.setInterval!==r.setInterval&&(e.setInterval=r.setInterval,e.clearInterval=r.clearInterval)},i.prototype.lockDatePatch=function(){this.patchDateLocked=!0,i.patchDate()},i.prototype.unlockDatePatch=function(){this.patchDateLocked=!1,i.resetDate()},i.prototype.tick=function(e,t,n){void 0===e&&(e=0),void 0===n&&(n={processNewMacroTasksSynchronously:!0}),i.assertInZone(),this.flushMicrotasks(),this._scheduler.tick(e,t,n),null!==this._lastError&&this._resetLastErrorAndThrow()},i.prototype.flushMicrotasks=function(){for(i.assertInZone();this._microtasks.length>0;){var e=this._microtasks.shift();e.func.apply(e.target,e.args)}(null!==this._lastError||this._uncaughtPromiseErrors.length)&&this._resetLastErrorAndThrow()},i.prototype.flush=function(e,t,n){i.assertInZone(),this.flushMicrotasks();var r=this._scheduler.flush(e,t,n);return null!==this._lastError&&this._resetLastErrorAndThrow(),r},i.prototype.onScheduleTask=function(e,t,n,r){switch(r.type){case"microTask":var o=r.data&&r.data.args,i=void 0;if(o){var a=r.data.cbIdx;"number"==typeof o.length&&o.length>a+1&&(i=Array.prototype.slice.call(o,a+1))}this._microtasks.push({func:r.invoke,args:i,target:r.data&&r.data.target});break;case"macroTask":switch(r.source){case"setTimeout":r.data.handleId=this._setTimeout(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"setImmediate":r.data.handleId=this._setTimeout(r.invoke,0,Array.prototype.slice.call(r.data.args,1));break;case"setInterval":r.data.handleId=this._setInterval(r.invoke,r.data.delay,Array.prototype.slice.call(r.data.args,2));break;case"XMLHttpRequest.send":throw new Error("Cannot make XHRs from within a fake async test. Request URL: "+r.data.url);case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":r.data.handleId=this._setTimeout(r.invoke,16,r.data.args,this.trackPendingRequestAnimationFrame);break;default:var s=this.findMacroTaskOption(r);if(s){var c=r.data&&r.data.args,u=c&&c.length>1?c[1]:0,l=s.callbackArgs?s.callbackArgs:c;s.isPeriodic?(r.data.handleId=this._setInterval(r.invoke,u,l),r.data.isPeriodic=!0):r.data.handleId=this._setTimeout(r.invoke,u,l);break}throw new Error("Unknown macroTask scheduled in fake async test: "+r.source)}break;case"eventTask":r=e.scheduleTask(n,r)}return r},i.prototype.onCancelTask=function(e,t,n,r){switch(r.source){case"setTimeout":case"requestAnimationFrame":case"webkitRequestAnimationFrame":case"mozRequestAnimationFrame":return this._clearTimeout(r.data.handleId);case"setInterval":return this._clearInterval(r.data.handleId);default:var o=this.findMacroTaskOption(r);if(o){var i=r.data.handleId;return o.isPeriodic?this._clearInterval(i):this._clearTimeout(i)}return e.cancelTask(n,r)}},i.prototype.onInvoke=function(e,t,n,r,o,a,s){try{return i.patchDate(),e.invoke(n,r,o,a,s)}finally{this.patchDateLocked||i.resetDate()}},i.prototype.findMacroTaskOption=function(e){if(!this.macroTaskOptions)return null;for(var t=0;t<this.macroTaskOptions.length;t++){var n=this.macroTaskOptions[t];if(n.source===e.source)return n}return null},i.prototype.onHandleError=function(e,t,n,r){return this._lastError=r,!1},i}();Zone.FakeAsyncTestZoneSpec=i}("object"==typeof window&&window||"object"==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("fakeasync",(function(e,t,n){var r=t&&t.FakeAsyncTestZoneSpec,o=t&&t.ProxyZoneSpec,i=null;function a(){i&&i.unlockDatePatch(),i=null,o&&o.assertPresent().resetDelegate()}function s(){if(null==i&&null==(i=t.current.get("FakeAsyncTestZoneSpec")))throw new Error("The code should be running in the fakeAsync zone to call this function");return i}function c(){s().flushMicrotasks()}t[n.symbol("fakeAsyncTest")]={resetFakeAsyncZone:a,flushMicrotasks:c,discardPeriodicTasks:function u(){s().pendingPeriodicTimers.length=0},tick:function l(e,t){void 0===e&&(e=0),void 0===t&&(t=!1),s().tick(e,null,t)},flush:function h(e){return s().flush(e)},fakeAsync:function f(e){return function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];var u=o.assertPresent();if(t.current.get("FakeAsyncTestZoneSpec"))throw new Error("fakeAsync() calls can not be nested");try{if(!i){if(u.getDelegate()instanceof r)throw new Error("fakeAsync() calls can not be nested");i=new r}var l=void 0,h=u.getDelegate();u.setDelegate(i),i.lockDatePatch();try{l=e.apply(this,n),c()}finally{u.setDelegate(h)}if(i.pendingPeriodicTimers.length>0)throw new Error(i.pendingPeriodicTimers.length+" periodic timer(s) still in the queue.");if(i.pendingTimers.length>0)throw new Error(i.pendingTimers.length+" timer(s) still in the queue.");return l}finally{a()}}}}})), /** * @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("promisefortest",(function(e,t,n){var r=n.symbol("state"),o=n.symbol("parentUnresolved");Promise[n.symbol("patchPromiseForTest")]=function e(){var n=Promise[t.__symbol__("ZonePromiseThen")];n||(n=Promise[t.__symbol__("ZonePromiseThen")]=Promise.prototype.then,Promise.prototype.then=function(){var e=n.apply(this,arguments);if(null===this[r]){var i=t.current.get("AsyncTestZoneSpec");i&&(i.unresolvedChainedPromiseCount++,e[o]=!0)}return e})},Promise[n.symbol("unPatchPromiseForTest")]=function e(){var n=Promise[t.__symbol__("ZonePromiseThen")];n&&(Promise.prototype.then=n,Promise[t.__symbol__("ZonePromiseThen")]=void 0)}}))}));