@hotmeshio/hotmesh 0.3.13 → 0.3.15
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/build/modules/key.js +1 -1
- package/build/modules/utils.js +1 -1
- package/build/package.json +1 -1
- package/build/services/activities/activity.js +1 -1
- package/build/services/activities/await.js +1 -1
- package/build/services/activities/cycle.js +1 -1
- package/build/services/activities/hook.js +1 -1
- package/build/services/activities/index.js +1 -1
- package/build/services/activities/interrupt.js +1 -1
- package/build/services/activities/signal.js +1 -1
- package/build/services/activities/trigger.js +1 -1
- package/build/services/activities/worker.js +1 -1
- package/build/services/collator/index.js +1 -1
- package/build/services/compiler/deployer.js +1 -1
- package/build/services/compiler/index.js +1 -1
- package/build/services/compiler/validator.js +1 -1
- package/build/services/engine/index.js +1 -1
- package/build/services/exporter/index.js +1 -1
- package/build/services/mapper/index.js +1 -1
- package/build/services/meshflow/exporter.js +1 -1
- package/build/services/meshos/index.js +3 -3
- package/build/services/pipe/functions/array.js +1 -1
- package/build/services/pipe/functions/bitwise.js +1 -1
- package/build/services/pipe/functions/conditional.js +1 -1
- package/build/services/pipe/functions/cron.js +1 -1
- package/build/services/pipe/functions/date.js +1 -1
- package/build/services/pipe/functions/index.js +1 -1
- package/build/services/pipe/functions/json.js +1 -1
- package/build/services/pipe/functions/logical.js +1 -1
- package/build/services/pipe/functions/math.js +1 -1
- package/build/services/pipe/functions/number.js +1 -1
- package/build/services/pipe/functions/object.js +1 -1
- package/build/services/pipe/functions/string.js +1 -1
- package/build/services/pipe/functions/symbol.js +1 -1
- package/build/services/pipe/functions/unary.js +1 -1
- package/build/services/pipe/index.js +1 -1
- package/build/services/quorum/index.js +1 -1
- package/build/services/reporter/index.js +1 -1
- package/build/services/router/index.js +1 -1
- package/build/services/search/providers/postgres/postgres.js +1 -1
- package/build/services/search/providers/redis/ioredis.js +1 -1
- package/build/services/search/providers/redis/redis.js +1 -1
- package/build/services/serializer/index.js +1 -1
- package/build/services/store/providers/postgres/kvsql.js +1 -1
- package/build/services/store/providers/postgres/postgres.js +1 -1
- package/build/services/store/providers/redis/_base.js +1 -1
- package/build/services/store/providers/redis/ioredis.js +1 -1
- package/build/services/store/providers/redis/redis.js +1 -1
- package/build/services/store/providers/store-initializable.js +1 -1
- package/build/services/stream/providers/nats/nats.js +1 -1
- package/build/services/stream/providers/postgres/postgres.js +1 -1
- package/build/services/stream/providers/redis/ioredis.js +1 -1
- package/build/services/stream/providers/redis/redis.js +1 -1
- package/build/services/stream/providers/stream-initializable.js +1 -1
- package/build/services/sub/providers/redis/ioredis.js +1 -1
- package/build/services/sub/providers/redis/redis.js +1 -1
- package/build/services/task/index.js +1 -1
- package/build/services/telemetry/index.js +1 -1
- package/build/services/worker/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x483f(){const _0x4f31d3=['198pJfjEu','53020FYqVqD','1055637prNIkJ','70AoDYcT','6wjKKkE','4816728nLmRui','1Jwilvg','270603JyfGFW','959962GsyXGQ','139016HoofFt','2947620QKZmBt'];_0x483f=function(){return _0x4f31d3;};return _0x483f();}(function(_0x576d33,_0x51e0a2){const _0x82ac46=_0x17db,_0x52733a=_0x576d33();while(!![]){try{const _0x41d0f8=-parseInt(_0x82ac46(0x15e))/0x1*(parseInt(_0x82ac46(0x160))/0x2)+-parseInt(_0x82ac46(0x15f))/0x3+-parseInt(_0x82ac46(0x162))/0x4+parseInt(_0x82ac46(0x164))/0x5+-parseInt(_0x82ac46(0x15c))/0x6*(-parseInt(_0x82ac46(0x15d))/0x7)+parseInt(_0x82ac46(0x161))/0x8*(parseInt(_0x82ac46(0x163))/0x9)+-parseInt(_0x82ac46(0x166))/0xa*(-parseInt(_0x82ac46(0x165))/0xb);if(_0x41d0f8===_0x51e0a2)break;else _0x52733a['push'](_0x52733a['shift']());}catch(_0x5d3707){_0x52733a['push'](_0x52733a['shift']());}}}(_0x483f,0x6ccf4));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['DateHandler']=void 0x0;const utils_1=require('../../../modules/utils');class DateHandler{static['getDateInstance'](_0x4e5eda){const _0x14bec3=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z)?$/;if(typeof _0x4e5eda==='string'){if(_0x14bec3['test'](_0x4e5eda))return new Date(_0x4e5eda);const _0x2fe4c7=parseInt(_0x4e5eda,0xa);if(!isNaN(_0x2fe4c7))return new Date(_0x2fe4c7);}else{if(_0x4e5eda instanceof Date)return _0x4e5eda;else{if(typeof _0x4e5eda==='number')return new Date(_0x4e5eda);}}throw new Error('Invalid\x20date\x20format');}['fromISOString'](_0x5c4c87){return new Date(_0x5c4c87);}['now'](){return Date['now']();}['parse'](_0x3c753e){return Date['parse'](_0x3c753e);}['getDate'](_0x324c01){return DateHandler['getDateInstance'](_0x324c01)['getDate']();}['getDay'](_0x1c9f63){return DateHandler['getDateInstance'](_0x1c9f63)['getDay']();}['getFullYear'](_0x5884ea){return DateHandler['getDateInstance'](_0x5884ea)['getFullYear']();}['getHours'](_0x22b6df){return DateHandler['getDateInstance'](_0x22b6df)['getHours']();}['getMilliseconds'](_0x28e453){return DateHandler['getDateInstance'](_0x28e453)['getMilliseconds']();}['getMinutes'](_0x480e4a){return DateHandler['getDateInstance'](_0x480e4a)['getMinutes']();}['getMonth'](_0x771765){return DateHandler['getDateInstance'](_0x771765)['getMonth']();}['getSeconds'](_0x113a8a){return DateHandler['getDateInstance'](_0x113a8a)['getSeconds']();}['getTime'](_0xf4b4cd){return DateHandler['getDateInstance'](_0xf4b4cd)['getTime']();}['getTimezoneOffset'](_0x5a1d44){return DateHandler['getDateInstance'](_0x5a1d44)['getTimezoneOffset']();}['getUTCDate'](_0x3b0d4f){return DateHandler['getDateInstance'](_0x3b0d4f)['getUTCDate']();}['getUTCDay'](_0x10fe37){return DateHandler['getDateInstance'](_0x10fe37)['getUTCDay']();}['getUTCFullYear'](_0x1ae4ed){return DateHandler['getDateInstance'](_0x1ae4ed)['getUTCFullYear']();}['getUTCHours'](_0x7b4b7d){return DateHandler['getDateInstance'](_0x7b4b7d)['getUTCHours']();}['getUTCMilliseconds'](_0x475a64){return DateHandler['getDateInstance'](_0x475a64)['getUTCMilliseconds']();}['getUTCMinutes'](_0x53bb69){return DateHandler['getDateInstance'](_0x53bb69)['getUTCMinutes']();}['getUTCMonth'](_0x248300){return DateHandler['getDateInstance'](_0x248300)['getUTCMonth']();}['getUTCSeconds'](_0x2577df){return DateHandler['getDateInstance'](_0x2577df)['getUTCSeconds']();}['setMilliseconds'](_0xa956cf,_0x1a2d79){return DateHandler['getDateInstance'](_0xa956cf)['setMilliseconds'](_0x1a2d79);}['setMinutes'](_0x387ebd,_0x550dfe,_0x10be2c,_0x409321){return DateHandler['getDateInstance'](_0x387ebd)['setMinutes'](_0x550dfe,_0x10be2c,_0x409321);}['setMonth'](_0x8d9e90,_0x43ce6a,_0x4a968d){return DateHandler['getDateInstance'](_0x8d9e90)['setMonth'](_0x43ce6a,_0x4a968d);}['setSeconds'](_0x4c9520,_0x557948,_0x11eefd){return DateHandler['getDateInstance'](_0x4c9520)['setSeconds'](_0x557948,_0x11eefd);}['setTime'](_0x46da5a,_0xfda1c1){return DateHandler['getDateInstance'](_0x46da5a)['setTime'](_0xfda1c1);}['setUTCDate'](_0x5beac2,_0x10cbad){return DateHandler['getDateInstance'](_0x5beac2)['setUTCDate'](_0x10cbad);}['setUTCFullYear'](_0x4a5b73,_0x480bd0,_0x533fa7,_0x52f1db){return DateHandler['getDateInstance'](_0x4a5b73)['setUTCFullYear'](_0x480bd0,_0x533fa7,_0x52f1db);}['setUTCHours'](_0x52d995,_0x57e5be,_0x24d46f,_0x4e3aaf,_0x46de03){return DateHandler['getDateInstance'](_0x52d995)['setUTCHours'](_0x57e5be,_0x24d46f,_0x4e3aaf,_0x46de03);}['setUTCMilliseconds'](_0x15d928,_0x4faf95){return DateHandler['getDateInstance'](_0x15d928)['setUTCMilliseconds'](_0x4faf95);}['setUTCMinutes'](_0x3e91d5,_0x2479e6,_0x25a064,_0x10d657){return DateHandler['getDateInstance'](_0x3e91d5)['setUTCMinutes'](_0x2479e6,_0x25a064,_0x10d657);}['setUTCMonth'](_0x37b867,_0x239c4e,_0x27f5a7){return DateHandler['getDateInstance'](_0x37b867)['setUTCMonth'](_0x239c4e,_0x27f5a7);}['setUTCSeconds'](_0x467ff8,_0x4d4fb4,_0x37f10f){return DateHandler['getDateInstance'](_0x467ff8)['setUTCSeconds'](_0x4d4fb4,_0x37f10f);}['setDate'](_0x4d68d9,_0x61bed1){return DateHandler['getDateInstance'](_0x4d68d9)['setDate'](_0x61bed1);}['setFullYear'](_0x3f9732,_0x4d4513,_0x225376,_0x466452){return DateHandler['getDateInstance'](_0x3f9732)['setFullYear'](_0x4d4513,_0x225376,_0x466452);}['setHours'](_0x4b2d79,_0x20581b,_0x597402,_0x1be410,_0x3d2647){return DateHandler['getDateInstance'](_0x4b2d79)['setHours'](_0x20581b,_0x597402,_0x1be410,_0x3d2647);}['toDateString'](_0xc98bff){return DateHandler['getDateInstance'](_0xc98bff)['toDateString']();}['toISOString'](_0x1b64df){return DateHandler['getDateInstance'](_0x1b64df)['toISOString']();}['toISOXString'](_0x2a8cee){return(0x0,utils_1['formatISODate'])(_0x2a8cee?DateHandler['getDateInstance'](_0x2a8cee):new Date());}['toJSON'](_0x2ac095){return DateHandler['getDateInstance'](_0x2ac095)['toJSON']();}['toLocaleDateString'](_0x4d97ce,_0x910784,_0x3a05d4){return DateHandler['getDateInstance'](_0x4d97ce)['toLocaleDateString'](_0x910784,_0x3a05d4);}['toLocaleString'](_0x1d1c48,_0x2815eb,_0x508dc5){return DateHandler['getDateInstance'](_0x1d1c48)['toLocaleString'](_0x2815eb,_0x508dc5);}['toLocaleTimeString'](_0x9d0a4d,_0x3eae0a,_0x164cb8){return DateHandler['getDateInstance'](_0x9d0a4d)['toLocaleTimeString'](_0x3eae0a,_0x164cb8);}['toString'](_0x35fb82){return DateHandler['getDateInstance'](_0x35fb82)['toString']();}['UTC'](_0x14ba10,_0x477f90,_0x34fff6,_0x82abe,_0x25a6f9,_0x31adca,_0x218407){return Date['UTC'](_0x14ba10,_0x477f90,_0x34fff6,_0x82abe,_0x25a6f9,_0x31adca,_0x218407);}['valueOf'](_0x3aa394){return DateHandler['getDateInstance'](_0x3aa394)['valueOf']();}}function _0x17db(_0x58974f,_0x2f0904){const _0x483f6c=_0x483f();return _0x17db=function(_0x17db13,_0x366cac){_0x17db13=_0x17db13-0x15c;let _0x1b6aec=_0x483f6c[_0x17db13];return _0x1b6aec;},_0x17db(_0x58974f,_0x2f0904);}exports['DateHandler']=DateHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x4f32(_0x5e1cd7,_0x7197e){const _0x3a3819=_0x3a38();return _0x4f32=function(_0x4f32c5,_0x29124f){_0x4f32c5=_0x4f32c5-0x1d4;let _0x289045=_0x3a3819[_0x4f32c5];return _0x289045;},_0x4f32(_0x5e1cd7,_0x7197e);}(function(_0xdedd9a,_0x39969e){const _0x1c96bf=_0x4f32,_0x154031=_0xdedd9a();while(!![]){try{const _0x4d2797=-parseInt(_0x1c96bf(0x1d7))/0x1+parseInt(_0x1c96bf(0x1d8))/0x2+parseInt(_0x1c96bf(0x1d6))/0x3*(parseInt(_0x1c96bf(0x1d9))/0x4)+parseInt(_0x1c96bf(0x1db))/0x5*(parseInt(_0x1c96bf(0x1da))/0x6)+-parseInt(_0x1c96bf(0x1d5))/0x7+-parseInt(_0x1c96bf(0x1dc))/0x8+parseInt(_0x1c96bf(0x1d4))/0x9;if(_0x4d2797===_0x39969e)break;else _0x154031['push'](_0x154031['shift']());}catch(_0x3efa9d){_0x154031['push'](_0x154031['shift']());}}}(_0x3a38,0x353cf));Object['defineProperty'](exports,'__esModule',{'value':!![]});const array_1=require('./array'),bitwise_1=require('./bitwise'),conditional_1=require('./conditional'),cron_1=require('./cron'),date_1=require('./date'),json_1=require('./json'),logical_1=require('./logical'),math_1=require('./math'),number_1=require('./number'),object_1=require('./object'),string_1=require('./string'),symbol_1=require('./symbol'),unary_1=require('./unary');function _0x3a38(){const _0x1aa81e=['241838BeMnWL','64CMQDaB','366648BwTCmz','10yUQZNx','71984QFAuVy','2330829dALBkG','2953685UnwMMP','43266IqNnpO','83852fyayVs'];_0x3a38=function(){return _0x1aa81e;};return _0x3a38();}exports['default']={'array':new array_1['ArrayHandler'](),'bitwise':new bitwise_1['BitwiseHandler'](),'conditional':new conditional_1['ConditionalHandler'](),'cron':new cron_1['CronHandler'](),'date':new date_1['DateHandler'](),'json':new json_1['JsonHandler'](),'logical':new logical_1['LogicalHandler'](),'math':new math_1['MathHandler'](),'number':new number_1['NumberHandler'](),'object':new object_1['ObjectHandler'](),'string':new string_1['StringHandler'](),'symbol':new symbol_1['SymbolHandler'](),'unary':new unary_1['UnaryHandler']()};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0x287cf2,_0x5804da){var _0xff3454=_0x1366,_0x344b80=_0x287cf2();while(!![]){try{var _0x4a1b99=parseInt(_0xff3454(0x72))/0x1*(-parseInt(_0xff3454(0x6b))/0x2)+-parseInt(_0xff3454(0x70))/0x3+-parseInt(_0xff3454(0x6c))/0x4+parseInt(_0xff3454(0x6a))/0x5*(-parseInt(_0xff3454(0x71))/0x6)+parseInt(_0xff3454(0x6e))/0x7*(parseInt(_0xff3454(0x6d))/0x8)+parseInt(_0xff3454(0x6f))/0x9*(parseInt(_0xff3454(0x69))/0xa)+parseInt(_0xff3454(0x73))/0xb;if(_0x4a1b99===_0x5804da)break;else _0x344b80['push'](_0x344b80['shift']());}catch(_0x17070d){_0x344b80['push'](_0x344b80['shift']());}}}(_0x2e7d,0xef0be));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['JsonHandler']=void 0x0;class JsonHandler{['stringify'](_0xfff97a,_0x8f1b68,_0x438091){return JSON['stringify'](_0xfff97a,_0x8f1b68,_0x438091);}['parse'](_0x242bf3,_0x1e784d){return JSON['parse'](_0x242bf3,_0x1e784d);}}function _0x1366(_0x158179,_0x57db70){var _0x2e7db4=_0x2e7d();return _0x1366=function(_0x13665d,_0x3c53d6){_0x13665d=_0x13665d-0x69;var _0x1617a4=_0x2e7db4[_0x13665d];return _0x1617a4;},_0x1366(_0x158179,_0x57db70);}function _0x2e7d(){var _0x371d30=['70UyHLIz','5BDjPnE','2prRhDW','2495572ygMdQi','8YBiJdJ','5726273npAcTX','743049UuLrCu','3464745LZajEP','10829028FaDoCo','1111129xOxNYT','47057373CdGEaK'];_0x2e7d=function(){return _0x371d30;};return _0x2e7d();}exports['JsonHandler']=JsonHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0x1809b3,_0x51b78a){var _0xb15ca3=_0x3d50,_0x584e60=_0x1809b3();while(!![]){try{var _0xa4cf93=parseInt(_0xb15ca3(0xa1))/0x1*(-parseInt(_0xb15ca3(0x9b))/0x2)+-parseInt(_0xb15ca3(0x9c))/0x3+parseInt(_0xb15ca3(0x9f))/0x4*(parseInt(_0xb15ca3(0x97))/0x5)+parseInt(_0xb15ca3(0xa0))/0x6*(parseInt(_0xb15ca3(0x9e))/0x7)+-parseInt(_0xb15ca3(0x9d))/0x8+-parseInt(_0xb15ca3(0x9a))/0x9*(parseInt(_0xb15ca3(0xa2))/0xa)+-parseInt(_0xb15ca3(0x98))/0xb*(-parseInt(_0xb15ca3(0x99))/0xc);if(_0xa4cf93===_0x51b78a)break;else _0x584e60['push'](_0x584e60['shift']());}catch(_0x12a968){_0x584e60['push'](_0x584e60['shift']());}}}(_0x3f12,0x99cab));function _0x3d50(_0xb3424d,_0xf8ca4b){var _0x3f124f=_0x3f12();return _0x3d50=function(_0x3d506d,_0x574205){_0x3d506d=_0x3d506d-0x97;var _0x1b07fa=_0x3f124f[_0x3d506d];return _0x1b07fa;},_0x3d50(_0xb3424d,_0xf8ca4b);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['LogicalHandler']=void 0x0;class LogicalHandler{['and'](_0x58c286,_0xd8c864){return _0x58c286&&_0xd8c864;}['or'](_0x5d9387,_0x4bbabf){return _0x5d9387||_0x4bbabf;}}exports['LogicalHandler']=LogicalHandler;function _0x3f12(){var _0x598466=['1uyhDNF','684330XhIYjM','16775MZBvht','10316284IfiDMS','12oWWVVh','9VgRzsL','401222IUsxLt','3375168BMOxPM','2332040vioqvL','26173wWKgSV','1384eJnRGm','348aWKLkS'];_0x3f12=function(){return _0x598466;};return _0x3f12();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x11ae00,_0x4e6a53){const _0x5582ab=_0x2f23,_0xe4edbf=_0x11ae00();while(!![]){try{const _0x3c8aca=parseInt(_0x5582ab(0x1b4))/0x1+-parseInt(_0x5582ab(0x1b1))/0x2+-parseInt(_0x5582ab(0x1ba))/0x3+-parseInt(_0x5582ab(0x1b9))/0x4*(parseInt(_0x5582ab(0x1b6))/0x5)+-parseInt(_0x5582ab(0x1b3))/0x6*(parseInt(_0x5582ab(0x1b5))/0x7)+parseInt(_0x5582ab(0x1b8))/0x8*(parseInt(_0x5582ab(0x1b7))/0x9)+parseInt(_0x5582ab(0x1b0))/0xa*(parseInt(_0x5582ab(0x1b2))/0xb);if(_0x3c8aca===_0x4e6a53)break;else _0xe4edbf['push'](_0xe4edbf['shift']());}catch(_0x3ff796){_0xe4edbf['push'](_0xe4edbf['shift']());}}}(_0x4cd6,0xc7f39));function _0x2f23(_0x196268,_0x4e9c0e){const _0x4cd6f7=_0x4cd6();return _0x2f23=function(_0x2f23f3,_0x3262e5){_0x2f23f3=_0x2f23f3-0x1b0;let _0x150e80=_0x4cd6f7[_0x2f23f3];return _0x150e80;},_0x2f23(_0x196268,_0x4e9c0e);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['MathHandler']=void 0x0;function _0x4cd6(){const _0x272e5a=['296928AfIzel','865375Qfuziq','387565aCicRr','150327sTakQP','568HBgsAq','40MmGHEA','1962939Pfxivq','40YJDpYU','3155184dZKsQp','6783755dZsBvA','6LCUzsN'];_0x4cd6=function(){return _0x272e5a;};return _0x4cd6();}class MathHandler{['add'](..._0x2f48ea){return _0x2f48ea['reduce']((_0x3f75fe,_0x3e6fb6)=>{return Array['isArray'](_0x3e6fb6)?_0x3f75fe+this['add'](..._0x3e6fb6):_0x3f75fe+_0x3e6fb6;},0x0);}['subtract'](..._0x264a7d){if(_0x264a7d['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required.');let _0x7905c5=[];_0x264a7d['forEach'](_0x48d7ad=>{Array['isArray'](_0x48d7ad)?_0x7905c5=[..._0x7905c5,..._0x48d7ad]:_0x7905c5['push'](_0x48d7ad);});if(_0x7905c5['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required\x20after\x20flattening.');const _0x52fbe0=_0x7905c5['reduce']((_0x1bc725,_0xd616b1,_0x5b593b)=>{return _0x5b593b===0x0?_0x1bc725:_0x1bc725-_0xd616b1;});return _0x52fbe0;}['multiply'](..._0x275d24){if(_0x275d24['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required.');return _0x275d24['reduce']((_0x41f382,_0x1befa8)=>{return Array['isArray'](_0x1befa8)?_0x41f382*this['multiply'](..._0x1befa8):_0x41f382*_0x1befa8;},0x1);}['divide'](..._0x41cf33){if(_0x41cf33['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required.');let _0x4b56e3=[];_0x41cf33['forEach'](_0xf559ca=>{Array['isArray'](_0xf559ca)?_0x4b56e3=[..._0x4b56e3,..._0xf559ca]:_0x4b56e3['push'](_0xf559ca);});if(_0x4b56e3['length']===0x0)throw new Error('At\x20least\x20one\x20operand\x20is\x20required\x20after\x20flattening.');const _0xf4964d=_0x4b56e3['reduce']((_0x3d2a83,_0x5480de,_0x92fe33)=>{if(_0x5480de===0x0)return NaN;return _0x92fe33===0x0?_0x3d2a83:_0x3d2a83/_0x5480de;});if(isNaN(_0xf4964d))return NaN;return _0xf4964d;}['abs'](_0x4e473f){return Math['abs'](_0x4e473f);}['acos'](_0x304ad9){return Math['acos'](_0x304ad9);}['acosh'](_0x2c9264){return Math['acosh'](_0x2c9264);}['asin'](_0x5dd883){return Math['asin'](_0x5dd883);}['asinh'](_0xe6693b){return Math['asinh'](_0xe6693b);}['atan'](_0x349f61){return Math['atan'](_0x349f61);}['atan2'](_0xd06316,_0x147bfe){return Math['atan2'](_0xd06316,_0x147bfe);}['atanh'](_0x11686a){return Math['atanh'](_0x11686a);}['cbrt'](_0x1f2bdc){return Math['cbrt'](_0x1f2bdc);}['ceil'](_0x51303c){return Math['ceil'](_0x51303c);}['clz32'](_0x42771e){return Math['clz32'](_0x42771e);}['cos'](_0x3d11f4){return Math['cos'](_0x3d11f4);}['cosh'](_0x470ee0){return Math['cosh'](_0x470ee0);}['exp'](_0x221c10){return Math['exp'](_0x221c10);}['expm1'](_0x52659c){return Math['expm1'](_0x52659c);}['floor'](_0x5f1e6b){return Math['floor'](_0x5f1e6b);}['fround'](_0x5087f6){return Math['fround'](_0x5087f6);}['hypot'](..._0x14b0d0){return Math['hypot'](..._0x14b0d0);}['imul'](_0x49a8f6,_0x5588f1){return Math['imul'](_0x49a8f6,_0x5588f1);}['log'](_0x38c4fa){return Math['log'](_0x38c4fa);}['log10'](_0x123ccc){return Math['log10'](_0x123ccc);}['log1p'](_0x32f3b8){return Math['log1p'](_0x32f3b8);}['log2'](_0x2204e0){return Math['log2'](_0x2204e0);}['max'](..._0x1160d8){return Math['max'](..._0x1160d8);}['min'](..._0x1f4db8){return Math['min'](..._0x1f4db8);}['pow'](_0x34f7ff,_0x25bda2){return Math['pow'](_0x34f7ff,_0x25bda2);}['random'](){return Math['random']();}['round'](_0x4be626){return Math['round'](_0x4be626);}['sign'](_0x380fed){return Math['sign'](_0x380fed);}['sin'](_0x3bd61b){return Math['sin'](_0x3bd61b);}['sinh'](_0x2a69b0){return Math['sinh'](_0x2a69b0);}['sqrt'](_0x25b21f){return Math['sqrt'](_0x25b21f);}['tan'](_0x525e70){return Math['tan'](_0x525e70);}['tanh'](_0x2f3bb2){return Math['tanh'](_0x2f3bb2);}['trunc'](_0x3001e1){return Math['trunc'](_0x3001e1);}}exports['MathHandler']=MathHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function _0x261e(){var _0x8d6cc8=['2115395KVHejc','9PlwURX','2921044wdpfUQ','466346AkFCTP','5MKYdUh','4877810xcjAxs','29482140zDcxxF','3zYrUgm','5988030kSXtgP','7824616YemjMb'];_0x261e=function(){return _0x8d6cc8;};return _0x261e();}(function(_0x1660c3,_0x58a667){var _0x4a7953=_0x2be3,_0x104c0f=_0x1660c3();while(!![]){try{var _0x46f1f5=-parseInt(_0x4a7953(0x136))/0x1*(-parseInt(_0x4a7953(0x135))/0x2)+parseInt(_0x4a7953(0x139))/0x3*(-parseInt(_0x4a7953(0x134))/0x4)+parseInt(_0x4a7953(0x13c))/0x5+parseInt(_0x4a7953(0x13a))/0x6+parseInt(_0x4a7953(0x137))/0x7+parseInt(_0x4a7953(0x13b))/0x8*(parseInt(_0x4a7953(0x13d))/0x9)+-parseInt(_0x4a7953(0x138))/0xa;if(_0x46f1f5===_0x58a667)break;else _0x104c0f['push'](_0x104c0f['shift']());}catch(_0x2fef84){_0x104c0f['push'](_0x104c0f['shift']());}}}(_0x261e,0x8e6d5));function _0x2be3(_0x3edaa9,_0x47274a){var _0x261ea9=_0x261e();return _0x2be3=function(_0x2be31b,_0x36b906){_0x2be31b=_0x2be31b-0x134;var _0x34d1f4=_0x261ea9[_0x2be31b];return _0x34d1f4;},_0x2be3(_0x3edaa9,_0x47274a);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['NumberHandler']=void 0x0;class NumberHandler{['isFinite'](_0x27bfc3){return Number['isFinite'](_0x27bfc3);}['isEven'](_0x3973a6){return!isNaN(_0x3973a6)&&_0x3973a6%0x2===0x0;}['isOdd'](_0x343082){return!isNaN(_0x343082)&&_0x343082%0x2!==0x0;}['isInteger'](_0x2b4222){return Number['isInteger'](_0x2b4222);}['isNaN'](_0x383a78){return Number['isNaN'](_0x383a78);}['parseFloat'](_0x4b11a0){return parseFloat(_0x4b11a0);}['parseInt'](_0x41e39e,_0x30832f){return parseInt(_0x41e39e,_0x30832f);}['toFixed'](_0x31af68,_0x4bf935){return _0x31af68['toFixed'](_0x4bf935);}['toExponential'](_0x198b63,_0x29b562){return _0x198b63['toExponential'](_0x29b562);}['toPrecision'](_0x4832a2,_0x5f1c9d){return _0x4832a2['toPrecision'](_0x5f1c9d);}['gte'](_0x23fe86,_0x3e4852){return _0x23fe86>=_0x3e4852;}['lte'](_0x4683ec,_0x510300){return _0x4683ec<=_0x510300;}['gt'](_0x5e3669,_0x5de75a){return _0x5e3669>_0x5de75a;}['lt'](_0x42332e,_0x2f94c0){return _0x42332e<_0x2f94c0;}['max'](..._0x27885f){return Math['max'](..._0x27885f);}['min'](..._0x4f8027){return Math['min'](..._0x4f8027);}['pow'](_0x36fcde,_0x16e59e){return Math['pow'](_0x36fcde,_0x16e59e);}['round'](_0x36759a){return Math['round'](_0x36759a);}}exports['NumberHandler']=NumberHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x4aa499,_0x3a29cc){const _0x1cd423=_0x1aa1,_0x36eaca=_0x4aa499();while(!![]){try{const _0x1866cd=parseInt(_0x1cd423(0x197))/0x1+parseInt(_0x1cd423(0x192))/0x2*(-parseInt(_0x1cd423(0x18e))/0x3)+parseInt(_0x1cd423(0x195))/0x4+-parseInt(_0x1cd423(0x193))/0x5*(parseInt(_0x1cd423(0x196))/0x6)+-parseInt(_0x1cd423(0x198))/0x7*(-parseInt(_0x1cd423(0x18f))/0x8)+-parseInt(_0x1cd423(0x190))/0x9*(-parseInt(_0x1cd423(0x194))/0xa)+parseInt(_0x1cd423(0x191))/0xb;if(_0x1866cd===_0x3a29cc)break;else _0x36eaca['push'](_0x36eaca['shift']());}catch(_0x2d52af){_0x36eaca['push'](_0x36eaca['shift']());}}}(_0x20d5,0x55c91));function _0x20d5(){const _0x1eb906=['720327XNpYDg','8PrNQyO','4095XjhUqR','9049117rlxfRY','4ObYpIx','30UuEBme','1790iqHVDX','123384vVBFcB','446934RolPjK','339760ciPQel','26817ZLCMfP'];_0x20d5=function(){return _0x1eb906;};return _0x20d5();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ObjectHandler']=void 0x0;class ObjectHandler{['get'](_0x5355ff,_0x1b02de){return _0x5355ff?.[_0x1b02de];}['set'](_0x2d609f,_0x3bb70f,_0x4eaf05){if(!_0x2d609f)_0x2d609f={};return _0x2d609f[_0x3bb70f]=_0x4eaf05,_0x2d609f;}['create'](..._0x5caa01){const _0x2d5295={};if(_0x5caa01['length']===0x0)return _0x2d5295;for(let _0x25ceee=0x0;_0x25ceee<_0x5caa01['length'];_0x25ceee+=0x2){_0x2d5295[_0x5caa01[_0x25ceee]]=_0x5caa01[_0x25ceee+0x1];}return _0x2d5295;}['keys'](_0x467959){return _0x467959&&Object['keys'](_0x467959)||[];}['values'](_0x47354f){return _0x47354f&&Object['values'](_0x47354f)||[];}['entries'](_0xf40451){return _0xf40451&&Object['entries'](_0xf40451)||[];}['fromEntries'](_0x545c11){return Object['fromEntries'](_0x545c11);}['assign'](_0x5b4cca,..._0x5678ba){return Object['assign'](_0x5b4cca||{},..._0x5678ba);}['getOwnPropertyNames'](_0x5098a7){return Object['getOwnPropertyNames'](_0x5098a7||{});}['getOwnPropertySymbols'](_0x2c517c){return Object['getOwnPropertySymbols'](_0x2c517c||{});}['getOwnPropertyDescriptor'](_0x44277b,_0x1c1530){return Object['getOwnPropertyDescriptor'](_0x44277b||{},_0x1c1530);}['defineProperty'](_0x32a0b9,_0x4553a5,_0x4d56ef){return Object['defineProperty'](_0x32a0b9,_0x4553a5,_0x4d56ef);}['defineProperties'](_0x2b0b61,_0xd93758){return Object['defineProperties'](_0x2b0b61,_0xd93758);}['freeze'](_0x32cb0f){return Object['freeze'](_0x32cb0f);}['isFrozen'](_0x1fc996){return Object['isFrozen'](_0x1fc996);}['seal'](_0x49b9a0){return Object['seal'](_0x49b9a0);}['isSealed'](_0x435556){return Object['isSealed'](_0x435556);}['preventExtensions'](_0x2f7f47){return Object['preventExtensions'](_0x2f7f47);}['isExtensible'](_0x5efb60){return Object['isExtensible'](_0x5efb60);}['hasOwnProperty'](_0x3dad9b,_0x3607d4){return Object['prototype']['hasOwnProperty']['call'](_0x3dad9b,_0x3607d4);}['isPrototypeOf'](_0x4d4c2c,_0x4b2da4){return Object['prototype']['isPrototypeOf']['call'](_0x4d4c2c,_0x4b2da4);}['propertyIsEnumerable'](_0x452cb4,_0x551526){return Object['prototype']['propertyIsEnumerable']['call'](_0x452cb4,_0x551526);}}function _0x1aa1(_0x39552c,_0x2c63db){const _0x20d572=_0x20d5();return _0x1aa1=function(_0x1aa11c,_0x1d1a3c){_0x1aa11c=_0x1aa11c-0x18e;let _0x1f2620=_0x20d572[_0x1aa11c];return _0x1f2620;},_0x1aa1(_0x39552c,_0x2c63db);}exports['ObjectHandler']=ObjectHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function _0x28ed(_0x290ad6,_0x10a143){var _0x4d3e90=_0x4d3e();return _0x28ed=function(_0x28ed8c,_0x37994b){_0x28ed8c=_0x28ed8c-0xee;var _0x38b2af=_0x4d3e90[_0x28ed8c];return _0x38b2af;},_0x28ed(_0x290ad6,_0x10a143);}function _0x4d3e(){var _0x3fcf56=['234633pFqlSk','342tpbiyI','1887860XNKvsE','375010tJLDFB','8096506LgzvTC','16040XUbrhl','3297MkxjCc','2384bLlvLK','18VaOHep','1648506EHrkNH','2fQDcMg'];_0x4d3e=function(){return _0x3fcf56;};return _0x4d3e();}(function(_0x3cacdf,_0x291e15){var _0x1f0d98=_0x28ed,_0x55c924=_0x3cacdf();while(!![]){try{var _0x16ad36=-parseInt(_0x1f0d98(0xf0))/0x1+-parseInt(_0x1f0d98(0xef))/0x2*(-parseInt(_0x1f0d98(0xee))/0x3)+-parseInt(_0x1f0d98(0xf2))/0x4+-parseInt(_0x1f0d98(0xf5))/0x5*(parseInt(_0x1f0d98(0xf1))/0x6)+-parseInt(_0x1f0d98(0xf6))/0x7*(parseInt(_0x1f0d98(0xf7))/0x8)+parseInt(_0x1f0d98(0xf8))/0x9*(parseInt(_0x1f0d98(0xf3))/0xa)+parseInt(_0x1f0d98(0xf4))/0xb;if(_0x16ad36===_0x291e15)break;else _0x55c924['push'](_0x55c924['shift']());}catch(_0x9cdb37){_0x55c924['push'](_0x55c924['shift']());}}}(_0x4d3e,0x50bf2));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['StringHandler']=void 0x0;class StringHandler{['split'](_0x3f7747,_0x17bfa6){return _0x3f7747['split'](_0x17bfa6);}['charAt'](_0xa5d2f0,_0x5e4f5a){return _0xa5d2f0['charAt'](_0x5e4f5a);}['concat'](..._0x5ec5d0){return _0x5ec5d0['join']('');}['includes'](_0x365dc6,_0x3c4273,_0x2bee0f){return _0x365dc6['includes'](_0x3c4273,_0x2bee0f);}['indexOf'](_0x30c212,_0x388b91,_0x1dd2fc){return _0x30c212['indexOf'](_0x388b91,_0x1dd2fc);}['lastIndexOf'](_0x13ecf4,_0x5ede71,_0x29e296){return _0x13ecf4['lastIndexOf'](_0x5ede71,_0x29e296);}['slice'](_0xa3ffec,_0x6f1e07,_0x4eacc9){return _0xa3ffec['slice'](_0x6f1e07,_0x4eacc9);}['toLowerCase'](_0x3120e2){return _0x3120e2['toLowerCase']();}['toUpperCase'](_0x551a3d){return _0x551a3d['toUpperCase']();}['trim'](_0x2b0166){return _0x2b0166['trim']();}['trimStart'](_0x1a3404){return _0x1a3404['trimStart']();}['trimEnd'](_0x31401f){return _0x31401f['trimEnd']();}['padStart'](_0x14c42a,_0x211b04,_0x5d0a2b){return _0x14c42a['padStart'](_0x211b04,_0x5d0a2b);}['padEnd'](_0x318947,_0x245122,_0x3d9817){return _0x318947['padEnd'](_0x245122,_0x3d9817);}['replace'](_0x5ba798,_0x555a9f,_0x1ada76){return _0x5ba798['replace'](_0x555a9f,_0x1ada76);}['search'](_0x54f6d6,_0x4898c6){return _0x54f6d6['search'](_0x4898c6);}['substring'](_0x403611,_0x1306e2,_0x5d3652){return _0x403611['substring'](_0x1306e2,_0x5d3652);}['startsWith'](_0x578ff3,_0xa2630d,_0x1ed3fc){return _0x578ff3['startsWith'](_0xa2630d,_0x1ed3fc);}['endsWith'](_0x2f03fb,_0x2563a9,_0x6dd1df){return _0x2f03fb['endsWith'](_0x2563a9,_0x6dd1df);}['repeat'](_0x28e12a,_0x1067e5){if(_0x1067e5<0x0||_0x1067e5===Infinity)throw new RangeError('Invalid\x20repeat\x20count.\x20Must\x20be\x20a\x20positive\x20finite\x20number.');return _0x28e12a['repeat'](_0x1067e5);}}exports['StringHandler']=StringHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x200400,_0x400cc1){var _0x6378c7=_0x43f7,_0xc2537d=_0x200400();while(!![]){try{var _0x29e1b6=parseInt(_0x6378c7(0x127))/0x1*(parseInt(_0x6378c7(0x128))/0x2)+-parseInt(_0x6378c7(0x124))/0x3*(parseInt(_0x6378c7(0x125))/0x4)+-parseInt(_0x6378c7(0x126))/0x5*(-parseInt(_0x6378c7(0x12c))/0x6)+parseInt(_0x6378c7(0x123))/0x7+parseInt(_0x6378c7(0x129))/0x8*(-parseInt(_0x6378c7(0x12a))/0x9)+parseInt(_0x6378c7(0x12d))/0xa*(-parseInt(_0x6378c7(0x12e))/0xb)+parseInt(_0x6378c7(0x12f))/0xc*(parseInt(_0x6378c7(0x12b))/0xd);if(_0x29e1b6===_0x400cc1)break;else _0xc2537d['push'](_0xc2537d['shift']());}catch(_0x99da40){_0xc2537d['push'](_0xc2537d['shift']());}}}(_0x2906,0xd205d));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['SymbolHandler']=void 0x0;class SymbolHandler{['null'](){return null;}['undefined'](){return undefined;}['whitespace'](){return'\x20';}['object'](){return{};}['array'](){return[];}['posInfinity'](){return Infinity;}['negInfinity'](){return-Infinity;}['NaN'](){return NaN;}['date'](){return new Date();}}function _0x43f7(_0x3288bc,_0x288ed4){var _0x29063a=_0x2906();return _0x43f7=function(_0x43f7e7,_0x32460d){_0x43f7e7=_0x43f7e7-0x123;var _0x1217c7=_0x29063a[_0x43f7e7];return _0x1217c7;},_0x43f7(_0x3288bc,_0x288ed4);}exports['SymbolHandler']=SymbolHandler;function _0x2906(){var _0x42c48c=['524jVSDoF','418875yysHDY','63pKOQjR','47138zzvOkA','5616ikFjJk','14742zSQUqD','377Eoilnm','12cjZfTX','1313380ywHTLx','99CxZwOW','33132MqcSuG','11557672Jqgxli','4383PXWTfR'];_0x2906=function(){return _0x42c48c;};return _0x2906();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x5b2801,_0x1aae7a){var _0x3a37df=_0x46a6,_0x24ef44=_0x5b2801();while(!![]){try{var _0x531666=-parseInt(_0x3a37df(0x110))/0x1*(-parseInt(_0x3a37df(0x111))/0x2)+-parseInt(_0x3a37df(0x116))/0x3+parseInt(_0x3a37df(0x117))/0x4*(-parseInt(_0x3a37df(0x115))/0x5)+parseInt(_0x3a37df(0x113))/0x6+-parseInt(_0x3a37df(0x112))/0x7+parseInt(_0x3a37df(0x114))/0x8+parseInt(_0x3a37df(0x118))/0x9;if(_0x531666===_0x1aae7a)break;else _0x24ef44['push'](_0x24ef44['shift']());}catch(_0x3f331e){_0x24ef44['push'](_0x24ef44['shift']());}}}(_0x1247,0x29550));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['UnaryHandler']=void 0x0;class UnaryHandler{['not'](_0x5a133c){return!_0x5a133c;}['positive'](_0xf1ed60){return+_0xf1ed60;}['negative'](_0x20ba02){return-_0x20ba02;}['bitwise_not'](_0x2025a4){return~_0x2025a4;}}function _0x46a6(_0x2309f2,_0x130ab3){var _0x1247b8=_0x1247();return _0x46a6=function(_0x46a6ed,_0x18d251){_0x46a6ed=_0x46a6ed-0x110;var _0x4afd0d=_0x1247b8[_0x46a6ed];return _0x4afd0d;},_0x46a6(_0x2309f2,_0x130ab3);}exports['UnaryHandler']=UnaryHandler;function _0x1247(){var _0x36eec8=['40724zhIewp','1762182uyqCOY','85907WebMnZ','2eXeNPi','568120GJwhNB','1787058CwpExo','2671712bGgYof','165eJQVdO','981249xARtuS'];_0x1247=function(){return _0x36eec8;};return _0x1247();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x33bd69,_0x4d2335){const _0x44f62a=_0x5b69,_0xd71ee8=_0x33bd69();while(!![]){try{const _0x447828=-parseInt(_0x44f62a(0x166))/0x1*(parseInt(_0x44f62a(0x16b))/0x2)+parseInt(_0x44f62a(0x169))/0x3*(-parseInt(_0x44f62a(0x168))/0x4)+parseInt(_0x44f62a(0x16a))/0x5*(parseInt(_0x44f62a(0x165))/0x6)+-parseInt(_0x44f62a(0x16d))/0x7+parseInt(_0x44f62a(0x167))/0x8*(-parseInt(_0x44f62a(0x16f))/0x9)+-parseInt(_0x44f62a(0x16e))/0xa+-parseInt(_0x44f62a(0x170))/0xb*(-parseInt(_0x44f62a(0x16c))/0xc);if(_0x447828===_0x4d2335)break;else _0xd71ee8['push'](_0xd71ee8['shift']());}catch(_0x5971ed){_0xd71ee8['push'](_0xd71ee8['shift']());}}}(_0x2fb5,0xdbf72));var __importDefault=this&&this['__importDefault']||function(_0x3b3b18){return _0x3b3b18&&_0x3b3b18['__esModule']?_0x3b3b18:{'default':_0x3b3b18};};function _0x5b69(_0xe1de91,_0x5b6945){const _0x2fb533=_0x2fb5();return _0x5b69=function(_0x5b6967,_0x3905c7){_0x5b6967=_0x5b6967-0x165;let _0x223deb=_0x2fb533[_0x5b6967];return _0x223deb;},_0x5b69(_0xe1de91,_0x5b6945);}function _0x2fb5(){const _0x3d96ba=['6077150MnBlTy','3547053aQKPgc','48587341OUZiYY','6nZzque','155OcdIbZ','32LGwKWZ','16052qYqMFO','237JSKppC','3856890PnAYxm','15906GpBIqe','12dTUOam','3874542jDwtAy'];_0x2fb5=function(){return _0x3d96ba;};return _0x2fb5();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Pipe']=void 0x0;const functions_1=__importDefault(require('./functions'));class Pipe{constructor(_0x334512,_0x456ea6,_0x268187){this['rules']=_0x334512,this['jobData']=_0x456ea6,this['context']=_0x268187;}['isPipeType'](_0x3e53cb){return!Array['isArray'](_0x3e53cb)&&'@pipe'in _0x3e53cb;}['isreduceType'](_0x4fddd0){return!Array['isArray'](_0x4fddd0)&&'@reduce'in _0x4fddd0;}static['isPipeObject'](_0x27c4e2){return typeof _0x27c4e2==='object'&&_0x27c4e2!==null&&!Array['isArray'](_0x27c4e2)&&'@pipe'in _0x27c4e2;}static['resolve'](_0x50e0c4,_0x3ad4ac){let _0x43b18e;return Pipe['isPipeObject'](_0x50e0c4)?_0x43b18e=new Pipe(_0x50e0c4['@pipe'],_0x3ad4ac):_0x43b18e=new Pipe([[_0x50e0c4]],_0x3ad4ac),_0x43b18e['process']();}['process'](_0x33e0c8=null){let _0x59db39=0x0;!(_0x33e0c8||this['isPipeType'](this['rules'][0x0])||this['isreduceType'](this['rules'][0x0]))&&(_0x33e0c8=this['processCells'](this['rules'][0x0]),_0x59db39=0x1);const _0x1d80bf=this['rules']['length'],_0x28bd38=[];for(let _0xa6ae53=_0x59db39;_0xa6ae53<_0x1d80bf;_0xa6ae53++){_0x33e0c8=this['processRow'](this['rules'][_0xa6ae53],_0x33e0c8,_0x28bd38);}return _0x33e0c8[0x0];}['cloneUnknown'](_0x44e231){if(_0x44e231===null||typeof _0x44e231!=='object')return _0x44e231;if(_0x44e231 instanceof Date)return new Date(_0x44e231['getTime']());if(_0x44e231 instanceof RegExp)return new RegExp(_0x44e231);if(Array['isArray'](_0x44e231))return _0x44e231['map'](_0x1d43e4=>this['cloneUnknown'](_0x1d43e4));const _0x449123={};for(const _0x4ce6ba in _0x44e231){Object['prototype']['hasOwnProperty']['call'](_0x44e231,_0x4ce6ba)&&(_0x449123[_0x4ce6ba]=this['cloneUnknown'](_0x44e231[_0x4ce6ba]));}return _0x449123;}['reduce'](_0x15dcbd){let _0x159545=this['cloneUnknown'](_0x15dcbd[0x1]??null);if(Array['isArray'](_0x15dcbd[0x0]))for(let _0x5774ef=0x0;_0x5774ef<_0x15dcbd[0x0]['length'];_0x5774ef++){this['context']={'$input':_0x15dcbd[0x0],'$output':_0x159545,'$item':_0x15dcbd[0x0][_0x5774ef],'$key':_0x5774ef['toString'](),'$index':_0x5774ef},_0x159545=this['process']([_0x159545]);}else{let _0x577a23=-0x1;for(const _0x5f3df2 in _0x15dcbd[0x0]){_0x577a23++,this['context']={'$input':_0x15dcbd[0x0],'$output':_0x159545,'$item':_0x15dcbd[0x0][_0x5f3df2],'$key':_0x5f3df2,'$index':_0x577a23},_0x159545=this['process']([_0x159545]);}}return[_0x159545];}['processRow'](_0x2506c0,_0x163a05,_0x137d10){if(_0x163a05&&this['isreduceType'](_0x2506c0)){const _0x413cdb=new Pipe(_0x2506c0['@reduce'],this['jobData']),_0x5c0445=_0x413cdb['reduce'](_0x163a05);return _0x5c0445;}else{if(this['isPipeType'](_0x2506c0)){const _0x5d3ef2=new Pipe(_0x2506c0['@pipe'],this['jobData'],this['context']);return _0x137d10['push'](_0x5d3ef2['process']()),_0x163a05;}else{_0x137d10['length']>0x0&&(_0x163a05=[..._0x137d10],_0x137d10['length']=0x0);if(!_0x163a05)return[]['concat'](this['processCells'](Array['isArray'](_0x2506c0)?[..._0x2506c0]:[]));else{const [_0x151f22,..._0x380f90]=_0x2506c0;let _0x39bc9c;return this['isContextVariable'](_0x151f22)?_0x39bc9c=this['resolveContextValue'](_0x151f22):_0x39bc9c=Pipe['resolveFunction'](_0x151f22)(..._0x163a05),[_0x39bc9c]['concat'](this['processCells']([..._0x380f90]));}}}}static['resolveFunction'](_0x35ab6a){let [_0x256add,_0x28b005]=_0x35ab6a['split']('.');_0x256add=_0x256add['substring'](0x2),_0x28b005=_0x28b005['substring'](0x0,_0x28b005['length']-0x1);const _0x1e2e6c=functions_1['default'][_0x256add];if(!_0x1e2e6c)throw new Error('Unknown\x20domain\x20name\x20['+_0x35ab6a+']:\x20'+_0x256add);if(!_0x1e2e6c[_0x28b005])throw new Error('Unknown\x20domain\x20function\x20['+_0x35ab6a+']:\x20'+_0x256add+'.'+_0x28b005);return _0x1e2e6c[_0x28b005];}['processCells'](_0x4c6783){const _0x214f73=[];if(Array['isArray'](_0x4c6783))for(const _0x3aec32 of _0x4c6783){_0x214f73['push'](this['resolveCellValue'](_0x3aec32));}return _0x214f73;}['isFunction'](_0x4ac197){return typeof _0x4ac197==='string'&&_0x4ac197['startsWith']('{@')&&_0x4ac197['endsWith']('}');}['isContextVariable'](_0x2075aa){if(typeof _0x2075aa==='string'&&_0x2075aa['endsWith']('}'))return _0x2075aa['startsWith']('{$item')||_0x2075aa['startsWith']('{$key')||_0x2075aa['startsWith']('{$index')||_0x2075aa['startsWith']('{$input')||_0x2075aa['startsWith']('{$output');}['isMappable'](_0x503f29){return typeof _0x503f29==='string'&&_0x503f29['startsWith']('{')&&_0x503f29['endsWith']('}');}['resolveCellValue'](_0x324be5){if(this['isFunction'](_0x324be5)){const _0x158e78=Pipe['resolveFunction'](_0x324be5);return _0x158e78['call']();}else{if(this['isContextVariable'](_0x324be5))return this['resolveContextValue'](_0x324be5);else return this['isMappable'](_0x324be5)?this['resolveMappableValue'](_0x324be5):_0x324be5;}}['getNestedProperty'](_0x3f8818,_0x14d21e){const _0x3f06b1=_0x14d21e['split']('.');let _0x56502d=_0x3f8818;for(const _0x4b947f of _0x3f06b1){if(_0x56502d===null||typeof _0x56502d!=='object'||!_0x56502d['hasOwnProperty'](_0x4b947f))return undefined;_0x56502d=_0x56502d[_0x4b947f];}return _0x56502d;}['resolveMappableValue'](_0x8b8cea){const _0x5be374=this['resolveMapTerm'](_0x8b8cea);return this['getNestedProperty'](this['jobData'],_0x5be374);}['resolveContextValue'](_0x1411d7){const _0x35d5b2=this['resolveContextTerm'](_0x1411d7);return this['getNestedProperty'](this['context'],_0x35d5b2);}['resolveContextTerm'](_0x3af59e){return _0x3af59e['substring'](0x1,_0x3af59e['length']-0x1);}['resolveFunctionTerm'](_0x582482){return _0x582482['substring'](0x2,_0x582482['length']-0x1);}['resolveMapTerm'](_0x120b3f){return _0x120b3f['substring'](0x1,_0x120b3f['length']-0x1);}}exports['Pipe']=Pipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x213e85,_0x1486e9){const _0x201e46=_0x1412,_0x2cc18e=_0x213e85();while(!![]){try{const _0x42ba05=parseInt(_0x201e46(0xa8))/0x1+-parseInt(_0x201e46(0xa5))/0x2*(-parseInt(_0x201e46(0xa6))/0x3)+-parseInt(_0x201e46(0xac))/0x4+-parseInt(_0x201e46(0xae))/0x5*(-parseInt(_0x201e46(0xa9))/0x6)+-parseInt(_0x201e46(0xa7))/0x7+parseInt(_0x201e46(0xad))/0x8*(parseInt(_0x201e46(0xaa))/0x9)+-parseInt(_0x201e46(0xab))/0xa;if(_0x42ba05===_0x1486e9)break;else _0x2cc18e['push'](_0x2cc18e['shift']());}catch(_0x8fc530){_0x2cc18e['push'](_0x2cc18e['shift']());}}}(_0x5d3a,0x420a6));function _0x5d3a(){const _0x1e85d2=['101409aSaDoZ','14478GRPtHR','129897jFPLXu','1447010wcVghY','1085680GoEXAw','136VjuSzD','580GjZGTZ','2YBdzMm','1314753TEhCJj','2648142plsdlV'];_0x5d3a=function(){return _0x1e85d2;};return _0x5d3a();}function _0x1412(_0xb7b43f,_0x47e20b){const _0x5d3a8a=_0x5d3a();return _0x1412=function(_0x141245,_0xb1c7db){_0x141245=_0x141245-0xa5;let _0x333884=_0x5d3a8a[_0x141245];return _0x333884;},_0x1412(_0xb7b43f,_0x47e20b);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['QuorumService']=void 0x0;const enums_1=require('../../modules/enums'),utils_1=require('../../modules/utils'),compiler_1=require('../compiler'),hotmesh_1=require('../../types/hotmesh'),factory_1=require('../sub/factory'),factory_2=require('../store/factory');class QuorumService{constructor(){this['profiles']=[],this['cacheMode']='cache',this['untilVersion']=null,this['quorum']=null,this['callbacks']=[];}static async['init'](_0x3c34d5,_0x17f701,_0x45fa84,_0x4680d4,_0x2c34ab,_0x52e896){if(_0x4680d4['engine']){const _0x2fa20c=new QuorumService();return _0x2fa20c['verifyQuorumFields'](_0x4680d4),_0x2fa20c['namespace']=_0x3c34d5,_0x2fa20c['appId']=_0x17f701,_0x2fa20c['guid']=_0x45fa84,_0x2fa20c['logger']=_0x52e896,_0x2fa20c['engine']=_0x2c34ab,await _0x2fa20c['initStoreChannel'](_0x4680d4['engine']['store']),await _0x2fa20c['initSubChannel'](_0x4680d4['engine']['sub'],_0x4680d4['engine']['pub']),await _0x2fa20c['subscribe']['subscribe'](hotmesh_1['KeyType']['QUORUM'],_0x2fa20c['subscriptionHandler'](),_0x17f701),await _0x2fa20c['subscribe']['subscribe'](hotmesh_1['KeyType']['QUORUM'],_0x2fa20c['subscriptionHandler'](),_0x17f701,_0x2fa20c['guid']),_0x2fa20c['engine']['processWebHooks'](),_0x2fa20c['engine']['processTimeHooks'](),_0x2fa20c;}}['verifyQuorumFields'](_0x556df5){if(!(0x0,utils_1['identifyProvider'])(_0x556df5['engine']['store'])||!(0x0,utils_1['identifyProvider'])(_0x556df5['engine']['sub']))throw new Error('quorum\x20config\x20must\x20include\x20`store`\x20and\x20`sub`\x20fields.');}async['initStoreChannel'](_0x1e1e08){this['store']=await factory_2['StoreServiceFactory']['init'](_0x1e1e08,this['namespace'],this['appId'],this['logger']);}async['initSubChannel'](_0x186496,_0x26dea1){this['subscribe']=await factory_1['SubServiceFactory']['init'](_0x186496,_0x26dea1,this['namespace'],this['appId'],this['guid'],this['logger']);}['subscriptionHandler'](){const _0x563840=this;return async(_0xda61ed,_0x17bab3)=>{_0x563840['logger']['debug']('quorum-event-received',{'topic':_0xda61ed,'type':_0x17bab3['type']});if(_0x17bab3['type']==='activate')_0x563840['engine']['setCacheMode'](_0x17bab3['cache_mode'],_0x17bab3['until_version']);else{if(_0x17bab3['type']==='ping')_0x563840['sayPong'](_0x563840['appId'],_0x563840['guid'],_0x17bab3['originator'],_0x17bab3['details']);else{if(_0x17bab3['type']==='pong'&&_0x563840['guid']===_0x17bab3['originator'])_0x563840['quorum']=_0x563840['quorum']+0x1,_0x17bab3['profile']&&_0x563840['profiles']['push'](_0x17bab3['profile']);else{if(_0x17bab3['type']==='throttle')_0x563840['engine']['throttle'](_0x17bab3['throttle']);else{if(_0x17bab3['type']==='work')_0x563840['engine']['processWebHooks']();else{if(_0x17bab3['type']==='job')_0x563840['engine']['routeToSubscribers'](_0x17bab3['topic'],_0x17bab3['job']);else{if(_0x17bab3['type']==='cron')_0x563840['engine']['processTimeHooks']();else _0x17bab3['type']==='rollcall'&&_0x563840['doRollCall'](_0x17bab3);}}}}}}_0x563840['callbacks']['length']>0x0&&_0x563840['callbacks']['forEach'](_0x292e65=>_0x292e65(_0xda61ed,_0x17bab3));};}async['sayPong'](_0x5bf4d2,_0x16d15c,_0x20c8ab,_0x56f6c2=![]){let _0x4c53c7;if(_0x56f6c2){const _0x1d084b=this['engine']['store']['mintKey'](hotmesh_1['KeyType']['STREAMS'],{'appId':this['appId']});_0x4c53c7={'engine_id':this['guid'],'namespace':this['namespace'],'app_id':this['appId'],'stream':_0x1d084b,'counts':this['engine']['router']['counts'],'timestamp':(0x0,utils_1['formatISODate'])(new Date()),'inited':this['engine']['inited'],'throttle':this['engine']['router']['throttle'],'reclaimDelay':this['engine']['router']['reclaimDelay'],'reclaimCount':this['engine']['router']['reclaimCount'],'system':await(0x0,utils_1['getSystemHealth'])()};}this['subscribe']['publish'](hotmesh_1['KeyType']['QUORUM'],{'type':'pong','guid':_0x16d15c,'originator':_0x20c8ab,'profile':_0x4c53c7},_0x5bf4d2);}async['requestQuorum'](_0x4744eb=enums_1['HMSH_QUORUM_DELAY_MS'],_0x31c85b=![]){const _0x1d4ae4=this['quorum'];return this['quorum']=0x0,this['profiles']['length']=0x0,await this['subscribe']['publish'](hotmesh_1['KeyType']['QUORUM'],{'type':'ping','originator':this['guid'],'details':_0x31c85b},this['appId']),await(0x0,utils_1['sleepFor'])(_0x4744eb),_0x1d4ae4;}async['doRollCall'](_0x18804e){let _0x5e059f=0x0;const _0xb2916d=!isNaN(_0x18804e['max'])?_0x18804e['max']:enums_1['HMSH_QUORUM_ROLLCALL_CYCLES'];if(this['rollCallInterval'])clearTimeout(this['rollCallInterval']);const _0x1235aa=_0x18804e['interval']/0x2,_0x3e5c5b=_0x1235aa+Math['ceil'](Math['random']()*_0x1235aa);do{await(0x0,utils_1['sleepFor'])(Math['ceil'](Math['random']()*0x3e8)),await this['sayPong'](this['appId'],this['guid'],null,!![]);if(!_0x18804e['interval'])return;const {promise:_0x4e8af2,timerId:_0x4aa291}=(0x0,utils_1['XSleepFor'])(_0x3e5c5b*0x3e8);this['rollCallInterval']=_0x4aa291,await _0x4e8af2;}while(this['rollCallInterval']&&_0x5e059f++<_0xb2916d-0x1);}['cancelRollCall'](){this['rollCallInterval']&&(clearTimeout(this['rollCallInterval']),delete this['rollCallInterval']);}['stop'](){this['cancelRollCall']();}async['pub'](_0xbc5801){return await this['subscribe']['publish'](hotmesh_1['KeyType']['QUORUM'],_0xbc5801,this['appId'],_0xbc5801['topic']||_0xbc5801['guid']);}async['sub'](_0x521d73){this['callbacks']['push'](_0x521d73);}async['unsub'](_0x5d12ce){this['callbacks']=this['callbacks']['filter'](_0x1fde0d=>_0x1fde0d!==_0x5d12ce);}async['rollCall'](_0x272e6a=enums_1['HMSH_QUORUM_DELAY_MS']){await this['requestQuorum'](_0x272e6a,!![]);const _0x5463c5=await this['engine']['stream']['getStreamDepths'](this['profiles']);return this['profiles']['forEach'](async(_0x244374,_0x135385)=>{_0x244374['stream_depth']=_0x5463c5?.[_0x135385]?.['depth']??0x0;}),this['profiles'];}async['activate'](_0xfed89a,_0xd0e414=enums_1['HMSH_QUORUM_DELAY_MS'],_0x5cee4e=0x0){_0xfed89a=_0xfed89a['toString']();const _0x2d6431=await this['store']['reserveScoutRole']('activate',Math['ceil'](_0xd0e414*0x6/0x3e8)+0x1);if(!_0x2d6431){this['logger']['debug']('quorum-activation-awaiting',{'version':_0xfed89a}),await(0x0,utils_1['sleepFor'])(_0xd0e414*0x6);const _0x20caf2=await this['store']['getApp'](this['appId'],!![]);return _0x20caf2?.['active']==!![]&&_0x20caf2?.['version']===_0xfed89a;}const _0x355287=await this['engine']['getVID']();await this['requestQuorum'](_0xd0e414);const _0x1d55d2=await this['requestQuorum'](_0xd0e414),_0x15cf25=await this['requestQuorum'](_0xd0e414),_0x4b7d6f=await this['requestQuorum'](_0xd0e414);if(_0x1d55d2&&_0x1d55d2===_0x15cf25&&_0x15cf25===_0x4b7d6f){this['logger']['info']('quorum-rollcall-succeeded',{'q1':_0x1d55d2,'q2':_0x15cf25,'q3':_0x4b7d6f}),this['subscribe']['publish'](hotmesh_1['KeyType']['QUORUM'],{'type':'activate','cache_mode':'nocache','until_version':_0xfed89a},this['appId']),await new Promise(_0x5dfff9=>setTimeout(_0x5dfff9,_0xd0e414)),await this['store']['releaseScoutRole']('activate');if(this['engine']['untilVersion']===_0xfed89a){this['logger']['info']('quorum-activation-succeeded',{'version':_0xfed89a});const {id:_0x13897b}=_0x355287,_0x30a36d=new compiler_1['CompilerService'](this['store'],this['engine']['stream'],this['logger']);return await _0x30a36d['activate'](_0x13897b,_0xfed89a);}else{this['logger']['error']('quorum-activation-error',{'version':_0xfed89a});throw new Error('UntilVersion\x20Not\x20Received.\x20Version\x20'+_0xfed89a+'\x20not\x20activated');}}else{this['logger']['warn']('quorum-rollcall-error',{'q1':_0x1d55d2,'q2':_0x15cf25,'q3':_0x4b7d6f,'count':_0x5cee4e}),this['store']['releaseScoutRole']('activate');if(_0x5cee4e<enums_1['HMSH_ACTIVATION_MAX_RETRY'])return await this['activate'](_0xfed89a,_0xd0e414*0x2,_0x5cee4e+0x1);throw new Error('Quorum\x20not\x20reached.\x20Version\x20'+_0xfed89a+'\x20not\x20activated.');}}}exports['QuorumService']=QuorumService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(_0x3330da,_0x45dbae){const _0x21c3f8=_0x3797,_0x221c1d=_0x3330da();while(!![]){try{const _0x4aa577=-parseInt(_0x21c3f8(0xf4))/0x1*(parseInt(_0x21c3f8(0xf7))/0x2)+-parseInt(_0x21c3f8(0xf0))/0x3*(-parseInt(_0x21c3f8(0xf1))/0x4)+parseInt(_0x21c3f8(0xf8))/0x5+parseInt(_0x21c3f8(0xee))/0x6*(parseInt(_0x21c3f8(0xf6))/0x7)+-parseInt(_0x21c3f8(0xef))/0x8*(parseInt(_0x21c3f8(0xf3))/0x9)+parseInt(_0x21c3f8(0xf5))/0xa*(parseInt(_0x21c3f8(0xf2))/0xb)+-parseInt(_0x21c3f8(0xf9))/0xc*(parseInt(_0x21c3f8(0xed))/0xd);if(_0x4aa577===_0x45dbae)break;else _0x221c1d['push'](_0x221c1d['shift']());}catch(_0x578af8){_0x221c1d['push'](_0x221c1d['shift']());}}}(_0x2bb5,0x1f1e0));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ReporterService']=void 0x0;function _0x3797(_0x599292,_0x5a295f){const _0x2bb5f7=_0x2bb5();return _0x3797=function(_0x379701,_0x1c7c6f){_0x379701=_0x379701-0xed;let _0x1f22aa=_0x2bb5f7[_0x379701];return _0x1f22aa;},_0x3797(_0x599292,_0x5a295f);}const pipe_1=require('../pipe');class ReporterService{constructor(_0xf40b2d,_0x67a9db,_0x22c209){this['appVersion']=_0xf40b2d,this['logger']=_0x22c209,this['store']=_0x67a9db;}async['getStats'](_0x47d716){this['logger']['debug']('reporter-getstats-started',_0x47d716);const {key:_0x222f60,granularity:_0x34ae10,range:_0x21e290,end:_0x116edd,start:_0x16f938}=_0x47d716;this['validateOptions'](_0x47d716);const _0x495225=this['generateDateTimeSets'](_0x34ae10,_0x21e290,_0x116edd,_0x16f938),_0x1cd29a=_0x495225['map'](_0x4c4fae=>this['buildRedisKey'](_0x222f60,_0x4c4fae)),_0x418727=await this['store']['getJobStats'](_0x1cd29a),[_0x2b9182,_0x87a211]=this['aggregateData'](_0x418727),_0x4b256b=this['buildStatsResponse'](_0x418727,_0x1cd29a,_0x87a211,_0x2b9182,_0x47d716);return _0x4b256b;}['validateOptions'](_0xcfe246){const {start:_0x57ebba,end:_0x324793,range:_0x3a378e,granularity:_0x3a9a53}=_0xcfe246;if(_0x3a9a53!=='infinity'&&(_0x57ebba&&_0x324793&&_0x3a378e||!_0x57ebba&&!_0x324793&&!_0x3a378e))throw new Error('Invalid\x20combination\x20of\x20start,\x20end,\x20and\x20range\x20values.\x20Provide\x20either\x20start+end,\x20end+range,\x20or\x20start+range.');}['generateDateTimeSets'](_0x178bec,_0x5c21f3,_0x34501b,_0x3619d8){if(_0x178bec==='infinity')return['0'];!_0x5c21f3&&(_0x5c21f3='0m');const _0x3f4471={'5m':0x5,'10m':0xa,'15m':0xf,'30m':0x1e,'1h':0x3c},_0x144372=_0x3f4471[_0x178bec];if(!_0x144372)throw new Error('Invalid\x20granularity\x20value.');const _0x20fa5c=this['convertRangeToMinutes'](_0x5c21f3);if(_0x20fa5c===null)throw new Error('Invalid\x20range\x20value.');let _0x14d344,_0x3dac15;_0x3619d8?(_0x14d344=new Date(_0x3619d8),_0x3dac15=new Date(_0x14d344['getTime']()+_0x20fa5c*0x3c*0x3e8)):(_0x3dac15=_0x34501b==='NOW'?new Date():new Date(_0x34501b),_0x14d344=new Date(_0x3dac15['getTime']()-_0x20fa5c*0x3c*0x3e8));_0x14d344['setUTCMinutes'](Math['floor'](_0x14d344['getUTCMinutes']()/_0x144372)*_0x144372);const _0x44c972=[];for(let _0x9e5879=_0x14d344;_0x9e5879<=_0x3dac15;_0x9e5879['setUTCMinutes'](_0x9e5879['getUTCMinutes']()+_0x144372)){const _0x5838ac=[_0x9e5879['getUTCFullYear'](),String(_0x9e5879['getUTCMonth']()+0x1)['padStart'](0x2,'0'),String(_0x9e5879['getUTCDate']())['padStart'](0x2,'0'),String(_0x9e5879['getUTCHours']())['padStart'](0x2,'0'),String(_0x9e5879['getUTCMinutes']())['padStart'](0x2,'0')]['join']('');_0x44c972['push'](_0x5838ac);}return _0x44c972;}['convertRangeToMinutes'](_0x4b1dd0){const _0x544258=_0x4b1dd0['slice'](-0x1),_0x25500d=parseInt(_0x4b1dd0['slice'](0x0,-0x1),0xa);if(isNaN(_0x25500d))return null;switch(_0x544258){case'm':return _0x25500d;case'h':return _0x25500d*0x3c;case'd':return _0x25500d*0x3c*0x18;default:return null;}}['buildRedisKey'](_0x3245f7,_0xd09a32,_0x163858=''){return'hmsh:'+this['appVersion']['id']+':s:'+_0x3245f7+':'+_0xd09a32+(_0x163858?':'+_0x163858:'');}['aggregateData'](_0x3ff22c){const _0x5a1995={};let _0x128043=0x0;return Object['entries'](_0x3ff22c)['forEach'](([_0x3254c5,_0x501f98])=>{for(const _0x4b2bb5 in _0x501f98){if(_0x4b2bb5['startsWith']('count:')){const _0x13e641=_0x4b2bb5['slice']('count:'['length']);!_0x5a1995[_0x13e641]&&(_0x5a1995[_0x13e641]=0x0),_0x5a1995[_0x13e641]+=_0x501f98[_0x4b2bb5];}else _0x4b2bb5==='count'&&(_0x128043+=_0x501f98[_0x4b2bb5]);}}),[_0x128043,_0x5a1995];}['buildStatsResponse'](_0x42ef59,_0x548a98,_0x5de638,_0x520e47,_0x97b996){const _0xa59070=[],_0x218bd1=Object['keys'](_0x5de638)['filter'](_0xc8b15a=>_0xc8b15a!=='count');let _0x2ffbc0=undefined;_0x97b996['sparse']!==!![]&&(_0x2ffbc0=this['handleSegments'](_0x42ef59,_0x548a98));_0x218bd1['forEach'](_0x5cd6b6=>{const _0x29e7d8={'target':_0x5cd6b6,'type':'count','value':_0x5de638[_0x5cd6b6]};_0xa59070['push'](_0x29e7d8);});const _0x4c3ebd={'key':_0x97b996['key'],'granularity':_0x97b996['granularity'],'range':_0x97b996['range'],'end':_0x97b996['end'],'count':_0x520e47,'measures':_0xa59070};return _0x2ffbc0&&(_0x4c3ebd['segments']=_0x2ffbc0),_0x4c3ebd;}['handleSegments'](_0x24e0d9,_0x5aebce){const _0xd212ae=[];return _0x5aebce['forEach']((_0x4ddd34,_0x346d1b)=>{const _0x58e545=[];_0x24e0d9[_0x4ddd34]&&Object['entries'](_0x24e0d9[_0x4ddd34])['forEach'](([_0x37d9e2,_0x98b5bc])=>{if(_0x37d9e2['startsWith']('count:')){const _0x327fc3=_0x37d9e2['slice']('count:'['length']);_0x58e545['push']({'target':_0x327fc3,'type':'count','value':_0x98b5bc});}});const _0x1862ed=this['isoTimestampFromKeyTimestamp'](_0x4ddd34),_0x27f25e=_0x24e0d9[_0x4ddd34]?_0x24e0d9[_0x4ddd34]['count']:0x0;_0xd212ae['push']({'count':_0x27f25e,'time':_0x1862ed,'measures':_0x58e545});}),_0xd212ae;}['isoTimestampFromKeyTimestamp'](_0x4ff0c5){if(_0x4ff0c5['endsWith'](':'))return'0';const _0x26a430=_0x4ff0c5['slice'](-0xc),_0x2a4207=_0x26a430['slice'](0x0,0x4),_0x2f771e=_0x26a430['slice'](0x4,0x6),_0x12a0d8=_0x26a430['slice'](0x6,0x8),_0xb82dd0=_0x26a430['slice'](0x8,0xa),_0x19952c=_0x26a430['slice'](0xa,0xc);return _0x2a4207+'-'+_0x2f771e+'-'+_0x12a0d8+'T'+_0xb82dd0+':'+_0x19952c+'Z';}async['getIds'](_0x7e6cfc,_0x13f850,_0x4a3ccb=[0x0,-0x1]){if(!_0x13f850['length']){const _0x53817d=await this['getStats'](_0x7e6cfc);_0x13f850=this['getUniqueFacets'](_0x53817d);}const {key:_0x1936e8,granularity:_0x16ad5a,range:_0x374e4d,end:_0x469378,start:_0x370d60}=_0x7e6cfc;this['validateOptions'](_0x7e6cfc);let _0x12c93b=[];_0x13f850['forEach'](_0x5d1cda=>{const _0x265337=this['generateDateTimeSets'](_0x16ad5a,_0x374e4d,_0x469378,_0x370d60);_0x12c93b=_0x12c93b['concat'](_0x265337['map'](_0x1578b6=>this['buildRedisKey'](_0x1936e8,_0x1578b6,'index:'+_0x5d1cda)));});const _0x5ea993=await this['store']['getJobIds'](_0x12c93b,_0x4a3ccb),_0x3ca3fb=this['buildIdsResponse'](_0x5ea993,_0x7e6cfc,_0x13f850);return _0x3ca3fb;}['buildIdsResponse'](_0x936d7f,_0x27dbcd,_0x50b0f0){const _0x58bdb3={},_0x1c88bf=Object['keys'](_0x936d7f);_0x1c88bf['forEach'](_0x1f5c30=>{const _0x165ada=this['getTargetForKey'](_0x1f5c30),_0x394d4c=_0x936d7f[_0x1f5c30]['length'];_0x58bdb3[_0x165ada]?_0x58bdb3[_0x165ada]+=_0x394d4c:_0x58bdb3[_0x165ada]=_0x394d4c;});const _0x340547=Object['entries'](_0x58bdb3)['map'](([_0x991e37,_0x2701ba])=>({'facet':_0x991e37,'count':_0x2701ba})),_0x1f5468={'key':_0x27dbcd['key'],'facets':_0x50b0f0,'granularity':_0x27dbcd['granularity'],'range':_0x27dbcd['range'],'start':_0x27dbcd['start'],'counts':_0x340547,'segments':this['buildTimeSegments'](_0x936d7f)};return _0x1f5468;}['buildTimeSegments'](_0x4a3155){const _0x478158=Object['keys'](_0x4a3155),_0x180224={};_0x478158['forEach'](_0x165d96=>{const _0x149b1c={'type':'ids','target':this['getTargetForKey'](_0x165d96),'time':this['isoTimestampFromKeyTimestamp'](this['getTargetForTime'](_0x165d96)),'count':_0x4a3155[_0x165d96]['length'],'ids':_0x4a3155[_0x165d96]};_0x180224[_0x149b1c['time']]?_0x180224[_0x149b1c['time']]['push'](_0x149b1c):_0x180224[_0x149b1c['time']]=[_0x149b1c];});const _0x5c07e8=Object['entries'](_0x180224)['map'](([_0x516fcb,_0x8b467])=>({'time':_0x516fcb,'measures':_0x8b467}));return _0x5c07e8;}['getUniqueFacets'](_0x2c541f){const _0x4f5f14=_0x2c541f['measures']['map'](_0x2bc321=>_0x2bc321['target']);return Array['from'](new Set(_0x4f5f14));}['getTargetForKey'](_0x20f49d){return _0x20f49d['split'](':index:')[0x1];}['getTargetForTime'](_0x5e7e00){return _0x5e7e00['split'](':index:')[0x0];}async['getWorkItems'](_0x465126,_0x4e5c22){if(!_0x4e5c22['length']){const _0x3a3fce=await this['getStats'](_0x465126);_0x4e5c22=this['getUniqueFacets'](_0x3a3fce);}const {key:_0x4f2823,granularity:_0x3d5229,range:_0x57f303,end:_0x51012b,start:_0x1cea2f}=_0x465126;this['validateOptions'](_0x465126);let _0x41be47=[];_0x4e5c22['forEach'](_0x2a8da0=>{const _0x427e61=this['generateDateTimeSets'](_0x3d5229,_0x57f303,_0x51012b,_0x1cea2f);_0x41be47=_0x41be47['concat'](_0x427e61['map'](_0x2c858b=>this['buildRedisKey'](_0x4f2823,_0x2c858b,'index:'+_0x2a8da0)));});const _0x4c9827=await this['store']['getJobIds'](_0x41be47,[0x0,0x1]),_0x470766=this['buildWorkerLists'](_0x4c9827);return _0x470766;}['buildWorkerLists'](_0x30f5ff){const _0x1dd0ec=[];for(const _0x2bf919 in _0x30f5ff){_0x30f5ff[_0x2bf919]['length']&&_0x1dd0ec['push'](_0x2bf919);}return _0x1dd0ec;}['resolveTriggerStatistics']({stats:_0x26244d},_0x2f87c2){const _0x1863eb={'general':[],'index':[],'median':[]};_0x1863eb['general']['push']({'metric':'count','target':'count','value':0x1});for(const _0x30fe23 of _0x26244d['measures']){const _0x43540a=this['resolveMetric']({'metric':_0x30fe23['measure'],'target':_0x30fe23['target']},_0x2f87c2);if(this['isGeneralMetric'](_0x30fe23['measure']))_0x1863eb['general']['push'](_0x43540a);else{if(this['isMedianMetric'](_0x30fe23['measure']))_0x1863eb['median']['push'](_0x43540a);else this['isIndexMetric'](_0x30fe23['measure'])&&_0x1863eb['index']['push'](_0x43540a);}}return _0x1863eb;}['isGeneralMetric'](_0x11d9c2){return ReporterService['isGeneralMetric'](_0x11d9c2);}['isMedianMetric'](_0x56a5ce){return ReporterService['isMedianMetric'](_0x56a5ce);}['isIndexMetric'](_0x81a85d){return ReporterService['isIndexMetric'](_0x81a85d);}static['isGeneralMetric'](_0x3e40c9){return _0x3e40c9==='sum'||_0x3e40c9==='avg'||_0x3e40c9==='count';}static['isMedianMetric'](_0x2cd0a3){return _0x2cd0a3==='mdn';}static['isIndexMetric'](_0x3d85c5){return _0x3d85c5==='index';}['resolveMetric']({metric:_0x2ddba3,target:_0x4b937d},_0x2d4758){const _0x1622f2=new pipe_1['Pipe']([[_0x4b937d]],_0x2d4758),_0x2212d4=_0x1622f2['process']()['toString'](),_0x2cba1f=this['resolveTarget'](_0x2ddba3,_0x4b937d,_0x2212d4);if(_0x2ddba3==='index')return{'metric':_0x2ddba3,'target':_0x2cba1f,'value':_0x2d4758['metadata']['jid']};else{if(_0x2ddba3==='count')return{'metric':_0x2ddba3,'target':_0x2cba1f,'value':0x1};}return{'metric':_0x2ddba3,'target':_0x2cba1f,'value':_0x2212d4};}['isCardinalMetric'](_0x3573d2){return _0x3573d2==='index'||_0x3573d2==='count';}['resolveTarget'](_0x20955f,_0x3c3b03,_0x13b56a){const _0x537b4c=_0x3c3b03['substring'](0x1,_0x3c3b03['length']-0x1),_0x307976=_0x537b4c['split']('.')['slice'](0x3)['join']('/');let _0x4fb4d1;return this['isCardinalMetric'](_0x20955f)?_0x4fb4d1=_0x20955f+':'+_0x307976+':'+_0x13b56a:_0x4fb4d1=_0x20955f+':'+_0x307976,_0x4fb4d1;}}exports['ReporterService']=ReporterService,ReporterService['DEFAULT_GRANULARITY']='5m';function _0x2bb5(){const _0x39f5bc=['1107915OhKaGC','96JcTBKF','205322KNcIry','48084dOtjKK','24kBkAGj','6AEjuAo','75568Aclqae','11wQGyfW','181827qrsHKc','111yMQQay','569650ScNDjS','203JNTdzY','4222sUvaob'];_0x2bb5=function(){return _0x39f5bc;};return _0x2bb5();}
|
|
1
|
+
'use strict';(function(_0x21393d,_0x5e49ff){const _0x237759=_0x295b,_0x246dbf=_0x21393d();while(!![]){try{const _0xd0ad2a=-parseInt(_0x237759(0x1d3))/0x1+parseInt(_0x237759(0x1ce))/0x2+-parseInt(_0x237759(0x1d4))/0x3*(parseInt(_0x237759(0x1d0))/0x4)+-parseInt(_0x237759(0x1d2))/0x5+-parseInt(_0x237759(0x1d5))/0x6+-parseInt(_0x237759(0x1d1))/0x7*(parseInt(_0x237759(0x1cf))/0x8)+parseInt(_0x237759(0x1d7))/0x9*(parseInt(_0x237759(0x1d6))/0xa);if(_0xd0ad2a===_0x5e49ff)break;else _0x246dbf['push'](_0x246dbf['shift']());}catch(_0x50288a){_0x246dbf['push'](_0x246dbf['shift']());}}}(_0x1030,0xf0bbf));function _0x1030(){const _0x17a17e=['12918WpDyUs','11188620DviOMT','6190quTiHn','84294nBZDUg','2068804EbnpyI','593392cvkUZU','796mYRGdq','49NvNPxj','5091155OmnVqS','1586796EagSXd'];_0x1030=function(){return _0x17a17e;};return _0x1030();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ReporterService']=void 0x0;const pipe_1=require('../pipe');class ReporterService{constructor(_0x432874,_0x3c23ff,_0x3e8406){this['appVersion']=_0x432874,this['logger']=_0x3e8406,this['store']=_0x3c23ff;}async['getStats'](_0x7214c){this['logger']['debug']('reporter-getstats-started',_0x7214c);const {key:_0x3dabf1,granularity:_0x36b59b,range:_0x5d108d,end:_0x142f30,start:_0x6738ff}=_0x7214c;this['validateOptions'](_0x7214c);const _0x2b5b16=this['generateDateTimeSets'](_0x36b59b,_0x5d108d,_0x142f30,_0x6738ff),_0x47959a=_0x2b5b16['map'](_0x287bac=>this['buildRedisKey'](_0x3dabf1,_0x287bac)),_0x4a5e3f=await this['store']['getJobStats'](_0x47959a),[_0x2875bd,_0x86d1b7]=this['aggregateData'](_0x4a5e3f),_0x1d38c5=this['buildStatsResponse'](_0x4a5e3f,_0x47959a,_0x86d1b7,_0x2875bd,_0x7214c);return _0x1d38c5;}['validateOptions'](_0x587dd6){const {start:_0x48c0e8,end:_0x5e93b9,range:_0x55b24c,granularity:_0x4a5055}=_0x587dd6;if(_0x4a5055!=='infinity'&&(_0x48c0e8&&_0x5e93b9&&_0x55b24c||!_0x48c0e8&&!_0x5e93b9&&!_0x55b24c))throw new Error('Invalid\x20combination\x20of\x20start,\x20end,\x20and\x20range\x20values.\x20Provide\x20either\x20start+end,\x20end+range,\x20or\x20start+range.');}['generateDateTimeSets'](_0x2f773e,_0x2b28c8,_0x95f1d4,_0x5cc7ef){if(_0x2f773e==='infinity')return['0'];!_0x2b28c8&&(_0x2b28c8='0m');const _0x1fb320={'5m':0x5,'10m':0xa,'15m':0xf,'30m':0x1e,'1h':0x3c},_0x34cbb3=_0x1fb320[_0x2f773e];if(!_0x34cbb3)throw new Error('Invalid\x20granularity\x20value.');const _0x3657ba=this['convertRangeToMinutes'](_0x2b28c8);if(_0x3657ba===null)throw new Error('Invalid\x20range\x20value.');let _0x2c1448,_0x39f9f7;_0x5cc7ef?(_0x2c1448=new Date(_0x5cc7ef),_0x39f9f7=new Date(_0x2c1448['getTime']()+_0x3657ba*0x3c*0x3e8)):(_0x39f9f7=_0x95f1d4==='NOW'?new Date():new Date(_0x95f1d4),_0x2c1448=new Date(_0x39f9f7['getTime']()-_0x3657ba*0x3c*0x3e8));_0x2c1448['setUTCMinutes'](Math['floor'](_0x2c1448['getUTCMinutes']()/_0x34cbb3)*_0x34cbb3);const _0x927174=[];for(let _0x2dc871=_0x2c1448;_0x2dc871<=_0x39f9f7;_0x2dc871['setUTCMinutes'](_0x2dc871['getUTCMinutes']()+_0x34cbb3)){const _0x3c9c56=[_0x2dc871['getUTCFullYear'](),String(_0x2dc871['getUTCMonth']()+0x1)['padStart'](0x2,'0'),String(_0x2dc871['getUTCDate']())['padStart'](0x2,'0'),String(_0x2dc871['getUTCHours']())['padStart'](0x2,'0'),String(_0x2dc871['getUTCMinutes']())['padStart'](0x2,'0')]['join']('');_0x927174['push'](_0x3c9c56);}return _0x927174;}['convertRangeToMinutes'](_0x289acc){const _0x21c3ab=_0x289acc['slice'](-0x1),_0x3b32ac=parseInt(_0x289acc['slice'](0x0,-0x1),0xa);if(isNaN(_0x3b32ac))return null;switch(_0x21c3ab){case'm':return _0x3b32ac;case'h':return _0x3b32ac*0x3c;case'd':return _0x3b32ac*0x3c*0x18;default:return null;}}['buildRedisKey'](_0x459114,_0x4395e9,_0x3f03ba=''){return'hmsh:'+this['appVersion']['id']+':s:'+_0x459114+':'+_0x4395e9+(_0x3f03ba?':'+_0x3f03ba:'');}['aggregateData'](_0x420276){const _0x1a1652={};let _0x3f8408=0x0;return Object['entries'](_0x420276)['forEach'](([_0x51a895,_0x34a833])=>{for(const _0x36867c in _0x34a833){if(_0x36867c['startsWith']('count:')){const _0x2ffbe8=_0x36867c['slice']('count:'['length']);!_0x1a1652[_0x2ffbe8]&&(_0x1a1652[_0x2ffbe8]=0x0),_0x1a1652[_0x2ffbe8]+=_0x34a833[_0x36867c];}else _0x36867c==='count'&&(_0x3f8408+=_0x34a833[_0x36867c]);}}),[_0x3f8408,_0x1a1652];}['buildStatsResponse'](_0x46a126,_0x5b3b4f,_0x1fcaf9,_0x2f78c6,_0x15180a){const _0xf44233=[],_0x578c11=Object['keys'](_0x1fcaf9)['filter'](_0x13eb15=>_0x13eb15!=='count');let _0x1416e9=undefined;_0x15180a['sparse']!==!![]&&(_0x1416e9=this['handleSegments'](_0x46a126,_0x5b3b4f));_0x578c11['forEach'](_0x237c30=>{const _0x4ac9f2={'target':_0x237c30,'type':'count','value':_0x1fcaf9[_0x237c30]};_0xf44233['push'](_0x4ac9f2);});const _0x4f42e6={'key':_0x15180a['key'],'granularity':_0x15180a['granularity'],'range':_0x15180a['range'],'end':_0x15180a['end'],'count':_0x2f78c6,'measures':_0xf44233};return _0x1416e9&&(_0x4f42e6['segments']=_0x1416e9),_0x4f42e6;}['handleSegments'](_0x49c5c8,_0x4448f8){const _0x582caf=[];return _0x4448f8['forEach']((_0x3d99b2,_0x14b0ec)=>{const _0x527936=[];_0x49c5c8[_0x3d99b2]&&Object['entries'](_0x49c5c8[_0x3d99b2])['forEach'](([_0x50ae4c,_0x5460c6])=>{if(_0x50ae4c['startsWith']('count:')){const _0x539e55=_0x50ae4c['slice']('count:'['length']);_0x527936['push']({'target':_0x539e55,'type':'count','value':_0x5460c6});}});const _0x3f320b=this['isoTimestampFromKeyTimestamp'](_0x3d99b2),_0x574de9=_0x49c5c8[_0x3d99b2]?_0x49c5c8[_0x3d99b2]['count']:0x0;_0x582caf['push']({'count':_0x574de9,'time':_0x3f320b,'measures':_0x527936});}),_0x582caf;}['isoTimestampFromKeyTimestamp'](_0x1683aa){if(_0x1683aa['endsWith'](':'))return'0';const _0x1405d1=_0x1683aa['slice'](-0xc),_0x32040f=_0x1405d1['slice'](0x0,0x4),_0x2df36d=_0x1405d1['slice'](0x4,0x6),_0x2c04a1=_0x1405d1['slice'](0x6,0x8),_0x30a6bb=_0x1405d1['slice'](0x8,0xa),_0xdda9d5=_0x1405d1['slice'](0xa,0xc);return _0x32040f+'-'+_0x2df36d+'-'+_0x2c04a1+'T'+_0x30a6bb+':'+_0xdda9d5+'Z';}async['getIds'](_0x47a338,_0x8f1f12,_0xf26a83=[0x0,-0x1]){if(!_0x8f1f12['length']){const _0x26a560=await this['getStats'](_0x47a338);_0x8f1f12=this['getUniqueFacets'](_0x26a560);}const {key:_0x1ae855,granularity:_0x32c218,range:_0x27d4dc,end:_0x5add2c,start:_0x19f7c5}=_0x47a338;this['validateOptions'](_0x47a338);let _0x42b50a=[];_0x8f1f12['forEach'](_0x58245e=>{const _0x2de955=this['generateDateTimeSets'](_0x32c218,_0x27d4dc,_0x5add2c,_0x19f7c5);_0x42b50a=_0x42b50a['concat'](_0x2de955['map'](_0x501026=>this['buildRedisKey'](_0x1ae855,_0x501026,'index:'+_0x58245e)));});const _0x438a31=await this['store']['getJobIds'](_0x42b50a,_0xf26a83),_0x2832c1=this['buildIdsResponse'](_0x438a31,_0x47a338,_0x8f1f12);return _0x2832c1;}['buildIdsResponse'](_0x1c4f59,_0x23301c,_0x21c715){const _0x458574={},_0x2d3d8e=Object['keys'](_0x1c4f59);_0x2d3d8e['forEach'](_0x32220b=>{const _0x1033a4=this['getTargetForKey'](_0x32220b),_0x715170=_0x1c4f59[_0x32220b]['length'];_0x458574[_0x1033a4]?_0x458574[_0x1033a4]+=_0x715170:_0x458574[_0x1033a4]=_0x715170;});const _0x406307=Object['entries'](_0x458574)['map'](([_0x52faac,_0x2063ac])=>({'facet':_0x52faac,'count':_0x2063ac})),_0x57c8f9={'key':_0x23301c['key'],'facets':_0x21c715,'granularity':_0x23301c['granularity'],'range':_0x23301c['range'],'start':_0x23301c['start'],'counts':_0x406307,'segments':this['buildTimeSegments'](_0x1c4f59)};return _0x57c8f9;}['buildTimeSegments'](_0x21d437){const _0x3e7241=Object['keys'](_0x21d437),_0xc676c6={};_0x3e7241['forEach'](_0x176b5b=>{const _0xbb3a29={'type':'ids','target':this['getTargetForKey'](_0x176b5b),'time':this['isoTimestampFromKeyTimestamp'](this['getTargetForTime'](_0x176b5b)),'count':_0x21d437[_0x176b5b]['length'],'ids':_0x21d437[_0x176b5b]};_0xc676c6[_0xbb3a29['time']]?_0xc676c6[_0xbb3a29['time']]['push'](_0xbb3a29):_0xc676c6[_0xbb3a29['time']]=[_0xbb3a29];});const _0x8e5c11=Object['entries'](_0xc676c6)['map'](([_0x986c2b,_0xc773d6])=>({'time':_0x986c2b,'measures':_0xc773d6}));return _0x8e5c11;}['getUniqueFacets'](_0x3a772e){const _0x4e5604=_0x3a772e['measures']['map'](_0x4dafb5=>_0x4dafb5['target']);return Array['from'](new Set(_0x4e5604));}['getTargetForKey'](_0x5cb85d){return _0x5cb85d['split'](':index:')[0x1];}['getTargetForTime'](_0x11c368){return _0x11c368['split'](':index:')[0x0];}async['getWorkItems'](_0xf8fcc5,_0x4d3b7d){if(!_0x4d3b7d['length']){const _0xa7eb15=await this['getStats'](_0xf8fcc5);_0x4d3b7d=this['getUniqueFacets'](_0xa7eb15);}const {key:_0x1f5bf6,granularity:_0x311f4e,range:_0x187ebd,end:_0x4811d4,start:_0x4fbf5e}=_0xf8fcc5;this['validateOptions'](_0xf8fcc5);let _0x5f41c8=[];_0x4d3b7d['forEach'](_0x37d77c=>{const _0x5b7c4b=this['generateDateTimeSets'](_0x311f4e,_0x187ebd,_0x4811d4,_0x4fbf5e);_0x5f41c8=_0x5f41c8['concat'](_0x5b7c4b['map'](_0x8fb3af=>this['buildRedisKey'](_0x1f5bf6,_0x8fb3af,'index:'+_0x37d77c)));});const _0x382bbf=await this['store']['getJobIds'](_0x5f41c8,[0x0,0x1]),_0xdd3546=this['buildWorkerLists'](_0x382bbf);return _0xdd3546;}['buildWorkerLists'](_0x411150){const _0x3d5919=[];for(const _0x4c5e47 in _0x411150){_0x411150[_0x4c5e47]['length']&&_0x3d5919['push'](_0x4c5e47);}return _0x3d5919;}['resolveTriggerStatistics']({stats:_0x251504},_0x59a49e){const _0x300f85={'general':[],'index':[],'median':[]};_0x300f85['general']['push']({'metric':'count','target':'count','value':0x1});for(const _0x34dc4d of _0x251504['measures']){const _0x47cade=this['resolveMetric']({'metric':_0x34dc4d['measure'],'target':_0x34dc4d['target']},_0x59a49e);if(this['isGeneralMetric'](_0x34dc4d['measure']))_0x300f85['general']['push'](_0x47cade);else{if(this['isMedianMetric'](_0x34dc4d['measure']))_0x300f85['median']['push'](_0x47cade);else this['isIndexMetric'](_0x34dc4d['measure'])&&_0x300f85['index']['push'](_0x47cade);}}return _0x300f85;}['isGeneralMetric'](_0xf6e371){return ReporterService['isGeneralMetric'](_0xf6e371);}['isMedianMetric'](_0x394fdb){return ReporterService['isMedianMetric'](_0x394fdb);}['isIndexMetric'](_0x2e8fc7){return ReporterService['isIndexMetric'](_0x2e8fc7);}static['isGeneralMetric'](_0x4aa0c2){return _0x4aa0c2==='sum'||_0x4aa0c2==='avg'||_0x4aa0c2==='count';}static['isMedianMetric'](_0x30a2ad){return _0x30a2ad==='mdn';}static['isIndexMetric'](_0x262af3){return _0x262af3==='index';}['resolveMetric']({metric:_0x58c985,target:_0x26fb16},_0x3e0e98){const _0x25dbc0=new pipe_1['Pipe']([[_0x26fb16]],_0x3e0e98),_0xc51851=_0x25dbc0['process']()['toString'](),_0x1796ee=this['resolveTarget'](_0x58c985,_0x26fb16,_0xc51851);if(_0x58c985==='index')return{'metric':_0x58c985,'target':_0x1796ee,'value':_0x3e0e98['metadata']['jid']};else{if(_0x58c985==='count')return{'metric':_0x58c985,'target':_0x1796ee,'value':0x1};}return{'metric':_0x58c985,'target':_0x1796ee,'value':_0xc51851};}['isCardinalMetric'](_0x1f121c){return _0x1f121c==='index'||_0x1f121c==='count';}['resolveTarget'](_0x5e47f7,_0x391d88,_0x20286d){const _0x88da5c=_0x391d88['substring'](0x1,_0x391d88['length']-0x1),_0x511378=_0x88da5c['split']('.')['slice'](0x3)['join']('/');let _0x590a51;return this['isCardinalMetric'](_0x5e47f7)?_0x590a51=_0x5e47f7+':'+_0x511378+':'+_0x20286d:_0x590a51=_0x5e47f7+':'+_0x511378,_0x590a51;}}function _0x295b(_0x1d2a64,_0x396383){const _0x1030c2=_0x1030();return _0x295b=function(_0x295bab,_0x4d5066){_0x295bab=_0x295bab-0x1ce;let _0x8cb7=_0x1030c2[_0x295bab];return _0x8cb7;},_0x295b(_0x1d2a64,_0x396383);}exports['ReporterService']=ReporterService,ReporterService['DEFAULT_GRANULARITY']='5m';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(_0x1af5f2,_0xf492a7){const _0x4ab88a=_0x539e,_0x3ef0ba=_0x1af5f2();while(!![]){try{const _0x1ad598=-parseInt(_0x4ab88a(0xe1))/0x1+-parseInt(_0x4ab88a(0xdd))/0x2*(-parseInt(_0x4ab88a(0xdf))/0x3)+parseInt(_0x4ab88a(0xda))/0x4*(-parseInt(_0x4ab88a(0xdb))/0x5)+parseInt(_0x4ab88a(0xe3))/0x6+parseInt(_0x4ab88a(0xe4))/0x7*(parseInt(_0x4ab88a(0xe0))/0x8)+parseInt(_0x4ab88a(0xdc))/0x9*(parseInt(_0x4ab88a(0xe2))/0xa)+parseInt(_0x4ab88a(0xde))/0xb;if(_0x1ad598===_0xf492a7)break;else _0x3ef0ba['push'](_0x3ef0ba['shift']());}catch(_0x1b9798){_0x3ef0ba['push'](_0x3ef0ba['shift']());}}}(_0x2466,0x864a6));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Router']=void 0x0;const enums_1=require('../../modules/enums'),key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');function _0x539e(_0x20c91e,_0x165886){const _0x24666d=_0x2466();return _0x539e=function(_0x539e9f,_0x3bc91f){_0x539e9f=_0x539e9f-0xda;let _0x27f0e1=_0x24666d[_0x539e9f];return _0x27f0e1;},_0x539e(_0x20c91e,_0x165886);}class Router{constructor(_0x43a539,_0x2fef02,_0x1b0a56){this['throttle']=0x0,this['errorCount']=0x0,this['counts']={},this['currentTimerId']=null,this['sleepPromiseResolve']=null,this['innerPromiseResolve']=null,this['isSleeping']=![],this['sleepTimout']=null,this['appId']=_0x43a539['appId'],this['guid']=_0x43a539['guid'],this['role']=_0x43a539['role'],this['topic']=_0x43a539['topic'],this['stream']=_0x2fef02,this['throttle']=_0x43a539['throttle'],this['reclaimDelay']=_0x43a539['reclaimDelay']||enums_1['HMSH_XCLAIM_DELAY_MS'],this['reclaimCount']=_0x43a539['reclaimCount']||enums_1['HMSH_XCLAIM_COUNT'],this['logger']=_0x1b0a56,this['readonly']=_0x43a539['readonly']||![],this['resetThrottleState']();}['resetThrottleState'](){this['sleepPromiseResolve']=null,this['innerPromiseResolve']=null,this['isSleeping']=![],this['sleepTimout']=null;}async['createGroup'](_0x197aa2,_0xa7f9b4){try{await this['stream']['createConsumerGroup'](_0x197aa2,_0xa7f9b4);}catch(_0xd3de61){this['logger']['debug']('router-stream-group-exists',{'stream':_0x197aa2,'group':_0xa7f9b4});}}async['publishMessage'](_0x1cdc46,_0x55fcb8,_0x12056e){const _0x110707=_0x55fcb8?.['code']||'200';this['counts'][_0x110707]=(this['counts'][_0x110707]||0x0)+0x1;const _0x3cf3b8=this['stream']['mintKey'](key_1['KeyType']['STREAMS'],{'topic':_0x1cdc46}),_0x3382a6=await this['stream']['publishMessages'](_0x3cf3b8,[JSON['stringify'](_0x55fcb8)],{'transaction':_0x12056e});return _0x3382a6[0x0];}async['customSleep'](){if(this['throttle']===0x0)return;if(this['isSleeping'])return;this['isSleeping']=!![];const _0x2c1218=Date['now']();await new Promise(async _0x3a877e=>{this['sleepPromiseResolve']=_0x3a877e;let _0x539a6a=Date['now']()-_0x2c1218;while(_0x539a6a<this['throttle']){await new Promise(_0x82b54a=>{this['innerPromiseResolve']=_0x82b54a,this['sleepTimout']=setTimeout(_0x82b54a,this['throttle']-_0x539a6a);}),_0x539a6a=Date['now']()-_0x2c1218;}this['resetThrottleState'](),_0x3a877e();});}async['consumeMessages'](_0x4bfd12,_0xf654a,_0x3be255,_0x22a410){if(this['readonly']){this['logger']['info']('router-stream-readonly',{'group':_0xf654a,'consumer':_0x3be255,'stream':_0x4bfd12});return;}this['logger']['info']('router-stream-starting',{'group':_0xf654a,'consumer':_0x3be255,'stream':_0x4bfd12}),Router['instances']['add'](this),this['shouldConsume']=!![],await this['createGroup'](_0x4bfd12,_0xf654a);let _0x19de63=Date['now']();async function _0x497d2e(){await this['customSleep']();if(this['isStopped'](_0xf654a,_0x3be255,_0x4bfd12))return;else{if(this['isPaused']()){setImmediate(_0x497d2e['bind'](this));return;}}const _0x2d9299=enums_1['HMSH_BLOCK_TIME_MS']+Math['round'](enums_1['HMSH_BLOCK_TIME_MS']*Math['random']());try{const _0x5675fd=await this['stream']['consumeMessages'](_0x4bfd12,_0xf654a,_0x3be255,{'blockTimeout':_0x2d9299});if(this['isStopped'](_0xf654a,_0x3be255,_0x4bfd12))return;else{if(this['isPaused']()){setImmediate(_0x497d2e['bind'](this));return;}}for(let _0x12fa8e=0x0;_0x12fa8e<_0x5675fd['length'];_0x12fa8e++){const _0x58bfa6=_0x5675fd[_0x12fa8e];await this['consumeOne'](_0x4bfd12,_0xf654a,_0x58bfa6['id'],_0x58bfa6['data'],_0x22a410);}const _0x5c5c5c=Date['now']();if(this['stream']['getProviderSpecificFeatures']()['supportsRetry']&&_0x5c5c5c-_0x19de63>this['reclaimDelay']){_0x19de63=_0x5c5c5c;const _0xdeb06e=await this['stream']['retryMessages'](_0x4bfd12,_0xf654a,{'consumerName':_0x3be255,'minIdleTime':this['reclaimDelay'],'limit':enums_1['HMSH_XPENDING_COUNT']});for(let _0x55e121=0x0;_0x55e121<_0xdeb06e['length'];_0x55e121++){const _0x45cace=_0xdeb06e[_0x55e121];await this['consumeOne'](_0x4bfd12,_0xf654a,_0x45cace['id'],_0x45cace['data'],_0x22a410);}}setImmediate(_0x497d2e['bind'](this));}catch(_0x521899){if(this['shouldConsume']&&process['env']['NODE_ENV']!=='test'){this['logger']['error']('router-stream-error',{'err':_0x521899,'stream':_0x4bfd12,'group':_0xf654a,'consumer':_0x3be255}),this['errorCount']++;const _0x20bf96=Math['min'](enums_1['HMSH_GRADUATED_INTERVAL_MS']*0x2**this['errorCount'],enums_1['HMSH_MAX_TIMEOUT_MS']);setTimeout(_0x497d2e['bind'](this),_0x20bf96);}}}_0x497d2e['call'](this);}['isStreamMessage'](_0x12ecc6){return Array['isArray'](_0x12ecc6)&&Array['isArray'](_0x12ecc6[0x0]);}['isPaused'](){return this['throttle']===enums_1['MAX_DELAY'];}['isStopped'](_0x511956,_0x2a8a78,_0x55f107){return!this['shouldConsume']&&this['logger']['info']('router-stream-stopped',{'group':_0x511956,'consumer':_0x2a8a78,'stream':_0x55f107}),!this['shouldConsume'];}async['consumeOne'](_0xf6bc1c,_0x19068a,_0xd4b8ab,_0x32d698,_0x5a250a){this['logger']['debug']('stream-read-one',{'group':_0x19068a,'stream':_0xf6bc1c,'id':_0xd4b8ab});let _0xbc1273,_0xd2fbf3;try{_0xd2fbf3=new telemetry_1['TelemetryService'](this['appId']),_0xd2fbf3['startStreamSpan'](_0x32d698,this['role']),_0xbc1273=await this['execStreamLeg'](_0x32d698,_0xf6bc1c,_0xd4b8ab,_0x5a250a['bind'](this)),_0xbc1273?.['status']===stream_1['StreamStatus']['ERROR']&&_0xd2fbf3['setStreamError']('Function\x20Status\x20Code\x20'+(_0xbc1273['code']||enums_1['HMSH_CODE_UNKNOWN'])),this['errorCount']=0x0;}catch(_0x5770f2){this['logger']['error']('stream-read-one-error',{'group':_0x19068a,'stream':_0xf6bc1c,'id':_0xd4b8ab,'err':_0x5770f2}),_0xd2fbf3['setStreamError'](_0x5770f2['message']);}const _0x7dcf05=await this['publishResponse'](_0x32d698,_0xbc1273);_0xd2fbf3['setStreamAttributes']({'app.worker.mid':_0x7dcf05}),await this['ackAndDelete'](_0xf6bc1c,_0x19068a,_0xd4b8ab),_0xd2fbf3['endStreamSpan'](),this['logger']['debug']('stream-read-one-end',{'group':_0x19068a,'stream':_0xf6bc1c,'id':_0xd4b8ab});}async['execStreamLeg'](_0x1e1b35,_0x6a4d48,_0x4805b1,_0x42e339){let _0x26e385;try{_0x26e385=await _0x42e339(_0x1e1b35);}catch(_0x5e67fc){this['logger']['error']('stream-call-function-error',{..._0x5e67fc,'input':_0x1e1b35,'stack':_0x5e67fc['stack'],'message':_0x5e67fc['message'],'name':_0x5e67fc['name'],'stream':_0x6a4d48,'id':_0x4805b1}),_0x26e385=this['structureUnhandledError'](_0x1e1b35,_0x5e67fc);}return _0x26e385;}async['ackAndDelete'](_0x46016c,_0x38e901,_0x2b7ef5){await this['stream']['ackAndDelete'](_0x46016c,_0x38e901,[_0x2b7ef5]);}async['publishResponse'](_0x22fdfd,_0x20d8d8){if(_0x20d8d8&&typeof _0x20d8d8==='object'){if(_0x20d8d8['status']==='error'){const [_0x19a3a2,_0x5f32e9]=this['shouldRetry'](_0x22fdfd,_0x20d8d8);if(_0x19a3a2)return await(0x0,utils_1['sleepFor'])(_0x5f32e9),await this['publishMessage'](_0x22fdfd['metadata']['topic'],{'data':_0x22fdfd['data'],'metadata':{..._0x22fdfd['metadata'],'try':(_0x22fdfd['metadata']['try']||0x0)+0x1},'policies':_0x22fdfd['policies']});else _0x20d8d8=this['structureError'](_0x22fdfd,_0x20d8d8);}else typeof _0x20d8d8['metadata']!=='object'?_0x20d8d8['metadata']={..._0x22fdfd['metadata'],'guid':(0x0,utils_1['guid'])()}:_0x20d8d8['metadata']['guid']=(0x0,utils_1['guid'])();return _0x20d8d8['type']=stream_1['StreamDataType']['RESPONSE'],await this['publishMessage'](null,_0x20d8d8);}}['shouldRetry'](_0x5e79f3,_0x5a1b20){const _0x342f76=_0x5e79f3['policies']?.['retry'],_0x75082=_0x5a1b20['code']['toString'](),_0x464320=_0x342f76?.[_0x75082],_0x42a878=_0x464320?.[0x0],_0x4318f9=Math['min'](_0x5e79f3['metadata']['try']||0x0,enums_1['HMSH_MAX_RETRIES']);if(_0x42a878>_0x4318f9)return[!![],Math['pow'](0xa,_0x4318f9+0x1)];return[![],0x0];}['structureUnhandledError'](_0x348c77,_0x380a5e){const _0x41eaa1={};return typeof _0x380a5e['message']==='string'?_0x41eaa1['message']=_0x380a5e['message']:_0x41eaa1['message']=enums_1['HMSH_STATUS_UNKNOWN'],typeof _0x380a5e['stack']==='string'&&(_0x41eaa1['stack']=_0x380a5e['stack']),typeof _0x380a5e['name']==='string'&&(_0x41eaa1['name']=_0x380a5e['name']),{'status':'error','code':enums_1['HMSH_CODE_UNKNOWN'],'metadata':{..._0x348c77['metadata'],'guid':(0x0,utils_1['guid'])()},'data':_0x41eaa1};}['structureUnacknowledgedError'](_0x5294a9){const _0xb06314='stream\x20message\x20max\x20delivery\x20count\x20exceeded',_0x51973e=enums_1['HMSH_CODE_UNACKED'],_0x2a5649={'message':_0xb06314,'code':_0x51973e},_0x5ea6bb={'metadata':{..._0x5294a9['metadata'],'guid':(0x0,utils_1['guid'])()},'status':stream_1['StreamStatus']['ERROR'],'code':_0x51973e,'data':_0x2a5649};return delete _0x5ea6bb['metadata']['topic'],_0x5ea6bb;}['structureError'](_0x353234,_0x301a2d){const _0x2aea86=_0x301a2d['data']?.['message']?_0x301a2d['data']?.['message']['toString']():enums_1['HMSH_STATUS_UNKNOWN'],_0x87cf88=_0x301a2d['code']||_0x301a2d['data']?.['code'],_0x1d8bd1=isNaN(_0x87cf88)?enums_1['HMSH_CODE_UNKNOWN']:parseInt(_0x87cf88['toString']()),_0xd32d4d=_0x301a2d['data']?.['stack']?_0x301a2d['data']?.['stack']['toString']():undefined,_0x520efb={'message':_0x2aea86,'code':_0x1d8bd1,'stack':_0xd32d4d};return typeof _0x301a2d['data']?.['error']==='object'&&(_0x520efb['error']={..._0x301a2d['data']['error']}),{'status':stream_1['StreamStatus']['ERROR'],'code':_0x1d8bd1,'stack':_0xd32d4d,'metadata':{..._0x353234['metadata'],'guid':(0x0,utils_1['guid'])()},'data':_0x520efb};}static async['stopConsuming'](){for(const _0x222bdd of[...Router['instances']]){_0x222bdd['stopConsuming']();}await(0x0,utils_1['sleepFor'])(enums_1['HMSH_BLOCK_TIME_MS']*0x2);}async['stopConsuming'](){this['shouldConsume']=![],this['logger']['info']('router-stream-stopping',this['topic']?{'topic':this['topic']}:undefined),this['cancelThrottle']();}['cancelThrottle'](){this['sleepTimout']&&clearTimeout(this['sleepTimout']),this['resetThrottleState']();}['setThrottle'](_0x4de1c8){if(!Number['isInteger'](_0x4de1c8)||_0x4de1c8<0x0||_0x4de1c8>enums_1['MAX_DELAY'])throw new Error('Throttle\x20must\x20be\x20a\x20non-negative\x20integer\x20and\x20not\x20exceed\x20'+enums_1['MAX_DELAY']+'\x20ms;\x20send\x20-1\x20to\x20throttle\x20indefinitely');const _0x50aca4=_0x4de1c8<this['throttle'];this['throttle']=_0x4de1c8,_0x50aca4&&(this['sleepTimout']&&clearTimeout(this['sleepTimout']),this['innerPromiseResolve']&&this['innerPromiseResolve']());}}function _0x2466(){const _0x55e546=['48rcVXfd','651346nXOtUk','20DuxObW','4640616nmnDmZ','38283DVDSDX','3664vfhAQO','4880upSJwV','546597wdTUAa','2itZazx','6930517tdmiYC','1612959tmHqOw'];_0x2466=function(){return _0x55e546;};return _0x2466();}exports['Router']=Router,Router['instances']=new Set();
|
|
1
|
+
'use strict';(function(_0x59295f,_0x9d8066){const _0x301af9=_0x5e6b,_0x16369f=_0x59295f();while(!![]){try{const _0x1fff9b=-parseInt(_0x301af9(0x1b5))/0x1*(parseInt(_0x301af9(0x1be))/0x2)+parseInt(_0x301af9(0x1b9))/0x3*(-parseInt(_0x301af9(0x1ba))/0x4)+parseInt(_0x301af9(0x1bb))/0x5+-parseInt(_0x301af9(0x1bc))/0x6*(parseInt(_0x301af9(0x1b6))/0x7)+-parseInt(_0x301af9(0x1bf))/0x8+parseInt(_0x301af9(0x1bd))/0x9*(parseInt(_0x301af9(0x1b8))/0xa)+-parseInt(_0x301af9(0x1c0))/0xb*(-parseInt(_0x301af9(0x1b7))/0xc);if(_0x1fff9b===_0x9d8066)break;else _0x16369f['push'](_0x16369f['shift']());}catch(_0x4e34b5){_0x16369f['push'](_0x16369f['shift']());}}}(_0x21da,0x79fbb));function _0x21da(){const _0x1253da=['2241318ymjqmF','4xZGjom','2762320zEidZc','825090JVFRwB','9441eKhfoI','81542DEdoFw','4899088FNVuab','11tEQZVi','7GUwYgK','35clKCDp','15548172LaIJnr','9380vnKtIL'];_0x21da=function(){return _0x1253da;};return _0x21da();}function _0x5e6b(_0x3a09bc,_0x4a0880){const _0x21da2a=_0x21da();return _0x5e6b=function(_0x5e6b6b,_0x52eb7e){_0x5e6b6b=_0x5e6b6b-0x1b5;let _0x4728c0=_0x21da2a[_0x5e6b6b];return _0x4728c0;},_0x5e6b(_0x3a09bc,_0x4a0880);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Router']=void 0x0;const enums_1=require('../../modules/enums'),key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');class Router{constructor(_0x291eb4,_0x13c632,_0x2df810){this['throttle']=0x0,this['errorCount']=0x0,this['counts']={},this['currentTimerId']=null,this['sleepPromiseResolve']=null,this['innerPromiseResolve']=null,this['isSleeping']=![],this['sleepTimout']=null,this['appId']=_0x291eb4['appId'],this['guid']=_0x291eb4['guid'],this['role']=_0x291eb4['role'],this['topic']=_0x291eb4['topic'],this['stream']=_0x13c632,this['throttle']=_0x291eb4['throttle'],this['reclaimDelay']=_0x291eb4['reclaimDelay']||enums_1['HMSH_XCLAIM_DELAY_MS'],this['reclaimCount']=_0x291eb4['reclaimCount']||enums_1['HMSH_XCLAIM_COUNT'],this['logger']=_0x2df810,this['readonly']=_0x291eb4['readonly']||![],this['resetThrottleState']();}['resetThrottleState'](){this['sleepPromiseResolve']=null,this['innerPromiseResolve']=null,this['isSleeping']=![],this['sleepTimout']=null;}async['createGroup'](_0x5deaa3,_0x203078){try{await this['stream']['createConsumerGroup'](_0x5deaa3,_0x203078);}catch(_0x1f87de){this['logger']['debug']('router-stream-group-exists',{'stream':_0x5deaa3,'group':_0x203078});}}async['publishMessage'](_0x29dae8,_0x2d1c5e,_0x237619){const _0xf46720=_0x2d1c5e?.['code']||'200';this['counts'][_0xf46720]=(this['counts'][_0xf46720]||0x0)+0x1;const _0x19ad09=this['stream']['mintKey'](key_1['KeyType']['STREAMS'],{'topic':_0x29dae8}),_0x375411=await this['stream']['publishMessages'](_0x19ad09,[JSON['stringify'](_0x2d1c5e)],{'transaction':_0x237619});return _0x375411[0x0];}async['customSleep'](){if(this['throttle']===0x0)return;if(this['isSleeping'])return;this['isSleeping']=!![];const _0x3115d6=Date['now']();await new Promise(async _0x2752ee=>{this['sleepPromiseResolve']=_0x2752ee;let _0x36d34b=Date['now']()-_0x3115d6;while(_0x36d34b<this['throttle']){await new Promise(_0x174d01=>{this['innerPromiseResolve']=_0x174d01,this['sleepTimout']=setTimeout(_0x174d01,this['throttle']-_0x36d34b);}),_0x36d34b=Date['now']()-_0x3115d6;}this['resetThrottleState'](),_0x2752ee();});}async['consumeMessages'](_0x3b2720,_0x48f238,_0x3a8dff,_0x371227){if(this['readonly']){this['logger']['info']('router-stream-readonly',{'group':_0x48f238,'consumer':_0x3a8dff,'stream':_0x3b2720});return;}this['logger']['info']('router-stream-starting',{'group':_0x48f238,'consumer':_0x3a8dff,'stream':_0x3b2720}),Router['instances']['add'](this),this['shouldConsume']=!![],await this['createGroup'](_0x3b2720,_0x48f238);let _0x1e89fc=Date['now']();async function _0x6155(){await this['customSleep']();if(this['isStopped'](_0x48f238,_0x3a8dff,_0x3b2720))return;else{if(this['isPaused']()){setImmediate(_0x6155['bind'](this));return;}}const _0x274683=enums_1['HMSH_BLOCK_TIME_MS']+Math['round'](enums_1['HMSH_BLOCK_TIME_MS']*Math['random']());try{const _0x24c6b4=await this['stream']['consumeMessages'](_0x3b2720,_0x48f238,_0x3a8dff,{'blockTimeout':_0x274683});if(this['isStopped'](_0x48f238,_0x3a8dff,_0x3b2720))return;else{if(this['isPaused']()){setImmediate(_0x6155['bind'](this));return;}}for(let _0x117bec=0x0;_0x117bec<_0x24c6b4['length'];_0x117bec++){const _0x4e05eb=_0x24c6b4[_0x117bec];await this['consumeOne'](_0x3b2720,_0x48f238,_0x4e05eb['id'],_0x4e05eb['data'],_0x371227);}const _0x303b42=Date['now']();if(this['stream']['getProviderSpecificFeatures']()['supportsRetry']&&_0x303b42-_0x1e89fc>this['reclaimDelay']){_0x1e89fc=_0x303b42;const _0x447c6c=await this['stream']['retryMessages'](_0x3b2720,_0x48f238,{'consumerName':_0x3a8dff,'minIdleTime':this['reclaimDelay'],'limit':enums_1['HMSH_XPENDING_COUNT']});for(let _0x19879c=0x0;_0x19879c<_0x447c6c['length'];_0x19879c++){const _0xeb3045=_0x447c6c[_0x19879c];await this['consumeOne'](_0x3b2720,_0x48f238,_0xeb3045['id'],_0xeb3045['data'],_0x371227);}}setImmediate(_0x6155['bind'](this));}catch(_0x26e626){if(this['shouldConsume']&&process['env']['NODE_ENV']!=='test'){this['logger']['error']('router-stream-error',{'err':_0x26e626,'stream':_0x3b2720,'group':_0x48f238,'consumer':_0x3a8dff}),this['errorCount']++;const _0x1c4a9a=Math['min'](enums_1['HMSH_GRADUATED_INTERVAL_MS']*0x2**this['errorCount'],enums_1['HMSH_MAX_TIMEOUT_MS']);setTimeout(_0x6155['bind'](this),_0x1c4a9a);}}}_0x6155['call'](this);}['isStreamMessage'](_0x5b49b8){return Array['isArray'](_0x5b49b8)&&Array['isArray'](_0x5b49b8[0x0]);}['isPaused'](){return this['throttle']===enums_1['MAX_DELAY'];}['isStopped'](_0x510c2c,_0x30737e,_0x23cd2b){return!this['shouldConsume']&&this['logger']['info']('router-stream-stopped',{'group':_0x510c2c,'consumer':_0x30737e,'stream':_0x23cd2b}),!this['shouldConsume'];}async['consumeOne'](_0xdfc523,_0x19b368,_0x5178f0,_0x14a547,_0x3db077){this['logger']['debug']('stream-read-one',{'group':_0x19b368,'stream':_0xdfc523,'id':_0x5178f0});let _0x29c773,_0x4acc67;try{_0x4acc67=new telemetry_1['TelemetryService'](this['appId']),_0x4acc67['startStreamSpan'](_0x14a547,this['role']),_0x29c773=await this['execStreamLeg'](_0x14a547,_0xdfc523,_0x5178f0,_0x3db077['bind'](this)),_0x29c773?.['status']===stream_1['StreamStatus']['ERROR']&&_0x4acc67['setStreamError']('Function\x20Status\x20Code\x20'+(_0x29c773['code']||enums_1['HMSH_CODE_UNKNOWN'])),this['errorCount']=0x0;}catch(_0x3967e4){this['logger']['error']('stream-read-one-error',{'group':_0x19b368,'stream':_0xdfc523,'id':_0x5178f0,'err':_0x3967e4}),_0x4acc67['setStreamError'](_0x3967e4['message']);}const _0x3aa3b3=await this['publishResponse'](_0x14a547,_0x29c773);_0x4acc67['setStreamAttributes']({'app.worker.mid':_0x3aa3b3}),await this['ackAndDelete'](_0xdfc523,_0x19b368,_0x5178f0),_0x4acc67['endStreamSpan'](),this['logger']['debug']('stream-read-one-end',{'group':_0x19b368,'stream':_0xdfc523,'id':_0x5178f0});}async['execStreamLeg'](_0x9243bb,_0x14a36c,_0x151034,_0x10531f){let _0xd9f750;try{_0xd9f750=await _0x10531f(_0x9243bb);}catch(_0x290348){this['logger']['error']('stream-call-function-error',{..._0x290348,'input':_0x9243bb,'stack':_0x290348['stack'],'message':_0x290348['message'],'name':_0x290348['name'],'stream':_0x14a36c,'id':_0x151034}),_0xd9f750=this['structureUnhandledError'](_0x9243bb,_0x290348);}return _0xd9f750;}async['ackAndDelete'](_0x4357b1,_0x4c35ee,_0x3668e7){await this['stream']['ackAndDelete'](_0x4357b1,_0x4c35ee,[_0x3668e7]);}async['publishResponse'](_0x4dde6d,_0x1988bb){if(_0x1988bb&&typeof _0x1988bb==='object'){if(_0x1988bb['status']==='error'){const [_0x354f2e,_0x4e6f5e]=this['shouldRetry'](_0x4dde6d,_0x1988bb);if(_0x354f2e)return await(0x0,utils_1['sleepFor'])(_0x4e6f5e),await this['publishMessage'](_0x4dde6d['metadata']['topic'],{'data':_0x4dde6d['data'],'metadata':{..._0x4dde6d['metadata'],'try':(_0x4dde6d['metadata']['try']||0x0)+0x1},'policies':_0x4dde6d['policies']});else _0x1988bb=this['structureError'](_0x4dde6d,_0x1988bb);}else typeof _0x1988bb['metadata']!=='object'?_0x1988bb['metadata']={..._0x4dde6d['metadata'],'guid':(0x0,utils_1['guid'])()}:_0x1988bb['metadata']['guid']=(0x0,utils_1['guid'])();return _0x1988bb['type']=stream_1['StreamDataType']['RESPONSE'],await this['publishMessage'](null,_0x1988bb);}}['shouldRetry'](_0x3d639e,_0x94dd76){const _0x233209=_0x3d639e['policies']?.['retry'],_0x3bfed2=_0x94dd76['code']['toString'](),_0x938952=_0x233209?.[_0x3bfed2],_0x9565b5=_0x938952?.[0x0],_0x212c95=Math['min'](_0x3d639e['metadata']['try']||0x0,enums_1['HMSH_MAX_RETRIES']);if(_0x9565b5>_0x212c95)return[!![],Math['pow'](0xa,_0x212c95+0x1)];return[![],0x0];}['structureUnhandledError'](_0x267fb8,_0x47fa54){const _0x209528={};return typeof _0x47fa54['message']==='string'?_0x209528['message']=_0x47fa54['message']:_0x209528['message']=enums_1['HMSH_STATUS_UNKNOWN'],typeof _0x47fa54['stack']==='string'&&(_0x209528['stack']=_0x47fa54['stack']),typeof _0x47fa54['name']==='string'&&(_0x209528['name']=_0x47fa54['name']),{'status':'error','code':enums_1['HMSH_CODE_UNKNOWN'],'metadata':{..._0x267fb8['metadata'],'guid':(0x0,utils_1['guid'])()},'data':_0x209528};}['structureUnacknowledgedError'](_0x37f6c8){const _0x217c77='stream\x20message\x20max\x20delivery\x20count\x20exceeded',_0x4e1ce1=enums_1['HMSH_CODE_UNACKED'],_0x32f650={'message':_0x217c77,'code':_0x4e1ce1},_0x8ed12a={'metadata':{..._0x37f6c8['metadata'],'guid':(0x0,utils_1['guid'])()},'status':stream_1['StreamStatus']['ERROR'],'code':_0x4e1ce1,'data':_0x32f650};return delete _0x8ed12a['metadata']['topic'],_0x8ed12a;}['structureError'](_0x8e1d90,_0xedcd47){const _0x1e950=_0xedcd47['data']?.['message']?_0xedcd47['data']?.['message']['toString']():enums_1['HMSH_STATUS_UNKNOWN'],_0x3040aa=_0xedcd47['code']||_0xedcd47['data']?.['code'],_0x25fad3=isNaN(_0x3040aa)?enums_1['HMSH_CODE_UNKNOWN']:parseInt(_0x3040aa['toString']()),_0x3c1071=_0xedcd47['data']?.['stack']?_0xedcd47['data']?.['stack']['toString']():undefined,_0x5c12d1={'message':_0x1e950,'code':_0x25fad3,'stack':_0x3c1071};return typeof _0xedcd47['data']?.['error']==='object'&&(_0x5c12d1['error']={..._0xedcd47['data']['error']}),{'status':stream_1['StreamStatus']['ERROR'],'code':_0x25fad3,'stack':_0x3c1071,'metadata':{..._0x8e1d90['metadata'],'guid':(0x0,utils_1['guid'])()},'data':_0x5c12d1};}static async['stopConsuming'](){for(const _0x5822ea of[...Router['instances']]){_0x5822ea['stopConsuming']();}await(0x0,utils_1['sleepFor'])(enums_1['HMSH_BLOCK_TIME_MS']*0x2);}async['stopConsuming'](){this['shouldConsume']=![],this['logger']['info']('router-stream-stopping',this['topic']?{'topic':this['topic']}:undefined),this['cancelThrottle']();}['cancelThrottle'](){this['sleepTimout']&&clearTimeout(this['sleepTimout']),this['resetThrottleState']();}['setThrottle'](_0x272e4c){if(!Number['isInteger'](_0x272e4c)||_0x272e4c<0x0||_0x272e4c>enums_1['MAX_DELAY'])throw new Error('Throttle\x20must\x20be\x20a\x20non-negative\x20integer\x20and\x20not\x20exceed\x20'+enums_1['MAX_DELAY']+'\x20ms;\x20send\x20-1\x20to\x20throttle\x20indefinitely');const _0x10cead=_0x272e4c<this['throttle'];this['throttle']=_0x272e4c,_0x10cead&&(this['sleepTimout']&&clearTimeout(this['sleepTimout']),this['innerPromiseResolve']&&this['innerPromiseResolve']());}}exports['Router']=Router,Router['instances']=new Set();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x48decd,_0x5e40b5){const _0x550264=_0x5a4c,_0x45f635=_0x48decd();while(!![]){try{const _0xeaa7f9=parseInt(_0x550264(0x19a))/0x1+-parseInt(_0x550264(0x19f))/0x2*(parseInt(_0x550264(0x1a0))/0x3)+-parseInt(_0x550264(0x19d))/0x4+parseInt(_0x550264(0x19c))/0x5+-parseInt(_0x550264(0x199))/0x6+parseInt(_0x550264(0x1a1))/0x7*(-parseInt(_0x550264(0x19b))/0x8)+parseInt(_0x550264(0x19e))/0x9*(parseInt(_0x550264(0x198))/0xa);if(_0xeaa7f9===_0x5e40b5)break;else _0x45f635['push'](_0x45f635['shift']());}catch(_0x24929b){_0x45f635['push'](_0x45f635['shift']());}}}(_0x4ef2,0xeb411));function _0x5a4c(_0x265fc8,_0x4fbf7a){const _0x4ef24e=_0x4ef2();return _0x5a4c=function(_0x5a4c9c,_0x49cc00){_0x5a4c9c=_0x5a4c9c-0x198;let _0xd5e8dd=_0x4ef24e[_0x5a4c9c];return _0xd5e8dd;},_0x5a4c(_0x265fc8,_0x4fbf7a);}function _0x4ef2(){const _0x15073a=['44751MeIfwh','21ZbXyoX','310qEUqvv','7774926vHGbjm','902504muLLjh','2116776WnszKr','5447070Wfywem','2321044XVusMB','1026585IjAdtl','254KXFSaA'];_0x4ef2=function(){return _0x15073a;};return _0x4ef2();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['PostgresSearchService']=void 0x0;const index_1=require('../../index'),kvsql_1=require('../../../store/providers/postgres/kvsql');class PostgresSearchService extends index_1['SearchService']{['transact'](){return this['storeClient']['transact']();}constructor(_0x34247d,_0x54ff5a){super(_0x34247d,_0x54ff5a),this['pgClient']=_0x34247d,this['searchClient']=new kvsql_1['KVSQL'](_0x34247d,this['namespace'],this['appId']);}async['init'](_0x49ee61,_0x21b61f,_0x2863af){this['searchClient']['namespace']=this['namespace']=_0x49ee61,this['searchClient']['appId']=this['appId']=_0x21b61f,this['namespace']=_0x49ee61,this['appId']=_0x21b61f,this['logger']=_0x2863af;}async['createSearchIndex'](_0x757d85,_0x11cb97,_0x5229ee){}async['listSearchIndexes'](){return[];}async['setFields'](_0x542c11,_0x4c0bf4){try{const _0x1024f4=await this['searchClient']['hset'](_0x542c11,_0x4c0bf4);return Number(_0x1024f4);}catch(_0x367927){this['logger']['error']('postgres-search-set-fields-error',{'key':_0x542c11,..._0x367927});throw _0x367927;}}async['getField'](_0x345d92,_0x292153){try{return await this['searchClient']['hget'](_0x345d92,_0x292153);}catch(_0x45953b){this['logger']['error']('postgres-search-get-field-error',{'key':_0x345d92,'field':_0x292153,..._0x45953b});throw _0x45953b;}}async['getFields'](_0x6fdd9c,_0x4360ec){try{return await this['searchClient']['hmget'](_0x6fdd9c,[..._0x4360ec]);}catch(_0x5c2006){this['logger']['error']('postgres-search-get-fields-error',{'key':_0x6fdd9c,'fields':_0x4360ec,..._0x5c2006});throw _0x5c2006;}}async['getAllFields'](_0x57042d){try{return await this['searchClient']['hgetall'](_0x57042d);}catch(_0x200af3){this['logger']['error']('postgres-search-get-all-fields-error',{'key':_0x57042d,..._0x200af3});throw _0x200af3;}}async['deleteFields'](_0x5594f2,_0x4c0935){try{const _0x330540=await this['searchClient']['hdel'](_0x5594f2,..._0x4c0935);return Number(_0x330540);}catch(_0x234ee0){this['logger']['error']('postgres-delete-fields-error',{'key':_0x5594f2,'fields':_0x4c0935,..._0x234ee0});throw _0x234ee0;}}async['incrementFieldByFloat'](_0x24c732,_0x2d21cb,_0x910cfd){try{const _0x198e80=await this['searchClient']['hincrbyfloat'](_0x24c732,_0x2d21cb,_0x910cfd);return Number(_0x198e80);}catch(_0x487209){this['logger']['error']('postgres-increment-field-error',{'key':_0x24c732,'field':_0x2d21cb,..._0x487209});throw _0x487209;}}async['sendQuery'](_0x1a16fb){try{return await this['pgClient']['query'](_0x1a16fb);}catch(_0x3aebfa){this['logger']['error']('postgres-send-query-error',{'query':_0x1a16fb,..._0x3aebfa});throw _0x3aebfa;}}async['sendIndexedQuery'](_0x2a5bc4,_0x5d9b96=[]){const [_0x5bd341,..._0x344491]=_0x5d9b96;try{const _0x4d1e8e=await this['pgClient']['query'](_0x5bd341,_0x344491['length']?_0x344491:undefined);return _0x4d1e8e['rows'];}catch(_0x4ebec6){console['error']('error',_0x4ebec6),this['logger']['error']('postgres-send-indexed-query-error',{'query':_0x5bd341,..._0x4ebec6});throw _0x4ebec6;}}}exports['PostgresSearchService']=PostgresSearchService;
|