Built motion from commit f651e4b0a7312c0adceb5e57d6684a801a3aaf0d. Version 3.0.0...
[motion-next.git] / server / services / agi / graph / index.js
index 8107090..ea6eb8c 100644 (file)
@@ -1 +1 @@
-const a1028_0x268d=['no\x20edge/s\x20available','edges','default\x20on\x20switch\x20not\x20found','agi','condition\x20not\x20found','condition','vswitch','split','addEdge','size','info','getVertex','../../../config/logger','vertices','numberOfEdges','target','agicommand','length','relations','traverseBFS','max\x20retry\x20reach','invalid','addVertex','prototype','menu','no\x20vertex\x20found','stop\x20traverse'];(function(_0x311b83,_0x268d17){const _0x1f769f=function(_0x47b961){while(--_0x47b961){_0x311b83['push'](_0x311b83['shift']());}};_0x1f769f(++_0x268d17);}(a1028_0x268d,0x15e));const a1028_0x1f76=function(_0x311b83,_0x268d17){_0x311b83=_0x311b83-0x0;let _0x1f769f=a1028_0x268d[_0x311b83];return _0x1f769f;};const _0x528f69=a1028_0x1f76;'use strict';const _=require('lodash'),logger=require(_0x528f69('0xd'))(_0x528f69('0x4')),verticesWithRetry=[_0x528f69('0x19'),'getdigits','getsecretdigits'],Graph=function(){const _0x55ec8f=_0x528f69;this[_0x55ec8f('0xe')]={},this[_0x55ec8f('0x2')]={},this['numberOfEdges']=0x0;};Graph['prototype'][_0x528f69('0x17')]=function(_0x47b961){const _0x49b753=_0x528f69;this['vertices'][_0x47b961['id']]=_0x47b961,this[_0x49b753('0x2')][_0x47b961['id']]=[];},Graph[_0x528f69('0x18')][_0x528f69('0x9')]=function(_0x897a1,_0x396d92,_0x5584cd){const _0x6a7403=_0x528f69;this[_0x6a7403('0x2')][_0x897a1]['push']({'target':_0x396d92,'condition':_0x5584cd}),this['numberOfEdges']+=0x1;},Graph[_0x528f69('0x18')][_0x528f69('0xa')]=function(){const _0x41cd2a=_0x528f69;return _[_0x41cd2a('0xa')](this[_0x41cd2a('0xe')]);},Graph[_0x528f69('0x18')][_0x528f69('0x13')]=function(){const _0xabb0fd=_0x528f69;return this[_0xabb0fd('0xf')];},Graph[_0x528f69('0x18')][_0x528f69('0xc')]=function(_0x3f0bdb){const _0x1d68ae=_0x528f69;return this[_0x1d68ae('0xe')][_0x3f0bdb];},Graph[_0x528f69('0x18')][_0x528f69('0x14')]=function(_0x88943,_0xe23aea){const _0x22cf0d=_0x528f69;if(!this[_0x22cf0d('0xe')][_0x88943])return logger[_0x22cf0d('0xb')](_0x22cf0d('0x1a'));const _0x3123a3=_0xe23aea(this[_0x22cf0d('0xe')][_0x88943]);if(!_0x3123a3)return logger['info'](_0x22cf0d('0x0'));if(this[_0x22cf0d('0x2')][_0x88943][_0x22cf0d('0x12')]===0x0)return logger[_0x22cf0d('0xb')](_0x22cf0d('0x1'));const _0x265930=![],_0x283160=[];for(let _0x24ff79=0x0,_0x5705a0=[],_0x271ce5=![];_0x24ff79<this[_0x22cf0d('0x2')][_0x88943][_0x22cf0d('0x12')];_0x24ff79+=0x1){if(this[_0x22cf0d('0x2')][_0x88943][_0x24ff79]['condition']){_0x5705a0=this[_0x22cf0d('0x2')][_0x88943][_0x24ff79][_0x22cf0d('0x6')][_0x22cf0d('0x8')](',');for(let _0x23c3ff=0x0;_0x23c3ff<_0x5705a0[_0x22cf0d('0x12')];_0x23c3ff+=0x1){if(this[_0x22cf0d('0xe')][_0x88943][_0x22cf0d('0x11')]===_0x22cf0d('0x7')&&_0x5705a0[_0x23c3ff]==='-')_0x271ce5=this['edges'][_0x88943][_0x24ff79][_0x22cf0d('0x10')],logger['info']('default',_0x271ce5,_0x5705a0[_0x23c3ff],this[_0x22cf0d('0x2')][_0x88943][_0x24ff79]['target']);else this['vertices'][_0x88943][_0x22cf0d('0x11')]===_0x22cf0d('0x19')&&_0x5705a0[_0x23c3ff]==='i'&&(_0x271ce5=this[_0x22cf0d('0x2')][_0x88943][_0x24ff79][_0x22cf0d('0x10')],logger[_0x22cf0d('0xb')](_0x22cf0d('0x16'),_0x271ce5,_0x5705a0[_0x23c3ff],this['edges'][_0x88943][_0x24ff79]['target']));if(_0x5705a0[_0x23c3ff]===_0x3123a3)return this[_0x22cf0d('0x14')](this['edges'][_0x88943][_0x24ff79]['target'],_0xe23aea);}}else return this[_0x22cf0d('0x14')](this['edges'][_0x88943][_0x24ff79]['target'],_0xe23aea);}if(_0x283160['length']){if(this[_0x22cf0d('0xe')][_0x88943][_0x22cf0d('0x11')]==='vswitch'){if(_0x265930)return this[_0x22cf0d('0x14')](_0x265930,_0xe23aea);return logger[_0x22cf0d('0xb')](_0x22cf0d('0x3'));}else{if(_['includes'](verticesWithRetry,this['vertices'][_0x88943][_0x22cf0d('0x11')])){if(_0x3123a3==='-')return logger[_0x22cf0d('0xb')](_0x22cf0d('0x15'));if(_0x265930&&_0x3123a3!=='t')return this[_0x22cf0d('0x14')](_0x265930,_0xe23aea);return this[_0x22cf0d('0x14')](_0x88943,_0xe23aea);}}return logger[_0x22cf0d('0xb')](_0x22cf0d('0x5'));}},module['exports']=Graph;
\ No newline at end of file
+const a1028_0x3706=['no\x20vertex\x20found','edges','includes','addEdge','exports','agi','no\x20edge/s\x20available','push','split','lodash','traverseBFS','getdigits','../../../config/logger','vertices','target','getsecretdigits','default','numberOfEdges','info','getVertex','condition\x20not\x20found','prototype','length','stop\x20traverse','vswitch','condition','size','agicommand','relations','menu'];(function(_0xec59b6,_0x370622){const _0x3f13bc=function(_0x1cc1ce){while(--_0x1cc1ce){_0xec59b6['push'](_0xec59b6['shift']());}};_0x3f13bc(++_0x370622);}(a1028_0x3706,0x120));const a1028_0x3f13=function(_0xec59b6,_0x370622){_0xec59b6=_0xec59b6-0x0;let _0x3f13bc=a1028_0x3706[_0xec59b6];return _0x3f13bc;};const _0x109e8f=a1028_0x3f13;'use strict';const _=require(_0x109e8f('0x15')),logger=require(_0x109e8f('0x18'))(_0x109e8f('0x11')),verticesWithRetry=['menu',_0x109e8f('0x17'),_0x109e8f('0x1b')],Graph=function(){const _0x298133=_0x109e8f;this['vertices']={},this[_0x298133('0xd')]={},this[_0x298133('0x1d')]=0x0;};Graph[_0x109e8f('0x3')]['addVertex']=function(_0x1cc1ce){const _0x5a811e=_0x109e8f;this[_0x5a811e('0x19')][_0x1cc1ce['id']]=_0x1cc1ce,this['edges'][_0x1cc1ce['id']]=[];},Graph[_0x109e8f('0x3')][_0x109e8f('0xf')]=function(_0x4ad3b1,_0x1af23a,_0x26512e){const _0x260a49=_0x109e8f;this['edges'][_0x4ad3b1][_0x260a49('0x13')]({'target':_0x1af23a,'condition':_0x26512e}),this['numberOfEdges']+=0x1;},Graph[_0x109e8f('0x3')][_0x109e8f('0x8')]=function(){const _0x2aed24=_0x109e8f;return _[_0x2aed24('0x8')](this[_0x2aed24('0x19')]);},Graph[_0x109e8f('0x3')][_0x109e8f('0xa')]=function(){const _0x3ce842=_0x109e8f;return this[_0x3ce842('0x1d')];},Graph[_0x109e8f('0x3')][_0x109e8f('0x1')]=function(_0x19be57){return this['vertices'][_0x19be57];},Graph[_0x109e8f('0x3')]['traverseBFS']=function(_0x52515c,_0xc6d308){const _0x152eb9=_0x109e8f;if(!this[_0x152eb9('0x19')][_0x52515c])return logger[_0x152eb9('0x0')](_0x152eb9('0xc'));const _0x5e2187=_0xc6d308(this[_0x152eb9('0x19')][_0x52515c]);if(!_0x5e2187)return logger[_0x152eb9('0x0')](_0x152eb9('0x5'));if(this[_0x152eb9('0xd')][_0x52515c][_0x152eb9('0x4')]===0x0)return logger[_0x152eb9('0x0')](_0x152eb9('0x12'));const _0x5c1768=![],_0x2cd7a7=[];for(let _0x380c24=0x0,_0x272d42=[],_0x422498=![];_0x380c24<this[_0x152eb9('0xd')][_0x52515c]['length'];_0x380c24+=0x1){if(this[_0x152eb9('0xd')][_0x52515c][_0x380c24]['condition']){_0x272d42=this[_0x152eb9('0xd')][_0x52515c][_0x380c24][_0x152eb9('0x7')][_0x152eb9('0x14')](',');for(let _0x24f1e2=0x0;_0x24f1e2<_0x272d42[_0x152eb9('0x4')];_0x24f1e2+=0x1){if(this[_0x152eb9('0x19')][_0x52515c][_0x152eb9('0x9')]===_0x152eb9('0x6')&&_0x272d42[_0x24f1e2]==='-')_0x422498=this[_0x152eb9('0xd')][_0x52515c][_0x380c24][_0x152eb9('0x1a')],logger[_0x152eb9('0x0')](_0x152eb9('0x1c'),_0x422498,_0x272d42[_0x24f1e2],this[_0x152eb9('0xd')][_0x52515c][_0x380c24][_0x152eb9('0x1a')]);else this[_0x152eb9('0x19')][_0x52515c][_0x152eb9('0x9')]===_0x152eb9('0xb')&&_0x272d42[_0x24f1e2]==='i'&&(_0x422498=this['edges'][_0x52515c][_0x380c24]['target'],logger['info']('invalid',_0x422498,_0x272d42[_0x24f1e2],this[_0x152eb9('0xd')][_0x52515c][_0x380c24][_0x152eb9('0x1a')]));if(_0x272d42[_0x24f1e2]===_0x5e2187)return this[_0x152eb9('0x16')](this[_0x152eb9('0xd')][_0x52515c][_0x380c24][_0x152eb9('0x1a')],_0xc6d308);}}else return this[_0x152eb9('0x16')](this['edges'][_0x52515c][_0x380c24][_0x152eb9('0x1a')],_0xc6d308);}if(_0x2cd7a7[_0x152eb9('0x4')]){if(this['vertices'][_0x52515c][_0x152eb9('0x9')]===_0x152eb9('0x6')){if(_0x5c1768)return this[_0x152eb9('0x16')](_0x5c1768,_0xc6d308);return logger['info']('default\x20on\x20switch\x20not\x20found');}else{if(_[_0x152eb9('0xe')](verticesWithRetry,this['vertices'][_0x52515c][_0x152eb9('0x9')])){if(_0x5e2187==='-')return logger['info']('max\x20retry\x20reach');if(_0x5c1768&&_0x5e2187!=='t')return this[_0x152eb9('0x16')](_0x5c1768,_0xc6d308);return this[_0x152eb9('0x16')](_0x52515c,_0xc6d308);}}return logger[_0x152eb9('0x0')](_0x152eb9('0x2'));}},module[_0x109e8f('0x10')]=Graph;
\ No newline at end of file