"use strict";exports.id=4050,exports.ids=[4050],exports.modules={96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){returnfunctione(t,r){returnrint?t[r]:"then"int&&"function"==typeoft.then?t.then(t=>e(t,r)):"function"==typeoft&&"default"===r?t:void0}}})},47670:(e,t,r)=>{lets=r(72583),n=r(16570),a=r(33364);r(27825);leto=r(51348),c=r(21339),i=r(20503),l=r(44900);asyncfunctionu({dbContext:e,paradigm:t,dbFullName:r,tableName:u,data:d,tableSchema:p,duplicateColumnName:_,duplicateColumnValue:S,update:g,encryptionKey:h,encryptionSalt:D,useLocal:f}){letE=!!f||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),y=f?l:E?o:c;if(d?.date_created_timestamp&&deleted.date_created_timestamp,d?.date_updated_timestamp&&deleted.date_updated_timestamp,d?.date_updated&&deleted.date_updated,d?.date_updated_code&&deleted.date_updated_code,d?.date_created&&deleted.date_created,d?.date_created_code&&deleted.date_created_code,_&&"string"==typeof_){lets=E?awaity(`SELECT * FROM \`${u}\` WHERE \`${_}\`=?`,[S]):awaity({paradigm:"Read Only",database:r,queryString:`SELECT * FROM \`${u}\` WHERE \`${_}\`=?`,queryValues:[S]});if(s?.[0]&&!g)returnnull;if(s&&s[0]&&g)returnawaita({dbContext:e,paradigm:t,dbFullName:r,tableName:u,data:d,tableSchema:p,encryptionKey:h,encryptionSalt:D,identifierColumnName:_,identifierValue:S||""})}letm=Object.keys(d),L=[],O=[];for(lete=0;e<m.length;e++)try{lett=m[e],r=d?.[t],a=p?p?.fields?.filter(e=>e.fieldName==t):null,o=a&&a[0]?a[0]:null;if(null==r||void0==r||o?.dataType?.match(/int$/i)&&"string"==typeofr&&!r?.match(/./))continue;o?.encrypted&&(r=i({data:r,encryptionKey:h,encryptionSalt:D}),console.log("DSQL: Encrypted value =>",r));letc=/<[^>]+>/g;(o?.richText||String(r).match(c))&&(r=s(r,n)),o?.pattern&&!newRegExp(o.pattern,o.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),L.push("`"+t+"`"),"object"==typeofr&&(r=JSON.stringify(r)),"number"==typeofr?O.push(String(r)):O.push(r)}catch(e){console.log("DSQL: Error in parsing data keys =>",e.message);continue}d?.date_created||(L.push("`date_created`"),O.push(Date())),d?.date_created_code||(L.push("`date_created_code`"),O.push(Date.now())),d?.date_updated||(L.push("`date_updated`"),O.push(Date())),d?.date_updated_code||(L.push("`date_updated_code`"),O.push(Date.now()));letA=`INSERT INTO \`${u}\` (${L.join(",")}) VALUES (${O.map(()=>"?").join(",")})`;returnE?awaity(A,O):awaity({paradigm:t,database:r,queryString:A,queryValues:O})}e.exports=u},33364:(e,t,r)=>{lets=r(72583),n=r(16570),a=r(51348),o=r(21339),c=r(20503),i=r(44900);asyncfunctionl({dbContext:e,paradigm:t,dbFullName:r,tableName:l,data:u,tableSchema:d,identifierColumnName:p,identifierValue:_,encryptionKey:S,encryptionSalt:g,useLocal:h}){if(!u||!Object.keys(u).length)returnnull;letD=!!h||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),f=h?i:D?a:o,E=Object.keys(u),y=[],m=[];for(lete=0;e<E.length;e++)try{lett=E[e],r=u[t],a=d?d?.fields?.filter(e=>e.fieldName===t):null,o=a&&a[0]?a[0]:null;if(null==r||void0==r)continue;leti=/<[^>]+>/g;(o?.richText||String(r).match(i))&&(r=s(r,n)),o?.encrypted&&(r=c({data:r,encryptionKey:S,encryptionSalt:g})),"object"==typeofr&&(r=JSON.stringify(r)),o?.pattern&&!newRegExp(o.pattern,o.patternFlags||"").test(r)&&(console.log("DSQL: Pattern not matched =>",r),r=""),"string"==typeofr&&r.match(/^null$/i)&&(r={toSqlString:function(){return"NULL"}}),"string"!=typeofr||r.match(/./i)||(r={toSqlString:function(){return"NULL"}}),y.push(`\`${t}\`=?`),"number"==typeofr?m.push(String(r)):m.push(r)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}y.push(`date_updated='${Date()}'`),y.push(`date_updated_code='${Date.now()}'`);letL=`UPDATE ${l} SET ${y.join(",")} WHERE \`${p}\`=?`;returnm.push(_),D?awaitf(L,m):awaitf({paradigm:t,database:r,queryString:L,queryValues:m})}e.exports=l},16570:e=>{e.exports={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAt