mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-18 01:34:50 +02:00
1 line
37 KiB
JavaScript
1 line
37 KiB
JavaScript
|
(self.webpackChunkgns3_web_ui=self.webpackChunkgns3_web_ui||[]).push([[429],{3443:function(G,de,oe){"use strict";oe(8583)},8583:function(G,de,oe){"use strict";var U=oe(3269).default,ne=oe(4575).default,L=oe(3913).default;!function(r){var t=r.performance;function a(y){t&&t.mark&&t.mark(y)}function o(y,h){t&&t.measure&&t.measure(y,h)}a("Zone");var i=r.__Zone_symbol_prefix||"__zone_symbol__";function s(y){return i+y}var l=!0===r[s("forceDuplicateZoneCheck")];if(r.Zone){if(l||"function"!=typeof r.Zone.__symbol__)throw new Error("Zone already loaded.");return r.Zone}var T=function(){function y(h,e){ne(this,y),this._parent=h,this._name=e?e.name||"unnamed":"<root>",this._properties=e&&e.properties||{},this._zoneDelegate=new P(this,this._parent&&this._parent._zoneDelegate,e)}return L(y,[{key:"parent",get:function(){return this._parent}},{key:"name",get:function(){return this._name}},{key:"get",value:function(e){var n=this.getZoneWith(e);if(n)return n._properties[e]}},{key:"getZoneWith",value:function(e){for(var n=this;n;){if(n._properties.hasOwnProperty(e))return n;n=n._parent}return null}},{key:"fork",value:function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}},{key:"wrap",value:function(e,n){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var f=this._zoneDelegate.intercept(this,e,n),w=this;return function(){return w.runGuarded(f,this,arguments,n)}}},{key:"run",value:function(e,n,f,w){Y={parent:Y,zone:this};try{return this._zoneDelegate.invoke(this,e,n,f,w)}finally{Y=Y.parent}}},{key:"runGuarded",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,f=arguments.length>2?arguments[2]:void 0,w=arguments.length>3?arguments[3]:void 0;Y={parent:Y,zone:this};try{try{return this._zoneDelegate.invoke(this,e,n,f,w)}catch(Q){if(this._zoneDelegate.handleError(this,Q))throw Q}}finally{Y=Y.parent}}},{key:"runTask",value:function(e,n,f){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||d).name+"; Execution: "+this.name+")");if(e.state!==z||e.type!==N&&e.type!==O){var w=e.state!=W;w&&e._transitionTo(W,X),e.runCount++;var Q=_e;_e=e,Y={parent:Y,zone:this};try{e.type==O&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,n,f)}catch(c){if(this._zoneDelegate.handleError(this,c))throw c}}finally{e.state!==z&&e.state!==te&&(e.type==N||e.data&&e.data.isPeriodic?w&&e._transitionTo(X,W):(e.runCount=0,this._updateTaskCount(e,-1),w&&e._transitionTo(z,W,z))),Y=Y.parent,_e=Q}}}},{key:"scheduleTask",value:function(e){if(e.zone&&e.zone!==this)for(var n=this;n;){if(n===e.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(e.zone.name));n=n.parent}e._transitionTo(re,z);var f=[];e._zoneDelegates=f,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(w){throw e._transitionTo(te,re,z),this._zoneDelegate.handleError(this,w),w}return e._zoneDelegates===f&&this._updateTaskCount(e,1),e.state==re&&e._transitionTo(X,re),e}},{key:"scheduleMicroTask",value:function(e,n,f,w){return this.scheduleTask(new g(I,e,n,f,w,void 0))}},{key:"scheduleMacroTask",value:function(e,n,f,w,Q){return this.scheduleTask(new g(O,e,n,f,w,Q))}},{key:"scheduleEventTask",value:function(e,n,f,w,Q){return this.scheduleTask(new g(N,e,n,f,w,Q))}},{key:"cancelTask",value:function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||d).name+"; Execution: "+this.name+")");e._transitionTo(m,X,W);try{this._zoneDelegate.cancelTask(this,e)}catch(n){throw e._transitionTo(te,m),this._zoneDelegate.handleError(this,n),n}return this._updateTaskCount(e,-1),e._transitionTo(z,m),e.runCount=0,e}},{key:"_updateTaskCount",value:function(e,n){var f=e._zoneDelegates;-1==n&&(e._zoneDelegates=null);for(var w=0;w<f.length;w++)f[w]._updateTaskCount(e.type,n)}}],[{key:"assertZonePatched",value:function(){if(r.Promise!==Z.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(wi
|