Bones/node_modules/zone.js/dist/zone.min.js

1 line
19 KiB
JavaScript
Raw Normal View History

2017-05-17 13:45:25 -04:00
!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,exports,t){(function(e){"use strict";function n(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 c(e.data.handleId)}t+=r,n+=r;var i=s.patchMethod(e,t,function(n){return function(i,s){if("function"==typeof s[0]){var c=Zone.current,u={handleId:null,isPeriodic:"Interval"==r,delay:"Timeout"==r||"Interval"==r?s[1]||0:null,args:s};return c.scheduleMacroTask(t,s[0],u,o,a)}return n.apply(e,s)}}),c=s.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)}})}t(1);var r=t(2),o=t(4),a=t(5),i=t(6),s=t(3),c="set",u="clear",l=["alert","prompt","confirm"],p="undefined"==typeof window?e:window;n(p,c,u,"Timeout"),n(p,c,u,"Interval"),n(p,c,u,"Immediate"),n(p,"request","cancelMacroTask","AnimationFrame"),n(p,"mozRequest","mozCancel","AnimationFrame"),n(p,"webkitRequest","webkitCancel","AnimationFrame");for(var h=0;h<l.length;h++){var f=l[h];s.patchMethod(p,f,function(e,t,n){return function(t,r){return Zone.current.run(e,p,r,n)}})}r.eventTargetPatch(p),i.propertyDescriptorPatch(p),s.patchClass("MutationObserver"),s.patchClass("WebKitMutationObserver"),s.patchClass("FileReader"),o.propertyPatch(),a.registerElementPatch(p),p.navigator&&p.navigator.geolocation&&s.patchPrototype(p.navigator.geolocation,["getCurrentPosition","watchPosition"])}).call(exports,function(){return this}())},function(e,exports){(function(e){(function(e){function t(e){return"__zone_symbol__"+e}function n(){D||T||0!=b.length||(e[y]?e[y].resolve(0)[g](a):e[k](a,0))}function r(e){n(),b.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;b.length;){var e=b;b=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(r){o(r)}}}for(;w.length;){var a=w;w=[];for(var t=0;t<a.length;t++){var i=a[t];try{i.zone.runGuarded(function(){throw i})}catch(r){o(r)}}}_=!1,D=!1}}function i(e){return e&&e.then}function s(e){return e}function c(e){return I.reject(e)}function u(e,t){return function(n){l(e,t,n)}}function l(e,t,r){if(e[S]===O)if(r instanceof I&&r[S]!==O)p(r),l(e,r[S],r[E]);else if(i(r))r.then(u(e,t),u(e,!1));else{e[S]=t;var o=e[E];e[E]=r;for(var a=0;a<o.length;)h(e,o[a++],o[a++],o[a++],o[a++]);if(0==o.length&&t==Z){e[S]=C;try{throw new Error("Uncaught (in promise): "+r)}catch(s){var c=s;c.rejection=r,c.promise=e,c.zone=f.current,c.task=f.currentTask,w.push(c),n()}}}return e}function p(e){if(e[S]===C){e[S]=Z;for(var t=0;t<w.length;t++)if(e===w[t].promise){w.splice(t,1);break}}}function h(e,t,n,r,o){p(e);var a=e[S]?r||s:o||c;t.scheduleMicroTask(P,function(){try{l(n,!0,t.run(a,null,[e[E]]))}catch(r){l(n,!1,r)}})}var f=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 T},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(){re