"use strict";(()=>{vare={};e.id=4785,e.ids=[4785],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},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,n){returnninr?r[n]:"then"inr&&"function"==typeofr.then?r.then(r=>e(r,n)):"function"==typeofr&&"default"===n?r:void0}}})},91963:(e,r,n)=>{n.r(r),n.d(r,{config:()=>d,default:()=>_,routeModule:()=>p});varo={};n.r(o),n.d(o,{default:()=>a});vart=n(89947),s=n(2706),u=n(96762),i=n(29021),c=n.n(i),l=n(87369);asyncfunctiona(e,r){if("POST"!==e.method)returnr.json({success:!1,msg:"Wrong Method"});letn=await(0,l.A)(e);if(!n?.logged_in_status)returnr.json({success:!1,log:"No Logs"});c().writeFileSync("./.tmp/error.log","","utf-8"),r.json({success:!0})}let_=(0,u.M)(o,"default"),d=(0,u.M)(o,"config"),p=newt.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/admin/clearErrorLogs",pathname:"/api/admin/clearErrorLogs",bundlePath:"",filename:""},userland:o})},87369:(e,r,n)=>{n.d(r,{A:()=>s});varo=n(95969),t=n(89159);asyncfunctions(e){let{keyCookieName:r,csrfCookieName:n}=(0,t.A)(),s=`${r}_su`;if(!e.cookies?.[s])returnconsole.log("No auth key cookie found"),null;letu=(0,o.A)({encryptedString:e.cookies[s]});if(!u)returnconsole.log("No user payload found"),null;leti=JSON.parse(u);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}},89159:(e,r,n)=>{n.d(r,{A:()=>o});functiono(e){letr=process.env.DSQL_COOKIES_PREFIX||"dsql_",n=process.env.DSQL_COOKIES_KEY_NAME||"key",o=process.env.DSQL_COOKIES_CSRF_NAME||"csrf",t=process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME||"one-time-code",s=e?.database?.replace(/^datasquirel_user_\d+_/,"")||process.env.DSQL_DB_NAME?.replace(/^datasquirel_user_\d+_/,""),u=r;e?.userId&&(u+=`user_${e.userId}_`),s&&(u+=`${s}_`),u+=n;leti=r;e?.userId&&(i+=`user_${e.userId}_`),s&&(i+=`${s}_`),i+=o;letc=r;returne?.userId&&(c+=`user_${e.userId}_`),s&&(c+=`${s}_`),{keyCookieName:u,csrfCookieName:i,oneTimeCodeName:c+=t}}},95969:(e,r,n)=>{n.d(r,{A:()=>u});varo=n(55511),t=n(79428),s=n(32443);functionu({encryptedString:e,encryptionKey:r,encryptionSalt:n}){if(!e?.match(/./))returnconsole.log("Encrypted string is invalid"),e;let{key:u,salt:i,keyLen:c,algorithm:l,bufferAllocSize:a}=(0,s.A)({encryptionKey:r});if(!u?.match(/.{8,}/))returnconsole.log("Decrption key is invalid"),e;if(!i?.match(/.{8,}/))returnconsole.log("Decrption salt is invalid"),e;let_=(0,o.scryptSync)(u,i,c),d=t.Buffer.alloc(a,0),p=(0,o.createDecipheriv)(l,_,d);try{letr=p.update(e,"hex","utf8");returnr+=p.final("utf8")}catch(r){returnconsole.log("Error in decrypting =>",r.message),e}}},32443:(e,r,n)=>{n.d(r,{A:()=>o});functiono(e){return{key:e?.encryptionKey||process.env.DSQL_ENCRYPTION_PASSWORD,keyLen:process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24,salt:e?.encryptionSalt||process.env.DSQL_ENCRYPTION_SALT,apiKey:e?.apiKey||process.env.DSQL_API_KEY,algorithm:e?.algorithm||process.env.DSQL_ENCRYPTION_ALGORITHM||"aes-192-cbc",bufferAllocSize:e?.bufferAllocSize||(process.env.DSQL_ENCRYPTION_BUFFER_ALLOCATION_SIZE?function(e,r){try{letr=Number(e);if("number"!=typeofr||isNaN(r))return0;returnMath.round(r)}catch(e){returnconsole.log(`Numberfy ERROR: ${e.message}`),0}}(process.env.DSQL_ENCRYPTION_BUFFER_ALLOCATION_SIZE):void0)||16}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){returnn}});varn=function(e){returne.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,n)=>{e.exports=n(75600)}};varr=require("../../../webpack-api-runtime.js");r.C(e);varn=r(r.s=91963);module.exports=n})();