OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-deps / @holepunchto / keet-store / store / app / app.saga.js

1 lines · javascript ref:
(function(_0x56878c,_0x355b5b){const _0x1c01fe={_0x4dfcff:0x14c,_0x23cec6:0x17b,_0x1858e1:0x163,_0xb771b0:0x158,_0x5f2a06:0x17f,_0x38d178:0x17d,_0x2e5ce1:0x167,_0xb7bf3:0x162,_0x430a71:0x32c,_0x5069dc:0x33a,_0x5f4e07:0x31b,_0x852616:0x30b,_0x53bee6:0x2f2,_0x489786:0x326,_0x2f8f86:0x164,_0x55e4e5:0x14e,_0x17932d:0x142,_0x1356c1:0x11c,_0x2e3b89:0x124,_0xb8b4a2:0x135,_0x399fa0:0x128,_0x4af765:0x155,_0x220083:0x13b,_0x2954d5:0x338,_0x4a8214:0x339,_0x6361ca:0x331,_0x5a0b89:0x143,_0xe9fe96:0x14b,_0x374dd0:0x155,_0x1503d8:0x32e,_0x5c1b11:0x332,_0x1a09bf:0x324,_0x5d8c66:0x15b,_0x58af5b:0x150,_0x1dd9b5:0x157},_0x39752b={_0x3587ef:0x61},_0x2a7ad0={_0x564e3c:0x172};function _0x306027(_0x440d55,_0xd4be92,_0x4252fb,_0x3ce8a8){return _0x527c(_0x440d55-_0x2a7ad0._0x564e3c,_0x4252fb);}function _0x159cc8(_0x813c5b,_0x4fef53,_0x275382,_0x30a6dc){return _0x527c(_0x275382- -_0x39752b._0x3587ef,_0x30a6dc);}const _0x48e085=_0x56878c();while(!![]){try{const _0x292754=parseInt(_0x159cc8(_0x1c01fe._0x4dfcff,_0x1c01fe._0x23cec6,_0x1c01fe._0x1858e1,_0x1c01fe._0xb771b0))/(0x13*0xd3+-0x22e3*0x1+0x133b)*(parseInt(_0x159cc8(_0x1c01fe._0x5f2a06,_0x1c01fe._0x38d178,_0x1c01fe._0x2e5ce1,_0x1c01fe._0xb7bf3))/(-0xf5e+0x753*-0x3+0xc73*0x3))+-parseInt(_0x306027(0x334,_0x1c01fe._0x430a71,_0x1c01fe._0x5069dc,_0x1c01fe._0x5f4e07))/(0x8*-0x1b3+0x1*-0x1fe5+-0x40*-0xb6)+-parseInt(_0x306027(_0x1c01fe._0x852616,_0x1c01fe._0x53bee6,0x30a,_0x1c01fe._0x489786))/(0x813+0x4c*0x11+-0x5*0x29f)+-parseInt(_0x159cc8(_0x1c01fe._0x2f8f86,0x158,_0x1c01fe._0x55e4e5,_0x1c01fe._0x17932d))/(-0x1*-0x130a+-0x3b2*-0x5+-0x257f)*(parseInt(_0x159cc8(_0x1c01fe._0x1356c1,_0x1c01fe._0x2e3b89,_0x1c01fe._0xb8b4a2,_0x1c01fe._0x399fa0))/(0xbc4+-0x543*0x3+0x73*0x9))+-parseInt(_0x159cc8(_0x1c01fe._0x4af765,0x151,_0x1c01fe._0x220083,0x148))/(-0x1*-0x941+-0x672+0x2*-0x164)+parseInt(_0x306027(_0x1c01fe._0x2954d5,_0x1c01fe._0x4a8214,_0x1c01fe._0x6361ca,0x347))/(-0x1aee+0x2f*0x5b+0xaf*0xf)*(-parseInt(_0x159cc8(_0x1c01fe._0x5a0b89,_0x1c01fe._0xe9fe96,_0x1c01fe._0x374dd0,_0x1c01fe._0x374dd0))/(0x1*-0x8bf+-0x25b2+0x6*0x7bf))+-parseInt(_0x306027(_0x1c01fe._0x1503d8,_0x1c01fe._0x5069dc,_0x1c01fe._0x5c1b11,_0x1c01fe._0x1a09bf))/(-0x258+-0x139d*0x1+0x15ff*0x1)*(-parseInt(_0x159cc8(0x167,_0x1c01fe._0x5d8c66,_0x1c01fe._0x58af5b,_0x1c01fe._0x1dd9b5))/(0x15a*-0x5+0x25bc+-0x1eef));if(_0x292754===_0x355b5b)break;else _0x48e085['push'](_0x48e085['shift']());}catch(_0x20035c){_0x48e085['push'](_0x48e085['shift']());}}}(_0x2997,-0x41eb*-0x22+-0x16*-0x8ec1+-0xcddcd));const _0x8454d4=(function(){const _0x4c77bf={_0x4f104e:0x148,_0x26c7f1:0x120,_0x5adc99:0x131};let _0x3d2710=!![];return function(_0x1e931e,_0x1e0f7d){const _0x30cfdb={_0x7b4588:0x2fd},_0x2952d5=_0x3d2710?function(){function _0x2826ef(_0x420e3e,_0x10b137,_0x3fb3d3,_0x2436f7){return _0x527c(_0x420e3e- -_0x30cfdb._0x7b4588,_0x3fb3d3);}if(_0x1e0f7d){const _0x78bbc4=_0x1e0f7d[_0x2826ef(-0x13a,-_0x4c77bf._0x4f104e,-_0x4c77bf._0x26c7f1,-_0x4c77bf._0x5adc99)](_0x1e931e,arguments);return _0x1e0f7d=null,_0x78bbc4;}}:function(){};return _0x3d2710=![],_0x2952d5;};}()),_0x639bff=_0x8454d4(this,function(){const _0x134224={_0x2e9905:0x34a,_0x22366b:0x341,_0x1a9092:0x344,_0x218397:0x32a,_0x5ce27e:0x35f,_0x57d5b4:0x240,_0x125e03:0x259,_0x1a7659:0x238,_0x352cd9:0x236,_0xc33fb1:0x234,_0x2f4fdd:0x227,_0x1c035b:0x23d,_0x54745d:0x237,_0x5727c2:0x230,_0x3db54b:0x24b,_0x3b0be1:0x234,_0x25e866:0x23e,_0x3dde1d:0x24f,_0xff101d:0x269,_0x341215:0x23a},_0x8ccd00={_0x55628a:0x9b},_0x10f1a7={_0x583fce:0x1af};function _0x50c186(_0x5eeee2,_0x54b93f,_0x16fa9c,_0x4bda07){return _0x527c(_0x5eeee2-_0x10f1a7._0x583fce,_0x54b93f);}function _0x451763(_0x46b971,_0x4638ca,_0x5b53dd,_0x5dc781){return _0x527c(_0x46b971-_0x8ccd00._0x55628a,_0x5dc781);}return _0x639bff[_0x50c186(_0x134224._0x2e9905,0x352,_0x134224._0x22366b,0x35b)]()[_0x50c186(_0x134224._0x1a9092,0x35d,_0x134224._0x218397,_0x134224._0x5ce27e)](_0x451763(0x24f,_0x134224._0x57d5b4,_0x134224._0x125e03,_0x134224._0x1a7659)+'+$')[_0x451763(_0x134224._0x352cd9,_0x134224._0xc33fb1,_0x134224._0x2f4fdd,_0x134224._0x1c035b)]()[_0x451763(0x24e,0x247,0x243,_0x134224._0x54745d)+'r'](_0x639bff)[_0x451763(_0x134224._0x5727c2,_0x134224._0x3db54b,_0x134224._0x3b0be1,_0x134224._0x25e866)](_0x451763(_0x134224._0x3dde1d,_0x134224._0xff101d,_0x134224._0x341215,_0x134224._0x1a7659)+'+$');});_0x639bff();import{call,select,put,takeEvery,all,take,delay,takeLatest,getContext}from'redux-saga/effects';import{safeCall,createSpawnRestarted}from'../lib';import{getRecentRoomsApi,getVersionApi}from'../../api/core';import{PREFERENCES,preferencesInitData,getPreferencesLocale,getPreferencesLastRoomId,getPreferencesNotificationsType,getPreferencesNotificationsAlerts,preferenceUpdateTask,getPreferencesDisclaimerComplete}from'../preferences';import{LAYOUT_TYPE,setUILayoutType}from'../ui-desktop';import{APP_CONTEXT_KEY,PLATFORM_CONTEXT_KEY}from'../constants';import{roomInvitationHandler,activeRoomSaga,EMPTY_ROOM_ID,setRoomPairingActive,getRoomPairingIdActive,roomDmReplyHandler,getRoomInvitePreviewsByInvitationLink,getRoomItemById,calculateAndUpdateUnreadRoomsCount,setDmContact,getWaitingDmMemberId,switchRoomSubmit,setWaitingDmMemberId}from'../room';import{chatAddMessageHandler,chatUpdateMessageHandler,getChatMessageAnchorId,chatMessageJumpToCmd}from'../chat';import{taskErrorSaga}from'../error';import{APP_STATUS}from'./app.constants';import{getAppState,setAppCurrentRoomId,getAppCurrentRoomId,initApplication,initAppLocale,setAppNotificationsType,setAppNotificationsAlerts,getAppLocale,setAppLocaleSuccess,setAppInitialStatus,setAppStatus,appRoomInvitationLinkServed}from'./app.reducer';import{loadIdentitySync,getIsIdentityNameSet,getIsIdentityConfirmed,getIsIdentityLoggedOut}from'../identity';import{resetModuleStateCmd}from'../lib/rootAction';export function*appStateCleanup(){yield put(resetModuleStateCmd());}export function*appGetNextRoomId({topOnly:_0x50e580}={}){const _0x43b38a={_0x6ff91e:0x9a,_0xd95a3f:0x87,_0x435f70:0x96,_0x39a1b8:0x96,_0x6390ff:0x32c,_0x3a9131:0x31a,_0x21aa3a:0x31a},_0x52e71d={_0x13682c:0x184},_0x1e907a={_0x1adb30:0x117},_0x5d68d9=yield select(getPreferencesLastRoomId);if(_0x5d68d9&&!_0x50e580)return _0x5d68d9;const {rooms:_0x1a4d2f}=yield*getRecentRoomsApi({'limit':0x1});function _0xcdd90e(_0x2ed87f,_0x39905b,_0x1f0855,_0x3283dc){return _0x527c(_0x1f0855- -_0x1e907a._0x1adb30,_0x39905b);}function _0x21e91c(_0x3e2dbb,_0x54fb31,_0x2b0961,_0x1101f7){return _0x527c(_0x3e2dbb-_0x52e71d._0x13682c,_0x54fb31);}if(_0x1a4d2f[_0xcdd90e(_0x43b38a._0x6ff91e,_0x43b38a._0xd95a3f,_0x43b38a._0x435f70,_0x43b38a._0x39a1b8)]>0x1c45*-0x1+-0x1*-0x6cb+0x157a){const _0x13eb56=_0x1a4d2f[0xb55*0x1+-0x5e9*-0x1+-0x113e][_0x21e91c(_0x43b38a._0x6390ff,_0x43b38a._0x3a9131,0x32f,_0x43b38a._0x21aa3a)];return _0x13eb56;}return EMPTY_ROOM_ID;}const APP_LOADER_SHOWTIME=-0x1*-0x14df+-0x1e25*-0x1+-0x3110;export function*appInitialStartupHandler(){const _0x152780={_0x1ddc92:0x26c,_0xf4cfe4:0x25d,_0x5be59a:0x257,_0x181664:0x108,_0x4c1299:0x10a,_0x335894:0x117,_0x4c6275:0x110,_0x23b25c:0xfc,_0x14bec9:0x125,_0x47a539:0x102,_0x50e4c5:0x22c,_0x24214a:0x246,_0x44b0db:0x237,_0xfbbf0c:0x241,_0x1cbded:0x263,_0xd81799:0x259,_0x539344:0x26a,_0x35154c:0x244,_0x309e38:0x24e,_0x3d5032:0x119,_0x2724ca:0x11f,_0x380060:0x129,_0x13a7e6:0x11b,_0x182808:0x127,_0x353b02:0x124,_0x1f0bf0:0x110,_0x4aed54:0x13a,_0x375906:0x25a,_0x4ca8f8:0x253,_0x22a0c6:0x267,_0x13004c:0x239,_0xf6555c:0x226,_0xa872b3:0x24f,_0x301e19:0x101,_0x48bc25:0xed,_0x50a7f9:0xe9,_0x3c79bb:0xf6,_0x5967b6:0x249,_0x3fc2cd:0x257,_0x48ab43:0x26d,_0x37d16c:0x243,_0x30fe54:0x24c,_0x3f5db7:0x255,_0x5977e6:0xff,_0x352e61:0xf1,_0x3f745b:0xe8},_0x272dab={_0x2f890e:0x9c},_0x24893e={_0x10a95b:0x99},{config:_0x517e2f,applicationKey:_0x310bcf}=yield getContext(PLATFORM_CONTEXT_KEY);yield put(initApplication({'applicationKey':_0x310bcf,'linkData':_0x517e2f[_0x318d5b(_0x152780._0x1ddc92,0x25c,_0x152780._0xf4cfe4,_0x152780._0x5be59a)]}));let _0x40d795=APP_STATUS[_0x1d9133(_0x152780._0x181664,0x111,_0x152780._0x4c1299,_0x152780._0x335894)];const [{version:_0x2e3c0d},_0x2d5171]=yield all([call(getVersionApi),call(loadIdentitySync),call(preferencesInitData),delay(APP_LOADER_SHOWTIME)]);if(!_0x2d5171){yield put(setAppInitialStatus({'status':APP_STATUS[_0x1d9133(_0x152780._0x4c6275,_0x152780._0x23b25c,_0x152780._0x14bec9,_0x152780._0x47a539)+_0x318d5b(_0x152780._0x50e4c5,_0x152780._0x24214a,_0x152780._0x44b0db,_0x152780._0xfbbf0c)],'appVersion':_0x2e3c0d}));return;}const [_0xf62fa8,_0x5d4e47,_0x526080]=yield all([select(getIsIdentityConfirmed),select(getIsIdentityNameSet),select(getIsIdentityLoggedOut)]),_0xf926f8=yield select(getPreferencesDisclaimerComplete);function _0x1d9133(_0x1c219c,_0x507c9c,_0x3bf8ee,_0xcccbeb){return _0x527c(_0x1c219c- -_0x24893e._0x10a95b,_0xcccbeb);}(!_0x5d4e47||_0x526080)&&(_0x40d795=APP_STATUS[_0x318d5b(_0x152780._0x1cbded,_0x152780._0xd81799,_0x152780._0x539344,_0x152780._0x35154c)+_0x318d5b(0x252,_0x152780._0x309e38,0x24f,0x25d)]);if(_0x526080)yield put(setUILayoutType(_0xf926f8?LAYOUT_TYPE['IDENTITY_S'+_0x1d9133(_0x152780._0x3d5032,_0x152780._0x2724ca,_0x152780._0x380060,0x130)]:LAYOUT_TYPE[_0x1d9133(_0x152780._0x14bec9,_0x152780._0x13a7e6,0x110,_0x152780._0x182808)+'LAIMER']));else{if(!_0x5d4e47&&!_0xf62fa8)yield put(setUILayoutType(_0xf926f8?LAYOUT_TYPE[_0x1d9133(_0x152780._0x353b02,_0x152780._0x1f0bf0,_0x152780._0x4aed54,0x12a)+'ETUP']:LAYOUT_TYPE[_0x318d5b(0x252,_0x152780._0x375906,_0x152780._0x4ca8f8,_0x152780._0x22a0c6)+_0x318d5b(_0x152780._0x309e38,_0x152780._0x13004c,_0x152780._0xf6555c,_0x152780._0xa872b3)]));else!_0x5d4e47&&_0xf62fa8&&(yield put(setUILayoutType(LAYOUT_TYPE['SETUP_IDEN'+_0x1d9133(_0x152780._0x301e19,_0x152780._0x48bc25,_0x152780._0x50a7f9,_0x152780._0x3c79bb)+_0x318d5b(_0x152780._0x5967b6,_0x152780._0x3fc2cd,_0x152780._0x48ab43,0x23e)])));}const {localeManager:_0x36e345}=yield getContext(APP_CONTEXT_KEY),_0x213cb0=yield select(getPreferencesLocale),_0x282cba=yield select(getPreferencesNotificationsAlerts),_0x25d598=yield select(getPreferencesNotificationsType);function _0x318d5b(_0x4127b7,_0x1ead12,_0x3514b3,_0x2dc850){return _0x527c(_0x1ead12-_0x272dab._0x2f890e,_0x2dc850);}const _0x1bfe21=_0x213cb0||_0x36e345[_0x318d5b(_0x152780._0x37d16c,0x242,_0x152780._0x30fe54,_0x152780._0x3f5db7)+'le']||'en';yield _0x36e345[_0x1d9133(_0x152780._0x5977e6,_0x152780._0x352e61,_0x152780._0x5977e6,_0x152780._0x3f745b)](_0x1bfe21),yield put(initAppLocale(_0x1bfe21)),yield put(setAppNotificationsAlerts(_0x282cba)),yield put(setAppNotificationsType(_0x25d598)),yield put(setAppInitialStatus({'status':_0x40d795,'appVersion':_0x2e3c0d}));}export function*appRoomJoinSaga(_0x258e6e){const _0x126661={_0x2df4e2:0x180,_0x3f13f9:0x162,_0xd9ce08:0x181,_0x2ea4df:0x176,_0xd837d6:0x1b1,_0x23389e:0x19c,_0x16fb43:0x95,_0x13ab2b:0x7f,_0x3d82db:0x97,_0x1b149d:0x87,_0x50395c:0x83,_0x50ef07:0x93},_0xe2080d={_0x392dc2:0x23e};function _0x3fba40(_0x396d5b,_0x2017a9,_0x15f7a1,_0x577733){return _0x527c(_0x577733- -_0xe2080d._0x392dc2,_0x2017a9);}const {link:_0xd010d6,setActive:_0x1b97bb,skipParse:_0x3550a9}=_0x258e6e[_0x82e982(-_0x126661._0x2df4e2,-_0x126661._0x3f13f9,-_0x126661._0xd9ce08,-_0x126661._0x2ea4df)],_0xfb4a57=yield*roomInvitationHandler({'link':_0xd010d6,'setActive':_0x1b97bb,'skipParse':_0x3550a9});function _0x82e982(_0x29a07f,_0x1107d8,_0x1d6611,_0x58fef2){return _0x527c(_0x58fef2- -0x32f,_0x1d6611);}!_0xfb4a57&&(yield taskErrorSaga(_0x82e982(-0x190,-0x189,-_0x126661._0xd837d6,-_0x126661._0x23389e)+_0x3fba40(-0x6f,-_0x126661._0x16fb43,-0x7c,-_0x126661._0x13ab2b),_0x3fba40(-_0x126661._0x3d82db,-_0x126661._0x1b149d,-_0x126661._0x50395c,-_0x126661._0x50ef07)+'join\x20room\x20'+'without\x20li'+'nk'));}export function*appDmResponseSaga(_0x3f9266){const _0x416346={_0x334c15:0xa6,_0x898a6c:0x9a,_0x4970a9:0x95,_0x501460:0x3a6,_0xcb48a3:0x3b1,_0x5bdf06:0x7b,_0x4c15cc:0x80,_0x59299f:0x84,_0x3bed0d:0x96,_0x4d573c:0xa5,_0x331aae:0x97},_0x587060={_0x177f48:0x21d},{replyType:_0x40e559,requestId:_0x3014b2}=_0x3f9266['payload'];function _0x14bd5e(_0x45a779,_0x3d505d,_0x27533a,_0x4e5d58){return _0x527c(_0x27533a-_0x587060._0x177f48,_0x3d505d);}function _0x823e83(_0xdbe2f0,_0x2528a4,_0x5a7f36,_0x4f88d7){return _0x527c(_0x4f88d7- -0x123,_0xdbe2f0);}const _0x43f042=yield*roomDmReplyHandler({'replyType':_0x40e559,'requestId':_0x3014b2});!_0x43f042&&(yield taskErrorSaga(_0x823e83(_0x416346._0x334c15,_0x416346._0x898a6c,0x8e,_0x416346._0x4970a9)+'nseSaga',_0x14bd5e(_0x416346._0x501460,0x3cc,_0x416346._0xcb48a3,0x3bb)+_0x823e83(_0x416346._0x5bdf06,0x87,_0x416346._0x4c15cc,_0x416346._0x59299f)+_0x823e83(_0x416346._0x3bed0d,0x96,_0x416346._0x4d573c,_0x416346._0x331aae)));}function _0x527c(_0x527cdb,_0x954f0c){const _0xce3f9a=_0x2997();return _0x527c=function(_0x43cc50,_0xc545fc){_0x43cc50=_0x43cc50-(-0x537*0x4+-0x1bbd+0x322c);let _0x569f60=_0xce3f9a[_0x43cc50];return _0x569f60;},_0x527c(_0x527cdb,_0x954f0c);}export function*appRoomSwitchSaga(_0x1cac85){const _0x7d0b6f={_0x40ee7c:0x3ea,_0x5761fe:0x3e9,_0x340fbd:0x3ed,_0x5a3edf:0x138,_0x2cfc12:0x11b,_0x1d7107:0x12f},_0x3079a5={_0x8e595b:0x2e6},_0x2d2e32={_0x492332:0x219};function _0x137753(_0x489248,_0x3e1704,_0x2ededb,_0x2e6598){return _0x527c(_0x3e1704-_0x2d2e32._0x492332,_0x2ededb);}const {roomId:_0x1c42a2,messageId:_0x1f2c4a,answeringCallRing:_0x3a27d3}=_0x1cac85[_0x137753(_0x7d0b6f._0x40ee7c,0x3d2,_0x7d0b6f._0x5761fe,_0x7d0b6f._0x340fbd)];function _0x345755(_0x53dac8,_0x27efe7,_0x1b8ddb,_0x32ffdd){return _0x527c(_0x1b8ddb- -_0x3079a5._0x8e595b,_0x32ffdd);}const _0x3ca6e4=yield select(getAppCurrentRoomId);if(!_0x1c42a2)return;if(_0x1c42a2===_0x3ca6e4){if(_0x1f2c4a){const _0x3d6b62=yield select(getChatMessageAnchorId);if(_0x3d6b62===_0x1f2c4a)return;yield put(chatMessageJumpToCmd({'messageId':_0x1f2c4a}));}_0x3a27d3&&(yield put(setAppCurrentRoomId({'roomId':_0x1c42a2,'answeringCallRing':_0x3a27d3})));return;}yield put(setAppCurrentRoomId({'roomId':_0x1c42a2,'messageId':_0x1f2c4a,'answeringCallRing':_0x3a27d3})),yield call(preferenceUpdateTask,PREFERENCES[_0x345755(-_0x7d0b6f._0x5a3edf,-_0x7d0b6f._0x2cfc12,-_0x7d0b6f._0x1d7107,-0x137)+'ID'],_0x1c42a2);}export function*appChatAddMessageSaga(_0x564e0a){const _0x434551={_0x36c418:0x2a8,_0x420788:0x2a7,_0x5c3b0a:0x2ba,_0xadcc03:0x46,_0x4069e9:0x33,_0x4db08f:0x1d},_0x24e51d={_0xe5063c:0x123},_0x5a37a2={_0x237d5b:0x16b};function _0x7b3edc(_0x3817dc,_0x3c3820,_0x55ca44,_0x1b83e7){return _0x527c(_0x3c3820- -_0x5a37a2._0x237d5b,_0x3817dc);}function _0x5d0c84(_0x4d3e73,_0x231009,_0x16f546,_0x237b62){return _0x527c(_0x237b62-_0x24e51d._0xe5063c,_0x16f546);}try{const {text:_0x51fe37,files:_0x39a577,display:_0xdc5a67,replyTo:_0x29768b,linkPreviews:_0x13a254}=_0x564e0a['payload'],_0x3699ca=yield select(getAppCurrentRoomId),_0x2f83de=yield select(getRoomInvitePreviewsByInvitationLink),_0x53a5df={..._0x13a254,..._0x2f83de};if(_0x3699ca){const _0x35367d=yield select(getRoomItemById(_0x3699ca));yield chatAddMessageHandler({'roomId':_0x3699ca,'roomVersion':_0x35367d?.[_0x5d0c84(_0x434551._0x36c418,0x2a6,_0x434551._0x420788,_0x434551._0x5c3b0a)],'text':_0x51fe37,'files':_0x39a577,'display':_0xdc5a67,'replyTo':_0x29768b,'previewByLink':_0x53a5df});}}catch(_0x5234c4){yield taskErrorSaga(_0x7b3edc(_0x434551._0xadcc03,_0x434551._0x4069e9,_0x434551._0x4db08f,0x3c)+'MessageSag'+'a',_0x5234c4);}}export function*appChatUpdateMessageSaga(_0x56831c){const _0x31b1b7={_0x1bacbe:0x2b9,_0x3d274e:0x2ad,_0x3efd42:0x298,_0x1a61e6:0x283,_0x2b5af7:0x2a5,_0x1fa291:0x168,_0x29ae69:0x159,_0x21841c:0x2a5,_0x55035d:0x2a9,_0x355da4:0x2b0,_0x5c49ed:0x299},_0x5b71f6={_0x2dec3a:0x5a};function _0x281368(_0x13fbd2,_0x1c39be,_0x3ec539,_0x1674ae){return _0x527c(_0x13fbd2- -_0x5b71f6._0x2dec3a,_0x3ec539);}function _0x253aba(_0x2e4679,_0x4b84ef,_0x3c2d0c,_0x36a9ff){return _0x527c(_0x4b84ef-0xf4,_0x2e4679);}try{const {messageId:_0x11e243,text:_0x1a0033,display:_0x3ca673,linkPreviews:_0x40db83}=_0x56831c[_0x253aba(_0x31b1b7._0x1bacbe,_0x31b1b7._0x3d274e,0x2bd,0x2ad)],_0x189089=yield select(getAppCurrentRoomId),_0x4f21d9=yield select(getRoomInvitePreviewsByInvitationLink),_0x4f8527={..._0x40db83,..._0x4f21d9};if(_0x189089){const _0x5998cf=yield select(getRoomItemById(_0x189089));yield chatUpdateMessageHandler({'roomId':_0x189089,'roomVersion':_0x5998cf['version'],'messageId':_0x11e243,'text':_0x1a0033,'display':_0x3ca673,'previewByLink':_0x4f8527});}}catch(_0x527aee){yield taskErrorSaga(_0x253aba(0x2ab,_0x31b1b7._0x3efd42,_0x31b1b7._0x1a61e6,_0x31b1b7._0x2b5af7)+_0x281368(0x16d,0x170,_0x31b1b7._0x1fa291,_0x31b1b7._0x29ae69)+_0x253aba(_0x31b1b7._0x21841c,_0x31b1b7._0x55035d,_0x31b1b7._0x355da4,_0x31b1b7._0x5c49ed),_0x527aee);}}export function*setAppNotificationsTypeSaga({payload:_0x4053e7}){const _0x5ca633={_0x271463:0xff,_0x58e841:0xd9,_0x5d672b:0x105},_0x4f5356={_0x134f9e:0xb1};yield call(preferenceUpdateTask,PREFERENCES['NOTIFICATI'+_0x1c56f8(0xee,_0x5ca633._0x271463,_0x5ca633._0x58e841,_0x5ca633._0x5d672b)],_0x4053e7);function _0x1c56f8(_0x1b26f1,_0xfa5014,_0x330603,_0x3cefe1){return _0x527c(_0x1b26f1- -_0x4f5356._0x134f9e,_0x3cefe1);}yield call(calculateAndUpdateUnreadRoomsCount);}export function*appRoomNotificationsSaga(_0x488626){const _0x313a14={_0xf2c156:0x46b,_0x4380d6:0x48e,_0x3936da:0x485,_0x56a1a6:0x45f,_0x3f44fc:0x46f,_0x2381e6:0x462,_0x3b38f6:0x46a,_0x46e630:0x47a,_0x3fce3a:0x480},_0x104250={_0x4ea1a9:0x2c2};function _0x863d94(_0x1196c2,_0x260205,_0x280650,_0x213691){return _0x527c(_0x280650-0x2c2,_0x213691);}function _0xe3739c(_0x3daebd,_0xfebf30,_0x5bb827,_0x11b0df){return _0x527c(_0xfebf30- -_0x104250._0x4ea1a9,_0x11b0df);}const _0x40ed20=Object['values'](_0x488626[_0x863d94(_0x313a14._0xf2c156,0x494,0x47b,_0x313a14._0x4380d6)]);_0x40ed20[_0x863d94(_0x313a14._0x3936da,_0x313a14._0x56a1a6,_0x313a14._0x3f44fc,_0x313a14._0x2381e6)]>0x1*-0xa3+-0x1*-0x1253+-0x11b*0x10&&_0x40ed20[0x5*0x53b+-0x25d2+0xbab][_0x863d94(_0x313a14._0x3b38f6,_0x313a14._0x46e630,0x472,_0x313a14._0x3fce3a)+'ons']===![]&&(yield call(calculateAndUpdateUnreadRoomsCount));}export function*toggleAppNotificationsAlertSaga({payload:_0x5bfc13}){const _0x270532={_0x72b624:0xb5,_0xbee9dc:0xa3,_0x3ffab5:0xa1,_0x58e628:0xc1,_0x5b7097:0xd1,_0x359e02:0xc2,_0x4a0fbb:0xc0,_0x123108:0xe5,_0xf07f25:0x583,_0xeeec23:0x57e,_0x21e584:0x568},_0x44fd82={_0x643b30:0x3db},_0x556ada={_0x4865db:0x276},_0x292b8b=yield select(getPreferencesNotificationsAlerts);function _0x248a2d(_0x432778,_0x4c89e0,_0x591199,_0x2c620f){return _0x527c(_0x432778- -_0x556ada._0x4865db,_0x591199);}const _0x3efd8b=_0x292b8b[_0x248a2d(-_0x270532._0x72b624,-_0x270532._0xbee9dc,-_0x270532._0x3ffab5,-_0x270532._0x58e628)](_0x5bfc13)?_0x292b8b[_0x248a2d(-_0x270532._0x5b7097,-_0x270532._0x359e02,-_0x270532._0x4a0fbb,-_0x270532._0x123108)](_0x1a0dd2=>_0x1a0dd2!==_0x5bfc13):[..._0x292b8b,_0x5bfc13];function _0xbad217(_0x3ec3b7,_0x4a539f,_0x5d0c99,_0x27f7a0){return _0x527c(_0x4a539f-_0x44fd82._0x643b30,_0x27f7a0);}yield call(preferenceUpdateTask,PREFERENCES['NOTIFICATI'+_0xbad217(_0x270532._0xf07f25,_0x270532._0xeeec23,_0x270532._0x21e584,0x570)],_0x3efd8b);}function _0x2997(){const _0x164506=['length','currentRoo','610kLVEGS','notificati','847ZZOYLE','ETUP','constructo','(((.+)+)+)','Saga','608238zrIwXW','LAST_ROOM_','appDmRespo','payload','ult','AY_NAME','263930srclSa','IDENTITY_S','SETUP_DISC','nSaga','linkData','includes','1869372IaPorK','apply','71TIFCfG','isRunning','56LSzkJs','ateMessage','1474AFrVSh','appRoomJoi','invalid\x20dm','search','7404BKGvSG','version','setLocale','836684siZEsi','TITY_DISPL','toString','659008VaEvMs','LAIMER','appChatAdd','ONS_TYPE','LOCALE','RUNNING','forEach','ONS_ALERTS','appChatUpd','filter','clientLoca','\x20reply\x20res','roomId','CRITICAL_E','RROR','unable\x20to\x20','map'];_0x2997=function(){return _0x164506;};return _0x2997();}export function*appLocaleSaga(){const _0x1d22ca={_0x1caba9:0x137,_0x32ae40:0x144,_0x5cea53:0x14a,_0x5550c9:0x325,_0x49b1aa:0x323,_0x4547b3:0x33e},_0x4349c3={_0x53a65c:0x183},_0x44cc81={_0x3aacb0:0x2dc};function _0x53a06d(_0x52cd1c,_0x2dfef1,_0x2f07ba,_0x5ead26){return _0x527c(_0x2dfef1- -_0x44cc81._0x3aacb0,_0x5ead26);}function _0x50811d(_0x148e7e,_0x5a5b81,_0x5f376b,_0x205870){return _0x527c(_0x5a5b81-_0x4349c3._0x53a65c,_0x5f376b);}try{const _0x196b22=yield select(getAppLocale),{localeManager:_0x3c3635}=yield getContext(APP_CONTEXT_KEY);yield _0x3c3635[_0x53a06d(-_0x1d22ca._0x1caba9,-_0x1d22ca._0x32ae40,-_0x1d22ca._0x5cea53,-0x13d)](_0x196b22),yield call(preferenceUpdateTask,PREFERENCES[_0x50811d(_0x1d22ca._0x5550c9,_0x1d22ca._0x49b1aa,0x318,_0x1d22ca._0x4547b3)],_0x196b22);}catch(_0x2774a7){yield taskErrorSaga('appLocaleS'+'aga',_0x2774a7);}finally{yield put(setAppLocaleSuccess());}}export function*currentRoomSaga({payload:_0x31b5e9}){const _0x40384c={_0x297d20:0x112,_0x5d0399:0x10f},_0x260b3d={_0x4d5384:0x9f},{messageId:_0x5ca669}=_0x31b5e9;function _0x404d0d(_0x4c0956,_0x473638,_0x4a6067,_0x54974e){return _0x527c(_0x4a6067- -_0x260b3d._0x4d5384,_0x54974e);}const {currentRoomId:_0xfefaa8,appVersion:_0x53f731}=yield select(getAppState),_0x5d4356=yield safeCall(activeRoomSaga,{'roomId':_0xfefaa8,'messageId':_0x5ca669,'appVersion':_0x53f731});_0x5d4356&&(yield taskErrorSaga(_0x404d0d(_0x40384c._0x297d20,0x11f,_0x40384c._0x5d0399,0x11b)+'mSaga',_0x5d4356));}export function*appRoomListHandlerSaga(){yield takeEvery(setRoomPairingActive,function*_0x236259(){const _0x44077f=yield select(getRoomPairingIdActive);if(_0x44077f)yield put(setAppCurrentRoomId({'roomId':EMPTY_ROOM_ID}));else{const _0x27ec48=yield appGetNextRoomId();yield put(setAppCurrentRoomId({'roomId':_0x27ec48}));}});}export function*appRoomCloseSaga({payload:_0x4d78f2}){const {openNextRoom:_0x1625e3}=_0x4d78f2||{};let _0x163330=EMPTY_ROOM_ID;_0x1625e3&&(_0x163330=yield appGetNextRoomId({'topOnly':!![]})),yield put(setAppCurrentRoomId({'roomId':_0x163330})),yield put(setWaitingDmMemberId({'waitingDmMemberId':EMPTY_ROOM_ID})),yield call(preferenceUpdateTask,PREFERENCES['LAST_ROOM_'+'ID'],_0x163330);}export function*waitingDmRoomSaga(){yield takeLatest(setDmContact,function*_0x466940({payload:{roomId:_0xe75e15,memberId:_0x7e0a86}}){const _0x1e9333=yield select(getWaitingDmMemberId);_0xe75e15&&_0x7e0a86&&_0x1e9333&&_0x7e0a86===_0x1e9333&&(yield put(switchRoomSubmit({'roomId':_0xe75e15})));});}export function*appInitialLinkHandler(){const {linkData:_0x4ff83e}=yield select(getAppState);_0x4ff83e&&(yield put(appRoomInvitationLinkServed()),yield roomInvitationHandler({'link':_0x4ff83e,'skipParse':!![]}));}const spawnRestarted=createSpawnRestarted({'onError':taskErrorSaga});export function*appRootFunctionalitySaga(_0xc1c7ad){const _0x4f473d={_0x5acda1:0x1e1,_0x4e56f8:0x1ef,_0x49abf0:0x1df,_0x3c8921:0x1f2,_0x69e28c:0x1fb},_0x351b2e={_0x10f244:0x1aa,_0x31410b:0x19f,_0x44494b:0x1b4,_0x4c224e:0x193},_0x9f3088={_0x4139fd:0x39e},_0x27ca07={_0x160d37:0x127};let _0x20a1c1=[];function _0x169c32(_0x4a0bd3,_0x990e58,_0x31a878,_0x43d55f){return _0x527c(_0x990e58-_0x27ca07._0x160d37,_0x43d55f);}function _0x42ff64(_0x55f1e6,_0x2f9796,_0x44c725,_0x2c23c1){return _0x527c(_0x44c725- -_0x9f3088._0x4139fd,_0x55f1e6);}let _0x1a876d='';while(!![]){yield take([setAppInitialStatus,setAppStatus]);const {appStatus:_0x16df9d,appVersion:_0x554268}=yield select(getAppState);if(_0x1a876d===_0x16df9d)continue;_0x1a876d=_0x16df9d,_0x20a1c1[_0x42ff64(-0x1e9,-_0x4f473d._0x5acda1,-0x1fc,-_0x4f473d._0x4e56f8)](_0x355d57=>{const _0x29d054={_0x430b1b:0x16b,_0x1ed39a:0x1ba};function _0x2bb3c6(_0x4ab2a3,_0x30607d,_0x419cfb,_0x25cb7e){return _0x42ff64(_0x419cfb,_0x30607d-_0x29d054._0x430b1b,_0x4ab2a3-0x2f,_0x25cb7e-_0x29d054._0x1ed39a);}_0x355d57[_0x2bb3c6(-_0x351b2e._0x10f244,-_0x351b2e._0x31410b,-_0x351b2e._0x44494b,-_0x351b2e._0x4c224e)]()&&_0x355d57['cancel']();}),_0x20a1c1=yield all(_0xc1c7ad[_0x16df9d][_0x42ff64(-0x1fc,-_0x4f473d._0x49abf0,-_0x4f473d._0x3c8921,-_0x4f473d._0x69e28c)](_0x16387b=>spawnRestarted(_0x16387b,{'appVersion':_0x554268})));}}