Built motion from commit 038bc69.|0.0.119
[motion.git] / server / api / sound / sound.controller.js
index 5cb2687..69afd66 100644 (file)
@@ -1 +1 @@
-var _0x2956=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x73\x6F\x78","\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","\x66\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x62\x6C\x75\x65\x62\x69\x72\x64","\x53\x65\x74\x74\x69\x6E\x67\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x53\x6F\x75\x6E\x64\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x77\x61\x76\x2C\x6D\x70\x33\x2C\x67\x73\x6D\x2C\x20\x61\x6E\x64\x20\x6F\x67\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x54\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x66\x69\x6C\x65\x20\x73\x69\x7A\x65\x20\x69\x73\x20\x31\x35\x20\x4D\x62","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x66\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x6E\x61\x6D\x65","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x73\x6F\x75\x6E\x64\x50\x61\x74\x68","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x2E","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x69\x64\x65\x6E\x74\x69\x66\x79","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x45\x72\x72\x6F\x72\x3A\x20","\x75\x6E\x6C\x69\x6E\x6B","\x6F\x6E","\x70\x72\x6F\x67\x72\x65\x73\x73","\x73\x72\x63","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x62\x69\x74\x52\x61\x74\x65","\x62\x69\x74\x52\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x64\x65\x73\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x62\x69\x74\x52\x61\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x6C\x6F\x67","\x73\x74\x61\x72\x74","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x73\x74\x72\x65\x61\x6D","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x53\x6F\x75\x6E\x64\x73","\x5F\x66\x6F\x72\x6D\x61\x74"];_0x2956[0];var _=require(_0x2956[1]);var Sound=require(_0x2956[3])[_0x2956[2]];var uploadFile=require(_0x2956[4]);var sr=require(_0x2956[5]);var sox=require(_0x2956[6]);var path=require(_0x2956[7]);var config=require(_0x2956[8]);var fs=require(_0x2956[9]);var sequelize=require(_0x2956[3])[_0x2956[10]];var base64=require(_0x2956[11]);var Promise=require(_0x2956[12]);var Settings=require(_0x2956[3])[_0x2956[13]];exports[_0x2956[14]]= function(_0xfbedxd,_0xfbedxe){return Sound[_0x2956[19]]()[_0x2956[18]](function(_0xfbedx10){return _0xfbedxe[_0x2956[17]](200)[_0x2956[16]](_0xfbedx10)})[_0x2956[15]](function(_0xfbedxf){return handleError(_0xfbedxe,_0xfbedxf)})};exports[_0x2956[20]]= function(_0xfbedxd,_0xfbedxe){return Sound[_0x2956[24]](_0xfbedxd[_0x2956[23]][_0x2956[22]])[_0x2956[18]](function(Sound){if(!Sound){return _0xfbedxe[_0x2956[21]](404)};return _0xfbedxe[_0x2956[16]](Sound)})[_0x2956[15]](function(_0xfbedxf){return handleError(_0xfbedxe,_0xfbedxf)})};exports[_0x2956[25]]= function(_0xfbedxd,_0xfbedxe){var _0xfbedx11= new uploadFile({dest:path[_0x2956[27]](config[_0x2956[26]]),maxFileSize:15* 1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0xfbedx12,_0xfbedx13){return sr()+ path[_0x2956[29]](_0xfbedx13[_0x2956[28]])},messages:{maxNumberOfFiles:_0x2956[30],acceptFileTypes:_0x2956[31],maxFileSize:_0x2956[32],invalidRequest:_0x2956[33]}});_0xfbedx11[_0x2956[56]](_0x2956[34],function(_0xfbedx14,_0xfbedx15){if(!_0xfbedx15[_0x2956[35]][_0x2956[28]]){return _0xfbedxe[_0x2956[17]](500)[_0x2956[16]](_0xfbedx11)};return Settings[_0x2956[24]](1)[_0x2956[18]](function(_0xfbedx16){var _0xfbedx17={};var _0xfbedx18=path[_0x2956[29]](_0xfbedx15[_0x2956[35]][_0x2956[28]]);_0xfbedx17[_0x2956[36]]= _0x2956[37];_0xfbedx17[_0x2956[38]]= path[_0x2956[29]](_0xfbedx15[_0x2956[35]][_0x2956[28]])[_0x2956[39]](1);_0xfbedx17[_0x2956[40]]= _0x2956[41];_0xfbedx17[_0x2956[42]]= _0xfbedx17[_0x2956[43]]= path[_0x2956[44]](_0xfbedx15[_0x2956[35]][_0x2956[7]],_0xfbedx18);_0xfbedx17[_0x2956[45]]= path[_0x2956[44]](_0xfbedx15[_0x2956[35]][_0x2956[28]],_0xfbedx18);var _0xfbedx19=path[_0x2956[27]](config[_0x2956[26]],_0xfbedx17[_0x2956[45]]+ _0xfbedx18);var _0xfbedx1a=path[_0x2956[27]](_0xfbedx16[_0x2956[46]]|| _0x2956[47],_0xfbedx17[_0x2956[45]]+ _0x2956[48]+ _0xfbedx17[_0x2956[40]]);fs[_0x2956[50]](_0xfbedx19,parseInt(_0x2956[49],8));sox[_0x2956[51]](_0xfbedx19,function(_0xfbedxf,_0xfbedx1b){});var _0xfbedx1c=sox[_0x2956[52]](_0xfbedx19,_0xfbedx1a,{sampleRate:8000,format:_0x2956[41],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0xfbedx1c[_0x2956[56]](_0x2956[53],function(_0xfbedxf){console[_0x2956[53]](_0x2956[54],_0xfbedxf);fs[_0x2956[55]](_0xfbedx19,function(_0xfbedxf){if(_0xfbedxf){return handleError(_0xfbedxe,_0xfbedxf)}});return handleError(_0xfbedxe,_0xfbedxf)});_0xfbedx1c[_0x2956[56]](_0x2956[57],function(_0xfbedx1d,_0xfbedx1e){});_0xfbedx1c[_0x2956[56]](_0x2956[58],function(_0xfbedx1f){_0xfbedx17[_0x2956[59]]= isNaN(_0xfbedx1f[_0x2956[60]])?null:_0xfbedx1f[_0x2956[60]]* 1000;_0xfbedx17[_0x2956[61]]= isNaN(_0xfbedx1f[_0x2956[62]])?null:_0xfbedx1f[_0x2956[62]];_0xfbedx17[_0x2956[63]]= isNaN(_0xfbedx1f[_0x2956[64]])?null:_0xfbedx1f[_0x2956[64]];_0xfbedx17[_0x2956[65]]= isNaN(_0xfbedx1f[_0x2956[66]])?null:_0xfbedx1f[_0x2956[66]];_0xfbedx17[_0x2956[67]]= isNaN(_0xfbedx1f[_0x2956[68]])?null:_0xfbedx1f[_0x2956[68]]});_0xfbedx1c[_0x2956[56]](_0x2956[69],function(_0xfbedx1f){_0xfbedx17[_0x2956[70]]= isNaN(_0xfbedx1f[_0x2956[60]])?null:_0xfbedx1f[_0x2956[60]]* 1000;_0xfbedx17[_0x2956[71]]= isNaN(_0xfbedx1f[_0x2956[62]])?null:_0xfbedx1f[_0x2956[62]];_0xfbedx17[_0x2956[72]]= isNaN(_0xfbedx1f[_0x2956[64]])?null:_0xfbedx1f[_0x2956[64]];_0xfbedx17[_0x2956[73]]= isNaN(_0xfbedx1f[_0x2956[66]])?null:_0xfbedx1f[_0x2956[66]];_0xfbedx17[_0x2956[74]]= isNaN(_0xfbedx1f[_0x2956[68]])?null:_0xfbedx1f[_0x2956[68]]});_0xfbedx1c[_0x2956[56]](_0x2956[34],function(){console[_0x2956[76]](_0x2956[75]);fs[_0x2956[50]](_0xfbedx1a,parseInt(_0x2956[49],8));return Sound[_0x2956[25]](_0xfbedx17)[_0x2956[18]](function(_0xfbedx20){return _0xfbedxe[_0x2956[17]](201)[_0x2956[16]](_0xfbedx20)})[_0x2956[15]](function(_0xfbedxf){console[_0x2956[76]](_0xfbedxf);return handleError(_0xfbedxe,_0xfbedxf)})});_0xfbedx1c[_0x2956[77]]()})[_0x2956[15]](function(_0xfbedxf){return handleError(_0xfbedxe,_0xfbedxf)})});_0xfbedx11[_0x2956[56]](_0x2956[53],function(_0xfbedxf){console[_0x2956[76]](_0x2956[78],_0xfbedxf);return handleError(_0xfbedxe,_0xfbedxf)});_0xfbedx11[_0x2956[79]](_0xfbedxd)};exports[_0x2956[80]]= function(_0xfbedxd,_0xfbedxe){if(_0xfbedxd[_0x2956[81]][_0x2956[22]]){delete _0xfbedxd[_0x2956[81]][_0x2956[22]]};return Sound[_0x2956[24]](_0xfbedxd[_0x2956[23]][_0x2956[22]])[_0x2956[18]](function(_0xfbedx20){if(!_0xfbedx20){return _0xfbedxe[_0x2956[21]](404)};var _0xfbedx21=_[_0x2956[82]](_0xfbedx20,_0xfbedxd[_0x2956[81]]);return _0xfbedx21[_0x2956[83]]()})[_0x2956[18]](function(_0xfbedx20){return _0xfbedxe[_0x2956[17]](200)[_0x2956[16]](_0xfbedx20)})[_0x2956[15]](function(_0xfbedxf){return handleError(_0xfbedxe,_0xfbedxf)})};exports[_0x2956[84]]= function(_0xfbedxd,_0xfbedxe){var _0xfbedx22;return Settings[_0x2956[24]](1)[_0x2956[18]](function(_0xfbedx16){_0xfbedx22= _0xfbedx16;return Sound[_0x2956[24]](_0xfbedxd[_0x2956[23]][_0x2956[22]])})[_0x2956[18]](function(_0xfbedx20){if(!_0xfbedx20){return _0xfbedxe[_0x2956[21]](404)};var _0xfbedx23=path[_0x2956[27]](config[_0x2956[26]],_0xfbedx20[_0x2956[45]]+ _0x2956[48]+ _0xfbedx20[_0x2956[38]]);var _0xfbedx24=path[_0x2956[27]](_0xfbedx22[_0x2956[46]]|| _0x2956[47],_0xfbedx20[_0x2956[45]]+ _0x2956[48]+ _0xfbedx20[_0x2956[40]]);return sequelize[_0x2956[85]](function(_0xfbedx25){return _0xfbedx20[_0x2956[84]]({transaction:_0xfbedx25})[_0x2956[18]](function(){fs[_0x2956[55]](_0xfbedx23,function(_0xfbedxf){if(_0xfbedxf){return handleError(_0xfbedxe,_0xfbedxf)}});fs[_0x2956[55]](_0xfbedx24,function(_0xfbedxf){if(_0xfbedxf){return handleError(_0xfbedxe,_0xfbedxf)}});return _0xfbedxe[_0x2956[17]](200)[_0x2956[16]](_0xfbedx20)})})[_0x2956[15]](function(_0xfbedxf){return handleError(_0xfbedxe,_0xfbedxf)})})[_0x2956[15]](function(_0xfbedxf){return handleError(_0xfbedxe,_0xfbedxf)})};exports[_0x2956[86]]= function(_0xfbedxd,_0xfbedxe){getStream(_0xfbedxd,_0xfbedxe,_0x2956[87])};exports[_0x2956[88]]= function(_0xfbedxd,_0xfbedxe){getStream(_0xfbedxd,_0xfbedxe,_0x2956[89])};function getStream(_0xfbedxd,_0xfbedxe,_0xfbedx27){return Sound[_0x2956[24]](_0xfbedxd[_0x2956[23]][_0x2956[22]])[_0x2956[18]](function(_0xfbedx20){var _0xfbedx29=Promise[_0x2956[93]](fs[_0x2956[92]]);return _0xfbedx29(path[_0x2956[27]](config[_0xfbedx27+ _0x2956[94]],_0xfbedx20[_0x2956[45]]+ _0x2956[48]+ _0xfbedx20[_0xfbedx27+ _0x2956[95]]))})[_0x2956[18]](function(_0xfbedx1b){var _0xfbedx28= new Buffer(_0xfbedx1b,_0x2956[91]).toString(_0x2956[90]);return _0xfbedx28})[_0x2956[18]](function(_0xfbedx28){return _0xfbedxe[_0x2956[17]](200)[_0x2956[16]]({downloadString:_0xfbedx28})})[_0x2956[15]](function(_0xfbedxf){console[_0x2956[76]](_0xfbedxf);return handleError(_0xfbedxe,_0xfbedxf)})}function handleError(_0xfbedxe,_0xfbedxf){return _0xfbedxe[_0x2956[17]](500)[_0x2956[16]](_0xfbedxf)}
\ No newline at end of file
+var _0xfe2f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x73\x6F\x78","\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","\x66\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x62\x6C\x75\x65\x62\x69\x72\x64","\x53\x65\x74\x74\x69\x6E\x67\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x53\x6F\x75\x6E\x64\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x77\x61\x76\x2C\x6D\x70\x33\x2C\x67\x73\x6D\x2C\x20\x61\x6E\x64\x20\x6F\x67\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x54\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x66\x69\x6C\x65\x20\x73\x69\x7A\x65\x20\x69\x73\x20\x31\x35\x20\x4D\x62","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x66\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x6E\x61\x6D\x65","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x73\x6F\x75\x6E\x64\x50\x61\x74\x68","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x2E","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x69\x64\x65\x6E\x74\x69\x66\x79","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x45\x72\x72\x6F\x72\x3A\x20","\x75\x6E\x6C\x69\x6E\x6B","\x6F\x6E","\x70\x72\x6F\x67\x72\x65\x73\x73","\x73\x72\x63","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x62\x69\x74\x52\x61\x74\x65","\x62\x69\x74\x52\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x64\x65\x73\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x62\x69\x74\x52\x61\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x6C\x6F\x67","\x73\x74\x61\x72\x74","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x73\x74\x72\x65\x61\x6D","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x53\x6F\x75\x6E\x64\x73","\x5F\x66\x6F\x72\x6D\x61\x74"];_0xfe2f[0];var _=require(_0xfe2f[1]);var Sound=require(_0xfe2f[3])[_0xfe2f[2]];var uploadFile=require(_0xfe2f[4]);var sr=require(_0xfe2f[5]);var sox=require(_0xfe2f[6]);var path=require(_0xfe2f[7]);var config=require(_0xfe2f[8]);var fs=require(_0xfe2f[9]);var sequelize=require(_0xfe2f[3])[_0xfe2f[10]];var base64=require(_0xfe2f[11]);var Promise=require(_0xfe2f[12]);var Settings=require(_0xfe2f[3])[_0xfe2f[13]];exports[_0xfe2f[14]]= function(_0x20a3xd,_0x20a3xe){return Sound[_0xfe2f[19]]()[_0xfe2f[18]](function(_0x20a3x10){return _0x20a3xe[_0xfe2f[17]](200)[_0xfe2f[16]](_0x20a3x10)})[_0xfe2f[15]](function(_0x20a3xf){return handleError(_0x20a3xe,_0x20a3xf)})};exports[_0xfe2f[20]]= function(_0x20a3xd,_0x20a3xe){return Sound[_0xfe2f[24]](_0x20a3xd[_0xfe2f[23]][_0xfe2f[22]])[_0xfe2f[18]](function(Sound){if(!Sound){return _0x20a3xe[_0xfe2f[21]](404)};return _0x20a3xe[_0xfe2f[16]](Sound)})[_0xfe2f[15]](function(_0x20a3xf){return handleError(_0x20a3xe,_0x20a3xf)})};exports[_0xfe2f[25]]= function(_0x20a3xd,_0x20a3xe){var _0x20a3x11= new uploadFile({dest:path[_0xfe2f[27]](config[_0xfe2f[26]]),maxFileSize:15* 1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0x20a3x12,_0x20a3x13){return sr()+ path[_0xfe2f[29]](_0x20a3x13[_0xfe2f[28]])},messages:{maxNumberOfFiles:_0xfe2f[30],acceptFileTypes:_0xfe2f[31],maxFileSize:_0xfe2f[32],invalidRequest:_0xfe2f[33]}});_0x20a3x11[_0xfe2f[56]](_0xfe2f[34],function(_0x20a3x14,_0x20a3x15){if(!_0x20a3x15[_0xfe2f[35]][_0xfe2f[28]]){return _0x20a3xe[_0xfe2f[17]](500)[_0xfe2f[16]](_0x20a3x11)};return Settings[_0xfe2f[24]](1)[_0xfe2f[18]](function(_0x20a3x16){var _0x20a3x17={};var _0x20a3x18=path[_0xfe2f[29]](_0x20a3x15[_0xfe2f[35]][_0xfe2f[28]]);_0x20a3x17[_0xfe2f[36]]= _0xfe2f[37];_0x20a3x17[_0xfe2f[38]]= path[_0xfe2f[29]](_0x20a3x15[_0xfe2f[35]][_0xfe2f[28]])[_0xfe2f[39]](1);_0x20a3x17[_0xfe2f[40]]= _0xfe2f[41];_0x20a3x17[_0xfe2f[42]]= _0x20a3x17[_0xfe2f[43]]= path[_0xfe2f[44]](_0x20a3x15[_0xfe2f[35]][_0xfe2f[7]],_0x20a3x18);_0x20a3x17[_0xfe2f[45]]= path[_0xfe2f[44]](_0x20a3x15[_0xfe2f[35]][_0xfe2f[28]],_0x20a3x18);var _0x20a3x19=path[_0xfe2f[27]](config[_0xfe2f[26]],_0x20a3x17[_0xfe2f[45]]+ _0x20a3x18);var _0x20a3x1a=path[_0xfe2f[27]](_0x20a3x16[_0xfe2f[46]]|| _0xfe2f[47],_0x20a3x17[_0xfe2f[45]]+ _0xfe2f[48]+ _0x20a3x17[_0xfe2f[40]]);fs[_0xfe2f[50]](_0x20a3x19,parseInt(_0xfe2f[49],8));sox[_0xfe2f[51]](_0x20a3x19,function(_0x20a3xf,_0x20a3x1b){});var _0x20a3x1c=sox[_0xfe2f[52]](_0x20a3x19,_0x20a3x1a,{sampleRate:8000,format:_0xfe2f[41],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0x20a3x1c[_0xfe2f[56]](_0xfe2f[53],function(_0x20a3xf){console[_0xfe2f[53]](_0xfe2f[54],_0x20a3xf);fs[_0xfe2f[55]](_0x20a3x19,function(_0x20a3xf){if(_0x20a3xf){return handleError(_0x20a3xe,_0x20a3xf)}});return handleError(_0x20a3xe,_0x20a3xf)});_0x20a3x1c[_0xfe2f[56]](_0xfe2f[57],function(_0x20a3x1d,_0x20a3x1e){});_0x20a3x1c[_0xfe2f[56]](_0xfe2f[58],function(_0x20a3x1f){_0x20a3x17[_0xfe2f[59]]= isNaN(_0x20a3x1f[_0xfe2f[60]])?null:_0x20a3x1f[_0xfe2f[60]]* 1000;_0x20a3x17[_0xfe2f[61]]= isNaN(_0x20a3x1f[_0xfe2f[62]])?null:_0x20a3x1f[_0xfe2f[62]];_0x20a3x17[_0xfe2f[63]]= isNaN(_0x20a3x1f[_0xfe2f[64]])?null:_0x20a3x1f[_0xfe2f[64]];_0x20a3x17[_0xfe2f[65]]= isNaN(_0x20a3x1f[_0xfe2f[66]])?null:_0x20a3x1f[_0xfe2f[66]];_0x20a3x17[_0xfe2f[67]]= isNaN(_0x20a3x1f[_0xfe2f[68]])?null:_0x20a3x1f[_0xfe2f[68]]});_0x20a3x1c[_0xfe2f[56]](_0xfe2f[69],function(_0x20a3x1f){_0x20a3x17[_0xfe2f[70]]= isNaN(_0x20a3x1f[_0xfe2f[60]])?null:_0x20a3x1f[_0xfe2f[60]]* 1000;_0x20a3x17[_0xfe2f[71]]= isNaN(_0x20a3x1f[_0xfe2f[62]])?null:_0x20a3x1f[_0xfe2f[62]];_0x20a3x17[_0xfe2f[72]]= isNaN(_0x20a3x1f[_0xfe2f[64]])?null:_0x20a3x1f[_0xfe2f[64]];_0x20a3x17[_0xfe2f[73]]= isNaN(_0x20a3x1f[_0xfe2f[66]])?null:_0x20a3x1f[_0xfe2f[66]];_0x20a3x17[_0xfe2f[74]]= isNaN(_0x20a3x1f[_0xfe2f[68]])?null:_0x20a3x1f[_0xfe2f[68]]});_0x20a3x1c[_0xfe2f[56]](_0xfe2f[34],function(){console[_0xfe2f[76]](_0xfe2f[75]);fs[_0xfe2f[50]](_0x20a3x1a,parseInt(_0xfe2f[49],8));return Sound[_0xfe2f[25]](_0x20a3x17)[_0xfe2f[18]](function(_0x20a3x20){return _0x20a3xe[_0xfe2f[17]](201)[_0xfe2f[16]](_0x20a3x20)})[_0xfe2f[15]](function(_0x20a3xf){console[_0xfe2f[76]](_0x20a3xf);return handleError(_0x20a3xe,_0x20a3xf)})});_0x20a3x1c[_0xfe2f[77]]()})[_0xfe2f[15]](function(_0x20a3xf){return handleError(_0x20a3xe,_0x20a3xf)})});_0x20a3x11[_0xfe2f[56]](_0xfe2f[53],function(_0x20a3xf){console[_0xfe2f[76]](_0xfe2f[78],_0x20a3xf);return handleError(_0x20a3xe,_0x20a3xf)});_0x20a3x11[_0xfe2f[79]](_0x20a3xd)};exports[_0xfe2f[80]]= function(_0x20a3xd,_0x20a3xe){if(_0x20a3xd[_0xfe2f[81]][_0xfe2f[22]]){delete _0x20a3xd[_0xfe2f[81]][_0xfe2f[22]]};return Sound[_0xfe2f[24]](_0x20a3xd[_0xfe2f[23]][_0xfe2f[22]])[_0xfe2f[18]](function(_0x20a3x20){if(!_0x20a3x20){return _0x20a3xe[_0xfe2f[21]](404)};var _0x20a3x21=_[_0xfe2f[82]](_0x20a3x20,_0x20a3xd[_0xfe2f[81]]);return _0x20a3x21[_0xfe2f[83]]()})[_0xfe2f[18]](function(_0x20a3x20){return _0x20a3xe[_0xfe2f[17]](200)[_0xfe2f[16]](_0x20a3x20)})[_0xfe2f[15]](function(_0x20a3xf){return handleError(_0x20a3xe,_0x20a3xf)})};exports[_0xfe2f[84]]= function(_0x20a3xd,_0x20a3xe){var _0x20a3x22;return Settings[_0xfe2f[24]](1)[_0xfe2f[18]](function(_0x20a3x16){_0x20a3x22= _0x20a3x16;return Sound[_0xfe2f[24]](_0x20a3xd[_0xfe2f[23]][_0xfe2f[22]])})[_0xfe2f[18]](function(_0x20a3x20){if(!_0x20a3x20){return _0x20a3xe[_0xfe2f[21]](404)};var _0x20a3x23=path[_0xfe2f[27]](config[_0xfe2f[26]],_0x20a3x20[_0xfe2f[45]]+ _0xfe2f[48]+ _0x20a3x20[_0xfe2f[38]]);var _0x20a3x24=path[_0xfe2f[27]](_0x20a3x22[_0xfe2f[46]]|| _0xfe2f[47],_0x20a3x20[_0xfe2f[45]]+ _0xfe2f[48]+ _0x20a3x20[_0xfe2f[40]]);return sequelize[_0xfe2f[85]](function(_0x20a3x25){return _0x20a3x20[_0xfe2f[84]]({transaction:_0x20a3x25})[_0xfe2f[18]](function(){fs[_0xfe2f[55]](_0x20a3x23,function(_0x20a3xf){if(_0x20a3xf){return handleError(_0x20a3xe,_0x20a3xf)}});fs[_0xfe2f[55]](_0x20a3x24,function(_0x20a3xf){if(_0x20a3xf){return handleError(_0x20a3xe,_0x20a3xf)}});return _0x20a3xe[_0xfe2f[17]](200)[_0xfe2f[16]](_0x20a3x20)})})[_0xfe2f[15]](function(_0x20a3xf){return handleError(_0x20a3xe,_0x20a3xf)})})[_0xfe2f[15]](function(_0x20a3xf){return handleError(_0x20a3xe,_0x20a3xf)})};exports[_0xfe2f[86]]= function(_0x20a3xd,_0x20a3xe){getStream(_0x20a3xd,_0x20a3xe,_0xfe2f[87])};exports[_0xfe2f[88]]= function(_0x20a3xd,_0x20a3xe){getStream(_0x20a3xd,_0x20a3xe,_0xfe2f[89])};function getStream(_0x20a3xd,_0x20a3xe,_0x20a3x27){return Sound[_0xfe2f[24]](_0x20a3xd[_0xfe2f[23]][_0xfe2f[22]])[_0xfe2f[18]](function(_0x20a3x20){var _0x20a3x29=Promise[_0xfe2f[93]](fs[_0xfe2f[92]]);return _0x20a3x29(path[_0xfe2f[27]](config[_0x20a3x27+ _0xfe2f[94]],_0x20a3x20[_0xfe2f[45]]+ _0xfe2f[48]+ _0x20a3x20[_0x20a3x27+ _0xfe2f[95]]))})[_0xfe2f[18]](function(_0x20a3x1b){var _0x20a3x28= new Buffer(_0x20a3x1b,_0xfe2f[91]).toString(_0xfe2f[90]);return _0x20a3x28})[_0xfe2f[18]](function(_0x20a3x28){return _0x20a3xe[_0xfe2f[17]](200)[_0xfe2f[16]]({downloadString:_0x20a3x28})})[_0xfe2f[15]](function(_0x20a3xf){console[_0xfe2f[76]](_0x20a3xf);return handleError(_0x20a3xe,_0x20a3xf)})}function handleError(_0x20a3xe,_0x20a3xf){return _0x20a3xe[_0xfe2f[17]](500)[_0xfe2f[16]](_0x20a3xf)}
\ No newline at end of file