1 line
26 KiB
JavaScript
1 line
26 KiB
JavaScript
|
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){(function(e){"use strict";function t(e,t,n,r){function o(t){var n=t.data;return n.args[0]=t.invoke,n.handleId=i.apply(e,n.args),t}function a(e){return u(e.data.handleId)}t+=r,n+=r;var i=c.patchMethod(e,t,function(n){return function(i,c){if("function"==typeof c[0]){var u=Zone.current,s={handleId:null,isPeriodic:"Interval"==r,delay:"Timeout"==r||"Interval"==r?c[1]||0:null,args:c};return u.scheduleMacroTask(t,c[0],s,o,a)}return n.apply(e,c)}}),u=c.patchMethod(e,n,function(t){return function(n,r){var o=r[0];o&&"string"==typeof o.type?o.cancelFn&&o.zone.cancelTask(o):t.apply(e,r)}})}n(1);var r=n(2),o=n(4),a=n(5),i=n(6),c=n(3),u="set",s="clear",l=["alert","prompt","confirm"],f="undefined"==typeof window?e:window;t(f,u,s,"Timeout"),t(f,u,s,"Interval"),t(f,u,s,"Immediate"),t(f,"request","cancelMacroTask","AnimationFrame"),t(f,"mozRequest","mozCancel","AnimationFrame"),t(f,"webkitRequest","webkitCancel","AnimationFrame");for(var p=0;p<l.length;p++){var h=l[p];c.patchMethod(f,h,function(e,t,n){return function(t,r){return Zone.current.run(e,f,r,n)}})}r.eventTargetPatch(f),i.propertyDescriptorPatch(f),c.patchClass("MutationObserver"),c.patchClass("WebKitMutationObserver"),c.patchClass("FileReader"),o.propertyPatch(),a.registerElementPatch(f),f.navigator&&f.navigator.geolocation&&c.patchPrototype(f.navigator.geolocation,["getCurrentPosition","watchPosition"])}).call(t,function(){return this}())},function(e,t){(function(e){(function(e){function t(e){return"__zone_symbol__"+e}function n(){E||w||0!=T.length||(e[g]?e[g].resolve(0)[k](a):e[y](a,0))}function r(e){n(),T.push(e)}function o(e){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),console.error(e)}function a(){if(!_){for(_=!0;T.length;){var e=T;T=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(r){o(r)}}}for(;b.length;){var a=b;b=[];for(var t=0;t<a.length;t++){var i=a[t];try{i.zone.runGuarded(function(){throw i})}catch(r){o(r)}}}_=!1,E=!1}}function i(e){return e&&e.then}function c(e){return e}function u(e){return Z.reject(e)}function s(e,t){return function(n){l(e,t,n)}}function l(e,t,r){if(e[S]===P)if(r instanceof Z&&r[S]!==P)f(r),l(e,r[S],r[O]);else if(i(r))r.then(s(e,t),s(e,!1));else{e[S]=t;var o=e[O];e[O]=r;for(var a=0;a<o.length;)p(e,o[a++],o[a++],o[a++],o[a++]);if(0==o.length&&t==j){e[S]=M;try{throw new Error("Uncaught (in promise): "+r)}catch(c){var u=c;u.rejection=r,u.promise=e,u.zone=h.current,u.task=h.currentTask,b.push(u),n()}}}return e}function f(e){if(e[S]===M){e[S]=j;for(var t=0;t<b.length;t++)if(e===b[t].promise){b.splice(t,1);break}}}function p(e,t,n,r,o){f(e);var a=e[S]?r||c:o||u;t.scheduleMicroTask(D,function(){try{l(n,!0,t.run(a,null,[e[O]]))}catch(r){l(n,!1,r)}})}var h=function(){function e(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new d(this,this._parent&&this._parent._zoneDelegate,t)}return Object.defineProperty(e,"current",{get:function(){return m},enumerable:!0,configurable:!0}),Object.defineProperty(e,"currentTask",{get:function(){return w},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),e.prototype.get=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t._properties[e];t=t._parent}},e.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},e.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var e=this._zoneDelegate.intercept(this,e,t),n=this;return function(){return n.runGuarded(
|