@kedem/okdb 2.0.4 → 2.1.0

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 _0x337619=_0x58e7;(function(_0x45e061,_0x1e302d){const _0x296fd0=_0x58e7,_0x14e8a5=_0x45e061();while(!![]){try{const _0x1d39e4=-parseInt(_0x296fd0(0x289))/0x1+-parseInt(_0x296fd0(0x2aa))/0x2*(-parseInt(_0x296fd0(0x187))/0x3)+parseInt(_0x296fd0(0x13f))/0x4+parseInt(_0x296fd0(0x282))/0x5+parseInt(_0x296fd0(0x2dd))/0x6*(parseInt(_0x296fd0(0x24b))/0x7)+-parseInt(_0x296fd0(0x20a))/0x8*(-parseInt(_0x296fd0(0x1a2))/0x9)+-parseInt(_0x296fd0(0x1d4))/0xa;if(_0x1d39e4===_0x1e302d)break;else _0x14e8a5['push'](_0x14e8a5['shift']());}catch(_0x13d360){_0x14e8a5['push'](_0x14e8a5['shift']());}}}(_0x1400,0xc119a));var require$$0$5=require('./okdb'),require$$1$1=require(_0x337619(0x210)),require$$1=require('path'),require$$0$3=require('os'),require$$2=require(_0x337619(0x134)),require$$0=require(_0x337619(0x1bf)),require$$0$2=require('perf_hooks'),require$$0$1=require('fs'),require$$0$4=require(_0x337619(0x1be));function getDefaultExportFromCjs(_0x14d3fa){const _0x568c5d=_0x337619;return _0x14d3fa&&_0x14d3fa[_0x568c5d(0x350)]&&Object[_0x568c5d(0x239)]['hasOwnProperty'][_0x568c5d(0x146)](_0x14d3fa,'default')?_0x14d3fa[_0x568c5d(0x285)]:_0x14d3fa;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x36ab67=_0x337619;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x167ac9={'PUT':_0x36ab67(0x129),'REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x36ab67(0x234),'TYPE_REGISTER':'registerType','TYPE_DROP':_0x36ab67(0x1af),'FTS_REGISTER':_0x36ab67(0x236),'FTS_DROP':_0x36ab67(0x272),'FTS_RESET':_0x36ab67(0x18b),'SCHEMA_SET':_0x36ab67(0x1e9),'SCHEMA_DROP':_0x36ab67(0x14e),'TTL_SET':_0x36ab67(0x1fb),'TTL_CLEAR':_0x36ab67(0x1ce)},_0x324657={'SYSTEM_READY':_0x36ab67(0x2cc),'SYSTEM_STOPPED':_0x36ab67(0x34a),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x36ab67(0x307),'SYSTEM_DRAIN':_0x36ab67(0x16b),'SYSTEM_TYPE_DROP':_0x36ab67(0x26c),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x36ab67(0x265),'ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':'index:reset','INDEX_READY':_0x36ab67(0x153),'INDEX_PROGRESS':_0x36ab67(0x221),'VIEW_PROGRESS':_0x36ab67(0x309),'INDEX_DROP':_0x36ab67(0x27d),'INDEX_REGISTERED':_0x36ab67(0x209),'FTS_REGISTERED':_0x36ab67(0x1bd),'FTS_DROP':_0x36ab67(0x180),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x36ab67(0x2db),'SCHEMA_DROP':_0x36ab67(0x1b2),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x36ab67(0x29e),'SYNC_APPLY':_0x36ab67(0x15e),'TXN_START':_0x36ab67(0x18e),'TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x36ab67(0x337),'TYPE_DROP':_0x36ab67(0x255),'ENV_OPENED':_0x36ab67(0x1f7),'ENV_REMOVED':_0x36ab67(0x2e9),'SYSTEM_ENV_RELEASE':_0x36ab67(0x31c),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x36ab67(0x2d0),'TTL_CLEAR':_0x36ab67(0x179),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x36ab67(0x28c),'LICENSE_ACTIVATED':_0x36ab67(0x206),'LICENSE_REMOVED':_0x36ab67(0x235)},_0xc8eca3={'CREATING':_0x36ab67(0x16c),'RESETTING':_0x36ab67(0x271),'READY':_0x36ab67(0x243),'DROPPING':_0x36ab67(0x1e6),'WAITING':_0x36ab67(0x185)},_0x56375b={'CREATED':_0x36ab67(0x25c),'STARTING':'starting','STARTED':_0x36ab67(0x1aa),'STOPPING':_0x36ab67(0x1cd),'STOPPED':'stopped'},_0x38316d={'CREATING':_0x36ab67(0x16c),'READY':_0x36ab67(0x243),'HALTED':_0x36ab67(0x1cf),'STOPPED':_0x36ab67(0x204),'RESETTING':_0x36ab67(0x271)},_0x514fa7=Object[_0x36ab67(0x214)]({'POKE':_0x36ab67(0x2ec),'DRAIN':_0x36ab67(0x16f),'TYPE_DROP':_0x36ab67(0x335),'PROC':_0x36ab67(0x29c),'ENV_RELEASE':_0x36ab67(0x2f1)});return okdbEnums={'BUS_EVENTS':_0x514fa7,'CHANGE_ACTIONS':_0x167ac9,'EVENTS':_0x324657,'INDEX_STATE':_0xc8eca3,'OKDB_STATE':_0x56375b,'VIEW_STATE':_0x38316d},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x2af6e2=_0x337619;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x538b4c,performance:_0x4ea8b4}=require$$0,_0x341ffd=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x2af6e2(0x325),_0x121401=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x1ee0dd=process.env.OKDB_LOOP_LAG_ALL==='1',_0x1137c8=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x2b7252{constructor(){const _0x40f9ab=_0x2af6e2;this[_0x40f9ab(0x2fb)]=_0x341ffd,this[_0x40f9ab(0x287)]=new Map(),this['_h']=null,this[_0x40f9ab(0x178)]=null,this[_0x40f9ab(0x227)]=![],this[_0x40f9ab(0x19d)]=(_0x344409,_0x253d52)=>process[_0x40f9ab(0x12f)][_0x40f9ab(0x1c7)](_0x344409+(_0x253d52?'\x20'+JSON[_0x40f9ab(0x15a)](_0x253d52):'')+'\x0a');}[_0x2af6e2(0x348)](){const _0x2badc2=_0x2af6e2;return _0x4ea8b4[_0x2badc2(0x348)]();}[_0x2af6e2(0x208)](_0x517a5d){const _0x41c2e4=_0x2af6e2;if(typeof _0x517a5d===_0x41c2e4(0x1b8))this['_log']=_0x517a5d;}[_0x2af6e2(0x30f)](_0x333b28,_0x751e6c,_0x16bb27){const _0x45e8e9=_0x2af6e2;if(!this[_0x45e8e9(0x2fb)])return;let _0x559f57=this[_0x45e8e9(0x287)][_0x45e8e9(0x1fd)](_0x333b28);!_0x559f57&&(_0x559f57={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x45e8e9(0x287)][_0x45e8e9(0x217)](_0x333b28,_0x559f57)),_0x559f57['ms']+=_0x751e6c,_0x559f57['count']+=0x1,_0x751e6c>_0x559f57[_0x45e8e9(0x219)]&&(_0x559f57['maxMs']=_0x751e6c,_0x559f57[_0x45e8e9(0x124)]=_0x16bb27||'');}[_0x2af6e2(0x1e1)](_0x15f688){const _0x4c1e29=_0x2af6e2;if(!this[_0x4c1e29(0x2fb)]||this[_0x4c1e29(0x227)])return;this['_started']=!![];if(_0x15f688)this[_0x4c1e29(0x19d)]=_0x15f688;this['_h']=_0x538b4c({'resolution':0xa}),this['_h']['enable'](),this['_timer']=setInterval(()=>this[_0x4c1e29(0x2b2)](),_0x121401);if(this['_timer']['unref'])this[_0x4c1e29(0x178)][_0x4c1e29(0x195)]();}[_0x2af6e2(0x24f)](_0x43a1ec){const _0x3e6671=_0x2af6e2;if(!this[_0x3e6671(0x2f6)])this['_windowCbs']=new Set();this[_0x3e6671(0x2f6)][_0x3e6671(0x1ff)](_0x43a1ec);if(!this['_started'])this[_0x3e6671(0x2e7)]();}[_0x2af6e2(0x19b)](_0xd69815){const _0x5eb90f=_0x2af6e2;this[_0x5eb90f(0x2f6)]?.['delete'](_0xd69815);}[_0x2af6e2(0x2e7)](){const _0x1231f2=_0x2af6e2;if(this[_0x1231f2(0x2d5)])return;this[_0x1231f2(0x2d5)]=!![];!this['_h']&&(this['_h']=_0x538b4c({'resolution':0xa}),this['_h'][_0x1231f2(0x298)]());const _0x541615=_0x121401;this[_0x1231f2(0x224)]=setInterval(()=>{const _0x29c3ec=_0x1231f2,_0x5eeb32=this['_h'];if(!_0x5eeb32)return;const _0x58f037=_0x5eeb32[_0x29c3ec(0x154)](0x63)/0xf4240,_0x1f060=_0x5eeb32['max']/0xf4240,_0x47f166=_0x5eeb32[_0x29c3ec(0x173)]/0xf4240;_0x5eeb32[_0x29c3ec(0x190)]();if(this[_0x29c3ec(0x2f6)])for(const _0x32a2eb of this[_0x29c3ec(0x2f6)]){try{_0x32a2eb({'p99Ms':_0x58f037,'maxMs':_0x1f060,'meanMs':_0x47f166,'reportMs':_0x541615});}catch{}}},_0x541615);if(this[_0x1231f2(0x224)][_0x1231f2(0x195)])this['_admissionTimer']['unref']();}[_0x2af6e2(0x2b2)](){const _0x7d9d3b=_0x2af6e2,_0x5a03b2=this['_h'],_0x2aceab=_0x5a03b2[_0x7d9d3b(0x17a)]/0xf4240,_0x1bedb6=_0x5a03b2['percentile'](0x63)/0xf4240,_0x3d44b5=_0x5a03b2[_0x7d9d3b(0x173)]/0xf4240;_0x5a03b2['reset']();const _0xebe30b=[...this[_0x7d9d3b(0x287)]['entries']()]['map'](([_0x225611,_0x34b840])=>({'label':_0x225611,..._0x34b840}))[_0x7d9d3b(0x192)]((_0x40cf07,_0x110697)=>_0x110697['ms']-_0x40cf07['ms'])[_0x7d9d3b(0x244)](0x0,0x8);this[_0x7d9d3b(0x287)][_0x7d9d3b(0x326)]();const _0x392bcd=_0xebe30b[_0x7d9d3b(0x142)]((_0x5dd604,_0x1629c2)=>_0x5dd604+_0x1629c2['ms'],0x0),_0x4333f9=_0xebe30b['map'](_0x5b7282=>_0x5b7282[_0x7d9d3b(0x17d)]+'='+_0x5b7282['ms'][_0x7d9d3b(0x186)](0x0)+_0x7d9d3b(0x1ac)+_0x5b7282[_0x7d9d3b(0x2a1)]+(_0x5b7282['maxMs']>0x5?_0x7d9d3b(0x34d)+_0x5b7282[_0x7d9d3b(0x219)][_0x7d9d3b(0x186)](0x0)+'ms'+(_0x5b7282['maxExtra']?'\x20'+_0x5b7282[_0x7d9d3b(0x124)]:'')+')':''));(_0x1ee0dd||_0x2aceab>=_0x1137c8)&&this['_log']('loop-lag\x20'+_0x121401+_0x7d9d3b(0x21d)+_0x2aceab[_0x7d9d3b(0x186)](0x0)+_0x7d9d3b(0x299)+_0x1bedb6[_0x7d9d3b(0x186)](0x0)+'ms\x20mean='+_0x3d44b5[_0x7d9d3b(0x186)](0x0)+_0x7d9d3b(0x14f)+_0x392bcd['toFixed'](0x0)+'ms'+(_0x4333f9['length']?_0x7d9d3b(0x1ee)+_0x4333f9[_0x7d9d3b(0x159)]('\x20\x20'):''),{'feature':_0x7d9d3b(0x18c)});if(this[_0x7d9d3b(0x2f6)])for(const _0x53d4f0 of this['_windowCbs']){try{_0x53d4f0({'p99Ms':_0x1bedb6,'maxMs':_0x2aceab,'meanMs':_0x3d44b5,'reportMs':_0x121401});}catch{}}}['stop'](){const _0x195130=_0x2af6e2;if(this[_0x195130(0x178)])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x195130(0x156)]();this[_0x195130(0x178)]=null,this['_h']=null,this['_started']=![];}}const _0x5e06b6=new _0x2b7252();if(_0x5e06b6[_0x2af6e2(0x2fb)])_0x5e06b6[_0x2af6e2(0x1e1)]();return okdbLoopMonitor={'LOOP':_0x5e06b6},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2d4dc4=require$$0$1,_0x6870d2=require$$1;let _0x5e4d7b,_0x277110,_0x581192,_0xca298e,_0x2d9e04,_0x466fe8,_0x2151c3,_0x583a56=![];const _0x446276=new Set();let _0x5e5a17=null;const _0x4e4fb4=new Map();function _0x299311(){const _0x42e5f8=_0x58e7;if(_0x5e4d7b!==undefined)return _0x5e4d7b;_0x5e4d7b=process.env.OKDB_DIAG==='1';if(!_0x5e4d7b)return![];_0x277110=process.env.OKDB_DIAG_STACK==='1',_0xca298e=Math[_0x42e5f8(0x17a)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x581192=new Array(_0xca298e),_0x2d9e04=0x0,_0x466fe8=0x0,_0x2151c3=process.env.OKDB_DIAG_DIR||null;if(_0x2151c3)try{_0x2d4dc4[_0x42e5f8(0x20f)](_0x2151c3,{'recursive':!![]});}catch{}return!![];}function _0x57d88c(){return _0x5e4d7b===undefined?_0x299311():_0x5e4d7b;}function _0x4c72a3(_0x4ebd77,_0x33bee8){const _0x5f4b98=_0x58e7;if(_0x5e4d7b===undefined?!_0x299311():!_0x5e4d7b)return;let _0x5f3c48;if(_0x277110){const _0x3b0a7f=new Error()['stack']||'';_0x5f3c48=_0x3b0a7f[_0x5f4b98(0x16a)]('\x0a')[_0x5f4b98(0x244)](0x3)[_0x5f4b98(0x33e)](_0x388b57=>_0x388b57[_0x5f4b98(0x1d0)]())['filter'](Boolean)[_0x5f4b98(0x244)](0x0,0x8);}_0x581192[_0x2d9e04]={'seq':_0x466fe8++,'t':Date[_0x5f4b98(0x348)](),'env':_0x4ebd77,'kind':_0x33bee8||_0x5f4b98(0x160),'stack':_0x5f3c48},_0x2d9e04=(_0x2d9e04+0x1)%_0xca298e;}function _0x54b482(_0x48fbfe){const _0x4f1eaa=_0x58e7,_0x2e15a2=[];for(let _0x2c5124=0x0;_0x2c5124<_0xca298e;_0x2c5124++){const _0xbbb62a=_0x581192[(_0x2d9e04-0x1-_0x2c5124+_0xca298e*0x2)%_0xca298e];if(!_0xbbb62a)continue;_0x2e15a2['push'](_0xbbb62a);if(_0x2e15a2[_0x4f1eaa(0x149)]>=_0x48fbfe)break;}return _0x2e15a2;}function _0x1aedc5(_0x196d53){const _0x39ba36=_0x58e7;try{process[_0x39ba36(0x12f)]['write'](_0x196d53+'\x0a');}catch{}if(_0x2151c3)try{_0x2d4dc4[_0x39ba36(0x176)](_0x6870d2[_0x39ba36(0x159)](_0x2151c3,_0x39ba36(0x1c3)+process[_0x39ba36(0x1a8)]+_0x39ba36(0x128)),_0x196d53+'\x0a');}catch{}}function _0x5c0a02(_0x157321){const _0x4eb39c=_0x58e7,_0x57e84c=_0x54b482(_0x157321);if(!_0x57e84c[_0x4eb39c(0x149)])return _0x4eb39c(0x1f5);const _0x4f622f=Date[_0x4eb39c(0x348)]();return _0x57e84c[_0x4eb39c(0x33e)](_0x28e26f=>{const _0x51f7c1=_0x4eb39c,_0xf03f19=_0x51f7c1(0x2a4)+_0x28e26f[_0x51f7c1(0x31b)]+'\x20-'+(_0x4f622f-_0x28e26f['t'])+_0x51f7c1(0x26e)+_0x28e26f[_0x51f7c1(0x21a)]+'\x20'+_0x28e26f[_0x51f7c1(0x250)];return _0x28e26f['stack']&&_0x28e26f['stack'][_0x51f7c1(0x149)]?_0xf03f19+_0x51f7c1(0x13d)+_0x28e26f['stack'][_0x51f7c1(0x159)](_0x51f7c1(0x13d)):_0xf03f19;})['join']('\x0a');}function _0x1b7281(_0x125853,_0x57a549){const _0x35af9b=_0x58e7,_0x2fc6e5=_0x35af9b(0x2c8)+_0x125853+_0x35af9b(0x31d)+new Date()[_0x35af9b(0x189)]()+_0x35af9b(0x151)+process['pid']+_0x35af9b(0x194),_0x32bc05=[_0x2fc6e5,'error:\x20'+(_0x57a549&&_0x57a549[_0x35af9b(0x220)]?_0x57a549[_0x35af9b(0x220)][_0x35af9b(0x16a)]('\x0a')[0x0]:_0x57a549),'recent\x20writes\x20(newest\x20first)'+(_0x277110?'':_0x35af9b(0x172))+':',_0x5c0a02(0x18),_0x5f4520(),'='[_0x35af9b(0x344)](_0x2fc6e5['length']-0x1)];_0x1aedc5(_0x32bc05[_0x35af9b(0x159)]('\x0a'));}function _0x45f666(_0x2f09bb){const _0x15ffbd=_0x58e7;if(!_0x57d88c())return;const _0xf9c496=String(_0x2f09bb&&_0x2f09bb['message']||_0x2f09bb||''),_0x444a8e=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x15ffbd(0x34c)](_0xf9c496);_0x1b7281(_0x444a8e?_0x15ffbd(0x20d):_0x15ffbd(0x1b9),_0x2f09bb);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x444a8e)return;try{console[_0x15ffbd(0x2c5)](_0x2f09bb&&_0x2f09bb[_0x15ffbd(0x220)]?_0x2f09bb[_0x15ffbd(0x220)]:_0x2f09bb);}catch{}process[_0x15ffbd(0x2c3)](0x1);}function _0x31aac3(_0x4475f2){const _0x587de2=_0x58e7;if(!_0x57d88c())return;const _0xb0dd4d=String(_0x4475f2&&_0x4475f2[_0x587de2(0x188)]||_0x4475f2||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x587de2(0x34c)](_0xb0dd4d)&&_0x1b7281('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x4475f2);}function _0x5f4520(){const _0x20c330=_0x58e7,_0x18e5b1=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x4de020=![];for(const _0x24aace of _0x446276){const _0x44ff57=_0x24aace&&_0x24aace[_0x20c330(0x31a)];if(!_0x44ff57)continue;for(const [_0x51ae09,_0x1e8921]of _0x44ff57){const _0x2cb115=_0x1e8921&&_0x1e8921[_0x20c330(0x27c)]&&_0x1e8921['_coordinator'][_0x20c330(0x148)];if(!_0x2cb115)continue;let _0x4cbce6,_0x3a8e53;try{_0x4cbce6=Atomics['load'](_0x2cb115,0x0),_0x3a8e53=Atomics[_0x20c330(0x169)](_0x2cb115,0x1);}catch{continue;}if(_0x4cbce6===0x0)continue;_0x4de020=!![];const _0x315739=_0x4cbce6>0x0?_0x20c330(0x34b):_0x20c330(0x2c7),_0x1fb8f8=Date[_0x20c330(0x348)]()-Math[_0x20c330(0x2b8)](_0x4cbce6)*0x3e8,_0x2ae27c=((()=>{const _0x35f657=_0x20c330;try{return _0x1e8921[_0x35f657(0x30d)]&&_0x1e8921[_0x35f657(0x30d)]['status']?_0x1e8921[_0x35f657(0x30d)][_0x35f657(0x29d)]():null;}catch{return null;}})());_0x18e5b1[_0x20c330(0x1b4)](_0x20c330(0x2bd)+_0x51ae09+'\x20phase='+_0x315739+_0x20c330(0x1a0)+_0x1fb8f8+_0x20c330(0x319)+_0x3a8e53+(_0x2ae27c?_0x20c330(0x2af)+_0x2ae27c[_0x20c330(0x196)]+'\x20oldestPendingMs='+_0x2ae27c[_0x20c330(0x203)]+'\x20parkedNow='+_0x2ae27c[_0x20c330(0x33d)]+'}':''));}}if(!_0x4de020)_0x18e5b1[_0x20c330(0x1b4)](_0x20c330(0x25f));return _0x18e5b1[_0x20c330(0x159)]('\x0a');}function _0x32205b(){const _0x23cb3a=_0x58e7;if(!_0x57d88c())return;const _0x388ab1=Math[_0x23cb3a(0x17a)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x412565=Date[_0x23cb3a(0x348)]();for(const _0x226daa of _0x446276){const _0x355e14=_0x226daa&&_0x226daa['_envs'];if(!_0x355e14)continue;for(const [_0x4f67ad,_0x14fdaa]of _0x355e14){const _0x316813=_0x14fdaa&&_0x14fdaa[_0x23cb3a(0x27c)]&&_0x14fdaa[_0x23cb3a(0x27c)][_0x23cb3a(0x148)];if(!_0x316813)continue;let _0x4b08ce;try{_0x4b08ce=Atomics[_0x23cb3a(0x169)](_0x316813,0x0);}catch{continue;}const _0x2037e6=_0x226daa['path']+'|'+_0x4f67ad;if(_0x4b08ce<=0x0){_0x4e4fb4[_0x23cb3a(0x23f)](_0x2037e6);continue;}const _0x67798f=_0x412565-_0x4b08ce*0x3e8,_0x454d54=_0x4e4fb4[_0x23cb3a(0x1fd)](_0x2037e6);if(_0x67798f<_0x388ab1)continue;if(_0x454d54&&_0x412565-_0x454d54[_0x23cb3a(0x167)]<_0x388ab1)continue;_0x4e4fb4['set'](_0x2037e6,{'firstTs':_0x454d54?_0x454d54[_0x23cb3a(0x1dc)]:_0x4b08ce,'dumpedAt':_0x412565});const _0x4cd9ac=_0x23cb3a(0x12b)+_0x67798f+_0x23cb3a(0x308)+_0x4f67ad+_0x23cb3a(0x31d)+new Date()['toISOString']()+_0x23cb3a(0x151)+process[_0x23cb3a(0x1a8)]+_0x23cb3a(0x194);_0x1aedc5([_0x4cd9ac,_0x5f4520(),'='['repeat'](_0x4cd9ac[_0x23cb3a(0x149)]-0x1)][_0x23cb3a(0x159)]('\x0a'));}}}function _0x495287(){const _0x33a4dc=_0x58e7;if(!_0x57d88c()||_0x583a56)return;_0x583a56=!![],process[_0x33a4dc(0x135)](_0x33a4dc(0x1b9),_0x45f666),process[_0x33a4dc(0x135)](_0x33a4dc(0x33b),_0x31aac3);const _0x358611=Math[_0x33a4dc(0x17a)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x5e5a17=setInterval(_0x32205b,_0x358611);if(_0x5e5a17[_0x33a4dc(0x195)])_0x5e5a17[_0x33a4dc(0x195)]();}function _0x287da8(_0x448882){const _0x38eb16=_0x58e7;if(!_0x57d88c()||!_0x448882)return;_0x446276[_0x38eb16(0x1ff)](_0x448882),_0x495287();}function _0xc9ec48(_0x1bcd3c){_0x446276['delete'](_0x1bcd3c);}function _0x145cbd(){if(!_0x57d88c())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x277110,'recentWrites':_0x54b482(0x10),'drain':_0x5f4520()};}return okdbDiag={'isEnabled':_0x57d88c,'recordWrite':_0x4c72a3,'installDiag':_0x495287,'registerOkdb':_0x287da8,'unregisterOkdb':_0xc9ec48,'snapshot':_0x145cbd},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x1742db=_0x337619;if(hasRequiredOkdbWriter)return okdbWriter[_0x1742db(0x2c1)];hasRequiredOkdbWriter=0x1;const {performance:_0x3dadb0}=require$$0$2,_0x4e249d=requireOkdbDiag(),_0xf8fd77=process.env.OKDB_COMMIT_MODE===_0x1742db(0x174);class _0x3fd337{constructor(_0x394a11){const _0x548ed9=_0x1742db;this[_0x548ed9(0x21a)]=_0x394a11,this[_0x548ed9(0x15f)]=new Set(),this[_0x548ed9(0x1db)]=new Map(),this[_0x548ed9(0x131)]=0x0,this[_0x548ed9(0x1b0)]=[],this['_done']=[],this[_0x548ed9(0x2da)]=Math[_0x548ed9(0x17a)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x548ed9(0x293)]=0x0,this['_bpWaiters']=[],this[_0x548ed9(0x263)]=0x0;}async[_0x1742db(0x32a)](_0xd16f75,_0x2b5009){const _0x4514ac=_0x1742db;if(_0x4e249d['isEnabled']())_0x4e249d['recordWrite'](this[_0x4514ac(0x21a)]?.['name'],_0x2b5009);if(this[_0x4514ac(0x339)]){const _0x1041c7=new Error(_0x4514ac(0x14d));_0x1041c7[_0x4514ac(0x1c0)]=_0x4514ac(0x158);throw _0x1041c7;}if(this[_0x4514ac(0x2da)]>0x0){let _0x2faf8e=![];while(this[_0x4514ac(0x293)]>=this[_0x4514ac(0x2da)]&&!this[_0x4514ac(0x339)]){!_0x2faf8e&&(_0x2faf8e=!![],this[_0x4514ac(0x263)]++),await new Promise(_0x21353d=>this[_0x4514ac(0x27b)][_0x4514ac(0x1b4)](_0x21353d));}if(this[_0x4514ac(0x339)]){const _0x4bfdc7=new Error(_0x4514ac(0x14d));_0x4bfdc7['code']=_0x4514ac(0x158);throw _0x4bfdc7;}}this[_0x4514ac(0x293)]++;const _0x287aa3=this['env'][_0x4514ac(0x27c)];if(_0x287aa3)await _0x287aa3[_0x4514ac(0x164)]();if(this[_0x4514ac(0x339)]){if(_0x287aa3)_0x287aa3[_0x4514ac(0x2c9)]();this[_0x4514ac(0x293)]--;if(this[_0x4514ac(0x27b)]['length']&&this[_0x4514ac(0x293)]<this[_0x4514ac(0x2da)])this[_0x4514ac(0x27b)][_0x4514ac(0x294)]()();const _0x547b5d=new Error(_0x4514ac(0x14d));_0x547b5d[_0x4514ac(0x1c0)]=_0x4514ac(0x158);throw _0x547b5d;}const _0x1f1016=_0x3dadb0[_0x4514ac(0x348)]();if(_0xf8fd77)try{const _0x15a179=this[_0x4514ac(0x21a)]['db'][_0x4514ac(0x20c)](_0xd16f75);this['_committed']++;if(this['_durs'][_0x4514ac(0x1b4)](_0x3dadb0[_0x4514ac(0x348)]()-_0x1f1016)>0x100)this[_0x4514ac(0x1b0)][_0x4514ac(0x294)]();if(this[_0x4514ac(0x15c)][_0x4514ac(0x1b4)](_0x3dadb0[_0x4514ac(0x348)]())>0x800)this['_done'][_0x4514ac(0x294)]();return _0x15a179;}finally{this['_outstanding']--;if(this[_0x4514ac(0x27b)][_0x4514ac(0x149)]&&this['_outstanding']<this[_0x4514ac(0x2da)])this[_0x4514ac(0x27b)][_0x4514ac(0x294)]()();if(_0x287aa3)_0x287aa3[_0x4514ac(0x2c9)]();}const _0x257e8b=this[_0x4514ac(0x21a)]['db']['childTransaction'](_0xd16f75);this['_inflight'][_0x4514ac(0x1ff)](_0x257e8b),this[_0x4514ac(0x1db)][_0x4514ac(0x217)](_0x257e8b,_0x1f1016);const _0x2e8f73=()=>{const _0x41ac27=_0x4514ac;this['_inflight'][_0x41ac27(0x23f)](_0x257e8b),this['_enqueuedAt'][_0x41ac27(0x23f)](_0x257e8b),this[_0x41ac27(0x131)]++,this['_outstanding']--;this[_0x41ac27(0x27b)]['length']&&this[_0x41ac27(0x293)]<this[_0x41ac27(0x2da)]&&this['_bpWaiters'][_0x41ac27(0x294)]()();if(this[_0x41ac27(0x1b0)]['push'](_0x3dadb0['now']()-_0x1f1016)>0x100)this[_0x41ac27(0x1b0)]['shift']();if(this['_done'][_0x41ac27(0x1b4)](_0x3dadb0[_0x41ac27(0x348)]())>0x800)this[_0x41ac27(0x15c)][_0x41ac27(0x294)]();};_0x257e8b[_0x4514ac(0x248)](_0x2e8f73,_0x2e8f73);try{return await _0x257e8b;}finally{if(_0x287aa3)_0x287aa3[_0x4514ac(0x2c9)]();}}['status'](){const _0x4328f4=_0x1742db,_0x30fb28=_0x3dadb0['now']();let _0xce9a81=0x0;for(const _0x5ea3f2 of this[_0x4328f4(0x1db)]['values']()){const _0x4d145e=_0x30fb28-_0x5ea3f2;if(_0x4d145e>_0xce9a81)_0xce9a81=_0x4d145e;}let _0x351817=0x0;for(let _0x26a9ad=this[_0x4328f4(0x15c)][_0x4328f4(0x149)]-0x1;_0x26a9ad>=0x0;_0x26a9ad--){if(_0x30fb28-this[_0x4328f4(0x15c)][_0x26a9ad]>0x3e8)break;_0x351817++;}let _0x134abb=0x0;if(this['_durs'][_0x4328f4(0x149)]){const _0x5c4ea2=[...this[_0x4328f4(0x1b0)]]['sort']((_0x1cd7ec,_0x3184a5)=>_0x1cd7ec-_0x3184a5);_0x134abb=_0x5c4ea2[Math[_0x4328f4(0x278)](_0x5c4ea2['length']-0x1,Math[_0x4328f4(0x1e4)](_0x5c4ea2[_0x4328f4(0x149)]*0.99))];}return{'depth':this['_inflight']['size'],'oldestPendingMs':Math[_0x4328f4(0x143)](_0xce9a81),'committed':this[_0x4328f4(0x131)],'commitsPerSec':_0x351817,'commitP99Ms':Math[_0x4328f4(0x143)](_0x134abb),'parkedNow':this['_bpWaiters'][_0x4328f4(0x149)],'parkedTotal':this[_0x4328f4(0x263)],'highWater':this[_0x4328f4(0x2da)]};}[_0x1742db(0x2c6)](){const _0xbefbe1=_0x1742db,_0x4b0e85=_0x3dadb0[_0xbefbe1(0x348)]();return[...this[_0xbefbe1(0x1db)][_0xbefbe1(0x1c9)]()][_0xbefbe1(0x33e)](_0x4fd91c=>Math[_0xbefbe1(0x143)](_0x4b0e85-_0x4fd91c))[_0xbefbe1(0x192)]((_0x12cefa,_0x5e4762)=>_0x5e4762-_0x12cefa);}[_0x1742db(0x316)](){const _0x549605=_0x1742db;this['_closed']=!![];for(const _0x40fb4a of this[_0x549605(0x27b)]['splice'](0x0))_0x40fb4a();}async[_0x1742db(0x1c1)](){const _0x31cd6f=_0x1742db;let _0x51e7ed=0x0;while(this['_inflight'][_0x31cd6f(0x1e8)]&&_0x51e7ed++<0x3e8){await Promise[_0x31cd6f(0x32c)]([...this[_0x31cd6f(0x15f)]]);}}async[_0x1742db(0x129)](_0x120392,_0x4d932b,_0x112380,_0x517140){const _0x515344=_0x1742db;return this[_0x515344(0x32a)](()=>{const _0x5711b1=_0x515344;if(_0x517140===undefined)_0x120392['putSync'](_0x4d932b,_0x112380);else _0x120392[_0x5711b1(0x300)](_0x4d932b,_0x112380,_0x517140);},_0x515344(0x170));}async[_0x1742db(0x1f2)](_0x1f0836,_0x5c3025){const _0x321334=_0x1742db;return this[_0x321334(0x32a)](()=>_0x1f0836[_0x321334(0x29a)](_0x5c3025),_0x321334(0x313));}}async function _0x39d50d(_0x44e52b,_0x5ae566){const _0x147a14=_0x1742db;if(_0x5ae566==null)_0x5ae566=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x726599=_0x44e52b?.[_0x147a14(0x1d5)];if(!_0x726599||typeof _0x726599[_0x147a14(0x248)]!==_0x147a14(0x1b8))return;await Promise[_0x147a14(0x152)]([Promise[_0x147a14(0x21e)](_0x726599)[_0x147a14(0x183)](()=>{}),new Promise(_0x16fca0=>{const _0x17fbf0=_0x147a14,_0x1196f8=setTimeout(_0x16fca0,_0x5ae566);if(_0x1196f8[_0x17fbf0(0x195)])_0x1196f8[_0x17fbf0(0x195)]();})]);}catch{}}function _0x218c67(_0x50dd47){const _0x3caced=_0x1742db;if(_0xf8fd77)return Promise[_0x3caced(0x21e)]();const _0x3da6cb=_0x50dd47?.[_0x3caced(0x304)];return _0x3da6cb&&typeof _0x3da6cb[_0x3caced(0x248)]===_0x3caced(0x1b8)?_0x3da6cb:Promise[_0x3caced(0x21e)]();}return okdbWriter['exports']=_0x3fd337,okdbWriter[_0x1742db(0x2c1)][_0x1742db(0x266)]=_0x39d50d,okdbWriter['exports']['committed']=_0x218c67,okdbWriter[_0x1742db(0x2c1)]['SYNC_COMMITS']=_0xf8fd77,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function _0x1400(){const _0x2dd809=['single','putNode','pid','deaths','started','_collectWriterFacet','ms/','SYSTEM_PROC','\x20ipc\x20error:\x20','dropType','_durs','cursorKey','schema:drop','inspect','push','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','workers','online','function','uncaughtException','draining','openDB','_dedupeKey','fts:registered','node:events','node:perf_hooks','code','drain','external','okdb-diag.',':want','release','envsOpen','write','process','values','_lastPublishAt','processKey','running','stopping','clearTtl','halted','trim','_putRowSync','_scheduleFlush','_selfKey','10597430Xetxub','flushed','decommissioned','processor:resumed','processor:progress','_onItem','_instanceId','_enqueuedAt','firstTs','_wantDb','list','processor:ready','claimGated','start','entries','_removeRowAsync','floor','string','dropping','system','size','setSchema','~processes','respawnTimer','_released','removeNode','\x20│\x20','signalWant','object','replace','remove','epoch','caps','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','INDEX_READY','env:opened','_publishNow','_startedAt','off','setTtl','lifecycle','get','getChanges','add','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','processing','keys','oldestPendingMs','stopped','_drainOne','license:activated','slot','setLogger','index:registered','30152ebeuaz','_quantum','transactionSync','ORPHAN\x20(env-closed\x20write)','FTS_RESET','mkdirSync','cluster','cpuWindowMs','processor:retry','fromEntries','freeze','_singletonLocks','publishOwnRow','set','_nodeDead','maxMs','env','warn','value','ms\x20max=','resolve','_adminRelay','stack','index:progress','has','assign','_admissionTimer','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','processorsView','_started','functions','FTS_DROP','listAll','participate','_holderDead','send','--inspect','procmodeack/','extend','\x20(slot=','~lock','_openEnvLazy','resetIndex','license:removed','registerFts','primary','_drain','prototype','_isReader','_maybePublish','building','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','http','delete','_startHeartbeat','_threadStats','INDEX_RESET','ready','slice','filter','win32','_isWriter','then','runtimeProcessesView','ttlMs','2361611kPsqFv','_versionSkewWarned','_lastCpuPct','force','onWindow','kind','consecutiveFailures','user','rows=','busy','type:drop',')\x20exited\x20','slotKey','\x20HTTP\x20server(s)\x20on\x20port\x20','isWorker','reportThreadStats','events','created','ITEM_REMOVE','acquiredAt','\x20\x20(no\x20env\x20draining)','_lockDb','feed:','_lastCpuAt','_bpParkedTotal','reap','system:bus_state_change','flushLmdb','node','stopHeartbeat','_nodeDbFor','async','confirm','system:type_drop','registry-publish','ms\x20env=','_draining','_handleInProcess','resetting','dropFts','ms\x20(attempt\x20','REMOVE','standalone','meta','pushEphemeral','min','_lock','find','_bpWaiters','_coordinator','index:drop','removeSupervisedChild','holder','_participate','_onPoke','2687440jbvuFp','ESRCH','cli','default','startHeartbeat','_buckets','--test','1512846PNFSoO','_onProcEvent','stats','license:added','instanceId','open','SYSTEM_STOPPED','_putRowAsync','updateSupervisedChildStats','decommission','_outstanding','shift','children','listDesired','_desiredOverlay','enable','ms\x20p99=','removeSync','_cursors','bus:proc','status','ref:violation_resolved','[okdb-cluster]\x20','attachFeed','count','--print','deregisterSelf','\x20\x20#','noteListenAddr','kill','_servingEngines','_role','emit','128PVDXyD','once','_publishFailWarned','_activateProcesses','_clusterOnMessage','\x20writer{depth=','_refreshDesiredSnapshot','isConnected','_report','_flushDebounce','threads','_cmd','_caps','host','abs','(code=','flushDebounce','listNodes','hasDesired','\x20\x20env=','_key','getRange','rss','exports','includes','exit','expiresAt','error','inflightAgesMs','copy','\x0a===\x20OKDB_DIAG\x20','afterWrite','tryAcquire','listenAddr','system:ready','_db','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','_rawDb','ttl:set','msg','stop','processors','registry\x20heartbeat\x20skipped\x20(writer=','_admissionStarted','execArgv','_changefeed','getProcess','_statusEnv','_highWater','schema:set','role','24OMOUlN','_heartbeatInFlight','_baselines','isWanted','\x20forked\x20','memoryUsage','_onStop','registerType','clusterStatusView','processingStatusView','_startAdmission','compaction','env:removed','publishChildRow','singletonClaims','bus:poke','_acquiredAt',');\x20','disconnect','hasType','bus:env_release','isPrimary','ppid','unclaimed','processor:paused','_windowCbs','resetReadTxn','_wantDbHandle','setOwnMeta','_handlePoke','enabled','_seen','http\x20worker\x20child\x20failed:\x20','randomUUID','_buildProcessingFacet','putSync','fanout','_rootDb','ephemeral','committed','_buildChildRow','dedupeMax','system:poke','ms\x20on\x20env=','view:progress','ITEM_UPDATE','all','options','_writer','_singletonLock','note','\x20in\x20','cluster:','close','raw-remove','log','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','markClosed','--watch','workersConfigured','ms\x20activeWriters=','_envs','seq','system:env_release','\x20@\x20','_dedupeMax','dead','clearThreadStats','CHANGEFEED_QUANTUM','some','_sampleOwnStats','heartbeatMs','true','clear','\x20while\x20this\x20process\x20runs\x20','_getType','_isStale','transaction','\x20statusEnv=','allSettled','_enableChangelog','SYSTEM_POKE','platform','next','_sandbox','supervisorKey','_desired','okdb-http-worker-child.js','bus:type_drop','_children','type:registered','sandbox','_closed','_nodeDbCache','unhandledRejection','_clusterWorkerAttached','parkedNow','map','engines','processes','_collectSingletonClaims','version','_processStartedAt','repeat','treeView','SIGKILL','heapUsed','now','_groupByProcess','system:stopped','SWAP','test','(worst\x20','compact','\x20sync','__esModule','worker','setDesired','childTransaction','updatedAt','node/','_kind','parse','cpuUsage','_hbTimer','from','maxExtra','heapTotal','writerStatus','_ownMeta','.log','put','process\x20','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','_migrateVocab','cpus','okdb','stderr','[okdb-cluster]\x20primary\x20pid=','_committed','info','~processes:desired','crypto','prependListener','connected','processor','getClock','rowKey','_onTick','entry','inst:','\x0a\x20\x20\x20\x20\x20\x20','uptime','325496ZOrlre','nodesView','processorId','reduce','round','namespace','[okdb-cluster]\x20respawning\x20worker\x20slot=','call','attach','view','length','_systemEnv','__okdbSlot','\x20(durable\x20desired-state)','okdb-writer:\x20env\x20closing\x20—\x20retry','dropSchema','ms\x20busy=','cluster-wide','\x20pid=','race','index:ready','percentile','_listenAddr','disable','fn-runner','ENV_CLOSING_RETRY','join','stringify','hostname','_done','INDEX_REGISTERED','sync:apply','_inflight','commit','__okdbCluster','_flushTimer','_buildOwnRow','beforeWrite','getCmd','ITEM_CREATE','dumpedAt','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','load','split','system:drain','creating','selfKey','isDead','bus:drain','raw-put','type','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','mean','sync','nodeKey','appendFileSync','embedded','_timer','ttl:clear','max','_ensureDesired','_lastCpuUsage','label','processor:error','mode','fts:drop','_nodeDb','_markSeen','catch','_heartbeatTimer','waiting','toFixed','29181FXAbNV','message','toISOString','migrations','resetFts','loop-lag','indexOf','txn:start','change','reset','_rowKey','sort','state','\x20===','unref','depth','commitP99Ms','startsWith','_supervisorKey','http-server','offWindow','_pending','_log','startedAt','\x20times\x20in\x20','\x20drainAge=','getDesired','1845DEnGEc','number','claims',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census'];_0x1400=function(){return _0x2dd809;};return _0x1400();}function requireOkdbLock(){const _0x4ee260=_0x337619;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4c4997=require$$0$3,{SYNC_COMMITS:_0x49c9f1}=requireOkdbWriter(),_0x1b821b=_0x4ee260(0x232);class _0x518c10{constructor(_0x5c8a2b,_0x12dc01,_0x2a8480){const _0x4fcbf4=_0x4ee260;this[_0x4fcbf4(0x279)]=_0x5c8a2b,this[_0x4fcbf4(0x2be)]=_0x12dc01,this[_0x4fcbf4(0x2ed)]=_0x2a8480,this[_0x4fcbf4(0x1ec)]=![],this['_heartbeatTimer']=null,this['_heartbeatInFlight']=null;}['isHeld'](){const _0x5b59e2=_0x4ee260;if(this[_0x5b59e2(0x1ec)])return![];try{const _0x2f28cb=this[_0x5b59e2(0x279)][_0x5b59e2(0x2cd)]()[_0x5b59e2(0x1fd)](this[_0x5b59e2(0x2be)]);if(!_0x2f28cb||_0x2f28cb['acquiredAt']!==this[_0x5b59e2(0x2ed)])return![];const _0x165d26=_0x2f28cb[_0x5b59e2(0x354)]??_0x2f28cb[_0x5b59e2(0x25e)];if(_0x165d26+_0x2f28cb[_0x5b59e2(0x24a)]<Date[_0x5b59e2(0x348)]())return![];return!![];}catch{return!this['_released'];}}['holder'](){const _0x4a4c85=_0x4ee260;if(this[_0x4a4c85(0x1ec)])return null;try{return this['_lock'][_0x4a4c85(0x2cd)]()[_0x4a4c85(0x1fd)](this[_0x4a4c85(0x2be)])??null;}catch{return null;}}async[_0x4ee260(0x230)](_0x435d6c){const _0x50455f=_0x4ee260;if(this[_0x50455f(0x1ec)])return;try{const _0x2cb2f7=this[_0x50455f(0x279)][_0x50455f(0x2cd)]()[_0x50455f(0x1fd)](this['_key']);if(!_0x2cb2f7||_0x2cb2f7[_0x50455f(0x25e)]!==this[_0x50455f(0x2ed)])return;if(_0x49c9f1)this[_0x50455f(0x279)][_0x50455f(0x2cd)]()['putSync'](this['_key'],{..._0x2cb2f7,'ttlMs':_0x2cb2f7['ttlMs']+_0x435d6c});else await this[_0x50455f(0x279)][_0x50455f(0x2cd)]()[_0x50455f(0x129)](this['_key'],{..._0x2cb2f7,'ttlMs':_0x2cb2f7[_0x50455f(0x24a)]+_0x435d6c});}catch{}}async[_0x4ee260(0x1c5)](){const _0x54a188=_0x4ee260;if(this[_0x54a188(0x1ec)])return;if(this[_0x54a188(0x2de)])try{await this['_heartbeatInFlight'];}catch{}clearInterval(this[_0x54a188(0x184)]),this['_heartbeatTimer']=null,this['_released']=!![];try{const _0xb90529=this['_lock'][_0x54a188(0x2cd)]()['get'](this['_key']);if(_0xb90529&&_0xb90529['acquiredAt']===this['_acquiredAt']){if(_0x49c9f1)this[_0x54a188(0x279)]['_db']()[_0x54a188(0x29a)](this[_0x54a188(0x2be)]);else await this[_0x54a188(0x279)][_0x54a188(0x2cd)]()[_0x54a188(0x1f2)](this['_key']);}}catch{}}[_0x4ee260(0x240)](_0x59b8a2,_0x29face){const _0x5801dc=_0x4ee260,_0x2d9aa3=_0x29face??Math[_0x5801dc(0x1e4)](_0x59b8a2/0x3);this['_heartbeatTimer']=setInterval(()=>{const _0x47b292=_0x5801dc;if(this['_released'])return;this[_0x47b292(0x2de)]=((async()=>{const _0x51af62=_0x47b292;try{const _0xccfdce=this[_0x51af62(0x279)]['_db']()[_0x51af62(0x1fd)](this[_0x51af62(0x2be)]);if(!_0xccfdce||_0xccfdce[_0x51af62(0x25e)]!==this[_0x51af62(0x2ed)]){this[_0x51af62(0x1ec)]=!![],clearInterval(this['_heartbeatTimer']),this[_0x51af62(0x184)]=null;return;}if(_0x49c9f1)this[_0x51af62(0x279)][_0x51af62(0x2cd)]()[_0x51af62(0x300)](this[_0x51af62(0x2be)],{..._0xccfdce,'updatedAt':Date[_0x51af62(0x348)]()});else await this[_0x51af62(0x279)]['_db']()[_0x51af62(0x129)](this[_0x51af62(0x2be)],{..._0xccfdce,'updatedAt':Date['now']()});}catch{}this[_0x51af62(0x2de)]=null;})());},_0x2d9aa3);if(this[_0x5801dc(0x184)][_0x5801dc(0x195)])this[_0x5801dc(0x184)]['unref']();}}class _0x36751e{constructor(_0x2c9c7f,{namespace:_0x18f445,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x64bedf=_0x4ee260;this[_0x64bedf(0x2cf)]=_0x2c9c7f,this['namespace']=_0x18f445,this['ttlMs']=ttlMs,this[_0x64bedf(0x324)]=heartbeatMs,this[_0x64bedf(0x260)]=null;}[_0x4ee260(0x2cd)](){const _0x430c88=_0x4ee260;return!this['_lockDb']&&(this[_0x430c88(0x260)]=this['_rawDb'][_0x430c88(0x1bb)](_0x1b821b,{'dupSort':![]})),this[_0x430c88(0x260)];}['_wantDb'](){const _0x29429e=_0x4ee260;return!this[_0x29429e(0x2f8)]&&(this[_0x29429e(0x2f8)]=this[_0x29429e(0x2cf)][_0x29429e(0x1bb)](_0x1b821b+_0x29429e(0x1c4),{'dupSort':![]})),this['_wantDbHandle'];}[_0x4ee260(0x2be)](_0x27b2f6){const _0x539865=_0x4ee260;return this[_0x539865(0x144)]+':'+_0x27b2f6;}[_0x4ee260(0x1ef)](_0x34ed6e){const _0x68e404=_0x4ee260;try{_0x49c9f1?this['_wantDb']()['putSync'](this[_0x68e404(0x2be)](_0x34ed6e),Date[_0x68e404(0x348)]()):this['_wantDb']()[_0x68e404(0x129)](this['_key'](_0x34ed6e),Date['now']())?.['catch']?.(()=>{});}catch{}}[_0x4ee260(0x2e0)](_0x1ca297,_0x378b01=0x3e8){const _0x1a7fcc=_0x4ee260;try{const _0x4b2872=this[_0x1a7fcc(0x1dd)]()[_0x1a7fcc(0x1fd)](this['_key'](_0x1ca297));return typeof _0x4b2872===_0x1a7fcc(0x1a3)&&Date[_0x1a7fcc(0x348)]()-_0x4b2872<_0x378b01;}catch{return![];}}['_isStale'](_0x1a394f){const _0x1f96d2=_0x4ee260,_0x449ca4=_0x1a394f[_0x1f96d2(0x354)]??_0x1a394f[_0x1f96d2(0x25e)];return _0x449ca4+_0x1a394f[_0x1f96d2(0x24a)]<Date[_0x1f96d2(0x348)]();}static[_0x4ee260(0x22c)](_0x18d068){const _0x254daf=_0x4ee260,_0x26b2cb=_0x18d068?.[_0x254daf(0x27f)];if(!_0x26b2cb||typeof _0x26b2cb['pid']!=='number')return![];if(_0x26b2cb['hostname']!==_0x4c4997[_0x254daf(0x15b)]())return![];if(_0x26b2cb['pid']===process[_0x254daf(0x1a8)])return![];try{return process[_0x254daf(0x2a6)](_0x26b2cb[_0x254daf(0x1a8)],0x0),![];}catch(_0x47f36e){return _0x47f36e['code']===_0x254daf(0x283);}}async[_0x4ee260(0x2ca)](_0x2a18da,_0x5e825d={},_0x3f17e0={}){const _0x4b26ca=_0x4ee260,_0x40524b=this[_0x4b26ca(0x2be)](_0x2a18da),_0x1b5100=_0x3f17e0[_0x4b26ca(0x24a)]??this['ttlMs'],_0x562575=Date[_0x4b26ca(0x348)](),_0x98e8f5={'holder':{'pid':process[_0x4b26ca(0x1a8)],'hostname':_0x4c4997[_0x4b26ca(0x15b)](),..._0x5e825d},'acquiredAt':_0x562575,'updatedAt':_0x562575,'ttlMs':_0x1b5100};let _0x55e98e=![],_0x523508=null;try{const _0x58167e=()=>{const _0x2cd83b=_0x4b26ca,_0x410751=this[_0x2cd83b(0x2cd)]()[_0x2cd83b(0x1fd)](_0x40524b);if(_0x410751&&!this[_0x2cd83b(0x329)](_0x410751)&&!_0x36751e[_0x2cd83b(0x22c)](_0x410751)){const _0x32272d=_0x5e825d['processorId']!=null&&_0x410751[_0x2cd83b(0x27f)][_0x2cd83b(0x1a8)]===process[_0x2cd83b(0x1a8)]&&_0x410751[_0x2cd83b(0x27f)][_0x2cd83b(0x141)]===_0x5e825d[_0x2cd83b(0x141)];if(!_0x32272d){_0x55e98e=![],_0x523508=_0x410751;return;}_0x98e8f5[_0x2cd83b(0x25e)]<=_0x410751['acquiredAt']&&(_0x98e8f5[_0x2cd83b(0x25e)]=_0x410751[_0x2cd83b(0x25e)]+0x1,_0x98e8f5[_0x2cd83b(0x354)]=_0x98e8f5[_0x2cd83b(0x25e)]);}this['_db']()[_0x2cd83b(0x129)](_0x40524b,_0x98e8f5),_0x55e98e=!![],_0x523508=_0x98e8f5;};if(_0x49c9f1)this[_0x4b26ca(0x2cd)]()[_0x4b26ca(0x20c)](_0x58167e);else await this[_0x4b26ca(0x2cd)]()[_0x4b26ca(0x353)](_0x58167e);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x55e98e)return{'acquired':![],'handle':null,'current':_0x523508};const _0x38003b=new _0x518c10(this,_0x40524b,_0x98e8f5[_0x4b26ca(0x25e)]);return _0x38003b[_0x4b26ca(0x240)](_0x1b5100,this[_0x4b26ca(0x324)]),{'acquired':!![],'handle':_0x38003b,'current':_0x523508};}[_0x4ee260(0x1b3)](_0x19dcb1){const _0xa949dc=_0x4ee260;try{return this[_0xa949dc(0x2cd)]()[_0xa949dc(0x1fd)](this['_key'](_0x19dcb1))??null;}catch{return null;}}[_0x4ee260(0x1de)](){const _0x559c4d=_0x4ee260,_0x1a521d=this[_0x559c4d(0x144)]+':',_0x344442=[];try{for(const {key:_0x307ad3,value:_0x45cbed}of this[_0x559c4d(0x2cd)]()[_0x559c4d(0x2bf)]({'start':_0x1a521d,'end':_0x1a521d+'ÿ'})){typeof _0x307ad3===_0x559c4d(0x1e5)&&_0x307ad3['startsWith'](_0x1a521d)&&_0x344442[_0x559c4d(0x1b4)]({'id':_0x307ad3[_0x559c4d(0x244)](_0x1a521d['length']),'entry':_0x45cbed});}}catch{}return _0x344442;}static[_0x4ee260(0x22a)](_0x50c109){const _0x5b801f=_0x4ee260,_0x2a3360=[];try{const _0x2de914=_0x50c109[_0x5b801f(0x1bb)](_0x1b821b,{'dupSort':![]});for(const {key:_0x34a7a9,value:_0x5ebe27}of _0x2de914[_0x5b801f(0x2bf)]({})){if(typeof _0x34a7a9!==_0x5b801f(0x1e5))continue;const _0x48fa81=_0x34a7a9[_0x5b801f(0x18d)](':');if(_0x48fa81<0x1)continue;_0x2a3360[_0x5b801f(0x1b4)]({'namespace':_0x34a7a9[_0x5b801f(0x244)](0x0,_0x48fa81),'id':_0x34a7a9[_0x5b801f(0x244)](_0x48fa81+0x1),'entry':_0x5ebe27});}}catch{}return _0x2a3360;}}return okdbLock={'OKDBLock':_0x36751e},okdbLock;}var version='2.0.4',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x2abc23=_0x337619;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0xf1a56e=require$$0$3,_0x53c1ad=require$$1$1,_0x4c6dda=require$$2,{LOOP:_0x844ebf}=requireOkdbLoopMonitor(),{OKDBLock:_0x26ca52}=requireOkdbLock(),{SYNC_COMMITS:_0x2e020a}=requireOkdbWriter(),_0x204a5a=_0x2abc23(0x1ea),_0x326745=_0x2abc23(0x267),_0x4ab62b=_0x2abc23(0x133),_0x291776='~processes:cmd',_0x3a50de=(_0x3880d1,_0x455108)=>_0x3880d1+':'+_0x455108,_0x5ef476=(_0x13b5a7,_0x574c50)=>_0x13b5a7+'::'+_0x574c50,_0x231cb9=(_0x20fbaf,_0xb772c8)=>_0x20fbaf+'/'+_0xb772c8,_0xaad60e=(_0x28bfe8,_0x2f0c79)=>_0x28bfe8+'#'+_0x2f0c79,_0xc7b3a9=_0x3b2e5c=>{const _0x3ca774=_0x2abc23;if(_0x3b2e5c?.[_0x3ca774(0x1cb)])return _0x3b2e5c['processKey'];const _0x48ed51=_0x3b2e5c?.[_0x3ca774(0x175)];return typeof _0x48ed51===_0x3ca774(0x1e5)&&_0x48ed51['includes']('#')?_0x48ed51[_0x3ca774(0x244)](0x0,_0x48ed51['indexOf']('#')):_0x48ed51;},_0x5277c3=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x57d7ff=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x1da1ba=_0x5277c3*0x3,_0x50c0ba=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x1da1ba*0x14),_0xffa4ec=[_0x2abc23(0x1d8),'processor:ready',_0x2abc23(0x212),_0x2abc23(0x17e),'processor:paused',_0x2abc23(0x1d7)];let _0x505fc1=null;function _0x200371(){const _0x502843=_0x2abc23;if(_0x505fc1==null)_0x505fc1=Math[_0x502843(0x143)]((Date[_0x502843(0x348)]()-process[_0x502843(0x13e)]()*0x3e8)/0x3e8)*0x3e8;return _0x505fc1;}function _0x2d8b92(_0x28a1fb){const _0x31737d=_0x2abc23;if(process.env.OKDB_PROCESS_KILL==='off')return![];if(_0x28a1fb?.['options']?.[_0x31737d(0x340)]&&typeof _0x28a1fb[_0x31737d(0x30c)][_0x31737d(0x340)]===_0x31737d(0x1f0)&&_0x28a1fb[_0x31737d(0x30c)][_0x31737d(0x340)]['kill']===![])return![];return!![];}function _0x553ea3(_0xc249ee,_0x42aa7f){const _0x606a72=_0x2abc23,_0x342d88=!!_0x42aa7f?.[_0x606a72(0x2d3)];switch(_0xc249ee){case _0x606a72(0x237):return{'controllable':_0x342d88,'decommissionable':![],'killable':!![],'killConfirm':_0x606a72(0x150)};case _0x606a72(0x284):case _0x606a72(0x275):return{'controllable':_0x342d88,'decommissionable':![],'killable':!![],'killConfirm':_0x606a72(0x26b)};case _0x606a72(0x177):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x606a72(0x157):case _0x606a72(0x351):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x606a72(0x24e)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x4c501d{constructor(_0x1b2ebd){const _0x55352f=_0x2abc23;this['okdb']=_0x1b2ebd,this['_statusEnv']=null,this[_0x55352f(0x333)]=null,this[_0x55352f(0x297)]=new Map(),this[_0x55352f(0x2b5)]=null,this[_0x55352f(0x247)]=![],this[_0x55352f(0x23a)]=![],this['_processStartedAt']=_0x200371(),this['_selfKey']=_0x3a50de(process[_0x55352f(0x1a8)],this[_0x55352f(0x343)]),this[_0x55352f(0x1da)]=_0x4c6dda[_0x55352f(0x2fe)]()['slice'](0x0,0x8),this[_0x55352f(0x191)]=_0xaad60e(this[_0x55352f(0x1d3)],this[_0x55352f(0x1da)]),this['_startedAt']=Date[_0x55352f(0x348)](),this[_0x55352f(0x356)]=null,this['_supervisorKey']=null,this[_0x55352f(0x155)]=null,this[_0x55352f(0x359)]=null,this['_onProcEvent']=null,this[_0x55352f(0x13a)]=null,this[_0x55352f(0x1ca)]=0x0,this[_0x55352f(0x127)]={},this['_children']=new Map(),this[_0x55352f(0x17c)]=process['cpuUsage'](),this[_0x55352f(0x262)]=Date[_0x55352f(0x348)](),this[_0x55352f(0x24d)]=0x0,this[_0x55352f(0x241)]=new Map();}get[_0x2abc23(0x16d)](){return this['_selfKey'];}get[_0x2abc23(0x139)](){const _0x31b1da=_0x2abc23;return this[_0x31b1da(0x191)];}[_0x2abc23(0x2b6)](_0x4f28d9,_0x53fe79){const _0x5ec36c=_0x2abc23,_0x39072d=_0x553ea3(_0x4f28d9,_0x53fe79);if(_0x39072d['killable']&&!_0x2d8b92(this[_0x5ec36c(0x12e)]))return{..._0x39072d,'killable':![],'killConfirm':undefined};return _0x39072d;}['isActive'](){return!!this['_statusEnv'];}[_0x2abc23(0x2f9)](_0x5ef079){const _0x53f2f9=_0x2abc23;Object[_0x53f2f9(0x223)](this[_0x53f2f9(0x127)],_0x5ef079||{});}[_0x2abc23(0x2a5)](_0x99d47d){const _0x85a7e2=_0x2abc23;if(_0x99d47d)this[_0x85a7e2(0x155)]=_0x99d47d;}['register'](_0xb2e818={}){const _0x49411b=_0x2abc23;return this[_0x49411b(0x12e)][_0x49411b(0x2ad)](_0xb2e818);}[_0x2abc23(0x2e6)](){const _0x4f0a45=_0x2abc23,_0x56efce={};let _0x22aa7a=0x0,_0x303619=0x0;const _0x51e393=new Set();for(const _0x5bf94e of this['listNodes']()){_0x303619++;const _0x38f79b=_0x5bf94e[_0x4f0a45(0x201)];if(!_0x38f79b)continue;if(_0x38f79b[_0x4f0a45(0x22b)])_0x22aa7a++;for(const _0xb33d4c of _0x38f79b[_0x4f0a45(0x2d3)]||[]){if(!['single',_0x4f0a45(0x301)][_0x4f0a45(0x2c2)](_0xb33d4c['mode']))continue;(_0xb33d4c[_0x4f0a45(0x193)]===_0x4f0a45(0x1b7)||_0xb33d4c[_0x4f0a45(0x193)]===_0x4f0a45(0x23c))&&_0xb33d4c['cursorKey']&&_0x51e393['add']((_0xb33d4c[_0x4f0a45(0x21a)]||'default')+':'+_0xb33d4c[_0x4f0a45(0x1b1)]);const _0x4a80a0=_0xb33d4c[_0x4f0a45(0x21a)]||'default';(_0x56efce[_0x4a80a0]||=[])[_0x4f0a45(0x1b4)]({..._0xb33d4c,'env':_0x4a80a0,'owner':{'pid':_0x5bf94e['pid']??null,'kind':_0x5bf94e['kind']??null}});}}for(const [_0x2c37dd,_0x3777bf]of Object[_0x4f0a45(0x1e2)](_0x56efce)){for(const _0x3ed170 of _0x3777bf){if(_0x3ed170['mode']===_0x4f0a45(0x1a6)&&!_0x3ed170[_0x4f0a45(0x1e0)]){const _0x608b2b=_0x2c37dd+':'+(_0x3ed170[_0x4f0a45(0x1b1)]??'');if(!_0x51e393[_0x4f0a45(0x222)](_0x608b2b))_0x3ed170[_0x4f0a45(0x2f4)]=!![];}}}return{'envs':_0x56efce,'policy':null,'participation':{'participating':_0x22aa7a,'total':_0x303619},'source':_0x4f0a45(0x1b6)};}[_0x2abc23(0x226)](){const _0x1f822e=_0x2abc23,_0x44f59d=_0x35a7a5=>{const _0x3610a8=_0x58e7;if(_0x35a7a5[_0x3610a8(0x193)]==='online'||_0x35a7a5[_0x3610a8(0x193)]==='building'||_0x35a7a5[_0x3610a8(0x193)]===_0x3610a8(0x2c5))return 0x3;if(_0x35a7a5[_0x3610a8(0x1e0)])return 0x1;return 0x2;},_0xed7f63=new Map();for(const _0xdfa7ec of this[_0x1f822e(0x2bb)]()){for(const _0x3641a7 of _0xdfa7ec[_0x1f822e(0x201)]?.[_0x1f822e(0x2d3)]||[]){const _0x4c1e00={..._0x3641a7,'owner':{'pid':_0xdfa7ec['pid']??null,'kind':_0xdfa7ec['kind']??null,'host':_0xdfa7ec[_0x1f822e(0x2b7)]??null}},_0x3da4bb=_0x3641a7[_0x1f822e(0x17f)]==='single'?'1ofN:'+(_0x3641a7[_0x1f822e(0x21a)]??'')+'::'+(_0x3641a7[_0x1f822e(0x1b1)]??_0x3641a7[_0x1f822e(0x171)]??_0x3641a7['id']):_0x1f822e(0x13c)+(_0xdfa7ec[_0x1f822e(0x175)]??_0xdfa7ec[_0x1f822e(0x1cb)]??'')+'::'+(_0x3641a7[_0x1f822e(0x21a)]??'')+'::'+_0x3641a7['id'],_0x5ae882=_0xed7f63['get'](_0x3da4bb);if(!_0x5ae882||_0x44f59d(_0x4c1e00)>_0x44f59d(_0x5ae882))_0xed7f63[_0x1f822e(0x217)](_0x3da4bb,_0x4c1e00);}}return[..._0xed7f63[_0x1f822e(0x1c9)]()];}[_0x2abc23(0x2e5)](){const _0x14f8da=_0x2abc23,_0x15d0bd=Date[_0x14f8da(0x348)](),_0x962f8f=this[_0x14f8da(0x2bb)](),_0x126c10=_0x42b50f=>Math[_0x14f8da(0x17a)](0x0,Math['round']((_0x15d0bd-(_0x42b50f[_0x14f8da(0x19e)]||_0x15d0bd))/0x3e8)),_0xb3b78b=_0x962f8f['find'](_0x14c432=>_0x14c432[_0x14f8da(0x250)]===_0x14f8da(0x237)),_0x3cf30b=_0x962f8f[_0x14f8da(0x245)](_0x54a317=>_0x54a317['kind']===_0x14f8da(0x19a));if(_0xb3b78b||_0x3cf30b['length'])return{'primary':_0xb3b78b?{'pid':_0xb3b78b['pid'],'uptime':_0x126c10(_0xb3b78b)}:null,'workers':_0x3cf30b[_0x14f8da(0x33e)](_0x54ae71=>({'pid':_0x54ae71[_0x14f8da(0x1a8)],'uptime':_0x126c10(_0x54ae71)})),'workersConfigured':_0xb3b78b?.[_0x14f8da(0x276)]?.[_0x14f8da(0x318)]??_0x3cf30b['length'],'mode':'cluster'};const _0x1c963f=_0x962f8f[_0x14f8da(0x27a)](_0x499ace=>_0x499ace['kind']===_0x14f8da(0x284)||_0x499ace[_0x14f8da(0x250)]===_0x14f8da(0x275)||_0x499ace[_0x14f8da(0x250)]===_0x14f8da(0x177)),_0x14ab60=_0x1c963f?{'pid':_0x1c963f[_0x14f8da(0x1a8)],'uptime':_0x126c10(_0x1c963f)}:{'pid':process['pid'],'uptime':Math[_0x14f8da(0x17a)](0x0,Math[_0x14f8da(0x143)](process[_0x14f8da(0x13e)]()))};return{'primary':_0x14ab60,'workers':[_0x14ab60],'workersConfigured':0x1,'mode':_0x14f8da(0x1a6)};}[_0x2abc23(0x140)](){return this['_groupByProcess']();}[_0x2abc23(0x345)](){const _0x6af44c=_0x2abc23,_0x50ab0e=new Map();for(const _0x5c3f2b of this[_0x6af44c(0x349)]())_0x50ab0e[_0x6af44c(0x217)](_0x5c3f2b[_0x6af44c(0x1cb)],{..._0x5c3f2b,'children':[]});const _0x204ae5=[];for(const _0x5428eb of _0x50ab0e[_0x6af44c(0x1c9)]()){const _0x4152d6=_0x5428eb[_0x6af44c(0x332)]?_0x50ab0e['get'](_0x5428eb[_0x6af44c(0x332)]):null;if(_0x4152d6&&_0x4152d6!==_0x5428eb)_0x4152d6[_0x6af44c(0x295)]['push'](_0x5428eb);else _0x204ae5[_0x6af44c(0x1b4)](_0x5428eb);}const _0x4d1e1c=(_0x2d047b,_0x3a6dc8)=>_0x2d047b['kind']===_0x3a6dc8[_0x6af44c(0x250)]?(_0x2d047b[_0x6af44c(0x1a8)]||0x0)-(_0x3a6dc8[_0x6af44c(0x1a8)]||0x0):(_0x2d047b[_0x6af44c(0x250)]??'')<(_0x3a6dc8[_0x6af44c(0x250)]??'')?-0x1:0x1,_0x5b847e=_0x2fdb2b=>{const _0x251cc1=_0x6af44c;_0x2fdb2b['sort'](_0x4d1e1c);for(const _0x35ab48 of _0x2fdb2b)if(_0x35ab48[_0x251cc1(0x295)][_0x251cc1(0x149)])_0x5b847e(_0x35ab48['children']);};return _0x5b847e(_0x204ae5),_0x204ae5;}[_0x2abc23(0x2d8)](_0x2bbdf2){const _0x538624=_0x2abc23;return this[_0x538624(0x349)]()[_0x538624(0x27a)](_0x50db95=>_0x50db95['processKey']===_0x2bbdf2)??null;}['_groupByProcess'](_0x32ece7=Date['now']()){const _0x190cf3=_0x2abc23,_0x28ba67=new Map();for(const _0x540394 of this[_0x190cf3(0x2bb)]()){const _0x8141df=_0xc7b3a9(_0x540394);let _0x1b7185=_0x28ba67['get'](_0x8141df);!_0x1b7185&&(_0x1b7185={'processKey':_0x8141df,'nodeKey':_0x8141df,'pid':_0x540394['pid'],'ppid':_0x540394[_0x190cf3(0x2f3)]??null,'host':_0x540394[_0x190cf3(0x2b7)]??null,'kind':_0x540394[_0x190cf3(0x250)],'role':null,'supervisorKey':_0x540394['supervisorKey']??null,'slot':_0x540394['slot']??null,'slotKey':_0x540394[_0x190cf3(0x257)]??null,'caps':_0x540394[_0x190cf3(0x1f4)]??null,'lifecycle':_0x540394[_0x190cf3(0x1fc)]??null,'uptime':Math[_0x190cf3(0x17a)](0x0,Math[_0x190cf3(0x143)]((_0x32ece7-(_0x540394['startedAt']||_0x32ece7))/0x3e8)),'startedAt':_0x540394[_0x190cf3(0x19e)]??null,'meta':_0x540394[_0x190cf3(0x276)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x28ba67['set'](_0x8141df,_0x1b7185));_0x1b7185['instances']['push']({'instanceId':_0x540394[_0x190cf3(0x28d)]??null,'role':_0x540394[_0x190cf3(0x2dc)]??null,'listenAddr':_0x540394[_0x190cf3(0x2cb)]??null,'lifecycle':_0x540394['lifecycle']??null,'processing':_0x540394['processing']??null});if(!_0x1b7185[_0x190cf3(0x2dc)]&&_0x540394[_0x190cf3(0x2dc)])_0x1b7185[_0x190cf3(0x2dc)]=_0x540394[_0x190cf3(0x2dc)];if(!_0x1b7185['listenAddr']&&_0x540394[_0x190cf3(0x2cb)])_0x1b7185[_0x190cf3(0x2cb)]=_0x540394['listenAddr'];if(!_0x1b7185[_0x190cf3(0x201)]&&_0x540394[_0x190cf3(0x201)])_0x1b7185['processing']=_0x540394['processing'];if(!_0x1b7185['engines']&&_0x540394[_0x190cf3(0x33f)])_0x1b7185['engines']=_0x540394[_0x190cf3(0x33f)];if(!_0x1b7185['singletonClaims']&&_0x540394[_0x190cf3(0x2eb)])_0x1b7185[_0x190cf3(0x2eb)]=_0x540394[_0x190cf3(0x2eb)];if(_0x1b7185[_0x190cf3(0x1f4)]==null&&_0x540394[_0x190cf3(0x1f4)])_0x1b7185[_0x190cf3(0x1f4)]=_0x540394[_0x190cf3(0x1f4)];if(_0x540394[_0x190cf3(0x28b)]&&(!_0x1b7185[_0x190cf3(0x28b)]||(_0x540394['stats']['at']??0x0)>(_0x1b7185['stats']['at']??0x0)))_0x1b7185[_0x190cf3(0x28b)]=_0x540394[_0x190cf3(0x28b)];}return[..._0x28ba67[_0x190cf3(0x1c9)]()];}[_0x2abc23(0x249)](){const _0x3c2dfc=_0x2abc23,_0x4a03d3=[],_0x2d78d3={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x55a5ff of this['_groupByProcess']()){_0x4a03d3[_0x3c2dfc(0x1b4)]({'processKey':_0x55a5ff[_0x3c2dfc(0x1cb)],'kind':_0x55a5ff[_0x3c2dfc(0x250)],'pid':_0x55a5ff[_0x3c2dfc(0x1a8)],'supervisorKey':_0x55a5ff[_0x3c2dfc(0x332)],'meta':_0x55a5ff[_0x3c2dfc(0x276)]??null,'uptime':_0x55a5ff['uptime'],'stats':_0x55a5ff[_0x3c2dfc(0x28b)]??null}),_0x2d78d3['processes']++;if(_0x55a5ff['stats']){_0x2d78d3[_0x3c2dfc(0x2c0)]+=_0x55a5ff[_0x3c2dfc(0x28b)]['rss']||0x0,_0x2d78d3[_0x3c2dfc(0x347)]+=(_0x55a5ff['stats'][_0x3c2dfc(0x347)]||0x0)+(_0x55a5ff[_0x3c2dfc(0x28b)][_0x3c2dfc(0x2b4)]?.[_0x3c2dfc(0x347)]||0x0);const _0x3ed440=_0x55a5ff['stats']['threads'];_0x3ed440&&(_0x2d78d3['threads'][_0x3c2dfc(0x2a1)]+=_0x3ed440['count']||0x0,_0x2d78d3[_0x3c2dfc(0x2b4)][_0x3c2dfc(0x338)]+=_0x3ed440[_0x3c2dfc(0x338)]||0x0,_0x2d78d3[_0x3c2dfc(0x2b4)][_0x3c2dfc(0x254)]+=_0x3ed440['busy']||0x0);}}return{'totals':_0x2d78d3,'nodes':_0x4a03d3};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x262d92=_0x2abc23;this[_0x262d92(0x247)]=this['_isWriter']||!!writer,this['_isReader']=this['_isReader']||!!reader,this[_0x262d92(0x356)]=kind||this[_0x262d92(0x356)]||(_0x53c1ad[_0x262d92(0x259)]?_0x262d92(0x19a):'cli'),this['_supervisorKey']=supervisorKey??this[_0x262d92(0x199)],this[_0x262d92(0x155)]=listenAddr??this[_0x262d92(0x155)],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x262d92(0x2d9)]){const _0x26f4b8=await this[_0x262d92(0x12e)]['createEnvironment'](_0x204a5a,{'sync':![],'durability':'fast'});if(!_0x26f4b8[_0x262d92(0x2f0)](_0x326745))await _0x26f4b8[_0x262d92(0x2e4)](_0x326745);this['_statusEnv']=_0x26f4b8;}return this[_0x262d92(0x2d9)];}[_0x2abc23(0x181)](){const _0x475f02=_0x2abc23;return this[_0x475f02(0x269)]!==this[_0x475f02(0x2d9)]&&(this[_0x475f02(0x269)]=this[_0x475f02(0x2d9)],this['_nodeDbCache']=this[_0x475f02(0x2d9)][_0x475f02(0x328)](_0x326745)['data']),this[_0x475f02(0x33a)];}['_putRowAsync'](_0xea74e8){const _0x9caa8f=_0x2abc23;if(_0x2e020a)return this['_nodeDb']()[_0x9caa8f(0x300)](_0xea74e8[_0x9caa8f(0x175)],_0xea74e8,0x1);const _0x12f135=this[_0x9caa8f(0x181)]()['put'](_0xea74e8[_0x9caa8f(0x175)],_0xea74e8,0x1);if(_0x12f135&&typeof _0x12f135['then']==='function')_0x12f135['then'](undefined,()=>{});return _0x12f135;}[_0x2abc23(0x1d1)](_0x5f4fcd){const _0x5aec8b=_0x2abc23;return this[_0x5aec8b(0x181)]()['putSync'](_0x5f4fcd['nodeKey'],_0x5f4fcd,0x1);}[_0x2abc23(0x1e3)](_0x3bb98d){const _0x3914ba=_0x2abc23;if(_0x2e020a)try{return this[_0x3914ba(0x181)]()[_0x3914ba(0x29a)](_0x3bb98d);}catch{return![];}const _0x27ebf9=this[_0x3914ba(0x181)]()[_0x3914ba(0x1f2)](_0x3bb98d);if(_0x27ebf9&&typeof _0x27ebf9[_0x3914ba(0x248)]===_0x3914ba(0x1b8))_0x27ebf9[_0x3914ba(0x248)](undefined,()=>{});return _0x27ebf9;}async[_0x2abc23(0x1a7)](_0x7cb5af){const _0x20e54d=_0x2abc23;if(!this['_statusEnv']||!this[_0x20e54d(0x247)]||!_0x7cb5af?.[_0x20e54d(0x175)])return;return this[_0x20e54d(0x290)](_0x7cb5af);}async[_0x2abc23(0x1ed)](_0x5af85a){const _0x44f279=_0x2abc23;if(!this[_0x44f279(0x2d9)]||!this[_0x44f279(0x247)]||!_0x5af85a)return;const _0x404291=_0x5af85a[_0x44f279(0x2c2)]('#'),_0x5c3eca=[];for(const {key:_0x598ca5}of this[_0x44f279(0x2d9)][_0x44f279(0x2bf)](_0x326745)){if(_0x598ca5===_0x5af85a||!_0x404291&&typeof _0x598ca5==='string'&&_0x598ca5[_0x44f279(0x198)](_0x5af85a+'#'))_0x5c3eca[_0x44f279(0x1b4)](_0x598ca5);}for(const _0x4ed4a6 of _0x5c3eca){try{this[_0x44f279(0x181)]()['removeSync'](_0x4ed4a6);}catch{}}}[_0x2abc23(0x218)](_0xfb6683){const _0x4d29a1=_0x2abc23;if(typeof _0xfb6683?.['pid']!==_0x4d29a1(0x1a3))return![];if(_0xfb6683[_0x4d29a1(0x2b7)]!==_0xf1a56e[_0x4d29a1(0x15b)]())return![];if(_0xfb6683['pid']===process['pid'])return![];if(_0xfb6683[_0x4d29a1(0x2c4)]!=null&&_0xfb6683[_0x4d29a1(0x2c4)]<Date[_0x4d29a1(0x348)]()-_0x50c0ba)return!![];try{return process[_0x4d29a1(0x2a6)](_0xfb6683[_0x4d29a1(0x1a8)],0x0),![];}catch(_0x753dac){return _0x753dac[_0x4d29a1(0x1c0)]==='ESRCH';}}[_0x2abc23(0x2bb)](){const _0x340efc=_0x2abc23;if(!this[_0x340efc(0x2d9)])return[];try{this[_0x340efc(0x2d9)]['db']?.[_0x340efc(0x2f7)]?.();}catch{}const _0x2739c8=Date['now'](),_0x1b9a4c=_0xf1a56e[_0x340efc(0x15b)](),_0xcf21b9=[];for(const {value:_0x5eb215}of this[_0x340efc(0x2d9)][_0x340efc(0x2bf)](_0x326745)){if(!_0x5eb215)continue;let _0x1fb45a=null;_0x5eb215[_0x340efc(0x2b7)]===_0x1b9a4c&&typeof _0x5eb215[_0x340efc(0x1a8)]===_0x340efc(0x1a3)&&(_0x1fb45a=!this['_nodeDead'](_0x5eb215));if(_0x1fb45a===![])continue;const _0x17fa5e=_0x5eb215['expiresAt']==null||_0x5eb215[_0x340efc(0x2c4)]>=_0x2739c8;if(_0x1fb45a===!![]||_0x17fa5e)_0xcf21b9['push'](_0x5eb215);}return _0xcf21b9;}async[_0x2abc23(0x264)](_0x25d023=0x0){const _0x154c09=_0x2abc23;if(!this[_0x154c09(0x2d9)]||!this[_0x154c09(0x247)])return;const _0xeadc80=Date['now']()-_0x25d023,_0x7690b1=new Set(),_0x9ab315=[],_0x4128bb=_0xf1a56e['hostname'](),_0x407f0b=require$$6[_0x154c09(0x342)];for(const {key:_0x519756,value:_0xf8d4c6}of this[_0x154c09(0x2d9)]['getRange'](_0x326745)){if(!_0xf8d4c6)continue;const _0x414e20=_0xf8d4c6[_0x154c09(0x2b7)]===_0x4128bb&&typeof _0xf8d4c6[_0x154c09(0x1a8)]===_0x154c09(0x1a3),_0x207856=_0x414e20?this[_0x154c09(0x218)](_0xf8d4c6):_0xf8d4c6[_0x154c09(0x2c4)]!=null&&_0xf8d4c6[_0x154c09(0x2c4)]<_0xeadc80;if(_0x207856)_0x9ab315[_0x154c09(0x1b4)](_0x519756);else{_0x7690b1['add'](_0xc7b3a9(_0xf8d4c6)??_0x519756);if(_0xf8d4c6['version']&&_0xf8d4c6[_0x154c09(0x342)]!==_0x407f0b){if(!this[_0x154c09(0x24c)])this['_versionSkewWarned']=new Set();!this[_0x154c09(0x24c)][_0x154c09(0x222)](_0xf8d4c6[_0x154c09(0x342)])&&(this[_0x154c09(0x24c)][_0x154c09(0x1ff)](_0xf8d4c6[_0x154c09(0x342)]),this['okdb'][_0x154c09(0x314)]?.[_0x154c09(0x21b)]?.(_0x154c09(0x12a)+(_0xf8d4c6['pid']??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0xf8d4c6[_0x154c09(0x342)]+_0x154c09(0x327)+_0x407f0b+'\x20—\x20'+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x154c09(0x18a)}));}}}for(const _0x1c2239 of _0x9ab315)this[_0x154c09(0x1e3)](_0x1c2239);if(this[_0x154c09(0x17b)]()){const _0x3942c5=[];for(const {key:_0x4b9ac2}of this[_0x154c09(0x296)](_0x154c09(0x267))){if(!_0x7690b1[_0x154c09(0x222)](_0x4b9ac2)){if(_0x2e020a)try{this['_desired'][_0x154c09(0x29a)](_0x154c09(0x355)+_0x4b9ac2);}catch{}else _0x3942c5['push'](this[_0x154c09(0x333)]['remove']('node/'+_0x4b9ac2));}}if(_0x3942c5[_0x154c09(0x149)])await Promise[_0x154c09(0x32c)](_0x3942c5);}}[_0x2abc23(0x286)](_0x3dc388=null){const _0x247867=_0x2abc23;if(this['_hbTimer'])return;if(!this[_0x247867(0x247)]||!this['_statusEnv']){this[_0x247867(0x12e)]?.['log']?.[_0x247867(0x21b)]?.(_0x247867(0x2d4)+this[_0x247867(0x247)]+_0x247867(0x32b)+!!this[_0x247867(0x2d9)]+_0x247867(0x1a5),{'feature':_0x247867(0x340)});return;}this[_0x247867(0x13a)]=_0x3dc388,this[_0x247867(0x28a)]=()=>this['_maybePublish']();for(const _0x51958f of _0xffa4ec)this['okdb'][_0x247867(0x25b)]['on'](_0x51958f,this[_0x247867(0x28a)]);this[_0x247867(0x1f8)]();const _0x46df2c=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x5277c3;this[_0x247867(0x359)]=setInterval(()=>{const _0x337589=_0x247867;if(this['_onTick'])try{this[_0x337589(0x13a)]();}catch{}this[_0x337589(0x1f8)](),this[_0x337589(0x264)]()['catch'](()=>{});},_0x46df2c);if(this['_hbTimer'][_0x247867(0x195)])this[_0x247867(0x359)][_0x247867(0x195)]();}[_0x2abc23(0x23b)](){const _0x551aab=_0x2abc23;if(!this[_0x551aab(0x247)]||!this[_0x551aab(0x2d9)])return;if(Date[_0x551aab(0x348)]()-this['_lastPublishAt']<_0x57d7ff)return;this['_publishNow']();}[_0x2abc23(0x1f8)](){const _0x565618=_0x2abc23;if(!this[_0x565618(0x247)]||!this[_0x565618(0x2d9)])return;this[_0x565618(0x1ca)]=Date[_0x565618(0x348)]();try{const _0x4aa3a8=[this[_0x565618(0x163)]()];for(const _0x310676 of this['_children'][_0x565618(0x1c9)]())_0x4aa3a8[_0x565618(0x1b4)](this[_0x565618(0x305)](_0x310676));const _0x109773=_0x844ebf[_0x565618(0x2fb)]?_0x844ebf[_0x565618(0x348)]():0x0;for(const _0xa3b1b5 of _0x4aa3a8){try{this[_0x565618(0x1d1)](_0xa3b1b5),this['_publishFailWarned']=![];}catch(_0x32740c){!this[_0x565618(0x2ac)]&&(this[_0x565618(0x2ac)]=!![],this['okdb']?.['log']?.[_0x565618(0x21b)]?.('registry\x20publish\x20failing:\x20'+_0x32740c[_0x565618(0x188)],{'feature':_0x565618(0x340)}));}}if(_0x844ebf[_0x565618(0x2fb)])_0x844ebf[_0x565618(0x30f)](_0x565618(0x26d),_0x844ebf[_0x565618(0x348)]()-_0x109773,_0x565618(0x253)+_0x4aa3a8[_0x565618(0x149)]+_0x565618(0x34f));}catch(_0xa0e5af){!this[_0x565618(0x2ac)]&&(this['_publishFailWarned']=!![],this[_0x565618(0x12e)]?.[_0x565618(0x314)]?.[_0x565618(0x21b)]?.('registry\x20publish\x20failing:\x20'+_0xa0e5af[_0x565618(0x188)],{'feature':'processes'}));}}async[_0x2abc23(0x268)](){const _0xdb59a7=_0x2abc23;if(this[_0xdb59a7(0x28a)]){for(const _0x19f08a of _0xffa4ec){try{this[_0xdb59a7(0x12e)][_0xdb59a7(0x25b)][_0xdb59a7(0x1fa)](_0x19f08a,this['_onProcEvent']);}catch{}}this['_onProcEvent']=null;}this[_0xdb59a7(0x359)]&&(clearInterval(this[_0xdb59a7(0x359)]),this[_0xdb59a7(0x359)]=null);try{if(this[_0xdb59a7(0x2d9)]&&this[_0xdb59a7(0x247)])await this['removeNode'](this[_0xdb59a7(0x191)]);}catch{}}async[_0x2abc23(0x2a3)](){const _0x3ef69d=_0x2abc23;if(!this[_0x3ef69d(0x2d9)]||!this[_0x3ef69d(0x247)])return;try{await this[_0x3ef69d(0x1ed)](this['_rowKey']);}catch{}try{const _0x563a36=[];for(const {value:_0x5b1ff0}of this[_0x3ef69d(0x2d9)][_0x3ef69d(0x2bf)](_0x326745)){if(_0x5b1ff0?.[_0x3ef69d(0x2f3)]===process[_0x3ef69d(0x1a8)]&&_0x5b1ff0[_0x3ef69d(0x175)])_0x563a36[_0x3ef69d(0x1b4)](_0x5b1ff0[_0x3ef69d(0x175)]);}for(const _0x19510c of _0x563a36){try{await this[_0x3ef69d(0x1ed)](_0x19510c);}catch{}}}catch{}}async[_0x2abc23(0x216)](){const _0x4ab793=_0x2abc23;return this[_0x4ab793(0x1a7)](this[_0x4ab793(0x163)]());}async[_0x2abc23(0x2ea)](_0x215a75){const _0x16e7ee=_0x2abc23;if(!this[_0x16e7ee(0x2d9)]||!this[_0x16e7ee(0x247)])return;return this[_0x16e7ee(0x1a7)](this[_0x16e7ee(0x305)](_0x215a75));}[_0x2abc23(0x305)]({pid:_0x15c0ea,startedAt:_0x4844d1,kind:_0xde9ef8,supervisorKey:_0x2ad019,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x2abc23(0x1cc),meta:meta=null,stats:stats=null}){const _0xed0368=_0x2abc23,_0x44f7df=Date[_0xed0368(0x348)](),_0x2cfaa7=_0x3a50de(_0x15c0ea,_0x4844d1);return{'nodeKey':_0xaad60e(_0x2cfaa7,'0'),'processKey':_0x2cfaa7,'instanceId':'0','pid':_0x15c0ea,'startedAt':_0x4844d1,'ppid':process[_0xed0368(0x1a8)],'host':_0xf1a56e[_0xed0368(0x15b)](),'supervisorKey':_0x2ad019,'slot':slot,'slotKey':slotKey,'kind':_0xde9ef8,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x44f7df,'expiresAt':_0x44f7df+_0x1da1ba,'caps':this['_caps'](_0xde9ef8,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x55bebc){const _0x230d22=_0x2abc23;if(!_0x55bebc?.[_0x230d22(0x1a8)])return null;const _0x84d932=_0x3a50de(_0x55bebc['pid'],_0x55bebc[_0x230d22(0x19e)]);this[_0x230d22(0x336)][_0x230d22(0x217)](_0x84d932,{..._0x55bebc,'supervisorKey':_0x55bebc[_0x230d22(0x332)]??this['_selfKey']});if(this[_0x230d22(0x247)])await this['publishChildRow'](this[_0x230d22(0x336)][_0x230d22(0x1fd)](_0x84d932))[_0x230d22(0x183)]?.(()=>{});return _0x84d932;}[_0x2abc23(0x27e)](_0x146829){const _0x4429d6=_0x2abc23;if(!_0x146829)return;return this[_0x4429d6(0x336)][_0x4429d6(0x23f)](_0x146829),this[_0x4429d6(0x1ed)](_0x146829);}[_0x2abc23(0x323)](){const _0x28a257=_0x2abc23,_0xcced42=Date[_0x28a257(0x348)](),_0x5f1ef9=process[_0x28a257(0x358)](),_0x191302=(_0xcced42-this[_0x28a257(0x262)])*0x3e8;if(_0x191302>=0x3d090){const _0x1f9040=_0x5f1ef9[_0x28a257(0x252)]-this['_lastCpuUsage'][_0x28a257(0x252)]+(_0x5f1ef9['system']-this['_lastCpuUsage'][_0x28a257(0x1e7)]),_0xafe818=_0xf1a56e[_0x28a257(0x12d)]()[_0x28a257(0x149)]||0x1;this[_0x28a257(0x24d)]=Math[_0x28a257(0x278)](0x64,Math[_0x28a257(0x143)](_0x1f9040/(_0x191302*_0xafe818)*0x64)),this['_lastCpuWindowMs']=Math[_0x28a257(0x143)](_0x191302/0x3e8),this[_0x28a257(0x17c)]=_0x5f1ef9,this[_0x28a257(0x262)]=_0xcced42;}const _0x384717=process[_0x28a257(0x2e2)](),_0x3c7cac=this['_threadStats']['size'];let _0x315e58=0x0;if(_0x3c7cac>0x0){const _0x5c1934=[this[_0x28a257(0x12e)],...this[_0x28a257(0x12e)][_0x28a257(0x31a)]?.[_0x28a257(0x1c9)]?.()??[]];for(const _0xa227e9 of _0x5c1934){const _0x38b258=_0xa227e9[_0x28a257(0x228)]?.[_0x28a257(0x331)];if(_0x38b258)_0x315e58+=_0x38b258['liveThreadStats']['busy'];}}let _0x2808dc=null;const _0x54dfd5=_0x3c7cac;if(_0x54dfd5>0x0){let _0x41684c=0x0;for(const _0x37a140 of this[_0x28a257(0x241)][_0x28a257(0x1c9)]())_0x41684c+=_0x37a140[_0x28a257(0x347)]||0x0;_0x2808dc={'count':_0x54dfd5,'heapUsed':_0x41684c,'sandbox':_0x3c7cac,'busy':_0x315e58};}return{'rss':_0x384717[_0x28a257(0x2c0)],'heapUsed':_0x384717[_0x28a257(0x347)],'heapTotal':_0x384717[_0x28a257(0x125)],'external':_0x384717[_0x28a257(0x1c2)],'cpuPct':this[_0x28a257(0x24d)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x2808dc,'at':_0xcced42};}[_0x2abc23(0x25a)](_0x5bae26,_0x59e905){const _0x41bd74=_0x2abc23;if(!_0x5bae26||!_0x59e905)return;this[_0x41bd74(0x241)]['set'](_0x5bae26,_0x59e905);}[_0x2abc23(0x320)](_0x446857){const _0xf7fc49=_0x2abc23;this[_0xf7fc49(0x241)]['delete'](_0x446857);}[_0x2abc23(0x291)](_0x5e6f7c,_0x23cc4d,_0x42b24b=undefined){const _0xa4ee10=_0x2abc23,_0x17f566=this[_0xa4ee10(0x336)][_0xa4ee10(0x1fd)](_0x5e6f7c);if(!_0x17f566||!_0x23cc4d)return;if(_0x42b24b!==undefined)_0x17f566[_0xa4ee10(0x201)]=_0x42b24b;_0x17f566['stats']={'rss':_0x23cc4d[_0xa4ee10(0x2c0)]??null,'heapUsed':_0x23cc4d[_0xa4ee10(0x347)]??null,'heapTotal':_0x23cc4d[_0xa4ee10(0x125)]??null,'external':_0x23cc4d[_0xa4ee10(0x1c2)]??null,'cpuPct':_0x23cc4d['cpuPct']??null,'cpuWindowMs':_0x23cc4d[_0xa4ee10(0x211)]??null,'threads':_0x23cc4d['threads']??null,'claims':_0x23cc4d[_0xa4ee10(0x1a4)]??null,'envsOpen':_0x23cc4d[_0xa4ee10(0x1c6)]??null,'at':Date['now']()};}['_buildOwnRow'](){const _0x172d88=_0x2abc23,_0x3a4a4e=Date[_0x172d88(0x348)](),_0x1c7b2b=this[_0x172d88(0x12e)][_0x172d88(0x2a8)]||{},_0x277e52=this[_0x172d88(0x356)]||'cli';return{'nodeKey':this['_rowKey'],'processKey':this['_selfKey'],'instanceId':this[_0x172d88(0x1da)],'pid':process[_0x172d88(0x1a8)],'startedAt':this[_0x172d88(0x343)],'instanceStartedAt':this[_0x172d88(0x1f9)],'ppid':typeof process['ppid']==='number'?process[_0x172d88(0x2f3)]:null,'host':_0xf1a56e[_0x172d88(0x15b)](),'supervisorKey':this[_0x172d88(0x199)]??null,'version':require$$6[_0x172d88(0x342)],'kind':_0x277e52,'role':{'engines':!!_0x1c7b2b[_0x172d88(0x33f)],'processors':!!_0x1c7b2b['processors'],'compaction':_0x1c7b2b[_0x172d88(0x2e8)],'http':_0x1c7b2b['http']},'listenAddr':this[_0x172d88(0x155)]??null,'heartbeatAt':_0x3a4a4e,'expiresAt':_0x3a4a4e+_0x1da1ba,'caps':this['_caps'](_0x277e52,_0x1c7b2b),'lifecycle':{'state':_0x172d88(0x1cc),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x1c7b2b[_0x172d88(0x2d3)]?this[_0x172d88(0x2ff)]():null,'engines':_0x1c7b2b[_0x172d88(0x33f)]?[...this[_0x172d88(0x12e)][_0x172d88(0x2a7)]??[]]:null,'singletonClaims':this[_0x172d88(0x341)](),'stats':this[_0x172d88(0x323)](),'writers':this[_0x172d88(0x1ab)]()};}[_0x2abc23(0x1ab)](){const _0x82df5e=_0x2abc23,_0x504d43={};try{for(const [_0x52f9ae,_0x606240]of this['okdb']['_envs']){try{const _0x3ce7b5=_0x606240[_0x82df5e(0x126)]?.();if(!_0x3ce7b5)continue;if(!_0x3ce7b5['depth']&&!_0x3ce7b5[_0x82df5e(0x304)]&&!(_0x3ce7b5[_0x82df5e(0x33d)]??0x0)&&!_0x3ce7b5[_0x82df5e(0x1ba)])continue;_0x504d43[_0x52f9ae]={'depth':_0x3ce7b5[_0x82df5e(0x196)],'oldestPendingMs':_0x3ce7b5[_0x82df5e(0x203)],'committed':_0x3ce7b5[_0x82df5e(0x304)],'commitsPerSec':_0x3ce7b5['commitsPerSec'],'commitP99Ms':_0x3ce7b5[_0x82df5e(0x197)],'parkedNow':_0x3ce7b5[_0x82df5e(0x33d)]??0x0,'draining':!!_0x3ce7b5[_0x82df5e(0x1ba)]};}catch{}}}catch{}return Object['keys'](_0x504d43)['length']?_0x504d43:null;}[_0x2abc23(0x341)](){const _0x3a9bee=_0x2abc23,_0x117ac4=process[_0x3a9bee(0x1a8)],_0x13a890=Date[_0x3a9bee(0x348)](),_0x31bb56=_0x3fac23=>{const _0x3f32e4=_0x3a9bee;if(!_0x3fac23)return[];const _0x2e0608=[];try{for(const {id:_0x2c81ed,entry:_0x5a191a}of _0x3fac23[_0x3f32e4(0x1de)]()){if(_0x5a191a?.[_0x3f32e4(0x27f)]?.[_0x3f32e4(0x1a8)]!==_0x117ac4)continue;const _0xfb895b=_0x5a191a[_0x3f32e4(0x354)]??_0x5a191a['acquiredAt']??0x0;if(_0xfb895b+(_0x5a191a[_0x3f32e4(0x24a)]??0x0)<_0x13a890)continue;_0x2e0608[_0x3f32e4(0x1b4)](_0x2c81ed);}}catch{}return _0x2e0608;},_0x1307f0=_0x31bb56(this['_singletonLock'](_0x3a9bee(0x34e))),_0x4b23ef=_0x31bb56(this[_0x3a9bee(0x30e)]('sync'));if(!_0x1307f0[_0x3a9bee(0x149)]&&!_0x4b23ef[_0x3a9bee(0x149)])return null;return{'compact':_0x1307f0,'replicate':_0x4b23ef};}[_0x2abc23(0x30e)](_0x31f459){const _0x44734b=_0x2abc23;if(!this[_0x44734b(0x12e)]?.['_rootDb'])return null;if(!this['_singletonLocks'])this[_0x44734b(0x215)]=new Map();let _0x114309=this[_0x44734b(0x215)][_0x44734b(0x1fd)](_0x31f459);if(!_0x114309)try{_0x114309=new _0x26ca52(this[_0x44734b(0x12e)][_0x44734b(0x302)],{'namespace':_0x31f459}),this[_0x44734b(0x215)]['set'](_0x31f459,_0x114309);}catch{return null;}return _0x114309;}[_0x2abc23(0x2ff)](){const _0x36c02a=_0x2abc23,_0x3a76d2=[];try{for(const [_0x3d550f,_0x353947]of this[_0x36c02a(0x12e)][_0x36c02a(0x31a)]){if(_0x3d550f[_0x36c02a(0x198)]('~'))continue;for(const _0x1b417d of _0x353947[_0x36c02a(0x137)]['tierList']())_0x3a76d2[_0x36c02a(0x1b4)]({..._0x1b417d,'env':_0x3d550f});}}catch{}return{'participate':this['okdb'][_0x36c02a(0x2d3)]?.[_0x36c02a(0x280)]??![],'processors':_0x3a76d2};}['_ensureDesired'](){const _0x4944f4=_0x2abc23;if(this[_0x4944f4(0x333)])return!![];const _0x28b99c=this[_0x4944f4(0x12e)][_0x4944f4(0x302)];if(!_0x28b99c)return![];return this['_desired']=_0x28b99c[_0x4944f4(0x1bb)](_0x4ab62b,{'dupSort':![]}),this['_cmd']=_0x28b99c[_0x4944f4(0x1bb)](_0x291776,{'dupSort':![]}),!![];}async[_0x2abc23(0x12c)](){const _0x5dabc8=_0x2abc23;if(!this[_0x5dabc8(0x17b)]())return;const _0x4278d0='__vocab/version',_0x41f536=0x1,_0x526a0e=this[_0x5dabc8(0x333)][_0x5dabc8(0x1fd)](_0x4278d0)??0x0;if(_0x526a0e>=_0x41f536)return;const _0x276765=_0xf4a593=>{const _0x506f89=_0x5dabc8;if(_0xf4a593===_0x506f89(0x351))return'single';if(_0xf4a593===_0x506f89(0x26a))return _0x506f89(0x301);return _0xf4a593;};await this[_0x5dabc8(0x12e)][_0x5dabc8(0x14a)][_0x5dabc8(0x30d)]['transaction'](()=>{const _0x3125c8=_0x5dabc8;for(const _0x3dc836 of['procmode/',_0x3125c8(0x22f)]){for(const {key:_0x39318,value:_0x2bfe26}of this[_0x3125c8(0x333)][_0x3125c8(0x2bf)]({'start':_0x3dc836,'end':_0x3dc836+'ÿ'})){if(typeof _0x39318!=='string'||!_0x39318[_0x3125c8(0x198)](_0x3dc836))break;const _0x300e21=_0x276765(_0x2bfe26[_0x3125c8(0x17f)]);if(_0x300e21!==_0x2bfe26[_0x3125c8(0x17f)])this[_0x3125c8(0x333)][_0x3125c8(0x129)](_0x39318,{..._0x2bfe26,'mode':_0x300e21});}}this[_0x3125c8(0x333)][_0x3125c8(0x129)](_0x4278d0,_0x41f536);});}[_0x2abc23(0x2bc)](){const _0x40c81f=_0x2abc23;return!!this[_0x40c81f(0x333)];}[_0x2abc23(0x1a1)](_0x320609,_0x50ed33){const _0x6acf67=_0x2abc23;if(!this[_0x6acf67(0x17b)]())return null;const _0x1d8b2b=_0x320609+'/'+_0x50ed33;return this[_0x6acf67(0x2b0)](),this['_desiredOverlay'][_0x6acf67(0x1fd)](_0x1d8b2b)??this[_0x6acf67(0x333)][_0x6acf67(0x1fd)](_0x1d8b2b)??null;}[_0x2abc23(0x2b0)](){const _0x3f9bd8=_0x2abc23;if(!_0x2e020a)return;try{this[_0x3f9bd8(0x12e)][_0x3f9bd8(0x14a)]?.['db']?.[_0x3f9bd8(0x2f7)]?.();}catch{}}async[_0x2abc23(0x352)](_0x1ae24c,_0x44324c,_0x2dc7d0){const _0x92488d=_0x2abc23;if(!this[_0x92488d(0x17b)]())return null;const _0x551fb4=_0x1ae24c+'/'+_0x44324c;this[_0x92488d(0x2b0)]();const _0x2e5573=this[_0x92488d(0x297)][_0x92488d(0x1fd)](_0x551fb4)??this[_0x92488d(0x333)][_0x92488d(0x1fd)](_0x551fb4)??{'version':0x0},_0x44cb2e=(_0x2e5573[_0x92488d(0x342)]||0x0)+0x1,_0x13d351={..._0x2e5573,..._0x2dc7d0,'version':_0x44cb2e,'updatedAt':Date['now']()};this[_0x92488d(0x297)]['set'](_0x551fb4,_0x13d351);try{await this[_0x92488d(0x12e)]['_systemEnv']['_writer']['transaction'](()=>{const _0x4f3f3b=_0x92488d;this[_0x4f3f3b(0x333)][_0x4f3f3b(0x129)](_0x551fb4,_0x13d351);});}finally{if(this[_0x92488d(0x297)][_0x92488d(0x1fd)](_0x551fb4)===_0x13d351)this[_0x92488d(0x297)][_0x92488d(0x23f)](_0x551fb4);}return _0x44cb2e;}[_0x2abc23(0x296)](_0xd1114f){const _0x358afe=_0x2abc23;if(!this[_0x358afe(0x17b)]())return[];this[_0x358afe(0x2b0)]();const _0x394cdb=_0xd1114f+'/',_0x1357bd=[];for(const {key:_0x41eb4c,value:_0x1bea9b}of this[_0x358afe(0x333)][_0x358afe(0x2bf)]({'start':_0x394cdb,'end':_0x394cdb+'ÿ'})){if(typeof _0x41eb4c!==_0x358afe(0x1e5)||!_0x41eb4c[_0x358afe(0x198)](_0x394cdb))break;_0x1357bd[_0x358afe(0x1b4)]({'key':_0x41eb4c[_0x358afe(0x244)](_0x394cdb['length']),'value':_0x1bea9b});}return _0x1357bd;}[_0x2abc23(0x165)](_0x393d36){const _0x3fbb67=_0x2abc23;if(!this[_0x3fbb67(0x17b)]())return null;return this['_cmd'][_0x3fbb67(0x1fd)](_0x393d36)??null;}async['bumpCmd'](_0x5ca974,_0xc34318,_0x2c6738={}){const _0x5dfda7=_0x2abc23;if(!this[_0x5dfda7(0x17b)]())return null;let _0x42ce19;return await this[_0x5dfda7(0x12e)][_0x5dfda7(0x14a)][_0x5dfda7(0x30d)]['transaction'](()=>{const _0x4962fe=_0x5dfda7,_0x4d41d1=this[_0x4962fe(0x2b5)][_0x4962fe(0x1fd)](_0x5ca974)||{'epoch':0x0};_0x42ce19=(_0x4d41d1[_0x4962fe(0x1f3)]||0x0)+0x1,this[_0x4962fe(0x2b5)][_0x4962fe(0x129)](_0x5ca974,{..._0x4d41d1,..._0x2c6738,'cmd':_0xc34318,'epoch':_0x42ce19,'updatedAt':Date['now']()});}),_0x42ce19;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x4c501d,'nodeKey':_0x3a50de,'logicalKey':_0x5ef476,'slotKey':_0x231cb9,'PROCESS_ENV':_0x204a5a,'NODE_TYPE':_0x326745},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x201e9b=_0x337619;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x367271=require$$0$4,{EVENTS:_0x4cfdfb,CHANGE_ACTIONS:_0x486c1b}=requireOkdbEnums(),{LOOP:_0x482767}=requireOkdbLoopMonitor(),_0x34e1ae=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x5628c9=0x5,_0xbdb910=0x2710;class _0x15d904 extends _0x367271{constructor(_0x484737,_0x1045da={}){const _0x57b48f=_0x58e7;super(),this['okdb']=_0x484737,this[_0x57b48f(0x20b)]=_0x1045da['quantum']??_0x34e1ae,this['_flushDebounce']=_0x1045da[_0x57b48f(0x2ba)]??_0x5628c9,this[_0x57b48f(0x31e)]=_0x1045da[_0x57b48f(0x306)]??_0xbdb910,this['_started']=![],this[_0x57b48f(0x29b)]=new Map(),this[_0x57b48f(0x2df)]=new Map(),this[_0x57b48f(0x19c)]=new Map(),this[_0x57b48f(0x162)]=null,this[_0x57b48f(0x26f)]=![],this[_0x57b48f(0x2fc)]=new Set(),this[_0x57b48f(0x1d9)]=_0x536b5c=>this[_0x57b48f(0x270)](_0x536b5c),this[_0x57b48f(0x281)]=_0x3a0003=>this[_0x57b48f(0x2fa)](_0x3a0003),this[_0x57b48f(0x2e3)]=()=>this[_0x57b48f(0x2d2)]();}['start'](){const _0x966cd2=_0x58e7;if(this[_0x966cd2(0x227)])return;this[_0x966cd2(0x227)]=!![];for(const [_0x2eceaa,_0x132524]of this[_0x966cd2(0x12e)][_0x966cd2(0x31a)]){if(_0x2eceaa['startsWith']('~'))continue;try{_0x132524[_0x966cd2(0x32d)]();}catch{}}for(const [_0x891ce9,_0x4db207]of this[_0x966cd2(0x12e)][_0x966cd2(0x31a)]){if(_0x891ce9['startsWith']('~'))continue;try{this[_0x966cd2(0x2df)][_0x966cd2(0x217)](_0x891ce9,_0x4db207['getClock']()||0x0);}catch{}}const {events:_0x1f0458}=this[_0x966cd2(0x12e)];_0x1f0458['on'](_0x4cfdfb[_0x966cd2(0x166)],this[_0x966cd2(0x1d9)]),_0x1f0458['on'](_0x4cfdfb['ITEM_UPDATE'],this[_0x966cd2(0x1d9)]),_0x1f0458['on'](_0x4cfdfb[_0x966cd2(0x25d)],this[_0x966cd2(0x1d9)]),_0x1f0458['on'](_0x4cfdfb[_0x966cd2(0x32e)],this[_0x966cd2(0x281)]),_0x1f0458[_0x966cd2(0x2ab)](_0x4cfdfb[_0x966cd2(0x28f)],this[_0x966cd2(0x2e3)]);}[_0x201e9b(0x2d2)](){const _0xc875df=_0x201e9b;if(!this['_started'])return;this[_0xc875df(0x227)]=![];const {events:_0x5b7503}=this[_0xc875df(0x12e)];_0x5b7503['off'](_0x4cfdfb['ITEM_CREATE'],this['_onItem']),_0x5b7503[_0xc875df(0x1fa)](_0x4cfdfb[_0xc875df(0x30a)],this['_onItem']),_0x5b7503[_0xc875df(0x1fa)](_0x4cfdfb[_0xc875df(0x25d)],this[_0xc875df(0x1d9)]),_0x5b7503['off'](_0x4cfdfb[_0xc875df(0x32e)],this[_0xc875df(0x281)]);try{_0x5b7503[_0xc875df(0x1fa)](_0x4cfdfb[_0xc875df(0x28f)],this[_0xc875df(0x2e3)]);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this[_0xc875df(0x162)]=null),this[_0xc875df(0x19c)][_0xc875df(0x326)](),this[_0xc875df(0x29b)][_0xc875df(0x326)](),this[_0xc875df(0x2df)][_0xc875df(0x326)](),this[_0xc875df(0x2fc)][_0xc875df(0x326)]();}[_0x201e9b(0x1bc)](_0x157ba5,_0x39d049,_0x27a8f6,_0xe50fba){return _0x157ba5+'\x00'+_0x39d049+'\x00'+_0x27a8f6+'\x00'+_0xe50fba;}['_markSeen'](_0xbf50b6,_0x53ea92,_0x3f2b,_0x3b0c7a){const _0x2446b0=_0x201e9b,_0x8931d5=this[_0x2446b0(0x1bc)](_0xbf50b6,_0x53ea92,_0x3f2b,_0x3b0c7a);if(this[_0x2446b0(0x2fc)]['has'](_0x8931d5))return![];this[_0x2446b0(0x2fc)]['add'](_0x8931d5);if(this[_0x2446b0(0x2fc)][_0x2446b0(0x1e8)]>this[_0x2446b0(0x31e)]){const _0x1d70cc=this[_0x2446b0(0x2fc)][_0x2446b0(0x1c9)]()[_0x2446b0(0x330)]()[_0x2446b0(0x21c)];this['_seen'][_0x2446b0(0x23f)](_0x1d70cc);}return!![];}['_handleInProcess'](_0xcc2711){const _0x532c50=_0x201e9b;if(!this[_0x532c50(0x227)]||!_0xcc2711)return;const {env:_0x4af93c,type:_0x31d2c2,key:_0x424fe3,clock:_0x8c409d,origin:_0x219dd1,action:_0x58e695,newValue:_0x531c19,oldValue:_0x39058d}=_0xcc2711;if(_0x4af93c==null||_0x31d2c2==null||_0x424fe3==null)return;if(typeof _0x4af93c===_0x532c50(0x1e5)&&_0x4af93c[_0x532c50(0x198)]('~'))return;if(typeof _0x31d2c2===_0x532c50(0x1e5)&&_0x31d2c2['startsWith']('~'))return;if(!this[_0x532c50(0x182)](_0x4af93c,_0x31d2c2,_0x424fe3,_0x8c409d))return;const _0x5ccf40=_0x58e695===_0x486c1b[_0x532c50(0x274)]?_0x532c50(0x1f2):_0x532c50(0x129);this[_0x532c50(0x2a9)](_0x532c50(0x18f),{'env':_0x4af93c,'type':_0x31d2c2,'key':_0x424fe3,'op':_0x5ccf40,'clock':_0x8c409d,'origin':_0x219dd1,'value':_0x5ccf40===_0x532c50(0x1f2)?null:_0x531c19,'prevValue':_0x39058d});}[_0x201e9b(0x2fa)](_0x14f3af){const _0x10430e=_0x201e9b;if(!this['_started'])return;if(!_0x14f3af||typeof _0x14f3af[_0x10430e(0x21a)]!=='string'||typeof _0x14f3af[_0x10430e(0x171)]!==_0x10430e(0x1e5))return;const {env:_0x1ff18c,type:_0x19b880}=_0x14f3af;if(_0x1ff18c['startsWith']('~')||_0x19b880[_0x10430e(0x198)]('~'))return;this[_0x10430e(0x19c)][_0x10430e(0x217)](_0x1ff18c+'\x00'+_0x19b880,{'env':_0x1ff18c,'type':_0x19b880}),this[_0x10430e(0x1d2)]();}[_0x201e9b(0x1d2)](){const _0x2da8f7=_0x201e9b;if(this['_flushTimer'])return;const _0x173b18=()=>{const _0x12c4b6=_0x58e7;this[_0x12c4b6(0x162)]=null,this[_0x12c4b6(0x238)]()['catch'](()=>{});};this[_0x2da8f7(0x162)]=setTimeout(_0x173b18,this[_0x2da8f7(0x2b3)]>0x0?this[_0x2da8f7(0x2b3)]:0x0);}async['_drain'](){const _0xa9de0b=_0x201e9b;if(this[_0xa9de0b(0x26f)]){this[_0xa9de0b(0x1d2)]();return;}this[_0xa9de0b(0x26f)]=!![];try{const _0x3c1ec3=[...this[_0xa9de0b(0x19c)][_0xa9de0b(0x1c9)]()];this[_0xa9de0b(0x19c)][_0xa9de0b(0x326)]();let _0x34606e=![];for(const {env:_0x51b42e,type:_0x2e8bd7}of _0x3c1ec3){try{const _0x24baa9=await this['_drainOne'](_0x51b42e,_0x2e8bd7);if(_0x24baa9)_0x34606e=!![];}catch{this[_0xa9de0b(0x19c)]['set'](_0x51b42e+'\x00'+_0x2e8bd7,{'env':_0x51b42e,'type':_0x2e8bd7}),_0x34606e=!![];}}if(_0x34606e||this[_0xa9de0b(0x19c)][_0xa9de0b(0x1e8)]>0x0)this[_0xa9de0b(0x1d2)]();}finally{this[_0xa9de0b(0x26f)]=![];}}async[_0x201e9b(0x205)](_0x5b07fc,_0x3fcdeb){const _0x1fe932=_0x201e9b,_0x4434e5=await this['okdb'][_0x1fe932(0x233)](_0x5b07fc),_0x29c65b=_0x5b07fc+'\x00'+_0x3fcdeb;!this['_cursors'][_0x1fe932(0x222)](_0x29c65b)&&(!this[_0x1fe932(0x2df)]['has'](_0x5b07fc)&&(_0x4434e5[_0x1fe932(0x32d)](),this['_baselines'][_0x1fe932(0x217)](_0x5b07fc,_0x4434e5[_0x1fe932(0x138)]()||0x0)),this[_0x1fe932(0x29b)]['set'](_0x29c65b,this[_0x1fe932(0x2df)][_0x1fe932(0x1fd)](_0x5b07fc)));const _0x339b59=this[_0x1fe932(0x29b)]['get'](_0x29c65b),_0x3c70fe=_0x4434e5[_0x1fe932(0x138)](_0x3fcdeb)||0x0;if(_0x3c70fe<=_0x339b59)return![];const _0x3c2826=_0x339b59+this[_0x1fe932(0x20b)],_0x2e3493=Math[_0x1fe932(0x278)](_0x3c70fe,_0x3c2826),_0x443275=_0x482767[_0x1fe932(0x2fb)]?_0x482767[_0x1fe932(0x348)]():0x0,_0x5435e=Array[_0x1fe932(0x123)](_0x4434e5[_0x1fe932(0x1fe)](_0x3fcdeb,_0x339b59+0x1,_0x2e3493));let _0x1f77cc=_0x339b59;for(const _0x54e4d7 of _0x5435e){const {clock:_0x3a085e,key:_0x498063,action:_0x3a5c6e,origin:_0x57ed4a}=_0x54e4d7;if(_0x3a085e>_0x1f77cc)_0x1f77cc=_0x3a085e;if(_0x498063==null)continue;if(!this[_0x1fe932(0x182)](_0x5b07fc,_0x3fcdeb,_0x498063,_0x3a085e))continue;let _0x14a572,_0x44b6f4;if(_0x3a5c6e===_0x486c1b[_0x1fe932(0x274)])_0x14a572=_0x1fe932(0x1f2),_0x44b6f4=null;else{const _0x40bd08=_0x4434e5['get'](_0x3fcdeb,_0x498063);_0x40bd08==null?(_0x14a572='remove',_0x44b6f4=null):(_0x14a572='put',_0x44b6f4=_0x40bd08);}this[_0x1fe932(0x2a9)](_0x1fe932(0x18f),{'env':_0x5b07fc,'type':_0x3fcdeb,'key':_0x498063,'op':_0x14a572,'clock':_0x3a085e,'origin':_0x57ed4a,'value':_0x44b6f4});}if(_0x482767['enabled'])_0x482767[_0x1fe932(0x30f)](_0x1fe932(0x261)+_0x5b07fc+':'+_0x3fcdeb,_0x482767[_0x1fe932(0x348)]()-_0x443275,'n='+_0x5435e['length']);return this[_0x1fe932(0x29b)]['set'](_0x29c65b,Math[_0x1fe932(0x17a)](_0x1f77cc,_0x2e3493)),_0x4434e5[_0x1fe932(0x138)](_0x3fcdeb)>_0x2e3493;}[_0x201e9b(0x29d)](){const _0x164c0b=_0x201e9b;return{'started':this[_0x164c0b(0x227)],'quantum':this['_quantum'],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x164c0b(0x213)]([...this[_0x164c0b(0x29b)]['entries']()][_0x164c0b(0x33e)](([_0x1327ee,_0x3162df])=>[_0x1327ee[_0x164c0b(0x1f1)]('\x00',':'),_0x3162df])),'pending':this[_0x164c0b(0x19c)][_0x164c0b(0x1e8)],'seen':this[_0x164c0b(0x2fc)][_0x164c0b(0x1e8)]};}}return _0x15d904[_0x201e9b(0x321)]=_0x34e1ae,okdbChangefeed={'OKDBChangefeed':_0x15d904},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x17ad02=_0x337619;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x3406f1=require$$1$1,_0x5508c2=require$$1,{EVENTS:_0x21bf8f}=requireOkdbEnums(),_0x38f0f9=require$$0$3,{slotKey:_0x2f92be}=requireOkdbProcessRegistry(),_0x5ced5d=0xfa,_0x4887e5=0xfa0,_0x4652fb=0x5,_0x2da6a2=0x2710,_0x43babd=0xbb8,_0x1a1558=0x7d0,_0x2f36c8=_0x17ad02(0x161),_0x331222=_0x17ad02(0x303),_0x5309fd=_0x17ad02(0x314),_0x57a3dd=_0x17ad02(0x28b),_0x629c24=[_0x21bf8f['VIEW_PROGRESS'],_0x21bf8f['FTS_REGISTERED'],_0x21bf8f[_0x17ad02(0x229)],_0x21bf8f[_0x17ad02(0x20e)],_0x21bf8f['INDEX_PROGRESS'],_0x21bf8f[_0x17ad02(0x1f6)],_0x21bf8f[_0x17ad02(0x242)],_0x21bf8f[_0x17ad02(0x15d)],_0x17ad02(0x1df),'processor:progress','processor:error',_0x17ad02(0x2f5),'processor:resumed',_0x17ad02(0x212)],_0x551a7d=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x58d000({workers:_0x5dd4b5,makeOkdb:_0x39cf0e,port:_0x88ad02,primaryOkdb:_0x47dea6,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0xd203f1=_0x17ad02;if(_0x3406f1[_0xd203f1(0x2f2)])return childEntry&&_0x3406f1['setupPrimary']({'exec':_0x5508c2[_0xd203f1(0x159)](__dirname,_0xd203f1(0x334)),'args':[],'execArgv':((()=>{const _0xe7aae5=_0xd203f1,_0x4c5b1f=[];for(let _0x442c02=0x0;_0x442c02<process[_0xe7aae5(0x2d6)][_0xe7aae5(0x149)];_0x442c02++){const _0x268fd8=process[_0xe7aae5(0x2d6)][_0x442c02];if(_0x268fd8[_0xe7aae5(0x198)](_0xe7aae5(0x288))||_0x268fd8[_0xe7aae5(0x198)](_0xe7aae5(0x317))||_0x268fd8[_0xe7aae5(0x198)](_0xe7aae5(0x22e)))continue;if(_0x268fd8==='-e'||_0x268fd8==='--eval'||_0x268fd8==='-p'||_0x268fd8===_0xe7aae5(0x2a2)){_0x442c02++;continue;}_0x4c5b1f[_0xe7aae5(0x1b4)](_0x268fd8);}return _0x4c5b1f;})())}),_0x522c0f({'workers':_0x5dd4b5,'port':_0x88ad02,'primaryOkdb':_0x47dea6,'workerEnv':workerEnv});return _0x4957d1({'makeOkdb':_0x39cf0e,'port':_0x88ad02});}function _0x522c0f({workers:_0x1ae110,port:_0x1933ff,primaryOkdb:_0xd416eb,workerEnv:_0x34caae}){const _0x84c327=_0x17ad02,_0x5493d9=new Map(),_0x1c0b33=new Map();let _0x58c0ae=![];const _0x58380d=_0x5beb77=>_0x5beb77?.[_0x84c327(0x14b)],_0x30e316=_0x48cf0d=>{const _0x522de6=_0x84c327,_0x4db195=_0x3406f1['fork']({...process.env,..._0x34caae||{},'OKDB_CLUSTER_SLOT':String(_0x48cf0d)});return _0x4db195[_0x522de6(0x14b)]=_0x48cf0d,_0x5493d9[_0x522de6(0x217)](_0x4db195[_0x522de6(0x1c8)]['pid'],{'worker':_0x4db195,'startedAt':Date[_0x522de6(0x348)](),'slot':_0x48cf0d}),_0x4db195['on']('error',_0x2e8294=>{const _0x58d681=_0x522de6;console['log']('[okdb-cluster]\x20worker\x20pid='+_0x4db195[_0x58d681(0x1c8)]['pid']+_0x58d681(0x1ae)+(_0x2e8294?.[_0x58d681(0x188)]??_0x2e8294));}),_0x4db195['on'](_0x522de6(0x1b7),()=>_0x1a24d0()),_0x4db195;},_0x277923=_0x549bbe=>{const _0x2ddfde=_0x84c327;for(const {worker:_0x1c1d2f}of _0x5493d9[_0x2ddfde(0x1c9)]()){if(_0x1c1d2f['isDead']()||!_0x1c1d2f[_0x2ddfde(0x2b1)]())continue;try{_0x1c1d2f[_0x2ddfde(0x22d)](_0x549bbe);}catch{}}};_0xd416eb?.[_0x84c327(0x2ad)]?.({'kind':'primary','listenAddr':':'+_0x1933ff})[_0x84c327(0x183)](()=>{}),_0xd416eb?.[_0x84c327(0x340)]?.[_0x84c327(0x2f9)]?.({'workersConfigured':_0x1ae110});const _0x1e0d08={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x1a24d0=()=>{const _0x116998=_0x84c327,_0x5d4832=_0xd416eb?.[_0x116998(0x340)];if(!_0x5d4832||!_0x5d4832['_isWriter'])return;const _0x3b7095=_0x5d4832[_0x116998(0x16d)];for(const {worker:_0x2ed09a,startedAt:_0xb24dc4,slot:_0x3f8bc6,stats:_0x47ed85,processing:_0x2469cf}of _0x5493d9[_0x116998(0x1c9)]()){if(_0x2ed09a[_0x116998(0x16e)]())continue;const _0x3d00dc=_0x5d4832[_0x116998(0x2bc)]?.()&&_0x5d4832['getDesired'](_0x116998(0x207),_0xfb7d35(_0x3f8bc6))?.[_0x116998(0x292)]===!![];_0x5d4832[_0x116998(0x2ea)]({'pid':_0x2ed09a[_0x116998(0x1c8)][_0x116998(0x1a8)],'startedAt':_0xb24dc4,'kind':_0x116998(0x19a),'supervisorKey':_0x3b7095,'slot':_0x3f8bc6,'slotKey':_0xfb7d35(_0x3f8bc6),'role':_0x1e0d08,'listenAddr':':'+_0x1933ff,'lifecycle':_0x3d00dc?'decommissioning':'running','processing':_0x2469cf??null,'stats':_0x47ed85??null})['catch'](()=>{});}},_0xfb7d35=_0x2031cf=>_0x2f92be(_0x84c327(0x311)+_0x1933ff,_0x2031cf),_0x201bfc=_0x5ec35d=>{const _0x42e54f=_0x84c327,_0x328ea3=_0xd416eb?.['processes'];if(!_0x328ea3?.[_0x42e54f(0x2bc)]?.())return![];return _0x328ea3[_0x42e54f(0x1a1)](_0x42e54f(0x207),_0xfb7d35(_0x5ec35d))?.[_0x42e54f(0x292)]===!![];};for(let _0x3b64c4=0x0;_0x3b64c4<_0x1ae110;_0x3b64c4++){const _0x2168d6=_0x201bfc(_0x3b64c4);_0x1c0b33[_0x84c327(0x217)](_0x3b64c4,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x2168d6,'respawnTimer':null}),_0x2168d6?console['log']('[okdb-cluster]\x20slot='+_0x3b64c4+_0x84c327(0x225)):_0x30e316(_0x3b64c4);}const _0x116a8c=()=>{const _0x25827d=_0x84c327,_0x5ce327=_0xd416eb?.[_0x25827d(0x340)];if(!_0x5ce327?.[_0x25827d(0x247)]||!_0x5ce327['hasDesired']?.())return;for(const [_0x322df9,_0x3dd6f8]of _0x1c0b33[_0x25827d(0x1e2)]()){const _0x22e4c8=_0x5ce327[_0x25827d(0x1a1)]('slot',_0xfb7d35(_0x322df9)),_0x15872d=_0x22e4c8?.[_0x25827d(0x292)]===!![],_0x62fac5=_0x22e4c8?.['kill']===!![];if(_0x15872d&&!_0x3dd6f8[_0x25827d(0x31f)]){_0x3dd6f8[_0x25827d(0x31f)]=!![];_0x3dd6f8['respawnTimer']&&(clearTimeout(_0x3dd6f8[_0x25827d(0x1eb)]),_0x3dd6f8[_0x25827d(0x1eb)]=null);for(const {worker:_0x4e6e8e}of _0x5493d9[_0x25827d(0x1c9)]()){if(_0x58380d(_0x4e6e8e)!==_0x322df9||_0x4e6e8e[_0x25827d(0x16e)]())continue;try{if(_0x62fac5)_0x4e6e8e[_0x25827d(0x1c8)]['kill'](_0x25827d(0x346));else _0x4e6e8e[_0x25827d(0x2b1)]()&&_0x4e6e8e['disconnect']();}catch{}}console[_0x25827d(0x314)](_0x25827d(0x29f)+(_0x62fac5?'hard-killed':_0x25827d(0x1d6))+'\x20worker\x20slot='+_0x322df9+_0x25827d(0x14c));}else{if(!_0x15872d&&_0x3dd6f8[_0x25827d(0x31f)]&&_0x22e4c8){_0x3dd6f8['dead']=![],_0x3dd6f8['deaths']=[],_0x3dd6f8['consecutiveFailures']=0x0;const _0xa7b2b4=[..._0x5493d9[_0x25827d(0x1c9)]()][_0x25827d(0x322)](({worker:_0x2bcc0b})=>_0x58380d(_0x2bcc0b)===_0x322df9&&!_0x2bcc0b[_0x25827d(0x16e)]());!_0xa7b2b4&&!_0x58c0ae&&(_0x30e316(_0x322df9),console[_0x25827d(0x314)](_0x25827d(0x168)+_0x322df9));}}}},_0x4dea58=()=>{try{_0x116a8c();}catch{}};_0xd416eb?.[_0x84c327(0x25b)]?.['on']?.(_0x21bf8f[_0x84c327(0x1ad)],_0x4dea58);const _0x4de447=[];if(_0xd416eb?.[_0x84c327(0x25b)]?.['on'])for(const _0x3cbdc0 of _0x629c24){const _0xdb1f71=_0x4bbb54=>{_0x277923({[_0x2f36c8]:_0x331222,'event':_0x3cbdc0,'data':_0x4bbb54??{}});};_0xd416eb[_0x84c327(0x25b)]['on'](_0x3cbdc0,_0xdb1f71),_0x4de447['push']({'event':_0x3cbdc0,'handler':_0xdb1f71});}const _0x5893a9=setInterval(()=>{_0x116a8c(),_0x1a24d0();},_0x551a7d);_0x5893a9[_0x84c327(0x195)]?.();const _0x26d1de=(_0x49eab5,_0x27f351)=>{const _0xec4989=_0x84c327;if(!_0x27f351||typeof _0x27f351!==_0xec4989(0x1f0)||_0x27f351[_0x2f36c8]!==_0x5309fd)return;if(!_0xd416eb?.[_0xec4989(0x314)]?.['ingest'])return;const _0x507573=_0x27f351[_0xec4989(0x13b)]||{};_0xd416eb[_0xec4989(0x314)]['ingest']({..._0x507573,'msg':'[w'+_0x27f351[_0xec4989(0x207)]+']\x20'+(_0x507573[_0xec4989(0x2d1)]??''),'meta':{..._0x507573[_0xec4989(0x276)]||{},'worker':_0x27f351[_0xec4989(0x207)],'workerPid':_0x27f351[_0xec4989(0x1a8)]}});};_0x3406f1['on'](_0x84c327(0x188),_0x26d1de);const _0x151f9e=(_0x1a5885,_0x7fd078)=>{const _0x21e393=_0x84c327;if(!_0x7fd078||typeof _0x7fd078!==_0x21e393(0x1f0)||_0x7fd078[_0x2f36c8]!==_0x57a3dd)return;const _0x2973b3=_0x5493d9['get'](_0x1a5885['process'][_0x21e393(0x1a8)]);if(_0x2973b3){_0x2973b3['stats']={..._0x7fd078[_0x21e393(0x28b)],'at':Date[_0x21e393(0x348)]()};if(_0x7fd078[_0x21e393(0x201)]!==undefined)_0x2973b3['processing']=_0x7fd078[_0x21e393(0x201)];}};_0x3406f1['on'](_0x84c327(0x188),_0x151f9e),_0x3406f1['on'](_0x84c327(0x2c3),(_0xecc9a7,_0x366a8f,_0x512c54)=>{const _0x3fb9f6=_0x84c327,_0x7a4375=_0xecc9a7['process'][_0x3fb9f6(0x1a8)],_0x23363c=_0x58380d(_0xecc9a7),_0x5d5a39=_0x5493d9['get'](_0x7a4375);if(_0x5d5a39&&_0xd416eb?.[_0x3fb9f6(0x340)])_0xd416eb[_0x3fb9f6(0x340)][_0x3fb9f6(0x1ed)](_0x7a4375+':'+_0x5d5a39[_0x3fb9f6(0x19e)])[_0x3fb9f6(0x183)](()=>{});_0x5493d9[_0x3fb9f6(0x23f)](_0x7a4375),console[_0x3fb9f6(0x314)]('[okdb-cluster]\x20worker\x20pid='+_0x7a4375+_0x3fb9f6(0x231)+(_0x23363c??'?')+_0x3fb9f6(0x256)+(_0x3fb9f6(0x2b9)+_0x366a8f+',\x20signal='+(_0x512c54??'none')+_0x3fb9f6(0x2ee)+_0x5493d9[_0x3fb9f6(0x1e8)]+'\x20worker(s)\x20remaining')),_0x1a24d0();if(_0x58c0ae||_0x23363c==null)return;const _0x11265f=_0x1c0b33[_0x3fb9f6(0x1fd)](_0x23363c);if(!_0x11265f||_0x11265f[_0x3fb9f6(0x31f)])return;const _0xb0b60f=Date[_0x3fb9f6(0x348)]();_0x11265f[_0x3fb9f6(0x1a9)][_0x3fb9f6(0x1b4)](_0xb0b60f),_0x11265f[_0x3fb9f6(0x1a9)]=_0x11265f[_0x3fb9f6(0x1a9)][_0x3fb9f6(0x245)](_0x592567=>_0xb0b60f-_0x592567<=_0x2da6a2);if(_0x11265f['deaths']['length']>=_0x4652fb){_0x11265f[_0x3fb9f6(0x31f)]=!![],console['error'](_0x3fb9f6(0x200)+_0x23363c+'\x20died\x20'+_0x11265f['deaths'][_0x3fb9f6(0x149)]+_0x3fb9f6(0x19f)+(_0x2da6a2+_0x3fb9f6(0x23d)+_0x5493d9[_0x3fb9f6(0x1e8)]+'\x20worker(s)\x20still\x20serving'));return;}_0x11265f[_0x3fb9f6(0x251)]++;const _0xd2f0e1=Math[_0x3fb9f6(0x278)](_0x4887e5,_0x5ced5d*0x2**(_0x11265f['consecutiveFailures']-0x1));console[_0x3fb9f6(0x314)](_0x3fb9f6(0x145)+_0x23363c+_0x3fb9f6(0x310)+_0xd2f0e1+_0x3fb9f6(0x273)+_0x11265f[_0x3fb9f6(0x251)]+')'),_0x11265f[_0x3fb9f6(0x1eb)]=setTimeout(()=>{const _0x548aa8=_0x3fb9f6;_0x11265f[_0x548aa8(0x1eb)]=null;if(_0x58c0ae||_0x11265f[_0x548aa8(0x31f)])return;const _0x520418=_0x30e316(_0x23363c);_0x520418[_0x548aa8(0x2ab)]('listening',()=>{const _0xef4de4=_0x548aa8;if(_0x1c0b33[_0xef4de4(0x1fd)](_0x23363c)===_0x11265f)_0x11265f[_0xef4de4(0x251)]=0x0;});},_0xd2f0e1),_0x11265f[_0x3fb9f6(0x1eb)][_0x3fb9f6(0x195)]?.();});const _0x5ea6e4=[..._0x5493d9[_0x84c327(0x202)]()];console[_0x84c327(0x314)](_0x84c327(0x130)+process[_0x84c327(0x1a8)]+_0x84c327(0x2e1)+_0x1ae110+_0x84c327(0x258)+_0x1933ff+':\x20'+('['+_0x5ea6e4[_0x84c327(0x159)](',\x20')+']'));const _0x3f2d90={'_isClusterController':!![],'port':_0x1933ff,'primaryOkdb':_0xd416eb??null,'status'(){const _0x397460=_0x84c327;return{'clustered':!![],'primaryPid':process[_0x397460(0x1a8)],'port':_0x1933ff,'primaryRole':_0xd416eb?.[_0x397460(0x2dc)]??null,'processorPid':null,'supervisorPid':process[_0x397460(0x1a8)],'workers':[..._0x5493d9[_0x397460(0x1c9)]()][_0x397460(0x33e)](({worker:_0x1f664f})=>({'pid':_0x1f664f['process'][_0x397460(0x1a8)],'id':_0x1f664f['id'],'dead':_0x1f664f['isDead']()}))};},async 'close'(){const _0x7539f7=_0x84c327;_0x58c0ae=!![];for(const _0x41acab of _0x1c0b33['values']()){_0x41acab['dead']=!![],_0x41acab['respawnTimer']&&(clearTimeout(_0x41acab[_0x7539f7(0x1eb)]),_0x41acab[_0x7539f7(0x1eb)]=null);}clearInterval(_0x5893a9),_0x3406f1['off']('message',_0x26d1de),_0x3406f1[_0x7539f7(0x1fa)]('message',_0x151f9e),_0xd416eb?.[_0x7539f7(0x25b)]?.[_0x7539f7(0x1fa)]?.(_0x21bf8f[_0x7539f7(0x1ad)],_0x4dea58);if(_0xd416eb?.[_0x7539f7(0x25b)]?.[_0x7539f7(0x1fa)])for(const {event:_0x22f9f1,handler:_0x4feeef}of _0x4de447){try{_0xd416eb[_0x7539f7(0x25b)][_0x7539f7(0x1fa)](_0x22f9f1,_0x4feeef);}catch{}}_0x4de447[_0x7539f7(0x149)]=0x0;const _0x583f92=[..._0x5493d9['values']()]['map'](({worker:_0x3f8406})=>_0x3f8406);if(_0x583f92[_0x7539f7(0x149)]===0x0)return;await Promise[_0x7539f7(0x30b)](_0x583f92[_0x7539f7(0x33e)](_0x55bafb=>new Promise(_0x4198db=>{const _0x61e9f9=_0x7539f7;if(_0x55bafb[_0x61e9f9(0x16e)]()){_0x4198db();return;}let _0x19fd95=![];const _0x2db60e=()=>{if(_0x19fd95)return;_0x19fd95=!![];if(_0x56d94d)clearTimeout(_0x56d94d);_0x4198db();};_0x55bafb[_0x61e9f9(0x2ab)](_0x61e9f9(0x2c3),_0x2db60e);const _0x56d94d=setTimeout(()=>{const _0x1e99cf=_0x61e9f9;try{_0x55bafb[_0x1e99cf(0x1c8)]['kill']();}catch{}},_0x43babd+0x1f4);_0x56d94d[_0x61e9f9(0x195)]?.();try{_0x55bafb[_0x61e9f9(0x2ef)]();}catch{try{_0x55bafb[_0x61e9f9(0x1c8)]['kill']();}catch{}}})));}};return _0x3f2d90;}async function _0x4957d1({makeOkdb:_0x229098,port:_0x2f4161}){const _0x4b5270=_0x17ad02,_0x389f86=await _0x229098();return _0x374111(_0x389f86),_0x389f86[_0x4b5270(0x23e)]['listen'](_0x2f4161);}function _0x374111(_0x1a5bf2){const _0x26609b=_0x17ad02;if(!_0x1a5bf2||_0x1a5bf2[_0x26609b(0x33c)])return;_0x1a5bf2[_0x26609b(0x33c)]=!![];try{const {OKDBChangefeed:_0x57c516}=requireOkdbChangefeed(),_0x37870f=_0x1a5bf2['_adminRelay'];if(_0x37870f&&typeof _0x37870f[_0x26609b(0x2a0)]===_0x26609b(0x1b8)){const _0x54b144=new _0x57c516(_0x1a5bf2);_0x54b144[_0x26609b(0x1e1)](),_0x37870f[_0x26609b(0x2a0)](_0x54b144),_0x1a5bf2[_0x26609b(0x2d7)]=_0x54b144;}}catch(_0x3dded5){_0x1a5bf2[_0x26609b(0x314)]?.[_0x26609b(0x21b)]?.(_0x26609b(0x315)+(_0x3dded5?.['message']??_0x3dded5),{'feature':_0x26609b(0x210)});}const _0x4d9161=_0x2dd6f7=>{const _0x511e7e=_0x26609b;if(!_0x2dd6f7||typeof _0x2dd6f7!==_0x511e7e(0x1f0)||_0x2dd6f7[_0x2f36c8]==null)return;if(_0x2dd6f7[_0x2f36c8]===_0x331222)try{_0x1a5bf2[_0x511e7e(0x21f)]?.[_0x511e7e(0x277)]?.(_0x2dd6f7['event'],_0x2dd6f7['data']);}catch{}};process['on'](_0x26609b(0x188),_0x4d9161),_0x1a5bf2[_0x26609b(0x2ae)]=_0x4d9161;{let _0x37ccb5=process['cpuUsage'](),_0xde2308=Date['now']();const _0x280abc=()=>{const _0x22a1b8=_0x26609b;if(typeof process[_0x22a1b8(0x22d)]!==_0x22a1b8(0x1b8)||!process[_0x22a1b8(0x136)])return;const _0x3c9854=Date[_0x22a1b8(0x348)](),_0x4e60e1=process[_0x22a1b8(0x358)](),_0x3527fc=(_0x3c9854-_0xde2308)*0x3e8,_0x183747=_0x4e60e1['user']-_0x37ccb5[_0x22a1b8(0x252)]+(_0x4e60e1['system']-_0x37ccb5['system']),_0x3cf10d=_0x3527fc>0x0?Math[_0x22a1b8(0x278)](0x64,Math[_0x22a1b8(0x143)](_0x183747/(_0x3527fc*(_0x38f0f9[_0x22a1b8(0x12d)]()[_0x22a1b8(0x149)]||0x1))*0x64)):0x0;_0x37ccb5=_0x4e60e1,_0xde2308=_0x3c9854;const _0x4ce636=process[_0x22a1b8(0x2e2)]();let _0x399315=null;try{_0x399315=_0x1a5bf2[_0x22a1b8(0x2dc)]?.[_0x22a1b8(0x2d3)]?_0x1a5bf2['processes']?.[_0x22a1b8(0x2ff)]?.()??null:null;}catch{}try{process[_0x22a1b8(0x22d)]({[_0x2f36c8]:_0x57a3dd,'stats':{'rss':_0x4ce636[_0x22a1b8(0x2c0)],'heapUsed':_0x4ce636['heapUsed'],'heapTotal':_0x4ce636[_0x22a1b8(0x125)],'external':_0x4ce636[_0x22a1b8(0x1c2)],'cpuPct':_0x3cf10d,'cpuWindowMs':Math['round'](_0x3527fc/0x3e8)||null},'processing':_0x399315});}catch{}},_0x2b8d10=Math[_0x26609b(0x17a)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x20c037=setInterval(_0x280abc,_0x2b8d10);_0x20c037[_0x26609b(0x195)]?.(),_0x280abc();for(const _0x5c0c5e of['processor:paused',_0x26609b(0x1d7)]){_0x1a5bf2[_0x26609b(0x25b)]?.['on']?.(_0x5c0c5e,()=>{try{_0x280abc();}catch{}});}}let _0xe5cde0=![];const _0x29f573=async _0x34bcb9=>{const _0x1c36ab=_0x26609b;if(_0xe5cde0)return;_0xe5cde0=!![];const _0x3be390=setTimeout(()=>process['exit'](_0x34bcb9),_0x43babd);_0x3be390[_0x1c36ab(0x195)]?.();try{await _0x1a5bf2[_0x1c36ab(0x312)]?.();}catch{}process[_0x1c36ab(0x2c3)](_0x34bcb9);};process['on'](_0x26609b(0x2ef),()=>_0x29f573(0x0));if(process[_0x26609b(0x32f)]!==_0x26609b(0x246)){const _0x354ff9=setInterval(()=>{const _0x36475d=_0x26609b;if(process[_0x36475d(0x2f3)]===0x1)_0x29f573(0x0);},_0x1a1558);_0x354ff9[_0x26609b(0x195)]?.(),_0x1a5bf2['_clusterOrphanWatch']=_0x354ff9;}}return okdbCluster={'runClustered':_0x58d000,'attachWorkerCluster':_0x374111},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0xaee61=_0x337619;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x4fb85d=require$$0$5,{attachWorkerCluster:_0x3a5458}=requireOkdbCluster();async function _0x400944(){const _0x2934e5=_0x58e7,_0x4a10d0=process.env.OKDB_HTTP_CHILD;if(!_0x4a10d0)throw new Error(_0x2934e5(0x1b5));const {rootPath:_0x4f97a4,port:_0x1a1525,options:options={},logLevel:logLevel=_0x2934e5(0x132)}=JSON[_0x2934e5(0x357)](_0x4a10d0);if(!_0x4f97a4||!_0x1a1525)throw new Error(_0x2934e5(0x2ce));const _0x29c4b3=new _0x4fb85d(_0x4f97a4,{...options,'engines':![],'processors':![],'compaction':![]});_0x29c4b3[_0x2934e5(0x314)]['detachConsole']?.();const _0xac07a2=process.env.OKDB_CLUSTER_SLOT??'?',_0x471fd2={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1c5b3e=_0x471fd2[logLevel]??_0x471fd2[_0x2934e5(0x132)];_0x29c4b3[_0x2934e5(0x314)][_0x2934e5(0x147)](_0xdcf1f2=>{const _0x57c010=_0x2934e5;if((_0x471fd2[_0xdcf1f2['level']]??0x1)<_0x1c5b3e)return;try{process[_0x57c010(0x22d)]?.({'__okdbCluster':_0x57c010(0x314),'slot':_0xac07a2,'pid':process[_0x57c010(0x1a8)],'entry':_0xdcf1f2});}catch{}}),await _0x29c4b3[_0x2934e5(0x28e)](),_0x3a5458(_0x29c4b3),await _0x29c4b3[_0x2934e5(0x23e)]['listen'](_0x1a1525);}return _0x400944()[_0xaee61(0x183)](_0x53b45d=>{const _0x44da2d=_0xaee61;try{process[_0x44da2d(0x22d)]?.({'__okdbCluster':_0x44da2d(0x314),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x44da2d(0x1a8)],'entry':{'level':_0x44da2d(0x2c5),'msg':_0x44da2d(0x2fd)+(_0x53b45d?.[_0x44da2d(0x188)]??_0x53b45d)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);function _0x58e7(_0x6ec921,_0x2719d9){_0x6ec921=_0x6ec921-0x123;const _0x140067=_0x1400();let _0x58e7ac=_0x140067[_0x6ec921];return _0x58e7ac;}module[_0x337619(0x2c1)]=okdbHttpWorkerChild;
1
+ 'use strict';const _0x22d7b4=_0x23ad;(function(_0x4a2553,_0x53ed29){const _0x5ec238=_0x23ad,_0x5f29fa=_0x4a2553();while(!![]){try{const _0x62a821=-parseInt(_0x5ec238(0x1f1))/0x1*(parseInt(_0x5ec238(0x28c))/0x2)+parseInt(_0x5ec238(0xd3))/0x3*(parseInt(_0x5ec238(0x2ab))/0x4)+parseInt(_0x5ec238(0x14d))/0x5*(parseInt(_0x5ec238(0x191))/0x6)+parseInt(_0x5ec238(0xf0))/0x7+parseInt(_0x5ec238(0x1b3))/0x8*(parseInt(_0x5ec238(0x283))/0x9)+parseInt(_0x5ec238(0x230))/0xa+-parseInt(_0x5ec238(0x202))/0xb;if(_0x62a821===_0x53ed29)break;else _0x5f29fa['push'](_0x5f29fa['shift']());}catch(_0x3deb00){_0x5f29fa['push'](_0x5f29fa['shift']());}}}(_0xd49b,0x85b59));var require$$0$5=require(_0x22d7b4(0x1c2)),require$$1$1=require(_0x22d7b4(0xf1)),require$$1=require(_0x22d7b4(0x2d0)),require$$0$3=require('os'),require$$2=require('crypto'),require$$0=require(_0x22d7b4(0xcb)),require$$0$2=require(_0x22d7b4(0x1c7)),require$$0$1=require('fs'),require$$0$4=require(_0x22d7b4(0x1ed));function getDefaultExportFromCjs(_0x44aed7){const _0x77c688=_0x22d7b4;return _0x44aed7&&_0x44aed7['__esModule']&&Object[_0x77c688(0x103)]['hasOwnProperty'][_0x77c688(0x115)](_0x44aed7,_0x77c688(0x2b0))?_0x44aed7[_0x77c688(0x2b0)]:_0x44aed7;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2d4452=_0x22d7b4;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x593b09={'PUT':'put','REMOVE':_0x2d4452(0x17d),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x2d4452(0x27c),'INDEX_RESET':_0x2d4452(0x159),'TYPE_REGISTER':_0x2d4452(0x29d),'TYPE_DROP':_0x2d4452(0x2d4),'FTS_REGISTER':_0x2d4452(0xee),'FTS_DROP':_0x2d4452(0x1b9),'FTS_RESET':_0x2d4452(0x112),'SCHEMA_SET':_0x2d4452(0x10e),'SCHEMA_DROP':_0x2d4452(0xcc),'TTL_SET':_0x2d4452(0x233),'TTL_CLEAR':_0x2d4452(0xd8)},_0x37dfcc={'SYSTEM_READY':_0x2d4452(0x130),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x2d4452(0x186),'SYSTEM_POKE':_0x2d4452(0x101),'SYSTEM_DRAIN':_0x2d4452(0x16b),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x2d4452(0x258),'ITEM_CREATE':_0x2d4452(0x15d),'ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':_0x2d4452(0x28d),'INDEX_READY':_0x2d4452(0x140),'INDEX_PROGRESS':_0x2d4452(0x14c),'VIEW_PROGRESS':_0x2d4452(0x21c),'INDEX_DROP':_0x2d4452(0x2db),'INDEX_REGISTERED':_0x2d4452(0x175),'FTS_REGISTERED':_0x2d4452(0xf6),'FTS_DROP':'fts:drop','FTS_RESET':'fts:reset','SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x2d4452(0x10d),'UNIQUE_VIOLATION':_0x2d4452(0xe7),'UNIQUE_VIOLATION_RESOLVED':_0x2d4452(0x28e),'REF_VIOLATION':_0x2d4452(0x2a5),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x2d4452(0xfe),'TXN_START':_0x2d4452(0x177),'TXN_END':'txn:end','TXN_ROLLBACK':_0x2d4452(0x267),'TYPE_REGISTERED':_0x2d4452(0x1f7),'TYPE_DROP':'type:drop','ENV_OPENED':'env:opened','ENV_REMOVED':_0x2d4452(0x155),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':'ttl:expired','TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x2d4452(0x20a),'LICENSE_ADDED':_0x2d4452(0x252),'LICENSE_ACTIVATED':_0x2d4452(0x263),'LICENSE_REMOVED':_0x2d4452(0x25b)},_0x458a2b={'CREATING':'creating','RESETTING':'resetting','READY':_0x2d4452(0x1c5),'DROPPING':_0x2d4452(0x270),'WAITING':_0x2d4452(0x28f)},_0x173534={'CREATED':_0x2d4452(0x20d),'STARTING':'starting','STARTED':_0x2d4452(0x25e),'STOPPING':'stopping','STOPPED':'stopped'},_0x40233b={'CREATING':'creating','READY':'ready','HALTED':'halted','STOPPED':_0x2d4452(0x1cf),'RESETTING':_0x2d4452(0xda)},_0x1cdb25=Object[_0x2d4452(0x1b4)]({'POKE':_0x2d4452(0x193),'DRAIN':_0x2d4452(0x19a),'TYPE_DROP':_0x2d4452(0x2d1),'PROC':_0x2d4452(0x19b),'ENV_RELEASE':_0x2d4452(0xe1)});return okdbEnums={'BUS_EVENTS':_0x1cdb25,'CHANGE_ACTIONS':_0x593b09,'EVENTS':_0x37dfcc,'INDEX_STATE':_0x458a2b,'OKDB_STATE':_0x173534,'VIEW_STATE':_0x40233b},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function _0xd49b(){const _0x4fab52=['resetFts','next','_heartbeatTimer','call','_timer','\x20pid=','isPrimary','ms\x20(attempt\x20','INDEX_PROGRESS','_closed','addSupervisedChild','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','_committed','emit','sync','_startedAt','_drain','FTS_REGISTERED','publishChildRow','lifecycle','put','migrations','_versionSkewWarned','_maybePublish','_publishNow','cli','workersConfigured','ms\x20activeWriters=','~processes:cmd','_admissionTimer','system:ready','maxMs','killable','INDEX_READY','processingStatusView','_handlePoke','cpuUsage','write','processorsView','events','http-server','instanceId','copy','okdb','_role','_heartbeatInFlight','index:ready','\x20worker(s)\x20still\x20serving','ITEM_UPDATE',')\x20exited\x20','bumpCmd','add','raw-put','reset','startedAt','_admissionStarted','consecutiveFailures','stats','index:progress','860InjNCy','meta','randomUUID','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','user','mkdirSync','registry\x20heartbeat\x20skipped\x20(writer=','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','env:removed','function','clear','http','resetIndex','extend','kill','_children','item:create','change','updateSupervisedChildStats','some','_envs','cluster-wide','isDead','cursorKey','startsWith','http\x20worker\x20child\x20failed:\x20','async','reduce','uptime','isWanted','system:drain','busy','_flushDebounce','rss','entry','standalone','_draining','_started','dumpedAt','slotKey','index:registered','note','txn:start','claims','dedupeMax','processorId','onWindow','_supervisorKey','remove','_ensureDesired','_threadStats','unclaimed','split','\x20times\x20in\x20','SYNC_COMMITS','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','release','system:clock_change','SYSTEM_STOPPED','map','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','kind','_lock','acquiredAt','cpus','find','\x20===','info','2232pUdULI','markClosed','bus:poke','once','_isReader','setDesired','ms\x20env=','_isStale','_processStartedAt','bus:drain','bus:proc','listen','stderr','\x20phase=','seq','_flushTimer','ms\x20busy=','_collectWriterFacet','_cursors','_lastCpuWindowMs','_lastCpuAt','_startHeartbeat','embedded','_migrateVocab','toISOString','_nodeDb','SYSTEM_POKE','_outstanding','_groupByProcess','~processes:desired','processor:progress','disable','disconnect','\x20statusEnv=','7871200NePliZ','freeze','listening','compaction','round','unref','dropFts','_activateProcesses','processing','_onStop','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','repeat','get','online','processor:error','./okdb','_inflight','processor:paused','ready','filter','perf_hooks','data','caps','_durs','_ownMeta','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','instances','warn','stopped','putNode','_enableChangelog','_desired','_dedupeKey','_singletonLocks','host','rows=','recordWrite','transactionSync','code','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','_rawDb','send','values','heapTotal','transaction','slice','epoch','selfKey','_onItem','supervisorKey','ms\x20p99=','_nodeDbCache','inflightAgesMs','VIEW_PROGRESS','listNodes','flushDebounce','(code=','_startAdmission','node:events','reap','removeSync','_cmd','1bUAuRH','signalWant','_key','[okdb-cluster]\x20worker\x20pid=','CHANGEFEED_QUANTUM','_highWater','type:registered','inspect','size','includes','running','_drainOne','test','options','_pending','rowKey','processor:ready','11340681RrLoxe','register','ms/','clearThreadStats','none','_report','race','_seen','license:invalid','indexOf','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','created','processes','_sampleOwnStats','version','state','_markSeen','max','sandbox','list','keys','hostname','trim','listDesired','committed','decommissioning','view:progress','getClock','liveThreadStats','_listenAddr','_bpParkedTotal','shift','_hbTimer','stopHeartbeat','children','_removeRowAsync','_writer','listAll','_acquiredAt','_refreshDesiredSnapshot','_clusterOnMessage','processKey','system','functions','SWAP',':want','1720880VmxZpz','error','off','setTtl','inst:','replace','_onPoke','primary','string','external','_nodeDbFor','_wantDbHandle','mode','_baselines','startHeartbeat','reportThreadStats','fast','ms\x20max=','push','type','_clusterOrphanWatch','flushed','_coordinator','resolve','listenAddr','min','depth','_buildProcessingFacet','ms\x20mean=','getDesired','allSettled','ephemeral','_db','percentile','license:added','number','has','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','(worst\x20','abs','system:bus_state_change','floor','exit','license:removed','_onTick','node','started','_kind','isActive','process\x20','getCmd','license:activated','ppid','join','uncaughtException','txn:rollback','_collectSingletonClaims','oldestPendingMs','getRange','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','firstTs','setLogger','respawnTimer','load','dropping','single','detachConsole','length','_holderDead','prependListener','[okdb-cluster]\x20','raw-remove','building',');\x20','env','toFixed','registerIndex','createEnvironment','registry-publish','tierList','parkedNow','now','threads','9mkpQQB','\x20(durable\x20desired-state)','status','_windowCbs','resetReadTxn','view','ttlMs','commit','_systemEnv','271756sBjCGM','index:reset','unique:violation_resolved','waiting','_singletonLock','_sandbox','maxExtra','_done','pushEphemeral','memoryUsage','set','mean','stop','isEnabled','all','decommission','unhandledRejection','registerType','object','okdb-writer:\x20env\x20closing\x20—\x20retry','win32','then','\x20worker(s)\x20remaining','ITEM_REMOVE','hasDesired','ref:violation','holder','_lastCpuUsage','singletonClaims','hasType','name','4Bafnof','level','fanout','open','[okdb-cluster]\x20respawning\x20worker\x20slot=','default','_quantum','_clusterWorkerAttached','enable','\x20parkedNow=','_nodeDead','\x20\x20#','start','role','_onProcEvent','ORPHAN\x20(env-closed\x20write)','treeView','writerStatus','_openEnvLazy','beforeWrite','_lastPublishAt','loop-lag','event','cluster:','_dedupeMax','fromEntries','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','ENV_CLOSING_RETRY','log','loop-lag\x20','claimGated','openDB','\x20died\x20','_buildChildRow','catch','stack','tryAcquire','path','bus:type_drop','_changefeed','process','dropType','_buildOwnRow','setupPrimary','splice','_isWriter','_scheduleFlush','_enqueuedAt','index:drop','label','\x20forked\x20','pid','enabled','heartbeatMs','count','expiresAt','setOwnMeta','_servingEngines','entries','removeNode','flushLmdb','\x20sync','\x20@\x20','ingest','sort','isConnected','nodeKey','noteListenAddr','attach','ITEM_CREATE','_lockDb','offWindow','INDEX_RESET','\x20ipc\x20error:\x20','\x20HTTP\x20server(s)\x20on\x20port\x20','draining','processor:resumed','connected','SYSTEM_PROC','2.1.0','from','queue-worker','_wantDb','node:perf_hooks','dropSchema','INDEX_REGISTERED','_putRowSync','_rowKey','_handleInProcess','_selfKey','updatedAt','450339FYtHSY','heapUsed','_desiredOverlay','deaths','_adminRelay','clearTtl','\x20worker\x20slot=','resetting','\x20(slot=','_released','\x20writer{depth=','error:\x20','_bpWaiters','afterWrite','bus:env_release','putSync','attachFeed','parse','REMOVE','procmodeack/','unique:violation','\x20\x20env=','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','ms\x20on\x20env=','ESRCH','hard-killed','processors','registerFts','slot','2411059QJygxf','cluster','~lock','_statusEnv','~processes','\x0a===\x20OKDB_DIAG\x20','fts:registered','namespace','engines','message','worker','exports','envsOpen','_rootDb','sync:apply','__vocab/version','platform','system:poke','delete','prototype','\x20│\x20','dead','_log','_lastCpuPct','_buckets','--test','--print','commitsPerSec','value','schema:drop','setSchema','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_publishFailWarned','\x20oldestPendingMs='];_0xd49b=function(){return _0x4fab52;};return _0xd49b();}function requireOkdbLoopMonitor(){const _0x2931ab=_0x22d7b4;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x361d87,performance:_0x2077cc}=require$$0,_0x38140b=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0xf3582c=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x512947=process.env.OKDB_LOOP_LAG_ALL==='1',_0x903509=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x5d06b5{constructor(){const _0x1a6ce9=_0x23ad;this[_0x1a6ce9(0x2df)]=_0x38140b,this[_0x1a6ce9(0x108)]=new Map(),this['_h']=null,this[_0x1a6ce9(0x116)]=null,this[_0x1a6ce9(0x172)]=![],this[_0x1a6ce9(0x106)]=(_0x19abd5,_0x15ccbc)=>process[_0x1a6ce9(0x19d)][_0x1a6ce9(0x137)](_0x19abd5+(_0x15ccbc?'\x20'+JSON['stringify'](_0x15ccbc):'')+'\x0a');}[_0x2931ab(0x281)](){const _0x211367=_0x2931ab;return _0x2077cc[_0x211367(0x281)]();}[_0x2931ab(0x26d)](_0x356f5d){const _0x566022=_0x2931ab;if(typeof _0x356f5d===_0x566022(0x156))this[_0x566022(0x106)]=_0x356f5d;}[_0x2931ab(0x176)](_0x3a8c4f,_0x1b3c06,_0x1908b8){const _0x2ce2a0=_0x2931ab;if(!this[_0x2ce2a0(0x2df)])return;let _0x592113=this[_0x2ce2a0(0x108)]['get'](_0x3a8c4f);!_0x592113&&(_0x592113={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x2ce2a0(0x108)][_0x2ce2a0(0x296)](_0x3a8c4f,_0x592113)),_0x592113['ms']+=_0x1b3c06,_0x592113[_0x2ce2a0(0x2e1)]+=0x1,_0x1b3c06>_0x592113[_0x2ce2a0(0x131)]&&(_0x592113['maxMs']=_0x1b3c06,_0x592113[_0x2ce2a0(0x292)]=_0x1908b8||'');}['start'](_0x36bf63){const _0x5a9f47=_0x2931ab;if(!this[_0x5a9f47(0x2df)]||this[_0x5a9f47(0x172)])return;this[_0x5a9f47(0x172)]=!![];if(_0x36bf63)this[_0x5a9f47(0x106)]=_0x36bf63;this['_h']=_0x361d87({'resolution':0xa}),this['_h'][_0x5a9f47(0x2b3)](),this['_timer']=setInterval(()=>this[_0x5a9f47(0x207)](),_0xf3582c);if(this['_timer'][_0x5a9f47(0x1b8)])this['_timer'][_0x5a9f47(0x1b8)]();}[_0x2931ab(0x17b)](_0x5a859d){const _0x1653c2=_0x2931ab;if(!this['_windowCbs'])this[_0x1653c2(0x286)]=new Set();this['_windowCbs'][_0x1653c2(0x145)](_0x5a859d);if(!this[_0x1653c2(0x172)])this[_0x1653c2(0x1ec)]();}[_0x2931ab(0x2f2)](_0x49c1e6){this['_windowCbs']?.['delete'](_0x49c1e6);}[_0x2931ab(0x1ec)](){const _0x59e2ab=_0x2931ab;if(this[_0x59e2ab(0x149)])return;this[_0x59e2ab(0x149)]=!![];!this['_h']&&(this['_h']=_0x361d87({'resolution':0xa}),this['_h'][_0x59e2ab(0x2b3)]());const _0x522ff3=_0xf3582c;this['_admissionTimer']=setInterval(()=>{const _0x16d369=_0x59e2ab,_0x54fa2e=this['_h'];if(!_0x54fa2e)return;const _0x5ce422=_0x54fa2e[_0x16d369(0x251)](0x63)/0xf4240,_0x524424=_0x54fa2e[_0x16d369(0x213)]/0xf4240,_0x579b87=_0x54fa2e[_0x16d369(0x297)]/0xf4240;_0x54fa2e['reset']();if(this[_0x16d369(0x286)])for(const _0x5de96d of this[_0x16d369(0x286)]){try{_0x5de96d({'p99Ms':_0x5ce422,'maxMs':_0x524424,'meanMs':_0x579b87,'reportMs':_0x522ff3});}catch{}}},_0x522ff3);if(this['_admissionTimer']['unref'])this[_0x59e2ab(0x12f)]['unref']();}[_0x2931ab(0x207)](){const _0x3fb4d6=_0x2931ab,_0x105619=this['_h'],_0x29db70=_0x105619['max']/0xf4240,_0xab13a0=_0x105619[_0x3fb4d6(0x251)](0x63)/0xf4240,_0x26500f=_0x105619[_0x3fb4d6(0x297)]/0xf4240;_0x105619[_0x3fb4d6(0x147)]();const _0x5eb30e=[...this[_0x3fb4d6(0x108)][_0x3fb4d6(0x2e5)]()]['map'](([_0x5c8045,_0x1b6bbd])=>({'label':_0x5c8045,..._0x1b6bbd}))[_0x3fb4d6(0x2eb)]((_0x510f4b,_0x497e1c)=>_0x497e1c['ms']-_0x510f4b['ms'])['slice'](0x0,0x8);this[_0x3fb4d6(0x108)][_0x3fb4d6(0x157)]();const _0x1e4e0d=_0x5eb30e[_0x3fb4d6(0x168)]((_0x5538a2,_0x404837)=>_0x5538a2+_0x404837['ms'],0x0),_0x4cd05f=_0x5eb30e[_0x3fb4d6(0x188)](_0x36d748=>_0x36d748[_0x3fb4d6(0x2dc)]+'='+_0x36d748['ms']['toFixed'](0x0)+_0x3fb4d6(0x204)+_0x36d748[_0x3fb4d6(0x2e1)]+(_0x36d748[_0x3fb4d6(0x131)]>0x5?_0x3fb4d6(0x256)+_0x36d748[_0x3fb4d6(0x131)][_0x3fb4d6(0x27b)](0x0)+'ms'+(_0x36d748[_0x3fb4d6(0x292)]?'\x20'+_0x36d748[_0x3fb4d6(0x292)]:'')+')':''));(_0x512947||_0x29db70>=_0x903509)&&this[_0x3fb4d6(0x106)](_0x3fb4d6(0x2c8)+_0xf3582c+_0x3fb4d6(0x241)+_0x29db70[_0x3fb4d6(0x27b)](0x0)+_0x3fb4d6(0x1e5)+_0xab13a0[_0x3fb4d6(0x27b)](0x0)+_0x3fb4d6(0x24c)+_0x26500f[_0x3fb4d6(0x27b)](0x0)+_0x3fb4d6(0x1a1)+_0x1e4e0d['toFixed'](0x0)+'ms'+(_0x4cd05f['length']?_0x3fb4d6(0x104)+_0x4cd05f[_0x3fb4d6(0x265)]('\x20\x20'):''),{'feature':_0x3fb4d6(0x2c0)});if(this['_windowCbs'])for(const _0xe0d7c0 of this['_windowCbs']){try{_0xe0d7c0({'p99Ms':_0xab13a0,'maxMs':_0x29db70,'meanMs':_0x26500f,'reportMs':_0xf3582c});}catch{}}}[_0x2931ab(0x298)](){const _0x1e3000=_0x2931ab;if(this[_0x1e3000(0x116)])clearInterval(this[_0x1e3000(0x116)]);if(this['_h'])this['_h'][_0x1e3000(0x1b0)]();this[_0x1e3000(0x116)]=null,this['_h']=null,this[_0x1e3000(0x172)]=![];}}const _0xf56b53=new _0x5d06b5();if(_0xf56b53[_0x2931ab(0x2df)])_0xf56b53[_0x2931ab(0x2b7)]();return okdbLoopMonitor={'LOOP':_0xf56b53},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x45cf1a=require$$0$1,_0x646d19=require$$1;let _0x2aaa2d,_0xf0d1bd,_0x512264,_0x4dfa34,_0xcd6621,_0x8fbdf2,_0xd03a81,_0x3a19da=![];const _0x3578a2=new Set();let _0x2acfc2=null;const _0x513d7c=new Map();function _0xbd344b(){const _0x17215f=_0x23ad;if(_0x2aaa2d!==undefined)return _0x2aaa2d;_0x2aaa2d=process.env.OKDB_DIAG==='1';if(!_0x2aaa2d)return![];_0xf0d1bd=process.env.OKDB_DIAG_STACK==='1',_0x4dfa34=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x512264=new Array(_0x4dfa34),_0xcd6621=0x0,_0x8fbdf2=0x0,_0xd03a81=process.env.OKDB_DIAG_DIR||null;if(_0xd03a81)try{_0x45cf1a[_0x17215f(0x152)](_0xd03a81,{'recursive':!![]});}catch{}return!![];}function _0x450031(){return _0x2aaa2d===undefined?_0xbd344b():_0x2aaa2d;}function _0x4eba4a(_0x56066a,_0xa0b8e8){const _0x20768b=_0x23ad;if(_0x2aaa2d===undefined?!_0xbd344b():!_0x2aaa2d)return;let _0x48d353;if(_0xf0d1bd){const _0x5ec2be=new Error()['stack']||'';_0x48d353=_0x5ec2be[_0x20768b(0x181)]('\x0a')[_0x20768b(0x1e0)](0x3)['map'](_0x56bc48=>_0x56bc48[_0x20768b(0x218)]())[_0x20768b(0x1c6)](Boolean)[_0x20768b(0x1e0)](0x0,0x8);}_0x512264[_0xcd6621]={'seq':_0x8fbdf2++,'t':Date[_0x20768b(0x281)](),'env':_0x56066a,'kind':_0xa0b8e8||_0x20768b(0x28a),'stack':_0x48d353},_0xcd6621=(_0xcd6621+0x1)%_0x4dfa34;}function _0x57c9bf(_0x1add2f){const _0x304777=_0x23ad,_0xd222de=[];for(let _0xec3719=0x0;_0xec3719<_0x4dfa34;_0xec3719++){const _0x414d43=_0x512264[(_0xcd6621-0x1-_0xec3719+_0x4dfa34*0x2)%_0x4dfa34];if(!_0x414d43)continue;_0xd222de[_0x304777(0x242)](_0x414d43);if(_0xd222de[_0x304777(0x273)]>=_0x1add2f)break;}return _0xd222de;}function _0x480794(_0x373343){const _0x157306=_0x23ad;try{process[_0x157306(0x19d)][_0x157306(0x137)](_0x373343+'\x0a');}catch{}if(_0xd03a81)try{_0x45cf1a['appendFileSync'](_0x646d19['join'](_0xd03a81,'okdb-diag.'+process['pid']+'.log'),_0x373343+'\x0a');}catch{}}function _0x3839e1(_0x2c87f1){const _0x3bbca6=_0x23ad,_0x4658b8=_0x57c9bf(_0x2c87f1);if(!_0x4658b8[_0x3bbca6(0x273)])return _0x3bbca6(0x26b);const _0x3f67d0=Date[_0x3bbca6(0x281)]();return _0x4658b8[_0x3bbca6(0x188)](_0x3bc0ce=>{const _0x209dfc=_0x3bbca6,_0x44161c=_0x209dfc(0x2b6)+_0x3bc0ce[_0x209dfc(0x19f)]+'\x20-'+(_0x3f67d0-_0x3bc0ce['t'])+_0x209dfc(0x197)+_0x3bc0ce[_0x209dfc(0x27a)]+'\x20'+_0x3bc0ce[_0x209dfc(0x18a)];return _0x3bc0ce[_0x209dfc(0x2ce)]&&_0x3bc0ce[_0x209dfc(0x2ce)]['length']?_0x44161c+'\x0a\x20\x20\x20\x20\x20\x20'+_0x3bc0ce[_0x209dfc(0x2ce)][_0x209dfc(0x265)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x44161c;})[_0x3bbca6(0x265)]('\x0a');}function _0x5bc995(_0x26391f,_0x43c436){const _0x1cde3e=_0x23ad,_0x330416=_0x1cde3e(0xf5)+_0x26391f+_0x1cde3e(0x2e9)+new Date()[_0x1cde3e(0x1a9)]()+_0x1cde3e(0x117)+process[_0x1cde3e(0x2de)]+_0x1cde3e(0x18f),_0x5daf05=[_0x330416,_0x1cde3e(0xde)+(_0x43c436&&_0x43c436['stack']?_0x43c436[_0x1cde3e(0x2ce)][_0x1cde3e(0x181)]('\x0a')[0x0]:_0x43c436),'recent\x20writes\x20(newest\x20first)'+(_0xf0d1bd?'':_0x1cde3e(0x154))+':',_0x3839e1(0x18),_0x25db0b(),'='[_0x1cde3e(0x1be)](_0x330416[_0x1cde3e(0x273)]-0x1)];_0x480794(_0x5daf05['join']('\x0a'));}function _0x6c56ec(_0x502feb){const _0x2f9db7=_0x23ad;if(!_0x450031())return;const _0x2796c9=String(_0x502feb&&_0x502feb[_0x2f9db7(0xf9)]||_0x502feb||''),_0x584ea9=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x2f9db7(0x1fd)](_0x2796c9);_0x5bc995(_0x584ea9?_0x2f9db7(0x2ba):_0x2f9db7(0x266),_0x502feb);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x584ea9)return;try{console[_0x2f9db7(0x231)](_0x502feb&&_0x502feb[_0x2f9db7(0x2ce)]?_0x502feb[_0x2f9db7(0x2ce)]:_0x502feb);}catch{}process['exit'](0x1);}function _0x48eff7(_0x110bd4){const _0x41f3ec=_0x23ad;if(!_0x450031())return;const _0xdaae40=String(_0x110bd4&&_0x110bd4['message']||_0x110bd4||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0xdaae40)&&_0x5bc995(_0x41f3ec(0x189),_0x110bd4);}function _0x25db0b(){const _0x1c15e3=_0x23ad,_0x1848d0=[_0x1c15e3(0x10f)];let _0x80a65f=![];for(const _0x3ce420 of _0x3578a2){const _0x1ee3fe=_0x3ce420&&_0x3ce420['_envs'];if(!_0x1ee3fe)continue;for(const [_0x529ff8,_0x533716]of _0x1ee3fe){const _0xe99e30=_0x533716&&_0x533716[_0x1c15e3(0x246)]&&_0x533716[_0x1c15e3(0x246)]['view'];if(!_0xe99e30)continue;let _0x599e3c,_0x2f2509;try{_0x599e3c=Atomics[_0x1c15e3(0x26f)](_0xe99e30,0x0),_0x2f2509=Atomics[_0x1c15e3(0x26f)](_0xe99e30,0x1);}catch{continue;}if(_0x599e3c===0x0)continue;_0x80a65f=!![];const _0x2364b3=_0x599e3c>0x0?_0x1c15e3(0x22e):_0x1c15e3(0x13c),_0x3af1d9=Date[_0x1c15e3(0x281)]()-Math[_0x1c15e3(0x257)](_0x599e3c)*0x3e8,_0x1eb5a9=((()=>{const _0x30637f=_0x1c15e3;try{return _0x533716[_0x30637f(0x226)]&&_0x533716[_0x30637f(0x226)][_0x30637f(0x285)]?_0x533716['_writer'][_0x30637f(0x285)]():null;}catch{return null;}})());_0x1848d0['push'](_0x1c15e3(0xe8)+_0x529ff8+_0x1c15e3(0x19e)+_0x2364b3+'\x20drainAge='+_0x3af1d9+_0x1c15e3(0x12d)+_0x2f2509+(_0x1eb5a9?_0x1c15e3(0xdd)+_0x1eb5a9[_0x1c15e3(0x24a)]+_0x1c15e3(0x111)+_0x1eb5a9[_0x1c15e3(0x269)]+_0x1c15e3(0x2b4)+_0x1eb5a9[_0x1c15e3(0x280)]+'}':''));}}if(!_0x80a65f)_0x1848d0[_0x1c15e3(0x242)]('\x20\x20(no\x20env\x20draining)');return _0x1848d0[_0x1c15e3(0x265)]('\x0a');}function _0x5ea369(){const _0x3c3c02=_0x23ad;if(!_0x450031())return;const _0x2cd034=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x59154c=Date[_0x3c3c02(0x281)]();for(const _0x4e2db8 of _0x3578a2){const _0x1cc5d6=_0x4e2db8&&_0x4e2db8[_0x3c3c02(0x161)];if(!_0x1cc5d6)continue;for(const [_0x120305,_0x3d8d2b]of _0x1cc5d6){const _0x50d19d=_0x3d8d2b&&_0x3d8d2b[_0x3c3c02(0x246)]&&_0x3d8d2b[_0x3c3c02(0x246)][_0x3c3c02(0x288)];if(!_0x50d19d)continue;let _0x48f654;try{_0x48f654=Atomics[_0x3c3c02(0x26f)](_0x50d19d,0x0);}catch{continue;}const _0x33fb37=_0x4e2db8[_0x3c3c02(0x2d0)]+'|'+_0x120305;if(_0x48f654<=0x0){_0x513d7c[_0x3c3c02(0x102)](_0x33fb37);continue;}const _0x1ccbb0=_0x59154c-_0x48f654*0x3e8,_0x1817a2=_0x513d7c[_0x3c3c02(0x1bf)](_0x33fb37);if(_0x1ccbb0<_0x2cd034)continue;if(_0x1817a2&&_0x59154c-_0x1817a2[_0x3c3c02(0x173)]<_0x2cd034)continue;_0x513d7c[_0x3c3c02(0x296)](_0x33fb37,{'firstTs':_0x1817a2?_0x1817a2[_0x3c3c02(0x26c)]:_0x48f654,'dumpedAt':_0x59154c});const _0x1153ea=_0x3c3c02(0x1da)+_0x1ccbb0+_0x3c3c02(0xea)+_0x120305+_0x3c3c02(0x2e9)+new Date()[_0x3c3c02(0x1a9)]()+_0x3c3c02(0x117)+process[_0x3c3c02(0x2de)]+_0x3c3c02(0x18f);_0x480794([_0x1153ea,_0x25db0b(),'='[_0x3c3c02(0x1be)](_0x1153ea[_0x3c3c02(0x273)]-0x1)][_0x3c3c02(0x265)]('\x0a'));}}}function _0x9283b2(){const _0x60606f=_0x23ad;if(!_0x450031()||_0x3a19da)return;_0x3a19da=!![],process[_0x60606f(0x275)](_0x60606f(0x266),_0x6c56ec),process[_0x60606f(0x275)](_0x60606f(0x29c),_0x48eff7);const _0x204875=Math[_0x60606f(0x213)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x2acfc2=setInterval(_0x5ea369,_0x204875);if(_0x2acfc2[_0x60606f(0x1b8)])_0x2acfc2[_0x60606f(0x1b8)]();}function _0xe41b32(_0x510ed2){if(!_0x450031()||!_0x510ed2)return;_0x3578a2['add'](_0x510ed2),_0x9283b2();}function _0x50c9ff(_0x40c067){const _0x248d70=_0x23ad;_0x3578a2[_0x248d70(0x102)](_0x40c067);}function _0x1ad34e(){const _0x4508ed=_0x23ad;if(!_0x450031())return{'enabled':![],'hint':_0x4508ed(0x150)};return{'enabled':!![],'stackCapture':!!_0xf0d1bd,'recentWrites':_0x57c9bf(0x10),'drain':_0x25db0b()};}return okdbDiag={'isEnabled':_0x450031,'recordWrite':_0x4eba4a,'installDiag':_0x9283b2,'registerOkdb':_0xe41b32,'unregisterOkdb':_0x50c9ff,'snapshot':_0x1ad34e},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x5297ff=_0x22d7b4;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x5186b6}=require$$0$2,_0x34f69c=requireOkdbDiag(),_0x191309=process.env.OKDB_COMMIT_MODE===_0x5297ff(0x120);class _0x1d28fa{constructor(_0x414e53){const _0x5663ad=_0x5297ff;this[_0x5663ad(0x27a)]=_0x414e53,this[_0x5663ad(0x1c3)]=new Set(),this[_0x5663ad(0x2da)]=new Map(),this[_0x5663ad(0x11e)]=0x0,this[_0x5663ad(0x1ca)]=[],this['_done']=[],this[_0x5663ad(0x1f6)]=Math[_0x5663ad(0x213)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x5663ad(0x1ac)]=0x0,this[_0x5663ad(0xdf)]=[],this[_0x5663ad(0x220)]=0x0;}async[_0x5297ff(0x1df)](_0x5b0f08,_0xc0820f){const _0x16c168=_0x5297ff;if(_0x34f69c[_0x16c168(0x299)]())_0x34f69c[_0x16c168(0x1d7)](this[_0x16c168(0x27a)]?.[_0x16c168(0x2aa)],_0xc0820f);if(this[_0x16c168(0x11b)]){const _0x18a250=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x18a250['code']=_0x16c168(0x2c6);throw _0x18a250;}if(this[_0x16c168(0x1f6)]>0x0){let _0x324669=![];while(this[_0x16c168(0x1ac)]>=this['_highWater']&&!this['_closed']){!_0x324669&&(_0x324669=!![],this[_0x16c168(0x220)]++),await new Promise(_0x23c88b=>this[_0x16c168(0xdf)]['push'](_0x23c88b));}if(this[_0x16c168(0x11b)]){const _0x4de2db=new Error(_0x16c168(0x29f));_0x4de2db[_0x16c168(0x1d9)]=_0x16c168(0x2c6);throw _0x4de2db;}}this['_outstanding']++;const _0x257ac5=this[_0x16c168(0x27a)]['_coordinator'];if(_0x257ac5)await _0x257ac5[_0x16c168(0x2be)]();if(this[_0x16c168(0x11b)]){if(_0x257ac5)_0x257ac5[_0x16c168(0xe0)]();this[_0x16c168(0x1ac)]--;if(this[_0x16c168(0xdf)][_0x16c168(0x273)]&&this[_0x16c168(0x1ac)]<this[_0x16c168(0x1f6)])this[_0x16c168(0xdf)]['shift']()();const _0x2c8967=new Error(_0x16c168(0x29f));_0x2c8967['code']=_0x16c168(0x2c6);throw _0x2c8967;}const _0x3a5696=_0x5186b6[_0x16c168(0x281)]();if(_0x191309)try{const _0x36939d=this['env']['db'][_0x16c168(0x1d8)](_0x5b0f08);this[_0x16c168(0x11e)]++;if(this[_0x16c168(0x1ca)][_0x16c168(0x242)](_0x5186b6['now']()-_0x3a5696)>0x100)this[_0x16c168(0x1ca)][_0x16c168(0x221)]();if(this[_0x16c168(0x293)][_0x16c168(0x242)](_0x5186b6['now']())>0x800)this[_0x16c168(0x293)][_0x16c168(0x221)]();return _0x36939d;}finally{this[_0x16c168(0x1ac)]--;if(this['_bpWaiters']['length']&&this[_0x16c168(0x1ac)]<this[_0x16c168(0x1f6)])this[_0x16c168(0xdf)][_0x16c168(0x221)]()();if(_0x257ac5)_0x257ac5[_0x16c168(0xe0)]();}const _0x1bc5aa=this[_0x16c168(0x27a)]['db']['childTransaction'](_0x5b0f08);this[_0x16c168(0x1c3)]['add'](_0x1bc5aa),this['_enqueuedAt'][_0x16c168(0x296)](_0x1bc5aa,_0x3a5696);const _0x498f6b=()=>{const _0x1f10ba=_0x16c168;this[_0x1f10ba(0x1c3)]['delete'](_0x1bc5aa),this[_0x1f10ba(0x2da)]['delete'](_0x1bc5aa),this[_0x1f10ba(0x11e)]++,this[_0x1f10ba(0x1ac)]--;this['_bpWaiters'][_0x1f10ba(0x273)]&&this[_0x1f10ba(0x1ac)]<this[_0x1f10ba(0x1f6)]&&this[_0x1f10ba(0xdf)]['shift']()();if(this['_durs'][_0x1f10ba(0x242)](_0x5186b6['now']()-_0x3a5696)>0x100)this[_0x1f10ba(0x1ca)]['shift']();if(this[_0x1f10ba(0x293)][_0x1f10ba(0x242)](_0x5186b6[_0x1f10ba(0x281)]())>0x800)this[_0x1f10ba(0x293)][_0x1f10ba(0x221)]();};_0x1bc5aa['then'](_0x498f6b,_0x498f6b);try{return await _0x1bc5aa;}finally{if(_0x257ac5)_0x257ac5['afterWrite']();}}[_0x5297ff(0x285)](){const _0x3412ea=_0x5297ff,_0x4fcdcc=_0x5186b6[_0x3412ea(0x281)]();let _0x23da00=0x0;for(const _0x10f6d4 of this[_0x3412ea(0x2da)][_0x3412ea(0x1dd)]()){const _0x55a789=_0x4fcdcc-_0x10f6d4;if(_0x55a789>_0x23da00)_0x23da00=_0x55a789;}let _0x4365b2=0x0;for(let _0x26636f=this[_0x3412ea(0x293)][_0x3412ea(0x273)]-0x1;_0x26636f>=0x0;_0x26636f--){if(_0x4fcdcc-this[_0x3412ea(0x293)][_0x26636f]>0x3e8)break;_0x4365b2++;}let _0x5de5b2=0x0;if(this[_0x3412ea(0x1ca)]['length']){const _0x37940b=[...this[_0x3412ea(0x1ca)]][_0x3412ea(0x2eb)]((_0x8acf3,_0x4c8515)=>_0x8acf3-_0x4c8515);_0x5de5b2=_0x37940b[Math['min'](_0x37940b[_0x3412ea(0x273)]-0x1,Math[_0x3412ea(0x259)](_0x37940b[_0x3412ea(0x273)]*0.99))];}return{'depth':this[_0x3412ea(0x1c3)][_0x3412ea(0x1f9)],'oldestPendingMs':Math['round'](_0x23da00),'committed':this[_0x3412ea(0x11e)],'commitsPerSec':_0x4365b2,'commitP99Ms':Math[_0x3412ea(0x1b7)](_0x5de5b2),'parkedNow':this[_0x3412ea(0xdf)][_0x3412ea(0x273)],'parkedTotal':this[_0x3412ea(0x220)],'highWater':this[_0x3412ea(0x1f6)]};}[_0x5297ff(0x1e7)](){const _0x4a6450=_0x5297ff,_0x48e9b8=_0x5186b6['now']();return[...this[_0x4a6450(0x2da)]['values']()]['map'](_0x117b77=>Math['round'](_0x48e9b8-_0x117b77))['sort']((_0x1af56c,_0x4ccc18)=>_0x4ccc18-_0x1af56c);}[_0x5297ff(0x192)](){const _0x2cc576=_0x5297ff;this[_0x2cc576(0x11b)]=!![];for(const _0x2328a6 of this[_0x2cc576(0xdf)][_0x2cc576(0x2d7)](0x0))_0x2328a6();}async['drain'](){const _0x55c0e2=_0x5297ff;let _0x1128e0=0x0;while(this['_inflight'][_0x55c0e2(0x1f9)]&&_0x1128e0++<0x3e8){await Promise['allSettled']([...this['_inflight']]);}}async[_0x5297ff(0x126)](_0x178a8f,_0x157c08,_0x38215c,_0x5a92d4){const _0x1deb9a=_0x5297ff;return this[_0x1deb9a(0x1df)](()=>{const _0x26297b=_0x1deb9a;if(_0x5a92d4===undefined)_0x178a8f[_0x26297b(0xe2)](_0x157c08,_0x38215c);else _0x178a8f[_0x26297b(0xe2)](_0x157c08,_0x38215c,_0x5a92d4);},_0x1deb9a(0x146));}async[_0x5297ff(0x17d)](_0x4cf5fe,_0x571efc){const _0x39b9a1=_0x5297ff;return this[_0x39b9a1(0x1df)](()=>_0x4cf5fe[_0x39b9a1(0x1ef)](_0x571efc),_0x39b9a1(0x277));}}async function _0xd0e818(_0x8bec01,_0x4a60b5){const _0x3ee11b=_0x5297ff;if(_0x4a60b5==null)_0x4a60b5=Math[_0x3ee11b(0x213)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x519a48=_0x8bec01?.[_0x3ee11b(0x245)];if(!_0x519a48||typeof _0x519a48[_0x3ee11b(0x2a1)]!==_0x3ee11b(0x156))return;await Promise[_0x3ee11b(0x208)]([Promise[_0x3ee11b(0x247)](_0x519a48)[_0x3ee11b(0x2cd)](()=>{}),new Promise(_0x5f1c3c=>{const _0x26c60c=_0x3ee11b,_0x37ab55=setTimeout(_0x5f1c3c,_0x4a60b5);if(_0x37ab55[_0x26c60c(0x1b8)])_0x37ab55[_0x26c60c(0x1b8)]();})]);}catch{}}function _0x38cf86(_0x5b8ec6){const _0x16c700=_0x5297ff;if(_0x191309)return Promise['resolve']();const _0x229dbe=_0x5b8ec6?.[_0x16c700(0x21a)];return _0x229dbe&&typeof _0x229dbe[_0x16c700(0x2a1)]==='function'?_0x229dbe:Promise[_0x16c700(0x247)]();}return okdbWriter[_0x5297ff(0xfb)]=_0x1d28fa,okdbWriter[_0x5297ff(0xfb)][_0x5297ff(0x2e7)]=_0xd0e818,okdbWriter['exports'][_0x5297ff(0x21a)]=_0x38cf86,okdbWriter[_0x5297ff(0xfb)][_0x5297ff(0x183)]=_0x191309,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x2f564a=_0x22d7b4;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x39dcdf=require$$0$3,{SYNC_COMMITS:_0x519f42}=requireOkdbWriter(),_0x3d6189=_0x2f564a(0xf2);class _0x4d80e0{constructor(_0x3b32ce,_0xaec81f,_0x2d5180){const _0x3ec9e5=_0x2f564a;this['_lock']=_0x3b32ce,this[_0x3ec9e5(0x1f3)]=_0xaec81f,this[_0x3ec9e5(0x228)]=_0x2d5180,this['_released']=![],this['_heartbeatTimer']=null,this[_0x3ec9e5(0x13f)]=null;}['isHeld'](){const _0x49762e=_0x2f564a;if(this[_0x49762e(0xdc)])return![];try{const _0x30b2e9=this[_0x49762e(0x18b)][_0x49762e(0x250)]()[_0x49762e(0x1bf)](this[_0x49762e(0x1f3)]);if(!_0x30b2e9||_0x30b2e9['acquiredAt']!==this[_0x49762e(0x228)])return![];const _0x35fd6c=_0x30b2e9[_0x49762e(0xd2)]??_0x30b2e9[_0x49762e(0x18c)];if(_0x35fd6c+_0x30b2e9[_0x49762e(0x289)]<Date[_0x49762e(0x281)]())return![];return!![];}catch{return!this[_0x49762e(0xdc)];}}[_0x2f564a(0x2a6)](){const _0x2cf02a=_0x2f564a;if(this[_0x2cf02a(0xdc)])return null;try{return this[_0x2cf02a(0x18b)][_0x2cf02a(0x250)]()['get'](this[_0x2cf02a(0x1f3)])??null;}catch{return null;}}async[_0x2f564a(0x15a)](_0x265a57){const _0x4bb390=_0x2f564a;if(this[_0x4bb390(0xdc)])return;try{const _0x35356b=this[_0x4bb390(0x18b)][_0x4bb390(0x250)]()[_0x4bb390(0x1bf)](this[_0x4bb390(0x1f3)]);if(!_0x35356b||_0x35356b['acquiredAt']!==this['_acquiredAt'])return;if(_0x519f42)this['_lock'][_0x4bb390(0x250)]()[_0x4bb390(0xe2)](this[_0x4bb390(0x1f3)],{..._0x35356b,'ttlMs':_0x35356b[_0x4bb390(0x289)]+_0x265a57});else await this['_lock'][_0x4bb390(0x250)]()[_0x4bb390(0x126)](this[_0x4bb390(0x1f3)],{..._0x35356b,'ttlMs':_0x35356b['ttlMs']+_0x265a57});}catch{}}async[_0x2f564a(0x185)](){const _0x1c63ee=_0x2f564a;if(this['_released'])return;if(this[_0x1c63ee(0x13f)])try{await this[_0x1c63ee(0x13f)];}catch{}clearInterval(this['_heartbeatTimer']),this[_0x1c63ee(0x114)]=null,this[_0x1c63ee(0xdc)]=!![];try{const _0x5f5b48=this[_0x1c63ee(0x18b)][_0x1c63ee(0x250)]()[_0x1c63ee(0x1bf)](this['_key']);if(_0x5f5b48&&_0x5f5b48[_0x1c63ee(0x18c)]===this[_0x1c63ee(0x228)]){if(_0x519f42)this[_0x1c63ee(0x18b)]['_db']()[_0x1c63ee(0x1ef)](this[_0x1c63ee(0x1f3)]);else await this['_lock']['_db']()[_0x1c63ee(0x17d)](this[_0x1c63ee(0x1f3)]);}}catch{}}['_startHeartbeat'](_0xde546f,_0x10b21d){const _0x97700f=_0x2f564a,_0x4ccd20=_0x10b21d??Math[_0x97700f(0x259)](_0xde546f/0x3);this[_0x97700f(0x114)]=setInterval(()=>{const _0x2cea5f=_0x97700f;if(this[_0x2cea5f(0xdc)])return;this['_heartbeatInFlight']=((async()=>{const _0x1f6973=_0x2cea5f;try{const _0x368001=this[_0x1f6973(0x18b)][_0x1f6973(0x250)]()[_0x1f6973(0x1bf)](this[_0x1f6973(0x1f3)]);if(!_0x368001||_0x368001[_0x1f6973(0x18c)]!==this['_acquiredAt']){this['_released']=!![],clearInterval(this[_0x1f6973(0x114)]),this[_0x1f6973(0x114)]=null;return;}if(_0x519f42)this[_0x1f6973(0x18b)]['_db']()[_0x1f6973(0xe2)](this[_0x1f6973(0x1f3)],{..._0x368001,'updatedAt':Date[_0x1f6973(0x281)]()});else await this['_lock'][_0x1f6973(0x250)]()['put'](this[_0x1f6973(0x1f3)],{..._0x368001,'updatedAt':Date[_0x1f6973(0x281)]()});}catch{}this[_0x1f6973(0x13f)]=null;})());},_0x4ccd20);if(this[_0x97700f(0x114)][_0x97700f(0x1b8)])this['_heartbeatTimer'][_0x97700f(0x1b8)]();}}class _0x996d2a{constructor(_0x1ed1b0,{namespace:_0x37543b,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x4d9dea=_0x2f564a;this[_0x4d9dea(0x1db)]=_0x1ed1b0,this[_0x4d9dea(0xf7)]=_0x37543b,this['ttlMs']=ttlMs,this[_0x4d9dea(0x2e0)]=heartbeatMs,this['_lockDb']=null;}[_0x2f564a(0x250)](){const _0x43c48e=_0x2f564a;return!this[_0x43c48e(0x2f1)]&&(this[_0x43c48e(0x2f1)]=this[_0x43c48e(0x1db)][_0x43c48e(0x2ca)](_0x3d6189,{'dupSort':![]})),this[_0x43c48e(0x2f1)];}['_wantDb'](){const _0x490696=_0x2f564a;return!this[_0x490696(0x23b)]&&(this[_0x490696(0x23b)]=this[_0x490696(0x1db)][_0x490696(0x2ca)](_0x3d6189+_0x490696(0x22f),{'dupSort':![]})),this[_0x490696(0x23b)];}[_0x2f564a(0x1f3)](_0x1cc92c){const _0x2f24ac=_0x2f564a;return this[_0x2f24ac(0xf7)]+':'+_0x1cc92c;}[_0x2f564a(0x1f2)](_0x1c14ee){const _0x4ab296=_0x2f564a;try{_0x519f42?this['_wantDb']()[_0x4ab296(0xe2)](this[_0x4ab296(0x1f3)](_0x1c14ee),Date[_0x4ab296(0x281)]()):this[_0x4ab296(0xca)]()['put'](this['_key'](_0x1c14ee),Date[_0x4ab296(0x281)]())?.[_0x4ab296(0x2cd)]?.(()=>{});}catch{}}[_0x2f564a(0x16a)](_0x4e49dc,_0x3eb9c1=0x3e8){const _0x5a82cd=_0x2f564a;try{const _0x5cb38b=this[_0x5a82cd(0xca)]()[_0x5a82cd(0x1bf)](this[_0x5a82cd(0x1f3)](_0x4e49dc));return typeof _0x5cb38b===_0x5a82cd(0x253)&&Date[_0x5a82cd(0x281)]()-_0x5cb38b<_0x3eb9c1;}catch{return![];}}[_0x2f564a(0x198)](_0x1f83c4){const _0x3094b8=_0x2f564a,_0x1e419e=_0x1f83c4[_0x3094b8(0xd2)]??_0x1f83c4[_0x3094b8(0x18c)];return _0x1e419e+_0x1f83c4['ttlMs']<Date[_0x3094b8(0x281)]();}static['_holderDead'](_0x47cf66){const _0x4b93b7=_0x2f564a,_0x7a5997=_0x47cf66?.['holder'];if(!_0x7a5997||typeof _0x7a5997[_0x4b93b7(0x2de)]!==_0x4b93b7(0x253))return![];if(_0x7a5997['hostname']!==_0x39dcdf[_0x4b93b7(0x217)]())return![];if(_0x7a5997[_0x4b93b7(0x2de)]===process[_0x4b93b7(0x2de)])return![];try{return process[_0x4b93b7(0x15b)](_0x7a5997['pid'],0x0),![];}catch(_0x1fec5b){return _0x1fec5b[_0x4b93b7(0x1d9)]===_0x4b93b7(0xeb);}}async[_0x2f564a(0x2cf)](_0x2e2efe,_0x443647={},_0x1e4d8a={}){const _0x26e0bd=_0x2f564a,_0x5ab990=this[_0x26e0bd(0x1f3)](_0x2e2efe),_0x7e942e=_0x1e4d8a[_0x26e0bd(0x289)]??this[_0x26e0bd(0x289)],_0x381ae0=Date['now'](),_0x154535={'holder':{'pid':process[_0x26e0bd(0x2de)],'hostname':_0x39dcdf[_0x26e0bd(0x217)](),..._0x443647},'acquiredAt':_0x381ae0,'updatedAt':_0x381ae0,'ttlMs':_0x7e942e};let _0x5dda0d=![],_0x56b06b=null;try{const _0x115e1b=()=>{const _0x295fbe=_0x26e0bd,_0x26590b=this[_0x295fbe(0x250)]()[_0x295fbe(0x1bf)](_0x5ab990);if(_0x26590b&&!this['_isStale'](_0x26590b)&&!_0x996d2a[_0x295fbe(0x274)](_0x26590b)){const _0x392b04=_0x443647['processorId']!=null&&_0x26590b[_0x295fbe(0x2a6)][_0x295fbe(0x2de)]===process[_0x295fbe(0x2de)]&&_0x26590b[_0x295fbe(0x2a6)][_0x295fbe(0x17a)]===_0x443647[_0x295fbe(0x17a)];if(!_0x392b04){_0x5dda0d=![],_0x56b06b=_0x26590b;return;}_0x154535[_0x295fbe(0x18c)]<=_0x26590b[_0x295fbe(0x18c)]&&(_0x154535[_0x295fbe(0x18c)]=_0x26590b['acquiredAt']+0x1,_0x154535[_0x295fbe(0xd2)]=_0x154535[_0x295fbe(0x18c)]);}this['_db']()['put'](_0x5ab990,_0x154535),_0x5dda0d=!![],_0x56b06b=_0x154535;};if(_0x519f42)this['_db']()[_0x26e0bd(0x1d8)](_0x115e1b);else await this[_0x26e0bd(0x250)]()['childTransaction'](_0x115e1b);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x5dda0d)return{'acquired':![],'handle':null,'current':_0x56b06b};const _0x4b8fd0=new _0x4d80e0(this,_0x5ab990,_0x154535[_0x26e0bd(0x18c)]);return _0x4b8fd0[_0x26e0bd(0x1a6)](_0x7e942e,this[_0x26e0bd(0x2e0)]),{'acquired':!![],'handle':_0x4b8fd0,'current':_0x56b06b};}[_0x2f564a(0x1f8)](_0x30e2fe){const _0x159fb0=_0x2f564a;try{return this[_0x159fb0(0x250)]()['get'](this[_0x159fb0(0x1f3)](_0x30e2fe))??null;}catch{return null;}}[_0x2f564a(0x215)](){const _0x22c0f3=_0x2f564a,_0x27318c=this[_0x22c0f3(0xf7)]+':',_0x1cb248=[];try{for(const {key:_0x4a3ef7,value:_0x41b487}of this[_0x22c0f3(0x250)]()[_0x22c0f3(0x26a)]({'start':_0x27318c,'end':_0x27318c+'ÿ'})){typeof _0x4a3ef7==='string'&&_0x4a3ef7[_0x22c0f3(0x165)](_0x27318c)&&_0x1cb248[_0x22c0f3(0x242)]({'id':_0x4a3ef7['slice'](_0x27318c[_0x22c0f3(0x273)]),'entry':_0x41b487});}}catch{}return _0x1cb248;}static[_0x2f564a(0x227)](_0x23f9de){const _0x3f1695=_0x2f564a,_0x24e7ac=[];try{const _0x5564fb=_0x23f9de[_0x3f1695(0x2ca)](_0x3d6189,{'dupSort':![]});for(const {key:_0x516bbb,value:_0x2b3c85}of _0x5564fb[_0x3f1695(0x26a)]({})){if(typeof _0x516bbb!==_0x3f1695(0x238))continue;const _0x174d1c=_0x516bbb[_0x3f1695(0x20b)](':');if(_0x174d1c<0x1)continue;_0x24e7ac[_0x3f1695(0x242)]({'namespace':_0x516bbb['slice'](0x0,_0x174d1c),'id':_0x516bbb[_0x3f1695(0x1e0)](_0x174d1c+0x1),'entry':_0x2b3c85});}}catch{}return _0x24e7ac;}}return okdbLock={'OKDBLock':_0x996d2a},okdbLock;}function _0x23ad(_0x36b5ef,_0x1223cf){_0x36b5ef=_0x36b5ef-0xc1;const _0xd49bb5=_0xd49b();let _0x23ad8a=_0xd49bb5[_0x36b5ef];return _0x23ad8a;}var version=_0x22d7b4(0xc7),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x7e59cb=_0x22d7b4;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x35c0b3=require$$0$3,_0x2dce24=require$$1$1,_0xc06fd=require$$2,{LOOP:_0x3c3950}=requireOkdbLoopMonitor(),{OKDBLock:_0x1c02f9}=requireOkdbLock(),{SYNC_COMMITS:_0x491529}=requireOkdbWriter(),_0x532f67=_0x7e59cb(0xf4),_0x1a2a79=_0x7e59cb(0x25d),_0x5cc13b=_0x7e59cb(0x1ae),_0x6ff6ec=_0x7e59cb(0x12e),_0x467e6e=(_0xa14041,_0x34afd1)=>_0xa14041+':'+_0x34afd1,_0x3a0ecf=(_0x4d2ad2,_0x3b422c)=>_0x4d2ad2+'::'+_0x3b422c,_0x300894=(_0x23a7b3,_0x1c9ae6)=>_0x23a7b3+'/'+_0x1c9ae6,_0x1f463e=(_0x2c6a5a,_0x30dbb9)=>_0x2c6a5a+'#'+_0x30dbb9,_0x346692=_0x450c90=>{const _0x5fbd52=_0x7e59cb;if(_0x450c90?.['processKey'])return _0x450c90['processKey'];const _0x19fff7=_0x450c90?.[_0x5fbd52(0x2ed)];return typeof _0x19fff7==='string'&&_0x19fff7[_0x5fbd52(0x1fa)]('#')?_0x19fff7[_0x5fbd52(0x1e0)](0x0,_0x19fff7['indexOf']('#')):_0x19fff7;},_0x4960b3=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1c3d4a=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x394c48=_0x4960b3*0x3,_0x412fba=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x7e59cb(0x213)](0x927c0,_0x394c48*0x14),_0x4383ca=[_0x7e59cb(0x1af),_0x7e59cb(0x201),'processor:retry',_0x7e59cb(0x1c1),_0x7e59cb(0x1c4),_0x7e59cb(0xc4)];let _0x3525aa=null;function _0x1ca0cd(){const _0x53be32=_0x7e59cb;if(_0x3525aa==null)_0x3525aa=Math['round']((Date[_0x53be32(0x281)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x3525aa;}function _0xcc725e(_0xe45bd7){const _0x135205=_0x7e59cb;if(process.env.OKDB_PROCESS_KILL===_0x135205(0x232))return![];if(_0xe45bd7?.[_0x135205(0x1fe)]?.[_0x135205(0x20e)]&&typeof _0xe45bd7[_0x135205(0x1fe)][_0x135205(0x20e)]===_0x135205(0x29e)&&_0xe45bd7[_0x135205(0x1fe)][_0x135205(0x20e)][_0x135205(0x15b)]===![])return![];return!![];}function _0x22c756(_0x3076d8,_0x35fa31){const _0x39eecd=_0x7e59cb,_0x412685=!!_0x35fa31?.[_0x39eecd(0xed)];switch(_0x3076d8){case _0x39eecd(0x237):return{'controllable':_0x412685,'decommissionable':![],'killable':!![],'killConfirm':_0x39eecd(0x162)};case'cli':case _0x39eecd(0x170):return{'controllable':_0x412685,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x39eecd(0x1a7):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x39eecd(0xc9):case'fn-runner':case _0x39eecd(0xfa):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x573e35{constructor(_0x23e531){const _0x594abb=_0x7e59cb;this[_0x594abb(0x13d)]=_0x23e531,this[_0x594abb(0xf3)]=null,this['_desired']=null,this[_0x594abb(0xd5)]=new Map(),this['_cmd']=null,this[_0x594abb(0x2d8)]=![],this[_0x594abb(0x195)]=![],this[_0x594abb(0x199)]=_0x1ca0cd(),this['_selfKey']=_0x467e6e(process['pid'],this[_0x594abb(0x199)]),this['_instanceId']=_0xc06fd[_0x594abb(0x14f)]()[_0x594abb(0x1e0)](0x0,0x8),this['_rowKey']=_0x1f463e(this[_0x594abb(0xd1)],this['_instanceId']),this[_0x594abb(0x121)]=Date[_0x594abb(0x281)](),this[_0x594abb(0x25f)]=null,this[_0x594abb(0x17c)]=null,this[_0x594abb(0x21f)]=null,this[_0x594abb(0x222)]=null,this[_0x594abb(0x2b9)]=null,this[_0x594abb(0x25c)]=null,this[_0x594abb(0x2bf)]=0x0,this[_0x594abb(0x1cb)]={},this[_0x594abb(0x15c)]=new Map(),this[_0x594abb(0x2a7)]=process['cpuUsage'](),this[_0x594abb(0x1a5)]=Date[_0x594abb(0x281)](),this[_0x594abb(0x107)]=0x0,this[_0x594abb(0x17f)]=new Map();}get[_0x7e59cb(0x1e2)](){const _0x4f7d95=_0x7e59cb;return this[_0x4f7d95(0xd1)];}get[_0x7e59cb(0x200)](){const _0x2939b1=_0x7e59cb;return this[_0x2939b1(0xcf)];}['_caps'](_0x14d461,_0x362606){const _0x28fd0f=_0x7e59cb,_0x388bc2=_0x22c756(_0x14d461,_0x362606);if(_0x388bc2[_0x28fd0f(0x132)]&&!_0xcc725e(this[_0x28fd0f(0x13d)]))return{..._0x388bc2,'killable':![],'killConfirm':undefined};return _0x388bc2;}[_0x7e59cb(0x260)](){const _0x5bbd6a=_0x7e59cb;return!!this[_0x5bbd6a(0xf3)];}[_0x7e59cb(0x2e3)](_0x163918){Object['assign'](this['_ownMeta'],_0x163918||{});}[_0x7e59cb(0x2ee)](_0x2a3c88){if(_0x2a3c88)this['_listenAddr']=_0x2a3c88;}[_0x7e59cb(0x203)](_0x212118={}){const _0x322718=_0x7e59cb;return this[_0x322718(0x13d)][_0x322718(0x1ba)](_0x212118);}[_0x7e59cb(0x134)](){const _0x5d8532=_0x7e59cb,_0x4b39c9={};let _0x597762=0x0,_0x2debc7=0x0;const _0x1a5b19=new Set();for(const _0x460e99 of this[_0x5d8532(0x1e9)]()){_0x2debc7++;const _0x3faa7d=_0x460e99['processing'];if(!_0x3faa7d)continue;if(_0x3faa7d['participate'])_0x597762++;for(const _0xf603b6 of _0x3faa7d['processors']||[]){if(![_0x5d8532(0x271),_0x5d8532(0x2ad)][_0x5d8532(0x1fa)](_0xf603b6[_0x5d8532(0x23c)]))continue;(_0xf603b6[_0x5d8532(0x211)]==='online'||_0xf603b6['state']==='building')&&_0xf603b6[_0x5d8532(0x164)]&&_0x1a5b19[_0x5d8532(0x145)]((_0xf603b6[_0x5d8532(0x27a)]||_0x5d8532(0x2b0))+':'+_0xf603b6[_0x5d8532(0x164)]);const _0x355efb=_0xf603b6[_0x5d8532(0x27a)]||'default';(_0x4b39c9[_0x355efb]||=[])[_0x5d8532(0x242)]({..._0xf603b6,'env':_0x355efb,'owner':{'pid':_0x460e99[_0x5d8532(0x2de)]??null,'kind':_0x460e99[_0x5d8532(0x18a)]??null}});}}for(const [_0x1f9cae,_0x18dd4c]of Object[_0x5d8532(0x2e5)](_0x4b39c9)){for(const _0x5036b9 of _0x18dd4c){if(_0x5036b9[_0x5d8532(0x23c)]==='single'&&!_0x5036b9[_0x5d8532(0x2c9)]){const _0x1f2f85=_0x1f9cae+':'+(_0x5036b9['cursorKey']??'');if(!_0x1a5b19[_0x5d8532(0x254)](_0x1f2f85))_0x5036b9[_0x5d8532(0x180)]=!![];}}}return{'envs':_0x4b39c9,'policy':null,'participation':{'participating':_0x597762,'total':_0x2debc7},'source':'workers'};}[_0x7e59cb(0x138)](){const _0x4008dc=_0x7e59cb,_0x12cd5a=_0xca3e8f=>{const _0x46f18a=_0x23ad;if(_0xca3e8f[_0x46f18a(0x211)]===_0x46f18a(0x1c0)||_0xca3e8f[_0x46f18a(0x211)]===_0x46f18a(0x278)||_0xca3e8f[_0x46f18a(0x211)]===_0x46f18a(0x231))return 0x3;if(_0xca3e8f[_0x46f18a(0x2c9)])return 0x1;return 0x2;},_0x5586bd=new Map();for(const _0xa3b91e of this['listNodes']()){for(const _0x571139 of _0xa3b91e[_0x4008dc(0x1bb)]?.[_0x4008dc(0xed)]||[]){const _0x39ba3d={..._0x571139,'owner':{'pid':_0xa3b91e[_0x4008dc(0x2de)]??null,'kind':_0xa3b91e[_0x4008dc(0x18a)]??null,'host':_0xa3b91e[_0x4008dc(0x1d5)]??null}},_0x4722a8=_0x571139[_0x4008dc(0x23c)]===_0x4008dc(0x271)?'1ofN:'+(_0x571139[_0x4008dc(0x27a)]??'')+'::'+(_0x571139[_0x4008dc(0x164)]??_0x571139['type']??_0x571139['id']):_0x4008dc(0x234)+(_0xa3b91e[_0x4008dc(0x2ed)]??_0xa3b91e[_0x4008dc(0x22b)]??'')+'::'+(_0x571139['env']??'')+'::'+_0x571139['id'],_0x5a6d7a=_0x5586bd['get'](_0x4722a8);if(!_0x5a6d7a||_0x12cd5a(_0x39ba3d)>_0x12cd5a(_0x5a6d7a))_0x5586bd['set'](_0x4722a8,_0x39ba3d);}}return[..._0x5586bd[_0x4008dc(0x1dd)]()];}['clusterStatusView'](){const _0x3fd594=_0x7e59cb,_0x3f0dc7=Date[_0x3fd594(0x281)](),_0x2958bf=this[_0x3fd594(0x1e9)](),_0x43687a=_0xf8f0fb=>Math[_0x3fd594(0x213)](0x0,Math['round']((_0x3f0dc7-(_0xf8f0fb[_0x3fd594(0x148)]||_0x3f0dc7))/0x3e8)),_0x67cae2=_0x2958bf[_0x3fd594(0x18e)](_0x4c35d6=>_0x4c35d6['kind']===_0x3fd594(0x237)),_0x56b2ea=_0x2958bf[_0x3fd594(0x1c6)](_0x3fe88f=>_0x3fe88f[_0x3fd594(0x18a)]===_0x3fd594(0x13a));if(_0x67cae2||_0x56b2ea[_0x3fd594(0x273)])return{'primary':_0x67cae2?{'pid':_0x67cae2[_0x3fd594(0x2de)],'uptime':_0x43687a(_0x67cae2)}:null,'workers':_0x56b2ea[_0x3fd594(0x188)](_0x5c6c2d=>({'pid':_0x5c6c2d[_0x3fd594(0x2de)],'uptime':_0x43687a(_0x5c6c2d)})),'workersConfigured':_0x67cae2?.[_0x3fd594(0x14e)]?.[_0x3fd594(0x12c)]??_0x56b2ea[_0x3fd594(0x273)],'mode':'cluster'};const _0x5ef8bb=_0x2958bf[_0x3fd594(0x18e)](_0x5bb6f1=>_0x5bb6f1[_0x3fd594(0x18a)]===_0x3fd594(0x12b)||_0x5bb6f1['kind']===_0x3fd594(0x170)||_0x5bb6f1['kind']==='embedded'),_0x2b4d01=_0x5ef8bb?{'pid':_0x5ef8bb[_0x3fd594(0x2de)],'uptime':_0x43687a(_0x5ef8bb)}:{'pid':process[_0x3fd594(0x2de)],'uptime':Math[_0x3fd594(0x213)](0x0,Math['round'](process[_0x3fd594(0x169)]()))};return{'primary':_0x2b4d01,'workers':[_0x2b4d01],'workersConfigured':0x1,'mode':_0x3fd594(0x271)};}['nodesView'](){const _0x552323=_0x7e59cb;return this[_0x552323(0x1ad)]();}[_0x7e59cb(0x2bb)](){const _0x7442d4=_0x7e59cb,_0x40463e=new Map();for(const _0x2bb7b8 of this[_0x7442d4(0x1ad)]())_0x40463e[_0x7442d4(0x296)](_0x2bb7b8[_0x7442d4(0x22b)],{..._0x2bb7b8,'children':[]});const _0x422663=[];for(const _0x134932 of _0x40463e['values']()){const _0x1bd64e=_0x134932['supervisorKey']?_0x40463e[_0x7442d4(0x1bf)](_0x134932[_0x7442d4(0x1e4)]):null;if(_0x1bd64e&&_0x1bd64e!==_0x134932)_0x1bd64e[_0x7442d4(0x224)][_0x7442d4(0x242)](_0x134932);else _0x422663[_0x7442d4(0x242)](_0x134932);}const _0x4eab2e=(_0x2b7830,_0x12e2f1)=>_0x2b7830[_0x7442d4(0x18a)]===_0x12e2f1['kind']?(_0x2b7830[_0x7442d4(0x2de)]||0x0)-(_0x12e2f1[_0x7442d4(0x2de)]||0x0):(_0x2b7830[_0x7442d4(0x18a)]??'')<(_0x12e2f1['kind']??'')?-0x1:0x1,_0x142c4d=_0x4f81ed=>{const _0x35d379=_0x7442d4;_0x4f81ed['sort'](_0x4eab2e);for(const _0x545ff1 of _0x4f81ed)if(_0x545ff1[_0x35d379(0x224)]['length'])_0x142c4d(_0x545ff1[_0x35d379(0x224)]);};return _0x142c4d(_0x422663),_0x422663;}['getProcess'](_0x34582f){const _0x34ed96=_0x7e59cb;return this[_0x34ed96(0x1ad)]()[_0x34ed96(0x18e)](_0x2a0fc9=>_0x2a0fc9[_0x34ed96(0x22b)]===_0x34582f)??null;}[_0x7e59cb(0x1ad)](_0x3d7764=Date['now']()){const _0x352921=_0x7e59cb,_0x271c73=new Map();for(const _0x4c7aff of this[_0x352921(0x1e9)]()){const _0x1e9d9a=_0x346692(_0x4c7aff);let _0x58a22d=_0x271c73[_0x352921(0x1bf)](_0x1e9d9a);!_0x58a22d&&(_0x58a22d={'processKey':_0x1e9d9a,'nodeKey':_0x1e9d9a,'pid':_0x4c7aff[_0x352921(0x2de)],'ppid':_0x4c7aff['ppid']??null,'host':_0x4c7aff[_0x352921(0x1d5)]??null,'kind':_0x4c7aff[_0x352921(0x18a)],'role':null,'supervisorKey':_0x4c7aff[_0x352921(0x1e4)]??null,'slot':_0x4c7aff[_0x352921(0xef)]??null,'slotKey':_0x4c7aff[_0x352921(0x174)]??null,'caps':_0x4c7aff[_0x352921(0x1c9)]??null,'lifecycle':_0x4c7aff[_0x352921(0x125)]??null,'uptime':Math[_0x352921(0x213)](0x0,Math[_0x352921(0x1b7)]((_0x3d7764-(_0x4c7aff[_0x352921(0x148)]||_0x3d7764))/0x3e8)),'startedAt':_0x4c7aff[_0x352921(0x148)]??null,'meta':_0x4c7aff['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x271c73[_0x352921(0x296)](_0x1e9d9a,_0x58a22d));_0x58a22d[_0x352921(0x1cd)][_0x352921(0x242)]({'instanceId':_0x4c7aff[_0x352921(0x13b)]??null,'role':_0x4c7aff['role']??null,'listenAddr':_0x4c7aff[_0x352921(0x248)]??null,'lifecycle':_0x4c7aff[_0x352921(0x125)]??null,'processing':_0x4c7aff['processing']??null});if(!_0x58a22d['role']&&_0x4c7aff['role'])_0x58a22d['role']=_0x4c7aff[_0x352921(0x2b8)];if(!_0x58a22d[_0x352921(0x248)]&&_0x4c7aff[_0x352921(0x248)])_0x58a22d[_0x352921(0x248)]=_0x4c7aff[_0x352921(0x248)];if(!_0x58a22d[_0x352921(0x1bb)]&&_0x4c7aff['processing'])_0x58a22d['processing']=_0x4c7aff[_0x352921(0x1bb)];if(!_0x58a22d[_0x352921(0xf8)]&&_0x4c7aff['engines'])_0x58a22d['engines']=_0x4c7aff[_0x352921(0xf8)];if(!_0x58a22d[_0x352921(0x2a8)]&&_0x4c7aff['singletonClaims'])_0x58a22d[_0x352921(0x2a8)]=_0x4c7aff[_0x352921(0x2a8)];if(_0x58a22d[_0x352921(0x1c9)]==null&&_0x4c7aff[_0x352921(0x1c9)])_0x58a22d['caps']=_0x4c7aff['caps'];if(_0x4c7aff['stats']&&(!_0x58a22d[_0x352921(0x14b)]||(_0x4c7aff[_0x352921(0x14b)]['at']??0x0)>(_0x58a22d['stats']['at']??0x0)))_0x58a22d[_0x352921(0x14b)]=_0x4c7aff['stats'];}return[..._0x271c73[_0x352921(0x1dd)]()];}['runtimeProcessesView'](){const _0x28c9ea=_0x7e59cb,_0x2c4901=[],_0x5b6448={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x4fe2f5 of this[_0x28c9ea(0x1ad)]()){_0x2c4901['push']({'processKey':_0x4fe2f5[_0x28c9ea(0x22b)],'kind':_0x4fe2f5[_0x28c9ea(0x18a)],'pid':_0x4fe2f5[_0x28c9ea(0x2de)],'supervisorKey':_0x4fe2f5[_0x28c9ea(0x1e4)],'meta':_0x4fe2f5[_0x28c9ea(0x14e)]??null,'uptime':_0x4fe2f5['uptime'],'stats':_0x4fe2f5[_0x28c9ea(0x14b)]??null}),_0x5b6448[_0x28c9ea(0x20e)]++;if(_0x4fe2f5[_0x28c9ea(0x14b)]){_0x5b6448[_0x28c9ea(0x16e)]+=_0x4fe2f5[_0x28c9ea(0x14b)][_0x28c9ea(0x16e)]||0x0,_0x5b6448[_0x28c9ea(0xd4)]+=(_0x4fe2f5[_0x28c9ea(0x14b)]['heapUsed']||0x0)+(_0x4fe2f5[_0x28c9ea(0x14b)][_0x28c9ea(0x282)]?.[_0x28c9ea(0xd4)]||0x0);const _0x211176=_0x4fe2f5[_0x28c9ea(0x14b)]['threads'];_0x211176&&(_0x5b6448['threads'][_0x28c9ea(0x2e1)]+=_0x211176[_0x28c9ea(0x2e1)]||0x0,_0x5b6448['threads'][_0x28c9ea(0x214)]+=_0x211176[_0x28c9ea(0x214)]||0x0,_0x5b6448[_0x28c9ea(0x282)][_0x28c9ea(0x16c)]+=_0x211176['busy']||0x0);}}return{'totals':_0x5b6448,'nodes':_0x2c4901};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x7ee9be=_0x7e59cb;this['_isWriter']=this[_0x7ee9be(0x2d8)]||!!writer,this['_isReader']=this[_0x7ee9be(0x195)]||!!reader,this['_kind']=kind||this[_0x7ee9be(0x25f)]||(_0x2dce24['isWorker']?_0x7ee9be(0x13a):'cli'),this[_0x7ee9be(0x17c)]=supervisorKey??this[_0x7ee9be(0x17c)],this[_0x7ee9be(0x21f)]=listenAddr??this[_0x7ee9be(0x21f)],this['_ensureDesired'](),await this[_0x7ee9be(0x1a8)]();if(!writer&&!reader)return null;if(!this[_0x7ee9be(0xf3)]){const _0x50b216=await this[_0x7ee9be(0x13d)][_0x7ee9be(0x27d)](_0x532f67,{'sync':![],'durability':_0x7ee9be(0x240)});if(!_0x50b216[_0x7ee9be(0x2a9)](_0x1a2a79))await _0x50b216[_0x7ee9be(0x29d)](_0x1a2a79);this[_0x7ee9be(0xf3)]=_0x50b216;}return this[_0x7ee9be(0xf3)];}[_0x7e59cb(0x1aa)](){const _0x496037=_0x7e59cb;return this[_0x496037(0x23a)]!==this[_0x496037(0xf3)]&&(this[_0x496037(0x23a)]=this[_0x496037(0xf3)],this[_0x496037(0x1e6)]=this['_statusEnv']['_getType'](_0x1a2a79)['data']),this[_0x496037(0x1e6)];}['_putRowAsync'](_0x3f575c){const _0x10c091=_0x7e59cb;if(_0x491529)return this[_0x10c091(0x1aa)]()[_0x10c091(0xe2)](_0x3f575c[_0x10c091(0x2ed)],_0x3f575c,0x1);const _0x488c24=this[_0x10c091(0x1aa)]()[_0x10c091(0x126)](_0x3f575c['nodeKey'],_0x3f575c,0x1);if(_0x488c24&&typeof _0x488c24[_0x10c091(0x2a1)]==='function')_0x488c24['then'](undefined,()=>{});return _0x488c24;}[_0x7e59cb(0xce)](_0x5dddd2){const _0xc2772d=_0x7e59cb;return this[_0xc2772d(0x1aa)]()[_0xc2772d(0xe2)](_0x5dddd2['nodeKey'],_0x5dddd2,0x1);}['_removeRowAsync'](_0x3fa943){const _0x29d730=_0x7e59cb;if(_0x491529)try{return this[_0x29d730(0x1aa)]()[_0x29d730(0x1ef)](_0x3fa943);}catch{return![];}const _0x2164c1=this['_nodeDb']()[_0x29d730(0x17d)](_0x3fa943);if(_0x2164c1&&typeof _0x2164c1[_0x29d730(0x2a1)]===_0x29d730(0x156))_0x2164c1['then'](undefined,()=>{});return _0x2164c1;}async[_0x7e59cb(0x1d0)](_0x2b7561){const _0x16f8aa=_0x7e59cb;if(!this[_0x16f8aa(0xf3)]||!this[_0x16f8aa(0x2d8)]||!_0x2b7561?.['nodeKey'])return;return this['_putRowAsync'](_0x2b7561);}async[_0x7e59cb(0x2e6)](_0xfa1e9a){const _0x6503b1=_0x7e59cb;if(!this[_0x6503b1(0xf3)]||!this['_isWriter']||!_0xfa1e9a)return;const _0x2abce8=_0xfa1e9a[_0x6503b1(0x1fa)]('#'),_0x28b6c0=[];for(const {key:_0x79e0ce}of this[_0x6503b1(0xf3)][_0x6503b1(0x26a)](_0x1a2a79)){if(_0x79e0ce===_0xfa1e9a||!_0x2abce8&&typeof _0x79e0ce===_0x6503b1(0x238)&&_0x79e0ce[_0x6503b1(0x165)](_0xfa1e9a+'#'))_0x28b6c0[_0x6503b1(0x242)](_0x79e0ce);}for(const _0x15e848 of _0x28b6c0){try{this['_nodeDb']()['removeSync'](_0x15e848);}catch{}}}['_nodeDead'](_0x3ec149){const _0x5443ea=_0x7e59cb;if(typeof _0x3ec149?.['pid']!==_0x5443ea(0x253))return![];if(_0x3ec149[_0x5443ea(0x1d5)]!==_0x35c0b3[_0x5443ea(0x217)]())return![];if(_0x3ec149[_0x5443ea(0x2de)]===process[_0x5443ea(0x2de)])return![];if(_0x3ec149[_0x5443ea(0x2e2)]!=null&&_0x3ec149[_0x5443ea(0x2e2)]<Date[_0x5443ea(0x281)]()-_0x412fba)return!![];try{return process[_0x5443ea(0x15b)](_0x3ec149['pid'],0x0),![];}catch(_0x5010d2){return _0x5010d2['code']==='ESRCH';}}[_0x7e59cb(0x1e9)](){const _0x4e7e11=_0x7e59cb;if(!this[_0x4e7e11(0xf3)])return[];try{this[_0x4e7e11(0xf3)]['db']?.['resetReadTxn']?.();}catch{}const _0x2792e1=Date[_0x4e7e11(0x281)](),_0x33ed42=_0x35c0b3[_0x4e7e11(0x217)](),_0x4383ed=[];for(const {value:_0x597bb7}of this[_0x4e7e11(0xf3)]['getRange'](_0x1a2a79)){if(!_0x597bb7)continue;let _0x212776=null;_0x597bb7[_0x4e7e11(0x1d5)]===_0x33ed42&&typeof _0x597bb7[_0x4e7e11(0x2de)]===_0x4e7e11(0x253)&&(_0x212776=!this[_0x4e7e11(0x2b5)](_0x597bb7));if(_0x212776===![])continue;const _0x24ea08=_0x597bb7[_0x4e7e11(0x2e2)]==null||_0x597bb7[_0x4e7e11(0x2e2)]>=_0x2792e1;if(_0x212776===!![]||_0x24ea08)_0x4383ed[_0x4e7e11(0x242)](_0x597bb7);}return _0x4383ed;}async[_0x7e59cb(0x1ee)](_0x368340=0x0){const _0x3f8546=_0x7e59cb;if(!this[_0x3f8546(0xf3)]||!this['_isWriter'])return;const _0x16cecf=Date['now']()-_0x368340,_0x2b3fc6=new Set(),_0x487172=[],_0xe794d4=_0x35c0b3[_0x3f8546(0x217)](),_0x253aa2=require$$6[_0x3f8546(0x210)];for(const {key:_0x46ceb4,value:_0x4d9740}of this[_0x3f8546(0xf3)][_0x3f8546(0x26a)](_0x1a2a79)){if(!_0x4d9740)continue;const _0xc9b26d=_0x4d9740[_0x3f8546(0x1d5)]===_0xe794d4&&typeof _0x4d9740[_0x3f8546(0x2de)]===_0x3f8546(0x253),_0x5c0e69=_0xc9b26d?this[_0x3f8546(0x2b5)](_0x4d9740):_0x4d9740[_0x3f8546(0x2e2)]!=null&&_0x4d9740[_0x3f8546(0x2e2)]<_0x16cecf;if(_0x5c0e69)_0x487172['push'](_0x46ceb4);else{_0x2b3fc6[_0x3f8546(0x145)](_0x346692(_0x4d9740)??_0x46ceb4);if(_0x4d9740[_0x3f8546(0x210)]&&_0x4d9740[_0x3f8546(0x210)]!==_0x253aa2){if(!this[_0x3f8546(0x128)])this[_0x3f8546(0x128)]=new Set();!this[_0x3f8546(0x128)][_0x3f8546(0x254)](_0x4d9740[_0x3f8546(0x210)])&&(this[_0x3f8546(0x128)]['add'](_0x4d9740['version']),this[_0x3f8546(0x13d)]['log']?.['warn']?.(_0x3f8546(0x261)+(_0x4d9740[_0x3f8546(0x2de)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x4d9740['version']+'\x20while\x20this\x20process\x20runs\x20'+_0x253aa2+'\x20—\x20'+_0x3f8546(0x20c),{'feature':_0x3f8546(0x127)}));}}}for(const _0x2b70ec of _0x487172)this[_0x3f8546(0x225)](_0x2b70ec);if(this[_0x3f8546(0x17e)]()){const _0x394432=[];for(const {key:_0x5a18fc}of this['listDesired'](_0x3f8546(0x25d))){if(!_0x2b3fc6[_0x3f8546(0x254)](_0x5a18fc)){if(_0x491529)try{this['_desired'][_0x3f8546(0x1ef)]('node/'+_0x5a18fc);}catch{}else _0x394432['push'](this['_desired'][_0x3f8546(0x17d)]('node/'+_0x5a18fc));}}if(_0x394432[_0x3f8546(0x273)])await Promise[_0x3f8546(0x24e)](_0x394432);}}[_0x7e59cb(0x23e)](_0x3c61e6=null){const _0x5ee033=_0x7e59cb;if(this[_0x5ee033(0x222)])return;if(!this[_0x5ee033(0x2d8)]||!this['_statusEnv']){this[_0x5ee033(0x13d)]?.[_0x5ee033(0x2c7)]?.[_0x5ee033(0x1ce)]?.(_0x5ee033(0x153)+this[_0x5ee033(0x2d8)]+_0x5ee033(0x1b2)+!!this[_0x5ee033(0xf3)]+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':'processes'});return;}this[_0x5ee033(0x25c)]=_0x3c61e6,this['_onProcEvent']=()=>this['_maybePublish']();for(const _0x41eaff of _0x4383ca)this[_0x5ee033(0x13d)]['events']['on'](_0x41eaff,this[_0x5ee033(0x2b9)]);this[_0x5ee033(0x12a)]();const _0x2fee57=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x4960b3;this[_0x5ee033(0x222)]=setInterval(()=>{const _0x209990=_0x5ee033;if(this[_0x209990(0x25c)])try{this[_0x209990(0x25c)]();}catch{}this['_publishNow'](),this[_0x209990(0x1ee)]()[_0x209990(0x2cd)](()=>{});},_0x2fee57);if(this[_0x5ee033(0x222)][_0x5ee033(0x1b8)])this[_0x5ee033(0x222)][_0x5ee033(0x1b8)]();}[_0x7e59cb(0x129)](){const _0x567009=_0x7e59cb;if(!this[_0x567009(0x2d8)]||!this['_statusEnv'])return;if(Date[_0x567009(0x281)]()-this['_lastPublishAt']<_0x1c3d4a)return;this[_0x567009(0x12a)]();}['_publishNow'](){const _0x5520e6=_0x7e59cb;if(!this[_0x5520e6(0x2d8)]||!this[_0x5520e6(0xf3)])return;this['_lastPublishAt']=Date[_0x5520e6(0x281)]();try{const _0x3bb801=[this[_0x5520e6(0x2d5)]()];for(const _0xe529b9 of this[_0x5520e6(0x15c)]['values']())_0x3bb801[_0x5520e6(0x242)](this[_0x5520e6(0x2cc)](_0xe529b9));const _0x2c4b90=_0x3c3950['enabled']?_0x3c3950[_0x5520e6(0x281)]():0x0;for(const _0x41c358 of _0x3bb801){try{this['_putRowSync'](_0x41c358),this[_0x5520e6(0x110)]=![];}catch(_0x504303){!this[_0x5520e6(0x110)]&&(this[_0x5520e6(0x110)]=!![],this[_0x5520e6(0x13d)]?.[_0x5520e6(0x2c7)]?.['warn']?.('registry\x20publish\x20failing:\x20'+_0x504303['message'],{'feature':_0x5520e6(0x20e)}));}}if(_0x3c3950[_0x5520e6(0x2df)])_0x3c3950['note'](_0x5520e6(0x27e),_0x3c3950[_0x5520e6(0x281)]()-_0x2c4b90,_0x5520e6(0x1d6)+_0x3bb801[_0x5520e6(0x273)]+_0x5520e6(0x2e8));}catch(_0x37cdbc){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this['okdb']?.[_0x5520e6(0x2c7)]?.[_0x5520e6(0x1ce)]?.('registry\x20publish\x20failing:\x20'+_0x37cdbc[_0x5520e6(0xf9)],{'feature':_0x5520e6(0x20e)}));}}async[_0x7e59cb(0x223)](){const _0x104f59=_0x7e59cb;if(this['_onProcEvent']){for(const _0x7a537f of _0x4383ca){try{this[_0x104f59(0x13d)]['events'][_0x104f59(0x232)](_0x7a537f,this[_0x104f59(0x2b9)]);}catch{}}this[_0x104f59(0x2b9)]=null;}this[_0x104f59(0x222)]&&(clearInterval(this[_0x104f59(0x222)]),this[_0x104f59(0x222)]=null);try{if(this[_0x104f59(0xf3)]&&this[_0x104f59(0x2d8)])await this[_0x104f59(0x2e6)](this['_rowKey']);}catch{}}async['deregisterSelf'](){const _0xbf1a35=_0x7e59cb;if(!this[_0xbf1a35(0xf3)]||!this[_0xbf1a35(0x2d8)])return;try{await this['removeNode'](this[_0xbf1a35(0xcf)]);}catch{}try{const _0x536f30=[];for(const {value:_0x109b81}of this[_0xbf1a35(0xf3)][_0xbf1a35(0x26a)](_0x1a2a79)){if(_0x109b81?.[_0xbf1a35(0x264)]===process['pid']&&_0x109b81[_0xbf1a35(0x2ed)])_0x536f30['push'](_0x109b81[_0xbf1a35(0x2ed)]);}for(const _0x2850ef of _0x536f30){try{await this[_0xbf1a35(0x2e6)](_0x2850ef);}catch{}}}catch{}}async['publishOwnRow'](){const _0x3a66bf=_0x7e59cb;return this['putNode'](this[_0x3a66bf(0x2d5)]());}async['publishChildRow'](_0x19ad63){const _0x473961=_0x7e59cb;if(!this[_0x473961(0xf3)]||!this[_0x473961(0x2d8)])return;return this[_0x473961(0x1d0)](this[_0x473961(0x2cc)](_0x19ad63));}[_0x7e59cb(0x2cc)]({pid:_0x38b542,startedAt:_0x356957,kind:_0x53dafa,supervisorKey:_0x357970,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x7e59cb(0x1fb),meta:meta=null,stats:stats=null}){const _0x50299c=_0x7e59cb,_0x515d0e=Date[_0x50299c(0x281)](),_0x34d54b=_0x467e6e(_0x38b542,_0x356957);return{'nodeKey':_0x1f463e(_0x34d54b,'0'),'processKey':_0x34d54b,'instanceId':'0','pid':_0x38b542,'startedAt':_0x356957,'ppid':process[_0x50299c(0x2de)],'host':_0x35c0b3[_0x50299c(0x217)](),'supervisorKey':_0x357970,'slot':slot,'slotKey':slotKey,'kind':_0x53dafa,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x515d0e,'expiresAt':_0x515d0e+_0x394c48,'caps':this['_caps'](_0x53dafa,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x7e59cb(0x11c)](_0x5cfd18){const _0x15a5a5=_0x7e59cb;if(!_0x5cfd18?.[_0x15a5a5(0x2de)])return null;const _0x135231=_0x467e6e(_0x5cfd18[_0x15a5a5(0x2de)],_0x5cfd18[_0x15a5a5(0x148)]);this[_0x15a5a5(0x15c)][_0x15a5a5(0x296)](_0x135231,{..._0x5cfd18,'supervisorKey':_0x5cfd18[_0x15a5a5(0x1e4)]??this[_0x15a5a5(0xd1)]});if(this[_0x15a5a5(0x2d8)])await this[_0x15a5a5(0x124)](this[_0x15a5a5(0x15c)][_0x15a5a5(0x1bf)](_0x135231))['catch']?.(()=>{});return _0x135231;}['removeSupervisedChild'](_0x1ea405){const _0x112241=_0x7e59cb;if(!_0x1ea405)return;return this['_children']['delete'](_0x1ea405),this[_0x112241(0x2e6)](_0x1ea405);}[_0x7e59cb(0x20f)](){const _0x2ff36c=_0x7e59cb,_0x5d5be6=Date[_0x2ff36c(0x281)](),_0x2b0d0a=process[_0x2ff36c(0x136)](),_0xe11e99=(_0x5d5be6-this['_lastCpuAt'])*0x3e8;if(_0xe11e99>=0x3d090){const _0x1ab081=_0x2b0d0a[_0x2ff36c(0x151)]-this[_0x2ff36c(0x2a7)][_0x2ff36c(0x151)]+(_0x2b0d0a[_0x2ff36c(0x22c)]-this['_lastCpuUsage']['system']),_0x1d9283=_0x35c0b3[_0x2ff36c(0x18d)]()[_0x2ff36c(0x273)]||0x1;this[_0x2ff36c(0x107)]=Math['min'](0x64,Math[_0x2ff36c(0x1b7)](_0x1ab081/(_0xe11e99*_0x1d9283)*0x64)),this[_0x2ff36c(0x1a4)]=Math['round'](_0xe11e99/0x3e8),this['_lastCpuUsage']=_0x2b0d0a,this[_0x2ff36c(0x1a5)]=_0x5d5be6;}const _0xca5921=process[_0x2ff36c(0x295)](),_0x4c3968=this[_0x2ff36c(0x17f)][_0x2ff36c(0x1f9)];let _0x3ebc83=0x0;if(_0x4c3968>0x0){const _0x243f37=[this[_0x2ff36c(0x13d)],...this['okdb'][_0x2ff36c(0x161)]?.[_0x2ff36c(0x1dd)]?.()??[]];for(const _0x360121 of _0x243f37){const _0x2b45f8=_0x360121[_0x2ff36c(0x22d)]?.[_0x2ff36c(0x291)];if(_0x2b45f8)_0x3ebc83+=_0x2b45f8[_0x2ff36c(0x21e)][_0x2ff36c(0x16c)];}}let _0x5059d5=null;const _0x59f473=_0x4c3968;if(_0x59f473>0x0){let _0x56da43=0x0;for(const _0x3b4016 of this[_0x2ff36c(0x17f)][_0x2ff36c(0x1dd)]())_0x56da43+=_0x3b4016[_0x2ff36c(0xd4)]||0x0;_0x5059d5={'count':_0x59f473,'heapUsed':_0x56da43,'sandbox':_0x4c3968,'busy':_0x3ebc83};}return{'rss':_0xca5921[_0x2ff36c(0x16e)],'heapUsed':_0xca5921['heapUsed'],'heapTotal':_0xca5921[_0x2ff36c(0x1de)],'external':_0xca5921[_0x2ff36c(0x239)],'cpuPct':this[_0x2ff36c(0x107)],'cpuWindowMs':this[_0x2ff36c(0x1a4)]??null,'threads':_0x5059d5,'at':_0x5d5be6};}[_0x7e59cb(0x23f)](_0x3297b3,_0x469501){const _0x25d800=_0x7e59cb;if(!_0x3297b3||!_0x469501)return;this[_0x25d800(0x17f)][_0x25d800(0x296)](_0x3297b3,_0x469501);}[_0x7e59cb(0x205)](_0x49495d){const _0x17577c=_0x7e59cb;this[_0x17577c(0x17f)][_0x17577c(0x102)](_0x49495d);}[_0x7e59cb(0x15f)](_0x3ff4f3,_0x51148b,_0x21b39f=undefined){const _0x1dfb47=_0x7e59cb,_0x4ed629=this[_0x1dfb47(0x15c)][_0x1dfb47(0x1bf)](_0x3ff4f3);if(!_0x4ed629||!_0x51148b)return;if(_0x21b39f!==undefined)_0x4ed629['processing']=_0x21b39f;_0x4ed629[_0x1dfb47(0x14b)]={'rss':_0x51148b[_0x1dfb47(0x16e)]??null,'heapUsed':_0x51148b[_0x1dfb47(0xd4)]??null,'heapTotal':_0x51148b[_0x1dfb47(0x1de)]??null,'external':_0x51148b[_0x1dfb47(0x239)]??null,'cpuPct':_0x51148b['cpuPct']??null,'cpuWindowMs':_0x51148b['cpuWindowMs']??null,'threads':_0x51148b[_0x1dfb47(0x282)]??null,'claims':_0x51148b[_0x1dfb47(0x178)]??null,'envsOpen':_0x51148b[_0x1dfb47(0xfc)]??null,'at':Date['now']()};}[_0x7e59cb(0x2d5)](){const _0x51de43=_0x7e59cb,_0x52bf9d=Date[_0x51de43(0x281)](),_0x49cc9a=this['okdb'][_0x51de43(0x13e)]||{},_0x7e8ac5=this[_0x51de43(0x25f)]||_0x51de43(0x12b);return{'nodeKey':this[_0x51de43(0xcf)],'processKey':this[_0x51de43(0xd1)],'instanceId':this['_instanceId'],'pid':process[_0x51de43(0x2de)],'startedAt':this[_0x51de43(0x199)],'instanceStartedAt':this[_0x51de43(0x121)],'ppid':typeof process['ppid']===_0x51de43(0x253)?process[_0x51de43(0x264)]:null,'host':_0x35c0b3['hostname'](),'supervisorKey':this['_supervisorKey']??null,'version':require$$6['version'],'kind':_0x7e8ac5,'role':{'engines':!!_0x49cc9a[_0x51de43(0xf8)],'processors':!!_0x49cc9a['processors'],'compaction':_0x49cc9a[_0x51de43(0x1b6)],'http':_0x49cc9a[_0x51de43(0x158)]},'listenAddr':this[_0x51de43(0x21f)]??null,'heartbeatAt':_0x52bf9d,'expiresAt':_0x52bf9d+_0x394c48,'caps':this['_caps'](_0x7e8ac5,_0x49cc9a),'lifecycle':{'state':_0x51de43(0x1fb),'desiredVersionApplied':null},'meta':{...this[_0x51de43(0x1cb)]},'processing':_0x49cc9a[_0x51de43(0xed)]?this[_0x51de43(0x24b)]():null,'engines':_0x49cc9a['engines']?[...this[_0x51de43(0x13d)][_0x51de43(0x2e4)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x51de43(0x20f)](),'writers':this[_0x51de43(0x1a2)]()};}['_collectWriterFacet'](){const _0x449a59=_0x7e59cb,_0x19a1c7={};try{for(const [_0x4f2ca3,_0x45bc35]of this[_0x449a59(0x13d)]['_envs']){try{const _0x4ef7a7=_0x45bc35[_0x449a59(0x2bc)]?.();if(!_0x4ef7a7)continue;if(!_0x4ef7a7[_0x449a59(0x24a)]&&!_0x4ef7a7[_0x449a59(0x21a)]&&!(_0x4ef7a7[_0x449a59(0x280)]??0x0)&&!_0x4ef7a7[_0x449a59(0xc3)])continue;_0x19a1c7[_0x4f2ca3]={'depth':_0x4ef7a7['depth'],'oldestPendingMs':_0x4ef7a7[_0x449a59(0x269)],'committed':_0x4ef7a7[_0x449a59(0x21a)],'commitsPerSec':_0x4ef7a7[_0x449a59(0x10b)],'commitP99Ms':_0x4ef7a7['commitP99Ms'],'parkedNow':_0x4ef7a7[_0x449a59(0x280)]??0x0,'draining':!!_0x4ef7a7['draining']};}catch{}}}catch{}return Object['keys'](_0x19a1c7)['length']?_0x19a1c7:null;}[_0x7e59cb(0x268)](){const _0x1d7833=_0x7e59cb,_0x81fdb7=process['pid'],_0x2b6666=Date[_0x1d7833(0x281)](),_0x24eaf9=_0x3a25da=>{const _0xa18a32=_0x1d7833;if(!_0x3a25da)return[];const _0x233253=[];try{for(const {id:_0x140d9b,entry:_0x474296}of _0x3a25da['list']()){if(_0x474296?.[_0xa18a32(0x2a6)]?.[_0xa18a32(0x2de)]!==_0x81fdb7)continue;const _0x3fe93c=_0x474296['updatedAt']??_0x474296[_0xa18a32(0x18c)]??0x0;if(_0x3fe93c+(_0x474296[_0xa18a32(0x289)]??0x0)<_0x2b6666)continue;_0x233253[_0xa18a32(0x242)](_0x140d9b);}}catch{}return _0x233253;},_0x907d44=_0x24eaf9(this[_0x1d7833(0x290)]('compact')),_0x4bfc23=_0x24eaf9(this[_0x1d7833(0x290)](_0x1d7833(0x120)));if(!_0x907d44['length']&&!_0x4bfc23[_0x1d7833(0x273)])return null;return{'compact':_0x907d44,'replicate':_0x4bfc23};}[_0x7e59cb(0x290)](_0x5141ce){const _0x17dd12=_0x7e59cb;if(!this[_0x17dd12(0x13d)]?.[_0x17dd12(0xfd)])return null;if(!this[_0x17dd12(0x1d4)])this['_singletonLocks']=new Map();let _0x8db4f7=this['_singletonLocks'][_0x17dd12(0x1bf)](_0x5141ce);if(!_0x8db4f7)try{_0x8db4f7=new _0x1c02f9(this['okdb'][_0x17dd12(0xfd)],{'namespace':_0x5141ce}),this[_0x17dd12(0x1d4)]['set'](_0x5141ce,_0x8db4f7);}catch{return null;}return _0x8db4f7;}['_buildProcessingFacet'](){const _0x1e5707=_0x7e59cb,_0x1b13f4=[];try{for(const [_0x11dd59,_0xa5ecd1]of this[_0x1e5707(0x13d)]['_envs']){if(_0x11dd59[_0x1e5707(0x165)]('~'))continue;for(const _0x4b7779 of _0xa5ecd1['processor'][_0x1e5707(0x27f)]())_0x1b13f4[_0x1e5707(0x242)]({..._0x4b7779,'env':_0x11dd59});}}catch{}return{'participate':this[_0x1e5707(0x13d)][_0x1e5707(0xed)]?.['_participate']??![],'processors':_0x1b13f4};}[_0x7e59cb(0x17e)](){const _0x518b49=_0x7e59cb;if(this['_desired'])return!![];const _0x14f847=this[_0x518b49(0x13d)][_0x518b49(0xfd)];if(!_0x14f847)return![];return this[_0x518b49(0x1d2)]=_0x14f847['openDB'](_0x5cc13b,{'dupSort':![]}),this[_0x518b49(0x1f0)]=_0x14f847['openDB'](_0x6ff6ec,{'dupSort':![]}),!![];}async[_0x7e59cb(0x1a8)](){const _0x27d5bd=_0x7e59cb;if(!this[_0x27d5bd(0x17e)]())return;const _0x349655=_0x27d5bd(0xff),_0x5025de=0x1,_0x2d8955=this[_0x27d5bd(0x1d2)][_0x27d5bd(0x1bf)](_0x349655)??0x0;if(_0x2d8955>=_0x5025de)return;const _0x6f575b=_0x5ab2b0=>{const _0x393496=_0x27d5bd;if(_0x5ab2b0===_0x393496(0xfa))return _0x393496(0x271);if(_0x5ab2b0===_0x393496(0x167))return'fanout';return _0x5ab2b0;};await this[_0x27d5bd(0x13d)][_0x27d5bd(0x28b)][_0x27d5bd(0x226)][_0x27d5bd(0x1df)](()=>{const _0x1934b7=_0x27d5bd;for(const _0xec656 of['procmode/',_0x1934b7(0xe6)]){for(const {key:_0x2f13f6,value:_0x853af}of this[_0x1934b7(0x1d2)][_0x1934b7(0x26a)]({'start':_0xec656,'end':_0xec656+'ÿ'})){if(typeof _0x2f13f6!==_0x1934b7(0x238)||!_0x2f13f6[_0x1934b7(0x165)](_0xec656))break;const _0xe2e3af=_0x6f575b(_0x853af[_0x1934b7(0x23c)]);if(_0xe2e3af!==_0x853af[_0x1934b7(0x23c)])this[_0x1934b7(0x1d2)][_0x1934b7(0x126)](_0x2f13f6,{..._0x853af,'mode':_0xe2e3af});}}this[_0x1934b7(0x1d2)][_0x1934b7(0x126)](_0x349655,_0x5025de);});}[_0x7e59cb(0x2a4)](){const _0x29160b=_0x7e59cb;return!!this[_0x29160b(0x1d2)];}[_0x7e59cb(0x24d)](_0x3b6676,_0xb2d767){const _0x54e065=_0x7e59cb;if(!this[_0x54e065(0x17e)]())return null;const _0x431016=_0x3b6676+'/'+_0xb2d767;return this['_refreshDesiredSnapshot'](),this[_0x54e065(0xd5)][_0x54e065(0x1bf)](_0x431016)??this['_desired']['get'](_0x431016)??null;}[_0x7e59cb(0x229)](){const _0x5cc0b8=_0x7e59cb;if(!_0x491529)return;try{this['okdb']['_systemEnv']?.['db']?.[_0x5cc0b8(0x287)]?.();}catch{}}async[_0x7e59cb(0x196)](_0x1a8bbd,_0x3bfcc7,_0x41d344){const _0x10d683=_0x7e59cb;if(!this[_0x10d683(0x17e)]())return null;const _0x292eda=_0x1a8bbd+'/'+_0x3bfcc7;this['_refreshDesiredSnapshot']();const _0x1a1c74=this['_desiredOverlay'][_0x10d683(0x1bf)](_0x292eda)??this[_0x10d683(0x1d2)][_0x10d683(0x1bf)](_0x292eda)??{'version':0x0},_0x50f3de=(_0x1a1c74[_0x10d683(0x210)]||0x0)+0x1,_0x561a39={..._0x1a1c74,..._0x41d344,'version':_0x50f3de,'updatedAt':Date['now']()};this[_0x10d683(0xd5)][_0x10d683(0x296)](_0x292eda,_0x561a39);try{await this['okdb'][_0x10d683(0x28b)]['_writer'][_0x10d683(0x1df)](()=>{const _0x2294c7=_0x10d683;this[_0x2294c7(0x1d2)][_0x2294c7(0x126)](_0x292eda,_0x561a39);});}finally{if(this[_0x10d683(0xd5)][_0x10d683(0x1bf)](_0x292eda)===_0x561a39)this[_0x10d683(0xd5)]['delete'](_0x292eda);}return _0x50f3de;}[_0x7e59cb(0x219)](_0x29f231){const _0x411172=_0x7e59cb;if(!this[_0x411172(0x17e)]())return[];this[_0x411172(0x229)]();const _0x3009a9=_0x29f231+'/',_0x44f02e=[];for(const {key:_0x43fd19,value:_0x401c7f}of this[_0x411172(0x1d2)]['getRange']({'start':_0x3009a9,'end':_0x3009a9+'ÿ'})){if(typeof _0x43fd19!=='string'||!_0x43fd19[_0x411172(0x165)](_0x3009a9))break;_0x44f02e[_0x411172(0x242)]({'key':_0x43fd19[_0x411172(0x1e0)](_0x3009a9['length']),'value':_0x401c7f});}return _0x44f02e;}[_0x7e59cb(0x262)](_0x109f6a){const _0x1d5139=_0x7e59cb;if(!this[_0x1d5139(0x17e)]())return null;return this[_0x1d5139(0x1f0)]['get'](_0x109f6a)??null;}async[_0x7e59cb(0x144)](_0x31df6d,_0x803b8a,_0x18dd22={}){const _0x4b3a5e=_0x7e59cb;if(!this['_ensureDesired']())return null;let _0x595dc5;return await this[_0x4b3a5e(0x13d)][_0x4b3a5e(0x28b)][_0x4b3a5e(0x226)][_0x4b3a5e(0x1df)](()=>{const _0x1f58bc=_0x4b3a5e,_0x329a7f=this[_0x1f58bc(0x1f0)][_0x1f58bc(0x1bf)](_0x31df6d)||{'epoch':0x0};_0x595dc5=(_0x329a7f[_0x1f58bc(0x1e1)]||0x0)+0x1,this[_0x1f58bc(0x1f0)][_0x1f58bc(0x126)](_0x31df6d,{..._0x329a7f,..._0x18dd22,'cmd':_0x803b8a,'epoch':_0x595dc5,'updatedAt':Date[_0x1f58bc(0x281)]()});}),_0x595dc5;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x573e35,'nodeKey':_0x467e6e,'logicalKey':_0x3a0ecf,'slotKey':_0x300894,'PROCESS_ENV':_0x532f67,'NODE_TYPE':_0x1a2a79},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x2237e1=_0x22d7b4;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x46878c=require$$0$4,{EVENTS:_0x3c1f43,CHANGE_ACTIONS:_0xe917bb}=requireOkdbEnums(),{LOOP:_0x547220}=requireOkdbLoopMonitor(),_0x589d40=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x38eed1=0x5,_0x267883=0x2710;class _0x4c07d9 extends _0x46878c{constructor(_0x513e7c,_0x4d44e2={}){const _0x51eb9f=_0x23ad;super(),this[_0x51eb9f(0x13d)]=_0x513e7c,this[_0x51eb9f(0x2b1)]=_0x4d44e2['quantum']??_0x589d40,this[_0x51eb9f(0x16d)]=_0x4d44e2[_0x51eb9f(0x1ea)]??_0x38eed1,this[_0x51eb9f(0x2c3)]=_0x4d44e2[_0x51eb9f(0x179)]??_0x267883,this['_started']=![],this[_0x51eb9f(0x1a3)]=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x51eb9f(0x1a0)]=null,this[_0x51eb9f(0x171)]=![],this[_0x51eb9f(0x209)]=new Set(),this['_onItem']=_0x59af0d=>this[_0x51eb9f(0xd0)](_0x59af0d),this['_onPoke']=_0x14d5af=>this[_0x51eb9f(0x135)](_0x14d5af),this[_0x51eb9f(0x1bc)]=()=>this[_0x51eb9f(0x298)]();}['start'](){const _0x42b110=_0x23ad;if(this['_started'])return;this[_0x42b110(0x172)]=!![];for(const [_0x4391fb,_0x1e5946]of this[_0x42b110(0x13d)][_0x42b110(0x161)]){if(_0x4391fb[_0x42b110(0x165)]('~'))continue;try{_0x1e5946[_0x42b110(0x1d1)]();}catch{}}for(const [_0xadff12,_0x1b199c]of this[_0x42b110(0x13d)]['_envs']){if(_0xadff12[_0x42b110(0x165)]('~'))continue;try{this[_0x42b110(0x23d)][_0x42b110(0x296)](_0xadff12,_0x1b199c[_0x42b110(0x21d)]()||0x0);}catch{}}const {events:_0x40d243}=this[_0x42b110(0x13d)];_0x40d243['on'](_0x3c1f43[_0x42b110(0x2f0)],this[_0x42b110(0x1e3)]),_0x40d243['on'](_0x3c1f43[_0x42b110(0x142)],this[_0x42b110(0x1e3)]),_0x40d243['on'](_0x3c1f43[_0x42b110(0x2a3)],this[_0x42b110(0x1e3)]),_0x40d243['on'](_0x3c1f43[_0x42b110(0x1ab)],this[_0x42b110(0x236)]),_0x40d243[_0x42b110(0x194)](_0x3c1f43[_0x42b110(0x187)],this[_0x42b110(0x1bc)]);}['stop'](){const _0x594938=_0x23ad;if(!this['_started'])return;this[_0x594938(0x172)]=![];const {events:_0x5efc6c}=this['okdb'];_0x5efc6c[_0x594938(0x232)](_0x3c1f43['ITEM_CREATE'],this['_onItem']),_0x5efc6c[_0x594938(0x232)](_0x3c1f43[_0x594938(0x142)],this[_0x594938(0x1e3)]),_0x5efc6c['off'](_0x3c1f43[_0x594938(0x2a3)],this[_0x594938(0x1e3)]),_0x5efc6c[_0x594938(0x232)](_0x3c1f43[_0x594938(0x1ab)],this['_onPoke']);try{_0x5efc6c['off'](_0x3c1f43[_0x594938(0x187)],this[_0x594938(0x1bc)]);}catch{}this[_0x594938(0x1a0)]&&(clearTimeout(this[_0x594938(0x1a0)]),this[_0x594938(0x1a0)]=null),this[_0x594938(0x1ff)][_0x594938(0x157)](),this[_0x594938(0x1a3)]['clear'](),this['_baselines'][_0x594938(0x157)](),this[_0x594938(0x209)][_0x594938(0x157)]();}[_0x2237e1(0x1d3)](_0x5ee511,_0x45e978,_0x1bbad9,_0x45c163){return _0x5ee511+'\x00'+_0x45e978+'\x00'+_0x1bbad9+'\x00'+_0x45c163;}[_0x2237e1(0x212)](_0x30e4bc,_0xd30508,_0x33ed93,_0x4e82b1){const _0x4de95f=_0x2237e1,_0x15b285=this['_dedupeKey'](_0x30e4bc,_0xd30508,_0x33ed93,_0x4e82b1);if(this[_0x4de95f(0x209)][_0x4de95f(0x254)](_0x15b285))return![];this[_0x4de95f(0x209)][_0x4de95f(0x145)](_0x15b285);if(this[_0x4de95f(0x209)][_0x4de95f(0x1f9)]>this['_dedupeMax']){const _0x402263=this[_0x4de95f(0x209)]['values']()[_0x4de95f(0x113)]()[_0x4de95f(0x10c)];this[_0x4de95f(0x209)]['delete'](_0x402263);}return!![];}[_0x2237e1(0xd0)](_0x553fee){const _0x2e2eff=_0x2237e1;if(!this[_0x2e2eff(0x172)]||!_0x553fee)return;const {env:_0xca1fee,type:_0x4cdb89,key:_0x1b0693,clock:_0x14243e,origin:_0xf2c78e,action:_0x5af85a,newValue:_0x308da8,oldValue:_0x3df825}=_0x553fee;if(_0xca1fee==null||_0x4cdb89==null||_0x1b0693==null)return;if(typeof _0xca1fee===_0x2e2eff(0x238)&&_0xca1fee[_0x2e2eff(0x165)]('~'))return;if(typeof _0x4cdb89==='string'&&_0x4cdb89[_0x2e2eff(0x165)]('~'))return;if(!this[_0x2e2eff(0x212)](_0xca1fee,_0x4cdb89,_0x1b0693,_0x14243e))return;const _0x5c1c15=_0x5af85a===_0xe917bb[_0x2e2eff(0xe5)]?_0x2e2eff(0x17d):_0x2e2eff(0x126);this[_0x2e2eff(0x11f)]('change',{'env':_0xca1fee,'type':_0x4cdb89,'key':_0x1b0693,'op':_0x5c1c15,'clock':_0x14243e,'origin':_0xf2c78e,'value':_0x5c1c15===_0x2e2eff(0x17d)?null:_0x308da8,'prevValue':_0x3df825});}[_0x2237e1(0x135)](_0xa65a2f){const _0x5bd67f=_0x2237e1;if(!this[_0x5bd67f(0x172)])return;if(!_0xa65a2f||typeof _0xa65a2f[_0x5bd67f(0x27a)]!==_0x5bd67f(0x238)||typeof _0xa65a2f[_0x5bd67f(0x243)]!=='string')return;const {env:_0x22fe64,type:_0x34c1a1}=_0xa65a2f;if(_0x22fe64[_0x5bd67f(0x165)]('~')||_0x34c1a1['startsWith']('~'))return;this[_0x5bd67f(0x1ff)]['set'](_0x22fe64+'\x00'+_0x34c1a1,{'env':_0x22fe64,'type':_0x34c1a1}),this[_0x5bd67f(0x2d9)]();}['_scheduleFlush'](){const _0x32aa3a=_0x2237e1;if(this[_0x32aa3a(0x1a0)])return;const _0x41aa4e=()=>{const _0x1e0bf8=_0x32aa3a;this['_flushTimer']=null,this[_0x1e0bf8(0x122)]()[_0x1e0bf8(0x2cd)](()=>{});};this[_0x32aa3a(0x1a0)]=setTimeout(_0x41aa4e,this['_flushDebounce']>0x0?this['_flushDebounce']:0x0);}async['_drain'](){const _0x3f7775=_0x2237e1;if(this[_0x3f7775(0x171)]){this['_scheduleFlush']();return;}this['_draining']=!![];try{const _0x8212ae=[...this['_pending']['values']()];this['_pending'][_0x3f7775(0x157)]();let _0x492705=![];for(const {env:_0xd009f0,type:_0x23a2f8}of _0x8212ae){try{const _0x4c688a=await this[_0x3f7775(0x1fc)](_0xd009f0,_0x23a2f8);if(_0x4c688a)_0x492705=!![];}catch{this[_0x3f7775(0x1ff)]['set'](_0xd009f0+'\x00'+_0x23a2f8,{'env':_0xd009f0,'type':_0x23a2f8}),_0x492705=!![];}}if(_0x492705||this[_0x3f7775(0x1ff)][_0x3f7775(0x1f9)]>0x0)this[_0x3f7775(0x2d9)]();}finally{this[_0x3f7775(0x171)]=![];}}async[_0x2237e1(0x1fc)](_0x5d46ca,_0x8b19dc){const _0x3ea0b2=_0x2237e1,_0x164be8=await this[_0x3ea0b2(0x13d)][_0x3ea0b2(0x2bd)](_0x5d46ca),_0x5dd470=_0x5d46ca+'\x00'+_0x8b19dc;!this['_cursors']['has'](_0x5dd470)&&(!this['_baselines'][_0x3ea0b2(0x254)](_0x5d46ca)&&(_0x164be8[_0x3ea0b2(0x1d1)](),this[_0x3ea0b2(0x23d)]['set'](_0x5d46ca,_0x164be8[_0x3ea0b2(0x21d)]()||0x0)),this['_cursors'][_0x3ea0b2(0x296)](_0x5dd470,this[_0x3ea0b2(0x23d)][_0x3ea0b2(0x1bf)](_0x5d46ca)));const _0x5679b0=this[_0x3ea0b2(0x1a3)][_0x3ea0b2(0x1bf)](_0x5dd470),_0x24b1fa=_0x164be8[_0x3ea0b2(0x21d)](_0x8b19dc)||0x0;if(_0x24b1fa<=_0x5679b0)return![];const _0x28c18c=_0x5679b0+this[_0x3ea0b2(0x2b1)],_0x169ebf=Math[_0x3ea0b2(0x249)](_0x24b1fa,_0x28c18c),_0x550810=_0x547220[_0x3ea0b2(0x2df)]?_0x547220['now']():0x0,_0x179b52=Array[_0x3ea0b2(0xc8)](_0x164be8['getChanges'](_0x8b19dc,_0x5679b0+0x1,_0x169ebf));let _0x5524b0=_0x5679b0;for(const _0x2deac0 of _0x179b52){const {clock:_0x4a6d9d,key:_0x106c56,action:_0x46298e,origin:_0x45b98e}=_0x2deac0;if(_0x4a6d9d>_0x5524b0)_0x5524b0=_0x4a6d9d;if(_0x106c56==null)continue;if(!this['_markSeen'](_0x5d46ca,_0x8b19dc,_0x106c56,_0x4a6d9d))continue;let _0x461c64,_0xe6519d;if(_0x46298e===_0xe917bb[_0x3ea0b2(0xe5)])_0x461c64=_0x3ea0b2(0x17d),_0xe6519d=null;else{const _0x1fa4dd=_0x164be8[_0x3ea0b2(0x1bf)](_0x8b19dc,_0x106c56);_0x1fa4dd==null?(_0x461c64=_0x3ea0b2(0x17d),_0xe6519d=null):(_0x461c64=_0x3ea0b2(0x126),_0xe6519d=_0x1fa4dd);}this[_0x3ea0b2(0x11f)](_0x3ea0b2(0x15e),{'env':_0x5d46ca,'type':_0x8b19dc,'key':_0x106c56,'op':_0x461c64,'clock':_0x4a6d9d,'origin':_0x45b98e,'value':_0xe6519d});}if(_0x547220[_0x3ea0b2(0x2df)])_0x547220[_0x3ea0b2(0x176)]('feed:'+_0x5d46ca+':'+_0x8b19dc,_0x547220[_0x3ea0b2(0x281)]()-_0x550810,'n='+_0x179b52[_0x3ea0b2(0x273)]);return this[_0x3ea0b2(0x1a3)][_0x3ea0b2(0x296)](_0x5dd470,Math[_0x3ea0b2(0x213)](_0x5524b0,_0x169ebf)),_0x164be8['getClock'](_0x8b19dc)>_0x169ebf;}[_0x2237e1(0x285)](){const _0x282225=_0x2237e1;return{'started':this[_0x282225(0x172)],'quantum':this[_0x282225(0x2b1)],'flushDebounce':this[_0x282225(0x16d)],'cursors':Object[_0x282225(0x2c4)]([...this['_cursors'][_0x282225(0x2e5)]()]['map'](([_0x427512,_0x110658])=>[_0x427512[_0x282225(0x235)]('\x00',':'),_0x110658])),'pending':this[_0x282225(0x1ff)]['size'],'seen':this[_0x282225(0x209)]['size']};}}return _0x4c07d9[_0x2237e1(0x1f5)]=_0x589d40,okdbChangefeed={'OKDBChangefeed':_0x4c07d9},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2ee492=_0x22d7b4;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x50b153=require$$1$1,_0x17a294=require$$1,{EVENTS:_0x202811}=requireOkdbEnums(),_0x543808=require$$0$3,{slotKey:_0xbe14c2}=requireOkdbProcessRegistry(),_0x38877c=0xfa,_0x4320c9=0xfa0,_0x26ff64=0x5,_0x5cfb6e=0x2710,_0x5d24e5=0xbb8,_0x2f0390=0x7d0,_0x563ecb='__okdbCluster',_0x4362bb=_0x2ee492(0x24f),_0x2b1558=_0x2ee492(0x2c7),_0x50a606=_0x2ee492(0x14b),_0x2624cb=[_0x202811[_0x2ee492(0x1e8)],_0x202811[_0x2ee492(0x123)],_0x202811['FTS_DROP'],_0x202811['FTS_RESET'],_0x202811[_0x2ee492(0x11a)],_0x202811[_0x2ee492(0x133)],_0x202811[_0x2ee492(0x2f3)],_0x202811[_0x2ee492(0xcd)],_0x2ee492(0x201),_0x2ee492(0x1af),_0x2ee492(0x1c1),'processor:paused',_0x2ee492(0xc4),'processor:retry'],_0x48cbbd=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x1f51a0({workers:_0x534e7e,makeOkdb:_0x56bbe7,port:_0x35cb1e,primaryOkdb:_0x21d591,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0xa1b305=_0x2ee492;if(_0x50b153[_0xa1b305(0x118)])return childEntry&&_0x50b153[_0xa1b305(0x2d6)]({'exec':_0x17a294[_0xa1b305(0x265)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x4824e4=_0xa1b305,_0x338e91=[];for(let _0x2c09f8=0x0;_0x2c09f8<process['execArgv'][_0x4824e4(0x273)];_0x2c09f8++){const _0x1bed64=process['execArgv'][_0x2c09f8];if(_0x1bed64[_0x4824e4(0x165)](_0x4824e4(0x109))||_0x1bed64[_0x4824e4(0x165)]('--watch')||_0x1bed64[_0x4824e4(0x165)]('--inspect'))continue;if(_0x1bed64==='-e'||_0x1bed64==='--eval'||_0x1bed64==='-p'||_0x1bed64===_0x4824e4(0x10a)){_0x2c09f8++;continue;}_0x338e91[_0x4824e4(0x242)](_0x1bed64);}return _0x338e91;})())}),_0x23b690({'workers':_0x534e7e,'port':_0x35cb1e,'primaryOkdb':_0x21d591,'workerEnv':workerEnv});return _0x1bd1dd({'makeOkdb':_0x56bbe7,'port':_0x35cb1e});}function _0x23b690({workers:_0x3eed5c,port:_0x489e36,primaryOkdb:_0x36f1b3,workerEnv:_0x112e99}){const _0x491653=_0x2ee492,_0x30ef9f=new Map(),_0x1852ab=new Map();let _0x2e926e=![];const _0x364111=_0x384346=>_0x384346?.['__okdbSlot'],_0x46acfd=_0x30db62=>{const _0x3f5695=_0x23ad,_0xed62e3=_0x50b153['fork']({...process.env,..._0x112e99||{},'OKDB_CLUSTER_SLOT':String(_0x30db62)});return _0xed62e3['__okdbSlot']=_0x30db62,_0x30ef9f[_0x3f5695(0x296)](_0xed62e3[_0x3f5695(0x2d3)][_0x3f5695(0x2de)],{'worker':_0xed62e3,'startedAt':Date[_0x3f5695(0x281)](),'slot':_0x30db62}),_0xed62e3['on'](_0x3f5695(0x231),_0x5cf2c7=>{const _0x15e09a=_0x3f5695;console[_0x15e09a(0x2c7)]('[okdb-cluster]\x20worker\x20pid='+_0xed62e3['process'][_0x15e09a(0x2de)]+_0x15e09a(0xc1)+(_0x5cf2c7?.[_0x15e09a(0xf9)]??_0x5cf2c7));}),_0xed62e3['on'](_0x3f5695(0x1c0),()=>_0x37d404()),_0xed62e3;},_0x3017ce=_0x5d6b5e=>{const _0x5eb18e=_0x23ad;for(const {worker:_0x539718}of _0x30ef9f['values']()){if(_0x539718[_0x5eb18e(0x163)]()||!_0x539718[_0x5eb18e(0x2ec)]())continue;try{_0x539718[_0x5eb18e(0x1dc)](_0x5d6b5e);}catch{}}};_0x36f1b3?.['_activateProcesses']?.({'kind':_0x491653(0x237),'listenAddr':':'+_0x489e36})[_0x491653(0x2cd)](()=>{}),_0x36f1b3?.['processes']?.[_0x491653(0x2e3)]?.({'workersConfigured':_0x3eed5c});const _0xa9dd90={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x37d404=()=>{const _0x24cc38=_0x491653,_0x490b96=_0x36f1b3?.[_0x24cc38(0x20e)];if(!_0x490b96||!_0x490b96['_isWriter'])return;const _0x131e40=_0x490b96[_0x24cc38(0x1e2)];for(const {worker:_0x313211,startedAt:_0x4a7723,slot:_0xab1e06,stats:_0x1e2dca,processing:_0x62a7cb}of _0x30ef9f['values']()){if(_0x313211[_0x24cc38(0x163)]())continue;const _0x4c0f90=_0x490b96[_0x24cc38(0x2a4)]?.()&&_0x490b96['getDesired'](_0x24cc38(0xef),_0x4d5c87(_0xab1e06))?.['decommission']===!![];_0x490b96[_0x24cc38(0x124)]({'pid':_0x313211[_0x24cc38(0x2d3)]['pid'],'startedAt':_0x4a7723,'kind':_0x24cc38(0x13a),'supervisorKey':_0x131e40,'slot':_0xab1e06,'slotKey':_0x4d5c87(_0xab1e06),'role':_0xa9dd90,'listenAddr':':'+_0x489e36,'lifecycle':_0x4c0f90?_0x24cc38(0x21b):_0x24cc38(0x1fb),'processing':_0x62a7cb??null,'stats':_0x1e2dca??null})['catch'](()=>{});}},_0x4d5c87=_0x40f449=>_0xbe14c2(_0x491653(0x2c2)+_0x489e36,_0x40f449),_0x4453c2=_0x360a79=>{const _0x38d75a=_0x491653,_0x3314ce=_0x36f1b3?.[_0x38d75a(0x20e)];if(!_0x3314ce?.[_0x38d75a(0x2a4)]?.())return![];return _0x3314ce[_0x38d75a(0x24d)]('slot',_0x4d5c87(_0x360a79))?.[_0x38d75a(0x29b)]===!![];};for(let _0x12adf8=0x0;_0x12adf8<_0x3eed5c;_0x12adf8++){const _0x321926=_0x4453c2(_0x12adf8);_0x1852ab[_0x491653(0x296)](_0x12adf8,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x321926,'respawnTimer':null}),_0x321926?console['log']('[okdb-cluster]\x20slot='+_0x12adf8+_0x491653(0x1bd)):_0x46acfd(_0x12adf8);}const _0x2ba3ba=()=>{const _0x1b4c15=_0x491653,_0x445889=_0x36f1b3?.[_0x1b4c15(0x20e)];if(!_0x445889?.[_0x1b4c15(0x2d8)]||!_0x445889[_0x1b4c15(0x2a4)]?.())return;for(const [_0x1acd05,_0x3d1089]of _0x1852ab[_0x1b4c15(0x2e5)]()){const _0x45c2c4=_0x445889[_0x1b4c15(0x24d)]('slot',_0x4d5c87(_0x1acd05)),_0x522f20=_0x45c2c4?.['decommission']===!![],_0x2983c8=_0x45c2c4?.[_0x1b4c15(0x15b)]===!![];if(_0x522f20&&!_0x3d1089[_0x1b4c15(0x105)]){_0x3d1089[_0x1b4c15(0x105)]=!![];_0x3d1089[_0x1b4c15(0x26e)]&&(clearTimeout(_0x3d1089[_0x1b4c15(0x26e)]),_0x3d1089[_0x1b4c15(0x26e)]=null);for(const {worker:_0x4b7bf0}of _0x30ef9f['values']()){if(_0x364111(_0x4b7bf0)!==_0x1acd05||_0x4b7bf0['isDead']())continue;try{if(_0x2983c8)_0x4b7bf0[_0x1b4c15(0x2d3)]['kill']('SIGKILL');else _0x4b7bf0['isConnected']()&&_0x4b7bf0[_0x1b4c15(0x1b1)]();}catch{}}console['log'](_0x1b4c15(0x276)+(_0x2983c8?_0x1b4c15(0xec):'decommissioned')+_0x1b4c15(0xd9)+_0x1acd05+_0x1b4c15(0x284));}else{if(!_0x522f20&&_0x3d1089[_0x1b4c15(0x105)]&&_0x45c2c4){_0x3d1089[_0x1b4c15(0x105)]=![],_0x3d1089[_0x1b4c15(0xd6)]=[],_0x3d1089[_0x1b4c15(0x14a)]=0x0;const _0x448050=[..._0x30ef9f[_0x1b4c15(0x1dd)]()][_0x1b4c15(0x160)](({worker:_0x1f42ef})=>_0x364111(_0x1f42ef)===_0x1acd05&&!_0x1f42ef[_0x1b4c15(0x163)]());!_0x448050&&!_0x2e926e&&(_0x46acfd(_0x1acd05),console['log'](_0x1b4c15(0x11d)+_0x1acd05));}}}},_0x2805d7=()=>{try{_0x2ba3ba();}catch{}};_0x36f1b3?.[_0x491653(0x139)]?.['on']?.(_0x202811[_0x491653(0xc6)],_0x2805d7);const _0x6c7c39=[];if(_0x36f1b3?.[_0x491653(0x139)]?.['on'])for(const _0x22f1b3 of _0x2624cb){const _0x338b7e=_0xeed357=>{_0x3017ce({[_0x563ecb]:_0x4362bb,'event':_0x22f1b3,'data':_0xeed357??{}});};_0x36f1b3[_0x491653(0x139)]['on'](_0x22f1b3,_0x338b7e),_0x6c7c39[_0x491653(0x242)]({'event':_0x22f1b3,'handler':_0x338b7e});}const _0x34b625=setInterval(()=>{_0x2ba3ba(),_0x37d404();},_0x48cbbd);_0x34b625[_0x491653(0x1b8)]?.();const _0x325bd8=(_0x55ca48,_0xbb7c1a)=>{const _0x4df44b=_0x491653;if(!_0xbb7c1a||typeof _0xbb7c1a!=='object'||_0xbb7c1a[_0x563ecb]!==_0x2b1558)return;if(!_0x36f1b3?.[_0x4df44b(0x2c7)]?.[_0x4df44b(0x2ea)])return;const _0x8f67f8=_0xbb7c1a[_0x4df44b(0x16f)]||{};_0x36f1b3['log'][_0x4df44b(0x2ea)]({..._0x8f67f8,'msg':'[w'+_0xbb7c1a[_0x4df44b(0xef)]+']\x20'+(_0x8f67f8['msg']??''),'meta':{..._0x8f67f8[_0x4df44b(0x14e)]||{},'worker':_0xbb7c1a[_0x4df44b(0xef)],'workerPid':_0xbb7c1a[_0x4df44b(0x2de)]}});};_0x50b153['on'](_0x491653(0xf9),_0x325bd8);const _0x93e07b=(_0x21dc4a,_0xc592de)=>{const _0x42dd4f=_0x491653;if(!_0xc592de||typeof _0xc592de!==_0x42dd4f(0x29e)||_0xc592de[_0x563ecb]!==_0x50a606)return;const _0xb269d8=_0x30ef9f[_0x42dd4f(0x1bf)](_0x21dc4a['process'][_0x42dd4f(0x2de)]);if(_0xb269d8){_0xb269d8[_0x42dd4f(0x14b)]={..._0xc592de['stats'],'at':Date[_0x42dd4f(0x281)]()};if(_0xc592de[_0x42dd4f(0x1bb)]!==undefined)_0xb269d8[_0x42dd4f(0x1bb)]=_0xc592de[_0x42dd4f(0x1bb)];}};_0x50b153['on'](_0x491653(0xf9),_0x93e07b),_0x50b153['on'](_0x491653(0x25a),(_0x5223f1,_0x4cf79a,_0x454545)=>{const _0x477e58=_0x491653,_0x2b2b7b=_0x5223f1[_0x477e58(0x2d3)][_0x477e58(0x2de)],_0x4b1f22=_0x364111(_0x5223f1),_0x1705e1=_0x30ef9f['get'](_0x2b2b7b);if(_0x1705e1&&_0x36f1b3?.['processes'])_0x36f1b3[_0x477e58(0x20e)][_0x477e58(0x2e6)](_0x2b2b7b+':'+_0x1705e1[_0x477e58(0x148)])[_0x477e58(0x2cd)](()=>{});_0x30ef9f[_0x477e58(0x102)](_0x2b2b7b),console[_0x477e58(0x2c7)](_0x477e58(0x1f4)+_0x2b2b7b+_0x477e58(0xdb)+(_0x4b1f22??'?')+_0x477e58(0x143)+(_0x477e58(0x1eb)+_0x4cf79a+',\x20signal='+(_0x454545??_0x477e58(0x206))+_0x477e58(0x279)+_0x30ef9f[_0x477e58(0x1f9)]+_0x477e58(0x2a2))),_0x37d404();if(_0x2e926e||_0x4b1f22==null)return;const _0x3f56a0=_0x1852ab[_0x477e58(0x1bf)](_0x4b1f22);if(!_0x3f56a0||_0x3f56a0[_0x477e58(0x105)])return;const _0x7b6bf8=Date['now']();_0x3f56a0[_0x477e58(0xd6)]['push'](_0x7b6bf8),_0x3f56a0[_0x477e58(0xd6)]=_0x3f56a0[_0x477e58(0xd6)]['filter'](_0x11ee84=>_0x7b6bf8-_0x11ee84<=_0x5cfb6e);if(_0x3f56a0['deaths'][_0x477e58(0x273)]>=_0x26ff64){_0x3f56a0[_0x477e58(0x105)]=!![],console[_0x477e58(0x231)](_0x477e58(0xe9)+_0x4b1f22+_0x477e58(0x2cb)+_0x3f56a0[_0x477e58(0xd6)][_0x477e58(0x273)]+_0x477e58(0x182)+(_0x5cfb6e+_0x477e58(0x2c5)+_0x30ef9f[_0x477e58(0x1f9)]+_0x477e58(0x141)));return;}_0x3f56a0[_0x477e58(0x14a)]++;const _0xe250db=Math[_0x477e58(0x249)](_0x4320c9,_0x38877c*0x2**(_0x3f56a0[_0x477e58(0x14a)]-0x1));console[_0x477e58(0x2c7)](_0x477e58(0x2af)+_0x4b1f22+'\x20in\x20'+_0xe250db+_0x477e58(0x119)+_0x3f56a0[_0x477e58(0x14a)]+')'),_0x3f56a0[_0x477e58(0x26e)]=setTimeout(()=>{const _0x5bf880=_0x477e58;_0x3f56a0[_0x5bf880(0x26e)]=null;if(_0x2e926e||_0x3f56a0[_0x5bf880(0x105)])return;const _0x141b2c=_0x46acfd(_0x4b1f22);_0x141b2c[_0x5bf880(0x194)](_0x5bf880(0x1b5),()=>{const _0x408ce7=_0x5bf880;if(_0x1852ab[_0x408ce7(0x1bf)](_0x4b1f22)===_0x3f56a0)_0x3f56a0[_0x408ce7(0x14a)]=0x0;});},_0xe250db),_0x3f56a0[_0x477e58(0x26e)][_0x477e58(0x1b8)]?.();});const _0x2cadae=[..._0x30ef9f[_0x491653(0x216)]()];console[_0x491653(0x2c7)]('[okdb-cluster]\x20primary\x20pid='+process[_0x491653(0x2de)]+_0x491653(0x2dd)+_0x3eed5c+_0x491653(0xc2)+_0x489e36+':\x20'+('['+_0x2cadae['join'](',\x20')+']'));const _0x3d7efc={'_isClusterController':!![],'port':_0x489e36,'primaryOkdb':_0x36f1b3??null,'status'(){const _0x87350c=_0x491653;return{'clustered':!![],'primaryPid':process[_0x87350c(0x2de)],'port':_0x489e36,'primaryRole':_0x36f1b3?.['role']??null,'processorPid':null,'supervisorPid':process[_0x87350c(0x2de)],'workers':[..._0x30ef9f[_0x87350c(0x1dd)]()][_0x87350c(0x188)](({worker:_0x41ab3c})=>({'pid':_0x41ab3c[_0x87350c(0x2d3)][_0x87350c(0x2de)],'id':_0x41ab3c['id'],'dead':_0x41ab3c[_0x87350c(0x163)]()}))};},async 'close'(){const _0x2eced8=_0x491653;_0x2e926e=!![];for(const _0x8063dc of _0x1852ab[_0x2eced8(0x1dd)]()){_0x8063dc[_0x2eced8(0x105)]=!![],_0x8063dc[_0x2eced8(0x26e)]&&(clearTimeout(_0x8063dc[_0x2eced8(0x26e)]),_0x8063dc[_0x2eced8(0x26e)]=null);}clearInterval(_0x34b625),_0x50b153['off'](_0x2eced8(0xf9),_0x325bd8),_0x50b153[_0x2eced8(0x232)]('message',_0x93e07b),_0x36f1b3?.[_0x2eced8(0x139)]?.[_0x2eced8(0x232)]?.(_0x202811[_0x2eced8(0xc6)],_0x2805d7);if(_0x36f1b3?.[_0x2eced8(0x139)]?.[_0x2eced8(0x232)])for(const {event:_0x430a41,handler:_0x4f86c0}of _0x6c7c39){try{_0x36f1b3[_0x2eced8(0x139)][_0x2eced8(0x232)](_0x430a41,_0x4f86c0);}catch{}}_0x6c7c39[_0x2eced8(0x273)]=0x0;const _0x18ebe0=[..._0x30ef9f['values']()][_0x2eced8(0x188)](({worker:_0x214a1c})=>_0x214a1c);if(_0x18ebe0['length']===0x0)return;await Promise[_0x2eced8(0x29a)](_0x18ebe0[_0x2eced8(0x188)](_0x4b1a65=>new Promise(_0x47f0e8=>{const _0x1921ad=_0x2eced8;if(_0x4b1a65['isDead']()){_0x47f0e8();return;}let _0xdba262=![];const _0x10c8fc=()=>{if(_0xdba262)return;_0xdba262=!![];if(_0x127826)clearTimeout(_0x127826);_0x47f0e8();};_0x4b1a65[_0x1921ad(0x194)](_0x1921ad(0x25a),_0x10c8fc);const _0x127826=setTimeout(()=>{const _0x127cd5=_0x1921ad;try{_0x4b1a65[_0x127cd5(0x2d3)][_0x127cd5(0x15b)]();}catch{}},_0x5d24e5+0x1f4);_0x127826[_0x1921ad(0x1b8)]?.();try{_0x4b1a65[_0x1921ad(0x1b1)]();}catch{try{_0x4b1a65[_0x1921ad(0x2d3)][_0x1921ad(0x15b)]();}catch{}}})));}};return _0x3d7efc;}async function _0x1bd1dd({makeOkdb:_0x16ea72,port:_0x937de7}){const _0x5d1e9c=_0x2ee492,_0x25df7e=await _0x16ea72();return _0x36d0ab(_0x25df7e),_0x25df7e[_0x5d1e9c(0x158)][_0x5d1e9c(0x19c)](_0x937de7);}function _0x36d0ab(_0x3c68d4){const _0x3303d3=_0x2ee492;if(!_0x3c68d4||_0x3c68d4[_0x3303d3(0x2b2)])return;_0x3c68d4['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x3103ff}=requireOkdbChangefeed(),_0x231bb3=_0x3c68d4['_adminRelay'];if(_0x231bb3&&typeof _0x231bb3[_0x3303d3(0xe3)]===_0x3303d3(0x156)){const _0x1b5e8f=new _0x3103ff(_0x3c68d4);_0x1b5e8f[_0x3303d3(0x2b7)](),_0x231bb3[_0x3303d3(0xe3)](_0x1b5e8f),_0x3c68d4[_0x3303d3(0x2d2)]=_0x1b5e8f;}}catch(_0x3fd195){_0x3c68d4[_0x3303d3(0x2c7)]?.[_0x3303d3(0x1ce)]?.(_0x3303d3(0x1cc)+(_0x3fd195?.[_0x3303d3(0xf9)]??_0x3fd195),{'feature':_0x3303d3(0xf1)});}const _0xbd5b7d=_0x428851=>{const _0x403a62=_0x3303d3;if(!_0x428851||typeof _0x428851!==_0x403a62(0x29e)||_0x428851[_0x563ecb]==null)return;if(_0x428851[_0x563ecb]===_0x4362bb)try{_0x3c68d4[_0x403a62(0xd7)]?.[_0x403a62(0x294)]?.(_0x428851[_0x403a62(0x2c1)],_0x428851[_0x403a62(0x1c8)]);}catch{}};process['on']('message',_0xbd5b7d),_0x3c68d4[_0x3303d3(0x22a)]=_0xbd5b7d;{let _0x34336f=process[_0x3303d3(0x136)](),_0x5b46d8=Date[_0x3303d3(0x281)]();const _0x1bf3fe=()=>{const _0xa4b108=_0x3303d3;if(typeof process[_0xa4b108(0x1dc)]!==_0xa4b108(0x156)||!process[_0xa4b108(0xc5)])return;const _0x1b07d0=Date[_0xa4b108(0x281)](),_0x473b41=process['cpuUsage'](),_0x10f65b=(_0x1b07d0-_0x5b46d8)*0x3e8,_0x4ac6e1=_0x473b41['user']-_0x34336f[_0xa4b108(0x151)]+(_0x473b41[_0xa4b108(0x22c)]-_0x34336f['system']),_0x4e7215=_0x10f65b>0x0?Math[_0xa4b108(0x249)](0x64,Math[_0xa4b108(0x1b7)](_0x4ac6e1/(_0x10f65b*(_0x543808[_0xa4b108(0x18d)]()[_0xa4b108(0x273)]||0x1))*0x64)):0x0;_0x34336f=_0x473b41,_0x5b46d8=_0x1b07d0;const _0x27c962=process[_0xa4b108(0x295)]();let _0x4f2bd9=null;try{_0x4f2bd9=_0x3c68d4[_0xa4b108(0x2b8)]?.[_0xa4b108(0xed)]?_0x3c68d4['processes']?.[_0xa4b108(0x24b)]?.()??null:null;}catch{}try{process['send']({[_0x563ecb]:_0x50a606,'stats':{'rss':_0x27c962[_0xa4b108(0x16e)],'heapUsed':_0x27c962[_0xa4b108(0xd4)],'heapTotal':_0x27c962['heapTotal'],'external':_0x27c962[_0xa4b108(0x239)],'cpuPct':_0x4e7215,'cpuWindowMs':Math[_0xa4b108(0x1b7)](_0x10f65b/0x3e8)||null},'processing':_0x4f2bd9});}catch{}},_0x2c7229=Math[_0x3303d3(0x213)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x416cf6=setInterval(_0x1bf3fe,_0x2c7229);_0x416cf6[_0x3303d3(0x1b8)]?.(),_0x1bf3fe();for(const _0x5a8596 of[_0x3303d3(0x1c4),_0x3303d3(0xc4)]){_0x3c68d4[_0x3303d3(0x139)]?.['on']?.(_0x5a8596,()=>{try{_0x1bf3fe();}catch{}});}}let _0x535bfb=![];const _0x4feb23=async _0x5e4563=>{const _0x275b91=_0x3303d3;if(_0x535bfb)return;_0x535bfb=!![];const _0x2c943f=setTimeout(()=>process[_0x275b91(0x25a)](_0x5e4563),_0x5d24e5);_0x2c943f[_0x275b91(0x1b8)]?.();try{await _0x3c68d4['close']?.();}catch{}process[_0x275b91(0x25a)](_0x5e4563);};process['on']('disconnect',()=>_0x4feb23(0x0));if(process[_0x3303d3(0x100)]!==_0x3303d3(0x2a0)){const _0x2ee181=setInterval(()=>{if(process['ppid']===0x1)_0x4feb23(0x0);},_0x2f0390);_0x2ee181[_0x3303d3(0x1b8)]?.(),_0x3c68d4[_0x3303d3(0x244)]=_0x2ee181;}}return okdbCluster={'runClustered':_0x1f51a0,'attachWorkerCluster':_0x36d0ab},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x1d56e9=_0x22d7b4;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x38071a=require$$0$5,{attachWorkerCluster:_0x2b4ebf}=requireOkdbCluster();async function _0x48edc9(){const _0x2814d9=_0x23ad,_0x5c12e1=process.env.OKDB_HTTP_CHILD;if(!_0x5c12e1)throw new Error(_0x2814d9(0x184));const {rootPath:_0x468d23,port:_0x59f28c,options:options={},logLevel:logLevel=_0x2814d9(0x190)}=JSON[_0x2814d9(0xe4)](_0x5c12e1);if(!_0x468d23||!_0x59f28c)throw new Error(_0x2814d9(0x255));const _0x402880=new _0x38071a(_0x468d23,{...options,'engines':![],'processors':![],'compaction':![]});_0x402880[_0x2814d9(0x2c7)][_0x2814d9(0x272)]?.();const _0xdfb2b=process.env.OKDB_CLUSTER_SLOT??'?',_0xe98e9e={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x4554ee=_0xe98e9e[logLevel]??_0xe98e9e[_0x2814d9(0x190)];_0x402880[_0x2814d9(0x2c7)][_0x2814d9(0x2ef)](_0x445dd1=>{const _0x392d26=_0x2814d9;if((_0xe98e9e[_0x445dd1[_0x392d26(0x2ac)]]??0x1)<_0x4554ee)return;try{process[_0x392d26(0x1dc)]?.({'__okdbCluster':_0x392d26(0x2c7),'slot':_0xdfb2b,'pid':process[_0x392d26(0x2de)],'entry':_0x445dd1});}catch{}}),await _0x402880[_0x2814d9(0x2ae)](),_0x2b4ebf(_0x402880),await _0x402880['http'][_0x2814d9(0x19c)](_0x59f28c);}return _0x48edc9()[_0x1d56e9(0x2cd)](_0x242a2d=>{const _0x146184=_0x1d56e9;try{process[_0x146184(0x1dc)]?.({'__okdbCluster':_0x146184(0x2c7),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x146184(0x2de)],'entry':{'level':_0x146184(0x231),'msg':_0x146184(0x166)+(_0x242a2d?.[_0x146184(0xf9)]??_0x242a2d)}});}catch{}process[_0x146184(0x25a)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x22d7b4(0xfb)]=okdbHttpWorkerChild;
@@ -1 +1 @@
1
- 'use strict';const _0x3a34f0=_0x4478;(function(_0x29839d,_0x2e3de3){const _0x347b88=_0x4478,_0x307f90=_0x29839d();while(!![]){try{const _0xe9b08d=-parseInt(_0x347b88(0xd9))/0x1*(-parseInt(_0x347b88(0xb4))/0x2)+-parseInt(_0x347b88(0xad))/0x3+parseInt(_0x347b88(0xa3))/0x4*(parseInt(_0x347b88(0x96))/0x5)+-parseInt(_0x347b88(0xa7))/0x6+parseInt(_0x347b88(0xc3))/0x7*(parseInt(_0x347b88(0xd6))/0x8)+-parseInt(_0x347b88(0xd7))/0x9*(parseInt(_0x347b88(0xe4))/0xa)+parseInt(_0x347b88(0xcd))/0xb;if(_0xe9b08d===_0x2e3de3)break;else _0x307f90['push'](_0x307f90['shift']());}catch(_0x423076){_0x307f90['push'](_0x307f90['shift']());}}}(_0x13d7,0xefe8c));var require$$0=require(_0x3a34f0(0xbb)),require$$1=require(_0x3a34f0(0xa2));function getDefaultExportFromCjs(_0x31cd5f){const _0xc0deb0=_0x3a34f0;return _0x31cd5f&&_0x31cd5f[_0xc0deb0(0xe2)]&&Object[_0xc0deb0(0xb2)][_0xc0deb0(0xa6)][_0xc0deb0(0xe0)](_0x31cd5f,_0xc0deb0(0xdb))?_0x31cd5f[_0xc0deb0(0xdb)]:_0x31cd5f;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x1f54ee=_0x3a34f0;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x44c77f={'PUT':_0x1f54ee(0xa4),'REMOVE':'remove','INDEX_DROP':_0x1f54ee(0xdd),'INDEX_REGISTER':_0x1f54ee(0xa8),'INDEX_RESET':_0x1f54ee(0xa0),'TYPE_REGISTER':_0x1f54ee(0xd2),'TYPE_DROP':_0x1f54ee(0x99),'FTS_REGISTER':_0x1f54ee(0xbd),'FTS_DROP':_0x1f54ee(0xa9),'FTS_RESET':_0x1f54ee(0x9f),'SCHEMA_SET':_0x1f54ee(0xb6),'SCHEMA_DROP':_0x1f54ee(0x9d),'TTL_SET':_0x1f54ee(0xba),'TTL_CLEAR':'clearTtl'},_0x537b6f={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x1f54ee(0xb8),'SYSTEM_CLOCK_CHANGE':_0x1f54ee(0x97),'SYSTEM_POKE':_0x1f54ee(0xb5),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x1f54ee(0xd5),'SYSTEM_PROC':_0x1f54ee(0xae),'SYSTEM_BUS_STATE_CHANGE':_0x1f54ee(0xdc),'ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x1f54ee(0xd8),'INDEX_RESET':'index:reset','INDEX_READY':_0x1f54ee(0xe9),'INDEX_PROGRESS':_0x1f54ee(0x94),'VIEW_PROGRESS':_0x1f54ee(0xca),'INDEX_DROP':_0x1f54ee(0xd3),'INDEX_REGISTERED':_0x1f54ee(0x98),'FTS_REGISTERED':_0x1f54ee(0x92),'FTS_DROP':_0x1f54ee(0xc5),'FTS_RESET':'fts:reset','SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x1f54ee(0xa5),'UNIQUE_VIOLATION':_0x1f54ee(0xcc),'UNIQUE_VIOLATION_RESOLVED':_0x1f54ee(0x9c),'REF_VIOLATION':_0x1f54ee(0xbc),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x1f54ee(0xc9),'TXN_START':_0x1f54ee(0xc4),'TXN_END':_0x1f54ee(0xe1),'TXN_ROLLBACK':_0x1f54ee(0x93),'TYPE_REGISTERED':_0x1f54ee(0xab),'TYPE_DROP':_0x1f54ee(0xe3),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x1f54ee(0xaf),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x1f54ee(0xc7),'TTL_SET':_0x1f54ee(0xac),'TTL_CLEAR':_0x1f54ee(0xc1),'LICENSE_INVALID':_0x1f54ee(0xd4),'LICENSE_ADDED':_0x1f54ee(0xb3),'LICENSE_ACTIVATED':_0x1f54ee(0xda),'LICENSE_REMOVED':'license:removed'},_0x5940da={'CREATING':_0x1f54ee(0xa1),'RESETTING':'resetting','READY':'ready','DROPPING':'dropping','WAITING':_0x1f54ee(0x9a)},_0x111564={'CREATED':_0x1f54ee(0xdf),'STARTING':_0x1f54ee(0xe8),'STARTED':_0x1f54ee(0xe6),'STOPPING':'stopping','STOPPED':_0x1f54ee(0xc8)},_0x24c7a8={'CREATING':_0x1f54ee(0xa1),'READY':_0x1f54ee(0xcf),'HALTED':_0x1f54ee(0xce),'STOPPED':'stopped','RESETTING':_0x1f54ee(0xc2)},_0x1f0420=Object[_0x1f54ee(0xbf)]({'POKE':_0x1f54ee(0xd1),'DRAIN':_0x1f54ee(0xbe),'TYPE_DROP':_0x1f54ee(0xde),'PROC':'bus:proc','ENV_RELEASE':_0x1f54ee(0xe7)});return okdbEnums={'BUS_EVENTS':_0x1f0420,'CHANGE_ACTIONS':_0x44c77f,'EVENTS':_0x537b6f,'INDEX_STATE':_0x5940da,'OKDB_STATE':_0x111564,'VIEW_STATE':_0x24c7a8},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function _0x13d7(){const _0x3ff78f=['bus:env_release','starting','index:ready','fts:registered','txn:rollback','index:progress','error','8640935XfRIJc','system:clock_change','index:registered','dropType','waiting','catch','unique:violation_resolved','dropSchema','progress','resetFts','resetIndex','creating','./okdb','4pQdkaA','put','schema:drop','hasOwnProperty','10904568TUuvJw','registerIndex','dropFts','events','type:registered','ttl:set','3546507mgVGjC','system:proc','env:removed','_activateViewStorage','views','prototype','license:added','2HeDHbg','system:poke','setSchema','exit','system:stopped','_runBootstrapScanPhases','setTtl','worker_threads','ref:violation','registerFts','bus:drain','freeze','postMessage','ttl:clear','resetting','98mdXldY','txn:start','fts:drop','VIEW_PROGRESS','ttl:expired','stopped','sync:apply','view:progress','exports','unique:violation','26988269REIFDd','halted','ready','stack','bus:poke','registerType','index:drop','license:invalid','system:type_drop','597560YSOcUX','90tfyHDW','item:remove','313259ANhzGo','license:activated','default','system:bus_state_change','dropIndex','bus:type_drop','created','call','txn:end','__esModule','type:drop','1558390pkddlc','env','started'];_0x13d7=function(){return _0x3ff78f;};return _0x13d7();}function requireOkdbViewsBootstrapWorker(){const _0x32d029=_0x3a34f0;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x3ab872,workerData:_0x15e753}=require$$0,_0x337622=require$$1,{EVENTS:_0x440131}=requireOkdbEnums();async function _0x48552b(){const _0x2373a0=_0x4478,{rootPath:_0x12e2d0,envName:_0xe558ab,viewName:_0x6c0eaf,definition:_0x2a1841}=_0x15e753,_0x23fe3d=new _0x337622(_0x12e2d0,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x23fe3d['open']();const _0x478560=_0x23fe3d[_0x2373a0(0xe5)](_0xe558ab);_0x478560[_0x2373a0(0xaa)]['on'](_0x440131[_0x2373a0(0xc6)],_0xfbe5c2=>{const _0x8a9444=_0x2373a0;if(_0xfbe5c2?.['name']!==_0x6c0eaf)return;try{_0x3ab872['postMessage']({'type':_0x8a9444(0x9e),'event':_0xfbe5c2});}catch{}}),await _0x478560[_0x2373a0(0xb1)]['_prepareViewDict'](_0x2a1841),await _0x478560[_0x2373a0(0xb1)][_0x2373a0(0xb0)](_0x6c0eaf,_0x2a1841),await _0x478560[_0x2373a0(0xb1)][_0x2373a0(0xb9)](_0x6c0eaf,_0x2a1841),_0x3ab872[_0x2373a0(0xc0)]({'type':'done'}),await _0x23fe3d['close'](),process['exit'](0x0);}return _0x48552b()[_0x32d029(0x9b)](_0x14f370=>{const _0x38aa02=_0x32d029;try{_0x3ab872[_0x38aa02(0xc0)]({'type':_0x38aa02(0x95),'error':_0x14f370['message']??String(_0x14f370),'stack':_0x14f370[_0x38aa02(0xd0)]});}catch{}process[_0x38aa02(0xb7)](0x1);}),okdbViewsBootstrapWorker$1;}function _0x4478(_0xec293,_0x23ce65){_0xec293=_0xec293-0x92;const _0x13d74=_0x13d7();let _0x44782a=_0x13d74[_0xec293];return _0x44782a;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x3a34f0(0xcb)]=okdbViewsBootstrapWorker;
1
+ 'use strict';function _0x2427(_0x5ba289,_0x517568){_0x5ba289=_0x5ba289-0x77;const _0x194937=_0x1949();let _0x2427df=_0x194937[_0x5ba289];return _0x2427df;}const _0x115263=_0x2427;(function(_0x108e36,_0x4d22cf){const _0x429604=_0x2427,_0x5428ad=_0x108e36();while(!![]){try{const _0x2de57f=-parseInt(_0x429604(0x92))/0x1+-parseInt(_0x429604(0x98))/0x2*(-parseInt(_0x429604(0xba))/0x3)+-parseInt(_0x429604(0x84))/0x4*(-parseInt(_0x429604(0x82))/0x5)+parseInt(_0x429604(0xc7))/0x6+-parseInt(_0x429604(0xc8))/0x7*(-parseInt(_0x429604(0x78))/0x8)+parseInt(_0x429604(0xcd))/0x9*(-parseInt(_0x429604(0x88))/0xa)+parseInt(_0x429604(0x90))/0xb*(-parseInt(_0x429604(0xbc))/0xc);if(_0x2de57f===_0x4d22cf)break;else _0x5428ad['push'](_0x5428ad['shift']());}catch(_0x219bbc){_0x5428ad['push'](_0x5428ad['shift']());}}}(_0x1949,0x48d45));var require$$0=require(_0x115263(0x7b)),require$$1=require(_0x115263(0xa8));function getDefaultExportFromCjs(_0x1797ed){const _0x1f78d1=_0x115263;return _0x1797ed&&_0x1797ed[_0x1f78d1(0x7a)]&&Object[_0x1f78d1(0x9d)][_0x1f78d1(0x7d)][_0x1f78d1(0x81)](_0x1797ed,'default')?_0x1797ed['default']:_0x1797ed;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x12b32d=_0x115263;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x4d2cde={'PUT':_0x12b32d(0xa1),'REMOVE':_0x12b32d(0xb8),'INDEX_DROP':_0x12b32d(0x77),'INDEX_REGISTER':_0x12b32d(0xa4),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x12b32d(0xb2),'TYPE_DROP':_0x12b32d(0x8f),'FTS_REGISTER':_0x12b32d(0xa6),'FTS_DROP':_0x12b32d(0x79),'FTS_RESET':'resetFts','SCHEMA_SET':_0x12b32d(0x8a),'SCHEMA_DROP':_0x12b32d(0xc2),'TTL_SET':_0x12b32d(0xae),'TTL_CLEAR':'clearTtl'},_0x4da3fe={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x12b32d(0xb4),'SYSTEM_CLOCK_CHANGE':_0x12b32d(0xbb),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x12b32d(0xa9),'SYSTEM_TYPE_DROP':_0x12b32d(0xb1),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x12b32d(0x85),'ITEM_UPDATE':_0x12b32d(0x94),'ITEM_REMOVE':_0x12b32d(0xa7),'INDEX_RESET':_0x12b32d(0x97),'INDEX_READY':_0x12b32d(0xb0),'INDEX_PROGRESS':_0x12b32d(0xad),'VIEW_PROGRESS':_0x12b32d(0xc3),'INDEX_DROP':_0x12b32d(0x80),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x12b32d(0x87),'FTS_DROP':_0x12b32d(0x8b),'FTS_RESET':_0x12b32d(0xb6),'SCHEMA_SET':_0x12b32d(0x8e),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x12b32d(0x8d),'REF_VIOLATION':_0x12b32d(0xaa),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x12b32d(0xab),'TXN_START':_0x12b32d(0x9e),'TXN_END':_0x12b32d(0xac),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x12b32d(0x91),'TYPE_DROP':_0x12b32d(0xc4),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x12b32d(0xcc),'SYSTEM_ENV_RELEASE':_0x12b32d(0xa5),'TTL_EXPIRED':_0x12b32d(0xbe),'TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x12b32d(0xb3),'LICENSE_ADDED':_0x12b32d(0x86),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x12b32d(0xc9)},_0x547878={'CREATING':'creating','RESETTING':_0x12b32d(0x9b),'READY':'ready','DROPPING':_0x12b32d(0x7f),'WAITING':_0x12b32d(0xcb)},_0x21c3ff={'CREATED':_0x12b32d(0xaf),'STARTING':_0x12b32d(0xa3),'STARTED':'started','STOPPING':'stopping','STOPPED':_0x12b32d(0x83)},_0x4252b6={'CREATING':_0x12b32d(0xca),'READY':_0x12b32d(0xb9),'HALTED':'halted','STOPPED':'stopped','RESETTING':_0x12b32d(0x9b)},_0x1aa24a=Object[_0x12b32d(0x9a)]({'POKE':'bus:poke','DRAIN':_0x12b32d(0xa2),'TYPE_DROP':_0x12b32d(0xc0),'PROC':_0x12b32d(0x89),'ENV_RELEASE':_0x12b32d(0x95)});return okdbEnums={'BUS_EVENTS':_0x1aa24a,'CHANGE_ACTIONS':_0x4d2cde,'EVENTS':_0x4da3fe,'INDEX_STATE':_0x547878,'OKDB_STATE':_0x21c3ff,'VIEW_STATE':_0x4252b6},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x1315e2=_0x115263;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x37002f,workerData:_0x22f60f}=require$$0,_0x5e207c=require$$1,{EVENTS:_0x2b0311}=requireOkdbEnums();async function _0x35d515(){const _0x133f36=_0x2427,{rootPath:_0x3ef0f2,envName:_0x4f3e03,viewName:_0x577864,definition:_0x2f0793}=_0x22f60f,_0x2812b7=new _0x5e207c(_0x3ef0f2,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x2812b7[_0x133f36(0x99)]();const _0xab4f3b=_0x2812b7[_0x133f36(0xc6)](_0x4f3e03);_0xab4f3b[_0x133f36(0xbd)]['on'](_0x2b0311[_0x133f36(0x7c)],_0x206b96=>{const _0xf1d52c=_0x133f36;if(_0x206b96?.[_0xf1d52c(0x96)]!==_0x577864)return;try{_0x37002f[_0xf1d52c(0xb7)]({'type':_0xf1d52c(0x9f),'event':_0x206b96});}catch{}}),await _0xab4f3b[_0x133f36(0xc1)]['_prepareViewDict'](_0x2f0793),await _0xab4f3b[_0x133f36(0xc1)]['_activateViewStorage'](_0x577864,_0x2f0793),await _0xab4f3b['views'][_0x133f36(0xc5)](_0x577864,_0x2f0793),_0x37002f[_0x133f36(0xb7)]({'type':_0x133f36(0x8c)}),await _0x2812b7[_0x133f36(0xb5)](),process[_0x133f36(0x7e)](0x0);}return _0x35d515()[_0x1315e2(0x93)](_0x51cc07=>{const _0x42c3bb=_0x1315e2;try{_0x37002f[_0x42c3bb(0xb7)]({'type':_0x42c3bb(0xa0),'error':_0x51cc07['message']??String(_0x51cc07),'stack':_0x51cc07[_0x42c3bb(0x9c)]});}catch{}process[_0x42c3bb(0x7e)](0x1);}),okdbViewsBootstrapWorker$1;}function _0x1949(){const _0x251e01=['ttl:expired','exports','bus:type_drop','views','dropSchema','view:progress','type:drop','_runBootstrapScanPhases','env','1116210mmcHZk','14RHUSlf','license:removed','creating','waiting','env:removed','342vRZeDX','dropIndex','1633008EPHPWP','dropFts','__esModule','worker_threads','VIEW_PROGRESS','hasOwnProperty','exit','dropping','index:drop','call','5BfAIcK','stopped','1911124jkWaym','item:create','license:added','fts:registered','79670pZwQHJ','bus:proc','setSchema','fts:drop','done','unique:violation_resolved','schema:set','dropType','77Fxxgya','type:registered','286474osDxdv','catch','item:update','bus:env_release','name','index:reset','15818cvypED','open','freeze','resetting','stack','prototype','txn:start','progress','error','put','bus:drain','starting','registerIndex','system:env_release','registerFts','item:remove','./okdb','system:drain','ref:violation','sync:apply','txn:end','index:progress','setTtl','created','index:ready','system:type_drop','registerType','license:invalid','system:stopped','close','fts:reset','postMessage','remove','ready','120NDTXId','system:clock_change','858684awmQNQ','events'];_0x1949=function(){return _0x251e01;};return _0x1949();}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x115263(0xbf)]=okdbViewsBootstrapWorker;