PageSourceSearch

https://fictionme.net/n_assets/BYjaEFv5.js

js fictionme.net collected 2026-10-02 05:31:52 UTC 2,536 bytes, 1 lines download raw bytes

1import{bv as F,bw as z,bx as A}from"#entry";var C=10240,D=["image/","audio/","video/","application/octet-stream","font/"];function q(e){return e?D.some(function(n){return e.toLowerCase().startsWith(n)}):!1}function N(e){if(e!=null){if(typeof e=="string")return e;if(e instanceof URLSearchParams)return e.toString();if(e instanceof FormData){var n=[];return e.forEach(function(t,i){n.push("".concat(i,"=").concat(typeof t=="string"?t:"[File]"))}),n.join("&")}}}function k(e,n){if(new Blob([e]).size<=n)return{value:e,truncated:!1};for(var t=0,i=Math.min(e.length,n);t<i;){var s=Math.ceil((t+i)/2);new Blob([e.slice(0,s)]).size<=n?t=s:i=s-1}return t>0&&e.charCodeAt(t-1)>=55296&&e.charCodeAt(t-1)<=56319&&(t-=1),{value:e.slice(0,t),truncated:!0}}var R=(function(){function e(){this.fetchObserver=null}return e.prototype.start=function(n,t){this.eventCallback=n,this.networkConfig=t,this.observeFetch()},e.prototype.stop=function(){var n;(n=this.fetchObserver)===null||n===void 0||n.call(this),this.fetchObserver=null,this.eventCallback=void 0,this.networkConfig=void 0},e.prototype.notifyEvent=function(n){var t;(t=this.eventCallback)===null||t===void 0||t.call(this,n)},e.prototype.observeFetch=function(){var n=this,t=F();if(t){var i=t.fetch;i&&(t.fetch=function(s,o){return z(n,void 0,void 0,function(){var d,r,a,h,w,u,l,v,B,_,p,l,y,g=this,b,m;return A(this,function(f){switch(f.label){case 0:d=Date.now(),r={timestamp:d,type:"fetch",method:o?.method||"GET",url:s.toString(),requestHeaders:o?.headers},a=(b=this.networkConfig)===null||b===void 0?void 0:b.body,a?.request&&(h=N(o?.body),h!==void 0&&(w=(m=a.maxBodySizeBytes)!==null&&m!==void 0?m:C,r.requestBody=k(h,w).value)),f.label=1;case 1:return f.trys.push([1,3,,4]),[4,i(s,o)];case 2:return u=f.sent(),l=Date.now(),r.status=u.status,r.duration=l-d,v={},u.headers.forEach(function(E,c){v[c]=E}),r.responseHeaders=v,a?.response?(B=v["content-type"]||null,q(B)?(r.responseBodyStatus="skipped_binary",this.notifyEvent(r)):(_=u.clone(),_.text().then(function(E){var c,T=(c=a.maxBodySizeBytes)!==null&&c!==void 0?c:C,S=k(E,T),O=S.value,x=S.truncated;r.responseBody=O,r.responseBodyStatus=x?"truncated":"captured",g.notifyEvent(r)},function(){r.responseBodyStatus="error",g.notifyEvent(r)}))):this.notifyEvent(r),[2,u];case 3:throw p=f.sent(),l=Date.now(),r.duration=l-d,y=p,r.error={name:y.name||"UnknownError",message:y.message||"An unknown error occurred"},this.notifyEvent(r),p;case 4:return[2]}})})},this.fetchObserver=function(){t.fetch=i})}},e})();export{R as NetworkObservers};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.