OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-deps / @holepunchto / keet-store / store / ui-mobile / ui-chat.saga.js

1 lines · javascript ref:
(function(_0x240140,_0x5e66db){const _0x425a51={_0x118d7f:0x504,_0x1531f9:0x4ed,_0xadc9fd:0x4f9,_0x3150dd:0x503,_0x53332f:0x4eb,_0x2672ae:0x317,_0x3e3567:0x315,_0x815155:0x326,_0x38dd74:0x31c,_0x3e1759:0x331,_0x22842f:0x31f,_0x57858c:0x311,_0x1d3781:0x313,_0x5576be:0x316,_0x2b5a7e:0x4f4,_0x3faf66:0x507,_0x5bbe30:0x508,_0x1f79fc:0x50f,_0x3a1eb6:0x32c,_0x50dbf8:0x336,_0x1bfa10:0x334},_0x47c044={_0x45096a:0x16c},_0x554774={_0x17d005:0x34f};function _0x3f870e(_0x287534,_0x32b321,_0x26a706,_0x52f53c){return _0x2c12(_0x32b321-_0x554774._0x17d005,_0x287534);}function _0x17ae1b(_0x2b4ca0,_0x6d7732,_0x2416b3,_0x3394d4){return _0x2c12(_0x6d7732-_0x47c044._0x45096a,_0x2b4ca0);}const _0x2bbca6=_0x240140();while(!![]){try{const _0x16f957=-parseInt(_0x3f870e(0x505,0x506,_0x425a51._0x118d7f,0x4ff))/(-0x8aa*-0x4+-0x13e0+0xec7*-0x1)+-parseInt(_0x3f870e(_0x425a51._0x1531f9,_0x425a51._0xadc9fd,_0x425a51._0x3150dd,_0x425a51._0x53332f))/(0xe3*0x25+0x2355+-0x4422)+parseInt(_0x17ae1b(_0x425a51._0x2672ae,0x31b,_0x425a51._0x3e3567,_0x425a51._0x815155))/(0x52b+-0xb*0xce+0x3b2)*(-parseInt(_0x17ae1b(_0x425a51._0x38dd74,0x329,_0x425a51._0x3e1759,_0x425a51._0x22842f))/(0xcb*0x23+0x14c1+-0x307e))+-parseInt(_0x17ae1b(_0x425a51._0x57858c,_0x425a51._0x3e3567,_0x425a51._0x1d3781,_0x425a51._0x5576be))/(0x17b8+0x2*0x5a+0x1867*-0x1)+parseInt(_0x3f870e(_0x425a51._0x2b5a7e,0x4ff,0x50d,_0x425a51._0x3faf66))/(-0x2444+-0x1dba+-0x64*-0xa9)+-parseInt(_0x3f870e(_0x425a51._0x3faf66,_0x425a51._0x5bbe30,_0x425a51._0x1f79fc,0x50c))/(0x1a66*-0x1+-0xbac+0x2619)+parseInt(_0x17ae1b(0x330,_0x425a51._0x3a1eb6,_0x425a51._0x50dbf8,_0x425a51._0x1bfa10))/(-0x39*0x1c+-0x2c*0x8d+0x80*0x3d);if(_0x16f957===_0x5e66db)break;else _0x2bbca6['push'](_0x2bbca6['shift']());}catch(_0x8cdba7){_0x2bbca6['push'](_0x2bbca6['shift']());}}}(_0xc758,0x2f661*-0x3+-0x183f*-0x21+0xca031));const _0x35d3d0=(function(){const _0x4a5656={_0x5da7dd:0x1bd,_0x4ff437:0x1af,_0x344fc5:0x1b6};let _0x43dfa1=!![];return function(_0x89c9ea,_0x263ed1){const _0xe639fd={_0x1541b0:0xc},_0x992baf=_0x43dfa1?function(){function _0xd70678(_0x162fba,_0xd20998,_0x4d83af,_0x158f4e){return _0x2c12(_0xd20998- -_0xe639fd._0x1541b0,_0x158f4e);}if(_0x263ed1){const _0x225433=_0x263ed1[_0xd70678(_0x4a5656._0x5da7dd,_0x4a5656._0x4ff437,0x1bb,_0x4a5656._0x344fc5)](_0x89c9ea,arguments);return _0x263ed1=null,_0x225433;}}:function(){};return _0x43dfa1=![],_0x992baf;};}()),_0x1816aa=_0x35d3d0(this,function(){const _0x527d4b={_0x59b6e4:0x322,_0x281416:0x320,_0x4e3cc3:0x315,_0x123159:0x31e,_0x4eabb0:0x102,_0x2a4248:0x10f,_0x5e0ba4:0x107,_0x329331:0xf9,_0x5f1840:0xf5,_0x4f9af2:0xfc},_0x5bdf1b={_0x5c104d:0x161};function _0x19d136(_0x6724c4,_0x5370b4,_0x2ff835,_0x557b91){return _0x2c12(_0x5370b4-_0x5bdf1b._0x5c104d,_0x2ff835);}function _0x273735(_0x3ba0b5,_0x51c1c5,_0x14c842,_0x4eba4a){return _0x2c12(_0x51c1c5- -0x2ad,_0x3ba0b5);}return _0x1816aa['toString']()['search'](_0x19d136(_0x527d4b._0x59b6e4,_0x527d4b._0x281416,_0x527d4b._0x4e3cc3,_0x527d4b._0x123159)+'+$')[_0x273735(-0xff,-_0x527d4b._0x4eabb0,-_0x527d4b._0x2a4248,-_0x527d4b._0x5e0ba4)]()[_0x273735(-_0x527d4b._0x329331,-_0x527d4b._0x5f1840,-0x101,-_0x527d4b._0x4f9af2)+'r'](_0x1816aa)['search'](_0x19d136(_0x527d4b._0x281416,_0x527d4b._0x281416,0x318,0x320)+'+$');});_0x1816aa();import{delay,getContext,put,select,take,call}from'redux-saga/effects';function _0x2c12(_0x5e79e7,_0x240f1a){const _0x496e94=_0xc758();return _0x2c12=function(_0x248b61,_0x18d7ad){_0x248b61=_0x248b61-(-0x29*-0x91+-0x16f*-0x5+-0x1cbd);let _0x17ddfb=_0x496e94[_0x248b61];return _0x17ddfb;},_0x2c12(_0x5e79e7,_0x240f1a);}import{taskErrorSaga}from'../error';import{getChatMessageById}from'../chat';import{createRoomInvitation,getRoomItemById,setRoomInvitation,clearRoomInvitation}from'../room';import{APP_CONTEXT_KEY}from'../constants';import{uiProcessCopyChatMessage}from'./ui.action';import{userInfoNotification}from'../notification';function _0xc758(){const _0x36af44=['15876904mLQLuE','chat','mimetype','acheSaga','1414720UBVCjX','1205384jxCSKK','toString','text','textCopied','getMediaTy','1220826HTTozf','4106868CIaxAK','replace','getStrings','eLinkSaga','copyChatMe','copyMessag','clearImage','67405wPUvrC','constructo','3166303hIdnvn','arserData','apply','clearFileC','8JtdYGc','ssageSaga','(((.+)+)+)'];_0xc758=function(){return _0x36af44;};return _0xc758();}import{getFileEntryById,updateFileEntryCleared}from'../media/file';export function*copyMessageLinkSaga({payload:{messageId:_0x5db727,roomId:_0x16b189}}){const _0x3b030d={_0x158f01:0x456,_0x5136e7:0x457,_0x56be3d:0x462,_0x589f2c:0x549,_0x51b972:0x545,_0x194e8a:0x457,_0x1fafc5:0x460,_0x58ef80:0x45b,_0x551c58:0x45a,_0x4ab886:0x456,_0xfa180c:0x44d,_0x3c7ea3:0x458,_0x4fc4e7:0x455,_0x2953fb:0x45d},_0x2bda23={_0x530b08:0x37c},_0xe18b30={_0x368e54:0x2a5};function _0x4f4ad6(_0x2dde2a,_0x2af6bc,_0x485462,_0x39dd8b){return _0x2c12(_0x2af6bc-_0xe18b30._0x368e54,_0x485462);}function _0x2b8938(_0x41ffa4,_0x1b9344,_0x11a913,_0x3df38f){return _0x2c12(_0x3df38f-_0x2bda23._0x530b08,_0x41ffa4);}try{const {localeManager:_0x3d268c}=yield getContext(APP_CONTEXT_KEY),_0x13a644=_0x3d268c[_0x4f4ad6(_0x3b030d._0x158f01,_0x3b030d._0x5136e7,0x45b,_0x3b030d._0x56be3d)]();yield put(createRoomInvitation({'roomId':_0x16b189,'messageId':_0x5db727}));const {invitationLink:_0xb07276}=yield take(setRoomInvitation),{title:_0x1dbc7d}=yield select(getRoomItemById(_0x16b189)),{messageLinkCopied:_0x5c6352,messageLinkCopiedTitle:_0x1bc000,messageLinkCopiedValidity:_0x33ddbe}=_0x13a644[_0x2b8938(_0x3b030d._0x589f2c,_0x3b030d._0x51b972,0x535,0x53d)],_0x3574bf=_0x1bc000[_0x4f4ad6(0x45c,_0x3b030d._0x158f01,_0x3b030d._0x194e8a,_0x3b030d._0x1fafc5)]('$0',_0x1dbc7d),_0x39e9cc=''+_0x3574bf+_0xb07276+_0x33ddbe;yield put(uiProcessCopyChatMessage(_0x39e9cc||'')),yield put(userInfoNotification({'message':_0x5c6352})),yield put(clearRoomInvitation());}catch(_0x11a974){yield taskErrorSaga(_0x4f4ad6(_0x3b030d._0x58ef80,_0x3b030d._0x551c58,_0x3b030d._0x56be3d,_0x3b030d._0x4ab886)+_0x4f4ad6(_0x3b030d._0xfa180c,_0x3b030d._0x3c7ea3,_0x3b030d._0x4fc4e7,_0x3b030d._0x2953fb),_0x11a974);}}export function*copyChatMessageSaga({payload:{messageId:_0x44a3c5}}){const _0x272f52={_0x4a5d5a:0x337,_0x5a6871:0x33a,_0x5ab1e0:0x33f,_0x5d952d:0x2c7,_0x1e42a6:0x2b6,_0x3eed66:0x2c5,_0x164cd3:0x2bf,_0x3384d8:0x2b3,_0x249bc8:0x29f,_0x2a8229:0x2aa,_0x48ac49:0x2ab,_0x51d18e:0x2af,_0x34d5b5:0x2b0,_0x40200e:0x2b1,_0x39894e:0x2b2,_0x423d62:0x33e,_0x372cd5:0x341},_0x5a3c06={_0x5405bc:0x180};function _0x4e8397(_0x2ae4a5,_0x4933d0,_0x2f297f,_0x125b0d){return _0x2c12(_0x2f297f-_0x5a3c06._0x5405bc,_0x2ae4a5);}function _0x4558d3(_0xfa090b,_0x74ce7f,_0x43fd3e,_0x8d3129){return _0x2c12(_0x8d3129-0xfe,_0x43fd3e);}try{const {localeManager:_0x5a1c9a,helpers:_0x34c640}=yield getContext(APP_CONTEXT_KEY),_0x51f0f7=_0x5a1c9a['getStrings'](),_0x1a16d1=yield select(getChatMessageById,_0x44a3c5),_0x3000ce=_0x34c640['messageToP'+_0x4e8397(0x338,_0x272f52._0x4a5d5a,_0x272f52._0x5a6871,_0x272f52._0x5ab1e0)](_0x1a16d1[_0x4558d3(_0x272f52._0x5d952d,_0x272f52._0x1e42a6,_0x272f52._0x3eed66,_0x272f52._0x164cd3)])?.[_0x4558d3(_0x272f52._0x3384d8,0x2b0,_0x272f52._0x249bc8,_0x272f52._0x2a8229)]||'';yield put(uiProcessCopyChatMessage(_0x3000ce)),yield delay(0x2038+-0x1745+-0x7c7),yield put(userInfoNotification({'message':_0x51f0f7['downloads'][_0x4558d3(0x2ac,0x2b6,0x2b5,_0x272f52._0x48ac49)]}));}catch(_0x490f00){yield taskErrorSaga(_0x4558d3(_0x272f52._0x51d18e,_0x272f52._0x34d5b5,_0x272f52._0x40200e,_0x272f52._0x39894e)+_0x4e8397(_0x272f52._0x423d62,_0x272f52._0x372cd5,_0x272f52._0x423d62,0x33d),_0x490f00);}}export function*clearFileCacheSaga({payload:_0x3f2f98}){const _0x5c9414={_0x468d19:0x37d,_0x50b2cf:0x396,_0x211361:0x38b,_0x251d16:0x69,_0x3f2871:0x75,_0x4e1358:0x70,_0x42051b:0x6a,_0x5a97c7:0x62,_0x218d0c:0x66,_0x2fc996:0x6b,_0x1b1b37:0x73,_0x5573d5:0x58,_0x288b17:0x60,_0x3d73d8:0x5a,_0xcd32a9:0x71,_0x37928a:0x7b};function _0x12051c(_0x386bda,_0x3eafd6,_0x31774b,_0x546f30){return _0x2c12(_0x3eafd6-0x1db,_0x546f30);}function _0x35ac7e(_0x3eeaf0,_0x17839e,_0x57018b,_0x5f0bcd){return _0x2c12(_0x17839e- -0x21c,_0x57018b);}try{const {fileManager:_0x32702b}=yield getContext(APP_CONTEXT_KEY),_0x3385f5=yield select(getChatMessageById,_0x3f2f98),{fileId:_0x56de08}=_0x3385f5||{};if(_0x56de08){yield put(updateFileEntryCleared({'fileId':_0x56de08,'cleared':!![]}));const _0x34111b=yield select(getFileEntryById,_0x56de08),{isImage:_0x3e7ced}=yield call(_0x32702b[_0x12051c(_0x5c9414._0x468d19,0x389,_0x5c9414._0x50b2cf,_0x5c9414._0x211361)+'pe'],_0x34111b['httpLink'],_0x34111b[_0x35ac7e(-_0x5c9414._0x251d16,-_0x5c9414._0x3f2871,-_0x5c9414._0x4e1358,-_0x5c9414._0x42051b)]);_0x3e7ced&&(yield call(_0x32702b[_0x35ac7e(-_0x5c9414._0x5a97c7,-_0x5c9414._0x218d0c,-_0x5c9414._0x2fc996,-_0x5c9414._0x1b1b37)],_0x34111b['httpLink']));}}catch(_0x4ba1ee){yield taskErrorSaga(_0x35ac7e(-_0x5c9414._0x5573d5,-_0x5c9414._0x288b17,-_0x5c9414._0x3d73d8,-0x57)+_0x35ac7e(-_0x5c9414._0x2fc996,-0x74,-_0x5c9414._0xcd32a9,-_0x5c9414._0x37928a),_0x4ba1ee);}}