"use strict";(()=>{var e={};e.id=170,e.ids=[170],e.modules={145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},3023:e=>{e.exports=import("@google/generative-ai")},6249:(e,t)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},6586:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>c,default:()=>l,routeModule:()=>h});var n=r(1802),o=r(7153),i=r(6249),s=r(1692),u=e([s]);s=(u.then?(await u)():u)[0];let l=(0,i.l)(s,"default"),c=(0,i.l)(s,"config"),h=new n.PagesAPIRouteModule({definition:{kind:o.x.PAGES_API,page:"/api/chat",pathname:"/api/chat",bundlePath:"",filename:""},userland:s});a()}catch(e){a(e)}})},1692:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{default:()=>i});var n=r(3023),o=e([n]);let s=new(n=(o.then?(await o)():o)[0]).GoogleGenerativeAI("AIzaSyBYTzqhT_mpxJcSqOCl5BKmQ-HT_idXCu8");async function i(e,t){if("POST"!==e.method)return t.status(405).json({error:"Method not allowed"});let{message:r}=e.body;if(!r)return t.status(400).json({error:"Message is required"});try{let e=s.getGenerativeModel({model:"gemini-1.5-flash-latest"}),a=`You are a helpful AI assistant for ProURLMonitor website. You help users with their questions about:
    - Domain Authority Checker
    - Bulk Domain Age Checker
    - Bulk Domain WHOIS Checker
    - Domain IP History Checker
    - Reverse IP Domain Checker
    - Reverse WHOIS Checker
    - XML & HTML Sitemap Generator
    - Google Malware Checker
    - Bulk Alexa Rank Checker
    - Alexa Rank Comparison
    - Backlinks Maker
    - Social Media Counter
    - Link Search
    - Broken Links Checker
    - Google PageRank Checker
    - Link Extractor
    - Ping Multiple URLs
    - Binary Translator
    
    Be helpful, friendly, and professional. If you cannot answer a question, suggest they contact info@prourlmonitor.com for more help.
    Answer in the same language as the user (Urdu/Hindi/English).`,n=e.startChat({history:[]}),o=await n.sendMessage(`${a}

User question: ${r}`),i=(await o.response).text();t.status(200).json({reply:i})}catch(e){console.error("Gemini API Error:",e),t.status(500).json({reply:"Sorry, I couldn't understand that. Please email us at info@prourlmonitor.com"})}}a()}catch(e){a(e)}})},7153:(e,t)=>{var r;Object.defineProperty(t,"x",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(r||(r={}))},1802:(e,t,r)=>{e.exports=r(145)}};var t=require("../../webpack-api-runtime.js");t.C(e);var r=t(t.s=6586);module.exports=r})();