"use strict";exports.id=1251,exports.ids=[1251],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}}})},98e3:(e,t,r)=>{r.d(t,{A:()=>d});varn=r(72583),a=r.n(n),s=r(92652),o=r(30802),i=r(48786),c=r(37897),l=r(68829),u=r(62050);asyncfunctiond({dbContext:e,paradigm:t,dbFullName:r,tableName:n,data:d,tableSchema:p,duplicateColumnName:_,duplicateColumnValue:S,update:f,encryptionKey:y,encryptionSalt:h,useLocal:g}){letD=!!g||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),A=g?u.A:D?i.A:c.A;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_){leta=D?awaitA(`SELECT * FROM \`${n}\` WHERE \`${_}\`=?`,[S]):awaitA({paradigm:"Read Only",queryString:`SELECT * FROM \`${r}\`.\`${n}\` WHERE \`${_}\`=?`,queryValues:[S]});if(a?.[0]&&!f)returnnull;if(a&&a[0]&&f)returnawait(0,o.A)({dbContext:e,paradigm:t,dbFullName:r,tableName:n,data:d,tableSchema:p,encryptionKey:y,encryptionSalt:h,identifierColumnName:_,identifierValue:S||""})}letE=Object.keys(d),L=[],m=[];for(lete=0;e<E.length;e++)try{lett=E[e],r=d?.[t],n=p?p?.fields?.filter(e=>e.fieldName==t):null,o=n&&n[0]?n[0]:null;if(null==r||void0==r||o?.dataType?.match(/int$/i)&&"string"==typeofr&&!r?.match(/./))continue;o?.encrypted&&(r=(0,l.A)({data:r,encryptionKey:y,encryptionSalt:h}),console.log("DSQL: Encrypted value =>",r));leti=/<[^>]+>/g;(o?.richText||String(r).match(i))&&(r=a()(r,s.A)),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?m.push(String(r)):m.push(r)}catch(e){console.log("DSQL: Error in parsing data keys =>",e.message);continue}d?.date_created||(L.push("`date_created`"),m.push(Date())),d?.date_created_code||(L.push("`date_created_code`"),m.push(Date.now())),d?.date_updated||(L.push("`date_updated`"),m.push(Date())),d?.date_updated_code||(L.push("`date_updated_code`"),m.push(Date.now()));letN=`INSERT INTO \`${r}\`.\`${n}\` (${L.join(",")}) VALUES (${m.map(()=>"?").join(",")})`;returnD?awaitA(N,m):awaitA({paradigm:t,queryString:N,queryValues:m})}},30802:(e,t,r)=>{r.d(t,{A:()=>u});varn=r(72583),a=r.n(n),s=r(92652),o=r(48786),i=r(37897),c=r(68829),l=r(62050);asyncfunctionu({dbContext:e,paradigm:t,dbFullName:r,tableName:n,data:u,tableSchema:d,identifierColumnName:p,identifierValue:_,encryptionKey:S,encryptionSalt:f,useLocal:y}){if(!u||!Object.keys(u).length)returnnull;leth=!!y||!e?.match(/dsql.user/i)&&(!r||!!r.match(/^datasquirel$/)),g=y?l.A:h?o.A:i.A,D=Object.keys(u),A=[],E=[];for(lete=0;e<D.length;e++)try{lett=D[e],r=u[t],n=d?d?.fields?.filter(e=>e.fieldName===t):null,o=n&&n[0]?n[0]:null;if(null==r||void0==r)continue;leti=/<[^>]+>/g;(o?.richText||String(r).match(i))&&(r=a()(r,s.A)),o?.encrypted&&(r=(0,c.A)({data:r,encryptionKey:S,encryptionSalt:f})),"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"}}),A.push(`\`${t}\`=?`),"number"==typeofr?E.push(String(r)):E.push(r)}catch(e){console.log("DSQL: Error in parsing data keys in update function =>",e.message);continue}A.push(`date_updated='${Date()}'`),A.push(`date_updated_code='${Date.now()}'`);letL=`UPDATE \`${r}\`.\`${n}\` SET ${A.join(",")} WHERE \`${p}\`=?`;returnE.push(_),h?awaitg(L,E):awaitg({paradigm:t,queryString:L,queryValues:E})}},92652:(e,t,r)=>{r.d(t,{A:()=>n});letn={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2