Built motion from commit (unavailable).|2.5.10
[motion2.git] / server / services / agi / vertices.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x7c28=['login','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','AGENT\x20%s\x20FOUND\x20BY','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','logout','Enter\x20in\x20LOGOUT\x20(%s)\x20block','no\x20find\x20by\x20configured','FIND\x20AGENT\x20%s\x20BY\x20%s','Enter\x20in\x20MATH\x20(%s)\x20block','operation','no\x20operation\x20configured','math\x20%s','no\x20variable\x20found','%s[%s]','variable\x20%s[key]\x20set','digit','output','pause','Enter\x20in\x20PAUSE\x20(%s)\x20block','pause_id','success','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','PLAYBACK','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20found','indexOf','XMCS-QUEUE','toLowerCase','QUEUE','macro','gosub','record','%s_%s','%s/recordings/%s.%s','createSquareRecording','RECORDING_SAVENAME','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','Enter\x20in\x20RESTAPI\x20(%s)\x20block','no\x20url\x20configured','Response:','no\x20variable\x20selected\x20for\x20the\x20response','200','%s_STATUS_MESSAGE','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','saynumber','sayphonetic','sayPhonetic','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','no\x20mail\x20account\x20configured','getMailAccount','Smtp','no\x20mail\x20account\x20found','email','bcc','subject','service','host','port','secure','authentication','user','pass','template_id','sendMail\x20message','Trying\x20SendMail\x20with\x20account\x20%s','Mail\x20message\x20added\x20to\x20outgoing\x20process','sendFax','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20configured','no\x20sms\x20account\x20found','Sms\x20message\x20added\x20to\x20outgoing\x20process','Enter\x20in\x20SET\x20(%s)\x20block','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','START\x20CALLY\x20SQUARE','Answer','Skipped\x20Answer','project_id','no\x20subproject\x20found\x20with\x20id\x20%d','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','AGI','127.0.0.1','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20no\x20stored','google_cloud_tts','Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block','Trying\x20Google\x20Cloud\x20TTS\x20%s','googleCloudTTS','Google\x20Cloud\x20TTS\x20%s\x20file\x20created','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','mailbox','vswitch','Enter\x20in\x20SWITCH\x20(%s)\x20block','no\x20variable\x20selected','join','exports','util','shelljs','odbc','randomstring','moment','mustache','../../config/logger','agi','./scripts','/var/opt/motion2/server/files','rawHeaders','rawBody','menu','getdigits','getsecretdigits','channel','rpc','mailRpc','getVariable','getVariableById','name','catch','prototype','getVoiceQueue','getSquareProject','getSquareProjectById','then','getSquareOdbc','getSquareOdbcById','dsn','getUser','getUserById','getTrunk','getTrunkById','getSoundById','getSoundPath','getMailAccountById','sendMailMessage','getIntervals','getIntervalById','interval','Intervals','format','%s/sounds/converted/%s','getQueryOdbc','error','Error\x20getting\x20ODBC\x20connection\x20%s','info','ODBC\x20connection\x20successfully','query','Error\x20executing\x20query\x20%s','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccount','createSmsMessage','createSquareDetailsReport','label','uniqueid','calleridname','context','extension','priority','dnid','arg_1','file','createSquareMessage','createCmContact','random','isEmpty','isNil','phone','list_id','scheduledAt','callback','Callback\x20scheduled\x20at\x20','callback_priority','agentPause','agent','callerid','agentUnpause','agentLogout','agentLogin','internal','%s/%s@from-sip/n','shellCommand','exec','trim','replace','apiKey','google_cloud_tts_text_type','text','en-US','ssmlGender','MALE','audioEncoding','googleTTS','google_tts_language','restAPI','url','method','timeout','number','POST','body','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','headers','parse','computedVariables','uri','render','stringify','statusCode','statusMessage','message','options','googleDialogflow','dialogflow_language','googleDialogflowV2','client_email','dialogflowV2_language','sestekNDA','ispeechTTS','ispeech_tts_language','speed','ispeechASR','key','ispeech_asr_language','isConfigured','model','awsPolly','aws_polly_voice','Amy','aws_text_type','awsLex','aws_access_key_id','aws_secret_access_key','aws_bot_name','googleASR','google_asr_language','tildeASR','appid','appsecret','clear','includes','agicommand','clone','hasOwnProperty','isString','replaceObjectAllVariables','recursiveNodeIndex','isArray','replaceAllVariables','saveRestApiResult','%s.%s','split','replaceAll','toString','getAndSetVariable','result','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','extra','maxRetry','sync','retry','mrcpsynth','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','noop','no\x20text\x20configured','Executed\x20command\x20MRCPSynth\x20%s','mrcprecog','Enter\x20in\x20MRCPRecog\x20(%s)\x20block','grammar','no\x20grammar\x20configured','MRCPRecog','RECOG_CONFIDENCE()','MRCP_RECOG_CONFIDENCE','MRCP_RECOG_TRANSCRIPT','RECOG_INSTANCE()','Executed\x20command\x20MRCPRecog\x20%s','Enter\x20in\x20AGI\x20(%s)\x20block','command','args','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','wait','answer','add','delay','minutes','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','Executed\x20command\x20%s\x20%s','lumenvoxtts','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','MRCPSynth','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','LUMENVOX_ASR_CONFIDENCE','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','sestekasr','SESTEK_ASR_CONFIDENCE','RECOG_INPUT()','SESTEK_ASR_TRANSCRIPT','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20database\x20selected','no\x20odbc\x20database\x20found','no\x20query\x20configured','query:\x20%s','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','keys','forEach','setVariable','%s[%s][%s]','%s_ROWS_COUNT','length','variable\x20%s\x20set','debug','Enter\x20in\x20DIAL\x20(%s)\x20block','sip_id','DIAL','SIP/%s','opts','dialogflow','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','no\x20key\x20configured','Trying\x20Dialogflow:\x20%s','toUpperCase','speech','out','Dialogflow\x20Result\x20%s','Dialogflow\x20is\x20unreachable','dialogflowV2','Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block','dialogflowV2_project_id','no\x20project_id\x20configured','no\x20client_email\x20configured','no\x20private_key\x20configured','no\x20anguage\x20configured','bot','providerResponse','DialogflowV2\x20Result\x20%s','DialogflowV2\x20is\x20unreachable','sesteknda','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','no\x20ndauth\x20url\x20configured','username','no\x20username\x20configured','password','ndassistant_url','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','audiofile','Sestek\x20NDA\x20%s\x20file\x20created','streamFile','SestekNDA\x20Result\x20%s','end','Enter\x20in\x20END\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','trunk_name','Executed\x20command\x20%s','finally','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','no\x20file\x20audio\x20selected','getSound','file_id','no\x20file\x20audio\x20found','getData','response','maxdigit','test','mindigit','hiddendigitsnum','generate','hiddendigitspos','first','substr','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','GOAL\x20%s','goalname','awspolly','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','Trying\x20aws\x20Polly\x20%s','aws\x20Polly\x20%s\x20file\x20created','unlink','aws\x20Polly\x20is\x20unreachable','awslex','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','Trying\x20Amazon\x20Lex:\x20%s','AWS_LEX_%s','Amazon\x20Lex\x20ready\x20for\x20fulfillment','amazonlex','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','wav','%s/recordings/%s','beep','NOBEEP','recordFile','intKey','google\x20%s\x20file\x20created','GoogleASR\x20Result\x20%s','tildeasr','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appid\x20configured','no\x20appsecret\x20configured','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','gotoc','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','gotoif','Enter\x20in\x20GOTOIF\x20(%s)\x20block','condition','true','EVAL\x20CONDITION\x20%s\x20%s','false','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','interval_id','no\x20interval\x20configured','no\x20intervals\x20found','IFTIME(%s?true:false)','IFTIME\x20%s\x20%s','hangup','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','Trying\x20ispeech\x20TTS\x20%s','ispeech\x20%s\x20file\x20created','.wav','ispeech\x20TTS\x20is\x20unreachable'];(function(_0x315f16,_0x2911c3){var _0x10c8b6=function(_0x532c49){while(--_0x532c49){_0x315f16['push'](_0x315f16['shift']());}};_0x10c8b6(++_0x2911c3);}(_0x7c28,0x75));var _0x87c2=function(_0x14fad0,_0x278d75){_0x14fad0=_0x14fad0-0x0;var _0x5c665f=_0x7c28[_0x14fad0];return _0x5c665f;};'use strict';var fs=require('fs');var path=require('path');var util=require(_0x87c2('0x0'));var _=require('lodash');var sh=require(_0x87c2('0x1'));var odbc=require(_0x87c2('0x2'))();var rs=require(_0x87c2('0x3'));var moment=require(_0x87c2('0x4'));var Mustache=require(_0x87c2('0x5'));var rp=require('request-promise');var logger=require(_0x87c2('0x6'))(_0x87c2('0x7'));var config=require('../../config/environment');var scripts=require(_0x87c2('0x8'));var FILES_PATH=_0x87c2('0x9');var recursiveMapAttributes=[_0x87c2('0xa'),_0x87c2('0xb')];var verticesWithRetry=[_0x87c2('0xc'),_0x87c2('0xd'),_0x87c2('0xe')];var AGIVertices=function(_0x337376,_0x1567af,_0x38cff9){this[_0x87c2('0xf')]=_0x337376;this[_0x87c2('0x10')]=_0x1567af;this[_0x87c2('0x11')]=_0x38cff9;};AGIVertices['prototype'][_0x87c2('0x12')]=function(_0x5f192a,_0x3a1dd5){this[_0x87c2('0x10')][_0x87c2('0x13')](_0x5f192a)['then'](function(_0x3f6323){_0x3a1dd5(null,_0x3f6323?_0x3f6323[_0x87c2('0x14')]:![]);})[_0x87c2('0x15')](function(_0x116e69){_0x3a1dd5(_0x116e69);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x17')]=function(_0x261489,_0x157647){this[_0x87c2('0x10')]['getVoiceQueueById'](_0x261489)['then'](function(_0x5dfccc){_0x157647(null,_0x5dfccc?_0x5dfccc['name']:![]);})['catch'](function(_0x447085){_0x157647(_0x447085);});};AGIVertices['prototype'][_0x87c2('0x18')]=function(_0x55afb8,_0x562faf){this[_0x87c2('0x10')][_0x87c2('0x19')](_0x55afb8)[_0x87c2('0x1a')](function(_0x511e5b){_0x562faf(null,_0x511e5b?_0x511e5b[_0x87c2('0x14')]:![]);})[_0x87c2('0x15')](function(_0x2ee376){_0x562faf(_0x2ee376);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x1b')]=function(_0x3befa0,_0x492a8d){this[_0x87c2('0x10')][_0x87c2('0x1c')](_0x3befa0)[_0x87c2('0x1a')](function(_0x5155a8){_0x492a8d(null,_0x5155a8?_0x5155a8[_0x87c2('0x1d')]:![]);})[_0x87c2('0x15')](function(_0x533599){_0x492a8d(_0x533599);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x1e')]=function(_0x5c8b90,_0x8919be){this[_0x87c2('0x10')][_0x87c2('0x1f')](_0x5c8b90)[_0x87c2('0x1a')](function(_0x1afe57){_0x8919be(null,_0x1afe57?_0x1afe57[_0x87c2('0x14')]:![]);})[_0x87c2('0x15')](function(_0x5b24a7){_0x8919be(_0x5b24a7);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x20')]=function(_0x37b88e,_0x13e9df){this[_0x87c2('0x10')][_0x87c2('0x21')](_0x37b88e)[_0x87c2('0x1a')](function(_0x1c5311){_0x13e9df(null,_0x1c5311?_0x1c5311[_0x87c2('0x14')]:![]);})[_0x87c2('0x15')](function(_0xe977ec){_0x13e9df(_0xe977ec);});};AGIVertices[_0x87c2('0x16')]['getSound']=function(_0x11eff3,_0x25e3d1){var _0x4210a9=this;this[_0x87c2('0x10')][_0x87c2('0x22')](_0x11eff3)[_0x87c2('0x1a')](function(_0x335969){_0x25e3d1(null,_0x335969?_0x4210a9[_0x87c2('0x23')](_0x335969['save_name']):![]);})['catch'](function(_0x18c6b5){_0x25e3d1(_0x18c6b5);});};AGIVertices[_0x87c2('0x16')]['getMailAccount']=function(_0x3fcc32,_0x1101ab){this['rpc'][_0x87c2('0x24')](_0x3fcc32)[_0x87c2('0x1a')](function(_0x52aa0b){_0x1101ab(null,_0x52aa0b?_0x52aa0b:![]);})[_0x87c2('0x15')](function(_0x1dfa9b){_0x1101ab(_0x1dfa9b);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x25')]=function(_0x210bcd,_0x8860bb,_0x31f2a4){this['mailRpc'][_0x87c2('0x25')](_0x210bcd,_0x8860bb)[_0x87c2('0x1a')](function(){_0x31f2a4(null);})[_0x87c2('0x15')](function(_0x38b19d){_0x31f2a4(_0x38b19d);});};AGIVertices['prototype'][_0x87c2('0x26')]=function(_0x45484c,_0x4b5971){this[_0x87c2('0x10')][_0x87c2('0x27')](_0x45484c)['then'](function(_0x2905ce){if(_0x2905ce){if(_0x2905ce['IntervalId']){_0x4b5971(null,[_0x2905ce[_0x87c2('0x28')]]);}else{_0x4b5971(null,_['map'](_0x2905ce[_0x87c2('0x29')],'interval'));}}else{_0x4b5971(null,![]);}})[_0x87c2('0x15')](function(_0x5cebe1){_0x4b5971(_0x5cebe1);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x23')]=function(_0x5000aa){return util[_0x87c2('0x2a')](_0x87c2('0x2b'),FILES_PATH,_0x5000aa);};AGIVertices[_0x87c2('0x16')][_0x87c2('0x2c')]=function(_0x2f251f,_0x2edc30,_0x1a478a){odbc['open'](_0x2f251f,function(_0x58ff5c){if(_0x58ff5c){logger[_0x87c2('0x2d')](_0x87c2('0x2e'),_0x58ff5c);_0x1a478a(_0x58ff5c);}else{logger[_0x87c2('0x2f')](_0x87c2('0x30'));odbc[_0x87c2('0x31')](_0x2edc30,function(_0x1f5584,_0x42c804){if(_0x1f5584){logger[_0x87c2('0x2f')](_0x87c2('0x32'),_0x2edc30);_0x1a478a(_0x1f5584);}else{logger[_0x87c2('0x2f')]('Query\x20executed\x20correctly\x20%s',_0x2edc30);odbc['close'](function(_0x4a12c4){if(_0x4a12c4){logger[_0x87c2('0x2d')](_0x87c2('0x33'),_0x4a12c4);}_0x1a478a(null,_0x42c804);});}});}});};AGIVertices['prototype'][_0x87c2('0x34')]=function(_0x37b345,_0x21b219){this[_0x87c2('0x10')]['getSmsAccountById'](_0x37b345)[_0x87c2('0x1a')](function(_0x2036a9){_0x21b219(null,_0x2036a9?_0x2036a9:![]);})[_0x87c2('0x15')](function(_0x344491){_0x21b219(_0x344491);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x35')]=function(_0x2d1832,_0x18e598){this[_0x87c2('0x10')][_0x87c2('0x35')](_0x2d1832)[_0x87c2('0x1a')](function(_0x3510d7){_0x18e598(null,_0x3510d7);})[_0x87c2('0x15')](function(_0x524dab){_0x18e598(_0x524dab);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x36')]=function(_0x1297d4,_0x3ec479,_0x2d3a29){this[_0x87c2('0x10')]['createSquareDetailsReport']({'uniqueid':this['channel']['uniqueid'],'node':_0x1297d4[_0x87c2('0x37')],'application':_0x1297d4['agicommand'],'data':_0x3ec479||null,'project_name':this[_0x87c2('0xf')]['arg_1'],'callerid':this[_0x87c2('0xf')]['callerid']})[_0x87c2('0x1a')](function(_0x3c1022){if(_0x2d3a29){_0x2d3a29(null,_0x3c1022);}})[_0x87c2('0x15')](function(_0x3ae978){if(_0x2d3a29){_0x2d3a29(_0x3ae978);}});};AGIVertices[_0x87c2('0x16')]['createSquareRecording']=function(_0x269136,_0xdd2db2,_0x52e085,_0x472e8c){this['rpc']['createSquareRecording']({'uniqueid':this[_0x87c2('0xf')][_0x87c2('0x38')],'callerid':this['channel']['callerid'],'calleridname':this[_0x87c2('0xf')][_0x87c2('0x39')],'context':this[_0x87c2('0xf')][_0x87c2('0x3a')],'extension':this[_0x87c2('0xf')][_0x87c2('0x3b')],'priority':this[_0x87c2('0xf')][_0x87c2('0x3c')],'accountcode':this[_0x87c2('0xf')]['accountcode'],'dnid':this[_0x87c2('0xf')][_0x87c2('0x3d')],'projectName':this[_0x87c2('0xf')][_0x87c2('0x3e')],'saveName':_0xdd2db2,'filename':_0x269136[_0x87c2('0x3f')]||_0xdd2db2,'savePath':_0x52e085})[_0x87c2('0x1a')](function(_0x5d3369){_0x472e8c(null,_0x5d3369);})[_0x87c2('0x15')](function(_0x346209){_0x472e8c(_0x346209);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x40')]=function(_0x5df12d,_0x5e5147,_0x5d4a94,_0x14e14e,_0x475843){this[_0x87c2('0x10')][_0x87c2('0x40')]({'uniqueid':this['channel'][_0x87c2('0x38')],'body':_0x5df12d,'direction':_0x5e5147,'providerName':_0x5d4a94,'providerResponse':_0x14e14e})[_0x87c2('0x1a')](function(_0xd72a0a){if(_0x475843){_0x475843(null,_0xd72a0a);}})[_0x87c2('0x15')](function(_0x228541){if(_0x475843){_0x475843(_0x228541);}});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x41')]=function(_0x1afb9c,_0x36134d){this['rpc'][_0x87c2('0x41')]({'firstName':_['isEmpty'](_0x1afb9c[_0x87c2('0x14')])||_['isNil'](_0x1afb9c['name'])?'callback_'+Math[_0x87c2('0x42')]():_0x1afb9c[_0x87c2('0x14')],'lastName':_[_0x87c2('0x43')](_0x1afb9c['lastName'])||_[_0x87c2('0x44')](_0x1afb9c['lastName'])?null:_0x1afb9c['lastName'],'phone':_0x1afb9c[_0x87c2('0x45')],'ListId':_0x1afb9c[_0x87c2('0x46')],'scheduledat':_0x1afb9c[_0x87c2('0x47')],'callbackUniqueid':this[_0x87c2('0xf')][_0x87c2('0x38')],'tags':_0x87c2('0x48'),'description':_0x87c2('0x49')+_0x1afb9c[_0x87c2('0x47')]['toString'](),'priority':_0x1afb9c[_0x87c2('0x4a')]})[_0x87c2('0x1a')](function(_0x25b651){_0x36134d(null,_0x25b651);})[_0x87c2('0x15')](function(_0x189d04){_0x36134d(_0x189d04);});};AGIVertices[_0x87c2('0x16')]['getPause']=function(_0x20bd7c,_0xc37d56){this['rpc']['getPauseById'](_0x20bd7c)[_0x87c2('0x1a')](function(_0x9c8094){_0xc37d56(null,_0x9c8094?_0x9c8094[_0x87c2('0x14')]:![]);})[_0x87c2('0x15')](function(_0x5d8f7d){_0xc37d56(_0x5d8f7d);});};AGIVertices['prototype'][_0x87c2('0x4b')]=function(_0x1903a5,_0x1d8802,_0x58d6c9){var _0x53999e={'role':_0x87c2('0x4c')};_0x53999e[_0x1903a5]=this['channel'][_0x87c2('0x4d')];this[_0x87c2('0x10')]['agentPause'](_0x53999e,_0x1d8802,this[_0x87c2('0xf')]['uniqueid'])[_0x87c2('0x1a')](function(_0x5b05b7){_0x58d6c9(null,_[_0x87c2('0x44')](_0x5b05b7)?![]:!![]);})[_0x87c2('0x15')](function(_0x14c92d){logger['error'](_0x14c92d);_0x58d6c9(null,![]);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x4e')]=function(_0x5a717e,_0x168a75){var _0x4696bd={'role':'agent'};_0x4696bd[_0x5a717e]=this[_0x87c2('0xf')][_0x87c2('0x4d')];this['rpc']['agentUnpause'](_0x4696bd)['then'](function(_0x23025f){_0x168a75(null,_[_0x87c2('0x44')](_0x23025f)?![]:!![]);})['catch'](function(_0x3688e5){logger[_0x87c2('0x2d')](_0x3688e5);_0x168a75(null,![]);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x4f')]=function(_0x313a39,_0x524dbb){var _0x3d58be={'role':_0x87c2('0x4c')};_0x3d58be[_0x313a39]=this[_0x87c2('0xf')][_0x87c2('0x4d')];this[_0x87c2('0x10')][_0x87c2('0x4f')](_0x3d58be)[_0x87c2('0x1a')](function(_0x123c7e){_0x524dbb(null,_[_0x87c2('0x44')](_0x123c7e)?![]:!![]);})['catch'](function(_0x14d45f){logger[_0x87c2('0x2d')](_0x14d45f);_0x524dbb(null,![]);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x50')]=function(_0x1a2188,_0x508f11){var _0x2205d0={'role':'agent'};_0x2205d0[_0x1a2188]=this[_0x87c2('0xf')][_0x87c2('0x4d')];var _0x42825d=_0x1a2188!=_0x87c2('0x51')?util[_0x87c2('0x2a')](_0x87c2('0x52'),'LOCAL',this[_0x87c2('0xf')][_0x87c2('0x4d')]):undefined;this['rpc']['agentLogin'](_0x2205d0,_0x42825d)['then'](function(_0x4508c8){_0x508f11(null,_[_0x87c2('0x44')](_0x4508c8)?![]:!![]);})[_0x87c2('0x15')](function(_0xb77171){logger[_0x87c2('0x2d')](_0xb77171);_0x508f11(null,![]);});};AGIVertices['prototype'][_0x87c2('0x53')]=function(_0x1e854c,_0xcf7f24){sh[_0x87c2('0x54')](_[_0x87c2('0x55')](_0x1e854c),function(_0x389c49,_0x380f9b){var _0x5b892f=_0x380f9b[_0x87c2('0x56')](/(\r\n|\n|\r)/gm,'');_0xcf7f24(null,_0x5b892f);});};AGIVertices[_0x87c2('0x16')]['googleCloudTTS']=function(_0x2026fd,_0x4ff26b){scripts['googleCloudTTS'](_0x2026fd[_0x87c2('0x57')],_0x2026fd[_0x87c2('0x58')]||_0x87c2('0x59'),_0x2026fd[_0x87c2('0x59')],_0x2026fd['languageCode']||_0x87c2('0x5a'),_0x2026fd[_0x87c2('0x5b')]||_0x87c2('0x5c'),_0x2026fd[_0x87c2('0x5d')]||'MP3')[_0x87c2('0x1a')](function(_0x4ba900){_0x4ff26b(null,_0x4ba900);})[_0x87c2('0x15')](function(_0x4d248d){_0x4ff26b(_0x4d248d);});};AGIVertices['prototype'][_0x87c2('0x5e')]=function(_0x2162ce,_0x351a4e){scripts[_0x87c2('0x5e')](_0x2162ce[_0x87c2('0x59')],_0x2162ce[_0x87c2('0x5f')]||'en',0x1)[_0x87c2('0x1a')](function(_0x5310fa){_0x351a4e(null,_0x5310fa);})[_0x87c2('0x15')](function(_0x297c4c){_0x351a4e(_0x297c4c);});};AGIVertices['prototype'][_0x87c2('0x60')]=function(_0x3ee04c,_0x5a4287){var _0x2fb842={'uri':_0x3ee04c[_0x87c2('0x61')],'method':_0x3ee04c[_0x87c2('0x62')],'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x3ee04c[_0x87c2('0x63')])===_0x87c2('0x64')&&parseInt(_0x3ee04c[_0x87c2('0x63')])>=0x1?parseInt(_0x3ee04c[_0x87c2('0x63')])*0x3e8:0x5*0x3e8};if(_['includes']([_0x87c2('0x65'),'PUT'],_0x2fb842[_0x87c2('0x62')]['toUpperCase']())){try{_0x2fb842[_0x87c2('0x66')]=_0x3ee04c[_0x87c2('0xb')]?JSON['parse'](_0x3ee04c[_0x87c2('0xb')]):{};}catch(_0x4b423c){logger[_0x87c2('0x2d')](_0x87c2('0x67'),_0x4b423c);}}try{_0x2fb842[_0x87c2('0x68')]=_0x3ee04c[_0x87c2('0xa')]?JSON[_0x87c2('0x69')](_0x3ee04c[_0x87c2('0xa')]):{};}catch(_0x5574ac){logger[_0x87c2('0x2d')]('An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function',_0x5574ac);}if(_0x3ee04c[_0x87c2('0x6a')]){try{var _0x1e1b5c=require(_0x3ee04c[_0x87c2('0x6a')])['sync'](this,_0x2fb842);_0x2fb842[_0x87c2('0x6b')]=Mustache['render'](_0x3ee04c['url'],_0x1e1b5c,{},['$$','$$']);if(_0x2fb842[_0x87c2('0x68')]){_0x2fb842[_0x87c2('0x68')]=JSON[_0x87c2('0x69')](Mustache[_0x87c2('0x6c')](JSON[_0x87c2('0x6d')](_0x2fb842[_0x87c2('0x68')]),_0x1e1b5c,{},['$$','$$']));}if(_0x2fb842[_0x87c2('0x66')]){_0x2fb842[_0x87c2('0x66')]=JSON['parse'](Mustache[_0x87c2('0x6c')](JSON[_0x87c2('0x6d')](_0x2fb842[_0x87c2('0x66')]),_0x1e1b5c,{},['$$','$$']));}}catch(_0x4812c2){logger['error']('An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function',_0x4812c2);}}rp(_0x2fb842)[_0x87c2('0x1a')](function(_0x2bd39c){var _0x4126fc={'statusCode':_0x2bd39c[_0x87c2('0x6e')]||0xc8,'statusMessage':_0x2bd39c[_0x87c2('0x6f')]||'OK','headers':_0x2bd39c[_0x87c2('0x68')]||{},'body':_0x2bd39c[_0x87c2('0x66')]||{}};_0x5a4287(null,_0x4126fc);})['catch'](function(_0x532674){var _0x4cc501={'statusCode':_0x532674[_0x87c2('0x6e')]||0x1f4,'statusMessage':_0x532674[_0x87c2('0x70')]||'500\x20-\x20Internal\x20Server\x20Error','headers':_0x532674[_0x87c2('0x71')]['headers']||{},'body':_0x532674[_0x87c2('0x71')][_0x87c2('0x66')]||{}};_0x5a4287(null,_0x4cc501);});};AGIVertices['prototype']['googleDialogflow']=function(_0x22ce38,_0x2e6c93){scripts[_0x87c2('0x72')](this['channel'][_0x87c2('0x38')],_0x22ce38['key'],_0x22ce38[_0x87c2('0x59')],_0x22ce38[_0x87c2('0x73')]||'en')['then'](function(_0x49479f){_0x2e6c93(null,_0x49479f);})[_0x87c2('0x15')](function(_0x2d79bb){_0x2e6c93(_0x2d79bb);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x74')]=function(_0x224b12,_0x84864f){scripts[_0x87c2('0x74')](this[_0x87c2('0xf')][_0x87c2('0x38')],_0x224b12['dialogflowV2_project_id'],_0x224b12[_0x87c2('0x75')],_0x224b12['private_key'],_0x224b12[_0x87c2('0x59')],_0x224b12[_0x87c2('0x76')]||'en')[_0x87c2('0x1a')](function(_0x240ba2){_0x84864f(null,_0x240ba2);})[_0x87c2('0x15')](function(_0x30ed5a){_0x84864f(_0x30ed5a);});};AGIVertices['prototype'][_0x87c2('0x77')]=function(_0x2c87bd,_0x26840a){scripts[_0x87c2('0x77')](this[_0x87c2('0xf')],_0x2c87bd)[_0x87c2('0x1a')](function(_0x5477e5){_0x26840a(null,_0x5477e5);})[_0x87c2('0x15')](function(_0x1a37c8){_0x26840a(_0x1a37c8);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x78')]=function(_0x3d2215,_0x563b28){scripts[_0x87c2('0x78')](_0x3d2215['key'],_0x3d2215[_0x87c2('0x59')],_0x3d2215[_0x87c2('0x79')]||_0x87c2('0x5a'),_0x3d2215[_0x87c2('0x7a')])[_0x87c2('0x1a')](function(_0x5c1765){_0x563b28(null,_0x5c1765);})[_0x87c2('0x15')](function(_0x1b3e13){_0x563b28(_0x1b3e13);});};AGIVertices['prototype'][_0x87c2('0x7b')]=function(_0x17457c,_0x4d9497,_0x2c6829){scripts['ispeechASR'](_0x4d9497,_0x17457c[_0x87c2('0x7c')],_0x17457c[_0x87c2('0x7d')]||_0x87c2('0x5a'),this[_0x87c2('0x7e')](_0x17457c[_0x87c2('0x7f')])?_0x17457c['model']:undefined)[_0x87c2('0x1a')](function(_0x1e7938){_0x2c6829(null,_0x1e7938);})[_0x87c2('0x15')](function(_0x5776a5){_0x2c6829(_0x5776a5);});};AGIVertices[_0x87c2('0x16')]['awsPolly']=function(_0x2bf39f,_0x643d){scripts[_0x87c2('0x80')](_0x2bf39f['aws_access_key_id'],_0x2bf39f['aws_secret_access_key'],_0x2bf39f['aws_polly_region'],_0x2bf39f[_0x87c2('0x81')]||_0x87c2('0x82'),_0x2bf39f[_0x87c2('0x59')],_0x2bf39f[_0x87c2('0x83')]||_0x87c2('0x59'))['then'](function(_0x156dd1){_0x643d(null,_0x156dd1);})[_0x87c2('0x15')](function(_0x5ed79a){_0x643d(_0x5ed79a);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x84')]=function(_0x1ad278,_0x1fb927){scripts[_0x87c2('0x84')](this['channel'][_0x87c2('0x38')],_0x1ad278[_0x87c2('0x85')],_0x1ad278[_0x87c2('0x86')],_0x1ad278['aws_lex_region'],_0x1ad278[_0x87c2('0x59')],_0x1ad278[_0x87c2('0x87')])['then'](function(_0x590f63){_0x1fb927(null,_0x590f63);})[_0x87c2('0x15')](function(_0xbbc7b4){_0x1fb927(_0xbbc7b4);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x88')]=function(_0x314416,_0x26416d,_0x4632c4){scripts[_0x87c2('0x88')](_0x26416d,_0x314416[_0x87c2('0x7c')],_0x314416[_0x87c2('0x89')]||_0x87c2('0x5a'))[_0x87c2('0x1a')](function(_0x1bc558){_0x4632c4(null,_0x1bc558);})[_0x87c2('0x15')](function(_0x19c97b){_0x4632c4(_0x19c97b);});};AGIVertices[_0x87c2('0x16')]['tildeASR']=function(_0x447c4d,_0xc31469,_0x42389c){scripts[_0x87c2('0x8a')](_0xc31469,_0x447c4d[_0x87c2('0x8b')],_0x447c4d[_0x87c2('0x8c')],_0x447c4d['uri'])[_0x87c2('0x1a')](function(_0x4810d5){_0x42389c(null,_0x4810d5);})['catch'](function(_0x5a03d9){_0x42389c(_0x5a03d9);});};AGIVertices[_0x87c2('0x16')][_0x87c2('0x8d')]=function(_0x39c21){var _0xdee77a=_[_0x87c2('0x8e')](verticesWithRetry,_0x39c21[_0x87c2('0x8f')])?_0x39c21:_[_0x87c2('0x90')](_0x39c21);for(var _0x1fdec4 in _0xdee77a){if(_0xdee77a[_0x87c2('0x91')](_0x1fdec4)){if(_0xdee77a[_0x1fdec4]&&_[_0x87c2('0x92')](_0xdee77a[_0x1fdec4])){if(_['includes'](recursiveMapAttributes,_0x1fdec4)){_0xdee77a[_0x1fdec4]=this[_0x87c2('0x93')](_0xdee77a[_0x1fdec4]);}else{_0xdee77a[_0x1fdec4]=this['replaceAllVariables'](_0xdee77a[_0x1fdec4]);}}}}return _0xdee77a;};AGIVertices['prototype'][_0x87c2('0x94')]=function(_0x1b624b){for(var _0xb70c4a in _0x1b624b){if(_0x1b624b[_0x87c2('0x91')](_0xb70c4a)){if(_['isPlainObject'](_0x1b624b[_0xb70c4a])){this['recursiveNodeIndex'](_0x1b624b[_0xb70c4a]);}else if(_[_0x87c2('0x95')](_0x1b624b[_0xb70c4a])){for(var _0x219ff6=0x0;_0x219ff6<_0x1b624b[_0xb70c4a]['length'];_0x219ff6++){this[_0x87c2('0x94')](_0x1b624b[_0xb70c4a][_0x219ff6]);}}else if(_[_0x87c2('0x92')](_0x1b624b[_0xb70c4a])){_0x1b624b[_0xb70c4a]=this[_0x87c2('0x96')](_0x1b624b[_0xb70c4a]);}}}};AGIVertices[_0x87c2('0x16')][_0x87c2('0x97')]=function(_0x176972,_0x479219){for(var _0x55a870 in _0x176972){if(_0x176972[_0x87c2('0x91')](_0x55a870)){if(_['isPlainObject'](_0x176972[_0x55a870])){if(!_[_0x87c2('0x43')](_0x176972[_0x55a870])){this['saveRestApiResult'](_0x176972[_0x55a870],util[_0x87c2('0x2a')](_0x87c2('0x98'),_0x479219,_0x55a870));}}else if(_[_0x87c2('0x95')](_0x176972[_0x55a870])){for(var _0x57b8cd=0x0;_0x57b8cd<_0x176972[_0x55a870]['length'];_0x57b8cd++){this['saveRestApiResult'](_0x176972[_0x55a870][_0x57b8cd],util[_0x87c2('0x2a')](_0x87c2('0x98'),_0x479219,_0x55a870+'['+_0x57b8cd+']'));}}else{if(!_['isNil'](_0x176972[_0x55a870])){this[_0x87c2('0xf')]['setVariable'](util['format'](_0x87c2('0x98'),_0x479219,_0x55a870),_0x176972[_0x55a870]);}}}}};AGIVertices['prototype'][_0x87c2('0x93')]=function(_0x57d18f){try{var _0x45e018=JSON[_0x87c2('0x69')](_0x57d18f);this[_0x87c2('0x94')](_0x45e018);return JSON['stringify'](_0x45e018);}catch(_0x2ae06c){return this[_0x87c2('0x96')](_0x57d18f);}};AGIVertices[_0x87c2('0x16')][_0x87c2('0x96')]=function(_0x1475d6){var _0x1e710f=_0x1475d6[_0x87c2('0x99')]('{');for(var _0x1283cd=0x1;_0x1283cd<_0x1e710f['length'];_0x1283cd+=0x1){var _0x2c8cfd=_0x1e710f[_0x1283cd][_0x87c2('0x99')]('}');if(_0x2c8cfd['length']>0x1){_0x1475d6=_0x1475d6[_0x87c2('0x9a')]('{'+_0x2c8cfd[0x0]+'}',this[_0x87c2('0xf')][_0x87c2('0x12')](_0x2c8cfd[0x0])['extra']||_0x2c8cfd[0x0]);}}if(_0x1e710f['length']===0x1){return _0x1475d6[_0x87c2('0x9b')]();}return this['replaceAllVariables'](_0x1475d6);};AGIVertices[_0x87c2('0x16')][_0x87c2('0x9c')]=function(_0x40657e,_0x3cfc9e){var _0x10566b=this[_0x87c2('0xf')][_0x87c2('0x12')](_0x40657e);if(_0x10566b[_0x87c2('0x9d')]===-0x1){return _0x10566b;}logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x9e'),_0x3cfc9e,_0x10566b['extra']));return this['channel']['setVariable'](_0x3cfc9e,_0x10566b[_0x87c2('0x9f')]);};AGIVertices[_0x87c2('0x16')][_0x87c2('0x7e')]=function(_0x147e7b){return _0x147e7b&&_0x147e7b!=='0'&&_0x147e7b!=='-1'&&_0x147e7b!=='';};AGIVertices[_0x87c2('0x16')][_0x87c2('0xa0')]=function(_0x4239da){this[_0x87c2('0x36')][_0x87c2('0xa1')](this,_0x4239da,'-');_0x4239da[_0x87c2('0xa2')]=_0x4239da['maxRetry'];return{'code':0xc8,'result':'-'};};AGIVertices['prototype'][_0x87c2('0xa3')]=function(_0x56206e){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0xa4'),_0x56206e[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x56206e[_0x87c2('0x59')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xa6'));}var _0x466173='\x22'+_0x56206e[_0x87c2('0x59')]+'\x22';if(this['isConfigured'](_0x56206e[_0x87c2('0x71')])){_0x466173+=','+_0x56206e['options'];}var _0x3d347b=this[_0x87c2('0xf')][_0x87c2('0x54')]('MRCPSynth',_0x466173);if(_0x3d347b[_0x87c2('0x9d')]===-0x1){return _0x3d347b;}return this['channel'][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0xa7'),_0x466173));};AGIVertices[_0x87c2('0x16')][_0x87c2('0xa8')]=function(_0xc8b9e6){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0xa9'),_0xc8b9e6[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0xc8b9e6[_0x87c2('0xaa')])){return this[_0x87c2('0xf')]['noop'](_0x87c2('0xab'));}var _0x994021=_0xc8b9e6[_0x87c2('0xaa')];if(this[_0x87c2('0x7e')](_0xc8b9e6[_0x87c2('0x71')])){_0x994021+=','+_0xc8b9e6[_0x87c2('0x71')];}var _0x10bb10=this[_0x87c2('0xf')][_0x87c2('0x54')](_0x87c2('0xac'),_0x994021);if(_0x10bb10[_0x87c2('0x9d')]===-0x1){return _0x10bb10;}var _0xa91916=this['getAndSetVariable'](_0x87c2('0xad'),_0x87c2('0xae'));if(_0xa91916['result']===-0x1){return _0xa91916;}var _0x18efe6=this[_0x87c2('0x9c')]('RECOG_INPUT()',_0x87c2('0xaf'));if(_0x18efe6[_0x87c2('0x9d')]===-0x1){return _0x18efe6;}var _0x3e7fd5=this[_0x87c2('0x9c')](_0x87c2('0xb0'),'MRCP_RECOG_INSTANCE');if(_0x3e7fd5['result']===-0x1){return _0x3e7fd5;}return this['channel']['noop'](util['format'](_0x87c2('0xb1'),_0x994021));};AGIVertices[_0x87c2('0x16')][_0x87c2('0x7')]=function(_0x234e9e){logger[_0x87c2('0x2f')](util['format'](_0x87c2('0xb2'),_0x234e9e[_0x87c2('0x37')]));return this[_0x87c2('0xf')][_0x87c2('0x7')]([_0x234e9e[_0x87c2('0xb3')],_0x234e9e[_0x87c2('0xb4')]]);};AGIVertices[_0x87c2('0x16')]['answer']=function(_0x2cee09){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0xb5'),_0x2cee09['label']));if(this[_0x87c2('0x7e')](_0x2cee09[_0x87c2('0x63')])){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0xb6'),_0x2cee09[_0x87c2('0x63')]));var _0x5b686c=this[_0x87c2('0xf')][_0x87c2('0xb7')](_0x2cee09[_0x87c2('0x63')]);if(_0x5b686c[_0x87c2('0x9d')]===-0x1){return _0x5b686c;}}return this['channel'][_0x87c2('0xb8')]();};AGIVertices['prototype']['callback']=function(_0x3308d9){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')]('Enter\x20in\x20CALLBACK\x20(%s)\x20block',_0x3308d9[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x3308d9[_0x87c2('0x46')])){return this['channel']['error'](_0x3308d9,'no\x20list\x20selected');}_0x3308d9[_0x87c2('0x47')]=moment();if(this['isConfigured'](_0x3308d9['delay'])){_0x3308d9[_0x87c2('0x47')]=moment()[_0x87c2('0xb9')](_0x3308d9[_0x87c2('0xba')],_0x87c2('0xbb'));}if(!this[_0x87c2('0x7e')](_0x3308d9['callback_priority'])){_0x3308d9[_0x87c2('0x4a')]=0x2;}this[_0x87c2('0x41')][_0x87c2('0xa1')](this,_0x3308d9);return this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0xbc'),_0x3308d9[_0x87c2('0x45')],_0x3308d9[_0x87c2('0x46')],_0x3308d9[_0x87c2('0x47')]));};AGIVertices[_0x87c2('0x16')][_0x87c2('0xbd')]=function(_0x334dcb){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0xbe'),_0x334dcb[_0x87c2('0x37')]));var _0x53f03e=this[_0x87c2('0xf')][_0x87c2('0x54')](_0x334dcb[_0x87c2('0xbf')],_0x334dcb[_0x87c2('0x71')]);if(_0x53f03e['result']===-0x1){return _0x53f03e;}return this['channel']['noop'](util[_0x87c2('0x2a')](_0x87c2('0xc0'),_0x334dcb['application'],_0x334dcb['options']));};AGIVertices[_0x87c2('0x16')][_0x87c2('0xc1')]=function(_0x534148){logger[_0x87c2('0x2f')](util['format'](_0x87c2('0xc2'),_0x534148[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x534148[_0x87c2('0x59')])){return this['channel'][_0x87c2('0xa5')]('no\x20text\x20configured');}var _0x1e24c8='\x22'+_0x534148['text']+'\x22';if(this['isConfigured'](_0x534148[_0x87c2('0x71')])){_0x1e24c8+=','+_0x534148[_0x87c2('0x71')];}var _0xd2bb54=this[_0x87c2('0xf')][_0x87c2('0x54')](_0x87c2('0xc3'),_0x1e24c8);if(_0xd2bb54[_0x87c2('0x9d')]===-0x1){return _0xd2bb54;}return this[_0x87c2('0xf')][_0x87c2('0xa5')](util['format'](_0x87c2('0xa7'),_0x1e24c8));};AGIVertices[_0x87c2('0x16')][_0x87c2('0xc4')]=function(_0x16538e){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0xc5'),_0x16538e[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x16538e['text'])){return this['channel'][_0x87c2('0xa5')](_0x87c2('0xa6'));}var _0x398d7='\x22'+_0x16538e['text']+'\x22';if(this[_0x87c2('0x7e')](_0x16538e['options'])){_0x398d7+=','+_0x16538e['options'];}var _0x26846d=this[_0x87c2('0xf')][_0x87c2('0x54')](_0x87c2('0xc3'),_0x398d7);if(_0x26846d[_0x87c2('0x9d')]===-0x1){return _0x26846d;}return this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')]('Executed\x20command\x20MRCPSynth\x20%s',_0x398d7));};AGIVertices[_0x87c2('0x16')]['lumenvoxasr']=function(_0x5eea75){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0xc6'),_0x5eea75[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x5eea75['grammar'])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xab'));}var _0x1bb2e9=_0x5eea75['grammar'];if(this['isConfigured'](_0x5eea75['options'])){_0x1bb2e9+=','+_0x5eea75[_0x87c2('0x71')];}var _0x57e966=this['channel'][_0x87c2('0x54')]('MRCPRecog',_0x1bb2e9);if(_0x57e966[_0x87c2('0x9d')]===-0x1){return _0x57e966;}var _0x1737c7=this[_0x87c2('0x9c')](_0x87c2('0xad'),_0x87c2('0xc7'));if(_0x1737c7['result']===-0x1){return _0x1737c7;}var _0x3eb34e=this[_0x87c2('0x9c')]('RECOG_INPUT()',_0x87c2('0xc8'));if(_0x3eb34e[_0x87c2('0x9d')]===-0x1){return _0x3eb34e;}var _0x2ad70c=this[_0x87c2('0x9c')](_0x87c2('0xb0'),_0x87c2('0xc9'));if(_0x2ad70c['result']===-0x1){return _0x2ad70c;}return this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0xb1'),_0x1bb2e9));};AGIVertices[_0x87c2('0x16')][_0x87c2('0xca')]=function(_0x59d72e){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')]('Enter\x20in\x20SESTEKASR\x20(%s)\x20block',_0x59d72e[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x59d72e['grammar'])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xab'));}var _0x1c9b81=_0x59d72e[_0x87c2('0xaa')];if(this[_0x87c2('0x7e')](_0x59d72e[_0x87c2('0x71')])){_0x1c9b81+=','+_0x59d72e[_0x87c2('0x71')];}var _0x3d2f8c=this[_0x87c2('0xf')][_0x87c2('0x54')](_0x87c2('0xac'),_0x1c9b81);if(_0x3d2f8c[_0x87c2('0x9d')]===-0x1){return _0x3d2f8c;}var _0x10a1f0=this['getAndSetVariable'](_0x87c2('0xad'),_0x87c2('0xcb'));if(_0x10a1f0['result']===-0x1){return _0x10a1f0;}var _0x262bb3=this['getAndSetVariable'](_0x87c2('0xcc'),_0x87c2('0xcd'));if(_0x262bb3[_0x87c2('0x9d')]===-0x1){return _0x262bb3;}var _0x20b224=this[_0x87c2('0x9c')](_0x87c2('0xb0'),'SESTEK_ASR_INSTANCE');if(_0x20b224[_0x87c2('0x9d')]===-0x1){return _0x20b224;}return this[_0x87c2('0xf')]['noop'](util[_0x87c2('0x2a')](_0x87c2('0xb1'),_0x1c9b81));};AGIVertices[_0x87c2('0x16')][_0x87c2('0xce')]=function(_0x5e7107){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0xcf'),_0x5e7107[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x5e7107[_0x87c2('0xd0')])){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x5e7107,_0x87c2('0xd1'));}var _0x162e94=this[_0x87c2('0x1b')][_0x87c2('0xa1')](this,_0x5e7107[_0x87c2('0xd0')]);if(!_0x162e94){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x5e7107,_0x87c2('0xd2'));}if(!this[_0x87c2('0x7e')](_0x5e7107[_0x87c2('0x31')])){return this[_0x87c2('0xf')]['error'](_0x5e7107,_0x87c2('0xd3'));}var _0x5cee52=_0x5e7107[_0x87c2('0x31')][_0x87c2('0x56')](/(\r\n|\n|\r)/gm,'\x20');this[_0x87c2('0xf')]['noop'](util[_0x87c2('0x2a')](_0x87c2('0xd4'),_0x5cee52));var _0x451c1b=this['getQueryOdbc'][_0x87c2('0xa1')](this,_0x162e94,_0x5cee52);this[_0x87c2('0x36')]['sync'](this,_0x5e7107,_0x5cee52);if(!this[_0x87c2('0x7e')](_0x5e7107[_0x87c2('0xd5')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xd6'));}var _0x24b44a=this[_0x87c2('0x12')][_0x87c2('0xa1')](this,_0x5e7107[_0x87c2('0xd5')]);if(!_0x24b44a){return this[_0x87c2('0xf')]['error'](_0x5e7107,'no\x20variable\x20found');}var _0x5fa484=this;_0x451c1b['forEach'](function(_0x103c37,_0x43ec54){Object[_0x87c2('0xd7')](_0x103c37)[_0x87c2('0xd8')](function(_0x5e54e5){_0x5fa484[_0x87c2('0xf')][_0x87c2('0xd9')](util['format'](_0x87c2('0xda'),_0x24b44a,_0x43ec54,_0x5e54e5),_0x103c37[_0x5e54e5]);});});this[_0x87c2('0xf')][_0x87c2('0xd9')](util[_0x87c2('0x2a')](_0x87c2('0xdb'),_0x24b44a),_0x451c1b[_0x87c2('0xdc')]);return this['channel']['noop'](util['format'](_0x87c2('0xdd'),_0x24b44a));};AGIVertices['prototype']['dial']=function(_0x22e7f4){logger[_0x87c2('0xde')](util[_0x87c2('0x2a')](_0x87c2('0xdf'),_0x22e7f4[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x22e7f4[_0x87c2('0xe0')])){return this[_0x87c2('0xf')]['error'](_0x22e7f4,'no\x20user\x20selected');}var _0x277fd2=this[_0x87c2('0x1e')][_0x87c2('0xa1')](this,_0x22e7f4[_0x87c2('0xe0')]);if(!_0x277fd2){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x22e7f4,'no\x20user\x20found');}var _0x41f72b=this[_0x87c2('0xf')][_0x87c2('0x54')](_0x87c2('0xe1'),[util[_0x87c2('0x2a')](_0x87c2('0xe2'),_0x277fd2),_0x22e7f4['timeout'],_0x22e7f4[_0x87c2('0xe3')],_0x22e7f4[_0x87c2('0x61')]]);if(_0x41f72b[_0x87c2('0x9d')]===-0x1){return _0x41f72b;}return this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')]('Executed\x20command\x20%s',_0x87c2('0xe1')));};AGIVertices['prototype'][_0x87c2('0xe4')]=function(_0xb7d5a7){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0xe5'),_0xb7d5a7[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0xb7d5a7[_0x87c2('0x7c')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xe6'));}if(!this['isConfigured'](_0xb7d5a7[_0x87c2('0x59')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xa6'));}this[_0x87c2('0xf')]['bot']=!![];this[_0x87c2('0x36')](_0xb7d5a7);this[_0x87c2('0x40')](_0xb7d5a7['text'],'in','','');this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0xe7'),_0xb7d5a7[_0x87c2('0x59')]));var _0x1693cb=this[_0x87c2('0x72')][_0x87c2('0xa1')](this,_0xb7d5a7);if(_0x1693cb){for(var _0x383db5 in _0x1693cb){if(_0x1693cb[_0x87c2('0x91')](_0x383db5)){this['channel'][_0x87c2('0xd9')](util[_0x87c2('0x2a')]('DIALOGFLOW_%s',_0x383db5[_0x87c2('0xe8')]()),_0x1693cb[_0x383db5]);}}this[_0x87c2('0x40')](_0x1693cb[_0x87c2('0xe9')],_0x87c2('0xea'),_0x87c2('0xe4'),'');return this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0xeb'),_0x1693cb[_0x87c2('0xe9')]));}return this['channel'][_0x87c2('0x2d')](_0xb7d5a7,_0x87c2('0xec'));};AGIVertices['prototype'][_0x87c2('0xed')]=function(_0x1c76f9){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0xee'),_0x1c76f9['label']));if(!this['isConfigured'](_0x1c76f9[_0x87c2('0xef')])){return this[_0x87c2('0xf')]['noop'](_0x87c2('0xf0'));}if(!this[_0x87c2('0x7e')](_0x1c76f9[_0x87c2('0x75')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xf1'));}if(!this[_0x87c2('0x7e')](_0x1c76f9['private_key'])){return this[_0x87c2('0xf')]['noop'](_0x87c2('0xf2'));}if(!this[_0x87c2('0x7e')](_0x1c76f9[_0x87c2('0x76')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xf3'));}if(!this['isConfigured'](_0x1c76f9[_0x87c2('0x59')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')]('no\x20text\x20configured');}this[_0x87c2('0xf')][_0x87c2('0xf4')]=!![];this[_0x87c2('0x36')](_0x1c76f9);this[_0x87c2('0x40')](_0x1c76f9[_0x87c2('0x59')],'in','','');this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')]('Trying\x20DialogflowV2:\x20%s',_0x1c76f9[_0x87c2('0x59')]));var _0x44d421=this[_0x87c2('0x74')][_0x87c2('0xa1')](this,_0x1c76f9);if(_0x44d421){for(var _0x364dfc in _0x44d421){if(_0x44d421[_0x87c2('0x91')](_0x364dfc)){if(_0x364dfc!==_0x87c2('0xf5')){this[_0x87c2('0xf')][_0x87c2('0xd9')](util[_0x87c2('0x2a')]('DIALOGFLOW_%s',_0x364dfc[_0x87c2('0xe8')]()),_0x44d421[_0x364dfc]);}}}this['createSquareMessage'](_0x44d421[_0x87c2('0xe9')],'out',_0x87c2('0xed'),_0x44d421['providerResponse']);return this['channel'][_0x87c2('0xa5')](util['format'](_0x87c2('0xf6'),_0x44d421[_0x87c2('0xe9')]));}return this[_0x87c2('0xf')]['error'](_0x1c76f9,_0x87c2('0xf7'));};AGIVertices[_0x87c2('0x16')][_0x87c2('0xf8')]=function(_0x4d15f0){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0xf9'),_0x4d15f0[_0x87c2('0x37')]));if(!this['isConfigured'](_0x4d15f0[_0x87c2('0xfa')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xfb'));}if(!this[_0x87c2('0x7e')](_0x4d15f0[_0x87c2('0xfc')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xfd'));}if(!this[_0x87c2('0x7e')](_0x4d15f0[_0x87c2('0xfe')])){return this['channel'][_0x87c2('0xa5')]('no\x20password\x20configured');}if(!this['isConfigured'](_0x4d15f0[_0x87c2('0xff')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')]('no\x20text\x20configured');}this[_0x87c2('0xf')][_0x87c2('0xf4')]=!![];this[_0x87c2('0x36')](_0x4d15f0);this[_0x87c2('0x40')](_0x4d15f0[_0x87c2('0x59')],'in','','');this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x100'),_0x4d15f0[_0x87c2('0x59')]));var _0x5c4621=this['sestekNDA'][_0x87c2('0xa1')](this,_0x4d15f0);if(_0x5c4621){for(var _0x67f10 in _0x5c4621){if(_0x5c4621[_0x87c2('0x91')](_0x67f10)){this[_0x87c2('0xf')][_0x87c2('0xd9')](util['format'](_0x87c2('0x101'),_0x67f10[_0x87c2('0xe8')]()),_0x5c4621[_0x67f10]);}}this[_0x87c2('0x40')](_0x5c4621[_0x87c2('0xe9')],_0x87c2('0xea'),_0x87c2('0xf8'),'');if(_0x5c4621[_0x87c2('0x102')]){this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x103'),_0x5c4621[_0x87c2('0x102')]));var _0x23db3b=this[_0x87c2('0xf')][_0x87c2('0x104')](_0x5c4621[_0x87c2('0x102')]);try{fs['unlink'](_0x5c4621[_0x87c2('0x102')]+'.wav');}catch(_0x1be2ee){logger[_0x87c2('0x2d')](_0x1be2ee);}return _0x23db3b;}else{return this['channel']['noop'](util[_0x87c2('0x2a')](_0x87c2('0x105'),_0x5c4621[_0x87c2('0xe9')]));}}return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x4d15f0,'SestekNDA\x20is\x20unreachable');};AGIVertices[_0x87c2('0x16')][_0x87c2('0x106')]=function(_0x554911){logger['info'](util[_0x87c2('0x2a')](_0x87c2('0x107'),_0x554911[_0x87c2('0x37')]));return this[_0x87c2('0xf')][_0x87c2('0xa5')]('end');};AGIVertices['prototype']['ext_dial']=function(_0x428775){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')]('Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block',_0x428775[_0x87c2('0x37')]));var _0x35fed1='';if(_0x428775[_0x87c2('0x108')]){if(!this['isConfigured'](_0x428775[_0x87c2('0x108')])){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x428775,_0x87c2('0x109'));}else{var _0x46090a=parseInt(_0x428775[_0x87c2('0x108')],0xa);if(isNaN(_0x46090a)){_0x35fed1=_0x428775[_0x87c2('0x108')];}else{_0x35fed1=this[_0x87c2('0x20')]['sync'](this,_0x428775['trunk_id']);if(!_0x35fed1){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x428775,'no\x20trunk\x20found');}}}}else if(_0x428775[_0x87c2('0x10a')]){_0x35fed1=_0x428775['trunk_name'];}else{return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x428775,'no\x20trunk\x20selected');}var _0x24dad5=this[_0x87c2('0xf')][_0x87c2('0x54')](_0x87c2('0xe1'),[util[_0x87c2('0x2a')]('SIP/%s/%s',_0x35fed1,_0x428775['phone']),_0x428775[_0x87c2('0x63')],_0x428775[_0x87c2('0xe3')],_0x428775[_0x87c2('0x61')]]);if(_0x24dad5[_0x87c2('0x9d')]===-0x1){return _0x24dad5;}return this[_0x87c2('0xf')][_0x87c2('0xa5')](util['format'](_0x87c2('0x10b'),_0x87c2('0xe1')));};AGIVertices[_0x87c2('0x16')][_0x87c2('0x10c')]=function(_0x31e019){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')]('Enter\x20in\x20FINALLY\x20(%s)\x20block',_0x31e019[_0x87c2('0x37')]));return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0x10c'));};AGIVertices[_0x87c2('0x16')]['getdigits']=function(_0xd8ff81){logger[_0x87c2('0x2f')](util['format'](_0x87c2('0x10d'),_0xd8ff81[_0x87c2('0x37')]));if(_0xd8ff81[_0x87c2('0xa2')]===0x0){return this['maxRetry'](_0xd8ff81);}_0xd8ff81[_0x87c2('0xa2')]-=0x1;if(!this[_0x87c2('0x7e')](_0xd8ff81['file_id'])){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0xd8ff81,_0x87c2('0x10e'));}var _0x232785=this[_0x87c2('0x10f')][_0x87c2('0xa1')](this,_0xd8ff81[_0x87c2('0x110')]);if(!_0x232785){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0xd8ff81,_0x87c2('0x111'));}if(!this[_0x87c2('0x7e')](_0xd8ff81['variable_id'])){return this['channel']['error'](_0x87c2('0xd6'));}var _0x3509a6=this[_0x87c2('0xf')][_0x87c2('0x112')](_0x232785,_0xd8ff81[_0x87c2('0x113')],_0xd8ff81[_0x87c2('0x114')]);var _0x31bb12=_0x3509a6[_0x87c2('0x9d')]?_0x3509a6[_0x87c2('0x9d')][_0x87c2('0x9b')]():'';logger['info'](_0x87c2('0x115'),JSON[_0x87c2('0x6d')](_0x3509a6));if(_0x3509a6['result']===-0x1){this['createSquareDetailsReport'][_0x87c2('0xa1')](this,_0xd8ff81,_0x31bb12);return _0x3509a6;}else if(_0x3509a6[_0x87c2('0x9f')]===_0x87c2('0x63')){_0x3509a6[_0x87c2('0x9d')]=_0x31bb12[_0x87c2('0xdc')]>=parseInt(_0xd8ff81[_0x87c2('0x116')])?'x':'i';}else{_0x3509a6['result']=_0x31bb12[_0x87c2('0xdc')]>=parseInt(_0xd8ff81[_0x87c2('0x116')])&&_0x31bb12[_0x87c2('0xdc')]<=parseInt(_0xd8ff81[_0x87c2('0x114')])?'x':'i';}var _0x43da37=this[_0x87c2('0x12')][_0x87c2('0xa1')](this,_0xd8ff81['variable_id']);if(!_0x43da37){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0xd8ff81,'no\x20variable\x20found');}this['channel'][_0x87c2('0xd9')](_0x43da37,_0x31bb12);if(this[_0x87c2('0x7e')](_0xd8ff81['hiddendigitsnum'])){var _0x1e847d=parseInt(_0xd8ff81[_0x87c2('0x117')],0xa);var _0x5a492d=rs[_0x87c2('0x118')]({'charset':'*','length':_0x1e847d});var _0x23cb8c=_0x31bb12[_0x87c2('0xdc')];if(_0x23cb8c>0x0){if(_0x23cb8c>_0x1e847d){this['createSquareDetailsReport'][_0x87c2('0xa1')](this,_0xd8ff81,_0xd8ff81[_0x87c2('0x119')]===_0x87c2('0x11a')?_0x5a492d+_0x31bb12[_0x87c2('0x11b')](_0x1e847d):_0x31bb12[_0x87c2('0x11b')](0x0,_0x23cb8c-_0x1e847d)+_0x5a492d);}else{this[_0x87c2('0x36')][_0x87c2('0xa1')](this,_0xd8ff81,rs['generate']({'charset':'*','length':_0x23cb8c}));}}else{this[_0x87c2('0x36')][_0x87c2('0xa1')](this,_0xd8ff81,'');}}else{this[_0x87c2('0x36')]['sync'](this,_0xd8ff81,_0x31bb12);}return _0x3509a6;};AGIVertices[_0x87c2('0x16')]['getsecretdigits']=function(_0x2a3aa6){logger['info'](util[_0x87c2('0x2a')](_0x87c2('0x11c'),_0x2a3aa6['label']));return this[_0x87c2('0xd')](_0x2a3aa6);};AGIVertices[_0x87c2('0x16')]['goal']=function(_0x508d15){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')]('Enter\x20in\x20GOAL\x20(%s)\x20block',_0x508d15[_0x87c2('0x37')]));this[_0x87c2('0x36')]['sync'](this,_0x508d15,_0x508d15['goalname']);return this[_0x87c2('0xf')]['noop'](util[_0x87c2('0x2a')](_0x87c2('0x11d'),_0x508d15[_0x87c2('0x11e')]));};AGIVertices[_0x87c2('0x16')][_0x87c2('0x11f')]=function(_0x349dcb){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x120'),_0x349dcb[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x349dcb[_0x87c2('0x85')])||!this[_0x87c2('0x7e')](_0x349dcb[_0x87c2('0x86')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')]('no\x20valid\x20credentials\x20configured');}if(!this[_0x87c2('0x7e')](_0x349dcb[_0x87c2('0x59')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')]('no\x20text\x20configured');}this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x121'),_0x349dcb['text']));var _0x27210c=this['awsPolly'][_0x87c2('0xa1')](this,_0x349dcb);if(_0x27210c){this['channel'][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x122'),_0x27210c));var _0x3e1baf=this['channel'][_0x87c2('0x104')](_0x27210c);try{fs[_0x87c2('0x123')](_0x27210c+'.wav');}catch(_0x50c6ab){logger['error'](_0x50c6ab);}return _0x3e1baf;}return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x349dcb,_0x87c2('0x124'));};AGIVertices[_0x87c2('0x16')][_0x87c2('0x125')]=function(_0x2d982d){logger[_0x87c2('0x2f')](util['format'](_0x87c2('0x126'),_0x2d982d[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x2d982d[_0x87c2('0x85')])||!this[_0x87c2('0x7e')](_0x2d982d['aws_secret_access_key'])){return this['channel'][_0x87c2('0xa5')](_0x87c2('0x127'));}if(!this[_0x87c2('0x7e')](_0x2d982d['aws_bot_name'])){return this[_0x87c2('0xf')]['noop']('no\x20bot\x20name\x20configured');}if(!this[_0x87c2('0x7e')](_0x2d982d[_0x87c2('0x59')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xa6'));}this['channel']['bot']=!![];this[_0x87c2('0x36')](_0x2d982d);this[_0x87c2('0x40')](_0x2d982d[_0x87c2('0x59')],'in','','');this['channel'][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x128'),_0x2d982d[_0x87c2('0x59')]));var _0x28fb28=this[_0x87c2('0x84')][_0x87c2('0xa1')](this,_0x2d982d);if(_0x28fb28){for(var _0x536bc0 in _0x28fb28){if(_0x28fb28[_0x87c2('0x91')](_0x536bc0)&&_[_0x87c2('0x92')](_0x28fb28[_0x536bc0])){this[_0x87c2('0xf')][_0x87c2('0xd9')](util[_0x87c2('0x2a')](_0x87c2('0x129'),_0x536bc0[_0x87c2('0xe8')]()),_0x28fb28[_0x536bc0]);}}if(_[_0x87c2('0x44')](_0x28fb28[_0x87c2('0x70')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0x12a'));}else{this[_0x87c2('0x40')](_0x28fb28['message'],_0x87c2('0xea'),_0x87c2('0x12b'),'');return this[_0x87c2('0xf')]['noop'](util[_0x87c2('0x2a')](_0x87c2('0x12c'),_0x28fb28['message']));}}return this['channel'][_0x87c2('0x2d')](_0x2d982d,_0x87c2('0x12d'));};AGIVertices[_0x87c2('0x16')][_0x87c2('0x12e')]=function(_0x10dc69){logger[_0x87c2('0x2f')](util['format'](_0x87c2('0x12f'),_0x10dc69['label'],_0x10dc69[_0x87c2('0x63')]));if(!this[_0x87c2('0x7e')](_0x10dc69[_0x87c2('0x7c')])){return this[_0x87c2('0xf')]['noop'](_0x87c2('0xe6'));}var _0x194a4c=_0x87c2('0x130');var _0x11e3a5=util[_0x87c2('0x2a')](_0x87c2('0x131'),FILES_PATH,rs[_0x87c2('0x118')](0x4));var _0xb8b60f=util[_0x87c2('0x2a')](_0x87c2('0x98'),_0x11e3a5,_0x194a4c);var _0x1281fa=!![];if(_0x10dc69[_0x87c2('0x132')]===_0x87c2('0x133')){_0x1281fa=![];}var _0x19e6df=this[_0x87c2('0xf')][_0x87c2('0x134')](_0x11e3a5,_0x194a4c,_0x10dc69[_0x87c2('0x135')],_0x10dc69['timeout'],undefined,_0x1281fa);if(_0x19e6df['result']!==-0x1){this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x136'),_0xb8b60f));var _0x4691f2=this['googleASR'][_0x87c2('0xa1')](this,_0x10dc69,_0xb8b60f);if(_0x4691f2){for(var _0x2f55d9 in _0x4691f2){if(_0x4691f2[_0x87c2('0x91')](_0x2f55d9)){this[_0x87c2('0xf')][_0x87c2('0xd9')](util[_0x87c2('0x2a')]('GOOGLE_ASR_%s',_0x2f55d9['toUpperCase']()),_0x4691f2[_0x2f55d9]);}}return this[_0x87c2('0xf')][_0x87c2('0xa5')](util['format'](_0x87c2('0x137'),JSON[_0x87c2('0x6d')](_0x4691f2)));}}return _0x19e6df;};AGIVertices['prototype'][_0x87c2('0x138')]=function(_0xb47e4){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x139'),_0xb47e4[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0xb47e4[_0x87c2('0x8b')])){return this['channel']['noop'](_0x87c2('0x13a'));}if(!this['isConfigured'](_0xb47e4[_0x87c2('0x8c')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0x13b'));}var _0x5afc6f=_0x87c2('0x130');var _0x33e0b4=util[_0x87c2('0x2a')](_0x87c2('0x131'),FILES_PATH,rs[_0x87c2('0x118')](0x4));var _0x316e10=util[_0x87c2('0x2a')](_0x87c2('0x98'),_0x33e0b4,_0x5afc6f);var _0x2dc1b3=!![];if(_0xb47e4[_0x87c2('0x132')]==='NOBEEP'){_0x2dc1b3=![];}var _0x1fcf74=this[_0x87c2('0xf')]['recordFile'](_0x33e0b4,_0x5afc6f,_0xb47e4[_0x87c2('0x135')],_0xb47e4[_0x87c2('0x63')],undefined,_0x2dc1b3);if(_0x1fcf74[_0x87c2('0x9d')]!==-0x1){this[_0x87c2('0xf')][_0x87c2('0xa5')](util['format'](_0x87c2('0x13c'),_0x316e10));var _0x47cbfd=this[_0x87c2('0x8a')][_0x87c2('0xa1')](this,_0xb47e4,_0x316e10);if(_0x47cbfd){for(var _0x4679b0 in _0x47cbfd){if(_0x47cbfd['hasOwnProperty'](_0x4679b0)){this[_0x87c2('0xf')][_0x87c2('0xd9')](util['format'](_0x87c2('0x13d'),_0x4679b0[_0x87c2('0xe8')]()),_0x47cbfd[_0x4679b0]);}}return this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')]('TildeASR\x20Result\x20%s',JSON['stringify'](_0x47cbfd)));}}return _0x1fcf74;};AGIVertices[_0x87c2('0x16')][_0x87c2('0x13e')]=function(_0x53e2d6){logger['info'](util[_0x87c2('0x2a')](_0x87c2('0x13f'),_0x53e2d6['label']));return this['channel'][_0x87c2('0x140')](_0x53e2d6['context'],_0x53e2d6[_0x87c2('0x3b')],_0x53e2d6[_0x87c2('0x3c')]);};AGIVertices[_0x87c2('0x16')][_0x87c2('0x141')]=function(_0x1ba01d){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x142'),_0x1ba01d['label']));if(!this[_0x87c2('0x7e')](_0x1ba01d[_0x87c2('0x143')])){return this[_0x87c2('0xf')]['error'](_0x1ba01d,'no\x20condition\x20configured');}try{var _0x501e3a=eval(_0x1ba01d['condition'])?_0x87c2('0x144'):'false';this['channel'][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x145'),_0x1ba01d[_0x87c2('0x143')],_0x501e3a));return{'code':0xc8,'result':_0x501e3a};}catch(_0x488873){return{'code':0xc8,'result':_0x87c2('0x146')};}};AGIVertices['prototype']['gotoiftime']=function(_0x48dd3d){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x147'),_0x48dd3d[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x48dd3d[_0x87c2('0x148')])){return this[_0x87c2('0xf')]['error'](_0x48dd3d,_0x87c2('0x149'));}var _0x50d90b=this[_0x87c2('0x26')][_0x87c2('0xa1')](this,_0x48dd3d[_0x87c2('0x148')]);if(!_0x50d90b){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x48dd3d,_0x87c2('0x14a'));}for(var _0x5eed74=0x0;_0x5eed74<_0x50d90b[_0x87c2('0xdc')];_0x5eed74+=0x1){var _0x29ccae=this[_0x87c2('0xf')][_0x87c2('0x12')](util[_0x87c2('0x2a')](_0x87c2('0x14b'),_0x50d90b[_0x5eed74]));if(_0x29ccae[_0x87c2('0x9d')]===-0x1){return _0x29ccae;}logger['info'](util['format'](_0x87c2('0x14c'),_0x50d90b[_0x5eed74],_0x29ccae['extra']));if(_0x29ccae[_0x87c2('0x9f')]==='true'){logger['info'](util[_0x87c2('0x2a')](_0x87c2('0x14c'),_0x50d90b[_0x5eed74],'true'));this[_0x87c2('0xf')]['noop'](util[_0x87c2('0x2a')](_0x87c2('0x14c'),_0x50d90b[_0x5eed74],'true'));return{'code':0xc8,'result':'true'};}else{logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x14c'),_0x50d90b[_0x5eed74],_0x87c2('0x146')));this[_0x87c2('0xf')][_0x87c2('0xa5')](util['format'](_0x87c2('0x14c'),_0x50d90b[_0x5eed74],_0x87c2('0x146')));}}return{'code':0xc8,'result':_0x87c2('0x146')};};AGIVertices[_0x87c2('0x16')][_0x87c2('0x14d')]=function(_0x49a202){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')]('Enter\x20in\x20HANGUP\x20(%s)\x20block',_0x49a202[_0x87c2('0x37')]));return this[_0x87c2('0xf')][_0x87c2('0x14d')]();};AGIVertices[_0x87c2('0x16')][_0x87c2('0x14e')]=function(_0x56622c){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x14f'),_0x56622c['label']));if(!this[_0x87c2('0x7e')](_0x56622c['key'])){return this['channel']['noop'](_0x87c2('0xe6'));}var _0x26dec6=_0x87c2('0x130');var _0x2ef6d7=util[_0x87c2('0x2a')](_0x87c2('0x131'),FILES_PATH,rs[_0x87c2('0x118')](0x4));var _0x4a7909=util[_0x87c2('0x2a')]('%s.%s',_0x2ef6d7,_0x26dec6);var _0x3f5449=!![];if(_0x56622c['beep']===_0x87c2('0x133')){_0x3f5449=![];}var _0x558085=this[_0x87c2('0xf')][_0x87c2('0x134')](_0x2ef6d7,_0x26dec6,_0x56622c[_0x87c2('0x135')],_0x56622c[_0x87c2('0x63')],undefined,_0x3f5449);if(_0x558085[_0x87c2('0x9d')]!==-0x1){this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')]('ispeech\x20%s\x20file\x20created',_0x4a7909));var _0x5e66cf=this[_0x87c2('0x7b')][_0x87c2('0xa1')](this,_0x56622c,_0x4a7909);if(_0x5e66cf){for(var _0x5340d5 in _0x5e66cf){if(_0x5e66cf[_0x87c2('0x91')](_0x5340d5)){this['channel'][_0x87c2('0xd9')](util[_0x87c2('0x2a')](_0x87c2('0x150'),_0x5340d5['toUpperCase']()),_0x5e66cf[_0x5340d5]);}}return this['channel']['noop'](util[_0x87c2('0x2a')](_0x87c2('0x151'),JSON[_0x87c2('0x6d')](_0x5e66cf)));}}return _0x558085;};AGIVertices['prototype']['ispeechtts']=function(_0x2349a9){logger['info'](util[_0x87c2('0x2a')]('Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block',_0x2349a9[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x2349a9[_0x87c2('0x7c')])){return this[_0x87c2('0xf')]['noop'](_0x87c2('0xe6'));}if(!this[_0x87c2('0x7e')](_0x2349a9[_0x87c2('0x59')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xa6'));}this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x152'),_0x2349a9[_0x87c2('0x59')]));var _0x186145=this[_0x87c2('0x78')]['sync'](this,_0x2349a9);if(_0x186145){this[_0x87c2('0xf')][_0x87c2('0xa5')](util['format'](_0x87c2('0x153'),_0x186145));var _0x8b5d27=this['channel'][_0x87c2('0x104')](_0x186145,_0x2349a9[_0x87c2('0x135')]);try{fs[_0x87c2('0x123')](_0x186145+_0x87c2('0x154'));}catch(_0x26d35d){logger['error'](_0x26d35d);}return _0x8b5d27;}return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x2349a9,_0x87c2('0x155'));};AGIVertices[_0x87c2('0x16')][_0x87c2('0x156')]=function(_0x4219bf){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x157'),_0x4219bf[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x4219bf[_0x87c2('0x158')])){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x4219bf,'no\x20find\x20by\x20configured');}logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this['channel'][_0x87c2('0x4d')],_0x4219bf[_0x87c2('0x158')]));var _0x1f3a90=this['agentLogin'][_0x87c2('0xa1')](this,_0x4219bf['findBy']);if(_0x1f3a90){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x159'),this['channel'][_0x87c2('0x4d')],_0x4219bf[_0x87c2('0x158')]));this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x159'),this['channel'][_0x87c2('0x4d')],_0x4219bf[_0x87c2('0x158')]));return{'code':0xc8,'result':'success'};}else{logger[_0x87c2('0x2f')](util['format'](_0x87c2('0x15a'),this[_0x87c2('0xf')][_0x87c2('0x4d')],_0x4219bf[_0x87c2('0x158')]));this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x15a'),this[_0x87c2('0xf')]['callerid'],_0x4219bf[_0x87c2('0x158')]));return{'code':0xc8,'result':_0x87c2('0x15b')};}};AGIVertices[_0x87c2('0x16')][_0x87c2('0x15c')]=function(_0x593051){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x15d'),_0x593051['label']));if(!this[_0x87c2('0x7e')](_0x593051[_0x87c2('0x158')])){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x593051,_0x87c2('0x15e'));}logger['info'](util[_0x87c2('0x2a')](_0x87c2('0x15f'),this[_0x87c2('0xf')][_0x87c2('0x4d')],_0x593051[_0x87c2('0x158')]));var _0x18f177=this['agentLogout'][_0x87c2('0xa1')](this,_0x593051[_0x87c2('0x158')]);if(_0x18f177){logger['info'](util['format'](_0x87c2('0x159'),this['channel'][_0x87c2('0x4d')],_0x593051['findBy']));this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x159'),this[_0x87c2('0xf')][_0x87c2('0x4d')],_0x593051[_0x87c2('0x158')]));return{'code':0xc8,'result':'success'};}else{logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x15a'),this['channel'][_0x87c2('0x4d')],_0x593051[_0x87c2('0x158')]));this[_0x87c2('0xf')]['noop'](util[_0x87c2('0x2a')](_0x87c2('0x15a'),this[_0x87c2('0xf')]['callerid'],_0x593051[_0x87c2('0x158')]));return{'code':0xc8,'result':_0x87c2('0x15b')};}};AGIVertices[_0x87c2('0x16')]['math']=function(_0xdfe00e){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x160'),_0xdfe00e[_0x87c2('0x37')]));if(!this['isConfigured'](_0xdfe00e[_0x87c2('0x161')])){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0xdfe00e,_0x87c2('0x162'));}this[_0x87c2('0xf')][_0x87c2('0xa5')](util['format'](_0x87c2('0x163'),_0xdfe00e[_0x87c2('0x161')]));var _0x2677a0=eval(_0xdfe00e[_0x87c2('0x161')]);if(!this[_0x87c2('0x7e')](_0xdfe00e['variable_id'])){return this[_0x87c2('0xf')][_0x87c2('0xa5')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x212a28=this[_0x87c2('0x12')][_0x87c2('0xa1')](this,_0xdfe00e['variable_id']);if(!_0x212a28){return this['channel'][_0x87c2('0x2d')](_0xdfe00e,_0x87c2('0x164'));}if(_[_0x87c2('0x95')](_0x2677a0)){var _0x444c4d=this;_0x2677a0['forEach'](function(_0x49973a,_0x4335fe){_0x444c4d[_0x87c2('0xf')]['setVariable'](util[_0x87c2('0x2a')](_0x87c2('0x165'),_0x212a28,_0x4335fe),_0x49973a);});return this['channel'][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x166'),_0x212a28));}else{return this[_0x87c2('0xf')][_0x87c2('0xd9')](_0x212a28,_0x2677a0);}};AGIVertices[_0x87c2('0x16')][_0x87c2('0xc')]=function(_0x33e067){logger[_0x87c2('0x2f')](util['format']('Enter\x20in\x20MENU\x20(%s)\x20block',_0x33e067[_0x87c2('0x37')]));if(_0x33e067[_0x87c2('0xa2')]===0x0){return this[_0x87c2('0xa0')](_0x33e067);}_0x33e067[_0x87c2('0xa2')]-=0x1;if(!this['isConfigured'](_0x33e067[_0x87c2('0x110')])){return this['channel'][_0x87c2('0x2d')](_0x33e067,_0x87c2('0x10e'));}var _0x170268=this[_0x87c2('0x10f')]['sync'](this,_0x33e067[_0x87c2('0x110')]);if(!_0x170268){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x33e067,_0x87c2('0x111'));}var _0x5a0ed8=this['channel'][_0x87c2('0x112')](_0x170268,_0x33e067[_0x87c2('0x113')],_0x33e067[_0x87c2('0x167')]);var _0xb35cc1=_0x5a0ed8[_0x87c2('0x9d')];if(_0x5a0ed8[_0x87c2('0x9d')]===-0x1){this[_0x87c2('0x36')][_0x87c2('0xa1')](this,_0x33e067,'-1');return _0x5a0ed8;}else if(_0x5a0ed8['extra']==='timeout'){_0x5a0ed8[_0x87c2('0x9d')]=_0x5a0ed8[_0x87c2('0x9d')][_0x87c2('0xdc')]>0x0?_0x5a0ed8[_0x87c2('0x9d')]:'t';}else if(_[_0x87c2('0x43')](_0x5a0ed8[_0x87c2('0x9d')])){_0x5a0ed8[_0x87c2('0x9d')]='#';_0xb35cc1='#';}if(!this[_0x87c2('0x7e')](_0x33e067[_0x87c2('0xd5')])){this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xd6'));}else{var _0x1f0068=this['getVariable'][_0x87c2('0xa1')](this,_0x33e067['variable_id']);if(!_0x1f0068){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x33e067,_0x87c2('0x164'));}this[_0x87c2('0xf')][_0x87c2('0xd9')](_0x1f0068,_0xb35cc1);}this[_0x87c2('0x36')][_0x87c2('0xa1')](this,_0x33e067,_0xb35cc1);return _0x5a0ed8;};AGIVertices[_0x87c2('0x16')]['noop']=function(_0x2f356e){logger['info'](util[_0x87c2('0x2a')]('Enter\x20in\x20NOOP\x20(%s)\x20block',_0x2f356e[_0x87c2('0x37')]));return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x2f356e[_0x87c2('0x168')]||_0x2f356e[_0x87c2('0x37')]);};AGIVertices[_0x87c2('0x16')][_0x87c2('0x169')]=function(_0x48d453){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x16a'),_0x48d453[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x48d453[_0x87c2('0x158')])){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x48d453,'no\x20find\x20by\x20configured');}logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this['channel'][_0x87c2('0x4d')],_0x48d453['findBy']));var _0x35f3d5=this['getPause'][_0x87c2('0xa1')](this,_0x48d453[_0x87c2('0x16b')]);var _0x109832=this['agentPause']['sync'](this,_0x48d453[_0x87c2('0x158')],_0x35f3d5);if(_0x109832){logger[_0x87c2('0x2f')](util['format'](_0x87c2('0x159'),this[_0x87c2('0xf')][_0x87c2('0x4d')],_0x48d453[_0x87c2('0x158')]));this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x87c2('0xf')][_0x87c2('0x4d')],_0x48d453[_0x87c2('0x158')]));return{'code':0xc8,'result':_0x87c2('0x16c')};}else{logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel'][_0x87c2('0x4d')],_0x48d453[_0x87c2('0x158')]));this['channel']['noop'](util[_0x87c2('0x2a')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x87c2('0xf')]['callerid'],_0x48d453['findBy']));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x87c2('0x16')]['playback']=function(_0xc3e182){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x16d'),_0xc3e182[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0xc3e182[_0x87c2('0x110')])){return this['channel']['error'](_0xc3e182,'no\x20file\x20audio\x20selected');}var _0x2af2ff=this[_0x87c2('0x10f')]['sync'](this,_0xc3e182[_0x87c2('0x110')]);if(!_0x2af2ff){return this[_0x87c2('0xf')]['error'](_0xc3e182,_0x87c2('0x111'));}var _0x1622fa=this[_0x87c2('0xf')][_0x87c2('0x54')](_0x87c2('0x16e'),[_0x2af2ff,_0xc3e182[_0x87c2('0xe3')]]);if(_0x1622fa[_0x87c2('0x9d')]===-0x1){return _0x1622fa;}return this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0xc0'),_0x87c2('0x16e'),_0x2af2ff));};AGIVertices[_0x87c2('0x16')][_0x87c2('0x16f')]=function(_0x4e4672){logger[_0x87c2('0x2f')](util['format'](_0x87c2('0x170'),_0x4e4672[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x4e4672[_0x87c2('0x171')])){return this['channel']['error'](_0x4e4672,'no\x20queue\x20selected');}var _0x1a7b33='';var _0x397fb9=parseInt(_0x4e4672[_0x87c2('0x171')],0xa);if(isNaN(_0x397fb9)){_0x1a7b33=_0x4e4672['queue_id'];}else{_0x1a7b33=this['getVoiceQueue']['sync'](this,_0x4e4672[_0x87c2('0x171')]);if(!_0x1a7b33){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x4e4672,_0x87c2('0x172'));}}var _0x1c2fd4='';if(this[_0x87c2('0x7e')](_0x4e4672[_0x87c2('0x110')])){var _0x3d463c=this[_0x87c2('0x10f')][_0x87c2('0xa1')](this,_0x4e4672[_0x87c2('0x110')]);if(_0x3d463c){_0x1c2fd4=_0x3d463c;}}this['createSquareDetailsReport'][_0x87c2('0xa1')](this,_0x4e4672,_0x1a7b33);if(_0x4e4672[_0x87c2('0xe3')][_0x87c2('0x173')]('x')<0x0){_0x4e4672[_0x87c2('0xe3')]+='x';}if(_0x4e4672[_0x87c2('0xe3')][_0x87c2('0x173')]('X')<0x0){_0x4e4672[_0x87c2('0xe3')]+='X';}this['channel'][_0x87c2('0xd9')](_0x87c2('0x174'),_0x1a7b33?_0x1a7b33[_0x87c2('0x175')]():'');var _0x1588be=this['channel'][_0x87c2('0x54')](_0x87c2('0x176'),[_0x1a7b33,_0x4e4672[_0x87c2('0xe3')],_0x4e4672[_0x87c2('0x61')],_0x1c2fd4,_0x4e4672[_0x87c2('0x63')],_0x4e4672[_0x87c2('0x7')],_0x4e4672[_0x87c2('0x177')],_0x4e4672[_0x87c2('0x178')],'',_0x4e4672['position']]);if(_0x1588be[_0x87c2('0x9d')]===-0x1){return _0x1588be;}return this[_0x87c2('0xf')]['noop'](util[_0x87c2('0x2a')](_0x87c2('0xc0'),_0x87c2('0x176'),_0x1a7b33));};AGIVertices['prototype'][_0x87c2('0x179')]=function(_0x38e661){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')]('Enter\x20in\x20RECORD\x20(%s)\x20block',_0x38e661['label']));var _0x463202=_0x38e661['recordingFormat']||_0x87c2('0x130');var _0x1fa206=util[_0x87c2('0x2a')](_0x87c2('0x17a'),this[_0x87c2('0xf')][_0x87c2('0x38')],rs['generate'](0x5));var _0x1e0e6e=util[_0x87c2('0x2a')](_0x87c2('0x17b'),FILES_PATH,_0x1fa206,_0x463202);var _0x2b6fb2=util[_0x87c2('0x2a')]('%s/recordings/%s',FILES_PATH,_0x1fa206);this[_0x87c2('0x17c')][_0x87c2('0xa1')](this,_0x38e661,_0x1fa206,_0x1e0e6e);this[_0x87c2('0xf')][_0x87c2('0xd9')](_0x87c2('0x17d'),_0x1fa206);logger[_0x87c2('0x2f')](_0x87c2('0x17e'),_0x2b6fb2,_0x463202,_0x38e661[_0x87c2('0x17f')],_0x38e661[_0x87c2('0x63')]);return this[_0x87c2('0xf')][_0x87c2('0x134')](_0x2b6fb2,_0x463202,_0x38e661['escape_digits'],_0x38e661['timeout'],undefined,!![]);};AGIVertices[_0x87c2('0x16')]['restapi']=function(_0x7adf6){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x180'),_0x7adf6[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x7adf6[_0x87c2('0x61')])){return this['channel'][_0x87c2('0xa5')](_0x87c2('0x181'));}var _0x2044b9=this[_0x87c2('0x60')][_0x87c2('0xa1')](this,_0x7adf6);logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x182'),util['inspect'](_0x2044b9,{'showHidden':![],'depth':null})));if(!this['isConfigured'](_0x7adf6[_0x87c2('0xd5')])){return this[_0x87c2('0xf')]['noop'](_0x87c2('0x183'));}var _0x5d8d1e=this[_0x87c2('0x12')][_0x87c2('0xa1')](this,_0x7adf6['variable_id']);if(!_0x5d8d1e){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x7adf6,_0x87c2('0x164'));}this['channel'][_0x87c2('0xd9')](util['format']('%s_STATUS_CODE',_0x5d8d1e),_0x2044b9[_0x87c2('0x6e')]?_0x2044b9[_0x87c2('0x6e')]:_0x87c2('0x184'));this[_0x87c2('0xf')][_0x87c2('0xd9')](util[_0x87c2('0x2a')](_0x87c2('0x185'),_0x5d8d1e),_0x2044b9[_0x87c2('0x6f')]?_0x2044b9[_0x87c2('0x6f')]:'OK');if(_0x2044b9[_0x87c2('0x66')]){try{this['saveRestApiResult'](_0x2044b9[_0x87c2('0x66')],_0x5d8d1e);}catch(_0x5d4858){logger[_0x87c2('0x2d')](util[_0x87c2('0x2a')](_0x87c2('0x186'),_0x5d8d1e));}}return this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0xdd'),_0x5d8d1e));};AGIVertices[_0x87c2('0x16')][_0x87c2('0x187')]=function(_0x15b123){logger['info'](util[_0x87c2('0x2a')](_0x87c2('0x188'),_0x15b123[_0x87c2('0x37')]));return this[_0x87c2('0xf')][_0x87c2('0x189')](_0x15b123['digits'][_0x87c2('0x56')](/\s+/g,''),_0x15b123[_0x87c2('0x17f')]);};AGIVertices['prototype'][_0x87c2('0x18a')]=function(_0x3e5db4){logger['info'](util['format']('Enter\x20in\x20SAYNUMBER\x20(%s)\x20block',_0x3e5db4[_0x87c2('0x37')]));return this[_0x87c2('0xf')]['sayNumber'](_0x3e5db4[_0x87c2('0x64')]['replace'](/\s+/g,''),_0x3e5db4[_0x87c2('0x17f')]);};AGIVertices[_0x87c2('0x16')][_0x87c2('0x18b')]=function(_0x5b2d53){logger['info'](util[_0x87c2('0x2a')]('Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block',_0x5b2d53['label']));return this[_0x87c2('0xf')][_0x87c2('0x18c')](_0x5b2d53[_0x87c2('0x59')],_0x5b2d53['escape_digits']);};AGIVertices[_0x87c2('0x16')][_0x87c2('0x18d')]=function(_0x52232a){logger['info'](util['format'](_0x87c2('0x18e'),_0x52232a[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x52232a[_0x87c2('0x18f')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0x190'));}var _0x7ad096=this[_0x87c2('0x191')][_0x87c2('0xa1')](this,_0x52232a['account_id']);if(!_0x7ad096||!_0x7ad096[_0x87c2('0x192')]){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x52232a,_0x87c2('0x193'));}var _0x4eb6c6={'from':util[_0x87c2('0x2a')]('\x22%s\x22\x20<%s>',_0x7ad096[_0x87c2('0x14')],_0x7ad096[_0x87c2('0x194')]||_0x7ad096[_0x87c2('0x192')]['user']),'to':_0x52232a['to']||'','cc':_0x52232a['cc']||'','bcc':_0x52232a[_0x87c2('0x195')]||'','subject':_0x52232a[_0x87c2('0x196')],'html':_0x52232a[_0x87c2('0x59')],'text':_0x52232a[_0x87c2('0x59')]};var _0x43b1ec={'tls':{'rejectUnauthorized':![]}};if(_0x7ad096['Smtp'][_0x87c2('0x197')]){_0x43b1ec[_0x87c2('0x197')]=_0x7ad096[_0x87c2('0x192')][_0x87c2('0x197')];}else{_0x43b1ec['host']=_0x7ad096['Smtp'][_0x87c2('0x198')];_0x43b1ec[_0x87c2('0x199')]=_0x7ad096[_0x87c2('0x192')][_0x87c2('0x199')];_0x43b1ec[_0x87c2('0x19a')]=_0x7ad096[_0x87c2('0x192')][_0x87c2('0x19a')];}if(_0x7ad096[_0x87c2('0x192')][_0x87c2('0x19b')]){_0x43b1ec['auth']={'user':_0x7ad096[_0x87c2('0x192')][_0x87c2('0x19c')],'pass':_0x7ad096[_0x87c2('0x192')][_0x87c2('0x19d')]};}if(this[_0x87c2('0x7e')](_0x52232a[_0x87c2('0x19e')])){}logger['debug'](_0x87c2('0x19f'),JSON[_0x87c2('0x6d')](_0x4eb6c6));this[_0x87c2('0x36')]['sync'](this,_0x52232a,_0x52232a[_0x87c2('0x18f')]);this['channel']['noop'](util['format'](_0x87c2('0x1a0'),_0x7ad096[_0x87c2('0x14')]));this[_0x87c2('0x25')][_0x87c2('0xa1')](this,_0x43b1ec,_0x4eb6c6);return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0x1a1'));};AGIVertices['prototype'][_0x87c2('0x1a2')]=function(_0x237b3e){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x1a3'),_0x237b3e[_0x87c2('0x37')]));return this[_0x87c2('0xf')]['noop'](_0x87c2('0x1a4'));};AGIVertices[_0x87c2('0x16')][_0x87c2('0x1a5')]=function(_0x37db91){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x1a6'),_0x37db91['label']));if(!this[_0x87c2('0x7e')](_0x37db91[_0x87c2('0x1a7')])){return this[_0x87c2('0xf')]['noop'](_0x87c2('0x1a8'));}var _0x401796=this[_0x87c2('0x34')][_0x87c2('0xa1')](this,_0x37db91[_0x87c2('0x1a7')]);if(!_0x401796){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x37db91,_0x87c2('0x1a9'));}var _0x16b37b={'body':_0x37db91['sms_text'],'phone':_0x37db91['to']||'','SmsAccountId':_0x401796['id']};logger[_0x87c2('0xde')]('sendSMS\x20message',JSON['stringify'](_0x16b37b));this[_0x87c2('0x36')][_0x87c2('0xa1')](this,_0x37db91,_0x37db91[_0x87c2('0x1a7')]);this['channel']['noop'](util[_0x87c2('0x2a')]('Trying\x20SendSMS\x20with\x20account\x20%s',_0x401796['name']));this[_0x87c2('0x35')][_0x87c2('0xa1')](this,_0x16b37b);return this[_0x87c2('0xf')]['noop'](_0x87c2('0x1aa'));};AGIVertices['prototype']['set']=function(_0x495f11){logger[_0x87c2('0x2f')](util['format'](_0x87c2('0x1ab'),_0x495f11[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x495f11[_0x87c2('0xd5')])){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x495f11,'no\x20variable\x20selected');}var _0x295685=this[_0x87c2('0x12')][_0x87c2('0xa1')](this,_0x495f11[_0x87c2('0xd5')]);if(!_0x295685){return this['channel'][_0x87c2('0x2d')](_0x495f11,_0x87c2('0x164'));}return this[_0x87c2('0xf')]['setVariable'](_0x295685,_0x495f11[_0x87c2('0x1ac')]);};AGIVertices[_0x87c2('0x16')][_0x87c2('0x1ad')]=function(_0x196855){logger[_0x87c2('0x2f')](util['format'](_0x87c2('0x1ae'),_0x196855[_0x87c2('0x37')]));this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0x1af'));if(_0x196855[_0x87c2('0xb8')]==='yes'){this['channel'][_0x87c2('0xa5')](_0x87c2('0x1b0'));return this['channel'][_0x87c2('0xb8')]();}return this[_0x87c2('0xf')]['noop'](_0x87c2('0x1b1'));};AGIVertices[_0x87c2('0x16')]['subproject']=function(_0x3e7471){logger[_0x87c2('0x2f')](util['format']('Enter\x20in\x20SUBPROJECT\x20(%s)\x20block',_0x3e7471[_0x87c2('0x37')]));if(!this['isConfigured'](_0x3e7471[_0x87c2('0x1b2')])){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x3e7471,'no\x20subproject\x20selected');}var _0x40825a=this['getSquareProject']['sync'](this,_0x3e7471[_0x87c2('0x1b2')]);if(!this[_0x87c2('0x7e')](_0x40825a)){return this[_0x87c2('0xf')]['error'](_0x3e7471,util[_0x87c2('0x2a')](_0x87c2('0x1b3'),_0x3e7471[_0x87c2('0x1b2')]));}if(_0x40825a===this[_0x87c2('0xf')][_0x87c2('0x3e')]){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x3e7471,_0x87c2('0x1b4'));}this[_0x87c2('0x36')][_0x87c2('0xa1')](this,_0x3e7471,_0x40825a);var _0x4b67db=this['channel'][_0x87c2('0x54')](_0x87c2('0x1b5'),util[_0x87c2('0x2a')]('agi://%s/square,\x22%s\x22,\x22%s\x22',config[_0x87c2('0x7')]['host']||_0x87c2('0x1b6'),_0x40825a,this[_0x87c2('0xf')][_0x87c2('0x3e')]));if(_0x4b67db[_0x87c2('0x9d')]===-0x1){return _0x4b67db;}return this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0xc0'),_0x87c2('0x1b5'),_0x40825a));};AGIVertices['prototype'][_0x87c2('0x1b7')]=function(_0x241236){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x1b8'),_0x241236['label']));var _0x19ada5=this[_0x87c2('0x53')][_0x87c2('0xa1')](this,_0x241236['command']);this['createSquareDetailsReport'][_0x87c2('0xa1')](this,_0x241236,_0x241236[_0x87c2('0xb3')]);if(this['isConfigured'](_0x241236[_0x87c2('0xd5')])){var _0x69d534=this[_0x87c2('0x12')]['sync'](this,_0x241236[_0x87c2('0xd5')]);if(_0x69d534){this[_0x87c2('0xf')][_0x87c2('0xd9')](_0x69d534,_0x19ada5);return this[_0x87c2('0xf')]['noop'](util['format']('sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s',_0x241236[_0x87c2('0xb3')],_0x69d534));}}return this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x1b9'),_0x241236['command']));};AGIVertices[_0x87c2('0x16')][_0x87c2('0x1ba')]=function(_0x26864a){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x1bb'),_0x26864a['label']));_0x26864a[_0x87c2('0x59')]=_0x26864a[_0x87c2('0x59')]['replace'](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x26864a[_0x87c2('0x57')])){return this[_0x87c2('0xf')]['noop']('no\x20apiKey\x20configured');}if(!this['isConfigured'](_0x26864a['text'])){return this['channel']['noop'](_0x87c2('0xa6'));}this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x1bc'),_0x26864a[_0x87c2('0x59')]));var _0x1d0f1e=this[_0x87c2('0x1bd')][_0x87c2('0xa1')](this,_0x26864a);if(_0x1d0f1e){this['channel'][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x1be'),_0x1d0f1e));var _0x32c764=this[_0x87c2('0xf')][_0x87c2('0x104')](_0x1d0f1e);try{fs[_0x87c2('0x123')](_0x1d0f1e+'.wav');}catch(_0x48734e){logger[_0x87c2('0x2d')](_0x48734e);}return _0x32c764;}return this[_0x87c2('0xf')]['error'](_0x26864a,'Google\x20Cloud\x20TTS\x20is\x20unreachable');};AGIVertices[_0x87c2('0x16')][_0x87c2('0x1bf')]=function(_0x13d95f){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x1c0'),_0x13d95f['label']));_0x13d95f[_0x87c2('0x59')]=_0x13d95f[_0x87c2('0x59')]['replace'](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x13d95f[_0x87c2('0x59')])){return this[_0x87c2('0xf')][_0x87c2('0xa5')](_0x87c2('0xa6'));}this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')]('Trying\x20Google\x20TTS\x20%s',_0x13d95f['text']));var _0x98e8f=this[_0x87c2('0x5e')][_0x87c2('0xa1')](this,_0x13d95f);if(_0x98e8f){this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')]('Google\x20TTS\x20%s\x20file\x20created',_0x98e8f));var _0x14d316=this[_0x87c2('0xf')][_0x87c2('0x104')](_0x98e8f);try{fs[_0x87c2('0x123')](_0x98e8f+_0x87c2('0x154'));}catch(_0x5a856c){logger[_0x87c2('0x2d')](_0x5a856c);}return _0x14d316;}return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x13d95f,'Google\x20TTS\x20is\x20unreachable');};AGIVertices[_0x87c2('0x16')][_0x87c2('0x1c1')]=function(_0x48c1cb){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x1c2'),_0x48c1cb['label']));if(!this[_0x87c2('0x7e')](_0x48c1cb[_0x87c2('0x158')])){return this[_0x87c2('0xf')]['error'](_0x48c1cb,'no\x20find\x20by\x20configured');}logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x15f'),this['channel']['callerid'],_0x48c1cb['findBy']));var _0x35a14e=this[_0x87c2('0x4e')]['sync'](this,_0x48c1cb['findBy']);if(_0x35a14e){logger['info'](util[_0x87c2('0x2a')](_0x87c2('0x159'),this[_0x87c2('0xf')][_0x87c2('0x4d')],_0x48c1cb['findBy']));this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x159'),this[_0x87c2('0xf')][_0x87c2('0x4d')],_0x48c1cb[_0x87c2('0x158')]));return{'code':0xc8,'result':_0x87c2('0x16c')};}else{logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x15a'),this[_0x87c2('0xf')][_0x87c2('0x4d')],_0x48c1cb['findBy']));this[_0x87c2('0xf')][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0x15a'),this[_0x87c2('0xf')][_0x87c2('0x4d')],_0x48c1cb[_0x87c2('0x158')]));return{'code':0xc8,'result':_0x87c2('0x15b')};}};AGIVertices[_0x87c2('0x16')]['voicemail']=function(_0x22948a){logger[_0x87c2('0x2f')](util['format'](_0x87c2('0x1c3'),_0x22948a[_0x87c2('0x37')]));var _0x3bec71=this[_0x87c2('0xf')]['exec'](_0x87c2('0x1c4'),[_0x22948a[_0x87c2('0x1c5')],_0x22948a[_0x87c2('0x71')]]);if(_0x3bec71[_0x87c2('0x9d')]===-0x1){return _0x3bec71;}return this['channel'][_0x87c2('0xa5')](util[_0x87c2('0x2a')](_0x87c2('0xc0'),_0x87c2('0x1c4'),_0x22948a[_0x87c2('0x1c5')]));};AGIVertices[_0x87c2('0x16')][_0x87c2('0x1c6')]=function(_0x56c1d){logger[_0x87c2('0x2f')](util[_0x87c2('0x2a')](_0x87c2('0x1c7'),_0x56c1d[_0x87c2('0x37')]));if(!this[_0x87c2('0x7e')](_0x56c1d[_0x87c2('0xd5')])){return this[_0x87c2('0xf')]['error'](_0x56c1d,_0x87c2('0x1c8'));}var _0x4790d1=this[_0x87c2('0x12')][_0x87c2('0xa1')](this,_0x56c1d[_0x87c2('0xd5')]);if(!_0x4790d1){return this[_0x87c2('0xf')][_0x87c2('0x2d')](_0x56c1d,_0x87c2('0x164'));}var _0x4917c7=this[_0x87c2('0xf')]['getVariable'](_0x4790d1);return{'code':0xc8,'result':_0x4917c7[_0x87c2('0x9f')]?_0x4917c7['extra']:'-'};};String['prototype']['replaceAll']=function(_0x59bbce,_0x9968f3){return this['split'](_0x59bbce)[_0x87c2('0x1c9')](_0x9968f3);};module[_0x87c2('0x1ca')]=AGIVertices;