OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-deps / @holepunchto / keet-store / store / chat / search / chat-search.selector.js

1 lines · javascript ref:
(function(_0x389031,_0x1ca53e){const _0x592750={_0x3acb00:0x5b,_0x15057b:0x53,_0x46dcba:0x15,_0x530e7e:0x4e,_0x4f7930:0x51,_0x349de0:0x5d,_0xafecd2:0x54,_0x1fa60f:0x5d,_0x38f9aa:0x6a,_0x3e58bf:0x19,_0x5eed92:0xe,_0xc6e282:0x12,_0xe22d80:0x72,_0x458ae1:0x6e,_0x19e53e:0x61,_0x326113:0x17,_0x50b229:0x15,_0x2660d0:0x1b,_0x4892c1:0x22,_0x4b70e8:0x59,_0x514e04:0x5c,_0x57598b:0x57,_0x26a30e:0x53,_0xee78bd:0x50,_0x15cc5b:0x4b},_0x2012cc={_0x58e44b:0x19a},_0x21a337=_0x389031();function _0x46fc98(_0x17a341,_0x5043ac,_0x51bdd3,_0x1621f3){return _0x21c7(_0x5043ac- -0x127,_0x17a341);}function _0x2fdbe1(_0x47cc45,_0x5e5fa6,_0x34ffcc,_0x153958){return _0x21c7(_0x153958- -_0x2012cc._0x58e44b,_0x5e5fa6);}while(!![]){try{const _0x5b3609=-parseInt(_0x46fc98(0x55,_0x592750._0x3acb00,0x5e,_0x592750._0x15057b))/(-0x2ae*-0x5+0x4dd*-0x4+0x60f)+parseInt(_0x2fdbe1(-_0x592750._0x46dcba,-0x14,-0x12,-0xf))/(-0xc18+0x6a*-0x1a+-0x16de*-0x1)+-parseInt(_0x46fc98(_0x592750._0x530e7e,_0x592750._0x4f7930,_0x592750._0x349de0,_0x592750._0xafecd2))/(-0x1065+0x41*-0x2e+0x1c16)*(parseInt(_0x46fc98(_0x592750._0x1fa60f,0x67,0x61,_0x592750._0x38f9aa))/(-0x86*-0x46+-0x1a49+-0xa57))+parseInt(_0x2fdbe1(-_0x592750._0x3e58bf,-0x1d,-_0x592750._0x5eed92,-_0x592750._0xc6e282))/(-0x16ca+0x205*0xb+-0x1*-0x98)*(-parseInt(_0x46fc98(_0x592750._0xe22d80,0x66,_0x592750._0x458ae1,_0x592750._0x19e53e))/(-0x150a+-0x1*0x230+-0xf8*-0x18))+-parseInt(_0x2fdbe1(-_0x592750._0x326113,-_0x592750._0x50b229,-_0x592750._0x2660d0,-0x15))/(0x12cf+-0x694*0x3+-0x4*-0x3d)+parseInt(_0x2fdbe1(-0x1f,-_0x592750._0x4892c1,-0xe,-0x19))/(0x26*0x97+0x19f*0xc+-0x29d6)+-parseInt(_0x46fc98(_0x592750._0x4b70e8,_0x592750._0x514e04,_0x592750._0x57598b,_0x592750._0x1fa60f))/(-0x8*-0x7c+0x2122+-0x24f9)*(-parseInt(_0x46fc98(0x4f,_0x592750._0x26a30e,_0x592750._0xee78bd,_0x592750._0x15cc5b))/(0x2*0x210+-0xc54+0x2*0x41f));if(_0x5b3609===_0x1ca53e)break;else _0x21a337['push'](_0x21a337['shift']());}catch(_0x3d0ca1){_0x21a337['push'](_0x21a337['shift']());}}}(_0xbf64,-0x340e7*0x1+-0x1d*-0x1b6d+-0x1*-0x2320a));const _0xf13766=(function(){const _0x2cffa0={_0x2fa9fb:0xb9,_0x464243:0xad,_0x5bfcda:0xa1};let _0x3a30e9=!![];return function(_0xb7487e,_0x357c50){const _0x15261b=_0x3a30e9?function(){const _0x20002b={_0x318ebd:0xdc};function _0x400503(_0x1e7e35,_0x2081f3,_0x34f0bc,_0x3e6696){return _0x21c7(_0x34f0bc- -_0x20002b._0x318ebd,_0x1e7e35);}if(_0x357c50){const _0x135c9a=_0x357c50[_0x400503(_0x2cffa0._0x2fa9fb,0xa2,_0x2cffa0._0x464243,_0x2cffa0._0x5bfcda)](_0xb7487e,arguments);return _0x357c50=null,_0x135c9a;}}:function(){};return _0x3a30e9=![],_0x15261b;};}()),_0x511b60=_0xf13766(this,function(){const _0x10c735={_0x25565f:0x349,_0x5e7d4c:0x346,_0x2b6b48:0x34b,_0x2ef8df:0x442,_0x765fb7:0x430,_0x40c857:0x436,_0x47fc8d:0x448,_0x48cf46:0x43a,_0x1e3dae:0x446,_0x37b32f:0x439,_0x3d0660:0x43d,_0x69c5fc:0x354,_0x38832c:0x347,_0x281ee5:0x34c},_0x1b8d5e={_0x27e6e2:0x1c5},_0x274698={_0x79b50b:0x2bc};function _0x269321(_0x6adbbd,_0x30ca04,_0x53b690,_0x3b5fdd){return _0x21c7(_0x53b690-_0x274698._0x79b50b,_0x6adbbd);}function _0xd6acc2(_0x2dab76,_0x1e42d4,_0x32cd29,_0x458fe7){return _0x21c7(_0x458fe7-_0x1b8d5e._0x27e6e2,_0x1e42d4);}return _0x511b60['toString']()[_0xd6acc2(0x353,_0x10c735._0x25565f,_0x10c735._0x5e7d4c,_0x10c735._0x2b6b48)](_0x269321(_0x10c735._0x2ef8df,_0x10c735._0x765fb7,0x43a,_0x10c735._0x40c857)+'+$')[_0x269321(_0x10c735._0x47fc8d,_0x10c735._0x48cf46,_0x10c735._0x1e3dae,0x441)]()[_0x269321(_0x10c735._0x40c857,0x43c,_0x10c735._0x37b32f,_0x10c735._0x3d0660)+'r'](_0x511b60)[_0xd6acc2(_0x10c735._0x69c5fc,_0x10c735._0x38832c,_0x10c735._0x281ee5,_0x10c735._0x2b6b48)]('(((.+)+)+)'+'+$');});_0x511b60();import{createSelector}from'@reduxjs/toolkit';function _0x1509c3(_0x9b1dd6,_0x51e92a,_0x598867,_0x12da9e){const _0x4b6f61={_0x4f6b53:0x1b2};return _0x21c7(_0x598867-_0x4b6f61._0x4f6b53,_0x51e92a);}import{CHAT_STATE_KEY}from'../chat.constant';import{CHAT_SEARCH_STATE_KEY}from'./chat-search.constant';function _0xbf64(){const _0xb4536f=['length','310cExMPA','activeInde','map','constructo','(((.+)+)+)','chat','ids','397008KQBpwU','84813IWeslB','181809npQXgU','searchTerm','1365644uiNfOq','search','mode','35XubYHy','apply','toString','135918guOTfY','byId','187926SIvrXn','40144TrqClW','dataStatus','33UEjjTK'];_0xbf64=function(){return _0xb4536f;};return _0xbf64();}function _0x3d8836(_0x1a4ebe,_0x41234c,_0x21bc5f,_0x3f265f){return _0x21c7(_0x41234c- -0x53,_0x1a4ebe);}import{isChatSearching,isChatSearchLoading,isSearchTermsLimited}from'./chat-search.model';export const getChatSearchState=_0x5578ac=>_0x5578ac[CHAT_STATE_KEY][CHAT_SEARCH_STATE_KEY];export const getChatSearchTerms=_0x484240=>getChatSearchState(_0x484240)[_0x1509c3(0x338,0x339,0x336,0x33c)+'s'];export const getChatSearchTermsEmpty=_0x3283fa=>!getChatSearchState(_0x3283fa)['searchTerm'+'s'][_0x3d8836(0x125,0x126,0x124,0x132)];export const getChatSearchTermsLimited=_0x2b7b40=>{const _0x1c5994={_0x270ebe:0x57,_0x1e5a18:0x54},_0x39225d={_0x59da05:0x378,_0x51de1f:0xb1},_0x5b531a=getChatSearchTerms(_0x2b7b40);function _0x55411b(_0x22600a,_0x5c9c7b,_0x3b3db4,_0x4fbdfd){return _0x1509c3(_0x22600a-0x1ee,_0x5c9c7b,_0x22600a- -_0x39225d._0x59da05,_0x4fbdfd-_0x39225d._0x51de1f);}return _0x5b531a[_0x55411b(-0x4d,-_0x1c5994._0x270ebe,-_0x1c5994._0x270ebe,-_0x1c5994._0x1e5a18)]&&isSearchTermsLimited(_0x5b531a);};export const getChatSearchInputEmpty=_0x46cc01=>{const _0x5f065a=getChatSearchTerms(_0x46cc01);return!_0x5f065a['length']||isSearchTermsLimited(_0x5f065a);};export const getChatSearchMode=_0x960d3e=>getChatSearchState(_0x960d3e)[_0x3d8836(0x12f,0x134,0x137,0x131)];export const getChatSearchDataStatus=_0x5722c4=>getChatSearchState(_0x5722c4)[_0x1509c3(0x325,0x329,0x329,0x331)];export const getChatSearchLive=_0x33d6a3=>isChatSearching(getChatSearchMode(_0x33d6a3));export const getChatSearchLoading=_0x502843=>isChatSearchLoading(getChatSearchDataStatus(_0x502843));function _0x21c7(_0x21c72a,_0x59233a){const _0x362eed=_0xbf64();return _0x21c7=function(_0x4e0c68,_0x228dd2){_0x4e0c68=_0x4e0c68-(0x91*0xc+-0x164a+0x10f5);let _0x5c4565=_0x362eed[_0x4e0c68];return _0x5c4565;},_0x21c7(_0x21c72a,_0x59233a);}export const getChatSearchMessageIds=_0x135d55=>getChatSearchState(_0x135d55)[_0x3d8836(0x121,0x12d,0x127,0x127)];export const getChatSearchActiveIndex=_0x5f1ae0=>getChatSearchState(_0x5f1ae0)[_0x1509c3(0x339,0x32e,0x32d,0x332)+'x'];export const getChatSearchActiveId=createSelector([getChatSearchActiveIndex,getChatSearchMessageIds],(_0x3f80dc,_0x4ae750)=>_0x4ae750[_0x3f80dc]);export const getChatSearchResultsEmpty=_0x11dcfc=>!getChatSearchInputEmpty(_0x11dcfc)&&!getChatSearchLoading(_0x11dcfc)&&!getChatSearchMessageIds(_0x11dcfc)[_0x1509c3(0x330,0x320,0x32b,0x329)];export const getChatSearchResultsCount=_0x265c7b=>getChatSearchMessageIds(_0x265c7b)[_0x1509c3(0x325,0x330,0x32b,0x326)];export const getChatSearchResultsEmptyCount=_0xe2b3fe=>!getChatSearchMessageIds(_0xe2b3fe)[_0x1509c3(0x32a,0x330,0x32b,0x326)];export const getChatSearchMessageById=(_0x3a0084,_0x417cfc)=>getChatSearchState(_0x3a0084)['byId'][_0x417cfc];export const getChatSearchMessageAllById=_0xba36f3=>getChatSearchState(_0xba36f3)[_0x3d8836(0x13c,0x139,0x13b,0x12d)];export const getChatSearchMessages=createSelector([getChatSearchMessageIds,getChatSearchMessageAllById],(_0x5ba1d9,_0x3c68a6)=>_0x5ba1d9[_0x3d8836(0x12a,0x129,0x135,0x125)](_0x56ff7b=>_0x3c68a6[_0x56ff7b]));export const getChatSearchSegmentsById=_0x122052=>_0x4256b3=>{const _0x5cc26d={_0x34292b:0x323,_0x11e6cd:0x323,_0x1ae53b:0x325,_0x4505c0:0x320,_0x3f2ede:0x477,_0x5c9714:0x47f,_0x21cf3e:0x47e},_0x4248d3={_0x11d5f5:0x191},_0x5ece3c={_0x22b85a:0x187,_0x62af22:0x14d};function _0x249dd6(_0x50a2b8,_0x1d37b9,_0x4e148b,_0x1334bd){return _0x1509c3(_0x50a2b8-_0x5ece3c._0x22b85a,_0x50a2b8,_0x4e148b-_0x5ece3c._0x62af22,_0x1334bd-0x16c);}if(!getChatSearchLive(_0x4256b3))return undefined;function _0x1748b2(_0x471d66,_0x41047b,_0x1f8b49,_0x4dc096){return _0x1509c3(_0x471d66-0x195,_0x4dc096,_0x471d66- -0x1b,_0x4dc096-_0x4248d3._0x11d5f5);}return getChatSearchState(_0x4256b3)[_0x1748b2(_0x5cc26d._0x34292b,_0x5cc26d._0x11e6cd,_0x5cc26d._0x1ae53b,_0x5cc26d._0x4505c0)][_0x122052]?.[_0x249dd6(_0x5cc26d._0x3f2ede,_0x5cc26d._0x5c9714,_0x5cc26d._0x21cf3e,0x488)]?.['segments'];};