"use strict";(()=>{vare={};e.id=5905,e.ids=[5905],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){returnfunctione(r,s){returnsinr?r[s]:"then"inr&&"function"==typeofr.then?r.then(r=>e(r,s)):"function"==typeofr&&"default"===s?r:void0}}})},62347:(e,r,s)=>{s.r(r),s.d(r,{config:()=>_,default:()=>d,routeModule:()=>S});vart={};s.r(t),s.d(t,{default:()=>p});varn=s(89947),o=s(2706),a=s(96762),c=s(57638),l=s.n(c);s(48225);vari=s(19131),u=s.n(i);asyncfunctionp(e,r){if("GET"!==e.method)returnr.json({success:!1,msg:"Wrong Method"});lets=awaitu()(e);if(!s?.logged_in_status)returnr.json({success:!1,log:"No Logs"});let{database:t}=e.query;try{lete=awaitl()({database:"string"==typeoft?t:"",queryString:`SHOW TABLES FROM ${t}`});if(!e)returnr.json({success:!1,msg:"Query Failed!"});r.json({success:!0,tables:e.map(e=>Object.values(e)[0])})}catch(e){console.log(e.message),r.json({success:!1})}}s(29021);letd=(0,a.M)(t,"default"),_=(0,a.M)(t,"config"),S=newn.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/getTablesForUserDatabase",pathname:"/api/admin/getTablesForUserDatabase",bundlePath:"",filename:""},userland:t})},19131:(e,r,s)=>{let{IncomingMessage:t}=s(81630),n=s(72835),o=s(31341);e.exports=asyncfunction(e){let{keyCookieName:r,csrfCookieName:s}=o(),t=`${r}_su`;if(!e.cookies?.[t])returnconsole.log("No auth key cookie found"),null;leta=n({encryptedString:e.cookies[t]});if(!a)returnconsole.log("No user payload found"),null;letc=JSON.parse(a);returnc.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):c.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):c}},31341:e=>{e.exports=function(e){letr=process.env.DSQL_COOKIES_PREFIX||"dsql_",s=process.env.DSQL_COOKIES_KEY_NAME||"key",t=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",n=r;e?.userId&&(n+=`user_${e.userId}_`),e?.database&&(n+=`${e.database}_`),n+=s;leto=r;returne?.userId&&(o+=`user_${e.userId}_`),e?.database&&(o+=`${e.database}_`),{keyCookieName:n,csrfCookieName:o+=t}}},30003:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},6061:(e,r,s)=>{lett=s(72835),n=s(30003);e.exports=asyncfunction({unparsedResults:e,tableSchema:r}){lets=[];try{for(leto=0;o<e.length;o++){leta=e[o],c=Object.keys(a);for(lete=0;e<c.length;e++){lets=c[e],o=r?.fields[e];if(s?.match(n))continue;letl=a[s];("number"==typeofl||l)&&o?.encrypted&&l?.match(/./)&&(a[s]=t({encryptedString:l}))}s.push(a)}returns}catch(r){returnconsole.log("ERROR in parseDbResults Function =>",r.message),e}}},48225:(e,r,s)=>{lett=s(29021),{IncomingMessage:n}=s(81630);e.exports=asyncfunction({user:e,message:r,component:s,noMail:n,req:o}){leta=newDate,c=(()=>{if(!o)returnnull;try{lete=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],s=o.headers["cf-connecting-ip"],t=Array.isArray(e)?e[0]:e?.split(",")[0],n=s||t||r||o.socket.remoteAddress;if(!n)returnnull;returnString(n)}catch(e){returnnull}})();try{letn=`🚀 SERVER ERROR ===========================