"use strict";(()=>{vare={};e.id=2655,e.ids=[2655],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},21572:e=>{e.exports=require("nodemailer")},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}}})},47601:(e,r,t)=>{t.r(r),t.d(r,{config:()=>A,default:()=>d,routeModule:()=>f});varn={};t.r(n),t.d(n,{default:()=>p});vars=t(89947),o=t(2706),i=t(96762),a=t(29021),l=t.n(a),c=t(96052),u=t(68829);asyncfunctionp(e,r){if("GET"===e.method){lett=(0,u.A)({data:JSON.stringify({email:e.query.email,dateCode:Date.now()})}),n=process.env.DSQL_HOST,s=e.query.email;if(!String(s).match(/.*@.*\..*/))returnr.json({user:null,msg:"Invalid Email"});leto=e.headers["x-real-ip"]||e.headers["x-forwarded-for"]||e.connection.remoteAddress,i=process.env.DSQL_HOST||"https://datasquirel.com",a=await(0,c.A)({to:e.query.email?.toString()||process.env.DSQL_CONTACT_EMAIL,subject:"Reset Your Password",text:"Please click the link to reset your password",html:l().readFileSync("./email/send-password-reset-link.html","utf8").replace(/{{host}}/,n||"").replace(/{{ip}}/,String(o)).replace(/{{token}}/,t||""),alias:"Support"});if(console.log("mail",a),awaitBun.sleep(1e3),(0,c.A)({to:process.env.DSQL_CONTACT_EMAIL,subject:`Password Reset Attempt for ${s}`,html:`<h1><u>${s}</u> tried to reset password</h1><p><b>${s}</b> attempted a password reset on ${i} from ${o} with a wrong password.</p>`}),!a)returnr.json({success:!1});r.json({success:!0})}elser.json({success:!1})}letd=(0,i.M)(n,"default"),A=(0,i.M)(n,"config"),f=news.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/sendPasswordResetLink",pathname:"/api/sendPasswordResetLink",bundlePath:"",filename:""},userland:n})},96052:(e,r,t)=>{t.d(r,{A:()=>a});varn=t(29021),s=t.n(n),o=t(21572);leti=t.n(o)().createTransport({host:process.env.DSQL_MAIL_HOST,port:465,secure:!0,auth:{user:process.env.DSQL_MAIL_EMAIL,pass:process.env.DSQL_MAIL_PASSWORD}});asyncfunctiona({to:e,subject:r,text:t,html:n,alias:o,senderName:a}){letl;if(!process.env.DSQL_MAIL_HOST||!process.env.DSQL_MAIL_EMAIL||!process.env.DSQL_MAIL_PASSWORD)returnnull;letc=(o?.match(/support/i),process.env.DSQL_MAIL_EMAIL);if(!s().existsSync("./email/index.html"))return;letu=s().readFileSync("./email/index.html","utf8").replace(/{{email_body}}/,n||"").replace(/{{issue_date}}/,Date().substring(0,24));try{letn={};n.from=`"${a||"Datasquirel"}" <${c}>`,n.sender=c,o&&(n.replyTo=c),n.to=e,n.subject=r,n.text=t,n.html=u,l=awaiti.sendMail(n)}catch(e){console.log("ERROR in handleNodemailer Function =>",e.message)}returnl}},68829:(e,r,t)=>{t.d(r,{A:()=>i});varn=t(55511),s=t(79428),o=t(31542);functioni({data:e,encryptionKey:r,encryptionSalt:t}){if(!e?.match(/./))returnconsole.log("Encryption string is invalid"),e;let{key:i,salt:a,keyLen:l,algorithm:c,bufferAllocSize:u}=(0,o.A)({encryptionKey:r});if(!i?.match(/.{8,}/))returnconsole.log("Encryption key is invalid"),e;if(!a?.match(/.{8,}/))returnconsole.log("Encryption salt is invalid"),e;letp=(0,n.scryptSync)(i,a,l),d=s.Buffer.alloc(u,0),A=(0,n.createCipheriv)(c,p,d);try{letr=A.update(e,"utf8","hex");returnr+=A.final("hex")}catch(r){returnconsole.log("Error in encrypting =>",r.message),global.ERROR_CALLBACK?.("Error Encrypting Data",r),e}}},31542:(e,r,t)=>{t.d(r,{A:()=>s});varn=t(82535);functions(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?(0,n.A)(process.env.DSQL_ENCRYPTION_BUFFER_ALLOC