"use strict";(()=>{vare={};e.id=9664,e.ids=[9664],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")},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}}})},29249:(e,r,t)=>{t.r(r),t.d(r,{config:()=>S,default:()=>d,routeModule:()=>f});vars={};t.r(s),t.d(s,{default:()=>p});varo=t(89947),n=t(2706),a=t(96762),i=t(51348),u=t.n(i),c=t(19131),l=t.n(c);let_=t(29021);asyncfunctionp(e,r){if("POST"!==e.method)returnr.json({success:!1,msg:"Wrong Method"});lett=awaitl()(e);if(!t?.logged_in_status)returnr.json({success:!1,log:"No Logs"});lets=e.body.user,o=s?.id.toString().replace(/[^0-9]/g,"").replace(/\//g,""),n=`${process.env.DSQL_USER_DB_SCHEMA_PATH}/user-${o}`,a=[];!functione({originArray:r,rootPath:t}){lets=_.readdirSync(t);for(leto=0;o<s.length;o++){letn=s[o];if(n?.match(/\..{2,5}$/))r.push({name:n,type:"file",root:t});else{lets={name:n,type:"folder",root:t,content:[]};e({originArray:s.content,rootPath:`${t}/${n}`}),r.push(s)}}}({originArray:a,rootPath:n});leti=awaitu()(`SHOW databases LIKE 'datasquirel_user_${s.id}_%'`);r.json({success:!0,data:a,databases:i.map(e=>Object.values(e)[0])})}letd=(0,a.M)(s,"default"),S=(0,a.M)(s,"config"),f=newo.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/admin/getUserData",pathname:"/api/admin/getUserData",bundlePath:"",filename:""},userland:s})},19131:(e,r,t)=>{let{IncomingMessage:s}=t(81630),o=t(72835),n=t(31341);e.exports=asyncfunction(e){let{keyCookieName:r,csrfCookieName:t}=n(),s=`${r}_su`;if(!e.cookies?.[s])returnconsole.log("No auth key cookie found"),null;leta=o({encryptedString:e.cookies[s]});if(!a)returnconsole.log("No user payload found"),null;leti=JSON.parse(a);returni.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):i.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):i}},31341:e=>{e.exports=function(e){letr=process.env.DSQL_COOKIES_PREFIX||"dsql_",t=process.env.DSQL_COOKIES_KEY_NAME||"key",s=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",o=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",n=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),a=r;e?.userId&&(a+=`user_${e.userId}_`),n&&(a+=`${n}_`),a+=t;leti=r;e?.userId&&(i+=`user_${e.userId}_`),n&&(i+=`${n}_`),i+=s;letu=r;returne?.userId&&(u+=`user_${e.userId}_`),n&&(u+=`${n}_`),{keyCookieName:a,csrfCookieName:i,oneTimeCodeName:u+=o}}},72835:(e,r,t)=>{let{scryptSync:s,createDecipheriv:o}=t(55511),{Buffer:n}=t(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:t})=>{if(!e?.match(/./))returnconsole.log("Encrypted string is invalid"),e;leta=r||process.env.DSQL_ENCRYPTION_PASSWORD,i=t||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!a?.match(/.{8,}/))returnconsole.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))returnconsole.log("Decrption salt is invalid"),e;letc=o("aes-192-cbc",s(a,i,u),n.alloc(16,0));try{letr=c.update(e,"hex","utf8");returnr+=c.final("utf8")}catch(r){returnconsole.log("Error in decrypting =>",r.message),e}}},51348:(e,r,t)=>{lets=t(9973),o=t(21580),n=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void0,charset:"utf8mb4",ssl:o()}});asyncfunctiona(...e){try{letr=awaitn.query(...e);returnawaitn.end(),JSON.parse(JSON.stringify(r))}catch(e){returnconsole.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=a},21580:(e,r,t)=>{lets=t(29021);e.exports=function(){let