module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},22734,(a,b,c)=>{b.exports=a.x("fs",()=>require("fs"))},85790,a=>{a.n(a.i(29775))},81419,a=>{a.n(a.i(48983))},10063,a=>{a.n(a.i(119))},97432,a=>{a.n(a.i(86655))},42265,a=>{a.n(a.i(10243))},13381,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(71447).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/mcp-server/app/logs/LogsClient.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/mcp-server/app/logs/LogsClient.tsx <module evaluation>","default")},87872,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(71447).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/mcp-server/app/logs/LogsClient.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/mcp-server/app/logs/LogsClient.tsx","default")},81453,a=>{"use strict";a.i(13381);var b=a.i(87872);a.n(b)},99275,a=>{"use strict";var b=a.i(27702);function c(a){let b=a.match(/^(.+?)-(\d{4}-\d{2}-\d{2}T[\d-]+Z)\.log$/);return b?b[1]:null}function d(a,b){let d=c(a);return!!d&&d.includes(b)}var e=a.i(22734);a.i(20375);var f=a.i(38978),g=a.i(14747),h=a.i(81453);async function i(){try{let a=process.env.LOG_FILE_PATH||"/var/log/dev3000/dev3000.log";if(!(0,e.existsSync)(a))return{files:[],currentFile:"",projectName:"unknown"};let b=(0,g.dirname)(a),f=(0,g.basename)(a),h=c(f)||"unknown";return{files:(0,e.readdirSync)(b).filter(a=>d(a,h)).map(a=>{let c=(0,g.join)(b,a),d=(0,e.statSync)(c),h=a.match(/(\d{4}-\d{2}-\d{2}T[\d-]+Z)/),i=h?h[1].replace(/-/g,":"):"";return{name:a,path:c,timestamp:i,size:d.size,mtime:d.mtime,isCurrent:a===f}}).sort((a,b)=>b.mtime.getTime()-a.mtime.getTime()).map(a=>({...a,mtime:a.mtime.toISOString()})),currentFile:a,projectName:h}}catch(a){return{files:[],currentFile:"",projectName:"unknown"}}}async function j(a,b="tail",c=100){try{if(!(0,e.existsSync)(a))return{logs:"",total:0};let d=(0,e.readFileSync)(a,"utf-8").split("\n").filter(a=>a.trim());return{logs:("head"===b?d.slice(0,c):d.slice(-c)).join("\n"),total:d.length}}catch(a){return{logs:"",total:0}}}async function k({searchParams:a}){let c=process.env.DEV3000_VERSION||"0.0.0",e=await a,{files:g,currentFile:k}=await i();if(e.project&&!e.file){let a=g.filter(a=>d(a.name,e.project??""));a.length>0?(0,f.redirect)(`/logs?file=${encodeURIComponent(a[0].name)}&mode=tail`):g.length>0&&(0,f.redirect)(`/logs?file=${encodeURIComponent(g[0].name)}&mode=tail`)}else if(!e.file&&g.length>0){let a=g[0].name;(0,f.redirect)(`/logs?file=${encodeURIComponent(a)}&mode=tail`)}if(!e.file)return(0,b.jsx)(h.default,{version:c,initialData:{logs:[],logFiles:[],currentLogFile:"",mode:"tail"}});let l=g.find(a=>a.name===e.file),m=l?.path||k;l?.isCurrent;let n=e.mode||"tail",o=function(a){let b=/\[(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z|\d{2}:\d{2}:\d{2}\.\d{3})\] \[([^\]]+)\] /,c=[],d=a.split("\n"),e=null;for(let a of d){if(!a.trim())continue;let d=a.match(b);if(d){let b,f;e&&c.push(e);let[g,h,i]=d,j=a.substring(g.length),k=/^TAB-\d+\.\d+$/.test(i),l=i,m=j;if(k){b=i;let a=j.match(/^\[([^\]]+)\] /);if(a&&(l=a[1],(m=j.substring(a[0].length)).includes("User-Agent:"))){let a=m.match(/User-Agent: ([^,\n]+)/);a&&(f=a[1])}}let n=m.match(/\[SCREENSHOT\] ([^\s[]+)/)?.[1],o=m.match(/\[SCREENCAST\] View jank analysis: ([^\s]+)/)?.[1],p=function(a){let b=a.match(/^\[CONSOLE LOG\] (.+)$/);if(!b)return a;let c=b[1];if(!c.includes("%c"))return a;let d=c;return d=(d=(d=d.replace(/%c/g,"")).replace(/\s+color:\s*[^{}\n]*?(?=\s*[{[]|$)/g,"")).replace(/\s+/g," ").trim(),`[CONSOLE LOG] ${d}`}(m);if((p=p.replace(/ \[CHROME_EXTENSION\]$/,"")).includes("[Network.webSocketFrameSent]")||p.includes("[Network.webSocketFrameReceived]")||p.includes("[Network.webSocketFrame")||p.includes("webSocketDebuggerUrl")&&p.includes("localhost")||p.includes("[NETWORK")&&p.includes("__PAGE__")&&p.includes("refresh")){e=null;continue}let q=h;if(/^\d{2}:\d{2}:\d{2}\.\d{3}$/.test(h)){let a=new Date,[b,c,d]=h.split(":"),[e,f]=d.split(".");a.setHours(parseInt(b,10),parseInt(c,10),parseInt(e,10),parseInt(f,10)),q=a.toISOString()}e={timestamp:q,source:l,message:p,screenshot:n,screencast:o,original:a,tabIdentifier:b,userAgent:f}}else e&&(e.message+=`
${a}`,e.original+=`
${a}`)}return e&&c.push(e),c}((await j(m,n)).logs);return(0,b.jsx)(h.default,{version:c,initialData:{logs:o,logFiles:g,currentLogFile:m,mode:n}})}a.s(["default",()=>k],99275)}];

//# sourceMappingURL=%5Broot-of-the-server%5D__426a7380._.js.map