"use strict";(()=>{vare={};e.id=536,e.ids=[536],e.modules={39908:e=>{e.exports=require("@moduletrace/datasquirel/dist/users/user-auth")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},9973:e=>{e.exports=require("serverless-mysql")},29021:e=>{e.exports=require("fs")},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}}})},56625:(e,r,s)=>{s.r(r),s.d(r,{config:()=>_,default:()=>d,routeModule:()=>p});vart={};s.r(t),s.d(t,{default:()=>l});varn=s(89947),o=s(2706),i=s(96762),a=s(69842),u=s(67619),c=s(48786);asyncfunctionl(e,r){if("POST"!==e.method)returnr.json({user:null,msg:"Registration Failed!"});lets=await(0,a.A)(e,r,!0);if(!s)returnr.json({success:!1,msg:"Unauthorized"});let{id:t}=e.body;try{lete=await(0,c.A)("SELECT * FROM mariadb_users WHERE id = ? AND user_id = ?",[t,s.id]),n=e?.[0];if(!n?.id)throwError("Active User couldn't be verified");if(String(n.primary)?.match(/1/))throwError("Cannot Delete Primary User");leto=n.username,i=n.host;await(0,c.A)("DELETE FROM mariadb_users WHERE user_id = ? AND id = ?",[s.id,n.id]),await(0,c.A)(`DROP USER '${o}'@'${i}'`),r.json({success:!0})}catch(e){(0,u.A)({component:"/api/acceptUserInvitation/catch-error",message:e.message,user:s}),r.json({success:!1,msg:"Error in adding SQL user =>"+e.message,err:e.message})}}letd=(0,i.M)(t,"default"),_=(0,i.M)(t,"config"),p=newn.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/sql-users/delete",pathname:"/api/sql-users/delete",bundlePath:"",filename:""},userland:t})},69842:(e,r,s)=>{s.d(r,{A:()=>o});vart=s(39908),n=s.n(t);asyncfunctiono(e,r,s){lett=n()({req:e,level:s?"deep":void0});returnconsole.log(t),t.payload}},67619:(e,r,s)=>{s.d(r,{A:()=>o});vart=s(29021),n=s.n(t);asyncfunctiono({user:e,message:r,component:s,noMail:t,req:o}){leti=newDate,a=(()=>{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{lett=`🚀 SERVER ERROR ===========================