mirror of
https://github.com/xiaoyiweb/YiAi.git
synced 2025-09-26 05:06:39 +08:00
1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
'use strict';const _0x132c7f=_0x5a7b;function _0x5a7b(_0x174571,_0x576c69){const _0x5658ed=_0x5658();return _0x5a7b=function(_0x5a7b27,_0x57296d){_0x5a7b27=_0x5a7b27-0xa3;let _0x179b3f=_0x5658ed[_0x5a7b27];return _0x179b3f;},_0x5a7b(_0x174571,_0x576c69);}function _0x5658(){const _0x520402=['setConfig','registerBaseUrl','registerSendModel3Count','hideString','payWechatStatus','super','Repository','baidu','getConfigs','hupi','post','payEpayApiPayUrl','vxNumber','firstRregisterSendModel4Count','1304648WlSHZg','payHupiStatus','__param','decorate','access_token','getSensitiveConfig','phoneRegisterStatus','setGptKeys','configs','clientHomePath','490132GqYxzR','mjHideNotBlock','getDiffArray','siteName','签到功能暂未开放!','log','wechatJsapiTicket','assign','aliPhoneAccessKeyId','getPhoneVerifyConfig','baiduTextStatus','12XABgLE','mjHideWorkIn','includes','baiduTextAccessToken','response','payEpayChannel','siteRobotName','还未配置微信的appId和secret、配置后才可进行微信扫码登录!!!','wechatOfficialAppSecret','salesAllowDrawMoney','3940767gFcZIz','gpt','every','tencent','nineAiToken','nineaiBuiltInSensitiveStatus','invitedGuestSendModel3Count','ISDEV','queryAllConfig','filter','chatGptKey','env','aliPhoneAccessKeySecret','getWechatAccessToken','default','&grant_type=client_credentials','epay','delete','debug','InjectRepository','invitedGuestSendDrawMjCount','payWeChatPrivateKey','inviteSendStatus','buyCramiAddress','length','onModuleInit','createOrUpdate','../chatLog/chatLog.entity','queryConfig','firstRegisterSendRank','2EfMXVu','data','获取微信access_token失败、错误信息:','1401150tTszhn','327247YwNtSL','queryPayType','save','设置配置信息错误!','inviteGiveSendModel4Count','&secret=','json','isAutoOpenNotice','function','initGetAllConfig','getNineAiToken','configVal','user','clientFavoIconPath','pay','https://aip.baidubce.com/oauth/2.0/token?client_id=','reduce','qqNumber','https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=','__esModule','payMpayChannel','缺失ip信息','@nestjs/common','设置完成!','6zKezUH','请配置正确的秘钥、当前秘钥检测不通过!','isShowAppCatIcon','get','globalConfigs','mjUseBaiduFy','nineaiBuiltInSensitiveApiBase','&type=jsapi','mjProxy','BAD_REQUEST','nineaiBuiltInSensitiveAuthKey','isVerifyEmail','initBaiduSensitive','ali','map','error','wechatAccessToken','wechat','ConfigEntity','__metadata','getSignatureGiftConfig','百度敏感词配置检测失败,您的参数可能配置的不正确!','baiduTextApiKey','GlobalConfigService','salesSeniorRatio','手机验证码功能暂未开放!','chatGptKey:','NINEAI','wechatOfficialAppId','MjdrawCount','configKey','HttpException','10471186HGPuSs','companyName','signInStatus','mjProxyImgUrl','copyrightTitle','chatLogEntity','HttpStatus','signInMjDrawToken','update','https://api.jiangly.com/api/permission/auth','object','Key','queryFrontConfig','&client_secret=','metadata','error_description','configEntity','wechatRegisterStatus','ticket','1646940JOjmPP','find','操作完成!','NAMESPACE','domain','baiduTextSecretKey','Logger','fetchJsapiTicket','phoneLoginStatus','OfficialService','请填写您的授权码','fetchBaseAccessToken','7tAUwFB','registerSendModel4Count','emailRegisterStatus','version','Status','error:\x20','payMpayStatus','utf-8','readFileSync','application/json','支付功能暂未开放!','TRUE','payEpayStatus','forEach','modelsService','cos','@nestjs/typeorm','typeorm','inviteGiveSendDrawMjCount','getNamespace','https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=','signInModel3Count','Like','noticeInfo','wechatSilentLoginStatus','inviteGiveSendModel3Count','queryGptKeys','ChatLogEntity','parse'];_0x5658=function(){return _0x520402;};return _0x5658();}(function(_0x2556ad,_0x2ccfdc){const _0x28a06b=_0x5a7b,_0xd5b7e0=_0x2556ad();while(!![]){try{const _0x3dddb5=-parseInt(_0x28a06b(0x129))/0x1*(parseInt(_0x28a06b(0x125))/0x2)+-parseInt(_0x28a06b(0xfd))/0x3*(parseInt(_0x28a06b(0xf2))/0x4)+-parseInt(_0x28a06b(0x128))/0x5*(parseInt(_0x28a06b(0x141))/0x6)+-parseInt(_0x28a06b(0xbd))/0x7*(parseInt(_0x28a06b(0xe8))/0x8)+parseInt(_0x28a06b(0x107))/0x9+parseInt(_0x28a06b(0xb1))/0xa+parseInt(_0x28a06b(0x161))/0xb;if(_0x3dddb5===_0x2ccfdc)break;else _0xd5b7e0['push'](_0xd5b7e0['shift']());}catch(_0x4e69ec){_0xd5b7e0['push'](_0xd5b7e0['shift']());}}}(_0x5658,0x47ba1));var __decorate=this&&this['__decorate']||function(_0x1b7832,_0x67d357,_0x40522f,_0x1407c6){const _0x14fb94=_0x5a7b;var _0x556034=arguments[_0x14fb94(0x11f)],_0x38b5a4=_0x556034<0x3?_0x67d357:_0x1407c6===null?_0x1407c6=Object['getOwnPropertyDescriptor'](_0x67d357,_0x40522f):_0x1407c6,_0x22254a;if(typeof Reflect===_0x14fb94(0xa8)&&typeof Reflect[_0x14fb94(0xeb)]===_0x14fb94(0x131))_0x38b5a4=Reflect[_0x14fb94(0xeb)](_0x1b7832,_0x67d357,_0x40522f,_0x1407c6);else{for(var _0x258185=_0x1b7832[_0x14fb94(0x11f)]-0x1;_0x258185>=0x0;_0x258185--)if(_0x22254a=_0x1b7832[_0x258185])_0x38b5a4=(_0x556034<0x3?_0x22254a(_0x38b5a4):_0x556034>0x3?_0x22254a(_0x67d357,_0x40522f,_0x38b5a4):_0x22254a(_0x67d357,_0x40522f))||_0x38b5a4;}return _0x556034>0x3&&_0x38b5a4&&Object['defineProperty'](_0x67d357,_0x40522f,_0x38b5a4),_0x38b5a4;},__metadata=this&&this[_0x132c7f(0x154)]||function(_0x558eaa,_0x4f9137){const _0x228a40=_0x132c7f;if(typeof Reflect===_0x228a40(0xa8)&&typeof Reflect[_0x228a40(0xac)]===_0x228a40(0x131))return Reflect[_0x228a40(0xac)](_0x558eaa,_0x4f9137);},__param=this&&this[_0x132c7f(0xea)]||function(_0x730b5,_0x1ccd5e){return function(_0x41634a,_0x2f190b){_0x1ccd5e(_0x41634a,_0x2f190b,_0x730b5);};};Object['defineProperty'](exports,_0x132c7f(0x13c),{'value':!![]}),exports[_0x132c7f(0x158)]=void 0x0;const models_service_1=require('../models/models.service'),chatLog_entity_1=require(_0x132c7f(0x122)),common_1=require(_0x132c7f(0x13f)),config_entity_1=require('./config.entity'),typeorm_1=require(_0x132c7f(0xcd)),typeorm_2=require(_0x132c7f(0xce)),utils_1=require('../../common/utils'),axios_1=require('axios'),fs=require('fs'),packageJsonContent=fs[_0x132c7f(0xc5)]('package.json',_0x132c7f(0xc4)),packageJson=JSON[_0x132c7f(0xd9)](packageJsonContent),version=packageJson[_0x132c7f(0xc0)];console[_0x132c7f(0xf7)]('\x20current\x20use\x20version\x20in\x20------>:\x20',version);let GlobalConfigService=class GlobalConfigService{constructor(_0x49d235,_0x200af8,_0x35e0ee){const _0x40aa24=_0x132c7f;this[_0x40aa24(0xae)]=_0x49d235,this[_0x40aa24(0xa3)]=_0x200af8,this[_0x40aa24(0xcb)]=_0x35e0ee,this[_0x40aa24(0x145)]={},this[_0x40aa24(0x10b)]=!![];}async[_0x132c7f(0x120)](){await this['initGetAllConfig']();}async[_0x132c7f(0xe2)](_0xae35a6){const _0x4741e3=_0x132c7f;if(_0xae35a6[_0x4741e3(0x11f)]===0x0)return;if(_0xae35a6[_0x4741e3(0xff)](_0x4741e3(0x151))&&_0xae35a6[_0x4741e3(0x11f)]===0x1)return this[_0x4741e3(0x151)];if(_0xae35a6[_0x4741e3(0xff)](_0x4741e3(0xf8))&&_0xae35a6[_0x4741e3(0x11f)]===0x1)return this[_0x4741e3(0xf8)];if(_0xae35a6[_0x4741e3(0x11f)]===0x1)return this[_0x4741e3(0x145)][_0xae35a6[0x0]];else{const _0x5d4f3b={};return _0xae35a6[_0x4741e3(0xca)](_0xc4dd22=>_0x5d4f3b[_0xc4dd22]=this[_0x4741e3(0x145)][_0xc4dd22]),_0x5d4f3b;}}async[_0x132c7f(0x132)](){const _0x2f0f2b=_0x132c7f,_0xf5e17c=await this[_0x2f0f2b(0xae)]['find']();this[_0x2f0f2b(0x145)]=_0xf5e17c[_0x2f0f2b(0x139)]((_0xd17d18,_0x314cb4)=>{const _0x4a1b4c=_0x2f0f2b;return _0xd17d18[_0x314cb4['configKey']]=_0x314cb4[_0x4a1b4c(0x134)],_0xd17d18;},{}),this[_0x2f0f2b(0x14d)]();}async[_0x132c7f(0x14d)](_0x2a5b66=!![]){const _0x230bf1=_0x132c7f,{baiduTextApiKey:_0x38f1c6,baiduTextSecretKey:_0x1407b6}=await this[_0x230bf1(0xe2)](['baiduTextApiKey',_0x230bf1(0xb6)]);if(!_0x38f1c6||!_0x1407b6){common_1[_0x230bf1(0xb7)][_0x230bf1(0x150)]('百度敏感词初始化失败,如果需要敏感检测、请前往后台系统配置!',_0x230bf1(0x158));return;}const _0x3f48f3={'Content-Type':_0x230bf1(0xc6),'Accept':_0x230bf1(0xc6)},_0x1008be=_0x230bf1(0x138)+_0x38f1c6+_0x230bf1(0xab)+_0x1407b6+_0x230bf1(0x116);try{const _0x5f0136=await axios_1[_0x230bf1(0x115)][_0x230bf1(0xe4)](_0x1008be,{'headers':_0x3f48f3});this[_0x230bf1(0x145)][_0x230bf1(0x100)]=_0x5f0136['data'][_0x230bf1(0xec)];}catch(_0x57017d){if(_0x2a5b66)common_1[_0x230bf1(0xb7)][_0x230bf1(0x150)](_0x230bf1(0x156),_0x230bf1(0x158));else throw new common_1[(_0x230bf1(0x160))](_0x57017d[_0x230bf1(0x101)][_0x230bf1(0x126)][_0x230bf1(0xad)],common_1['HttpStatus'][_0x230bf1(0x14a)]);}}async[_0x132c7f(0x114)](_0x961725=![]){const _0x3a0483=_0x132c7f,{wechatOfficialAppId:_0x424739,wechatOfficialAppSecret:_0x1f79af}=await this['getConfigs']([_0x3a0483(0x15d),_0x3a0483(0x105)]);if(!_0x424739||!_0x1f79af)return common_1[_0x3a0483(0xb7)][_0x3a0483(0x150)](_0x3a0483(0x104),_0x3a0483(0xba));this[_0x3a0483(0x151)]=await this['fetchBaseAccessToken'](_0x424739,_0x1f79af,_0x961725),this[_0x3a0483(0xf8)]=await this['fetchJsapiTicket'](this[_0x3a0483(0x151)]),common_1[_0x3a0483(0xb7)][_0x3a0483(0xf7)]('wechat\x20refresh\x20access_token\x20\x20==>\x20'+this[_0x3a0483(0x151)],_0x3a0483(0xba));}async[_0x132c7f(0xbc)](_0x20a513,_0x26318e,_0x3c4a17=![]){const _0x63d53f=_0x132c7f;if(process['env']['ISDEV']==='TRUE'){this[_0x63d53f(0x151)]='';return;}const {data:{errmsg:_0x25403c,access_token:_0x29d3b4}}=await axios_1[_0x63d53f(0x115)][_0x63d53f(0x144)](_0x63d53f(0x13b)+_0x20a513+_0x63d53f(0x12e)+_0x26318e);if(_0x25403c){if(_0x3c4a17)common_1[_0x63d53f(0xb7)][_0x63d53f(0x150)](_0x63d53f(0x127)+_0x25403c,_0x63d53f(0xba));else throw new common_1['HttpException'](_0x63d53f(0x142),common_1[_0x63d53f(0xa4)]['BAD_REQUEST']);return'';}return _0x29d3b4;}async[_0x132c7f(0xb8)](_0x15b71c){const _0x5c731e=_0x132c7f;var _0xd732a6;if(process[_0x5c731e(0x112)][_0x5c731e(0x10e)]===_0x5c731e(0xc8)){this[_0x5c731e(0xf8)]='';return;}const _0x38aad2=await axios_1[_0x5c731e(0x115)][_0x5c731e(0x144)](_0x5c731e(0xd1)+_0x15b71c+_0x5c731e(0x148));return(_0xd732a6=_0x38aad2===null||_0x38aad2===void 0x0?void 0x0:_0x38aad2[_0x5c731e(0x126)])===null||_0xd732a6===void 0x0?void 0x0:_0xd732a6[_0x5c731e(0xb0)];}async[_0x132c7f(0x10f)](_0x36e2d3){const _0x3b325b=_0x132c7f,{role:_0x1b5889}=_0x36e2d3[_0x3b325b(0x135)];return this[_0x3b325b(0x145)];}async[_0x132c7f(0xaa)](_0x865202,_0x49f7a2){const _0x14b459=_0x132c7f,_0x1e44c6=[_0x14b459(0xe6),'registerSendStatus',_0x14b459(0xdc),_0x14b459(0xbe),'registerSendDrawMjCount','firstRegisterSendStatus',_0x14b459(0x124),'firstRregisterSendModel3Count',_0x14b459(0xe7),'firstRregisterSendDrawMjCount',_0x14b459(0x11d),_0x14b459(0xd6),_0x14b459(0x12d),_0x14b459(0xcf),_0x14b459(0x10d),'invitedGuestSendModel4Count',_0x14b459(0x11b),_0x14b459(0xf1),'clientLogoPath',_0x14b459(0x136),'isUseWxLogin','siteName','robotAvatar',_0x14b459(0x103),_0x14b459(0x11e),'mindDefaultData','baiduCode',_0x14b459(0x102),_0x14b459(0x13d),_0x14b459(0xe5),_0x14b459(0xc9),_0x14b459(0xe9),_0x14b459(0xde),'payMpayStatus',_0x14b459(0x130),_0x14b459(0x143),'salesBaseRatio',_0x14b459(0x159),_0x14b459(0x106),_0x14b459(0x162),'filingNumber',_0x14b459(0xee),_0x14b459(0xbf),'emailLoginStatus',_0x14b459(0xb9),_0x14b459(0xaf),_0x14b459(0xd5),_0x14b459(0x163),'signInModel3Count','signInModel4Count',_0x14b459(0xa5),'appMenuHeaderTips','appMenuHeaderBgUrl',_0x14b459(0x146),_0x14b459(0xf3),_0x14b459(0xfe),_0x14b459(0x14c)],_0x4d05e2=await this[_0x14b459(0xae)][_0x14b459(0xb2)]({'where':{'configKey':(0x0,typeorm_2['In'])(_0x1e44c6)}}),{domain:_0x5c874c}=_0x865202,_0x568d16=this[_0x14b459(0x145)][_0x14b459(0xb5)];_0x568d16!==_0x5c874c&&(this[_0x14b459(0x121)]({'configKey':_0x14b459(0xb5),'configVal':_0x5c874c,'status':0x1}),await this['initGetAllConfig']());const _0x3334ae=_0x4d05e2[_0x14b459(0x139)]((_0x33d4b5,_0xcb572f)=>{const _0x92be21=_0x14b459;return _0x33d4b5[_0xcb572f[_0x92be21(0x15f)]]=_0xcb572f[_0x92be21(0x134)],_0x33d4b5;},{}),{wechatOfficialAppId:_0x8ae9b4,wechatOfficialAppSecret:_0x48d79d}=await this[_0x14b459(0xe2)]([_0x14b459(0x15d),'wechatOfficialAppSecret']),_0x567e97=!!(_0x8ae9b4&&_0x48d79d);return Object[_0x14b459(0xf9)](Object['assign']({},_0x3334ae),{'isUseWxLogin':_0x567e97});}async[_0x132c7f(0xd7)](_0x418e43){const _0x58e489=_0x132c7f,{role:_0x2c13c8}=_0x418e43['user'],_0x42d515=await this[_0x58e489(0xae)]['find']({'where':{'configKey':(0x0,typeorm_2[_0x58e489(0xd3)])('%'+_0x58e489(0x111)+'%')}});if(_0x2c13c8===_0x58e489(0xdf))return _0x42d515;return _0x42d515[_0x58e489(0x14f)](_0x2c90e2=>{const _0x5b786f=_0x58e489;return _0x2c90e2[_0x5b786f(0x134)]=(0x0,utils_1[_0x5b786f(0xdd)])(_0x2c90e2[_0x5b786f(0x134)]),_0x2c90e2;});}async[_0x132c7f(0xef)](_0x2d04e8){const _0x2b2dba=_0x132c7f,_0x536b0c=_0x2d04e8[_0x2b2dba(0xf0)][_0x2b2dba(0x110)](_0x1de5ca=>_0x1de5ca[_0x2b2dba(0x134)]),_0x15ab4c=_0x536b0c[_0x2b2dba(0x14f)](_0x506f12=>_0x506f12[_0x2b2dba(0x15f)]);for(const [_0x385df0,_0x34534f]of _0x536b0c['entries']()){const {configKey:_0x4dd634,configVal:_0x33b226,status:_0x46571e}=_0x34534f;await this['createOrUpdate']({'configKey':_0x2b2dba(0x15b)+(_0x385df0+0x1),'configVal':_0x33b226,'status':_0x46571e});}const _0x29fc73=await this[_0x2b2dba(0xae)][_0x2b2dba(0xb2)]({'where':{'configKey':(0x0,typeorm_2[_0x2b2dba(0xd3)])('%'+_0x2b2dba(0x111)+'%')}}),_0x11182a=_0x29fc73[_0x2b2dba(0x14f)](_0x1f457a=>_0x1f457a['configKey']);if(_0x11182a[_0x2b2dba(0x11f)]>_0x15ab4c[_0x2b2dba(0x11f)]){const _0x19bbc4=(0x0,utils_1[_0x2b2dba(0xf4)])(_0x11182a[_0x2b2dba(0x11f)],_0x15ab4c[_0x2b2dba(0x11f)],_0x2b2dba(0x15b));for(const _0x2ab964 of _0x19bbc4){await this[_0x2b2dba(0xae)][_0x2b2dba(0x118)]({'configKey':_0x2ab964});}}return await this[_0x2b2dba(0x132)](),_0x2b2dba(0xb3);}async[_0x132c7f(0x123)](_0x1f34b9,_0x13ee6f){const _0x59ad51=_0x132c7f,{role:_0x5af5e7}=_0x13ee6f['user'],{keys:_0x4fd030}=_0x1f34b9,_0x2629f0=await this[_0x59ad51(0xae)][_0x59ad51(0xb2)]({'where':{'configKey':(0x0,typeorm_2['In'])(_0x4fd030)}});return _0x5af5e7!==_0x59ad51(0xdf)&&_0x2629f0['forEach'](_0x441621=>{const _0x5322eb=_0x59ad51;if(_0x441621[_0x5322eb(0x15f)]['includes']('mj')||_0x441621['configKey'][_0x5322eb(0xff)](_0x5322eb(0xa9))||_0x441621[_0x5322eb(0x15f)][_0x5322eb(0xff)](_0x5322eb(0x108))||_0x441621['configKey'][_0x5322eb(0xff)](_0x5322eb(0xcc))||_0x441621['configKey'][_0x5322eb(0xff)](_0x5322eb(0xe1))||_0x441621[_0x5322eb(0x15f)][_0x5322eb(0xff)](_0x5322eb(0x14e))||_0x441621[_0x5322eb(0x15f)][_0x5322eb(0xff)](_0x5322eb(0x10a))||_0x441621[_0x5322eb(0x15f)][_0x5322eb(0xff)](_0x5322eb(0x137))||_0x441621['configKey']['includes'](_0x5322eb(0x152))||_0x441621[_0x5322eb(0x15f)]['includes'](_0x5322eb(0x164))||_0x441621['configKey']==='openaiBaseUrl'){const _0x452884=['payWeChatPublicKey',_0x5322eb(0x11c)];if(_0x452884[_0x5322eb(0xff)](_0x441621[_0x5322eb(0x15f)]))return _0x441621[_0x5322eb(0x134)]=(0x0,utils_1[_0x5322eb(0xdd)])(_0x441621[_0x5322eb(0x134)],'隐私内容、非超级管理员无权查看');const _0x3c837e=['payEpayStatus',_0x5322eb(0xe9),_0x5322eb(0x149)];!_0x3c837e[_0x5322eb(0xff)](_0x441621['configKey'])&&!_0x441621[_0x5322eb(0x15f)][_0x5322eb(0xff)](_0x5322eb(0xc1))&&(_0x441621[_0x5322eb(0x134)]=(0x0,utils_1['hideString'])(_0x441621[_0x5322eb(0x134)]));}}),_0x2629f0[_0x59ad51(0x139)]((_0x5da98b,_0x138145)=>{const _0x5327e3=_0x59ad51;return _0x5da98b[_0x138145[_0x5327e3(0x15f)]]=_0x138145[_0x5327e3(0x134)],_0x5da98b;},{});}[_0x132c7f(0x133)](){const _0x5442a3=_0x132c7f,_0x15951d=this[_0x5442a3(0x145)][_0x5442a3(0x15e)],_0x187bab=this[_0x5442a3(0x10b)];return!_0x187bab||Number(_0x15951d)===0x1;}async[_0x132c7f(0xda)](_0x17e32c){const _0x1aaef4=_0x132c7f;try{const {settings:_0x234315}=_0x17e32c;for(const _0x2b0e42 of _0x234315){await this[_0x1aaef4(0x121)](_0x2b0e42);}await this[_0x1aaef4(0x132)]();const _0x1148ce=_0x234315['map'](_0x39d273=>_0x39d273['configKey']);return(_0x1148ce[_0x1aaef4(0xff)](_0x1aaef4(0x157))||_0x1148ce['includes'](_0x1aaef4(0xb6)))&&await this[_0x1aaef4(0x14d)](![]),(_0x1148ce[_0x1aaef4(0xff)](_0x1aaef4(0x15d))||_0x1148ce[_0x1aaef4(0xff)]('wechatOfficialAppSecret'))&&await this[_0x1aaef4(0x114)](),_0x1aaef4(0x140);}catch(_0x2aba60){console[_0x1aaef4(0xf7)](_0x1aaef4(0xc2),_0x2aba60);}}async[_0x132c7f(0x121)](_0x5270ef){const _0x46e430=_0x132c7f;try{const {configKey:_0x5827aa,configVal:_0x645dcb,status:status=0x1}=_0x5270ef,_0x34e4b5=await this[_0x46e430(0xae)]['findOne']({'where':{'configKey':_0x5827aa}});if(_0x34e4b5){const _0x30f8db=await this[_0x46e430(0xae)][_0x46e430(0xa6)]({'configKey':_0x5827aa},{'configVal':_0x645dcb,'status':status});}else{const _0x48373c=await this[_0x46e430(0xae)][_0x46e430(0x12b)]({'configKey':_0x5827aa,'configVal':_0x645dcb,'status':status});}}catch(_0x3ef25d){console[_0x46e430(0xf7)](_0x46e430(0xc2),_0x3ef25d);throw new common_1[(_0x46e430(0x160))](_0x46e430(0x12c),common_1[_0x46e430(0xa4)]['BAD_REQUEST']);}}async['queryNotice'](){const _0x27b465=_0x132c7f;return await this[_0x27b465(0xe2)]([_0x27b465(0xd4),'noticeTitle']);}async['getCopyright'](){const _0x4893d9=_0x132c7f;return await this[_0x4893d9(0xe2)](['copyrightUrl',_0x4893d9(0x165)]);}async[_0x132c7f(0x12a)](){const _0x2ac12f=_0x132c7f,{payHupiStatus:payHupiStatus=0x0,payEpayStatus:payEpayStatus=0x0,payWechatStatus:payWechatStatus=0x0,payMpayStatus:payMpayStatus=0x0}=await this[_0x2ac12f(0xe2)](['payHupiStatus',_0x2ac12f(0xc9),_0x2ac12f(0xc3),_0x2ac12f(0xde)]);if([payHupiStatus,payEpayStatus,payWechatStatus,payMpayStatus][_0x2ac12f(0x109)](_0x3c9f7b=>_0x3c9f7b===0x0))throw new common_1[(_0x2ac12f(0x160))](_0x2ac12f(0xc7),common_1[_0x2ac12f(0xa4)]['BAD_REQUEST']);if(Number(payWechatStatus)===0x1)return'wechat';if(Number(payEpayStatus)===0x1)return _0x2ac12f(0x117);if(Number(payMpayStatus)===0x1)return'mpay';if(Number(payHupiStatus)===0x1)return _0x2ac12f(0xe3);}async['getAuthInfo'](){const _0x2f8480=_0x132c7f,{siteName:_0x1fa37d,qqNumber:_0x17d4f2,vxNumber:_0xb78f0e,registerBaseUrl:_0x4ee66a,domain:_0x250323}=await this['getConfigs']([_0x2f8480(0xf5),_0x2f8480(0x13a),_0x2f8480(0xe6),_0x2f8480(0xdb),_0x2f8480(0xb5)]);return{'siteName':_0x1fa37d,'qqNumber':_0x17d4f2,'vxNumber':_0xb78f0e,'registerBaseUrl':_0x4ee66a,'domain':_0x250323};}async[_0x132c7f(0xfb)](){const _0x118463=_0x132c7f,{phoneRegisterStatus:_0x3e6da5,aliPhoneAccessKeyId:_0x32d140,aliPhoneAccessKeySecret:_0x40c735,aliPhoneSignName:_0x1ca057,aliPhoneTemplateCode:_0x49d25b}=await this[_0x118463(0xe2)]([_0x118463(0xee),_0x118463(0xfa),_0x118463(0x113),'aliPhoneSignName','aliPhoneTemplateCode']);if(Number(_0x3e6da5)!==0x1)throw new common_1[(_0x118463(0x160))](_0x118463(0x15a),common_1[_0x118463(0xa4)][_0x118463(0x14a)]);return{'accessKeyId':_0x32d140,'accessKeySecret':_0x40c735,'SignName':_0x1ca057,'TemplateCode':_0x49d25b};}[_0x132c7f(0xd0)](){const _0x597a00=_0x132c7f;return process['env'][_0x597a00(0xb4)]||_0x597a00(0x15c);}async[_0x132c7f(0x155)](){const _0x307004=_0x132c7f,{signInStatus:signInStatus=0x0,signInModel3Count:signInModel3Count=0x0,signInModel4Count:signInModel4Count=0x0,signInMjDrawToken:signInMjDrawToken=0x0}=await this[_0x307004(0xe2)]([_0x307004(0x163),_0x307004(0xd2),'signInModel4Count',_0x307004(0xa5)]);if(Number(signInStatus)!==0x1)throw new common_1[(_0x307004(0x160))](_0x307004(0xf6),common_1[_0x307004(0xa4)][_0x307004(0x14a)]);return{'model3Count':Number(signInModel3Count),'model4Count':Number(signInModel4Count),'drawMjCount':Number(signInMjDrawToken)};}async['auth'](){const _0x1cc71a=_0x132c7f,_0x514009=_0x1cc71a(0xa7),_0x5c9fd9=await fetch(_0x514009,{}),_0xea4ca9=await _0x5c9fd9[_0x1cc71a(0x12f)](),{success:success=!![],message:_0x42bb78}=_0xea4ca9;common_1[_0x1cc71a(0xb7)]['error']('请按要求填写正确的授权信息'),common_1['Logger'][_0x1cc71a(0x150)](_0x1cc71a(0xbb)),common_1[_0x1cc71a(0xb7)][_0x1cc71a(0x150)](_0x1cc71a(0x13e)),common_1[_0x1cc71a(0xb7)][_0x1cc71a(0x150)](_0x1cc71a(0x13e)),common_1[_0x1cc71a(0xb7)][_0x1cc71a(0x119)]('感谢您使用NineAi、祝您使用愉快~');}async[_0x132c7f(0xed)](){const _0x56ed70=_0x132c7f,{baiduTextStatus:baiduTextStatus=0x0,baiduTextAccessToken:_0x25284a,nineaiBuiltInSensitiveStatus:nineaiBuiltInSensitiveStatus=0x0,nineaiBuiltInSensitiveApiBase:_0x7afaeb,nineaiBuiltInSensitiveAuthKey:_0x2a1241}=await this[_0x56ed70(0xe2)]([_0x56ed70(0xfc),_0x56ed70(0x100),_0x56ed70(0x10c),_0x56ed70(0x147),_0x56ed70(0x14b)]);if(Number(baiduTextStatus)===0x1)return{'useType':'baidu','baiduTextAccessToken':_0x25284a};if(Number(nineaiBuiltInSensitiveStatus)===0x1)return{'useType':'nineai','nineaiBuiltInSensitiveApiBase':_0x7afaeb,'nineaiBuiltInSensitiveAuthKey':_0x2a1241};return null;}};GlobalConfigService=__decorate([(0x0,common_1['Injectable'])(),__param(0x0,(0x0,typeorm_1[_0x132c7f(0x11a)])(config_entity_1[_0x132c7f(0x153)])),__param(0x1,(0x0,typeorm_1['InjectRepository'])(chatLog_entity_1[_0x132c7f(0xd8)])),__metadata('design:paramtypes',[typeorm_2[_0x132c7f(0xe0)],typeorm_2[_0x132c7f(0xe0)],models_service_1['ModelsService']])],GlobalConfigService),exports[_0x132c7f(0x158)]=GlobalConfigService; |