@kedem/okdb 2.0.2 → 2.0.3
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 _0x487946=_0x1273;(function(_0x4a297b,_0x536725){const _0x398b1e=_0x1273,_0x1ac674=_0x4a297b();while(!![]){try{const _0x37679b=parseInt(_0x398b1e(0x1c4))/0x1*(-parseInt(_0x398b1e(0x2e3))/0x2)+-parseInt(_0x398b1e(0x341))/0x3*(parseInt(_0x398b1e(0x271))/0x4)+-parseInt(_0x398b1e(0x344))/0x5+-parseInt(_0x398b1e(0x3a7))/0x6*(parseInt(_0x398b1e(0x351))/0x7)+parseInt(_0x398b1e(0x280))/0x8*(-parseInt(_0x398b1e(0x3c7))/0x9)+-parseInt(_0x398b1e(0x250))/0xa+parseInt(_0x398b1e(0x1af))/0xb;if(_0x37679b===_0x536725)break;else _0x1ac674['push'](_0x1ac674['shift']());}catch(_0x5e1262){_0x1ac674['push'](_0x1ac674['shift']());}}}(_0xcdd8,0x8e447));var require$$0$5=require(_0x487946(0x38a)),require$$1$1=require('cluster'),require$$1=require(_0x487946(0x2ee)),require$$0$3=require('os'),require$$2=require(_0x487946(0x2af)),require$$0=require(_0x487946(0x2c2)),require$$0$2=require(_0x487946(0x385)),require$$0$1=require('fs'),require$$0$4=require(_0x487946(0x31b));function getDefaultExportFromCjs(_0x43c342){const _0x5146b8=_0x487946;return _0x43c342&&_0x43c342[_0x5146b8(0x32b)]&&Object['prototype'][_0x5146b8(0x26a)][_0x5146b8(0x27a)](_0x43c342,_0x5146b8(0x1f2))?_0x43c342[_0x5146b8(0x1f2)]:_0x43c342;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x49bacc=_0x487946;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x6d044c={'PUT':_0x49bacc(0x32c),'REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x49bacc(0x356),'INDEX_RESET':_0x49bacc(0x2d9),'TYPE_REGISTER':_0x49bacc(0x350),'TYPE_DROP':_0x49bacc(0x3b8),'FTS_REGISTER':_0x49bacc(0x39d),'FTS_DROP':'dropFts','FTS_RESET':_0x49bacc(0x36d),'SCHEMA_SET':_0x49bacc(0x2de),'SCHEMA_DROP':_0x49bacc(0x3b1),'TTL_SET':'setTtl','TTL_CLEAR':_0x49bacc(0x32f)},_0x3b5f14={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x49bacc(0x366),'SYSTEM_CLOCK_CHANGE':_0x49bacc(0x241),'SYSTEM_POKE':_0x49bacc(0x3c2),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x49bacc(0x1cb),'SYSTEM_PROC':_0x49bacc(0x358),'SYSTEM_BUS_STATE_CHANGE':_0x49bacc(0x20b),'ITEM_CREATE':_0x49bacc(0x21d),'ITEM_UPDATE':_0x49bacc(0x36c),'ITEM_REMOVE':_0x49bacc(0x2ea),'INDEX_RESET':_0x49bacc(0x2f9),'INDEX_READY':_0x49bacc(0x2a3),'INDEX_PROGRESS':_0x49bacc(0x2ec),'VIEW_PROGRESS':_0x49bacc(0x22a),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x49bacc(0x28b),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x49bacc(0x1d6),'FTS_RESET':_0x49bacc(0x395),'SCHEMA_SET':_0x49bacc(0x1d7),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x49bacc(0x375),'UNIQUE_VIOLATION_RESOLVED':_0x49bacc(0x2ce),'REF_VIOLATION':_0x49bacc(0x227),'REF_VIOLATION_RESOLVED':_0x49bacc(0x1fc),'SYNC_APPLY':_0x49bacc(0x210),'TXN_START':_0x49bacc(0x1d8),'TXN_END':_0x49bacc(0x367),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x49bacc(0x253),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x49bacc(0x1e9),'SYSTEM_ENV_RELEASE':_0x49bacc(0x1e7),'TTL_EXPIRED':_0x49bacc(0x294),'TTL_SET':_0x49bacc(0x3ca),'TTL_CLEAR':_0x49bacc(0x254),'LICENSE_INVALID':_0x49bacc(0x24e),'LICENSE_ADDED':_0x49bacc(0x2f5),'LICENSE_ACTIVATED':_0x49bacc(0x2c1),'LICENSE_REMOVED':_0x49bacc(0x224)},_0x36b2a8={'CREATING':_0x49bacc(0x27c),'RESETTING':'resetting','READY':_0x49bacc(0x229),'DROPPING':'dropping','WAITING':_0x49bacc(0x24f)},_0x6fb34d={'CREATED':'created','STARTING':_0x49bacc(0x293),'STARTED':'started','STOPPING':_0x49bacc(0x393),'STOPPED':'stopped'},_0x52ebb8={'CREATING':_0x49bacc(0x27c),'READY':_0x49bacc(0x229),'HALTED':_0x49bacc(0x2aa),'STOPPED':_0x49bacc(0x208),'RESETTING':'resetting'},_0x1d0ec2=Object[_0x49bacc(0x2a8)]({'POKE':_0x49bacc(0x1bd),'DRAIN':_0x49bacc(0x3b5),'TYPE_DROP':_0x49bacc(0x1b1),'PROC':_0x49bacc(0x2fc),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x1d0ec2,'CHANGE_ACTIONS':_0x6d044c,'EVENTS':_0x3b5f14,'INDEX_STATE':_0x36b2a8,'OKDB_STATE':_0x6fb34d,'VIEW_STATE':_0x52ebb8},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x49ee8a=_0x487946;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x520fe3,performance:_0xda0a7a}=require$$0,_0x257ff1=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x49ee8a(0x1ec),_0x4881f1=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x223693=process.env.OKDB_LOOP_LAG_ALL==='1',_0x11305c=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x174dd6{constructor(){const _0x2c9b0e=_0x49ee8a;this[_0x2c9b0e(0x384)]=_0x257ff1,this[_0x2c9b0e(0x32a)]=new Map(),this['_h']=null,this[_0x2c9b0e(0x2a0)]=null,this[_0x2c9b0e(0x2fd)]=![],this[_0x2c9b0e(0x248)]=(_0x5b1f22,_0x9e3193)=>process[_0x2c9b0e(0x1bb)]['write'](_0x5b1f22+(_0x9e3193?'\x20'+JSON[_0x2c9b0e(0x2c7)](_0x9e3193):'')+'\x0a');}[_0x49ee8a(0x2c8)](){const _0x335a8c=_0x49ee8a;return _0xda0a7a[_0x335a8c(0x2c8)]();}[_0x49ee8a(0x328)](_0xb90aa8){const _0x557e43=_0x49ee8a;if(typeof _0xb90aa8===_0x557e43(0x1dc))this['_log']=_0xb90aa8;}['note'](_0x30d740,_0x246e9f,_0x5a0e52){const _0x571a43=_0x49ee8a;if(!this['enabled'])return;let _0x5e479d=this[_0x571a43(0x32a)]['get'](_0x30d740);!_0x5e479d&&(_0x5e479d={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x571a43(0x32a)][_0x571a43(0x1e5)](_0x30d740,_0x5e479d)),_0x5e479d['ms']+=_0x246e9f,_0x5e479d[_0x571a43(0x1b8)]+=0x1,_0x246e9f>_0x5e479d['maxMs']&&(_0x5e479d['maxMs']=_0x246e9f,_0x5e479d[_0x571a43(0x21e)]=_0x5a0e52||'');}[_0x49ee8a(0x1bf)](_0x121dec){const _0x3e667f=_0x49ee8a;if(!this['enabled']||this[_0x3e667f(0x2fd)])return;this['_started']=!![];if(_0x121dec)this[_0x3e667f(0x248)]=_0x121dec;this['_h']=_0x520fe3({'resolution':0xa}),this['_h'][_0x3e667f(0x234)](),this['_timer']=setInterval(()=>this[_0x3e667f(0x287)](),_0x4881f1);if(this[_0x3e667f(0x2a0)]['unref'])this[_0x3e667f(0x2a0)]['unref']();}['onWindow'](_0x528163){const _0xdfac0b=_0x49ee8a;if(!this[_0xdfac0b(0x359)])this[_0xdfac0b(0x359)]=new Set();this[_0xdfac0b(0x359)]['add'](_0x528163);if(!this[_0xdfac0b(0x2fd)])this['_startAdmission']();}['offWindow'](_0x422b9f){const _0x5d9cec=_0x49ee8a;this[_0x5d9cec(0x359)]?.[_0x5d9cec(0x362)](_0x422b9f);}[_0x49ee8a(0x1b9)](){const _0x749e1e=_0x49ee8a;if(this['_admissionStarted'])return;this[_0x749e1e(0x354)]=!![];!this['_h']&&(this['_h']=_0x520fe3({'resolution':0xa}),this['_h'][_0x749e1e(0x234)]());const _0x40f4ac=_0x4881f1;this['_admissionTimer']=setInterval(()=>{const _0x8c62d3=_0x749e1e,_0x5ba4d8=this['_h'];if(!_0x5ba4d8)return;const _0x2aea6e=_0x5ba4d8[_0x8c62d3(0x2ad)](0x63)/0xf4240,_0x1128a5=_0x5ba4d8[_0x8c62d3(0x31f)]/0xf4240,_0x27f9ef=_0x5ba4d8[_0x8c62d3(0x34c)]/0xf4240;_0x5ba4d8['reset']();if(this[_0x8c62d3(0x359)])for(const _0x5bb550 of this[_0x8c62d3(0x359)]){try{_0x5bb550({'p99Ms':_0x2aea6e,'maxMs':_0x1128a5,'meanMs':_0x27f9ef,'reportMs':_0x40f4ac});}catch{}}},_0x40f4ac);if(this[_0x749e1e(0x2d8)][_0x749e1e(0x371)])this[_0x749e1e(0x2d8)][_0x749e1e(0x371)]();}['_report'](){const _0x45d000=_0x49ee8a,_0x5b2d4b=this['_h'],_0x346676=_0x5b2d4b[_0x45d000(0x31f)]/0xf4240,_0x1e2796=_0x5b2d4b[_0x45d000(0x2ad)](0x63)/0xf4240,_0x2cc3e3=_0x5b2d4b['mean']/0xf4240;_0x5b2d4b['reset']();const _0x24e93f=[...this[_0x45d000(0x32a)][_0x45d000(0x23e)]()][_0x45d000(0x316)](([_0x43dd4d,_0x595db9])=>({'label':_0x43dd4d,..._0x595db9}))[_0x45d000(0x1ab)]((_0x581e72,_0x3693ba)=>_0x3693ba['ms']-_0x581e72['ms'])[_0x45d000(0x2e7)](0x0,0x8);this[_0x45d000(0x32a)][_0x45d000(0x2ba)]();const _0x24da04=_0x24e93f['reduce']((_0x394f6f,_0x9b1da4)=>_0x394f6f+_0x9b1da4['ms'],0x0),_0x378202=_0x24e93f[_0x45d000(0x316)](_0x7246ab=>_0x7246ab[_0x45d000(0x26b)]+'='+_0x7246ab['ms']['toFixed'](0x0)+_0x45d000(0x1d3)+_0x7246ab[_0x45d000(0x1b8)]+(_0x7246ab['maxMs']>0x5?_0x45d000(0x296)+_0x7246ab[_0x45d000(0x31e)]['toFixed'](0x0)+'ms'+(_0x7246ab['maxExtra']?'\x20'+_0x7246ab[_0x45d000(0x21e)]:'')+')':''));(_0x223693||_0x346676>=_0x11305c)&&this['_log']('loop-lag\x20'+_0x4881f1+_0x45d000(0x1a3)+_0x346676['toFixed'](0x0)+_0x45d000(0x2b1)+_0x1e2796[_0x45d000(0x307)](0x0)+'ms\x20mean='+_0x2cc3e3[_0x45d000(0x307)](0x0)+_0x45d000(0x2c6)+_0x24da04[_0x45d000(0x307)](0x0)+'ms'+(_0x378202[_0x45d000(0x39e)]?'\x20│\x20'+_0x378202[_0x45d000(0x28e)]('\x20\x20'):''),{'feature':_0x45d000(0x295)});if(this[_0x45d000(0x359)])for(const _0x1fe0b9 of this[_0x45d000(0x359)]){try{_0x1fe0b9({'p99Ms':_0x1e2796,'maxMs':_0x346676,'meanMs':_0x2cc3e3,'reportMs':_0x4881f1});}catch{}}}['stop'](){const _0x261d41=_0x49ee8a;if(this['_timer'])clearInterval(this[_0x261d41(0x2a0)]);if(this['_h'])this['_h']['disable']();this[_0x261d41(0x2a0)]=null,this['_h']=null,this['_started']=![];}}const _0x3dd15c=new _0x174dd6();if(_0x3dd15c[_0x49ee8a(0x384)])_0x3dd15c[_0x49ee8a(0x1bf)]();return okdbLoopMonitor={'LOOP':_0x3dd15c},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x1846aa=require$$0$1,_0x19144a=require$$1;let _0x539dcd,_0x1a3d8e,_0x457b54,_0x30a9c4,_0x15c0ae,_0x50c5c1,_0x31d889,_0xd84e73=![];const _0x13a412=new Set();let _0x291c37=null;const _0x409f87=new Map();function _0x549a25(){const _0x2c87be=_0x1273;if(_0x539dcd!==undefined)return _0x539dcd;_0x539dcd=process.env.OKDB_DIAG==='1';if(!_0x539dcd)return![];_0x1a3d8e=process.env.OKDB_DIAG_STACK==='1',_0x30a9c4=Math[_0x2c87be(0x31f)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x457b54=new Array(_0x30a9c4),_0x15c0ae=0x0,_0x50c5c1=0x0,_0x31d889=process.env.OKDB_DIAG_DIR||null;if(_0x31d889)try{_0x1846aa[_0x2c87be(0x2d7)](_0x31d889,{'recursive':!![]});}catch{}return!![];}function _0x5065d6(){return _0x539dcd===undefined?_0x549a25():_0x539dcd;}function _0x2a7224(_0x3d56e2,_0x28e28b){const _0xb44661=_0x1273;if(_0x539dcd===undefined?!_0x549a25():!_0x539dcd)return;let _0x11365b;if(_0x1a3d8e){const _0x525616=new Error()[_0xb44661(0x1e6)]||'';_0x11365b=_0x525616[_0xb44661(0x1ff)]('\x0a')[_0xb44661(0x2e7)](0x3)[_0xb44661(0x316)](_0x5e6505=>_0x5e6505[_0xb44661(0x343)]())[_0xb44661(0x315)](Boolean)[_0xb44661(0x2e7)](0x0,0x8);}_0x457b54[_0x15c0ae]={'seq':_0x50c5c1++,'t':Date['now'](),'env':_0x3d56e2,'kind':_0x28e28b||_0xb44661(0x349),'stack':_0x11365b},_0x15c0ae=(_0x15c0ae+0x1)%_0x30a9c4;}function _0x356909(_0x1fa7d8){const _0x1fb1bb=_0x1273,_0x476d6b=[];for(let _0x2318c5=0x0;_0x2318c5<_0x30a9c4;_0x2318c5++){const _0x501337=_0x457b54[(_0x15c0ae-0x1-_0x2318c5+_0x30a9c4*0x2)%_0x30a9c4];if(!_0x501337)continue;_0x476d6b[_0x1fb1bb(0x232)](_0x501337);if(_0x476d6b[_0x1fb1bb(0x39e)]>=_0x1fa7d8)break;}return _0x476d6b;}function _0x27f1da(_0x380bbf){const _0x5537a6=_0x1273;try{process['stderr'][_0x5537a6(0x309)](_0x380bbf+'\x0a');}catch{}if(_0x31d889)try{_0x1846aa['appendFileSync'](_0x19144a['join'](_0x31d889,_0x5537a6(0x1f3)+process[_0x5537a6(0x2e8)]+_0x5537a6(0x27e)),_0x380bbf+'\x0a');}catch{}}function _0x1cbaea(_0x4d6ef5){const _0x14767f=_0x1273,_0x515545=_0x356909(_0x4d6ef5);if(!_0x515545['length'])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x15bd0e=Date[_0x14767f(0x2c8)]();return _0x515545[_0x14767f(0x316)](_0x290627=>{const _0xf714fa=_0x14767f,_0x1dd205=_0xf714fa(0x290)+_0x290627[_0xf714fa(0x2f1)]+'\x20-'+(_0x15bd0e-_0x290627['t'])+_0xf714fa(0x3bd)+_0x290627[_0xf714fa(0x30d)]+'\x20'+_0x290627[_0xf714fa(0x1c9)];return _0x290627[_0xf714fa(0x1e6)]&&_0x290627[_0xf714fa(0x1e6)][_0xf714fa(0x39e)]?_0x1dd205+_0xf714fa(0x3ae)+_0x290627[_0xf714fa(0x1e6)][_0xf714fa(0x28e)](_0xf714fa(0x3ae)):_0x1dd205;})[_0x14767f(0x28e)]('\x0a');}function _0x3871f6(_0x348592,_0x483c6b){const _0x379f0a=_0x1273,_0x26b3d0=_0x379f0a(0x1f4)+_0x348592+_0x379f0a(0x391)+new Date()[_0x379f0a(0x35a)]()+'\x20pid='+process['pid']+_0x379f0a(0x207),_0x4c5512=[_0x26b3d0,'error:\x20'+(_0x483c6b&&_0x483c6b['stack']?_0x483c6b['stack'][_0x379f0a(0x1ff)]('\x0a')[0x0]:_0x483c6b),_0x379f0a(0x3a5)+(_0x1a3d8e?'':_0x379f0a(0x33b))+':',_0x1cbaea(0x18),_0x14fa7a(),'='['repeat'](_0x26b3d0[_0x379f0a(0x39e)]-0x1)];_0x27f1da(_0x4c5512[_0x379f0a(0x28e)]('\x0a'));}function _0xc811a6(_0x6149b3){const _0x272fc7=_0x1273;if(!_0x5065d6())return;const _0x310ffe=String(_0x6149b3&&_0x6149b3['message']||_0x6149b3||''),_0x3a2adc=/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x310ffe);_0x3871f6(_0x3a2adc?_0x272fc7(0x3a6):_0x272fc7(0x392),_0x6149b3);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x3a2adc)return;try{console[_0x272fc7(0x20c)](_0x6149b3&&_0x6149b3[_0x272fc7(0x1e6)]?_0x6149b3[_0x272fc7(0x1e6)]:_0x6149b3);}catch{}process[_0x272fc7(0x289)](0x1);}function _0x100091(_0x5ce0d8){const _0xfacda3=_0x1273;if(!_0x5065d6())return;const _0x9bcf8b=String(_0x5ce0d8&&_0x5ce0d8[_0xfacda3(0x302)]||_0x5ce0d8||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x9bcf8b)&&_0x3871f6(_0xfacda3(0x39a),_0x5ce0d8);}function _0x14fa7a(){const _0x3e9b16=_0x1273,_0xdbecc8=[_0x3e9b16(0x205)];let _0x422ea0=![];for(const _0x47b837 of _0x13a412){const _0x45f82e=_0x47b837&&_0x47b837[_0x3e9b16(0x285)];if(!_0x45f82e)continue;for(const [_0x5cfa48,_0x390216]of _0x45f82e){const _0x18fe28=_0x390216&&_0x390216[_0x3e9b16(0x33a)]&&_0x390216[_0x3e9b16(0x33a)][_0x3e9b16(0x2c4)];if(!_0x18fe28)continue;let _0x25e713,_0x13418d;try{_0x25e713=Atomics[_0x3e9b16(0x21b)](_0x18fe28,0x0),_0x13418d=Atomics[_0x3e9b16(0x21b)](_0x18fe28,0x1);}catch{continue;}if(_0x25e713===0x0)continue;_0x422ea0=!![];const _0x3b619e=_0x25e713>0x0?_0x3e9b16(0x2dd):_0x3e9b16(0x2a4),_0x4b2e80=Date[_0x3e9b16(0x2c8)]()-Math['abs'](_0x25e713)*0x3e8,_0xbb9801=((()=>{const _0x4a589f=_0x3e9b16;try{return _0x390216[_0x4a589f(0x246)]&&_0x390216[_0x4a589f(0x246)][_0x4a589f(0x2b7)]?_0x390216[_0x4a589f(0x246)][_0x4a589f(0x2b7)]():null;}catch{return null;}})());_0xdbecc8[_0x3e9b16(0x232)](_0x3e9b16(0x336)+_0x5cfa48+_0x3e9b16(0x24d)+_0x3b619e+_0x3e9b16(0x2e2)+_0x4b2e80+'ms\x20activeWriters='+_0x13418d+(_0xbb9801?_0x3e9b16(0x22d)+_0xbb9801[_0x3e9b16(0x1d1)]+_0x3e9b16(0x262)+_0xbb9801[_0x3e9b16(0x25e)]+_0x3e9b16(0x1b2)+_0xbb9801['parkedNow']+'}':''));}}if(!_0x422ea0)_0xdbecc8[_0x3e9b16(0x232)](_0x3e9b16(0x38d));return _0xdbecc8[_0x3e9b16(0x28e)]('\x0a');}function _0xb48d2a(){const _0x25eaa0=_0x1273;if(!_0x5065d6())return;const _0x52d489=Math[_0x25eaa0(0x31f)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x5c1355=Date[_0x25eaa0(0x2c8)]();for(const _0x493698 of _0x13a412){const _0x240250=_0x493698&&_0x493698[_0x25eaa0(0x285)];if(!_0x240250)continue;for(const [_0x547c63,_0xd2bfd4]of _0x240250){const _0x5629c2=_0xd2bfd4&&_0xd2bfd4['_coordinator']&&_0xd2bfd4[_0x25eaa0(0x33a)][_0x25eaa0(0x2c4)];if(!_0x5629c2)continue;let _0x3379cd;try{_0x3379cd=Atomics[_0x25eaa0(0x21b)](_0x5629c2,0x0);}catch{continue;}const _0x1ae691=_0x493698[_0x25eaa0(0x2ee)]+'|'+_0x547c63;if(_0x3379cd<=0x0){_0x409f87[_0x25eaa0(0x362)](_0x1ae691);continue;}const _0x522125=_0x5c1355-_0x3379cd*0x3e8,_0x1a83af=_0x409f87[_0x25eaa0(0x2cf)](_0x1ae691);if(_0x522125<_0x52d489)continue;if(_0x1a83af&&_0x5c1355-_0x1a83af['dumpedAt']<_0x52d489)continue;_0x409f87[_0x25eaa0(0x1e5)](_0x1ae691,{'firstTs':_0x1a83af?_0x1a83af[_0x25eaa0(0x37f)]:_0x3379cd,'dumpedAt':_0x5c1355});const _0x3ba466=_0x25eaa0(0x265)+_0x522125+'ms\x20on\x20env='+_0x547c63+_0x25eaa0(0x391)+new Date()[_0x25eaa0(0x35a)]()+'\x20pid='+process[_0x25eaa0(0x2e8)]+_0x25eaa0(0x207);_0x27f1da([_0x3ba466,_0x14fa7a(),'='[_0x25eaa0(0x2ab)](_0x3ba466['length']-0x1)][_0x25eaa0(0x28e)]('\x0a'));}}}function _0x37a80d(){const _0x489add=_0x1273;if(!_0x5065d6()||_0xd84e73)return;_0xd84e73=!![],process[_0x489add(0x2d6)](_0x489add(0x392),_0xc811a6),process[_0x489add(0x2d6)](_0x489add(0x1fe),_0x100091);const _0x48d6de=Math[_0x489add(0x31f)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x291c37=setInterval(_0xb48d2a,_0x48d6de);if(_0x291c37[_0x489add(0x371)])_0x291c37['unref']();}function _0x921d37(_0xa6f593){const _0x588082=_0x1273;if(!_0x5065d6()||!_0xa6f593)return;_0x13a412[_0x588082(0x2e9)](_0xa6f593),_0x37a80d();}function _0x51eca5(_0x5a585d){_0x13a412['delete'](_0x5a585d);}function _0x1eafd1(){const _0x22e6ae=_0x1273;if(!_0x5065d6())return{'enabled':![],'hint':_0x22e6ae(0x217)};return{'enabled':!![],'stackCapture':!!_0x1a3d8e,'recentWrites':_0x356909(0x10),'drain':_0x14fa7a()};}return okdbDiag={'isEnabled':_0x5065d6,'recordWrite':_0x2a7224,'installDiag':_0x37a80d,'registerOkdb':_0x921d37,'unregisterOkdb':_0x51eca5,'snapshot':_0x1eafd1},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x51957e=_0x487946;if(hasRequiredOkdbWriter)return okdbWriter[_0x51957e(0x34f)];hasRequiredOkdbWriter=0x1;const {performance:_0x38d037}=require$$0$2,_0x3d4334=requireOkdbDiag(),_0x330d0b=process.env.OKDB_COMMIT_MODE===_0x51957e(0x1f8);class _0x567a64{constructor(_0xa5c836){const _0x43dc8a=_0x51957e;this[_0x43dc8a(0x30d)]=_0xa5c836,this[_0x43dc8a(0x377)]=new Set(),this[_0x43dc8a(0x36e)]=new Map(),this['_committed']=0x0,this[_0x43dc8a(0x257)]=[],this[_0x43dc8a(0x281)]=[],this[_0x43dc8a(0x221)]=Math[_0x43dc8a(0x31f)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this[_0x43dc8a(0x38f)]=[],this[_0x43dc8a(0x1f5)]=0x0;}async[_0x51957e(0x3cb)](_0x4998d4,_0x4bb6f3){const _0x188b37=_0x51957e;if(_0x3d4334[_0x188b37(0x2bb)]())_0x3d4334[_0x188b37(0x34e)](this[_0x188b37(0x30d)]?.[_0x188b37(0x2f6)],_0x4bb6f3);if(this[_0x188b37(0x276)]){const _0x45b518=new Error(_0x188b37(0x1fa));_0x45b518['code']=_0x188b37(0x247);throw _0x45b518;}if(this['_highWater']>0x0){let _0x1e5a2d=![];while(this[_0x188b37(0x379)]>=this[_0x188b37(0x221)]&&!this[_0x188b37(0x276)]){!_0x1e5a2d&&(_0x1e5a2d=!![],this[_0x188b37(0x1f5)]++),await new Promise(_0x5a6675=>this[_0x188b37(0x38f)][_0x188b37(0x232)](_0x5a6675));}if(this[_0x188b37(0x276)]){const _0x1719dc=new Error(_0x188b37(0x1fa));_0x1719dc[_0x188b37(0x2ff)]=_0x188b37(0x247);throw _0x1719dc;}}this[_0x188b37(0x379)]++;const _0x1198c0=this[_0x188b37(0x30d)][_0x188b37(0x33a)];if(_0x1198c0)await _0x1198c0['beforeWrite']();if(this[_0x188b37(0x276)]){if(_0x1198c0)_0x1198c0['afterWrite']();this[_0x188b37(0x379)]--;if(this[_0x188b37(0x38f)][_0x188b37(0x39e)]&&this[_0x188b37(0x379)]<this[_0x188b37(0x221)])this[_0x188b37(0x38f)][_0x188b37(0x215)]()();const _0x4eee9a=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x4eee9a[_0x188b37(0x2ff)]='ENV_CLOSING_RETRY';throw _0x4eee9a;}const _0x55ade3=_0x38d037['now']();if(_0x330d0b)try{const _0xaeeae1=this['env']['db']['transactionSync'](_0x4998d4);this[_0x188b37(0x2b4)]++;if(this['_durs'][_0x188b37(0x232)](_0x38d037[_0x188b37(0x2c8)]()-_0x55ade3)>0x100)this[_0x188b37(0x257)]['shift']();if(this['_done'][_0x188b37(0x232)](_0x38d037[_0x188b37(0x2c8)]())>0x800)this[_0x188b37(0x281)]['shift']();return _0xaeeae1;}finally{this[_0x188b37(0x379)]--;if(this[_0x188b37(0x38f)]['length']&&this[_0x188b37(0x379)]<this['_highWater'])this['_bpWaiters'][_0x188b37(0x215)]()();if(_0x1198c0)_0x1198c0['afterWrite']();}const _0x188f25=this[_0x188b37(0x30d)]['db'][_0x188b37(0x2df)](_0x4998d4);this[_0x188b37(0x377)][_0x188b37(0x2e9)](_0x188f25),this['_enqueuedAt']['set'](_0x188f25,_0x55ade3);const _0x469631=()=>{const _0x4a8981=_0x188b37;this[_0x4a8981(0x377)]['delete'](_0x188f25),this['_enqueuedAt'][_0x4a8981(0x362)](_0x188f25),this[_0x4a8981(0x2b4)]++,this[_0x4a8981(0x379)]--;this[_0x4a8981(0x38f)][_0x4a8981(0x39e)]&&this[_0x4a8981(0x379)]<this[_0x4a8981(0x221)]&&this['_bpWaiters']['shift']()();if(this[_0x4a8981(0x257)][_0x4a8981(0x232)](_0x38d037[_0x4a8981(0x2c8)]()-_0x55ade3)>0x100)this[_0x4a8981(0x257)]['shift']();if(this[_0x4a8981(0x281)][_0x4a8981(0x232)](_0x38d037['now']())>0x800)this['_done'][_0x4a8981(0x215)]();};_0x188f25[_0x188b37(0x3b9)](_0x469631,_0x469631);try{return await _0x188f25;}finally{if(_0x1198c0)_0x1198c0[_0x188b37(0x338)]();}}['status'](){const _0x30e8da=_0x51957e,_0x56aee6=_0x38d037[_0x30e8da(0x2c8)]();let _0x458b0d=0x0;for(const _0x86a4d2 of this[_0x30e8da(0x36e)][_0x30e8da(0x387)]()){const _0x518916=_0x56aee6-_0x86a4d2;if(_0x518916>_0x458b0d)_0x458b0d=_0x518916;}let _0x42e971=0x0;for(let _0x34ce4b=this[_0x30e8da(0x281)][_0x30e8da(0x39e)]-0x1;_0x34ce4b>=0x0;_0x34ce4b--){if(_0x56aee6-this['_done'][_0x34ce4b]>0x3e8)break;_0x42e971++;}let _0x5c98a0=0x0;if(this[_0x30e8da(0x257)][_0x30e8da(0x39e)]){const _0x4272f0=[...this[_0x30e8da(0x257)]][_0x30e8da(0x1ab)]((_0x2a0a93,_0x286149)=>_0x2a0a93-_0x286149);_0x5c98a0=_0x4272f0[Math['min'](_0x4272f0['length']-0x1,Math[_0x30e8da(0x382)](_0x4272f0[_0x30e8da(0x39e)]*0.99))];}return{'depth':this[_0x30e8da(0x377)][_0x30e8da(0x389)],'oldestPendingMs':Math[_0x30e8da(0x292)](_0x458b0d),'committed':this[_0x30e8da(0x2b4)],'commitsPerSec':_0x42e971,'commitP99Ms':Math[_0x30e8da(0x292)](_0x5c98a0),'parkedNow':this['_bpWaiters']['length'],'parkedTotal':this[_0x30e8da(0x1f5)],'highWater':this[_0x30e8da(0x221)]};}[_0x51957e(0x3a2)](){const _0x57aafe=_0x51957e,_0x369b6f=_0x38d037[_0x57aafe(0x2c8)]();return[...this[_0x57aafe(0x36e)][_0x57aafe(0x387)]()][_0x57aafe(0x316)](_0x199c12=>Math[_0x57aafe(0x292)](_0x369b6f-_0x199c12))[_0x57aafe(0x1ab)]((_0x36d173,_0x17f7d0)=>_0x17f7d0-_0x36d173);}[_0x51957e(0x1dd)](){const _0x178fad=_0x51957e;this[_0x178fad(0x276)]=!![];for(const _0x569960 of this['_bpWaiters']['splice'](0x0))_0x569960();}async[_0x51957e(0x3ab)](){const _0x41c85a=_0x51957e;let _0x4f3609=0x0;while(this[_0x41c85a(0x377)][_0x41c85a(0x389)]&&_0x4f3609++<0x3e8){await Promise[_0x41c85a(0x35f)]([...this[_0x41c85a(0x377)]]);}}async['put'](_0x5f59dd,_0xca7018,_0x473453,_0x369036){const _0x46d019=_0x51957e;return this[_0x46d019(0x3cb)](()=>{const _0x49ba52=_0x46d019;if(_0x369036===undefined)_0x5f59dd[_0x49ba52(0x3b4)](_0xca7018,_0x473453);else _0x5f59dd[_0x49ba52(0x3b4)](_0xca7018,_0x473453,_0x369036);},'raw-put');}async['remove'](_0x580ac5,_0x1a2135){const _0x53b02a=_0x51957e;return this['transaction'](()=>_0x580ac5['removeSync'](_0x1a2135),_0x53b02a(0x226));}}async function _0x23ffca(_0x3b3d06,_0x35169b){const _0x1455da=_0x51957e;if(_0x35169b==null)_0x35169b=Math[_0x1455da(0x31f)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x223c58=_0x3b3d06?.[_0x1455da(0x33d)];if(!_0x223c58||typeof _0x223c58[_0x1455da(0x3b9)]!==_0x1455da(0x1dc))return;await Promise[_0x1455da(0x1a8)]([Promise['resolve'](_0x223c58)[_0x1455da(0x238)](()=>{}),new Promise(_0x5ec5af=>{const _0xebee3=_0x1455da,_0x37ee30=setTimeout(_0x5ec5af,_0x35169b);if(_0x37ee30[_0xebee3(0x371)])_0x37ee30['unref']();})]);}catch{}}function _0x451efb(_0x2c1563){const _0x41d5e2=_0x51957e;if(_0x330d0b)return Promise[_0x41d5e2(0x380)]();const _0xc75b7a=_0x2c1563?.[_0x41d5e2(0x330)];return _0xc75b7a&&typeof _0xc75b7a[_0x41d5e2(0x3b9)]==='function'?_0xc75b7a:Promise[_0x41d5e2(0x380)]();}return okdbWriter[_0x51957e(0x34f)]=_0x567a64,okdbWriter[_0x51957e(0x34f)]['flushLmdb']=_0x23ffca,okdbWriter['exports'][_0x51957e(0x330)]=_0x451efb,okdbWriter[_0x51957e(0x34f)][_0x51957e(0x1ba)]=_0x330d0b,okdbWriter[_0x51957e(0x34f)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x516dfe=_0x487946;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x446f88=require$$0$3,{SYNC_COMMITS:_0x1d0462}=requireOkdbWriter(),_0x4c05a5=_0x516dfe(0x303);class _0xd88138{constructor(_0x58ae00,_0x1907f6,_0xe02f81){const _0x5beb05=_0x516dfe;this[_0x5beb05(0x1c0)]=_0x58ae00,this[_0x5beb05(0x33c)]=_0x1907f6,this[_0x5beb05(0x3c3)]=_0xe02f81,this['_released']=![],this[_0x5beb05(0x34b)]=null,this[_0x5beb05(0x272)]=null;}[_0x516dfe(0x282)](){const _0x13290c=_0x516dfe;if(this['_released'])return![];try{const _0x2c577c=this[_0x13290c(0x1c0)][_0x13290c(0x2fb)]()[_0x13290c(0x2cf)](this['_key']);if(!_0x2c577c||_0x2c577c[_0x13290c(0x35b)]!==this[_0x13290c(0x3c3)])return![];const _0x4849da=_0x2c577c[_0x13290c(0x342)]??_0x2c577c[_0x13290c(0x35b)];if(_0x4849da+_0x2c577c[_0x13290c(0x218)]<Date[_0x13290c(0x2c8)]())return![];return!![];}catch{return!this[_0x13290c(0x2f0)];}}[_0x516dfe(0x390)](){const _0x2775b1=_0x516dfe;if(this[_0x2775b1(0x2f0)])return null;try{return this[_0x2775b1(0x1c0)][_0x2775b1(0x2fb)]()['get'](this[_0x2775b1(0x33c)])??null;}catch{return null;}}async['extend'](_0x9d98fe){const _0x418f7d=_0x516dfe;if(this[_0x418f7d(0x2f0)])return;try{const _0x3fa738=this['_lock']['_db']()[_0x418f7d(0x2cf)](this['_key']);if(!_0x3fa738||_0x3fa738[_0x418f7d(0x35b)]!==this[_0x418f7d(0x3c3)])return;if(_0x1d0462)this[_0x418f7d(0x1c0)][_0x418f7d(0x2fb)]()[_0x418f7d(0x3b4)](this[_0x418f7d(0x33c)],{..._0x3fa738,'ttlMs':_0x3fa738[_0x418f7d(0x218)]+_0x9d98fe});else await this['_lock'][_0x418f7d(0x2fb)]()[_0x418f7d(0x32c)](this[_0x418f7d(0x33c)],{..._0x3fa738,'ttlMs':_0x3fa738[_0x418f7d(0x218)]+_0x9d98fe});}catch{}}async['release'](){const _0x22545b=_0x516dfe;if(this['_released'])return;if(this[_0x22545b(0x272)])try{await this['_heartbeatInFlight'];}catch{}clearInterval(this['_heartbeatTimer']),this[_0x22545b(0x34b)]=null,this[_0x22545b(0x2f0)]=!![];try{const _0x294f51=this[_0x22545b(0x1c0)][_0x22545b(0x2fb)]()['get'](this['_key']);if(_0x294f51&&_0x294f51['acquiredAt']===this[_0x22545b(0x3c3)]){if(_0x1d0462)this[_0x22545b(0x1c0)][_0x22545b(0x2fb)]()[_0x22545b(0x3c9)](this[_0x22545b(0x33c)]);else await this['_lock'][_0x22545b(0x2fb)]()['remove'](this[_0x22545b(0x33c)]);}}catch{}}[_0x516dfe(0x2d3)](_0x49765f,_0xe1801e){const _0x46551c=_0x516dfe,_0x54a269=_0xe1801e??Math[_0x46551c(0x382)](_0x49765f/0x3);this[_0x46551c(0x34b)]=setInterval(()=>{const _0x224191=_0x46551c;if(this[_0x224191(0x2f0)])return;this[_0x224191(0x272)]=((async()=>{const _0x47ec06=_0x224191;try{const _0x382a0a=this[_0x47ec06(0x1c0)][_0x47ec06(0x2fb)]()[_0x47ec06(0x2cf)](this[_0x47ec06(0x33c)]);if(!_0x382a0a||_0x382a0a['acquiredAt']!==this[_0x47ec06(0x3c3)]){this[_0x47ec06(0x2f0)]=!![],clearInterval(this[_0x47ec06(0x34b)]),this[_0x47ec06(0x34b)]=null;return;}if(_0x1d0462)this[_0x47ec06(0x1c0)][_0x47ec06(0x2fb)]()[_0x47ec06(0x3b4)](this[_0x47ec06(0x33c)],{..._0x382a0a,'updatedAt':Date[_0x47ec06(0x2c8)]()});else await this[_0x47ec06(0x1c0)][_0x47ec06(0x2fb)]()[_0x47ec06(0x32c)](this['_key'],{..._0x382a0a,'updatedAt':Date['now']()});}catch{}this[_0x47ec06(0x272)]=null;})());},_0x54a269);if(this[_0x46551c(0x34b)][_0x46551c(0x371)])this[_0x46551c(0x34b)][_0x46551c(0x371)]();}}class _0x2439c9{constructor(_0x1c1783,{namespace:_0x58da7c,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x53bd8a=_0x516dfe;this[_0x53bd8a(0x357)]=_0x1c1783,this[_0x53bd8a(0x326)]=_0x58da7c,this[_0x53bd8a(0x218)]=ttlMs,this[_0x53bd8a(0x39c)]=heartbeatMs,this[_0x53bd8a(0x2f2)]=null;}[_0x516dfe(0x2fb)](){const _0x2cb555=_0x516dfe;return!this['_lockDb']&&(this['_lockDb']=this['_rawDb']['openDB'](_0x4c05a5,{'dupSort':![]})),this[_0x2cb555(0x2f2)];}[_0x516dfe(0x2d1)](){const _0x4b97e5=_0x516dfe;return!this['_wantDbHandle']&&(this[_0x4b97e5(0x3b7)]=this[_0x4b97e5(0x357)]['openDB'](_0x4c05a5+_0x4b97e5(0x311),{'dupSort':![]})),this[_0x4b97e5(0x3b7)];}[_0x516dfe(0x33c)](_0x159b38){const _0x5a1603=_0x516dfe;return this[_0x5a1603(0x326)]+':'+_0x159b38;}['signalWant'](_0x367fa9){const _0x1d68c5=_0x516dfe;try{_0x1d0462?this[_0x1d68c5(0x2d1)]()[_0x1d68c5(0x3b4)](this[_0x1d68c5(0x33c)](_0x367fa9),Date['now']()):this[_0x1d68c5(0x2d1)]()[_0x1d68c5(0x32c)](this[_0x1d68c5(0x33c)](_0x367fa9),Date[_0x1d68c5(0x2c8)]())?.[_0x1d68c5(0x238)]?.(()=>{});}catch{}}['isWanted'](_0x3b8699,_0x4942c2=0x3e8){const _0x562e12=_0x516dfe;try{const _0x3b1b73=this[_0x562e12(0x2d1)]()['get'](this[_0x562e12(0x33c)](_0x3b8699));return typeof _0x3b1b73===_0x562e12(0x37a)&&Date['now']()-_0x3b1b73<_0x4942c2;}catch{return![];}}['_isStale'](_0x280e24){const _0x5c3216=_0x516dfe,_0x58f03a=_0x280e24[_0x5c3216(0x342)]??_0x280e24['acquiredAt'];return _0x58f03a+_0x280e24[_0x5c3216(0x218)]<Date[_0x5c3216(0x2c8)]();}static['_holderDead'](_0x2df765){const _0x1f03ec=_0x516dfe,_0x25a87=_0x2df765?.['holder'];if(!_0x25a87||typeof _0x25a87[_0x1f03ec(0x2e8)]!=='number')return![];if(_0x25a87[_0x1f03ec(0x2cd)]!==_0x446f88[_0x1f03ec(0x2cd)]())return![];if(_0x25a87[_0x1f03ec(0x2e8)]===process[_0x1f03ec(0x2e8)])return![];try{return process['kill'](_0x25a87[_0x1f03ec(0x2e8)],0x0),![];}catch(_0x572017){return _0x572017[_0x1f03ec(0x2ff)]===_0x1f03ec(0x334);}}async[_0x516dfe(0x209)](_0x967592,_0x30f97a={},_0x26f810={}){const _0x4667c3=_0x516dfe,_0x1a39fe=this[_0x4667c3(0x33c)](_0x967592),_0x427df7=_0x26f810['ttlMs']??this[_0x4667c3(0x218)],_0x506acd=Date[_0x4667c3(0x2c8)](),_0x4812a9={'holder':{'pid':process[_0x4667c3(0x2e8)],'hostname':_0x446f88[_0x4667c3(0x2cd)](),..._0x30f97a},'acquiredAt':_0x506acd,'updatedAt':_0x506acd,'ttlMs':_0x427df7};let _0x1276e6=![],_0x372de0=null;try{const _0xe13b80=()=>{const _0x13e22c=_0x4667c3,_0x2f45b2=this[_0x13e22c(0x2fb)]()[_0x13e22c(0x2cf)](_0x1a39fe);if(_0x2f45b2&&!this[_0x13e22c(0x37c)](_0x2f45b2)&&!_0x2439c9['_holderDead'](_0x2f45b2)){const _0x388d25=_0x30f97a['processorId']!=null&&_0x2f45b2['holder'][_0x13e22c(0x2e8)]===process[_0x13e22c(0x2e8)]&&_0x2f45b2['holder'][_0x13e22c(0x268)]===_0x30f97a['processorId'];if(!_0x388d25){_0x1276e6=![],_0x372de0=_0x2f45b2;return;}_0x4812a9[_0x13e22c(0x35b)]<=_0x2f45b2['acquiredAt']&&(_0x4812a9['acquiredAt']=_0x2f45b2[_0x13e22c(0x35b)]+0x1,_0x4812a9[_0x13e22c(0x342)]=_0x4812a9[_0x13e22c(0x35b)]);}this[_0x13e22c(0x2fb)]()[_0x13e22c(0x32c)](_0x1a39fe,_0x4812a9),_0x1276e6=!![],_0x372de0=_0x4812a9;};if(_0x1d0462)this[_0x4667c3(0x2fb)]()[_0x4667c3(0x383)](_0xe13b80);else await this[_0x4667c3(0x2fb)]()[_0x4667c3(0x2df)](_0xe13b80);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x1276e6)return{'acquired':![],'handle':null,'current':_0x372de0};const _0x39a912=new _0xd88138(this,_0x1a39fe,_0x4812a9[_0x4667c3(0x35b)]);return _0x39a912[_0x4667c3(0x2d3)](_0x427df7,this[_0x4667c3(0x39c)]),{'acquired':!![],'handle':_0x39a912,'current':_0x372de0};}[_0x516dfe(0x1da)](_0x1575c0){const _0x3df4da=_0x516dfe;try{return this[_0x3df4da(0x2fb)]()[_0x3df4da(0x2cf)](this[_0x3df4da(0x33c)](_0x1575c0))??null;}catch{return null;}}[_0x516dfe(0x3c6)](){const _0x13ccd7=_0x516dfe,_0x1b60bd=this['namespace']+':',_0x2ed850=[];try{for(const {key:_0x259745,value:_0x29dcee}of this[_0x13ccd7(0x2fb)]()[_0x13ccd7(0x3ac)]({'start':_0x1b60bd,'end':_0x1b60bd+'ÿ'})){typeof _0x259745===_0x13ccd7(0x2c3)&&_0x259745[_0x13ccd7(0x2ae)](_0x1b60bd)&&_0x2ed850[_0x13ccd7(0x232)]({'id':_0x259745['slice'](_0x1b60bd[_0x13ccd7(0x39e)]),'entry':_0x29dcee});}}catch{}return _0x2ed850;}static[_0x516dfe(0x3d0)](_0x5aa63b){const _0x25a222=_0x516dfe,_0x41013e=[];try{const _0x245356=_0x5aa63b[_0x25a222(0x20d)](_0x4c05a5,{'dupSort':![]});for(const {key:_0x1381ed,value:_0x577522}of _0x245356[_0x25a222(0x3ac)]({})){if(typeof _0x1381ed!=='string')continue;const _0x2afa9f=_0x1381ed['indexOf'](':');if(_0x2afa9f<0x1)continue;_0x41013e['push']({'namespace':_0x1381ed[_0x25a222(0x2e7)](0x0,_0x2afa9f),'id':_0x1381ed[_0x25a222(0x2e7)](_0x2afa9f+0x1),'entry':_0x577522});}}catch{}return _0x41013e;}}return okdbLock={'OKDBLock':_0x2439c9},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x68432e=_0x487946;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x20f178=require$$0$3,_0x3fd64e=require$$1$1,_0x4ec782=require$$2,{LOOP:_0xa51e67}=requireOkdbLoopMonitor(),{OKDBLock:_0x551c02}=requireOkdbLock(),{SYNC_COMMITS:_0x4b52cc}=requireOkdbWriter(),_0x2cc658='~processes',_0x3c2344=_0x68432e(0x30b),_0x5c63a1=_0x68432e(0x1c3),_0x367bd7='~processes:cmd',_0x5dfbb5=(_0x3f0939,_0x523d18)=>_0x3f0939+':'+_0x523d18,_0x73c97e=(_0x2df740,_0x35ba1c)=>_0x2df740+'::'+_0x35ba1c,_0x4727b0=(_0x3e201f,_0x38be76)=>_0x3e201f+'/'+_0x38be76,_0xc20854=(_0x25ba2c,_0x119f59)=>_0x25ba2c+'#'+_0x119f59,_0x346080=_0x54df84=>{const _0x3f157c=_0x68432e;if(_0x54df84?.[_0x3f157c(0x220)])return _0x54df84[_0x3f157c(0x220)];const _0x4aff1a=_0x54df84?.[_0x3f157c(0x1cd)];return typeof _0x4aff1a==='string'&&_0x4aff1a[_0x3f157c(0x2e0)]('#')?_0x4aff1a[_0x3f157c(0x2e7)](0x0,_0x4aff1a[_0x3f157c(0x1e1)]('#')):_0x4aff1a;},_0x31a63d=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0xf45cc=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x3b7c59=_0x31a63d*0x3,_0x278bc8=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x68432e(0x31f)](0x927c0,_0x3b7c59*0x14),_0x7806c3=[_0x68432e(0x25b),_0x68432e(0x3a9),_0x68432e(0x2e5),_0x68432e(0x21f),_0x68432e(0x269),_0x68432e(0x29a)];let _0x6f5c06=null;function _0x341077(){const _0x294afe=_0x68432e;if(_0x6f5c06==null)_0x6f5c06=Math[_0x294afe(0x292)]((Date['now']()-process[_0x294afe(0x263)]()*0x3e8)/0x3e8)*0x3e8;return _0x6f5c06;}function _0x31e34d(_0x5ef173){const _0x1339a2=_0x68432e;if(process.env.OKDB_PROCESS_KILL===_0x1339a2(0x200))return![];if(_0x5ef173?.[_0x1339a2(0x361)]?.[_0x1339a2(0x37e)]&&typeof _0x5ef173['options'][_0x1339a2(0x37e)]==='object'&&_0x5ef173[_0x1339a2(0x361)][_0x1339a2(0x37e)][_0x1339a2(0x2b8)]===![])return![];return!![];}function _0x17a946(_0x3a7a28,_0x78c68a){const _0x47e634=_0x68432e,_0x44e7ce=!!_0x78c68a?.[_0x47e634(0x33f)];switch(_0x3a7a28){case _0x47e634(0x24c):return{'controllable':_0x44e7ce,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x47e634(0x346):case _0x47e634(0x256):return{'controllable':_0x44e7ce,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x47e634(0x244):case _0x47e634(0x378):case'fn-runner':case _0x47e634(0x249):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x180ced{constructor(_0xeeece8){const _0x356937=_0x68432e;this[_0x356937(0x204)]=_0xeeece8,this['_statusEnv']=null,this[_0x356937(0x2b5)]=null,this[_0x356937(0x22e)]=new Map(),this[_0x356937(0x20f)]=null,this['_isWriter']=![],this['_isReader']=![],this[_0x356937(0x22b)]=_0x341077(),this['_selfKey']=_0x5dfbb5(process[_0x356937(0x2e8)],this[_0x356937(0x22b)]),this[_0x356937(0x223)]=_0x4ec782[_0x356937(0x2bd)]()[_0x356937(0x2e7)](0x0,0x8),this[_0x356937(0x251)]=_0xc20854(this['_selfKey'],this[_0x356937(0x223)]),this[_0x356937(0x335)]=Date[_0x356937(0x2c8)](),this[_0x356937(0x28c)]=null,this[_0x356937(0x398)]=null,this[_0x356937(0x231)]=null,this['_hbTimer']=null,this[_0x356937(0x332)]=null,this[_0x356937(0x3bc)]=null,this['_lastPublishAt']=0x0,this[_0x356937(0x2d5)]={},this[_0x356937(0x2a6)]=new Map(),this[_0x356937(0x283)]=process['cpuUsage'](),this['_lastCpuAt']=Date[_0x356937(0x2c8)](),this[_0x356937(0x233)]=0x0,this[_0x356937(0x203)]=new Map();}get[_0x68432e(0x3ba)](){const _0x3be1a8=_0x68432e;return this[_0x3be1a8(0x255)];}get[_0x68432e(0x1e0)](){const _0x5f4533=_0x68432e;return this[_0x5f4533(0x251)];}[_0x68432e(0x373)](_0x1211a2,_0x3e44ed){const _0x3fafe7=_0x68432e,_0x3a8101=_0x17a946(_0x1211a2,_0x3e44ed);if(_0x3a8101[_0x3fafe7(0x2fa)]&&!_0x31e34d(this[_0x3fafe7(0x204)]))return{..._0x3a8101,'killable':![],'killConfirm':undefined};return _0x3a8101;}[_0x68432e(0x397)](){const _0x25e1b4=_0x68432e;return!!this[_0x25e1b4(0x31c)];}['setOwnMeta'](_0x2bceac){const _0x35ebdf=_0x68432e;Object[_0x35ebdf(0x202)](this[_0x35ebdf(0x2d5)],_0x2bceac||{});}['noteListenAddr'](_0x5c61e9){if(_0x5c61e9)this['_listenAddr']=_0x5c61e9;}[_0x68432e(0x2ca)](_0x15843b={}){const _0x21ac80=_0x68432e;return this[_0x21ac80(0x204)][_0x21ac80(0x22f)](_0x15843b);}[_0x68432e(0x1be)](){const _0x3fc726=_0x68432e,_0x5d64aa={};let _0x26fea2=0x0,_0x61a6e0=0x0;const _0x5cac07=new Set();for(const _0x29b1d1 of this[_0x3fc726(0x325)]()){_0x61a6e0++;const _0x4ae944=_0x29b1d1['processing'];if(!_0x4ae944)continue;if(_0x4ae944['participate'])_0x26fea2++;for(const _0x38de36 of _0x4ae944[_0x3fc726(0x33f)]||[]){if(![_0x3fc726(0x2f8),_0x3fc726(0x252)][_0x3fc726(0x2e0)](_0x38de36[_0x3fc726(0x3cf)]))continue;(_0x38de36[_0x3fc726(0x201)]==='online'||_0x38de36[_0x3fc726(0x201)]===_0x3fc726(0x1b0))&&_0x38de36['cursorKey']&&_0x5cac07[_0x3fc726(0x2e9)]((_0x38de36[_0x3fc726(0x30d)]||'default')+':'+_0x38de36[_0x3fc726(0x29e)]);const _0xa1121=_0x38de36[_0x3fc726(0x30d)]||_0x3fc726(0x1f2);(_0x5d64aa[_0xa1121]||=[])[_0x3fc726(0x232)]({..._0x38de36,'env':_0xa1121,'owner':{'pid':_0x29b1d1[_0x3fc726(0x2e8)]??null,'kind':_0x29b1d1[_0x3fc726(0x1c9)]??null}});}}for(const [_0x246553,_0x521ad4]of Object[_0x3fc726(0x23e)](_0x5d64aa)){for(const _0x412c49 of _0x521ad4){if(_0x412c49['mode']===_0x3fc726(0x2f8)&&!_0x412c49['claimGated']){const _0x336b9a=_0x246553+':'+(_0x412c49[_0x3fc726(0x29e)]??'');if(!_0x5cac07[_0x3fc726(0x242)](_0x336b9a))_0x412c49[_0x3fc726(0x25f)]=!![];}}}return{'envs':_0x5d64aa,'policy':null,'participation':{'participating':_0x26fea2,'total':_0x61a6e0},'source':_0x3fc726(0x369)};}[_0x68432e(0x28d)](){const _0x532c4a=_0x68432e,_0x371bd3=_0xc9a4ee=>{const _0xe40515=_0x1273;if(_0xc9a4ee[_0xe40515(0x201)]===_0xe40515(0x297)||_0xc9a4ee[_0xe40515(0x201)]===_0xe40515(0x1b0)||_0xc9a4ee[_0xe40515(0x201)]===_0xe40515(0x20c))return 0x3;if(_0xc9a4ee[_0xe40515(0x1c7)])return 0x1;return 0x2;},_0x43a9bb=new Map();for(const _0x4ab586 of this['listNodes']()){for(const _0xa04f53 of _0x4ab586[_0x532c4a(0x323)]?.[_0x532c4a(0x33f)]||[]){const _0x3c6549={..._0xa04f53,'owner':{'pid':_0x4ab586[_0x532c4a(0x2e8)]??null,'kind':_0x4ab586[_0x532c4a(0x1c9)]??null,'host':_0x4ab586[_0x532c4a(0x3cd)]??null}},_0x3103fb=_0xa04f53[_0x532c4a(0x3cf)]===_0x532c4a(0x2f8)?_0x532c4a(0x304)+(_0xa04f53[_0x532c4a(0x30d)]??'')+'::'+(_0xa04f53[_0x532c4a(0x29e)]??_0xa04f53[_0x532c4a(0x3c5)]??_0xa04f53['id']):_0x532c4a(0x1c1)+(_0x4ab586[_0x532c4a(0x1cd)]??_0x4ab586[_0x532c4a(0x220)]??'')+'::'+(_0xa04f53[_0x532c4a(0x30d)]??'')+'::'+_0xa04f53['id'],_0xf87d61=_0x43a9bb['get'](_0x3103fb);if(!_0xf87d61||_0x371bd3(_0x3c6549)>_0x371bd3(_0xf87d61))_0x43a9bb[_0x532c4a(0x1e5)](_0x3103fb,_0x3c6549);}}return[..._0x43a9bb['values']()];}['clusterStatusView'](){const _0x49a12e=_0x68432e,_0x2fc5d9=Date[_0x49a12e(0x2c8)](),_0x4d7c9f=this[_0x49a12e(0x325)](),_0x30aac0=_0x3c7ca4=>Math[_0x49a12e(0x31f)](0x0,Math[_0x49a12e(0x292)]((_0x2fc5d9-(_0x3c7ca4[_0x49a12e(0x23b)]||_0x2fc5d9))/0x3e8)),_0x45ffaa=_0x4d7c9f[_0x49a12e(0x2d4)](_0x435262=>_0x435262[_0x49a12e(0x1c9)]===_0x49a12e(0x24c)),_0x262d8a=_0x4d7c9f['filter'](_0xc99f31=>_0xc99f31[_0x49a12e(0x1c9)]==='http-server');if(_0x45ffaa||_0x262d8a[_0x49a12e(0x39e)])return{'primary':_0x45ffaa?{'pid':_0x45ffaa[_0x49a12e(0x2e8)],'uptime':_0x30aac0(_0x45ffaa)}:null,'workers':_0x262d8a[_0x49a12e(0x316)](_0x35bdd9=>({'pid':_0x35bdd9['pid'],'uptime':_0x30aac0(_0x35bdd9)})),'workersConfigured':_0x45ffaa?.['meta']?.['workersConfigured']??_0x262d8a[_0x49a12e(0x39e)],'mode':_0x49a12e(0x1cf)};const _0x4e9c41=_0x4d7c9f['find'](_0x587772=>_0x587772[_0x49a12e(0x1c9)]===_0x49a12e(0x346)||_0x587772[_0x49a12e(0x1c9)]===_0x49a12e(0x256)||_0x587772[_0x49a12e(0x1c9)]===_0x49a12e(0x23d)),_0x491e13=_0x4e9c41?{'pid':_0x4e9c41[_0x49a12e(0x2e8)],'uptime':_0x30aac0(_0x4e9c41)}:{'pid':process[_0x49a12e(0x2e8)],'uptime':Math['max'](0x0,Math[_0x49a12e(0x292)](process[_0x49a12e(0x263)]()))};return{'primary':_0x491e13,'workers':[_0x491e13],'workersConfigured':0x1,'mode':_0x49a12e(0x2f8)};}['nodesView'](){return this['_groupByProcess']();}[_0x68432e(0x2b6)](){const _0x1a8d2c=_0x68432e,_0x218de0=new Map();for(const _0x14c609 of this[_0x1a8d2c(0x29b)]())_0x218de0[_0x1a8d2c(0x1e5)](_0x14c609['processKey'],{..._0x14c609,'children':[]});const _0x4658cb=[];for(const _0x34bf13 of _0x218de0['values']()){const _0x27de67=_0x34bf13[_0x1a8d2c(0x26d)]?_0x218de0['get'](_0x34bf13[_0x1a8d2c(0x26d)]):null;if(_0x27de67&&_0x27de67!==_0x34bf13)_0x27de67[_0x1a8d2c(0x284)]['push'](_0x34bf13);else _0x4658cb[_0x1a8d2c(0x232)](_0x34bf13);}const _0x4fafd7=(_0x3ef8f5,_0x51c104)=>_0x3ef8f5[_0x1a8d2c(0x1c9)]===_0x51c104[_0x1a8d2c(0x1c9)]?(_0x3ef8f5[_0x1a8d2c(0x2e8)]||0x0)-(_0x51c104[_0x1a8d2c(0x2e8)]||0x0):(_0x3ef8f5[_0x1a8d2c(0x1c9)]??'')<(_0x51c104[_0x1a8d2c(0x1c9)]??'')?-0x1:0x1,_0x352bbd=_0x31fcdb=>{const _0x59bd45=_0x1a8d2c;_0x31fcdb[_0x59bd45(0x1ab)](_0x4fafd7);for(const _0x3681e1 of _0x31fcdb)if(_0x3681e1[_0x59bd45(0x284)][_0x59bd45(0x39e)])_0x352bbd(_0x3681e1[_0x59bd45(0x284)]);};return _0x352bbd(_0x4658cb),_0x4658cb;}[_0x68432e(0x300)](_0x3da424){const _0x27c364=_0x68432e;return this[_0x27c364(0x29b)]()[_0x27c364(0x2d4)](_0x5db818=>_0x5db818[_0x27c364(0x220)]===_0x3da424)??null;}[_0x68432e(0x29b)](_0x5713e8=Date['now']()){const _0x4df009=_0x68432e,_0x49100b=new Map();for(const _0x449be4 of this[_0x4df009(0x325)]()){const _0x233752=_0x346080(_0x449be4);let _0x15d8d6=_0x49100b['get'](_0x233752);!_0x15d8d6&&(_0x15d8d6={'processKey':_0x233752,'nodeKey':_0x233752,'pid':_0x449be4[_0x4df009(0x2e8)],'ppid':_0x449be4[_0x4df009(0x1a6)]??null,'host':_0x449be4[_0x4df009(0x3cd)]??null,'kind':_0x449be4[_0x4df009(0x1c9)],'role':null,'supervisorKey':_0x449be4[_0x4df009(0x26d)]??null,'slot':_0x449be4[_0x4df009(0x35d)]??null,'slotKey':_0x449be4[_0x4df009(0x25c)]??null,'caps':_0x449be4[_0x4df009(0x363)]??null,'lifecycle':_0x449be4[_0x4df009(0x212)]??null,'uptime':Math['max'](0x0,Math[_0x4df009(0x292)]((_0x5713e8-(_0x449be4[_0x4df009(0x23b)]||_0x5713e8))/0x3e8)),'startedAt':_0x449be4[_0x4df009(0x23b)]??null,'meta':_0x449be4['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x49100b[_0x4df009(0x1e5)](_0x233752,_0x15d8d6));_0x15d8d6[_0x4df009(0x312)][_0x4df009(0x232)]({'instanceId':_0x449be4[_0x4df009(0x1f1)]??null,'role':_0x449be4[_0x4df009(0x1f9)]??null,'listenAddr':_0x449be4[_0x4df009(0x35e)]??null,'lifecycle':_0x449be4[_0x4df009(0x212)]??null,'processing':_0x449be4[_0x4df009(0x323)]??null});if(!_0x15d8d6[_0x4df009(0x1f9)]&&_0x449be4[_0x4df009(0x1f9)])_0x15d8d6[_0x4df009(0x1f9)]=_0x449be4[_0x4df009(0x1f9)];if(!_0x15d8d6[_0x4df009(0x35e)]&&_0x449be4[_0x4df009(0x35e)])_0x15d8d6[_0x4df009(0x35e)]=_0x449be4[_0x4df009(0x35e)];if(!_0x15d8d6[_0x4df009(0x323)]&&_0x449be4[_0x4df009(0x323)])_0x15d8d6[_0x4df009(0x323)]=_0x449be4['processing'];if(!_0x15d8d6['engines']&&_0x449be4[_0x4df009(0x2da)])_0x15d8d6[_0x4df009(0x2da)]=_0x449be4[_0x4df009(0x2da)];if(!_0x15d8d6[_0x4df009(0x211)]&&_0x449be4[_0x4df009(0x211)])_0x15d8d6[_0x4df009(0x211)]=_0x449be4[_0x4df009(0x211)];if(_0x15d8d6[_0x4df009(0x363)]==null&&_0x449be4[_0x4df009(0x363)])_0x15d8d6[_0x4df009(0x363)]=_0x449be4[_0x4df009(0x363)];if(_0x449be4[_0x4df009(0x2d0)]&&(!_0x15d8d6[_0x4df009(0x2d0)]||(_0x449be4[_0x4df009(0x2d0)]['at']??0x0)>(_0x15d8d6['stats']['at']??0x0)))_0x15d8d6[_0x4df009(0x2d0)]=_0x449be4[_0x4df009(0x2d0)];}return[..._0x49100b[_0x4df009(0x387)]()];}[_0x68432e(0x30e)](){const _0x2aedd7=_0x68432e,_0xbfaa04=[],_0x2e3530={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x203604 of this['_groupByProcess']()){_0xbfaa04['push']({'processKey':_0x203604[_0x2aedd7(0x220)],'kind':_0x203604[_0x2aedd7(0x1c9)],'pid':_0x203604[_0x2aedd7(0x2e8)],'supervisorKey':_0x203604['supervisorKey'],'meta':_0x203604['meta']??null,'uptime':_0x203604['uptime'],'stats':_0x203604[_0x2aedd7(0x2d0)]??null}),_0x2e3530['processes']++;if(_0x203604[_0x2aedd7(0x2d0)]){_0x2e3530[_0x2aedd7(0x1ad)]+=_0x203604[_0x2aedd7(0x2d0)][_0x2aedd7(0x1ad)]||0x0,_0x2e3530['heapUsed']+=(_0x203604[_0x2aedd7(0x2d0)][_0x2aedd7(0x31d)]||0x0)+(_0x203604[_0x2aedd7(0x2d0)][_0x2aedd7(0x275)]?.[_0x2aedd7(0x31d)]||0x0);const _0x256ac1=_0x203604['stats'][_0x2aedd7(0x275)];_0x256ac1&&(_0x2e3530[_0x2aedd7(0x275)][_0x2aedd7(0x1b8)]+=_0x256ac1['count']||0x0,_0x2e3530['threads'][_0x2aedd7(0x364)]+=_0x256ac1[_0x2aedd7(0x364)]||0x0,_0x2e3530['threads'][_0x2aedd7(0x30a)]+=_0x256ac1[_0x2aedd7(0x30a)]||0x0);}}return{'totals':_0x2e3530,'nodes':_0xbfaa04};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x3b3cf8=_0x68432e;this[_0x3b3cf8(0x2d2)]=this[_0x3b3cf8(0x2d2)]||!!writer,this[_0x3b3cf8(0x355)]=this[_0x3b3cf8(0x355)]||!!reader,this[_0x3b3cf8(0x28c)]=kind||this[_0x3b3cf8(0x28c)]||(_0x3fd64e[_0x3b3cf8(0x2e6)]?'http-server':'cli'),this[_0x3b3cf8(0x398)]=supervisorKey??this['_supervisorKey'],this[_0x3b3cf8(0x231)]=listenAddr??this[_0x3b3cf8(0x231)],this[_0x3b3cf8(0x291)](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x3b3cf8(0x31c)]){const _0x37d3e0=await this['okdb'][_0x3b3cf8(0x2a2)](_0x2cc658,{'sync':![],'durability':'fast'});if(!_0x37d3e0[_0x3b3cf8(0x2ef)](_0x3c2344))await _0x37d3e0[_0x3b3cf8(0x350)](_0x3c2344);this['_statusEnv']=_0x37d3e0;}return this[_0x3b3cf8(0x31c)];}[_0x68432e(0x219)](){const _0xc5e8c0=_0x68432e;return this[_0xc5e8c0(0x2fe)]!==this['_statusEnv']&&(this[_0xc5e8c0(0x2fe)]=this[_0xc5e8c0(0x31c)],this[_0xc5e8c0(0x3a4)]=this[_0xc5e8c0(0x31c)][_0xc5e8c0(0x2a7)](_0x3c2344)['data']),this[_0xc5e8c0(0x3a4)];}[_0x68432e(0x274)](_0x4e3772){const _0x340c=_0x68432e;if(_0x4b52cc)return this['_nodeDb']()['putSync'](_0x4e3772['nodeKey'],_0x4e3772,0x1);const _0x356999=this[_0x340c(0x219)]()['put'](_0x4e3772[_0x340c(0x1cd)],_0x4e3772,0x1);if(_0x356999&&typeof _0x356999[_0x340c(0x3b9)]===_0x340c(0x1dc))_0x356999[_0x340c(0x3b9)](undefined,()=>{});return _0x356999;}[_0x68432e(0x39b)](_0x1c78b4){const _0x1273b2=_0x68432e;return this[_0x1273b2(0x219)]()[_0x1273b2(0x3b4)](_0x1c78b4['nodeKey'],_0x1c78b4,0x1);}[_0x68432e(0x29c)](_0x3c467e){const _0x244548=_0x68432e;if(_0x4b52cc)try{return this[_0x244548(0x219)]()['removeSync'](_0x3c467e);}catch{return![];}const _0x17f301=this[_0x244548(0x219)]()[_0x244548(0x333)](_0x3c467e);if(_0x17f301&&typeof _0x17f301[_0x244548(0x3b9)]==='function')_0x17f301[_0x244548(0x3b9)](undefined,()=>{});return _0x17f301;}async[_0x68432e(0x1df)](_0x1a0457){const _0xd50fc5=_0x68432e;if(!this['_statusEnv']||!this['_isWriter']||!_0x1a0457?.[_0xd50fc5(0x1cd)])return;return this['_putRowAsync'](_0x1a0457);}async[_0x68432e(0x360)](_0x14ce3a){const _0x50d234=_0x68432e;if(!this[_0x50d234(0x31c)]||!this[_0x50d234(0x2d2)]||!_0x14ce3a)return;const _0x20a100=_0x14ce3a[_0x50d234(0x2e0)]('#'),_0x29b6a6=[];for(const {key:_0xb7b99}of this[_0x50d234(0x31c)][_0x50d234(0x3ac)](_0x3c2344)){if(_0xb7b99===_0x14ce3a||!_0x20a100&&typeof _0xb7b99===_0x50d234(0x2c3)&&_0xb7b99[_0x50d234(0x2ae)](_0x14ce3a+'#'))_0x29b6a6[_0x50d234(0x232)](_0xb7b99);}for(const _0x59cce1 of _0x29b6a6){try{this['_nodeDb']()['removeSync'](_0x59cce1);}catch{}}}[_0x68432e(0x1c6)](_0x2d9870){const _0x4b9372=_0x68432e;if(typeof _0x2d9870?.['pid']!==_0x4b9372(0x37a))return![];if(_0x2d9870['host']!==_0x20f178['hostname']())return![];if(_0x2d9870[_0x4b9372(0x2e8)]===process[_0x4b9372(0x2e8)])return![];if(_0x2d9870['expiresAt']!=null&&_0x2d9870[_0x4b9372(0x273)]<Date[_0x4b9372(0x2c8)]()-_0x278bc8)return!![];try{return process[_0x4b9372(0x2b8)](_0x2d9870['pid'],0x0),![];}catch(_0x34e55b){return _0x34e55b['code']===_0x4b9372(0x334);}}[_0x68432e(0x325)](){const _0x3891ce=_0x68432e;if(!this[_0x3891ce(0x31c)])return[];try{this[_0x3891ce(0x31c)]['db']?.[_0x3891ce(0x286)]?.();}catch{}const _0x29b954=Date[_0x3891ce(0x2c8)](),_0x2c7f5d=_0x20f178[_0x3891ce(0x2cd)](),_0x15cd06=[];for(const {value:_0x56a5d8}of this[_0x3891ce(0x31c)]['getRange'](_0x3c2344)){if(!_0x56a5d8)continue;let _0x129c94=null;_0x56a5d8[_0x3891ce(0x3cd)]===_0x2c7f5d&&typeof _0x56a5d8[_0x3891ce(0x2e8)]===_0x3891ce(0x37a)&&(_0x129c94=!this[_0x3891ce(0x1c6)](_0x56a5d8));if(_0x129c94===![])continue;const _0x2ea647=_0x56a5d8[_0x3891ce(0x273)]==null||_0x56a5d8['expiresAt']>=_0x29b954;if(_0x129c94===!![]||_0x2ea647)_0x15cd06[_0x3891ce(0x232)](_0x56a5d8);}return _0x15cd06;}async['reap'](_0x20ab8c=0x0){const _0x388162=_0x68432e;if(!this[_0x388162(0x31c)]||!this[_0x388162(0x2d2)])return;const _0x45ae1e=Date['now']()-_0x20ab8c,_0x33fb90=new Set(),_0x15aea4=[],_0x29bcef=_0x20f178['hostname']();for(const {key:_0x64c94f,value:_0x384d62}of this[_0x388162(0x31c)][_0x388162(0x3ac)](_0x3c2344)){if(!_0x384d62)continue;const _0x3f8660=_0x384d62['host']===_0x29bcef&&typeof _0x384d62['pid']===_0x388162(0x37a),_0x42427a=_0x3f8660?this[_0x388162(0x1c6)](_0x384d62):_0x384d62[_0x388162(0x273)]!=null&&_0x384d62[_0x388162(0x273)]<_0x45ae1e;if(_0x42427a)_0x15aea4[_0x388162(0x232)](_0x64c94f);else _0x33fb90[_0x388162(0x2e9)](_0x346080(_0x384d62)??_0x64c94f);}for(const _0x1edfb2 of _0x15aea4)this[_0x388162(0x29c)](_0x1edfb2);if(this['_ensureDesired']()){const _0x4a058b=[];for(const {key:_0x44a521}of this[_0x388162(0x3a3)](_0x388162(0x30b))){if(!_0x33fb90[_0x388162(0x242)](_0x44a521)){if(_0x4b52cc)try{this['_desired']['removeSync'](_0x388162(0x2cb)+_0x44a521);}catch{}else _0x4a058b[_0x388162(0x232)](this['_desired'][_0x388162(0x333)](_0x388162(0x2cb)+_0x44a521));}}if(_0x4a058b[_0x388162(0x39e)])await Promise['allSettled'](_0x4a058b);}}[_0x68432e(0x2b9)](_0x13d794=null){const _0x4e64a0=_0x68432e;if(this[_0x4e64a0(0x365)])return;if(!this[_0x4e64a0(0x2d2)]||!this[_0x4e64a0(0x31c)]){this[_0x4e64a0(0x204)]?.[_0x4e64a0(0x3aa)]?.['warn']?.('registry\x20heartbeat\x20skipped\x20(writer='+this['_isWriter']+_0x4e64a0(0x314)+!!this[_0x4e64a0(0x31c)]+_0x4e64a0(0x1f0),{'feature':_0x4e64a0(0x37e)});return;}this[_0x4e64a0(0x3bc)]=_0x13d794,this['_onProcEvent']=()=>this[_0x4e64a0(0x1ee)]();for(const _0x4cd291 of _0x7806c3)this['okdb']['events']['on'](_0x4cd291,this[_0x4e64a0(0x332)]);this['_publishNow']();const _0x26f019=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x31a63d;this[_0x4e64a0(0x365)]=setInterval(()=>{const _0x564425=_0x4e64a0;if(this[_0x564425(0x3bc)])try{this[_0x564425(0x3bc)]();}catch{}this[_0x564425(0x1de)](),this[_0x564425(0x1ce)]()['catch'](()=>{});},_0x26f019);if(this[_0x4e64a0(0x365)][_0x4e64a0(0x371)])this['_hbTimer'][_0x4e64a0(0x371)]();}[_0x68432e(0x1ee)](){const _0x504a45=_0x68432e;if(!this[_0x504a45(0x2d2)]||!this[_0x504a45(0x31c)])return;if(Date[_0x504a45(0x2c8)]()-this[_0x504a45(0x322)]<_0xf45cc)return;this[_0x504a45(0x1de)]();}[_0x68432e(0x1de)](){const _0x1b0452=_0x68432e;if(!this[_0x1b0452(0x2d2)]||!this[_0x1b0452(0x31c)])return;this[_0x1b0452(0x322)]=Date[_0x1b0452(0x2c8)]();try{const _0x3e8a87=[this[_0x1b0452(0x376)]()];for(const _0x55a1d4 of this[_0x1b0452(0x2a6)][_0x1b0452(0x387)]())_0x3e8a87['push'](this[_0x1b0452(0x3b3)](_0x55a1d4));const _0x29c516=_0xa51e67[_0x1b0452(0x384)]?_0xa51e67[_0x1b0452(0x2c8)]():0x0;for(const _0x4367f4 of _0x3e8a87){try{this['_putRowSync'](_0x4367f4),this[_0x1b0452(0x353)]=![];}catch(_0xa6d1d4){!this[_0x1b0452(0x353)]&&(this['_publishFailWarned']=!![],this[_0x1b0452(0x204)]?.[_0x1b0452(0x3aa)]?.['warn']?.(_0x1b0452(0x23c)+_0xa6d1d4[_0x1b0452(0x302)],{'feature':'processes'}));}}if(_0xa51e67[_0x1b0452(0x384)])_0xa51e67[_0x1b0452(0x261)](_0x1b0452(0x245),_0xa51e67[_0x1b0452(0x2c8)]()-_0x29c516,'rows='+_0x3e8a87[_0x1b0452(0x39e)]+'\x20sync');}catch(_0x28e9af){!this[_0x1b0452(0x353)]&&(this[_0x1b0452(0x353)]=!![],this[_0x1b0452(0x204)]?.[_0x1b0452(0x3aa)]?.[_0x1b0452(0x3be)]?.(_0x1b0452(0x23c)+_0x28e9af[_0x1b0452(0x302)],{'feature':_0x1b0452(0x37e)}));}}async['stopHeartbeat'](){const _0x33593e=_0x68432e;if(this['_onProcEvent']){for(const _0x1e72f7 of _0x7806c3){try{this[_0x33593e(0x204)]['events'][_0x33593e(0x200)](_0x1e72f7,this[_0x33593e(0x332)]);}catch{}}this[_0x33593e(0x332)]=null;}this[_0x33593e(0x365)]&&(clearInterval(this[_0x33593e(0x365)]),this['_hbTimer']=null);try{if(this[_0x33593e(0x31c)]&&this['_isWriter'])await this['removeNode'](this[_0x33593e(0x251)]);}catch{}}async[_0x68432e(0x216)](){const _0x3baeb6=_0x68432e;if(!this[_0x3baeb6(0x31c)]||!this['_isWriter'])return;try{await this[_0x3baeb6(0x360)](this[_0x3baeb6(0x251)]);}catch{}try{const _0x2879cf=[];for(const {value:_0x59dd0d}of this[_0x3baeb6(0x31c)][_0x3baeb6(0x3ac)](_0x3c2344)){if(_0x59dd0d?.[_0x3baeb6(0x1a6)]===process[_0x3baeb6(0x2e8)]&&_0x59dd0d[_0x3baeb6(0x1cd)])_0x2879cf[_0x3baeb6(0x232)](_0x59dd0d['nodeKey']);}for(const _0x3f317b of _0x2879cf){try{await this[_0x3baeb6(0x360)](_0x3f317b);}catch{}}}catch{}}async['publishOwnRow'](){const _0x6f70e9=_0x68432e;return this[_0x6f70e9(0x1df)](this['_buildOwnRow']());}async[_0x68432e(0x26c)](_0x198dd8){const _0x3de12b=_0x68432e;if(!this['_statusEnv']||!this[_0x3de12b(0x2d2)])return;return this[_0x3de12b(0x1df)](this['_buildChildRow'](_0x198dd8));}[_0x68432e(0x3b3)]({pid:_0x4340cf,startedAt:_0x505c64,kind:_0x4d8e61,supervisorKey:_0x9c6983,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x68432e(0x372),meta:meta=null,stats:stats=null}){const _0x3407df=_0x68432e,_0x228b8f=Date[_0x3407df(0x2c8)](),_0x17b27a=_0x5dfbb5(_0x4340cf,_0x505c64);return{'nodeKey':_0xc20854(_0x17b27a,'0'),'processKey':_0x17b27a,'instanceId':'0','pid':_0x4340cf,'startedAt':_0x505c64,'ppid':process['pid'],'host':_0x20f178[_0x3407df(0x2cd)](),'supervisorKey':_0x9c6983,'slot':slot,'slotKey':slotKey,'kind':_0x4d8e61,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x228b8f,'expiresAt':_0x228b8f+_0x3b7c59,'caps':this[_0x3407df(0x373)](_0x4d8e61,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x68432e(0x3a1)](_0x106917){const _0x3926c6=_0x68432e;if(!_0x106917?.[_0x3926c6(0x2e8)])return null;const _0x1ff2b4=_0x5dfbb5(_0x106917[_0x3926c6(0x2e8)],_0x106917[_0x3926c6(0x23b)]);this[_0x3926c6(0x2a6)][_0x3926c6(0x1e5)](_0x1ff2b4,{..._0x106917,'supervisorKey':_0x106917[_0x3926c6(0x26d)]??this[_0x3926c6(0x255)]});if(this[_0x3926c6(0x2d2)])await this[_0x3926c6(0x26c)](this[_0x3926c6(0x2a6)][_0x3926c6(0x2cf)](_0x1ff2b4))[_0x3926c6(0x238)]?.(()=>{});return _0x1ff2b4;}[_0x68432e(0x235)](_0x2c03d1){const _0x1af41c=_0x68432e;if(!_0x2c03d1)return;return this['_children'][_0x1af41c(0x362)](_0x2c03d1),this['removeNode'](_0x2c03d1);}['_sampleOwnStats'](){const _0x1a7dff=_0x68432e,_0x345ca3=Date[_0x1a7dff(0x2c8)](),_0x63173a=process['cpuUsage'](),_0x593674=(_0x345ca3-this['_lastCpuAt'])*0x3e8;if(_0x593674>=0x3d090){const _0x5903b7=_0x63173a[_0x1a7dff(0x3a0)]-this[_0x1a7dff(0x283)][_0x1a7dff(0x3a0)]+(_0x63173a['system']-this['_lastCpuUsage'][_0x1a7dff(0x36a)]),_0x3f0c8b=_0x20f178[_0x1a7dff(0x320)]()[_0x1a7dff(0x39e)]||0x1;this['_lastCpuPct']=Math['min'](0x64,Math[_0x1a7dff(0x292)](_0x5903b7/(_0x593674*_0x3f0c8b)*0x64)),this[_0x1a7dff(0x3a8)]=Math[_0x1a7dff(0x292)](_0x593674/0x3e8),this[_0x1a7dff(0x283)]=_0x63173a,this['_lastCpuAt']=_0x345ca3;}const _0x34b579=process[_0x1a7dff(0x2ac)](),_0x216ce9=this[_0x1a7dff(0x203)][_0x1a7dff(0x389)];let _0x24dae5=0x0;if(_0x216ce9>0x0){const _0x36143b=[this[_0x1a7dff(0x204)],...this['okdb'][_0x1a7dff(0x285)]?.['values']?.()??[]];for(const _0x3f3c82 of _0x36143b){const _0x122c6a=_0x3f3c82['functions']?.['_sandbox'];if(_0x122c6a)_0x24dae5+=_0x122c6a[_0x1a7dff(0x348)][_0x1a7dff(0x30a)];}}let _0x42031c=null;const _0x382f20=_0x216ce9;if(_0x382f20>0x0){let _0x300246=0x0;for(const _0x3fc9f9 of this[_0x1a7dff(0x203)][_0x1a7dff(0x387)]())_0x300246+=_0x3fc9f9[_0x1a7dff(0x31d)]||0x0;_0x42031c={'count':_0x382f20,'heapUsed':_0x300246,'sandbox':_0x216ce9,'busy':_0x24dae5};}return{'rss':_0x34b579[_0x1a7dff(0x1ad)],'heapUsed':_0x34b579[_0x1a7dff(0x31d)],'heapTotal':_0x34b579[_0x1a7dff(0x264)],'external':_0x34b579[_0x1a7dff(0x1aa)],'cpuPct':this[_0x1a7dff(0x233)],'cpuWindowMs':this[_0x1a7dff(0x3a8)]??null,'threads':_0x42031c,'at':_0x345ca3};}['reportThreadStats'](_0x242bc2,_0x5ba636){const _0x54eeb5=_0x68432e;if(!_0x242bc2||!_0x5ba636)return;this[_0x54eeb5(0x203)][_0x54eeb5(0x1e5)](_0x242bc2,_0x5ba636);}[_0x68432e(0x352)](_0x157614){const _0x14da89=_0x68432e;this[_0x14da89(0x203)]['delete'](_0x157614);}[_0x68432e(0x2bc)](_0x4e6f03,_0x518e08,_0x5a25f0=undefined){const _0x110a4b=_0x68432e,_0x9311d3=this[_0x110a4b(0x2a6)][_0x110a4b(0x2cf)](_0x4e6f03);if(!_0x9311d3||!_0x518e08)return;if(_0x5a25f0!==undefined)_0x9311d3[_0x110a4b(0x323)]=_0x5a25f0;_0x9311d3[_0x110a4b(0x2d0)]={'rss':_0x518e08[_0x110a4b(0x1ad)]??null,'heapUsed':_0x518e08[_0x110a4b(0x31d)]??null,'heapTotal':_0x518e08[_0x110a4b(0x264)]??null,'external':_0x518e08[_0x110a4b(0x1aa)]??null,'cpuPct':_0x518e08[_0x110a4b(0x39f)]??null,'cpuWindowMs':_0x518e08['cpuWindowMs']??null,'threads':_0x518e08[_0x110a4b(0x275)]??null,'claims':_0x518e08['claims']??null,'envsOpen':_0x518e08[_0x110a4b(0x388)]??null,'at':Date[_0x110a4b(0x2c8)]()};}[_0x68432e(0x376)](){const _0x4a7cc8=_0x68432e,_0x4cc7a1=Date[_0x4a7cc8(0x2c8)](),_0x13cf0c=this[_0x4a7cc8(0x204)]['_role']||{},_0x5852b5=this[_0x4a7cc8(0x28c)]||_0x4a7cc8(0x346);return{'nodeKey':this[_0x4a7cc8(0x251)],'processKey':this[_0x4a7cc8(0x255)],'instanceId':this[_0x4a7cc8(0x223)],'pid':process['pid'],'startedAt':this['_processStartedAt'],'instanceStartedAt':this[_0x4a7cc8(0x335)],'ppid':typeof process['ppid']==='number'?process[_0x4a7cc8(0x1a6)]:null,'host':_0x20f178[_0x4a7cc8(0x2cd)](),'supervisorKey':this[_0x4a7cc8(0x398)]??null,'kind':_0x5852b5,'role':{'engines':!!_0x13cf0c[_0x4a7cc8(0x2da)],'processors':!!_0x13cf0c[_0x4a7cc8(0x33f)],'compaction':_0x13cf0c[_0x4a7cc8(0x26f)],'http':_0x13cf0c[_0x4a7cc8(0x279)]},'listenAddr':this[_0x4a7cc8(0x231)]??null,'heartbeatAt':_0x4cc7a1,'expiresAt':_0x4cc7a1+_0x3b7c59,'caps':this['_caps'](_0x5852b5,_0x13cf0c),'lifecycle':{'state':_0x4a7cc8(0x372),'desiredVersionApplied':null},'meta':{...this[_0x4a7cc8(0x2d5)]},'processing':_0x13cf0c[_0x4a7cc8(0x33f)]?this[_0x4a7cc8(0x237)]():null,'engines':_0x13cf0c['engines']?[...this['okdb'][_0x4a7cc8(0x1ae)]??[]]:null,'singletonClaims':this[_0x4a7cc8(0x206)](),'stats':this[_0x4a7cc8(0x1c2)](),'writers':this[_0x4a7cc8(0x2c0)]()};}[_0x68432e(0x2c0)](){const _0x4e706b=_0x68432e,_0x2c1b3d={};try{for(const [_0xf43711,_0x5728a2]of this['okdb']['_envs']){try{const _0x20d7b2=_0x5728a2[_0x4e706b(0x243)]?.();if(!_0x20d7b2)continue;if(!_0x20d7b2[_0x4e706b(0x1d1)]&&!_0x20d7b2[_0x4e706b(0x330)]&&!(_0x20d7b2[_0x4e706b(0x36b)]??0x0)&&!_0x20d7b2[_0x4e706b(0x38b)])continue;_0x2c1b3d[_0xf43711]={'depth':_0x20d7b2[_0x4e706b(0x1d1)],'oldestPendingMs':_0x20d7b2[_0x4e706b(0x25e)],'committed':_0x20d7b2['committed'],'commitsPerSec':_0x20d7b2[_0x4e706b(0x267)],'commitP99Ms':_0x20d7b2[_0x4e706b(0x24a)],'parkedNow':_0x20d7b2['parkedNow']??0x0,'draining':!!_0x20d7b2['draining']};}catch{}}}catch{}return Object[_0x4e706b(0x1b3)](_0x2c1b3d)[_0x4e706b(0x39e)]?_0x2c1b3d:null;}[_0x68432e(0x206)](){const _0x4008c0=_0x68432e,_0x437bd7=process[_0x4008c0(0x2e8)],_0x4dfac0=Date[_0x4008c0(0x2c8)](),_0x3ca3a1=_0x418606=>{const _0x21da85=_0x4008c0;if(!_0x418606)return[];const _0xa1e7b0=[];try{for(const {id:_0x1d0419,entry:_0x332332}of _0x418606['list']()){if(_0x332332?.['holder']?.[_0x21da85(0x2e8)]!==_0x437bd7)continue;const _0x3cf251=_0x332332[_0x21da85(0x342)]??_0x332332[_0x21da85(0x35b)]??0x0;if(_0x3cf251+(_0x332332['ttlMs']??0x0)<_0x4dfac0)continue;_0xa1e7b0[_0x21da85(0x232)](_0x1d0419);}}catch{}return _0xa1e7b0;},_0x3d269b=_0x3ca3a1(this[_0x4008c0(0x29d)]('compact')),_0xa94907=_0x3ca3a1(this[_0x4008c0(0x29d)](_0x4008c0(0x1f8)));if(!_0x3d269b[_0x4008c0(0x39e)]&&!_0xa94907[_0x4008c0(0x39e)])return null;return{'compact':_0x3d269b,'replicate':_0xa94907};}[_0x68432e(0x29d)](_0x2c5b24){const _0x2d34d7=_0x68432e;if(!this[_0x2d34d7(0x204)]?.['_rootDb'])return null;if(!this[_0x2d34d7(0x1d5)])this[_0x2d34d7(0x1d5)]=new Map();let _0x24060c=this['_singletonLocks']['get'](_0x2c5b24);if(!_0x24060c)try{_0x24060c=new _0x551c02(this[_0x2d34d7(0x204)][_0x2d34d7(0x339)],{'namespace':_0x2c5b24}),this[_0x2d34d7(0x1d5)]['set'](_0x2c5b24,_0x24060c);}catch{return null;}return _0x24060c;}[_0x68432e(0x237)](){const _0x554de5=_0x68432e,_0x200bda=[];try{for(const [_0x495d84,_0x58e425]of this['okdb'][_0x554de5(0x285)]){if(_0x495d84['startsWith']('~'))continue;for(const _0x3e3229 of _0x58e425[_0x554de5(0x1b7)][_0x554de5(0x1b6)]())_0x200bda[_0x554de5(0x232)]({..._0x3e3229,'env':_0x495d84});}}catch{}return{'participate':this[_0x554de5(0x204)][_0x554de5(0x33f)]?.['_participate']??![],'processors':_0x200bda};}[_0x68432e(0x291)](){const _0x427df1=_0x68432e;if(this[_0x427df1(0x2b5)])return!![];const _0x2dbf62=this['okdb'][_0x427df1(0x339)];if(!_0x2dbf62)return![];return this['_desired']=_0x2dbf62['openDB'](_0x5c63a1,{'dupSort':![]}),this[_0x427df1(0x20f)]=_0x2dbf62['openDB'](_0x367bd7,{'dupSort':![]}),!![];}async[_0x68432e(0x25d)](){const _0x5337b8=_0x68432e;if(!this[_0x5337b8(0x291)]())return;const _0xd4f33f=_0x5337b8(0x27f),_0xd4ac7=0x1,_0x3f9eaf=this['_desired'][_0x5337b8(0x2cf)](_0xd4f33f)??0x0;if(_0x3f9eaf>=_0xd4ac7)return;const _0x15b5db=_0x3e87d1=>{const _0x22e614=_0x5337b8;if(_0x3e87d1==='worker')return'single';if(_0x3e87d1==='async')return _0x22e614(0x252);return _0x3e87d1;};await this[_0x5337b8(0x204)][_0x5337b8(0x1ef)][_0x5337b8(0x246)][_0x5337b8(0x3cb)](()=>{const _0x237a9b=_0x5337b8;for(const _0x33e27d of[_0x237a9b(0x3c0),'procmodeack/']){for(const {key:_0x500b11,value:_0x14c4f9}of this[_0x237a9b(0x2b5)][_0x237a9b(0x3ac)]({'start':_0x33e27d,'end':_0x33e27d+'ÿ'})){if(typeof _0x500b11!==_0x237a9b(0x2c3)||!_0x500b11[_0x237a9b(0x2ae)](_0x33e27d))break;const _0xd91a77=_0x15b5db(_0x14c4f9[_0x237a9b(0x3cf)]);if(_0xd91a77!==_0x14c4f9[_0x237a9b(0x3cf)])this[_0x237a9b(0x2b5)]['put'](_0x500b11,{..._0x14c4f9,'mode':_0xd91a77});}}this['_desired'][_0x237a9b(0x32c)](_0xd4f33f,_0xd4ac7);});}[_0x68432e(0x299)](){const _0x5933c1=_0x68432e;return!!this[_0x5933c1(0x2b5)];}[_0x68432e(0x317)](_0x270e6b,_0x264d6a){const _0x1a87c7=_0x68432e;if(!this[_0x1a87c7(0x291)]())return null;const _0x71473d=_0x270e6b+'/'+_0x264d6a;return this[_0x1a87c7(0x3c8)](),this['_desiredOverlay']['get'](_0x71473d)??this[_0x1a87c7(0x2b5)][_0x1a87c7(0x2cf)](_0x71473d)??null;}[_0x68432e(0x3c8)](){const _0x28e1ad=_0x68432e;if(!_0x4b52cc)return;try{this[_0x28e1ad(0x204)][_0x28e1ad(0x1ef)]?.['db']?.[_0x28e1ad(0x286)]?.();}catch{}}async['setDesired'](_0x28bb86,_0x526df9,_0x134ebe){const _0x1250df=_0x68432e;if(!this[_0x1250df(0x291)]())return null;const _0xa29cb8=_0x28bb86+'/'+_0x526df9;this[_0x1250df(0x3c8)]();const _0x46c156=this[_0x1250df(0x22e)]['get'](_0xa29cb8)??this['_desired'][_0x1250df(0x2cf)](_0xa29cb8)??{'version':0x0},_0x18ad6c=(_0x46c156['version']||0x0)+0x1,_0x4c413b={..._0x46c156,..._0x134ebe,'version':_0x18ad6c,'updatedAt':Date[_0x1250df(0x2c8)]()};this[_0x1250df(0x22e)][_0x1250df(0x1e5)](_0xa29cb8,_0x4c413b);try{await this[_0x1250df(0x204)][_0x1250df(0x1ef)][_0x1250df(0x246)][_0x1250df(0x3cb)](()=>{const _0x2d98d1=_0x1250df;this[_0x2d98d1(0x2b5)][_0x2d98d1(0x32c)](_0xa29cb8,_0x4c413b);});}finally{if(this[_0x1250df(0x22e)]['get'](_0xa29cb8)===_0x4c413b)this['_desiredOverlay'][_0x1250df(0x362)](_0xa29cb8);}return _0x18ad6c;}[_0x68432e(0x3a3)](_0x379eba){const _0x1709a3=_0x68432e;if(!this['_ensureDesired']())return[];this[_0x1709a3(0x3c8)]();const _0x18eefc=_0x379eba+'/',_0x3aa84a=[];for(const {key:_0x248177,value:_0x1d4246}of this[_0x1709a3(0x2b5)][_0x1709a3(0x3ac)]({'start':_0x18eefc,'end':_0x18eefc+'ÿ'})){if(typeof _0x248177!==_0x1709a3(0x2c3)||!_0x248177[_0x1709a3(0x2ae)](_0x18eefc))break;_0x3aa84a['push']({'key':_0x248177['slice'](_0x18eefc['length']),'value':_0x1d4246});}return _0x3aa84a;}[_0x68432e(0x1f7)](_0x35b354){const _0x32b289=_0x68432e;if(!this[_0x32b289(0x291)]())return null;return this[_0x32b289(0x20f)][_0x32b289(0x2cf)](_0x35b354)??null;}async[_0x68432e(0x1bc)](_0x586e0f,_0x14d2d9,_0x143ab8={}){const _0x12e2c5=_0x68432e;if(!this[_0x12e2c5(0x291)]())return null;let _0x19f2eb;return await this[_0x12e2c5(0x204)]['_systemEnv'][_0x12e2c5(0x246)][_0x12e2c5(0x3cb)](()=>{const _0x59049c=_0x12e2c5,_0x1096e5=this[_0x59049c(0x20f)][_0x59049c(0x2cf)](_0x586e0f)||{'epoch':0x0};_0x19f2eb=(_0x1096e5[_0x59049c(0x386)]||0x0)+0x1,this[_0x59049c(0x20f)][_0x59049c(0x32c)](_0x586e0f,{..._0x1096e5,..._0x143ab8,'cmd':_0x14d2d9,'epoch':_0x19f2eb,'updatedAt':Date[_0x59049c(0x2c8)]()});}),_0x19f2eb;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x180ced,'nodeKey':_0x5dfbb5,'logicalKey':_0x73c97e,'slotKey':_0x4727b0,'PROCESS_ENV':_0x2cc658,'NODE_TYPE':_0x3c2344},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function _0xcdd8(){const _0x53cb85=['okdb-writer:\x20env\x20closing\x20—\x20retry','listen','ref:violation_resolved','\x20worker(s)\x20remaining','unhandledRejection','split','off','state','assign','_threadStats','okdb','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_collectSingletonClaims','\x20===','stopped','tryAcquire','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','system:bus_state_change','error','openDB','_scheduleFlush','_cmd','sync:apply','singletonClaims','lifecycle','_clusterWorkerAttached','[okdb-cluster]\x20respawning\x20worker\x20slot=','shift','deregisterSelf','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','ttlMs','_nodeDb','platform','load',');\x20','item:create','maxExtra','processor:error','processKey','_highWater','http\x20worker\x20child\x20failed:\x20','_instanceId','license:removed','execArgv','raw-remove','ref:violation','_handleInProcess','ready','view:progress','_processStartedAt','--test','\x20writer{depth=','_desiredOverlay','_activateProcesses','__okdbCluster','_listenAddr','push','_lastCpuPct','enable','removeSupervisedChild','VIEW_PROGRESS','_buildProcessingFacet','catch','--watch','stop','startedAt','registry\x20publish\x20failing:\x20','embedded','entries','data','_changefeed','system:clock_change','has','writerStatus','http-server','registry-publish','_writer','ENV_CLOSING_RETRY','_log','worker','commitP99Ms','pushEphemeral','primary','\x20phase=','license:invalid','waiting','122200dBOHuf','_rowKey','fanout','type:drop','ttl:clear','_selfKey','standalone','_durs','event','SIGKILL','FTS_REGISTERED','processor:progress','slotKey','_migrateVocab','oldestPendingMs','unclaimed','[okdb-cluster]\x20worker\x20pid=','note','\x20oldestPendingMs=','uptime','heapTotal','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','isConnected','commitsPerSec','processorId','processor:paused','hasOwnProperty','label','publishChildRow','supervisorKey','msg','compaction','_flushTimer','12GjFBMc','_heartbeatInFlight','expiresAt','_putRowAsync','threads','_closed','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','emit','http','call','all','creating','__okdbSlot','.log','__vocab/version','1896824obPnnG','_done','isHeld','_lastCpuUsage','children','_envs','resetReadTxn','_report','_onStop','exit','_markSeen','index:registered','_kind','processorsView','join','_seen','\x20\x20#','_ensureDesired','round','starting','ttl:expired','loop-lag','(worst\x20','online','getClock','hasDesired','processor:resumed','_groupByProcess','_removeRowAsync','_singletonLock','cursorKey','respawnTimer','_timer','_drainOne','createEnvironment','index:ready','copy','meta','_children','_getType','freeze','SYSTEM_STOPPED','halted','repeat','memoryUsage','percentile','startsWith','crypto','info','ms\x20p99=','ITEM_UPDATE','\x20ipc\x20error:\x20','_committed','_desired','treeView','status','kill','startHeartbeat','clear','isEnabled','updateSupervisedChildStats','randomUUID','ITEM_CREATE','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','_collectWriterFacet','license:activated','node:perf_hooks','string','view','FTS_RESET','ms\x20busy=','stringify','now','_pending','register','node/','ms\x20(attempt\x20','hostname','unique:violation_resolved','get','stats','_wantDb','_isWriter','_startHeartbeat','find','_ownMeta','prependListener','mkdirSync','_admissionTimer','resetIndex','engines','attach','decommissioning','SWAP','setSchema','childTransaction','includes','\x20worker(s)\x20still\x20serving','\x20drainAge=','892902zzTMQD','FTS_DROP','processor:retry','isWorker','slice','pid','add','item:remove','INDEX_REGISTERED','index:progress','\x20worker\x20slot=','path','hasType','_released','seq','_lockDb','_cursors','_onItem','license:added','name','consecutiveFailures','single','index:reset','killable','_db','bus:proc','_started','_nodeDbFor','code','getProcess','_quantum','message','~lock','1ofN:','_dedupeKey','events','toFixed','setOwnMeta','write','busy','node','ITEM_REMOVE','env','runtimeProcessesView','_handlePoke','_clusterOnMessage',':want','instances','\x20died\x20','\x20statusEnv=','filter','map','getDesired','okdb-http-worker-child.js','INDEX_PROGRESS','value','node:events','_statusEnv','heapUsed','maxMs','max','cpus','quantum','_lastPublishAt','processing',')\x20exited\x20','listNodes','namespace','--print','setLogger','_onPoke','_buckets','__esModule','put','change','disconnect','clearTtl','committed','next','_onProcEvent','remove','ESRCH','_startedAt','\x20\x20env=','SYSTEM_POKE','afterWrite','_rootDb','_coordinator','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','_key','flushed','entry','processors','hard-killed','166011WxRSTl','updatedAt','trim','3645410RhAqQe','_baselines','cli','_flushDebounce','liveThreadStats','commit','\x20HTTP\x20server(s)\x20on\x20port\x20','_heartbeatTimer','mean','INDEX_RESET','recordWrite','exports','registerType','7jTLNsH','clearThreadStats','_publishFailWarned','_admissionStarted','_isReader','registerIndex','_rawDb','system:proc','_windowCbs','toISOString','acquiredAt','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','slot','listenAddr','allSettled','removeNode','options','delete','caps','sandbox','_hbTimer','system:stopped','txn:end','_draining','workers','system','parkedNow','item:update','resetFts','_enqueuedAt','_adminRelay','_enableChangelog','unref','running','_caps','attachFeed','unique:violation','_buildOwnRow','_inflight','queue-worker','_outstanding','number','[okdb-cluster]\x20slot=','_isStale','detachConsole','processes','firstTs','resolve','process','floor','transactionSync','enabled','perf_hooks','epoch','values','envsOpen','size','./okdb','draining','listening','\x20\x20(no\x20env\x20draining)','send','_bpWaiters','holder','\x20@\x20','uncaughtException','stopping','deaths','fts:reset','decommission','isActive','_supervisorKey','ephemeral','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_putRowSync','heartbeatMs','registerFts','length','cpuPct','user','addSupervisedChild','inflightAgesMs','listDesired','_nodeDbCache','recent\x20writes\x20(newest\x20first)','ORPHAN\x20(env-closed\x20write)','4126146nVGpYu','_lastCpuWindowMs','processor:ready','log','drain','getRange','_openEnvLazy','\x0a\x20\x20\x20\x20\x20\x20','\x20forked\x20','from','dropSchema','connected','_buildChildRow','putSync','bus:drain','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','_wantDbHandle','dropType','then','selfKey','SYSTEM_PROC','_onTick','ms\x20env=','warn','_drain','procmode/','(code=','system:poke','_acquiredAt','REMOVE','type','list','27YuwXWy','_refreshDesiredSnapshot','removeSync','ttl:set','transaction','dead','host','close','mode','listAll','ms\x20max=','once','getChanges','ppid','--inspect','race','replace','external','sort','CHANGEFEED_QUANTUM','rss','_servingEngines','41601362ZoIziI','building','bus:type_drop','\x20parkedNow=','keys','--eval','ingest','tierList','processor','count','_startAdmission','SYNC_COMMITS','stderr','bumpCmd','bus:poke','processingStatusView','start','_lock','inst:','_sampleOwnStats','~processes:desired','2wKjFQK','level','_nodeDead','claimGated','isPrimary','kind','object','system:type_drop','min','nodeKey','reap','cluster','_clusterOrphanWatch','depth','\x20in\x20','ms/','some','_singletonLocks','fts:drop','schema:set','txn:start','\x20(slot=','inspect','[okdb-cluster]\x20','function','markClosed','_publishNow','putNode','rowKey','indexOf','fork','\x20(durable\x20desired-state)','[okdb-cluster]\x20primary\x20pid=','set','stack','system:env_release','cpuUsage','env:removed','feed:','isDead','true','_dedupeMax','_maybePublish','_systemEnv',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','instanceId','default','okdb-diag.','\x0a===\x20OKDB_DIAG\x20','_bpParkedTotal','parse','getCmd','sync','role'];_0xcdd8=function(){return _0x53cb85;};return _0xcdd8();}function requireOkdbChangefeed(){const _0x2194ad=_0x487946;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x57eae6=require$$0$4,{EVENTS:_0x9e49f,CHANGE_ACTIONS:_0xfb02d}=requireOkdbEnums(),{LOOP:_0xa79368}=requireOkdbLoopMonitor(),_0x4a5b8a=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x2adf3c=0x5,_0xde680b=0x2710;class _0x5792cc extends _0x57eae6{constructor(_0x1bf515,_0x2a391d={}){const _0x2e482f=_0x1273;super(),this[_0x2e482f(0x204)]=_0x1bf515,this[_0x2e482f(0x301)]=_0x2a391d[_0x2e482f(0x321)]??_0x4a5b8a,this[_0x2e482f(0x347)]=_0x2a391d['flushDebounce']??_0x2adf3c,this['_dedupeMax']=_0x2a391d['dedupeMax']??_0xde680b,this['_started']=![],this['_cursors']=new Map(),this[_0x2e482f(0x345)]=new Map(),this[_0x2e482f(0x2c9)]=new Map(),this[_0x2e482f(0x270)]=null,this[_0x2e482f(0x368)]=![],this[_0x2e482f(0x28f)]=new Set(),this[_0x2e482f(0x2f4)]=_0x36ded6=>this[_0x2e482f(0x228)](_0x36ded6),this['_onPoke']=_0xabd3e3=>this[_0x2e482f(0x30f)](_0xabd3e3),this['_onStop']=()=>this[_0x2e482f(0x23a)]();}[_0x2194ad(0x1bf)](){const _0x4bff23=_0x2194ad;if(this[_0x4bff23(0x2fd)])return;this[_0x4bff23(0x2fd)]=!![];for(const [_0xf7de1a,_0x1fd0a1]of this['okdb'][_0x4bff23(0x285)]){if(_0xf7de1a[_0x4bff23(0x2ae)]('~'))continue;try{_0x1fd0a1[_0x4bff23(0x370)]();}catch{}}for(const [_0x250841,_0x2c9838]of this['okdb'][_0x4bff23(0x285)]){if(_0x250841[_0x4bff23(0x2ae)]('~'))continue;try{this[_0x4bff23(0x345)][_0x4bff23(0x1e5)](_0x250841,_0x2c9838['getClock']()||0x0);}catch{}}const {events:_0x2146e3}=this['okdb'];_0x2146e3['on'](_0x9e49f[_0x4bff23(0x2be)],this[_0x4bff23(0x2f4)]),_0x2146e3['on'](_0x9e49f[_0x4bff23(0x2b2)],this['_onItem']),_0x2146e3['on'](_0x9e49f[_0x4bff23(0x30c)],this[_0x4bff23(0x2f4)]),_0x2146e3['on'](_0x9e49f['SYSTEM_POKE'],this[_0x4bff23(0x329)]),_0x2146e3['once'](_0x9e49f[_0x4bff23(0x2a9)],this[_0x4bff23(0x288)]);}['stop'](){const _0x5f560e=_0x2194ad;if(!this[_0x5f560e(0x2fd)])return;this[_0x5f560e(0x2fd)]=![];const {events:_0x226f04}=this[_0x5f560e(0x204)];_0x226f04['off'](_0x9e49f[_0x5f560e(0x2be)],this[_0x5f560e(0x2f4)]),_0x226f04[_0x5f560e(0x200)](_0x9e49f[_0x5f560e(0x2b2)],this[_0x5f560e(0x2f4)]),_0x226f04['off'](_0x9e49f[_0x5f560e(0x30c)],this['_onItem']),_0x226f04[_0x5f560e(0x200)](_0x9e49f[_0x5f560e(0x337)],this[_0x5f560e(0x329)]);try{_0x226f04[_0x5f560e(0x200)](_0x9e49f[_0x5f560e(0x2a9)],this['_onStop']);}catch{}this[_0x5f560e(0x270)]&&(clearTimeout(this['_flushTimer']),this[_0x5f560e(0x270)]=null),this[_0x5f560e(0x2c9)][_0x5f560e(0x2ba)](),this[_0x5f560e(0x2f3)]['clear'](),this[_0x5f560e(0x345)]['clear'](),this[_0x5f560e(0x28f)][_0x5f560e(0x2ba)]();}[_0x2194ad(0x305)](_0x14ffa5,_0x2e8715,_0x1fc390,_0x3207ba){return _0x14ffa5+'\x00'+_0x2e8715+'\x00'+_0x1fc390+'\x00'+_0x3207ba;}[_0x2194ad(0x28a)](_0x38fa53,_0x24a43c,_0x129f85,_0x22cb2c){const _0x2f51f3=_0x2194ad,_0x272496=this['_dedupeKey'](_0x38fa53,_0x24a43c,_0x129f85,_0x22cb2c);if(this[_0x2f51f3(0x28f)][_0x2f51f3(0x242)](_0x272496))return![];this[_0x2f51f3(0x28f)]['add'](_0x272496);if(this[_0x2f51f3(0x28f)]['size']>this[_0x2f51f3(0x1ed)]){const _0x26b95b=this[_0x2f51f3(0x28f)][_0x2f51f3(0x387)]()[_0x2f51f3(0x331)]()[_0x2f51f3(0x31a)];this[_0x2f51f3(0x28f)][_0x2f51f3(0x362)](_0x26b95b);}return!![];}[_0x2194ad(0x228)](_0x38a54c){const _0x116adc=_0x2194ad;if(!this[_0x116adc(0x2fd)]||!_0x38a54c)return;const {env:_0x112e5b,type:_0x5e0ff4,key:_0x4eae55,clock:_0x32d795,origin:_0x2a3038,action:_0x2efa8f,newValue:_0x55c74e,oldValue:_0x36dbf5}=_0x38a54c;if(_0x112e5b==null||_0x5e0ff4==null||_0x4eae55==null)return;if(typeof _0x112e5b===_0x116adc(0x2c3)&&_0x112e5b[_0x116adc(0x2ae)]('~'))return;if(typeof _0x5e0ff4==='string'&&_0x5e0ff4[_0x116adc(0x2ae)]('~'))return;if(!this['_markSeen'](_0x112e5b,_0x5e0ff4,_0x4eae55,_0x32d795))return;const _0x1d1703=_0x2efa8f===_0xfb02d[_0x116adc(0x3c4)]?_0x116adc(0x333):_0x116adc(0x32c);this['emit']('change',{'env':_0x112e5b,'type':_0x5e0ff4,'key':_0x4eae55,'op':_0x1d1703,'clock':_0x32d795,'origin':_0x2a3038,'value':_0x1d1703==='remove'?null:_0x55c74e,'prevValue':_0x36dbf5});}['_handlePoke'](_0x516311){const _0x4d21b7=_0x2194ad;if(!this[_0x4d21b7(0x2fd)])return;if(!_0x516311||typeof _0x516311[_0x4d21b7(0x30d)]!=='string'||typeof _0x516311[_0x4d21b7(0x3c5)]!==_0x4d21b7(0x2c3))return;const {env:_0x23f335,type:_0x3e7fe9}=_0x516311;if(_0x23f335['startsWith']('~')||_0x3e7fe9[_0x4d21b7(0x2ae)]('~'))return;this['_pending'][_0x4d21b7(0x1e5)](_0x23f335+'\x00'+_0x3e7fe9,{'env':_0x23f335,'type':_0x3e7fe9}),this[_0x4d21b7(0x20e)]();}[_0x2194ad(0x20e)](){const _0x3dc79f=_0x2194ad;if(this[_0x3dc79f(0x270)])return;const _0x150c05=()=>{const _0x33929e=_0x3dc79f;this[_0x33929e(0x270)]=null,this[_0x33929e(0x3bf)]()[_0x33929e(0x238)](()=>{});};this[_0x3dc79f(0x270)]=setTimeout(_0x150c05,this[_0x3dc79f(0x347)]>0x0?this['_flushDebounce']:0x0);}async[_0x2194ad(0x3bf)](){const _0x3b4831=_0x2194ad;if(this[_0x3b4831(0x368)]){this[_0x3b4831(0x20e)]();return;}this['_draining']=!![];try{const _0x56f374=[...this[_0x3b4831(0x2c9)][_0x3b4831(0x387)]()];this['_pending'][_0x3b4831(0x2ba)]();let _0x44de67=![];for(const {env:_0x44a2a1,type:_0x4a05f6}of _0x56f374){try{const _0x3eab10=await this[_0x3b4831(0x2a1)](_0x44a2a1,_0x4a05f6);if(_0x3eab10)_0x44de67=!![];}catch{this[_0x3b4831(0x2c9)][_0x3b4831(0x1e5)](_0x44a2a1+'\x00'+_0x4a05f6,{'env':_0x44a2a1,'type':_0x4a05f6}),_0x44de67=!![];}}if(_0x44de67||this[_0x3b4831(0x2c9)][_0x3b4831(0x389)]>0x0)this[_0x3b4831(0x20e)]();}finally{this[_0x3b4831(0x368)]=![];}}async[_0x2194ad(0x2a1)](_0x4d8491,_0x520593){const _0x4cfd2e=_0x2194ad,_0x3e74aa=await this[_0x4cfd2e(0x204)][_0x4cfd2e(0x3ad)](_0x4d8491),_0x332a37=_0x4d8491+'\x00'+_0x520593;!this['_cursors'][_0x4cfd2e(0x242)](_0x332a37)&&(!this[_0x4cfd2e(0x345)][_0x4cfd2e(0x242)](_0x4d8491)&&(_0x3e74aa[_0x4cfd2e(0x370)](),this[_0x4cfd2e(0x345)][_0x4cfd2e(0x1e5)](_0x4d8491,_0x3e74aa[_0x4cfd2e(0x298)]()||0x0)),this[_0x4cfd2e(0x2f3)][_0x4cfd2e(0x1e5)](_0x332a37,this[_0x4cfd2e(0x345)][_0x4cfd2e(0x2cf)](_0x4d8491)));const _0x26b1b2=this['_cursors'][_0x4cfd2e(0x2cf)](_0x332a37),_0x36a14a=_0x3e74aa[_0x4cfd2e(0x298)](_0x520593)||0x0;if(_0x36a14a<=_0x26b1b2)return![];const _0x52079c=_0x26b1b2+this[_0x4cfd2e(0x301)],_0x37b077=Math[_0x4cfd2e(0x1cc)](_0x36a14a,_0x52079c),_0x18fcf1=_0xa79368[_0x4cfd2e(0x384)]?_0xa79368['now']():0x0,_0x2dbf67=Array[_0x4cfd2e(0x3b0)](_0x3e74aa[_0x4cfd2e(0x1a5)](_0x520593,_0x26b1b2+0x1,_0x37b077));let _0x26674c=_0x26b1b2;for(const _0x2f90a7 of _0x2dbf67){const {clock:_0x37ec4c,key:_0x56b498,action:_0x81f13d,origin:_0x91b336}=_0x2f90a7;if(_0x37ec4c>_0x26674c)_0x26674c=_0x37ec4c;if(_0x56b498==null)continue;if(!this['_markSeen'](_0x4d8491,_0x520593,_0x56b498,_0x37ec4c))continue;let _0x133789,_0x45c99c;if(_0x81f13d===_0xfb02d['REMOVE'])_0x133789='remove',_0x45c99c=null;else{const _0x3b7cc7=_0x3e74aa['get'](_0x520593,_0x56b498);_0x3b7cc7==null?(_0x133789=_0x4cfd2e(0x333),_0x45c99c=null):(_0x133789=_0x4cfd2e(0x32c),_0x45c99c=_0x3b7cc7);}this[_0x4cfd2e(0x278)](_0x4cfd2e(0x32d),{'env':_0x4d8491,'type':_0x520593,'key':_0x56b498,'op':_0x133789,'clock':_0x37ec4c,'origin':_0x91b336,'value':_0x45c99c});}if(_0xa79368[_0x4cfd2e(0x384)])_0xa79368['note'](_0x4cfd2e(0x1ea)+_0x4d8491+':'+_0x520593,_0xa79368[_0x4cfd2e(0x2c8)]()-_0x18fcf1,'n='+_0x2dbf67[_0x4cfd2e(0x39e)]);return this[_0x4cfd2e(0x2f3)][_0x4cfd2e(0x1e5)](_0x332a37,Math[_0x4cfd2e(0x31f)](_0x26674c,_0x37b077)),_0x3e74aa['getClock'](_0x520593)>_0x37b077;}[_0x2194ad(0x2b7)](){const _0x16eb7e=_0x2194ad;return{'started':this[_0x16eb7e(0x2fd)],'quantum':this[_0x16eb7e(0x301)],'flushDebounce':this[_0x16eb7e(0x347)],'cursors':Object['fromEntries']([...this[_0x16eb7e(0x2f3)][_0x16eb7e(0x23e)]()][_0x16eb7e(0x316)](([_0x531365,_0x5369c8])=>[_0x531365[_0x16eb7e(0x1a9)]('\x00',':'),_0x5369c8])),'pending':this[_0x16eb7e(0x2c9)]['size'],'seen':this['_seen']['size']};}}return _0x5792cc[_0x2194ad(0x1ac)]=_0x4a5b8a,okdbChangefeed={'OKDBChangefeed':_0x5792cc},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function _0x1273(_0x2164a7,_0x35284a){_0x2164a7=_0x2164a7-0x1a3;const _0xcdd8d9=_0xcdd8();let _0x12735d=_0xcdd8d9[_0x2164a7];return _0x12735d;}function requireOkdbCluster(){const _0x45fadd=_0x487946;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0xfc96aa=require$$1$1,_0x178a04=require$$1,{EVENTS:_0x2ddb8a}=requireOkdbEnums(),_0x2d79f8=require$$0$3,{slotKey:_0x52b678}=requireOkdbProcessRegistry(),_0x123e3a=0xfa,_0x47d676=0xfa0,_0x16a8d7=0x5,_0x1c0828=0x2710,_0xf5434=0xbb8,_0x20a3cd=0x7d0,_0x558eeb=_0x45fadd(0x230),_0x584169=_0x45fadd(0x399),_0x5126c6='log',_0x2d28d7=_0x45fadd(0x2d0),_0x3902be=[_0x2ddb8a[_0x45fadd(0x236)],_0x2ddb8a[_0x45fadd(0x25a)],_0x2ddb8a[_0x45fadd(0x2e4)],_0x2ddb8a[_0x45fadd(0x2c5)],_0x2ddb8a[_0x45fadd(0x319)],_0x2ddb8a['INDEX_READY'],_0x2ddb8a[_0x45fadd(0x34d)],_0x2ddb8a[_0x45fadd(0x2eb)],'processor:ready',_0x45fadd(0x25b),_0x45fadd(0x21f),'processor:paused',_0x45fadd(0x29a),_0x45fadd(0x2e5)],_0x204233=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x196f08({workers:_0x2e75fb,makeOkdb:_0x5f1164,port:_0x5e52cb,primaryOkdb:_0x12e4af,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x406582=_0x45fadd;if(_0xfc96aa[_0x406582(0x1c8)])return childEntry&&_0xfc96aa['setupPrimary']({'exec':_0x178a04['join'](__dirname,_0x406582(0x318)),'args':[],'execArgv':((()=>{const _0x3af676=_0x406582,_0x724b4b=[];for(let _0x14b874=0x0;_0x14b874<process[_0x3af676(0x225)][_0x3af676(0x39e)];_0x14b874++){const _0xf6ef03=process[_0x3af676(0x225)][_0x14b874];if(_0xf6ef03['startsWith'](_0x3af676(0x22c))||_0xf6ef03['startsWith'](_0x3af676(0x239))||_0xf6ef03['startsWith'](_0x3af676(0x1a7)))continue;if(_0xf6ef03==='-e'||_0xf6ef03===_0x3af676(0x1b4)||_0xf6ef03==='-p'||_0xf6ef03===_0x3af676(0x327)){_0x14b874++;continue;}_0x724b4b[_0x3af676(0x232)](_0xf6ef03);}return _0x724b4b;})())}),_0xff3c9c({'workers':_0x2e75fb,'port':_0x5e52cb,'primaryOkdb':_0x12e4af,'workerEnv':workerEnv});return _0x45f3f9({'makeOkdb':_0x5f1164,'port':_0x5e52cb});}function _0xff3c9c({workers:_0x34cf61,port:_0x542e12,primaryOkdb:_0xa590f3,workerEnv:_0x47b252}){const _0xaae862=_0x45fadd,_0x21c740=new Map(),_0x20269c=new Map();let _0x883afe=![];const _0x28ea8d=_0x59c3f7=>_0x59c3f7?.[_0xaae862(0x27d)],_0x3cf132=_0x2757fe=>{const _0x5be5f7=_0xaae862,_0xf9490b=_0xfc96aa[_0x5be5f7(0x1e2)]({...process.env,..._0x47b252||{},'OKDB_CLUSTER_SLOT':String(_0x2757fe)});return _0xf9490b[_0x5be5f7(0x27d)]=_0x2757fe,_0x21c740['set'](_0xf9490b[_0x5be5f7(0x381)][_0x5be5f7(0x2e8)],{'worker':_0xf9490b,'startedAt':Date[_0x5be5f7(0x2c8)](),'slot':_0x2757fe}),_0xf9490b['on'](_0x5be5f7(0x20c),_0x4869ea=>{const _0x3db9f0=_0x5be5f7;console[_0x3db9f0(0x3aa)](_0x3db9f0(0x260)+_0xf9490b[_0x3db9f0(0x381)]['pid']+_0x3db9f0(0x2b3)+(_0x4869ea?.[_0x3db9f0(0x302)]??_0x4869ea));}),_0xf9490b['on'](_0x5be5f7(0x297),()=>_0x54efa2()),_0xf9490b;},_0x27beeb=_0x160b59=>{const _0x20283c=_0xaae862;for(const {worker:_0x52c7fd}of _0x21c740[_0x20283c(0x387)]()){if(_0x52c7fd[_0x20283c(0x1eb)]()||!_0x52c7fd[_0x20283c(0x266)]())continue;try{_0x52c7fd[_0x20283c(0x38e)](_0x160b59);}catch{}}};_0xa590f3?.['_activateProcesses']?.({'kind':_0xaae862(0x24c),'listenAddr':':'+_0x542e12})[_0xaae862(0x238)](()=>{}),_0xa590f3?.['processes']?.[_0xaae862(0x308)]?.({'workersConfigured':_0x34cf61});const _0xb0c4e6={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x54efa2=()=>{const _0x5383ae=_0xaae862,_0x391b7b=_0xa590f3?.[_0x5383ae(0x37e)];if(!_0x391b7b||!_0x391b7b['_isWriter'])return;const _0xf4e87a=_0x391b7b[_0x5383ae(0x3ba)];for(const {worker:_0x415f16,startedAt:_0x55b146,slot:_0x2e6dad,stats:_0x12f10f,processing:_0x5eb6b8}of _0x21c740[_0x5383ae(0x387)]()){if(_0x415f16[_0x5383ae(0x1eb)]())continue;const _0x329625=_0x391b7b['hasDesired']?.()&&_0x391b7b['getDesired'](_0x5383ae(0x35d),_0xd2f871(_0x2e6dad))?.['decommission']===!![];_0x391b7b[_0x5383ae(0x26c)]({'pid':_0x415f16['process'][_0x5383ae(0x2e8)],'startedAt':_0x55b146,'kind':_0x5383ae(0x244),'supervisorKey':_0xf4e87a,'slot':_0x2e6dad,'slotKey':_0xd2f871(_0x2e6dad),'role':_0xb0c4e6,'listenAddr':':'+_0x542e12,'lifecycle':_0x329625?_0x5383ae(0x2dc):_0x5383ae(0x372),'processing':_0x5eb6b8??null,'stats':_0x12f10f??null})[_0x5383ae(0x238)](()=>{});}},_0xd2f871=_0x2b4dc8=>_0x52b678('cluster:'+_0x542e12,_0x2b4dc8),_0x42bc1e=_0x27d483=>{const _0x111de9=_0xaae862,_0x2ceaef=_0xa590f3?.[_0x111de9(0x37e)];if(!_0x2ceaef?.[_0x111de9(0x299)]?.())return![];return _0x2ceaef['getDesired'](_0x111de9(0x35d),_0xd2f871(_0x27d483))?.[_0x111de9(0x396)]===!![];};for(let _0x27db87=0x0;_0x27db87<_0x34cf61;_0x27db87++){const _0x26c560=_0x42bc1e(_0x27db87);_0x20269c[_0xaae862(0x1e5)](_0x27db87,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x26c560,'respawnTimer':null}),_0x26c560?console['log'](_0xaae862(0x37b)+_0x27db87+_0xaae862(0x35c)):_0x3cf132(_0x27db87);}const _0x3e5dee=()=>{const _0x1eb7bd=_0xaae862,_0x115b8e=_0xa590f3?.['processes'];if(!_0x115b8e?.[_0x1eb7bd(0x2d2)]||!_0x115b8e[_0x1eb7bd(0x299)]?.())return;for(const [_0x45c1e2,_0x3e3630]of _0x20269c[_0x1eb7bd(0x23e)]()){const _0x1dd323=_0x115b8e[_0x1eb7bd(0x317)](_0x1eb7bd(0x35d),_0xd2f871(_0x45c1e2)),_0x353091=_0x1dd323?.['decommission']===!![],_0xd7ca4a=_0x1dd323?.[_0x1eb7bd(0x2b8)]===!![];if(_0x353091&&!_0x3e3630[_0x1eb7bd(0x3cc)]){_0x3e3630[_0x1eb7bd(0x3cc)]=!![];_0x3e3630['respawnTimer']&&(clearTimeout(_0x3e3630['respawnTimer']),_0x3e3630['respawnTimer']=null);for(const {worker:_0x15e19e}of _0x21c740[_0x1eb7bd(0x387)]()){if(_0x28ea8d(_0x15e19e)!==_0x45c1e2||_0x15e19e['isDead']())continue;try{if(_0xd7ca4a)_0x15e19e[_0x1eb7bd(0x381)][_0x1eb7bd(0x2b8)](_0x1eb7bd(0x259));else _0x15e19e[_0x1eb7bd(0x266)]()&&_0x15e19e[_0x1eb7bd(0x32e)]();}catch{}}console[_0x1eb7bd(0x3aa)](_0x1eb7bd(0x1db)+(_0xd7ca4a?_0x1eb7bd(0x340):'decommissioned')+_0x1eb7bd(0x2ed)+_0x45c1e2+_0x1eb7bd(0x1e3));}else{if(!_0x353091&&_0x3e3630[_0x1eb7bd(0x3cc)]&&_0x1dd323){_0x3e3630[_0x1eb7bd(0x3cc)]=![],_0x3e3630['deaths']=[],_0x3e3630[_0x1eb7bd(0x2f7)]=0x0;const _0x35d5e3=[..._0x21c740[_0x1eb7bd(0x387)]()][_0x1eb7bd(0x1d4)](({worker:_0xed30a5})=>_0x28ea8d(_0xed30a5)===_0x45c1e2&&!_0xed30a5[_0x1eb7bd(0x1eb)]());!_0x35d5e3&&!_0x883afe&&(_0x3cf132(_0x45c1e2),console[_0x1eb7bd(0x3aa)](_0x1eb7bd(0x20a)+_0x45c1e2));}}}},_0x4690bd=()=>{try{_0x3e5dee();}catch{}};_0xa590f3?.[_0xaae862(0x306)]?.['on']?.(_0x2ddb8a[_0xaae862(0x3bb)],_0x4690bd);const _0x3bb183=[];if(_0xa590f3?.[_0xaae862(0x306)]?.['on'])for(const _0x5ca31f of _0x3902be){const _0x36aafa=_0x58124c=>{_0x27beeb({[_0x558eeb]:_0x584169,'event':_0x5ca31f,'data':_0x58124c??{}});};_0xa590f3[_0xaae862(0x306)]['on'](_0x5ca31f,_0x36aafa),_0x3bb183[_0xaae862(0x232)]({'event':_0x5ca31f,'handler':_0x36aafa});}const _0x2d4436=setInterval(()=>{_0x3e5dee(),_0x54efa2();},_0x204233);_0x2d4436[_0xaae862(0x371)]?.();const _0x9510d9=(_0x1e1d9e,_0x65b03a)=>{const _0x1dcc0c=_0xaae862;if(!_0x65b03a||typeof _0x65b03a!==_0x1dcc0c(0x1ca)||_0x65b03a[_0x558eeb]!==_0x5126c6)return;if(!_0xa590f3?.[_0x1dcc0c(0x3aa)]?.[_0x1dcc0c(0x1b5)])return;const _0x4828e3=_0x65b03a[_0x1dcc0c(0x33e)]||{};_0xa590f3[_0x1dcc0c(0x3aa)]['ingest']({..._0x4828e3,'msg':'[w'+_0x65b03a[_0x1dcc0c(0x35d)]+']\x20'+(_0x4828e3[_0x1dcc0c(0x26e)]??''),'meta':{..._0x4828e3[_0x1dcc0c(0x2a5)]||{},'worker':_0x65b03a[_0x1dcc0c(0x35d)],'workerPid':_0x65b03a['pid']}});};_0xfc96aa['on'](_0xaae862(0x302),_0x9510d9);const _0x4d1e2f=(_0x2a2eb8,_0x53d7a6)=>{const _0x3385cc=_0xaae862;if(!_0x53d7a6||typeof _0x53d7a6!=='object'||_0x53d7a6[_0x558eeb]!==_0x2d28d7)return;const _0x3be1db=_0x21c740[_0x3385cc(0x2cf)](_0x2a2eb8[_0x3385cc(0x381)][_0x3385cc(0x2e8)]);if(_0x3be1db){_0x3be1db[_0x3385cc(0x2d0)]={..._0x53d7a6['stats'],'at':Date['now']()};if(_0x53d7a6['processing']!==undefined)_0x3be1db[_0x3385cc(0x323)]=_0x53d7a6[_0x3385cc(0x323)];}};_0xfc96aa['on'](_0xaae862(0x302),_0x4d1e2f),_0xfc96aa['on']('exit',(_0x1053db,_0x13c53c,_0x39ab3d)=>{const _0x276fe5=_0xaae862,_0xf7db8a=_0x1053db['process']['pid'],_0x4c6a88=_0x28ea8d(_0x1053db),_0x5ca610=_0x21c740[_0x276fe5(0x2cf)](_0xf7db8a);if(_0x5ca610&&_0xa590f3?.[_0x276fe5(0x37e)])_0xa590f3['processes'][_0x276fe5(0x360)](_0xf7db8a+':'+_0x5ca610[_0x276fe5(0x23b)])[_0x276fe5(0x238)](()=>{});_0x21c740[_0x276fe5(0x362)](_0xf7db8a),console['log'](_0x276fe5(0x260)+_0xf7db8a+_0x276fe5(0x1d9)+(_0x4c6a88??'?')+_0x276fe5(0x324)+(_0x276fe5(0x3c1)+_0x13c53c+',\x20signal='+(_0x39ab3d??'none')+_0x276fe5(0x21c)+_0x21c740[_0x276fe5(0x389)]+_0x276fe5(0x1fd))),_0x54efa2();if(_0x883afe||_0x4c6a88==null)return;const _0x381efa=_0x20269c[_0x276fe5(0x2cf)](_0x4c6a88);if(!_0x381efa||_0x381efa[_0x276fe5(0x3cc)])return;const _0x57b7e4=Date['now']();_0x381efa[_0x276fe5(0x394)][_0x276fe5(0x232)](_0x57b7e4),_0x381efa['deaths']=_0x381efa[_0x276fe5(0x394)][_0x276fe5(0x315)](_0x22fb30=>_0x57b7e4-_0x22fb30<=_0x1c0828);if(_0x381efa[_0x276fe5(0x394)][_0x276fe5(0x39e)]>=_0x16a8d7){_0x381efa[_0x276fe5(0x3cc)]=!![],console['error'](_0x276fe5(0x2bf)+_0x4c6a88+_0x276fe5(0x313)+_0x381efa[_0x276fe5(0x394)]['length']+'\x20times\x20in\x20'+(_0x1c0828+_0x276fe5(0x277)+_0x21c740[_0x276fe5(0x389)]+_0x276fe5(0x2e1)));return;}_0x381efa[_0x276fe5(0x2f7)]++;const _0x27512e=Math[_0x276fe5(0x1cc)](_0x47d676,_0x123e3a*0x2**(_0x381efa[_0x276fe5(0x2f7)]-0x1));console[_0x276fe5(0x3aa)](_0x276fe5(0x214)+_0x4c6a88+_0x276fe5(0x1d2)+_0x27512e+_0x276fe5(0x2cc)+_0x381efa[_0x276fe5(0x2f7)]+')'),_0x381efa[_0x276fe5(0x29f)]=setTimeout(()=>{const _0x5ca483=_0x276fe5;_0x381efa[_0x5ca483(0x29f)]=null;if(_0x883afe||_0x381efa['dead'])return;const _0x738f2e=_0x3cf132(_0x4c6a88);_0x738f2e[_0x5ca483(0x1a4)](_0x5ca483(0x38c),()=>{const _0x261faa=_0x5ca483;if(_0x20269c[_0x261faa(0x2cf)](_0x4c6a88)===_0x381efa)_0x381efa[_0x261faa(0x2f7)]=0x0;});},_0x27512e),_0x381efa['respawnTimer'][_0x276fe5(0x371)]?.();});const _0x4995c1=[..._0x21c740[_0xaae862(0x1b3)]()];console[_0xaae862(0x3aa)](_0xaae862(0x1e4)+process[_0xaae862(0x2e8)]+_0xaae862(0x3af)+_0x34cf61+_0xaae862(0x34a)+_0x542e12+':\x20'+('['+_0x4995c1[_0xaae862(0x28e)](',\x20')+']'));const _0x26cb1f={'_isClusterController':!![],'port':_0x542e12,'primaryOkdb':_0xa590f3??null,'status'(){const _0x1844a5=_0xaae862;return{'clustered':!![],'primaryPid':process[_0x1844a5(0x2e8)],'port':_0x542e12,'primaryRole':_0xa590f3?.[_0x1844a5(0x1f9)]??null,'processorPid':null,'supervisorPid':process[_0x1844a5(0x2e8)],'workers':[..._0x21c740[_0x1844a5(0x387)]()]['map'](({worker:_0x1f5011})=>({'pid':_0x1f5011['process'][_0x1844a5(0x2e8)],'id':_0x1f5011['id'],'dead':_0x1f5011[_0x1844a5(0x1eb)]()}))};},async 'close'(){const _0x3ea991=_0xaae862;_0x883afe=!![];for(const _0x141bf9 of _0x20269c[_0x3ea991(0x387)]()){_0x141bf9[_0x3ea991(0x3cc)]=!![],_0x141bf9[_0x3ea991(0x29f)]&&(clearTimeout(_0x141bf9[_0x3ea991(0x29f)]),_0x141bf9[_0x3ea991(0x29f)]=null);}clearInterval(_0x2d4436),_0xfc96aa[_0x3ea991(0x200)](_0x3ea991(0x302),_0x9510d9),_0xfc96aa['off'](_0x3ea991(0x302),_0x4d1e2f),_0xa590f3?.[_0x3ea991(0x306)]?.['off']?.(_0x2ddb8a['SYSTEM_PROC'],_0x4690bd);if(_0xa590f3?.[_0x3ea991(0x306)]?.[_0x3ea991(0x200)])for(const {event:_0x3d30b5,handler:_0x9361e9}of _0x3bb183){try{_0xa590f3['events'][_0x3ea991(0x200)](_0x3d30b5,_0x9361e9);}catch{}}_0x3bb183['length']=0x0;const _0x45b327=[..._0x21c740['values']()][_0x3ea991(0x316)](({worker:_0x133390})=>_0x133390);if(_0x45b327[_0x3ea991(0x39e)]===0x0)return;await Promise[_0x3ea991(0x27b)](_0x45b327['map'](_0x1a0f2a=>new Promise(_0x3efad1=>{const _0x467c7b=_0x3ea991;if(_0x1a0f2a[_0x467c7b(0x1eb)]()){_0x3efad1();return;}let _0x237586=![];const _0x4ea76e=()=>{if(_0x237586)return;_0x237586=!![];if(_0x1c81c7)clearTimeout(_0x1c81c7);_0x3efad1();};_0x1a0f2a[_0x467c7b(0x1a4)](_0x467c7b(0x289),_0x4ea76e);const _0x1c81c7=setTimeout(()=>{const _0x11e2dc=_0x467c7b;try{_0x1a0f2a[_0x11e2dc(0x381)]['kill']();}catch{}},_0xf5434+0x1f4);_0x1c81c7[_0x467c7b(0x371)]?.();try{_0x1a0f2a[_0x467c7b(0x32e)]();}catch{try{_0x1a0f2a[_0x467c7b(0x381)]['kill']();}catch{}}})));}};return _0x26cb1f;}async function _0x45f3f9({makeOkdb:_0x25df29,port:_0x10285e}){const _0x326a45=_0x45fadd,_0xc94435=await _0x25df29();return _0x56bdac(_0xc94435),_0xc94435[_0x326a45(0x279)][_0x326a45(0x1fb)](_0x10285e);}function _0x56bdac(_0x4010cc){const _0x1e9d01=_0x45fadd;if(!_0x4010cc||_0x4010cc[_0x1e9d01(0x213)])return;_0x4010cc[_0x1e9d01(0x213)]=!![];try{const {OKDBChangefeed:_0x5608d3}=requireOkdbChangefeed(),_0x5059d0=_0x4010cc['_adminRelay'];if(_0x5059d0&&typeof _0x5059d0[_0x1e9d01(0x374)]==='function'){const _0x434887=new _0x5608d3(_0x4010cc);_0x434887[_0x1e9d01(0x1bf)](),_0x5059d0[_0x1e9d01(0x374)](_0x434887),_0x4010cc[_0x1e9d01(0x240)]=_0x434887;}}catch(_0x4b5a89){_0x4010cc['log']?.[_0x1e9d01(0x3be)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x4b5a89?.['message']??_0x4b5a89),{'feature':_0x1e9d01(0x1cf)});}const _0x2b307d=_0x1d6eca=>{const _0x38ca34=_0x1e9d01;if(!_0x1d6eca||typeof _0x1d6eca!==_0x38ca34(0x1ca)||_0x1d6eca[_0x558eeb]==null)return;if(_0x1d6eca[_0x558eeb]===_0x584169)try{_0x4010cc[_0x38ca34(0x36f)]?.[_0x38ca34(0x24b)]?.(_0x1d6eca[_0x38ca34(0x258)],_0x1d6eca[_0x38ca34(0x23f)]);}catch{}};process['on'](_0x1e9d01(0x302),_0x2b307d),_0x4010cc[_0x1e9d01(0x310)]=_0x2b307d;{let _0x315ac0=process[_0x1e9d01(0x1e8)](),_0x4b6a58=Date[_0x1e9d01(0x2c8)]();const _0x549c20=()=>{const _0x1cf461=_0x1e9d01;if(typeof process[_0x1cf461(0x38e)]!==_0x1cf461(0x1dc)||!process[_0x1cf461(0x3b2)])return;const _0x335d5c=Date[_0x1cf461(0x2c8)](),_0x1b552a=process[_0x1cf461(0x1e8)](),_0xfd6f68=(_0x335d5c-_0x4b6a58)*0x3e8,_0x4d5609=_0x1b552a[_0x1cf461(0x3a0)]-_0x315ac0['user']+(_0x1b552a[_0x1cf461(0x36a)]-_0x315ac0[_0x1cf461(0x36a)]),_0x5ced95=_0xfd6f68>0x0?Math[_0x1cf461(0x1cc)](0x64,Math[_0x1cf461(0x292)](_0x4d5609/(_0xfd6f68*(_0x2d79f8[_0x1cf461(0x320)]()[_0x1cf461(0x39e)]||0x1))*0x64)):0x0;_0x315ac0=_0x1b552a,_0x4b6a58=_0x335d5c;const _0x4ecd3b=process[_0x1cf461(0x2ac)]();let _0x7175a4=null;try{_0x7175a4=_0x4010cc[_0x1cf461(0x1f9)]?.[_0x1cf461(0x33f)]?_0x4010cc[_0x1cf461(0x37e)]?.[_0x1cf461(0x237)]?.()??null:null;}catch{}try{process[_0x1cf461(0x38e)]({[_0x558eeb]:_0x2d28d7,'stats':{'rss':_0x4ecd3b[_0x1cf461(0x1ad)],'heapUsed':_0x4ecd3b['heapUsed'],'heapTotal':_0x4ecd3b[_0x1cf461(0x264)],'external':_0x4ecd3b[_0x1cf461(0x1aa)],'cpuPct':_0x5ced95,'cpuWindowMs':Math[_0x1cf461(0x292)](_0xfd6f68/0x3e8)||null},'processing':_0x7175a4});}catch{}},_0x2b285b=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x153ee1=setInterval(_0x549c20,_0x2b285b);_0x153ee1[_0x1e9d01(0x371)]?.(),_0x549c20();for(const _0x44d19e of[_0x1e9d01(0x269),_0x1e9d01(0x29a)]){_0x4010cc[_0x1e9d01(0x306)]?.['on']?.(_0x44d19e,()=>{try{_0x549c20();}catch{}});}}let _0x4dc68f=![];const _0x90c6d6=async _0x3f9cf1=>{const _0x5e1a5b=_0x1e9d01;if(_0x4dc68f)return;_0x4dc68f=!![];const _0xdc01ac=setTimeout(()=>process['exit'](_0x3f9cf1),_0xf5434);_0xdc01ac['unref']?.();try{await _0x4010cc[_0x5e1a5b(0x3ce)]?.();}catch{}process[_0x5e1a5b(0x289)](_0x3f9cf1);};process['on']('disconnect',()=>_0x90c6d6(0x0));if(process[_0x1e9d01(0x21a)]!=='win32'){const _0x5fffa5=setInterval(()=>{if(process['ppid']===0x1)_0x90c6d6(0x0);},_0x20a3cd);_0x5fffa5[_0x1e9d01(0x371)]?.(),_0x4010cc[_0x1e9d01(0x1d0)]=_0x5fffa5;}}return okdbCluster={'runClustered':_0x196f08,'attachWorkerCluster':_0x56bdac},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x4650ba=_0x487946;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x3f0c68=require$$0$5,{attachWorkerCluster:_0x4d719d}=requireOkdbCluster();async function _0x4eb92c(){const _0x47b595=_0x1273,_0x10b9fe=process.env.OKDB_HTTP_CHILD;if(!_0x10b9fe)throw new Error(_0x47b595(0x3b6));const {rootPath:_0x17211d,port:_0x489bd5,options:options={},logLevel:logLevel=_0x47b595(0x2b0)}=JSON[_0x47b595(0x1f6)](_0x10b9fe);if(!_0x17211d||!_0x489bd5)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0x139d5b=new _0x3f0c68(_0x17211d,{...options,'engines':![],'processors':![],'compaction':![]});_0x139d5b[_0x47b595(0x3aa)][_0x47b595(0x37d)]?.();const _0x57080b=process.env.OKDB_CLUSTER_SLOT??'?',_0x38fdd8={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x335ae0=_0x38fdd8[logLevel]??_0x38fdd8[_0x47b595(0x2b0)];_0x139d5b[_0x47b595(0x3aa)][_0x47b595(0x2db)](_0x960fa4=>{const _0x19d679=_0x47b595;if((_0x38fdd8[_0x960fa4[_0x19d679(0x1c5)]]??0x1)<_0x335ae0)return;try{process[_0x19d679(0x38e)]?.({'__okdbCluster':'log','slot':_0x57080b,'pid':process['pid'],'entry':_0x960fa4});}catch{}}),await _0x139d5b['open'](),_0x4d719d(_0x139d5b),await _0x139d5b[_0x47b595(0x279)][_0x47b595(0x1fb)](_0x489bd5);}return _0x4eb92c()[_0x4650ba(0x238)](_0x5031a9=>{const _0xda0903=_0x4650ba;try{process['send']?.({'__okdbCluster':_0xda0903(0x3aa),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0xda0903(0x2e8)],'entry':{'level':'error','msg':_0xda0903(0x222)+(_0x5031a9?.[_0xda0903(0x302)]??_0x5031a9)}});}catch{}process[_0xda0903(0x289)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x487946(0x34f)]=okdbHttpWorkerChild;
|
|
1
|
+
'use strict';const _0x6505f9=_0x53b1;function _0x53b1(_0xf05cc9,_0x49d982){_0xf05cc9=_0xf05cc9-0x165;const _0x2029ab=_0x2029();let _0x53b1a4=_0x2029ab[_0xf05cc9];return _0x53b1a4;}(function(_0x1ff62d,_0x1f530b){const _0x40532=_0x53b1,_0x628f3c=_0x1ff62d();while(!![]){try{const _0x3c0be3=-parseInt(_0x40532(0x31f))/0x1+-parseInt(_0x40532(0x2a5))/0x2+parseInt(_0x40532(0x327))/0x3*(-parseInt(_0x40532(0x283))/0x4)+parseInt(_0x40532(0x215))/0x5+parseInt(_0x40532(0x2bf))/0x6+parseInt(_0x40532(0x26c))/0x7*(-parseInt(_0x40532(0x274))/0x8)+parseInt(_0x40532(0x2ec))/0x9;if(_0x3c0be3===_0x1f530b)break;else _0x628f3c['push'](_0x628f3c['shift']());}catch(_0x4a233b){_0x628f3c['push'](_0x628f3c['shift']());}}}(_0x2029,0x93456));var require$$0$5=require(_0x6505f9(0x2bc)),require$$1$1=require(_0x6505f9(0x311)),require$$1=require(_0x6505f9(0x394)),require$$0$3=require('os'),require$$2=require(_0x6505f9(0x26a)),require$$0=require(_0x6505f9(0x275)),require$$0$2=require(_0x6505f9(0x363)),require$$0$1=require('fs'),require$$0$4=require(_0x6505f9(0x35e));function getDefaultExportFromCjs(_0x2ac225){const _0x10e744=_0x6505f9;return _0x2ac225&&_0x2ac225['__esModule']&&Object[_0x10e744(0x249)][_0x10e744(0x168)]['call'](_0x2ac225,_0x10e744(0x262))?_0x2ac225[_0x10e744(0x262)]:_0x2ac225;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x349c19=_0x6505f9;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x1f6fb0={'PUT':'put','REMOVE':_0x349c19(0x2cb),'INDEX_DROP':_0x349c19(0x2fd),'INDEX_REGISTER':_0x349c19(0x1e2),'INDEX_RESET':_0x349c19(0x264),'TYPE_REGISTER':_0x349c19(0x1f9),'TYPE_DROP':_0x349c19(0x329),'FTS_REGISTER':_0x349c19(0x2c9),'FTS_DROP':'dropFts','FTS_RESET':_0x349c19(0x2e3),'SCHEMA_SET':_0x349c19(0x18c),'SCHEMA_DROP':_0x349c19(0x16b),'TTL_SET':_0x349c19(0x36b),'TTL_CLEAR':'clearTtl'},_0x23f4e0={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x349c19(0x2d5),'SYSTEM_DRAIN':_0x349c19(0x17c),'SYSTEM_TYPE_DROP':_0x349c19(0x1dc),'SYSTEM_PROC':_0x349c19(0x229),'SYSTEM_BUS_STATE_CHANGE':_0x349c19(0x31d),'ITEM_CREATE':_0x349c19(0x2d6),'ITEM_UPDATE':_0x349c19(0x390),'ITEM_REMOVE':_0x349c19(0x2c1),'INDEX_RESET':_0x349c19(0x212),'INDEX_READY':_0x349c19(0x2d0),'INDEX_PROGRESS':_0x349c19(0x385),'VIEW_PROGRESS':_0x349c19(0x1f3),'INDEX_DROP':_0x349c19(0x210),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x349c19(0x18e),'FTS_DROP':_0x349c19(0x2af),'FTS_RESET':_0x349c19(0x36c),'SCHEMA_SET':'schema:set','SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x349c19(0x2c0),'UNIQUE_VIOLATION_RESOLVED':_0x349c19(0x334),'REF_VIOLATION':_0x349c19(0x319),'REF_VIOLATION_RESOLVED':_0x349c19(0x1e9),'SYNC_APPLY':_0x349c19(0x1c9),'TXN_START':_0x349c19(0x1a1),'TXN_END':'txn:end','TXN_ROLLBACK':_0x349c19(0x33e),'TYPE_REGISTERED':_0x349c19(0x239),'TYPE_DROP':_0x349c19(0x2fc),'ENV_OPENED':_0x349c19(0x1cb),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x349c19(0x178),'TTL_SET':_0x349c19(0x314),'TTL_CLEAR':_0x349c19(0x33b),'LICENSE_INVALID':_0x349c19(0x286),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x349c19(0x200),'LICENSE_REMOVED':'license:removed'},_0x2874df={'CREATING':'creating','RESETTING':_0x349c19(0x23a),'READY':_0x349c19(0x27b),'DROPPING':_0x349c19(0x331),'WAITING':_0x349c19(0x295)},_0x108634={'CREATED':_0x349c19(0x2db),'STARTING':_0x349c19(0x38a),'STARTED':_0x349c19(0x278),'STOPPING':'stopping','STOPPED':'stopped'},_0x139f53={'CREATING':'creating','READY':_0x349c19(0x27b),'HALTED':_0x349c19(0x28b),'STOPPED':'stopped','RESETTING':_0x349c19(0x23a)},_0xa44e8f=Object[_0x349c19(0x181)]({'POKE':_0x349c19(0x2f3),'DRAIN':_0x349c19(0x32a),'TYPE_DROP':_0x349c19(0x2ad),'PROC':_0x349c19(0x1d8),'ENV_RELEASE':_0x349c19(0x1f0)});return okdbEnums={'BUS_EVENTS':_0xa44e8f,'CHANGE_ACTIONS':_0x1f6fb0,'EVENTS':_0x23f4e0,'INDEX_STATE':_0x2874df,'OKDB_STATE':_0x108634,'VIEW_STATE':_0x139f53},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x2d9d95=_0x6505f9;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x17ee31,performance:_0x43c452}=require$$0,_0x296584=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x2d9d95(0x230),_0x5ac7f1=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x56d273=process.env.OKDB_LOOP_LAG_ALL==='1',_0x344b23=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x431de9{constructor(){const _0xab3d8d=_0x2d9d95;this[_0xab3d8d(0x251)]=_0x296584,this[_0xab3d8d(0x381)]=new Map(),this['_h']=null,this['_timer']=null,this[_0xab3d8d(0x19a)]=![],this[_0xab3d8d(0x1c1)]=(_0x4d06b3,_0x1c7f8e)=>process[_0xab3d8d(0x397)][_0xab3d8d(0x29c)](_0x4d06b3+(_0x1c7f8e?'\x20'+JSON[_0xab3d8d(0x276)](_0x1c7f8e):'')+'\x0a');}[_0x2d9d95(0x2d7)](){const _0x288098=_0x2d9d95;return _0x43c452[_0x288098(0x2d7)]();}['setLogger'](_0x5133ee){const _0x998c27=_0x2d9d95;if(typeof _0x5133ee===_0x998c27(0x296))this['_log']=_0x5133ee;}[_0x2d9d95(0x1a2)](_0x483943,_0x55f1ea,_0x1530fd){const _0x317fdf=_0x2d9d95;if(!this[_0x317fdf(0x251)])return;let _0xe15bc6=this[_0x317fdf(0x381)]['get'](_0x483943);!_0xe15bc6&&(_0xe15bc6={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x317fdf(0x381)][_0x317fdf(0x37b)](_0x483943,_0xe15bc6)),_0xe15bc6['ms']+=_0x55f1ea,_0xe15bc6[_0x317fdf(0x392)]+=0x1,_0x55f1ea>_0xe15bc6['maxMs']&&(_0xe15bc6[_0x317fdf(0x1b1)]=_0x55f1ea,_0xe15bc6[_0x317fdf(0x17d)]=_0x1530fd||'');}[_0x2d9d95(0x1d6)](_0xcc2438){const _0x1d4952=_0x2d9d95;if(!this['enabled']||this[_0x1d4952(0x19a)])return;this['_started']=!![];if(_0xcc2438)this[_0x1d4952(0x1c1)]=_0xcc2438;this['_h']=_0x17ee31({'resolution':0xa}),this['_h']['enable'](),this[_0x1d4952(0x2e1)]=setInterval(()=>this[_0x1d4952(0x170)](),_0x5ac7f1);if(this[_0x1d4952(0x2e1)][_0x1d4952(0x369)])this[_0x1d4952(0x2e1)][_0x1d4952(0x369)]();}['onWindow'](_0x30d910){const _0x5ebcd3=_0x2d9d95;if(!this[_0x5ebcd3(0x2ea)])this[_0x5ebcd3(0x2ea)]=new Set();this['_windowCbs'][_0x5ebcd3(0x237)](_0x30d910);if(!this[_0x5ebcd3(0x19a)])this[_0x5ebcd3(0x2c5)]();}[_0x2d9d95(0x205)](_0x31b506){const _0x2a1064=_0x2d9d95;this[_0x2a1064(0x2ea)]?.[_0x2a1064(0x2e7)](_0x31b506);}['_startAdmission'](){const _0x5141aa=_0x2d9d95;if(this[_0x5141aa(0x1ee)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x17ee31({'resolution':0xa}),this['_h'][_0x5141aa(0x293)]());const _0xd82238=_0x5ac7f1;this['_admissionTimer']=setInterval(()=>{const _0x193af0=_0x5141aa,_0x291f9f=this['_h'];if(!_0x291f9f)return;const _0x19d299=_0x291f9f[_0x193af0(0x23d)](0x63)/0xf4240,_0x2a643d=_0x291f9f[_0x193af0(0x284)]/0xf4240,_0x3b6c56=_0x291f9f['mean']/0xf4240;_0x291f9f[_0x193af0(0x16a)]();if(this[_0x193af0(0x2ea)])for(const _0x30bcbb of this[_0x193af0(0x2ea)]){try{_0x30bcbb({'p99Ms':_0x19d299,'maxMs':_0x2a643d,'meanMs':_0x3b6c56,'reportMs':_0xd82238});}catch{}}},_0xd82238);if(this[_0x5141aa(0x235)][_0x5141aa(0x369)])this[_0x5141aa(0x235)]['unref']();}[_0x2d9d95(0x170)](){const _0x3eafda=_0x2d9d95,_0x513c97=this['_h'],_0x44bc45=_0x513c97[_0x3eafda(0x284)]/0xf4240,_0x14f295=_0x513c97[_0x3eafda(0x23d)](0x63)/0xf4240,_0x23365b=_0x513c97['mean']/0xf4240;_0x513c97[_0x3eafda(0x16a)]();const _0x389344=[...this[_0x3eafda(0x381)][_0x3eafda(0x190)]()][_0x3eafda(0x2bb)](([_0x333fec,_0x5e2cb1])=>({'label':_0x333fec,..._0x5e2cb1}))['sort']((_0x36c262,_0xf14ff1)=>_0xf14ff1['ms']-_0x36c262['ms'])['slice'](0x0,0x8);this[_0x3eafda(0x381)][_0x3eafda(0x225)]();const _0x5a0655=_0x389344[_0x3eafda(0x2e6)]((_0x35af66,_0x1ce033)=>_0x35af66+_0x1ce033['ms'],0x0),_0x38426d=_0x389344[_0x3eafda(0x2bb)](_0x1869bf=>_0x1869bf[_0x3eafda(0x338)]+'='+_0x1869bf['ms'][_0x3eafda(0x291)](0x0)+_0x3eafda(0x350)+_0x1869bf[_0x3eafda(0x392)]+(_0x1869bf[_0x3eafda(0x1b1)]>0x5?'(worst\x20'+_0x1869bf[_0x3eafda(0x1b1)]['toFixed'](0x0)+'ms'+(_0x1869bf[_0x3eafda(0x17d)]?'\x20'+_0x1869bf[_0x3eafda(0x17d)]:'')+')':''));(_0x56d273||_0x44bc45>=_0x344b23)&&this['_log'](_0x3eafda(0x258)+_0x5ac7f1+'ms\x20max='+_0x44bc45[_0x3eafda(0x291)](0x0)+_0x3eafda(0x22b)+_0x14f295[_0x3eafda(0x291)](0x0)+_0x3eafda(0x1e0)+_0x23365b[_0x3eafda(0x291)](0x0)+'ms\x20busy='+_0x5a0655[_0x3eafda(0x291)](0x0)+'ms'+(_0x38426d[_0x3eafda(0x263)]?_0x3eafda(0x1fc)+_0x38426d[_0x3eafda(0x355)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x3eafda(0x2ea)])for(const _0x44259f of this[_0x3eafda(0x2ea)]){try{_0x44259f({'p99Ms':_0x14f295,'maxMs':_0x44bc45,'meanMs':_0x23365b,'reportMs':_0x5ac7f1});}catch{}}}[_0x2d9d95(0x243)](){const _0x221508=_0x2d9d95;if(this[_0x221508(0x2e1)])clearInterval(this[_0x221508(0x2e1)]);if(this['_h'])this['_h'][_0x221508(0x2b1)]();this[_0x221508(0x2e1)]=null,this['_h']=null,this['_started']=![];}}const _0x319ed8=new _0x431de9();if(_0x319ed8['enabled'])_0x319ed8[_0x2d9d95(0x1d6)]();return okdbLoopMonitor={'LOOP':_0x319ed8},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2db843=require$$0$1,_0x26ac9c=require$$1;let _0x12a0b4,_0x34f008,_0x5c400a,_0x2f9468,_0xf2003b,_0x388367,_0x217dec,_0xadbda=![];const _0x264d37=new Set();let _0xdcbd17=null;const _0x7fa144=new Map();function _0x43e3e9(){const _0x4b38e2=_0x53b1;if(_0x12a0b4!==undefined)return _0x12a0b4;_0x12a0b4=process.env.OKDB_DIAG==='1';if(!_0x12a0b4)return![];_0x34f008=process.env.OKDB_DIAG_STACK==='1',_0x2f9468=Math[_0x4b38e2(0x284)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x5c400a=new Array(_0x2f9468),_0xf2003b=0x0,_0x388367=0x0,_0x217dec=process.env.OKDB_DIAG_DIR||null;if(_0x217dec)try{_0x2db843[_0x4b38e2(0x1d7)](_0x217dec,{'recursive':!![]});}catch{}return!![];}function _0x50b782(){return _0x12a0b4===undefined?_0x43e3e9():_0x12a0b4;}function _0x252ac0(_0x245bfe,_0x5718ac){const _0x35a269=_0x53b1;if(_0x12a0b4===undefined?!_0x43e3e9():!_0x12a0b4)return;let _0x5bb7e7;if(_0x34f008){const _0x25abd4=new Error()[_0x35a269(0x171)]||'';_0x5bb7e7=_0x25abd4[_0x35a269(0x1bd)]('\x0a')['slice'](0x3)[_0x35a269(0x2bb)](_0x3987d9=>_0x3987d9[_0x35a269(0x2b0)]())[_0x35a269(0x23e)](Boolean)['slice'](0x0,0x8);}_0x5c400a[_0xf2003b]={'seq':_0x388367++,'t':Date['now'](),'env':_0x245bfe,'kind':_0x5718ac||_0x35a269(0x2cf),'stack':_0x5bb7e7},_0xf2003b=(_0xf2003b+0x1)%_0x2f9468;}function _0x12be9f(_0x5bf97c){const _0x4e7dc4=_0x53b1,_0x53588b=[];for(let _0x1871af=0x0;_0x1871af<_0x2f9468;_0x1871af++){const _0x3c5546=_0x5c400a[(_0xf2003b-0x1-_0x1871af+_0x2f9468*0x2)%_0x2f9468];if(!_0x3c5546)continue;_0x53588b[_0x4e7dc4(0x18a)](_0x3c5546);if(_0x53588b[_0x4e7dc4(0x263)]>=_0x5bf97c)break;}return _0x53588b;}function _0x59e6f7(_0x583796){const _0x57d4fa=_0x53b1;try{process['stderr'][_0x57d4fa(0x29c)](_0x583796+'\x0a');}catch{}if(_0x217dec)try{_0x2db843[_0x57d4fa(0x2ef)](_0x26ac9c[_0x57d4fa(0x355)](_0x217dec,_0x57d4fa(0x20c)+process[_0x57d4fa(0x322)]+_0x57d4fa(0x1a9)),_0x583796+'\x0a');}catch{}}function _0x3f000b(_0x1b0b9d){const _0x461e60=_0x53b1,_0x1fbafb=_0x12be9f(_0x1b0b9d);if(!_0x1fbafb[_0x461e60(0x263)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x4ddc33=Date['now']();return _0x1fbafb[_0x461e60(0x2bb)](_0x6a43d8=>{const _0x128be5=_0x461e60,_0x2825f4='\x20\x20#'+_0x6a43d8[_0x128be5(0x303)]+'\x20-'+(_0x4ddc33-_0x6a43d8['t'])+'ms\x20env='+_0x6a43d8[_0x128be5(0x24b)]+'\x20'+_0x6a43d8['kind'];return _0x6a43d8[_0x128be5(0x171)]&&_0x6a43d8[_0x128be5(0x171)][_0x128be5(0x263)]?_0x2825f4+_0x128be5(0x367)+_0x6a43d8[_0x128be5(0x171)][_0x128be5(0x355)](_0x128be5(0x367)):_0x2825f4;})[_0x461e60(0x355)]('\x0a');}function _0x5911f7(_0x1f7bbe,_0x1ac396){const _0x40cc16=_0x53b1,_0x61eac1=_0x40cc16(0x2c3)+_0x1f7bbe+'\x20@\x20'+new Date()[_0x40cc16(0x192)]()+_0x40cc16(0x2cc)+process[_0x40cc16(0x322)]+'\x20===',_0x15920e=[_0x61eac1,_0x40cc16(0x2d1)+(_0x1ac396&&_0x1ac396[_0x40cc16(0x171)]?_0x1ac396[_0x40cc16(0x171)]['split']('\x0a')[0x0]:_0x1ac396),'recent\x20writes\x20(newest\x20first)'+(_0x34f008?'':_0x40cc16(0x273))+':',_0x3f000b(0x18),_0x1ae2cf(),'='[_0x40cc16(0x313)](_0x61eac1['length']-0x1)];_0x59e6f7(_0x15920e[_0x40cc16(0x355)]('\x0a'));}function _0x38ebca(_0x573186){const _0x4079af=_0x53b1;if(!_0x50b782())return;const _0x430529=String(_0x573186&&_0x573186['message']||_0x573186||''),_0x6e13ee=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4079af(0x22d)](_0x430529);_0x5911f7(_0x6e13ee?_0x4079af(0x1bb):'uncaughtException',_0x573186);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x6e13ee)return;try{console[_0x4079af(0x20f)](_0x573186&&_0x573186[_0x4079af(0x171)]?_0x573186[_0x4079af(0x171)]:_0x573186);}catch{}process[_0x4079af(0x175)](0x1);}function _0x8dbdde(_0x49156a){const _0x1f05c9=_0x53b1;if(!_0x50b782())return;const _0x1127c9=String(_0x49156a&&_0x49156a[_0x1f05c9(0x198)]||_0x49156a||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x1f05c9(0x22d)](_0x1127c9)&&_0x5911f7(_0x1f05c9(0x29b),_0x49156a);}function _0x1ae2cf(){const _0x4bc6eb=_0x53b1,_0x1a84cd=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x5570ea=![];for(const _0x5f154d of _0x264d37){const _0x2932f1=_0x5f154d&&_0x5f154d[_0x4bc6eb(0x299)];if(!_0x2932f1)continue;for(const [_0x784ab7,_0x26d2d1]of _0x2932f1){const _0x13855d=_0x26d2d1&&_0x26d2d1[_0x4bc6eb(0x366)]&&_0x26d2d1[_0x4bc6eb(0x366)][_0x4bc6eb(0x2c8)];if(!_0x13855d)continue;let _0x2cad78,_0x5a07b2;try{_0x2cad78=Atomics[_0x4bc6eb(0x2dc)](_0x13855d,0x0),_0x5a07b2=Atomics['load'](_0x13855d,0x1);}catch{continue;}if(_0x2cad78===0x0)continue;_0x5570ea=!![];const _0x545970=_0x2cad78>0x0?_0x4bc6eb(0x23b):_0x4bc6eb(0x1ef),_0x59040f=Date[_0x4bc6eb(0x2d7)]()-Math[_0x4bc6eb(0x1be)](_0x2cad78)*0x3e8,_0x4ed326=((()=>{const _0x16fd70=_0x4bc6eb;try{return _0x26d2d1[_0x16fd70(0x177)]&&_0x26d2d1[_0x16fd70(0x177)][_0x16fd70(0x1e8)]?_0x26d2d1[_0x16fd70(0x177)][_0x16fd70(0x1e8)]():null;}catch{return null;}})());_0x1a84cd['push'](_0x4bc6eb(0x2ff)+_0x784ab7+_0x4bc6eb(0x1f1)+_0x545970+_0x4bc6eb(0x184)+_0x59040f+_0x4bc6eb(0x281)+_0x5a07b2+(_0x4ed326?_0x4bc6eb(0x231)+_0x4ed326['depth']+_0x4bc6eb(0x298)+_0x4ed326['oldestPendingMs']+_0x4bc6eb(0x312)+_0x4ed326[_0x4bc6eb(0x207)]+'}':''));}}if(!_0x5570ea)_0x1a84cd['push'](_0x4bc6eb(0x227));return _0x1a84cd['join']('\x0a');}function _0x168c55(){const _0x479e47=_0x53b1;if(!_0x50b782())return;const _0x35b56e=Math[_0x479e47(0x284)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x18f80a=Date[_0x479e47(0x2d7)]();for(const _0x4d5500 of _0x264d37){const _0x5bab6a=_0x4d5500&&_0x4d5500[_0x479e47(0x299)];if(!_0x5bab6a)continue;for(const [_0x3dc0bd,_0x2b9110]of _0x5bab6a){const _0x51c6e2=_0x2b9110&&_0x2b9110['_coordinator']&&_0x2b9110[_0x479e47(0x366)][_0x479e47(0x2c8)];if(!_0x51c6e2)continue;let _0x46d90b;try{_0x46d90b=Atomics[_0x479e47(0x2dc)](_0x51c6e2,0x0);}catch{continue;}const _0x1910a1=_0x4d5500[_0x479e47(0x394)]+'|'+_0x3dc0bd;if(_0x46d90b<=0x0){_0x7fa144[_0x479e47(0x2e7)](_0x1910a1);continue;}const _0x56afe5=_0x18f80a-_0x46d90b*0x3e8,_0x10b32b=_0x7fa144[_0x479e47(0x36d)](_0x1910a1);if(_0x56afe5<_0x35b56e)continue;if(_0x10b32b&&_0x18f80a-_0x10b32b[_0x479e47(0x2e8)]<_0x35b56e)continue;_0x7fa144['set'](_0x1910a1,{'firstTs':_0x10b32b?_0x10b32b[_0x479e47(0x395)]:_0x46d90b,'dumpedAt':_0x18f80a});const _0x68db='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x56afe5+_0x479e47(0x24a)+_0x3dc0bd+'\x20@\x20'+new Date()[_0x479e47(0x192)]()+'\x20pid='+process[_0x479e47(0x322)]+'\x20===';_0x59e6f7([_0x68db,_0x1ae2cf(),'='[_0x479e47(0x313)](_0x68db['length']-0x1)][_0x479e47(0x355)]('\x0a'));}}}function _0x2e71e0(){const _0x2c3dce=_0x53b1;if(!_0x50b782()||_0xadbda)return;_0xadbda=!![],process[_0x2c3dce(0x188)](_0x2c3dce(0x16c),_0x38ebca),process[_0x2c3dce(0x188)](_0x2c3dce(0x1c8),_0x8dbdde);const _0x20470e=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0xdcbd17=setInterval(_0x168c55,_0x20470e);if(_0xdcbd17['unref'])_0xdcbd17['unref']();}function _0x165646(_0x4343a9){const _0x59033=_0x53b1;if(!_0x50b782()||!_0x4343a9)return;_0x264d37[_0x59033(0x237)](_0x4343a9),_0x2e71e0();}function _0x5375d0(_0x583422){const _0x11f4a0=_0x53b1;_0x264d37[_0x11f4a0(0x2e7)](_0x583422);}function _0x2de96f(){const _0x312054=_0x53b1;if(!_0x50b782())return{'enabled':![],'hint':_0x312054(0x353)};return{'enabled':!![],'stackCapture':!!_0x34f008,'recentWrites':_0x12be9f(0x10),'drain':_0x1ae2cf()};}return okdbDiag={'isEnabled':_0x50b782,'recordWrite':_0x252ac0,'installDiag':_0x2e71e0,'registerOkdb':_0x165646,'unregisterOkdb':_0x5375d0,'snapshot':_0x2de96f},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x53757a=_0x6505f9;if(hasRequiredOkdbWriter)return okdbWriter[_0x53757a(0x292)];hasRequiredOkdbWriter=0x1;const {performance:_0x345c06}=require$$0$2,_0x57d48c=requireOkdbDiag(),_0x4f5084=process.env.OKDB_COMMIT_MODE===_0x53757a(0x204);class _0x1e03eb{constructor(_0x3ee7d6){const _0x58fcce=_0x53757a;this[_0x58fcce(0x24b)]=_0x3ee7d6,this[_0x58fcce(0x28f)]=new Set(),this[_0x58fcce(0x25e)]=new Map(),this[_0x58fcce(0x336)]=0x0,this['_durs']=[],this[_0x58fcce(0x250)]=[],this['_highWater']=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x58fcce(0x326)]=0x0,this[_0x58fcce(0x399)]=[],this['_bpParkedTotal']=0x0;}async[_0x53757a(0x1e6)](_0x39b82c,_0x4d3c30){const _0x511b7b=_0x53757a;if(_0x57d48c[_0x511b7b(0x22e)]())_0x57d48c[_0x511b7b(0x26e)](this[_0x511b7b(0x24b)]?.[_0x511b7b(0x351)],_0x4d3c30);if(this[_0x511b7b(0x2f6)]){const _0x1e89f4=new Error(_0x511b7b(0x176));_0x1e89f4[_0x511b7b(0x203)]='ENV_CLOSING_RETRY';throw _0x1e89f4;}if(this['_highWater']>0x0){let _0x16e9fd=![];while(this['_outstanding']>=this[_0x511b7b(0x285)]&&!this[_0x511b7b(0x2f6)]){!_0x16e9fd&&(_0x16e9fd=!![],this[_0x511b7b(0x25a)]++),await new Promise(_0x4350b6=>this[_0x511b7b(0x399)][_0x511b7b(0x18a)](_0x4350b6));}if(this[_0x511b7b(0x2f6)]){const _0x49fa88=new Error(_0x511b7b(0x176));_0x49fa88['code']=_0x511b7b(0x216);throw _0x49fa88;}}this[_0x511b7b(0x326)]++;const _0x5407c2=this[_0x511b7b(0x24b)][_0x511b7b(0x366)];if(_0x5407c2)await _0x5407c2[_0x511b7b(0x341)]();if(this[_0x511b7b(0x2f6)]){if(_0x5407c2)_0x5407c2['afterWrite']();this['_outstanding']--;if(this[_0x511b7b(0x399)][_0x511b7b(0x263)]&&this[_0x511b7b(0x326)]<this['_highWater'])this['_bpWaiters']['shift']()();const _0x51aca1=new Error(_0x511b7b(0x176));_0x51aca1['code']=_0x511b7b(0x216);throw _0x51aca1;}const _0x211ea2=_0x345c06[_0x511b7b(0x2d7)]();if(_0x4f5084)try{const _0x1273db=this[_0x511b7b(0x24b)]['db']['transactionSync'](_0x39b82c);this['_committed']++;if(this[_0x511b7b(0x1ba)]['push'](_0x345c06[_0x511b7b(0x2d7)]()-_0x211ea2)>0x100)this[_0x511b7b(0x1ba)]['shift']();if(this[_0x511b7b(0x250)][_0x511b7b(0x18a)](_0x345c06[_0x511b7b(0x2d7)]())>0x800)this['_done'][_0x511b7b(0x27c)]();return _0x1273db;}finally{this[_0x511b7b(0x326)]--;if(this[_0x511b7b(0x399)][_0x511b7b(0x263)]&&this[_0x511b7b(0x326)]<this[_0x511b7b(0x285)])this[_0x511b7b(0x399)][_0x511b7b(0x27c)]()();if(_0x5407c2)_0x5407c2[_0x511b7b(0x1fe)]();}const _0x45629f=this[_0x511b7b(0x24b)]['db'][_0x511b7b(0x348)](_0x39b82c);this[_0x511b7b(0x28f)][_0x511b7b(0x237)](_0x45629f),this[_0x511b7b(0x25e)]['set'](_0x45629f,_0x211ea2);const _0x4ca377=()=>{const _0x40e6bd=_0x511b7b;this[_0x40e6bd(0x28f)]['delete'](_0x45629f),this[_0x40e6bd(0x25e)][_0x40e6bd(0x2e7)](_0x45629f),this[_0x40e6bd(0x336)]++,this[_0x40e6bd(0x326)]--;this['_bpWaiters'][_0x40e6bd(0x263)]&&this[_0x40e6bd(0x326)]<this['_highWater']&&this[_0x40e6bd(0x399)][_0x40e6bd(0x27c)]()();if(this[_0x40e6bd(0x1ba)][_0x40e6bd(0x18a)](_0x345c06[_0x40e6bd(0x2d7)]()-_0x211ea2)>0x100)this[_0x40e6bd(0x1ba)][_0x40e6bd(0x27c)]();if(this[_0x40e6bd(0x250)][_0x40e6bd(0x18a)](_0x345c06[_0x40e6bd(0x2d7)]())>0x800)this[_0x40e6bd(0x250)][_0x40e6bd(0x27c)]();};_0x45629f[_0x511b7b(0x1ca)](_0x4ca377,_0x4ca377);try{return await _0x45629f;}finally{if(_0x5407c2)_0x5407c2[_0x511b7b(0x1fe)]();}}[_0x53757a(0x1e8)](){const _0x3d36f0=_0x53757a,_0x9dd0c6=_0x345c06['now']();let _0x3fddf0=0x0;for(const _0x578509 of this[_0x3d36f0(0x25e)][_0x3d36f0(0x1ed)]()){const _0x59d868=_0x9dd0c6-_0x578509;if(_0x59d868>_0x3fddf0)_0x3fddf0=_0x59d868;}let _0x4e31b1=0x0;for(let _0x1fc94e=this[_0x3d36f0(0x250)][_0x3d36f0(0x263)]-0x1;_0x1fc94e>=0x0;_0x1fc94e--){if(_0x9dd0c6-this['_done'][_0x1fc94e]>0x3e8)break;_0x4e31b1++;}let _0x5bd2ab=0x0;if(this[_0x3d36f0(0x1ba)][_0x3d36f0(0x263)]){const _0xb16e8e=[...this[_0x3d36f0(0x1ba)]][_0x3d36f0(0x26f)]((_0xcebcf9,_0x139770)=>_0xcebcf9-_0x139770);_0x5bd2ab=_0xb16e8e[Math['min'](_0xb16e8e[_0x3d36f0(0x263)]-0x1,Math[_0x3d36f0(0x2ce)](_0xb16e8e[_0x3d36f0(0x263)]*0.99))];}return{'depth':this[_0x3d36f0(0x28f)][_0x3d36f0(0x302)],'oldestPendingMs':Math[_0x3d36f0(0x35c)](_0x3fddf0),'committed':this['_committed'],'commitsPerSec':_0x4e31b1,'commitP99Ms':Math[_0x3d36f0(0x35c)](_0x5bd2ab),'parkedNow':this[_0x3d36f0(0x399)][_0x3d36f0(0x263)],'parkedTotal':this[_0x3d36f0(0x25a)],'highWater':this[_0x3d36f0(0x285)]};}['inflightAgesMs'](){const _0x1b60ee=_0x53757a,_0x96b665=_0x345c06['now']();return[...this[_0x1b60ee(0x25e)][_0x1b60ee(0x1ed)]()]['map'](_0x1b456c=>Math[_0x1b60ee(0x35c)](_0x96b665-_0x1b456c))['sort']((_0xb87e46,_0x383075)=>_0x383075-_0xb87e46);}[_0x53757a(0x214)](){const _0x227ea0=_0x53757a;this[_0x227ea0(0x2f6)]=!![];for(const _0x4818e9 of this[_0x227ea0(0x399)][_0x227ea0(0x24c)](0x0))_0x4818e9();}async[_0x53757a(0x2d2)](){const _0x2364fe=_0x53757a;let _0x1d0166=0x0;while(this[_0x2364fe(0x28f)][_0x2364fe(0x302)]&&_0x1d0166++<0x3e8){await Promise['allSettled']([...this['_inflight']]);}}async[_0x53757a(0x1fb)](_0x2a65b9,_0x40bef8,_0xef64ee,_0xd8cac1){const _0xbfe3b9=_0x53757a;return this[_0xbfe3b9(0x1e6)](()=>{const _0x5e0856=_0xbfe3b9;if(_0xd8cac1===undefined)_0x2a65b9[_0x5e0856(0x1c7)](_0x40bef8,_0xef64ee);else _0x2a65b9['putSync'](_0x40bef8,_0xef64ee,_0xd8cac1);},_0xbfe3b9(0x330));}async[_0x53757a(0x2cb)](_0x3b3147,_0x775f6a){const _0x31e34f=_0x53757a;return this['transaction'](()=>_0x3b3147['removeSync'](_0x775f6a),_0x31e34f(0x1d0));}}async function _0x597e63(_0x14e9db,_0x38a436){const _0x54dd53=_0x53757a;if(_0x38a436==null)_0x38a436=Math[_0x54dd53(0x284)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x423fac=_0x14e9db?.['flushed'];if(!_0x423fac||typeof _0x423fac[_0x54dd53(0x1ca)]!==_0x54dd53(0x296))return;await Promise[_0x54dd53(0x33c)]([Promise[_0x54dd53(0x261)](_0x423fac)[_0x54dd53(0x16f)](()=>{}),new Promise(_0x2a0456=>{const _0x576bcf=_0x54dd53,_0x3d79d4=setTimeout(_0x2a0456,_0x38a436);if(_0x3d79d4['unref'])_0x3d79d4[_0x576bcf(0x369)]();})]);}catch{}}function _0x446f8f(_0x34b4d5){const _0xcba820=_0x53757a;if(_0x4f5084)return Promise['resolve']();const _0x7abfcd=_0x34b4d5?.[_0xcba820(0x193)];return _0x7abfcd&&typeof _0x7abfcd['then']===_0xcba820(0x296)?_0x7abfcd:Promise[_0xcba820(0x261)]();}return okdbWriter['exports']=_0x1e03eb,okdbWriter[_0x53757a(0x292)][_0x53757a(0x19c)]=_0x597e63,okdbWriter[_0x53757a(0x292)][_0x53757a(0x193)]=_0x446f8f,okdbWriter[_0x53757a(0x292)][_0x53757a(0x18d)]=_0x4f5084,okdbWriter[_0x53757a(0x292)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x25c695=_0x6505f9;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x1737dc=require$$0$3,{SYNC_COMMITS:_0x78185a}=requireOkdbWriter(),_0x2e50f5=_0x25c695(0x30b);class _0x46e309{constructor(_0x197cbd,_0x50035e,_0x235c3b){const _0x3f3c5f=_0x25c695;this[_0x3f3c5f(0x267)]=_0x197cbd,this['_key']=_0x50035e,this[_0x3f3c5f(0x371)]=_0x235c3b,this[_0x3f3c5f(0x169)]=![],this[_0x3f3c5f(0x257)]=null,this[_0x3f3c5f(0x2f1)]=null;}[_0x25c695(0x226)](){const _0x36cd7c=_0x25c695;if(this[_0x36cd7c(0x169)])return![];try{const _0x5ea32e=this[_0x36cd7c(0x267)][_0x36cd7c(0x1e7)]()[_0x36cd7c(0x36d)](this[_0x36cd7c(0x2f8)]);if(!_0x5ea32e||_0x5ea32e[_0x36cd7c(0x182)]!==this['_acquiredAt'])return![];const _0x4f04c2=_0x5ea32e[_0x36cd7c(0x1f8)]??_0x5ea32e[_0x36cd7c(0x182)];if(_0x4f04c2+_0x5ea32e[_0x36cd7c(0x301)]<Date['now']())return![];return!![];}catch{return!this[_0x36cd7c(0x169)];}}[_0x25c695(0x1b0)](){const _0x215f30=_0x25c695;if(this[_0x215f30(0x169)])return null;try{return this['_lock'][_0x215f30(0x1e7)]()[_0x215f30(0x36d)](this[_0x215f30(0x2f8)])??null;}catch{return null;}}async[_0x25c695(0x21f)](_0x29398e){const _0x1162e3=_0x25c695;if(this[_0x1162e3(0x169)])return;try{const _0x1ea7e7=this[_0x1162e3(0x267)][_0x1162e3(0x1e7)]()['get'](this[_0x1162e3(0x2f8)]);if(!_0x1ea7e7||_0x1ea7e7[_0x1162e3(0x182)]!==this[_0x1162e3(0x371)])return;if(_0x78185a)this[_0x1162e3(0x267)][_0x1162e3(0x1e7)]()[_0x1162e3(0x1c7)](this['_key'],{..._0x1ea7e7,'ttlMs':_0x1ea7e7[_0x1162e3(0x301)]+_0x29398e});else await this[_0x1162e3(0x267)][_0x1162e3(0x1e7)]()[_0x1162e3(0x1fb)](this['_key'],{..._0x1ea7e7,'ttlMs':_0x1ea7e7[_0x1162e3(0x301)]+_0x29398e});}catch{}}async[_0x25c695(0x357)](){const _0x3b7290=_0x25c695;if(this[_0x3b7290(0x169)])return;if(this[_0x3b7290(0x2f1)])try{await this[_0x3b7290(0x2f1)];}catch{}clearInterval(this['_heartbeatTimer']),this[_0x3b7290(0x257)]=null,this[_0x3b7290(0x169)]=!![];try{const _0x5c4aca=this[_0x3b7290(0x267)]['_db']()[_0x3b7290(0x36d)](this[_0x3b7290(0x2f8)]);if(_0x5c4aca&&_0x5c4aca[_0x3b7290(0x182)]===this['_acquiredAt']){if(_0x78185a)this['_lock'][_0x3b7290(0x1e7)]()['removeSync'](this[_0x3b7290(0x2f8)]);else await this['_lock'][_0x3b7290(0x1e7)]()['remove'](this[_0x3b7290(0x2f8)]);}}catch{}}['_startHeartbeat'](_0x15424c,_0x32d61c){const _0x494cdb=_0x25c695,_0x4f3dd6=_0x32d61c??Math[_0x494cdb(0x2ce)](_0x15424c/0x3);this[_0x494cdb(0x257)]=setInterval(()=>{const _0x5ef7a2=_0x494cdb;if(this[_0x5ef7a2(0x169)])return;this[_0x5ef7a2(0x2f1)]=((async()=>{const _0x3edb66=_0x5ef7a2;try{const _0x20f060=this['_lock'][_0x3edb66(0x1e7)]()[_0x3edb66(0x36d)](this['_key']);if(!_0x20f060||_0x20f060[_0x3edb66(0x182)]!==this[_0x3edb66(0x371)]){this[_0x3edb66(0x169)]=!![],clearInterval(this[_0x3edb66(0x257)]),this[_0x3edb66(0x257)]=null;return;}if(_0x78185a)this[_0x3edb66(0x267)]['_db']()[_0x3edb66(0x1c7)](this[_0x3edb66(0x2f8)],{..._0x20f060,'updatedAt':Date[_0x3edb66(0x2d7)]()});else await this[_0x3edb66(0x267)][_0x3edb66(0x1e7)]()[_0x3edb66(0x1fb)](this[_0x3edb66(0x2f8)],{..._0x20f060,'updatedAt':Date[_0x3edb66(0x2d7)]()});}catch{}this[_0x3edb66(0x2f1)]=null;})());},_0x4f3dd6);if(this['_heartbeatTimer'][_0x494cdb(0x369)])this[_0x494cdb(0x257)][_0x494cdb(0x369)]();}}class _0x467cf7{constructor(_0x408260,{namespace:_0x57b638,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x2412e9=_0x25c695;this[_0x2412e9(0x374)]=_0x408260,this[_0x2412e9(0x2de)]=_0x57b638,this[_0x2412e9(0x301)]=ttlMs,this[_0x2412e9(0x279)]=heartbeatMs,this[_0x2412e9(0x2a6)]=null;}['_db'](){const _0x975fcf=_0x25c695;return!this[_0x975fcf(0x2a6)]&&(this[_0x975fcf(0x2a6)]=this[_0x975fcf(0x374)][_0x975fcf(0x309)](_0x2e50f5,{'dupSort':![]})),this[_0x975fcf(0x2a6)];}[_0x25c695(0x362)](){const _0x38b93c=_0x25c695;return!this[_0x38b93c(0x304)]&&(this[_0x38b93c(0x304)]=this['_rawDb'][_0x38b93c(0x309)](_0x2e50f5+_0x38b93c(0x2f0),{'dupSort':![]})),this[_0x38b93c(0x304)];}['_key'](_0x2f07c5){const _0x4bf842=_0x25c695;return this[_0x4bf842(0x2de)]+':'+_0x2f07c5;}['signalWant'](_0xb6d118){const _0x28afb5=_0x25c695;try{_0x78185a?this[_0x28afb5(0x362)]()[_0x28afb5(0x1c7)](this[_0x28afb5(0x2f8)](_0xb6d118),Date[_0x28afb5(0x2d7)]()):this[_0x28afb5(0x362)]()[_0x28afb5(0x1fb)](this[_0x28afb5(0x2f8)](_0xb6d118),Date[_0x28afb5(0x2d7)]())?.['catch']?.(()=>{});}catch{}}[_0x25c695(0x328)](_0x1bee2e,_0x305d5a=0x3e8){const _0x4153f3=_0x25c695;try{const _0x4b09aa=this[_0x4153f3(0x362)]()[_0x4153f3(0x36d)](this[_0x4153f3(0x2f8)](_0x1bee2e));return typeof _0x4b09aa==='number'&&Date[_0x4153f3(0x2d7)]()-_0x4b09aa<_0x305d5a;}catch{return![];}}[_0x25c695(0x1a0)](_0x2b7680){const _0x57ce3e=_0x25c695,_0x400fac=_0x2b7680[_0x57ce3e(0x1f8)]??_0x2b7680[_0x57ce3e(0x182)];return _0x400fac+_0x2b7680[_0x57ce3e(0x301)]<Date[_0x57ce3e(0x2d7)]();}static[_0x25c695(0x1a3)](_0x4d4e2f){const _0x510daf=_0x25c695,_0x60f8c2=_0x4d4e2f?.[_0x510daf(0x1b0)];if(!_0x60f8c2||typeof _0x60f8c2[_0x510daf(0x322)]!=='number')return![];if(_0x60f8c2[_0x510daf(0x21a)]!==_0x1737dc[_0x510daf(0x21a)]())return![];if(_0x60f8c2[_0x510daf(0x322)]===process[_0x510daf(0x322)])return![];try{return process['kill'](_0x60f8c2[_0x510daf(0x322)],0x0),![];}catch(_0x32c54e){return _0x32c54e['code']==='ESRCH';}}async[_0x25c695(0x2b4)](_0x5ab5a0,_0xf1ea16={},_0xa0450={}){const _0x1a8d12=_0x25c695,_0x2d136b=this['_key'](_0x5ab5a0),_0x1dfb06=_0xa0450[_0x1a8d12(0x301)]??this[_0x1a8d12(0x301)],_0x1de8c8=Date[_0x1a8d12(0x2d7)](),_0x4bb02f={'holder':{'pid':process[_0x1a8d12(0x322)],'hostname':_0x1737dc[_0x1a8d12(0x21a)](),..._0xf1ea16},'acquiredAt':_0x1de8c8,'updatedAt':_0x1de8c8,'ttlMs':_0x1dfb06};let _0x3c5f7f=![],_0x54c4d5=null;try{const _0x4291d5=()=>{const _0x568555=_0x1a8d12,_0x1423b1=this['_db']()[_0x568555(0x36d)](_0x2d136b);if(_0x1423b1&&!this['_isStale'](_0x1423b1)&&!_0x467cf7[_0x568555(0x1a3)](_0x1423b1)){const _0x3d2503=_0xf1ea16[_0x568555(0x29a)]!=null&&_0x1423b1[_0x568555(0x1b0)][_0x568555(0x322)]===process[_0x568555(0x322)]&&_0x1423b1[_0x568555(0x1b0)][_0x568555(0x29a)]===_0xf1ea16[_0x568555(0x29a)];if(!_0x3d2503){_0x3c5f7f=![],_0x54c4d5=_0x1423b1;return;}_0x4bb02f['acquiredAt']<=_0x1423b1[_0x568555(0x182)]&&(_0x4bb02f['acquiredAt']=_0x1423b1[_0x568555(0x182)]+0x1,_0x4bb02f[_0x568555(0x1f8)]=_0x4bb02f[_0x568555(0x182)]);}this['_db']()['put'](_0x2d136b,_0x4bb02f),_0x3c5f7f=!![],_0x54c4d5=_0x4bb02f;};if(_0x78185a)this[_0x1a8d12(0x1e7)]()[_0x1a8d12(0x271)](_0x4291d5);else await this[_0x1a8d12(0x1e7)]()[_0x1a8d12(0x348)](_0x4291d5);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x3c5f7f)return{'acquired':![],'handle':null,'current':_0x54c4d5};const _0x526381=new _0x46e309(this,_0x2d136b,_0x4bb02f[_0x1a8d12(0x182)]);return _0x526381['_startHeartbeat'](_0x1dfb06,this[_0x1a8d12(0x279)]),{'acquired':!![],'handle':_0x526381,'current':_0x54c4d5};}['inspect'](_0x163b7){const _0x64a4d7=_0x25c695;try{return this[_0x64a4d7(0x1e7)]()[_0x64a4d7(0x36d)](this[_0x64a4d7(0x2f8)](_0x163b7))??null;}catch{return null;}}[_0x25c695(0x388)](){const _0x12d187=_0x25c695,_0x2a9af2=this['namespace']+':',_0x1ff92e=[];try{for(const {key:_0x19994f,value:_0x53b1ad}of this[_0x12d187(0x1e7)]()['getRange']({'start':_0x2a9af2,'end':_0x2a9af2+'ÿ'})){typeof _0x19994f===_0x12d187(0x256)&&_0x19994f['startsWith'](_0x2a9af2)&&_0x1ff92e[_0x12d187(0x18a)]({'id':_0x19994f[_0x12d187(0x280)](_0x2a9af2[_0x12d187(0x263)]),'entry':_0x53b1ad});}}catch{}return _0x1ff92e;}static[_0x25c695(0x27d)](_0x6e79cc){const _0x109fa7=_0x25c695,_0x5cc523=[];try{const _0x4d1b7b=_0x6e79cc['openDB'](_0x2e50f5,{'dupSort':![]});for(const {key:_0x27a019,value:_0x24e754}of _0x4d1b7b['getRange']({})){if(typeof _0x27a019!==_0x109fa7(0x256))continue;const _0x4082de=_0x27a019[_0x109fa7(0x2ac)](':');if(_0x4082de<0x1)continue;_0x5cc523[_0x109fa7(0x18a)]({'namespace':_0x27a019[_0x109fa7(0x280)](0x0,_0x4082de),'id':_0x27a019['slice'](_0x4082de+0x1),'entry':_0x24e754});}}catch{}return _0x5cc523;}}return okdbLock={'OKDBLock':_0x467cf7},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function _0x2029(){const _0x4b17bd=['\x20\x20env=','fanout','ttlMs','size','seq','_wantDbHandle','stopHeartbeat','liveThreadStats','warn','instances','openDB','none','~lock','_nodeDead','_listenAddr','has','off','_sampleOwnStats','cluster','\x20parkedNow=','repeat','ttl:set','ppid','listening','execArgv','rss','ref:violation',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','--inspect','ingest','system:bus_state_change','node','1101295iELFLt','workersConfigured','heapUsed','pid','find','_threadStats','events','_outstanding','1294701reFPfz','isWanted','dropType','bus:drain','_buildOwnRow','decommission','_processStartedAt','(code=','SYSTEM_PROC','raw-put','dropping','commitP99Ms','detachConsole','unique:violation_resolved','number','_committed','event','label','assign','functions','ttl:clear','race','msg','txn:rollback','listDesired','_selfKey','beforeWrite','confirm','draining','includes','value','deregisterSelf','_activateProcesses','childTransaction','VIEW_PROGRESS','epoch','object','--watch','meta','processKey','cpus','ms/','name','cli','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','caps','join','emit','release','depth','keys','_drain','consecutiveFailures','round','FTS_REGISTERED','node:events','resetReadTxn','~processes','_lastCpuPct','_wantDb','perf_hooks','win32','processor:ready','_coordinator','\x0a\x20\x20\x20\x20\x20\x20','[okdb-cluster]\x20respawning\x20worker\x20slot=','unref','sandbox','setTtl','fts:reset','get','entry','nodeKey','_clusterOrphanWatch','_acquiredAt','__okdbSlot','_singletonLock','_rawDb','supervisorKey','removeNode','SIGKILL','isDead','rows=','unclaimed','set','_enableChangelog','ITEM_REMOVE','_lastCpuAt','_sandbox','_maybePublish','_buckets','data','_caps','procmodeack/','index:progress','attach','http\x20worker\x20child\x20failed:\x20','list','_draining','starting','processingStatusView','[okdb-cluster]\x20worker\x20pid=','ms\x20(attempt\x20','async','log','item:update','open','count','setDesired','path','firstTs','selfKey','stderr','_cursors','_bpWaiters','_nodeDbFor','cursorKey','oldestPendingMs','_markSeen','--eval','setOwnMeta','hasOwnProperty','_released','reset','dropSchema','uncaughtException','uptime','_adminRelay','catch','_report','stack','singletonClaims','randomUUID','\x20(slot=','exit','okdb-writer:\x20env\x20closing\x20—\x20retry','_writer','ttl:expired','updateSupervisedChildStats','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','SYSTEM_STOPPED','system:drain','maxExtra','running','removeSupervisedChild','fn-runner','freeze','acquiredAt','stats','\x20drainAge=','slotKey','_flushTimer','_publishNow','prependListener','_nodeDb','push','processors','setSchema','SYNC_COMMITS','fts:registered','primary','entries','expiresAt','toISOString','committed','_onTick','register','threads','commitsPerSec','message','_collectSingletonClaims','_started','\x20sync','flushLmdb','_removeRowAsync','version','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','_isStale','txn:start','note','_holderDead','dead','_nodeDbCache','_isReader','_children','\x20worker(s)\x20remaining','.log','host','_hbTimer','_handleInProcess','startedAt','_isWriter','dedupeMax','holder','maxMs','mode','system','cpuWindowMs','kind','getClock','claimGated','inst:','type','_durs','ORPHAN\x20(env-closed\x20write)','http-server','split','abs','feed:','_dedupeMax','_log','removeSync','_pending','putNode','processor:paused','setupPrimary','putSync','unhandledRejection','sync:apply','then','env:opened','_drainOne','\x20ipc\x20error:\x20','decommissioning','ITEM_CREATE','raw-remove','INDEX_READY','publishOwnRow','attachFeed','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','[okdb-cluster]\x20','start','mkdirSync','bus:proc','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','isActive','kill','system:type_drop','isWorker','flushDebounce','writerStatus','ms\x20mean=','_desiredOverlay','registerIndex','replace','nodesView','_putRowAsync','transaction','_db','status','ref:violation_resolved','_quantum','lifecycle','fromEntries','values','_admissionStarted','copy','bus:env_release','\x20phase=','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','view:progress','online','_flushDebounce','INDEX_RESET','worker','updatedAt','registerType','FTS_RESET','put','\x20│\x20','single','afterWrite','processing','license:activated','getDesired','_changefeed','code','sync','offWindow','_onItem','parkedNow','getCmd','__vocab/version','_ensureDesired','external','okdb-diag.','_groupByProcess','CHANGEFEED_QUANTUM','error','index:drop','registry\x20publish\x20failing:\x20','index:reset','memoryUsage','markClosed','264445pYSzoT','ENV_CLOSING_RETRY','parse','_rowKey','_baselines','hostname','listNodes','_scheduleFlush','--test','\x20times\x20in\x20','extend','disconnect','cluster-wide','startHeartbeat','listenAddr','children','clear','isHeld','\x20\x20(no\x20env\x20draining)','noteListenAddr','system:proc','processor','ms\x20p99=','state','test','isEnabled','processorsView','true','\x20writer{depth=','pushEphemeral','close','compact','_admissionTimer','addSupervisedChild','add','--print','type:registered','resetting','SWAP','runtimeProcessesView','percentile','filter','cluster:','\x20HTTP\x20server(s)\x20on\x20port\x20','FTS_DROP','_buildProcessingFacet','stop','_statusEnv','_refreshDesiredSnapshot','_onStop','[okdb-cluster]\x20slot=','okdb','prototype','ms\x20on\x20env=','env','splice','engines','isConnected','SYSTEM_POKE','_done','enabled','reap','isPrimary','ITEM_UPDATE','procmode/','string','_heartbeatTimer','loop-lag\x20','_lastPublishAt','_bpParkedTotal','level','next','cpuUsage','_enqueuedAt','info','\x20died\x20','resolve','default','length','resetIndex','_onProcEvent','reportThreadStats','_lock','processor:progress','_dedupeKey','crypto','_participate','20958BgtJnJ','options','recordWrite','sort','_instanceId','transactionSync','_lastCpuWindowMs','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','2272BFeyia','node:perf_hooks','stringify','process','started','heartbeatMs','getProcess','ready','shift','listAll','allSettled','publishChildRow','slice','ms\x20activeWriters=','instanceId','4meXQfe','max','_highWater','license:invalid','deaths','_migrateVocab','INDEX_PROGRESS','\x20worker\x20slot=','halted','_openEnvLazy','bumpCmd','embedded','_inflight','\x20(durable\x20desired-state)','toFixed','exports','enable','_rootDb','waiting','function','_startedAt','\x20oldestPendingMs=','_envs','processorId','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','write','\x20statusEnv=','building','processor:error','quantum','processor:retry','\x20in\x20','listen','processes','2086014ROXyxs','_lockDb','node/','busy','_onPoke','_seen','ESRCH','indexOf','bus:type_drop','_collectWriterFacet','fts:drop','trim','disable','registry-publish','processor:resumed','tryAcquire','hasDesired','startsWith','_handlePoke','createEnvironment','_ownMeta','from','map','./okdb','_lastCpuUsage','slot','5939292jGLRPy','unique:violation','item:remove','_systemEnv','\x0a===\x20OKDB_DIAG\x20',')\x20exited\x20','_startAdmission','_singletonLocks','user','view','registerFts','_putRowSync','remove','\x20pid=','getRange','floor','commit','index:ready','error:\x20','drain','REMOVE','http','system:poke','item:create','now','min','_buildChildRow','role','created','load','heapTotal','namespace',',\x20signal=','_clusterWorkerAttached','_timer','connected','resetFts','~processes:cmd','claims','reduce','delete','dumpedAt','respawnTimer','_windowCbs','_publishFailWarned','26879544rYxgCX','_cmd','once','appendFileSync',':want','_heartbeatInFlight','_desired','bus:poke','compaction','killable','_closed','tierList','_key','send','participate','_supervisorKey','type:drop','dropIndex','_kind'];_0x2029=function(){return _0x4b17bd;};return _0x2029();}function requireOkdbProcessRegistry(){const _0x2ac2f1=_0x6505f9;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x5630bb=require$$0$3,_0x520439=require$$1$1,_0x3b56bd=require$$2,{LOOP:_0x4a856d}=requireOkdbLoopMonitor(),{OKDBLock:_0x1803c0}=requireOkdbLock(),{SYNC_COMMITS:_0x5805ea}=requireOkdbWriter(),_0x740393=_0x2ac2f1(0x360),_0x356b61=_0x2ac2f1(0x31e),_0x4d8e2d='~processes:desired',_0x2f768e=_0x2ac2f1(0x2e4),_0x3e0005=(_0x1d6b82,_0x536685)=>_0x1d6b82+':'+_0x536685,_0x4b609f=(_0x1a7279,_0x3b0b47)=>_0x1a7279+'::'+_0x3b0b47,_0x311e67=(_0x210f13,_0x41b276)=>_0x210f13+'/'+_0x41b276,_0x33fae2=(_0x3a11f7,_0x18d952)=>_0x3a11f7+'#'+_0x18d952,_0x14bad7=_0x5ce7dc=>{const _0x55dfad=_0x2ac2f1;if(_0x5ce7dc?.[_0x55dfad(0x34e)])return _0x5ce7dc[_0x55dfad(0x34e)];const _0xfaa8f0=_0x5ce7dc?.[_0x55dfad(0x36f)];return typeof _0xfaa8f0===_0x55dfad(0x256)&&_0xfaa8f0[_0x55dfad(0x344)]('#')?_0xfaa8f0[_0x55dfad(0x280)](0x0,_0xfaa8f0[_0x55dfad(0x2ac)]('#')):_0xfaa8f0;},_0x5d5cc2=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x28ab7d=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4e288c=_0x5d5cc2*0x3,_0x4d54d3=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x4e288c*0x14),_0x5ca496=[_0x2ac2f1(0x268),_0x2ac2f1(0x365),'processor:retry','processor:error',_0x2ac2f1(0x1c5),_0x2ac2f1(0x2b3)];let _0x55f677=null;function _0x311318(){const _0x513f3a=_0x2ac2f1;if(_0x55f677==null)_0x55f677=Math[_0x513f3a(0x35c)]((Date[_0x513f3a(0x2d7)]()-process[_0x513f3a(0x16d)]()*0x3e8)/0x3e8)*0x3e8;return _0x55f677;}function _0x185644(_0x59834a){const _0x3b3f35=_0x2ac2f1;if(process.env.OKDB_PROCESS_KILL===_0x3b3f35(0x30f))return![];if(_0x59834a?.[_0x3b3f35(0x26d)]?.[_0x3b3f35(0x2a4)]&&typeof _0x59834a[_0x3b3f35(0x26d)]['processes']===_0x3b3f35(0x34b)&&_0x59834a[_0x3b3f35(0x26d)][_0x3b3f35(0x2a4)][_0x3b3f35(0x1db)]===![])return![];return!![];}function _0x1a62d3(_0x588a8a,_0x1906fa){const _0x379081=_0x2ac2f1,_0x5cb79f=!!_0x1906fa?.[_0x379081(0x18b)];switch(_0x588a8a){case _0x379081(0x18f):return{'controllable':_0x5cb79f,'decommissionable':![],'killable':!![],'killConfirm':_0x379081(0x221)};case _0x379081(0x352):case'standalone':return{'controllable':_0x5cb79f,'decommissionable':![],'killable':!![],'killConfirm':_0x379081(0x342)};case _0x379081(0x28e):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x379081(0x1bc):case'queue-worker':case _0x379081(0x180):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x53a352{constructor(_0x59c872){const _0x5b7ac3=_0x2ac2f1;this[_0x5b7ac3(0x248)]=_0x59c872,this[_0x5b7ac3(0x244)]=null,this['_desired']=null,this[_0x5b7ac3(0x1e1)]=new Map(),this[_0x5b7ac3(0x2ed)]=null,this[_0x5b7ac3(0x1ae)]=![],this[_0x5b7ac3(0x1a6)]=![],this['_processStartedAt']=_0x311318(),this[_0x5b7ac3(0x340)]=_0x3e0005(process['pid'],this[_0x5b7ac3(0x32d)]),this[_0x5b7ac3(0x270)]=_0x3b56bd[_0x5b7ac3(0x173)]()[_0x5b7ac3(0x280)](0x0,0x8),this[_0x5b7ac3(0x218)]=_0x33fae2(this[_0x5b7ac3(0x340)],this[_0x5b7ac3(0x270)]),this[_0x5b7ac3(0x297)]=Date[_0x5b7ac3(0x2d7)](),this[_0x5b7ac3(0x2fe)]=null,this[_0x5b7ac3(0x2fb)]=null,this[_0x5b7ac3(0x30d)]=null,this[_0x5b7ac3(0x1ab)]=null,this[_0x5b7ac3(0x265)]=null,this[_0x5b7ac3(0x194)]=null,this[_0x5b7ac3(0x259)]=0x0,this['_ownMeta']={},this['_children']=new Map(),this[_0x5b7ac3(0x2bd)]=process[_0x5b7ac3(0x25d)](),this[_0x5b7ac3(0x37e)]=Date[_0x5b7ac3(0x2d7)](),this['_lastCpuPct']=0x0,this[_0x5b7ac3(0x324)]=new Map();}get['selfKey'](){const _0xecd4f7=_0x2ac2f1;return this[_0xecd4f7(0x340)];}get['rowKey'](){const _0x2d9806=_0x2ac2f1;return this[_0x2d9806(0x218)];}['_caps'](_0x25feab,_0x2a3900){const _0x565e43=_0x2ac2f1,_0x3cc1c1=_0x1a62d3(_0x25feab,_0x2a3900);if(_0x3cc1c1[_0x565e43(0x2f5)]&&!_0x185644(this['okdb']))return{..._0x3cc1c1,'killable':![],'killConfirm':undefined};return _0x3cc1c1;}[_0x2ac2f1(0x1da)](){const _0xc19621=_0x2ac2f1;return!!this[_0xc19621(0x244)];}[_0x2ac2f1(0x167)](_0x5809fc){const _0x50ccd9=_0x2ac2f1;Object[_0x50ccd9(0x339)](this['_ownMeta'],_0x5809fc||{});}[_0x2ac2f1(0x228)](_0x209798){const _0x35cc2c=_0x2ac2f1;if(_0x209798)this[_0x35cc2c(0x30d)]=_0x209798;}[_0x2ac2f1(0x195)](_0x3da04c={}){const _0x25e8fe=_0x2ac2f1;return this['okdb'][_0x25e8fe(0x347)](_0x3da04c);}[_0x2ac2f1(0x38b)](){const _0x1130ae=_0x2ac2f1,_0x396035={};let _0x41dbcf=0x0,_0x4d31f5=0x0;const _0x93993=new Set();for(const _0x1d4b45 of this[_0x1130ae(0x21b)]()){_0x4d31f5++;const _0x47f1ae=_0x1d4b45[_0x1130ae(0x1ff)];if(!_0x47f1ae)continue;if(_0x47f1ae[_0x1130ae(0x2fa)])_0x41dbcf++;for(const _0x4dc1a6 of _0x47f1ae[_0x1130ae(0x18b)]||[]){if(![_0x1130ae(0x1fd),_0x1130ae(0x300)]['includes'](_0x4dc1a6[_0x1130ae(0x1b2)]))continue;(_0x4dc1a6[_0x1130ae(0x22c)]===_0x1130ae(0x1f4)||_0x4dc1a6[_0x1130ae(0x22c)]===_0x1130ae(0x29e))&&_0x4dc1a6[_0x1130ae(0x39b)]&&_0x93993[_0x1130ae(0x237)]((_0x4dc1a6['env']||_0x1130ae(0x262))+':'+_0x4dc1a6[_0x1130ae(0x39b)]);const _0x16c156=_0x4dc1a6[_0x1130ae(0x24b)]||'default';(_0x396035[_0x16c156]||=[])[_0x1130ae(0x18a)]({..._0x4dc1a6,'env':_0x16c156,'owner':{'pid':_0x1d4b45[_0x1130ae(0x322)]??null,'kind':_0x1d4b45[_0x1130ae(0x1b5)]??null}});}}for(const [_0x398b13,_0x33af54]of Object[_0x1130ae(0x190)](_0x396035)){for(const _0x540393 of _0x33af54){if(_0x540393['mode']===_0x1130ae(0x1fd)&&!_0x540393[_0x1130ae(0x1b7)]){const _0x49f95d=_0x398b13+':'+(_0x540393[_0x1130ae(0x39b)]??'');if(!_0x93993[_0x1130ae(0x30e)](_0x49f95d))_0x540393[_0x1130ae(0x37a)]=!![];}}}return{'envs':_0x396035,'policy':null,'participation':{'participating':_0x41dbcf,'total':_0x4d31f5},'source':'workers'};}[_0x2ac2f1(0x22f)](){const _0x420163=_0x2ac2f1,_0x4aa7d8=_0x754b32=>{const _0x512bfb=_0x53b1;if(_0x754b32[_0x512bfb(0x22c)]==='online'||_0x754b32['state']===_0x512bfb(0x29e)||_0x754b32['state']===_0x512bfb(0x20f))return 0x3;if(_0x754b32[_0x512bfb(0x1b7)])return 0x1;return 0x2;},_0x350eab=new Map();for(const _0x9f0de3 of this['listNodes']()){for(const _0x2a0f53 of _0x9f0de3[_0x420163(0x1ff)]?.[_0x420163(0x18b)]||[]){const _0x52e8a5={..._0x2a0f53,'owner':{'pid':_0x9f0de3[_0x420163(0x322)]??null,'kind':_0x9f0de3['kind']??null,'host':_0x9f0de3['host']??null}},_0x19c51c=_0x2a0f53['mode']==='single'?'1ofN:'+(_0x2a0f53[_0x420163(0x24b)]??'')+'::'+(_0x2a0f53[_0x420163(0x39b)]??_0x2a0f53[_0x420163(0x1b9)]??_0x2a0f53['id']):_0x420163(0x1b8)+(_0x9f0de3['nodeKey']??_0x9f0de3[_0x420163(0x34e)]??'')+'::'+(_0x2a0f53['env']??'')+'::'+_0x2a0f53['id'],_0x1d017c=_0x350eab[_0x420163(0x36d)](_0x19c51c);if(!_0x1d017c||_0x4aa7d8(_0x52e8a5)>_0x4aa7d8(_0x1d017c))_0x350eab['set'](_0x19c51c,_0x52e8a5);}}return[..._0x350eab[_0x420163(0x1ed)]()];}['clusterStatusView'](){const _0x43d473=_0x2ac2f1,_0x580071=Date['now'](),_0x17d24c=this[_0x43d473(0x21b)](),_0x18167d=_0x22a856=>Math[_0x43d473(0x284)](0x0,Math[_0x43d473(0x35c)]((_0x580071-(_0x22a856[_0x43d473(0x1ad)]||_0x580071))/0x3e8)),_0x27995a=_0x17d24c['find'](_0x11165e=>_0x11165e[_0x43d473(0x1b5)]==='primary'),_0x236c5d=_0x17d24c[_0x43d473(0x23e)](_0x930aab=>_0x930aab[_0x43d473(0x1b5)]===_0x43d473(0x1bc));if(_0x27995a||_0x236c5d['length'])return{'primary':_0x27995a?{'pid':_0x27995a[_0x43d473(0x322)],'uptime':_0x18167d(_0x27995a)}:null,'workers':_0x236c5d[_0x43d473(0x2bb)](_0x158b33=>({'pid':_0x158b33[_0x43d473(0x322)],'uptime':_0x18167d(_0x158b33)})),'workersConfigured':_0x27995a?.['meta']?.[_0x43d473(0x320)]??_0x236c5d[_0x43d473(0x263)],'mode':_0x43d473(0x311)};const _0x2bbcb5=_0x17d24c[_0x43d473(0x323)](_0x38eeed=>_0x38eeed['kind']===_0x43d473(0x352)||_0x38eeed[_0x43d473(0x1b5)]==='standalone'||_0x38eeed[_0x43d473(0x1b5)]==='embedded'),_0x8f41bb=_0x2bbcb5?{'pid':_0x2bbcb5[_0x43d473(0x322)],'uptime':_0x18167d(_0x2bbcb5)}:{'pid':process['pid'],'uptime':Math[_0x43d473(0x284)](0x0,Math[_0x43d473(0x35c)](process['uptime']()))};return{'primary':_0x8f41bb,'workers':[_0x8f41bb],'workersConfigured':0x1,'mode':'single'};}[_0x2ac2f1(0x1e4)](){const _0x23252c=_0x2ac2f1;return this[_0x23252c(0x20d)]();}['treeView'](){const _0x359dd3=_0x2ac2f1,_0x2c3e11=new Map();for(const _0x3216d2 of this[_0x359dd3(0x20d)]())_0x2c3e11[_0x359dd3(0x37b)](_0x3216d2[_0x359dd3(0x34e)],{..._0x3216d2,'children':[]});const _0x3a849f=[];for(const _0xee960e of _0x2c3e11['values']()){const _0x106426=_0xee960e['supervisorKey']?_0x2c3e11[_0x359dd3(0x36d)](_0xee960e[_0x359dd3(0x375)]):null;if(_0x106426&&_0x106426!==_0xee960e)_0x106426[_0x359dd3(0x224)][_0x359dd3(0x18a)](_0xee960e);else _0x3a849f[_0x359dd3(0x18a)](_0xee960e);}const _0x2ab3f2=(_0x520819,_0x2e6960)=>_0x520819['kind']===_0x2e6960['kind']?(_0x520819[_0x359dd3(0x322)]||0x0)-(_0x2e6960[_0x359dd3(0x322)]||0x0):(_0x520819[_0x359dd3(0x1b5)]??'')<(_0x2e6960[_0x359dd3(0x1b5)]??'')?-0x1:0x1,_0x16e5da=_0x3e33ee=>{const _0x5ac873=_0x359dd3;_0x3e33ee[_0x5ac873(0x26f)](_0x2ab3f2);for(const _0x2e5851 of _0x3e33ee)if(_0x2e5851['children']['length'])_0x16e5da(_0x2e5851[_0x5ac873(0x224)]);};return _0x16e5da(_0x3a849f),_0x3a849f;}[_0x2ac2f1(0x27a)](_0x22c69f){const _0x27c1cd=_0x2ac2f1;return this[_0x27c1cd(0x20d)]()[_0x27c1cd(0x323)](_0x1cde17=>_0x1cde17['processKey']===_0x22c69f)??null;}[_0x2ac2f1(0x20d)](_0x26eadc=Date[_0x2ac2f1(0x2d7)]()){const _0x381959=_0x2ac2f1,_0x454782=new Map();for(const _0x47370a of this[_0x381959(0x21b)]()){const _0x4ce46f=_0x14bad7(_0x47370a);let _0x1775e0=_0x454782[_0x381959(0x36d)](_0x4ce46f);!_0x1775e0&&(_0x1775e0={'processKey':_0x4ce46f,'nodeKey':_0x4ce46f,'pid':_0x47370a[_0x381959(0x322)],'ppid':_0x47370a[_0x381959(0x315)]??null,'host':_0x47370a[_0x381959(0x1aa)]??null,'kind':_0x47370a['kind'],'role':null,'supervisorKey':_0x47370a[_0x381959(0x375)]??null,'slot':_0x47370a['slot']??null,'slotKey':_0x47370a[_0x381959(0x185)]??null,'caps':_0x47370a[_0x381959(0x354)]??null,'lifecycle':_0x47370a[_0x381959(0x1eb)]??null,'uptime':Math[_0x381959(0x284)](0x0,Math[_0x381959(0x35c)]((_0x26eadc-(_0x47370a[_0x381959(0x1ad)]||_0x26eadc))/0x3e8)),'startedAt':_0x47370a[_0x381959(0x1ad)]??null,'meta':_0x47370a[_0x381959(0x34d)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x454782[_0x381959(0x37b)](_0x4ce46f,_0x1775e0));_0x1775e0[_0x381959(0x308)][_0x381959(0x18a)]({'instanceId':_0x47370a[_0x381959(0x282)]??null,'role':_0x47370a[_0x381959(0x2da)]??null,'listenAddr':_0x47370a[_0x381959(0x223)]??null,'lifecycle':_0x47370a[_0x381959(0x1eb)]??null,'processing':_0x47370a[_0x381959(0x1ff)]??null});if(!_0x1775e0[_0x381959(0x2da)]&&_0x47370a[_0x381959(0x2da)])_0x1775e0[_0x381959(0x2da)]=_0x47370a[_0x381959(0x2da)];if(!_0x1775e0['listenAddr']&&_0x47370a['listenAddr'])_0x1775e0[_0x381959(0x223)]=_0x47370a[_0x381959(0x223)];if(!_0x1775e0['processing']&&_0x47370a[_0x381959(0x1ff)])_0x1775e0[_0x381959(0x1ff)]=_0x47370a[_0x381959(0x1ff)];if(!_0x1775e0['engines']&&_0x47370a['engines'])_0x1775e0[_0x381959(0x24d)]=_0x47370a[_0x381959(0x24d)];if(!_0x1775e0[_0x381959(0x172)]&&_0x47370a[_0x381959(0x172)])_0x1775e0[_0x381959(0x172)]=_0x47370a[_0x381959(0x172)];if(_0x1775e0[_0x381959(0x354)]==null&&_0x47370a[_0x381959(0x354)])_0x1775e0['caps']=_0x47370a[_0x381959(0x354)];if(_0x47370a[_0x381959(0x183)]&&(!_0x1775e0[_0x381959(0x183)]||(_0x47370a[_0x381959(0x183)]['at']??0x0)>(_0x1775e0[_0x381959(0x183)]['at']??0x0)))_0x1775e0[_0x381959(0x183)]=_0x47370a['stats'];}return[..._0x454782[_0x381959(0x1ed)]()];}[_0x2ac2f1(0x23c)](){const _0x15fc0d=_0x2ac2f1,_0x3c2338=[],_0x394980={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x4a6013 of this[_0x15fc0d(0x20d)]()){_0x3c2338[_0x15fc0d(0x18a)]({'processKey':_0x4a6013[_0x15fc0d(0x34e)],'kind':_0x4a6013[_0x15fc0d(0x1b5)],'pid':_0x4a6013[_0x15fc0d(0x322)],'supervisorKey':_0x4a6013[_0x15fc0d(0x375)],'meta':_0x4a6013['meta']??null,'uptime':_0x4a6013[_0x15fc0d(0x16d)],'stats':_0x4a6013['stats']??null}),_0x394980[_0x15fc0d(0x2a4)]++;if(_0x4a6013['stats']){_0x394980[_0x15fc0d(0x318)]+=_0x4a6013[_0x15fc0d(0x183)]['rss']||0x0,_0x394980[_0x15fc0d(0x321)]+=(_0x4a6013[_0x15fc0d(0x183)]['heapUsed']||0x0)+(_0x4a6013['stats'][_0x15fc0d(0x196)]?.[_0x15fc0d(0x321)]||0x0);const _0x239155=_0x4a6013[_0x15fc0d(0x183)]['threads'];_0x239155&&(_0x394980[_0x15fc0d(0x196)]['count']+=_0x239155[_0x15fc0d(0x392)]||0x0,_0x394980[_0x15fc0d(0x196)][_0x15fc0d(0x36a)]+=_0x239155[_0x15fc0d(0x36a)]||0x0,_0x394980['threads'][_0x15fc0d(0x2a8)]+=_0x239155[_0x15fc0d(0x2a8)]||0x0);}}return{'totals':_0x394980,'nodes':_0x3c2338};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x35945a=_0x2ac2f1;this['_isWriter']=this['_isWriter']||!!writer,this[_0x35945a(0x1a6)]=this[_0x35945a(0x1a6)]||!!reader,this[_0x35945a(0x2fe)]=kind||this['_kind']||(_0x520439[_0x35945a(0x1dd)]?_0x35945a(0x1bc):_0x35945a(0x352)),this[_0x35945a(0x2fb)]=supervisorKey??this['_supervisorKey'],this['_listenAddr']=listenAddr??this[_0x35945a(0x30d)],this[_0x35945a(0x20a)](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x35945a(0x244)]){const _0x181228=await this[_0x35945a(0x248)][_0x35945a(0x2b8)](_0x740393,{'sync':![],'durability':'fast'});if(!_0x181228['hasType'](_0x356b61))await _0x181228[_0x35945a(0x1f9)](_0x356b61);this[_0x35945a(0x244)]=_0x181228;}return this[_0x35945a(0x244)];}[_0x2ac2f1(0x189)](){const _0xedcbfe=_0x2ac2f1;return this[_0xedcbfe(0x39a)]!==this[_0xedcbfe(0x244)]&&(this[_0xedcbfe(0x39a)]=this[_0xedcbfe(0x244)],this[_0xedcbfe(0x1a5)]=this[_0xedcbfe(0x244)]['_getType'](_0x356b61)[_0xedcbfe(0x382)]),this[_0xedcbfe(0x1a5)];}[_0x2ac2f1(0x1e5)](_0x20c168){const _0xda641f=_0x2ac2f1;if(_0x5805ea)return this[_0xda641f(0x189)]()[_0xda641f(0x1c7)](_0x20c168[_0xda641f(0x36f)],_0x20c168,0x1);const _0x47a90d=this[_0xda641f(0x189)]()[_0xda641f(0x1fb)](_0x20c168[_0xda641f(0x36f)],_0x20c168,0x1);if(_0x47a90d&&typeof _0x47a90d[_0xda641f(0x1ca)]===_0xda641f(0x296))_0x47a90d[_0xda641f(0x1ca)](undefined,()=>{});return _0x47a90d;}[_0x2ac2f1(0x2ca)](_0x4d4b1d){const _0x424375=_0x2ac2f1;return this[_0x424375(0x189)]()[_0x424375(0x1c7)](_0x4d4b1d[_0x424375(0x36f)],_0x4d4b1d,0x1);}[_0x2ac2f1(0x19d)](_0xbb6103){const _0x56ddd4=_0x2ac2f1;if(_0x5805ea)try{return this[_0x56ddd4(0x189)]()[_0x56ddd4(0x1c2)](_0xbb6103);}catch{return![];}const _0x2b67aa=this[_0x56ddd4(0x189)]()[_0x56ddd4(0x2cb)](_0xbb6103);if(_0x2b67aa&&typeof _0x2b67aa[_0x56ddd4(0x1ca)]===_0x56ddd4(0x296))_0x2b67aa[_0x56ddd4(0x1ca)](undefined,()=>{});return _0x2b67aa;}async[_0x2ac2f1(0x1c4)](_0x3127d6){const _0x24d440=_0x2ac2f1;if(!this[_0x24d440(0x244)]||!this[_0x24d440(0x1ae)]||!_0x3127d6?.['nodeKey'])return;return this[_0x24d440(0x1e5)](_0x3127d6);}async[_0x2ac2f1(0x376)](_0x48eef0){const _0x35f723=_0x2ac2f1;if(!this[_0x35f723(0x244)]||!this[_0x35f723(0x1ae)]||!_0x48eef0)return;const _0x28e01c=_0x48eef0[_0x35f723(0x344)]('#'),_0x5c0693=[];for(const {key:_0x39abab}of this['_statusEnv']['getRange'](_0x356b61)){if(_0x39abab===_0x48eef0||!_0x28e01c&&typeof _0x39abab===_0x35f723(0x256)&&_0x39abab[_0x35f723(0x2b6)](_0x48eef0+'#'))_0x5c0693['push'](_0x39abab);}for(const _0x256a38 of _0x5c0693){try{this[_0x35f723(0x189)]()[_0x35f723(0x1c2)](_0x256a38);}catch{}}}[_0x2ac2f1(0x30c)](_0x5d63e8){const _0x454194=_0x2ac2f1;if(typeof _0x5d63e8?.[_0x454194(0x322)]!==_0x454194(0x335))return![];if(_0x5d63e8[_0x454194(0x1aa)]!==_0x5630bb[_0x454194(0x21a)]())return![];if(_0x5d63e8['pid']===process[_0x454194(0x322)])return![];if(_0x5d63e8[_0x454194(0x191)]!=null&&_0x5d63e8[_0x454194(0x191)]<Date['now']()-_0x4d54d3)return!![];try{return process[_0x454194(0x1db)](_0x5d63e8[_0x454194(0x322)],0x0),![];}catch(_0x2e53de){return _0x2e53de[_0x454194(0x203)]===_0x454194(0x2ab);}}[_0x2ac2f1(0x21b)](){const _0x35c73d=_0x2ac2f1;if(!this['_statusEnv'])return[];try{this[_0x35c73d(0x244)]['db']?.[_0x35c73d(0x35f)]?.();}catch{}const _0x464a48=Date[_0x35c73d(0x2d7)](),_0x144cbe=_0x5630bb[_0x35c73d(0x21a)](),_0x5740ee=[];for(const {value:_0xd8a8bc}of this['_statusEnv'][_0x35c73d(0x2cd)](_0x356b61)){if(!_0xd8a8bc)continue;let _0x1530f0=null;_0xd8a8bc[_0x35c73d(0x1aa)]===_0x144cbe&&typeof _0xd8a8bc[_0x35c73d(0x322)]===_0x35c73d(0x335)&&(_0x1530f0=!this['_nodeDead'](_0xd8a8bc));if(_0x1530f0===![])continue;const _0x224e11=_0xd8a8bc[_0x35c73d(0x191)]==null||_0xd8a8bc['expiresAt']>=_0x464a48;if(_0x1530f0===!![]||_0x224e11)_0x5740ee[_0x35c73d(0x18a)](_0xd8a8bc);}return _0x5740ee;}async['reap'](_0x1f7150=0x0){const _0x17b0f2=_0x2ac2f1;if(!this[_0x17b0f2(0x244)]||!this[_0x17b0f2(0x1ae)])return;const _0x5d06f2=Date[_0x17b0f2(0x2d7)]()-_0x1f7150,_0x373894=new Set(),_0x2d53b4=[],_0x45e3f3=_0x5630bb[_0x17b0f2(0x21a)]();for(const {key:_0x57ba64,value:_0x317a86}of this[_0x17b0f2(0x244)][_0x17b0f2(0x2cd)](_0x356b61)){if(!_0x317a86)continue;const _0x9c991b=_0x317a86['host']===_0x45e3f3&&typeof _0x317a86['pid']===_0x17b0f2(0x335),_0xbd4861=_0x9c991b?this[_0x17b0f2(0x30c)](_0x317a86):_0x317a86[_0x17b0f2(0x191)]!=null&&_0x317a86[_0x17b0f2(0x191)]<_0x5d06f2;if(_0xbd4861)_0x2d53b4[_0x17b0f2(0x18a)](_0x57ba64);else _0x373894[_0x17b0f2(0x237)](_0x14bad7(_0x317a86)??_0x57ba64);}for(const _0x3c3a43 of _0x2d53b4)this[_0x17b0f2(0x19d)](_0x3c3a43);if(this[_0x17b0f2(0x20a)]()){const _0x332118=[];for(const {key:_0x223250}of this[_0x17b0f2(0x33f)](_0x17b0f2(0x31e))){if(!_0x373894[_0x17b0f2(0x30e)](_0x223250)){if(_0x5805ea)try{this['_desired'][_0x17b0f2(0x1c2)](_0x17b0f2(0x2a7)+_0x223250);}catch{}else _0x332118[_0x17b0f2(0x18a)](this[_0x17b0f2(0x2f2)][_0x17b0f2(0x2cb)](_0x17b0f2(0x2a7)+_0x223250));}}if(_0x332118['length'])await Promise[_0x17b0f2(0x27e)](_0x332118);}}[_0x2ac2f1(0x222)](_0x38004c=null){const _0xf393d4=_0x2ac2f1;if(this[_0xf393d4(0x1ab)])return;if(!this[_0xf393d4(0x1ae)]||!this[_0xf393d4(0x244)]){this[_0xf393d4(0x248)]?.[_0xf393d4(0x38f)]?.['warn']?.('registry\x20heartbeat\x20skipped\x20(writer='+this[_0xf393d4(0x1ae)]+_0xf393d4(0x29d)+!!this[_0xf393d4(0x244)]+_0xf393d4(0x31a),{'feature':_0xf393d4(0x2a4)});return;}this[_0xf393d4(0x194)]=_0x38004c,this[_0xf393d4(0x265)]=()=>this['_maybePublish']();for(const _0xca82fb of _0x5ca496)this[_0xf393d4(0x248)][_0xf393d4(0x325)]['on'](_0xca82fb,this[_0xf393d4(0x265)]);this[_0xf393d4(0x187)]();const _0x26717a=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x5d5cc2;this[_0xf393d4(0x1ab)]=setInterval(()=>{const _0x23bd8a=_0xf393d4;if(this[_0x23bd8a(0x194)])try{this['_onTick']();}catch{}this[_0x23bd8a(0x187)](),this[_0x23bd8a(0x252)]()['catch'](()=>{});},_0x26717a);if(this[_0xf393d4(0x1ab)]['unref'])this[_0xf393d4(0x1ab)][_0xf393d4(0x369)]();}[_0x2ac2f1(0x380)](){const _0x519b9d=_0x2ac2f1;if(!this[_0x519b9d(0x1ae)]||!this[_0x519b9d(0x244)])return;if(Date['now']()-this[_0x519b9d(0x259)]<_0x28ab7d)return;this[_0x519b9d(0x187)]();}[_0x2ac2f1(0x187)](){const _0x198631=_0x2ac2f1;if(!this[_0x198631(0x1ae)]||!this['_statusEnv'])return;this['_lastPublishAt']=Date[_0x198631(0x2d7)]();try{const _0x197709=[this[_0x198631(0x32b)]()];for(const _0x2850d6 of this['_children'][_0x198631(0x1ed)]())_0x197709['push'](this[_0x198631(0x2d9)](_0x2850d6));const _0x5c5622=_0x4a856d[_0x198631(0x251)]?_0x4a856d[_0x198631(0x2d7)]():0x0;for(const _0x2e2b73 of _0x197709){try{this['_putRowSync'](_0x2e2b73),this['_publishFailWarned']=![];}catch(_0xdf0c73){!this[_0x198631(0x2eb)]&&(this[_0x198631(0x2eb)]=!![],this[_0x198631(0x248)]?.[_0x198631(0x38f)]?.['warn']?.(_0x198631(0x211)+_0xdf0c73['message'],{'feature':_0x198631(0x2a4)}));}}if(_0x4a856d[_0x198631(0x251)])_0x4a856d[_0x198631(0x1a2)](_0x198631(0x2b2),_0x4a856d['now']()-_0x5c5622,_0x198631(0x379)+_0x197709['length']+_0x198631(0x19b));}catch(_0x289074){!this[_0x198631(0x2eb)]&&(this[_0x198631(0x2eb)]=!![],this['okdb']?.[_0x198631(0x38f)]?.[_0x198631(0x307)]?.(_0x198631(0x211)+_0x289074[_0x198631(0x198)],{'feature':'processes'}));}}async[_0x2ac2f1(0x305)](){const _0x5241b9=_0x2ac2f1;if(this['_onProcEvent']){for(const _0x27f80d of _0x5ca496){try{this['okdb'][_0x5241b9(0x325)][_0x5241b9(0x30f)](_0x27f80d,this[_0x5241b9(0x265)]);}catch{}}this[_0x5241b9(0x265)]=null;}this[_0x5241b9(0x1ab)]&&(clearInterval(this[_0x5241b9(0x1ab)]),this['_hbTimer']=null);try{if(this[_0x5241b9(0x244)]&&this[_0x5241b9(0x1ae)])await this[_0x5241b9(0x376)](this[_0x5241b9(0x218)]);}catch{}}async[_0x2ac2f1(0x346)](){const _0x2f3c67=_0x2ac2f1;if(!this['_statusEnv']||!this[_0x2f3c67(0x1ae)])return;try{await this[_0x2f3c67(0x376)](this['_rowKey']);}catch{}try{const _0x5eb738=[];for(const {value:_0x1ce9d1}of this['_statusEnv'][_0x2f3c67(0x2cd)](_0x356b61)){if(_0x1ce9d1?.[_0x2f3c67(0x315)]===process[_0x2f3c67(0x322)]&&_0x1ce9d1[_0x2f3c67(0x36f)])_0x5eb738[_0x2f3c67(0x18a)](_0x1ce9d1['nodeKey']);}for(const _0x36069a of _0x5eb738){try{await this['removeNode'](_0x36069a);}catch{}}}catch{}}async[_0x2ac2f1(0x1d2)](){const _0x5b8c2a=_0x2ac2f1;return this[_0x5b8c2a(0x1c4)](this['_buildOwnRow']());}async[_0x2ac2f1(0x27f)](_0x7bed91){const _0x3d879f=_0x2ac2f1;if(!this[_0x3d879f(0x244)]||!this[_0x3d879f(0x1ae)])return;return this['putNode'](this[_0x3d879f(0x2d9)](_0x7bed91));}['_buildChildRow']({pid:_0x80b9a5,startedAt:_0x52ce16,kind:_0x45ff16,supervisorKey:_0x43e309,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x2ac2f1(0x17e),meta:meta=null,stats:stats=null}){const _0x23d4a1=_0x2ac2f1,_0x514ae9=Date[_0x23d4a1(0x2d7)](),_0x4ee4f2=_0x3e0005(_0x80b9a5,_0x52ce16);return{'nodeKey':_0x33fae2(_0x4ee4f2,'0'),'processKey':_0x4ee4f2,'instanceId':'0','pid':_0x80b9a5,'startedAt':_0x52ce16,'ppid':process[_0x23d4a1(0x322)],'host':_0x5630bb['hostname'](),'supervisorKey':_0x43e309,'slot':slot,'slotKey':slotKey,'kind':_0x45ff16,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x514ae9,'expiresAt':_0x514ae9+_0x4e288c,'caps':this[_0x23d4a1(0x383)](_0x45ff16,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x2ac2f1(0x236)](_0x230d5d){const _0xcb4598=_0x2ac2f1;if(!_0x230d5d?.[_0xcb4598(0x322)])return null;const _0x5bfda6=_0x3e0005(_0x230d5d['pid'],_0x230d5d[_0xcb4598(0x1ad)]);this[_0xcb4598(0x1a7)]['set'](_0x5bfda6,{..._0x230d5d,'supervisorKey':_0x230d5d[_0xcb4598(0x375)]??this['_selfKey']});if(this[_0xcb4598(0x1ae)])await this[_0xcb4598(0x27f)](this[_0xcb4598(0x1a7)][_0xcb4598(0x36d)](_0x5bfda6))[_0xcb4598(0x16f)]?.(()=>{});return _0x5bfda6;}[_0x2ac2f1(0x17f)](_0x25770d){const _0x3c9f23=_0x2ac2f1;if(!_0x25770d)return;return this[_0x3c9f23(0x1a7)][_0x3c9f23(0x2e7)](_0x25770d),this['removeNode'](_0x25770d);}[_0x2ac2f1(0x310)](){const _0x42c924=_0x2ac2f1,_0x30da1d=Date[_0x42c924(0x2d7)](),_0x14b490=process['cpuUsage'](),_0xbca1dd=(_0x30da1d-this[_0x42c924(0x37e)])*0x3e8;if(_0xbca1dd>=0x3d090){const _0x397841=_0x14b490[_0x42c924(0x2c7)]-this['_lastCpuUsage'][_0x42c924(0x2c7)]+(_0x14b490['system']-this[_0x42c924(0x2bd)][_0x42c924(0x1b3)]),_0x1ab98f=_0x5630bb[_0x42c924(0x34f)]()[_0x42c924(0x263)]||0x1;this['_lastCpuPct']=Math['min'](0x64,Math[_0x42c924(0x35c)](_0x397841/(_0xbca1dd*_0x1ab98f)*0x64)),this[_0x42c924(0x272)]=Math[_0x42c924(0x35c)](_0xbca1dd/0x3e8),this[_0x42c924(0x2bd)]=_0x14b490,this['_lastCpuAt']=_0x30da1d;}const _0x17691b=process['memoryUsage'](),_0x17996f=this[_0x42c924(0x324)][_0x42c924(0x302)];let _0x1bbd88=0x0;if(_0x17996f>0x0){const _0x33f5b4=[this['okdb'],...this[_0x42c924(0x248)][_0x42c924(0x299)]?.['values']?.()??[]];for(const _0x2e22a3 of _0x33f5b4){const _0x55db0c=_0x2e22a3[_0x42c924(0x33a)]?.[_0x42c924(0x37f)];if(_0x55db0c)_0x1bbd88+=_0x55db0c[_0x42c924(0x306)]['busy'];}}let _0x3d25e1=null;const _0x8f155f=_0x17996f;if(_0x8f155f>0x0){let _0x32c8b0=0x0;for(const _0x2463ab of this[_0x42c924(0x324)]['values']())_0x32c8b0+=_0x2463ab[_0x42c924(0x321)]||0x0;_0x3d25e1={'count':_0x8f155f,'heapUsed':_0x32c8b0,'sandbox':_0x17996f,'busy':_0x1bbd88};}return{'rss':_0x17691b[_0x42c924(0x318)],'heapUsed':_0x17691b[_0x42c924(0x321)],'heapTotal':_0x17691b[_0x42c924(0x2dd)],'external':_0x17691b[_0x42c924(0x20b)],'cpuPct':this[_0x42c924(0x361)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x3d25e1,'at':_0x30da1d};}[_0x2ac2f1(0x266)](_0x5701d3,_0x47ecce){const _0x42176f=_0x2ac2f1;if(!_0x5701d3||!_0x47ecce)return;this[_0x42176f(0x324)]['set'](_0x5701d3,_0x47ecce);}['clearThreadStats'](_0x54ccb9){this['_threadStats']['delete'](_0x54ccb9);}[_0x2ac2f1(0x179)](_0x21bf8e,_0x381329,_0x243e1f=undefined){const _0x4cf77f=_0x2ac2f1,_0x56e848=this['_children'][_0x4cf77f(0x36d)](_0x21bf8e);if(!_0x56e848||!_0x381329)return;if(_0x243e1f!==undefined)_0x56e848[_0x4cf77f(0x1ff)]=_0x243e1f;_0x56e848[_0x4cf77f(0x183)]={'rss':_0x381329['rss']??null,'heapUsed':_0x381329['heapUsed']??null,'heapTotal':_0x381329[_0x4cf77f(0x2dd)]??null,'external':_0x381329['external']??null,'cpuPct':_0x381329['cpuPct']??null,'cpuWindowMs':_0x381329[_0x4cf77f(0x1b4)]??null,'threads':_0x381329['threads']??null,'claims':_0x381329[_0x4cf77f(0x2e5)]??null,'envsOpen':_0x381329['envsOpen']??null,'at':Date['now']()};}[_0x2ac2f1(0x32b)](){const _0x2e93a7=_0x2ac2f1,_0x45dab0=Date[_0x2e93a7(0x2d7)](),_0x126e40=this['okdb']['_role']||{},_0x2c40db=this['_kind']||'cli';return{'nodeKey':this['_rowKey'],'processKey':this[_0x2e93a7(0x340)],'instanceId':this[_0x2e93a7(0x270)],'pid':process[_0x2e93a7(0x322)],'startedAt':this[_0x2e93a7(0x32d)],'instanceStartedAt':this[_0x2e93a7(0x297)],'ppid':typeof process[_0x2e93a7(0x315)]===_0x2e93a7(0x335)?process[_0x2e93a7(0x315)]:null,'host':_0x5630bb[_0x2e93a7(0x21a)](),'supervisorKey':this[_0x2e93a7(0x2fb)]??null,'kind':_0x2c40db,'role':{'engines':!!_0x126e40['engines'],'processors':!!_0x126e40[_0x2e93a7(0x18b)],'compaction':_0x126e40[_0x2e93a7(0x2f4)],'http':_0x126e40[_0x2e93a7(0x2d4)]},'listenAddr':this[_0x2e93a7(0x30d)]??null,'heartbeatAt':_0x45dab0,'expiresAt':_0x45dab0+_0x4e288c,'caps':this['_caps'](_0x2c40db,_0x126e40),'lifecycle':{'state':_0x2e93a7(0x17e),'desiredVersionApplied':null},'meta':{...this[_0x2e93a7(0x2b9)]},'processing':_0x126e40[_0x2e93a7(0x18b)]?this[_0x2e93a7(0x242)]():null,'engines':_0x126e40[_0x2e93a7(0x24d)]?[...this[_0x2e93a7(0x248)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x2e93a7(0x199)](),'stats':this[_0x2e93a7(0x310)](),'writers':this[_0x2e93a7(0x2ae)]()};}[_0x2ac2f1(0x2ae)](){const _0xcd869e=_0x2ac2f1,_0x5e205c={};try{for(const [_0x5b99d1,_0x193951]of this[_0xcd869e(0x248)][_0xcd869e(0x299)]){try{const _0x15c0cc=_0x193951[_0xcd869e(0x1df)]?.();if(!_0x15c0cc)continue;if(!_0x15c0cc[_0xcd869e(0x358)]&&!_0x15c0cc[_0xcd869e(0x193)]&&!(_0x15c0cc[_0xcd869e(0x207)]??0x0)&&!_0x15c0cc[_0xcd869e(0x343)])continue;_0x5e205c[_0x5b99d1]={'depth':_0x15c0cc[_0xcd869e(0x358)],'oldestPendingMs':_0x15c0cc[_0xcd869e(0x39c)],'committed':_0x15c0cc[_0xcd869e(0x193)],'commitsPerSec':_0x15c0cc[_0xcd869e(0x197)],'commitP99Ms':_0x15c0cc[_0xcd869e(0x332)],'parkedNow':_0x15c0cc[_0xcd869e(0x207)]??0x0,'draining':!!_0x15c0cc[_0xcd869e(0x343)]};}catch{}}}catch{}return Object[_0xcd869e(0x359)](_0x5e205c)['length']?_0x5e205c:null;}[_0x2ac2f1(0x199)](){const _0x457282=_0x2ac2f1,_0x27ae96=process[_0x457282(0x322)],_0x2abec6=Date[_0x457282(0x2d7)](),_0x29a29a=_0x4e2ec0=>{const _0x10ce4a=_0x457282;if(!_0x4e2ec0)return[];const _0xf3abfe=[];try{for(const {id:_0x390176,entry:_0x37c4de}of _0x4e2ec0['list']()){if(_0x37c4de?.['holder']?.[_0x10ce4a(0x322)]!==_0x27ae96)continue;const _0x3a1607=_0x37c4de['updatedAt']??_0x37c4de[_0x10ce4a(0x182)]??0x0;if(_0x3a1607+(_0x37c4de[_0x10ce4a(0x301)]??0x0)<_0x2abec6)continue;_0xf3abfe[_0x10ce4a(0x18a)](_0x390176);}}catch{}return _0xf3abfe;},_0x4875e1=_0x29a29a(this['_singletonLock'](_0x457282(0x234))),_0x2f9648=_0x29a29a(this[_0x457282(0x373)](_0x457282(0x204)));if(!_0x4875e1[_0x457282(0x263)]&&!_0x2f9648[_0x457282(0x263)])return null;return{'compact':_0x4875e1,'replicate':_0x2f9648};}[_0x2ac2f1(0x373)](_0x16e72b){const _0x4ac713=_0x2ac2f1;if(!this['okdb']?.['_rootDb'])return null;if(!this[_0x4ac713(0x2c6)])this['_singletonLocks']=new Map();let _0x5c734f=this[_0x4ac713(0x2c6)][_0x4ac713(0x36d)](_0x16e72b);if(!_0x5c734f)try{_0x5c734f=new _0x1803c0(this[_0x4ac713(0x248)][_0x4ac713(0x294)],{'namespace':_0x16e72b}),this['_singletonLocks'][_0x4ac713(0x37b)](_0x16e72b,_0x5c734f);}catch{return null;}return _0x5c734f;}['_buildProcessingFacet'](){const _0x4d467e=_0x2ac2f1,_0x1a0967=[];try{for(const [_0xeb26ca,_0x4461c4]of this[_0x4d467e(0x248)][_0x4d467e(0x299)]){if(_0xeb26ca[_0x4d467e(0x2b6)]('~'))continue;for(const _0x23a857 of _0x4461c4[_0x4d467e(0x22a)][_0x4d467e(0x2f7)]())_0x1a0967[_0x4d467e(0x18a)]({..._0x23a857,'env':_0xeb26ca});}}catch{}return{'participate':this[_0x4d467e(0x248)]['processors']?.[_0x4d467e(0x26b)]??![],'processors':_0x1a0967};}[_0x2ac2f1(0x20a)](){const _0x1f1c3d=_0x2ac2f1;if(this[_0x1f1c3d(0x2f2)])return!![];const _0x15fe46=this[_0x1f1c3d(0x248)][_0x1f1c3d(0x294)];if(!_0x15fe46)return![];return this[_0x1f1c3d(0x2f2)]=_0x15fe46[_0x1f1c3d(0x309)](_0x4d8e2d,{'dupSort':![]}),this[_0x1f1c3d(0x2ed)]=_0x15fe46[_0x1f1c3d(0x309)](_0x2f768e,{'dupSort':![]}),!![];}async[_0x2ac2f1(0x288)](){const _0x24e4b9=_0x2ac2f1;if(!this[_0x24e4b9(0x20a)]())return;const _0x465c17=_0x24e4b9(0x209),_0x11ecd9=0x1,_0xda7147=this[_0x24e4b9(0x2f2)][_0x24e4b9(0x36d)](_0x465c17)??0x0;if(_0xda7147>=_0x11ecd9)return;const _0x341011=_0x1c5544=>{const _0x3df16a=_0x24e4b9;if(_0x1c5544===_0x3df16a(0x1f7))return _0x3df16a(0x1fd);if(_0x1c5544===_0x3df16a(0x38e))return _0x3df16a(0x300);return _0x1c5544;};await this[_0x24e4b9(0x248)][_0x24e4b9(0x2c2)][_0x24e4b9(0x177)][_0x24e4b9(0x1e6)](()=>{const _0x5527c6=_0x24e4b9;for(const _0x397dee of[_0x5527c6(0x255),_0x5527c6(0x384)]){for(const {key:_0x5293b4,value:_0x59f3c6}of this[_0x5527c6(0x2f2)]['getRange']({'start':_0x397dee,'end':_0x397dee+'ÿ'})){if(typeof _0x5293b4!==_0x5527c6(0x256)||!_0x5293b4[_0x5527c6(0x2b6)](_0x397dee))break;const _0x278584=_0x341011(_0x59f3c6[_0x5527c6(0x1b2)]);if(_0x278584!==_0x59f3c6[_0x5527c6(0x1b2)])this[_0x5527c6(0x2f2)]['put'](_0x5293b4,{..._0x59f3c6,'mode':_0x278584});}}this[_0x5527c6(0x2f2)][_0x5527c6(0x1fb)](_0x465c17,_0x11ecd9);});}[_0x2ac2f1(0x2b5)](){const _0x409e6f=_0x2ac2f1;return!!this[_0x409e6f(0x2f2)];}[_0x2ac2f1(0x201)](_0x58a46a,_0x2e37ae){const _0x561746=_0x2ac2f1;if(!this['_ensureDesired']())return null;const _0x5db3dd=_0x58a46a+'/'+_0x2e37ae;return this[_0x561746(0x245)](),this[_0x561746(0x1e1)]['get'](_0x5db3dd)??this[_0x561746(0x2f2)][_0x561746(0x36d)](_0x5db3dd)??null;}['_refreshDesiredSnapshot'](){const _0x216c5e=_0x2ac2f1;if(!_0x5805ea)return;try{this['okdb'][_0x216c5e(0x2c2)]?.['db']?.[_0x216c5e(0x35f)]?.();}catch{}}async[_0x2ac2f1(0x393)](_0x474056,_0x3485ab,_0x2c8eff){const _0x56f560=_0x2ac2f1;if(!this[_0x56f560(0x20a)]())return null;const _0x5d9423=_0x474056+'/'+_0x3485ab;this['_refreshDesiredSnapshot']();const _0x732f34=this['_desiredOverlay']['get'](_0x5d9423)??this['_desired'][_0x56f560(0x36d)](_0x5d9423)??{'version':0x0},_0x4f706b=(_0x732f34[_0x56f560(0x19e)]||0x0)+0x1,_0x5c0f59={..._0x732f34,..._0x2c8eff,'version':_0x4f706b,'updatedAt':Date[_0x56f560(0x2d7)]()};this[_0x56f560(0x1e1)][_0x56f560(0x37b)](_0x5d9423,_0x5c0f59);try{await this[_0x56f560(0x248)][_0x56f560(0x2c2)][_0x56f560(0x177)]['transaction'](()=>{const _0x29b67e=_0x56f560;this[_0x29b67e(0x2f2)]['put'](_0x5d9423,_0x5c0f59);});}finally{if(this[_0x56f560(0x1e1)]['get'](_0x5d9423)===_0x5c0f59)this[_0x56f560(0x1e1)][_0x56f560(0x2e7)](_0x5d9423);}return _0x4f706b;}['listDesired'](_0x49f93){const _0x14beb7=_0x2ac2f1;if(!this[_0x14beb7(0x20a)]())return[];this[_0x14beb7(0x245)]();const _0x37bcc5=_0x49f93+'/',_0x17eee2=[];for(const {key:_0x4db94a,value:_0x2ecfb5}of this['_desired'][_0x14beb7(0x2cd)]({'start':_0x37bcc5,'end':_0x37bcc5+'ÿ'})){if(typeof _0x4db94a!=='string'||!_0x4db94a[_0x14beb7(0x2b6)](_0x37bcc5))break;_0x17eee2['push']({'key':_0x4db94a['slice'](_0x37bcc5[_0x14beb7(0x263)]),'value':_0x2ecfb5});}return _0x17eee2;}[_0x2ac2f1(0x208)](_0x1af9ca){const _0x56d67d=_0x2ac2f1;if(!this[_0x56d67d(0x20a)]())return null;return this['_cmd'][_0x56d67d(0x36d)](_0x1af9ca)??null;}async[_0x2ac2f1(0x28d)](_0x2efb34,_0x21af14,_0x8373cb={}){const _0x334fb2=_0x2ac2f1;if(!this[_0x334fb2(0x20a)]())return null;let _0x298a45;return await this['okdb']['_systemEnv'][_0x334fb2(0x177)][_0x334fb2(0x1e6)](()=>{const _0x152650=_0x334fb2,_0x263741=this[_0x152650(0x2ed)][_0x152650(0x36d)](_0x2efb34)||{'epoch':0x0};_0x298a45=(_0x263741[_0x152650(0x34a)]||0x0)+0x1,this['_cmd'][_0x152650(0x1fb)](_0x2efb34,{..._0x263741,..._0x8373cb,'cmd':_0x21af14,'epoch':_0x298a45,'updatedAt':Date[_0x152650(0x2d7)]()});}),_0x298a45;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x53a352,'nodeKey':_0x3e0005,'logicalKey':_0x4b609f,'slotKey':_0x311e67,'PROCESS_ENV':_0x740393,'NODE_TYPE':_0x356b61},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x4c383b=_0x6505f9;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0xda7576=require$$0$4,{EVENTS:_0x1d59ac,CHANGE_ACTIONS:_0x414039}=requireOkdbEnums(),{LOOP:_0x38987a}=requireOkdbLoopMonitor(),_0x426194=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0xdfcc57=0x5,_0x5296f9=0x2710;class _0x46695e extends _0xda7576{constructor(_0xd12307,_0x42708b={}){const _0x24cea0=_0x53b1;super(),this[_0x24cea0(0x248)]=_0xd12307,this['_quantum']=_0x42708b[_0x24cea0(0x2a0)]??_0x426194,this[_0x24cea0(0x1f5)]=_0x42708b[_0x24cea0(0x1de)]??_0xdfcc57,this[_0x24cea0(0x1c0)]=_0x42708b[_0x24cea0(0x1af)]??_0x5296f9,this[_0x24cea0(0x19a)]=![],this['_cursors']=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x24cea0(0x186)]=null,this[_0x24cea0(0x389)]=![],this['_seen']=new Set(),this[_0x24cea0(0x206)]=_0xc7b5a0=>this[_0x24cea0(0x1ac)](_0xc7b5a0),this[_0x24cea0(0x2a9)]=_0x42cfa4=>this[_0x24cea0(0x2b7)](_0x42cfa4),this['_onStop']=()=>this[_0x24cea0(0x243)]();}[_0x4c383b(0x1d6)](){const _0x4d2a72=_0x4c383b;if(this[_0x4d2a72(0x19a)])return;this[_0x4d2a72(0x19a)]=!![];for(const [_0x325e2b,_0xf58c7]of this[_0x4d2a72(0x248)][_0x4d2a72(0x299)]){if(_0x325e2b[_0x4d2a72(0x2b6)]('~'))continue;try{_0xf58c7[_0x4d2a72(0x37c)]();}catch{}}for(const [_0x180880,_0x220a9d]of this[_0x4d2a72(0x248)]['_envs']){if(_0x180880[_0x4d2a72(0x2b6)]('~'))continue;try{this[_0x4d2a72(0x219)][_0x4d2a72(0x37b)](_0x180880,_0x220a9d['getClock']()||0x0);}catch{}}const {events:_0x41403d}=this[_0x4d2a72(0x248)];_0x41403d['on'](_0x1d59ac[_0x4d2a72(0x1cf)],this[_0x4d2a72(0x206)]),_0x41403d['on'](_0x1d59ac['ITEM_UPDATE'],this[_0x4d2a72(0x206)]),_0x41403d['on'](_0x1d59ac['ITEM_REMOVE'],this[_0x4d2a72(0x206)]),_0x41403d['on'](_0x1d59ac[_0x4d2a72(0x24f)],this[_0x4d2a72(0x2a9)]),_0x41403d[_0x4d2a72(0x2ee)](_0x1d59ac['SYSTEM_STOPPED'],this[_0x4d2a72(0x246)]);}['stop'](){const _0x2978c=_0x4c383b;if(!this[_0x2978c(0x19a)])return;this['_started']=![];const {events:_0x50a95a}=this[_0x2978c(0x248)];_0x50a95a[_0x2978c(0x30f)](_0x1d59ac[_0x2978c(0x1cf)],this[_0x2978c(0x206)]),_0x50a95a[_0x2978c(0x30f)](_0x1d59ac[_0x2978c(0x254)],this[_0x2978c(0x206)]),_0x50a95a[_0x2978c(0x30f)](_0x1d59ac[_0x2978c(0x37d)],this[_0x2978c(0x206)]),_0x50a95a['off'](_0x1d59ac[_0x2978c(0x24f)],this[_0x2978c(0x2a9)]);try{_0x50a95a[_0x2978c(0x30f)](_0x1d59ac[_0x2978c(0x17b)],this['_onStop']);}catch{}this[_0x2978c(0x186)]&&(clearTimeout(this[_0x2978c(0x186)]),this[_0x2978c(0x186)]=null),this[_0x2978c(0x1c3)]['clear'](),this[_0x2978c(0x398)][_0x2978c(0x225)](),this[_0x2978c(0x219)]['clear'](),this[_0x2978c(0x2aa)][_0x2978c(0x225)]();}[_0x4c383b(0x269)](_0x6969e9,_0x3335df,_0x420e67,_0x5b44fa){return _0x6969e9+'\x00'+_0x3335df+'\x00'+_0x420e67+'\x00'+_0x5b44fa;}['_markSeen'](_0x1e64f4,_0x3a560b,_0x148798,_0x349c67){const _0x9a84dc=_0x4c383b,_0x546c02=this['_dedupeKey'](_0x1e64f4,_0x3a560b,_0x148798,_0x349c67);if(this['_seen'][_0x9a84dc(0x30e)](_0x546c02))return![];this['_seen'][_0x9a84dc(0x237)](_0x546c02);if(this[_0x9a84dc(0x2aa)][_0x9a84dc(0x302)]>this[_0x9a84dc(0x1c0)]){const _0x5d292d=this[_0x9a84dc(0x2aa)][_0x9a84dc(0x1ed)]()[_0x9a84dc(0x25c)]()[_0x9a84dc(0x345)];this['_seen']['delete'](_0x5d292d);}return!![];}['_handleInProcess'](_0x1e2b3a){const _0x3b7897=_0x4c383b;if(!this['_started']||!_0x1e2b3a)return;const {env:_0x344716,type:_0x51eeb8,key:_0xf902b6,clock:_0x1f1b70,origin:_0x1d155d,action:_0x5b4e1d,newValue:_0x3c81b8,oldValue:_0x322019}=_0x1e2b3a;if(_0x344716==null||_0x51eeb8==null||_0xf902b6==null)return;if(typeof _0x344716===_0x3b7897(0x256)&&_0x344716[_0x3b7897(0x2b6)]('~'))return;if(typeof _0x51eeb8===_0x3b7897(0x256)&&_0x51eeb8[_0x3b7897(0x2b6)]('~'))return;if(!this[_0x3b7897(0x165)](_0x344716,_0x51eeb8,_0xf902b6,_0x1f1b70))return;const _0x320878=_0x5b4e1d===_0x414039[_0x3b7897(0x2d3)]?_0x3b7897(0x2cb):_0x3b7897(0x1fb);this[_0x3b7897(0x356)]('change',{'env':_0x344716,'type':_0x51eeb8,'key':_0xf902b6,'op':_0x320878,'clock':_0x1f1b70,'origin':_0x1d155d,'value':_0x320878===_0x3b7897(0x2cb)?null:_0x3c81b8,'prevValue':_0x322019});}['_handlePoke'](_0x3a7a63){const _0xc76845=_0x4c383b;if(!this[_0xc76845(0x19a)])return;if(!_0x3a7a63||typeof _0x3a7a63[_0xc76845(0x24b)]!==_0xc76845(0x256)||typeof _0x3a7a63[_0xc76845(0x1b9)]!==_0xc76845(0x256))return;const {env:_0x13118e,type:_0x2d4806}=_0x3a7a63;if(_0x13118e[_0xc76845(0x2b6)]('~')||_0x2d4806[_0xc76845(0x2b6)]('~'))return;this[_0xc76845(0x1c3)][_0xc76845(0x37b)](_0x13118e+'\x00'+_0x2d4806,{'env':_0x13118e,'type':_0x2d4806}),this[_0xc76845(0x21c)]();}[_0x4c383b(0x21c)](){const _0x49cf48=_0x4c383b;if(this[_0x49cf48(0x186)])return;const _0x2230a6=()=>{const _0x17305d=_0x49cf48;this[_0x17305d(0x186)]=null,this[_0x17305d(0x35a)]()[_0x17305d(0x16f)](()=>{});};this[_0x49cf48(0x186)]=setTimeout(_0x2230a6,this[_0x49cf48(0x1f5)]>0x0?this[_0x49cf48(0x1f5)]:0x0);}async['_drain'](){const _0x581530=_0x4c383b;if(this[_0x581530(0x389)]){this[_0x581530(0x21c)]();return;}this['_draining']=!![];try{const _0x5908be=[...this[_0x581530(0x1c3)][_0x581530(0x1ed)]()];this[_0x581530(0x1c3)][_0x581530(0x225)]();let _0x5635d1=![];for(const {env:_0x3b9c04,type:_0x4323f4}of _0x5908be){try{const _0x35be8c=await this[_0x581530(0x1cc)](_0x3b9c04,_0x4323f4);if(_0x35be8c)_0x5635d1=!![];}catch{this[_0x581530(0x1c3)][_0x581530(0x37b)](_0x3b9c04+'\x00'+_0x4323f4,{'env':_0x3b9c04,'type':_0x4323f4}),_0x5635d1=!![];}}if(_0x5635d1||this['_pending'][_0x581530(0x302)]>0x0)this[_0x581530(0x21c)]();}finally{this[_0x581530(0x389)]=![];}}async['_drainOne'](_0x287655,_0x3e71a4){const _0xd7510a=_0x4c383b,_0x2cd750=await this['okdb'][_0xd7510a(0x28c)](_0x287655),_0x4fe359=_0x287655+'\x00'+_0x3e71a4;!this[_0xd7510a(0x398)][_0xd7510a(0x30e)](_0x4fe359)&&(!this[_0xd7510a(0x219)][_0xd7510a(0x30e)](_0x287655)&&(_0x2cd750[_0xd7510a(0x37c)](),this['_baselines'][_0xd7510a(0x37b)](_0x287655,_0x2cd750['getClock']()||0x0)),this[_0xd7510a(0x398)]['set'](_0x4fe359,this[_0xd7510a(0x219)][_0xd7510a(0x36d)](_0x287655)));const _0x4a8bea=this[_0xd7510a(0x398)][_0xd7510a(0x36d)](_0x4fe359),_0x4a798f=_0x2cd750[_0xd7510a(0x1b6)](_0x3e71a4)||0x0;if(_0x4a798f<=_0x4a8bea)return![];const _0x34e327=_0x4a8bea+this[_0xd7510a(0x1ea)],_0x2aa655=Math[_0xd7510a(0x2d8)](_0x4a798f,_0x34e327),_0x21ce62=_0x38987a[_0xd7510a(0x251)]?_0x38987a[_0xd7510a(0x2d7)]():0x0,_0x5c2c1c=Array[_0xd7510a(0x2ba)](_0x2cd750['getChanges'](_0x3e71a4,_0x4a8bea+0x1,_0x2aa655));let _0x46950b=_0x4a8bea;for(const _0x2baa20 of _0x5c2c1c){const {clock:_0x36a130,key:_0x26f9b3,action:_0x332292,origin:_0x27d4f4}=_0x2baa20;if(_0x36a130>_0x46950b)_0x46950b=_0x36a130;if(_0x26f9b3==null)continue;if(!this[_0xd7510a(0x165)](_0x287655,_0x3e71a4,_0x26f9b3,_0x36a130))continue;let _0x44e657,_0x56c5b0;if(_0x332292===_0x414039[_0xd7510a(0x2d3)])_0x44e657=_0xd7510a(0x2cb),_0x56c5b0=null;else{const _0x26040d=_0x2cd750[_0xd7510a(0x36d)](_0x3e71a4,_0x26f9b3);_0x26040d==null?(_0x44e657='remove',_0x56c5b0=null):(_0x44e657=_0xd7510a(0x1fb),_0x56c5b0=_0x26040d);}this[_0xd7510a(0x356)]('change',{'env':_0x287655,'type':_0x3e71a4,'key':_0x26f9b3,'op':_0x44e657,'clock':_0x36a130,'origin':_0x27d4f4,'value':_0x56c5b0});}if(_0x38987a['enabled'])_0x38987a['note'](_0xd7510a(0x1bf)+_0x287655+':'+_0x3e71a4,_0x38987a[_0xd7510a(0x2d7)]()-_0x21ce62,'n='+_0x5c2c1c['length']);return this['_cursors'][_0xd7510a(0x37b)](_0x4fe359,Math[_0xd7510a(0x284)](_0x46950b,_0x2aa655)),_0x2cd750[_0xd7510a(0x1b6)](_0x3e71a4)>_0x2aa655;}[_0x4c383b(0x1e8)](){const _0x3036f9=_0x4c383b;return{'started':this[_0x3036f9(0x19a)],'quantum':this[_0x3036f9(0x1ea)],'flushDebounce':this[_0x3036f9(0x1f5)],'cursors':Object[_0x3036f9(0x1ec)]([...this[_0x3036f9(0x398)][_0x3036f9(0x190)]()]['map'](([_0x4b858d,_0x1eed33])=>[_0x4b858d[_0x3036f9(0x1e3)]('\x00',':'),_0x1eed33])),'pending':this[_0x3036f9(0x1c3)][_0x3036f9(0x302)],'seen':this['_seen']['size']};}}return _0x46695e[_0x4c383b(0x20e)]=_0x426194,okdbChangefeed={'OKDBChangefeed':_0x46695e},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x21dc80=_0x6505f9;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x12f8f5=require$$1$1,_0x4f7cda=require$$1,{EVENTS:_0x1e1ac2}=requireOkdbEnums(),_0x4fad02=require$$0$3,{slotKey:_0x403c50}=requireOkdbProcessRegistry(),_0x369aea=0xfa,_0x3a81ab=0xfa0,_0x413e0e=0x5,_0x9076ad=0x2710,_0x3784f1=0xbb8,_0x31dc40=0x7d0,_0x4b8194='__okdbCluster',_0x25b6c6='ephemeral',_0x43f69c=_0x21dc80(0x38f),_0x1e6ea8=_0x21dc80(0x183),_0x44df28=[_0x1e1ac2[_0x21dc80(0x349)],_0x1e1ac2[_0x21dc80(0x35d)],_0x1e1ac2[_0x21dc80(0x241)],_0x1e1ac2[_0x21dc80(0x1fa)],_0x1e1ac2[_0x21dc80(0x289)],_0x1e1ac2[_0x21dc80(0x1d1)],_0x1e1ac2[_0x21dc80(0x1f6)],_0x1e1ac2['INDEX_REGISTERED'],_0x21dc80(0x365),_0x21dc80(0x268),_0x21dc80(0x29f),_0x21dc80(0x1c5),_0x21dc80(0x2b3),_0x21dc80(0x2a1)],_0x3ba143=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x15ba26({workers:_0x3068b4,makeOkdb:_0x230d0b,port:_0x404091,primaryOkdb:_0x1462d6,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x3762ed=_0x21dc80;if(_0x12f8f5[_0x3762ed(0x253)])return childEntry&&_0x12f8f5[_0x3762ed(0x1c6)]({'exec':_0x4f7cda[_0x3762ed(0x355)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x1d533c=_0x3762ed,_0xfa5a4b=[];for(let _0x21de25=0x0;_0x21de25<process['execArgv'][_0x1d533c(0x263)];_0x21de25++){const _0x3882ea=process[_0x1d533c(0x317)][_0x21de25];if(_0x3882ea['startsWith'](_0x1d533c(0x21d))||_0x3882ea['startsWith'](_0x1d533c(0x34c))||_0x3882ea[_0x1d533c(0x2b6)](_0x1d533c(0x31b)))continue;if(_0x3882ea==='-e'||_0x3882ea===_0x1d533c(0x166)||_0x3882ea==='-p'||_0x3882ea===_0x1d533c(0x238)){_0x21de25++;continue;}_0xfa5a4b[_0x1d533c(0x18a)](_0x3882ea);}return _0xfa5a4b;})())}),_0x45e456({'workers':_0x3068b4,'port':_0x404091,'primaryOkdb':_0x1462d6,'workerEnv':workerEnv});return _0x24b546({'makeOkdb':_0x230d0b,'port':_0x404091});}function _0x45e456({workers:_0xa41de6,port:_0x3ec7f2,primaryOkdb:_0x110044,workerEnv:_0x12c41c}){const _0x53d2c9=_0x21dc80,_0x2c097b=new Map(),_0x228f25=new Map();let _0x2cae61=![];const _0x1a40d4=_0xd00fd=>_0xd00fd?.[_0x53d2c9(0x372)],_0x596cd5=_0x2f4002=>{const _0x292d64=_0x53d2c9,_0x19395d=_0x12f8f5['fork']({...process.env,..._0x12c41c||{},'OKDB_CLUSTER_SLOT':String(_0x2f4002)});return _0x19395d['__okdbSlot']=_0x2f4002,_0x2c097b[_0x292d64(0x37b)](_0x19395d[_0x292d64(0x277)][_0x292d64(0x322)],{'worker':_0x19395d,'startedAt':Date[_0x292d64(0x2d7)](),'slot':_0x2f4002}),_0x19395d['on'](_0x292d64(0x20f),_0x4561fa=>{const _0x33a1a6=_0x292d64;console[_0x33a1a6(0x38f)](_0x33a1a6(0x38c)+_0x19395d[_0x33a1a6(0x277)][_0x33a1a6(0x322)]+_0x33a1a6(0x1cd)+(_0x4561fa?.[_0x33a1a6(0x198)]??_0x4561fa));}),_0x19395d['on'](_0x292d64(0x1f4),()=>_0x5e8b07()),_0x19395d;},_0x42d6a0=_0x2341c8=>{const _0x4e53e6=_0x53d2c9;for(const {worker:_0x1da04d}of _0x2c097b[_0x4e53e6(0x1ed)]()){if(_0x1da04d[_0x4e53e6(0x378)]()||!_0x1da04d[_0x4e53e6(0x24e)]())continue;try{_0x1da04d[_0x4e53e6(0x2f9)](_0x2341c8);}catch{}}};_0x110044?.[_0x53d2c9(0x347)]?.({'kind':'primary','listenAddr':':'+_0x3ec7f2})['catch'](()=>{}),_0x110044?.[_0x53d2c9(0x2a4)]?.[_0x53d2c9(0x167)]?.({'workersConfigured':_0xa41de6});const _0x5dbede={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x5e8b07=()=>{const _0x41a5fb=_0x53d2c9,_0x1ca108=_0x110044?.['processes'];if(!_0x1ca108||!_0x1ca108[_0x41a5fb(0x1ae)])return;const _0x412ee7=_0x1ca108[_0x41a5fb(0x396)];for(const {worker:_0x4127b8,startedAt:_0x423ab6,slot:_0x4819bc,stats:_0x56005d,processing:_0x359c79}of _0x2c097b[_0x41a5fb(0x1ed)]()){if(_0x4127b8['isDead']())continue;const _0x1b5d59=_0x1ca108[_0x41a5fb(0x2b5)]?.()&&_0x1ca108['getDesired']('slot',_0x4c45d7(_0x4819bc))?.[_0x41a5fb(0x32c)]===!![];_0x1ca108[_0x41a5fb(0x27f)]({'pid':_0x4127b8[_0x41a5fb(0x277)]['pid'],'startedAt':_0x423ab6,'kind':'http-server','supervisorKey':_0x412ee7,'slot':_0x4819bc,'slotKey':_0x4c45d7(_0x4819bc),'role':_0x5dbede,'listenAddr':':'+_0x3ec7f2,'lifecycle':_0x1b5d59?_0x41a5fb(0x1ce):_0x41a5fb(0x17e),'processing':_0x359c79??null,'stats':_0x56005d??null})[_0x41a5fb(0x16f)](()=>{});}},_0x4c45d7=_0x5b1cae=>_0x403c50(_0x53d2c9(0x23f)+_0x3ec7f2,_0x5b1cae),_0x4a4c13=_0x15237c=>{const _0x539e74=_0x53d2c9,_0x5455ca=_0x110044?.[_0x539e74(0x2a4)];if(!_0x5455ca?.[_0x539e74(0x2b5)]?.())return![];return _0x5455ca['getDesired']('slot',_0x4c45d7(_0x15237c))?.['decommission']===!![];};for(let _0x5d4be9=0x0;_0x5d4be9<_0xa41de6;_0x5d4be9++){const _0x430e65=_0x4a4c13(_0x5d4be9);_0x228f25['set'](_0x5d4be9,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x430e65,'respawnTimer':null}),_0x430e65?console[_0x53d2c9(0x38f)](_0x53d2c9(0x247)+_0x5d4be9+_0x53d2c9(0x1d9)):_0x596cd5(_0x5d4be9);}const _0x4ad162=()=>{const _0x26536a=_0x53d2c9,_0x26878d=_0x110044?.['processes'];if(!_0x26878d?.['_isWriter']||!_0x26878d['hasDesired']?.())return;for(const [_0x5941eb,_0x44e7a7]of _0x228f25[_0x26536a(0x190)]()){const _0x1136ba=_0x26878d[_0x26536a(0x201)](_0x26536a(0x2be),_0x4c45d7(_0x5941eb)),_0x4be58f=_0x1136ba?.[_0x26536a(0x32c)]===!![],_0x2f5a6b=_0x1136ba?.[_0x26536a(0x1db)]===!![];if(_0x4be58f&&!_0x44e7a7[_0x26536a(0x1a4)]){_0x44e7a7['dead']=!![];_0x44e7a7[_0x26536a(0x2e9)]&&(clearTimeout(_0x44e7a7[_0x26536a(0x2e9)]),_0x44e7a7['respawnTimer']=null);for(const {worker:_0x4d28dd}of _0x2c097b[_0x26536a(0x1ed)]()){if(_0x1a40d4(_0x4d28dd)!==_0x5941eb||_0x4d28dd[_0x26536a(0x378)]())continue;try{if(_0x2f5a6b)_0x4d28dd[_0x26536a(0x277)][_0x26536a(0x1db)](_0x26536a(0x377));else _0x4d28dd[_0x26536a(0x24e)]()&&_0x4d28dd[_0x26536a(0x220)]();}catch{}}console[_0x26536a(0x38f)](_0x26536a(0x1d5)+(_0x2f5a6b?'hard-killed':'decommissioned')+_0x26536a(0x28a)+_0x5941eb+_0x26536a(0x290));}else{if(!_0x4be58f&&_0x44e7a7['dead']&&_0x1136ba){_0x44e7a7[_0x26536a(0x1a4)]=![],_0x44e7a7[_0x26536a(0x287)]=[],_0x44e7a7[_0x26536a(0x35b)]=0x0;const _0x219834=[..._0x2c097b['values']()]['some'](({worker:_0x33f013})=>_0x1a40d4(_0x33f013)===_0x5941eb&&!_0x33f013[_0x26536a(0x378)]());!_0x219834&&!_0x2cae61&&(_0x596cd5(_0x5941eb),console['log'](_0x26536a(0x19f)+_0x5941eb));}}}},_0x342ee5=()=>{try{_0x4ad162();}catch{}};_0x110044?.['events']?.['on']?.(_0x1e1ac2['SYSTEM_PROC'],_0x342ee5);const _0xc3d875=[];if(_0x110044?.['events']?.['on'])for(const _0x3f6ccb of _0x44df28){const _0x22a421=_0x4a09d6=>{_0x42d6a0({[_0x4b8194]:_0x25b6c6,'event':_0x3f6ccb,'data':_0x4a09d6??{}});};_0x110044['events']['on'](_0x3f6ccb,_0x22a421),_0xc3d875[_0x53d2c9(0x18a)]({'event':_0x3f6ccb,'handler':_0x22a421});}const _0x5229cf=setInterval(()=>{_0x4ad162(),_0x5e8b07();},_0x3ba143);_0x5229cf[_0x53d2c9(0x369)]?.();const _0x5dad9a=(_0x2dfc7d,_0x361021)=>{const _0x723e1e=_0x53d2c9;if(!_0x361021||typeof _0x361021!==_0x723e1e(0x34b)||_0x361021[_0x4b8194]!==_0x43f69c)return;if(!_0x110044?.[_0x723e1e(0x38f)]?.['ingest'])return;const _0x512930=_0x361021[_0x723e1e(0x36e)]||{};_0x110044[_0x723e1e(0x38f)][_0x723e1e(0x31c)]({..._0x512930,'msg':'[w'+_0x361021[_0x723e1e(0x2be)]+']\x20'+(_0x512930[_0x723e1e(0x33d)]??''),'meta':{..._0x512930[_0x723e1e(0x34d)]||{},'worker':_0x361021['slot'],'workerPid':_0x361021['pid']}});};_0x12f8f5['on'](_0x53d2c9(0x198),_0x5dad9a);const _0x2acb33=(_0xd852bd,_0x158058)=>{const _0x4ce29d=_0x53d2c9;if(!_0x158058||typeof _0x158058!=='object'||_0x158058[_0x4b8194]!==_0x1e6ea8)return;const _0x4934d4=_0x2c097b['get'](_0xd852bd['process'][_0x4ce29d(0x322)]);if(_0x4934d4){_0x4934d4[_0x4ce29d(0x183)]={..._0x158058['stats'],'at':Date[_0x4ce29d(0x2d7)]()};if(_0x158058[_0x4ce29d(0x1ff)]!==undefined)_0x4934d4[_0x4ce29d(0x1ff)]=_0x158058[_0x4ce29d(0x1ff)];}};_0x12f8f5['on'](_0x53d2c9(0x198),_0x2acb33),_0x12f8f5['on']('exit',(_0x102d0c,_0x3bfc23,_0x371ac9)=>{const _0x89172b=_0x53d2c9,_0x120349=_0x102d0c['process'][_0x89172b(0x322)],_0x34df71=_0x1a40d4(_0x102d0c),_0x71957a=_0x2c097b[_0x89172b(0x36d)](_0x120349);if(_0x71957a&&_0x110044?.[_0x89172b(0x2a4)])_0x110044['processes']['removeNode'](_0x120349+':'+_0x71957a[_0x89172b(0x1ad)])['catch'](()=>{});_0x2c097b[_0x89172b(0x2e7)](_0x120349),console[_0x89172b(0x38f)](_0x89172b(0x38c)+_0x120349+_0x89172b(0x174)+(_0x34df71??'?')+_0x89172b(0x2c4)+(_0x89172b(0x32e)+_0x3bfc23+_0x89172b(0x2df)+(_0x371ac9??_0x89172b(0x30a))+');\x20'+_0x2c097b['size']+_0x89172b(0x1a8))),_0x5e8b07();if(_0x2cae61||_0x34df71==null)return;const _0x45ab15=_0x228f25[_0x89172b(0x36d)](_0x34df71);if(!_0x45ab15||_0x45ab15[_0x89172b(0x1a4)])return;const _0x59bcef=Date['now']();_0x45ab15[_0x89172b(0x287)][_0x89172b(0x18a)](_0x59bcef),_0x45ab15[_0x89172b(0x287)]=_0x45ab15[_0x89172b(0x287)][_0x89172b(0x23e)](_0x3b71d4=>_0x59bcef-_0x3b71d4<=_0x9076ad);if(_0x45ab15['deaths'][_0x89172b(0x263)]>=_0x413e0e){_0x45ab15[_0x89172b(0x1a4)]=!![],console['error']('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x34df71+_0x89172b(0x260)+_0x45ab15[_0x89172b(0x287)][_0x89172b(0x263)]+_0x89172b(0x21e)+(_0x9076ad+_0x89172b(0x1d4)+_0x2c097b['size']+'\x20worker(s)\x20still\x20serving'));return;}_0x45ab15[_0x89172b(0x35b)]++;const _0x160688=Math['min'](_0x3a81ab,_0x369aea*0x2**(_0x45ab15['consecutiveFailures']-0x1));console[_0x89172b(0x38f)](_0x89172b(0x368)+_0x34df71+_0x89172b(0x2a2)+_0x160688+_0x89172b(0x38d)+_0x45ab15['consecutiveFailures']+')'),_0x45ab15[_0x89172b(0x2e9)]=setTimeout(()=>{const _0x119f29=_0x89172b;_0x45ab15['respawnTimer']=null;if(_0x2cae61||_0x45ab15[_0x119f29(0x1a4)])return;const _0x3f5415=_0x596cd5(_0x34df71);_0x3f5415['once'](_0x119f29(0x316),()=>{const _0x3caf8d=_0x119f29;if(_0x228f25[_0x3caf8d(0x36d)](_0x34df71)===_0x45ab15)_0x45ab15[_0x3caf8d(0x35b)]=0x0;});},_0x160688),_0x45ab15['respawnTimer'][_0x89172b(0x369)]?.();});const _0x387d55=[..._0x2c097b['keys']()];console[_0x53d2c9(0x38f)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+'\x20forked\x20'+_0xa41de6+_0x53d2c9(0x240)+_0x3ec7f2+':\x20'+('['+_0x387d55[_0x53d2c9(0x355)](',\x20')+']'));const _0x2d13c7={'_isClusterController':!![],'port':_0x3ec7f2,'primaryOkdb':_0x110044??null,'status'(){const _0x2611fa=_0x53d2c9;return{'clustered':!![],'primaryPid':process[_0x2611fa(0x322)],'port':_0x3ec7f2,'primaryRole':_0x110044?.['role']??null,'processorPid':null,'supervisorPid':process[_0x2611fa(0x322)],'workers':[..._0x2c097b[_0x2611fa(0x1ed)]()][_0x2611fa(0x2bb)](({worker:_0x5ad7f2})=>({'pid':_0x5ad7f2[_0x2611fa(0x277)]['pid'],'id':_0x5ad7f2['id'],'dead':_0x5ad7f2[_0x2611fa(0x378)]()}))};},async 'close'(){const _0x2db997=_0x53d2c9;_0x2cae61=!![];for(const _0x46298f of _0x228f25['values']()){_0x46298f[_0x2db997(0x1a4)]=!![],_0x46298f[_0x2db997(0x2e9)]&&(clearTimeout(_0x46298f[_0x2db997(0x2e9)]),_0x46298f[_0x2db997(0x2e9)]=null);}clearInterval(_0x5229cf),_0x12f8f5[_0x2db997(0x30f)](_0x2db997(0x198),_0x5dad9a),_0x12f8f5[_0x2db997(0x30f)](_0x2db997(0x198),_0x2acb33),_0x110044?.[_0x2db997(0x325)]?.[_0x2db997(0x30f)]?.(_0x1e1ac2[_0x2db997(0x32f)],_0x342ee5);if(_0x110044?.[_0x2db997(0x325)]?.[_0x2db997(0x30f)])for(const {event:_0x489ff6,handler:_0x2a37e7}of _0xc3d875){try{_0x110044[_0x2db997(0x325)][_0x2db997(0x30f)](_0x489ff6,_0x2a37e7);}catch{}}_0xc3d875[_0x2db997(0x263)]=0x0;const _0x53d80b=[..._0x2c097b[_0x2db997(0x1ed)]()][_0x2db997(0x2bb)](({worker:_0x1d6c8b})=>_0x1d6c8b);if(_0x53d80b[_0x2db997(0x263)]===0x0)return;await Promise['all'](_0x53d80b[_0x2db997(0x2bb)](_0x455b78=>new Promise(_0xa08d7f=>{const _0xa1619=_0x2db997;if(_0x455b78[_0xa1619(0x378)]()){_0xa08d7f();return;}let _0x50b79d=![];const _0xa01371=()=>{if(_0x50b79d)return;_0x50b79d=!![];if(_0x4ae14c)clearTimeout(_0x4ae14c);_0xa08d7f();};_0x455b78['once'](_0xa1619(0x175),_0xa01371);const _0x4ae14c=setTimeout(()=>{const _0x50a9a5=_0xa1619;try{_0x455b78[_0x50a9a5(0x277)][_0x50a9a5(0x1db)]();}catch{}},_0x3784f1+0x1f4);_0x4ae14c[_0xa1619(0x369)]?.();try{_0x455b78[_0xa1619(0x220)]();}catch{try{_0x455b78[_0xa1619(0x277)][_0xa1619(0x1db)]();}catch{}}})));}};return _0x2d13c7;}async function _0x24b546({makeOkdb:_0x5bf477,port:_0x2e7e00}){const _0xfadbd4=_0x21dc80,_0x507c94=await _0x5bf477();return _0x2abdbf(_0x507c94),_0x507c94[_0xfadbd4(0x2d4)][_0xfadbd4(0x2a3)](_0x2e7e00);}function _0x2abdbf(_0x4ba770){const _0x3dc53d=_0x21dc80;if(!_0x4ba770||_0x4ba770[_0x3dc53d(0x2e0)])return;_0x4ba770[_0x3dc53d(0x2e0)]=!![];try{const {OKDBChangefeed:_0x5e7b99}=requireOkdbChangefeed(),_0x33d3b8=_0x4ba770[_0x3dc53d(0x16e)];if(_0x33d3b8&&typeof _0x33d3b8[_0x3dc53d(0x1d3)]==='function'){const _0x179ad5=new _0x5e7b99(_0x4ba770);_0x179ad5['start'](),_0x33d3b8['attachFeed'](_0x179ad5),_0x4ba770[_0x3dc53d(0x202)]=_0x179ad5;}}catch(_0x3b2783){_0x4ba770[_0x3dc53d(0x38f)]?.[_0x3dc53d(0x307)]?.(_0x3dc53d(0x1f2)+(_0x3b2783?.[_0x3dc53d(0x198)]??_0x3b2783),{'feature':_0x3dc53d(0x311)});}const _0x177821=_0xbe89b9=>{const _0x20cc9d=_0x3dc53d;if(!_0xbe89b9||typeof _0xbe89b9!==_0x20cc9d(0x34b)||_0xbe89b9[_0x4b8194]==null)return;if(_0xbe89b9[_0x4b8194]===_0x25b6c6)try{_0x4ba770[_0x20cc9d(0x16e)]?.[_0x20cc9d(0x232)]?.(_0xbe89b9[_0x20cc9d(0x337)],_0xbe89b9['data']);}catch{}};process['on'](_0x3dc53d(0x198),_0x177821),_0x4ba770['_clusterOnMessage']=_0x177821;{let _0x1a969a=process[_0x3dc53d(0x25d)](),_0x460a46=Date[_0x3dc53d(0x2d7)]();const _0x36ca5d=()=>{const _0x5527de=_0x3dc53d;if(typeof process[_0x5527de(0x2f9)]!==_0x5527de(0x296)||!process[_0x5527de(0x2e2)])return;const _0x383541=Date['now'](),_0x25e1b2=process[_0x5527de(0x25d)](),_0x1d1c7c=(_0x383541-_0x460a46)*0x3e8,_0x778197=_0x25e1b2[_0x5527de(0x2c7)]-_0x1a969a['user']+(_0x25e1b2[_0x5527de(0x1b3)]-_0x1a969a[_0x5527de(0x1b3)]),_0x19736c=_0x1d1c7c>0x0?Math[_0x5527de(0x2d8)](0x64,Math['round'](_0x778197/(_0x1d1c7c*(_0x4fad02[_0x5527de(0x34f)]()['length']||0x1))*0x64)):0x0;_0x1a969a=_0x25e1b2,_0x460a46=_0x383541;const _0x315bac=process[_0x5527de(0x213)]();let _0x512df8=null;try{_0x512df8=_0x4ba770[_0x5527de(0x2da)]?.[_0x5527de(0x18b)]?_0x4ba770['processes']?.[_0x5527de(0x242)]?.()??null:null;}catch{}try{process[_0x5527de(0x2f9)]({[_0x4b8194]:_0x1e6ea8,'stats':{'rss':_0x315bac[_0x5527de(0x318)],'heapUsed':_0x315bac['heapUsed'],'heapTotal':_0x315bac['heapTotal'],'external':_0x315bac[_0x5527de(0x20b)],'cpuPct':_0x19736c,'cpuWindowMs':Math[_0x5527de(0x35c)](_0x1d1c7c/0x3e8)||null},'processing':_0x512df8});}catch{}},_0x2960d5=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x2ddcba=setInterval(_0x36ca5d,_0x2960d5);_0x2ddcba[_0x3dc53d(0x369)]?.(),_0x36ca5d();for(const _0x5bef81 of[_0x3dc53d(0x1c5),_0x3dc53d(0x2b3)]){_0x4ba770[_0x3dc53d(0x325)]?.['on']?.(_0x5bef81,()=>{try{_0x36ca5d();}catch{}});}}let _0x18c5e0=![];const _0x18efd1=async _0xc14431=>{const _0x5b74f4=_0x3dc53d;if(_0x18c5e0)return;_0x18c5e0=!![];const _0x1cd369=setTimeout(()=>process['exit'](_0xc14431),_0x3784f1);_0x1cd369[_0x5b74f4(0x369)]?.();try{await _0x4ba770[_0x5b74f4(0x233)]?.();}catch{}process[_0x5b74f4(0x175)](_0xc14431);};process['on']('disconnect',()=>_0x18efd1(0x0));if(process['platform']!==_0x3dc53d(0x364)){const _0x3da3a0=setInterval(()=>{const _0x285c38=_0x3dc53d;if(process[_0x285c38(0x315)]===0x1)_0x18efd1(0x0);},_0x31dc40);_0x3da3a0[_0x3dc53d(0x369)]?.(),_0x4ba770[_0x3dc53d(0x370)]=_0x3da3a0;}}return okdbCluster={'runClustered':_0x15ba26,'attachWorkerCluster':_0x2abdbf},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x165dc1=_0x6505f9;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x441f3d=require$$0$5,{attachWorkerCluster:_0x1f2456}=requireOkdbCluster();async function _0x6d2a44(){const _0x329a57=_0x53b1,_0x9b78f0=process.env.OKDB_HTTP_CHILD;if(!_0x9b78f0)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0x3d2153,port:_0x5a647d,options:options={},logLevel:logLevel=_0x329a57(0x25f)}=JSON[_0x329a57(0x217)](_0x9b78f0);if(!_0x3d2153||!_0x5a647d)throw new Error(_0x329a57(0x17a));const _0x47b84c=new _0x441f3d(_0x3d2153,{...options,'engines':![],'processors':![],'compaction':![]});_0x47b84c[_0x329a57(0x38f)][_0x329a57(0x333)]?.();const _0x1231be=process.env.OKDB_CLUSTER_SLOT??'?',_0xa8d02e={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3b302c=_0xa8d02e[logLevel]??_0xa8d02e[_0x329a57(0x25f)];_0x47b84c[_0x329a57(0x38f)][_0x329a57(0x386)](_0x5aa2f7=>{const _0x2e60d3=_0x329a57;if((_0xa8d02e[_0x5aa2f7[_0x2e60d3(0x25b)]]??0x1)<_0x3b302c)return;try{process[_0x2e60d3(0x2f9)]?.({'__okdbCluster':_0x2e60d3(0x38f),'slot':_0x1231be,'pid':process['pid'],'entry':_0x5aa2f7});}catch{}}),await _0x47b84c[_0x329a57(0x391)](),_0x1f2456(_0x47b84c),await _0x47b84c['http']['listen'](_0x5a647d);}return _0x6d2a44()[_0x165dc1(0x16f)](_0x276fad=>{const _0x150951=_0x165dc1;try{process['send']?.({'__okdbCluster':_0x150951(0x38f),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x150951(0x322)],'entry':{'level':_0x150951(0x20f),'msg':_0x150951(0x387)+(_0x276fad?.[_0x150951(0x198)]??_0x276fad)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x47719a=_0x3de3;(function(_0x4d9e79,_0x40ff6e){const _0x46b9c2=_0x3de3,_0x4b5a7f=_0x4d9e79();while(!![]){try{const _0x445bac=-parseInt(_0x46b9c2(0x147))/0x1+-parseInt(_0x46b9c2(0x12f))/0x2*(parseInt(_0x46b9c2(0x149))/0x3)+parseInt(_0x46b9c2(0x12b))/0x4+-parseInt(_0x46b9c2(0x14a))/0x5+parseInt(_0x46b9c2(0x16d))/0x6*(parseInt(_0x46b9c2(0x173))/0x7)+-parseInt(_0x46b9c2(0x13e))/0x8+parseInt(_0x46b9c2(0x14b))/0x9*(parseInt(_0x46b9c2(0x158))/0xa);if(_0x445bac===_0x40ff6e)break;else _0x4b5a7f['push'](_0x4b5a7f['shift']());}catch(_0x133337){_0x4b5a7f['push'](_0x4b5a7f['shift']());}}}(_0x9dcf,0x9e3c4));function _0x3de3(_0x3cd155,_0x47e212){_0x3cd155=_0x3cd155-0x126;const _0x9dcf49=_0x9dcf();let _0x3de3bf=_0x9dcf49[_0x3cd155];return _0x3de3bf;}function _0x9dcf(){const _0x817e2c=['system:proc','item:remove','dropFts','_activateViewStorage','done','9443880QhgXKl','system:ready','index:registered','bus:type_drop','index:drop','fts:reset','VIEW_PROGRESS','system:env_release','put','868837EbjBch','unique:violation','76317aBTbQZ','5934465BOAEWM','19869723bfHzYI','license:added','bus:proc','schema:set','system:drain','system:stopped','hasOwnProperty','type:drop','message','env:removed','bus:drain','registerFts','stopped','10HrFmew','license:invalid','registerType','system:poke','created','creating','env','type:registered','freeze','item:update','resetting','waiting','stopping','exit','txn:end','catch','exports','starting','started','dropping','error','6SHZrns','system:bus_state_change','open','system:type_drop','index:progress','resetFts','6795292QTnadL','dropSchema','postMessage','views','license:removed','ttl:set','txn:start','resetIndex','index:reset','clearTtl','ready','view:progress','5163764SBlOfM','worker_threads','_prepareViewDict','events','46gYtBdK','schema:drop','txn:rollback','dropType','default','__esModule','ref:violation_resolved','call','bus:poke','progress'];_0x9dcf=function(){return _0x817e2c;};return _0x9dcf();}var require$$0=require(_0x47719a(0x12c)),require$$1=require('./okdb');function getDefaultExportFromCjs(_0x2c446d){const _0x55d9b9=_0x47719a;return _0x2c446d&&_0x2c446d[_0x55d9b9(0x134)]&&Object['prototype'][_0x55d9b9(0x151)][_0x55d9b9(0x136)](_0x2c446d,'default')?_0x2c446d[_0x55d9b9(0x133)]:_0x2c446d;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x52b94d=_0x47719a;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x1805de={'PUT':_0x52b94d(0x146),'REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x52b94d(0x126),'TYPE_REGISTER':_0x52b94d(0x15a),'TYPE_DROP':_0x52b94d(0x132),'FTS_REGISTER':_0x52b94d(0x156),'FTS_DROP':_0x52b94d(0x13b),'FTS_RESET':_0x52b94d(0x172),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x52b94d(0x174),'TTL_SET':'setTtl','TTL_CLEAR':_0x52b94d(0x128)},_0x300790={'SYSTEM_READY':_0x52b94d(0x13f),'SYSTEM_STOPPED':_0x52b94d(0x150),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x52b94d(0x15b),'SYSTEM_DRAIN':_0x52b94d(0x14f),'SYSTEM_TYPE_DROP':_0x52b94d(0x170),'SYSTEM_PROC':_0x52b94d(0x139),'SYSTEM_BUS_STATE_CHANGE':_0x52b94d(0x16e),'ITEM_CREATE':'item:create','ITEM_UPDATE':_0x52b94d(0x161),'ITEM_REMOVE':_0x52b94d(0x13a),'INDEX_RESET':_0x52b94d(0x127),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x52b94d(0x171),'VIEW_PROGRESS':_0x52b94d(0x12a),'INDEX_DROP':_0x52b94d(0x142),'INDEX_REGISTERED':_0x52b94d(0x140),'FTS_REGISTERED':'fts:registered','FTS_DROP':'fts:drop','FTS_RESET':_0x52b94d(0x143),'SCHEMA_SET':_0x52b94d(0x14e),'SCHEMA_DROP':_0x52b94d(0x130),'UNIQUE_VIOLATION':_0x52b94d(0x148),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x52b94d(0x135),'SYNC_APPLY':'sync:apply','TXN_START':_0x52b94d(0x179),'TXN_END':_0x52b94d(0x166),'TXN_ROLLBACK':_0x52b94d(0x131),'TYPE_REGISTERED':_0x52b94d(0x15f),'TYPE_DROP':_0x52b94d(0x152),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x52b94d(0x154),'SYSTEM_ENV_RELEASE':_0x52b94d(0x145),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x52b94d(0x178),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x52b94d(0x159),'LICENSE_ADDED':_0x52b94d(0x14c),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x52b94d(0x177)},_0x59a5ff={'CREATING':_0x52b94d(0x15d),'RESETTING':_0x52b94d(0x162),'READY':_0x52b94d(0x129),'DROPPING':_0x52b94d(0x16b),'WAITING':_0x52b94d(0x163)},_0x5d41fc={'CREATED':_0x52b94d(0x15c),'STARTING':_0x52b94d(0x169),'STARTED':_0x52b94d(0x16a),'STOPPING':_0x52b94d(0x164),'STOPPED':_0x52b94d(0x157)},_0x25ac3e={'CREATING':_0x52b94d(0x15d),'READY':_0x52b94d(0x129),'HALTED':'halted','STOPPED':_0x52b94d(0x157),'RESETTING':'resetting'},_0x65c369=Object[_0x52b94d(0x160)]({'POKE':_0x52b94d(0x137),'DRAIN':_0x52b94d(0x155),'TYPE_DROP':_0x52b94d(0x141),'PROC':_0x52b94d(0x14d),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x65c369,'CHANGE_ACTIONS':_0x1805de,'EVENTS':_0x300790,'INDEX_STATE':_0x59a5ff,'OKDB_STATE':_0x5d41fc,'VIEW_STATE':_0x25ac3e},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x5927e0=_0x47719a;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x46c0db,workerData:_0x4dce17}=require$$0,_0x37b4f9=require$$1,{EVENTS:_0xfbf416}=requireOkdbEnums();async function _0xba2d24(){const _0x2739f4=_0x3de3,{rootPath:_0x176638,envName:_0x2c0a34,viewName:_0x59d5f2,definition:_0x1b55a4}=_0x4dce17,_0x84411=new _0x37b4f9(_0x176638,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x84411[_0x2739f4(0x16f)]();const _0x2c3bfc=_0x84411[_0x2739f4(0x15e)](_0x2c0a34);_0x2c3bfc[_0x2739f4(0x12e)]['on'](_0xfbf416[_0x2739f4(0x144)],_0x243102=>{const _0x372b0f=_0x2739f4;if(_0x243102?.['name']!==_0x59d5f2)return;try{_0x46c0db[_0x372b0f(0x175)]({'type':_0x372b0f(0x138),'event':_0x243102});}catch{}}),await _0x2c3bfc[_0x2739f4(0x176)][_0x2739f4(0x12d)](_0x1b55a4),await _0x2c3bfc[_0x2739f4(0x176)][_0x2739f4(0x13c)](_0x59d5f2,_0x1b55a4),await _0x2c3bfc[_0x2739f4(0x176)]['_runBootstrapScanPhases'](_0x59d5f2,_0x1b55a4),_0x46c0db['postMessage']({'type':_0x2739f4(0x13d)}),await _0x84411['close'](),process[_0x2739f4(0x165)](0x0);}return _0xba2d24()[_0x5927e0(0x167)](_0x11739c=>{const _0x4bb567=_0x5927e0;try{_0x46c0db['postMessage']({'type':_0x4bb567(0x16c),'error':_0x11739c[_0x4bb567(0x153)]??String(_0x11739c),'stack':_0x11739c['stack']});}catch{}process[_0x4bb567(0x165)](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x47719a(0x168)]=okdbViewsBootstrapWorker;
|