"use strict";(()=>{var e={};e.id=274,e.ids=[274],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")},8783:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>g,routeModule:()=>c,serverHooks:()=>x,workAsyncStorage:()=>d,workUnitAsyncStorage:()=>l});var s={};t.r(s),t.d(s,{POST:()=>u});var a=t(2706),o=t(8203),n=t(5994),p=t(9187),i=t(9269);async function u(e){try{let{deviceId:r}=await e.json();if(!r)return p.NextResponse.json({error:"Device ID is required"},{status:400});let t=i.A.getInstance(),s=await t.getPageSource(r);return new p.NextResponse(s,{headers:{"Content-Type":"application/xml","Content-Disposition":`attachment; filename="page_source_${new Date().toISOString()}.xml"`}})}catch(e){return console.error("Error getting page source:",e),p.NextResponse.json({error:"Failed to get page source"},{status:500})}}let c=new a.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/system/pagesource/route",pathname:"/api/system/pagesource",filename:"route",bundlePath:"app/api/system/pagesource/route"},resolvedPagePath:"/Users/saleeh/codes/appmaker/adb-web/src/app/api/system/pagesource/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:d,workUnitAsyncStorage:l,serverHooks:x}=c;function g(){return(0,n.patchFetch)({workAsyncStorage:d,workUnitAsyncStorage:l})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[994,452,577],()=>t(8783));module.exports=s})();