@hotmeshio/hotmesh 0.3.12 → 0.3.13
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/README.md +1 -1
- package/build/modules/key.js +1 -1
- package/build/modules/utils.d.ts +3 -2
- package/build/modules/utils.js +1 -1
- package/build/package.json +2 -2
- 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/meshdata/index.js +2 -1
- package/build/services/meshflow/exporter.js +1 -1
- package/build/services/meshos/index.js +2 -2
- 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 +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function _0x16b6(){const _0x260fb3=['17548430UtrGMv','4MmLpPR','5251910KWJkUD','5166855kYUirq','951NSzUGO','10827576UvoqXv','181058IpuMeJ','49OhMknX','738708AssJzE','4594EnGbqh'];_0x16b6=function(){return _0x260fb3;};return _0x16b6();}(function(_0x58f06d,_0x113f3a){const _0x3bcdca=_0x1d1a,_0x19b959=_0x58f06d();while(!![]){try{const _0x42b167=-parseInt(_0x3bcdca(0x7c))/0x1+parseInt(_0x3bcdca(0x75))/0x2*(-parseInt(_0x3bcdca(0x7a))/0x3)+parseInt(_0x3bcdca(0x77))/0x4*(parseInt(_0x3bcdca(0x78))/0x5)+-parseInt(_0x3bcdca(0x74))/0x6*(-parseInt(_0x3bcdca(0x73))/0x7)+-parseInt(_0x3bcdca(0x7b))/0x8+-parseInt(_0x3bcdca(0x79))/0x9+parseInt(_0x3bcdca(0x76))/0xa;if(_0x42b167===_0x113f3a)break;else _0x19b959['push'](_0x19b959['shift']());}catch(_0xd906b3){_0x19b959['push'](_0x19b959['shift']());}}}(_0x16b6,0xcab5e));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Worker']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Worker extends activity_1['Activity']{constructor(_0x248467,_0x55b9bc,_0x16732f,_0x17c277,_0x5be515,_0x4461fa){super(_0x248467,_0x55b9bc,_0x16732f,_0x17c277,_0x5be515,_0x4461fa);}async['process'](){this['logger']['debug']('worker-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x436775;try{await this['verifyEntry'](),_0x436775=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x436775['startActivitySpan'](this['leg']),this['mapInputData']();const _0x5a803c=this['store']['transact'](),_0x1f31d1=await this['execActivity'](_0x5a803c);await collator_1['CollatorService']['authorizeReentry'](this,_0x5a803c),await this['setState'](_0x5a803c),await this['setStatus'](0x0,_0x5a803c);const _0x3afffb=await _0x5a803c['exec']();_0x436775['mapActivityAttributes']();const _0x5dd34b=this['resolveStatus'](_0x3afffb);return _0x436775['setActivityAttributes']({'app.activity.mid':_0x1f31d1,'app.job.jss':_0x5dd34b}),this['context']['metadata']['aid'];}catch(_0x5d8ad4){if(_0x5d8ad4 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x5d8ad4});return;}else{if(_0x5d8ad4 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x5d8ad4});return;}else{if(_0x5d8ad4 instanceof errors_1['GetStateError']){this['logger']['error']('worker-get-state-error',{..._0x5d8ad4});return;}else{if(_0x5d8ad4 instanceof errors_1['CollationError']){if(_0x5d8ad4['fault']==='duplicate'){this['logger']['info']('worker-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('worker-collation-error',{..._0x5d8ad4});}else this['logger']['error']('worker-process-error',{..._0x5d8ad4});}}}_0x436775?.['setActivityError'](_0x5d8ad4['message']);throw _0x5d8ad4;}finally{_0x436775?.['endActivitySpan'](),this['logger']['debug']('worker-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x4fff11){const _0x538d25=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x374384={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':this['metadata']['dad'],'aid':this['metadata']['aid'],'topic':_0x538d25,'spn':this['context']['$self']['output']['metadata']['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return this['config']['retry']&&(_0x374384['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](_0x538d25,_0x374384,_0x4fff11);}}function _0x1d1a(_0x41d18d,_0x127810){const _0x16b6f7=_0x16b6();return _0x1d1a=function(_0x1d1aa5,_0x1cfbdd){_0x1d1aa5=_0x1d1aa5-0x73;let _0x42d0a8=_0x16b6f7[_0x1d1aa5];return _0x42d0a8;},_0x1d1a(_0x41d18d,_0x127810);}exports['Worker']=Worker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x2e8fe6,_0x590326){const _0x5b4e4e=_0x3fb9,_0x47e1b3=_0x2e8fe6();while(!![]){try{const _0x123080=-parseInt(_0x5b4e4e(0x100))/0x1+-parseInt(_0x5b4e4e(0x101))/0x2+parseInt(_0x5b4e4e(0x103))/0x3*(-parseInt(_0x5b4e4e(0x102))/0x4)+parseInt(_0x5b4e4e(0x107))/0x5*(parseInt(_0x5b4e4e(0x105))/0x6)+-parseInt(_0x5b4e4e(0x108))/0x7+-parseInt(_0x5b4e4e(0x106))/0x8*(parseInt(_0x5b4e4e(0x109))/0x9)+parseInt(_0x5b4e4e(0x104))/0xa*(parseInt(_0x5b4e4e(0x10a))/0xb);if(_0x123080===_0x590326)break;else _0x47e1b3['push'](_0x47e1b3['shift']());}catch(_0x5923c9){_0x47e1b3['push'](_0x47e1b3['shift']());}}}(_0x12db,0xa2a05));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CollatorService']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../../types/collator');function _0x3fb9(_0x270b59,_0x56fd71){const _0x12db88=_0x12db();return _0x3fb9=function(_0x3fb988,_0x341420){_0x3fb988=_0x3fb988-0x100;let _0x3225e2=_0x12db88[_0x3fb988];return _0x3225e2;},_0x3fb9(_0x270b59,_0x56fd71);}function _0x12db(){const _0x17d72b=['1354636dzlGGh','741724SPEzqH','3STxAEG','10NaZsQD','90fsOEPv','8uoSrqL','152765pUEPge','169050kaTYNi','2084193EIEdmg','18911222VBKBHj','392904WDbQnt'];_0x12db=function(){return _0x17d72b;};return _0x12db();}class CollatorService{static['assertJobActive'](_0x2cf4b8,_0x4bba44,_0x34d4b2,_0x2b4e33=0x0){if(_0x2cf4b8<=_0x2b4e33)throw new errors_1['InactiveJobError'](_0x4bba44,_0x2cf4b8,_0x34d4b2);}static['getDimensionalAddress'](_0x33eee2,_0x17b0d5=![]){let _0x1bd635=_0x33eee2['context']['metadata']['dad']||_0x33eee2['metadata']['dad'];return _0x17b0d5&&_0x1bd635&&_0x33eee2['leg']===0x2&&(_0x1bd635=_0x1bd635['substring'](0x0,_0x1bd635['lastIndexOf'](','))+',0'),CollatorService['getDimensionsById']([..._0x33eee2['config']['ancestors'],_0x33eee2['metadata']['aid']],_0x1bd635);}static['resolveReentryDimension'](_0x1bc6e6){const _0x2bbbbc=_0x1bc6e6['config']['ancestor'],_0x4aa132=_0x1bc6e6['config']['ancestors'],_0x307122=_0x4aa132['indexOf'](_0x2bbbbc),_0x58e4b6=_0x1bc6e6['metadata']['dad']['split'](',');return _0x58e4b6['length']=_0x307122+0x1,_0x58e4b6['push']('0'),_0x58e4b6['join'](',');}static async['notarizeEntry'](_0x13b4cd,_0x4cf204){const _0x1b6fb5=await _0x13b4cd['store']['collate'](_0x13b4cd['context']['metadata']['jid'],_0x13b4cd['metadata']['aid'],-0x5af3107a4000,this['getDimensionalAddress'](_0x13b4cd),_0x4cf204);return this['verifyInteger'](_0x1b6fb5,0x1,'enter'),_0x1b6fb5;}static async['authorizeReentry'](_0x79622d,_0x2670da){const _0x32ead9=await _0x79622d['store']['collate'](_0x79622d['context']['metadata']['jid'],_0x79622d['metadata']['aid'],-0x9184e72a000,this['getDimensionalAddress'](_0x79622d),_0x2670da);return _0x32ead9;}static async['notarizeEarlyExit'](_0x4cd659,_0x2d23d4){return await _0x4cd659['store']['collate'](_0x4cd659['context']['metadata']['jid'],_0x4cd659['metadata']['aid'],-0xa012317b000,this['getDimensionalAddress'](_0x4cd659),_0x2d23d4);}static async['notarizeEarlyCompletion'](_0x260c2b,_0x2cfcb1){const _0x5138d3=_0x260c2b['config']['cycle']?0x9184e72a000:0xa012317b000;return await _0x260c2b['store']['collate'](_0x260c2b['context']['metadata']['jid'],_0x260c2b['metadata']['aid'],0xf4241-_0x5138d3,this['getDimensionalAddress'](_0x260c2b),_0x2cfcb1);}static async['notarizeInception'](_0x493c93,_0x41c78d,_0x5ab990){_0x41c78d&&await _0x493c93['store']['collateSynthetic'](_0x493c93['context']['metadata']['jid'],_0x41c78d,0xf4240,_0x5ab990);}static async['isInceptionOverage'](_0x1cc872,_0x41f476){if(_0x41f476){const _0x5b3c61=await _0x1cc872['store']['collateSynthetic'](_0x1cc872['context']['metadata']['jid'],_0x41f476,0xf4240);return _0x5b3c61>0xf4240;}return![];}static async['notarizeReentry'](_0x428513,_0x5b7c39,_0x41116a){const _0x14849d=_0x428513['context']['metadata']['jid'],_0x44a7d1=_0x41116a||_0x428513['store']['transact']();await _0x428513['store']['collate'](_0x14849d,_0x428513['metadata']['aid'],0xf4240,this['getDimensionalAddress'](_0x428513,!![]),_0x44a7d1),await _0x428513['store']['collateSynthetic'](_0x14849d,_0x5b7c39,0xf4240,_0x44a7d1);const [_0x47ee88,_0x36d3af]=await _0x44a7d1['exec'](),_0x294b91=Array['isArray'](_0x47ee88)?_0x47ee88[0x1]:_0x47ee88,_0x13dfff=Array['isArray'](_0x36d3af)?_0x36d3af[0x1]:_0x36d3af;return this['verifyInteger'](_0x294b91,0x2,'enter'),this['verifySyntheticInteger'](_0x13dfff),_0x294b91;}static async['notarizeContinuation'](_0x5b3bf3,_0x3a82c7){return await _0x5b3bf3['store']['collate'](_0x5b3bf3['context']['metadata']['jid'],_0x5b3bf3['metadata']['aid'],0x1,this['getDimensionalAddress'](_0x5b3bf3),_0x3a82c7);}static async['notarizeCompletion'](_0x2629bc,_0x35d342){const _0x47f97a=_0x2629bc['config']['cycle']?0x0:0xe8d4a51000;return await _0x2629bc['store']['collate'](_0x2629bc['context']['metadata']['jid'],_0x2629bc['metadata']['aid'],0x1-_0x47f97a,this['getDimensionalAddress'](_0x2629bc),_0x35d342);}static['getDigitAtIndex'](_0x345e78,_0x186b8a){const _0x5ef6ee=_0x345e78['toString']();if(_0x186b8a<0x0||_0x186b8a>=_0x5ef6ee['length'])return null;const _0x5b8ae5=parseInt(_0x5ef6ee[_0x186b8a],0xa);return _0x5b8ae5;}static['getDimensionalIndex'](_0x59b02d){const _0x82ad6a=_0x59b02d['toString']();if(_0x82ad6a['length']<0x9)return null;const _0x2a8399=_0x82ad6a['substring'](0x3,0x9),_0x3e6678=parseInt(_0x2a8399,0xa);return _0x3e6678-0x1;}static['isDuplicate'](_0x1ded2e,_0x19b264){return this['getDigitAtIndex'](_0x1ded2e,_0x19b264)<0x8;}static['isInactive'](_0xcfaed2){return this['getDigitAtIndex'](_0xcfaed2,0x2)<0x9;}static['isPrimed'](_0x5cd738,_0x3b794e){return _0x3b794e==0x1?_0x5cd738!=-0x5af3107a4000:this['getDigitAtIndex'](_0x5cd738,0x0)<0x9&&this['getDigitAtIndex'](_0x5cd738,0x1)<0x9;}static['verifySyntheticInteger'](_0x4e15d0){const _0x58701b=_0x4e15d0['toString'](),_0x2db9fe=parseInt(_0x58701b[_0x58701b['length']-0x1],0xa);if(_0x2db9fe>0x0)throw new errors_1['CollationError'](_0x4e15d0,0x2,'enter',collator_1['CollationFaultType']['INACTIVE']);else{if(_0x4e15d0>=0x1e8480)throw new errors_1['CollationError'](_0x4e15d0,0x2,'enter',collator_1['CollationFaultType']['DUPLICATE']);}}static['verifyInteger'](_0x461802,_0x39d75b,_0x117213){let _0x1d14ee;if(_0x39d75b===0x1&&_0x117213==='enter'){if(!this['isPrimed'](_0x461802,0x1))_0x1d14ee=collator_1['CollationFaultType']['MISSING'];else{if(this['isDuplicate'](_0x461802,0x0))_0x1d14ee=collator_1['CollationFaultType']['DUPLICATE'];else _0x461802!=0x331a2bfa73000&&(_0x1d14ee=collator_1['CollationFaultType']['INVALID']);}}else{if(_0x39d75b===0x1&&_0x117213==='exit'){if(_0x461802===-0x9184e72a000)_0x1d14ee=collator_1['CollationFaultType']['MISSING'];else this['isDuplicate'](_0x461802,0x1)&&(_0x1d14ee=collator_1['CollationFaultType']['DUPLICATE']);}else{if(_0x39d75b===0x2&&_0x117213==='enter'){if(!this['isPrimed'](_0x461802,0x2))_0x1d14ee=collator_1['CollationFaultType']['FORBIDDEN'];else this['isInactive'](_0x461802)&&(_0x1d14ee=collator_1['CollationFaultType']['INACTIVE']);}}}if(_0x1d14ee)throw new errors_1['CollationError'](_0x461802,_0x39d75b,_0x117213,_0x1d14ee);}static['getDimensionsById'](_0x565af8,_0x39f9d3){const _0x32485b={'$ADJACENT':_0x39f9d3+',0'};let _0x32ecdb=_0x39f9d3;return _0x565af8['reverse']()['forEach'](_0x58cdde=>{_0x32485b[_0x58cdde]=_0x32ecdb,_0x32ecdb=_0x32ecdb['substring'](0x0,_0x32ecdb['lastIndexOf'](','));}),_0x32485b;}static['getSeed'](){return'999000000000000';}static['getTriggerSeed'](){return'888000001000001';}static['compile'](_0x3d12eb){CollatorService['bindAncestorArray'](_0x3d12eb);}static['bindAncestorArray'](_0x758ed4){_0x758ed4['forEach'](_0x5ac193=>{const _0x279b84={},_0x4094d9=Object['keys'](_0x5ac193['activities'])['find'](_0x2e1b43=>_0x5ac193['activities'][_0x2e1b43]['type']==='trigger');if(!_0x4094d9)throw new Error('collator-trigger-activity-not-found');const _0x1e213e=(_0x5bd72c,_0x3471fd)=>{_0x279b84[_0x5bd72c]=_0x3471fd,_0x5ac193['activities'][_0x5bd72c]['ancestors']=_0x3471fd;const _0xe64a0d=_0x5ac193['transitions']?.[_0x5bd72c]||[];_0xe64a0d['forEach'](_0x158605=>{_0x1e213e(_0x158605['to'],[..._0x3471fd,_0x5bd72c]);});};_0x1e213e(_0x4094d9,[]);});}static['getDimensionalSeed'](_0x27eb1e=0x0){return','+_0x27eb1e;}}exports['CollatorService']=CollatorService,CollatorService['targetLength']=0xf;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0x42db(_0x2b3b01,_0x13863b){const _0x46f305=_0x46f3();return _0x42db=function(_0x42dbf4,_0x1da59d){_0x42dbf4=_0x42dbf4-0x176;let _0x16c1a1=_0x46f305[_0x42dbf4];return _0x16c1a1;},_0x42db(_0x2b3b01,_0x13863b);}(function(_0x14d24a,_0x146ade){const _0x21c918=_0x42db,_0x18ddc9=_0x14d24a();while(!![]){try{const _0x3e6da4=-parseInt(_0x21c918(0x17e))/0x1+-parseInt(_0x21c918(0x182))/0x2*(parseInt(_0x21c918(0x180))/0x3)+parseInt(_0x21c918(0x176))/0x4*(parseInt(_0x21c918(0x181))/0x5)+parseInt(_0x21c918(0x17b))/0x6*(parseInt(_0x21c918(0x177))/0x7)+parseInt(_0x21c918(0x17d))/0x8*(parseInt(_0x21c918(0x17a))/0x9)+parseInt(_0x21c918(0x179))/0xa*(parseInt(_0x21c918(0x17f))/0xb)+parseInt(_0x21c918(0x17c))/0xc*(-parseInt(_0x21c918(0x178))/0xd);if(_0x3e6da4===_0x146ade)break;else _0x18ddc9['push'](_0x18ddc9['shift']());}catch(_0xb346b0){_0x18ddc9['push'](_0x18ddc9['shift']());}}}(_0x46f3,0xe239f));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Deployer']=void 0x0;const key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),serializer_1=require('../serializer'),pipe_1=require('../pipe'),validator_1=require('./validator'),DEFAULT_METADATA_RANGE_SIZE=0x1a,DEFAULT_DATA_RANGE_SIZE=0x104,DEFAULT_RANGE_SIZE=DEFAULT_METADATA_RANGE_SIZE+DEFAULT_DATA_RANGE_SIZE;function _0x46f3(){const _0x30f196=['48amncCP','3557995uOXTbT','115212gvkpxo','8ImVGac','7tHorvy','10145902QsjVxj','19560OOqIqd','425781wzHxGO','3165858UftCOJ','36bWqrej','296QjgEuf','119909iDIjQh','3421Vykvkf'];_0x46f3=function(){return _0x30f196;};return _0x46f3();}class Deployer{constructor(_0x3217f3){this['manifest']=null,this['manifest']=_0x3217f3;}async['deploy'](_0x3adc88,_0x66f501){this['store']=_0x3adc88,this['stream']=_0x66f501,collator_1['CollatorService']['compile'](this['manifest']['app']['graphs']),this['convertActivitiesToHooks'](),this['convertTopicsToTypes'](),this['copyJobSchemas'](),this['bindBackRefs'](),this['bindParents'](),this['bindCycleTarget'](),this['resolveMappingDependencies'](),this['resolveJobMapsPaths'](),await this['generateSymKeys'](),await this['generateSymVals'](),await this['deployHookPatterns'](),await this['deployActivitySchemas'](),await this['deploySubscriptions'](),await this['deployTransitions'](),await this['deployConsumerGroups']();}['getVID'](){return{'id':this['manifest']['app']['id'],'version':this['manifest']['app']['version']};}async['generateSymKeys'](){for(const _0x1ddde8 of this['manifest']['app']['graphs']){const [,_0x273a24]=this['findTrigger'](_0x1ddde8),_0x1c9f4b=_0x273a24['subscribes'],[_0x2f4d1f,_0xc304e6,_0xa54247]=await this['store']['reserveSymbolRange']('$'+_0x1c9f4b,DEFAULT_RANGE_SIZE,'JOB'),_0x217582='',_0x547847=this['bindSymbols'](_0x2f4d1f,_0xc304e6,_0xa54247,_0x217582,_0x273a24['PRODUCES']);Object['keys'](_0x547847)['length']&&await this['store']['addSymbols']('$'+_0x1c9f4b,_0x547847);for(const [_0x2c331f,_0x36177a]of Object['entries'](_0x1ddde8['activities'])){const [_0x54be4a,_0x1940c3,_0x52300c]=await this['store']['reserveSymbolRange'](_0x2c331f,DEFAULT_RANGE_SIZE,'ACTIVITY'),_0x16e5bc=_0x2c331f+'/';this['bindSelf'](_0x36177a['consumes'],_0x36177a['produces'],_0x2c331f);const _0x2712d8=this['bindSymbols'](_0x54be4a,_0x1940c3,_0x52300c,_0x16e5bc,_0x36177a['produces']);Object['keys'](_0x2712d8)['length']&&await this['store']['addSymbols'](_0x2c331f,_0x2712d8);}}}['bindSelf'](_0x4d378f,_0xa2b8bd,_0x63d6d7){for(const _0x57146a of[_0x63d6d7,'$self']){const _0x578fdf=_0x4d378f[_0x57146a];if(_0x578fdf)for(const _0x49e2a2 of _0x578fdf){!_0xa2b8bd['includes'](_0x49e2a2)&&_0xa2b8bd['push'](_0x49e2a2);}}}['bindSymbols'](_0x38f07,_0xb0d627,_0x43c1ad,_0x1260ef,_0x44bf41){const _0x172d2c={},_0x18b86d={..._0x43c1ad};for(const _0x4b7282 of _0x44bf41){const _0x58473e=''+_0x1260ef+_0x4b7282;if(!_0x18b86d[_0x58473e]){if(_0x38f07>_0xb0d627)throw new Error('Symbol\x20index\x20out\x20of\x20bounds');const _0x458f65=(0x0,utils_1['getSymKey'])(_0x38f07);_0x38f07++,_0x172d2c[_0x58473e]=_0x458f65,_0x18b86d[_0x58473e]=_0x458f65;}}return _0x172d2c;}['copyJobSchemas'](){const _0x5098a7=this['manifest']['app']['graphs'];for(const _0x39ed7d of _0x5098a7){const _0x32e882=_0x39ed7d['output']?.['schema'],_0x3bc5de=_0x39ed7d['input']?.['schema'];if(!_0x32e882&&!_0x3bc5de)continue;const _0x1fabb5=_0x39ed7d['activities'];for(const _0x3c7780 in _0x1fabb5){if(_0x1fabb5[_0x3c7780]['type']==='trigger'){const _0x16fd1d=_0x1fabb5[_0x3c7780];_0x32e882&&(!_0x16fd1d['job']&&(_0x16fd1d['job']={}),_0x16fd1d['job']['schema']=_0x32e882),_0x3bc5de&&(_0x16fd1d['output']={'schema':_0x3bc5de});}}}}['bindBackRefs'](){for(const _0x1c7916 of this['manifest']['app']['graphs']){const _0x361e36=_0x1c7916['activities'],_0xfc01a3=this['findTrigger'](_0x1c7916)[0x0];for(const _0x1804b0 in _0x361e36){_0x361e36[_0x1804b0]['trigger']=_0xfc01a3,_0x361e36[_0x1804b0]['subscribes']=_0x1c7916['subscribes'],_0x1c7916['publishes']&&(_0x361e36[_0x1804b0]['publishes']=_0x1c7916['publishes']),_0x361e36[_0x1804b0]['expire']=_0x1c7916['expire']??undefined,_0x361e36[_0x1804b0]['persistent']=_0x1c7916['persistent']??undefined;}}}['bindCycleTarget'](){for(const _0x4cf263 of this['manifest']['app']['graphs']){const _0x49ee87=_0x4cf263['activities'];for(const _0x303160 in _0x49ee87){const _0x19c352=_0x49ee87[_0x303160];_0x19c352['type']==='cycle'&&(_0x49ee87[_0x19c352['ancestor']]['cycle']=!![]);}}}['convertTopicsToTypes'](){for(const _0x17fce7 of this['manifest']['app']['graphs']){const _0x156d8d=_0x17fce7['activities'];for(const _0x5410b5 in _0x156d8d){const _0x13021c=_0x156d8d[_0x5410b5];['worker','await']['includes'](_0x13021c['type'])&&_0x13021c['topic']&&!_0x13021c['subtype']&&(_0x13021c['subtype']=_0x13021c['topic']);}}}['convertActivitiesToHooks'](){for(const _0x3e7a39 of this['manifest']['app']['graphs']){const _0x4f5b5b=_0x3e7a39['activities'];for(const _0x380428 in _0x4f5b5b){const _0x5389d9=_0x4f5b5b[_0x380428];['activity']['includes'](_0x5389d9['type'])&&(_0x5389d9['type']='hook');}}}async['bindParents'](){const _0x11d41f=this['manifest']['app']['graphs'];for(const _0xc01a7b of _0x11d41f){if(_0xc01a7b['transitions'])for(const _0x746d57 in _0xc01a7b['transitions']){const _0x4c3e57=_0xc01a7b['transitions'][_0x746d57];for(const _0x415e60 of _0x4c3e57){const _0x21730c=_0x415e60['to'];_0xc01a7b['activities'][_0x21730c]['parent']=_0x746d57;}_0xc01a7b['activities'][_0x746d57]['transitions']=_0x4c3e57;}}}['collectValues'](_0x4384ad,_0x17b451){for(const [_0x346d81,_0x5d276c]of Object['entries'](_0x4384ad)){if(_0x346d81==='enum'||_0x346d81==='examples'||_0x346d81==='default'){if(Array['isArray'](_0x5d276c))for(const _0x5c4ee6 of _0x5d276c){typeof _0x5c4ee6==='string'&&_0x5c4ee6['length']>0x5&&_0x17b451['add'](_0x5c4ee6);}else typeof _0x5d276c==='string'&&_0x5d276c['length']>0x5&&_0x17b451['add'](_0x5d276c);}else typeof _0x5d276c==='object'&&this['collectValues'](_0x5d276c,_0x17b451);}}['traverse'](_0x7acb7d,_0x2b2ffd){for(const _0xec8af9 of Object['values'](_0x7acb7d)){typeof _0xec8af9==='object'&&('schema'in _0xec8af9?this['collectValues'](_0xec8af9['schema'],_0x2b2ffd):this['traverse'](_0xec8af9,_0x2b2ffd));}}async['generateSymVals'](){const _0x38e485=new Set();for(const _0x589c88 of this['manifest']['app']['graphs']){this['traverse'](_0x589c88,_0x38e485);}const _0x26c74a=await this['store']['getSymbolValues'](),_0x44cf83=Object['keys'](_0x26c74a)['length'],_0x578dd1=Math['pow'](0x34,0x2)-0x1,_0x2c3cbe=serializer_1['SerializerService']['filterSymVals'](_0x44cf83,_0x578dd1,_0x26c74a,_0x38e485);await this['store']['addSymbolValues'](_0x2c3cbe);}['resolveJobMapsPaths'](){function _0x3f9d26(_0x490ab3){const _0x416c8a=[];function _0x2a9861(_0x260b27,_0x5b3824=[]){for(const _0x22958d in _0x260b27){if(typeof _0x260b27[_0x22958d]==='object'&&_0x260b27[_0x22958d]!==null&&!('@pipe'in _0x260b27[_0x22958d])){const _0x231036=[..._0x5b3824,_0x22958d];_0x2a9861(_0x260b27[_0x22958d],_0x231036);}else{const _0xb1b5c7=[..._0x5b3824,_0x22958d]['join']('/');if(!_0xb1b5c7['includes']('[')){const _0x52b7f6='data/'+_0xb1b5c7;!_0x416c8a['includes'](_0x52b7f6)&&_0x416c8a['push'](_0x52b7f6);}else{const [_0x46ed03,_0x3c7160]=_0xb1b5c7['split']('['),[_0x5b4749,_0xa00c9a]=_0x3c7160['split'](']');if(!isNaN(parseInt(_0x5b4749)))for(let _0x592581=0x0;_0x592581<parseInt(_0x5b4749);_0x592581++){const _0x58d7e9='data/'+_0x46ed03+'/'+_0x592581;!_0x416c8a['includes'](_0x58d7e9)&&_0x416c8a['push'](_0x58d7e9);}}}}}return _0x490ab3&&_0x2a9861(_0x490ab3),_0x416c8a;}for(const _0x3afced of this['manifest']['app']['graphs']){let _0x3592c3=[];const [,_0x4259c0]=this['findTrigger'](_0x3afced);for(const _0xde4536 in _0x3afced['activities']){const _0x515aaf=_0x3afced['activities'][_0xde4536];_0x3592c3=_0x3592c3['concat'](_0x3f9d26(_0x515aaf['job']?.['maps']));}_0x4259c0['PRODUCES']=_0x3592c3;}}['resolveMappingDependencies'](){const _0x311885=[];function _0x51f124(_0x502278,_0x2a37f7){for(const _0x27e1ab in _0x502278){if(typeof _0x502278[_0x27e1ab]==='string'){const _0x130cf5=_0x502278[_0x27e1ab],_0x4e8fdd=_0x130cf5['match'](/^\{[^@].*}$/);_0x4e8fdd&&!validator_1['Validator']['CONTEXT_VARS']['includes'](_0x130cf5)&&(_0x130cf5['split']('.')[0x1]!=='input'&&(_0x311885['push'](_0x130cf5),_0x2a37f7['push'](_0x130cf5)));}else typeof _0x502278[_0x27e1ab]==='object'&&_0x502278[_0x27e1ab]!==null&&_0x51f124(_0x502278[_0x27e1ab],_0x2a37f7);}}const _0xd45e53=this['manifest']['app']['graphs'];for(const _0x1b2e3e of _0xd45e53){const _0x38d9c2=_0x1b2e3e['activities'];for(const _0x1c7fbc in _0x38d9c2){const _0xe74b58=_0x38d9c2[_0x1c7fbc];_0xe74b58['consumes']=[],_0x51f124(_0xe74b58,_0xe74b58['consumes']),_0xe74b58['consumes']=this['groupMappingRules'](_0xe74b58['consumes']);}}const _0x51a2d6=this['groupMappingRules'](_0x311885);for(const _0x16d351 of _0xd45e53){const _0x5eb3d9=_0x16d351['activities'];for(const _0x2b9ffd in _0x5eb3d9){const _0x2bc67c=_0x5eb3d9[_0x2b9ffd];_0x2bc67c['produces']=_0x51a2d6[''+_0x2b9ffd]||[];}}}['groupMappingRules'](_0x5c148f){_0x5c148f=Array['from'](new Set(_0x5c148f))['sort']();const _0x3ddc79={};for(const _0xc74544 of _0x5c148f){const [_0x3fbc23,_0x3322fa]=this['resolveMappableValue'](_0xc74544);!_0x3ddc79[_0x3fbc23]&&(_0x3ddc79[_0x3fbc23]=[]),_0x3ddc79[_0x3fbc23]['push'](_0x3322fa);}return _0x3ddc79;}['resolveMappableValue'](_0x9bc1a1){_0x9bc1a1=_0x9bc1a1['substring'](0x1,_0x9bc1a1['length']-0x1);const _0x4d9858=_0x9bc1a1['split']('.');if(_0x4d9858[0x0]==='$job'){const [_0x145ef1,..._0x29b205]=_0x4d9858;return[_0x145ef1,_0x29b205['join']('/')];}else{const [_0x5163a7,_0x59a7df,_0x329274,..._0x118f82]=_0x4d9858,_0x147585={'hook':'hook/data','input':'input/data','output':_0x329274==='data'?'output/data':'output/metadata'}[_0x59a7df];return[_0x5163a7,_0x147585+'/'+_0x118f82['join']('/')];}}async['deployActivitySchemas'](){const _0x34b46d=this['manifest']['app']['graphs'],_0x379b6c={};for(const _0x17829e of _0x34b46d){const _0x40de7f=_0x17829e['activities'];for(const _0x36c7f4 in _0x40de7f){const _0x7279ac=_0x40de7f[_0x36c7f4];delete _0x7279ac['transitions'],_0x379b6c[_0x36c7f4]=_0x7279ac;}}await this['store']['setSchemas'](_0x379b6c,this['getVID']());}async['deploySubscriptions'](){const _0x2d8868=this['manifest']['app']['graphs'],_0xa72a5f={};for(const _0x45e55c of _0x2d8868){const _0x208499=_0x45e55c['activities'],_0x5815e5=_0x45e55c['subscribes'];for(const _0x5b4439 in _0x208499){if(_0x208499[_0x5b4439]['type']==='trigger'){_0xa72a5f[_0x5815e5]=_0x5b4439;break;}}}await this['store']['setSubscriptions'](_0xa72a5f,this['getVID']());}['findTrigger'](_0x4aacd4){for(const _0x2ad1ec in _0x4aacd4['activities']){const _0x46efcf=_0x4aacd4['activities'][_0x2ad1ec];if(_0x46efcf['type']==='trigger')return[_0x2ad1ec,_0x46efcf];}return null;}async['deployTransitions'](){const _0x4f1b83=this['manifest']['app']['graphs'],_0x22aba7={};for(const _0x18624c of _0x4f1b83){if(_0x18624c['subscribes']&&_0x18624c['subscribes']['startsWith']('.')){const [_0x5852f4]=this['findTrigger'](_0x18624c);_0x5852f4&&(_0x22aba7[_0x18624c['subscribes']]={[_0x5852f4]:!![]});}if(_0x18624c['transitions'])for(const _0x1ed970 in _0x18624c['transitions']){const _0x1f8f1c=_0x18624c['transitions'][_0x1ed970],_0x10726a={};for(const _0x2c0b82 of _0x1f8f1c){const _0x21af04=_0x2c0b82['to'];_0x2c0b82['conditions']?_0x10726a[_0x21af04]=_0x2c0b82['conditions']:_0x10726a[_0x21af04]=!![];}Object['keys'](_0x10726a)['length']>0x0&&(_0x22aba7['.'+_0x1ed970]=_0x10726a);}}await this['store']['setTransitions'](_0x22aba7,this['getVID']());}async['deployHookPatterns'](){const _0x2871ee=this['manifest']['app']['graphs'],_0x5bbc9f={};for(const _0x57c7c5 of _0x2871ee){if(_0x57c7c5['hooks'])for(const _0x4d5bf4 in _0x57c7c5['hooks']){_0x5bbc9f[_0x4d5bf4]=_0x57c7c5['hooks'][_0x4d5bf4];const _0x51d8b7=_0x57c7c5['hooks'][_0x4d5bf4][0x0]['to'],_0xc8a185=_0x57c7c5['activities'][_0x51d8b7];_0xc8a185&&(!_0xc8a185['hook']&&(_0xc8a185['hook']={}),_0xc8a185['hook']['topic']=_0x4d5bf4);}}await this['store']['setHookRules'](_0x5bbc9f);}async['deployConsumerGroups'](){const _0x2696a={'appId':this['manifest']['app']['id']},_0x473884=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x2696a);await this['deployConsumerGroup'](_0x473884,'ENGINE');for(const _0x5f2aaf of this['manifest']['app']['graphs']){const _0x53a935=_0x5f2aaf['activities'];for(const _0xd15c75 in _0x53a935){const _0x3a4f06=_0x53a935[_0xd15c75];if(_0x3a4f06['type']==='worker'&&pipe_1['Pipe']['resolve'](_0x3a4f06['subtype'],{})===_0x3a4f06['subtype']){_0x2696a['topic']=_0x3a4f06['subtype'];const _0x734831=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x2696a);await this['deployConsumerGroup'](_0x734831,'WORKER');}}}}async['deployConsumerGroup'](_0x26b907,_0x52799d){try{await this['stream']['createConsumerGroup'](_0x26b907,_0x52799d);}catch(_0x3ef1ee){this['store']['logger']['info']('router-stream-group-exists',{'stream':_0x26b907,'group':_0x52799d});}}}exports['Deployer']=Deployer;
|
|
1
|
+
'use strict';function _0x3c67(){const _0x24deab=['465500EBygLO','632951LJsWqz','1110630IsqzAE','1431woiNTN','244663peyKKa','3657591sVHwwz','2OxNqKz','6sSQCtW','8072ZaWvQB','1511880vburrX','80uYqJAX'];_0x3c67=function(){return _0x24deab;};return _0x3c67();}function _0x4864(_0x45a087,_0x37aa00){const _0x3c67cb=_0x3c67();return _0x4864=function(_0x48647c,_0x563efa){_0x48647c=_0x48647c-0xf7;let _0x7da66d=_0x3c67cb[_0x48647c];return _0x7da66d;},_0x4864(_0x45a087,_0x37aa00);}(function(_0x2cb492,_0x1e21ba){const _0xe5eb99=_0x4864,_0x21cd92=_0x2cb492();while(!![]){try{const _0xb8c4d6=parseInt(_0xe5eb99(0xfb))/0x1*(parseInt(_0xe5eb99(0xfd))/0x2)+-parseInt(_0xe5eb99(0xf9))/0x3+-parseInt(_0xe5eb99(0xf7))/0x4+parseInt(_0xe5eb99(0x100))/0x5+parseInt(_0xe5eb99(0xfe))/0x6*(parseInt(_0xe5eb99(0xfc))/0x7)+parseInt(_0xe5eb99(0xff))/0x8*(parseInt(_0xe5eb99(0xfa))/0x9)+-parseInt(_0xe5eb99(0x101))/0xa*(parseInt(_0xe5eb99(0xf8))/0xb);if(_0xb8c4d6===_0x1e21ba)break;else _0x21cd92['push'](_0x21cd92['shift']());}catch(_0x480e0f){_0x21cd92['push'](_0x21cd92['shift']());}}}(_0x3c67,0x451be));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Deployer']=void 0x0;const key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),serializer_1=require('../serializer'),pipe_1=require('../pipe'),validator_1=require('./validator'),DEFAULT_METADATA_RANGE_SIZE=0x1a,DEFAULT_DATA_RANGE_SIZE=0x104,DEFAULT_RANGE_SIZE=DEFAULT_METADATA_RANGE_SIZE+DEFAULT_DATA_RANGE_SIZE;class Deployer{constructor(_0x3faf28){this['manifest']=null,this['manifest']=_0x3faf28;}async['deploy'](_0x5c2aad,_0x312433){this['store']=_0x5c2aad,this['stream']=_0x312433,collator_1['CollatorService']['compile'](this['manifest']['app']['graphs']),this['convertActivitiesToHooks'](),this['convertTopicsToTypes'](),this['copyJobSchemas'](),this['bindBackRefs'](),this['bindParents'](),this['bindCycleTarget'](),this['resolveMappingDependencies'](),this['resolveJobMapsPaths'](),await this['generateSymKeys'](),await this['generateSymVals'](),await this['deployHookPatterns'](),await this['deployActivitySchemas'](),await this['deploySubscriptions'](),await this['deployTransitions'](),await this['deployConsumerGroups']();}['getVID'](){return{'id':this['manifest']['app']['id'],'version':this['manifest']['app']['version']};}async['generateSymKeys'](){for(const _0x591865 of this['manifest']['app']['graphs']){const [,_0x35e2b4]=this['findTrigger'](_0x591865),_0x28604b=_0x35e2b4['subscribes'],[_0x484c7f,_0x28d182,_0x321c9e]=await this['store']['reserveSymbolRange']('$'+_0x28604b,DEFAULT_RANGE_SIZE,'JOB'),_0x46f029='',_0x34bca7=this['bindSymbols'](_0x484c7f,_0x28d182,_0x321c9e,_0x46f029,_0x35e2b4['PRODUCES']);Object['keys'](_0x34bca7)['length']&&await this['store']['addSymbols']('$'+_0x28604b,_0x34bca7);for(const [_0x294d18,_0x471703]of Object['entries'](_0x591865['activities'])){const [_0x5d5841,_0x49086b,_0x5e6cfe]=await this['store']['reserveSymbolRange'](_0x294d18,DEFAULT_RANGE_SIZE,'ACTIVITY'),_0x2d12f6=_0x294d18+'/';this['bindSelf'](_0x471703['consumes'],_0x471703['produces'],_0x294d18);const _0x45b8f7=this['bindSymbols'](_0x5d5841,_0x49086b,_0x5e6cfe,_0x2d12f6,_0x471703['produces']);Object['keys'](_0x45b8f7)['length']&&await this['store']['addSymbols'](_0x294d18,_0x45b8f7);}}}['bindSelf'](_0x3ab9a7,_0x473b90,_0x32f640){for(const _0x3142b7 of[_0x32f640,'$self']){const _0xd01454=_0x3ab9a7[_0x3142b7];if(_0xd01454)for(const _0x41de88 of _0xd01454){!_0x473b90['includes'](_0x41de88)&&_0x473b90['push'](_0x41de88);}}}['bindSymbols'](_0x1db165,_0x5aaa6b,_0x2f766b,_0x49b8f3,_0x389633){const _0x1f89bf={},_0xcb3401={..._0x2f766b};for(const _0x533be5 of _0x389633){const _0x2d04c1=''+_0x49b8f3+_0x533be5;if(!_0xcb3401[_0x2d04c1]){if(_0x1db165>_0x5aaa6b)throw new Error('Symbol\x20index\x20out\x20of\x20bounds');const _0x46e167=(0x0,utils_1['getSymKey'])(_0x1db165);_0x1db165++,_0x1f89bf[_0x2d04c1]=_0x46e167,_0xcb3401[_0x2d04c1]=_0x46e167;}}return _0x1f89bf;}['copyJobSchemas'](){const _0x2762a5=this['manifest']['app']['graphs'];for(const _0x4694c2 of _0x2762a5){const _0x2c2547=_0x4694c2['output']?.['schema'],_0x3820ee=_0x4694c2['input']?.['schema'];if(!_0x2c2547&&!_0x3820ee)continue;const _0x4bdbda=_0x4694c2['activities'];for(const _0x13b8e1 in _0x4bdbda){if(_0x4bdbda[_0x13b8e1]['type']==='trigger'){const _0x116683=_0x4bdbda[_0x13b8e1];_0x2c2547&&(!_0x116683['job']&&(_0x116683['job']={}),_0x116683['job']['schema']=_0x2c2547),_0x3820ee&&(_0x116683['output']={'schema':_0x3820ee});}}}}['bindBackRefs'](){for(const _0x1913e3 of this['manifest']['app']['graphs']){const _0x293a74=_0x1913e3['activities'],_0x35d3f2=this['findTrigger'](_0x1913e3)[0x0];for(const _0x4c55cd in _0x293a74){_0x293a74[_0x4c55cd]['trigger']=_0x35d3f2,_0x293a74[_0x4c55cd]['subscribes']=_0x1913e3['subscribes'],_0x1913e3['publishes']&&(_0x293a74[_0x4c55cd]['publishes']=_0x1913e3['publishes']),_0x293a74[_0x4c55cd]['expire']=_0x1913e3['expire']??undefined,_0x293a74[_0x4c55cd]['persistent']=_0x1913e3['persistent']??undefined;}}}['bindCycleTarget'](){for(const _0x5d2323 of this['manifest']['app']['graphs']){const _0xe273af=_0x5d2323['activities'];for(const _0x17298e in _0xe273af){const _0x470148=_0xe273af[_0x17298e];_0x470148['type']==='cycle'&&(_0xe273af[_0x470148['ancestor']]['cycle']=!![]);}}}['convertTopicsToTypes'](){for(const _0x4eecb9 of this['manifest']['app']['graphs']){const _0x3b194a=_0x4eecb9['activities'];for(const _0x50ea2d in _0x3b194a){const _0x3cb40c=_0x3b194a[_0x50ea2d];['worker','await']['includes'](_0x3cb40c['type'])&&_0x3cb40c['topic']&&!_0x3cb40c['subtype']&&(_0x3cb40c['subtype']=_0x3cb40c['topic']);}}}['convertActivitiesToHooks'](){for(const _0x1c507d of this['manifest']['app']['graphs']){const _0x378d5d=_0x1c507d['activities'];for(const _0x54e9bc in _0x378d5d){const _0x548301=_0x378d5d[_0x54e9bc];['activity']['includes'](_0x548301['type'])&&(_0x548301['type']='hook');}}}async['bindParents'](){const _0xb44196=this['manifest']['app']['graphs'];for(const _0x51faf2 of _0xb44196){if(_0x51faf2['transitions'])for(const _0x31e25d in _0x51faf2['transitions']){const _0x36a855=_0x51faf2['transitions'][_0x31e25d];for(const _0x1cb4aa of _0x36a855){const _0x318335=_0x1cb4aa['to'];_0x51faf2['activities'][_0x318335]['parent']=_0x31e25d;}_0x51faf2['activities'][_0x31e25d]['transitions']=_0x36a855;}}}['collectValues'](_0x113392,_0x37c65d){for(const [_0x3caafd,_0x491ffb]of Object['entries'](_0x113392)){if(_0x3caafd==='enum'||_0x3caafd==='examples'||_0x3caafd==='default'){if(Array['isArray'](_0x491ffb))for(const _0x519f7f of _0x491ffb){typeof _0x519f7f==='string'&&_0x519f7f['length']>0x5&&_0x37c65d['add'](_0x519f7f);}else typeof _0x491ffb==='string'&&_0x491ffb['length']>0x5&&_0x37c65d['add'](_0x491ffb);}else typeof _0x491ffb==='object'&&this['collectValues'](_0x491ffb,_0x37c65d);}}['traverse'](_0x56df6b,_0x132177){for(const _0x33f2d7 of Object['values'](_0x56df6b)){typeof _0x33f2d7==='object'&&('schema'in _0x33f2d7?this['collectValues'](_0x33f2d7['schema'],_0x132177):this['traverse'](_0x33f2d7,_0x132177));}}async['generateSymVals'](){const _0x240c63=new Set();for(const _0x179202 of this['manifest']['app']['graphs']){this['traverse'](_0x179202,_0x240c63);}const _0x423bb5=await this['store']['getSymbolValues'](),_0x20ff4c=Object['keys'](_0x423bb5)['length'],_0x58cfa8=Math['pow'](0x34,0x2)-0x1,_0x4f9f21=serializer_1['SerializerService']['filterSymVals'](_0x20ff4c,_0x58cfa8,_0x423bb5,_0x240c63);await this['store']['addSymbolValues'](_0x4f9f21);}['resolveJobMapsPaths'](){function _0x391a16(_0x135cc5){const _0x156914=[];function _0x3a287c(_0x534552,_0xc1aadf=[]){for(const _0x1fd9fb in _0x534552){if(typeof _0x534552[_0x1fd9fb]==='object'&&_0x534552[_0x1fd9fb]!==null&&!('@pipe'in _0x534552[_0x1fd9fb])){const _0x1103c9=[..._0xc1aadf,_0x1fd9fb];_0x3a287c(_0x534552[_0x1fd9fb],_0x1103c9);}else{const _0x24c226=[..._0xc1aadf,_0x1fd9fb]['join']('/');if(!_0x24c226['includes']('[')){const _0x56bbaf='data/'+_0x24c226;!_0x156914['includes'](_0x56bbaf)&&_0x156914['push'](_0x56bbaf);}else{const [_0x10b1d1,_0x302809]=_0x24c226['split']('['),[_0x6afe99,_0xb6ffaa]=_0x302809['split'](']');if(!isNaN(parseInt(_0x6afe99)))for(let _0x2f8c2c=0x0;_0x2f8c2c<parseInt(_0x6afe99);_0x2f8c2c++){const _0x274e52='data/'+_0x10b1d1+'/'+_0x2f8c2c;!_0x156914['includes'](_0x274e52)&&_0x156914['push'](_0x274e52);}}}}}return _0x135cc5&&_0x3a287c(_0x135cc5),_0x156914;}for(const _0x5a0c18 of this['manifest']['app']['graphs']){let _0x58721c=[];const [,_0x25b6c9]=this['findTrigger'](_0x5a0c18);for(const _0xa3ed13 in _0x5a0c18['activities']){const _0x504cb6=_0x5a0c18['activities'][_0xa3ed13];_0x58721c=_0x58721c['concat'](_0x391a16(_0x504cb6['job']?.['maps']));}_0x25b6c9['PRODUCES']=_0x58721c;}}['resolveMappingDependencies'](){const _0x581ada=[];function _0x497fab(_0x2ac7cf,_0x3455ba){for(const _0x2d6e56 in _0x2ac7cf){if(typeof _0x2ac7cf[_0x2d6e56]==='string'){const _0x3efce9=_0x2ac7cf[_0x2d6e56],_0xefceef=_0x3efce9['match'](/^\{[^@].*}$/);_0xefceef&&!validator_1['Validator']['CONTEXT_VARS']['includes'](_0x3efce9)&&(_0x3efce9['split']('.')[0x1]!=='input'&&(_0x581ada['push'](_0x3efce9),_0x3455ba['push'](_0x3efce9)));}else typeof _0x2ac7cf[_0x2d6e56]==='object'&&_0x2ac7cf[_0x2d6e56]!==null&&_0x497fab(_0x2ac7cf[_0x2d6e56],_0x3455ba);}}const _0x1d89d5=this['manifest']['app']['graphs'];for(const _0x5d9202 of _0x1d89d5){const _0x4adb8e=_0x5d9202['activities'];for(const _0x3b624c in _0x4adb8e){const _0x276e33=_0x4adb8e[_0x3b624c];_0x276e33['consumes']=[],_0x497fab(_0x276e33,_0x276e33['consumes']),_0x276e33['consumes']=this['groupMappingRules'](_0x276e33['consumes']);}}const _0x49b034=this['groupMappingRules'](_0x581ada);for(const _0x570a5f of _0x1d89d5){const _0x5308a4=_0x570a5f['activities'];for(const _0x316d2e in _0x5308a4){const _0x4cda08=_0x5308a4[_0x316d2e];_0x4cda08['produces']=_0x49b034[''+_0x316d2e]||[];}}}['groupMappingRules'](_0x38b98f){_0x38b98f=Array['from'](new Set(_0x38b98f))['sort']();const _0x38229f={};for(const _0x6ea44e of _0x38b98f){const [_0x31bc27,_0x1a65d2]=this['resolveMappableValue'](_0x6ea44e);!_0x38229f[_0x31bc27]&&(_0x38229f[_0x31bc27]=[]),_0x38229f[_0x31bc27]['push'](_0x1a65d2);}return _0x38229f;}['resolveMappableValue'](_0x174052){_0x174052=_0x174052['substring'](0x1,_0x174052['length']-0x1);const _0x303fd1=_0x174052['split']('.');if(_0x303fd1[0x0]==='$job'){const [_0x46edcf,..._0x4e9a7c]=_0x303fd1;return[_0x46edcf,_0x4e9a7c['join']('/')];}else{const [_0x12c23c,_0x1b07d7,_0x1a1737,..._0x597e29]=_0x303fd1,_0x356c39={'hook':'hook/data','input':'input/data','output':_0x1a1737==='data'?'output/data':'output/metadata'}[_0x1b07d7];return[_0x12c23c,_0x356c39+'/'+_0x597e29['join']('/')];}}async['deployActivitySchemas'](){const _0xe848d0=this['manifest']['app']['graphs'],_0x1f48ea={};for(const _0x13aecd of _0xe848d0){const _0x1f481c=_0x13aecd['activities'];for(const _0x3ca1f1 in _0x1f481c){const _0x435132=_0x1f481c[_0x3ca1f1];delete _0x435132['transitions'],_0x1f48ea[_0x3ca1f1]=_0x435132;}}await this['store']['setSchemas'](_0x1f48ea,this['getVID']());}async['deploySubscriptions'](){const _0x4c1619=this['manifest']['app']['graphs'],_0xe333e5={};for(const _0x24a1c9 of _0x4c1619){const _0x4f7b17=_0x24a1c9['activities'],_0x42a332=_0x24a1c9['subscribes'];for(const _0x4efb80 in _0x4f7b17){if(_0x4f7b17[_0x4efb80]['type']==='trigger'){_0xe333e5[_0x42a332]=_0x4efb80;break;}}}await this['store']['setSubscriptions'](_0xe333e5,this['getVID']());}['findTrigger'](_0x48d1c6){for(const _0x3872bb in _0x48d1c6['activities']){const _0x4b9378=_0x48d1c6['activities'][_0x3872bb];if(_0x4b9378['type']==='trigger')return[_0x3872bb,_0x4b9378];}return null;}async['deployTransitions'](){const _0xa0128a=this['manifest']['app']['graphs'],_0x1710d2={};for(const _0x37e8f2 of _0xa0128a){if(_0x37e8f2['subscribes']&&_0x37e8f2['subscribes']['startsWith']('.')){const [_0x49d883]=this['findTrigger'](_0x37e8f2);_0x49d883&&(_0x1710d2[_0x37e8f2['subscribes']]={[_0x49d883]:!![]});}if(_0x37e8f2['transitions'])for(const _0x466098 in _0x37e8f2['transitions']){const _0x1cb37d=_0x37e8f2['transitions'][_0x466098],_0x464510={};for(const _0x118ae0 of _0x1cb37d){const _0x5e3482=_0x118ae0['to'];_0x118ae0['conditions']?_0x464510[_0x5e3482]=_0x118ae0['conditions']:_0x464510[_0x5e3482]=!![];}Object['keys'](_0x464510)['length']>0x0&&(_0x1710d2['.'+_0x466098]=_0x464510);}}await this['store']['setTransitions'](_0x1710d2,this['getVID']());}async['deployHookPatterns'](){const _0x40fd29=this['manifest']['app']['graphs'],_0x3d457d={};for(const _0x4d7a44 of _0x40fd29){if(_0x4d7a44['hooks'])for(const _0x5a2565 in _0x4d7a44['hooks']){_0x3d457d[_0x5a2565]=_0x4d7a44['hooks'][_0x5a2565];const _0x5497d8=_0x4d7a44['hooks'][_0x5a2565][0x0]['to'],_0x1e5055=_0x4d7a44['activities'][_0x5497d8];_0x1e5055&&(!_0x1e5055['hook']&&(_0x1e5055['hook']={}),_0x1e5055['hook']['topic']=_0x5a2565);}}await this['store']['setHookRules'](_0x3d457d);}async['deployConsumerGroups'](){const _0x34d4bc={'appId':this['manifest']['app']['id']},_0x4d5684=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x34d4bc);await this['deployConsumerGroup'](_0x4d5684,'ENGINE');for(const _0x298db2 of this['manifest']['app']['graphs']){const _0x4eea40=_0x298db2['activities'];for(const _0xdc4a8d in _0x4eea40){const _0x274f2e=_0x4eea40[_0xdc4a8d];if(_0x274f2e['type']==='worker'&&pipe_1['Pipe']['resolve'](_0x274f2e['subtype'],{})===_0x274f2e['subtype']){_0x34d4bc['topic']=_0x274f2e['subtype'];const _0x3753ff=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x34d4bc);await this['deployConsumerGroup'](_0x3753ff,'WORKER');}}}}async['deployConsumerGroup'](_0x120636,_0x510d84){try{await this['stream']['createConsumerGroup'](_0x120636,_0x510d84);}catch(_0x30256e){this['store']['logger']['info']('router-stream-group-exists',{'stream':_0x120636,'group':_0x510d84});}}}exports['Deployer']=Deployer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0x393a64,_0x2e9b12){const _0xd6d941=_0x2372,_0x1eaa11=_0x393a64();while(!![]){try{const _0xa63859=parseInt(_0xd6d941(0x1a1))/0x1+-parseInt(_0xd6d941(0x19d))/0x2+parseInt(_0xd6d941(0x19f))/0x3*(parseInt(_0xd6d941(0x19b))/0x4)+-parseInt(_0xd6d941(0x1a0))/0x5*(parseInt(_0xd6d941(0x19e))/0x6)+-parseInt(_0xd6d941(0x19c))/0x7*(-parseInt(_0xd6d941(0x199))/0x8)+-parseInt(_0xd6d941(0x19a))/0x9+parseInt(_0xd6d941(0x1a3))/0xa*(parseInt(_0xd6d941(0x1a2))/0xb);if(_0xa63859===_0x2e9b12)break;else _0x1eaa11['push'](_0x1eaa11['shift']());}catch(_0x235ff9){_0x1eaa11['push'](_0x1eaa11['shift']());}}}(_0x4a5f,0x7fbf7));function _0x4a5f(){const _0x5ddf12=['2002674TOnAbR','27858jSjbbh','5uYDyYc','104907ralNQA','7012181XNzDAD','10vJwyFV','11320uvQwUR','6997392XCFzxR','188rsoaCJ','2737zKrjuH','195126DFiwkq'];_0x4a5f=function(){return _0x5ddf12;};return _0x4a5f();}function _0x2372(_0x12cb63,_0x2c71c9){const _0x4a5fd2=_0x4a5f();return _0x2372=function(_0x23727a,_0x515f63){_0x23727a=_0x23727a-0x199;let _0x242e17=_0x4a5fd2[_0x23727a];return _0x242e17;},_0x2372(_0x12cb63,_0x2c71c9);}var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x4dfedc,_0x5ad449,_0xda11c5,_0x1454d1){if(_0x1454d1===undefined)_0x1454d1=_0xda11c5;var _0xf83efe=Object['getOwnPropertyDescriptor'](_0x5ad449,_0xda11c5);(!_0xf83efe||('get'in _0xf83efe?!_0x5ad449['__esModule']:_0xf83efe['writable']||_0xf83efe['configurable']))&&(_0xf83efe={'enumerable':!![],'get':function(){return _0x5ad449[_0xda11c5];}}),Object['defineProperty'](_0x4dfedc,_0x1454d1,_0xf83efe);}:function(_0x69a8e9,_0x4af13b,_0x5503dd,_0x3fa564){if(_0x3fa564===undefined)_0x3fa564=_0x5503dd;_0x69a8e9[_0x3fa564]=_0x4af13b[_0x5503dd];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x4d6e99,_0x2ff4f8){Object['defineProperty'](_0x4d6e99,'default',{'enumerable':!![],'value':_0x2ff4f8});}:function(_0x2b165e,_0x124fb5){_0x2b165e['default']=_0x124fb5;}),__importStar=this&&this['__importStar']||function(_0x2a823e){if(_0x2a823e&&_0x2a823e['__esModule'])return _0x2a823e;var _0x355837={};if(_0x2a823e!=null){for(var _0x430be8 in _0x2a823e)if(_0x430be8!=='default'&&Object['prototype']['hasOwnProperty']['call'](_0x2a823e,_0x430be8))__createBinding(_0x355837,_0x2a823e,_0x430be8);}return __setModuleDefault(_0x355837,_0x2a823e),_0x355837;},__importDefault=this&&this['__importDefault']||function(_0x28e719){return _0x28e719&&_0x28e719['__esModule']?_0x28e719:{'default':_0x28e719};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CompilerService']=void 0x0;const fs=__importStar(require('fs/promises')),path=__importStar(require('path')),json_schema_ref_parser_1=__importDefault(require('@apidevtools/json-schema-ref-parser')),js_yaml_1=__importDefault(require('js-yaml')),deployer_1=require('./deployer'),validator_1=require('./validator');class CompilerService{constructor(_0x325a35,_0x289001,_0x57d356){this['store']=_0x325a35,this['stream']=_0x289001,this['logger']=_0x57d356;}async['plan'](_0x409308){try{let _0x39e5c7;this['isPath'](_0x409308)?_0x39e5c7=await json_schema_ref_parser_1['default']['dereference'](_0x409308):_0x39e5c7=js_yaml_1['default']['load'](_0x409308);const _0x4bcb6d=new validator_1['Validator'](_0x39e5c7);return _0x4bcb6d['validate'](this['store']),_0x39e5c7;}catch(_0x183c82){this['logger']['error']('compiler-plan-error',_0x183c82);}}['isPath'](_0x1b6b58){return!_0x1b6b58['trim']()['startsWith']('app:');}async['deploy'](_0xa0e95b){try{let _0x279827;this['isPath'](_0xa0e95b)?(_0x279827=await json_schema_ref_parser_1['default']['dereference'](_0xa0e95b),await this['saveAsJSON'](_0xa0e95b,_0x279827)):_0x279827=js_yaml_1['default']['load'](_0xa0e95b);const _0x105c2e=new validator_1['Validator'](_0x279827);_0x105c2e['validate'](this['store']);const _0x329e31=new deployer_1['Deployer'](_0x279827);return await _0x329e31['deploy'](this['store'],this['stream']),await this['store']['setApp'](_0x279827['app']['id'],_0x279827['app']['version']),_0x279827;}catch(_0xbe15ad){this['logger']['error']('compiler-deploy-error',_0xbe15ad);}}async['activate'](_0x116e18,_0x5ef771){return await this['store']['activateAppVersion'](_0x116e18,_0x5ef771);}async['saveAsJSON'](_0xc32e71,_0x532328){const _0x41ca33=JSON['stringify'](_0x532328,null,0x2),_0x4e719f=path['join'](path['dirname'](_0xc32e71),'.hotmesh.'+_0x532328['app']['id']+'.'+_0x532328['app']['version']+'.json');await fs['writeFile'](_0x4e719f,_0x41ca33,'utf8');}}exports['CompilerService']=CompilerService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0x3de7d3,_0xadb814){const _0x5c0144=_0x4ba1,_0x1429f3=_0x3de7d3();while(!![]){try{const _0xb3e249=-parseInt(_0x5c0144(0x12c))/0x1*(-parseInt(_0x5c0144(0x131))/0x2)+-parseInt(_0x5c0144(0x126))/0x3*(parseInt(_0x5c0144(0x12a))/0x4)+-parseInt(_0x5c0144(0x12f))/0x5*(-parseInt(_0x5c0144(0x127))/0x6)+parseInt(_0x5c0144(0x128))/0x7*(parseInt(_0x5c0144(0x130))/0x8)+-parseInt(_0x5c0144(0x129))/0x9+parseInt(_0x5c0144(0x12b))/0xa+parseInt(_0x5c0144(0x12d))/0xb*(-parseInt(_0x5c0144(0x12e))/0xc);if(_0xb3e249===_0xadb814)break;else _0x1429f3['push'](_0x1429f3['shift']());}catch(_0x3d0863){_0x1429f3['push'](_0x1429f3['shift']());}}}(_0x3b74,0x1d194));function _0x3b74(){const _0x20eee1=['2113758TdxDzZ','294772TrBaEN','875260BNrupB','792EhLHgU','34342SYeDmQ','228gjPDyK','5TdREXA','16BjNXpU','360kRsFWx','3zObbBW','1267362GtBoNY','160118qJRjOl'];_0x3b74=function(){return _0x20eee1;};return _0x3b74();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Validator']=void 0x0;function _0x4ba1(_0x2fcab0,_0x230925){const _0x3b7483=_0x3b74();return _0x4ba1=function(_0x4ba18f,_0x25ea33){_0x4ba18f=_0x4ba18f-0x126;let _0x1352a1=_0x3b7483[_0x4ba18f];return _0x1352a1;},_0x4ba1(_0x2fcab0,_0x230925);}const pipe_1=require('../pipe');class Validator{constructor(_0x2f4741){this['manifest']=null,this['activityIds']=[],this['mappingStatements']={},this['store']=null,this['manifest']=_0x2f4741;}async['validate'](_0x422699){this['store']=_0x422699,this['getMappingStatements'](),this['validateActivityIds'](),this['validateReferencedActivityIds'](),this['validateMappingStatements'](),this['validateTransitions'](),this['validateTransitionConditions'](),this['validateStats'](),this['validateSchemas'](),this['validateUniqueHandledTopics'](),this['validateGraphPublishSubscribe'](),this['validateHooks'](),this['validateConditionalStatements']();}['validateActivityIds'](){const _0x4f2677=new Set();this['manifest']['app']['graphs']['forEach'](_0x543190=>{const _0x373300=Object['keys'](_0x543190['activities']);_0x373300['forEach'](_0x430cc9=>{if(_0x4f2677['has'](_0x430cc9))throw new Error('Duplicate\x20activity\x20id\x20found:\x20'+_0x430cc9);else _0x4f2677['add'](_0x430cc9);});}),this['activityIds']=Array['from'](_0x4f2677);}['isMappingStatement'](_0x357ac4){return typeof _0x357ac4==='string'&&_0x357ac4['startsWith']('{')&&_0x357ac4['endsWith']('}');}['extractMappingStatements'](_0x1d6e66,_0x55a74c,_0xf66a27){for(const _0x5eeabe in _0x1d6e66){if(typeof _0x1d6e66[_0x5eeabe]==='object'&&_0x1d6e66[_0x5eeabe]!==null)this['extractMappingStatements'](_0x1d6e66[_0x5eeabe],_0x55a74c,_0xf66a27);else this['isMappingStatement'](_0x1d6e66[_0x5eeabe])&&(!_0x55a74c[_0xf66a27]&&(_0x55a74c[_0xf66a27]=[]),_0x55a74c[_0xf66a27]['push'](_0x1d6e66[_0x5eeabe]));}}['getMappingStatements'](){const _0x2eaa71={};this['manifest']['app']['graphs']['forEach'](_0x43f401=>{const _0x34d920=_0x43f401['activities'];for(const _0x37e15c in _0x34d920){const _0x3125ae=_0x34d920[_0x37e15c];this['extractMappingStatements'](_0x3125ae,_0x2eaa71,_0x37e15c);}}),this['mappingStatements']=_0x2eaa71;}['validateReferencedActivityIds'](){const _0x571235=this['mappingStatements'],_0x27e73d=this['activityIds'];for(const _0xf052aa in _0x571235){const _0x4eed92=_0x571235[_0xf052aa];_0x4eed92['forEach'](_0x4662df=>{if(_0x4662df['startsWith']('{')&&_0x4662df['endsWith']('}')){const _0x3f0257=_0x4662df['slice'](0x1,-0x1)['split']('.'),_0x5210a8=_0x3f0257[0x0];if(!(Validator['SYS_VARS']['includes'](_0x5210a8)||_0x27e73d['includes'](_0x5210a8)||this['isFunction'](_0x4662df)||this['isContextVariable'](_0x4662df)))throw new Error('Mapping\x20statement\x20references\x20non-existent\x20activity:\x20'+_0x4662df);}});}}['isFunction'](_0x433e55){return _0x433e55['startsWith']('{@')&&pipe_1['Pipe']['resolveFunction'](_0x433e55);}['isContextVariable'](_0x15589d){return['{$input}','{$output}','{$item}','{$key}','{$index}']['includes'](_0x15589d);}['validateMappingStatements'](){}['validateTransitions'](){}['validateTransitionConditions'](){}['validateStats'](){}['validateSchemas'](){}['validateUniqueHandledTopics'](){}['validateGraphPublishSubscribe'](){}['validateHooks'](){}['validateConditionalStatements'](){}}exports['Validator']=Validator,Validator['SYS_VARS']=['$app','$self','$graph','$job'],Validator['CONTEXT_VARS']=['{$input}','{$output}','{$item}','{$key}','{$index}'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(_0xc306b2,_0xc01fed){const _0x3b7bf8=_0x26e6,_0x427002=_0xc306b2();while(!![]){try{const _0x4db61e=parseInt(_0x3b7bf8(0x1a4))/0x1+-parseInt(_0x3b7bf8(0x1ac))/0x2+-parseInt(_0x3b7bf8(0x1a5))/0x3*(-parseInt(_0x3b7bf8(0x1ae))/0x4)+-parseInt(_0x3b7bf8(0x1ad))/0x5+-parseInt(_0x3b7bf8(0x1ab))/0x6*(-parseInt(_0x3b7bf8(0x1a6))/0x7)+parseInt(_0x3b7bf8(0x1aa))/0x8*(-parseInt(_0x3b7bf8(0x1a9))/0x9)+parseInt(_0x3b7bf8(0x1a8))/0xa*(parseInt(_0x3b7bf8(0x1a7))/0xb);if(_0x4db61e===_0xc01fed)break;else _0x427002['push'](_0x427002['shift']());}catch(_0x4b5319){_0x427002['push'](_0x427002['shift']());}}}(_0x39bf,0x338fa));var __importDefault=this&&this['__importDefault']||function(_0x35fd62){return _0x35fd62&&_0x35fd62['__esModule']?_0x35fd62:{'default':_0x35fd62};};function _0x39bf(){const _0x8f1e9e=['6mEbbtr','33936Hagiah','418660uTPqEQ','156rArDiJ','103883BfTtin','1488YhddvA','2898931kcmDWS','44143tceIbw','460JPnqsv','922644NETtgQ','32hsrLdj'];_0x39bf=function(){return _0x8f1e9e;};return _0x39bf();}function _0x26e6(_0x2ae416,_0x2bebe9){const _0x39bfdb=_0x39bf();return _0x26e6=function(_0x26e603,_0x2ce163){_0x26e603=_0x26e603-0x1a4;let _0x4e68ec=_0x39bfdb[_0x26e603];return _0x4e68ec;},_0x26e6(_0x2ae416,_0x2bebe9);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['EngineService']=void 0x0;const key_1=require('../../modules/key'),enums_1=require('../../modules/enums'),utils_1=require('../../modules/utils'),activities_1=__importDefault(require('../activities')),compiler_1=require('../compiler'),exporter_1=require('../exporter'),reporter_1=require('../reporter'),router_1=require('../router'),serializer_1=require('../serializer'),factory_1=require('../search/factory'),factory_2=require('../store/factory'),factory_3=require('../stream/factory'),factory_4=require('../sub/factory'),task_1=require('../task'),stream_1=require('../../types/stream');class EngineService{constructor(){this['cacheMode']='cache',this['untilVersion']=null,this['jobCallbacks']={},this['reporting']=![],this['jobId']=0x1;}static async['init'](_0x4ffcc7,_0x46401c,_0x1b1612,_0x906b9b,_0x10468f){if(_0x906b9b['engine']){const _0x53984e=new EngineService();_0x53984e['verifyEngineFields'](_0x906b9b),_0x53984e['namespace']=_0x4ffcc7,_0x53984e['appId']=_0x46401c,_0x53984e['guid']=_0x1b1612,_0x53984e['logger']=_0x10468f,await _0x53984e['initSearchChannel'](_0x906b9b['engine']['store']),await _0x53984e['initStoreChannel'](_0x906b9b['engine']['store']),await _0x53984e['initSubChannel'](_0x906b9b['engine']['sub'],_0x906b9b['engine']['pub']),await _0x53984e['initStreamChannel'](_0x906b9b['engine']['stream'],_0x906b9b['engine']['store']),_0x53984e['router']=await _0x53984e['initRouter'](_0x906b9b);const _0x33b766=_0x53984e['store']['mintKey'](key_1['KeyType']['STREAMS'],{'appId':_0x53984e['appId']});return _0x53984e['router']['consumeMessages'](_0x33b766,'ENGINE',_0x53984e['guid'],_0x53984e['processStreamMessage']['bind'](_0x53984e)),_0x53984e['taskService']=new task_1['TaskService'](_0x53984e['store'],_0x10468f),_0x53984e['exporter']=new exporter_1['ExporterService'](_0x53984e['appId'],_0x53984e['store'],_0x10468f),_0x53984e['inited']=(0x0,utils_1['formatISODate'])(new Date()),_0x53984e;}}['verifyEngineFields'](_0x392216){if(!(0x0,utils_1['identifyProvider'])(_0x392216['engine']['store'])||!(0x0,utils_1['identifyProvider'])(_0x392216['engine']['stream'])||!(0x0,utils_1['identifyProvider'])(_0x392216['engine']['sub']))throw new Error('engine\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields.');}async['initSearchChannel'](_0x49fef0,_0x4e54ce){this['search']=await factory_1['SearchServiceFactory']['init'](_0x49fef0,_0x4e54ce,this['namespace'],this['appId'],this['logger']);}async['initStoreChannel'](_0x566fb7){this['store']=await factory_2['StoreServiceFactory']['init'](_0x566fb7,this['namespace'],this['appId'],this['logger']);}async['initSubChannel'](_0x44697e,_0xad1780){this['subscribe']=await factory_4['SubServiceFactory']['init'](_0x44697e,_0xad1780,this['namespace'],this['appId'],this['guid'],this['logger']);}async['initStreamChannel'](_0x1ab167,_0x28598e){this['stream']=await factory_3['StreamServiceFactory']['init'](_0x1ab167,_0x28598e,this['namespace'],this['appId'],this['logger']);}async['initRouter'](_0x48d37f){const _0x111524=await this['store']['getThrottleRate'](':');return new router_1['Router']({'namespace':this['namespace'],'appId':this['appId'],'guid':this['guid'],'role':stream_1['StreamRole']['ENGINE'],'reclaimDelay':_0x48d37f['engine']['reclaimDelay'],'reclaimCount':_0x48d37f['engine']['reclaimCount'],'throttle':_0x111524,'readonly':_0x48d37f['engine']['readonly']},this['stream'],this['logger']);}async['fetchAndVerifyVID'](_0x43378f,_0x17a595=0x0){if(isNaN(Number(_0x43378f['version']))){const _0x19a91b=await this['store']['getApp'](_0x43378f['id'],!![]);if(!isNaN(Number(_0x19a91b['version']))){if(!this['apps'])this['apps']={};return this['apps'][_0x43378f['id']]=_0x19a91b,{'id':_0x43378f['id'],'version':_0x19a91b['version']};}else{if(_0x17a595<0xa)return await(0x0,utils_1['sleepFor'])(enums_1['HMSH_QUORUM_DELAY_MS']*0x2),await this['fetchAndVerifyVID'](_0x43378f,_0x17a595+0x1);else this['logger']['error']('engine-vid-resolution-error',{'id':_0x43378f['id'],'guid':this['guid']});}}return _0x43378f;}async['getVID'](_0x2f5039){if(this['cacheMode']==='nocache'){const _0xafe9de=await this['store']['getApp'](this['appId'],!![]);if(_0xafe9de['version']['toString']()===this['untilVersion']['toString']()){if(!this['apps'])this['apps']={};this['apps'][this['appId']]=_0xafe9de,this['setCacheMode']('cache',_0xafe9de['version']['toString']());}return{'id':this['appId'],'version':_0xafe9de['version']};}else return!this['apps']&&_0x2f5039?(this['apps']={},this['apps'][this['appId']]=_0x2f5039,_0x2f5039):await this['fetchAndVerifyVID']({'id':this['appId'],'version':this['apps']?.[this['appId']]['version']});}['setCacheMode'](_0x12523a,_0x116f28){this['logger']['info']('engine-executable-cache',{'mode':_0x12523a,[_0x12523a==='cache'?'target':'until']:_0x116f28}),this['cacheMode']=_0x12523a,this['untilVersion']=_0x116f28;}async['routeToSubscribers'](_0x57e4b7,_0x5250a8){const _0x56b3b2=this['jobCallbacks'][_0x5250a8['metadata']['jid']];_0x56b3b2&&(this['delistJobCallback'](_0x5250a8['metadata']['jid']),_0x56b3b2(_0x57e4b7,_0x5250a8));}async['processWebHooks'](){this['taskService']['processWebHooks'](this['hook']['bind'](this));}async['processTimeHooks'](){this['taskService']['processTimeHooks'](this['hookTime']['bind'](this));}async['throttle'](_0x6e3936){try{this['router']?.['setThrottle'](_0x6e3936);}catch(_0x297726){this['logger']['error']('engine-throttle-error',{'error':_0x297726});}}async['initActivity'](_0x3a26af,_0x585389={},_0x1153a1){const [_0x2aa374,_0x166887]=await this['getSchema'](_0x3a26af),_0x54247d=activities_1['default'][utils_1['polyfill']['resolveActivityType'](_0x166887['type'])];if(_0x54247d){const _0x2602bf=(0x0,utils_1['formatISODate'])(new Date()),_0xaeee44={'aid':_0x2aa374,'atp':_0x166887['type'],'stp':_0x166887['subtype'],'ac':_0x2602bf,'au':_0x2602bf},_0x9f2e1e=null;return new _0x54247d(_0x166887,_0x585389,_0xaeee44,_0x9f2e1e,this,_0x1153a1);}else throw new Error('activity\x20type\x20'+_0x166887['type']+'\x20not\x20found');}async['getSchema'](_0x19f038){const _0x279ef3=await this['store']['getApp'](this['appId']);if(!_0x279ef3)throw new Error('no\x20app\x20found\x20for\x20id\x20'+this['appId']);if(this['isPrivate'](_0x19f038)){const _0x1ced92=_0x19f038['substring'](0x1),_0x3e9ecc=await this['store']['getSchema'](_0x1ced92,await this['getVID'](_0x279ef3));return[_0x1ced92,_0x3e9ecc];}else{const _0x30921e=await this['store']['getSubscription'](_0x19f038,await this['getVID'](_0x279ef3));if(_0x30921e){const _0x5a3488=await this['store']['getSchema'](_0x30921e,await this['getVID'](_0x279ef3));return[_0x30921e,_0x5a3488];}}throw new Error('no\x20subscription\x20found\x20for\x20topic\x20'+_0x19f038+'\x20in\x20app\x20'+this['appId']+'\x20for\x20app\x20version\x20'+_0x279ef3['version']);}async['getSettings'](){return await this['store']['getSettings']();}['isPrivate'](_0x4da3a2){return _0x4da3a2['startsWith']('.');}async['plan'](_0x598003){const _0x28582a=new compiler_1['CompilerService'](this['store'],this['stream'],this['logger']);return await _0x28582a['plan'](_0x598003);}async['deploy'](_0x28cf3d){const _0x2f5140=new compiler_1['CompilerService'](this['store'],this['stream'],this['logger']);return await _0x2f5140['deploy'](_0x28cf3d);}async['getStats'](_0x25aa4a,_0x3ca3f9){const {id:_0x1aa88d,version:_0xe4dc38}=await this['getVID'](),_0x19ed3a=new reporter_1['ReporterService']({'id':_0x1aa88d,'version':_0xe4dc38},this['store'],this['logger']),_0x4662a7=await this['resolveQuery'](_0x25aa4a,_0x3ca3f9);return await _0x19ed3a['getStats'](_0x4662a7);}async['getIds'](_0x13e212,_0x5af70c,_0x26c9d8=[]){const {id:_0x24410c,version:_0x5814f6}=await this['getVID'](),_0x364cdd=new reporter_1['ReporterService']({'id':_0x24410c,'version':_0x5814f6},this['store'],this['logger']),_0x276324=await this['resolveQuery'](_0x13e212,_0x5af70c);return await _0x364cdd['getIds'](_0x276324,_0x26c9d8);}async['resolveQuery'](_0x12d703,_0x33e0f1){const _0x4cd421=await this['initActivity'](_0x12d703,_0x33e0f1['data']);return await _0x4cd421['getState'](),{'end':_0x33e0f1['end'],'start':_0x33e0f1['start'],'range':_0x33e0f1['range'],'granularity':_0x4cd421['resolveGranularity'](),'key':_0x4cd421['resolveJobKey'](_0x4cd421['createInputContext']()),'sparse':_0x33e0f1['sparse']};}async['processStreamMessage'](_0x371b15){this['logger']['debug']('engine-process',{'jid':_0x371b15['metadata']['jid'],'gid':_0x371b15['metadata']['gid'],'dad':_0x371b15['metadata']['dad'],'aid':_0x371b15['metadata']['aid'],'status':_0x371b15['status']||stream_1['StreamStatus']['SUCCESS'],'code':_0x371b15['code']||0xc8,'type':_0x371b15['type']});const _0x25281a={'metadata':{'guid':_0x371b15['metadata']['guid'],'jid':_0x371b15['metadata']['jid'],'gid':_0x371b15['metadata']['gid'],'dad':_0x371b15['metadata']['dad'],'aid':_0x371b15['metadata']['aid']},'data':_0x371b15['data']};if(_0x371b15['type']===stream_1['StreamDataType']['TIMEHOOK']){const _0x35ad53=await this['initActivity']('.'+_0x371b15['metadata']['aid'],_0x25281a['data'],_0x25281a);await _0x35ad53['processTimeHookEvent'](_0x371b15['metadata']['jid']);}else{if(_0x371b15['type']===stream_1['StreamDataType']['WEBHOOK']){const _0x420d18=await this['initActivity']('.'+_0x371b15['metadata']['aid'],_0x25281a['data'],_0x25281a);await _0x420d18['processWebHookEvent'](_0x371b15['status'],_0x371b15['code']);}else{if(_0x371b15['type']===stream_1['StreamDataType']['TRANSITION']){const _0x5d6430=await this['initActivity']('.'+_0x371b15['metadata']['aid'],_0x25281a['data'],_0x25281a);await _0x5d6430['process']();}else{if(_0x371b15['type']===stream_1['StreamDataType']['AWAIT']){_0x25281a['metadata']={..._0x25281a['metadata'],'pj':_0x371b15['metadata']['jid'],'pg':_0x371b15['metadata']['gid'],'pd':_0x371b15['metadata']['dad'],'pa':_0x371b15['metadata']['aid'],'px':_0x371b15['metadata']['await']===![],'trc':_0x371b15['metadata']['trc'],'spn':_0x371b15['metadata']['spn']};const _0x244f1c=await this['initActivity'](_0x371b15['metadata']['topic'],_0x371b15['data'],_0x25281a);await _0x244f1c['process']();}else{if(_0x371b15['type']===stream_1['StreamDataType']['RESULT']){const _0x4a43bc=await this['initActivity']('.'+_0x25281a['metadata']['aid'],_0x371b15['data'],_0x25281a);await _0x4a43bc['processEvent'](_0x371b15['status'],_0x371b15['code']);}else{const _0x2dee7b=await this['initActivity']('.'+_0x371b15['metadata']['aid'],_0x371b15['data'],_0x25281a);await _0x2dee7b['processEvent'](_0x371b15['status'],_0x371b15['code'],'output');}}}}}this['logger']['debug']('engine-process-end',{'jid':_0x371b15['metadata']['jid'],'gid':_0x371b15['metadata']['gid'],'aid':_0x371b15['metadata']['aid']});}async['execAdjacentParent'](_0x5bcd75,_0x352ff6,_0x18ca27=![]){if(this['hasParentJob'](_0x5bcd75)){const _0x469186=this['resolveError'](_0x352ff6['metadata']),_0x1eb7d9=_0x5bcd75['$self']?.['output']?.['metadata']?.['l2s']||_0x5bcd75['$self']?.['output']?.['metadata']?.['l1s'],_0x50ad18={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':_0x5bcd75['metadata']['pj'],'gid':_0x5bcd75['metadata']['pg'],'dad':_0x5bcd75['metadata']['pd'],'aid':_0x5bcd75['metadata']['pa'],'trc':_0x5bcd75['metadata']['trc'],'spn':_0x1eb7d9},'type':stream_1['StreamDataType']['RESULT'],'data':_0x352ff6['data']};if(_0x469186&&_0x469186['code'])_0x50ad18['status']=stream_1['StreamStatus']['ERROR'],_0x50ad18['data']=_0x469186,_0x50ad18['code']=_0x469186['code'],_0x50ad18['stack']=_0x469186['stack'];else _0x18ca27?(_0x50ad18['status']=stream_1['StreamStatus']['PENDING'],_0x50ad18['code']=enums_1['HMSH_CODE_PENDING']):(_0x50ad18['status']=stream_1['StreamStatus']['SUCCESS'],_0x50ad18['code']=enums_1['HMSH_CODE_SUCCESS']);return await this['router']?.['publishMessage'](null,_0x50ad18);}}['hasParentJob'](_0x2e110e,_0x509fda=![]){if(_0x509fda)return Boolean(_0x2e110e['metadata']['pj']&&_0x2e110e['metadata']['pa']&&!_0x2e110e['metadata']['px']);return Boolean(_0x2e110e['metadata']['pj']&&_0x2e110e['metadata']['pa']);}['resolveError'](_0x212288){if(_0x212288&&_0x212288['err'])return JSON['parse'](_0x212288['err']);}async['interrupt'](_0x398f3b,_0x28fec1,_0x1ce185={}){await this['store']['interrupt'](_0x398f3b,_0x28fec1,_0x1ce185);const _0x254b8d=await this['getState'](_0x398f3b,_0x28fec1),_0x1a7cde={'interrupt':_0x1ce185['descend'],'expire':_0x1ce185['expire']};return await this['runJobCompletionTasks'](_0x254b8d,_0x1a7cde);}async['scrub'](_0xd48d85){await this['store']['scrub'](_0xd48d85);}async['hook'](_0x1a6a8a,_0x333497,_0x5ccc20=stream_1['StreamStatus']['SUCCESS'],_0x3e3a65=0xc8){const _0x176c22=await this['taskService']['getHookRule'](_0x1a6a8a),[_0x2dede2]=await this['getSchema']('.'+_0x176c22['to']),_0x968e66={'type':stream_1['StreamDataType']['WEBHOOK'],'status':_0x5ccc20,'code':_0x3e3a65,'metadata':{'guid':(0x0,utils_1['guid'])(),'aid':_0x2dede2,'topic':_0x1a6a8a},'data':_0x333497};return await this['router']?.['publishMessage'](null,_0x968e66);}async['hookTime'](_0x352e10,_0x26e872,_0x203276,_0x215a6e){if(_0x215a6e==='interrupt'||_0x215a6e==='expire')return await this['interrupt'](_0x203276,_0x352e10,{'suppress':!![],'expire':0x1});const [_0x2fb840,..._0x644c32]=_0x203276['split'](','),_0x4d6f6e=','+_0x644c32['join'](','),_0xe14dc6={'type':stream_1['StreamDataType']['TIMEHOOK'],'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':_0x352e10,'gid':_0x26e872,'dad':_0x4d6f6e,'aid':_0x2fb840},'data':{'timestamp':Date['now']()}};await this['router']?.['publishMessage'](null,_0xe14dc6);}async['hookAll'](_0x78136c,_0x380231,_0x4422ce,_0x2a937b=[]){const _0x91b25c=await this['getVID'](),_0x4bea2f=await this['taskService']['getHookRule'](_0x78136c);if(_0x4bea2f){const _0x543769=await(0x0,utils_1['getSubscriptionTopic'])(_0x4bea2f['to'],this['store'],_0x91b25c),_0x5a65c1=await this['resolveQuery'](_0x543769,_0x4422ce),_0x3ac9cf=new reporter_1['ReporterService'](_0x91b25c,this['store'],this['logger']),_0x19bfcf=await _0x3ac9cf['getWorkItems'](_0x5a65c1,_0x2a937b);if(_0x19bfcf['length']){const _0x5e43a3=new task_1['TaskService'](this['store'],this['logger']);await _0x5e43a3['enqueueWorkItems'](_0x19bfcf['map'](_0x9a513=>[_0x78136c,_0x9a513,_0x4422ce['scrub']||![],JSON['stringify'](_0x380231)]['join'](key_1['VALSEP']))),this['subscribe']['publish'](key_1['KeyType']['QUORUM'],{'type':'work','originator':this['guid']},this['appId']);}return _0x19bfcf;}else throw new Error('unable\x20to\x20find\x20hook\x20rule\x20for\x20topic\x20'+_0x78136c);}async['pub'](_0x1fdd40,_0xbb5ee6,_0xd1f1c0,_0x424fc6){const _0x26e929=await this['initActivity'](_0x1fdd40,_0xbb5ee6,_0xd1f1c0);if(_0x26e929)return await _0x26e929['process'](_0x424fc6);else throw new Error('unable\x20to\x20process\x20activity\x20for\x20topic\x20'+_0x1fdd40);}async['sub'](_0x3616f2,_0x1ea009){const _0x8bb984=async(_0x21d1b7,_0x1865f5)=>{_0x1ea009(_0x1865f5['topic'],_0x1865f5['job']);};return await this['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x8bb984,this['appId'],_0x3616f2);}async['unsub'](_0xe0dee6){return await this['subscribe']['unsubscribe'](key_1['KeyType']['QUORUM'],this['appId'],_0xe0dee6);}async['psub'](_0x49a451,_0x2801c7){const _0x40e0e5=async(_0x39ecbf,_0x35249f)=>{_0x2801c7(_0x35249f['topic'],_0x35249f['job']);};return await this['subscribe']['psubscribe'](key_1['KeyType']['QUORUM'],_0x40e0e5,this['appId'],_0x49a451);}async['punsub'](_0x2d291f){return await this['subscribe']['punsubscribe'](key_1['KeyType']['QUORUM'],this['appId'],_0x2d291f);}async['pubsub'](_0x19f0da,_0x3c03e5,_0xe2327e,_0x2ef3be=enums_1['HMSH_OTT_WAIT_TIME']){_0xe2327e={'metadata':{'ngn':this['guid'],'trc':_0xe2327e?.['metadata']?.['trc'],'spn':_0xe2327e?.['metadata']?.['spn']}};const _0x35362c=await this['pub'](_0x19f0da,_0x3c03e5,_0xe2327e);return new Promise((_0x4879d3,_0x4dec13)=>{this['registerJobCallback'](_0x35362c,(_0x489b22,_0x5431a4)=>{if(_0x5431a4['metadata']['err']){const _0x271171=JSON['parse'](_0x5431a4['metadata']['err']);_0x4dec13({..._0x271171,'job_id':_0x5431a4['metadata']['jid']});}else _0x4879d3(_0x5431a4);}),setTimeout(()=>{this['delistJobCallback'](_0x35362c),_0x4dec13({'code':enums_1['HMSH_CODE_TIMEOUT'],'message':'timeout','job_id':_0x35362c});},_0x2ef3be);});}async['pubOneTimeSubs'](_0xafa197,_0x581d56,_0xcfbd06=![]){if(this['hasOneTimeSubscription'](_0xafa197)){const _0x37b4d8={'type':'job','topic':_0xafa197['metadata']['jid'],'job':(0x0,utils_1['restoreHierarchy'])(_0x581d56)};this['subscribe']['publish'](key_1['KeyType']['QUORUM'],_0x37b4d8,this['appId'],_0xafa197['metadata']['ngn']);}}async['getPublishesTopic'](_0x1e68d3){const _0x2036e8=await this['getVID'](),_0x165f06=_0x1e68d3['metadata']['aid']||_0x1e68d3['$self']?.['output']?.['metadata']?.['aid'],_0xbd4e8d=await this['store']['getSchema'](_0x165f06,_0x2036e8);return _0xbd4e8d['publishes'];}async['pubPermSubs'](_0x4b71f9,_0x38fc8f,_0x169ad5=![]){const _0x17208e=await this['getPublishesTopic'](_0x4b71f9);if(_0x17208e){const _0x11bed7={'type':'job','topic':_0x17208e,'job':(0x0,utils_1['restoreHierarchy'])(_0x38fc8f)};this['subscribe']['publish'](key_1['KeyType']['QUORUM'],_0x11bed7,this['appId'],_0x17208e+'.'+_0x4b71f9['metadata']['jid']);}}async['add'](_0x3ddaa5){return await this['router']?.['publishMessage'](null,_0x3ddaa5);}['registerJobCallback'](_0x5dc6d1,_0xf07d50){this['jobCallbacks'][_0x5dc6d1]=_0xf07d50;}['delistJobCallback'](_0x3969b3){delete this['jobCallbacks'][_0x3969b3];}['hasOneTimeSubscription'](_0x5b0c5e){return Boolean(_0x5b0c5e['metadata']['ngn']);}async['runJobCompletionTasks'](_0x574ee4,_0x9fc0d7={}){const _0x584215=this['hasParentJob'](_0x574ee4,!![]),_0x2fe48e=this['hasOneTimeSubscription'](_0x574ee4),_0x141c1f=await this['getPublishesTopic'](_0x574ee4);let _0x1997b0;if(_0x584215||_0x2fe48e||_0x141c1f){const _0x2942b8=await this['getState'](_0x574ee4['metadata']['tpc'],_0x574ee4['metadata']['jid']);_0x1997b0=await this['execAdjacentParent'](_0x574ee4,_0x2942b8,_0x9fc0d7['emit']),this['pubOneTimeSubs'](_0x574ee4,_0x2942b8,_0x9fc0d7['emit']),this['pubPermSubs'](_0x574ee4,_0x2942b8,_0x9fc0d7['emit']);}return!_0x9fc0d7['emit']&&this['taskService']['registerJobForCleanup'](_0x574ee4['metadata']['jid'],this['resolveExpires'](_0x574ee4,_0x9fc0d7),_0x9fc0d7),_0x1997b0;}['resolveExpires'](_0x27f594,_0x1365b7){return _0x1365b7['expire']??_0x27f594['metadata']['expire']??enums_1['HMSH_EXPIRE_JOB_SECONDS'];}async['export'](_0x5169fc){return await this['exporter']['export'](_0x5169fc);}async['getRaw'](_0x56a8ad){return await this['store']['getRaw'](_0x56a8ad);}async['getStatus'](_0x3b873c){const {id:_0xc232c}=await this['getVID']();return await this['store']['getStatus'](_0x3b873c,_0xc232c);}async['getState'](_0x26a63e,_0x4cb928){const _0x3dc893=await this['store']['getSymbols']('$'+_0x26a63e),_0x3e08e0={['$'+_0x26a63e]:Object['keys'](_0x3dc893)},_0x1becdd={},_0x3a9002=await this['store']['getState'](_0x4cb928,_0x3e08e0,_0x1becdd);if(!_0x3a9002)throw new Error('not\x20found\x20'+_0x4cb928);const [_0x1c54e9,_0x1a4eaf]=_0x3a9002,_0xc32f71=(0x0,utils_1['restoreHierarchy'])(_0x1c54e9);return _0x1a4eaf&&_0xc32f71['metadata']&&(_0xc32f71['metadata']['js']=_0x1a4eaf),_0xc32f71;}async['getQueryState'](_0x2bfbbb,_0x198cee){return await this['store']['getQueryState'](_0x2bfbbb,_0x198cee);}async['compress'](_0x12f379){const _0x736c36=await this['store']['getSymbolValues'](),_0xc7747d=Object['keys'](_0x736c36)['length'],_0x261abb=Math['pow'](0x34,0x2)-0x1,_0x3a5984=serializer_1['SerializerService']['filterSymVals'](_0xc7747d,_0x261abb,_0x736c36,new Set(_0x12f379));return await this['store']['addSymbolValues'](_0x3a5984);}}exports['EngineService']=EngineService;
|
|
1
|
+
'use strict';function _0x3166(_0x345449,_0xb4b56c){const _0x3e169b=_0x3e16();return _0x3166=function(_0x3166eb,_0x3bbcad){_0x3166eb=_0x3166eb-0x194;let _0x2f4e42=_0x3e169b[_0x3166eb];return _0x2f4e42;},_0x3166(_0x345449,_0xb4b56c);}function _0x3e16(){const _0x28255b=['927936dLkIUR','8386KnLXgS','266958gRXUvV','1210332lnNuOB','7mojJTj','11740356kYgltH','3896BhSiRH','999010rtLTua','2707506DWPgpv'];_0x3e16=function(){return _0x28255b;};return _0x3e16();}(function(_0x53f6f7,_0x80989){const _0x586da5=_0x3166,_0xe9abcc=_0x53f6f7();while(!![]){try{const _0x2b99ac=-parseInt(_0x586da5(0x199))/0x1*(-parseInt(_0x586da5(0x197))/0x2)+parseInt(_0x586da5(0x194))/0x3+parseInt(_0x586da5(0x198))/0x4+parseInt(_0x586da5(0x19c))/0x5+parseInt(_0x586da5(0x195))/0x6+parseInt(_0x586da5(0x196))/0x7*(-parseInt(_0x586da5(0x19b))/0x8)+-parseInt(_0x586da5(0x19a))/0x9;if(_0x2b99ac===_0x80989)break;else _0xe9abcc['push'](_0xe9abcc['shift']());}catch(_0x3f0b54){_0xe9abcc['push'](_0xe9abcc['shift']());}}}(_0x3e16,0x93f22));var __importDefault=this&&this['__importDefault']||function(_0x3dde77){return _0x3dde77&&_0x3dde77['__esModule']?_0x3dde77:{'default':_0x3dde77};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['EngineService']=void 0x0;const key_1=require('../../modules/key'),enums_1=require('../../modules/enums'),utils_1=require('../../modules/utils'),activities_1=__importDefault(require('../activities')),compiler_1=require('../compiler'),exporter_1=require('../exporter'),reporter_1=require('../reporter'),router_1=require('../router'),serializer_1=require('../serializer'),factory_1=require('../search/factory'),factory_2=require('../store/factory'),factory_3=require('../stream/factory'),factory_4=require('../sub/factory'),task_1=require('../task'),stream_1=require('../../types/stream');class EngineService{constructor(){this['cacheMode']='cache',this['untilVersion']=null,this['jobCallbacks']={},this['reporting']=![],this['jobId']=0x1;}static async['init'](_0x4b3277,_0x3a1676,_0x4e9826,_0x3fbb37,_0x5b4545){if(_0x3fbb37['engine']){const _0x145d72=new EngineService();_0x145d72['verifyEngineFields'](_0x3fbb37),_0x145d72['namespace']=_0x4b3277,_0x145d72['appId']=_0x3a1676,_0x145d72['guid']=_0x4e9826,_0x145d72['logger']=_0x5b4545,await _0x145d72['initSearchChannel'](_0x3fbb37['engine']['store']),await _0x145d72['initStoreChannel'](_0x3fbb37['engine']['store']),await _0x145d72['initSubChannel'](_0x3fbb37['engine']['sub'],_0x3fbb37['engine']['pub']),await _0x145d72['initStreamChannel'](_0x3fbb37['engine']['stream'],_0x3fbb37['engine']['store']),_0x145d72['router']=await _0x145d72['initRouter'](_0x3fbb37);const _0x2a87a0=_0x145d72['store']['mintKey'](key_1['KeyType']['STREAMS'],{'appId':_0x145d72['appId']});return _0x145d72['router']['consumeMessages'](_0x2a87a0,'ENGINE',_0x145d72['guid'],_0x145d72['processStreamMessage']['bind'](_0x145d72)),_0x145d72['taskService']=new task_1['TaskService'](_0x145d72['store'],_0x5b4545),_0x145d72['exporter']=new exporter_1['ExporterService'](_0x145d72['appId'],_0x145d72['store'],_0x5b4545),_0x145d72['inited']=(0x0,utils_1['formatISODate'])(new Date()),_0x145d72;}}['verifyEngineFields'](_0x51f254){if(!(0x0,utils_1['identifyProvider'])(_0x51f254['engine']['store'])||!(0x0,utils_1['identifyProvider'])(_0x51f254['engine']['stream'])||!(0x0,utils_1['identifyProvider'])(_0x51f254['engine']['sub']))throw new Error('engine\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields.');}async['initSearchChannel'](_0x2680d2,_0x190d13){this['search']=await factory_1['SearchServiceFactory']['init'](_0x2680d2,_0x190d13,this['namespace'],this['appId'],this['logger']);}async['initStoreChannel'](_0x31571e){this['store']=await factory_2['StoreServiceFactory']['init'](_0x31571e,this['namespace'],this['appId'],this['logger']);}async['initSubChannel'](_0x33b8eb,_0x2e8385){this['subscribe']=await factory_4['SubServiceFactory']['init'](_0x33b8eb,_0x2e8385,this['namespace'],this['appId'],this['guid'],this['logger']);}async['initStreamChannel'](_0x48d776,_0x184d4b){this['stream']=await factory_3['StreamServiceFactory']['init'](_0x48d776,_0x184d4b,this['namespace'],this['appId'],this['logger']);}async['initRouter'](_0x5c2314){const _0x1948ff=await this['store']['getThrottleRate'](':');return new router_1['Router']({'namespace':this['namespace'],'appId':this['appId'],'guid':this['guid'],'role':stream_1['StreamRole']['ENGINE'],'reclaimDelay':_0x5c2314['engine']['reclaimDelay'],'reclaimCount':_0x5c2314['engine']['reclaimCount'],'throttle':_0x1948ff,'readonly':_0x5c2314['engine']['readonly']},this['stream'],this['logger']);}async['fetchAndVerifyVID'](_0x1b605a,_0x3a958b=0x0){if(isNaN(Number(_0x1b605a['version']))){const _0x18d1ce=await this['store']['getApp'](_0x1b605a['id'],!![]);if(!isNaN(Number(_0x18d1ce['version']))){if(!this['apps'])this['apps']={};return this['apps'][_0x1b605a['id']]=_0x18d1ce,{'id':_0x1b605a['id'],'version':_0x18d1ce['version']};}else{if(_0x3a958b<0xa)return await(0x0,utils_1['sleepFor'])(enums_1['HMSH_QUORUM_DELAY_MS']*0x2),await this['fetchAndVerifyVID'](_0x1b605a,_0x3a958b+0x1);else this['logger']['error']('engine-vid-resolution-error',{'id':_0x1b605a['id'],'guid':this['guid']});}}return _0x1b605a;}async['getVID'](_0x248137){if(this['cacheMode']==='nocache'){const _0x2d5734=await this['store']['getApp'](this['appId'],!![]);if(_0x2d5734['version']['toString']()===this['untilVersion']['toString']()){if(!this['apps'])this['apps']={};this['apps'][this['appId']]=_0x2d5734,this['setCacheMode']('cache',_0x2d5734['version']['toString']());}return{'id':this['appId'],'version':_0x2d5734['version']};}else return!this['apps']&&_0x248137?(this['apps']={},this['apps'][this['appId']]=_0x248137,_0x248137):await this['fetchAndVerifyVID']({'id':this['appId'],'version':this['apps']?.[this['appId']]['version']});}['setCacheMode'](_0x1255c4,_0x137699){this['logger']['info']('engine-executable-cache',{'mode':_0x1255c4,[_0x1255c4==='cache'?'target':'until']:_0x137699}),this['cacheMode']=_0x1255c4,this['untilVersion']=_0x137699;}async['routeToSubscribers'](_0x3bccd7,_0x530da5){const _0x45e706=this['jobCallbacks'][_0x530da5['metadata']['jid']];_0x45e706&&(this['delistJobCallback'](_0x530da5['metadata']['jid']),_0x45e706(_0x3bccd7,_0x530da5));}async['processWebHooks'](){this['taskService']['processWebHooks'](this['hook']['bind'](this));}async['processTimeHooks'](){this['taskService']['processTimeHooks'](this['hookTime']['bind'](this));}async['throttle'](_0x391728){try{this['router']?.['setThrottle'](_0x391728);}catch(_0x31b5cd){this['logger']['error']('engine-throttle-error',{'error':_0x31b5cd});}}async['initActivity'](_0x5e526c,_0x17c2f9={},_0xc94d97){const [_0x5bacac,_0x2f673e]=await this['getSchema'](_0x5e526c),_0x3ed5fa=activities_1['default'][utils_1['polyfill']['resolveActivityType'](_0x2f673e['type'])];if(_0x3ed5fa){const _0x14c281=(0x0,utils_1['formatISODate'])(new Date()),_0x485f6a={'aid':_0x5bacac,'atp':_0x2f673e['type'],'stp':_0x2f673e['subtype'],'ac':_0x14c281,'au':_0x14c281},_0x23f822=null;return new _0x3ed5fa(_0x2f673e,_0x17c2f9,_0x485f6a,_0x23f822,this,_0xc94d97);}else throw new Error('activity\x20type\x20'+_0x2f673e['type']+'\x20not\x20found');}async['getSchema'](_0x1a58ca){const _0x5c32ad=await this['store']['getApp'](this['appId']);if(!_0x5c32ad)throw new Error('no\x20app\x20found\x20for\x20id\x20'+this['appId']);if(this['isPrivate'](_0x1a58ca)){const _0x566422=_0x1a58ca['substring'](0x1),_0x10aff7=await this['store']['getSchema'](_0x566422,await this['getVID'](_0x5c32ad));return[_0x566422,_0x10aff7];}else{const _0x815bc9=await this['store']['getSubscription'](_0x1a58ca,await this['getVID'](_0x5c32ad));if(_0x815bc9){const _0x149bc7=await this['store']['getSchema'](_0x815bc9,await this['getVID'](_0x5c32ad));return[_0x815bc9,_0x149bc7];}}throw new Error('no\x20subscription\x20found\x20for\x20topic\x20'+_0x1a58ca+'\x20in\x20app\x20'+this['appId']+'\x20for\x20app\x20version\x20'+_0x5c32ad['version']);}async['getSettings'](){return await this['store']['getSettings']();}['isPrivate'](_0xae2cdb){return _0xae2cdb['startsWith']('.');}async['plan'](_0x440431){const _0x4152fa=new compiler_1['CompilerService'](this['store'],this['stream'],this['logger']);return await _0x4152fa['plan'](_0x440431);}async['deploy'](_0x184aa2){const _0x2c750c=new compiler_1['CompilerService'](this['store'],this['stream'],this['logger']);return await _0x2c750c['deploy'](_0x184aa2);}async['getStats'](_0xab4df3,_0x48e480){const {id:_0x3bb361,version:_0x4f42a3}=await this['getVID'](),_0x2f61da=new reporter_1['ReporterService']({'id':_0x3bb361,'version':_0x4f42a3},this['store'],this['logger']),_0x18aa26=await this['resolveQuery'](_0xab4df3,_0x48e480);return await _0x2f61da['getStats'](_0x18aa26);}async['getIds'](_0x4c0539,_0x286a04,_0x456d24=[]){const {id:_0x1a349b,version:_0xe78e67}=await this['getVID'](),_0x358638=new reporter_1['ReporterService']({'id':_0x1a349b,'version':_0xe78e67},this['store'],this['logger']),_0x521f03=await this['resolveQuery'](_0x4c0539,_0x286a04);return await _0x358638['getIds'](_0x521f03,_0x456d24);}async['resolveQuery'](_0xd99d8,_0x2d6356){const _0x3b1296=await this['initActivity'](_0xd99d8,_0x2d6356['data']);return await _0x3b1296['getState'](),{'end':_0x2d6356['end'],'start':_0x2d6356['start'],'range':_0x2d6356['range'],'granularity':_0x3b1296['resolveGranularity'](),'key':_0x3b1296['resolveJobKey'](_0x3b1296['createInputContext']()),'sparse':_0x2d6356['sparse']};}async['processStreamMessage'](_0x48a67b){this['logger']['debug']('engine-process',{'jid':_0x48a67b['metadata']['jid'],'gid':_0x48a67b['metadata']['gid'],'dad':_0x48a67b['metadata']['dad'],'aid':_0x48a67b['metadata']['aid'],'status':_0x48a67b['status']||stream_1['StreamStatus']['SUCCESS'],'code':_0x48a67b['code']||0xc8,'type':_0x48a67b['type']});const _0x443fc8={'metadata':{'guid':_0x48a67b['metadata']['guid'],'jid':_0x48a67b['metadata']['jid'],'gid':_0x48a67b['metadata']['gid'],'dad':_0x48a67b['metadata']['dad'],'aid':_0x48a67b['metadata']['aid']},'data':_0x48a67b['data']};if(_0x48a67b['type']===stream_1['StreamDataType']['TIMEHOOK']){const _0x16c977=await this['initActivity']('.'+_0x48a67b['metadata']['aid'],_0x443fc8['data'],_0x443fc8);await _0x16c977['processTimeHookEvent'](_0x48a67b['metadata']['jid']);}else{if(_0x48a67b['type']===stream_1['StreamDataType']['WEBHOOK']){const _0x268033=await this['initActivity']('.'+_0x48a67b['metadata']['aid'],_0x443fc8['data'],_0x443fc8);await _0x268033['processWebHookEvent'](_0x48a67b['status'],_0x48a67b['code']);}else{if(_0x48a67b['type']===stream_1['StreamDataType']['TRANSITION']){const _0x25bf76=await this['initActivity']('.'+_0x48a67b['metadata']['aid'],_0x443fc8['data'],_0x443fc8);await _0x25bf76['process']();}else{if(_0x48a67b['type']===stream_1['StreamDataType']['AWAIT']){_0x443fc8['metadata']={..._0x443fc8['metadata'],'pj':_0x48a67b['metadata']['jid'],'pg':_0x48a67b['metadata']['gid'],'pd':_0x48a67b['metadata']['dad'],'pa':_0x48a67b['metadata']['aid'],'px':_0x48a67b['metadata']['await']===![],'trc':_0x48a67b['metadata']['trc'],'spn':_0x48a67b['metadata']['spn']};const _0x411358=await this['initActivity'](_0x48a67b['metadata']['topic'],_0x48a67b['data'],_0x443fc8);await _0x411358['process']();}else{if(_0x48a67b['type']===stream_1['StreamDataType']['RESULT']){const _0x10203a=await this['initActivity']('.'+_0x443fc8['metadata']['aid'],_0x48a67b['data'],_0x443fc8);await _0x10203a['processEvent'](_0x48a67b['status'],_0x48a67b['code']);}else{const _0x41f3cd=await this['initActivity']('.'+_0x48a67b['metadata']['aid'],_0x48a67b['data'],_0x443fc8);await _0x41f3cd['processEvent'](_0x48a67b['status'],_0x48a67b['code'],'output');}}}}}this['logger']['debug']('engine-process-end',{'jid':_0x48a67b['metadata']['jid'],'gid':_0x48a67b['metadata']['gid'],'aid':_0x48a67b['metadata']['aid']});}async['execAdjacentParent'](_0x513587,_0x3fafe7,_0x20104a=![]){if(this['hasParentJob'](_0x513587)){const _0x3bec21=this['resolveError'](_0x3fafe7['metadata']),_0xb7fc68=_0x513587['$self']?.['output']?.['metadata']?.['l2s']||_0x513587['$self']?.['output']?.['metadata']?.['l1s'],_0x136495={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':_0x513587['metadata']['pj'],'gid':_0x513587['metadata']['pg'],'dad':_0x513587['metadata']['pd'],'aid':_0x513587['metadata']['pa'],'trc':_0x513587['metadata']['trc'],'spn':_0xb7fc68},'type':stream_1['StreamDataType']['RESULT'],'data':_0x3fafe7['data']};if(_0x3bec21&&_0x3bec21['code'])_0x136495['status']=stream_1['StreamStatus']['ERROR'],_0x136495['data']=_0x3bec21,_0x136495['code']=_0x3bec21['code'],_0x136495['stack']=_0x3bec21['stack'];else _0x20104a?(_0x136495['status']=stream_1['StreamStatus']['PENDING'],_0x136495['code']=enums_1['HMSH_CODE_PENDING']):(_0x136495['status']=stream_1['StreamStatus']['SUCCESS'],_0x136495['code']=enums_1['HMSH_CODE_SUCCESS']);return await this['router']?.['publishMessage'](null,_0x136495);}}['hasParentJob'](_0x21eea8,_0x1a8ac3=![]){if(_0x1a8ac3)return Boolean(_0x21eea8['metadata']['pj']&&_0x21eea8['metadata']['pa']&&!_0x21eea8['metadata']['px']);return Boolean(_0x21eea8['metadata']['pj']&&_0x21eea8['metadata']['pa']);}['resolveError'](_0x20a54f){if(_0x20a54f&&_0x20a54f['err'])return JSON['parse'](_0x20a54f['err']);}async['interrupt'](_0xd3a496,_0xb4c0a2,_0x5ed17d={}){await this['store']['interrupt'](_0xd3a496,_0xb4c0a2,_0x5ed17d);const _0x3c9dc2=await this['getState'](_0xd3a496,_0xb4c0a2),_0x2851cf={'interrupt':_0x5ed17d['descend'],'expire':_0x5ed17d['expire']};return await this['runJobCompletionTasks'](_0x3c9dc2,_0x2851cf);}async['scrub'](_0x562d9c){await this['store']['scrub'](_0x562d9c);}async['hook'](_0x54628c,_0x33d673,_0x574044=stream_1['StreamStatus']['SUCCESS'],_0x197acb=0xc8){const _0x4e49bb=await this['taskService']['getHookRule'](_0x54628c),[_0x279be0]=await this['getSchema']('.'+_0x4e49bb['to']),_0x2db47d={'type':stream_1['StreamDataType']['WEBHOOK'],'status':_0x574044,'code':_0x197acb,'metadata':{'guid':(0x0,utils_1['guid'])(),'aid':_0x279be0,'topic':_0x54628c},'data':_0x33d673};return await this['router']?.['publishMessage'](null,_0x2db47d);}async['hookTime'](_0x2ef885,_0x3535f8,_0x4ea444,_0x17550c){if(_0x17550c==='interrupt'||_0x17550c==='expire')return await this['interrupt'](_0x4ea444,_0x2ef885,{'suppress':!![],'expire':0x1});const [_0x57c9e1,..._0x1c53aa]=_0x4ea444['split'](','),_0x1b170b=','+_0x1c53aa['join'](','),_0x5b1384={'type':stream_1['StreamDataType']['TIMEHOOK'],'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':_0x2ef885,'gid':_0x3535f8,'dad':_0x1b170b,'aid':_0x57c9e1},'data':{'timestamp':Date['now']()}};await this['router']?.['publishMessage'](null,_0x5b1384);}async['hookAll'](_0x878961,_0x59ec30,_0x2510d6,_0x2c7ab1=[]){const _0x2718bb=await this['getVID'](),_0x4d1b9b=await this['taskService']['getHookRule'](_0x878961);if(_0x4d1b9b){const _0x59ee2b=await(0x0,utils_1['getSubscriptionTopic'])(_0x4d1b9b['to'],this['store'],_0x2718bb),_0x2105b1=await this['resolveQuery'](_0x59ee2b,_0x2510d6),_0x211137=new reporter_1['ReporterService'](_0x2718bb,this['store'],this['logger']),_0x4fac69=await _0x211137['getWorkItems'](_0x2105b1,_0x2c7ab1);if(_0x4fac69['length']){const _0x3cb704=new task_1['TaskService'](this['store'],this['logger']);await _0x3cb704['enqueueWorkItems'](_0x4fac69['map'](_0x182501=>[_0x878961,_0x182501,_0x2510d6['scrub']||![],JSON['stringify'](_0x59ec30)]['join'](key_1['VALSEP']))),this['subscribe']['publish'](key_1['KeyType']['QUORUM'],{'type':'work','originator':this['guid']},this['appId']);}return _0x4fac69;}else throw new Error('unable\x20to\x20find\x20hook\x20rule\x20for\x20topic\x20'+_0x878961);}async['pub'](_0x27f8dd,_0x1262ea,_0x2fb00d,_0x16b556){const _0x1f905e=await this['initActivity'](_0x27f8dd,_0x1262ea,_0x2fb00d);if(_0x1f905e)return await _0x1f905e['process'](_0x16b556);else throw new Error('unable\x20to\x20process\x20activity\x20for\x20topic\x20'+_0x27f8dd);}async['sub'](_0x3a0f95,_0xef16f){const _0x134fcf=async(_0x154d0a,_0x35978f)=>{_0xef16f(_0x35978f['topic'],_0x35978f['job']);};return await this['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x134fcf,this['appId'],_0x3a0f95);}async['unsub'](_0x480f81){return await this['subscribe']['unsubscribe'](key_1['KeyType']['QUORUM'],this['appId'],_0x480f81);}async['psub'](_0x5c7081,_0x491d82){const _0x2d0bc9=async(_0x5608fd,_0x424201)=>{_0x491d82(_0x424201['topic'],_0x424201['job']);};return await this['subscribe']['psubscribe'](key_1['KeyType']['QUORUM'],_0x2d0bc9,this['appId'],_0x5c7081);}async['punsub'](_0x3c95b3){return await this['subscribe']['punsubscribe'](key_1['KeyType']['QUORUM'],this['appId'],_0x3c95b3);}async['pubsub'](_0x2fef6f,_0x1de78f,_0x42f9c8,_0x445479=enums_1['HMSH_OTT_WAIT_TIME']){_0x42f9c8={'metadata':{'ngn':this['guid'],'trc':_0x42f9c8?.['metadata']?.['trc'],'spn':_0x42f9c8?.['metadata']?.['spn']}};const _0x23deff=await this['pub'](_0x2fef6f,_0x1de78f,_0x42f9c8);return new Promise((_0x4b820e,_0x548555)=>{this['registerJobCallback'](_0x23deff,(_0x18701b,_0x2b8835)=>{if(_0x2b8835['metadata']['err']){const _0x3d0f50=JSON['parse'](_0x2b8835['metadata']['err']);_0x548555({..._0x3d0f50,'job_id':_0x2b8835['metadata']['jid']});}else _0x4b820e(_0x2b8835);}),setTimeout(()=>{this['delistJobCallback'](_0x23deff),_0x548555({'code':enums_1['HMSH_CODE_TIMEOUT'],'message':'timeout','job_id':_0x23deff});},_0x445479);});}async['pubOneTimeSubs'](_0x21cec3,_0x35e2e4,_0x5abf4a=![]){if(this['hasOneTimeSubscription'](_0x21cec3)){const _0x1e514d={'type':'job','topic':_0x21cec3['metadata']['jid'],'job':(0x0,utils_1['restoreHierarchy'])(_0x35e2e4)};this['subscribe']['publish'](key_1['KeyType']['QUORUM'],_0x1e514d,this['appId'],_0x21cec3['metadata']['ngn']);}}async['getPublishesTopic'](_0x460c35){const _0x271765=await this['getVID'](),_0x5c6933=_0x460c35['metadata']['aid']||_0x460c35['$self']?.['output']?.['metadata']?.['aid'],_0xe72cb7=await this['store']['getSchema'](_0x5c6933,_0x271765);return _0xe72cb7['publishes'];}async['pubPermSubs'](_0x3a6805,_0x4019a2,_0x4befd3=![]){const _0x38c900=await this['getPublishesTopic'](_0x3a6805);if(_0x38c900){const _0x1968af={'type':'job','topic':_0x38c900,'job':(0x0,utils_1['restoreHierarchy'])(_0x4019a2)};this['subscribe']['publish'](key_1['KeyType']['QUORUM'],_0x1968af,this['appId'],_0x38c900+'.'+_0x3a6805['metadata']['jid']);}}async['add'](_0x4fa7d9){return await this['router']?.['publishMessage'](null,_0x4fa7d9);}['registerJobCallback'](_0x54b76e,_0x5ee3e9){this['jobCallbacks'][_0x54b76e]=_0x5ee3e9;}['delistJobCallback'](_0x21e8c4){delete this['jobCallbacks'][_0x21e8c4];}['hasOneTimeSubscription'](_0x2711aa){return Boolean(_0x2711aa['metadata']['ngn']);}async['runJobCompletionTasks'](_0x4fdf45,_0x39b28a={}){const _0x2f9625=this['hasParentJob'](_0x4fdf45,!![]),_0x273701=this['hasOneTimeSubscription'](_0x4fdf45),_0x57a99b=await this['getPublishesTopic'](_0x4fdf45);let _0x4d8ae2;if(_0x2f9625||_0x273701||_0x57a99b){const _0x25c22e=await this['getState'](_0x4fdf45['metadata']['tpc'],_0x4fdf45['metadata']['jid']);_0x4d8ae2=await this['execAdjacentParent'](_0x4fdf45,_0x25c22e,_0x39b28a['emit']),this['pubOneTimeSubs'](_0x4fdf45,_0x25c22e,_0x39b28a['emit']),this['pubPermSubs'](_0x4fdf45,_0x25c22e,_0x39b28a['emit']);}return!_0x39b28a['emit']&&this['taskService']['registerJobForCleanup'](_0x4fdf45['metadata']['jid'],this['resolveExpires'](_0x4fdf45,_0x39b28a),_0x39b28a),_0x4d8ae2;}['resolveExpires'](_0x27e211,_0x314284){return _0x314284['expire']??_0x27e211['metadata']['expire']??enums_1['HMSH_EXPIRE_JOB_SECONDS'];}async['export'](_0x2195ce){return await this['exporter']['export'](_0x2195ce);}async['getRaw'](_0x4caa5d){return await this['store']['getRaw'](_0x4caa5d);}async['getStatus'](_0x28fa59){const {id:_0x5144ef}=await this['getVID']();return await this['store']['getStatus'](_0x28fa59,_0x5144ef);}async['getState'](_0x54a2e4,_0x37938a){const _0x424cbe=await this['store']['getSymbols']('$'+_0x54a2e4),_0x2bcd6b={['$'+_0x54a2e4]:Object['keys'](_0x424cbe)},_0x2ad055={},_0x18710c=await this['store']['getState'](_0x37938a,_0x2bcd6b,_0x2ad055);if(!_0x18710c)throw new Error('not\x20found\x20'+_0x37938a);const [_0x22a475,_0x313314]=_0x18710c,_0x52b945=(0x0,utils_1['restoreHierarchy'])(_0x22a475);return _0x313314&&_0x52b945['metadata']&&(_0x52b945['metadata']['js']=_0x313314),_0x52b945;}async['getQueryState'](_0x36ec1c,_0x3d7795){return await this['store']['getQueryState'](_0x36ec1c,_0x3d7795);}async['compress'](_0x3f22da){const _0x16f524=await this['store']['getSymbolValues'](),_0x4ac20f=Object['keys'](_0x16f524)['length'],_0x397616=Math['pow'](0x34,0x2)-0x1,_0x5894d1=serializer_1['SerializerService']['filterSymVals'](_0x4ac20f,_0x397616,_0x16f524,new Set(_0x3f22da));return await this['store']['addSymbolValues'](_0x5894d1);}}exports['EngineService']=EngineService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x3013fd,_0x3bfec0){const _0x2ee7c0=_0x2c5f,_0x36ba80=_0x3013fd();while(!![]){try{const _0x21e05b=-parseInt(_0x2ee7c0(0x18f))/0x1*(-parseInt(_0x2ee7c0(0x18e))/0x2)+-parseInt(_0x2ee7c0(0x191))/0x3*(parseInt(_0x2ee7c0(0x197))/0x4)+-parseInt(_0x2ee7c0(0x198))/0x5*(-parseInt(_0x2ee7c0(0x193))/0x6)+-parseInt(_0x2ee7c0(0x196))/0x7*(parseInt(_0x2ee7c0(0x195))/0x8)+parseInt(_0x2ee7c0(0x18d))/0x9+parseInt(_0x2ee7c0(0x192))/0xa*(-parseInt(_0x2ee7c0(0x194))/0xb)+parseInt(_0x2ee7c0(0x190))/0xc;if(_0x21e05b===_0x3bfec0)break;else _0x36ba80['push'](_0x36ba80['shift']());}catch(_0x31bed9){_0x36ba80['push'](_0x36ba80['shift']());}}}(_0x53f3,0xcc3f1));function _0x53f3(){const _0x25edf6=['18551424cHiiKg','4730577hIJQKB','5990hUdUsz','138684axtuFM','16819jZGild','16MpBNsP','4203780XsFHwQ','4dfxmUU','245NUrJwz','12972294giYlZB','6HsHTOW','136833RceXlM'];_0x53f3=function(){return _0x25edf6;};return _0x53f3();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ExporterService']=void 0x0;const key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),serializer_1=require('../serializer');function _0x2c5f(_0x23c243,_0x1f38f6){const _0x53f332=_0x53f3();return _0x2c5f=function(_0x2c5f62,_0x1828fd){_0x2c5f62=_0x2c5f62-0x18d;let _0x41c99f=_0x53f332[_0x2c5f62];return _0x41c99f;},_0x2c5f(_0x23c243,_0x1f38f6);}class ExporterService{constructor(_0x7fb477,_0x552ee1,_0x1cd03b){this['appId']=_0x7fb477,this['logger']=_0x1cd03b,this['store']=_0x552ee1;}async['export'](_0x29a66c,_0x38a61f={}){!this['symbols']&&(this['symbols']=this['store']['getAllSymbols'](),this['symbols']=await this['symbols']);const _0x3847bb=[],_0x5ac1be=await this['store']['getRaw'](_0x29a66c),_0x1f5c93=this['inflate'](_0x5ac1be,_0x3847bb);return _0x1f5c93;}['inflateKey'](_0x498123){return _0x498123 in this['symbols']?this['symbols'][_0x498123]:_0x498123;}['inflate'](_0x153de3,_0x1ff928){const _0x174a50={'hooks':{},'main':{'cursor':-0x1,'items':[]}},_0x2b07ee={},_0x150b16=this['inflateDependencyData'](_0x1ff928,_0x174a50),_0x46d1cd=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object['entries'](_0x153de3)['forEach'](([_0x1bade0,_0x361862])=>{const _0x4ee2aa=_0x1bade0['match'](_0x46d1cd);if(_0x4ee2aa){const [_0x152226,_0x1837f5,_0x51d3f6]=_0x4ee2aa,_0x453601=this['inflateKey'](_0x1837f5),_0x1d3b95=''+_0x51d3f6['replace'](/,/g,'/'),_0x5755eb=serializer_1['SerializerService']['fromString'](_0x361862);_0x2b07ee[_0x1d3b95+'/'+_0x453601]=_0x5755eb;}else _0x1bade0['length']===0x3&&(_0x2b07ee[this['inflateKey'](_0x1bade0)]=serializer_1['SerializerService']['fromString'](_0x361862));}),{'dependencies':_0x150b16,'process':(0x0,utils_1['restoreHierarchy'])(_0x2b07ee),'status':_0x153de3[':']};}['inflateDependencyData'](_0x4c7e88,_0x38ebed){const _0x39e2a0=/([0-9,]+)-(\d+)$/,_0x2bb9c2=/-(\d+)$/;return _0x4c7e88['map']((_0x1d950a,_0x27e3f0)=>{const [_0x4c5c4d,_0x1dded2,_0x24cfc8,_0xeaaa39,..._0x336303]=_0x1d950a['split'](key_1['VALSEP']),_0x2168fc=_0x336303['join'](key_1['VALSEP']),_0x4501a7=_0x2168fc['match'](_0x39e2a0);let _0x11e6bc,_0x566fa2,_0x459921='';if(_0x4501a7){const [_0x20d173,_0x322454,_0x407640]=_0x4501a7;_0x459921=_0x322454['split'](',')['join']('/'),_0x11e6bc=_0x459921+'['+_0x407640+']',_0x566fa2='hook';}else{const _0x371b13=_0x2168fc['match'](_0x2bb9c2);if(_0x371b13){const [_0x382650,_0x54b082]=_0x371b13;_0x11e6bc='['+_0x54b082+']',_0x566fa2='flow';}else _0x11e6bc='/',_0x566fa2='other';}return{'type':_0x4c5c4d,'topic':_0x1dded2,'gid':_0x24cfc8,'jid':_0x2168fc};});}}exports['ExporterService']=ExporterService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0x4bc9(_0x39a8a2,_0x4ff3ea){const _0x43d0b0=_0x43d0();return _0x4bc9=function(_0x4bc99c,_0x1cffe5){_0x4bc99c=_0x4bc99c-0x1a3;let _0x34588b=_0x43d0b0[_0x4bc99c];return _0x34588b;},_0x4bc9(_0x39a8a2,_0x4ff3ea);}(function(_0x401810,_0x32070c){const _0xfa409c=_0x4bc9,_0x277337=_0x401810();while(!![]){try{const _0x51091d=parseInt(_0xfa409c(0x1aa))/0x1+-parseInt(_0xfa409c(0x1a3))/0x2*(parseInt(_0xfa409c(0x1a6))/0x3)+parseInt(_0xfa409c(0x1a4))/0x4+-parseInt(_0xfa409c(0x1a5))/0x5*(parseInt(_0xfa409c(0x1ad))/0x6)+-parseInt(_0xfa409c(0x1a7))/0x7*(-parseInt(_0xfa409c(0x1a9))/0x8)+parseInt(_0xfa409c(0x1a8))/0x9+-parseInt(_0xfa409c(0x1ab))/0xa*(parseInt(_0xfa409c(0x1ac))/0xb);if(_0x51091d===_0x32070c)break;else _0x277337['push'](_0x277337['shift']());}catch(_0x480aa8){_0x277337['push'](_0x277337['shift']());}}}(_0x43d0,0xc68d3));function _0x43d0(){const _0x228c14=['1227bAQIYJ','3189389CPWEZq','13052124ppHaeJ','8MFeMXh','1032657mzsWLN','105520MLOyQf','1100qSDFfD','648kFXplM','1138ATiDgE','2745328AJbHwR','70540HXgGgD'];_0x43d0=function(){return _0x228c14;};return _0x43d0();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['MapperService']=void 0x0;const pipe_1=require('../pipe');class MapperService{constructor(_0x387d94,_0x4398f3){this['rules']=_0x387d94,this['data']=_0x4398f3;}['mapRules'](){return this['traverseRules'](this['rules']);}['traverseRules'](_0x4ffc21){if(typeof _0x4ffc21==='object'&&'@pipe'in _0x4ffc21)return this['pipe'](_0x4ffc21['@pipe']);if(typeof _0x4ffc21==='object'&&_0x4ffc21!==null){const _0x845cec={};for(const _0x3b5305 in _0x4ffc21){Object['prototype']['hasOwnProperty']['call'](_0x4ffc21,_0x3b5305)&&(_0x845cec[_0x3b5305]=this['traverseRules'](_0x4ffc21[_0x3b5305]));}return _0x845cec;}else return this['resolve'](_0x4ffc21);}['pipe'](_0xe849e4){const _0x559c18=new pipe_1['Pipe'](_0xe849e4,this['data']);return _0x559c18['process']();}['resolve'](_0x31a6ea){const _0x5aaf58=new pipe_1['Pipe']([[_0x31a6ea]],this['data']);return _0x5aaf58['process']();}static['evaluate'](_0x577b2f,_0xab446e,_0x5da720){if(typeof _0x577b2f==='boolean')return _0x577b2f;if(Array['isArray'](_0x577b2f['code'])&&_0x577b2f['code']['includes'](_0x5da720||0xc8)||_0x5da720['toString']()===(_0x577b2f['code']||0xc8)['toString']()){if(!_0x577b2f['match'])return!![];const _0x97865a=_0x577b2f['gate']==='or';let _0x5c6fa2=!![],_0x474950=![];return _0x577b2f['match']['forEach'](({expected:_0x1532fe,actual:_0x59178c})=>{if(_0x97865a&&!_0x474950||!_0x97865a&&_0x5c6fa2){const _0x24a799=pipe_1['Pipe']['resolve'](_0x59178c,_0xab446e)===_0x1532fe;if(_0x97865a&&_0x24a799)_0x474950=!![];else!_0x97865a&&!_0x24a799&&(_0x5c6fa2=![]);}}),_0x97865a?_0x474950:_0x5c6fa2;}return![];}}exports['MapperService']=MapperService;
|
|
@@ -131,10 +131,11 @@ class MeshData {
|
|
|
131
131
|
async getHotMesh(namespace = 'meshflow') {
|
|
132
132
|
let hotMesh = await this.instances.get(namespace);
|
|
133
133
|
if (!hotMesh) {
|
|
134
|
+
const connectionType = this.connections ? 'connections' : 'connection';
|
|
134
135
|
hotMesh = hotmesh_1.HotMesh.init({
|
|
135
136
|
appId: namespace,
|
|
136
137
|
engine: {
|
|
137
|
-
|
|
138
|
+
[connectionType]: utils_1.polyfill.meshDataConfig(this),
|
|
138
139
|
},
|
|
139
140
|
});
|
|
140
141
|
this.instances.set(namespace, hotMesh);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x42d507,_0x30e1b7){const _0x35f27b=_0x22cb,_0x175004=_0x42d507();while(!![]){try{const _0x42e8c0=parseInt(_0x35f27b(0x1ca))/0x1+-parseInt(_0x35f27b(0x1cc))/0x2+parseInt(_0x35f27b(0x1d0))/0x3*(parseInt(_0x35f27b(0x1d1))/0x4)+-parseInt(_0x35f27b(0x1cb))/0x5*(parseInt(_0x35f27b(0x1cf))/0x6)+-parseInt(_0x35f27b(0x1c9))/0x7+-parseInt(_0x35f27b(0x1ce))/0x8+-parseInt(_0x35f27b(0x1cd))/0x9*(-parseInt(_0x35f27b(0x1c8))/0xa);if(_0x42e8c0===_0x30e1b7)break;else _0x175004['push'](_0x175004['shift']());}catch(_0x4d2f79){_0x175004['push'](_0x175004['shift']());}}}(_0x11e6,0x52511));function _0x22cb(_0x48c616,_0x44d957){const _0x11e661=_0x11e6();return _0x22cb=function(_0x22cbff,_0x3624c9){_0x22cbff=_0x22cbff-0x1c8;let _0x560345=_0x11e661[_0x22cbff];return _0x560345;},_0x22cb(_0x48c616,_0x44d957);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ExporterService']=void 0x0;function _0x11e6(){const _0x3d0352=['16022CXtvJZ','217715HNTwVv','842338etEZnb','10501479LhDTuS','3443896bXjnNO','6Lbnhfj','779169IFUYhB','4RLqUUe','10AfhgOf','1471456wTmWhV'];_0x11e6=function(){return _0x3d0352;};return _0x11e6();}const utils_1=require('../../modules/utils'),serializer_1=require('../serializer');class ExporterService{constructor(_0xc6c908,_0x2e71f7,_0x41d9ef){this['appId']=_0xc6c908,this['logger']=_0x41d9ef,this['store']=_0x2e71f7;}async['export'](_0x4d7c06,_0x542280={}){if(!ExporterService['symbols']['has'](this['appId'])){const _0x1bd4b9=this['store']['getAllSymbols']();ExporterService['symbols']['set'](this['appId'],await _0x1bd4b9);}const _0x171ab5=await this['store']['getRaw'](_0x4d7c06),_0xd231aa=this['inflate'](_0x171ab5,_0x542280);return _0xd231aa;}['inflate'](_0x4e1ded,_0x17bd32){const _0x3c0a07=[],_0x296891={},_0x302f03={},_0x5147bf={},_0x20a278=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object['entries'](_0x4e1ded)['forEach'](([_0x1f27b3,_0x4d1316])=>{const _0x4c7c16=_0x1f27b3['match'](_0x20a278);if(_0x4c7c16)this['inflateTransition'](_0x4c7c16,_0x4d1316,_0x5147bf);else{if(_0x1f27b3['startsWith']('_'))_0x302f03[_0x1f27b3['substring'](0x1)]=_0x4d1316;else{if(_0x1f27b3['startsWith']('-')){const _0x472cee=this['keyToObject'](_0x1f27b3);_0x3c0a07['push']({..._0x472cee,'key':_0x1f27b3,'value':this['resolveValue'](_0x4d1316,_0x17bd32['values'])});}else _0x1f27b3['length']===0x3&&(_0x296891[this['inflateKey'](_0x1f27b3)]=serializer_1['SerializerService']['fromString'](_0x4d1316));}}}),this['filterFields']({'data':(0x0,utils_1['restoreHierarchy'])(_0x302f03),'state':Object['entries']((0x0,utils_1['restoreHierarchy'])(_0x296891))[0x0][0x1],'status':parseInt(_0x4e1ded[':'],0xa),'timeline':this['sortParts'](_0x3c0a07),'transitions':this['sortEntriesByCreated'](_0x5147bf)},_0x17bd32['block'],_0x17bd32['allow']);}['resolveValue'](_0x259775,_0x41fb8d){const _0x319c8e=serializer_1['SerializerService']['fromString'](_0x259775);if(_0x41fb8d!==![])return _0x319c8e;return _0x319c8e&&typeof _0x319c8e==='object'&&('data'in _0x319c8e&&(_0x319c8e['data']={}),'$error'in _0x319c8e&&(_0x319c8e['$error']={})),_0x319c8e;}['inflateKey'](_0x2d187c){const _0x569f43=ExporterService['symbols']['get'](this['appId']);if(_0x2d187c in _0x569f43){const _0xfa0681=_0x569f43[_0x2d187c],_0x3766e8=_0xfa0681['split']('/');return _0x3766e8['join']('/');}return _0x2d187c;}['filterFields'](_0x3964c4,_0x7d05fe=[],_0x2f43cc=[]){let _0x345af8={};return _0x2f43cc&&_0x2f43cc['length']>0x0?_0x2f43cc['forEach'](_0x5977a1=>{_0x5977a1 in _0x3964c4&&(_0x345af8[_0x5977a1]=_0x3964c4[_0x5977a1]);}):_0x345af8={..._0x3964c4},_0x7d05fe&&_0x7d05fe['length']>0x0&&_0x7d05fe['forEach'](_0x397e53=>{_0x397e53 in _0x345af8&&delete _0x345af8[_0x397e53];}),_0x345af8;}['inflateTransition'](_0x58ba43,_0x101f24,_0x2cc9c6){const [_0xd7439d,_0x1cb7d6,_0x419725]=_0x58ba43,_0x567618=this['inflateKey'](_0x1cb7d6),_0x2b3e3c=_0x567618['split']('/'),_0x105a16=_0x2b3e3c[0x0],_0x842de9=_0x567618['endsWith']('/output/metadata/ac'),_0x1cce9f=_0x567618['endsWith']('/output/metadata/au');if(_0x842de9||_0x1cce9f){const _0x4dec8f=_0x105a16+','+_0x419725,_0x42f17a=_0x2cc9c6[_0x4dec8f];!_0x42f17a?_0x2cc9c6[_0x4dec8f]={'activity':_0x105a16,'dimensions':_0x419725,'created':_0x842de9?_0x101f24:null,'updated':_0x1cce9f?_0x101f24:null}:_0x42f17a[_0x842de9?'created':'updated']=_0x101f24;}}['sortEntriesByCreated'](_0x12a01e){const _0x289423=Object['values'](_0x12a01e);return _0x289423['sort']((_0x43dfea,_0x11a88f)=>{return(_0x43dfea['created']||_0x43dfea['updated'])['localeCompare'](_0x11a88f['created']||_0x11a88f['updated']);}),_0x289423;}['keyToObject'](_0x7a0bd9){function _0x2c85d3(_0x26cf46){const _0xbcf0ce=_0x26cf46['split'](',');if(_0xbcf0ce['length']>0x1)return _0xbcf0ce['shift'](),_0xbcf0ce['join'](',');}const _0x3e00bb=_0x7a0bd9['split']('-');return _0x3e00bb['length']===0x4?{'index':parseInt(_0x3e00bb[0x2],0xa),'dimension':_0x2c85d3(_0x3e00bb[0x1])}:{'index':parseInt(_0x3e00bb[0x2],0xa),'secondary':parseInt(_0x3e00bb[0x3],0xa),'dimension':_0x2c85d3(_0x3e00bb[0x1])};}['sortParts'](_0x600324){return _0x600324['sort']((_0x225336,_0x3cf9bd)=>{const {dimension:_0x3cbe3c,index:_0x314730,secondary:_0x38b9b4}=_0x225336,{dimension:_0x474e17,index:_0x155800,secondary:_0x534549}=_0x3cf9bd;if(_0x3cbe3c===undefined&&_0x474e17!==undefined)return-0x1;if(_0x3cbe3c!==undefined&&_0x474e17===undefined)return 0x1;if(_0x3cbe3c!==undefined&&_0x474e17!==undefined){if(_0x3cbe3c<_0x474e17)return-0x1;if(_0x3cbe3c>_0x474e17)return 0x1;}if(_0x314730<_0x155800)return-0x1;if(_0x314730>_0x155800)return 0x1;if(_0x38b9b4===undefined&&_0x534549!==undefined)return-0x1;if(_0x38b9b4!==undefined&&_0x534549===undefined)return 0x1;if(_0x38b9b4!==undefined&&_0x534549!==undefined){if(_0x38b9b4<_0x534549)return-0x1;if(_0x38b9b4>_0x534549)return 0x1;}return 0x0;});}}exports['ExporterService']=ExporterService,ExporterService['symbols']=new Map();
|
|
@@ -195,7 +195,7 @@ class MeshOS {
|
|
|
195
195
|
static async init(p = MeshOS.profiles) {
|
|
196
196
|
for (const key in p) {
|
|
197
197
|
const profile = p[key];
|
|
198
|
-
if (profile.db?.connection?.
|
|
198
|
+
if (profile.db?.connection || profile.db?.connections) {
|
|
199
199
|
this.logger.info(`meshos-initializing`, {
|
|
200
200
|
db: profile.db.name,
|
|
201
201
|
key,
|
|
@@ -217,7 +217,7 @@ class MeshOS {
|
|
|
217
217
|
entity: entity.name,
|
|
218
218
|
label: entity.label,
|
|
219
219
|
});
|
|
220
|
-
const instance = pinstances[entity.name] = new entity.class(profile.db.connection
|
|
220
|
+
const instance = pinstances[entity.name] = new entity.class(profile.db.connection?.class, ns, namespace.type, profile.db.connection?.options, profile.db.connections);
|
|
221
221
|
await instance.init(profile.db.search);
|
|
222
222
|
}
|
|
223
223
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function _0x40f9(){var _0x5d2298=['80KqwiFz','77253nvcrar','5571uUSfAu','8qylRWX','5283355YGJIMt','867917YsBEWA','153498YtphgK','234QWXtrG','1760KwAnnj','2724CeDPwu','42345TRuZqG','1412196PiXWqB'];_0x40f9=function(){return _0x5d2298;};return _0x40f9();}(function(_0x26a515,_0x262692){var _0x17f682=_0x4917,_0x41efda=_0x26a515();while(!![]){try{var _0x344d2e=-parseInt(_0x17f682(0x19a))/0x1+-parseInt(_0x17f682(0x190))/0x2*(parseInt(_0x17f682(0x197))/0x3)+-parseInt(_0x17f682(0x194))/0x4+parseInt(_0x17f682(0x195))/0x5*(parseInt(_0x17f682(0x19b))/0x6)+-parseInt(_0x17f682(0x199))/0x7*(-parseInt(_0x17f682(0x198))/0x8)+parseInt(_0x17f682(0x193))/0x9*(-parseInt(_0x17f682(0x191))/0xa)+parseInt(_0x17f682(0x196))/0xb*(parseInt(_0x17f682(0x192))/0xc);if(_0x344d2e===_0x262692)break;else _0x41efda['push'](_0x41efda['shift']());}catch(_0x3d71dd){_0x41efda['push'](_0x41efda['shift']());}}}(_0x40f9,0x781df));function _0x4917(_0x238e99,_0x5b128d){var _0x40f939=_0x40f9();return _0x4917=function(_0x49172e,_0x1ed782){_0x49172e=_0x49172e-0x190;var _0x5b04a5=_0x40f939[_0x49172e];return _0x5b04a5;},_0x4917(_0x238e99,_0x5b128d);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ArrayHandler']=void 0x0;class ArrayHandler{['get'](_0xeeaeac,_0x3a4bf6){return _0xeeaeac?.[_0x3a4bf6||0x0];}['length'](_0xab82e0){return _0xab82e0?.['length'];}['concat'](_0x27ee6a,_0x58449b){return _0x27ee6a['concat'](_0x58449b);}['indexOf'](_0x4b2bd0,_0x143ed3,_0x5b1c48){return _0x4b2bd0['indexOf'](_0x143ed3,_0x5b1c48);}['join'](_0x1538a2,_0x3a11f7){return _0x1538a2['join'](_0x3a11f7);}['lastIndexOf'](_0x5bf26b,_0x1bf2d6,_0x463729){return _0x5bf26b['lastIndexOf'](_0x1bf2d6,_0x463729);}['pop'](_0x4d3d23){return _0x4d3d23['pop']();}['push'](_0xbd9f7b,..._0x17cfd5){return _0xbd9f7b['push'](..._0x17cfd5),_0xbd9f7b;}['reverse'](_0x113f67){return _0x113f67['reverse']();}['shift'](_0x2009f9){return _0x2009f9['shift']();}['slice'](_0x404251,_0x72174e,_0x280cc2){return _0x404251['slice'](_0x72174e,_0x280cc2);}['sort'](_0x577e0a,_0x3a2233='ASCENDING'){return _0x577e0a['sort']((_0x10abd9,_0x3a5b3e)=>{if(_0x3a2233==='ASCENDING'){if(_0x10abd9===_0x3a5b3e)return 0x0;if(_0x10abd9===null||_0x10abd9===undefined)return-0x1;if(_0x3a5b3e===null||_0x3a5b3e===undefined)return 0x1;if(typeof _0x10abd9==='string'&&typeof _0x3a5b3e==='string')return _0x10abd9['localeCompare'](_0x3a5b3e);return _0x10abd9<_0x3a5b3e?-0x1:0x1;}else{if(_0x10abd9===_0x3a5b3e)return 0x0;if(_0x10abd9===null||_0x10abd9===undefined)return 0x1;if(_0x3a5b3e===null||_0x3a5b3e===undefined)return-0x1;if(typeof _0x10abd9==='string'&&typeof _0x3a5b3e==='string')return _0x3a5b3e['localeCompare'](_0x10abd9);return _0x10abd9>_0x3a5b3e?-0x1:0x1;}});}['splice'](_0x4880d7,_0x3efbca,_0x40c0bf,..._0x37a6f4){return _0x4880d7['splice'](_0x3efbca,_0x40c0bf,..._0x37a6f4);}['unshift'](_0x2ee72f,..._0xa20468){return _0x2ee72f['unshift'](..._0xa20468);}}exports['ArrayHandler']=ArrayHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0xeda0c1,_0xb3f66c){var _0x24cd8f=_0x4be6,_0x1b63f3=_0xeda0c1();while(!![]){try{var _0x1e27d4=parseInt(_0x24cd8f(0x12c))/0x1*(parseInt(_0x24cd8f(0x135))/0x2)+parseInt(_0x24cd8f(0x12f))/0x3*(parseInt(_0x24cd8f(0x130))/0x4)+parseInt(_0x24cd8f(0x12d))/0x5*(-parseInt(_0x24cd8f(0x134))/0x6)+-parseInt(_0x24cd8f(0x132))/0x7+parseInt(_0x24cd8f(0x133))/0x8+-parseInt(_0x24cd8f(0x131))/0x9+parseInt(_0x24cd8f(0x12e))/0xa;if(_0x1e27d4===_0xb3f66c)break;else _0x1b63f3['push'](_0x1b63f3['shift']());}catch(_0xa27f1b){_0x1b63f3['push'](_0x1b63f3['shift']());}}}(_0x4c32,0xcd944));function _0x4c32(){var _0xc80549=['710457jVaAnJ','4CKFFhT','6091128RUdfpJ','8414819aEmkKh','5706600jmgKdt','534594gwlmks','6668wPXtah','411pqPEOD','45etWjox','12024340TSiZmw'];_0x4c32=function(){return _0xc80549;};return _0x4c32();}function _0x4be6(_0x1fe4c1,_0x58eae1){var _0x4c3267=_0x4c32();return _0x4be6=function(_0x4be679,_0x4f1a00){_0x4be679=_0x4be679-0x12c;var _0x114293=_0x4c3267[_0x4be679];return _0x114293;},_0x4be6(_0x1fe4c1,_0x58eae1);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['BitwiseHandler']=void 0x0;class BitwiseHandler{['and'](_0x3edb49,_0xf0cae7){return _0x3edb49&_0xf0cae7;}['or'](_0x337ac8,_0xf4af3d){return _0x337ac8|_0xf4af3d;}['xor'](_0x176312,_0x20fa20){return _0x176312^_0x20fa20;}['leftShift'](_0x5e6298,_0x1d6ff2){return _0x5e6298<<_0x1d6ff2;}['rightShift'](_0xb25789,_0x40f752){return _0xb25789>>_0x40f752;}['unsignedRightShift'](_0x309192,_0xe173da){return _0x309192>>>_0xe173da;}}exports['BitwiseHandler']=BitwiseHandler;
|