"use strict";(()=>{vare={};e.id=2101,e.ids=[2101],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")},33873:e=>{e.exports=require("path")},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}}})},57164:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>_,routeModule:()=>m});vars={};t.r(s),t.d(s,{default:()=>S});varn=t(89947),a=t(2706),o=t(96762),i=t(48225),c=t.n(i),l=t(6420),u=t.n(l),p=t(57638),d=t.n(p);asyncfunctionS(e,r){if("GET"!==e.method)returnr.json({msg:"Failed!"});lett=awaitu()(e,r);if(!t)returnr.json({success:!1,msg:"Unauthorized"});lets=e.query.table,n=e.query.db,a=e.query.field,o=String(e.query.term),i=e.query.operator;try{lete=`SELECT * FROM \`${s}\` WHERE LOWER(\`${a}\`) ${i?.toString()?.match(/equal/i)?"=":" LIKE "}? ORDER BY id DESC LIMIT 20`,t=[i?.toString()?.match(/equal/i)?o.toLowerCase():"%"+o.toLowerCase()+"%"],c=awaitd()({database:n?.toString()?.replace(/[^a-z0-9_]/g,""),queryString:e,queryValuesArray:t}),l=awaitd()({database:n?.toString()?.replace(/[^a-z0-9_]/g,""),queryString:e.replace(/\*/,"COUNT(id) AS count").replace(/ ORDER BY .*/,""),queryValuesArray:t});r.json({success:!0,result:c,count:l?.[0]?.count})}catch(e){c()({component:"/api/queryEntriesSearchTerm/main-catch-error",message:e.message,user:t}),r.json({success:!1,msg:"Failed!"})}}let_=(0,o.M)(s,"default"),f=(0,o.M)(s,"config"),m=newn.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/queryEntriesSearchTerm",pathname:"/api/queryEntriesSearchTerm",bundlePath:"",filename:""},userland:s})},6420:(e,r,t)=>{t(81630);lets=t(51348),n=t(72835),a=t(29021),o=t(31341);asyncfunctioni(e,r,t,i){let{keyCookieName:c,csrfCookieName:l}=o();if(!e.cookies?.[c]?.match(/./))returnnull;letu=n({encryptedString:e.cookies[c]});if(!u)returnnull;letp=JSON.parse(u);if(!p.csrf_k||t&&!e.headers["x-csrf-auth"]?.match(RegExp(`${p.csrf_k}`)))returnnull;letd=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!d)returnconsole.log("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable."),null;if(t&&!a.existsSync(`${d}/${p.csrf_k}`))returnnull;if(0==p.verification_status&&!t){lete=awaits(`SELECT verification_status FROM users WHERE id='${p.id}'`);e&&e[0]&&1==e[0].verification_status&&r.setHeader("Set-Cookie",["user_refresh=1"])}returnp?.date&&Date.now()-p.date>6048e5?null:p}e.exports=i},31341:e=>{e.exports=function(){lete=process.env.DSQL_COOKIES_PREFIX||"dsql_";return{keyCookieName:e+(process.env.DSQL_COOKIES_KEY_NAME||"key"),csrfCookieName:e+(process.env.DSQL_COOKIES_CSRF_NAME||"csrf")}}},30003:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},6061:(e,r,t)=>{lets=t(72835),n=t(30003);e.exports=asyncfunction({unparsedResults:e,tableSchema:r}){lett=[];try{for(leta=0;a<e.length;a++){leto=e[a],i=Object.keys(o);for(lete=0;e<i.length;e++){lett=i[e],a=r?.fields[e];if(t?.match(n))continue;letc=o[t];("number"==typeofc||c)&&a?.encrypted&&c?.match(/./)&&(o[t]=s({encryptedString:c}))}t.push(o)}returnt}catch(r){returnconsole.log("ERROR in parseDbResults Function =>",r.message),e}}},48225:(e,r,t)=>{lets=t(29021),{IncomingMessage:n}=t(81630);e.exports=asyncfunction({user:e,message:r,component:t,noMail:n,req:a}){leto=newDate,i=(()=>{if(!a)returnnull;try{lete=a.headers["x-forwarded-for"],r=a.headers["x-real-ip"],t=a.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||a.socket.remoteAddress;if(!n)returnnull;returnString(n)}catch(e){returnnull}})();try{letn=`🚀 SERVER ERROR ===========================