"use strict";(()=>{var e={};e.id=7327,e.ids=[7327],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")},6592:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>m,patchFetch:()=>g,requestAsyncStorage:()=>p,routeModule:()=>u,serverHooks:()=>h,staticGenerationAsyncStorage:()=>d});var o={};r.r(o),r.d(o,{POST:()=>c});var n=r(49303),a=r(88716),l=r(60670),i=r(87070),s=r(56681);async function c(e){try{let{url:t="https://www.zaubacorp.com/PR-MOVIE-PRIVATE-LIMITED-U92100MP2018PTC046397"}=await e.json();if(!t)return i.NextResponse.json({error:"URL is required"},{status:400});let r=await s.chromium.connectOverCDP("http://localhost:9222"),o=r.contexts()[0].pages()[0];await o.goto(t,{waitUntil:"domcontentloaded",timeout:3e4}),await o.waitForTimeout(4e3);let n=await o.evaluate(()=>{let e=document.querySelector("div.container #last_updated")?.innerText||"",t=document.querySelector("div.container #about")?.innerText||"",r=document.querySelectorAll("#director-information table")||[],o=[];r.length&&(o=document.querySelectorAll("#director-information table"));let n=document.querySelectorAll("#contact-details #contact-details-content > div.col-md-6")||[],a=[];n.length&&(console.log(n),a=n[0]?.querySelectorAll("span"));let l="N/A",i="N/A",s="N/A";if(a.length){console.log(a.length,3);let e=a[0]?.innerText.match(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g);e&&e.length&&(l=e[0]||"N/A"),i=a[1]?.innerText.match(/(https?:\/\/[^\s",]+)/g)||"N/A",s=a[3]?.innerText||"N/A"}let c=[];o.length&&o.forEach(e=>{let t=e?.querySelectorAll("tbody tr")||[];t.length&&t.forEach(e=>{let t=e.querySelectorAll("td")||[];t.length&&(console.log(t.length,3),c.push({name:t[0]?.innerText||"",designation:t[1]?.innerText||"",appointment:t[2]?.innerText||""}))})});let u=document.querySelectorAll("#company-information table tbody tr")||[],p=[];return u.length&&u.forEach(e=>{let t=e.querySelectorAll("td")||[];t.length&&p.push({title:t[0]?.innerText||"",value:t[1]?.innerText||""})}),{email:l,website:i,address:s,updated:e,about:t,company_info:p,directors:c}});return await r.close(),i.NextResponse.json({...n,url:t})}catch(e){return console.error("❌ Scraping Error:",e),i.NextResponse.json({error:"Failed to scrape website"},{status:500})}}let u=new n.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/pvt_detail_scraper/route",pathname:"/api/pvt_detail_scraper",filename:"route",bundlePath:"app/api/pvt_detail_scraper/route"},resolvedPagePath:"C:\\Users\\Design Collection\\OneDrive\\Desktop\\Jitendra Vishwakarma\\Next Dashboard\\web crawler for user dev\\Scrape Genius\\app\\api\\pvt_detail_scraper\\route.js",nextConfigOutput:"",userland:o}),{requestAsyncStorage:p,staticGenerationAsyncStorage:d,serverHooks:h}=u,m="/api/pvt_detail_scraper/route";function g(){return(0,l.patchFetch)({serverHooks:h,staticGenerationAsyncStorage:d})}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),o=t.X(0,[8948,5972],()=>r(6592));module.exports=o})();