Built motion from commit c56b56e.|0.0.125
[motion.git] / server / config / ami / trunk.js
index 9625fc7..08f0eaa 100644 (file)
@@ -1 +1 @@
-var _0x1047=["\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x72\x75\x6E\x6B\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","","\x72\x65\x67\x69\x73\x74\x65\x72\x20\x3D\x3E\x20\x25\x73\x0A","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x63\x6C\x6F\x6E\x65","\x69\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x5B\x25\x73\x5D\x0A","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x6F\x74\x68\x65\x72\x46\x69\x65\x6C\x64\x73","\x25\x73\x0A","\x25\x73\x3D\x25\x73\x0A","\x72\x65\x67\x69\x73\x74\x72\x79","\x63\x61\x74\x63\x68","\x6D\x61\x70","\x66\x6F\x72\x45\x61\x63\x68","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x74\x72\x75\x6E\x6B\x73\x2E\x63\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x54\x72\x75\x6E\x6B\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x72\x65\x67\x69\x73\x74\x65\x72\x73\x2E\x63\x6F\x6E\x66","\x54\x72\x75\x6E\x6B\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];var TrunkModel=require(_0x1047[1])[_0x1047[0]];var fs=require(_0x1047[2]);var util=require(_0x1047[3]);var path=require(_0x1047[4]);var config=require(_0x1047[5]);var _=require(_0x1047[6]);function Trunk(_0xf255x8){console[_0x1047[8]](_0x1047[7]);TrunkModel[_0x1047[9]](function(_0xf255x9){trunksRewrite(_0xf255x9,_0xf255x8,false)});TrunkModel[_0x1047[10]](function(_0xf255x9){trunksRewrite(_0xf255x9,_0xf255x8,false)});TrunkModel[_0x1047[11]](function(_0xf255x9){trunksRewrite(_0xf255x9,_0xf255x8,true)})}function trunksRewrite(_0xf255x9,_0xf255x8,_0xf255xb){var _0xf255xc=_0x1047[12];var _0xf255xd=_0x1047[12];var _0xf255xe=_0x1047[13];if(!_0xf255xb){var _0xf255xf=_[_0x1047[15]](_0xf255x9[_0x1047[14]]);delete _0xf255xf[_0x1047[16]];delete _0xf255xf[_0x1047[17]];delete _0xf255xf[_0x1047[18]];_0xf255xc+=util[_0x1047[21]](_0x1047[19],_0xf255xf[_0x1047[20]]);if(_0xf255xf[_0x1047[22]]){_0xf255xc+=util[_0x1047[21]](_0x1047[23],_0xf255xf[_0x1047[22]]);delete _0xf255xf[_0x1047[22]]};for(var _0xf255x10 in _0xf255xf){if(_0xf255xf[_0xf255x10]){_0xf255xc+=util[_0x1047[21]](_0x1047[24],_0xf255x10,_0xf255xf[_0xf255x10])}};if(_0xf255xf[_0x1047[25]]){_0xf255xd+=util[_0x1047[21]](_0xf255xe,_0xf255xf[_0x1047[25]])}};TrunkModel[_0x1047[39]]({where:{id:{$ne:_0xf255x9[_0x1047[16]]}}})[_0x1047[38]](function(_0xf255x12){var _0xf255x13=_[_0x1047[27]](_0xf255x12,_0x1047[14]);_0xf255x13[_0x1047[28]](function(_0xf255x14){delete _0xf255x14[_0x1047[16]];delete _0xf255x14[_0x1047[17]];delete _0xf255x14[_0x1047[18]];_0xf255xc+=util[_0x1047[21]](_0x1047[19],_0xf255x14[_0x1047[20]]);if(_0xf255x14[_0x1047[22]]){_0xf255xc+=util[_0x1047[21]](_0x1047[23],_0xf255x14[_0x1047[22]]);delete _0xf255x14[_0x1047[22]]};for(var _0xf255x10 in _0xf255x14){if(_0xf255x14[_0xf255x10]){_0xf255xc+=util[_0x1047[21]](_0x1047[24],_0xf255x10,_0xf255x14[_0xf255x10])}};if(_0xf255x14[_0x1047[25]]){_0xf255xd+=util[_0x1047[21]](_0xf255xe,_0xf255x14[_0x1047[25]])}});fs[_0x1047[37]](path[_0x1047[31]](config[_0x1047[29]],_0x1047[30]),_0xf255xc,{flags:_0x1047[32],mode:parseInt(_0x1047[33],8)},function(_0xf255x11){if(_0xf255x11){throw _0xf255x11};console[_0x1047[8]](_0x1047[34]);fs[_0x1047[37]](path[_0x1047[31]](config[_0x1047[29]],_0x1047[35]),_0xf255xd,{flags:_0x1047[32],mode:parseInt(_0x1047[33],8)},function(_0xf255x11){if(_0xf255x11){throw _0xf255x11};reload(_0xf255x8);console[_0x1047[8]](_0x1047[36])})})})[_0x1047[26]](function(_0xf255x11){console[_0x1047[8]](_0xf255x11)})}function reload(_0xf255x8){_0xf255x8[_0x1047[42]]({Action:_0x1047[40]},function(_0xf255x11,_0xf255x16){if(_0xf255x11){console[_0x1047[41]](_0xf255x11)}else {console[_0x1047[8]](_0xf255x16)}})}module[_0x1047[43]]=Trunk
\ No newline at end of file
+var _0xa25a=["\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x72\x75\x6E\x6B\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x63\x74\x69\x76\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x73\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x54\x72\x75\x6E\x6B\x20\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A","\x63\x61\x74\x63\x68","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x64\x6F\x6D\x61\x69\x6E","","\x75\x70\x64\x61\x74\x65","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x54\x72\x75\x6E\x6B\x20\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A","\x2F","\x73\x70\x6C\x69\x74","\x70\x65\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72\x20\x3D\x3E\x20\x25\x73\x0A","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x63\x6C\x6F\x6E\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x5B\x25\x73\x5D\x0A","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x6F\x74\x68\x65\x72\x46\x69\x65\x6C\x64\x73","\x25\x73\x0A","\x3B","\x25\x73\x3D\x25\x73\x0A","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C\x6F\x77","\x72\x65\x67\x69\x73\x74\x72\x79","\x6D\x61\x70","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x74\x72\x75\x6E\x6B\x73\x2E\x63\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x54\x72\x75\x6E\x6B\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x72\x65\x67\x69\x73\x74\x65\x72\x73\x2E\x63\x6F\x6E\x66","\x54\x72\x75\x6E\x6B\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];var TrunkModel=require(_0xa25a[1])[_0xa25a[0]];var fs=require(_0xa25a[2]);var util=require(_0xa25a[3]);var path=require(_0xa25a[4]);var config=require(_0xa25a[5]);var _=require(_0xa25a[6]);function Trunk(_0xdaa1x8){console[_0xa25a[8]](_0xa25a[7]);TrunkModel[_0xa25a[10]](function(_0xdaa1x9){if(_0xdaa1x9[_0xa25a[9]]){trunksRewrite(_0xdaa1x9,_0xdaa1x8,false)}});TrunkModel[_0xa25a[15]](function(_0xdaa1x9){if(!_0xdaa1x9[_0xa25a[12]](_0xa25a[11])&& !_0xdaa1x9[_0xa25a[12]](_0xa25a[13])&& !_0xdaa1x9[_0xa25a[12]](_0xa25a[14])){trunksRewrite(_0xdaa1x9,_0xdaa1x8,false)}});TrunkModel[_0xa25a[16]](function(_0xdaa1x9){trunksRewrite(_0xdaa1x9,_0xdaa1x8,true)})}Trunk[_0xa25a[18]][_0xa25a[17]]= function(_0xdaa1xa){return TrunkModel[_0xa25a[24]]({status:_0xdaa1xa[_0xa25a[11]]},{where:{defaultuser:_0xdaa1xa[_0xa25a[21]],host:_0xdaa1xa[_0xa25a[22]],active:true,$and:[{registry:{$ne:_0xa25a[23]}},{registry:{$ne:null}}]},individualHooks:true})[_0xa25a[20]](function(_0xdaa1xb){console[_0xa25a[8]](_0xa25a[19],_0xdaa1xb)})};Trunk[_0xa25a[18]][_0xa25a[25]]= function(_0xdaa1xa){return TrunkModel[_0xa25a[24]]({peerstatus:_0xdaa1xa[_0xa25a[13]]},{where:{name:_0xdaa1xa[_0xa25a[29]][_0xa25a[28]](_0xa25a[27])[1]},individualHooks:true})[_0xa25a[20]](function(_0xdaa1xb){console[_0xa25a[8]](_0xa25a[26],_0xdaa1xb)})};function trunksRewrite(_0xdaa1x9,_0xdaa1x8,_0xdaa1xd){var _0xdaa1xe=_0xa25a[23];var _0xdaa1xf=_0xa25a[23];var _0xdaa1x10=_0xa25a[30];if(!_0xdaa1xd){var _0xdaa1x11=_[_0xa25a[32]](_0xdaa1x9[_0xa25a[31]]);delete _0xdaa1x11[_0xa25a[33]];delete _0xdaa1x11[_0xa25a[14]];delete _0xdaa1x11[_0xa25a[9]];delete _0xdaa1x11[_0xa25a[11]];_0xdaa1xe+= util[_0xa25a[36]](_0xa25a[34],_0xdaa1x11[_0xa25a[35]]);if(_0xdaa1x11[_0xa25a[37]]){_0xdaa1xe+= util[_0xa25a[36]](_0xa25a[38],_0xdaa1x11[_0xa25a[37]]);delete _0xdaa1x11[_0xa25a[37]]};for(var _0xdaa1x12 in _0xdaa1x11){if(_0xdaa1x11[_0xdaa1x12]){switch(_0xdaa1x12){case _0xa25a[42]:var _0xdaa1x13=_0xdaa1x11[_0xdaa1x12][_0xa25a[28]](_0xa25a[39]);_0xdaa1x13[_0xa25a[41]](function(_0xdaa1x14){_0xdaa1xe+= util[_0xa25a[36]](_0xa25a[40],_0xdaa1x12,_0xdaa1x14)});break;default:_0xdaa1xe+= util[_0xa25a[36]](_0xa25a[40],_0xdaa1x12,_0xdaa1x11[_0xdaa1x12])}}};if(_0xdaa1x11[_0xa25a[43]]){_0xdaa1xf+= util[_0xa25a[36]](_0xdaa1x10,_0xdaa1x11[_0xa25a[43]])}};return TrunkModel[_0xa25a[55]]({where:{name:{$ne:_0xdaa1x9[_0xa25a[35]]},active:true}})[_0xa25a[54]](function(_0xdaa1x15){var _0xdaa1x16=_[_0xa25a[44]](_0xdaa1x15,_0xa25a[31]);_0xdaa1x16[_0xa25a[41]](function(_0xdaa1x17){delete _0xdaa1x17[_0xa25a[33]];delete _0xdaa1x17[_0xa25a[14]];delete _0xdaa1x17[_0xa25a[9]];delete _0xdaa1x17[_0xa25a[11]];_0xdaa1xe+= util[_0xa25a[36]](_0xa25a[34],_0xdaa1x17[_0xa25a[35]]);if(_0xdaa1x17[_0xa25a[37]]){_0xdaa1xe+= util[_0xa25a[36]](_0xa25a[38],_0xdaa1x17[_0xa25a[37]]);delete _0xdaa1x17[_0xa25a[37]]};for(var _0xdaa1x12 in _0xdaa1x17){if(_0xdaa1x17[_0xdaa1x12]){switch(_0xdaa1x12){case _0xa25a[42]:var _0xdaa1x13=_0xdaa1x17[_0xdaa1x12][_0xa25a[28]](_0xa25a[39]);_0xdaa1x13[_0xa25a[41]](function(_0xdaa1x14){_0xdaa1xe+= util[_0xa25a[36]](_0xa25a[40],_0xdaa1x12,_0xdaa1x14)});break;default:_0xdaa1xe+= util[_0xa25a[36]](_0xa25a[40],_0xdaa1x12,_0xdaa1x17[_0xdaa1x12])}}};if(_0xdaa1x17[_0xa25a[43]]){_0xdaa1xf+= util[_0xa25a[36]](_0xdaa1x10,_0xdaa1x17[_0xa25a[43]])}});fs[_0xa25a[53]](path[_0xa25a[47]](config[_0xa25a[45]],_0xa25a[46]),_0xdaa1xe,{flags:_0xa25a[48],mode:parseInt(_0xa25a[49],8)},function(_0xdaa1xb){if(_0xdaa1xb){throw _0xdaa1xb};console[_0xa25a[8]](_0xa25a[50]);fs[_0xa25a[53]](path[_0xa25a[47]](config[_0xa25a[45]],_0xa25a[51]),_0xdaa1xf,{flags:_0xa25a[48],mode:parseInt(_0xa25a[49],8)},function(_0xdaa1xb){if(_0xdaa1xb){throw _0xdaa1xb};reload(_0xdaa1x8);console[_0xa25a[8]](_0xa25a[52])})})})[_0xa25a[20]](function(_0xdaa1xb){console[_0xa25a[8]](_0xdaa1xb)})}function reload(_0xdaa1x8){_0xdaa1x8[_0xa25a[58]]({Action:_0xa25a[56]},function(_0xdaa1xb,_0xdaa1x19){if(_0xdaa1xb){console[_0xa25a[57]](_0xdaa1xb)}else {console[_0xa25a[8]](_0xdaa1x19)}})}module[_0xa25a[59]]= Trunk
\ No newline at end of file