blob: 999a289aca0c688ac9049df07af001797f50a1e9 [file] [log] [blame]
const Zone$1=function(e){const t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function o(e,n){t&&t.measure&&t.measure(e,n)}n("Zone");const r=!0===e.__zone_symbol__forceDuplicateZoneCheck;if(e.Zone){if(r||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}class s{constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new a(this,this._parent&&this._parent._zoneDelegate,t)}static assertZonePatched(){if(e.Promise!==P.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.)")}static get root(){let e=s.current;for(;e.parent;)e=e.parent;return e}static get current(){return D.zone}static get currentTask(){return z}static __load_patch(t,i){if(P.hasOwnProperty(t)){if(r)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const r="Zone:"+t;n(r),P[t]=i(e,s,N),o(r,r)}}get parent(){return this._parent}get name(){return this._name}get(e){const t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const n=this._zoneDelegate.intercept(this,e,t),o=this;return function(){return o.runGuarded(n,this,arguments,t)}}run(e,t,n,o){D={parent:D,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,o)}finally{D=D.parent}}runGuarded(e,t=null,n,o){D={parent:D,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,o)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{D=D.parent}}runTask(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===y&&(e.type===w||e.type===O))return;const o=e.state!=T;o&&e._transitionTo(T,b),e.runCount++;const r=z;z=e,D={parent:D,zone:this};try{e.type==O&&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!==y&&e.state!==v&&(e.type==w||e.data&&e.data.isPeriodic?o&&e._transitionTo(b,T):(e.runCount=0,this._updateTaskCount(e,-1),o&&e._transitionTo(y,T,y))),D=D.parent,z=r}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;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(E,y);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(v,E,y),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==E&&e._transitionTo(b,E),e}scheduleMicroTask(e,t,n,o){return this.scheduleTask(new c(S,e,t,n,o,void 0))}scheduleMacroTask(e,t,n,o,r){return this.scheduleTask(new c(O,e,t,n,o,r))}scheduleEventTask(e,t,n,o,r){return this.scheduleTask(new c(w,e,t,n,o,r))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");e._transitionTo(k,b,T);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(v,k),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(y,k),e.runCount=0,e}_updateTaskCount(e,t){const n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let o=0;o<n.length;o++)n[o]._updateTaskCount(e.type,t)}}s.__symbol__=R;const i={name:"",onHasTask:(e,t,n,o)=>e.hasTask(n,o),onScheduleTask:(e,t,n,o)=>e.scheduleTask(n,o),onInvokeTask:(e,t,n,o,r,s)=>e.invokeTask(n,o,r,s),onCancelTask:(e,t,n,o)=>e.cancelTask(n,o)};class a{constructor(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.zone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t.zone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t.zone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t.zone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t.zone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t.zone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t.zone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const o=n&&n.onHasTask,r=t&&t._hasTaskZS;(o||r)&&(this._hasTaskZS=o?n:i,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=i,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=i,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=i,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new s(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,o,r){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,o,r):t.apply(n,o)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=S)throw new Error("Task is missing scheduleFn.");_(t)}return n}invokeTask(e,t,n,o){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,o):t.callback.apply(n,o)}cancelTask(e,t){let 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}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){const n=this._taskCounts,o=n[e],r=n[e]=o+t;if(r<0)throw new Error("More tasks executed then were scheduled.");if(0==o||0==r){const t={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};this.hasTask(this.zone,t)}}}class c{constructor(t,n,o,r,s,i){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=t,this.source=n,this.data=r,this.scheduleFn=s,this.cancelFn=i,this.callback=o;const a=this;t===w&&r&&r.useG?this.invoke=c.invokeTask:this.invoke=function(){return c.invokeTask.call(e,a,this,arguments)}}static invokeTask(e,t,n){e||(e=this),Z++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==Z&&m(),Z--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(y,E)}_transitionTo(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==y&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const l=R("setTimeout"),u=R("Promise"),p=R("then");let h,f=[],d=!1;function _(t){if(0===Z&&0===f.length)if(h||e[u]&&(h=e[u].resolve(0)),h){let e=h[p];e||(e=h.then),e.call(h,m)}else e[l](m,0);t&&f.push(t)}function m(){if(!d){for(d=!0;f.length;){const e=f;f=[];for(let t=0;t<e.length;t++){const n=e[t];try{n.zone.runTask(n,null,null)}catch(e){N.onUnhandledError(e)}}}N.microtaskDrainDone(),d=!1}}const g={name:"NO ZONE"},y="notScheduled",E="scheduling",b="scheduled",T="running",k="canceling",v="unknown",S="microTask",O="macroTask",w="eventTask",P={},N={symbol:R,currentZoneFrame:()=>D,onUnhandledError:I,microtaskDrainDone:I,scheduleMicroTask:_,showUncaughtError:()=>!s[R("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:I,patchMethod:()=>I,bindArguments:()=>[],patchThen:()=>I,patchMacroTask:()=>I,setNativePromise:e=>{e&&"function"==typeof e.resolve&&(h=e.resolve(0))},patchEventPrototype:()=>I,isIEOrEdge:()=>!1,getGlobalObjects:()=>void 0,ObjectDefineProperty:()=>I,ObjectGetOwnPropertyDescriptor:()=>void 0,ObjectCreate:()=>void 0,ArraySlice:()=>[],patchClass:()=>I,wrapWithCurrentZone:()=>I,filterProperties:()=>[],attachOriginToPatched:()=>I,_redefineProperty:()=>I,patchCallbacks:()=>I};let D={parent:null,zone:new s(null,null)},z=null,Z=0;function I(){}function R(e){return"__zone_symbol__"+e}return o("Zone","Zone"),e.Zone=s}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);Zone.__load_patch("ZoneAwarePromise",(e,t,n)=>{const o=Object.getOwnPropertyDescriptor,r=Object.defineProperty;const s=n.symbol,i=[],a=s("Promise"),c=s("then"),l="__creationTrace__";n.onUnhandledError=(e=>{if(n.showUncaughtError()){const 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=(()=>{for(;i.length;)for(;i.length;){const e=i.shift();try{e.zone.runGuarded(()=>{throw e})}catch(e){p(e)}}});const u=s("unhandledPromiseRejectionHandler");function p(e){n.onUnhandledError(e);try{const n=t[u];n&&"function"==typeof n&&n.call(this,e)}catch(e){}}function h(e){return e&&e.then}function f(e){return e}function d(e){return M.reject(e)}const _=s("state"),m=s("value"),g=s("finally"),y=s("parentPromiseValue"),E=s("parentPromiseState"),b="Promise.then",T=null,k=!0,v=!1,S=0;function O(e,t){return n=>{try{D(e,t,n)}catch(t){D(e,!1,t)}}}const w=function(){let e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},P="Promise resolved with itself",N=s("currentTaskTrace");function D(e,o,s){const a=w();if(e===s)throw new TypeError(P);if(e[_]===T){let c=null;try{"object"!=typeof s&&"function"!=typeof s||(c=s&&s.then)}catch(t){return a(()=>{D(e,!1,t)})(),e}if(o!==v&&s instanceof M&&s.hasOwnProperty(_)&&s.hasOwnProperty(m)&&s[_]!==T)Z(s),D(e,s[_],s[m]);else if(o!==v&&"function"==typeof c)try{c.call(s,a(O(e,o)),a(O(e,!1)))}catch(t){a(()=>{D(e,!1,t)})()}else{e[_]=o;const a=e[m];if(e[m]=s,e[g]===g&&o===k&&(e[_]=e[E],e[m]=e[y]),o===v&&s instanceof Error){const e=t.currentTask&&t.currentTask.data&&t.currentTask.data[l];e&&r(s,N,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<a.length;)I(e,a[t++],a[t++],a[t++],a[t++]);if(0==a.length&&o==v){e[_]=S;try{throw new Error("Uncaught (in promise): "+function(e){if(e&&e.toString===Object.prototype.toString){const t=e.constructor&&e.constructor.name;return(t||"")+": "+JSON.stringify(e)}return e?e.toString():Object.prototype.toString.call(e)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(o){const r=o;r.rejection=s,r.promise=e,r.zone=t.current,r.task=t.currentTask,i.push(r),n.scheduleMicroTask()}}}}return e}const z=s("rejectionHandledHandler");function Z(e){if(e[_]===S){try{const n=t[z];n&&"function"==typeof n&&n.call(this,{rejection:e[m],promise:e})}catch(e){}e[_]=v;for(let t=0;t<i.length;t++)e===i[t].promise&&i.splice(t,1)}}function I(e,t,n,o,r){Z(e);const s=e[_],i=s?"function"==typeof o?o:f:"function"==typeof r?r:d;t.scheduleMicroTask(b,()=>{try{const o=e[m],r=n&&g===n[g];r&&(n[y]=o,n[E]=s);const a=t.run(i,void 0,r&&i!==d&&i!==f?[]:[o]);D(n,!0,a)}catch(e){D(n,!1,e)}},n)}const R="function ZoneAwarePromise() { [native code] }";class M{constructor(e){const t=this;if(!(t instanceof M))throw new Error("Must be an instanceof Promise.");t[_]=T,t[m]=[];try{e&&e(O(t,k),O(t,v))}catch(e){D(t,!1,e)}}static toString(){return R}static resolve(e){return D(new this(null),k,e)}static reject(e){return D(new this(null),v,e)}static race(e){let t,n,o=new this((e,o)=>{t=e,n=o});function r(e){t(e)}function s(e){n(e)}for(let t of e)h(t)||(t=this.resolve(t)),t.then(r,s);return o}static all(e){let t,n,o=new this((e,o)=>{t=e,n=o}),r=2,s=0;const i=[];for(let o of e){h(o)||(o=this.resolve(o));const e=s;o.then(n=>{i[e]=n,0===--r&&t(i)},n),r++,s++}return 0===(r-=2)&&t(i),o}get[Symbol.toStringTag](){return"Promise"}then(e,n){const o=new this.constructor(null),r=t.current;return this[_]==T?this[m].push(r,o,e,n):I(this,r,o,e,n),o}catch(e){return this.then(null,e)}finally(e){const n=new this.constructor(null);n[g]=g;const o=t.current;return this[_]==T?this[m].push(o,n,e,e):I(this,o,n,e,e),n}}M.resolve=M.resolve,M.reject=M.reject,M.race=M.race,M.all=M.all;const j=e[a]=e.Promise,C=t.__symbol__("ZoneAwarePromise");let L=o(e,"Promise");L&&!L.configurable||(L&&delete L.writable,L&&delete L.value,L||(L={configurable:!0,enumerable:!0}),L.get=function(){return e[C]?e[C]:e[a]},L.set=function(t){t===M?e[C]=t:(e[a]=t,t.prototype[c]||F(t),n.setNativePromise(t))},r(e,"Promise",L)),e.Promise=M;const A=s("thenPatched");function F(e){const t=e.prototype,n=o(t,"then");if(n&&(!1===n.writable||!n.configurable))return;const r=t.then;t[c]=r,e.prototype.then=function(e,t){return new M((e,t)=>{r.call(this,e,t)}).then(e,t)},e[A]=!0}if(n.patchThen=F,j){F(j);const t=e.fetch;"function"==typeof t&&(e[n.symbol("fetch")]=t,e.fetch=function(e){return function(){let t=e.apply(this,arguments);if(t instanceof M)return t;let n=t.constructor;return n[A]||F(n),t}}(t))}return Promise[t.__symbol__("uncaughtPromiseErrors")]=i,M});const ObjectGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ObjectDefineProperty=Object.defineProperty,ObjectGetPrototypeOf=Object.getPrototypeOf,ObjectCreate=Object.create,ArraySlice=Array.prototype.slice,ADD_EVENT_LISTENER_STR="addEventListener",REMOVE_EVENT_LISTENER_STR="removeEventListener",ZONE_SYMBOL_ADD_EVENT_LISTENER=Zone.__symbol__(ADD_EVENT_LISTENER_STR),ZONE_SYMBOL_REMOVE_EVENT_LISTENER=Zone.__symbol__(REMOVE_EVENT_LISTENER_STR),TRUE_STR="true",FALSE_STR="false",ZONE_SYMBOL_PREFIX="__zone_symbol__";function wrapWithCurrentZone(e,t){return Zone.current.wrap(e,t)}function scheduleMacroTaskWithCurrentZone(e,t,n,o,r){return Zone.current.scheduleMacroTask(e,t,n,o,r)}const zoneSymbol=Zone.__symbol__,isWindowExists="undefined"!=typeof window,internalWindow=isWindowExists?window:void 0,_global=isWindowExists&&internalWindow||"object"==typeof self&&self||global,REMOVE_ATTRIBUTE="removeAttribute",NULL_ON_PROP_VALUE=[null];function bindArguments(e,t){for(let n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=wrapWithCurrentZone(e[n],t+"_"+n));return e}function patchPrototype(e,t){const n=e.constructor.name;for(let o=0;o<t.length;o++){const r=t[o],s=e[r];if(s){if(!isPropertyWritable(ObjectGetOwnPropertyDescriptor(e,r)))continue;e[r]=(e=>{const t=function(){return e.apply(this,bindArguments(arguments,n+"."+r))};return attachOriginToPatched(t,e),t})(s)}}}function isPropertyWritable(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}const isWebWorker="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,isNode=!("nw"in _global)&&void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process),isBrowser=!isNode&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),isMix=void 0!==_global.process&&"[object process]"==={}.toString.call(_global.process)&&!isWebWorker&&!(!isWindowExists||!internalWindow.HTMLElement),zoneSymbolEventNames={},wrapFn=function(e){if(!(e=e||_global.event))return;let t=zoneSymbolEventNames[e.type];t||(t=zoneSymbolEventNames[e.type]=zoneSymbol("ON_PROPERTY"+e.type));const n=this||e.target||_global,o=n[t];let r;if(isBrowser&&n===internalWindow&&"error"===e.type){const t=e;!0===(r=o&&o.call(this,t.message,t.filename,t.lineno,t.colno,t.error))&&e.preventDefault()}else null==(r=o&&o.apply(this,arguments))||r||e.preventDefault();return r};function patchProperty(e,t,n){let o=ObjectGetOwnPropertyDescriptor(e,t);if(!o&&n){ObjectGetOwnPropertyDescriptor(n,t)&&(o={enumerable:!0,configurable:!0})}if(!o||!o.configurable)return;const r=zoneSymbol("on"+t+"patched");if(e.hasOwnProperty(r)&&e[r])return;delete o.writable,delete o.value;const s=o.get,i=o.set,a=t.substr(2);let c=zoneSymbolEventNames[a];c||(c=zoneSymbolEventNames[a]=zoneSymbol("ON_PROPERTY"+a)),o.set=function(t){let n=this;n||e!==_global||(n=_global),n&&(n[c]&&n.removeEventListener(a,wrapFn),i&&i.apply(n,NULL_ON_PROP_VALUE),"function"==typeof t?(n[c]=t,n.addEventListener(a,wrapFn,!1)):n[c]=null)},o.get=function(){let n=this;if(n||e!==_global||(n=_global),!n)return null;const r=n[c];if(r)return r;if(s){let e=s&&s.call(this);if(e)return o.set.call(this,e),"function"==typeof n[REMOVE_ATTRIBUTE]&&n.removeAttribute(t),e}return null},ObjectDefineProperty(e,t,o),e[r]=!0}function patchOnProperties(e,t,n){if(t)for(let o=0;o<t.length;o++)patchProperty(e,"on"+t[o],n);else{const t=[];for(const n in e)"on"==n.substr(0,2)&&t.push(n);for(let o=0;o<t.length;o++)patchProperty(e,t[o],n)}}const originalInstanceKey=zoneSymbol("originalInstance");function patchClass(e){const t=_global[e];if(!t)return;_global[zoneSymbol(e)]=t,_global[e]=function(){const n=bindArguments(arguments,e);switch(n.length){case 0:this[originalInstanceKey]=new t;break;case 1:this[originalInstanceKey]=new t(n[0]);break;case 2:this[originalInstanceKey]=new t(n[0],n[1]);break;case 3:this[originalInstanceKey]=new t(n[0],n[1],n[2]);break;case 4:this[originalInstanceKey]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},attachOriginToPatched(_global[e],t);const n=new t(function(){});let o;for(o in n)"XMLHttpRequest"===e&&"responseBlob"===o||function(t){"function"==typeof n[t]?_global[e].prototype[t]=function(){return this[originalInstanceKey][t].apply(this[originalInstanceKey],arguments)}:ObjectDefineProperty(_global[e].prototype,t,{set:function(n){"function"==typeof n?(this[originalInstanceKey][t]=wrapWithCurrentZone(n,e+"."+t),attachOriginToPatched(this[originalInstanceKey][t],n)):this[originalInstanceKey][t]=n},get:function(){return this[originalInstanceKey][t]}})}(o);for(o in t)"prototype"!==o&&t.hasOwnProperty(o)&&(_global[e][o]=t[o])}function copySymbolProperties(e,t){if("function"!=typeof Object.getOwnPropertySymbols)return;Object.getOwnPropertySymbols(e).forEach(n=>{const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){(!o||o.writable&&"function"==typeof o.set)&&(e[n]=t)},enumerable:!o||o.enumerable,configurable:!o||o.configurable})})}let shouldCopySymbolProperties=!1;function patchMethod(e,t,n){let o=e;for(;o&&!o.hasOwnProperty(t);)o=ObjectGetPrototypeOf(o);!o&&e[t]&&(o=e);const r=zoneSymbol(t);let s=null;if(o&&!(s=o[r])){if(s=o[r]=o[t],isPropertyWritable(o&&ObjectGetOwnPropertyDescriptor(o,t))){const e=n(s,r,t);o[t]=function(){return e(this,arguments)},attachOriginToPatched(o[t],s),shouldCopySymbolProperties&&copySymbolProperties(s,o[t])}}return s}function patchMacroTask(e,t,n){let o=null;function r(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},o.apply(t.target,t.args),e}o=patchMethod(e,t,e=>(function(t,o){const s=n(t,o);return s.cbIdx>=0&&"function"==typeof o[s.cbIdx]?scheduleMacroTaskWithCurrentZone(s.name,o[s.cbIdx],s,r):e.apply(t,o)}))}function attachOriginToPatched(e,t){e[zoneSymbol("OriginalDelegate")]=t}let isDetectedIEOrEdge=!1,ieOrEdge=!1;function isIE(){try{const e=internalWindow.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}function isIEOrEdge(){if(isDetectedIEOrEdge)return ieOrEdge;isDetectedIEOrEdge=!0;try{const e=internalWindow.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(ieOrEdge=!0)}catch(e){}return ieOrEdge}Zone.__load_patch("toString",e=>{const t=Function.prototype.toString,n=zoneSymbol("OriginalDelegate"),o=zoneSymbol("Promise"),r=zoneSymbol("Error"),s=function(){if("function"==typeof this){const s=this[n];if(s)return"function"==typeof s?t.call(s):Object.prototype.toString.call(s);if(this===Promise){const n=e[o];if(n)return t.call(n)}if(this===Error){const n=e[r];if(n)return t.call(n)}}return t.call(this)};s[n]=t,Function.prototype.toString=s;const i=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":i.call(this)}});let passiveSupported=!1;if("undefined"!=typeof window)try{const e=Object.defineProperty({},"passive",{get:function(){passiveSupported=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){passiveSupported=!1}const OPTIMIZED_ZONE_EVENT_TASK_DATA={useG:!0},zoneSymbolEventNames$1={},globalSources={},EVENT_NAME_SYMBOL_REGX=/^__zone_symbol__(\w+)(true|false)$/,IMMEDIATE_PROPAGATION_SYMBOL="__zone_symbol__propagationStopped";function patchEventTarget(e,t,n){const o=n&&n.add||ADD_EVENT_LISTENER_STR,r=n&&n.rm||REMOVE_EVENT_LISTENER_STR,s=n&&n.listeners||"eventListeners",i=n&&n.rmAll||"removeAllListeners",a=zoneSymbol(o),c="."+o+":",l="prependListener",u="."+l+":",p=function(e,t,n){if(e.isRemoved)return;const o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=(e=>o.handleEvent(e)),e.originalDelegate=o),e.invoke(e,t,[n]);const s=e.options;if(s&&"object"==typeof s&&s.once){const o=e.originalDelegate?e.originalDelegate:e.callback;t[r].call(t,n.type,o,s)}},h=function(t){if(!(t=t||e.event))return;const n=this||t.target||e,o=n[zoneSymbolEventNames$1[t.type][FALSE_STR]];if(o)if(1===o.length)p(o[0],n,t);else{const e=o.slice();for(let o=0;o<e.length&&(!t||!0!==t[IMMEDIATE_PROPAGATION_SYMBOL]);o++)p(e[o],n,t)}},f=function(t){if(!(t=t||e.event))return;const n=this||t.target||e,o=n[zoneSymbolEventNames$1[t.type][TRUE_STR]];if(o)if(1===o.length)p(o[0],n,t);else{const e=o.slice();for(let o=0;o<e.length&&(!t||!0!==t[IMMEDIATE_PROPAGATION_SYMBOL]);o++)p(e[o],n,t)}};function d(t,n){if(!t)return!1;let p=!0;n&&void 0!==n.useG&&(p=n.useG);const d=n&&n.vh;let _=!0;n&&void 0!==n.chkDup&&(_=n.chkDup);let m=!1;n&&void 0!==n.rt&&(m=n.rt);let g=t;for(;g&&!g.hasOwnProperty(o);)g=ObjectGetPrototypeOf(g);if(!g&&t[o]&&(g=t),!g)return!1;if(g[a])return!1;const y=n&&n.eventNameToString,E={},b=g[a]=g[o],T=g[zoneSymbol(r)]=g[r],k=g[zoneSymbol(s)]=g[s],v=g[zoneSymbol(i)]=g[i];let S;function O(e){passiveSupported||"boolean"==typeof E.options||void 0===E.options||null===E.options||(e.options=!!E.options.capture,E.options=e.options)}n&&n.prepend&&(S=g[zoneSymbol(n.prepend)]=g[n.prepend]);const w=function(e){return S.call(E.target,E.eventName,e.invoke,E.options)},P=p?function(e){if(!E.isExisting)return O(e),b.call(E.target,E.eventName,E.capture?f:h,E.options)}:function(e){return O(e),b.call(E.target,E.eventName,e.invoke,E.options)},N=p?function(e){if(!e.isRemoved){const t=zoneSymbolEventNames$1[e.eventName];let n;t&&(n=t[e.capture?TRUE_STR:FALSE_STR]);const o=n&&e.target[n];if(o)for(let t=0;t<o.length;t++)if(o[t]===e){o.splice(t,1),e.isRemoved=!0,0===o.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return T.call(e.target,e.eventName,e.capture?f:h,e.options)}:function(e){return T.call(e.target,e.eventName,e.invoke,e.options)},D=n&&n.diff?n.diff:function(e,t){const n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},z=Zone[Zone.__symbol__("BLACK_LISTED_EVENTS")],Z=function(t,n,o,r,s=!1,i=!1){return function(){const a=this||e,c=arguments[0];let l=arguments[1];if(!l)return t.apply(this,arguments);if(isNode&&"uncaughtException"===c)return t.apply(this,arguments);let u=!1;if("function"!=typeof l){if(!l.handleEvent)return t.apply(this,arguments);u=!0}if(d&&!d(t,l,a,arguments))return;const h=arguments[2];if(z)for(let e=0;e<z.length;e++)if(c===z[e])return t.apply(this,arguments);let f,m=!1;void 0===h?f=!1:!0===h?f=!0:!1===h?f=!1:(f=!!h&&!!h.capture,m=!!h&&!!h.once);const g=Zone.current,b=zoneSymbolEventNames$1[c];let T;if(b)T=b[f?TRUE_STR:FALSE_STR];else{const e=(y?y(c):c)+FALSE_STR,t=(y?y(c):c)+TRUE_STR,n=ZONE_SYMBOL_PREFIX+e,o=ZONE_SYMBOL_PREFIX+t;zoneSymbolEventNames$1[c]={},zoneSymbolEventNames$1[c][FALSE_STR]=n,zoneSymbolEventNames$1[c][TRUE_STR]=o,T=f?o:n}let k,v=a[T],S=!1;if(v){if(S=!0,_)for(let e=0;e<v.length;e++)if(D(v[e],l))return}else v=a[T]=[];const O=a.constructor.name,w=globalSources[O];w&&(k=w[c]),k||(k=O+n+(y?y(c):c)),E.options=h,m&&(E.options.once=!1),E.target=a,E.capture=f,E.eventName=c,E.isExisting=S;const P=p?OPTIMIZED_ZONE_EVENT_TASK_DATA:void 0;P&&(P.taskData=E);const N=g.scheduleEventTask(k,l,P,o,r);return E.target=null,P&&(P.taskData=null),m&&(h.once=!0),(passiveSupported||"boolean"!=typeof N.options)&&(N.options=h),N.target=a,N.capture=f,N.eventName=c,u&&(N.originalDelegate=l),i?v.unshift(N):v.push(N),s?a:void 0}};return g[o]=Z(b,c,P,N,m),S&&(g[l]=Z(S,u,w,N,m,!0)),g[r]=function(){const t=this||e,n=arguments[0],o=arguments[2];let r;r=void 0!==o&&(!0===o||!1!==o&&(!!o&&!!o.capture));const s=arguments[1];if(!s)return T.apply(this,arguments);if(d&&!d(T,s,t,arguments))return;const i=zoneSymbolEventNames$1[n];let a;i&&(a=i[r?TRUE_STR:FALSE_STR]);const c=a&&t[a];if(c)for(let e=0;e<c.length;e++){const n=c[e];if(D(n,s))return c.splice(e,1),n.isRemoved=!0,0===c.length&&(n.allRemoved=!0,t[a]=null),n.zone.cancelTask(n),m?t:void 0}return T.apply(this,arguments)},g[s]=function(){const t=this||e,n=arguments[0],o=[],r=findEventTasks(t,y?y(n):n);for(let e=0;e<r.length;e++){const t=r[e];let n=t.originalDelegate?t.originalDelegate:t.callback;o.push(n)}return o},g[i]=function(){const t=this||e,n=arguments[0];if(n){const e=zoneSymbolEventNames$1[n];if(e){const o=e[FALSE_STR],s=e[TRUE_STR],i=t[o],a=t[s];if(i){const e=i.slice();for(let t=0;t<e.length;t++){const o=e[t];let s=o.originalDelegate?o.originalDelegate:o.callback;this[r].call(this,n,s,o.options)}}if(a){const e=a.slice();for(let t=0;t<e.length;t++){const o=e[t];let s=o.originalDelegate?o.originalDelegate:o.callback;this[r].call(this,n,s,o.options)}}}}else{const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t],o=EVENT_NAME_SYMBOL_REGX.exec(n);let r=o&&o[1];r&&"removeListener"!==r&&this[i].call(this,r)}this[i].call(this,"removeListener")}if(m)return this},attachOriginToPatched(g[o],b),attachOriginToPatched(g[r],T),v&&attachOriginToPatched(g[i],v),k&&attachOriginToPatched(g[s],k),!0}let _=[];for(let e=0;e<t.length;e++)_[e]=d(t[e],n);return _}function findEventTasks(e,t){const n=[];for(let o in e){const r=EVENT_NAME_SYMBOL_REGX.exec(o);let s=r&&r[1];if(s&&(!t||s===t)){const t=e[o];if(t)for(let e=0;e<t.length;e++)n.push(t[e])}}return n}function patchEventPrototype(e,t){const n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",e=>(function(t,n){t[IMMEDIATE_PROPAGATION_SYMBOL]=!0,e&&e.apply(t,n)}))}function patchCallbacks(e,t,n,o,r){const s=Zone.__symbol__(o);if(t[s])return;const i=t[s]=t[o];t[o]=function(s,a,c){return a&&a.prototype&&r.forEach(function(t){const r=`${n}.${o}::`+t,s=a.prototype;if(s.hasOwnProperty(t)){const n=e.ObjectGetOwnPropertyDescriptor(s,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,r),e._redefineProperty(a.prototype,t,n)):s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}else s[t]&&(s[t]=e.wrapWithCurrentZone(s[t],r))}),i.call(t,s,a,c)},e.attachOriginToPatched(t[o],i)}const zoneSymbol$1=Zone.__symbol__,_defineProperty=Object[zoneSymbol$1("defineProperty")]=Object.defineProperty,_getOwnPropertyDescriptor=Object[zoneSymbol$1("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,_create=Object.create,unconfigurablesKey=zoneSymbol$1("unconfigurables");function propertyPatch(){Object.defineProperty=function(e,t,n){if(isUnconfigurable(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);const o=n.configurable;return"prototype"!==t&&(n=rewriteDescriptor(e,t,n)),_tryDefineProperty(e,t,n,o)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach(function(n){t[n]=rewriteDescriptor(e,n,t[n])}),_create(e,t)},Object.getOwnPropertyDescriptor=function(e,t){const n=_getOwnPropertyDescriptor(e,t);return n&&isUnconfigurable(e,t)&&(n.configurable=!1),n}}function _redefineProperty(e,t,n){const o=n.configurable;return _tryDefineProperty(e,t,n=rewriteDescriptor(e,t,n),o)}function isUnconfigurable(e,t){return e&&e[unconfigurablesKey]&&e[unconfigurablesKey][t]}function rewriteDescriptor(e,t,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(e[unconfigurablesKey]||Object.isFrozen(e)||_defineProperty(e,unconfigurablesKey,{writable:!0,value:{}}),e[unconfigurablesKey]&&(e[unconfigurablesKey][t]=!0)),n}function _tryDefineProperty(e,t,n,o){try{return _defineProperty(e,t,n)}catch(r){if(!n.configurable)throw r;void 0===o?delete n.configurable:n.configurable=o;try{return _defineProperty(e,t,n)}catch(o){let r=null;try{r=JSON.stringify(n)}catch(e){r=n.toString()}console.log(`Attempting to configure '${t}' with descriptor '${r}' on object '${e}' and got error, giving up: ${o}`)}}}const globalEventHandlersEventNames=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"],documentEventNames=["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],windowEventNames=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplyconnected","vrdisplaydisconnected","vrdisplaypresentchange"],htmlElementEventNames=["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],mediaElementEventNames=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],ieElementEventNames=["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"],webglEventNames=["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],formEventNames=["autocomplete","autocompleteerror"],detailEventNames=["toggle"],frameEventNames=["load"],frameSetEventNames=["blur","error","focus","load","resize","scroll","messageerror"],marqueeEventNames=["bounce","finish","start"],XMLHttpRequestEventNames=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],IDBIndexEventNames=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],websocketEventNames=["close","error","open","message"],workerEventNames=["error","message"],eventNames=globalEventHandlersEventNames.concat(webglEventNames,formEventNames,detailEventNames,documentEventNames,windowEventNames,htmlElementEventNames,ieElementEventNames);function filterProperties(e,t,n){if(!n||0===n.length)return t;const o=n.filter(t=>t.target===e);if(!o||0===o.length)return t;const r=o[0].ignoreProperties;return t.filter(e=>-1===r.indexOf(e))}function patchFilteredProperties(e,t,n,o){if(!e)return;patchOnProperties(e,filterProperties(e,t,n),o)}function propertyDescriptorPatch(e,t){if(isNode&&!isMix)return;if(Zone[e.symbol("patchEvents")])return;const n="undefined"!=typeof WebSocket,o=t.__Zone_ignore_on_properties;if(isBrowser){const e=window,t=isIE?[{target:e,ignoreProperties:["error"]}]:[];patchFilteredProperties(e,eventNames.concat(["messageerror"]),o?o.concat(t):o,ObjectGetPrototypeOf(e)),patchFilteredProperties(Document.prototype,eventNames,o),void 0!==e.SVGElement&&patchFilteredProperties(e.SVGElement.prototype,eventNames,o),patchFilteredProperties(Element.prototype,eventNames,o),patchFilteredProperties(HTMLElement.prototype,eventNames,o),patchFilteredProperties(HTMLMediaElement.prototype,mediaElementEventNames,o),patchFilteredProperties(HTMLFrameSetElement.prototype,windowEventNames.concat(frameSetEventNames),o),patchFilteredProperties(HTMLBodyElement.prototype,windowEventNames.concat(frameSetEventNames),o),patchFilteredProperties(HTMLFrameElement.prototype,frameEventNames,o),patchFilteredProperties(HTMLIFrameElement.prototype,frameEventNames,o);const n=e.HTMLMarqueeElement;n&&patchFilteredProperties(n.prototype,marqueeEventNames,o);const r=e.Worker;r&&patchFilteredProperties(r.prototype,workerEventNames,o)}const r=t.XMLHttpRequest;r&&patchFilteredProperties(r.prototype,XMLHttpRequestEventNames,o);const s=t.XMLHttpRequestEventTarget;s&&patchFilteredProperties(s&&s.prototype,XMLHttpRequestEventNames,o),"undefined"!=typeof IDBIndex&&(patchFilteredProperties(IDBIndex.prototype,IDBIndexEventNames,o),patchFilteredProperties(IDBRequest.prototype,IDBIndexEventNames,o),patchFilteredProperties(IDBOpenDBRequest.prototype,IDBIndexEventNames,o),patchFilteredProperties(IDBDatabase.prototype,IDBIndexEventNames,o),patchFilteredProperties(IDBTransaction.prototype,IDBIndexEventNames,o),patchFilteredProperties(IDBCursor.prototype,IDBIndexEventNames,o)),n&&patchFilteredProperties(WebSocket.prototype,websocketEventNames,o)}Zone.__load_patch("util",(e,t,n)=>{n.patchOnProperties=patchOnProperties,n.patchMethod=patchMethod,n.bindArguments=bindArguments,n.patchMacroTask=patchMacroTask;const o=t.__symbol__("BLACK_LISTED_EVENTS"),r=t.__symbol__("UNPATCHED_EVENTS");e[r]&&(e[o]=e[r]),e[o]&&(t[o]=t[r]=e[o]),n.patchEventPrototype=patchEventPrototype,n.patchEventTarget=patchEventTarget,n.isIEOrEdge=isIEOrEdge,n.ObjectDefineProperty=ObjectDefineProperty,n.ObjectGetOwnPropertyDescriptor=ObjectGetOwnPropertyDescriptor,n.ObjectCreate=ObjectCreate,n.ArraySlice=ArraySlice,n.patchClass=patchClass,n.wrapWithCurrentZone=wrapWithCurrentZone,n.filterProperties=filterProperties,n.attachOriginToPatched=attachOriginToPatched,n._redefineProperty=_redefineProperty,n.patchCallbacks=patchCallbacks,n.getGlobalObjects=(()=>({globalSources,zoneSymbolEventNames:zoneSymbolEventNames$1,eventNames,isBrowser,isMix,isNode,TRUE_STR,FALSE_STR,ZONE_SYMBOL_PREFIX,ADD_EVENT_LISTENER_STR,REMOVE_EVENT_LISTENER_STR}))});const taskSymbol=zoneSymbol("zoneTask");function patchTimer(e,t,n,o){let r=null,s=null;n+=o;const i={};function a(t){const n=t.data;return n.args[0]=function(){try{t.invoke.apply(this,arguments)}finally{t.data&&t.data.isPeriodic||("number"==typeof n.handleId?delete i[n.handleId]:n.handleId&&(n.handleId[taskSymbol]=null))}},n.handleId=r.apply(e,n.args),t}function c(e){return s(e.data.handleId)}r=patchMethod(e,t+=o,n=>(function(r,s){if("function"==typeof s[0]){const e={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?s[1]||0:void 0,args:s},n=scheduleMacroTaskWithCurrentZone(t,s[0],e,a,c);if(!n)return n;const r=n.data.handleId;return"number"==typeof r?i[r]=n:r&&(r[taskSymbol]=n),r&&r.ref&&r.unref&&"function"==typeof r.ref&&"function"==typeof r.unref&&(n.ref=r.ref.bind(r),n.unref=r.unref.bind(r)),"number"==typeof r||r?r:n}return n.apply(e,s)})),s=patchMethod(e,n,t=>(function(n,o){const r=o[0];let s;"number"==typeof r?s=i[r]:(s=r&&r[taskSymbol])||(s=r),s&&"string"==typeof s.type?"notScheduled"!==s.state&&(s.cancelFn&&s.data.isPeriodic||0===s.runCount)&&("number"==typeof r?delete i[r]:r&&(r[taskSymbol]=null),s.zone.cancelTask(s)):t.apply(e,o)}))}function patchCustomElements(e,t){const{isBrowser:n,isMix:o}=t.getGlobalObjects();if(!((n||o)&&e.customElements&&"customElements"in e))return;t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}function eventTargetPatch(e,t){if(Zone[t.symbol("patchEventTarget")])return;const{eventNames:n,zoneSymbolEventNames:o,TRUE_STR:r,FALSE_STR:s,ZONE_SYMBOL_PREFIX:i}=t.getGlobalObjects();for(let e=0;e<n.length;e++){const t=n[e],a=i+(t+s),c=i+(t+r);o[t]={},o[t][s]=a,o[t][r]=c}const a=e.EventTarget;return a&&a.prototype?(t.patchEventTarget(e,[a&&a.prototype]),!0):void 0}function patchEvent(e,t){t.patchEventPrototype(e,t)}Zone.__load_patch("legacy",e=>{const t=e[Zone.__symbol__("legacyPatch")];t&&t()}),Zone.__load_patch("timers",e=>{patchTimer(e,"set","clear","Timeout"),patchTimer(e,"set","clear","Interval"),patchTimer(e,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",e=>{patchTimer(e,"request","cancel","AnimationFrame"),patchTimer(e,"mozRequest","mozCancel","AnimationFrame"),patchTimer(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(e,t)=>{const n=["alert","prompt","confirm"];for(let o=0;o<n.length;o++){patchMethod(e,n[o],(n,o,r)=>(function(o,s){return t.current.run(n,e,s,r)}))}}),Zone.__load_patch("EventTarget",(e,t,n)=>{patchEvent(e,n),eventTargetPatch(e,n);const o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,[o.prototype]),patchClass("MutationObserver"),patchClass("WebKitMutationObserver"),patchClass("IntersectionObserver"),patchClass("FileReader")}),Zone.__load_patch("on_property",(e,t,n)=>{propertyDescriptorPatch(n,e),propertyPatch()}),Zone.__load_patch("customElements",(e,t,n)=>{patchCustomElements(e,n)}),Zone.__load_patch("XHR",(e,t)=>{!function(e){const c=e.XMLHttpRequest;if(!c)return;const l=c.prototype;let u=l[ZONE_SYMBOL_ADD_EVENT_LISTENER],p=l[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];if(!u){const t=e.XMLHttpRequestEventTarget;if(t){const e=t.prototype;u=e[ZONE_SYMBOL_ADD_EVENT_LISTENER],p=e[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]}}const h="readystatechange",f="scheduled";function d(e){const t=e.data,o=t.target;o[s]=!1,o[a]=!1;const i=o[r];u||(u=o[ZONE_SYMBOL_ADD_EVENT_LISTENER],p=o[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]),i&&p.call(o,h,i);const c=o[r]=(()=>{if(o.readyState===o.DONE)if(!t.aborted&&o[s]&&e.state===f){const n=o.__zone_symbol__loadfalse;if(n&&n.length>0){const r=e.invoke;e.invoke=function(){const n=o.__zone_symbol__loadfalse;for(let t=0;t<n.length;t++)n[t]===e&&n.splice(t,1);t.aborted||e.state!==f||r.call(e)},n.push(e)}else e.invoke()}else t.aborted||!1!==o[s]||(o[a]=!0)});u.call(o,h,c);const l=o[n];return l||(o[n]=e),b.apply(o,t.args),o[s]=!0,e}function _(){}function m(e){const t=e.data;return t.aborted=!0,T.apply(t.target,t.args)}const g=patchMethod(l,"open",()=>(function(e,t){return e[o]=0==t[2],e[i]=t[1],g.apply(e,t)})),y=zoneSymbol("fetchTaskAborting"),E=zoneSymbol("fetchTaskScheduling"),b=patchMethod(l,"send",()=>(function(e,n){if(!0===t.current[E])return b.apply(e,n);if(e[o])return b.apply(e,n);{const t={target:e,url:e[i],isPeriodic:!1,args:n,aborted:!1},o=scheduleMacroTaskWithCurrentZone("XMLHttpRequest.send",_,t,d,m);e&&!0===e[a]&&!t.aborted&&o.state===f&&o.invoke()}})),T=patchMethod(l,"abort",()=>(function(e,o){const r=e[n];if(r&&"string"==typeof r.type){if(null==r.cancelFn||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(!0===t.current[y])return T.apply(e,o)}))}(e);const n=zoneSymbol("xhrTask"),o=zoneSymbol("xhrSync"),r=zoneSymbol("xhrListener"),s=zoneSymbol("xhrScheduled"),i=zoneSymbol("xhrURL"),a=zoneSymbol("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",e=>{e.navigator&&e.navigator.geolocation&&patchPrototype(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(e,t)=>{function n(t){return function(n){findEventTasks(e,t).forEach(o=>{const r=e.PromiseRejectionEvent;if(r){const e=new r(t,{promise:n.promise,reason:n.rejection});o.invoke(e)}})}}e.PromiseRejectionEvent&&(t[zoneSymbol("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[zoneSymbol("rejectionHandledHandler")]=n("rejectionhandled"))});