"use strict";(()=>{var e={};e.id=9731,e.ids=[9731],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")},65473:(e,t,a)=>{a.r(t),a.d(t,{originalPathname:()=>m,patchFetch:()=>x,requestAsyncStorage:()=>c,routeModule:()=>d,serverHooks:()=>h,staticGenerationAsyncStorage:()=>w});var r={};a.r(r),a.d(r,{POST:()=>l});var o=a(49303),n=a(88716),s=a(60670),i=a(87070),p=a(56681),u=a.n(p);async function l(e){let t;try{let a=new AbortController;a.signal,e.signal?.addEventListener("abort",()=>{a.abort()});let{code:r,phone:o,needUser:n=!1}=await e.json();if(!o||o.toLowerCase().includes("n/a"))return i.NextResponse.json({error:"Incorrect phone number"},{status:400});t=await u().chromium.launch();let s=await t.newContext({userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119 Safari/537.36",viewport:{width:1280,height:720}}),p=await s.newPage();await p.goto(`https://api.whatsapp.com/send/?phone=${r}${o}`,{waitUntil:"domcontentloaded",timeout:6e4}),await p.waitForTimeout(1e3);let l=await p.evaluate(()=>document.querySelector("#main_block h3")?.innerText||"");if(await t.close(),n)return i.NextResponse.json({username:l,status:!!l,phone:o});return i.NextResponse.json({status:!!l,phone:o})}catch(e){return console.error("Failed to check:",e),i.NextResponse.json({error:"Failed to scrape"},{status:500})}finally{t&&await t.close()}}let d=new o.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/whatsapp_sender/route",pathname:"/api/whatsapp_sender",filename:"route",bundlePath:"app/api/whatsapp_sender/route"},resolvedPagePath:"C:\\Users\\Design Collection\\OneDrive\\Desktop\\Jitendra Vishwakarma\\Next Dashboard\\web crawler for user dev\\Scrape Genius\\app\\api\\whatsapp_sender\\route.js",nextConfigOutput:"",userland:r}),{requestAsyncStorage:c,staticGenerationAsyncStorage:w,serverHooks:h}=d,m="/api/whatsapp_sender/route";function x(){return(0,s.patchFetch)({serverHooks:h,staticGenerationAsyncStorage:w})}}};var t=require("../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[8948,5972],()=>a(65473));module.exports=r})();