(function(_0x37d7d1,_0x517dd0){const _0x47b2b1={_0x15065c:0x10c,_0x2b7923:0xb1,_0x196da9:0xd9,_0x36b3ea:0xcf,_0x282847:0x499,_0x2d8e9c:0x4a7,_0x35e8e4:0x48e,_0x3bc7d0:0x4a5,_0x54ed96:0x48f,_0x3bc8bb:0x49f,_0x20779c:0x500,_0x17fc8d:0x508,_0x212cf5:0x4d5,_0x4fa3b9:0x6a,_0x2d5878:0x96,_0x2afab2:0xbd,_0x4721c9:0x81,_0x41441b:0xa1,_0x2f5ef9:0xa4,_0x3af4b0:0x4c3,_0x127f42:0x4e9,_0x3f5a91:0x52f,_0x3e3de0:0x4f7,_0x11d465:0xa4,_0xd50b62:0x78,_0x41a2ca:0x95,_0xea4f39:0xba,_0x209723:0x4da,_0x55df7d:0x4b8,_0x47f246:0x49c,_0x7bde1d:0x4bd,_0x44f1b4:0x46e,_0x3c6857:0x483,_0x736f31:0x4a4,_0x35d445:0x4f1,_0x465d26:0x46f,_0x2f724a:0x498},_0x5bf21a={_0x56a5c9:0x345};function _0x3a37ae(_0x5e5242,_0x310fd1,_0x41c96f,_0x13a7e9){return _0x3b33(_0x41c96f- -0xd5,_0x310fd1);}function _0x24e73a(_0x10d5c1,_0x4f57f1,_0x343d9f,_0x180ce0){return _0x3b33(_0x180ce0-_0x5bf21a._0x56a5c9,_0x10d5c1);}const _0x1ed0ad=_0x37d7d1();while(!![]){try{const _0x582020=-parseInt(_0x3a37ae(_0x47b2b1._0x15065c,_0x47b2b1._0x2b7923,_0x47b2b1._0x196da9,_0x47b2b1._0x36b3ea))/(-0x3*0x52c+-0x340*-0x1+0xc45)*(-parseInt(_0x24e73a(0x482,_0x47b2b1._0x282847,_0x47b2b1._0x2d8e9c,0x49f))/(-0x3*0x7b5+-0x21da+0x38fb))+-parseInt(_0x24e73a(0x472,_0x47b2b1._0x35e8e4,_0x47b2b1._0x3bc7d0,_0x47b2b1._0x54ed96))/(-0xb60+0x1d93*0x1+0x246*-0x8)*(parseInt(_0x24e73a(_0x47b2b1._0x3bc8bb,_0x47b2b1._0x20779c,_0x47b2b1._0x17fc8d,_0x47b2b1._0x212cf5))/(-0xe2c+-0x395*0x4+0x1c84))+parseInt(_0x3a37ae(_0x47b2b1._0x4fa3b9,0xc3,_0x47b2b1._0x2d5878,_0x47b2b1._0x2afab2))/(-0x17*-0x158+-0xa6*-0x2b+-0x3ac5)+parseInt(_0x3a37ae(_0x47b2b1._0x4721c9,_0x47b2b1._0x41441b,_0x47b2b1._0x2f5ef9,0xa8))/(-0xd77+0xf21*-0x1+0x1c9e)+parseInt(_0x24e73a(_0x47b2b1._0x3af4b0,_0x47b2b1._0x127f42,_0x47b2b1._0x3f5a91,_0x47b2b1._0x3e3de0))/(0x24e0+-0x1a59+-0xa80)*(-parseInt(_0x3a37ae(_0x47b2b1._0x11d465,_0x47b2b1._0xd50b62,_0x47b2b1._0x41a2ca,_0x47b2b1._0xea4f39))/(-0x631*-0x1+-0x1*0x23dd+0x1db4*0x1))+parseInt(_0x24e73a(_0x47b2b1._0x209723,_0x47b2b1._0x55df7d,_0x47b2b1._0x47f246,_0x47b2b1._0x7bde1d))/(0x35a*-0x3+-0x2516+-0xd*-0x3a1)*(parseInt(_0x24e73a(_0x47b2b1._0x44f1b4,_0x47b2b1._0x3c6857,0x4bb,_0x47b2b1._0x736f31))/(-0x1f1*0xd+0x3*0x883+-0x42))+-parseInt(_0x24e73a(_0x47b2b1._0x35d445,0x4bb,0x4de,0x4e6))/(0x231*-0x1+0x1e7a+-0x1c3e)*(parseInt(_0x24e73a(_0x47b2b1._0x465d26,0x484,_0x47b2b1._0x55df7d,_0x47b2b1._0x2f724a))/(-0x4c8+-0xe9+0x71*0xd));if(_0x582020===_0x517dd0)break;else _0x1ed0ad['push'](_0x1ed0ad['shift']());}catch(_0xe8b66){_0x1ed0ad['push'](_0x1ed0ad['shift']());}}}(_0x578c,0x3410f*0x1+-0xbfb*0x17+-0xee5*-0x1));const _0x2c7ad4=(function(){let _0x1b5e51=!![];return function(_0x235254,_0x5b0eee){const _0x3f5ecf={_0x5166f0:0x83,_0x345852:0x55,_0x3bac00:0x5a,_0x2daf4f:0x90},_0x1edb28=_0x1b5e51?function(){function _0x19b719(_0x4dc3af,_0x40e903,_0x12dcfd,_0x1418cf){return _0x3b33(_0x12dcfd- -0x1c3,_0x1418cf);}if(_0x5b0eee){const _0x5695d7=_0x5b0eee[_0x19b719(-_0x3f5ecf._0x5166f0,-_0x3f5ecf._0x345852,-_0x3f5ecf._0x3bac00,-_0x3f5ecf._0x2daf4f)](_0x235254,arguments);return _0x5b0eee=null,_0x5695d7;}}:function(){};return _0x1b5e51=![],_0x1edb28;};}()),_0x24630b=_0x2c7ad4(this,function(){const _0x379bf5={_0x1c7132:0xb,_0x146da5:0x13,_0x5508b7:0x19,_0x37492c:0x1c0,_0x3a3449:0x1f1,_0x21b658:0x1da,_0x2e971e:0x211,_0x1d2c2e:0x1f5,_0x349682:0x224,_0xaf33d:0x20f,_0x439d33:0x1fd,_0xc9f497:0x1f8},_0x32b42a={_0x3a3f70:0x1a8},_0x7a8243={_0x1e8df6:0x68};function _0xd7f8d2(_0x553a5d,_0x683b9e,_0x3f2b48,_0xfe15d7){return _0x3b33(_0x3f2b48-_0x7a8243._0x1e8df6,_0xfe15d7);}function _0x311db6(_0x2e5612,_0x3afb50,_0x33e55a,_0x2eb54c){return _0x3b33(_0x3afb50- -_0x32b42a._0x3a3f70,_0x2e5612);}return _0x24630b['toString']()['search']('(((.+)+)+)'+'+$')[_0x311db6(_0x379bf5._0x1c7132,-0x12,-_0x379bf5._0x146da5,_0x379bf5._0x5508b7)]()[_0xd7f8d2(_0x379bf5._0x37492c,0x1ce,_0x379bf5._0x3a3449,_0x379bf5._0x21b658)+'r'](_0x24630b)[_0xd7f8d2(_0x379bf5._0x2e971e,0x212,_0x379bf5._0x1d2c2e,_0x379bf5._0x349682)](_0xd7f8d2(0x221,_0x379bf5._0xaf33d,_0x379bf5._0x439d33,_0x379bf5._0xc9f497)+'+$');});_0x24630b();const b4a=require('b4a'),{contract:{hyperschema:{encode:encodeContractStruct}}}=require('../../../spec'),{verifyAttestation,verifyDeviceResponse,decryptContactRequest,generateMailboxKeyPair,generateRoomCapabilities}=require('../../invitations'),REGISTER_ROUTES=require('../registration');function _0x1605cb(_0x483543,_0x4e26d2,_0x38cdb2,_0x24069d){const _0x426fb2={_0x399243:0x1eb};return _0x3b33(_0x483543-_0x426fb2._0x399243,_0x24069d);}function _0x3b33(_0x578cee,_0x3b33fe){const _0x39b273=_0x578c();return _0x3b33=function(_0x170bde,_0xe92a0){_0x170bde=_0x170bde-(0x1ea1+0x26be+-0x4418);let _0x41236f=_0x39b273[_0x170bde];return _0x41236f;},_0x3b33(_0x578cee,_0x3b33fe);}const {KeetContractError}=require('../errors'),{isMemberActive,getMemberForDeviceKey}=require('../query'),{profileRoomStats,profileContactStats,profileContactRequestStats}=require('../stats/profile'),ROOM_STATUS_INDEX_TO_KEY=[_0x1605cb(0x339,0x32b,0x36f,0x304),_0x1605cb(0x337,0x347,0x33c,0x357)+'ed','isMentions'+_0x1605cb(0x36d,0x34a,0x38b,0x346),'isFavorite'],RoomStatus={'IsActive':0x1,'IsFullyMuted':0x2,'IsMentionsOnlyMuted':0x3,'IsFavorite':0x4},CONTACT_STATUS_INDEX_TO_KEY=[_0x2b46a3(0x6a,0x4a,0x8e,0x9e)],ContactStatus={'IsBlocked':0x1},CONTACT_REQUEST_STATUS_INDEX_TO_KEY=[_0x2b46a3(0xab,0xd0,0x72,0x86),'isAccepted','isRejected',_0x1605cb(0x365,0x354,0x32d,0x330)+'d',_0x2b46a3(0x7d,0x9e,0x8e,0x51)],ContactRequestStatus={'IsPending':0x1,'IsAccepted':0x2,'IsRejected':0x3,'IsDiscarded':0x4,'IsSeen':0x5};async function handleRunV3Migration({sharedRooms:_0x5d3322,blockedContacts:_0x5632df},{db:_0x462ba6,writer:_0x453b97}){const _0x36da73={_0x3da1d1:0x8,_0xbeb34a:0x4,_0x1a9d77:0x22,_0x2ab650:0x16,_0x52b621:0x72,_0x430a79:0x52,_0x4dda41:0x5b,_0x3e8fed:0x143,_0x15e378:0x168,_0x46cce9:0x10a,_0x4de7e1:0xf1,_0x219f9c:0x12c,_0x4f8d30:0x14d,_0x1e20a3:0x137,_0x4bdd9b:0x13f,_0x14e4a0:0x158,_0xb4343e:0x128,_0x33487b:0x115,_0x47c0a7:0x11f,_0x2f0e5e:0x3a,_0x165fc2:0x3f,_0x1d5f72:0x27,_0xa33ecc:0x41,_0x4a98af:0x13,_0x3d7cbb:0x15,_0x6429bb:0x123,_0x4fc288:0x157,_0x4545c6:0x79,_0x20f80c:0x7a,_0x3cf5c8:0x3e,_0xe592c7:0x12,_0x3db3a5:0x14,_0x121f0a:0x48,_0x4eaf03:0x4f},_0x5c67d0={_0x485d5e:0x211,_0x444d4f:0x25,_0x52c831:0x1b1},_0x341e91={_0x4df9e4:0x3aa},[_0x35a0e3,_0x2f91c7]=await Promise[_0x195341(-_0x36da73._0x3da1d1,-_0x36da73._0xbeb34a,-_0x36da73._0x1a9d77,-0x54)]([getMemberForDeviceKey(_0x462ba6,_0x453b97[_0x195341(-_0x36da73._0x2ab650,-_0x36da73._0x52b621,-_0x36da73._0x430a79,-_0x36da73._0x4dda41)]),_0x462ba6['get']('@keet-priv'+_0x394a54(_0x36da73._0x3e8fed,_0x36da73._0x15e378,0x13f,0x16f)+'nters')]);if(!isMemberActive(_0x35a0e3))throw KeetContractError['ABORT']();function _0x195341(_0x228226,_0x883352,_0x3cb95f,_0x22f3a6){return _0x1605cb(_0x3cb95f- -_0x341e91._0x4df9e4,_0x883352-0x4d,_0x3cb95f-0x140,_0x22f3a6);}for(let _0xd28ced=-0x21ef+-0x2606+0x47f5;_0xd28ced<_0x5d3322['length'];_0xd28ced++){const {roomKey:_0x4ff9e6,initiator:_0x46daa5,fastForwardTo:_0x2408d2,encryptionKey:_0x103382,seed:_0x4feca2}=_0x5d3322[_0xd28ced],_0x4640e6=generateRoomCapabilities(_0x4ff9e6,_0x4feca2),_0x1118e2=_0x4640e6[_0x394a54(_0x36da73._0x46cce9,_0x36da73._0x4de7e1,_0x36da73._0x219f9c,_0x36da73._0x4f8d30)+_0x394a54(_0x36da73._0x1e20a3,_0x36da73._0x4bdd9b,_0x36da73._0x14e4a0,_0x36da73._0xb4343e)][_0x394a54(_0x36da73._0x33487b,_0x36da73._0x47c0a7,0x13c,0x163)],_0x545d69={'isActive':!![],'isFullyMuted':![],'isMentionsOnlyMuted':![]},_0x26078c=_0xd28ced+(0x1d24+0x29*0x4a+-0x28fd),_0x2b0555={'roomKey':_0x4ff9e6,'encryptionKey':_0x103382,'mailbox':_0x1118e2,'clock':_0x26078c,'status':_0x545d69,'initiator':_0x46daa5,'fastForwardTo':_0x2408d2,'identitySwap':null};await _0x462ba6[_0x195341(-_0x36da73._0x2f0e5e,-0x62,-0x3e,-0x5)](_0x195341(-_0x36da73._0x165fc2,-0x1a,-0x14,_0x36da73._0x1d5f72)+_0x195341(-_0x36da73._0xa33ecc,_0x36da73._0x4a98af,-_0x36da73._0x3d7cbb,-0x31)+'ms',_0x2b0555);}function _0x394a54(_0x475b71,_0x112296,_0x19f58d,_0x421b14){return _0x1605cb(_0x19f58d- -_0x5c67d0._0x485d5e,_0x112296-_0x5c67d0._0x444d4f,_0x19f58d-_0x5c67d0._0x52c831,_0x421b14);}for(let _0x51a2b3=0x5*-0x791+-0xf64+0x3539;_0x51a2b3<_0x5632df[_0x394a54(_0x36da73._0x6429bb,_0x36da73._0x4fc288,0x13b,0x152)];_0x51a2b3++){const _0x47d0c0=_0x2f91c7?_0x2f91c7['contacts']+(-0x17f2+-0x482+0x1*0x1c75):-0x5*0x57+0x22fc+-0x2149,_0x21871d=_0x5632df[_0x51a2b3],_0x2ba642={'isBlocked':!![]},_0x55ef80={'memberKey':_0x21871d,'clock':_0x47d0c0,'status':_0x2ba642,'mailbox':null,'roomKey':null};await _0x462ba6[_0x195341(-_0x36da73._0x4545c6,-_0x36da73._0x20f80c,-_0x36da73._0x3cf5c8,-0x72)](_0x195341(_0x36da73._0xe592c7,-0x47,-_0x36da73._0x3db3a5,_0x36da73._0x1d5f72)+_0x195341(-_0x36da73._0x121f0a,-_0x36da73._0x4eaf03,-0x18,-_0x36da73._0x3db3a5)+'tacts',_0x55ef80);}}async function handleUpdateIdentity({identity:_0x57f2ab},{db:_0x271a5d,writer:_0x454257}){const _0x24946d={_0x562d43:0xb3,_0x53786f:0xcb,_0x181810:0xa7,_0x22343f:0xa5,_0x5b74b3:0xad,_0x1c3395:0xb4,_0x50b876:0xc3,_0x3a342f:0x409,_0x21dcfe:0x3de,_0x34ba98:0x3fb,_0x57e3ff:0x11f,_0x11e4a7:0x118,_0x2cedb5:0xfe,_0x2e7f0f:0x128,_0x16ea37:0xf0,_0xd77bcf:0xfd,_0xbef510:0xd4,_0x55a594:0x127,_0x498342:0x3a7,_0x118ed6:0x3b3,_0x20eb96:0x3da,_0xca1bd1:0x3b6,_0x44879e:0xd2,_0x166daa:0x3d6,_0x412ea6:0x3dc,_0x13e591:0x3b6,_0x162100:0x406,_0x2cbe73:0x3b2,_0x3f4277:0x3e4,_0xedf8b5:0x406,_0x409c4c:0xf5,_0x52288c:0xfc,_0x861fd3:0x100,_0x30afcd:0x3f4,_0x4f549b:0x3dc,_0x43308d:0x3bc,_0x3eec1e:0xde,_0xb5e04b:0xde,_0x5c6e40:0xa8,_0x8492ed:0x3cb,_0x12cb3a:0x408,_0x337a95:0x3fe,_0x46612c:0x3ed,_0x4ae5fb:0xe6},_0x1eabf3={_0x2ed25f:0x180,_0x2220c6:0x1b7},_0x17604a={_0x35810b:0x332,_0x1f1f4d:0x149,_0x1c3838:0xd3},[_0x3b0c34,_0x3869d1]=await Promise[_0x55fc67(-_0x24946d._0x562d43,-0xc2,-0xfe,-_0x24946d._0x53786f)]([getMemberForDeviceKey(_0x271a5d,_0x454257['key']),_0x271a5d[_0x55fc67(-_0x24946d._0x181810,-_0x24946d._0x22343f,-0x74,-_0x24946d._0x5b74b3)](_0x55fc67(-0x98,-_0x24946d._0x1c3395,-_0x24946d._0x50b876,-0xb6)+_0x1f03fe(_0x24946d._0x3a342f,0x3fb,_0x24946d._0x21dcfe,_0x24946d._0x34ba98)+_0x55fc67(-_0x24946d._0x57e3ff,-_0x24946d._0x11e4a7,-_0x24946d._0x2cedb5,-_0x24946d._0x2e7f0f))]);function _0x1f03fe(_0x45caf6,_0xb7aab0,_0x3fb556,_0x52f5c9){return _0x2b46a3(_0x3fb556-_0x17604a._0x35810b,_0xb7aab0-_0x17604a._0x1f1f4d,_0x3fb556-_0x17604a._0x1c3838,_0x52f5c9);}function _0x55fc67(_0x4ae227,_0x5885f1,_0x3288d3,_0x2cfbea){return _0x2b46a3(_0x5885f1- -_0x1eabf3._0x2ed25f,_0x5885f1-0x1ca,_0x3288d3-_0x1eabf3._0x2220c6,_0x3288d3);}if(!isMemberActive(_0x3b0c34)||!_0x3869d1||!b4a['equals'](_0x57f2ab[_0x55fc67(-_0x24946d._0x16ea37,-_0x24946d._0xd77bcf,-_0x24946d._0xbef510,-_0x24946d._0x55a594)],_0x3869d1[_0x1f03fe(0x3c4,_0x24946d._0x498342,0x3b5,_0x24946d._0x118ed6)]))throw KeetContractError[_0x1f03fe(_0x24946d._0x20eb96,0x3a6,0x3c5,_0x24946d._0xca1bd1)]();_0x57f2ab[_0x55fc67(-0x103,-0xce,-0xe2,-_0x24946d._0x44879e)+_0x1f03fe(_0x24946d._0x166daa,_0x24946d._0x412ea6,_0x24946d._0x13e591,0x3ab)]&&(_0x3869d1[_0x1f03fe(_0x24946d._0x162100,_0x24946d._0x2cbe73,_0x24946d._0x3f4277,_0x24946d._0xedf8b5)+_0x55fc67(-_0x24946d._0x409c4c,-_0x24946d._0x52288c,-_0x24946d._0xd77bcf,-_0x24946d._0x861fd3)]=_0x57f2ab[_0x1f03fe(_0x24946d._0x30afcd,_0x24946d._0x4f549b,0x3e4,_0x24946d._0x43308d)+'oreKey']),await _0x271a5d[_0x55fc67(-_0x24946d._0x3eec1e,-_0x24946d._0xb5e04b,-0xf3,-_0x24946d._0x5c6e40)](_0x1f03fe(_0x24946d._0x8492ed,_0x24946d._0x12cb3a,_0x24946d._0x337a95,_0x24946d._0x46612c)+'ate-id/ide'+_0x55fc67(-0x110,-0x118,-_0x24946d._0x4ae5fb,-0x128),_0x3869d1);}function _0x2b46a3(_0x131d7c,_0x37182f,_0x552342,_0x27616b){const _0x352e8c={_0x50b383:0xdf};return _0x3b33(_0x131d7c- -_0x352e8c._0x50b383,_0x27616b);}async function handleUpdateSettings({key:_0x41675b,settings:_0x382d34},{db:_0x7b13e6,writer:_0x21d135}){const _0x2bc25e={_0x31b966:0x59,_0x20725b:0x44,_0x338df7:0x5,_0x49795d:0x36,_0x249e6d:0x27,_0x2784d7:0x36b,_0x2a5329:0x363,_0x1267cd:0x36e,_0x20da9d:0x373,_0x4be675:0x39a,_0x2ef5ff:0x3bd,_0x340dad:0x339,_0x261280:0x37b,_0x4909ba:0x3b4,_0x566d2e:0x392,_0xbe1589:0x360,_0x3d2148:0x14,_0x23f099:0x48,_0xbb8f37:0xa},_0x4de831={_0x1172c3:0x2c6,_0x54a195:0x140},_0x5bef84={_0x1751fa:0x89,_0x5b8f20:0x12e};function _0x3d3ec7(_0x5a6ac7,_0x44e0d3,_0x2d2234,_0x58a9e7){return _0x2b46a3(_0x5a6ac7- -_0x5bef84._0x1751fa,_0x44e0d3-0x1a9,_0x2d2234-_0x5bef84._0x5b8f20,_0x44e0d3);}const [_0x916b0,_0x5b580e]=await Promise[_0x3d3ec7(0x35,_0x2bc25e._0x31b966,_0x2bc25e._0x20725b,0x46)]([getMemberForDeviceKey(_0x7b13e6,_0x21d135[_0x3d3ec7(_0x2bc25e._0x338df7,-_0x2bc25e._0x49795d,-_0x2bc25e._0x249e6d,0x39)]),_0x7b13e6['get']('@keet-priv'+_0x801978(0x35e,_0x2bc25e._0x2784d7,_0x2bc25e._0x2a5329,0x364)+_0x801978(_0x2bc25e._0x1267cd,_0x2bc25e._0x20da9d,_0x2bc25e._0x4be675,_0x2bc25e._0x2ef5ff))]);if(!isMemberActive(_0x916b0))throw KeetContractError['ABORT']();const _0x56c373={..._0x5b580e,[_0x41675b]:_0x382d34[_0x41675b]};function _0x801978(_0x2dcea2,_0x114aec,_0x10b4b0,_0x5ef407){return _0x2b46a3(_0x10b4b0-_0x4de831._0x1172c3,_0x114aec-_0x4de831._0x54a195,_0x10b4b0-0x116,_0x2dcea2);}await _0x7b13e6[_0x801978(_0x2bc25e._0x340dad,0x32c,0x368,0x338)](_0x801978(_0x2bc25e._0x261280,_0x2bc25e._0x4909ba,_0x2bc25e._0x566d2e,_0x2bc25e._0xbe1589)+_0x3d3ec7(_0x2bc25e._0x3d2148,_0x2bc25e._0x23f099,-_0x2bc25e._0xbb8f37,-_0x2bc25e._0x338df7)+'tings',_0x56c373);}async function handleAddPendingInvitation({invitation:_0x10a29d},{db:_0x20f895,writer:_0x4001d1}){const _0x4702ce={_0x258649:0x359,_0x1e036f:0x3a6,_0xbc5a36:0x395,_0x1ee8d9:0x3ba,_0x27cb1f:0x3c3,_0x354391:0x3c8,_0x5f1b8a:0x391,_0x119af7:0x399,_0x55a0f7:0x3e4,_0xa2cc27:0x3da,_0x1aca9f:0x3b8,_0x4b1234:0x3d2},_0x469c52={_0x1c4021:0x52},_0x55ffbd={_0x498c35:0x2f7,_0x4eca6a:0x48};function _0x414bf3(_0x390523,_0x337a25,_0x399abd,_0x4cc32c){return _0x2b46a3(_0x399abd-_0x55ffbd._0x498c35,_0x337a25-0x3,_0x399abd-_0x55ffbd._0x4eca6a,_0x390523);}const _0x2df6a2=await getMemberForDeviceKey(_0x20f895,_0x4001d1['key']);function _0x14c6ab(_0x3061c8,_0x8fbfaf,_0x7753b6,_0x1d0ad4){return _0x2b46a3(_0x8fbfaf-0x2f6,_0x8fbfaf-_0x469c52._0x1c4021,_0x7753b6-0x1da,_0x1d0ad4);}if(!isMemberActive(_0x2df6a2))throw KeetContractError[_0x14c6ab(_0x4702ce._0x258649,0x389,0x3a5,_0x4702ce._0x1e036f)]();await _0x20f895['insert'](_0x414bf3(_0x4702ce._0xbc5a36,_0x4702ce._0x1ee8d9,_0x4702ce._0x27cb1f,_0x4702ce._0x354391)+_0x14c6ab(0x3b6,0x397,_0x4702ce._0x5f1b8a,_0x4702ce._0x119af7)+'ding-invit'+_0x414bf3(_0x4702ce._0x55a0f7,_0x4702ce._0xa2cc27,_0x4702ce._0x1aca9f,_0x4702ce._0x4b1234),_0x10a29d);}function _0x578c(){const _0xc9343c=['ate-id/sta','memberKey','ng-invitat','abi','constructo','isPending','ate-id/ide','st-body','search','ate-id/upd','mailbox','14644EbDUYU','discoveryC','ate-id/run','tacts','ove-room','(((.+)+)+)','toString','@keet/room','isReadOnly','equals','ate-identi','version','exports','all','contactReq','IsSeen','ations','47179eAtviV','-capabilit','ate-id/add','ion','roomKey','find','ate-id/con','@keet/memb','ies','ate-id/roo','@keet-priv','sts-v2','@keet/syst','1rJemKe','ct-request','Key','-contact-r','730751wNPbtM','tings','encryption','eads','sender','add','tact-reque','clock','get','-room','profile','nters','fastForwar','ntity','nvitation','isBlocked','111iNELRd','isAccepted','isFullyMut','ate-id/rem','isActive','-pending-i','timestamp','seed','mailboxKey','636eOzmON','ove-pendin','er-profile','status','ding-invit','attestatio','delete','45574JMpetQ','identity','isSeen','ate-room-s','act-room','241810CMEoMV','ding-conta','length','publicKey','oreKey','ate-contac','ate-id/cou','t-status','contacts','ove-unread','apply','8qKGgWe','988505PvxvaZ','initiator','key','ackWriter','rooms','-v3-migrat','ate-id/unr','ABORT','olve-pendi','equest','sentAt','g-invitati','ate-id/act','45wVpRxa','1633854bvTxDI','isDiscarde','dTo','ate-id/set','em-digest','Pair','IsAccepted','ate-id/pen','insert','OnlyMuted','ove-contac','t-request-'];_0x578c=function(){return _0xc9343c;};return _0x578c();}async function handleRemovePendingInvitation({id:_0x24928b},{db:_0x137a89,writer:_0x4b70a2}){const _0x13d56c={_0x40c28c:0x157,_0x38528e:0x17c,_0x48b3fc:0x170,_0x68b613:0x143,_0xbaa3b7:0x15e,_0x32cd74:0x113,_0x3455ec:0x16e,_0x3779fb:0x259,_0x4117e3:0x262,_0x42b473:0x1fe,_0x328acd:0x229,_0x18be76:0x238},_0x479757={_0x263143:0x15d,_0xa98190:0x100},_0xa38a72={_0x19c0d5:0x201,_0x3ca583:0xd1};function _0x43a585(_0x54abd4,_0x3751d7,_0x18ce6d,_0x2a03e6){return _0x1605cb(_0x54abd4- -_0xa38a72._0x19c0d5,_0x3751d7-0xae,_0x18ce6d-_0xa38a72._0x3ca583,_0x2a03e6);}const _0x269ac3=await getMemberForDeviceKey(_0x137a89,_0x4b70a2[_0x43a585(_0x13d56c._0x40c28c,_0x13d56c._0x38528e,0x15d,_0x13d56c._0x48b3fc)]);if(!isMemberActive(_0x269ac3))throw KeetContractError['ABORT']();function _0x48e608(_0x51931a,_0x2b1674,_0x24bdfa,_0x5047c1){return _0x2b46a3(_0x51931a-_0x479757._0x263143,_0x2b1674-0xc9,_0x24bdfa-_0x479757._0xa98190,_0x24bdfa);}await _0x137a89[_0x43a585(_0x13d56c._0x68b613,_0x13d56c._0xbaa3b7,_0x13d56c._0x32cd74,_0x13d56c._0x3455ec)](_0x48e608(0x229,_0x13d56c._0x3779fb,_0x13d56c._0x4117e3,0x229)+_0x48e608(_0x13d56c._0x42b473,0x208,_0x13d56c._0x328acd,_0x13d56c._0x18be76)+'ding-invit'+'ations',{'id':_0x24928b});}async function handleResolvePendingInvitation({blindResponse:_0x35caaa},{db:_0x59e94b,writer:_0x4b513a,hostcalls:_0x2d8a1a}){const _0xa36367={_0x49f5dc:0x4b,_0x38a6c6:0xaa,_0x432201:0x82,_0x1ad7d1:0x65,_0x8e5655:0x69,_0x356b67:0x4f,_0x1e4925:0x5f,_0x1a0104:0x57,_0x31b443:0x41,_0x4fc327:0x73,_0x59f81f:0x67,_0x2d5245:0x8f,_0x4ef86c:0x3b,_0x219656:0x35,_0x36096e:0x45,_0x32b35d:0x73,_0x523757:0x50,_0x13cacc:0x58,_0x2c0cb6:0x3e,_0x3441a2:0x1b,_0x477141:0x37,_0x4fd176:0x2,_0x3dc221:0x1b,_0x923e6a:0x11,_0x2177f9:0x32,_0x160e8d:0x15,_0x254e8e:0x91,_0x32b0a9:0x9f,_0x356012:0x78,_0x2f42f5:0x8d,_0x16149f:0x65,_0xcd4ef1:0x4e,_0x436c5a:0x48,_0x190292:0xad,_0x30e787:0x49,_0x3084a4:0x80,_0x524b07:0x70,_0x5cd7a4:0xa7,_0xb6aed:0x30,_0x2d4fb4:0x22,_0x508d85:0xd,_0x5c8a49:0x1f,_0x278269:0x43,_0x351dc3:0x55,_0x212555:0x68,_0x48c979:0x77,_0xe9f558:0x55,_0x311f49:0x43,_0x3096ef:0x70,_0x27bfdd:0x88,_0x1df2fe:0x36,_0x436123:0x6f,_0x47f9ca:0x8f,_0x267a30:0x59,_0x24d40f:0x67,_0x41aef1:0x32,_0x2661ac:0x72,_0x4c8bb8:0x82,_0x13e240:0x6e,_0xe86740:0x3f,_0x2cc066:0x70,_0x367717:0x47,_0x485158:0x2c,_0x5201fc:0x2d,_0xefdfd7:0x58,_0x4f8226:0x57,_0x22ca6b:0x1,_0x28a22d:0x28,_0x3e0e6e:0x9,_0x2d9f85:0x66,_0x1980ca:0x1d,_0x2c0068:0x4c,_0x1206fe:0x7c,_0xec57b8:0xb1,_0x7bc029:0x53,_0x4f6f17:0x9d,_0x49dbc3:0x75,_0x411158:0x8f,_0x13ba01:0x90,_0x2c1833:0x83,_0x16ce6b:0x7b,_0x149cde:0x40,_0x2a585f:0x72,_0x543988:0x5b,_0x36094d:0x2e,_0x2d905e:0x31,_0x48be71:0x18,_0xd54c7e:0xa,_0x7bc3c6:0x5e,_0x465b76:0x23,_0xbd9219:0x27,_0x458dc8:0x13,_0x2e3df1:0x16,_0x2c575e:0x29,_0x12bda4:0x24,_0x599f56:0x4d,_0x4efdd3:0x1f,_0x4cb19d:0x64,_0x5c7976:0x60,_0xbcf5f8:0xa0,_0x10a887:0xa1,_0x299700:0x7e,_0x3b4b89:0x52,_0x5c7df3:0x15,_0x35dc76:0x23,_0x515d26:0x45,_0x16311d:0x3,_0x13fbb2:0x9b,_0x5901dc:0x75,_0x1df4a0:0x60,_0x4b18bf:0x6c,_0x35aaf9:0x12,_0x30a4f4:0x31,_0x5b79c5:0x49,_0xeb6dc4:0x85,_0x396af1:0x4b,_0x2c43ff:0x73,_0x4f98e3:0x57,_0x561184:0x50,_0x2a9a00:0x5d,_0xb55b90:0x58,_0x4e98b3:0x10,_0x1f2c09:0x3a,_0x32eeb0:0x45,_0x1f90ca:0xa1,_0xda9817:0x69,_0xedf02d:0x84,_0x15e71d:0x8f,_0x46607d:0xa4,_0x50310c:0x1c,_0xe48ea3:0xa,_0x1af3df:0x81,_0x17f331:0x61,_0x19829f:0x62,_0x5da5f0:0x81,_0x7c390c:0x54,_0x4868bf:0x20,_0x3a1f61:0x56,_0xd509da:0x5e,_0x4f04f1:0x4b,_0xba9c44:0x34,_0x1d6015:0x21,_0xd3fcdd:0xe,_0x299128:0x98,_0x37de87:0x70,_0x2b5884:0x87,_0x2cee5a:0x1d,_0x29b3de:0x42,_0xb380f7:0x1d,_0xff7e0e:0x20,_0x15d02b:0x33,_0x13a3ac:0x9,_0x34ceb0:0x3e,_0x17113c:0x32},_0x3599e8={_0x11cfb8:0x59,_0x48f0f8:0xad,_0x24f525:0x9d},_0xa73e85={_0x427845:0xa7},_0x3e718a=await _0x59e94b[_0x51f949(_0xa36367._0x49f5dc,_0xa36367._0x38a6c6,_0xa36367._0x432201,_0xa36367._0x1ad7d1)](_0x51f949(_0xa36367._0x8e5655,_0xa36367._0x356b67,_0xa36367._0x1e4925,_0xa36367._0x1a0104)+_0x2ac37c(_0xa36367._0x31b443,_0xa36367._0x4fc327,_0xa36367._0x59f81f,_0xa36367._0x2d5245)+_0x51f949(0x48,_0xa36367._0x4ef86c,0x71,0x7a));if(!_0x3e718a)throw KeetContractError['ABORT']();let _0x4b050b=null;try{const _0x536b8d=generateMailboxKeyPair(_0x2d8a1a[_0x51f949(0x50,0x43,_0xa36367._0x219656,_0xa36367._0x36096e)],_0x3e718a[_0x51f949(0x40,0x24,0x19,0xc)]);_0x4b050b=verifyDeviceResponse(_0x536b8d,_0x35caaa);}catch(_0x2efe78){throw KeetContractError[_0x2ac37c(_0xa36367._0x32b35d,_0xa36367._0x523757,0x37,_0xa36367._0x13cacc)]();}if(!_0x4b050b)throw KeetContractError[_0x2ac37c(_0xa36367._0x2c0cb6,_0xa36367._0x3441a2,_0xa36367._0x477141,_0xa36367._0x4fd176)]();function _0x2ac37c(_0x40ec87,_0x2ef9ef,_0x40ec35,_0x2a3796){return _0x1605cb(_0x40ec35- -0x326,_0x2ef9ef-0x170,_0x40ec35-_0xa73e85._0x427845,_0x2a3796);}const {id:_0xc0ee75,response:_0x17f063}=_0x4b050b,{roomKeys:_0x50671b}=_0x17f063;if(!_0x50671b[_0x2ac37c(_0xa36367._0x3dc221,_0xa36367._0x923e6a,_0xa36367._0x2177f9,_0xa36367._0x160e8d)]||!_0x50671b['encryption'+_0x51f949(_0xa36367._0x254e8e,_0xa36367._0x32b0a9,_0xa36367._0x356012,_0xa36367._0x2f42f5)])throw KeetContractError['ABORT']();const [_0x49aa8a,_0x3803c3,_0x2fb4c0,_0x40c9e9]=await Promise[_0x2ac37c(_0xa36367._0x16149f,_0xa36367._0xcd4ef1,0x62,_0xa36367._0x436c5a)]([_0x59e94b[_0x2ac37c(_0xa36367._0x190292,_0xa36367._0x30e787,0x7f,0xab)](_0x2ac37c(_0xa36367._0x3084a4,_0xa36367._0x1e4925,_0xa36367._0x524b07,_0xa36367._0x5cd7a4)+_0x2ac37c(_0xa36367._0xb6aed,_0xa36367._0x2d4fb4,0x45,0x6c)+_0x51f949(0x28,-_0xa36367._0x508d85,_0xa36367._0x5c8a49,_0xa36367._0x278269)+_0x2ac37c(0xa0,_0xa36367._0x351dc3,_0xa36367._0x1ad7d1,_0xa36367._0x212555),{'id':_0xc0ee75}),_0x59e94b[_0x51f949(0x67,_0xa36367._0x48c979,_0xa36367._0x432201,_0xa36367._0xe9f558)](_0x2ac37c(_0xa36367._0x311f49,_0xa36367._0x8e5655,_0xa36367._0x3096ef,_0xa36367._0x27bfdd)+_0x2ac37c(_0xa36367._0x1df2fe,0x7f,_0xa36367._0x436123,_0xa36367._0x47f9ca)+'ms',{'roomKey':_0x50671b[_0x2ac37c(_0xa36367._0x267a30,_0xa36367._0x24d40f,_0xa36367._0x41aef1,0x5b)]}),_0x59e94b[_0x51f949(_0xa36367._0x2661ac,0x4c,_0xa36367._0x4c8bb8,_0xa36367._0x13e240)](_0x2ac37c(_0xa36367._0xe86740,_0xa36367._0x27bfdd,_0xa36367._0x2cc066,_0xa36367._0x367717)+_0x51f949(0x51,_0xa36367._0x485158,_0xa36367._0x5201fc,0x3c)+'nters'),_0x59e94b['get'](_0x2ac37c(_0xa36367._0xefdfd7,0xab,0x72,0x95)+_0x51f949(0x5d,_0xa36367._0x4f8226,_0xa36367._0x36096e,_0xa36367._0x48c979))]);if(!_0x49aa8a)throw KeetContractError[_0x51f949(_0xa36367._0x22ca6b,_0xa36367._0x28a22d,0x3a,_0xa36367._0x3e0e6e)]();const _0x85feb1=_0x2fb4c0?_0x2fb4c0['rooms']+(0x35e+0x90c+-0x161*0x9):0x7f7*0x3+-0x28*-0xa7+-0x31fd,_0x22c61b=_0x3803c3;function _0x51f949(_0x42a967,_0x182456,_0x1011f8,_0x407cfb){return _0x2b46a3(_0x1011f8- -_0x3599e8._0x11cfb8,_0x182456-_0x3599e8._0x48f0f8,_0x1011f8-_0x3599e8._0x24f525,_0x182456);}let _0x3bf501=_0x3803c3;if(!_0x3bf501)_0x3bf501={'clock':_0x85feb1,'roomKey':_0x50671b[_0x2ac37c(0x19,_0xa36367._0x2d9f85,0x32,_0xa36367._0x1980ca)],'encryptionKey':_0x50671b[_0x51f949(_0xa36367._0x436123,_0xa36367._0x2c0068,_0xa36367._0x1206fe,_0xa36367._0xec57b8)+_0x2ac37c(_0xa36367._0x7bc029,_0xa36367._0x4f6f17,_0xa36367._0x49dbc3,0x8b)],'fastForwardTo':_0x50671b[_0x2ac37c(_0xa36367._0x411158,_0xa36367._0x13ba01,_0xa36367._0x2c1833,_0xa36367._0x16ce6b)+_0x2ac37c(0x7b,0x67,_0xa36367._0x149cde,_0xa36367._0x2a585f)],'status':{'isActive':!![],'isReadOnly':![]},'initiator':_0x49aa8a[_0x2ac37c(_0xa36367._0x543988,_0xa36367._0x36094d,_0xa36367._0x2d905e,_0xa36367._0x48be71)],'mailbox':_0x49aa8a['mailbox'],'identitySwapV2':_0x49aa8a[_0x51f949(_0xa36367._0xd54c7e,_0xa36367._0x7bc3c6,_0xa36367._0x465b76,_0xa36367._0x267a30)]};else(!_0x3bf501['status'][_0x2ac37c(_0xa36367._0xbd9219,0x18,_0xa36367._0x458dc8,-_0xa36367._0x2e3df1)]||_0x40c9e9[_0x2ac37c(_0xa36367._0x2c575e,_0xa36367._0x12bda4,_0xa36367._0x599f56,_0xa36367._0x4efdd3)][_0x2ac37c(_0xa36367._0x149cde,_0xa36367._0x4cb19d,_0xa36367._0x5c7976,0x95)]>=0x1*0xc83+0x275+0x17e*-0xa)&&(_0x3bf501[_0x2ac37c(_0xa36367._0xbcf5f8,_0xa36367._0x10a887,_0xa36367._0x299700,_0xa36367._0x3b4b89)]=_0x85feb1,_0x3bf501['status'][_0x2ac37c(_0xa36367._0x5c7df3,_0xa36367._0x35dc76,0x13,0x49)]=!![],_0x3bf501[_0x51f949(_0xa36367._0x515d26,_0xa36367._0x16311d,0x1e,_0xa36367._0x4f8226)][_0x51f949(_0xa36367._0x13fbb2,_0xa36367._0x5901dc,_0xa36367._0x1df4a0,_0xa36367._0x4b18bf)]=![]);await _0x59e94b[_0x51f949(_0xa36367._0x35aaf9,_0xa36367._0x30a4f4,_0xa36367._0x5b79c5,_0xa36367._0xeb6dc4)](_0x51f949(_0xa36367._0x38a6c6,_0xa36367._0x396af1,_0xa36367._0x2c43ff,_0xa36367._0x4f98e3)+_0x51f949(_0xa36367._0x8e5655,_0xa36367._0x411158,0x72,_0xa36367._0x31b443)+'ms',_0x3bf501),await profileRoomStats(_0x59e94b,_0x3bf501,_0x22c61b);if(_0x40c9e9[_0x2ac37c(0x47,_0xa36367._0x1980ca,0x4d,_0xa36367._0x561184)]['version']<-0x1f*-0x125+-0x1377+0x3*-0x553)await _0x59e94b['delete'](_0x2ac37c(_0xa36367._0x2a9a00,_0xa36367._0xb55b90,_0xa36367._0x3096ef,_0xa36367._0xe9f558)+_0x2ac37c(_0xa36367._0x4e98b3,_0xa36367._0x1f2c09,_0xa36367._0x32eeb0,_0xa36367._0x2c43ff)+_0x51f949(_0xa36367._0x2c0068,0x45,_0xa36367._0x5c8a49,_0xa36367._0x36094d)+_0x51f949(_0xa36367._0x1f90ca,0x70,_0xa36367._0x212555,_0xa36367._0xda9817),{'id':_0xc0ee75});else for await(const _0x533018 of _0x59e94b['find'](_0x2ac37c(_0xa36367._0xedf02d,_0xa36367._0x15e71d,_0xa36367._0x524b07,_0xa36367._0x46607d)+'ate-id/pen'+_0x2ac37c(-_0xa36367._0xd54c7e,_0xa36367._0x356b67,_0xa36367._0x50310c,_0xa36367._0xe48ea3)+'ations')){if(!b4a[_0x51f949(_0xa36367._0x1af3df,_0xa36367._0x3b4b89,_0xa36367._0x17f331,0x70)](_0x533018[_0x2ac37c(_0xa36367._0x19829f,_0xa36367._0x5da5f0,_0xa36367._0x7c390c,_0xa36367._0x4868bf)],_0x3bf501[_0x51f949(_0xa36367._0x3a1f61,_0xa36367._0xd509da,_0xa36367._0x4f98e3,_0xa36367._0x4f04f1)]))continue;await _0x59e94b[_0x51f949(_0xa36367._0xba9c44,_0xa36367._0x48be71,_0xa36367._0x1d6015,_0xa36367._0xd3fcdd)](_0x2ac37c(_0xa36367._0x299128,_0xa36367._0x2f42f5,_0xa36367._0x37de87,_0xa36367._0x2b5884)+_0x51f949(0x5d,_0xa36367._0x2cee5a,_0xa36367._0x436c5a,_0xa36367._0x29b3de)+_0x2ac37c(_0xa36367._0xb380f7,_0xa36367._0xff7e0e,_0xa36367._0x50310c,0x4e)+'ations',_0x533018);}await _0x2d8a1a[_0x2ac37c(_0xa36367._0x267a30,_0xa36367._0xbd9219,_0xa36367._0x15d02b,_0xa36367._0x13a3ac)](_0x4b513a[_0x2ac37c(_0xa36367._0x34ceb0,0x19,_0xa36367._0x17113c,0x46)]);}async function handleAddRoom({header:_0x1042ab,..._0x24c5bb},{db:_0x39dee5,writer:_0x4830c8}){const _0x1dccc2={_0x233ecd:0xb4,_0x80ee32:0xa2,_0x312558:0x98,_0x75443a:0x94,_0x49ca76:0x5b,_0x16cea8:0x31,_0x2a59f6:0x2e,_0x1bb431:0x63,_0xfb3195:0x1d,_0x4f6b2f:0x28,_0x169f9d:0x56,_0x3729af:0xf,_0x25ba89:0x24,_0xc10e61:0x47,_0x2d021b:0x23,_0x10a5a0:0x2,_0x38021d:0x3b,_0x492639:0xb5,_0x11b279:0x85,_0x4a00cd:0x9d,_0x522776:0x96,_0x11d4c2:0x31,_0x4f1d3b:0xdf,_0x546af2:0xba,_0x4e1fa2:0xf6,_0x1205af:0x94,_0x222ca1:0xe,_0xb2d9db:0x2,_0x34dcd1:0x17,_0x1946a1:0x1d,_0x35c637:0x3e,_0x3b5cb9:0x45,_0x46997c:0xda,_0x310bfe:0xa3,_0x5c920c:0xa4,_0x19e1b9:0x4b,_0x381290:0x1f,_0x38a7e7:0x87,_0x2b9124:0x7a,_0x498374:0x2a,_0x574f05:0x76,_0x114cf8:0x6c,_0x595000:0x8b,_0x2cc8e2:0xb7,_0x2341c4:0xf3,_0x4ab4a4:0xe7,_0x1d6fe5:0x91,_0x581919:0x53,_0x3c101f:0xe5,_0x35095e:0xd0,_0x4eaf70:0xdb,_0x8a1408:0xfb,_0x31fcdc:0x72,_0x49e3a8:0x95,_0x31357b:0x4e,_0x1c38d8:0xc9,_0x4b1ae0:0xa7,_0x3467e3:0xc2,_0x3e595d:0xd2,_0x17a1cd:0xbe,_0x9bf6d5:0xae,_0x543ff3:0x95,_0x4fd281:0x64,_0x43a774:0x94,_0x5cf6d3:0x8c,_0x55c2d7:0x1e,_0xe1c3dc:0x59,_0x19839d:0x26},_0x4b4ca9={_0x5045c0:0x42a,_0x4b68d3:0x50,_0x3a3f94:0xf},_0x5b7903={_0x38eea6:0x164},[_0x105843,_0x1fa563,_0x3212d8,_0x2795b7,_0x165ffe]=await Promise[_0x1c8041(-_0x1dccc2._0x233ecd,-_0x1dccc2._0x80ee32,-_0x1dccc2._0x312558,-_0x1dccc2._0x75443a)]([getMemberForDeviceKey(_0x39dee5,_0x4830c8[_0x4e3f96(-_0x1dccc2._0x49ca76,-_0x1dccc2._0x16cea8,-_0x1dccc2._0x2a59f6,-_0x1dccc2._0x1bb431)]),_0x39dee5['get'](_0x4e3f96(-_0x1dccc2._0xfb3195,-_0x1dccc2._0x4f6b2f,-_0x1dccc2._0x169f9d,_0x1dccc2._0x3729af)+_0x4e3f96(-0x1e,-_0x1dccc2._0x25ba89,0x17,-_0x1dccc2._0xc10e61)+'ms',{'roomKey':_0x24c5bb[_0x4e3f96(-_0x1dccc2._0x2d021b,_0x1dccc2._0x10a5a0,-_0x1dccc2._0x38021d,-0x5b)]}),_0x39dee5[_0x1c8041(-_0x1dccc2._0x492639,-_0x1dccc2._0x11b279,-_0x1dccc2._0x4a00cd,-_0x1dccc2._0x522776)](_0x4e3f96(-0x1d,-0xc,-0x2f,-_0x1dccc2._0x11d4c2)+_0x1c8041(-_0x1dccc2._0x4f1d3b,-_0x1dccc2._0x546af2,-_0x1dccc2._0x4e1fa2,-_0x1dccc2._0x1205af)+'ts'),_0x39dee5[_0x4e3f96(-_0x1dccc2._0x222ca1,_0x1dccc2._0xb2d9db,-0x45,_0x1dccc2._0x34dcd1)](_0x4e3f96(-_0x1dccc2._0x1946a1,-_0x1dccc2._0x35c637,-0x33,-_0x1dccc2._0x3b5cb9)+_0x1c8041(-0xc7,-_0x1dccc2._0x46997c,-0xac,-_0x1dccc2._0x310bfe)+'nters'),_0x39dee5[_0x1c8041(-_0x1dccc2._0x5c920c,-_0x1dccc2._0x11b279,-0xbc,-0x52)]('@keet/syst'+_0x4e3f96(-_0x1dccc2._0x19e1b9,-_0x1dccc2._0x381290,-_0x1dccc2._0x38a7e7,-_0x1dccc2._0x2b9124))]);function _0x4e3f96(_0x2a136a,_0x404f45,_0x4ae142,_0x54949e){return _0x2b46a3(_0x2a136a- -0xe9,_0x404f45-_0x5b7903._0x38eea6,_0x4ae142-0x32,_0x404f45);}if(!_0x165ffe||!isMemberActive(_0x105843))throw KeetContractError[_0x4e3f96(-_0x1dccc2._0x169f9d,-_0x1dccc2._0x498374,-_0x1dccc2._0x574f05,-_0x1dccc2._0x114cf8)]();const _0x35dffd=_0x1fa563;let _0x28a418=-0x253+0x4ec+-0x299;function _0x1c8041(_0x7c9937,_0x37b432,_0x1e358d,_0x345677){return _0x1605cb(_0x37b432- -_0x4b4ca9._0x5045c0,_0x37b432-_0x4b4ca9._0x4b68d3,_0x1e358d-_0x4b4ca9._0x3a3f94,_0x7c9937);}if(_0x165ffe[_0x1c8041(-_0x1dccc2._0x595000,-_0x1dccc2._0x2cc8e2,-_0x1dccc2._0x2341c4,-_0x1dccc2._0x4ab4a4)]['version']<-0x1f83+0x150d+-0x15*-0x80){if(_0x1fa563)_0x28a418=_0x1fa563[_0x1c8041(-_0x1dccc2._0x1d6fe5,-0x86,-_0x1dccc2._0x581919,-_0x1dccc2._0x19e1b9)];else _0x3212d8&&(_0x28a418=_0x3212d8['rooms']+(0x88c+0x29b+-0xb26));}else _0x2795b7&&(_0x28a418=_0x2795b7[_0x1c8041(-_0x1dccc2._0x3c101f,-_0x1dccc2._0x35095e,-_0x1dccc2._0x4eaf70,-_0x1dccc2._0x8a1408)]+(-0x2e8+0x20c9+-0x1de0));let _0x46086b=_0x1fa563?.[_0x4e3f96(-_0x1dccc2._0x31fcdc,-_0x1dccc2._0x49e3a8,-_0x1dccc2._0x31357b,-_0x1dccc2._0x595000)][_0x1c8041(-_0x1dccc2._0x1c38d8,-_0x1dccc2._0x4b1ae0,-_0x1dccc2._0x3467e3,-_0x1dccc2._0x3e595d)];!_0x46086b&&_0x24c5bb['isReadOnly']&&(_0x46086b=!![]);const _0x4bb011={..._0x24c5bb,'clock':_0x28a418,'status':{'isActive':!![],'isReadOnly':_0x46086b},'contact':_0x24c5bb['dm']};await _0x39dee5[_0x1c8041(-0xaa,-_0x1dccc2._0x17a1cd,-_0x1dccc2._0x9bf6d5,-_0x1dccc2._0x543ff3)](_0x1c8041(-_0x1dccc2._0x4fd281,-_0x1dccc2._0x43a774,-_0x1dccc2._0x5cf6d3,-0xc8)+_0x4e3f96(-_0x1dccc2._0x55c2d7,-_0x1dccc2._0xe1c3dc,0x3,-_0x1dccc2._0x19839d)+'ms',_0x4bb011),await profileRoomStats(_0x39dee5,_0x4bb011,_0x35dffd);}async function handleRemoveRoom({roomKey:_0x100580},{db:_0x44b9ac,writer:_0x52f7ad}){const _0x3842c1={_0x29f01c:0x4e8,_0x2f8bdc:0x4fb,_0x1b2099:0x502,_0x206b45:0x510,_0x322c22:0x4a7,_0x40944f:0x49a,_0x29539b:0x4ae},_0x57553b={_0x36a798:0x16a,_0x5758e7:0x1d2,_0x549c0f:0x9e},_0x54e558={_0x2ef878:0x46d,_0x5b7b17:0xf0};function _0x532dab(_0x294b7c,_0x546fcf,_0x487af2,_0x4e991d){return _0x2b46a3(_0x546fcf-_0x54e558._0x2ef878,_0x546fcf-_0x54e558._0x5b7b17,_0x487af2-0x61,_0x294b7c);}const _0x529026=await getMemberForDeviceKey(_0x44b9ac,_0x52f7ad[_0x532dab(_0x3842c1._0x29f01c,_0x3842c1._0x2f8bdc,_0x3842c1._0x1b2099,_0x3842c1._0x206b45)]);if(!isMemberActive(_0x529026))return;function _0x1a58d4(_0x501687,_0x528dea,_0x2a7766,_0x19ca91){return _0x1605cb(_0x19ca91-_0x57553b._0x36a798,_0x528dea-_0x57553b._0x5758e7,_0x2a7766-_0x57553b._0x549c0f,_0x501687);}return _0x44b9ac[_0x1a58d4(_0x3842c1._0x322c22,0x485,_0x3842c1._0x40944f,_0x3842c1._0x29539b)]('@keet-priv'+_0x532dab(0x508,0x538,0x522,0x54f)+'ms',{'roomKey':_0x100580});}async function handleUpdateRoomStatus({header:_0x2eaa41,roomKey:_0x5c32d3,key:_0xd59103,status:_0x51a96e},{db:_0x5d3437,writer:_0x59e94f}){const _0x116bb6={_0x232a21:0x1fd,_0x2b3225:0x21b,_0x439c49:0x202,_0x90ddb3:0x446,_0x35b53c:0x426,_0x5a3709:0x44e,_0x2bfd47:0x3ee,_0x2eff4d:0x21a,_0x433be8:0x252,_0x410735:0x1f4,_0x2c1e01:0x200,_0x2ef326:0x20b,_0x1a5553:0x1eb,_0x4f7b37:0x1d9,_0x11fc7e:0x1f9,_0x344d61:0x473,_0x49ff03:0x44f,_0x1197cd:0x437,_0x5792b3:0x1c5,_0xd00d3:0x198,_0x5ee1f8:0x1f7,_0x613183:0x4a4,_0x3bcba5:0x4a3,_0x30a51c:0x446,_0x347435:0x43b,_0x445157:0x443,_0x1a059f:0x44d,_0x41ff83:0x46c,_0x1b8be7:0x466,_0x4f9266:0x1d2,_0x15516b:0x1ab,_0x8cb283:0x1a9,_0x38e66f:0x1b6,_0x1a8619:0x1e2,_0x1d1603:0x451,_0x4dfc28:0x472,_0x5007e8:0x41e,_0xeba25:0x3ec,_0x277df1:0x439,_0x3a56fa:0x3f9,_0x158e49:0x407,_0x290820:0x3e7,_0x4f3fde:0x470,_0x6ac278:0x411,_0x6fcccd:0x40e,_0x4c6dea:0x21c,_0x12ecbc:0x1f8,_0x278a53:0x206,_0x3c4ce7:0x1d7,_0x4cd9d9:0x1de,_0x406077:0x20f,_0x316057:0x1e3,_0x1e553c:0x414,_0x2bf493:0x43e,_0x4129b6:0x461,_0x1f3c7b:0x459,_0x1d5405:0x45b,_0x2c0224:0x1f9,_0x1beff2:0x229,_0x4893b4:0x1c4,_0x39f1d2:0x1ef,_0x1a5332:0x1d5,_0x39c4bd:0x403,_0x262ff7:0x412,_0x515cc5:0x3eb,_0x1ce50c:0x429,_0x5c727d:0x464,_0x5ee6e2:0x466,_0x53f7e2:0x457,_0xda7e4b:0x467,_0x2381ba:0x1b7,_0x21591b:0x1a0,_0x2b0bac:0x485,_0x54ddb0:0x459,_0x5064fc:0x470,_0x3160d8:0x455,_0x406361:0x450,_0xec2529:0x43a,_0xf81238:0x40f,_0x44b9b7:0x20b,_0x23e854:0x21f,_0x3efed1:0x22f,_0x12c9aa:0x20a,_0xe4c32e:0x1d2,_0x4692b5:0x23d},_0x138e96={_0x1f6510:0x13f,_0x16184a:0x48,_0x1a6292:0x113},_0x2a4110={_0xe9f80b:0x1db,_0x20b1e8:0xb0},[_0x18a30c,_0x48363e,_0x2c0feb,_0x3627a9]=await Promise[_0x30790d(_0x116bb6._0x232a21,_0x116bb6._0x2b3225,0x200,_0x116bb6._0x439c49)]([getMemberForDeviceKey(_0x5d3437,_0x59e94f[_0x31e0a7(_0x116bb6._0x90ddb3,_0x116bb6._0x35b53c,_0x116bb6._0x5a3709,_0x116bb6._0x2bfd47)]),_0x5d3437[_0x30790d(_0x116bb6._0x2eff4d,_0x116bb6._0x433be8,_0x116bb6._0x410735,_0x116bb6._0x2c1e01)](_0x30790d(_0x116bb6._0x2ef326,0x1d0,_0x116bb6._0x1a5553,0x21d)+_0x30790d(0x20a,0x229,_0x116bb6._0x4f7b37,_0x116bb6._0x11fc7e)+'ms',{'roomKey':_0x5c32d3}),_0x5d3437[_0x31e0a7(0x486,_0x116bb6._0x344d61,_0x116bb6._0x49ff03,_0x116bb6._0x1197cd)]('@keet-priv'+_0x30790d(_0x116bb6._0x5792b3,_0x116bb6._0xd00d3,_0x116bb6._0x5ee1f8,0x1c7)+_0x31e0a7(_0x116bb6._0x613183,0x476,_0x116bb6._0x3bcba5,_0x116bb6._0x30a51c)),_0x5d3437[_0x31e0a7(_0x116bb6._0x347435,0x473,_0x116bb6._0x445157,_0x116bb6._0x1a059f)](_0x31e0a7(_0x116bb6._0x41ff83,_0x116bb6._0x1b8be7,0x467,0x486)+'em-digest')]);if(!isMemberActive(_0x18a30c)||!_0x48363e)throw KeetContractError['ABORT']();if(!isValidRoomStatusKey(_0xd59103))throw KeetContractError[_0x30790d(_0x116bb6._0x4f9266,_0x116bb6._0x15516b,0x196,_0x116bb6._0x8cb283)]();const _0x1a28de=_0x48363e,_0x302c7a=getRoomStatusKeyName(_0xd59103),_0x4d7500=_0x2c0feb[_0x30790d(0x1cf,0x1b5,0x1f2,0x1ec)]+(0x5dd*0x2+0xb4b+-0x1704);function _0x31e0a7(_0x3eefcd,_0x3b2321,_0x122e87,_0x5646aa){return _0x1605cb(_0x3b2321-0xce,_0x3b2321-_0x2a4110._0xe9f80b,_0x122e87-_0x2a4110._0x20b1e8,_0x5646aa);}function _0x30790d(_0x7a4e75,_0x5e1203,_0x1c1855,_0x1d8833){return _0x2b46a3(_0x7a4e75-_0x138e96._0x1f6510,_0x5e1203-_0x138e96._0x16184a,_0x1c1855-_0x138e96._0x1a6292,_0x1c1855);}_0x48363e['status']={..._0x48363e[_0x30790d(_0x116bb6._0x38e66f,_0x116bb6._0x1a8619,0x1df,0x1eb)],[_0x302c7a]:_0x51a96e[_0x302c7a]},_0x48363e[_0x31e0a7(_0x116bb6._0x347435,0x472,_0x116bb6._0x1d1603,_0x116bb6._0x4dfc28)]=_0x4d7500;if(!_0x48363e[_0x31e0a7(_0x116bb6._0x5007e8,0x40f,_0x116bb6._0xeba25,_0x116bb6._0x277df1)][_0x31e0a7(_0x116bb6._0x3a56fa,_0x116bb6._0x158e49,_0x116bb6._0x290820,0x3fb)]&&_0x3627a9[_0x31e0a7(_0x116bb6._0x4f3fde,0x441,_0x116bb6._0x6ac278,_0x116bb6._0x6fcccd)][_0x30790d(0x1fb,_0x116bb6._0x4c6dea,_0x116bb6._0x12ecbc,0x1db)]>=0x8cb*-0x2+0x2003+-0x199*0x9)for await(const _0x39e48a of _0x5d3437[_0x30790d(_0x116bb6._0x278a53,_0x116bb6._0x3c4ce7,0x1df,_0x116bb6._0x4cd9d9)](_0x30790d(_0x116bb6._0x2ef326,_0x116bb6._0x406077,0x234,_0x116bb6._0x316057)+_0x31e0a7(_0x116bb6._0x1e553c,_0x116bb6._0x277df1,0x45a,_0x116bb6._0x2bf493)+'ding-invit'+_0x31e0a7(_0x116bb6._0x4129b6,_0x116bb6._0x1f3c7b,_0x116bb6._0x1d5405,_0x116bb6._0x1f3c7b))){if(!b4a[_0x30790d(0x1f9,0x1bd,0x21f,_0x116bb6._0x2c0224)](_0x39e48a[_0x30790d(0x1ef,_0x116bb6._0x1beff2,0x1bf,_0x116bb6._0x4893b4)],_0x48363e[_0x30790d(_0x116bb6._0x39f1d2,0x1c0,0x1b5,_0x116bb6._0x1a5332)]))continue;await _0x5d3437[_0x31e0a7(_0x116bb6._0x39c4bd,_0x116bb6._0x262ff7,_0x116bb6._0x515cc5,0x3f4)](_0x31e0a7(_0x116bb6._0x1ce50c,_0x116bb6._0x5c727d,_0x116bb6._0x5ee6e2,0x471)+_0x31e0a7(0x420,_0x116bb6._0x277df1,_0x116bb6._0x53f7e2,_0x116bb6._0xda7e4b)+_0x30790d(_0x116bb6._0x2381ba,_0x116bb6._0xd00d3,_0x116bb6._0x21591b,0x1b7)+_0x31e0a7(_0x116bb6._0x2b0bac,_0x116bb6._0x54ddb0,_0x116bb6._0x5064fc,_0x116bb6._0x3160d8),_0x39e48a);}await _0x5d3437[_0x31e0a7(_0x116bb6._0x406361,_0x116bb6._0xec2529,0x40a,_0x116bb6._0xf81238)](_0x30790d(_0x116bb6._0x44b9b7,_0x116bb6._0x12ecbc,_0x116bb6._0x23e854,_0x116bb6._0x3efed1)+_0x30790d(_0x116bb6._0x12c9aa,0x1d3,_0x116bb6._0xe4c32e,_0x116bb6._0x4692b5)+'ms',_0x48363e),await profileRoomStats(_0x5d3437,_0x48363e,_0x1a28de);}async function handleAddContact({contact:{memberKey:_0x23a9a2,mailbox:_0x10f791,roomKey:_0x55ef00,status:_0x491393}},{db:_0x5a5267,writer:_0x75fa89}){const _0x5560e2={_0x42487c:0x25b,_0x3a29b2:0x236,_0x55d5b1:0x218,_0x5c4fef:0x1df,_0x16adb3:0x21a,_0x59f67a:0x253,_0x13101b:0x3ff,_0xcd7ca5:0x3c4,_0x319fa7:0x3dd,_0x489c83:0x3f7,_0x59db2c:0x3f9,_0x2ec409:0x3bb,_0x4456e9:0x25a,_0x1e486b:0x23b,_0x9a8914:0x21b,_0x312851:0x22c,_0x539a2b:0x3fa,_0x2ae77b:0x3ea,_0x4a879b:0x3d3,_0x37cf32:0x280,_0x2c7297:0x24c,_0x358d23:0x28a,_0x121b55:0x256,_0x12044b:0x3b2,_0x444511:0x392,_0x330f0a:0x365,_0x404007:0x35d,_0x28b931:0x380,_0x49e265:0x368,_0x4a1ebe:0x25e,_0x53d764:0x241,_0x28ff2e:0x228,_0x217cb1:0x23c,_0x20e853:0x255,_0x56f403:0x27a,_0x59c3fa:0x252,_0x5a9de1:0x22a,_0x54e1c7:0x1e9,_0x5c1cf6:0x247,_0x573374:0x3c6,_0x53bb3f:0x3d7,_0x36b286:0x3cf,_0x2e9634:0x3c0,_0x109004:0x263},_0x77e9ae={_0x4d3b38:0x2f8,_0x1eb7bf:0x72},_0x2ea1fe={_0x553f04:0x178,_0x38fcec:0x70,_0x1d0a4f:0xa1},[_0x2c9163,_0x4ea26b,_0x580106]=await Promise[_0x575f5c(0x216,_0x5560e2._0x42487c,0x212,_0x5560e2._0x3a29b2)]([getMemberForDeviceKey(_0x5a5267,_0x75fa89[_0x575f5c(0x23d,_0x5560e2._0x55d5b1,_0x5560e2._0x5c4fef,0x206)]),_0x5a5267[_0x575f5c(0x224,_0x5560e2._0x16adb3,0x268,_0x5560e2._0x59f67a)](_0x5ef3e9(0x3e7,_0x5560e2._0x13101b,_0x5560e2._0xcd7ca5,_0x5560e2._0x319fa7)+_0x5ef3e9(_0x5560e2._0x489c83,_0x5560e2._0x59db2c,0x3c0,_0x5560e2._0x2ec409)+_0x575f5c(_0x5560e2._0x4456e9,_0x5560e2._0x1e486b,_0x5560e2._0x9a8914,_0x5560e2._0x312851),{'memberKey':_0x23a9a2}),_0x5a5267[_0x5ef3e9(_0x5560e2._0x539a2b,_0x5560e2._0x2ae77b,_0x5560e2._0x4a879b,0x3f5)]('@keet-priv'+'ate-id/cou'+_0x575f5c(_0x5560e2._0x37cf32,_0x5560e2._0x2c7297,_0x5560e2._0x358d23,_0x5560e2._0x121b55))]);if(!isMemberActive(_0x2c9163))throw KeetContractError[_0x5ef3e9(_0x5560e2._0x12044b,_0x5560e2._0x444511,0x38b,_0x5560e2._0x330f0a)]();const _0x33dcea=_0x4ea26b;function _0x575f5c(_0x516128,_0x53d868,_0x54ce9e,_0x179571){return _0x2b46a3(_0x179571-_0x2ea1fe._0x553f04,_0x53d868-_0x2ea1fe._0x38fcec,_0x54ce9e-_0x2ea1fe._0x1d0a4f,_0x54ce9e);}const _0x1a13dd=_0x580106?_0x580106[_0x5ef3e9(_0x5560e2._0x404007,0x397,_0x5560e2._0x28b931,_0x5560e2._0x49e265)]+(0x235*0xb+0xd64+-0x25aa):0x178c+-0x8dd*0x1+-0x219*0x7;function _0x5ef3e9(_0x401ed1,_0x16005c,_0x518632,_0x84fe0e){return _0x2b46a3(_0x518632-_0x77e9ae._0x4d3b38,_0x16005c-_0x77e9ae._0x1eb7bf,_0x518632-0xa7,_0x16005c);}let _0x25f5d0=_0x4ea26b;_0x25f5d0?(_0x25f5d0[_0x575f5c(_0x5560e2._0x4a1ebe,0x201,_0x5560e2._0x53d764,_0x5560e2._0x28ff2e)]=_0x10f791,_0x25f5d0['status']=_0x491393,_0x25f5d0[_0x575f5c(_0x5560e2._0x217cb1,_0x5560e2._0x20e853,_0x5560e2._0x56f403,_0x5560e2._0x59c3fa)]=_0x1a13dd):_0x25f5d0={'memberKey':_0x23a9a2,'mailbox':_0x10f791,'status':_0x491393,'clock':_0x1a13dd},await _0x5a5267[_0x575f5c(_0x5560e2._0x5a9de1,_0x5560e2._0x54e1c7,_0x5560e2._0x5c1cf6,0x21a)](_0x5ef3e9(0x3c1,_0x5560e2._0x573374,0x3c4,0x3ca)+_0x5ef3e9(_0x5560e2._0x53bb3f,_0x5560e2._0x36b286,_0x5560e2._0x2e9634,0x3d8)+_0x575f5c(_0x5560e2._0x109004,0x200,0x227,0x22c),_0x25f5d0),await profileContactStats(_0x5a5267,_0x25f5d0,_0x33dcea);}async function handleUpdateContactStatus({memberKey:_0x43ca53,key:_0x3ed970,status:_0x51b453},{db:_0x420d42,writer:_0x41ba27}){const _0x3d7e5b={_0x292d06:0x25e,_0x52d701:0x248,_0x1a8592:0x282,_0x1e7b27:0x275,_0x5cbdf3:0x2c0,_0x23be98:0x2d8,_0x23d7fe:0x29f,_0x2116f7:0x255,_0x234a7e:0x26c,_0x117fe6:0x290,_0x37a24c:0x2b2,_0x321f9c:0x347,_0x3451d1:0x33a,_0x13bec9:0x364,_0x2809a5:0x325,_0x26db67:0x333,_0x141e2a:0x350,_0x4c8fe9:0x34b,_0x509c96:0x311,_0x5f4599:0x382,_0x57f12b:0x305,_0x318589:0x2d4,_0x1dc605:0x300,_0x5f356c:0x312,_0x136088:0x31c,_0x214676:0x2d9,_0xe2dd5:0x23b,_0x3e8ce4:0x25f,_0x10dfbe:0x265,_0x2ca00d:0x227,_0x568d17:0x23e,_0x405251:0x359,_0x85f791:0x323,_0x35bf0c:0x32c,_0x2a2803:0x34e,_0x31828c:0x307,_0x43ab79:0x332,_0x3731bc:0x27d,_0x42069d:0x2a5,_0x238dd2:0x26f,_0x1117b2:0x2aa,_0x1e485d:0x28c,_0x12b406:0x2b6,_0x4b5714:0x2fb,_0x36a35a:0x32b},_0x1a0fd6={_0x21c4cb:0x27f,_0x349bb3:0xe4},_0x190a93={_0x489cd4:0x14d,_0x5ae170:0x1b3},[_0x17780c,_0x1a6463,_0x3f248d]=await Promise[_0x168146(_0x3d7e5b._0x292d06,_0x3d7e5b._0x52d701,_0x3d7e5b._0x1a8592,_0x3d7e5b._0x1e7b27)]([getMemberForDeviceKey(_0x420d42,_0x41ba27['key']),_0x420d42[_0x168146(_0x3d7e5b._0x5cbdf3,_0x3d7e5b._0x23be98,_0x3d7e5b._0x23d7fe,0x296)](_0x168146(_0x3d7e5b._0x2116f7,_0x3d7e5b._0x234a7e,_0x3d7e5b._0x117fe6,_0x3d7e5b._0x37a24c)+_0x250723(_0x3d7e5b._0x321f9c,_0x3d7e5b._0x3451d1,_0x3d7e5b._0x13bec9,_0x3d7e5b._0x2809a5)+_0x250723(_0x3d7e5b._0x26db67,_0x3d7e5b._0x141e2a,0x34b,0x367),{'memberKey':_0x43ca53}),_0x420d42['get'](_0x250723(_0x3d7e5b._0x4c8fe9,_0x3d7e5b._0x509c96,_0x3d7e5b._0x5f4599,0x312)+_0x250723(_0x3d7e5b._0x57f12b,0x2c9,_0x3d7e5b._0x318589,_0x3d7e5b._0x1dc605)+'nters')]);if(!isMemberActive(_0x17780c)||!_0x1a6463)throw KeetContractError[_0x168146(0x251,0x21b,0x257,0x24d)]();function _0x168146(_0xa2a8eb,_0xf202a,_0x38d930,_0x4a23b5){return _0x2b46a3(_0x38d930-0x1c4,_0xf202a-_0x190a93._0x489cd4,_0x38d930-_0x190a93._0x5ae170,_0xa2a8eb);}if(!isValidContactStatusKey(_0x3ed970))throw KeetContractError[_0x250723(_0x3d7e5b._0x5f356c,_0x3d7e5b._0x136088,_0x3d7e5b._0x214676,0x2f3)]();function _0x250723(_0x213a9d,_0x2bd31e,_0x407e33,_0x1020b7){return _0x2b46a3(_0x213a9d-_0x1a0fd6._0x21c4cb,_0x2bd31e-_0x1a0fd6._0x349bb3,_0x407e33-0x12e,_0x2bd31e);}const _0x24fc76=_0x1a6463,_0x41a0eb=getContactStatusKeyName(_0x3ed970);_0x1a6463[_0x168146(0x257,0x22a,_0x3d7e5b._0xe2dd5,_0x3d7e5b._0x3e8ce4)]={..._0x1a6463[_0x168146(_0x3d7e5b._0x10dfbe,_0x3d7e5b._0x2ca00d,0x23b,_0x3d7e5b._0x568d17)],[_0x41a0eb]:_0x51b453[_0x41a0eb]},_0x1a6463[_0x250723(_0x3d7e5b._0x405251,_0x3d7e5b._0x85f791,_0x3d7e5b._0x35bf0c,_0x3d7e5b._0x2a2803)]=_0x3f248d?_0x3f248d[_0x250723(_0x3d7e5b._0x31828c,0x2d0,0x2d4,_0x3d7e5b._0x43ab79)]+(0xa9+0x3*-0x496+0xd1a):0x150*0x1a+0x1*0x1a15+0x3c35*-0x1,await _0x420d42['insert'](_0x168146(0x265,_0x3d7e5b._0x3731bc,_0x3d7e5b._0x117fe6,_0x3d7e5b._0x42069d)+_0x168146(_0x3d7e5b._0x238dd2,_0x3d7e5b._0x1117b2,_0x3d7e5b._0x1e485d,_0x3d7e5b._0x12b406)+_0x250723(_0x3d7e5b._0x26db67,_0x3d7e5b._0x4b5714,0x325,_0x3d7e5b._0x36a35a),_0x1a6463),await profileContactStats(_0x420d42,_0x1a6463,_0x24fc76);}async function handleRemoveContact({memberKey:_0x50940b},{db:_0x4f0193,writer:_0x3996e9}){const _0x5dc1f3={_0x4ef610:0x4c6,_0x2cfdfb:0x4f9,_0x4095b6:0x4f7,_0x1af6b2:0x58c,_0x25192f:0x5c3,_0x344e6a:0x590,_0x25fea8:0x599,_0x23dcf3:0x504,_0x34cf43:0x4ed,_0x86bcbc:0x500,_0x4f908a:0x4f3,_0x3872a2:0x4ec,_0x2d8aa3:0x51e,_0xbae5d7:0x511,_0x266028:0x524,_0x4b88e0:0x536,_0x174abb:0x505,_0x57da94:0x504,_0x121ee1:0x4de,_0x27d715:0x500,_0x161120:0x4d9,_0x1b0726:0x4e7,_0xfc23de:0x53a},_0x54fc6a={_0x446ad3:0x438,_0x27cf5d:0x59,_0x977664:0x196},_0x35ab69={_0x2858ba:0x1e7,_0x57a166:0x81,_0x352576:0xa3};function _0x463dd0(_0x7ddb3e,_0x3dbfca,_0x257ecd,_0x283c63){return _0x1605cb(_0x7ddb3e-_0x35ab69._0x2858ba,_0x3dbfca-_0x35ab69._0x57a166,_0x257ecd-_0x35ab69._0x352576,_0x3dbfca);}const [_0x210508,_0x3475d2]=await Promise['all']([getMemberForDeviceKey(_0x4f0193,_0x3996e9[_0x438128(_0x5dc1f3._0x4ef610,_0x5dc1f3._0x2cfdfb,0x4b3,_0x5dc1f3._0x4095b6)]),_0x4f0193[_0x463dd0(_0x5dc1f3._0x1af6b2,_0x5dc1f3._0x25192f,_0x5dc1f3._0x344e6a,_0x5dc1f3._0x25fea8)](_0x438128(_0x5dc1f3._0x23dcf3,_0x5dc1f3._0x34cf43,0x4ed,0x4ec)+_0x438128(_0x5dc1f3._0x86bcbc,0x525,_0x5dc1f3._0x4f908a,0x4fc)+_0x438128(_0x5dc1f3._0x3872a2,_0x5dc1f3._0x2d8aa3,_0x5dc1f3._0xbae5d7,_0x5dc1f3._0x266028),{'memberKey':_0x50940b})]);if(!isMemberActive(_0x210508)||!_0x3475d2)throw KeetContractError['ABORT'];function _0x438128(_0x11ddb5,_0x16ba75,_0x1e7a3f,_0x19cc96){return _0x2b46a3(_0x11ddb5-_0x54fc6a._0x446ad3,_0x16ba75-_0x54fc6a._0x27cf5d,_0x1e7a3f-_0x54fc6a._0x977664,_0x16ba75);}await _0x4f0193[_0x463dd0(0x52b,_0x5dc1f3._0x4b88e0,0x552,_0x5dc1f3._0x174abb)](_0x438128(_0x5dc1f3._0x57da94,0x4de,_0x5dc1f3._0x121ee1,0x513)+_0x438128(_0x5dc1f3._0x27d715,_0x5dc1f3._0x161120,_0x5dc1f3._0x1b0726,_0x5dc1f3._0xfc23de)+'tacts',_0x3475d2);}async function handleAddContactRequest({blindRequest:_0x395198,header:_0x42934e},{db:_0x30af7d,hostcalls:_0x13b820,writer:_0xa92252}){const _0x2021d2={_0x3d96e8:0xd3,_0x531f02:0xf6,_0x268d7e:0xf2,_0x52bfe6:0x437,_0x3249f3:0x471,_0x1d62f9:0x435,_0x5802fa:0x41a,_0x53b83d:0x18e,_0x5c6a4d:0x17e,_0x7005bb:0x15e,_0x3eb3a6:0x12f,_0x35116b:0x105,_0x4f9255:0x13e,_0x274ad4:0x467,_0xa2b795:0x42b,_0x354975:0x406,_0x1912ad:0x109,_0x2f7f72:0xcc,_0xf8dcda:0xf8,_0x2c5c5a:0x46b,_0x26bbde:0x423,_0x34dca2:0x11a,_0x3b38c5:0xfb,_0x1f51df:0x109,_0x102c56:0x11d,_0x15d1e6:0x155,_0x1daf71:0x11d,_0x906a80:0x158,_0x507591:0x17f,_0x4a5bf1:0x143,_0x3fa258:0x129,_0xe3ba62:0x12a,_0xb9efe9:0x13d,_0x1ec0c6:0x12b,_0x1a82cb:0x110,_0x5bf189:0x448,_0x47e348:0x476,_0x2f9641:0x46c,_0x36bc51:0x122,_0xbc00a6:0x107,_0x12d1aa:0x16a,_0x15b4a1:0x15a,_0x5440a3:0x153,_0x3df619:0x3ce,_0x1a8c82:0x3d7,_0x5cdd1b:0x3da,_0x526ffb:0x11d,_0x5cdc17:0x161,_0x507165:0x146,_0x4ad4e0:0x10b,_0x50f75b:0xfe,_0xa4173a:0x3f0,_0x414350:0x416,_0x7c0180:0x3e2,_0x57ed2f:0x3ef,_0x2ee470:0x45d,_0x434337:0x43c,_0xf7069b:0x13d,_0x6ade9f:0x13e,_0x13cdeb:0x116,_0x285e36:0xf7,_0x11db01:0x118,_0x14d05a:0x109,_0x103e0b:0xd4,_0x1fd7f4:0xcb,_0x2e600b:0x126,_0x34e7f0:0xf8,_0x54d089:0x406,_0x453e5d:0x41a,_0x11bb32:0x41b,_0x48f263:0x137,_0x40324c:0x3b6,_0x11488b:0x3e3,_0x4470ad:0x3d1,_0x269081:0x483,_0x4d1f0b:0x44a,_0x25d250:0x41c,_0x2f2425:0x47f,_0x458d24:0x40b,_0x5339fd:0x400,_0x54fe30:0x3fd,_0x54bd20:0x3de,_0xad2bd6:0x16d,_0x30b9d9:0x160,_0x37cbcf:0x42a,_0x33b67a:0x3e0,_0x2b5ec5:0x42b,_0x3ecc96:0x3e3,_0x221921:0x3ee,_0x4256ba:0x404,_0x26a399:0x45a,_0x2e23a3:0x46f,_0x1b08b9:0x41f,_0x917d24:0x3e6,_0x40565d:0x3f8,_0xdb0045:0x3fb,_0x5be006:0x438,_0x46a81e:0x414,_0x398b5e:0x40c,_0x23b38f:0x40a,_0x4f8fd2:0x14e,_0x229b67:0x3ed,_0x540818:0x414,_0x37bfd3:0x44c,_0x527a66:0x43d,_0x19e14b:0x3f1,_0xa7c27b:0x3ee,_0x1e9665:0x185,_0x38266c:0x191,_0x4251cb:0x3b9,_0x55a68d:0x3e4,_0x3b9c6a:0x3c8,_0x540fb1:0x3c3,_0x34cad7:0x136,_0x4ab089:0x11c,_0x20ed86:0x40f,_0x44ad72:0x439,_0x4f58e7:0x42c,_0x3189a9:0x401,_0x158ed0:0x41f,_0x10216e:0x468,_0x43b5b7:0x446,_0x2f19d5:0x415,_0x539dd7:0xeb,_0x1d4ac1:0x104,_0x2d00d3:0x10f,_0x24b999:0x143,_0xf5e57d:0xfc,_0x5341a6:0x112,_0x340f93:0x117,_0x509e3f:0x40d,_0x4d3d5a:0x3e1,_0x3b1af2:0x430,_0x3b245d:0x3f1,_0x40f434:0x127,_0x11f26a:0x15f,_0x40d4ba:0x413,_0xd94d12:0xf8,_0x3052b2:0xce,_0x97c88f:0xe7,_0x4a0fcc:0x108,_0x23741e:0xca,_0x50040e:0x136,_0x1f7951:0x142,_0x12382d:0x168,_0x2033f3:0x12e,_0x7a3ba2:0x143,_0x37dc7f:0x14a},_0x8b3606={_0x182204:0x36d,_0x3512d0:0x14e},_0x5a760e={_0x5e971a:0x108};function _0x8dce78(_0x52e2e6,_0x22ec39,_0x2cce05,_0x5c7344){return _0x2b46a3(_0x2cce05- -0x1d1,_0x22ec39-0x106,_0x2cce05-_0x5a760e._0x5e971a,_0x22ec39);}const _0x42a720=await _0x30af7d[_0x8dce78(-_0x2021d2._0x3d96e8,-0x11c,-_0x2021d2._0x531f02,-_0x2021d2._0x268d7e)]('@keet/room'+'-capabilit'+_0x44f754(0x40e,_0x2021d2._0x52bfe6,_0x2021d2._0x3249f3,0x45a));if(!_0x42a720)throw KeetContractError[_0x44f754(_0x2021d2._0x1d62f9,0x400,0x3c6,_0x2021d2._0x5802fa)]();let _0x57cecb=null;try{const _0x5a10d5=generateMailboxKeyPair(_0x13b820['key'],_0x42a720[_0x8dce78(-_0x2021d2._0x53b83d,-_0x2021d2._0x5c6a4d,-0x15f,-_0x2021d2._0x7005bb)]);_0x57cecb=decryptContactRequest(_0x5a10d5,_0x395198);}catch(_0x13105d){throw KeetContractError[_0x8dce78(-_0x2021d2._0x3eb3a6,-_0x2021d2._0x35116b,-_0x2021d2._0x4f9255,-0x11e)]();}if(!_0x57cecb)throw KeetContractError['ABORT']();const {body:_0x8e0cb8,attestation:_0x1e049f}=_0x57cecb,{sender:_0x5c9f00,keys:_0x1e40c1,mailbox:_0x23a150,message:_0xfb99cd}=_0x8e0cb8;function _0x44f754(_0x39c0fc,_0x3c2405,_0x22d046,_0x54d856){return _0x2b46a3(_0x3c2405-_0x8b3606._0x182204,_0x3c2405-_0x8b3606._0x3512d0,_0x22d046-0x1dc,_0x54d856);}const [_0x354ab3,_0x422149,_0x425f65]=await Promise[_0x44f754(_0x2021d2._0x274ad4,_0x2021d2._0xa2b795,0x43a,_0x2021d2._0x354975)]([_0x30af7d[_0x8dce78(-_0x2021d2._0x1912ad,-_0x2021d2._0x2f7f72,-_0x2021d2._0x531f02,-_0x2021d2._0xf8dcda)](_0x44f754(_0x2021d2._0x2c5c5a,0x439,_0x2021d2._0x26bbde,0x41b)+_0x8dce78(-_0x2021d2._0x34dca2,-_0x2021d2._0x3b38c5,-_0x2021d2._0x1f51df,-_0x2021d2._0x102c56)+_0x8dce78(-0x13c,-_0x2021d2._0x15d1e6,-_0x2021d2._0x102c56,-_0x2021d2._0x1daf71),{'memberKey':_0x5c9f00[_0x8dce78(-0x183,-0x157,-_0x2021d2._0x906a80,-_0x2021d2._0x507591)+'n'][_0x8dce78(-_0x2021d2._0x4a5bf1,-_0x2021d2._0x3fa258,-_0x2021d2._0xe3ba62,-0x116)]}),_0x30af7d['get']('@keet-priv'+_0x8dce78(-0x10e,-_0x2021d2._0xb9efe9,-_0x2021d2._0x1ec0c6,-_0x2021d2._0x1a82cb)+'ts'),_0x30af7d[_0x44f754(0x442,_0x2021d2._0x5bf189,_0x2021d2._0x47e348,_0x2021d2._0x2f9641)](_0x8dce78(-0x138,-0xfd,-0x103,-_0x2021d2._0x36bc51)+_0x8dce78(-_0x2021d2._0xbc00a6,-_0x2021d2._0x12d1aa,-0x133,-_0x2021d2._0xf8dcda))]);if(_0x354ab3&&_0x354ab3[_0x8dce78(-0x177,-0x16e,-_0x2021d2._0x15b4a1,-_0x2021d2._0x5440a3)][_0x44f754(_0x2021d2._0x3df619,_0x2021d2._0x1a8c82,0x3b2,_0x2021d2._0x5cdd1b)])throw KeetContractError[_0x8dce78(-_0x2021d2._0x526ffb,-0x102,-_0x2021d2._0x4f9255,-_0x2021d2._0x5cdc17)]();if(_0x354ab3&&_0x354ab3[_0x8dce78(-0xd0,-_0x2021d2._0x507165,-_0x2021d2._0x4ad4e0,-_0x2021d2._0x50f75b)]&&_0x425f65[_0x44f754(_0x2021d2._0xa4173a,_0x2021d2._0x414350,_0x2021d2._0x7c0180,_0x2021d2._0x57ed2f)][_0x44f754(_0x2021d2._0x2ee470,0x429,_0x2021d2._0x2ee470,_0x2021d2._0x434337)]<-0x2*0x101+-0x1096+0x1*0x12a4)throw KeetContractError[_0x8dce78(-0x166,-_0x2021d2._0xf7069b,-_0x2021d2._0x6ade9f,-_0x2021d2._0x13cdeb)]();const _0x29d8de=encodeContractStruct('@keet-priv'+_0x8dce78(-_0x2021d2._0x285e36,-_0x2021d2._0x11db01,-_0x2021d2._0x14d05a,-_0x2021d2._0x103e0b)+_0x8dce78(-_0x2021d2._0x1fd7f4,-_0x2021d2._0x2e600b,-_0x2021d2._0x34e7f0,-0x122)+_0x44f754(_0x2021d2._0x54d089,_0x2021d2._0x453e5d,_0x2021d2._0x453e5d,_0x2021d2._0x11bb32),_0x8e0cb8),_0x258e83=encodeContractStruct(_0x8dce78(-0x101,-0xce,-0x108,-_0x2021d2._0x48f263)+_0x44f754(_0x2021d2._0x40324c,_0x2021d2._0x11488b,0x3f6,_0x2021d2._0x4470ad),_0x5c9f00[_0x44f754(_0x2021d2._0x269081,_0x2021d2._0x4d1f0b,_0x2021d2._0x25d250,_0x2021d2._0x2f2425)]),_0x3361ec=verifyAttestation(_0x1e049f,_0x29d8de);if(!_0x3361ec)throw KeetContractError['ABORT']();const _0x575da8=verifyAttestation(_0x5c9f00['attestatio'+'n'],_0x258e83);if(!_0x575da8)throw KeetContractError[_0x44f754(_0x2021d2._0x458d24,_0x2021d2._0x5339fd,_0x2021d2._0x54fe30,_0x2021d2._0x54bd20)]();let _0x1fb8c7=!![];const _0x5acd6d=_0x42934e[_0x8dce78(-_0x2021d2._0xad2bd6,-0x186,-_0x2021d2._0x30b9d9,-0x186)],_0x38e76c=_0x30af7d['find']('@keet-priv'+_0x44f754(_0x2021d2._0x37cbcf,0x40e,_0x2021d2._0x33b67a,_0x2021d2._0x2b5ec5)+_0x44f754(_0x2021d2._0x3ecc96,_0x2021d2._0x221921,0x3b2,_0x2021d2._0x4256ba)+_0x44f754(0x409,0x43d,_0x2021d2._0x26a399,_0x2021d2._0x2e23a3)+'s-by-membe'+'r',{'gte':{'memberKey':_0x5c9f00[_0x44f754(_0x2021d2._0x1b08b9,_0x2021d2._0x917d24,_0x2021d2._0x40565d,_0x2021d2._0xdb0045)+'n'][_0x44f754(_0x2021d2._0x5be006,_0x2021d2._0x46a81e,_0x2021d2._0x398b5e,_0x2021d2._0x23b38f)]},'lte':{'memberKey':_0x5c9f00[_0x8dce78(-0x162,-_0x2021d2._0x4f8fd2,-0x158,-0x18c)+'n'][_0x44f754(_0x2021d2._0x229b67,_0x2021d2._0x540818,_0x2021d2._0x37bfd3,_0x2021d2._0x527a66)]}});for await(const _0x416bfa of _0x38e76c){if(_0x416bfa[_0x44f754(_0x2021d2._0x19e14b,0x403,_0x2021d2._0x54bd20,_0x2021d2._0xa7c27b)]>_0x5acd6d){_0x1fb8c7=![];continue;}_0x416bfa[_0x8dce78(-_0x2021d2._0x1e9665,-_0x2021d2._0x38266c,-_0x2021d2._0x15b4a1,-0x11e)]['isPending']=![],_0x416bfa[_0x44f754(_0x2021d2._0x4251cb,_0x2021d2._0x55a68d,_0x2021d2._0x3b9c6a,_0x2021d2._0x540fb1)][_0x8dce78(-0x172,-0x106,-_0x2021d2._0x34cad7,-_0x2021d2._0x4ab089)+'d']=!![],await _0x30af7d[_0x44f754(0x3dd,_0x2021d2._0x20ed86,0x3f2,0x43d)](_0x44f754(0x439,_0x2021d2._0x44ad72,_0x2021d2._0x4f58e7,_0x2021d2._0x3189a9)+_0x44f754(0x418,_0x2021d2._0x1d62f9,_0x2021d2._0x158ed0,0x44f)+_0x44f754(_0x2021d2._0x10216e,_0x2021d2._0x43b5b7,_0x2021d2._0x2f19d5,_0x2021d2._0x52bfe6)+_0x8dce78(-0xd5,-_0x2021d2._0x539dd7,-_0x2021d2._0x1d4ac1,-_0x2021d2._0x2d00d3),_0x416bfa);}if(!_0x1fb8c7)return;const _0x3036db=_0x422149?.[_0x8dce78(-_0x2021d2._0x24b999,-_0x2021d2._0xf5e57d,-_0x2021d2._0x5341a6,-_0x2021d2._0x340f93)+'uests']||0x2b6*0x4+-0xd38+0x260,_0xf8d913={'isPending':!![]},_0x103afd={'memberKey':_0x5c9f00[_0x44f754(_0x2021d2._0x509e3f,_0x2021d2._0x917d24,_0x2021d2._0x229b67,_0x2021d2._0x4d3d5a)+'n'][_0x44f754(_0x2021d2._0x46a81e,0x414,_0x2021d2._0x3b1af2,_0x2021d2._0x3b245d)],'sender':_0x5c9f00['profile'],'status':_0xf8d913,'clock':_0x3036db,'keys':_0x1e40c1,'mailbox':_0x23a150,'message':_0xfb99cd,'sentAt':_0x5acd6d};await _0x30af7d[_0x8dce78(-_0x2021d2._0x40f434,-_0x2021d2._0x11f26a,-0x12f,-0x129)]('@keet-priv'+_0x44f754(0x41c,_0x2021d2._0x1d62f9,0x435,_0x2021d2._0x40d4ba)+_0x8dce78(-0x134,-0xf7,-_0x2021d2._0xd94d12,-_0x2021d2._0x3052b2)+_0x8dce78(-_0x2021d2._0x97c88f,-_0x2021d2._0x4a0fcc,-_0x2021d2._0x1d4ac1,-_0x2021d2._0x23741e),_0x103afd),await profileContactRequestStats(_0x30af7d,_0x103afd,null),await _0x13b820[_0x8dce78(-_0x2021d2._0x13cdeb,-_0x2021d2._0x50040e,-_0x2021d2._0x1f7951,-_0x2021d2._0x12382d)](_0xa92252[_0x8dce78(-_0x2021d2._0x2033f3,-_0x2021d2._0x15b4a1,-_0x2021d2._0x7a3ba2,-_0x2021d2._0x37dc7f)]);}async function handleUpdateContactRequestStatus({memberKey:_0xcd02b4,roomKey:_0x3fb646,key:_0x31ee76,status:_0x13c9d2},{db:_0x5dbd0c,writer:_0xff2a22}){const _0x157cf5={_0x2f2a3a:0x43a,_0x535bcc:0x41a,_0x4b414d:0x199,_0x547137:0x1af,_0x4553b6:0x11a,_0x443c0c:0x128,_0x372907:0x14f,_0x2f054f:0x185,_0x2c6b1e:0x49f,_0x42ea79:0x482,_0x57b33a:0x4bc,_0x3abcea:0x4a2,_0x1f9695:0x44c,_0x48d409:0x473,_0x3c6817:0x49f,_0x416cd6:0x1ab,_0x3f5f61:0x1b0,_0x448542:0x167,_0x22cd23:0x19d,_0x1a3a75:0x16f,_0x5a9d99:0x18e,_0x37b8c6:0x172,_0xe8c493:0x168,_0x31fe1c:0x198,_0x139f06:0x1c3,_0x3d58eb:0x1b8,_0x14c2d0:0x41a,_0x4d31ea:0x473,_0xefdf15:0x43a,_0x30e0ef:0x439,_0x4e66c0:0x43d,_0x4f181c:0x424,_0x1b5bfc:0x43a,_0x114511:0x402,_0x14cad3:0x4b2,_0x570f01:0x47e,_0x1904bf:0x11f,_0x1fb7f4:0x15d,_0x5524e9:0x12d,_0x440134:0x166,_0xc1f759:0x14c,_0x43a6d7:0x19c,_0x4eedf8:0x128,_0x1a2321:0x161,_0x433752:0x16e,_0x2a1572:0x1a9,_0x578080:0x181,_0x4714f1:0x17a,_0x5b412e:0x118,_0xc43b51:0x12d,_0x3f973d:0x104,_0x10ca38:0x157,_0x47da29:0x3ed,_0x147b94:0x402,_0x51fd22:0x134,_0x4d35f7:0x138,_0x33dad7:0x156,_0x454069:0xfe,_0x28d38f:0x15a,_0x15ec41:0xfc,_0x16c88b:0x12d,_0x3b0fba:0x136,_0x4847eb:0x41e,_0x35d09f:0x459,_0x2c951c:0x133,_0x2b3529:0x15c,_0x4c5a4c:0x41e,_0xd4e3d:0x441,_0x311f89:0x45a,_0x4c0347:0x45b,_0x3169f3:0x452,_0x3e8e1b:0x483,_0x2c3428:0x473,_0x129990:0x182,_0x596b19:0x19a,_0x4ee907:0x1b3,_0x16d8ad:0x474,_0x45f0ba:0x491,_0x45d87d:0x41e,_0x299b98:0x42f,_0x46a2b2:0x16b,_0x2d9089:0x1c6,_0x312b8f:0x1b5,_0x193c31:0x196,_0x24b549:0x1b4,_0xadaad9:0x1c2,_0x152b8e:0x187,_0x3b9c25:0x192,_0x421a09:0x19b,_0x1f4fb8:0x184,_0x2eaa68:0x171,_0x26aac5:0x14d,_0x521494:0x13e,_0xe84557:0x168,_0x271d2a:0x13f,_0x4e7fa0:0x47f,_0x2f38f5:0x451,_0x106c28:0x457,_0x22a793:0x44a,_0x261c03:0x44b,_0x4ebd35:0x473,_0x3e2808:0x446,_0x36ba3b:0x479,_0x4c2112:0x473,_0x52260b:0x45b,_0xb92c81:0x435,_0x41e57e:0x46f,_0x308b7f:0x45b},_0x25eff8={_0x156aaf:0x1d9,_0x3f0574:0x179},_0x2dc769={_0x37029f:0x3a7,_0x232e3e:0x22,_0x37cfcc:0xca};if(!_0x3fb646)throw KeetContractError[_0x11f9bb(0x464,0x46f,_0x157cf5._0x2f2a3a,_0x157cf5._0x535bcc)]();const [_0x186551,_0x549d06,_0x197783]=await Promise[_0x4cd9cd(0x193,_0x157cf5._0x4b414d,0x17f,_0x157cf5._0x547137)]([getMemberForDeviceKey(_0x5dbd0c,_0xff2a22[_0x4cd9cd(_0x157cf5._0x4553b6,_0x157cf5._0x443c0c,_0x157cf5._0x372907,_0x157cf5._0x2f054f)]),_0x5dbd0c[_0x11f9bb(_0x157cf5._0x2c6b1e,0x47d,_0x157cf5._0x42ea79,_0x157cf5._0x57b33a)](_0x11f9bb(_0x157cf5._0x3abcea,_0x157cf5._0x1f9695,_0x157cf5._0x48d409,_0x157cf5._0x3c6817)+'ate-id/con'+_0x4cd9cd(_0x157cf5._0x416cd6,_0x157cf5._0x3f5f61,0x19a,_0x157cf5._0x448542)+_0x4cd9cd(_0x157cf5._0x22cd23,_0x157cf5._0x1a3a75,_0x157cf5._0x5a9d99,0x1c8),{'memberKey':_0xcd02b4,'keys':{'key':_0x3fb646}}),_0x5dbd0c['get']('@keet-priv'+_0x4cd9cd(_0x157cf5._0x37b8c6,0x116,0x147,_0x157cf5._0xe8c493)+_0x4cd9cd(_0x157cf5._0x31fe1c,_0x157cf5._0x139f06,0x19f,_0x157cf5._0x3d58eb))]);if(!isMemberActive(_0x186551)||!_0x549d06)throw KeetContractError[_0x11f9bb(_0x157cf5._0x14c2d0,_0x157cf5._0x4d31ea,_0x157cf5._0xefdf15,_0x157cf5._0x30e0ef)]();if(!isValidContactRequestStatusKey(_0x31ee76))throw KeetContractError[_0x11f9bb(_0x157cf5._0x4e66c0,_0x157cf5._0x4f181c,_0x157cf5._0x1b5bfc,_0x157cf5._0x114511)]();const _0x2e2991=getContactRequestStatusKeyName(_0x31ee76),_0x53e24d=_0x549d06[_0x11f9bb(_0x157cf5._0x14cad3,0x48e,_0x157cf5._0x570f01,0x459)],_0xa74f71=!_0x549d06[_0x4cd9cd(_0x157cf5._0x1904bf,_0x157cf5._0x1fb7f4,0x138,_0x157cf5._0x5524e9)][_0x4cd9cd(0x101,_0x157cf5._0x440134,_0x157cf5._0x5524e9,_0x157cf5._0xc1f759)]&&_0x31ee76===ContactRequestStatus[_0x4cd9cd(_0x157cf5._0x43a6d7,_0x157cf5._0x4eedf8,_0x157cf5._0x1a2321,_0x157cf5._0x433752)],_0x2a6e8d=_0x31ee76===ContactRequestStatus[_0x4cd9cd(_0x157cf5._0x2a1572,0x184,_0x157cf5._0x578080,_0x157cf5._0x4714f1)];if(!_0x2a6e8d&&_0x549d06['status'][_0x4cd9cd(_0x157cf5._0x448542,_0x157cf5._0x5b412e,_0x157cf5._0xc43b51,_0x157cf5._0x3f973d)])throw KeetContractError['ABORT']();const _0xd6c8ef={'isPending':![],'isAccepted':![],'isRejected':![],'isDiscarded':![],'isSeen':_0x549d06[_0x4cd9cd(0x16b,0x174,0x138,_0x157cf5._0x10ca38)][_0x11f9bb(_0x157cf5._0x47da29,_0x157cf5._0x147b94,_0x157cf5._0x4f181c,0x417)]},_0x2820a1=_0x2a6e8d?_0x549d06['status']:_0xd6c8ef;_0x549d06[_0x4cd9cd(0x11e,_0x157cf5._0x51fd22,_0x157cf5._0x4d35f7,_0x157cf5._0x33dad7)]={..._0x2820a1,[_0x2e2991]:_0x13c9d2[_0x2e2991]};(_0x549d06[_0x4cd9cd(_0x157cf5._0x454069,0x130,_0x157cf5._0x4d35f7,_0x157cf5._0x3f973d)][_0x4cd9cd(_0x157cf5._0x28d38f,_0x157cf5._0x15ec41,_0x157cf5._0x16c88b,_0x157cf5._0x3b0fba)]||_0x549d06[_0x11f9bb(0x3e3,0x41c,_0x157cf5._0x4847eb,_0x157cf5._0x35d09f)]['isRejected']||_0x549d06['status'][_0x4cd9cd(0x174,_0x157cf5._0x2c951c,_0x157cf5._0x2b3529,0x18f)+'d'])&&(_0x549d06[_0x11f9bb(0x3f7,0x421,_0x157cf5._0x4c5a4c,_0x157cf5._0xd4e3d)][_0x11f9bb(_0x157cf5._0x311f89,_0x157cf5._0x4c0347,_0x157cf5._0x3169f3,0x468)]=![]);await _0x5dbd0c['insert'](_0x11f9bb(_0x157cf5._0x3e8e1b,0x470,_0x157cf5._0x2c3428,0x49c)+'ate-id/con'+_0x4cd9cd(0x184,_0x157cf5._0x129990,_0x157cf5._0x596b19,_0x157cf5._0x4ee907)+_0x11f9bb(0x43b,0x4af,_0x157cf5._0x16d8ad,_0x157cf5._0x45f0ba),_0x549d06);function _0x11f9bb(_0x1219bf,_0x1a4e5c,_0x29201c,_0x35edb5){return _0x2b46a3(_0x29201c-_0x2dc769._0x37029f,_0x1a4e5c-_0x2dc769._0x232e3e,_0x29201c-_0x2dc769._0x37cfcc,_0x1219bf);}if(!_0xa74f71)return;const _0xb37ef7={'isActive':!![]},_0x53a419={'isBlocked':![]},_0x52a078=(_0x197783?.['rooms']||0x2694+-0x4a7*-0x3+-0x3489)+(-0x1*0x1ec7+-0x3a*0x10+0x89a*0x4),_0x299c28=(_0x197783?.[_0x11f9bb(0x413,_0x157cf5._0x45d87d,_0x157cf5._0x299b98,0x400)]||0x196*0x16+0x1*0x1058+-0x445*0xc)+(-0x3f6*-0x2+0x160c+-0x1df7),_0x22ba7b={'clock':_0x52a078,'roomKey':_0x549d06['keys'][_0x4cd9cd(_0x157cf5._0x443c0c,_0x157cf5._0x46a2b2,0x14f,_0x157cf5._0x10ca38)],'encryptionKey':_0x549d06['keys'][_0x4cd9cd(_0x157cf5._0x2d9089,_0x157cf5._0x312b8f,_0x157cf5._0x193c31,_0x157cf5._0x24b549)+_0x4cd9cd(_0x157cf5._0xadaad9,_0x157cf5._0x152b8e,_0x157cf5._0x3b9c25,_0x157cf5._0x421a09)],'mailbox':_0x549d06[_0x4cd9cd(0x191,_0x157cf5._0x1f4fb8,_0x157cf5._0x2eaa68,_0x157cf5._0x26aac5)],'status':_0xb37ef7};function _0x4cd9cd(_0xe3ca5c,_0x2e5d06,_0x57a36f,_0x1255fc){return _0x1605cb(_0x57a36f- -0x209,_0x2e5d06-_0x25eff8._0x156aaf,_0x57a36f-_0x25eff8._0x3f0574,_0x2e5d06);}const _0x973dc={'memberKey':_0x549d06[_0x4cd9cd(_0x157cf5._0x521494,0x138,_0x157cf5._0xe84557,_0x157cf5._0x271d2a)],'mailbox':_0x53e24d[_0x11f9bb(_0x157cf5._0x4e7fa0,_0x157cf5._0x2f38f5,_0x157cf5._0x106c28,0x41e)],'clock':_0x299c28,'status':_0x53a419};await _0x5dbd0c[_0x11f9bb(_0x157cf5._0x22a793,0x46f,0x449,_0x157cf5._0x4f181c)](_0x11f9bb(0x478,_0x157cf5._0x261c03,_0x157cf5._0x4ebd35,_0x157cf5._0x3e2808)+'ate-id/roo'+'ms',_0x22ba7b),await profileRoomStats(_0x5dbd0c,_0x22ba7b,null),await _0x5dbd0c['insert'](_0x11f9bb(_0x157cf5._0x36ba3b,0x490,_0x157cf5._0x4c2112,_0x157cf5._0x52260b)+_0x11f9bb(_0x157cf5._0xb92c81,0x48b,_0x157cf5._0x41e57e,_0x157cf5._0x2f38f5)+_0x11f9bb(0x448,0x42c,_0x157cf5._0x308b7f,_0x157cf5._0x299b98),_0x973dc),await profileContactStats(_0x5dbd0c,_0x973dc,null);}async function handleActivateContactRoom({memberKey:_0x166dbc},{db:_0x691e67,writer:_0x173c74}){}async function handleAddUnreadsKey({key:_0x1a20fc},{db:_0x33ab2f,writer:_0x34e49b}){const _0x5c2add={_0x5974c1:0x10,_0xd294c2:0x3b,_0x29ff58:0x73,_0x439f22:0x64,_0x4eb527:0x147,_0x4ade98:0x12c,_0x5a6fcc:0x11e,_0x452d44:0x87,_0x3ccd2b:0x4f,_0x1b8d85:0x7c,_0x8cb96d:0x60,_0x2c7c5d:0xb0,_0x25515d:0x79,_0x2d510b:0x4b,_0xe47434:0x74,_0x438935:0x18a,_0x434513:0x18e,_0x27f866:0x1ac,_0x433089:0x32,_0x26df16:0x35},_0x19fc81={_0x14bdc9:0x216,_0x54b584:0x90},_0x546991={_0x4ebe7a:0x3c},_0x279633=await getMemberForDeviceKey(_0x33ab2f,_0x34e49b[_0x24e8b8(_0x5c2add._0x5974c1,_0x5c2add._0xd294c2,_0x5c2add._0x29ff58,_0x5c2add._0x439f22)]);function _0x24e8b8(_0x185c33,_0x32510d,_0xf4ba07,_0x44e4c0){return _0x2b46a3(_0x32510d- -0x53,_0x32510d-_0x546991._0x4ebe7a,_0xf4ba07-0x58,_0xf4ba07);}function _0x10ae55(_0x55daa1,_0x3aa4fb,_0x2f16f0,_0x599fd4){return _0x1605cb(_0x55daa1- -_0x19fc81._0x14bdc9,_0x3aa4fb-0x4b,_0x2f16f0-_0x19fc81._0x54b584,_0x599fd4);}if(!isMemberActive(_0x279633))throw KeetContractError[_0x10ae55(_0x5c2add._0x4eb527,_0x5c2add._0x4ade98,_0x5c2add._0x5a6fcc,_0x5c2add._0x4eb527)]();await _0x33ab2f[_0x24e8b8(_0x5c2add._0x452d44,_0x5c2add._0x3ccd2b,_0x5c2add._0x1b8d85,_0x5c2add._0x8cb96d)](_0x24e8b8(_0x5c2add._0x2c7c5d,_0x5c2add._0x25515d,_0x5c2add._0x2d510b,_0x5c2add._0xe47434)+'ate-id/unr'+_0x10ae55(_0x5c2add._0x438935,_0x5c2add._0x434513,0x1c2,_0x5c2add._0x27f866),{'deviceKey':_0x34e49b[_0x24e8b8(0x3d,_0x5c2add._0xd294c2,_0x5c2add._0x433089,_0x5c2add._0x26df16)],'key':_0x1a20fc});}async function handleRemoveUnreadsKey({key:_0x48719f},{db:_0xc0cb26,writer:_0x373300}){const _0x50e77a={_0x4c13ee:0x1ce,_0xff666b:0x203,_0x290f5f:0x1d5,_0x4fb182:0x1c9,_0x5f153b:0x1fe,_0x19dfe4:0x1f7,_0x28de5a:0x20d,_0x3eb9d7:0x1e7,_0x19d8ac:0x171,_0xc4588f:0x190,_0x479c91:0x1ca,_0x23e241:0x205,_0x428165:0x1fc,_0x3ae53e:0x186,_0x5842fc:0x1ab,_0x3457b7:0x14f},_0x1689b8={_0x2339a1:0xd5},_0x35fdf4={_0x1112ae:0x526,_0xd5fdba:0xd8};function _0x1a8203(_0x49d2aa,_0x136767,_0x4cd456,_0x582c2b){return _0x1605cb(_0x136767- -_0x35fdf4._0x1112ae,_0x136767-_0x35fdf4._0xd5fdba,_0x4cd456-0x168,_0x4cd456);}const _0x1da1e9=await getMemberForDeviceKey(_0xc0cb26,_0x373300[_0x1a8203(-0x19f,-_0x50e77a._0x4c13ee,-_0x50e77a._0xff666b,-0x1de)]);function _0x13faba(_0x1399c1,_0x44328c,_0x2d526c,_0x23898f){return _0x2b46a3(_0x1399c1-0x237,_0x44328c-_0x1689b8._0x2339a1,_0x2d526c-0xeb,_0x2d526c);}if(!isMemberActive(_0x1da1e9))throw KeetContractError[_0x1a8203(-_0x50e77a._0x290f5f,-_0x50e77a._0x4fb182,-_0x50e77a._0x5f153b,-_0x50e77a._0x19dfe4)]();await _0xc0cb26[_0x1a8203(-0x210,-0x1e2,-_0x50e77a._0x28de5a,-_0x50e77a._0x3eb9d7)](_0x1a8203(-_0x50e77a._0x19d8ac,-_0x50e77a._0xc4588f,-0x17e,-0x160)+_0x1a8203(-0x1fe,-_0x50e77a._0x479c91,-_0x50e77a._0x23e241,-_0x50e77a._0x428165)+_0x1a8203(-0x1be,-_0x50e77a._0x3ae53e,-_0x50e77a._0x5842fc,-_0x50e77a._0x3457b7),{'deviceKey':_0x373300['key'],'key':_0x48719f});}function registerRoutes(_0x361831){const _0x57f0a6={_0x14485e:0x1a3,_0x8683ea:0x196,_0x427b8d:0x1b0,_0x598fbe:0x1b4,_0x42f8df:0x85,_0x4702a8:0x5e,_0x81e33a:0x9a,_0x269c8e:0x70,_0x3abea2:0x9e,_0x35c5e0:0xd5,_0x188aa8:0xb2,_0xefcf92:0xc0,_0x467bf3:0xa4,_0x7e11ec:0xc7,_0x51a113:0x8f,_0x4c644f:0x1a7,_0x2f9fe3:0x1a9,_0x4b84af:0x1e2,_0x3f1ae0:0x1be,_0x46f4c8:0x85,_0x4dcace:0x82,_0x335e48:0x73,_0x3070bf:0x69,_0x3fc32f:0x1fb,_0x4020b5:0x1bf,_0xb0ea35:0x1b9,_0x5ad1ca:0x1bc,_0x402470:0x1b3,_0x486380:0x1b2,_0x5d7a84:0x85,_0xf4e04:0x96,_0x170a34:0xa2,_0x5776d8:0xd7,_0x11265b:0x1a2,_0x3c4010:0x17c,_0x2dead2:0x1bc,_0x26294f:0x190,_0x2ad100:0x16f,_0x423361:0x192,_0x757957:0x179,_0x26f22e:0x229,_0x2bf66b:0x200,_0x509e0f:0x22a,_0x1b8a86:0x1f8,_0x22e7f6:0xbf,_0x4c59b9:0x91,_0x2a7be:0x79,_0x4d0f9e:0x87,_0x4b226f:0x97,_0x2ed86c:0x6a,_0x1d8e5d:0xb9,_0x56fdc7:0xae,_0x5de814:0xab,_0x246d89:0xd3,_0x347d8a:0xe5,_0x551c27:0xf0,_0x4bc7cb:0xd1,_0x1a2792:0x85,_0x1f9e1b:0x61,_0x3fbb94:0x50,_0x483767:0x16f,_0x90e45f:0x1aa,_0x5630be:0xe1,_0x3d90de:0xff,_0x5dbd77:0xd1,_0x5af1d7:0xe7,_0x589dbe:0xe8,_0x427a85:0xe2,_0x420d1a:0xba,_0xb1258f:0x11c,_0x3b0040:0x79,_0x35516c:0x7a,_0x3dd17e:0x71,_0x207dc9:0xac,_0x273659:0xa2,_0x1bee23:0xe3,_0x2db899:0xa9,_0x2cf2d2:0x22e,_0x3f99ab:0x1c7,_0x2d06cf:0x1f3,_0x256e00:0xba,_0x56b529:0xb0,_0x3521e2:0xdd,_0x2e0d21:0x196,_0xeae454:0x97,_0x2d8a65:0x1e0,_0x481d83:0x1c6,_0x3ced3a:0x1c1,_0x44057e:0x17d,_0x202684:0x1a9,_0x262e7a:0x1a7,_0x45fdbd:0x184,_0x3c19cb:0x1a5,_0x5ddaab:0x1c5,_0x1d6a98:0x1aa,_0xf0832:0x195,_0xcc2357:0x1d2,_0x32bc8b:0x95,_0x2c8f34:0xcc,_0x3e877d:0xce,_0x34f359:0xd2,_0x49a0e4:0xc7,_0x3dd8e3:0x106,_0xf3825c:0x1d0,_0x197109:0x196,_0x39c5dc:0x16b,_0x1fbb7a:0x1b6,_0x4c3ebd:0xaa,_0x3ac903:0x4b,_0x2d5b34:0x1a8,_0x5efe7e:0x1ca,_0x168ec2:0x1b5,_0x16105b:0x1b7,_0x134b59:0x1db,_0x5dcdf3:0x7f,_0x155c94:0x4e,_0x45fe5e:0x1d9,_0x4e098e:0x1ac,_0x4cbe96:0xa2,_0x470e7e:0x78,_0x9a2915:0x8d,_0x4cb5f8:0x194,_0x2036d5:0x1c9,_0x8ebcbb:0x1a3,_0x4f617d:0xb9,_0x3e702a:0x7e,_0x5c5282:0xa6,_0x22b1c0:0x20c,_0x332353:0x1bd,_0xc70a4c:0x1c0,_0x373ffd:0x19c,_0x133985:0x196,_0x256eb2:0x160,_0x3d52eb:0x71,_0x4b7ca2:0x74,_0x46fb40:0xa0,_0x1720fa:0x17b,_0x389ad2:0x166,_0x4a2324:0x1cd,_0x574457:0x200,_0x504bc6:0x1e7,_0x58188d:0x20e,_0x47a037:0xc8,_0x30037d:0x103,_0x333093:0x98},_0x2aa609={_0x322f86:0x151,_0x1c10b3:0x1cb,_0x3ab55b:0xdb},_0x4d49ed={_0x11b9c6:0x19e};_0x361831[_0x3f3b70(-_0x57f0a6._0x14485e,-_0x57f0a6._0x8683ea,-_0x57f0a6._0x427b8d,-_0x57f0a6._0x598fbe)](_0x475d32(-_0x57f0a6._0x42f8df,-_0x57f0a6._0x4702a8,-_0x57f0a6._0x81e33a,-_0x57f0a6._0x269c8e)+_0x475d32(-_0x57f0a6._0x3abea2,-_0x57f0a6._0x35c5e0,-0xd2,-_0x57f0a6._0x188aa8)+_0x475d32(-_0x57f0a6._0xefcf92,-_0x57f0a6._0x467bf3,-_0x57f0a6._0x7e11ec,-_0x57f0a6._0x51a113)+_0x3f3b70(-_0x57f0a6._0x4c644f,-_0x57f0a6._0x2f9fe3,-_0x57f0a6._0x4b84af,-_0x57f0a6._0x3f1ae0),handleRunV3Migration),_0x361831['add'](_0x475d32(-_0x57f0a6._0x46f4c8,-_0x57f0a6._0x4dcace,-_0x57f0a6._0x335e48,-_0x57f0a6._0x3070bf)+_0x3f3b70(-_0x57f0a6._0x3fc32f,-_0x57f0a6._0x4020b5,-_0x57f0a6._0xb0ea35,-_0x57f0a6._0x5ad1ca)+_0x3f3b70(-0x1c3,-_0x57f0a6._0x402470,-0x1a4,-_0x57f0a6._0x486380)+'ty',handleUpdateIdentity),_0x361831['add'](_0x475d32(-_0x57f0a6._0x5d7a84,-0xa9,-_0x57f0a6._0x467bf3,-_0x57f0a6._0xf4e04)+_0x475d32(-_0x57f0a6._0x170a34,-0x90,-_0x57f0a6._0x5776d8,-0x8c)+'ate-settin'+'gs',handleUpdateSettings),_0x361831['add'](_0x3f3b70(-0x194,-_0x57f0a6._0x11265b,-_0x57f0a6._0x3c4010,-0x19e)+_0x3f3b70(-_0x57f0a6._0x2dead2,-0x1aa,-_0x57f0a6._0x26294f,-_0x57f0a6._0x2ad100)+_0x3f3b70(-0x1bf,-_0x57f0a6._0x423361,-0x1bf,-_0x57f0a6._0x757957),handleAddRoom),_0x361831['add']('@keet-priv'+_0x3f3b70(-_0x57f0a6._0x26f22e,-_0x57f0a6._0x2bf66b,-_0x57f0a6._0x509e0f,-_0x57f0a6._0x1b8a86)+_0x475d32(-0x9c,-0xc7,-_0x57f0a6._0x22e7f6,-_0x57f0a6._0x4c59b9),handleRemoveRoom),_0x361831[_0x475d32(-_0x57f0a6._0x2a7be,-_0x57f0a6._0x4d0f9e,-_0x57f0a6._0x4b226f,-_0x57f0a6._0x2ed86c)]('@keet-priv'+_0x475d32(-0xa2,-_0x57f0a6._0x1d8e5d,-_0x57f0a6._0x56fdc7,-_0x57f0a6._0x5de814)+_0x475d32(-_0x57f0a6._0x246d89,-_0x57f0a6._0x347d8a,-_0x57f0a6._0x551c27,-_0x57f0a6._0x4bc7cb)+'tatus',handleUpdateRoomStatus),_0x361831['add'](_0x475d32(-_0x57f0a6._0x1a2792,-_0x57f0a6._0x1f9e1b,-_0x57f0a6._0x3fbb94,-0x80)+_0x3f3b70(-_0x57f0a6._0x483767,-_0x57f0a6._0x90e45f,-0x17d,-0x175)+_0x475d32(-_0x57f0a6._0x5630be,-_0x57f0a6._0x3d90de,-_0x57f0a6._0x5dbd77,-_0x57f0a6._0x5af1d7)+_0x475d32(-_0x57f0a6._0x589dbe,-_0x57f0a6._0x427a85,-_0x57f0a6._0x420d1a,-_0x57f0a6._0xb1258f),handleAddPendingInvitation),_0x361831[_0x475d32(-_0x57f0a6._0x3b0040,-_0x57f0a6._0x35516c,-_0x57f0a6._0x3dd17e,-_0x57f0a6._0x207dc9)](_0x475d32(-0x85,-_0x57f0a6._0x4dcace,-0x80,-_0x57f0a6._0x273659)+_0x475d32(-_0x57f0a6._0x1bee23,-_0x57f0a6._0x2db899,-0xdb,-0x106)+_0x3f3b70(-_0x57f0a6._0x2cf2d2,-0x1f9,-_0x57f0a6._0x3f99ab,-_0x57f0a6._0x2d06cf)+_0x475d32(-_0x57f0a6._0x256e00,-_0x57f0a6._0x56b529,-_0x57f0a6._0x4c59b9,-_0x57f0a6._0x3521e2)+'on',handleRemovePendingInvitation),_0x361831[_0x3f3b70(-_0x57f0a6._0x598fbe,-_0x57f0a6._0x2e0d21,-0x17a,-0x1ce)]('@keet-priv'+'ate-id/res'+_0x475d32(-0xbd,-_0x57f0a6._0xeae454,-0xc6,-0x9b)+_0x3f3b70(-_0x57f0a6._0x2d8a65,-_0x57f0a6._0x481d83,-_0x57f0a6._0x3ced3a,-0x1e4)+_0x3f3b70(-_0x57f0a6._0x44057e,-_0x57f0a6._0x202684,-_0x57f0a6._0x262e7a,-_0x57f0a6._0x45fdbd),handleResolvePendingInvitation),_0x361831['add'](_0x3f3b70(-_0x57f0a6._0x3c19cb,-_0x57f0a6._0x11265b,-0x182,-_0x57f0a6._0x5ddaab)+_0x3f3b70(-_0x57f0a6._0xb0ea35,-_0x57f0a6._0x1d6a98,-_0x57f0a6._0xf0832,-_0x57f0a6._0x2f9fe3)+'-contact',handleAddContact);function _0x3f3b70(_0x4954c8,_0x5eeeec,_0x110413,_0x45f07e){return _0x2b46a3(_0x5eeeec- -0x26e,_0x5eeeec-_0x4d49ed._0x11b9c6,_0x110413-0x1de,_0x110413);}function _0x475d32(_0x24f707,_0xaab85f,_0x2063cb,_0x43aedf){return _0x2b46a3(_0x24f707- -_0x2aa609._0x322f86,_0xaab85f-_0x2aa609._0x1c10b3,_0x2063cb-_0x2aa609._0x3ab55b,_0x2063cb);}_0x361831['add'](_0x3f3b70(-_0x57f0a6._0xcc2357,-0x1a2,-0x169,-0x18f)+_0x475d32(-0xa2,-0xb2,-0xb2,-_0x57f0a6._0x32bc8b)+_0x475d32(-_0x57f0a6._0x2c8f34,-_0x57f0a6._0x5776d8,-0xad,-_0x57f0a6._0x3e877d)+_0x475d32(-0xca,-_0x57f0a6._0x34f359,-_0x57f0a6._0x49a0e4,-_0x57f0a6._0x3dd8e3),handleUpdateContactStatus),_0x361831[_0x3f3b70(-_0x57f0a6._0xf3825c,-_0x57f0a6._0x197109,-_0x57f0a6._0x39c5dc,-_0x57f0a6._0x1fbb7a)](_0x475d32(-0x85,-_0x57f0a6._0x4c3ebd,-0x80,-_0x57f0a6._0x3ac903)+'ate-id/rem'+_0x3f3b70(-_0x57f0a6._0x2d5b34,-_0x57f0a6._0x5efe7e,-0x1ec,-_0x57f0a6._0x402470)+'t',handleRemoveContact),_0x361831[_0x3f3b70(-_0x57f0a6._0x168ec2,-_0x57f0a6._0x8683ea,-_0x57f0a6._0x202684,-_0x57f0a6._0x423361)](_0x3f3b70(-_0x57f0a6._0x16105b,-_0x57f0a6._0x11265b,-_0x57f0a6._0x45fdbd,-_0x57f0a6._0x134b59)+_0x3f3b70(-0x1a4,-0x1aa,-0x1bf,-0x1a9)+_0x475d32(-_0x57f0a6._0x5dcdf3,-_0x57f0a6._0x56b529,-_0x57f0a6._0x155c94,-_0x57f0a6._0x2a7be)+_0x3f3b70(-_0x57f0a6._0x3f99ab,-_0x57f0a6._0x45fe5e,-_0x57f0a6._0x4e098e,-0x1c8),handleAddContactRequest),_0x361831['add'](_0x3f3b70(-0x195,-0x1a2,-0x18e,-0x168)+_0x475d32(-_0x57f0a6._0x4cbe96,-0xa3,-_0x57f0a6._0x470e7e,-_0x57f0a6._0x9a2915)+'ate-contac'+_0x3f3b70(-_0x57f0a6._0x4cb5f8,-_0x57f0a6._0x2036d5,-_0x57f0a6._0x8ebcbb,-_0x57f0a6._0x3ced3a)+'status',handleUpdateContactRequestStatus),_0x361831['add']('@keet-priv'+_0x475d32(-_0x57f0a6._0x4f617d,-_0x57f0a6._0x7e11ec,-_0x57f0a6._0x3e702a,-_0x57f0a6._0x5c5282)+'ivate-cont'+_0x3f3b70(-_0x57f0a6._0x22b1c0,-0x1ef,-_0x57f0a6._0x332353,-_0x57f0a6._0xc70a4c),handleActivateContactRoom),_0x361831[_0x3f3b70(-_0x57f0a6._0x373ffd,-_0x57f0a6._0x133985,-_0x57f0a6._0x256eb2,-0x180)](_0x475d32(-_0x57f0a6._0x42f8df,-_0x57f0a6._0x5dcdf3,-_0x57f0a6._0x3d52eb,-_0x57f0a6._0x4b7ca2)+_0x475d32(-0x8d,-0x8b,-_0x57f0a6._0x46fb40,-0xa6)+'-unreads-k'+'ey',handleAddUnreadsKey),_0x361831[_0x3f3b70(-_0x57f0a6._0x1720fa,-_0x57f0a6._0x2e0d21,-_0x57f0a6._0x389ad2,-_0x57f0a6._0x4a2324)](_0x475d32(-_0x57f0a6._0x46f4c8,-_0x57f0a6._0x470e7e,-0xac,-0xb4)+_0x3f3b70(-0x1d8,-_0x57f0a6._0x574457,-_0x57f0a6._0x504bc6,-_0x57f0a6._0x58188d)+_0x475d32(-_0x57f0a6._0x47a037,-_0x57f0a6._0x30037d,-_0x57f0a6._0x333093,-0xc3)+'s-key',handleRemoveUnreadsKey);}module[_0x1605cb(0x387,0x395,0x386,0x391)]={[REGISTER_ROUTES]:registerRoutes,'RoomStatus':RoomStatus,'ContactStatus':ContactStatus,'ContactRequestStatus':ContactRequestStatus};function getRoomStatusKeyName(_0x22c0d8){return ROOM_STATUS_INDEX_TO_KEY[_0x22c0d8-(0x14d5+-0x190e*0x1+0x2*0x21d)];}function isValidRoomStatusKey(_0x3ab1b7){const _0x3ed1bd={_0x29f501:0x198,_0xba37c:0x1d8,_0x1bca7d:0x1a1,_0x26e86d:0x1d0},_0x25a16f={_0x4e473e:0x17c,_0x415c6e:0x118,_0x3fe1ea:0x30};function _0x59e919(_0x532e1b,_0x27926d,_0x159cf9,_0x52244a){return _0x1605cb(_0x52244a- -_0x25a16f._0x4e473e,_0x27926d-_0x25a16f._0x415c6e,_0x159cf9-_0x25a16f._0x3fe1ea,_0x159cf9);}return _0x3ab1b7>=0x3b*-0x7f+-0x5*0x42d+0x1*0x3227&&_0x3ab1b7<=ROOM_STATUS_INDEX_TO_KEY[_0x59e919(_0x3ed1bd._0x29f501,_0x3ed1bd._0xba37c,_0x3ed1bd._0x1bca7d,_0x3ed1bd._0x26e86d)];}function getContactStatusKeyName(_0x14c92d){return CONTACT_STATUS_INDEX_TO_KEY[_0x14c92d-(-0x89f*0x3+-0x1478+0x2e56)];}function isValidContactStatusKey(_0x3071f9){return _0x3071f9>=-0x71*-0xd+0xc6d+-0x1229&&_0x3071f9<=CONTACT_STATUS_INDEX_TO_KEY['length'];}function getContactRequestStatusKeyName(_0x42386d){return CONTACT_REQUEST_STATUS_INDEX_TO_KEY[_0x42386d-(-0x62d+0x8*0xe9+-0x3*0x5e)];}function isValidContactRequestStatusKey(_0x13a7c1){const _0x112e7f={_0x1bc255:0x1aa,_0x39d9de:0x1ad},_0x8a8aa3={_0xe4c02e:0x4f6,_0x11cf85:0x12a};function _0xeeff11(_0x3fe547,_0x4a3f84,_0x26dc03,_0x4bbf89){return _0x1605cb(_0x3fe547- -_0x8a8aa3._0xe4c02e,_0x4a3f84-0x19,_0x26dc03-_0x8a8aa3._0x11cf85,_0x4a3f84);}return _0x13a7c1>=-0x86a+-0x1cb7+0x2522&&_0x13a7c1<=CONTACT_REQUEST_STATUS_INDEX_TO_KEY[_0xeeff11(-_0x112e7f._0x1bc255,-0x1cf,-0x1cb,-_0x112e7f._0x39d9de)];}