Icard/angular-clarity-master(work.../node_modules/zone.js/bundles/zone-testing-bundle.umd.min.js

7 lines
68 KiB
JavaScript

"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){!function(e){var t,n=e.performance;function r(e){n&&n.mark&&n.mark(e)}function o(e,t){n&&n.measure&&n.measure(e,t)}r("Zone");var i=e.__Zone_symbol_prefix||"__zone_symbol__";function a(e){return i+e}var s=!0===e[a("forceDuplicateZoneCheck")];if(e.Zone){if(s||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}var c=function(){function n(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new h(this,this._parent&&this._parent._zoneDelegate,t)}return n.assertZonePatched=function(){if(e.Promise!==j.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(n,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"current",{get:function(){return I.zone},enumerable:!1,configurable:!0}),Object.defineProperty(n,"currentTask",{get:function(){return F},enumerable:!1,configurable:!0}),n.__load_patch=function(n,i,a){if(void 0===a&&(a=!1),j.hasOwnProperty(n)){if(!a&&s)throw Error("Already loaded patch: "+n)}else if(!e["__Zone_disable_"+n]){var c="Zone:"+n;r(c),j[n]=i(e,t,O),o(c,c)}},Object.defineProperty(n.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),n.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},n.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},n.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},n.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)}},n.prototype.run=function(e,t,n,r){I={parent:I,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{I=I.parent}},n.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),I={parent:I,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{I=I.parent}},n.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!==b||e.type!==A&&e.type!==C){var r=e.state!=w;r&&e._transitionTo(w,S),e.runCount++;var o=F;F=e,I={parent:I,zone:this};try{e.type==C&&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!==b&&e.state!==Z&&(e.type==A||e.data&&e.data.isPeriodic?r&&e._transitionTo(S,w):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(b,w,b))),I=I.parent,F=o}}},n.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 ".concat(this.name," which is descendants of the original zone ").concat(e.zone.name));t=t.parent}e._transitionTo(E,b);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(Z,E,b),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==E&&e._transitionTo(S,E),e},n.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new f(D,e,t,n,r,void 0))},n.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new f(C,e,t,n,r,o))},n.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new f(A,e,t,n,r,o))},n.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+")");if(e.state===S||e.state===w){e._transitionTo(P,S,w);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(Z,P),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(b,P),e.runCount=0,e}},n.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)},n}();(t=c).__symbol__=a;var u,l={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)}},h=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:l,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=l,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=l,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=l,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 c(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!=D)throw new Error("Task is missing scheduleFn.");m(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===A&&i&&i.useG?t.invokeTask:function(){return t.invokeTask.call(e,c,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),x++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==x&&T(),x--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(b,E)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(e,"', expecting state '").concat(t,"'").concat(n?" or '"+n+"'":"",", was '").concat(this._state,"'."));this._state=e,e==b&&(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}(),p=a("setTimeout"),d=a("Promise"),y=a("then"),_=[],v=!1;function k(t){if(u||e[d]&&(u=e[d].resolve(0)),u){var n=u[y];n||(n=u.then),n.call(u,t)}else e[p](t,0)}function m(e){0===x&&0===_.length&&k(T),e&&_.push(e)}function T(){if(!v){for(v=!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){O.onUnhandledError(e)}}}O.microtaskDrainDone(),v=!1}}var g={name:"NO ZONE"},b="notScheduled",E="scheduling",S="scheduled",w="running",P="canceling",Z="unknown",D="microTask",C="macroTask",A="eventTask",j={},O={symbol:a,currentZoneFrame:function(){return I},onUnhandledError:M,microtaskDrainDone:M,scheduleMicroTask:m,showUncaughtError:function(){return!c[a("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:M,patchMethod:function(){return M},bindArguments:function(){return[]},patchThen:function(){return M},patchMacroTask:function(){return M},patchEventPrototype:function(){return M},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return M},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return M},wrapWithCurrentZone:function(){return M},filterProperties:function(){return[]},attachOriginToPatched:function(){return M},_redefineProperty:function(){return M},patchCallbacks:function(){return M},nativeScheduleMicroTask:k},I={parent:null,zone:new c(null,null)},F=null,x=0;function M(){}o("Zone","Zone"),e.Zone=c}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);var e=Object.getOwnPropertyDescriptor,t=Object.defineProperty,n=Object.getPrototypeOf,r=Object.create,o=Array.prototype.slice,i="addEventListener",a="removeEventListener",s=Zone.__symbol__(i),c=Zone.__symbol__(a),u="true",l="false",h=Zone.__symbol__("");function f(e,t){return Zone.current.wrap(e,t)}function p(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var d=Zone.__symbol__,y="undefined"!=typeof window,_=y?window:void 0,v=y&&_||"object"==typeof self&&self||global,k="removeAttribute";function m(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=f(e[n],t+"_"+n));return e}function T(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}var g="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,b=!("nw"in v)&&void 0!==v.process&&"[object process]"==={}.toString.call(v.process),E=!b&&!g&&!(!y||!_.HTMLElement),S=void 0!==v.process&&"[object process]"==={}.toString.call(v.process)&&!g&&!(!y||!_.HTMLElement),w={},P=function(e){if(e=e||v.event){var t=w[e.type];t||(t=w[e.type]=d("ON_PROPERTY"+e.type));var n,r=this||e.target||v,o=r[t];return E&&r===_&&"error"===e.type?!0===(n=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error))&&e.preventDefault():null==(n=o&&o.apply(this,arguments))||n||e.preventDefault(),n}};function Z(n,r,o){var i=e(n,r);if(!i&&o&&e(o,r)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){var a=d("on"+r+"patched");if(!n.hasOwnProperty(a)||!n[a]){delete i.writable,delete i.value;var s=i.get,c=i.set,u=r.slice(2),l=w[u];l||(l=w[u]=d("ON_PROPERTY"+u)),i.set=function(e){var t=this;t||n!==v||(t=v),t&&("function"==typeof t[l]&&t.removeEventListener(u,P),c&&c.call(t,null),t[l]=e,"function"==typeof e&&t.addEventListener(u,P,!1))},i.get=function(){var e=this;if(e||n!==v||(e=v),!e)return null;var t=e[l];if(t)return t;if(s){var o=s.call(this);if(o)return i.set.call(this,o),"function"==typeof e[k]&&e.removeAttribute(r),o}return null},t(n,r,i),n[a]=!0}}}function D(e,t,n){if(t)for(var r=0;r<t.length;r++)Z(e,"on"+t[r],n);else{var o=[];for(var i in e)"on"==i.slice(0,2)&&o.push(i);for(var a=0;a<o.length;a++)Z(e,o[a],n)}}var C=d("originalInstance");function A(e){var n=v[e];if(n){v[d(e)]=n,v[e]=function(){var t=m(arguments,e);switch(t.length){case 0:this[C]=new n;break;case 1:this[C]=new n(t[0]);break;case 2:this[C]=new n(t[0],t[1]);break;case 3:this[C]=new n(t[0],t[1],t[2]);break;case 4:this[C]=new n(t[0],t[1],t[2],t[3]);break;default:throw new Error("Arg list too long.")}},I(v[e],n);var r,o=new n((function(){}));for(r in o)"XMLHttpRequest"===e&&"responseBlob"===r||function(n){"function"==typeof o[n]?v[e].prototype[n]=function(){return this[C][n].apply(this[C],arguments)}:t(v[e].prototype,n,{set:function(t){"function"==typeof t?(this[C][n]=f(t,e+"."+n),I(this[C][n],t)):this[C][n]=t},get:function(){return this[C][n]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(v[e][r]=n[r])}}function j(t,r,o){for(var i=t;i&&!i.hasOwnProperty(r);)i=n(i);!i&&t[r]&&(i=t);var a=d(r),s=null;if(i&&(!(s=i[a])||!i.hasOwnProperty(a))&&(s=i[a]=i[r],T(i&&e(i,r)))){var c=o(s,a,r);i[r]=function(){return c(this,arguments)},I(i[r],s)}return s}function O(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=j(e,t,(function(e){return function(t,r){var i=n(t,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?p(i.name,r[i.cbIdx],i,o):e.apply(t,r)}}))}function I(e,t){e[d("OriginalDelegate")]=t}var F=!1,x=!1;function M(){if(F)return x;F=!0;try{var e=_.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(x=!0)}catch(e){}return x}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(){if(e.throwOriginal)throw e.rejection;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 M.reject(e)}var y=i("state"),_=i("value"),v=i("finally"),k=i("parentPromiseValue"),m=i("parentPromiseState"),T="Promise.then",g=null,b=!0,E=!1,S=0;function w(e,t){return function(n){try{C(e,t,n)}catch(t){C(e,!1,t)}}}var P=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=P();if(e===i)throw new TypeError(Z);if(e[y]===g){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!==E&&i instanceof M&&i.hasOwnProperty(y)&&i.hasOwnProperty(_)&&i[y]!==g)O(i),C(e,i[y],i[_]);else if(r!==E&&"function"==typeof u)try{u.call(i,c(w(e,r)),c(w(e,!1)))}catch(t){c((function(){C(e,!1,t)}))()}else{e[y]=r;var h=e[_];if(e[_]=i,e[v]===v&&r===b&&(e[y]=e[m],e[_]=e[k]),r===E&&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;)I(e,h[p++],h[p++],h[p++],h[p++]);if(0==h.length&&r==E){e[y]=S;var d=i;try{throw new Error("Uncaught (in promise): "+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(i)+(i&&i.stack?"\n"+i.stack:""))}catch(e){d=e}s&&(d.throwOriginal=!0),d.rejection=i,d.promise=e,d.zone=t.current,d.task=t.currentTask,a.push(d),n.scheduleMicroTask()}}}return e}var A=i("rejectionHandledHandler");function O(e){if(e[y]===S){try{var n=t[A];n&&"function"==typeof n&&n.call(this,{rejection:e[_],promise:e})}catch(e){}e[y]=E;for(var r=0;r<a.length;r++)e===a[r].promise&&a.splice(r,1)}}function I(e,t,n,r,o){O(e);var i=e[y],a=i?"function"==typeof r?r:p:"function"==typeof o?o:d;t.scheduleMicroTask(T,(function(){try{var r=e[_],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 F=function(){},x=e.AggregateError,M=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error("Must be an instanceof Promise.");n[y]=g,n[_]=[];try{var r=P();t&&t(r(w(n,b)),r(w(n,E)))}catch(e){C(n,!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),E,e)},e.any=function(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new x([],"All promises were rejected"));var n=[],r=0;try{for(var o=0,i=t;o<i.length;o++)r++,n.push(e.resolve(i[o]))}catch(e){return Promise.reject(new x([],"All promises were rejected"))}if(0===r)return Promise.reject(new x([],"All promises were rejected"));var a=!1,s=[];return new e((function(e,t){for(var o=0;o<n.length;o++)n[o].then((function(t){a||(a=!0,e(t))}),(function(e){s.push(e),0==--r&&(a=!0,t(new x(s,"All promises were rejected")))}))}))},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:!1,configurable:!0}),Object.defineProperty(e.prototype,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.then=function(n,r){var o,i=null===(o=this.constructor)||void 0===o?void 0:o[Symbol.species];i&&"function"==typeof i||(i=this.constructor||e);var a=new i(F),s=t.current;return this[y]==g?this[_].push(s,a,n,r):I(this,s,a,n,r),a},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(n){var r,o=null===(r=this.constructor)||void 0===r?void 0:r[Symbol.species];o&&"function"==typeof o||(o=e);var i=new o(F);i[v]=v;var a=t.current;return this[y]==g?this[_].push(a,i,n,n):I(this,a,i,n,n),i},e}();M.resolve=M.resolve,M.reject=M.reject,M.race=M.race,M.all=M.all;var R=e[c]=e.Promise;e.Promise=M;var z=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 M((function(e,t){o.call(n,e,t)})).then(e,t)},e[z]=!0}}return n.patchThen=N,R&&(N(R),j(e,"fetch",(function(e){return function t(e){return function(t,n){var r=e.apply(t,n);if(r instanceof M)return r;var o=r.constructor;return o[z]||N(o),r}}(e)}))),Promise[t.__symbol__("uncaughtPromiseErrors")]=a,M})),Zone.__load_patch("toString",(function(e){var t=Function.prototype.toString,n=d("OriginalDelegate"),r=d("Promise"),o=d("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"function"==typeof Promise&&this instanceof Promise?"[object Promise]":a.call(this)}}));var R=!1;if("undefined"!=typeof window)try{var z=Object.defineProperty({},"passive",{get:function(){R=!0}});window.addEventListener("test",z,z),window.removeEventListener("test",z,z)}catch(e){R=!1}var N={useG:!0},L={},q={},H=new RegExp("^"+h+"(\\w+)(true|false)$"),U=d("propagationStopped");function W(e,t){var n=(t?t(e):e)+l,r=(t?t(e):e)+u,o=h+n,i=h+r;L[e]={},L[e][l]=o,L[e][u]=i}function G(e,t,r,o){var s=o&&o.add||i,c=o&&o.rm||a,f=o&&o.listeners||"eventListeners",p=o&&o.rmAll||"removeAllListeners",y=d(s),_="."+s+":",v="prependListener",k="."+v+":",m=function(e,t,n){if(!e.isRemoved){var r,o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=function(e){return o.handleEvent(e)},e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}var i=e.options;return i&&"object"==typeof i&&i.once&&t[c].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,i),r}};function T(n,r,o){if(r=r||e.event){var i=n||r.target||e,a=i[L[r.type][o?u:l]];if(a){var s=[];if(1===a.length)(f=m(a[0],i,r))&&s.push(f);else for(var c=a.slice(),h=0;h<c.length&&(!r||!0!==r[U]);h++){var f;(f=m(c[h],i,r))&&s.push(f)}if(1===s.length)throw s[0];var p=function(e){var n=s[e];t.nativeScheduleMicroTask((function(){throw n}))};for(h=0;h<s.length;h++)p(h)}}}var g=function(e){return T(this,e,!1)},E=function(e){return T(this,e,!0)};function S(t,r){if(!t)return!1;var o=!0;r&&void 0!==r.useG&&(o=r.useG);var i=r&&r.vh,a=!0;r&&void 0!==r.chkDup&&(a=r.chkDup);var m=!1;r&&void 0!==r.rt&&(m=r.rt);for(var T=t;T&&!T.hasOwnProperty(s);)T=n(T);if(!T&&t[s]&&(T=t),!T)return!1;if(T[y])return!1;var S,w=r&&r.eventNameToString,P={},Z=T[y]=T[s],D=T[d(c)]=T[c],C=T[d(f)]=T[f],A=T[d(p)]=T[p];r&&r.prepend&&(S=T[d(r.prepend)]=T[r.prepend]);var j=o?function(e){if(!P.isExisting)return Z.call(P.target,P.eventName,P.capture?E:g,P.options)}:function(e){return Z.call(P.target,P.eventName,e.invoke,P.options)},O=o?function(e){if(!e.isRemoved){var t=L[e.eventName],n=void 0;t&&(n=t[e.capture?u:l]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return D.call(e.target,e.eventName,e.capture?E:g,e.options)}:function(e){return D.call(e.target,e.eventName,e.invoke,e.options)},F=r&&r.diff?r.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},x=Zone[d("UNPATCHED_EVENTS")],M=e[d("PASSIVE_EVENTS")],z=function(t,n,s,c,h,f){return void 0===h&&(h=!1),void 0===f&&(f=!1),function(){var p=this||e,d=arguments[0];r&&r.transferEventName&&(d=r.transferEventName(d));var y=arguments[1];if(!y)return t.apply(this,arguments);if(b&&"uncaughtException"===d)return t.apply(this,arguments);var _=!1;if("function"!=typeof y){if(!y.handleEvent)return t.apply(this,arguments);_=!0}if(!i||i(t,y,p,arguments)){var v=R&&!!M&&-1!==M.indexOf(d),k=function e(t,n){return!R&&"object"==typeof t&&t?!!t.capture:R&&n?"boolean"==typeof t?{capture:t,passive:!0}:t?"object"==typeof t&&!1!==t.passive?__assign(__assign({},t),{passive:!0}):t:{passive:!0}:t}(arguments[2],v);if(x)for(var m=0;m<x.length;m++)if(d===x[m])return v?t.call(p,d,y,k):t.apply(this,arguments);var T=!!k&&("boolean"==typeof k||k.capture),g=!(!k||"object"!=typeof k)&&k.once,E=Zone.current,S=L[d];S||(W(d,w),S=L[d]);var Z,D=S[T?u:l],C=p[D],A=!1;if(C){if(A=!0,a)for(m=0;m<C.length;m++)if(F(C[m],y))return}else C=p[D]=[];var j=p.constructor.name,O=q[j];O&&(Z=O[d]),Z||(Z=j+n+(w?w(d):d)),P.options=k,g&&(P.options.once=!1),P.target=p,P.capture=T,P.eventName=d,P.isExisting=A;var I=o?N:void 0;I&&(I.taskData=P);var z=E.scheduleEventTask(Z,y,I,s,c);return P.target=null,I&&(I.taskData=null),g&&(k.once=!0),(R||"boolean"!=typeof z.options)&&(z.options=k),z.target=p,z.capture=T,z.eventName=d,_&&(z.originalDelegate=y),f?C.unshift(z):C.push(z),h?p:void 0}}};return T[s]=z(Z,_,j,O,m),S&&(T[v]=z(S,k,(function(e){return S.call(P.target,P.eventName,e.invoke,P.options)}),O,m,!0)),T[c]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));var o=arguments[2],a=!!o&&("boolean"==typeof o||o.capture),s=arguments[1];if(!s)return D.apply(this,arguments);if(!i||i(D,s,t,arguments)){var c,f=L[n];f&&(c=f[a?u:l]);var p=c&&t[c];if(p)for(var d=0;d<p.length;d++){var y=p[d];if(F(y,s))return p.splice(d,1),y.isRemoved=!0,0===p.length&&(y.allRemoved=!0,t[c]=null,"string"==typeof n&&(t[h+"ON_PROPERTY"+n]=null)),y.zone.cancelTask(y),m?t:void 0}return D.apply(this,arguments)}},T[f]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));for(var o=[],i=Q(t,w?w(n):n),a=0;a<i.length;a++){var s=i[a];o.push(s.originalDelegate?s.originalDelegate:s.callback)}return o},T[p]=function(){var t=this||e,n=arguments[0];if(n){r&&r.transferEventName&&(n=r.transferEventName(n));var o=L[n];if(o){var i=t[o[l]],a=t[o[u]];if(i){var s=i.slice();for(d=0;d<s.length;d++)this[c].call(this,n,(h=s[d]).originalDelegate?h.originalDelegate:h.callback,h.options)}if(a)for(s=a.slice(),d=0;d<s.length;d++){var h;this[c].call(this,n,(h=s[d]).originalDelegate?h.originalDelegate:h.callback,h.options)}}}else{for(var f=Object.keys(t),d=0;d<f.length;d++){var y=H.exec(f[d]),_=y&&y[1];_&&"removeListener"!==_&&this[p].call(this,_)}this[p].call(this,"removeListener")}if(m)return this},I(T[s],Z),I(T[c],D),A&&I(T[p],A),C&&I(T[f],C),!0}for(var w=[],P=0;P<r.length;P++)w[P]=S(r[P],o);return w}function Q(e,t){if(!t){var n=[];for(var r in e){var o=H.exec(r),i=o&&o[1];if(i&&(!t||i===t)){var a=e[r];if(a)for(var s=0;s<a.length;s++)n.push(a[s])}}return n}var c=L[t];c||(W(t),c=L[t]);var h=e[c[l]],f=e[c[u]];return h?f?h.concat(f):h.slice():f?f.slice():[]}function B(e,t){var n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",(function(e){return function(t,n){t[U]=!0,e&&e.apply(t,n)}}))}function V(e,t,n,r,o){var i=Zone.__symbol__(r);if(!t[i]){var a=t[i]=t[r];t[r]=function(i,s,c){return s&&s.prototype&&o.forEach((function(t){var o="".concat(n,".").concat(r,"::")+t,i=s.prototype;try{if(i.hasOwnProperty(t)){var a=e.ObjectGetOwnPropertyDescriptor(i,t);a&&a.value?(a.value=e.wrapWithCurrentZone(a.value,o),e._redefineProperty(s.prototype,t,a)):i[t]&&(i[t]=e.wrapWithCurrentZone(i[t],o))}else i[t]&&(i[t]=e.wrapWithCurrentZone(i[t],o))}catch(e){}})),a.call(t,i,s,c)},e.attachOriginToPatched(t[r],a)}}function X(e,t,n){if(!n||0===n.length)return t;var r=n.filter((function(t){return t.target===e}));if(!r||0===r.length)return t;var o=r[0].ignoreProperties;return t.filter((function(e){return-1===o.indexOf(e)}))}function K(e,t,n,r){e&&D(e,X(e,t,n),r)}function Y(e){return Object.getOwnPropertyNames(e).filter((function(e){return e.startsWith("on")&&e.length>2})).map((function(e){return e.substring(2)}))}function J(e,t){if((!b||S)&&!Zone[e.symbol("patchEvents")]){var r=t.__Zone_ignore_on_properties,o=[];if(E){var i=window;o=o.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);var a=function e(){try{var e=_.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}()?[{target:i,ignoreProperties:["error"]}]:[];K(i,Y(i),r?r.concat(a):r,n(i))}o=o.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(var s=0;s<o.length;s++){var c=t[o[s]];c&&c.prototype&&K(c.prototype,Y(c.prototype),r)}}}function $(e,t){t.patchMethod(e,"queueMicrotask",(function(e){return function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}}))}Zone.__load_patch("util",(function(n,s,c){var p=Y(n);c.patchOnProperties=D,c.patchMethod=j,c.bindArguments=m,c.patchMacroTask=O;var d=s.__symbol__("BLACK_LISTED_EVENTS"),y=s.__symbol__("UNPATCHED_EVENTS");n[y]&&(n[d]=n[y]),n[d]&&(s[d]=s[y]=n[d]),c.patchEventPrototype=B,c.patchEventTarget=G,c.isIEOrEdge=M,c.ObjectDefineProperty=t,c.ObjectGetOwnPropertyDescriptor=e,c.ObjectCreate=r,c.ArraySlice=o,c.patchClass=A,c.wrapWithCurrentZone=f,c.filterProperties=X,c.attachOriginToPatched=I,c._redefineProperty=Object.defineProperty,c.patchCallbacks=V,c.getGlobalObjects=function(){return{globalSources:q,zoneSymbolEventNames:L,eventNames:p,isBrowser:E,isMix:S,isNode:b,TRUE_STR:u,FALSE_STR:l,ZONE_SYMBOL_PREFIX:h,ADD_EVENT_LISTENER_STR:i,REMOVE_EVENT_LISTENER_STR:a}}}));var ee=d("zoneTask");function te(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(){return t.invoke.apply(this,arguments)},n.handleId=o.apply(e,n.args),t}function c(t){return i.call(e,t.data.handleId)}o=j(e,t+=r,(function(n){return function(o,i){if("function"==typeof i[0]){var u={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},l=i[0];i[0]=function e(){try{return l.apply(this,arguments)}finally{u.isPeriodic||("number"==typeof u.handleId?delete a[u.handleId]:u.handleId&&(u.handleId[ee]=null))}};var h=p(t,i[0],u,s,c);if(!h)return h;var f=h.data.handleId;return"number"==typeof f?a[f]=h:f&&(f[ee]=h),f&&f.ref&&f.unref&&"function"==typeof f.ref&&"function"==typeof f.unref&&(h.ref=f.ref.bind(f),h.unref=f.unref.bind(f)),"number"==typeof f||f?f:h}return n.apply(e,i)}})),i=j(e,n,(function(t){return function(n,r){var o,i=r[0];"number"==typeof i?o=a[i]:(o=i&&i[ee])||(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[ee]=null),o.zone.cancelTask(o)):t.apply(e,r)}}))}function ne(e,t){if(!Zone[t.symbol("patchEventTarget")]){for(var n=t.getGlobalObjects(),r=n.eventNames,o=n.zoneSymbolEventNames,i=n.TRUE_STR,a=n.FALSE_STR,s=n.ZONE_SYMBOL_PREFIX,c=0;c<r.length;c++){var u=r[c],l=s+(u+a),h=s+(u+i);o[u]={},o[u][a]=l,o[u][i]=h}var f=e.EventTarget;if(f&&f.prototype)return t.patchEventTarget(e,t,[f&&f.prototype]),!0}}Zone.__load_patch("legacy",(function(e){var t=e[Zone.__symbol__("legacyPatch")];t&&t()})),Zone.__load_patch("timers",(function(e){var t="set",n="clear";te(e,t,n,"Timeout"),te(e,t,n,"Interval"),te(e,t,n,"Immediate")})),Zone.__load_patch("requestAnimationFrame",(function(e){te(e,"request","cancel","AnimationFrame"),te(e,"mozRequest","mozCancel","AnimationFrame"),te(e,"webkitRequest","webkitCancel","AnimationFrame")})),Zone.__load_patch("blocking",(function(e,t){for(var n=["alert","prompt","confirm"],r=0;r<n.length;r++)j(e,n[r],(function(n,r,o){return function(r,i){return t.current.run(n,e,i,o)}}))})),Zone.__load_patch("EventTarget",(function(e,t,n){!function r(e,t){t.patchEventPrototype(e,t)}(e,n),ne(e,n);var o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,n,[o.prototype])})),Zone.__load_patch("MutationObserver",(function(e,t,n){A("MutationObserver"),A("WebKitMutationObserver")})),Zone.__load_patch("IntersectionObserver",(function(e,t,n){A("IntersectionObserver")})),Zone.__load_patch("FileReader",(function(e,t,n){A("FileReader")})),Zone.__load_patch("on_property",(function(e,t,n){J(n,e)})),Zone.__load_patch("customElements",(function(e,t,n){!function r(e,t){var n=t.getGlobalObjects();(n.isBrowser||n.isMix)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(e,n)})),Zone.__load_patch("XHR",(function(e,t){!function n(e){var n=e.XMLHttpRequest;if(n){var h=n.prototype,f=h[s],y=h[c];if(!f){var _=e.XMLHttpRequestEventTarget;if(_){var v=_.prototype;f=v[s],y=v[c]}}var k="readystatechange",m="scheduled",T=j(h,"open",(function(){return function(e,t){return e[o]=0==t[2],e[u]=t[1],T.apply(e,t)}})),g=d("fetchTaskAborting"),b=d("fetchTaskScheduling"),E=j(h,"send",(function(){return function(e,n){if(!0===t.current[b])return E.apply(e,n);if(e[o])return E.apply(e,n);var r={target:e,url:e[u],isPeriodic:!1,args:n,aborted:!1},i=p("XMLHttpRequest.send",P,r,w,Z);e&&!0===e[l]&&!r.aborted&&i.state===m&&i.invoke()}})),S=j(h,"abort",(function(){return function(e,n){var o=function i(e){return e[r]}(e);if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===t.current[g])return S.apply(e,n)}}))}function w(e){var n=e.data,o=n.target;o[a]=!1,o[l]=!1;var u=o[i];f||(f=o[s],y=o[c]),u&&y.call(o,k,u);var h=o[i]=function(){if(o.readyState===o.DONE)if(!n.aborted&&o[a]&&e.state===m){var r=o[t.__symbol__("loadfalse")];if(0!==o.status&&r&&r.length>0){var i=e.invoke;e.invoke=function(){for(var r=o[t.__symbol__("loadfalse")],a=0;a<r.length;a++)r[a]===e&&r.splice(a,1);n.aborted||e.state!==m||i.call(e)},r.push(e)}else e.invoke()}else n.aborted||!1!==o[a]||(o[l]=!0)};return f.call(o,k,h),o[r]||(o[r]=e),E.apply(o,n.args),o[a]=!0,e}function P(){}function Z(e){var t=e.data;return t.aborted=!0,S.apply(t.target,t.args)}}(e);var r=d("xhrTask"),o=d("xhrSync"),i=d("xhrListener"),a=d("xhrScheduled"),u=d("xhrURL"),l=d("xhrErrorBeforeScheduled")})),Zone.__load_patch("geolocation",(function(t){t.navigator&&t.navigator.geolocation&&function n(t,r){for(var o=t.constructor.name,i=function(n){var i=r[n],a=t[i];if(a){if(!T(e(t,i)))return"continue";t[i]=function(e){var t=function(){return e.apply(this,m(arguments,o+"."+i))};return I(t,e),t}(a)}},a=0;a<r.length;a++)i(a)}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])})),Zone.__load_patch("PromiseRejectionEvent",(function(e,t){function n(t){return function(n){Q(e,t).forEach((function(r){var o=e.PromiseRejectionEvent;if(o){var i=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(i)}}))}}e.PromiseRejectionEvent&&(t[d("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[d("rejectionHandledHandler")]=n("rejectionhandled"))})),Zone.__load_patch("queueMicrotask",(function(e,t,n){$(e,n)}));var re="\n",oe={},ie="__creationTrace__",ae="STACKTRACE TRACKING",se="__SEP_TAG__",ce=se+"@[native]",ue=function ue(){this.error=de(),this.timestamp=new Date};function le(){return new Error(ae)}function he(){try{throw le()}catch(e){return e}}var fe=le(),pe=he(),de=fe.stack?le:pe.stack?he:le;function ye(e){return e.stack?e.stack.split(re):[]}function _e(e,t){for(var n=ye(t),r=0;r<n.length;r++)oe.hasOwnProperty(n[r])||e.push(n[r])}function ve(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 ".concat(r-a.getTime()," ms; At: ").concat(a);s=s.replace(/[^\w\d]/g,"_"),n.push(ce.replace(se,s)),_e(n,i.error),r=a.getTime()}return n.join(re)}function ke(){return Error.stackTraceLimit>0}function me(e,t){t>0&&(e.push(ye((new ue).error)),me(e,t-1))}Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(e){if(e){var t=e[Zone.__symbol__("currentTaskTrace")];return t?ve(t,e.stack):e.stack}},onScheduleTask:function(e,t,n,r){if(ke()){var o=Zone.currentTask,i=o&&o.data&&o.data[ie]||[];(i=[new ue].concat(i)).length>this.longStackTraceLimit&&(i.length=this.longStackTraceLimit),r.data||(r.data={}),"eventTask"===r.type&&(r.data=__assign({},r.data)),r.data[ie]=i}return e.scheduleTask(n,r)},onHandleError:function(e,t,n,r){if(ke()){var o=Zone.currentTask||r.task;if(r instanceof Error&&o){var i=ve(o.data&&o.data[ie],r.stack);try{r.stack=r.longStack=i}catch(e){}}}return e.handleError(n,r)}},function Te(){if(ke()){var e=[];me(e,2);for(var t=e[0],n=e[1],r=0;r<t.length;r++)if(-1==(i=t[r]).indexOf(ae)){var o=i.match(/^\s*at\s+/);if(o){ce=o[0]+se+" (http://localhost)";break}}for(r=0;r<t.length;r++){var i;if((i=t[r])!==n[r])break;oe[i]=!0}}}();var ge=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: ".concat(e.type,", source: ").concat(e.source,", args: {").concat(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=ge;var be=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 ".concat(r.source," from within a sync test (").concat(this.name,")."));case"eventTask":r=e.scheduleTask(n,r)}return r},e}();Zone.SyncTestZoneSpec=be,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=t.__symbol__,s=!0===e[a("fakeAsyncDisablePatchingClock")],c=!s&&(!0===e[a("fakeAsyncPatchLock")]||!0===e[a("fakeAsyncAutoFakeAsyncWhenClockPatched")]);if(!0!==e[a("ignoreUnhandledRejection")]){var u=jasmine.GlobalErrors;u&&!jasmine[a("GlobalErrors")]&&(jasmine[a("GlobalErrors")]=u,jasmine.GlobalErrors=function(){var t=new u,n=t.install;return n&&!t[a("install")]&&(t[a("install")]=n,t.install=function(){var t="undefined"!=typeof process&&!!process.on,r=t?process.listeners("unhandledRejection"):e.eventListeners("unhandledrejection"),o=n.apply(this,arguments);return t?process.removeAllListeners("unhandledRejection"):e.removeAllListeners("unhandledrejection"),r&&r.forEach((function(n){t?process.on("unhandledRejection",n):e.addEventListener("unhandledrejection",n)})),o}),t})}var l=jasmine.getEnv();if(["describe","xdescribe","fdescribe"].forEach((function(e){var t=l[e];l[e]=function(e,n){return t.call(this,e,function o(e,t){return function(){return i.fork(new r("jasmine.describe#".concat(e))).run(t,this,arguments)}}(e,n))}})),["it","xit","fit"].forEach((function(e){var t=l[e];l[a(e)]=t,l[e]=function(e,n,r){return arguments[1]=y(n),t.apply(this,arguments)}})),["beforeEach","afterEach","beforeAll","afterAll"].forEach((function(e){var t=l[e];l[a(e)]=t,l[e]=function(e,n){return arguments[0]=y(e),t.apply(this,arguments)}})),!s){var h=jasmine[a("clock")]=jasmine.clock;jasmine.clock=function(){var e=h.apply(this,arguments);if(!e[a("patched")]){e[a("patched")]=a("patched");var n=e[a("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[a("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.setFakeBaseSystemTime.apply(e,n&&"function"==typeof n.getTime?[n.getTime()]:arguments)}return r.apply(this,arguments)},c&&["install","uninstall"].forEach((function(n){var r=e[a(n)]=e[n];e[n]=function(){if(!t.FakeAsyncTestZoneSpec)return r.apply(this,arguments);jasmine[a("clockInstalled")]="install"===n}}))}return e}}if(!jasmine[t.__symbol__("createSpyObj")]){var f=jasmine.createSpyObj;jasmine[t.__symbol__("createSpyObj")]=f,jasmine.createSpyObj=function(){var e,t=Array.prototype.slice.call(arguments);if(t.length>=3&&t[2]){var n=Object.defineProperty;Object.defineProperty=function(e,t,r){return n.call(this,e,t,__assign(__assign({},r),{configurable:!0,enumerable:!0}))};try{e=f.apply(this,t)}finally{Object.defineProperty=n}}else e=f.apply(this,t);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[a("clockInstalled")],s=r.testProxyZone;if(i&&c){var u=t[t.__symbol__("fakeAsyncTest")];u&&"function"==typeof u.fakeAsync&&(e=u.fakeAsync(e))}return o?s.run(e,n,[o]):s.run(e,n)}function y(e){return e&&(e.length?function(t){return d(e,this,this.queueRunner,t)}:function(){return d(e,this,this.queueRunner)})}})),Zone.__load_patch("jest",(function(e,t,n){if("undefined"!=typeof jest&&!jest.__zone_patch__){t[n.symbol("ignoreConsoleErrorUncaughtError")]=!0,jest.__zone_patch__=!0;var r=t.ProxyZoneSpec,o=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");var i=t.current,a=i.fork(new o("jest.describe")),s=new r,c=i.fork(s);["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]=u(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]=u(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]=l(e[1],!0),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];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n[1]=l(n[1]),e.apply(this,t).apply(this,n)}}}(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]=l(e[0]),r.apply(this,e)})})),t.patchJestObject=function e(r,o){function i(){return!!t.current.get("FakeAsyncTestZoneSpec")}function a(){var e=t.current.get("ProxyZoneSpec");return e&&e.isTestFunc}void 0===o&&(o=!1),r[n.symbol("fakeTimers")]||(r[n.symbol("fakeTimers")]=!0,n.patchMethod(r,"_checkFakeTimers",(function(e){return function(t,n){return!!i()||e.apply(t,n)}})),n.patchMethod(r,"useFakeTimers",(function(e){return function(r,i){return t[n.symbol("useFakeTimersCalled")]=!0,o||a()?e.apply(r,i):r}})),n.patchMethod(r,"useRealTimers",(function(e){return function(r,i){return t[n.symbol("useFakeTimersCalled")]=!1,o||a()?e.apply(r,i):r}})),n.patchMethod(r,"setSystemTime",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o||!i())return e.apply(n,r);o.setFakeBaseSystemTime(r[0])}})),n.patchMethod(r,"getRealSystemTime",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");return o&&i()?o.getRealSystemTime():e.apply(n,r)}})),n.patchMethod(r,"runAllTicks",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o)return e.apply(n,r);o.flushMicrotasks()}})),n.patchMethod(r,"runAllTimers",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o)return e.apply(n,r);o.flush(100,!0)}})),n.patchMethod(r,"advanceTimersByTime",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o)return e.apply(n,r);o.tick(r[0])}})),n.patchMethod(r,"runOnlyPendingTimers",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o)return e.apply(n,r);o.flushOnlyPendingTimers()}})),n.patchMethod(r,"advanceTimersToNextTimer",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o)return e.apply(n,r);o.tickToNext(r[0])}})),n.patchMethod(r,"clearAllTimers",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");if(!o)return e.apply(n,r);o.removeAllTimers()}})),n.patchMethod(r,"getTimerCount",(function(e){return function(n,r){var o=t.current.get("FakeAsyncTestZoneSpec");return o?o.getTimerCount():e.apply(n,r)}})))}}function u(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return a.run(e,this,t)}}function l(e,r){if(void 0===r&&(r=!1),"function"!=typeof e)return e;var o=function(){if(!0===t[n.symbol("useFakeTimersCalled")]&&e&&!e.isFakeAsync){var o=t[t.__symbol__("fakeAsyncTest")];o&&"function"==typeof o.fakeAsync&&(e=o.fakeAsync(e))}return s.isTestFunc=r,c.run(e,null,arguments)};return Object.defineProperty(o,"length",{configurable:!0,writable:!0,enumerable:!1}),o.length=e.length,o}})),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:e.after,afterEach:e.afterEach,before:e.before,beforeEach:e.beforeEach,describe:e.describe,it:e.it};e.describe=e.suite=function(){return h.describe.apply(this,p(arguments))},e.xdescribe=e.suite.skip=e.describe.skip=function(){return h.describe.skip.apply(this,p(arguments))},e.describe.only=e.suite.only=function(){return h.describe.only.apply(this,p(arguments))},e.it=e.specify=e.test=function(){return h.it.apply(this,d(arguments))},e.xit=e.xspecify=e.it.skip=function(){return h.it.skip.apply(this,d(arguments))},e.it.only=e.test.only=function(){return h.it.only.apply(this,d(arguments))},e.after=e.suiteTeardown=function(){return h.after.apply(this,y(arguments))},e.afterEach=e.teardown=function(){return h.afterEach.apply(this,d(arguments))},e.before=e.suiteSetup=function(){return h.before.apply(this,y(arguments))},e.beforeEach=e.setup=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 y(e){return f(e,(function(e){return function(){return l.run(e,this)}}),(function(e){return function(t){return l.run(e,this,[t])}}))}})),function(e){var t,n=function(){function n(t,n,r){this.finishCallback=t,this.failCallback=n,this._pendingMicroTasks=!1,this._pendingMacroTasks=!1,this._alreadyErrored=!1,this._isSync=!1,this._existingFinishTimer=null,this.entryFunction=null,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 n.prototype.isUnresolvedChainedPromisePending=function(){return this.unresolvedChainedPromiseCount>0},n.prototype._finishCallbackIfDone=function(){var e=this;null!==this._existingFinishTimer&&(clearTimeout(this._existingFinishTimer),this._existingFinishTimer=null),this._pendingMicroTasks||this._pendingMacroTasks||this.supportWaitUnresolvedChainedPromise&&this.isUnresolvedChainedPromisePending()||this.runZone.run((function(){e._existingFinishTimer=setTimeout((function(){e._alreadyErrored||e._pendingMicroTasks||e._pendingMacroTasks||e.finishCallback()}),0)}))},n.prototype.patchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("patchPromiseForTest")];e&&e()}},n.prototype.unPatchPromiseForTest=function(){if(this.supportWaitUnresolvedChainedPromise){var e=Promise[Zone.__symbol__("unPatchPromiseForTest")];e&&e()}},n.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)},n.prototype.onInvokeTask=function(e,t,n,r,o,i){return"eventTask"!==r.type&&(this._isSync=!1),e.invokeTask(n,r,o,i)},n.prototype.onCancelTask=function(e,t,n,r){return"eventTask"!==r.type&&(this._isSync=!1),e.cancelTask(n,r)},n.prototype.onInvoke=function(e,t,n,r,o,i,a){this.entryFunction||(this.entryFunction=r);try{return this._isSync=!0,e.invoke(n,r,o,i,a)}finally{this._isSync&&this.entryFunction===r&&this._finishCallbackIfDone()}},n.prototype.onHandleError=function(e,t,n,r){return e.handleError(n,r)&&(this.failCallback(r),this._alreadyErrored=!0),!1},n.prototype.onHasTask=function(e,t,n,r){e.hasTask(n,r),t===n&&("microTask"==r.change?(this._pendingMicroTasks=r.microTask,this._finishCallbackIfDone()):"macroTask"==r.change&&(this._pendingMacroTasks=r.macroTask,this._finishCallbackIfDone()))},n}();(t=n).symbolParentUnresolved=Zone.__symbol__("parentUnresolved"),Zone.AsyncTestZoneSpec=n}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),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/plugins/async-test");var s=t.ProxyZoneSpec;if(!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/plugins/proxy");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)}))}}})),function(e){var t,n=e.Date;function r(){if(0===arguments.length){var e=new n;return e.setTime(r.now()),e}var t=Array.prototype.slice.call(arguments);return new(n.bind.apply(n,__spreadArray([void 0],t,!1)))}r.now=function(){var e=Zone.current.get("FakeAsyncTestZoneSpec");return e?e.getFakeSystemTime():n.now.apply(this,arguments)},r.UTC=n.UTC,r.parse=n.parse;var o={setTimeout:e.setTimeout,setInterval:e.setInterval,clearTimeout:e.clearTimeout,clearInterval:e.clearInterval},i=function(){function r(){this._schedulerQueue=[],this._currentTickTime=0,this._currentFakeBaseSystemTime=n.now(),this._currentTickRequeuePeriodicEntries=[]}return r.prototype.getCurrentTickTime=function(){return this._currentTickTime},r.prototype.getFakeSystemTime=function(){return this._currentFakeBaseSystemTime+this._currentTickTime},r.prototype.setFakeBaseSystemTime=function(e){this._currentFakeBaseSystemTime=e},r.prototype.getRealSystemTime=function(){return n.now()},r.prototype.scheduleFunction=function(e,n,r){var o=(r=__assign({args:[],isPeriodic:!1,isRequestAnimationFrame:!1,id:-1,isRequeuePeriodic:!1},r)).id<0?t.nextId++:r.id,i={endTime:this._currentTickTime+n,id:o,func:e,args:r.args,delay:n,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},r.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}},r.prototype.removeAll=function(){this._schedulerQueue=[]},r.prototype.getTimerCount=function(){return this._schedulerQueue.length},r.prototype.tickToNext=function(e,t,n){void 0===e&&(e=1),this._schedulerQueue.length<e||this.tick(this._schedulerQueue[e-1].endTime-this._currentTickTime,t,n)},r.prototype.tick=function(t,n,r){void 0===t&&(t=0);var o=this._currentTickTime+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._currentTickTime,this._currentTickTime=s.endTime,n&&n(this._currentTickTime-i),!s.func.apply(e,s.isRequestAnimationFrame?[this._currentTickTime]: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._currentTickTime,this._currentTickTime=o,n&&n(this._currentTickTime-i)}},r.prototype.flushOnlyPendingTimers=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e,{processNewMacroTasksSynchronously:!1}),this._currentTickTime-t},r.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)},r.prototype.flushPeriodic=function(e){if(0===this._schedulerQueue.length)return 0;var t=this._currentTickTime;return this.tick(this._schedulerQueue[this._schedulerQueue.length-1].endTime-t,e),this._currentTickTime-t},r.prototype.flushNonPeriodic=function(t,n){for(var r=this._currentTickTime,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._currentTickTime,this._currentTickTime=a.endTime,n&&n(this._currentTickTime-o),!a.func.apply(e,a.args))break}return this._currentTickTime-r},r}();(t=i).nextId=1;var a=function(){function t(t,n,r){void 0===n&&(n=!1),this.trackPendingRequestAnimationFrame=n,this.macroTaskOptions=r,this._scheduler=new i,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 t.assertInZone=function(){if(null==Zone.current.get("FakeAsyncTestZoneSpec"))throw new Error("The code should be running in the fakeAsync zone to call this function")},t.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}},t._removeTimer=function(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)},t.prototype._dequeueTimer=function(e){var n=this;return function(){t._removeTimer(n.pendingTimers,e)}},t.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})}},t.prototype._dequeuePeriodicTimer=function(e){var n=this;return function(){t._removeTimer(n.pendingPeriodicTimers,e)}},t.prototype._setTimeout=function(e,t,n,r){void 0===r&&(r=!0);var o=this._dequeueTimer(i.nextId),a=this._fnAndFlush(e,{onSuccess:o,onError:o}),s=this._scheduler.scheduleFunction(a,t,{args:n,isRequestAnimationFrame:!r});return r&&this.pendingTimers.push(s),s},t.prototype._clearTimeout=function(e){t._removeTimer(this.pendingTimers,e),this._scheduler.removeScheduledFunctionWithId(e)},t.prototype._setInterval=function(e,t,n){var r=i.nextId,o={onSuccess:null,onError:this._dequeuePeriodicTimer(r)},a=this._fnAndFlush(e,o);return o.onSuccess=this._requeuePeriodicTimer(a,t,n,r),this._scheduler.scheduleFunction(a,t,{args:n,isPeriodic:!0}),this.pendingPeriodicTimers.push(r),r},t.prototype._clearInterval=function(e){t._removeTimer(this.pendingPeriodicTimers,e),this._scheduler.removeScheduledFunctionWithId(e)},t.prototype._resetLastErrorAndThrow=function(){var e=this._lastError||this._uncaughtPromiseErrors[0];throw this._uncaughtPromiseErrors.length=0,this._lastError=null,e},t.prototype.getCurrentTickTime=function(){return this._scheduler.getCurrentTickTime()},t.prototype.getFakeSystemTime=function(){return this._scheduler.getFakeSystemTime()},t.prototype.setFakeBaseSystemTime=function(e){this._scheduler.setFakeBaseSystemTime(e)},t.prototype.getRealSystemTime=function(){return this._scheduler.getRealSystemTime()},t.patchDate=function(){e[Zone.__symbol__("disableDatePatching")]||e.Date!==r&&(e.Date=r,r.prototype=n.prototype,t.checkTimerPatch())},t.resetDate=function(){e.Date===r&&(e.Date=n)},t.checkTimerPatch=function(){e.setTimeout!==o.setTimeout&&(e.setTimeout=o.setTimeout,e.clearTimeout=o.clearTimeout),e.setInterval!==o.setInterval&&(e.setInterval=o.setInterval,e.clearInterval=o.clearInterval)},t.prototype.lockDatePatch=function(){this.patchDateLocked=!0,t.patchDate()},t.prototype.unlockDatePatch=function(){this.patchDateLocked=!1,t.resetDate()},t.prototype.tickToNext=function(e,n,r){void 0===e&&(e=1),void 0===r&&(r={processNewMacroTasksSynchronously:!0}),e<=0||(t.assertInZone(),this.flushMicrotasks(),this._scheduler.tickToNext(e,n,r),null!==this._lastError&&this._resetLastErrorAndThrow())},t.prototype.tick=function(e,n,r){void 0===e&&(e=0),void 0===r&&(r={processNewMacroTasksSynchronously:!0}),t.assertInZone(),this.flushMicrotasks(),this._scheduler.tick(e,n,r),null!==this._lastError&&this._resetLastErrorAndThrow()},t.prototype.flushMicrotasks=function(){var e=this;for(t.assertInZone();this._microtasks.length>0;){var n=this._microtasks.shift();n.func.apply(n.target,n.args)}(null!==e._lastError||e._uncaughtPromiseErrors.length)&&e._resetLastErrorAndThrow()},t.prototype.flush=function(e,n,r){t.assertInZone(),this.flushMicrotasks();var o=this._scheduler.flush(e,n,r);return null!==this._lastError&&this._resetLastErrorAndThrow(),o},t.prototype.flushOnlyPendingTimers=function(e){t.assertInZone(),this.flushMicrotasks();var n=this._scheduler.flushOnlyPendingTimers(e);return null!==this._lastError&&this._resetLastErrorAndThrow(),n},t.prototype.removeAllTimers=function(){t.assertInZone(),this._scheduler.removeAll(),this.pendingPeriodicTimers=[],this.pendingTimers=[]},t.prototype.getTimerCount=function(){return this._scheduler.getTimerCount()+this._microtasks.length},t.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},t.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)}},t.prototype.onInvoke=function(e,n,r,o,i,a,s){try{return t.patchDate(),e.invoke(r,o,i,a,s)}finally{this.patchDateLocked||t.resetDate()}},t.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},t.prototype.onHandleError=function(e,t,n,r){return this._lastError=r,!1},t}();Zone.FakeAsyncTestZoneSpec=a}("object"==typeof window&&window||"object"==typeof self&&self||global),Zone.__load_patch("fakeasync",(function(e,t,n){var r=t&&t.FakeAsyncTestZoneSpec;function o(){return t&&t.ProxyZoneSpec}var 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){var n=function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];var u=o();if(!u)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/plugins/proxy");var l=u.assertPresent();if(t.current.get("FakeAsyncTestZoneSpec"))throw new Error("fakeAsync() calls can not be nested");try{if(!i){if(l.getDelegate()instanceof r)throw new Error("fakeAsync() calls can not be nested");i=new r}var h=void 0,f=l.getDelegate();l.setDelegate(i),i.lockDatePatch();try{h=e.apply(this,n),c()}finally{l.setDelegate(f)}if(i.pendingPeriodicTimers.length>0)throw new Error("".concat(i.pendingPeriodicTimers.length," ")+"periodic timer(s) still in the queue.");if(i.pendingTimers.length>0)throw new Error("".concat(i.pendingTimers.length," timer(s) still in the queue."));return h}finally{a()}};return n.isFakeAsync=!0,n}}}),!0),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)}}))}));