'use strict';const _0x16c655=_0x32cc;function _0x32cc(_0x11a5c8,_0x50def4){const _0xd0b142=_0xd0b1();return _0x32cc=function(_0x32cc09,_0x1e8ee1){_0x32cc09=_0x32cc09-0x1cc;let _0x58bb02=_0xd0b142[_0x32cc09];return _0x58bb02;},_0x32cc(_0x11a5c8,_0x50def4);}(function(_0x359de1,_0x56dd8c){const _0x7291eb=_0x32cc,_0x275d84=_0x359de1();while(!![]){try{const _0x24c893=-parseInt(_0x7291eb(0x20b))/0x1+-parseInt(_0x7291eb(0x1d3))/0x2+-parseInt(_0x7291eb(0x1d4))/0x3*(parseInt(_0x7291eb(0x22d))/0x4)+-parseInt(_0x7291eb(0x1f3))/0x5+-parseInt(_0x7291eb(0x1dd))/0x6*(parseInt(_0x7291eb(0x1ee))/0x7)+parseInt(_0x7291eb(0x1d2))/0x8+parseInt(_0x7291eb(0x225))/0x9;if(_0x24c893===_0x56dd8c)break;else _0x275d84['push'](_0x275d84['shift']());}catch(_0x5908e3){_0x275d84['push'](_0x275d84['shift']());}}}(_0xd0b1,0x250bd));function _0xd0b1(){const _0x5a3cac=['7722387nPNKvV','crypto','getWechatAccessToken','officialAutoReplyText','getJsapiTicket','getTime','loginByCode','function','688nRAyyl','HttpStatus','getConfigs','aotoPlay','tousername','../../common/utils','fetchQRCodeTicket','×tamp=','authService','chatSyncFree','../auth/auth.service','186072gBGINp','343106qcusAV','255styROw','now','metadata','AutoreplyService','createRandomNonceStr','sort','&response_type=code&scope=snsapi_base&state=weChatLogin#wechat_redirect','wechatAccessToken','来自公众号的询问问题\x20=======>\x20','3126pELSIP','Injectable','getUserById','bindWx','log','__esModule','QR_STR_SCENE','post','decorate','hex','user',']]>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20超时导致问题无法回答完整','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20','scan','GlobalConfigService','loginByOpenId','wechatOfficialAppSecret','wechatOfficialAppId','genXmlMsgByConfig','fromusername','sha1','default','https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=','split','join','138520TyeGCM','chatgptService','BAD_REQUEST','getRedirectUrl','loginBySceneStr','design:paramtypes','&noncestr=','wechatOfficialToken',']]>\x0a\x20\x20\x20\x20','&redirect_uri=','getOwnPropertyDescriptor','jsapi_ticket=','回跳跳转地址:\x20','autoreplyService','scanedSceneStrMap','bindWxBySceneStr','axios','getUserFromOpenId','getQRSceneStr','__metadata','非法参数','ChatgptService','UserService','../autoreply/autoreply.service','由于公众号的回复限制、过长的问题我们可能无法回复、您可以前往我们的官方站点享受更加完善的服务、如果您有更多问题、欢迎像我提问!','globalConfigService'];_0xd0b1=function(){return _0x5a3cac;};return _0xd0b1();}var __decorate=this&&this['__decorate']||function(_0x41ee4e,_0x45615e,_0x5324bc,_0x1a150c){const _0x429cfc=_0x32cc;var _0x1e367f=arguments[_0x429cfc(0x1f5)],_0x53870c=_0x1e367f<0x3?_0x45615e:_0x1a150c===null?_0x1a150c=Object[_0x429cfc(0x215)](_0x45615e,_0x5324bc):_0x1a150c,_0x49f75d;if(typeof Reflect==='object'&&typeof Reflect['decorate']==='function')_0x53870c=Reflect[_0x429cfc(0x1e5)](_0x41ee4e,_0x45615e,_0x5324bc,_0x1a150c);else{for(var _0x1cbb6f=_0x41ee4e['length']-0x1;_0x1cbb6f>=0x0;_0x1cbb6f--)if(_0x49f75d=_0x41ee4e[_0x1cbb6f])_0x53870c=(_0x1e367f<0x3?_0x49f75d(_0x53870c):_0x1e367f>0x3?_0x49f75d(_0x45615e,_0x5324bc,_0x53870c):_0x49f75d(_0x45615e,_0x5324bc))||_0x53870c;}return _0x1e367f>0x3&&_0x53870c&&Object['defineProperty'](_0x45615e,_0x5324bc,_0x53870c),_0x53870c;},__metadata=this&&this[_0x16c655(0x21e)]||function(_0x8fa642,_0x2926ab){const _0x32431c=_0x16c655;if(typeof Reflect==='object'&&typeof Reflect['metadata']===_0x32431c(0x22c))return Reflect[_0x32431c(0x1d6)](_0x8fa642,_0x2926ab);};Object['defineProperty'](exports,_0x16c655(0x1e2),{'value':!![]}),exports[_0x16c655(0x1fc)]=void 0x0;const chatgpt_service_1=require('../chatgpt/chatgpt.service'),globalConfig_service_1=require(_0x16c655(0x1ec)),auth_service_1=require(_0x16c655(0x1d1)),user_service_1=require(_0x16c655(0x1f7)),autoreply_service_1=require(_0x16c655(0x222)),common_1=require(_0x16c655(0x1eb)),crypto=require(_0x16c655(0x226)),axios_1=require(_0x16c655(0x21b)),utils_1=require(_0x16c655(0x1cc));let OfficialService=class OfficialService{constructor(_0x381c03,_0x5aeb9a,_0xee057f,_0x1c1a56,_0x53ca81){const _0x7152b3=_0x16c655;this[_0x7152b3(0x218)]=_0x381c03,this[_0x7152b3(0x1fb)]=_0x5aeb9a,this[_0x7152b3(0x1cf)]=_0xee057f,this[_0x7152b3(0x224)]=_0x1c1a56,this[_0x7152b3(0x20c)]=_0x53ca81,this[_0x7152b3(0x1f4)]={},this['scanedSceneStrMap']={};}async['onModuleInit'](){const _0x19d74e=_0x16c655;await this[_0x19d74e(0x224)][_0x19d74e(0x227)](!![]);}async[_0x16c655(0x21d)](_0x51d915){const _0x49c011=_0x16c655,{invitedBy:_0x1ce66f}=_0x51d915;let _0x16cc71=(0x0,utils_1[_0x49c011(0x1d8)])(0x20);return _0x1ce66f&&(_0x16cc71+=':'+_0x1ce66f),this[_0x49c011(0x1f4)][_0x16cc71]=!![],_0x16cc71;}async[_0x16c655(0x1ed)](_0x5b9fcd){const _0xd933e5=_0x16c655,{id:_0x3a17ac}=_0x5b9fcd[_0xd933e5(0x1e7)],_0x479172=(0x0,utils_1[_0xd933e5(0x1d8)])(0x20)+'/'+_0x3a17ac;return this[_0xd933e5(0x1f4)][_0x479172]=!![],_0x479172;}async['getQRCodeTicket'](_0x2db510){const _0xfa9256=_0x16c655;return this[_0xfa9256(0x1cd)](_0x2db510);}async[_0x16c655(0x20e)](_0x4c6806){const _0x37dfd9=_0x16c655,_0x34bf27=await this[_0x37dfd9(0x224)]['getConfigs']([_0x37dfd9(0x203)]),_0x43113b='https://open.weixin.qq.com/connect/oauth2/authorize?appid='+_0x34bf27+_0x37dfd9(0x214)+encodeURIComponent(_0x4c6806)+_0x37dfd9(0x1da);return console[_0x37dfd9(0x1e1)](_0x37dfd9(0x217),_0x43113b),_0x43113b;}async[_0x16c655(0x229)](_0x4f4821){const _0x4e606c=_0x16c655,_0x31a103=(0x0,utils_1[_0x4e606c(0x1d8)])(0x20),_0x5cbd61=(Date[_0x4e606c(0x1d5)]()/0x3e8)['toFixed'](0x0),_0x48f5a0=await this[_0x4e606c(0x224)][_0x4e606c(0x22f)](['wechatJsapiTicket']);console['log']('jsapiTicket:\x20',_0x48f5a0);const _0x5c4be0=await this[_0x4e606c(0x224)]['getConfigs']([_0x4e606c(0x203)]);console[_0x4e606c(0x1e1)](_0x4e606c(0x1f8),_0x5c4be0);const _0x5b1134=_0x4e606c(0x216)+_0x48f5a0+_0x4e606c(0x211)+_0x31a103+_0x4e606c(0x1ce)+_0x5cbd61+'&url='+_0x4f4821;console[_0x4e606c(0x1e1)]('str:\x20',_0x5b1134);const _0x4005c3=this[_0x4e606c(0x206)](_0x5b1134);return{'appId':_0x5c4be0,'nonceStr':_0x31a103,'timestamp':_0x5cbd61,'signature':_0x4005c3};}async[_0x16c655(0x1cd)](_0x43c3df){const _0x2331d5=_0x16c655,_0x349660=await this[_0x2331d5(0x224)]['getConfigs']([_0x2331d5(0x1db)]),_0xe8ec48={'action_name':_0x2331d5(0x1e3),'action_info':{'scene':{'scene_str':_0x43c3df}}},_0x2a0fe5=await axios_1[_0x2331d5(0x207)][_0x2331d5(0x1e4)](_0x2331d5(0x208)+_0x349660,_0xe8ec48),{data:{errmsg:_0x24f617,ticket:_0x57106b}}=_0x2a0fe5;if(_0x24f617)throw new common_1[(_0x2331d5(0x1e9))](_0x24f617,common_1[_0x2331d5(0x22e)][_0x2331d5(0x20d)]);return _0x57106b;}async[_0x16c655(0x22b)](_0x5368da,_0x3e1335){const _0x408cd9=_0x16c655,_0x5410cb=await this['globalConfigService'][_0x408cd9(0x22f)]([_0x408cd9(0x203)]),_0x5a4f24=await this[_0x408cd9(0x224)][_0x408cd9(0x22f)]([_0x408cd9(0x202)]),_0x1c2ecc=await axios_1[_0x408cd9(0x207)]['get']('https://api.weixin.qq.com/sns/oauth2/access_token?appid='+_0x5410cb+_0x408cd9(0x1f2)+_0x5a4f24+'&code='+_0x3e1335+_0x408cd9(0x1fa)),{data:{errmsg:_0x3f311c,openid:_0x5cdea1}}=_0x1c2ecc;if(_0x3f311c)throw new common_1[(_0x408cd9(0x1e9))](_0x3f311c,common_1[_0x408cd9(0x22e)][_0x408cd9(0x20d)]);let _0x5e0ef7;return _0x5e0ef7=await this['userService']['getUserOpenId'](_0x5cdea1),!_0x5e0ef7&&(_0x5e0ef7=await this['userService']['getUserFromOpenId'](_0x5cdea1)),this[_0x408cd9(0x1cf)][_0x408cd9(0x201)](_0x5e0ef7,_0x5368da);}async[_0x16c655(0x1ff)](_0x2199a8,_0x4183e8){const _0x5737bf=_0x16c655;if(!this[_0x5737bf(0x1f4)][_0x4183e8])throw new common_1[(_0x5737bf(0x1e9))](_0x5737bf(0x21f),common_1['HttpStatus'][_0x5737bf(0x20d)]);const _0x271395=await this[_0x5737bf(0x1fb)][_0x5737bf(0x21c)](_0x2199a8,_0x4183e8);this[_0x5737bf(0x219)][_0x4183e8]=_0x271395['id'];}async[_0x16c655(0x20f)](_0x22a941,_0x47b608){const _0x1ccdb3=_0x16c655;if(!this[_0x1ccdb3(0x1f4)][_0x47b608])return;const _0x4443f5=this[_0x1ccdb3(0x219)][_0x47b608];if(!_0x4443f5)return'';const _0x2f8ddc=await this[_0x1ccdb3(0x1fb)][_0x1ccdb3(0x1df)](_0x4443f5);return delete this[_0x1ccdb3(0x219)][_0x47b608],this[_0x1ccdb3(0x1cf)][_0x1ccdb3(0x201)](_0x2f8ddc,_0x22a941);}async[_0x16c655(0x1f9)](_0x556134,_0x34b32c){const _0x408b4a=_0x16c655;if(!this[_0x408b4a(0x1f4)][_0x34b32c])throw new common_1[(_0x408b4a(0x1e9))]('非法参数',common_1[_0x408b4a(0x22e)]['BAD_REQUEST']);const _0x528512=_0x34b32c[_0x408b4a(0x209)]('/')[0x1],_0xf955cb=await this[_0x408b4a(0x1fb)][_0x408b4a(0x1e0)](_0x556134,_0x528512);this[_0x408b4a(0x219)][_0x34b32c]=_0xf955cb;}async[_0x16c655(0x21a)](_0x3c7f48,_0x1cb431){const _0x8c7f98=_0x16c655;if(!this[_0x8c7f98(0x1f4)][_0x1cb431])throw new common_1['HttpException'](_0x8c7f98(0x21f),common_1[_0x8c7f98(0x22e)]['BAD_REQUEST']);const {id:_0x9fadc8}=_0x3c7f48['user'],_0x3ae0ca=this['scanedSceneStrMap'][_0x1cb431];if(!_0x3ae0ca)return'';return delete this['scanedSceneStrMap'][_0x1cb431],_0x3ae0ca;}async[_0x16c655(0x1fd)](_0x4aae88,_0x34a423,_0x580034){const _0x56b923=_0x16c655,_0x2bc492=await this[_0x56b923(0x224)][_0x56b923(0x22f)]([_0x56b923(0x212)])||'jiangly';return await this[_0x56b923(0x206)]([_0x2bc492,_0x34a423,_0x580034][_0x56b923(0x1d9)]()[_0x56b923(0x20a)](''))==_0x4aae88;}['sha1'](_0x36d987){const _0x5b0a41=_0x16c655;return crypto['createHash'](_0x5b0a41(0x206))['update'](_0x36d987)[_0x5b0a41(0x1ea)](_0x5b0a41(0x1e6));}async[_0x16c655(0x204)](_0x4e6bd8,_0x247871){const _0x317c4f=_0x16c655,_0x411b57=await this['globalConfigService'][_0x317c4f(0x22f)]([_0x247871]);return this[_0x317c4f(0x1f6)](_0x4e6bd8,_0x411b57);}async[_0x16c655(0x1f6)](_0x597e1b,_0x1117d0){const _0x8330b=_0x16c655;return _0x8330b(0x1f1)+_0x597e1b[_0x8330b(0x205)][0x0]+_0x8330b(0x1e8)+_0x597e1b[_0x8330b(0x231)][0x0]+_0x8330b(0x1fe)+new Date()[_0x8330b(0x22a)]()+_0x8330b(0x1f0)+_0x1117d0+_0x8330b(0x213);}async[_0x16c655(0x230)](_0x35f991){const _0x4d3996=_0x16c655,_0x299fb0=new Promise((_0x5dd49a,_0x5d21cd)=>{setTimeout(()=>{_0x5d21cd(new Error('请求超时'));},0x12c0);});let _0x22a5d7='';try{console[_0x4d3996(0x1e1)](_0x4d3996(0x1dc),_0x35f991);const _0x5ab3ff=await Promise['race']([this[_0x4d3996(0x20c)][_0x4d3996(0x1d0)](_0x35f991),_0x299fb0]);_0x22a5d7=_0x5ab3ff||await this[_0x4d3996(0x218)]['checkAutoReply'](_0x35f991);}catch(_0x2fc2d5){console[_0x4d3996(0x1e1)](_0x4d3996(0x1ef)),_0x22a5d7=await this['globalConfigService']['getConfigs']([_0x4d3996(0x228)])||_0x4d3996(0x223);}return _0x22a5d7;}};OfficialService=__decorate([(0x0,common_1[_0x16c655(0x1de)])(),__metadata(_0x16c655(0x210),[autoreply_service_1[_0x16c655(0x1d7)],user_service_1[_0x16c655(0x221)],auth_service_1['AuthService'],globalConfig_service_1[_0x16c655(0x200)],chatgpt_service_1[_0x16c655(0x220)]])],OfficialService),exports[_0x16c655(0x1fc)]=OfficialService;