(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,46863,t=>{"use strict";var e=t.i(24627),r=t.i(94823),n=function(){function t(){this.fetchObserver=null}return t.prototype.start=function(t){this.eventCallback=t,this.observeFetch()},t.prototype.stop=function(){var t;null==(t=this.fetchObserver)||t.call(this),this.fetchObserver=null,this.eventCallback=void 0},t.prototype.notifyEvent=function(t){var e;null==(e=this.eventCallback)||e.call(this,t)},t.prototype.observeFetch=function(){var t=this,n=(0,r.getGlobalScope)();if(n){var o=n.fetch;o&&(n.fetch=function(r,n){return(0,e.__awaiter)(t,void 0,void 0,function(){var t,s,i,a,c,u,h;return(0,e.__generator)(this,function(e){switch(e.label){case 0:s={timestamp:t=Date.now(),type:"fetch",method:(null==n?void 0:n.method)||"GET",url:r.toString(),requestHeaders:null==n?void 0:n.headers},e.label=1;case 1:return e.trys.push([1,3,,4]),[4,o(r,n)];case 2:return i=e.sent(),a=Date.now(),s.status=i.status,s.duration=a-t,c={},i.headers.forEach(function(t,e){c[e]=t}),s.responseHeaders=c,this.notifyEvent(s),[2,i];case 3:throw u=e.sent(),a=Date.now(),s.duration=a-t,h=u,s.error={name:h.name||"UnknownError",message:h.message||"An unknown error occurred"},this.notifyEvent(s),u;case 4:return[2]}})})},this.fetchObserver=function(){n.fetch=o})}},t}();t.s(["NetworkObservers",()=>n])}]);