@kedem/okdb 2.0.1 → 2.0.2

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 _0x1f295a=_0x2647;(function(_0x5c604e,_0x3513a1){const _0x575924=_0x2647,_0x1ed273=_0x5c604e();while(!![]){try{const _0x49a93b=-parseInt(_0x575924(0x22e))/0x1+-parseInt(_0x575924(0x173))/0x2*(parseInt(_0x575924(0x15d))/0x3)+parseInt(_0x575924(0x16e))/0x4*(-parseInt(_0x575924(0x18b))/0x5)+parseInt(_0x575924(0x71))/0x6*(parseInt(_0x575924(0x1dc))/0x7)+-parseInt(_0x575924(0xfe))/0x8*(parseInt(_0x575924(0xe4))/0x9)+-parseInt(_0x575924(0x28a))/0xa+parseInt(_0x575924(0x16c))/0xb;if(_0x49a93b===_0x3513a1)break;else _0x1ed273['push'](_0x1ed273['shift']());}catch(_0x327e2f){_0x1ed273['push'](_0x1ed273['shift']());}}}(_0x1e27,0x8f718));var require$$0$5=require(_0x1f295a(0x152)),require$$1$1=require(_0x1f295a(0x24b)),require$$1=require(_0x1f295a(0xd8)),require$$0$3=require('os'),require$$2=require(_0x1f295a(0xf9)),require$$0=require(_0x1f295a(0x85)),require$$0$2=require(_0x1f295a(0x8c)),require$$0$1=require('fs'),require$$0$4=require(_0x1f295a(0x114));function _0x2647(_0x448b6e,_0x30c1a1){_0x448b6e=_0x448b6e-0x71;const _0x1e2756=_0x1e27();let _0x26478a=_0x1e2756[_0x448b6e];return _0x26478a;}function getDefaultExportFromCjs(_0xa5be5b){const _0x1d9dee=_0x1f295a;return _0xa5be5b&&_0xa5be5b[_0x1d9dee(0x1af)]&&Object[_0x1d9dee(0x268)][_0x1d9dee(0x15e)][_0x1d9dee(0x73)](_0xa5be5b,_0x1d9dee(0x26b))?_0xa5be5b[_0x1d9dee(0x26b)]:_0xa5be5b;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x128127=_0x1f295a;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2015da={'PUT':_0x128127(0xbf),'REMOVE':_0x128127(0x1e0),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x128127(0x1ef),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x128127(0x251),'TYPE_DROP':'dropType','FTS_REGISTER':_0x128127(0xb9),'FTS_DROP':_0x128127(0x143),'FTS_RESET':_0x128127(0xa6),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x128127(0xe7),'TTL_SET':_0x128127(0x1d7),'TTL_CLEAR':_0x128127(0x27a)},_0x58c7a3={'SYSTEM_READY':_0x128127(0xf7),'SYSTEM_STOPPED':_0x128127(0x1f7),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x128127(0x239),'SYSTEM_DRAIN':_0x128127(0x253),'SYSTEM_TYPE_DROP':_0x128127(0x242),'SYSTEM_PROC':_0x128127(0x264),'SYSTEM_BUS_STATE_CHANGE':_0x128127(0x19d),'ITEM_CREATE':_0x128127(0xe0),'ITEM_UPDATE':_0x128127(0xa2),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x128127(0xe6),'INDEX_READY':_0x128127(0x1b6),'INDEX_PROGRESS':_0x128127(0x26d),'VIEW_PROGRESS':_0x128127(0x259),'INDEX_DROP':_0x128127(0x269),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x128127(0xd0),'FTS_DROP':_0x128127(0x25b),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x128127(0x10a),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x128127(0x8e),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x128127(0x17b),'REF_VIOLATION_RESOLVED':_0x128127(0x1b9),'SYNC_APPLY':_0x128127(0x29f),'TXN_START':_0x128127(0x22f),'TXN_END':_0x128127(0x150),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x128127(0x14e),'TYPE_DROP':_0x128127(0x250),'ENV_OPENED':_0x128127(0xe1),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x128127(0x199),'TTL_SET':'ttl:set','TTL_CLEAR':_0x128127(0x175),'LICENSE_INVALID':_0x128127(0x1ab),'LICENSE_ADDED':_0x128127(0xc5),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x128127(0x169)},_0x30daf={'CREATING':_0x128127(0xbd),'RESETTING':_0x128127(0x1e9),'READY':_0x128127(0xdb),'DROPPING':_0x128127(0x164),'WAITING':'waiting'},_0x49c3ad={'CREATED':'created','STARTING':_0x128127(0x205),'STARTED':_0x128127(0xc4),'STOPPING':_0x128127(0x116),'STOPPED':_0x128127(0x8d)},_0xbafa7a={'CREATING':_0x128127(0xbd),'READY':'ready','HALTED':_0x128127(0x76),'STOPPED':_0x128127(0x8d),'RESETTING':_0x128127(0x1e9)},_0x389d93=Object[_0x128127(0x228)]({'POKE':_0x128127(0xa3),'DRAIN':'bus:drain','TYPE_DROP':_0x128127(0x1b0),'PROC':_0x128127(0x231),'ENV_RELEASE':_0x128127(0x178)});return okdbEnums={'BUS_EVENTS':_0x389d93,'CHANGE_ACTIONS':_0x2015da,'EVENTS':_0x58c7a3,'INDEX_STATE':_0x30daf,'OKDB_STATE':_0x49c3ad,'VIEW_STATE':_0xbafa7a},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x1735d3=_0x1f295a;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x5f1966,performance:_0x5a017c}=require$$0,_0x524ad4=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x1735d3(0x12c),_0x12ade4=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2e3f5a=process.env.OKDB_LOOP_LAG_ALL==='1',_0x1327f7=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x444594{constructor(){const _0x1c1cbc=_0x1735d3;this[_0x1c1cbc(0x1ff)]=_0x524ad4,this[_0x1c1cbc(0x23c)]=new Map(),this['_h']=null,this[_0x1c1cbc(0x11b)]=null,this[_0x1c1cbc(0x140)]=![],this[_0x1c1cbc(0x1cf)]=(_0x4e3ec6,_0x11620d)=>process['stderr']['write'](_0x4e3ec6+(_0x11620d?'\x20'+JSON[_0x1c1cbc(0x286)](_0x11620d):'')+'\x0a');}[_0x1735d3(0x236)](){const _0x5794eb=_0x1735d3;return _0x5a017c[_0x5794eb(0x236)]();}[_0x1735d3(0x11d)](_0x24832e){const _0xeb5f74=_0x1735d3;if(typeof _0x24832e===_0xeb5f74(0x1dd))this[_0xeb5f74(0x1cf)]=_0x24832e;}['note'](_0x31d653,_0x29beb7,_0x21a019){const _0x4b850d=_0x1735d3;if(!this[_0x4b850d(0x1ff)])return;let _0x490057=this[_0x4b850d(0x23c)][_0x4b850d(0x283)](_0x31d653);!_0x490057&&(_0x490057={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x4b850d(0x9e)](_0x31d653,_0x490057)),_0x490057['ms']+=_0x29beb7,_0x490057['count']+=0x1,_0x29beb7>_0x490057[_0x4b850d(0x1a7)]&&(_0x490057[_0x4b850d(0x1a7)]=_0x29beb7,_0x490057[_0x4b850d(0x1a2)]=_0x21a019||'');}[_0x1735d3(0x28d)](_0x1cc8f6){const _0x521736=_0x1735d3;if(!this[_0x521736(0x1ff)]||this[_0x521736(0x140)])return;this[_0x521736(0x140)]=!![];if(_0x1cc8f6)this['_log']=_0x1cc8f6;this['_h']=_0x5f1966({'resolution':0xa}),this['_h'][_0x521736(0x13e)](),this[_0x521736(0x11b)]=setInterval(()=>this[_0x521736(0x12a)](),_0x12ade4);if(this[_0x521736(0x11b)][_0x521736(0x103)])this[_0x521736(0x11b)][_0x521736(0x103)]();}['onWindow'](_0x53f356){const _0x2b2c38=_0x1735d3;if(!this[_0x2b2c38(0x157)])this[_0x2b2c38(0x157)]=new Set();this['_windowCbs'][_0x2b2c38(0x189)](_0x53f356);if(!this[_0x2b2c38(0x140)])this[_0x2b2c38(0x115)]();}['offWindow'](_0x2cefba){const _0x3cc8f1=_0x1735d3;this['_windowCbs']?.[_0x3cc8f1(0xce)](_0x2cefba);}[_0x1735d3(0x115)](){const _0x2bc77d=_0x1735d3;if(this['_admissionStarted'])return;this[_0x2bc77d(0x23d)]=!![];!this['_h']&&(this['_h']=_0x5f1966({'resolution':0xa}),this['_h'][_0x2bc77d(0x13e)]());const _0x100c42=_0x12ade4;this[_0x2bc77d(0x101)]=setInterval(()=>{const _0x37663c=_0x2bc77d,_0x3fa3b7=this['_h'];if(!_0x3fa3b7)return;const _0x15887a=_0x3fa3b7[_0x37663c(0x99)](0x63)/0xf4240,_0x9a0668=_0x3fa3b7[_0x37663c(0x28f)]/0xf4240,_0x5ce460=_0x3fa3b7[_0x37663c(0x297)]/0xf4240;_0x3fa3b7[_0x37663c(0x163)]();if(this['_windowCbs'])for(const _0x5c4be9 of this[_0x37663c(0x157)]){try{_0x5c4be9({'p99Ms':_0x15887a,'maxMs':_0x9a0668,'meanMs':_0x5ce460,'reportMs':_0x100c42});}catch{}}},_0x100c42);if(this[_0x2bc77d(0x101)][_0x2bc77d(0x103)])this[_0x2bc77d(0x101)][_0x2bc77d(0x103)]();}['_report'](){const _0x1799f9=_0x1735d3,_0xdd8a9e=this['_h'],_0x14796b=_0xdd8a9e[_0x1799f9(0x28f)]/0xf4240,_0xad81e2=_0xdd8a9e[_0x1799f9(0x99)](0x63)/0xf4240,_0x29eefa=_0xdd8a9e[_0x1799f9(0x297)]/0xf4240;_0xdd8a9e[_0x1799f9(0x163)]();const _0x1c3852=[...this[_0x1799f9(0x23c)][_0x1799f9(0x204)]()][_0x1799f9(0x8a)](([_0x207836,_0x5e1de4])=>({'label':_0x207836,..._0x5e1de4}))['sort']((_0x62037c,_0x3e70c1)=>_0x3e70c1['ms']-_0x62037c['ms'])[_0x1799f9(0x121)](0x0,0x8);this[_0x1799f9(0x23c)][_0x1799f9(0x196)]();const _0x462540=_0x1c3852[_0x1799f9(0xac)]((_0x2f3618,_0x3e33f1)=>_0x2f3618+_0x3e33f1['ms'],0x0),_0x37d9be=_0x1c3852[_0x1799f9(0x8a)](_0xea555a=>_0xea555a['label']+'='+_0xea555a['ms']['toFixed'](0x0)+_0x1799f9(0x1fa)+_0xea555a[_0x1799f9(0x1ed)]+(_0xea555a[_0x1799f9(0x1a7)]>0x5?_0x1799f9(0x16b)+_0xea555a[_0x1799f9(0x1a7)]['toFixed'](0x0)+'ms'+(_0xea555a[_0x1799f9(0x1a2)]?'\x20'+_0xea555a[_0x1799f9(0x1a2)]:'')+')':''));(_0x2e3f5a||_0x14796b>=_0x1327f7)&&this[_0x1799f9(0x1cf)](_0x1799f9(0x18c)+_0x12ade4+'ms\x20max='+_0x14796b[_0x1799f9(0x24d)](0x0)+_0x1799f9(0x217)+_0xad81e2['toFixed'](0x0)+_0x1799f9(0x24f)+_0x29eefa[_0x1799f9(0x24d)](0x0)+_0x1799f9(0x81)+_0x462540[_0x1799f9(0x24d)](0x0)+'ms'+(_0x37d9be[_0x1799f9(0x11c)]?_0x1799f9(0x77)+_0x37d9be['join']('\x20\x20'):''),{'feature':_0x1799f9(0x1b2)});if(this[_0x1799f9(0x157)])for(const _0x49b894 of this['_windowCbs']){try{_0x49b894({'p99Ms':_0xad81e2,'maxMs':_0x14796b,'meanMs':_0x29eefa,'reportMs':_0x12ade4});}catch{}}}['stop'](){const _0x4d8ae9=_0x1735d3;if(this[_0x4d8ae9(0x11b)])clearInterval(this[_0x4d8ae9(0x11b)]);if(this['_h'])this['_h'][_0x4d8ae9(0x198)]();this[_0x4d8ae9(0x11b)]=null,this['_h']=null,this[_0x4d8ae9(0x140)]=![];}}const _0x551b6c=new _0x444594();if(_0x551b6c[_0x1735d3(0x1ff)])_0x551b6c[_0x1735d3(0x28d)]();return okdbLoopMonitor={'LOOP':_0x551b6c},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x479f1b=require$$0$1,_0x4a0308=require$$1;let _0xdb33ee,_0xc874d1,_0x5dbfc7,_0x205895,_0x834e7e,_0x59b249,_0x561f95,_0x100533=![];const _0xe3f3ee=new Set();let _0xf33dfb=null;const _0x5671c0=new Map();function _0x4f2649(){const _0x21cd98=_0x2647;if(_0xdb33ee!==undefined)return _0xdb33ee;_0xdb33ee=process.env.OKDB_DIAG==='1';if(!_0xdb33ee)return![];_0xc874d1=process.env.OKDB_DIAG_STACK==='1',_0x205895=Math[_0x21cd98(0x28f)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x5dbfc7=new Array(_0x205895),_0x834e7e=0x0,_0x59b249=0x0,_0x561f95=process.env.OKDB_DIAG_DIR||null;if(_0x561f95)try{_0x479f1b[_0x21cd98(0x225)](_0x561f95,{'recursive':!![]});}catch{}return!![];}function _0x2837e7(){return _0xdb33ee===undefined?_0x4f2649():_0xdb33ee;}function _0x2b8283(_0x3d105a,_0x2f8954){const _0x45c416=_0x2647;if(_0xdb33ee===undefined?!_0x4f2649():!_0xdb33ee)return;let _0x3cbcf2;if(_0xc874d1){const _0x23d159=new Error()[_0x45c416(0xf2)]||'';_0x3cbcf2=_0x23d159[_0x45c416(0x1eb)]('\x0a')[_0x45c416(0x121)](0x3)['map'](_0xfbc5bd=>_0xfbc5bd[_0x45c416(0x235)]())[_0x45c416(0xc6)](Boolean)['slice'](0x0,0x8);}_0x5dbfc7[_0x834e7e]={'seq':_0x59b249++,'t':Date[_0x45c416(0x236)](),'env':_0x3d105a,'kind':_0x2f8954||_0x45c416(0x224),'stack':_0x3cbcf2},_0x834e7e=(_0x834e7e+0x1)%_0x205895;}function _0x270b5e(_0x1197ba){const _0x1801c6=_0x2647,_0x231474=[];for(let _0x376db7=0x0;_0x376db7<_0x205895;_0x376db7++){const _0x32ddcb=_0x5dbfc7[(_0x834e7e-0x1-_0x376db7+_0x205895*0x2)%_0x205895];if(!_0x32ddcb)continue;_0x231474[_0x1801c6(0xe8)](_0x32ddcb);if(_0x231474[_0x1801c6(0x11c)]>=_0x1197ba)break;}return _0x231474;}function _0x2a7da6(_0x2f1031){const _0x31409e=_0x2647;try{process[_0x31409e(0x21d)]['write'](_0x2f1031+'\x0a');}catch{}if(_0x561f95)try{_0x479f1b['appendFileSync'](_0x4a0308['join'](_0x561f95,_0x31409e(0x284)+process[_0x31409e(0x11f)]+_0x31409e(0x281)),_0x2f1031+'\x0a');}catch{}}function _0x20b9d9(_0xa444b5){const _0x44e594=_0x2647,_0x2d146d=_0x270b5e(_0xa444b5);if(!_0x2d146d[_0x44e594(0x11c)])return _0x44e594(0x1ad);const _0x731f10=Date[_0x44e594(0x236)]();return _0x2d146d[_0x44e594(0x8a)](_0x43fce2=>{const _0x36409a=_0x44e594,_0x571509=_0x36409a(0x1ee)+_0x43fce2[_0x36409a(0x287)]+'\x20-'+(_0x731f10-_0x43fce2['t'])+'ms\x20env='+_0x43fce2[_0x36409a(0x27f)]+'\x20'+_0x43fce2['kind'];return _0x43fce2[_0x36409a(0xf2)]&&_0x43fce2[_0x36409a(0xf2)][_0x36409a(0x11c)]?_0x571509+_0x36409a(0x1b3)+_0x43fce2['stack'][_0x36409a(0x1e6)](_0x36409a(0x1b3)):_0x571509;})['join']('\x0a');}function _0x1f54fe(_0x57b1fb,_0x44c5af){const _0x2f133e=_0x2647,_0x74fa8f=_0x2f133e(0x1bd)+_0x57b1fb+'\x20@\x20'+new Date()[_0x2f133e(0x249)]()+'\x20pid='+process['pid']+'\x20===',_0x4700c9=[_0x74fa8f,_0x2f133e(0xec)+(_0x44c5af&&_0x44c5af['stack']?_0x44c5af[_0x2f133e(0xf2)][_0x2f133e(0x1eb)]('\x0a')[0x0]:_0x44c5af),'recent\x20writes\x20(newest\x20first)'+(_0xc874d1?'':_0x2f133e(0x104))+':',_0x20b9d9(0x18),_0x184977(),'='[_0x2f133e(0x246)](_0x74fa8f[_0x2f133e(0x11c)]-0x1)];_0x2a7da6(_0x4700c9[_0x2f133e(0x1e6)]('\x0a'));}function _0x339d2c(_0x4e7c7f){const _0x3b18ec=_0x2647;if(!_0x2837e7())return;const _0xa1bfb5=String(_0x4e7c7f&&_0x4e7c7f[_0x3b18ec(0x161)]||_0x4e7c7f||''),_0x53d75e=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x3b18ec(0x232)](_0xa1bfb5);_0x1f54fe(_0x53d75e?_0x3b18ec(0xfb):_0x3b18ec(0xe2),_0x4e7c7f);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x53d75e)return;try{console[_0x3b18ec(0x82)](_0x4e7c7f&&_0x4e7c7f['stack']?_0x4e7c7f[_0x3b18ec(0xf2)]:_0x4e7c7f);}catch{}process[_0x3b18ec(0x174)](0x1);}function _0x33f5b6(_0x38041){const _0x282e13=_0x2647;if(!_0x2837e7())return;const _0x592873=String(_0x38041&&_0x38041['message']||_0x38041||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x282e13(0x232)](_0x592873)&&_0x1f54fe(_0x282e13(0x1ac),_0x38041);}function _0x184977(){const _0x4c9082=_0x2647,_0x32af1f=[_0x4c9082(0x25e)];let _0x63c16=![];for(const _0x2ed688 of _0xe3f3ee){const _0x525464=_0x2ed688&&_0x2ed688['_envs'];if(!_0x525464)continue;for(const [_0x5e0be9,_0x19e760]of _0x525464){const _0x2c648e=_0x19e760&&_0x19e760[_0x4c9082(0x22c)]&&_0x19e760[_0x4c9082(0x22c)][_0x4c9082(0x153)];if(!_0x2c648e)continue;let _0x597e0c,_0x2bf59e;try{_0x597e0c=Atomics['load'](_0x2c648e,0x0),_0x2bf59e=Atomics[_0x4c9082(0x272)](_0x2c648e,0x1);}catch{continue;}if(_0x597e0c===0x0)continue;_0x63c16=!![];const _0x37dcaa=_0x597e0c>0x0?_0x4c9082(0x107):'copy',_0x1d4531=Date[_0x4c9082(0x236)]()-Math['abs'](_0x597e0c)*0x3e8,_0x55e714=((()=>{const _0x5f293a=_0x4c9082;try{return _0x19e760[_0x5f293a(0x15c)]&&_0x19e760[_0x5f293a(0x15c)][_0x5f293a(0x270)]?_0x19e760[_0x5f293a(0x15c)][_0x5f293a(0x270)]():null;}catch{return null;}})());_0x32af1f['push']('\x20\x20env='+_0x5e0be9+_0x4c9082(0x170)+_0x37dcaa+_0x4c9082(0x215)+_0x1d4531+'ms\x20activeWriters='+_0x2bf59e+(_0x55e714?_0x4c9082(0x1c8)+_0x55e714['depth']+_0x4c9082(0x124)+_0x55e714['oldestPendingMs']+_0x4c9082(0x129)+_0x55e714[_0x4c9082(0x1df)]+'}':''));}}if(!_0x63c16)_0x32af1f[_0x4c9082(0xe8)](_0x4c9082(0x84));return _0x32af1f['join']('\x0a');}function _0x32c976(){const _0x1f7e9c=_0x2647;if(!_0x2837e7())return;const _0x2d715a=Math[_0x1f7e9c(0x28f)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x2b4190=Date[_0x1f7e9c(0x236)]();for(const _0x6cc9fb of _0xe3f3ee){const _0x4d7954=_0x6cc9fb&&_0x6cc9fb[_0x1f7e9c(0x159)];if(!_0x4d7954)continue;for(const [_0x2c43b2,_0x2d9e54]of _0x4d7954){const _0x475f49=_0x2d9e54&&_0x2d9e54[_0x1f7e9c(0x22c)]&&_0x2d9e54[_0x1f7e9c(0x22c)]['view'];if(!_0x475f49)continue;let _0x4a37f1;try{_0x4a37f1=Atomics[_0x1f7e9c(0x272)](_0x475f49,0x0);}catch{continue;}const _0x11e64c=_0x6cc9fb[_0x1f7e9c(0xd8)]+'|'+_0x2c43b2;if(_0x4a37f1<=0x0){_0x5671c0[_0x1f7e9c(0xce)](_0x11e64c);continue;}const _0x39282d=_0x2b4190-_0x4a37f1*0x3e8,_0x4c9370=_0x5671c0[_0x1f7e9c(0x283)](_0x11e64c);if(_0x39282d<_0x2d715a)continue;if(_0x4c9370&&_0x2b4190-_0x4c9370[_0x1f7e9c(0x208)]<_0x2d715a)continue;_0x5671c0[_0x1f7e9c(0x9e)](_0x11e64c,{'firstTs':_0x4c9370?_0x4c9370[_0x1f7e9c(0x2a3)]:_0x4a37f1,'dumpedAt':_0x2b4190});const _0x10efe1='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x39282d+_0x1f7e9c(0x20d)+_0x2c43b2+_0x1f7e9c(0xd2)+new Date()[_0x1f7e9c(0x249)]()+'\x20pid='+process[_0x1f7e9c(0x11f)]+'\x20===';_0x2a7da6([_0x10efe1,_0x184977(),'='[_0x1f7e9c(0x246)](_0x10efe1[_0x1f7e9c(0x11c)]-0x1)]['join']('\x0a'));}}}function _0x47313b(){const _0x216370=_0x2647;if(!_0x2837e7()||_0x100533)return;_0x100533=!![],process['prependListener'](_0x216370(0xe2),_0x339d2c),process['prependListener'](_0x216370(0x133),_0x33f5b6);const _0x2e5a04=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0xf33dfb=setInterval(_0x32c976,_0x2e5a04);if(_0xf33dfb[_0x216370(0x103)])_0xf33dfb[_0x216370(0x103)]();}function _0x317566(_0x3983ee){const _0x2a526c=_0x2647;if(!_0x2837e7()||!_0x3983ee)return;_0xe3f3ee[_0x2a526c(0x189)](_0x3983ee),_0x47313b();}function _0xd466e6(_0x5ccbd2){const _0x29f146=_0x2647;_0xe3f3ee[_0x29f146(0xce)](_0x5ccbd2);}function _0x2ddb1b(){const _0x578ca5=_0x2647;if(!_0x2837e7())return{'enabled':![],'hint':_0x578ca5(0x267)};return{'enabled':!![],'stackCapture':!!_0xc874d1,'recentWrites':_0x270b5e(0x10),'drain':_0x184977()};}return okdbDiag={'isEnabled':_0x2837e7,'recordWrite':_0x2b8283,'installDiag':_0x47313b,'registerOkdb':_0x317566,'unregisterOkdb':_0xd466e6,'snapshot':_0x2ddb1b},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x5ee825=_0x1f295a;if(hasRequiredOkdbWriter)return okdbWriter[_0x5ee825(0x131)];hasRequiredOkdbWriter=0x1;const {performance:_0x3c4a07}=require$$0$2,_0x5c1126=requireOkdbDiag(),_0x36b207=process.env.OKDB_COMMIT_MODE==='sync';class _0x2056f0{constructor(_0x32b22f){const _0x276501=_0x5ee825;this['env']=_0x32b22f,this[_0x276501(0x275)]=new Set(),this[_0x276501(0xfc)]=new Map(),this[_0x276501(0x12f)]=0x0,this[_0x276501(0x1cc)]=[],this['_done']=[],this[_0x276501(0x128)]=Math[_0x276501(0x28f)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this[_0x276501(0x212)]=[],this['_bpParkedTotal']=0x0;}async['transaction'](_0x3f5c44,_0x5beeb0){const _0x504e79=_0x5ee825;if(_0x5c1126[_0x504e79(0xd5)]())_0x5c1126[_0x504e79(0x1fb)](this[_0x504e79(0x27f)]?.[_0x504e79(0x8b)],_0x5beeb0);if(this['_closed']){const _0x43e4c5=new Error(_0x504e79(0xb4));_0x43e4c5[_0x504e79(0x1f4)]=_0x504e79(0x1ca);throw _0x43e4c5;}if(this[_0x504e79(0x128)]>0x0){let _0x2d4c48=![];while(this['_outstanding']>=this['_highWater']&&!this['_closed']){!_0x2d4c48&&(_0x2d4c48=!![],this[_0x504e79(0x184)]++),await new Promise(_0x2be007=>this[_0x504e79(0x212)][_0x504e79(0xe8)](_0x2be007));}if(this[_0x504e79(0x220)]){const _0x525991=new Error(_0x504e79(0xb4));_0x525991['code']=_0x504e79(0x1ca);throw _0x525991;}}this[_0x504e79(0xb2)]++;const _0x5539ef=this[_0x504e79(0x27f)][_0x504e79(0x22c)];if(_0x5539ef)await _0x5539ef[_0x504e79(0x1fc)]();if(this[_0x504e79(0x220)]){if(_0x5539ef)_0x5539ef['afterWrite']();this[_0x504e79(0xb2)]--;if(this['_bpWaiters']['length']&&this[_0x504e79(0xb2)]<this[_0x504e79(0x128)])this[_0x504e79(0x212)][_0x504e79(0x79)]()();const _0x3170d5=new Error(_0x504e79(0xb4));_0x3170d5[_0x504e79(0x1f4)]='ENV_CLOSING_RETRY';throw _0x3170d5;}const _0x2d03fe=_0x3c4a07[_0x504e79(0x236)]();if(_0x36b207)try{const _0x4e75c5=this[_0x504e79(0x27f)]['db'][_0x504e79(0x20c)](_0x3f5c44);this[_0x504e79(0x12f)]++;if(this[_0x504e79(0x1cc)][_0x504e79(0xe8)](_0x3c4a07[_0x504e79(0x236)]()-_0x2d03fe)>0x100)this[_0x504e79(0x1cc)]['shift']();if(this[_0x504e79(0x277)][_0x504e79(0xe8)](_0x3c4a07[_0x504e79(0x236)]())>0x800)this['_done'][_0x504e79(0x79)]();return _0x4e75c5;}finally{this['_outstanding']--;if(this[_0x504e79(0x212)]['length']&&this['_outstanding']<this[_0x504e79(0x128)])this['_bpWaiters'][_0x504e79(0x79)]()();if(_0x5539ef)_0x5539ef[_0x504e79(0x1a3)]();}const _0x4d503d=this[_0x504e79(0x27f)]['db'][_0x504e79(0x219)](_0x3f5c44);this[_0x504e79(0x275)][_0x504e79(0x189)](_0x4d503d),this[_0x504e79(0xfc)][_0x504e79(0x9e)](_0x4d503d,_0x2d03fe);const _0x395392=()=>{const _0x580081=_0x504e79;this[_0x580081(0x275)][_0x580081(0xce)](_0x4d503d),this[_0x580081(0xfc)][_0x580081(0xce)](_0x4d503d),this[_0x580081(0x12f)]++,this['_outstanding']--;this['_bpWaiters']['length']&&this[_0x580081(0xb2)]<this[_0x580081(0x128)]&&this[_0x580081(0x212)][_0x580081(0x79)]()();if(this[_0x580081(0x1cc)][_0x580081(0xe8)](_0x3c4a07['now']()-_0x2d03fe)>0x100)this[_0x580081(0x1cc)][_0x580081(0x79)]();if(this[_0x580081(0x277)][_0x580081(0xe8)](_0x3c4a07['now']())>0x800)this[_0x580081(0x277)][_0x580081(0x79)]();};_0x4d503d['then'](_0x395392,_0x395392);try{return await _0x4d503d;}finally{if(_0x5539ef)_0x5539ef[_0x504e79(0x1a3)]();}}['status'](){const _0x7b9e=_0x5ee825,_0x4769ea=_0x3c4a07[_0x7b9e(0x236)]();let _0x4c0049=0x0;for(const _0x35bda8 of this[_0x7b9e(0xfc)]['values']()){const _0x44f9db=_0x4769ea-_0x35bda8;if(_0x44f9db>_0x4c0049)_0x4c0049=_0x44f9db;}let _0x5ac79d=0x0;for(let _0x366fc9=this[_0x7b9e(0x277)][_0x7b9e(0x11c)]-0x1;_0x366fc9>=0x0;_0x366fc9--){if(_0x4769ea-this[_0x7b9e(0x277)][_0x366fc9]>0x3e8)break;_0x5ac79d++;}let _0x3647e1=0x0;if(this['_durs'][_0x7b9e(0x11c)]){const _0x2f8bb9=[...this[_0x7b9e(0x1cc)]][_0x7b9e(0x10b)]((_0x3b6c85,_0x42470d)=>_0x3b6c85-_0x42470d);_0x3647e1=_0x2f8bb9[Math[_0x7b9e(0x294)](_0x2f8bb9[_0x7b9e(0x11c)]-0x1,Math[_0x7b9e(0x258)](_0x2f8bb9[_0x7b9e(0x11c)]*0.99))];}return{'depth':this['_inflight'][_0x7b9e(0x248)],'oldestPendingMs':Math[_0x7b9e(0xcb)](_0x4c0049),'committed':this['_committed'],'commitsPerSec':_0x5ac79d,'commitP99Ms':Math[_0x7b9e(0xcb)](_0x3647e1),'parkedNow':this[_0x7b9e(0x212)][_0x7b9e(0x11c)],'parkedTotal':this[_0x7b9e(0x184)],'highWater':this[_0x7b9e(0x128)]};}['inflightAgesMs'](){const _0xf33cb6=_0x5ee825,_0x514141=_0x3c4a07['now']();return[...this[_0xf33cb6(0xfc)]['values']()][_0xf33cb6(0x8a)](_0xd1ea60=>Math['round'](_0x514141-_0xd1ea60))[_0xf33cb6(0x10b)]((_0x2c9903,_0x4d1120)=>_0x4d1120-_0x2c9903);}['markClosed'](){const _0x44aaa6=_0x5ee825;this[_0x44aaa6(0x220)]=!![];for(const _0x2bebd4 of this[_0x44aaa6(0x212)][_0x44aaa6(0x298)](0x0))_0x2bebd4();}async['drain'](){const _0x23bcf9=_0x5ee825;let _0x41b895=0x0;while(this[_0x23bcf9(0x275)][_0x23bcf9(0x248)]&&_0x41b895++<0x3e8){await Promise[_0x23bcf9(0x21e)]([...this[_0x23bcf9(0x275)]]);}}async[_0x5ee825(0xbf)](_0x209fe8,_0x227843,_0x153df6,_0x236a37){const _0x36bf1d=_0x5ee825;return this[_0x36bf1d(0x234)](()=>{const _0x4a1c0f=_0x36bf1d;if(_0x236a37===undefined)_0x209fe8[_0x4a1c0f(0x1b1)](_0x227843,_0x153df6);else _0x209fe8['putSync'](_0x227843,_0x153df6,_0x236a37);},_0x36bf1d(0x290));}async[_0x5ee825(0x1e0)](_0x2a5736,_0xb54d54){const _0x2cd308=_0x5ee825;return this['transaction'](()=>_0x2a5736[_0x2cd308(0x252)](_0xb54d54),_0x2cd308(0x191));}}async function _0x1b7b4a(_0x90eb23,_0x131c48){const _0x3b5581=_0x5ee825;if(_0x131c48==null)_0x131c48=Math[_0x3b5581(0x28f)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x147f04=_0x90eb23?.[_0x3b5581(0x1db)];if(!_0x147f04||typeof _0x147f04['then']!==_0x3b5581(0x1dd))return;await Promise['race']([Promise[_0x3b5581(0x105)](_0x147f04)['catch'](()=>{}),new Promise(_0x47e2d9=>{const _0x426f3d=_0x3b5581,_0x1a0553=setTimeout(_0x47e2d9,_0x131c48);if(_0x1a0553[_0x426f3d(0x103)])_0x1a0553['unref']();})]);}catch{}}function _0x2da1e8(_0x184a4f){const _0x24552c=_0x5ee825;if(_0x36b207)return Promise[_0x24552c(0x105)]();const _0x414d4c=_0x184a4f?.[_0x24552c(0x142)];return _0x414d4c&&typeof _0x414d4c[_0x24552c(0x100)]===_0x24552c(0x1dd)?_0x414d4c:Promise[_0x24552c(0x105)]();}return okdbWriter[_0x5ee825(0x131)]=_0x2056f0,okdbWriter[_0x5ee825(0x131)][_0x5ee825(0x26f)]=_0x1b7b4a,okdbWriter[_0x5ee825(0x131)][_0x5ee825(0x142)]=_0x2da1e8,okdbWriter[_0x5ee825(0x131)][_0x5ee825(0x160)]=_0x36b207,okdbWriter[_0x5ee825(0x131)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x5958cd=_0x1f295a;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x5540ff=require$$0$3,{SYNC_COMMITS:_0x54213a}=requireOkdbWriter(),_0x3c6efc='~lock';class _0x19c995{constructor(_0x37ee3f,_0xf2bff,_0x38383d){const _0x48d58e=_0x2647;this[_0x48d58e(0x9f)]=_0x37ee3f,this['_key']=_0xf2bff,this[_0x48d58e(0xba)]=_0x38383d,this[_0x48d58e(0x20b)]=![],this['_heartbeatTimer']=null,this[_0x48d58e(0x122)]=null;}[_0x5958cd(0x278)](){const _0x4bbd4d=_0x5958cd;if(this[_0x4bbd4d(0x20b)])return![];try{const _0x5c407e=this['_lock'][_0x4bbd4d(0xf4)]()[_0x4bbd4d(0x283)](this[_0x4bbd4d(0x102)]);if(!_0x5c407e||_0x5c407e[_0x4bbd4d(0x165)]!==this['_acquiredAt'])return![];const _0x25f3c4=_0x5c407e[_0x4bbd4d(0x14a)]??_0x5c407e['acquiredAt'];if(_0x25f3c4+_0x5c407e[_0x4bbd4d(0xdc)]<Date['now']())return![];return!![];}catch{return!this['_released'];}}[_0x5958cd(0x7a)](){const _0x1dfe9e=_0x5958cd;if(this[_0x1dfe9e(0x20b)])return null;try{return this[_0x1dfe9e(0x9f)][_0x1dfe9e(0xf4)]()[_0x1dfe9e(0x283)](this[_0x1dfe9e(0x102)])??null;}catch{return null;}}async['extend'](_0x4100b6){const _0x1a70bb=_0x5958cd;if(this[_0x1a70bb(0x20b)])return;try{const _0x188cae=this[_0x1a70bb(0x9f)][_0x1a70bb(0xf4)]()['get'](this[_0x1a70bb(0x102)]);if(!_0x188cae||_0x188cae[_0x1a70bb(0x165)]!==this[_0x1a70bb(0xba)])return;if(_0x54213a)this['_lock'][_0x1a70bb(0xf4)]()[_0x1a70bb(0x1b1)](this[_0x1a70bb(0x102)],{..._0x188cae,'ttlMs':_0x188cae['ttlMs']+_0x4100b6});else await this[_0x1a70bb(0x9f)]['_db']()[_0x1a70bb(0xbf)](this[_0x1a70bb(0x102)],{..._0x188cae,'ttlMs':_0x188cae[_0x1a70bb(0xdc)]+_0x4100b6});}catch{}}async[_0x5958cd(0x158)](){const _0x37264e=_0x5958cd;if(this['_released'])return;if(this[_0x37264e(0x122)])try{await this['_heartbeatInFlight'];}catch{}clearInterval(this[_0x37264e(0x190)]),this[_0x37264e(0x190)]=null,this['_released']=!![];try{const _0x55b584=this[_0x37264e(0x9f)][_0x37264e(0xf4)]()['get'](this['_key']);if(_0x55b584&&_0x55b584[_0x37264e(0x165)]===this[_0x37264e(0xba)]){if(_0x54213a)this['_lock']['_db']()['removeSync'](this[_0x37264e(0x102)]);else await this['_lock'][_0x37264e(0xf4)]()['remove'](this[_0x37264e(0x102)]);}}catch{}}[_0x5958cd(0x223)](_0x57f394,_0x22808a){const _0x4d4651=_0x5958cd,_0x720818=_0x22808a??Math[_0x4d4651(0x258)](_0x57f394/0x3);this[_0x4d4651(0x190)]=setInterval(()=>{const _0x52d855=_0x4d4651;if(this[_0x52d855(0x20b)])return;this['_heartbeatInFlight']=((async()=>{const _0x1d6869=_0x52d855;try{const _0x1cd2d5=this[_0x1d6869(0x9f)]['_db']()[_0x1d6869(0x283)](this['_key']);if(!_0x1cd2d5||_0x1cd2d5[_0x1d6869(0x165)]!==this[_0x1d6869(0xba)]){this[_0x1d6869(0x20b)]=!![],clearInterval(this[_0x1d6869(0x190)]),this[_0x1d6869(0x190)]=null;return;}if(_0x54213a)this[_0x1d6869(0x9f)][_0x1d6869(0xf4)]()[_0x1d6869(0x1b1)](this[_0x1d6869(0x102)],{..._0x1cd2d5,'updatedAt':Date['now']()});else await this['_lock']['_db']()[_0x1d6869(0xbf)](this[_0x1d6869(0x102)],{..._0x1cd2d5,'updatedAt':Date['now']()});}catch{}this['_heartbeatInFlight']=null;})());},_0x720818);if(this[_0x4d4651(0x190)]['unref'])this[_0x4d4651(0x190)][_0x4d4651(0x103)]();}}class _0x3ca39d{constructor(_0x39d269,{namespace:_0x3465a1,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x5b17ce=_0x5958cd;this['_rawDb']=_0x39d269,this['namespace']=_0x3465a1,this[_0x5b17ce(0xdc)]=ttlMs,this[_0x5b17ce(0x177)]=heartbeatMs,this[_0x5b17ce(0x1b8)]=null;}['_db'](){const _0x5ac824=_0x5958cd;return!this[_0x5ac824(0x1b8)]&&(this[_0x5ac824(0x1b8)]=this[_0x5ac824(0x151)][_0x5ac824(0x27d)](_0x3c6efc,{'dupSort':![]})),this['_lockDb'];}[_0x5958cd(0x21b)](){const _0x30928a=_0x5958cd;return!this[_0x30928a(0x26e)]&&(this[_0x30928a(0x26e)]=this[_0x30928a(0x151)]['openDB'](_0x3c6efc+_0x30928a(0x1ba),{'dupSort':![]})),this['_wantDbHandle'];}[_0x5958cd(0x102)](_0x5a0cfe){const _0x144947=_0x5958cd;return this[_0x144947(0x1c3)]+':'+_0x5a0cfe;}[_0x5958cd(0x233)](_0x194af5){const _0xd5b673=_0x5958cd;try{_0x54213a?this[_0xd5b673(0x21b)]()[_0xd5b673(0x1b1)](this[_0xd5b673(0x102)](_0x194af5),Date['now']()):this[_0xd5b673(0x21b)]()[_0xd5b673(0xbf)](this['_key'](_0x194af5),Date[_0xd5b673(0x236)]())?.[_0xd5b673(0xb8)]?.(()=>{});}catch{}}[_0x5958cd(0x2a4)](_0x4839f6,_0x2d3840=0x3e8){const _0x25c68b=_0x5958cd;try{const _0x5e5729=this[_0x25c68b(0x21b)]()[_0x25c68b(0x283)](this[_0x25c68b(0x102)](_0x4839f6));return typeof _0x5e5729===_0x25c68b(0x11a)&&Date[_0x25c68b(0x236)]()-_0x5e5729<_0x2d3840;}catch{return![];}}[_0x5958cd(0x18a)](_0x442b74){const _0x3cab59=_0x5958cd,_0x23dd2f=_0x442b74[_0x3cab59(0x14a)]??_0x442b74['acquiredAt'];return _0x23dd2f+_0x442b74[_0x3cab59(0xdc)]<Date[_0x3cab59(0x236)]();}static[_0x5958cd(0x280)](_0x3660dd){const _0x193a12=_0x5958cd,_0x5d281d=_0x3660dd?.['holder'];if(!_0x5d281d||typeof _0x5d281d[_0x193a12(0x11f)]!=='number')return![];if(_0x5d281d['hostname']!==_0x5540ff[_0x193a12(0x156)]())return![];if(_0x5d281d[_0x193a12(0x11f)]===process[_0x193a12(0x11f)])return![];try{return process[_0x193a12(0x1e5)](_0x5d281d[_0x193a12(0x11f)],0x0),![];}catch(_0xf4ed03){return _0xf4ed03[_0x193a12(0x1f4)]===_0x193a12(0x74);}}async['tryAcquire'](_0x38f9b4,_0x2d8b34={},_0x288a66={}){const _0x2b2daf=_0x5958cd,_0x3b6082=this[_0x2b2daf(0x102)](_0x38f9b4),_0x205dc4=_0x288a66[_0x2b2daf(0xdc)]??this[_0x2b2daf(0xdc)],_0x52cbca=Date[_0x2b2daf(0x236)](),_0x173170={'holder':{'pid':process[_0x2b2daf(0x11f)],'hostname':_0x5540ff[_0x2b2daf(0x156)](),..._0x2d8b34},'acquiredAt':_0x52cbca,'updatedAt':_0x52cbca,'ttlMs':_0x205dc4};let _0x57c1dd=![],_0xc0f563=null;try{const _0x3d24ff=()=>{const _0x2da931=_0x2b2daf,_0x1318db=this[_0x2da931(0xf4)]()[_0x2da931(0x283)](_0x3b6082);if(_0x1318db&&!this[_0x2da931(0x18a)](_0x1318db)&&!_0x3ca39d[_0x2da931(0x280)](_0x1318db)){const _0x5a98ed=_0x2d8b34[_0x2da931(0xd4)]!=null&&_0x1318db[_0x2da931(0x7a)][_0x2da931(0x11f)]===process['pid']&&_0x1318db[_0x2da931(0x7a)][_0x2da931(0xd4)]===_0x2d8b34[_0x2da931(0xd4)];if(!_0x5a98ed){_0x57c1dd=![],_0xc0f563=_0x1318db;return;}_0x173170[_0x2da931(0x165)]<=_0x1318db[_0x2da931(0x165)]&&(_0x173170[_0x2da931(0x165)]=_0x1318db['acquiredAt']+0x1,_0x173170['updatedAt']=_0x173170[_0x2da931(0x165)]);}this[_0x2da931(0xf4)]()['put'](_0x3b6082,_0x173170),_0x57c1dd=!![],_0xc0f563=_0x173170;};if(_0x54213a)this['_db']()[_0x2b2daf(0x20c)](_0x3d24ff);else await this[_0x2b2daf(0xf4)]()[_0x2b2daf(0x219)](_0x3d24ff);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x57c1dd)return{'acquired':![],'handle':null,'current':_0xc0f563};const _0xbcc75e=new _0x19c995(this,_0x3b6082,_0x173170['acquiredAt']);return _0xbcc75e[_0x2b2daf(0x223)](_0x205dc4,this[_0x2b2daf(0x177)]),{'acquired':!![],'handle':_0xbcc75e,'current':_0xc0f563};}[_0x5958cd(0x17e)](_0x362fbe){const _0x47a775=_0x5958cd;try{return this[_0x47a775(0xf4)]()[_0x47a775(0x283)](this[_0x47a775(0x102)](_0x362fbe))??null;}catch{return null;}}[_0x5958cd(0x17a)](){const _0x774896=_0x5958cd,_0x46f60f=this['namespace']+':',_0xdee307=[];try{for(const {key:_0xccf4f8,value:_0x235586}of this['_db']()[_0x774896(0xc7)]({'start':_0x46f60f,'end':_0x46f60f+'ÿ'})){typeof _0xccf4f8==='string'&&_0xccf4f8[_0x774896(0x27c)](_0x46f60f)&&_0xdee307[_0x774896(0xe8)]({'id':_0xccf4f8['slice'](_0x46f60f['length']),'entry':_0x235586});}}catch{}return _0xdee307;}static['listAll'](_0x4657ee){const _0x2e33c1=_0x5958cd,_0x493557=[];try{const _0x39f6a7=_0x4657ee['openDB'](_0x3c6efc,{'dupSort':![]});for(const {key:_0x4e46e1,value:_0x211542}of _0x39f6a7[_0x2e33c1(0xc7)]({})){if(typeof _0x4e46e1!==_0x2e33c1(0x22a))continue;const _0x1c5983=_0x4e46e1['indexOf'](':');if(_0x1c5983<0x1)continue;_0x493557[_0x2e33c1(0xe8)]({'namespace':_0x4e46e1[_0x2e33c1(0x121)](0x0,_0x1c5983),'id':_0x4e46e1[_0x2e33c1(0x121)](_0x1c5983+0x1),'entry':_0x211542});}}catch{}return _0x493557;}}return okdbLock={'OKDBLock':_0x3ca39d},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x118bba=_0x1f295a;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x51c37b=require$$0$3,_0x5c2af5=require$$1$1,_0x4b5fcc=require$$2,{LOOP:_0x8610d8}=requireOkdbLoopMonitor(),{OKDBLock:_0x44507c}=requireOkdbLock(),{SYNC_COMMITS:_0x2e9f4e}=requireOkdbWriter(),_0x3fd9ef=_0x118bba(0x1e1),_0x270d34=_0x118bba(0x18e),_0x39cf6b=_0x118bba(0x1e7),_0x5e4afb=_0x118bba(0xf3),_0x6b2226=(_0x5e8ee0,_0x4342a5)=>_0x5e8ee0+':'+_0x4342a5,_0x415eed=(_0x29483d,_0x55a6e5)=>_0x29483d+'::'+_0x55a6e5,_0x4a5a9d=(_0xed414,_0x1650df)=>_0xed414+'/'+_0x1650df,_0x3183d6=(_0x4d3167,_0x454b78)=>_0x4d3167+'#'+_0x454b78,_0x421904=_0x2d2488=>{const _0x592337=_0x118bba;if(_0x2d2488?.['processKey'])return _0x2d2488[_0x592337(0xa0)];const _0x3c6e30=_0x2d2488?.['nodeKey'];return typeof _0x3c6e30===_0x592337(0x22a)&&_0x3c6e30[_0x592337(0x90)]('#')?_0x3c6e30[_0x592337(0x121)](0x0,_0x3c6e30[_0x592337(0x127)]('#')):_0x3c6e30;},_0x457931=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0xeb011e=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x203463=_0x457931*0x3,_0x5467c0=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x118bba(0x28f)](0x927c0,_0x203463*0x14),_0x2983fc=[_0x118bba(0x273),_0x118bba(0x19e),_0x118bba(0x260),_0x118bba(0x226),_0x118bba(0x213),'processor:resumed'];let _0x266fe8=null;function _0x2b8f88(){const _0x6fff82=_0x118bba;if(_0x266fe8==null)_0x266fe8=Math[_0x6fff82(0xcb)]((Date['now']()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x266fe8;}function _0x3ae4e9(_0x798c41){const _0x54ce9c=_0x118bba;if(process.env.OKDB_PROCESS_KILL===_0x54ce9c(0x276))return![];if(_0x798c41?.[_0x54ce9c(0x98)]?.[_0x54ce9c(0x17d)]&&typeof _0x798c41[_0x54ce9c(0x98)][_0x54ce9c(0x17d)]===_0x54ce9c(0x13b)&&_0x798c41[_0x54ce9c(0x98)][_0x54ce9c(0x17d)]['kill']===![])return![];return!![];}function _0x3c1701(_0x36244b,_0x5133d6){const _0xa58a30=_0x118bba,_0x1e56a8=!!_0x5133d6?.[_0xa58a30(0x130)];switch(_0x36244b){case _0xa58a30(0x25f):return{'controllable':_0x1e56a8,'decommissionable':![],'killable':!![],'killConfirm':_0xa58a30(0x1de)};case'cli':case _0xa58a30(0x15b):return{'controllable':_0x1e56a8,'decommissionable':![],'killable':!![],'killConfirm':_0xa58a30(0x93)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0xa58a30(0x1ce):case'queue-worker':case _0xa58a30(0x14b):case _0xa58a30(0x200):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0xa58a30(0x265)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x55828a{constructor(_0x27d98f){const _0x3a2bc5=_0x118bba;this['okdb']=_0x27d98f,this[_0x3a2bc5(0x27e)]=null,this[_0x3a2bc5(0xc9)]=null,this[_0x3a2bc5(0x181)]=new Map(),this[_0x3a2bc5(0x229)]=null,this[_0x3a2bc5(0x1c5)]=![],this['_isReader']=![],this[_0x3a2bc5(0x221)]=_0x2b8f88(),this[_0x3a2bc5(0x211)]=_0x6b2226(process['pid'],this[_0x3a2bc5(0x221)]),this[_0x3a2bc5(0x126)]=_0x4b5fcc[_0x3a2bc5(0x1e2)]()['slice'](0x0,0x8),this[_0x3a2bc5(0x230)]=_0x3183d6(this['_selfKey'],this[_0x3a2bc5(0x126)]),this[_0x3a2bc5(0x18f)]=Date[_0x3a2bc5(0x236)](),this[_0x3a2bc5(0x27b)]=null,this[_0x3a2bc5(0x185)]=null,this[_0x3a2bc5(0x1da)]=null,this[_0x3a2bc5(0x23f)]=null,this['_onProcEvent']=null,this[_0x3a2bc5(0x209)]=null,this['_lastPublishAt']=0x0,this[_0x3a2bc5(0x7e)]={},this[_0x3a2bc5(0x202)]=new Map(),this[_0x3a2bc5(0x1b4)]=process[_0x3a2bc5(0x237)](),this['_lastCpuAt']=Date['now'](),this[_0x3a2bc5(0x138)]=0x0,this[_0x3a2bc5(0xed)]=new Map();}get[_0x118bba(0x20f)](){const _0x58f37d=_0x118bba;return this[_0x58f37d(0x211)];}get[_0x118bba(0x97)](){return this['_rowKey'];}['_caps'](_0x480a0b,_0x3e28d0){const _0x4c685a=_0x118bba,_0x4c82e1=_0x3c1701(_0x480a0b,_0x3e28d0);if(_0x4c82e1[_0x4c685a(0x1e4)]&&!_0x3ae4e9(this[_0x4c685a(0x1a8)]))return{..._0x4c82e1,'killable':![],'killConfirm':undefined};return _0x4c82e1;}[_0x118bba(0x167)](){return!!this['_statusEnv'];}['setOwnMeta'](_0x21195c){const _0x56783d=_0x118bba;Object['assign'](this[_0x56783d(0x7e)],_0x21195c||{});}['noteListenAddr'](_0x3d0ff1){const _0x30c2d5=_0x118bba;if(_0x3d0ff1)this[_0x30c2d5(0x1da)]=_0x3d0ff1;}[_0x118bba(0x1ea)](_0x2ab7c5={}){const _0x10478a=_0x118bba;return this['okdb'][_0x10478a(0xf5)](_0x2ab7c5);}[_0x118bba(0x19f)](){const _0xf6d6b2=_0x118bba,_0x326595={};let _0x481256=0x0,_0x3d63ea=0x0;const _0x566591=new Set();for(const _0x3b75ff of this[_0xf6d6b2(0x214)]()){_0x3d63ea++;const _0x5810b0=_0x3b75ff[_0xf6d6b2(0x136)];if(!_0x5810b0)continue;if(_0x5810b0[_0xf6d6b2(0x12b)])_0x481256++;for(const _0x5b7b69 of _0x5810b0['processors']||[]){if(!['single',_0xf6d6b2(0x109)][_0xf6d6b2(0x90)](_0x5b7b69[_0xf6d6b2(0x193)]))continue;(_0x5b7b69[_0xf6d6b2(0x1d4)]===_0xf6d6b2(0x245)||_0x5b7b69[_0xf6d6b2(0x1d4)]==='building')&&_0x5b7b69[_0xf6d6b2(0x137)]&&_0x566591[_0xf6d6b2(0x189)]((_0x5b7b69[_0xf6d6b2(0x27f)]||_0xf6d6b2(0x26b))+':'+_0x5b7b69[_0xf6d6b2(0x137)]);const _0x1869f0=_0x5b7b69['env']||_0xf6d6b2(0x26b);(_0x326595[_0x1869f0]||=[])[_0xf6d6b2(0xe8)]({..._0x5b7b69,'env':_0x1869f0,'owner':{'pid':_0x3b75ff[_0xf6d6b2(0x11f)]??null,'kind':_0x3b75ff[_0xf6d6b2(0x134)]??null}});}}for(const [_0x19cb6f,_0x405e97]of Object['entries'](_0x326595)){for(const _0x3a1fc9 of _0x405e97){if(_0x3a1fc9[_0xf6d6b2(0x193)]===_0xf6d6b2(0x147)&&!_0x3a1fc9[_0xf6d6b2(0x1cd)]){const _0x2e0e0b=_0x19cb6f+':'+(_0x3a1fc9[_0xf6d6b2(0x137)]??'');if(!_0x566591[_0xf6d6b2(0x26c)](_0x2e0e0b))_0x3a1fc9['unclaimed']=!![];}}}return{'envs':_0x326595,'policy':null,'participation':{'participating':_0x481256,'total':_0x3d63ea},'source':_0xf6d6b2(0x111)};}[_0x118bba(0x24c)](){const _0x5a89de=_0x118bba,_0x5ee62b=_0x5a65c8=>{const _0x9b2461=_0x2647;if(_0x5a65c8['state']==='online'||_0x5a65c8[_0x9b2461(0x1d4)]===_0x9b2461(0x1aa)||_0x5a65c8[_0x9b2461(0x1d4)]===_0x9b2461(0x82))return 0x3;if(_0x5a65c8[_0x9b2461(0x1cd)])return 0x1;return 0x2;},_0x26ff41=new Map();for(const _0x173c36 of this[_0x5a89de(0x214)]()){for(const _0x321f48 of _0x173c36[_0x5a89de(0x136)]?.[_0x5a89de(0x130)]||[]){const _0x154104={..._0x321f48,'owner':{'pid':_0x173c36[_0x5a89de(0x11f)]??null,'kind':_0x173c36[_0x5a89de(0x134)]??null,'host':_0x173c36[_0x5a89de(0x110)]??null}},_0x4ddcea=_0x321f48[_0x5a89de(0x193)]===_0x5a89de(0x147)?_0x5a89de(0x1a1)+(_0x321f48[_0x5a89de(0x27f)]??'')+'::'+(_0x321f48[_0x5a89de(0x137)]??_0x321f48[_0x5a89de(0x295)]??_0x321f48['id']):_0x5a89de(0x291)+(_0x173c36[_0x5a89de(0x1c2)]??_0x173c36[_0x5a89de(0xa0)]??'')+'::'+(_0x321f48[_0x5a89de(0x27f)]??'')+'::'+_0x321f48['id'],_0x226f2c=_0x26ff41[_0x5a89de(0x283)](_0x4ddcea);if(!_0x226f2c||_0x5ee62b(_0x154104)>_0x5ee62b(_0x226f2c))_0x26ff41[_0x5a89de(0x9e)](_0x4ddcea,_0x154104);}}return[..._0x26ff41[_0x5a89de(0x16d)]()];}[_0x118bba(0x1d2)](){const _0x3ed722=_0x118bba,_0x1c0626=Date[_0x3ed722(0x236)](),_0x18aa6c=this[_0x3ed722(0x214)](),_0x3c0f2e=_0x5de6b9=>Math['max'](0x0,Math['round']((_0x1c0626-(_0x5de6b9['startedAt']||_0x1c0626))/0x3e8)),_0x1e7f7d=_0x18aa6c['find'](_0x30c731=>_0x30c731[_0x3ed722(0x134)]===_0x3ed722(0x25f)),_0x2ead87=_0x18aa6c['filter'](_0x3d8c0e=>_0x3d8c0e[_0x3ed722(0x134)]===_0x3ed722(0x1ce));if(_0x1e7f7d||_0x2ead87['length'])return{'primary':_0x1e7f7d?{'pid':_0x1e7f7d[_0x3ed722(0x11f)],'uptime':_0x3c0f2e(_0x1e7f7d)}:null,'workers':_0x2ead87[_0x3ed722(0x8a)](_0x2fe742=>({'pid':_0x2fe742[_0x3ed722(0x11f)],'uptime':_0x3c0f2e(_0x2fe742)})),'workersConfigured':_0x1e7f7d?.[_0x3ed722(0xd1)]?.[_0x3ed722(0x192)]??_0x2ead87[_0x3ed722(0x11c)],'mode':'cluster'};const _0x1e8eff=_0x18aa6c['find'](_0x41352a=>_0x41352a[_0x3ed722(0x134)]===_0x3ed722(0x2a5)||_0x41352a['kind']==='standalone'||_0x41352a[_0x3ed722(0x134)]==='embedded'),_0x549d81=_0x1e8eff?{'pid':_0x1e8eff[_0x3ed722(0x11f)],'uptime':_0x3c0f2e(_0x1e8eff)}:{'pid':process[_0x3ed722(0x11f)],'uptime':Math[_0x3ed722(0x28f)](0x0,Math['round'](process[_0x3ed722(0x1a9)]()))};return{'primary':_0x549d81,'workers':[_0x549d81],'workersConfigured':0x1,'mode':'single'};}[_0x118bba(0x96)](){return this['_groupByProcess']();}[_0x118bba(0x274)](){const _0x48e3be=_0x118bba,_0x5299e8=new Map();for(const _0x382945 of this[_0x48e3be(0x194)]())_0x5299e8[_0x48e3be(0x9e)](_0x382945[_0x48e3be(0xa0)],{..._0x382945,'children':[]});const _0x573407=[];for(const _0x36c856 of _0x5299e8[_0x48e3be(0x16d)]()){const _0x1c894c=_0x36c856[_0x48e3be(0x183)]?_0x5299e8[_0x48e3be(0x283)](_0x36c856[_0x48e3be(0x183)]):null;if(_0x1c894c&&_0x1c894c!==_0x36c856)_0x1c894c[_0x48e3be(0x1d9)]['push'](_0x36c856);else _0x573407['push'](_0x36c856);}const _0x1a480c=(_0x208b87,_0x5332b6)=>_0x208b87[_0x48e3be(0x134)]===_0x5332b6['kind']?(_0x208b87[_0x48e3be(0x11f)]||0x0)-(_0x5332b6[_0x48e3be(0x11f)]||0x0):(_0x208b87[_0x48e3be(0x134)]??'')<(_0x5332b6[_0x48e3be(0x134)]??'')?-0x1:0x1,_0x52a510=_0x485b4a=>{const _0x3cd813=_0x48e3be;_0x485b4a[_0x3cd813(0x10b)](_0x1a480c);for(const _0x1de0e5 of _0x485b4a)if(_0x1de0e5[_0x3cd813(0x1d9)][_0x3cd813(0x11c)])_0x52a510(_0x1de0e5[_0x3cd813(0x1d9)]);};return _0x52a510(_0x573407),_0x573407;}[_0x118bba(0x262)](_0x48f08d){const _0x3b0b83=_0x118bba;return this[_0x3b0b83(0x194)]()[_0x3b0b83(0x17f)](_0x5ed98c=>_0x5ed98c[_0x3b0b83(0xa0)]===_0x48f08d)??null;}['_groupByProcess'](_0x5358bf=Date['now']()){const _0x5c042b=_0x118bba,_0x1d02bc=new Map();for(const _0x380d7f of this[_0x5c042b(0x214)]()){const _0x4ca2ef=_0x421904(_0x380d7f);let _0x16cae8=_0x1d02bc[_0x5c042b(0x283)](_0x4ca2ef);!_0x16cae8&&(_0x16cae8={'processKey':_0x4ca2ef,'nodeKey':_0x4ca2ef,'pid':_0x380d7f[_0x5c042b(0x11f)],'ppid':_0x380d7f[_0x5c042b(0xc2)]??null,'host':_0x380d7f[_0x5c042b(0x110)]??null,'kind':_0x380d7f[_0x5c042b(0x134)],'role':null,'supervisorKey':_0x380d7f['supervisorKey']??null,'slot':_0x380d7f[_0x5c042b(0xc0)]??null,'slotKey':_0x380d7f['slotKey']??null,'caps':_0x380d7f[_0x5c042b(0x145)]??null,'lifecycle':_0x380d7f['lifecycle']??null,'uptime':Math[_0x5c042b(0x28f)](0x0,Math['round']((_0x5358bf-(_0x380d7f['startedAt']||_0x5358bf))/0x3e8)),'startedAt':_0x380d7f[_0x5c042b(0xbe)]??null,'meta':_0x380d7f[_0x5c042b(0xd1)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x1d02bc[_0x5c042b(0x9e)](_0x4ca2ef,_0x16cae8));_0x16cae8[_0x5c042b(0x1f3)]['push']({'instanceId':_0x380d7f['instanceId']??null,'role':_0x380d7f[_0x5c042b(0x25c)]??null,'listenAddr':_0x380d7f[_0x5c042b(0x1bb)]??null,'lifecycle':_0x380d7f[_0x5c042b(0x1d0)]??null,'processing':_0x380d7f[_0x5c042b(0x136)]??null});if(!_0x16cae8[_0x5c042b(0x25c)]&&_0x380d7f[_0x5c042b(0x25c)])_0x16cae8['role']=_0x380d7f[_0x5c042b(0x25c)];if(!_0x16cae8['listenAddr']&&_0x380d7f[_0x5c042b(0x1bb)])_0x16cae8[_0x5c042b(0x1bb)]=_0x380d7f[_0x5c042b(0x1bb)];if(!_0x16cae8[_0x5c042b(0x136)]&&_0x380d7f[_0x5c042b(0x136)])_0x16cae8[_0x5c042b(0x136)]=_0x380d7f[_0x5c042b(0x136)];if(!_0x16cae8[_0x5c042b(0xbc)]&&_0x380d7f['engines'])_0x16cae8[_0x5c042b(0xbc)]=_0x380d7f[_0x5c042b(0xbc)];if(!_0x16cae8[_0x5c042b(0xae)]&&_0x380d7f['singletonClaims'])_0x16cae8[_0x5c042b(0xae)]=_0x380d7f['singletonClaims'];if(_0x16cae8[_0x5c042b(0x145)]==null&&_0x380d7f[_0x5c042b(0x145)])_0x16cae8['caps']=_0x380d7f['caps'];if(_0x380d7f[_0x5c042b(0x1c1)]&&(!_0x16cae8[_0x5c042b(0x1c1)]||(_0x380d7f[_0x5c042b(0x1c1)]['at']??0x0)>(_0x16cae8[_0x5c042b(0x1c1)]['at']??0x0)))_0x16cae8['stats']=_0x380d7f[_0x5c042b(0x1c1)];}return[..._0x1d02bc[_0x5c042b(0x16d)]()];}[_0x118bba(0x203)](){const _0x29cdd8=_0x118bba,_0x1d3521=[],_0x5a9e78={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x2b0e07 of this['_groupByProcess']()){_0x1d3521[_0x29cdd8(0xe8)]({'processKey':_0x2b0e07['processKey'],'kind':_0x2b0e07[_0x29cdd8(0x134)],'pid':_0x2b0e07[_0x29cdd8(0x11f)],'supervisorKey':_0x2b0e07[_0x29cdd8(0x183)],'meta':_0x2b0e07[_0x29cdd8(0xd1)]??null,'uptime':_0x2b0e07[_0x29cdd8(0x1a9)],'stats':_0x2b0e07[_0x29cdd8(0x1c1)]??null}),_0x5a9e78[_0x29cdd8(0x17d)]++;if(_0x2b0e07[_0x29cdd8(0x1c1)]){_0x5a9e78[_0x29cdd8(0x149)]+=_0x2b0e07['stats'][_0x29cdd8(0x149)]||0x0,_0x5a9e78[_0x29cdd8(0x1b5)]+=(_0x2b0e07[_0x29cdd8(0x1c1)]['heapUsed']||0x0)+(_0x2b0e07[_0x29cdd8(0x1c1)][_0x29cdd8(0x289)]?.['heapUsed']||0x0);const _0x228c22=_0x2b0e07['stats'][_0x29cdd8(0x289)];_0x228c22&&(_0x5a9e78[_0x29cdd8(0x289)]['count']+=_0x228c22[_0x29cdd8(0x1ed)]||0x0,_0x5a9e78[_0x29cdd8(0x289)][_0x29cdd8(0xab)]+=_0x228c22[_0x29cdd8(0xab)]||0x0,_0x5a9e78[_0x29cdd8(0x289)][_0x29cdd8(0x1a6)]+=_0x228c22[_0x29cdd8(0x1a6)]||0x0);}}return{'totals':_0x5a9e78,'nodes':_0x1d3521};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x3d1f82=_0x118bba;this[_0x3d1f82(0x1c5)]=this['_isWriter']||!!writer,this[_0x3d1f82(0x296)]=this[_0x3d1f82(0x296)]||!!reader,this[_0x3d1f82(0x27b)]=kind||this['_kind']||(_0x5c2af5[_0x3d1f82(0x187)]?_0x3d1f82(0x1ce):_0x3d1f82(0x2a5)),this['_supervisorKey']=supervisorKey??this['_supervisorKey'],this['_listenAddr']=listenAddr??this['_listenAddr'],this[_0x3d1f82(0x162)](),await this[_0x3d1f82(0x21f)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x559ebd=await this[_0x3d1f82(0x1a8)][_0x3d1f82(0x1f1)](_0x3fd9ef,{'sync':![],'durability':_0x3d1f82(0x21a)});if(!_0x559ebd[_0x3d1f82(0x7c)](_0x270d34))await _0x559ebd[_0x3d1f82(0x251)](_0x270d34);this[_0x3d1f82(0x27e)]=_0x559ebd;}return this[_0x3d1f82(0x27e)];}['_nodeDb'](){const _0x5a270f=_0x118bba;return this[_0x5a270f(0x2a0)]!==this[_0x5a270f(0x27e)]&&(this[_0x5a270f(0x2a0)]=this['_statusEnv'],this[_0x5a270f(0x1cb)]=this[_0x5a270f(0x27e)][_0x5a270f(0x1a5)](_0x270d34)['data']),this[_0x5a270f(0x1cb)];}['_putRowAsync'](_0x2db4e6){const _0x1c208e=_0x118bba;if(_0x2e9f4e)return this['_nodeDb']()['putSync'](_0x2db4e6[_0x1c208e(0x1c2)],_0x2db4e6,0x1);const _0x39c580=this['_nodeDb']()['put'](_0x2db4e6[_0x1c208e(0x1c2)],_0x2db4e6,0x1);if(_0x39c580&&typeof _0x39c580[_0x1c208e(0x100)]==='function')_0x39c580[_0x1c208e(0x100)](undefined,()=>{});return _0x39c580;}['_putRowSync'](_0x2d1246){const _0x50596b=_0x118bba;return this[_0x50596b(0x218)]()[_0x50596b(0x1b1)](_0x2d1246[_0x50596b(0x1c2)],_0x2d1246,0x1);}[_0x118bba(0x1c6)](_0x2c7ce8){const _0x41858a=_0x118bba;if(_0x2e9f4e)try{return this[_0x41858a(0x218)]()[_0x41858a(0x252)](_0x2c7ce8);}catch{return![];}const _0x2ff375=this['_nodeDb']()['remove'](_0x2c7ce8);if(_0x2ff375&&typeof _0x2ff375['then']===_0x41858a(0x1dd))_0x2ff375[_0x41858a(0x100)](undefined,()=>{});return _0x2ff375;}async[_0x118bba(0x9c)](_0xd21811){const _0x4f3c99=_0x118bba;if(!this[_0x4f3c99(0x27e)]||!this[_0x4f3c99(0x1c5)]||!_0xd21811?.['nodeKey'])return;return this[_0x4f3c99(0x80)](_0xd21811);}async[_0x118bba(0x10e)](_0x22201f){const _0x5555e1=_0x118bba;if(!this[_0x5555e1(0x27e)]||!this[_0x5555e1(0x1c5)]||!_0x22201f)return;const _0x48ed10=_0x22201f['includes']('#'),_0x37916f=[];for(const {key:_0x1422c9}of this['_statusEnv'][_0x5555e1(0xc7)](_0x270d34)){if(_0x1422c9===_0x22201f||!_0x48ed10&&typeof _0x1422c9===_0x5555e1(0x22a)&&_0x1422c9[_0x5555e1(0x27c)](_0x22201f+'#'))_0x37916f[_0x5555e1(0xe8)](_0x1422c9);}for(const _0x461553 of _0x37916f){try{this['_nodeDb']()[_0x5555e1(0x252)](_0x461553);}catch{}}}['_nodeDead'](_0x27d8c8){const _0x11ea5d=_0x118bba;if(typeof _0x27d8c8?.['pid']!==_0x11ea5d(0x11a))return![];if(_0x27d8c8[_0x11ea5d(0x110)]!==_0x51c37b[_0x11ea5d(0x156)]())return![];if(_0x27d8c8[_0x11ea5d(0x11f)]===process[_0x11ea5d(0x11f)])return![];if(_0x27d8c8['expiresAt']!=null&&_0x27d8c8[_0x11ea5d(0x16a)]<Date[_0x11ea5d(0x236)]()-_0x5467c0)return!![];try{return process[_0x11ea5d(0x1e5)](_0x27d8c8['pid'],0x0),![];}catch(_0x1963a2){return _0x1963a2['code']===_0x11ea5d(0x74);}}[_0x118bba(0x214)](){const _0x290cc4=_0x118bba;if(!this[_0x290cc4(0x27e)])return[];try{this[_0x290cc4(0x27e)]['db']?.[_0x290cc4(0xde)]?.();}catch{}const _0x1cd95b=Date[_0x290cc4(0x236)](),_0x5d37e8=_0x51c37b[_0x290cc4(0x156)](),_0x3a53f1=[];for(const {value:_0x2756ed}of this[_0x290cc4(0x27e)]['getRange'](_0x270d34)){if(!_0x2756ed)continue;let _0x1beeb6=null;_0x2756ed[_0x290cc4(0x110)]===_0x5d37e8&&typeof _0x2756ed[_0x290cc4(0x11f)]===_0x290cc4(0x11a)&&(_0x1beeb6=!this[_0x290cc4(0xc3)](_0x2756ed));if(_0x1beeb6===![])continue;const _0x31abb8=_0x2756ed['expiresAt']==null||_0x2756ed[_0x290cc4(0x16a)]>=_0x1cd95b;if(_0x1beeb6===!![]||_0x31abb8)_0x3a53f1[_0x290cc4(0xe8)](_0x2756ed);}return _0x3a53f1;}async['reap'](_0xef6a8e=0x0){const _0x868aab=_0x118bba;if(!this[_0x868aab(0x27e)]||!this[_0x868aab(0x1c5)])return;const _0x2ab7d1=Date[_0x868aab(0x236)]()-_0xef6a8e,_0x2c5a98=new Set(),_0x578ed4=[],_0x319d17=_0x51c37b['hostname']();for(const {key:_0x1a1bc3,value:_0x10628a}of this[_0x868aab(0x27e)][_0x868aab(0xc7)](_0x270d34)){if(!_0x10628a)continue;const _0x1e05b5=_0x10628a[_0x868aab(0x110)]===_0x319d17&&typeof _0x10628a[_0x868aab(0x11f)]===_0x868aab(0x11a),_0x317a7e=_0x1e05b5?this['_nodeDead'](_0x10628a):_0x10628a[_0x868aab(0x16a)]!=null&&_0x10628a[_0x868aab(0x16a)]<_0x2ab7d1;if(_0x317a7e)_0x578ed4[_0x868aab(0xe8)](_0x1a1bc3);else _0x2c5a98[_0x868aab(0x189)](_0x421904(_0x10628a)??_0x1a1bc3);}for(const _0x256aa3 of _0x578ed4)this[_0x868aab(0x1c6)](_0x256aa3);if(this[_0x868aab(0x162)]()){const _0x4e4d51=[];for(const {key:_0x139867}of this[_0x868aab(0x75)](_0x868aab(0x18e))){if(!_0x2c5a98[_0x868aab(0x26c)](_0x139867)){if(_0x2e9f4e)try{this[_0x868aab(0xc9)][_0x868aab(0x252)](_0x868aab(0x8f)+_0x139867);}catch{}else _0x4e4d51['push'](this[_0x868aab(0xc9)][_0x868aab(0x1e0)](_0x868aab(0x8f)+_0x139867));}}if(_0x4e4d51[_0x868aab(0x11c)])await Promise[_0x868aab(0x21e)](_0x4e4d51);}}[_0x118bba(0xef)](_0x58bf14=null){const _0x4c5a08=_0x118bba;if(this[_0x4c5a08(0x23f)])return;if(!this['_isWriter']||!this[_0x4c5a08(0x27e)]){this[_0x4c5a08(0x1a8)]?.[_0x4c5a08(0x9d)]?.[_0x4c5a08(0x1e3)]?.(_0x4c5a08(0x1d3)+this[_0x4c5a08(0x1c5)]+_0x4c5a08(0x1bc)+!!this[_0x4c5a08(0x27e)]+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':_0x4c5a08(0x17d)});return;}this[_0x4c5a08(0x209)]=_0x58bf14,this[_0x4c5a08(0x195)]=()=>this[_0x4c5a08(0xaf)]();for(const _0x1cf817 of _0x2983fc)this[_0x4c5a08(0x1a8)][_0x4c5a08(0x227)]['on'](_0x1cf817,this[_0x4c5a08(0x195)]);this[_0x4c5a08(0xb7)]();const _0x28d861=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x457931;this[_0x4c5a08(0x23f)]=setInterval(()=>{const _0x31f009=_0x4c5a08;if(this[_0x31f009(0x209)])try{this['_onTick']();}catch{}this[_0x31f009(0xb7)](),this[_0x31f009(0x299)]()[_0x31f009(0xb8)](()=>{});},_0x28d861);if(this[_0x4c5a08(0x23f)][_0x4c5a08(0x103)])this['_hbTimer'][_0x4c5a08(0x103)]();}['_maybePublish'](){const _0x3c8e82=_0x118bba;if(!this['_isWriter']||!this[_0x3c8e82(0x27e)])return;if(Date[_0x3c8e82(0x236)]()-this['_lastPublishAt']<_0xeb011e)return;this['_publishNow']();}[_0x118bba(0xb7)](){const _0x5ece99=_0x118bba;if(!this[_0x5ece99(0x1c5)]||!this[_0x5ece99(0x27e)])return;this['_lastPublishAt']=Date[_0x5ece99(0x236)]();try{const _0x3c27d9=[this[_0x5ece99(0xb1)]()];for(const _0x4f9978 of this[_0x5ece99(0x202)][_0x5ece99(0x16d)]())_0x3c27d9['push'](this[_0x5ece99(0x120)](_0x4f9978));const _0x2043e3=_0x8610d8[_0x5ece99(0x1ff)]?_0x8610d8[_0x5ece99(0x236)]():0x0;for(const _0x39f497 of _0x3c27d9){try{this[_0x5ece99(0xc1)](_0x39f497),this[_0x5ece99(0x1fd)]=![];}catch(_0x3074eb){!this[_0x5ece99(0x1fd)]&&(this[_0x5ece99(0x1fd)]=!![],this[_0x5ece99(0x1a8)]?.[_0x5ece99(0x9d)]?.['warn']?.(_0x5ece99(0xd3)+_0x3074eb[_0x5ece99(0x161)],{'feature':'processes'}));}}if(_0x8610d8[_0x5ece99(0x1ff)])_0x8610d8[_0x5ece99(0x25a)](_0x5ece99(0x117),_0x8610d8[_0x5ece99(0x236)]()-_0x2043e3,_0x5ece99(0xb5)+_0x3c27d9[_0x5ece99(0x11c)]+_0x5ece99(0x207));}catch(_0x116a57){!this[_0x5ece99(0x1fd)]&&(this['_publishFailWarned']=!![],this[_0x5ece99(0x1a8)]?.[_0x5ece99(0x9d)]?.[_0x5ece99(0x1e3)]?.(_0x5ece99(0xd3)+_0x116a57['message'],{'feature':'processes'}));}}async[_0x118bba(0xad)](){const _0x5a5faa=_0x118bba;if(this[_0x5a5faa(0x195)]){for(const _0x18650c of _0x2983fc){try{this['okdb'][_0x5a5faa(0x227)][_0x5a5faa(0x276)](_0x18650c,this['_onProcEvent']);}catch{}}this[_0x5a5faa(0x195)]=null;}this[_0x5a5faa(0x23f)]&&(clearInterval(this[_0x5a5faa(0x23f)]),this['_hbTimer']=null);try{if(this['_statusEnv']&&this[_0x5a5faa(0x1c5)])await this[_0x5a5faa(0x10e)](this['_rowKey']);}catch{}}async['deregisterSelf'](){const _0x4b3b7f=_0x118bba;if(!this[_0x4b3b7f(0x27e)]||!this[_0x4b3b7f(0x1c5)])return;try{await this[_0x4b3b7f(0x10e)](this[_0x4b3b7f(0x230)]);}catch{}try{const _0x4f5a2a=[];for(const {value:_0x124b8}of this[_0x4b3b7f(0x27e)][_0x4b3b7f(0xc7)](_0x270d34)){if(_0x124b8?.[_0x4b3b7f(0xc2)]===process[_0x4b3b7f(0x11f)]&&_0x124b8[_0x4b3b7f(0x1c2)])_0x4f5a2a['push'](_0x124b8[_0x4b3b7f(0x1c2)]);}for(const _0x5297a9 of _0x4f5a2a){try{await this[_0x4b3b7f(0x10e)](_0x5297a9);}catch{}}}catch{}}async[_0x118bba(0xca)](){const _0xa58eef=_0x118bba;return this[_0xa58eef(0x9c)](this[_0xa58eef(0xb1)]());}async[_0x118bba(0x148)](_0x1c3c73){const _0xfd886b=_0x118bba;if(!this[_0xfd886b(0x27e)]||!this[_0xfd886b(0x1c5)])return;return this['putNode'](this[_0xfd886b(0x120)](_0x1c3c73));}[_0x118bba(0x120)]({pid:_0xd06399,startedAt:_0x5dce6c,kind:_0x18c150,supervisorKey:_0x18d5c9,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x118bba(0x15a),meta:meta=null,stats:stats=null}){const _0x200149=_0x118bba,_0x43e9b1=Date['now'](),_0x59c59e=_0x6b2226(_0xd06399,_0x5dce6c);return{'nodeKey':_0x3183d6(_0x59c59e,'0'),'processKey':_0x59c59e,'instanceId':'0','pid':_0xd06399,'startedAt':_0x5dce6c,'ppid':process['pid'],'host':_0x51c37b['hostname'](),'supervisorKey':_0x18d5c9,'slot':slot,'slotKey':slotKey,'kind':_0x18c150,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x43e9b1,'expiresAt':_0x43e9b1+_0x203463,'caps':this[_0x200149(0x14f)](_0x18c150,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x118bba(0x29e)](_0x10bcca){const _0x31d075=_0x118bba;if(!_0x10bcca?.[_0x31d075(0x11f)])return null;const _0x4bd30a=_0x6b2226(_0x10bcca[_0x31d075(0x11f)],_0x10bcca[_0x31d075(0xbe)]);this[_0x31d075(0x202)][_0x31d075(0x9e)](_0x4bd30a,{..._0x10bcca,'supervisorKey':_0x10bcca[_0x31d075(0x183)]??this['_selfKey']});if(this[_0x31d075(0x1c5)])await this[_0x31d075(0x148)](this[_0x31d075(0x202)][_0x31d075(0x283)](_0x4bd30a))[_0x31d075(0xb8)]?.(()=>{});return _0x4bd30a;}[_0x118bba(0x20e)](_0x4dd0ed){const _0x50a552=_0x118bba;if(!_0x4dd0ed)return;return this[_0x50a552(0x202)][_0x50a552(0xce)](_0x4dd0ed),this['removeNode'](_0x4dd0ed);}['_sampleOwnStats'](){const _0x646d19=_0x118bba,_0x466686=Date['now'](),_0x4265e3=process[_0x646d19(0x237)](),_0x480edb=(_0x466686-this[_0x646d19(0x9b)])*0x3e8;if(_0x480edb>=0x3d090){const _0x28eb8a=_0x4265e3['user']-this[_0x646d19(0x1b4)]['user']+(_0x4265e3[_0x646d19(0x7b)]-this[_0x646d19(0x1b4)][_0x646d19(0x7b)]),_0x4aa6f0=_0x51c37b[_0x646d19(0x1b7)]()[_0x646d19(0x11c)]||0x1;this[_0x646d19(0x138)]=Math[_0x646d19(0x294)](0x64,Math[_0x646d19(0xcb)](_0x28eb8a/(_0x480edb*_0x4aa6f0)*0x64)),this[_0x646d19(0x13d)]=Math[_0x646d19(0xcb)](_0x480edb/0x3e8),this[_0x646d19(0x1b4)]=_0x4265e3,this[_0x646d19(0x9b)]=_0x466686;}const _0x2fe505=process[_0x646d19(0x125)](),_0x30cf79=this[_0x646d19(0xed)][_0x646d19(0x248)];let _0x3bd63d=0x0;if(_0x30cf79>0x0){const _0x750d9b=[this['okdb'],...this[_0x646d19(0x1a8)][_0x646d19(0x159)]?.['values']?.()??[]];for(const _0x226320 of _0x750d9b){const _0x2e0cdf=_0x226320[_0x646d19(0x197)]?.[_0x646d19(0x28b)];if(_0x2e0cdf)_0x3bd63d+=_0x2e0cdf[_0x646d19(0x119)][_0x646d19(0x1a6)];}}let _0x1c451d=null;const _0x4091d7=_0x30cf79;if(_0x4091d7>0x0){let _0x3d815b=0x0;for(const _0x142b80 of this[_0x646d19(0xed)][_0x646d19(0x16d)]())_0x3d815b+=_0x142b80[_0x646d19(0x1b5)]||0x0;_0x1c451d={'count':_0x4091d7,'heapUsed':_0x3d815b,'sandbox':_0x30cf79,'busy':_0x3bd63d};}return{'rss':_0x2fe505[_0x646d19(0x149)],'heapUsed':_0x2fe505[_0x646d19(0x1b5)],'heapTotal':_0x2fe505[_0x646d19(0x19b)],'external':_0x2fe505[_0x646d19(0x256)],'cpuPct':this[_0x646d19(0x138)],'cpuWindowMs':this[_0x646d19(0x13d)]??null,'threads':_0x1c451d,'at':_0x466686};}['reportThreadStats'](_0x409984,_0x574077){const _0xb6a1ef=_0x118bba;if(!_0x409984||!_0x574077)return;this[_0xb6a1ef(0xed)][_0xb6a1ef(0x9e)](_0x409984,_0x574077);}[_0x118bba(0x135)](_0x388180){const _0x361197=_0x118bba;this['_threadStats'][_0x361197(0xce)](_0x388180);}[_0x118bba(0x1f9)](_0x1f08a4,_0x3d8b74,_0x18c999=undefined){const _0x17016b=_0x118bba,_0x5d02a6=this[_0x17016b(0x202)]['get'](_0x1f08a4);if(!_0x5d02a6||!_0x3d8b74)return;if(_0x18c999!==undefined)_0x5d02a6['processing']=_0x18c999;_0x5d02a6[_0x17016b(0x1c1)]={'rss':_0x3d8b74[_0x17016b(0x149)]??null,'heapUsed':_0x3d8b74[_0x17016b(0x1b5)]??null,'heapTotal':_0x3d8b74[_0x17016b(0x19b)]??null,'external':_0x3d8b74[_0x17016b(0x256)]??null,'cpuPct':_0x3d8b74[_0x17016b(0x243)]??null,'cpuWindowMs':_0x3d8b74[_0x17016b(0x279)]??null,'threads':_0x3d8b74['threads']??null,'claims':_0x3d8b74['claims']??null,'envsOpen':_0x3d8b74['envsOpen']??null,'at':Date[_0x17016b(0x236)]()};}[_0x118bba(0xb1)](){const _0x4d8854=_0x118bba,_0x140d48=Date[_0x4d8854(0x236)](),_0x111380=this[_0x4d8854(0x1a8)][_0x4d8854(0x240)]||{},_0xb30853=this[_0x4d8854(0x27b)]||'cli';return{'nodeKey':this[_0x4d8854(0x230)],'processKey':this['_selfKey'],'instanceId':this['_instanceId'],'pid':process[_0x4d8854(0x11f)],'startedAt':this[_0x4d8854(0x221)],'instanceStartedAt':this[_0x4d8854(0x18f)],'ppid':typeof process['ppid']===_0x4d8854(0x11a)?process[_0x4d8854(0xc2)]:null,'host':_0x51c37b['hostname'](),'supervisorKey':this[_0x4d8854(0x185)]??null,'kind':_0xb30853,'role':{'engines':!!_0x111380[_0x4d8854(0xbc)],'processors':!!_0x111380[_0x4d8854(0x130)],'compaction':_0x111380[_0x4d8854(0x29c)],'http':_0x111380['http']},'listenAddr':this[_0x4d8854(0x1da)]??null,'heartbeatAt':_0x140d48,'expiresAt':_0x140d48+_0x203463,'caps':this[_0x4d8854(0x14f)](_0xb30853,_0x111380),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x111380[_0x4d8854(0x130)]?this['_buildProcessingFacet']():null,'engines':_0x111380[_0x4d8854(0xbc)]?[...this[_0x4d8854(0x1a8)][_0x4d8854(0x1ec)]??[]]:null,'singletonClaims':this[_0x4d8854(0xb3)](),'stats':this['_sampleOwnStats'](),'writers':this[_0x4d8854(0x12e)]()};}['_collectWriterFacet'](){const _0x83ab9e=_0x118bba,_0x327651={};try{for(const [_0xf14a37,_0x415dad]of this[_0x83ab9e(0x1a8)][_0x83ab9e(0x159)]){try{const _0x3c0e80=_0x415dad[_0x83ab9e(0x176)]?.();if(!_0x3c0e80)continue;if(!_0x3c0e80['depth']&&!_0x3c0e80[_0x83ab9e(0x142)]&&!(_0x3c0e80[_0x83ab9e(0x1df)]??0x0)&&!_0x3c0e80[_0x83ab9e(0x180)])continue;_0x327651[_0xf14a37]={'depth':_0x3c0e80[_0x83ab9e(0x1ae)],'oldestPendingMs':_0x3c0e80[_0x83ab9e(0x24a)],'committed':_0x3c0e80[_0x83ab9e(0x142)],'commitsPerSec':_0x3c0e80[_0x83ab9e(0x10c)],'commitP99Ms':_0x3c0e80[_0x83ab9e(0x2a2)],'parkedNow':_0x3c0e80[_0x83ab9e(0x1df)]??0x0,'draining':!!_0x3c0e80['draining']};}catch{}}}catch{}return Object[_0x83ab9e(0xea)](_0x327651)[_0x83ab9e(0x11c)]?_0x327651:null;}[_0x118bba(0xb3)](){const _0x4f93ad=_0x118bba,_0x2caace=process[_0x4f93ad(0x11f)],_0x2f76a0=Date[_0x4f93ad(0x236)](),_0x76942=_0x1cd6db=>{const _0x90df29=_0x4f93ad;if(!_0x1cd6db)return[];const _0xce4c1c=[];try{for(const {id:_0x32c140,entry:_0x10dc34}of _0x1cd6db[_0x90df29(0x17a)]()){if(_0x10dc34?.[_0x90df29(0x7a)]?.['pid']!==_0x2caace)continue;const _0x2d80e=_0x10dc34[_0x90df29(0x14a)]??_0x10dc34[_0x90df29(0x165)]??0x0;if(_0x2d80e+(_0x10dc34[_0x90df29(0xdc)]??0x0)<_0x2f76a0)continue;_0xce4c1c[_0x90df29(0xe8)](_0x32c140);}}catch{}return _0xce4c1c;},_0x396c23=_0x76942(this[_0x4f93ad(0x1a0)](_0x4f93ad(0x247))),_0x57f84c=_0x76942(this[_0x4f93ad(0x1a0)]('sync'));if(!_0x396c23[_0x4f93ad(0x11c)]&&!_0x57f84c[_0x4f93ad(0x11c)])return null;return{'compact':_0x396c23,'replicate':_0x57f84c};}[_0x118bba(0x1a0)](_0x4330b7){const _0x546d58=_0x118bba;if(!this['okdb']?.[_0x546d58(0x86)])return null;if(!this[_0x546d58(0xcd)])this[_0x546d58(0xcd)]=new Map();let _0x302fee=this['_singletonLocks'][_0x546d58(0x283)](_0x4330b7);if(!_0x302fee)try{_0x302fee=new _0x44507c(this[_0x546d58(0x1a8)][_0x546d58(0x86)],{'namespace':_0x4330b7}),this['_singletonLocks'][_0x546d58(0x9e)](_0x4330b7,_0x302fee);}catch{return null;}return _0x302fee;}['_buildProcessingFacet'](){const _0x239220=_0x118bba,_0x413ab1=[];try{for(const [_0x4dfadf,_0x36785b]of this[_0x239220(0x1a8)][_0x239220(0x159)]){if(_0x4dfadf['startsWith']('~'))continue;for(const _0x3b1047 of _0x36785b[_0x239220(0xfd)][_0x239220(0x112)]())_0x413ab1[_0x239220(0xe8)]({..._0x3b1047,'env':_0x4dfadf});}}catch{}return{'participate':this[_0x239220(0x1a8)][_0x239220(0x130)]?.[_0x239220(0x1f8)]??![],'processors':_0x413ab1};}[_0x118bba(0x162)](){const _0x470ed3=_0x118bba;if(this[_0x470ed3(0xc9)])return!![];const _0xf59b5e=this[_0x470ed3(0x1a8)][_0x470ed3(0x86)];if(!_0xf59b5e)return![];return this[_0x470ed3(0xc9)]=_0xf59b5e[_0x470ed3(0x27d)](_0x39cf6b,{'dupSort':![]}),this[_0x470ed3(0x229)]=_0xf59b5e[_0x470ed3(0x27d)](_0x5e4afb,{'dupSort':![]}),!![];}async[_0x118bba(0x21f)](){const _0x28a09b=_0x118bba;if(!this[_0x28a09b(0x162)]())return;const _0x325454=_0x28a09b(0x118),_0x156cff=0x1,_0x23a9d2=this[_0x28a09b(0xc9)][_0x28a09b(0x283)](_0x325454)??0x0;if(_0x23a9d2>=_0x156cff)return;const _0xdcd856=_0xcae1bb=>{const _0x3c8228=_0x28a09b;if(_0xcae1bb===_0x3c8228(0x200))return _0x3c8228(0x147);if(_0xcae1bb==='async')return _0x3c8228(0x109);return _0xcae1bb;};await this['okdb']['_systemEnv'][_0x28a09b(0x15c)]['transaction'](()=>{const _0x10ad69=_0x28a09b;for(const _0x21cf22 of[_0x10ad69(0x17c),_0x10ad69(0xcc)]){for(const {key:_0x55d3dd,value:_0x583bce}of this['_desired'][_0x10ad69(0xc7)]({'start':_0x21cf22,'end':_0x21cf22+'ÿ'})){if(typeof _0x55d3dd!=='string'||!_0x55d3dd[_0x10ad69(0x27c)](_0x21cf22))break;const _0x464eb2=_0xdcd856(_0x583bce[_0x10ad69(0x193)]);if(_0x464eb2!==_0x583bce[_0x10ad69(0x193)])this[_0x10ad69(0xc9)][_0x10ad69(0xbf)](_0x55d3dd,{..._0x583bce,'mode':_0x464eb2});}}this['_desired']['put'](_0x325454,_0x156cff);});}[_0x118bba(0x106)](){const _0x3de161=_0x118bba;return!!this[_0x3de161(0xc9)];}[_0x118bba(0x146)](_0x59681d,_0x511e61){const _0x497df4=_0x118bba;if(!this[_0x497df4(0x162)]())return null;const _0x3d24e4=_0x59681d+'/'+_0x511e61;return this[_0x497df4(0x12d)](),this[_0x497df4(0x181)][_0x497df4(0x283)](_0x3d24e4)??this['_desired'][_0x497df4(0x283)](_0x3d24e4)??null;}['_refreshDesiredSnapshot'](){const _0x744696=_0x118bba;if(!_0x2e9f4e)return;try{this[_0x744696(0x1a8)][_0x744696(0xeb)]?.['db']?.[_0x744696(0xde)]?.();}catch{}}async[_0x118bba(0x261)](_0x30fdea,_0x3587d4,_0x296d22){const _0x42b471=_0x118bba;if(!this[_0x42b471(0x162)]())return null;const _0xdc2c65=_0x30fdea+'/'+_0x3587d4;this[_0x42b471(0x12d)]();const _0x435e6d=this[_0x42b471(0x181)][_0x42b471(0x283)](_0xdc2c65)??this['_desired'][_0x42b471(0x283)](_0xdc2c65)??{'version':0x0},_0x54d40a=(_0x435e6d[_0x42b471(0xa9)]||0x0)+0x1,_0x172596={..._0x435e6d,..._0x296d22,'version':_0x54d40a,'updatedAt':Date[_0x42b471(0x236)]()};this['_desiredOverlay'][_0x42b471(0x9e)](_0xdc2c65,_0x172596);try{await this[_0x42b471(0x1a8)]['_systemEnv'][_0x42b471(0x15c)][_0x42b471(0x234)](()=>{const _0x3719ad=_0x42b471;this[_0x3719ad(0xc9)][_0x3719ad(0xbf)](_0xdc2c65,_0x172596);});}finally{if(this[_0x42b471(0x181)]['get'](_0xdc2c65)===_0x172596)this[_0x42b471(0x181)][_0x42b471(0xce)](_0xdc2c65);}return _0x54d40a;}[_0x118bba(0x75)](_0x5a450a){const _0x2ae851=_0x118bba;if(!this['_ensureDesired']())return[];this[_0x2ae851(0x12d)]();const _0x24e999=_0x5a450a+'/',_0x428a8b=[];for(const {key:_0x68b112,value:_0x100c05}of this[_0x2ae851(0xc9)]['getRange']({'start':_0x24e999,'end':_0x24e999+'ÿ'})){if(typeof _0x68b112!==_0x2ae851(0x22a)||!_0x68b112[_0x2ae851(0x27c)](_0x24e999))break;_0x428a8b[_0x2ae851(0xe8)]({'key':_0x68b112[_0x2ae851(0x121)](_0x24e999[_0x2ae851(0x11c)]),'value':_0x100c05});}return _0x428a8b;}[_0x118bba(0x166)](_0x3b27ac){const _0x128c35=_0x118bba;if(!this[_0x128c35(0x162)]())return null;return this[_0x128c35(0x229)][_0x128c35(0x283)](_0x3b27ac)??null;}async[_0x118bba(0x172)](_0x5dd7a6,_0x187843,_0x3490ed={}){const _0x3d32e8=_0x118bba;if(!this[_0x3d32e8(0x162)]())return null;let _0x1cfd74;return await this[_0x3d32e8(0x1a8)][_0x3d32e8(0xeb)][_0x3d32e8(0x15c)][_0x3d32e8(0x234)](()=>{const _0x5c43ea=_0x3d32e8,_0x2a98c2=this['_cmd'][_0x5c43ea(0x283)](_0x5dd7a6)||{'epoch':0x0};_0x1cfd74=(_0x2a98c2['epoch']||0x0)+0x1,this['_cmd'][_0x5c43ea(0xbf)](_0x5dd7a6,{..._0x2a98c2,..._0x3490ed,'cmd':_0x187843,'epoch':_0x1cfd74,'updatedAt':Date[_0x5c43ea(0x236)]()});}),_0x1cfd74;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x55828a,'nodeKey':_0x6b2226,'logicalKey':_0x415eed,'slotKey':_0x4a5a9d,'PROCESS_ENV':_0x3fd9ef,'NODE_TYPE':_0x270d34},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x4bc191=_0x1f295a;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x436d90=require$$0$4,{EVENTS:_0x14dcef,CHANGE_ACTIONS:_0x1dff34}=requireOkdbEnums(),{LOOP:_0x581960}=requireOkdbLoopMonitor(),_0x1caa51=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x56ddc2=0x5,_0x3385fe=0x2710;class _0x4a277b extends _0x436d90{constructor(_0x4a70c0,_0x49f247={}){const _0x9ddaa7=_0x2647;super(),this[_0x9ddaa7(0x1a8)]=_0x4a70c0,this['_quantum']=_0x49f247[_0x9ddaa7(0xcf)]??_0x1caa51,this[_0x9ddaa7(0xdf)]=_0x49f247[_0x9ddaa7(0x132)]??_0x56ddc2,this[_0x9ddaa7(0x1c4)]=_0x49f247[_0x9ddaa7(0x72)]??_0x3385fe,this[_0x9ddaa7(0x140)]=![],this[_0x9ddaa7(0x78)]=new Map(),this[_0x9ddaa7(0x139)]=new Map(),this[_0x9ddaa7(0x1be)]=new Map(),this['_flushTimer']=null,this[_0x9ddaa7(0x24e)]=![],this['_seen']=new Set(),this[_0x9ddaa7(0x87)]=_0x4630de=>this['_handleInProcess'](_0x4630de),this[_0x9ddaa7(0x22b)]=_0xc8ae87=>this[_0x9ddaa7(0x254)](_0xc8ae87),this[_0x9ddaa7(0x22d)]=()=>this[_0x9ddaa7(0x23b)]();}['start'](){const _0x271f0b=_0x2647;if(this[_0x271f0b(0x140)])return;this[_0x271f0b(0x140)]=!![];for(const [_0x37b48c,_0x2a814d]of this[_0x271f0b(0x1a8)][_0x271f0b(0x159)]){if(_0x37b48c[_0x271f0b(0x27c)]('~'))continue;try{_0x2a814d[_0x271f0b(0x20a)]();}catch{}}for(const [_0x15153e,_0x13c61c]of this['okdb'][_0x271f0b(0x159)]){if(_0x15153e[_0x271f0b(0x27c)]('~'))continue;try{this['_baselines'][_0x271f0b(0x9e)](_0x15153e,_0x13c61c['getClock']()||0x0);}catch{}}const {events:_0x512960}=this['okdb'];_0x512960['on'](_0x14dcef[_0x271f0b(0x201)],this['_onItem']),_0x512960['on'](_0x14dcef['ITEM_UPDATE'],this['_onItem']),_0x512960['on'](_0x14dcef[_0x271f0b(0x21c)],this[_0x271f0b(0x87)]),_0x512960['on'](_0x14dcef[_0x271f0b(0x155)],this['_onPoke']),_0x512960['once'](_0x14dcef[_0x271f0b(0x18d)],this[_0x271f0b(0x22d)]);}[_0x4bc191(0x23b)](){const _0x117081=_0x4bc191;if(!this[_0x117081(0x140)])return;this['_started']=![];const {events:_0x2b2b09}=this[_0x117081(0x1a8)];_0x2b2b09['off'](_0x14dcef[_0x117081(0x201)],this[_0x117081(0x87)]),_0x2b2b09[_0x117081(0x276)](_0x14dcef[_0x117081(0x29a)],this['_onItem']),_0x2b2b09['off'](_0x14dcef[_0x117081(0x21c)],this[_0x117081(0x87)]),_0x2b2b09['off'](_0x14dcef[_0x117081(0x155)],this[_0x117081(0x22b)]);try{_0x2b2b09['off'](_0x14dcef[_0x117081(0x18d)],this[_0x117081(0x22d)]);}catch{}this['_flushTimer']&&(clearTimeout(this[_0x117081(0x1fe)]),this['_flushTimer']=null),this[_0x117081(0x1be)][_0x117081(0x196)](),this['_cursors'][_0x117081(0x196)](),this['_baselines'][_0x117081(0x196)](),this['_seen'][_0x117081(0x196)]();}[_0x4bc191(0x10f)](_0x3a7bff,_0x38fedb,_0x25393f,_0x48028c){return _0x3a7bff+'\x00'+_0x38fedb+'\x00'+_0x25393f+'\x00'+_0x48028c;}[_0x4bc191(0x1d5)](_0x5d2c3d,_0x1daac5,_0x4b218c,_0x4a6afd){const _0x228205=_0x4bc191,_0x30d9f2=this['_dedupeKey'](_0x5d2c3d,_0x1daac5,_0x4b218c,_0x4a6afd);if(this[_0x228205(0x266)][_0x228205(0x26c)](_0x30d9f2))return![];this[_0x228205(0x266)][_0x228205(0x189)](_0x30d9f2);if(this[_0x228205(0x266)]['size']>this[_0x228205(0x1c4)]){const _0x5137fd=this[_0x228205(0x266)]['values']()['next']()['value'];this[_0x228205(0x266)]['delete'](_0x5137fd);}return!![];}['_handleInProcess'](_0x403923){const _0x2e3a47=_0x4bc191;if(!this[_0x2e3a47(0x140)]||!_0x403923)return;const {env:_0x9466e,type:_0x32ae18,key:_0x24303,clock:_0x3f931a,origin:_0x58f024,action:_0xb7221d,newValue:_0x453f45,oldValue:_0x145926}=_0x403923;if(_0x9466e==null||_0x32ae18==null||_0x24303==null)return;if(typeof _0x9466e===_0x2e3a47(0x22a)&&_0x9466e['startsWith']('~'))return;if(typeof _0x32ae18===_0x2e3a47(0x22a)&&_0x32ae18[_0x2e3a47(0x27c)]('~'))return;if(!this[_0x2e3a47(0x1d5)](_0x9466e,_0x32ae18,_0x24303,_0x3f931a))return;const _0x5cf87d=_0xb7221d===_0x1dff34['REMOVE']?_0x2e3a47(0x1e0):'put';this[_0x2e3a47(0x2a1)](_0x2e3a47(0x222),{'env':_0x9466e,'type':_0x32ae18,'key':_0x24303,'op':_0x5cf87d,'clock':_0x3f931a,'origin':_0x58f024,'value':_0x5cf87d===_0x2e3a47(0x1e0)?null:_0x453f45,'prevValue':_0x145926});}[_0x4bc191(0x254)](_0x1daba3){const _0x6f60e7=_0x4bc191;if(!this['_started'])return;if(!_0x1daba3||typeof _0x1daba3[_0x6f60e7(0x27f)]!==_0x6f60e7(0x22a)||typeof _0x1daba3['type']!==_0x6f60e7(0x22a))return;const {env:_0x425cab,type:_0xba37f5}=_0x1daba3;if(_0x425cab[_0x6f60e7(0x27c)]('~')||_0xba37f5[_0x6f60e7(0x27c)]('~'))return;this[_0x6f60e7(0x1be)][_0x6f60e7(0x9e)](_0x425cab+'\x00'+_0xba37f5,{'env':_0x425cab,'type':_0xba37f5}),this[_0x6f60e7(0x13f)]();}[_0x4bc191(0x13f)](){const _0x295ed0=_0x4bc191;if(this[_0x295ed0(0x1fe)])return;const _0x5d858c=()=>{const _0x5c1a9e=_0x295ed0;this[_0x5c1a9e(0x1fe)]=null,this[_0x5c1a9e(0x19a)]()['catch'](()=>{});};this[_0x295ed0(0x1fe)]=setTimeout(_0x5d858c,this[_0x295ed0(0xdf)]>0x0?this['_flushDebounce']:0x0);}async[_0x4bc191(0x19a)](){const _0x160638=_0x4bc191;if(this[_0x160638(0x24e)]){this[_0x160638(0x13f)]();return;}this['_draining']=!![];try{const _0x255e9c=[...this[_0x160638(0x1be)][_0x160638(0x16d)]()];this[_0x160638(0x1be)]['clear']();let _0x4ae6ba=![];for(const {env:_0x4dad94,type:_0x17dc9a}of _0x255e9c){try{const _0x2ccbb5=await this['_drainOne'](_0x4dad94,_0x17dc9a);if(_0x2ccbb5)_0x4ae6ba=!![];}catch{this[_0x160638(0x1be)][_0x160638(0x9e)](_0x4dad94+'\x00'+_0x17dc9a,{'env':_0x4dad94,'type':_0x17dc9a}),_0x4ae6ba=!![];}}if(_0x4ae6ba||this[_0x160638(0x1be)][_0x160638(0x248)]>0x0)this[_0x160638(0x13f)]();}finally{this['_draining']=![];}}async[_0x4bc191(0x9a)](_0x4881b8,_0x1acb05){const _0x56ed6c=_0x4bc191,_0x16d8df=await this['okdb']['_openEnvLazy'](_0x4881b8),_0x518302=_0x4881b8+'\x00'+_0x1acb05;!this[_0x56ed6c(0x78)][_0x56ed6c(0x26c)](_0x518302)&&(!this['_baselines'][_0x56ed6c(0x26c)](_0x4881b8)&&(_0x16d8df['_enableChangelog'](),this[_0x56ed6c(0x139)][_0x56ed6c(0x9e)](_0x4881b8,_0x16d8df['getClock']()||0x0)),this[_0x56ed6c(0x78)][_0x56ed6c(0x9e)](_0x518302,this[_0x56ed6c(0x139)][_0x56ed6c(0x283)](_0x4881b8)));const _0x301102=this[_0x56ed6c(0x78)][_0x56ed6c(0x283)](_0x518302),_0x4c27e2=_0x16d8df[_0x56ed6c(0x1c9)](_0x1acb05)||0x0;if(_0x4c27e2<=_0x301102)return![];const _0x4305a2=_0x301102+this[_0x56ed6c(0xd9)],_0x239379=Math['min'](_0x4c27e2,_0x4305a2),_0x289df9=_0x581960['enabled']?_0x581960[_0x56ed6c(0x236)]():0x0,_0x27b650=Array[_0x56ed6c(0x241)](_0x16d8df[_0x56ed6c(0x1a4)](_0x1acb05,_0x301102+0x1,_0x239379));let _0x13341c=_0x301102;for(const _0x28adfd of _0x27b650){const {clock:_0x3a2b80,key:_0x6ea99e,action:_0x5cc349,origin:_0xe29ea0}=_0x28adfd;if(_0x3a2b80>_0x13341c)_0x13341c=_0x3a2b80;if(_0x6ea99e==null)continue;if(!this[_0x56ed6c(0x1d5)](_0x4881b8,_0x1acb05,_0x6ea99e,_0x3a2b80))continue;let _0xb4fec3,_0x40435a;if(_0x5cc349===_0x1dff34[_0x56ed6c(0x19c)])_0xb4fec3=_0x56ed6c(0x1e0),_0x40435a=null;else{const _0x50f955=_0x16d8df[_0x56ed6c(0x283)](_0x1acb05,_0x6ea99e);_0x50f955==null?(_0xb4fec3=_0x56ed6c(0x1e0),_0x40435a=null):(_0xb4fec3=_0x56ed6c(0xbf),_0x40435a=_0x50f955);}this[_0x56ed6c(0x2a1)](_0x56ed6c(0x222),{'env':_0x4881b8,'type':_0x1acb05,'key':_0x6ea99e,'op':_0xb4fec3,'clock':_0x3a2b80,'origin':_0xe29ea0,'value':_0x40435a});}if(_0x581960['enabled'])_0x581960[_0x56ed6c(0x25a)](_0x56ed6c(0x168)+_0x4881b8+':'+_0x1acb05,_0x581960['now']()-_0x289df9,'n='+_0x27b650[_0x56ed6c(0x11c)]);return this[_0x56ed6c(0x78)]['set'](_0x518302,Math[_0x56ed6c(0x28f)](_0x13341c,_0x239379)),_0x16d8df[_0x56ed6c(0x1c9)](_0x1acb05)>_0x239379;}[_0x4bc191(0x270)](){const _0x564724=_0x4bc191;return{'started':this[_0x564724(0x140)],'quantum':this[_0x564724(0xd9)],'flushDebounce':this[_0x564724(0xdf)],'cursors':Object[_0x564724(0x11e)]([...this[_0x564724(0x78)]['entries']()][_0x564724(0x8a)](([_0x253fc6,_0xf0ba06])=>[_0x253fc6[_0x564724(0x292)]('\x00',':'),_0xf0ba06])),'pending':this[_0x564724(0x1be)][_0x564724(0x248)],'seen':this[_0x564724(0x266)][_0x564724(0x248)]};}}return _0x4a277b[_0x4bc191(0x28c)]=_0x1caa51,okdbChangefeed={'OKDBChangefeed':_0x4a277b},okdbChangefeed;}function _0x1e27(){const _0x36699c=['\x20worker\x20slot=','\x20oldestPendingMs=','memoryUsage','_instanceId','indexOf','_highWater','\x20parkedNow=','_report','participate','true','_refreshDesiredSnapshot','_collectWriterFacet','_committed','processors','exports','flushDebounce','unhandledRejection','kind','clearThreadStats','processing','cursorKey','_lastCpuPct','_baselines','_buildProcessingFacet','object','dead','_lastCpuWindowMs','enable','_scheduleFlush','_started','disconnect','committed','dropFts','processor:resumed','caps','getDesired','single','publishChildRow','rss','updatedAt','fn-runner','detachConsole',',\x20signal=','type:registered','_caps','txn:end','_rawDb','./okdb','view','_clusterOrphanWatch','SYSTEM_POKE','hostname','_windowCbs','release','_envs','running','standalone','_writer','8583bZViGL','hasOwnProperty','ingest','SYNC_COMMITS','message','_ensureDesired','reset','dropping','acquiredAt','getCmd','isActive','feed:','license:removed','expiresAt','(worst\x20','42681474dwUMkN','values','24456GOnYhE','decommissioned','\x20phase=','isPrimary','bumpCmd','594HhOKVo','exit','ttl:clear','writerStatus','heartbeatMs','bus:env_release','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','list','ref:violation','procmode/','processes','inspect','find','draining','_desiredOverlay','respawnTimer','supervisorKey','_bpParkedTotal','_supervisorKey','win32','isWorker','hard-killed','add','_isStale','735fbLjVN','loop-lag\x20','SYSTEM_STOPPED','node','_startedAt','_heartbeatTimer','raw-remove','workersConfigured','mode','_groupByProcess','_onProcEvent','clear','functions','disable','ttl:expired','_drain','heapTotal','REMOVE','system:bus_state_change','processor:ready','processingStatusView','_singletonLock','1ofN:','maxExtra','afterWrite','getChanges','_getType','busy','maxMs','okdb','uptime','building','license:invalid','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','depth','__esModule','bus:type_drop','putSync','loop-lag','\x0a\x20\x20\x20\x20\x20\x20','_lastCpuUsage','heapUsed','index:ready','cpus','_lockDb','ref:violation_resolved',':want','listenAddr','\x20statusEnv=','\x0a===\x20OKDB_DIAG\x20','_pending','http','none','stats','nodeKey','namespace','_dedupeMax','_isWriter','_removeRowAsync','SIGKILL','\x20writer{depth=','getClock','ENV_CLOSING_RETRY','_nodeDbCache','_durs','claimGated','http-server','_log','lifecycle','\x20worker(s)\x20remaining','clusterStatusView','registry\x20heartbeat\x20skipped\x20(writer=','state','_markSeen','--print','setTtl','cluster:','children','_listenAddr','flushed','5249531PrPQuu','function','cluster-wide','parkedNow','remove','~processes','randomUUID','warn','killable','kill','join','~processes:desired','[okdb-cluster]\x20worker\x20pid=','resetting','register','split','_servingEngines','count','\x20\x20#','registerIndex','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','createEnvironment','VIEW_PROGRESS','instances','code','INDEX_PROGRESS','execArgv','system:stopped','_participate','updateSupervisedChildStats','ms/','recordWrite','beforeWrite','_publishFailWarned','_flushTimer','enabled','worker','ITEM_CREATE','_children','runtimeProcessesView','entries','starting','isDead','\x20sync','dumpedAt','_onTick','_enableChangelog','_released','transactionSync','ms\x20on\x20env=','removeSupervisedChild','selfKey','\x20in\x20','_selfKey','_bpWaiters','processor:paused','listNodes','\x20drainAge=','user','ms\x20p99=','_nodeDb','childTransaction','fast','_wantDb','ITEM_REMOVE','stderr','allSettled','_migrateVocab','_closed','_processStartedAt','change','_startHeartbeat','commit','mkdirSync','processor:error','events','freeze','_cmd','string','_onPoke','_coordinator','_onStop','1090214MbPKGE','txn:start','_rowKey','bus:proc','test','signalWant','transaction','trim','now','cpuUsage','_changefeed','system:poke','parse','stop','_buckets','_admissionStarted','fork','_hbTimer','_role','from','system:type_drop','cpuPct','ephemeral','online','repeat','compact','size','toISOString','oldestPendingMs','cluster','processorsView','toFixed','_draining','ms\x20mean=','type:drop','registerType','removeSync','system:drain','_handlePoke','info','external',')\x20exited\x20','floor','view:progress','note','fts:drop','role','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','primary','processor:retry','setDesired','getProcess','[okdb-cluster]\x20','system:proc','force','_seen','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','prototype','index:drop','--inspect','default','has','index:progress','_wantDbHandle','flushLmdb','status','[okdb-cluster]\x20respawning\x20worker\x20slot=','load','processor:progress','treeView','_inflight','off','_done','isHeld','cpuWindowMs','clearTtl','_kind','startsWith','openDB','_statusEnv','env','_holderDead','.log','--watch','get','okdb-diag.','platform','stringify','seq','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','threads','9585490paJwBc','_sandbox','CHANGEFEED_QUANTUM','start','SYSTEM_PROC','max','raw-put','inst:','replace','FTS_REGISTERED','min','type','_isReader','mean','splice','reap','ITEM_UPDATE','FTS_DROP','compaction','level','addSupervisedChild','sync:apply','_nodeDbFor','emit','commitP99Ms','firstTs','isWanted','cli','6SfSnxt','dedupeMax','call','ESRCH','listDesired','halted','\x20│\x20','_cursors','shift','holder','system','hasType','setOwnMeta','_ownMeta','event','_putRowAsync','ms\x20busy=','error','\x20forked\x20','\x20\x20(no\x20env\x20draining)','node:perf_hooks','_rootDb','_onItem','--test','\x20(slot=','map','name','perf_hooks','stopped','unique:violation','node/','includes','__okdbSlot','send','confirm','_clusterOnMessage','INDEX_RESET','nodesView','rowKey','options','percentile','_drainOne','_lastCpuAt','putNode','log','set','_lock','processKey','\x20worker(s)\x20still\x20serving','item:update','bus:poke','deaths','listen','resetFts','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','version','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','sandbox','reduce','stopHeartbeat','singletonClaims','_maybePublish','\x20times\x20in\x20','_buildOwnRow','_outstanding','_collectSingletonClaims','okdb-writer:\x20env\x20closing\x20—\x20retry','rows=','pushEphemeral','_publishNow','catch','registerFts','_acquiredAt','FTS_RESET','engines','creating','startedAt','put','slot','_putRowSync','ppid','_nodeDead','started','license:added','filter','getRange','\x20died\x20','_desired','publishOwnRow','round','procmodeack/','_singletonLocks','delete','quantum','fts:registered','meta','\x20@\x20','registry\x20publish\x20failing:\x20','processorId','isEnabled','process','attachFeed','path','_quantum','\x20ipc\x20error:\x20','ready','ttlMs','msg','resetReadTxn','_flushDebounce','item:create','env:opened','uncaughtException','(code=','2207565XbUKpZ','_adminRelay','index:reset','dropSchema','push','decommission','keys','_systemEnv','error:\x20','_threadStats','listening','startHeartbeat','open','isConnected','stack','~processes:cmd','_db','_activateProcesses','all','system:ready','_clusterWorkerAttached','crypto','okdb-http-worker-child.js','ORPHAN\x20(env-closed\x20write)','_enqueuedAt','processor','8TFglFP','INDEX_READY','then','_admissionTimer','_key','unref','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','resolve','hasDesired','SWAP','consecutiveFailures','fanout','schema:set','sort','commitsPerSec','http\x20worker\x20child\x20failed:\x20','removeNode','_dedupeKey','host','workers','tierList','decommissioning','node:events','_startAdmission','stopping','registry-publish','__vocab/version','liveThreadStats','number','_timer','length','setLogger','fromEntries','pid','_buildChildRow','slice','_heartbeatInFlight'];_0x1e27=function(){return _0x36699c;};return _0x1e27();}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x4e0564=_0x1f295a;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x51a426=require$$1$1,_0xc59adb=require$$1,{EVENTS:_0x148cf7}=requireOkdbEnums(),_0x4faa59=require$$0$3,{slotKey:_0x3ef729}=requireOkdbProcessRegistry(),_0x42ec56=0xfa,_0x24f7a3=0xfa0,_0x41bebf=0x5,_0x3767d6=0x2710,_0x56ba2e=0xbb8,_0x3802be=0x7d0,_0x1e9f6a='__okdbCluster',_0x40e970=_0x4e0564(0x244),_0x484e53=_0x4e0564(0x9d),_0x249305=_0x4e0564(0x1c1),_0x6bb3e8=[_0x148cf7[_0x4e0564(0x1f2)],_0x148cf7[_0x4e0564(0x293)],_0x148cf7[_0x4e0564(0x29b)],_0x148cf7[_0x4e0564(0xbb)],_0x148cf7[_0x4e0564(0x1f5)],_0x148cf7[_0x4e0564(0xff)],_0x148cf7[_0x4e0564(0x95)],_0x148cf7['INDEX_REGISTERED'],_0x4e0564(0x19e),'processor:progress',_0x4e0564(0x226),_0x4e0564(0x213),_0x4e0564(0x144),'processor:retry'],_0x4f36d4=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x3e013c({workers:_0x5a4d31,makeOkdb:_0x587192,port:_0x2e85de,primaryOkdb:_0x46761e,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x57a103=_0x4e0564;if(_0x51a426[_0x57a103(0x171)])return childEntry&&_0x51a426['setupPrimary']({'exec':_0xc59adb[_0x57a103(0x1e6)](__dirname,_0x57a103(0xfa)),'args':[],'execArgv':((()=>{const _0x5a1e08=_0x57a103,_0x2ee8ef=[];for(let _0x3d589f=0x0;_0x3d589f<process[_0x5a1e08(0x1f6)][_0x5a1e08(0x11c)];_0x3d589f++){const _0x589df1=process[_0x5a1e08(0x1f6)][_0x3d589f];if(_0x589df1['startsWith'](_0x5a1e08(0x88))||_0x589df1[_0x5a1e08(0x27c)](_0x5a1e08(0x282))||_0x589df1[_0x5a1e08(0x27c)](_0x5a1e08(0x26a)))continue;if(_0x589df1==='-e'||_0x589df1==='--eval'||_0x589df1==='-p'||_0x589df1===_0x5a1e08(0x1d6)){_0x3d589f++;continue;}_0x2ee8ef[_0x5a1e08(0xe8)](_0x589df1);}return _0x2ee8ef;})())}),_0x30ea61({'workers':_0x5a4d31,'port':_0x2e85de,'primaryOkdb':_0x46761e,'workerEnv':workerEnv});return _0x19b177({'makeOkdb':_0x587192,'port':_0x2e85de});}function _0x30ea61({workers:_0xd61e42,port:_0x451451,primaryOkdb:_0xa61a20,workerEnv:_0x334595}){const _0x176ca7=_0x4e0564,_0x3f0f5e=new Map(),_0x3e3b24=new Map();let _0x49565a=![];const _0xc17a3f=_0x549ce2=>_0x549ce2?.[_0x176ca7(0x91)],_0x5094a8=_0x43d9f3=>{const _0xdd8754=_0x176ca7,_0x19129e=_0x51a426[_0xdd8754(0x23e)]({...process.env,..._0x334595||{},'OKDB_CLUSTER_SLOT':String(_0x43d9f3)});return _0x19129e[_0xdd8754(0x91)]=_0x43d9f3,_0x3f0f5e[_0xdd8754(0x9e)](_0x19129e[_0xdd8754(0xd6)]['pid'],{'worker':_0x19129e,'startedAt':Date['now'](),'slot':_0x43d9f3}),_0x19129e['on']('error',_0x488622=>{const _0x538470=_0xdd8754;console[_0x538470(0x9d)](_0x538470(0x1e8)+_0x19129e['process'][_0x538470(0x11f)]+_0x538470(0xda)+(_0x488622?.['message']??_0x488622));}),_0x19129e['on'](_0xdd8754(0x245),()=>_0x4c1226()),_0x19129e;},_0x143d43=_0x4b2dbe=>{const _0x2f20f4=_0x176ca7;for(const {worker:_0x44139d}of _0x3f0f5e[_0x2f20f4(0x16d)]()){if(_0x44139d['isDead']()||!_0x44139d[_0x2f20f4(0xf1)]())continue;try{_0x44139d[_0x2f20f4(0x92)](_0x4b2dbe);}catch{}}};_0xa61a20?.['_activateProcesses']?.({'kind':_0x176ca7(0x25f),'listenAddr':':'+_0x451451})['catch'](()=>{}),_0xa61a20?.[_0x176ca7(0x17d)]?.[_0x176ca7(0x7d)]?.({'workersConfigured':_0xd61e42});const _0x508e98={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x4c1226=()=>{const _0xfbae3e=_0x176ca7,_0xa57323=_0xa61a20?.[_0xfbae3e(0x17d)];if(!_0xa57323||!_0xa57323[_0xfbae3e(0x1c5)])return;const _0x3baffb=_0xa57323['selfKey'];for(const {worker:_0x38dc82,startedAt:_0x1a4bc7,slot:_0x1d8639,stats:_0x31e0c4,processing:_0x4892cd}of _0x3f0f5e[_0xfbae3e(0x16d)]()){if(_0x38dc82[_0xfbae3e(0x206)]())continue;const _0xa03c32=_0xa57323[_0xfbae3e(0x106)]?.()&&_0xa57323[_0xfbae3e(0x146)](_0xfbae3e(0xc0),_0x197f54(_0x1d8639))?.['decommission']===!![];_0xa57323[_0xfbae3e(0x148)]({'pid':_0x38dc82['process'][_0xfbae3e(0x11f)],'startedAt':_0x1a4bc7,'kind':'http-server','supervisorKey':_0x3baffb,'slot':_0x1d8639,'slotKey':_0x197f54(_0x1d8639),'role':_0x508e98,'listenAddr':':'+_0x451451,'lifecycle':_0xa03c32?_0xfbae3e(0x113):_0xfbae3e(0x15a),'processing':_0x4892cd??null,'stats':_0x31e0c4??null})[_0xfbae3e(0xb8)](()=>{});}},_0x197f54=_0x2e0437=>_0x3ef729(_0x176ca7(0x1d8)+_0x451451,_0x2e0437),_0x21b2fd=_0x25eb30=>{const _0x3bdb87=_0x176ca7,_0x3708f2=_0xa61a20?.[_0x3bdb87(0x17d)];if(!_0x3708f2?.[_0x3bdb87(0x106)]?.())return![];return _0x3708f2['getDesired'](_0x3bdb87(0xc0),_0x197f54(_0x25eb30))?.[_0x3bdb87(0xe9)]===!![];};for(let _0x360ab7=0x0;_0x360ab7<_0xd61e42;_0x360ab7++){const _0x2ce031=_0x21b2fd(_0x360ab7);_0x3e3b24[_0x176ca7(0x9e)](_0x360ab7,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x2ce031,'respawnTimer':null}),_0x2ce031?console[_0x176ca7(0x9d)]('[okdb-cluster]\x20slot='+_0x360ab7+_0x176ca7(0xaa)):_0x5094a8(_0x360ab7);}const _0x28ec15=()=>{const _0x3ab244=_0x176ca7,_0x2157aa=_0xa61a20?.[_0x3ab244(0x17d)];if(!_0x2157aa?.[_0x3ab244(0x1c5)]||!_0x2157aa[_0x3ab244(0x106)]?.())return;for(const [_0x365f28,_0xb1a303]of _0x3e3b24['entries']()){const _0x4bffe7=_0x2157aa[_0x3ab244(0x146)](_0x3ab244(0xc0),_0x197f54(_0x365f28)),_0x5c525e=_0x4bffe7?.[_0x3ab244(0xe9)]===!![],_0x527ddc=_0x4bffe7?.[_0x3ab244(0x1e5)]===!![];if(_0x5c525e&&!_0xb1a303[_0x3ab244(0x13c)]){_0xb1a303['dead']=!![];_0xb1a303[_0x3ab244(0x182)]&&(clearTimeout(_0xb1a303[_0x3ab244(0x182)]),_0xb1a303[_0x3ab244(0x182)]=null);for(const {worker:_0x11b901}of _0x3f0f5e['values']()){if(_0xc17a3f(_0x11b901)!==_0x365f28||_0x11b901[_0x3ab244(0x206)]())continue;try{if(_0x527ddc)_0x11b901[_0x3ab244(0xd6)][_0x3ab244(0x1e5)](_0x3ab244(0x1c7));else _0x11b901[_0x3ab244(0xf1)]()&&_0x11b901['disconnect']();}catch{}}console[_0x3ab244(0x9d)](_0x3ab244(0x263)+(_0x527ddc?_0x3ab244(0x188):_0x3ab244(0x16f))+_0x3ab244(0x123)+_0x365f28+'\x20(durable\x20desired-state)');}else{if(!_0x5c525e&&_0xb1a303[_0x3ab244(0x13c)]&&_0x4bffe7){_0xb1a303[_0x3ab244(0x13c)]=![],_0xb1a303['deaths']=[],_0xb1a303['consecutiveFailures']=0x0;const _0x1d03be=[..._0x3f0f5e[_0x3ab244(0x16d)]()]['some'](({worker:_0x10fbd8})=>_0xc17a3f(_0x10fbd8)===_0x365f28&&!_0x10fbd8[_0x3ab244(0x206)]());!_0x1d03be&&!_0x49565a&&(_0x5094a8(_0x365f28),console['log'](_0x3ab244(0x25d)+_0x365f28));}}}},_0x420920=()=>{try{_0x28ec15();}catch{}};_0xa61a20?.['events']?.['on']?.(_0x148cf7[_0x176ca7(0x28e)],_0x420920);const _0xe2a831=[];if(_0xa61a20?.[_0x176ca7(0x227)]?.['on'])for(const _0x7082ee of _0x6bb3e8){const _0x24f727=_0x48ce38=>{_0x143d43({[_0x1e9f6a]:_0x40e970,'event':_0x7082ee,'data':_0x48ce38??{}});};_0xa61a20[_0x176ca7(0x227)]['on'](_0x7082ee,_0x24f727),_0xe2a831[_0x176ca7(0xe8)]({'event':_0x7082ee,'handler':_0x24f727});}const _0x58f79=setInterval(()=>{_0x28ec15(),_0x4c1226();},_0x4f36d4);_0x58f79['unref']?.();const _0x16e351=(_0x421024,_0x117121)=>{const _0x54bfc5=_0x176ca7;if(!_0x117121||typeof _0x117121!=='object'||_0x117121[_0x1e9f6a]!==_0x484e53)return;if(!_0xa61a20?.[_0x54bfc5(0x9d)]?.[_0x54bfc5(0x15f)])return;const _0x18a7e2=_0x117121['entry']||{};_0xa61a20[_0x54bfc5(0x9d)][_0x54bfc5(0x15f)]({..._0x18a7e2,'msg':'[w'+_0x117121[_0x54bfc5(0xc0)]+']\x20'+(_0x18a7e2[_0x54bfc5(0xdd)]??''),'meta':{..._0x18a7e2[_0x54bfc5(0xd1)]||{},'worker':_0x117121[_0x54bfc5(0xc0)],'workerPid':_0x117121['pid']}});};_0x51a426['on']('message',_0x16e351);const _0x4380f6=(_0x42ff21,_0x5af3c7)=>{const _0x2f5212=_0x176ca7;if(!_0x5af3c7||typeof _0x5af3c7!=='object'||_0x5af3c7[_0x1e9f6a]!==_0x249305)return;const _0x173396=_0x3f0f5e[_0x2f5212(0x283)](_0x42ff21[_0x2f5212(0xd6)][_0x2f5212(0x11f)]);if(_0x173396){_0x173396[_0x2f5212(0x1c1)]={..._0x5af3c7[_0x2f5212(0x1c1)],'at':Date[_0x2f5212(0x236)]()};if(_0x5af3c7['processing']!==undefined)_0x173396['processing']=_0x5af3c7[_0x2f5212(0x136)];}};_0x51a426['on'](_0x176ca7(0x161),_0x4380f6),_0x51a426['on'](_0x176ca7(0x174),(_0x14873c,_0x537e13,_0x42cbfa)=>{const _0x17d288=_0x176ca7,_0x3a8c59=_0x14873c[_0x17d288(0xd6)][_0x17d288(0x11f)],_0x4dd7f6=_0xc17a3f(_0x14873c),_0x294d6a=_0x3f0f5e[_0x17d288(0x283)](_0x3a8c59);if(_0x294d6a&&_0xa61a20?.[_0x17d288(0x17d)])_0xa61a20[_0x17d288(0x17d)]['removeNode'](_0x3a8c59+':'+_0x294d6a[_0x17d288(0xbe)])['catch'](()=>{});_0x3f0f5e['delete'](_0x3a8c59),console[_0x17d288(0x9d)](_0x17d288(0x1e8)+_0x3a8c59+_0x17d288(0x89)+(_0x4dd7f6??'?')+_0x17d288(0x257)+(_0x17d288(0xe3)+_0x537e13+_0x17d288(0x14d)+(_0x42cbfa??_0x17d288(0x1c0))+');\x20'+_0x3f0f5e['size']+_0x17d288(0x1d1))),_0x4c1226();if(_0x49565a||_0x4dd7f6==null)return;const _0x4a06c9=_0x3e3b24[_0x17d288(0x283)](_0x4dd7f6);if(!_0x4a06c9||_0x4a06c9['dead'])return;const _0x16ac3c=Date['now']();_0x4a06c9['deaths']['push'](_0x16ac3c),_0x4a06c9[_0x17d288(0xa4)]=_0x4a06c9['deaths'][_0x17d288(0xc6)](_0x1f19d0=>_0x16ac3c-_0x1f19d0<=_0x3767d6);if(_0x4a06c9[_0x17d288(0xa4)]['length']>=_0x41bebf){_0x4a06c9[_0x17d288(0x13c)]=!![],console[_0x17d288(0x82)](_0x17d288(0xa7)+_0x4dd7f6+_0x17d288(0xc8)+_0x4a06c9[_0x17d288(0xa4)]['length']+_0x17d288(0xb0)+(_0x3767d6+_0x17d288(0x288)+_0x3f0f5e[_0x17d288(0x248)]+_0x17d288(0xa1)));return;}_0x4a06c9[_0x17d288(0x108)]++;const _0x34e363=Math[_0x17d288(0x294)](_0x24f7a3,_0x42ec56*0x2**(_0x4a06c9[_0x17d288(0x108)]-0x1));console[_0x17d288(0x9d)](_0x17d288(0x271)+_0x4dd7f6+_0x17d288(0x210)+_0x34e363+'ms\x20(attempt\x20'+_0x4a06c9[_0x17d288(0x108)]+')'),_0x4a06c9['respawnTimer']=setTimeout(()=>{const _0x1fc09a=_0x17d288;_0x4a06c9[_0x1fc09a(0x182)]=null;if(_0x49565a||_0x4a06c9['dead'])return;const _0x3c645b=_0x5094a8(_0x4dd7f6);_0x3c645b['once'](_0x1fc09a(0xee),()=>{const _0xe8bcc5=_0x1fc09a;if(_0x3e3b24['get'](_0x4dd7f6)===_0x4a06c9)_0x4a06c9[_0xe8bcc5(0x108)]=0x0;});},_0x34e363),_0x4a06c9['respawnTimer']['unref']?.();});const _0xdfe8e3=[..._0x3f0f5e[_0x176ca7(0xea)]()];console[_0x176ca7(0x9d)]('[okdb-cluster]\x20primary\x20pid='+process[_0x176ca7(0x11f)]+_0x176ca7(0x83)+_0xd61e42+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x451451+':\x20'+('['+_0xdfe8e3[_0x176ca7(0x1e6)](',\x20')+']'));const _0x5c3bf0={'_isClusterController':!![],'port':_0x451451,'primaryOkdb':_0xa61a20??null,'status'(){const _0x288711=_0x176ca7;return{'clustered':!![],'primaryPid':process[_0x288711(0x11f)],'port':_0x451451,'primaryRole':_0xa61a20?.[_0x288711(0x25c)]??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x3f0f5e[_0x288711(0x16d)]()][_0x288711(0x8a)](({worker:_0x3569f7})=>({'pid':_0x3569f7[_0x288711(0xd6)][_0x288711(0x11f)],'id':_0x3569f7['id'],'dead':_0x3569f7['isDead']()}))};},async 'close'(){const _0x494e68=_0x176ca7;_0x49565a=!![];for(const _0xcdc907 of _0x3e3b24[_0x494e68(0x16d)]()){_0xcdc907['dead']=!![],_0xcdc907[_0x494e68(0x182)]&&(clearTimeout(_0xcdc907[_0x494e68(0x182)]),_0xcdc907[_0x494e68(0x182)]=null);}clearInterval(_0x58f79),_0x51a426[_0x494e68(0x276)](_0x494e68(0x161),_0x16e351),_0x51a426[_0x494e68(0x276)](_0x494e68(0x161),_0x4380f6),_0xa61a20?.[_0x494e68(0x227)]?.[_0x494e68(0x276)]?.(_0x148cf7[_0x494e68(0x28e)],_0x420920);if(_0xa61a20?.[_0x494e68(0x227)]?.[_0x494e68(0x276)])for(const {event:_0x28fb96,handler:_0x430df3}of _0xe2a831){try{_0xa61a20['events'][_0x494e68(0x276)](_0x28fb96,_0x430df3);}catch{}}_0xe2a831[_0x494e68(0x11c)]=0x0;const _0x1f75e6=[..._0x3f0f5e[_0x494e68(0x16d)]()][_0x494e68(0x8a)](({worker:_0x201e0d})=>_0x201e0d);if(_0x1f75e6[_0x494e68(0x11c)]===0x0)return;await Promise[_0x494e68(0xf6)](_0x1f75e6['map'](_0x1228c3=>new Promise(_0x6657a6=>{const _0xea525f=_0x494e68;if(_0x1228c3[_0xea525f(0x206)]()){_0x6657a6();return;}let _0xa5a1bf=![];const _0x4ea451=()=>{if(_0xa5a1bf)return;_0xa5a1bf=!![];if(_0x11cfb4)clearTimeout(_0x11cfb4);_0x6657a6();};_0x1228c3['once']('exit',_0x4ea451);const _0x11cfb4=setTimeout(()=>{const _0xc64d99=_0xea525f;try{_0x1228c3[_0xc64d99(0xd6)][_0xc64d99(0x1e5)]();}catch{}},_0x56ba2e+0x1f4);_0x11cfb4['unref']?.();try{_0x1228c3['disconnect']();}catch{try{_0x1228c3['process']['kill']();}catch{}}})));}};return _0x5c3bf0;}async function _0x19b177({makeOkdb:_0x3e6275,port:_0x32223c}){const _0x4903f7=_0x4e0564,_0x246296=await _0x3e6275();return _0x5424c2(_0x246296),_0x246296[_0x4903f7(0x1bf)]['listen'](_0x32223c);}function _0x5424c2(_0x48d93b){const _0x1d91d6=_0x4e0564;if(!_0x48d93b||_0x48d93b[_0x1d91d6(0xf8)])return;_0x48d93b[_0x1d91d6(0xf8)]=!![];try{const {OKDBChangefeed:_0xd09bd}=requireOkdbChangefeed(),_0x19279d=_0x48d93b[_0x1d91d6(0xe5)];if(_0x19279d&&typeof _0x19279d['attachFeed']==='function'){const _0x4ac4cb=new _0xd09bd(_0x48d93b);_0x4ac4cb[_0x1d91d6(0x28d)](),_0x19279d[_0x1d91d6(0xd7)](_0x4ac4cb),_0x48d93b[_0x1d91d6(0x238)]=_0x4ac4cb;}}catch(_0x40a3d4){_0x48d93b[_0x1d91d6(0x9d)]?.[_0x1d91d6(0x1e3)]?.(_0x1d91d6(0x179)+(_0x40a3d4?.[_0x1d91d6(0x161)]??_0x40a3d4),{'feature':_0x1d91d6(0x24b)});}const _0x2ef327=_0xfd3e13=>{const _0x337213=_0x1d91d6;if(!_0xfd3e13||typeof _0xfd3e13!==_0x337213(0x13b)||_0xfd3e13[_0x1e9f6a]==null)return;if(_0xfd3e13[_0x1e9f6a]===_0x40e970)try{_0x48d93b[_0x337213(0xe5)]?.[_0x337213(0xb6)]?.(_0xfd3e13[_0x337213(0x7f)],_0xfd3e13['data']);}catch{}};process['on'](_0x1d91d6(0x161),_0x2ef327),_0x48d93b[_0x1d91d6(0x94)]=_0x2ef327;{let _0x1d0d6a=process[_0x1d91d6(0x237)](),_0x1e95cf=Date[_0x1d91d6(0x236)]();const _0x868866=()=>{const _0x3559f2=_0x1d91d6;if(typeof process[_0x3559f2(0x92)]!==_0x3559f2(0x1dd)||!process['connected'])return;const _0x42bea0=Date[_0x3559f2(0x236)](),_0x51e985=process[_0x3559f2(0x237)](),_0x1c936e=(_0x42bea0-_0x1e95cf)*0x3e8,_0x1a9c74=_0x51e985[_0x3559f2(0x216)]-_0x1d0d6a[_0x3559f2(0x216)]+(_0x51e985['system']-_0x1d0d6a[_0x3559f2(0x7b)]),_0x32542c=_0x1c936e>0x0?Math[_0x3559f2(0x294)](0x64,Math[_0x3559f2(0xcb)](_0x1a9c74/(_0x1c936e*(_0x4faa59['cpus']()[_0x3559f2(0x11c)]||0x1))*0x64)):0x0;_0x1d0d6a=_0x51e985,_0x1e95cf=_0x42bea0;const _0x232c77=process['memoryUsage']();let _0x408229=null;try{_0x408229=_0x48d93b[_0x3559f2(0x25c)]?.[_0x3559f2(0x130)]?_0x48d93b[_0x3559f2(0x17d)]?.[_0x3559f2(0x13a)]?.()??null:null;}catch{}try{process[_0x3559f2(0x92)]({[_0x1e9f6a]:_0x249305,'stats':{'rss':_0x232c77[_0x3559f2(0x149)],'heapUsed':_0x232c77[_0x3559f2(0x1b5)],'heapTotal':_0x232c77[_0x3559f2(0x19b)],'external':_0x232c77['external'],'cpuPct':_0x32542c,'cpuWindowMs':Math['round'](_0x1c936e/0x3e8)||null},'processing':_0x408229});}catch{}},_0x37e0b7=Math[_0x1d91d6(0x28f)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0xdc8f14=setInterval(_0x868866,_0x37e0b7);_0xdc8f14[_0x1d91d6(0x103)]?.(),_0x868866();for(const _0x3538ea of[_0x1d91d6(0x213),_0x1d91d6(0x144)]){_0x48d93b[_0x1d91d6(0x227)]?.['on']?.(_0x3538ea,()=>{try{_0x868866();}catch{}});}}let _0x5d84ea=![];const _0x48d579=async _0x6a1f2b=>{const _0xece561=_0x1d91d6;if(_0x5d84ea)return;_0x5d84ea=!![];const _0x17feb8=setTimeout(()=>process[_0xece561(0x174)](_0x6a1f2b),_0x56ba2e);_0x17feb8[_0xece561(0x103)]?.();try{await _0x48d93b['close']?.();}catch{}process[_0xece561(0x174)](_0x6a1f2b);};process['on'](_0x1d91d6(0x141),()=>_0x48d579(0x0));if(process[_0x1d91d6(0x285)]!==_0x1d91d6(0x186)){const _0x529a86=setInterval(()=>{if(process['ppid']===0x1)_0x48d579(0x0);},_0x3802be);_0x529a86[_0x1d91d6(0x103)]?.(),_0x48d93b[_0x1d91d6(0x154)]=_0x529a86;}}return okdbCluster={'runClustered':_0x3e013c,'attachWorkerCluster':_0x5424c2},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x3aa4f4=_0x1f295a;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0xa75ef0=require$$0$5,{attachWorkerCluster:_0x4055fc}=requireOkdbCluster();async function _0x33913a(){const _0x4333a9=_0x2647,_0x151a95=process.env.OKDB_HTTP_CHILD;if(!_0x151a95)throw new Error(_0x4333a9(0x1f0));const {rootPath:_0x4531c5,port:_0x1d1c8f,options:options={},logLevel:logLevel=_0x4333a9(0x255)}=JSON[_0x4333a9(0x23a)](_0x151a95);if(!_0x4531c5||!_0x1d1c8f)throw new Error(_0x4333a9(0xa8));const _0x23970e=new _0xa75ef0(_0x4531c5,{...options,'engines':![],'processors':![],'compaction':![]});_0x23970e['log'][_0x4333a9(0x14c)]?.();const _0x299585=process.env.OKDB_CLUSTER_SLOT??'?',_0x4c6ca1={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x16ddd9=_0x4c6ca1[logLevel]??_0x4c6ca1[_0x4333a9(0x255)];_0x23970e[_0x4333a9(0x9d)]['attach'](_0x1ea23b=>{const _0x6442fd=_0x4333a9;if((_0x4c6ca1[_0x1ea23b[_0x6442fd(0x29d)]]??0x1)<_0x16ddd9)return;try{process[_0x6442fd(0x92)]?.({'__okdbCluster':'log','slot':_0x299585,'pid':process[_0x6442fd(0x11f)],'entry':_0x1ea23b});}catch{}}),await _0x23970e[_0x4333a9(0xf0)](),_0x4055fc(_0x23970e),await _0x23970e[_0x4333a9(0x1bf)][_0x4333a9(0xa5)](_0x1d1c8f);}return _0x33913a()[_0x3aa4f4(0xb8)](_0x29c260=>{const _0x3e970f=_0x3aa4f4;try{process[_0x3e970f(0x92)]?.({'__okdbCluster':_0x3e970f(0x9d),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x3e970f(0x11f)],'entry':{'level':_0x3e970f(0x82),'msg':_0x3e970f(0x10d)+(_0x29c260?.[_0x3e970f(0x161)]??_0x29c260)}});}catch{}process[_0x3e970f(0x174)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x1f295a(0x131)]=okdbHttpWorkerChild;
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 +1 @@
1
- 'use strict';const _0x57297b=_0x2c8a;(function(_0x294d50,_0x152b27){const _0x115609=_0x2c8a,_0x217a09=_0x294d50();while(!![]){try{const _0x3714d2=parseInt(_0x115609(0xc1))/0x1*(-parseInt(_0x115609(0x8e))/0x2)+parseInt(_0x115609(0xaa))/0x3+-parseInt(_0x115609(0xc5))/0x4*(parseInt(_0x115609(0x94))/0x5)+-parseInt(_0x115609(0xca))/0x6+-parseInt(_0x115609(0x97))/0x7+parseInt(_0x115609(0x8f))/0x8+parseInt(_0x115609(0xc9))/0x9*(parseInt(_0x115609(0x93))/0xa);if(_0x3714d2===_0x152b27)break;else _0x217a09['push'](_0x217a09['shift']());}catch(_0x56f0d8){_0x217a09['push'](_0x217a09['shift']());}}}(_0x206e,0xa697f));function _0x206e(){const _0x1ec23c=['system:clock_change','registerIndex','sync:apply','_activateViewStorage','index:progress','setTtl','done','exit','./okdb','dropFts','_runBootstrapScanPhases','dropIndex','license:activated','bus:type_drop','freeze','view:progress','system:type_drop','item:create','schema:drop','ref:violation','name','1141541wmgQQA','postMessage','stack','message','8RNlqdA','default','close','unique:violation_resolved','14796iXlJPg','146058SEVQdJ','created','progress','fts:drop','system:proc','index:drop','license:invalid','ttl:expired','registerType','type:drop','starting','schema:set','setSchema','item:update','resetIndex','dropType','fts:registered','waiting','creating','ready','bus:env_release','index:registered','open','2DwZXQn','2209400iwdWxW','item:remove','txn:rollback','put','7430XdqWZJ','1064425YioMaH','VIEW_PROGRESS','resetFts','1323238yfMlgJ','halted','unique:violation','views','resetting','system:env_release','bus:poke','stopped','bus:drain','fts:reset','worker_threads','system:bus_state_change','catch','events','exports','system:stopped','env','license:removed','prototype','2896164RbVYlZ','system:drain'];_0x206e=function(){return _0x1ec23c;};return _0x206e();}var require$$0=require(_0x57297b(0xa1)),require$$1=require(_0x57297b(0xb4));function getDefaultExportFromCjs(_0x337b66){const _0x20bf60=_0x57297b;return _0x337b66&&_0x337b66['__esModule']&&Object[_0x20bf60(0xa9)]['hasOwnProperty']['call'](_0x337b66,_0x20bf60(0xc6))?_0x337b66['default']:_0x337b66;}function _0x2c8a(_0xf078d6,_0xe75a40){_0xf078d6=_0xf078d6-0x87;const _0x206e58=_0x206e();let _0x2c8a89=_0x206e58[_0xf078d6];return _0x2c8a89;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2bc3e0=_0x57297b;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2976e4={'PUT':_0x2bc3e0(0x92),'REMOVE':'remove','INDEX_DROP':_0x2bc3e0(0xb7),'INDEX_REGISTER':_0x2bc3e0(0xad),'INDEX_RESET':_0x2bc3e0(0xd8),'TYPE_REGISTER':_0x2bc3e0(0xd2),'TYPE_DROP':_0x2bc3e0(0xd9),'FTS_REGISTER':'registerFts','FTS_DROP':_0x2bc3e0(0xb5),'FTS_RESET':_0x2bc3e0(0x96),'SCHEMA_SET':_0x2bc3e0(0xd6),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x2bc3e0(0xb1),'TTL_CLEAR':'clearTtl'},_0x56e449={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x2bc3e0(0xa6),'SYSTEM_CLOCK_CHANGE':_0x2bc3e0(0xac),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x2bc3e0(0xab),'SYSTEM_TYPE_DROP':_0x2bc3e0(0xbc),'SYSTEM_PROC':_0x2bc3e0(0xce),'SYSTEM_BUS_STATE_CHANGE':_0x2bc3e0(0xa2),'ITEM_CREATE':_0x2bc3e0(0xbd),'ITEM_UPDATE':_0x2bc3e0(0xd7),'ITEM_REMOVE':_0x2bc3e0(0x90),'INDEX_RESET':'index:reset','INDEX_READY':'index:ready','INDEX_PROGRESS':_0x2bc3e0(0xb0),'VIEW_PROGRESS':_0x2bc3e0(0xbb),'INDEX_DROP':_0x2bc3e0(0xcf),'INDEX_REGISTERED':_0x2bc3e0(0x8c),'FTS_REGISTERED':_0x2bc3e0(0x87),'FTS_DROP':_0x2bc3e0(0xcd),'FTS_RESET':_0x2bc3e0(0xa0),'SCHEMA_SET':_0x2bc3e0(0xd5),'SCHEMA_DROP':_0x2bc3e0(0xbe),'UNIQUE_VIOLATION':_0x2bc3e0(0x99),'UNIQUE_VIOLATION_RESOLVED':_0x2bc3e0(0xc8),'REF_VIOLATION':_0x2bc3e0(0xbf),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x2bc3e0(0xae),'TXN_START':'txn:start','TXN_END':'txn:end','TXN_ROLLBACK':_0x2bc3e0(0x91),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x2bc3e0(0xd3),'ENV_OPENED':'env:opened','ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x2bc3e0(0x9c),'TTL_EXPIRED':_0x2bc3e0(0xd1),'TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x2bc3e0(0xd0),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x2bc3e0(0xb8),'LICENSE_REMOVED':_0x2bc3e0(0xa8)},_0x37570d={'CREATING':_0x2bc3e0(0x89),'RESETTING':_0x2bc3e0(0x9b),'READY':_0x2bc3e0(0x8a),'DROPPING':'dropping','WAITING':_0x2bc3e0(0x88)},_0x21decc={'CREATED':_0x2bc3e0(0xcb),'STARTING':_0x2bc3e0(0xd4),'STARTED':'started','STOPPING':'stopping','STOPPED':_0x2bc3e0(0x9e)},_0x1473bf={'CREATING':_0x2bc3e0(0x89),'READY':'ready','HALTED':_0x2bc3e0(0x98),'STOPPED':_0x2bc3e0(0x9e),'RESETTING':_0x2bc3e0(0x9b)},_0x5a2a07=Object[_0x2bc3e0(0xba)]({'POKE':_0x2bc3e0(0x9d),'DRAIN':_0x2bc3e0(0x9f),'TYPE_DROP':_0x2bc3e0(0xb9),'PROC':'bus:proc','ENV_RELEASE':_0x2bc3e0(0x8b)});return okdbEnums={'BUS_EVENTS':_0x5a2a07,'CHANGE_ACTIONS':_0x2976e4,'EVENTS':_0x56e449,'INDEX_STATE':_0x37570d,'OKDB_STATE':_0x21decc,'VIEW_STATE':_0x1473bf},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x2eed45=_0x57297b;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x17cb78,workerData:_0x3e250e}=require$$0,_0x24902f=require$$1,{EVENTS:_0xcd60ce}=requireOkdbEnums();async function _0x337324(){const _0x4fcc19=_0x2c8a,{rootPath:_0x296e1b,envName:_0x564980,viewName:_0x501d17,definition:_0x1c1f77}=_0x3e250e,_0x48f28a=new _0x24902f(_0x296e1b,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x48f28a[_0x4fcc19(0x8d)]();const _0x29dedc=_0x48f28a[_0x4fcc19(0xa7)](_0x564980);_0x29dedc[_0x4fcc19(0xa4)]['on'](_0xcd60ce[_0x4fcc19(0x95)],_0x19e1e7=>{const _0xd5e114=_0x4fcc19;if(_0x19e1e7?.[_0xd5e114(0xc0)]!==_0x501d17)return;try{_0x17cb78['postMessage']({'type':_0xd5e114(0xcc),'event':_0x19e1e7});}catch{}}),await _0x29dedc[_0x4fcc19(0x9a)]['_prepareViewDict'](_0x1c1f77),await _0x29dedc[_0x4fcc19(0x9a)][_0x4fcc19(0xaf)](_0x501d17,_0x1c1f77),await _0x29dedc[_0x4fcc19(0x9a)][_0x4fcc19(0xb6)](_0x501d17,_0x1c1f77),_0x17cb78[_0x4fcc19(0xc2)]({'type':_0x4fcc19(0xb2)}),await _0x48f28a[_0x4fcc19(0xc7)](),process[_0x4fcc19(0xb3)](0x0);}return _0x337324()[_0x2eed45(0xa3)](_0x1e05e3=>{const _0x1fceed=_0x2eed45;try{_0x17cb78[_0x1fceed(0xc2)]({'type':'error','error':_0x1e05e3[_0x1fceed(0xc4)]??String(_0x1e05e3),'stack':_0x1e05e3[_0x1fceed(0xc3)]});}catch{}process['exit'](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x57297b(0xa5)]=okdbViewsBootstrapWorker;
1
+ 'use strict';const _0x5d0860=_0x5378;function _0x5378(_0x3e3884,_0x428bf7){_0x3e3884=_0x3e3884-0x197;const _0x55ff50=_0x55ff();let _0x537811=_0x55ff50[_0x3e3884];return _0x537811;}(function(_0x7a43f2,_0x53ab1b){const _0x26da2a=_0x5378,_0x1cb6b1=_0x7a43f2();while(!![]){try{const _0x315d45=-parseInt(_0x26da2a(0x1a0))/0x1+-parseInt(_0x26da2a(0x1d3))/0x2*(parseInt(_0x26da2a(0x19d))/0x3)+-parseInt(_0x26da2a(0x1d2))/0x4*(parseInt(_0x26da2a(0x1e6))/0x5)+-parseInt(_0x26da2a(0x1c3))/0x6+parseInt(_0x26da2a(0x19b))/0x7*(-parseInt(_0x26da2a(0x1bc))/0x8)+-parseInt(_0x26da2a(0x1b8))/0x9*(parseInt(_0x26da2a(0x1d1))/0xa)+parseInt(_0x26da2a(0x1b0))/0xb;if(_0x315d45===_0x53ab1b)break;else _0x1cb6b1['push'](_0x1cb6b1['shift']());}catch(_0x46ea68){_0x1cb6b1['push'](_0x1cb6b1['shift']());}}}(_0x55ff,0x611fb));var require$$0=require(_0x5d0860(0x1c8)),require$$1=require(_0x5d0860(0x1db));function getDefaultExportFromCjs(_0x460975){const _0x53d94b=_0x5d0860;return _0x460975&&_0x460975[_0x53d94b(0x1cb)]&&Object[_0x53d94b(0x1ec)][_0x53d94b(0x1a3)][_0x53d94b(0x1e7)](_0x460975,_0x53d94b(0x1e8))?_0x460975[_0x53d94b(0x1e8)]:_0x460975;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x3ec6fb=_0x5d0860;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x384661={'PUT':_0x3ec6fb(0x1b7),'REMOVE':_0x3ec6fb(0x1bf),'INDEX_DROP':_0x3ec6fb(0x1b5),'INDEX_REGISTER':_0x3ec6fb(0x1b2),'INDEX_RESET':_0x3ec6fb(0x1b4),'TYPE_REGISTER':_0x3ec6fb(0x19f),'TYPE_DROP':_0x3ec6fb(0x1e5),'FTS_REGISTER':_0x3ec6fb(0x1c5),'FTS_DROP':_0x3ec6fb(0x1cd),'FTS_RESET':_0x3ec6fb(0x197),'SCHEMA_SET':_0x3ec6fb(0x1ca),'SCHEMA_DROP':_0x3ec6fb(0x199),'TTL_SET':_0x3ec6fb(0x1b9),'TTL_CLEAR':_0x3ec6fb(0x1ac)},_0x1fafdf={'SYSTEM_READY':_0x3ec6fb(0x198),'SYSTEM_STOPPED':_0x3ec6fb(0x1eb),'SYSTEM_CLOCK_CHANGE':_0x3ec6fb(0x1c9),'SYSTEM_POKE':_0x3ec6fb(0x1ea),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x3ec6fb(0x1a5),'SYSTEM_PROC':_0x3ec6fb(0x1a6),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x3ec6fb(0x1a7),'ITEM_UPDATE':_0x3ec6fb(0x1d0),'ITEM_REMOVE':_0x3ec6fb(0x1ba),'INDEX_RESET':_0x3ec6fb(0x1dc),'INDEX_READY':_0x3ec6fb(0x1b1),'INDEX_PROGRESS':_0x3ec6fb(0x1cf),'VIEW_PROGRESS':'view:progress','INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x3ec6fb(0x1bd),'FTS_REGISTERED':_0x3ec6fb(0x1a2),'FTS_DROP':_0x3ec6fb(0x1c6),'FTS_RESET':_0x3ec6fb(0x1e0),'SCHEMA_SET':_0x3ec6fb(0x19a),'SCHEMA_DROP':_0x3ec6fb(0x1d4),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x3ec6fb(0x1d8),'REF_VIOLATION':_0x3ec6fb(0x1bb),'REF_VIOLATION_RESOLVED':_0x3ec6fb(0x1d6),'SYNC_APPLY':_0x3ec6fb(0x1e9),'TXN_START':_0x3ec6fb(0x1da),'TXN_END':_0x3ec6fb(0x1a8),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':'type:registered','TYPE_DROP':'type:drop','ENV_OPENED':_0x3ec6fb(0x1af),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x3ec6fb(0x1ae),'TTL_SET':_0x3ec6fb(0x1d5),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':'license:removed'},_0x94e79b={'CREATING':_0x3ec6fb(0x1a1),'RESETTING':_0x3ec6fb(0x1b6),'READY':_0x3ec6fb(0x1d7),'DROPPING':'dropping','WAITING':'waiting'},_0x5284fd={'CREATED':_0x3ec6fb(0x1ab),'STARTING':_0x3ec6fb(0x1dd),'STARTED':_0x3ec6fb(0x1c1),'STOPPING':_0x3ec6fb(0x1be),'STOPPED':_0x3ec6fb(0x1c7)},_0x165ef1={'CREATING':_0x3ec6fb(0x1a1),'READY':'ready','HALTED':_0x3ec6fb(0x1e4),'STOPPED':_0x3ec6fb(0x1c7),'RESETTING':_0x3ec6fb(0x1b6)},_0x195a83=Object[_0x3ec6fb(0x1b3)]({'POKE':_0x3ec6fb(0x1c2),'DRAIN':'bus:drain','TYPE_DROP':_0x3ec6fb(0x19e),'PROC':_0x3ec6fb(0x1df),'ENV_RELEASE':_0x3ec6fb(0x1c4)});return okdbEnums={'BUS_EVENTS':_0x195a83,'CHANGE_ACTIONS':_0x384661,'EVENTS':_0x1fafdf,'INDEX_STATE':_0x94e79b,'OKDB_STATE':_0x5284fd,'VIEW_STATE':_0x165ef1},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x1311f1=_0x5d0860;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x211184,workerData:_0x20276b}=require$$0,_0x465d09=require$$1,{EVENTS:_0x28bac7}=requireOkdbEnums();async function _0x3af439(){const _0x36fc64=_0x5378,{rootPath:_0xda7a1f,envName:_0x4da75a,viewName:_0x2a5abf,definition:_0x1177f8}=_0x20276b,_0x58c39e=new _0x465d09(_0xda7a1f,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x58c39e['open']();const _0x726c7=_0x58c39e['env'](_0x4da75a);_0x726c7[_0x36fc64(0x19c)]['on'](_0x28bac7[_0x36fc64(0x1e2)],_0x326571=>{const _0x20b25d=_0x36fc64;if(_0x326571?.['name']!==_0x2a5abf)return;try{_0x211184[_0x20b25d(0x1aa)]({'type':'progress','event':_0x326571});}catch{}}),await _0x726c7[_0x36fc64(0x1a9)][_0x36fc64(0x1de)](_0x1177f8),await _0x726c7[_0x36fc64(0x1a9)][_0x36fc64(0x1ce)](_0x2a5abf,_0x1177f8),await _0x726c7[_0x36fc64(0x1a9)]['_runBootstrapScanPhases'](_0x2a5abf,_0x1177f8),_0x211184['postMessage']({'type':_0x36fc64(0x1e3)}),await _0x58c39e[_0x36fc64(0x1c0)](),process[_0x36fc64(0x1e1)](0x0);}return _0x3af439()[_0x1311f1(0x1cc)](_0x41c8b2=>{const _0x463075=_0x1311f1;try{_0x211184[_0x463075(0x1aa)]({'type':_0x463075(0x1ad),'error':_0x41c8b2[_0x463075(0x1d9)]??String(_0x41c8b2),'stack':_0x41c8b2[_0x463075(0x1a4)]});}catch{}process['exit'](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module['exports']=okdbViewsBootstrapWorker;function _0x55ff(){const _0x50890d=['system:stopped','prototype','resetFts','system:ready','dropSchema','schema:set','20587BCRiCF','events','21093eHwVcp','bus:type_drop','registerType','316659TePfAs','creating','fts:registered','hasOwnProperty','stack','system:type_drop','system:proc','item:create','txn:end','views','postMessage','created','clearTtl','error','ttl:expired','env:opened','27533957PKGMWl','index:ready','registerIndex','freeze','resetIndex','dropIndex','resetting','put','333HdMDYh','setTtl','item:remove','ref:violation','1544XiSslf','index:registered','stopping','remove','close','started','bus:poke','1558536SiFbmO','bus:env_release','registerFts','fts:drop','stopped','worker_threads','system:clock_change','setSchema','__esModule','catch','dropFts','_activateViewStorage','index:progress','item:update','96490fnEnCg','4iNkBgM','22yVlzvI','schema:drop','ttl:set','ref:violation_resolved','ready','unique:violation_resolved','message','txn:start','./okdb','index:reset','starting','_prepareViewDict','bus:proc','fts:reset','exit','VIEW_PROGRESS','done','halted','dropType','2634430hPNlYo','call','default','sync:apply','system:poke'];_0x55ff=function(){return _0x50890d;};return _0x55ff();}