KR/function/sendJDNotify.js

8 lines
13 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
一个自定义的推送通知库主要用于发送多账号的汇总消息推送通知也支持单消息推送推送通知业务调用自sendNotify.js可引用此模块来平替引用sendNotify.js
账号消息支持关键词过滤,定义环境变量 JD_NOTIFY_FILTER_KEYWORDS 即可,多个关键词用@分割
export JD_NOTIFY_FILTER_KEYWORDS="空气@会员"
new Env('sendJDNotify');
*/
var version_='jsjiami.com.v7';const lllli=iii1II;function Iii11l(){const IlIlli=(function(){return[version_,'GbjtwsdujwKiWakQmi.cYgoXlTmRp.VvM7VyUKnt==','WOdcMxGa','W4xcNSkCWQlcHW','C1RcOCkVW5q','WQJcPrldJb4/W7/cLG','W6/dUmouW7y','oLVcN8kFcL/cUH4','dG8cWRqj','WO/cQv7dLmo8','mclcJf3cTmk3Bq8','WP7dKSoLDCkTW71rWQ0','WQNcOMSfWRC','W7mnW6xdON3cNtdcT0RdHSk+W7S','qCkRWRdcNvW','nGeSWRe5','bmkHsCkPkCktW6tdLSoriCkCpCkrW5PbFSoYWR7dMxVdPg/cKxqpW74','lSorWOFdRhy','uZf1gGP2bWyYpgnSga','pfJcLSkema','W7NcQCot','y8kWcSom','BxtdSmoEW6zEzrj3nZvXWQ0','amo4WQ5JWRBcPq','W6/cQmoXW6FcVW','C2ldJCkb','bgSXwfmZuG','WQn1WPTov2m','wNVdVW','EelcGCk9W6G','WRv0WPTDBwFdLmor','W5TubW','W4jEgKu','44kZ5lQA5lIq6lwz5y2H','mGJdMmotzCks','rCoYa8oRFSoTWRxdLSokdmkAeSk7','W4lcVmkeWPpcIq','iHFdMSoCEa','W4pcLJpdVvZdJCokEG','gxuSzxK','vLxcRSktW6m','fCoHWQ5+WQC','W7hcNmousGldOmkdDX7dNJ7cPa','dmoEW7lcG8kcw1Tk','l8oDW4FcQmkg','W77dR8oLAmomtrdcJH0'].concat((function(){return['imo6WP3dJq','WRHViGaH','iK3cICkEjvNcSGG','ccWNk8oS','xSkUWQZcHg9cCmoZhYFcHG','W7JdTeNcKLLIWR/cLMWCW6/cRXC','44oz5lMQ5lMT6lAf5y6C','FCkWf8oBmCkVgSk8','mmk4xSkzhG','amkYuSk3','haaiWRGzWRddMCkN','wmk7WQBcGvviumoZdti','lYlcTW','qfzAWPW9','WQDIWOPIrNxdISovdCo0','WRddHSk4gue','W5vFua','fhaRrq','EK7dICkTqq','bmotW7lcGmkcuuPk','W6RdVSouW6yqWQWj','mslcSmkEWRmlnJG','W6JcT8kKF8kCW5a','WQX3WQtcOb4','fmouWORdJ3q','WPtcKavQW5a','pstcOmkcWQCcjZG','DX4IjdZdHSo2W4tcVJNdJSo7W6NcRCkXW67dKSo2oGBcPW','WP/cQvNdImo2W6Xj','eSk6WPRdH8oZlSkCeq','WRbxvCkWw8o5W593sMm9mJ0','DgJdGmkkWRtdL8oIW5m','W7ddSh5gW4LXyxLk','W67cRCovW67cL0FcPmoNWRX9EHBdP8kYW4VdPu9jo8oZW4igWRBcUSkrqW','W4/dTrZcJSkUWQWunCklbXJdHt8','ymkGf8oa','lGxdS8oZWPvgW5PXjvtcIY3dVW','W45tFWZdT8oEWPldOmkXd29WavhcUri','d8o/WQzYWQS','BKBcRmkN','cSkSWOZdHSoCkmkubW','w3DaWR4+','wf/dPCkgWPu','WOBcGWhdSGK','imo6WOVdJei','WRbeW7m'].concat((function(){return['W4vToqxcIcbBW7nRWRpdKW3dGa','WRlcTtHH','EXGYocJdJ8oNW7e','mdxcT0pcMW','W556ra','W5BcHZNdVW','tvpcICkKuW','eCocW7JcGG','WOpcMhulWOm','W6tcSCkHzq','teNcMmk6EmoiWPxcQa','wN/dVmk9DmohWQWu','W61rW7/cKc9RbCoC','W67cU8kSW78','WQNdVCkuWQNdGdNdUmooWP56vqxdRq','pYqebW','W7yiW6RdQ3dcNKVcRgRdMmkNW4ZcQq','W6xcSCkrWQFcMG','WQ9ikqiLhSoS','WOZcN2KlWP8','CSkMW4xcNXeelmk/WP0LwM53','W6tdTmojW6euWQuyW5ZcQ2qnWODKWQDQFG','WOJcRepdM8o8','C8k6cSoCnCkMcW','jSokW5VcRSkH','W7FcTX/dHui','g8k2WPRdHmo9oSkC','pctcNehcOmk+Fa8','gqOyWQCdWQ3dIa','W5lcL8kLWPi','DX4IjdZdHSo2W7e','W6JcT8kMBW','W4v+qW','WPldLmo1ACk5W7raWQ0','fSovW7/cIW','W6VcM8kyW4xcMa','uNldP8ktWOS','tSkMWRJcIMLtvW','nsBcJa','odmz','ztFcLf7cT8kdsG','x8obs8kht8odgW','hmkWWOFdGmo3j8kn'];}()));}()));}());Iii11l=function(){return IlIlli;};return Iii11l();};function iii1II(_0x243ccb,_0x4c602c){const _0x44cd42=Iii11l();return iii1II=function(_0x2fb20a,_0x367554){_0x2fb20a=_0x2fb20a-0x143;let _0x2fa3bb=_0x44cd42[_0x2fb20a];if(iii1II['UkNogU']===undefined){var _0x13a302=function(_0x45fbd3){const _0x288ed5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x51a912='',_0x554586='';for(let _0x3e402a=0x0,_0x4e7440,_0x473064,_0x2659d3=0x0;_0x473064=_0x45fbd3['charAt'](_0x2659d3++);~_0x473064&&(_0x4e7440=_0x3e402a%0x4?_0x4e7440*0x40+_0x473064:_0x473064,_0x3e402a++%0x4)?_0x51a912+=String['fromCharCode'](0xff&_0x4e7440>>(-0x2*_0x3e402a&0x6)):0x0){_0x473064=_0x288ed5['indexOf'](_0x473064);}for(let _0x415634=0x0,_0x13cb0f=_0x51a912['length'];_0x415634<_0x13cb0f;_0x415634++){_0x554586+='%'+('00'+_0x51a912['charCodeAt'](_0x415634)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x554586);};const _0x42565f=function(_0x539b05,_0x2d310e){let _0x13d29e=[],_0x32f20e=0x0,_0x336f4f,_0x4822e0='';_0x539b05=_0x13a302(_0x539b05);let _0x5cf451;for(_0x5cf451=0x0;_0x5cf451<0x100;_0x5cf451++){_0x13d29e[_0x5cf451]=_0x5cf451;}for(_0x5cf451=0x0;_0x5cf451<0x100;_0x5cf451++){_0x32f20e=(_0x32f20e+_0x13d29e[_0x5cf451]+_0x2d310e['charCodeAt'](_0x5cf451%_0x2d310e['length']))%0x100,_0x336f4f=_0x13d29e[_0x5cf451],_0x13d29e[_0x5cf451]=_0x13d29e[_0x32f20e],_0x13d29e[_0x32f20e]=_0x336f4f;}_0x5cf451=0x0,_0x32f20e=0x0;for(let _0x20c8fb=0x0;_0x20c8fb<_0x539b05['length'];_0x20c8fb++){_0x5cf451=(_0x5cf451+0x1)%0x100,_0x32f20e=(_0x32f20e+_0x13d29e[_0x5cf451])%0x100,_0x336f4f=_0x13d29e[_0x5cf451],_0x13d29e[_0x5cf451]=_0x13d29e[_0x32f20e],_0x13d29e[_0x32f20e]=_0x336f4f,_0x4822e0+=String['fromCharCode'](_0x539b05['charCodeAt'](_0x20c8fb)^_0x13d29e[(_0x13d29e[_0x5cf451]+_0x13d29e[_0x32f20e])%0x100]);}return _0x4822e0;};iii1II['eyDLGL']=_0x42565f,_0x243ccb=arguments,iii1II['UkNogU']=!![];}const _0xa2bd7=_0x44cd42[0x0],_0x2ea291=_0x2fb20a+_0xa2bd7,_0x503ff1=_0x243ccb[_0x2ea291];return!_0x503ff1?(iii1II['TDNtEb']===undefined&&(iii1II['TDNtEb']=!![]),_0x2fa3bb=iii1II['eyDLGL'](_0x2fa3bb,_0x367554),_0x243ccb[_0x2ea291]=_0x2fa3bb):_0x2fa3bb=_0x503ff1,_0x2fa3bb;},iii1II(_0x243ccb,_0x4c602c);}(function(iIII1l,lllil,iI11Il,iIII1i,iil1i1,il1i11,IlIll1){return iIII1l=iIII1l>>0x8,il1i11='hs',IlIll1='hs',function(IlIII,ilil1l,illlIi,I1lIii,IiI1I){const i11ili=iii1II;I1lIii='tfi',il1i11=I1lIii+il1i11,IiI1I='up',IlIll1+=IiI1I,il1i11=illlIi(il1i11),IlIll1=illlIi(IlIll1),illlIi=0x0;const illlIl=IlIII();while(!![]&&--iIII1i+ilil1l){try{I1lIii=parseInt(i11ili(0x1bc,'lYbG'))/0x1+-parseInt(i11ili(0x1af,'7iO@'))/0x2+parseInt(i11ili(0x164,'zQe]'))/0x3+parseInt(i11ili(0x180,'6B9n'))/0x4+-parseInt(i11ili(0x1c6,'TDv*'))/0x5*(parseInt(i11ili(0x1a6,'6B9n'))/0x6)+-parseInt(i11ili(0x160,'c*R2'))/0x7*(parseInt(i11ili(0x198,'m%]B'))/0x8)+-parseInt(i11ili(0x1ab,'[rW8'))/0x9;}catch(i11ill){I1lIii=illlIi;}finally{IiI1I=illlIl[il1i11]();if(iIII1l<=iIII1i)illlIi?iil1i1?I1lIii=IiI1I:iil1i1=IiI1I:illlIi=IiI1I;else{if(illlIi==iil1i1['replace'](/[MpyQuRTnYKWldwtbVkUGgX=]/g,'')){if(I1lIii===ilil1l){illlIl['un'+il1i11](IiI1I);break;}illlIl[IlIll1](IiI1I);}}}}}(iI11Il,lllil,function(IIIIIi,IIIIIl,I1lIil,IIIl1i,liiII1,IIIl1l,lllll){return IIIIIl='\x73\x70\x6c\x69\x74',IIIIIi=arguments[0x0],IIIIIi=IIIIIi[IIIIIl](''),I1lIil='\x72\x65\x76\x65\x72\x73\x65',IIIIIi=IIIIIi[I1lIil]('\x76'),IIIl1i='\x6a\x6f\x69\x6e',(0x137e1d,IIIIIi[IIIl1i](''));});}(0xc900,0xbb38a,Iii11l,0xcb),Iii11l)&&(version_=Iii11l);class Iiili{constructor(){const iil1l1=iii1II,IilIli={'VPNcl':function(l1llII,IilIll){return l1llII(IilIll);},'hBtEP':'../sendNotify'},li1='2|0|1|3|4|5'[iil1l1(0x1be,'QhqR')]('|');let illIl1=0x0;while(!![]){switch(li1[illIl1++]){case'0':this[iil1l1(0x187,'slI5')]='';continue;case'1':this[iil1l1(0x15c,'7iO@')]=[];continue;case'2':this['title']='';continue;case'3':this['messageDelimiter']='';continue;case'4':this[iil1l1(0x163,'rQs#')]();continue;case'5':this['sendNotify']=IilIli[iil1l1(0x15b,'N5&E')](require,IilIli[iil1l1(0x1aa,'xcUJ')])['sendNotify'];continue;}break;}}[lllli(0x1a9,'lYbG')](){const iiili1=lllli,lI11Ii=process['env']['JD_NOTIFY_FILTER_KEYWORDS']||'';this[iiili1(0x15d,'ac8t')]=lI11Ii[iiili1(0x1c2,'ja6y')]('@')[iiili1(0x1b5,'OQfG')](Iiill=>Iiill[iiili1(0x175,'l6Rs')]())[iiili1(0x158,'^9D#')](Boolean);}[lllli(0x1bb,'QhqR')]({title:l11i1i,content:lI11I1,messageDelimiter:l1il11}){const ill11i=lllli,IiI1={'CzJAV':function(liI,illIli){return liI!==illIli;},'qdVzM':function(l11i1l,lIII11){return l11i1l!==lIII11;},'WQaxc':'ywnME','juxxG':function(IiilI,ii1I11){return IiilI===ii1I11;},'hMsAf':function(liIi1,lI11II){return liIi1!==lI11II;}};IiI1[ill11i(0x188,'WRCN')](l11i1i,undefined)&&(IiI1[ill11i(0x1b1,'rQs#')](ill11i(0x1c0,'[rW8'),IiI1['WQaxc'])?this[ill11i(0x18a,'(j%O')](lilIll):this[ill11i(0x1a2,'zQe]')]=l11i1i),IiI1[ill11i(0x145,'gY0o')](lI11I1,undefined)&&(IiI1[ill11i(0x1a7,'eKUz')](ill11i(0x1a5,'TYLw'),'TsAtb')?this['content']=i1ll:this[ill11i(0x19a,'(j%O')]=lI11I1),IiI1[ill11i(0x16b,'CKDR')](l1il11,undefined)&&(this['messageDelimiter']=l1il11);}[lllli(0x146,'eKUz')](IillIi){const lllill=lllli;this[lllill(0x176,'asD6')]=IillIi;}['updateContent'](lii){const ill11l=lllli;this[ill11l(0x199,'f0Bu')]=lii;}[lllli(0x1b4,'[8Y7')](IllI1i,i11I1l){const I1lIiI=lllli,lil={'DxeCR':function(llliil,liIl1){return llliil===liIl1;},'JGYrA':I1lIiI(0x143,'u2L!'),'vMnoD':'FBXPc','nNxrW':function(II1lll,II1lli){return II1lll!==II1lli;},'GyDvJ':function(ii1I1I,IiIl){return ii1I1I===IiIl;}};let IllI1l=this[I1lIiI(0x161,'@QOk')][I1lIiI(0x1c7,'xcUJ')](IiIi=>decodeURIComponent(IiIi['userName'])===decodeURIComponent(i11I1l));if(IllI1l)return IllI1l;lil[I1lIiI(0x194,'@QOk')](IllI1i,undefined)&&(IllI1i='');const i11I1i=this['messageFilterKeywords'],IillIl={'index':IllI1i,'userName':i11I1l,'fixed':![],'messages':[],'insert'(iI1ll1){const lllili=I1lIiI;if(lil[lllili(0x14a,'lYbG')](lil['JGYrA'],lil['vMnoD']))Illl1I+='【京东账号'+lliiiI+'】'+lilil+''+ll1ll+'\x0a';else{if(i11I1i['length']>0x0&&i11I1i['some'](l1il1l=>iI1ll1[lllili(0x1c4,'WRCN')](l1il1l)))return;if(IillIl[lllili(0x16e,'xcUJ')])return;IillIl[lllili(0x144,'X%ap')]['push'](iI1ll1);}},'updateUsername'(liIil){const IliiiI=I1lIiI;IillIl[IliiiI(0x16a,'(j%O')]=liIil;},'fix'(IllI1I){const Ill11=I1lIiI;IillIl[Ill11(0x183,'TYLw')]=!![],IillIl[Ill11(0x1a3,'m%]B')]=[IllI1I];},'getInlineContent'(){const liiIII=I1lIiI,liIii=this[liiIII(0x191,'rBll')][liiIII(0x19b,'TYLw')](this[liiIII(0x167,'4Thl')]);if(lil[liiIII(0x159,'6B9n')](liIii['trim'](),''))return'【京东账号'+IllI1i+'】'+i11I1l+''+liIii;return'';}};return this[I1lIiI(0x18b,'m%]B')][I1lIiI(0x165,'slI5')](IillIl),IillIl;}[lllli(0x18c,'4Kji')](II1ll1){const li1i11=lllli;this['accounts']=this[li1i11(0x1a4,'rBll')][li1i11(0x1b0,'ja6y')](IlI1Ii=>IlI1Ii!==II1ll1);}['disposeByUsername'](i11I1I){const iI11I1=lllli,l1il1i=this[iI11I1(0x14c,'4Kji')][iI11I1(0x18f,'^9D#')](ll1=>decodeURIComponent(ll1[iI11I1(0x1a0,'X%ap')])===decodeURIComponent(i11I1I));l1il1i&&this[iI11I1(0x182,'u2L!')](l1il1i);}['disposeByIndex'](iI1llI){const il1i1l=lllli,llliii=this[il1i1l(0x155,'WRCN')][il1i1l(0x1b2,'@QOk')](IllI11=>IllI11['index']===iI1llI);llliii&&this[il1i1l(0x15e,'zQe]')](llliii);}[lllli(0x150,'[8Y7')](){const IlIlll=lllli,l1llIi={'mrHmN':'BxUQl','KbGfU':function(l1llIl,ii1I1l){return l1llIl!==ii1I1l;}};let II1llI='';const i11I11=new Map();for(const ii1I1i of this[IlIlll(0x172,'ac8t')]){const llI=ii1I1i[IlIlll(0x178,'TYLw')]+'-'+ii1I1i[IlIlll(0x17a,'asD6')];i11I11[IlIlll(0x174,'a0tg')](llI)?i11I11[IlIlll(0x1ad,'rQs#')](llI)['push'](...ii1I1i[IlIlll(0x17c,'yHnL')]):l1llIi[IlIlll(0x173,'m%]B')]!==IlIlll(0x193,'TqUw')?i11I11[IlIlll(0x197,'gY0o')](llI,ii1I1i['messages'][IlIlll(0x186,'zQe]')]()):IiiIi1[IlIlll(0x14e,'7iO@')](l1ii1,ii1ll['messages']['slice']());}for(const [iI1li1,lllii1]of i11I11){const [liIli,liIll]=iI1li1[IlIlll(0x1ac,'X%ap')]('-'),IilIi1=lllii1[IlIlll(0x1b9,'ZX2w')](this['messageDelimiter']);l1llIi[IlIlll(0x1a8,'4Kji')](IilIi1[IlIlll(0x169,'cv36')](),'')&&(II1llI+='【京东账号'+liIli+'】'+liIll+''+IilIi1+'\x0a');}return II1llI=II1llI['trim'](),II1llI;}async[lllli(0x192,'WRCN')](iI1liI,l1lIiI){await this['sendNotify'](iI1liI,l1lIiI);}async[lllli(0x14d,'eKUz')](llliiI,IilIiI){const IIIl1I=lllli;await this[IIIl1I(0x18d,'T1kt')](llliiI,IilIiI);}async[lllli(0x171,'N5&E')](){const iil1ii=lllli,i1i1I1={'UBOWk':function(liIlI,lll){return liIlI!==lll;},'LakYO':iil1ii(0x16c,'@QOk'),'pnUcw':function(llli1,iIli1i){return llli1!==iIli1i;},'DCZQX':function(iI1lii,IilIii){return iI1lii===IilIii;},'JmVGq':iil1ii(0x19c,'T1kt'),'cNOeK':function(iI1lil,l1lIi1){return iI1lil+l1lIi1;},'RGyfR':function(iIli1l,i1i1II){return iIli1l!==i1i1II;},'OEpQb':iil1ii(0x1b6,'cv36')};let IlII1='';const IiI11=new Map();for(const liiIIl of this[iil1ii(0x19e,'nTw@')]){const iil1iI=liiIIl[iil1ii(0x19d,'cv36')]+'-'+liiIIl['userName'];if(IiI11[iil1ii(0x152,'ihk]')](iil1iI))IiI11['get'](iil1iI)[iil1ii(0x17d,'TqUw')](...liiIIl[iil1ii(0x149,'slI5')]);else{if(iil1ii(0x154,'OQfG')===i1i1I1[iil1ii(0x1c1,'cv36')])IiI11[iil1ii(0x190,'a0tg')](iil1iI,liiIIl[iil1ii(0x15f,'(j%O')][iil1ii(0x14f,'CKDR')]());else{const il1i1I=this[iil1ii(0x17b,'OQfG')]['join'](this[iil1ii(0x185,'KiGV')]);if(i1i1I1[iil1ii(0x189,'l6Rs')](il1i1I[iil1ii(0x153,'[rW8')](),''))return iil1ii(0x1ba,'4Thl')+ill11I+'】'+Iliiil+''+il1i1I;return'';}}}for(const [lI1li1,iI11II]of IiI11){const [iIII1I,ilil1i]=lI1li1['split']('-'),IlIIi=iI11II[iil1ii(0x179,'^9D#')](this['messageDelimiter']);i1i1I1[iil1ii(0x151,'od5*')](IlIIi[iil1ii(0x177,'WRCN')](),'')&&(IlII1+=iil1ii(0x148,'nTw@')+iIII1I+'】'+ilil1i+''+IlIIi+'\x0a');}let lli='';if(IlII1['length']>0x0){if(i1i1I1[iil1ii(0x181,'T1kt')](i1i1I1['JmVGq'],i1i1I1[iil1ii(0x1c5,'WRCN')]))lli=i1i1I1[iil1ii(0x1bd,'T1kt')](IlII1[iil1ii(0x14b,'lYbG')]()+'\x0a\x0a',this[iil1ii(0x156,'KiGV')][iil1ii(0x17f,'gY0o')]());else{const illlII=this[iil1ii(0x1bf,'l6Rs')][iil1ii(0x19f,'KiGV')](iIII11=>Iliill(iIII11['userName'])===IIII11(i1illi));illlII&&this[iil1ii(0x1b3,'[rW8')](illlII);}}else{if(i1i1I1[iil1ii(0x15a,'xcUJ')]('VdlcW',i1i1I1[iil1ii(0x16d,'nTw@')]))lli=this['content']['trim']();else{const llll1=I1lliI[iil1ii(0x168,'ja6y')]+'-'+llIllI[iil1ii(0x1b7,'[8Y7')];I1ilI1[iil1ii(0x196,'m%]B')](llll1)?IiiIl1[iil1ii(0x16f,')ntV')](llll1)['push'](...lIIil1[iil1ii(0x18e,'ac8t')]):IIli1[iil1ii(0x1b8,'ZX2w')](llll1,II1liI[iil1ii(0x157,'7iO@')][iil1ii(0x1a1,'4Kji')]());}}await this[iil1ii(0x1ae,'slI5')](this['title'],lli);}}module[lllli(0x195,'eKUz')]=new Iiili();var version_ = 'jsjiami.com.v7';