"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")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){returnfunctione(r,t){returntinr?r[t]:"then"inr&&"function"==typeofr.then?r.then(r=>e(r,t)):"function"==typeofr&&"default"===t?r:void0}}})},10291:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>u,routeModule:()=>p});varn={};t.r(n),t.d(n,{default:()=>i});vars=t(89947),a=t(2706),o=t(96762),l=t(30944),c=t(87369);asyncfunctioni(e,r){if("GET"!==e.method)returnr.json({success:!1,msg:"Wrong Method"});lett=await(0,c.A)(e);if(!t?.logged_in_status)returnr.json({success:!1,log:"No Logs"});let{database:n}=e.query;try{lete=await(0,l.A)({database:"string"==typeofn?n:"",queryString:`SHOW TABLES FROM ${n}`});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})}}letu=(0,o.M)(n,"default"),d=(0,o.M)(n,"config"),p=news.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/admin/getTablesForUserDatabase",pathname:"/api/admin/getTablesForUserDatabase",bundlePath:"",filename:""},userland:n})},87369:(e,r,t)=>{t.d(r,{A:()=>a});varn=t(95969),s=t(89159);asyncfunctiona(e){let{keyCookieName:r,csrfCookieName:t}=(0,s.A)(),a=`${r}_su`;if(!e.cookies?.[a])returnconsole.log("No auth key cookie found"),null;leto=(0,n.A)({encryptedString:e.cookies[a]});if(!o)returnconsole.log("No user payload found"),null;letl=JSON.parse(o);returnl.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):l.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):l}},89159:(e,r,t)=>{t.d(r,{A:()=>n});functionn(e){letr=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",n=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",s=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",a=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),o=r;e?.userId&&(o+=`user_${e.userId}_`),a&&(o+=`${a}_`),o+=t;letl=r;e?.userId&&(l+=`user_${e.userId}_`),a&&(l+=`${a}_`),l+=n;letc=r;returne?.userId&&(c+=`user_${e.userId}_`),a&&(c+=`${a}_`),{keyCookieName:o,csrfCookieName:l,oneTimeCodeName:c+=s}}},43775:(e,r,t)=>{t.d(r,{A:()=>a});varn=t(95969);lets=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/;asyncfunctiona({unparsedResults:e,tableSchema:r}){lett=[];try{for(leta=0;a<e.length;a++){leto=e[a],l=Object.keys(o);for(lete=0;e<l.length;e++){lett=l[e],a=r?.fields[e];if(t?.match(s))continue;letc=o[t];("number"==typeofc||c)&&a?.encrypted&&c?.match(/./)&&(o[t]=(0,n.A)({encryptedString:c}))}t.push(o)}returnt}catch(r){returnconsole.log("ERROR in parseDbResults Function =>",r.message),e}}},67619:(e,r,t)=>{t.d(r,{A:()=>a});varn=t(29021),s=t.n(n);asyncfunctiona({user:e,message:r,component:t,noMail:n,req:a}){leto=newDate,l=(()=>{if(!a)returnnull;try{lete=a.headers["x-forwarded-for"],r=a.headers["x-real-ip"],t=a.headers["cf-connecting-ip"],n=Array.isArray(e)?e[0]:e?.split(",")[0],s=t||n||r||a.socket.remoteAddress;if(!s)returnnull;returnString(s)}catch(e){returnnull}})();try{letn=`🚀 SERVER ERROR ===========================