@kedem/okdb 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x25047a=_0x423a;(function(_0x511dd8,_0x24c5b4){const _0x5b6006=_0x423a,_0x3e9f53=_0x511dd8();while(!![]){try{const _0x4c0b95=parseInt(_0x5b6006(0x2af))/0x1+parseInt(_0x5b6006(0x29a))/0x2+parseInt(_0x5b6006(0x2de))/0x3*(-parseInt(_0x5b6006(0x2ba))/0x4)+parseInt(_0x5b6006(0x24f))/0x5*(parseInt(_0x5b6006(0x29d))/0x6)+parseInt(_0x5b6006(0x2c1))/0x7+parseInt(_0x5b6006(0x1f9))/0x8*(-parseInt(_0x5b6006(0x302))/0x9)+-parseInt(_0x5b6006(0x26c))/0xa;if(_0x4c0b95===_0x24c5b4)break;else _0x3e9f53['push'](_0x3e9f53['shift']());}catch(_0x45c663){_0x3e9f53['push'](_0x3e9f53['shift']());}}}(_0x5cb1,0xaac51));var require$$0$3=require(_0x25047a(0x1dc)),require$$1=require(_0x25047a(0x1e5)),require$$1$1=require(_0x25047a(0x21d)),require$$0$1=require('os'),require$$2=require(_0x25047a(0x32b)),require$$0=require(_0x25047a(0x2a0)),require$$0$2=require(_0x25047a(0x363));function getDefaultExportFromCjs(_0xce993b){const _0x323c0e=_0x25047a;return _0xce993b&&_0xce993b[_0x323c0e(0x2df)]&&Object[_0x323c0e(0x2e3)][_0x323c0e(0x2b5)][_0x323c0e(0x227)](_0xce993b,_0x323c0e(0x326))?_0xce993b[_0x323c0e(0x326)]:_0xce993b;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x85acdc=_0x25047a;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3d972f={'PUT':_0x85acdc(0x299),'REMOVE':_0x85acdc(0x1e3),'INDEX_DROP':_0x85acdc(0x340),'INDEX_REGISTER':_0x85acdc(0x2e5),'INDEX_RESET':_0x85acdc(0x304),'TYPE_REGISTER':_0x85acdc(0x2b2),'TYPE_DROP':'dropType','FTS_REGISTER':_0x85acdc(0x2c9),'FTS_DROP':_0x85acdc(0x359),'FTS_RESET':'resetFts','SCHEMA_SET':_0x85acdc(0x208),'SCHEMA_DROP':_0x85acdc(0x1bd),'TTL_SET':_0x85acdc(0x29e),'TTL_CLEAR':_0x85acdc(0x224)},_0x5f1795={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x85acdc(0x277),'SYSTEM_CLOCK_CHANGE':_0x85acdc(0x1c5),'SYSTEM_POKE':_0x85acdc(0x284),'SYSTEM_DRAIN':_0x85acdc(0x249),'SYSTEM_TYPE_DROP':_0x85acdc(0x33f),'SYSTEM_PROC':_0x85acdc(0x2aa),'SYSTEM_BUS_STATE_CHANGE':_0x85acdc(0x27e),'ITEM_CREATE':_0x85acdc(0x255),'ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':'index:reset','INDEX_READY':_0x85acdc(0x334),'INDEX_PROGRESS':_0x85acdc(0x342),'VIEW_PROGRESS':_0x85acdc(0x2a8),'INDEX_DROP':_0x85acdc(0x2c6),'INDEX_REGISTERED':_0x85acdc(0x223),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x85acdc(0x365),'FTS_RESET':_0x85acdc(0x2d8),'SCHEMA_SET':_0x85acdc(0x35a),'SCHEMA_DROP':_0x85acdc(0x356),'UNIQUE_VIOLATION':_0x85acdc(0x2eb),'UNIQUE_VIOLATION_RESOLVED':_0x85acdc(0x24c),'REF_VIOLATION':_0x85acdc(0x28d),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':_0x85acdc(0x260),'TXN_END':_0x85acdc(0x1c3),'TXN_ROLLBACK':_0x85acdc(0x218),'TYPE_REGISTERED':_0x85acdc(0x288),'TYPE_DROP':'type:drop','ENV_OPENED':_0x85acdc(0x1e4),'ENV_REMOVED':'env:removed','TTL_EXPIRED':_0x85acdc(0x1e7),'TTL_SET':_0x85acdc(0x22e),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x85acdc(0x27a),'LICENSE_ADDED':_0x85acdc(0x339),'LICENSE_ACTIVATED':_0x85acdc(0x1ec),'LICENSE_REMOVED':_0x85acdc(0x263)},_0x1f4c93={'CREATING':'creating','RESETTING':_0x85acdc(0x262),'READY':'ready','DROPPING':'dropping','WAITING':_0x85acdc(0x333)},_0x5154ec={'CREATED':'created','STARTING':_0x85acdc(0x1df),'STARTED':_0x85acdc(0x293),'STOPPING':_0x85acdc(0x1c2),'STOPPED':_0x85acdc(0x343)},_0x18ae52={'CREATING':_0x85acdc(0x32c),'READY':_0x85acdc(0x30b),'HALTED':_0x85acdc(0x2a4),'STOPPED':_0x85acdc(0x343),'RESETTING':_0x85acdc(0x262)},_0x5f06a4=Object[_0x85acdc(0x30a)]({'POKE':_0x85acdc(0x32e),'DRAIN':_0x85acdc(0x34f),'TYPE_DROP':'bus:type_drop','PROC':_0x85acdc(0x355)});return okdbEnums={'BUS_EVENTS':_0x5f06a4,'CHANGE_ACTIONS':_0x3d972f,'EVENTS':_0x5f1795,'INDEX_STATE':_0x1f4c93,'OKDB_STATE':_0x5154ec,'VIEW_STATE':_0x18ae52},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3a5058=_0x25047a;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x2f6cd8,performance:_0x2f5493}=require$$0,_0x7a8f2b=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3a5058(0x287),_0x101051=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2e3c46=process.env.OKDB_LOOP_LAG_ALL==='1',_0x1be642=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x230346{constructor(){const _0x589f78=_0x3a5058;this[_0x589f78(0x2dd)]=_0x7a8f2b,this[_0x589f78(0x1e6)]=new Map(),this['_h']=null,this[_0x589f78(0x28f)]=null,this[_0x589f78(0x2c3)]=![],this[_0x589f78(0x243)]=(_0x33b71d,_0xa47a96)=>process[_0x589f78(0x2e9)]['write'](_0x33b71d+(_0xa47a96?'\x20'+JSON[_0x589f78(0x259)](_0xa47a96):'')+'\x0a');}[_0x3a5058(0x360)](){const _0x522a37=_0x3a5058;return _0x2f5493[_0x522a37(0x360)]();}[_0x3a5058(0x1e0)](_0x452ede){const _0xabe668=_0x3a5058;if(typeof _0x452ede===_0xabe668(0x1d3))this['_log']=_0x452ede;}[_0x3a5058(0x2cb)](_0x53d3e3,_0x435458,_0x29e36a){const _0x152648=_0x3a5058;if(!this[_0x152648(0x2dd)])return;let _0xef692e=this[_0x152648(0x1e6)]['get'](_0x53d3e3);!_0xef692e&&(_0xef692e={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x152648(0x1e6)][_0x152648(0x345)](_0x53d3e3,_0xef692e)),_0xef692e['ms']+=_0x435458,_0xef692e[_0x152648(0x2bb)]+=0x1,_0x435458>_0xef692e[_0x152648(0x20f)]&&(_0xef692e[_0x152648(0x20f)]=_0x435458,_0xef692e[_0x152648(0x298)]=_0x29e36a||'');}[_0x3a5058(0x252)](_0x4a8327){const _0x7646ff=_0x3a5058;if(!this[_0x7646ff(0x2dd)]||this[_0x7646ff(0x2c3)])return;this['_started']=!![];if(_0x4a8327)this[_0x7646ff(0x243)]=_0x4a8327;this['_h']=_0x2f6cd8({'resolution':0xa}),this['_h']['enable'](),this['_timer']=setInterval(()=>this[_0x7646ff(0x221)](),_0x101051);if(this[_0x7646ff(0x28f)][_0x7646ff(0x337)])this['_timer'][_0x7646ff(0x337)]();}[_0x3a5058(0x310)](_0x2cbca8){const _0x59bfe4=_0x3a5058;if(!this[_0x59bfe4(0x257)])this['_windowCbs']=new Set();this[_0x59bfe4(0x257)][_0x59bfe4(0x2b0)](_0x2cbca8);if(!this['_started'])this['_startAdmission']();}[_0x3a5058(0x318)](_0x22e990){const _0x4e9394=_0x3a5058;this[_0x4e9394(0x257)]?.['delete'](_0x22e990);}['_startAdmission'](){const _0x2d5213=_0x3a5058;if(this[_0x2d5213(0x2e8)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x2f6cd8({'resolution':0xa}),this['_h'][_0x2d5213(0x1c9)]());const _0x3dfce5=_0x101051;this[_0x2d5213(0x328)]=setInterval(()=>{const _0x503493=_0x2d5213,_0x1e27f3=this['_h'];if(!_0x1e27f3)return;const _0x3898cc=_0x1e27f3[_0x503493(0x33b)](0x63)/0xf4240,_0x519725=_0x1e27f3[_0x503493(0x322)]/0xf4240,_0x8057ab=_0x1e27f3['mean']/0xf4240;_0x1e27f3[_0x503493(0x30f)]();if(this[_0x503493(0x257)])for(const _0x1d4eee of this[_0x503493(0x257)]){try{_0x1d4eee({'p99Ms':_0x3898cc,'maxMs':_0x519725,'meanMs':_0x8057ab,'reportMs':_0x3dfce5});}catch{}}},_0x3dfce5);if(this['_admissionTimer'][_0x2d5213(0x337)])this[_0x2d5213(0x328)][_0x2d5213(0x337)]();}[_0x3a5058(0x221)](){const _0x4814d4=_0x3a5058,_0x349b5b=this['_h'],_0x3b042b=_0x349b5b['max']/0xf4240,_0x3aa825=_0x349b5b[_0x4814d4(0x33b)](0x63)/0xf4240,_0x5e890d=_0x349b5b['mean']/0xf4240;_0x349b5b[_0x4814d4(0x30f)]();const _0x281a6f=[...this[_0x4814d4(0x1e6)][_0x4814d4(0x350)]()][_0x4814d4(0x25c)](([_0xb12fcc,_0x41cdfb])=>({'label':_0xb12fcc,..._0x41cdfb}))[_0x4814d4(0x27f)]((_0x2f249b,_0x58e77c)=>_0x58e77c['ms']-_0x2f249b['ms'])[_0x4814d4(0x33c)](0x0,0x8);this[_0x4814d4(0x1e6)][_0x4814d4(0x210)]();const _0x27847a=_0x281a6f[_0x4814d4(0x273)]((_0x387f82,_0x389211)=>_0x387f82+_0x389211['ms'],0x0),_0x45a184=_0x281a6f[_0x4814d4(0x25c)](_0x4f323c=>_0x4f323c[_0x4814d4(0x327)]+'='+_0x4f323c['ms'][_0x4814d4(0x28a)](0x0)+_0x4814d4(0x357)+_0x4f323c[_0x4814d4(0x2bb)]+(_0x4f323c[_0x4814d4(0x20f)]>0x5?_0x4814d4(0x28b)+_0x4f323c[_0x4814d4(0x20f)]['toFixed'](0x0)+'ms'+(_0x4f323c[_0x4814d4(0x298)]?'\x20'+_0x4f323c[_0x4814d4(0x298)]:'')+')':''));(_0x2e3c46||_0x3b042b>=_0x1be642)&&this['_log'](_0x4814d4(0x366)+_0x101051+_0x4814d4(0x2e1)+_0x3b042b[_0x4814d4(0x28a)](0x0)+_0x4814d4(0x341)+_0x3aa825[_0x4814d4(0x28a)](0x0)+_0x4814d4(0x1f6)+_0x5e890d[_0x4814d4(0x28a)](0x0)+_0x4814d4(0x29b)+_0x27847a[_0x4814d4(0x28a)](0x0)+'ms'+(_0x45a184[_0x4814d4(0x2bd)]?_0x4814d4(0x323)+_0x45a184[_0x4814d4(0x21f)]('\x20\x20'):''),{'feature':_0x4814d4(0x22b)});if(this[_0x4814d4(0x257)])for(const _0x54fdd1 of this[_0x4814d4(0x257)]){try{_0x54fdd1({'p99Ms':_0x3aa825,'maxMs':_0x3b042b,'meanMs':_0x5e890d,'reportMs':_0x101051});}catch{}}}['stop'](){const _0x211da0=_0x3a5058;if(this[_0x211da0(0x28f)])clearInterval(this[_0x211da0(0x28f)]);if(this['_h'])this['_h']['disable']();this[_0x211da0(0x28f)]=null,this['_h']=null,this['_started']=![];}}const _0x44b9cf=new _0x230346();if(_0x44b9cf['enabled'])_0x44b9cf[_0x3a5058(0x252)]();return okdbLoopMonitor={'LOOP':_0x44b9cf},okdbLoopMonitor;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x596ac4=_0x25047a;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x453e18=require$$0$1,_0x2b1529=require$$1,_0x2f0c36=require$$2,{LOOP:_0xcb4ae5}=requireOkdbLoopMonitor(),_0x52e4ca='~processes',_0x500fe7=_0x596ac4(0x26e),_0x391f91=_0x596ac4(0x2ce),_0x12c168=_0x596ac4(0x332),_0x1c89d7=(_0x22fb46,_0x14726f)=>_0x22fb46+':'+_0x14726f,_0x2caf82=(_0x186ace,_0x41617c)=>_0x186ace+'::'+_0x41617c,_0x319f85=(_0x3d3df9,_0x46913f)=>_0x3d3df9+'/'+_0x46913f,_0x42f22d=(_0x3f5032,_0x5180a3)=>_0x3f5032+'#'+_0x5180a3,_0x5f04b9=_0x30c20c=>{const _0x478e6d=_0x596ac4;if(_0x30c20c?.[_0x478e6d(0x2a1)])return _0x30c20c['processKey'];const _0x45d877=_0x30c20c?.[_0x478e6d(0x2e2)];return typeof _0x45d877===_0x478e6d(0x1ce)&&_0x45d877[_0x478e6d(0x31d)]('#')?_0x45d877[_0x478e6d(0x33c)](0x0,_0x45d877['indexOf']('#')):_0x45d877;},_0x2f1319=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x202444=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x59f590=_0x2f1319*0x3,_0x3210c0=[_0x596ac4(0x29c),_0x596ac4(0x25f),_0x596ac4(0x211),'processor:error'];let _0x14b48d=null;function _0x5ca4f7(){const _0xfd79b0=_0x596ac4;if(_0x14b48d==null)_0x14b48d=Math[_0xfd79b0(0x2ae)]((Date[_0xfd79b0(0x360)]()-process[_0xfd79b0(0x308)]()*0x3e8)/0x3e8)*0x3e8;return _0x14b48d;}function _0xf9307b(_0x1787c5){const _0x228683=_0x596ac4;if(process.env.OKDB_PROCESS_KILL===_0x228683(0x2d7))return![];if(_0x1787c5?.[_0x228683(0x28e)]?.[_0x228683(0x311)]&&typeof _0x1787c5['options'][_0x228683(0x311)]===_0x228683(0x1ee)&&_0x1787c5[_0x228683(0x28e)]['processes'][_0x228683(0x1e8)]===![])return![];return!![];}function _0x234c1f(_0x484360,_0x169877){const _0x1d6045=_0x596ac4,_0x4f8b53=!!_0x169877?.[_0x1d6045(0x2a5)];switch(_0x484360){case _0x1d6045(0x324):return{'controllable':_0x4f8b53,'decommissionable':![],'killable':!![],'killConfirm':_0x1d6045(0x250)};case _0x1d6045(0x2ec):case _0x1d6045(0x1e9):return{'controllable':_0x4f8b53,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x1d6045(0x22d):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x1d6045(0x26b):case _0x1d6045(0x215):case _0x1d6045(0x30e):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x1d6045(0x228)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x5a224a{constructor(_0x3702a7){const _0x52e183=_0x596ac4;this[_0x52e183(0x33a)]=_0x3702a7,this['_statusEnv']=null,this['_desired']=null,this[_0x52e183(0x1f0)]=null,this['_isWriter']=![],this['_isReader']=![],this['_processStartedAt']=_0x5ca4f7(),this[_0x52e183(0x1d7)]=_0x1c89d7(process[_0x52e183(0x2e0)],this[_0x52e183(0x2f7)]),this[_0x52e183(0x317)]=_0x2f0c36[_0x52e183(0x1fd)]()[_0x52e183(0x33c)](0x0,0x8),this['_rowKey']=_0x42f22d(this[_0x52e183(0x1d7)],this[_0x52e183(0x317)]),this[_0x52e183(0x315)]=Date[_0x52e183(0x360)](),this['_kind']=null,this[_0x52e183(0x225)]=null,this[_0x52e183(0x20e)]=null,this['_hbTimer']=null,this[_0x52e183(0x1cc)]=null,this[_0x52e183(0x1eb)]=null,this[_0x52e183(0x2be)]=0x0,this[_0x52e183(0x1fa)]={},this[_0x52e183(0x1ea)]=new Map(),this['_lastCpuUsage']=process['cpuUsage'](),this[_0x52e183(0x2d3)]=Date['now'](),this[_0x52e183(0x291)]=0x0,this[_0x52e183(0x254)]=new Map();}get[_0x596ac4(0x336)](){const _0x310bf4=_0x596ac4;return this[_0x310bf4(0x1d7)];}get[_0x596ac4(0x2ff)](){const _0x362f39=_0x596ac4;return this[_0x362f39(0x309)];}[_0x596ac4(0x2ca)](_0x7d9cc3,_0x5f23dd){const _0x2e186a=_0x596ac4,_0x3918d1=_0x234c1f(_0x7d9cc3,_0x5f23dd);if(_0x3918d1[_0x2e186a(0x31e)]&&!_0xf9307b(this[_0x2e186a(0x33a)]))return{..._0x3918d1,'killable':![],'killConfirm':undefined};return _0x3918d1;}['isActive'](){const _0x37b7cc=_0x596ac4;return!!this[_0x37b7cc(0x307)];}[_0x596ac4(0x319)](_0x4137e2){const _0x303f1e=_0x596ac4;Object[_0x303f1e(0x2da)](this[_0x303f1e(0x1fa)],_0x4137e2||{});}[_0x596ac4(0x1ef)](_0x379368){const _0x1573b7=_0x596ac4;if(_0x379368)this[_0x1573b7(0x20e)]=_0x379368;}[_0x596ac4(0x331)](_0x12978d={}){const _0x3da144=_0x596ac4;return this[_0x3da144(0x33a)][_0x3da144(0x2f0)](_0x12978d);}['processingStatusView'](){const _0x576b9e=_0x596ac4;let _0x389eef=null;const _0x3e4142={};for(const _0x325aff of this[_0x576b9e(0x265)]()){const _0x17466d=_0x325aff[_0x576b9e(0x22c)];if(!_0x17466d)continue;if(_0x389eef==null)_0x389eef=_0x17466d[_0x576b9e(0x34e)];for(const _0x3d5a96 of _0x17466d['processors']||[]){if(![_0x576b9e(0x2fc),'fanout',_0x576b9e(0x30e),_0x576b9e(0x2c4)]['includes'](_0x3d5a96['mode']))continue;const _0x570948=_0x3d5a96[_0x576b9e(0x294)]||_0x576b9e(0x326);(_0x3e4142[_0x570948]||=[])['push']({'type':_0x3d5a96['type'],'mode':_0x3d5a96[_0x576b9e(0x25a)],'state':_0x3d5a96[_0x576b9e(0x1d4)],'lastClock':_0x3d5a96[_0x576b9e(0x1be)],'headClock':_0x3d5a96[_0x576b9e(0x27d)],'lag':_0x3d5a96[_0x576b9e(0x2a2)]});}}return{'envs':_0x3e4142,'policy':_0x389eef,'source':_0x576b9e(0x1fe)};}[_0x596ac4(0x2b9)](){const _0x49aea8=_0x596ac4,_0xdfc117=_0x53522a=>{const _0x5f154e=_0x423a;if(_0x53522a[_0x5f154e(0x1d4)]===_0x5f154e(0x226)||_0x53522a[_0x5f154e(0x1d4)]===_0x5f154e(0x2dc)||_0x53522a[_0x5f154e(0x1d4)]==='error')return 0x3;if(_0x53522a[_0x5f154e(0x213)])return 0x1;return 0x2;},_0x1d8d00=new Map();for(const _0x493945 of this[_0x49aea8(0x265)]()){for(const _0x4497cf of _0x493945[_0x49aea8(0x22c)]?.['processors']||[]){const _0x3b54f8={..._0x4497cf,'owner':{'pid':_0x493945[_0x49aea8(0x2e0)]??null,'kind':_0x493945['kind']??null,'host':_0x493945[_0x49aea8(0x248)]??null}},_0x4cf61a=_0x4497cf[_0x49aea8(0x25a)]===_0x49aea8(0x2fc)?_0x49aea8(0x279)+(_0x4497cf['env']??'')+'::'+(_0x4497cf[_0x49aea8(0x20a)]??_0x4497cf[_0x49aea8(0x2cf)]??_0x4497cf['id']):_0x49aea8(0x35f)+(_0x493945[_0x49aea8(0x2e2)]??_0x493945['processKey']??'')+'::'+(_0x4497cf['env']??'')+'::'+_0x4497cf['id'],_0x570e5a=_0x1d8d00['get'](_0x4cf61a);if(!_0x570e5a||_0xdfc117(_0x3b54f8)>_0xdfc117(_0x570e5a))_0x1d8d00[_0x49aea8(0x345)](_0x4cf61a,_0x3b54f8);}}return[..._0x1d8d00['values']()];}['clusterStatusView'](){const _0x8440d6=_0x596ac4,_0x55e0fb=Date[_0x8440d6(0x360)](),_0x175850=this['listNodes'](),_0xcd71d6=_0x40735b=>Math[_0x8440d6(0x322)](0x0,Math['round']((_0x55e0fb-(_0x40735b[_0x8440d6(0x268)]||_0x55e0fb))/0x3e8)),_0x454db2=_0x175850[_0x8440d6(0x2ea)](_0x4f7f9d=>_0x4f7f9d[_0x8440d6(0x27c)]===_0x8440d6(0x324)),_0xc8b164=_0x175850[_0x8440d6(0x2ab)](_0x128055=>_0x128055[_0x8440d6(0x27c)]===_0x8440d6(0x346));if(_0x454db2||_0xc8b164[_0x8440d6(0x2bd)])return{'primary':_0x454db2?{'pid':_0x454db2[_0x8440d6(0x2e0)],'uptime':_0xcd71d6(_0x454db2)}:null,'workers':_0xc8b164[_0x8440d6(0x25c)](_0x392199=>({'pid':_0x392199['pid'],'uptime':_0xcd71d6(_0x392199)})),'workersConfigured':_0x454db2?.[_0x8440d6(0x33d)]?.[_0x8440d6(0x233)]??_0xc8b164[_0x8440d6(0x2bd)],'mode':_0x8440d6(0x1e5)};const _0x5dc22c=_0x175850[_0x8440d6(0x2ea)](_0x3ba608=>_0x3ba608[_0x8440d6(0x27c)]===_0x8440d6(0x2ec)||_0x3ba608[_0x8440d6(0x27c)]===_0x8440d6(0x1e9)||_0x3ba608[_0x8440d6(0x27c)]===_0x8440d6(0x22d)),_0x50ba05=_0x5dc22c?{'pid':_0x5dc22c['pid'],'uptime':_0xcd71d6(_0x5dc22c)}:{'pid':process[_0x8440d6(0x2e0)],'uptime':Math[_0x8440d6(0x322)](0x0,Math[_0x8440d6(0x2ae)](process[_0x8440d6(0x308)]()))};return{'primary':_0x50ba05,'workers':[_0x50ba05],'workersConfigured':0x1,'mode':'single'};}['nodesView'](){const _0x5197a3=_0x596ac4;return this[_0x5197a3(0x2d6)]();}[_0x596ac4(0x1c6)](){const _0x56a377=_0x596ac4,_0x28fd7d=new Map();for(const _0x4b5298 of this[_0x56a377(0x2d6)]())_0x28fd7d['set'](_0x4b5298['processKey'],{..._0x4b5298,'children':[]});const _0x56ea54=[];for(const _0x6e378b of _0x28fd7d[_0x56a377(0x22a)]()){const _0x4e6c1f=_0x6e378b[_0x56a377(0x281)]?_0x28fd7d[_0x56a377(0x2bf)](_0x6e378b[_0x56a377(0x281)]):null;if(_0x4e6c1f&&_0x4e6c1f!==_0x6e378b)_0x4e6c1f[_0x56a377(0x286)]['push'](_0x6e378b);else _0x56ea54['push'](_0x6e378b);}const _0x8b2f3=(_0x298bc1,_0x4c4055)=>_0x298bc1[_0x56a377(0x27c)]===_0x4c4055[_0x56a377(0x27c)]?(_0x298bc1['pid']||0x0)-(_0x4c4055[_0x56a377(0x2e0)]||0x0):(_0x298bc1['kind']??'')<(_0x4c4055[_0x56a377(0x27c)]??'')?-0x1:0x1,_0x3dfc04=_0x272527=>{const _0x1be498=_0x56a377;_0x272527[_0x1be498(0x27f)](_0x8b2f3);for(const _0x557c4e of _0x272527)if(_0x557c4e[_0x1be498(0x286)][_0x1be498(0x2bd)])_0x3dfc04(_0x557c4e['children']);};return _0x3dfc04(_0x56ea54),_0x56ea54;}[_0x596ac4(0x23f)](_0xf8feb4){const _0xe7adaa=_0x596ac4;return this['_groupByProcess']()[_0xe7adaa(0x2ea)](_0x19328d=>_0x19328d[_0xe7adaa(0x2a1)]===_0xf8feb4)??null;}[_0x596ac4(0x2d6)](_0x52eea0=Date[_0x596ac4(0x360)]()){const _0x251bf2=_0x596ac4,_0x564c68=new Map();for(const _0x379341 of this['listNodes']()){const _0x2c1260=_0x5f04b9(_0x379341);let _0x3b4708=_0x564c68[_0x251bf2(0x2bf)](_0x2c1260);!_0x3b4708&&(_0x3b4708={'processKey':_0x2c1260,'nodeKey':_0x2c1260,'pid':_0x379341['pid'],'ppid':_0x379341['ppid']??null,'host':_0x379341[_0x251bf2(0x248)]??null,'kind':_0x379341[_0x251bf2(0x27c)],'role':null,'supervisorKey':_0x379341['supervisorKey']??null,'slot':_0x379341[_0x251bf2(0x1c1)]??null,'slotKey':_0x379341['slotKey']??null,'caps':_0x379341[_0x251bf2(0x209)]??null,'lifecycle':_0x379341['lifecycle']??null,'uptime':Math[_0x251bf2(0x322)](0x0,Math[_0x251bf2(0x2ae)]((_0x52eea0-(_0x379341['startedAt']||_0x52eea0))/0x3e8)),'startedAt':_0x379341['startedAt']??null,'meta':_0x379341['meta']??null,'listenAddr':null,'processing':null,'stats':null,'instances':[]},_0x564c68[_0x251bf2(0x345)](_0x2c1260,_0x3b4708));_0x3b4708['instances'][_0x251bf2(0x276)]({'instanceId':_0x379341[_0x251bf2(0x271)]??null,'role':_0x379341[_0x251bf2(0x2ee)]??null,'listenAddr':_0x379341[_0x251bf2(0x354)]??null,'lifecycle':_0x379341['lifecycle']??null,'processing':_0x379341[_0x251bf2(0x22c)]??null});if(!_0x3b4708['role']&&_0x379341[_0x251bf2(0x2ee)])_0x3b4708[_0x251bf2(0x2ee)]=_0x379341['role'];if(!_0x3b4708[_0x251bf2(0x354)]&&_0x379341[_0x251bf2(0x354)])_0x3b4708[_0x251bf2(0x354)]=_0x379341['listenAddr'];if(!_0x3b4708[_0x251bf2(0x22c)]&&_0x379341[_0x251bf2(0x22c)])_0x3b4708['processing']=_0x379341[_0x251bf2(0x22c)];if(_0x3b4708['caps']==null&&_0x379341[_0x251bf2(0x209)])_0x3b4708['caps']=_0x379341[_0x251bf2(0x209)];if(_0x379341['stats']&&(!_0x3b4708[_0x251bf2(0x247)]||(_0x379341[_0x251bf2(0x247)]['at']??0x0)>(_0x3b4708['stats']['at']??0x0)))_0x3b4708['stats']=_0x379341['stats'];}return[..._0x564c68[_0x251bf2(0x22a)]()];}[_0x596ac4(0x33e)](){const _0x5dbe34=_0x596ac4,_0x2ac7a4=[],_0x1a9434={'rss':0x0,'heapUsed':0x0,'processes':0x0};for(const _0x33884d of this[_0x5dbe34(0x2d6)]()){_0x2ac7a4[_0x5dbe34(0x276)]({'processKey':_0x33884d[_0x5dbe34(0x2a1)],'kind':_0x33884d[_0x5dbe34(0x27c)],'pid':_0x33884d[_0x5dbe34(0x2e0)],'supervisorKey':_0x33884d[_0x5dbe34(0x281)],'meta':_0x33884d[_0x5dbe34(0x33d)]??null,'uptime':_0x33884d[_0x5dbe34(0x308)],'stats':_0x33884d[_0x5dbe34(0x247)]??null}),_0x1a9434[_0x5dbe34(0x311)]++,_0x33884d[_0x5dbe34(0x247)]&&(_0x1a9434['rss']+=_0x33884d[_0x5dbe34(0x247)][_0x5dbe34(0x1d5)]||0x0,_0x1a9434[_0x5dbe34(0x204)]+=(_0x33884d[_0x5dbe34(0x247)][_0x5dbe34(0x204)]||0x0)+(_0x33884d[_0x5dbe34(0x247)][_0x5dbe34(0x2c8)]?.[_0x5dbe34(0x204)]||0x0));}return{'totals':_0x1a9434,'nodes':_0x2ac7a4};}async[_0x596ac4(0x344)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1b21d4=_0x596ac4;this['_isWriter']=this[_0x1b21d4(0x242)]||!!writer,this['_isReader']=this[_0x1b21d4(0x1e2)]||!!reader,this['_kind']=kind||this[_0x1b21d4(0x2f2)]||(_0x2b1529[_0x1b21d4(0x28c)]?_0x1b21d4(0x346):_0x1b21d4(0x2ec)),this[_0x1b21d4(0x225)]=supervisorKey??this[_0x1b21d4(0x225)],this['_listenAddr']=listenAddr??this[_0x1b21d4(0x20e)],this[_0x1b21d4(0x2d1)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x3b9e69=await this[_0x1b21d4(0x33a)][_0x1b21d4(0x256)](_0x52e4ca,{'sync':![],'durability':_0x1b21d4(0x24e)});if(!_0x3b9e69[_0x1b21d4(0x235)](_0x500fe7))await _0x3b9e69['registerType'](_0x500fe7);this[_0x1b21d4(0x307)]=_0x3b9e69;}return this[_0x1b21d4(0x307)];}[_0x596ac4(0x2a9)](){const _0x27a54a=_0x596ac4;return this[_0x27a54a(0x20d)]!==this[_0x27a54a(0x307)]&&(this[_0x27a54a(0x20d)]=this[_0x27a54a(0x307)],this[_0x27a54a(0x283)]=this['_statusEnv'][_0x27a54a(0x338)](_0x500fe7)[_0x27a54a(0x26f)]),this[_0x27a54a(0x283)];}['_putRowAsync'](_0x4d37b3){const _0x57eb30=_0x596ac4,_0x507fe4=this[_0x57eb30(0x2a9)]()['put'](_0x4d37b3[_0x57eb30(0x2e2)],_0x4d37b3,0x1);if(_0x507fe4&&typeof _0x507fe4['then']===_0x57eb30(0x1d3))_0x507fe4[_0x57eb30(0x316)](undefined,()=>{});return _0x507fe4;}[_0x596ac4(0x1c0)](_0x436207){const _0x36b21e=_0x596ac4,_0x583374=this[_0x36b21e(0x2a9)]()[_0x36b21e(0x1e3)](_0x436207);if(_0x583374&&typeof _0x583374[_0x36b21e(0x316)]==='function')_0x583374['then'](undefined,()=>{});return _0x583374;}async['putNode'](_0x9d5069){const _0x3b58fe=_0x596ac4;if(!this[_0x3b58fe(0x307)]||!this[_0x3b58fe(0x242)]||!_0x9d5069?.[_0x3b58fe(0x2e2)])return;return this[_0x3b58fe(0x2d5)](_0x9d5069);}async[_0x596ac4(0x1db)](_0x1c836c){const _0xbadbe9=_0x596ac4;if(!this['_statusEnv']||!this['_isWriter']||!_0x1c836c)return;const _0x598cae=_0x1c836c['includes']('#'),_0x3c474c=[];for(const {key:_0x41d6e3}of this[_0xbadbe9(0x307)][_0xbadbe9(0x30d)](_0x500fe7)){if(_0x41d6e3===_0x1c836c||!_0x598cae&&typeof _0x41d6e3==='string'&&_0x41d6e3[_0xbadbe9(0x301)](_0x1c836c+'#'))_0x3c474c[_0xbadbe9(0x276)](_0x41d6e3);}return Promise[_0xbadbe9(0x296)](_0x3c474c['map'](_0x1af24d=>this[_0xbadbe9(0x1c0)](_0x1af24d)));}[_0x596ac4(0x26a)](_0xa302e4){const _0x3d8145=_0x596ac4;if(typeof _0xa302e4?.[_0x3d8145(0x2e0)]!=='number')return![];if(_0xa302e4[_0x3d8145(0x248)]!==_0x453e18['hostname']())return![];if(_0xa302e4[_0x3d8145(0x2e0)]===process[_0x3d8145(0x2e0)])return![];try{return process[_0x3d8145(0x1e8)](_0xa302e4[_0x3d8145(0x2e0)],0x0),![];}catch(_0x494c68){return _0x494c68[_0x3d8145(0x2e6)]===_0x3d8145(0x205);}}[_0x596ac4(0x265)](){const _0x19315d=_0x596ac4;if(!this[_0x19315d(0x307)])return[];const _0x57afb3=Date[_0x19315d(0x360)](),_0x574534=[];for(const {value:_0x370a18}of this[_0x19315d(0x307)][_0x19315d(0x30d)](_0x500fe7)){if(_0x370a18&&(_0x370a18[_0x19315d(0x31c)]==null||_0x370a18[_0x19315d(0x31c)]>=_0x57afb3)&&!this[_0x19315d(0x26a)](_0x370a18))_0x574534['push'](_0x370a18);}return _0x574534;}[_0x596ac4(0x1f7)](_0x304558=0x0){const _0x30aead=_0x596ac4;if(!this[_0x30aead(0x307)]||!this[_0x30aead(0x242)])return;const _0xf53c5b=Date[_0x30aead(0x360)]()-_0x304558,_0x45f48c=new Set(),_0x4b2da2=[];for(const {key:_0x438742,value:_0x172cee}of this[_0x30aead(0x307)][_0x30aead(0x30d)](_0x500fe7)){if(_0x172cee&&(_0x172cee[_0x30aead(0x31c)]!=null&&_0x172cee[_0x30aead(0x31c)]<_0xf53c5b||this[_0x30aead(0x26a)](_0x172cee)))_0x4b2da2[_0x30aead(0x276)](_0x438742);else _0x45f48c[_0x30aead(0x2b0)](_0x5f04b9(_0x172cee)??_0x438742);}for(const _0x4b62fe of _0x4b2da2)this[_0x30aead(0x1c0)](_0x4b62fe);if(this[_0x30aead(0x2d1)]())for(const {key:_0x171b5b}of this[_0x30aead(0x1d0)](_0x30aead(0x26e))){if(!_0x45f48c['has'](_0x171b5b))this['_desired'][_0x30aead(0x2e4)](_0x30aead(0x2b4)+_0x171b5b);}}[_0x596ac4(0x222)](_0x157995=null){const _0x577d60=_0x596ac4;if(this[_0x577d60(0x274)]||!this[_0x577d60(0x242)]||!this[_0x577d60(0x307)])return;this[_0x577d60(0x1eb)]=_0x157995,this[_0x577d60(0x1cc)]=()=>this[_0x577d60(0x229)]();for(const _0x119a1b of _0x3210c0)this['okdb'][_0x577d60(0x1c7)]['on'](_0x119a1b,this[_0x577d60(0x1cc)]);this[_0x577d60(0x1c4)]();const _0x5a14f0=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x2f1319;this[_0x577d60(0x274)]=setInterval(()=>{const _0x393a03=_0x577d60;if(this['_onTick'])try{this[_0x393a03(0x1eb)]();}catch{}this[_0x393a03(0x1c4)](),this['reap']();},_0x5a14f0);if(this['_hbTimer'][_0x577d60(0x337)])this['_hbTimer'][_0x577d60(0x337)]();}[_0x596ac4(0x229)](){const _0x5ee00b=_0x596ac4;if(!this[_0x5ee00b(0x242)]||!this[_0x5ee00b(0x307)])return;if(Date[_0x5ee00b(0x360)]()-this[_0x5ee00b(0x2be)]<_0x202444)return;this[_0x5ee00b(0x1c4)]();}[_0x596ac4(0x1c4)](){const _0x43ab3b=_0x596ac4;if(!this[_0x43ab3b(0x242)]||!this['_statusEnv'])return;this['_lastPublishAt']=Date['now']();try{const _0x2cfbea=[this[_0x43ab3b(0x2f9)]()];for(const _0x3dd657 of this[_0x43ab3b(0x1ea)][_0x43ab3b(0x22a)]())_0x2cfbea[_0x43ab3b(0x276)](this['_buildChildRow'](_0x3dd657));const _0x12ed4a=_0xcb4ae5[_0x43ab3b(0x2dd)]?_0xcb4ae5[_0x43ab3b(0x360)]():0x0,_0x24dc57=Promise[_0x43ab3b(0x296)](_0x2cfbea['map'](_0x41804c=>this[_0x43ab3b(0x2d5)](_0x41804c)))[_0x43ab3b(0x2fa)](()=>{});if(_0xcb4ae5[_0x43ab3b(0x2dd)])_0xcb4ae5[_0x43ab3b(0x2cb)](_0x43ab3b(0x2ac),_0xcb4ae5[_0x43ab3b(0x360)]()-_0x12ed4a,'rows='+_0x2cfbea[_0x43ab3b(0x2bd)]);return _0x24dc57;}catch{}}async[_0x596ac4(0x35b)](){const _0x160dc4=_0x596ac4;if(this[_0x160dc4(0x1cc)]){for(const _0x2cdc77 of _0x3210c0){try{this[_0x160dc4(0x33a)][_0x160dc4(0x1c7)][_0x160dc4(0x2d7)](_0x2cdc77,this[_0x160dc4(0x1cc)]);}catch{}}this['_onProcEvent']=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x160dc4(0x274)]=null);try{if(this[_0x160dc4(0x307)]&&this[_0x160dc4(0x242)])await this['removeNode'](this['_rowKey']);}catch{}}async[_0x596ac4(0x269)](){const _0xf523e7=_0x596ac4;if(!this[_0xf523e7(0x307)]||!this[_0xf523e7(0x242)])return;try{await this[_0xf523e7(0x1db)](this[_0xf523e7(0x309)]);}catch{}try{const _0x5d470b=[];for(const {value:_0x10a812}of this['_statusEnv']['getRange'](_0x500fe7)){if(_0x10a812?.['ppid']===process['pid']&&_0x10a812['nodeKey'])_0x5d470b[_0xf523e7(0x276)](_0x10a812[_0xf523e7(0x2e2)]);}for(const _0x53ce6a of _0x5d470b){try{await this[_0xf523e7(0x1db)](_0x53ce6a);}catch{}}}catch{}}async['publishOwnRow'](){const _0x468ce8=_0x596ac4;return this['putNode'](this[_0x468ce8(0x2f9)]());}async[_0x596ac4(0x1f8)](_0x25a60e){const _0x2dc5ae=_0x596ac4;if(!this['_statusEnv']||!this[_0x2dc5ae(0x242)])return;return this[_0x2dc5ae(0x305)](this[_0x2dc5ae(0x25e)](_0x25a60e));}[_0x596ac4(0x25e)]({pid:_0x3c8938,startedAt:_0x2395bc,kind:_0x11a4a5,supervisorKey:_0x2196d1,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x596ac4(0x1da),meta:meta=null,stats:stats=null}){const _0x5b5b28=_0x596ac4,_0x1e1cf8=Date[_0x5b5b28(0x360)](),_0x29b133=_0x1c89d7(_0x3c8938,_0x2395bc);return{'nodeKey':_0x42f22d(_0x29b133,'0'),'processKey':_0x29b133,'instanceId':'0','pid':_0x3c8938,'startedAt':_0x2395bc,'ppid':process[_0x5b5b28(0x2e0)],'host':_0x453e18[_0x5b5b28(0x23c)](),'supervisorKey':_0x2196d1,'slot':slot,'slotKey':slotKey,'kind':_0x11a4a5,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x1e1cf8,'expiresAt':_0x1e1cf8+_0x59f590,'caps':this['_caps'](_0x11a4a5,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x596ac4(0x1d2)](_0x579c32){const _0x3475ab=_0x596ac4;if(!_0x579c32?.[_0x3475ab(0x2e0)])return null;const _0xdabb8a=_0x1c89d7(_0x579c32[_0x3475ab(0x2e0)],_0x579c32[_0x3475ab(0x268)]);this[_0x3475ab(0x1ea)][_0x3475ab(0x345)](_0xdabb8a,{..._0x579c32,'supervisorKey':_0x579c32[_0x3475ab(0x281)]??this[_0x3475ab(0x1d7)]});if(this['_isWriter'])await this[_0x3475ab(0x1f8)](this[_0x3475ab(0x1ea)]['get'](_0xdabb8a))['catch']?.(()=>{});return _0xdabb8a;}[_0x596ac4(0x240)](_0x46d941){const _0x507528=_0x596ac4;if(!_0x46d941)return;return this[_0x507528(0x1ea)][_0x507528(0x251)](_0x46d941),this[_0x507528(0x1db)](_0x46d941);}['_sampleOwnStats'](){const _0x2220c3=_0x596ac4,_0x11dbe4=Date['now'](),_0x435e8f=process[_0x2220c3(0x2d2)](),_0x504f78=(_0x11dbe4-this['_lastCpuAt'])*0x3e8;if(_0x504f78>=0x3d090){const _0x559c4b=_0x435e8f[_0x2220c3(0x1fb)]-this[_0x2220c3(0x34b)][_0x2220c3(0x1fb)]+(_0x435e8f[_0x2220c3(0x212)]-this[_0x2220c3(0x34b)][_0x2220c3(0x212)]),_0x5bb629=_0x453e18[_0x2220c3(0x214)]()[_0x2220c3(0x2bd)]||0x1;this[_0x2220c3(0x291)]=Math[_0x2220c3(0x2bc)](0x64,Math['round'](_0x559c4b/(_0x504f78*_0x5bb629)*0x64)),this['_lastCpuWindowMs']=Math[_0x2220c3(0x2ae)](_0x504f78/0x3e8),this[_0x2220c3(0x34b)]=_0x435e8f,this[_0x2220c3(0x2d3)]=_0x11dbe4;}const _0x4f1db9=process['memoryUsage']();let _0x47b7a3=null;if(this[_0x2220c3(0x254)][_0x2220c3(0x24a)]>0x0){let _0x1fc091=0x0;for(const _0x14af86 of this[_0x2220c3(0x254)][_0x2220c3(0x22a)]())_0x1fc091+=_0x14af86[_0x2220c3(0x204)]||0x0;_0x47b7a3={'count':this[_0x2220c3(0x254)][_0x2220c3(0x24a)],'heapUsed':_0x1fc091};}return{'rss':_0x4f1db9[_0x2220c3(0x1d5)],'heapUsed':_0x4f1db9[_0x2220c3(0x204)],'heapTotal':_0x4f1db9['heapTotal'],'external':_0x4f1db9[_0x2220c3(0x266)],'cpuPct':this[_0x2220c3(0x291)],'cpuWindowMs':this[_0x2220c3(0x349)]??null,'threads':_0x47b7a3,'at':_0x11dbe4};}[_0x596ac4(0x24d)](_0x47a11a,_0x39ff80){if(!_0x47a11a||!_0x39ff80)return;this['_threadStats']['set'](_0x47a11a,_0x39ff80);}['clearThreadStats'](_0x47f226){this['_threadStats']['delete'](_0x47f226);}[_0x596ac4(0x234)](_0xce6459,_0x153c7f,_0x1f9443=undefined){const _0x4f7440=_0x596ac4,_0x5bdaf2=this[_0x4f7440(0x1ea)]['get'](_0xce6459);if(!_0x5bdaf2||!_0x153c7f)return;if(_0x1f9443!==undefined)_0x5bdaf2[_0x4f7440(0x22c)]=_0x1f9443;_0x5bdaf2['stats']={'rss':_0x153c7f['rss']??null,'heapUsed':_0x153c7f['heapUsed']??null,'heapTotal':_0x153c7f[_0x4f7440(0x203)]??null,'external':_0x153c7f[_0x4f7440(0x266)]??null,'cpuPct':_0x153c7f[_0x4f7440(0x2db)]??null,'cpuWindowMs':_0x153c7f[_0x4f7440(0x313)]??null,'threads':_0x153c7f[_0x4f7440(0x2c8)]??null,'claims':_0x153c7f[_0x4f7440(0x320)]??null,'envsOpen':_0x153c7f[_0x4f7440(0x31a)]??null,'at':Date['now']()};}[_0x596ac4(0x2f9)](){const _0x403c60=_0x596ac4,_0x2bc253=Date[_0x403c60(0x360)](),_0x2a99fd=this['okdb']['_role']||{},_0x57e22a=this['_kind']||_0x403c60(0x2ec);return{'nodeKey':this[_0x403c60(0x309)],'processKey':this['_selfKey'],'instanceId':this[_0x403c60(0x317)],'pid':process[_0x403c60(0x2e0)],'startedAt':this[_0x403c60(0x2f7)],'instanceStartedAt':this[_0x403c60(0x315)],'ppid':typeof process[_0x403c60(0x2fb)]===_0x403c60(0x238)?process['ppid']:null,'host':_0x453e18[_0x403c60(0x23c)](),'supervisorKey':this[_0x403c60(0x225)]??null,'kind':_0x57e22a,'role':{'engines':!!_0x2a99fd[_0x403c60(0x23d)],'asyncProcessors':!!_0x2a99fd[_0x403c60(0x2a5)],'compaction':_0x2a99fd[_0x403c60(0x202)],'http':_0x2a99fd[_0x403c60(0x1f5)]},'listenAddr':this[_0x403c60(0x20e)]??null,'heartbeatAt':_0x2bc253,'expiresAt':_0x2bc253+_0x59f590,'caps':this[_0x403c60(0x2ca)](_0x57e22a,_0x2a99fd),'lifecycle':{'state':_0x403c60(0x1da),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x2a99fd[_0x403c60(0x2a5)]?this['_buildProcessingFacet']():null,'stats':this[_0x403c60(0x244)]()};}[_0x596ac4(0x2ef)](){const _0x5432e9=_0x596ac4,_0x500beb=[];try{for(const [_0x9e49b1,_0x2ec64d]of this[_0x5432e9(0x33a)]['_envs']){if(_0x9e49b1[_0x5432e9(0x301)]('~'))continue;for(const _0x56c5fe of _0x2ec64d[_0x5432e9(0x34a)][_0x5432e9(0x237)]())_0x500beb['push']({..._0x56c5fe,'env':_0x9e49b1});}}catch{}return{'policy':this[_0x5432e9(0x33a)][_0x5432e9(0x2e7)]??null,'processors':_0x500beb};}['_ensureDesired'](){const _0x5c62b4=_0x596ac4;if(this[_0x5c62b4(0x24b)])return!![];const _0x352bac=this[_0x5c62b4(0x33a)]['_rootDb'];if(!_0x352bac)return![];return this[_0x5c62b4(0x24b)]=_0x352bac[_0x5c62b4(0x35c)](_0x391f91,{'dupSort':![]}),this[_0x5c62b4(0x1f0)]=_0x352bac['openDB'](_0x12c168,{'dupSort':![]}),!![];}[_0x596ac4(0x29f)](){return!!this['_desired'];}[_0x596ac4(0x32a)](_0x5d90b6,_0x4b1c91){const _0x49d74b=_0x596ac4;if(!this[_0x49d74b(0x2d1)]())return null;return this[_0x49d74b(0x24b)][_0x49d74b(0x2bf)](_0x5d90b6+'/'+_0x4b1c91)??null;}[_0x596ac4(0x2cc)](_0x37b3af,_0x35cc32,_0x2a1591){const _0x82a5af=_0x596ac4;if(!this[_0x82a5af(0x2d1)]())return null;const _0x5addbb=_0x37b3af+'/'+_0x35cc32;let _0x68f1b7;return this[_0x82a5af(0x24b)]['transactionSync'](()=>{const _0x1252bb=_0x82a5af,_0x592873=this[_0x1252bb(0x24b)][_0x1252bb(0x2bf)](_0x5addbb)||{'version':0x0};_0x68f1b7=(_0x592873[_0x1252bb(0x300)]||0x0)+0x1,this['_desired'][_0x1252bb(0x299)](_0x5addbb,{..._0x592873,..._0x2a1591,'version':_0x68f1b7,'updatedAt':Date[_0x1252bb(0x360)]()});}),_0x68f1b7;}[_0x596ac4(0x1d0)](_0x29ab2e){const _0x24ff24=_0x596ac4;if(!this['_ensureDesired']())return[];const _0x25833a=_0x29ab2e+'/',_0x308c37=[];for(const {key:_0xfe04ed,value:_0xa954af}of this[_0x24ff24(0x24b)]['getRange']({'start':_0x25833a,'end':_0x25833a+'ÿ'})){if(typeof _0xfe04ed!==_0x24ff24(0x1ce)||!_0xfe04ed[_0x24ff24(0x301)](_0x25833a))break;_0x308c37[_0x24ff24(0x276)]({'key':_0xfe04ed['slice'](_0x25833a['length']),'value':_0xa954af});}return _0x308c37;}['getCmd'](_0x5f1b54){const _0x959de1=_0x596ac4;if(!this[_0x959de1(0x2d1)]())return null;return this[_0x959de1(0x1f0)][_0x959de1(0x2bf)](_0x5f1b54)??null;}[_0x596ac4(0x351)](_0x2d6307,_0x3aaec1,_0x1ceee3={}){const _0x193d8d=_0x596ac4;if(!this[_0x193d8d(0x2d1)]())return null;let _0x397fa5;return this[_0x193d8d(0x1f0)][_0x193d8d(0x34c)](()=>{const _0x3f52da=_0x193d8d,_0x2997d4=this[_0x3f52da(0x1f0)][_0x3f52da(0x2bf)](_0x2d6307)||{'epoch':0x0};_0x397fa5=(_0x2997d4['epoch']||0x0)+0x1,this[_0x3f52da(0x1f0)][_0x3f52da(0x299)](_0x2d6307,{..._0x2997d4,..._0x1ceee3,'cmd':_0x3aaec1,'epoch':_0x397fa5,'updatedAt':Date[_0x3f52da(0x360)]()});}),_0x397fa5;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x5a224a,'nodeKey':_0x1c89d7,'logicalKey':_0x2caf82,'slotKey':_0x319f85,'PROCESS_ENV':_0x52e4ca,'NODE_TYPE':_0x500fe7},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x3bc899=_0x25047a;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x183737=require$$0$2,{EVENTS:_0x26493e,CHANGE_ACTIONS:_0x34caee}=requireOkdbEnums(),{LOOP:_0x801754}=requireOkdbLoopMonitor(),_0x24a446=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x54c468=0x5,_0x60d40e=0x2710;class _0x4be66e extends _0x183737{constructor(_0x4073ae,_0x16de58={}){const _0x513cb4=_0x423a;super(),this[_0x513cb4(0x33a)]=_0x4073ae,this[_0x513cb4(0x272)]=_0x16de58[_0x513cb4(0x2cd)]??_0x24a446,this[_0x513cb4(0x2c2)]=_0x16de58['flushDebounce']??_0x54c468,this['_dedupeMax']=_0x16de58[_0x513cb4(0x1f1)]??_0x60d40e,this[_0x513cb4(0x2c3)]=![],this['_cursors']=new Map(),this[_0x513cb4(0x282)]=new Map(),this['_pending']=new Map(),this[_0x513cb4(0x1d9)]=null,this[_0x513cb4(0x362)]=![],this['_seen']=new Set(),this[_0x513cb4(0x1f4)]=_0x50e7ce=>this[_0x513cb4(0x217)](_0x50e7ce),this[_0x513cb4(0x1ed)]=_0x325efd=>this[_0x513cb4(0x31f)](_0x325efd),this[_0x513cb4(0x270)]=()=>this[_0x513cb4(0x1de)]();}[_0x3bc899(0x252)](){const _0x3f7ab7=_0x3bc899;if(this['_started'])return;this['_started']=!![];for(const [_0x3800bb,_0x236673]of this[_0x3f7ab7(0x33a)][_0x3f7ab7(0x1e1)]){if(_0x3800bb[_0x3f7ab7(0x301)]('~'))continue;try{this[_0x3f7ab7(0x282)][_0x3f7ab7(0x345)](_0x3800bb,_0x236673[_0x3f7ab7(0x236)]()||0x0);}catch{}}const {events:_0x3c347e}=this[_0x3f7ab7(0x33a)];_0x3c347e['on'](_0x26493e[_0x3f7ab7(0x26d)],this['_onItem']),_0x3c347e['on'](_0x26493e[_0x3f7ab7(0x20c)],this[_0x3f7ab7(0x1f4)]),_0x3c347e['on'](_0x26493e[_0x3f7ab7(0x2ad)],this[_0x3f7ab7(0x1f4)]),_0x3c347e['on'](_0x26493e[_0x3f7ab7(0x1cf)],this[_0x3f7ab7(0x1ed)]),_0x3c347e[_0x3f7ab7(0x2c0)](_0x26493e[_0x3f7ab7(0x335)],this[_0x3f7ab7(0x270)]);}[_0x3bc899(0x1de)](){const _0x50debc=_0x3bc899;if(!this[_0x50debc(0x2c3)])return;this[_0x50debc(0x2c3)]=![];const {events:_0x3d64b4}=this[_0x50debc(0x33a)];_0x3d64b4[_0x50debc(0x2d7)](_0x26493e[_0x50debc(0x26d)],this[_0x50debc(0x1f4)]),_0x3d64b4['off'](_0x26493e[_0x50debc(0x20c)],this['_onItem']),_0x3d64b4['off'](_0x26493e['ITEM_REMOVE'],this[_0x50debc(0x1f4)]),_0x3d64b4[_0x50debc(0x2d7)](_0x26493e[_0x50debc(0x1cf)],this[_0x50debc(0x1ed)]);try{_0x3d64b4[_0x50debc(0x2d7)](_0x26493e[_0x50debc(0x335)],this[_0x50debc(0x270)]);}catch{}this[_0x50debc(0x1d9)]&&(clearTimeout(this[_0x50debc(0x1d9)]),this[_0x50debc(0x1d9)]=null),this[_0x50debc(0x207)]['clear'](),this['_cursors'][_0x50debc(0x210)](),this[_0x50debc(0x282)][_0x50debc(0x210)](),this[_0x50debc(0x285)][_0x50debc(0x210)]();}['_dedupeKey'](_0x5c3dfe,_0x378cfc,_0x2e7f87,_0x4ae4fb){return _0x5c3dfe+'\x00'+_0x378cfc+'\x00'+_0x2e7f87+'\x00'+_0x4ae4fb;}[_0x3bc899(0x1d1)](_0xa898e0,_0x3a667d,_0x510323,_0x374a46){const _0x23d36e=_0x3bc899,_0x387acc=this['_dedupeKey'](_0xa898e0,_0x3a667d,_0x510323,_0x374a46);if(this['_seen']['has'](_0x387acc))return![];this[_0x23d36e(0x285)]['add'](_0x387acc);if(this[_0x23d36e(0x285)][_0x23d36e(0x24a)]>this[_0x23d36e(0x347)]){const _0xeeea72=this[_0x23d36e(0x285)][_0x23d36e(0x22a)]()['next']()[_0x23d36e(0x358)];this[_0x23d36e(0x285)]['delete'](_0xeeea72);}return!![];}[_0x3bc899(0x217)](_0x2b910d){const _0x4af434=_0x3bc899;if(!this[_0x4af434(0x2c3)]||!_0x2b910d)return;const {env:_0x12cc2d,type:_0x492211,key:_0x122d01,clock:_0x100b15,origin:_0x5cb308,action:_0x9ca217,newValue:_0x4dac0a,oldValue:_0x4496aa}=_0x2b910d;if(_0x12cc2d==null||_0x492211==null||_0x122d01==null)return;if(typeof _0x12cc2d===_0x4af434(0x1ce)&&_0x12cc2d[_0x4af434(0x301)]('~'))return;if(typeof _0x492211===_0x4af434(0x1ce)&&_0x492211[_0x4af434(0x301)]('~'))return;if(!this[_0x4af434(0x1d1)](_0x12cc2d,_0x492211,_0x122d01,_0x100b15))return;const _0xc83284=_0x9ca217===_0x34caee['REMOVE']?_0x4af434(0x1e3):'put';this[_0x4af434(0x2a6)]('change',{'env':_0x12cc2d,'type':_0x492211,'key':_0x122d01,'op':_0xc83284,'clock':_0x100b15,'origin':_0x5cb308,'value':_0xc83284===_0x4af434(0x1e3)?null:_0x4dac0a,'prevValue':_0x4496aa});}[_0x3bc899(0x31f)](_0x463b85){const _0x1f4105=_0x3bc899;if(!this['_started'])return;if(!_0x463b85||typeof _0x463b85[_0x1f4105(0x294)]!==_0x1f4105(0x1ce)||typeof _0x463b85[_0x1f4105(0x2cf)]!==_0x1f4105(0x1ce))return;const {env:_0x395962,type:_0x3c322a}=_0x463b85;if(_0x395962['startsWith']('~')||_0x3c322a[_0x1f4105(0x301)]('~'))return;this[_0x1f4105(0x207)][_0x1f4105(0x345)](_0x395962+'\x00'+_0x3c322a,{'env':_0x395962,'type':_0x3c322a}),this[_0x1f4105(0x295)]();}[_0x3bc899(0x295)](){const _0x3d01e9=_0x3bc899;if(this['_flushTimer'])return;const _0x59d2fb=()=>{const _0x166b5d=_0x423a;this['_flushTimer']=null,this[_0x166b5d(0x230)]()[_0x166b5d(0x2fa)](()=>{});};this['_flushTimer']=setTimeout(_0x59d2fb,this['_flushDebounce']>0x0?this[_0x3d01e9(0x2c2)]:0x0);}async[_0x3bc899(0x230)](){const _0x51ac33=_0x3bc899;if(this[_0x51ac33(0x362)]){this[_0x51ac33(0x295)]();return;}this[_0x51ac33(0x362)]=!![];try{const _0x1722fd=[...this[_0x51ac33(0x207)]['values']()];this[_0x51ac33(0x207)][_0x51ac33(0x210)]();let _0x3a7364=![];for(const {env:_0x4cfd6d,type:_0x5e28fe}of _0x1722fd){try{const _0x3cd6bf=await this[_0x51ac33(0x21a)](_0x4cfd6d,_0x5e28fe);if(_0x3cd6bf)_0x3a7364=!![];}catch{this['_pending'][_0x51ac33(0x345)](_0x4cfd6d+'\x00'+_0x5e28fe,{'env':_0x4cfd6d,'type':_0x5e28fe}),_0x3a7364=!![];}}if(_0x3a7364||this[_0x51ac33(0x207)][_0x51ac33(0x24a)]>0x0)this[_0x51ac33(0x295)]();}finally{this[_0x51ac33(0x362)]=![];}}async['_drainOne'](_0x2c2f3e,_0x1f54ef){const _0x4db0c8=_0x3bc899,_0x5bc6b1=await this[_0x4db0c8(0x33a)][_0x4db0c8(0x2c5)](_0x2c2f3e),_0x431889=_0x2c2f3e+'\x00'+_0x1f54ef;!this[_0x4db0c8(0x25b)][_0x4db0c8(0x2f4)](_0x431889)&&(!this[_0x4db0c8(0x282)]['has'](_0x2c2f3e)&&this[_0x4db0c8(0x282)][_0x4db0c8(0x345)](_0x2c2f3e,_0x5bc6b1[_0x4db0c8(0x236)]()||0x0),this[_0x4db0c8(0x25b)]['set'](_0x431889,this[_0x4db0c8(0x282)][_0x4db0c8(0x2bf)](_0x2c2f3e)));const _0x4c6e2b=this[_0x4db0c8(0x25b)]['get'](_0x431889),_0x1eecad=_0x5bc6b1['getClock'](_0x1f54ef)||0x0;if(_0x1eecad<=_0x4c6e2b)return![];const _0x469b48=_0x4c6e2b+this[_0x4db0c8(0x272)],_0x480970=Math[_0x4db0c8(0x2bc)](_0x1eecad,_0x469b48),_0x43cb7b=_0x801754['enabled']?_0x801754[_0x4db0c8(0x360)]():0x0,_0x2fc4bf=Array['from'](_0x5bc6b1[_0x4db0c8(0x267)](_0x1f54ef,_0x4c6e2b+0x1,_0x480970));let _0x1dd5df=_0x4c6e2b;for(const _0x59c9a4 of _0x2fc4bf){const {clock:_0x5bf7d9,key:_0x38d050,action:_0x133b98,origin:_0x3810c5}=_0x59c9a4;if(_0x5bf7d9>_0x1dd5df)_0x1dd5df=_0x5bf7d9;if(_0x38d050==null)continue;if(!this[_0x4db0c8(0x1d1)](_0x2c2f3e,_0x1f54ef,_0x38d050,_0x5bf7d9))continue;let _0x293fcd,_0xb61736;if(_0x133b98===_0x34caee['REMOVE'])_0x293fcd=_0x4db0c8(0x1e3),_0xb61736=null;else{const _0x258c19=_0x5bc6b1[_0x4db0c8(0x2bf)](_0x1f54ef,_0x38d050);_0x258c19==null?(_0x293fcd=_0x4db0c8(0x1e3),_0xb61736=null):(_0x293fcd='put',_0xb61736=_0x258c19);}this[_0x4db0c8(0x2a6)](_0x4db0c8(0x21b),{'env':_0x2c2f3e,'type':_0x1f54ef,'key':_0x38d050,'op':_0x293fcd,'clock':_0x5bf7d9,'origin':_0x3810c5,'value':_0xb61736});}if(_0x801754[_0x4db0c8(0x2dd)])_0x801754['note'](_0x4db0c8(0x297)+_0x2c2f3e+':'+_0x1f54ef,_0x801754[_0x4db0c8(0x360)]()-_0x43cb7b,'n='+_0x2fc4bf[_0x4db0c8(0x2bd)]);return this[_0x4db0c8(0x25b)][_0x4db0c8(0x345)](_0x431889,Math[_0x4db0c8(0x322)](_0x1dd5df,_0x480970)),_0x5bc6b1[_0x4db0c8(0x236)](_0x1f54ef)>_0x480970;}[_0x3bc899(0x258)](){const _0xcd021b=_0x3bc899;return{'started':this['_started'],'quantum':this['_quantum'],'flushDebounce':this[_0xcd021b(0x2c2)],'cursors':Object[_0xcd021b(0x352)]([...this[_0xcd021b(0x25b)][_0xcd021b(0x350)]()][_0xcd021b(0x25c)](([_0x40155a,_0x28bdc7])=>[_0x40155a[_0xcd021b(0x239)]('\x00',':'),_0x28bdc7])),'pending':this[_0xcd021b(0x207)][_0xcd021b(0x24a)],'seen':this['_seen'][_0xcd021b(0x24a)]};}}return _0x4be66e[_0x3bc899(0x245)]=_0x24a446,okdbChangefeed={'OKDBChangefeed':_0x4be66e},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x44f8e5=_0x25047a;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x55e73a=require$$1,_0x364d82=require$$1$1,{EVENTS:_0x2c7010}=requireOkdbEnums(),_0x47ad5d=require$$0$1,{slotKey:_0x37f9f9}=requireOkdbProcessRegistry(),_0x39cc17=0xfa,_0x3d0880=0xfa0,_0x59017f=0x5,_0x49b66b=0x2710,_0x47beae=0xbb8,_0x3ab5d8=0x7d0,_0x450b1b=_0x44f8e5(0x2b3),_0x3bf429=_0x44f8e5(0x278),_0x5d6a66='log',_0x44a661=_0x44f8e5(0x247),_0x161577=[_0x2c7010[_0x44f8e5(0x321)],_0x2c7010[_0x44f8e5(0x1bf)],_0x2c7010[_0x44f8e5(0x34d)],_0x2c7010[_0x44f8e5(0x23b)],_0x2c7010[_0x44f8e5(0x2a7)],_0x2c7010['INDEX_READY'],_0x2c7010['INDEX_RESET'],_0x2c7010['INDEX_REGISTERED'],_0x44f8e5(0x25f),_0x44f8e5(0x29c),'processor:error','processor:paused',_0x44f8e5(0x2f3),_0x44f8e5(0x211)],_0x4e0541=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x39a46e({workers:_0x30ffe6,makeOkdb:_0x30888f,port:_0x3a97b4,primaryOkdb:_0x160ee2,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x56ddfd=_0x44f8e5;if(_0x55e73a[_0x56ddfd(0x2b7)])return childEntry&&_0x55e73a[_0x56ddfd(0x2a3)]({'exec':_0x364d82[_0x56ddfd(0x21f)](__dirname,_0x56ddfd(0x32f)),'args':[],'execArgv':((()=>{const _0x401b44=_0x56ddfd,_0x62e4a=[];for(let _0x1a18c0=0x0;_0x1a18c0<process['execArgv']['length'];_0x1a18c0++){const _0x5d9f93=process[_0x401b44(0x353)][_0x1a18c0];if(_0x5d9f93[_0x401b44(0x301)](_0x401b44(0x201))||_0x5d9f93[_0x401b44(0x301)](_0x401b44(0x292))||_0x5d9f93[_0x401b44(0x301)](_0x401b44(0x2d4)))continue;if(_0x5d9f93==='-e'||_0x5d9f93===_0x401b44(0x216)||_0x5d9f93==='-p'||_0x5d9f93===_0x401b44(0x330)){_0x1a18c0++;continue;}_0x62e4a[_0x401b44(0x276)](_0x5d9f93);}return _0x62e4a;})())}),_0x5a7778({'workers':_0x30ffe6,'port':_0x3a97b4,'primaryOkdb':_0x160ee2,'workerEnv':workerEnv});return _0xf0ec91({'makeOkdb':_0x30888f,'port':_0x3a97b4});}function _0x5a7778({workers:_0x27206e,port:_0x47d32b,primaryOkdb:_0x404836,workerEnv:_0x5300e2}){const _0x3f1bf7=_0x44f8e5,_0x496c00=new Map(),_0x406df4=new Map();let _0x23da75=![];const _0x28c478=_0x3ebd76=>_0x3ebd76?.['__okdbSlot'],_0x2df735=_0x3e8aaf=>{const _0x249b9c=_0x423a,_0x2d5719=_0x55e73a[_0x249b9c(0x1c8)]({...process.env,..._0x5300e2||{},'OKDB_CLUSTER_SLOT':String(_0x3e8aaf)});return _0x2d5719['__okdbSlot']=_0x3e8aaf,_0x496c00[_0x249b9c(0x345)](_0x2d5719[_0x249b9c(0x220)]['pid'],{'worker':_0x2d5719,'startedAt':Date[_0x249b9c(0x360)](),'slot':_0x3e8aaf}),_0x2d5719['on'](_0x249b9c(0x2f8),_0x120b1c=>{const _0x4b9272=_0x249b9c;console[_0x4b9272(0x1f2)](_0x4b9272(0x303)+_0x2d5719[_0x4b9272(0x220)]['pid']+_0x4b9272(0x231)+(_0x120b1c?.[_0x4b9272(0x1ff)]??_0x120b1c));}),_0x2d5719['on'](_0x249b9c(0x226),()=>_0x2e7004()),_0x2d5719;},_0xcc9649=_0x3226b6=>{const _0x54c0c0=_0x423a;for(const {worker:_0x566db9}of _0x496c00['values']()){if(_0x566db9['isDead']()||!_0x566db9[_0x54c0c0(0x1f3)]())continue;try{_0x566db9[_0x54c0c0(0x1cb)](_0x3226b6);}catch{}}};_0x404836?.[_0x3f1bf7(0x2f0)]?.({'kind':_0x3f1bf7(0x324),'listenAddr':':'+_0x47d32b})[_0x3f1bf7(0x2fa)](()=>{}),_0x404836?.[_0x3f1bf7(0x311)]?.[_0x3f1bf7(0x319)]?.({'workersConfigured':_0x27206e});const _0xe0d9d3={'engines':![],'asyncProcessors':![],'compaction':_0x3f1bf7(0x32d),'http':!![]},_0x2e7004=()=>{const _0x433e5c=_0x3f1bf7,_0x124572=_0x404836?.[_0x433e5c(0x311)];if(!_0x124572||!_0x124572['_isWriter'])return;const _0x461c68=_0x124572[_0x433e5c(0x336)];for(const {worker:_0x19c8fd,startedAt:_0x3659d7,slot:_0x19c78a,stats:_0x519170}of _0x496c00[_0x433e5c(0x22a)]()){if(_0x19c8fd[_0x433e5c(0x2b1)]())continue;const _0xfd1dc7=_0x124572['hasDesired']?.()&&_0x124572['getDesired'](_0x433e5c(0x1c1),_0x1740d5(_0x19c78a))?.[_0x433e5c(0x275)]===!![];_0x124572[_0x433e5c(0x1f8)]({'pid':_0x19c8fd[_0x433e5c(0x220)][_0x433e5c(0x2e0)],'startedAt':_0x3659d7,'kind':_0x433e5c(0x346),'supervisorKey':_0x461c68,'slot':_0x19c78a,'slotKey':_0x1740d5(_0x19c78a),'role':_0xe0d9d3,'listenAddr':':'+_0x47d32b,'lifecycle':_0xfd1dc7?_0x433e5c(0x1bc):'running','stats':_0x519170??null})[_0x433e5c(0x2fa)](()=>{});}},_0x1740d5=_0x2bb137=>_0x37f9f9(_0x3f1bf7(0x264)+_0x47d32b,_0x2bb137),_0xd702c=_0x47536a=>{const _0x19173b=_0x3f1bf7,_0x2dbb82=_0x404836?.[_0x19173b(0x311)];if(!_0x2dbb82?.[_0x19173b(0x29f)]?.())return![];return _0x2dbb82['getDesired'](_0x19173b(0x1c1),_0x1740d5(_0x47536a))?.['decommission']===!![];};for(let _0xf33742=0x0;_0xf33742<_0x27206e;_0xf33742++){const _0x1a2989=_0xd702c(_0xf33742);_0x406df4[_0x3f1bf7(0x345)](_0xf33742,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1a2989,'respawnTimer':null}),_0x1a2989?console[_0x3f1bf7(0x1f2)](_0x3f1bf7(0x261)+_0xf33742+_0x3f1bf7(0x31b)):_0x2df735(_0xf33742);}const _0x6ad98b=()=>{const _0xfe8163=_0x3f1bf7,_0x484fc7=_0x404836?.['processes'];if(!_0x484fc7?.[_0xfe8163(0x242)]||!_0x484fc7[_0xfe8163(0x29f)]?.())return;for(const [_0x144966,_0x4ae323]of _0x406df4['entries']()){const _0x1e133d=_0x484fc7['getDesired']('slot',_0x1740d5(_0x144966)),_0x3d9033=_0x1e133d?.['decommission']===!![],_0x2725a0=_0x1e133d?.['kill']===!![];if(_0x3d9033&&!_0x4ae323[_0xfe8163(0x314)]){_0x4ae323[_0xfe8163(0x314)]=!![];_0x4ae323[_0xfe8163(0x22f)]&&(clearTimeout(_0x4ae323['respawnTimer']),_0x4ae323[_0xfe8163(0x22f)]=null);for(const {worker:_0x196075}of _0x496c00[_0xfe8163(0x22a)]()){if(_0x28c478(_0x196075)!==_0x144966||_0x196075[_0xfe8163(0x2b1)]())continue;try{if(_0x2725a0)_0x196075[_0xfe8163(0x220)][_0xfe8163(0x1e8)](_0xfe8163(0x2c7));else _0x196075['isConnected']()&&_0x196075['disconnect']();}catch{}}console['log'](_0xfe8163(0x2d0)+(_0x2725a0?'hard-killed':_0xfe8163(0x35d))+_0xfe8163(0x232)+_0x144966+_0xfe8163(0x2d9));}else{if(!_0x3d9033&&_0x4ae323[_0xfe8163(0x314)]&&_0x1e133d){_0x4ae323[_0xfe8163(0x314)]=![],_0x4ae323[_0xfe8163(0x241)]=[],_0x4ae323['consecutiveFailures']=0x0;const _0x4b879b=[..._0x496c00['values']()]['some'](({worker:_0x3cb879})=>_0x28c478(_0x3cb879)===_0x144966&&!_0x3cb879[_0xfe8163(0x2b1)]());!_0x4b879b&&!_0x23da75&&(_0x2df735(_0x144966),console[_0xfe8163(0x1f2)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x144966));}}}},_0x517c9=()=>{try{_0x6ad98b();}catch{}};_0x404836?.[_0x3f1bf7(0x1c7)]?.['on']?.(_0x2c7010[_0x3f1bf7(0x35e)],_0x517c9);const _0x1bd0cc=[];if(_0x404836?.[_0x3f1bf7(0x1c7)]?.['on'])for(const _0x21cb63 of _0x161577){const _0x1cb636=_0x4d1f1e=>{_0xcc9649({[_0x450b1b]:_0x3bf429,'event':_0x21cb63,'data':_0x4d1f1e??{}});};_0x404836[_0x3f1bf7(0x1c7)]['on'](_0x21cb63,_0x1cb636),_0x1bd0cc['push']({'event':_0x21cb63,'handler':_0x1cb636});}const _0x65dc14=setInterval(()=>{_0x6ad98b(),_0x2e7004();},_0x4e0541);_0x65dc14[_0x3f1bf7(0x337)]?.();const _0x1b0041=(_0x5de2bd,_0x1fd03d)=>{const _0x2aae62=_0x3f1bf7;if(!_0x1fd03d||typeof _0x1fd03d!==_0x2aae62(0x1ee)||_0x1fd03d[_0x450b1b]!==_0x5d6a66)return;if(!_0x404836?.['log']?.['ingest'])return;const _0xae4243=_0x1fd03d['entry']||{};_0x404836[_0x2aae62(0x1f2)]['ingest']({..._0xae4243,'msg':'[w'+_0x1fd03d['slot']+']\x20'+(_0xae4243[_0x2aae62(0x280)]??''),'meta':{..._0xae4243['meta']||{},'worker':_0x1fd03d['slot'],'workerPid':_0x1fd03d[_0x2aae62(0x2e0)]}});};_0x55e73a['on']('message',_0x1b0041);const _0x549d0f=(_0x3c9df6,_0x293f3c)=>{const _0x4cef6d=_0x3f1bf7;if(!_0x293f3c||typeof _0x293f3c!=='object'||_0x293f3c[_0x450b1b]!==_0x44a661)return;const _0x1e1e1e=_0x496c00['get'](_0x3c9df6[_0x4cef6d(0x220)]['pid']);if(_0x1e1e1e)_0x1e1e1e[_0x4cef6d(0x247)]={..._0x293f3c[_0x4cef6d(0x247)],'at':Date['now']()};};_0x55e73a['on'](_0x3f1bf7(0x1ff),_0x549d0f),_0x55e73a['on']('exit',(_0x404e13,_0x51edd8,_0xb11205)=>{const _0x2fdc80=_0x3f1bf7,_0x550332=_0x404e13[_0x2fdc80(0x220)]['pid'],_0x53359b=_0x28c478(_0x404e13),_0x5a318d=_0x496c00[_0x2fdc80(0x2bf)](_0x550332);if(_0x5a318d&&_0x404836?.[_0x2fdc80(0x311)])_0x404836['processes'][_0x2fdc80(0x1db)](_0x550332+':'+_0x5a318d['startedAt'])['catch'](()=>{});_0x496c00['delete'](_0x550332),console[_0x2fdc80(0x1f2)]('[okdb-cluster]\x20worker\x20pid='+_0x550332+'\x20(slot='+(_0x53359b??'?')+')\x20exited\x20'+(_0x2fdc80(0x290)+_0x51edd8+_0x2fdc80(0x30c)+(_0xb11205??_0x2fdc80(0x2fe))+_0x2fdc80(0x2b6)+_0x496c00[_0x2fdc80(0x24a)]+'\x20worker(s)\x20remaining')),_0x2e7004();if(_0x23da75||_0x53359b==null)return;const _0x386e77=_0x406df4['get'](_0x53359b);if(!_0x386e77||_0x386e77[_0x2fdc80(0x314)])return;const _0x4e4fc2=Date[_0x2fdc80(0x360)]();_0x386e77['deaths'][_0x2fdc80(0x276)](_0x4e4fc2),_0x386e77[_0x2fdc80(0x241)]=_0x386e77['deaths']['filter'](_0x57bf63=>_0x4e4fc2-_0x57bf63<=_0x49b66b);if(_0x386e77[_0x2fdc80(0x241)][_0x2fdc80(0x2bd)]>=_0x59017f){_0x386e77[_0x2fdc80(0x314)]=!![],console['error'](_0x2fdc80(0x2fd)+_0x53359b+'\x20died\x20'+_0x386e77[_0x2fdc80(0x241)]['length']+_0x2fdc80(0x1d6)+(_0x49b66b+_0x2fdc80(0x20b)+_0x496c00[_0x2fdc80(0x24a)]+'\x20worker(s)\x20still\x20serving'));return;}_0x386e77['consecutiveFailures']++;const _0x4938ad=Math['min'](_0x3d0880,_0x39cc17*0x2**(_0x386e77['consecutiveFailures']-0x1));console[_0x2fdc80(0x1f2)](_0x2fdc80(0x289)+_0x53359b+'\x20in\x20'+_0x4938ad+_0x2fdc80(0x306)+_0x386e77[_0x2fdc80(0x23a)]+')'),_0x386e77['respawnTimer']=setTimeout(()=>{const _0x1ce95b=_0x2fdc80;_0x386e77[_0x1ce95b(0x22f)]=null;if(_0x23da75||_0x386e77[_0x1ce95b(0x314)])return;const _0x5cf3e3=_0x2df735(_0x53359b);_0x5cf3e3[_0x1ce95b(0x2c0)](_0x1ce95b(0x2b8),()=>{const _0x1dbe3b=_0x1ce95b;if(_0x406df4['get'](_0x53359b)===_0x386e77)_0x386e77[_0x1dbe3b(0x23a)]=0x0;});},_0x4938ad),_0x386e77[_0x2fdc80(0x22f)][_0x2fdc80(0x337)]?.();});const _0x4961d4=[..._0x496c00[_0x3f1bf7(0x364)]()];console[_0x3f1bf7(0x1f2)](_0x3f1bf7(0x2f6)+process[_0x3f1bf7(0x2e0)]+_0x3f1bf7(0x361)+_0x27206e+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x47d32b+':\x20'+('['+_0x4961d4[_0x3f1bf7(0x21f)](',\x20')+']'));const _0x3359ff={'_isClusterController':!![],'port':_0x47d32b,'primaryOkdb':_0x404836??null,'status'(){const _0x533fcb=_0x3f1bf7;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x47d32b,'primaryRole':_0x404836?.[_0x533fcb(0x2ee)]??null,'processorPid':_0x404836?process[_0x533fcb(0x2e0)]:null,'workers':[..._0x496c00[_0x533fcb(0x22a)]()]['map'](({worker:_0x2033b8})=>({'pid':_0x2033b8[_0x533fcb(0x220)][_0x533fcb(0x2e0)],'id':_0x2033b8['id'],'dead':_0x2033b8[_0x533fcb(0x2b1)]()}))};},async 'close'(){const _0x3836b9=_0x3f1bf7;_0x23da75=!![];for(const _0x116025 of _0x406df4[_0x3836b9(0x22a)]()){_0x116025[_0x3836b9(0x314)]=!![],_0x116025[_0x3836b9(0x22f)]&&(clearTimeout(_0x116025['respawnTimer']),_0x116025['respawnTimer']=null);}clearInterval(_0x65dc14),_0x55e73a[_0x3836b9(0x2d7)]('message',_0x1b0041),_0x55e73a[_0x3836b9(0x2d7)](_0x3836b9(0x1ff),_0x549d0f),_0x404836?.[_0x3836b9(0x1c7)]?.[_0x3836b9(0x2d7)]?.(_0x2c7010[_0x3836b9(0x35e)],_0x517c9);if(_0x404836?.[_0x3836b9(0x1c7)]?.[_0x3836b9(0x2d7)])for(const {event:_0x2dd3c2,handler:_0x3ff8e5}of _0x1bd0cc){try{_0x404836[_0x3836b9(0x1c7)][_0x3836b9(0x2d7)](_0x2dd3c2,_0x3ff8e5);}catch{}}_0x1bd0cc['length']=0x0;const _0x2d7b63=[..._0x496c00[_0x3836b9(0x22a)]()][_0x3836b9(0x25c)](({worker:_0x1e6259})=>_0x1e6259);if(_0x2d7b63['length']===0x0)return;await Promise[_0x3836b9(0x296)](_0x2d7b63[_0x3836b9(0x25c)](_0x1d6d56=>new Promise(_0x273b36=>{const _0x283d7b=_0x3836b9;if(_0x1d6d56[_0x283d7b(0x2b1)]()){_0x273b36();return;}let _0x3fe0cd=![];const _0x5c602e=()=>{if(_0x3fe0cd)return;_0x3fe0cd=!![];if(_0x3b3b76)clearTimeout(_0x3b3b76);_0x273b36();};_0x1d6d56['once'](_0x283d7b(0x325),_0x5c602e);const _0x3b3b76=setTimeout(()=>{const _0x168dc8=_0x283d7b;try{_0x1d6d56[_0x168dc8(0x220)]['kill']();}catch{}},_0x47beae+0x1f4);_0x3b3b76[_0x283d7b(0x337)]?.();try{_0x1d6d56['disconnect']();}catch{try{_0x1d6d56[_0x283d7b(0x220)][_0x283d7b(0x1e8)]();}catch{}}})));}};return _0x3359ff;}async function _0xf0ec91({makeOkdb:_0x5e51f3,port:_0xcf1592}){const _0x4cf811=_0x44f8e5,_0x47a485=await _0x5e51f3();return _0x1c9900(_0x47a485),_0x47a485[_0x4cf811(0x1f5)]['listen'](_0xcf1592);}function _0x1c9900(_0x285a24){const _0x5815b1=_0x44f8e5;if(!_0x285a24||_0x285a24['_clusterWorkerAttached'])return;_0x285a24[_0x5815b1(0x348)]=!![];try{const {OKDBChangefeed:_0x382010}=requireOkdbChangefeed(),_0xa0c3b9=_0x285a24[_0x5815b1(0x1fc)];if(_0xa0c3b9&&typeof _0xa0c3b9[_0x5815b1(0x21c)]===_0x5815b1(0x1d3)){const _0x5b1b7d=new _0x382010(_0x285a24);_0x5b1b7d[_0x5815b1(0x252)](),_0xa0c3b9['attachFeed'](_0x5b1b7d),_0x285a24[_0x5815b1(0x219)]=_0x5b1b7d;}}catch(_0x39adf1){_0x285a24['log']?.['warn']?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x39adf1?.[_0x5815b1(0x1ff)]??_0x39adf1),{'feature':_0x5815b1(0x1e5)});}const _0x82f5ed=_0x2d188c=>{const _0x821fc1=_0x5815b1;if(!_0x2d188c||typeof _0x2d188c!==_0x821fc1(0x1ee)||_0x2d188c[_0x450b1b]==null)return;if(_0x2d188c[_0x450b1b]===_0x3bf429)try{_0x285a24[_0x821fc1(0x1fc)]?.[_0x821fc1(0x27b)]?.(_0x2d188c[_0x821fc1(0x23e)],_0x2d188c[_0x821fc1(0x26f)]);}catch{}};process['on'](_0x5815b1(0x1ff),_0x82f5ed),_0x285a24[_0x5815b1(0x246)]=_0x82f5ed;{let _0x498b47=process[_0x5815b1(0x2d2)](),_0x5ae0db=Date[_0x5815b1(0x360)]();const _0x47d9a4=()=>{const _0x385b1a=_0x5815b1;if(typeof process['send']!=='function'||!process[_0x385b1a(0x312)])return;const _0x236403=Date[_0x385b1a(0x360)](),_0x31ea64=process['cpuUsage'](),_0x5f5852=(_0x236403-_0x5ae0db)*0x3e8,_0x490ccc=_0x31ea64['user']-_0x498b47[_0x385b1a(0x1fb)]+(_0x31ea64[_0x385b1a(0x212)]-_0x498b47[_0x385b1a(0x212)]),_0x3ee6a7=_0x5f5852>0x0?Math[_0x385b1a(0x2bc)](0x64,Math[_0x385b1a(0x2ae)](_0x490ccc/(_0x5f5852*(_0x47ad5d[_0x385b1a(0x214)]()[_0x385b1a(0x2bd)]||0x1))*0x64)):0x0;_0x498b47=_0x31ea64,_0x5ae0db=_0x236403;const _0x5768d0=process[_0x385b1a(0x206)]();try{process['send']({[_0x450b1b]:_0x44a661,'stats':{'rss':_0x5768d0[_0x385b1a(0x1d5)],'heapUsed':_0x5768d0['heapUsed'],'heapTotal':_0x5768d0['heapTotal'],'external':_0x5768d0[_0x385b1a(0x266)],'cpuPct':_0x3ee6a7,'cpuWindowMs':Math[_0x385b1a(0x2ae)](_0x5f5852/0x3e8)||null}});}catch{}},_0xfb307d=Math[_0x5815b1(0x322)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3fd16a=setInterval(_0x47d9a4,_0xfb307d);_0x3fd16a[_0x5815b1(0x337)]?.(),_0x47d9a4();}let _0x787d2e=![];const _0x3c1391=async _0x2ba56a=>{const _0x241dab=_0x5815b1;if(_0x787d2e)return;_0x787d2e=!![];const _0x18e381=setTimeout(()=>process[_0x241dab(0x325)](_0x2ba56a),_0x47beae);_0x18e381[_0x241dab(0x337)]?.();try{await _0x285a24[_0x241dab(0x21e)]?.();}catch{}process[_0x241dab(0x325)](_0x2ba56a);};process['on'](_0x5815b1(0x1cd),()=>_0x3c1391(0x0));if(process['platform']!=='win32'){const _0x264318=setInterval(()=>{const _0x16998c=_0x5815b1;if(process[_0x16998c(0x2fb)]===0x1)_0x3c1391(0x0);},_0x3ab5d8);_0x264318[_0x5815b1(0x337)]?.(),_0x285a24['_clusterOrphanWatch']=_0x264318;}}return okdbCluster={'runClustered':_0x39a46e,'attachWorkerCluster':_0x1c9900},okdbCluster;}function _0x5cb1(){const _0x99a941=['started','env','_scheduleFlush','all','feed:','maxExtra','put','1269460NNePMD','ms\x20busy=','processor:progress','20178sMeoHt','setTtl','hasDesired','node:perf_hooks','processKey','lag','setupPrimary','halted','asyncProcessors','emit','INDEX_PROGRESS','view:progress','_nodeDb','system:proc','filter','registry-publish','ITEM_REMOVE','round','1086585IfaMKt','add','isDead','registerType','__okdbCluster','node/','hasOwnProperty',');\x20','isPrimary','listening','processorsView','124556Hqcptv','count','min','length','_lastPublishAt','get','once','1756958ZfLEjr','_flushDebounce','_started','async','_openEnvLazy','index:drop','SIGKILL','threads','registerFts','_caps','note','setDesired','quantum','~processes:desired','type','[okdb-cluster]\x20','_ensureDesired','cpuUsage','_lastCpuAt','--inspect','_putRowAsync','_groupByProcess','off','fts:reset','\x20(durable\x20desired-state)','assign','cpuPct','building','enabled','3jZUxsv','__esModule','pid','ms\x20max=','nodeKey','prototype','removeSync','registerIndex','code','_processingPolicy','_admissionStarted','stderr','find','unique:violation','cli','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','role','_buildProcessingFacet','_activateProcesses','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','_kind','processor:resumed','has','attach','[okdb-cluster]\x20primary\x20pid=','_processStartedAt','error','_buildOwnRow','catch','ppid','single','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','none','rowKey','version','startsWith','9MycWIe','[okdb-cluster]\x20worker\x20pid=','resetIndex','putNode','ms\x20(attempt\x20','_statusEnv','uptime','_rowKey','freeze','ready',',\x20signal=','getRange','worker','reset','onWindow','processes','connected','cpuWindowMs','dead','_startedAt','then','_instanceId','offWindow','setOwnMeta','envsOpen','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','expiresAt','includes','killable','_handlePoke','claims','VIEW_PROGRESS','max','\x20│\x20','primary','exit','default','label','_admissionTimer','detachConsole','getDesired','crypto','creating','passive','bus:poke','okdb-http-worker-child.js','--print','register','~processes:cmd','waiting','index:ready','SYSTEM_STOPPED','selfKey','unref','_getType','license:added','okdb','percentile','slice','meta','runtimeProcessesView','system:type_drop','dropIndex','ms\x20p99=','index:progress','stopped','open','set','http-server','_dedupeMax','_clusterWorkerAttached','_lastCpuWindowMs','processor','_lastCpuUsage','transactionSync','FTS_DROP','policy','bus:drain','entries','bumpCmd','fromEntries','execArgv','listenAddr','bus:proc','schema:drop','ms/','value','dropFts','schema:set','stopHeartbeat','openDB','decommissioned','SYSTEM_PROC','inst:','now','\x20forked\x20','_draining','node:events','keys','fts:drop','loop-lag\x20','decommissioning','dropSchema','lastClock','FTS_REGISTERED','_removeRowAsync','slot','stopping','txn:end','_publishNow','system:clock_change','treeView','events','fork','enable','exports','send','_onProcEvent','disconnect','string','SYSTEM_POKE','listDesired','_markSeen','addSupervisedChild','function','state','rss','\x20times\x20in\x20','_selfKey','parse','_flushTimer','running','removeNode','./okdb','http\x20worker\x20child\x20failed:\x20','stop','starting','setLogger','_envs','_isReader','remove','env:opened','cluster','_buckets','ttl:expired','kill','standalone','_children','_onTick','license:activated','_onPoke','object','noteListenAddr','_cmd','dedupeMax','log','isConnected','_onItem','http','ms\x20mean=','reap','publishChildRow','5947208CczHHd','_ownMeta','user','_adminRelay','randomUUID','workers','message','info','--test','compaction','heapTotal','heapUsed','ESRCH','memoryUsage','_pending','setSchema','caps','cursorKey','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','ITEM_UPDATE','_nodeDbFor','_listenAddr','maxMs','clear','processor:retry','system','claimGated','cpus','fn-runner','--eval','_handleInProcess','txn:rollback','_changefeed','_drainOne','change','attachFeed','path','close','join','process','_report','startHeartbeat','index:registered','clearTtl','_supervisorKey','online','call','force','_maybePublish','values','loop-lag','processing','embedded','ttl:set','respawnTimer','_drain','\x20ipc\x20error:\x20','\x20worker\x20slot=','workersConfigured','updateSupervisedChildStats','hasType','getClock','tierList','number','replace','consecutiveFailures','FTS_RESET','hostname','engines','event','getProcess','removeSupervisedChild','deaths','_isWriter','_log','_sampleOwnStats','CHANGEFEED_QUANTUM','_clusterOnMessage','stats','host','system:drain','size','_desired','unique:violation_resolved','reportThreadStats','fast','1035nJHIPp','cluster-wide','delete','start','level','_threadStats','item:create','createEnvironment','_windowCbs','status','stringify','mode','_cursors','map','listen','_buildChildRow','processor:ready','txn:start','[okdb-cluster]\x20slot=','resetting','license:removed','cluster:','listNodes','external','getChanges','startedAt','deregisterSelf','_nodeDead','queue-worker','11944370jFcNRL','ITEM_CREATE','node','data','_onStop','instanceId','_quantum','reduce','_hbTimer','decommission','push','system:stopped','ephemeral','1ofN:','license:invalid','pushEphemeral','kind','headClock','system:bus_state_change','sort','msg','supervisorKey','_baselines','_nodeDbCache','system:poke','_seen','children','true','type:registered','[okdb-cluster]\x20respawning\x20worker\x20slot=','toFixed','(worst\x20','isWorker','ref:violation','options','_timer','(code=','_lastCpuPct','--watch'];_0x5cb1=function(){return _0x99a941;};return _0x5cb1();}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x47ed1d=require$$0$3,{attachWorkerCluster:_0x1db6e1}=requireOkdbCluster();async function _0x5a49db(){const _0x1f2d9d=_0x423a,_0x1bb552=process.env.OKDB_HTTP_CHILD;if(!_0x1bb552)throw new Error(_0x1f2d9d(0x2ed));const {rootPath:_0x59cf87,port:_0x4b5f8b,options:options={},logLevel:logLevel=_0x1f2d9d(0x200)}=JSON[_0x1f2d9d(0x1d8)](_0x1bb552);if(!_0x59cf87||!_0x4b5f8b)throw new Error(_0x1f2d9d(0x2f1));const _0x599654=new _0x47ed1d(_0x59cf87,{...options,'engines':![],'asyncProcessors':![],'compaction':_0x1f2d9d(0x32d),'bus':!![]});_0x599654['log'][_0x1f2d9d(0x329)]?.();const _0x442b4b=process.env.OKDB_CLUSTER_SLOT??'?',_0x3a1841={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x40c991=_0x3a1841[logLevel]??_0x3a1841['info'];_0x599654['log'][_0x1f2d9d(0x2f5)](_0x17b050=>{const _0x285233=_0x1f2d9d;if((_0x3a1841[_0x17b050[_0x285233(0x253)]]??0x1)<_0x40c991)return;try{process['send']?.({'__okdbCluster':_0x285233(0x1f2),'slot':_0x442b4b,'pid':process[_0x285233(0x2e0)],'entry':_0x17b050});}catch{}}),await _0x599654[_0x1f2d9d(0x344)](),_0x1db6e1(_0x599654),await _0x599654[_0x1f2d9d(0x1f5)][_0x1f2d9d(0x25d)](_0x4b5f8b);}return _0x5a49db()['catch'](_0x4c2d02=>{const _0x5b2d29=_0x423a;try{process[_0x5b2d29(0x1cb)]?.({'__okdbCluster':_0x5b2d29(0x1f2),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x5b2d29(0x2e0)],'entry':{'level':_0x5b2d29(0x2f8),'msg':_0x5b2d29(0x1dd)+(_0x4c2d02?.[_0x5b2d29(0x1ff)]??_0x4c2d02)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);function _0x423a(_0x2ff881,_0x21a927){_0x2ff881=_0x2ff881-0x1bc;const _0x5cb1b5=_0x5cb1();let _0x423a90=_0x5cb1b5[_0x2ff881];return _0x423a90;}module[_0x25047a(0x1ca)]=okdbHttpWorkerChild;
|
|
1
|
+
'use strict';function _0x450a(){const _0x4e5602=['item:create','lag','info','_onTick','emit','cluster-wide','node:perf_hooks','reset','SYSTEM_POKE','system:stopped','env:removed','cluster','compaction','system:drain','killable','clearThreadStats','type','ITEM_CREATE','setupPrimary','dropIndex','keys','_handlePoke','map','node','attach','kill','push','license:added','enabled','delete','nodesView','listenAddr','error','indexOf','type:drop','startedAt','embedded','\x20worker\x20slot=','async','(worst\x20','cursorKey','selfKey','license:activated','halted','detachConsole','INDEX_RESET','_timer','process','_statusEnv','heapTotal','ttl:clear','_openEnvLazy','online','_maybePublish','host','data','state','claimGated','addSupervisedChild','_buckets','processKey','_clusterOrphanWatch','[okdb-cluster]\x20worker\x20pid=','okdb-http-worker-child.js','mode','note','_lastCpuAt','removeSync','_isReader','replace','_nodeDb','_ensureDesired','_caps','system:type_drop','threads','_listenAddr','running','external','http','slice','[okdb-cluster]\x20slot=','dropType','waiting','enable','close','add','toFixed','_draining','_drain','_processingPolicy','11361pyqYFm','instanceId',')\x20exited\x20','expiresAt','ITEM_REMOVE','_scheduleFlush','maxMs','startsWith','registerType','isActive','has','listNodes','_drainOne','_lastPublishAt','ms\x20busy=','_supervisorKey','processor:paused','cluster:','_groupByProcess','txn:end','_threadStats','_dedupeKey','round','ms\x20max=','item:update','log','rows=','reap','txn:rollback','processor:ready','./okdb','stopped','respawnTimer','bus:poke','dropSchema','--test','some','workers',');\x20','FTS_RESET','_kind','_log','getDesired','getProcess','version','ttl:expired','system:ready','putNode','processor:retry','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','bus:type_drop','force','epoch','ms\x20p99=','processor','created','index:ready','1ofN:','send','assign','kind','put','write','4863960sAxTmT','mean','openDB','execArgv','setOwnMeta','setDesired','SIGKILL','cpuPct','_startAdmission','_children','~processes:desired','unref','none','getChanges','schema:drop','_putRowAsync','ms/','attachFeed','system:poke','_startedAt','disconnect','win32','start','_getType','object','supervisorKey','meta','_quantum','hasDesired','isDead','getClock','function','_onProcEvent','\x20forked\x20','find','_rowKey','--inspect','dropFts','true','maxExtra','worker','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','prototype','cpuUsage','\x20worker(s)\x20still\x20serving','_handleInProcess','msg','view:progress','loop-lag\x20','all','_clusterOnMessage','platform','getRange','role','system:bus_state_change','\x20worker(s)\x20remaining','_seen','processors','join','_pending','slot','from','_lastCpuPct','ITEM_UPDATE','_activateProcesses','updateSupervisedChildStats','system','number','_dedupeMax','inst:','stats','entries','cli','_clusterWorkerAttached','_flushTimer','processes','workersConfigured','_baselines','decommission','fromEntries','__okdbSlot','instances','env','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','_desired','(code=','_flushDebounce','_buildProcessingFacet','warn','clear','cpus','lifecycle','\x20(durable\x20desired-state)','8009631FOmwmq','INDEX_PROGRESS','_nodeDead','ingest','fts:reset','INDEX_REGISTERED','_report','then','randomUUID','_onPoke','change','hasOwnProperty','ephemeral','catch','\x20(slot=','passive','filter','processorsView','_admissionStarted','http\x20worker\x20child\x20failed:\x20','index:registered','[okdb-cluster]\x20','\x20ipc\x20error:\x20','_buildChildRow','3449768xUsskN','okdb','size','hard-killed','default','hostname','ttl:set','_ownMeta','code','SYSTEM_PROC','connected','_nodeDbFor','_cursors','clusterStatusView','8070472AbBZYI','_markSeen','includes','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','onWindow','reduce','transactionSync','offWindow','single','fanout','FTS_DROP','message','_hbTimer','_adminRelay','string','events','1442DBAoIE','length','exports','fts:registered','nodeKey','stop','~processes:cmd','building','license:removed','CHANGEFEED_QUANTUM','sort','_envs','resetFts','creating','removeNode','label','percentile','pushEphemeral','system:proc','values','crypto','publishOwnRow','get','user','rss','count','next','startHeartbeat','unique:violation_resolved','fts:drop','starting','options','env:opened','pid','_selfKey','_instanceId','__okdbCluster','rowKey','now','deaths','fn-runner','remove','listen','uptime','_isWriter','dead','ppid','processor:error','_onStop','[okdb-cluster]\x20primary\x20pid=','REMOVE','_admissionTimer','VIEW_PROGRESS','_started','min','publishChildRow','_lastCpuUsage','resetting','isWorker','ready','1561704IfPNXu','hasType','lastClock','processor:progress','_publishNow','_rootDb','_onItem','exit','_nodeDbCache','__esModule','2PZnJfg','node/','entry','node:events','primary','queue-worker','processing','SYSTEM_STOPPED','max','heapUsed','http-server','claims','registerIndex','started','16326VRjXuy','path','set','_processStartedAt','ref:violation','dedupeMax','memoryUsage','\x20in\x20','off','isPrimary','bus:drain','status','stringify','_lastCpuWindowMs','listDesired','_buildOwnRow','once','flushDebounce','_cmd','stderr','_windowCbs','isConnected','--print','caps','[okdb-cluster]\x20respawning\x20worker\x20slot=','children','consecutiveFailures'];_0x450a=function(){return _0x4e5602;};return _0x450a();}const _0xd218e=_0x2a26;(function(_0x24f12e,_0x4ba9a8){const _0x77583e=_0x2a26,_0x2ebfd4=_0x24f12e();while(!![]){try{const _0x15718f=-parseInt(_0x77583e(0x13a))/0x1+parseInt(_0x77583e(0xb7))/0x2*(-parseInt(_0x77583e(0xad))/0x3)+parseInt(_0x77583e(0x1ee))/0x4+parseInt(_0x77583e(0x179))/0x5+-parseInt(_0x77583e(0xc5))/0x6*(parseInt(_0x77583e(0x71))/0x7)+-parseInt(_0x77583e(0x1fc))/0x8+parseInt(_0x77583e(0x1d6))/0x9;if(_0x15718f===_0x4ba9a8)break;else _0x2ebfd4['push'](_0x2ebfd4['shift']());}catch(_0x4368a0){_0x2ebfd4['push'](_0x2ebfd4['shift']());}}}(_0x450a,0x98539));var require$$0$3=require(_0xd218e(0x158)),require$$1=require('cluster'),require$$1$1=require(_0xd218e(0xc6)),require$$0$1=require('os'),require$$2=require(_0xd218e(0x85)),require$$0=require(_0xd218e(0xe6)),require$$0$2=require(_0xd218e(0xba));function getDefaultExportFromCjs(_0x4f71ad){const _0x2c009f=_0xd218e;return _0x4f71ad&&_0x4f71ad[_0x2c009f(0xb6)]&&Object[_0x2c009f(0x1a3)][_0x2c009f(0x1e1)]['call'](_0x4f71ad,_0x2c009f(0x1f2))?_0x4f71ad[_0x2c009f(0x1f2)]:_0x4f71ad;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0xf39004=_0xd218e;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x8d4a1f={'PUT':_0xf39004(0x177),'REMOVE':_0xf39004(0x9a),'INDEX_DROP':_0xf39004(0xf3),'INDEX_REGISTER':_0xf39004(0xc3),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':_0xf39004(0x131),'FTS_REGISTER':'registerFts','FTS_DROP':_0xf39004(0x19e),'FTS_RESET':_0xf39004(0x7d),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0xf39004(0x15c),'TTL_SET':'setTtl','TTL_CLEAR':'clearTtl'},_0x2bfade={'SYSTEM_READY':_0xf39004(0x168),'SYSTEM_STOPPED':_0xf39004(0xe9),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0xf39004(0x18b),'SYSTEM_DRAIN':_0xf39004(0xed),'SYSTEM_TYPE_DROP':_0xf39004(0x129),'SYSTEM_PROC':_0xf39004(0x83),'SYSTEM_BUS_STATE_CHANGE':_0xf39004(0x1af),'ITEM_CREATE':_0xf39004(0xe0),'ITEM_UPDATE':_0xf39004(0x152),'ITEM_REMOVE':'item:remove','INDEX_RESET':'index:reset','INDEX_READY':_0xf39004(0x172),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0xf39004(0x1a8),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0xf39004(0x1ea),'FTS_REGISTERED':_0xf39004(0x74),'FTS_DROP':_0xf39004(0x8e),'FTS_RESET':_0xf39004(0x1da),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0xf39004(0x187),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0xf39004(0x8d),'REF_VIOLATION':_0xf39004(0xc9),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':'txn:start','TXN_END':_0xf39004(0x14d),'TXN_ROLLBACK':_0xf39004(0x156),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0xf39004(0x102),'ENV_OPENED':_0xf39004(0x91),'ENV_REMOVED':_0xf39004(0xea),'TTL_EXPIRED':_0xf39004(0x167),'TTL_SET':_0xf39004(0x1f4),'TTL_CLEAR':_0xf39004(0x112),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0xf39004(0xfb),'LICENSE_ACTIVATED':_0xf39004(0x10a),'LICENSE_REMOVED':_0xf39004(0x79)},_0x48de69={'CREATING':_0xf39004(0x7e),'RESETTING':_0xf39004(0xaa),'READY':'ready','DROPPING':'dropping','WAITING':_0xf39004(0x132)},_0x5bc8cb={'CREATED':_0xf39004(0x171),'STARTING':_0xf39004(0x8f),'STARTED':_0xf39004(0xc4),'STOPPING':'stopping','STOPPED':_0xf39004(0x159)},_0x41f384={'CREATING':_0xf39004(0x7e),'READY':_0xf39004(0xac),'HALTED':_0xf39004(0x10b),'STOPPED':_0xf39004(0x159),'RESETTING':_0xf39004(0xaa)},_0x217e66=Object['freeze']({'POKE':_0xf39004(0x15b),'DRAIN':_0xf39004(0xcf),'TYPE_DROP':_0xf39004(0x16c),'PROC':'bus:proc'});return okdbEnums={'BUS_EVENTS':_0x217e66,'CHANGE_ACTIONS':_0x8d4a1f,'EVENTS':_0x2bfade,'INDEX_STATE':_0x48de69,'OKDB_STATE':_0x5bc8cb,'VIEW_STATE':_0x41f384},okdbEnums;}function _0x2a26(_0x2f541e,_0x3fff5b){_0x2f541e=_0x2f541e-0x6c;const _0x450af0=_0x450a();let _0x2a26c2=_0x450af0[_0x2f541e];return _0x2a26c2;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x44306f=_0xd218e;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1b30d5,performance:_0x278c64}=require$$0,_0x2c370e=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x44306f(0x19f),_0x4aa748=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x43ac7d=process.env.OKDB_LOOP_LAG_ALL==='1',_0x57e28a=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x4fd049{constructor(){const _0x11a8b7=_0x44306f;this[_0x11a8b7(0xfc)]=_0x2c370e,this[_0x11a8b7(0x11b)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x11a8b7(0xa6)]=![],this['_log']=(_0x432295,_0x3e6498)=>process[_0x11a8b7(0xd8)][_0x11a8b7(0x178)](_0x432295+(_0x3e6498?'\x20'+JSON[_0x11a8b7(0xd1)](_0x3e6498):'')+'\x0a');}['now'](){const _0x198022=_0x44306f;return _0x278c64[_0x198022(0x97)]();}['setLogger'](_0x1d7a52){const _0x5966a6=_0x44306f;if(typeof _0x1d7a52===_0x5966a6(0x198))this['_log']=_0x1d7a52;}[_0x44306f(0x121)](_0x2ac104,_0x576cd6,_0x48b014){const _0x31b470=_0x44306f;if(!this[_0x31b470(0xfc)])return;let _0x269a01=this[_0x31b470(0x11b)][_0x31b470(0x87)](_0x2ac104);!_0x269a01&&(_0x269a01={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x31b470(0x11b)][_0x31b470(0xc7)](_0x2ac104,_0x269a01)),_0x269a01['ms']+=_0x576cd6,_0x269a01[_0x31b470(0x8a)]+=0x1,_0x576cd6>_0x269a01[_0x31b470(0x140)]&&(_0x269a01[_0x31b470(0x140)]=_0x576cd6,_0x269a01[_0x31b470(0x1a0)]=_0x48b014||'');}[_0x44306f(0x18f)](_0x1f6419){const _0x530c7b=_0x44306f;if(!this[_0x530c7b(0xfc)]||this[_0x530c7b(0xa6)])return;this[_0x530c7b(0xa6)]=!![];if(_0x1f6419)this[_0x530c7b(0x163)]=_0x1f6419;this['_h']=_0x1b30d5({'resolution':0xa}),this['_h'][_0x530c7b(0x133)](),this['_timer']=setInterval(()=>this[_0x530c7b(0x1dc)](),_0x4aa748);if(this[_0x530c7b(0x10e)][_0x530c7b(0x184)])this[_0x530c7b(0x10e)][_0x530c7b(0x184)]();}[_0x44306f(0x200)](_0x202813){const _0x531d18=_0x44306f;if(!this[_0x531d18(0xd9)])this[_0x531d18(0xd9)]=new Set();this[_0x531d18(0xd9)][_0x531d18(0x135)](_0x202813);if(!this[_0x531d18(0xa6)])this[_0x531d18(0x181)]();}[_0x44306f(0x203)](_0x4e261b){const _0xaabb6d=_0x44306f;this[_0xaabb6d(0xd9)]?.[_0xaabb6d(0xfd)](_0x4e261b);}[_0x44306f(0x181)](){const _0x188743=_0x44306f;if(this[_0x188743(0x1e8)])return;this[_0x188743(0x1e8)]=!![];!this['_h']&&(this['_h']=_0x1b30d5({'resolution':0xa}),this['_h'][_0x188743(0x133)]());const _0x56131e=_0x4aa748;this[_0x188743(0xa4)]=setInterval(()=>{const _0x40dccd=_0x188743,_0x4706f5=this['_h'];if(!_0x4706f5)return;const _0x375208=_0x4706f5[_0x40dccd(0x81)](0x63)/0xf4240,_0x3895b4=_0x4706f5[_0x40dccd(0xbf)]/0xf4240,_0x5c5882=_0x4706f5[_0x40dccd(0x17a)]/0xf4240;_0x4706f5[_0x40dccd(0xe7)]();if(this[_0x40dccd(0xd9)])for(const _0x219a98 of this[_0x40dccd(0xd9)]){try{_0x219a98({'p99Ms':_0x375208,'maxMs':_0x3895b4,'meanMs':_0x5c5882,'reportMs':_0x56131e});}catch{}}},_0x56131e);if(this[_0x188743(0xa4)][_0x188743(0x184)])this[_0x188743(0xa4)][_0x188743(0x184)]();}[_0x44306f(0x1dc)](){const _0x38c619=_0x44306f,_0x90b8fc=this['_h'],_0x5b64b1=_0x90b8fc[_0x38c619(0xbf)]/0xf4240,_0x4cac7e=_0x90b8fc[_0x38c619(0x81)](0x63)/0xf4240,_0xe009a0=_0x90b8fc[_0x38c619(0x17a)]/0xf4240;_0x90b8fc[_0x38c619(0xe7)]();const _0x40dadb=[...this[_0x38c619(0x11b)][_0x38c619(0x1c0)]()][_0x38c619(0xf6)](([_0x36816f,_0x5c642d])=>({'label':_0x36816f,..._0x5c642d}))[_0x38c619(0x7b)]((_0x283190,_0x47edf3)=>_0x47edf3['ms']-_0x283190['ms'])[_0x38c619(0x12f)](0x0,0x8);this[_0x38c619(0x11b)]['clear']();const _0x3a562b=_0x40dadb[_0x38c619(0x201)]((_0x8912e4,_0x23b4f2)=>_0x8912e4+_0x23b4f2['ms'],0x0),_0x1159ac=_0x40dadb['map'](_0x2db17e=>_0x2db17e[_0x38c619(0x80)]+'='+_0x2db17e['ms'][_0x38c619(0x136)](0x0)+_0x38c619(0x189)+_0x2db17e[_0x38c619(0x8a)]+(_0x2db17e[_0x38c619(0x140)]>0x5?_0x38c619(0x107)+_0x2db17e[_0x38c619(0x140)][_0x38c619(0x136)](0x0)+'ms'+(_0x2db17e[_0x38c619(0x1a0)]?'\x20'+_0x2db17e[_0x38c619(0x1a0)]:'')+')':''));(_0x43ac7d||_0x5b64b1>=_0x57e28a)&&this[_0x38c619(0x163)](_0x38c619(0x1a9)+_0x4aa748+_0x38c619(0x151)+_0x5b64b1[_0x38c619(0x136)](0x0)+_0x38c619(0x16f)+_0x4cac7e[_0x38c619(0x136)](0x0)+'ms\x20mean='+_0xe009a0[_0x38c619(0x136)](0x0)+_0x38c619(0x148)+_0x3a562b[_0x38c619(0x136)](0x0)+'ms'+(_0x1159ac['length']?'\x20│\x20'+_0x1159ac[_0x38c619(0x1b3)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x38c619(0xd9)])for(const _0x1a3576 of this[_0x38c619(0xd9)]){try{_0x1a3576({'p99Ms':_0x4cac7e,'maxMs':_0x5b64b1,'meanMs':_0xe009a0,'reportMs':_0x4aa748});}catch{}}}[_0x44306f(0x76)](){const _0x1f3783=_0x44306f;if(this[_0x1f3783(0x10e)])clearInterval(this[_0x1f3783(0x10e)]);if(this['_h'])this['_h']['disable']();this[_0x1f3783(0x10e)]=null,this['_h']=null,this['_started']=![];}}const _0x322320=new _0x4fd049();if(_0x322320[_0x44306f(0xfc)])_0x322320[_0x44306f(0x18f)]();return okdbLoopMonitor={'LOOP':_0x322320},okdbLoopMonitor;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x47c38b=_0xd218e;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x3672e0=require$$0$1,_0xd83097=require$$1,_0x5ed5d4=require$$2,{LOOP:_0xfcc22e}=requireOkdbLoopMonitor(),_0xefbd20='~processes',_0x26e5eb=_0x47c38b(0xf7),_0x49321f=_0x47c38b(0x183),_0x6a7cb=_0x47c38b(0x77),_0x517179=(_0x3703db,_0x3730f1)=>_0x3703db+':'+_0x3730f1,_0x963705=(_0x3f8c16,_0x183a0e)=>_0x3f8c16+'::'+_0x183a0e,_0x428f06=(_0x2bcc98,_0x385c62)=>_0x2bcc98+'/'+_0x385c62,_0x5956c8=(_0x201b59,_0x2c7592)=>_0x201b59+'#'+_0x2c7592,_0x4d2e79=_0x29ad42=>{const _0x4da394=_0x47c38b;if(_0x29ad42?.['processKey'])return _0x29ad42[_0x4da394(0x11c)];const _0x31f413=_0x29ad42?.[_0x4da394(0x75)];return typeof _0x31f413==='string'&&_0x31f413['includes']('#')?_0x31f413[_0x4da394(0x12f)](0x0,_0x31f413[_0x4da394(0x101)]('#')):_0x31f413;},_0x4377c1=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x4f01d3=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5d09ef=_0x4377c1*0x3,_0x2476f0=[_0x47c38b(0xb0),_0x47c38b(0x157),_0x47c38b(0x16a),'processor:error'];let _0x1e53f7=null;function _0x2783c8(){const _0x1a5342=_0x47c38b;if(_0x1e53f7==null)_0x1e53f7=Math[_0x1a5342(0x150)]((Date[_0x1a5342(0x97)]()-process[_0x1a5342(0x9c)]()*0x3e8)/0x3e8)*0x3e8;return _0x1e53f7;}function _0x26335a(_0x2441a5){const _0x2dd181=_0x47c38b;if(process.env.OKDB_PROCESS_KILL===_0x2dd181(0xcd))return![];if(_0x2441a5?.['options']?.[_0x2dd181(0x1c4)]&&typeof _0x2441a5[_0x2dd181(0x90)][_0x2dd181(0x1c4)]===_0x2dd181(0x191)&&_0x2441a5[_0x2dd181(0x90)][_0x2dd181(0x1c4)][_0x2dd181(0xf9)]===![])return![];return!![];}function _0x4515a4(_0x32614a,_0x4c282a){const _0x230a22=_0x47c38b,_0x2e1d0d=!!_0x4c282a?.['asyncProcessors'];switch(_0x32614a){case'primary':return{'controllable':_0x2e1d0d,'decommissionable':![],'killable':!![],'killConfirm':_0x230a22(0xe5)};case _0x230a22(0x1c1):case'standalone':return{'controllable':_0x2e1d0d,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x230a22(0x104):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x230a22(0xbc):case _0x230a22(0x99):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x230a22(0x16d)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x4c042f{constructor(_0x4b4e44){const _0x140f96=_0x47c38b;this['okdb']=_0x4b4e44,this[_0x140f96(0x110)]=null,this[_0x140f96(0x1cd)]=null,this['_cmd']=null,this['_isWriter']=![],this[_0x140f96(0x124)]=![],this[_0x140f96(0xc8)]=_0x2783c8(),this[_0x140f96(0x93)]=_0x517179(process[_0x140f96(0x92)],this[_0x140f96(0xc8)]),this['_instanceId']=_0x5ed5d4[_0x140f96(0x1de)]()[_0x140f96(0x12f)](0x0,0x8),this[_0x140f96(0x19c)]=_0x5956c8(this['_selfKey'],this['_instanceId']),this[_0x140f96(0x18c)]=Date['now'](),this[_0x140f96(0x162)]=null,this[_0x140f96(0x149)]=null,this['_listenAddr']=null,this[_0x140f96(0x6d)]=null,this['_onProcEvent']=null,this[_0x140f96(0xe3)]=null,this[_0x140f96(0x147)]=0x0,this[_0x140f96(0x1f5)]={},this[_0x140f96(0x182)]=new Map(),this[_0x140f96(0xa9)]=process['cpuUsage'](),this[_0x140f96(0x122)]=Date['now'](),this[_0x140f96(0x1b7)]=0x0,this['_threadStats']=new Map();}get[_0x47c38b(0x109)](){return this['_selfKey'];}get[_0x47c38b(0x96)](){const _0x2ea83d=_0x47c38b;return this[_0x2ea83d(0x19c)];}['_caps'](_0x49c815,_0x38f9ad){const _0x1fd6bb=_0x47c38b,_0x28dac9=_0x4515a4(_0x49c815,_0x38f9ad);if(_0x28dac9[_0x1fd6bb(0xee)]&&!_0x26335a(this[_0x1fd6bb(0x1ef)]))return{..._0x28dac9,'killable':![],'killConfirm':undefined};return _0x28dac9;}[_0x47c38b(0x143)](){const _0x5ec628=_0x47c38b;return!!this[_0x5ec628(0x110)];}[_0x47c38b(0x17d)](_0x299439){const _0x46cf0c=_0x47c38b;Object[_0x46cf0c(0x175)](this[_0x46cf0c(0x1f5)],_0x299439||{});}['noteListenAddr'](_0xe73c5c){const _0x65afdd=_0x47c38b;if(_0xe73c5c)this[_0x65afdd(0x12b)]=_0xe73c5c;}['register'](_0x200def={}){const _0x5900cc=_0x47c38b;return this['okdb'][_0x5900cc(0x1b9)](_0x200def);}['processingStatusView'](){const _0x5249e6=_0x47c38b;let _0x4bef9e=null;const _0x1f4f90={};for(const _0x5bb6e7 of this['listNodes']()){const _0x4073fa=_0x5bb6e7[_0x5249e6(0xbd)];if(!_0x4073fa)continue;if(_0x4bef9e==null)_0x4bef9e=_0x4073fa['policy'];for(const _0x5717c1 of _0x4073fa['processors']||[]){if(![_0x5249e6(0x204),_0x5249e6(0x205),_0x5249e6(0x1a1),_0x5249e6(0x106)][_0x5249e6(0x1fe)](_0x5717c1[_0x5249e6(0x120)]))continue;const _0x2c61d0=_0x5717c1[_0x5249e6(0x1cb)]||_0x5249e6(0x1f2);(_0x1f4f90[_0x2c61d0]||=[])['push']({'type':_0x5717c1['type'],'mode':_0x5717c1[_0x5249e6(0x120)],'state':_0x5717c1[_0x5249e6(0x118)],'lastClock':_0x5717c1[_0x5249e6(0xaf)],'headClock':_0x5717c1['headClock'],'lag':_0x5717c1[_0x5249e6(0xe1)]});}}return{'envs':_0x1f4f90,'policy':_0x4bef9e,'source':_0x5249e6(0x15f)};}[_0x47c38b(0x1e7)](){const _0x2607fe=_0x47c38b,_0x1d627f=_0x24daed=>{const _0x2f9395=_0x2a26;if(_0x24daed['state']===_0x2f9395(0x114)||_0x24daed[_0x2f9395(0x118)]===_0x2f9395(0x78)||_0x24daed[_0x2f9395(0x118)]===_0x2f9395(0x100))return 0x3;if(_0x24daed[_0x2f9395(0x119)])return 0x1;return 0x2;},_0x2cd6f2=new Map();for(const _0x481e8a of this[_0x2607fe(0x145)]()){for(const _0x3f65fe of _0x481e8a['processing']?.[_0x2607fe(0x1b2)]||[]){const _0x526ad0={..._0x3f65fe,'owner':{'pid':_0x481e8a[_0x2607fe(0x92)]??null,'kind':_0x481e8a[_0x2607fe(0x176)]??null,'host':_0x481e8a[_0x2607fe(0x116)]??null}},_0x4374f1=_0x3f65fe['mode']===_0x2607fe(0x204)?_0x2607fe(0x173)+(_0x3f65fe[_0x2607fe(0x1cb)]??'')+'::'+(_0x3f65fe[_0x2607fe(0x108)]??_0x3f65fe[_0x2607fe(0xf0)]??_0x3f65fe['id']):_0x2607fe(0x1be)+(_0x481e8a['nodeKey']??_0x481e8a[_0x2607fe(0x11c)]??'')+'::'+(_0x3f65fe[_0x2607fe(0x1cb)]??'')+'::'+_0x3f65fe['id'],_0x1ba718=_0x2cd6f2[_0x2607fe(0x87)](_0x4374f1);if(!_0x1ba718||_0x1d627f(_0x526ad0)>_0x1d627f(_0x1ba718))_0x2cd6f2['set'](_0x4374f1,_0x526ad0);}}return[..._0x2cd6f2[_0x2607fe(0x84)]()];}[_0x47c38b(0x1fb)](){const _0x266d9f=_0x47c38b,_0x2d6c42=Date[_0x266d9f(0x97)](),_0x434ce6=this[_0x266d9f(0x145)](),_0xb04907=_0x296baa=>Math[_0x266d9f(0xbf)](0x0,Math['round']((_0x2d6c42-(_0x296baa[_0x266d9f(0x103)]||_0x2d6c42))/0x3e8)),_0x3125fe=_0x434ce6[_0x266d9f(0x19b)](_0x431e5a=>_0x431e5a[_0x266d9f(0x176)]===_0x266d9f(0xbb)),_0x3fdde9=_0x434ce6[_0x266d9f(0x1e6)](_0x2ff8bb=>_0x2ff8bb[_0x266d9f(0x176)]==='http-server');if(_0x3125fe||_0x3fdde9['length'])return{'primary':_0x3125fe?{'pid':_0x3125fe[_0x266d9f(0x92)],'uptime':_0xb04907(_0x3125fe)}:null,'workers':_0x3fdde9['map'](_0x546841=>({'pid':_0x546841['pid'],'uptime':_0xb04907(_0x546841)})),'workersConfigured':_0x3125fe?.[_0x266d9f(0x193)]?.[_0x266d9f(0x1c5)]??_0x3fdde9[_0x266d9f(0x72)],'mode':_0x266d9f(0xeb)};const _0xab0da9=_0x434ce6[_0x266d9f(0x19b)](_0x3309e9=>_0x3309e9['kind']===_0x266d9f(0x1c1)||_0x3309e9[_0x266d9f(0x176)]==='standalone'||_0x3309e9[_0x266d9f(0x176)]===_0x266d9f(0x104)),_0x3eff9e=_0xab0da9?{'pid':_0xab0da9['pid'],'uptime':_0xb04907(_0xab0da9)}:{'pid':process[_0x266d9f(0x92)],'uptime':Math['max'](0x0,Math[_0x266d9f(0x150)](process[_0x266d9f(0x9c)]()))};return{'primary':_0x3eff9e,'workers':[_0x3eff9e],'workersConfigured':0x1,'mode':_0x266d9f(0x204)};}[_0x47c38b(0xfe)](){return this['_groupByProcess']();}['treeView'](){const _0x79947e=_0x47c38b,_0x13222e=new Map();for(const _0x2f0f10 of this[_0x79947e(0x14c)]())_0x13222e[_0x79947e(0xc7)](_0x2f0f10[_0x79947e(0x11c)],{..._0x2f0f10,'children':[]});const _0x2e99f9=[];for(const _0x5a186b of _0x13222e['values']()){const _0x5b7e9e=_0x5a186b[_0x79947e(0x192)]?_0x13222e['get'](_0x5a186b[_0x79947e(0x192)]):null;if(_0x5b7e9e&&_0x5b7e9e!==_0x5a186b)_0x5b7e9e['children'][_0x79947e(0xfa)](_0x5a186b);else _0x2e99f9[_0x79947e(0xfa)](_0x5a186b);}const _0xb004e7=(_0x5026ca,_0x320ff9)=>_0x5026ca[_0x79947e(0x176)]===_0x320ff9[_0x79947e(0x176)]?(_0x5026ca[_0x79947e(0x92)]||0x0)-(_0x320ff9['pid']||0x0):(_0x5026ca[_0x79947e(0x176)]??'')<(_0x320ff9['kind']??'')?-0x1:0x1,_0x8cd863=_0x2df2c6=>{const _0x33c9e4=_0x79947e;_0x2df2c6[_0x33c9e4(0x7b)](_0xb004e7);for(const _0x4988e6 of _0x2df2c6)if(_0x4988e6[_0x33c9e4(0xde)][_0x33c9e4(0x72)])_0x8cd863(_0x4988e6[_0x33c9e4(0xde)]);};return _0x8cd863(_0x2e99f9),_0x2e99f9;}[_0x47c38b(0x165)](_0x39361f){const _0x3e9bcf=_0x47c38b;return this['_groupByProcess']()[_0x3e9bcf(0x19b)](_0x33449f=>_0x33449f['processKey']===_0x39361f)??null;}[_0x47c38b(0x14c)](_0x1276bc=Date[_0x47c38b(0x97)]()){const _0x4e230a=_0x47c38b,_0x22f667=new Map();for(const _0x599cca of this[_0x4e230a(0x145)]()){const _0x4643a1=_0x4d2e79(_0x599cca);let _0x362619=_0x22f667[_0x4e230a(0x87)](_0x4643a1);!_0x362619&&(_0x362619={'processKey':_0x4643a1,'nodeKey':_0x4643a1,'pid':_0x599cca[_0x4e230a(0x92)],'ppid':_0x599cca['ppid']??null,'host':_0x599cca[_0x4e230a(0x116)]??null,'kind':_0x599cca[_0x4e230a(0x176)],'role':null,'supervisorKey':_0x599cca['supervisorKey']??null,'slot':_0x599cca[_0x4e230a(0x1b5)]??null,'slotKey':_0x599cca['slotKey']??null,'caps':_0x599cca[_0x4e230a(0xdc)]??null,'lifecycle':_0x599cca[_0x4e230a(0x1d4)]??null,'uptime':Math[_0x4e230a(0xbf)](0x0,Math[_0x4e230a(0x150)]((_0x1276bc-(_0x599cca[_0x4e230a(0x103)]||_0x1276bc))/0x3e8)),'startedAt':_0x599cca['startedAt']??null,'meta':_0x599cca[_0x4e230a(0x193)]??null,'listenAddr':null,'processing':null,'stats':null,'instances':[]},_0x22f667['set'](_0x4643a1,_0x362619));_0x362619[_0x4e230a(0x1ca)][_0x4e230a(0xfa)]({'instanceId':_0x599cca[_0x4e230a(0x13b)]??null,'role':_0x599cca[_0x4e230a(0x1ae)]??null,'listenAddr':_0x599cca['listenAddr']??null,'lifecycle':_0x599cca[_0x4e230a(0x1d4)]??null,'processing':_0x599cca['processing']??null});if(!_0x362619[_0x4e230a(0x1ae)]&&_0x599cca[_0x4e230a(0x1ae)])_0x362619[_0x4e230a(0x1ae)]=_0x599cca[_0x4e230a(0x1ae)];if(!_0x362619[_0x4e230a(0xff)]&&_0x599cca[_0x4e230a(0xff)])_0x362619[_0x4e230a(0xff)]=_0x599cca[_0x4e230a(0xff)];if(!_0x362619[_0x4e230a(0xbd)]&&_0x599cca[_0x4e230a(0xbd)])_0x362619['processing']=_0x599cca['processing'];if(_0x362619['caps']==null&&_0x599cca[_0x4e230a(0xdc)])_0x362619['caps']=_0x599cca['caps'];if(_0x599cca[_0x4e230a(0x1bf)]&&(!_0x362619[_0x4e230a(0x1bf)]||(_0x599cca['stats']['at']??0x0)>(_0x362619[_0x4e230a(0x1bf)]['at']??0x0)))_0x362619[_0x4e230a(0x1bf)]=_0x599cca['stats'];}return[..._0x22f667[_0x4e230a(0x84)]()];}['runtimeProcessesView'](){const _0x494803=_0x47c38b,_0x20e446=[],_0x22df2b={'rss':0x0,'heapUsed':0x0,'processes':0x0};for(const _0x4a8b59 of this[_0x494803(0x14c)]()){_0x20e446[_0x494803(0xfa)]({'processKey':_0x4a8b59['processKey'],'kind':_0x4a8b59['kind'],'pid':_0x4a8b59[_0x494803(0x92)],'supervisorKey':_0x4a8b59['supervisorKey'],'meta':_0x4a8b59[_0x494803(0x193)]??null,'uptime':_0x4a8b59['uptime'],'stats':_0x4a8b59[_0x494803(0x1bf)]??null}),_0x22df2b[_0x494803(0x1c4)]++,_0x4a8b59[_0x494803(0x1bf)]&&(_0x22df2b[_0x494803(0x89)]+=_0x4a8b59['stats'][_0x494803(0x89)]||0x0,_0x22df2b[_0x494803(0xc0)]+=(_0x4a8b59[_0x494803(0x1bf)][_0x494803(0xc0)]||0x0)+(_0x4a8b59['stats'][_0x494803(0x12a)]?.[_0x494803(0xc0)]||0x0));}return{'totals':_0x22df2b,'nodes':_0x20e446};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1d0688=_0x47c38b;this[_0x1d0688(0x9d)]=this[_0x1d0688(0x9d)]||!!writer,this[_0x1d0688(0x124)]=this[_0x1d0688(0x124)]||!!reader,this[_0x1d0688(0x162)]=kind||this[_0x1d0688(0x162)]||(_0xd83097[_0x1d0688(0xab)]?_0x1d0688(0xc1):'cli'),this[_0x1d0688(0x149)]=supervisorKey??this[_0x1d0688(0x149)],this[_0x1d0688(0x12b)]=listenAddr??this[_0x1d0688(0x12b)],this['_ensureDesired']();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x2cbb37=await this[_0x1d0688(0x1ef)]['createEnvironment'](_0xefbd20,{'sync':![],'durability':'fast'});if(!_0x2cbb37[_0x1d0688(0xae)](_0x26e5eb))await _0x2cbb37[_0x1d0688(0x142)](_0x26e5eb);this[_0x1d0688(0x110)]=_0x2cbb37;}return this[_0x1d0688(0x110)];}[_0x47c38b(0x126)](){const _0x21cb52=_0x47c38b;return this[_0x21cb52(0x1f9)]!==this[_0x21cb52(0x110)]&&(this[_0x21cb52(0x1f9)]=this[_0x21cb52(0x110)],this[_0x21cb52(0xb5)]=this[_0x21cb52(0x110)][_0x21cb52(0x190)](_0x26e5eb)[_0x21cb52(0x117)]),this[_0x21cb52(0xb5)];}[_0x47c38b(0x188)](_0x161fcc){const _0x1d35a4=_0x47c38b,_0x221391=this[_0x1d35a4(0x126)]()[_0x1d35a4(0x177)](_0x161fcc['nodeKey'],_0x161fcc,0x1);if(_0x221391&&typeof _0x221391['then']==='function')_0x221391[_0x1d35a4(0x1dd)](undefined,()=>{});return _0x221391;}['_removeRowAsync'](_0x2db9bb){const _0x73dc7a=_0x47c38b,_0x8acc4c=this[_0x73dc7a(0x126)]()[_0x73dc7a(0x9a)](_0x2db9bb);if(_0x8acc4c&&typeof _0x8acc4c['then']===_0x73dc7a(0x198))_0x8acc4c[_0x73dc7a(0x1dd)](undefined,()=>{});return _0x8acc4c;}async[_0x47c38b(0x169)](_0x15bdf3){const _0x14dd30=_0x47c38b;if(!this['_statusEnv']||!this['_isWriter']||!_0x15bdf3?.[_0x14dd30(0x75)])return;return this[_0x14dd30(0x188)](_0x15bdf3);}async[_0x47c38b(0x7f)](_0x3c1d34){const _0x370a79=_0x47c38b;if(!this[_0x370a79(0x110)]||!this['_isWriter']||!_0x3c1d34)return;const _0x1a8005=_0x3c1d34[_0x370a79(0x1fe)]('#'),_0x25bde2=[];for(const {key:_0x239e50}of this[_0x370a79(0x110)][_0x370a79(0x1ad)](_0x26e5eb)){if(_0x239e50===_0x3c1d34||!_0x1a8005&&typeof _0x239e50===_0x370a79(0x6f)&&_0x239e50[_0x370a79(0x141)](_0x3c1d34+'#'))_0x25bde2[_0x370a79(0xfa)](_0x239e50);}return Promise[_0x370a79(0x1aa)](_0x25bde2['map'](_0x18c510=>this['_removeRowAsync'](_0x18c510)));}[_0x47c38b(0x1d8)](_0x2fba69){const _0x4d9853=_0x47c38b;if(typeof _0x2fba69?.['pid']!=='number')return![];if(_0x2fba69[_0x4d9853(0x116)]!==_0x3672e0[_0x4d9853(0x1f3)]())return![];if(_0x2fba69[_0x4d9853(0x92)]===process['pid'])return![];try{return process[_0x4d9853(0xf9)](_0x2fba69[_0x4d9853(0x92)],0x0),![];}catch(_0x217e3f){return _0x217e3f[_0x4d9853(0x1f6)]==='ESRCH';}}[_0x47c38b(0x145)](){const _0x290be9=_0x47c38b;if(!this[_0x290be9(0x110)])return[];const _0x345404=Date[_0x290be9(0x97)](),_0x149edd=[];for(const {value:_0x3c2e57}of this[_0x290be9(0x110)][_0x290be9(0x1ad)](_0x26e5eb)){if(_0x3c2e57&&(_0x3c2e57['expiresAt']==null||_0x3c2e57['expiresAt']>=_0x345404)&&!this[_0x290be9(0x1d8)](_0x3c2e57))_0x149edd[_0x290be9(0xfa)](_0x3c2e57);}return _0x149edd;}['reap'](_0x1d01a7=0x0){const _0x2ab4f6=_0x47c38b;if(!this[_0x2ab4f6(0x110)]||!this[_0x2ab4f6(0x9d)])return;const _0x2c8658=Date['now']()-_0x1d01a7,_0x3327de=new Set(),_0x18490f=[];for(const {key:_0x27c394,value:_0x43856d}of this[_0x2ab4f6(0x110)][_0x2ab4f6(0x1ad)](_0x26e5eb)){if(_0x43856d&&(_0x43856d[_0x2ab4f6(0x13d)]!=null&&_0x43856d['expiresAt']<_0x2c8658||this[_0x2ab4f6(0x1d8)](_0x43856d)))_0x18490f[_0x2ab4f6(0xfa)](_0x27c394);else _0x3327de[_0x2ab4f6(0x135)](_0x4d2e79(_0x43856d)??_0x27c394);}for(const _0x5af27b of _0x18490f)this['_removeRowAsync'](_0x5af27b);if(this[_0x2ab4f6(0x127)]())for(const {key:_0x3a2498}of this[_0x2ab4f6(0xd3)]('node')){if(!_0x3327de['has'](_0x3a2498))this[_0x2ab4f6(0x1cd)][_0x2ab4f6(0x123)](_0x2ab4f6(0xb8)+_0x3a2498);}}[_0x47c38b(0x8c)](_0x2a96ba=null){const _0x933580=_0x47c38b;if(this[_0x933580(0x6d)]||!this[_0x933580(0x9d)]||!this[_0x933580(0x110)])return;this['_onTick']=_0x2a96ba,this[_0x933580(0x199)]=()=>this['_maybePublish']();for(const _0x4f1581 of _0x2476f0)this[_0x933580(0x1ef)][_0x933580(0x70)]['on'](_0x4f1581,this[_0x933580(0x199)]);this[_0x933580(0xb1)]();const _0x29b92c=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x4377c1;this[_0x933580(0x6d)]=setInterval(()=>{const _0xe9a515=_0x933580;if(this['_onTick'])try{this[_0xe9a515(0xe3)]();}catch{}this[_0xe9a515(0xb1)](),this[_0xe9a515(0x155)]();},_0x29b92c);if(this['_hbTimer']['unref'])this[_0x933580(0x6d)][_0x933580(0x184)]();}[_0x47c38b(0x115)](){const _0x97281a=_0x47c38b;if(!this[_0x97281a(0x9d)]||!this['_statusEnv'])return;if(Date[_0x97281a(0x97)]()-this[_0x97281a(0x147)]<_0x4f01d3)return;this['_publishNow']();}[_0x47c38b(0xb1)](){const _0x32fb9a=_0x47c38b;if(!this[_0x32fb9a(0x9d)]||!this['_statusEnv'])return;this[_0x32fb9a(0x147)]=Date[_0x32fb9a(0x97)]();try{const _0x19738d=[this[_0x32fb9a(0xd4)]()];for(const _0x39ca80 of this[_0x32fb9a(0x182)][_0x32fb9a(0x84)]())_0x19738d[_0x32fb9a(0xfa)](this[_0x32fb9a(0x1ed)](_0x39ca80));const _0x3ac06d=_0xfcc22e[_0x32fb9a(0xfc)]?_0xfcc22e[_0x32fb9a(0x97)]():0x0,_0x5516df=Promise[_0x32fb9a(0x1aa)](_0x19738d[_0x32fb9a(0xf6)](_0x4981bc=>this[_0x32fb9a(0x188)](_0x4981bc)))['catch'](()=>{});if(_0xfcc22e[_0x32fb9a(0xfc)])_0xfcc22e[_0x32fb9a(0x121)]('registry-publish',_0xfcc22e[_0x32fb9a(0x97)]()-_0x3ac06d,_0x32fb9a(0x154)+_0x19738d[_0x32fb9a(0x72)]);return _0x5516df;}catch{}}async['stopHeartbeat'](){const _0x2afc6e=_0x47c38b;if(this[_0x2afc6e(0x199)]){for(const _0x56a2ee of _0x2476f0){try{this[_0x2afc6e(0x1ef)]['events'][_0x2afc6e(0xcd)](_0x56a2ee,this['_onProcEvent']);}catch{}}this[_0x2afc6e(0x199)]=null;}this['_hbTimer']&&(clearInterval(this[_0x2afc6e(0x6d)]),this[_0x2afc6e(0x6d)]=null);try{if(this['_statusEnv']&&this[_0x2afc6e(0x9d)])await this[_0x2afc6e(0x7f)](this[_0x2afc6e(0x19c)]);}catch{}}async['deregisterSelf'](){const _0x197660=_0x47c38b;if(!this['_statusEnv']||!this[_0x197660(0x9d)])return;try{await this['removeNode'](this[_0x197660(0x19c)]);}catch{}try{const _0x13eae9=[];for(const {value:_0x31ef8e}of this['_statusEnv'][_0x197660(0x1ad)](_0x26e5eb)){if(_0x31ef8e?.[_0x197660(0x9f)]===process[_0x197660(0x92)]&&_0x31ef8e[_0x197660(0x75)])_0x13eae9['push'](_0x31ef8e['nodeKey']);}for(const _0x602cc1 of _0x13eae9){try{await this[_0x197660(0x7f)](_0x602cc1);}catch{}}}catch{}}async[_0x47c38b(0x86)](){const _0x51da07=_0x47c38b;return this['putNode'](this[_0x51da07(0xd4)]());}async[_0x47c38b(0xa8)](_0x5c29a3){const _0x198f17=_0x47c38b;if(!this['_statusEnv']||!this[_0x198f17(0x9d)])return;return this[_0x198f17(0x169)](this['_buildChildRow'](_0x5c29a3));}[_0x47c38b(0x1ed)]({pid:_0x3c2f20,startedAt:_0x2ccdb5,kind:_0x4b3977,supervisorKey:_0x3fbc52,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x3120b0=_0x47c38b,_0x50cdd0=Date['now'](),_0x3c6880=_0x517179(_0x3c2f20,_0x2ccdb5);return{'nodeKey':_0x5956c8(_0x3c6880,'0'),'processKey':_0x3c6880,'instanceId':'0','pid':_0x3c2f20,'startedAt':_0x2ccdb5,'ppid':process[_0x3120b0(0x92)],'host':_0x3672e0['hostname'](),'supervisorKey':_0x3fbc52,'slot':slot,'slotKey':slotKey,'kind':_0x4b3977,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x50cdd0,'expiresAt':_0x50cdd0+_0x5d09ef,'caps':this[_0x3120b0(0x128)](_0x4b3977,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x47c38b(0x11a)](_0x5ab9db){const _0xec42fc=_0x47c38b;if(!_0x5ab9db?.[_0xec42fc(0x92)])return null;const _0x15c8d9=_0x517179(_0x5ab9db['pid'],_0x5ab9db[_0xec42fc(0x103)]);this[_0xec42fc(0x182)]['set'](_0x15c8d9,{..._0x5ab9db,'supervisorKey':_0x5ab9db[_0xec42fc(0x192)]??this[_0xec42fc(0x93)]});if(this[_0xec42fc(0x9d)])await this[_0xec42fc(0xa8)](this[_0xec42fc(0x182)][_0xec42fc(0x87)](_0x15c8d9))[_0xec42fc(0x1e3)]?.(()=>{});return _0x15c8d9;}['removeSupervisedChild'](_0x707e4d){const _0x3a888a=_0x47c38b;if(!_0x707e4d)return;return this[_0x3a888a(0x182)][_0x3a888a(0xfd)](_0x707e4d),this['removeNode'](_0x707e4d);}['_sampleOwnStats'](){const _0x533648=_0x47c38b,_0x3c26ee=Date[_0x533648(0x97)](),_0x498cf7=process['cpuUsage'](),_0x254d95=(_0x3c26ee-this[_0x533648(0x122)])*0x3e8;if(_0x254d95>=0x3d090){const _0x49765b=_0x498cf7['user']-this['_lastCpuUsage'][_0x533648(0x88)]+(_0x498cf7['system']-this['_lastCpuUsage'][_0x533648(0x1bb)]),_0x140a81=_0x3672e0[_0x533648(0x1d3)]()['length']||0x1;this[_0x533648(0x1b7)]=Math['min'](0x64,Math[_0x533648(0x150)](_0x49765b/(_0x254d95*_0x140a81)*0x64)),this[_0x533648(0xd2)]=Math[_0x533648(0x150)](_0x254d95/0x3e8),this[_0x533648(0xa9)]=_0x498cf7,this['_lastCpuAt']=_0x3c26ee;}const _0x45b196=process[_0x533648(0xcb)]();let _0xb54366=null;if(this[_0x533648(0x14e)][_0x533648(0x1f0)]>0x0){let _0x340f58=0x0;for(const _0x5f500d of this[_0x533648(0x14e)]['values']())_0x340f58+=_0x5f500d[_0x533648(0xc0)]||0x0;_0xb54366={'count':this['_threadStats']['size'],'heapUsed':_0x340f58};}return{'rss':_0x45b196[_0x533648(0x89)],'heapUsed':_0x45b196['heapUsed'],'heapTotal':_0x45b196[_0x533648(0x111)],'external':_0x45b196['external'],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x533648(0xd2)]??null,'threads':_0xb54366,'at':_0x3c26ee};}['reportThreadStats'](_0x4da82f,_0x3355be){const _0x2c20af=_0x47c38b;if(!_0x4da82f||!_0x3355be)return;this[_0x2c20af(0x14e)][_0x2c20af(0xc7)](_0x4da82f,_0x3355be);}[_0x47c38b(0xef)](_0x162fe3){const _0x4bffa8=_0x47c38b;this[_0x4bffa8(0x14e)][_0x4bffa8(0xfd)](_0x162fe3);}[_0x47c38b(0x1ba)](_0x29bfb8,_0xa25091,_0x1c28c5=undefined){const _0x374f14=_0x47c38b,_0x188753=this['_children'][_0x374f14(0x87)](_0x29bfb8);if(!_0x188753||!_0xa25091)return;if(_0x1c28c5!==undefined)_0x188753[_0x374f14(0xbd)]=_0x1c28c5;_0x188753[_0x374f14(0x1bf)]={'rss':_0xa25091[_0x374f14(0x89)]??null,'heapUsed':_0xa25091[_0x374f14(0xc0)]??null,'heapTotal':_0xa25091[_0x374f14(0x111)]??null,'external':_0xa25091[_0x374f14(0x12d)]??null,'cpuPct':_0xa25091[_0x374f14(0x180)]??null,'cpuWindowMs':_0xa25091['cpuWindowMs']??null,'threads':_0xa25091[_0x374f14(0x12a)]??null,'claims':_0xa25091[_0x374f14(0xc2)]??null,'envsOpen':_0xa25091['envsOpen']??null,'at':Date[_0x374f14(0x97)]()};}[_0x47c38b(0xd4)](){const _0x133164=_0x47c38b,_0x191c5f=Date['now'](),_0x1bdd6e=this['okdb']['_role']||{},_0x458e8d=this[_0x133164(0x162)]||'cli';return{'nodeKey':this[_0x133164(0x19c)],'processKey':this[_0x133164(0x93)],'instanceId':this[_0x133164(0x94)],'pid':process[_0x133164(0x92)],'startedAt':this[_0x133164(0xc8)],'instanceStartedAt':this[_0x133164(0x18c)],'ppid':typeof process[_0x133164(0x9f)]===_0x133164(0x1bc)?process[_0x133164(0x9f)]:null,'host':_0x3672e0[_0x133164(0x1f3)](),'supervisorKey':this['_supervisorKey']??null,'kind':_0x458e8d,'role':{'engines':!!_0x1bdd6e['engines'],'asyncProcessors':!!_0x1bdd6e['asyncProcessors'],'compaction':_0x1bdd6e[_0x133164(0xec)],'http':_0x1bdd6e[_0x133164(0x12e)]},'listenAddr':this[_0x133164(0x12b)]??null,'heartbeatAt':_0x191c5f,'expiresAt':_0x191c5f+_0x5d09ef,'caps':this[_0x133164(0x128)](_0x458e8d,_0x1bdd6e),'lifecycle':{'state':_0x133164(0x12c),'desiredVersionApplied':null},'meta':{...this[_0x133164(0x1f5)]},'processing':_0x1bdd6e['asyncProcessors']?this[_0x133164(0x1d0)]():null,'stats':this['_sampleOwnStats']()};}[_0x47c38b(0x1d0)](){const _0x33529c=_0x47c38b,_0x10ae39=[];try{for(const [_0x2070a0,_0x977fa1]of this[_0x33529c(0x1ef)][_0x33529c(0x7c)]){if(_0x2070a0[_0x33529c(0x141)]('~'))continue;for(const _0x2335d8 of _0x977fa1[_0x33529c(0x170)]['tierList']())_0x10ae39['push']({..._0x2335d8,'env':_0x2070a0});}}catch{}return{'policy':this[_0x33529c(0x1ef)][_0x33529c(0x139)]??null,'processors':_0x10ae39};}[_0x47c38b(0x127)](){const _0x16b6f9=_0x47c38b;if(this[_0x16b6f9(0x1cd)])return!![];const _0x3e8549=this[_0x16b6f9(0x1ef)][_0x16b6f9(0xb2)];if(!_0x3e8549)return![];return this['_desired']=_0x3e8549['openDB'](_0x49321f,{'dupSort':![]}),this[_0x16b6f9(0xd7)]=_0x3e8549[_0x16b6f9(0x17b)](_0x6a7cb,{'dupSort':![]}),!![];}[_0x47c38b(0x195)](){return!!this['_desired'];}[_0x47c38b(0x164)](_0x4404a4,_0x543d99){const _0x1bce73=_0x47c38b;if(!this['_ensureDesired']())return null;return this[_0x1bce73(0x1cd)][_0x1bce73(0x87)](_0x4404a4+'/'+_0x543d99)??null;}[_0x47c38b(0x17e)](_0x2f3a03,_0x462d94,_0x56dd0c){const _0x2d076a=_0x47c38b;if(!this[_0x2d076a(0x127)]())return null;const _0x45ceac=_0x2f3a03+'/'+_0x462d94;let _0x3377b9;return this[_0x2d076a(0x1cd)][_0x2d076a(0x202)](()=>{const _0x229c30=_0x2d076a,_0x490d4e=this['_desired'][_0x229c30(0x87)](_0x45ceac)||{'version':0x0};_0x3377b9=(_0x490d4e[_0x229c30(0x166)]||0x0)+0x1,this['_desired']['put'](_0x45ceac,{..._0x490d4e,..._0x56dd0c,'version':_0x3377b9,'updatedAt':Date[_0x229c30(0x97)]()});}),_0x3377b9;}[_0x47c38b(0xd3)](_0x478873){const _0x1ad4cc=_0x47c38b;if(!this[_0x1ad4cc(0x127)]())return[];const _0x41f2b6=_0x478873+'/',_0x4f6f7b=[];for(const {key:_0x6d78cb,value:_0x157cfb}of this[_0x1ad4cc(0x1cd)][_0x1ad4cc(0x1ad)]({'start':_0x41f2b6,'end':_0x41f2b6+'ÿ'})){if(typeof _0x6d78cb!==_0x1ad4cc(0x6f)||!_0x6d78cb[_0x1ad4cc(0x141)](_0x41f2b6))break;_0x4f6f7b[_0x1ad4cc(0xfa)]({'key':_0x6d78cb[_0x1ad4cc(0x12f)](_0x41f2b6[_0x1ad4cc(0x72)]),'value':_0x157cfb});}return _0x4f6f7b;}['getCmd'](_0x5e46d9){const _0x2038c6=_0x47c38b;if(!this[_0x2038c6(0x127)]())return null;return this['_cmd'][_0x2038c6(0x87)](_0x5e46d9)??null;}['bumpCmd'](_0x522415,_0x187ea1,_0x8d57b3={}){const _0x55d891=_0x47c38b;if(!this[_0x55d891(0x127)]())return null;let _0x589bd8;return this['_cmd'][_0x55d891(0x202)](()=>{const _0x20071d=_0x55d891,_0x52c356=this[_0x20071d(0xd7)][_0x20071d(0x87)](_0x522415)||{'epoch':0x0};_0x589bd8=(_0x52c356[_0x20071d(0x16e)]||0x0)+0x1,this[_0x20071d(0xd7)][_0x20071d(0x177)](_0x522415,{..._0x52c356,..._0x8d57b3,'cmd':_0x187ea1,'epoch':_0x589bd8,'updatedAt':Date['now']()});}),_0x589bd8;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x4c042f,'nodeKey':_0x517179,'logicalKey':_0x963705,'slotKey':_0x428f06,'PROCESS_ENV':_0xefbd20,'NODE_TYPE':_0x26e5eb},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x103ff7=_0xd218e;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x3e6d75=require$$0$2,{EVENTS:_0x36ec68,CHANGE_ACTIONS:_0x3bb655}=requireOkdbEnums(),{LOOP:_0xc36c4f}=requireOkdbLoopMonitor(),_0x521d39=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x2cac48=0x5,_0xbefe9d=0x2710;class _0x2c4bbf extends _0x3e6d75{constructor(_0x1c8bdb,_0x405bce={}){const _0x2c5edb=_0x2a26;super(),this[_0x2c5edb(0x1ef)]=_0x1c8bdb,this[_0x2c5edb(0x194)]=_0x405bce['quantum']??_0x521d39,this['_flushDebounce']=_0x405bce[_0x2c5edb(0xd6)]??_0x2cac48,this[_0x2c5edb(0x1bd)]=_0x405bce[_0x2c5edb(0xca)]??_0xbefe9d,this[_0x2c5edb(0xa6)]=![],this[_0x2c5edb(0x1fa)]=new Map(),this[_0x2c5edb(0x1c6)]=new Map(),this[_0x2c5edb(0x1b4)]=new Map(),this[_0x2c5edb(0x1c3)]=null,this[_0x2c5edb(0x137)]=![],this[_0x2c5edb(0x1b1)]=new Set(),this['_onItem']=_0x71a3db=>this[_0x2c5edb(0x1a6)](_0x71a3db),this[_0x2c5edb(0x1df)]=_0x520bb8=>this['_handlePoke'](_0x520bb8),this[_0x2c5edb(0xa1)]=()=>this[_0x2c5edb(0x76)]();}[_0x103ff7(0x18f)](){const _0x134ca4=_0x103ff7;if(this[_0x134ca4(0xa6)])return;this[_0x134ca4(0xa6)]=!![];for(const [_0x26998e,_0x5d7878]of this[_0x134ca4(0x1ef)][_0x134ca4(0x7c)]){if(_0x26998e[_0x134ca4(0x141)]('~'))continue;try{this[_0x134ca4(0x1c6)][_0x134ca4(0xc7)](_0x26998e,_0x5d7878[_0x134ca4(0x197)]()||0x0);}catch{}}const {events:_0x58441b}=this['okdb'];_0x58441b['on'](_0x36ec68[_0x134ca4(0xf1)],this['_onItem']),_0x58441b['on'](_0x36ec68['ITEM_UPDATE'],this[_0x134ca4(0xb3)]),_0x58441b['on'](_0x36ec68['ITEM_REMOVE'],this['_onItem']),_0x58441b['on'](_0x36ec68[_0x134ca4(0xe8)],this[_0x134ca4(0x1df)]),_0x58441b[_0x134ca4(0xd5)](_0x36ec68[_0x134ca4(0xbe)],this[_0x134ca4(0xa1)]);}[_0x103ff7(0x76)](){const _0x52e3cf=_0x103ff7;if(!this[_0x52e3cf(0xa6)])return;this[_0x52e3cf(0xa6)]=![];const {events:_0x70d1d7}=this['okdb'];_0x70d1d7['off'](_0x36ec68[_0x52e3cf(0xf1)],this['_onItem']),_0x70d1d7['off'](_0x36ec68[_0x52e3cf(0x1b8)],this[_0x52e3cf(0xb3)]),_0x70d1d7[_0x52e3cf(0xcd)](_0x36ec68[_0x52e3cf(0x13e)],this[_0x52e3cf(0xb3)]),_0x70d1d7[_0x52e3cf(0xcd)](_0x36ec68[_0x52e3cf(0xe8)],this[_0x52e3cf(0x1df)]);try{_0x70d1d7[_0x52e3cf(0xcd)](_0x36ec68[_0x52e3cf(0xbe)],this[_0x52e3cf(0xa1)]);}catch{}this['_flushTimer']&&(clearTimeout(this[_0x52e3cf(0x1c3)]),this[_0x52e3cf(0x1c3)]=null),this[_0x52e3cf(0x1b4)][_0x52e3cf(0x1d2)](),this[_0x52e3cf(0x1fa)][_0x52e3cf(0x1d2)](),this[_0x52e3cf(0x1c6)][_0x52e3cf(0x1d2)](),this[_0x52e3cf(0x1b1)][_0x52e3cf(0x1d2)]();}[_0x103ff7(0x14f)](_0x356f96,_0x5bd46a,_0x581234,_0x29d5bb){return _0x356f96+'\x00'+_0x5bd46a+'\x00'+_0x581234+'\x00'+_0x29d5bb;}['_markSeen'](_0x4d35f4,_0x1e2623,_0x1473aa,_0x469a26){const _0x449722=_0x103ff7,_0x178017=this[_0x449722(0x14f)](_0x4d35f4,_0x1e2623,_0x1473aa,_0x469a26);if(this[_0x449722(0x1b1)][_0x449722(0x144)](_0x178017))return![];this[_0x449722(0x1b1)][_0x449722(0x135)](_0x178017);if(this[_0x449722(0x1b1)][_0x449722(0x1f0)]>this[_0x449722(0x1bd)]){const _0x3f8ad0=this[_0x449722(0x1b1)]['values']()[_0x449722(0x8b)]()['value'];this[_0x449722(0x1b1)][_0x449722(0xfd)](_0x3f8ad0);}return!![];}['_handleInProcess'](_0xda90fa){const _0x45acfc=_0x103ff7;if(!this[_0x45acfc(0xa6)]||!_0xda90fa)return;const {env:_0x487ca1,type:_0x1f6b29,key:_0x52c8d4,clock:_0x24a5d9,origin:_0x5b7194,action:_0x3caf93,newValue:_0xe4a94d,oldValue:_0x7d686b}=_0xda90fa;if(_0x487ca1==null||_0x1f6b29==null||_0x52c8d4==null)return;if(typeof _0x487ca1===_0x45acfc(0x6f)&&_0x487ca1[_0x45acfc(0x141)]('~'))return;if(typeof _0x1f6b29===_0x45acfc(0x6f)&&_0x1f6b29[_0x45acfc(0x141)]('~'))return;if(!this['_markSeen'](_0x487ca1,_0x1f6b29,_0x52c8d4,_0x24a5d9))return;const _0x344882=_0x3caf93===_0x3bb655['REMOVE']?_0x45acfc(0x9a):'put';this['emit'](_0x45acfc(0x1e0),{'env':_0x487ca1,'type':_0x1f6b29,'key':_0x52c8d4,'op':_0x344882,'clock':_0x24a5d9,'origin':_0x5b7194,'value':_0x344882==='remove'?null:_0xe4a94d,'prevValue':_0x7d686b});}[_0x103ff7(0xf5)](_0x864ca5){const _0xb82147=_0x103ff7;if(!this[_0xb82147(0xa6)])return;if(!_0x864ca5||typeof _0x864ca5[_0xb82147(0x1cb)]!=='string'||typeof _0x864ca5[_0xb82147(0xf0)]!==_0xb82147(0x6f))return;const {env:_0x9986ae,type:_0x48bb38}=_0x864ca5;if(_0x9986ae[_0xb82147(0x141)]('~')||_0x48bb38[_0xb82147(0x141)]('~'))return;this['_pending'][_0xb82147(0xc7)](_0x9986ae+'\x00'+_0x48bb38,{'env':_0x9986ae,'type':_0x48bb38}),this[_0xb82147(0x13f)]();}['_scheduleFlush'](){const _0x37e312=_0x103ff7;if(this['_flushTimer'])return;const _0x3347ca=()=>{const _0x5bd558=_0x2a26;this[_0x5bd558(0x1c3)]=null,this[_0x5bd558(0x138)]()['catch'](()=>{});};this[_0x37e312(0x1c3)]=setTimeout(_0x3347ca,this[_0x37e312(0x1cf)]>0x0?this['_flushDebounce']:0x0);}async['_drain'](){const _0x29f9e7=_0x103ff7;if(this[_0x29f9e7(0x137)]){this[_0x29f9e7(0x13f)]();return;}this[_0x29f9e7(0x137)]=!![];try{const _0x8ca108=[...this['_pending']['values']()];this[_0x29f9e7(0x1b4)][_0x29f9e7(0x1d2)]();let _0x1f9d15=![];for(const {env:_0x312255,type:_0x1bd1a5}of _0x8ca108){try{const _0x5298f7=await this[_0x29f9e7(0x146)](_0x312255,_0x1bd1a5);if(_0x5298f7)_0x1f9d15=!![];}catch{this[_0x29f9e7(0x1b4)][_0x29f9e7(0xc7)](_0x312255+'\x00'+_0x1bd1a5,{'env':_0x312255,'type':_0x1bd1a5}),_0x1f9d15=!![];}}if(_0x1f9d15||this[_0x29f9e7(0x1b4)][_0x29f9e7(0x1f0)]>0x0)this[_0x29f9e7(0x13f)]();}finally{this[_0x29f9e7(0x137)]=![];}}async[_0x103ff7(0x146)](_0x16fc39,_0x358c6e){const _0x1d6792=_0x103ff7,_0x5a6ade=await this[_0x1d6792(0x1ef)][_0x1d6792(0x113)](_0x16fc39),_0x8d9111=_0x16fc39+'\x00'+_0x358c6e;!this['_cursors'][_0x1d6792(0x144)](_0x8d9111)&&(!this['_baselines']['has'](_0x16fc39)&&this[_0x1d6792(0x1c6)][_0x1d6792(0xc7)](_0x16fc39,_0x5a6ade[_0x1d6792(0x197)]()||0x0),this[_0x1d6792(0x1fa)][_0x1d6792(0xc7)](_0x8d9111,this[_0x1d6792(0x1c6)][_0x1d6792(0x87)](_0x16fc39)));const _0x3f7394=this[_0x1d6792(0x1fa)][_0x1d6792(0x87)](_0x8d9111),_0x4081e0=_0x5a6ade[_0x1d6792(0x197)](_0x358c6e)||0x0;if(_0x4081e0<=_0x3f7394)return![];const _0x3c08b3=_0x3f7394+this[_0x1d6792(0x194)],_0x37f589=Math[_0x1d6792(0xa7)](_0x4081e0,_0x3c08b3),_0x4055b5=_0xc36c4f[_0x1d6792(0xfc)]?_0xc36c4f[_0x1d6792(0x97)]():0x0,_0x3a5169=Array[_0x1d6792(0x1b6)](_0x5a6ade[_0x1d6792(0x186)](_0x358c6e,_0x3f7394+0x1,_0x37f589));let _0xc9c2b0=_0x3f7394;for(const _0x42905c of _0x3a5169){const {clock:_0x565e22,key:_0x5854d2,action:_0x83de37,origin:_0x4978dd}=_0x42905c;if(_0x565e22>_0xc9c2b0)_0xc9c2b0=_0x565e22;if(_0x5854d2==null)continue;if(!this[_0x1d6792(0x1fd)](_0x16fc39,_0x358c6e,_0x5854d2,_0x565e22))continue;let _0x43a3ef,_0x150f76;if(_0x83de37===_0x3bb655[_0x1d6792(0xa3)])_0x43a3ef=_0x1d6792(0x9a),_0x150f76=null;else{const _0xa1ffe5=_0x5a6ade[_0x1d6792(0x87)](_0x358c6e,_0x5854d2);_0xa1ffe5==null?(_0x43a3ef=_0x1d6792(0x9a),_0x150f76=null):(_0x43a3ef=_0x1d6792(0x177),_0x150f76=_0xa1ffe5);}this[_0x1d6792(0xe4)](_0x1d6792(0x1e0),{'env':_0x16fc39,'type':_0x358c6e,'key':_0x5854d2,'op':_0x43a3ef,'clock':_0x565e22,'origin':_0x4978dd,'value':_0x150f76});}if(_0xc36c4f[_0x1d6792(0xfc)])_0xc36c4f[_0x1d6792(0x121)]('feed:'+_0x16fc39+':'+_0x358c6e,_0xc36c4f[_0x1d6792(0x97)]()-_0x4055b5,'n='+_0x3a5169[_0x1d6792(0x72)]);return this[_0x1d6792(0x1fa)]['set'](_0x8d9111,Math[_0x1d6792(0xbf)](_0xc9c2b0,_0x37f589)),_0x5a6ade['getClock'](_0x358c6e)>_0x37f589;}[_0x103ff7(0xd0)](){const _0x16050e=_0x103ff7;return{'started':this[_0x16050e(0xa6)],'quantum':this[_0x16050e(0x194)],'flushDebounce':this[_0x16050e(0x1cf)],'cursors':Object[_0x16050e(0x1c8)]([...this['_cursors']['entries']()][_0x16050e(0xf6)](([_0x1b31f9,_0x61f63a])=>[_0x1b31f9[_0x16050e(0x125)]('\x00',':'),_0x61f63a])),'pending':this['_pending'][_0x16050e(0x1f0)],'seen':this[_0x16050e(0x1b1)][_0x16050e(0x1f0)]};}}return _0x2c4bbf[_0x103ff7(0x7a)]=_0x521d39,okdbChangefeed={'OKDBChangefeed':_0x2c4bbf},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3350ab=_0xd218e;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x57edd3=require$$1,_0x183e5e=require$$1$1,{EVENTS:_0x94bf1f}=requireOkdbEnums(),_0x3f9272=require$$0$1,{slotKey:_0x1e30be}=requireOkdbProcessRegistry(),_0x52a75f=0xfa,_0x538d4e=0xfa0,_0xc5a1d6=0x5,_0x465c74=0x2710,_0x501452=0xbb8,_0x28d8bc=0x7d0,_0x2e49aa=_0x3350ab(0x95),_0x394b29=_0x3350ab(0x1e2),_0x53c861=_0x3350ab(0x153),_0x132dfd=_0x3350ab(0x1bf),_0x29a64f=[_0x94bf1f[_0x3350ab(0xa5)],_0x94bf1f['FTS_REGISTERED'],_0x94bf1f[_0x3350ab(0x206)],_0x94bf1f[_0x3350ab(0x161)],_0x94bf1f[_0x3350ab(0x1d7)],_0x94bf1f['INDEX_READY'],_0x94bf1f[_0x3350ab(0x10d)],_0x94bf1f[_0x3350ab(0x1db)],_0x3350ab(0x157),_0x3350ab(0xb0),_0x3350ab(0xa0),_0x3350ab(0x14a),'processor:resumed',_0x3350ab(0x16a)],_0x304581=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x3a93d7({workers:_0x52d995,makeOkdb:_0x22323b,port:_0x253710,primaryOkdb:_0x2cbd1e,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x520e44=_0x3350ab;if(_0x57edd3[_0x520e44(0xce)])return childEntry&&_0x57edd3[_0x520e44(0xf2)]({'exec':_0x183e5e[_0x520e44(0x1b3)](__dirname,_0x520e44(0x11f)),'args':[],'execArgv':((()=>{const _0x4b435d=_0x520e44,_0x319faf=[];for(let _0x34eb63=0x0;_0x34eb63<process['execArgv'][_0x4b435d(0x72)];_0x34eb63++){const _0x2ab9d9=process[_0x4b435d(0x17c)][_0x34eb63];if(_0x2ab9d9[_0x4b435d(0x141)](_0x4b435d(0x15d))||_0x2ab9d9[_0x4b435d(0x141)]('--watch')||_0x2ab9d9['startsWith'](_0x4b435d(0x19d)))continue;if(_0x2ab9d9==='-e'||_0x2ab9d9==='--eval'||_0x2ab9d9==='-p'||_0x2ab9d9===_0x4b435d(0xdb)){_0x34eb63++;continue;}_0x319faf['push'](_0x2ab9d9);}return _0x319faf;})())}),_0x22b516({'workers':_0x52d995,'port':_0x253710,'primaryOkdb':_0x2cbd1e,'workerEnv':workerEnv});return _0x3d4b6b({'makeOkdb':_0x22323b,'port':_0x253710});}function _0x22b516({workers:_0x583833,port:_0x57dd5c,primaryOkdb:_0x12fafb,workerEnv:_0x35b218}){const _0x3367f9=_0x3350ab,_0x26bb95=new Map(),_0xafaab8=new Map();let _0x5f2193=![];const _0x86974=_0x512ac3=>_0x512ac3?.[_0x3367f9(0x1c9)],_0x56b52a=_0x1c9b4c=>{const _0x4038eb=_0x3367f9,_0x2fde8c=_0x57edd3['fork']({...process.env,..._0x35b218||{},'OKDB_CLUSTER_SLOT':String(_0x1c9b4c)});return _0x2fde8c[_0x4038eb(0x1c9)]=_0x1c9b4c,_0x26bb95[_0x4038eb(0xc7)](_0x2fde8c[_0x4038eb(0x10f)]['pid'],{'worker':_0x2fde8c,'startedAt':Date[_0x4038eb(0x97)](),'slot':_0x1c9b4c}),_0x2fde8c['on'](_0x4038eb(0x100),_0x2ec2fd=>{const _0x5a05bd=_0x4038eb;console['log'](_0x5a05bd(0x11e)+_0x2fde8c[_0x5a05bd(0x10f)][_0x5a05bd(0x92)]+_0x5a05bd(0x1ec)+(_0x2ec2fd?.['message']??_0x2ec2fd));}),_0x2fde8c['on'](_0x4038eb(0x114),()=>_0x1b7b01()),_0x2fde8c;},_0x15f4a5=_0x29a7ba=>{const _0xa14b9d=_0x3367f9;for(const {worker:_0x3e933f}of _0x26bb95[_0xa14b9d(0x84)]()){if(_0x3e933f[_0xa14b9d(0x196)]()||!_0x3e933f[_0xa14b9d(0xda)]())continue;try{_0x3e933f[_0xa14b9d(0x174)](_0x29a7ba);}catch{}}};_0x12fafb?.[_0x3367f9(0x1b9)]?.({'kind':_0x3367f9(0xbb),'listenAddr':':'+_0x57dd5c})[_0x3367f9(0x1e3)](()=>{}),_0x12fafb?.['processes']?.['setOwnMeta']?.({'workersConfigured':_0x583833});const _0x2e7784={'engines':![],'asyncProcessors':![],'compaction':_0x3367f9(0x1e5),'http':!![]},_0x1b7b01=()=>{const _0x453904=_0x3367f9,_0xf6607=_0x12fafb?.[_0x453904(0x1c4)];if(!_0xf6607||!_0xf6607[_0x453904(0x9d)])return;const _0x1d94a2=_0xf6607['selfKey'];for(const {worker:_0x5384af,startedAt:_0xc380aa,slot:_0x569562,stats:_0x7570b2}of _0x26bb95[_0x453904(0x84)]()){if(_0x5384af[_0x453904(0x196)]())continue;const _0x176d49=_0xf6607[_0x453904(0x195)]?.()&&_0xf6607['getDesired']('slot',_0x3721ae(_0x569562))?.[_0x453904(0x1c7)]===!![];_0xf6607[_0x453904(0xa8)]({'pid':_0x5384af['process'][_0x453904(0x92)],'startedAt':_0xc380aa,'kind':_0x453904(0xc1),'supervisorKey':_0x1d94a2,'slot':_0x569562,'slotKey':_0x3721ae(_0x569562),'role':_0x2e7784,'listenAddr':':'+_0x57dd5c,'lifecycle':_0x176d49?'decommissioning':_0x453904(0x12c),'stats':_0x7570b2??null})['catch'](()=>{});}},_0x3721ae=_0x990350=>_0x1e30be(_0x3367f9(0x14b)+_0x57dd5c,_0x990350),_0x1dec19=_0x2febb4=>{const _0x56e8cd=_0x3367f9,_0x2dfb5e=_0x12fafb?.[_0x56e8cd(0x1c4)];if(!_0x2dfb5e?.[_0x56e8cd(0x195)]?.())return![];return _0x2dfb5e[_0x56e8cd(0x164)]('slot',_0x3721ae(_0x2febb4))?.['decommission']===!![];};for(let _0x23a4eb=0x0;_0x23a4eb<_0x583833;_0x23a4eb++){const _0x57f13a=_0x1dec19(_0x23a4eb);_0xafaab8['set'](_0x23a4eb,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x57f13a,'respawnTimer':null}),_0x57f13a?console['log'](_0x3367f9(0x130)+_0x23a4eb+_0x3367f9(0x16b)):_0x56b52a(_0x23a4eb);}const _0xa7141a=()=>{const _0x3b21cf=_0x3367f9,_0x274f5b=_0x12fafb?.[_0x3b21cf(0x1c4)];if(!_0x274f5b?.[_0x3b21cf(0x9d)]||!_0x274f5b['hasDesired']?.())return;for(const [_0x15b99b,_0x3dd6e0]of _0xafaab8[_0x3b21cf(0x1c0)]()){const _0x2fa57c=_0x274f5b[_0x3b21cf(0x164)](_0x3b21cf(0x1b5),_0x3721ae(_0x15b99b)),_0x116120=_0x2fa57c?.[_0x3b21cf(0x1c7)]===!![],_0x3b16f5=_0x2fa57c?.[_0x3b21cf(0xf9)]===!![];if(_0x116120&&!_0x3dd6e0['dead']){_0x3dd6e0['dead']=!![];_0x3dd6e0['respawnTimer']&&(clearTimeout(_0x3dd6e0[_0x3b21cf(0x15a)]),_0x3dd6e0[_0x3b21cf(0x15a)]=null);for(const {worker:_0x378154}of _0x26bb95['values']()){if(_0x86974(_0x378154)!==_0x15b99b||_0x378154[_0x3b21cf(0x196)]())continue;try{if(_0x3b16f5)_0x378154[_0x3b21cf(0x10f)]['kill'](_0x3b21cf(0x17f));else _0x378154[_0x3b21cf(0xda)]()&&_0x378154[_0x3b21cf(0x18d)]();}catch{}}console[_0x3b21cf(0x153)](_0x3b21cf(0x1eb)+(_0x3b16f5?_0x3b21cf(0x1f1):'decommissioned')+_0x3b21cf(0x105)+_0x15b99b+_0x3b21cf(0x1d5));}else{if(!_0x116120&&_0x3dd6e0['dead']&&_0x2fa57c){_0x3dd6e0[_0x3b21cf(0x9e)]=![],_0x3dd6e0[_0x3b21cf(0x98)]=[],_0x3dd6e0[_0x3b21cf(0xdf)]=0x0;const _0x5c73f4=[..._0x26bb95['values']()][_0x3b21cf(0x15e)](({worker:_0x56ec88})=>_0x86974(_0x56ec88)===_0x15b99b&&!_0x56ec88['isDead']());!_0x5c73f4&&!_0x5f2193&&(_0x56b52a(_0x15b99b),console['log'](_0x3b21cf(0x1a2)+_0x15b99b));}}}},_0x45e583=()=>{try{_0xa7141a();}catch{}};_0x12fafb?.['events']?.['on']?.(_0x94bf1f['SYSTEM_PROC'],_0x45e583);const _0x14753e=[];if(_0x12fafb?.[_0x3367f9(0x70)]?.['on'])for(const _0x505b34 of _0x29a64f){const _0x57a114=_0x2b8eb1=>{_0x15f4a5({[_0x2e49aa]:_0x394b29,'event':_0x505b34,'data':_0x2b8eb1??{}});};_0x12fafb[_0x3367f9(0x70)]['on'](_0x505b34,_0x57a114),_0x14753e[_0x3367f9(0xfa)]({'event':_0x505b34,'handler':_0x57a114});}const _0xb99a6d=setInterval(()=>{_0xa7141a(),_0x1b7b01();},_0x304581);_0xb99a6d['unref']?.();const _0x17c037=(_0x4058a1,_0x7ad87c)=>{const _0x46781a=_0x3367f9;if(!_0x7ad87c||typeof _0x7ad87c!==_0x46781a(0x191)||_0x7ad87c[_0x2e49aa]!==_0x53c861)return;if(!_0x12fafb?.[_0x46781a(0x153)]?.[_0x46781a(0x1d9)])return;const _0x2b7e62=_0x7ad87c[_0x46781a(0xb9)]||{};_0x12fafb['log'][_0x46781a(0x1d9)]({..._0x2b7e62,'msg':'[w'+_0x7ad87c[_0x46781a(0x1b5)]+']\x20'+(_0x2b7e62[_0x46781a(0x1a7)]??''),'meta':{..._0x2b7e62['meta']||{},'worker':_0x7ad87c[_0x46781a(0x1b5)],'workerPid':_0x7ad87c['pid']}});};_0x57edd3['on'](_0x3367f9(0x6c),_0x17c037);const _0x5ed5d8=(_0x200b20,_0x3d486d)=>{const _0x55d242=_0x3367f9;if(!_0x3d486d||typeof _0x3d486d!=='object'||_0x3d486d[_0x2e49aa]!==_0x132dfd)return;const _0x45e51e=_0x26bb95[_0x55d242(0x87)](_0x200b20[_0x55d242(0x10f)]['pid']);if(_0x45e51e)_0x45e51e[_0x55d242(0x1bf)]={..._0x3d486d['stats'],'at':Date[_0x55d242(0x97)]()};};_0x57edd3['on']('message',_0x5ed5d8),_0x57edd3['on'](_0x3367f9(0xb4),(_0x6cf6ec,_0x2e3a7a,_0x44959c)=>{const _0x1bca9f=_0x3367f9,_0xc0f7b2=_0x6cf6ec[_0x1bca9f(0x10f)][_0x1bca9f(0x92)],_0x2bf8bd=_0x86974(_0x6cf6ec),_0x3e7e8d=_0x26bb95[_0x1bca9f(0x87)](_0xc0f7b2);if(_0x3e7e8d&&_0x12fafb?.[_0x1bca9f(0x1c4)])_0x12fafb[_0x1bca9f(0x1c4)][_0x1bca9f(0x7f)](_0xc0f7b2+':'+_0x3e7e8d[_0x1bca9f(0x103)])[_0x1bca9f(0x1e3)](()=>{});_0x26bb95[_0x1bca9f(0xfd)](_0xc0f7b2),console['log'](_0x1bca9f(0x11e)+_0xc0f7b2+_0x1bca9f(0x1e4)+(_0x2bf8bd??'?')+_0x1bca9f(0x13c)+(_0x1bca9f(0x1ce)+_0x2e3a7a+',\x20signal='+(_0x44959c??_0x1bca9f(0x185))+_0x1bca9f(0x160)+_0x26bb95[_0x1bca9f(0x1f0)]+_0x1bca9f(0x1b0))),_0x1b7b01();if(_0x5f2193||_0x2bf8bd==null)return;const _0x5056b8=_0xafaab8[_0x1bca9f(0x87)](_0x2bf8bd);if(!_0x5056b8||_0x5056b8[_0x1bca9f(0x9e)])return;const _0x2b336f=Date[_0x1bca9f(0x97)]();_0x5056b8[_0x1bca9f(0x98)][_0x1bca9f(0xfa)](_0x2b336f),_0x5056b8[_0x1bca9f(0x98)]=_0x5056b8[_0x1bca9f(0x98)]['filter'](_0x37828c=>_0x2b336f-_0x37828c<=_0x465c74);if(_0x5056b8[_0x1bca9f(0x98)]['length']>=_0xc5a1d6){_0x5056b8['dead']=!![],console['error']('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x2bf8bd+'\x20died\x20'+_0x5056b8[_0x1bca9f(0x98)][_0x1bca9f(0x72)]+'\x20times\x20in\x20'+(_0x465c74+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x26bb95[_0x1bca9f(0x1f0)]+_0x1bca9f(0x1a5)));return;}_0x5056b8[_0x1bca9f(0xdf)]++;const _0x462e80=Math['min'](_0x538d4e,_0x52a75f*0x2**(_0x5056b8['consecutiveFailures']-0x1));console['log'](_0x1bca9f(0xdd)+_0x2bf8bd+_0x1bca9f(0xcc)+_0x462e80+'ms\x20(attempt\x20'+_0x5056b8['consecutiveFailures']+')'),_0x5056b8[_0x1bca9f(0x15a)]=setTimeout(()=>{const _0x21d817=_0x1bca9f;_0x5056b8[_0x21d817(0x15a)]=null;if(_0x5f2193||_0x5056b8['dead'])return;const _0x14fefa=_0x56b52a(_0x2bf8bd);_0x14fefa[_0x21d817(0xd5)]('listening',()=>{const _0x3c0010=_0x21d817;if(_0xafaab8[_0x3c0010(0x87)](_0x2bf8bd)===_0x5056b8)_0x5056b8[_0x3c0010(0xdf)]=0x0;});},_0x462e80),_0x5056b8[_0x1bca9f(0x15a)][_0x1bca9f(0x184)]?.();});const _0x4a95ac=[..._0x26bb95[_0x3367f9(0xf4)]()];console[_0x3367f9(0x153)](_0x3367f9(0xa2)+process[_0x3367f9(0x92)]+_0x3367f9(0x19a)+_0x583833+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x57dd5c+':\x20'+('['+_0x4a95ac[_0x3367f9(0x1b3)](',\x20')+']'));const _0x4c6907={'_isClusterController':!![],'port':_0x57dd5c,'primaryOkdb':_0x12fafb??null,'status'(){const _0x37c1c6=_0x3367f9;return{'clustered':!![],'primaryPid':process[_0x37c1c6(0x92)],'port':_0x57dd5c,'primaryRole':_0x12fafb?.[_0x37c1c6(0x1ae)]??null,'processorPid':_0x12fafb?process[_0x37c1c6(0x92)]:null,'workers':[..._0x26bb95[_0x37c1c6(0x84)]()]['map'](({worker:_0x268984})=>({'pid':_0x268984[_0x37c1c6(0x10f)]['pid'],'id':_0x268984['id'],'dead':_0x268984[_0x37c1c6(0x196)]()}))};},async 'close'(){const _0x5c11d2=_0x3367f9;_0x5f2193=!![];for(const _0x251011 of _0xafaab8[_0x5c11d2(0x84)]()){_0x251011[_0x5c11d2(0x9e)]=!![],_0x251011['respawnTimer']&&(clearTimeout(_0x251011[_0x5c11d2(0x15a)]),_0x251011[_0x5c11d2(0x15a)]=null);}clearInterval(_0xb99a6d),_0x57edd3[_0x5c11d2(0xcd)](_0x5c11d2(0x6c),_0x17c037),_0x57edd3['off']('message',_0x5ed5d8),_0x12fafb?.['events']?.[_0x5c11d2(0xcd)]?.(_0x94bf1f[_0x5c11d2(0x1f7)],_0x45e583);if(_0x12fafb?.['events']?.[_0x5c11d2(0xcd)])for(const {event:_0x543b3e,handler:_0x2bfbc3}of _0x14753e){try{_0x12fafb[_0x5c11d2(0x70)]['off'](_0x543b3e,_0x2bfbc3);}catch{}}_0x14753e[_0x5c11d2(0x72)]=0x0;const _0x1ba58b=[..._0x26bb95[_0x5c11d2(0x84)]()][_0x5c11d2(0xf6)](({worker:_0x3094a3})=>_0x3094a3);if(_0x1ba58b['length']===0x0)return;await Promise['all'](_0x1ba58b['map'](_0x161554=>new Promise(_0x8d09da=>{const _0x233f3d=_0x5c11d2;if(_0x161554['isDead']()){_0x8d09da();return;}let _0x2e4f12=![];const _0x101722=()=>{if(_0x2e4f12)return;_0x2e4f12=!![];if(_0x369221)clearTimeout(_0x369221);_0x8d09da();};_0x161554[_0x233f3d(0xd5)](_0x233f3d(0xb4),_0x101722);const _0x369221=setTimeout(()=>{const _0x135373=_0x233f3d;try{_0x161554[_0x135373(0x10f)][_0x135373(0xf9)]();}catch{}},_0x501452+0x1f4);_0x369221[_0x233f3d(0x184)]?.();try{_0x161554[_0x233f3d(0x18d)]();}catch{try{_0x161554[_0x233f3d(0x10f)][_0x233f3d(0xf9)]();}catch{}}})));}};return _0x4c6907;}async function _0x3d4b6b({makeOkdb:_0x416416,port:_0x2a7988}){const _0x27ca0b=_0x3350ab,_0x51a19d=await _0x416416();return _0x306a93(_0x51a19d),_0x51a19d[_0x27ca0b(0x12e)][_0x27ca0b(0x9b)](_0x2a7988);}function _0x306a93(_0x325778){const _0x5e2ea4=_0x3350ab;if(!_0x325778||_0x325778[_0x5e2ea4(0x1c2)])return;_0x325778[_0x5e2ea4(0x1c2)]=!![];try{const {OKDBChangefeed:_0x933c4f}=requireOkdbChangefeed(),_0x4720c=_0x325778[_0x5e2ea4(0x6e)];if(_0x4720c&&typeof _0x4720c[_0x5e2ea4(0x18a)]===_0x5e2ea4(0x198)){const _0x56dc02=new _0x933c4f(_0x325778);_0x56dc02['start'](),_0x4720c[_0x5e2ea4(0x18a)](_0x56dc02),_0x325778['_changefeed']=_0x56dc02;}}catch(_0x834aa9){_0x325778[_0x5e2ea4(0x153)]?.[_0x5e2ea4(0x1d1)]?.(_0x5e2ea4(0x1cc)+(_0x834aa9?.[_0x5e2ea4(0x6c)]??_0x834aa9),{'feature':_0x5e2ea4(0xeb)});}const _0x298b49=_0x48f5a4=>{const _0x332f86=_0x5e2ea4;if(!_0x48f5a4||typeof _0x48f5a4!==_0x332f86(0x191)||_0x48f5a4[_0x2e49aa]==null)return;if(_0x48f5a4[_0x2e49aa]===_0x394b29)try{_0x325778[_0x332f86(0x6e)]?.[_0x332f86(0x82)]?.(_0x48f5a4['event'],_0x48f5a4[_0x332f86(0x117)]);}catch{}};process['on'](_0x5e2ea4(0x6c),_0x298b49),_0x325778[_0x5e2ea4(0x1ab)]=_0x298b49;{let _0x185d8d=process[_0x5e2ea4(0x1a4)](),_0x1575c0=Date['now']();const _0x5bdbaa=()=>{const _0x15a7ba=_0x5e2ea4;if(typeof process[_0x15a7ba(0x174)]!=='function'||!process[_0x15a7ba(0x1f8)])return;const _0x145cf7=Date[_0x15a7ba(0x97)](),_0x193fce=process[_0x15a7ba(0x1a4)](),_0x341887=(_0x145cf7-_0x1575c0)*0x3e8,_0x546480=_0x193fce[_0x15a7ba(0x88)]-_0x185d8d['user']+(_0x193fce[_0x15a7ba(0x1bb)]-_0x185d8d[_0x15a7ba(0x1bb)]),_0x55351c=_0x341887>0x0?Math['min'](0x64,Math['round'](_0x546480/(_0x341887*(_0x3f9272[_0x15a7ba(0x1d3)]()[_0x15a7ba(0x72)]||0x1))*0x64)):0x0;_0x185d8d=_0x193fce,_0x1575c0=_0x145cf7;const _0x15de6c=process[_0x15a7ba(0xcb)]();try{process[_0x15a7ba(0x174)]({[_0x2e49aa]:_0x132dfd,'stats':{'rss':_0x15de6c['rss'],'heapUsed':_0x15de6c[_0x15a7ba(0xc0)],'heapTotal':_0x15de6c[_0x15a7ba(0x111)],'external':_0x15de6c[_0x15a7ba(0x12d)],'cpuPct':_0x55351c,'cpuWindowMs':Math[_0x15a7ba(0x150)](_0x341887/0x3e8)||null}});}catch{}},_0x2ebd16=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3233c7=setInterval(_0x5bdbaa,_0x2ebd16);_0x3233c7[_0x5e2ea4(0x184)]?.(),_0x5bdbaa();}let _0x5e5e0f=![];const _0x249b07=async _0x47683d=>{const _0x320a32=_0x5e2ea4;if(_0x5e5e0f)return;_0x5e5e0f=!![];const _0x2a1d6a=setTimeout(()=>process[_0x320a32(0xb4)](_0x47683d),_0x501452);_0x2a1d6a['unref']?.();try{await _0x325778[_0x320a32(0x134)]?.();}catch{}process[_0x320a32(0xb4)](_0x47683d);};process['on'](_0x5e2ea4(0x18d),()=>_0x249b07(0x0));if(process[_0x5e2ea4(0x1ac)]!==_0x5e2ea4(0x18e)){const _0x52ee73=setInterval(()=>{const _0x5f55e8=_0x5e2ea4;if(process[_0x5f55e8(0x9f)]===0x1)_0x249b07(0x0);},_0x28d8bc);_0x52ee73['unref']?.(),_0x325778[_0x5e2ea4(0x11d)]=_0x52ee73;}}return okdbCluster={'runClustered':_0x3a93d7,'attachWorkerCluster':_0x306a93},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x59aa1f=_0xd218e;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x3501d6=require$$0$3,{attachWorkerCluster:_0x319402}=requireOkdbCluster();async function _0x30d62e(){const _0x3e8f9b=_0x2a26,_0x29e3c5=process.env.OKDB_HTTP_CHILD;if(!_0x29e3c5)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0x37e54e,port:_0x197b45,options:options={},logLevel:logLevel=_0x3e8f9b(0xe2)}=JSON['parse'](_0x29e3c5);if(!_0x37e54e||!_0x197b45)throw new Error(_0x3e8f9b(0x1ff));const _0x3f47cb=new _0x3501d6(_0x37e54e,{...options,'engines':![],'asyncProcessors':![],'compaction':_0x3e8f9b(0x1e5),'bus':!![]});_0x3f47cb[_0x3e8f9b(0x153)][_0x3e8f9b(0x10c)]?.();const _0x53f897=process.env.OKDB_CLUSTER_SLOT??'?',_0x4bd66a={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x26951f=_0x4bd66a[logLevel]??_0x4bd66a['info'];_0x3f47cb[_0x3e8f9b(0x153)][_0x3e8f9b(0xf8)](_0x19b940=>{const _0x4b1fe4=_0x3e8f9b;if((_0x4bd66a[_0x19b940['level']]??0x1)<_0x26951f)return;try{process[_0x4b1fe4(0x174)]?.({'__okdbCluster':_0x4b1fe4(0x153),'slot':_0x53f897,'pid':process[_0x4b1fe4(0x92)],'entry':_0x19b940});}catch{}}),await _0x3f47cb['open'](),_0x319402(_0x3f47cb),await _0x3f47cb[_0x3e8f9b(0x12e)]['listen'](_0x197b45);}return _0x30d62e()[_0x59aa1f(0x1e3)](_0xb59547=>{const _0x2a20e5=_0x59aa1f;try{process[_0x2a20e5(0x174)]?.({'__okdbCluster':_0x2a20e5(0x153),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x2a20e5(0x92)],'entry':{'level':_0x2a20e5(0x100),'msg':_0x2a20e5(0x1e9)+(_0xb59547?.[_0x2a20e5(0x6c)]??_0xb59547)}});}catch{}process[_0x2a20e5(0xb4)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0xd218e(0x73)]=okdbHttpWorkerChild;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0xc249a0=_0x46a5;(function(_0x20a04a,_0x4d55be){const _0x56f397=_0x46a5,_0x32eed1=_0x20a04a();while(!![]){try{const _0x5ac2f6=parseInt(_0x56f397(0x140))/0x1+parseInt(_0x56f397(0x15a))/0x2*(parseInt(_0x56f397(0x150))/0x3)+parseInt(_0x56f397(0x156))/0x4*(-parseInt(_0x56f397(0x168))/0x5)+-parseInt(_0x56f397(0x16b))/0x6+parseInt(_0x56f397(0x130))/0x7+-parseInt(_0x56f397(0x14b))/0x8*(-parseInt(_0x56f397(0x12b))/0x9)+-parseInt(_0x56f397(0x136))/0xa;if(_0x5ac2f6===_0x4d55be)break;else _0x32eed1['push'](_0x32eed1['shift']());}catch(_0x5fcf91){_0x32eed1['push'](_0x32eed1['shift']());}}}(_0x3c9d,0x6864a));var require$$0=require(_0xc249a0(0x131)),require$$1=require(_0xc249a0(0x13c));function getDefaultExportFromCjs(_0x38b93d){const _0xed41ab=_0xc249a0;return _0x38b93d&&_0x38b93d[_0xed41ab(0x127)]&&Object['prototype'][_0xed41ab(0x13b)][_0xed41ab(0x15e)](_0x38b93d,_0xed41ab(0x133))?_0x38b93d[_0xed41ab(0x133)]:_0x38b93d;}function _0x46a5(_0x3f0b22,_0x138fa1){_0x3f0b22=_0x3f0b22-0x11b;const _0x3c9d5a=_0x3c9d();let _0x46a52a=_0x3c9d5a[_0x3f0b22];return _0x46a52a;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x491feb=_0xc249a0;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x308de4={'PUT':_0x491feb(0x15f),'REMOVE':_0x491feb(0x125),'INDEX_DROP':_0x491feb(0x13a),'INDEX_REGISTER':_0x491feb(0x152),'INDEX_RESET':_0x491feb(0x147),'TYPE_REGISTER':_0x491feb(0x155),'TYPE_DROP':_0x491feb(0x122),'FTS_REGISTER':'registerFts','FTS_DROP':'dropFts','FTS_RESET':_0x491feb(0x132),'SCHEMA_SET':_0x491feb(0x11c),'SCHEMA_DROP':_0x491feb(0x12c),'TTL_SET':_0x491feb(0x135),'TTL_CLEAR':_0x491feb(0x123)},_0x3eec1a={'SYSTEM_READY':_0x491feb(0x11b),'SYSTEM_STOPPED':_0x491feb(0x146),'SYSTEM_CLOCK_CHANGE':_0x491feb(0x145),'SYSTEM_POKE':_0x491feb(0x15b),'SYSTEM_DRAIN':_0x491feb(0x141),'SYSTEM_TYPE_DROP':_0x491feb(0x13f),'SYSTEM_PROC':_0x491feb(0x148),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':_0x491feb(0x128),'ITEM_REMOVE':_0x491feb(0x160),'INDEX_RESET':_0x491feb(0x14f),'INDEX_READY':_0x491feb(0x161),'INDEX_PROGRESS':_0x491feb(0x121),'VIEW_PROGRESS':_0x491feb(0x11d),'INDEX_DROP':'index:drop','INDEX_REGISTERED':'index:registered','FTS_REGISTERED':'fts:registered','FTS_DROP':_0x491feb(0x15d),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x491feb(0x158),'SCHEMA_DROP':_0x491feb(0x139),'UNIQUE_VIOLATION':_0x491feb(0x12f),'UNIQUE_VIOLATION_RESOLVED':_0x491feb(0x143),'REF_VIOLATION':_0x491feb(0x16c),'REF_VIOLATION_RESOLVED':_0x491feb(0x149),'SYNC_APPLY':_0x491feb(0x164),'TXN_START':'txn:start','TXN_END':_0x491feb(0x15c),'TXN_ROLLBACK':_0x491feb(0x11e),'TYPE_REGISTERED':_0x491feb(0x13e),'TYPE_DROP':_0x491feb(0x14d),'ENV_OPENED':_0x491feb(0x138),'ENV_REMOVED':_0x491feb(0x167),'TTL_EXPIRED':'ttl:expired','TTL_SET':'ttl:set','TTL_CLEAR':_0x491feb(0x134),'LICENSE_INVALID':_0x491feb(0x169),'LICENSE_ADDED':_0x491feb(0x120),'LICENSE_ACTIVATED':_0x491feb(0x166),'LICENSE_REMOVED':_0x491feb(0x162)},_0x1a780a={'CREATING':_0x491feb(0x13d),'RESETTING':_0x491feb(0x159),'READY':'ready','DROPPING':'dropping','WAITING':'waiting'},_0x4cf705={'CREATED':_0x491feb(0x142),'STARTING':_0x491feb(0x12d),'STARTED':_0x491feb(0x163),'STOPPING':_0x491feb(0x144),'STOPPED':_0x491feb(0x16a)},_0x11b14a={'CREATING':_0x491feb(0x13d),'READY':'ready','HALTED':_0x491feb(0x137),'STOPPED':_0x491feb(0x16a),'RESETTING':'resetting'},_0x21c933=Object[_0x491feb(0x12e)]({'POKE':_0x491feb(0x14e),'DRAIN':_0x491feb(0x11f),'TYPE_DROP':'bus:type_drop','PROC':_0x491feb(0x126)});return okdbEnums={'BUS_EVENTS':_0x21c933,'CHANGE_ACTIONS':_0x308de4,'EVENTS':_0x3eec1a,'INDEX_STATE':_0x1a780a,'OKDB_STATE':_0x4cf705,'VIEW_STATE':_0x11b14a},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x2cfb6e=_0xc249a0;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x4f5b0d,workerData:_0x5d6dd4}=require$$0,_0x283a47=require$$1,{EVENTS:_0x5aef2b}=requireOkdbEnums();async function _0x3ac427(){const _0x590d0c=_0x46a5,{rootPath:_0x947af6,envName:_0x34b57c,viewName:_0x3525e4,definition:_0x134598}=_0x5d6dd4,_0x8e27bb=new _0x283a47(_0x947af6,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'asyncProcessors':![],'compaction':_0x590d0c(0x165),'_skipBootRuntime':!![]});await _0x8e27bb['open']();const _0x2d4326=_0x8e27bb[_0x590d0c(0x124)](_0x34b57c);_0x2d4326[_0x590d0c(0x157)]['on'](_0x5aef2b['VIEW_PROGRESS'],_0x16f747=>{if(_0x16f747?.['name']!==_0x3525e4)return;try{_0x4f5b0d['postMessage']({'type':'progress','event':_0x16f747});}catch{}}),_0x2d4326[_0x590d0c(0x14c)]['_activateViewStorage'](_0x3525e4,_0x134598),await _0x2d4326[_0x590d0c(0x14c)]['_runBootstrapScanPhases'](_0x3525e4,_0x134598),_0x4f5b0d[_0x590d0c(0x153)]({'type':'done'}),await _0x8e27bb['close'](),process[_0x590d0c(0x129)](0x0);}return _0x3ac427()[_0x2cfb6e(0x154)](_0x1f4623=>{const _0x49aa30=_0x2cfb6e;try{_0x4f5b0d[_0x49aa30(0x153)]({'type':_0x49aa30(0x151),'error':_0x1f4623['message']??String(_0x1f4623),'stack':_0x1f4623[_0x49aa30(0x12a)]});}catch{}process[_0x49aa30(0x129)](0x1);}),okdbViewsBootstrapWorker$1;}function _0x3c9d(){const _0x2040ec=['remove','bus:proc','__esModule','item:update','exit','stack','126QptZLx','dropSchema','starting','freeze','unique:violation','2779693pxJqqw','worker_threads','resetFts','default','ttl:clear','setTtl','9673670ooVvqn','halted','env:opened','schema:drop','dropIndex','hasOwnProperty','./okdb','creating','type:registered','system:type_drop','724749FcJUaQ','system:drain','created','unique:violation_resolved','stopping','system:clock_change','system:stopped','resetIndex','system:proc','ref:violation_resolved','exports','440808ZLHKYt','views','type:drop','bus:poke','index:reset','159711DBVIBD','error','registerIndex','postMessage','catch','registerType','1492uwpXAP','events','schema:set','resetting','22HVozXm','system:poke','txn:end','fts:drop','call','put','item:remove','index:ready','license:removed','started','sync:apply','passive','license:activated','env:removed','5585AZZqFu','license:invalid','stopped','4003602PsCctL','ref:violation','system:ready','setSchema','view:progress','txn:rollback','bus:drain','license:added','index:progress','dropType','clearTtl','env'];_0x3c9d=function(){return _0x2040ec;};return _0x3c9d();}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0xc249a0(0x14a)]=okdbViewsBootstrapWorker;
|