fyers-api-v3 2.3.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HSM/datasocket.min.js +1 -1
- package/HSM_Package/hslib.js +1 -5
- package/README.md +156 -2
- package/apiService/apiService.js +67 -23
- package/config/config.js +1 -1
- package/package.json +4 -2
- package/sample/datasocket.js +162 -19
- package/sample/tbtsocket.js +1 -1
package/HSM_Package/hslib.js
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
const WebSocket = require('ws');
|
|
2
|
-
|
|
3
|
-
'use strict';const a0_0x56c57c=a0_0x44d5;(function(_0x1cd599,_0x48a876){const _0x1cf9c2=a0_0x44d5,_0x144410=_0x1cd599();while(!![]){try{const _0x287573=-parseInt(_0x1cf9c2(0x1af))/0x1+-parseInt(_0x1cf9c2(0xf2))/0x2*(parseInt(_0x1cf9c2(0xf1))/0x3)+-parseInt(_0x1cf9c2(0x1df))/0x4+-parseInt(_0x1cf9c2(0x104))/0x5*(-parseInt(_0x1cf9c2(0x16b))/0x6)+-parseInt(_0x1cf9c2(0x102))/0x7+parseInt(_0x1cf9c2(0x214))/0x8*(-parseInt(_0x1cf9c2(0x227))/0x9)+parseInt(_0x1cf9c2(0x1a1))/0xa;if(_0x287573===_0x48a876)break;else _0x144410['push'](_0x144410['shift']());}catch(_0x50efd7){_0x144410['push'](_0x144410['shift']());}}}(a0_0x106d,0xb3935));class Constants{constructor(){}}Constants[a0_0x56c57c(0x1ee)]=a0_0x56c57c(0x1cf),Constants[a0_0x56c57c(0x15b)]=0x1e,Constants['isSingleLib']=!![],Constants[a0_0x56c57c(0x18f)]=![],Constants[a0_0x56c57c(0x1ad)]=![],Constants[a0_0x56c57c(0xe7)]=0x5dc,Constants[a0_0x56c57c(0xff)]=-0x80000000,Constants[a0_0x56c57c(0x1a7)]=!![],Constants[a0_0x56c57c(0x1c3)]=0x1,Constants['INDEX_LITE_FCOUNT']=0x1;class Log{constructor(){}static[a0_0x56c57c(0x1b4)](_0x445363){const _0x1d6a51=a0_0x56c57c;if(Constants[_0x1d6a51(0x18f)])console[_0x1d6a51(0x14a)](_0x445363);}static[a0_0x56c57c(0x21d)](_0x795e96){const _0x2355b9=a0_0x56c57c;if(Constants[_0x2355b9(0x1ad)])console[_0x2355b9(0x14a)](_0x795e96);}}var RESPONSE_KEYS;(function(_0x426d7b){const _0x5d6afa=a0_0x56c57c;_0x426d7b[_0x5d6afa(0x1b2)]=_0x5d6afa(0x15f),_0x426d7b[_0x5d6afa(0x133)]=_0x5d6afa(0x1dd),_0x426d7b[_0x5d6afa(0xfb)]='msg',_0x426d7b[_0x5d6afa(0x1e1)]=_0x5d6afa(0x17e),_0x426d7b[_0x5d6afa(0x150)]=_0x5d6afa(0x1bb);}(RESPONSE_KEYS||(RESPONSE_KEYS={})));var RESPONSE_VALUES;(function(_0x222b56){const _0x43d5a5=a0_0x56c57c;_0x222b56[_0x43d5a5(0x1d6)]=_0x43d5a5(0x155),_0x222b56['FAILED']=_0x43d5a5(0x12b),_0x222b56[_0x43d5a5(0x225)]=_0x43d5a5(0x15c),_0x222b56[_0x43d5a5(0x12a)]='--';}(RESPONSE_VALUES||(RESPONSE_VALUES={})));var CHANNEL_DATA_MODE;(function(_0x15a332){const _0x106169=a0_0x56c57c;_0x15a332[_0x15a332['LITE']=0x4c]=_0x106169(0x1ec),_0x15a332[_0x15a332[_0x106169(0x1db)]=0x46]=_0x106169(0x1db);}(CHANNEL_DATA_MODE||(CHANNEL_DATA_MODE={})));var ResponseTypes;(function(_0x213309){const _0x23fa6c=a0_0x56c57c;_0x213309[_0x213309[_0x23fa6c(0xfa)]=0x53]=_0x23fa6c(0xfa),_0x213309[_0x213309[_0x23fa6c(0x14c)]=0x55]=_0x23fa6c(0x14c),_0x213309[_0x213309['LITE']=0x4c]=_0x23fa6c(0x1ec);}(ResponseTypes||(ResponseTypes={})));var BinRespStat;(function(_0x440651){_0x440651['OK']='K',_0x440651['NOT_OK']='N';}(BinRespStat||(BinRespStat={})));var STAT;(function(_0x26eb38){const _0x2a0435=a0_0x56c57c;_0x26eb38['OK']='Ok',_0x26eb38[_0x2a0435(0x175)]=_0x2a0435(0x18b);}(STAT||(STAT={})));var TopicTypes;(function(_0x2a55b2){_0x2a55b2['SCRIP']='sf',_0x2a55b2['INDEX']='if',_0x2a55b2['DEPTH']='dp';}(TopicTypes||(TopicTypes={})));var Keys;(function(_0x2a021c){const _0x4c5db5=a0_0x56c57c;_0x2a021c[_0x4c5db5(0x133)]='type',_0x2a021c['USER_ID']='user',_0x2a021c[_0x4c5db5(0x1b7)]=_0x4c5db5(0x1b6),_0x2a021c[_0x4c5db5(0x211)]=_0x4c5db5(0x1ed),_0x2a021c[_0x4c5db5(0x19d)]=_0x4c5db5(0x220),_0x2a021c[_0x4c5db5(0x147)]=_0x4c5db5(0x100),_0x2a021c[_0x4c5db5(0x192)]=_0x4c5db5(0x1ef),_0x2a021c[_0x4c5db5(0x11d)]='redis',_0x2a021c[_0x4c5db5(0x18c)]=_0x4c5db5(0xf0),_0x2a021c[_0x4c5db5(0x156)]=_0x4c5db5(0x1cc),_0x2a021c[_0x4c5db5(0x184)]=_0x4c5db5(0x201),_0x2a021c['OPC_KEY']='key',_0x2a021c[_0x4c5db5(0x1c8)]=_0x4c5db5(0x101),_0x2a021c['SID']='Sid',_0x2a021c[_0x4c5db5(0x19b)]='x-access-token',_0x2a021c[_0x4c5db5(0x20f)]=_0x4c5db5(0x1d5);}(Keys||(Keys={})));var ReqTypeValues;(function(_0x55faee){const _0xa50dbb=a0_0x56c57c;_0x55faee['CONNECTION']='cn',_0x55faee[_0xa50dbb(0xf4)]=_0xa50dbb(0x142),_0x55faee[_0xa50dbb(0x19c)]=_0xa50dbb(0xe3),_0x55faee[_0xa50dbb(0x1e7)]=_0xa50dbb(0x138),_0x55faee[_0xa50dbb(0x20c)]=_0xa50dbb(0x134),_0x55faee[_0xa50dbb(0x204)]=_0xa50dbb(0x210),_0x55faee['DEPTH_UNSUBS']=_0xa50dbb(0x1d4),_0x55faee['CHANNEL_RESUME']='cr',_0x55faee[_0xa50dbb(0x16c)]='cp',_0x55faee['SNAP_MW']=_0xa50dbb(0x10e),_0x55faee[_0xa50dbb(0x11f)]=_0xa50dbb(0x136),_0x55faee[_0xa50dbb(0x1bf)]=_0xa50dbb(0x1c1),_0x55faee[_0xa50dbb(0x216)]=_0xa50dbb(0x122),_0x55faee['LITE']=_0xa50dbb(0x169),_0x55faee[_0xa50dbb(0x1db)]=_0xa50dbb(0x182),_0x55faee[_0xa50dbb(0x13b)]='ti',_0x55faee[_0xa50dbb(0x1f0)]=_0xa50dbb(0xfd),_0x55faee[_0xa50dbb(0x224)]=_0xa50dbb(0x1f9),_0x55faee['LOG']='log';}(ReqTypeValues||(ReqTypeValues={})));var RespTypeValues;(function(_0xac7d25){const _0x25bfe3=a0_0x56c57c;_0xac7d25[_0x25bfe3(0x16f)]='cn',_0xac7d25[_0x25bfe3(0x154)]=_0x25bfe3(0x13e),_0xac7d25[_0x25bfe3(0xf8)]='unsub',_0xac7d25[_0x25bfe3(0xfa)]=_0x25bfe3(0x203),_0xac7d25[_0x25bfe3(0x110)]='cr',_0xac7d25[_0x25bfe3(0xe5)]='cp',_0xac7d25[_0x25bfe3(0x1e8)]=_0x25bfe3(0x122),_0xac7d25[_0x25bfe3(0x1ec)]='lit',_0xac7d25[_0x25bfe3(0x1db)]=_0x25bfe3(0x182);}(RespTypeValues||(RespTypeValues={})));var BinRespTypes;(function(_0x153b2c){const _0x36db24=a0_0x56c57c;_0x153b2c[_0x153b2c['CONNECTION_TYPE']=0x1]=_0x36db24(0x1c0),_0x153b2c[_0x153b2c[_0x36db24(0x222)]=0x2]='THROTTLING_TYPE',_0x153b2c[_0x153b2c[_0x36db24(0x1e4)]=0x3]='ACK_TYPE',_0x153b2c[_0x153b2c[_0x36db24(0xfc)]=0x4]='SUBSCRIBE_TYPE',_0x153b2c[_0x153b2c['UNSUBSCRIBE_TYPE']=0x5]=_0x36db24(0x135),_0x153b2c[_0x153b2c[_0x36db24(0xec)]=0x6]=_0x36db24(0xec),_0x153b2c[_0x153b2c[_0x36db24(0x129)]=0x7]=_0x36db24(0x129),_0x153b2c[_0x153b2c['CHRESUME_TYPE']=0x8]='CHRESUME_TYPE',_0x153b2c[_0x153b2c[_0x36db24(0x173)]=0x9]=_0x36db24(0x173),_0x153b2c[_0x153b2c[_0x36db24(0x195)]=0xa]=_0x36db24(0x195),_0x153b2c[_0x153b2c[_0x36db24(0x20a)]=0xc]='LITE_FULL';}(BinRespTypes||(BinRespTypes={})));var RespCodes;(function(_0x2333f6){const _0x807079=a0_0x56c57c;_0x2333f6[_0x2333f6[_0x807079(0x1d2)]=0xc8]=_0x807079(0x1d2),_0x2333f6[_0x2333f6['CONNECTION_FAILED']=0x2af9]=_0x807079(0x123),_0x2333f6[_0x2333f6[_0x807079(0xea)]=0x2afa]='CONNECTION_INVALID',_0x2333f6[_0x2333f6[_0x807079(0x1a2)]=0x2b03]=_0x807079(0x1a2),_0x2333f6[_0x2333f6[_0x807079(0x181)]=0x2b04]=_0x807079(0x181),_0x2333f6[_0x2333f6['SNAPSHOT_FAILED']=0x2b05]='SNAPSHOT_FAILED',_0x2333f6[_0x2333f6['CHANNELP_FAILED']=0x2b17]='CHANNELP_FAILED',_0x2333f6[_0x2333f6[_0x807079(0x116)]=0x2b18]=_0x807079(0x116);}(RespCodes||(RespCodes={})));var PREFIX;(function(_0x281b16){const _0x83a3f3=a0_0x56c57c;_0x281b16[_0x83a3f3(0x124)]='dp',_0x281b16[_0x83a3f3(0x171)]='sf',_0x281b16[_0x83a3f3(0x228)]='if';}(PREFIX||(PREFIX={})));function a0_0x44d5(_0x35008c,_0x4aa09f){const _0x106dcb=a0_0x106d();return a0_0x44d5=function(_0x44d5a3,_0x5a4abb){_0x44d5a3=_0x44d5a3-0xe3;let _0x1f4f3e=_0x106dcb[_0x44d5a3];return _0x1f4f3e;},a0_0x44d5(_0x35008c,_0x4aa09f);}var SCRIPFID_MAP;(function(_0x55d6b2){const _0x1d06b2=a0_0x56c57c;_0x55d6b2[_0x1d06b2(0xe8)]=_0x1d06b2(0x16a),_0x55d6b2[_0x1d06b2(0x1f7)]=_0x1d06b2(0x10d),_0x55d6b2['TURNOVER']=_0x1d06b2(0x178),_0x55d6b2[_0x1d06b2(0x160)]='s104',_0x55d6b2[_0x1d06b2(0x1a3)]=_0x1d06b2(0x1a6),_0x55d6b2[_0x1d06b2(0x1d0)]=_0x1d06b2(0x157),_0x55d6b2[_0x1d06b2(0x119)]=_0x1d06b2(0x1b0);}(SCRIPFID_MAP||(SCRIPFID_MAP={})));var FieldTypes;(function(_0x16838d){const _0x300e68=a0_0x56c57c;_0x16838d[_0x16838d[_0x300e68(0x106)]=0x0]=_0x300e68(0x106),_0x16838d[_0x16838d[_0x300e68(0x18a)]=0x1]=_0x300e68(0x18a),_0x16838d[_0x16838d['DATE']=0x2]=_0x300e68(0x1e9),_0x16838d[_0x16838d[_0x300e68(0x1ab)]=0x3]=_0x300e68(0x1ab);}(FieldTypes||(FieldTypes={})));var INDEXFID_MAP;(function(_0x3f1434){const _0x50dbe5=a0_0x56c57c;_0x3f1434['LTP']='i102',_0x3f1434[_0x50dbe5(0x1d0)]=_0x50dbe5(0x125),_0x3f1434[_0x50dbe5(0xe8)]=_0x50dbe5(0x151),_0x3f1434[_0x50dbe5(0x1f7)]=_0x50dbe5(0x13f);}(INDEXFID_MAP||(INDEXFID_MAP={})));var SCRIP_INDEX;(function(_0x188b29){const _0x337fe5=a0_0x56c57c;_0x188b29[_0x188b29[_0x337fe5(0x160)]=0x1]=_0x337fe5(0x160),_0x188b29[_0x188b29[_0x337fe5(0x1a3)]=0x0]=_0x337fe5(0x1a3),_0x188b29[_0x188b29[_0x337fe5(0x1d0)]=0x14]=_0x337fe5(0x1d0),_0x188b29[_0x188b29[_0x337fe5(0x119)]=0xb]='VWAP',_0x188b29[_0x188b29['CHANGE']=0x15]=_0x337fe5(0xe8),_0x188b29[_0x188b29['PERCHANGE']=0x16]=_0x337fe5(0x168),_0x188b29[_0x188b29[_0x337fe5(0x219)]=0x17]=_0x337fe5(0x219);}(SCRIP_INDEX||(SCRIP_INDEX={})));var INDEX_INDEX;(function(_0x2858e8){const _0x2aabc3=a0_0x56c57c;_0x2858e8[_0x2858e8[_0x2aabc3(0x1a3)]=0x0]='LTP',_0x2858e8[_0x2858e8[_0x2aabc3(0x1d0)]=0x1]=_0x2aabc3(0x1d0),_0x2858e8[_0x2858e8['CHANGE']=0x6]=_0x2aabc3(0xe8),_0x2858e8[_0x2858e8['PERCHANGE']=0x7]=_0x2aabc3(0x168);}(INDEX_INDEX||(INDEX_INDEX={})));class ByteBuilder{constructor(_0x4b9862){const _0x348a0b=a0_0x56c57c;this[_0x348a0b(0x1b8)]=new Uint8Array(_0x4b9862),this[_0x348a0b(0x146)]=0x2;}[a0_0x56c57c(0x179)](){const _0x379d0a=a0_0x56c57c;this[_0x379d0a(0x146)]=0x0;}[a0_0x56c57c(0x1d7)](){const _0x29fdfc=a0_0x56c57c;return this[_0x29fdfc(0x146)];}[a0_0x56c57c(0x183)](){const _0x134294=a0_0x56c57c;let _0x92f204=this[_0x134294(0x146)]-0x2;return this['data'][0x0]=_0x92f204>>0x8&0xff,this[_0x134294(0x1b8)][0x1]=_0x92f204&0xff,this[_0x134294(0x1b8)];}[a0_0x56c57c(0x1f5)](_0xf9e98c,_0x801718){const _0x5e3110=a0_0x56c57c;_0x801718==undefined?this[_0x5e3110(0x1b8)][this[_0x5e3110(0x146)]++]=_0xf9e98c:this[_0x5e3110(0x1b8)][_0x801718]=_0xf9e98c;}[a0_0x56c57c(0x188)](_0x5d128c,_0x29709f){const _0x4463a3=a0_0x56c57c;_0x29709f==undefined?this['data'][this['pos']++]=_0x5d128c:this[_0x4463a3(0x1b8)][_0x29709f]=_0x5d128c;}['appendShort'](_0x4bda95){const _0x2e3002=a0_0x56c57c;this['data'][this[_0x2e3002(0x146)]++]=_0x4bda95>>0x8&0xff,this[_0x2e3002(0x1b8)][this[_0x2e3002(0x146)]++]=_0x4bda95&0xff;}['appendInt'](_0x25cf5f){const _0x176940=a0_0x56c57c;this[_0x176940(0x1b8)][this[_0x176940(0x146)]++]=_0x25cf5f>>0x18&0xff,this[_0x176940(0x1b8)][this['pos']++]=_0x25cf5f>>0x10&0xff,this[_0x176940(0x1b8)][this[_0x176940(0x146)]++]=_0x25cf5f>>0x8&0xff,this[_0x176940(0x1b8)][this[_0x176940(0x146)]++]=_0x25cf5f&0xff;}['appendLong'](_0x1cb590){const _0x347695=a0_0x56c57c;this['data'][this[_0x347695(0x146)]++]=_0x1cb590>>0x38&0xff,this[_0x347695(0x1b8)][this[_0x347695(0x146)]++]=_0x1cb590>>0x30&0xff,this['data'][this[_0x347695(0x146)]++]=_0x1cb590>>0x28&0xff,this[_0x347695(0x1b8)][this[_0x347695(0x146)]++]=_0x1cb590>>0x20&0xff,this['data'][this['pos']++]=_0x1cb590>>0x18&0xff,this['data'][this[_0x347695(0x146)]++]=_0x1cb590>>0x10&0xff,this[_0x347695(0x1b8)][this[_0x347695(0x146)]++]=_0x1cb590>>0x8&0xff,this['data'][this['pos']++]=_0x1cb590&0xff;}[a0_0x56c57c(0x1ea)](_0x462ef1){const _0x5d23f0=a0_0x56c57c,_0x5978bc=BigInt(_0x462ef1);this[_0x5d23f0(0x1b8)][this['pos']++]=Number(_0x5978bc>>BigInt(0x38)&BigInt(0xff)),this[_0x5d23f0(0x1b8)][this[_0x5d23f0(0x146)]++]=Number(_0x5978bc>>BigInt(0x30)&BigInt(0xff)),this[_0x5d23f0(0x1b8)][this[_0x5d23f0(0x146)]++]=Number(_0x5978bc>>BigInt(0x28)&BigInt(0xff)),this['data'][this[_0x5d23f0(0x146)]++]=Number(_0x5978bc>>BigInt(0x20)&BigInt(0xff)),this[_0x5d23f0(0x1b8)][this[_0x5d23f0(0x146)]++]=Number(_0x5978bc>>BigInt(0x18)&BigInt(0xff)),this[_0x5d23f0(0x1b8)][this['pos']++]=Number(_0x5978bc>>BigInt(0x10)&BigInt(0xff)),this[_0x5d23f0(0x1b8)][this[_0x5d23f0(0x146)]++]=Number(_0x5978bc>>BigInt(0x8)&BigInt(0xff)),this[_0x5d23f0(0x1b8)][this[_0x5d23f0(0x146)]++]=Number(_0x5978bc&BigInt(0xff));}[a0_0x56c57c(0x21b)](_0x4653f8){const _0x3c8df8=a0_0x56c57c;for(let _0x4931bd=0x0;_0x4931bd<_0x4653f8[_0x3c8df8(0x1eb)];_0x4931bd++)this['data'][this[_0x3c8df8(0x146)]++]=_0x4653f8[_0x3c8df8(0x218)](_0x4931bd);}[a0_0x56c57c(0x21c)](_0x36aec0,_0x5366a5){const _0x5b412f=a0_0x56c57c;let _0x5a04f2=_0x5366a5==undefined?_0x36aec0['length']:_0x5366a5;for(let _0x52a65c=0x0;_0x52a65c<_0x5a04f2;_0x52a65c++)this[_0x5b412f(0x1b8)][this[_0x5b412f(0x146)]++]=_0x36aec0[_0x52a65c];}}class FieldData{constructor(_0x18b853,_0x4531f7,_0x1f71dd,_0xce1967){const _0x9faf0a=a0_0x56c57c;this['fId']=_0x18b853,this[_0x9faf0a(0x139)]=_0x4531f7,this[_0x9faf0a(0x1dd)]=_0x1f71dd,this['desc']=_0xce1967;}}function a0_0x106d(){const _0x56475a=['CLOSE','keys','SUCCESS','pow','dpu','source','SUCCESSFUL','getPosition','hsParser','error','setMultiplierAndPrec','FULL','CHANGE_INDEX','type','\x0aDepth::','959580FzxuGw','Maximum\x20scrips\x20allowed\x20per\x20request\x20is\x20','STAT_CODE','open','^(0{1}[1-9]|[12][0-9]|3[01])/(0{1}[1-9]|1[012])/20\x5cd{2}$','ACK_TYPE','LTP_INDEX','onclose','INDEX_SUBS','OPC','DATE','appendLongAsBigInt','length','LITE','scrips','LIB_VERSION','jwt','STR','packets.length:\x20','Connect...','getMinutes','index:','appendByte','index','PCHANGE','User\x20call','fcn','intervalId','liteFCount','getOpChainSubsRequest',',\x20val:','fcount1:\x20','toString','strJson','lowstk','Cleanup\x20previous\x20connection','snap','DEPTH_SUBS','onerror','WebSocket\x20not\x20initialized!','Number','pingFunction','onopen','LITE_FULL','pingRequest','INDEX_UNSUBS','isScripOK','exchange','SOURCE','dps','SCRIPS','setStringValues','reason','11202584HMSZis','USER_ID','OPC_SUBS','prec:\x20','charCodeAt','TURNOVER','get','appendString','appendByteArray','hsiDebug','setLongValues','appendInt','channelnum','PER_CHANGE_INDEX','THROTTLING_TYPE','_instance','FORCE_CONNECTION','INVD_FLD_COUNT','Invalid\x20topic\x20feed\x20type\x20!','9bqPKtU','INDEX','mwu','buf2Long','CHANNELP','onClose::CloseCode:','MAX_SCRIPS','CHANGE','OPEN','CONNECTION_INVALID','prepareChannelRequest','DATA_TYPE',',\x20WasClean:','Authorization\x20mode\x20is\x20enabled:\x20Authorization\x20or\x20Sid\x20not\x20found\x20!','Conn\x20fCount:','stkprc','3ONZxdx','2003872xLZkzX','set','SCRIP_SUBS','createMapingsMap','prepareJson','counter','UNSUBS','prepareSubsUnSubsRequest','SNAP','MSG','SUBSCRIBE_TYPE','str','hfid','TRASH_VAL','channelnums','Authorization','9666909hTbaBb','Topic\x20Not\x20Available\x20in\x20TopicList!','24615wCosJU','JS_API','FLOAT32','scrip','interval','prepareLiteChannelRequest','prepareConnectionRequest','FAILED','Unable\x20to\x20send\x20request\x20!,\x20Reason:\x20Connection\x20faulty\x20or\x20request\x20not\x20valid\x20!','f102','mwsp','topic\x20Id:\x20','CHANNELR','CLOSE_INDEX','subscription\x20failed','TURNOVER_INDEX','Invalid\x20conn\x20mode\x20!','Processing\x20dynamic\x20mapping....','CHANNELR_FAILED','heartBeatIntervalInMS','onOpen','VWAP','getHours','updates\x20......','SID','REDIS_KEY','push','SNAP_DP','prepareData','Open','opc','CONNECTION_FAILED','DEPTH','i103','onMessage','getMonth','inWS','CHPAUSE_TYPE','NOT_AVL','failed','substring','startPingInterval','Error:\x20Channel\x20values\x20must\x20be\x20in\x20this\x20range\x20\x20[\x20val\x20>\x200\x20&&\x20val\x20<\x2065\x20]','getAcknowledgementReq','sendJsonArrResp',',\x20Reason:','parseData','TYPE','ifu','UNSUBSCRIBE_TYPE','dpsp','LOG','ifs','key','onClose','THROTTLING_INTERVAL','appendShort','readyState','sub','f105','getKey','ConvNumber','mws','\x0aScrip::','getFormatDate2','VOLUME_INDEX','pos','CHANNEL_NUMS','DEPTH_UNSUBS','index_lite','log','INDEX_LITE_FCOUNT','UPDATE','multiplier','leadingZero','feedType','STREAM_DATA_CONFIG','f104','slice','concat','SUBS','successful','HIGH_STK','s121','onError::MSG:','forEach','isConnected','DEFAULT_HEARTBEAT_INTERVAL','invalid\x20field\x20count','buf2String','reqData','stat','VOLUME','getSeconds','precisionValue','fid','fld','fieldDataArray','mappingArray','CHANNELP_FAILED','PERCHANGE','lit','f101','1422IYHOsj','CHANNEL_PAUSE','tSymbol','Invalid\x20Request\x20!','CONN','HSI\x20WebSocket\x20not\x20initialized!','SCRIP','onError','SNAPSHOT','url','NOT_OK','details','precision','f103','clear','binaryType','hsiWs','stringify','send','stCode','prepareConnectionRequestOld','VWAP_INDEX','UNSUBSCRIPTION_FAILED','ful','getBytes','LOW_STK','getInstance','getStringFieldsJson','topicList','appendChar','\x0aIndex::','LONG','NotOk','STK_PRC','connect','blob','HSM_LOG_Flag','wasClean','setSeconds','JWT','ACK:\x20','test','OPC_SUBSCRIBE','updatedFieldsArray','getScripByteArray','topicName:\x20','mode','OPC_KEY','X_ACCESS_TOKEN','SCRIP_UNSUBS','CHANNEL_NUM','getTypeFromString','nameLen:','split','41870370zawcKr','SUBSCRIPTION_FAILED','LTP','stopHearBeat','prepareConnectionRequest2','s105','STREAM_DATA_ENABLED','dataType','code','Invalid\x20ResponseType:\x20','STRING','heartBeatInterval','HSI_LOG_Flag','fields','595106LHGUnP','s113','onmessage','STATUS','StreamDataJson\x20having\x20some\x20issue','hsmDebug','timestamp','sessionid','SESSION_ID','data','getStatus','toFixed','streamDataConfig','CONNECTION','ackNum','isCalled','SNAP_IF','CONNECTION_TYPE','ifsp','hsWS','SCRIP_LITE_FCOUNT','indexOf','getDate','getFormatDate','parse','AUTORIZATION','close','TYPE::\x20','symbol','highstk','arraybuffer','prepareSnapshotRequest','v1.5-ft-5.3.0'];a0_0x106d=function(){return _0x56475a;};return a0_0x106d();}class TopicData{constructor(_0xd25a16){const _0x4cd38b=a0_0x56c57c;this[_0x4cd38b(0x14d)]=0x1,this[_0x4cd38b(0x177)]=0x2,this[_0x4cd38b(0x162)]=0x64,this[_0x4cd38b(0x165)]=new Array(),this['updatedFieldsArray']=new Array(),this['liteFCount']=-0x1,this[_0x4cd38b(0x14f)]=_0xd25a16;}[a0_0x56c57c(0x140)](){const _0x39bab4=a0_0x56c57c;return this[_0x39bab4(0x20e)][_0x39bab4(0x153)]('|',this[_0x39bab4(0x1cb)]);}[a0_0x56c57c(0x21e)](_0x316138,_0x23f1b3){const _0x5c1cc1=a0_0x56c57c;this[_0x5c1cc1(0x165)][_0x316138]!=_0x23f1b3&&_0x23f1b3!=Constants[_0x5c1cc1(0xff)]&&(this[_0x5c1cc1(0x165)][_0x316138]=_0x23f1b3,this[_0x5c1cc1(0x196)][_0x316138]=!![]);}[a0_0x56c57c(0x1da)](_0x2d6bf5,_0xbbecbe){const _0x452b63=a0_0x56c57c;this['precision']=_0xbbecbe,this['precisionValue']=Math[_0x452b63(0x1d3)](0xa,_0xbbecbe),this[_0x452b63(0x14d)]=_0x2d6bf5;}['clearFieldDataArray'](){const _0x31909e=a0_0x56c57c;this[_0x31909e(0x165)]['length']=this[_0x31909e(0x196)]['length']=0x0;}[a0_0x56c57c(0x212)](_0x42cc69,_0x3628b8){const _0x298275=a0_0x56c57c;switch(_0x42cc69){case 0x0:this[_0x298275(0x20e)]=_0x3628b8;break;case 0x1:this[_0x298275(0x1cb)]=_0x3628b8;break;case 0x2:this[_0x298275(0x16d)]=_0x3628b8;break;}}[a0_0x56c57c(0x186)](){const _0x60817e=a0_0x56c57c;if(!this['strJson'])return this['strJson']={'name':this[_0x60817e(0x14f)],'tk':this['symbol'],'e':this['exchange']},Object['assign']({'ts':this[_0x60817e(0x16d)]},this[_0x60817e(0x200)]);return this[_0x60817e(0x200)];}[a0_0x56c57c(0xf6)](_0x4fc9af){const _0x289f84=a0_0x56c57c,_0x118186={};for(let _0x16ca77=0x0;_0x16ca77<_0x4fc9af[_0x289f84(0x1eb)];_0x16ca77++){let _0x5d6a4e=_0x4fc9af[_0x16ca77],_0x360d7d=this[_0x289f84(0x165)][_0x16ca77];if(this[_0x289f84(0x196)][_0x16ca77]&&_0x360d7d!=undefined&&_0x5d6a4e){if(_0x5d6a4e[_0x289f84(0x1dd)]==FieldTypes[_0x289f84(0x106)])_0x360d7d=(_0x360d7d/(this[_0x289f84(0x14d)]*this[_0x289f84(0x162)]))['toFixed'](this[_0x289f84(0x177)]);else _0x5d6a4e[_0x289f84(0x1dd)]==FieldTypes['DATE']&&(_0x360d7d=Util[_0x289f84(0x1c6)](_0x360d7d));Log[_0x289f84(0x1b4)](_0x16ca77+':'+_0x5d6a4e[_0x289f84(0x139)]+':'+_0x360d7d[_0x289f84(0x1ff)]()),_0x118186[_0x5d6a4e[_0x289f84(0x139)]]=_0x360d7d[_0x289f84(0x1ff)]();}}return this[_0x289f84(0x196)]=[],Object[_0x289f84(0x1d1)](_0x118186)[_0x289f84(0x1eb)]>0x0?Object['assign'](_0x118186,this['getStringFieldsJson']()):![];}}class ScripTopicData extends TopicData{constructor(){const _0x5e7f74=a0_0x56c57c;super(TopicTypes[_0x5e7f74(0x171)]);}[a0_0x56c57c(0x120)](){const _0x137bc8=a0_0x56c57c;if(this['updatedFieldsArray'][ScripTopicData[_0x137bc8(0x1e5)]]||this[_0x137bc8(0x196)][ScripTopicData[_0x137bc8(0x111)]]){let _0x305524=this[_0x137bc8(0x165)][ScripTopicData['LTP_INDEX']],_0x517374=this[_0x137bc8(0x165)][ScripTopicData[_0x137bc8(0x111)]];if(_0x305524!=undefined&&_0x517374!=undefined){let _0x34f45d=_0x305524-_0x517374;this['fieldDataArray'][ScripTopicData['CHANGE_INDEX']]=_0x34f45d,this[_0x137bc8(0x196)][ScripTopicData[_0x137bc8(0x1dc)]]=!![],this[_0x137bc8(0x165)][ScripTopicData[_0x137bc8(0x221)]]=+(_0x34f45d/_0x517374*0x64)[_0x137bc8(0x1ba)](this[_0x137bc8(0x177)]),this[_0x137bc8(0x196)][ScripTopicData['PER_CHANGE_INDEX']]=!![];}}if(this[_0x137bc8(0x196)][ScripTopicData['VOLUME_INDEX']]||this['updatedFieldsArray'][ScripTopicData[_0x137bc8(0x180)]]){let _0x43276f=this[_0x137bc8(0x165)][ScripTopicData[_0x137bc8(0x145)]],_0x98ab33=this[_0x137bc8(0x165)][ScripTopicData[_0x137bc8(0x180)]];_0x43276f!=undefined&&_0x98ab33!=undefined&&(this['fieldDataArray'][ScripTopicData[_0x137bc8(0x113)]]=_0x43276f*_0x98ab33,this['updatedFieldsArray'][ScripTopicData[_0x137bc8(0x113)]]=!![]);}return Log[_0x137bc8(0x1b4)](_0x137bc8(0x143)+this[_0x137bc8(0x14f)]+'|'+this[_0x137bc8(0x20e)]+'|'+this[_0x137bc8(0x1cb)]),super[_0x137bc8(0xf6)](ScripTopicData[_0x137bc8(0x166)]);}}class IndexTopicData extends TopicData{constructor(){super(TopicTypes['INDEX']);}[a0_0x56c57c(0x120)](){const _0x5c2b12=a0_0x56c57c;if(this[_0x5c2b12(0x196)][IndexTopicData[_0x5c2b12(0x1e5)]]||this[_0x5c2b12(0x196)][IndexTopicData[_0x5c2b12(0x111)]]){let _0x4477ff=this[_0x5c2b12(0x165)][IndexTopicData[_0x5c2b12(0x1e5)]],_0x4986cd=this[_0x5c2b12(0x165)][IndexTopicData[_0x5c2b12(0x111)]];if(_0x4477ff!=undefined&&_0x4986cd!=undefined){let _0x428a8d=_0x4477ff-_0x4986cd;this[_0x5c2b12(0x165)][IndexTopicData['CHANGE_INDEX']]=_0x428a8d,this[_0x5c2b12(0x196)][IndexTopicData['CHANGE_INDEX']]=!![],this[_0x5c2b12(0x165)][IndexTopicData[_0x5c2b12(0x221)]]=+(_0x428a8d/_0x4986cd*0x64)[_0x5c2b12(0x1ba)](this[_0x5c2b12(0x177)]),this[_0x5c2b12(0x196)][IndexTopicData[_0x5c2b12(0x221)]]=!![];}}return Log[_0x5c2b12(0x1b4)](_0x5c2b12(0x189)+this['feedType']+'|'+this[_0x5c2b12(0x20e)]+'|'+this[_0x5c2b12(0x1cb)]),super[_0x5c2b12(0xf6)](IndexTopicData['mappingArray']);}}class DepthTopicData extends TopicData{constructor(){const _0x41b0c3=a0_0x56c57c;super(TopicTypes[_0x41b0c3(0x124)]);}[a0_0x56c57c(0x120)](){const _0x56c4e3=a0_0x56c57c;return Log[_0x56c4e3(0x1b4)](_0x56c4e3(0x1de)+this[_0x56c4e3(0x14f)]+'|'+this[_0x56c4e3(0x20e)]+'|'+this[_0x56c4e3(0x1cb)]),super[_0x56c4e3(0xf6)](DepthTopicData[_0x56c4e3(0x166)]);}}class Util{constructor(){}static[a0_0x56c57c(0xe4)](_0x49b0ac){const _0x373ec1=a0_0x56c57c;let _0x9ca13=new Uint8Array(_0x49b0ac),_0x3dc76c=0x0,_0x1794cb=_0x9ca13[_0x373ec1(0x1eb)];for(let _0x493651=0x0,_0xaeb45b=_0x1794cb-0x1;_0x493651<_0x1794cb;_0x493651++,_0xaeb45b--){_0x3dc76c+=_0x9ca13[_0xaeb45b]<<_0x493651*0x8;}return _0x3dc76c;}static['buf2Float'](_0x2a5a4e,_0x4be87c){let _0x4d554a=new DataView(_0x2a5a4e,_0x4be87c,0x4);return _0x4d554a['getFloat32'](0x0);}static[a0_0x56c57c(0x15d)](_0x4a9c32){return new TextDecoder('utf-8')['decode'](_0x4a9c32);}static[a0_0x56c57c(0x1c6)](_0x51138c){const _0x55159a=a0_0x56c57c;let _0x3166a1=new Date(_0x51138c*0x3e8),_0x3dc3d7=Util[_0x55159a(0x14e)](_0x3166a1[_0x55159a(0x1c5)]())+'/'+Util['leadingZero'](_0x3166a1[_0x55159a(0x127)]()+0x1)+'/'+_0x3166a1['getFullYear']()+'\x20'+Util[_0x55159a(0x14e)](_0x3166a1['getHours']())+':'+Util[_0x55159a(0x14e)](_0x3166a1[_0x55159a(0x1f3)]())+':'+Util[_0x55159a(0x14e)](_0x3166a1[_0x55159a(0x161)]());return _0x3dc3d7;}static[a0_0x56c57c(0x144)](_0xd58769){const _0x3a1509=a0_0x56c57c;let _0x3bfe1b=new Date(0x7b2,0x0,0x1);_0x3bfe1b[_0x3a1509(0x191)](_0xd58769);let _0x5a29ce=Util['leadingZero'](_0x3bfe1b[_0x3a1509(0x1c5)]())+'/'+Util[_0x3a1509(0x14e)](_0x3bfe1b[_0x3a1509(0x127)]()+0x1)+'/'+_0x3bfe1b['getFullYear']()+'\x20'+Util[_0x3a1509(0x14e)](_0x3bfe1b[_0x3a1509(0x11a)]())+':'+Util[_0x3a1509(0x14e)](_0x3bfe1b[_0x3a1509(0x1f3)]())+':'+Util[_0x3a1509(0x14e)](_0x3bfe1b['getSeconds']());return _0x5a29ce;}static[a0_0x56c57c(0x14e)](_0x53951e){const _0x45f124=a0_0x56c57c;return _0x53951e<0xa?'0'+_0x53951e['toString']():_0x53951e[_0x45f124(0x1ff)]();}static[a0_0x56c57c(0x20d)](_0x5dcb6b){const _0x6a9ce3=a0_0x56c57c;if(_0x5dcb6b[_0x6a9ce3(0x1a0)]('&')['length']>Constants['MAX_SCRIPS'])return console[_0x6a9ce3(0x1d9)](_0x6a9ce3(0x1e0)+Constants[_0x6a9ce3(0xe7)]),![];return!![];}static['checkDateFormat'](_0x7f57bc){const _0x426875=a0_0x56c57c;return new RegExp(_0x426875(0x1e3))[_0x426875(0x194)](_0x7f57bc);}}class BinRequest{constructor(){}static['getAcknowledgementReq'](_0x4ef1f6){const _0x55b6c1=a0_0x56c57c;let _0x8bf10d=new ByteBuilder(0xb);return _0x8bf10d[_0x55b6c1(0x1f5)](BinRespTypes[_0x55b6c1(0x1e4)]),_0x8bf10d[_0x55b6c1(0x1f5)](0x1),_0x8bf10d['appendByte'](0x1),_0x8bf10d[_0x55b6c1(0x13c)](0x4),_0x8bf10d['appendInt'](_0x4ef1f6),_0x8bf10d['getBytes']();}static[a0_0x56c57c(0x17f)](_0x44eff2){const _0x563c02=a0_0x56c57c;let _0xe01669=_0x44eff2['length'],_0x2cc40f=_0x563c02(0x105),_0x312b51=_0x2cc40f['length'],_0x4ba536=new ByteBuilder(_0xe01669+_0x312b51+0xa);return _0x4ba536[_0x563c02(0x1f5)](BinRespTypes['CONNECTION_TYPE']),_0x4ba536['appendByte'](0x2),_0x4ba536['appendByte'](0x1),_0x4ba536[_0x563c02(0x13c)](_0xe01669),_0x4ba536[_0x563c02(0x21b)](_0x44eff2),_0x4ba536[_0x563c02(0x1f5)](0x2),_0x4ba536[_0x563c02(0x13c)](_0x312b51),_0x4ba536[_0x563c02(0x21b)](_0x2cc40f),_0x4ba536[_0x563c02(0x183)]();}static['prepareConnectionRequest'](_0x151272,_0x1fc615){const _0x2d5ef9=a0_0x56c57c;let _0x574f68=_0x151272[_0x2d5ef9(0x1eb)],_0x2731f0=_0x2d5ef9(0x105),_0x27b69a=_0x2731f0[_0x2d5ef9(0x1eb)],_0xe66d3a=new ByteBuilder(_0x574f68+_0x27b69a+0x12);return _0xe66d3a[_0x2d5ef9(0x1f5)](BinRespTypes[_0x2d5ef9(0x1c0)]),_0xe66d3a[_0x2d5ef9(0x1f5)](0x4),_0xe66d3a['appendByte'](0x1),_0xe66d3a['appendShort'](_0x574f68),_0xe66d3a['appendString'](_0x151272),_0xe66d3a[_0x2d5ef9(0x1f5)](0x2),_0xe66d3a[_0x2d5ef9(0x13c)](0x1),_0xe66d3a[_0x2d5ef9(0x1f5)](_0x1fc615['charCodeAt'](0x0)),_0xe66d3a['appendByte'](0x3),_0xe66d3a[_0x2d5ef9(0x13c)](0x1),_0xe66d3a[_0x2d5ef9(0x1f5)](Constants[_0x2d5ef9(0x1a7)]?0x1:0x0),_0xe66d3a[_0x2d5ef9(0x1f5)](0x4),_0xe66d3a[_0x2d5ef9(0x13c)](_0x27b69a),_0xe66d3a[_0x2d5ef9(0x21b)](_0x2731f0),_0xe66d3a['getBytes']();}static[a0_0x56c57c(0x1a5)](_0x2f58e2,_0x1eec77){const _0x8242ad=a0_0x56c57c;let _0xc5c354=_0x8242ad(0x105),_0x22ebb4=_0xc5c354[_0x8242ad(0x1eb)],_0x2569bb=_0x2f58e2[_0x8242ad(0x1eb)],_0x257272=_0x1eec77[_0x8242ad(0x1eb)],_0x52ae35=new ByteBuilder(_0x22ebb4+_0x2569bb+_0x257272+0xd);return _0x52ae35[_0x8242ad(0x1f5)](BinRespTypes[_0x8242ad(0x1c0)]),_0x52ae35[_0x8242ad(0x1f5)](0x3),_0x52ae35['appendByte'](0x1),_0x52ae35[_0x8242ad(0x13c)](_0x2569bb),_0x52ae35[_0x8242ad(0x21b)](_0x2f58e2),_0x52ae35[_0x8242ad(0x1f5)](0x2),_0x52ae35['appendShort'](_0x257272),_0x52ae35[_0x8242ad(0x21b)](_0x1eec77),_0x52ae35[_0x8242ad(0x1f5)](0x3),_0x52ae35[_0x8242ad(0x13c)](_0x22ebb4),_0x52ae35[_0x8242ad(0x21b)](_0xc5c354),_0x52ae35[_0x8242ad(0x183)]();}static[a0_0x56c57c(0xf9)](_0x24da20,_0x118fee,_0x7d1260,_0x45d853){const _0x3e18ad=a0_0x56c57c;if(!Util[_0x3e18ad(0x20d)](_0x24da20))return null;let _0x5dcf2c=BinRequest['getScripByteArray'](_0x24da20,_0x7d1260),_0x160a0b=new ByteBuilder(_0x5dcf2c[_0x3e18ad(0x1eb)]+0xb);return _0x160a0b['appendByte'](_0x118fee),_0x160a0b['appendByte'](0x2),_0x160a0b[_0x3e18ad(0x1f5)](0x1),_0x160a0b[_0x3e18ad(0x13c)](_0x5dcf2c[_0x3e18ad(0x1eb)]),_0x160a0b['appendByteArray'](_0x5dcf2c,_0x5dcf2c[_0x3e18ad(0x1eb)]),_0x160a0b[_0x3e18ad(0x1f5)](0x2),_0x160a0b[_0x3e18ad(0x13c)](0x1),_0x160a0b['appendByte'](_0x45d853),_0x160a0b[_0x3e18ad(0x183)]();}static[a0_0x56c57c(0x109)](_0x204231,_0xb81397,_0x77db0e){const _0x11b3b3=a0_0x56c57c;let _0x2803aa=new ByteBuilder(0x13);_0x2803aa[_0x11b3b3(0x1f5)](_0x204231),_0x2803aa['appendByte'](0x2),_0x2803aa[_0x11b3b3(0x1f5)](0x1),_0x2803aa[_0x11b3b3(0x13c)](0x8);let _0x157aaa=0x0,_0x35adb1=0x0;return _0x77db0e[_0x11b3b3(0x159)](function(_0xd305df){const _0x587d8f=_0x11b3b3;if(_0xd305df>0x0&&_0xd305df<=0x20)_0x157aaa|=0x1<<_0xd305df;else{if(_0xd305df>0x20&&_0xd305df<=0x40)_0x35adb1|=0x1<<_0xd305df;else console[_0x587d8f(0x1d9)]('Error:\x20Channel\x20values\x20must\x20be\x20in\x20this\x20range\x20\x20[\x20val\x20>\x200\x20&&\x20val\x20<\x2065\x20]');}}),_0x2803aa['appendInt'](_0x35adb1),_0x2803aa[_0x11b3b3(0x21f)](_0x157aaa),_0x2803aa[_0x11b3b3(0x1f5)](0x2),_0x2803aa['appendShort'](0x1),_0x2803aa['appendByte'](_0xb81397),_0x2803aa[_0x11b3b3(0x183)]();}static[a0_0x56c57c(0xeb)](_0x54f1af,_0x4d3c9a){const _0xe65e36=a0_0x56c57c;let _0xe9eb38=new ByteBuilder(0xf);_0xe9eb38[_0xe65e36(0x1f5)](_0x54f1af),_0xe9eb38[_0xe65e36(0x1f5)](0x1),_0xe9eb38[_0xe65e36(0x1f5)](0x1),_0xe9eb38['appendShort'](0x8);let _0x4c737f=0x0,_0x5da670=0x0;return _0x4d3c9a[_0xe65e36(0x159)](function(_0xb8b2d0){const _0x123bb3=_0xe65e36;if(_0xb8b2d0>0x0&&_0xb8b2d0<=0x20)_0x4c737f|=0x1<<_0xb8b2d0;else{if(_0xb8b2d0>0x20&&_0xb8b2d0<=0x40)_0x5da670|=0x1<<_0xb8b2d0;else console['error'](_0x123bb3(0x12e));}}),_0xe9eb38['appendInt'](_0x5da670),_0xe9eb38['appendInt'](_0x4c737f),_0xe9eb38[_0xe65e36(0x183)]();}static['prepareSnapshotRequest'](_0x51d9de,_0xcf31a7,_0x5579c1){const _0x5f4f2a=a0_0x56c57c;let _0x431583=BinRequest[_0x5f4f2a(0x197)](_0x51d9de,_0x5579c1),_0x30e3ca=_0x431583[_0x5f4f2a(0x1eb)],_0x4670d8=new ByteBuilder(_0x30e3ca+0x7);return _0x4670d8[_0x5f4f2a(0x1f5)](_0xcf31a7),_0x4670d8[_0x5f4f2a(0x1f5)](0x1),_0x4670d8['appendByte'](0x1),_0x4670d8[_0x5f4f2a(0x13c)](_0x30e3ca),_0x4670d8['appendByteArray'](_0x431583,_0x30e3ca),_0x4670d8[_0x5f4f2a(0x183)]();}static['prepareThrottlingIntervalRequest'](_0x1cc8c2){const _0x24fab9=a0_0x56c57c;let _0x3d71d7=new ByteBuilder(0xb);return _0x3d71d7[_0x24fab9(0x1f5)](BinRespTypes[_0x24fab9(0x222)]),_0x3d71d7[_0x24fab9(0x1f5)](0x1),_0x3d71d7[_0x24fab9(0x1f5)](0x1),_0x3d71d7[_0x24fab9(0x13c)](0x4),_0x3d71d7[_0x24fab9(0x21f)](_0x1cc8c2),_0x3d71d7[_0x24fab9(0x183)]();}static[a0_0x56c57c(0x197)](_0x494dfa,_0x535c03){const _0x27c9ed=a0_0x56c57c;if(_0x494dfa['charCodeAt'](_0x494dfa[_0x27c9ed(0x1eb)]-0x1)==0x26)_0x494dfa=_0x494dfa[_0x27c9ed(0x12c)](0x0,_0x494dfa['length']-0x1);let _0x76d0ad=_0x494dfa[_0x27c9ed(0x1a0)]('&'),_0x3b207d=_0x76d0ad[_0x27c9ed(0x1eb)],_0x563505=0x0;for(let _0xb60306=0x0;_0xb60306<_0x3b207d;_0xb60306++){_0x76d0ad[_0xb60306]=_0x535c03+'|'+_0x76d0ad[_0xb60306],_0x563505+=_0x76d0ad[_0xb60306][_0x27c9ed(0x1eb)]+0x1;}let _0x2fc5cd=new Uint8Array(_0x563505+0x2),_0x215abd=0x0;_0x2fc5cd[_0x215abd++]=_0x3b207d>>0x8&0xff,_0x2fc5cd[_0x215abd++]=_0x3b207d&0xff;for(let _0x12eed5=0x0;_0x12eed5<_0x3b207d;_0x12eed5++){let _0x13a8f9=_0x76d0ad[_0x12eed5],_0x990084=_0x13a8f9[_0x27c9ed(0x1eb)];_0x2fc5cd[_0x215abd++]=_0x990084&0xff;for(let _0x250fce=0x0;_0x250fce<_0x990084;_0x250fce++){_0x2fc5cd[_0x215abd++]=_0x13a8f9[_0x27c9ed(0x218)](_0x250fce);}}return _0x2fc5cd;}static[a0_0x56c57c(0x1fc)](_0x12e1cc,_0xe493d4,_0x5df1c5,_0x1c1634,_0x365047){const _0x446175=a0_0x56c57c;let _0x5590ca=_0x12e1cc[_0x446175(0x1eb)],_0x56a2c6=new ByteBuilder(_0x5590ca+0x1e);return _0x56a2c6[_0x446175(0x1f5)](BinRespTypes['OPC_SUBSCRIBE']),_0x56a2c6[_0x446175(0x1f5)](0x5),_0x56a2c6['appendByte'](0x1),_0x56a2c6['appendShort'](_0x5590ca),_0x56a2c6[_0x446175(0x21b)](_0x12e1cc),_0x56a2c6[_0x446175(0x1f5)](0x2),_0x56a2c6[_0x446175(0x13c)](0x8),_0x56a2c6[_0x446175(0x1ea)](_0xe493d4),_0x56a2c6['appendByte'](0x3),_0x56a2c6[_0x446175(0x13c)](0x1),_0x56a2c6['appendByte'](_0x5df1c5),_0x56a2c6[_0x446175(0x1f5)](0x4),_0x56a2c6['appendShort'](0x1),_0x56a2c6[_0x446175(0x1f5)](_0x1c1634),_0x56a2c6['appendByte'](0x5),_0x56a2c6[_0x446175(0x13c)](0x1),_0x56a2c6[_0x446175(0x1f5)](_0x365047),_0x56a2c6[_0x446175(0x183)]();}}BinRequest[a0_0x56c57c(0x20b)]=new Uint8Array([0x0,0x1,0xb]);class HSWebSocket{constructor(){const _0x46cc2e=a0_0x56c57c;this[_0x46cc2e(0x174)]=null,this['ws']=null,this['hsParser']=null,this[_0x46cc2e(0x118)]=null,this['onClose']=null,this[_0x46cc2e(0x126)]=null,this['onError']=null;}[a0_0x56c57c(0x1c9)](){const _0x157fcb=a0_0x56c57c;this['ws']&&(this['ws'][_0x157fcb(0x1c9)](0x3e8,_0x157fcb(0x1f8)),this['ws']=null);}[a0_0x56c57c(0x15a)](){const _0x33ea10=a0_0x56c57c;return this['ws']?this['ws'][_0x33ea10(0x13d)]==WebSocket['OPEN']:![];}['connect'](_0x403077,_0x522b4e){const _0x38cedb=a0_0x56c57c;Log[_0x38cedb(0x1b4)](_0x38cedb(0x1f2)),this[_0x38cedb(0x174)]=_0x403077;let _0x421b7b=(_0x522b4e?_0x522b4e:Constants[_0x38cedb(0x15b)])*0x3e8;this['ws']&&(this['ws'][_0x38cedb(0x209)]=_0x513a5b=>{},this['ws'][_0x38cedb(0x1b1)]=_0x3cf874=>{},this['ws'][_0x38cedb(0x1e6)]=_0x58ba1a=>{},this['ws'][_0x38cedb(0x205)]=_0x4e9923=>{},this['ws'][_0x38cedb(0x1c9)](0x3e8,_0x38cedb(0x202)));this['ws']=new WebSocket(_0x403077);if(this['ws'])this['ws'][_0x38cedb(0x17a)]=_0x38cedb(0x1cd),this[_0x38cedb(0x1d8)]=new HSParser(this['ws'],this,_0x421b7b);else{console[_0x38cedb(0x1d9)](_0x38cedb(0x206));return;}this['ws']['onopen']=_0x29902d=>{const _0x11a27b=_0x38cedb;Log[_0x11a27b(0x1b4)](_0x11a27b(0x121)),this[_0x11a27b(0x118)]();},this['ws']['onmessage']=_0x2aa829=>{const _0x21c9a5=_0x38cedb;let _0x1f85da=_0x2aa829['data'];if(_0x1f85da instanceof ArrayBuffer){let _0x46bb25=this[_0x21c9a5(0x1d8)][_0x21c9a5(0x132)](_0x1f85da);if(_0x46bb25)this[_0x21c9a5(0x126)](JSON[_0x21c9a5(0x17c)](_0x46bb25));}else this[_0x21c9a5(0x126)](_0x1f85da);},this['ws'][_0x38cedb(0x1e6)]=_0x164d16=>{const _0xea57c6=_0x38cedb;Log[_0xea57c6(0x1b4)](_0xea57c6(0xe6)+_0x164d16[_0xea57c6(0x1a9)]+_0xea57c6(0x131)+_0x164d16[_0xea57c6(0x213)]+_0xea57c6(0xed)+_0x164d16[_0xea57c6(0x190)]),this[_0xea57c6(0x13a)](_0x164d16);},this['ws'][_0x38cedb(0x205)]=_0x50b98d=>{const _0x4494fe=_0x38cedb;Log[_0x4494fe(0x1b4)](_0x4494fe(0x158)+_0x50b98d),this[_0x4494fe(0x172)](_0x50b98d);};}[a0_0x56c57c(0x17d)](_0x143c2a){const _0x3a2d5a=a0_0x56c57c;let _0xee8b4d=JSON[_0x3a2d5a(0x1c7)](_0x143c2a);Log[_0x3a2d5a(0x1b4)](_0xee8b4d);let _0x18e9be=_0xee8b4d[Keys[_0x3a2d5a(0x133)]],_0x261582=null,_0x10781b=_0xee8b4d[Keys[_0x3a2d5a(0x211)]],_0x573440=_0xee8b4d[Keys['CHANNEL_NUM']],_0x326d52=_0xee8b4d[Keys[_0x3a2d5a(0x147)]];switch(_0x18e9be){case ReqTypeValues[_0x3a2d5a(0x1bc)]:let _0xcd773c=_0xee8b4d[_0x3a2d5a(0x199)];if(_0xee8b4d[Keys[_0x3a2d5a(0x215)]]!==undefined&&_0xcd773c!==undefined){let _0x517dc1=_0xee8b4d[Keys['USER_ID']];_0x261582=BinRequest[_0x3a2d5a(0x10a)](_0x517dc1,_0xcd773c);}else{if(_0xee8b4d[Keys[_0x3a2d5a(0x1b7)]]!==undefined&&_0xcd773c!==undefined){let _0x1103a7=_0xee8b4d[Keys[_0x3a2d5a(0x1b7)]];_0x261582=BinRequest[_0x3a2d5a(0x10a)](_0x1103a7,_0xcd773c);}else{if(_0xee8b4d[Keys[_0x3a2d5a(0x1c8)]]!==undefined){let _0x12a925=_0xee8b4d[Keys[_0x3a2d5a(0x1c8)]],_0x4a1333=_0xee8b4d[Keys[_0x3a2d5a(0x11c)]];if(_0x12a925&&_0x4a1333)_0x261582=BinRequest[_0x3a2d5a(0x1a5)](_0x12a925,_0x4a1333);else console[_0x3a2d5a(0x1d9)](_0x3a2d5a(0xee));}else console[_0x3a2d5a(0x1d9)](_0x3a2d5a(0x114));}}break;case ReqTypeValues['SCRIP_SUBS']:_0x261582=BinRequest[_0x3a2d5a(0xf9)](_0x10781b,BinRespTypes[_0x3a2d5a(0xfc)],PREFIX[_0x3a2d5a(0x171)],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x19c)]:_0x261582=BinRequest[_0x3a2d5a(0xf9)](_0x10781b,BinRespTypes['UNSUBSCRIBE_TYPE'],PREFIX[_0x3a2d5a(0x171)],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x1e7)]:_0x261582=BinRequest[_0x3a2d5a(0xf9)](_0x10781b,BinRespTypes[_0x3a2d5a(0xfc)],PREFIX['INDEX'],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x20c)]:_0x261582=BinRequest[_0x3a2d5a(0xf9)](_0x10781b,BinRespTypes[_0x3a2d5a(0x135)],PREFIX[_0x3a2d5a(0x228)],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x204)]:_0x261582=BinRequest[_0x3a2d5a(0xf9)](_0x10781b,BinRespTypes[_0x3a2d5a(0xfc)],PREFIX[_0x3a2d5a(0x124)],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x148)]:_0x261582=BinRequest[_0x3a2d5a(0xf9)](_0x10781b,BinRespTypes[_0x3a2d5a(0x135)],PREFIX[_0x3a2d5a(0x124)],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x16c)]:_0x261582=BinRequest['prepareChannelRequest'](BinRespTypes['CHPAUSE_TYPE'],_0x326d52);break;case ReqTypeValues['CHANNEL_RESUME']:_0x261582=BinRequest[_0x3a2d5a(0xeb)](BinRespTypes['CHRESUME_TYPE'],_0x326d52);break;case ReqTypeValues['SNAP_MW']:_0x261582=BinRequest[_0x3a2d5a(0x1ce)](_0x10781b,BinRespTypes[_0x3a2d5a(0x173)],PREFIX[_0x3a2d5a(0x171)]);break;case ReqTypeValues[_0x3a2d5a(0x11f)]:_0x261582=BinRequest[_0x3a2d5a(0x1ce)](_0x10781b,BinRespTypes[_0x3a2d5a(0x173)],PREFIX[_0x3a2d5a(0x124)]);break;case ReqTypeValues[_0x3a2d5a(0x1bf)]:_0x261582=BinRequest[_0x3a2d5a(0x1ce)](_0x10781b,BinRespTypes[_0x3a2d5a(0x173)],PREFIX[_0x3a2d5a(0x228)]);break;case ReqTypeValues[_0x3a2d5a(0x216)]:_0x261582=BinRequest[_0x3a2d5a(0x1fc)](_0xee8b4d[Keys[_0x3a2d5a(0x19a)]],_0xee8b4d[Keys['STK_PRC']],_0xee8b4d[Keys[_0x3a2d5a(0x156)]],_0xee8b4d[Keys[_0x3a2d5a(0x184)]],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x137)]:break;case ReqTypeValues['LITE']:_0x261582=BinRequest[_0x3a2d5a(0x109)](BinRespTypes[_0x3a2d5a(0x20a)],CHANNEL_DATA_MODE['LITE'],_0x326d52);break;case ReqTypeValues[_0x3a2d5a(0x1db)]:_0x261582=BinRequest[_0x3a2d5a(0x109)](BinRespTypes['LITE_FULL'],CHANNEL_DATA_MODE[_0x3a2d5a(0x1db)],_0x326d52);break;case ReqTypeValues[_0x3a2d5a(0x1f0)]:_0x261582=_0x10781b;break;default:_0x261582=null;break;}if(this['ws']&&_0x261582)this['ws'][_0x3a2d5a(0x17d)](_0x261582);else console[_0x3a2d5a(0x1d9)](_0x3a2d5a(0x10c));}}class HSParser{constructor(_0x58e0f0,_0x39f8a1,_0x292cf4){const _0x1cfecc=a0_0x56c57c;this[_0x1cfecc(0x1c2)]=null,this[_0x1cfecc(0x128)]=null,this[_0x1cfecc(0x187)]=new Array(),this[_0x1cfecc(0xf7)]=0x0,this['ackNum']=0x0,this[_0x1cfecc(0x1fa)]=0x0,this['inWS']=_0x58e0f0,this[_0x1cfecc(0x1c2)]=_0x39f8a1,this[_0x1cfecc(0x117)]=_0x292cf4;}[a0_0x56c57c(0x132)](_0x535acb){const _0x35ce2f=a0_0x56c57c;let _0x329689=0x0,_0x514809=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,0x2));Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x1f1)+_0x514809),_0x329689+=0x2;let _0x15d55c=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));_0x329689+=0x1,Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x1ca)+_0x15d55c);if(_0x15d55c==BinRespTypes['CONNECTION_TYPE']){const _0x532d16={};let _0x3f1e20=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));Log['hsmDebug'](_0x35ce2f(0xef)+_0x3f1e20),_0x329689+=0x1;let _0x525704=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));_0x329689+=0x1;let _0x267e1a=Util['buf2Long'](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x2));_0x329689+=0x2;let _0x42783b=Util[_0x35ce2f(0x15d)](_0x535acb['slice'](_0x329689,_0x329689+_0x267e1a));_0x329689+=_0x267e1a;let _0x2cd51c=0x0;if(_0x3f1e20>=0x2){_0x525704=Util['buf2Long'](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1)),_0x329689+=0x1,_0x267e1a=Util[_0x35ce2f(0xe4)](_0x535acb['slice'](_0x329689,_0x329689+0x2)),_0x329689+=0x2,_0x2cd51c=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+_0x267e1a)),_0x329689+=_0x267e1a;if(_0x3f1e20>=0x3){_0x525704=Util['buf2Long'](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1)),_0x329689+=0x1,_0x267e1a=Util[_0x35ce2f(0xe4)](_0x535acb['slice'](_0x329689,_0x329689+0x2)),_0x329689+=0x2;let _0x51e300=JSON[_0x35ce2f(0x1c7)](Util[_0x35ce2f(0x15d)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+_0x267e1a)));_0x329689+=_0x267e1a,this[_0x35ce2f(0xf5)](_0x51e300);}Log['hsmDebug'](_0x35ce2f(0x193)+_0x2cd51c);switch(_0x42783b){case BinRespStat['OK']:_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['OK'],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues[_0x35ce2f(0x16f)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x1d6)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=RespCodes['SUCCESS'],this[_0x35ce2f(0x12d)]();break;case BinRespStat[_0x35ce2f(0x175)]:_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['NOT_OK'],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues[_0x35ce2f(0x16f)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES['FAILED'],_0x532d16[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x35ce2f(0x123)];break;}this['ackNum']=_0x2cd51c;}else{if(_0x3f1e20==0x1)switch(_0x42783b){case BinRespStat['OK']:_0x532d16[RESPONSE_KEYS['STATUS']]=STAT['OK'],_0x532d16[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x35ce2f(0x16f)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x1d6)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=RespCodes[_0x35ce2f(0x1d2)],this[_0x35ce2f(0x12d)]();break;case BinRespStat[_0x35ce2f(0x175)]:_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT[_0x35ce2f(0x175)],_0x532d16[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x35ce2f(0x16f)],_0x532d16[RESPONSE_KEYS['MSG']]=RESPONSE_VALUES[_0x35ce2f(0x10b)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=RespCodes['CONNECTION_FAILED'];break;}else _0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT[_0x35ce2f(0x175)],_0x532d16[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x35ce2f(0x16f)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x225)],_0x532d16[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x35ce2f(0xea)];}return this[_0x35ce2f(0x130)](_0x532d16);}else{if(_0x15d55c==BinRespTypes['DATA_TYPE']){let _0xef230a=0x0;if(this[_0x35ce2f(0x1bd)]>0x0){++this['counter'],_0xef230a=Util['buf2Long'](_0x535acb['slice'](_0x329689,_0x329689+0x4)),_0x329689+=0x4;if(this['counter']==this[_0x35ce2f(0x1bd)]){let _0x59ced4=BinRequest[_0x35ce2f(0x12f)](_0xef230a);if(this[_0x35ce2f(0x128)])this['inWS'][_0x35ce2f(0x17d)](_0x59ced4);Log[_0x35ce2f(0x1b4)]('Acknowledgement\x20sent\x20for\x20message\x20num:\x20'+_0xef230a),this[_0x35ce2f(0xf7)]=0x0;}}const _0xd59f4e=[];let _0x59ae17=Util['buf2Long'](_0x535acb['slice'](_0x329689,_0x329689+0x2));_0x329689+=0x2;for(let _0x2c137a=0x0;_0x2c137a<_0x59ae17;_0x2c137a++){let _0xc0c0c3=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));Log['hsmDebug']('ResponseType:\x20'+_0xc0c0c3),_0x329689++;if(_0xc0c0c3==ResponseTypes[_0x35ce2f(0xfa)]){let _0x26beae=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x2));_0x329689+=0x2,Log['hsmDebug'](_0x35ce2f(0x10f)+_0x26beae);let _0x355a5b=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));_0x329689++,Log['hsmDebug'](_0x35ce2f(0x19f)+_0x355a5b);let _0x53e9c7=Util[_0x35ce2f(0x15d)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+_0x355a5b));_0x329689+=_0x355a5b,Log['hsmDebug'](_0x35ce2f(0x198)+_0x53e9c7);let _0x297fb2=this['getNewTopicData'](_0x53e9c7);if(_0x297fb2){this['topicList'][_0x26beae]=_0x297fb2;let _0x2cb4c3=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));_0x329689++,Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x1fe)+_0x2cb4c3);for(let _0x2ebf59=0x0;_0x2ebf59<_0x2cb4c3;_0x2ebf59++){let _0x45929f=Util['buf2Long'](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x4));_0x297fb2[_0x35ce2f(0x21e)](_0x2ebf59,_0x45929f),_0x329689+=0x4,Log[_0x35ce2f(0x1b4)](_0x2ebf59+':'+_0x45929f);}_0x329689+=0x2;let _0x22f9cb=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x2));_0x329689+=0x2,Log[_0x35ce2f(0x1b4)]('multi:\x20'+_0x22f9cb);let _0x4dc5d0=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));_0x329689++,Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x217)+_0x4dc5d0),_0x297fb2['setMultiplierAndPrec'](_0x22f9cb,_0x4dc5d0);for(let _0x30e68a=0x0;_0x30e68a<0x3;_0x30e68a++){let _0x2721a8=Util[_0x35ce2f(0xe4)](_0x535acb['slice'](_0x329689,_0x329689+0x1));_0x329689++;let _0x571c12=Util[_0x35ce2f(0x15d)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+_0x2721a8));_0x329689+=_0x2721a8,_0x297fb2[_0x35ce2f(0x212)](_0x30e68a,_0x571c12),Log[_0x35ce2f(0x1b4)]('strVal:\x20'+_0x571c12);}let _0x5939d9=_0x297fb2[_0x35ce2f(0x120)]();if(_0x5939d9)_0xd59f4e[_0x35ce2f(0x11e)](_0x5939d9);}else Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x226));}else{if(_0xc0c0c3==ResponseTypes[_0x35ce2f(0x14c)]||_0xc0c0c3==ResponseTypes[_0x35ce2f(0x1ec)]){Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x11b)+_0xc0c0c3);let _0xc57fe2=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x2));Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x10f)+_0xc57fe2),_0x329689+=0x2;let _0x3ba997=this['topicList'][_0xc57fe2];if(!_0x3ba997)console[_0x35ce2f(0x1d9)](_0x35ce2f(0x103));else{let _0x1ee219;_0xc0c0c3!=ResponseTypes[_0x35ce2f(0x1ec)]?(_0x1ee219=Util[_0x35ce2f(0xe4)](_0x535acb['slice'](_0x329689,_0x329689+0x1)),_0x329689++):_0x1ee219=_0x3ba997[_0x35ce2f(0x1fb)];Log['hsmDebug'](_0x35ce2f(0x1fe)+_0x1ee219);for(let _0x21b68f=0x0;_0x21b68f<_0x1ee219;_0x21b68f++){let _0x246570=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x4));_0x3ba997[_0x35ce2f(0x21e)](_0x21b68f,_0x246570),Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x1f4)+_0x21b68f+_0x35ce2f(0x1fd)+_0x246570),_0x329689+=0x4;}}let _0x14c428=_0x3ba997[_0x35ce2f(0x120)]();if(_0x14c428)_0xd59f4e['push'](_0x14c428);}else console[_0x35ce2f(0x1d9)](_0x35ce2f(0x1aa)+_0xc0c0c3);}}return _0xd59f4e[_0x35ce2f(0x1eb)]>0x0?_0xd59f4e:null;}else{if(_0x15d55c==BinRespTypes[_0x35ce2f(0xfc)]||_0x15d55c==BinRespTypes[_0x35ce2f(0x135)]){let _0xf09f08=this[_0x35ce2f(0x1b9)](_0x535acb,_0x329689);const _0x57a97e={};switch(_0xf09f08){case BinRespStat['OK']:_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['OK'],_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0x133)]]=_0x15d55c==BinRespTypes[_0x35ce2f(0xfc)]?RespTypeValues[_0x35ce2f(0x154)]:RespTypeValues[_0x35ce2f(0xf8)],_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x1d6)],_0x57a97e[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x35ce2f(0x1d2)];break;case BinRespStat[_0x35ce2f(0x175)]:_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT[_0x35ce2f(0x175)];_0x15d55c==BinRespTypes[_0x35ce2f(0xfc)]?(_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues[_0x35ce2f(0x154)],_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=_0x35ce2f(0x112),_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=RespCodes[_0x35ce2f(0x1a2)]):(_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues[_0x35ce2f(0xf8)],_0x57a97e[RESPONSE_KEYS['MSG']]='unsubscription\x20\x20failed',_0x57a97e[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x35ce2f(0x181)]);break;}return this['sendJsonArrResp'](_0x57a97e);}else{if(_0x15d55c==BinRespTypes[_0x35ce2f(0x173)]){let _0x36ff4b=this[_0x35ce2f(0x1b9)](_0x535acb,_0x329689);const _0x4bcd31={};switch(_0x36ff4b){case BinRespStat['OK']:_0x4bcd31[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['OK'],_0x4bcd31[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x35ce2f(0xfa)],_0x4bcd31[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x1d6)],_0x4bcd31[RESPONSE_KEYS['STAT_CODE']]=RespCodes['SUCCESS'];break;case BinRespStat[_0x35ce2f(0x175)]:_0x4bcd31[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['NOT_OK'],_0x4bcd31[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues[_0x35ce2f(0xfa)],_0x4bcd31[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x10b)],_0x4bcd31[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=RespCodes['SNAPSHOT_FAILED'];break;}return this['sendJsonArrResp'](_0x4bcd31);}else{if(_0x15d55c==BinRespTypes[_0x35ce2f(0x129)]||_0x15d55c==BinRespTypes['CHRESUME_TYPE']){let _0x53b9a2=this[_0x35ce2f(0x1b9)](_0x535acb,_0x329689);const _0x5da942={};switch(_0x53b9a2){case BinRespStat['OK']:_0x5da942[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['OK'],_0x5da942[RESPONSE_KEYS[_0x35ce2f(0x133)]]=_0x15d55c==BinRespTypes[_0x35ce2f(0x129)]?RespTypeValues[_0x35ce2f(0xe5)]:RespTypeValues[_0x35ce2f(0x110)],_0x5da942[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES['SUCCESSFUL'],_0x5da942[RESPONSE_KEYS['STAT_CODE']]=RespCodes['SUCCESS'];break;case BinRespStat['NOT_OK']:_0x5da942[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT[_0x35ce2f(0x175)],_0x5da942[RESPONSE_KEYS['TYPE']]=_0x15d55c==BinRespTypes[_0x35ce2f(0x129)]?RespTypeValues[_0x35ce2f(0xe5)]:RespTypeValues[_0x35ce2f(0x110)],_0x5da942[RESPONSE_KEYS['MSG']]=RESPONSE_VALUES[_0x35ce2f(0x10b)],_0x5da942[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=_0x15d55c==BinRespTypes[_0x35ce2f(0x129)]?RespCodes[_0x35ce2f(0x167)]:RespCodes[_0x35ce2f(0x116)];break;}return this['sendJsonArrResp'](_0x5da942);}else{if(_0x15d55c==BinRespTypes['OPC_SUBSCRIBE']){let _0x35e65a=this[_0x35ce2f(0x1b9)](_0x535acb,_0x329689);_0x329689+=0x5;const _0x1a9034={};switch(_0x35e65a){case BinRespStat['OK']:_0x1a9034[RESPONSE_KEYS['STATUS']]=STAT['OK'],_0x1a9034[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues['OPC'],_0x1a9034[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x1d6)],_0x1a9034[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=RespCodes[_0x35ce2f(0x1d2)];let _0x560df2=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,++_0x329689)),_0x32f4d7=Util[_0x35ce2f(0xe4)](_0x535acb['slice'](_0x329689,_0x329689+0x2));_0x329689+=0x2;let _0x271b3b=Util[_0x35ce2f(0x15d)](_0x535acb['slice'](_0x329689,_0x329689+_0x32f4d7));_0x329689+=_0x32f4d7,_0x1a9034[_0x35ce2f(0x139)]=_0x271b3b,_0x560df2=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,++_0x329689)),_0x32f4d7=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x2)),_0x329689+=0x2;let _0x37d663=Util[_0x35ce2f(0x15d)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+_0x32f4d7));_0x329689+=_0x32f4d7,_0x1a9034[_0x35ce2f(0x1ed)]=JSON[_0x35ce2f(0x1c7)](_0x37d663)[_0x35ce2f(0x1b8)];break;case BinRespStat[_0x35ce2f(0x175)]:_0x1a9034[RESPONSE_KEYS['STATUS']]=STAT[_0x35ce2f(0x175)],_0x1a9034[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues['OPC'],_0x1a9034[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES['FAILED'],_0x1a9034[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=0x2b20;break;}return this[_0x35ce2f(0x130)](_0x1a9034);}else{if(_0x15d55c==BinRespTypes[_0x35ce2f(0x20a)]){let _0x3fb25d=this[_0x35ce2f(0x1b9)](_0x535acb,_0x329689);const _0x1b1d4a={};switch(_0x3fb25d){case BinRespStat['OK']:_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['OK'],_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0x133)]]=_0x15d55c==BinRespTypes[_0x35ce2f(0x20a)]?RespTypeValues[_0x35ce2f(0x1ec)]:RespTypeValues[_0x35ce2f(0x1db)],_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x1d6)],_0x1b1d4a[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x35ce2f(0x1d2)];break;case BinRespStat['NOT_OK']:_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT[_0x35ce2f(0x175)],_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0x133)]]=_0x15d55c==BinRespTypes['LITE_FULL']?RespTypeValues['LITE']:RespTypeValues['FULL'],_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x10b)],_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=0x2ee1;break;}return this['sendJsonArrResp'](_0x1b1d4a);}else return null;}}}}}}}[a0_0x56c57c(0x1b9)](_0x5d89ce,_0x5cd477){const _0x2d5792=a0_0x56c57c;let _0x571ae1=BinRespStat['NOT_OK'][_0x2d5792(0x1ff)](),_0x3d03d3=Util[_0x2d5792(0xe4)](_0x5d89ce[_0x2d5792(0x152)](_0x5cd477,++_0x5cd477));if(_0x3d03d3>0x0){let _0x1addcc=Util[_0x2d5792(0xe4)](_0x5d89ce[_0x2d5792(0x152)](_0x5cd477,++_0x5cd477)),_0x11c51e=Util[_0x2d5792(0xe4)](_0x5d89ce[_0x2d5792(0x152)](_0x5cd477,_0x5cd477+0x2));_0x5cd477+=0x2,_0x571ae1=Util[_0x2d5792(0x15d)](_0x5d89ce[_0x2d5792(0x152)](_0x5cd477,_0x5cd477+_0x11c51e)),_0x5cd477+=_0x11c51e;}return _0x571ae1;}['getNewTopicData'](_0x418bb5){const _0x2c140a=a0_0x56c57c;let _0x2e4436=_0x418bb5['split']('|')[0x0],_0x252d09=null;switch(_0x2e4436){case TopicTypes[_0x2c140a(0x171)]:_0x252d09=new ScripTopicData(),_0x252d09[_0x2c140a(0x1fb)]=Constants['SCRIP_LITE_FCOUNT'];break;case TopicTypes[_0x2c140a(0x228)]:_0x252d09=new IndexTopicData(),_0x252d09[_0x2c140a(0x1fb)]=Constants[_0x2c140a(0x14b)];break;case TopicTypes[_0x2c140a(0x124)]:_0x252d09=new DepthTopicData();break;}return _0x252d09;}[a0_0x56c57c(0xf5)](_0x2a98a0){const _0x235e24=a0_0x56c57c;if(_0x2a98a0){Log['hsmDebug'](_0x235e24(0x115)),ScripTopicData[_0x235e24(0x166)]=new Array(),IndexTopicData[_0x235e24(0x166)]=new Array(),DepthTopicData[_0x235e24(0x166)]=new Array();let _0xdacd=new Map();_0x2a98a0[_0x235e24(0x1ae)][_0x235e24(0x159)](function(_0x37c6ac){const _0x158a53=_0x235e24;_0xdacd[_0x158a53(0xf3)](_0x37c6ac['fid'],_0x37c6ac);}),Constants[_0x235e24(0x1c3)]=_0x2a98a0['scrip_lite']['hfid'],Constants[_0x235e24(0x14b)]=_0x2a98a0[_0x235e24(0x149)][_0x235e24(0xfe)],_0x2a98a0[_0x235e24(0x107)][_0x235e24(0x11e)](SCRIPFID_MAP[_0x235e24(0xe8)]),_0x2a98a0[_0x235e24(0x107)][_0x235e24(0x11e)](SCRIPFID_MAP[_0x235e24(0x1f7)]),_0x2a98a0['scrip']['push'](SCRIPFID_MAP[_0x235e24(0x219)]),_0x2a98a0[_0x235e24(0x1f6)][_0x235e24(0x11e)](INDEXFID_MAP[_0x235e24(0xe8)]),_0x2a98a0[_0x235e24(0x1f6)]['push'](INDEXFID_MAP[_0x235e24(0x1f7)]),ScripTopicData['LTP_INDEX']=_0x2a98a0['scrip'][_0x235e24(0x1c4)](SCRIPFID_MAP[_0x235e24(0x1a3)]),ScripTopicData['VOLUME_INDEX']=_0x2a98a0['scrip'][_0x235e24(0x1c4)](SCRIPFID_MAP[_0x235e24(0x160)]),ScripTopicData[_0x235e24(0x180)]=_0x2a98a0['scrip']['indexOf'](SCRIPFID_MAP[_0x235e24(0x119)]),ScripTopicData['CHANGE_INDEX']=_0x2a98a0[_0x235e24(0x107)]['indexOf'](SCRIPFID_MAP[_0x235e24(0xe8)]),ScripTopicData[_0x235e24(0x221)]=_0x2a98a0[_0x235e24(0x107)][_0x235e24(0x1c4)](SCRIPFID_MAP['PCHANGE']),ScripTopicData['CLOSE_INDEX']=_0x2a98a0[_0x235e24(0x107)][_0x235e24(0x1c4)](SCRIPFID_MAP[_0x235e24(0x1d0)]),ScripTopicData['TURNOVER_INDEX']=_0x2a98a0[_0x235e24(0x107)][_0x235e24(0x1c4)](SCRIPFID_MAP[_0x235e24(0x219)]),IndexTopicData[_0x235e24(0x1e5)]=_0x2a98a0[_0x235e24(0x1f6)][_0x235e24(0x1c4)](INDEXFID_MAP[_0x235e24(0x1a3)]),IndexTopicData[_0x235e24(0x111)]=_0x2a98a0['index'][_0x235e24(0x1c4)](INDEXFID_MAP[_0x235e24(0x1d0)]),IndexTopicData[_0x235e24(0x1dc)]=_0x2a98a0[_0x235e24(0x1f6)]['indexOf'](INDEXFID_MAP[_0x235e24(0xe8)]),IndexTopicData[_0x235e24(0x221)]=_0x2a98a0['index'][_0x235e24(0x1c4)](INDEXFID_MAP[_0x235e24(0x1f7)]);let _0x21d9de=_0x2a98a0[_0x235e24(0x107)];for(let _0x49791e=0x0;_0x49791e<_0x21d9de[_0x235e24(0x1eb)];_0x49791e++){let _0x3ebde0=_0xdacd[_0x235e24(0x21a)](_0x21d9de[_0x49791e]),_0x3a1519=this[_0x235e24(0x19e)](_0x3ebde0[_0x235e24(0x1a8)]);ScripTopicData[_0x235e24(0x166)][_0x49791e]=new FieldData(_0x3ebde0[_0x235e24(0x163)],_0x3ebde0[_0x235e24(0x164)],_0x3a1519,_0x3ebde0[_0x235e24(0x176)]);}let _0x829d88=_0x2a98a0[_0x235e24(0x1f6)];for(let _0x1efe7f=0x0;_0x1efe7f<_0x829d88['length'];_0x1efe7f++){let _0x3157b7=_0xdacd[_0x235e24(0x21a)](_0x829d88[_0x1efe7f]),_0x48f416=this[_0x235e24(0x19e)](_0x3157b7[_0x235e24(0x1a8)]);IndexTopicData[_0x235e24(0x166)][_0x1efe7f]=new FieldData(_0x3157b7['fid'],_0x3157b7[_0x235e24(0x164)],_0x48f416,_0x3157b7[_0x235e24(0x176)]);}let _0x316c44=_0x2a98a0['depth'];for(let _0x631e65=0x0;_0x631e65<_0x316c44[_0x235e24(0x1eb)];_0x631e65++){let _0x3be555=_0xdacd['get'](_0x316c44[_0x631e65]),_0x425398=this[_0x235e24(0x19e)](_0x3be555[_0x235e24(0x1a8)]);DepthTopicData[_0x235e24(0x166)][_0x631e65]=new FieldData(_0x3be555['fid'],_0x3be555[_0x235e24(0x164)],_0x425398,_0x3be555['details']);}}else console[_0x235e24(0x1d9)](_0x235e24(0x1b3));}[a0_0x56c57c(0x19e)](_0x47b2ba){const _0x5ecd59=a0_0x56c57c;let _0x36649d=FieldTypes[_0x5ecd59(0x1ab)];switch(_0x47b2ba){case _0x5ecd59(0x141):_0x36649d=FieldTypes[_0x5ecd59(0x106)];break;case _0x5ecd59(0x1b5):_0x36649d=FieldTypes[_0x5ecd59(0x1e9)];break;case _0x5ecd59(0x207):_0x36649d=FieldTypes[_0x5ecd59(0x18a)];break;}return _0x36649d;}[a0_0x56c57c(0x130)](_0x5abc1d){let _0x174e71=[];return _0x174e71['push'](_0x5abc1d),_0x174e71;}['startPingInterval'](){const _0x5c0eca=a0_0x56c57c;this[_0x5c0eca(0x1fa)]=setInterval(this[_0x5c0eca(0x208)],this[_0x5c0eca(0x117)],this);}['pingFunction'](_0x56a639){const _0x27bb1b=a0_0x56c57c;if(this['inWS']?.[_0x27bb1b(0x13d)]==WebSocket[_0x27bb1b(0xe9)]&&_0x56a639['inWS'])_0x56a639[_0x27bb1b(0x128)][_0x27bb1b(0x17d)](BinRequest['pingRequest']);else{if(_0x56a639['intervalId'])clearInterval(_0x56a639[_0x27bb1b(0x1fa)]);}}}class HSIWebSocket{constructor(){const _0x483542=a0_0x56c57c;this['isCalled']=!![],this[_0x483542(0x15b)]=0x1e;}static[a0_0x56c57c(0x185)](){const _0x5016d9=a0_0x56c57c;return this[_0x5016d9(0x223)]||(this[_0x5016d9(0x223)]=new HSIWebSocket());}['close'](){const _0x8ea8f9=a0_0x56c57c;this['stopHearBeat'](),this[_0x8ea8f9(0x17b)][_0x8ea8f9(0x1c9)]();}[a0_0x56c57c(0x18d)](_0x5365af,_0x13fea3){const _0x55d94d=a0_0x56c57c;this[_0x55d94d(0x174)]=_0x5365af,this[_0x55d94d(0x1ac)]=(_0x13fea3?_0x13fea3:this[_0x55d94d(0x15b)])*0x3e8;this[_0x55d94d(0x17b)]&&(this['hsiWs'][_0x55d94d(0x209)]=function(_0x382d6e){},this['hsiWs']['onmessage']=function(_0x5b8631){},this['hsiWs'][_0x55d94d(0x1e6)]=function(_0xa73830){},this[_0x55d94d(0x17b)][_0x55d94d(0x205)]=function(_0x3613e9){},this[_0x55d94d(0x17b)][_0x55d94d(0x1c9)]());this[_0x55d94d(0x17b)]=new WebSocket(_0x5365af);if(this[_0x55d94d(0x17b)])this[_0x55d94d(0x17b)][_0x55d94d(0x17a)]=_0x55d94d(0x18e);else console['error'](_0x55d94d(0x170));this['hsiWs'][_0x55d94d(0x209)]=function(){const _0x3d76e2=_0x55d94d;Log[_0x3d76e2(0x21d)](_0x3d76e2(0x1e2)),HSIWebSocket[_0x3d76e2(0x223)][_0x3d76e2(0x118)]();},this['hsiWs'][_0x55d94d(0x1b1)]=function(_0x21ca56){const _0x337103=_0x55d94d;Log['hsiDebug'](_0x21ca56);let _0x198824=_0x21ca56[_0x337103(0x1b8)],_0x433da5=JSON[_0x337103(0x1c7)](_0x198824);if(_0x433da5&&_0x433da5['task']=='cn'&&_0x433da5['ak']=='ok'){let _0x3480ee={'type':'hb'};HSIWebSocket[_0x337103(0x223)][_0x337103(0x108)]=setInterval(function(){const _0xbbd4ff=_0x337103;HSIWebSocket[_0xbbd4ff(0x223)]['isCalled']=!![],HSIWebSocket['_instance'][_0xbbd4ff(0x17b)][_0xbbd4ff(0x17d)](JSON[_0xbbd4ff(0x17c)](_0x3480ee));},_0x13fea3);}Log[_0x337103(0x21d)](_0x198824);if(_0x198824)HSIWebSocket[_0x337103(0x223)]['onMessage'](_0x198824);},this['hsiWs'][_0x55d94d(0x1e6)]=function(){const _0x9fa969=_0x55d94d;HSIWebSocket[_0x9fa969(0x223)][_0x9fa969(0x1a4)](),HSIWebSocket[_0x9fa969(0x223)]['onClose']();},this[_0x55d94d(0x17b)][_0x55d94d(0x205)]=function(){const _0x1c8e3d=_0x55d94d;HSIWebSocket[_0x1c8e3d(0x223)][_0x1c8e3d(0x1a4)](),HSIWebSocket[_0x1c8e3d(0x223)][_0x1c8e3d(0x172)]();};}[a0_0x56c57c(0x17d)](_0x169b4d){const _0x1b5765=a0_0x56c57c;let _0x3f86d2=JSON[_0x1b5765(0x1c7)](_0x169b4d);Log['hsiDebug'](_0x3f86d2);let _0x539f=_0x3f86d2['type'],_0x3f90b0;if(_0x539f===ReqTypeValues[_0x1b5765(0x1bc)]){if(_0x3f86d2[Keys[_0x1b5765(0x1c8)]]!==undefined&&_0x3f86d2[Keys[_0x1b5765(0x11c)]]!==undefined&&_0x3f86d2[Keys[_0x1b5765(0x20f)]]!==undefined)_0x3f90b0={'type':'cn','Authorization':_0x3f86d2[Keys[_0x1b5765(0x1c8)]],'Sid':_0x3f86d2[Keys['SID']],'src':_0x3f86d2[Keys[_0x1b5765(0x20f)]]},this[_0x1b5765(0x15e)]=_0x3f90b0;else{if(_0x3f86d2[Keys['X_ACCESS_TOKEN']]!==undefined&&_0x3f86d2[Keys[_0x1b5765(0x20f)]]!==undefined)_0x3f90b0={'type':'cn','x-access-token':_0x3f86d2[Keys['X_ACCESS_TOKEN']],'src':_0x3f86d2[Keys[_0x1b5765(0x20f)]]},this['reqData']=_0x3f90b0;else console[_0x1b5765(0x1d9)]('Invalid\x20connection\x20mode\x20!');}}else{if(_0x539f===ReqTypeValues[_0x1b5765(0x224)])this[_0x1b5765(0x15e)]=this[_0x1b5765(0x15e)]['type']=_0x1b5765(0x1f9),_0x3f90b0=this[_0x1b5765(0x15e)];else{if(_0x539f===ReqTypeValues[_0x1b5765(0x137)]){}else{if(_0x539f===ReqTypeValues['STR'])_0x3f90b0=_0x3f86d2[_0x1b5765(0x1b8)];else console[_0x1b5765(0x1d9)](_0x1b5765(0x16e));}}}if(this[_0x1b5765(0x17b)]&&_0x3f90b0)this[_0x1b5765(0x17b)][_0x1b5765(0x17d)](JSON[_0x1b5765(0x17c)](_0x3f90b0));else console[_0x1b5765(0x1d9)](_0x1b5765(0x10c));}['stopHearBeat'](){const _0x3da4d2=a0_0x56c57c;this[_0x3da4d2(0x1be)]&&(this[_0x3da4d2(0x1be)]=![],this['interval']&&clearInterval(this[_0x3da4d2(0x108)]));}}
|
|
4
|
-
|
|
5
|
-
module.exports = HSWebSocket
|
|
1
|
+
const a0_0x6c0704=a0_0x82be;(function(_0x19070d,_0x31275f){const _0x27a066=a0_0x82be,_0x3e013b=_0x19070d();while(!![]){try{const _0x40e652=parseInt(_0x27a066(0x24d))/0x1*(-parseInt(_0x27a066(0x29b))/0x2)+parseInt(_0x27a066(0x276))/0x3*(-parseInt(_0x27a066(0x2aa))/0x4)+-parseInt(_0x27a066(0x1e6))/0x5*(parseInt(_0x27a066(0x2c3))/0x6)+parseInt(_0x27a066(0x2b3))/0x7+-parseInt(_0x27a066(0x2d3))/0x8*(-parseInt(_0x27a066(0x26a))/0x9)+-parseInt(_0x27a066(0x237))/0xa+parseInt(_0x27a066(0x2ac))/0xb;if(_0x40e652===_0x31275f)break;else _0x3e013b['push'](_0x3e013b['shift']());}catch(_0x540917){_0x3e013b['push'](_0x3e013b['shift']());}}}(a0_0xd8a7,0xdc753));const WebSocket=require('ws');a0_0x6c0704(0x244);class Constants{constructor(){}}Constants['LIB_VERSION']=a0_0x6c0704(0x19d),Constants[a0_0x6c0704(0x20f)]=0x1e,Constants['isSingleLib']=!![],Constants[a0_0x6c0704(0x263)]=![],Constants[a0_0x6c0704(0x1af)]=![],Constants[a0_0x6c0704(0x1a6)]=0x5dc,Constants[a0_0x6c0704(0x23e)]=-0x80000000,Constants[a0_0x6c0704(0x199)]=!![],Constants['SCRIP_LITE_FCOUNT']=0x1,Constants[a0_0x6c0704(0x1da)]=0x1;class Log{constructor(){}static['hsmDebug'](_0x4303eb){const _0x2baad5=a0_0x6c0704;if(Constants[_0x2baad5(0x263)])console[_0x2baad5(0x258)](_0x4303eb);}static['hsiDebug'](_0x4e1cd8){const _0x598e2d=a0_0x6c0704;if(Constants[_0x598e2d(0x1af)])console[_0x598e2d(0x258)](_0x4e1cd8);}}var RESPONSE_KEYS;(function(_0x32f60b){const _0x1fabec=a0_0x6c0704;_0x32f60b[_0x1fabec(0x1ac)]=_0x1fabec(0x1c8),_0x32f60b[_0x1fabec(0x227)]=_0x1fabec(0x25d),_0x32f60b[_0x1fabec(0x2d5)]=_0x1fabec(0x282),_0x32f60b[_0x1fabec(0x248)]=_0x1fabec(0x1b9),_0x32f60b[_0x1fabec(0x2ab)]=_0x1fabec(0x299);}(RESPONSE_KEYS||(RESPONSE_KEYS={})));var RESPONSE_VALUES;(function(_0x4da0aa){const _0x1d481e=a0_0x6c0704;_0x4da0aa[_0x1d481e(0x257)]=_0x1d481e(0x1ae),_0x4da0aa[_0x1d481e(0x267)]='failed',_0x4da0aa[_0x1d481e(0x289)]=_0x1d481e(0x1a9),_0x4da0aa[_0x1d481e(0x27f)]='--';}(RESPONSE_VALUES||(RESPONSE_VALUES={})));var CHANNEL_DATA_MODE;(function(_0x3f0ef3){const _0x47e2f2=a0_0x6c0704;_0x3f0ef3[_0x3f0ef3[_0x47e2f2(0x1b1)]=0x4c]=_0x47e2f2(0x1b1),_0x3f0ef3[_0x3f0ef3['FULL']=0x46]='FULL';}(CHANNEL_DATA_MODE||(CHANNEL_DATA_MODE={})));var ResponseTypes;(function(_0x2ad4c7){const _0x78477d=a0_0x6c0704;_0x2ad4c7[_0x2ad4c7[_0x78477d(0x229)]=0x53]='SNAP',_0x2ad4c7[_0x2ad4c7[_0x78477d(0x259)]=0x55]=_0x78477d(0x259),_0x2ad4c7[_0x2ad4c7[_0x78477d(0x1b1)]=0x4c]=_0x78477d(0x1b1);}(ResponseTypes||(ResponseTypes={})));var BinRespStat;(function(_0x5dd864){_0x5dd864['OK']='K',_0x5dd864['NOT_OK']='N';}(BinRespStat||(BinRespStat={})));var STAT;function a0_0xd8a7(){const _0x2b206c=['buf2Long','getAcknowledgementReq','mwu','parseCustomMessage','reqData','ACK_TYPE','12DCVTCr','STREAM_DATA_CONFIG','25078625pbtHOc','LITE_FULL','Invalid\x20conn\x20mode\x20!','snap','scrip_lite','CONNECTION','updates\x20......','7530544RPCKYr','index_lite','getHours','lowstk','CHANNELP','isScripOK','JS_API','TURNOVER','\x0aDepth::','truncated\x20field\x20value','ifs','FULL','NOT_OK','NotOk','getPosition','i103','1853556TQneqG','fieldDataArray','Topic\x20Not\x20Available\x20in\x20TopicList!','SNAPSHOT_FAILED','CHANNEL_PAUSE','dpsp','subscription\x20failed','REDIS_KEY','unsubscription\x20\x20failed','prepareSubsUnSubsRequest','f101','strJson','concat','CONNECTION_FAILED','not\x20a\x20custom\x20message\x20frame','PER_CHANGE_INDEX','618872MWtmUA','OPC','MSG','SCRIP_LITE_FCOUNT','Authorization','buf2Float','intervalId','SCRIPS','checkDateFormat','timestamp','getDate','topicList','slice','AUTORIZATION','scrip','STREAM_DATA_ENABLED','interval','SNAP_DP','SNAPSHOT','v1.5-ft-5.3.0','sessionid','WebSocket\x20not\x20initialized!','CHANNEL_NUMS','LOW_STK','hfid','fid','substring','isCalled','MAX_SCRIPS','x-access-token','UNSUBSCRIBE_TYPE','invalid\x20field\x20count','Authorization\x20mode\x20is\x20enabled:\x20Authorization\x20or\x20Sid\x20not\x20found\x20!','strVal:\x20','STATUS','CHANNELR_FAILED','successful','HSI_LOG_Flag','task','LITE','exchange','SNAP_IF','source','f103','charCodeAt','INDEX','index:','stCode','onOpen','prepareThrottlingIntervalRequest','sendJsonArrResp','multi:\x20','appendByte','FLOAT32','THROTTLING_TYPE','getSeconds','Invalid\x20topic\x20feed\x20type\x20!','toFixed','packets.length:\x20','mws','setStringValues','CLOSE_INDEX','stat','Error:\x20Channel\x20values\x20must\x20be\x20in\x20this\x20range\x20\x20[\x20val\x20>\x200\x20&&\x20val\x20<\x2065\x20]','mappingArray','onerror','Number','^(0{1}[1-9]|[12][0-9]|3[01])/(0{1}[1-9]|1[012])/20\x5cd{2}$','depth','LONG','SOURCE','SNAP_MW','unsub','ackNum','highstk','parseData','INDEX_UNSUBS','prepareSnapshotRequest','utf-8','error','INDEX_LITE_FCOUNT','readyState','Processing\x20dynamic\x20mapping....','sub','SID','DATA_TYPE','getMonth','pos','hsWS','s105','precision','topicName:\x20','10TyUbMK','FORCE_CONNECTION','OPC_SUBSCRIBE','exports','url','updatedFieldsArray','getNewTopicData','SUBSCRIBE_TYPE','f104','OPC_KEY','getBytes','VWAP','prepareData','liteFCount','clear','CONN','StreamDataJson\x20having\x20some\x20issue','LTP','CONNECTION_TYPE','SUBSCRIPTION_FAILED','VOLUME_INDEX','get','prepareConnectionRequest','VOLUME','STRING','Invalid\x20connection\x20mode\x20!','getKey','CHANNELP_FAILED','appendShort','SESSION_ID','CHANNELR','Sid','CHANNEL_RESUME','fld','message','setMultiplierAndPrec','fcn','prepareChannelRequest','PERCHANGE','onClose','jwt','DEFAULT_HEARTBEAT_INTERVAL','code','getFullYear','PCHANGE','counter','CLOSE','onclose','keys','SUCCESS','onMessage','set','getStatus','getScripByteArray','fcount1:\x20','stringify',',\x20Reason:','heartBeatIntervalInMS','nameLen:','DEPTH','Open','details','stopHearBeat','fields','Connect...','TYPE','scrips','SNAP','TURNOVER_INDEX','stkprc','toString','appendByteArray','ifsp','inWS','LOG','getFormatDate','str','prepareConnectionRequest2','connect','hsParser','SUBS','6276270mulaFt','pingRequest','dps','truncated\x20frame','INDEX_SUBS','DEPTH_UNSUBS','binaryType','TRASH_VAL','setLongValues','clearFieldDataArray','HIGH_STK','CHRESUME_TYPE','prec:\x20','use\x20strict','prepareLiteChannelRequest','assign','data','STAT_CODE','LTP_INDEX','getMinutes','startPingInterval','prepareJson','1JdPzCR','ACK:\x20','s104','symbol','split','ConvNumber','close','THROTTLING_INTERVAL','hsiDebug','CHANNEL_NUM','SUCCESSFUL','log','UPDATE','Unable\x20to\x20send\x20request\x20!,\x20Reason:\x20Connection\x20faulty\x20or\x20request\x20not\x20valid\x20!','appendInt','parse','type','pingFunction','precisionValue','buf2String','CHANGE_INDEX','OPC_SUBS','HSM_LOG_Flag','UNSUBSCRIPTION_FAILED','topic\x20Id:\x20','onClose::CloseCode:','FAILED','key','send','135cVkwQq','VWAP_INDEX','CUSTOM_MSG','lit','appendLongAsBigInt','Invalid\x20Request\x20!','CHPAUSE_TYPE','prepareConnectionRequestOld','\x0aIndex::','indexOf','s113','DATE','1437006qepsNT','reason','Acknowledgement\x20sent\x20for\x20message\x20num:\x20','multiplier','hsmDebug','redis','test','hsiWs','onmessage','NOT_AVL','SCRIP','getInt32','msg','onError','getOpChainSubsRequest','appendString','CONNECTION_INVALID','User\x20call','isConnected','INVD_FLD_COUNT','_instance','SCRIP_UNSUBS','wasClean','getTypeFromString','feedType','forEach','X_ACCESS_TOKEN','onopen','createMapingsMap','USER_ID','f105','tSymbol','push','length','CHANGE','streamDataConfig','leadingZero','1861144ZdzgpG','index','blob','UNSUBS','getStringFieldsJson','opc','truncated\x20field\x20header','s121','dataType'];a0_0xd8a7=function(){return _0x2b206c;};return a0_0xd8a7();}(function(_0x390b48){const _0x27d5ea=a0_0x6c0704;_0x390b48['OK']='Ok',_0x390b48[_0x27d5ea(0x2bf)]=_0x27d5ea(0x2c0);}(STAT||(STAT={})));var TopicTypes;(function(_0x71764a){const _0x528c58=a0_0x6c0704;_0x71764a[_0x528c58(0x280)]='sf',_0x71764a[_0x528c58(0x1b7)]='if',_0x71764a['DEPTH']='dp';}(TopicTypes||(TopicTypes={})));var Keys;(function(_0xbe8757){const _0x4842b3=a0_0x6c0704;_0xbe8757[_0x4842b3(0x227)]=_0x4842b3(0x25d),_0xbe8757['USER_ID']='user',_0xbe8757['SESSION_ID']=_0x4842b3(0x19e),_0xbe8757[_0x4842b3(0x191)]=_0x4842b3(0x228),_0xbe8757[_0x4842b3(0x256)]='channelnum',_0xbe8757[_0x4842b3(0x1a0)]='channelnums',_0xbe8757['JWT']=_0x4842b3(0x20e),_0xbe8757[_0x4842b3(0x2ca)]=_0x4842b3(0x27b),_0xbe8757['STK_PRC']=_0x4842b3(0x22b),_0xbe8757[_0x4842b3(0x241)]=_0x4842b3(0x1d4),_0xbe8757['LOW_STK']=_0x4842b3(0x2b6),_0xbe8757[_0x4842b3(0x1ef)]=_0x4842b3(0x268),_0xbe8757[_0x4842b3(0x197)]=_0x4842b3(0x18e),_0xbe8757[_0x4842b3(0x1de)]=_0x4842b3(0x205),_0xbe8757[_0x4842b3(0x290)]=_0x4842b3(0x1a7),_0xbe8757[_0x4842b3(0x1d0)]=_0x4842b3(0x1b4);}(Keys||(Keys={})));function a0_0x82be(_0x348ed6,_0x2f4140){const _0xd8a706=a0_0xd8a7();return a0_0x82be=function(_0x82be0b,_0x5a96a3){_0x82be0b=_0x82be0b-0x18e;let _0x10d2b1=_0xd8a706[_0x82be0b];return _0x10d2b1;},a0_0x82be(_0x348ed6,_0x2f4140);}var ReqTypeValues;(function(_0x2034e7){const _0x551cbb=a0_0x6c0704;_0x2034e7['CONNECTION']='cn',_0x2034e7['SCRIP_SUBS']=_0x551cbb(0x1c5),_0x2034e7[_0x551cbb(0x28b)]=_0x551cbb(0x2a6),_0x2034e7[_0x551cbb(0x23b)]=_0x551cbb(0x2bd),_0x2034e7[_0x551cbb(0x1d6)]='ifu',_0x2034e7['DEPTH_SUBS']=_0x551cbb(0x239),_0x2034e7['DEPTH_UNSUBS']='dpu',_0x2034e7[_0x551cbb(0x206)]='cr',_0x2034e7[_0x551cbb(0x2c7)]='cp',_0x2034e7[_0x551cbb(0x1d1)]='mwsp',_0x2034e7[_0x551cbb(0x19b)]=_0x551cbb(0x2c8),_0x2034e7[_0x551cbb(0x1b3)]=_0x551cbb(0x22e),_0x2034e7[_0x551cbb(0x262)]=_0x551cbb(0x2a0),_0x2034e7[_0x551cbb(0x1b1)]='lit',_0x2034e7['FULL']='ful',_0x2034e7[_0x551cbb(0x254)]='ti',_0x2034e7['STR']=_0x551cbb(0x232),_0x2034e7[_0x551cbb(0x1e7)]=_0x551cbb(0x20a),_0x2034e7[_0x551cbb(0x230)]=_0x551cbb(0x258);}(ReqTypeValues||(ReqTypeValues={})));var RespTypeValues;(function(_0xfb49d2){const _0x29a25c=a0_0x6c0704;_0xfb49d2[_0x29a25c(0x1f5)]='cn',_0xfb49d2[_0x29a25c(0x236)]=_0x29a25c(0x1dd),_0xfb49d2[_0x29a25c(0x29e)]=_0x29a25c(0x1d2),_0xfb49d2['SNAP']=_0x29a25c(0x2af),_0xfb49d2[_0x29a25c(0x204)]='cr',_0xfb49d2[_0x29a25c(0x2b7)]='cp',_0xfb49d2[_0x29a25c(0x2d4)]=_0x29a25c(0x2a0),_0xfb49d2['LITE']=_0x29a25c(0x26d),_0xfb49d2['FULL']='ful',_0xfb49d2[_0x29a25c(0x2d5)]=_0x29a25c(0x282);}(RespTypeValues||(RespTypeValues={})));var BinRespTypes;(function(_0x47c922){const _0x5f8235=a0_0x6c0704;_0x47c922[_0x47c922[_0x5f8235(0x1f8)]=0x1]=_0x5f8235(0x1f8),_0x47c922[_0x47c922['THROTTLING_TYPE']=0x2]=_0x5f8235(0x1c0),_0x47c922[_0x47c922['ACK_TYPE']=0x3]=_0x5f8235(0x2a9),_0x47c922[_0x47c922['SUBSCRIBE_TYPE']=0x4]='SUBSCRIBE_TYPE',_0x47c922[_0x47c922[_0x5f8235(0x1a8)]=0x5]=_0x5f8235(0x1a8),_0x47c922[_0x47c922[_0x5f8235(0x1df)]=0x6]=_0x5f8235(0x1df),_0x47c922[_0x47c922[_0x5f8235(0x270)]=0x7]=_0x5f8235(0x270),_0x47c922[_0x47c922['CHRESUME_TYPE']=0x8]=_0x5f8235(0x242),_0x47c922[_0x47c922[_0x5f8235(0x19c)]=0x9]=_0x5f8235(0x19c),_0x47c922[_0x47c922['OPC_SUBSCRIBE']=0xa]=_0x5f8235(0x1e8),_0x47c922[_0x47c922[_0x5f8235(0x2ad)]=0xc]=_0x5f8235(0x2ad),_0x47c922[_0x47c922['CUSTOM_MSG']=0x33]=_0x5f8235(0x26c);}(BinRespTypes||(BinRespTypes={})));const CUSTOM_MSG_REF_TYPES={[BinRespTypes[a0_0x6c0704(0x1f8)]]:RespTypeValues[a0_0x6c0704(0x1f5)],[BinRespTypes['SUBSCRIBE_TYPE']]:RespTypeValues[a0_0x6c0704(0x236)],[BinRespTypes[a0_0x6c0704(0x1a8)]]:RespTypeValues[a0_0x6c0704(0x29e)],[BinRespTypes[a0_0x6c0704(0x270)]]:RespTypeValues[a0_0x6c0704(0x2b7)],[BinRespTypes[a0_0x6c0704(0x242)]]:RespTypeValues[a0_0x6c0704(0x204)]};var RespCodes;(function(_0x314c51){const _0x1f5f3a=a0_0x6c0704;_0x314c51[_0x314c51[_0x1f5f3a(0x217)]=0xc8]=_0x1f5f3a(0x217),_0x314c51[_0x314c51[_0x1f5f3a(0x2d0)]=0x2af9]=_0x1f5f3a(0x2d0),_0x314c51[_0x314c51[_0x1f5f3a(0x286)]=0x2afa]=_0x1f5f3a(0x286),_0x314c51[_0x314c51[_0x1f5f3a(0x1f9)]=0x2b03]=_0x1f5f3a(0x1f9),_0x314c51[_0x314c51[_0x1f5f3a(0x264)]=0x2b04]='UNSUBSCRIPTION_FAILED',_0x314c51[_0x314c51[_0x1f5f3a(0x2c6)]=0x2b05]='SNAPSHOT_FAILED',_0x314c51[_0x314c51[_0x1f5f3a(0x201)]=0x2b17]='CHANNELP_FAILED',_0x314c51[_0x314c51[_0x1f5f3a(0x1ad)]=0x2b18]=_0x1f5f3a(0x1ad);}(RespCodes||(RespCodes={})));var PREFIX;(function(_0x593037){const _0x5893aa=a0_0x6c0704;_0x593037[_0x5893aa(0x221)]='dp',_0x593037[_0x5893aa(0x280)]='sf',_0x593037[_0x5893aa(0x1b7)]='if';}(PREFIX||(PREFIX={})));var SCRIPFID_MAP;(function(_0x265d57){const _0x814bd9=a0_0x6c0704;_0x265d57[_0x814bd9(0x298)]=_0x814bd9(0x2cd),_0x265d57[_0x814bd9(0x212)]='f102',_0x265d57[_0x814bd9(0x2ba)]=_0x814bd9(0x1b5),_0x265d57[_0x814bd9(0x1fd)]=_0x814bd9(0x24f),_0x265d57['LTP']=_0x814bd9(0x1e3),_0x265d57[_0x814bd9(0x214)]=_0x814bd9(0x2a2),_0x265d57[_0x814bd9(0x1f1)]=_0x814bd9(0x274);}(SCRIPFID_MAP||(SCRIPFID_MAP={})));var FieldTypes;(function(_0x291b6c){const _0xc108b4=a0_0x6c0704;_0x291b6c[_0x291b6c[_0xc108b4(0x1bf)]=0x0]=_0xc108b4(0x1bf),_0x291b6c[_0x291b6c['LONG']=0x1]=_0xc108b4(0x1cf),_0x291b6c[_0x291b6c['DATE']=0x2]=_0xc108b4(0x275),_0x291b6c[_0x291b6c[_0xc108b4(0x1fe)]=0x3]=_0xc108b4(0x1fe);}(FieldTypes||(FieldTypes={})));var INDEXFID_MAP;(function(_0x28711f){const _0x386440=a0_0x6c0704;_0x28711f[_0x386440(0x1f7)]='i102',_0x28711f[_0x386440(0x214)]=_0x386440(0x2c2),_0x28711f[_0x386440(0x298)]=_0x386440(0x1ee),_0x28711f['PCHANGE']=_0x386440(0x294);}(INDEXFID_MAP||(INDEXFID_MAP={})));var SCRIP_INDEX;(function(_0x3211da){const _0x5c8c27=a0_0x6c0704;_0x3211da[_0x3211da['VOLUME']=0x1]=_0x5c8c27(0x1fd),_0x3211da[_0x3211da['LTP']=0x0]='LTP',_0x3211da[_0x3211da['CLOSE']=0x14]=_0x5c8c27(0x214),_0x3211da[_0x3211da[_0x5c8c27(0x1f1)]=0xb]=_0x5c8c27(0x1f1),_0x3211da[_0x3211da[_0x5c8c27(0x298)]=0x15]=_0x5c8c27(0x298),_0x3211da[_0x3211da[_0x5c8c27(0x20c)]=0x16]=_0x5c8c27(0x20c),_0x3211da[_0x3211da[_0x5c8c27(0x2ba)]=0x17]=_0x5c8c27(0x2ba);}(SCRIP_INDEX||(SCRIP_INDEX={})));var INDEX_INDEX;(function(_0xe5da3f){const _0x476242=a0_0x6c0704;_0xe5da3f[_0xe5da3f[_0x476242(0x1f7)]=0x0]='LTP',_0xe5da3f[_0xe5da3f['CLOSE']=0x1]=_0x476242(0x214),_0xe5da3f[_0xe5da3f['CHANGE']=0x6]=_0x476242(0x298),_0xe5da3f[_0xe5da3f[_0x476242(0x20c)]=0x7]=_0x476242(0x20c);}(INDEX_INDEX||(INDEX_INDEX={})));class ByteBuilder{constructor(_0x346175){const _0x231b5b=a0_0x6c0704;this[_0x231b5b(0x247)]=new Uint8Array(_0x346175),this[_0x231b5b(0x1e1)]=0x2;}[a0_0x6c0704(0x1f4)](){this['pos']=0x0;}[a0_0x6c0704(0x2c1)](){const _0x4bf163=a0_0x6c0704;return this[_0x4bf163(0x1e1)];}[a0_0x6c0704(0x1f0)](){const _0x195abc=a0_0x6c0704;let _0x44ec63=this['pos']-0x2;return this[_0x195abc(0x247)][0x0]=_0x44ec63>>0x8&0xff,this['data'][0x1]=_0x44ec63&0xff,this[_0x195abc(0x247)];}[a0_0x6c0704(0x1be)](_0x1ad26b,_0x3628f4){const _0x2a874c=a0_0x6c0704;_0x3628f4==undefined?this[_0x2a874c(0x247)][this[_0x2a874c(0x1e1)]++]=_0x1ad26b:this[_0x2a874c(0x247)][_0x3628f4]=_0x1ad26b;}['appendChar'](_0x590a0a,_0x4c3501){const _0x5e3dfa=a0_0x6c0704;_0x4c3501==undefined?this[_0x5e3dfa(0x247)][this[_0x5e3dfa(0x1e1)]++]=_0x590a0a:this[_0x5e3dfa(0x247)][_0x4c3501]=_0x590a0a;}[a0_0x6c0704(0x202)](_0x240f93){const _0x46d539=a0_0x6c0704;this[_0x46d539(0x247)][this[_0x46d539(0x1e1)]++]=_0x240f93>>0x8&0xff,this['data'][this['pos']++]=_0x240f93&0xff;}[a0_0x6c0704(0x25b)](_0x825c4b){const _0x291214=a0_0x6c0704;this['data'][this[_0x291214(0x1e1)]++]=_0x825c4b>>0x18&0xff,this[_0x291214(0x247)][this[_0x291214(0x1e1)]++]=_0x825c4b>>0x10&0xff,this['data'][this[_0x291214(0x1e1)]++]=_0x825c4b>>0x8&0xff,this[_0x291214(0x247)][this[_0x291214(0x1e1)]++]=_0x825c4b&0xff;}['appendLong'](_0x3b6ace){const _0x5d8519=a0_0x6c0704;this[_0x5d8519(0x247)][this[_0x5d8519(0x1e1)]++]=_0x3b6ace>>0x38&0xff,this[_0x5d8519(0x247)][this[_0x5d8519(0x1e1)]++]=_0x3b6ace>>0x30&0xff,this[_0x5d8519(0x247)][this[_0x5d8519(0x1e1)]++]=_0x3b6ace>>0x28&0xff,this[_0x5d8519(0x247)][this[_0x5d8519(0x1e1)]++]=_0x3b6ace>>0x20&0xff,this[_0x5d8519(0x247)][this['pos']++]=_0x3b6ace>>0x18&0xff,this[_0x5d8519(0x247)][this[_0x5d8519(0x1e1)]++]=_0x3b6ace>>0x10&0xff,this[_0x5d8519(0x247)][this[_0x5d8519(0x1e1)]++]=_0x3b6ace>>0x8&0xff,this[_0x5d8519(0x247)][this['pos']++]=_0x3b6ace&0xff;}['appendLongAsBigInt'](_0xd2c4c0){const _0x5ad8d5=a0_0x6c0704,_0x25a931=BigInt(_0xd2c4c0);this[_0x5ad8d5(0x247)][this[_0x5ad8d5(0x1e1)]++]=Number(_0x25a931>>BigInt(0x38)&BigInt(0xff)),this['data'][this['pos']++]=Number(_0x25a931>>BigInt(0x30)&BigInt(0xff)),this[_0x5ad8d5(0x247)][this[_0x5ad8d5(0x1e1)]++]=Number(_0x25a931>>BigInt(0x28)&BigInt(0xff)),this[_0x5ad8d5(0x247)][this[_0x5ad8d5(0x1e1)]++]=Number(_0x25a931>>BigInt(0x20)&BigInt(0xff)),this['data'][this[_0x5ad8d5(0x1e1)]++]=Number(_0x25a931>>BigInt(0x18)&BigInt(0xff)),this[_0x5ad8d5(0x247)][this['pos']++]=Number(_0x25a931>>BigInt(0x10)&BigInt(0xff)),this['data'][this[_0x5ad8d5(0x1e1)]++]=Number(_0x25a931>>BigInt(0x8)&BigInt(0xff)),this[_0x5ad8d5(0x247)][this[_0x5ad8d5(0x1e1)]++]=Number(_0x25a931&BigInt(0xff));}[a0_0x6c0704(0x285)](_0x33ae29){const _0x150a59=a0_0x6c0704;for(let _0x4be8f5=0x0;_0x4be8f5<_0x33ae29[_0x150a59(0x297)];_0x4be8f5++)this['data'][this[_0x150a59(0x1e1)]++]=_0x33ae29[_0x150a59(0x1b6)](_0x4be8f5);}['appendByteArray'](_0x28bb00,_0x30ff69){const _0x2f5a36=a0_0x6c0704;let _0x32f953=_0x30ff69==undefined?_0x28bb00['length']:_0x30ff69;for(let _0x13a4ae=0x0;_0x13a4ae<_0x32f953;_0x13a4ae++)this[_0x2f5a36(0x247)][this[_0x2f5a36(0x1e1)]++]=_0x28bb00[_0x13a4ae];}}class FieldData{constructor(_0xc5c9b5,_0x589803,_0x57f4ee,_0x59b0bb){const _0x40e705=a0_0x6c0704;this['fId']=_0xc5c9b5,this[_0x40e705(0x268)]=_0x589803,this[_0x40e705(0x25d)]=_0x57f4ee,this['desc']=_0x59b0bb;}}class TopicData{constructor(_0x6c095e){const _0x585841=a0_0x6c0704;this['multiplier']=0x1,this[_0x585841(0x1e4)]=0x2,this[_0x585841(0x25f)]=0x64,this[_0x585841(0x2c4)]=new Array(),this['updatedFieldsArray']=new Array(),this['liteFCount']=-0x1,this[_0x585841(0x28e)]=_0x6c095e;}[a0_0x6c0704(0x200)](){const _0x230317=a0_0x6c0704;return this['exchange'][_0x230317(0x2cf)]('|',this[_0x230317(0x250)]);}['setLongValues'](_0x1a3c00,_0x5b94bf){const _0xcd017=a0_0x6c0704;this[_0xcd017(0x2c4)][_0x1a3c00]!=_0x5b94bf&&_0x5b94bf!=Constants[_0xcd017(0x23e)]&&(this[_0xcd017(0x2c4)][_0x1a3c00]=_0x5b94bf,this[_0xcd017(0x1eb)][_0x1a3c00]=!![]);}[a0_0x6c0704(0x209)](_0x1fa2ee,_0x47b716){const _0x30a7da=a0_0x6c0704;this[_0x30a7da(0x1e4)]=_0x47b716,this['precisionValue']=Math['pow'](0xa,_0x47b716),this[_0x30a7da(0x279)]=_0x1fa2ee;}[a0_0x6c0704(0x240)](){const _0x43275a=a0_0x6c0704;this['fieldDataArray']['length']=this[_0x43275a(0x1eb)]['length']=0x0;}[a0_0x6c0704(0x1c6)](_0x6d0b1a,_0x372059){const _0x1f4894=a0_0x6c0704;switch(_0x6d0b1a){case 0x0:this[_0x1f4894(0x1b2)]=_0x372059;break;case 0x1:this[_0x1f4894(0x250)]=_0x372059;break;case 0x2:this[_0x1f4894(0x295)]=_0x372059;break;}}[a0_0x6c0704(0x29f)](){const _0x5de78b=a0_0x6c0704;if(!this[_0x5de78b(0x2ce)])return this[_0x5de78b(0x2ce)]={'name':this[_0x5de78b(0x28e)],'tk':this[_0x5de78b(0x250)],'e':this['exchange']},Object[_0x5de78b(0x246)]({'ts':this[_0x5de78b(0x295)]},this[_0x5de78b(0x2ce)]);return this[_0x5de78b(0x2ce)];}[a0_0x6c0704(0x24c)](_0x5c4b64){const _0x222dc9=a0_0x6c0704,_0x2416e2={};for(let _0x28255d=0x0;_0x28255d<_0x5c4b64[_0x222dc9(0x297)];_0x28255d++){let _0x3d0ec3=_0x5c4b64[_0x28255d],_0x5d6a27=this[_0x222dc9(0x2c4)][_0x28255d];if(this[_0x222dc9(0x1eb)][_0x28255d]&&_0x5d6a27!=undefined&&_0x3d0ec3){if(_0x3d0ec3[_0x222dc9(0x25d)]==FieldTypes[_0x222dc9(0x1bf)])_0x5d6a27=(_0x5d6a27/(this['multiplier']*this[_0x222dc9(0x25f)]))[_0x222dc9(0x1c3)](this['precision']);else _0x3d0ec3[_0x222dc9(0x25d)]==FieldTypes[_0x222dc9(0x275)]&&(_0x5d6a27=Util[_0x222dc9(0x231)](_0x5d6a27));Log[_0x222dc9(0x27a)](_0x28255d+':'+_0x3d0ec3['key']+':'+_0x5d6a27[_0x222dc9(0x22c)]()),_0x2416e2[_0x3d0ec3[_0x222dc9(0x268)]]=_0x5d6a27[_0x222dc9(0x22c)]();}}return this[_0x222dc9(0x1eb)]=[],Object[_0x222dc9(0x216)](_0x2416e2)['length']>0x0?Object[_0x222dc9(0x246)](_0x2416e2,this[_0x222dc9(0x29f)]()):![];}}class ScripTopicData extends TopicData{constructor(){const _0x5145c5=a0_0x6c0704;super(TopicTypes[_0x5145c5(0x280)]);}[a0_0x6c0704(0x1f2)](){const _0x466887=a0_0x6c0704;if(this[_0x466887(0x1eb)][ScripTopicData[_0x466887(0x249)]]||this[_0x466887(0x1eb)][ScripTopicData[_0x466887(0x1c7)]]){let _0x3460d6=this[_0x466887(0x2c4)][ScripTopicData[_0x466887(0x249)]],_0x7f6208=this[_0x466887(0x2c4)][ScripTopicData['CLOSE_INDEX']];if(_0x3460d6!=undefined&&_0x7f6208!=undefined){let _0x28f16d=_0x3460d6-_0x7f6208;this['fieldDataArray'][ScripTopicData[_0x466887(0x261)]]=_0x28f16d,this[_0x466887(0x1eb)][ScripTopicData['CHANGE_INDEX']]=!![],this['fieldDataArray'][ScripTopicData[_0x466887(0x2d2)]]=+(_0x28f16d/_0x7f6208*0x64)[_0x466887(0x1c3)](this[_0x466887(0x1e4)]),this['updatedFieldsArray'][ScripTopicData[_0x466887(0x2d2)]]=!![];}}if(this[_0x466887(0x1eb)][ScripTopicData['VOLUME_INDEX']]||this['updatedFieldsArray'][ScripTopicData[_0x466887(0x26b)]]){let _0x586242=this[_0x466887(0x2c4)][ScripTopicData[_0x466887(0x1fa)]],_0x4a8d00=this[_0x466887(0x2c4)][ScripTopicData[_0x466887(0x26b)]];_0x586242!=undefined&&_0x4a8d00!=undefined&&(this[_0x466887(0x2c4)][ScripTopicData[_0x466887(0x22a)]]=_0x586242*_0x4a8d00,this[_0x466887(0x1eb)][ScripTopicData['TURNOVER_INDEX']]=!![]);}return Log['hsmDebug']('\x0aScrip::'+this[_0x466887(0x28e)]+'|'+this[_0x466887(0x1b2)]+'|'+this['symbol']),super[_0x466887(0x24c)](ScripTopicData[_0x466887(0x1ca)]);}}class IndexTopicData extends TopicData{constructor(){const _0x42931d=a0_0x6c0704;super(TopicTypes[_0x42931d(0x1b7)]);}[a0_0x6c0704(0x1f2)](){const _0x9f7ae6=a0_0x6c0704;if(this[_0x9f7ae6(0x1eb)][IndexTopicData[_0x9f7ae6(0x249)]]||this['updatedFieldsArray'][IndexTopicData[_0x9f7ae6(0x1c7)]]){let _0x3b88a1=this[_0x9f7ae6(0x2c4)][IndexTopicData[_0x9f7ae6(0x249)]],_0x4e07af=this[_0x9f7ae6(0x2c4)][IndexTopicData[_0x9f7ae6(0x1c7)]];if(_0x3b88a1!=undefined&&_0x4e07af!=undefined){let _0x4b3647=_0x3b88a1-_0x4e07af;this['fieldDataArray'][IndexTopicData[_0x9f7ae6(0x261)]]=_0x4b3647,this[_0x9f7ae6(0x1eb)][IndexTopicData['CHANGE_INDEX']]=!![],this[_0x9f7ae6(0x2c4)][IndexTopicData[_0x9f7ae6(0x2d2)]]=+(_0x4b3647/_0x4e07af*0x64)[_0x9f7ae6(0x1c3)](this['precision']),this[_0x9f7ae6(0x1eb)][IndexTopicData['PER_CHANGE_INDEX']]=!![];}}return Log[_0x9f7ae6(0x27a)](_0x9f7ae6(0x272)+this[_0x9f7ae6(0x28e)]+'|'+this['exchange']+'|'+this[_0x9f7ae6(0x250)]),super[_0x9f7ae6(0x24c)](IndexTopicData['mappingArray']);}}class DepthTopicData extends TopicData{constructor(){const _0x199115=a0_0x6c0704;super(TopicTypes[_0x199115(0x221)]);}[a0_0x6c0704(0x1f2)](){const _0x4df9be=a0_0x6c0704;return Log[_0x4df9be(0x27a)](_0x4df9be(0x2bb)+this[_0x4df9be(0x28e)]+'|'+this[_0x4df9be(0x1b2)]+'|'+this[_0x4df9be(0x250)]),super['prepareJson'](DepthTopicData[_0x4df9be(0x1ca)]);}}class Util{constructor(){}static[a0_0x6c0704(0x2a4)](_0x2dbb33){const _0x62d44a=a0_0x6c0704;let _0x42eb4d=new Uint8Array(_0x2dbb33),_0x4ee4fb=0x0,_0x25796c=_0x42eb4d[_0x62d44a(0x297)];for(let _0x20c20b=0x0,_0x2c8458=_0x25796c-0x1;_0x20c20b<_0x25796c;_0x20c20b++,_0x2c8458--){_0x4ee4fb+=_0x42eb4d[_0x2c8458]<<_0x20c20b*0x8;}return _0x4ee4fb;}static[a0_0x6c0704(0x18f)](_0x951c11,_0x3ddc6e){let _0x247891=new DataView(_0x951c11,_0x3ddc6e,0x4);return _0x247891['getFloat32'](0x0);}static[a0_0x6c0704(0x260)](_0x19e78a){const _0x127455=a0_0x6c0704;return new TextDecoder(_0x127455(0x1d8))['decode'](_0x19e78a);}static[a0_0x6c0704(0x231)](_0x38e9e9){const _0x5851ef=a0_0x6c0704;let _0x16218a=new Date(_0x38e9e9*0x3e8),_0x4d405a=Util[_0x5851ef(0x29a)](_0x16218a['getDate']())+'/'+Util[_0x5851ef(0x29a)](_0x16218a[_0x5851ef(0x1e0)]()+0x1)+'/'+_0x16218a[_0x5851ef(0x211)]()+'\x20'+Util[_0x5851ef(0x29a)](_0x16218a[_0x5851ef(0x2b5)]())+':'+Util[_0x5851ef(0x29a)](_0x16218a['getMinutes']())+':'+Util['leadingZero'](_0x16218a['getSeconds']());return _0x4d405a;}static['getFormatDate2'](_0x51f060){const _0x529f0a=a0_0x6c0704;let _0x3384d4=new Date(0x7b2,0x0,0x1);_0x3384d4['setSeconds'](_0x51f060);let _0x2347b2=Util[_0x529f0a(0x29a)](_0x3384d4[_0x529f0a(0x194)]())+'/'+Util[_0x529f0a(0x29a)](_0x3384d4[_0x529f0a(0x1e0)]()+0x1)+'/'+_0x3384d4['getFullYear']()+'\x20'+Util[_0x529f0a(0x29a)](_0x3384d4[_0x529f0a(0x2b5)]())+':'+Util[_0x529f0a(0x29a)](_0x3384d4[_0x529f0a(0x24a)]())+':'+Util[_0x529f0a(0x29a)](_0x3384d4[_0x529f0a(0x1c1)]());return _0x2347b2;}static[a0_0x6c0704(0x29a)](_0x213351){const _0x543978=a0_0x6c0704;return _0x213351<0xa?'0'+_0x213351['toString']():_0x213351[_0x543978(0x22c)]();}static[a0_0x6c0704(0x2b8)](_0x29a390){const _0x516c3d=a0_0x6c0704;if(_0x29a390[_0x516c3d(0x251)]('&')[_0x516c3d(0x297)]>Constants[_0x516c3d(0x1a6)])return console[_0x516c3d(0x1d9)]('Maximum\x20scrips\x20allowed\x20per\x20request\x20is\x20'+Constants[_0x516c3d(0x1a6)]),![];return!![];}static[a0_0x6c0704(0x192)](_0x3b5d54){const _0x56aff3=a0_0x6c0704;return new RegExp(_0x56aff3(0x1cd))[_0x56aff3(0x27c)](_0x3b5d54);}}class BinRequest{constructor(){}static[a0_0x6c0704(0x2a5)](_0x49dc72){const _0x1bfd63=a0_0x6c0704;let _0x19c628=new ByteBuilder(0xb);return _0x19c628[_0x1bfd63(0x1be)](BinRespTypes['ACK_TYPE']),_0x19c628['appendByte'](0x1),_0x19c628[_0x1bfd63(0x1be)](0x1),_0x19c628[_0x1bfd63(0x202)](0x4),_0x19c628[_0x1bfd63(0x25b)](_0x49dc72),_0x19c628['getBytes']();}static[a0_0x6c0704(0x271)](_0x1994f5){const _0x288449=a0_0x6c0704;let _0x67a89a=_0x1994f5[_0x288449(0x297)],_0x52470e=_0x288449(0x2b9),_0x571a9d=_0x52470e[_0x288449(0x297)],_0x2015bb=new ByteBuilder(_0x67a89a+_0x571a9d+0xa);return _0x2015bb['appendByte'](BinRespTypes[_0x288449(0x1f8)]),_0x2015bb[_0x288449(0x1be)](0x2),_0x2015bb[_0x288449(0x1be)](0x1),_0x2015bb['appendShort'](_0x67a89a),_0x2015bb['appendString'](_0x1994f5),_0x2015bb[_0x288449(0x1be)](0x2),_0x2015bb[_0x288449(0x202)](_0x571a9d),_0x2015bb[_0x288449(0x285)](_0x52470e),_0x2015bb[_0x288449(0x1f0)]();}static[a0_0x6c0704(0x1fc)](_0x198f05,_0x3927f9){const _0x4a8747=a0_0x6c0704;let _0x3b58ad=_0x198f05[_0x4a8747(0x297)],_0x2323e6=_0x4a8747(0x2b9),_0x65bf43=_0x2323e6[_0x4a8747(0x297)],_0x5e2b92=new ByteBuilder(_0x3b58ad+_0x65bf43+0x12);return _0x5e2b92[_0x4a8747(0x1be)](BinRespTypes[_0x4a8747(0x1f8)]),_0x5e2b92[_0x4a8747(0x1be)](0x4),_0x5e2b92[_0x4a8747(0x1be)](0x1),_0x5e2b92[_0x4a8747(0x202)](_0x3b58ad),_0x5e2b92[_0x4a8747(0x285)](_0x198f05),_0x5e2b92['appendByte'](0x2),_0x5e2b92[_0x4a8747(0x202)](0x1),_0x5e2b92[_0x4a8747(0x1be)](_0x3927f9[_0x4a8747(0x1b6)](0x0)),_0x5e2b92[_0x4a8747(0x1be)](0x3),_0x5e2b92[_0x4a8747(0x202)](0x1),_0x5e2b92[_0x4a8747(0x1be)](Constants[_0x4a8747(0x199)]?0x1:0x0),_0x5e2b92['appendByte'](0x4),_0x5e2b92['appendShort'](_0x65bf43),_0x5e2b92['appendString'](_0x2323e6),_0x5e2b92[_0x4a8747(0x1f0)]();}static['prepareConnectionRequest2'](_0x461c82,_0x21f77d){const _0x5ea17e=a0_0x6c0704;let _0x5e95f4=_0x5ea17e(0x2b9),_0x49107c=_0x5e95f4['length'],_0x21c3be=_0x461c82[_0x5ea17e(0x297)],_0xe03159=_0x21f77d[_0x5ea17e(0x297)],_0x665447=new ByteBuilder(_0x49107c+_0x21c3be+_0xe03159+0xd);return _0x665447['appendByte'](BinRespTypes[_0x5ea17e(0x1f8)]),_0x665447[_0x5ea17e(0x1be)](0x3),_0x665447[_0x5ea17e(0x1be)](0x1),_0x665447[_0x5ea17e(0x202)](_0x21c3be),_0x665447[_0x5ea17e(0x285)](_0x461c82),_0x665447[_0x5ea17e(0x1be)](0x2),_0x665447[_0x5ea17e(0x202)](_0xe03159),_0x665447[_0x5ea17e(0x285)](_0x21f77d),_0x665447['appendByte'](0x3),_0x665447[_0x5ea17e(0x202)](_0x49107c),_0x665447[_0x5ea17e(0x285)](_0x5e95f4),_0x665447[_0x5ea17e(0x1f0)]();}static['prepareSubsUnSubsRequest'](_0x5c945a,_0x5932b9,_0x416809,_0x38ac50){const _0x46f48d=a0_0x6c0704;if(!Util['isScripOK'](_0x5c945a))return null;let _0x18c93a=BinRequest[_0x46f48d(0x21b)](_0x5c945a,_0x416809),_0x169b79=new ByteBuilder(_0x18c93a['length']+0xb);return _0x169b79[_0x46f48d(0x1be)](_0x5932b9),_0x169b79[_0x46f48d(0x1be)](0x2),_0x169b79['appendByte'](0x1),_0x169b79['appendShort'](_0x18c93a['length']),_0x169b79[_0x46f48d(0x22d)](_0x18c93a,_0x18c93a[_0x46f48d(0x297)]),_0x169b79['appendByte'](0x2),_0x169b79['appendShort'](0x1),_0x169b79['appendByte'](_0x38ac50),_0x169b79[_0x46f48d(0x1f0)]();}static[a0_0x6c0704(0x245)](_0x33f3bb,_0x2493e1,_0x547065){const _0x3c4095=a0_0x6c0704;let _0x108b7d=new ByteBuilder(0x13);_0x108b7d[_0x3c4095(0x1be)](_0x33f3bb),_0x108b7d[_0x3c4095(0x1be)](0x2),_0x108b7d['appendByte'](0x1),_0x108b7d[_0x3c4095(0x202)](0x8);let _0x282931=0x0,_0x963f91=0x0;return _0x547065[_0x3c4095(0x28f)](function(_0x5c7640){const _0x3d4ec6=_0x3c4095;if(_0x5c7640>0x0&&_0x5c7640<=0x20)_0x282931|=0x1<<_0x5c7640;else{if(_0x5c7640>0x20&&_0x5c7640<=0x40)_0x963f91|=0x1<<_0x5c7640;else console[_0x3d4ec6(0x1d9)](_0x3d4ec6(0x1c9));}}),_0x108b7d[_0x3c4095(0x25b)](_0x963f91),_0x108b7d['appendInt'](_0x282931),_0x108b7d[_0x3c4095(0x1be)](0x2),_0x108b7d['appendShort'](0x1),_0x108b7d[_0x3c4095(0x1be)](_0x2493e1),_0x108b7d['getBytes']();}static['prepareChannelRequest'](_0xebb994,_0x59ab73){const _0x384e03=a0_0x6c0704;let _0x3d702c=new ByteBuilder(0xf);_0x3d702c[_0x384e03(0x1be)](_0xebb994),_0x3d702c[_0x384e03(0x1be)](0x1),_0x3d702c[_0x384e03(0x1be)](0x1),_0x3d702c['appendShort'](0x8);let _0x7d0745=0x0,_0x120b9b=0x0;return _0x59ab73[_0x384e03(0x28f)](function(_0xa9afe0){const _0x25a9f1=_0x384e03;if(_0xa9afe0>0x0&&_0xa9afe0<=0x20)_0x7d0745|=0x1<<_0xa9afe0;else{if(_0xa9afe0>0x20&&_0xa9afe0<=0x40)_0x120b9b|=0x1<<_0xa9afe0;else console[_0x25a9f1(0x1d9)]('Error:\x20Channel\x20values\x20must\x20be\x20in\x20this\x20range\x20\x20[\x20val\x20>\x200\x20&&\x20val\x20<\x2065\x20]');}}),_0x3d702c[_0x384e03(0x25b)](_0x120b9b),_0x3d702c[_0x384e03(0x25b)](_0x7d0745),_0x3d702c[_0x384e03(0x1f0)]();}static[a0_0x6c0704(0x1d7)](_0xf2aeea,_0x5169d7,_0x470c80){const _0x537b9e=a0_0x6c0704;let _0x44896f=BinRequest['getScripByteArray'](_0xf2aeea,_0x470c80),_0x3677cf=_0x44896f[_0x537b9e(0x297)],_0x1c8dff=new ByteBuilder(_0x3677cf+0x7);return _0x1c8dff['appendByte'](_0x5169d7),_0x1c8dff['appendByte'](0x1),_0x1c8dff[_0x537b9e(0x1be)](0x1),_0x1c8dff[_0x537b9e(0x202)](_0x3677cf),_0x1c8dff[_0x537b9e(0x22d)](_0x44896f,_0x3677cf),_0x1c8dff[_0x537b9e(0x1f0)]();}static[a0_0x6c0704(0x1bb)](_0x551d88){const _0x197fe3=a0_0x6c0704;let _0x5b5b7d=new ByteBuilder(0xb);return _0x5b5b7d[_0x197fe3(0x1be)](BinRespTypes[_0x197fe3(0x1c0)]),_0x5b5b7d[_0x197fe3(0x1be)](0x1),_0x5b5b7d[_0x197fe3(0x1be)](0x1),_0x5b5b7d[_0x197fe3(0x202)](0x4),_0x5b5b7d[_0x197fe3(0x25b)](_0x551d88),_0x5b5b7d[_0x197fe3(0x1f0)]();}static[a0_0x6c0704(0x21b)](_0x4a173c,_0x2b943e){const _0x14fb7f=a0_0x6c0704;if(_0x4a173c[_0x14fb7f(0x1b6)](_0x4a173c[_0x14fb7f(0x297)]-0x1)==0x26)_0x4a173c=_0x4a173c[_0x14fb7f(0x1a4)](0x0,_0x4a173c[_0x14fb7f(0x297)]-0x1);let _0x1e095c=_0x4a173c[_0x14fb7f(0x251)]('&'),_0x536f9e=_0x1e095c['length'],_0x5d5582=0x0;for(let _0x3c46ea=0x0;_0x3c46ea<_0x536f9e;_0x3c46ea++){if(!/^(sf|if|dp)\|/[_0x14fb7f(0x27c)](_0x1e095c[_0x3c46ea]))_0x1e095c[_0x3c46ea]=_0x2b943e+'|'+_0x1e095c[_0x3c46ea];_0x5d5582+=_0x1e095c[_0x3c46ea][_0x14fb7f(0x297)]+0x1;}let _0x32e8f4=new Uint8Array(_0x5d5582+0x2),_0x1ed581=0x0;_0x32e8f4[_0x1ed581++]=_0x536f9e>>0x8&0xff,_0x32e8f4[_0x1ed581++]=_0x536f9e&0xff;for(let _0x196534=0x0;_0x196534<_0x536f9e;_0x196534++){let _0x55cf5a=_0x1e095c[_0x196534],_0x145a31=_0x55cf5a[_0x14fb7f(0x297)];_0x32e8f4[_0x1ed581++]=_0x145a31&0xff;for(let _0x26d1fb=0x0;_0x26d1fb<_0x145a31;_0x26d1fb++){_0x32e8f4[_0x1ed581++]=_0x55cf5a[_0x14fb7f(0x1b6)](_0x26d1fb);}}return _0x32e8f4;}static['getOpChainSubsRequest'](_0x499bad,_0x30fc6c,_0x134388,_0x5a3360,_0x19f74b){const _0x30dd79=a0_0x6c0704;let _0x35dec4=_0x499bad['length'],_0x347b02=new ByteBuilder(_0x35dec4+0x1e);return _0x347b02[_0x30dd79(0x1be)](BinRespTypes[_0x30dd79(0x1e8)]),_0x347b02['appendByte'](0x5),_0x347b02[_0x30dd79(0x1be)](0x1),_0x347b02[_0x30dd79(0x202)](_0x35dec4),_0x347b02['appendString'](_0x499bad),_0x347b02[_0x30dd79(0x1be)](0x2),_0x347b02[_0x30dd79(0x202)](0x8),_0x347b02[_0x30dd79(0x26e)](_0x30fc6c),_0x347b02[_0x30dd79(0x1be)](0x3),_0x347b02[_0x30dd79(0x202)](0x1),_0x347b02[_0x30dd79(0x1be)](_0x134388),_0x347b02[_0x30dd79(0x1be)](0x4),_0x347b02[_0x30dd79(0x202)](0x1),_0x347b02['appendByte'](_0x5a3360),_0x347b02[_0x30dd79(0x1be)](0x5),_0x347b02['appendShort'](0x1),_0x347b02[_0x30dd79(0x1be)](_0x19f74b),_0x347b02['getBytes']();}}BinRequest[a0_0x6c0704(0x238)]=new Uint8Array([0x0,0x1,0xb]);class HSWebSocket{constructor(){const _0x3e9aef=a0_0x6c0704;this[_0x3e9aef(0x1ea)]=null,this['ws']=null,this['hsParser']=null,this[_0x3e9aef(0x1ba)]=null,this[_0x3e9aef(0x20d)]=null,this[_0x3e9aef(0x218)]=null,this[_0x3e9aef(0x283)]=null;}['close'](){const _0x1f3acf=a0_0x6c0704;this['ws']&&(this['ws'][_0x1f3acf(0x253)](0x3e8,_0x1f3acf(0x287)),this['ws']=null);}[a0_0x6c0704(0x288)](){const _0xda2695=a0_0x6c0704;return this['ws']?this['ws'][_0xda2695(0x1db)]==WebSocket['OPEN']:![];}['connect'](_0x479514,_0x1c8809){const _0x4f19f9=a0_0x6c0704;Log[_0x4f19f9(0x27a)](_0x4f19f9(0x226)),this[_0x4f19f9(0x1ea)]=_0x479514;let _0x2542aa=(_0x1c8809?_0x1c8809:Constants[_0x4f19f9(0x20f)])*0x3e8;this['ws']&&(this['ws'][_0x4f19f9(0x291)]=_0x5250bf=>{},this['ws'][_0x4f19f9(0x27e)]=_0x38121c=>{},this['ws'][_0x4f19f9(0x215)]=_0x5a3931=>{},this['ws'][_0x4f19f9(0x1cb)]=_0x5d560f=>{},this['ws']['close'](0x3e8,'Cleanup\x20previous\x20connection')),this['ws']=new WebSocket(_0x479514);if(this['ws'])this['ws'][_0x4f19f9(0x23d)]='arraybuffer',this[_0x4f19f9(0x235)]=new HSParser(this['ws'],this,_0x2542aa);else{console[_0x4f19f9(0x1d9)](_0x4f19f9(0x19f));return;}this['ws']['onopen']=_0x27c753=>{const _0x22a596=_0x4f19f9;Log[_0x22a596(0x27a)](_0x22a596(0x222)),this[_0x22a596(0x1ba)]();},this['ws'][_0x4f19f9(0x27e)]=_0x454315=>{const _0x5c61b0=_0x4f19f9;let _0x54ffbd=_0x454315[_0x5c61b0(0x247)];if(_0x54ffbd instanceof ArrayBuffer){let _0x3ca36c=this[_0x5c61b0(0x235)]['parseData'](_0x54ffbd);if(_0x3ca36c)this[_0x5c61b0(0x218)](JSON[_0x5c61b0(0x21d)](_0x3ca36c));}else this['onMessage'](_0x54ffbd);},this['ws'][_0x4f19f9(0x215)]=_0x742736=>{const _0x474fac=_0x4f19f9;Log['hsmDebug'](_0x474fac(0x266)+_0x742736[_0x474fac(0x210)]+_0x474fac(0x21e)+_0x742736[_0x474fac(0x277)]+',\x20WasClean:'+_0x742736[_0x474fac(0x28c)]),this[_0x474fac(0x20d)](_0x742736);},this['ws'][_0x4f19f9(0x1cb)]=_0x50e3fa=>{const _0x517e45=_0x4f19f9;Log['hsmDebug']('onError::MSG:'+_0x50e3fa),this[_0x517e45(0x283)](_0x50e3fa);};}[a0_0x6c0704(0x269)](_0x45d970){const _0xd2c03b=a0_0x6c0704;let _0x2a4b82=JSON[_0xd2c03b(0x25c)](_0x45d970);Log[_0xd2c03b(0x27a)](_0x2a4b82);let _0x5543ff=_0x2a4b82[Keys[_0xd2c03b(0x227)]],_0x1f926f=null,_0x99b9d3=_0x2a4b82[Keys[_0xd2c03b(0x191)]],_0x48d788=_0x2a4b82[Keys[_0xd2c03b(0x256)]],_0x2498f4=_0x2a4b82[Keys['CHANNEL_NUMS']];switch(_0x5543ff){case ReqTypeValues[_0xd2c03b(0x2b1)]:let _0xb63d9a=_0x2a4b82['mode'];if(_0x2a4b82[Keys[_0xd2c03b(0x293)]]!==undefined&&_0xb63d9a!==undefined){let _0x15049b=_0x2a4b82[Keys[_0xd2c03b(0x293)]];_0x1f926f=BinRequest[_0xd2c03b(0x1fc)](_0x15049b,_0xb63d9a);}else{if(_0x2a4b82[Keys[_0xd2c03b(0x203)]]!==undefined&&_0xb63d9a!==undefined){let _0x416604=_0x2a4b82[Keys[_0xd2c03b(0x203)]];_0x1f926f=BinRequest[_0xd2c03b(0x1fc)](_0x416604,_0xb63d9a);}else{if(_0x2a4b82[Keys[_0xd2c03b(0x197)]]!==undefined){let _0x537c50=_0x2a4b82[Keys[_0xd2c03b(0x197)]],_0x5e973f=_0x2a4b82[Keys[_0xd2c03b(0x1de)]];if(_0x537c50&&_0x5e973f)_0x1f926f=BinRequest[_0xd2c03b(0x233)](_0x537c50,_0x5e973f);else console[_0xd2c03b(0x1d9)](_0xd2c03b(0x1aa));}else console[_0xd2c03b(0x1d9)](_0xd2c03b(0x2ae));}}break;case ReqTypeValues['SCRIP_SUBS']:_0x1f926f=BinRequest['prepareSubsUnSubsRequest'](_0x99b9d3,BinRespTypes['SUBSCRIBE_TYPE'],PREFIX['SCRIP'],_0x48d788);break;case ReqTypeValues[_0xd2c03b(0x28b)]:_0x1f926f=BinRequest[_0xd2c03b(0x2cc)](_0x99b9d3,BinRespTypes[_0xd2c03b(0x1a8)],PREFIX['SCRIP'],_0x48d788);break;case ReqTypeValues[_0xd2c03b(0x23b)]:_0x1f926f=BinRequest[_0xd2c03b(0x2cc)](_0x99b9d3,BinRespTypes[_0xd2c03b(0x1ed)],PREFIX['INDEX'],_0x48d788);break;case ReqTypeValues['INDEX_UNSUBS']:_0x1f926f=BinRequest[_0xd2c03b(0x2cc)](_0x99b9d3,BinRespTypes['UNSUBSCRIBE_TYPE'],PREFIX[_0xd2c03b(0x1b7)],_0x48d788);break;case ReqTypeValues['DEPTH_SUBS']:_0x1f926f=BinRequest[_0xd2c03b(0x2cc)](_0x99b9d3,BinRespTypes[_0xd2c03b(0x1ed)],PREFIX[_0xd2c03b(0x221)],_0x48d788);break;case ReqTypeValues[_0xd2c03b(0x23c)]:_0x1f926f=BinRequest['prepareSubsUnSubsRequest'](_0x99b9d3,BinRespTypes[_0xd2c03b(0x1a8)],PREFIX[_0xd2c03b(0x221)],_0x48d788);break;case ReqTypeValues[_0xd2c03b(0x2c7)]:_0x1f926f=BinRequest[_0xd2c03b(0x20b)](BinRespTypes[_0xd2c03b(0x270)],_0x2498f4);break;case ReqTypeValues['CHANNEL_RESUME']:_0x1f926f=BinRequest[_0xd2c03b(0x20b)](BinRespTypes[_0xd2c03b(0x242)],_0x2498f4);break;case ReqTypeValues[_0xd2c03b(0x1d1)]:_0x1f926f=BinRequest['prepareSnapshotRequest'](_0x99b9d3,BinRespTypes[_0xd2c03b(0x19c)],PREFIX[_0xd2c03b(0x280)]);break;case ReqTypeValues[_0xd2c03b(0x19b)]:_0x1f926f=BinRequest[_0xd2c03b(0x1d7)](_0x99b9d3,BinRespTypes['SNAPSHOT'],PREFIX[_0xd2c03b(0x221)]);break;case ReqTypeValues[_0xd2c03b(0x1b3)]:_0x1f926f=BinRequest[_0xd2c03b(0x1d7)](_0x99b9d3,BinRespTypes[_0xd2c03b(0x19c)],PREFIX[_0xd2c03b(0x1b7)]);break;case ReqTypeValues[_0xd2c03b(0x262)]:_0x1f926f=BinRequest[_0xd2c03b(0x284)](_0x2a4b82[Keys[_0xd2c03b(0x1ef)]],_0x2a4b82[Keys['STK_PRC']],_0x2a4b82[Keys['HIGH_STK']],_0x2a4b82[Keys[_0xd2c03b(0x1a1)]],_0x48d788);break;case ReqTypeValues['LOG']:break;case ReqTypeValues[_0xd2c03b(0x1b1)]:_0x1f926f=BinRequest['prepareLiteChannelRequest'](BinRespTypes[_0xd2c03b(0x2ad)],CHANNEL_DATA_MODE['LITE'],_0x2498f4);break;case ReqTypeValues['FULL']:_0x1f926f=BinRequest['prepareLiteChannelRequest'](BinRespTypes[_0xd2c03b(0x2ad)],CHANNEL_DATA_MODE[_0xd2c03b(0x2be)],_0x2498f4);break;case ReqTypeValues['STR']:_0x1f926f=_0x99b9d3;break;default:_0x1f926f=null;break;}if(this['ws']&&_0x1f926f)this['ws']['send'](_0x1f926f);else console[_0xd2c03b(0x1d9)](_0xd2c03b(0x25a));}}class HSParser{constructor(_0x449b72,_0x3707bf,_0x25e31b){const _0x1c98be=a0_0x6c0704;this['hsWS']=null,this[_0x1c98be(0x22f)]=null,this[_0x1c98be(0x195)]=new Array(),this['counter']=0x0,this[_0x1c98be(0x1d3)]=0x0,this['intervalId']=0x0,this[_0x1c98be(0x22f)]=_0x449b72,this[_0x1c98be(0x1e2)]=_0x3707bf,this[_0x1c98be(0x21f)]=_0x25e31b;}[a0_0x6c0704(0x1d5)](_0x1ec818){const _0x1741b4=a0_0x6c0704;let _0x3806fa=0x0,_0x499076=Util['buf2Long'](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,0x2));Log[_0x1741b4(0x27a)](_0x1741b4(0x1c4)+_0x499076),_0x3806fa+=0x2;let _0x4fa199=Util['buf2Long'](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x1));_0x3806fa+=0x1,Log['hsmDebug']('TYPE::\x20'+_0x4fa199);if(_0x4fa199==BinRespTypes['CONNECTION_TYPE']){const _0x5aa21e={};let _0x5a4c84=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x1));Log['hsmDebug']('Conn\x20fCount:'+_0x5a4c84),_0x3806fa+=0x1;let _0x16cc48=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x1));_0x3806fa+=0x1;let _0x287ef4=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x2));_0x3806fa+=0x2;let _0x52901e=Util[_0x1741b4(0x260)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+_0x287ef4));_0x3806fa+=_0x287ef4;let _0x107541=0x0;if(_0x5a4c84>=0x2){_0x16cc48=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x1)),_0x3806fa+=0x1,_0x287ef4=Util['buf2Long'](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x2)),_0x3806fa+=0x2,_0x107541=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+_0x287ef4)),_0x3806fa+=_0x287ef4;if(_0x5a4c84>=0x3){_0x16cc48=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x1)),_0x3806fa+=0x1,_0x287ef4=Util[_0x1741b4(0x2a4)](_0x1ec818['slice'](_0x3806fa,_0x3806fa+0x2)),_0x3806fa+=0x2;let _0x46a719=JSON[_0x1741b4(0x25c)](Util[_0x1741b4(0x260)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+_0x287ef4)));_0x3806fa+=_0x287ef4,this[_0x1741b4(0x292)](_0x46a719);}Log[_0x1741b4(0x27a)](_0x1741b4(0x24e)+_0x107541);switch(_0x52901e){case BinRespStat['OK']:_0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x1ac)]]=STAT['OK'],_0x5aa21e[RESPONSE_KEYS['TYPE']]=RespTypeValues['CONN'],_0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x2d5)]]=RESPONSE_VALUES[_0x1741b4(0x257)],_0x5aa21e[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x1741b4(0x217)],this[_0x1741b4(0x24b)]();break;case BinRespStat[_0x1741b4(0x2bf)]:_0x5aa21e[RESPONSE_KEYS['STATUS']]=STAT[_0x1741b4(0x2bf)],_0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x227)]]=RespTypeValues[_0x1741b4(0x1f5)],_0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x2d5)]]=RESPONSE_VALUES[_0x1741b4(0x267)],_0x5aa21e[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x1741b4(0x2d0)];break;}this[_0x1741b4(0x1d3)]=_0x107541;}else{if(_0x5a4c84==0x1)switch(_0x52901e){case BinRespStat['OK']:_0x5aa21e[RESPONSE_KEYS['STATUS']]=STAT['OK'],_0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x227)]]=RespTypeValues[_0x1741b4(0x1f5)],_0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x2d5)]]=RESPONSE_VALUES[_0x1741b4(0x257)],_0x5aa21e[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x1741b4(0x217)],this[_0x1741b4(0x24b)]();break;case BinRespStat['NOT_OK']:_0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x1ac)]]=STAT[_0x1741b4(0x2bf)],_0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x227)]]=RespTypeValues['CONN'],_0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x2d5)]]=RESPONSE_VALUES[_0x1741b4(0x267)],_0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x248)]]=RespCodes[_0x1741b4(0x2d0)];break;}else _0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x1ac)]]=STAT[_0x1741b4(0x2bf)],_0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x227)]]=RespTypeValues[_0x1741b4(0x1f5)],_0x5aa21e[RESPONSE_KEYS['MSG']]=RESPONSE_VALUES[_0x1741b4(0x289)],_0x5aa21e[RESPONSE_KEYS[_0x1741b4(0x248)]]=RespCodes[_0x1741b4(0x286)];}return this['sendJsonArrResp'](_0x5aa21e);}else{if(_0x4fa199==BinRespTypes[_0x1741b4(0x1df)]){let _0x40fd1c=0x0;if(this[_0x1741b4(0x1d3)]>0x0){++this[_0x1741b4(0x213)],_0x40fd1c=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x4)),_0x3806fa+=0x4;if(this[_0x1741b4(0x213)]==this[_0x1741b4(0x1d3)]){let _0x372534=BinRequest['getAcknowledgementReq'](_0x40fd1c);if(this[_0x1741b4(0x22f)])this[_0x1741b4(0x22f)]['send'](_0x372534);Log[_0x1741b4(0x27a)](_0x1741b4(0x278)+_0x40fd1c),this[_0x1741b4(0x213)]=0x0;}}const _0x1410ac=[];let _0x573092=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x2));_0x3806fa+=0x2;for(let _0x3afbc6=0x0;_0x3afbc6<_0x573092;_0x3afbc6++){let _0x4f55ba=Util[_0x1741b4(0x2a4)](_0x1ec818['slice'](_0x3806fa,_0x3806fa+0x1));Log[_0x1741b4(0x27a)]('ResponseType:\x20'+_0x4f55ba),_0x3806fa++;if(_0x4f55ba==ResponseTypes[_0x1741b4(0x229)]){let _0x4a7466=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x2));_0x3806fa+=0x2,Log[_0x1741b4(0x27a)](_0x1741b4(0x265)+_0x4a7466);let _0x17d8c0=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x1));_0x3806fa++,Log[_0x1741b4(0x27a)](_0x1741b4(0x220)+_0x17d8c0);let _0x28e04a=Util['buf2String'](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+_0x17d8c0));_0x3806fa+=_0x17d8c0,Log[_0x1741b4(0x27a)](_0x1741b4(0x1e5)+_0x28e04a);let _0x393212=this[_0x1741b4(0x1ec)](_0x28e04a);if(_0x393212){this[_0x1741b4(0x195)][_0x4a7466]=_0x393212;let _0x4b39cb=Util['buf2Long'](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x1));_0x3806fa++,Log[_0x1741b4(0x27a)](_0x1741b4(0x21c)+_0x4b39cb);for(let _0x560b0f=0x0;_0x560b0f<_0x4b39cb;_0x560b0f++){let _0x41c6d1=Util[_0x1741b4(0x2a4)](_0x1ec818['slice'](_0x3806fa,_0x3806fa+0x4));_0x393212['setLongValues'](_0x560b0f,_0x41c6d1),_0x3806fa+=0x4,Log[_0x1741b4(0x27a)](_0x560b0f+':'+_0x41c6d1);}_0x3806fa+=0x2;let _0x47e2fa=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x2));_0x3806fa+=0x2,Log[_0x1741b4(0x27a)](_0x1741b4(0x1bd)+_0x47e2fa);let _0xd133d5=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x1));_0x3806fa++,Log[_0x1741b4(0x27a)](_0x1741b4(0x243)+_0xd133d5),_0x393212['setMultiplierAndPrec'](_0x47e2fa,_0xd133d5);for(let _0x47c430=0x0;_0x47c430<0x3;_0x47c430++){let _0x307f82=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x1));_0x3806fa++;let _0x1e6bfa=Util['buf2String'](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+_0x307f82));_0x3806fa+=_0x307f82,_0x393212[_0x1741b4(0x1c6)](_0x47c430,_0x1e6bfa),Log[_0x1741b4(0x27a)](_0x1741b4(0x1ab)+_0x1e6bfa);}let _0x489588=_0x393212['prepareData']();if(_0x489588)_0x1410ac[_0x1741b4(0x296)](_0x489588);}else Log[_0x1741b4(0x27a)](_0x1741b4(0x1c2));}else{if(_0x4f55ba==ResponseTypes['UPDATE']||_0x4f55ba==ResponseTypes[_0x1741b4(0x1b1)]){Log[_0x1741b4(0x27a)](_0x1741b4(0x2b2)+_0x4f55ba);let _0x4e2ec7=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x2));Log[_0x1741b4(0x27a)](_0x1741b4(0x265)+_0x4e2ec7),_0x3806fa+=0x2;let _0x59366c=this[_0x1741b4(0x195)][_0x4e2ec7];if(!_0x59366c)console[_0x1741b4(0x1d9)](_0x1741b4(0x2c5));else{let _0xaaa23a;_0x4f55ba!=ResponseTypes[_0x1741b4(0x1b1)]?(_0xaaa23a=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x1)),_0x3806fa++):_0xaaa23a=_0x59366c[_0x1741b4(0x1f3)],Log['hsmDebug']('fcount1:\x20'+_0xaaa23a);for(let _0x3dab23=0x0;_0x3dab23<_0xaaa23a;_0x3dab23++){let _0x281647=Util[_0x1741b4(0x2a4)](_0x1ec818['slice'](_0x3806fa,_0x3806fa+0x4));_0x59366c[_0x1741b4(0x23f)](_0x3dab23,_0x281647),Log[_0x1741b4(0x27a)](_0x1741b4(0x1b8)+_0x3dab23+',\x20val:'+_0x281647),_0x3806fa+=0x4;}}let _0x36e53e=_0x59366c[_0x1741b4(0x1f2)]();if(_0x36e53e)_0x1410ac[_0x1741b4(0x296)](_0x36e53e);}else console[_0x1741b4(0x1d9)]('Invalid\x20ResponseType:\x20'+_0x4f55ba);}}return _0x1410ac[_0x1741b4(0x297)]>0x0?_0x1410ac:null;}else{if(_0x4fa199==BinRespTypes[_0x1741b4(0x1ed)]||_0x4fa199==BinRespTypes[_0x1741b4(0x1a8)]){let _0x1611ed=this[_0x1741b4(0x21a)](_0x1ec818,_0x3806fa);const _0x465f9a={};switch(_0x1611ed['charAt'](0x0)==BinRespStat['OK']?BinRespStat['OK']:BinRespStat[_0x1741b4(0x2bf)]){case BinRespStat['OK']:_0x465f9a[RESPONSE_KEYS['STATUS']]=STAT['OK'],_0x465f9a[RESPONSE_KEYS[_0x1741b4(0x227)]]=_0x4fa199==BinRespTypes[_0x1741b4(0x1ed)]?RespTypeValues[_0x1741b4(0x236)]:RespTypeValues['UNSUBS'],_0x465f9a[RESPONSE_KEYS[_0x1741b4(0x2d5)]]=RESPONSE_VALUES[_0x1741b4(0x257)],_0x465f9a[RESPONSE_KEYS[_0x1741b4(0x248)]]=RespCodes['SUCCESS'];break;case BinRespStat[_0x1741b4(0x2bf)]:_0x465f9a[RESPONSE_KEYS[_0x1741b4(0x1ac)]]=STAT['NOT_OK'],_0x4fa199==BinRespTypes[_0x1741b4(0x1ed)]?(_0x465f9a[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x1741b4(0x236)],_0x465f9a[RESPONSE_KEYS[_0x1741b4(0x2d5)]]=_0x1741b4(0x2c9),_0x465f9a[RESPONSE_KEYS[_0x1741b4(0x248)]]=RespCodes[_0x1741b4(0x1f9)]):(_0x465f9a[RESPONSE_KEYS[_0x1741b4(0x227)]]=RespTypeValues[_0x1741b4(0x29e)],_0x465f9a[RESPONSE_KEYS[_0x1741b4(0x2d5)]]=_0x1741b4(0x2cb),_0x465f9a[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x1741b4(0x264)]);break;}return this[_0x1741b4(0x1bc)](_0x465f9a);}else{if(_0x4fa199==BinRespTypes[_0x1741b4(0x19c)]){let _0x262f3c=this[_0x1741b4(0x21a)](_0x1ec818,_0x3806fa);const _0x224a45={};switch(_0x262f3c){case BinRespStat['OK']:_0x224a45[RESPONSE_KEYS[_0x1741b4(0x1ac)]]=STAT['OK'],_0x224a45[RESPONSE_KEYS[_0x1741b4(0x227)]]=RespTypeValues[_0x1741b4(0x229)],_0x224a45[RESPONSE_KEYS['MSG']]=RESPONSE_VALUES['SUCCESSFUL'],_0x224a45[RESPONSE_KEYS[_0x1741b4(0x248)]]=RespCodes['SUCCESS'];break;case BinRespStat['NOT_OK']:_0x224a45[RESPONSE_KEYS[_0x1741b4(0x1ac)]]=STAT['NOT_OK'],_0x224a45[RESPONSE_KEYS[_0x1741b4(0x227)]]=RespTypeValues[_0x1741b4(0x229)],_0x224a45[RESPONSE_KEYS['MSG']]=RESPONSE_VALUES['FAILED'],_0x224a45[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x1741b4(0x2c6)];break;}return this[_0x1741b4(0x1bc)](_0x224a45);}else{if(_0x4fa199==BinRespTypes[_0x1741b4(0x270)]||_0x4fa199==BinRespTypes['CHRESUME_TYPE']){let _0x3409a=this['getStatus'](_0x1ec818,_0x3806fa);const _0x18b9aa={};switch(_0x3409a){case BinRespStat['OK']:_0x18b9aa[RESPONSE_KEYS[_0x1741b4(0x1ac)]]=STAT['OK'],_0x18b9aa[RESPONSE_KEYS['TYPE']]=_0x4fa199==BinRespTypes['CHPAUSE_TYPE']?RespTypeValues[_0x1741b4(0x2b7)]:RespTypeValues['CHANNELR'],_0x18b9aa[RESPONSE_KEYS['MSG']]=RESPONSE_VALUES[_0x1741b4(0x257)],_0x18b9aa[RESPONSE_KEYS[_0x1741b4(0x248)]]=RespCodes['SUCCESS'];break;case BinRespStat[_0x1741b4(0x2bf)]:_0x18b9aa[RESPONSE_KEYS['STATUS']]=STAT[_0x1741b4(0x2bf)],_0x18b9aa[RESPONSE_KEYS['TYPE']]=_0x4fa199==BinRespTypes['CHPAUSE_TYPE']?RespTypeValues[_0x1741b4(0x2b7)]:RespTypeValues[_0x1741b4(0x204)],_0x18b9aa[RESPONSE_KEYS[_0x1741b4(0x2d5)]]=RESPONSE_VALUES[_0x1741b4(0x267)],_0x18b9aa[RESPONSE_KEYS[_0x1741b4(0x248)]]=_0x4fa199==BinRespTypes['CHPAUSE_TYPE']?RespCodes[_0x1741b4(0x201)]:RespCodes[_0x1741b4(0x1ad)];break;}return this[_0x1741b4(0x1bc)](_0x18b9aa);}else{if(_0x4fa199==BinRespTypes[_0x1741b4(0x1e8)]){let _0x30283c=this['getStatus'](_0x1ec818,_0x3806fa);_0x3806fa+=0x5;const _0x5128fb={};switch(_0x30283c){case BinRespStat['OK']:_0x5128fb[RESPONSE_KEYS['STATUS']]=STAT['OK'],_0x5128fb[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x1741b4(0x2d4)],_0x5128fb[RESPONSE_KEYS[_0x1741b4(0x2d5)]]=RESPONSE_VALUES[_0x1741b4(0x257)],_0x5128fb[RESPONSE_KEYS[_0x1741b4(0x248)]]=RespCodes[_0x1741b4(0x217)];let _0x587190=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,++_0x3806fa)),_0x2f7644=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+0x2));_0x3806fa+=0x2;let _0x3de567=Util[_0x1741b4(0x260)](_0x1ec818['slice'](_0x3806fa,_0x3806fa+_0x2f7644));_0x3806fa+=_0x2f7644,_0x5128fb[_0x1741b4(0x268)]=_0x3de567,_0x587190=Util[_0x1741b4(0x2a4)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,++_0x3806fa)),_0x2f7644=Util[_0x1741b4(0x2a4)](_0x1ec818['slice'](_0x3806fa,_0x3806fa+0x2)),_0x3806fa+=0x2;let _0x4e8ff8=Util[_0x1741b4(0x260)](_0x1ec818[_0x1741b4(0x196)](_0x3806fa,_0x3806fa+_0x2f7644));_0x3806fa+=_0x2f7644,_0x5128fb[_0x1741b4(0x228)]=JSON[_0x1741b4(0x25c)](_0x4e8ff8)[_0x1741b4(0x247)];break;case BinRespStat[_0x1741b4(0x2bf)]:_0x5128fb[RESPONSE_KEYS[_0x1741b4(0x1ac)]]=STAT[_0x1741b4(0x2bf)],_0x5128fb[RESPONSE_KEYS[_0x1741b4(0x227)]]=RespTypeValues['OPC'],_0x5128fb[RESPONSE_KEYS[_0x1741b4(0x2d5)]]=RESPONSE_VALUES['FAILED'],_0x5128fb[RESPONSE_KEYS[_0x1741b4(0x248)]]=0x2b20;break;}return this[_0x1741b4(0x1bc)](_0x5128fb);}else{if(_0x4fa199==BinRespTypes[_0x1741b4(0x2ad)]){let _0x563211=this[_0x1741b4(0x21a)](_0x1ec818,_0x3806fa);const _0x298518={};switch(_0x563211){case BinRespStat['OK']:_0x298518[RESPONSE_KEYS[_0x1741b4(0x1ac)]]=STAT['OK'],_0x298518[RESPONSE_KEYS[_0x1741b4(0x227)]]=_0x4fa199==BinRespTypes[_0x1741b4(0x2ad)]?RespTypeValues['LITE']:RespTypeValues[_0x1741b4(0x2be)],_0x298518[RESPONSE_KEYS['MSG']]=RESPONSE_VALUES[_0x1741b4(0x257)],_0x298518[RESPONSE_KEYS[_0x1741b4(0x248)]]=RespCodes[_0x1741b4(0x217)];break;case BinRespStat[_0x1741b4(0x2bf)]:_0x298518[RESPONSE_KEYS[_0x1741b4(0x1ac)]]=STAT[_0x1741b4(0x2bf)],_0x298518[RESPONSE_KEYS[_0x1741b4(0x227)]]=_0x4fa199==BinRespTypes[_0x1741b4(0x2ad)]?RespTypeValues[_0x1741b4(0x1b1)]:RespTypeValues[_0x1741b4(0x2be)],_0x298518[RESPONSE_KEYS[_0x1741b4(0x2d5)]]=RESPONSE_VALUES[_0x1741b4(0x267)],_0x298518[RESPONSE_KEYS['STAT_CODE']]=0x2ee1;break;}return this['sendJsonArrResp'](_0x298518);}else{if(_0x4fa199==BinRespTypes[_0x1741b4(0x26c)])try{return this[_0x1741b4(0x1bc)](this[_0x1741b4(0x2a7)](_0x1ec818));}catch(_0xb41e8e){return console[_0x1741b4(0x1d9)]('Invalid\x20custom\x20message:\x20'+_0xb41e8e[_0x1741b4(0x208)]),null;}else return null;}}}}}}}}[a0_0x6c0704(0x21a)](_0x317f04,_0x151990){const _0x5a5bc2=a0_0x6c0704;let _0x4cf4ed=BinRespStat['NOT_OK'][_0x5a5bc2(0x22c)](),_0x27bf9b=Util[_0x5a5bc2(0x2a4)](_0x317f04['slice'](_0x151990,++_0x151990));if(_0x27bf9b>0x0){let _0x45e797=Util[_0x5a5bc2(0x2a4)](_0x317f04[_0x5a5bc2(0x196)](_0x151990,++_0x151990)),_0x20f9c2=Util[_0x5a5bc2(0x2a4)](_0x317f04[_0x5a5bc2(0x196)](_0x151990,_0x151990+0x2));_0x151990+=0x2,_0x4cf4ed=Util[_0x5a5bc2(0x260)](_0x317f04['slice'](_0x151990,_0x151990+_0x20f9c2)),_0x151990+=_0x20f9c2;}return _0x4cf4ed;}[a0_0x6c0704(0x2a7)](_0x2e6923){const _0x4dcf6e=a0_0x6c0704,_0x3abffc=new Uint8Array(_0x2e6923),_0x4dbd24=new DataView(_0x2e6923);if(_0x3abffc['length']<0x4||_0x3abffc[0x2]!=BinRespTypes[_0x4dcf6e(0x26c)])throw new Error(_0x4dcf6e(0x2d1));const _0x144f17=0x2+_0x4dbd24['getUint16'](0x0);if(_0x144f17>_0x3abffc[_0x4dcf6e(0x297)])throw new Error(_0x4dcf6e(0x23a));let _0x2ed751=0x0,_0x3cd4ba='',_0x47e611=0x0,_0x1d4e0a=0x4;for(let _0x23d30d=0x0;_0x23d30d<_0x3abffc[0x3];_0x23d30d++){if(_0x1d4e0a+0x3>_0x144f17)throw new Error(_0x4dcf6e(0x2a1));const _0x117dbd=_0x3abffc[_0x1d4e0a],_0x4b4983=_0x4dbd24['getUint16'](_0x1d4e0a+0x1);_0x1d4e0a+=0x3;if(_0x1d4e0a+_0x4b4983>_0x144f17)throw new Error(_0x4dcf6e(0x2bc));if(_0x117dbd==0x1&&_0x4b4983==0x4)_0x2ed751=_0x4dbd24[_0x4dcf6e(0x281)](_0x1d4e0a);else{if(_0x117dbd==0x2)_0x3cd4ba=Util['buf2String'](_0x2e6923[_0x4dcf6e(0x196)](_0x1d4e0a,_0x1d4e0a+_0x4b4983));else{if(_0x117dbd==0x3&&_0x4b4983==0x1)_0x47e611=_0x3abffc[_0x1d4e0a];}}_0x1d4e0a+=_0x4b4983;}const _0x4ebe4a={};return _0x4ebe4a[RESPONSE_KEYS[_0x4dcf6e(0x1ac)]]=STAT[_0x4dcf6e(0x2bf)],_0x4ebe4a[RESPONSE_KEYS[_0x4dcf6e(0x227)]]=CUSTOM_MSG_REF_TYPES[_0x47e611]||RespTypeValues[_0x4dcf6e(0x2d5)],_0x4ebe4a[RESPONSE_KEYS[_0x4dcf6e(0x2d5)]]=_0x3cd4ba,_0x4ebe4a[RESPONSE_KEYS['STAT_CODE']]=_0x2ed751,_0x4ebe4a;}[a0_0x6c0704(0x1ec)](_0x9a7137){const _0x408006=a0_0x6c0704;let _0x8d8039=_0x9a7137[_0x408006(0x251)]('|')[0x0],_0x43aa57=null;switch(_0x8d8039){case TopicTypes[_0x408006(0x280)]:_0x43aa57=new ScripTopicData(),_0x43aa57[_0x408006(0x1f3)]=Constants[_0x408006(0x2d6)];break;case TopicTypes[_0x408006(0x1b7)]:_0x43aa57=new IndexTopicData(),_0x43aa57[_0x408006(0x1f3)]=Constants[_0x408006(0x1da)];break;case TopicTypes[_0x408006(0x221)]:_0x43aa57=new DepthTopicData();break;}return _0x43aa57;}[a0_0x6c0704(0x292)](_0x303419){const _0x4dc148=a0_0x6c0704;if(_0x303419){Log['hsmDebug'](_0x4dc148(0x1dc)),ScripTopicData[_0x4dc148(0x1ca)]=new Array(),IndexTopicData[_0x4dc148(0x1ca)]=new Array(),DepthTopicData['mappingArray']=new Array();let _0x4a38cb=new Map();_0x303419[_0x4dc148(0x225)]['forEach'](function(_0x55d81c){const _0x31d3a2=_0x4dc148;_0x4a38cb[_0x31d3a2(0x219)](_0x55d81c['fid'],_0x55d81c);}),Constants['SCRIP_LITE_FCOUNT']=_0x303419[_0x4dc148(0x2b0)]['hfid'],Constants[_0x4dc148(0x1da)]=_0x303419[_0x4dc148(0x2b4)][_0x4dc148(0x1a2)],_0x303419[_0x4dc148(0x198)]['push'](SCRIPFID_MAP['CHANGE']),_0x303419[_0x4dc148(0x198)][_0x4dc148(0x296)](SCRIPFID_MAP['PCHANGE']),_0x303419['scrip'][_0x4dc148(0x296)](SCRIPFID_MAP[_0x4dc148(0x2ba)]),_0x303419[_0x4dc148(0x29c)]['push'](INDEXFID_MAP[_0x4dc148(0x298)]),_0x303419[_0x4dc148(0x29c)][_0x4dc148(0x296)](INDEXFID_MAP[_0x4dc148(0x212)]),ScripTopicData['LTP_INDEX']=_0x303419[_0x4dc148(0x198)][_0x4dc148(0x273)](SCRIPFID_MAP[_0x4dc148(0x1f7)]),ScripTopicData['VOLUME_INDEX']=_0x303419[_0x4dc148(0x198)][_0x4dc148(0x273)](SCRIPFID_MAP[_0x4dc148(0x1fd)]),ScripTopicData['VWAP_INDEX']=_0x303419[_0x4dc148(0x198)][_0x4dc148(0x273)](SCRIPFID_MAP['VWAP']),ScripTopicData[_0x4dc148(0x261)]=_0x303419['scrip'][_0x4dc148(0x273)](SCRIPFID_MAP[_0x4dc148(0x298)]),ScripTopicData[_0x4dc148(0x2d2)]=_0x303419[_0x4dc148(0x198)]['indexOf'](SCRIPFID_MAP[_0x4dc148(0x212)]),ScripTopicData[_0x4dc148(0x1c7)]=_0x303419['scrip'][_0x4dc148(0x273)](SCRIPFID_MAP[_0x4dc148(0x214)]),ScripTopicData['TURNOVER_INDEX']=_0x303419['scrip'][_0x4dc148(0x273)](SCRIPFID_MAP[_0x4dc148(0x2ba)]),IndexTopicData['LTP_INDEX']=_0x303419[_0x4dc148(0x29c)][_0x4dc148(0x273)](INDEXFID_MAP['LTP']),IndexTopicData['CLOSE_INDEX']=_0x303419[_0x4dc148(0x29c)][_0x4dc148(0x273)](INDEXFID_MAP[_0x4dc148(0x214)]),IndexTopicData['CHANGE_INDEX']=_0x303419[_0x4dc148(0x29c)][_0x4dc148(0x273)](INDEXFID_MAP[_0x4dc148(0x298)]),IndexTopicData[_0x4dc148(0x2d2)]=_0x303419[_0x4dc148(0x29c)][_0x4dc148(0x273)](INDEXFID_MAP[_0x4dc148(0x212)]);let _0x397614=_0x303419[_0x4dc148(0x198)];for(let _0x425f1c=0x0;_0x425f1c<_0x397614[_0x4dc148(0x297)];_0x425f1c++){let _0xfd8822=_0x4a38cb[_0x4dc148(0x1fb)](_0x397614[_0x425f1c]),_0x1d1af9=this['getTypeFromString'](_0xfd8822[_0x4dc148(0x2a3)]);ScripTopicData[_0x4dc148(0x1ca)][_0x425f1c]=new FieldData(_0xfd8822[_0x4dc148(0x1a3)],_0xfd8822[_0x4dc148(0x207)],_0x1d1af9,_0xfd8822[_0x4dc148(0x223)]);}let _0x396922=_0x303419[_0x4dc148(0x29c)];for(let _0x1ecd9d=0x0;_0x1ecd9d<_0x396922[_0x4dc148(0x297)];_0x1ecd9d++){let _0x10061d=_0x4a38cb[_0x4dc148(0x1fb)](_0x396922[_0x1ecd9d]),_0x570a0e=this[_0x4dc148(0x28d)](_0x10061d[_0x4dc148(0x2a3)]);IndexTopicData['mappingArray'][_0x1ecd9d]=new FieldData(_0x10061d[_0x4dc148(0x1a3)],_0x10061d[_0x4dc148(0x207)],_0x570a0e,_0x10061d[_0x4dc148(0x223)]);}let _0x4e0c38=_0x303419[_0x4dc148(0x1ce)];for(let _0x59459b=0x0;_0x59459b<_0x4e0c38[_0x4dc148(0x297)];_0x59459b++){let _0x378a1d=_0x4a38cb[_0x4dc148(0x1fb)](_0x4e0c38[_0x59459b]),_0x58af56=this['getTypeFromString'](_0x378a1d['dataType']);DepthTopicData[_0x4dc148(0x1ca)][_0x59459b]=new FieldData(_0x378a1d[_0x4dc148(0x1a3)],_0x378a1d['fld'],_0x58af56,_0x378a1d[_0x4dc148(0x223)]);}}else console[_0x4dc148(0x1d9)](_0x4dc148(0x1f6));}['getTypeFromString'](_0x4ef95){const _0x401fa0=a0_0x6c0704;let _0x235545=FieldTypes[_0x401fa0(0x1fe)];switch(_0x4ef95){case _0x401fa0(0x252):_0x235545=FieldTypes[_0x401fa0(0x1bf)];break;case _0x401fa0(0x193):_0x235545=FieldTypes[_0x401fa0(0x275)];break;case _0x401fa0(0x1cc):_0x235545=FieldTypes[_0x401fa0(0x1cf)];break;}return _0x235545;}[a0_0x6c0704(0x1bc)](_0x18980d){const _0x3dcc79=a0_0x6c0704;let _0x269476=[];return _0x269476[_0x3dcc79(0x296)](_0x18980d),_0x269476;}[a0_0x6c0704(0x24b)](){const _0xe325d6=a0_0x6c0704;this[_0xe325d6(0x190)]=setInterval(this[_0xe325d6(0x25e)],this[_0xe325d6(0x21f)],this);}['pingFunction'](_0x3cc19f){const _0x1120b9=a0_0x6c0704;if(this[_0x1120b9(0x22f)]?.['readyState']==WebSocket['OPEN']&&_0x3cc19f[_0x1120b9(0x22f)])_0x3cc19f[_0x1120b9(0x22f)]['send'](BinRequest['pingRequest']);else{if(_0x3cc19f[_0x1120b9(0x190)])clearInterval(_0x3cc19f[_0x1120b9(0x190)]);}}}class HSIWebSocket{constructor(){const _0x33af2a=a0_0x6c0704;this[_0x33af2a(0x1a5)]=!![],this[_0x33af2a(0x20f)]=0x1e;}static['getInstance'](){const _0x317f00=a0_0x6c0704;return this[_0x317f00(0x28a)]||(this[_0x317f00(0x28a)]=new HSIWebSocket());}['close'](){const _0x5b3d1d=a0_0x6c0704;this[_0x5b3d1d(0x224)](),this[_0x5b3d1d(0x27d)][_0x5b3d1d(0x253)]();}[a0_0x6c0704(0x234)](_0x44f919,_0x4bd2f5){const _0x3a6761=a0_0x6c0704;this[_0x3a6761(0x1ea)]=_0x44f919,this['heartBeatInterval']=(_0x4bd2f5?_0x4bd2f5:this['DEFAULT_HEARTBEAT_INTERVAL'])*0x3e8,this[_0x3a6761(0x27d)]&&(this[_0x3a6761(0x27d)][_0x3a6761(0x291)]=function(_0x13d9af){},this[_0x3a6761(0x27d)][_0x3a6761(0x27e)]=function(_0xebab1c){},this[_0x3a6761(0x27d)]['onclose']=function(_0x37da7d){},this[_0x3a6761(0x27d)][_0x3a6761(0x1cb)]=function(_0x371987){},this['hsiWs'][_0x3a6761(0x253)]()),this['hsiWs']=new WebSocket(_0x44f919);if(this[_0x3a6761(0x27d)])this[_0x3a6761(0x27d)][_0x3a6761(0x23d)]=_0x3a6761(0x29d);else console[_0x3a6761(0x1d9)]('HSI\x20WebSocket\x20not\x20initialized!');this[_0x3a6761(0x27d)][_0x3a6761(0x291)]=function(){const _0x3faaa2=_0x3a6761;Log[_0x3faaa2(0x255)]('open'),HSIWebSocket['_instance'][_0x3faaa2(0x1ba)]();},this[_0x3a6761(0x27d)][_0x3a6761(0x27e)]=function(_0x4d5a6f){const _0x59d5b6=_0x3a6761;Log[_0x59d5b6(0x255)](_0x4d5a6f);let _0x3cd887=_0x4d5a6f[_0x59d5b6(0x247)],_0xa9ce2d=JSON[_0x59d5b6(0x25c)](_0x3cd887);if(_0xa9ce2d&&_0xa9ce2d[_0x59d5b6(0x1b0)]=='cn'&&_0xa9ce2d['ak']=='ok'){let _0x5aaa8f={'type':'hb'};HSIWebSocket[_0x59d5b6(0x28a)][_0x59d5b6(0x19a)]=setInterval(function(){const _0x2fecd6=_0x59d5b6;HSIWebSocket[_0x2fecd6(0x28a)][_0x2fecd6(0x1a5)]=!![],HSIWebSocket[_0x2fecd6(0x28a)]['hsiWs'][_0x2fecd6(0x269)](JSON['stringify'](_0x5aaa8f));},_0x4bd2f5);}Log[_0x59d5b6(0x255)](_0x3cd887);if(_0x3cd887)HSIWebSocket[_0x59d5b6(0x28a)][_0x59d5b6(0x218)](_0x3cd887);},this[_0x3a6761(0x27d)][_0x3a6761(0x215)]=function(){const _0x46a339=_0x3a6761;HSIWebSocket[_0x46a339(0x28a)]['stopHearBeat'](),HSIWebSocket[_0x46a339(0x28a)]['onClose']();},this[_0x3a6761(0x27d)][_0x3a6761(0x1cb)]=function(){const _0x510aaa=_0x3a6761;HSIWebSocket[_0x510aaa(0x28a)][_0x510aaa(0x224)](),HSIWebSocket[_0x510aaa(0x28a)][_0x510aaa(0x283)]();};}[a0_0x6c0704(0x269)](_0x486a74){const _0x1ed5db=a0_0x6c0704;let _0x15d32c=JSON['parse'](_0x486a74);Log['hsiDebug'](_0x15d32c);let _0x41def2=_0x15d32c[_0x1ed5db(0x25d)],_0x363f82;if(_0x41def2===ReqTypeValues[_0x1ed5db(0x2b1)]){if(_0x15d32c[Keys[_0x1ed5db(0x197)]]!==undefined&&_0x15d32c[Keys[_0x1ed5db(0x1de)]]!==undefined&&_0x15d32c[Keys['SOURCE']]!==undefined)_0x363f82={'type':'cn','Authorization':_0x15d32c[Keys['AUTORIZATION']],'Sid':_0x15d32c[Keys[_0x1ed5db(0x1de)]],'src':_0x15d32c[Keys[_0x1ed5db(0x1d0)]]},this['reqData']=_0x363f82;else{if(_0x15d32c[Keys[_0x1ed5db(0x290)]]!==undefined&&_0x15d32c[Keys[_0x1ed5db(0x1d0)]]!==undefined)_0x363f82={'type':'cn','x-access-token':_0x15d32c[Keys[_0x1ed5db(0x290)]],'src':_0x15d32c[Keys[_0x1ed5db(0x1d0)]]},this[_0x1ed5db(0x2a8)]=_0x363f82;else console[_0x1ed5db(0x1d9)](_0x1ed5db(0x1ff));}}else{if(_0x41def2===ReqTypeValues[_0x1ed5db(0x1e7)])this[_0x1ed5db(0x2a8)]=this['reqData']['type']=_0x1ed5db(0x20a),_0x363f82=this[_0x1ed5db(0x2a8)];else{if(_0x41def2===ReqTypeValues[_0x1ed5db(0x230)]){}else{if(_0x41def2===ReqTypeValues['STR'])_0x363f82=_0x15d32c[_0x1ed5db(0x247)];else console[_0x1ed5db(0x1d9)](_0x1ed5db(0x26f));}}}if(this[_0x1ed5db(0x27d)]&&_0x363f82)this[_0x1ed5db(0x27d)]['send'](JSON['stringify'](_0x363f82));else console[_0x1ed5db(0x1d9)](_0x1ed5db(0x25a));}[a0_0x6c0704(0x224)](){const _0x5a0bf1=a0_0x6c0704;this[_0x5a0bf1(0x1a5)]&&(this[_0x5a0bf1(0x1a5)]=![],this['interval']&&clearInterval(this[_0x5a0bf1(0x19a)]));}}module[a0_0x6c0704(0x1e9)]=HSWebSocket;
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ The official Javascript node client for communicating with the [Fyers API](https
|
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
15
|
-
Install via [npm](
|
|
15
|
+
Install via [npm](https://www.npmjs.com/package/fyers-api-v3)
|
|
16
16
|
|
|
17
17
|
npm install fyers-api-v3@latest
|
|
18
18
|
|
|
@@ -62,6 +62,12 @@ fyers.getQuotes(["NSE:SBIN-EQ","NSE:TCS-EQ"]).then((response)=>{
|
|
|
62
62
|
console.log(err)
|
|
63
63
|
})
|
|
64
64
|
|
|
65
|
+
fyers.getQuotesV2(["NSE:SBIN-EQ","NSE:TCS-EQ"]).then((response)=>{
|
|
66
|
+
console.log(response)
|
|
67
|
+
}).catch((err)=>{
|
|
68
|
+
console.log(err)
|
|
69
|
+
})
|
|
70
|
+
|
|
65
71
|
fyers.getMarketDepth({"symbol":["NSE:SBIN-EQ","NSE:TCS-EQ"],"ohlcv_flag":1}).then((response)=>{
|
|
66
72
|
console.log(response)
|
|
67
73
|
}).catch((err)=>{
|
|
@@ -740,4 +746,152 @@ fyers.get_futures_chain(data).then((response) => {
|
|
|
740
746
|
}).catch((error) => {
|
|
741
747
|
console.log(error)
|
|
742
748
|
})
|
|
743
|
-
```
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
## Screeners
|
|
752
|
+
|
|
753
|
+
This includes following APIs: `get_screeners_config`, `get_screeners_standard`, `get_screeners_technical`, `get_screeners_candlestick`
|
|
754
|
+
|
|
755
|
+
All four are GET calls on `/api/v3/screeners/*`. The screener is selected with
|
|
756
|
+
`screener_id`, an id taken from `data.screeners_standard` in the config response.
|
|
757
|
+
|
|
758
|
+
### Screener config
|
|
759
|
+
|
|
760
|
+
```javascript
|
|
761
|
+
fyers.get_screeners_config().then((response) => {
|
|
762
|
+
console.log(response.data.screeners_standard)
|
|
763
|
+
console.log(response.data.timeframes)
|
|
764
|
+
}).catch((error) => {
|
|
765
|
+
console.log(error)
|
|
766
|
+
})
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
### Standard screener
|
|
770
|
+
|
|
771
|
+
```javascript
|
|
772
|
+
var data = {
|
|
773
|
+
"screener_id": "top_gainers",
|
|
774
|
+
"fields": "t0_close_ltp,t0_volume",
|
|
775
|
+
"universe": "iw010",
|
|
776
|
+
"order_by": "t0_change_per",
|
|
777
|
+
"order": "desc",
|
|
778
|
+
"timeframe": "t0_5min"
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
fyers.get_screeners_standard(data).then((response) => {
|
|
782
|
+
console.log(response.data.header)
|
|
783
|
+
console.log(response.data.body)
|
|
784
|
+
}).catch((error) => {
|
|
785
|
+
console.log(error)
|
|
786
|
+
})
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
### Technical screener
|
|
790
|
+
|
|
791
|
+
```javascript
|
|
792
|
+
fyers.get_screeners_technical({"screener_id": "rsi_overbought"}).then((response) => {
|
|
793
|
+
console.log(response.data.body, response.data.total_count)
|
|
794
|
+
}).catch((error) => {
|
|
795
|
+
console.log(error)
|
|
796
|
+
})
|
|
797
|
+
```
|
|
798
|
+
|
|
799
|
+
### Candlestick screener
|
|
800
|
+
|
|
801
|
+
```javascript
|
|
802
|
+
fyers.get_screeners_candlestick({"screener_id": "bullish_engulfing"}).then((response) => {
|
|
803
|
+
console.log(response.data.body, response.data.total_count)
|
|
804
|
+
}).catch((error) => {
|
|
805
|
+
console.log(error)
|
|
806
|
+
})
|
|
807
|
+
```
|
|
808
|
+
|
|
809
|
+
## GTT / OCO Orders
|
|
810
|
+
|
|
811
|
+
This includes following APIs: `place_gtt_order`, `gtt_modify_order`, `gtt_cancel_order`, `get_gtt_orders`
|
|
812
|
+
|
|
813
|
+
```javascript
|
|
814
|
+
var data = {
|
|
815
|
+
"side": 1,
|
|
816
|
+
"symbol": "NSE:CHOLAFIN-EQ",
|
|
817
|
+
"productType": "CNC",
|
|
818
|
+
"orderInfo": {
|
|
819
|
+
"leg1": { "price": 1500, "triggerPrice": 1495, "qty": 1 }
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
fyers.place_gtt_order(data).then((response) => {
|
|
824
|
+
console.log(response)
|
|
825
|
+
}).catch((error) => {
|
|
826
|
+
console.log(error)
|
|
827
|
+
})
|
|
828
|
+
|
|
829
|
+
fyers.gtt_modify_order({
|
|
830
|
+
"id": "25010700000001",
|
|
831
|
+
"orderInfo": { "leg1": { "price": 1510, "triggerPrice": 1505, "qty": 2 } }
|
|
832
|
+
}).then((response) => { console.log(response) })
|
|
833
|
+
|
|
834
|
+
fyers.gtt_cancel_order({"id": "25010700000001"}).then((response) => { console.log(response) })
|
|
835
|
+
|
|
836
|
+
fyers.get_gtt_orders().then((response) => { console.log(response) })
|
|
837
|
+
```
|
|
838
|
+
|
|
839
|
+
## Multileg Orders
|
|
840
|
+
|
|
841
|
+
```javascript
|
|
842
|
+
var data = {
|
|
843
|
+
"orderTag": "tag1",
|
|
844
|
+
"productType": "MARGIN",
|
|
845
|
+
"offlineOrder": false,
|
|
846
|
+
"orderType": "3L",
|
|
847
|
+
"validity": "IOC",
|
|
848
|
+
"legs": {
|
|
849
|
+
"leg1": { "symbol": "NSE:SBIN24JUNFUT", "qty": 750, "side": 1, "type": 1, "limitPrice": 800 },
|
|
850
|
+
"leg2": { "symbol": "NSE:SBIN24JULFUT", "qty": 750, "side": 1, "type": 1, "limitPrice": 800 },
|
|
851
|
+
"leg3": { "symbol": "NSE:SBIN24JUN900CE", "qty": 750, "side": 1, "type": 1, "limitPrice": 3 }
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
fyers.place_multileg_order(data).then((response) => {
|
|
856
|
+
console.log(response)
|
|
857
|
+
}).catch((error) => {
|
|
858
|
+
console.log(error)
|
|
859
|
+
})
|
|
860
|
+
```
|
|
861
|
+
|
|
862
|
+
## Account and other data APIs
|
|
863
|
+
|
|
864
|
+
```javascript
|
|
865
|
+
fyers.get_funds().then((response) => { console.log(response) })
|
|
866
|
+
|
|
867
|
+
fyers.get_holdings().then((response) => { console.log(response) })
|
|
868
|
+
|
|
869
|
+
fyers.get_orders().then((response) => { console.log(response) })
|
|
870
|
+
|
|
871
|
+
fyers.get_positions().then((response) => { console.log(response) })
|
|
872
|
+
|
|
873
|
+
fyers.get_tradebook().then((response) => { console.log(response) })
|
|
874
|
+
|
|
875
|
+
// Market status takes no arguments
|
|
876
|
+
fyers.market_status().then((response) => { console.log(response) })
|
|
877
|
+
|
|
878
|
+
fyers.getHistory({
|
|
879
|
+
"symbol": "NSE:SBIN-EQ",
|
|
880
|
+
"resolution": "D",
|
|
881
|
+
"date_format": "0",
|
|
882
|
+
"range_from": "1622097600",
|
|
883
|
+
"range_to": "1622097685",
|
|
884
|
+
"cont_flag": "1"
|
|
885
|
+
}).then((response) => { console.log(response) })
|
|
886
|
+
|
|
887
|
+
fyers.getOptionChain({
|
|
888
|
+
"symbol": "NSE:NIFTY50-INDEX",
|
|
889
|
+
"strikecount": 7,
|
|
890
|
+
"timestamp": ""
|
|
891
|
+
}).then((response) => { console.log(response) })
|
|
892
|
+
|
|
893
|
+
fyers.getFuturesChain({"symbol": "NSE:NIFTY50-INDEX"}).then((response) => { console.log(response) })
|
|
894
|
+
|
|
895
|
+
// Invalidates the current access token
|
|
896
|
+
fyers.logout_user().then((response) => { console.log(response) })
|
|
897
|
+
```
|