UNPKG

tcrclientmodule

Version:

PANELO TCR CLIENT MODULE 080520

30 lines (24 loc) 25.2 kB
/* * * Copyright 2015 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ var tcr_ip = "127.0.0.1";//machine ip const _0x5840=['randomBytes','nodejs-license-file','/protos/tcrservice.proto','crypto','{{&applicationVersion}}','@grpc/proto-loader','createInsecure','loadPackageDefinition','{{&expirationDate}}','e4b87581dff7569450b25a1a9228e22f76c339b0625966f28a25e0181cd965fb','axios','_amount','{{&email}}','{{&serial}}','{{&licenseVersion}}','tellerId','grpc','tcrservice','{{&fullname}}','count','amount','credentials','dateformat','crypto-random-string','_denom','_currency','_tellerId','TCRService','notes','currency','denom','=====END\x20LICENSE=====','loadSync','join','_notes','readline'];(function(_0x3ca84e,_0x58402e){const _0x13b8d9=function(_0x4a9e0a){while(--_0x4a9e0a){_0x3ca84e['push'](_0x3ca84e['shift']());}};_0x13b8d9(++_0x58402e);}(_0x5840,0x163));const _0x13b8=function(_0x3ca84e,_0x58402e){_0x3ca84e=_0x3ca84e-0x0;let _0x13b8d9=_0x5840[_0x3ca84e];return _0x13b8d9;};var grpc=require(_0x13b8('0x15'));var protoLoader=require(_0x13b8('0xa'));var PROTO_PATH=__dirname+_0x13b8('0x7');var packageDefinition=protoLoader[_0x13b8('0x1')](PROTO_PATH,{'keepCase':!![],'longs':String,'enums':String,'defaults':!![],'oneofs':!![]});var tcrservice=grpc[_0x13b8('0xc')](packageDefinition)[_0x13b8('0x16')];var client=new tcrservice[(_0x13b8('0x20'))]('localhost:50051',grpc[_0x13b8('0x1a')][_0x13b8('0xb')]());class TCRCdmParm{constructor(_0x2563db,_0x3ac75c){this[_0x13b8('0x1f')]=_0x2563db;this[_0x13b8('0x3')]=_0x3ac75c;}get[_0x13b8('0x14')](){return this[_0x13b8('0x1f')];}get[_0x13b8('0x21')](){return this[_0x13b8('0x3')];}}class TCRNotes{constructor(_0x2949f8,_0x321720,_0x1449a5,_0x35a37c){this['_currency']=_0x2949f8;this['_count']=_0x321720;this[_0x13b8('0x1d')]=_0x1449a5;this[_0x13b8('0x10')]=_0x35a37c;}get[_0x13b8('0x22')](){return this[_0x13b8('0x1e')];}get[_0x13b8('0x18')](){return this['_count'];}get[_0x13b8('0x23')](){return this[_0x13b8('0x1d')];}get[_0x13b8('0x19')](){return this[_0x13b8('0x10')];}}const TCR_DENOMINATION={'TCR_MIX':0x0,'TCR_1K':0x1,'TCR_2K':0x2,'TCR_5K':0x3,'TCR_10K':0x4,'TCR_20K':0x5,'TCR_50K':0x6,'TCR_100K':0x7};const TCR_STATUS={'TCR_DEVONLINE':0x0,'TCR_DEVACTIVATED':0x1,'TCR_DEVEXCHANGE':0x2,'TCR_DEVOFFLINE':0x3,'TCR_DEVHWERROR':0x14,'TCR_DEVPOWEROFF':0x15,'TCR_DEVNODEVICE':0x16,'TCR_DEVBUSY':0x17,'TCR_DEVFRAUDATTEMPT':0x18,'TCR_DEVPOTENTIALFRAUD':0x19,'TCR_SUSPEND':0x31,'TCR_DEVUSERERROR':0x63};const cryptoRandomString=require(_0x13b8('0x1c'));const licenseFile=require(_0x13b8('0x6'));const fs=require('fs');const os=require('os');const crypto=require(_0x13b8('0x8'));var axios=require(_0x13b8('0xf'));const key=crypto[_0x13b8('0x5')](0x20);const iv=crypto[_0x13b8('0x5')](0x10);const tpk=_0x13b8('0xe');const c_exp='';const readline=require(_0x13b8('0x4'));const template=['====BEGIN\x20LICENSE====',_0x13b8('0x13'),_0x13b8('0x9'),_0x13b8('0x17'),_0x13b8('0x11'),_0x13b8('0xd'),_0x13b8('0x12'),_0x13b8('0x0')][_0x13b8('0x2')]('\x0a');var dateFormat=require(_0x13b8('0x1b')); //export module.exports = { //create new module export here } var _0x18dc=['Response\x20:','push','denom\x20:\x20','grpcTCRClose','TCR_100K','grpcDllVersion','concat','TCRCashIn','TCRCashInRollback','valid','API\x20Version\x20:','amount\x20:\x20','TCR\x20Poll\x20Result\x20:','TCRCashUnitCount','count\x20:\x20','Check\x20License','exports','50.000','days','months','getFullYear','parm','grpcTCRCloseShutter','Activity\x20:','data','TCRNotesInfo','now','vld','denom','from','License\x20Tidak\x20Ditemukan!','TCRCloseShutter','TCRNotesCount','grpcTCRCashInEnd','grpcTCRLastTransaction','weeks','100.000','Dll\x20Version\x20:','amount3','grpcTCRNotesCount','TCRClose','TCRClearManip','years','grpcTCRCashIn','notes','./appdata/file.lic','TCR_20K','grpcTCRCashInDetail','TCRCashUnitInfo','TCRReset','existsSync','grpcTCRCashOut','getDate','TCR\x20Open','grpcTCRExchangeEnd','TCRBalanceInfo','platform','License\x20Tidak\x20Valid','grpcTCRCashUnitInfo','amount2','createDecipheriv','currency\x20:\x20','final','grpcTCRNotesInfo','listen','TCRCashInEnd','TCRLastTransaction','grpcTCRExchangeStart','state','TCRClearCount','TCR_10K','setFullYear','grpcTCRClearManip','tellerId','grpcTCROpen','amount','aes-256-cbc','replace','TCR_50K','grpcTCRCashUnitCount','TCR\x20Version\x20:','TCRActivate\x20-\x201','notes\x20:\x20','CastUnit\x20:','TCROpenShutter','amount1','log','./appdata/pub.pem','length','grpcTCRCashInRollback','TCRCashOut','grpcApiVersion','update','grpcTCRReset','20.000','TCRActStatus','TCRExchangeEnd','grpcTCRVersion','grpcTCRPoll','TCR\x20Open\x20Result\x20:','Response\x20:\x20','PROSES\x20CASH\x20IN','grpcTCRBalanceInfo','TCR_DEVACTIVATED','grpcTCROpenShutter','toString','tellerId\x20:\x20','TCRExchangeStart','expirationDate','activity','balance','message','currency','count','Example\x20app\x20listening\x20at\x20http://localhost:','grpcTCRActivate','State\x20:','hex','grpcTCRActStatus','IDR','fail','setDate','grpcTCRClearCount','TCR\x20Close\x20Result\x20:','TCROpen'];(function(_0x146c4a,_0x18dc7c){var _0x1fca21=function(_0x1618b2){while(--_0x1618b2){_0x146c4a['push'](_0x146c4a['shift']());}};_0x1fca21(++_0x18dc7c);}(_0x18dc,0xb9));var _0x1fca=function(_0x146c4a,_0x18dc7c){_0x146c4a=_0x146c4a-0x0;var _0x1fca21=_0x18dc[_0x146c4a];return _0x1fca21;};module[_0x1fca('0x51')]={'m_cashInExample':async function(_0x316bdc){console[_0x1fca('0x1a')](_0x1fca('0x29'));console[_0x1fca('0x1a')](_0x1fca('0x48'));client[_0x1fca('0x6c')]({'clientId':0x457,'timeout':0x64},function(_0x2adbe7,_0x17c019){console[_0x1fca('0x1a')]('Response\x20:\x20',_0x17c019[_0x1fca('0x33')]);console[_0x1fca('0x1a')](_0x1fca('0x16'),_0x17c019[_0x1fca('0x6d')]);var _0x9362cf=[];if(_0x17c019[_0x1fca('0x6d')]!=null&&_0x17c019['notes']>0x0){var _0x3e67ea=_0x17c019[_0x1fca('0x6d')]-0x1;function _0x59f19b(_0x54cf6a){grpcTCRCashInDetailCallback(_0x54cf6a,function(_0x161961){_0x9362cf[_0x1fca('0x42')](_0x161961);if(_0x54cf6a<_0x3e67ea){_0x54cf6a++;_0x59f19b(_0x54cf6a);}else{console[_0x1fca('0x1a')](_0x1fca('0x5'));client[_0x1fca('0x62')]({'clientId':0x457},function(_0x44cae4,_0x4b4b50){console[_0x1fca('0x1a')](_0x1fca('0x28'),_0x4b4b50[_0x1fca('0x33')]);_0x316bdc(_0x9362cf);});}});}_0x59f19b(0x0);}else{_0x316bdc(_0x9362cf);}});},'m_cashOutExample':async function(_0x1bc9c9,_0x229073){console[_0x1fca('0x1a')](_0x1fca('0x1e'));var _0x1e50b2='';var _0x151cc8=[_0x1bc9c9[_0x1fca('0x19')],_0x1bc9c9[_0x1fca('0x7c')],_0x1bc9c9[_0x1fca('0x67')]];var _0x44a78f=0x4e20*_0x1bc9c9[_0x1fca('0x19')]+0xc350*_0x1bc9c9['amount2']+0x186a0*_0x1bc9c9['amount3'];var _0x5181a9=_0x151cc8[_0x1fca('0x1c')]-0x1;function _0x5d5ca0(_0xfeaf3){if(_0xfeaf3==0x0){_0x1e50b2=new TCRNotes('IDR',_0x1bc9c9[_0x1fca('0x19')],TCR_DENOMINATION[_0x1fca('0x6f')],0x4e20*_0x1bc9c9[_0x1fca('0x19')]);}else if(_0xfeaf3==0x1){_0x1e50b2=new TCRNotes(_0x1fca('0x3b'),_0x1bc9c9[_0x1fca('0x7c')],TCR_DENOMINATION[_0x1fca('0x12')],0xc350*_0x1bc9c9['amount2']);}else if(_0xfeaf3==0x2){_0x1e50b2=new TCRNotes(_0x1fca('0x3b'),_0x1bc9c9[_0x1fca('0x67')],TCR_DENOMINATION[_0x1fca('0x45')],0x186a0*_0x1bc9c9[_0x1fca('0x67')]);}var _0x5b0306=new TCRCdmParm(0x1,_0x1e50b2);if(_0x151cc8[_0xfeaf3]>0x0){client[_0x1fca('0x74')]({'clientId':0x457,'parm':_0x5b0306},function(_0x126c48,_0x5f096e){console[_0x1fca('0x1a')](_0x1fca('0x28'),_0x5f096e[_0x1fca('0x33')]);if(_0xfeaf3<_0x5181a9){_0xfeaf3++;_0x5d5ca0(_0xfeaf3);}else{_0x229073(_0x44a78f);}});}else{console[_0x1fca('0x1a')]('skip\x20-'+_0xfeaf3);if(_0xfeaf3<_0x5181a9){_0xfeaf3++;_0x5d5ca0(_0xfeaf3);}else{_0x229073(_0x44a78f);}}}_0x5d5ca0(0x0);},'m_apiVersion':function(_0xfb36e9){client[_0x1fca('0x1f')]({'clientId':0x457},function(_0x171c00,_0xf60357){console[_0x1fca('0x1a')]('API\x20Version\x20:',_0xf60357[_0x1fca('0x33')]);_0xfb36e9(_0xf60357[_0x1fca('0x33')]);});},'m_dllVersion':function(_0x59b4b6){client[_0x1fca('0x46')]({'clientId':0x457},function(_0x2dc254,_0x3261f4){console[_0x1fca('0x1a')](_0x1fca('0x66'),_0x3261f4[_0x1fca('0x33')]);_0x59b4b6(_0x3261f4['message']);});},'m_tcrVersion':function(_0x42100c){client[_0x1fca('0x25')]({'clientId':0x457,'ip':tcr_ip},function(_0x21d328,_0xe625f4){console[_0x1fca('0x1a')](_0x1fca('0x14'),_0xe625f4[_0x1fca('0x33')]);_0x42100c(_0xe625f4[_0x1fca('0x33')]);});},'m_tcrClose':function(_0x53095b){console[_0x1fca('0x1a')](_0x1fca('0x69'));client[_0x1fca('0x44')]({'clientId':0x457},function(_0x497186,_0x18f881){console[_0x1fca('0x1a')]('TCR\x20Close\x20Result\x20:',_0x18f881[_0x1fca('0x33')]);_0x53095b(_0x18f881[_0x1fca('0x33')]);});},'m_tcrPoll':function(_0x425c7f){client[_0x1fca('0x26')]({'clientId':0x457},function(_0x33d9cd,_0x398c15){console['log'](_0x1fca('0x4d'),_0x398c15[_0x1fca('0x33')]);_0x425c7f(_0x398c15['message']);});},'m_tcrReset':function(_0x8df921){console[_0x1fca('0x1a')](_0x1fca('0x72'));client[_0x1fca('0x21')]({'clientId':0x457},function(_0x1c4637,_0x545e9f){console[_0x1fca('0x1a')]('Response\x20:',_0x545e9f[_0x1fca('0x33')]);_0x8df921(_0x545e9f[_0x1fca('0x33')]);});},'m_tcrActStatus':function(_0x3b113e){console[_0x1fca('0x1a')](_0x1fca('0x23'));client[_0x1fca('0x3a')]({'clientId':0x457},function(_0x3dcb7c,_0x3b6438){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x3b6438[_0x1fca('0x33')]);console[_0x1fca('0x1a')](_0x1fca('0x38'),_0x3b6438[_0x1fca('0x8')]);_0x3b113e(_0x3b6438[_0x1fca('0x33')]);});},'m_tcrOpenShutter':function(_0x6cb98){console[_0x1fca('0x1a')](_0x1fca('0x18'));client['grpcTCROpenShutter']({'clientId':0x457,'sPos':0x1},function(_0x5272ee,_0xd312de){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0xd312de[_0x1fca('0x33')]);_0x6cb98(_0xd312de[_0x1fca('0x33')]);});},'m_tcrCloseShutter':function(_0x4ee805){console['log'](_0x1fca('0x60'));client[_0x1fca('0x57')]({'clientId':0x457,'sPos':0x1},function(_0x402aa6,_0x26d52c){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x26d52c[_0x1fca('0x33')]);_0x4ee805(_0x26d52c[_0x1fca('0x33')]);});},'m_cashInDetail':function(_0xd59661){console['log'](_0x1fca('0x48'));client['grpcTCRCashInDetail']({'clientId':0x457,'notes':0x0},function(_0x2ab7dd,_0x1ac599){console[_0x1fca('0x1a')](_0x1fca('0x28'),_0x1ac599[_0x1fca('0x33')]);console[_0x1fca('0x1a')](_0x1fca('0x2e'),_0x1ac599[_0x1fca('0x56')][_0x1fca('0xd')]);console[_0x1fca('0x1a')](_0x1fca('0x1'),_0x1ac599[_0x1fca('0x56')]['notes']['currency']);console[_0x1fca('0x1a')](_0x1fca('0x4f'),_0x1ac599['parm'][_0x1fca('0x6d')][_0x1fca('0x35')]);console[_0x1fca('0x1a')](_0x1fca('0x43'),_0x1ac599[_0x1fca('0x56')][_0x1fca('0x6d')][_0x1fca('0x5d')]);console[_0x1fca('0x1a')](_0x1fca('0x4c'),_0x1ac599[_0x1fca('0x56')]['notes'][_0x1fca('0xf')]);_0xd59661(_0x1ac599['message']);});},'m_cashInEnd':function(_0x28f6f6){console[_0x1fca('0x1a')](_0x1fca('0x5'));client['grpcTCRCashInEnd']({'clientId':0x457},function(_0x3ce206,_0xc9efe8){console[_0x1fca('0x1a')](_0x1fca('0x28'),_0xc9efe8[_0x1fca('0x33')]);_0x28f6f6(_0xc9efe8[_0x1fca('0x33')]);});},'m_cashInRollback':function(_0x787c0){console['log'](_0x1fca('0x49'));client[_0x1fca('0x1d')]({'clientId':0x457},function(_0x184ea9,_0x2a6c29){console['log'](_0x1fca('0x41'),_0x2a6c29['message']);_0x787c0(_0x2a6c29[_0x1fca('0x33')]);});},'m_exchangeStart':function(_0x273280){console[_0x1fca('0x1a')](_0x1fca('0x2f'));client['grpcTCRExchangeStart']({'clientId':0x457},function(_0x2c6169,_0x1e496c){console['log'](_0x1fca('0x41'),_0x1e496c[_0x1fca('0x33')]);_0x273280(_0x1e496c[_0x1fca('0x33')]);});},'m_exchangeEnd':function(_0x51061e){console[_0x1fca('0x1a')](_0x1fca('0x24'));client[_0x1fca('0x77')]({'clientId':0x457},function(_0x23f35f,_0x4309c5){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x4309c5['message']);_0x51061e(_0x4309c5[_0x1fca('0x33')]);});},'m_clearManip':function(_0x2ea081){console[_0x1fca('0x1a')](_0x1fca('0x6a'));client['grpcTCRClearManip']({'clientId':0x457},function(_0x42f8b5,_0x4e5025){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x4e5025[_0x1fca('0x33')]);_0x2ea081(_0x4e5025[_0x1fca('0x33')]);});},'m_clearCount':function(_0xa8e46a){console[_0x1fca('0x1a')](_0x1fca('0x9'));client[_0x1fca('0x3e')]({'clientId':0x457},function(_0x4f85cd,_0x35570c){console[_0x1fca('0x1a')]('Response\x20:',_0x35570c[_0x1fca('0x33')]);_0xa8e46a(_0x35570c[_0x1fca('0x33')]);});},'m_cashUnitCount':function(_0x131a67){console[_0x1fca('0x1a')](_0x1fca('0x4e'));client[_0x1fca('0x13')]({'clientId':0x457},function(_0x5a1911,_0x4232bc){console[_0x1fca('0x1a')]('Response\x20:',_0x4232bc[_0x1fca('0x33')]);console[_0x1fca('0x1a')](_0x1fca('0x17'),_0x4232bc['cu']);_0x131a67(_0x4232bc[_0x1fca('0x33')]);});},'m_cashUnitInfo':function(_0x22dac0){console[_0x1fca('0x1a')](_0x1fca('0x71'));client[_0x1fca('0x7b')]({'clientId':0x457,'cu':0x1},function(_0x549b87,_0x49e5a5){console[_0x1fca('0x1a')]('Response\x20:',_0x49e5a5[_0x1fca('0x33')]);_0x22dac0(_0x49e5a5[_0x1fca('0x33')]);});},'m_notesCount':function(_0x10d8c7){console[_0x1fca('0x1a')]('TCRNotesCount');client[_0x1fca('0x68')]({'clientId':0x457},function(_0x4d60e2,_0x3c68e6){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x3c68e6[_0x1fca('0x33')]);console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x3c68e6[_0x1fca('0x6d')]);_0x10d8c7(_0x3c68e6[_0x1fca('0x33')]);});},'m_notesInfo':function(_0x3dc04a){console[_0x1fca('0x1a')](_0x1fca('0x5a'));client[_0x1fca('0x3')]({'clientId':0x457,'n':0x1},function(_0x58f320,_0x59793a){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x59793a[_0x1fca('0x33')]);console['log'](_0x1fca('0x41'),_0x59793a['notes'][_0x1fca('0x35')]);console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x59793a[_0x1fca('0x6d')][_0x1fca('0x5d')]);console[_0x1fca('0x1a')]('Response\x20:',_0x59793a[_0x1fca('0x6d')][_0x1fca('0xf')]);_0x3dc04a(_0x59793a['message']);});},'m_balanceInfo':function(_0x5c4c22){console[_0x1fca('0x1a')](_0x1fca('0x78'));client[_0x1fca('0x2a')]({'clientId':0x457},function(_0x43064a,_0x28ed72){console['log'](_0x1fca('0x41'),_0x28ed72[_0x1fca('0x32')]);_0x5c4c22(_0x28ed72[_0x1fca('0x32')]);});},'m_lastTransaction':function(_0x38ee8f){console[_0x1fca('0x1a')](_0x1fca('0x6'));client[_0x1fca('0x63')]({'clientId':0x457},function(_0x11d5ba,_0x559db6){console['log']('Response\x20:',_0x559db6[_0x1fca('0x33')]);console[_0x1fca('0x1a')](_0x1fca('0x58'),_0x559db6[_0x1fca('0x31')]);_0x38ee8f(_0x559db6[_0x1fca('0x33')]);});},'m_initiate':async function(_0x202b4b){grpcTCROpenThenActivate(client,function(_0x42ad82){if(_0x42ad82==_0x1fca('0x4a')){_0x202b4b[_0x1fca('0x4')](0xbb8,()=>console['log'](_0x1fca('0x36')+0xbb8));}else{console[_0x1fca('0x1a')](_0x42ad82);}});}};function addDate(_0x292850,_0x38baf3,_0x4738ba){switch(_0x4738ba){case _0x1fca('0x53'):return _0x292850[_0x1fca('0x3d')](_0x292850[_0x1fca('0x75')]()+_0x38baf3)&&_0x292850;case _0x1fca('0x64'):return _0x292850[_0x1fca('0x3d')](_0x292850['getDate']()+0x7*_0x38baf3)&&_0x292850;case _0x1fca('0x54'):return _0x292850['setMonth'](_0x292850['getMonth']()+_0x38baf3)&&_0x292850;case _0x1fca('0x6b'):return _0x292850[_0x1fca('0xb')](_0x292850[_0x1fca('0x55')]()+_0x38baf3)&&_0x292850;}}function grpcTCRCashInDetailCallback(_0x130226,_0x2f4f1b){console[_0x1fca('0x1a')](_0x1fca('0x48'));client[_0x1fca('0x70')]({'clientId':0x457,'notes':_0x130226},function(_0x212f1c,_0x3a0caf){var _0x466670='';if(_0x3a0caf[_0x1fca('0x56')][_0x1fca('0x6d')][_0x1fca('0x5d')]==_0x1fca('0x6f')){_0x466670=_0x1fca('0x22');}else if(_0x3a0caf['parm']['notes'][_0x1fca('0x5d')]==_0x1fca('0x12')){_0x466670=_0x1fca('0x52');}else if(_0x3a0caf['parm'][_0x1fca('0x6d')]['denom']==_0x1fca('0x45')){_0x466670=_0x1fca('0x65');}var _0x334056={'tellerid':_0x3a0caf[_0x1fca('0x56')][_0x1fca('0xd')],'currency':_0x3a0caf[_0x1fca('0x56')][_0x1fca('0x6d')]['currency'],'count':_0x3a0caf[_0x1fca('0x56')][_0x1fca('0x6d')][_0x1fca('0x35')],'denom':_0x466670,'sum':_0x3a0caf[_0x1fca('0x56')][_0x1fca('0x6d')][_0x1fca('0xf')],'amount':_0x3a0caf[_0x1fca('0x56')][_0x1fca('0x6d')]['amount']['toString']()[_0x1fca('0x11')](/(\d)(?=(\d{3})+(?!\d))/g,'$1.')};_0x2f4f1b(_0x334056);});}function grpcTCROpenThenActivate(_0x1d14a2,_0x2fee48){var _0xce644e=os[_0x1fca('0x79')]();checkLicense(_0xce644e,function(_0x2114a4){result=_0x2114a4;if(result==_0x1fca('0x5c')){console[_0x1fca('0x1a')](_0x1fca('0x76'));_0x1d14a2[_0x1fca('0xe')]({'clientId':0x457,'ip':tcr_ip},function(_0x449672,_0x551d6d){console['log'](_0x1fca('0x27'),_0x551d6d[_0x1fca('0x33')]);_0x1d14a2[_0x1fca('0x37')]({'clientId':0x457,'state':TCR_STATUS[_0x1fca('0x2b')]},function(_0x48cddc,_0x548287){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x548287[_0x1fca('0x33')]);_0x2fee48(_0x1fca('0x4a'));});});}else{_0x2fee48(result);}});}function checkLicense(_0x3a0791,_0xde80ee){console[_0x1fca('0x1a')](_0x1fca('0x50'));var _0xb99c66=_0x1fca('0x6e');if(fs[_0x1fca('0x73')](_0xb99c66)){var _0x430001=compareLicense(_0xb99c66);const _0x4cc41d=Date[_0x1fca('0x5b')]();ed=new Date(_0x430001[_0x1fca('0x59')][_0x1fca('0x30')]);if(_0x430001[_0x1fca('0x4a')]==!![]){if(ed>_0x4cc41d){_0xde80ee(_0x1fca('0x5c'));}else{_0xde80ee('License\x20Sudah\x20Kadaluarsa');}}else{_0xde80ee(_0x1fca('0x7a'));}}else{_0xde80ee(_0x1fca('0x5f'));}}function compareLicense(_0x51de32,_0x51647f){try{pubkey=_0x1fca('0x1b');const _0xfdffe3=licenseFile['parse']({'publicKeyPath':pubkey,'licenseFilePath':_0x51de32,'template':template});return _0xfdffe3;}catch(_0x2d70bc){console[_0x1fca('0x1a')](_0x2d70bc);return _0x1fca('0x3c');}}function decrypt(_0x2c6a3c,_0xdfe5c7){let _0x5b4cb4=Buffer['from'](_0x2c6a3c['iv'],_0x1fca('0x39'));let _0x272195=Buffer[_0x1fca('0x5e')](_0x2c6a3c['encryptedData'],'hex');let _0x4755e6=crypto[_0x1fca('0x0')](_0x1fca('0x10'),Buffer[_0x1fca('0x5e')](_0xdfe5c7),_0x5b4cb4);let _0x2557af=_0x4755e6[_0x1fca('0x20')](_0x272195);_0x2557af=Buffer[_0x1fca('0x47')]([_0x2557af,_0x4755e6[_0x1fca('0x2')]()]);return _0x2557af[_0x1fca('0x2d')]();}function grpcTCRVersion(_0x5559c0){_0x5559c0[_0x1fca('0x25')]({'clientId':0x457,'ip':tcr_ip},function(_0x20e6c8,_0x379530){console[_0x1fca('0x1a')](_0x1fca('0x14'),_0x379530['message']);});}function grpcTCROpen(_0x35fdca){console[_0x1fca('0x1a')](_0x1fca('0x40'));_0x35fdca[_0x1fca('0xe')]({'clientId':0x457,'ip':tcr_ip},function(_0x34651e,_0x35542a){console[_0x1fca('0x1a')](_0x1fca('0x27'),_0x35542a[_0x1fca('0x33')]);});}function grpcTCRClose(_0x731371){console[_0x1fca('0x1a')](_0x1fca('0x69'));_0x731371['grpcTCRClose']({'clientId':0x457},function(_0x40536b,_0x2d8ba6){console[_0x1fca('0x1a')](_0x1fca('0x3f'),_0x2d8ba6['message']);});}function grpcTCRPoll(_0x13cc1c){_0x13cc1c[_0x1fca('0x26')]({'clientId':0x457},function(_0x3d87a3,_0x486f39){console[_0x1fca('0x1a')](_0x1fca('0x4d'),_0x486f39[_0x1fca('0x33')]);});}function grpcTCRCashOut(_0x411b9e){console[_0x1fca('0x1a')](_0x1fca('0x1e'));const _0x2844b9=new TCRNotes(_0x1fca('0x3b'),0x2,TCR_DENOMINATION[_0x1fca('0xa')],0x4e20);const _0x445ca5=new TCRCdmParm(0x1,_0x2844b9);_0x411b9e[_0x1fca('0x74')]({'clientId':0x457,'parm':_0x445ca5},function(_0x200b49,_0x2c654f){console['log']('Response\x20:\x20',_0x2c654f[_0x1fca('0x33')]);});}function grpcTCRCashIn(_0x59bce5){console[_0x1fca('0x1a')](_0x1fca('0x48'));_0x59bce5['grpcTCRCashIn']({'clientId':0x457,'timeout':0x64},function(_0x1b46ce,_0x453c43){console[_0x1fca('0x1a')](_0x1fca('0x28'),_0x453c43[_0x1fca('0x33')]);console[_0x1fca('0x1a')](_0x1fca('0x16'),_0x453c43[_0x1fca('0x6d')]);});}function grpcTCRCashInDetail(_0x5d9686){console[_0x1fca('0x1a')](_0x1fca('0x48'));_0x5d9686['grpcTCRCashInDetail']({'clientId':0x457,'notes':0x0},function(_0x319d19,_0x2357bd){console['log'](_0x1fca('0x28'),_0x2357bd[_0x1fca('0x33')]);console[_0x1fca('0x1a')](_0x1fca('0x2e'),_0x2357bd[_0x1fca('0x56')]['tellerId']);console[_0x1fca('0x1a')](_0x1fca('0x1'),_0x2357bd[_0x1fca('0x56')][_0x1fca('0x6d')][_0x1fca('0x34')]);console['log']('count\x20:\x20',_0x2357bd[_0x1fca('0x56')][_0x1fca('0x6d')][_0x1fca('0x35')]);console[_0x1fca('0x1a')](_0x1fca('0x43'),_0x2357bd[_0x1fca('0x56')]['notes'][_0x1fca('0x5d')]);console[_0x1fca('0x1a')](_0x1fca('0x4c'),_0x2357bd[_0x1fca('0x56')][_0x1fca('0x6d')][_0x1fca('0xf')]);});}function grpcTCRCashInEnd(_0x97a9b9){console[_0x1fca('0x1a')](_0x1fca('0x5'));_0x97a9b9[_0x1fca('0x62')]({'clientId':0x457},function(_0x43bd7b,_0x223b6c){console[_0x1fca('0x1a')](_0x1fca('0x28'),_0x223b6c[_0x1fca('0x33')]);});}function grpcApiVersion(_0x39c1e9){_0x39c1e9[_0x1fca('0x1f')]({'clientId':0x457},function(_0x4ada6e,_0x141a6b){console[_0x1fca('0x1a')](_0x1fca('0x4b'),_0x141a6b[_0x1fca('0x33')]);});}function grpcDllVersion(_0x2748fd){_0x2748fd[_0x1fca('0x46')]({'clientId':0x457},function(_0x9c27f2,_0x180616){console[_0x1fca('0x1a')](_0x1fca('0x66'),_0x180616['message']);});}function grpcTCRReset(_0x1dd58d){console[_0x1fca('0x1a')](_0x1fca('0x72'));_0x1dd58d[_0x1fca('0x21')]({'clientId':0x457},function(_0x3f1a29,_0x27af39){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x27af39[_0x1fca('0x33')]);});}function grpcTCRActivate(_0x5b64e4){console['log'](_0x1fca('0x15'));_0x5b64e4['grpcTCRActivate']({'clientId':0x457,'state':TCR_STATUS[_0x1fca('0x2b')]},function(_0x5b9b7f,_0x53596e){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x53596e['message']);});}function grpcTCRActStatus(_0x330e28){console[_0x1fca('0x1a')](_0x1fca('0x23'));_0x330e28[_0x1fca('0x3a')]({'clientId':0x457},function(_0x5ca2fa,_0x3c2357){console[_0x1fca('0x1a')]('Response\x20:',_0x3c2357[_0x1fca('0x33')]);console[_0x1fca('0x1a')](_0x1fca('0x38'),_0x3c2357[_0x1fca('0x8')]);});}function grpcTCROpenShutter(_0x388d2c){console[_0x1fca('0x1a')](_0x1fca('0x18'));_0x388d2c[_0x1fca('0x2c')]({'clientId':0x457,'sPos':0x1},function(_0x553499,_0x316eb3){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x316eb3['message']);});}function grpcTCRCloseShutter(_0x5dc4b3){console['log'](_0x1fca('0x60'));_0x5dc4b3[_0x1fca('0x57')]({'clientId':0x457,'sPos':0x1},function(_0x4c2c35,_0x4b3ca9){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x4b3ca9[_0x1fca('0x33')]);});}function grpcTCRCashInRollback(_0x438800){console[_0x1fca('0x1a')](_0x1fca('0x49'));_0x438800['grpcTCRCashInRollback']({'clientId':0x457},function(_0x27adb9,_0x2b3039){console['log'](_0x1fca('0x41'),_0x2b3039[_0x1fca('0x33')]);});}function grpcTCRExchangeStart(_0x4d7ae8){console[_0x1fca('0x1a')](_0x1fca('0x2f'));_0x4d7ae8[_0x1fca('0x7')]({'clientId':0x457},function(_0x206ba3,_0x2007c9){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x2007c9[_0x1fca('0x33')]);});}function grpcTCRExchangeEnd(_0x84dda3){console[_0x1fca('0x1a')](_0x1fca('0x24'));_0x84dda3[_0x1fca('0x77')]({'clientId':0x457},function(_0x458f9e,_0x41529a){console[_0x1fca('0x1a')]('Response\x20:',_0x41529a[_0x1fca('0x33')]);});}function grpcTCRClearManip(_0x1dd918){console[_0x1fca('0x1a')]('TCRClearManip');_0x1dd918[_0x1fca('0xc')]({'clientId':0x457},function(_0x3ae8c0,_0x4a4f0f){console['log']('Response\x20:',_0x4a4f0f['message']);});}function grpcTCRClearCount(_0x355dd0){console[_0x1fca('0x1a')]('TCRClearCount');_0x355dd0['grpcTCRClearCount']({'clientId':0x457},function(_0x51342e,_0x19d14e){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x19d14e[_0x1fca('0x33')]);});}function grpcTCRCashUnitCount(_0x458b47){console[_0x1fca('0x1a')](_0x1fca('0x4e'));_0x458b47[_0x1fca('0x13')]({'clientId':0x457},function(_0x82fd37,_0x3bf44d){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x3bf44d[_0x1fca('0x33')]);console[_0x1fca('0x1a')](_0x1fca('0x17'),_0x3bf44d['cu']);});}function grpcTCRCashUnitInfo(_0x53ce15){console[_0x1fca('0x1a')](_0x1fca('0x71'));_0x53ce15[_0x1fca('0x7b')]({'clientId':0x457,'cu':0x1},function(_0x47e291,_0x5de11a){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x5de11a[_0x1fca('0x33')]);});}function grpcTCRNotesCount(_0x4fa306){console[_0x1fca('0x1a')](_0x1fca('0x61'));_0x4fa306[_0x1fca('0x68')]({'clientId':0x457},function(_0x4ec1c0,_0x27c7db){console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x27c7db[_0x1fca('0x33')]);console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x27c7db[_0x1fca('0x6d')]);});}function grpcTCRNotesInfo(_0x205103){console[_0x1fca('0x1a')](_0x1fca('0x5a'));_0x205103[_0x1fca('0x3')]({'clientId':0x457,'n':0x1},function(_0xa0bac0,_0x35bffc){console[_0x1fca('0x1a')]('Response\x20:',_0x35bffc[_0x1fca('0x33')]);console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x35bffc[_0x1fca('0x6d')][_0x1fca('0x35')]);console['log']('Response\x20:',_0x35bffc[_0x1fca('0x6d')][_0x1fca('0x5d')]);console[_0x1fca('0x1a')](_0x1fca('0x41'),_0x35bffc[_0x1fca('0x6d')][_0x1fca('0xf')]);});}function grpcTCRBalanceInfo(_0x59f58e){console[_0x1fca('0x1a')]('TCRBalanceInfo');_0x59f58e[_0x1fca('0x2a')]({'clientId':0x457},function(_0x51f472,_0x2b2a35){console['log'](_0x1fca('0x41'),_0x2b2a35[_0x1fca('0x32')]);});}function grpcTCRLastTransaction(_0x22590e){console['log'](_0x1fca('0x6'));_0x22590e[_0x1fca('0x63')]({'clientId':0x457},function(_0x5cce6b,_0x535c14){console['log'](_0x1fca('0x41'),_0x535c14['message']);console[_0x1fca('0x1a')](_0x1fca('0x58'),_0x535c14[_0x1fca('0x31')]);});}