Kargi-Sitesi/node_modules/zone.js/fesm2015/zone.min.js

6 lines
38 KiB
JavaScript
Raw Normal View History

2024-11-04 02:30:09 +00:00
"use strict";
/**
* @license Angular v<unknown>
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/const global=globalThis;function __symbol__(e){return(global.__Zone_symbol_prefix||"__zone_symbol__")+e}function initZone(){const e=global.performance;function t(t){e&&e.mark&&e.mark(t)}function n(t,n){e&&e.measure&&e.measure(t,n)}t("Zone");class o{static{this.__symbol__=__symbol__}static assertZonePatched(){if(global.Promise!==w.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=o.current;for(;e.parent;)e=e.parent;return e}static get current(){return D.zone}static get currentTask(){return N}static __load_patch(e,r,s=!1){if(w.hasOwnProperty(e)){const t=!0===global[__symbol__("forceDuplicateZoneCheck")];if(!s&&t)throw Error("Already loaded patch: "+e)}else if(!global["__Zone_disable_"+e]){const s="Zone:"+e;t(s),w[e]=r(global,o,P),n(s,s)}}get parent(){return this._parent}get name(){return this._name}constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new s(this,this._parent&&this._parent._zoneDelegate,t)}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||E).name+"; Execution: "+this.name+")");const o=e,{type:r,data:{isPeriodic:s=!1,isRefreshable:a=!1}={}}=e;if(e.state===g&&(r===O||r===v))return;const i=e.state!=m;i&&o._transitionTo(m,y);const c=N;N=o,D={parent:D,zone:this};try{r!=v||!e.data||s||a||(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,o,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{const t=e.state;if(t!==g&&t!==k)if(r==O||s||a&&t===T)i&&o._transitionTo(y,m,T);else{const e=o._zoneDelegates;this._updateTaskCount(o,-1),i&&o._transitionTo(g,m,g),a&&(o._zoneDelegates=e)}D=D.parent,N=c}}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(T,g);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(k,T,g),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==T&&e._transitionTo(y,T),e}scheduleMicroTask(e,t,n,o){return this.scheduleTask(new a(S,e,t,n,o,void 0))}scheduleMacroTask(e,t,n,o,r){return this.scheduleTask(new a(v,e,t,n,o,r))}scheduleEventTask(e,t,n,o,r){return this.scheduleTask(new a(O,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||E).name+"; Execution: "+this.name+")");if(e.state===y||e.state===m){e._transitionTo(b,y,m);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(k,b),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(g,b),e.runCount=-1,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)}}const r={name:"",onHasTask:(e,t,n,o)=>e.hasTask(n,o),onScheduleTask:(e,t,n,o)=>e.scheduleTask(n,o),onInvo