@kedem/okdb 2.6.3 → 2.7.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 _0x5e06fa=_0x5881;(function(_0x167fb2,_0x2561f6){const _0x319a0e=_0x5881,_0x5cd7d1=_0x167fb2();while(!![]){try{const _0x310b57=-parseInt(_0x319a0e(0x287))/0x1+-parseInt(_0x319a0e(0x184))/0x2+parseInt(_0x319a0e(0x1c9))/0x3*(parseInt(_0x319a0e(0x122))/0x4)+-parseInt(_0x319a0e(0x151))/0x5+parseInt(_0x319a0e(0x2a9))/0x6*(parseInt(_0x319a0e(0x1c6))/0x7)+parseInt(_0x319a0e(0x192))/0x8*(parseInt(_0x319a0e(0x15c))/0x9)+parseInt(_0x319a0e(0x2d3))/0xa*(parseInt(_0x319a0e(0x2a0))/0xb);if(_0x310b57===_0x2561f6)break;else _0x5cd7d1['push'](_0x5cd7d1['shift']());}catch(_0x5df2fe){_0x5cd7d1['push'](_0x5cd7d1['shift']());}}}(_0x2913,0xc7b65));var require$$0$5=require(_0x5e06fa(0xd9)),require$$1$1=require(_0x5e06fa(0x1c7)),require$$1=require('path'),require$$0$3=require('os'),require$$2=require(_0x5e06fa(0x1d8)),require$$0=require(_0x5e06fa(0x1e4)),require$$0$2=require(_0x5e06fa(0x29e)),require$$0$1=require('fs'),require$$0$4=require(_0x5e06fa(0x205));function _0x5881(_0x39ddc,_0x17eac9){_0x39ddc=_0x39ddc-0xa5;const _0x291301=_0x2913();let _0x5881cc=_0x291301[_0x39ddc];return _0x5881cc;}function getDefaultExportFromCjs(_0x4671f9){const _0x3441ed=_0x5e06fa;return _0x4671f9&&_0x4671f9[_0x3441ed(0xdc)]&&Object[_0x3441ed(0xd0)]['hasOwnProperty'][_0x3441ed(0x1f5)](_0x4671f9,_0x3441ed(0x201))?_0x4671f9[_0x3441ed(0x201)]:_0x4671f9;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4b98dc=_0x5e06fa;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5ac31c={'PUT':'put','REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x4b98dc(0x1aa),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':_0x4b98dc(0x263),'FTS_REGISTER':_0x4b98dc(0xfc),'FTS_DROP':'dropFts','FTS_RESET':'resetFts','SCHEMA_SET':'setSchema','SCHEMA_DROP':'dropSchema','TTL_SET':'setTtl','TTL_CLEAR':'clearTtl'},_0x5a29aa={'SYSTEM_READY':_0x4b98dc(0x1f0),'FIELD_RESOLVER_REGISTERED':_0x4b98dc(0x2e0),'SYSTEM_STOPPED':_0x4b98dc(0x219),'SYSTEM_CLOCK_CHANGE':_0x4b98dc(0x11c),'SYSTEM_POKE':_0x4b98dc(0x286),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x4b98dc(0xf9),'SYSTEM_PROC':_0x4b98dc(0xf3),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x4b98dc(0x2c2),'ITEM_UPDATE':_0x4b98dc(0x152),'ITEM_REMOVE':_0x4b98dc(0xe6),'ITEM_PENDING':'item:pending','INDEX_RESET':_0x4b98dc(0x241),'INDEX_READY':_0x4b98dc(0xd6),'INDEX_PROGRESS':_0x4b98dc(0x200),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x4b98dc(0x1d9),'INDEX_REGISTERED':_0x4b98dc(0x1f1),'FTS_REGISTERED':_0x4b98dc(0x2d5),'FTS_DROP':_0x4b98dc(0x15e),'FTS_RESET':_0x4b98dc(0x1df),'SCHEMA_SET':_0x4b98dc(0x129),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x4b98dc(0xc9),'UNIQUE_VIOLATION_RESOLVED':_0x4b98dc(0xf7),'REF_VIOLATION':_0x4b98dc(0x1b8),'REF_VIOLATION_RESOLVED':_0x4b98dc(0x26c),'SYNC_APPLY':_0x4b98dc(0x21f),'TXN_START':_0x4b98dc(0x249),'TXN_END':_0x4b98dc(0xd4),'TXN_ROLLBACK':_0x4b98dc(0x155),'TYPE_REGISTERED':_0x4b98dc(0x188),'TYPE_DROP':_0x4b98dc(0x10b),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x4b98dc(0x145),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x4b98dc(0x270),'TTL_SET':_0x4b98dc(0x22c),'TTL_CLEAR':_0x4b98dc(0x1fc),'LICENSE_INVALID':_0x4b98dc(0xba),'LICENSE_ADDED':_0x4b98dc(0x2d8),'LICENSE_ACTIVATED':_0x4b98dc(0x24e),'LICENSE_REMOVED':_0x4b98dc(0x12e)},_0x32f1be={'CREATING':_0x4b98dc(0xcb),'RESETTING':_0x4b98dc(0x29b),'READY':'ready','DROPPING':'dropping','WAITING':_0x4b98dc(0x2ca),'ERROR':_0x4b98dc(0x277)},_0x36a08d={'CREATED':'created','STARTING':'starting','STARTED':_0x4b98dc(0x29c),'STOPPING':_0x4b98dc(0xdd),'STOPPED':_0x4b98dc(0xa5)},_0x9beedc={'CREATING':_0x4b98dc(0xcb),'READY':'ready','HALTED':'halted','STOPPED':_0x4b98dc(0xa5),'RESETTING':_0x4b98dc(0x29b)},_0x10155f=Object[_0x4b98dc(0xb5)]({'POKE':_0x4b98dc(0x181),'DRAIN':'bus:drain','TYPE_DROP':_0x4b98dc(0xc6),'PROC':_0x4b98dc(0x21c),'ENV_RELEASE':_0x4b98dc(0xd1)});return okdbEnums={'BUS_EVENTS':_0x10155f,'CHANGE_ACTIONS':_0x5ac31c,'EVENTS':_0x5a29aa,'INDEX_STATE':_0x32f1be,'OKDB_STATE':_0x36a08d,'VIEW_STATE':_0x9beedc},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x51eba8=_0x5e06fa;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x250bd0,performance:_0x317f2c}=require$$0,_0x5b65d1=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x39e5a7=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4f6437=process.env.OKDB_LOOP_LAG_ALL==='1',_0x488830=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x353e76{constructor(){const _0x185889=_0x5881;this[_0x185889(0xcf)]=_0x5b65d1,this[_0x185889(0x1c8)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x185889(0x2e1)]=![],this[_0x185889(0x25b)]=(_0x8cf10,_0x1b1c79)=>process[_0x185889(0xca)][_0x185889(0x21e)](_0x8cf10+(_0x1b1c79?'\x20'+JSON[_0x185889(0xd8)](_0x1b1c79):'')+'\x0a');}[_0x51eba8(0x24a)](){const _0x3d87ff=_0x51eba8;return _0x317f2c[_0x3d87ff(0x24a)]();}[_0x51eba8(0x23c)](_0x1aa61e){const _0x33c911=_0x51eba8;if(typeof _0x1aa61e===_0x33c911(0x18c))this[_0x33c911(0x25b)]=_0x1aa61e;}[_0x51eba8(0x1d2)](_0x5ae808,_0x3a8fc1,_0x38a688){const _0x5f5ac6=_0x51eba8;if(!this['enabled'])return;let _0x17aff7=this['_buckets'][_0x5f5ac6(0xec)](_0x5ae808);!_0x17aff7&&(_0x17aff7={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x5f5ac6(0x1c8)][_0x5f5ac6(0x17a)](_0x5ae808,_0x17aff7)),_0x17aff7['ms']+=_0x3a8fc1,_0x17aff7[_0x5f5ac6(0x235)]+=0x1,_0x3a8fc1>_0x17aff7['maxMs']&&(_0x17aff7[_0x5f5ac6(0x1b2)]=_0x3a8fc1,_0x17aff7[_0x5f5ac6(0x1b0)]=_0x38a688||'');}[_0x51eba8(0x177)](_0x425d76){const _0x5695dc=_0x51eba8;if(!this[_0x5695dc(0xcf)]||this[_0x5695dc(0x2e1)])return;this[_0x5695dc(0x2e1)]=!![];if(_0x425d76)this[_0x5695dc(0x25b)]=_0x425d76;this['_h']=_0x250bd0({'resolution':0xa}),this['_h'][_0x5695dc(0xbd)](),this[_0x5695dc(0xa7)]=setInterval(()=>this[_0x5695dc(0x128)](),_0x39e5a7);if(this[_0x5695dc(0xa7)][_0x5695dc(0x13e)])this[_0x5695dc(0xa7)][_0x5695dc(0x13e)]();}[_0x51eba8(0x186)](_0x1674a5){const _0x367dbf=_0x51eba8;if(!this[_0x367dbf(0x15a)])this[_0x367dbf(0x15a)]=new Set();this[_0x367dbf(0x15a)][_0x367dbf(0x25e)](_0x1674a5);if(!this['_started'])this['_startAdmission']();}[_0x51eba8(0x2b6)](_0x472136){const _0x47c89f=_0x51eba8;this[_0x47c89f(0x15a)]?.[_0x47c89f(0x2aa)](_0x472136);}[_0x51eba8(0x233)](){const _0x39c11e=_0x51eba8;if(this[_0x39c11e(0x1f3)])return;this[_0x39c11e(0x1f3)]=!![];!this['_h']&&(this['_h']=_0x250bd0({'resolution':0xa}),this['_h']['enable']());const _0x56d82b=_0x39e5a7;this['_admissionTimer']=setInterval(()=>{const _0x28f812=_0x39c11e,_0x2c9ebf=this['_h'];if(!_0x2c9ebf)return;const _0x7f7bbb=_0x2c9ebf['percentile'](0x63)/0xf4240,_0x6e0719=_0x2c9ebf['max']/0xf4240,_0x2b3028=_0x2c9ebf[_0x28f812(0x251)]/0xf4240;_0x2c9ebf[_0x28f812(0x1d4)]();if(this[_0x28f812(0x15a)])for(const _0x103f56 of this[_0x28f812(0x15a)]){try{_0x103f56({'p99Ms':_0x7f7bbb,'maxMs':_0x6e0719,'meanMs':_0x2b3028,'reportMs':_0x56d82b});}catch{}}},_0x56d82b);if(this['_admissionTimer'][_0x39c11e(0x13e)])this[_0x39c11e(0xe1)]['unref']();}[_0x51eba8(0x128)](){const _0x1579f4=_0x51eba8,_0xe21e6f=this['_h'],_0x3acd09=_0xe21e6f[_0x1579f4(0x2bc)]/0xf4240,_0x27b181=_0xe21e6f[_0x1579f4(0x295)](0x63)/0xf4240,_0x1a7d84=_0xe21e6f[_0x1579f4(0x251)]/0xf4240;_0xe21e6f['reset']();const _0x469d3c=[...this[_0x1579f4(0x1c8)][_0x1579f4(0x24c)]()]['map'](([_0x52bc5c,_0x2f3640])=>({'label':_0x52bc5c,..._0x2f3640}))['sort']((_0x1c0057,_0x3684ed)=>_0x3684ed['ms']-_0x1c0057['ms'])[_0x1579f4(0x272)](0x0,0x8);this[_0x1579f4(0x1c8)]['clear']();const _0x512a03=_0x469d3c[_0x1579f4(0x1fa)]((_0x4bdc43,_0x1e2add)=>_0x4bdc43+_0x1e2add['ms'],0x0),_0x32d924=_0x469d3c[_0x1579f4(0x173)](_0x5eeb24=>_0x5eeb24['label']+'='+_0x5eeb24['ms'][_0x1579f4(0x19f)](0x0)+_0x1579f4(0x208)+_0x5eeb24[_0x1579f4(0x235)]+(_0x5eeb24['maxMs']>0x5?'(worst\x20'+_0x5eeb24['maxMs'][_0x1579f4(0x19f)](0x0)+'ms'+(_0x5eeb24[_0x1579f4(0x1b0)]?'\x20'+_0x5eeb24['maxExtra']:'')+')':''));(_0x4f6437||_0x3acd09>=_0x488830)&&this[_0x1579f4(0x25b)]('loop-lag\x20'+_0x39e5a7+_0x1579f4(0x20b)+_0x3acd09[_0x1579f4(0x19f)](0x0)+_0x1579f4(0x140)+_0x27b181[_0x1579f4(0x19f)](0x0)+'ms\x20mean='+_0x1a7d84[_0x1579f4(0x19f)](0x0)+_0x1579f4(0xb7)+_0x512a03[_0x1579f4(0x19f)](0x0)+'ms'+(_0x32d924[_0x1579f4(0x17e)]?_0x1579f4(0x2b5)+_0x32d924[_0x1579f4(0x20d)]('\x20\x20'):''),{'feature':_0x1579f4(0x2d0)});if(this[_0x1579f4(0x15a)])for(const _0x59cdd7 of this[_0x1579f4(0x15a)]){try{_0x59cdd7({'p99Ms':_0x27b181,'maxMs':_0x3acd09,'meanMs':_0x1a7d84,'reportMs':_0x39e5a7});}catch{}}}[_0x51eba8(0x2d6)](){const _0x5a4bab=_0x51eba8;if(this[_0x5a4bab(0xa7)])clearInterval(this[_0x5a4bab(0xa7)]);if(this['_h'])this['_h'][_0x5a4bab(0x104)]();this['_timer']=null,this['_h']=null,this[_0x5a4bab(0x2e1)]=![];}}const _0x1e9376=new _0x353e76();if(_0x1e9376[_0x51eba8(0xcf)])_0x1e9376[_0x51eba8(0x177)]();return okdbLoopMonitor={'LOOP':_0x1e9376},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0xe28128=0x2**0x1f-0x1;function _0xf2ee1b(_0x59e134){if(!(_0x59e134>0x0))return 0x0;return _0x59e134>_0xe28128?_0xe28128:_0x59e134;}function _0x9e6700(_0x3deb80){return _0x3deb80===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0xe28128,'clampTimerDelay':_0xf2ee1b,'isNeverDelay':_0x9e6700},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2be06a=require$$0$1,_0x3e1b57=require$$1;let _0x55a92a,_0x4b2e27,_0x53e33a,_0x4c3fe3,_0x22e776,_0x17ea60,_0x46011a,_0x47c0d0=![];const _0x56b643=new Set();let _0x32e4b6=null;const _0x95dda7=new Map();function _0x45057b(){if(_0x55a92a!==undefined)return _0x55a92a;_0x55a92a=process.env.OKDB_DIAG==='1';if(!_0x55a92a)return![];_0x4b2e27=process.env.OKDB_DIAG_STACK==='1',_0x4c3fe3=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x53e33a=new Array(_0x4c3fe3),_0x22e776=0x0,_0x17ea60=0x0,_0x46011a=process.env.OKDB_DIAG_DIR||null;if(_0x46011a)try{_0x2be06a['mkdirSync'](_0x46011a,{'recursive':!![]});}catch{}return!![];}function _0x439df5(){return _0x55a92a===undefined?_0x45057b():_0x55a92a;}function _0x30b4ee(_0x23e943,_0x1d3fc0){const _0x4f6d78=_0x5881;if(_0x55a92a===undefined?!_0x45057b():!_0x55a92a)return;let _0x564c37;if(_0x4b2e27){const _0x100732=new Error()[_0x4f6d78(0x2d4)]||'';_0x564c37=_0x100732[_0x4f6d78(0x137)]('\x0a')[_0x4f6d78(0x272)](0x3)[_0x4f6d78(0x173)](_0x221d77=>_0x221d77[_0x4f6d78(0x289)]())[_0x4f6d78(0x2c0)](Boolean)[_0x4f6d78(0x272)](0x0,0x8);}_0x53e33a[_0x22e776]={'seq':_0x17ea60++,'t':Date[_0x4f6d78(0x24a)](),'env':_0x23e943,'kind':_0x1d3fc0||_0x4f6d78(0x158),'stack':_0x564c37},_0x22e776=(_0x22e776+0x1)%_0x4c3fe3;}function _0x271cfe(_0x5a8381){const _0x185ac2=[];for(let _0x28b93f=0x0;_0x28b93f<_0x4c3fe3;_0x28b93f++){const _0x4ef42b=_0x53e33a[(_0x22e776-0x1-_0x28b93f+_0x4c3fe3*0x2)%_0x4c3fe3];if(!_0x4ef42b)continue;_0x185ac2['push'](_0x4ef42b);if(_0x185ac2['length']>=_0x5a8381)break;}return _0x185ac2;}function _0x5616af(_0x433ff7){const _0x5416a1=_0x5881;try{process[_0x5416a1(0xca)][_0x5416a1(0x21e)](_0x433ff7+'\x0a');}catch{}if(_0x46011a)try{_0x2be06a[_0x5416a1(0x237)](_0x3e1b57[_0x5416a1(0x20d)](_0x46011a,_0x5416a1(0x268)+process[_0x5416a1(0x11d)]+_0x5416a1(0x134)),_0x433ff7+'\x0a');}catch{}}function _0x55b2ff(_0x4e252e){const _0x3b152f=_0x5881,_0x6e1ebf=_0x271cfe(_0x4e252e);if(!_0x6e1ebf[_0x3b152f(0x17e)])return _0x3b152f(0x1ef);const _0xf74ce4=Date['now']();return _0x6e1ebf[_0x3b152f(0x173)](_0x51d0c7=>{const _0x510dce=_0x3b152f,_0x13d802='\x20\x20#'+_0x51d0c7[_0x510dce(0x278)]+'\x20-'+(_0xf74ce4-_0x51d0c7['t'])+_0x510dce(0xfa)+_0x51d0c7[_0x510dce(0x136)]+'\x20'+_0x51d0c7['kind'];return _0x51d0c7[_0x510dce(0x2d4)]&&_0x51d0c7[_0x510dce(0x2d4)][_0x510dce(0x17e)]?_0x13d802+_0x510dce(0x1a7)+_0x51d0c7['stack']['join'](_0x510dce(0x1a7)):_0x13d802;})[_0x3b152f(0x20d)]('\x0a');}function _0xa4389e(_0x4ea8c3,_0x5f13fe){const _0x3bd1a8=_0x5881,_0x1e87b1=_0x3bd1a8(0x28b)+_0x4ea8c3+'\x20@\x20'+new Date()[_0x3bd1a8(0xb6)]()+_0x3bd1a8(0x27c)+process[_0x3bd1a8(0x11d)]+_0x3bd1a8(0x1bb),_0x478074=[_0x1e87b1,'error:\x20'+(_0x5f13fe&&_0x5f13fe[_0x3bd1a8(0x2d4)]?_0x5f13fe[_0x3bd1a8(0x2d4)][_0x3bd1a8(0x137)]('\x0a')[0x0]:_0x5f13fe),_0x3bd1a8(0x1ba)+(_0x4b2e27?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x55b2ff(0x18),_0xff36e5(),'='[_0x3bd1a8(0x2b3)](_0x1e87b1['length']-0x1)];_0x5616af(_0x478074[_0x3bd1a8(0x20d)]('\x0a'));}function _0xd0f069(_0x2f2fef){const _0xbff4d8=_0x5881;if(!_0x439df5())return;const _0x58d8bd=String(_0x2f2fef&&_0x2f2fef[_0xbff4d8(0x25d)]||_0x2f2fef||''),_0x38ce3b=/already closed|environment is already|invalid read txn|reset an invalid/i[_0xbff4d8(0x160)](_0x58d8bd);_0xa4389e(_0x38ce3b?_0xbff4d8(0xbf):_0xbff4d8(0x299),_0x2f2fef);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x38ce3b)return;try{console[_0xbff4d8(0x277)](_0x2f2fef&&_0x2f2fef['stack']?_0x2f2fef[_0xbff4d8(0x2d4)]:_0x2f2fef);}catch{}process['exit'](0x1);}function _0x5e56c5(_0xa4e34a){const _0x46bdb3=_0x5881;if(!_0x439df5())return;const _0x49527e=String(_0xa4e34a&&_0xa4e34a[_0x46bdb3(0x25d)]||_0xa4e34a||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x46bdb3(0x160)](_0x49527e)&&_0xa4389e(_0x46bdb3(0x182),_0xa4e34a);}function _0xff36e5(){const _0x35c831=_0x5881,_0x11c091=[_0x35c831(0xef)];let _0x5c2b4b=![];for(const _0x32d308 of _0x56b643){const _0xb96b34=_0x32d308&&_0x32d308[_0x35c831(0x139)];if(!_0xb96b34)continue;for(const [_0x56d630,_0x396cc2]of _0xb96b34){const _0x2df2d2=_0x396cc2&&_0x396cc2[_0x35c831(0x1e1)]&&_0x396cc2[_0x35c831(0x1e1)][_0x35c831(0x22f)];if(!_0x2df2d2)continue;let _0x3c55ff,_0x5a7c42;try{_0x3c55ff=Atomics[_0x35c831(0x283)](_0x2df2d2,0x0),_0x5a7c42=Atomics['load'](_0x2df2d2,0x1);}catch{continue;}if(_0x3c55ff===0x0)continue;_0x5c2b4b=!![];const _0x202ff2=_0x3c55ff>0x0?'SWAP':'copy',_0x1082c5=Date['now']()-Math[_0x35c831(0xce)](_0x3c55ff)*0x3e8,_0x6e48b3=((()=>{const _0x3674ed=_0x35c831;try{return _0x396cc2['_writer']&&_0x396cc2[_0x3674ed(0x2da)][_0x3674ed(0x2cf)]?_0x396cc2['_writer'][_0x3674ed(0x2cf)]():null;}catch{return null;}})());_0x11c091[_0x35c831(0x1a0)]('\x20\x20env='+_0x56d630+'\x20phase='+_0x202ff2+_0x35c831(0x2b9)+_0x1082c5+_0x35c831(0xf6)+_0x5a7c42+(_0x6e48b3?_0x35c831(0x2a8)+_0x6e48b3[_0x35c831(0xcc)]+'\x20oldestPendingMs='+_0x6e48b3['oldestPendingMs']+_0x35c831(0xe0)+_0x6e48b3[_0x35c831(0x1c4)]+'}':''));}}if(!_0x5c2b4b)_0x11c091['push'](_0x35c831(0xe5));return _0x11c091[_0x35c831(0x20d)]('\x0a');}function _0x215fd4(){const _0x29e8bf=_0x5881;if(!_0x439df5())return;const _0x5ea374=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x38ddc8=Date[_0x29e8bf(0x24a)]();for(const _0x328ef8 of _0x56b643){const _0x2d7105=_0x328ef8&&_0x328ef8[_0x29e8bf(0x139)];if(!_0x2d7105)continue;for(const [_0x160141,_0x16442b]of _0x2d7105){const _0x4808df=_0x16442b&&_0x16442b['_coordinator']&&_0x16442b[_0x29e8bf(0x1e1)]['view'];if(!_0x4808df)continue;let _0x1f573c;try{_0x1f573c=Atomics[_0x29e8bf(0x283)](_0x4808df,0x0);}catch{continue;}const _0x362857=_0x328ef8[_0x29e8bf(0x1d7)]+'|'+_0x160141;if(_0x1f573c<=0x0){_0x95dda7['delete'](_0x362857);continue;}const _0x310f30=_0x38ddc8-_0x1f573c*0x3e8,_0x3c17bc=_0x95dda7[_0x29e8bf(0xec)](_0x362857);if(_0x310f30<_0x5ea374)continue;if(_0x3c17bc&&_0x38ddc8-_0x3c17bc[_0x29e8bf(0x28c)]<_0x5ea374)continue;_0x95dda7['set'](_0x362857,{'firstTs':_0x3c17bc?_0x3c17bc['firstTs']:_0x1f573c,'dumpedAt':_0x38ddc8});const _0x375e8c='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x310f30+_0x29e8bf(0xf0)+_0x160141+_0x29e8bf(0x275)+new Date()['toISOString']()+_0x29e8bf(0x27c)+process[_0x29e8bf(0x11d)]+_0x29e8bf(0x1bb);_0x5616af([_0x375e8c,_0xff36e5(),'='[_0x29e8bf(0x2b3)](_0x375e8c['length']-0x1)][_0x29e8bf(0x20d)]('\x0a'));}}}function _0x5dfea7(){const _0x5d915c=_0x5881;if(!_0x439df5()||_0x47c0d0)return;_0x47c0d0=!![],process['prependListener'](_0x5d915c(0x299),_0xd0f069),process[_0x5d915c(0x19a)]('unhandledRejection',_0x5e56c5);const _0x5a25ae=Math[_0x5d915c(0x2bc)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x32e4b6=setInterval(_0x215fd4,_0x5a25ae);if(_0x32e4b6[_0x5d915c(0x13e)])_0x32e4b6[_0x5d915c(0x13e)]();}function _0x5eee3f(_0x7ae850){const _0x43aafa=_0x5881;if(!_0x439df5()||!_0x7ae850)return;_0x56b643[_0x43aafa(0x25e)](_0x7ae850),_0x5dfea7();}function _0x551aa3(_0x18ff8e){const _0x14f1eb=_0x5881;_0x56b643[_0x14f1eb(0x2aa)](_0x18ff8e);}function _0x17181f(){const _0x4f4af2=_0x5881;if(!_0x439df5())return{'enabled':![],'hint':_0x4f4af2(0x16b)};return{'enabled':!![],'stackCapture':!!_0x4b2e27,'recentWrites':_0x271cfe(0x10),'drain':_0xff36e5()};}return okdbDiag={'isEnabled':_0x439df5,'recordWrite':_0x30b4ee,'installDiag':_0x5dfea7,'registerOkdb':_0x5eee3f,'unregisterOkdb':_0x551aa3,'snapshot':_0x17181f},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x44635e=_0x5e06fa;if(hasRequiredOkdbWriter)return okdbWriter[_0x44635e(0x16f)];hasRequiredOkdbWriter=0x1;const {performance:_0x1739b4}=require$$0$2,_0x2c04e4=requireOkdbDiag(),_0x52fb54=process.env.OKDB_COMMIT_MODE===_0x44635e(0x1d6);class _0x460fa7{constructor(_0x5659d9){const _0x3d69d3=_0x44635e;this[_0x3d69d3(0x136)]=_0x5659d9,this[_0x3d69d3(0x1f7)]=new Set(),this[_0x3d69d3(0x18d)]=new Map(),this[_0x3d69d3(0x18a)]=0x0,this['_durs']=[],this['_done']=[],this[_0x3d69d3(0x111)]=Math[_0x3d69d3(0x2bc)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x3d69d3(0x1ec)]=0x0,this['_bpWaiters']=[],this['_bpParkedTotal']=0x0,this[_0x3d69d3(0x232)]=null,this[_0x3d69d3(0x12c)]=0x0,this['_nestedTotal']=0x0,this[_0x3d69d3(0x14e)]=![];}async['transaction'](_0xd40a09,_0x231758,{admitted:admitted=![]}={}){const _0x2f8578=_0x44635e;if(_0x2c04e4[_0x2f8578(0xcd)]())_0x2c04e4[_0x2f8578(0x2b2)](this[_0x2f8578(0x136)]?.[_0x2f8578(0x178)],_0x231758);if(this['_closed']){const _0xfebe66=new Error(_0x2f8578(0x28e));_0xfebe66[_0x2f8578(0x2d9)]=_0x2f8578(0x228);throw _0xfebe66;}if(this[_0x2f8578(0x111)]>0x0){let _0x4fb87d=![];while(this[_0x2f8578(0x1ec)]>=this['_highWater']&&!this[_0x2f8578(0x2a7)]){!_0x4fb87d&&(_0x4fb87d=!![],this[_0x2f8578(0x29a)]++),await new Promise(_0x2c02cc=>this[_0x2f8578(0x2ab)][_0x2f8578(0x1a0)](_0x2c02cc));}if(this[_0x2f8578(0x2a7)]){const _0x52f821=new Error(_0x2f8578(0x28e));_0x52f821['code']=_0x2f8578(0x228);throw _0x52f821;}}this[_0x2f8578(0x1ec)]++;const _0x22ee90=admitted?null:this['env'][_0x2f8578(0x1e1)];for(;;){while(this['_held'])await this[_0x2f8578(0x232)];if(_0x22ee90)try{await _0x22ee90[_0x2f8578(0x26e)]();}catch(_0x1396a2){this[_0x2f8578(0x1ec)]--;if(this[_0x2f8578(0x2ab)]['length']&&this['_outstanding']<this[_0x2f8578(0x111)])this[_0x2f8578(0x2ab)][_0x2f8578(0x276)]()();throw _0x1396a2;}if(!this[_0x2f8578(0x232)])break;if(_0x22ee90)_0x22ee90[_0x2f8578(0x196)]();}if(this[_0x2f8578(0x2a7)]){if(_0x22ee90)_0x22ee90[_0x2f8578(0x196)]();this[_0x2f8578(0x1ec)]--;if(this[_0x2f8578(0x2ab)]['length']&&this['_outstanding']<this[_0x2f8578(0x111)])this[_0x2f8578(0x2ab)][_0x2f8578(0x276)]()();const _0x3f4af8=new Error(_0x2f8578(0x28e));_0x3f4af8[_0x2f8578(0x2d9)]=_0x2f8578(0x228);throw _0x3f4af8;}const _0x26bc17=_0x1739b4['now']();if(_0x52fb54)try{const _0x3de17d=this['env']['db'][_0x2f8578(0x2c6)](_0xd40a09);this[_0x2f8578(0x18a)]++;if(this['_durs'][_0x2f8578(0x1a0)](_0x1739b4[_0x2f8578(0x24a)]()-_0x26bc17)>0x100)this[_0x2f8578(0x1f4)][_0x2f8578(0x276)]();if(this['_done'][_0x2f8578(0x1a0)](_0x1739b4[_0x2f8578(0x24a)]())>0x800)this[_0x2f8578(0x2ac)][_0x2f8578(0x276)]();return _0x3de17d;}finally{this[_0x2f8578(0x1ec)]--;if(this['_bpWaiters'][_0x2f8578(0x17e)]&&this['_outstanding']<this[_0x2f8578(0x111)])this[_0x2f8578(0x2ab)]['shift']()();if(_0x22ee90)_0x22ee90['afterWrite']();}let _0x280a50=null;const _0x52bd02=()=>{const _0x43345b=_0x2f8578,_0x322fcf=_0xd40a09();if(_0x322fcf&&typeof _0x322fcf[_0x43345b(0xda)]==='function'&&!_0x280a50){this[_0x43345b(0x12c)]++;let _0x583119;const _0x14ff7c=new Promise(_0x5617a9=>_0x583119=_0x5617a9);this[_0x43345b(0x232)]=_0x14ff7c,_0x280a50=()=>{const _0x330526=_0x43345b;if(this[_0x330526(0x232)]===_0x14ff7c)this['_held']=null;_0x583119();};}return _0x322fcf;};let _0x152722;try{_0x152722=this[_0x2f8578(0x136)]['db'][_0x2f8578(0x24f)](_0x52bd02);}catch(_0x4237bb){_0x152722=Promise[_0x2f8578(0xf2)](_0x4237bb);}(!_0x152722||typeof _0x152722['then']!==_0x2f8578(0x18c))&&(this[_0x2f8578(0xdb)]++,!this['_nestedWarned']&&(this[_0x2f8578(0x14e)]=!![],console[_0x2f8578(0x26f)](_0x2f8578(0x185)+(this[_0x2f8578(0x136)]?.[_0x2f8578(0x178)]??'?')+_0x2f8578(0x17b))),_0x152722=Promise[_0x2f8578(0x1ce)](_0x152722));const _0xbeb51b=()=>{if(_0x280a50)_0x280a50();};_0x152722[_0x2f8578(0xda)](_0xbeb51b,_0xbeb51b),this[_0x2f8578(0x1f7)][_0x2f8578(0x25e)](_0x152722),this[_0x2f8578(0x18d)][_0x2f8578(0x17a)](_0x152722,_0x26bc17);const _0x33e2a0=()=>{const _0x4b163a=_0x2f8578;this[_0x4b163a(0x1f7)][_0x4b163a(0x2aa)](_0x152722),this[_0x4b163a(0x18d)][_0x4b163a(0x2aa)](_0x152722),this[_0x4b163a(0x18a)]++,this[_0x4b163a(0x1ec)]--;this['_bpWaiters']['length']&&this['_outstanding']<this[_0x4b163a(0x111)]&&this['_bpWaiters']['shift']()();if(this['_durs'][_0x4b163a(0x1a0)](_0x1739b4['now']()-_0x26bc17)>0x100)this['_durs'][_0x4b163a(0x276)]();if(this[_0x4b163a(0x2ac)][_0x4b163a(0x1a0)](_0x1739b4[_0x4b163a(0x24a)]())>0x800)this[_0x4b163a(0x2ac)][_0x4b163a(0x276)]();};_0x152722[_0x2f8578(0xda)](_0x33e2a0,_0x33e2a0);try{return await _0x152722;}finally{if(_0x22ee90)_0x22ee90[_0x2f8578(0x196)]();}}[_0x44635e(0x2cf)](){const _0x5e438b=_0x44635e,_0x120003=_0x1739b4[_0x5e438b(0x24a)]();let _0x33bfc7=0x0;for(const _0x26d40c of this['_enqueuedAt'][_0x5e438b(0x2e6)]()){const _0x5f2ef1=_0x120003-_0x26d40c;if(_0x5f2ef1>_0x33bfc7)_0x33bfc7=_0x5f2ef1;}let _0x5668f9=0x0;for(let _0x3a2ba8=this[_0x5e438b(0x2ac)][_0x5e438b(0x17e)]-0x1;_0x3a2ba8>=0x0;_0x3a2ba8--){if(_0x120003-this[_0x5e438b(0x2ac)][_0x3a2ba8]>0x3e8)break;_0x5668f9++;}let _0x20b527=0x0;if(this['_durs'][_0x5e438b(0x17e)]){const _0x2dcafc=[...this[_0x5e438b(0x1f4)]]['sort']((_0x14b21d,_0x37f6d2)=>_0x14b21d-_0x37f6d2);_0x20b527=_0x2dcafc[Math[_0x5e438b(0x22d)](_0x2dcafc[_0x5e438b(0x17e)]-0x1,Math[_0x5e438b(0x27a)](_0x2dcafc[_0x5e438b(0x17e)]*0.99))];}return{'depth':this[_0x5e438b(0x1f7)][_0x5e438b(0x2e3)],'oldestPendingMs':Math[_0x5e438b(0x24b)](_0x33bfc7),'committed':this[_0x5e438b(0x18a)],'commitsPerSec':_0x5668f9,'commitP99Ms':Math[_0x5e438b(0x24b)](_0x20b527),'parkedNow':this[_0x5e438b(0x2ab)]['length'],'parkedTotal':this[_0x5e438b(0x29a)],'highWater':this[_0x5e438b(0x111)]};}[_0x44635e(0x2c8)](){const _0x419b3f=_0x44635e,_0x4d11f7=_0x1739b4[_0x419b3f(0x24a)]();return[...this[_0x419b3f(0x18d)][_0x419b3f(0x2e6)]()][_0x419b3f(0x173)](_0x475ac3=>Math[_0x419b3f(0x24b)](_0x4d11f7-_0x475ac3))[_0x419b3f(0x101)]((_0x169f32,_0x1bd34f)=>_0x1bd34f-_0x169f32);}[_0x44635e(0x17c)](){const _0x576d3f=_0x44635e;this['_closed']=!![];for(const _0x55126c of this['_bpWaiters'][_0x576d3f(0x142)](0x0))_0x55126c();}async[_0x44635e(0x180)](){const _0x21c1e2=_0x44635e;let _0xf7c9b6=0x0;while(this[_0x21c1e2(0x1f7)][_0x21c1e2(0x2e3)]&&_0xf7c9b6++<0x3e8){await Promise[_0x21c1e2(0x138)]([...this['_inflight']]);}}async[_0x44635e(0x170)](_0x1f96e0,_0x461297,_0x26cc47,_0x2f1bad){const _0x339f56=_0x44635e;return this[_0x339f56(0x285)](()=>{const _0x37b012=_0x339f56;if(_0x2f1bad===undefined)_0x1f96e0[_0x37b012(0x156)](_0x461297,_0x26cc47);else _0x1f96e0[_0x37b012(0x156)](_0x461297,_0x26cc47,_0x2f1bad);},_0x339f56(0x2d7));}async[_0x44635e(0x2de)](_0x5ed422,_0x47d4f9){const _0x507850=_0x44635e;return this[_0x507850(0x285)](()=>_0x5ed422[_0x507850(0x20c)](_0x47d4f9),_0x507850(0xae));}}async function _0x18823b(_0x48e0c8,_0x5f526b){const _0x103c91=_0x44635e;if(_0x5f526b==null)_0x5f526b=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x7bbf3f=_0x48e0c8?.['flushed'];if(!_0x7bbf3f||typeof _0x7bbf3f[_0x103c91(0xda)]!==_0x103c91(0x18c))return;await Promise[_0x103c91(0xd7)]([Promise['resolve'](_0x7bbf3f)[_0x103c91(0x230)](()=>{}),new Promise(_0x529b8c=>{const _0x2b7d58=_0x103c91,_0xd62b10=setTimeout(_0x529b8c,_0x5f526b);if(_0xd62b10[_0x2b7d58(0x13e)])_0xd62b10['unref']();})]);}catch{}}function _0x18651e(_0x45dbd6){const _0x452a68=_0x44635e;if(_0x52fb54)return Promise[_0x452a68(0x1ce)]();const _0x5a93f5=_0x45dbd6?.[_0x452a68(0x121)];return _0x5a93f5&&typeof _0x5a93f5[_0x452a68(0xda)]===_0x452a68(0x18c)?_0x5a93f5:Promise['resolve']();}const _0x46f4df=Math[_0x44635e(0x2bc)](0x1,Math[_0x44635e(0x27a)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x1b08c2=Math[_0x44635e(0x2bc)](0x1,_0x46f4df-0x2);let _0x5be501=0x0;const _0x122216=[];async function _0x2e0bae(_0x4d949b){const _0x41b3d2=_0x44635e;if(_0x5be501<_0x1b08c2)_0x5be501++;else await new Promise(_0x33b8fb=>_0x122216[_0x41b3d2(0x1a0)](_0x33b8fb));try{return await _0x4d949b();}finally{const _0x21f502=_0x122216[_0x41b3d2(0x276)]();if(_0x21f502)_0x21f502();else _0x5be501--;}}return okdbWriter[_0x44635e(0x16f)]=_0x460fa7,okdbWriter['exports'][_0x44635e(0x2b4)]=_0x2e0bae,okdbWriter[_0x44635e(0x16f)][_0x44635e(0x1f8)]=_0x1b08c2,okdbWriter[_0x44635e(0x16f)]['flushLmdb']=_0x18823b,okdbWriter[_0x44635e(0x16f)][_0x44635e(0x121)]=_0x18651e,okdbWriter[_0x44635e(0x16f)]['SYNC_COMMITS']=_0x52fb54,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x845a12=_0x5e06fa;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x389a49=require$$0$3,{clampTimerDelay:_0x10ffdb}=requireOkdbTimers(),{SYNC_COMMITS:_0x52c0f3}=requireOkdbWriter(),_0x497627=_0x845a12(0x2be);class _0x260cdf{constructor(_0x2c9e0f,_0x4d25c4,_0x5e9f19){const _0x46554a=_0x845a12;this[_0x46554a(0x211)]=_0x2c9e0f,this['_key']=_0x4d25c4,this[_0x46554a(0x15f)]=_0x5e9f19,this[_0x46554a(0x11a)]=![],this[_0x46554a(0x2e4)]=null,this[_0x46554a(0x2e7)]=null;}['isHeld'](){const _0xf34c5d=_0x845a12;if(this[_0xf34c5d(0x11a)])return![];try{const _0x3aa289=this[_0xf34c5d(0x211)][_0xf34c5d(0x2ae)]()['get'](this[_0xf34c5d(0x269)]);if(!_0x3aa289||_0x3aa289[_0xf34c5d(0x187)]!==this[_0xf34c5d(0x15f)])return![];const _0x57aac2=_0x3aa289['updatedAt']??_0x3aa289[_0xf34c5d(0x187)];if(_0x57aac2+_0x3aa289['ttlMs']<Date[_0xf34c5d(0x24a)]())return![];return!![];}catch{return!this[_0xf34c5d(0x11a)];}}['holder'](){const _0x28cef3=_0x845a12;if(this[_0x28cef3(0x11a)])return null;try{return this[_0x28cef3(0x211)][_0x28cef3(0x2ae)]()[_0x28cef3(0xec)](this[_0x28cef3(0x269)])??null;}catch{return null;}}async[_0x845a12(0xe2)](_0x195a06){const _0x391c48=_0x845a12;if(this['_released'])return;try{if(this[_0x391c48(0x211)][_0x391c48(0x2a7)]())return;const _0x342815=this[_0x391c48(0x211)][_0x391c48(0x2ae)]()[_0x391c48(0xec)](this[_0x391c48(0x269)]);if(!_0x342815||_0x342815[_0x391c48(0x187)]!==this[_0x391c48(0x15f)])return;if(_0x52c0f3)this[_0x391c48(0x211)][_0x391c48(0x2ae)]()[_0x391c48(0x156)](this['_key'],{..._0x342815,'ttlMs':_0x342815[_0x391c48(0x1bd)]+_0x195a06});else await this['_lock'][_0x391c48(0x2ae)]()['put'](this['_key'],{..._0x342815,'ttlMs':_0x342815[_0x391c48(0x1bd)]+_0x195a06});}catch{}}async[_0x845a12(0x1e8)](){const _0x1ecf35=_0x845a12;if(this['_released'])return;if(this[_0x1ecf35(0x2e7)])try{await this[_0x1ecf35(0x2e7)];}catch{}clearInterval(this[_0x1ecf35(0x2e4)]),this[_0x1ecf35(0x2e4)]=null,this['_released']=!![];try{if(this[_0x1ecf35(0x211)][_0x1ecf35(0x2a7)]())return;const _0x56bd85=this['_lock']['_db']()[_0x1ecf35(0xec)](this[_0x1ecf35(0x269)]);if(_0x56bd85&&_0x56bd85[_0x1ecf35(0x187)]===this[_0x1ecf35(0x15f)]){if(_0x52c0f3)this['_lock'][_0x1ecf35(0x2ae)]()[_0x1ecf35(0x20c)](this[_0x1ecf35(0x269)]);else await this['_lock'][_0x1ecf35(0x2ae)]()[_0x1ecf35(0x2de)](this['_key']);}}catch{}}[_0x845a12(0xaa)](_0x3b5373,_0x58b8a0){const _0x44ec45=_0x845a12,_0x23591d=_0x10ffdb(_0x58b8a0??Math[_0x44ec45(0x27a)](_0x3b5373/0x3));this[_0x44ec45(0x2e4)]=setInterval(()=>{if(this['_released'])return;this['_heartbeatInFlight']=((async()=>{const _0x2cd5e5=_0x5881;try{if(this[_0x2cd5e5(0x211)][_0x2cd5e5(0x2a7)]())return;const _0x3f14dd=this['_lock']['_db']()[_0x2cd5e5(0xec)](this[_0x2cd5e5(0x269)]);if(!_0x3f14dd||_0x3f14dd[_0x2cd5e5(0x187)]!==this[_0x2cd5e5(0x15f)]){this['_released']=!![],clearInterval(this['_heartbeatTimer']),this[_0x2cd5e5(0x2e4)]=null;return;}if(_0x52c0f3)this['_lock'][_0x2cd5e5(0x2ae)]()[_0x2cd5e5(0x156)](this[_0x2cd5e5(0x269)],{..._0x3f14dd,'updatedAt':Date[_0x2cd5e5(0x24a)]()});else await this[_0x2cd5e5(0x211)][_0x2cd5e5(0x2ae)]()[_0x2cd5e5(0x170)](this[_0x2cd5e5(0x269)],{..._0x3f14dd,'updatedAt':Date[_0x2cd5e5(0x24a)]()});}catch{}this[_0x2cd5e5(0x2e7)]=null;})());},_0x23591d);if(this['_heartbeatTimer']['unref'])this[_0x44ec45(0x2e4)][_0x44ec45(0x13e)]();}}class _0x2bb68f{constructor(_0x327b19,{namespace:_0x3da95a,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x5b48be=_0x845a12;this[_0x5b48be(0x242)]=_0x327b19,this[_0x5b48be(0x1be)]=_0x3da95a,this['ttlMs']=ttlMs,this[_0x5b48be(0x21b)]=heartbeatMs,this['_lockDb']=null;}[_0x845a12(0x2ae)](){const _0x54ca99=_0x845a12;return this['_assertUsable'](),(!this['_lockDb']||this['_lockDbOf']!==this[_0x54ca99(0x242)])&&(this['_lockDb']=this['_rawDb'][_0x54ca99(0x254)](_0x497627,{'dupSort':![]}),this[_0x54ca99(0xf5)]=this[_0x54ca99(0x242)]),this[_0x54ca99(0x297)];}[_0x845a12(0x115)](){const _0x14fee1=_0x845a12;return this[_0x14fee1(0x1bf)](),(!this['_wantDbHandle']||this[_0x14fee1(0x203)]!==this[_0x14fee1(0x242)])&&(this[_0x14fee1(0xee)]=this[_0x14fee1(0x242)]['openDB'](_0x497627+':want',{'dupSort':![]}),this[_0x14fee1(0x203)]=this[_0x14fee1(0x242)]),this[_0x14fee1(0xee)];}[_0x845a12(0x2a7)](){const _0x386be2=_0x845a12,_0x48bc9e=this[_0x386be2(0x242)]?.[_0x386be2(0x2cf)];return _0x48bc9e===_0x386be2(0x27d)||_0x48bc9e==='closed';}[_0x845a12(0x1bf)](){const _0x49cadb=_0x845a12;if(this[_0x49cadb(0x2a7)]())throw new Error(_0x49cadb(0x12d));}[_0x845a12(0x269)](_0x97de4f){const _0x38436e=_0x845a12;return this[_0x38436e(0x1be)]+':'+_0x97de4f;}['signalWant'](_0x10c1e6){const _0x523572=_0x845a12;try{if(this[_0x523572(0x2a7)]())return;_0x52c0f3?this[_0x523572(0x115)]()[_0x523572(0x156)](this[_0x523572(0x269)](_0x10c1e6),Date[_0x523572(0x24a)]()):this[_0x523572(0x115)]()[_0x523572(0x170)](this['_key'](_0x10c1e6),Date[_0x523572(0x24a)]())?.[_0x523572(0x230)]?.(()=>{});}catch{}}[_0x845a12(0x162)](_0x2108bd,_0x507b51=0x3e8){const _0xd0d138=_0x845a12;try{const _0x3c4c91=this[_0xd0d138(0x115)]()[_0xd0d138(0xec)](this[_0xd0d138(0x269)](_0x2108bd));return typeof _0x3c4c91==='number'&&Date[_0xd0d138(0x24a)]()-_0x3c4c91<_0x507b51;}catch{return![];}}['_isStale'](_0x2846ed){const _0xd15cd2=_0x845a12,_0x1f7345=_0x2846ed[_0xd15cd2(0xc7)]??_0x2846ed['acquiredAt'];return _0x1f7345+_0x2846ed[_0xd15cd2(0x1bd)]<Date['now']();}static['_holderDead'](_0x5539b0){const _0x21988d=_0x845a12,_0x383a4e=_0x5539b0?.[_0x21988d(0x27b)];if(!_0x383a4e||typeof _0x383a4e[_0x21988d(0x11d)]!==_0x21988d(0x2a4))return![];if(_0x383a4e['hostname']!==_0x389a49[_0x21988d(0x165)]())return![];if(_0x383a4e[_0x21988d(0x11d)]===process['pid'])return![];try{return process[_0x21988d(0x209)](_0x383a4e['pid'],0x0),![];}catch(_0x27d8dd){return _0x27d8dd['code']===_0x21988d(0x1de);}}async[_0x845a12(0x28f)](_0x374cd6,_0x52813a={},_0x5c30d4={}){const _0x5cf27d=_0x845a12,_0x5cbf3a=this['_key'](_0x374cd6),_0x239cad=_0x5c30d4[_0x5cf27d(0x1bd)]??this['ttlMs'],_0x1908c6=Date[_0x5cf27d(0x24a)](),_0x3d9c84={'holder':{'pid':process[_0x5cf27d(0x11d)],'hostname':_0x389a49['hostname'](),..._0x52813a},'acquiredAt':_0x1908c6,'updatedAt':_0x1908c6,'ttlMs':_0x239cad};let _0x26c417=![],_0x5c7bfc=null;if(this[_0x5cf27d(0x2a7)]())return{'acquired':![],'handle':null,'current':null};try{const _0x11dc9d=()=>{const _0x486264=_0x5cf27d,_0x280337=this[_0x486264(0x2ae)]()[_0x486264(0xec)](_0x5cbf3a);if(_0x280337&&!this[_0x486264(0x231)](_0x280337)&&!_0x2bb68f[_0x486264(0x105)](_0x280337)){const _0x101274=_0x52813a[_0x486264(0x10d)]!=null&&_0x280337[_0x486264(0x27b)][_0x486264(0x11d)]===process['pid']&&_0x280337[_0x486264(0x27b)][_0x486264(0x10d)]===_0x52813a[_0x486264(0x10d)];if(!_0x101274){_0x26c417=![],_0x5c7bfc=_0x280337;return;}_0x3d9c84[_0x486264(0x187)]<=_0x280337[_0x486264(0x187)]&&(_0x3d9c84[_0x486264(0x187)]=_0x280337[_0x486264(0x187)]+0x1,_0x3d9c84[_0x486264(0xc7)]=_0x3d9c84[_0x486264(0x187)]);}this[_0x486264(0x2ae)]()[_0x486264(0x170)](_0x5cbf3a,_0x3d9c84),_0x26c417=!![],_0x5c7bfc=_0x3d9c84;};if(_0x52c0f3)this[_0x5cf27d(0x2ae)]()[_0x5cf27d(0x2c6)](_0x11dc9d);else await this[_0x5cf27d(0x2ae)]()[_0x5cf27d(0x24f)](_0x11dc9d);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x26c417)return{'acquired':![],'handle':null,'current':_0x5c7bfc};const _0x2529bb=new _0x260cdf(this,_0x5cbf3a,_0x3d9c84[_0x5cf27d(0x187)]);return _0x2529bb['_startHeartbeat'](_0x239cad,this[_0x5cf27d(0x21b)]),{'acquired':!![],'handle':_0x2529bb,'current':_0x5c7bfc};}[_0x845a12(0x1cf)](_0x5e9456){const _0x474ebe=_0x845a12;try{return this[_0x474ebe(0x2ae)]()['get'](this[_0x474ebe(0x269)](_0x5e9456))??null;}catch{return null;}}[_0x845a12(0x1b4)](){const _0x5f5294=_0x845a12,_0x220bee=this['namespace']+':',_0x432413=[];try{for(const {key:_0x244164,value:_0x21cab9}of this[_0x5f5294(0x2ae)]()[_0x5f5294(0x1c1)]({'start':_0x220bee,'end':_0x220bee+'\xff'})){typeof _0x244164===_0x5f5294(0xa8)&&_0x244164[_0x5f5294(0x218)](_0x220bee)&&_0x432413[_0x5f5294(0x1a0)]({'id':_0x244164[_0x5f5294(0x272)](_0x220bee[_0x5f5294(0x17e)]),'entry':_0x21cab9});}}catch{}return _0x432413;}static['listAll'](_0x5159c3){const _0x579138=_0x845a12,_0x312d36=[];try{const _0x237cb8=_0x5159c3[_0x579138(0x254)](_0x497627,{'dupSort':![]});for(const {key:_0x1ea58c,value:_0x44d58a}of _0x237cb8['getRange']({})){if(typeof _0x1ea58c!=='string')continue;const _0x378b83=_0x1ea58c[_0x579138(0x2cb)](':');if(_0x378b83<0x1)continue;_0x312d36['push']({'namespace':_0x1ea58c[_0x579138(0x272)](0x0,_0x378b83),'id':_0x1ea58c['slice'](_0x378b83+0x1),'entry':_0x44d58a});}}catch{}return _0x312d36;}}return okdbLock={'OKDBLock':_0x2bb68f},okdbLock;}var version=_0x5e06fa(0x110),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x3faefc=_0x5e06fa;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x5e8a97=require$$0$3,_0x4e3516=require$$1$1,_0x5706c7=require$$2,{LOOP:_0x23d241}=requireOkdbLoopMonitor(),{OKDBLock:_0x30fdf7}=requireOkdbLock(),{SYNC_COMMITS:_0x2e88d8}=requireOkdbWriter(),_0xc4a0da=_0x3faefc(0x2e9),_0x16f04c=_0x3faefc(0x1a4),_0x1f78d9=_0x3faefc(0x2d2),_0x1b0b76=_0x3faefc(0x168),_0x1f48f5=(_0x1383bc,_0x233411)=>_0x1383bc+':'+_0x233411,_0x394355=(_0x1e181f,_0xd2575d)=>_0x1e181f+'::'+_0xd2575d,_0x2204da=(_0x196df9,_0x5e80b)=>_0x196df9+'/'+_0x5e80b,_0xce4ca5=(_0x514bec,_0x5ce859)=>_0x514bec+'#'+_0x5ce859,_0x573832=_0x28e1b8=>{const _0x2a75eb=_0x3faefc;if(_0x28e1b8?.[_0x2a75eb(0x1a1)])return _0x28e1b8[_0x2a75eb(0x1a1)];const _0x3cb30e=_0x28e1b8?.[_0x2a75eb(0x253)];return typeof _0x3cb30e===_0x2a75eb(0xa8)&&_0x3cb30e['includes']('#')?_0x3cb30e[_0x2a75eb(0x272)](0x0,_0x3cb30e[_0x2a75eb(0x2cb)]('#')):_0x3cb30e;},_0x13a537=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1f6e90=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4b5ec0=_0x13a537*0x3,_0x1e5760=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x3faefc(0x2bc)](0x927c0,_0x4b5ec0*0x14),_0x53d213=[_0x3faefc(0x10e),_0x3faefc(0xed),_0x3faefc(0x1da),'processor:error',_0x3faefc(0xc8),_0x3faefc(0x221)];let _0x51077c=null;function _0x22a38e(){const _0x845372=_0x3faefc;if(_0x51077c==null)_0x51077c=Math[_0x845372(0x24b)]((Date['now']()-process[_0x845372(0x14f)]()*0x3e8)/0x3e8)*0x3e8;return _0x51077c;}function _0x3f99cb(_0x275b27){const _0x286524=_0x3faefc;if(process.env.OKDB_PROCESS_KILL==='off')return![];if(_0x275b27?.[_0x286524(0x118)]?.[_0x286524(0x2bd)]&&typeof _0x275b27[_0x286524(0x118)][_0x286524(0x2bd)]==='object'&&_0x275b27[_0x286524(0x118)][_0x286524(0x2bd)][_0x286524(0x209)]===![])return![];return!![];}function _0x56b357(_0x1e9a7d,_0x367863){const _0x257db4=_0x3faefc,_0xa3d395=!!_0x367863?.[_0x257db4(0x1a3)];switch(_0x1e9a7d){case _0x257db4(0x240):return{'controllable':_0xa3d395,'decommissionable':![],'killable':!![],'killConfirm':_0x257db4(0x197)};case'cli':case _0x257db4(0x26b):return{'controllable':_0xa3d395,'decommissionable':![],'killable':!![],'killConfirm':_0x257db4(0x11e)};case _0x257db4(0x1fe):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x257db4(0xea):case'queue-worker':case _0x257db4(0x1d1):case _0x257db4(0x1b7):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x257db4(0x23b)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x33776{constructor(_0xcf4b7d){const _0x4739d4=_0x3faefc;this[_0x4739d4(0x1dc)]=_0xcf4b7d,this[_0x4739d4(0xb0)]=null,this['_desired']=null,this[_0x4739d4(0x116)]=new Map(),this[_0x4739d4(0x25c)]=null,this['_isWriter']=![],this['_isReader']=![],this[_0x4739d4(0x1af)]=_0x22a38e(),this[_0x4739d4(0x1db)]=_0x1f48f5(process[_0x4739d4(0x11d)],this['_processStartedAt']),this[_0x4739d4(0x171)]=_0x5706c7[_0x4739d4(0x1cb)]()['slice'](0x0,0x8),this[_0x4739d4(0x2c1)]=_0xce4ca5(this['_selfKey'],this[_0x4739d4(0x171)]),this['_startedAt']=Date[_0x4739d4(0x24a)](),this[_0x4739d4(0x14b)]=null,this['_supervisorKey']=null,this[_0x4739d4(0x2a3)]=null,this[_0x4739d4(0x175)]=null,this[_0x4739d4(0x103)]=null,this[_0x4739d4(0xb8)]=null,this[_0x4739d4(0x159)]=0x0,this[_0x4739d4(0x245)]={},this['_children']=new Map(),this[_0x4739d4(0x164)]=process['cpuUsage'](),this['_lastCpuAt']=Date[_0x4739d4(0x24a)](),this[_0x4739d4(0x123)]=0x0,this[_0x4739d4(0x250)]=new Map();}get[_0x3faefc(0x146)](){const _0x5c85b6=_0x3faefc;return this[_0x5c85b6(0x1db)];}get[_0x3faefc(0x108)](){return this['_rowKey'];}['_caps'](_0x2314e1,_0x79c352){const _0x3d7409=_0x3faefc,_0x5ceafd=_0x56b357(_0x2314e1,_0x79c352);if(_0x5ceafd[_0x3d7409(0x1a2)]&&!_0x3f99cb(this[_0x3d7409(0x1dc)]))return{..._0x5ceafd,'killable':![],'killConfirm':undefined};return _0x5ceafd;}[_0x3faefc(0xc4)](){return!!this['_statusEnv'];}[_0x3faefc(0x239)](_0x159a0f){const _0x48b9de=_0x3faefc;Object[_0x48b9de(0x174)](this['_ownMeta'],_0x159a0f||{});}[_0x3faefc(0x202)](_0x42af4a){const _0x4474f4=_0x3faefc;if(_0x42af4a)this[_0x4474f4(0x2a3)]=_0x42af4a;}[_0x3faefc(0x262)](_0x1a280f={}){const _0x5b9902=_0x3faefc;return this[_0x5b9902(0x1dc)][_0x5b9902(0x1d5)](_0x1a280f);}[_0x3faefc(0x161)](){const _0x2ab144=_0x3faefc,_0x7bc635={};let _0x532491=0x0,_0x3c6003=0x0;const _0x50ad80=new Set();for(const _0x497b66 of this[_0x2ab144(0x2a6)]()){_0x3c6003++;const _0x25a5b7=_0x497b66['processing'];if(!_0x25a5b7)continue;if(_0x25a5b7[_0x2ab144(0x23e)])_0x532491++;for(const _0x1f3395 of _0x25a5b7[_0x2ab144(0x1a3)]||[]){if(![_0x2ab144(0x157),_0x2ab144(0x2c9)][_0x2ab144(0x1a9)](_0x1f3395[_0x2ab144(0x220)]))continue;(_0x1f3395['state']===_0x2ab144(0x1c2)||_0x1f3395[_0x2ab144(0x29d)]===_0x2ab144(0x296))&&_0x1f3395[_0x2ab144(0x143)]&&_0x50ad80[_0x2ab144(0x25e)]((_0x1f3395['env']||_0x2ab144(0x201))+':'+_0x1f3395['cursorKey']);const _0x2016dc=_0x1f3395[_0x2ab144(0x136)]||'default';(_0x7bc635[_0x2016dc]||=[])['push']({..._0x1f3395,'env':_0x2016dc,'owner':{'pid':_0x497b66[_0x2ab144(0x11d)]??null,'kind':_0x497b66[_0x2ab144(0xb9)]??null}});}}for(const [_0x5be7e5,_0x5060af]of Object['entries'](_0x7bc635)){for(const _0x10adbb of _0x5060af){if(_0x10adbb[_0x2ab144(0x220)]===_0x2ab144(0x157)&&!_0x10adbb[_0x2ab144(0x1eb)]){const _0x3a2c01=_0x5be7e5+':'+(_0x10adbb['cursorKey']??'');if(!_0x50ad80[_0x2ab144(0xab)](_0x3a2c01))_0x10adbb[_0x2ab144(0x223)]=!![];}}}return{'envs':_0x7bc635,'policy':null,'participation':{'participating':_0x532491,'total':_0x3c6003},'source':_0x2ab144(0x102)};}['processorsView'](){const _0x30953c=_0x3faefc,_0x1f629b=_0x438142=>{const _0x362f95=_0x5881;if(_0x438142[_0x362f95(0x29d)]===_0x362f95(0x1c2)||_0x438142['state']==='building'||_0x438142['state']===_0x362f95(0x277))return 0x3;if(_0x438142[_0x362f95(0x1eb)])return 0x1;return 0x2;},_0x43cf73=new Map();for(const _0x25a4e9 of this[_0x30953c(0x2a6)]()){for(const _0xec1949 of _0x25a4e9[_0x30953c(0x106)]?.[_0x30953c(0x1a3)]||[]){const _0x145aad={..._0xec1949,'owner':{'pid':_0x25a4e9['pid']??null,'kind':_0x25a4e9[_0x30953c(0xb9)]??null,'host':_0x25a4e9[_0x30953c(0xfb)]??null}},_0x1a811c=_0xec1949['mode']==='single'?_0x30953c(0x1dd)+(_0xec1949['env']??'')+'::'+(_0xec1949['cursorKey']??_0xec1949[_0x30953c(0x22e)]??_0xec1949['id']):'inst:'+(_0x25a4e9['nodeKey']??_0x25a4e9['processKey']??'')+'::'+(_0xec1949[_0x30953c(0x136)]??'')+'::'+_0xec1949['id'],_0x37e89b=_0x43cf73[_0x30953c(0xec)](_0x1a811c);if(!_0x37e89b||_0x1f629b(_0x145aad)>_0x1f629b(_0x37e89b))_0x43cf73['set'](_0x1a811c,_0x145aad);}}return[..._0x43cf73[_0x30953c(0x2e6)]()];}[_0x3faefc(0xd2)](){const _0x5aac86=_0x3faefc,_0x3546f1=Date[_0x5aac86(0x24a)](),_0x318306=this['listNodes'](),_0x33389e=_0x58cc75=>Math[_0x5aac86(0x2bc)](0x0,Math['round']((_0x3546f1-(_0x58cc75[_0x5aac86(0x1ff)]||_0x3546f1))/0x3e8)),_0x15179f=_0x318306['find'](_0x32c567=>_0x32c567[_0x5aac86(0xb9)]===_0x5aac86(0x240)),_0xf30549=_0x318306['filter'](_0x2f584d=>_0x2f584d[_0x5aac86(0xb9)]==='http-server');if(_0x15179f||_0xf30549[_0x5aac86(0x17e)])return{'primary':_0x15179f?{'pid':_0x15179f[_0x5aac86(0x11d)],'uptime':_0x33389e(_0x15179f)}:null,'workers':_0xf30549['map'](_0x51c948=>({'pid':_0x51c948[_0x5aac86(0x11d)],'uptime':_0x33389e(_0x51c948)})),'workersConfigured':_0x15179f?.[_0x5aac86(0x1a8)]?.[_0x5aac86(0x292)]??_0xf30549[_0x5aac86(0x17e)],'mode':'cluster'};const _0x3bd38f=_0x318306[_0x5aac86(0x217)](_0x184276=>_0x184276[_0x5aac86(0xb9)]===_0x5aac86(0x23a)||_0x184276['kind']===_0x5aac86(0x26b)||_0x184276[_0x5aac86(0xb9)]===_0x5aac86(0x1fe)),_0x2b4113=_0x3bd38f?{'pid':_0x3bd38f[_0x5aac86(0x11d)],'uptime':_0x33389e(_0x3bd38f)}:{'pid':process['pid'],'uptime':Math[_0x5aac86(0x2bc)](0x0,Math[_0x5aac86(0x24b)](process[_0x5aac86(0x14f)]()))};return{'primary':_0x2b4113,'workers':[_0x2b4113],'workersConfigured':0x1,'mode':_0x5aac86(0x157)};}[_0x3faefc(0x264)](){const _0x43d82b=_0x3faefc;return this[_0x43d82b(0x131)]();}['treeView'](){const _0x2699c7=_0x3faefc,_0x3ede49=new Map();for(const _0x56ecd0 of this[_0x2699c7(0x131)]())_0x3ede49[_0x2699c7(0x17a)](_0x56ecd0['processKey'],{..._0x56ecd0,'children':[]});const _0x1b6edb=[];for(const _0x43469f of _0x3ede49['values']()){const _0x2038c1=_0x43469f[_0x2699c7(0x2a5)]?_0x3ede49[_0x2699c7(0xec)](_0x43469f[_0x2699c7(0x2a5)]):null;if(_0x2038c1&&_0x2038c1!==_0x43469f)_0x2038c1[_0x2699c7(0x148)][_0x2699c7(0x1a0)](_0x43469f);else _0x1b6edb[_0x2699c7(0x1a0)](_0x43469f);}const _0x4bf7a5=(_0xae704f,_0x2df507)=>_0xae704f[_0x2699c7(0xb9)]===_0x2df507[_0x2699c7(0xb9)]?(_0xae704f[_0x2699c7(0x11d)]||0x0)-(_0x2df507['pid']||0x0):(_0xae704f[_0x2699c7(0xb9)]??'')<(_0x2df507[_0x2699c7(0xb9)]??'')?-0x1:0x1,_0x5c8af8=_0x29e8a2=>{const _0xd811ba=_0x2699c7;_0x29e8a2[_0xd811ba(0x101)](_0x4bf7a5);for(const _0xaf54e4 of _0x29e8a2)if(_0xaf54e4[_0xd811ba(0x148)][_0xd811ba(0x17e)])_0x5c8af8(_0xaf54e4[_0xd811ba(0x148)]);};return _0x5c8af8(_0x1b6edb),_0x1b6edb;}[_0x3faefc(0x282)](_0x116212){const _0x40a9df=_0x3faefc;return this[_0x40a9df(0x131)]()[_0x40a9df(0x217)](_0x1c2929=>_0x1c2929['processKey']===_0x116212)??null;}[_0x3faefc(0x131)](_0x274932=Date[_0x3faefc(0x24a)]()){const _0x2ffbb6=_0x3faefc,_0x3b85ad=new Map();for(const _0x269d9d of this['listNodes']()){const _0x31623b=_0x573832(_0x269d9d);let _0xeb2c9b=_0x3b85ad['get'](_0x31623b);!_0xeb2c9b&&(_0xeb2c9b={'processKey':_0x31623b,'nodeKey':_0x31623b,'pid':_0x269d9d[_0x2ffbb6(0x11d)],'ppid':_0x269d9d[_0x2ffbb6(0xfe)]??null,'host':_0x269d9d['host']??null,'kind':_0x269d9d[_0x2ffbb6(0xb9)],'role':null,'supervisorKey':_0x269d9d[_0x2ffbb6(0x2a5)]??null,'slot':_0x269d9d[_0x2ffbb6(0x124)]??null,'slotKey':_0x269d9d[_0x2ffbb6(0x2c4)]??null,'caps':_0x269d9d[_0x2ffbb6(0x271)]??null,'lifecycle':_0x269d9d[_0x2ffbb6(0x19e)]??null,'uptime':Math[_0x2ffbb6(0x2bc)](0x0,Math[_0x2ffbb6(0x24b)]((_0x274932-(_0x269d9d[_0x2ffbb6(0x1ff)]||_0x274932))/0x3e8)),'startedAt':_0x269d9d[_0x2ffbb6(0x1ff)]??null,'meta':_0x269d9d[_0x2ffbb6(0x1a8)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x3b85ad['set'](_0x31623b,_0xeb2c9b));_0xeb2c9b[_0x2ffbb6(0x154)][_0x2ffbb6(0x1a0)]({'instanceId':_0x269d9d[_0x2ffbb6(0xbe)]??null,'role':_0x269d9d[_0x2ffbb6(0x119)]??null,'listenAddr':_0x269d9d[_0x2ffbb6(0x22b)]??null,'lifecycle':_0x269d9d['lifecycle']??null,'processing':_0x269d9d['processing']??null});if(!_0xeb2c9b[_0x2ffbb6(0x119)]&&_0x269d9d[_0x2ffbb6(0x119)])_0xeb2c9b[_0x2ffbb6(0x119)]=_0x269d9d[_0x2ffbb6(0x119)];if(!_0xeb2c9b[_0x2ffbb6(0x22b)]&&_0x269d9d[_0x2ffbb6(0x22b)])_0xeb2c9b['listenAddr']=_0x269d9d['listenAddr'];if(!_0xeb2c9b['processing']&&_0x269d9d[_0x2ffbb6(0x106)])_0xeb2c9b[_0x2ffbb6(0x106)]=_0x269d9d[_0x2ffbb6(0x106)];if(!_0xeb2c9b[_0x2ffbb6(0x1b3)]&&_0x269d9d[_0x2ffbb6(0x1b3)])_0xeb2c9b[_0x2ffbb6(0x1b3)]=_0x269d9d[_0x2ffbb6(0x1b3)];if(!_0xeb2c9b[_0x2ffbb6(0x21a)]&&_0x269d9d[_0x2ffbb6(0x21a)])_0xeb2c9b[_0x2ffbb6(0x21a)]=_0x269d9d[_0x2ffbb6(0x21a)];if(_0xeb2c9b['caps']==null&&_0x269d9d[_0x2ffbb6(0x271)])_0xeb2c9b['caps']=_0x269d9d[_0x2ffbb6(0x271)];if(_0x269d9d[_0x2ffbb6(0x215)]&&(!_0xeb2c9b['stats']||(_0x269d9d[_0x2ffbb6(0x215)]['at']??0x0)>(_0xeb2c9b[_0x2ffbb6(0x215)]['at']??0x0)))_0xeb2c9b['stats']=_0x269d9d['stats'];}return[..._0x3b85ad[_0x2ffbb6(0x2e6)]()];}[_0x3faefc(0x19d)](){const _0x141ab6=_0x3faefc,_0x27aabf=[],_0x55bc2c={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x278066 of this[_0x141ab6(0x131)]()){_0x27aabf[_0x141ab6(0x1a0)]({'processKey':_0x278066['processKey'],'kind':_0x278066[_0x141ab6(0xb9)],'pid':_0x278066[_0x141ab6(0x11d)],'supervisorKey':_0x278066[_0x141ab6(0x2a5)],'meta':_0x278066[_0x141ab6(0x1a8)]??null,'uptime':_0x278066['uptime'],'stats':_0x278066['stats']??null}),_0x55bc2c[_0x141ab6(0x2bd)]++;if(_0x278066[_0x141ab6(0x215)]){_0x55bc2c[_0x141ab6(0xd5)]+=_0x278066[_0x141ab6(0x215)][_0x141ab6(0xd5)]||0x0,_0x55bc2c[_0x141ab6(0x1f2)]+=(_0x278066[_0x141ab6(0x215)]['heapUsed']||0x0)+(_0x278066['stats']['threads']?.['heapUsed']||0x0);const _0x2c585f=_0x278066[_0x141ab6(0x215)][_0x141ab6(0x25f)];_0x2c585f&&(_0x55bc2c[_0x141ab6(0x25f)][_0x141ab6(0x235)]+=_0x2c585f[_0x141ab6(0x235)]||0x0,_0x55bc2c[_0x141ab6(0x25f)][_0x141ab6(0x293)]+=_0x2c585f['sandbox']||0x0,_0x55bc2c['threads']['busy']+=_0x2c585f['busy']||0x0);}}return{'totals':_0x55bc2c,'nodes':_0x27aabf};}async[_0x3faefc(0x2e5)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x19eb2f=_0x3faefc;this[_0x19eb2f(0x238)]=this[_0x19eb2f(0x238)]||!!writer,this[_0x19eb2f(0x2ea)]=this[_0x19eb2f(0x2ea)]||!!reader,this[_0x19eb2f(0x14b)]=kind||this[_0x19eb2f(0x14b)]||(_0x4e3516[_0x19eb2f(0x10a)]?'http-server':_0x19eb2f(0x23a)),this[_0x19eb2f(0x113)]=supervisorKey??this[_0x19eb2f(0x113)],this[_0x19eb2f(0x2a3)]=listenAddr??this[_0x19eb2f(0x2a3)],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x19eb2f(0xb0)]){const _0x11337c=await this[_0x19eb2f(0x1dc)][_0x19eb2f(0x166)](_0xc4a0da,{'sync':![],'durability':'fast'});await _0x11337c[_0x19eb2f(0x1c3)](_0x16f04c),this['_statusEnv']=_0x11337c;}return this[_0x19eb2f(0xb0)];}[_0x3faefc(0x15d)](){const _0x9780d4=_0x3faefc;return this[_0x9780d4(0x1ca)]!==this[_0x9780d4(0xb0)]&&(this[_0x9780d4(0x1ca)]=this[_0x9780d4(0xb0)],this[_0x9780d4(0x144)]=this[_0x9780d4(0xb0)][_0x9780d4(0x2ba)](_0x16f04c)[_0x9780d4(0xb3)]),this[_0x9780d4(0x144)];}[_0x3faefc(0x1d3)](_0x4349e2){const _0x37c67e=_0x3faefc;if(_0x2e88d8)return this[_0x37c67e(0x15d)]()[_0x37c67e(0x156)](_0x4349e2[_0x37c67e(0x253)],_0x4349e2,0x1);const _0x27e034=this[_0x37c67e(0x15d)]()[_0x37c67e(0x170)](_0x4349e2[_0x37c67e(0x253)],_0x4349e2,0x1);if(_0x27e034&&typeof _0x27e034[_0x37c67e(0xda)]===_0x37c67e(0x18c))_0x27e034['then'](undefined,()=>{});return _0x27e034;}[_0x3faefc(0x1b6)](_0x25f449){const _0x1254f3=_0x3faefc;return this[_0x1254f3(0x15d)]()[_0x1254f3(0x156)](_0x25f449['nodeKey'],_0x25f449,0x1);}[_0x3faefc(0x273)](_0x276bdc){const _0x521e1e=_0x3faefc;if(_0x2e88d8)try{return this[_0x521e1e(0x15d)]()[_0x521e1e(0x20c)](_0x276bdc);}catch{return![];}const _0x31b917=this['_nodeDb']()[_0x521e1e(0x2de)](_0x276bdc);if(_0x31b917&&typeof _0x31b917['then']===_0x521e1e(0x18c))_0x31b917[_0x521e1e(0xda)](undefined,()=>{});return _0x31b917;}async[_0x3faefc(0x120)](_0x2cac4f){const _0x153eec=_0x3faefc;if(!this[_0x153eec(0xb0)]||!this[_0x153eec(0x238)]||!_0x2cac4f?.['nodeKey'])return;return this[_0x153eec(0x1d3)](_0x2cac4f);}async[_0x3faefc(0x1fb)](_0x396e97){const _0x11fddd=_0x3faefc;if(!this[_0x11fddd(0xb0)]||!this[_0x11fddd(0x238)]||!_0x396e97)return;const _0xef3489=_0x396e97[_0x11fddd(0x1a9)]('#'),_0x787e39=[];for(const {key:_0x1f7a53}of this[_0x11fddd(0xb0)][_0x11fddd(0x1c1)](_0x16f04c)){if(_0x1f7a53===_0x396e97||!_0xef3489&&typeof _0x1f7a53==='string'&&_0x1f7a53[_0x11fddd(0x218)](_0x396e97+'#'))_0x787e39[_0x11fddd(0x1a0)](_0x1f7a53);}for(const _0x2328d5 of _0x787e39){try{this['_nodeDb']()[_0x11fddd(0x20c)](_0x2328d5);}catch{}}}[_0x3faefc(0x1c0)](_0x2ecd36){const _0x206dba=_0x3faefc;if(typeof _0x2ecd36?.[_0x206dba(0x11d)]!==_0x206dba(0x2a4))return![];if(_0x2ecd36[_0x206dba(0xfb)]!==_0x5e8a97[_0x206dba(0x165)]())return![];if(_0x2ecd36[_0x206dba(0x11d)]===process[_0x206dba(0x11d)])return![];if(_0x2ecd36[_0x206dba(0x16e)]!=null&&_0x2ecd36['expiresAt']<Date[_0x206dba(0x24a)]()-_0x1e5760)return!![];try{return process[_0x206dba(0x209)](_0x2ecd36['pid'],0x0),![];}catch(_0x59750f){return _0x59750f[_0x206dba(0x2d9)]===_0x206dba(0x1de);}}[_0x3faefc(0x2a6)](){const _0x2dab70=_0x3faefc;if(!this[_0x2dab70(0xb0)])return[];try{this[_0x2dab70(0xb0)]['db']?.[_0x2dab70(0x149)]?.();}catch{}const _0x3722a7=Date['now'](),_0x46933b=_0x5e8a97[_0x2dab70(0x165)](),_0x22fad4=[];for(const {value:_0x1d378f}of this[_0x2dab70(0xb0)][_0x2dab70(0x1c1)](_0x16f04c)){if(!_0x1d378f)continue;let _0x127daa=null;_0x1d378f[_0x2dab70(0xfb)]===_0x46933b&&typeof _0x1d378f[_0x2dab70(0x11d)]===_0x2dab70(0x2a4)&&(_0x127daa=!this[_0x2dab70(0x1c0)](_0x1d378f));if(_0x127daa===![])continue;const _0x36b82d=_0x1d378f[_0x2dab70(0x16e)]==null||_0x1d378f[_0x2dab70(0x16e)]>=_0x3722a7;if(_0x127daa===!![]||_0x36b82d)_0x22fad4['push'](_0x1d378f);}return _0x22fad4;}async[_0x3faefc(0xbb)](_0x549740=0x0){const _0x2a8760=_0x3faefc;if(!this[_0x2a8760(0xb0)]||!this[_0x2a8760(0x238)])return;const _0x393a83=Date[_0x2a8760(0x24a)]()-_0x549740,_0x54e37d=new Set(),_0x301290=[],_0x306507=_0x5e8a97[_0x2a8760(0x165)](),_0x89c1a5=require$$6[_0x2a8760(0x1e5)];for(const {key:_0x2c0326,value:_0x531c1c}of this[_0x2a8760(0xb0)]['getRange'](_0x16f04c)){if(!_0x531c1c)continue;const _0x280024=_0x531c1c[_0x2a8760(0xfb)]===_0x306507&&typeof _0x531c1c[_0x2a8760(0x11d)]==='number',_0x4b3251=_0x280024?this[_0x2a8760(0x1c0)](_0x531c1c):_0x531c1c[_0x2a8760(0x16e)]!=null&&_0x531c1c[_0x2a8760(0x16e)]<_0x393a83;if(_0x4b3251)_0x301290[_0x2a8760(0x1a0)](_0x2c0326);else{_0x54e37d[_0x2a8760(0x25e)](_0x573832(_0x531c1c)??_0x2c0326);if(_0x531c1c['version']&&_0x531c1c[_0x2a8760(0x1e5)]!==_0x89c1a5){if(!this['_versionSkewWarned'])this[_0x2a8760(0x288)]=new Set();!this[_0x2a8760(0x288)][_0x2a8760(0xab)](_0x531c1c[_0x2a8760(0x1e5)])&&(this[_0x2a8760(0x288)]['add'](_0x531c1c['version']),this['okdb'][_0x2a8760(0x2cd)]?.[_0x2a8760(0x26f)]?.('process\x20'+(_0x531c1c['pid']??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x531c1c[_0x2a8760(0x1e5)]+_0x2a8760(0x176)+_0x89c1a5+_0x2a8760(0x257)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x2a8760(0x1cc)}));}}}for(const _0x21bc21 of _0x301290)this['_removeRowAsync'](_0x21bc21);if(this[_0x2a8760(0x100)]()){const _0x48d4d9=[];for(const {key:_0x3c1a62}of this['listDesired']('node')){if(!_0x54e37d[_0x2a8760(0xab)](_0x3c1a62)){if(_0x2e88d8)try{this[_0x2a8760(0x2a1)][_0x2a8760(0x20c)](_0x2a8760(0x16a)+_0x3c1a62);}catch{}else _0x48d4d9['push'](this['_desired'][_0x2a8760(0x2de)]('node/'+_0x3c1a62));}}if(_0x48d4d9[_0x2a8760(0x17e)])await Promise[_0x2a8760(0x138)](_0x48d4d9);}}[_0x3faefc(0x213)](_0x1e3773=null){const _0x55f6be=_0x3faefc;if(this[_0x55f6be(0x175)])return;if(!this['_isWriter']||!this[_0x55f6be(0xb0)]){this[_0x55f6be(0x1dc)]?.[_0x55f6be(0x2cd)]?.['warn']?.(_0x55f6be(0x1ed)+this[_0x55f6be(0x238)]+_0x55f6be(0xc0)+!!this[_0x55f6be(0xb0)]+_0x55f6be(0x244),{'feature':_0x55f6be(0x2bd)});return;}this['_onTick']=_0x1e3773,this[_0x55f6be(0x103)]=()=>this[_0x55f6be(0x265)]();for(const _0x5a8fa3 of _0x53d213)this['okdb'][_0x55f6be(0x1f9)]['on'](_0x5a8fa3,this[_0x55f6be(0x103)]);this[_0x55f6be(0x1d0)]();const _0x171b26=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x13a537;this[_0x55f6be(0x175)]=setInterval(()=>{const _0x2a3adf=_0x55f6be;if(this[_0x2a3adf(0xb8)])try{this[_0x2a3adf(0xb8)]();}catch{}this[_0x2a3adf(0x1d0)](),this[_0x2a3adf(0xbb)]()[_0x2a3adf(0x230)](()=>{});},_0x171b26);if(this[_0x55f6be(0x175)][_0x55f6be(0x13e)])this[_0x55f6be(0x175)][_0x55f6be(0x13e)]();}[_0x3faefc(0x265)](){const _0x100c77=_0x3faefc;if(!this['_isWriter']||!this['_statusEnv'])return;if(Date[_0x100c77(0x24a)]()-this[_0x100c77(0x159)]<_0x1f6e90)return;this[_0x100c77(0x1d0)]();}[_0x3faefc(0x1d0)](){const _0x19fa38=_0x3faefc;if(!this[_0x19fa38(0x238)]||!this[_0x19fa38(0xb0)])return;this[_0x19fa38(0x159)]=Date[_0x19fa38(0x24a)]();try{const _0x385e27=[this[_0x19fa38(0x133)]()];for(const _0x587bfd of this['_children'][_0x19fa38(0x2e6)]())_0x385e27[_0x19fa38(0x1a0)](this['_buildChildRow'](_0x587bfd));const _0x486889=_0x23d241['enabled']?_0x23d241[_0x19fa38(0x24a)]():0x0;for(const _0x354b8c of _0x385e27){try{this[_0x19fa38(0x1b6)](_0x354b8c),this[_0x19fa38(0x19c)]=![];}catch(_0x5a4fa4){!this[_0x19fa38(0x19c)]&&(this[_0x19fa38(0x19c)]=!![],this[_0x19fa38(0x1dc)]?.[_0x19fa38(0x2cd)]?.[_0x19fa38(0x26f)]?.(_0x19fa38(0x16d)+_0x5a4fa4[_0x19fa38(0x25d)],{'feature':_0x19fa38(0x2bd)}));}}if(_0x23d241[_0x19fa38(0xcf)])_0x23d241[_0x19fa38(0x1d2)]('registry-publish',_0x23d241[_0x19fa38(0x24a)]()-_0x486889,_0x19fa38(0xc1)+_0x385e27[_0x19fa38(0x17e)]+_0x19fa38(0x1ae));}catch(_0x24c84c){!this[_0x19fa38(0x19c)]&&(this['_publishFailWarned']=!![],this[_0x19fa38(0x1dc)]?.['log']?.[_0x19fa38(0x26f)]?.(_0x19fa38(0x16d)+_0x24c84c[_0x19fa38(0x25d)],{'feature':_0x19fa38(0x2bd)}));}}async[_0x3faefc(0x167)](){const _0x4175f6=_0x3faefc;if(this[_0x4175f6(0x103)]){for(const _0x484e6b of _0x53d213){try{this[_0x4175f6(0x1dc)][_0x4175f6(0x1f9)][_0x4175f6(0x191)](_0x484e6b,this[_0x4175f6(0x103)]);}catch{}}this['_onProcEvent']=null;}this[_0x4175f6(0x175)]&&(clearInterval(this[_0x4175f6(0x175)]),this[_0x4175f6(0x175)]=null);try{if(this['_statusEnv']&&this[_0x4175f6(0x238)])await this[_0x4175f6(0x1fb)](this[_0x4175f6(0x2c1)]);}catch{}}async[_0x3faefc(0x18e)](){const _0x4741f7=_0x3faefc;if(!this[_0x4741f7(0xb0)]||!this[_0x4741f7(0x238)])return;try{await this[_0x4741f7(0x1fb)](this[_0x4741f7(0x2c1)]);}catch{}try{const _0x5f1ea8=[];for(const {value:_0x4b00e2}of this['_statusEnv'][_0x4741f7(0x1c1)](_0x16f04c)){if(_0x4b00e2?.['ppid']===process[_0x4741f7(0x11d)]&&_0x4b00e2[_0x4741f7(0x253)])_0x5f1ea8[_0x4741f7(0x1a0)](_0x4b00e2[_0x4741f7(0x253)]);}for(const _0x27d7d8 of _0x5f1ea8){try{await this[_0x4741f7(0x1fb)](_0x27d7d8);}catch{}}}catch{}}async[_0x3faefc(0x26a)](){return this['putNode'](this['_buildOwnRow']());}async[_0x3faefc(0x2af)](_0x191c94){const _0x14f316=_0x3faefc;if(!this[_0x14f316(0xb0)]||!this[_0x14f316(0x238)])return;return this['putNode'](this[_0x14f316(0x2c5)](_0x191c94));}['_buildChildRow']({pid:_0x4fb122,startedAt:_0x3fab1a,kind:_0x50675d,supervisorKey:_0x4d1f14,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x3faefc(0xad),meta:meta=null,stats:stats=null}){const _0x1c31e3=_0x3faefc,_0x2789a2=Date[_0x1c31e3(0x24a)](),_0x4de7c6=_0x1f48f5(_0x4fb122,_0x3fab1a);return{'nodeKey':_0xce4ca5(_0x4de7c6,'0'),'processKey':_0x4de7c6,'instanceId':'0','pid':_0x4fb122,'startedAt':_0x3fab1a,'ppid':process['pid'],'host':_0x5e8a97[_0x1c31e3(0x165)](),'supervisorKey':_0x4d1f14,'slot':slot,'slotKey':slotKey,'kind':_0x50675d,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x2789a2,'expiresAt':_0x2789a2+_0x4b5ec0,'caps':this['_caps'](_0x50675d,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x3faefc(0x17f)](_0x1d801e){const _0x1cdf01=_0x3faefc;if(!_0x1d801e?.[_0x1cdf01(0x11d)])return null;const _0x2809ef=_0x1f48f5(_0x1d801e[_0x1cdf01(0x11d)],_0x1d801e[_0x1cdf01(0x1ff)]);this['_children'][_0x1cdf01(0x17a)](_0x2809ef,{..._0x1d801e,'supervisorKey':_0x1d801e[_0x1cdf01(0x2a5)]??this['_selfKey']});if(this[_0x1cdf01(0x238)])await this[_0x1cdf01(0x2af)](this[_0x1cdf01(0x252)][_0x1cdf01(0xec)](_0x2809ef))['catch']?.(()=>{});return _0x2809ef;}[_0x3faefc(0x222)](_0x1f16d7){const _0x17eaee=_0x3faefc;if(!_0x1f16d7)return;return this['_children'][_0x17eaee(0x2aa)](_0x1f16d7),this[_0x17eaee(0x1fb)](_0x1f16d7);}[_0x3faefc(0x195)](){const _0x5edaa3=_0x3faefc,_0x1b9ef4=Date[_0x5edaa3(0x24a)](),_0x122e58=process[_0x5edaa3(0x16c)](),_0x34265c=(_0x1b9ef4-this[_0x5edaa3(0x194)])*0x3e8;if(_0x34265c>=0x3d090){const _0x50edf3=_0x122e58[_0x5edaa3(0x10c)]-this[_0x5edaa3(0x164)]['user']+(_0x122e58[_0x5edaa3(0x1fd)]-this[_0x5edaa3(0x164)][_0x5edaa3(0x1fd)]),_0x4609f0=_0x5e8a97[_0x5edaa3(0x206)]()[_0x5edaa3(0x17e)]||0x1;this[_0x5edaa3(0x123)]=Math[_0x5edaa3(0x22d)](0x64,Math[_0x5edaa3(0x24b)](_0x50edf3/(_0x34265c*_0x4609f0)*0x64)),this[_0x5edaa3(0x172)]=Math[_0x5edaa3(0x24b)](_0x34265c/0x3e8),this[_0x5edaa3(0x164)]=_0x122e58,this[_0x5edaa3(0x194)]=_0x1b9ef4;}const _0x3c2ff8=process[_0x5edaa3(0xc2)](),_0x426aed=this[_0x5edaa3(0x250)]['size'];let _0x3658c4=0x0;if(_0x426aed>0x0){const _0x363840=[this[_0x5edaa3(0x1dc)],...this['okdb'][_0x5edaa3(0x139)]?.[_0x5edaa3(0x2e6)]?.()??[]];for(const _0x440f4c of _0x363840){const _0x933a99=_0x440f4c['functions']?.[_0x5edaa3(0xa6)];if(_0x933a99)_0x3658c4+=_0x933a99['liveThreadStats']['busy'];}}let _0x1a84f3=null;const _0x1873b8=_0x426aed;if(_0x1873b8>0x0){let _0x3e1da6=0x0;for(const _0x46cfd8 of this['_threadStats'][_0x5edaa3(0x2e6)]())_0x3e1da6+=_0x46cfd8[_0x5edaa3(0x1f2)]||0x0;_0x1a84f3={'count':_0x1873b8,'heapUsed':_0x3e1da6,'sandbox':_0x426aed,'busy':_0x3658c4};}return{'rss':_0x3c2ff8[_0x5edaa3(0xd5)],'heapUsed':_0x3c2ff8['heapUsed'],'heapTotal':_0x3c2ff8[_0x5edaa3(0x2dd)],'external':_0x3c2ff8[_0x5edaa3(0x189)],'cpuPct':this[_0x5edaa3(0x123)],'cpuWindowMs':this[_0x5edaa3(0x172)]??null,'threads':_0x1a84f3,'at':_0x1b9ef4};}[_0x3faefc(0x274)](_0x1e780e,_0x578c9c){const _0x4d879b=_0x3faefc;if(!_0x1e780e||!_0x578c9c)return;this[_0x4d879b(0x250)][_0x4d879b(0x17a)](_0x1e780e,_0x578c9c);}['clearThreadStats'](_0x470a10){const _0x154a19=_0x3faefc;this[_0x154a19(0x250)][_0x154a19(0x2aa)](_0x470a10);}[_0x3faefc(0x117)](_0x4230e1,_0x407371,_0xa7266c=undefined){const _0x456c20=_0x3faefc,_0x23171c=this['_children']['get'](_0x4230e1);if(!_0x23171c||!_0x407371)return;if(_0xa7266c!==undefined)_0x23171c[_0x456c20(0x106)]=_0xa7266c;_0x23171c[_0x456c20(0x215)]={'rss':_0x407371[_0x456c20(0xd5)]??null,'heapUsed':_0x407371[_0x456c20(0x1f2)]??null,'heapTotal':_0x407371[_0x456c20(0x2dd)]??null,'external':_0x407371['external']??null,'cpuPct':_0x407371[_0x456c20(0x294)]??null,'cpuWindowMs':_0x407371['cpuWindowMs']??null,'threads':_0x407371[_0x456c20(0x25f)]??null,'claims':_0x407371[_0x456c20(0x1e7)]??null,'envsOpen':_0x407371[_0x456c20(0x260)]??null,'at':Date[_0x456c20(0x24a)]()};}[_0x3faefc(0x133)](){const _0x4321a0=_0x3faefc,_0x209d09=Date[_0x4321a0(0x24a)](),_0x2da84d=this[_0x4321a0(0x1dc)][_0x4321a0(0x2b8)]||{},_0x3a6b4b=this[_0x4321a0(0x14b)]||_0x4321a0(0x23a);return{'nodeKey':this['_rowKey'],'processKey':this[_0x4321a0(0x1db)],'instanceId':this[_0x4321a0(0x171)],'pid':process[_0x4321a0(0x11d)],'startedAt':this[_0x4321a0(0x1af)],'instanceStartedAt':this[_0x4321a0(0x15b)],'ppid':typeof process[_0x4321a0(0xfe)]==='number'?process[_0x4321a0(0xfe)]:null,'host':_0x5e8a97[_0x4321a0(0x165)](),'supervisorKey':this[_0x4321a0(0x113)]??null,'version':require$$6['version'],'kind':_0x3a6b4b,'role':{'engines':!!_0x2da84d['engines'],'processors':!!_0x2da84d[_0x4321a0(0x1a3)],'compaction':_0x2da84d[_0x4321a0(0x12b)],'http':_0x2da84d[_0x4321a0(0x27f)]},'listenAddr':this[_0x4321a0(0x2a3)]??null,'heartbeatAt':_0x209d09,'expiresAt':_0x209d09+_0x4b5ec0,'caps':this['_caps'](_0x3a6b4b,_0x2da84d),'lifecycle':{'state':_0x4321a0(0xad),'desiredVersionApplied':null},'meta':{...this[_0x4321a0(0x245)]},'processing':_0x2da84d[_0x4321a0(0x1a3)]?this['_buildProcessingFacet']():null,'engines':_0x2da84d['engines']?[...this[_0x4321a0(0x1dc)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x4321a0(0x14c)](),'stats':this[_0x4321a0(0x195)](),'writers':this[_0x4321a0(0x141)]()};}[_0x3faefc(0x141)](){const _0x1ff821=_0x3faefc,_0x53a88c={};try{for(const [_0x24e82b,_0x45bfaf]of this[_0x1ff821(0x1dc)][_0x1ff821(0x139)]){try{const _0x4f1b4c=_0x45bfaf[_0x1ff821(0x259)]?.();if(!_0x4f1b4c)continue;if(!_0x4f1b4c['depth']&&!_0x4f1b4c['committed']&&!(_0x4f1b4c[_0x1ff821(0x1c4)]??0x0)&&!_0x4f1b4c['draining'])continue;_0x53a88c[_0x24e82b]={'depth':_0x4f1b4c[_0x1ff821(0xcc)],'oldestPendingMs':_0x4f1b4c[_0x1ff821(0x163)],'committed':_0x4f1b4c[_0x1ff821(0x121)],'commitsPerSec':_0x4f1b4c['commitsPerSec'],'commitP99Ms':_0x4f1b4c[_0x1ff821(0x226)],'parkedNow':_0x4f1b4c['parkedNow']??0x0,'draining':!!_0x4f1b4c['draining']};}catch{}}}catch{}return Object[_0x1ff821(0x114)](_0x53a88c)[_0x1ff821(0x17e)]?_0x53a88c:null;}['_collectSingletonClaims'](){const _0x46ce49=_0x3faefc,_0x274089=process['pid'],_0x2802cf=Date[_0x46ce49(0x24a)](),_0x55575b=_0x5db560=>{const _0x4c3109=_0x46ce49;if(!_0x5db560)return[];const _0x15f935=[];try{for(const {id:_0x329816,entry:_0x429518}of _0x5db560[_0x4c3109(0x1b4)]()){if(_0x429518?.[_0x4c3109(0x27b)]?.[_0x4c3109(0x11d)]!==_0x274089)continue;const _0x427a76=_0x429518[_0x4c3109(0xc7)]??_0x429518[_0x4c3109(0x187)]??0x0;if(_0x427a76+(_0x429518[_0x4c3109(0x1bd)]??0x0)<_0x2802cf)continue;_0x15f935[_0x4c3109(0x1a0)](_0x329816);}}catch{}return _0x15f935;},_0x361097=_0x55575b(this[_0x46ce49(0x236)](_0x46ce49(0x1e2))),_0x25d3c8=_0x55575b(this[_0x46ce49(0x236)](_0x46ce49(0x1d6)));if(!_0x361097[_0x46ce49(0x17e)]&&!_0x25d3c8[_0x46ce49(0x17e)])return null;return{'compact':_0x361097,'replicate':_0x25d3c8};}[_0x3faefc(0x236)](_0x398ee6){const _0xad6f41=_0x3faefc;if(!this[_0xad6f41(0x1dc)]?.[_0xad6f41(0xac)])return null;if(!this[_0xad6f41(0x20f)])this[_0xad6f41(0x20f)]=new Map();let _0x1b983d=this[_0xad6f41(0x20f)][_0xad6f41(0xec)](_0x398ee6);if(!_0x1b983d)try{_0x1b983d=new _0x30fdf7(this['okdb'][_0xad6f41(0xac)],{'namespace':_0x398ee6}),this[_0xad6f41(0x20f)]['set'](_0x398ee6,_0x1b983d);}catch{return null;}return _0x1b983d;}['_buildProcessingFacet'](){const _0x34c6b3=_0x3faefc,_0x2f9269=[];try{for(const [_0x35c41b,_0x1dd3d5]of this['okdb'][_0x34c6b3(0x139)]){if(_0x35c41b['startsWith']('~'))continue;for(const _0x2fd2be of _0x1dd3d5[_0x34c6b3(0x207)]['tierList']())_0x2f9269['push']({..._0x2fd2be,'env':_0x35c41b});}}catch{}return{'participate':this[_0x34c6b3(0x1dc)][_0x34c6b3(0x1a3)]?.[_0x34c6b3(0x2bf)]??![],'processors':_0x2f9269};}['_ensureDesired'](){const _0x5d3e8d=_0x3faefc;if(this['_desired'])return!![];const _0x3cc796=this['okdb']['_rootDb'];if(!_0x3cc796)return![];return this['_desired']=_0x3cc796[_0x5d3e8d(0x254)](_0x1f78d9,{'dupSort':![]}),this['_cmd']=_0x3cc796['openDB'](_0x1b0b76,{'dupSort':![]}),!![];}async[_0x3faefc(0x20a)](){const _0x5e6973=_0x3faefc;if(!this[_0x5e6973(0x100)]())return;const _0x41a4f1=_0x5e6973(0x27e),_0x10783f=0x1,_0xf8a63a=this[_0x5e6973(0x2a1)][_0x5e6973(0xec)](_0x41a4f1)??0x0;if(_0xf8a63a>=_0x10783f)return;const _0x12ccec=_0x445a54=>{const _0x242788=_0x5e6973;if(_0x445a54===_0x242788(0x1b7))return _0x242788(0x157);if(_0x445a54===_0x242788(0x2e2))return _0x242788(0x2c9);return _0x445a54;};await this[_0x5e6973(0x1dc)]['_systemEnv']['_writer'][_0x5e6973(0x285)](()=>{const _0x38d50a=_0x5e6973;for(const _0x22cb9f of['procmode/',_0x38d50a(0x1b1)]){for(const {key:_0x405e44,value:_0x725421}of this[_0x38d50a(0x2a1)][_0x38d50a(0x1c1)]({'start':_0x22cb9f,'end':_0x22cb9f+'\xff'})){if(typeof _0x405e44!==_0x38d50a(0xa8)||!_0x405e44[_0x38d50a(0x218)](_0x22cb9f))break;const _0x5d70e9=_0x12ccec(_0x725421[_0x38d50a(0x220)]);if(_0x5d70e9!==_0x725421[_0x38d50a(0x220)])this[_0x38d50a(0x2a1)]['put'](_0x405e44,{..._0x725421,'mode':_0x5d70e9});}}this[_0x38d50a(0x2a1)][_0x38d50a(0x170)](_0x41a4f1,_0x10783f);});}[_0x3faefc(0x14a)](){const _0x261091=_0x3faefc;return!!this[_0x261091(0x2a1)];}[_0x3faefc(0x13c)](_0x431c4c,_0x5ca9a8){const _0x19943c=_0x3faefc;if(!this[_0x19943c(0x100)]())return null;const _0x59e1d1=_0x431c4c+'/'+_0x5ca9a8;return this['_refreshDesiredSnapshot'](),this[_0x19943c(0x116)][_0x19943c(0xec)](_0x59e1d1)??this[_0x19943c(0x2a1)][_0x19943c(0xec)](_0x59e1d1)??null;}['_refreshDesiredSnapshot'](){const _0x13ae6a=_0x3faefc;if(!_0x2e88d8)return;try{this[_0x13ae6a(0x1dc)]['_systemEnv']?.['db']?.[_0x13ae6a(0x149)]?.();}catch{}}async[_0x3faefc(0x2a2)](_0x302035,_0x25fe9d,_0x33521f){const _0x45c32c=_0x3faefc;if(!this[_0x45c32c(0x100)]())return null;const _0x4caa2c=_0x302035+'/'+_0x25fe9d;this[_0x45c32c(0x229)]();const _0x406658=this[_0x45c32c(0x116)][_0x45c32c(0xec)](_0x4caa2c)??this['_desired']['get'](_0x4caa2c)??{'version':0x0},_0x497acc=(_0x406658['version']||0x0)+0x1,_0x4e2356={..._0x406658,..._0x33521f,'version':_0x497acc,'updatedAt':Date[_0x45c32c(0x24a)]()};this[_0x45c32c(0x116)][_0x45c32c(0x17a)](_0x4caa2c,_0x4e2356);try{await this['okdb'][_0x45c32c(0x23d)][_0x45c32c(0x2da)][_0x45c32c(0x285)](()=>{const _0x1a5712=_0x45c32c;this[_0x1a5712(0x2a1)][_0x1a5712(0x170)](_0x4caa2c,_0x4e2356);});}finally{if(this[_0x45c32c(0x116)][_0x45c32c(0xec)](_0x4caa2c)===_0x4e2356)this['_desiredOverlay'][_0x45c32c(0x2aa)](_0x4caa2c);}return _0x497acc;}['listDesired'](_0x407b62){const _0x10d8c2=_0x3faefc;if(!this[_0x10d8c2(0x100)]())return[];this['_refreshDesiredSnapshot']();const _0x5550b4=_0x407b62+'/',_0x57d5e8=[];for(const {key:_0x8e1a6a,value:_0x18ba1e}of this['_desired'][_0x10d8c2(0x1c1)]({'start':_0x5550b4,'end':_0x5550b4+'\xff'})){if(typeof _0x8e1a6a!==_0x10d8c2(0xa8)||!_0x8e1a6a[_0x10d8c2(0x218)](_0x5550b4))break;_0x57d5e8[_0x10d8c2(0x1a0)]({'key':_0x8e1a6a[_0x10d8c2(0x272)](_0x5550b4[_0x10d8c2(0x17e)]),'value':_0x18ba1e});}return _0x57d5e8;}[_0x3faefc(0x183)](_0x36e79d){const _0x3fb7c3=_0x3faefc;if(!this[_0x3fb7c3(0x100)]())return null;return this[_0x3fb7c3(0x25c)]['get'](_0x36e79d)??null;}async[_0x3faefc(0x179)](_0x6c74c5,_0x1a4281,_0x527e82={}){const _0x1f8387=_0x3faefc;if(!this[_0x1f8387(0x100)]())return null;let _0xf8be6b;return await this[_0x1f8387(0x1dc)]['_systemEnv'][_0x1f8387(0x2da)]['transaction'](()=>{const _0x2088b9=_0x1f8387,_0xbd9f5b=this[_0x2088b9(0x25c)][_0x2088b9(0xec)](_0x6c74c5)||{'epoch':0x0};_0xf8be6b=(_0xbd9f5b[_0x2088b9(0x2d1)]||0x0)+0x1,this[_0x2088b9(0x25c)]['put'](_0x6c74c5,{..._0xbd9f5b,..._0x527e82,'cmd':_0x1a4281,'epoch':_0xf8be6b,'updatedAt':Date['now']()});}),_0xf8be6b;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x33776,'nodeKey':_0x1f48f5,'logicalKey':_0x394355,'slotKey':_0x2204da,'PROCESS_ENV':_0xc4a0da,'NODE_TYPE':_0x16f04c},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x537b61=_0x5e06fa;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x34ee6e=require$$0$4,{clampTimerDelay:_0x5395c8}=requireOkdbTimers(),{EVENTS:_0x10e255,CHANGE_ACTIONS:_0x491d12}=requireOkdbEnums(),{LOOP:_0x5365a8}=requireOkdbLoopMonitor(),_0x303d82=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x54c1bc=0x5,_0x212568=0x2710;class _0x40a8d4 extends _0x34ee6e{constructor(_0x437429,_0xc3a46c={}){const _0x1355b2=_0x5881;super(),this[_0x1355b2(0x1dc)]=_0x437429,this[_0x1355b2(0x1e9)]=_0xc3a46c[_0x1355b2(0x132)]??_0x303d82,this[_0x1355b2(0xdf)]=_0xc3a46c[_0x1355b2(0x147)]??_0x54c1bc,this[_0x1355b2(0x2e8)]=_0xc3a46c[_0x1355b2(0x29f)]??_0x212568,this['_started']=![],this[_0x1355b2(0x1b5)]=new Map(),this[_0x1355b2(0x169)]=new Map(),this['_pending']=new Map(),this[_0x1355b2(0x199)]=null,this['_draining']=![],this[_0x1355b2(0x2cc)]=new Set(),this[_0x1355b2(0x2b0)]=new Set(),this['_onItem']=_0x300f7c=>this[_0x1355b2(0x107)](_0x300f7c),this['_onPending']=_0x4edf60=>this[_0x1355b2(0x10f)](_0x4edf60),this[_0x1355b2(0xe7)]=_0x5b8a25=>this['_handlePoke'](_0x5b8a25),this['_onStop']=()=>this[_0x1355b2(0x2d6)]();}[_0x537b61(0x177)](){const _0x25b8dd=_0x537b61;if(this[_0x25b8dd(0x2e1)])return;this[_0x25b8dd(0x2e1)]=!![];for(const [_0x3e9665,_0x2c972b]of this[_0x25b8dd(0x1dc)][_0x25b8dd(0x139)]){if(_0x3e9665[_0x25b8dd(0x218)]('~'))continue;try{_0x2c972b[_0x25b8dd(0x1e3)]();}catch{}}for(const [_0x1cb73d,_0x5e47f1]of this[_0x25b8dd(0x1dc)][_0x25b8dd(0x139)]){if(_0x1cb73d[_0x25b8dd(0x218)]('~'))continue;try{this['_baselines'][_0x25b8dd(0x17a)](_0x1cb73d,_0x5e47f1[_0x25b8dd(0x2ad)]()||0x0);}catch{}}const {events:_0x238be7}=this[_0x25b8dd(0x1dc)];_0x238be7['on'](_0x10e255[_0x25b8dd(0x1cd)],this[_0x25b8dd(0x1c5)]),_0x238be7['on'](_0x10e255[_0x25b8dd(0x2dc)],this[_0x25b8dd(0x24d)]),_0x238be7['on'](_0x10e255[_0x25b8dd(0x284)],this[_0x25b8dd(0x24d)]),_0x238be7['on'](_0x10e255[_0x25b8dd(0x280)],this['_onItem']),_0x238be7['on'](_0x10e255[_0x25b8dd(0x1a5)],this[_0x25b8dd(0xe7)]),_0x238be7[_0x25b8dd(0x1a6)](_0x10e255[_0x25b8dd(0x1e0)],this[_0x25b8dd(0x12f)]);}[_0x537b61(0x2d6)](){const _0x14e790=_0x537b61;if(!this[_0x14e790(0x2e1)])return;this['_started']=![];const {events:_0x386ae3}=this[_0x14e790(0x1dc)];_0x386ae3['off'](_0x10e255['ITEM_PENDING'],this['_onPending']),_0x386ae3[_0x14e790(0x191)](_0x10e255['ITEM_CREATE'],this['_onItem']),_0x386ae3['off'](_0x10e255['ITEM_UPDATE'],this[_0x14e790(0x24d)]),_0x386ae3[_0x14e790(0x191)](_0x10e255[_0x14e790(0x280)],this[_0x14e790(0x24d)]),_0x386ae3[_0x14e790(0x191)](_0x10e255['SYSTEM_POKE'],this['_onPoke']);try{_0x386ae3[_0x14e790(0x191)](_0x10e255[_0x14e790(0x1e0)],this[_0x14e790(0x12f)]);}catch{}this[_0x14e790(0x199)]&&(clearTimeout(this[_0x14e790(0x199)]),this[_0x14e790(0x199)]=null),this[_0x14e790(0xb1)]['clear'](),this[_0x14e790(0x1b5)][_0x14e790(0xe3)](),this['_baselines'][_0x14e790(0xe3)](),this['_seen'][_0x14e790(0xe3)](),this[_0x14e790(0x2b0)]['clear']();}[_0x537b61(0x112)](_0x5570c5,_0x20fdf6,_0x3bcb30,_0x2f19bf){return _0x5570c5+'\x00'+_0x20fdf6+'\x00'+_0x3bcb30+'\x00'+_0x2f19bf;}[_0x537b61(0x212)](_0x57d2b3,_0x276cb3,_0x1cfce2,_0x58644c){const _0x2d264a=_0x537b61,_0x28a1d9=this[_0x2d264a(0x112)](_0x57d2b3,_0x276cb3,_0x1cfce2,_0x58644c);if(this[_0x2d264a(0x2cc)][_0x2d264a(0xab)](_0x28a1d9))return![];this[_0x2d264a(0x2cc)][_0x2d264a(0x25e)](_0x28a1d9);if(this['_seen'][_0x2d264a(0x2e3)]>this[_0x2d264a(0x2e8)]){const _0x1e052b=this['_seen'][_0x2d264a(0x2e6)]()[_0x2d264a(0x2bb)]()[_0x2d264a(0x248)];this[_0x2d264a(0x2cc)]['delete'](_0x1e052b);}return!![];}[_0x537b61(0x10f)](_0x65f5f5){const _0xb81209=_0x537b61;if(!this[_0xb81209(0x2e1)]||!_0x65f5f5)return;const {env:_0x300732,type:_0x26f062,key:_0x22e0c5,clock:_0xa9e774}=_0x65f5f5;if(_0x300732==null||_0x26f062==null||_0x22e0c5==null)return;if(typeof _0x300732===_0xb81209(0xa8)&&_0x300732[_0xb81209(0x218)]('~'))return;if(typeof _0x26f062==='string'&&_0x26f062[_0xb81209(0x218)]('~'))return;this[_0xb81209(0x2b0)]['add'](this['_dedupeKey'](_0x300732,_0x26f062,_0x22e0c5,_0xa9e774)),this[_0xb81209(0x2b0)][_0xb81209(0x2e3)]>this[_0xb81209(0x2e8)]&&this[_0xb81209(0x2b0)]['delete'](this['_pendingLocal']['values']()[_0xb81209(0x2bb)]()[_0xb81209(0x248)]);}['_handleInProcess'](_0x40ef4a){const _0x56f217=_0x537b61;if(!this[_0x56f217(0x2e1)]||!_0x40ef4a)return;const {env:_0x44f217,type:_0x293ab6,key:_0x47a12f,clock:_0x2d09ea,origin:_0x4314c3,action:_0x162925,newValue:_0x1ee018,oldValue:_0x3dcedd}=_0x40ef4a;if(_0x44f217==null||_0x293ab6==null||_0x47a12f==null)return;if(typeof _0x44f217===_0x56f217(0xa8)&&_0x44f217[_0x56f217(0x218)]('~'))return;if(typeof _0x293ab6===_0x56f217(0xa8)&&_0x293ab6[_0x56f217(0x218)]('~'))return;this['_pendingLocal'][_0x56f217(0x2aa)](this[_0x56f217(0x112)](_0x44f217,_0x293ab6,_0x47a12f,_0x2d09ea));if(!this[_0x56f217(0x212)](_0x44f217,_0x293ab6,_0x47a12f,_0x2d09ea))return;const _0x53faa1=_0x162925===_0x491d12['REMOVE']?'remove':_0x56f217(0x170);this[_0x56f217(0x126)](_0x56f217(0xde),{'env':_0x44f217,'type':_0x293ab6,'key':_0x47a12f,'op':_0x53faa1,'clock':_0x2d09ea,'origin':_0x4314c3,'value':_0x53faa1===_0x56f217(0x2de)?null:_0x1ee018,'prevValue':_0x3dcedd});}[_0x537b61(0x1ad)](_0x183d3a){const _0x9af8eb=_0x537b61;if(!this['_started'])return;if(!_0x183d3a||typeof _0x183d3a['env']!=='string'||typeof _0x183d3a['type']!==_0x9af8eb(0xa8))return;const {env:_0x2b09d4,type:_0x8837cc}=_0x183d3a;if(_0x2b09d4[_0x9af8eb(0x218)]('~')||_0x8837cc[_0x9af8eb(0x218)]('~'))return;this[_0x9af8eb(0xb1)][_0x9af8eb(0x17a)](_0x2b09d4+'\x00'+_0x8837cc,{'env':_0x2b09d4,'type':_0x8837cc}),this[_0x9af8eb(0xf1)]();}[_0x537b61(0xf1)](){const _0x48afdc=_0x537b61;if(this[_0x48afdc(0x199)])return;const _0x510515=()=>{const _0xc50e06=_0x48afdc;this[_0xc50e06(0x199)]=null,this[_0xc50e06(0x2b7)]()[_0xc50e06(0x230)](()=>{});};this[_0x48afdc(0x199)]=setTimeout(_0x510515,_0x5395c8(this[_0x48afdc(0xdf)]));}async[_0x537b61(0x2b7)](){const _0x269ad4=_0x537b61;if(this[_0x269ad4(0x127)]){this[_0x269ad4(0xf1)]();return;}this[_0x269ad4(0x127)]=!![];try{const _0xf370eb=[...this[_0x269ad4(0xb1)][_0x269ad4(0x2e6)]()];this['_pending'][_0x269ad4(0xe3)]();let _0xea247d=![];for(const {env:_0x23c80a,type:_0x43e4c4}of _0xf370eb){try{const _0x4bc5df=await this[_0x269ad4(0x2ce)](_0x23c80a,_0x43e4c4);if(_0x4bc5df)_0xea247d=!![];}catch{this[_0x269ad4(0xb1)][_0x269ad4(0x17a)](_0x23c80a+'\x00'+_0x43e4c4,{'env':_0x23c80a,'type':_0x43e4c4}),_0xea247d=!![];}}if(_0xea247d||this[_0x269ad4(0xb1)][_0x269ad4(0x2e3)]>0x0)this['_scheduleFlush']();}finally{this[_0x269ad4(0x127)]=![];}}async[_0x537b61(0x2ce)](_0x273162,_0x142567){const _0x15803a=_0x537b61,_0x42f0a0=await this[_0x15803a(0x1dc)][_0x15803a(0x21d)](_0x273162),_0x1b2ff9=_0x273162+'\x00'+_0x142567;!this['_cursors'][_0x15803a(0xab)](_0x1b2ff9)&&(!this[_0x15803a(0x169)][_0x15803a(0xab)](_0x273162)&&(_0x42f0a0[_0x15803a(0x1e3)](),this[_0x15803a(0x169)][_0x15803a(0x17a)](_0x273162,_0x42f0a0[_0x15803a(0x2ad)]()||0x0)),this[_0x15803a(0x1b5)][_0x15803a(0x17a)](_0x1b2ff9,this['_baselines']['get'](_0x273162)));const _0x26912d=this[_0x15803a(0x1b5)][_0x15803a(0xec)](_0x1b2ff9),_0x2ce4ad=_0x42f0a0[_0x15803a(0x2ad)](_0x142567)||0x0;if(_0x2ce4ad<=_0x26912d)return![];const _0x26bbe5=_0x26912d+this['_quantum'],_0x273dfa=Math['min'](_0x2ce4ad,_0x26bbe5),_0x1f53cf=_0x5365a8[_0x15803a(0xcf)]?_0x5365a8[_0x15803a(0x24a)]():0x0,_0x59fada=Array['from'](_0x42f0a0[_0x15803a(0x153)](_0x142567,_0x26912d+0x1,_0x273dfa));let _0x85399=_0x26912d;for(const _0x8664de of _0x59fada){const {clock:_0x33ad36,key:_0x34add1,action:_0x58498f,origin:_0x130f8d}=_0x8664de;if(_0x33ad36>_0x85399)_0x85399=_0x33ad36;if(_0x34add1==null)continue;if(this['_pendingLocal'][_0x15803a(0xab)](this[_0x15803a(0x112)](_0x273162,_0x142567,_0x34add1,_0x33ad36)))continue;if(!this[_0x15803a(0x212)](_0x273162,_0x142567,_0x34add1,_0x33ad36))continue;let _0x34fed5,_0xf62f5;if(_0x58498f===_0x491d12[_0x15803a(0x20e)])_0x34fed5='remove',_0xf62f5=null;else{const _0x160a92=_0x42f0a0[_0x15803a(0xec)](_0x142567,_0x34add1);_0x160a92==null?(_0x34fed5='remove',_0xf62f5=null):(_0x34fed5=_0x15803a(0x170),_0xf62f5=_0x160a92);}this[_0x15803a(0x126)](_0x15803a(0xde),{'env':_0x273162,'type':_0x142567,'key':_0x34add1,'op':_0x34fed5,'clock':_0x33ad36,'origin':_0x130f8d,'value':_0xf62f5});}if(_0x5365a8[_0x15803a(0xcf)])_0x5365a8[_0x15803a(0x1d2)](_0x15803a(0x258)+_0x273162+':'+_0x142567,_0x5365a8[_0x15803a(0x24a)]()-_0x1f53cf,'n='+_0x59fada[_0x15803a(0x17e)]);return this[_0x15803a(0x1b5)][_0x15803a(0x17a)](_0x1b2ff9,Math[_0x15803a(0x2bc)](_0x85399,_0x273dfa)),_0x42f0a0[_0x15803a(0x2ad)](_0x142567)>_0x273dfa;}[_0x537b61(0x2cf)](){const _0x43de51=_0x537b61;return{'started':this['_started'],'quantum':this['_quantum'],'flushDebounce':this[_0x43de51(0xdf)],'cursors':Object['fromEntries']([...this[_0x43de51(0x1b5)][_0x43de51(0x24c)]()][_0x43de51(0x173)](([_0x49102a,_0x400d3c])=>[_0x49102a[_0x43de51(0x193)]('\x00',':'),_0x400d3c])),'pending':this['_pending'][_0x43de51(0x2e3)],'seen':this[_0x43de51(0x2cc)]['size']};}}return _0x40a8d4['CHANGEFEED_QUANTUM']=_0x303d82,okdbChangefeed={'OKDBChangefeed':_0x40a8d4},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3c1326=_0x5e06fa;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x4107ac=require$$1$1,_0x2f3343=require$$1,{EVENTS:_0x10044b}=requireOkdbEnums(),_0x623a23=require$$0$3,{slotKey:_0x3b112d}=requireOkdbProcessRegistry(),_0x298871=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x112ca3=0xfa0,_0x2ba25e=0x5,_0x11cbb8=0x2710,_0x23daec=0xbb8,_0x43acc7=0x7d0,_0xa47e1c=_0x3c1326(0x26d),_0x9715ae=_0x3c1326(0x135),_0x2e3060=_0x3c1326(0x2cd),_0x477b24=_0x3c1326(0x215),_0xf34cfb=[_0x10044b['VIEW_PROGRESS'],_0x10044b[_0x3c1326(0x198)],_0x10044b['FTS_DROP'],_0x10044b[_0x3c1326(0x1ee)],_0x10044b[_0x3c1326(0xe4)],_0x10044b[_0x3c1326(0x204)],_0x10044b[_0x3c1326(0x261)],_0x10044b[_0x3c1326(0x243)],'processor:ready','processor:progress',_0x3c1326(0x23f),_0x3c1326(0xc8),_0x3c1326(0x221),_0x3c1326(0x1da)],_0x4632dd=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x5375e1=0x64;function _0x259dbf(_0x37dcea){const _0x2474a2=_0x3c1326;if(!_0x37dcea)return _0x2474a2(0x298);const _0x24576a=(_0x37dcea[_0x2474a2(0x1a3)]||[])['map'](_0x2bd169=>[_0x2bd169[_0x2474a2(0x136)],_0x2bd169['id'],_0x2bd169[_0x2474a2(0x220)],_0x2bd169[_0x2474a2(0x29d)],!!_0x2bd169['paused'],!!_0x2bd169[_0x2474a2(0x223)],!!_0x2bd169[_0x2474a2(0x1eb)],_0x2bd169[_0x2474a2(0x291)]?.['pid']??null,_0x2bd169[_0x2474a2(0x277)]?String(_0x2bd169[_0x2474a2(0x277)]?.[_0x2474a2(0x25d)]??_0x2bd169[_0x2474a2(0x277)]):null]);return JSON[_0x2474a2(0xd8)]([!!_0x37dcea[_0x2474a2(0x23e)],_0x24576a]);}function _0x40dc2f({workers:_0x5a06ae,makeOkdb:_0x410ca6,port:_0x36c3c4,primaryOkdb:_0x551112,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x1c2358=_0x3c1326;if(_0x4107ac[_0x1c2358(0x281)])return childEntry&&_0x4107ac[_0x1c2358(0xd3)]({'exec':_0x2f3343[_0x1c2358(0x20d)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0xbb9685=_0x1c2358,_0x29d39a=[];for(let _0x5b1915=0x0;_0x5b1915<process[_0xbb9685(0x11f)][_0xbb9685(0x17e)];_0x5b1915++){const _0x9f0363=process[_0xbb9685(0x11f)][_0x5b1915];if(_0x9f0363[_0xbb9685(0x218)](_0xbb9685(0x13f))||_0x9f0363['startsWith'](_0xbb9685(0x1bc))||_0x9f0363[_0xbb9685(0x218)]('--inspect'))continue;if(_0x9f0363==='-e'||_0x9f0363===_0xbb9685(0x190)||_0x9f0363==='-p'||_0x9f0363===_0xbb9685(0xeb)){_0x5b1915++;continue;}_0x29d39a[_0xbb9685(0x1a0)](_0x9f0363);}return _0x29d39a;})())}),_0x7308f3({'workers':_0x5a06ae,'port':_0x36c3c4,'primaryOkdb':_0x551112,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x36c3c4});return _0x49ca77({'makeOkdb':_0x410ca6,'port':_0x36c3c4});}function _0x7308f3({workers:_0xfd60e9,port:_0x3eae0a,primaryOkdb:_0x4720a9,workerEnv:_0x1671e1,workerRole:_0x5e3bde,listenAddr:_0x1617d5}){const _0xf4cfb0=_0x3c1326,_0x1211c1=new Map(),_0x2524f7=new Map();let _0x3fe2c6=![];const _0x50acb4=_0x1d64d5=>_0x1d64d5?.[_0xf4cfb0(0x2c7)],_0x583836=_0x4bbc79=>{const _0x12fdc1=_0xf4cfb0,_0x314621=_0x4107ac[_0x12fdc1(0x234)]({...process.env,..._0x1671e1||{},'OKDB_CLUSTER_SLOT':String(_0x4bbc79)});return _0x314621[_0x12fdc1(0x2c7)]=_0x4bbc79,_0x1211c1[_0x12fdc1(0x17a)](_0x314621[_0x12fdc1(0x13a)]['pid'],{'worker':_0x314621,'startedAt':Date[_0x12fdc1(0x24a)](),'slot':_0x4bbc79}),_0x314621['on'](_0x12fdc1(0x277),_0xb8f408=>{const _0x383e19=_0x12fdc1;console[_0x383e19(0x2cd)](_0x383e19(0x28d)+_0x314621[_0x383e19(0x13a)][_0x383e19(0x11d)]+_0x383e19(0xff)+(_0xb8f408?.[_0x383e19(0x25d)]??_0xb8f408));}),_0x314621['on'](_0x12fdc1(0x1c2),()=>_0x2f5b63()),_0x314621;},_0x1f46ca=_0x2ba09c=>{const _0x56a4=_0xf4cfb0;for(const {worker:_0x21ecef}of _0x1211c1[_0x56a4(0x2e6)]()){if(_0x21ecef[_0x56a4(0x267)]()||!_0x21ecef[_0x56a4(0x18f)]())continue;try{_0x21ecef['send'](_0x2ba09c);}catch{}}};_0x4720a9?.['_activateProcesses']?.({'kind':_0xf4cfb0(0x240),'listenAddr':_0x1617d5})[_0xf4cfb0(0x230)](()=>{}),_0x4720a9?.['processes']?.[_0xf4cfb0(0x239)]?.({'workersConfigured':_0xfd60e9});const _0x333b8f={'engines':!![],'processors':!![],'compaction':!![],..._0x5e3bde,'http':!![]},_0x2f5b63=()=>{const _0x48a4ac=_0xf4cfb0,_0x12d3e4=_0x4720a9?.[_0x48a4ac(0x2bd)];if(!_0x12d3e4||!_0x12d3e4[_0x48a4ac(0x238)])return;const _0xe25ed=_0x12d3e4[_0x48a4ac(0x146)];for(const {worker:_0x59296f,startedAt:_0x281bf5,slot:_0x2a5d80,stats:_0x4d0e32,processing:_0xc10360}of _0x1211c1[_0x48a4ac(0x2e6)]()){if(_0x59296f['isDead']())continue;const _0x179d31=_0x12d3e4[_0x48a4ac(0x14a)]?.()&&_0x12d3e4['getDesired'](_0x48a4ac(0x124),_0x4dd95a(_0x2a5d80))?.['decommission']===!![];_0x12d3e4['publishChildRow']({'pid':_0x59296f[_0x48a4ac(0x13a)][_0x48a4ac(0x11d)],'startedAt':_0x281bf5,'kind':_0x48a4ac(0xea),'supervisorKey':_0xe25ed,'slot':_0x2a5d80,'slotKey':_0x4dd95a(_0x2a5d80),'role':_0x333b8f,'listenAddr':_0x1617d5,'lifecycle':_0x179d31?_0x48a4ac(0x279):'running','processing':_0xc10360??null,'stats':_0x4d0e32??null})[_0x48a4ac(0x230)](()=>{});}},_0x4dd95a=_0x351de8=>_0x3b112d('cluster:'+_0x3eae0a,_0x351de8),_0x2c5ba0=_0x53d00e=>{const _0x511047=_0xf4cfb0,_0x183250=_0x4720a9?.[_0x511047(0x2bd)];if(!_0x183250?.['hasDesired']?.())return![];return _0x183250[_0x511047(0x13c)](_0x511047(0x124),_0x4dd95a(_0x53d00e))?.['decommission']===!![];};for(let _0x1ab215=0x0;_0x1ab215<_0xfd60e9;_0x1ab215++){const _0x485e57=_0x2c5ba0(_0x1ab215);_0x2524f7[_0xf4cfb0(0x17a)](_0x1ab215,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x485e57,'respawnTimer':null}),_0x485e57?console[_0xf4cfb0(0x2cd)]('[okdb-cluster]\x20slot='+_0x1ab215+_0xf4cfb0(0x266)):_0x583836(_0x1ab215);}const _0x43cff=()=>{const _0x1d0976=_0xf4cfb0,_0x1f32b6=_0x4720a9?.[_0x1d0976(0x2bd)];if(!_0x1f32b6?.[_0x1d0976(0x238)]||!_0x1f32b6['hasDesired']?.())return;for(const [_0x47e387,_0x3f752e]of _0x2524f7[_0x1d0976(0x24c)]()){const _0x9e52ba=_0x1f32b6['getDesired'](_0x1d0976(0x124),_0x4dd95a(_0x47e387)),_0x1147d2=_0x9e52ba?.[_0x1d0976(0x11b)]===!![],_0x157d86=_0x9e52ba?.[_0x1d0976(0x209)]===!![];if(_0x1147d2&&!_0x3f752e[_0x1d0976(0x290)]){_0x3f752e['dead']=!![];_0x3f752e[_0x1d0976(0x1f6)]&&(clearTimeout(_0x3f752e[_0x1d0976(0x1f6)]),_0x3f752e[_0x1d0976(0x1f6)]=null);for(const {worker:_0x6e0175}of _0x1211c1['values']()){if(_0x50acb4(_0x6e0175)!==_0x47e387||_0x6e0175[_0x1d0976(0x267)]())continue;try{if(_0x157d86)_0x6e0175[_0x1d0976(0x13a)]['kill'](_0x1d0976(0x247));else _0x6e0175[_0x1d0976(0x18f)]()&&_0x6e0175[_0x1d0976(0x17d)]();}catch{}}console['log'](_0x1d0976(0x2df)+(_0x157d86?'hard-killed':'decommissioned')+_0x1d0976(0x19b)+_0x47e387+'\x20(durable\x20desired-state)');}else{if(!_0x1147d2&&_0x3f752e[_0x1d0976(0x290)]&&_0x9e52ba){_0x3f752e[_0x1d0976(0x290)]=![],_0x3f752e['deaths']=[],_0x3f752e['consecutiveFailures']=0x0;const _0x177ba1=[..._0x1211c1[_0x1d0976(0x2e6)]()][_0x1d0976(0x210)](({worker:_0x4c5518})=>_0x50acb4(_0x4c5518)===_0x47e387&&!_0x4c5518[_0x1d0976(0x267)]());!_0x177ba1&&!_0x3fe2c6&&(_0x583836(_0x47e387),console[_0x1d0976(0x2cd)](_0x1d0976(0x216)+_0x47e387));}}}},_0x5b32d7=()=>{try{_0x43cff();}catch{}};_0x4720a9?.['events']?.['on']?.(_0x10044b[_0xf4cfb0(0x1ab)],_0x5b32d7);const _0xbdb097=[];if(_0x4720a9?.[_0xf4cfb0(0x1f9)]?.['on'])for(const _0x3c2d3d of _0xf34cfb){const _0x3eaac3=_0x10aebd=>{_0x1f46ca({[_0xa47e1c]:_0x9715ae,'event':_0x3c2d3d,'data':_0x10aebd??{}});};_0x4720a9[_0xf4cfb0(0x1f9)]['on'](_0x3c2d3d,_0x3eaac3),_0xbdb097[_0xf4cfb0(0x1a0)]({'event':_0x3c2d3d,'handler':_0x3eaac3});}const _0x4e6e77=setInterval(()=>{_0x43cff(),_0x2f5b63();},_0x4632dd);_0x4e6e77['unref']?.();const _0x550f66=(_0x32908d,_0x13d6d7)=>{const _0x474666=_0xf4cfb0;if(!_0x13d6d7||typeof _0x13d6d7!==_0x474666(0x1ea)||_0x13d6d7[_0xa47e1c]!==_0x2e3060)return;if(!_0x4720a9?.[_0x474666(0x2cd)]?.[_0x474666(0x12a)])return;const _0x493c08=_0x13d6d7[_0x474666(0x224)]||{};_0x4720a9['log']['ingest']({..._0x493c08,'msg':'[w'+_0x13d6d7[_0x474666(0x124)]+']\x20'+(_0x493c08['msg']??''),'meta':{..._0x493c08[_0x474666(0x1a8)]||{},'worker':_0x13d6d7['slot'],'workerPid':_0x13d6d7[_0x474666(0x11d)]}});};_0x4107ac['on'](_0xf4cfb0(0x25d),_0x550f66);const _0xcd6a45=(_0x373b8a,_0x53829f)=>{const _0xa72ab8=_0xf4cfb0;if(!_0x53829f||typeof _0x53829f!=='object'||_0x53829f[_0xa47e1c]!==_0x477b24)return;const _0x6e13f5=_0x1211c1['get'](_0x373b8a[_0xa72ab8(0x13a)][_0xa72ab8(0x11d)]);if(_0x6e13f5){_0x6e13f5[_0xa72ab8(0x215)]={..._0x53829f[_0xa72ab8(0x215)],'at':Date[_0xa72ab8(0x24a)]()};if(_0x53829f['processing']!==undefined){const _0x564665=_0x259dbf(_0x53829f[_0xa72ab8(0x106)]);_0x564665!==_0x6e13f5[_0xa72ab8(0x150)]&&(_0x6e13f5[_0xa72ab8(0x150)]=_0x564665,_0x58225e()),_0x6e13f5['processing']=_0x53829f['processing'];}}};let _0x18d9d7=null;const _0x58225e=()=>{if(_0x18d9d7||_0x3fe2c6)return;_0x18d9d7=setTimeout(()=>{_0x18d9d7=null;if(!_0x3fe2c6)_0x2f5b63();},_0x5375e1),_0x18d9d7['unref']?.();};_0x4107ac['on'](_0xf4cfb0(0x25d),_0xcd6a45),_0x4107ac['on']('exit',(_0x384d7d,_0x157ccc,_0x50625d)=>{const _0x58fa31=_0xf4cfb0,_0x456e52=_0x384d7d[_0x58fa31(0x13a)][_0x58fa31(0x11d)],_0x3d25c3=_0x50acb4(_0x384d7d),_0x22ae4e=_0x1211c1[_0x58fa31(0xec)](_0x456e52);if(_0x22ae4e&&_0x4720a9?.['processes'])_0x4720a9['processes'][_0x58fa31(0x1fb)](_0x456e52+':'+_0x22ae4e[_0x58fa31(0x1ff)])[_0x58fa31(0x230)](()=>{});_0x1211c1[_0x58fa31(0x2aa)](_0x456e52),console[_0x58fa31(0x2cd)]('[okdb-cluster]\x20worker\x20pid='+_0x456e52+_0x58fa31(0xf8)+(_0x3d25c3??'?')+_0x58fa31(0x109)+(_0x58fa31(0xbc)+_0x157ccc+_0x58fa31(0xe8)+(_0x50625d??_0x58fa31(0x256))+_0x58fa31(0x1e6)+_0x1211c1[_0x58fa31(0x2e3)]+_0x58fa31(0xb2))),_0x2f5b63();if(_0x3fe2c6||_0x3d25c3==null)return;const _0x449a0d=_0x2524f7['get'](_0x3d25c3);if(!_0x449a0d||_0x449a0d['dead'])return;const _0x3d62f2=Date[_0x58fa31(0x24a)]();_0x449a0d['deaths'][_0x58fa31(0x1a0)](_0x3d62f2),_0x449a0d['deaths']=_0x449a0d[_0x58fa31(0x214)][_0x58fa31(0x2c0)](_0x29bb21=>_0x3d62f2-_0x29bb21<=_0x11cbb8);if(_0x449a0d[_0x58fa31(0x214)][_0x58fa31(0x17e)]>=_0x2ba25e){_0x449a0d[_0x58fa31(0x290)]=!![],console[_0x58fa31(0x277)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x3d25c3+_0x58fa31(0x22a)+_0x449a0d[_0x58fa31(0x214)][_0x58fa31(0x17e)]+'\x20times\x20in\x20'+(_0x11cbb8+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x1211c1[_0x58fa31(0x2e3)]+'\x20worker(s)\x20still\x20serving'));return;}_0x449a0d['consecutiveFailures']++;const _0x4eb1ad=Math['min'](_0x112ca3,_0x298871*0x2**(_0x449a0d['consecutiveFailures']-0x1));console[_0x58fa31(0x2cd)](_0x58fa31(0x1b9)+_0x3d25c3+'\x20in\x20'+_0x4eb1ad+'ms\x20(attempt\x20'+_0x449a0d[_0x58fa31(0xa9)]+')'),_0x449a0d[_0x58fa31(0x1f6)]=setTimeout(()=>{const _0x5cd895=_0x58fa31;_0x449a0d['respawnTimer']=null;if(_0x3fe2c6||_0x449a0d[_0x5cd895(0x290)])return;const _0xca6bab=_0x583836(_0x3d25c3);_0xca6bab[_0x5cd895(0x1a6)](_0x5cd895(0xb4),()=>{const _0x4c20bc=_0x5cd895;if(_0x2524f7['get'](_0x3d25c3)===_0x449a0d)_0x449a0d[_0x4c20bc(0xa9)]=0x0;});},_0x4eb1ad),_0x449a0d[_0x58fa31(0x1f6)][_0x58fa31(0x13e)]?.();});const _0x7b7f11=[..._0x1211c1[_0xf4cfb0(0x114)]()];console[_0xf4cfb0(0x2cd)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+_0xf4cfb0(0x2c3)+_0xfd60e9+_0xf4cfb0(0x1ac)+_0x3eae0a+':\x20'+('['+_0x7b7f11[_0xf4cfb0(0x20d)](',\x20')+']'));const _0x5c79fe={'_isClusterController':!![],'port':_0x3eae0a,'primaryOkdb':_0x4720a9??null,'status'(){const _0x2d70a1=_0xf4cfb0;return{'clustered':!![],'primaryPid':process[_0x2d70a1(0x11d)],'port':_0x3eae0a,'primaryRole':_0x4720a9?.[_0x2d70a1(0x119)]??null,'processorPid':null,'supervisorPid':process[_0x2d70a1(0x11d)],'workers':[..._0x1211c1[_0x2d70a1(0x2e6)]()]['map'](({worker:_0x4169de})=>({'pid':_0x4169de[_0x2d70a1(0x13a)][_0x2d70a1(0x11d)],'id':_0x4169de['id'],'dead':_0x4169de[_0x2d70a1(0x267)]()}))};},async 'close'(){const _0xf95f80=_0xf4cfb0;_0x3fe2c6=!![];for(const _0x182306 of _0x2524f7[_0xf95f80(0x2e6)]()){_0x182306[_0xf95f80(0x290)]=!![],_0x182306['respawnTimer']&&(clearTimeout(_0x182306[_0xf95f80(0x1f6)]),_0x182306[_0xf95f80(0x1f6)]=null);}clearInterval(_0x4e6e77);_0x18d9d7&&(clearTimeout(_0x18d9d7),_0x18d9d7=null);_0x4107ac[_0xf95f80(0x191)]('message',_0x550f66),_0x4107ac[_0xf95f80(0x191)](_0xf95f80(0x25d),_0xcd6a45),_0x4720a9?.['events']?.[_0xf95f80(0x191)]?.(_0x10044b[_0xf95f80(0x1ab)],_0x5b32d7);if(_0x4720a9?.[_0xf95f80(0x1f9)]?.[_0xf95f80(0x191)])for(const {event:_0x1fb7f5,handler:_0x35723a}of _0xbdb097){try{_0x4720a9[_0xf95f80(0x1f9)][_0xf95f80(0x191)](_0x1fb7f5,_0x35723a);}catch{}}_0xbdb097[_0xf95f80(0x17e)]=0x0;const _0x1795d2=[..._0x1211c1[_0xf95f80(0x2e6)]()][_0xf95f80(0x173)](({worker:_0x14d71c})=>_0x14d71c);if(_0x1795d2[_0xf95f80(0x17e)]===0x0)return;await Promise[_0xf95f80(0xc5)](_0x1795d2[_0xf95f80(0x173)](_0x3cc97b=>new Promise(_0xc376e1=>{const _0x22757a=_0xf95f80;if(_0x3cc97b[_0x22757a(0x267)]()){_0xc376e1();return;}let _0x327ac1=![];const _0x32bd53=()=>{if(_0x327ac1)return;_0x327ac1=!![];if(_0x3442c9)clearTimeout(_0x3442c9);_0xc376e1();};_0x3cc97b[_0x22757a(0x1a6)](_0x22757a(0x13b),_0x32bd53);const _0x3442c9=setTimeout(()=>{const _0x2f41bb=_0x22757a;try{_0x3cc97b[_0x2f41bb(0x13a)][_0x2f41bb(0x209)]();}catch{}},_0x23daec+0x1f4);_0x3442c9['unref']?.();try{_0x3cc97b[_0x22757a(0x17d)]();}catch{try{_0x3cc97b[_0x22757a(0x13a)][_0x22757a(0x209)]();}catch{}}})));}};return _0x5c79fe;}async function _0x49ca77({makeOkdb:_0x3d8fa2,port:_0x2aa4b3}){const _0x5edcd4=_0x3c1326,_0x2c167b=await _0x3d8fa2();return _0x5a181e(_0x2c167b),_0x2c167b['http'][_0x5edcd4(0xf4)](_0x2aa4b3);}function _0x5a181e(_0x324f28){const _0x5a02d5=_0x3c1326;if(!_0x324f28||_0x324f28['_clusterWorkerAttached'])return;_0x324f28['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x514158}=requireOkdbChangefeed(),_0x5ba487=_0x324f28[_0x5a02d5(0xc3)];if(_0x5ba487&&typeof _0x5ba487[_0x5a02d5(0x130)]===_0x5a02d5(0x18c)){const _0x4504ca=new _0x514158(_0x324f28);_0x4504ca[_0x5a02d5(0x177)](),_0x5ba487[_0x5a02d5(0x130)](_0x4504ca),_0x324f28[_0x5a02d5(0x2db)]=_0x4504ca;}}catch(_0x567922){_0x324f28[_0x5a02d5(0x2cd)]?.[_0x5a02d5(0x26f)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x567922?.[_0x5a02d5(0x25d)]??_0x567922),{'feature':_0x5a02d5(0x1c7)});}const _0x4d37b0=_0x4fff9c=>{const _0x19c4f2=_0x5a02d5;if(!_0x4fff9c||typeof _0x4fff9c!=='object'||_0x4fff9c[_0xa47e1c]==null)return;if(_0x4fff9c[_0xa47e1c]===_0x9715ae)try{_0x324f28['_adminRelay']?.['pushEphemeral']?.(_0x4fff9c[_0x19c4f2(0x227)],_0x4fff9c[_0x19c4f2(0xb3)]);}catch{}};process['on'](_0x5a02d5(0x25d),_0x4d37b0),_0x324f28[_0x5a02d5(0x28a)]=_0x4d37b0;{let _0x44dd92=process[_0x5a02d5(0x16c)](),_0x1d911d=Date[_0x5a02d5(0x24a)]();const _0x30b52b=()=>{const _0x4b4a6a=_0x5a02d5;if(typeof process[_0x4b4a6a(0xe9)]!==_0x4b4a6a(0x18c)||!process['connected'])return;const _0x4c8194=Date[_0x4b4a6a(0x24a)](),_0x455284=process[_0x4b4a6a(0x16c)](),_0x4cedeb=(_0x4c8194-_0x1d911d)*0x3e8,_0xa92649=_0x455284['user']-_0x44dd92[_0x4b4a6a(0x10c)]+(_0x455284['system']-_0x44dd92[_0x4b4a6a(0x1fd)]),_0x1f9d33=_0x4cedeb>0x0?Math[_0x4b4a6a(0x22d)](0x64,Math['round'](_0xa92649/(_0x4cedeb*(_0x623a23[_0x4b4a6a(0x206)]()[_0x4b4a6a(0x17e)]||0x1))*0x64)):0x0;_0x44dd92=_0x455284,_0x1d911d=_0x4c8194;const _0x209d07=process[_0x4b4a6a(0xc2)]();let _0x48ae1b=null;try{_0x48ae1b=_0x324f28[_0x4b4a6a(0x119)]?.['processors']?_0x324f28[_0x4b4a6a(0x2bd)]?.[_0x4b4a6a(0x13d)]?.()??null:null;}catch{}try{process['send']({[_0xa47e1c]:_0x477b24,'stats':{'rss':_0x209d07[_0x4b4a6a(0xd5)],'heapUsed':_0x209d07[_0x4b4a6a(0x1f2)],'heapTotal':_0x209d07[_0x4b4a6a(0x2dd)],'external':_0x209d07[_0x4b4a6a(0x189)],'cpuPct':_0x1f9d33,'cpuWindowMs':Math[_0x4b4a6a(0x24b)](_0x4cedeb/0x3e8)||null},'processing':_0x48ae1b});}catch{}},_0x199968=Math[_0x5a02d5(0x2bc)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x1bc8c2=setInterval(_0x30b52b,_0x199968);_0x1bc8c2[_0x5a02d5(0x13e)]?.(),_0x30b52b();for(const _0x2ff64b of[_0x5a02d5(0xc8),'processor:resumed']){_0x324f28[_0x5a02d5(0x1f9)]?.['on']?.(_0x2ff64b,()=>{try{_0x30b52b();}catch{}});}}let _0x26d306=![];const _0x4a3e2d=async _0x4c500d=>{const _0x433aa5=_0x5a02d5;if(_0x26d306)return;_0x26d306=!![];const _0x4eba93=setTimeout(()=>process[_0x433aa5(0x13b)](_0x4c500d),_0x23daec);_0x4eba93[_0x433aa5(0x13e)]?.();try{await _0x324f28[_0x433aa5(0x2b1)]?.();}catch{}process[_0x433aa5(0x13b)](_0x4c500d);};process['on'](_0x5a02d5(0x17d),()=>_0x4a3e2d(0x0));if(process[_0x5a02d5(0xe9)]&&!process[_0x5a02d5(0xfd)])_0x4a3e2d(0x0);if(process[_0x5a02d5(0x125)]!==_0x5a02d5(0x225)){const _0x4a3f5a=setInterval(()=>{const _0x332d46=_0x5a02d5;if(process[_0x332d46(0xfe)]===0x1)_0x4a3e2d(0x0);},_0x43acc7);_0x4a3f5a[_0x5a02d5(0x13e)]?.(),_0x324f28['_clusterOrphanWatch']=_0x4a3f5a;}}return okdbCluster={'runClustered':_0x40dc2f,'attachWorkerCluster':_0x5a181e},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x4ed60c=_0x5e06fa;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x4e679c=require$$0$5,{attachWorkerCluster:_0x524c2b}=requireOkdbCluster();async function _0x52b2d3(){const _0x2822b9=_0x5881,_0x4c6fbd=process.env.OKDB_HTTP_CHILD;if(!_0x4c6fbd)throw new Error(_0x2822b9(0x255));const {rootPath:_0xd9ac6f,port:_0x45ca6c,options:options={},logLevel:logLevel='info'}=JSON[_0x2822b9(0x14d)](_0x4c6fbd);if(!_0xd9ac6f||!_0x45ca6c)throw new Error(_0x2822b9(0x18b));const _0x194504=new _0x4e679c(_0xd9ac6f,{...options,'engines':![],'processors':![],'compaction':![]});_0x194504[_0x2822b9(0x2cd)][_0x2822b9(0x25a)]?.();const _0x3e8c05=process.env.OKDB_CLUSTER_SLOT??'?',_0x27805e={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x324eb4=_0x27805e[logLevel]??_0x27805e['info'];_0x194504[_0x2822b9(0x2cd)][_0x2822b9(0xaf)](_0xca5fe6=>{const _0x560092=_0x2822b9;if((_0x27805e[_0xca5fe6['level']]??0x1)<_0x324eb4)return;try{process[_0x560092(0xe9)]?.({'__okdbCluster':_0x560092(0x2cd),'slot':_0x3e8c05,'pid':process[_0x560092(0x11d)],'entry':_0xca5fe6});}catch{}}),await _0x194504[_0x2822b9(0x2e5)](),_0x524c2b(_0x194504),await _0x194504[_0x2822b9(0x27f)][_0x2822b9(0xf4)](_0x45ca6c);}return _0x52b2d3()[_0x4ed60c(0x230)](_0x3389f3=>{const _0x38d7ae=_0x4ed60c;try{process[_0x38d7ae(0xe9)]?.({'__okdbCluster':_0x38d7ae(0x2cd),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x38d7ae(0x11d)],'entry':{'level':_0x38d7ae(0x277),'msg':_0x38d7ae(0x246)+(_0x3389f3?.[_0x38d7ae(0x25d)]??_0x3389f3)}});}catch{}process[_0x38d7ae(0x13b)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);function _0x2913(){const _0x1063da=['cluster-wide','FTS_REGISTERED','_flushTimer','prependListener','\x20worker\x20slot=','_publishFailWarned','runtimeProcessesView','lifecycle','toFixed','push','processKey','killable','processors','node','SYSTEM_POKE','once','\x0a\x20\x20\x20\x20\x20\x20','meta','includes','registerIndex','SYSTEM_PROC','\x20HTTP\x20server(s)\x20on\x20port\x20','_handlePoke','\x20sync','_processStartedAt','maxExtra','procmodeack/','maxMs','engines','list','_cursors','_putRowSync','worker','ref:violation','[okdb-cluster]\x20respawning\x20worker\x20slot=','recent\x20writes\x20(newest\x20first)','\x20===','--watch','ttlMs','namespace','_assertUsable','_nodeDead','getRange','online','ensureType','parkedNow','_onPending','135947ifukcg','cluster','_buckets','3QbjGpM','_nodeDbFor','randomUUID','migrations','ITEM_PENDING','resolve','inspect','_publishNow','fn-runner','note','_putRowAsync','reset','_activateProcesses','sync','path','crypto','index:drop','processor:retry','_selfKey','okdb','1ofN:','ESRCH','fts:reset','SYSTEM_STOPPED','_coordinator','compact','_enableChangelog','node:perf_hooks','version',');\x20','claims','release','_quantum','object','claimGated','_outstanding','registry\x20heartbeat\x20skipped\x20(writer=','FTS_RESET','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','system:ready','index:registered','heapUsed','_admissionStarted','_durs','call','respawnTimer','_inflight','MAX_POOL_HOLDS','events','reduce','removeNode','ttl:clear','system','embedded','startedAt','index:progress','default','noteListenAddr','_wantDbOf','INDEX_READY','node:events','cpus','processor','ms/','kill','_migrateVocab','ms\x20max=','removeSync','join','REMOVE','_singletonLocks','some','_lock','_markSeen','startHeartbeat','deaths','stats','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','find','startsWith','system:stopped','singletonClaims','heartbeatMs','bus:proc','_openEnvLazy','write','sync:apply','mode','processor:resumed','removeSupervisedChild','unclaimed','entry','win32','commitP99Ms','event','ENV_CLOSING_RETRY','_refreshDesiredSnapshot','\x20died\x20','listenAddr','ttl:set','min','type','view','catch','_isStale','_held','_startAdmission','fork','count','_singletonLock','appendFileSync','_isWriter','setOwnMeta','cli','force','setLogger','_systemEnv','participate','processor:error','primary','index:reset','_rawDb','INDEX_REGISTERED',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_ownMeta','http\x20worker\x20child\x20failed:\x20','SIGKILL','value','txn:start','now','round','entries','_onItem','license:activated','childTransaction','_threadStats','mean','_children','nodeKey','openDB','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','none','\x20—\x20','feed:','writerStatus','detachConsole','_log','_cmd','message','add','threads','envsOpen','INDEX_RESET','register','dropType','nodesView','_maybePublish','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','isDead','okdb-diag.','_key','publishOwnRow','standalone','ref:violation_resolved','__okdbCluster','beforeWrite','warn','ttl:expired','caps','slice','_removeRowAsync','reportThreadStats','\x20@\x20','shift','error','seq','decommissioning','floor','holder','\x20pid=','closing','__vocab/version','http','ITEM_REMOVE','isPrimary','getProcess','load','ITEM_UPDATE','transaction','system:poke','1295802EPkkDl','_versionSkewWarned','trim','_clusterOnMessage','\x0a===\x20OKDB_DIAG\x20','dumpedAt','[okdb-cluster]\x20worker\x20pid=','okdb-writer:\x20env\x20closing\x20—\x20retry','tryAcquire','dead','heldBy','workersConfigured','sandbox','cpuPct','percentile','building','_lockDb','null','uncaughtException','_bpParkedTotal','resetting','started','state','perf_hooks','dedupeMax','11reTRmR','_desired','setDesired','_listenAddr','number','supervisorKey','listNodes','_closed','\x20writer{depth=','258NpDLFV','delete','_bpWaiters','_done','getClock','_db','publishChildRow','_pendingLocal','close','recordWrite','repeat','withPoolHold','\x20│\x20','offWindow','_drain','_role','\x20drainAge=','_getType','next','max','processes','~lock','_participate','filter','_rowKey','item:create','\x20forked\x20','slotKey','_buildChildRow','transactionSync','__okdbSlot','inflightAgesMs','fanout','waiting','indexOf','_seen','log','_drainOne','status','loop-lag','epoch','~processes:desired','12968000mFTCOi','stack','fts:registered','stop','raw-put','license:added','code','_writer','_changefeed','ITEM_CREATE','heapTotal','remove','[okdb-cluster]\x20','field:resolver_registered','_started','async','size','_heartbeatTimer','open','values','_heartbeatInFlight','_dedupeMax','~processes','_isReader','stopped','_sandbox','_timer','string','consecutiveFailures','_startHeartbeat','has','_rootDb','running','raw-remove','attach','_statusEnv','_pending','\x20worker(s)\x20remaining','data','listening','freeze','toISOString','ms\x20busy=','_onTick','kind','license:invalid','reap','(code=','enable','instanceId','ORPHAN\x20(env-closed\x20write)','\x20statusEnv=','rows=','memoryUsage','_adminRelay','isActive','all','bus:type_drop','updatedAt','processor:paused','unique:violation','stderr','creating','depth','isEnabled','abs','enabled','prototype','bus:env_release','clusterStatusView','setupPrimary','txn:end','rss','index:ready','race','stringify','./okdb','then','_nestedTotal','__esModule','stopping','change','_flushDebounce','\x20parkedNow=','_admissionTimer','extend','clear','INDEX_PROGRESS','\x20\x20(no\x20env\x20draining)','item:remove','_onPoke',',\x20signal=','send','http-server','--print','get','processor:ready','_wantDbHandle','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','ms\x20on\x20env=','_scheduleFlush','reject','system:proc','listen','_lockDbOf','ms\x20activeWriters=','unique:violation_resolved','\x20(slot=','system:type_drop','ms\x20env=','host','registerFts','connected','ppid','\x20ipc\x20error:\x20','_ensureDesired','sort','workers','_onProcEvent','disable','_holderDead','processing','_handleInProcess','rowKey',')\x20exited\x20','isWorker','type:drop','user','processorId','processor:progress','_handlePending','2.6.3','_highWater','_dedupeKey','_supervisorKey','keys','_wantDb','_desiredOverlay','updateSupervisedChildStats','options','role','_released','decommission','system:clock_change','pid','confirm','execArgv','putNode','committed','4301284qVUrRl','_lastCpuPct','slot','platform','emit','_draining','_report','schema:set','ingest','compaction','_heldTotal','okdb-lock:\x20env\x20closed','license:removed','_onStop','attachFeed','_groupByProcess','quantum','_buildOwnRow','.log','ephemeral','env','split','allSettled','_envs','process','exit','getDesired','_buildProcessingFacet','unref','--test','ms\x20p99=','_collectWriterFacet','splice','cursorKey','_nodeDbCache','env:removed','selfKey','flushDebounce','children','resetReadTxn','hasDesired','_kind','_collectSingletonClaims','parse','_nestedWarned','uptime','processingSig','1548080gHqGOr','item:update','getChanges','instances','txn:rollback','putSync','single','commit','_lastPublishAt','_windowCbs','_startedAt','144epwLBv','_nodeDb','fts:drop','_acquiredAt','test','processingStatusView','isWanted','oldestPendingMs','_lastCpuUsage','hostname','createEnvironment','stopHeartbeat','~processes:cmd','_baselines','node/','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','cpuUsage','registry\x20publish\x20failing:\x20','expiresAt','exports','put','_instanceId','_lastCpuWindowMs','map','assign','_hbTimer','\x20while\x20this\x20process\x20runs\x20','start','name','bumpCmd','set',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','markClosed','disconnect','length','addSupervisedChild','drain','bus:poke','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','getCmd','3131346xWfIkY','okdb-writer[','onWindow','acquiredAt','type:registered','external','_committed','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','function','_enqueuedAt','deregisterSelf','isConnected','--eval','off','390944NcnhAE','replace','_lastCpuAt','_sampleOwnStats','afterWrite'];_0x2913=function(){return _0x1063da;};return _0x2913();}module[_0x5e06fa(0x16f)]=okdbHttpWorkerChild;
1
+ 'use strict';const _0x2ee730=_0x302a;(function(_0x2b2da3,_0x43eeed){const _0x57079b=_0x302a,_0x45b680=_0x2b2da3();while(!![]){try{const _0x4296f3=parseInt(_0x57079b(0x16c))/0x1+-parseInt(_0x57079b(0x1cb))/0x2+-parseInt(_0x57079b(0x1f2))/0x3+parseInt(_0x57079b(0x14f))/0x4*(parseInt(_0x57079b(0x183))/0x5)+parseInt(_0x57079b(0xfc))/0x6+-parseInt(_0x57079b(0x222))/0x7+-parseInt(_0x57079b(0xbb))/0x8;if(_0x4296f3===_0x43eeed)break;else _0x45b680['push'](_0x45b680['shift']());}catch(_0x329e1d){_0x45b680['push'](_0x45b680['shift']());}}}(_0x4900,0x6c5ee));var require$$0$5=require('./okdb'),require$$1$1=require(_0x2ee730(0x265)),require$$1=require(_0x2ee730(0x2e4)),require$$0$3=require('os'),require$$2=require(_0x2ee730(0x107)),require$$0=require(_0x2ee730(0x269)),require$$0$2=require(_0x2ee730(0x271)),require$$0$1=require('fs'),require$$0$4=require(_0x2ee730(0xd4));function _0x302a(_0x4cb4a4,_0x23fc2e){_0x4cb4a4=_0x4cb4a4-0xac;const _0x490062=_0x4900();let _0x302a8b=_0x490062[_0x4cb4a4];return _0x302a8b;}function _0x4900(){const _0xe28a06=['epoch','external','instances','crypto','toISOString','ms\x20p99=','processor:ready','ms\x20busy=','dumpedAt','oldestPendingMs','trim','item:pending','_nodeDbCache','registerFts','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','_changefeed','detachConsole','publishOwnRow','_kind','getCmd','txn:start','_cmd','clearThreadStats','isHeld','mkdirSync','ensureType','_rawDb','_onItem','force','registry\x20heartbeat\x20skipped\x20(writer=','_onPoke','index:progress','null','_nodeDead','beforeWrite','ITEM_CREATE','reportThreadStats','okdb-writer:\x20env\x20closing\x20—\x20retry','isPrimary','drain','randomUUID','rows=','INDEX_REGISTERED','call','_onStop','_singletonLocks','extend','_durs','_instanceId','_supervisorKey','length','_singletonLock','\x20phase=','processingSig','_lastCpuPct','filter','fn-runner','nodesView','_wantDbHandle','_holderDead','_onTick','_ensureDesired','_assertUsable','~lock','object','\x20worker(s)\x20remaining','_outstanding','_lastCpuWindowMs','view','raw-remove','singletonClaims','some','keys','instanceId','allSettled','844ygmImh','execArgv','_buildChildRow','role','round','_writer','commitP99Ms','_processStartedAt','release','INDEX_RESET','_maybePublish','enable','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','\x20===','resetIndex','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','_wantDb','index:ready','_closed','processorId','_bpParkedTotal','closing','type:registered','_nodeDbFor','\x20times\x20in\x20','\x0a===\x20OKDB_DIAG\x20','procmodeack/','cursorKey','change','749119GYcHQu','stats','ESRCH','sort','race','recordWrite','getChanges','SWAP','\x20│\x20','ppid','ENV_CLOSING_RETRY','heartbeatMs','clearTtl','_activateProcesses','[okdb-cluster]\x20respawning\x20worker\x20slot=','from','version','process\x20','enabled','updateSupervisedChildStats','_enqueuedAt','supervisorKey','resetReadTxn','2005GYqUCt','events','ready','find','_key','shift','processor:paused','okdb-diag.','next','_report','ITEM_REMOVE','cpuUsage','ms\x20env=','_rootDb','_startedAt','claims','stopHeartbeat','entries','_quantum','isWorker','~processes','\x20while\x20this\x20process\x20runs\x20','okdb-writer[','system:clock_change','info','putNode','string','stderr','type','rss','putSync','schema:set','[okdb-cluster]\x20slot=','nodeKey','_selfKey','_refreshDesiredSnapshot','default','close','INDEX_READY','ingest','rowKey','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','push','getRange','[okdb-cluster]\x20','remove','options','meta','busy','_scheduleFlush','listenAddr','status','min','treeView','node/','_putRowSync','_buildProcessingFacet','deaths','transactionSync','floor','reject','now','user','online','none','embedded','setDesired','(worst\x20','_acquiredAt','CHANGEFEED_QUANTUM','stringify','_committed','524992QLItIq','_buckets','_participate','creating','hostname','_seen','standalone','processor:error','function','_enableChangelog','_statusEnv','startsWith','platform','ms\x20mean=','_drainOne','_lockDb','_dedupeKey','appendFileSync','memoryUsage','_listenAddr','disconnect','recent\x20writes\x20(newest\x20first)','_nodeDb','then','_putRowAsync','lifecycle','_nestedTotal','VIEW_PROGRESS','\x20\x20(no\x20env\x20draining)','_systemEnv','_hbTimer','_heartbeatTimer','emit','_groupByProcess','_draining','_lastCpuUsage','fromEntries','children','splice','81336EBfttr','processors','error','win32','listen','state','system:drain','index:drop','exports','running','percentile','item:remove','replace','add','closed','bumpCmd','_markSeen','schema:drop','process','SYSTEM_PROC','_desiredOverlay','_threadStats','slice','_db','uptime','startedAt','system:bus_state_change','ITEM_UPDATE','dropping','_isStale','listDesired','decommission','system','mode','setTtl','SIGKILL','resetting','_wantDbOf','_adoptPeerIndexes','getClock','host','building','reset','cli','_handlePending','bus:drain','stopping','updatedAt','3352265MwukRz','register','_flushDebounce','prototype','values','cluster-wide','_pendingLocal','procmode/','FTS_DROP','ttl:expired','registerType','REMOVE','\x20sync','\x20drainAge=','__okdbSlot','processor:retry','_sandbox','ttl:set','_transactionOnce','starting','assign','removeSync','_highWater','_servingEngines','send','writerStatus','abs','resolve','_heartbeatInFlight','sync:apply',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','namespace','stopped','note','log','_children','created','signalWant','ephemeral','_onProcEvent','max','number',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','_started','_collectWriterFacet','isConnected','error:\x20','fork','size','data','maxMs','--watch','\x20died\x20','_admissionTimer','heldBy','indexOf','FTS_REGISTERED','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','split','bus:proc','_role','dropIndex','processor:resumed','join','_lock','_held','inst:','cluster','ref:violation_resolved','registerIndex','childTransaction','node:perf_hooks','_flushTimer','count','entry','loop-lag','kind','license:invalid','afterWrite','perf_hooks','stop','[okdb-cluster]\x20worker\x20pid=','cpuWindowMs','put','listening','_timer','SYSTEM_STOPPED','map','_caps','_inflight','primary','_dedupeMax','fts:drop','http-server','registry\x20publish\x20failing:\x20','system:proc','off','parkedNow','processing','_isWriter','code','async','system:poke','includes','cpuPct','\x20\x20#','holder','sandbox','flushed','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_versionSkewWarned','1ofN:','write','openDB','_clusterWorkerAttached','okdb','expiresAt','_handleInProcess','bus:poke','_released','\x20parkedNow=','_baselines','_rowKey','_pending','_publishNow','compaction','processes','heapUsed','_startHeartbeat','dedupeMax','fanout','attach','paused','system:ready','participate','__okdbCluster','_log','_ownMeta','workers','value','_envs','isActive','_buildOwnRow','catch','attachFeed','exit','unref','clusterStatusView','admitted','_sampleOwnStats','hasDesired','FTS_RESET','transaction','set','noteListenAddr','cpus','\x20ipc\x20error:\x20','--test','_removeRowAsync','__vocab/version','license:added','selfKey','_desired','warn','committed','message','uncaughtException','commitsPerSec','INDEX_SET_CHANGED','env','maxExtra','\x20forked\x20','kill','listNodes','registry-publish','license:activated','ttlMs','_isReader','reap','_nestedWarned','draining',');\x20','env:removed','single','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','fast','list','getDesired','processKey','_publishFailWarned','_windowCbs','respawnTimer','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','once','path','ms\x20activeWriters=','node','system:env_release','field:resolver_registered','_openEnvLazy','isDead','offWindow','http','engines','caps','pushEphemeral','mean','decommissioning','\x20@\x20','event','\x20pid=','_lastPublishAt','--inspect','inspect','connected','consecutiveFailures','stack','_drain','inflightAgesMs','_coordinator','366008DlPEkL','threads','removeNode','dropSchema','fts:registered','dead','setOwnMeta','_clusterOnMessage','repeat','~processes:cmd','has','\x0a\x20\x20\x20\x20\x20\x20','\x20\x20env=','start','envsOpen','worker','\x20writer{depth=','okdb-lock:\x20env\x20closed','loop-lag\x20','\x20(durable\x20desired-state)','_handlePoke','compact','toFixed','hasOwnProperty','delete','node:events','processor','\x20in\x20','sync','\x20worker(s)\x20still\x20serving','ms\x20on\x20env=','level','_admissionStarted','depth','SYSTEM_POKE','load','_heldTotal','pid','heapTotal','workersConfigured','index:registered','all','ms/','_bpWaiters','_startAdmission','started','_onPending','publishChildRow','acquiredAt','\x20—\x20','msg','resetFts','ms\x20(attempt\x20','--print','clear','get','_adminRelay','_collectSingletonClaims','slot','prependListener','claimGated','_done','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','bus:env_release','isEnabled','2546460UxRzIe','unique:violation_resolved','_lastCpuAt','(code=','license:removed',',\x20signal=','.log','_cursors'];_0x4900=function(){return _0xe28a06;};return _0x4900();}function getDefaultExportFromCjs(_0x326220){const _0x5bd55a=_0x2ee730;return _0x326220&&_0x326220['__esModule']&&Object[_0x5bd55a(0x225)][_0x5bd55a(0xd2)][_0x5bd55a(0x12f)](_0x326220,'default')?_0x326220[_0x5bd55a(0x1a7)]:_0x326220;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x36b714=_0x2ee730;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0xc2b2a0={'PUT':_0x36b714(0x275),'REMOVE':_0x36b714(0x1b0),'INDEX_DROP':_0x36b714(0x25f),'INDEX_REGISTER':_0x36b714(0x267),'INDEX_RESET':_0x36b714(0x15d),'TYPE_REGISTER':_0x36b714(0x22c),'TYPE_DROP':'dropType','FTS_REGISTER':_0x36b714(0x111),'FTS_DROP':'dropFts','FTS_RESET':_0x36b714(0xee),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x36b714(0xbe),'TTL_SET':_0x36b714(0x214),'TTL_CLEAR':_0x36b714(0x178)},_0x11ba85={'SYSTEM_READY':_0x36b714(0x2a7),'FIELD_RESOLVER_REGISTERED':_0x36b714(0x2e8),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x36b714(0x19a),'SYSTEM_POKE':_0x36b714(0x288),'SYSTEM_DRAIN':_0x36b714(0x1f8),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x36b714(0x281),'SYSTEM_BUS_STATE_CHANGE':_0x36b714(0x20c),'ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x36b714(0x1fd),'ITEM_PENDING':_0x36b714(0x10f),'INDEX_RESET':'index:reset','INDEX_READY':_0x36b714(0x160),'INDEX_PROGRESS':_0x36b714(0x123),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x36b714(0x1f9),'INDEX_REGISTERED':_0x36b714(0xe3),'FTS_REGISTERED':_0x36b714(0xbf),'FTS_DROP':_0x36b714(0x27e),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x36b714(0x1a2),'SCHEMA_DROP':_0x36b714(0x203),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x36b714(0xfd),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x36b714(0x266),'SYNC_APPLY':_0x36b714(0x23f),'TXN_START':_0x36b714(0x118),'TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x36b714(0x165),'TYPE_DROP':'type:drop','ENV_OPENED':'env:opened','ENV_REMOVED':_0x36b714(0x2d8),'SYSTEM_ENV_RELEASE':_0x36b714(0x2e7),'TTL_EXPIRED':_0x36b714(0x22b),'TTL_SET':_0x36b714(0x233),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x36b714(0x26f),'LICENSE_ADDED':_0x36b714(0x2c2),'LICENSE_ACTIVATED':_0x36b714(0x2d1),'LICENSE_REMOVED':_0x36b714(0x100)},_0x219d99={'CREATING':_0x36b714(0x1ce),'RESETTING':_0x36b714(0x216),'READY':_0x36b714(0x185),'DROPPING':_0x36b714(0x20e),'WAITING':'waiting','ERROR':_0x36b714(0x1f4)},_0x3c0950={'CREATED':_0x36b714(0x246),'STARTING':_0x36b714(0x235),'STARTED':_0x36b714(0xe8),'STOPPING':_0x36b714(0x220),'STOPPED':_0x36b714(0x242)},_0x320b66={'CREATING':_0x36b714(0x1ce),'READY':_0x36b714(0x185),'HALTED':'halted','STOPPED':_0x36b714(0x242),'RESETTING':_0x36b714(0x216)},_0x298f8a=Object['freeze']({'POKE':_0x36b714(0x298),'DRAIN':_0x36b714(0x21f),'TYPE_DROP':'bus:type_drop','PROC':_0x36b714(0x25d),'ENV_RELEASE':_0x36b714(0xfa)});return okdbEnums={'BUS_EVENTS':_0x298f8a,'CHANGE_ACTIONS':_0xc2b2a0,'EVENTS':_0x11ba85,'INDEX_STATE':_0x219d99,'OKDB_STATE':_0x3c0950,'VIEW_STATE':_0x320b66},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x43733e=_0x2ee730;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x2d9164,performance:_0x17e75b}=require$$0,_0x14c706=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x33536a=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x3e1dc5=process.env.OKDB_LOOP_LAG_ALL==='1',_0x4c446e=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x18b744{constructor(){const _0x1a8737=_0x302a;this[_0x1a8737(0x17e)]=_0x14c706,this[_0x1a8737(0x1cc)]=new Map(),this['_h']=null,this[_0x1a8737(0x277)]=null,this[_0x1a8737(0x24d)]=![],this[_0x1a8737(0x2aa)]=(_0x2c915e,_0x4e5ce6)=>process[_0x1a8737(0x19e)][_0x1a8737(0x292)](_0x2c915e+(_0x4e5ce6?'\x20'+JSON[_0x1a8737(0x1c9)](_0x4e5ce6):'')+'\x0a');}['now'](){const _0x2e8090=_0x302a;return _0x17e75b[_0x2e8090(0x1c0)]();}['setLogger'](_0xf56bf8){const _0x171ffa=_0x302a;if(typeof _0xf56bf8==='function')this[_0x171ffa(0x2aa)]=_0xf56bf8;}['note'](_0x2b1337,_0xa7e578,_0x2267a4){const _0x26cbb4=_0x302a;if(!this['enabled'])return;let _0x3b0bef=this[_0x26cbb4(0x1cc)][_0x26cbb4(0xf2)](_0x2b1337);!_0x3b0bef&&(_0x3b0bef={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x26cbb4(0x1cc)][_0x26cbb4(0x2bb)](_0x2b1337,_0x3b0bef)),_0x3b0bef['ms']+=_0xa7e578,_0x3b0bef[_0x26cbb4(0x26b)]+=0x1,_0xa7e578>_0x3b0bef[_0x26cbb4(0x254)]&&(_0x3b0bef[_0x26cbb4(0x254)]=_0xa7e578,_0x3b0bef[_0x26cbb4(0x2cc)]=_0x2267a4||'');}[_0x43733e(0xc8)](_0xbb6e3c){const _0x4fde65=_0x43733e;if(!this[_0x4fde65(0x17e)]||this[_0x4fde65(0x24d)])return;this[_0x4fde65(0x24d)]=!![];if(_0xbb6e3c)this[_0x4fde65(0x2aa)]=_0xbb6e3c;this['_h']=_0x2d9164({'resolution':0xa}),this['_h'][_0x4fde65(0x15a)](),this['_timer']=setInterval(()=>this['_report'](),_0x33536a);if(this['_timer'][_0x4fde65(0x2b4)])this[_0x4fde65(0x277)]['unref']();}['onWindow'](_0x51f249){const _0x4c37b3=_0x43733e;if(!this[_0x4c37b3(0x2e0)])this[_0x4c37b3(0x2e0)]=new Set();this[_0x4c37b3(0x2e0)][_0x4c37b3(0x1ff)](_0x51f249);if(!this[_0x4c37b3(0x24d)])this[_0x4c37b3(0xe7)]();}[_0x43733e(0x2eb)](_0x15e42a){const _0x8e73f9=_0x43733e;this[_0x8e73f9(0x2e0)]?.['delete'](_0x15e42a);}[_0x43733e(0xe7)](){const _0xc39272=_0x43733e;if(this['_admissionStarted'])return;this[_0xc39272(0xdb)]=!![];!this['_h']&&(this['_h']=_0x2d9164({'resolution':0xa}),this['_h']['enable']());const _0x263b57=_0x33536a;this[_0xc39272(0x257)]=setInterval(()=>{const _0x2ba9e1=_0xc39272,_0x4bbffc=this['_h'];if(!_0x4bbffc)return;const _0x10ee84=_0x4bbffc[_0x2ba9e1(0x1fc)](0x63)/0xf4240,_0x1dc667=_0x4bbffc[_0x2ba9e1(0x24a)]/0xf4240,_0x31a79d=_0x4bbffc[_0x2ba9e1(0xad)]/0xf4240;_0x4bbffc[_0x2ba9e1(0x21c)]();if(this[_0x2ba9e1(0x2e0)])for(const _0x506645 of this[_0x2ba9e1(0x2e0)]){try{_0x506645({'p99Ms':_0x10ee84,'maxMs':_0x1dc667,'meanMs':_0x31a79d,'reportMs':_0x263b57});}catch{}}},_0x263b57);if(this[_0xc39272(0x257)][_0xc39272(0x2b4)])this[_0xc39272(0x257)][_0xc39272(0x2b4)]();}[_0x43733e(0x18c)](){const _0x125a03=_0x43733e,_0x1507c1=this['_h'],_0x106fc6=_0x1507c1['max']/0xf4240,_0x128893=_0x1507c1[_0x125a03(0x1fc)](0x63)/0xf4240,_0x25659e=_0x1507c1[_0x125a03(0xad)]/0xf4240;_0x1507c1[_0x125a03(0x21c)]();const _0x569834=[...this[_0x125a03(0x1cc)][_0x125a03(0x194)]()]['map'](([_0x49ba21,_0x548522])=>({'label':_0x49ba21,..._0x548522}))['sort']((_0x4d70e1,_0x24f462)=>_0x24f462['ms']-_0x4d70e1['ms'])['slice'](0x0,0x8);this['_buckets']['clear']();const _0x54a56c=_0x569834['reduce']((_0x31661d,_0x2f2934)=>_0x31661d+_0x2f2934['ms'],0x0),_0x5ec00c=_0x569834[_0x125a03(0x279)](_0x44752f=>_0x44752f['label']+'='+_0x44752f['ms']['toFixed'](0x0)+_0x125a03(0xe5)+_0x44752f[_0x125a03(0x26b)]+(_0x44752f[_0x125a03(0x254)]>0x5?_0x125a03(0x1c6)+_0x44752f[_0x125a03(0x254)][_0x125a03(0xd1)](0x0)+'ms'+(_0x44752f['maxExtra']?'\x20'+_0x44752f['maxExtra']:'')+')':''));(_0x3e1dc5||_0x106fc6>=_0x4c446e)&&this[_0x125a03(0x2aa)](_0x125a03(0xcd)+_0x33536a+'ms\x20max='+_0x106fc6[_0x125a03(0xd1)](0x0)+_0x125a03(0x109)+_0x128893['toFixed'](0x0)+_0x125a03(0x1d8)+_0x25659e['toFixed'](0x0)+_0x125a03(0x10b)+_0x54a56c[_0x125a03(0xd1)](0x0)+'ms'+(_0x5ec00c['length']?_0x125a03(0x174)+_0x5ec00c['join']('\x20\x20'):''),{'feature':_0x125a03(0x26d)});if(this[_0x125a03(0x2e0)])for(const _0x213877 of this[_0x125a03(0x2e0)]){try{_0x213877({'p99Ms':_0x128893,'maxMs':_0x106fc6,'meanMs':_0x25659e,'reportMs':_0x33536a});}catch{}}}[_0x43733e(0x272)](){const _0x10ae48=_0x43733e;if(this[_0x10ae48(0x277)])clearInterval(this['_timer']);if(this['_h'])this['_h']['disable']();this[_0x10ae48(0x277)]=null,this['_h']=null,this['_started']=![];}}const _0x5b3012=new _0x18b744();if(_0x5b3012[_0x43733e(0x17e)])_0x5b3012[_0x43733e(0xc8)]();return okdbLoopMonitor={'LOOP':_0x5b3012},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x39aa87=0x2**0x1f-0x1;function _0x2d33f9(_0x3e9989){if(!(_0x3e9989>0x0))return 0x0;return _0x3e9989>_0x39aa87?_0x39aa87:_0x3e9989;}function _0x38b4a9(_0x49869a){return _0x49869a===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x39aa87,'clampTimerDelay':_0x2d33f9,'isNeverDelay':_0x38b4a9},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x1823e2=require$$0$1,_0x477dfb=require$$1;let _0xab9608,_0x37a234,_0x54a3be,_0x1a7505,_0x27787a,_0x1e87fd,_0x1a0afe,_0x165fbf=![];const _0x188677=new Set();let _0x107dad=null;const _0x59f596=new Map();function _0x2ffb54(){const _0x2dbe47=_0x302a;if(_0xab9608!==undefined)return _0xab9608;_0xab9608=process.env.OKDB_DIAG==='1';if(!_0xab9608)return![];_0x37a234=process.env.OKDB_DIAG_STACK==='1',_0x1a7505=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x54a3be=new Array(_0x1a7505),_0x27787a=0x0,_0x1e87fd=0x0,_0x1a0afe=process.env.OKDB_DIAG_DIR||null;if(_0x1a0afe)try{_0x1823e2[_0x2dbe47(0x11c)](_0x1a0afe,{'recursive':!![]});}catch{}return!![];}function _0xb9d7c0(){return _0xab9608===undefined?_0x2ffb54():_0xab9608;}function _0x1c8c5d(_0x3fe70d,_0x27d16d){const _0x55f919=_0x302a;if(_0xab9608===undefined?!_0x2ffb54():!_0xab9608)return;let _0xca30b0;if(_0x37a234){const _0xe34958=new Error()['stack']||'';_0xca30b0=_0xe34958[_0x55f919(0x25c)]('\x0a')['slice'](0x3)[_0x55f919(0x279)](_0x16ab08=>_0x16ab08[_0x55f919(0x10e)]())['filter'](Boolean)[_0x55f919(0x208)](0x0,0x8);}_0x54a3be[_0x27787a]={'seq':_0x1e87fd++,'t':Date[_0x55f919(0x1c0)](),'env':_0x3fe70d,'kind':_0x27d16d||'commit','stack':_0xca30b0},_0x27787a=(_0x27787a+0x1)%_0x1a7505;}function _0x4a3e8f(_0x45bd65){const _0x270cf7=_0x302a,_0x329df2=[];for(let _0x7e9f0e=0x0;_0x7e9f0e<_0x1a7505;_0x7e9f0e++){const _0x7e053f=_0x54a3be[(_0x27787a-0x1-_0x7e9f0e+_0x1a7505*0x2)%_0x1a7505];if(!_0x7e053f)continue;_0x329df2[_0x270cf7(0x1ad)](_0x7e053f);if(_0x329df2['length']>=_0x45bd65)break;}return _0x329df2;}function _0x50f8b5(_0x1742c5){const _0x2324ec=_0x302a;try{process[_0x2324ec(0x19e)]['write'](_0x1742c5+'\x0a');}catch{}if(_0x1a0afe)try{_0x1823e2[_0x2324ec(0x1dc)](_0x477dfb[_0x2324ec(0x261)](_0x1a0afe,_0x2324ec(0x18a)+process[_0x2324ec(0xe0)]+_0x2324ec(0x102)),_0x1742c5+'\x0a');}catch{}}function _0x26053c(_0x500deb){const _0x594209=_0x302a,_0x5daf25=_0x4a3e8f(_0x500deb);if(!_0x5daf25[_0x594209(0x136)])return _0x594209(0x1ac);const _0x274724=Date[_0x594209(0x1c0)]();return _0x5daf25[_0x594209(0x279)](_0x4c2cb9=>{const _0xe64326=_0x594209,_0x5997e2=_0xe64326(0x28b)+_0x4c2cb9['seq']+'\x20-'+(_0x274724-_0x4c2cb9['t'])+_0xe64326(0x18f)+_0x4c2cb9[_0xe64326(0x2cb)]+'\x20'+_0x4c2cb9[_0xe64326(0x26e)];return _0x4c2cb9['stack']&&_0x4c2cb9[_0xe64326(0xb7)][_0xe64326(0x136)]?_0x5997e2+'\x0a\x20\x20\x20\x20\x20\x20'+_0x4c2cb9[_0xe64326(0xb7)][_0xe64326(0x261)](_0xe64326(0xc6)):_0x5997e2;})['join']('\x0a');}function _0x4838d6(_0x4a9188,_0x1aa2ad){const _0x4e9c22=_0x302a,_0x5e522f=_0x4e9c22(0x168)+_0x4a9188+_0x4e9c22(0xaf)+new Date()[_0x4e9c22(0x108)]()+_0x4e9c22(0xb1)+process[_0x4e9c22(0xe0)]+'\x20===',_0x2b1d44=[_0x5e522f,_0x4e9c22(0x250)+(_0x1aa2ad&&_0x1aa2ad['stack']?_0x1aa2ad[_0x4e9c22(0xb7)]['split']('\x0a')[0x0]:_0x1aa2ad),_0x4e9c22(0x1e0)+(_0x37a234?'':_0x4e9c22(0x15b))+':',_0x26053c(0x18),_0x23c0fc(),'='['repeat'](_0x5e522f[_0x4e9c22(0x136)]-0x1)];_0x50f8b5(_0x2b1d44[_0x4e9c22(0x261)]('\x0a'));}function _0x32ea44(_0x4e7608){const _0x3b3769=_0x302a;if(!_0xb9d7c0())return;const _0x4a6a81=String(_0x4e7608&&_0x4e7608[_0x3b3769(0x2c7)]||_0x4e7608||''),_0x3e3edc=/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x4a6a81);_0x4838d6(_0x3e3edc?'ORPHAN\x20(env-closed\x20write)':_0x3b3769(0x2c8),_0x4e7608);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x3e3edc)return;try{console[_0x3b3769(0x1f4)](_0x4e7608&&_0x4e7608[_0x3b3769(0xb7)]?_0x4e7608[_0x3b3769(0xb7)]:_0x4e7608);}catch{}process[_0x3b3769(0x2b3)](0x1);}function _0x143ade(_0x1ecc1c){const _0x5386ba=_0x302a;if(!_0xb9d7c0())return;const _0x1af2ee=String(_0x1ecc1c&&_0x1ecc1c[_0x5386ba(0x2c7)]||_0x1ecc1c||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x1af2ee)&&_0x4838d6(_0x5386ba(0x28f),_0x1ecc1c);}function _0x23c0fc(){const _0x259ad5=_0x302a,_0x466531=[_0x259ad5(0x2da)];let _0x20da5b=![];for(const _0xb449ab of _0x188677){const _0x254d7c=_0xb449ab&&_0xb449ab[_0x259ad5(0x2ae)];if(!_0x254d7c)continue;for(const [_0x459253,_0xd12d32]of _0x254d7c){const _0x5739dc=_0xd12d32&&_0xd12d32['_coordinator']&&_0xd12d32['_coordinator'][_0x259ad5(0x148)];if(!_0x5739dc)continue;let _0x292bb2,_0x24eb90;try{_0x292bb2=Atomics[_0x259ad5(0xde)](_0x5739dc,0x0),_0x24eb90=Atomics[_0x259ad5(0xde)](_0x5739dc,0x1);}catch{continue;}if(_0x292bb2===0x0)continue;_0x20da5b=!![];const _0x39f638=_0x292bb2>0x0?_0x259ad5(0x173):'copy',_0x52825c=Date[_0x259ad5(0x1c0)]()-Math[_0x259ad5(0x23c)](_0x292bb2)*0x3e8,_0x30cc30=((()=>{const _0x56fe84=_0x259ad5;try{return _0xd12d32[_0x56fe84(0x154)]&&_0xd12d32[_0x56fe84(0x154)][_0x56fe84(0x1b6)]?_0xd12d32[_0x56fe84(0x154)][_0x56fe84(0x1b6)]():null;}catch{return null;}})());_0x466531[_0x259ad5(0x1ad)](_0x259ad5(0xc7)+_0x459253+_0x259ad5(0x138)+_0x39f638+_0x259ad5(0x22f)+_0x52825c+_0x259ad5(0x2e5)+_0x24eb90+(_0x30cc30?_0x259ad5(0xcb)+_0x30cc30[_0x259ad5(0xdc)]+'\x20oldestPendingMs='+_0x30cc30[_0x259ad5(0x10d)]+_0x259ad5(0x29a)+_0x30cc30[_0x259ad5(0x283)]+'}':''));}}if(!_0x20da5b)_0x466531[_0x259ad5(0x1ad)](_0x259ad5(0x1e7));return _0x466531[_0x259ad5(0x261)]('\x0a');}function _0x382ef8(){const _0x43cf1f=_0x302a;if(!_0xb9d7c0())return;const _0x550e47=Math[_0x43cf1f(0x24a)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x23086a=Date['now']();for(const _0x30c023 of _0x188677){const _0x2dc33f=_0x30c023&&_0x30c023['_envs'];if(!_0x2dc33f)continue;for(const [_0x29e63c,_0x2a3027]of _0x2dc33f){const _0x4156a7=_0x2a3027&&_0x2a3027[_0x43cf1f(0xba)]&&_0x2a3027[_0x43cf1f(0xba)][_0x43cf1f(0x148)];if(!_0x4156a7)continue;let _0x33b245;try{_0x33b245=Atomics[_0x43cf1f(0xde)](_0x4156a7,0x0);}catch{continue;}const _0x204366=_0x30c023[_0x43cf1f(0x2e4)]+'|'+_0x29e63c;if(_0x33b245<=0x0){_0x59f596[_0x43cf1f(0xd3)](_0x204366);continue;}const _0xd0b29=_0x23086a-_0x33b245*0x3e8,_0x34fca9=_0x59f596[_0x43cf1f(0xf2)](_0x204366);if(_0xd0b29<_0x550e47)continue;if(_0x34fca9&&_0x23086a-_0x34fca9[_0x43cf1f(0x10c)]<_0x550e47)continue;_0x59f596[_0x43cf1f(0x2bb)](_0x204366,{'firstTs':_0x34fca9?_0x34fca9['firstTs']:_0x33b245,'dumpedAt':_0x23086a});const _0x518afc='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0xd0b29+_0x43cf1f(0xd9)+_0x29e63c+_0x43cf1f(0xaf)+new Date()[_0x43cf1f(0x108)]()+'\x20pid='+process[_0x43cf1f(0xe0)]+_0x43cf1f(0x15c);_0x50f8b5([_0x518afc,_0x23c0fc(),'='[_0x43cf1f(0xc3)](_0x518afc[_0x43cf1f(0x136)]-0x1)][_0x43cf1f(0x261)]('\x0a'));}}}function _0x495d90(){const _0xe7ba1c=_0x302a;if(!_0xb9d7c0()||_0x165fbf)return;_0x165fbf=!![],process[_0xe7ba1c(0xf6)](_0xe7ba1c(0x2c8),_0x32ea44),process[_0xe7ba1c(0xf6)]('unhandledRejection',_0x143ade);const _0x2e876a=Math[_0xe7ba1c(0x24a)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x107dad=setInterval(_0x382ef8,_0x2e876a);if(_0x107dad[_0xe7ba1c(0x2b4)])_0x107dad['unref']();}function _0x7cc3c0(_0x55a122){const _0x11f82c=_0x302a;if(!_0xb9d7c0()||!_0x55a122)return;_0x188677[_0x11f82c(0x1ff)](_0x55a122),_0x495d90();}function _0xa57e6b(_0x2fd108){const _0x539064=_0x302a;_0x188677[_0x539064(0xd3)](_0x2fd108);}function _0x4a005e(){if(!_0xb9d7c0())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x37a234,'recentWrites':_0x4a3e8f(0x10),'drain':_0x23c0fc()};}return okdbDiag={'isEnabled':_0xb9d7c0,'recordWrite':_0x1c8c5d,'installDiag':_0x495d90,'registerOkdb':_0x7cc3c0,'unregisterOkdb':_0xa57e6b,'snapshot':_0x4a005e},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0xc70012=_0x2ee730;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0xeab2d3}=require$$0$2,_0x29b108=requireOkdbDiag(),_0x2b1a30=process.env.OKDB_COMMIT_MODE===_0xc70012(0xd7);class _0x2f64d8{constructor(_0x2302a8){const _0x3d3e53=_0xc70012;this[_0x3d3e53(0x2cb)]=_0x2302a8,this[_0x3d3e53(0x27b)]=new Set(),this[_0x3d3e53(0x180)]=new Map(),this[_0x3d3e53(0x1ca)]=0x0,this[_0x3d3e53(0x133)]=[],this[_0x3d3e53(0xf8)]=[],this['_highWater']=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this['_bpWaiters']=[],this[_0x3d3e53(0x163)]=0x0,this['_held']=null,this[_0x3d3e53(0xdf)]=0x0,this[_0x3d3e53(0x1e5)]=0x0,this[_0x3d3e53(0x2d5)]=![];}async[_0xc70012(0x2ba)](_0x2e5ca0,_0x37a0da,_0x20b977={}){const _0x43c062=_0xc70012;for(let _0x4d2548=0x1;;_0x4d2548++){try{return await this[_0x43c062(0x234)](_0x2e5ca0,_0x37a0da,_0x20b977);}catch(_0x3db6){if(_0x3db6?.[_0x43c062(0x286)]!==_0x43c062(0x2ca)||_0x20b977[_0x43c062(0x2b6)]||_0x4d2548>=0x5)throw _0x3db6;this[_0x43c062(0x2cb)][_0x43c062(0x218)](_0x3db6['indexType']);}}}async[_0xc70012(0x234)](_0x266403,_0x54afd9,{admitted:admitted=![]}={}){const _0x355410=_0xc70012;if(_0x29b108[_0x355410(0xfb)]())_0x29b108[_0x355410(0x171)](this[_0x355410(0x2cb)]?.['name'],_0x54afd9);if(this['_closed']){const _0x21fd32=new Error(_0x355410(0x129));_0x21fd32['code']=_0x355410(0x176);throw _0x21fd32;}if(this[_0x355410(0x238)]>0x0){let _0x45c13b=![];while(this['_outstanding']>=this[_0x355410(0x238)]&&!this[_0x355410(0x161)]){!_0x45c13b&&(_0x45c13b=!![],this[_0x355410(0x163)]++),await new Promise(_0x7c5939=>this['_bpWaiters']['push'](_0x7c5939));}if(this[_0x355410(0x161)]){const _0x250d02=new Error(_0x355410(0x129));_0x250d02[_0x355410(0x286)]='ENV_CLOSING_RETRY';throw _0x250d02;}}this[_0x355410(0x146)]++;const _0x358e8c=admitted?null:this[_0x355410(0x2cb)][_0x355410(0xba)];for(;;){while(this['_held'])await this['_held'];if(_0x358e8c)try{await _0x358e8c[_0x355410(0x126)]();}catch(_0x477326){this['_outstanding']--;if(this[_0x355410(0xe6)]['length']&&this['_outstanding']<this['_highWater'])this[_0x355410(0xe6)][_0x355410(0x188)]()();throw _0x477326;}if(!this[_0x355410(0x263)])break;if(_0x358e8c)_0x358e8c[_0x355410(0x270)]();}if(this[_0x355410(0x161)]){if(_0x358e8c)_0x358e8c['afterWrite']();this['_outstanding']--;if(this[_0x355410(0xe6)]['length']&&this['_outstanding']<this['_highWater'])this[_0x355410(0xe6)][_0x355410(0x188)]()();const _0x5aeadb=new Error(_0x355410(0x129));_0x5aeadb[_0x355410(0x286)]=_0x355410(0x176);throw _0x5aeadb;}const _0x164fab=_0xeab2d3['now']();if(_0x2b1a30)try{const _0x85235d=this['env']['db'][_0x355410(0x1bd)](_0x266403);this[_0x355410(0x1ca)]++;if(this[_0x355410(0x133)][_0x355410(0x1ad)](_0xeab2d3[_0x355410(0x1c0)]()-_0x164fab)>0x100)this[_0x355410(0x133)][_0x355410(0x188)]();if(this['_done'][_0x355410(0x1ad)](_0xeab2d3['now']())>0x800)this['_done'][_0x355410(0x188)]();return _0x85235d;}finally{this[_0x355410(0x146)]--;if(this['_bpWaiters'][_0x355410(0x136)]&&this[_0x355410(0x146)]<this[_0x355410(0x238)])this[_0x355410(0xe6)]['shift']()();if(_0x358e8c)_0x358e8c['afterWrite']();}let _0x35309f=null;const _0x111f63=()=>{const _0x398e87=_0x355410,_0x2d772b=_0x266403();if(_0x2d772b&&typeof _0x2d772b[_0x398e87(0x1e2)]===_0x398e87(0x1d3)&&!_0x35309f){this[_0x398e87(0xdf)]++;let _0x4cf521;const _0x50525f=new Promise(_0x1c8e4e=>_0x4cf521=_0x1c8e4e);this[_0x398e87(0x263)]=_0x50525f,_0x35309f=()=>{const _0x349d77=_0x398e87;if(this[_0x349d77(0x263)]===_0x50525f)this[_0x349d77(0x263)]=null;_0x4cf521();};}return _0x2d772b;};let _0x236e5e;try{_0x236e5e=this[_0x355410(0x2cb)]['db'][_0x355410(0x268)](_0x111f63);}catch(_0x465872){_0x236e5e=Promise[_0x355410(0x1bf)](_0x465872);}(!_0x236e5e||typeof _0x236e5e[_0x355410(0x1e2)]!=='function')&&(this[_0x355410(0x1e5)]++,!this['_nestedWarned']&&(this[_0x355410(0x2d5)]=!![],console[_0x355410(0x2c5)](_0x355410(0x199)+(this['env']?.['name']??'?')+_0x355410(0x24c))),_0x236e5e=Promise[_0x355410(0x23d)](_0x236e5e));const _0x5c375c=()=>{if(_0x35309f)_0x35309f();};_0x236e5e[_0x355410(0x1e2)](_0x5c375c,_0x5c375c),this['_inflight'][_0x355410(0x1ff)](_0x236e5e),this['_enqueuedAt'][_0x355410(0x2bb)](_0x236e5e,_0x164fab);const _0x5bd24c=()=>{const _0x5d4e3e=_0x355410;this[_0x5d4e3e(0x27b)]['delete'](_0x236e5e),this[_0x5d4e3e(0x180)][_0x5d4e3e(0xd3)](_0x236e5e),this[_0x5d4e3e(0x1ca)]++,this[_0x5d4e3e(0x146)]--;this[_0x5d4e3e(0xe6)][_0x5d4e3e(0x136)]&&this[_0x5d4e3e(0x146)]<this['_highWater']&&this['_bpWaiters'][_0x5d4e3e(0x188)]()();if(this['_durs'][_0x5d4e3e(0x1ad)](_0xeab2d3[_0x5d4e3e(0x1c0)]()-_0x164fab)>0x100)this[_0x5d4e3e(0x133)][_0x5d4e3e(0x188)]();if(this[_0x5d4e3e(0xf8)][_0x5d4e3e(0x1ad)](_0xeab2d3[_0x5d4e3e(0x1c0)]())>0x800)this[_0x5d4e3e(0xf8)][_0x5d4e3e(0x188)]();};_0x236e5e[_0x355410(0x1e2)](_0x5bd24c,_0x5bd24c);try{return await _0x236e5e;}finally{if(_0x358e8c)_0x358e8c[_0x355410(0x270)]();}}[_0xc70012(0x1b6)](){const _0x51d022=_0xc70012,_0xcf67cb=_0xeab2d3[_0x51d022(0x1c0)]();let _0x33a118=0x0;for(const _0x5e38f1 of this['_enqueuedAt'][_0x51d022(0x226)]()){const _0x1fdff4=_0xcf67cb-_0x5e38f1;if(_0x1fdff4>_0x33a118)_0x33a118=_0x1fdff4;}let _0x38aa88=0x0;for(let _0x11bc46=this[_0x51d022(0xf8)][_0x51d022(0x136)]-0x1;_0x11bc46>=0x0;_0x11bc46--){if(_0xcf67cb-this[_0x51d022(0xf8)][_0x11bc46]>0x3e8)break;_0x38aa88++;}let _0xfe5ca7=0x0;if(this[_0x51d022(0x133)][_0x51d022(0x136)]){const _0x4eca0d=[...this['_durs']]['sort']((_0x509387,_0x5f5718)=>_0x509387-_0x5f5718);_0xfe5ca7=_0x4eca0d[Math[_0x51d022(0x1b7)](_0x4eca0d[_0x51d022(0x136)]-0x1,Math['floor'](_0x4eca0d[_0x51d022(0x136)]*0.99))];}return{'depth':this['_inflight'][_0x51d022(0x252)],'oldestPendingMs':Math[_0x51d022(0x153)](_0x33a118),'committed':this['_committed'],'commitsPerSec':_0x38aa88,'commitP99Ms':Math[_0x51d022(0x153)](_0xfe5ca7),'parkedNow':this[_0x51d022(0xe6)][_0x51d022(0x136)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x51d022(0x238)]};}[_0xc70012(0xb9)](){const _0x27eb49=_0xc70012,_0xed8b3e=_0xeab2d3[_0x27eb49(0x1c0)]();return[...this[_0x27eb49(0x180)][_0x27eb49(0x226)]()][_0x27eb49(0x279)](_0x2bc187=>Math[_0x27eb49(0x153)](_0xed8b3e-_0x2bc187))[_0x27eb49(0x16f)]((_0x535048,_0x52aed4)=>_0x52aed4-_0x535048);}['markClosed'](){const _0x28ec90=_0xc70012;this[_0x28ec90(0x161)]=!![];for(const _0x3d8eb7 of this[_0x28ec90(0xe6)][_0x28ec90(0x1f1)](0x0))_0x3d8eb7();}async[_0xc70012(0x12b)](){const _0xc1939c=_0xc70012;let _0x47a437=0x0;while(this['_inflight'][_0xc1939c(0x252)]&&_0x47a437++<0x3e8){await Promise[_0xc1939c(0x14e)]([...this[_0xc1939c(0x27b)]]);}}async[_0xc70012(0x275)](_0x31ee7d,_0x3d7f56,_0xcec828,_0x75bc14){const _0x15c3bf=_0xc70012;return this[_0x15c3bf(0x2ba)](()=>{const _0x188d1f=_0x15c3bf;if(_0x75bc14===undefined)_0x31ee7d[_0x188d1f(0x1a1)](_0x3d7f56,_0xcec828);else _0x31ee7d['putSync'](_0x3d7f56,_0xcec828,_0x75bc14);},'raw-put');}async[_0xc70012(0x1b0)](_0x5edc38,_0x27d165){const _0x2e7b1c=_0xc70012;return this[_0x2e7b1c(0x2ba)](()=>_0x5edc38['removeSync'](_0x27d165),_0x2e7b1c(0x149));}}async function _0x1a6f70(_0x44cb1b,_0x3d175b){const _0x26e74d=_0xc70012;if(_0x3d175b==null)_0x3d175b=Math[_0x26e74d(0x24a)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x487cef=_0x44cb1b?.[_0x26e74d(0x28e)];if(!_0x487cef||typeof _0x487cef['then']!==_0x26e74d(0x1d3))return;await Promise[_0x26e74d(0x170)]([Promise[_0x26e74d(0x23d)](_0x487cef)['catch'](()=>{}),new Promise(_0x40bfbf=>{const _0x1d13e3=_0x26e74d,_0x1dbac5=setTimeout(_0x40bfbf,_0x3d175b);if(_0x1dbac5[_0x1d13e3(0x2b4)])_0x1dbac5[_0x1d13e3(0x2b4)]();})]);}catch{}}function _0xa8e2fa(_0x2eba7b){const _0x1699dc=_0xc70012;if(_0x2b1a30)return Promise[_0x1699dc(0x23d)]();const _0x34b858=_0x2eba7b?.[_0x1699dc(0x2c6)];return _0x34b858&&typeof _0x34b858[_0x1699dc(0x1e2)]===_0x1699dc(0x1d3)?_0x34b858:Promise[_0x1699dc(0x23d)]();}const _0x2fab71=Math[_0xc70012(0x24a)](0x1,Math[_0xc70012(0x1be)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0xd62e2=Math[_0xc70012(0x24a)](0x1,_0x2fab71-0x2);let _0x3f0914=0x0;const _0x41ade1=[];async function _0x4a2203(_0x1e3ade){const _0x1b79ff=_0xc70012;if(_0x3f0914<_0xd62e2)_0x3f0914++;else await new Promise(_0x55166e=>_0x41ade1['push'](_0x55166e));try{return await _0x1e3ade();}finally{const _0x545060=_0x41ade1[_0x1b79ff(0x188)]();if(_0x545060)_0x545060();else _0x3f0914--;}}return okdbWriter[_0xc70012(0x1fa)]=_0x2f64d8,okdbWriter[_0xc70012(0x1fa)]['withPoolHold']=_0x4a2203,okdbWriter['exports']['MAX_POOL_HOLDS']=_0xd62e2,okdbWriter['exports']['flushLmdb']=_0x1a6f70,okdbWriter['exports'][_0xc70012(0x2c6)]=_0xa8e2fa,okdbWriter[_0xc70012(0x1fa)]['SYNC_COMMITS']=_0x2b1a30,okdbWriter[_0xc70012(0x1fa)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x3d8dc7=_0x2ee730;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4db2d0=require$$0$3,{clampTimerDelay:_0x39e3b0}=requireOkdbTimers(),{SYNC_COMMITS:_0x57c709}=requireOkdbWriter(),_0x11c8fd=_0x3d8dc7(0x143);class _0x374f4{constructor(_0x84cf0a,_0x2dd55a,_0x546427){const _0x4700bb=_0x3d8dc7;this['_lock']=_0x84cf0a,this['_key']=_0x2dd55a,this[_0x4700bb(0x1c7)]=_0x546427,this[_0x4700bb(0x299)]=![],this[_0x4700bb(0x1ea)]=null,this[_0x4700bb(0x23e)]=null;}[_0x3d8dc7(0x11b)](){const _0x5e1bd4=_0x3d8dc7;if(this[_0x5e1bd4(0x299)])return![];try{const _0x42316c=this['_lock']['_db']()[_0x5e1bd4(0xf2)](this['_key']);if(!_0x42316c||_0x42316c[_0x5e1bd4(0xeb)]!==this['_acquiredAt'])return![];const _0x39ed73=_0x42316c[_0x5e1bd4(0x221)]??_0x42316c['acquiredAt'];if(_0x39ed73+_0x42316c[_0x5e1bd4(0x2d2)]<Date[_0x5e1bd4(0x1c0)]())return![];return!![];}catch{return!this['_released'];}}['holder'](){const _0x30f089=_0x3d8dc7;if(this['_released'])return null;try{return this['_lock'][_0x30f089(0x209)]()[_0x30f089(0xf2)](this[_0x30f089(0x187)])??null;}catch{return null;}}async[_0x3d8dc7(0x132)](_0x38f1e4){const _0x1360e4=_0x3d8dc7;if(this[_0x1360e4(0x299)])return;try{if(this['_lock'][_0x1360e4(0x161)]())return;const _0x3c98bc=this[_0x1360e4(0x262)][_0x1360e4(0x209)]()['get'](this[_0x1360e4(0x187)]);if(!_0x3c98bc||_0x3c98bc[_0x1360e4(0xeb)]!==this[_0x1360e4(0x1c7)])return;if(_0x57c709)this['_lock']['_db']()[_0x1360e4(0x1a1)](this['_key'],{..._0x3c98bc,'ttlMs':_0x3c98bc[_0x1360e4(0x2d2)]+_0x38f1e4});else await this[_0x1360e4(0x262)][_0x1360e4(0x209)]()[_0x1360e4(0x275)](this[_0x1360e4(0x187)],{..._0x3c98bc,'ttlMs':_0x3c98bc[_0x1360e4(0x2d2)]+_0x38f1e4});}catch{}}async[_0x3d8dc7(0x157)](){const _0x27e34f=_0x3d8dc7;if(this[_0x27e34f(0x299)])return;if(this[_0x27e34f(0x23e)])try{await this[_0x27e34f(0x23e)];}catch{}clearInterval(this[_0x27e34f(0x1ea)]),this[_0x27e34f(0x1ea)]=null,this[_0x27e34f(0x299)]=!![];try{if(this[_0x27e34f(0x262)][_0x27e34f(0x161)]())return;const _0x5e503a=this[_0x27e34f(0x262)][_0x27e34f(0x209)]()[_0x27e34f(0xf2)](this['_key']);if(_0x5e503a&&_0x5e503a['acquiredAt']===this[_0x27e34f(0x1c7)]){if(_0x57c709)this['_lock']['_db']()[_0x27e34f(0x237)](this['_key']);else await this[_0x27e34f(0x262)]['_db']()[_0x27e34f(0x1b0)](this[_0x27e34f(0x187)]);}}catch{}}[_0x3d8dc7(0x2a2)](_0x46981c,_0x313b50){const _0x5b848d=_0x3d8dc7,_0x5a519e=_0x39e3b0(_0x313b50??Math[_0x5b848d(0x1be)](_0x46981c/0x3));this['_heartbeatTimer']=setInterval(()=>{const _0x2703ec=_0x5b848d;if(this[_0x2703ec(0x299)])return;this[_0x2703ec(0x23e)]=((async()=>{const _0x4d8b9f=_0x2703ec;try{if(this['_lock'][_0x4d8b9f(0x161)]())return;const _0x449921=this[_0x4d8b9f(0x262)][_0x4d8b9f(0x209)]()[_0x4d8b9f(0xf2)](this[_0x4d8b9f(0x187)]);if(!_0x449921||_0x449921['acquiredAt']!==this[_0x4d8b9f(0x1c7)]){this[_0x4d8b9f(0x299)]=!![],clearInterval(this[_0x4d8b9f(0x1ea)]),this[_0x4d8b9f(0x1ea)]=null;return;}if(_0x57c709)this[_0x4d8b9f(0x262)][_0x4d8b9f(0x209)]()[_0x4d8b9f(0x1a1)](this[_0x4d8b9f(0x187)],{..._0x449921,'updatedAt':Date[_0x4d8b9f(0x1c0)]()});else await this[_0x4d8b9f(0x262)]['_db']()[_0x4d8b9f(0x275)](this['_key'],{..._0x449921,'updatedAt':Date['now']()});}catch{}this[_0x4d8b9f(0x23e)]=null;})());},_0x5a519e);if(this[_0x5b848d(0x1ea)][_0x5b848d(0x2b4)])this[_0x5b848d(0x1ea)]['unref']();}}class _0x55f5ec{constructor(_0x4feee8,{namespace:_0x11d4b6,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x499e58=_0x3d8dc7;this[_0x499e58(0x11e)]=_0x4feee8,this[_0x499e58(0x241)]=_0x11d4b6,this[_0x499e58(0x2d2)]=ttlMs,this[_0x499e58(0x177)]=heartbeatMs,this[_0x499e58(0x1da)]=null;}['_db'](){const _0x1ba020=_0x3d8dc7;return this[_0x1ba020(0x142)](),(!this[_0x1ba020(0x1da)]||this['_lockDbOf']!==this['_rawDb'])&&(this[_0x1ba020(0x1da)]=this[_0x1ba020(0x11e)][_0x1ba020(0x293)](_0x11c8fd,{'dupSort':![]}),this['_lockDbOf']=this[_0x1ba020(0x11e)]),this['_lockDb'];}[_0x3d8dc7(0x15f)](){const _0x390578=_0x3d8dc7;return this[_0x390578(0x142)](),(!this[_0x390578(0x13e)]||this['_wantDbOf']!==this[_0x390578(0x11e)])&&(this[_0x390578(0x13e)]=this[_0x390578(0x11e)][_0x390578(0x293)](_0x11c8fd+':want',{'dupSort':![]}),this[_0x390578(0x217)]=this[_0x390578(0x11e)]),this[_0x390578(0x13e)];}[_0x3d8dc7(0x161)](){const _0x44c1b9=_0x3d8dc7,_0x3f649f=this[_0x44c1b9(0x11e)]?.[_0x44c1b9(0x1b6)];return _0x3f649f===_0x44c1b9(0x164)||_0x3f649f===_0x44c1b9(0x200);}[_0x3d8dc7(0x142)](){const _0x963650=_0x3d8dc7;if(this['_closed']())throw new Error(_0x963650(0xcc));}[_0x3d8dc7(0x187)](_0x5e2f9b){const _0x1ee85a=_0x3d8dc7;return this[_0x1ee85a(0x241)]+':'+_0x5e2f9b;}[_0x3d8dc7(0x247)](_0x438416){const _0x45182e=_0x3d8dc7;try{if(this[_0x45182e(0x161)]())return;_0x57c709?this[_0x45182e(0x15f)]()[_0x45182e(0x1a1)](this[_0x45182e(0x187)](_0x438416),Date['now']()):this[_0x45182e(0x15f)]()[_0x45182e(0x275)](this['_key'](_0x438416),Date[_0x45182e(0x1c0)]())?.[_0x45182e(0x2b1)]?.(()=>{});}catch{}}['isWanted'](_0x35249a,_0xdbdc3d=0x3e8){const _0xb8861e=_0x3d8dc7;try{const _0x959123=this[_0xb8861e(0x15f)]()[_0xb8861e(0xf2)](this[_0xb8861e(0x187)](_0x35249a));return typeof _0x959123==='number'&&Date[_0xb8861e(0x1c0)]()-_0x959123<_0xdbdc3d;}catch{return![];}}[_0x3d8dc7(0x20f)](_0x551b61){const _0x1c54be=_0x3d8dc7,_0x52f1b1=_0x551b61[_0x1c54be(0x221)]??_0x551b61[_0x1c54be(0xeb)];return _0x52f1b1+_0x551b61['ttlMs']<Date[_0x1c54be(0x1c0)]();}static['_holderDead'](_0x908ba5){const _0x4ad916=_0x3d8dc7,_0x1bc741=_0x908ba5?.[_0x4ad916(0x28c)];if(!_0x1bc741||typeof _0x1bc741[_0x4ad916(0xe0)]!==_0x4ad916(0x24b))return![];if(_0x1bc741[_0x4ad916(0x1cf)]!==_0x4db2d0[_0x4ad916(0x1cf)]())return![];if(_0x1bc741[_0x4ad916(0xe0)]===process[_0x4ad916(0xe0)])return![];try{return process[_0x4ad916(0x2ce)](_0x1bc741[_0x4ad916(0xe0)],0x0),![];}catch(_0x40143b){return _0x40143b[_0x4ad916(0x286)]===_0x4ad916(0x16e);}}async['tryAcquire'](_0x10c554,_0x20f641={},_0x3a677b={}){const _0x3c6415=_0x3d8dc7,_0x46d987=this[_0x3c6415(0x187)](_0x10c554),_0x1353d7=_0x3a677b['ttlMs']??this['ttlMs'],_0x48e7b5=Date[_0x3c6415(0x1c0)](),_0x5f273f={'holder':{'pid':process[_0x3c6415(0xe0)],'hostname':_0x4db2d0[_0x3c6415(0x1cf)](),..._0x20f641},'acquiredAt':_0x48e7b5,'updatedAt':_0x48e7b5,'ttlMs':_0x1353d7};let _0x148aec=![],_0xf4162f=null;if(this['_closed']())return{'acquired':![],'handle':null,'current':null};try{const _0x4c5968=()=>{const _0x82b009=_0x3c6415,_0x4782a9=this[_0x82b009(0x209)]()[_0x82b009(0xf2)](_0x46d987);if(_0x4782a9&&!this[_0x82b009(0x20f)](_0x4782a9)&&!_0x55f5ec[_0x82b009(0x13f)](_0x4782a9)){const _0x4688ed=_0x20f641[_0x82b009(0x162)]!=null&&_0x4782a9[_0x82b009(0x28c)][_0x82b009(0xe0)]===process[_0x82b009(0xe0)]&&_0x4782a9[_0x82b009(0x28c)][_0x82b009(0x162)]===_0x20f641[_0x82b009(0x162)];if(!_0x4688ed){_0x148aec=![],_0xf4162f=_0x4782a9;return;}_0x5f273f[_0x82b009(0xeb)]<=_0x4782a9['acquiredAt']&&(_0x5f273f['acquiredAt']=_0x4782a9['acquiredAt']+0x1,_0x5f273f['updatedAt']=_0x5f273f[_0x82b009(0xeb)]);}this['_db']()[_0x82b009(0x275)](_0x46d987,_0x5f273f),_0x148aec=!![],_0xf4162f=_0x5f273f;};if(_0x57c709)this['_db']()[_0x3c6415(0x1bd)](_0x4c5968);else await this[_0x3c6415(0x209)]()[_0x3c6415(0x268)](_0x4c5968);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x148aec)return{'acquired':![],'handle':null,'current':_0xf4162f};const _0x594e8e=new _0x374f4(this,_0x46d987,_0x5f273f[_0x3c6415(0xeb)]);return _0x594e8e[_0x3c6415(0x2a2)](_0x1353d7,this[_0x3c6415(0x177)]),{'acquired':!![],'handle':_0x594e8e,'current':_0xf4162f};}[_0x3d8dc7(0xb4)](_0x40accf){const _0x32c59d=_0x3d8dc7;try{return this[_0x32c59d(0x209)]()[_0x32c59d(0xf2)](this['_key'](_0x40accf))??null;}catch{return null;}}[_0x3d8dc7(0x2dc)](){const _0x331123=_0x3d8dc7,_0x2ed93a=this['namespace']+':',_0x45f04d=[];try{for(const {key:_0x212905,value:_0x39c1ba}of this['_db']()['getRange']({'start':_0x2ed93a,'end':_0x2ed93a+'\xff'})){typeof _0x212905===_0x331123(0x19d)&&_0x212905['startsWith'](_0x2ed93a)&&_0x45f04d[_0x331123(0x1ad)]({'id':_0x212905[_0x331123(0x208)](_0x2ed93a[_0x331123(0x136)]),'entry':_0x39c1ba});}}catch{}return _0x45f04d;}static['listAll'](_0x2542bd){const _0x4c6700=_0x3d8dc7,_0x5ec3a4=[];try{const _0x5bee02=_0x2542bd[_0x4c6700(0x293)](_0x11c8fd,{'dupSort':![]});for(const {key:_0x4db89e,value:_0x3a7444}of _0x5bee02[_0x4c6700(0x1ae)]({})){if(typeof _0x4db89e!==_0x4c6700(0x19d))continue;const _0x40f900=_0x4db89e[_0x4c6700(0x259)](':');if(_0x40f900<0x1)continue;_0x5ec3a4['push']({'namespace':_0x4db89e['slice'](0x0,_0x40f900),'id':_0x4db89e[_0x4c6700(0x208)](_0x40f900+0x1),'entry':_0x3a7444});}}catch{}return _0x5ec3a4;}}return okdbLock={'OKDBLock':_0x55f5ec},okdbLock;}var version='2.7.0',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x4f806b=_0x2ee730;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x259d8d=require$$0$3,_0x330ec8=require$$1$1,_0x3b6071=require$$2,{LOOP:_0x2fe424}=requireOkdbLoopMonitor(),{OKDBLock:_0x29c247}=requireOkdbLock(),{SYNC_COMMITS:_0x5096c4}=requireOkdbWriter(),_0x2ef1f8=_0x4f806b(0x197),_0x5242e4=_0x4f806b(0x2e6),_0x5c3736='~processes:desired',_0x3989e7=_0x4f806b(0xc4),_0x1145fc=(_0x4e2311,_0x586323)=>_0x4e2311+':'+_0x586323,_0x286144=(_0x13e347,_0x286e42)=>_0x13e347+'::'+_0x286e42,_0x23b77e=(_0x39716c,_0x200b43)=>_0x39716c+'/'+_0x200b43,_0x10c28c=(_0x178c1e,_0xc1fccd)=>_0x178c1e+'#'+_0xc1fccd,_0x34c50f=_0x131e2e=>{const _0xc13b05=_0x4f806b;if(_0x131e2e?.[_0xc13b05(0x2de)])return _0x131e2e[_0xc13b05(0x2de)];const _0x40675e=_0x131e2e?.[_0xc13b05(0x1a4)];return typeof _0x40675e===_0xc13b05(0x19d)&&_0x40675e[_0xc13b05(0x289)]('#')?_0x40675e[_0xc13b05(0x208)](0x0,_0x40675e['indexOf']('#')):_0x40675e;},_0x15f37d=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x436944=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x3ccaff=_0x15f37d*0x3,_0x37f977=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x3ccaff*0x14),_0x5b65af=['processor:progress',_0x4f806b(0x10a),'processor:retry','processor:error',_0x4f806b(0x189),'processor:resumed'];let _0x881118=null;function _0x4349fc(){const _0x8dc6d3=_0x4f806b;if(_0x881118==null)_0x881118=Math[_0x8dc6d3(0x153)]((Date[_0x8dc6d3(0x1c0)]()-process[_0x8dc6d3(0x20a)]()*0x3e8)/0x3e8)*0x3e8;return _0x881118;}function _0x58e3ef(_0x16b7da){const _0x408d3d=_0x4f806b;if(process.env.OKDB_PROCESS_KILL===_0x408d3d(0x282))return![];if(_0x16b7da?.[_0x408d3d(0x1b1)]?.['processes']&&typeof _0x16b7da[_0x408d3d(0x1b1)][_0x408d3d(0x2a0)]===_0x408d3d(0x144)&&_0x16b7da['options'][_0x408d3d(0x2a0)][_0x408d3d(0x2ce)]===![])return![];return!![];}function _0x2198aa(_0x1550f7,_0x108b9f){const _0x276f7f=_0x4f806b,_0x83bf5=!!_0x108b9f?.[_0x276f7f(0x1f3)];switch(_0x1550f7){case _0x276f7f(0x27c):return{'controllable':_0x83bf5,'decommissionable':![],'killable':!![],'killConfirm':_0x276f7f(0x227)};case _0x276f7f(0x21d):case _0x276f7f(0x1d1):return{'controllable':_0x83bf5,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x276f7f(0x1c4):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x276f7f(0x13c):case _0x276f7f(0xca):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x276f7f(0x120)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x3b0db9{constructor(_0x473e1e){const _0xfaa1e3=_0x4f806b;this[_0xfaa1e3(0x295)]=_0x473e1e,this['_statusEnv']=null,this['_desired']=null,this[_0xfaa1e3(0x206)]=new Map(),this[_0xfaa1e3(0x119)]=null,this[_0xfaa1e3(0x285)]=![],this['_isReader']=![],this[_0xfaa1e3(0x156)]=_0x4349fc(),this[_0xfaa1e3(0x1a5)]=_0x1145fc(process[_0xfaa1e3(0xe0)],this[_0xfaa1e3(0x156)]),this[_0xfaa1e3(0x134)]=_0x3b6071[_0xfaa1e3(0x12c)]()[_0xfaa1e3(0x208)](0x0,0x8),this['_rowKey']=_0x10c28c(this[_0xfaa1e3(0x1a5)],this[_0xfaa1e3(0x134)]),this[_0xfaa1e3(0x191)]=Date[_0xfaa1e3(0x1c0)](),this[_0xfaa1e3(0x116)]=null,this[_0xfaa1e3(0x135)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0xfaa1e3(0x249)]=null,this['_onTick']=null,this[_0xfaa1e3(0xb2)]=0x0,this[_0xfaa1e3(0x2ab)]={},this['_children']=new Map(),this[_0xfaa1e3(0x1ee)]=process['cpuUsage'](),this[_0xfaa1e3(0xfe)]=Date['now'](),this[_0xfaa1e3(0x13a)]=0x0,this[_0xfaa1e3(0x207)]=new Map();}get[_0x4f806b(0x2c3)](){const _0x4bc3c8=_0x4f806b;return this[_0x4bc3c8(0x1a5)];}get[_0x4f806b(0x1ab)](){const _0x272f96=_0x4f806b;return this[_0x272f96(0x29c)];}[_0x4f806b(0x27a)](_0x46b081,_0x577502){const _0x8a9d8e=_0x2198aa(_0x46b081,_0x577502);if(_0x8a9d8e['killable']&&!_0x58e3ef(this['okdb']))return{..._0x8a9d8e,'killable':![],'killConfirm':undefined};return _0x8a9d8e;}[_0x4f806b(0x2af)](){const _0x1c87cf=_0x4f806b;return!!this[_0x1c87cf(0x1d5)];}[_0x4f806b(0xc1)](_0x486713){const _0x386f6b=_0x4f806b;Object[_0x386f6b(0x236)](this['_ownMeta'],_0x486713||{});}[_0x4f806b(0x2bc)](_0x1b903e){const _0x12d764=_0x4f806b;if(_0x1b903e)this[_0x12d764(0x1de)]=_0x1b903e;}[_0x4f806b(0x223)](_0x1b8391={}){const _0x1c59a1=_0x4f806b;return this[_0x1c59a1(0x295)][_0x1c59a1(0x179)](_0x1b8391);}['processingStatusView'](){const _0x212d32=_0x4f806b,_0x6116a1={};let _0x3e086c=0x0,_0x166582=0x0;const _0x3b9d47=new Set();for(const _0x327555 of this[_0x212d32(0x2cf)]()){_0x166582++;const _0x1b736b=_0x327555[_0x212d32(0x284)];if(!_0x1b736b)continue;if(_0x1b736b[_0x212d32(0x2a8)])_0x3e086c++;for(const _0xd7ce5a of _0x1b736b['processors']||[]){if(![_0x212d32(0x2d9),_0x212d32(0x2a4)]['includes'](_0xd7ce5a[_0x212d32(0x213)]))continue;(_0xd7ce5a[_0x212d32(0x1f7)]===_0x212d32(0x1c2)||_0xd7ce5a[_0x212d32(0x1f7)]===_0x212d32(0x21b))&&_0xd7ce5a['cursorKey']&&_0x3b9d47[_0x212d32(0x1ff)]((_0xd7ce5a[_0x212d32(0x2cb)]||'default')+':'+_0xd7ce5a[_0x212d32(0x16a)]);const _0xa82f40=_0xd7ce5a['env']||_0x212d32(0x1a7);(_0x6116a1[_0xa82f40]||=[])['push']({..._0xd7ce5a,'env':_0xa82f40,'owner':{'pid':_0x327555[_0x212d32(0xe0)]??null,'kind':_0x327555[_0x212d32(0x26e)]??null}});}}for(const [_0x29c943,_0x16ad08]of Object['entries'](_0x6116a1)){for(const _0x6ecd69 of _0x16ad08){if(_0x6ecd69[_0x212d32(0x213)]===_0x212d32(0x2d9)&&!_0x6ecd69['claimGated']){const _0x3c9365=_0x29c943+':'+(_0x6ecd69[_0x212d32(0x16a)]??'');if(!_0x3b9d47[_0x212d32(0xc5)](_0x3c9365))_0x6ecd69['unclaimed']=!![];}}}return{'envs':_0x6116a1,'policy':null,'participation':{'participating':_0x3e086c,'total':_0x166582},'source':_0x212d32(0x2ac)};}['processorsView'](){const _0x2645df=_0x4f806b,_0x3e82f0=_0x1c6523=>{const _0x5d2ac6=_0x302a;if(_0x1c6523['state']===_0x5d2ac6(0x1c2)||_0x1c6523['state']===_0x5d2ac6(0x21b)||_0x1c6523[_0x5d2ac6(0x1f7)]===_0x5d2ac6(0x1f4))return 0x3;if(_0x1c6523['claimGated'])return 0x1;return 0x2;},_0x29e521=new Map();for(const _0x5e3094 of this['listNodes']()){for(const _0x839794 of _0x5e3094[_0x2645df(0x284)]?.[_0x2645df(0x1f3)]||[]){const _0xb07006={..._0x839794,'owner':{'pid':_0x5e3094[_0x2645df(0xe0)]??null,'kind':_0x5e3094[_0x2645df(0x26e)]??null,'host':_0x5e3094['host']??null}},_0xa3d0a7=_0x839794[_0x2645df(0x213)]==='single'?_0x2645df(0x291)+(_0x839794['env']??'')+'::'+(_0x839794[_0x2645df(0x16a)]??_0x839794[_0x2645df(0x19f)]??_0x839794['id']):_0x2645df(0x264)+(_0x5e3094[_0x2645df(0x1a4)]??_0x5e3094['processKey']??'')+'::'+(_0x839794['env']??'')+'::'+_0x839794['id'],_0x112897=_0x29e521[_0x2645df(0xf2)](_0xa3d0a7);if(!_0x112897||_0x3e82f0(_0xb07006)>_0x3e82f0(_0x112897))_0x29e521[_0x2645df(0x2bb)](_0xa3d0a7,_0xb07006);}}return[..._0x29e521[_0x2645df(0x226)]()];}[_0x4f806b(0x2b5)](){const _0x455601=_0x4f806b,_0x32d84e=Date[_0x455601(0x1c0)](),_0x1f7d99=this[_0x455601(0x2cf)](),_0x5d4efe=_0xdf9426=>Math[_0x455601(0x24a)](0x0,Math[_0x455601(0x153)]((_0x32d84e-(_0xdf9426[_0x455601(0x20b)]||_0x32d84e))/0x3e8)),_0x1b8ff4=_0x1f7d99[_0x455601(0x186)](_0x29a7e3=>_0x29a7e3['kind']===_0x455601(0x27c)),_0x7ea23b=_0x1f7d99[_0x455601(0x13b)](_0x5dd643=>_0x5dd643[_0x455601(0x26e)]===_0x455601(0x27f));if(_0x1b8ff4||_0x7ea23b[_0x455601(0x136)])return{'primary':_0x1b8ff4?{'pid':_0x1b8ff4[_0x455601(0xe0)],'uptime':_0x5d4efe(_0x1b8ff4)}:null,'workers':_0x7ea23b[_0x455601(0x279)](_0x3ebdff=>({'pid':_0x3ebdff[_0x455601(0xe0)],'uptime':_0x5d4efe(_0x3ebdff)})),'workersConfigured':_0x1b8ff4?.[_0x455601(0x1b2)]?.[_0x455601(0xe2)]??_0x7ea23b[_0x455601(0x136)],'mode':_0x455601(0x265)};const _0x3a782e=_0x1f7d99['find'](_0x23f0c4=>_0x23f0c4[_0x455601(0x26e)]===_0x455601(0x21d)||_0x23f0c4[_0x455601(0x26e)]===_0x455601(0x1d1)||_0x23f0c4[_0x455601(0x26e)]===_0x455601(0x1c4)),_0x3c9eff=_0x3a782e?{'pid':_0x3a782e['pid'],'uptime':_0x5d4efe(_0x3a782e)}:{'pid':process[_0x455601(0xe0)],'uptime':Math['max'](0x0,Math[_0x455601(0x153)](process[_0x455601(0x20a)]()))};return{'primary':_0x3c9eff,'workers':[_0x3c9eff],'workersConfigured':0x1,'mode':'single'};}[_0x4f806b(0x13d)](){const _0x1f5e0d=_0x4f806b;return this[_0x1f5e0d(0x1ec)]();}[_0x4f806b(0x1b8)](){const _0x190f53=_0x4f806b,_0x1383fc=new Map();for(const _0x2d1d21 of this[_0x190f53(0x1ec)]())_0x1383fc[_0x190f53(0x2bb)](_0x2d1d21[_0x190f53(0x2de)],{..._0x2d1d21,'children':[]});const _0x5716dd=[];for(const _0x59a0fc of _0x1383fc[_0x190f53(0x226)]()){const _0xa56d7e=_0x59a0fc[_0x190f53(0x181)]?_0x1383fc[_0x190f53(0xf2)](_0x59a0fc[_0x190f53(0x181)]):null;if(_0xa56d7e&&_0xa56d7e!==_0x59a0fc)_0xa56d7e[_0x190f53(0x1f0)][_0x190f53(0x1ad)](_0x59a0fc);else _0x5716dd[_0x190f53(0x1ad)](_0x59a0fc);}const _0x5c7816=(_0x148246,_0x1431e8)=>_0x148246[_0x190f53(0x26e)]===_0x1431e8[_0x190f53(0x26e)]?(_0x148246[_0x190f53(0xe0)]||0x0)-(_0x1431e8[_0x190f53(0xe0)]||0x0):(_0x148246[_0x190f53(0x26e)]??'')<(_0x1431e8[_0x190f53(0x26e)]??'')?-0x1:0x1,_0x161d71=_0x542e55=>{const _0x3d6043=_0x190f53;_0x542e55['sort'](_0x5c7816);for(const _0x78cc7c of _0x542e55)if(_0x78cc7c[_0x3d6043(0x1f0)][_0x3d6043(0x136)])_0x161d71(_0x78cc7c[_0x3d6043(0x1f0)]);};return _0x161d71(_0x5716dd),_0x5716dd;}['getProcess'](_0x3d88f3){const _0x2185ae=_0x4f806b;return this[_0x2185ae(0x1ec)]()[_0x2185ae(0x186)](_0x449a28=>_0x449a28['processKey']===_0x3d88f3)??null;}['_groupByProcess'](_0x5139eb=Date['now']()){const _0x2c5b63=_0x4f806b,_0x5eab69=new Map();for(const _0x35707a of this['listNodes']()){const _0x4d0c3c=_0x34c50f(_0x35707a);let _0x5eca99=_0x5eab69['get'](_0x4d0c3c);!_0x5eca99&&(_0x5eca99={'processKey':_0x4d0c3c,'nodeKey':_0x4d0c3c,'pid':_0x35707a[_0x2c5b63(0xe0)],'ppid':_0x35707a[_0x2c5b63(0x175)]??null,'host':_0x35707a[_0x2c5b63(0x21a)]??null,'kind':_0x35707a['kind'],'role':null,'supervisorKey':_0x35707a[_0x2c5b63(0x181)]??null,'slot':_0x35707a[_0x2c5b63(0xf5)]??null,'slotKey':_0x35707a['slotKey']??null,'caps':_0x35707a[_0x2c5b63(0x2ee)]??null,'lifecycle':_0x35707a['lifecycle']??null,'uptime':Math[_0x2c5b63(0x24a)](0x0,Math[_0x2c5b63(0x153)]((_0x5139eb-(_0x35707a[_0x2c5b63(0x20b)]||_0x5139eb))/0x3e8)),'startedAt':_0x35707a['startedAt']??null,'meta':_0x35707a[_0x2c5b63(0x1b2)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x5eab69[_0x2c5b63(0x2bb)](_0x4d0c3c,_0x5eca99));_0x5eca99[_0x2c5b63(0x106)][_0x2c5b63(0x1ad)]({'instanceId':_0x35707a[_0x2c5b63(0x14d)]??null,'role':_0x35707a[_0x2c5b63(0x152)]??null,'listenAddr':_0x35707a[_0x2c5b63(0x1b5)]??null,'lifecycle':_0x35707a[_0x2c5b63(0x1e4)]??null,'processing':_0x35707a[_0x2c5b63(0x284)]??null});if(!_0x5eca99[_0x2c5b63(0x152)]&&_0x35707a[_0x2c5b63(0x152)])_0x5eca99[_0x2c5b63(0x152)]=_0x35707a[_0x2c5b63(0x152)];if(!_0x5eca99[_0x2c5b63(0x1b5)]&&_0x35707a['listenAddr'])_0x5eca99[_0x2c5b63(0x1b5)]=_0x35707a['listenAddr'];if(!_0x5eca99[_0x2c5b63(0x284)]&&_0x35707a[_0x2c5b63(0x284)])_0x5eca99[_0x2c5b63(0x284)]=_0x35707a['processing'];if(!_0x5eca99[_0x2c5b63(0x2ed)]&&_0x35707a[_0x2c5b63(0x2ed)])_0x5eca99[_0x2c5b63(0x2ed)]=_0x35707a[_0x2c5b63(0x2ed)];if(!_0x5eca99['singletonClaims']&&_0x35707a[_0x2c5b63(0x14a)])_0x5eca99[_0x2c5b63(0x14a)]=_0x35707a['singletonClaims'];if(_0x5eca99[_0x2c5b63(0x2ee)]==null&&_0x35707a[_0x2c5b63(0x2ee)])_0x5eca99[_0x2c5b63(0x2ee)]=_0x35707a[_0x2c5b63(0x2ee)];if(_0x35707a[_0x2c5b63(0x16d)]&&(!_0x5eca99[_0x2c5b63(0x16d)]||(_0x35707a['stats']['at']??0x0)>(_0x5eca99['stats']['at']??0x0)))_0x5eca99[_0x2c5b63(0x16d)]=_0x35707a[_0x2c5b63(0x16d)];}return[..._0x5eab69[_0x2c5b63(0x226)]()];}['runtimeProcessesView'](){const _0x143154=_0x4f806b,_0x36f4d3=[],_0x493af5={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0xc46651 of this[_0x143154(0x1ec)]()){_0x36f4d3[_0x143154(0x1ad)]({'processKey':_0xc46651[_0x143154(0x2de)],'kind':_0xc46651['kind'],'pid':_0xc46651[_0x143154(0xe0)],'supervisorKey':_0xc46651['supervisorKey'],'meta':_0xc46651[_0x143154(0x1b2)]??null,'uptime':_0xc46651[_0x143154(0x20a)],'stats':_0xc46651['stats']??null}),_0x493af5['processes']++;if(_0xc46651['stats']){_0x493af5[_0x143154(0x1a0)]+=_0xc46651[_0x143154(0x16d)]['rss']||0x0,_0x493af5['heapUsed']+=(_0xc46651[_0x143154(0x16d)][_0x143154(0x2a1)]||0x0)+(_0xc46651[_0x143154(0x16d)][_0x143154(0xbc)]?.[_0x143154(0x2a1)]||0x0);const _0xc10c08=_0xc46651[_0x143154(0x16d)]['threads'];_0xc10c08&&(_0x493af5[_0x143154(0xbc)][_0x143154(0x26b)]+=_0xc10c08[_0x143154(0x26b)]||0x0,_0x493af5['threads'][_0x143154(0x28d)]+=_0xc10c08['sandbox']||0x0,_0x493af5[_0x143154(0xbc)][_0x143154(0x1b3)]+=_0xc10c08[_0x143154(0x1b3)]||0x0);}}return{'totals':_0x493af5,'nodes':_0x36f4d3};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x2aafc2=_0x4f806b;this[_0x2aafc2(0x285)]=this[_0x2aafc2(0x285)]||!!writer,this[_0x2aafc2(0x2d3)]=this['_isReader']||!!reader,this[_0x2aafc2(0x116)]=kind||this[_0x2aafc2(0x116)]||(_0x330ec8[_0x2aafc2(0x196)]?_0x2aafc2(0x27f):'cli'),this[_0x2aafc2(0x135)]=supervisorKey??this['_supervisorKey'],this[_0x2aafc2(0x1de)]=listenAddr??this['_listenAddr'],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x2aafc2(0x1d5)]){const _0x593a4c=await this['okdb']['createEnvironment'](_0x2ef1f8,{'sync':![],'durability':_0x2aafc2(0x2db)});await _0x593a4c[_0x2aafc2(0x11d)](_0x5242e4),this[_0x2aafc2(0x1d5)]=_0x593a4c;}return this[_0x2aafc2(0x1d5)];}[_0x4f806b(0x1e1)](){const _0x3b6cb5=_0x4f806b;return this[_0x3b6cb5(0x166)]!==this[_0x3b6cb5(0x1d5)]&&(this[_0x3b6cb5(0x166)]=this['_statusEnv'],this[_0x3b6cb5(0x110)]=this[_0x3b6cb5(0x1d5)]['_getType'](_0x5242e4)['data']),this[_0x3b6cb5(0x110)];}[_0x4f806b(0x1e3)](_0x3cbd5e){const _0x33765a=_0x4f806b;if(_0x5096c4)return this['_nodeDb']()[_0x33765a(0x1a1)](_0x3cbd5e[_0x33765a(0x1a4)],_0x3cbd5e,0x1);const _0x269d32=this['_nodeDb']()['put'](_0x3cbd5e[_0x33765a(0x1a4)],_0x3cbd5e,0x1);if(_0x269d32&&typeof _0x269d32[_0x33765a(0x1e2)]==='function')_0x269d32[_0x33765a(0x1e2)](undefined,()=>{});return _0x269d32;}[_0x4f806b(0x1ba)](_0x55a6bd){const _0x5db55a=_0x4f806b;return this[_0x5db55a(0x1e1)]()[_0x5db55a(0x1a1)](_0x55a6bd['nodeKey'],_0x55a6bd,0x1);}[_0x4f806b(0x2c0)](_0x43b40a){const _0x917420=_0x4f806b;if(_0x5096c4)try{return this[_0x917420(0x1e1)]()[_0x917420(0x237)](_0x43b40a);}catch{return![];}const _0x4bd690=this[_0x917420(0x1e1)]()[_0x917420(0x1b0)](_0x43b40a);if(_0x4bd690&&typeof _0x4bd690[_0x917420(0x1e2)]===_0x917420(0x1d3))_0x4bd690[_0x917420(0x1e2)](undefined,()=>{});return _0x4bd690;}async[_0x4f806b(0x19c)](_0x106af8){const _0x2bee1f=_0x4f806b;if(!this[_0x2bee1f(0x1d5)]||!this['_isWriter']||!_0x106af8?.['nodeKey'])return;return this[_0x2bee1f(0x1e3)](_0x106af8);}async[_0x4f806b(0xbd)](_0x28b152){const _0xf07894=_0x4f806b;if(!this['_statusEnv']||!this['_isWriter']||!_0x28b152)return;const _0x191be9=_0x28b152['includes']('#'),_0x4c8008=[];for(const {key:_0x280a7b}of this[_0xf07894(0x1d5)][_0xf07894(0x1ae)](_0x5242e4)){if(_0x280a7b===_0x28b152||!_0x191be9&&typeof _0x280a7b===_0xf07894(0x19d)&&_0x280a7b[_0xf07894(0x1d6)](_0x28b152+'#'))_0x4c8008[_0xf07894(0x1ad)](_0x280a7b);}for(const _0x396550 of _0x4c8008){try{this['_nodeDb']()[_0xf07894(0x237)](_0x396550);}catch{}}}[_0x4f806b(0x125)](_0x327e63){const _0x52c0bb=_0x4f806b;if(typeof _0x327e63?.['pid']!=='number')return![];if(_0x327e63[_0x52c0bb(0x21a)]!==_0x259d8d[_0x52c0bb(0x1cf)]())return![];if(_0x327e63[_0x52c0bb(0xe0)]===process['pid'])return![];if(_0x327e63[_0x52c0bb(0x296)]!=null&&_0x327e63[_0x52c0bb(0x296)]<Date['now']()-_0x37f977)return!![];try{return process[_0x52c0bb(0x2ce)](_0x327e63[_0x52c0bb(0xe0)],0x0),![];}catch(_0x481001){return _0x481001[_0x52c0bb(0x286)]===_0x52c0bb(0x16e);}}[_0x4f806b(0x2cf)](){const _0x5f221b=_0x4f806b;if(!this[_0x5f221b(0x1d5)])return[];try{this[_0x5f221b(0x1d5)]['db']?.[_0x5f221b(0x182)]?.();}catch{}const _0x468b51=Date['now'](),_0x466562=_0x259d8d[_0x5f221b(0x1cf)](),_0xcffc46=[];for(const {value:_0x5b8ab3}of this['_statusEnv']['getRange'](_0x5242e4)){if(!_0x5b8ab3)continue;let _0x5a3481=null;_0x5b8ab3[_0x5f221b(0x21a)]===_0x466562&&typeof _0x5b8ab3[_0x5f221b(0xe0)]===_0x5f221b(0x24b)&&(_0x5a3481=!this['_nodeDead'](_0x5b8ab3));if(_0x5a3481===![])continue;const _0x49da0b=_0x5b8ab3[_0x5f221b(0x296)]==null||_0x5b8ab3[_0x5f221b(0x296)]>=_0x468b51;if(_0x5a3481===!![]||_0x49da0b)_0xcffc46[_0x5f221b(0x1ad)](_0x5b8ab3);}return _0xcffc46;}async[_0x4f806b(0x2d4)](_0x5622cb=0x0){const _0x163d34=_0x4f806b;if(!this['_statusEnv']||!this['_isWriter'])return;const _0x455b20=Date['now']()-_0x5622cb,_0x3fc296=new Set(),_0x577faa=[],_0xf72263=_0x259d8d[_0x163d34(0x1cf)](),_0x42cba8=require$$6['version'];for(const {key:_0x1a3a97,value:_0x269f5a}of this[_0x163d34(0x1d5)][_0x163d34(0x1ae)](_0x5242e4)){if(!_0x269f5a)continue;const _0x4e9dbd=_0x269f5a[_0x163d34(0x21a)]===_0xf72263&&typeof _0x269f5a[_0x163d34(0xe0)]===_0x163d34(0x24b),_0x421275=_0x4e9dbd?this[_0x163d34(0x125)](_0x269f5a):_0x269f5a['expiresAt']!=null&&_0x269f5a['expiresAt']<_0x455b20;if(_0x421275)_0x577faa['push'](_0x1a3a97);else{_0x3fc296[_0x163d34(0x1ff)](_0x34c50f(_0x269f5a)??_0x1a3a97);if(_0x269f5a[_0x163d34(0x17c)]&&_0x269f5a['version']!==_0x42cba8){if(!this['_versionSkewWarned'])this[_0x163d34(0x290)]=new Set();!this[_0x163d34(0x290)][_0x163d34(0xc5)](_0x269f5a[_0x163d34(0x17c)])&&(this[_0x163d34(0x290)][_0x163d34(0x1ff)](_0x269f5a['version']),this[_0x163d34(0x295)][_0x163d34(0x244)]?.[_0x163d34(0x2c5)]?.(_0x163d34(0x17d)+(_0x269f5a[_0x163d34(0xe0)]??'?')+_0x163d34(0x2e2)+_0x269f5a[_0x163d34(0x17c)]+_0x163d34(0x198)+_0x42cba8+_0x163d34(0xec)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':'migrations'}));}}}for(const _0x48383f of _0x577faa)this[_0x163d34(0x2c0)](_0x48383f);if(this['_ensureDesired']()){const _0x5040a2=[];for(const {key:_0xd945f3}of this[_0x163d34(0x210)](_0x163d34(0x2e6))){if(!_0x3fc296[_0x163d34(0xc5)](_0xd945f3)){if(_0x5096c4)try{this[_0x163d34(0x2c4)][_0x163d34(0x237)](_0x163d34(0x1b9)+_0xd945f3);}catch{}else _0x5040a2['push'](this[_0x163d34(0x2c4)]['remove'](_0x163d34(0x1b9)+_0xd945f3));}}if(_0x5040a2['length'])await Promise['allSettled'](_0x5040a2);}}['startHeartbeat'](_0x42bb41=null){const _0x4041ff=_0x4f806b;if(this[_0x4041ff(0x1e9)])return;if(!this[_0x4041ff(0x285)]||!this[_0x4041ff(0x1d5)]){this[_0x4041ff(0x295)]?.[_0x4041ff(0x244)]?.['warn']?.(_0x4041ff(0x121)+this[_0x4041ff(0x285)]+'\x20statusEnv='+!!this[_0x4041ff(0x1d5)]+_0x4041ff(0x240),{'feature':_0x4041ff(0x2a0)});return;}this['_onTick']=_0x42bb41,this[_0x4041ff(0x249)]=()=>this[_0x4041ff(0x159)]();for(const _0x374f13 of _0x5b65af)this[_0x4041ff(0x295)][_0x4041ff(0x184)]['on'](_0x374f13,this[_0x4041ff(0x249)]);this[_0x4041ff(0x29e)]();const _0x398570=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x15f37d;this[_0x4041ff(0x1e9)]=setInterval(()=>{const _0xb0f239=_0x4041ff;if(this['_onTick'])try{this[_0xb0f239(0x140)]();}catch{}this[_0xb0f239(0x29e)](),this['reap']()[_0xb0f239(0x2b1)](()=>{});},_0x398570);if(this[_0x4041ff(0x1e9)]['unref'])this['_hbTimer'][_0x4041ff(0x2b4)]();}['_maybePublish'](){const _0x2f0942=_0x4f806b;if(!this[_0x2f0942(0x285)]||!this['_statusEnv'])return;if(Date['now']()-this['_lastPublishAt']<_0x436944)return;this[_0x2f0942(0x29e)]();}[_0x4f806b(0x29e)](){const _0x450453=_0x4f806b;if(!this[_0x450453(0x285)]||!this[_0x450453(0x1d5)])return;this['_lastPublishAt']=Date[_0x450453(0x1c0)]();try{const _0x50ff32=[this['_buildOwnRow']()];for(const _0xbad18d of this['_children'][_0x450453(0x226)]())_0x50ff32[_0x450453(0x1ad)](this[_0x450453(0x151)](_0xbad18d));const _0x194914=_0x2fe424[_0x450453(0x17e)]?_0x2fe424[_0x450453(0x1c0)]():0x0;for(const _0x36c97e of _0x50ff32){try{this['_putRowSync'](_0x36c97e),this['_publishFailWarned']=![];}catch(_0xd9286d){!this[_0x450453(0x2df)]&&(this[_0x450453(0x2df)]=!![],this['okdb']?.[_0x450453(0x244)]?.[_0x450453(0x2c5)]?.(_0x450453(0x280)+_0xd9286d[_0x450453(0x2c7)],{'feature':_0x450453(0x2a0)}));}}if(_0x2fe424['enabled'])_0x2fe424['note'](_0x450453(0x2d0),_0x2fe424[_0x450453(0x1c0)]()-_0x194914,_0x450453(0x12d)+_0x50ff32[_0x450453(0x136)]+_0x450453(0x22e));}catch(_0x1350b1){!this[_0x450453(0x2df)]&&(this['_publishFailWarned']=!![],this[_0x450453(0x295)]?.['log']?.[_0x450453(0x2c5)]?.('registry\x20publish\x20failing:\x20'+_0x1350b1['message'],{'feature':_0x450453(0x2a0)}));}}async[_0x4f806b(0x193)](){const _0x5f4a1=_0x4f806b;if(this['_onProcEvent']){for(const _0x29cb0c of _0x5b65af){try{this[_0x5f4a1(0x295)][_0x5f4a1(0x184)][_0x5f4a1(0x282)](_0x29cb0c,this[_0x5f4a1(0x249)]);}catch{}}this[_0x5f4a1(0x249)]=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x5f4a1(0x1e9)]=null);try{if(this['_statusEnv']&&this[_0x5f4a1(0x285)])await this['removeNode'](this[_0x5f4a1(0x29c)]);}catch{}}async['deregisterSelf'](){const _0x1343a4=_0x4f806b;if(!this['_statusEnv']||!this[_0x1343a4(0x285)])return;try{await this['removeNode'](this['_rowKey']);}catch{}try{const _0x115c26=[];for(const {value:_0x34a34e}of this[_0x1343a4(0x1d5)]['getRange'](_0x5242e4)){if(_0x34a34e?.[_0x1343a4(0x175)]===process[_0x1343a4(0xe0)]&&_0x34a34e[_0x1343a4(0x1a4)])_0x115c26['push'](_0x34a34e[_0x1343a4(0x1a4)]);}for(const _0x4e0174 of _0x115c26){try{await this[_0x1343a4(0xbd)](_0x4e0174);}catch{}}}catch{}}async[_0x4f806b(0x115)](){const _0x5ed36e=_0x4f806b;return this[_0x5ed36e(0x19c)](this['_buildOwnRow']());}async['publishChildRow'](_0x5980db){const _0x534428=_0x4f806b;if(!this[_0x534428(0x1d5)]||!this[_0x534428(0x285)])return;return this['putNode'](this[_0x534428(0x151)](_0x5980db));}[_0x4f806b(0x151)]({pid:_0xd0afc6,startedAt:_0x483375,kind:_0xfcb33d,supervisorKey:_0x229373,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x4f806b(0x1fb),meta:meta=null,stats:stats=null}){const _0xeadcd2=_0x4f806b,_0x469a3d=Date[_0xeadcd2(0x1c0)](),_0x399c4d=_0x1145fc(_0xd0afc6,_0x483375);return{'nodeKey':_0x10c28c(_0x399c4d,'0'),'processKey':_0x399c4d,'instanceId':'0','pid':_0xd0afc6,'startedAt':_0x483375,'ppid':process[_0xeadcd2(0xe0)],'host':_0x259d8d[_0xeadcd2(0x1cf)](),'supervisorKey':_0x229373,'slot':slot,'slotKey':slotKey,'kind':_0xfcb33d,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x469a3d,'expiresAt':_0x469a3d+_0x3ccaff,'caps':this[_0xeadcd2(0x27a)](_0xfcb33d,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x31a59e){const _0x542cb0=_0x4f806b;if(!_0x31a59e?.['pid'])return null;const _0x56b52d=_0x1145fc(_0x31a59e[_0x542cb0(0xe0)],_0x31a59e[_0x542cb0(0x20b)]);this[_0x542cb0(0x245)][_0x542cb0(0x2bb)](_0x56b52d,{..._0x31a59e,'supervisorKey':_0x31a59e[_0x542cb0(0x181)]??this[_0x542cb0(0x1a5)]});if(this[_0x542cb0(0x285)])await this[_0x542cb0(0xea)](this['_children'][_0x542cb0(0xf2)](_0x56b52d))[_0x542cb0(0x2b1)]?.(()=>{});return _0x56b52d;}['removeSupervisedChild'](_0xe89ee9){const _0x3551d6=_0x4f806b;if(!_0xe89ee9)return;return this[_0x3551d6(0x245)][_0x3551d6(0xd3)](_0xe89ee9),this[_0x3551d6(0xbd)](_0xe89ee9);}[_0x4f806b(0x2b7)](){const _0x515501=_0x4f806b,_0x33e696=Date[_0x515501(0x1c0)](),_0x3287a7=process['cpuUsage'](),_0x28862d=(_0x33e696-this[_0x515501(0xfe)])*0x3e8;if(_0x28862d>=0x3d090){const _0x1b75b0=_0x3287a7[_0x515501(0x1c1)]-this[_0x515501(0x1ee)]['user']+(_0x3287a7[_0x515501(0x212)]-this['_lastCpuUsage']['system']),_0x5ab155=_0x259d8d['cpus']()['length']||0x1;this[_0x515501(0x13a)]=Math[_0x515501(0x1b7)](0x64,Math['round'](_0x1b75b0/(_0x28862d*_0x5ab155)*0x64)),this[_0x515501(0x147)]=Math[_0x515501(0x153)](_0x28862d/0x3e8),this[_0x515501(0x1ee)]=_0x3287a7,this[_0x515501(0xfe)]=_0x33e696;}const _0x4ba41a=process[_0x515501(0x1dd)](),_0x55b3ca=this['_threadStats']['size'];let _0x1e8dbd=0x0;if(_0x55b3ca>0x0){const _0x1c7a30=[this[_0x515501(0x295)],...this['okdb'][_0x515501(0x2ae)]?.['values']?.()??[]];for(const _0x21acb1 of _0x1c7a30){const _0x36a1ec=_0x21acb1['functions']?.[_0x515501(0x232)];if(_0x36a1ec)_0x1e8dbd+=_0x36a1ec['liveThreadStats'][_0x515501(0x1b3)];}}let _0x89072b=null;const _0x3bfac0=_0x55b3ca;if(_0x3bfac0>0x0){let _0x59dad9=0x0;for(const _0x57542f of this['_threadStats'][_0x515501(0x226)]())_0x59dad9+=_0x57542f['heapUsed']||0x0;_0x89072b={'count':_0x3bfac0,'heapUsed':_0x59dad9,'sandbox':_0x55b3ca,'busy':_0x1e8dbd};}return{'rss':_0x4ba41a['rss'],'heapUsed':_0x4ba41a['heapUsed'],'heapTotal':_0x4ba41a[_0x515501(0xe1)],'external':_0x4ba41a[_0x515501(0x105)],'cpuPct':this[_0x515501(0x13a)],'cpuWindowMs':this[_0x515501(0x147)]??null,'threads':_0x89072b,'at':_0x33e696};}[_0x4f806b(0x128)](_0x19243f,_0x1a832b){const _0x4eab99=_0x4f806b;if(!_0x19243f||!_0x1a832b)return;this[_0x4eab99(0x207)][_0x4eab99(0x2bb)](_0x19243f,_0x1a832b);}[_0x4f806b(0x11a)](_0x3edbcb){const _0x3c7cf4=_0x4f806b;this[_0x3c7cf4(0x207)][_0x3c7cf4(0xd3)](_0x3edbcb);}[_0x4f806b(0x17f)](_0x41dac8,_0x258175,_0x40bf4b=undefined){const _0x534c25=_0x4f806b,_0x432272=this[_0x534c25(0x245)][_0x534c25(0xf2)](_0x41dac8);if(!_0x432272||!_0x258175)return;if(_0x40bf4b!==undefined)_0x432272[_0x534c25(0x284)]=_0x40bf4b;_0x432272['stats']={'rss':_0x258175[_0x534c25(0x1a0)]??null,'heapUsed':_0x258175[_0x534c25(0x2a1)]??null,'heapTotal':_0x258175['heapTotal']??null,'external':_0x258175[_0x534c25(0x105)]??null,'cpuPct':_0x258175[_0x534c25(0x28a)]??null,'cpuWindowMs':_0x258175[_0x534c25(0x274)]??null,'threads':_0x258175['threads']??null,'claims':_0x258175[_0x534c25(0x192)]??null,'envsOpen':_0x258175[_0x534c25(0xc9)]??null,'at':Date[_0x534c25(0x1c0)]()};}[_0x4f806b(0x2b0)](){const _0x3218a8=_0x4f806b,_0x5e9697=Date[_0x3218a8(0x1c0)](),_0x1d3f5b=this[_0x3218a8(0x295)][_0x3218a8(0x25e)]||{},_0x20a87d=this['_kind']||_0x3218a8(0x21d);return{'nodeKey':this['_rowKey'],'processKey':this[_0x3218a8(0x1a5)],'instanceId':this[_0x3218a8(0x134)],'pid':process[_0x3218a8(0xe0)],'startedAt':this[_0x3218a8(0x156)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x3218a8(0x175)]==='number'?process[_0x3218a8(0x175)]:null,'host':_0x259d8d[_0x3218a8(0x1cf)](),'supervisorKey':this[_0x3218a8(0x135)]??null,'version':require$$6[_0x3218a8(0x17c)],'kind':_0x20a87d,'role':{'engines':!!_0x1d3f5b['engines'],'processors':!!_0x1d3f5b[_0x3218a8(0x1f3)],'compaction':_0x1d3f5b[_0x3218a8(0x29f)],'http':_0x1d3f5b[_0x3218a8(0x2ec)]},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0x5e9697,'expiresAt':_0x5e9697+_0x3ccaff,'caps':this[_0x3218a8(0x27a)](_0x20a87d,_0x1d3f5b),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x3218a8(0x2ab)]},'processing':_0x1d3f5b[_0x3218a8(0x1f3)]?this[_0x3218a8(0x1bb)]():null,'engines':_0x1d3f5b[_0x3218a8(0x2ed)]?[...this['okdb'][_0x3218a8(0x239)]??[]]:null,'singletonClaims':this[_0x3218a8(0xf4)](),'stats':this[_0x3218a8(0x2b7)](),'writers':this[_0x3218a8(0x24e)]()};}[_0x4f806b(0x24e)](){const _0x48c68f=_0x4f806b,_0x209acd={};try{for(const [_0x11a2e4,_0x3d4a9e]of this[_0x48c68f(0x295)][_0x48c68f(0x2ae)]){try{const _0x1f53be=_0x3d4a9e[_0x48c68f(0x23b)]?.();if(!_0x1f53be)continue;if(!_0x1f53be['depth']&&!_0x1f53be['committed']&&!(_0x1f53be[_0x48c68f(0x283)]??0x0)&&!_0x1f53be[_0x48c68f(0x2d6)])continue;_0x209acd[_0x11a2e4]={'depth':_0x1f53be[_0x48c68f(0xdc)],'oldestPendingMs':_0x1f53be[_0x48c68f(0x10d)],'committed':_0x1f53be[_0x48c68f(0x2c6)],'commitsPerSec':_0x1f53be[_0x48c68f(0x2c9)],'commitP99Ms':_0x1f53be[_0x48c68f(0x155)],'parkedNow':_0x1f53be['parkedNow']??0x0,'draining':!!_0x1f53be[_0x48c68f(0x2d6)]};}catch{}}}catch{}return Object[_0x48c68f(0x14c)](_0x209acd)[_0x48c68f(0x136)]?_0x209acd:null;}[_0x4f806b(0xf4)](){const _0x4cfa75=_0x4f806b,_0x3338a9=process[_0x4cfa75(0xe0)],_0x2d3de1=Date['now'](),_0x50b179=_0x4b6a53=>{const _0x5ba247=_0x4cfa75;if(!_0x4b6a53)return[];const _0x2ba054=[];try{for(const {id:_0x3b9375,entry:_0x4ddade}of _0x4b6a53[_0x5ba247(0x2dc)]()){if(_0x4ddade?.[_0x5ba247(0x28c)]?.[_0x5ba247(0xe0)]!==_0x3338a9)continue;const _0x38a71b=_0x4ddade[_0x5ba247(0x221)]??_0x4ddade[_0x5ba247(0xeb)]??0x0;if(_0x38a71b+(_0x4ddade[_0x5ba247(0x2d2)]??0x0)<_0x2d3de1)continue;_0x2ba054['push'](_0x3b9375);}}catch{}return _0x2ba054;},_0x3ab7f5=_0x50b179(this[_0x4cfa75(0x137)](_0x4cfa75(0xd0))),_0x56b3ad=_0x50b179(this[_0x4cfa75(0x137)](_0x4cfa75(0xd7)));if(!_0x3ab7f5['length']&&!_0x56b3ad[_0x4cfa75(0x136)])return null;return{'compact':_0x3ab7f5,'replicate':_0x56b3ad};}[_0x4f806b(0x137)](_0x1e415a){const _0xd25070=_0x4f806b;if(!this['okdb']?.[_0xd25070(0x190)])return null;if(!this[_0xd25070(0x131)])this[_0xd25070(0x131)]=new Map();let _0x54aa49=this['_singletonLocks'][_0xd25070(0xf2)](_0x1e415a);if(!_0x54aa49)try{_0x54aa49=new _0x29c247(this['okdb']['_rootDb'],{'namespace':_0x1e415a}),this[_0xd25070(0x131)][_0xd25070(0x2bb)](_0x1e415a,_0x54aa49);}catch{return null;}return _0x54aa49;}[_0x4f806b(0x1bb)](){const _0xc7803=_0x4f806b,_0x15f536=[];try{for(const [_0x2df790,_0x18cd16]of this[_0xc7803(0x295)]['_envs']){if(_0x2df790[_0xc7803(0x1d6)]('~'))continue;for(const _0x76dae0 of _0x18cd16[_0xc7803(0xd5)]['tierList']())_0x15f536[_0xc7803(0x1ad)]({..._0x76dae0,'env':_0x2df790});}}catch{}return{'participate':this[_0xc7803(0x295)]['processors']?.[_0xc7803(0x1cd)]??![],'processors':_0x15f536};}['_ensureDesired'](){const _0x325021=_0x4f806b;if(this[_0x325021(0x2c4)])return!![];const _0x1f8ffa=this[_0x325021(0x295)][_0x325021(0x190)];if(!_0x1f8ffa)return![];return this[_0x325021(0x2c4)]=_0x1f8ffa[_0x325021(0x293)](_0x5c3736,{'dupSort':![]}),this['_cmd']=_0x1f8ffa[_0x325021(0x293)](_0x3989e7,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x147e75=_0x4f806b;if(!this[_0x147e75(0x141)]())return;const _0x5c653e=_0x147e75(0x2c1),_0x4a28c0=0x1,_0x2ebdc1=this[_0x147e75(0x2c4)]['get'](_0x5c653e)??0x0;if(_0x2ebdc1>=_0x4a28c0)return;const _0x44ac2b=_0xdc7920=>{const _0x161166=_0x147e75;if(_0xdc7920===_0x161166(0xca))return _0x161166(0x2d9);if(_0xdc7920===_0x161166(0x287))return _0x161166(0x2a4);return _0xdc7920;};await this[_0x147e75(0x295)][_0x147e75(0x1e8)][_0x147e75(0x154)]['transaction'](()=>{const _0x38920d=_0x147e75;for(const _0x5613a3 of[_0x38920d(0x229),_0x38920d(0x169)]){for(const {key:_0x54c63f,value:_0x48f341}of this[_0x38920d(0x2c4)]['getRange']({'start':_0x5613a3,'end':_0x5613a3+'\xff'})){if(typeof _0x54c63f!=='string'||!_0x54c63f[_0x38920d(0x1d6)](_0x5613a3))break;const _0x3ab485=_0x44ac2b(_0x48f341[_0x38920d(0x213)]);if(_0x3ab485!==_0x48f341[_0x38920d(0x213)])this[_0x38920d(0x2c4)]['put'](_0x54c63f,{..._0x48f341,'mode':_0x3ab485});}}this[_0x38920d(0x2c4)][_0x38920d(0x275)](_0x5c653e,_0x4a28c0);});}[_0x4f806b(0x2b8)](){const _0xd6e609=_0x4f806b;return!!this[_0xd6e609(0x2c4)];}[_0x4f806b(0x2dd)](_0xd3e61,_0x1d32db){const _0x2bf0c9=_0x4f806b;if(!this['_ensureDesired']())return null;const _0x27b406=_0xd3e61+'/'+_0x1d32db;return this[_0x2bf0c9(0x1a6)](),this[_0x2bf0c9(0x206)][_0x2bf0c9(0xf2)](_0x27b406)??this['_desired'][_0x2bf0c9(0xf2)](_0x27b406)??null;}[_0x4f806b(0x1a6)](){const _0x43d2ce=_0x4f806b;if(!_0x5096c4)return;try{this[_0x43d2ce(0x295)][_0x43d2ce(0x1e8)]?.['db']?.[_0x43d2ce(0x182)]?.();}catch{}}async[_0x4f806b(0x1c5)](_0x5a05b7,_0x3dbabf,_0x7452fa){const _0x749536=_0x4f806b;if(!this[_0x749536(0x141)]())return null;const _0x1da6fc=_0x5a05b7+'/'+_0x3dbabf;this[_0x749536(0x1a6)]();const _0x5e644d=this[_0x749536(0x206)]['get'](_0x1da6fc)??this[_0x749536(0x2c4)][_0x749536(0xf2)](_0x1da6fc)??{'version':0x0},_0x471f50=(_0x5e644d[_0x749536(0x17c)]||0x0)+0x1,_0x1694b1={..._0x5e644d,..._0x7452fa,'version':_0x471f50,'updatedAt':Date[_0x749536(0x1c0)]()};this[_0x749536(0x206)][_0x749536(0x2bb)](_0x1da6fc,_0x1694b1);try{await this[_0x749536(0x295)][_0x749536(0x1e8)]['_writer']['transaction'](()=>{const _0x4f402d=_0x749536;this[_0x4f402d(0x2c4)][_0x4f402d(0x275)](_0x1da6fc,_0x1694b1);});}finally{if(this['_desiredOverlay'][_0x749536(0xf2)](_0x1da6fc)===_0x1694b1)this[_0x749536(0x206)][_0x749536(0xd3)](_0x1da6fc);}return _0x471f50;}[_0x4f806b(0x210)](_0xd1f7f6){const _0x3150be=_0x4f806b;if(!this[_0x3150be(0x141)]())return[];this[_0x3150be(0x1a6)]();const _0x3c1f0f=_0xd1f7f6+'/',_0x42c7c4=[];for(const {key:_0x5215a2,value:_0x6cd990}of this[_0x3150be(0x2c4)][_0x3150be(0x1ae)]({'start':_0x3c1f0f,'end':_0x3c1f0f+'\xff'})){if(typeof _0x5215a2!==_0x3150be(0x19d)||!_0x5215a2[_0x3150be(0x1d6)](_0x3c1f0f))break;_0x42c7c4['push']({'key':_0x5215a2[_0x3150be(0x208)](_0x3c1f0f['length']),'value':_0x6cd990});}return _0x42c7c4;}[_0x4f806b(0x117)](_0x520357){const _0x18e6f9=_0x4f806b;if(!this['_ensureDesired']())return null;return this[_0x18e6f9(0x119)][_0x18e6f9(0xf2)](_0x520357)??null;}async[_0x4f806b(0x201)](_0x1a7303,_0xa1dc57,_0x4d6a7f={}){const _0x44806b=_0x4f806b;if(!this['_ensureDesired']())return null;let _0x454515;return await this[_0x44806b(0x295)]['_systemEnv'][_0x44806b(0x154)]['transaction'](()=>{const _0x2970fa=_0x44806b,_0x2495ea=this[_0x2970fa(0x119)][_0x2970fa(0xf2)](_0x1a7303)||{'epoch':0x0};_0x454515=(_0x2495ea[_0x2970fa(0x104)]||0x0)+0x1,this[_0x2970fa(0x119)]['put'](_0x1a7303,{..._0x2495ea,..._0x4d6a7f,'cmd':_0xa1dc57,'epoch':_0x454515,'updatedAt':Date['now']()});}),_0x454515;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x3b0db9,'nodeKey':_0x1145fc,'logicalKey':_0x286144,'slotKey':_0x23b77e,'PROCESS_ENV':_0x2ef1f8,'NODE_TYPE':_0x5242e4},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x393910=_0x2ee730;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x369774=require$$0$4,{clampTimerDelay:_0x2b9c88}=requireOkdbTimers(),{EVENTS:_0x765a0e,CHANGE_ACTIONS:_0x328390}=requireOkdbEnums(),{LOOP:_0x1008fb}=requireOkdbLoopMonitor(),_0xf0539c=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x582db5=0x5,_0x142353=0x2710;class _0x18ef68 extends _0x369774{constructor(_0x53192c,_0x22a864={}){const _0x255f53=_0x302a;super(),this['okdb']=_0x53192c,this[_0x255f53(0x195)]=_0x22a864['quantum']??_0xf0539c,this[_0x255f53(0x224)]=_0x22a864['flushDebounce']??_0x582db5,this[_0x255f53(0x27d)]=_0x22a864[_0x255f53(0x2a3)]??_0x142353,this[_0x255f53(0x24d)]=![],this[_0x255f53(0x103)]=new Map(),this['_baselines']=new Map(),this[_0x255f53(0x29d)]=new Map(),this[_0x255f53(0x26a)]=null,this['_draining']=![],this[_0x255f53(0x1d0)]=new Set(),this[_0x255f53(0x228)]=new Set(),this[_0x255f53(0x11f)]=_0x596ca3=>this[_0x255f53(0x297)](_0x596ca3),this[_0x255f53(0xe9)]=_0x56c75d=>this[_0x255f53(0x21e)](_0x56c75d),this[_0x255f53(0x122)]=_0x1809ad=>this[_0x255f53(0xcf)](_0x1809ad),this[_0x255f53(0x130)]=()=>this[_0x255f53(0x272)]();}[_0x393910(0xc8)](){const _0x321caa=_0x393910;if(this[_0x321caa(0x24d)])return;this[_0x321caa(0x24d)]=!![];for(const [_0x4a4272,_0x496373]of this['okdb'][_0x321caa(0x2ae)]){if(_0x4a4272['startsWith']('~'))continue;try{_0x496373[_0x321caa(0x1d4)]();}catch{}}for(const [_0x138ab5,_0x3b89bb]of this['okdb'][_0x321caa(0x2ae)]){if(_0x138ab5['startsWith']('~'))continue;try{this[_0x321caa(0x29b)][_0x321caa(0x2bb)](_0x138ab5,_0x3b89bb[_0x321caa(0x219)]()||0x0);}catch{}}const {events:_0x1aae8e}=this[_0x321caa(0x295)];_0x1aae8e['on'](_0x765a0e['ITEM_PENDING'],this[_0x321caa(0xe9)]),_0x1aae8e['on'](_0x765a0e['ITEM_CREATE'],this[_0x321caa(0x11f)]),_0x1aae8e['on'](_0x765a0e[_0x321caa(0x20d)],this[_0x321caa(0x11f)]),_0x1aae8e['on'](_0x765a0e[_0x321caa(0x18d)],this['_onItem']),_0x1aae8e['on'](_0x765a0e[_0x321caa(0xdd)],this[_0x321caa(0x122)]),_0x1aae8e['once'](_0x765a0e[_0x321caa(0x278)],this[_0x321caa(0x130)]);}[_0x393910(0x272)](){const _0x12cba7=_0x393910;if(!this[_0x12cba7(0x24d)])return;this[_0x12cba7(0x24d)]=![];const {events:_0x585a55}=this[_0x12cba7(0x295)];_0x585a55[_0x12cba7(0x282)](_0x765a0e['ITEM_PENDING'],this[_0x12cba7(0xe9)]),_0x585a55['off'](_0x765a0e[_0x12cba7(0x127)],this['_onItem']),_0x585a55[_0x12cba7(0x282)](_0x765a0e[_0x12cba7(0x20d)],this[_0x12cba7(0x11f)]),_0x585a55[_0x12cba7(0x282)](_0x765a0e[_0x12cba7(0x18d)],this['_onItem']),_0x585a55[_0x12cba7(0x282)](_0x765a0e[_0x12cba7(0xdd)],this['_onPoke']);try{_0x585a55['off'](_0x765a0e[_0x12cba7(0x278)],this['_onStop']);}catch{}this[_0x12cba7(0x26a)]&&(clearTimeout(this['_flushTimer']),this[_0x12cba7(0x26a)]=null),this[_0x12cba7(0x29d)][_0x12cba7(0xf1)](),this[_0x12cba7(0x103)]['clear'](),this[_0x12cba7(0x29b)][_0x12cba7(0xf1)](),this[_0x12cba7(0x1d0)]['clear'](),this[_0x12cba7(0x228)][_0x12cba7(0xf1)]();}['_dedupeKey'](_0x5dfca9,_0x307fbb,_0x1e67d4,_0x4b5fb0){return _0x5dfca9+'\x00'+_0x307fbb+'\x00'+_0x1e67d4+'\x00'+_0x4b5fb0;}[_0x393910(0x202)](_0xbb65c3,_0x250664,_0x1df466,_0x1e0ea4){const _0x4a00fd=_0x393910,_0x2cd684=this[_0x4a00fd(0x1db)](_0xbb65c3,_0x250664,_0x1df466,_0x1e0ea4);if(this['_seen'][_0x4a00fd(0xc5)](_0x2cd684))return![];this[_0x4a00fd(0x1d0)]['add'](_0x2cd684);if(this[_0x4a00fd(0x1d0)][_0x4a00fd(0x252)]>this[_0x4a00fd(0x27d)]){const _0x170917=this[_0x4a00fd(0x1d0)]['values']()[_0x4a00fd(0x18b)]()[_0x4a00fd(0x2ad)];this[_0x4a00fd(0x1d0)][_0x4a00fd(0xd3)](_0x170917);}return!![];}[_0x393910(0x21e)](_0x444177){const _0x1841a0=_0x393910;if(!this['_started']||!_0x444177)return;const {env:_0x32375e,type:_0x5cbb2b,key:_0x5cb844,clock:_0x4cd954}=_0x444177;if(_0x32375e==null||_0x5cbb2b==null||_0x5cb844==null)return;if(typeof _0x32375e==='string'&&_0x32375e[_0x1841a0(0x1d6)]('~'))return;if(typeof _0x5cbb2b===_0x1841a0(0x19d)&&_0x5cbb2b[_0x1841a0(0x1d6)]('~'))return;this[_0x1841a0(0x228)]['add'](this[_0x1841a0(0x1db)](_0x32375e,_0x5cbb2b,_0x5cb844,_0x4cd954)),this[_0x1841a0(0x228)][_0x1841a0(0x252)]>this[_0x1841a0(0x27d)]&&this[_0x1841a0(0x228)][_0x1841a0(0xd3)](this['_pendingLocal']['values']()[_0x1841a0(0x18b)]()[_0x1841a0(0x2ad)]);}[_0x393910(0x297)](_0x5ce488){const _0x468a9c=_0x393910;if(!this[_0x468a9c(0x24d)]||!_0x5ce488)return;const {env:_0x2429b0,type:_0x2a7ce8,key:_0x2eba8c,clock:_0x246bfc,origin:_0x20f50b,action:_0x9d09cc,newValue:_0xb43688,oldValue:_0x3c68cb}=_0x5ce488;if(_0x2429b0==null||_0x2a7ce8==null||_0x2eba8c==null)return;if(typeof _0x2429b0===_0x468a9c(0x19d)&&_0x2429b0[_0x468a9c(0x1d6)]('~'))return;if(typeof _0x2a7ce8===_0x468a9c(0x19d)&&_0x2a7ce8['startsWith']('~'))return;this[_0x468a9c(0x228)]['delete'](this[_0x468a9c(0x1db)](_0x2429b0,_0x2a7ce8,_0x2eba8c,_0x246bfc));if(!this[_0x468a9c(0x202)](_0x2429b0,_0x2a7ce8,_0x2eba8c,_0x246bfc))return;const _0x36e251=_0x9d09cc===_0x328390[_0x468a9c(0x22d)]?_0x468a9c(0x1b0):_0x468a9c(0x275);this[_0x468a9c(0x1eb)](_0x468a9c(0x16b),{'env':_0x2429b0,'type':_0x2a7ce8,'key':_0x2eba8c,'op':_0x36e251,'clock':_0x246bfc,'origin':_0x20f50b,'value':_0x36e251===_0x468a9c(0x1b0)?null:_0xb43688,'prevValue':_0x3c68cb});}[_0x393910(0xcf)](_0x19d8ff){const _0x7db704=_0x393910;if(!this['_started'])return;if(!_0x19d8ff||typeof _0x19d8ff['env']!=='string'||typeof _0x19d8ff[_0x7db704(0x19f)]!==_0x7db704(0x19d))return;const {env:_0xa32a2a,type:_0x5da1fb}=_0x19d8ff;if(_0xa32a2a['startsWith']('~')||_0x5da1fb[_0x7db704(0x1d6)]('~'))return;this[_0x7db704(0x29d)][_0x7db704(0x2bb)](_0xa32a2a+'\x00'+_0x5da1fb,{'env':_0xa32a2a,'type':_0x5da1fb}),this[_0x7db704(0x1b4)]();}[_0x393910(0x1b4)](){const _0x3e6361=_0x393910;if(this[_0x3e6361(0x26a)])return;const _0x291cfd=()=>{const _0x465a69=_0x3e6361;this['_flushTimer']=null,this[_0x465a69(0xb8)]()[_0x465a69(0x2b1)](()=>{});};this[_0x3e6361(0x26a)]=setTimeout(_0x291cfd,_0x2b9c88(this[_0x3e6361(0x224)]));}async['_drain'](){const _0x1c8e93=_0x393910;if(this[_0x1c8e93(0x1ed)]){this[_0x1c8e93(0x1b4)]();return;}this[_0x1c8e93(0x1ed)]=!![];try{const _0x4a28c4=[...this[_0x1c8e93(0x29d)][_0x1c8e93(0x226)]()];this[_0x1c8e93(0x29d)][_0x1c8e93(0xf1)]();let _0x13caf8=![];for(const {env:_0x2da8fd,type:_0x3f9d64}of _0x4a28c4){try{const _0x5cd8db=await this['_drainOne'](_0x2da8fd,_0x3f9d64);if(_0x5cd8db)_0x13caf8=!![];}catch{this[_0x1c8e93(0x29d)][_0x1c8e93(0x2bb)](_0x2da8fd+'\x00'+_0x3f9d64,{'env':_0x2da8fd,'type':_0x3f9d64}),_0x13caf8=!![];}}if(_0x13caf8||this['_pending'][_0x1c8e93(0x252)]>0x0)this[_0x1c8e93(0x1b4)]();}finally{this[_0x1c8e93(0x1ed)]=![];}}async[_0x393910(0x1d9)](_0x25ed13,_0x5a81ee){const _0x2a5531=_0x393910,_0x1d80e=await this[_0x2a5531(0x295)][_0x2a5531(0x2e9)](_0x25ed13),_0x3bc09c=_0x25ed13+'\x00'+_0x5a81ee;!this[_0x2a5531(0x103)]['has'](_0x3bc09c)&&(!this[_0x2a5531(0x29b)][_0x2a5531(0xc5)](_0x25ed13)&&(_0x1d80e[_0x2a5531(0x1d4)](),this[_0x2a5531(0x29b)][_0x2a5531(0x2bb)](_0x25ed13,_0x1d80e['getClock']()||0x0)),this['_cursors'][_0x2a5531(0x2bb)](_0x3bc09c,this[_0x2a5531(0x29b)][_0x2a5531(0xf2)](_0x25ed13)));const _0x3adeb7=this[_0x2a5531(0x103)][_0x2a5531(0xf2)](_0x3bc09c),_0x5926d3=_0x1d80e[_0x2a5531(0x219)](_0x5a81ee)||0x0;if(_0x5926d3<=_0x3adeb7)return![];const _0x43fa7b=_0x3adeb7+this['_quantum'],_0x4fd35d=Math['min'](_0x5926d3,_0x43fa7b),_0x5320e0=_0x1008fb[_0x2a5531(0x17e)]?_0x1008fb[_0x2a5531(0x1c0)]():0x0,_0x3b7d40=Array[_0x2a5531(0x17b)](_0x1d80e[_0x2a5531(0x172)](_0x5a81ee,_0x3adeb7+0x1,_0x4fd35d));let _0x3e55bd=_0x3adeb7;for(const _0x21586a of _0x3b7d40){const {clock:_0x1d4245,key:_0x46c46d,action:_0x282439,origin:_0x155864}=_0x21586a;if(_0x1d4245>_0x3e55bd)_0x3e55bd=_0x1d4245;if(_0x46c46d==null)continue;if(this['_pendingLocal'][_0x2a5531(0xc5)](this['_dedupeKey'](_0x25ed13,_0x5a81ee,_0x46c46d,_0x1d4245)))continue;if(!this['_markSeen'](_0x25ed13,_0x5a81ee,_0x46c46d,_0x1d4245))continue;let _0x5246eb,_0x41a565;if(_0x282439===_0x328390[_0x2a5531(0x22d)])_0x5246eb='remove',_0x41a565=null;else{const _0x87064=_0x1d80e[_0x2a5531(0xf2)](_0x5a81ee,_0x46c46d);_0x87064==null?(_0x5246eb=_0x2a5531(0x1b0),_0x41a565=null):(_0x5246eb=_0x2a5531(0x275),_0x41a565=_0x87064);}this[_0x2a5531(0x1eb)](_0x2a5531(0x16b),{'env':_0x25ed13,'type':_0x5a81ee,'key':_0x46c46d,'op':_0x5246eb,'clock':_0x1d4245,'origin':_0x155864,'value':_0x41a565});}if(_0x1008fb[_0x2a5531(0x17e)])_0x1008fb[_0x2a5531(0x243)]('feed:'+_0x25ed13+':'+_0x5a81ee,_0x1008fb[_0x2a5531(0x1c0)]()-_0x5320e0,'n='+_0x3b7d40[_0x2a5531(0x136)]);return this[_0x2a5531(0x103)][_0x2a5531(0x2bb)](_0x3bc09c,Math[_0x2a5531(0x24a)](_0x3e55bd,_0x4fd35d)),_0x1d80e['getClock'](_0x5a81ee)>_0x4fd35d;}['status'](){const _0x357880=_0x393910;return{'started':this[_0x357880(0x24d)],'quantum':this['_quantum'],'flushDebounce':this[_0x357880(0x224)],'cursors':Object[_0x357880(0x1ef)]([...this[_0x357880(0x103)][_0x357880(0x194)]()][_0x357880(0x279)](([_0x37e6f3,_0x2eb912])=>[_0x37e6f3[_0x357880(0x1fe)]('\x00',':'),_0x2eb912])),'pending':this[_0x357880(0x29d)][_0x357880(0x252)],'seen':this[_0x357880(0x1d0)][_0x357880(0x252)]};}}return _0x18ef68[_0x393910(0x1c8)]=_0xf0539c,okdbChangefeed={'OKDBChangefeed':_0x18ef68},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x17734b=_0x2ee730;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x31a090=require$$1$1,_0x3804be=require$$1,{EVENTS:_0x5dee7e}=requireOkdbEnums(),_0x513786=require$$0$3,{slotKey:_0x3b5bea}=requireOkdbProcessRegistry(),_0x4ec597=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x7375bc=0xfa0,_0x10d4d0=0x5,_0x2cdbd5=0x2710,_0x109a3f=0xbb8,_0x3222bc=0x7d0,_0x3e395e=_0x17734b(0x2a9),_0x5d2aca=_0x17734b(0x248),_0x41c5ff=_0x17734b(0x244),_0x45f01f=_0x17734b(0x16d),_0x40afaa=[_0x5dee7e[_0x17734b(0x1e6)],_0x5dee7e[_0x17734b(0x25a)],_0x5dee7e[_0x17734b(0x22a)],_0x5dee7e[_0x17734b(0x2b9)],_0x5dee7e['INDEX_PROGRESS'],_0x5dee7e[_0x17734b(0x1a9)],_0x5dee7e[_0x17734b(0x158)],_0x5dee7e[_0x17734b(0x12e)],'processor:ready','processor:progress',_0x17734b(0x1d2),'processor:paused',_0x17734b(0x260),_0x17734b(0x231)],_0x4a0aba=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x87335a=0x64;function _0x4ea13c(_0x15fad9){const _0x1c09bd=_0x17734b;if(!_0x15fad9)return _0x1c09bd(0x124);const _0x29ebae=(_0x15fad9[_0x1c09bd(0x1f3)]||[])[_0x1c09bd(0x279)](_0x299cdf=>[_0x299cdf[_0x1c09bd(0x2cb)],_0x299cdf['id'],_0x299cdf[_0x1c09bd(0x213)],_0x299cdf[_0x1c09bd(0x1f7)],!!_0x299cdf[_0x1c09bd(0x2a6)],!!_0x299cdf['unclaimed'],!!_0x299cdf[_0x1c09bd(0xf7)],_0x299cdf[_0x1c09bd(0x258)]?.[_0x1c09bd(0xe0)]??null,_0x299cdf[_0x1c09bd(0x1f4)]?String(_0x299cdf['error']?.[_0x1c09bd(0x2c7)]??_0x299cdf['error']):null]);return JSON[_0x1c09bd(0x1c9)]([!!_0x15fad9['participate'],_0x29ebae]);}function _0x16df4e({workers:_0xa4affb,makeOkdb:_0x2459bb,port:_0x343fa9,primaryOkdb:_0x5ec691,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x3f3a60=_0x17734b;if(_0x31a090[_0x3f3a60(0x12a)])return childEntry&&_0x31a090['setupPrimary']({'exec':_0x3804be[_0x3f3a60(0x261)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x5debee=_0x3f3a60,_0x25b551=[];for(let _0x1bb63e=0x0;_0x1bb63e<process[_0x5debee(0x150)]['length'];_0x1bb63e++){const _0x482d7b=process[_0x5debee(0x150)][_0x1bb63e];if(_0x482d7b['startsWith'](_0x5debee(0x2bf))||_0x482d7b[_0x5debee(0x1d6)](_0x5debee(0x255))||_0x482d7b[_0x5debee(0x1d6)](_0x5debee(0xb3)))continue;if(_0x482d7b==='-e'||_0x482d7b==='--eval'||_0x482d7b==='-p'||_0x482d7b===_0x5debee(0xf0)){_0x1bb63e++;continue;}_0x25b551[_0x5debee(0x1ad)](_0x482d7b);}return _0x25b551;})())}),_0x47822e({'workers':_0xa4affb,'port':_0x343fa9,'primaryOkdb':_0x5ec691,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x343fa9});return _0x986ec({'makeOkdb':_0x2459bb,'port':_0x343fa9});}function _0x47822e({workers:_0x6f30c1,port:_0x531411,primaryOkdb:_0x409b7e,workerEnv:_0x5691fb,workerRole:_0x5cf6eb,listenAddr:_0x5b046e}){const _0x3e2be8=_0x17734b,_0x25513d=new Map(),_0x316bba=new Map();let _0x58b644=![];const _0xbb050d=_0x3a539c=>_0x3a539c?.[_0x3e2be8(0x230)],_0x427c2f=_0x51aaea=>{const _0x4ec6cc=_0x3e2be8,_0x40c038=_0x31a090[_0x4ec6cc(0x251)]({...process.env,..._0x5691fb||{},'OKDB_CLUSTER_SLOT':String(_0x51aaea)});return _0x40c038['__okdbSlot']=_0x51aaea,_0x25513d['set'](_0x40c038[_0x4ec6cc(0x204)][_0x4ec6cc(0xe0)],{'worker':_0x40c038,'startedAt':Date[_0x4ec6cc(0x1c0)](),'slot':_0x51aaea}),_0x40c038['on'](_0x4ec6cc(0x1f4),_0x407733=>{const _0x227464=_0x4ec6cc;console[_0x227464(0x244)](_0x227464(0x273)+_0x40c038['process'][_0x227464(0xe0)]+_0x227464(0x2be)+(_0x407733?.['message']??_0x407733));}),_0x40c038['on'](_0x4ec6cc(0x1c2),()=>_0x52adc1()),_0x40c038;},_0x1578f8=_0xe0ee6d=>{const _0x50d0b0=_0x3e2be8;for(const {worker:_0x2a65eb}of _0x25513d['values']()){if(_0x2a65eb[_0x50d0b0(0x2ea)]()||!_0x2a65eb[_0x50d0b0(0x24f)]())continue;try{_0x2a65eb['send'](_0xe0ee6d);}catch{}}};_0x409b7e?.['_activateProcesses']?.({'kind':_0x3e2be8(0x27c),'listenAddr':_0x5b046e})[_0x3e2be8(0x2b1)](()=>{}),_0x409b7e?.[_0x3e2be8(0x2a0)]?.['setOwnMeta']?.({'workersConfigured':_0x6f30c1});const _0x23d0cf={'engines':!![],'processors':!![],'compaction':!![],..._0x5cf6eb,'http':!![]},_0x52adc1=()=>{const _0x12b245=_0x3e2be8,_0x3bf9fc=_0x409b7e?.[_0x12b245(0x2a0)];if(!_0x3bf9fc||!_0x3bf9fc[_0x12b245(0x285)])return;const _0x1bacd1=_0x3bf9fc['selfKey'];for(const {worker:_0xacd171,startedAt:_0xaf9688,slot:_0x1d9d9c,stats:_0x2c401e,processing:_0x56e6bd}of _0x25513d[_0x12b245(0x226)]()){if(_0xacd171[_0x12b245(0x2ea)]())continue;const _0x2cc5f8=_0x3bf9fc[_0x12b245(0x2b8)]?.()&&_0x3bf9fc[_0x12b245(0x2dd)](_0x12b245(0xf5),_0x173b42(_0x1d9d9c))?.[_0x12b245(0x211)]===!![];_0x3bf9fc[_0x12b245(0xea)]({'pid':_0xacd171['process'][_0x12b245(0xe0)],'startedAt':_0xaf9688,'kind':'http-server','supervisorKey':_0x1bacd1,'slot':_0x1d9d9c,'slotKey':_0x173b42(_0x1d9d9c),'role':_0x23d0cf,'listenAddr':_0x5b046e,'lifecycle':_0x2cc5f8?_0x12b245(0xae):'running','processing':_0x56e6bd??null,'stats':_0x2c401e??null})[_0x12b245(0x2b1)](()=>{});}},_0x173b42=_0x55c8f1=>_0x3b5bea('cluster:'+_0x531411,_0x55c8f1),_0x5ca2ad=_0x1df7d6=>{const _0x3db11e=_0x3e2be8,_0x2c5a84=_0x409b7e?.[_0x3db11e(0x2a0)];if(!_0x2c5a84?.['hasDesired']?.())return![];return _0x2c5a84['getDesired']('slot',_0x173b42(_0x1df7d6))?.[_0x3db11e(0x211)]===!![];};for(let _0xac3c2c=0x0;_0xac3c2c<_0x6f30c1;_0xac3c2c++){const _0x19c2fd=_0x5ca2ad(_0xac3c2c);_0x316bba[_0x3e2be8(0x2bb)](_0xac3c2c,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x19c2fd,'respawnTimer':null}),_0x19c2fd?console[_0x3e2be8(0x244)](_0x3e2be8(0x1a3)+_0xac3c2c+_0x3e2be8(0x15e)):_0x427c2f(_0xac3c2c);}const _0x5dfddd=()=>{const _0x14bad6=_0x3e2be8,_0x479806=_0x409b7e?.[_0x14bad6(0x2a0)];if(!_0x479806?.[_0x14bad6(0x285)]||!_0x479806[_0x14bad6(0x2b8)]?.())return;for(const [_0x5b3fae,_0x16f784]of _0x316bba[_0x14bad6(0x194)]()){const _0x1a3b74=_0x479806['getDesired'](_0x14bad6(0xf5),_0x173b42(_0x5b3fae)),_0x146e33=_0x1a3b74?.[_0x14bad6(0x211)]===!![],_0x99fd60=_0x1a3b74?.[_0x14bad6(0x2ce)]===!![];if(_0x146e33&&!_0x16f784[_0x14bad6(0xc0)]){_0x16f784['dead']=!![];_0x16f784['respawnTimer']&&(clearTimeout(_0x16f784['respawnTimer']),_0x16f784[_0x14bad6(0x2e1)]=null);for(const {worker:_0x44a9f5}of _0x25513d['values']()){if(_0xbb050d(_0x44a9f5)!==_0x5b3fae||_0x44a9f5[_0x14bad6(0x2ea)]())continue;try{if(_0x99fd60)_0x44a9f5[_0x14bad6(0x204)][_0x14bad6(0x2ce)](_0x14bad6(0x215));else _0x44a9f5[_0x14bad6(0x24f)]()&&_0x44a9f5[_0x14bad6(0x1df)]();}catch{}}console[_0x14bad6(0x244)](_0x14bad6(0x1af)+(_0x99fd60?'hard-killed':'decommissioned')+'\x20worker\x20slot='+_0x5b3fae+_0x14bad6(0xce));}else{if(!_0x146e33&&_0x16f784[_0x14bad6(0xc0)]&&_0x1a3b74){_0x16f784[_0x14bad6(0xc0)]=![],_0x16f784[_0x14bad6(0x1bc)]=[],_0x16f784[_0x14bad6(0xb6)]=0x0;const _0x5a900f=[..._0x25513d['values']()][_0x14bad6(0x14b)](({worker:_0x1792dd})=>_0xbb050d(_0x1792dd)===_0x5b3fae&&!_0x1792dd[_0x14bad6(0x2ea)]());!_0x5a900f&&!_0x58b644&&(_0x427c2f(_0x5b3fae),console[_0x14bad6(0x244)](_0x14bad6(0xf9)+_0x5b3fae));}}}},_0x362c6a=()=>{try{_0x5dfddd();}catch{}};_0x409b7e?.['events']?.['on']?.(_0x5dee7e['SYSTEM_PROC'],_0x362c6a);const _0x35a97e=[];if(_0x409b7e?.[_0x3e2be8(0x184)]?.['on'])for(const _0x221949 of _0x40afaa){const _0x33dddf=_0x3d945f=>{_0x1578f8({[_0x3e395e]:_0x5d2aca,'event':_0x221949,'data':_0x3d945f??{}});};_0x409b7e['events']['on'](_0x221949,_0x33dddf),_0x35a97e[_0x3e2be8(0x1ad)]({'event':_0x221949,'handler':_0x33dddf});}const _0x55bab0=setInterval(()=>{_0x5dfddd(),_0x52adc1();},_0x4a0aba);_0x55bab0['unref']?.();const _0x31de33=(_0x2c8b75,_0x2c65d5)=>{const _0x48b2d1=_0x3e2be8;if(!_0x2c65d5||typeof _0x2c65d5!==_0x48b2d1(0x144)||_0x2c65d5[_0x3e395e]!==_0x41c5ff)return;if(!_0x409b7e?.[_0x48b2d1(0x244)]?.[_0x48b2d1(0x1aa)])return;const _0x388d3b=_0x2c65d5[_0x48b2d1(0x26c)]||{};_0x409b7e[_0x48b2d1(0x244)][_0x48b2d1(0x1aa)]({..._0x388d3b,'msg':'[w'+_0x2c65d5[_0x48b2d1(0xf5)]+']\x20'+(_0x388d3b[_0x48b2d1(0xed)]??''),'meta':{..._0x388d3b[_0x48b2d1(0x1b2)]||{},'worker':_0x2c65d5['slot'],'workerPid':_0x2c65d5[_0x48b2d1(0xe0)]}});};_0x31a090['on'](_0x3e2be8(0x2c7),_0x31de33);const _0x4fe95a=(_0xb5bd46,_0x50d3bb)=>{const _0x91776f=_0x3e2be8;if(!_0x50d3bb||typeof _0x50d3bb!==_0x91776f(0x144)||_0x50d3bb[_0x3e395e]!==_0x45f01f)return;const _0x488576=_0x25513d[_0x91776f(0xf2)](_0xb5bd46[_0x91776f(0x204)][_0x91776f(0xe0)]);if(_0x488576){_0x488576['stats']={..._0x50d3bb[_0x91776f(0x16d)],'at':Date[_0x91776f(0x1c0)]()};if(_0x50d3bb['processing']!==undefined){const _0x590ee8=_0x4ea13c(_0x50d3bb[_0x91776f(0x284)]);_0x590ee8!==_0x488576[_0x91776f(0x139)]&&(_0x488576[_0x91776f(0x139)]=_0x590ee8,_0x1cdeff()),_0x488576[_0x91776f(0x284)]=_0x50d3bb[_0x91776f(0x284)];}}};let _0x5a8ab7=null;const _0x1cdeff=()=>{if(_0x5a8ab7||_0x58b644)return;_0x5a8ab7=setTimeout(()=>{_0x5a8ab7=null;if(!_0x58b644)_0x52adc1();},_0x87335a),_0x5a8ab7['unref']?.();};_0x31a090['on']('message',_0x4fe95a),_0x31a090['on'](_0x3e2be8(0x2b3),(_0x712835,_0x2fbea6,_0x375924)=>{const _0x56075e=_0x3e2be8,_0x28faee=_0x712835[_0x56075e(0x204)]['pid'],_0xc69efc=_0xbb050d(_0x712835),_0x16fffb=_0x25513d[_0x56075e(0xf2)](_0x28faee);if(_0x16fffb&&_0x409b7e?.[_0x56075e(0x2a0)])_0x409b7e[_0x56075e(0x2a0)]['removeNode'](_0x28faee+':'+_0x16fffb[_0x56075e(0x20b)])['catch'](()=>{});_0x25513d['delete'](_0x28faee),console[_0x56075e(0x244)](_0x56075e(0x273)+_0x28faee+'\x20(slot='+(_0xc69efc??'?')+')\x20exited\x20'+(_0x56075e(0xff)+_0x2fbea6+_0x56075e(0x101)+(_0x375924??_0x56075e(0x1c3))+_0x56075e(0x2d7)+_0x25513d[_0x56075e(0x252)]+_0x56075e(0x145))),_0x52adc1();if(_0x58b644||_0xc69efc==null)return;const _0x2c92aa=_0x316bba[_0x56075e(0xf2)](_0xc69efc);if(!_0x2c92aa||_0x2c92aa[_0x56075e(0xc0)])return;const _0x38a5eb=Date[_0x56075e(0x1c0)]();_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x1ad)](_0x38a5eb),_0x2c92aa[_0x56075e(0x1bc)]=_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x13b)](_0x1565a8=>_0x38a5eb-_0x1565a8<=_0x2cdbd5);if(_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x136)]>=_0x10d4d0){_0x2c92aa[_0x56075e(0xc0)]=!![],console['error']('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0xc69efc+_0x56075e(0x256)+_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x136)]+_0x56075e(0x167)+(_0x2cdbd5+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x25513d['size']+_0x56075e(0xd8)));return;}_0x2c92aa[_0x56075e(0xb6)]++;const _0x2fd9ba=Math[_0x56075e(0x1b7)](_0x7375bc,_0x4ec597*0x2**(_0x2c92aa['consecutiveFailures']-0x1));console[_0x56075e(0x244)](_0x56075e(0x17a)+_0xc69efc+_0x56075e(0xd6)+_0x2fd9ba+_0x56075e(0xef)+_0x2c92aa[_0x56075e(0xb6)]+')'),_0x2c92aa['respawnTimer']=setTimeout(()=>{const _0x3a3e00=_0x56075e;_0x2c92aa['respawnTimer']=null;if(_0x58b644||_0x2c92aa[_0x3a3e00(0xc0)])return;const _0x178039=_0x427c2f(_0xc69efc);_0x178039[_0x3a3e00(0x2e3)](_0x3a3e00(0x276),()=>{const _0x230329=_0x3a3e00;if(_0x316bba[_0x230329(0xf2)](_0xc69efc)===_0x2c92aa)_0x2c92aa[_0x230329(0xb6)]=0x0;});},_0x2fd9ba),_0x2c92aa['respawnTimer'][_0x56075e(0x2b4)]?.();});const _0x24af15=[..._0x25513d[_0x3e2be8(0x14c)]()];console[_0x3e2be8(0x244)]('[okdb-cluster]\x20primary\x20pid='+process[_0x3e2be8(0xe0)]+_0x3e2be8(0x2cd)+_0x6f30c1+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x531411+':\x20'+('['+_0x24af15[_0x3e2be8(0x261)](',\x20')+']'));const _0x2ccde3={'_isClusterController':!![],'port':_0x531411,'primaryOkdb':_0x409b7e??null,'status'(){const _0x58c843=_0x3e2be8;return{'clustered':!![],'primaryPid':process[_0x58c843(0xe0)],'port':_0x531411,'primaryRole':_0x409b7e?.[_0x58c843(0x152)]??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x25513d[_0x58c843(0x226)]()]['map'](({worker:_0x585117})=>({'pid':_0x585117['process'][_0x58c843(0xe0)],'id':_0x585117['id'],'dead':_0x585117[_0x58c843(0x2ea)]()}))};},async 'close'(){const _0x35b679=_0x3e2be8;_0x58b644=!![];for(const _0xfd5213 of _0x316bba[_0x35b679(0x226)]()){_0xfd5213[_0x35b679(0xc0)]=!![],_0xfd5213['respawnTimer']&&(clearTimeout(_0xfd5213['respawnTimer']),_0xfd5213['respawnTimer']=null);}clearInterval(_0x55bab0);_0x5a8ab7&&(clearTimeout(_0x5a8ab7),_0x5a8ab7=null);_0x31a090[_0x35b679(0x282)](_0x35b679(0x2c7),_0x31de33),_0x31a090[_0x35b679(0x282)](_0x35b679(0x2c7),_0x4fe95a),_0x409b7e?.[_0x35b679(0x184)]?.[_0x35b679(0x282)]?.(_0x5dee7e[_0x35b679(0x205)],_0x362c6a);if(_0x409b7e?.[_0x35b679(0x184)]?.[_0x35b679(0x282)])for(const {event:_0x482d24,handler:_0x2e87b8}of _0x35a97e){try{_0x409b7e[_0x35b679(0x184)]['off'](_0x482d24,_0x2e87b8);}catch{}}_0x35a97e[_0x35b679(0x136)]=0x0;const _0x4656d0=[..._0x25513d[_0x35b679(0x226)]()][_0x35b679(0x279)](({worker:_0x32e0f5})=>_0x32e0f5);if(_0x4656d0[_0x35b679(0x136)]===0x0)return;await Promise[_0x35b679(0xe4)](_0x4656d0[_0x35b679(0x279)](_0x3d2fdb=>new Promise(_0x426b9e=>{const _0x361d9d=_0x35b679;if(_0x3d2fdb[_0x361d9d(0x2ea)]()){_0x426b9e();return;}let _0x16dc30=![];const _0x263787=()=>{if(_0x16dc30)return;_0x16dc30=!![];if(_0x1f1d20)clearTimeout(_0x1f1d20);_0x426b9e();};_0x3d2fdb[_0x361d9d(0x2e3)](_0x361d9d(0x2b3),_0x263787);const _0x1f1d20=setTimeout(()=>{const _0x1a88d1=_0x361d9d;try{_0x3d2fdb[_0x1a88d1(0x204)]['kill']();}catch{}},_0x109a3f+0x1f4);_0x1f1d20['unref']?.();try{_0x3d2fdb[_0x361d9d(0x1df)]();}catch{try{_0x3d2fdb[_0x361d9d(0x204)][_0x361d9d(0x2ce)]();}catch{}}})));}};return _0x2ccde3;}async function _0x986ec({makeOkdb:_0x4f1405,port:_0x2d3108}){const _0x116039=_0x17734b,_0x13b5a8=await _0x4f1405();return _0x20a886(_0x13b5a8),_0x13b5a8[_0x116039(0x2ec)]['listen'](_0x2d3108);}function _0x20a886(_0x4a61ab){const _0x43ec6a=_0x17734b;if(!_0x4a61ab||_0x4a61ab['_clusterWorkerAttached'])return;_0x4a61ab[_0x43ec6a(0x294)]=!![];try{const {OKDBChangefeed:_0x4ace2c}=requireOkdbChangefeed(),_0x1af256=_0x4a61ab[_0x43ec6a(0xf3)];if(_0x1af256&&typeof _0x1af256[_0x43ec6a(0x2b2)]===_0x43ec6a(0x1d3)){const _0x47bb21=new _0x4ace2c(_0x4a61ab);_0x47bb21[_0x43ec6a(0xc8)](),_0x1af256[_0x43ec6a(0x2b2)](_0x47bb21),_0x4a61ab[_0x43ec6a(0x113)]=_0x47bb21;}}catch(_0x193efd){_0x4a61ab['log']?.[_0x43ec6a(0x2c5)]?.(_0x43ec6a(0x112)+(_0x193efd?.[_0x43ec6a(0x2c7)]??_0x193efd),{'feature':_0x43ec6a(0x265)});}const _0x4fdd54=_0x3a9631=>{const _0x3819e7=_0x43ec6a;if(!_0x3a9631||typeof _0x3a9631!==_0x3819e7(0x144)||_0x3a9631[_0x3e395e]==null)return;if(_0x3a9631[_0x3e395e]===_0x5d2aca)try{_0x4a61ab[_0x3819e7(0xf3)]?.[_0x3819e7(0xac)]?.(_0x3a9631[_0x3819e7(0xb0)],_0x3a9631[_0x3819e7(0x253)]);}catch{}};process['on'](_0x43ec6a(0x2c7),_0x4fdd54),_0x4a61ab[_0x43ec6a(0xc2)]=_0x4fdd54;{let _0x9fb025=process[_0x43ec6a(0x18e)](),_0x3a012d=Date['now']();const _0x123089=()=>{const _0x4b7c3c=_0x43ec6a;if(typeof process[_0x4b7c3c(0x23a)]!==_0x4b7c3c(0x1d3)||!process[_0x4b7c3c(0xb5)])return;const _0x22e976=Date['now'](),_0x6a806b=process['cpuUsage'](),_0x4e0303=(_0x22e976-_0x3a012d)*0x3e8,_0x37b7cd=_0x6a806b['user']-_0x9fb025[_0x4b7c3c(0x1c1)]+(_0x6a806b['system']-_0x9fb025[_0x4b7c3c(0x212)]),_0x32ce8f=_0x4e0303>0x0?Math['min'](0x64,Math[_0x4b7c3c(0x153)](_0x37b7cd/(_0x4e0303*(_0x513786[_0x4b7c3c(0x2bd)]()[_0x4b7c3c(0x136)]||0x1))*0x64)):0x0;_0x9fb025=_0x6a806b,_0x3a012d=_0x22e976;const _0x4f3ad6=process[_0x4b7c3c(0x1dd)]();let _0x8f5402=null;try{_0x8f5402=_0x4a61ab[_0x4b7c3c(0x152)]?.[_0x4b7c3c(0x1f3)]?_0x4a61ab[_0x4b7c3c(0x2a0)]?.[_0x4b7c3c(0x1bb)]?.()??null:null;}catch{}try{process[_0x4b7c3c(0x23a)]({[_0x3e395e]:_0x45f01f,'stats':{'rss':_0x4f3ad6[_0x4b7c3c(0x1a0)],'heapUsed':_0x4f3ad6[_0x4b7c3c(0x2a1)],'heapTotal':_0x4f3ad6[_0x4b7c3c(0xe1)],'external':_0x4f3ad6[_0x4b7c3c(0x105)],'cpuPct':_0x32ce8f,'cpuWindowMs':Math[_0x4b7c3c(0x153)](_0x4e0303/0x3e8)||null},'processing':_0x8f5402});}catch{}},_0x2046c3=Math[_0x43ec6a(0x24a)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x4e8565=setInterval(_0x123089,_0x2046c3);_0x4e8565[_0x43ec6a(0x2b4)]?.(),_0x123089();for(const _0x1c8a8e of[_0x43ec6a(0x189),_0x43ec6a(0x260)]){_0x4a61ab[_0x43ec6a(0x184)]?.['on']?.(_0x1c8a8e,()=>{try{_0x123089();}catch{}});}}let _0xc223e7=![];const _0x2daa67=async _0x165046=>{const _0x3d6e50=_0x43ec6a;if(_0xc223e7)return;_0xc223e7=!![];const _0x1774ab=setTimeout(()=>process[_0x3d6e50(0x2b3)](_0x165046),_0x109a3f);_0x1774ab[_0x3d6e50(0x2b4)]?.();try{await _0x4a61ab[_0x3d6e50(0x1a8)]?.();}catch{}process[_0x3d6e50(0x2b3)](_0x165046);};process['on'](_0x43ec6a(0x1df),()=>_0x2daa67(0x0));if(process['send']&&!process['connected'])_0x2daa67(0x0);if(process[_0x43ec6a(0x1d7)]!==_0x43ec6a(0x1f5)){const _0x1b3766=setInterval(()=>{const _0x154079=_0x43ec6a;if(process[_0x154079(0x175)]===0x1)_0x2daa67(0x0);},_0x3222bc);_0x1b3766[_0x43ec6a(0x2b4)]?.(),_0x4a61ab['_clusterOrphanWatch']=_0x1b3766;}}return okdbCluster={'runClustered':_0x16df4e,'attachWorkerCluster':_0x20a886},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x48c546=_0x2ee730;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x496c27=require$$0$5,{attachWorkerCluster:_0x523529}=requireOkdbCluster();async function _0x571855(){const _0x142d85=_0x302a,_0xaa0fe6=process.env.OKDB_HTTP_CHILD;if(!_0xaa0fe6)throw new Error(_0x142d85(0x25b));const {rootPath:_0x904889,port:_0x16d1a9,options:options={},logLevel:logLevel=_0x142d85(0x19b)}=JSON['parse'](_0xaa0fe6);if(!_0x904889||!_0x16d1a9)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0xa04980=new _0x496c27(_0x904889,{...options,'engines':![],'processors':![],'compaction':![]});_0xa04980[_0x142d85(0x244)][_0x142d85(0x114)]?.();const _0x5be3f0=process.env.OKDB_CLUSTER_SLOT??'?',_0x162529={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1a8eb2=_0x162529[logLevel]??_0x162529[_0x142d85(0x19b)];_0xa04980[_0x142d85(0x244)][_0x142d85(0x2a5)](_0x5acf98=>{const _0x133022=_0x142d85;if((_0x162529[_0x5acf98[_0x133022(0xda)]]??0x1)<_0x1a8eb2)return;try{process[_0x133022(0x23a)]?.({'__okdbCluster':'log','slot':_0x5be3f0,'pid':process[_0x133022(0xe0)],'entry':_0x5acf98});}catch{}}),await _0xa04980['open'](),_0x523529(_0xa04980),await _0xa04980[_0x142d85(0x2ec)][_0x142d85(0x1f6)](_0x16d1a9);}return _0x571855()[_0x48c546(0x2b1)](_0x1e5194=>{const _0x258944=_0x48c546;try{process[_0x258944(0x23a)]?.({'__okdbCluster':_0x258944(0x244),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x258944(0xe0)],'entry':{'level':_0x258944(0x1f4),'msg':'http\x20worker\x20child\x20failed:\x20'+(_0x1e5194?.[_0x258944(0x2c7)]??_0x1e5194)}});}catch{}process[_0x258944(0x2b3)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x2ee730(0x1fa)]=okdbHttpWorkerChild;