"use strict";(()=>{vare={};e.id=7015,e.ids=[7015],e.modules={27825:e=>{e.exports=require("lodash")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},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")},5261:(e,r,t)=>{t.r(r),t.d(r,{config:()=>h,default:()=>E,routeModule:()=>A});vara={};t.r(a),t.d(a,{default:()=>y});vari=t(89947),s=t(2706),n=t(96762),l=t(72907),o=t.n(l),u=t(77538),c=t.n(u),d=t(6420),p=t.n(d);t(47670);varf=t(64122),g=t.n(f),m=t(77619),_=t.n(m);letS=t(29021);asyncfunctiony(e,r){if("POST"!==e.method)returnr.json({msg:"Failed!"});lett=awaitp()(e,r,!0);if(!t)returnr.json({success:!1,msg:"Unauthorized"});let{id:a,key:i,user_id:s}=e.body;try{lete=process.env.DSQL_API_KEYS_PATH;if(!e)throwError("process.env.DSQL_API_KEYS_PATH variable not found");lets=_()({key:String(o()(i)),user_id:t.id});if(!s?.sign)throwawaitg()({dbFullName:"datasquirel",tableName:"api_keys",identifierColumnName:"id",identifierValue:a}),Error("API KEY is Invalid");try{letr=`${e}/${s?.sign}`;S.unlinkSync(r)}catch(e){console.log("Error Deleting API key",e.message)}awaitg()({dbFullName:"datasquirel",tableName:"api_keys",identifierColumnName:"id",identifierValue:a}),r.json({success:!0})}catch(e){console.log(`ERROR Deleting API Key => ${e.message}`),c()({component:"/api/deleteApiKey/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Deletion Failed!"})}}letE=(0,n.M)(a,"default"),h=(0,n.M)(a,"config"),A=newi.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/deleteApiKey",pathname:"/api/deleteApiKey",bundlePath:"",filename:""},userland:a})},77538:(e,r,t)=>{leta=t(29021),{IncomingMessage:i}=t(81630);e.exports=asyncfunction({user:e,message:r,component:t,noMail:i,req:s}){letn=newDate,l=(()=>{if(!s)returnnull;try{lete=s.headers["x-forwarded-for"],r=s.headers["x-real-ip"],t=s.headers["cf-connecting-ip"],a=Array.isArray(e)?e[0]:e?.split(",")[0],i=t||a||r||s.socket.remoteAddress;if(!i)returnnull;returnString(i)}catch(e){returnnull}})();try{leti=`🚀 SERVER ERROR ===========================