UNPKG

superchats

Version:

SuperChats is a premium library with unique features that control Whatsapp functions. With Superchats you can build service bots, multiservice chats or any system that uses whatsapp

1 lines 7.38 kB
'use strict';const a100_0x302415=a100_0x139b;(function(_0x4bc978,_0xcecea1){const _0x1eea83=a100_0x139b,_0x4b3d55=_0x4bc978();while(!![]){try{const _0x543701=parseInt(_0x1eea83(0x1d4))/0x1+-parseInt(_0x1eea83(0x1c2))/0x2+-parseInt(_0x1eea83(0x1d1))/0x3+-parseInt(_0x1eea83(0x1df))/0x4+-parseInt(_0x1eea83(0x1c7))/0x5+-parseInt(_0x1eea83(0x1e6))/0x6*(-parseInt(_0x1eea83(0x1d8))/0x7)+parseInt(_0x1eea83(0x1d9))/0x8;if(_0x543701===_0xcecea1)break;else _0x4b3d55['push'](_0x4b3d55['shift']());}catch(_0x48d38a){_0x4b3d55['push'](_0x4b3d55['shift']());}}}(a100_0x399a,0x50065));var __importDefault=this&&this[a100_0x302415(0x1dd)]||function(_0x659153){const _0x296dca=a100_0x302415;return _0x659153&&_0x659153[_0x296dca(0x1de)]?_0x659153:{'default':_0x659153};};function a100_0x139b(_0x3b0db2,_0x123d4a){const _0x399a17=a100_0x399a();return a100_0x139b=function(_0x139bcb,_0x34350f){_0x139bcb=_0x139bcb-0x1bf;let _0x4ce632=_0x399a17[_0x139bcb];return _0x4ce632;},a100_0x139b(_0x3b0db2,_0x123d4a);}Object['defineProperty'](exports,a100_0x302415(0x1de),{'value':!![]});const super_bionic_1=__importDefault(require(a100_0x302415(0x1e4)));exports['default']=(_0x1b14a7,_0xbb55f9)=>{const _0x36e742=a100_0x302415,_0xe4ae0a=new super_bionic_1[(_0x36e742(0x1db))](_0x1b14a7,_0xbb55f9),_0x31cb3a=async(_0x4f2531,_0x16fc06)=>{return new Promise(async _0x42afd1=>{_0x42afd1(_0xe4ae0a['create'](_0x4f2531,_0x16fc06));});},_0x14b640=async(_0x489597,_0x1a817a)=>{return new Promise(async _0x13cf6e=>{_0x13cf6e(_0xe4ae0a['create'](_0x489597,_0x1a817a));});},_0x4bed86=async(_0xdf70c8,_0x3bdd4f)=>{return new Promise(async _0x592b47=>{const _0xc18275=a100_0x139b;_0x592b47(_0xe4ae0a[_0xc18275(0x1d7)](_0xdf70c8,_0x3bdd4f));});},_0x484f59=async(_0x43a93d,_0x246765)=>{return new Promise(async _0x2dfdac=>{const _0x3d171e=a100_0x139b;_0x2dfdac(_0xe4ae0a[_0x3d171e(0x1d7)](_0x43a93d,_0x246765));});},_0x3eaa55=async(_0x529417,_0x55f725,_0x116f9d)=>{return new Promise(async _0x3a9f99=>{const _0x1549ad=a100_0x139b;_0x3a9f99(_0xe4ae0a[_0x1549ad(0x1ca)](_0x529417,_0x55f725,_0x116f9d));});},_0x13dc06=async(_0x585995,_0x5e1b83)=>{return new Promise(async _0x43147c=>{const _0xf120f0=a100_0x139b;_0x43147c(_0xe4ae0a[_0xf120f0(0x1e1)](_0x585995,_0x5e1b83));});},_0x29ee3b=async(_0x2d116b,_0x2201f3)=>{return new Promise(async _0x556513=>{_0x556513(_0xe4ae0a['find'](_0x2d116b,_0x2201f3));});},_0xeb8c51=async(_0x162f7f,_0x5cc5a9)=>{return new Promise(async _0x5eded3=>{const _0x13e630=a100_0x139b;_0x5eded3(_0xe4ae0a[_0x13e630(0x1c8)](_0x162f7f,_0x5cc5a9));});},_0x3db6b5=(_0x2a3b77,_0x5964b0,_0x425a5d,_0x5acafb)=>{const _0x561c8f=_0x36e742;!(_0x5964b0===null||_0x5964b0===void 0x0?void 0x0:_0x5964b0[_0x561c8f(0x1e8)])&&(_0x2a3b77['on'](_0x561c8f(0x1d2),async _0x1f501d=>{const _0x1b4321=_0x561c8f,{chats:_0x138f34,contacts:_0x362f4a,messages:_0x2bd79b,isLatest:_0x37a3b2}=_0x1f501d;!(_0x5964b0===null||_0x5964b0===void 0x0?void 0x0:_0x5964b0[_0x1b4321(0x1e9)])&&_0x1f501d['messages'][_0x1b4321(0x1c9)](async _0x34119f=>{const _0x505fd7=_0x1b4321;let _0x4d7020=await _0xeb8c51(_0x505fd7(0x1c4),_0x4b8a4c=>_0x4b8a4c[_0x505fd7(0x1d6)]['id']==_0x34119f['key']['id']),_0x28bed9=_0x4d7020[_0x505fd7(0x1bf)]==0x0;_0x28bed9&&await _0x31cb3a(_0x505fd7(0x1c4),_0x34119f);}),_0x362f4a[_0x1b4321(0x1c9)](async(_0x6f30a4,_0x2c1413)=>{const _0x45af5b=_0x1b4321;if(_0x6f30a4){let _0xfb0bfd=await _0xeb8c51(_0x45af5b(0x1da),_0x3dc142=>_0x3dc142['id']==_0x6f30a4['id']),_0x31c3f9=_0xfb0bfd[_0x45af5b(0x1bf)]==0x0;_0x31c3f9&&await _0x4bed86(_0x45af5b(0x1da),_0x6f30a4);}}),_0x138f34[_0x1b4321(0x1c9)](async _0xe69b12=>{const _0x4dd480=_0x1b4321;if(_0xe69b12['id']['split']('@')[0x1]!='g.us'&&_0xe69b12['id'][_0x4dd480(0x1d5)]('@')[0x1]!=_0x4dd480(0x1ce)){let _0xd931bc=await _0xeb8c51('chats',_0x3259fa=>_0x3259fa['id']==_0xe69b12['id']),_0x43d874=_0xd931bc['length']==0x0;_0x43d874&&await _0x14b640(_0x4dd480(0x1cc),_0xe69b12);}});}),_0x2a3b77['on'](_0x561c8f(0x1cb),async _0xe7093a=>{const _0x652e92=_0x561c8f;_0xe7093a[_0x652e92(0x1c4)][_0x652e92(0x1c9)](async _0x1fa435=>{const _0x5e03fc=_0x652e92;_0xe7093a[_0x5e03fc(0x1c3)]===_0x5e03fc(0x1e5)&&(_0x5964b0===null||_0x5964b0===void 0x0?void 0x0:_0x5964b0['autoRead'])&&await _0x425a5d[_0x5e03fc(0x1e2)]([_0x1fa435['key']]);if(!_0x1fa435[_0x5e03fc(0x1c1)]){let _0x25d2f1=await _0xeb8c51(_0x5e03fc(0x1c4),_0x54304c=>_0x54304c[_0x5e03fc(0x1d6)]['id']==_0x1fa435['key']['id']),_0x1fc93e=_0x25d2f1[_0x5e03fc(0x1bf)]==0x0;_0x1fc93e&&await _0x31cb3a(_0x5e03fc(0x1c4),_0x1fa435);}});}),_0x2a3b77['on']('chats.update',async _0x31d34a=>{const _0x4eaee5=_0x561c8f;let _0x21f0bb=await _0xeb8c51('chats',_0x2f4974=>_0x2f4974['id']==_0x31d34a[0x0]['id']),_0x4fcf35=_0x21f0bb[_0x4eaee5(0x1bf)]==0x0;_0x4fcf35&&await _0x14b640('chats',_0x31d34a[0x0]);}),_0x2a3b77['on'](_0x561c8f(0x1c6),async _0x52e4=>{_0x52e4['forEach'](async(_0x19271b,_0x5cf1d9)=>{const _0x2d1ee9=a100_0x139b;if(_0x19271b){let _0x2ad868=await _0xeb8c51(_0x2d1ee9(0x1da),_0x2efb0b=>_0x2efb0b['id']==_0x19271b['id']),_0x169f02=_0x2ad868['length']==0x0;_0x169f02&&await _0x4bed86(_0x2d1ee9(0x1da),_0x19271b);}});}),_0x2a3b77['on'](_0x561c8f(0x1d3),async _0x5a5c38=>{const _0x245f95=_0x561c8f;let _0x294028=await _0xeb8c51(_0x245f95(0x1c5),_0x57305a=>_0x57305a['id']==_0x5a5c38['id']);if(_0x5a5c38['deleted'])await _0x13dc06(_0x245f95(0x1c5),{'id':String(_0x5a5c38['id'])});else{let _0x14e6ff=_0x294028[_0x245f95(0x1bf)]==0x0;_0x14e6ff?await _0x484f59(_0x245f95(0x1c5),_0x5a5c38):await _0x3eaa55(_0x245f95(0x1c5),{'id':_0x5a5c38['id']},_0x5a5c38);}}),_0x2a3b77['on']('labels.association',async({type:_0x3eba31,association:_0x3e60cb})=>{const _0xe2b6af=_0x561c8f;let _0x225c52=[];_0x3e60cb[_0xe2b6af(0x1c3)]=='label_message'?_0x225c52=await _0xeb8c51(_0xe2b6af(0x1dc),_0x4a57fe=>_0x4a57fe[_0xe2b6af(0x1e7)]==_0x3e60cb[_0xe2b6af(0x1e7)]&&_0x4a57fe[_0xe2b6af(0x1cf)]==_0x3e60cb['messageId']&&_0x4a57fe[_0xe2b6af(0x1e3)]==_0x3e60cb[_0xe2b6af(0x1e3)]):_0x225c52=await _0xeb8c51(_0xe2b6af(0x1dc),_0x1cfddd=>_0x1cfddd[_0xe2b6af(0x1e7)]==_0x3e60cb[_0xe2b6af(0x1e7)]&&_0x1cfddd[_0xe2b6af(0x1e3)]==_0x3e60cb['labelId']);switch(_0x3eba31){case _0xe2b6af(0x1d0):let _0x50a29f=_0x225c52['length']==0x0;_0x50a29f&&await _0x484f59(_0xe2b6af(0x1dc),_0x3e60cb);break;case _0xe2b6af(0x1e1):_0x3e60cb[_0xe2b6af(0x1c3)]==_0xe2b6af(0x1e0)?await _0x13dc06(_0xe2b6af(0x1dc),{'type':'label_message','labelId':_0x3e60cb[_0xe2b6af(0x1e3)],'chatId':_0x3e60cb['chatId'],'messageId':_0x3e60cb[_0xe2b6af(0x1cf)]}):await _0x13dc06(_0xe2b6af(0x1dc),{'type':_0xe2b6af(0x1c0),'labelId':_0x3e60cb[_0xe2b6af(0x1e3)],'chatId':_0x3e60cb[_0xe2b6af(0x1e7)]});break;default:console['error'](_0xe2b6af(0x1cd)+_0x3eba31+']');}}));};return{'bind':_0x3db6b5,'filterData':_0x29ee3b,'searchData':_0xeb8c51};};function a100_0x399a(){const _0x4755fe=['messages','labels','contacts.upsert','624645PGKbKf','filter','forEach','update','messages.upsert','chats','unknown\x20operation\x20type\x20[','status','messageId','add','11415uEvFlD','messaging-history.set','labels.edit','321565kbxtsl','split','key','create','13069kJqQQB','10143232qtjAwU','contacts','default','associations','__importDefault','__esModule','2279160kLoMPf','label_message','remove','readMessages','labelId','super-bionic','notify','204gdevrO','chatId','nodataFull','nodata','length','label_jid','messageStubType','1253284erZPbK','type'];a100_0x399a=function(){return _0x4755fe;};return a100_0x399a();}