Icard/angular-clarity-master(work.../node_modules/zone.js/bundles/zone-testing.umd.min.js

7 lines
34 KiB
JavaScript
Raw Normal View History

2024-07-16 15:23:22 +00:00
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};
/**
* @license Angular v<unknown>
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){var e="\n",t={},n="__creationTrace__",r="STACKTRACE TRACKING",i="__SEP_TAG__",s=i+"@[native]",o=function o(){this.error=h(),this.timestamp=new Date};function a(){return new Error(r)}function c(){try{throw a()}catch(e){return e}}var u=a(),l=c(),h=u.stack?a:l.stack?c:a;function p(t){return t.stack?t.stack.split(e):[]}function f(e,n){for(var r=p(n),i=0;i<r.length;i++)t.hasOwnProperty(r[i])||e.push(r[i])}function d(t,n){var r=[n?n.trim():""];if(t)for(var o=(new Date).getTime(),a=0;a<t.length;a++){var c=t[a],u=c.timestamp,l="____________________Elapsed ".concat(o-u.getTime()," ms; At: ").concat(u);l=l.replace(/[^\w\d]/g,"_"),r.push(s.replace(i,l)),f(r,c.error),o=u.getTime()}return r.join(e)}function y(){return Error.stackTraceLimit>0}function m(e,t){t>0&&(e.push(p((new o).error)),m(e,t-1))}Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(e){if(e){var t=e[Zone.__symbol__("currentTaskTrace")];return t?d(t,e.stack):e.stack}},onScheduleTask:function(e,t,r,i){if(y()){var s=Zone.currentTask,a=s&&s.data&&s.data[n]||[];(a=[new o].concat(a)).length>this.longStackTraceLimit&&(a.length=this.longStackTraceLimit),i.data||(i.data={}),"eventTask"===i.type&&(i.data=__assign({},i.data)),i.data[n]=a}return e.scheduleTask(r,i)},onHandleError:function(e,t,r,i){if(y()){var s=Zone.currentTask||i.task;if(i instanceof Error&&s){var o=d(s.data&&s.data[n],i.stack);try{i.stack=i.longStack=o}catch(e){}}}return e.handleError(r,i)}},function T(){if(y()){var e=[];m(e,2);for(var n=e[0],o=e[1],a=0;a<n.length;a++)if(-1==(u=n[a]).indexOf(r)){var c=u.match(/^\s*at\s+/);if(c){s=c[0]+i+" (http://localhost)";break}}for(a=0;a<n.length;a++){var u;if((u=n[a])!==o[a])break;t[u]=!0}}}();var _=function(){function e(e){void 0===e&&(e=null),this.defaultSpecDelegate=e,this.name="ProxyZone",this._delegateSpec=null,this.properties={ProxyZoneSpec:this},this.propertyKeys=null,this.lastTaskState=null,this.isNeedToTriggerHasTask=!1,this.tasks=[],this.setDelegate(e)}return e.get=function(){return Zone.current.get("ProxyZoneSpec")},e.isLoaded=function(){return e.get()instanceof e},e.assertPresent=function(){if(!e.isLoaded())throw new Error("Expected to be running in 'ProxyZone', but it was not found.");return e.get()},e.prototype.setDelegate=function(e){var t=this,n=this._delegateSpec!==e;this._delegateSpec=e,this.propertyKeys&&this.propertyKeys.forEach((function(e){return delete t.properties[e]})),this.propertyKeys=null,e&&e.properties&&(this.propertyKeys=Object.keys(e.properties),this.propertyKeys.forEach((function(n){return t.properties[n]=e.properties[n]}))),n&&this.lastTaskState&&(this.lastTaskState.macroTask||this.lastTaskState.microTask)&&(this.isNeedToTriggerHasTask=!0)},e.prototype.getDelegate=function(){return this._delegateSpec},e.prototype.resetDelegate=function(){this.getDelegate(),this.setDelegate(this.defaultSpecDelegate)},e.prototype.tryTriggerHasTask=function(e,t,n){this.isNeedToTriggerHasTask&&this.lastTaskState&&(this.isNeedToTriggerHasTask=!1,this.onHasTask(e,t,n,this.lastTaskState))},e.prototype.removeFromTasks=function(e){if(this.tasks)for(var t=0;t<this.tasks.length;t++)if(this.tasks[t]===e)return void this.tasks.splice(t,1)},e.prototype.getAndClearPendingTasksInfo=function(){if(0===this.tasks.length)return"";var e="--Pending async tasks are: ["+this.tasks.map((function(e){var t=e.data&&Object.keys(e.data).map((function(t){return t+":"+e.data[t]})).join(",");return"type: ".concat(e.type,", source: ").concat(e.source,", args: {").concat(t,"}")}))+"]";return this.tasks=[],e},e.prototype.onFork=function(e,t,n,r){return this._delegateSpec&&this._delegateSpec.onFork?this._delegateSpec.onFork(e,t,n,r):e.fork(n,r)},e.prototype.onIntercept=function(e,t,n,r,i){return this._delegateSpec&&this._delegateSpec.onIntercept?this._delegateSpec.onIntercept(e,t,n,r,i):e.intercept(n,r,i)},e.prototype.onInvoke=function(e,t,n,r,i,s,o){return this.tryTriggerHasTask(e,t,n),this._delegateSpec&&this._delegateSpec.onInvoke?this._delegateSpec.onInvoke(e,t