"use strict";(()=>{var e={};e.id=249,e.ids=[249],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},8354:e=>{e.exports=require("util")},5778:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>x,routeModule:()=>c,serverHooks:()=>v,workAsyncStorage:()=>l,workUnitAsyncStorage:()=>g});var s={};t.r(s),t.d(s,{POST:()=>u});var o=t(2706),a=t(8203),n=t(5994),i=t(9187),d=t(9269),p=t(2021);async function u(e,{params:r}){let t=r.deviceId,s=(0,p.y)(t);try{let{filter:r,lines:t}=await e.json();if(!s)return i.NextResponse.json({error:"Device ID is required"},{status:400});let o=d.A.getInstance(),a=await o.getLogcat(s,{filter:r,lines:t});return i.NextResponse.json({logs:a})}catch(e){return console.error("Error getting logcat:",e),i.NextResponse.json({error:"Failed to get logcat"},{status:500})}}let c=new o.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/device/[deviceId]/system/logcat/route",pathname:"/api/device/[deviceId]/system/logcat",filename:"route",bundlePath:"app/api/device/[deviceId]/system/logcat/route"},resolvedPagePath:"/Users/saleeh/codes/appmaker/adb-web/src/app/api/device/[deviceId]/system/logcat/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:l,workUnitAsyncStorage:g,serverHooks:v}=c;function x(){return(0,n.patchFetch)({workAsyncStorage:l,workUnitAsyncStorage:g})}},2021:(e,r,t)=>{t.d(r,{y:()=>s});function s(e){return Buffer.from(e,"base64").toString()}}};var r=require("../../../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[994,452,577],()=>t(5778));module.exports=s})();