Built motion from commit a9fb64cc6defd8fb3a5cc199221f878e91c0e969. Version 3.0.0...
[motion-next.git] / server / services / agi / graph / index.js
index 9e68424..fa933ae 100644 (file)
@@ -1 +1 @@
-const a1027_0x33d9=['numberOfEdges','getdigits','default','info','stop\x20traverse','addEdge','getVertex','../../../config/logger','getsecretdigits','edges','no\x20edge/s\x20available','agi','includes','vertices','size','condition','prototype','addVertex','lodash','traverseBFS','vswitch','split','length','condition\x20not\x20found','agicommand','menu','target','invalid'];(function(_0x21afe8,_0x33d9c0){const _0x48a923=function(_0x3802f3){while(--_0x3802f3){_0x21afe8['push'](_0x21afe8['shift']());}};_0x48a923(++_0x33d9c0);}(a1027_0x33d9,0x114));const a1027_0x48a9=function(_0x21afe8,_0x33d9c0){_0x21afe8=_0x21afe8-0x0;let _0x48a923=a1027_0x33d9[_0x21afe8];return _0x48a923;};const _0x39aefd=a1027_0x48a9;'use strict';const _=require(_0x39aefd('0x16')),logger=require(_0x39aefd('0xb'))(_0x39aefd('0xf')),verticesWithRetry=[_0x39aefd('0x1'),_0x39aefd('0x5'),_0x39aefd('0xc')],Graph=function(){const _0xc9f21c=_0x39aefd;this[_0xc9f21c('0x11')]={},this['edges']={},this[_0xc9f21c('0x4')]=0x0;};Graph[_0x39aefd('0x14')][_0x39aefd('0x15')]=function(_0x3802f3){const _0x49b212=_0x39aefd;this[_0x49b212('0x11')][_0x3802f3['id']]=_0x3802f3,this[_0x49b212('0xd')][_0x3802f3['id']]=[];},Graph['prototype'][_0x39aefd('0x9')]=function(_0x319220,_0x1f48d0,_0x352982){const _0x29e10d=_0x39aefd;this[_0x29e10d('0xd')][_0x319220]['push']({'target':_0x1f48d0,'condition':_0x352982}),this[_0x29e10d('0x4')]+=0x1;},Graph[_0x39aefd('0x14')][_0x39aefd('0x12')]=function(){const _0x195f7c=_0x39aefd;return _[_0x195f7c('0x12')](this['vertices']);},Graph[_0x39aefd('0x14')]['relations']=function(){return this['numberOfEdges'];},Graph[_0x39aefd('0x14')][_0x39aefd('0xa')]=function(_0x2e89c3){const _0x142701=_0x39aefd;return this[_0x142701('0x11')][_0x2e89c3];},Graph['prototype'][_0x39aefd('0x17')]=function(_0x461641,_0xec8fdf){const _0xc1d655=_0x39aefd;if(!this['vertices'][_0x461641])return logger['info']('no\x20vertex\x20found');const _0x5cc277=_0xec8fdf(this[_0xc1d655('0x11')][_0x461641]);if(!_0x5cc277)return logger[_0xc1d655('0x7')](_0xc1d655('0x8'));if(this['edges'][_0x461641][_0xc1d655('0x1a')]===0x0)return logger['info'](_0xc1d655('0xe'));const _0xd13e62=![],_0x1d1430=[];for(let _0x5b7d77=0x0,_0x19367d=[],_0x4ed436=![];_0x5b7d77<this[_0xc1d655('0xd')][_0x461641][_0xc1d655('0x1a')];_0x5b7d77+=0x1){if(this[_0xc1d655('0xd')][_0x461641][_0x5b7d77]['condition']){_0x19367d=this[_0xc1d655('0xd')][_0x461641][_0x5b7d77][_0xc1d655('0x13')][_0xc1d655('0x19')](',');for(let _0xad686b=0x0;_0xad686b<_0x19367d['length'];_0xad686b+=0x1){if(this[_0xc1d655('0x11')][_0x461641]['agicommand']===_0xc1d655('0x18')&&_0x19367d[_0xad686b]==='-')_0x4ed436=this[_0xc1d655('0xd')][_0x461641][_0x5b7d77][_0xc1d655('0x2')],logger[_0xc1d655('0x7')](_0xc1d655('0x6'),_0x4ed436,_0x19367d[_0xad686b],this[_0xc1d655('0xd')][_0x461641][_0x5b7d77][_0xc1d655('0x2')]);else this[_0xc1d655('0x11')][_0x461641]['agicommand']===_0xc1d655('0x1')&&_0x19367d[_0xad686b]==='i'&&(_0x4ed436=this[_0xc1d655('0xd')][_0x461641][_0x5b7d77][_0xc1d655('0x2')],logger[_0xc1d655('0x7')](_0xc1d655('0x3'),_0x4ed436,_0x19367d[_0xad686b],this['edges'][_0x461641][_0x5b7d77][_0xc1d655('0x2')]));if(_0x19367d[_0xad686b]===_0x5cc277)return this[_0xc1d655('0x17')](this['edges'][_0x461641][_0x5b7d77][_0xc1d655('0x2')],_0xec8fdf);}}else return this['traverseBFS'](this[_0xc1d655('0xd')][_0x461641][_0x5b7d77]['target'],_0xec8fdf);}if(_0x1d1430[_0xc1d655('0x1a')]){if(this[_0xc1d655('0x11')][_0x461641][_0xc1d655('0x0')]===_0xc1d655('0x18')){if(_0xd13e62)return this[_0xc1d655('0x17')](_0xd13e62,_0xec8fdf);return logger[_0xc1d655('0x7')]('default\x20on\x20switch\x20not\x20found');}else{if(_[_0xc1d655('0x10')](verticesWithRetry,this[_0xc1d655('0x11')][_0x461641][_0xc1d655('0x0')])){if(_0x5cc277==='-')return logger[_0xc1d655('0x7')]('max\x20retry\x20reach');if(_0xd13e62&&_0x5cc277!=='t')return this[_0xc1d655('0x17')](_0xd13e62,_0xec8fdf);return this[_0xc1d655('0x17')](_0x461641,_0xec8fdf);}}return logger[_0xc1d655('0x7')](_0xc1d655('0x1b'));}},module['exports']=Graph;
\ No newline at end of file
+const a1027_0x2652=['lodash','edges','includes','length','traverseBFS','numberOfEdges','agicommand','agi','max\x20retry\x20reach','push','invalid','vertices','condition','info','relations','addVertex','../../../config/logger','size','target','default','no\x20vertex\x20found','vswitch','prototype','getsecretdigits','getVertex'];(function(_0x5c90d8,_0x26525d){const _0x4ed6ba=function(_0xa4b2c6){while(--_0xa4b2c6){_0x5c90d8['push'](_0x5c90d8['shift']());}};_0x4ed6ba(++_0x26525d);}(a1027_0x2652,0xb2));const a1027_0x4ed6=function(_0x5c90d8,_0x26525d){_0x5c90d8=_0x5c90d8-0x0;let _0x4ed6ba=a1027_0x2652[_0x5c90d8];return _0x4ed6ba;};const _0x4fd627=a1027_0x4ed6;'use strict';const _=require(_0x4fd627('0x16')),logger=require(_0x4fd627('0xd'))(_0x4fd627('0x4')),verticesWithRetry=['menu','getdigits',_0x4fd627('0x14')],Graph=function(){const _0xe1f86e=_0x4fd627;this['vertices']={},this[_0xe1f86e('0x17')]={},this[_0xe1f86e('0x2')]=0x0;};Graph[_0x4fd627('0x13')][_0x4fd627('0xc')]=function(_0xa4b2c6){const _0x1c6f41=_0x4fd627;this[_0x1c6f41('0x8')][_0xa4b2c6['id']]=_0xa4b2c6,this[_0x1c6f41('0x17')][_0xa4b2c6['id']]=[];},Graph[_0x4fd627('0x13')]['addEdge']=function(_0x272e45,_0x33a3d2,_0x20fd44){const _0x2be8da=_0x4fd627;this[_0x2be8da('0x17')][_0x272e45][_0x2be8da('0x6')]({'target':_0x33a3d2,'condition':_0x20fd44}),this[_0x2be8da('0x2')]+=0x1;},Graph['prototype'][_0x4fd627('0xe')]=function(){return _['size'](this['vertices']);},Graph[_0x4fd627('0x13')][_0x4fd627('0xb')]=function(){const _0x2537e0=_0x4fd627;return this[_0x2537e0('0x2')];},Graph[_0x4fd627('0x13')][_0x4fd627('0x15')]=function(_0x225f07){return this['vertices'][_0x225f07];},Graph[_0x4fd627('0x13')][_0x4fd627('0x1')]=function(_0x443392,_0x4fabf4){const _0x20056d=_0x4fd627;if(!this[_0x20056d('0x8')][_0x443392])return logger[_0x20056d('0xa')](_0x20056d('0x11'));const _0x4c9df7=_0x4fabf4(this[_0x20056d('0x8')][_0x443392]);if(!_0x4c9df7)return logger['info']('stop\x20traverse');if(this[_0x20056d('0x17')][_0x443392]['length']===0x0)return logger[_0x20056d('0xa')]('no\x20edge/s\x20available');const _0x797e1d=![],_0xccffdb=[];for(let _0x48e545=0x0,_0x59e13b=[],_0x728be4=![];_0x48e545<this['edges'][_0x443392][_0x20056d('0x0')];_0x48e545+=0x1){if(this['edges'][_0x443392][_0x48e545][_0x20056d('0x9')]){_0x59e13b=this[_0x20056d('0x17')][_0x443392][_0x48e545]['condition']['split'](',');for(let _0x52e8af=0x0;_0x52e8af<_0x59e13b[_0x20056d('0x0')];_0x52e8af+=0x1){if(this['vertices'][_0x443392]['agicommand']===_0x20056d('0x12')&&_0x59e13b[_0x52e8af]==='-')_0x728be4=this['edges'][_0x443392][_0x48e545]['target'],logger['info'](_0x20056d('0x10'),_0x728be4,_0x59e13b[_0x52e8af],this[_0x20056d('0x17')][_0x443392][_0x48e545]['target']);else this[_0x20056d('0x8')][_0x443392]['agicommand']==='menu'&&_0x59e13b[_0x52e8af]==='i'&&(_0x728be4=this[_0x20056d('0x17')][_0x443392][_0x48e545][_0x20056d('0xf')],logger[_0x20056d('0xa')](_0x20056d('0x7'),_0x728be4,_0x59e13b[_0x52e8af],this['edges'][_0x443392][_0x48e545]['target']));if(_0x59e13b[_0x52e8af]===_0x4c9df7)return this[_0x20056d('0x1')](this[_0x20056d('0x17')][_0x443392][_0x48e545][_0x20056d('0xf')],_0x4fabf4);}}else return this[_0x20056d('0x1')](this['edges'][_0x443392][_0x48e545]['target'],_0x4fabf4);}if(_0xccffdb[_0x20056d('0x0')]){if(this[_0x20056d('0x8')][_0x443392][_0x20056d('0x3')]===_0x20056d('0x12')){if(_0x797e1d)return this[_0x20056d('0x1')](_0x797e1d,_0x4fabf4);return logger[_0x20056d('0xa')]('default\x20on\x20switch\x20not\x20found');}else{if(_[_0x20056d('0x18')](verticesWithRetry,this[_0x20056d('0x8')][_0x443392][_0x20056d('0x3')])){if(_0x4c9df7==='-')return logger[_0x20056d('0xa')](_0x20056d('0x5'));if(_0x797e1d&&_0x4c9df7!=='t')return this[_0x20056d('0x1')](_0x797e1d,_0x4fabf4);return this['traverseBFS'](_0x443392,_0x4fabf4);}}return logger[_0x20056d('0xa')]('condition\x20not\x20found');}},module['exports']=Graph;
\ No newline at end of file