"use strict";(()=>{var e={};e.id=7997,e.ids=[7997],e.modules={20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},56681:e=>{e.exports=require("playwright")},99357:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>w,patchFetch:()=>x,requestAsyncStorage:()=>d,routeModule:()=>p,serverHooks:()=>m,staticGenerationAsyncStorage:()=>h});var a={};r.r(a),r.d(a,{POST:()=>c});var i=r(49303),o=r(88716),n=r(60670),s=r(87070),u=r(56681),l=r.n(u);async function c(e){let t;try{let{url:r}=await e.json();if(!r)return s.NextResponse.json({error:"URL is required"},{status:400});t=await l().chromium.launch();let a=await t.newPage();await a.route("**/*",e=>{["image","stylesheet","font"].includes(e.request().resourceType())?e.abort():e.continue()}),await a.goto(r,{waitUntil:"domcontentloaded",timeout:6e4}),await a.waitForTimeout(4e3);let i=await a.evaluate(()=>{let e=document?.querySelector("h1")?.innerText||"N/A",t=document?.querySelectorAll("div.additionals.three-column .item")||[],r=t.length?t[1]?.innerText:"N/A",a=document?.querySelectorAll("div.social-presence ul li")||[],i=a.length?a[0]?.querySelector("a")?.innerText:"N/A",o=a.length?a[1]?.querySelector("a #websiteUrl")?.innerText:"N/A";return{fullTitle:e,complete_address:r,email:i,website:o||"N/A"}});return await t.close(),s.NextResponse.json({...i,url:r})}catch(e){return console.error("❌ Scraping Error:",e),s.NextResponse.json({error:"Failed to scrape website"},{status:500})}finally{await t.close()}}let p=new i.AppRouteRouteModule({definition:{kind:o.x.APP_ROUTE,page:"/api/sulekha_detail_scraper/route",pathname:"/api/sulekha_detail_scraper",filename:"route",bundlePath:"app/api/sulekha_detail_scraper/route"},resolvedPagePath:"C:\\Users\\Design Collection\\OneDrive\\Desktop\\Jitendra Vishwakarma\\Next Dashboard\\web crawler for user dev\\Scrape Genius\\app\\api\\sulekha_detail_scraper\\route.js",nextConfigOutput:"",userland:a}),{requestAsyncStorage:d,staticGenerationAsyncStorage:h,serverHooks:m}=p,w="/api/sulekha_detail_scraper/route";function x(){return(0,n.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:h})}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[8948,5972],()=>r(99357));module.exports=a})();