@kedem/okdb 2.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x2d3788=_0x3802;(function(_0x4ba40b,_0x3ec004){const _0x3dcc79=_0x3802,_0xd77589=_0x4ba40b();while(!![]){try{const _0x15e50f=parseInt(_0x3dcc79(0x2d1))/0x1*(parseInt(_0x3dcc79(0x4ec))/0x2)+-parseInt(_0x3dcc79(0x52b))/0x3+-parseInt(_0x3dcc79(0x240))/0x4+parseInt(_0x3dcc79(0x4be))/0x5+-parseInt(_0x3dcc79(0x531))/0x6+parseInt(_0x3dcc79(0x409))/0x7*(parseInt(_0x3dcc79(0x404))/0x8)+parseInt(_0x3dcc79(0x643))/0x9;if(_0x15e50f===_0x3ec004)break;else _0xd77589['push'](_0xd77589['shift']());}catch(_0x1f2b56){_0xd77589['push'](_0xd77589['shift']());}}}(_0x1b08,0x86dc0));var require$$1=require('path'),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x2d3788(0x33f)),require$$5=require('../okdb'),require$$0$3=require(_0x2d3788(0x287)),require$$0$1=require(_0x2d3788(0x3cb)),require$$0$2=require('node:crypto'),require$$4=require(_0x2d3788(0x3e9)),require$$1$2=require('cluster'),require$$0$4=require(_0x2d3788(0x1c4)),require$$0$5=require(_0x2d3788(0x597)),require$$0$6=require('node:events');function getDefaultExportFromCjs(_0x4682df){const _0x2c0e3b=_0x2d3788;return _0x4682df&&_0x4682df[_0x2c0e3b(0x4e1)]&&Object[_0x2c0e3b(0x2dc)]['hasOwnProperty'][_0x2c0e3b(0x29d)](_0x4682df,_0x2c0e3b(0x555))?_0x4682df[_0x2c0e3b(0x555)]:_0x4682df;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x1790ab=require$$0,_0x16218a=require$$1$1,_0x55dc08=require$$1;let _0x5a5438;function _0x41370e(){const _0x4a69e8=_0x3802;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x5a5438!==undefined)return _0x5a5438;try{const _0x5a4a9e=_0x55dc08[_0x4a69e8(0x4fd)](require[_0x4a69e8(0x4a7)](_0x4a69e8(0x392)));_0x5a5438=_0x16218a[_0x4a69e8(0x41e)](_0x55dc08[_0x4a69e8(0x65d)](_0x5a4a9e,_0x4a69e8(0x2f1),_0x4a69e8(0x58e),_0x4a69e8(0x283)));}catch{_0x5a5438=![];}return _0x5a5438;}function _0x34331a(){const _0x21838b=_0x3802,_0x2f3926=_0x1790ab['cpus']()[_0x21838b(0x557)];return Math[_0x21838b(0x5b4)](0x1,_0x2f3926-0x1);}function _0x1d87ca(_0xe897df,_0x183d18={}){const _0x86d3d=_0x3802,_0x10be2f=_0x183d18[_0x86d3d(0x1b5)]!==undefined?_0x183d18[_0x86d3d(0x1b5)]:_0x41370e();let _0xa98f06;if(_0xe897df?.['noCluster'])_0xa98f06=0x1;else{let _0x3bdde0,_0x11bcc2;if(_0xe897df?.['workersFlag']!==undefined&&_0xe897df[_0x86d3d(0x5ee)]!==null&&_0xe897df[_0x86d3d(0x5ee)]!=='')_0x3bdde0=_0xe897df[_0x86d3d(0x5ee)],_0x11bcc2='--workers';else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x3bdde0=process.env.OKDB_HTTP_WORKERS,_0x11bcc2=_0x86d3d(0x22c);else _0xe897df?.[_0x86d3d(0x58a)]?.[_0x86d3d(0x5e3)]!==undefined&&_0xe897df[_0x86d3d(0x58a)][_0x86d3d(0x5e3)]!==null&&_0xe897df['http'][_0x86d3d(0x5e3)]!==''&&(_0x3bdde0=_0xe897df[_0x86d3d(0x58a)][_0x86d3d(0x5e3)],_0x11bcc2=_0x86d3d(0x1d4));}if(_0x3bdde0===undefined)_0xa98f06=_0x34331a();else{const _0xce3687=Number(_0x3bdde0);!Number[_0x86d3d(0x1ae)](_0xce3687)||_0xce3687<0x1?(console[_0x86d3d(0x62d)](_0x86d3d(0x572)+_0x11bcc2+'='+JSON['stringify'](_0x3bdde0)+_0x86d3d(0x40a)),_0xa98f06=0x1):_0xa98f06=_0xce3687;}}return!_0x10be2f&&_0xa98f06>0x1&&(console['warn']('[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20'+(_0x86d3d(0x33e)+_0xa98f06+').')),_0xa98f06=0x1),_0xa98f06;}return okdbWorkers={'isShmbufNative':_0x41370e,'defaultWorkers':_0x34331a,'resolveWorkers':_0x1d87ca},okdbWorkers;}var version=_0x2d3788(0x49b),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x4cd771=require$$0$1;function _0x1fea8c(_0x54cbff,_0x47370e){const _0x6c1c40=_0x3802;return _0x4cd771['createHmac'](_0x6c1c40(0x50c),_0x47370e)['update'](_0x54cbff)[_0x6c1c40(0x2ef)](_0x6c1c40(0x18c));}function _0x267e34(_0x58e553,_0x1312e0){const _0x1be9ea=_0x3802;if(typeof _0x58e553!==_0x1be9ea(0x5a1)||typeof _0x1312e0!=='string')return![];if(Buffer[_0x1be9ea(0x1e3)](_0x58e553)!==Buffer['byteLength'](_0x1312e0))return![];return _0x4cd771[_0x1be9ea(0x3a9)](Buffer[_0x1be9ea(0x57e)](_0x58e553),Buffer[_0x1be9ea(0x57e)](_0x1312e0));}function _0x33edf0(_0x218fdb){const _0x27b9c5=_0x3802;if(!_0x218fdb?.[_0x27b9c5(0x1af)](_0x27b9c5(0x198)))return null;return _0x218fdb[_0x27b9c5(0x35c)](0x7);}function _0x369921(_0xd83680=0x20){const _0xd31721=_0x3802;return _0x4cd771[_0xd31721(0x2a9)](_0xd83680)['toString'](_0xd31721(0x18c));}function _0x1f0a53(_0x1cbe55){const _0x10d415=_0x3802;return _0x4cd771['createHash']('sha256')[_0x10d415(0x2e9)](_0x1cbe55)[_0x10d415(0x2ef)]('hex');}function _0x18cc07(_0x53de38,_0x50c6ef,_0x1fe32b=0x36ee80){const _0x5e7327=_0x3802;if(!_0x50c6ef)throw new Error(_0x5e7327(0x2cd));const _0x57de8d=Date[_0x5e7327(0x517)](),_0x1b29b0=Buffer[_0x5e7327(0x57e)](JSON[_0x5e7327(0x189)]({'iat':_0x57de8d,'exp':_0x57de8d+_0x1fe32b,'sub':_0x53de38?.['id']??_0x53de38?.[_0x5e7327(0x441)]??null,'username':_0x53de38?.[_0x5e7327(0x573)]??_0x53de38?.['name']??null,'roles':Array[_0x5e7327(0x43a)](_0x53de38?.[_0x5e7327(0x4aa)])?_0x53de38['roles']:[]}))[_0x5e7327(0x29e)](_0x5e7327(0x18c)),_0x40e0d8=_0x1fea8c(_0x1b29b0,_0x50c6ef);return _0x1b29b0+'.'+_0x40e0d8;}function _0x11ebac(_0xfeb61,_0x5509dd){const _0x3547d1=_0x3802;if(!_0x5509dd||typeof _0xfeb61!=='string')return null;const [_0x19ed26,_0x4cd27f]=_0xfeb61[_0x3547d1(0x28b)]('.');if(!_0x19ed26||!_0x4cd27f)return null;const _0x1e9e0d=_0x1fea8c(_0x19ed26,_0x5509dd);if(!_0x267e34(_0x4cd27f,_0x1e9e0d))return null;try{const _0x4d11cb=JSON[_0x3547d1(0x52e)](Buffer[_0x3547d1(0x57e)](_0x19ed26,_0x3547d1(0x18c))[_0x3547d1(0x29e)]()),_0x22a168=0x7530;if(Date[_0x3547d1(0x517)]()>Number(_0x4d11cb?.[_0x3547d1(0x5cc)]??0x0)+_0x22a168)return null;return _0x4d11cb;}catch{return null;}}async function _0x5b8788(_0x7ebce){return new Promise((_0x539ce1,_0x8f1f88)=>{const _0x5efdb2=_0x4cd771['randomBytes'](0x10);_0x4cd771['scrypt'](_0x7ebce,_0x5efdb2,0x40,(_0x51b297,_0x4bc3e6)=>{const _0x7b690b=_0x3802;if(_0x51b297)_0x8f1f88(_0x51b297);_0x539ce1(_0x5efdb2['toString'](_0x7b690b(0x24c))+':'+_0x4bc3e6['toString']('hex'));});});}async function _0x58991(_0x4cc01f,_0x43fe3d){const _0xf1bcdd=_0x3802,[_0x54c7c7,_0x1986a0]=_0x43fe3d[_0xf1bcdd(0x28b)](':');if(!_0x54c7c7||!_0x1986a0)return![];const _0x507634=Buffer[_0xf1bcdd(0x57e)](_0x54c7c7,_0xf1bcdd(0x24c));return new Promise((_0x273b95,_0x4fa5f0)=>{_0x4cd771['scrypt'](_0x4cc01f,_0x507634,0x40,(_0x13cd47,_0x50eb31)=>{const _0x52dc3b=_0x3802;if(_0x13cd47)_0x4fa5f0(_0x13cd47);_0x273b95(_0x4cd771[_0x52dc3b(0x3a9)](_0x50eb31,Buffer[_0x52dc3b(0x57e)](_0x1986a0,'hex')));});});}return okdbAuthTokens={'hmac':_0x1fea8c,'timingSafeEqual':_0x267e34,'parseBearer':_0x33edf0,'randomToken':_0x369921,'hashToken':_0x1f0a53,'issueToken':_0x18cc07,'authenticateToken':_0x11ebac,'hashPassword':_0x5b8788,'verifyPassword':_0x58991},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x5cb6b5=_0x2d3788;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x850a36=require$$0$2,_0x32e82a=_0x5cb6b5(0x395),_0x27d61b=new Uint8Array(0x100)[_0x5cb6b5(0x4fb)](0xff);for(let _0x3be760=0x0;_0x3be760<_0x32e82a[_0x5cb6b5(0x557)];_0x3be760++){_0x27d61b[_0x32e82a['charCodeAt'](_0x3be760)]=_0x3be760,_0x27d61b[_0x32e82a[_0x5cb6b5(0x5a6)](_0x3be760)+0x20]=_0x3be760;}_0x27d61b['O'['charCodeAt'](0x0)]=0x0,_0x27d61b['o'[_0x5cb6b5(0x5a6)](0x0)]=0x0,_0x27d61b['I'['charCodeAt'](0x0)]=0x1,_0x27d61b['i'[_0x5cb6b5(0x5a6)](0x0)]=0x1,_0x27d61b['L'[_0x5cb6b5(0x5a6)](0x0)]=0x1,_0x27d61b['l'[_0x5cb6b5(0x5a6)](0x0)]=0x1;function _0x328b30(_0x4cc0ce){const _0x74e95f=_0x5cb6b5;let _0x225eaf=0x0,_0x2fa90c=0x0,_0x2c139f='';for(let _0x59a3c1=0x0;_0x59a3c1<_0x4cc0ce[_0x74e95f(0x557)];_0x59a3c1++){_0x2fa90c=_0x2fa90c<<0x8|_0x4cc0ce[_0x59a3c1],_0x225eaf+=0x8;while(_0x225eaf>=0x5){_0x225eaf-=0x5,_0x2c139f+=_0x32e82a[_0x2fa90c>>>_0x225eaf&0x1f];}}return _0x225eaf>0x0&&(_0x2c139f+=_0x32e82a[_0x2fa90c<<0x5-_0x225eaf&0x1f]),_0x2c139f;}function _0x1a08cb(_0x521252){const _0x108a7f=_0x5cb6b5;_0x521252=_0x521252[_0x108a7f(0x343)](/-/g,'')[_0x108a7f(0x613)]();let _0x350973=0x0,_0x10700d=0x0;const _0x4efc52=[];for(let _0x9d17fb=0x0;_0x9d17fb<_0x521252['length'];_0x9d17fb++){const _0x52466d=_0x27d61b[_0x521252[_0x108a7f(0x5a6)](_0x9d17fb)];if(_0x52466d===0xff)continue;_0x10700d=_0x10700d<<0x5|_0x52466d,_0x350973+=0x5,_0x350973>=0x8&&(_0x350973-=0x8,_0x4efc52[_0x108a7f(0x228)](_0x10700d>>>_0x350973&0xff));}return Buffer['from'](_0x4efc52);}const _0x525e79=[_0x5cb6b5(0x3a4),_0x5cb6b5(0x433),'engines',_0x5cb6b5(0x276),_0x5cb6b5(0x4df),_0x5cb6b5(0x38e),_0x5cb6b5(0x28e),_0x5cb6b5(0x44f)],_0x442673=0x0,_0x33f674=0x1,_0xc0cd4f=0x2,_0x309c55=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x2917ac({issuedAt:_0x4066bb,expiresAt:_0x56ff11,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x442673}){const _0x44180b=_0x5cb6b5,_0x38e820=Buffer[_0x44180b(0x57e)](licensee,_0x44180b(0x5aa))['slice'](0x0,0x40),_0x46b0c1=0x1+0x1+0x4+0x4+0x1+_0x38e820['length']+0x2+0x10,_0x12b077=Buffer[_0x44180b(0x38a)](_0x46b0c1);let _0x24ab7a=0x0;_0x12b077[_0x44180b(0x403)](0x1,_0x24ab7a++),_0x12b077[_0x44180b(0x403)](licenseType,_0x24ab7a++),_0x12b077[_0x44180b(0x589)](Math[_0x44180b(0x5cd)](_0x4066bb/0x3e8),_0x24ab7a),_0x24ab7a+=0x4,_0x12b077[_0x44180b(0x589)](Math['floor'](_0x56ff11/0x3e8),_0x24ab7a),_0x24ab7a+=0x4,_0x12b077[_0x44180b(0x403)](_0x38e820[_0x44180b(0x557)],_0x24ab7a++),_0x38e820['copy'](_0x12b077,_0x24ab7a),_0x24ab7a+=_0x38e820['length'];let _0x5b6ae3=0x0;for(let _0x101530=0x0;_0x101530<_0x525e79['length'];_0x101530++){if(features[_0x525e79[_0x101530]])_0x5b6ae3|=0x1<<_0x101530;}_0x12b077[_0x44180b(0x1de)](_0x5b6ae3,_0x24ab7a),_0x24ab7a+=0x2;const _0x533f2c=[_0x44180b(0x22e),_0x44180b(0x479),_0x44180b(0x1ff),_0x44180b(0x1a1)];for(const _0x1af439 of _0x533f2c){_0x12b077[_0x44180b(0x589)](limits[_0x1af439]||0x0,_0x24ab7a),_0x24ab7a+=0x4;}return _0x12b077;}function _0x6a84b6(_0x3912ae){const _0x2ed6d7=_0x5cb6b5;let _0xa09f2c=0x0;const _0x3cbec7=_0x3912ae[_0x2ed6d7(0x1f7)](_0xa09f2c++),_0x404ba2=_0x3912ae[_0x2ed6d7(0x1f7)](_0xa09f2c++),_0x3ac0c2=_0x3912ae['readUInt32BE'](_0xa09f2c);_0xa09f2c+=0x4;const _0x47ad9b=_0x3912ae['readUInt32BE'](_0xa09f2c);_0xa09f2c+=0x4;const _0x299dc0=_0x3912ae[_0x2ed6d7(0x1f7)](_0xa09f2c++),_0x5eb90d=_0x3912ae[_0x2ed6d7(0x35c)](_0xa09f2c,_0xa09f2c+_0x299dc0)[_0x2ed6d7(0x29e)](_0x2ed6d7(0x5aa));_0xa09f2c+=_0x299dc0;const _0x24cc6b=_0x3912ae['readUInt16BE'](_0xa09f2c);_0xa09f2c+=0x2;const _0x515ea1={};for(let _0x4845f4=0x0;_0x4845f4<_0x525e79[_0x2ed6d7(0x557)];_0x4845f4++){_0x515ea1[_0x525e79[_0x4845f4]]=Boolean(_0x24cc6b&0x1<<_0x4845f4);}const _0x57f7a8=[_0x2ed6d7(0x22e),_0x2ed6d7(0x479),'syncPeers',_0x2ed6d7(0x1a1)],_0x234f22={};for(const _0x38443c of _0x57f7a8){const _0x5588bc=_0x3912ae['readUInt32BE'](_0xa09f2c);_0xa09f2c+=0x4,_0x234f22[_0x38443c]=_0x5588bc===0x0?null:_0x5588bc;}return{'v':_0x3cbec7,'licenseType':_0x404ba2,'issuedAt':_0x3ac0c2*0x3e8,'expiresAt':_0x47ad9b*0x3e8,'licensee':_0x5eb90d,'features':_0x515ea1,'limits':_0x234f22};}function _0xfe806f(_0x524f91,_0x5dad13){const _0xebbe20=_0x5cb6b5,_0x293d66=Buffer[_0xebbe20(0x5bd)]([_0x524f91,_0x5dad13]),_0x20cf58=_0x328b30(_0x293d66),_0x12d57e=[];for(let _0x4b8947=0x0;_0x4b8947<_0x20cf58[_0xebbe20(0x557)];_0x4b8947+=0x8){_0x12d57e['push'](_0x20cf58[_0xebbe20(0x35c)](_0x4b8947,_0x4b8947+0x8));}return _0x12d57e[_0xebbe20(0x65d)]('-');}function _0x188dfc(_0x3b13ef){const _0x3d227f=_0x5cb6b5;if(typeof _0x3b13ef!==_0x3d227f(0x5a1))throw new Error(_0x3d227f(0x282));const _0x3e2aac=_0x1a08cb(_0x3b13ef[_0x3d227f(0x343)](/-/g,''));if(_0x3e2aac[_0x3d227f(0x557)]<0x41)throw new Error(_0x3d227f(0x26d)+_0x3e2aac[_0x3d227f(0x557)]+_0x3d227f(0x482));const _0x1906c4=_0x3e2aac['slice'](0x0,_0x3e2aac[_0x3d227f(0x557)]-0x40),_0x6fbb8f=_0x3e2aac[_0x3d227f(0x35c)](_0x3e2aac[_0x3d227f(0x557)]-0x40);let _0x598e2c;try{_0x598e2c=_0x6a84b6(_0x1906c4);}catch(_0xba56ff){throw new Error(_0x3d227f(0x584)+_0xba56ff[_0x3d227f(0x277)]);}return{'rawBuf':_0x3e2aac,'payload':_0x1906c4,'sig':_0x6fbb8f,'decoded':_0x598e2c};}function _0x4ac98a(_0x199dec){const _0x7969eb=_0x5cb6b5;return _0x850a36[_0x7969eb(0x34f)]('sha256')['update'](_0x199dec)['digest']()[_0x7969eb(0x35c)](0x0,0x8);}function _0x58a896(_0x531224,_0x119175,_0xf03e8){const _0x2fac7a=_0x5cb6b5,_0x5b0a80=_0x2fac7a(0x59d)+_0xf03e8,_0x1a4db5=Buffer['concat']([Buffer[_0x2fac7a(0x57e)](_0x531224,'utf8'),_0x119175]),_0x567408=_0x850a36[_0x2fac7a(0x534)](_0x2fac7a(0x50c),_0x5b0a80)[_0x2fac7a(0x2e9)](_0x1a4db5)[_0x2fac7a(0x2ef)](),_0x1939c6=_0x328b30(_0x567408[_0x2fac7a(0x35c)](0x0,0x5));return{'pin':_0x1939c6,'pinHmac':_0x567408};}function _0xd8b71d(_0x32a438,_0x2c0b37,_0x38b8af){const _0x1a0bad=_0x5cb6b5,_0x595d3d=Buffer[_0x1a0bad(0x38a)](0x4d);let _0xf9115b=0x0;_0x595d3d['writeUInt8'](0x1,_0xf9115b++),_0x32a438[_0x1a0bad(0x564)](_0x595d3d,_0xf9115b),_0xf9115b+=0x8,_0x595d3d[_0x1a0bad(0x589)](_0x2c0b37,_0xf9115b),_0xf9115b+=0x4,_0x38b8af[_0x1a0bad(0x564)](_0x595d3d,_0xf9115b);const _0x4017ff=_0x328b30(_0x595d3d),_0xbda78c=[];for(let _0x50f093=0x0;_0x50f093<_0x4017ff[_0x1a0bad(0x557)];_0x50f093+=0x6){_0xbda78c[_0x1a0bad(0x228)](_0x4017ff[_0x1a0bad(0x35c)](_0x50f093,_0x50f093+0x6));}return _0xbda78c[_0x1a0bad(0x65d)]('-');}function _0x4dc278(_0x560498){const _0x22c715=_0x5cb6b5;if(typeof _0x560498!==_0x22c715(0x5a1))throw new Error(_0x22c715(0x23e));const _0x5532c3=_0x1a08cb(_0x560498['replace'](/-/g,''));if(_0x5532c3[_0x22c715(0x557)]!==0x4d)throw new Error(_0x22c715(0x4d3)+_0x5532c3[_0x22c715(0x557)]);let _0x36fbab=0x0;const _0x51cfd3=_0x5532c3[_0x22c715(0x1f7)](_0x36fbab++),_0xd7ba48=_0x5532c3[_0x22c715(0x35c)](_0x36fbab,_0x36fbab+0x8);_0x36fbab+=0x8;const _0x59a855=_0x5532c3[_0x22c715(0x1e0)](_0x36fbab);_0x36fbab+=0x4;const _0x451c27=_0x5532c3[_0x22c715(0x35c)](_0x36fbab);return{'v':_0x51cfd3,'licenseHash':_0xd7ba48,'expiry':_0x59a855,'sig':_0x451c27};}function _0x1d6c68({tokenString:_0x396617,nodeId:_0x3f9d4e,rawBlobBuf:_0x186e1b,pubKeyPem:_0xc935d0,pubFingerprint:_0x4247ed}){const _0x306c89=_0x5cb6b5;let _0x3f140d;try{_0x3f140d=_0x4dc278(_0x396617);}catch(_0x36dfc3){return{'valid':![],'reason':_0x306c89(0x1a7)};}const _0xed2b11=_0x4ac98a(_0x186e1b);if(!_0xed2b11['equals'](_0x3f140d[_0x306c89(0x30b)]))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x483a61}=_0x58a896(_0x3f9d4e,_0xed2b11,_0x4247ed),_0x55cb05=Buffer[_0x306c89(0x38a)](0x4);_0x55cb05[_0x306c89(0x589)](_0x3f140d[_0x306c89(0x424)],0x0);const _0x1bf8f2=Buffer[_0x306c89(0x5bd)]([Buffer[_0x306c89(0x57e)]([_0x3f140d['v']]),_0x483a61[_0x306c89(0x35c)](0x0,0x5),_0x3f140d['licenseHash'],_0x55cb05]);try{const _0x44e165=_0x850a36[_0x306c89(0x185)](null,_0x1bf8f2,_0xc935d0,_0x3f140d[_0x306c89(0x2a4)]);if(!_0x44e165)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x4d8d8a){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x3f140d[_0x306c89(0x424)]<Date['now']()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x5c799d(_0x115934){const _0x2bde90=_0x5cb6b5;if(typeof _0x115934!=='string')return _0x2bde90(0x42d);const _0x5ce706=_0x115934[_0x2bde90(0x1bd)]();if(_0x5ce706[_0x2bde90(0x1af)]('/')||_0x5ce706[_0x2bde90(0x1af)]('./')||_0x5ce706[_0x2bde90(0x1af)]('../')||/^[A-Za-z]:[\\/]/['test'](_0x5ce706))return _0x2bde90(0x32d);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x2bde90(0x331)](_0x5ce706))return'uuid';const _0x9e2432=_0x5ce706['replace'](/[\s-]+/g,'')['length'];if(_0x9e2432===0x7c)return _0x2bde90(0x538);if(_0x9e2432>=0x95&&_0x9e2432<=0xfc)return _0x2bde90(0x4f5);return'unknown';}return okdbLicenseCodec={'toBase32':_0x328b30,'fromBase32':_0x1a08cb,'encodeLicensePayload':_0x2917ac,'decodeLicensePayload':_0x6a84b6,'encodeLicenseBlob':_0xfe806f,'decodeLicenseBlob':_0x188dfc,'licenseHash':_0x4ac98a,'derivePin':_0x58a896,'encodeActivationToken':_0xd8b71d,'decodeActivationToken':_0x4dc278,'verifyActivation':_0x1d6c68,'detectInputType':_0x5c799d,'FEATURE_NAMES':_0x525e79,'LICENSE_TYPE_STANDARD':_0x442673,'LICENSE_TYPE_OPEN':_0x33f674,'LICENSE_TYPE_INTERNAL':_0xc0cd4f,'OPEN_LICENSE_MAX_DURATION_MS':_0x309c55},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x4a2b3d extends Error{constructor(_0x29c096,_0x1474cf,_0x7c1d1b={}){const _0x3e16ff=_0x3802;super(_0x29c096),this[_0x3e16ff(0x278)]=_0x3e16ff(0x5d5),this['code']=_0x1474cf,this[_0x3e16ff(0x45f)]=_0x7c1d1b,_0x7c1d1b[_0x3e16ff(0x5e6)]&&(this[_0x3e16ff(0x5e6)]=_0x7c1d1b['cause']),Error['captureStackTrace'](this,this['constructor']);}}class _0x1aae4b extends _0x4a2b3d{constructor(_0xadc2ae,_0x154f97,_0x3a51ce,_0x406590){const _0x2eb275=_0x3802;super(_0x2eb275(0x662)+_0xadc2ae+'@'+_0x154f97+_0x2eb275(0x1fa)+_0x3a51ce+_0x2eb275(0x268)+_0x406590,'VERSION_MISMATCH',{'type':_0xadc2ae,'key':_0x154f97,'expectedVersion':_0x3a51ce,'actualVersion':_0x406590}),this[_0x2eb275(0x278)]=_0x2eb275(0x522);}}class _0x188abc extends _0x4a2b3d{constructor(_0x50a100,_0xbfbee2){const _0x348fb5=_0x3802;super(_0x50a100+'@'+_0xbfbee2+'\x20does\x20not\x20exist',_0x348fb5(0x1ed),{'type':_0x50a100,'key':_0xbfbee2}),this[_0x348fb5(0x278)]='OKDBNotFoundError';}}class _0x11a0f4 extends _0x4a2b3d{constructor(_0x10579a,_0x41a13a){const _0x1d77fc=_0x3802;super(_0x10579a+'@'+_0x41a13a+_0x1d77fc(0x2cb),_0x1d77fc(0x299),{'type':_0x10579a,'key':_0x41a13a}),this[_0x1d77fc(0x278)]=_0x1d77fc(0x592);}}class _0x27425d extends _0x4a2b3d{constructor(_0x247f3e,_0x375366){const _0x48bef7=_0x3802,_0x5d3c8c=typeof _0x375366;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x247f3e+_0x48bef7(0x304)+_0x5d3c8c+_0x48bef7(0x63c)+_0x375366,'INVALID_INDEX_KEY',{'index':_0x247f3e,'key':_0x375366,'keyType':_0x5d3c8c}),this['name']='OKDBInvalidIndexKeyError';}}class _0x303338 extends _0x4a2b3d{constructor(_0xf00fb4){const _0x22b7a1=_0x3802,_0x19f7e1=typeof _0xf00fb4;super(_0x22b7a1(0x267)+_0x19f7e1+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0xf00fb4,_0x22b7a1(0x31a),{'key':_0xf00fb4,'keyType':_0x19f7e1}),this[_0x22b7a1(0x278)]=_0x22b7a1(0x587);}}class _0x2d1f56 extends _0x4a2b3d{constructor(_0xd6ac06){const _0x12fbc8=_0x3802;super(_0x12fbc8(0x4c2)+_0xd6ac06+'\x27\x20doesn\x27t\x20exist',_0x12fbc8(0x4db),{'type':_0xd6ac06}),this['name']=_0x12fbc8(0x364);}}class _0x7053a8 extends _0x4a2b3d{constructor(_0x4c3967){const _0x3bbdff=_0x3802;super(_0x3bbdff(0x4c2)+_0x4c3967+_0x3bbdff(0x381),_0x3bbdff(0x3f6),{'type':_0x4c3967}),this[_0x3bbdff(0x278)]=_0x3bbdff(0x2c2);}}class _0x3a75bf extends _0x4a2b3d{constructor(_0x4512b9,_0x45e2b9){const _0x2d7eb4=_0x3802;super(_0x2d7eb4(0x3a1)+_0x45e2b9+_0x2d7eb4(0x47c)+_0x4512b9+_0x2d7eb4(0x511),_0x2d7eb4(0x247),{'type':_0x4512b9,'index':_0x45e2b9}),this['name']=_0x2d7eb4(0x54a);}}class _0x53cd17 extends _0x4a2b3d{constructor(_0xa66d8f,_0x4161ea){const _0x218e6b=_0x3802;super(_0x218e6b(0x3a1)+_0x4161ea+'\x27\x20on\x20type\x20\x27'+_0xa66d8f+_0x218e6b(0x2d8),_0x218e6b(0x2e3),{'type':_0xa66d8f,'index':_0x4161ea}),this[_0x218e6b(0x278)]=_0x218e6b(0x246);}}class _0x3457c3 extends _0x4a2b3d{constructor(_0x12a17d,_0x18fec3={}){const _0x3bb673=_0x3802;super(_0x12a17d,_0x3bb673(0x1f9),_0x18fec3),this['name']=_0x3bb673(0x309);}}class _0x22d7ca extends _0x4a2b3d{constructor(_0x43485a,_0x24ed9e,_0x453bb5,_0x1d8390,_0xdde123){const _0xbb8f19=_0x3802;super('Unique\x20constraint\x20violated\x20on\x20'+_0x43485a+'@'+_0x24ed9e+_0xbb8f19(0x55c)+_0x453bb5+']\x20already\x20maps\x20to\x20\x27'+_0x1d8390+_0xbb8f19(0x653)+_0xdde123+'\x27',_0xbb8f19(0x3e3),{'type':_0x43485a,'index':_0x24ed9e,'indexKey':_0x453bb5,'existingKey':_0x1d8390,'conflictingKey':_0xdde123}),this[_0xbb8f19(0x278)]=_0xbb8f19(0x62a);}}class _0x4d0daa extends _0x4a2b3d{constructor(_0x3eb3a8,_0x42a6a1,_0x43353c){const _0x15d2d5=_0x3802;super(_0x15d2d5(0x49d)+_0x3eb3a8+'@'+_0x42a6a1,_0x15d2d5(0x4e5),{'type':_0x3eb3a8,'key':_0x42a6a1,'errors':_0x43353c}),this[_0x15d2d5(0x278)]=_0x15d2d5(0x340),this[_0x15d2d5(0x316)]=_0x3eb3a8,this['key']=_0x42a6a1,this[_0x15d2d5(0x237)]=_0x43353c;}}class _0x40c9c9 extends _0x4a2b3d{constructor(_0x3015e8,_0x451163){const _0x63d152=_0x3802;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x3015e8+':\x20'+_0x451163[_0x63d152(0x557)]+_0x63d152(0x257),_0x63d152(0x32c),{'type':_0x3015e8,'failures':_0x451163}),this[_0x63d152(0x278)]=_0x63d152(0x233),this[_0x63d152(0x316)]=_0x3015e8,this[_0x63d152(0x1b1)]=_0x451163;}}class _0x1205ee extends _0x4a2b3d{constructor(_0x3def1a,_0x4b0e27,_0x1e0196,_0x40fa6d,_0x214944){const _0x5df043=_0x3802;super(_0x5df043(0x19a)+_0x3def1a+'@'+_0x4b0e27+'.'+_0x1e0196+_0x5df043(0x187)+_0x40fa6d+'@'+_0x214944+_0x5df043(0x4eb),'FOREIGN_KEY_VIOLATION',{'sourceType':_0x3def1a,'sourceKey':_0x4b0e27,'fieldPath':_0x1e0196,'targetType':_0x40fa6d,'targetKey':_0x214944}),this['name']='OKDBForeignKeyError',this['sourceType']=_0x3def1a,this['sourceKey']=_0x4b0e27,this[_0x5df043(0x4b3)]=_0x1e0196,this[_0x5df043(0x2c1)]=_0x40fa6d,this['targetKey']=_0x214944;}}class _0x5e8488 extends _0x4a2b3d{constructor(_0x3ac2dc,_0x4bd4f4,_0x1f0cff){const _0x5613ad=_0x3802;super('Cannot\x20delete\x20'+_0x3ac2dc+'@'+_0x4bd4f4+':\x20'+_0x1f0cff['length']+_0x5613ad(0x30f),_0x5613ad(0x291),{'targetType':_0x3ac2dc,'targetKey':_0x4bd4f4,'references':_0x1f0cff}),this[_0x5613ad(0x278)]='OKDBForeignKeyDeleteError',this[_0x5613ad(0x2c1)]=_0x3ac2dc,this[_0x5613ad(0x4d8)]=_0x4bd4f4,this[_0x5613ad(0x40f)]=_0x1f0cff;}}class _0x4a3819 extends _0x4a2b3d{constructor(_0x32c303,_0x3a75d0,_0x4da555){const _0x2d493e=_0x3802;super(_0x2d493e(0x4c5)+_0x3a75d0+_0x2d493e(0x45b)+_0x32c303+_0x2d493e(0x5ce)+_0x4da555[_0x2d493e(0x3ad)](_0x46bd20=>_0x46bd20[_0x2d493e(0x60d)]+':'+_0x46bd20['name'])['join'](',\x20'),_0x2d493e(0x3ef),{'type':_0x32c303,'index':_0x3a75d0,'usedBy':_0x4da555}),this[_0x2d493e(0x278)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x4a2b3d,'OKDBVersionMismatchError':_0x1aae4b,'OKDBNotFoundError':_0x188abc,'OKDBAlreadyExistsError':_0x11a0f4,'OKDBInvalidIndexKeyError':_0x27425d,'OKDBInvalidPrimaryKeyError':_0x303338,'OKDBTypeNotRegisteredError':_0x2d1f56,'OKDBTypeAlreadyRegisteredError':_0x7053a8,'OKDBIndexNotRegisteredError':_0x3a75bf,'OKDBIndexAlreadyRegisteredError':_0x53cd17,'OKDBInvalidValueError':_0x3457c3,'OKDBUniqueConstraintError':_0x22d7ca,'OKDBSchemaValidationError':_0x4d0daa,'OKDBSchemaCollectionError':_0x40c9c9,'OKDBForeignKeyError':_0x1205ee,'OKDBForeignKeyDeleteError':_0x5e8488,'OKDBIndexHasConsumersError':_0x4a3819},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x3422c8=_0x2d3788;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x22e173={'PUT':_0x3422c8(0x347),'REMOVE':_0x3422c8(0x1d2),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x3422c8(0x369),'INDEX_RESET':_0x3422c8(0x48f),'TYPE_REGISTER':_0x3422c8(0x54b),'TYPE_DROP':_0x3422c8(0x47a),'FTS_REGISTER':_0x3422c8(0x56e),'FTS_DROP':_0x3422c8(0x65b),'FTS_RESET':_0x3422c8(0x24f),'SCHEMA_SET':'setSchema','SCHEMA_DROP':'dropSchema','TTL_SET':_0x3422c8(0x5ca),'TTL_CLEAR':_0x3422c8(0x2f8)},_0x44f7ab={'SYSTEM_READY':_0x3422c8(0x192),'SYSTEM_STOPPED':_0x3422c8(0x318),'SYSTEM_CLOCK_CHANGE':_0x3422c8(0x393),'SYSTEM_POKE':_0x3422c8(0x28d),'SYSTEM_DRAIN':_0x3422c8(0x436),'SYSTEM_TYPE_DROP':_0x3422c8(0x32e),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x3422c8(0x18f),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x3422c8(0x626),'INDEX_RESET':_0x3422c8(0x45a),'INDEX_READY':_0x3422c8(0x49e),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x3422c8(0x610),'INDEX_DROP':_0x3422c8(0x49c),'INDEX_REGISTERED':_0x3422c8(0x533),'FTS_REGISTERED':_0x3422c8(0x5f1),'FTS_DROP':_0x3422c8(0x289),'FTS_RESET':_0x3422c8(0x1ad),'SCHEMA_SET':_0x3422c8(0x46a),'SCHEMA_DROP':_0x3422c8(0x4ea),'UNIQUE_VIOLATION':_0x3422c8(0x1e1),'UNIQUE_VIOLATION_RESOLVED':_0x3422c8(0x334),'REF_VIOLATION':_0x3422c8(0x65c),'REF_VIOLATION_RESOLVED':_0x3422c8(0x2a6),'SYNC_APPLY':_0x3422c8(0x4a2),'TXN_START':'txn:start','TXN_END':_0x3422c8(0x2c5),'TXN_ROLLBACK':_0x3422c8(0x2d4),'TYPE_REGISTERED':_0x3422c8(0x57d),'TYPE_DROP':_0x3422c8(0x22f),'ENV_OPENED':_0x3422c8(0x415),'ENV_REMOVED':_0x3422c8(0x5a0),'SYSTEM_ENV_RELEASE':_0x3422c8(0x414),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x3422c8(0x51a),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x3422c8(0x5c0),'LICENSE_ADDED':_0x3422c8(0x386),'LICENSE_ACTIVATED':_0x3422c8(0x3d7),'LICENSE_REMOVED':_0x3422c8(0x51c)},_0x11440c={'CREATING':_0x3422c8(0x3c9),'RESETTING':_0x3422c8(0x2de),'READY':_0x3422c8(0x23d),'DROPPING':_0x3422c8(0x21b),'WAITING':_0x3422c8(0x302)},_0xec4e72={'CREATED':'created','STARTING':_0x3422c8(0x451),'STARTED':_0x3422c8(0x36f),'STOPPING':_0x3422c8(0x652),'STOPPED':_0x3422c8(0x2ec)},_0x153e23={'CREATING':'creating','READY':'ready','HALTED':_0x3422c8(0x631),'STOPPED':_0x3422c8(0x2ec),'RESETTING':_0x3422c8(0x2de)},_0x56afe8=Object[_0x3422c8(0x249)]({'POKE':_0x3422c8(0x510),'DRAIN':_0x3422c8(0x593),'TYPE_DROP':_0x3422c8(0x342),'PROC':_0x3422c8(0x3c8),'ENV_RELEASE':_0x3422c8(0x274)});return okdbEnums={'BUS_EVENTS':_0x56afe8,'CHANGE_ACTIONS':_0x22e173,'EVENTS':_0x44f7ab,'INDEX_STATE':_0x11440c,'OKDB_STATE':_0xec4e72,'VIEW_STATE':_0x153e23},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0xa1b8bd=_0x2d3788;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x1f1f45=require$$1$1,_0x4ff570=require$$1,_0x5a1b1c=require$$0$1,_0xf30e73=_0x1f1f45['readFileSync'](_0x4ff570['join'](__dirname,_0xa1b8bd(0x3bd)),_0xa1b8bd(0x5aa))[_0xa1b8bd(0x1bd)](),_0x258ef3=_0x5a1b1c[_0xa1b8bd(0x594)](_0xf30e73)[_0xa1b8bd(0x2c0)]({'type':'spki','format':'der'}),_0x23c238=_0x5a1b1c[_0xa1b8bd(0x34f)](_0xa1b8bd(0x50c))[_0xa1b8bd(0x2e9)](_0x258ef3)[_0xa1b8bd(0x2ef)](_0xa1b8bd(0x24c))[_0xa1b8bd(0x35c)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0xf30e73,'PUB_FINGERPRINT':_0x23c238},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function _0x1b08(){const _0x1241a9=['roles','\x20\x20Usage:','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20✓\x20','finally','functions','\x20to\x20browse\x20the\x20API,\x20','updateSupervisedChildStats','\x0a\x20\x20\x20\x20\x20\x20','fieldPath','inputSchema','list','find','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','\x20forked\x20','_buckets','license','cluster-wide','registry-publish','queue-worker','546670pFkiHr','_startedAt','\x20type','mkdirSync','Type\x20\x27','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','./okdb-data','Index\x20\x22','emit','_lockDb','reportThreadStats','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','change','_lastCpuUsage','\x20license(s)','enable','\x20\x20✓\x20database\x20opened\x0a','_committed','available','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','_wantDbHandle','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','\x20\x20Path\x20access','host','_isClusterController','_participate','targetKey','exportBlobs','port','TYPE_NOT_REGISTERED','SWAP','prompt','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','timeMachine','stack','__esModule','load','busy','log','SCHEMA_VALIDATION_FAILED','beforeWrite','\x20worker\x20slot=','updatedAt','DELETE\x20type/users/item/x','schema:drop','\x20which\x20does\x20not\x20exist','62518nhkjvB','\x20\x20#','openDB','version','_baselines','\x20\x20[okdb]\x20','getRange','SIGBREAK','_activateProcesses','blob','\x20to\x20quit.','getSecurityNotices','\x20\x20Tier:\x20\x20\x20\x20','bumpCmd','_flushTimer','fill','ms\x20(attempt\x20','dirname','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','trimStart','object','_log','external','access','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','[env]','node','_desiredOverlay','pending','No\x20tokens.','LOGS','\x20supervised)','sha256','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','[okdb]\x20error:\x20failed\x20to\x20read\x20','_adminRelay','bus:poke','\x27\x20doesn\x27t\x20exist','\x20\x20Writes:\x20\x20','standard','fn-runner','primary','\x20writes\x20(','now','resetReadTxn','ENV','ttl:set','_groupByProcess','license:removed','\x20+\x20','getProcess','treeView','PUB_FINGERPRINT',',\x20closing…\x0a','OKDBVersionMismatchError','registry\x20heartbeat\x20skipped\x20(writer=','\x1b[0m','cursorKey','raw-remove','_started','REMOVE','exports','_licenseHash','1416855ylbgGg','val','Files','parse','start','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','3737598FkvYYI','LICENSEE','index:registered','createHmac','argv','types','logs','activation','okdb-http-worker-child.js','recordWrite','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','function','memoryUsage','type/','_admissionStarted','\x0a\x0a\x20\x20','Environments','[okdb]\x20backup\x20complete','\x20\x20Usage:\x20','\x20pid=','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','cpuPct','_rootDb','_lastPublishAt','_timer','OKDBIndexNotRegisteredError','registerType','Embeddings','\x0a===\x20OKDB_DIAG\x20','search','\x20more','_children','deregisterSelf','getCount','decodeActivationToken','rowKey','default','revoke','length','value','--no-cluster','decodeLicenseBlob','[okdb]\x20nothing\x20to\x20reset\x20—\x20',':\x20key\x20[','\x20\x20score:','USE','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','[okdb]\x20exporting\x20blobs…','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','alloc','copy','[okdb]\x20reset\x20aborted','dim','_sandbox','green','--no-admin','ITEM_UPDATE','Indexes',':want','_openEnvLazy','registerFts','importFromFile','\x0a\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','[okdb]\x20invalid\x20','username','_buildChildRow','import','createEnvironment','cli','\x0a\x20\x20License\x20details:','PUT','\x20\x20⚠\x20\x20','use','api','type:registered','from','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','/api/','\x20\x20\x20\x20port:\x20\x20\x20\x20','fromEntries','_handleInProcess','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','meta','liveThreadStats','OKDBInvalidPrimaryKeyError','_drainOne','writeUInt32BE','http','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','onLicenseExpired','INDEX_REGISTERED','Release','--password','Records','active:','OKDBAlreadyExistsError','bus:drain','createPublicKey','transactionSync','\x20\x20✓\x20Removed\x20license\x20','perf_hooks','{}[]:,\x27\x22','SIGTERM','noRepl','env/:env','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','OKDB-PIN-V1:','GET','--key','env:removed','string','VIEW_PROGRESS','_enqueuedAt','threads','SIGINT\x20(double-tap)','charCodeAt','\x20months\x20from\x20issuance)','_rowKey','noteListenAddr','utf8','user','flushed','id:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','_released','queue/','feed:','LICENSED_BUILD','max','transport','_holderDead','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','loadEnvFile','--help','\x20\x20⚠','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','\x20\x20Some\x20checks\x20failed.\x0a','concat','Full-text\x20search','handle','license:invalid','set','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','_caps','_writer','\x20process','clusterWorkers','\x1b[36m','\x20\x20\x20\x20path:\x20\x20','send','setTtl','recheck','exp','floor','\x22\x20is\x20used\x20by:\x20','\x20<path>\x20[json-body]','respawnTimer','_kind','_onTick','files/','ms\x20on\x20env=','OKDBError','\x20MB)','--address','\x20\x20✓\x20Revoked\x20token\x20','token','loop-lag','readFileSync','[okdb]\x20cluster\x20primary\x20pid=','isWanted','_desired','acquiredAt','isDead','\x22.\x20Use:\x20create,\x20list,\x20revoke','--config','workers','ftsName','LABEL','cause','/admin/index.html','uncaughtException','percentile','decommission','processingStatusView','_collectSingletonClaims','execArgv','workersFlag','importBlobs','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','fts:registered','127.0.0.1','quit','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','_statusEnv','draining','permissions','--permissions','okdb','rmSync','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','_key','routes','__vocab/version','hint','none','result','close','\x0a\x20\x20✓\x20License\x20added','Hint:\x20','tryAcquire','[okdb-cluster]\x20','licensee','../okdb','claims','(null)','decoded','platform','kind','records','access:\x20','view:progress','rawBuf','\x20\x20\x20\x20licensee:\x20\x20','toUpperCase','\x20\x20(unlimited)','_inflight','__identity','dumpedAt','\x20\x20env=','\x20died\x20','_publishFailWarned','\x20\x20\x20\x20status:\x20\x20\x20\x20','race','bind','body','[okdb]\x20closed\x20cleanly\x0a','\x0a[okdb]\x20fatal\x20error:','dynamic','afterWrite','connected','%),\x20','[okdb]\x20created\x20./okdb-data','item:remove','\x20\x20\x20\x20\x20\x20\x20','embedded','SIGINT','OKDBUniqueConstraintError','dead','release','warn','system','--log-requests','_quantum','halted','putSync','activateLicense','_lastCpuAt','toLowerCase','[okdb]\x20port\x20','issuedAt','blobs','\x20\x20(name:\x20','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','getClock','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','indexes','server','_dedupeKey','unclaimed','uptime','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a','18210240KWdzDF','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','\x20statusEnv=','_rawDb','enabled','pause','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','_draining','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','getDesired','FTS_REGISTERED','SIGKILL','SIG_INVALID','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','[okdb]\x20starting…\x0a','stopping','\x27,\x20cannot\x20map\x20to\x20\x27','filter','_handlePoke','\x20@\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','[on|off|level]','\x20MB\x20→\x20','--watch','dropFts','ref:violation','join','addLicense','isEnabled','/\x20quit\x20/\x20Ctrl+C','\x20/\x20','Version\x20mismatch\x20for\x20','SYSTEM_STOPPED','null','verify','\x20environment\x20','\x20references\x20','HELP','stringify','auth','_changefeed','base64url','next','pid','item:create','padStart','./okdb-export.ndjson','system:ready','processor:paused','\x20\x20\x20\x20\x20\x20','wrong_node','shutdown','_outstanding','Bearer\x20','_active','Foreign\x20key\x20violation:\x20','sort','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20','LICENSE_ACTIVATION_INVALID','exit','commitP99Ms','maxWrites','[okdb]\x20opening\x20','\x20\x20\x20\x20features:\x20\x20','features','processor:error','QUIT','MALFORMED_TOKEN','history','other','line','logRequests','PUT\x20type/users/item/x\x20{\x22n\x22:1}','fts:reset','isInteger','startsWith','\x0a\x20\x20No\x20routes\x20matching\x20\x22','failures','\x20licenses','--version','changes','shmbufNative','listLicenses','\x20\x20\x20http://localhost:','description','clearThreadStats','maxExtra','events','keys','trim','config\x20file\x20valid:\x20','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','inflightAgesMs','listening','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','FTS_DROP','node:perf_hooks','types\x20--env\x20staging','Examples','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','stop','__okdbCluster','_hbTimer','_onItem','PATCH','true',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','LICENSE_HASH_MISMATCH','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','remove','\x20\x20\x20\x20permissions:\x20','http.workers','[okdb]\x20export\x20complete','killable','\x20(slot=','procmode/','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x20\x20@','randomUUID','transaction','[okdb]\x20importing\x20','writeUInt16BE','\x20\x20records=','readUInt32BE','unique:violation','ms\x20env=','byteLength','ms\x20activeWriters=','\x20\x20\x20\x20port:\x20\x20','dbPath','_computeStatus','inspect','_highWater','\x20\x20All\x20checks\x20passed.\x0a','_admissionTimer','[okdb-cluster]\x20primary\x20pid=','NOT_FOUND','_lastCpuPct','_heartbeatTimer','debug','toISOString','namespace','type/users/item/alice',');\x20','_durs','\x20HTTP\x20workers\x20','readUInt8','putNode','INVALID_VALUE',':\x20expected\x20','ppid','port\x20','_nodeDbFor','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','syncPeers','.kdbconfig','EADDRINUSE','hidden','_wantDb','ROUTES','\x20\x20\x20\x20status:\x20\x20\x20\x20active','types:','_migrateVocab','isFeatureEnabled','_instanceId','_coordinator','~lock','\x20times\x20in\x20','_publishNow','fork','\x0a\x20\x20Joining\x20cluster\x20at\x20','off','_onPoke','reduce','_db','mean','getChanges','statSync','./okdb-backup','\x20already\x20in\x20use','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','listenAddr','dropping','[okdb]\x20blobs:\x20imported=','prependListener','body:\x20','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','tags','reverse','\x20\x20(licensee:\x20','compact','clearLine','sizeBefore','attachFeed','_ownMeta','push','kill','_refreshDesiredSnapshot','consecutiveFailures','OKDB_HTTP_WORKERS','commitsPerSec','envs','type:drop','indexOf','depth','heartbeatMs','OKDBSchemaCollectionError','[okdb]\x20cluster\x20close\x20error:\x20','assign','rss','errors','[okdb]\x20invalid\x20log\x20level:\x20\x22','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','some','config\x20http.workers','every','ready','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','write','3240208BElMnL','address','(none)','cluster','\x20\x20Type\x20','key','OKDBIndexAlreadyRegisteredError','INDEX_NOT_REGISTERED','hostname','freeze','delete','disable','hex',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','SYNC_COMMITS','resetFts','_done','default:\x20cores−1\x20=\x20','config','\x20worker(s)\x20still\x20serving','_singletonLock','[okdb]\x20exported\x20\x20types=','claimGated','\x20documents\x20fail\x20validation','backup','_putRowSync','application/json','workersConfigured','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','Build\x20expects\x20public\x20key\x20fingerprint\x20','_listenAddr','\x1b[33m','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','_clusterWorkerAttached','\x20\x20Common\x20causes:','node/','_drain','--no-repl','\x20\x20\x20\x20limits:\x20\x20\x20\x20','Invalid\x20primary\x20key\x20type:\x20',',\x20got\x20','stopHeartbeat','_maybePublish','derivePin','catch','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','processKey','init','level:\x20info','\x22\x20→\x20','--port','\x20ipc\x20error:\x20','bus:env_release','_startAdmission','fts','message','name','assertLimit','received\x20','\x22\x20to\x20enable\x20it.','instanceId','\x20\x20Expected\x20one\x20of:','Events','ms\x20mean=','children','__OKDB_PUB_FINGERPRINT__','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','shmbuf.node','\x20(must\x20be\x201–65535)','\x20HTTP\x20server(s)\x20on\x20port\x20','\x20active\x20env:\x20','readline','POST','fts:drop','~processes:cmd','split','createInterface','system:poke','mcp','\x20\x20·\x20\x20','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','FOREIGN_KEY_DELETE_RESTRICTED','PUBLIC_KEY_PEM','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','_startHeartbeat',',\x20stopping\x20workers…\x0a','payload','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','stderr','ALREADY_EXISTS','type/users','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','min','call','toString','writeFileSync','OKDB_HTTP_WORKERS\x20env','_envs','count','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','sig','boolean','ref:violation_resolved','_nodeDb','free\x20tier','randomBytes','--token','attach','effective','listRoutes','_lookupByName','ACTIVATION_EXPIRED','processorId','licenseType','--name','start\x20','\x20phase=','env/staging/info','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','_isWriter','hasDesired','info','forEach','error','\x1b[2m','[body]','\x1b[1m','License\x20expired\x20or\x20invalidated','export','targetType','OKDBTypeAlreadyRegisteredError','limits','[okdb]\x20exporting\x20env\x20\x22','txn:end','admin','--print','_heartbeatInFlight','_clusterOrphanWatch','FTS_RESET','\x20already\x20exists','role','Token\x20secret\x20not\x20configured','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','then','level','3JjMcYO','view','_enableChangelog','txn:rollback','tierList','\x20log\x20level:\x20','_nodeDead','\x27\x20is\x20already\x20registered','\x20drainAge=','running','--env','prototype','stdin','resetting','input:\x20','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','pin','INDEX_ALREADY_REGISTERED',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','No\x20license\x20found\x20matching\x20this\x20activation\x20token','magenta','bold','\x20\x20(need\x20≥\x2018)','update','(unset)','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','stopped','_bpParkedTotal','red','digest','_buildOwnRow','build','\x20→\x20POST\x20/api/env/','epoch','_acquiredAt','\x20\x20\x20\x20expires:\x20\x20\x20','(on\x20any\x20path\x20command)','addSupervisedChild','clearTtl','processor:retry','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','toFixed','Processors','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','fts:','[okdb]\x20backing\x20up\x20to\x20','\x20\x20\x20\x20graceful\x20shutdown\x0a','clear','waiting','\x20\x20changes=','\x27:\x20','writes=','\x0a[okdb]\x20error:\x20','disconnect','\x20logs\x20on\x20\x20','OKDBInvalidValueError','onWindow','licenseHash','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x20\x20[',')\x20to\x20your\x20license\x20vendor.','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','\x0a\x20\x20','_isStale','assertFeature','cluster:','_lock','--workers','type','nodesView','system:stopped','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','INVALID_PRIMARY_KEY','processes','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','removeSupervisedChild','shift','__okdbSlot','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','code','cpuUsage','sizeAfter','--types','use\x20<env>','--path','reload','idx:','_onProcEvent','processors','\x0d[okdb]\x20blobs:\x20','SCHEMA_COLLECTION_INVALID','path','system:type_drop','round','win32','test','flushLmdb','node\x20identity','unique:violation_resolved','parkedNow','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','unhandledRejection','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','holder','_singletonLocks','--test','ENV_CLOSING_RETRY','heapTotal','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','net','OKDBSchemaValidationError','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','bus:type_drop','replace','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','\x20\x20·\x20','database\x20path\x20not\x20writable:\x20','put','\x20\x20║','pushEphemeral','error:\x20','clusterStatusView','__writeCounter','selfAddress','\x20writer{depth=','createHash','valid','_getType','expired','process','.kdb_history','\x20records…','INDEX_RESET','\x20\x20\x20\x20writes:\x20\x20\x20\x20','_isReader','inst:','\x20(expires\x20','--changes','slice','white','FEATURES','EXIT','startHeartbeat','\x0d[okdb]\x20','expiresAt','processors/','OKDBTypeNotRegisteredError','http-server','_markSeen','toLocaleString','stats','registerIndex','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','reason','unref','childTransaction','started','add','engines','once','\x1b[34m','abs','--ttl','building','lifecycle','_flushDebounce','help','env/','\x20\x20Flags','dedupeMax','doctor','reap','all','unlinkSync','\x27\x20already\x20registered','--label','single','values','licenses','license:added','setLogger','columns','isFile','allocUnsafe','DELETE','_onStop','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','views','_windowCbs','_supervisorKey','maxMs','shmbuf/package.json','system:clock_change','Activation\x20invalid:\x20','0123456789ABCDEFGHJKMNPQRSTVWXYZ','number','ttlMs','ITEM_CREATE','~tokens','publishChildRow','_isFree','License\x20already\x20stored','createServer','deaths','Queue','[okdb-cluster]\x20worker\x20pid=','Index\x20\x27','hasOwnProperty','License\x20signature\x20invalid:\x20','sync','\x20day(s).','ephemeral','runtimeProcessesView','.okdb-write-test','timingSafeEqual','caps','create','slotKey','map','reset','ESRCH','\x20parkedNow=','_license','stdout','verifyActivation','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','_systemEnv','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','registry\x20publish\x20failing:\x20','ceil','nodeKey','quantum','\x1b[37m','\x20\x20+','keys/public.pem','decommissioned','listen','\x20\x20╚═══════════════════════════╝','--inspect','gray','env','status','_pending','--grants','recent\x20writes\x20(newest\x20first)','bus:proc','creating','fanout','crypto','online','_sampleOwnStats','\x20\x20(no\x20env\x20draining)','size','removeLicense','_scheduleFlush','_seen','setupPrimary','\x22\x20matches\x20','singletonClaims','(primary\x20=\x20processor)','license:activated','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','Engines','SYSTEM_PROC','password','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','--username','isWorker','_processStartedAt','/types\x0a\x20\x20\x20\x20','operation','ORPHAN\x20(env-closed\x20write)','UNIQUE_CONSTRAINT','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','LICENSE_INVALID','~licenses','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','\x20\x20✗','child_process','\x20tokens:',':\x20processor\x20(HTTP-silent),\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','invalid','\x20\x20skipped=','INDEX_HAS_CONSUMERS','\x20does\x20not\x20exist','1ofN:','endsWith','mode','detachConsole','migrate','TYPE_ALREADY_REGISTERED','state','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','yellow','dest','processing','\x20\x20✓\x20OKDB\x20cluster\x20running','data','repeat','allSettled','~processes','open\x20','identity','writeUInt8','616488vnvlPD','\x20\x20✓\x20http\x20listening\x20on\x20:','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','\x22\x20(must\x20be\x20debug|info|warn|error)','21IITjZe','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','cluster:\x20ready\x20(','entries','param','NAME','references','_cmd','SYSTEM_POKE','yes','index','system:env_release','env:opened','_cursors','processor:progress','splice','_buildProcessingFacet','logLevel','raw-put','\x0a\x20\x20Invalid\x20JSON:\x20','grants','existsSync','msg','--drop','label','\x20│\x20','note','expiry','committed','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','/api/env/','setOwnMeta','isConnected','removeNode','\x20sync','drop','unknown','startedAt','summary','has','<path>','_putRowAsync','embeddings','_collectWriterFacet','[okdb-cluster]\x20respawning\x20worker\x20slot=','system:drain','get','_ensureDesired','--log-level','isArray','/api','licensed','\x1b[35m','hasType','type/users/item/alice\x20--env\x20staging','\x20in\x20','sub','\x20\x20\x20\x20usage:\x20\x20\x20','VERB','sandbox','addedAt','_role','shutting\x20down…\x0a','noAdmin','\x20\x20\x20\x20\x20http://localhost:','[okdb]\x20error:\x20','keys:','heapUsed','current','cyan','files','LICENSE_EXPIRED_ACTION','starting','slot','firstTs','\x20for\x20commands,\x20','rows=','[okdb]\x20close\x20error:\x20','cpus','config\x20file\x20invalid:\x20','_selfKey','index:reset','\x22\x20on\x20\x22','method','PIN','\x20records','details','processor:resumed','okdb-writer:\x20env\x20closing\x20—\x20retry','\x20not\x20found','fast','(add\x20a\x20license\x20first)','force','transport:\x20','INDEX_READY','ITEM_REMOVE','removeSync','schema:set','createdAt','\x20\x20(','\x0a[okdb]\x20received\x20','_report','PERMISSIONS','commit','_threadStats','drain','isTTY','indexToDb','_bpWaiters','\x20\x20Envs:\x20\x20\x20\x20','STATUS','_nodeDbCache','typesPerEnv','dropType','\x0a\x20\x20✓\x20License\x20activated','\x27\x20on\x20type\x20\x27','\x20logs\x20off\x0a','safety','selfKey','\x20\x20\x20\x20license:\x20','--open','\x20bytes,\x20need\x20>=\x2065)','_clusterOnMessage','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','_removeRowAsync','padEnd','[okdb]\x20imported\x20\x20types=','time','supervisorKey','listNodes','created','okdb.pid','entry','[okdb]\x20http\x20workers:\x20','resetIndex','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','open','System','active','(empty)','_closed','noCluster','getPins','ttl','\x1b[32m','2.0.1','index:drop','Schema\x20validation\x20failed\x20for\x20','index:ready','appendFileSync','includes','detectInputType','sync:apply','async','flushDebounce','(worst\x20','\x20\x20\x20\x20','resolve','\x20deleted','typeSubDbs'];_0x1b08=function(){return _0x1241a9;};return _0x1b08();}function requireOkdbLicense(){const _0x1be46e=_0x2d3788;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x3e1fe1=require$$0$1,{OKDBError:_0x25d745}=requireOkdbError(),{EVENTS:_0x59ee3f}=requireOkdbEnums(),_0x182632=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x108265,LICENSE_TYPE_INTERNAL:_0x23c033,OPEN_LICENSE_MAX_DURATION_MS:_0x10b94b}=_0x182632,_0x3a0a51=requireOkdbPubkey(),_0x49c8f6={'LICENSED_BUILD':_0x1be46e(0x1cd),'PUBLIC_KEY_PEM':_0x3a0a51[_0x1be46e(0x292)],'PUB_FINGERPRINT':_0x3a0a51[_0x1be46e(0x520)],'LICENSE_EXPIRED_ACTION':_0x1be46e(0x4e4)},_0x18fa54=_0x1be46e(0x3e6),_0x40fd77={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x155817(_0x51a712){const _0x39b0df=_0x1be46e;!_0x51a712[_0x39b0df(0x43e)](_0x18fa54)&&await _0x51a712['registerType'](_0x18fa54);}class _0x264957{constructor(_0x11037e){const _0x5188db=_0x1be46e;this['okdb']=_0x11037e,this[_0x5188db(0x199)]=null;}async[_0x1be46e(0x327)](){const _0x1c35e6=_0x1be46e,_0xb0c687=this['okdb'][_0x1c35e6(0x3b5)];if(!_0xb0c687||!_0xb0c687[_0x1c35e6(0x43e)](_0x18fa54)){this[_0x1c35e6(0x199)]=null;return;}const _0x3cc21c=this['okdb']['id'];let _0x1adfe7=null;for(const {key:_0x320d56,value:_0x3ddd14}of _0xb0c687['getRange'](_0x18fa54)){const _0x3c1131=this[_0x1c35e6(0x1e7)](_0x3ddd14,_0x3cc21c);_0x3c1131===_0x1c35e6(0x494)&&!_0x1adfe7&&(_0x1adfe7={..._0x3ddd14,'id':_0x320d56,'status':_0x3c1131});}this[_0x1c35e6(0x199)]=_0x1adfe7;if(this[_0x1c35e6(0x199)]&&this['_active']['licenseType']===_0x108265){const _0x3bf5eb=Math[_0x1c35e6(0x3b8)]((this[_0x1c35e6(0x199)][_0x1c35e6(0x362)]-Date['now']())/0x5265c00);this['okdb'][_0x1c35e6(0x4e4)]?.['warn']('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x3bf5eb+_0x1c35e6(0x3a5),{'feature':_0x1c35e6(0x4ba),'licensee':this[_0x1c35e6(0x199)]['licensee'],'expiresAt':new Date(this[_0x1c35e6(0x199)]['expiresAt'])['toISOString']()});}this[_0x1c35e6(0x199)]&&this['_active'][_0x1c35e6(0x2b1)]===_0x23c033&&this['okdb'][_0x1c35e6(0x4e4)]?.[_0x1c35e6(0x62d)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x1c35e6(0x4ba),'licensee':this[_0x1c35e6(0x199)]['licensee']});}[_0x1be46e(0x1e7)](_0x1a1129,_0x58dce5){const _0x19125f=_0x1be46e;if(!_0x1a1129[_0x19125f(0x4f5)])return'invalid';let _0x401d65;try{_0x401d65=_0x182632[_0x19125f(0x55a)](_0x1a1129['blob']);}catch(_0x46ff5a){return _0x19125f(0x3ed);}try{const _0x3a8e60=_0x3e1fe1[_0x19125f(0x185)](null,_0x401d65[_0x19125f(0x296)],_0x49c8f6[_0x19125f(0x292)],_0x401d65[_0x19125f(0x2a4)]);if(!_0x3a8e60)return _0x19125f(0x3ed);}catch(_0x354a26){return _0x19125f(0x3ed);}if(_0x401d65[_0x19125f(0x60b)]['licenseType']===_0x23c033)return _0x19125f(0x494);if(_0x401d65[_0x19125f(0x60b)][_0x19125f(0x362)]<=Date[_0x19125f(0x517)]())return'expired';if(_0x401d65['decoded'][_0x19125f(0x2b1)]===_0x108265)return'active';if(!_0x1a1129[_0x19125f(0x538)])return _0x19125f(0x508);const _0x414ba5=_0x182632[_0x19125f(0x3b3)]({'tokenString':_0x1a1129[_0x19125f(0x538)],'nodeId':_0x58dce5,'rawBlobBuf':_0x401d65['rawBuf'],'pubKeyPem':_0x49c8f6['PUBLIC_KEY_PEM'],'pubFingerprint':_0x49c8f6[_0x19125f(0x520)]});if(_0x414ba5['reason']===_0x19125f(0x1cf)||_0x414ba5[_0x19125f(0x36c)]===_0x19125f(0x64f))return _0x19125f(0x195);if(_0x414ba5['reason']===_0x19125f(0x2af))return _0x19125f(0x352);if(!_0x414ba5[_0x19125f(0x350)])return _0x19125f(0x195);return _0x19125f(0x494);}get[_0x1be46e(0x494)](){const _0x5e84d2=_0x1be46e;return this[_0x5e84d2(0x199)];}get[_0x1be46e(0x2ac)](){return this['_active']??_0x40fd77;}[_0x1be46e(0x312)](_0x587214){const _0x368332=_0x1be46e;if(_0x49c8f6[_0x368332(0x5b3)]!==_0x368332(0x1cd))return;const _0x1cb4cc=this[_0x368332(0x2ac)];if(!_0x1cb4cc[_0x368332(0x1a4)]?.[_0x587214]){const _0x10d657=_0x1cb4cc[_0x368332(0x39b)]?'Feature\x20not\x20available\x20on\x20free\x20tier:\x20'+_0x587214+_0x368332(0x5fb)+_0x587214+_0x368332(0x27b):'Feature\x20not\x20licensed:\x20'+_0x587214+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x587214+'\x22.';throw new _0x25d745(_0x10d657,'LICENSE_FEATURE_DISABLED',{'feature':_0x587214});}}[_0x1be46e(0x208)](_0x46657e){const _0x554b7b=_0x1be46e;if(_0x49c8f6[_0x554b7b(0x5b3)]!=='true')return!![];return!!this[_0x554b7b(0x2ac)][_0x554b7b(0x1a4)]?.[_0x46657e];}[_0x1be46e(0x279)](_0x2185ef,_0x197701){const _0x1aa7f7=_0x1be46e;if(_0x49c8f6[_0x1aa7f7(0x5b3)]!=='true')return;const _0x4bb2fc=this[_0x1aa7f7(0x2ac)],_0x28f9f9=_0x4bb2fc['limits']?.[_0x2185ef];if(_0x28f9f9===null||_0x28f9f9===undefined||_0x28f9f9===0x0)return;if(_0x197701>=_0x28f9f9)throw new _0x25d745('License\x20limit\x20exceeded:\x20'+_0x2185ef+'\x20('+_0x197701+'/'+_0x28f9f9+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x2185ef,'current':_0x197701,'max':_0x28f9f9});}async[_0x1be46e(0x65e)](_0x2457df){const _0x51c05c=_0x1be46e;let _0x3aaae2;try{_0x3aaae2=_0x182632[_0x51c05c(0x55a)](_0x2457df);}catch(_0x5ba3a8){throw new _0x25d745('Invalid\x20license\x20blob:\x20'+_0x5ba3a8['message'],_0x51c05c(0x3e5));}let _0x27ef84;try{_0x27ef84=_0x3e1fe1[_0x51c05c(0x185)](null,_0x3aaae2[_0x51c05c(0x296)],_0x49c8f6[_0x51c05c(0x292)],_0x3aaae2['sig']);}catch(_0x2298f1){throw new _0x25d745(_0x51c05c(0x3a3)+_0x2298f1[_0x51c05c(0x277)],'LICENSE_INVALID');}if(!_0x27ef84)throw new _0x25d745(_0x51c05c(0x3d8)+(_0x51c05c(0x25d)+_0x49c8f6['PUB_FINGERPRINT']+'.\x20')+_0x51c05c(0x260),'LICENSE_INVALID',{'expectedFingerprint':_0x49c8f6[_0x51c05c(0x520)]});if(_0x3aaae2[_0x51c05c(0x60b)][_0x51c05c(0x2b1)]===_0x108265){const _0x1e66e6=_0x3aaae2[_0x51c05c(0x60b)][_0x51c05c(0x362)]-_0x3aaae2[_0x51c05c(0x60b)][_0x51c05c(0x637)];if(_0x1e66e6>_0x10b94b)throw new _0x25d745(_0x51c05c(0x3b6)+Math[_0x51c05c(0x3b8)](_0x1e66e6/(0x1e*0x5265c00))+_0x51c05c(0x5a7),_0x51c05c(0x3e5));}const _0x350881=this[_0x51c05c(0x5f9)][_0x51c05c(0x3b5)];await _0x155817(_0x350881);const _0x2741b2=_0x182632[_0x51c05c(0x30b)](_0x3aaae2[_0x51c05c(0x611)])['toString'](_0x51c05c(0x24c));for(const {value:_0x2d8276}of _0x350881['getRange'](_0x18fa54)){if(_0x2d8276[_0x51c05c(0x52a)]===_0x2741b2)throw new _0x25d745(_0x51c05c(0x39c),_0x51c05c(0x3e5));}const _0x5324d1=_0x3e1fe1['randomUUID'](),_0x12b413={'blob':_0x2457df,'activation':null,'addedAt':Date[_0x51c05c(0x517)](),'_licenseHash':_0x2741b2,'licensee':_0x3aaae2[_0x51c05c(0x60b)]['licensee'],'expiresAt':_0x3aaae2[_0x51c05c(0x60b)][_0x51c05c(0x362)],'features':_0x3aaae2[_0x51c05c(0x60b)][_0x51c05c(0x1a4)],'limits':_0x3aaae2['decoded'][_0x51c05c(0x2c3)],'licenseType':_0x3aaae2[_0x51c05c(0x60b)][_0x51c05c(0x2b1)]};return await _0x350881[_0x51c05c(0x347)](_0x18fa54,_0x5324d1,_0x12b413),{'id':_0x5324d1,..._0x12b413};}async[_0x1be46e(0x633)](_0x56df81){const _0x8df40d=_0x1be46e;let _0x1d1002;try{_0x1d1002=_0x182632[_0x8df40d(0x553)](_0x56df81);}catch(_0x2e17dc){throw new _0x25d745('Invalid\x20activation\x20token:\x20'+_0x2e17dc['message'],_0x8df40d(0x19e));}const _0x585e0c=_0x1d1002[_0x8df40d(0x30b)][_0x8df40d(0x29e)](_0x8df40d(0x24c)),_0x26a6df=this['okdb'][_0x8df40d(0x3b5)];if(!_0x26a6df||!_0x26a6df[_0x8df40d(0x43e)](_0x18fa54))throw new _0x25d745('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x8df40d(0x19e));let _0x2b0a92=null,_0x369317=null;for(const {key:_0x332850,value:_0x435a44}of _0x26a6df[_0x8df40d(0x4f2)](_0x18fa54)){if(_0x435a44['_licenseHash']===_0x585e0c){_0x2b0a92=_0x332850,_0x369317=_0x435a44;break;}}if(!_0x2b0a92)throw new _0x25d745(_0x8df40d(0x2e5),_0x8df40d(0x19e));const {rawBuf:_0xb0d6dd}=_0x182632[_0x8df40d(0x55a)](_0x369317[_0x8df40d(0x4f5)]),_0x399b62=_0x182632[_0x8df40d(0x3b3)]({'tokenString':_0x56df81,'nodeId':this[_0x8df40d(0x5f9)]['id'],'rawBlobBuf':_0xb0d6dd,'pubKeyPem':_0x49c8f6['PUBLIC_KEY_PEM'],'pubFingerprint':_0x49c8f6['PUB_FINGERPRINT']});if(!_0x399b62[_0x8df40d(0x350)])throw new _0x25d745(_0x8df40d(0x394)+_0x399b62[_0x8df40d(0x36c)],'LICENSE_ACTIVATION_INVALID',{'reason':_0x399b62[_0x8df40d(0x36c)]});const _0x4938d2={..._0x369317,'activation':_0x56df81};return await _0x26a6df[_0x8df40d(0x2e9)](_0x18fa54,_0x2b0a92,_0x4938d2),{'id':_0x2b0a92,..._0x4938d2};}async[_0x1be46e(0x3d0)](_0x46f3e4){const _0x4457b2=_0x1be46e,_0x460d9f=this[_0x4457b2(0x5f9)]['_systemEnv'];if(!_0x460d9f||!_0x460d9f['hasType'](_0x18fa54))return;await _0x460d9f[_0x4457b2(0x1d2)](_0x18fa54,_0x46f3e4);}async[_0x1be46e(0x1b6)](){const _0x3f2d5a=_0x1be46e,_0x5ba990=this['okdb'][_0x3f2d5a(0x3b5)];if(!_0x5ba990||!_0x5ba990[_0x3f2d5a(0x43e)](_0x18fa54))return[];const _0x4ea252=this['okdb']['id'],_0x5e32f1=[];for(const {key:_0xcd70,value:_0x5289e7}of _0x5ba990['getRange'](_0x18fa54)){const _0x37f0ce=this[_0x3f2d5a(0x1e7)](_0x5289e7,_0x4ea252);_0x5e32f1[_0x3f2d5a(0x228)]({..._0x5289e7,'id':_0xcd70,'status':_0x37f0ce});}return _0x5e32f1;}[_0x1be46e(0x498)](){const _0x55a6ff=_0x1be46e,_0x3da190=this['okdb'][_0x55a6ff(0x3b5)];if(!_0x3da190||!_0x3da190[_0x55a6ff(0x43e)](_0x18fa54))return[];const _0x4e2beb=this['okdb']['id'],_0x2f0580=[];for(const {key:_0x5cf866,value:_0x362875}of _0x3da190[_0x55a6ff(0x4f2)](_0x18fa54)){if(_0x362875[_0x55a6ff(0x52a)]){if(_0x362875[_0x55a6ff(0x2b1)]===_0x108265)_0x2f0580[_0x55a6ff(0x228)]({'licenseId':_0x5cf866,'pin':null});else{const _0x4bf431=Buffer[_0x55a6ff(0x57e)](_0x362875[_0x55a6ff(0x52a)],_0x55a6ff(0x24c)),{pin:_0x21aeef}=_0x182632[_0x55a6ff(0x26b)](_0x4e2beb,_0x4bf431,_0x49c8f6[_0x55a6ff(0x520)]);_0x2f0580[_0x55a6ff(0x228)]({'licenseId':_0x5cf866,'pin':_0x21aeef});}}}return _0x2f0580;}async[_0x1be46e(0x5cb)](){const _0x383b87=_0x1be46e,_0x1e5d46=this[_0x383b87(0x199)];await this[_0x383b87(0x327)]();if(this[_0x383b87(0x199)]&&this[_0x383b87(0x199)][_0x383b87(0x2b1)]===_0x108265){const _0x174eed=Math[_0x383b87(0x3b8)]((this[_0x383b87(0x199)][_0x383b87(0x362)]-Date[_0x383b87(0x517)]())/0x5265c00);this[_0x383b87(0x5f9)][_0x383b87(0x4e4)]?.[_0x383b87(0x62d)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x174eed+_0x383b87(0x3a5),{'feature':_0x383b87(0x4ba),'licensee':this[_0x383b87(0x199)][_0x383b87(0x607)],'expiresAt':new Date(this[_0x383b87(0x199)]['expiresAt'])[_0x383b87(0x1f1)]()});}this['_active']&&this[_0x383b87(0x199)][_0x383b87(0x2b1)]===_0x23c033&&this[_0x383b87(0x5f9)][_0x383b87(0x4e4)]?.['warn'](_0x383b87(0x2e1),{'feature':'license','licensee':this['_active']['licensee']});if(_0x1e5d46&&!this[_0x383b87(0x199)]){this[_0x383b87(0x5f9)][_0x383b87(0x4e4)]?.[_0x383b87(0x62d)](_0x383b87(0x2bf),{'feature':_0x383b87(0x4ba)}),this[_0x383b87(0x5f9)][_0x383b87(0x1bb)]?.[_0x383b87(0x4c6)](_0x59ee3f[_0x383b87(0x3e5)],{'previous':_0x1e5d46});const _0x449518=this[_0x383b87(0x5f9)]['options']?.[_0x383b87(0x58c)]??_0x49c8f6[_0x383b87(0x450)];_0x449518==='shutdown'&&(this[_0x383b87(0x5f9)][_0x383b87(0x4e4)]?.[_0x383b87(0x2bb)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':_0x383b87(0x4ba)}),this[_0x383b87(0x5f9)]['close']()['catch'](()=>{})[_0x383b87(0x4ae)](()=>process[_0x383b87(0x19f)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x264957,'_C':_0x49c8f6},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x1e3f02=_0x2d3788;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x4df28e=require$$0$3,_0xa01211=require$$1$1,_0x3fe10e=require$$0,_0x2719fb=require$$1,_0x2c9b9c=_0x2719fb['join'](_0x3fe10e['homedir'](),_0x1e3f02(0x354)),_0x5440f6=0x3e8,_0x5ed6ac={'reset':_0x1e3f02(0x524),'bold':_0x1e3f02(0x2be),'dim':_0x1e3f02(0x2bc),'red':'\x1b[31m','green':_0x1e3f02(0x49a),'yellow':_0x1e3f02(0x25f),'blue':_0x1e3f02(0x373),'magenta':_0x1e3f02(0x43d),'cyan':_0x1e3f02(0x5c7),'white':_0x1e3f02(0x3bb),'gray':'\x1b[90m'},_0x2959e4=!process[_0x1e3f02(0x3b2)][_0x1e3f02(0x473)]||!!process.env.NO_COLOR,_0x3d8cb4=(_0x51f169,_0x775f01)=>_0x2959e4?_0x775f01:''+_0x51f169+_0x775f01+_0x5ed6ac[_0x1e3f02(0x3ae)],_0x758aa1={'error':_0x5ed6ac[_0x1e3f02(0x2ee)],'warn':_0x5ed6ac['yellow'],'info':_0x5ed6ac['cyan'],'debug':_0x5ed6ac['gray']},_0x212e2c={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x506fed(_0x1e7928,_0x461c6f=_0x1e3f02(0x2b9)){const _0x1c99e7=_0x1e3f02,{level:_0x587065,msg:_0x3dbd96,meta:_0x122467,context:_0x1072a6,ts:_0x64cdd3}=_0x1e7928;if((_0x212e2c[_0x587065]??0x1)<(_0x212e2c[_0x461c6f]??0x1))return;const _0x3b5072=_0x3d8cb4(_0x5ed6ac['gray'],new Date(_0x64cdd3)[_0x1c99e7(0x1f1)]()),_0x1fcd8d=_0x3d8cb4(_0x758aa1[_0x587065]??_0x5ed6ac[_0x1c99e7(0x35d)],_0x587065[_0x1c99e7(0x486)](0x5));let _0x15041b='\x20\x20'+_0x3b5072+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x1c99e7(0x2e7)],_0x1fcd8d)+'\x20'+_0x3dbd96;if(_0x122467&&Object[_0x1c99e7(0x1bc)](_0x122467)[_0x1c99e7(0x557)]>0x0){const _0x3eb18b=Object['entries'](_0x122467)[_0x1c99e7(0x3ad)](([_0x54825f,_0x5c356c])=>_0x54825f+'='+_0x5c356c)[_0x1c99e7(0x65d)]('\x20');_0x15041b+=_0x3d8cb4(_0x5ed6ac[_0x1c99e7(0x566)],_0x1c99e7(0x30d)+_0x3eb18b+']');}if(_0x1072a6!==undefined){const _0x2fc496=typeof _0x1072a6===_0x1c99e7(0x500)?JSON['stringify'](_0x1072a6):String(_0x1072a6);_0x15041b+=_0x3d8cb4(_0x5ed6ac['dim'],'\x20\x20'+_0x2fc496);}const _0x1f920f=_0x587065===_0x1c99e7(0x2bb)||_0x587065===_0x1c99e7(0x62d)?process[_0x1c99e7(0x298)][_0x1c99e7(0x23f)][_0x1c99e7(0x61d)](process[_0x1c99e7(0x298)]):process[_0x1c99e7(0x3b2)][_0x1c99e7(0x23f)][_0x1c99e7(0x61d)](process['stdout']);_0x1f920f(_0x15041b+'\x0a');}function _0x2e1d41(_0x38173e,_0x53ac57){const _0x432850=_0x1e3f02;if(_0x38173e===0xcc||_0x38173e>=0xc8&&_0x38173e<0x12c&&!_0x53ac57){console[_0x432850(0x4e4)](_0x432850(0x310)+_0x3d8cb4(_0x5ed6ac[_0x432850(0x568)],'✓')+'\x0a');return;}if(_0x38173e>=0x190||_0x53ac57?.[_0x432850(0x2bb)]){const _0x64c25=_0x53ac57?.[_0x432850(0x2bb)]??_0x53ac57?.['message']??'HTTP\x20'+_0x38173e;console[_0x432850(0x4e4)]('\x0a\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x432850(0x2ee)],'✗')+'\x20'+_0x3d8cb4(_0x5ed6ac['bold']+_0x5ed6ac[_0x432850(0x2ee)],String(_0x38173e))+'\x20\x20'+_0x64c25+'\x0a');return;}const _0x4ff6ed=Object[_0x432850(0x2dc)][_0x432850(0x3a2)][_0x432850(0x29d)](_0x53ac57??{},'result')?_0x53ac57[_0x432850(0x601)]:_0x53ac57,_0x818588=_0x53ac57?.[_0x432850(0x585)];console[_0x432850(0x4e4)](''),_0x33feeb(_0x4ff6ed,'\x20\x20');if(_0x818588?.[_0x432850(0x2a2)]!=null||_0x818588?.[_0x432850(0x488)]!=null){const _0x5b8d2a=[];if(_0x818588[_0x432850(0x2a2)]!=null)_0x5b8d2a[_0x432850(0x228)](_0x818588[_0x432850(0x2a2)]+'\x20result'+(_0x818588[_0x432850(0x2a2)]!==0x1?'s':''));if(_0x818588[_0x432850(0x488)]!=null)_0x5b8d2a[_0x432850(0x228)](_0x818588[_0x432850(0x488)]+'ms');console['log'](_0x432850(0x310)+_0x3d8cb4(_0x5ed6ac[_0x432850(0x566)],_0x5b8d2a[_0x432850(0x65d)](_0x432850(0x28f))));}console[_0x432850(0x4e4)]('');}function _0x33feeb(_0x42be4b,_0x30f1a6=''){const _0x108063=_0x1e3f02;if(_0x42be4b===null||_0x42be4b===undefined){console[_0x108063(0x4e4)](_0x30f1a6+_0x3d8cb4(_0x5ed6ac[_0x108063(0x566)],_0x108063(0x60a)));return;}if(Array[_0x108063(0x43a)](_0x42be4b)){if(_0x42be4b[_0x108063(0x557)]===0x0){console['log'](_0x30f1a6+_0x3d8cb4(_0x5ed6ac[_0x108063(0x566)],_0x108063(0x495)));return;}if(_0x42be4b[_0x108063(0x23c)](_0x5b9da4=>_0x5b9da4&&typeof _0x5b9da4===_0x108063(0x500)&&_0x108063(0x245)in _0x5b9da4&&'value'in _0x5b9da4)){_0x239ca1(_0x42be4b,_0x30f1a6);return;}if(_0x42be4b['every'](_0x2bf0fa=>_0x2bf0fa&&typeof _0x2bf0fa===_0x108063(0x500)&&_0x108063(0x316)in _0x2bf0fa&&_0x108063(0x2a2)in _0x2bf0fa)){_0x2e6e1e(_0x42be4b,_0x30f1a6);return;}if(_0x42be4b[_0x108063(0x23c)](_0x54e9f2=>typeof _0x54e9f2!==_0x108063(0x500)||_0x54e9f2===null)){_0x42be4b['forEach']((_0x34737b,_0xc77616)=>console[_0x108063(0x4e4)](_0x30f1a6+_0x3d8cb4(_0x5ed6ac['gray'],_0xc77616+0x1+'.')+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x108063(0x35d)],String(_0x34737b))));return;}_0x42be4b[_0x108063(0x2ba)]((_0x53b6b5,_0x5b69df)=>{const _0x5be43c=_0x108063;console[_0x5be43c(0x4e4)](_0x30f1a6+_0x3d8cb4(_0x5ed6ac[_0x5be43c(0x566)],'['+_0x5b69df+']'));if(typeof _0x53b6b5==='object'&&_0x53b6b5!==null)_0x215c82(_0x53b6b5,_0x30f1a6+'\x20\x20');else console['log'](_0x30f1a6+'\x20\x20'+String(_0x53b6b5));});return;}if(typeof _0x42be4b==='object'){if(_0x108063(0x245)in _0x42be4b&&_0x108063(0x558)in _0x42be4b&&Object[_0x108063(0x1bc)](_0x42be4b)['length']<=0x3){console[_0x108063(0x4e4)](_0x30f1a6+_0x3d8cb4(_0x5ed6ac[_0x108063(0x2e7)]+_0x5ed6ac['cyan'],String(_0x42be4b[_0x108063(0x245)])));const _0x9f26d7=_0x42be4b[_0x108063(0x558)];if(_0x9f26d7&&typeof _0x9f26d7===_0x108063(0x500))_0x215c82(_0x9f26d7,_0x30f1a6);else console[_0x108063(0x4e4)](_0x30f1a6+_0x3d8cb4(_0x5ed6ac[_0x108063(0x35d)],String(_0x9f26d7)));return;}_0x215c82(_0x42be4b,_0x30f1a6);return;}console[_0x108063(0x4e4)](_0x30f1a6+_0x3d8cb4(_0x5ed6ac[_0x108063(0x35d)],String(_0x42be4b)));}function _0x215c82(_0x4901f9,_0x1cc290=''){const _0x2693a4=_0x1e3f02,_0x562128=Object['entries'](_0x4901f9);if(_0x562128[_0x2693a4(0x557)]===0x0){console['log'](_0x1cc290+_0x3d8cb4(_0x5ed6ac[_0x2693a4(0x566)],'{}'));return;}const _0x1cdb08=Math[_0x2693a4(0x29c)](0x1c,Math[_0x2693a4(0x5b4)](..._0x562128['map'](([_0xa1f405])=>_0xa1f405[_0x2693a4(0x557)])));for(const [_0x9f1fbb,_0x451af5]of _0x562128){const _0x512beb=_0x3d8cb4(_0x5ed6ac['cyan'],_0x9f1fbb[_0x2693a4(0x486)](_0x1cdb08));if(_0x451af5===null||_0x451af5===undefined)console['log'](_0x1cc290+_0x512beb+'\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x2693a4(0x566)],_0x2693a4(0x184)));else{if(typeof _0x451af5==='object'){const _0x266605=JSON[_0x2693a4(0x189)](_0x451af5);_0x266605['length']<=0x50?console[_0x2693a4(0x4e4)](_0x1cc290+_0x512beb+'\x20\x20'+_0x3d8cb4(_0x5ed6ac['dim'],_0x266605)):(console[_0x2693a4(0x4e4)](_0x1cc290+_0x512beb),_0x33feeb(_0x451af5,_0x1cc290+'\x20\x20'));}else{const _0x850149=typeof _0x451af5===_0x2693a4(0x2a5)?_0x3d8cb4(_0x451af5?_0x5ed6ac[_0x2693a4(0x568)]:_0x5ed6ac[_0x2693a4(0x3f9)],String(_0x451af5)):typeof _0x451af5===_0x2693a4(0x396)?_0x3d8cb4(_0x5ed6ac[_0x2693a4(0x2e6)],String(_0x451af5)):_0x3d8cb4(_0x5ed6ac[_0x2693a4(0x35d)],String(_0x451af5));console[_0x2693a4(0x4e4)](_0x1cc290+_0x512beb+'\x20\x20'+_0x850149);}}}}function _0x239ca1(_0x5475cd,_0x57b81a=''){const _0x4a2f31=_0x1e3f02,_0x2af635=Math[_0x4a2f31(0x29c)](0x20,Math[_0x4a2f31(0x5b4)](..._0x5475cd['map'](_0x10b671=>String(_0x10b671[_0x4a2f31(0x245)])[_0x4a2f31(0x557)])));for(const {key:_0x27c9d6,value:_0x3163e1,score:_0x217d28,clock:_0x11b79d}of _0x5475cd){const _0x1fd313=_0x3d8cb4(_0x5ed6ac['bold']+_0x5ed6ac[_0x4a2f31(0x44e)],String(_0x27c9d6)[_0x4a2f31(0x486)](_0x2af635)),_0x28066e=_0x3163e1==null?_0x3d8cb4(_0x5ed6ac[_0x4a2f31(0x566)],_0x4a2f31(0x184)):typeof _0x3163e1===_0x4a2f31(0x500)?_0x3d8cb4(_0x5ed6ac[_0x4a2f31(0x566)],JSON[_0x4a2f31(0x189)](_0x3163e1)):_0x3d8cb4(_0x5ed6ac[_0x4a2f31(0x35d)],String(_0x3163e1)),_0x15b587=_0x217d28!=null?_0x3d8cb4(_0x5ed6ac[_0x4a2f31(0x3c2)],_0x4a2f31(0x55d)+_0x217d28[_0x4a2f31(0x2fb)](0x4)):'',_0x4c03c3=_0x11b79d!=null?_0x3d8cb4(_0x5ed6ac[_0x4a2f31(0x3c2)],_0x4a2f31(0x1da)+_0x11b79d):'';console[_0x4a2f31(0x4e4)](_0x57b81a+_0x1fd313+'\x20\x20'+_0x28066e+_0x15b587+_0x4c03c3);}}function _0x2e6e1e(_0x22c311,_0x1ef03c=''){const _0x5dbde3=_0x1e3f02,_0x13ec5e=Math[_0x5dbde3(0x29c)](0x20,Math['max'](..._0x22c311['map'](_0x510cc8=>_0x510cc8[_0x5dbde3(0x316)][_0x5dbde3(0x557)])));for(const {type:_0x310191,count:_0x4ae115,fields:_0x441246}of _0x22c311){if(_0x310191[_0x5dbde3(0x1af)]('~'))continue;const _0x3aa8a8=_0x3d8cb4(_0x5ed6ac[_0x5dbde3(0x2e7)]+_0x5ed6ac[_0x5dbde3(0x44e)],_0x310191[_0x5dbde3(0x486)](_0x13ec5e)),_0x392001=_0x3d8cb4(_0x5ed6ac['magenta'],String(_0x4ae115)[_0x5dbde3(0x190)](0x6))+_0x3d8cb4(_0x5ed6ac[_0x5dbde3(0x566)],_0x5dbde3(0x45e)),_0x2988fa=_0x441246&&Object[_0x5dbde3(0x1bc)](_0x441246)[_0x5dbde3(0x557)]?_0x3d8cb4(_0x5ed6ac[_0x5dbde3(0x566)],_0x5dbde3(0x345)+Object[_0x5dbde3(0x1bc)](_0x441246)[_0x5dbde3(0x35c)](0x0,0x6)[_0x5dbde3(0x65d)](',\x20')+(Object[_0x5dbde3(0x1bc)](_0x441246)[_0x5dbde3(0x557)]>0x6?'…':'')):'';console[_0x5dbde3(0x4e4)](_0x1ef03c+_0x3aa8a8+'\x20\x20'+_0x392001+_0x2988fa);}}const _0x263715=[_0x1e3f02(0x536),_0x1e3f02(0x53e),_0x1e3f02(0x5b1),_0x1e3f02(0x5d3),_0x1e3f02(0x1dc),_0x1e3f02(0x363)];function _0x357394(_0xdb7adb,_0x94bfe){const _0x7a724f=_0x1e3f02;if(_0xdb7adb[_0x7a724f(0x1af)](_0x7a724f(0x580)))return _0xdb7adb;if(_0xdb7adb[_0x7a724f(0x1af)]('/'))return'/api'+_0xdb7adb;if(_0xdb7adb[_0x7a724f(0x1af)](_0x7a724f(0x37a)))return _0x7a724f(0x580)+_0xdb7adb;const _0x4beedf=_0x263715[_0x7a724f(0x23a)](_0x3e0a31=>_0xdb7adb===_0x3e0a31['replace'](/\/$/,'')||_0xdb7adb[_0x7a724f(0x1af)](_0x3e0a31));return _0x4beedf?_0x7a724f(0x427)+_0x94bfe+'/'+_0xdb7adb:_0x7a724f(0x580)+_0xdb7adb;}function _0x83e01(_0x12e876){const _0x4c3598=_0x1e3f02,_0x149e21={},_0x265b8c=[];let _0x30a1fc=0x0;while(_0x30a1fc<_0x12e876[_0x4c3598(0x557)]){if((_0x12e876[_0x30a1fc]==='--env'||_0x12e876[_0x30a1fc]==='-e')&&_0x12e876[_0x30a1fc+0x1]&&!_0x12e876[_0x30a1fc+0x1]['startsWith']('-'))_0x149e21[_0x4c3598(0x3c3)]=_0x12e876[++_0x30a1fc];else _0x12e876[_0x30a1fc]===_0x4c3598(0x5b9)||_0x12e876[_0x30a1fc]==='-h'?_0x149e21[_0x4c3598(0x379)]=!![]:_0x265b8c['push'](_0x12e876[_0x30a1fc]);_0x30a1fc++;}return{'flags':_0x149e21,'rest':_0x265b8c};}const _0x1a19f4={'system':_0x1e3f02(0x493),'envs':_0x1e3f02(0x541),'types':'Types','data':_0x1e3f02(0x590),'indexes':_0x1e3f02(0x56b),'fts':_0x1e3f02(0x5be),'sync':'Sync','queue':_0x1e3f02(0x39f),'files':_0x1e3f02(0x52d),'embeddings':_0x1e3f02(0x54c),'engines':_0x1e3f02(0x3d9),'admin':'Admin','event':_0x1e3f02(0x27e),'processor':_0x1e3f02(0x2fc)},_0x145b28=[_0x1e3f02(0x62e),_0x1e3f02(0x22e),_0x1e3f02(0x536),_0x1e3f02(0x3fd),_0x1e3f02(0x63d),_0x1e3f02(0x276),_0x1e3f02(0x3a4),'queue',_0x1e3f02(0x44f),_0x1e3f02(0x433),_0x1e3f02(0x371),_0x1e3f02(0x2c6)];function _0x527ece(_0x517134){const _0x127df4=_0x1e3f02;return _0x517134[_0x127df4(0x343)](/^\/api/,'')[_0x127df4(0x343)](/^\[\/env\/:env=[^\]]*\]/,_0x127df4(0x505))[_0x127df4(0x343)](/^\/env\/:env/,_0x127df4(0x59b))['replace'](/^\//,'');}function _0x1cb12a(_0x82eba8,_0x58b51a=''){const _0x5b1268=_0x1e3f02,_0x3e8d7d=_0x82eba8[_0x5b1268(0x58a)][_0x5b1268(0x2ad)]()[_0x5b1268(0x654)](_0xe93ffd=>!_0xe93ffd[_0x5b1268(0x585)]?.[_0x5b1268(0x202)]),_0x1cfb0f=_0x58b51a?_0x3e8d7d[_0x5b1268(0x654)](_0x24d2d9=>_0x24d2d9[_0x5b1268(0x32d)][_0x5b1268(0x635)]()[_0x5b1268(0x4a0)](_0x58b51a[_0x5b1268(0x635)]())||(_0x3bab4a(_0x24d2d9)??'')['toLowerCase']()['includes'](_0x58b51a[_0x5b1268(0x635)]())||_0x396d44(_0x24d2d9)['some'](_0x44c166=>_0x44c166[_0x5b1268(0x635)]()[_0x5b1268(0x4a0)](_0x58b51a[_0x5b1268(0x635)]()))):_0x3e8d7d;if(!_0x1cfb0f[_0x5b1268(0x557)]){console[_0x5b1268(0x4e4)](_0x3d8cb4(_0x5ed6ac[_0x5b1268(0x3f9)],_0x5b1268(0x1b0)+_0x58b51a+'\x22\x0a'));return;}const _0x331ed9=new Map();for(const _0x22614f of _0x1cfb0f){const _0x5831ca=_0x396d44(_0x22614f)[0x0]??_0x5b1268(0x1a9);if(!_0x331ed9[_0x5b1268(0x430)](_0x5831ca))_0x331ed9[_0x5b1268(0x5c1)](_0x5831ca,[]);_0x331ed9[_0x5b1268(0x437)](_0x5831ca)[_0x5b1268(0x228)](_0x22614f);}const _0x18bf83=[..._0x145b28[_0x5b1268(0x654)](_0x3d4e18=>_0x331ed9[_0x5b1268(0x430)](_0x3d4e18)),...[..._0x331ed9[_0x5b1268(0x1bc)]()][_0x5b1268(0x654)](_0x5c6fc8=>!_0x145b28[_0x5b1268(0x4a0)](_0x5c6fc8))];console[_0x5b1268(0x4e4)]('');for(const _0x103cf9 of _0x18bf83){const _0x225e40=_0x331ed9[_0x5b1268(0x437)](_0x103cf9);if(!_0x225e40?.['length'])continue;console[_0x5b1268(0x4e4)](_0x3d8cb4(_0x5ed6ac[_0x5b1268(0x2e7)],'\x20\x20'+(_0x1a19f4[_0x103cf9]??_0x103cf9)));for(const _0x581986 of _0x225e40){const _0x4d5022=_0x3d8cb4(_0x5ed6ac['magenta'],_0x581986[_0x5b1268(0x45c)][_0x5b1268(0x486)](0x7)),_0x271403=_0x3d8cb4(_0x5ed6ac[_0x5b1268(0x44e)],_0x527ece(_0x581986[_0x5b1268(0x32d)])),_0x54d2db=_0x3bab4a(_0x581986)?_0x3d8cb4(_0x5ed6ac[_0x5b1268(0x566)],'\x20\x20'+_0x3bab4a(_0x581986)):'',_0x42255e=_0x581986[_0x5b1268(0x3e1)]?.['id']?_0x3d8cb4(_0x5ed6ac[_0x5b1268(0x3c2)],'\x20\x20['+_0x581986[_0x5b1268(0x3e1)]['id']+']'):'';console[_0x5b1268(0x4e4)](_0x5b1268(0x4a6)+_0x4d5022+'\x20'+_0x271403+_0x54d2db+_0x42255e);}console[_0x5b1268(0x4e4)]('');}}function _0x41de6b(_0x771db4,_0x152a17){const _0xef6073=_0x1e3f02,_0x3a5bb6=_0x152a17['replace'](/^\/api(\/env\/[^/]+)?\//,'')[_0xef6073(0x28b)]('/')[0x0],_0x2b6338=_0x771db4[_0xef6073(0x58a)]['listRoutes']()[_0xef6073(0x654)](_0x1fcf5f=>_0x1fcf5f[_0xef6073(0x32d)][_0xef6073(0x635)]()[_0xef6073(0x4a0)](_0x3a5bb6['toLowerCase']()));if(!_0x2b6338[_0xef6073(0x557)]){console[_0xef6073(0x4e4)](_0x3d8cb4(_0x5ed6ac['yellow'],_0xef6073(0x649)+_0x152a17+'\x0a'));return;}console[_0xef6073(0x4e4)]('');for(const _0x21da70 of _0x2b6338['slice'](0x0,0xc)){for(const _0x4cf582 of _0x5a35c4(_0x21da70)){console[_0xef6073(0x4e4)](_0x4cf582);}console['log']('');}}function _0x3bab4a(_0x5952ee){const _0x417502=_0x1e3f02;return _0x5952ee[_0x417502(0x3e1)]?.[_0x417502(0x42f)]??_0x5952ee[_0x417502(0x585)]?.[_0x417502(0x42f)]??'';}function _0x32aa4f(_0x53e2a2){const _0x45bc60=_0x1e3f02;return _0x53e2a2['operation']?.[_0x45bc60(0x1b8)]??_0x53e2a2['meta']?.[_0x45bc60(0x1b8)]??'';}function _0x396d44(_0x25d64c){const _0x3aa328=_0x1e3f02;return _0x25d64c['operation']?.[_0x3aa328(0x220)]?.[_0x3aa328(0x557)]?_0x25d64c[_0x3aa328(0x3e1)][_0x3aa328(0x220)]:_0x25d64c['meta']?.[_0x3aa328(0x220)]??[];}function _0x5a35c4(_0x3e94d2){const _0x3c89e8=_0x1e3f02,_0x3164a7=[];_0x3164a7[_0x3c89e8(0x228)]('\x20\x20'+_0x3d8cb4(_0x5ed6ac['bold']+_0x5ed6ac[_0x3c89e8(0x2e6)],_0x3e94d2[_0x3c89e8(0x45c)][_0x3c89e8(0x486)](0x7))+'\x20'+_0x3d8cb4(_0x5ed6ac['bold']+_0x5ed6ac[_0x3c89e8(0x44e)],_0x3e94d2[_0x3c89e8(0x32d)]));_0x3e94d2[_0x3c89e8(0x3e1)]?.['id']&&_0x3164a7['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x3c89e8(0x3c2)],_0x3c89e8(0x5ad)+_0x3e94d2['operation']['id']));_0x3bab4a(_0x3e94d2)&&_0x3164a7['push'](_0x3c89e8(0x1d1)+_0x3d8cb4(_0x5ed6ac['white'],_0x3bab4a(_0x3e94d2)));_0x32aa4f(_0x3e94d2)&&_0x3164a7[_0x3c89e8(0x228)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x3c89e8(0x566)],_0x32aa4f(_0x3e94d2)));_0x396d44(_0x3e94d2)[_0x3c89e8(0x557)]&&_0x3164a7[_0x3c89e8(0x228)](_0x3c89e8(0x1d1)+_0x3d8cb4(_0x5ed6ac[_0x3c89e8(0x3c2)],'tags:\x20'+_0x396d44(_0x3e94d2)['join'](',\x20')));_0x3e94d2[_0x3c89e8(0x3e1)]?.[_0x3c89e8(0x47e)]?.[_0x3c89e8(0x503)]&&_0x3164a7[_0x3c89e8(0x228)](_0x3c89e8(0x1d1)+_0x3d8cb4(_0x5ed6ac['gray'],_0x3c89e8(0x60f)+_0x3e94d2[_0x3c89e8(0x3e1)]['safety'][_0x3c89e8(0x503)]));_0x3e94d2['operation']?.[_0x3c89e8(0x58a)]?.[_0x3c89e8(0x5b5)]&&_0x3e94d2[_0x3c89e8(0x3e1)][_0x3c89e8(0x58a)][_0x3c89e8(0x5b5)]!==_0x3c89e8(0x513)&&_0x3164a7['push'](_0x3c89e8(0x1d1)+_0x3d8cb4(_0x5ed6ac[_0x3c89e8(0x3c2)],_0x3c89e8(0x466)+_0x3e94d2['operation'][_0x3c89e8(0x58a)][_0x3c89e8(0x5b5)]));if(_0x3e94d2[_0x3c89e8(0x3e1)]?.[_0x3c89e8(0x4b4)]){const _0x3da6cb=Object[_0x3c89e8(0x1bc)](_0x3e94d2[_0x3c89e8(0x3e1)]['inputSchema']['properties']||{});if(_0x3da6cb[_0x3c89e8(0x557)])_0x3164a7[_0x3c89e8(0x228)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3d8cb4(_0x5ed6ac['gray'],_0x3c89e8(0x2df)+_0x3da6cb[_0x3c89e8(0x65d)](',\x20')));}return _0x3e94d2[_0x3c89e8(0x585)]?.[_0x3c89e8(0x61e)]&&_0x3164a7[_0x3c89e8(0x228)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x3c89e8(0x3c2)],_0x3c89e8(0x21e)+JSON['stringify'](_0x3e94d2[_0x3c89e8(0x585)]['body']))),_0x3164a7;}async function _0x132a22(_0x11135e,_0xae40fc,_0x5c5bd2,_0x43b9a5=null){const _0x531521=_0x1e3f02,_0x16d5ef=_0x5c5bd2[_0x531521(0x230)]('?'),_0x2108e0=_0x16d5ef>=0x0?_0x5c5bd2[_0x531521(0x35c)](0x0,_0x16d5ef):_0x5c5bd2,_0x574ffd=_0x16d5ef>=0x0?_0x5c5bd2[_0x531521(0x35c)](_0x16d5ef+0x1):'',_0x1f80ad=Object[_0x531521(0x582)](new URLSearchParams(_0x574ffd)['entries']());return _0x11135e[_0x531521(0x58a)][_0x531521(0x5bf)](_0xae40fc,_0x2108e0,{'body':_0x43b9a5,'query':_0x1f80ad,'headers':{'content-type':_0x531521(0x25a)}},{'internal':!![]});}function _0x5632d3(_0xb0c55d){const _0x3873cc=_0x1e3f02;if(!_0xb0c55d)return null;const _0x36ee15=_0xb0c55d[_0x3873cc(0x1bd)]();if(!_0x36ee15)return null;try{return JSON['parse'](_0x36ee15);}catch{}try{return JSON[_0x3873cc(0x52e)](_0x5e366c(_0x36ee15));}catch(_0x177e3e){throw new SyntaxError(_0x177e3e['message'],{'cause':_0x177e3e});}}function _0x5e366c(_0x3ac414){const _0x2c04f5=_0x1e3f02;let _0x53bfe5='',_0xd2d9aa=0x0;while(_0xd2d9aa<_0x3ac414[_0x2c04f5(0x557)]){const _0x3c8c1a=_0x3ac414[_0xd2d9aa];if(_0x3c8c1a==='\x22'){_0x53bfe5+='\x22',_0xd2d9aa++;while(_0xd2d9aa<_0x3ac414[_0x2c04f5(0x557)]&&_0x3ac414[_0xd2d9aa]!=='\x22'){if(_0x3ac414[_0xd2d9aa]==='\x5c'){_0x53bfe5+=_0x3ac414[_0xd2d9aa++];if(_0xd2d9aa<_0x3ac414[_0x2c04f5(0x557)])_0x53bfe5+=_0x3ac414[_0xd2d9aa++];}else _0x53bfe5+=_0x3ac414[_0xd2d9aa++];}_0x53bfe5+='\x22';if(_0xd2d9aa<_0x3ac414['length'])_0xd2d9aa++;continue;}if(_0x3c8c1a==='\x27'){_0x53bfe5+='\x22',_0xd2d9aa++;while(_0xd2d9aa<_0x3ac414[_0x2c04f5(0x557)]&&_0x3ac414[_0xd2d9aa]!=='\x27'){if(_0x3ac414[_0xd2d9aa]==='\x5c'&&_0x3ac414[_0xd2d9aa+0x1]==='\x27')_0x53bfe5+='\x27',_0xd2d9aa+=0x2;else _0x3ac414[_0xd2d9aa]==='\x22'?(_0x53bfe5+='\x5c\x22',_0xd2d9aa++):_0x53bfe5+=_0x3ac414[_0xd2d9aa++];}_0x53bfe5+='\x22';if(_0xd2d9aa<_0x3ac414[_0x2c04f5(0x557)])_0xd2d9aa++;continue;}if('{}[]:,\x0a\x0d\x09\x20'[_0x2c04f5(0x4a0)](_0x3c8c1a)){_0x53bfe5+=_0x3c8c1a,_0xd2d9aa++;continue;}let _0x3fddcf='';while(_0xd2d9aa<_0x3ac414[_0x2c04f5(0x557)]&&!_0x2c04f5(0x598)[_0x2c04f5(0x4a0)](_0x3ac414[_0xd2d9aa])&&_0x3ac414[_0xd2d9aa]!=='\x20'&&_0x3ac414[_0xd2d9aa]!=='\x09'&&_0x3ac414[_0xd2d9aa]!=='\x0a'&&_0x3ac414[_0xd2d9aa]!=='\x0d'){_0x3fddcf+=_0x3ac414[_0xd2d9aa++];}let _0x58da18=_0xd2d9aa;while(_0x58da18<_0x3ac414['length']&&(_0x3ac414[_0x58da18]==='\x20'||_0x3ac414[_0x58da18]==='\x09'))_0x58da18++;if(_0x3ac414[_0x58da18]===':')_0x53bfe5+='\x22'+_0x3fddcf+'\x22';else _0x3fddcf===_0x2c04f5(0x1cd)||_0x3fddcf==='false'||_0x3fddcf===_0x2c04f5(0x184)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x2c04f5(0x331)](_0x3fddcf)?_0x53bfe5+=_0x3fddcf:_0x53bfe5+='\x22'+_0x3fddcf+'\x22';}return _0x53bfe5['replace'](/,(\s*[}\]])/g,'$1');}function _0x2aefef(_0x3e4243){const _0x185353=_0x1e3f02,_0x40b749=[];let _0xc0bb28=0x0;while(_0xc0bb28<_0x3e4243[_0x185353(0x557)]){while(_0xc0bb28<_0x3e4243[_0x185353(0x557)]&&(_0x3e4243[_0xc0bb28]==='\x20'||_0x3e4243[_0xc0bb28]==='\x09'))_0xc0bb28++;if(_0xc0bb28>=_0x3e4243[_0x185353(0x557)])break;const _0x152c8b=_0x3e4243[_0xc0bb28];if(_0x152c8b==='{'||_0x152c8b==='['){const _0x2f7bd8=_0x152c8b==='{'?'}':']',_0x11aad0=_0xc0bb28++;let _0x2bce49=0x1,_0x36bfbb=![],_0x16cd6f='';while(_0xc0bb28<_0x3e4243[_0x185353(0x557)]&&_0x2bce49>0x0){const _0x45b6b1=_0x3e4243[_0xc0bb28];if(_0x36bfbb){if(_0x45b6b1==='\x5c')_0xc0bb28++;else{if(_0x45b6b1===_0x16cd6f)_0x36bfbb=![];}}else{if(_0x45b6b1==='\x22'||_0x45b6b1==='\x27')_0x36bfbb=!![],_0x16cd6f=_0x45b6b1;else{if(_0x45b6b1===_0x152c8b)_0x2bce49++;else{if(_0x45b6b1===_0x2f7bd8)_0x2bce49--;}}}_0xc0bb28++;}_0x40b749[_0x185353(0x228)](_0x3e4243[_0x185353(0x35c)](_0x11aad0,_0xc0bb28));continue;}if(_0x152c8b==='\x22'||_0x152c8b==='\x27'){const _0x5d251f=_0x152c8b;_0xc0bb28++;let _0x5039e2='';while(_0xc0bb28<_0x3e4243['length']&&_0x3e4243[_0xc0bb28]!==_0x5d251f){if(_0x3e4243[_0xc0bb28]==='\x5c'&&_0xc0bb28+0x1<_0x3e4243[_0x185353(0x557)])_0xc0bb28++,_0x5039e2+=_0x3e4243[_0xc0bb28++];else _0x5039e2+=_0x3e4243[_0xc0bb28++];}if(_0xc0bb28<_0x3e4243['length'])_0xc0bb28++;_0x40b749[_0x185353(0x228)](_0x5039e2);continue;}let _0x1185eb='';while(_0xc0bb28<_0x3e4243['length']&&_0x3e4243[_0xc0bb28]!=='\x20'&&_0x3e4243[_0xc0bb28]!=='\x09'&&_0x3e4243[_0xc0bb28]!=='{'&&_0x3e4243[_0xc0bb28]!=='['){_0x1185eb+=_0x3e4243[_0xc0bb28++];}if(_0x1185eb)_0x40b749['push'](_0x1185eb);}return _0x40b749;}function _0x59bd8c(_0x121162,_0x285354){const _0x3152d8=_0x1e3f02,_0x2dfeee=[..._0x121162[_0x3152d8(0x2a1)][_0x3152d8(0x1bc)]()]['filter'](_0x5126a8=>!_0x5126a8[_0x3152d8(0x1af)]('~'));console[_0x3152d8(0x4e4)](['',_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)]+_0x5ed6ac[_0x3152d8(0x44e)],'\x20\x20╔═══════════════════════════╗'),_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)]+_0x5ed6ac[_0x3152d8(0x44e)],_0x3152d8(0x348))+_0x3d8cb4(_0x5ed6ac['bold'],_0x3152d8(0x4ac))+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)]+_0x5ed6ac['cyan'],'║'),_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)]+_0x5ed6ac[_0x3152d8(0x44e)],_0x3152d8(0x3c0)),'','\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x568)],'✓')+'\x20'+_0x3d8cb4(_0x5ed6ac['bold'],_0x3152d8(0x63e))+'\x20\x20http://localhost:'+_0x285354['port'],..._0x285354['clusterWorkers']>0x1?['\x20\x20'+_0x3d8cb4(_0x5ed6ac['green'],'✓')+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)],'cluster')+'\x20'+_0x285354[_0x3152d8(0x5c6)]+_0x3152d8(0x1f6)+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x3c2)],_0x3152d8(0x3d6))]:[],'\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x568)],'✓')+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)],'api')+_0x3152d8(0x449)+_0x285354[_0x3152d8(0x4da)]+_0x3152d8(0x43b),'\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x568)],'✓')+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)],_0x3152d8(0x32d))+_0x3152d8(0x4a6)+_0x285354[_0x3152d8(0x1e6)],'\x20\x20'+_0x3d8cb4(_0x5ed6ac['green'],'✓')+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)],'id')+_0x3152d8(0x194)+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x3c2)],_0x121162['id']),'\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x568)],'✓')+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)],_0x3152d8(0x22e))+'\x20\x20\x20\x20'+_0x2dfeee['map'](_0x374e9d=>_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x44e)],_0x374e9d))[_0x3152d8(0x65d)]('\x20\x20'),..._0x285354['noAdmin']?[]:['\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x568)],'✓')+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)],_0x3152d8(0x2c6))+_0x3152d8(0x1b7)+_0x285354['port']+_0x3152d8(0x5e7)],'',_0x3d8cb4(_0x5ed6ac['dim'],_0x3152d8(0x244)+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)],_0x3152d8(0x379))+_0x3152d8(0x454)+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)],_0x3152d8(0x5fd))+_0x3152d8(0x4b0)+_0x3d8cb4(_0x5ed6ac[_0x3152d8(0x2e7)],_0x3152d8(0x19f))+_0x3152d8(0x4f6)),''][_0x3152d8(0x65d)]('\x0a'));}function _0x2fa385(_0x158ace){const _0x158fb5=_0x1e3f02;console[_0x158fb5(0x4e4)]('\x0a'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x2e7)],_0x158fb5(0x4d4))+'\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x566)],_0x158fb5(0x55f))+'\x0a\x0a\x20\x20'+_0x3d8cb4(_0x5ed6ac['cyan'],'<path>')+_0x158fb5(0x571)+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x44e)],_0x158fb5(0x431))+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x3f9)],'<json-body>')+_0x158fb5(0x50d)+_0x3d8cb4(_0x5ed6ac['cyan'],_0x158fb5(0x443))+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x44e)],'<path>')+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x3f9)],_0x158fb5(0x2bd))+_0x158fb5(0x290)+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x566)],'Examples')+'\x0a\x20\x20\x20\x20'+_0x3d8cb4(_0x5ed6ac['gray'],_0x158fb5(0x2b9))+_0x158fb5(0x59c)+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x3c2)],_0x158fb5(0x22e))+_0x158fb5(0x19d)+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x3c2)],_0x158fb5(0x536))+_0x158fb5(0x2fa)+_0x158ace['env']+_0x158fb5(0x3e0)+_0x3d8cb4(_0x5ed6ac['gray'],_0x158fb5(0x29a))+_0x158fb5(0x30c)+_0x158ace['env']+'/type/users\x0a\x20\x20\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x3c2)],_0x158fb5(0x1f3))+_0x158fb5(0x5f0)+_0x158ace[_0x158fb5(0x3c3)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x3d8cb4(_0x5ed6ac['gray'],'type/users/query\x20{\x22active\x22:true}')+_0x158fb5(0x2f2)+_0x158ace[_0x158fb5(0x3c3)]+'/type/users/query\x0a\x20\x20\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x3c2)],_0x158fb5(0x1ac))+_0x158fb5(0x570)+_0x3d8cb4(_0x5ed6ac['gray'],_0x158fb5(0x4e9))+'\x0a\x20\x20\x20\x20'+_0x3d8cb4(_0x5ed6ac['gray'],_0x158fb5(0x2b5))+_0x158fb5(0x642)+_0x3d8cb4(_0x5ed6ac['bold'],_0x158fb5(0x37b))+'\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x566)],_0x158fb5(0x2f6))+_0x158fb5(0x540)+_0x3d8cb4(_0x5ed6ac['cyan'],'--env\x20<name>')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x44e)],_0x158fb5(0x5b9))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20API\x20docs\x20for\x20a\x20path\x0a\x0a\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x566)],_0x158fb5(0x1c6))+_0x158fb5(0x570)+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x3c2)],_0x158fb5(0x1c5))+_0x158fb5(0x570)+_0x3d8cb4(_0x5ed6ac['gray'],_0x158fb5(0x43f))+_0x158fb5(0x570)+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x3c2)],'type/users\x20--help')+'\x0a\x0a'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x2e7)],'\x20\x20Shell\x20commands')+_0x158fb5(0x540)+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x44e)],_0x158fb5(0x325))+_0x158fb5(0x3ec)+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x44e)],_0x158fb5(0x3c3))+_0x158fb5(0x657)+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x44e)],_0x158fb5(0x5fd))+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x566)],'[filter]')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x44e)],_0x158fb5(0x537))+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x566)],_0x158fb5(0x658))+'\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x44e)],'open')+_0x158fb5(0x5ae)+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x44e)],_0x158fb5(0x379))+_0x158fb5(0x29b)+_0x3d8cb4(_0x5ed6ac['cyan'],'exit')+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x158fb5(0x566)],_0x158fb5(0x660))+_0x158fb5(0x300));}let _0xd1b8c1=![];async function _0x2aacd9(_0x5a0fbe,_0x340fd6=0x0,_0x5408a5=null){const _0x1ee8a1=_0x1e3f02;_0xd1b8c1&&(process[_0x1ee8a1(0x298)][_0x1ee8a1(0x23f)](_0x3d8cb4(_0x5ed6ac[_0x1ee8a1(0x2ee)],_0x1ee8a1(0x5af))),process['exit'](0x82));_0xd1b8c1=!![],process[_0x1ee8a1(0x3b2)][_0x1ee8a1(0x23f)]('\x0a'),process[_0x1ee8a1(0x298)]['write'](_0x3d8cb4(_0x5ed6ac['yellow'],_0x1ee8a1(0x4f1)+(_0x5408a5?_0x1ee8a1(0x27a)+_0x5408a5+',\x20':'')+_0x1ee8a1(0x447)));const _0x4d7113=setTimeout(()=>{const _0x3e4573=_0x1ee8a1;process['stderr'][_0x3e4573(0x23f)](_0x3d8cb4(_0x5ed6ac[_0x3e4573(0x2ee)],'\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a')),process[_0x3e4573(0x19f)](0x1);},0x1388);try{await _0x5a0fbe[_0x1ee8a1(0x602)]();}catch(_0x73f4dd){console[_0x1ee8a1(0x2bb)](_0x3d8cb4(_0x5ed6ac[_0x1ee8a1(0x2ee)],'\x20\x20'+_0x73f4dd[_0x1ee8a1(0x277)]));}clearTimeout(_0x4d7113),process[_0x1ee8a1(0x298)]['write'](_0x3d8cb4(_0x5ed6ac[_0x1ee8a1(0x566)],'\x20\x20[okdb]\x20closed\x20cleanly\x0a')),process[_0x1ee8a1(0x19f)](_0x340fd6);}function _0x25de3d(_0x4e7e33){const _0x15933e=_0x1e3f02,_0x3dc9a4=_0x4e7e33[_0x15933e(0x3c3)]!==_0x15933e(0x555)?_0x3d8cb4(_0x5ed6ac['yellow'],'['+_0x4e7e33[_0x15933e(0x3c3)]+']'):'';return _0x3d8cb4(_0x5ed6ac[_0x15933e(0x2e7)]+_0x5ed6ac['cyan'],_0x15933e(0x5f9))+_0x3dc9a4+_0x3d8cb4(_0x5ed6ac[_0x15933e(0x3c2)],'>\x20');}const _0x38e952=new Set(['GET','POST',_0x1e3f02(0x579),_0x1e3f02(0x1cc),_0x1e3f02(0x38b)]);async function _0x2399fb(_0x3ddbbb,_0x393387,_0x313a64,_0x125dd2,_0x3bdeeb,_0xc45247){const _0x5022ca=_0x1e3f02;_0x3ddbbb=_0x3ddbbb[_0x5022ca(0x1bd)]();if(!_0x3ddbbb||_0x3ddbbb[_0x5022ca(0x1af)]('#'))return;const _0x3d45dd=_0x2aefef(_0x3ddbbb),{flags:_0x551e3b,rest:_0x11f74f}=_0x83e01(_0x3d45dd);if(!_0x11f74f[_0x5022ca(0x557)])return;const _0x1809b1=_0x11f74f[0x0],_0x144ec5=_0x1809b1[_0x5022ca(0x613)]();if(_0x144ec5===_0x5022ca(0x188)){if(_0x11f74f[0x1])_0x41de6b(_0x393387,_0x357394(_0x11f74f[0x1],_0x551e3b[_0x5022ca(0x3c3)]??_0x3bdeeb[_0x5022ca(0x3c3)]));else _0x2fa385(_0x3bdeeb);return;}if(_0x144ec5===_0x5022ca(0x55e)){const _0x5a79ff=_0x11f74f[0x1];if(!_0x5a79ff){console[_0x5022ca(0x4e4)](_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x2ee)],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x393387[_0x5022ca(0x3c3)](_0x5a79ff),_0x3bdeeb[_0x5022ca(0x3c3)]=_0x5a79ff,_0xc45247?.['setPrompt'](_0x25de3d(_0x3bdeeb)),console[_0x5022ca(0x4e4)](_0x5022ca(0x310)+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x568)],'✓')+_0x5022ca(0x286)+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x2e7)]+_0x5ed6ac['cyan'],_0x5a79ff)+'\x0a');}catch{console[_0x5022ca(0x4e4)](_0x5022ca(0x310)+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x2ee)],'✗')+_0x5022ca(0x186)+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x2e7)],_0x5a79ff)+_0x5022ca(0x462)+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x566)],_0x5022ca(0x5c2)));}return;}if(_0x144ec5===_0x5022ca(0x519)){const _0x144329=[..._0x393387[_0x5022ca(0x2a1)][_0x5022ca(0x1bc)]()][_0x5022ca(0x654)](_0x31290f=>!_0x31290f[_0x5022ca(0x1af)]('~'));console['log']('');for(const _0x383b7d of _0x144329){const _0x449696=_0x383b7d===_0x3bdeeb[_0x5022ca(0x3c3)];console['log']('\x20\x20'+(_0x449696?_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x568)],'●'):_0x3d8cb4(_0x5ed6ac['dim'],'○'))+'\x20\x20'+(_0x449696?_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x2e7)]+_0x5ed6ac['cyan'],_0x383b7d):_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x566)],_0x383b7d)));}console[_0x5022ca(0x4e4)](_0x5022ca(0x310)+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x566)],_0x5022ca(0x591))+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x44e)],_0x3bdeeb[_0x5022ca(0x3c3)])),console['log']('');return;}if(_0x144ec5==='ENVS'){const _0x2543e9=[..._0x393387[_0x5022ca(0x2a1)][_0x5022ca(0x384)]()][_0x5022ca(0x654)](_0x49ade5=>!_0x49ade5[_0x5022ca(0x278)][_0x5022ca(0x1af)]('~'));console['log']('');const _0x2cb600=Math[_0x5022ca(0x5b4)](..._0x2543e9['map'](_0x39be73=>_0x39be73['name']['length']));for(const _0xdab812 of _0x2543e9){const _0x5408a8=_0xdab812[_0x5022ca(0x278)]===_0x3bdeeb[_0x5022ca(0x3c3)],_0x281c6d=_0x5408a8?_0x3d8cb4(_0x5ed6ac['green'],'●'):_0x3d8cb4(_0x5ed6ac['dim'],'○'),_0x47995c=_0x5408a8?_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x2e7)]+_0x5ed6ac['cyan'],_0xdab812['name']['padEnd'](_0x2cb600)):_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x566)],_0xdab812['name']['padEnd'](_0x2cb600)),_0x10a365=[..._0xdab812[_0x5022ca(0x4a9)][_0x5022ca(0x1bc)]()][_0x5022ca(0x654)](_0x55a7ad=>!_0x55a7ad[_0x5022ca(0x1af)]('~')),_0x117605=_0x10a365[_0x5022ca(0x557)]?_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x566)],_0x10a365[_0x5022ca(0x35c)](0x0,0x5)['join'](',\x20')+(_0x10a365['length']>0x5?_0x5022ca(0x3bc)+(_0x10a365[_0x5022ca(0x557)]-0x5)+_0x5022ca(0x54f):'')):_0x3d8cb4(_0x5ed6ac['dim'],'(no\x20types)');console['log']('\x20\x20'+_0x281c6d+'\x20\x20'+_0x47995c+'\x20\x20'+_0x117605);}console[_0x5022ca(0x4e4)]('');return;}if(_0x144ec5==='TYPES'){const _0x38b1fa=_0x551e3b[_0x5022ca(0x3c3)]??_0x11f74f[0x1]??_0x3bdeeb[_0x5022ca(0x3c3)];try{const _0x5210f9=_0x393387[_0x5022ca(0x3c3)](_0x38b1fa),_0x5d19d1=[..._0x5210f9[_0x5022ca(0x4a9)][_0x5022ca(0x1bc)]()][_0x5022ca(0x654)](_0x51a8e2=>!_0x51a8e2[_0x5022ca(0x1af)]('~'))[_0x5022ca(0x19b)]();console[_0x5022ca(0x4e4)](_0x5022ca(0x310)+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x566)],_0x5d19d1[_0x5022ca(0x557)]+_0x5022ca(0x4c0)+(_0x5d19d1[_0x5022ca(0x557)]!==0x1?'s':'')+_0x5022ca(0x440)+_0x38b1fa));for(const _0x3a371e of _0x5d19d1){const _0x4ab928=_0x5210f9['typeSubDbs']['get'](_0x3a371e),_0x9975eb=_0x4ab928?.['data']?.[_0x5022ca(0x552)]?.()??0x0,_0x1f4a05=_0x3d8cb4(_0x5ed6ac['bold']+_0x5ed6ac[_0x5022ca(0x44e)],_0x3a371e[_0x5022ca(0x486)](0x1c));console[_0x5022ca(0x4e4)](_0x5022ca(0x4a6)+_0x1f4a05+'\x20\x20'+_0x3d8cb4(_0x5ed6ac['magenta'],String(_0x9975eb)[_0x5022ca(0x190)](0x6))+'\x20'+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x566)],_0x5022ca(0x60e)));}console[_0x5022ca(0x4e4)]('');}catch(_0x43c049){console[_0x5022ca(0x2bb)](_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x2ee)],_0x5022ca(0x310)+_0x43c049[_0x5022ca(0x277)]+'\x0a'));}return;}if(_0x144ec5===_0x5022ca(0x204)){_0x1cb12a(_0x393387,_0x11f74f[_0x5022ca(0x35c)](0x1)['join']('\x20'));return;}if(_0x144ec5===_0x5022ca(0x50a)){const _0x5a71e4=(_0x11f74f[0x1]??'')[_0x5022ca(0x635)]();if(!_0x5a71e4||_0x5a71e4==='on')_0x125dd2['enabled']=!![],_0x125dd2[_0x5022ca(0x2d0)]=_0x5022ca(0x2b9),console[_0x5022ca(0x4e4)](_0x5022ca(0x310)+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x568)],'✓')+_0x5022ca(0x308)+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x566)],_0x5022ca(0x270))+'\x0a');else{if(_0x5a71e4===_0x5022ca(0x210))_0x125dd2[_0x5022ca(0x647)]=![],console[_0x5022ca(0x4e4)]('\x0a\x20\x20'+_0x3d8cb4(_0x5ed6ac['yellow'],'○')+_0x5022ca(0x47d));else _0x212e2c[_0x5a71e4]!==undefined?(_0x125dd2[_0x5022ca(0x647)]=!![],_0x125dd2[_0x5022ca(0x2d0)]=_0x5a71e4,console[_0x5022ca(0x4e4)]('\x0a\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x568)],'✓')+_0x5022ca(0x2d6)+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x2e7)],_0x5a71e4)+'\x0a')):console[_0x5022ca(0x2bb)](_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x2ee)],'\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]'));}return;}if(_0x144ec5===_0x5022ca(0x35f)||_0x144ec5===_0x5022ca(0x1a6)){await _0x2aacd9(_0x393387,0x0);return;}if(_0x144ec5==='OPEN'){const _0x294b44='http://localhost:'+_0x313a64[_0x5022ca(0x4da)]+_0x5022ca(0x5e7),_0x415190=process['platform']==='win32'?_0x5022ca(0x2b3)+_0x294b44:process[_0x5022ca(0x60c)]==='darwin'?_0x5022ca(0x401)+_0x294b44:'xdg-open\x20'+_0x294b44;require$$4['exec'](_0x415190),console[_0x5022ca(0x4e4)](_0x5022ca(0x310)+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x568)],'✓')+'\x20opening\x20'+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x44e)],_0x294b44)+'\x0a');return;}let _0x57e003,_0x29d466,_0x5d0ab4;if(_0x38e952['has'](_0x144ec5)){_0x57e003=_0x144ec5,_0x29d466=_0x11f74f[0x1],_0x5d0ab4=_0x11f74f[_0x5022ca(0x35c)](0x2);if(!_0x29d466){console['error'](_0x3d8cb4(_0x5ed6ac['red'],_0x5022ca(0x543)+_0x1809b1+_0x5022ca(0x5cf)));return;}}else _0x57e003=null,_0x29d466=_0x11f74f[0x0],_0x5d0ab4=_0x11f74f['slice'](0x1);const _0x3a6195=_0x551e3b['env']??_0x3bdeeb[_0x5022ca(0x3c3)],_0x362386=_0x357394(_0x29d466,_0x3a6195);if(_0x551e3b[_0x5022ca(0x379)]){_0x41de6b(_0x393387,_0x362386);return;}let _0x2b0e94=null;if(_0x5d0ab4[_0x5022ca(0x557)]){const _0x5956c4=_0x5d0ab4['join']('\x20');try{_0x2b0e94=_0x5632d3(_0x5956c4);}catch(_0x245a2a){console[_0x5022ca(0x2bb)](_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x2ee)],_0x5022ca(0x41c)+_0x5956c4+_0x5022ca(0x310)+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x566)],_0x245a2a['message'])+'\x0a'));return;}}if(!_0x57e003)_0x57e003=_0x2b0e94!==null?_0x5022ca(0x288):_0x5022ca(0x59e);try{const _0x5866d3=await _0x132a22(_0x393387,_0x57e003,_0x362386,_0x2b0e94);_0x2e1d41(_0x5866d3[_0x5022ca(0x3c4)],_0x5866d3[_0x5022ca(0x61e)]);}catch(_0x349eb3){console[_0x5022ca(0x2bb)]('\x0a\x20\x20'+_0x3d8cb4(_0x5ed6ac[_0x5022ca(0x2ee)],'✗')+'\x20'+_0x349eb3[_0x5022ca(0x277)]+'\x0a');}}class _0xb64bc1{constructor(){const _0x23733b=_0x1e3f02;this[_0x23733b(0x280)]=new Map(),this['dynamic']=null,this['terminal']=![];}}function _0x8ad372(_0x140fa1){const _0x22b3ed=_0x1e3f02,_0x15a439=new _0xb64bc1();for(const _0x3490f2 of _0x140fa1){if(_0x3490f2[_0x22b3ed(0x585)]?.[_0x22b3ed(0x202)])continue;const _0x48ab8c=_0x3490f2[_0x22b3ed(0x32d)]['replace'](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')[_0x22b3ed(0x343)](/^\//,'');if(!_0x48ab8c)continue;let _0x57134d=_0x15a439;for(const _0x330e48 of _0x48ab8c[_0x22b3ed(0x28b)]('/')['filter'](Boolean)){if(_0x330e48[_0x22b3ed(0x1af)](':')){const _0x435daa=_0x330e48['slice'](0x1);if(!_0x57134d[_0x22b3ed(0x621)])_0x57134d[_0x22b3ed(0x621)]={'param':_0x435daa,'node':new _0xb64bc1()};_0x57134d=_0x57134d['dynamic'][_0x22b3ed(0x506)];}else{if(!_0x57134d[_0x22b3ed(0x280)]['has'](_0x330e48))_0x57134d['children'][_0x22b3ed(0x5c1)](_0x330e48,new _0xb64bc1());_0x57134d=_0x57134d[_0x22b3ed(0x280)][_0x22b3ed(0x437)](_0x330e48);}}_0x57134d['terminal']=!![];}return _0x15a439;}const _0x2362c3=new Map();function _0x19c78a(_0x3087d9,_0x11118a,_0x3376bf){const _0x2d5801=_0x1e3f02,_0x1f9a7f=_0x2362c3[_0x2d5801(0x437)](_0x3087d9);if(_0x1f9a7f&&_0x1f9a7f['exp']>Date[_0x2d5801(0x517)]())return _0x1f9a7f[_0x2d5801(0x52c)];const _0x59085c=_0x3376bf();return _0x2362c3['set'](_0x3087d9,{'val':_0x59085c,'exp':Date['now']()+_0x11118a}),_0x59085c;}function _0x5d9c59(_0x1e587b,_0x2226b0,_0x3fc218,_0x55e90f){const _0x4f73ff=_0x1e3f02,_0x36b9ec=_0x2226b0['env']??_0x55e90f['env'];switch(_0x1e587b){case _0x4f73ff(0x3c3):return[..._0x3fc218[_0x4f73ff(0x2a1)][_0x4f73ff(0x1bc)]()]['filter'](_0x2a445c=>!_0x2a445c['startsWith']('~'));case'type':return _0x19c78a(_0x4f73ff(0x206)+_0x36b9ec,0x7d0,()=>{const _0x4f3ef9=_0x4f73ff;try{return[..._0x3fc218[_0x4f3ef9(0x3c3)](_0x36b9ec)[_0x4f3ef9(0x4a9)][_0x4f3ef9(0x1bc)]()]['filter'](_0x46df79=>!_0x46df79['startsWith']('~'));}catch{return[];}});case _0x4f73ff(0x245):if(!_0x2226b0[_0x4f73ff(0x316)])return[];return _0x19c78a(_0x4f73ff(0x44b)+_0x36b9ec+':'+_0x2226b0[_0x4f73ff(0x316)],0x5dc,()=>{const _0xc8067f=_0x4f73ff;try{const _0x4e3a85=_0x3fc218[_0xc8067f(0x3c3)](_0x36b9ec)[_0xc8067f(0x4a9)][_0xc8067f(0x437)](_0x2226b0[_0xc8067f(0x316)]);if(!_0x4e3a85?.[_0xc8067f(0x3fd)])return[];const _0x315896=[];for(const {key:_0x132518}of _0x4e3a85[_0xc8067f(0x3fd)][_0xc8067f(0x4f2)]({'limit':0x32})){_0x315896['push'](String(_0x132518));if(_0x315896['length']>=0x32)break;}return _0x315896;}catch{return[];}});case _0x4f73ff(0x413):if(!_0x2226b0[_0x4f73ff(0x316)])return[];return _0x19c78a(_0x4f73ff(0x328)+_0x36b9ec+':'+_0x2226b0[_0x4f73ff(0x316)],0x7d0,()=>{const _0xf6236c=_0x4f73ff;try{const _0x75cbf6=_0x3fc218['env'](_0x36b9ec)[_0xf6236c(0x4a9)]['get'](_0x2226b0[_0xf6236c(0x316)]);return _0x75cbf6?[..._0x75cbf6[_0xf6236c(0x474)]?.[_0xf6236c(0x1bc)]()??[]]:[];}catch{return[];}});case _0x4f73ff(0x5e4):if(!_0x2226b0[_0x4f73ff(0x316)])return[];return _0x19c78a(_0x4f73ff(0x2fe)+_0x36b9ec+':'+_0x2226b0[_0x4f73ff(0x316)],0x7d0,()=>{const _0xaed958=_0x4f73ff;try{return _0x3fc218['fts']?.['list']?.(_0x2226b0[_0xaed958(0x316)],_0x3fc218[_0xaed958(0x3c3)](_0x36b9ec))?.[_0xaed958(0x3ad)](_0x33b846=>_0x33b846[_0xaed958(0x278)])??[];}catch{return[];}});default:return[];}}function _0x18f087(_0x1471e7,_0x2220ec,_0x205ffb,_0x2abad8){const _0x273e15=_0x1e3f02,_0xa55c18=_0x1471e7[_0x273e15(0x3f2)]('/'),_0x391d46=_0x1471e7[_0x273e15(0x28b)]('/'),_0x1b79ac=_0xa55c18?_0x391d46[_0x273e15(0x35c)](0x0,-0x1):_0x391d46[_0x273e15(0x35c)](0x0,-0x1),_0x33093f=_0xa55c18?'':_0x391d46[_0x391d46['length']-0x1];let _0x225e08=_0x2220ec;const _0x331836={};for(const _0x24bd28 of _0x1b79ac){if(!_0x24bd28)continue;if(_0x225e08[_0x273e15(0x280)]['has'](_0x24bd28))_0x225e08=_0x225e08[_0x273e15(0x280)]['get'](_0x24bd28);else{if(_0x225e08['dynamic'])_0x331836[_0x225e08['dynamic'][_0x273e15(0x40d)]]=_0x24bd28,_0x225e08=_0x225e08[_0x273e15(0x621)][_0x273e15(0x506)];else return[];}}const _0x5abade=_0x1b79ac[_0x273e15(0x654)](Boolean),_0x3c755c=_0x5abade[_0x273e15(0x557)]?_0x5abade['join']('/')+'/':'',_0x2f510b=[];for(const [_0x3b94ae]of _0x225e08['children']){if(_0x3b94ae['startsWith'](_0x33093f))_0x2f510b[_0x273e15(0x228)](_0x3c755c+_0x3b94ae);}if(_0x225e08['dynamic'])for(const _0x5be611 of _0x5d9c59(_0x225e08['dynamic'][_0x273e15(0x40d)],_0x331836,_0x205ffb,_0x2abad8)){if(String(_0x5be611)[_0x273e15(0x1af)](_0x33093f))_0x2f510b[_0x273e15(0x228)](_0x3c755c+_0x5be611);}return _0x2f510b[_0x273e15(0x35c)](0x0,0x64);}const _0x537861=['help',_0x1e3f02(0x57b),_0x1e3f02(0x3c3),_0x1e3f02(0x22e),_0x1e3f02(0x536),_0x1e3f02(0x5fd),_0x1e3f02(0x537),_0x1e3f02(0x492),_0x1e3f02(0x19f),_0x1e3f02(0x5f3)];function _0x5abe0b(_0x1b6d79,_0x3c9d27,_0x51e270){return function _0x17d4f4(_0x467b43){const _0x53f10d=_0x3802;try{const _0x48c586=_0x467b43[_0x53f10d(0x54e)](/\s[{[]/),_0x416630=_0x48c586>=0x0?_0x467b43[_0x53f10d(0x35c)](0x0,_0x48c586):_0x467b43,_0x1fe04d=_0x416630[_0x53f10d(0x4ff)]();if(!_0x1fe04d){const _0x1e110f=[..._0x537861,...[..._0x1b6d79[_0x53f10d(0x280)]['keys']()]]['slice'](0x0,0x64);return[_0x1e110f,''];}const _0x48bca9=_0x1fe04d[_0x53f10d(0x28b)](/\s+/),_0x1159a6=_0x48bca9[0x0],_0x18ecef=_0x1159a6['toUpperCase']();if(_0x48bca9[_0x53f10d(0x557)]===0x1){const _0x1a77d3=_0x1159a6['toLowerCase'](),_0x3768b6=_0x537861[_0x53f10d(0x654)](_0xe95568=>_0xe95568[_0x53f10d(0x1af)](_0x1a77d3)),_0x44e2e3=_0x18f087(_0x1159a6,_0x1b6d79,_0x3c9d27,_0x51e270),_0x4bf467=[...new Set([..._0x3768b6,..._0x44e2e3])][_0x53f10d(0x35c)](0x0,0x64);return[_0x4bf467,_0x1159a6];}if(_0x38e952[_0x53f10d(0x430)](_0x18ecef)&&_0x48bca9[_0x53f10d(0x557)]===0x2){const _0x4c6605=_0x48bca9[0x1],_0x105027=_0x18f087(_0x4c6605,_0x1b6d79,_0x3c9d27,_0x51e270);return[_0x105027['map'](_0x5bd31b=>_0x1159a6+'\x20'+_0x5bd31b),_0x1159a6+'\x20'+_0x4c6605];}if(!_0x38e952[_0x53f10d(0x430)](_0x18ecef)&&_0x48bca9[_0x53f10d(0x557)]>0x1){const _0xea2090=_0x18f087(_0x1159a6,_0x1b6d79,_0x3c9d27,_0x51e270),_0xe1f989='\x20'+_0x48bca9[_0x53f10d(0x35c)](0x1)[_0x53f10d(0x65d)]('\x20');return[_0xea2090[_0x53f10d(0x3ad)](_0x11abad=>_0x11abad+_0xe1f989),_0x1159a6+_0xe1f989];}return[[],_0x467b43];}catch{return[[],_0x467b43];}};}async function _0x2a98e6(_0x5ce26c,_0x240b33){const _0x57f441=_0x1e3f02,_0x366467={'enabled':!![],'level':_0x240b33['logLevel']??_0x57f441(0x2b9)},_0x4d7fe3={'env':_0x57f441(0x555)},_0xa00599={'current':null},_0x49ecb3=_0x8ad372(_0x5ce26c[_0x57f441(0x58a)][_0x57f441(0x2ad)]()),_0x340dd7=_0x5abe0b(_0x49ecb3,_0x5ce26c,_0x4d7fe3);_0x5ce26c[_0x57f441(0x4e4)][_0x57f441(0x2ab)](_0x32e783=>{const _0x935cfa=_0x57f441;if(!_0x366467['enabled'])return;_0x506fed(_0x32e783,_0x366467['level']),_0xa00599[_0x935cfa(0x44d)]?.[_0x935cfa(0x4dd)](!![]);}),_0x59bd8c(_0x5ce26c,_0x240b33);const _0x4a39dc=_0x4df28e[_0x57f441(0x28c)]({'input':process[_0x57f441(0x2dd)],'output':process[_0x57f441(0x3b2)],'terminal':!![],'completer':_0x340dd7,'prompt':_0x25de3d(_0x4d7fe3),'historySize':_0x5440f6});try{const _0x2869d4=_0xa01211['readFileSync'](_0x2c9b9c,_0x57f441(0x5aa))[_0x57f441(0x28b)]('\x0a')[_0x57f441(0x654)](Boolean);_0x4a39dc[_0x57f441(0x1a8)]=_0x2869d4['reverse']()[_0x57f441(0x35c)](0x0,_0x5440f6);}catch{}_0xa00599[_0x57f441(0x44d)]=_0x4a39dc,_0x4a39dc['on'](_0x57f441(0x1aa),async _0x484061=>{const _0x343f1e=_0x57f441;_0x4a39dc[_0x343f1e(0x648)]();try{await _0x2399fb(_0x484061,_0x5ce26c,_0x240b33,_0x366467,_0x4d7fe3,_0x4a39dc);}catch(_0x24f466){console[_0x343f1e(0x2bb)](_0x3d8cb4(_0x5ed6ac[_0x343f1e(0x2ee)],'\x20\x20Error:\x20'+_0x24f466[_0x343f1e(0x277)]));}finally{_0x4a39dc['resume'](),_0x4a39dc[_0x343f1e(0x4dd)]();}}),_0x4a39dc['on'](_0x57f441(0x602),()=>{const _0xe346e5=_0x57f441;try{const _0xb3b2aa=[..._0x4a39dc[_0xe346e5(0x1a8)]][_0xe346e5(0x221)]()[_0xe346e5(0x654)](Boolean)['slice'](0x0,_0x5440f6);_0xa01211[_0xe346e5(0x29f)](_0x2c9b9c,_0xb3b2aa['join']('\x0a')+'\x0a');}catch{}_0x2aacd9(_0x5ce26c,0x0);});let _0x4047d2=0x0;return process['on'](_0x57f441(0x629),()=>{const _0x492412=_0x57f441;if(_0xd1b8c1)return _0x2aacd9(_0x5ce26c,0x82,_0x492412(0x629));if(_0x4a39dc[_0x492412(0x1aa)]==='')return _0x2aacd9(_0x5ce26c,0x0,'SIGINT');const _0xe504c7=Date[_0x492412(0x517)]();if(_0xe504c7-_0x4047d2<0x5dc)return _0x2aacd9(_0x5ce26c,0x0,_0x492412(0x5a5));_0x4047d2=_0xe504c7,process[_0x492412(0x3b2)][_0x492412(0x23f)]('\x0a'),_0x4a39dc[_0x492412(0x224)](0x0),_0x4a39dc['prompt'](),process[_0x492412(0x298)]['write'](_0x3d8cb4(_0x5ed6ac[_0x492412(0x566)],_0x492412(0x530)));}),process['on'](_0x57f441(0x599),()=>_0x2aacd9(_0x5ce26c,0x0,_0x57f441(0x599))),process['on'](_0x57f441(0x4f3),()=>_0x2aacd9(_0x5ce26c,0x0,'SIGBREAK')),_0x4a39dc[_0x57f441(0x4dd)](),_0x4a39dc;}return okdbShell={'start':_0x2a98e6,'colorLog':_0x506fed,'lenientParse':_0x5632d3,'_splitLine':_0x2aefef,'_formatRouteHelpLines':_0x5a35c4,'_routeSummary':_0x3bab4a,'_routeTags':_0x396d44},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x438a4d=_0x2d3788;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x250b45,performance:_0x31facf}=require$$0$4,_0x25db1d=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x438a4d(0x1cd),_0x5adcb8=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4140f8=process.env.OKDB_LOOP_LAG_ALL==='1',_0x462b51=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x1c1a2a{constructor(){const _0x48b12d=_0x438a4d;this[_0x48b12d(0x647)]=_0x25db1d,this[_0x48b12d(0x4b9)]=new Map(),this['_h']=null,this[_0x48b12d(0x549)]=null,this['_started']=![],this[_0x48b12d(0x501)]=(_0x34c71a,_0x57a850)=>process[_0x48b12d(0x298)][_0x48b12d(0x23f)](_0x34c71a+(_0x57a850?'\x20'+JSON[_0x48b12d(0x189)](_0x57a850):'')+'\x0a');}[_0x438a4d(0x517)](){const _0x173644=_0x438a4d;return _0x31facf[_0x173644(0x517)]();}[_0x438a4d(0x387)](_0x21b80f){const _0x339fb5=_0x438a4d;if(typeof _0x21b80f===_0x339fb5(0x53c))this[_0x339fb5(0x501)]=_0x21b80f;}[_0x438a4d(0x423)](_0x5928ec,_0x22eb9f,_0x7bb9ed){const _0x5aff8a=_0x438a4d;if(!this[_0x5aff8a(0x647)])return;let _0x246ab8=this[_0x5aff8a(0x4b9)]['get'](_0x5928ec);!_0x246ab8&&(_0x246ab8={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x5aff8a(0x4b9)][_0x5aff8a(0x5c1)](_0x5928ec,_0x246ab8)),_0x246ab8['ms']+=_0x22eb9f,_0x246ab8[_0x5aff8a(0x2a2)]+=0x1,_0x22eb9f>_0x246ab8[_0x5aff8a(0x391)]&&(_0x246ab8['maxMs']=_0x22eb9f,_0x246ab8[_0x5aff8a(0x1ba)]=_0x7bb9ed||'');}[_0x438a4d(0x52f)](_0x398bb3){const _0x127c62=_0x438a4d;if(!this[_0x127c62(0x647)]||this[_0x127c62(0x527)])return;this[_0x127c62(0x527)]=!![];if(_0x398bb3)this[_0x127c62(0x501)]=_0x398bb3;this['_h']=_0x250b45({'resolution':0xa}),this['_h'][_0x127c62(0x4cd)](),this['_timer']=setInterval(()=>this[_0x127c62(0x46e)](),_0x5adcb8);if(this[_0x127c62(0x549)][_0x127c62(0x36d)])this[_0x127c62(0x549)][_0x127c62(0x36d)]();}[_0x438a4d(0x30a)](_0x420724){const _0x5365a3=_0x438a4d;if(!this[_0x5365a3(0x38f)])this[_0x5365a3(0x38f)]=new Set();this[_0x5365a3(0x38f)][_0x5365a3(0x370)](_0x420724);if(!this[_0x5365a3(0x527)])this[_0x5365a3(0x275)]();}['offWindow'](_0xd09950){const _0x68a0f=_0x438a4d;this[_0x68a0f(0x38f)]?.['delete'](_0xd09950);}[_0x438a4d(0x275)](){const _0xce050f=_0x438a4d;if(this[_0xce050f(0x53f)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x250b45({'resolution':0xa}),this['_h']['enable']());const _0x2df007=_0x5adcb8;this[_0xce050f(0x1eb)]=setInterval(()=>{const _0x4d9b1e=_0xce050f,_0x50ee71=this['_h'];if(!_0x50ee71)return;const _0x35639b=_0x50ee71[_0x4d9b1e(0x5e9)](0x63)/0xf4240,_0x46d4bb=_0x50ee71[_0x4d9b1e(0x5b4)]/0xf4240,_0x1fcc83=_0x50ee71[_0x4d9b1e(0x214)]/0xf4240;_0x50ee71[_0x4d9b1e(0x3ae)]();if(this['_windowCbs'])for(const _0x3db2f0 of this[_0x4d9b1e(0x38f)]){try{_0x3db2f0({'p99Ms':_0x35639b,'maxMs':_0x46d4bb,'meanMs':_0x1fcc83,'reportMs':_0x2df007});}catch{}}},_0x2df007);if(this[_0xce050f(0x1eb)][_0xce050f(0x36d)])this[_0xce050f(0x1eb)][_0xce050f(0x36d)]();}['_report'](){const _0x19af84=_0x438a4d,_0x3e7fbf=this['_h'],_0x4316ef=_0x3e7fbf[_0x19af84(0x5b4)]/0xf4240,_0xb3388f=_0x3e7fbf[_0x19af84(0x5e9)](0x63)/0xf4240,_0x427af5=_0x3e7fbf[_0x19af84(0x214)]/0xf4240;_0x3e7fbf['reset']();const _0xb64073=[...this[_0x19af84(0x4b9)]['entries']()][_0x19af84(0x3ad)](([_0x46687e,_0x11d70a])=>({'label':_0x46687e,..._0x11d70a}))[_0x19af84(0x19b)]((_0x2e2e42,_0x5c4c1d)=>_0x5c4c1d['ms']-_0x2e2e42['ms'])[_0x19af84(0x35c)](0x0,0x8);this[_0x19af84(0x4b9)][_0x19af84(0x301)]();const _0x225c5a=_0xb64073[_0x19af84(0x212)]((_0x48417f,_0xc66f18)=>_0x48417f+_0xc66f18['ms'],0x0),_0x27af6e=_0xb64073[_0x19af84(0x3ad)](_0x5128d7=>_0x5128d7[_0x19af84(0x421)]+'='+_0x5128d7['ms']['toFixed'](0x0)+'ms/'+_0x5128d7[_0x19af84(0x2a2)]+(_0x5128d7[_0x19af84(0x391)]>0x5?_0x19af84(0x4a5)+_0x5128d7[_0x19af84(0x391)][_0x19af84(0x2fb)](0x0)+'ms'+(_0x5128d7[_0x19af84(0x1ba)]?'\x20'+_0x5128d7[_0x19af84(0x1ba)]:'')+')':''));(_0x4140f8||_0x4316ef>=_0x462b51)&&this['_log']('loop-lag\x20'+_0x5adcb8+'ms\x20max='+_0x4316ef['toFixed'](0x0)+'ms\x20p99='+_0xb3388f[_0x19af84(0x2fb)](0x0)+_0x19af84(0x27f)+_0x427af5[_0x19af84(0x2fb)](0x0)+'ms\x20busy='+_0x225c5a[_0x19af84(0x2fb)](0x0)+'ms'+(_0x27af6e[_0x19af84(0x557)]?_0x19af84(0x422)+_0x27af6e[_0x19af84(0x65d)]('\x20\x20'):''),{'feature':_0x19af84(0x5da)});if(this['_windowCbs'])for(const _0x103c5d of this[_0x19af84(0x38f)]){try{_0x103c5d({'p99Ms':_0xb3388f,'maxMs':_0x4316ef,'meanMs':_0x427af5,'reportMs':_0x5adcb8});}catch{}}}[_0x438a4d(0x1c8)](){const _0x16702a=_0x438a4d;if(this[_0x16702a(0x549)])clearInterval(this[_0x16702a(0x549)]);if(this['_h'])this['_h'][_0x16702a(0x24b)]();this[_0x16702a(0x549)]=null,this['_h']=null,this['_started']=![];}}const _0x56aeab=new _0x1c1a2a();if(_0x56aeab['enabled'])_0x56aeab['start']();return okdbLoopMonitor={'LOOP':_0x56aeab},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function _0x3802(_0x38f72c,_0xe8b713){_0x38f72c=_0x38f72c-0x183;const _0x1b089d=_0x1b08();let _0x380250=_0x1b089d[_0x38f72c];return _0x380250;}function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x5c893f=require$$1$1,_0x522e7b=require$$1;let _0x4c12a4,_0x3f8a4b,_0x53d5a2,_0x17bb0d,_0x3563fa,_0x541eb9,_0x171098,_0x5ec1cd=![];const _0x4a8751=new Set();let _0x3bb191=null;const _0x114da0=new Map();function _0x4a595d(){const _0x41613f=_0x3802;if(_0x4c12a4!==undefined)return _0x4c12a4;_0x4c12a4=process.env.OKDB_DIAG==='1';if(!_0x4c12a4)return![];_0x3f8a4b=process.env.OKDB_DIAG_STACK==='1',_0x17bb0d=Math[_0x41613f(0x5b4)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x53d5a2=new Array(_0x17bb0d),_0x3563fa=0x0,_0x541eb9=0x0,_0x171098=process.env.OKDB_DIAG_DIR||null;if(_0x171098)try{_0x5c893f[_0x41613f(0x4c1)](_0x171098,{'recursive':!![]});}catch{}return!![];}function _0x59f894(){return _0x4c12a4===undefined?_0x4a595d():_0x4c12a4;}function _0x3225e0(_0x2bbf67,_0xeb2798){const _0x31d1c9=_0x3802;if(_0x4c12a4===undefined?!_0x4a595d():!_0x4c12a4)return;let _0x4e2e37;if(_0x3f8a4b){const _0x46b857=new Error()['stack']||'';_0x4e2e37=_0x46b857['split']('\x0a')[_0x31d1c9(0x35c)](0x3)['map'](_0x324fd0=>_0x324fd0[_0x31d1c9(0x1bd)]())[_0x31d1c9(0x654)](Boolean)[_0x31d1c9(0x35c)](0x0,0x8);}_0x53d5a2[_0x3563fa]={'seq':_0x541eb9++,'t':Date[_0x31d1c9(0x517)](),'env':_0x2bbf67,'kind':_0xeb2798||_0x31d1c9(0x470),'stack':_0x4e2e37},_0x3563fa=(_0x3563fa+0x1)%_0x17bb0d;}function _0x201980(_0x15d6c4){const _0x165aae=_0x3802,_0x3c2f53=[];for(let _0x4aa3ad=0x0;_0x4aa3ad<_0x17bb0d;_0x4aa3ad++){const _0x17ec8a=_0x53d5a2[(_0x3563fa-0x1-_0x4aa3ad+_0x17bb0d*0x2)%_0x17bb0d];if(!_0x17ec8a)continue;_0x3c2f53['push'](_0x17ec8a);if(_0x3c2f53[_0x165aae(0x557)]>=_0x15d6c4)break;}return _0x3c2f53;}function _0x551bce(_0x3651e2){const _0x1f60c9=_0x3802;try{process[_0x1f60c9(0x298)][_0x1f60c9(0x23f)](_0x3651e2+'\x0a');}catch{}if(_0x171098)try{_0x5c893f[_0x1f60c9(0x49f)](_0x522e7b[_0x1f60c9(0x65d)](_0x171098,'okdb-diag.'+process[_0x1f60c9(0x18e)]+'.log'),_0x3651e2+'\x0a');}catch{}}function _0x318c46(_0x27c591){const _0x6e0db2=_0x3802,_0x16ebe2=_0x201980(_0x27c591);if(!_0x16ebe2[_0x6e0db2(0x557)])return _0x6e0db2(0x63a);const _0x26bebd=Date[_0x6e0db2(0x517)]();return _0x16ebe2['map'](_0x39d48e=>{const _0x2031f1=_0x6e0db2,_0x31aa71=_0x2031f1(0x4ed)+_0x39d48e['seq']+'\x20-'+(_0x26bebd-_0x39d48e['t'])+_0x2031f1(0x1e2)+_0x39d48e[_0x2031f1(0x3c3)]+'\x20'+_0x39d48e[_0x2031f1(0x60d)];return _0x39d48e[_0x2031f1(0x4e0)]&&_0x39d48e['stack'][_0x2031f1(0x557)]?_0x31aa71+'\x0a\x20\x20\x20\x20\x20\x20'+_0x39d48e[_0x2031f1(0x4e0)]['join'](_0x2031f1(0x4b2)):_0x31aa71;})[_0x6e0db2(0x65d)]('\x0a');}function _0x39f567(_0x51c146,_0x56a094){const _0x513d69=_0x3802,_0xab4326=_0x513d69(0x54d)+_0x51c146+_0x513d69(0x656)+new Date()[_0x513d69(0x1f1)]()+_0x513d69(0x544)+process[_0x513d69(0x18e)]+'\x20===',_0x1b89d1=[_0xab4326,_0x513d69(0x34a)+(_0x56a094&&_0x56a094[_0x513d69(0x4e0)]?_0x56a094[_0x513d69(0x4e0)]['split']('\x0a')[0x0]:_0x56a094),_0x513d69(0x3c7)+(_0x3f8a4b?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x318c46(0x18),_0x19b171(),'='[_0x513d69(0x3fe)](_0xab4326['length']-0x1)];_0x551bce(_0x1b89d1[_0x513d69(0x65d)]('\x0a'));}function _0x178b90(_0x256049){const _0x195bca=_0x3802;if(!_0x59f894())return;const _0x165e23=String(_0x256049&&_0x256049[_0x195bca(0x277)]||_0x256049||''),_0xd194a=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x195bca(0x331)](_0x165e23);_0x39f567(_0xd194a?_0x195bca(0x3e2):_0x195bca(0x5e8),_0x256049);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0xd194a)return;try{console[_0x195bca(0x2bb)](_0x256049&&_0x256049[_0x195bca(0x4e0)]?_0x256049[_0x195bca(0x4e0)]:_0x256049);}catch{}process['exit'](0x1);}function _0x27c220(_0x39b254){const _0x4c07c5=_0x3802;if(!_0x59f894())return;const _0x197220=String(_0x39b254&&_0x39b254[_0x4c07c5(0x277)]||_0x39b254||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4c07c5(0x331)](_0x197220)&&_0x39f567(_0x4c07c5(0x562),_0x39b254);}function _0x19b171(){const _0x3c0aee=_0x3802,_0x290ca3=[_0x3c0aee(0x1fe)];let _0x48a35b=![];for(const _0x5f0972 of _0x4a8751){const _0x2a9972=_0x5f0972&&_0x5f0972[_0x3c0aee(0x2a1)];if(!_0x2a9972)continue;for(const [_0x3a1c5d,_0x48c0e7]of _0x2a9972){const _0xbb76a7=_0x48c0e7&&_0x48c0e7[_0x3c0aee(0x20a)]&&_0x48c0e7[_0x3c0aee(0x20a)][_0x3c0aee(0x2d2)];if(!_0xbb76a7)continue;let _0x552af2,_0x4d345c;try{_0x552af2=Atomics[_0x3c0aee(0x4e2)](_0xbb76a7,0x0),_0x4d345c=Atomics[_0x3c0aee(0x4e2)](_0xbb76a7,0x1);}catch{continue;}if(_0x552af2===0x0)continue;_0x48a35b=!![];const _0x1757da=_0x552af2>0x0?_0x3c0aee(0x4dc):_0x3c0aee(0x564),_0x1872a6=Date[_0x3c0aee(0x517)]()-Math[_0x3c0aee(0x374)](_0x552af2)*0x3e8,_0xb354d9=((()=>{const _0x3d2035=_0x3c0aee;try{return _0x48c0e7[_0x3d2035(0x5c4)]&&_0x48c0e7['_writer']['status']?_0x48c0e7[_0x3d2035(0x5c4)][_0x3d2035(0x3c4)]():null;}catch{return null;}})());_0x290ca3[_0x3c0aee(0x228)](_0x3c0aee(0x618)+_0x3a1c5d+_0x3c0aee(0x2b4)+_0x1757da+_0x3c0aee(0x2d9)+_0x1872a6+_0x3c0aee(0x1e4)+_0x4d345c+(_0xb354d9?_0x3c0aee(0x34e)+_0xb354d9[_0x3c0aee(0x231)]+'\x20oldestPendingMs='+_0xb354d9['oldestPendingMs']+_0x3c0aee(0x3b0)+_0xb354d9['parkedNow']+'}':''));}}if(!_0x48a35b)_0x290ca3[_0x3c0aee(0x228)](_0x3c0aee(0x3ce));return _0x290ca3[_0x3c0aee(0x65d)]('\x0a');}function _0x463c2e(){const _0x214786=_0x3802;if(!_0x59f894())return;const _0x18e673=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x209e6d=Date[_0x214786(0x517)]();for(const _0xcda827 of _0x4a8751){const _0x1f6b43=_0xcda827&&_0xcda827['_envs'];if(!_0x1f6b43)continue;for(const [_0x4591ca,_0x5bbbb9]of _0x1f6b43){const _0x5530ef=_0x5bbbb9&&_0x5bbbb9[_0x214786(0x20a)]&&_0x5bbbb9['_coordinator'][_0x214786(0x2d2)];if(!_0x5530ef)continue;let _0x4e1ea3;try{_0x4e1ea3=Atomics[_0x214786(0x4e2)](_0x5530ef,0x0);}catch{continue;}const _0x3bd886=_0xcda827['path']+'|'+_0x4591ca;if(_0x4e1ea3<=0x0){_0x114da0[_0x214786(0x24a)](_0x3bd886);continue;}const _0x141ac1=_0x209e6d-_0x4e1ea3*0x3e8,_0x5d576a=_0x114da0[_0x214786(0x437)](_0x3bd886);if(_0x141ac1<_0x18e673)continue;if(_0x5d576a&&_0x209e6d-_0x5d576a[_0x214786(0x617)]<_0x18e673)continue;_0x114da0['set'](_0x3bd886,{'firstTs':_0x5d576a?_0x5d576a[_0x214786(0x453)]:_0x4e1ea3,'dumpedAt':_0x209e6d});const _0x523835=_0x214786(0x4c3)+_0x141ac1+_0x214786(0x5d4)+_0x4591ca+_0x214786(0x656)+new Date()[_0x214786(0x1f1)]()+_0x214786(0x544)+process[_0x214786(0x18e)]+'\x20===';_0x551bce([_0x523835,_0x19b171(),'='['repeat'](_0x523835[_0x214786(0x557)]-0x1)][_0x214786(0x65d)]('\x0a'));}}}function _0x26b5f2(){const _0x5ef14b=_0x3802;if(!_0x59f894()||_0x5ec1cd)return;_0x5ec1cd=!![],process[_0x5ef14b(0x21d)](_0x5ef14b(0x5e8),_0x178b90),process[_0x5ef14b(0x21d)](_0x5ef14b(0x337),_0x27c220);const _0x2cb5e2=Math[_0x5ef14b(0x5b4)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x3bb191=setInterval(_0x463c2e,_0x2cb5e2);if(_0x3bb191[_0x5ef14b(0x36d)])_0x3bb191['unref']();}function _0x2b3788(_0x414a9b){const _0x5ad29f=_0x3802;if(!_0x59f894()||!_0x414a9b)return;_0x4a8751[_0x5ad29f(0x370)](_0x414a9b),_0x26b5f2();}function _0x59f6bc(_0x359002){_0x4a8751['delete'](_0x359002);}function _0x4d90c0(){if(!_0x59f894())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x3f8a4b,'recentWrites':_0x201980(0x10),'drain':_0x19b171()};}return okdbDiag={'isEnabled':_0x59f894,'recordWrite':_0x3225e0,'installDiag':_0x26b5f2,'registerOkdb':_0x2b3788,'unregisterOkdb':_0x59f6bc,'snapshot':_0x4d90c0},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x3f7331=_0x2d3788;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x480bfc}=require$$0$5,_0x420101=requireOkdbDiag(),_0x323632=process.env.OKDB_COMMIT_MODE===_0x3f7331(0x3a4);class _0x59fbd7{constructor(_0x54d65c){const _0x48578b=_0x3f7331;this[_0x48578b(0x3c3)]=_0x54d65c,this[_0x48578b(0x615)]=new Set(),this[_0x48578b(0x5a3)]=new Map(),this[_0x48578b(0x4cf)]=0x0,this[_0x48578b(0x1f5)]=[],this['_done']=[],this[_0x48578b(0x1e9)]=Math[_0x48578b(0x5b4)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x48578b(0x197)]=0x0,this['_bpWaiters']=[],this[_0x48578b(0x2ed)]=0x0;}async['transaction'](_0x4893ea,_0x412be2){const _0x371490=_0x3f7331;if(_0x420101[_0x371490(0x65f)]())_0x420101[_0x371490(0x53a)](this['env']?.[_0x371490(0x278)],_0x412be2);if(this[_0x371490(0x496)]){const _0x53505d=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x53505d[_0x371490(0x321)]=_0x371490(0x33c);throw _0x53505d;}if(this[_0x371490(0x1e9)]>0x0){let _0x18bad0=![];while(this[_0x371490(0x197)]>=this['_highWater']&&!this[_0x371490(0x496)]){!_0x18bad0&&(_0x18bad0=!![],this['_bpParkedTotal']++),await new Promise(_0x4ed23e=>this[_0x371490(0x475)]['push'](_0x4ed23e));}if(this[_0x371490(0x496)]){const _0x758dcb=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x758dcb['code']='ENV_CLOSING_RETRY';throw _0x758dcb;}}this[_0x371490(0x197)]++;const _0x104614=this[_0x371490(0x3c3)][_0x371490(0x20a)];if(_0x104614)await _0x104614[_0x371490(0x4e6)]();if(this[_0x371490(0x496)]){if(_0x104614)_0x104614[_0x371490(0x622)]();this[_0x371490(0x197)]--;if(this[_0x371490(0x475)][_0x371490(0x557)]&&this[_0x371490(0x197)]<this[_0x371490(0x1e9)])this[_0x371490(0x475)][_0x371490(0x31e)]()();const _0x3d1bff=new Error(_0x371490(0x461));_0x3d1bff['code']=_0x371490(0x33c);throw _0x3d1bff;}const _0x21903c=_0x480bfc[_0x371490(0x517)]();if(_0x323632)try{const _0x1f1d75=this[_0x371490(0x3c3)]['db']['transactionSync'](_0x4893ea);this[_0x371490(0x4cf)]++;if(this['_durs']['push'](_0x480bfc[_0x371490(0x517)]()-_0x21903c)>0x100)this['_durs'][_0x371490(0x31e)]();if(this[_0x371490(0x250)][_0x371490(0x228)](_0x480bfc['now']())>0x800)this[_0x371490(0x250)][_0x371490(0x31e)]();return _0x1f1d75;}finally{this[_0x371490(0x197)]--;if(this['_bpWaiters'][_0x371490(0x557)]&&this[_0x371490(0x197)]<this[_0x371490(0x1e9)])this[_0x371490(0x475)][_0x371490(0x31e)]()();if(_0x104614)_0x104614[_0x371490(0x622)]();}const _0x19e00a=this[_0x371490(0x3c3)]['db']['childTransaction'](_0x4893ea);this[_0x371490(0x615)][_0x371490(0x370)](_0x19e00a),this['_enqueuedAt'][_0x371490(0x5c1)](_0x19e00a,_0x21903c);const _0x3e4560=()=>{const _0x32950a=_0x371490;this[_0x32950a(0x615)][_0x32950a(0x24a)](_0x19e00a),this[_0x32950a(0x5a3)][_0x32950a(0x24a)](_0x19e00a),this['_committed']++,this[_0x32950a(0x197)]--;this[_0x32950a(0x475)][_0x32950a(0x557)]&&this[_0x32950a(0x197)]<this[_0x32950a(0x1e9)]&&this['_bpWaiters'][_0x32950a(0x31e)]()();if(this['_durs'][_0x32950a(0x228)](_0x480bfc['now']()-_0x21903c)>0x100)this['_durs'][_0x32950a(0x31e)]();if(this[_0x32950a(0x250)][_0x32950a(0x228)](_0x480bfc[_0x32950a(0x517)]())>0x800)this['_done']['shift']();};_0x19e00a[_0x371490(0x2cf)](_0x3e4560,_0x3e4560);try{return await _0x19e00a;}finally{if(_0x104614)_0x104614[_0x371490(0x622)]();}}[_0x3f7331(0x3c4)](){const _0x1d65bc=_0x3f7331,_0x2dfef6=_0x480bfc[_0x1d65bc(0x517)]();let _0x11d8e9=0x0;for(const _0x745c60 of this[_0x1d65bc(0x5a3)][_0x1d65bc(0x384)]()){const _0x160cc1=_0x2dfef6-_0x745c60;if(_0x160cc1>_0x11d8e9)_0x11d8e9=_0x160cc1;}let _0x3bc4a8=0x0;for(let _0x33f650=this['_done'][_0x1d65bc(0x557)]-0x1;_0x33f650>=0x0;_0x33f650--){if(_0x2dfef6-this['_done'][_0x33f650]>0x3e8)break;_0x3bc4a8++;}let _0x21a010=0x0;if(this[_0x1d65bc(0x1f5)]['length']){const _0x51a877=[...this[_0x1d65bc(0x1f5)]][_0x1d65bc(0x19b)]((_0x7ae358,_0x17dfa9)=>_0x7ae358-_0x17dfa9);_0x21a010=_0x51a877[Math[_0x1d65bc(0x29c)](_0x51a877['length']-0x1,Math[_0x1d65bc(0x5cd)](_0x51a877[_0x1d65bc(0x557)]*0.99))];}return{'depth':this[_0x1d65bc(0x615)][_0x1d65bc(0x3cf)],'oldestPendingMs':Math[_0x1d65bc(0x32f)](_0x11d8e9),'committed':this[_0x1d65bc(0x4cf)],'commitsPerSec':_0x3bc4a8,'commitP99Ms':Math[_0x1d65bc(0x32f)](_0x21a010),'parkedNow':this[_0x1d65bc(0x475)][_0x1d65bc(0x557)],'parkedTotal':this[_0x1d65bc(0x2ed)],'highWater':this['_highWater']};}[_0x3f7331(0x1c0)](){const _0x10e381=_0x3f7331,_0x30bb9a=_0x480bfc[_0x10e381(0x517)]();return[...this['_enqueuedAt'][_0x10e381(0x384)]()][_0x10e381(0x3ad)](_0x1b75c9=>Math[_0x10e381(0x32f)](_0x30bb9a-_0x1b75c9))[_0x10e381(0x19b)]((_0x45f0e5,_0x4c7aed)=>_0x4c7aed-_0x45f0e5);}['markClosed'](){const _0x586648=_0x3f7331;this[_0x586648(0x496)]=!![];for(const _0x36331b of this[_0x586648(0x475)][_0x586648(0x418)](0x0))_0x36331b();}async[_0x3f7331(0x472)](){const _0x1ee481=_0x3f7331;let _0x282a6b=0x0;while(this[_0x1ee481(0x615)][_0x1ee481(0x3cf)]&&_0x282a6b++<0x3e8){await Promise[_0x1ee481(0x3ff)]([...this['_inflight']]);}}async[_0x3f7331(0x347)](_0x15d258,_0x449912,_0x5a444c,_0x95afd5){const _0x30f120=_0x3f7331;return this[_0x30f120(0x1dc)](()=>{const _0x1389f3=_0x30f120;if(_0x95afd5===undefined)_0x15d258[_0x1389f3(0x632)](_0x449912,_0x5a444c);else _0x15d258[_0x1389f3(0x632)](_0x449912,_0x5a444c,_0x95afd5);},_0x30f120(0x41b));}async[_0x3f7331(0x1d2)](_0x222a4a,_0x596342){const _0x512659=_0x3f7331;return this[_0x512659(0x1dc)](()=>_0x222a4a['removeSync'](_0x596342),_0x512659(0x526));}}async function _0xeccf03(_0x10e5b5,_0x1b6fd8){const _0x4b0f94=_0x3f7331;if(_0x1b6fd8==null)_0x1b6fd8=Math[_0x4b0f94(0x5b4)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x482882=_0x10e5b5?.[_0x4b0f94(0x5ac)];if(!_0x482882||typeof _0x482882['then']!==_0x4b0f94(0x53c))return;await Promise[_0x4b0f94(0x61c)]([Promise['resolve'](_0x482882)[_0x4b0f94(0x26c)](()=>{}),new Promise(_0x345f13=>{const _0x4e4a5a=_0x4b0f94,_0x14a370=setTimeout(_0x345f13,_0x1b6fd8);if(_0x14a370[_0x4e4a5a(0x36d)])_0x14a370[_0x4e4a5a(0x36d)]();})]);}catch{}}function _0x4de0ad(_0x43f453){const _0x206e9e=_0x3f7331;if(_0x323632)return Promise[_0x206e9e(0x4a7)]();const _0xa67e59=_0x43f453?.[_0x206e9e(0x425)];return _0xa67e59&&typeof _0xa67e59[_0x206e9e(0x2cf)]===_0x206e9e(0x53c)?_0xa67e59:Promise[_0x206e9e(0x4a7)]();}return okdbWriter['exports']=_0x59fbd7,okdbWriter[_0x3f7331(0x529)][_0x3f7331(0x332)]=_0xeccf03,okdbWriter[_0x3f7331(0x529)][_0x3f7331(0x425)]=_0x4de0ad,okdbWriter[_0x3f7331(0x529)][_0x3f7331(0x24e)]=_0x323632,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x5cdd90=_0x2d3788;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x458237=require$$0,{SYNC_COMMITS:_0x55b8e2}=requireOkdbWriter(),_0x5bd81d=_0x5cdd90(0x20b);class _0x5b9955{constructor(_0x18dc26,_0x580af2,_0x3985f8){const _0x5e738a=_0x5cdd90;this[_0x5e738a(0x314)]=_0x18dc26,this['_key']=_0x580af2,this[_0x5e738a(0x2f4)]=_0x3985f8,this[_0x5e738a(0x5b0)]=![],this[_0x5e738a(0x1ef)]=null,this[_0x5e738a(0x2c8)]=null;}['isHeld'](){const _0x335d00=_0x5cdd90;if(this['_released'])return![];try{const _0x378b46=this[_0x335d00(0x314)][_0x335d00(0x213)]()[_0x335d00(0x437)](this[_0x335d00(0x5fc)]);if(!_0x378b46||_0x378b46[_0x335d00(0x5df)]!==this[_0x335d00(0x2f4)])return![];const _0x26833f=_0x378b46['updatedAt']??_0x378b46['acquiredAt'];if(_0x26833f+_0x378b46[_0x335d00(0x397)]<Date[_0x335d00(0x517)]())return![];return!![];}catch{return!this[_0x335d00(0x5b0)];}}['holder'](){const _0x12aa90=_0x5cdd90;if(this[_0x12aa90(0x5b0)])return null;try{return this[_0x12aa90(0x314)]['_db']()[_0x12aa90(0x437)](this[_0x12aa90(0x5fc)])??null;}catch{return null;}}async['extend'](_0x3276fe){const _0x3deec1=_0x5cdd90;if(this['_released'])return;try{const _0x2ad72b=this[_0x3deec1(0x314)][_0x3deec1(0x213)]()[_0x3deec1(0x437)](this[_0x3deec1(0x5fc)]);if(!_0x2ad72b||_0x2ad72b[_0x3deec1(0x5df)]!==this['_acquiredAt'])return;if(_0x55b8e2)this[_0x3deec1(0x314)][_0x3deec1(0x213)]()['putSync'](this[_0x3deec1(0x5fc)],{..._0x2ad72b,'ttlMs':_0x2ad72b['ttlMs']+_0x3276fe});else await this[_0x3deec1(0x314)][_0x3deec1(0x213)]()[_0x3deec1(0x347)](this[_0x3deec1(0x5fc)],{..._0x2ad72b,'ttlMs':_0x2ad72b['ttlMs']+_0x3276fe});}catch{}}async[_0x5cdd90(0x62c)](){const _0x1da4fb=_0x5cdd90;if(this[_0x1da4fb(0x5b0)])return;if(this[_0x1da4fb(0x2c8)])try{await this['_heartbeatInFlight'];}catch{}clearInterval(this[_0x1da4fb(0x1ef)]),this[_0x1da4fb(0x1ef)]=null,this[_0x1da4fb(0x5b0)]=!![];try{const _0x2c6f75=this[_0x1da4fb(0x314)][_0x1da4fb(0x213)]()[_0x1da4fb(0x437)](this['_key']);if(_0x2c6f75&&_0x2c6f75[_0x1da4fb(0x5df)]===this['_acquiredAt']){if(_0x55b8e2)this[_0x1da4fb(0x314)][_0x1da4fb(0x213)]()[_0x1da4fb(0x469)](this[_0x1da4fb(0x5fc)]);else await this[_0x1da4fb(0x314)][_0x1da4fb(0x213)]()['remove'](this[_0x1da4fb(0x5fc)]);}}catch{}}[_0x5cdd90(0x294)](_0x39975f,_0x5b6b15){const _0x2c46c4=_0x5cdd90,_0x201e36=_0x5b6b15??Math[_0x2c46c4(0x5cd)](_0x39975f/0x3);this['_heartbeatTimer']=setInterval(()=>{const _0x30855b=_0x2c46c4;if(this[_0x30855b(0x5b0)])return;this['_heartbeatInFlight']=((async()=>{const _0x4dc178=_0x30855b;try{const _0x3fa8a1=this['_lock'][_0x4dc178(0x213)]()[_0x4dc178(0x437)](this[_0x4dc178(0x5fc)]);if(!_0x3fa8a1||_0x3fa8a1[_0x4dc178(0x5df)]!==this['_acquiredAt']){this[_0x4dc178(0x5b0)]=!![],clearInterval(this['_heartbeatTimer']),this[_0x4dc178(0x1ef)]=null;return;}if(_0x55b8e2)this['_lock']['_db']()['putSync'](this['_key'],{..._0x3fa8a1,'updatedAt':Date[_0x4dc178(0x517)]()});else await this[_0x4dc178(0x314)][_0x4dc178(0x213)]()[_0x4dc178(0x347)](this[_0x4dc178(0x5fc)],{..._0x3fa8a1,'updatedAt':Date[_0x4dc178(0x517)]()});}catch{}this[_0x4dc178(0x2c8)]=null;})());},_0x201e36);if(this['_heartbeatTimer'][_0x2c46c4(0x36d)])this[_0x2c46c4(0x1ef)][_0x2c46c4(0x36d)]();}}class _0x29bd70{constructor(_0x2ffb71,{namespace:_0x4f9a8b,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x4382eb=_0x5cdd90;this[_0x4382eb(0x646)]=_0x2ffb71,this[_0x4382eb(0x1f2)]=_0x4f9a8b,this[_0x4382eb(0x397)]=ttlMs,this[_0x4382eb(0x232)]=heartbeatMs,this[_0x4382eb(0x4c7)]=null;}[_0x5cdd90(0x213)](){const _0x3d6b1a=_0x5cdd90;return!this[_0x3d6b1a(0x4c7)]&&(this[_0x3d6b1a(0x4c7)]=this[_0x3d6b1a(0x646)]['openDB'](_0x5bd81d,{'dupSort':![]})),this[_0x3d6b1a(0x4c7)];}[_0x5cdd90(0x203)](){const _0xa00e81=_0x5cdd90;return!this[_0xa00e81(0x4d2)]&&(this['_wantDbHandle']=this[_0xa00e81(0x646)][_0xa00e81(0x4ee)](_0x5bd81d+_0xa00e81(0x56c),{'dupSort':![]})),this[_0xa00e81(0x4d2)];}[_0x5cdd90(0x5fc)](_0xa4a18c){const _0x3eb73f=_0x5cdd90;return this[_0x3eb73f(0x1f2)]+':'+_0xa4a18c;}['signalWant'](_0x115a47){const _0x3645fe=_0x5cdd90;try{_0x55b8e2?this['_wantDb']()[_0x3645fe(0x632)](this[_0x3645fe(0x5fc)](_0x115a47),Date[_0x3645fe(0x517)]()):this[_0x3645fe(0x203)]()[_0x3645fe(0x347)](this[_0x3645fe(0x5fc)](_0x115a47),Date[_0x3645fe(0x517)]())?.[_0x3645fe(0x26c)]?.(()=>{});}catch{}}[_0x5cdd90(0x5dd)](_0x4bf647,_0x38df1f=0x3e8){const _0x4bc859=_0x5cdd90;try{const _0x2fe16a=this[_0x4bc859(0x203)]()['get'](this[_0x4bc859(0x5fc)](_0x4bf647));return typeof _0x2fe16a===_0x4bc859(0x396)&&Date[_0x4bc859(0x517)]()-_0x2fe16a<_0x38df1f;}catch{return![];}}[_0x5cdd90(0x311)](_0x52e687){const _0x2cf6f7=_0x5cdd90,_0x5ba565=_0x52e687['updatedAt']??_0x52e687[_0x2cf6f7(0x5df)];return _0x5ba565+_0x52e687[_0x2cf6f7(0x397)]<Date[_0x2cf6f7(0x517)]();}static[_0x5cdd90(0x5b6)](_0x2627ec){const _0x23c49a=_0x5cdd90,_0x23f1e4=_0x2627ec?.[_0x23c49a(0x339)];if(!_0x23f1e4||typeof _0x23f1e4[_0x23c49a(0x18e)]!==_0x23c49a(0x396))return![];if(_0x23f1e4[_0x23c49a(0x248)]!==_0x458237[_0x23c49a(0x248)]())return![];if(_0x23f1e4[_0x23c49a(0x18e)]===process['pid'])return![];try{return process[_0x23c49a(0x229)](_0x23f1e4[_0x23c49a(0x18e)],0x0),![];}catch(_0x5564f8){return _0x5564f8[_0x23c49a(0x321)]===_0x23c49a(0x3af);}}async[_0x5cdd90(0x605)](_0x5e89e9,_0x466425={},_0x204939={}){const _0x72068c=_0x5cdd90,_0x54cd34=this[_0x72068c(0x5fc)](_0x5e89e9),_0x43cf27=_0x204939['ttlMs']??this[_0x72068c(0x397)],_0xec5030=Date[_0x72068c(0x517)](),_0x307d17={'holder':{'pid':process['pid'],'hostname':_0x458237['hostname'](),..._0x466425},'acquiredAt':_0xec5030,'updatedAt':_0xec5030,'ttlMs':_0x43cf27};let _0x9576c0=![],_0x3c9024=null;try{const _0x1c5e6a=()=>{const _0x515aad=_0x72068c,_0x3ccda1=this[_0x515aad(0x213)]()['get'](_0x54cd34);if(_0x3ccda1&&!this[_0x515aad(0x311)](_0x3ccda1)&&!_0x29bd70[_0x515aad(0x5b6)](_0x3ccda1)){const _0x53176f=_0x466425[_0x515aad(0x2b0)]!=null&&_0x3ccda1['holder'][_0x515aad(0x18e)]===process[_0x515aad(0x18e)]&&_0x3ccda1[_0x515aad(0x339)][_0x515aad(0x2b0)]===_0x466425['processorId'];if(!_0x53176f){_0x9576c0=![],_0x3c9024=_0x3ccda1;return;}_0x307d17[_0x515aad(0x5df)]<=_0x3ccda1[_0x515aad(0x5df)]&&(_0x307d17[_0x515aad(0x5df)]=_0x3ccda1[_0x515aad(0x5df)]+0x1,_0x307d17[_0x515aad(0x4e8)]=_0x307d17['acquiredAt']);}this[_0x515aad(0x213)]()['put'](_0x54cd34,_0x307d17),_0x9576c0=!![],_0x3c9024=_0x307d17;};if(_0x55b8e2)this[_0x72068c(0x213)]()[_0x72068c(0x595)](_0x1c5e6a);else await this[_0x72068c(0x213)]()[_0x72068c(0x36e)](_0x1c5e6a);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x9576c0)return{'acquired':![],'handle':null,'current':_0x3c9024};const _0x557785=new _0x5b9955(this,_0x54cd34,_0x307d17[_0x72068c(0x5df)]);return _0x557785[_0x72068c(0x294)](_0x43cf27,this[_0x72068c(0x232)]),{'acquired':!![],'handle':_0x557785,'current':_0x3c9024};}[_0x5cdd90(0x1e8)](_0x1dd14d){const _0xabcfa1=_0x5cdd90;try{return this['_db']()[_0xabcfa1(0x437)](this[_0xabcfa1(0x5fc)](_0x1dd14d))??null;}catch{return null;}}[_0x5cdd90(0x4b5)](){const _0x274f87=_0x5cdd90,_0x39a57a=this[_0x274f87(0x1f2)]+':',_0x291977=[];try{for(const {key:_0x485d1e,value:_0x5e77d5}of this[_0x274f87(0x213)]()[_0x274f87(0x4f2)]({'start':_0x39a57a,'end':_0x39a57a+'ÿ'})){typeof _0x485d1e===_0x274f87(0x5a1)&&_0x485d1e[_0x274f87(0x1af)](_0x39a57a)&&_0x291977['push']({'id':_0x485d1e[_0x274f87(0x35c)](_0x39a57a[_0x274f87(0x557)]),'entry':_0x5e77d5});}}catch{}return _0x291977;}static['listAll'](_0x5359c9){const _0x3d730f=_0x5cdd90,_0x3a0c37=[];try{const _0x5e932e=_0x5359c9[_0x3d730f(0x4ee)](_0x5bd81d,{'dupSort':![]});for(const {key:_0x16ebf0,value:_0x4d1924}of _0x5e932e[_0x3d730f(0x4f2)]({})){if(typeof _0x16ebf0!=='string')continue;const _0x1fb680=_0x16ebf0[_0x3d730f(0x230)](':');if(_0x1fb680<0x1)continue;_0x3a0c37[_0x3d730f(0x228)]({'namespace':_0x16ebf0[_0x3d730f(0x35c)](0x0,_0x1fb680),'id':_0x16ebf0[_0x3d730f(0x35c)](_0x1fb680+0x1),'entry':_0x4d1924});}}catch{}return _0x3a0c37;}}return okdbLock={'OKDBLock':_0x29bd70},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x13bfcd=_0x2d3788;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x17efa8=require$$0,_0x10d43f=require$$1$2,_0x19fa29=require$$0$1,{LOOP:_0x4dfc1b}=requireOkdbLoopMonitor(),{OKDBLock:_0x15b850}=requireOkdbLock(),{SYNC_COMMITS:_0x4a1f10}=requireOkdbWriter(),_0x3e1a86=_0x13bfcd(0x400),_0x2646af='node',_0xa1d878='~processes:desired',_0x244f81=_0x13bfcd(0x28a),_0x2191b2=(_0x565920,_0x5af8fe)=>_0x565920+':'+_0x5af8fe,_0x6751f7=(_0x1c2d20,_0x4630b8)=>_0x1c2d20+'::'+_0x4630b8,_0x3f9361=(_0x17368d,_0x589b2e)=>_0x17368d+'/'+_0x589b2e,_0x4513a6=(_0x36e9ed,_0x12586b)=>_0x36e9ed+'#'+_0x12586b,_0xf542fb=_0x1ac429=>{const _0xd618ed=_0x13bfcd;if(_0x1ac429?.[_0xd618ed(0x26e)])return _0x1ac429[_0xd618ed(0x26e)];const _0x560171=_0x1ac429?.[_0xd618ed(0x3b9)];return typeof _0x560171===_0xd618ed(0x5a1)&&_0x560171[_0xd618ed(0x4a0)]('#')?_0x560171['slice'](0x0,_0x560171['indexOf']('#')):_0x560171;},_0x5acdab=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x5128e9=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x1f289b=_0x5acdab*0x3,_0x3baa9d=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x13bfcd(0x5b4)](0x927c0,_0x1f289b*0x14),_0x4a08cf=[_0x13bfcd(0x417),'processor:ready',_0x13bfcd(0x2f9),_0x13bfcd(0x1a5),_0x13bfcd(0x193),_0x13bfcd(0x460)];let _0x59eb45=null;function _0x932d6b(){const _0xa56a90=_0x13bfcd;if(_0x59eb45==null)_0x59eb45=Math[_0xa56a90(0x32f)]((Date[_0xa56a90(0x517)]()-process[_0xa56a90(0x641)]()*0x3e8)/0x3e8)*0x3e8;return _0x59eb45;}function _0x1af694(_0x30250d){const _0x7ff3e7=_0x13bfcd;if(process.env.OKDB_PROCESS_KILL===_0x7ff3e7(0x210))return![];if(_0x30250d?.['options']?.[_0x7ff3e7(0x31b)]&&typeof _0x30250d['options'][_0x7ff3e7(0x31b)]===_0x7ff3e7(0x500)&&_0x30250d['options']['processes'][_0x7ff3e7(0x229)]===![])return![];return!![];}function _0x4385d3(_0x31fe8a,_0x4979b2){const _0x5d7702=_0x13bfcd,_0xe9dfa=!!_0x4979b2?.[_0x5d7702(0x32a)];switch(_0x31fe8a){case _0x5d7702(0x515):return{'controllable':_0xe9dfa,'decommissionable':![],'killable':!![],'killConfirm':_0x5d7702(0x4bb)};case'cli':case'standalone':return{'controllable':_0xe9dfa,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x5d7702(0x628):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x5d7702(0x365):case _0x5d7702(0x4bd):case _0x5d7702(0x514):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x5d7702(0x465)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x48b8eb{constructor(_0x2c4be3){const _0x3ce2f7=_0x13bfcd;this[_0x3ce2f7(0x5f9)]=_0x2c4be3,this[_0x3ce2f7(0x5f5)]=null,this['_desired']=null,this[_0x3ce2f7(0x507)]=new Map(),this['_cmd']=null,this['_isWriter']=![],this[_0x3ce2f7(0x358)]=![],this[_0x3ce2f7(0x3df)]=_0x932d6b(),this['_selfKey']=_0x2191b2(process[_0x3ce2f7(0x18e)],this['_processStartedAt']),this[_0x3ce2f7(0x209)]=_0x19fa29[_0x3ce2f7(0x1db)]()[_0x3ce2f7(0x35c)](0x0,0x8),this[_0x3ce2f7(0x5a8)]=_0x4513a6(this['_selfKey'],this['_instanceId']),this['_startedAt']=Date[_0x3ce2f7(0x517)](),this[_0x3ce2f7(0x5d1)]=null,this[_0x3ce2f7(0x390)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0x3ce2f7(0x329)]=null,this['_onTick']=null,this[_0x3ce2f7(0x548)]=0x0,this[_0x3ce2f7(0x227)]={},this[_0x3ce2f7(0x550)]=new Map(),this[_0x3ce2f7(0x4cb)]=process[_0x3ce2f7(0x322)](),this[_0x3ce2f7(0x634)]=Date['now'](),this['_lastCpuPct']=0x0,this['_threadStats']=new Map();}get[_0x13bfcd(0x47f)](){const _0x5e6151=_0x13bfcd;return this[_0x5e6151(0x459)];}get[_0x13bfcd(0x554)](){const _0x330246=_0x13bfcd;return this[_0x330246(0x5a8)];}[_0x13bfcd(0x5c3)](_0x2c54ce,_0x2734a5){const _0x4abd55=_0x13bfcd,_0x12b1c4=_0x4385d3(_0x2c54ce,_0x2734a5);if(_0x12b1c4[_0x4abd55(0x1d6)]&&!_0x1af694(this[_0x4abd55(0x5f9)]))return{..._0x12b1c4,'killable':![],'killConfirm':undefined};return _0x12b1c4;}['isActive'](){return!!this['_statusEnv'];}[_0x13bfcd(0x428)](_0x512c74){const _0x264102=_0x13bfcd;Object[_0x264102(0x235)](this[_0x264102(0x227)],_0x512c74||{});}[_0x13bfcd(0x5a9)](_0x277874){const _0x318513=_0x13bfcd;if(_0x277874)this[_0x318513(0x25e)]=_0x277874;}['register'](_0xbfcc68={}){const _0x27e397=_0x13bfcd;return this['okdb'][_0x27e397(0x4f4)](_0xbfcc68);}[_0x13bfcd(0x5eb)](){const _0x110d33=_0x13bfcd,_0x4902e0={};let _0xb11797=0x0,_0x280a9a=0x0;const _0x23fe6c=new Set();for(const _0x63f0d7 of this['listNodes']()){_0x280a9a++;const _0x5ea7ca=_0x63f0d7[_0x110d33(0x3fb)];if(!_0x5ea7ca)continue;if(_0x5ea7ca['participate'])_0xb11797++;for(const _0x2c8611 of _0x5ea7ca[_0x110d33(0x32a)]||[]){if(!['single',_0x110d33(0x3ca)]['includes'](_0x2c8611[_0x110d33(0x3f3)]))continue;(_0x2c8611['state']===_0x110d33(0x3cc)||_0x2c8611['state']===_0x110d33(0x376))&&_0x2c8611[_0x110d33(0x525)]&&_0x23fe6c[_0x110d33(0x370)]((_0x2c8611[_0x110d33(0x3c3)]||'default')+':'+_0x2c8611['cursorKey']);const _0x45e84f=_0x2c8611[_0x110d33(0x3c3)]||_0x110d33(0x555);(_0x4902e0[_0x45e84f]||=[])[_0x110d33(0x228)]({..._0x2c8611,'env':_0x45e84f,'owner':{'pid':_0x63f0d7[_0x110d33(0x18e)]??null,'kind':_0x63f0d7[_0x110d33(0x60d)]??null}});}}for(const [_0x14990b,_0x1c124b]of Object[_0x110d33(0x40c)](_0x4902e0)){for(const _0x237f55 of _0x1c124b){if(_0x237f55['mode']===_0x110d33(0x383)&&!_0x237f55['claimGated']){const _0x3d18df=_0x14990b+':'+(_0x237f55[_0x110d33(0x525)]??'');if(!_0x23fe6c[_0x110d33(0x430)](_0x3d18df))_0x237f55[_0x110d33(0x640)]=!![];}}}return{'envs':_0x4902e0,'policy':null,'participation':{'participating':_0xb11797,'total':_0x280a9a},'source':_0x110d33(0x5e3)};}['processorsView'](){const _0x29b004=_0x13bfcd,_0x25ab53=_0x96eb4a=>{const _0x55f596=_0x3802;if(_0x96eb4a[_0x55f596(0x3f7)]===_0x55f596(0x3cc)||_0x96eb4a[_0x55f596(0x3f7)]===_0x55f596(0x376)||_0x96eb4a[_0x55f596(0x3f7)]===_0x55f596(0x2bb))return 0x3;if(_0x96eb4a[_0x55f596(0x256)])return 0x1;return 0x2;},_0xc0808=new Map();for(const _0x50c581 of this['listNodes']()){for(const _0xdd82da of _0x50c581[_0x29b004(0x3fb)]?.[_0x29b004(0x32a)]||[]){const _0x1cbb69={..._0xdd82da,'owner':{'pid':_0x50c581[_0x29b004(0x18e)]??null,'kind':_0x50c581[_0x29b004(0x60d)]??null,'host':_0x50c581['host']??null}},_0x441b5c=_0xdd82da[_0x29b004(0x3f3)]===_0x29b004(0x383)?_0x29b004(0x3f1)+(_0xdd82da[_0x29b004(0x3c3)]??'')+'::'+(_0xdd82da[_0x29b004(0x525)]??_0xdd82da[_0x29b004(0x316)]??_0xdd82da['id']):_0x29b004(0x359)+(_0x50c581[_0x29b004(0x3b9)]??_0x50c581[_0x29b004(0x26e)]??'')+'::'+(_0xdd82da[_0x29b004(0x3c3)]??'')+'::'+_0xdd82da['id'],_0x509082=_0xc0808['get'](_0x441b5c);if(!_0x509082||_0x25ab53(_0x1cbb69)>_0x25ab53(_0x509082))_0xc0808[_0x29b004(0x5c1)](_0x441b5c,_0x1cbb69);}}return[..._0xc0808[_0x29b004(0x384)]()];}[_0x13bfcd(0x34b)](){const _0x399ed7=_0x13bfcd,_0x290d76=Date[_0x399ed7(0x517)](),_0x363d7e=this[_0x399ed7(0x48a)](),_0x38571a=_0x5c16de=>Math[_0x399ed7(0x5b4)](0x0,Math[_0x399ed7(0x32f)]((_0x290d76-(_0x5c16de['startedAt']||_0x290d76))/0x3e8)),_0x5f5700=_0x363d7e[_0x399ed7(0x4b6)](_0x4e3204=>_0x4e3204[_0x399ed7(0x60d)]===_0x399ed7(0x515)),_0x367939=_0x363d7e[_0x399ed7(0x654)](_0x1aa122=>_0x1aa122[_0x399ed7(0x60d)]==='http-server');if(_0x5f5700||_0x367939[_0x399ed7(0x557)])return{'primary':_0x5f5700?{'pid':_0x5f5700[_0x399ed7(0x18e)],'uptime':_0x38571a(_0x5f5700)}:null,'workers':_0x367939[_0x399ed7(0x3ad)](_0x3c22b9=>({'pid':_0x3c22b9[_0x399ed7(0x18e)],'uptime':_0x38571a(_0x3c22b9)})),'workersConfigured':_0x5f5700?.[_0x399ed7(0x585)]?.[_0x399ed7(0x25b)]??_0x367939[_0x399ed7(0x557)],'mode':'cluster'};const _0x16151e=_0x363d7e[_0x399ed7(0x4b6)](_0x5d84e5=>_0x5d84e5[_0x399ed7(0x60d)]===_0x399ed7(0x577)||_0x5d84e5[_0x399ed7(0x60d)]==='standalone'||_0x5d84e5[_0x399ed7(0x60d)]===_0x399ed7(0x628)),_0x42855d=_0x16151e?{'pid':_0x16151e['pid'],'uptime':_0x38571a(_0x16151e)}:{'pid':process[_0x399ed7(0x18e)],'uptime':Math[_0x399ed7(0x5b4)](0x0,Math[_0x399ed7(0x32f)](process[_0x399ed7(0x641)]()))};return{'primary':_0x42855d,'workers':[_0x42855d],'workersConfigured':0x1,'mode':_0x399ed7(0x383)};}[_0x13bfcd(0x317)](){const _0x4043f3=_0x13bfcd;return this[_0x4043f3(0x51b)]();}[_0x13bfcd(0x51f)](){const _0x2c2026=_0x13bfcd,_0x34efad=new Map();for(const _0x51cb86 of this[_0x2c2026(0x51b)]())_0x34efad['set'](_0x51cb86[_0x2c2026(0x26e)],{..._0x51cb86,'children':[]});const _0x26fd07=[];for(const _0x5eef0d of _0x34efad['values']()){const _0x3c13f0=_0x5eef0d[_0x2c2026(0x489)]?_0x34efad['get'](_0x5eef0d['supervisorKey']):null;if(_0x3c13f0&&_0x3c13f0!==_0x5eef0d)_0x3c13f0[_0x2c2026(0x280)]['push'](_0x5eef0d);else _0x26fd07[_0x2c2026(0x228)](_0x5eef0d);}const _0x225160=(_0x241dd8,_0x438084)=>_0x241dd8[_0x2c2026(0x60d)]===_0x438084['kind']?(_0x241dd8['pid']||0x0)-(_0x438084[_0x2c2026(0x18e)]||0x0):(_0x241dd8['kind']??'')<(_0x438084[_0x2c2026(0x60d)]??'')?-0x1:0x1,_0x272c7b=_0x3bd187=>{const _0x16f41c=_0x2c2026;_0x3bd187[_0x16f41c(0x19b)](_0x225160);for(const _0x3da990 of _0x3bd187)if(_0x3da990[_0x16f41c(0x280)][_0x16f41c(0x557)])_0x272c7b(_0x3da990[_0x16f41c(0x280)]);};return _0x272c7b(_0x26fd07),_0x26fd07;}[_0x13bfcd(0x51e)](_0x485ff6){const _0x232569=_0x13bfcd;return this[_0x232569(0x51b)]()['find'](_0x327bf9=>_0x327bf9[_0x232569(0x26e)]===_0x485ff6)??null;}[_0x13bfcd(0x51b)](_0x1f6243=Date[_0x13bfcd(0x517)]()){const _0x4b3273=_0x13bfcd,_0x24147a=new Map();for(const _0xe00b8a of this['listNodes']()){const _0x53b1d7=_0xf542fb(_0xe00b8a);let _0x4e8ca6=_0x24147a[_0x4b3273(0x437)](_0x53b1d7);!_0x4e8ca6&&(_0x4e8ca6={'processKey':_0x53b1d7,'nodeKey':_0x53b1d7,'pid':_0xe00b8a['pid'],'ppid':_0xe00b8a[_0x4b3273(0x1fb)]??null,'host':_0xe00b8a[_0x4b3273(0x4d5)]??null,'kind':_0xe00b8a[_0x4b3273(0x60d)],'role':null,'supervisorKey':_0xe00b8a[_0x4b3273(0x489)]??null,'slot':_0xe00b8a[_0x4b3273(0x452)]??null,'slotKey':_0xe00b8a[_0x4b3273(0x3ac)]??null,'caps':_0xe00b8a[_0x4b3273(0x3aa)]??null,'lifecycle':_0xe00b8a[_0x4b3273(0x377)]??null,'uptime':Math[_0x4b3273(0x5b4)](0x0,Math[_0x4b3273(0x32f)]((_0x1f6243-(_0xe00b8a[_0x4b3273(0x42e)]||_0x1f6243))/0x3e8)),'startedAt':_0xe00b8a[_0x4b3273(0x42e)]??null,'meta':_0xe00b8a[_0x4b3273(0x585)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x24147a[_0x4b3273(0x5c1)](_0x53b1d7,_0x4e8ca6));_0x4e8ca6['instances'][_0x4b3273(0x228)]({'instanceId':_0xe00b8a[_0x4b3273(0x27c)]??null,'role':_0xe00b8a[_0x4b3273(0x2cc)]??null,'listenAddr':_0xe00b8a[_0x4b3273(0x21a)]??null,'lifecycle':_0xe00b8a[_0x4b3273(0x377)]??null,'processing':_0xe00b8a[_0x4b3273(0x3fb)]??null});if(!_0x4e8ca6['role']&&_0xe00b8a[_0x4b3273(0x2cc)])_0x4e8ca6[_0x4b3273(0x2cc)]=_0xe00b8a[_0x4b3273(0x2cc)];if(!_0x4e8ca6['listenAddr']&&_0xe00b8a[_0x4b3273(0x21a)])_0x4e8ca6['listenAddr']=_0xe00b8a[_0x4b3273(0x21a)];if(!_0x4e8ca6['processing']&&_0xe00b8a['processing'])_0x4e8ca6['processing']=_0xe00b8a[_0x4b3273(0x3fb)];if(!_0x4e8ca6[_0x4b3273(0x371)]&&_0xe00b8a['engines'])_0x4e8ca6[_0x4b3273(0x371)]=_0xe00b8a[_0x4b3273(0x371)];if(!_0x4e8ca6[_0x4b3273(0x3d5)]&&_0xe00b8a['singletonClaims'])_0x4e8ca6[_0x4b3273(0x3d5)]=_0xe00b8a['singletonClaims'];if(_0x4e8ca6[_0x4b3273(0x3aa)]==null&&_0xe00b8a[_0x4b3273(0x3aa)])_0x4e8ca6[_0x4b3273(0x3aa)]=_0xe00b8a[_0x4b3273(0x3aa)];if(_0xe00b8a[_0x4b3273(0x368)]&&(!_0x4e8ca6[_0x4b3273(0x368)]||(_0xe00b8a[_0x4b3273(0x368)]['at']??0x0)>(_0x4e8ca6[_0x4b3273(0x368)]['at']??0x0)))_0x4e8ca6[_0x4b3273(0x368)]=_0xe00b8a[_0x4b3273(0x368)];}return[..._0x24147a[_0x4b3273(0x384)]()];}[_0x13bfcd(0x3a7)](){const _0x5636be=_0x13bfcd,_0xfdbac3=[],_0x13fe34={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x17ce68 of this['_groupByProcess']()){_0xfdbac3[_0x5636be(0x228)]({'processKey':_0x17ce68[_0x5636be(0x26e)],'kind':_0x17ce68[_0x5636be(0x60d)],'pid':_0x17ce68[_0x5636be(0x18e)],'supervisorKey':_0x17ce68[_0x5636be(0x489)],'meta':_0x17ce68[_0x5636be(0x585)]??null,'uptime':_0x17ce68[_0x5636be(0x641)],'stats':_0x17ce68[_0x5636be(0x368)]??null}),_0x13fe34[_0x5636be(0x31b)]++;if(_0x17ce68[_0x5636be(0x368)]){_0x13fe34[_0x5636be(0x236)]+=_0x17ce68[_0x5636be(0x368)][_0x5636be(0x236)]||0x0,_0x13fe34[_0x5636be(0x44c)]+=(_0x17ce68[_0x5636be(0x368)][_0x5636be(0x44c)]||0x0)+(_0x17ce68[_0x5636be(0x368)][_0x5636be(0x5a4)]?.['heapUsed']||0x0);const _0x10612e=_0x17ce68[_0x5636be(0x368)][_0x5636be(0x5a4)];_0x10612e&&(_0x13fe34['threads']['count']+=_0x10612e[_0x5636be(0x2a2)]||0x0,_0x13fe34[_0x5636be(0x5a4)][_0x5636be(0x444)]+=_0x10612e[_0x5636be(0x444)]||0x0,_0x13fe34[_0x5636be(0x5a4)][_0x5636be(0x4e3)]+=_0x10612e[_0x5636be(0x4e3)]||0x0);}}return{'totals':_0x13fe34,'nodes':_0xfdbac3};}async[_0x13bfcd(0x492)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x8a1550=_0x13bfcd;this['_isWriter']=this[_0x8a1550(0x2b7)]||!!writer,this[_0x8a1550(0x358)]=this[_0x8a1550(0x358)]||!!reader,this['_kind']=kind||this[_0x8a1550(0x5d1)]||(_0x10d43f[_0x8a1550(0x3de)]?_0x8a1550(0x365):_0x8a1550(0x577)),this[_0x8a1550(0x390)]=supervisorKey??this['_supervisorKey'],this[_0x8a1550(0x25e)]=listenAddr??this[_0x8a1550(0x25e)],this[_0x8a1550(0x438)](),await this[_0x8a1550(0x207)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x496ec0=await this[_0x8a1550(0x5f9)][_0x8a1550(0x576)](_0x3e1a86,{'sync':![],'durability':_0x8a1550(0x463)});if(!_0x496ec0[_0x8a1550(0x43e)](_0x2646af))await _0x496ec0[_0x8a1550(0x54b)](_0x2646af);this[_0x8a1550(0x5f5)]=_0x496ec0;}return this[_0x8a1550(0x5f5)];}[_0x13bfcd(0x2a7)](){const _0x71d743=_0x13bfcd;return this['_nodeDbFor']!==this[_0x71d743(0x5f5)]&&(this[_0x71d743(0x1fd)]=this['_statusEnv'],this[_0x71d743(0x478)]=this[_0x71d743(0x5f5)][_0x71d743(0x351)](_0x2646af)[_0x71d743(0x3fd)]),this['_nodeDbCache'];}[_0x13bfcd(0x432)](_0x3de48c){const _0x332cf4=_0x13bfcd;if(_0x4a1f10)return this[_0x332cf4(0x2a7)]()[_0x332cf4(0x632)](_0x3de48c[_0x332cf4(0x3b9)],_0x3de48c,0x1);const _0x31acaf=this[_0x332cf4(0x2a7)]()[_0x332cf4(0x347)](_0x3de48c[_0x332cf4(0x3b9)],_0x3de48c,0x1);if(_0x31acaf&&typeof _0x31acaf['then']===_0x332cf4(0x53c))_0x31acaf[_0x332cf4(0x2cf)](undefined,()=>{});return _0x31acaf;}['_putRowSync'](_0x12ccbf){const _0x1ce123=_0x13bfcd;return this['_nodeDb']()[_0x1ce123(0x632)](_0x12ccbf['nodeKey'],_0x12ccbf,0x1);}['_removeRowAsync'](_0x44d29f){const _0x3193fe=_0x13bfcd;if(_0x4a1f10)try{return this['_nodeDb']()[_0x3193fe(0x469)](_0x44d29f);}catch{return![];}const _0x209aa=this[_0x3193fe(0x2a7)]()[_0x3193fe(0x1d2)](_0x44d29f);if(_0x209aa&&typeof _0x209aa[_0x3193fe(0x2cf)]===_0x3193fe(0x53c))_0x209aa[_0x3193fe(0x2cf)](undefined,()=>{});return _0x209aa;}async['putNode'](_0x580f0f){const _0xf2a5ed=_0x13bfcd;if(!this['_statusEnv']||!this[_0xf2a5ed(0x2b7)]||!_0x580f0f?.[_0xf2a5ed(0x3b9)])return;return this[_0xf2a5ed(0x432)](_0x580f0f);}async[_0x13bfcd(0x42a)](_0x21bce1){const _0x317886=_0x13bfcd;if(!this[_0x317886(0x5f5)]||!this['_isWriter']||!_0x21bce1)return;const _0x45a1ef=_0x21bce1['includes']('#'),_0x4b0510=[];for(const {key:_0x5f07ba}of this[_0x317886(0x5f5)][_0x317886(0x4f2)](_0x2646af)){if(_0x5f07ba===_0x21bce1||!_0x45a1ef&&typeof _0x5f07ba===_0x317886(0x5a1)&&_0x5f07ba[_0x317886(0x1af)](_0x21bce1+'#'))_0x4b0510[_0x317886(0x228)](_0x5f07ba);}for(const _0x33111b of _0x4b0510){try{this[_0x317886(0x2a7)]()[_0x317886(0x469)](_0x33111b);}catch{}}}[_0x13bfcd(0x2d7)](_0xe0ccc3){const _0x3c0450=_0x13bfcd;if(typeof _0xe0ccc3?.['pid']!==_0x3c0450(0x396))return![];if(_0xe0ccc3['host']!==_0x17efa8[_0x3c0450(0x248)]())return![];if(_0xe0ccc3['pid']===process[_0x3c0450(0x18e)])return![];if(_0xe0ccc3[_0x3c0450(0x362)]!=null&&_0xe0ccc3[_0x3c0450(0x362)]<Date[_0x3c0450(0x517)]()-_0x3baa9d)return!![];try{return process[_0x3c0450(0x229)](_0xe0ccc3['pid'],0x0),![];}catch(_0x3b9355){return _0x3b9355['code']===_0x3c0450(0x3af);}}['listNodes'](){const _0xa509c1=_0x13bfcd;if(!this[_0xa509c1(0x5f5)])return[];try{this['_statusEnv']['db']?.[_0xa509c1(0x518)]?.();}catch{}const _0x51e760=Date['now'](),_0x222ef2=_0x17efa8['hostname'](),_0x594853=[];for(const {value:_0x3b39ca}of this['_statusEnv']['getRange'](_0x2646af)){if(!_0x3b39ca)continue;let _0x1df30f=null;_0x3b39ca['host']===_0x222ef2&&typeof _0x3b39ca[_0xa509c1(0x18e)]===_0xa509c1(0x396)&&(_0x1df30f=!this[_0xa509c1(0x2d7)](_0x3b39ca));if(_0x1df30f===![])continue;const _0x13fb88=_0x3b39ca[_0xa509c1(0x362)]==null||_0x3b39ca[_0xa509c1(0x362)]>=_0x51e760;if(_0x1df30f===!![]||_0x13fb88)_0x594853[_0xa509c1(0x228)](_0x3b39ca);}return _0x594853;}async[_0x13bfcd(0x37e)](_0x55c173=0x0){const _0x19729e=_0x13bfcd;if(!this['_statusEnv']||!this[_0x19729e(0x2b7)])return;const _0x4091bd=Date[_0x19729e(0x517)]()-_0x55c173,_0x1a6f38=new Set(),_0x4ea82f=[],_0x4ea139=_0x17efa8[_0x19729e(0x248)]();for(const {key:_0x11452a,value:_0x271338}of this[_0x19729e(0x5f5)][_0x19729e(0x4f2)](_0x2646af)){if(!_0x271338)continue;const _0xce54ea=_0x271338[_0x19729e(0x4d5)]===_0x4ea139&&typeof _0x271338[_0x19729e(0x18e)]===_0x19729e(0x396),_0xc209e2=_0xce54ea?this[_0x19729e(0x2d7)](_0x271338):_0x271338['expiresAt']!=null&&_0x271338[_0x19729e(0x362)]<_0x4091bd;if(_0xc209e2)_0x4ea82f[_0x19729e(0x228)](_0x11452a);else _0x1a6f38['add'](_0xf542fb(_0x271338)??_0x11452a);}for(const _0x4ae238 of _0x4ea82f)this[_0x19729e(0x485)](_0x4ae238);if(this['_ensureDesired']()){const _0x3fb9e3=[];for(const {key:_0x2ab96a}of this['listDesired']('node')){if(!_0x1a6f38[_0x19729e(0x430)](_0x2ab96a)){if(_0x4a1f10)try{this[_0x19729e(0x5de)][_0x19729e(0x469)]('node/'+_0x2ab96a);}catch{}else _0x3fb9e3[_0x19729e(0x228)](this[_0x19729e(0x5de)][_0x19729e(0x1d2)](_0x19729e(0x263)+_0x2ab96a));}}if(_0x3fb9e3[_0x19729e(0x557)])await Promise['allSettled'](_0x3fb9e3);}}[_0x13bfcd(0x360)](_0xc83589=null){const _0x445004=_0x13bfcd;if(this['_hbTimer'])return;if(!this[_0x445004(0x2b7)]||!this[_0x445004(0x5f5)]){this[_0x445004(0x5f9)]?.[_0x445004(0x4e4)]?.[_0x445004(0x62d)]?.(_0x445004(0x523)+this['_isWriter']+_0x445004(0x645)+!!this[_0x445004(0x5f5)]+_0x445004(0x24d),{'feature':_0x445004(0x31b)});return;}this['_onTick']=_0xc83589,this[_0x445004(0x329)]=()=>this[_0x445004(0x26a)]();for(const _0x59ba9e of _0x4a08cf)this['okdb'][_0x445004(0x1bb)]['on'](_0x59ba9e,this['_onProcEvent']);this['_publishNow']();const _0x1dc9f4=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x5acdab;this[_0x445004(0x1ca)]=setInterval(()=>{const _0x1d86a1=_0x445004;if(this[_0x1d86a1(0x5d2)])try{this[_0x1d86a1(0x5d2)]();}catch{}this[_0x1d86a1(0x20d)](),this['reap']()['catch'](()=>{});},_0x1dc9f4);if(this[_0x445004(0x1ca)]['unref'])this[_0x445004(0x1ca)]['unref']();}['_maybePublish'](){const _0x1acb82=_0x13bfcd;if(!this['_isWriter']||!this[_0x1acb82(0x5f5)])return;if(Date['now']()-this['_lastPublishAt']<_0x5128e9)return;this['_publishNow']();}[_0x13bfcd(0x20d)](){const _0x3ab03c=_0x13bfcd;if(!this[_0x3ab03c(0x2b7)]||!this[_0x3ab03c(0x5f5)])return;this['_lastPublishAt']=Date['now']();try{const _0x1b8df6=[this['_buildOwnRow']()];for(const _0x4177b0 of this[_0x3ab03c(0x550)][_0x3ab03c(0x384)]())_0x1b8df6[_0x3ab03c(0x228)](this[_0x3ab03c(0x574)](_0x4177b0));const _0x187614=_0x4dfc1b[_0x3ab03c(0x647)]?_0x4dfc1b[_0x3ab03c(0x517)]():0x0;for(const _0x125a55 of _0x1b8df6){try{this[_0x3ab03c(0x259)](_0x125a55),this[_0x3ab03c(0x61a)]=![];}catch(_0x284cd6){!this[_0x3ab03c(0x61a)]&&(this[_0x3ab03c(0x61a)]=!![],this[_0x3ab03c(0x5f9)]?.['log']?.[_0x3ab03c(0x62d)]?.('registry\x20publish\x20failing:\x20'+_0x284cd6['message'],{'feature':'processes'}));}}if(_0x4dfc1b[_0x3ab03c(0x647)])_0x4dfc1b[_0x3ab03c(0x423)](_0x3ab03c(0x4bc),_0x4dfc1b['now']()-_0x187614,_0x3ab03c(0x455)+_0x1b8df6[_0x3ab03c(0x557)]+_0x3ab03c(0x42b));}catch(_0xc6f901){!this[_0x3ab03c(0x61a)]&&(this[_0x3ab03c(0x61a)]=!![],this[_0x3ab03c(0x5f9)]?.[_0x3ab03c(0x4e4)]?.['warn']?.(_0x3ab03c(0x3b7)+_0xc6f901[_0x3ab03c(0x277)],{'feature':_0x3ab03c(0x31b)}));}}async[_0x13bfcd(0x269)](){const _0x3d8bd2=_0x13bfcd;if(this[_0x3d8bd2(0x329)]){for(const _0x4e8d80 of _0x4a08cf){try{this[_0x3d8bd2(0x5f9)]['events']['off'](_0x4e8d80,this[_0x3d8bd2(0x329)]);}catch{}}this[_0x3d8bd2(0x329)]=null;}this[_0x3d8bd2(0x1ca)]&&(clearInterval(this[_0x3d8bd2(0x1ca)]),this['_hbTimer']=null);try{if(this[_0x3d8bd2(0x5f5)]&&this[_0x3d8bd2(0x2b7)])await this[_0x3d8bd2(0x42a)](this[_0x3d8bd2(0x5a8)]);}catch{}}async[_0x13bfcd(0x551)](){const _0x97b0ba=_0x13bfcd;if(!this[_0x97b0ba(0x5f5)]||!this[_0x97b0ba(0x2b7)])return;try{await this[_0x97b0ba(0x42a)](this[_0x97b0ba(0x5a8)]);}catch{}try{const _0x531ac5=[];for(const {value:_0x1b7325}of this[_0x97b0ba(0x5f5)]['getRange'](_0x2646af)){if(_0x1b7325?.['ppid']===process[_0x97b0ba(0x18e)]&&_0x1b7325[_0x97b0ba(0x3b9)])_0x531ac5[_0x97b0ba(0x228)](_0x1b7325[_0x97b0ba(0x3b9)]);}for(const _0x1294a5 of _0x531ac5){try{await this[_0x97b0ba(0x42a)](_0x1294a5);}catch{}}}catch{}}async['publishOwnRow'](){const _0x493cd0=_0x13bfcd;return this['putNode'](this[_0x493cd0(0x2f0)]());}async['publishChildRow'](_0x386a83){const _0x32de6d=_0x13bfcd;if(!this[_0x32de6d(0x5f5)]||!this[_0x32de6d(0x2b7)])return;return this[_0x32de6d(0x1f8)](this[_0x32de6d(0x574)](_0x386a83));}[_0x13bfcd(0x574)]({pid:_0x56576c,startedAt:_0x2022dd,kind:_0x2ac346,supervisorKey:_0x5a62ad,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x13bfcd(0x2da),meta:meta=null,stats:stats=null}){const _0x443ee9=_0x13bfcd,_0x126933=Date[_0x443ee9(0x517)](),_0x51920a=_0x2191b2(_0x56576c,_0x2022dd);return{'nodeKey':_0x4513a6(_0x51920a,'0'),'processKey':_0x51920a,'instanceId':'0','pid':_0x56576c,'startedAt':_0x2022dd,'ppid':process['pid'],'host':_0x17efa8['hostname'](),'supervisorKey':_0x5a62ad,'slot':slot,'slotKey':slotKey,'kind':_0x2ac346,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x126933,'expiresAt':_0x126933+_0x1f289b,'caps':this[_0x443ee9(0x5c3)](_0x2ac346,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x13bfcd(0x2f7)](_0x512d5b){const _0x496035=_0x13bfcd;if(!_0x512d5b?.[_0x496035(0x18e)])return null;const _0x333f88=_0x2191b2(_0x512d5b[_0x496035(0x18e)],_0x512d5b[_0x496035(0x42e)]);this['_children']['set'](_0x333f88,{..._0x512d5b,'supervisorKey':_0x512d5b[_0x496035(0x489)]??this[_0x496035(0x459)]});if(this[_0x496035(0x2b7)])await this[_0x496035(0x39a)](this[_0x496035(0x550)][_0x496035(0x437)](_0x333f88))[_0x496035(0x26c)]?.(()=>{});return _0x333f88;}[_0x13bfcd(0x31d)](_0xcb1833){const _0x6ea458=_0x13bfcd;if(!_0xcb1833)return;return this['_children'][_0x6ea458(0x24a)](_0xcb1833),this[_0x6ea458(0x42a)](_0xcb1833);}['_sampleOwnStats'](){const _0x332dcd=_0x13bfcd,_0x12fb7e=Date[_0x332dcd(0x517)](),_0x6f2658=process[_0x332dcd(0x322)](),_0x345c98=(_0x12fb7e-this[_0x332dcd(0x634)])*0x3e8;if(_0x345c98>=0x3d090){const _0xc67c6d=_0x6f2658[_0x332dcd(0x5ab)]-this[_0x332dcd(0x4cb)]['user']+(_0x6f2658[_0x332dcd(0x62e)]-this['_lastCpuUsage']['system']),_0x482333=_0x17efa8['cpus']()[_0x332dcd(0x557)]||0x1;this['_lastCpuPct']=Math['min'](0x64,Math['round'](_0xc67c6d/(_0x345c98*_0x482333)*0x64)),this['_lastCpuWindowMs']=Math['round'](_0x345c98/0x3e8),this[_0x332dcd(0x4cb)]=_0x6f2658,this['_lastCpuAt']=_0x12fb7e;}const _0x5cfafd=process[_0x332dcd(0x53d)](),_0x5211f2=this[_0x332dcd(0x471)][_0x332dcd(0x3cf)];let _0x5428e9=0x0;if(_0x5211f2>0x0){const _0x20209f=[this[_0x332dcd(0x5f9)],...this['okdb'][_0x332dcd(0x2a1)]?.['values']?.()??[]];for(const _0x834675 of _0x20209f){const _0xb3978d=_0x834675[_0x332dcd(0x4af)]?.[_0x332dcd(0x567)];if(_0xb3978d)_0x5428e9+=_0xb3978d[_0x332dcd(0x586)]['busy'];}}let _0x1b7890=null;const _0xda2bc=_0x5211f2;if(_0xda2bc>0x0){let _0x3662de=0x0;for(const _0x112e9e of this[_0x332dcd(0x471)]['values']())_0x3662de+=_0x112e9e['heapUsed']||0x0;_0x1b7890={'count':_0xda2bc,'heapUsed':_0x3662de,'sandbox':_0x5211f2,'busy':_0x5428e9};}return{'rss':_0x5cfafd[_0x332dcd(0x236)],'heapUsed':_0x5cfafd[_0x332dcd(0x44c)],'heapTotal':_0x5cfafd[_0x332dcd(0x33d)],'external':_0x5cfafd['external'],'cpuPct':this[_0x332dcd(0x1ee)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x1b7890,'at':_0x12fb7e};}[_0x13bfcd(0x4c8)](_0x4ade9d,_0x5a7028){const _0x4e6578=_0x13bfcd;if(!_0x4ade9d||!_0x5a7028)return;this[_0x4e6578(0x471)]['set'](_0x4ade9d,_0x5a7028);}[_0x13bfcd(0x1b9)](_0x51e242){const _0x454ebf=_0x13bfcd;this[_0x454ebf(0x471)][_0x454ebf(0x24a)](_0x51e242);}[_0x13bfcd(0x4b1)](_0x49cc72,_0x3f844a,_0x2a2331=undefined){const _0x45d966=_0x13bfcd,_0x506d83=this[_0x45d966(0x550)][_0x45d966(0x437)](_0x49cc72);if(!_0x506d83||!_0x3f844a)return;if(_0x2a2331!==undefined)_0x506d83[_0x45d966(0x3fb)]=_0x2a2331;_0x506d83[_0x45d966(0x368)]={'rss':_0x3f844a['rss']??null,'heapUsed':_0x3f844a[_0x45d966(0x44c)]??null,'heapTotal':_0x3f844a[_0x45d966(0x33d)]??null,'external':_0x3f844a[_0x45d966(0x502)]??null,'cpuPct':_0x3f844a[_0x45d966(0x546)]??null,'cpuWindowMs':_0x3f844a['cpuWindowMs']??null,'threads':_0x3f844a[_0x45d966(0x5a4)]??null,'claims':_0x3f844a[_0x45d966(0x609)]??null,'envsOpen':_0x3f844a['envsOpen']??null,'at':Date[_0x45d966(0x517)]()};}[_0x13bfcd(0x2f0)](){const _0x3fcfc8=_0x13bfcd,_0x34b59b=Date[_0x3fcfc8(0x517)](),_0x3d1965=this[_0x3fcfc8(0x5f9)][_0x3fcfc8(0x446)]||{},_0x302dd1=this[_0x3fcfc8(0x5d1)]||_0x3fcfc8(0x577);return{'nodeKey':this[_0x3fcfc8(0x5a8)],'processKey':this[_0x3fcfc8(0x459)],'instanceId':this['_instanceId'],'pid':process[_0x3fcfc8(0x18e)],'startedAt':this[_0x3fcfc8(0x3df)],'instanceStartedAt':this[_0x3fcfc8(0x4bf)],'ppid':typeof process['ppid']===_0x3fcfc8(0x396)?process['ppid']:null,'host':_0x17efa8[_0x3fcfc8(0x248)](),'supervisorKey':this[_0x3fcfc8(0x390)]??null,'kind':_0x302dd1,'role':{'engines':!!_0x3d1965[_0x3fcfc8(0x371)],'processors':!!_0x3d1965[_0x3fcfc8(0x32a)],'compaction':_0x3d1965['compaction'],'http':_0x3d1965[_0x3fcfc8(0x58a)]},'listenAddr':this[_0x3fcfc8(0x25e)]??null,'heartbeatAt':_0x34b59b,'expiresAt':_0x34b59b+_0x1f289b,'caps':this[_0x3fcfc8(0x5c3)](_0x302dd1,_0x3d1965),'lifecycle':{'state':_0x3fcfc8(0x2da),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x3d1965['processors']?this[_0x3fcfc8(0x419)]():null,'engines':_0x3d1965[_0x3fcfc8(0x371)]?[...this[_0x3fcfc8(0x5f9)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x3fcfc8(0x5ec)](),'stats':this[_0x3fcfc8(0x3cd)](),'writers':this[_0x3fcfc8(0x434)]()};}[_0x13bfcd(0x434)](){const _0x5a5510=_0x13bfcd,_0x3d6fe8={};try{for(const [_0x556ab1,_0x5ed3d5]of this[_0x5a5510(0x5f9)][_0x5a5510(0x2a1)]){try{const _0x49a94f=_0x5ed3d5['writerStatus']?.();if(!_0x49a94f)continue;if(!_0x49a94f[_0x5a5510(0x231)]&&!_0x49a94f[_0x5a5510(0x425)]&&!(_0x49a94f[_0x5a5510(0x335)]??0x0)&&!_0x49a94f[_0x5a5510(0x5f6)])continue;_0x3d6fe8[_0x556ab1]={'depth':_0x49a94f['depth'],'oldestPendingMs':_0x49a94f['oldestPendingMs'],'committed':_0x49a94f[_0x5a5510(0x425)],'commitsPerSec':_0x49a94f[_0x5a5510(0x22d)],'commitP99Ms':_0x49a94f[_0x5a5510(0x1a0)],'parkedNow':_0x49a94f['parkedNow']??0x0,'draining':!!_0x49a94f['draining']};}catch{}}}catch{}return Object[_0x5a5510(0x1bc)](_0x3d6fe8)[_0x5a5510(0x557)]?_0x3d6fe8:null;}[_0x13bfcd(0x5ec)](){const _0x160c20=_0x13bfcd,_0x3e2cbf=process['pid'],_0x36f3ee=Date[_0x160c20(0x517)](),_0x1dd065=_0x340381=>{const _0x143c19=_0x160c20;if(!_0x340381)return[];const _0x360534=[];try{for(const {id:_0x490dc5,entry:_0x2e1ce0}of _0x340381['list']()){if(_0x2e1ce0?.[_0x143c19(0x339)]?.[_0x143c19(0x18e)]!==_0x3e2cbf)continue;const _0x3575b4=_0x2e1ce0[_0x143c19(0x4e8)]??_0x2e1ce0[_0x143c19(0x5df)]??0x0;if(_0x3575b4+(_0x2e1ce0['ttlMs']??0x0)<_0x36f3ee)continue;_0x360534['push'](_0x490dc5);}}catch{}return _0x360534;},_0x33f53a=_0x1dd065(this[_0x160c20(0x254)](_0x160c20(0x223))),_0x2485bd=_0x1dd065(this[_0x160c20(0x254)]('sync'));if(!_0x33f53a[_0x160c20(0x557)]&&!_0x2485bd[_0x160c20(0x557)])return null;return{'compact':_0x33f53a,'replicate':_0x2485bd};}['_singletonLock'](_0x2f872a){const _0x350500=_0x13bfcd;if(!this[_0x350500(0x5f9)]?.[_0x350500(0x547)])return null;if(!this[_0x350500(0x33a)])this[_0x350500(0x33a)]=new Map();let _0x9e10b7=this[_0x350500(0x33a)][_0x350500(0x437)](_0x2f872a);if(!_0x9e10b7)try{_0x9e10b7=new _0x15b850(this[_0x350500(0x5f9)][_0x350500(0x547)],{'namespace':_0x2f872a}),this[_0x350500(0x33a)][_0x350500(0x5c1)](_0x2f872a,_0x9e10b7);}catch{return null;}return _0x9e10b7;}[_0x13bfcd(0x419)](){const _0x4c01d4=_0x13bfcd,_0x56497d=[];try{for(const [_0x45e249,_0x4400f0]of this[_0x4c01d4(0x5f9)][_0x4c01d4(0x2a1)]){if(_0x45e249[_0x4c01d4(0x1af)]('~'))continue;for(const _0x5dff32 of _0x4400f0['processor'][_0x4c01d4(0x2d5)]())_0x56497d['push']({..._0x5dff32,'env':_0x45e249});}}catch{}return{'participate':this['okdb']['processors']?.[_0x4c01d4(0x4d7)]??![],'processors':_0x56497d};}[_0x13bfcd(0x438)](){const _0x696195=_0x13bfcd;if(this['_desired'])return!![];const _0x46331b=this[_0x696195(0x5f9)]['_rootDb'];if(!_0x46331b)return![];return this[_0x696195(0x5de)]=_0x46331b['openDB'](_0xa1d878,{'dupSort':![]}),this['_cmd']=_0x46331b[_0x696195(0x4ee)](_0x244f81,{'dupSort':![]}),!![];}async[_0x13bfcd(0x207)](){const _0x1afa16=_0x13bfcd;if(!this[_0x1afa16(0x438)]())return;const _0x47cc64=_0x1afa16(0x5fe),_0x523a5d=0x1,_0x12350a=this[_0x1afa16(0x5de)][_0x1afa16(0x437)](_0x47cc64)??0x0;if(_0x12350a>=_0x523a5d)return;const _0x6bf9ad=_0x225eab=>{const _0x13af0c=_0x1afa16;if(_0x225eab==='worker')return _0x13af0c(0x383);if(_0x225eab===_0x13af0c(0x4a3))return'fanout';return _0x225eab;};await this[_0x1afa16(0x5f9)][_0x1afa16(0x3b5)]['_writer'][_0x1afa16(0x1dc)](()=>{const _0xaa879c=_0x1afa16;for(const _0x1a0e4f of[_0xaa879c(0x1d8),'procmodeack/']){for(const {key:_0x247af3,value:_0x6f4d37}of this[_0xaa879c(0x5de)][_0xaa879c(0x4f2)]({'start':_0x1a0e4f,'end':_0x1a0e4f+'ÿ'})){if(typeof _0x247af3!==_0xaa879c(0x5a1)||!_0x247af3[_0xaa879c(0x1af)](_0x1a0e4f))break;const _0x1af329=_0x6bf9ad(_0x6f4d37[_0xaa879c(0x3f3)]);if(_0x1af329!==_0x6f4d37[_0xaa879c(0x3f3)])this['_desired']['put'](_0x247af3,{..._0x6f4d37,'mode':_0x1af329});}}this[_0xaa879c(0x5de)][_0xaa879c(0x347)](_0x47cc64,_0x523a5d);});}[_0x13bfcd(0x2b8)](){return!!this['_desired'];}[_0x13bfcd(0x64c)](_0x50242d,_0x471999){const _0x5279fa=_0x13bfcd;if(!this['_ensureDesired']())return null;const _0x2a6f66=_0x50242d+'/'+_0x471999;return this[_0x5279fa(0x22a)](),this[_0x5279fa(0x507)][_0x5279fa(0x437)](_0x2a6f66)??this[_0x5279fa(0x5de)][_0x5279fa(0x437)](_0x2a6f66)??null;}[_0x13bfcd(0x22a)](){const _0x2f8413=_0x13bfcd;if(!_0x4a1f10)return;try{this[_0x2f8413(0x5f9)][_0x2f8413(0x3b5)]?.['db']?.[_0x2f8413(0x518)]?.();}catch{}}async['setDesired'](_0x2cd36c,_0x2e417d,_0x3d814e){const _0x398c13=_0x13bfcd;if(!this[_0x398c13(0x438)]())return null;const _0x45dd59=_0x2cd36c+'/'+_0x2e417d;this[_0x398c13(0x22a)]();const _0xe62067=this[_0x398c13(0x507)][_0x398c13(0x437)](_0x45dd59)??this[_0x398c13(0x5de)][_0x398c13(0x437)](_0x45dd59)??{'version':0x0},_0x2e930d=(_0xe62067['version']||0x0)+0x1,_0x403415={..._0xe62067,..._0x3d814e,'version':_0x2e930d,'updatedAt':Date[_0x398c13(0x517)]()};this[_0x398c13(0x507)][_0x398c13(0x5c1)](_0x45dd59,_0x403415);try{await this[_0x398c13(0x5f9)][_0x398c13(0x3b5)]['_writer']['transaction'](()=>{const _0x5dd241=_0x398c13;this[_0x5dd241(0x5de)]['put'](_0x45dd59,_0x403415);});}finally{if(this[_0x398c13(0x507)][_0x398c13(0x437)](_0x45dd59)===_0x403415)this['_desiredOverlay'][_0x398c13(0x24a)](_0x45dd59);}return _0x2e930d;}['listDesired'](_0x25c21b){const _0x2a16ca=_0x13bfcd;if(!this[_0x2a16ca(0x438)]())return[];this[_0x2a16ca(0x22a)]();const _0x2fec49=_0x25c21b+'/',_0x3ddeeb=[];for(const {key:_0x203963,value:_0x32b887}of this['_desired'][_0x2a16ca(0x4f2)]({'start':_0x2fec49,'end':_0x2fec49+'ÿ'})){if(typeof _0x203963!==_0x2a16ca(0x5a1)||!_0x203963['startsWith'](_0x2fec49))break;_0x3ddeeb[_0x2a16ca(0x228)]({'key':_0x203963[_0x2a16ca(0x35c)](_0x2fec49[_0x2a16ca(0x557)]),'value':_0x32b887});}return _0x3ddeeb;}['getCmd'](_0x497773){const _0x28673f=_0x13bfcd;if(!this[_0x28673f(0x438)]())return null;return this['_cmd']['get'](_0x497773)??null;}async[_0x13bfcd(0x4f9)](_0x3d415a,_0x599598,_0x58fb7b={}){const _0x16ae9c=_0x13bfcd;if(!this[_0x16ae9c(0x438)]())return null;let _0x1655c4;return await this[_0x16ae9c(0x5f9)]['_systemEnv'][_0x16ae9c(0x5c4)]['transaction'](()=>{const _0x37098e=_0x16ae9c,_0x1c91bc=this[_0x37098e(0x410)][_0x37098e(0x437)](_0x3d415a)||{'epoch':0x0};_0x1655c4=(_0x1c91bc[_0x37098e(0x2f3)]||0x0)+0x1,this[_0x37098e(0x410)][_0x37098e(0x347)](_0x3d415a,{..._0x1c91bc,..._0x58fb7b,'cmd':_0x599598,'epoch':_0x1655c4,'updatedAt':Date['now']()});}),_0x1655c4;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x48b8eb,'nodeKey':_0x2191b2,'logicalKey':_0x6751f7,'slotKey':_0x3f9361,'PROCESS_ENV':_0x3e1a86,'NODE_TYPE':_0x2646af},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x414f11=_0x2d3788;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x2cbe77=require$$0$6,{EVENTS:_0x25fe79,CHANGE_ACTIONS:_0x44cd93}=requireOkdbEnums(),{LOOP:_0x300a42}=requireOkdbLoopMonitor(),_0x14bb51=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x896352=0x5,_0x4b175a=0x2710;class _0x1e22ea extends _0x2cbe77{constructor(_0x476910,_0x22a6cd={}){const _0x1d904d=_0x3802;super(),this[_0x1d904d(0x5f9)]=_0x476910,this[_0x1d904d(0x630)]=_0x22a6cd[_0x1d904d(0x3ba)]??_0x14bb51,this[_0x1d904d(0x378)]=_0x22a6cd[_0x1d904d(0x4a4)]??_0x896352,this['_dedupeMax']=_0x22a6cd[_0x1d904d(0x37c)]??_0x4b175a,this[_0x1d904d(0x527)]=![],this['_cursors']=new Map(),this['_baselines']=new Map(),this[_0x1d904d(0x3c5)]=new Map(),this[_0x1d904d(0x4fa)]=null,this[_0x1d904d(0x64a)]=![],this[_0x1d904d(0x3d2)]=new Set(),this[_0x1d904d(0x1cb)]=_0x454bcb=>this[_0x1d904d(0x583)](_0x454bcb),this[_0x1d904d(0x211)]=_0x5ed7bd=>this[_0x1d904d(0x655)](_0x5ed7bd),this['_onStop']=()=>this[_0x1d904d(0x1c8)]();}['start'](){const _0x1d7814=_0x3802;if(this[_0x1d7814(0x527)])return;this['_started']=!![];for(const [_0x1f5d28,_0x4cc084]of this['okdb'][_0x1d7814(0x2a1)]){if(_0x1f5d28['startsWith']('~'))continue;try{_0x4cc084[_0x1d7814(0x2d3)]();}catch{}}for(const [_0x36e255,_0xadb559]of this[_0x1d7814(0x5f9)]['_envs']){if(_0x36e255[_0x1d7814(0x1af)]('~'))continue;try{this[_0x1d7814(0x4f0)][_0x1d7814(0x5c1)](_0x36e255,_0xadb559['getClock']()||0x0);}catch{}}const {events:_0x4af627}=this[_0x1d7814(0x5f9)];_0x4af627['on'](_0x25fe79[_0x1d7814(0x398)],this[_0x1d7814(0x1cb)]),_0x4af627['on'](_0x25fe79['ITEM_UPDATE'],this[_0x1d7814(0x1cb)]),_0x4af627['on'](_0x25fe79[_0x1d7814(0x468)],this[_0x1d7814(0x1cb)]),_0x4af627['on'](_0x25fe79[_0x1d7814(0x411)],this[_0x1d7814(0x211)]),_0x4af627[_0x1d7814(0x372)](_0x25fe79[_0x1d7814(0x183)],this[_0x1d7814(0x38c)]);}[_0x414f11(0x1c8)](){const _0x97062e=_0x414f11;if(!this[_0x97062e(0x527)])return;this[_0x97062e(0x527)]=![];const {events:_0x240ec1}=this[_0x97062e(0x5f9)];_0x240ec1[_0x97062e(0x210)](_0x25fe79[_0x97062e(0x398)],this['_onItem']),_0x240ec1[_0x97062e(0x210)](_0x25fe79[_0x97062e(0x56a)],this[_0x97062e(0x1cb)]),_0x240ec1[_0x97062e(0x210)](_0x25fe79['ITEM_REMOVE'],this[_0x97062e(0x1cb)]),_0x240ec1[_0x97062e(0x210)](_0x25fe79[_0x97062e(0x411)],this[_0x97062e(0x211)]);try{_0x240ec1[_0x97062e(0x210)](_0x25fe79['SYSTEM_STOPPED'],this[_0x97062e(0x38c)]);}catch{}this[_0x97062e(0x4fa)]&&(clearTimeout(this[_0x97062e(0x4fa)]),this[_0x97062e(0x4fa)]=null),this[_0x97062e(0x3c5)]['clear'](),this[_0x97062e(0x416)]['clear'](),this[_0x97062e(0x4f0)][_0x97062e(0x301)](),this['_seen'][_0x97062e(0x301)]();}[_0x414f11(0x63f)](_0x342bfb,_0x3e8f35,_0xc948ba,_0x4a6aee){return _0x342bfb+'\x00'+_0x3e8f35+'\x00'+_0xc948ba+'\x00'+_0x4a6aee;}[_0x414f11(0x366)](_0x3ce70b,_0x307d53,_0x4669df,_0x2d5b5e){const _0x344a41=_0x414f11,_0x4c1056=this[_0x344a41(0x63f)](_0x3ce70b,_0x307d53,_0x4669df,_0x2d5b5e);if(this['_seen'][_0x344a41(0x430)](_0x4c1056))return![];this[_0x344a41(0x3d2)]['add'](_0x4c1056);if(this[_0x344a41(0x3d2)][_0x344a41(0x3cf)]>this['_dedupeMax']){const _0x2cac9c=this[_0x344a41(0x3d2)][_0x344a41(0x384)]()[_0x344a41(0x18d)]()[_0x344a41(0x558)];this[_0x344a41(0x3d2)][_0x344a41(0x24a)](_0x2cac9c);}return!![];}[_0x414f11(0x583)](_0x5c6425){const _0x4d7677=_0x414f11;if(!this['_started']||!_0x5c6425)return;const {env:_0x16175e,type:_0x270dd4,key:_0x3e04d6,clock:_0x56e9d8,origin:_0x5d2232,action:_0x18f968,newValue:_0x11e010,oldValue:_0x3cda30}=_0x5c6425;if(_0x16175e==null||_0x270dd4==null||_0x3e04d6==null)return;if(typeof _0x16175e==='string'&&_0x16175e['startsWith']('~'))return;if(typeof _0x270dd4===_0x4d7677(0x5a1)&&_0x270dd4[_0x4d7677(0x1af)]('~'))return;if(!this[_0x4d7677(0x366)](_0x16175e,_0x270dd4,_0x3e04d6,_0x56e9d8))return;const _0x209807=_0x18f968===_0x44cd93[_0x4d7677(0x528)]?_0x4d7677(0x1d2):'put';this[_0x4d7677(0x4c6)](_0x4d7677(0x4ca),{'env':_0x16175e,'type':_0x270dd4,'key':_0x3e04d6,'op':_0x209807,'clock':_0x56e9d8,'origin':_0x5d2232,'value':_0x209807===_0x4d7677(0x1d2)?null:_0x11e010,'prevValue':_0x3cda30});}[_0x414f11(0x655)](_0x358b72){const _0x583218=_0x414f11;if(!this['_started'])return;if(!_0x358b72||typeof _0x358b72[_0x583218(0x3c3)]!=='string'||typeof _0x358b72['type']!=='string')return;const {env:_0x867e3b,type:_0x59f63b}=_0x358b72;if(_0x867e3b['startsWith']('~')||_0x59f63b[_0x583218(0x1af)]('~'))return;this[_0x583218(0x3c5)]['set'](_0x867e3b+'\x00'+_0x59f63b,{'env':_0x867e3b,'type':_0x59f63b}),this['_scheduleFlush']();}[_0x414f11(0x3d1)](){const _0x46fe03=_0x414f11;if(this[_0x46fe03(0x4fa)])return;const _0x15efae=()=>{const _0x36b610=_0x46fe03;this[_0x36b610(0x4fa)]=null,this[_0x36b610(0x264)]()[_0x36b610(0x26c)](()=>{});};this[_0x46fe03(0x4fa)]=setTimeout(_0x15efae,this['_flushDebounce']>0x0?this[_0x46fe03(0x378)]:0x0);}async[_0x414f11(0x264)](){const _0x1cd7fa=_0x414f11;if(this[_0x1cd7fa(0x64a)]){this['_scheduleFlush']();return;}this['_draining']=!![];try{const _0x152ff7=[...this['_pending'][_0x1cd7fa(0x384)]()];this[_0x1cd7fa(0x3c5)][_0x1cd7fa(0x301)]();let _0x12014a=![];for(const {env:_0x15d4af,type:_0x1607ea}of _0x152ff7){try{const _0x227a52=await this[_0x1cd7fa(0x588)](_0x15d4af,_0x1607ea);if(_0x227a52)_0x12014a=!![];}catch{this[_0x1cd7fa(0x3c5)][_0x1cd7fa(0x5c1)](_0x15d4af+'\x00'+_0x1607ea,{'env':_0x15d4af,'type':_0x1607ea}),_0x12014a=!![];}}if(_0x12014a||this['_pending']['size']>0x0)this[_0x1cd7fa(0x3d1)]();}finally{this[_0x1cd7fa(0x64a)]=![];}}async['_drainOne'](_0x3ca0a0,_0x3bcb7b){const _0x3e7d50=_0x414f11,_0xe7713a=await this['okdb'][_0x3e7d50(0x56d)](_0x3ca0a0),_0x2cb510=_0x3ca0a0+'\x00'+_0x3bcb7b;!this[_0x3e7d50(0x416)][_0x3e7d50(0x430)](_0x2cb510)&&(!this[_0x3e7d50(0x4f0)]['has'](_0x3ca0a0)&&(_0xe7713a[_0x3e7d50(0x2d3)](),this[_0x3e7d50(0x4f0)][_0x3e7d50(0x5c1)](_0x3ca0a0,_0xe7713a[_0x3e7d50(0x63b)]()||0x0)),this[_0x3e7d50(0x416)]['set'](_0x2cb510,this[_0x3e7d50(0x4f0)][_0x3e7d50(0x437)](_0x3ca0a0)));const _0x102a48=this['_cursors'][_0x3e7d50(0x437)](_0x2cb510),_0x104b8c=_0xe7713a[_0x3e7d50(0x63b)](_0x3bcb7b)||0x0;if(_0x104b8c<=_0x102a48)return![];const _0x518f99=_0x102a48+this[_0x3e7d50(0x630)],_0x142a4b=Math[_0x3e7d50(0x29c)](_0x104b8c,_0x518f99),_0x195585=_0x300a42['enabled']?_0x300a42[_0x3e7d50(0x517)]():0x0,_0x48d4bf=Array[_0x3e7d50(0x57e)](_0xe7713a[_0x3e7d50(0x215)](_0x3bcb7b,_0x102a48+0x1,_0x142a4b));let _0x57eea9=_0x102a48;for(const _0x5120b9 of _0x48d4bf){const {clock:_0x51eba3,key:_0x526ce6,action:_0x24a3b8,origin:_0x17082f}=_0x5120b9;if(_0x51eba3>_0x57eea9)_0x57eea9=_0x51eba3;if(_0x526ce6==null)continue;if(!this[_0x3e7d50(0x366)](_0x3ca0a0,_0x3bcb7b,_0x526ce6,_0x51eba3))continue;let _0x1cb4cd,_0xfea1f5;if(_0x24a3b8===_0x44cd93['REMOVE'])_0x1cb4cd=_0x3e7d50(0x1d2),_0xfea1f5=null;else{const _0x166bbe=_0xe7713a['get'](_0x3bcb7b,_0x526ce6);_0x166bbe==null?(_0x1cb4cd=_0x3e7d50(0x1d2),_0xfea1f5=null):(_0x1cb4cd=_0x3e7d50(0x347),_0xfea1f5=_0x166bbe);}this['emit'](_0x3e7d50(0x4ca),{'env':_0x3ca0a0,'type':_0x3bcb7b,'key':_0x526ce6,'op':_0x1cb4cd,'clock':_0x51eba3,'origin':_0x17082f,'value':_0xfea1f5});}if(_0x300a42[_0x3e7d50(0x647)])_0x300a42[_0x3e7d50(0x423)](_0x3e7d50(0x5b2)+_0x3ca0a0+':'+_0x3bcb7b,_0x300a42[_0x3e7d50(0x517)]()-_0x195585,'n='+_0x48d4bf[_0x3e7d50(0x557)]);return this['_cursors'][_0x3e7d50(0x5c1)](_0x2cb510,Math[_0x3e7d50(0x5b4)](_0x57eea9,_0x142a4b)),_0xe7713a[_0x3e7d50(0x63b)](_0x3bcb7b)>_0x142a4b;}[_0x414f11(0x3c4)](){const _0x1b47d4=_0x414f11;return{'started':this[_0x1b47d4(0x527)],'quantum':this[_0x1b47d4(0x630)],'flushDebounce':this['_flushDebounce'],'cursors':Object['fromEntries']([...this[_0x1b47d4(0x416)][_0x1b47d4(0x40c)]()]['map'](([_0x10fc28,_0x3891bc])=>[_0x10fc28[_0x1b47d4(0x343)]('\x00',':'),_0x3891bc])),'pending':this[_0x1b47d4(0x3c5)]['size'],'seen':this['_seen'][_0x1b47d4(0x3cf)]};}}return _0x1e22ea['CHANGEFEED_QUANTUM']=_0x14bb51,okdbChangefeed={'OKDBChangefeed':_0x1e22ea},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3f8836=_0x2d3788;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x18b7ca=require$$1$2,_0x13804c=require$$1,{EVENTS:_0x59d6d8}=requireOkdbEnums(),_0x1c0ae1=require$$0,{slotKey:_0x5ebbc8}=requireOkdbProcessRegistry(),_0xd85a09=0xfa,_0x5aeebd=0xfa0,_0x242ef9=0x5,_0x38dce8=0x2710,_0x496e47=0xbb8,_0x20fcd7=0x7d0,_0x3894ef=_0x3f8836(0x1c9),_0x3fcedd=_0x3f8836(0x3a6),_0x3e5499=_0x3f8836(0x4e4),_0xa9e7d6=_0x3f8836(0x368),_0xf36036=[_0x59d6d8[_0x3f8836(0x5a2)],_0x59d6d8[_0x3f8836(0x64d)],_0x59d6d8[_0x3f8836(0x1c3)],_0x59d6d8[_0x3f8836(0x2ca)],_0x59d6d8['INDEX_PROGRESS'],_0x59d6d8[_0x3f8836(0x467)],_0x59d6d8[_0x3f8836(0x356)],_0x59d6d8[_0x3f8836(0x58d)],'processor:ready','processor:progress',_0x3f8836(0x1a5),_0x3f8836(0x193),_0x3f8836(0x460),_0x3f8836(0x2f9)],_0xebcbdf=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x4a75f5({workers:_0x43f493,makeOkdb:_0x3e058d,port:_0x42e1,primaryOkdb:_0x3a625a,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x4da33b=_0x3f8836;if(_0x18b7ca['isPrimary'])return childEntry&&_0x18b7ca[_0x4da33b(0x3d3)]({'exec':_0x13804c[_0x4da33b(0x65d)](__dirname,_0x4da33b(0x539)),'args':[],'execArgv':((()=>{const _0x598b39=_0x4da33b,_0x5297ae=[];for(let _0x3f5d1d=0x0;_0x3f5d1d<process[_0x598b39(0x5ed)][_0x598b39(0x557)];_0x3f5d1d++){const _0x4d6935=process[_0x598b39(0x5ed)][_0x3f5d1d];if(_0x4d6935[_0x598b39(0x1af)](_0x598b39(0x33b))||_0x4d6935[_0x598b39(0x1af)](_0x598b39(0x65a))||_0x4d6935['startsWith'](_0x598b39(0x3c1)))continue;if(_0x4d6935==='-e'||_0x4d6935==='--eval'||_0x4d6935==='-p'||_0x4d6935===_0x598b39(0x2c7)){_0x3f5d1d++;continue;}_0x5297ae[_0x598b39(0x228)](_0x4d6935);}return _0x5297ae;})())}),_0x29da82({'workers':_0x43f493,'port':_0x42e1,'primaryOkdb':_0x3a625a,'workerEnv':workerEnv});return _0x2e3371({'makeOkdb':_0x3e058d,'port':_0x42e1});}function _0x29da82({workers:_0x42fa10,port:_0x46c526,primaryOkdb:_0x2af30d,workerEnv:_0x3fb329}){const _0x3e6ac6=_0x3f8836,_0x4e18d4=new Map(),_0x488dd8=new Map();let _0x3d23e2=![];const _0x37cd2a=_0x689827=>_0x689827?.[_0x3e6ac6(0x31f)],_0x5137b9=_0x32ebbc=>{const _0x38e495=_0x3e6ac6,_0x801c28=_0x18b7ca[_0x38e495(0x20e)]({...process.env,..._0x3fb329||{},'OKDB_CLUSTER_SLOT':String(_0x32ebbc)});return _0x801c28[_0x38e495(0x31f)]=_0x32ebbc,_0x4e18d4[_0x38e495(0x5c1)](_0x801c28[_0x38e495(0x353)]['pid'],{'worker':_0x801c28,'startedAt':Date[_0x38e495(0x517)](),'slot':_0x32ebbc}),_0x801c28['on'](_0x38e495(0x2bb),_0x41888e=>{const _0x27f2f5=_0x38e495;console[_0x27f2f5(0x4e4)](_0x27f2f5(0x3a0)+_0x801c28[_0x27f2f5(0x353)]['pid']+_0x27f2f5(0x273)+(_0x41888e?.[_0x27f2f5(0x277)]??_0x41888e));}),_0x801c28['on'](_0x38e495(0x3cc),()=>_0x58bc0a()),_0x801c28;},_0x4554ce=_0x51b5a7=>{const _0x4da5e7=_0x3e6ac6;for(const {worker:_0x56b839}of _0x4e18d4[_0x4da5e7(0x384)]()){if(_0x56b839[_0x4da5e7(0x5e0)]()||!_0x56b839[_0x4da5e7(0x429)]())continue;try{_0x56b839[_0x4da5e7(0x5c9)](_0x51b5a7);}catch{}}};_0x2af30d?.[_0x3e6ac6(0x4f4)]?.({'kind':_0x3e6ac6(0x515),'listenAddr':':'+_0x46c526})[_0x3e6ac6(0x26c)](()=>{}),_0x2af30d?.[_0x3e6ac6(0x31b)]?.[_0x3e6ac6(0x428)]?.({'workersConfigured':_0x42fa10});const _0x53a7fa={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x58bc0a=()=>{const _0x3465cc=_0x3e6ac6,_0x3963fe=_0x2af30d?.[_0x3465cc(0x31b)];if(!_0x3963fe||!_0x3963fe['_isWriter'])return;const _0x309b87=_0x3963fe[_0x3465cc(0x47f)];for(const {worker:_0x28c45f,startedAt:_0x52d421,slot:_0x18a39d,stats:_0xd09a0e,processing:_0x38c688}of _0x4e18d4[_0x3465cc(0x384)]()){if(_0x28c45f[_0x3465cc(0x5e0)]())continue;const _0x27abb6=_0x3963fe[_0x3465cc(0x2b8)]?.()&&_0x3963fe['getDesired'](_0x3465cc(0x452),_0x283b18(_0x18a39d))?.[_0x3465cc(0x5ea)]===!![];_0x3963fe['publishChildRow']({'pid':_0x28c45f[_0x3465cc(0x353)]['pid'],'startedAt':_0x52d421,'kind':_0x3465cc(0x365),'supervisorKey':_0x309b87,'slot':_0x18a39d,'slotKey':_0x283b18(_0x18a39d),'role':_0x53a7fa,'listenAddr':':'+_0x46c526,'lifecycle':_0x27abb6?'decommissioning':_0x3465cc(0x2da),'processing':_0x38c688??null,'stats':_0xd09a0e??null})['catch'](()=>{});}},_0x283b18=_0x2cc424=>_0x5ebbc8(_0x3e6ac6(0x313)+_0x46c526,_0x2cc424),_0x4368ce=_0xdf48c7=>{const _0x547c2e=_0x3e6ac6,_0x42d79e=_0x2af30d?.[_0x547c2e(0x31b)];if(!_0x42d79e?.[_0x547c2e(0x2b8)]?.())return![];return _0x42d79e[_0x547c2e(0x64c)](_0x547c2e(0x452),_0x283b18(_0xdf48c7))?.['decommission']===!![];};for(let _0x28bb9b=0x0;_0x28bb9b<_0x42fa10;_0x28bb9b++){const _0x19a7d9=_0x4368ce(_0x28bb9b);_0x488dd8['set'](_0x28bb9b,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x19a7d9,'respawnTimer':null}),_0x19a7d9?console[_0x3e6ac6(0x4e4)]('[okdb-cluster]\x20slot='+_0x28bb9b+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x5137b9(_0x28bb9b);}const _0x3fcca3=()=>{const _0x1dd257=_0x3e6ac6,_0x1667e9=_0x2af30d?.['processes'];if(!_0x1667e9?.[_0x1dd257(0x2b7)]||!_0x1667e9['hasDesired']?.())return;for(const [_0xf3d9e,_0x3bdc2b]of _0x488dd8[_0x1dd257(0x40c)]()){const _0x4efbb8=_0x1667e9['getDesired'](_0x1dd257(0x452),_0x283b18(_0xf3d9e)),_0x1d3fa3=_0x4efbb8?.[_0x1dd257(0x5ea)]===!![],_0x38cd43=_0x4efbb8?.['kill']===!![];if(_0x1d3fa3&&!_0x3bdc2b[_0x1dd257(0x62b)]){_0x3bdc2b[_0x1dd257(0x62b)]=!![];_0x3bdc2b['respawnTimer']&&(clearTimeout(_0x3bdc2b[_0x1dd257(0x5d0)]),_0x3bdc2b['respawnTimer']=null);for(const {worker:_0x121c1e}of _0x4e18d4[_0x1dd257(0x384)]()){if(_0x37cd2a(_0x121c1e)!==_0xf3d9e||_0x121c1e[_0x1dd257(0x5e0)]())continue;try{if(_0x38cd43)_0x121c1e[_0x1dd257(0x353)][_0x1dd257(0x229)](_0x1dd257(0x64e));else _0x121c1e[_0x1dd257(0x429)]()&&_0x121c1e['disconnect']();}catch{}}console[_0x1dd257(0x4e4)](_0x1dd257(0x606)+(_0x38cd43?'hard-killed':_0x1dd257(0x3be))+_0x1dd257(0x4e7)+_0xf3d9e+'\x20(durable\x20desired-state)');}else{if(!_0x1d3fa3&&_0x3bdc2b['dead']&&_0x4efbb8){_0x3bdc2b[_0x1dd257(0x62b)]=![],_0x3bdc2b[_0x1dd257(0x39e)]=[],_0x3bdc2b['consecutiveFailures']=0x0;const _0x3e8db4=[..._0x4e18d4[_0x1dd257(0x384)]()][_0x1dd257(0x23a)](({worker:_0x8c3832})=>_0x37cd2a(_0x8c3832)===_0xf3d9e&&!_0x8c3832[_0x1dd257(0x5e0)]());!_0x3e8db4&&!_0x3d23e2&&(_0x5137b9(_0xf3d9e),console['log'](_0x1dd257(0x2fd)+_0xf3d9e));}}}},_0x4fd889=()=>{try{_0x3fcca3();}catch{}};_0x2af30d?.[_0x3e6ac6(0x1bb)]?.['on']?.(_0x59d6d8[_0x3e6ac6(0x3da)],_0x4fd889);const _0x4853db=[];if(_0x2af30d?.[_0x3e6ac6(0x1bb)]?.['on'])for(const _0x4a086f of _0xf36036){const _0x2b5b2b=_0x58aa5d=>{_0x4554ce({[_0x3894ef]:_0x3fcedd,'event':_0x4a086f,'data':_0x58aa5d??{}});};_0x2af30d[_0x3e6ac6(0x1bb)]['on'](_0x4a086f,_0x2b5b2b),_0x4853db[_0x3e6ac6(0x228)]({'event':_0x4a086f,'handler':_0x2b5b2b});}const _0x20da1a=setInterval(()=>{_0x3fcca3(),_0x58bc0a();},_0xebcbdf);_0x20da1a['unref']?.();const _0x4a5cee=(_0x38bfe5,_0x3273ac)=>{const _0x461230=_0x3e6ac6;if(!_0x3273ac||typeof _0x3273ac!==_0x461230(0x500)||_0x3273ac[_0x3894ef]!==_0x3e5499)return;if(!_0x2af30d?.['log']?.['ingest'])return;const _0x47f933=_0x3273ac[_0x461230(0x48d)]||{};_0x2af30d['log']['ingest']({..._0x47f933,'msg':'[w'+_0x3273ac['slot']+']\x20'+(_0x47f933[_0x461230(0x41f)]??''),'meta':{..._0x47f933[_0x461230(0x585)]||{},'worker':_0x3273ac['slot'],'workerPid':_0x3273ac['pid']}});};_0x18b7ca['on'](_0x3e6ac6(0x277),_0x4a5cee);const _0x1f64db=(_0x5a243e,_0x408811)=>{const _0x531fad=_0x3e6ac6;if(!_0x408811||typeof _0x408811!==_0x531fad(0x500)||_0x408811[_0x3894ef]!==_0xa9e7d6)return;const _0xd3b409=_0x4e18d4[_0x531fad(0x437)](_0x5a243e[_0x531fad(0x353)][_0x531fad(0x18e)]);if(_0xd3b409){_0xd3b409[_0x531fad(0x368)]={..._0x408811['stats'],'at':Date[_0x531fad(0x517)]()};if(_0x408811[_0x531fad(0x3fb)]!==undefined)_0xd3b409['processing']=_0x408811[_0x531fad(0x3fb)];}};_0x18b7ca['on'](_0x3e6ac6(0x277),_0x1f64db),_0x18b7ca['on'](_0x3e6ac6(0x19f),(_0x30cf25,_0x313e3d,_0x4adee4)=>{const _0x445865=_0x3e6ac6,_0x23a917=_0x30cf25[_0x445865(0x353)][_0x445865(0x18e)],_0x40a4a1=_0x37cd2a(_0x30cf25),_0x3efdfa=_0x4e18d4[_0x445865(0x437)](_0x23a917);if(_0x3efdfa&&_0x2af30d?.['processes'])_0x2af30d[_0x445865(0x31b)][_0x445865(0x42a)](_0x23a917+':'+_0x3efdfa[_0x445865(0x42e)])[_0x445865(0x26c)](()=>{});_0x4e18d4[_0x445865(0x24a)](_0x23a917),console[_0x445865(0x4e4)]('[okdb-cluster]\x20worker\x20pid='+_0x23a917+_0x445865(0x1d7)+(_0x40a4a1??'?')+')\x20exited\x20'+('(code='+_0x313e3d+',\x20signal='+(_0x4adee4??_0x445865(0x600))+_0x445865(0x1f4)+_0x4e18d4[_0x445865(0x3cf)]+'\x20worker(s)\x20remaining')),_0x58bc0a();if(_0x3d23e2||_0x40a4a1==null)return;const _0x1c268a=_0x488dd8[_0x445865(0x437)](_0x40a4a1);if(!_0x1c268a||_0x1c268a[_0x445865(0x62b)])return;const _0x2a8109=Date[_0x445865(0x517)]();_0x1c268a['deaths'][_0x445865(0x228)](_0x2a8109),_0x1c268a['deaths']=_0x1c268a[_0x445865(0x39e)][_0x445865(0x654)](_0x3094a8=>_0x2a8109-_0x3094a8<=_0x38dce8);if(_0x1c268a[_0x445865(0x39e)][_0x445865(0x557)]>=_0x242ef9){_0x1c268a[_0x445865(0x62b)]=!![],console[_0x445865(0x2bb)](_0x445865(0x407)+_0x40a4a1+_0x445865(0x619)+_0x1c268a[_0x445865(0x39e)][_0x445865(0x557)]+_0x445865(0x20c)+(_0x38dce8+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x4e18d4[_0x445865(0x3cf)]+_0x445865(0x253)));return;}_0x1c268a[_0x445865(0x22b)]++;const _0x1edfd4=Math['min'](_0x5aeebd,_0xd85a09*0x2**(_0x1c268a[_0x445865(0x22b)]-0x1));console[_0x445865(0x4e4)](_0x445865(0x435)+_0x40a4a1+'\x20in\x20'+_0x1edfd4+_0x445865(0x4fc)+_0x1c268a[_0x445865(0x22b)]+')'),_0x1c268a[_0x445865(0x5d0)]=setTimeout(()=>{const _0x3f5e17=_0x445865;_0x1c268a['respawnTimer']=null;if(_0x3d23e2||_0x1c268a[_0x3f5e17(0x62b)])return;const _0x28668b=_0x5137b9(_0x40a4a1);_0x28668b[_0x3f5e17(0x372)](_0x3f5e17(0x1c1),()=>{const _0x270504=_0x3f5e17;if(_0x488dd8[_0x270504(0x437)](_0x40a4a1)===_0x1c268a)_0x1c268a[_0x270504(0x22b)]=0x0;});},_0x1edfd4),_0x1c268a[_0x445865(0x5d0)][_0x445865(0x36d)]?.();});const _0x37efd4=[..._0x4e18d4[_0x3e6ac6(0x1bc)]()];console['log'](_0x3e6ac6(0x1ec)+process[_0x3e6ac6(0x18e)]+_0x3e6ac6(0x4b8)+_0x42fa10+_0x3e6ac6(0x285)+_0x46c526+':\x20'+('['+_0x37efd4['join'](',\x20')+']'));const _0x5f5bb8={'_isClusterController':!![],'port':_0x46c526,'primaryOkdb':_0x2af30d??null,'status'(){const _0x3aaeec=_0x3e6ac6;return{'clustered':!![],'primaryPid':process[_0x3aaeec(0x18e)],'port':_0x46c526,'primaryRole':_0x2af30d?.['role']??null,'processorPid':null,'supervisorPid':process[_0x3aaeec(0x18e)],'workers':[..._0x4e18d4['values']()][_0x3aaeec(0x3ad)](({worker:_0x2dccc9})=>({'pid':_0x2dccc9[_0x3aaeec(0x353)]['pid'],'id':_0x2dccc9['id'],'dead':_0x2dccc9[_0x3aaeec(0x5e0)]()}))};},async 'close'(){const _0x31c0df=_0x3e6ac6;_0x3d23e2=!![];for(const _0x12a34f of _0x488dd8[_0x31c0df(0x384)]()){_0x12a34f['dead']=!![],_0x12a34f['respawnTimer']&&(clearTimeout(_0x12a34f[_0x31c0df(0x5d0)]),_0x12a34f[_0x31c0df(0x5d0)]=null);}clearInterval(_0x20da1a),_0x18b7ca['off'](_0x31c0df(0x277),_0x4a5cee),_0x18b7ca[_0x31c0df(0x210)](_0x31c0df(0x277),_0x1f64db),_0x2af30d?.['events']?.[_0x31c0df(0x210)]?.(_0x59d6d8[_0x31c0df(0x3da)],_0x4fd889);if(_0x2af30d?.['events']?.[_0x31c0df(0x210)])for(const {event:_0x5cd27a,handler:_0xdc0067}of _0x4853db){try{_0x2af30d[_0x31c0df(0x1bb)][_0x31c0df(0x210)](_0x5cd27a,_0xdc0067);}catch{}}_0x4853db[_0x31c0df(0x557)]=0x0;const _0x34bbb2=[..._0x4e18d4[_0x31c0df(0x384)]()][_0x31c0df(0x3ad)](({worker:_0x210eee})=>_0x210eee);if(_0x34bbb2[_0x31c0df(0x557)]===0x0)return;await Promise[_0x31c0df(0x37f)](_0x34bbb2[_0x31c0df(0x3ad)](_0x2a8d3d=>new Promise(_0x4ac61d=>{const _0x38500b=_0x31c0df;if(_0x2a8d3d[_0x38500b(0x5e0)]()){_0x4ac61d();return;}let _0x337631=![];const _0x3a9535=()=>{if(_0x337631)return;_0x337631=!![];if(_0x5bb948)clearTimeout(_0x5bb948);_0x4ac61d();};_0x2a8d3d[_0x38500b(0x372)]('exit',_0x3a9535);const _0x5bb948=setTimeout(()=>{const _0x556522=_0x38500b;try{_0x2a8d3d[_0x556522(0x353)]['kill']();}catch{}},_0x496e47+0x1f4);_0x5bb948['unref']?.();try{_0x2a8d3d[_0x38500b(0x307)]();}catch{try{_0x2a8d3d[_0x38500b(0x353)][_0x38500b(0x229)]();}catch{}}})));}};return _0x5f5bb8;}async function _0x2e3371({makeOkdb:_0x11e612,port:_0x293913}){const _0x22e47c=_0x3f8836,_0x52eaaa=await _0x11e612();return _0x862246(_0x52eaaa),_0x52eaaa[_0x22e47c(0x58a)][_0x22e47c(0x3bf)](_0x293913);}function _0x862246(_0x36936a){const _0x54a00b=_0x3f8836;if(!_0x36936a||_0x36936a[_0x54a00b(0x261)])return;_0x36936a[_0x54a00b(0x261)]=!![];try{const {OKDBChangefeed:_0x504370}=requireOkdbChangefeed(),_0x1f9cad=_0x36936a['_adminRelay'];if(_0x1f9cad&&typeof _0x1f9cad[_0x54a00b(0x226)]===_0x54a00b(0x53c)){const _0x489a5b=new _0x504370(_0x36936a);_0x489a5b[_0x54a00b(0x52f)](),_0x1f9cad[_0x54a00b(0x226)](_0x489a5b),_0x36936a[_0x54a00b(0x18b)]=_0x489a5b;}}catch(_0x1860e5){_0x36936a[_0x54a00b(0x4e4)]?.[_0x54a00b(0x62d)]?.(_0x54a00b(0x38d)+(_0x1860e5?.[_0x54a00b(0x277)]??_0x1860e5),{'feature':_0x54a00b(0x243)});}const _0x3bb753=_0x445cf5=>{const _0x2f3356=_0x54a00b;if(!_0x445cf5||typeof _0x445cf5!==_0x2f3356(0x500)||_0x445cf5[_0x3894ef]==null)return;if(_0x445cf5[_0x3894ef]===_0x3fcedd)try{_0x36936a[_0x2f3356(0x50f)]?.[_0x2f3356(0x349)]?.(_0x445cf5['event'],_0x445cf5[_0x2f3356(0x3fd)]);}catch{}};process['on'](_0x54a00b(0x277),_0x3bb753),_0x36936a[_0x54a00b(0x483)]=_0x3bb753;{let _0x2f5a09=process['cpuUsage'](),_0xe70340=Date[_0x54a00b(0x517)]();const _0x429781=()=>{const _0x5cd05f=_0x54a00b;if(typeof process['send']!==_0x5cd05f(0x53c)||!process[_0x5cd05f(0x623)])return;const _0x5e7d4e=Date['now'](),_0x34a48c=process[_0x5cd05f(0x322)](),_0x114846=(_0x5e7d4e-_0xe70340)*0x3e8,_0x4944ee=_0x34a48c[_0x5cd05f(0x5ab)]-_0x2f5a09[_0x5cd05f(0x5ab)]+(_0x34a48c['system']-_0x2f5a09[_0x5cd05f(0x62e)]),_0x6fca67=_0x114846>0x0?Math[_0x5cd05f(0x29c)](0x64,Math[_0x5cd05f(0x32f)](_0x4944ee/(_0x114846*(_0x1c0ae1[_0x5cd05f(0x457)]()['length']||0x1))*0x64)):0x0;_0x2f5a09=_0x34a48c,_0xe70340=_0x5e7d4e;const _0xc7e1e=process[_0x5cd05f(0x53d)]();let _0x4c4e7d=null;try{_0x4c4e7d=_0x36936a[_0x5cd05f(0x2cc)]?.['processors']?_0x36936a[_0x5cd05f(0x31b)]?.[_0x5cd05f(0x419)]?.()??null:null;}catch{}try{process[_0x5cd05f(0x5c9)]({[_0x3894ef]:_0xa9e7d6,'stats':{'rss':_0xc7e1e[_0x5cd05f(0x236)],'heapUsed':_0xc7e1e[_0x5cd05f(0x44c)],'heapTotal':_0xc7e1e['heapTotal'],'external':_0xc7e1e[_0x5cd05f(0x502)],'cpuPct':_0x6fca67,'cpuWindowMs':Math[_0x5cd05f(0x32f)](_0x114846/0x3e8)||null},'processing':_0x4c4e7d});}catch{}},_0x387ada=Math[_0x54a00b(0x5b4)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x5de8bf=setInterval(_0x429781,_0x387ada);_0x5de8bf['unref']?.(),_0x429781();for(const _0x2f9c5d of['processor:paused',_0x54a00b(0x460)]){_0x36936a[_0x54a00b(0x1bb)]?.['on']?.(_0x2f9c5d,()=>{try{_0x429781();}catch{}});}}let _0xab6a3f=![];const _0x20834f=async _0x2367d8=>{const _0x2c0d4f=_0x54a00b;if(_0xab6a3f)return;_0xab6a3f=!![];const _0x347807=setTimeout(()=>process[_0x2c0d4f(0x19f)](_0x2367d8),_0x496e47);_0x347807[_0x2c0d4f(0x36d)]?.();try{await _0x36936a[_0x2c0d4f(0x602)]?.();}catch{}process[_0x2c0d4f(0x19f)](_0x2367d8);};process['on']('disconnect',()=>_0x20834f(0x0));if(process['platform']!==_0x54a00b(0x330)){const _0x3b8add=setInterval(()=>{const _0x11d47=_0x54a00b;if(process[_0x11d47(0x1fb)]===0x1)_0x20834f(0x0);},_0x20fcd7);_0x3b8add[_0x54a00b(0x36d)]?.(),_0x36936a[_0x54a00b(0x2c9)]=_0x3b8add;}}return okdbCluster={'runClustered':_0x4a75f5,'attachWorkerCluster':_0x862246},okdbCluster;}var hasRequiredOkdb;function requireOkdb(){const _0x4d67c2=_0x2d3788;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x4d67c2(0x5b8)]();}catch{}const _0x2deb77=require$$1,_0x787884=require$$1$1,{resolveWorkers:_0x21a6f9,isShmbufNative:_0x357dc7}=requireOkdbWorkers();function _0x2b3496(_0x221d2a){const _0x216a8b=_0x4d67c2,_0x3eebb2=_0x221d2a[_0x216a8b(0x35c)](0x2),_0x62bf95={};let _0x25efca=0x0;while(_0x25efca<_0x3eebb2['length']){const _0x499dde=_0x3eebb2[_0x25efca];if(_0x499dde==='--port'||_0x499dde==='-p')_0x62bf95[_0x216a8b(0x4da)]=Number(_0x3eebb2[++_0x25efca]);else{if(_0x499dde===_0x216a8b(0x326)||_0x499dde==='-d')_0x62bf95['path']=_0x3eebb2[++_0x25efca];else{if(_0x499dde==='--key'||_0x499dde==='-k')_0x62bf95['key']=_0x3eebb2[++_0x25efca];else{if(_0x499dde===_0x216a8b(0x5e2)||_0x499dde==='-c')_0x62bf95[_0x216a8b(0x252)]=_0x3eebb2[++_0x25efca];else{if(_0x499dde===_0x216a8b(0x439))_0x62bf95[_0x216a8b(0x41a)]=_0x3eebb2[++_0x25efca];else{if(_0x499dde===_0x216a8b(0x265))_0x62bf95['noRepl']=!![];else{if(_0x499dde===_0x216a8b(0x569))_0x62bf95[_0x216a8b(0x448)]=!![];else{if(_0x499dde==='--workers')_0x62bf95['workers']=_0x3eebb2[++_0x25efca];else{if(_0x499dde===_0x216a8b(0x559))_0x62bf95[_0x216a8b(0x497)]=!![];else{if(_0x499dde===_0x216a8b(0x2db)||_0x499dde==='-e')_0x62bf95[_0x216a8b(0x3c3)]=_0x3eebb2[++_0x25efca];else{if(_0x499dde===_0x216a8b(0x324))_0x62bf95[_0x216a8b(0x536)]=_0x3eebb2[++_0x25efca];else{if(_0x499dde===_0x216a8b(0x35b))_0x62bf95['changes']=!![];else{if(_0x499dde==='--blobs')_0x62bf95['blobs']=!![];else{if(_0x499dde===_0x216a8b(0x420))_0x62bf95[_0x216a8b(0x42c)]=!![];else{if(_0x499dde===_0x216a8b(0x481)){const _0x55e2f4=[];while(_0x25efca+0x1<_0x3eebb2['length']&&!_0x3eebb2[_0x25efca+0x1][_0x216a8b(0x1af)]('--')){_0x55e2f4[_0x216a8b(0x228)](_0x3eebb2[++_0x25efca]);}_0x62bf95[_0x216a8b(0x492)]=_0x55e2f4['length']>0x0?_0x55e2f4:!![];}else{if(_0x499dde===_0x216a8b(0x62f))_0x62bf95[_0x216a8b(0x1ab)]=!![];else{if(_0x499dde==='--name')_0x62bf95[_0x216a8b(0x278)]=_0x3eebb2[++_0x25efca];else{if(_0x499dde===_0x216a8b(0x58f))_0x62bf95['password']=_0x3eebb2[++_0x25efca];else{if(_0x499dde===_0x216a8b(0x382))_0x62bf95[_0x216a8b(0x421)]=_0x3eebb2[++_0x25efca];else{if(_0x499dde==='--permissions')_0x62bf95['permissions']=_0x3eebb2[++_0x25efca];else{if(_0x499dde===_0x216a8b(0x3c6))_0x62bf95[_0x216a8b(0x41d)]=_0x3eebb2[++_0x25efca];else{if(_0x499dde==='--ttl')_0x62bf95[_0x216a8b(0x499)]=_0x3eebb2[++_0x25efca];else{if(_0x499dde==='--token')_0x62bf95[_0x216a8b(0x5d9)]=_0x3eebb2[++_0x25efca];else{if(_0x499dde===_0x216a8b(0x3dd)||_0x499dde==='-u')_0x62bf95[_0x216a8b(0x573)]=_0x3eebb2[++_0x25efca];else{if(_0x499dde==='--address')_0x62bf95[_0x216a8b(0x34d)]=_0x3eebb2[++_0x25efca];else{if(_0x499dde===_0x216a8b(0x1b3)||_0x499dde==='-v'){const _0x342f43=require$$3;console[_0x216a8b(0x4e4)](_0x342f43[_0x216a8b(0x4ef)]),process['exit'](0x0);}else(_0x499dde===_0x216a8b(0x5b9)||_0x499dde==='-h')&&(_0x2c5f89(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x25efca++;}return _0x62bf95;}function _0x2c5f89(){const _0x2b7709=_0x4d67c2;console['log'](_0x2b7709(0x3e7));}const _0x52eef3=new Set([_0x4d67c2(0x1f0),'info',_0x4d67c2(0x62d),_0x4d67c2(0x2bb)]);function _0x219e3d(_0x1531a4){const _0x1f911b=_0x4d67c2,_0x4d4d10=_0x1531a4['config']?_0x2deb77[_0x1f911b(0x4a7)](_0x1531a4[_0x1f911b(0x252)]):_0x2deb77[_0x1f911b(0x4a7)]('.kdbconfig');let _0x327f3f={};if(_0x787884['existsSync'](_0x4d4d10))try{const _0x2f1732=_0x787884[_0x1f911b(0x5db)](_0x4d4d10,_0x1f911b(0x5aa))[_0x1f911b(0x343)](/^\uFEFF/,'');_0x327f3f=JSON[_0x1f911b(0x52e)](_0x2f1732),console[_0x1f911b(0x4e4)]('[okdb]\x20loaded\x20config:\x20'+_0x4d4d10);}catch(_0x179417){console[_0x1f911b(0x2bb)](_0x1f911b(0x19c)+_0x4d4d10+':\x20'+_0x179417[_0x1f911b(0x277)]),process['exit'](0x1);}const _0x15a482={'port':process.env.OKDB_PORT?Number(process.env.OKDB_PORT):undefined,'path':process.env.OKDB_PATH??undefined,'key':process.env.OKDB_KEY??undefined,'logLevel':process.env.OKDB_LOG_LEVEL??undefined,'noRepl':process.env.OKDB_NO_REPL==='1'?!![]:undefined,'noAdmin':process.env.OKDB_NO_ADMIN==='1'?!![]:undefined},_0xe02ebe={'port':_0x1531a4[_0x1f911b(0x4da)]??_0x327f3f['port']??_0x15a482[_0x1f911b(0x4da)]??0x2124,'dbPath':_0x1531a4[_0x1f911b(0x32d)]??_0x327f3f['path']??_0x15a482[_0x1f911b(0x32d)]??'./okdb-data','key':_0x1531a4['key']??_0x327f3f['key']??_0x15a482[_0x1f911b(0x245)]??undefined,'logLevel':_0x1531a4['logLevel']??_0x327f3f[_0x1f911b(0x41a)]??_0x15a482[_0x1f911b(0x41a)]??'info','noRepl':_0x1531a4['noRepl']??_0x327f3f[_0x1f911b(0x59a)]??_0x15a482[_0x1f911b(0x59a)]??![],'noAdmin':_0x1531a4['noAdmin']??_0x327f3f[_0x1f911b(0x448)]??_0x15a482['noAdmin']??![],'admin':_0x327f3f[_0x1f911b(0x2c6)]??{},'api':_0x327f3f[_0x1f911b(0x57c)]??undefined,'auth':_0x327f3f[_0x1f911b(0x18a)]??undefined,'mcp':_0x327f3f[_0x1f911b(0x28e)]??undefined,'http':_0x327f3f[_0x1f911b(0x58a)]??undefined,'timeMachine':_0x327f3f[_0x1f911b(0x4df)]!==![]?_0x327f3f[_0x1f911b(0x4df)]??{}:![]};if(_0x1531a4[_0x1f911b(0x497)])_0xe02ebe[_0x1f911b(0x497)]=!![];if(_0x1531a4[_0x1f911b(0x5e3)]!==undefined)_0xe02ebe[_0x1f911b(0x5ee)]=_0x1531a4['workers'];return _0x1531a4[_0x1f911b(0x492)]!==undefined&&(_0xe02ebe['auth']=_0xe02ebe[_0x1f911b(0x18a)]||{},_0xe02ebe[_0x1f911b(0x18a)][_0x1f911b(0x492)]=_0x1531a4[_0x1f911b(0x492)]),_0x1531a4[_0x1f911b(0x1ab)]&&(_0xe02ebe['debug']=_0xe02ebe[_0x1f911b(0x1f0)]||{},_0xe02ebe[_0x1f911b(0x1f0)]['logRequests']=!![]),(!Number[_0x1f911b(0x1ae)](_0xe02ebe['port'])||_0xe02ebe['port']<0x1||_0xe02ebe['port']>0xffff)&&(console[_0x1f911b(0x2bb)]('[okdb]\x20invalid\x20port:\x20'+_0xe02ebe[_0x1f911b(0x4da)]+_0x1f911b(0x284)),process[_0x1f911b(0x19f)](0x1)),!_0x52eef3[_0x1f911b(0x430)](_0xe02ebe[_0x1f911b(0x41a)])&&(console[_0x1f911b(0x2bb)](_0x1f911b(0x238)+_0xe02ebe['logLevel']+_0x1f911b(0x408)),process[_0x1f911b(0x19f)](0x1)),_0xe02ebe;}function _0x31da5e(_0x679c71){const _0x40c86a=_0x4d67c2;return!!(_0x679c71&&typeof _0x679c71===_0x40c86a(0x500)&&!Array[_0x40c86a(0x43a)](_0x679c71)&&Object[_0x40c86a(0x1bc)](_0x679c71)[_0x40c86a(0x557)]>0x0);}function _0x5bc3e0(_0x41fb4a){const _0x263658=_0x4d67c2;return{..._0x41fb4a[_0x263658(0x245)]?{'encryptionKey':_0x41fb4a[_0x263658(0x245)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x533634=!process['stdout'][_0x4d67c2(0x473)]||!!process.env.NO_COLOR;function _0x51c22e(_0x37baef,_0x15213c){const _0x54582f=_0x4d67c2;return _0x533634?_0x15213c:'\x1b['+_0x37baef+'m'+_0x15213c+_0x54582f(0x524);}function _0x13ed63(_0x3e50a6){const _0x15f670=_0x4d67c2;if(!_0x3e50a6||_0x3e50a6[_0x15f670(0x557)]===0x0)return;const _0x50a620='─'['repeat'](0x38);process[_0x15f670(0x298)][_0x15f670(0x23f)]('\x0a'),process[_0x15f670(0x298)]['write'](_0x51c22e('33',_0x15f670(0x57a)+_0x3e50a6[_0x15f670(0x557)]+'\x20SECURITY\x20NOTICE'+(_0x3e50a6['length']>0x1?'S':'')+'\x0a')),process[_0x15f670(0x298)][_0x15f670(0x23f)]('\x20\x20'+_0x50a620+'\x0a');for(const _0x16e3ef of _0x3e50a6){const _0x2a90c0=_0x16e3ef[_0x15f670(0x2d0)]===_0x15f670(0x2bb)?_0x51c22e('31',_0x15f670(0x3e8)):_0x51c22e('33',_0x15f670(0x5ba));process[_0x15f670(0x298)]['write'](_0x2a90c0+'\x20\x20'+_0x51c22e('1',_0x16e3ef['title'])+'\x0a'),process['stderr']['write'](_0x15f670(0x627)+_0x16e3ef[_0x15f670(0x277)]+'\x0a');if(_0x16e3ef[_0x15f670(0x5ff)])process['stderr'][_0x15f670(0x23f)](_0x15f670(0x627)+_0x51c22e('2',_0x15f670(0x604)+_0x16e3ef[_0x15f670(0x5ff)])+'\x0a');process['stderr']['write']('\x0a');}process[_0x15f670(0x298)][_0x15f670(0x23f)]('\x20\x20'+_0x50a620+'\x0a\x0a');}function _0x51c8b2(_0x5aa162,_0x3cd9c2,_0x1a9a62={}){const _0x10744d=_0x4d67c2,_0xb73dc5=_0x5aa162[_0x10744d(0x58a)][_0x10744d(0x3bf)](_0x3cd9c2,_0x1a9a62);if(_0xb73dc5&&_0xb73dc5[_0x10744d(0x4d6)])return Promise[_0x10744d(0x4a7)](_0xb73dc5);return new Promise((_0x1d68ed,_0x5f1aa4)=>{const _0x2270ac=_0x10744d;_0xb73dc5[_0x2270ac(0x372)](_0x2270ac(0x1c1),_0x1d68ed),_0xb73dc5[_0x2270ac(0x372)](_0x2270ac(0x2bb),_0x5f1aa4);});}async function _0x3d076b(_0x3616cf){const _0x10ee43=_0x4d67c2,_0x3fa175=require$$4$1;console[_0x10ee43(0x4e4)]('\x0a\x20\x20okdb\x20doctor\x0a');let _0x47b2f9=!![];const _0x4aa52e=(_0x2b9ba5,_0x4568f9)=>{const _0xcc6e67=_0x10ee43;console[_0xcc6e67(0x4e4)]('\x20\x20'+(_0x2b9ba5?'✓':'✗')+'\x20'+_0x4568f9);if(!_0x2b9ba5)_0x47b2f9=![];},_0x1b9ef2=Number(process[_0x10ee43(0x4ef)][_0x10ee43(0x343)]('v','')[_0x10ee43(0x28b)]('.')[0x0]);_0x4aa52e(_0x1b9ef2>=0x12,'node\x20'+process['version']+(_0x1b9ef2<0x12?_0x10ee43(0x2e8):''));const _0x3e3c24=_0x2deb77['resolve'](_0x3616cf[_0x10ee43(0x1e6)]);try{_0x787884[_0x10ee43(0x4c1)](_0x3e3c24,{'recursive':!![]});const _0xbc5360=_0x2deb77['join'](_0x3e3c24,_0x10ee43(0x3a8));_0x787884['writeFileSync'](_0xbc5360,''),_0x787884[_0x10ee43(0x380)](_0xbc5360),_0x4aa52e(!![],'database\x20path\x20writable:\x20'+_0x3e3c24);}catch(_0x3f12c2){_0x4aa52e(![],_0x10ee43(0x346)+_0x3e3c24+_0x10ee43(0x46c)+_0x3f12c2[_0x10ee43(0x277)]+')');}const _0x379e07=await new Promise(_0x546136=>{const _0x4974ee=_0x10ee43,_0x1ada29=_0x3fa175[_0x4974ee(0x39d)]();_0x1ada29[_0x4974ee(0x372)](_0x4974ee(0x2bb),()=>_0x546136(![])),_0x1ada29[_0x4974ee(0x372)](_0x4974ee(0x1c1),()=>{const _0x1d9d76=_0x4974ee;_0x1ada29[_0x1d9d76(0x602)](),_0x546136(!![]);}),_0x1ada29[_0x4974ee(0x3bf)](_0x3616cf['port'],_0x4974ee(0x5f2));});_0x4aa52e(_0x379e07,_0x10ee43(0x1fc)+_0x3616cf['port']+'\x20'+(_0x379e07?_0x10ee43(0x4d0):'already\x20in\x20use'));const _0x576dea=_0x2deb77['resolve'](_0x10ee43(0x200));if(_0x787884[_0x10ee43(0x41e)](_0x576dea))try{JSON['parse'](_0x787884[_0x10ee43(0x5db)](_0x576dea,_0x10ee43(0x5aa))[_0x10ee43(0x343)](/^\uFEFF/,'')),_0x4aa52e(!![],_0x10ee43(0x1be)+_0x576dea);}catch(_0xae557f){_0x4aa52e(![],_0x10ee43(0x458)+_0xae557f[_0x10ee43(0x277)]);}else _0x4aa52e(!![],'no\x20.kdbconfig\x20(using\x20defaults)');if(_0x357dc7()){const _0x48febe=_0x21a6f9(_0x3616cf,{'shmbufNative':!![]});_0x4aa52e(!![],_0x10ee43(0x40b)+_0x48febe+'\x20worker'+(_0x48febe===0x1?'':'s')+')');}else _0x4aa52e(!![],_0x10ee43(0x25c));if(!_0x379e07)try{const _0x3295df=require(_0x10ee43(0x608)),_0x279560=new _0x3295df(_0x3e3c24,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x279560[_0x10ee43(0x492)]();try{await _0x279560[_0x10ee43(0x31b)][_0x10ee43(0x492)]({'reader':!![]});const _0x3eb9c5=_0x279560[_0x10ee43(0x31b)]['listNodes'](),_0x2c26f5=_0x3eb9c5[_0x10ee43(0x654)](_0x51e617=>_0x51e617[_0x10ee43(0x489)]!=null)['length'];_0x4aa52e(!![],'processes:\x20'+_0x3eb9c5[_0x10ee43(0x557)]+_0x10ee43(0x5c5)+(_0x3eb9c5[_0x10ee43(0x557)]===0x1?'':'es')+'\x20('+_0x2c26f5+_0x10ee43(0x50b));}finally{await _0x279560[_0x10ee43(0x602)]();}}catch{}console[_0x10ee43(0x4e4)](''),_0x47b2f9?console['log'](_0x10ee43(0x1ea)):(console[_0x10ee43(0x4e4)](_0x10ee43(0x5bc)),process[_0x10ee43(0x19f)](0x1));}async function _0x4243a0(){const _0x5627cf=_0x4d67c2,_0x510028=_0x2deb77[_0x5627cf(0x4a7)](_0x5627cf(0x200));!_0x787884[_0x5627cf(0x41e)](_0x510028)?(_0x787884[_0x5627cf(0x29f)](_0x510028,JSON[_0x5627cf(0x189)]({'port':0x2124,'path':_0x5627cf(0x4c4),'logLevel':_0x5627cf(0x2b9),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x5627cf(0x4e4)]('[okdb]\x20created\x20.kdbconfig')):console[_0x5627cf(0x4e4)](_0x5627cf(0x4d1));const _0x155168=_0x2deb77[_0x5627cf(0x4a7)](_0x5627cf(0x4c4));!_0x787884[_0x5627cf(0x41e)](_0x155168)?(_0x787884[_0x5627cf(0x4c1)](_0x155168,{'recursive':!![]}),console['log'](_0x5627cf(0x625))):console['log']('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console['log'](_0x5627cf(0x504));}async function _0x31c6c5(_0x2c210e){const _0x15b2ad=_0x4d67c2,_0x80c97f=_0x2deb77[_0x15b2ad(0x4a7)](_0x2c210e[_0x15b2ad(0x1e6)]);if(!_0x787884[_0x15b2ad(0x41e)](_0x80c97f)){console[_0x15b2ad(0x4e4)](_0x15b2ad(0x55b)+_0x80c97f+_0x15b2ad(0x3f0));return;}const _0x4ff225=require$$0$3,_0x4014e1=_0x4ff225[_0x15b2ad(0x28c)]({'input':process[_0x15b2ad(0x2dd)],'output':process['stdout']}),_0x23bc20=await new Promise(_0x161c55=>_0x4014e1['question'](_0x15b2ad(0x3e4)+_0x80c97f+_0x15b2ad(0x545),_0x161c55));_0x4014e1[_0x15b2ad(0x602)](),console['log']('');if(_0x23bc20[_0x15b2ad(0x1bd)]()[_0x15b2ad(0x635)]()!==_0x15b2ad(0x412)){console[_0x15b2ad(0x4e4)](_0x15b2ad(0x565));return;}let _0x48e0b3=null;try{_0x48e0b3=await _0x30904a(_0x80c97f,_0x2c210e,async _0x352057=>{const _0x10a092=_0x15b2ad,_0x573188=_0x352057['_systemEnv'],_0x89fcec=_0x573188?.['db']?.[_0x10a092(0x437)](_0x10a092(0x616))??null,_0xbc6fc8=[];if(_0x573188?.[_0x10a092(0x43e)]('~licenses'))for(const {key:_0x4c46a4,value:_0x528315}of _0x573188[_0x10a092(0x4f2)]('~licenses')){_0xbc6fc8[_0x10a092(0x228)]({'key':_0x4c46a4,'value':_0x528315});}return{'identity':_0x89fcec,'licenses':_0xbc6fc8};});}catch(_0x319bb3){console[_0x15b2ad(0x4e4)]('[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20('+_0x319bb3[_0x15b2ad(0x277)]+_0x15b2ad(0x1ce));}_0x787884[_0x15b2ad(0x5fa)](_0x80c97f,{'recursive':!![],'force':!![]}),console['log']('[okdb]\x20reset:\x20'+_0x80c97f+_0x15b2ad(0x4a8));if(_0x48e0b3&&(_0x48e0b3[_0x15b2ad(0x402)]||_0x48e0b3[_0x15b2ad(0x385)][_0x15b2ad(0x557)]>0x0))try{await _0x30904a(_0x80c97f,_0x2c210e,async _0x38a151=>{const _0x54449b=_0x15b2ad,_0x201d97=_0x38a151[_0x54449b(0x3b5)];_0x48e0b3['identity']&&_0x201d97['db']['putSync'](_0x54449b(0x616),_0x48e0b3[_0x54449b(0x402)]);if(_0x48e0b3[_0x54449b(0x385)][_0x54449b(0x557)]>0x0){if(!_0x201d97[_0x54449b(0x43e)](_0x54449b(0x3e6)))await _0x201d97[_0x54449b(0x54b)](_0x54449b(0x3e6));for(const {key:_0x565795,value:_0x1107f6}of _0x48e0b3[_0x54449b(0x385)]){await _0x201d97[_0x54449b(0x347)](_0x54449b(0x3e6),_0x565795,_0x1107f6);}}});const _0x18acea=[];if(_0x48e0b3[_0x15b2ad(0x402)])_0x18acea[_0x15b2ad(0x228)](_0x15b2ad(0x333));if(_0x48e0b3[_0x15b2ad(0x385)][_0x15b2ad(0x557)]>0x0)_0x18acea[_0x15b2ad(0x228)](_0x48e0b3[_0x15b2ad(0x385)][_0x15b2ad(0x557)]+_0x15b2ad(0x4cc));console[_0x15b2ad(0x4e4)]('[okdb]\x20preserved:\x20'+_0x18acea[_0x15b2ad(0x65d)](_0x15b2ad(0x51d)));}catch(_0x8312a9){console['log'](_0x15b2ad(0x2e0)+_0x8312a9[_0x15b2ad(0x277)]);}}async function _0x30904a(_0x3cf583,_0x30efc1,_0x4e00c2){const _0x2c9313=_0x4d67c2,_0x91eade=require$$5,_0x2dc1b6=new _0x91eade(_0x3cf583,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x5bc3e0(_0x30efc1)});await _0x2dc1b6[_0x2c9313(0x492)]();try{return await _0x4e00c2(_0x2dc1b6);}finally{await _0x2dc1b6[_0x2c9313(0x602)]();}}async function _0xe6238a(_0x567a68,_0xc38ebe){const _0x5559dc=_0x4d67c2,_0x4c73f6=require$$5,_0x4b071f=_0x2deb77[_0x5559dc(0x4a7)](_0xc38ebe[_0x5559dc(0x1e6)]);console[_0x5559dc(0x4e4)](_0x5559dc(0x1a2)+_0x4b071f+'…');const _0x422835=new _0x4c73f6(_0x4b071f,_0x5bc3e0(_0xc38ebe));await _0x422835[_0x5559dc(0x492)](),console[_0x5559dc(0x4e4)](_0x5559dc(0x2ff)+_0x567a68+'…');const {envs:_0x2ad7ac}=await _0x422835[_0x5559dc(0x3f5)][_0x5559dc(0x258)](_0x567a68);for(const _0x5e2fb9 of _0x2ad7ac){const _0x346280=_0x5e2fb9[_0x5559dc(0x225)]>0x0?_0x5559dc(0x46c)+(_0x5e2fb9[_0x5559dc(0x225)]/0x400/0x400)['toFixed'](0x2)+_0x5559dc(0x659)+(_0x5e2fb9[_0x5559dc(0x323)]/0x400/0x400)[_0x5559dc(0x2fb)](0x2)+'\x20MB)':'';console[_0x5559dc(0x4e4)](_0x5559dc(0x4ad)+_0x5e2fb9['name']+'\x20\x20→\x20\x20'+_0x5e2fb9[_0x5559dc(0x3fa)]+_0x346280);}await _0x422835[_0x5559dc(0x602)](),console['log'](_0x5559dc(0x542));}async function _0x1545a9(_0x6ba78a,_0x3961e5,_0x4a9804){const _0x477bc3=_0x4d67c2,_0x49eb20=require$$5,_0xb564f8=_0x2deb77[_0x477bc3(0x4a7)](_0x3961e5[_0x477bc3(0x1e6)]),_0x31f797=_0x4a9804[_0x477bc3(0x3c3)]??_0x477bc3(0x555),_0x2ad984=_0x4a9804[_0x477bc3(0x536)]?_0x4a9804['types']['split'](',')['map'](_0x4e2424=>_0x4e2424[_0x477bc3(0x1bd)]()):null;console['log'](_0x477bc3(0x1a2)+_0xb564f8+'…');const _0x1e4837=new _0x49eb20(_0xb564f8,_0x5bc3e0(_0x3961e5));await _0x1e4837['open'](),console[_0x477bc3(0x4e4)](_0x477bc3(0x2c4)+_0x31f797+_0x477bc3(0x271)+_0x6ba78a+'…');const _0x49314a=await _0x1e4837[_0x477bc3(0x3f5)]['exportToFile'](_0x6ba78a,{'envName':_0x31f797,'types':_0x2ad984,'includeChanges':!!_0x4a9804[_0x477bc3(0x1b4)]});console[_0x477bc3(0x4e4)](_0x477bc3(0x255)+_0x49314a['types']+'\x20\x20records='+_0x49314a[_0x477bc3(0x60e)]+_0x477bc3(0x303)+_0x49314a[_0x477bc3(0x1b4)]);if(_0x4a9804[_0x477bc3(0x638)]){const _0x1a13f7=_0x2deb77[_0x477bc3(0x65d)](_0x2deb77[_0x477bc3(0x4fd)](_0x6ba78a),_0x477bc3(0x638));process[_0x477bc3(0x3b2)]['write'](_0x477bc3(0x561));const {count:_0x4f2bf9,bytes:_0x401757}=await _0x1e4837['migrate'][_0x477bc3(0x4d9)](_0x1a13f7);console[_0x477bc3(0x4e4)](_0x477bc3(0x32b)+_0x1a13f7+_0x477bc3(0x46c)+_0x4f2bf9+'\x20file'+(_0x4f2bf9!==0x1?'s':'')+',\x20'+(_0x401757/0x400/0x400)[_0x477bc3(0x2fb)](0x2)+_0x477bc3(0x5d6));}await _0x1e4837[_0x477bc3(0x602)](),console['log'](_0x477bc3(0x1d5));}async function _0x1eee1b(_0x2d3660,_0x5c39a0,_0x1f8654){const _0xa01c47=_0x4d67c2,_0xeac900=require$$5,_0x3308eb=_0x2deb77[_0xa01c47(0x4a7)](_0x5c39a0[_0xa01c47(0x1e6)]),_0x5dd272=_0x1f8654['env']??null,_0x37108d=_0x1f8654[_0xa01c47(0x536)]?_0x1f8654[_0xa01c47(0x536)][_0xa01c47(0x28b)](',')['map'](_0x285e5f=>_0x285e5f[_0xa01c47(0x1bd)]()):null,_0x42e2ee=!!_0x1f8654[_0xa01c47(0x42c)];console[_0xa01c47(0x4e4)]('[okdb]\x20opening\x20'+_0x3308eb+'…');const _0x327087=new _0xeac900(_0x3308eb,_0x5bc3e0(_0x5c39a0));await _0x327087[_0xa01c47(0x492)](),console['log'](_0xa01c47(0x1dd)+_0x2d3660+'…');const _0x2c4e9a=await _0x327087[_0xa01c47(0x3f5)][_0xa01c47(0x56f)](_0x2d3660,{'envName':_0x5dd272,'types':_0x37108d,'dropExisting':_0x42e2ee,'includeChanges':!!_0x1f8654[_0xa01c47(0x1b4)],'onProgress':({type:_0x34a253,count:_0x5b573d})=>{const _0x5498ab=_0xa01c47;process['stdout']['write'](_0x5498ab(0x361)+_0x34a253+':\x20'+_0x5b573d+_0x5498ab(0x355));}});process[_0xa01c47(0x3b2)][_0xa01c47(0x23f)]('\x0a'),console[_0xa01c47(0x4e4)](_0xa01c47(0x487)+_0x2c4e9a[_0xa01c47(0x536)]+_0xa01c47(0x1df)+_0x2c4e9a[_0xa01c47(0x60e)]+'\x20\x20changes='+_0x2c4e9a[_0xa01c47(0x1b4)]);if(_0x1f8654[_0xa01c47(0x638)]){const _0x881ae6=_0x2deb77[_0xa01c47(0x65d)](_0x2deb77[_0xa01c47(0x4fd)](_0x2d3660),_0xa01c47(0x638));if(_0x787884[_0xa01c47(0x41e)](_0x881ae6)){const {imported:_0x34336c,skipped:_0x3a26fe}=await _0x327087['migrate'][_0xa01c47(0x5ef)](_0x881ae6);console['log'](_0xa01c47(0x21c)+_0x34336c+_0xa01c47(0x3ee)+_0x3a26fe);}}await _0x327087[_0xa01c47(0x602)](),console[_0xa01c47(0x4e4)]('[okdb]\x20import\x20complete');}async function _0x2829ea(_0x26f58f,_0x3d9616){const _0x432e9b=_0x4d67c2;_0x3d9616[_0x432e9b(0x3db)]&&!_0x3d9616['name']&&(console[_0x432e9b(0x2bb)]('[okdb]\x20error:\x20--password\x20requires\x20--name'),process[_0x432e9b(0x19f)](0x1));const _0x45d308=_0x3d9616['permissions']?_0x3d9616['permissions'][_0x432e9b(0x28b)](',')[_0x432e9b(0x3ad)](_0x43140f=>_0x43140f[_0x432e9b(0x1bd)]())[_0x432e9b(0x654)](Boolean):[];let _0x56e67c={};if(_0x3d9616[_0x432e9b(0x41d)])try{_0x56e67c=JSON[_0x432e9b(0x52e)](_0x3d9616[_0x432e9b(0x41d)]);if(typeof _0x56e67c!=='object'||Array[_0x432e9b(0x43a)](_0x56e67c)||_0x56e67c===null)throw new Error();}catch{console[_0x432e9b(0x2bb)](_0x432e9b(0x5f4)),process['exit'](0x1);}const _0x52608f=require$$5,{randomToken:_0x56542e,hashToken:_0x156564,hashPassword:_0x4d37e4}=requireOkdbAuthTokens(),_0x5996c2=require$$0$1,_0x5879ea=_0x2deb77[_0x432e9b(0x4a7)](_0x26f58f[_0x432e9b(0x1e6)]),_0x48cb04=new _0x52608f(_0x5879ea,_0x5bc3e0(_0x26f58f));await _0x48cb04[_0x432e9b(0x492)]();try{await _0x48cb04['auth']['_ensureTokensType']();if(_0x3d9616[_0x432e9b(0x278)]){const _0x469db5=await _0x48cb04[_0x432e9b(0x18a)][_0x432e9b(0x2ae)](_0x3d9616['name']);_0x469db5&&(console[_0x432e9b(0x2bb)](_0x432e9b(0x4de)+_0x3d9616[_0x432e9b(0x278)]+'\x22\x20already\x20exists'),process[_0x432e9b(0x19f)](0x1));}const _0x758f29=_0x56542e(0x20),_0x2ed173=_0x156564(_0x758f29),_0x143adc=_0x3d9616['password']?await _0x4d37e4(_0x3d9616[_0x432e9b(0x3db)]):null,_0x30ea42=_0x5996c2['randomUUID'](),_0x396798={'tokenHash':_0x2ed173,'name':_0x3d9616[_0x432e9b(0x278)]||null,'passwordHash':_0x143adc,'label':_0x3d9616[_0x432e9b(0x421)]||null,'permissions':_0x45d308,'grants':_0x56e67c,'createdAt':Date[_0x432e9b(0x517)](),'lastUsedAt':null},_0x3d244a=_0x3d9616[_0x432e9b(0x499)]?{'ttl':Number(_0x3d9616[_0x432e9b(0x499)])}:undefined;await _0x48cb04['_systemEnv'][_0x432e9b(0x347)](_0x432e9b(0x399),_0x30ea42,_0x396798,_0x3d244a),console[_0x432e9b(0x4e4)]('\x0a\x20\x20✓\x20Token\x20created'),console[_0x432e9b(0x4e4)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x30ea42),console[_0x432e9b(0x4e4)](_0x432e9b(0x2a3)+(_0x3d9616[_0x432e9b(0x278)]||_0x432e9b(0x2ea))),console['log'](_0x432e9b(0x239)+(_0x3d9616['label']||_0x432e9b(0x2ea))),console['log'](_0x432e9b(0x1d3)+(_0x45d308[_0x432e9b(0x65d)](',\x20')||'(none)')),console[_0x432e9b(0x4e4)](_0x432e9b(0x293)),console[_0x432e9b(0x4e4)](_0x432e9b(0x4a6)+_0x758f29+'\x0a');}finally{await _0x48cb04[_0x432e9b(0x602)]();}}async function _0x310821(_0x2add41){const _0x437353=_0x4d67c2,_0x2badda=require$$5,_0x5a8c26=_0x2deb77[_0x437353(0x4a7)](_0x2add41[_0x437353(0x1e6)]),_0x1bec0f=new _0x2badda(_0x5a8c26,_0x5bc3e0(_0x2add41));await _0x1bec0f[_0x437353(0x492)]();try{const _0x5595b3=_0x1bec0f[_0x437353(0x3b5)];if(!_0x5595b3||!_0x5595b3[_0x437353(0x43e)]('~tokens')){console[_0x437353(0x4e4)](_0x437353(0x509));return;}const _0x3b38a8=[];for(const {key:_0x31bade,value:_0x5a071c}of _0x5595b3[_0x437353(0x4f2)](_0x437353(0x399))){_0x3b38a8['push']({'id':_0x31bade,'name':_0x5a071c[_0x437353(0x278)]||_0x437353(0x2ea),'label':_0x5a071c[_0x437353(0x421)]||_0x437353(0x2ea),'permissions':Array['isArray'](_0x5a071c[_0x437353(0x5f7)])?_0x5a071c[_0x437353(0x5f7)][_0x437353(0x65d)](','):'','created':_0x5a071c['createdAt']?new Date(_0x5a071c[_0x437353(0x46b)])[_0x437353(0x1f1)]()[_0x437353(0x35c)](0x0,0xa):''});}if(_0x3b38a8[_0x437353(0x557)]===0x0){console['log'](_0x437353(0x509));return;}const _0x13cd2a=!process[_0x437353(0x3b2)][_0x437353(0x388)]||process[_0x437353(0x3b2)][_0x437353(0x388)]>=0x64,_0x5e0fdb=_0x13cd2a?0x24:0xa,_0x298d72=['ID'['padEnd'](_0x5e0fdb),_0x437353(0x40e)[_0x437353(0x486)](0x10),_0x437353(0x5e5)[_0x437353(0x486)](0x14),_0x437353(0x46f)['padEnd'](0x14),'CREATED'][_0x437353(0x65d)]('\x20\x20');console[_0x437353(0x4e4)]('\x0a'+_0x298d72),console[_0x437353(0x4e4)]('-'['repeat'](_0x298d72[_0x437353(0x557)]));for(const _0xc33d2d of _0x3b38a8){const _0x1869c6=_0x13cd2a?_0xc33d2d['id']:_0xc33d2d['id'][_0x437353(0x35c)](0x0,0x8)+'…';console[_0x437353(0x4e4)]([_0x1869c6[_0x437353(0x486)](_0x5e0fdb),_0xc33d2d[_0x437353(0x278)]['slice'](0x0,0x10)[_0x437353(0x486)](0x10),_0xc33d2d[_0x437353(0x421)][_0x437353(0x35c)](0x0,0x14)[_0x437353(0x486)](0x14),_0xc33d2d[_0x437353(0x5f7)][_0x437353(0x35c)](0x0,0x14)[_0x437353(0x486)](0x14),_0xc33d2d[_0x437353(0x48b)]][_0x437353(0x65d)]('\x20\x20'));}console[_0x437353(0x4e4)]('');}finally{await _0x1bec0f[_0x437353(0x602)]();}}async function _0xef103c(_0x21a1ab,_0x580054){const _0x5d06a5=_0x4d67c2;!_0x21a1ab&&(console[_0x5d06a5(0x2bb)](_0x5d06a5(0x21f)),process['exit'](0x1));const _0x516485=require$$5,_0x4f0877=_0x2deb77[_0x5d06a5(0x4a7)](_0x580054[_0x5d06a5(0x1e6)]),_0x515d5e=new _0x516485(_0x4f0877,_0x5bc3e0(_0x580054));await _0x515d5e['open']();try{const _0x4b973b=_0x515d5e[_0x5d06a5(0x3b5)];(!_0x4b973b||!_0x4b973b[_0x5d06a5(0x43e)](_0x5d06a5(0x399)))&&(console[_0x5d06a5(0x2bb)](_0x5d06a5(0x36a)+_0x21a1ab+'\x22'),process[_0x5d06a5(0x19f)](0x1));let _0x4ab6ef=null,_0x34454e=null;const _0x47d24f=_0x4b973b[_0x5d06a5(0x437)](_0x5d06a5(0x399),_0x21a1ab);if(_0x47d24f)_0x4ab6ef=_0x21a1ab,_0x34454e=_0x47d24f;else{const _0x24edc8=[];for(const {key:_0x2ed181,value:_0x367f02}of _0x4b973b[_0x5d06a5(0x4f2)](_0x5d06a5(0x399))){if(_0x2ed181['startsWith'](_0x21a1ab))_0x24edc8[_0x5d06a5(0x228)]({'key':_0x2ed181,'value':_0x367f02});}_0x24edc8[_0x5d06a5(0x557)]===0x0&&(console[_0x5d06a5(0x2bb)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x21a1ab+'\x22'),process[_0x5d06a5(0x19f)](0x1));if(_0x24edc8[_0x5d06a5(0x557)]>0x1){console[_0x5d06a5(0x2bb)](_0x5d06a5(0x1d9)+_0x21a1ab+_0x5d06a5(0x3d4)+_0x24edc8['length']+_0x5d06a5(0x3ea));for(const _0x48f95e of _0x24edc8){console[_0x5d06a5(0x2bb)]('\x20\x20'+_0x48f95e['key']+_0x5d06a5(0x639)+(_0x48f95e[_0x5d06a5(0x558)][_0x5d06a5(0x278)]||_0x5d06a5(0x2ea))+')');}process['exit'](0x1);}_0x4ab6ef=_0x24edc8[0x0][_0x5d06a5(0x245)],_0x34454e=_0x24edc8[0x0][_0x5d06a5(0x558)];}await _0x4b973b[_0x5d06a5(0x1d2)](_0x5d06a5(0x399),_0x4ab6ef),console[_0x5d06a5(0x4e4)](_0x5d06a5(0x5d8)+_0x4ab6ef+_0x5d06a5(0x639)+(_0x34454e[_0x5d06a5(0x278)]||'(unset)')+',\x20label:\x20'+(_0x34454e[_0x5d06a5(0x421)]||_0x5d06a5(0x2ea))+')');}finally{await _0x515d5e[_0x5d06a5(0x602)]();}}function _0x33f848(_0x46ab96,_0x6a09bf){const _0x502eef=_0x4d67c2;if(!_0x46ab96[_0x502eef(0x538)])return _0x502eef(0x508);const _0x203c4f=_0x46ab96[_0x502eef(0x362)];if(!_0x203c4f)return _0x502eef(0x494);if(_0x6a09bf>_0x203c4f)return _0x502eef(0x352);return _0x502eef(0x494);}function _0x2856ab(_0x49de15){const _0x316292=_0x4d67c2;if(!_0x49de15||typeof _0x49de15!==_0x316292(0x500))return'';const _0x2dd302=Object['entries'](_0x49de15)[_0x316292(0x654)](([,_0x3e1370])=>_0x3e1370)['map'](([_0x50aa41])=>_0x50aa41);if(_0x2dd302['length']===0x0)return _0x316292(0x242);if(_0x2dd302[_0x316292(0x557)]<=0x3)return _0x2dd302['join']('\x20');return _0x2dd302['slice'](0x0,0x3)[_0x316292(0x65d)]('\x20')+('\x20+'+(_0x2dd302[_0x316292(0x557)]-0x3));}async function _0x1b94f2(_0x1c30ae){const _0x465617=_0x4d67c2,_0x565f41=require$$5,_0x3491ca=requireOkdbLicenseCodec(),{_C:_0x4be87a}=requireOkdbLicense(),_0xa231b7=_0x2deb77[_0x465617(0x4a7)](_0x1c30ae['dbPath']),_0x3dd96b=new _0x565f41(_0xa231b7,_0x5bc3e0(_0x1c30ae));await _0x3dd96b[_0x465617(0x492)]();try{const _0x14aa1c=_0x3dd96b[_0x465617(0x3b5)],_0x446521=_0x14aa1c?.['db']?.[_0x465617(0x437)]?.(_0x465617(0x34c))??0x0,_0x5ef0c8=[..._0x3dd96b[_0x465617(0x2a1)][_0x465617(0x1bc)]()][_0x465617(0x654)](_0x29bd5e=>!_0x29bd5e['startsWith']('~'))[_0x465617(0x557)],_0x4be15c=_0x3dd96b[_0x465617(0x3b1)]?.[_0x465617(0x2ac)];if(_0x4be15c){const _0x890c19=_0x4be15c['_isFree']===!![],_0x2e0b25=_0x890c19?_0x465617(0x2a8):_0x3dd96b['_license'][_0x465617(0x494)]?.[_0x465617(0x607)]||_0x465617(0x43c);console[_0x465617(0x4e4)](''),console[_0x465617(0x4e4)](_0x465617(0x4f8)+_0x2e0b25);const _0x37c24c=_0x4be15c[_0x465617(0x2c3)]||{};if(_0x37c24c[_0x465617(0x1a1)]){const _0x4d6d8c=Math['round'](_0x446521/_0x37c24c[_0x465617(0x1a1)]*0x64);console[_0x465617(0x4e4)](_0x465617(0x512)+_0x446521[_0x465617(0x367)]()+_0x465617(0x661)+_0x37c24c[_0x465617(0x1a1)][_0x465617(0x367)]()+_0x465617(0x46c)+_0x4d6d8c+'%)');}else console['log']('\x20\x20Writes:\x20\x20'+_0x446521[_0x465617(0x367)]());_0x37c24c['envs']?console[_0x465617(0x4e4)](_0x465617(0x476)+_0x5ef0c8+_0x465617(0x661)+_0x37c24c['envs']):console['log']('\x20\x20Envs:\x20\x20\x20\x20'+_0x5ef0c8),_0x4be87a?.[_0x465617(0x520)]&&console[_0x465617(0x4e4)](_0x465617(0x1c7)+_0x4be87a['PUB_FINGERPRINT']+_0x465617(0x341));}if(!_0x14aa1c||!_0x14aa1c[_0x465617(0x43e)](_0x465617(0x3e6))){console['log'](''),console[_0x465617(0x4e4)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console['log']('');return;}const _0x5048d5=[],_0x1b8aa6=Date[_0x465617(0x517)](),_0x404031=_0x3dd96b['id'],_0x396e34=_0x465617(0x281);for(const {key:_0xdccfa8,value:_0x19a86f}of _0x14aa1c[_0x465617(0x4f2)](_0x465617(0x3e6))){const _0x2d7928=_0x19a86f[_0x465617(0x52a)]?Buffer[_0x465617(0x57e)](_0x19a86f['_licenseHash'],_0x465617(0x24c)):Buffer[_0x465617(0x563)](0x8);let _0x54c8e7='';try{_0x54c8e7=_0x3491ca['derivePin'](_0x404031,_0x2d7928,_0x396e34)[_0x465617(0x2e2)];}catch{}_0x5048d5[_0x465617(0x228)]({'id':_0xdccfa8,'licensee':_0x19a86f['licensee']||'','expires':_0x19a86f[_0x465617(0x362)]?new Date(_0x19a86f[_0x465617(0x362)])[_0x465617(0x1f1)]()[_0x465617(0x35c)](0x0,0xa):'','features':_0x2856ab(_0x19a86f[_0x465617(0x1a4)]),'pin':_0x54c8e7,'status':_0x33f848(_0x19a86f,_0x1b8aa6)});}if(_0x5048d5[_0x465617(0x557)]===0x0){console[_0x465617(0x4e4)](''),console['log'](_0x465617(0x58b)),console[_0x465617(0x4e4)]('');return;}const _0x5b4f7d=['\x20\x20'+'ID'['padEnd'](0xe),_0x465617(0x532)[_0x465617(0x486)](0xe),'EXPIRES'[_0x465617(0x486)](0xc),_0x465617(0x35e)['padEnd'](0x1e),_0x465617(0x45d)[_0x465617(0x486)](0xa),_0x465617(0x477)][_0x465617(0x65d)]('\x20');console[_0x465617(0x4e4)]('\x0a'+_0x5b4f7d);for(const _0x2efe55 of _0x5048d5){const _0x5df3b3=_0x2efe55['id'][_0x465617(0x35c)](0x0,0x8)+'…';console['log'](['\x20\x20'+_0x5df3b3[_0x465617(0x486)](0xe),_0x2efe55[_0x465617(0x607)][_0x465617(0x35c)](0x0,0xe)[_0x465617(0x486)](0xe),_0x2efe55['expires'][_0x465617(0x486)](0xc),_0x2efe55[_0x465617(0x1a4)][_0x465617(0x35c)](0x0,0x1e)[_0x465617(0x486)](0x1e),_0x2efe55[_0x465617(0x2e2)][_0x465617(0x486)](0xa),_0x2efe55[_0x465617(0x3c4)]][_0x465617(0x65d)]('\x20'));}console[_0x465617(0x4e4)]('');}finally{await _0x3dd96b[_0x465617(0x602)]();}}async function _0x528167(_0x31bbb4,_0x47246d){const _0x1a5916=_0x4d67c2,_0x47baeb=require$$5,_0x3afb7d=requireOkdbLicenseCodec();let _0x4db2ff=_0x31bbb4;(_0x3afb7d[_0x1a5916(0x4a1)](_0x31bbb4)===_0x1a5916(0x32d)||_0x787884['existsSync'](_0x31bbb4)&&_0x787884[_0x1a5916(0x216)](_0x31bbb4)[_0x1a5916(0x389)]())&&(_0x4db2ff=_0x787884[_0x1a5916(0x5db)](_0x31bbb4,'utf8')['trim']());const _0x33224b=_0x2deb77[_0x1a5916(0x4a7)](_0x47246d[_0x1a5916(0x1e6)]),_0x1191a2=new _0x47baeb(_0x33224b,_0x5bc3e0(_0x47246d));await _0x1191a2['open']();try{!_0x1191a2[_0x1a5916(0x3b1)]&&(console['error'](_0x1a5916(0x4c9)),process[_0x1a5916(0x19f)](0x1));let _0x3683e6;try{_0x3683e6=await _0x1191a2[_0x1a5916(0x3b1)][_0x1a5916(0x65e)](_0x4db2ff);}catch(_0x13d642){console[_0x1a5916(0x2bb)](_0x1a5916(0x44a)+_0x13d642['message']),process[_0x1a5916(0x19f)](0x1);}const _0xaa667b=_0x1191a2['_license']['getPins'](),_0x26059c=_0xaa667b['find'](_0x5430f6=>_0x5430f6['licenseId']===_0x3683e6['id'])?.[_0x1a5916(0x2e2)]||'',_0x3b6e53=Object[_0x1a5916(0x40c)](_0x3683e6[_0x1a5916(0x1a4)]||{})[_0x1a5916(0x654)](([,_0x34c030])=>_0x34c030)[_0x1a5916(0x3ad)](([_0x4742a7])=>_0x4742a7),_0x5858d7=_0x3683e6[_0x1a5916(0x2c3)]||{},_0x58d5eb=[_0x5858d7[_0x1a5916(0x22e)]?'envs='+_0x5858d7[_0x1a5916(0x22e)]:null,_0x5858d7[_0x1a5916(0x479)]?'types/env='+_0x5858d7[_0x1a5916(0x479)]:null,_0x5858d7['syncPeers']?'peers='+_0x5858d7[_0x1a5916(0x1ff)]:null,_0x5858d7['maxWrites']?_0x1a5916(0x305)+_0x5858d7[_0x1a5916(0x1a1)]['toLocaleString']():null][_0x1a5916(0x654)](Boolean)[_0x1a5916(0x65d)]('\x20\x20'),_0x4f8808=_0x3683e6[_0x1a5916(0x2b1)]===_0x3afb7d['LICENSE_TYPE_OPEN'];console[_0x1a5916(0x4e4)](_0x1a5916(0x603)),console[_0x1a5916(0x4e4)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3683e6['id']),console[_0x1a5916(0x4e4)](_0x1a5916(0x612)+_0x3683e6['licensee']),console[_0x1a5916(0x4e4)](_0x1a5916(0x2f5)+new Date(_0x3683e6[_0x1a5916(0x362)])[_0x1a5916(0x1f1)]()[_0x1a5916(0x35c)](0x0,0xa)),console[_0x1a5916(0x4e4)]('\x20\x20\x20\x20features:\x20\x20'+(_0x3b6e53[_0x1a5916(0x65d)](',\x20')||_0x1a5916(0x242)));if(_0x58d5eb)console[_0x1a5916(0x4e4)](_0x1a5916(0x266)+_0x58d5eb);_0x4f8808?(console[_0x1a5916(0x4e4)](_0x1a5916(0x336)),console[_0x1a5916(0x4e4)]('')):(console[_0x1a5916(0x4e4)](_0x1a5916(0x1bf)+_0x26059c),console[_0x1a5916(0x4e4)](_0x1a5916(0x1c2)),console[_0x1a5916(0x4e4)](''),console[_0x1a5916(0x4e4)](_0x1a5916(0x319)),console[_0x1a5916(0x4e4)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x26059c+_0x1a5916(0x30e)),console[_0x1a5916(0x4e4)](_0x1a5916(0x644)),console['log'](_0x1a5916(0x4fe)),console[_0x1a5916(0x4e4)](''));}finally{await _0x1191a2[_0x1a5916(0x602)]();}}async function _0x2edf5f(_0x4ad712,_0xf2674a){const _0x202651=_0x4d67c2,_0x8f3ac7=require$$5,_0x3b68be=_0x2deb77[_0x202651(0x4a7)](_0xf2674a[_0x202651(0x1e6)]),_0x450b1c=new _0x8f3ac7(_0x3b68be,_0x5bc3e0(_0xf2674a));await _0x450b1c['open']();try{!_0x450b1c[_0x202651(0x3b1)]&&(console['error'](_0x202651(0x4c9)),process['exit'](0x1));let _0x23a210;try{_0x23a210=await _0x450b1c[_0x202651(0x3b1)][_0x202651(0x633)](_0x4ad712[_0x202651(0x1bd)]());}catch(_0x347d95){console['error'](_0x202651(0x44a)+_0x347d95[_0x202651(0x277)]),console[_0x202651(0x2bb)](''),console[_0x202651(0x2bb)](_0x202651(0x262)),console[_0x202651(0x2bb)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0x202651(0x2bb)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x202651(0x2bb)](_0x202651(0x426)),console['error'](''),process[_0x202651(0x19f)](0x1);}console[_0x202651(0x4e4)](_0x202651(0x47b)),console[_0x202651(0x4e4)](_0x202651(0x491)+_0x23a210['id']),console[_0x202651(0x4e4)](_0x202651(0x612)+_0x23a210[_0x202651(0x607)]),console[_0x202651(0x4e4)](_0x202651(0x2f5)+new Date(_0x23a210['expiresAt'])[_0x202651(0x1f1)]()[_0x202651(0x35c)](0x0,0xa)),console[_0x202651(0x4e4)](_0x202651(0x205)),console[_0x202651(0x4e4)]('');}finally{await _0x450b1c['close']();}}async function _0x5b668a(_0x55a6ee,_0x162f4b){const _0x341c9d=_0x4d67c2;!_0x55a6ee&&(console[_0x341c9d(0x2bb)](_0x341c9d(0x344)),process[_0x341c9d(0x19f)](0x1));const _0x1c64a4=require$$5,_0x1e184d=requireOkdbLicenseCodec(),_0xb9eeb2=_0x2deb77['resolve'](_0x162f4b['dbPath']),_0x3a0496=new _0x1c64a4(_0xb9eeb2,_0x5bc3e0(_0x162f4b));await _0x3a0496[_0x341c9d(0x492)]();try{const _0x5a7638=_0x3a0496[_0x341c9d(0x3b5)];(!_0x5a7638||!_0x5a7638[_0x341c9d(0x43e)]('~licenses'))&&(console[_0x341c9d(0x2bb)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x55a6ee+'\x22'),process['exit'](0x1));let _0x4ab243=null,_0x592297=null;const _0x58e302=_0x5a7638[_0x341c9d(0x437)](_0x341c9d(0x3e6),_0x55a6ee);if(_0x58e302)_0x4ab243=_0x55a6ee,_0x592297=_0x58e302;else{const _0x49c03a=[];for(const {key:_0x4d38a8,value:_0x55c398}of _0x5a7638[_0x341c9d(0x4f2)]('~licenses')){if(_0x4d38a8[_0x341c9d(0x1af)](_0x55a6ee))_0x49c03a[_0x341c9d(0x228)]({'key':_0x4d38a8,'value':_0x55c398});}_0x49c03a['length']===0x0&&(console[_0x341c9d(0x2bb)](_0x341c9d(0x2b6)+_0x55a6ee+'\x22'),process[_0x341c9d(0x19f)](0x1)),_0x49c03a[_0x341c9d(0x557)]>0x1&&(console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x55a6ee+'\x22\x20matches\x20'+_0x49c03a[_0x341c9d(0x557)]+_0x341c9d(0x1b2)),process[_0x341c9d(0x19f)](0x1)),_0x4ab243=_0x49c03a[0x0][_0x341c9d(0x245)],_0x592297=_0x49c03a[0x0][_0x341c9d(0x558)];}const _0x147cc4=Date[_0x341c9d(0x517)](),_0xfb024f=_0x33f848(_0x592297,_0x147cc4),_0x4d63e0=_0x3a0496['id'],_0x2bf818=_0x341c9d(0x281);let _0xe6b04='';try{const _0x1364ee=Buffer[_0x341c9d(0x57e)](_0x592297[_0x341c9d(0x52a)],_0x341c9d(0x24c));_0xe6b04=_0x1e184d[_0x341c9d(0x26b)](_0x4d63e0,_0x1364ee,_0x2bf818)[_0x341c9d(0x2e2)];}catch{}const _0x4a4a35=_0x592297[_0x341c9d(0x1a4)]?Object[_0x341c9d(0x40c)](_0x592297[_0x341c9d(0x1a4)])[_0x341c9d(0x654)](([,_0x3a5721])=>_0x3a5721)['map'](([_0x587d06])=>_0x587d06):[],_0x17f568=_0x592297[_0x341c9d(0x2c3)]||{},_0x500bdd=_0x5a7638?.['db']?.[_0x341c9d(0x437)]?.(_0x341c9d(0x34c))??0x0,_0x491567=[..._0x3a0496[_0x341c9d(0x2a1)]['keys']()][_0x341c9d(0x654)](_0x45242f=>!_0x45242f['startsWith']('~'))[_0x341c9d(0x557)];console[_0x341c9d(0x4e4)](_0x341c9d(0x578)),console[_0x341c9d(0x4e4)](_0x341c9d(0x491)+_0x4ab243),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+(_0x592297[_0x341c9d(0x607)]||'')),console[_0x341c9d(0x4e4)](_0x341c9d(0x2f5)+(_0x592297[_0x341c9d(0x362)]?new Date(_0x592297[_0x341c9d(0x362)])[_0x341c9d(0x1f1)]()[_0x341c9d(0x35c)](0x0,0xa):'')),console[_0x341c9d(0x4e4)](_0x341c9d(0x1a3)+(_0x4a4a35[_0x341c9d(0x65d)](',\x20')||'(none)')),console[_0x341c9d(0x4e4)](_0x341c9d(0x1bf)+_0xe6b04),console[_0x341c9d(0x4e4)](_0x341c9d(0x61b)+_0xfb024f),console['log']('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x592297[_0x341c9d(0x445)])[_0x341c9d(0x1f1)]());if(_0xfb024f===_0x341c9d(0x494)){console['log'](''),console[_0x341c9d(0x4e4)](_0x341c9d(0x4ab));if(_0x17f568[_0x341c9d(0x1a1)]){const _0x4816db=Math['round'](_0x500bdd/_0x17f568[_0x341c9d(0x1a1)]*0x64);console[_0x341c9d(0x4e4)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x500bdd['toLocaleString']()+_0x341c9d(0x661)+_0x17f568[_0x341c9d(0x1a1)]['toLocaleString']()+_0x341c9d(0x46c)+_0x4816db+'%)');}else console[_0x341c9d(0x4e4)](_0x341c9d(0x357)+_0x500bdd['toLocaleString']()+_0x341c9d(0x614));_0x17f568[_0x341c9d(0x22e)]?console[_0x341c9d(0x4e4)](_0x341c9d(0x1d0)+_0x491567+_0x341c9d(0x661)+_0x17f568[_0x341c9d(0x22e)]):console[_0x341c9d(0x4e4)](_0x341c9d(0x1d0)+_0x491567+_0x341c9d(0x614));}console[_0x341c9d(0x4e4)]('');}finally{await _0x3a0496[_0x341c9d(0x602)]();}}async function _0x498e35(_0x56e9d5,_0x4e2c93){const _0x2acb55=_0x4d67c2;!_0x56e9d5&&(console['error'](_0x2acb55(0x560)),process[_0x2acb55(0x19f)](0x1));const _0xd71ce5=require$$5,_0x2261dd=_0x2deb77['resolve'](_0x4e2c93[_0x2acb55(0x1e6)]),_0x54c3b7=new _0xd71ce5(_0x2261dd,_0x5bc3e0(_0x4e2c93));await _0x54c3b7[_0x2acb55(0x492)]();try{const _0x250bee=_0x54c3b7[_0x2acb55(0x3b5)];(!_0x250bee||!_0x250bee[_0x2acb55(0x43e)]('~licenses'))&&(console[_0x2acb55(0x2bb)](_0x2acb55(0x2b6)+_0x56e9d5+'\x22'),process[_0x2acb55(0x19f)](0x1));let _0x40feb6=null,_0x58c5c2=null;const _0x5a66e3=_0x250bee[_0x2acb55(0x437)]('~licenses',_0x56e9d5);if(_0x5a66e3)_0x40feb6=_0x56e9d5,_0x58c5c2=_0x5a66e3;else{const _0xae2b06=[];for(const {key:_0x20336e,value:_0x4cc281}of _0x250bee[_0x2acb55(0x4f2)]('~licenses')){if(_0x20336e[_0x2acb55(0x1af)](_0x56e9d5))_0xae2b06[_0x2acb55(0x228)]({'key':_0x20336e,'value':_0x4cc281});}_0xae2b06[_0x2acb55(0x557)]===0x0&&(console['error'](_0x2acb55(0x2b6)+_0x56e9d5+'\x22'),process['exit'](0x1)),_0xae2b06['length']>0x1&&(console['error'](_0x2acb55(0x1d9)+_0x56e9d5+_0x2acb55(0x3d4)+_0xae2b06[_0x2acb55(0x557)]+_0x2acb55(0x1b2)),process[_0x2acb55(0x19f)](0x1)),_0x40feb6=_0xae2b06[0x0]['key'],_0x58c5c2=_0xae2b06[0x0][_0x2acb55(0x558)];}await _0x250bee[_0x2acb55(0x1d2)](_0x2acb55(0x3e6),_0x40feb6),console['log'](_0x2acb55(0x596)+_0x40feb6+_0x2acb55(0x222)+(_0x58c5c2[_0x2acb55(0x607)]||'(unset)')+')');}finally{await _0x54c3b7[_0x2acb55(0x602)]();}}async function _0x3bd1f2(_0x2ba11c,_0x7e5c4e,_0x48d56c){const _0x13ecc0=_0x4d67c2;!_0x2ba11c&&(console[_0x13ecc0(0x2bb)](_0x13ecc0(0x650)),process[_0x13ecc0(0x19f)](0x1));!_0x48d56c[_0x13ecc0(0x5d9)]&&!(_0x48d56c[_0x13ecc0(0x573)]&&_0x48d56c['password'])&&(console[_0x13ecc0(0x2bb)](_0x13ecc0(0x5bb)),process[_0x13ecc0(0x19f)](0x1));const _0x7b3dfa=_0x48d56c[_0x13ecc0(0x34d)]||_0x7e5c4e[_0x13ecc0(0x3a4)]?.[_0x13ecc0(0x241)];!_0x7b3dfa&&(console['error'](_0x13ecc0(0x406)+'\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a'+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process[_0x13ecc0(0x19f)](0x1));const _0x1a4c13=require$$5,_0xf2b86b=new _0x1a4c13(_0x7e5c4e[_0x13ecc0(0x1e6)],{'sync':{'address':_0x7b3dfa,'auto_reconcile':![]}});await _0xf2b86b['open']();try{const _0x38e4b3=_0xf2b86b[_0x13ecc0(0x3b5)];if(_0x38e4b3&&_0x38e4b3['hasType'](_0x13ecc0(0x399))){let _0x30ef3f=![];for(const _0x32ac73 of _0x38e4b3[_0x13ecc0(0x4f2)](_0x13ecc0(0x399))){_0x30ef3f=!![];break;}_0x30ef3f&&console[_0x13ecc0(0x4e4)](_0x13ecc0(0x3b4)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console[_0x13ecc0(0x4e4)](_0x13ecc0(0x20f)+_0x2ba11c+'…'),await _0xf2b86b[_0x13ecc0(0x3a4)]['join'](_0x2ba11c['replace'](/\/+$/,''),{'token':_0x48d56c[_0x13ecc0(0x5d9)],'username':_0x48d56c[_0x13ecc0(0x573)],'password':_0x48d56c[_0x13ecc0(0x3db)]}),console[_0x13ecc0(0x4e4)](_0x13ecc0(0x3f8)),console['log'](_0x13ecc0(0x2eb));}finally{await _0xf2b86b[_0x13ecc0(0x602)]();}}async function _0x4e1b18(){const _0x485ad4=_0x4d67c2,_0x3b4f6a=Date[_0x485ad4(0x517)](),_0x41cbe1=_0x2b3496(process[_0x485ad4(0x535)]),_0x4544be=_0x219e3d(_0x41cbe1),_0x273a5b=_0x2deb77[_0x485ad4(0x4a7)](_0x4544be[_0x485ad4(0x1e6)]);!_0x4544be[_0x485ad4(0x59a)]&&!process[_0x485ad4(0x2dd)]['isTTY']&&(_0x4544be[_0x485ad4(0x59a)]=!![]);const _0x54a695=require$$5,{start:_0x138f4a,colorLog:_0xf6c780}=requireOkdbShell(),_0x3ec9f6=require$$1$2,_0x2b9889={..._0x4544be[_0x485ad4(0x245)]?{'encryptionKey':_0x4544be['key']}:{},..._0x4544be[_0x485ad4(0x448)]?{'admin':![]}:_0x31da5e(_0x4544be[_0x485ad4(0x2c6)])?{'admin':_0x4544be[_0x485ad4(0x2c6)]}:{},..._0x31da5e(_0x4544be[_0x485ad4(0x57c)])?{'api':_0x4544be[_0x485ad4(0x57c)]}:{},..._0x31da5e(_0x4544be['auth'])?{'auth':_0x4544be['auth']}:{},..._0x31da5e(_0x4544be[_0x485ad4(0x28e)])?{'mcp':_0x4544be[_0x485ad4(0x28e)]}:{},..._0x4544be[_0x485ad4(0x4df)]!==![]?{'timeMachine':_0x4544be[_0x485ad4(0x4df)]}:{}},_0x5ae018=_0x21a6f9(_0x4544be);if(!_0x3ec9f6[_0x485ad4(0x3de)]){const _0x431b21=_0x357dc7(),_0x404863=_0x4544be[_0x485ad4(0x497)]?_0x485ad4(0x559):_0x4544be[_0x485ad4(0x5ee)]!=null&&_0x4544be[_0x485ad4(0x5ee)]!==''?_0x485ad4(0x315):process.env.OKDB_HTTP_WORKERS?_0x485ad4(0x2a0):_0x4544be[_0x485ad4(0x58a)]?.[_0x485ad4(0x5e3)]!=null?_0x485ad4(0x23b):_0x485ad4(0x251)+Math[_0x485ad4(0x5b4)](0x1,require$$0['cpus']()[_0x485ad4(0x557)]-0x1);process[_0x485ad4(0x3b2)][_0x485ad4(0x23f)](_0x485ad4(0x48e)+_0x5ae018+'\x20('+_0x404863+(!_0x431b21?_0x485ad4(0x2e4):'')+')\x0a');}if(_0x3ec9f6['isWorker']){const _0x4a645c={..._0x2b9889},_0x3a2194=new _0x54a695(_0x273a5b,_0x4a645c);_0x3a2194['log']['detachConsole']?.();const _0x222b96=process.env.OKDB_CLUSTER_SLOT??'?',_0x5b86e8={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x29f92a=_0x5b86e8[_0x4544be['logLevel']]??_0x5b86e8['info'];_0x3a2194['log'][_0x485ad4(0x2ab)](_0x14dc2e=>{const _0x15a044=_0x485ad4;if((_0x5b86e8[_0x14dc2e[_0x15a044(0x2d0)]]??0x1)<_0x29f92a)return;try{process[_0x15a044(0x5c9)]?.({'__okdbCluster':_0x15a044(0x4e4),'slot':_0x222b96,'pid':process['pid'],'entry':_0x14dc2e});}catch{}}),await _0x3a2194[_0x485ad4(0x492)]();const {attachWorkerCluster:_0x288c50}=requireOkdbCluster();_0x288c50(_0x3a2194),await _0x51c8b2(_0x3a2194,_0x4544be['port']);return;}if(_0x5ae018>0x1){const {runClustered:_0x260255}=requireOkdbCluster(),_0x3941f7=new _0x54a695(_0x273a5b,{..._0x2b9889,'engines':![],'processors':![],'compaction':![]});await _0x3941f7[_0x485ad4(0x492)]();const _0x3f6b3a=async()=>{const _0x297d7f=_0x485ad4,_0x3bdf41=new _0x54a695(_0x273a5b,{..._0x2b9889});return await _0x3bdf41[_0x297d7f(0x492)](),_0x3bdf41;},_0x1e50f0=_0x260255({'workers':_0x5ae018,'makeOkdb':_0x3f6b3a,'port':_0x4544be['port'],'primaryOkdb':_0x3941f7});let _0x16d8e7=![];async function _0x48271a(_0x3ce322){const _0x13cc1b=_0x485ad4;_0x16d8e7&&(process[_0x13cc1b(0x298)][_0x13cc1b(0x23f)](_0x13cc1b(0x36b)),process[_0x13cc1b(0x19f)](0x82));_0x16d8e7=!![],process[_0x13cc1b(0x298)][_0x13cc1b(0x23f)](_0x13cc1b(0x46d)+(_0x3ce322||_0x13cc1b(0x196))+_0x13cc1b(0x295));const _0x4134c3=setTimeout(()=>{const _0x47f347=_0x13cc1b;process[_0x47f347(0x298)][_0x47f347(0x23f)]('[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a'),process[_0x47f347(0x19f)](0x0);},0xbb8);_0x4134c3[_0x13cc1b(0x36d)]?.();try{await _0x1e50f0[_0x13cc1b(0x602)]();}catch(_0x25ae8c){process[_0x13cc1b(0x298)][_0x13cc1b(0x23f)](_0x13cc1b(0x234)+(_0x25ae8c?.[_0x13cc1b(0x277)]??_0x25ae8c)+'\x0a');}try{await _0x3941f7[_0x13cc1b(0x602)]();}catch(_0x18163a){process[_0x13cc1b(0x298)][_0x13cc1b(0x23f)](_0x13cc1b(0x2ce)+(_0x18163a?.[_0x13cc1b(0x277)]??_0x18163a)+'\x0a');}process[_0x13cc1b(0x19f)](0x0);}_0x4544be[_0x485ad4(0x5c6)]=_0x5ae018;if(!_0x4544be[_0x485ad4(0x59a)]){_0x3941f7[_0x485ad4(0x4e4)][_0x485ad4(0x3f4)]?.(),_0x13ed63(_0x3941f7[_0x485ad4(0x18a)]?.[_0x485ad4(0x4f7)]?.()??[]),await _0x138f4a(_0x3941f7,_0x4544be);return;}process[_0x485ad4(0x3b2)][_0x485ad4(0x23f)](_0x485ad4(0x5dc)+process[_0x485ad4(0x18e)]+_0x485ad4(0x3eb)+_0x5ae018+'\x20'+('passive\x20HTTP\x20worker(s)\x20serving\x20:'+_0x4544be['port']+'\x0a')),console[_0x485ad4(0x4e4)](''),console[_0x485ad4(0x4e4)](_0x485ad4(0x3fc)),console[_0x485ad4(0x4e4)](_0x485ad4(0x581)+_0x4544be['port']+_0x485ad4(0x46c)+_0x5ae018+_0x485ad4(0x219)),console[_0x485ad4(0x4e4)]('\x20\x20\x20\x20path:\x20\x20\x20\x20'+_0x273a5b),console[_0x485ad4(0x4e4)](_0x485ad4(0x484)+_0x3941f7['id']),console[_0x485ad4(0x4e4)](_0x485ad4(0x297)+_0x4544be['port']+_0x485ad4(0x43b));!_0x4544be['noAdmin']&&console[_0x485ad4(0x4e4)]('\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:'+_0x4544be[_0x485ad4(0x4da)]+_0x485ad4(0x5e7));console[_0x485ad4(0x4e4)](''),_0x13ed63(_0x3941f7[_0x485ad4(0x18a)]?.[_0x485ad4(0x4f7)]?.()??[]),process['on'](_0x485ad4(0x629),()=>_0x48271a(_0x485ad4(0x629))),process['on'](_0x485ad4(0x599),()=>_0x48271a('SIGTERM')),process['on']('SIGBREAK',()=>_0x48271a(_0x485ad4(0x4f3)));return;}const _0x4f8920=new _0x54a695(_0x273a5b,_0x2b9889);_0x4f8920[_0x485ad4(0x4e4)][_0x485ad4(0x3f4)]?.();const _0x34d3e3=_0x4f8920['log'][_0x485ad4(0x2ab)](_0x377b24=>_0xf6c780(_0x377b24,_0x4544be[_0x485ad4(0x41a)]));if(_0x4544be[_0x485ad4(0x59a)])process['stdout'][_0x485ad4(0x23f)](_0x485ad4(0x651));await _0x4f8920[_0x485ad4(0x492)]();if(_0x4544be[_0x485ad4(0x59a)])process[_0x485ad4(0x3b2)][_0x485ad4(0x23f)](_0x485ad4(0x4ce));try{await _0x51c8b2(_0x4f8920,_0x4544be['port']);}catch(_0x2985c4){_0x2985c4[_0x485ad4(0x321)]===_0x485ad4(0x201)&&(console[_0x485ad4(0x2bb)](_0x485ad4(0x636)+_0x4544be[_0x485ad4(0x4da)]+_0x485ad4(0x218)),process[_0x485ad4(0x19f)](0x1));throw _0x2985c4;}if(_0x4544be['noRepl'])process['stdout'][_0x485ad4(0x23f)](_0x485ad4(0x405)+_0x4544be[_0x485ad4(0x4da)]+'\x0a');if(!_0x4544be[_0x485ad4(0x59a)])_0x4f8920[_0x485ad4(0x4e4)]['detachConsole']?.(),_0x34d3e3?.(),_0x13ed63(_0x4f8920[_0x485ad4(0x18a)]?.[_0x485ad4(0x4f7)]?.()??[]),await _0x138f4a(_0x4f8920,_0x4544be);else{const _0x4e26f9=_0x2deb77['join'](_0x273a5b,_0x485ad4(0x48c));try{_0x787884['writeFileSync'](_0x4e26f9,String(process[_0x485ad4(0x18e)]));}catch{}const _0xeee429=Date[_0x485ad4(0x517)]()-_0x3b4f6a;console[_0x485ad4(0x4e4)](''),console[_0x485ad4(0x4e4)]('\x20\x20✓\x20OKDB\x20server\x20running'),console['log'](_0x485ad4(0x1e5)+_0x4544be[_0x485ad4(0x4da)]),console['log'](_0x485ad4(0x5c8)+_0x273a5b),console[_0x485ad4(0x4e4)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x4f8920['id']);{const _0x46b936=_0x4f8920[_0x485ad4(0x3b5)]?.['db']?.[_0x485ad4(0x437)]?.('__writeCounter')??0x0,_0x49d315=[..._0x4f8920[_0x485ad4(0x2a1)][_0x485ad4(0x1bc)]()][_0x485ad4(0x654)](_0x217be3=>!_0x217be3['startsWith']('~'))[_0x485ad4(0x557)];if(_0x4f8920[_0x485ad4(0x3b1)]?.[_0x485ad4(0x494)]?.['licenseType']===0x1){const _0x4ed5f7=Math['ceil']((_0x4f8920[_0x485ad4(0x3b1)][_0x485ad4(0x494)][_0x485ad4(0x362)]-Date['now']())/0x5265c00);console[_0x485ad4(0x4e4)](_0x485ad4(0x5b7)+_0x4f8920[_0x485ad4(0x3b1)]['active']['licensee']+'\x20(expires\x20in\x20'+_0x4ed5f7+_0x485ad4(0x53b));}else{if(_0x4f8920[_0x485ad4(0x3b1)]?.[_0x485ad4(0x494)]){const _0x33adec=_0x4f8920['_license'][_0x485ad4(0x494)];console[_0x485ad4(0x4e4)](_0x485ad4(0x480)+_0x33adec[_0x485ad4(0x607)]+_0x485ad4(0x35a)+new Date(_0x33adec[_0x485ad4(0x362)])[_0x485ad4(0x1f1)]()['slice'](0x0,0xa)+')');const _0x5c04b2=_0x33adec[_0x485ad4(0x2c3)]||{};if(_0x5c04b2[_0x485ad4(0x1a1)]){const _0x392993=Math[_0x485ad4(0x32f)](_0x46b936/_0x5c04b2[_0x485ad4(0x1a1)]*0x64);console['log'](_0x485ad4(0x442)+_0x46b936['toLocaleString']()+'\x20/\x20'+_0x5c04b2[_0x485ad4(0x1a1)][_0x485ad4(0x367)]()+'\x20writes\x20('+_0x392993+'%),\x20'+_0x49d315+(_0x5c04b2['envs']?'/'+_0x5c04b2[_0x485ad4(0x22e)]:'')+'\x20env'+(_0x49d315===0x1?'':'s'));}}else{if(_0x4f8920['_license']){const _0x1d6d8a=_0x4f8920[_0x485ad4(0x3b1)][_0x485ad4(0x498)](),_0x3a824c=_0x1d6d8a[_0x485ad4(0x557)]?_0x1d6d8a[_0x485ad4(0x3ad)](_0x297cc2=>_0x297cc2['pin'])[_0x485ad4(0x65d)](',\x20'):_0x485ad4(0x464),_0x25af0c=_0x4f8920[_0x485ad4(0x3b1)][_0x485ad4(0x2ac)],_0x476174=_0x25af0c[_0x485ad4(0x2c3)]['maxWrites']?Math['round'](_0x46b936/_0x25af0c[_0x485ad4(0x2c3)]['maxWrites']*0x64):0x0;console[_0x485ad4(0x4e4)]('\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine'),console[_0x485ad4(0x4e4)](_0x485ad4(0x442)+_0x46b936['toLocaleString']()+_0x485ad4(0x661)+_0x25af0c[_0x485ad4(0x2c3)][_0x485ad4(0x1a1)][_0x485ad4(0x367)]()+_0x485ad4(0x516)+_0x476174+_0x485ad4(0x624)+_0x49d315+_0x485ad4(0x661)+_0x25af0c[_0x485ad4(0x2c3)][_0x485ad4(0x22e)]+'\x20envs'),console['log'](_0x485ad4(0x31c)+_0x3a824c);}}}}console[_0x485ad4(0x4e4)](_0x485ad4(0x64b)+_0x4544be[_0x485ad4(0x4da)]+_0x485ad4(0x43b));!_0x4544be[_0x485ad4(0x448)]&&console[_0x485ad4(0x4e4)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x4544be['port']+_0x485ad4(0x5e7));console[_0x485ad4(0x4e4)](''),console[_0x485ad4(0x4e4)]('[okdb]\x20started\x20in\x20'+_0xeee429+'ms'),_0x13ed63(_0x4f8920[_0x485ad4(0x18a)]?.['getSecurityNotices']?.()??[]);let _0x3ba66f=![];async function _0xfe23b4(_0x4fe60e){const _0x20af83=_0x485ad4;_0x3ba66f&&(process['stderr'][_0x20af83(0x23f)](_0x20af83(0x36b)),process[_0x20af83(0x19f)](0x82));_0x3ba66f=!![],process[_0x20af83(0x298)][_0x20af83(0x23f)]('\x0a[okdb]\x20received\x20'+(_0x4fe60e||_0x20af83(0x196))+_0x20af83(0x521));const _0x200313=setTimeout(()=>{const _0x3dc2e0=_0x20af83;process[_0x3dc2e0(0x298)][_0x3dc2e0(0x23f)]('[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a'),process['exit'](0x1);},0x1388);try{_0x787884[_0x20af83(0x380)](_0x4e26f9);}catch{}try{await _0x4f8920[_0x20af83(0x602)]();}catch(_0x4c9e61){process[_0x20af83(0x298)]['write'](_0x20af83(0x456)+(_0x4c9e61?.[_0x20af83(0x277)]??_0x4c9e61)+'\x0a');}clearTimeout(_0x200313),process[_0x20af83(0x298)][_0x20af83(0x23f)](_0x20af83(0x61f)),process[_0x20af83(0x19f)](0x0);}process['on'](_0x485ad4(0x629),()=>_0xfe23b4(_0x485ad4(0x629))),process['on'](_0x485ad4(0x599),()=>_0xfe23b4('SIGTERM')),process['on'](_0x485ad4(0x4f3),()=>_0xfe23b4(_0x485ad4(0x4f3)));}}const _0x1cb27b=new Set([_0x4d67c2(0x4ef),_0x4d67c2(0x37d),_0x4d67c2(0x26f),_0x4d67c2(0x258),_0x4d67c2(0x2c0),_0x4d67c2(0x575),'reset',_0x4d67c2(0x5d9),_0x4d67c2(0x65d),'license']),_0x3c9714=process['argv'][0x2];if(_0x3c9714===_0x4d67c2(0x4ef))console[_0x4d67c2(0x4e4)](require$$3[_0x4d67c2(0x4ef)]),process[_0x4d67c2(0x19f)](0x0);else{if(_0x3c9714&&_0x1cb27b[_0x4d67c2(0x430)](_0x3c9714)){const _0x380b77=process[_0x4d67c2(0x535)][_0x4d67c2(0x35c)](0x3),_0x4746df=_0x2b3496([_0x4d67c2(0x506),_0x4d67c2(0x5f9),..._0x380b77]),_0x531d14=_0x219e3d(_0x4746df),_0x26c61a=new Set([_0x4d67c2(0x326),'-d',_0x4d67c2(0x59f),'-k',_0x4d67c2(0x5e2),'-c',_0x4d67c2(0x272),'-p',_0x4d67c2(0x439),_0x4d67c2(0x2db),'-e','--types',_0x4d67c2(0x2b2),'--password',_0x4d67c2(0x382),_0x4d67c2(0x5f8),_0x4d67c2(0x3c6),_0x4d67c2(0x375),_0x4d67c2(0x2aa),_0x4d67c2(0x3dd),'-u',_0x4d67c2(0x5d7)]);let _0x35f159=null;for(let _0x25191a=0x0;_0x25191a<_0x380b77[_0x4d67c2(0x557)];_0x25191a++){if(_0x26c61a['has'](_0x380b77[_0x25191a])){_0x25191a++;continue;}if(!_0x380b77[_0x25191a]['startsWith']('-')){_0x35f159=_0x380b77[_0x25191a];break;}}(async()=>{const _0x86af14=_0x4d67c2;if(_0x3c9714==='token'){const _0x3aa924=process[_0x86af14(0x535)][0x3],_0x59ef3e=process['argv'][_0x86af14(0x35c)](0x4),_0x56437b=_0x2b3496([_0x86af14(0x506),_0x86af14(0x5f9),..._0x59ef3e]),_0x1b6f5d=_0x219e3d(_0x56437b),_0x271871=new Set([_0x86af14(0x326),'-d','--key','-k','--config','-c','--port','-p',_0x86af14(0x2b2),_0x86af14(0x58f),_0x86af14(0x382),'--permissions',_0x86af14(0x3c6),'--ttl',_0x86af14(0x439),'--env','-e',_0x86af14(0x324)]),_0x1528fe=[];for(let _0xd8593=0x0;_0xd8593<_0x59ef3e['length'];_0xd8593++){if(_0x271871[_0x86af14(0x430)](_0x59ef3e[_0xd8593])){_0xd8593++;continue;}if(_0x59ef3e[_0xd8593][_0x86af14(0x1af)]('-'))continue;_0x1528fe['push'](_0x59ef3e[_0xd8593]);}switch(_0x3aa924){case _0x86af14(0x3ab):await _0x2829ea(_0x1b6f5d,_0x56437b);break;case _0x86af14(0x4b5):await _0x310821(_0x1b6f5d);break;case _0x86af14(0x556):await _0xef103c(_0x1528fe[0x0],_0x1b6f5d);break;default:console[_0x86af14(0x2bb)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x3aa924+_0x86af14(0x5e1)),process[_0x86af14(0x19f)](0x1);}return;}if(_0x3c9714==='license'){const _0x25becd=requireOkdbLicenseCodec(),_0x2ee9c2=process['argv'][_0x86af14(0x35c)](0x3),_0x1d28eb=_0x2b3496(['node',_0x86af14(0x5f9),..._0x2ee9c2]),_0x53dbf0=_0x219e3d(_0x1d28eb),_0x4a3679=new Set([_0x86af14(0x326),'-d',_0x86af14(0x59f),'-k',_0x86af14(0x5e2),'-c','--port','-p',_0x86af14(0x439)]),_0x1f9156=[];for(let _0x3794f9=0x0;_0x3794f9<_0x2ee9c2['length'];_0x3794f9++){if(_0x4a3679[_0x86af14(0x430)](_0x2ee9c2[_0x3794f9])){_0x3794f9++;continue;}if(_0x2ee9c2[_0x3794f9][_0x86af14(0x1af)]('-'))continue;_0x1f9156[_0x86af14(0x228)](_0x2ee9c2[_0x3794f9]);}const _0x5ec450=_0x1f9156[0x0]??null;if(_0x5ec450===_0x86af14(0x1d2))await _0x498e35(_0x1f9156[0x1],_0x53dbf0);else{if(!_0x5ec450)await _0x1b94f2(_0x53dbf0);else{let _0x45d31d=_0x25becd[_0x86af14(0x4a1)](_0x5ec450);if(_0x45d31d===_0x86af14(0x42d)&&_0x787884[_0x86af14(0x41e)](_0x5ec450))_0x45d31d='path';if(_0x45d31d===_0x86af14(0x32d))try{const _0x472a1a=_0x787884[_0x86af14(0x5db)](_0x5ec450,'utf8')[_0x86af14(0x1bd)](),_0x31a6af=_0x25becd['detectInputType'](_0x472a1a);if(_0x31a6af===_0x86af14(0x538)){await _0x2edf5f(_0x472a1a,_0x53dbf0);return;}await _0x528167(_0x5ec450,_0x53dbf0);return;}catch(_0x231b43){console[_0x86af14(0x2bb)](_0x86af14(0x50e)+_0x5ec450+':\x20'+_0x231b43['message']),process[_0x86af14(0x19f)](0x1);}switch(_0x45d31d){case _0x86af14(0x4f5):await _0x528167(_0x5ec450,_0x53dbf0);break;case _0x86af14(0x538):await _0x2edf5f(_0x5ec450,_0x53dbf0);break;case'uuid':await _0x5b668a(_0x5ec450,_0x53dbf0);break;default:console[_0x86af14(0x2bb)](_0x86af14(0x338)+_0x5ec450+'\x22'),console[_0x86af14(0x2bb)](''),console['error'](_0x86af14(0x27d)),console[_0x86af14(0x2bb)](_0x86af14(0x4b7)),console['error'](_0x86af14(0x490)),console['error'](_0x86af14(0x57f)),console['error'](_0x86af14(0x320)),console['error'](''),console[_0x86af14(0x2bb)](_0x86af14(0x3dc)),process[_0x86af14(0x19f)](0x1);}}}return;}switch(_0x3c9714){case _0x86af14(0x37d):await _0x3d076b(_0x531d14);break;case'init':await _0x4243a0();break;case _0x86af14(0x3ae):await _0x31c6c5(_0x531d14);break;case _0x86af14(0x258):await _0xe6238a(_0x35f159??_0x2deb77['resolve'](_0x86af14(0x217)),_0x531d14);break;case _0x86af14(0x2c0):await _0x1545a9(_0x35f159??_0x2deb77[_0x86af14(0x4a7)](_0x86af14(0x191)),_0x531d14,_0x4746df);break;case'import':await _0x1eee1b(_0x35f159??_0x2deb77[_0x86af14(0x4a7)](_0x86af14(0x191)),_0x531d14,_0x4746df);break;case _0x86af14(0x65d):await _0x3bd1f2(_0x35f159,_0x531d14,_0x4746df);break;}})()['then'](()=>process[_0x4d67c2(0x19f)](0x0))['catch'](_0xfbf70b=>{const _0x35df3d=_0x4d67c2;console[_0x35df3d(0x2bb)](_0x35df3d(0x306)+(_0xfbf70b['message']||_0xfbf70b)+'\x0a'),process['exit'](0x1);});}else _0x4e1b18()[_0x4d67c2(0x26c)](_0x3abee2=>{const _0x48931d=_0x4d67c2;console[_0x48931d(0x2bb)](_0x48931d(0x620)),console[_0x48931d(0x2bb)](_0x3abee2['stack']||_0x3abee2),process[_0x48931d(0x19f)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x2d3788(0x529)]=okdb;
2
+ 'use strict';const _0x38fa5f=_0x3d59;(function(_0x35c98a,_0xca3e6){const _0x48b09b=_0x3d59,_0x229722=_0x35c98a();while(!![]){try{const _0x47da2b=parseInt(_0x48b09b(0x2d9))/0x1+parseInt(_0x48b09b(0x3ee))/0x2*(parseInt(_0x48b09b(0x437))/0x3)+-parseInt(_0x48b09b(0x22d))/0x4+parseInt(_0x48b09b(0x1a5))/0x5*(parseInt(_0x48b09b(0x43d))/0x6)+-parseInt(_0x48b09b(0x5e9))/0x7+parseInt(_0x48b09b(0x2bd))/0x8*(parseInt(_0x48b09b(0x2aa))/0x9)+-parseInt(_0x48b09b(0x329))/0xa;if(_0x47da2b===_0xca3e6)break;else _0x229722['push'](_0x229722['shift']());}catch(_0x1bc194){_0x229722['push'](_0x229722['shift']());}}}(_0x4093,0x45c61));var require$$1=require('path'),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x38fa5f(0x528)),require$$5=require(_0x38fa5f(0x22c)),require$$0$3=require('readline'),require$$0$1=require(_0x38fa5f(0x274)),require$$0$2=require(_0x38fa5f(0x532)),require$$4=require(_0x38fa5f(0x3f4)),require$$1$2=require(_0x38fa5f(0x618)),require$$0$4=require(_0x38fa5f(0x2cc)),require$$0$5=require('perf_hooks'),require$$0$6=require(_0x38fa5f(0x525));function getDefaultExportFromCjs(_0x376ef4){const _0x574bf6=_0x38fa5f;return _0x376ef4&&_0x376ef4[_0x574bf6(0x536)]&&Object[_0x574bf6(0x2a1)][_0x574bf6(0x350)][_0x574bf6(0x574)](_0x376ef4,'default')?_0x376ef4[_0x574bf6(0x5c8)]:_0x376ef4;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x19fa21=require$$0,_0x42b88f=require$$1$1,_0x5cad43=require$$1;let _0xd9f1e5;function _0x26adbb(){const _0x1aa9d5=_0x3d59;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0xd9f1e5!==undefined)return _0xd9f1e5;try{const _0x5dbeb9=_0x5cad43['dirname'](require[_0x1aa9d5(0x299)](_0x1aa9d5(0x271)));_0xd9f1e5=_0x42b88f[_0x1aa9d5(0x32f)](_0x5cad43[_0x1aa9d5(0x60e)](_0x5dbeb9,'build',_0x1aa9d5(0x3d3),_0x1aa9d5(0x281)));}catch{_0xd9f1e5=![];}return _0xd9f1e5;}function _0x489339(){const _0xc0d729=_0x3d59,_0x1cdf4e=_0x19fa21[_0xc0d729(0x636)]()[_0xc0d729(0x246)];return Math['max'](0x1,_0x1cdf4e-0x1);}function _0x1f36a7(_0x4904fb,_0x23d265={}){const _0x297860=_0x3d59,_0x1f740e=_0x23d265[_0x297860(0x45a)]!==undefined?_0x23d265['shmbufNative']:_0x26adbb();let _0x574edd;if(_0x4904fb?.[_0x297860(0x26c)])_0x574edd=0x1;else{let _0x14003e,_0x3e60ce;if(_0x4904fb?.[_0x297860(0x461)]!==undefined&&_0x4904fb[_0x297860(0x461)]!==null&&_0x4904fb['workersFlag']!=='')_0x14003e=_0x4904fb[_0x297860(0x461)],_0x3e60ce=_0x297860(0x3e4);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x14003e=process.env.OKDB_HTTP_WORKERS,_0x3e60ce='OKDB_HTTP_WORKERS';else _0x4904fb?.['http']?.[_0x297860(0x5f2)]!==undefined&&_0x4904fb['http'][_0x297860(0x5f2)]!==null&&_0x4904fb['http'][_0x297860(0x5f2)]!==''&&(_0x14003e=_0x4904fb[_0x297860(0x4f0)][_0x297860(0x5f2)],_0x3e60ce=_0x297860(0x354));}if(_0x14003e===undefined)_0x574edd=_0x489339();else{const _0x2c832a=Number(_0x14003e);!Number['isInteger'](_0x2c832a)||_0x2c832a<0x1?(console['warn'](_0x297860(0x64d)+_0x3e60ce+'='+JSON[_0x297860(0x31c)](_0x14003e)+_0x297860(0x27d)),_0x574edd=0x1):_0x574edd=_0x2c832a;}}return!_0x1f740e&&_0x574edd>0x1&&(console[_0x297860(0x5d5)](_0x297860(0x5db)+('(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20'+_0x574edd+').')),_0x574edd=0x1),_0x574edd;}return okdbWorkers={'isShmbufNative':_0x26adbb,'defaultWorkers':_0x489339,'resolveWorkers':_0x1f36a7},okdbWorkers;}var version=_0x38fa5f(0x44f),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x2eceaf=require$$0$1;function _0x4cc66c(_0x299750,_0xdf778b){const _0x224236=_0x3d59;return _0x2eceaf[_0x224236(0x548)](_0x224236(0x341),_0xdf778b)[_0x224236(0x362)](_0x299750)['digest'](_0x224236(0x217));}function _0x565802(_0x1213e3,_0x28042e){const _0x19e72a=_0x3d59;if(typeof _0x1213e3!==_0x19e72a(0x2fc)||typeof _0x28042e!==_0x19e72a(0x2fc))return![];if(Buffer[_0x19e72a(0x3fe)](_0x1213e3)!==Buffer[_0x19e72a(0x3fe)](_0x28042e))return![];return _0x2eceaf[_0x19e72a(0x4c2)](Buffer['from'](_0x1213e3),Buffer[_0x19e72a(0x5f6)](_0x28042e));}function _0x5847ce(_0x293f06){const _0x2afa3e=_0x3d59;if(!_0x293f06?.[_0x2afa3e(0x4f7)](_0x2afa3e(0x2d2)))return null;return _0x293f06[_0x2afa3e(0x20b)](0x7);}function _0x463cc7(_0x3e8aef=0x20){const _0x892478=_0x3d59;return _0x2eceaf[_0x892478(0x3d4)](_0x3e8aef)[_0x892478(0x3c5)](_0x892478(0x217));}function _0x7d8fe5(_0x4ba1d9){const _0x50e855=_0x3d59;return _0x2eceaf[_0x50e855(0x482)](_0x50e855(0x341))[_0x50e855(0x362)](_0x4ba1d9)[_0x50e855(0x602)]('hex');}function _0x5694d0(_0x533a01,_0x2df09f,_0x5c882f=0x36ee80){const _0x1c43c9=_0x3d59;if(!_0x2df09f)throw new Error(_0x1c43c9(0x438));const _0x1d0151=Date[_0x1c43c9(0x5cc)](),_0xe94ed2=Buffer[_0x1c43c9(0x5f6)](JSON['stringify']({'iat':_0x1d0151,'exp':_0x1d0151+_0x5c882f,'sub':_0x533a01?.['id']??_0x533a01?.['sub']??null,'username':_0x533a01?.['username']??_0x533a01?.[_0x1c43c9(0x5c0)]??null,'roles':Array[_0x1c43c9(0x4d8)](_0x533a01?.[_0x1c43c9(0x44e)])?_0x533a01['roles']:[]}))['toString'](_0x1c43c9(0x217)),_0x4c7280=_0x4cc66c(_0xe94ed2,_0x2df09f);return _0xe94ed2+'.'+_0x4c7280;}function _0x36f76f(_0xd36c13,_0x2307df){const _0x11ed35=_0x3d59;if(!_0x2307df||typeof _0xd36c13!==_0x11ed35(0x2fc))return null;const [_0x188dd1,_0x1bd50e]=_0xd36c13[_0x11ed35(0x5df)]('.');if(!_0x188dd1||!_0x1bd50e)return null;const _0xe98ec8=_0x4cc66c(_0x188dd1,_0x2307df);if(!_0x565802(_0x1bd50e,_0xe98ec8))return null;try{const _0x374e46=JSON[_0x11ed35(0x4b9)](Buffer['from'](_0x188dd1,'base64url')[_0x11ed35(0x3c5)]()),_0x1f4c5e=0x7530;if(Date[_0x11ed35(0x5cc)]()>Number(_0x374e46?.[_0x11ed35(0x30e)]??0x0)+_0x1f4c5e)return null;return _0x374e46;}catch{return null;}}async function _0x1db9d9(_0x37c447){return new Promise((_0x306d57,_0x426228)=>{const _0x1a9892=_0x3d59,_0xe68dfd=_0x2eceaf[_0x1a9892(0x3d4)](0x10);_0x2eceaf[_0x1a9892(0x30f)](_0x37c447,_0xe68dfd,0x40,(_0x34b1a1,_0x2bca38)=>{const _0x5bf19f=_0x1a9892;if(_0x34b1a1)_0x426228(_0x34b1a1);_0x306d57(_0xe68dfd['toString'](_0x5bf19f(0x23d))+':'+_0x2bca38[_0x5bf19f(0x3c5)](_0x5bf19f(0x23d)));});});}async function _0x4ad499(_0xc6ae42,_0x4e30e9){const _0x37aa39=_0x3d59,[_0x515d2a,_0x2f415b]=_0x4e30e9[_0x37aa39(0x5df)](':');if(!_0x515d2a||!_0x2f415b)return![];const _0x5d24fc=Buffer[_0x37aa39(0x5f6)](_0x515d2a,_0x37aa39(0x23d));return new Promise((_0xc198b8,_0x88a656)=>{const _0xe1e3c9=_0x37aa39;_0x2eceaf[_0xe1e3c9(0x30f)](_0xc6ae42,_0x5d24fc,0x40,(_0x376c28,_0x2b5ba8)=>{const _0x129bf0=_0xe1e3c9;if(_0x376c28)_0x88a656(_0x376c28);_0xc198b8(_0x2eceaf['timingSafeEqual'](_0x2b5ba8,Buffer[_0x129bf0(0x5f6)](_0x2f415b,_0x129bf0(0x23d))));});});}return okdbAuthTokens={'hmac':_0x4cc66c,'timingSafeEqual':_0x565802,'parseBearer':_0x5847ce,'randomToken':_0x463cc7,'hashToken':_0x7d8fe5,'issueToken':_0x5694d0,'authenticateToken':_0x36f76f,'hashPassword':_0x1db9d9,'verifyPassword':_0x4ad499},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0xb2e5f4=_0x38fa5f;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x4b4920=require$$0$2,_0xbd990=_0xb2e5f4(0x245),_0x47947b=new Uint8Array(0x100)[_0xb2e5f4(0x38e)](0xff);for(let _0x44b97d=0x0;_0x44b97d<_0xbd990['length'];_0x44b97d++){_0x47947b[_0xbd990['charCodeAt'](_0x44b97d)]=_0x44b97d,_0x47947b[_0xbd990['charCodeAt'](_0x44b97d)+0x20]=_0x44b97d;}_0x47947b['O'['charCodeAt'](0x0)]=0x0,_0x47947b['o'[_0xb2e5f4(0x66f)](0x0)]=0x0,_0x47947b['I'[_0xb2e5f4(0x66f)](0x0)]=0x1,_0x47947b['i'[_0xb2e5f4(0x66f)](0x0)]=0x1,_0x47947b['L'[_0xb2e5f4(0x66f)](0x0)]=0x1,_0x47947b['l'[_0xb2e5f4(0x66f)](0x0)]=0x1;function _0x25ba6e(_0x27dcd9){let _0x4bcbcc=0x0,_0x1625ba=0x0,_0x31885e='';for(let _0x1e18c0=0x0;_0x1e18c0<_0x27dcd9['length'];_0x1e18c0++){_0x1625ba=_0x1625ba<<0x8|_0x27dcd9[_0x1e18c0],_0x4bcbcc+=0x8;while(_0x4bcbcc>=0x5){_0x4bcbcc-=0x5,_0x31885e+=_0xbd990[_0x1625ba>>>_0x4bcbcc&0x1f];}}return _0x4bcbcc>0x0&&(_0x31885e+=_0xbd990[_0x1625ba<<0x5-_0x4bcbcc&0x1f]),_0x31885e;}function _0xfc0abe(_0x3ee07a){const _0x209760=_0xb2e5f4;_0x3ee07a=_0x3ee07a[_0x209760(0x213)](/-/g,'')[_0x209760(0x207)]();let _0x103f98=0x0,_0x5a3d6e=0x0;const _0xe9c22f=[];for(let _0x308519=0x0;_0x308519<_0x3ee07a[_0x209760(0x246)];_0x308519++){const _0x28e86c=_0x47947b[_0x3ee07a[_0x209760(0x66f)](_0x308519)];if(_0x28e86c===0xff)continue;_0x5a3d6e=_0x5a3d6e<<0x5|_0x28e86c,_0x103f98+=0x5,_0x103f98>=0x8&&(_0x103f98-=0x8,_0xe9c22f[_0x209760(0x2c6)](_0x5a3d6e>>>_0x103f98&0xff));}return Buffer[_0x209760(0x5f6)](_0xe9c22f);}const _0x94b3de=[_0xb2e5f4(0x617),_0xb2e5f4(0x440),_0xb2e5f4(0x3ae),'fts','timeMachine',_0xb2e5f4(0x39f),'mcp','files'],_0x5420d0=0x0,_0x262a8a=0x1,_0x1540af=0x2,_0x14de63=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x46202b({issuedAt:_0x381565,expiresAt:_0x4f807a,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x5420d0}){const _0x39c08d=_0xb2e5f4,_0x6d6eac=Buffer[_0x39c08d(0x5f6)](licensee,'utf8')[_0x39c08d(0x20b)](0x0,0x40),_0x3bb442=0x1+0x1+0x4+0x4+0x1+_0x6d6eac['length']+0x2+0x10,_0x413c7c=Buffer[_0x39c08d(0x297)](_0x3bb442);let _0x5c1d0f=0x0;_0x413c7c[_0x39c08d(0x64b)](0x1,_0x5c1d0f++),_0x413c7c[_0x39c08d(0x64b)](licenseType,_0x5c1d0f++),_0x413c7c['writeUInt32BE'](Math[_0x39c08d(0x5e8)](_0x381565/0x3e8),_0x5c1d0f),_0x5c1d0f+=0x4,_0x413c7c[_0x39c08d(0x392)](Math[_0x39c08d(0x5e8)](_0x4f807a/0x3e8),_0x5c1d0f),_0x5c1d0f+=0x4,_0x413c7c[_0x39c08d(0x64b)](_0x6d6eac['length'],_0x5c1d0f++),_0x6d6eac[_0x39c08d(0x1d4)](_0x413c7c,_0x5c1d0f),_0x5c1d0f+=_0x6d6eac[_0x39c08d(0x246)];let _0x18c188=0x0;for(let _0x58deff=0x0;_0x58deff<_0x94b3de['length'];_0x58deff++){if(features[_0x94b3de[_0x58deff]])_0x18c188|=0x1<<_0x58deff;}_0x413c7c[_0x39c08d(0x56e)](_0x18c188,_0x5c1d0f),_0x5c1d0f+=0x2;const _0x1012e5=[_0x39c08d(0x4b4),_0x39c08d(0x282),_0x39c08d(0x367),_0x39c08d(0x2d4)];for(const _0x5e29c1 of _0x1012e5){_0x413c7c['writeUInt32BE'](limits[_0x5e29c1]||0x0,_0x5c1d0f),_0x5c1d0f+=0x4;}return _0x413c7c;}function _0x520009(_0x2f0989){const _0x51e225=_0xb2e5f4;let _0x1c359b=0x0;const _0x29b794=_0x2f0989['readUInt8'](_0x1c359b++),_0x28a659=_0x2f0989[_0x51e225(0x2fd)](_0x1c359b++),_0x4fb37c=_0x2f0989[_0x51e225(0x211)](_0x1c359b);_0x1c359b+=0x4;const _0x5ac5a4=_0x2f0989['readUInt32BE'](_0x1c359b);_0x1c359b+=0x4;const _0x59935b=_0x2f0989[_0x51e225(0x2fd)](_0x1c359b++),_0xb2195d=_0x2f0989[_0x51e225(0x20b)](_0x1c359b,_0x1c359b+_0x59935b)[_0x51e225(0x3c5)](_0x51e225(0x50e));_0x1c359b+=_0x59935b;const _0x1f7b97=_0x2f0989[_0x51e225(0x1d9)](_0x1c359b);_0x1c359b+=0x2;const _0x1b08d3={};for(let _0x4b6f3d=0x0;_0x4b6f3d<_0x94b3de[_0x51e225(0x246)];_0x4b6f3d++){_0x1b08d3[_0x94b3de[_0x4b6f3d]]=Boolean(_0x1f7b97&0x1<<_0x4b6f3d);}const _0x1eef0f=[_0x51e225(0x4b4),_0x51e225(0x282),'syncPeers',_0x51e225(0x2d4)],_0x40b3b1={};for(const _0x20742e of _0x1eef0f){const _0x26d420=_0x2f0989[_0x51e225(0x211)](_0x1c359b);_0x1c359b+=0x4,_0x40b3b1[_0x20742e]=_0x26d420===0x0?null:_0x26d420;}return{'v':_0x29b794,'licenseType':_0x28a659,'issuedAt':_0x4fb37c*0x3e8,'expiresAt':_0x5ac5a4*0x3e8,'licensee':_0xb2195d,'features':_0x1b08d3,'limits':_0x40b3b1};}function _0x4dcf17(_0x23299a,_0x3d623c){const _0x39e947=_0xb2e5f4,_0x4a3527=Buffer[_0x39e947(0x4e6)]([_0x23299a,_0x3d623c]),_0x275cd2=_0x25ba6e(_0x4a3527),_0x1de398=[];for(let _0x1778b2=0x0;_0x1778b2<_0x275cd2[_0x39e947(0x246)];_0x1778b2+=0x8){_0x1de398[_0x39e947(0x2c6)](_0x275cd2[_0x39e947(0x20b)](_0x1778b2,_0x1778b2+0x8));}return _0x1de398[_0x39e947(0x60e)]('-');}function _0xacd448(_0x380d73){const _0x2372a5=_0xb2e5f4;if(typeof _0x380d73!==_0x2372a5(0x2fc))throw new Error(_0x2372a5(0x20e));const _0x4d3d09=_0xfc0abe(_0x380d73[_0x2372a5(0x213)](/-/g,''));if(_0x4d3d09[_0x2372a5(0x246)]<0x41)throw new Error(_0x2372a5(0x374)+_0x4d3d09['length']+_0x2372a5(0x23b));const _0xb11e7=_0x4d3d09[_0x2372a5(0x20b)](0x0,_0x4d3d09[_0x2372a5(0x246)]-0x40),_0x118bd0=_0x4d3d09[_0x2372a5(0x20b)](_0x4d3d09[_0x2372a5(0x246)]-0x40);let _0x53ae33;try{_0x53ae33=_0x520009(_0xb11e7);}catch(_0x4403d2){throw new Error('decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20'+_0x4403d2[_0x2372a5(0x453)]);}return{'rawBuf':_0x4d3d09,'payload':_0xb11e7,'sig':_0x118bd0,'decoded':_0x53ae33};}function _0x42f21a(_0x2d1790){const _0x24a4db=_0xb2e5f4;return _0x4b4920[_0x24a4db(0x482)]('sha256')[_0x24a4db(0x362)](_0x2d1790)[_0x24a4db(0x602)]()[_0x24a4db(0x20b)](0x0,0x8);}function _0x41fd44(_0x3bd641,_0x3f4912,_0x5d6394){const _0x553a07=_0xb2e5f4,_0x3e4924=_0x553a07(0x379)+_0x5d6394,_0xff4318=Buffer[_0x553a07(0x4e6)]([Buffer[_0x553a07(0x5f6)](_0x3bd641,_0x553a07(0x50e)),_0x3f4912]),_0x5ddd90=_0x4b4920[_0x553a07(0x548)](_0x553a07(0x341),_0x3e4924)[_0x553a07(0x362)](_0xff4318)[_0x553a07(0x602)](),_0x2026d9=_0x25ba6e(_0x5ddd90[_0x553a07(0x20b)](0x0,0x5));return{'pin':_0x2026d9,'pinHmac':_0x5ddd90};}function _0x520837(_0x4d5ef3,_0x409ca0,_0x8ea8ea){const _0x466c0f=_0xb2e5f4,_0x2ca6af=Buffer['allocUnsafe'](0x4d);let _0x4feff4=0x0;_0x2ca6af[_0x466c0f(0x64b)](0x1,_0x4feff4++),_0x4d5ef3[_0x466c0f(0x1d4)](_0x2ca6af,_0x4feff4),_0x4feff4+=0x8,_0x2ca6af[_0x466c0f(0x392)](_0x409ca0,_0x4feff4),_0x4feff4+=0x4,_0x8ea8ea[_0x466c0f(0x1d4)](_0x2ca6af,_0x4feff4);const _0x7d922d=_0x25ba6e(_0x2ca6af),_0x4582ad=[];for(let _0x4a8025=0x0;_0x4a8025<_0x7d922d[_0x466c0f(0x246)];_0x4a8025+=0x6){_0x4582ad[_0x466c0f(0x2c6)](_0x7d922d[_0x466c0f(0x20b)](_0x4a8025,_0x4a8025+0x6));}return _0x4582ad[_0x466c0f(0x60e)]('-');}function _0x4f707f(_0x1bb4ca){const _0x2cf77f=_0xb2e5f4;if(typeof _0x1bb4ca!==_0x2cf77f(0x2fc))throw new Error(_0x2cf77f(0x3b0));const _0x823c37=_0xfc0abe(_0x1bb4ca[_0x2cf77f(0x213)](/-/g,''));if(_0x823c37[_0x2cf77f(0x246)]!==0x4d)throw new Error(_0x2cf77f(0x58a)+_0x823c37[_0x2cf77f(0x246)]);let _0x59cc19=0x0;const _0xe3d82a=_0x823c37[_0x2cf77f(0x2fd)](_0x59cc19++),_0x290cc1=_0x823c37[_0x2cf77f(0x20b)](_0x59cc19,_0x59cc19+0x8);_0x59cc19+=0x8;const _0x2bc5e8=_0x823c37['readUInt32BE'](_0x59cc19);_0x59cc19+=0x4;const _0x2de320=_0x823c37[_0x2cf77f(0x20b)](_0x59cc19);return{'v':_0xe3d82a,'licenseHash':_0x290cc1,'expiry':_0x2bc5e8,'sig':_0x2de320};}function _0x3782e8({tokenString:_0x34b094,nodeId:_0x46381b,rawBlobBuf:_0xe5d314,pubKeyPem:_0x53dea4,pubFingerprint:_0x2ced28}){const _0xbdbef6=_0xb2e5f4;let _0x8881d3;try{_0x8881d3=_0x4f707f(_0x34b094);}catch(_0x1d5282){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x3cdb99=_0x42f21a(_0xe5d314);if(!_0x3cdb99['equals'](_0x8881d3[_0xbdbef6(0x4df)]))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x27dce3}=_0x41fd44(_0x46381b,_0x3cdb99,_0x2ced28),_0x44332d=Buffer[_0xbdbef6(0x297)](0x4);_0x44332d[_0xbdbef6(0x392)](_0x8881d3[_0xbdbef6(0x4e1)],0x0);const _0x29e673=Buffer['concat']([Buffer[_0xbdbef6(0x5f6)]([_0x8881d3['v']]),_0x27dce3[_0xbdbef6(0x20b)](0x0,0x5),_0x8881d3[_0xbdbef6(0x4df)],_0x44332d]);try{const _0x2d60a8=_0x4b4920[_0xbdbef6(0x65d)](null,_0x29e673,_0x53dea4,_0x8881d3[_0xbdbef6(0x289)]);if(!_0x2d60a8)return{'valid':![],'reason':_0xbdbef6(0x1eb)};}catch(_0x17c750){return{'valid':![],'reason':_0xbdbef6(0x1eb)};}if(_0x8881d3[_0xbdbef6(0x4e1)]<Date[_0xbdbef6(0x5cc)]()/0x3e8)return{'valid':![],'reason':_0xbdbef6(0x48e)};return{'valid':!![],'reason':'ok'};}function _0x2abf64(_0x136df8){const _0xcd3a3d=_0xb2e5f4;if(typeof _0x136df8!==_0xcd3a3d(0x2fc))return _0xcd3a3d(0x2d5);const _0x691e5e=_0x136df8[_0xcd3a3d(0x431)]();if(_0x691e5e['startsWith']('/')||_0x691e5e[_0xcd3a3d(0x4f7)]('./')||_0x691e5e[_0xcd3a3d(0x4f7)](_0xcd3a3d(0x1ce))||/^[A-Za-z]:[\\/]/[_0xcd3a3d(0x48a)](_0x691e5e))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x691e5e))return _0xcd3a3d(0x448);const _0x594722=_0x691e5e['replace'](/[\s-]+/g,'')[_0xcd3a3d(0x246)];if(_0x594722===0x7c)return _0xcd3a3d(0x1c1);if(_0x594722>=0x95&&_0x594722<=0xfc)return _0xcd3a3d(0x34b);return _0xcd3a3d(0x2d5);}return okdbLicenseCodec={'toBase32':_0x25ba6e,'fromBase32':_0xfc0abe,'encodeLicensePayload':_0x46202b,'decodeLicensePayload':_0x520009,'encodeLicenseBlob':_0x4dcf17,'decodeLicenseBlob':_0xacd448,'licenseHash':_0x42f21a,'derivePin':_0x41fd44,'encodeActivationToken':_0x520837,'decodeActivationToken':_0x4f707f,'verifyActivation':_0x3782e8,'detectInputType':_0x2abf64,'FEATURE_NAMES':_0x94b3de,'LICENSE_TYPE_STANDARD':_0x5420d0,'LICENSE_TYPE_OPEN':_0x262a8a,'LICENSE_TYPE_INTERNAL':_0x1540af,'OPEN_LICENSE_MAX_DURATION_MS':_0x14de63},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x2d9394 extends Error{constructor(_0x10692,_0x46c19b,_0x4613a1={}){const _0x505bc8=_0x3d59;super(_0x10692),this[_0x505bc8(0x5c0)]=_0x505bc8(0x481),this[_0x505bc8(0x47d)]=_0x46c19b,this['details']=_0x4613a1,_0x4613a1['cause']&&(this['cause']=_0x4613a1[_0x505bc8(0x1df)]),Error[_0x505bc8(0x358)](this,this['constructor']);}}class _0x1142b8 extends _0x2d9394{constructor(_0x37524e,_0x39d4e9,_0x33fbc3,_0x1f5574){const _0xfd864a=_0x3d59;super(_0xfd864a(0x3f5)+_0x37524e+'@'+_0x39d4e9+_0xfd864a(0x3c7)+_0x33fbc3+_0xfd864a(0x44d)+_0x1f5574,'VERSION_MISMATCH',{'type':_0x37524e,'key':_0x39d4e9,'expectedVersion':_0x33fbc3,'actualVersion':_0x1f5574}),this[_0xfd864a(0x5c0)]=_0xfd864a(0x1a4);}}class _0x4f7d7c extends _0x2d9394{constructor(_0x56b1db,_0xb16ab1){const _0x52371c=_0x3d59;super(_0x56b1db+'@'+_0xb16ab1+_0x52371c(0x55b),_0x52371c(0x355),{'type':_0x56b1db,'key':_0xb16ab1}),this['name']='OKDBNotFoundError';}}class _0x1156bb extends _0x2d9394{constructor(_0x1baf2d,_0x4ba24d){const _0x32776e=_0x3d59;super(_0x1baf2d+'@'+_0x4ba24d+_0x32776e(0x31d),_0x32776e(0x1e9),{'type':_0x1baf2d,'key':_0x4ba24d}),this[_0x32776e(0x5c0)]=_0x32776e(0x5a5);}}class _0x3295bb extends _0x2d9394{constructor(_0x2f93a6,_0x4f5552){const _0x1ce4a4=_0x3d59,_0x2aa36b=typeof _0x4f5552;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x2f93a6+_0x1ce4a4(0x647)+_0x2aa36b+_0x1ce4a4(0x308)+_0x4f5552,_0x1ce4a4(0x343),{'index':_0x2f93a6,'key':_0x4f5552,'keyType':_0x2aa36b}),this[_0x1ce4a4(0x5c0)]=_0x1ce4a4(0x4a3);}}class _0x5de76b extends _0x2d9394{constructor(_0x4ecb96){const _0x2a7ad0=_0x3d59,_0x399af9=typeof _0x4ecb96;super(_0x2a7ad0(0x3f7)+_0x399af9+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x4ecb96,'INVALID_PRIMARY_KEY',{'key':_0x4ecb96,'keyType':_0x399af9}),this[_0x2a7ad0(0x5c0)]='OKDBInvalidPrimaryKeyError';}}class _0x53272b extends _0x2d9394{constructor(_0x4dd5a7){const _0x158acd=_0x3d59;super(_0x158acd(0x41c)+_0x4dd5a7+'\x27\x20doesn\x27t\x20exist','TYPE_NOT_REGISTERED',{'type':_0x4dd5a7}),this[_0x158acd(0x5c0)]=_0x158acd(0x1ed);}}class _0x1c8adb extends _0x2d9394{constructor(_0x3ce6df){const _0x4f50da=_0x3d59;super(_0x4f50da(0x41c)+_0x3ce6df+'\x27\x20already\x20registered',_0x4f50da(0x359),{'type':_0x3ce6df}),this['name']=_0x4f50da(0x49c);}}class _0x2a9823 extends _0x2d9394{constructor(_0x2f222d,_0xe5d0a1){const _0x50403e=_0x3d59;super(_0x50403e(0x53d)+_0xe5d0a1+_0x50403e(0x3c2)+_0x2f222d+_0x50403e(0x20d),_0x50403e(0x2c2),{'type':_0x2f222d,'index':_0xe5d0a1}),this['name']=_0x50403e(0x209);}}class _0x6fdc43 extends _0x2d9394{constructor(_0x3be152,_0x2ee7d3){const _0x49eef4=_0x3d59;super(_0x49eef4(0x53d)+_0x2ee7d3+_0x49eef4(0x3c2)+_0x3be152+_0x49eef4(0x3c9),_0x49eef4(0x59f),{'type':_0x3be152,'index':_0x2ee7d3}),this['name']=_0x49eef4(0x47e);}}class _0x59abe8 extends _0x2d9394{constructor(_0x50ac06,_0x28fe77={}){const _0x436db4=_0x3d59;super(_0x50ac06,_0x436db4(0x626),_0x28fe77),this[_0x436db4(0x5c0)]='OKDBInvalidValueError';}}class _0x207702 extends _0x2d9394{constructor(_0xef013a,_0x451ef7,_0x1d0bc6,_0x3f86e7,_0x43051c){const _0x49328d=_0x3d59;super(_0x49328d(0x580)+_0xef013a+'@'+_0x451ef7+_0x49328d(0x449)+_0x1d0bc6+']\x20already\x20maps\x20to\x20\x27'+_0x3f86e7+'\x27,\x20cannot\x20map\x20to\x20\x27'+_0x43051c+'\x27',_0x49328d(0x606),{'type':_0xef013a,'index':_0x451ef7,'indexKey':_0x1d0bc6,'existingKey':_0x3f86e7,'conflictingKey':_0x43051c}),this['name']=_0x49328d(0x27c);}}class _0x407a5e extends _0x2d9394{constructor(_0x184499,_0x4d8bf4,_0x4f3dcd){const _0x2c5719=_0x3d59;super(_0x2c5719(0x2f6)+_0x184499+'@'+_0x4d8bf4,_0x2c5719(0x3e0),{'type':_0x184499,'key':_0x4d8bf4,'errors':_0x4f3dcd}),this[_0x2c5719(0x5c0)]=_0x2c5719(0x592),this[_0x2c5719(0x628)]=_0x184499,this['key']=_0x4d8bf4,this[_0x2c5719(0x3b1)]=_0x4f3dcd;}}class _0x22b4f7 extends _0x2d9394{constructor(_0x4f9c9e,_0x3e3346){const _0x30276f=_0x3d59;super(_0x30276f(0x46c)+_0x4f9c9e+':\x20'+_0x3e3346[_0x30276f(0x246)]+_0x30276f(0x64c),_0x30276f(0x561),{'type':_0x4f9c9e,'failures':_0x3e3346}),this['name']='OKDBSchemaCollectionError',this['type']=_0x4f9c9e,this[_0x30276f(0x1bf)]=_0x3e3346;}}class _0x304731 extends _0x2d9394{constructor(_0x5de59c,_0x5e72d0,_0x3c3a94,_0x7dbbd7,_0x7e25b1){const _0x1c9de5=_0x3d59;super(_0x1c9de5(0x460)+_0x5de59c+'@'+_0x5e72d0+'.'+_0x3c3a94+_0x1c9de5(0x5fc)+_0x7dbbd7+'@'+_0x7e25b1+_0x1c9de5(0x37f),_0x1c9de5(0x25f),{'sourceType':_0x5de59c,'sourceKey':_0x5e72d0,'fieldPath':_0x3c3a94,'targetType':_0x7dbbd7,'targetKey':_0x7e25b1}),this[_0x1c9de5(0x5c0)]=_0x1c9de5(0x35f),this[_0x1c9de5(0x630)]=_0x5de59c,this['sourceKey']=_0x5e72d0,this[_0x1c9de5(0x201)]=_0x3c3a94,this[_0x1c9de5(0x619)]=_0x7dbbd7,this[_0x1c9de5(0x2b3)]=_0x7e25b1;}}class _0x34d8d5 extends _0x2d9394{constructor(_0x18240b,_0x5349aa,_0x30629b){const _0x291814=_0x3d59;super(_0x291814(0x4f1)+_0x18240b+'@'+_0x5349aa+':\x20'+_0x30629b[_0x291814(0x246)]+_0x291814(0x2b8),_0x291814(0x3ce),{'targetType':_0x18240b,'targetKey':_0x5349aa,'references':_0x30629b}),this['name']=_0x291814(0x3b6),this[_0x291814(0x619)]=_0x18240b,this[_0x291814(0x2b3)]=_0x5349aa,this[_0x291814(0x498)]=_0x30629b;}}class _0x1ae940 extends _0x2d9394{constructor(_0x40b305,_0x4d8752,_0x128432){const _0x1c3b13=_0x3d59;super('Index\x20\x22'+_0x4d8752+_0x1c3b13(0x275)+_0x40b305+_0x1c3b13(0x28f)+_0x128432[_0x1c3b13(0x52f)](_0x37ad27=>_0x37ad27[_0x1c3b13(0x2a3)]+':'+_0x37ad27[_0x1c3b13(0x5c0)])[_0x1c3b13(0x60e)](',\x20'),_0x1c3b13(0x5d6),{'type':_0x40b305,'index':_0x4d8752,'usedBy':_0x128432}),this['name']=_0x1c3b13(0x309);}}return okdbError={'OKDBError':_0x2d9394,'OKDBVersionMismatchError':_0x1142b8,'OKDBNotFoundError':_0x4f7d7c,'OKDBAlreadyExistsError':_0x1156bb,'OKDBInvalidIndexKeyError':_0x3295bb,'OKDBInvalidPrimaryKeyError':_0x5de76b,'OKDBTypeNotRegisteredError':_0x53272b,'OKDBTypeAlreadyRegisteredError':_0x1c8adb,'OKDBIndexNotRegisteredError':_0x2a9823,'OKDBIndexAlreadyRegisteredError':_0x6fdc43,'OKDBInvalidValueError':_0x59abe8,'OKDBUniqueConstraintError':_0x207702,'OKDBSchemaValidationError':_0x407a5e,'OKDBSchemaCollectionError':_0x22b4f7,'OKDBForeignKeyError':_0x304731,'OKDBForeignKeyDeleteError':_0x34d8d5,'OKDBIndexHasConsumersError':_0x1ae940},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5e30e0=_0x38fa5f;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x41a5ea={'PUT':_0x5e30e0(0x1b3),'REMOVE':_0x5e30e0(0x492),'INDEX_DROP':_0x5e30e0(0x41d),'INDEX_REGISTER':_0x5e30e0(0x634),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x5e30e0(0x2e9),'TYPE_DROP':_0x5e30e0(0x3fb),'FTS_REGISTER':_0x5e30e0(0x410),'FTS_DROP':'dropFts','FTS_RESET':'resetFts','SCHEMA_SET':_0x5e30e0(0x609),'SCHEMA_DROP':_0x5e30e0(0x1ba),'TTL_SET':_0x5e30e0(0x65a),'TTL_CLEAR':_0x5e30e0(0x62f)},_0x363792={'SYSTEM_READY':_0x5e30e0(0x489),'SYSTEM_STOPPED':_0x5e30e0(0x5d7),'SYSTEM_CLOCK_CHANGE':_0x5e30e0(0x4c7),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x5e30e0(0x30c),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x5e30e0(0x29a),'SYSTEM_BUS_STATE_CHANGE':_0x5e30e0(0x42e),'ITEM_CREATE':_0x5e30e0(0x66b),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x5e30e0(0x484),'INDEX_RESET':_0x5e30e0(0x237),'INDEX_READY':_0x5e30e0(0x5bb),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x5e30e0(0x4ef),'INDEX_DROP':_0x5e30e0(0x290),'INDEX_REGISTERED':_0x5e30e0(0x469),'FTS_REGISTERED':_0x5e30e0(0x59d),'FTS_DROP':_0x5e30e0(0x2c8),'FTS_RESET':_0x5e30e0(0x2ea),'SCHEMA_SET':_0x5e30e0(0x515),'SCHEMA_DROP':_0x5e30e0(0x5f9),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x5e30e0(0x662),'REF_VIOLATION':_0x5e30e0(0x56b),'REF_VIOLATION_RESOLVED':_0x5e30e0(0x2b9),'SYNC_APPLY':_0x5e30e0(0x36f),'TXN_START':_0x5e30e0(0x5fb),'TXN_END':_0x5e30e0(0x3bc),'TXN_ROLLBACK':_0x5e30e0(0x31f),'TYPE_REGISTERED':_0x5e30e0(0x3a7),'TYPE_DROP':_0x5e30e0(0x21a),'ENV_OPENED':_0x5e30e0(0x1a9),'ENV_REMOVED':_0x5e30e0(0x5fe),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x5e30e0(0x659),'TTL_SET':'ttl:set','TTL_CLEAR':_0x5e30e0(0x3c4),'LICENSE_INVALID':_0x5e30e0(0x406),'LICENSE_ADDED':_0x5e30e0(0x2d3),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x5e30e0(0x326)},_0x1212dd={'CREATING':_0x5e30e0(0x2ee),'RESETTING':'resetting','READY':'ready','DROPPING':_0x5e30e0(0x4fb),'WAITING':'waiting'},_0x51c8a6={'CREATED':'created','STARTING':_0x5e30e0(0x312),'STARTED':_0x5e30e0(0x5dc),'STOPPING':_0x5e30e0(0x3e7),'STOPPED':'stopped'},_0x41b586={'CREATING':_0x5e30e0(0x2ee),'READY':'ready','HALTED':'halted','STOPPED':_0x5e30e0(0x1a6),'RESETTING':'resetting'},_0x20d651=Object[_0x5e30e0(0x23c)]({'POKE':_0x5e30e0(0x389),'DRAIN':_0x5e30e0(0x621),'TYPE_DROP':_0x5e30e0(0x5e0),'PROC':_0x5e30e0(0x1f7),'ENV_RELEASE':_0x5e30e0(0x33f)});return okdbEnums={'BUS_EVENTS':_0x20d651,'CHANGE_ACTIONS':_0x41a5ea,'EVENTS':_0x363792,'INDEX_STATE':_0x1212dd,'OKDB_STATE':_0x51c8a6,'VIEW_STATE':_0x41b586},okdbEnums;}function _0x3d59(_0x5c7dc7,_0x490a92){_0x5c7dc7=_0x5c7dc7-0x1a4;const _0x40939f=_0x4093();let _0x3d5930=_0x40939f[_0x5c7dc7];return _0x3d5930;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x48211a=_0x38fa5f;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x24eaed=require$$1$1,_0x2e6101=require$$1,_0xbe0f22=require$$0$1,_0x418b99=_0x24eaed[_0x48211a(0x591)](_0x2e6101[_0x48211a(0x60e)](__dirname,_0x48211a(0x33a)),_0x48211a(0x50e))[_0x48211a(0x431)](),_0xa6958f=_0xbe0f22[_0x48211a(0x3f2)](_0x418b99)[_0x48211a(0x1c9)]({'type':'spki','format':_0x48211a(0x5ba)}),_0x4b0857=_0xbe0f22[_0x48211a(0x482)](_0x48211a(0x341))[_0x48211a(0x362)](_0xa6958f)['digest'](_0x48211a(0x23d))[_0x48211a(0x20b)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x418b99,'PUB_FINGERPRINT':_0x4b0857},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x565470=_0x38fa5f;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x4037a5=require$$0$1,{OKDBError:_0x5e0a35}=requireOkdbError(),{EVENTS:_0x55ee05}=requireOkdbEnums(),_0x518e89=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x3e8efe,LICENSE_TYPE_INTERNAL:_0x59ee11,OPEN_LICENSE_MAX_DURATION_MS:_0x2dc624}=_0x518e89,_0x4b7273=requireOkdbPubkey(),_0x4582df={'LICENSED_BUILD':_0x565470(0x59a),'PUBLIC_KEY_PEM':_0x4b7273[_0x565470(0x505)],'PUB_FINGERPRINT':_0x4b7273[_0x565470(0x4c4)],'LICENSE_EXPIRED_ACTION':_0x565470(0x1f3)},_0x2ae59e=_0x565470(0x26e),_0x5ca67b={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x26aaa5(_0xe91ceb){const _0x376ee5=_0x565470;!_0xe91ceb[_0x376ee5(0x4b1)](_0x2ae59e)&&await _0xe91ceb['registerType'](_0x2ae59e);}class _0x3a61f0{constructor(_0xfe21c7){const _0x36a263=_0x565470;this[_0x36a263(0x25a)]=_0xfe21c7,this['_active']=null;}async['reload'](){const _0x43a2f0=_0x565470,_0x4da857=this[_0x43a2f0(0x25a)]['_systemEnv'];if(!_0x4da857||!_0x4da857[_0x43a2f0(0x4b1)](_0x2ae59e)){this['_active']=null;return;}const _0x4b3f6e=this['okdb']['id'];let _0x3100f9=null;for(const {key:_0x13f332,value:_0x4f80bd}of _0x4da857['getRange'](_0x2ae59e)){const _0x436459=this[_0x43a2f0(0x32e)](_0x4f80bd,_0x4b3f6e);_0x436459===_0x43a2f0(0x5b4)&&!_0x3100f9&&(_0x3100f9={..._0x4f80bd,'id':_0x13f332,'status':_0x436459});}this['_active']=_0x3100f9;if(this[_0x43a2f0(0x2f7)]&&this[_0x43a2f0(0x2f7)][_0x43a2f0(0x204)]===_0x3e8efe){const _0x826b26=Math[_0x43a2f0(0x5cd)]((this[_0x43a2f0(0x2f7)]['expiresAt']-Date[_0x43a2f0(0x5cc)]())/0x5265c00);this[_0x43a2f0(0x25a)][_0x43a2f0(0x1f3)]?.[_0x43a2f0(0x5d5)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x826b26+_0x43a2f0(0x294),{'feature':_0x43a2f0(0x63a),'licensee':this[_0x43a2f0(0x2f7)][_0x43a2f0(0x1f4)],'expiresAt':new Date(this[_0x43a2f0(0x2f7)][_0x43a2f0(0x462)])[_0x43a2f0(0x4ff)]()});}this['_active']&&this[_0x43a2f0(0x2f7)][_0x43a2f0(0x204)]===_0x59ee11&&this['okdb'][_0x43a2f0(0x1f3)]?.[_0x43a2f0(0x5d5)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x43a2f0(0x63a),'licensee':this[_0x43a2f0(0x2f7)][_0x43a2f0(0x1f4)]});}[_0x565470(0x32e)](_0x2303ac,_0xfa05bf){const _0x32c0b1=_0x565470;if(!_0x2303ac[_0x32c0b1(0x34b)])return _0x32c0b1(0x4db);let _0xc57fcd;try{_0xc57fcd=_0x518e89[_0x32c0b1(0x430)](_0x2303ac[_0x32c0b1(0x34b)]);}catch(_0x78e0c7){return _0x32c0b1(0x4db);}try{const _0x1651e2=_0x4037a5[_0x32c0b1(0x65d)](null,_0xc57fcd[_0x32c0b1(0x265)],_0x4582df[_0x32c0b1(0x505)],_0xc57fcd[_0x32c0b1(0x289)]);if(!_0x1651e2)return'invalid';}catch(_0x5ab3f2){return _0x32c0b1(0x4db);}if(_0xc57fcd[_0x32c0b1(0x579)]['licenseType']===_0x59ee11)return _0x32c0b1(0x5b4);if(_0xc57fcd[_0x32c0b1(0x579)][_0x32c0b1(0x462)]<=Date['now']())return _0x32c0b1(0x2cf);if(_0xc57fcd[_0x32c0b1(0x579)][_0x32c0b1(0x204)]===_0x3e8efe)return'active';if(!_0x2303ac[_0x32c0b1(0x1c1)])return _0x32c0b1(0x5a2);const _0x2e5b18=_0x518e89[_0x32c0b1(0x4d7)]({'tokenString':_0x2303ac[_0x32c0b1(0x1c1)],'nodeId':_0xfa05bf,'rawBlobBuf':_0xc57fcd[_0x32c0b1(0x60f)],'pubKeyPem':_0x4582df['PUBLIC_KEY_PEM'],'pubFingerprint':_0x4582df['PUB_FINGERPRINT']});if(_0x2e5b18[_0x32c0b1(0x242)]===_0x32c0b1(0x398)||_0x2e5b18[_0x32c0b1(0x242)]==='SIG_INVALID')return'wrong_node';if(_0x2e5b18[_0x32c0b1(0x242)]===_0x32c0b1(0x48e))return'expired';if(!_0x2e5b18['valid'])return _0x32c0b1(0x397);return'active';}get[_0x565470(0x5b4)](){const _0x42822f=_0x565470;return this[_0x42822f(0x2f7)];}get[_0x565470(0x472)](){const _0x152726=_0x565470;return this[_0x152726(0x2f7)]??_0x5ca67b;}[_0x565470(0x5a9)](_0x2cca9f){const _0x960fd5=_0x565470;if(_0x4582df[_0x960fd5(0x264)]!==_0x960fd5(0x59a))return;const _0xa5de99=this[_0x960fd5(0x472)];if(!_0xa5de99[_0x960fd5(0x2fe)]?.[_0x2cca9f]){const _0x60110b=_0xa5de99[_0x960fd5(0x4e5)]?_0x960fd5(0x49b)+_0x2cca9f+_0x960fd5(0x622)+_0x2cca9f+'\x22\x20to\x20enable\x20it.':_0x960fd5(0x4cf)+_0x2cca9f+_0x960fd5(0x219)+_0x2cca9f+'\x22.';throw new _0x5e0a35(_0x60110b,_0x960fd5(0x295),{'feature':_0x2cca9f});}}['isFeatureEnabled'](_0x2cc073){const _0x1a4717=_0x565470;if(_0x4582df[_0x1a4717(0x264)]!=='true')return!![];return!!this[_0x1a4717(0x472)][_0x1a4717(0x2fe)]?.[_0x2cc073];}[_0x565470(0x573)](_0x22ca71,_0x365fc1){const _0x4907ac=_0x565470;if(_0x4582df[_0x4907ac(0x264)]!==_0x4907ac(0x59a))return;const _0x539524=this[_0x4907ac(0x472)],_0x1085fb=_0x539524[_0x4907ac(0x22a)]?.[_0x22ca71];if(_0x1085fb===null||_0x1085fb===undefined||_0x1085fb===0x0)return;if(_0x365fc1>=_0x1085fb)throw new _0x5e0a35(_0x4907ac(0x4fc)+_0x22ca71+'\x20('+_0x365fc1+'/'+_0x1085fb+')',_0x4907ac(0x493),{'limit':_0x22ca71,'current':_0x365fc1,'max':_0x1085fb});}async[_0x565470(0x5ac)](_0x209c0f){const _0x514298=_0x565470;let _0x3c2eaf;try{_0x3c2eaf=_0x518e89[_0x514298(0x430)](_0x209c0f);}catch(_0x157e18){throw new _0x5e0a35(_0x514298(0x4da)+_0x157e18[_0x514298(0x453)],_0x514298(0x40b));}let _0x12ecc8;try{_0x12ecc8=_0x4037a5[_0x514298(0x65d)](null,_0x3c2eaf[_0x514298(0x265)],_0x4582df['PUBLIC_KEY_PEM'],_0x3c2eaf['sig']);}catch(_0x44a910){throw new _0x5e0a35('License\x20signature\x20invalid:\x20'+_0x44a910[_0x514298(0x453)],_0x514298(0x40b));}if(!_0x12ecc8)throw new _0x5e0a35(_0x514298(0x600)+(_0x514298(0x269)+_0x4582df[_0x514298(0x4c4)]+'.\x20')+_0x514298(0x2e4),_0x514298(0x40b),{'expectedFingerprint':_0x4582df['PUB_FINGERPRINT']});if(_0x3c2eaf[_0x514298(0x579)][_0x514298(0x204)]===_0x3e8efe){const _0xe1eb88=_0x3c2eaf[_0x514298(0x579)][_0x514298(0x462)]-_0x3c2eaf[_0x514298(0x579)]['issuedAt'];if(_0xe1eb88>_0x2dc624)throw new _0x5e0a35('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math['ceil'](_0xe1eb88/(0x1e*0x5265c00))+_0x514298(0x34d),_0x514298(0x40b));}const _0x397465=this['okdb']['_systemEnv'];await _0x26aaa5(_0x397465);const _0x56d687=_0x518e89[_0x514298(0x4df)](_0x3c2eaf[_0x514298(0x60f)])[_0x514298(0x3c5)](_0x514298(0x23d));for(const {value:_0x354968}of _0x397465[_0x514298(0x4cb)](_0x2ae59e)){if(_0x354968[_0x514298(0x467)]===_0x56d687)throw new _0x5e0a35(_0x514298(0x39e),_0x514298(0x40b));}const _0x47c66b=_0x4037a5[_0x514298(0x4cc)](),_0x18b78c={'blob':_0x209c0f,'activation':null,'addedAt':Date[_0x514298(0x5cc)](),'_licenseHash':_0x56d687,'licensee':_0x3c2eaf['decoded']['licensee'],'expiresAt':_0x3c2eaf['decoded'][_0x514298(0x462)],'features':_0x3c2eaf[_0x514298(0x579)]['features'],'limits':_0x3c2eaf['decoded']['limits'],'licenseType':_0x3c2eaf['decoded'][_0x514298(0x204)]};return await _0x397465[_0x514298(0x1b3)](_0x2ae59e,_0x47c66b,_0x18b78c),{'id':_0x47c66b,..._0x18b78c};}async[_0x565470(0x60d)](_0x4e9cf3){const _0x3d90b9=_0x565470;let _0x5fc0b1;try{_0x5fc0b1=_0x518e89[_0x3d90b9(0x235)](_0x4e9cf3);}catch(_0x161e4e){throw new _0x5e0a35(_0x3d90b9(0x2eb)+_0x161e4e['message'],_0x3d90b9(0x23f));}const _0x1abe75=_0x5fc0b1[_0x3d90b9(0x4df)][_0x3d90b9(0x3c5)](_0x3d90b9(0x23d)),_0x1c0045=this[_0x3d90b9(0x25a)][_0x3d90b9(0x4a1)];if(!_0x1c0045||!_0x1c0045[_0x3d90b9(0x4b1)](_0x2ae59e))throw new _0x5e0a35(_0x3d90b9(0x1b4),'LICENSE_ACTIVATION_INVALID');let _0x2ce5de=null,_0x277bd6=null;for(const {key:_0x37666d,value:_0x10f4ef}of _0x1c0045['getRange'](_0x2ae59e)){if(_0x10f4ef[_0x3d90b9(0x467)]===_0x1abe75){_0x2ce5de=_0x37666d,_0x277bd6=_0x10f4ef;break;}}if(!_0x2ce5de)throw new _0x5e0a35(_0x3d90b9(0x1b4),_0x3d90b9(0x23f));const {rawBuf:_0x418678}=_0x518e89['decodeLicenseBlob'](_0x277bd6[_0x3d90b9(0x34b)]),_0x21003b=_0x518e89[_0x3d90b9(0x4d7)]({'tokenString':_0x4e9cf3,'nodeId':this['okdb']['id'],'rawBlobBuf':_0x418678,'pubKeyPem':_0x4582df[_0x3d90b9(0x505)],'pubFingerprint':_0x4582df['PUB_FINGERPRINT']});if(!_0x21003b[_0x3d90b9(0x552)])throw new _0x5e0a35('Activation\x20invalid:\x20'+_0x21003b[_0x3d90b9(0x242)],_0x3d90b9(0x23f),{'reason':_0x21003b['reason']});const _0x36ff2f={..._0x277bd6,'activation':_0x4e9cf3};return await _0x1c0045[_0x3d90b9(0x362)](_0x2ae59e,_0x2ce5de,_0x36ff2f),{'id':_0x2ce5de,..._0x36ff2f};}async[_0x565470(0x529)](_0x3f71c0){const _0x3160fd=_0x565470,_0x5ea746=this[_0x3160fd(0x25a)][_0x3160fd(0x4a1)];if(!_0x5ea746||!_0x5ea746[_0x3160fd(0x4b1)](_0x2ae59e))return;await _0x5ea746['remove'](_0x2ae59e,_0x3f71c0);}async[_0x565470(0x407)](){const _0x2f6b17=_0x565470,_0x43311c=this[_0x2f6b17(0x25a)][_0x2f6b17(0x4a1)];if(!_0x43311c||!_0x43311c[_0x2f6b17(0x4b1)](_0x2ae59e))return[];const _0x4bc2f0=this['okdb']['id'],_0xfe7fdd=[];for(const {key:_0x4c1aa0,value:_0x5875da}of _0x43311c[_0x2f6b17(0x4cb)](_0x2ae59e)){const _0x4f1c65=this['_computeStatus'](_0x5875da,_0x4bc2f0);_0xfe7fdd['push']({..._0x5875da,'id':_0x4c1aa0,'status':_0x4f1c65});}return _0xfe7fdd;}[_0x565470(0x4e0)](){const _0x20ff64=_0x565470,_0x303e05=this['okdb']['_systemEnv'];if(!_0x303e05||!_0x303e05['hasType'](_0x2ae59e))return[];const _0x322120=this[_0x20ff64(0x25a)]['id'],_0x2f878e=[];for(const {key:_0x14c702,value:_0x2b8046}of _0x303e05['getRange'](_0x2ae59e)){if(_0x2b8046[_0x20ff64(0x467)]){if(_0x2b8046[_0x20ff64(0x204)]===_0x3e8efe)_0x2f878e[_0x20ff64(0x2c6)]({'licenseId':_0x14c702,'pin':null});else{const _0x3f6f9d=Buffer[_0x20ff64(0x5f6)](_0x2b8046[_0x20ff64(0x467)],_0x20ff64(0x23d)),{pin:_0x43c29e}=_0x518e89['derivePin'](_0x322120,_0x3f6f9d,_0x4582df[_0x20ff64(0x4c4)]);_0x2f878e[_0x20ff64(0x2c6)]({'licenseId':_0x14c702,'pin':_0x43c29e});}}}return _0x2f878e;}async['recheck'](){const _0x7c962d=_0x565470,_0x1c954a=this[_0x7c962d(0x2f7)];await this[_0x7c962d(0x2bb)]();if(this[_0x7c962d(0x2f7)]&&this[_0x7c962d(0x2f7)]['licenseType']===_0x3e8efe){const _0x34b500=Math[_0x7c962d(0x5cd)]((this[_0x7c962d(0x2f7)][_0x7c962d(0x462)]-Date[_0x7c962d(0x5cc)]())/0x5265c00);this[_0x7c962d(0x25a)]['log']?.[_0x7c962d(0x5d5)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x34b500+_0x7c962d(0x294),{'feature':_0x7c962d(0x63a),'licensee':this[_0x7c962d(0x2f7)][_0x7c962d(0x1f4)],'expiresAt':new Date(this[_0x7c962d(0x2f7)][_0x7c962d(0x462)])['toISOString']()});}this[_0x7c962d(0x2f7)]&&this[_0x7c962d(0x2f7)][_0x7c962d(0x204)]===_0x59ee11&&this[_0x7c962d(0x25a)][_0x7c962d(0x1f3)]?.[_0x7c962d(0x5d5)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x7c962d(0x63a),'licensee':this[_0x7c962d(0x2f7)][_0x7c962d(0x1f4)]});if(_0x1c954a&&!this[_0x7c962d(0x2f7)]){this[_0x7c962d(0x25a)][_0x7c962d(0x1f3)]?.['warn'](_0x7c962d(0x382),{'feature':_0x7c962d(0x63a)}),this[_0x7c962d(0x25a)][_0x7c962d(0x5a6)]?.['emit'](_0x55ee05['LICENSE_INVALID'],{'previous':_0x1c954a});const _0x17f399=this[_0x7c962d(0x25a)][_0x7c962d(0x2dc)]?.[_0x7c962d(0x2f3)]??_0x4582df[_0x7c962d(0x24a)];_0x17f399===_0x7c962d(0x253)&&(this[_0x7c962d(0x25a)][_0x7c962d(0x1f3)]?.[_0x7c962d(0x2a2)](_0x7c962d(0x40c),{'feature':'license'}),this['okdb']['close']()[_0x7c962d(0x5c5)](()=>{})[_0x7c962d(0x361)](()=>process['exit'](0x1)));}}}return okdbLicense={'LicenseChecker':_0x3a61f0,'_C':_0x4582df},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x1ac697=_0x38fa5f;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x2aae4c=require$$0$3,_0x4de2e5=require$$1$1,_0x18b4c8=require$$0,_0x1c9cb7=require$$1,_0x4c0023=_0x1c9cb7['join'](_0x18b4c8[_0x1ac697(0x37c)](),_0x1ac697(0x3cc)),_0x176655=0x3e8,_0x4bd506={'reset':_0x1ac697(0x4a2),'bold':'\x1b[1m','dim':_0x1ac697(0x244),'red':_0x1ac697(0x671),'green':_0x1ac697(0x349),'yellow':_0x1ac697(0x452),'blue':_0x1ac697(0x646),'magenta':_0x1ac697(0x3be),'cyan':'\x1b[36m','white':'\x1b[37m','gray':_0x1ac697(0x639)},_0xcd735d=!process[_0x1ac697(0x4dd)][_0x1ac697(0x228)]||!!process.env.NO_COLOR,_0x4a2b73=(_0x117224,_0x32c7bc)=>_0xcd735d?_0x32c7bc:''+_0x117224+_0x32c7bc+_0x4bd506[_0x1ac697(0x413)],_0x57a7f4={'error':_0x4bd506['red'],'warn':_0x4bd506[_0x1ac697(0x46f)],'info':_0x4bd506['cyan'],'debug':_0x4bd506[_0x1ac697(0x2c1)]},_0x5db5ed={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x576f86(_0x52381f,_0x587c4e=_0x1ac697(0x1bb)){const _0x50b7d6=_0x1ac697,{level:_0x270e60,msg:_0x946c4,meta:_0x15c2c7,context:_0x182b53,ts:_0x29a642}=_0x52381f;if((_0x5db5ed[_0x270e60]??0x1)<(_0x5db5ed[_0x587c4e]??0x1))return;const _0x549500=_0x4a2b73(_0x4bd506['gray'],new Date(_0x29a642)[_0x50b7d6(0x4ff)]()),_0x57cc60=_0x4a2b73(_0x57a7f4[_0x270e60]??_0x4bd506[_0x50b7d6(0x5bf)],_0x270e60['padEnd'](0x5));let _0x4f2b54='\x20\x20'+_0x549500+'\x20'+_0x4a2b73(_0x4bd506[_0x50b7d6(0x303)],_0x57cc60)+'\x20'+_0x946c4;if(_0x15c2c7&&Object[_0x50b7d6(0x60b)](_0x15c2c7)[_0x50b7d6(0x246)]>0x0){const _0x4b8502=Object[_0x50b7d6(0x248)](_0x15c2c7)['map'](([_0x4649ca,_0x3a73f2])=>_0x4649ca+'='+_0x3a73f2)[_0x50b7d6(0x60e)]('\x20');_0x4f2b54+=_0x4a2b73(_0x4bd506[_0x50b7d6(0x250)],_0x50b7d6(0x521)+_0x4b8502+']');}if(_0x182b53!==undefined){const _0x14f7f7=typeof _0x182b53===_0x50b7d6(0x339)?JSON[_0x50b7d6(0x31c)](_0x182b53):String(_0x182b53);_0x4f2b54+=_0x4a2b73(_0x4bd506[_0x50b7d6(0x250)],'\x20\x20'+_0x14f7f7);}const _0x48b7da=_0x270e60==='error'||_0x270e60===_0x50b7d6(0x5d5)?process[_0x50b7d6(0x504)]['write'][_0x50b7d6(0x385)](process[_0x50b7d6(0x504)]):process[_0x50b7d6(0x4dd)][_0x50b7d6(0x4ae)][_0x50b7d6(0x385)](process['stdout']);_0x48b7da(_0x4f2b54+'\x0a');}function _0x3923eb(_0x4da8b5,_0x9f5e03){const _0x5e3fd7=_0x1ac697;if(_0x4da8b5===0xcc||_0x4da8b5>=0xc8&&_0x4da8b5<0x12c&&!_0x9f5e03){console[_0x5e3fd7(0x1f3)]('\x0a\x20\x20'+_0x4a2b73(_0x4bd506[_0x5e3fd7(0x50f)],'✓')+'\x0a');return;}if(_0x4da8b5>=0x190||_0x9f5e03?.['error']){const _0x28f517=_0x9f5e03?.[_0x5e3fd7(0x2a2)]??_0x9f5e03?.[_0x5e3fd7(0x453)]??'HTTP\x20'+_0x4da8b5;console[_0x5e3fd7(0x1f3)]('\x0a\x20\x20'+_0x4a2b73(_0x4bd506[_0x5e3fd7(0x319)],'✗')+'\x20'+_0x4a2b73(_0x4bd506[_0x5e3fd7(0x303)]+_0x4bd506[_0x5e3fd7(0x319)],String(_0x4da8b5))+'\x20\x20'+_0x28f517+'\x0a');return;}const _0x15ea64=Object['prototype'][_0x5e3fd7(0x350)][_0x5e3fd7(0x574)](_0x9f5e03??{},'result')?_0x9f5e03[_0x5e3fd7(0x41a)]:_0x9f5e03,_0x41c319=_0x9f5e03?.['meta'];console[_0x5e3fd7(0x1f3)](''),_0x15a29c(_0x15ea64,'\x20\x20');if(_0x41c319?.[_0x5e3fd7(0x2ad)]!=null||_0x41c319?.[_0x5e3fd7(0x342)]!=null){const _0xd8bddd=[];if(_0x41c319[_0x5e3fd7(0x2ad)]!=null)_0xd8bddd['push'](_0x41c319[_0x5e3fd7(0x2ad)]+_0x5e3fd7(0x563)+(_0x41c319[_0x5e3fd7(0x2ad)]!==0x1?'s':''));if(_0x41c319[_0x5e3fd7(0x342)]!=null)_0xd8bddd['push'](_0x41c319[_0x5e3fd7(0x342)]+'ms');console['log'](_0x5e3fd7(0x59e)+_0x4a2b73(_0x4bd506[_0x5e3fd7(0x250)],_0xd8bddd[_0x5e3fd7(0x60e)](_0x5e3fd7(0x61c))));}console[_0x5e3fd7(0x1f3)]('');}function _0x15a29c(_0x190f30,_0x4a2f5e=''){const _0x4d5790=_0x1ac697;if(_0x190f30===null||_0x190f30===undefined){console[_0x4d5790(0x1f3)](_0x4a2f5e+_0x4a2b73(_0x4bd506[_0x4d5790(0x250)],'(null)'));return;}if(Array[_0x4d5790(0x4d8)](_0x190f30)){if(_0x190f30[_0x4d5790(0x246)]===0x0){console[_0x4d5790(0x1f3)](_0x4a2f5e+_0x4a2b73(_0x4bd506[_0x4d5790(0x250)],_0x4d5790(0x667)));return;}if(_0x190f30[_0x4d5790(0x37e)](_0xc5151e=>_0xc5151e&&typeof _0xc5151e==='object'&&'key'in _0xc5151e&&_0x4d5790(0x5b0)in _0xc5151e)){_0x5484e9(_0x190f30,_0x4a2f5e);return;}if(_0x190f30[_0x4d5790(0x37e)](_0xd665ec=>_0xd665ec&&typeof _0xd665ec===_0x4d5790(0x339)&&'type'in _0xd665ec&&_0x4d5790(0x2ad)in _0xd665ec)){_0xef93a3(_0x190f30,_0x4a2f5e);return;}if(_0x190f30[_0x4d5790(0x37e)](_0x268414=>typeof _0x268414!==_0x4d5790(0x339)||_0x268414===null)){_0x190f30[_0x4d5790(0x470)]((_0x4eeae4,_0x5ce72d)=>console[_0x4d5790(0x1f3)](_0x4a2f5e+_0x4a2b73(_0x4bd506[_0x4d5790(0x2c1)],_0x5ce72d+0x1+'.')+'\x20'+_0x4a2b73(_0x4bd506[_0x4d5790(0x5bf)],String(_0x4eeae4))));return;}_0x190f30[_0x4d5790(0x470)]((_0x5cfb37,_0x2c5a82)=>{const _0x5a75bc=_0x4d5790;console[_0x5a75bc(0x1f3)](_0x4a2f5e+_0x4a2b73(_0x4bd506['dim'],'['+_0x2c5a82+']'));if(typeof _0x5cfb37===_0x5a75bc(0x339)&&_0x5cfb37!==null)_0x37f05a(_0x5cfb37,_0x4a2f5e+'\x20\x20');else console['log'](_0x4a2f5e+'\x20\x20'+String(_0x5cfb37));});return;}if(typeof _0x190f30===_0x4d5790(0x339)){if(_0x4d5790(0x660)in _0x190f30&&_0x4d5790(0x5b0)in _0x190f30&&Object[_0x4d5790(0x60b)](_0x190f30)[_0x4d5790(0x246)]<=0x3){console[_0x4d5790(0x1f3)](_0x4a2f5e+_0x4a2b73(_0x4bd506[_0x4d5790(0x303)]+_0x4bd506[_0x4d5790(0x301)],String(_0x190f30[_0x4d5790(0x660)])));const _0x335acc=_0x190f30[_0x4d5790(0x5b0)];if(_0x335acc&&typeof _0x335acc===_0x4d5790(0x339))_0x37f05a(_0x335acc,_0x4a2f5e);else console['log'](_0x4a2f5e+_0x4a2b73(_0x4bd506[_0x4d5790(0x5bf)],String(_0x335acc)));return;}_0x37f05a(_0x190f30,_0x4a2f5e);return;}console[_0x4d5790(0x1f3)](_0x4a2f5e+_0x4a2b73(_0x4bd506[_0x4d5790(0x5bf)],String(_0x190f30)));}function _0x37f05a(_0x4d33da,_0x277fba=''){const _0x155f92=_0x1ac697,_0x271a54=Object[_0x155f92(0x248)](_0x4d33da);if(_0x271a54[_0x155f92(0x246)]===0x0){console[_0x155f92(0x1f3)](_0x277fba+_0x4a2b73(_0x4bd506['dim'],'{}'));return;}const _0x5159cb=Math[_0x155f92(0x356)](0x1c,Math[_0x155f92(0x4ca)](..._0x271a54[_0x155f92(0x52f)](([_0x324b32])=>_0x324b32['length'])));for(const [_0xca8cc7,_0x57c5ac]of _0x271a54){const _0x462826=_0x4a2b73(_0x4bd506[_0x155f92(0x301)],_0xca8cc7['padEnd'](_0x5159cb));if(_0x57c5ac===null||_0x57c5ac===undefined)console['log'](_0x277fba+_0x462826+'\x20\x20'+_0x4a2b73(_0x4bd506[_0x155f92(0x250)],_0x155f92(0x1d0)));else{if(typeof _0x57c5ac===_0x155f92(0x339)){const _0x4fc96b=JSON[_0x155f92(0x31c)](_0x57c5ac);_0x4fc96b[_0x155f92(0x246)]<=0x50?console['log'](_0x277fba+_0x462826+'\x20\x20'+_0x4a2b73(_0x4bd506[_0x155f92(0x250)],_0x4fc96b)):(console[_0x155f92(0x1f3)](_0x277fba+_0x462826),_0x15a29c(_0x57c5ac,_0x277fba+'\x20\x20'));}else{const _0x3d465a=typeof _0x57c5ac===_0x155f92(0x5b5)?_0x4a2b73(_0x57c5ac?_0x4bd506[_0x155f92(0x50f)]:_0x4bd506[_0x155f92(0x46f)],String(_0x57c5ac)):typeof _0x57c5ac==='number'?_0x4a2b73(_0x4bd506[_0x155f92(0x61a)],String(_0x57c5ac)):_0x4a2b73(_0x4bd506[_0x155f92(0x5bf)],String(_0x57c5ac));console[_0x155f92(0x1f3)](_0x277fba+_0x462826+'\x20\x20'+_0x3d465a);}}}}function _0x5484e9(_0x2fb74f,_0x5be196=''){const _0x425613=_0x1ac697,_0x2fab9a=Math['min'](0x20,Math['max'](..._0x2fb74f[_0x425613(0x52f)](_0x413fdc=>String(_0x413fdc[_0x425613(0x660)])[_0x425613(0x246)])));for(const {key:_0x4214a2,value:_0x450b86,score:_0x2d7743,clock:_0xee0033}of _0x2fb74f){const _0x2d10eb=_0x4a2b73(_0x4bd506[_0x425613(0x303)]+_0x4bd506[_0x425613(0x301)],String(_0x4214a2)[_0x425613(0x3b8)](_0x2fab9a)),_0x4c6a60=_0x450b86==null?_0x4a2b73(_0x4bd506[_0x425613(0x250)],_0x425613(0x1d0)):typeof _0x450b86===_0x425613(0x339)?_0x4a2b73(_0x4bd506[_0x425613(0x250)],JSON[_0x425613(0x31c)](_0x450b86)):_0x4a2b73(_0x4bd506['white'],String(_0x450b86)),_0x288a03=_0x2d7743!=null?_0x4a2b73(_0x4bd506[_0x425613(0x2c1)],_0x425613(0x598)+_0x2d7743[_0x425613(0x3d0)](0x4)):'',_0x54ee6a=_0xee0033!=null?_0x4a2b73(_0x4bd506['gray'],_0x425613(0x5a0)+_0xee0033):'';console['log'](_0x5be196+_0x2d10eb+'\x20\x20'+_0x4c6a60+_0x288a03+_0x54ee6a);}}function _0xef93a3(_0x3daad2,_0x3d3b80=''){const _0x34afd3=_0x1ac697,_0x51b079=Math[_0x34afd3(0x356)](0x20,Math[_0x34afd3(0x4ca)](..._0x3daad2[_0x34afd3(0x52f)](_0x1cfca5=>_0x1cfca5['type']['length'])));for(const {type:_0x38b364,count:_0x4a6efc,fields:_0x3529b6}of _0x3daad2){if(_0x38b364[_0x34afd3(0x4f7)]('~'))continue;const _0x5df44a=_0x4a2b73(_0x4bd506['bold']+_0x4bd506[_0x34afd3(0x301)],_0x38b364['padEnd'](_0x51b079)),_0x80672d=_0x4a2b73(_0x4bd506[_0x34afd3(0x61a)],String(_0x4a6efc)[_0x34afd3(0x35e)](0x6))+_0x4a2b73(_0x4bd506['dim'],_0x34afd3(0x381)),_0x33a2b1=_0x3529b6&&Object[_0x34afd3(0x60b)](_0x3529b6)[_0x34afd3(0x246)]?_0x4a2b73(_0x4bd506[_0x34afd3(0x250)],_0x34afd3(0x3a3)+Object[_0x34afd3(0x60b)](_0x3529b6)[_0x34afd3(0x20b)](0x0,0x6)[_0x34afd3(0x60e)](',\x20')+(Object[_0x34afd3(0x60b)](_0x3529b6)[_0x34afd3(0x246)]>0x6?'…':'')):'';console[_0x34afd3(0x1f3)](_0x3d3b80+_0x5df44a+'\x20\x20'+_0x80672d+_0x33a2b1);}}const _0x19118b=[_0x1ac697(0x42b),_0x1ac697(0x296),'queue/',_0x1ac697(0x5d0),_0x1ac697(0x54c),_0x1ac697(0x3b9)];function _0x45f147(_0x37aa06,_0x56bff8){const _0x1bf8cf=_0x1ac697;if(_0x37aa06[_0x1bf8cf(0x4f7)](_0x1bf8cf(0x4d9)))return _0x37aa06;if(_0x37aa06['startsWith']('/'))return _0x1bf8cf(0x370)+_0x37aa06;if(_0x37aa06['startsWith'](_0x1bf8cf(0x4dc)))return'/api/'+_0x37aa06;const _0x401893=_0x19118b[_0x1bf8cf(0x26d)](_0x33eca4=>_0x37aa06===_0x33eca4[_0x1bf8cf(0x213)](/\/$/,'')||_0x37aa06[_0x1bf8cf(0x4f7)](_0x33eca4));return _0x401893?_0x1bf8cf(0x616)+_0x56bff8+'/'+_0x37aa06:_0x1bf8cf(0x4d9)+_0x37aa06;}function _0xed78d0(_0x10daa7){const _0x5e851c=_0x1ac697,_0x343692={},_0x284d2f=[];let _0x6faf22=0x0;while(_0x6faf22<_0x10daa7[_0x5e851c(0x246)]){if((_0x10daa7[_0x6faf22]===_0x5e851c(0x2e8)||_0x10daa7[_0x6faf22]==='-e')&&_0x10daa7[_0x6faf22+0x1]&&!_0x10daa7[_0x6faf22+0x1][_0x5e851c(0x4f7)]('-'))_0x343692[_0x5e851c(0x1c6)]=_0x10daa7[++_0x6faf22];else _0x10daa7[_0x6faf22]===_0x5e851c(0x210)||_0x10daa7[_0x6faf22]==='-h'?_0x343692['help']=!![]:_0x284d2f[_0x5e851c(0x2c6)](_0x10daa7[_0x6faf22]);_0x6faf22++;}return{'flags':_0x343692,'rest':_0x284d2f};}const _0x151d31={'system':'System','envs':_0x1ac697(0x623),'types':'Types','data':_0x1ac697(0x29c),'indexes':_0x1ac697(0x433),'fts':_0x1ac697(0x5f3),'sync':'Sync','queue':_0x1ac697(0x2f0),'files':_0x1ac697(0x2f9),'embeddings':_0x1ac697(0x233),'engines':'Engines','admin':_0x1ac697(0x60c),'event':_0x1ac697(0x377),'processor':_0x1ac697(0x2db)},_0x2485bd=[_0x1ac697(0x4e9),_0x1ac697(0x4b4),_0x1ac697(0x42b),_0x1ac697(0x2ae),_0x1ac697(0x2b4),_0x1ac697(0x325),'sync',_0x1ac697(0x4f9),'files',_0x1ac697(0x440),_0x1ac697(0x3ae),'admin'];function _0x3a077a(_0x1bebb5){const _0x32c7c0=_0x1ac697;return _0x1bebb5[_0x32c7c0(0x213)](/^\/api/,'')[_0x32c7c0(0x213)](/^\[\/env\/:env=[^\]]*\]/,_0x32c7c0(0x22b))['replace'](/^\/env\/:env/,'env/:env')[_0x32c7c0(0x213)](/^\//,'');}function _0xc2426f(_0x1d86ae,_0x5f326c=''){const _0x298dd4=_0x1ac697,_0x29b89a=_0x1d86ae[_0x298dd4(0x4f0)]['listRoutes']()['filter'](_0x4bb55f=>!_0x4bb55f[_0x298dd4(0x3f9)]?.[_0x298dd4(0x547)]),_0x5ace30=_0x5f326c?_0x29b89a['filter'](_0x53432e=>_0x53432e[_0x298dd4(0x60a)][_0x298dd4(0x56c)]()[_0x298dd4(0x576)](_0x5f326c[_0x298dd4(0x56c)]())||(_0x253efb(_0x53432e)??'')[_0x298dd4(0x56c)]()[_0x298dd4(0x576)](_0x5f326c[_0x298dd4(0x56c)]())||_0x1b7d83(_0x53432e)['some'](_0x32cad1=>_0x32cad1[_0x298dd4(0x56c)]()['includes'](_0x5f326c[_0x298dd4(0x56c)]()))):_0x29b89a;if(!_0x5ace30['length']){console['log'](_0x4a2b73(_0x4bd506[_0x298dd4(0x46f)],_0x298dd4(0x24c)+_0x5f326c+'\x22\x0a'));return;}const _0x3fb5a7=new Map();for(const _0x526f6c of _0x5ace30){const _0x1d5cbd=_0x1b7d83(_0x526f6c)[0x0]??_0x298dd4(0x519);if(!_0x3fb5a7[_0x298dd4(0x510)](_0x1d5cbd))_0x3fb5a7[_0x298dd4(0x24b)](_0x1d5cbd,[]);_0x3fb5a7[_0x298dd4(0x1fe)](_0x1d5cbd)[_0x298dd4(0x2c6)](_0x526f6c);}const _0x404f6a=[..._0x2485bd[_0x298dd4(0x629)](_0x57c736=>_0x3fb5a7['has'](_0x57c736)),...[..._0x3fb5a7[_0x298dd4(0x60b)]()]['filter'](_0x4983ac=>!_0x2485bd[_0x298dd4(0x576)](_0x4983ac))];console[_0x298dd4(0x1f3)]('');for(const _0x1a6b78 of _0x404f6a){const _0x1717c3=_0x3fb5a7[_0x298dd4(0x1fe)](_0x1a6b78);if(!_0x1717c3?.[_0x298dd4(0x246)])continue;console[_0x298dd4(0x1f3)](_0x4a2b73(_0x4bd506[_0x298dd4(0x303)],'\x20\x20'+(_0x151d31[_0x1a6b78]??_0x1a6b78)));for(const _0x539f23 of _0x1717c3){const _0x22410f=_0x4a2b73(_0x4bd506[_0x298dd4(0x61a)],_0x539f23[_0x298dd4(0x594)]['padEnd'](0x7)),_0x2f1b92=_0x4a2b73(_0x4bd506[_0x298dd4(0x301)],_0x3a077a(_0x539f23[_0x298dd4(0x60a)])),_0x59d48d=_0x253efb(_0x539f23)?_0x4a2b73(_0x4bd506[_0x298dd4(0x250)],'\x20\x20'+_0x253efb(_0x539f23)):'',_0x123326=_0x539f23[_0x298dd4(0x4ba)]?.['id']?_0x4a2b73(_0x4bd506['gray'],_0x298dd4(0x521)+_0x539f23[_0x298dd4(0x4ba)]['id']+']'):'';console[_0x298dd4(0x1f3)](_0x298dd4(0x632)+_0x22410f+'\x20'+_0x2f1b92+_0x59d48d+_0x123326);}console[_0x298dd4(0x1f3)]('');}}function _0x141921(_0x162c1f,_0x238997){const _0x31b3c4=_0x1ac697,_0x489850=_0x238997['replace'](/^\/api(\/env\/[^/]+)?\//,'')[_0x31b3c4(0x5df)]('/')[0x0],_0x153453=_0x162c1f[_0x31b3c4(0x4f0)][_0x31b3c4(0x1ca)]()[_0x31b3c4(0x629)](_0x1611cf=>_0x1611cf[_0x31b3c4(0x60a)][_0x31b3c4(0x56c)]()[_0x31b3c4(0x576)](_0x489850['toLowerCase']()));if(!_0x153453[_0x31b3c4(0x246)]){console[_0x31b3c4(0x1f3)](_0x4a2b73(_0x4bd506['yellow'],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x238997+'\x0a'));return;}console['log']('');for(const _0x2e8f29 of _0x153453[_0x31b3c4(0x20b)](0x0,0xc)){for(const _0x1d2f6b of _0x1322c1(_0x2e8f29)){console[_0x31b3c4(0x1f3)](_0x1d2f6b);}console[_0x31b3c4(0x1f3)]('');}}function _0x253efb(_0x18a93e){const _0x1074bf=_0x1ac697;return _0x18a93e[_0x1074bf(0x4ba)]?.[_0x1074bf(0x32d)]??_0x18a93e['meta']?.[_0x1074bf(0x32d)]??'';}function _0x54e77f(_0x2bd13d){const _0x33e0ac=_0x1ac697;return _0x2bd13d[_0x33e0ac(0x4ba)]?.[_0x33e0ac(0x1d3)]??_0x2bd13d[_0x33e0ac(0x3f9)]?.[_0x33e0ac(0x1d3)]??'';}function _0x1b7d83(_0x361075){const _0x343224=_0x1ac697;return _0x361075[_0x343224(0x4ba)]?.[_0x343224(0x422)]?.[_0x343224(0x246)]?_0x361075[_0x343224(0x4ba)][_0x343224(0x422)]:_0x361075[_0x343224(0x3f9)]?.[_0x343224(0x422)]??[];}function _0x1322c1(_0x1fdbdb){const _0x324123=_0x1ac697,_0x51d35f=[];_0x51d35f[_0x324123(0x2c6)]('\x20\x20'+_0x4a2b73(_0x4bd506[_0x324123(0x303)]+_0x4bd506['magenta'],_0x1fdbdb[_0x324123(0x594)]['padEnd'](0x7))+'\x20'+_0x4a2b73(_0x4bd506[_0x324123(0x303)]+_0x4bd506[_0x324123(0x301)],_0x1fdbdb[_0x324123(0x60a)]));_0x1fdbdb[_0x324123(0x4ba)]?.['id']&&_0x51d35f[_0x324123(0x2c6)](_0x324123(0x293)+_0x4a2b73(_0x4bd506[_0x324123(0x2c1)],_0x324123(0x47b)+_0x1fdbdb[_0x324123(0x4ba)]['id']));_0x253efb(_0x1fdbdb)&&_0x51d35f[_0x324123(0x2c6)](_0x324123(0x293)+_0x4a2b73(_0x4bd506[_0x324123(0x5bf)],_0x253efb(_0x1fdbdb)));_0x54e77f(_0x1fdbdb)&&_0x51d35f[_0x324123(0x2c6)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4a2b73(_0x4bd506[_0x324123(0x250)],_0x54e77f(_0x1fdbdb)));_0x1b7d83(_0x1fdbdb)['length']&&_0x51d35f[_0x324123(0x2c6)](_0x324123(0x293)+_0x4a2b73(_0x4bd506[_0x324123(0x2c1)],'tags:\x20'+_0x1b7d83(_0x1fdbdb)[_0x324123(0x60e)](',\x20')));_0x1fdbdb[_0x324123(0x4ba)]?.[_0x324123(0x38c)]?.[_0x324123(0x283)]&&_0x51d35f[_0x324123(0x2c6)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4a2b73(_0x4bd506[_0x324123(0x2c1)],_0x324123(0x495)+_0x1fdbdb[_0x324123(0x4ba)]['safety'][_0x324123(0x283)]));_0x1fdbdb[_0x324123(0x4ba)]?.['http']?.['transport']&&_0x1fdbdb[_0x324123(0x4ba)][_0x324123(0x4f0)]['transport']!==_0x324123(0x491)&&_0x51d35f[_0x324123(0x2c6)](_0x324123(0x293)+_0x4a2b73(_0x4bd506[_0x324123(0x2c1)],'transport:\x20'+_0x1fdbdb[_0x324123(0x4ba)][_0x324123(0x4f0)][_0x324123(0x545)]));if(_0x1fdbdb[_0x324123(0x4ba)]?.[_0x324123(0x28c)]){const _0x54a5f4=Object[_0x324123(0x60b)](_0x1fdbdb['operation']['inputSchema'][_0x324123(0x480)]||{});if(_0x54a5f4[_0x324123(0x246)])_0x51d35f[_0x324123(0x2c6)](_0x324123(0x293)+_0x4a2b73(_0x4bd506[_0x324123(0x2c1)],_0x324123(0x27a)+_0x54a5f4[_0x324123(0x60e)](',\x20')));}return _0x1fdbdb[_0x324123(0x3f9)]?.[_0x324123(0x229)]&&_0x51d35f[_0x324123(0x2c6)](_0x324123(0x293)+_0x4a2b73(_0x4bd506[_0x324123(0x2c1)],_0x324123(0x58c)+JSON[_0x324123(0x31c)](_0x1fdbdb[_0x324123(0x3f9)]['body']))),_0x51d35f;}async function _0xbd6e94(_0x177f45,_0x337d9d,_0x146e34,_0x2d42ec=null){const _0x24f885=_0x1ac697,_0x314bb3=_0x146e34[_0x24f885(0x388)]('?'),_0x3bc01a=_0x314bb3>=0x0?_0x146e34[_0x24f885(0x20b)](0x0,_0x314bb3):_0x146e34,_0x364071=_0x314bb3>=0x0?_0x146e34[_0x24f885(0x20b)](_0x314bb3+0x1):'',_0x638c59=Object[_0x24f885(0x346)](new URLSearchParams(_0x364071)['entries']());return _0x177f45[_0x24f885(0x4f0)]['handle'](_0x337d9d,_0x3bc01a,{'body':_0x2d42ec,'query':_0x638c59,'headers':{'content-type':'application/json'}},{'internal':!![]});}function _0x4f206f(_0x13c47e){const _0xe2064b=_0x1ac697;if(!_0x13c47e)return null;const _0x278808=_0x13c47e['trim']();if(!_0x278808)return null;try{return JSON['parse'](_0x278808);}catch{}try{return JSON['parse'](_0x5673e4(_0x278808));}catch(_0x354f83){throw new SyntaxError(_0x354f83[_0xe2064b(0x453)],{'cause':_0x354f83});}}function _0x5673e4(_0x4fe508){const _0x4a787f=_0x1ac697;let _0x599445='',_0x3eb9ba=0x0;while(_0x3eb9ba<_0x4fe508['length']){const _0x168db6=_0x4fe508[_0x3eb9ba];if(_0x168db6==='\x22'){_0x599445+='\x22',_0x3eb9ba++;while(_0x3eb9ba<_0x4fe508[_0x4a787f(0x246)]&&_0x4fe508[_0x3eb9ba]!=='\x22'){if(_0x4fe508[_0x3eb9ba]==='\x5c'){_0x599445+=_0x4fe508[_0x3eb9ba++];if(_0x3eb9ba<_0x4fe508[_0x4a787f(0x246)])_0x599445+=_0x4fe508[_0x3eb9ba++];}else _0x599445+=_0x4fe508[_0x3eb9ba++];}_0x599445+='\x22';if(_0x3eb9ba<_0x4fe508[_0x4a787f(0x246)])_0x3eb9ba++;continue;}if(_0x168db6==='\x27'){_0x599445+='\x22',_0x3eb9ba++;while(_0x3eb9ba<_0x4fe508[_0x4a787f(0x246)]&&_0x4fe508[_0x3eb9ba]!=='\x27'){if(_0x4fe508[_0x3eb9ba]==='\x5c'&&_0x4fe508[_0x3eb9ba+0x1]==='\x27')_0x599445+='\x27',_0x3eb9ba+=0x2;else _0x4fe508[_0x3eb9ba]==='\x22'?(_0x599445+='\x5c\x22',_0x3eb9ba++):_0x599445+=_0x4fe508[_0x3eb9ba++];}_0x599445+='\x22';if(_0x3eb9ba<_0x4fe508['length'])_0x3eb9ba++;continue;}if('{}[]:,\x0a\x0d\x09\x20'[_0x4a787f(0x576)](_0x168db6)){_0x599445+=_0x168db6,_0x3eb9ba++;continue;}let _0x3c6cf6='';while(_0x3eb9ba<_0x4fe508['length']&&!_0x4a787f(0x37a)[_0x4a787f(0x576)](_0x4fe508[_0x3eb9ba])&&_0x4fe508[_0x3eb9ba]!=='\x20'&&_0x4fe508[_0x3eb9ba]!=='\x09'&&_0x4fe508[_0x3eb9ba]!=='\x0a'&&_0x4fe508[_0x3eb9ba]!=='\x0d'){_0x3c6cf6+=_0x4fe508[_0x3eb9ba++];}let _0x91dec8=_0x3eb9ba;while(_0x91dec8<_0x4fe508[_0x4a787f(0x246)]&&(_0x4fe508[_0x91dec8]==='\x20'||_0x4fe508[_0x91dec8]==='\x09'))_0x91dec8++;if(_0x4fe508[_0x91dec8]===':')_0x599445+='\x22'+_0x3c6cf6+'\x22';else _0x3c6cf6===_0x4a787f(0x59a)||_0x3c6cf6===_0x4a787f(0x22e)||_0x3c6cf6===_0x4a787f(0x1d0)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/['test'](_0x3c6cf6)?_0x599445+=_0x3c6cf6:_0x599445+='\x22'+_0x3c6cf6+'\x22';}return _0x599445[_0x4a787f(0x213)](/,(\s*[}\]])/g,'$1');}function _0x100025(_0x51f524){const _0x55c89e=_0x1ac697,_0x3c8661=[];let _0x12fe72=0x0;while(_0x12fe72<_0x51f524[_0x55c89e(0x246)]){while(_0x12fe72<_0x51f524['length']&&(_0x51f524[_0x12fe72]==='\x20'||_0x51f524[_0x12fe72]==='\x09'))_0x12fe72++;if(_0x12fe72>=_0x51f524[_0x55c89e(0x246)])break;const _0x1c520d=_0x51f524[_0x12fe72];if(_0x1c520d==='{'||_0x1c520d==='['){const _0x593133=_0x1c520d==='{'?'}':']',_0x1f1a43=_0x12fe72++;let _0x5685a3=0x1,_0x236b57=![],_0x3f7f82='';while(_0x12fe72<_0x51f524['length']&&_0x5685a3>0x0){const _0x259e9e=_0x51f524[_0x12fe72];if(_0x236b57){if(_0x259e9e==='\x5c')_0x12fe72++;else{if(_0x259e9e===_0x3f7f82)_0x236b57=![];}}else{if(_0x259e9e==='\x22'||_0x259e9e==='\x27')_0x236b57=!![],_0x3f7f82=_0x259e9e;else{if(_0x259e9e===_0x1c520d)_0x5685a3++;else{if(_0x259e9e===_0x593133)_0x5685a3--;}}}_0x12fe72++;}_0x3c8661['push'](_0x51f524[_0x55c89e(0x20b)](_0x1f1a43,_0x12fe72));continue;}if(_0x1c520d==='\x22'||_0x1c520d==='\x27'){const _0x32936b=_0x1c520d;_0x12fe72++;let _0x49f3dc='';while(_0x12fe72<_0x51f524[_0x55c89e(0x246)]&&_0x51f524[_0x12fe72]!==_0x32936b){if(_0x51f524[_0x12fe72]==='\x5c'&&_0x12fe72+0x1<_0x51f524[_0x55c89e(0x246)])_0x12fe72++,_0x49f3dc+=_0x51f524[_0x12fe72++];else _0x49f3dc+=_0x51f524[_0x12fe72++];}if(_0x12fe72<_0x51f524[_0x55c89e(0x246)])_0x12fe72++;_0x3c8661[_0x55c89e(0x2c6)](_0x49f3dc);continue;}let _0x1792f9='';while(_0x12fe72<_0x51f524['length']&&_0x51f524[_0x12fe72]!=='\x20'&&_0x51f524[_0x12fe72]!=='\x09'&&_0x51f524[_0x12fe72]!=='{'&&_0x51f524[_0x12fe72]!=='['){_0x1792f9+=_0x51f524[_0x12fe72++];}if(_0x1792f9)_0x3c8661[_0x55c89e(0x2c6)](_0x1792f9);}return _0x3c8661;}function _0x3669a2(_0x1bf6cf,_0x288c6a){const _0x1e664d=_0x1ac697,_0x29e48f=[..._0x1bf6cf['_envs'][_0x1e664d(0x60b)]()][_0x1e664d(0x629)](_0x5ddb6f=>!_0x5ddb6f[_0x1e664d(0x4f7)]('~'));console['log'](['',_0x4a2b73(_0x4bd506['bold']+_0x4bd506[_0x1e664d(0x301)],_0x1e664d(0x494)),_0x4a2b73(_0x4bd506[_0x1e664d(0x303)]+_0x4bd506['cyan'],'\x20\x20║')+_0x4a2b73(_0x4bd506[_0x1e664d(0x303)],_0x1e664d(0x2f1))+_0x4a2b73(_0x4bd506[_0x1e664d(0x303)]+_0x4bd506[_0x1e664d(0x301)],'║'),_0x4a2b73(_0x4bd506['bold']+_0x4bd506['cyan'],_0x1e664d(0x236)),'','\x20\x20'+_0x4a2b73(_0x4bd506[_0x1e664d(0x50f)],'✓')+'\x20'+_0x4a2b73(_0x4bd506[_0x1e664d(0x303)],_0x1e664d(0x4b5))+_0x1e664d(0x206)+_0x288c6a[_0x1e664d(0x20f)],..._0x288c6a[_0x1e664d(0x4bf)]>0x1?['\x20\x20'+_0x4a2b73(_0x4bd506['green'],'✓')+'\x20'+_0x4a2b73(_0x4bd506[_0x1e664d(0x303)],_0x1e664d(0x618))+'\x20'+_0x288c6a[_0x1e664d(0x4bf)]+_0x1e664d(0x3da)+_0x4a2b73(_0x4bd506['gray'],_0x1e664d(0x4a5))]:[],'\x20\x20'+_0x4a2b73(_0x4bd506[_0x1e664d(0x50f)],'✓')+'\x20'+_0x4a2b73(_0x4bd506['bold'],_0x1e664d(0x4bd))+_0x1e664d(0x394)+_0x288c6a[_0x1e664d(0x20f)]+'/api','\x20\x20'+_0x4a2b73(_0x4bd506[_0x1e664d(0x50f)],'✓')+'\x20'+_0x4a2b73(_0x4bd506['bold'],'path')+_0x1e664d(0x632)+_0x288c6a['dbPath'],'\x20\x20'+_0x4a2b73(_0x4bd506[_0x1e664d(0x50f)],'✓')+'\x20'+_0x4a2b73(_0x4bd506[_0x1e664d(0x303)],'id')+_0x1e664d(0x267)+_0x4a2b73(_0x4bd506['gray'],_0x1bf6cf['id']),'\x20\x20'+_0x4a2b73(_0x4bd506[_0x1e664d(0x50f)],'✓')+'\x20'+_0x4a2b73(_0x4bd506[_0x1e664d(0x303)],_0x1e664d(0x4b4))+_0x1e664d(0x632)+_0x29e48f[_0x1e664d(0x52f)](_0x16ae68=>_0x4a2b73(_0x4bd506[_0x1e664d(0x301)],_0x16ae68))['join']('\x20\x20'),..._0x288c6a[_0x1e664d(0x32c)]?[]:['\x20\x20'+_0x4a2b73(_0x4bd506[_0x1e664d(0x50f)],'✓')+'\x20'+_0x4a2b73(_0x4bd506[_0x1e664d(0x303)],'admin')+_0x1e664d(0x514)+_0x288c6a[_0x1e664d(0x20f)]+_0x1e664d(0x5d8)],'',_0x4a2b73(_0x4bd506[_0x1e664d(0x250)],_0x1e664d(0x549)+_0x4a2b73(_0x4bd506['bold'],'help')+'\x20for\x20commands,\x20'+_0x4a2b73(_0x4bd506['bold'],_0x1e664d(0x45e))+_0x1e664d(0x4ed)+_0x4a2b73(_0x4bd506[_0x1e664d(0x303)],_0x1e664d(0x5f7))+'\x20to\x20quit.'),'']['join']('\x0a'));}function _0x659919(_0x35f3eb){const _0x1dec73=_0x1ac697;console[_0x1dec73(0x1f3)]('\x0a'+_0x4a2b73(_0x4bd506[_0x1dec73(0x303)],_0x1dec73(0x230))+'\x20\x20'+_0x4a2b73(_0x4bd506[_0x1dec73(0x250)],_0x1dec73(0x4f5))+_0x1dec73(0x650)+_0x4a2b73(_0x4bd506['cyan'],_0x1dec73(0x601))+_0x1dec73(0x1f9)+_0x4a2b73(_0x4bd506[_0x1dec73(0x301)],_0x1dec73(0x601))+'\x20'+_0x4a2b73(_0x4bd506[_0x1dec73(0x46f)],_0x1dec73(0x322))+_0x1dec73(0x36e)+_0x4a2b73(_0x4bd506[_0x1dec73(0x301)],'VERB')+'\x20'+_0x4a2b73(_0x4bd506[_0x1dec73(0x301)],_0x1dec73(0x601))+'\x20'+_0x4a2b73(_0x4bd506[_0x1dec73(0x46f)],'[body]')+_0x1dec73(0x501)+_0x4a2b73(_0x4bd506[_0x1dec73(0x250)],'Examples')+_0x1dec73(0x3f3)+_0x4a2b73(_0x4bd506[_0x1dec73(0x2c1)],_0x1dec73(0x1bb))+_0x1dec73(0x203)+_0x4a2b73(_0x4bd506[_0x1dec73(0x2c1)],_0x1dec73(0x4b4))+_0x1dec73(0x5a7)+_0x4a2b73(_0x4bd506[_0x1dec73(0x2c1)],_0x1dec73(0x42b))+_0x1dec73(0x4fe)+_0x35f3eb['env']+'/types\x0a\x20\x20\x20\x20'+_0x4a2b73(_0x4bd506[_0x1dec73(0x2c1)],'type/users')+_0x1dec73(0x627)+_0x35f3eb[_0x1dec73(0x1c6)]+_0x1dec73(0x55a)+_0x4a2b73(_0x4bd506[_0x1dec73(0x2c1)],_0x1dec73(0x1c2))+_0x1dec73(0x54d)+_0x35f3eb[_0x1dec73(0x1c6)]+_0x1dec73(0x258)+_0x4a2b73(_0x4bd506[_0x1dec73(0x2c1)],_0x1dec73(0x511))+_0x1dec73(0x61f)+_0x35f3eb[_0x1dec73(0x1c6)]+_0x1dec73(0x3aa)+_0x4a2b73(_0x4bd506['gray'],_0x1dec73(0x5e4))+_0x1dec73(0x3f3)+_0x4a2b73(_0x4bd506[_0x1dec73(0x2c1)],_0x1dec73(0x36c))+_0x1dec73(0x3f3)+_0x4a2b73(_0x4bd506[_0x1dec73(0x2c1)],_0x1dec73(0x2fa))+_0x1dec73(0x241)+_0x4a2b73(_0x4bd506[_0x1dec73(0x303)],_0x1dec73(0x653))+'\x20\x20'+_0x4a2b73(_0x4bd506[_0x1dec73(0x250)],_0x1dec73(0x212))+_0x1dec73(0x650)+_0x4a2b73(_0x4bd506[_0x1dec73(0x301)],_0x1dec73(0x61b))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20'+_0x4a2b73(_0x4bd506[_0x1dec73(0x301)],_0x1dec73(0x210))+_0x1dec73(0x638)+_0x4a2b73(_0x4bd506[_0x1dec73(0x250)],_0x1dec73(0x420))+_0x1dec73(0x3f3)+_0x4a2b73(_0x4bd506[_0x1dec73(0x2c1)],_0x1dec73(0x360))+'\x0a\x20\x20\x20\x20'+_0x4a2b73(_0x4bd506[_0x1dec73(0x2c1)],_0x1dec73(0x2bf))+_0x1dec73(0x3f3)+_0x4a2b73(_0x4bd506[_0x1dec73(0x2c1)],'type/users\x20--help')+'\x0a\x0a'+_0x4a2b73(_0x4bd506[_0x1dec73(0x303)],_0x1dec73(0x400))+_0x1dec73(0x650)+_0x4a2b73(_0x4bd506[_0x1dec73(0x301)],_0x1dec73(0x5c1))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20'+_0x4a2b73(_0x4bd506[_0x1dec73(0x301)],_0x1dec73(0x1c6))+_0x1dec73(0x3cd)+_0x4a2b73(_0x4bd506[_0x1dec73(0x301)],'routes')+'\x20'+_0x4a2b73(_0x4bd506[_0x1dec73(0x250)],_0x1dec73(0x568))+_0x1dec73(0x66d)+_0x4a2b73(_0x4bd506[_0x1dec73(0x301)],_0x1dec73(0x3c8))+'\x20'+_0x4a2b73(_0x4bd506[_0x1dec73(0x250)],_0x1dec73(0x302))+_0x1dec73(0x51b)+_0x4a2b73(_0x4bd506[_0x1dec73(0x301)],'open')+_0x1dec73(0x28a)+_0x4a2b73(_0x4bd506[_0x1dec73(0x301)],_0x1dec73(0x3e5))+_0x1dec73(0x288)+_0x4a2b73(_0x4bd506[_0x1dec73(0x301)],_0x1dec73(0x5f7))+'\x20'+_0x4a2b73(_0x4bd506['dim'],_0x1dec73(0x486))+_0x1dec73(0x4f4));}let _0x1c5070=![];async function _0xcc92b6(_0x24def1,_0xd638c7=0x0,_0x25a883=null){const _0x113e39=_0x1ac697;_0x1c5070&&(process[_0x113e39(0x504)][_0x113e39(0x4ae)](_0x4a2b73(_0x4bd506[_0x113e39(0x319)],_0x113e39(0x1ad))),process[_0x113e39(0x5f7)](0x82));_0x1c5070=!![],process[_0x113e39(0x4dd)][_0x113e39(0x4ae)]('\x0a'),process['stderr']['write'](_0x4a2b73(_0x4bd506[_0x113e39(0x46f)],_0x113e39(0x2c3)+(_0x25a883?_0x113e39(0x252)+_0x25a883+',\x20':'')+_0x113e39(0x611)));const _0x29c7c2=setTimeout(()=>{const _0x571a54=_0x113e39;process[_0x571a54(0x504)][_0x571a54(0x4ae)](_0x4a2b73(_0x4bd506[_0x571a54(0x319)],'\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a')),process[_0x571a54(0x5f7)](0x1);},0x1388);try{await _0x24def1[_0x113e39(0x577)]();}catch(_0x233703){console[_0x113e39(0x2a2)](_0x4a2b73(_0x4bd506[_0x113e39(0x319)],'\x20\x20'+_0x233703[_0x113e39(0x453)]));}clearTimeout(_0x29c7c2),process[_0x113e39(0x504)][_0x113e39(0x4ae)](_0x4a2b73(_0x4bd506[_0x113e39(0x250)],_0x113e39(0x2d1))),process[_0x113e39(0x5f7)](_0xd638c7);}function _0x1189ff(_0x1ffccf){const _0x4742c0=_0x1ac697,_0x199b2a=_0x1ffccf[_0x4742c0(0x1c6)]!==_0x4742c0(0x5c8)?_0x4a2b73(_0x4bd506[_0x4742c0(0x46f)],'['+_0x1ffccf[_0x4742c0(0x1c6)]+']'):'';return _0x4a2b73(_0x4bd506['bold']+_0x4bd506[_0x4742c0(0x301)],_0x4742c0(0x25a))+_0x199b2a+_0x4a2b73(_0x4bd506[_0x4742c0(0x2c1)],'>\x20');}const _0x2ebcf0=new Set([_0x1ac697(0x455),'POST',_0x1ac697(0x497),_0x1ac697(0x635),_0x1ac697(0x642)]);async function _0x3ed2ca(_0x53d290,_0x1756b1,_0x219111,_0x2b8196,_0x2d10e9,_0x1ca527){const _0x391e28=_0x1ac697;_0x53d290=_0x53d290['trim']();if(!_0x53d290||_0x53d290['startsWith']('#'))return;const _0x195621=_0x100025(_0x53d290),{flags:_0x403a5e,rest:_0x1f699f}=_0xed78d0(_0x195621);if(!_0x1f699f['length'])return;const _0x4bf2a7=_0x1f699f[0x0],_0x152ba0=_0x4bf2a7[_0x391e28(0x207)]();if(_0x152ba0===_0x391e28(0x4ad)){if(_0x1f699f[0x1])_0x141921(_0x1756b1,_0x45f147(_0x1f699f[0x1],_0x403a5e[_0x391e28(0x1c6)]??_0x2d10e9[_0x391e28(0x1c6)]));else _0x659919(_0x2d10e9);return;}if(_0x152ba0==='USE'){const _0x123438=_0x1f699f[0x1];if(!_0x123438){console['log'](_0x4a2b73(_0x4bd506[_0x391e28(0x319)],_0x391e28(0x259)));return;}try{_0x1756b1['env'](_0x123438),_0x2d10e9[_0x391e28(0x1c6)]=_0x123438,_0x1ca527?.[_0x391e28(0x3e1)](_0x1189ff(_0x2d10e9)),console[_0x391e28(0x1f3)](_0x391e28(0x59e)+_0x4a2b73(_0x4bd506[_0x391e28(0x50f)],'✓')+'\x20active\x20env:\x20'+_0x4a2b73(_0x4bd506['bold']+_0x4bd506[_0x391e28(0x301)],_0x123438)+'\x0a');}catch{console['log'](_0x391e28(0x59e)+_0x4a2b73(_0x4bd506['red'],'✗')+_0x391e28(0x3d6)+_0x4a2b73(_0x4bd506[_0x391e28(0x303)],_0x123438)+_0x391e28(0x202)+_0x4a2b73(_0x4bd506[_0x391e28(0x250)],_0x391e28(0x266)));}return;}if(_0x152ba0===_0x391e28(0x2d0)){const _0x48b967=[..._0x1756b1[_0x391e28(0x615)][_0x391e28(0x60b)]()]['filter'](_0x5b4539=>!_0x5b4539[_0x391e28(0x4f7)]('~'));console['log']('');for(const _0x2bf589 of _0x48b967){const _0x58833c=_0x2bf589===_0x2d10e9[_0x391e28(0x1c6)];console[_0x391e28(0x1f3)]('\x20\x20'+(_0x58833c?_0x4a2b73(_0x4bd506['green'],'●'):_0x4a2b73(_0x4bd506[_0x391e28(0x250)],'○'))+'\x20\x20'+(_0x58833c?_0x4a2b73(_0x4bd506[_0x391e28(0x303)]+_0x4bd506[_0x391e28(0x301)],_0x2bf589):_0x4a2b73(_0x4bd506[_0x391e28(0x250)],_0x2bf589)));}console[_0x391e28(0x1f3)](_0x391e28(0x59e)+_0x4a2b73(_0x4bd506[_0x391e28(0x250)],_0x391e28(0x566))+'\x20'+_0x4a2b73(_0x4bd506['cyan'],_0x2d10e9['env'])),console[_0x391e28(0x1f3)]('');return;}if(_0x152ba0===_0x391e28(0x23e)){const _0x2854ce=[..._0x1756b1['_envs'][_0x391e28(0x4a0)]()][_0x391e28(0x629)](_0xe7592f=>!_0xe7592f[_0x391e28(0x5c0)][_0x391e28(0x4f7)]('~'));console['log']('');const _0xea2acc=Math['max'](..._0x2854ce['map'](_0x25365e=>_0x25365e['name'][_0x391e28(0x246)]));for(const _0x2e1021 of _0x2854ce){const _0x565a39=_0x2e1021[_0x391e28(0x5c0)]===_0x2d10e9['env'],_0x343299=_0x565a39?_0x4a2b73(_0x4bd506['green'],'●'):_0x4a2b73(_0x4bd506['dim'],'○'),_0x284d3a=_0x565a39?_0x4a2b73(_0x4bd506[_0x391e28(0x303)]+_0x4bd506[_0x391e28(0x301)],_0x2e1021[_0x391e28(0x5c0)][_0x391e28(0x3b8)](_0xea2acc)):_0x4a2b73(_0x4bd506[_0x391e28(0x250)],_0x2e1021[_0x391e28(0x5c0)][_0x391e28(0x3b8)](_0xea2acc)),_0x2fac9f=[..._0x2e1021[_0x391e28(0x1dd)]['keys']()]['filter'](_0x373595=>!_0x373595[_0x391e28(0x4f7)]('~')),_0x451f9c=_0x2fac9f[_0x391e28(0x246)]?_0x4a2b73(_0x4bd506[_0x391e28(0x250)],_0x2fac9f[_0x391e28(0x20b)](0x0,0x5)[_0x391e28(0x60e)](',\x20')+(_0x2fac9f[_0x391e28(0x246)]>0x5?_0x391e28(0x2ff)+(_0x2fac9f['length']-0x5)+'\x20more':'')):_0x4a2b73(_0x4bd506['dim'],_0x391e28(0x320));console['log']('\x20\x20'+_0x343299+'\x20\x20'+_0x284d3a+'\x20\x20'+_0x451f9c);}console['log']('');return;}if(_0x152ba0==='TYPES'){const _0x19433d=_0x403a5e[_0x391e28(0x1c6)]??_0x1f699f[0x1]??_0x2d10e9[_0x391e28(0x1c6)];try{const _0x38872e=_0x1756b1['env'](_0x19433d),_0x35a399=[..._0x38872e[_0x391e28(0x1dd)][_0x391e28(0x60b)]()][_0x391e28(0x629)](_0x4be773=>!_0x4be773[_0x391e28(0x4f7)]('~'))[_0x391e28(0x40f)]();console[_0x391e28(0x1f3)]('\x0a\x20\x20'+_0x4a2b73(_0x4bd506[_0x391e28(0x250)],_0x35a399[_0x391e28(0x246)]+'\x20type'+(_0x35a399[_0x391e28(0x246)]!==0x1?'s':'')+_0x391e28(0x546)+_0x19433d));for(const _0x2d48d4 of _0x35a399){const _0x1793d8=_0x38872e['typeSubDbs'][_0x391e28(0x1fe)](_0x2d48d4),_0x3d6e27=_0x1793d8?.['data']?.[_0x391e28(0x63e)]?.()??0x0,_0x5bab8c=_0x4a2b73(_0x4bd506[_0x391e28(0x303)]+_0x4bd506['cyan'],_0x2d48d4[_0x391e28(0x3b8)](0x1c));console['log']('\x20\x20\x20\x20'+_0x5bab8c+'\x20\x20'+_0x4a2b73(_0x4bd506[_0x391e28(0x61a)],String(_0x3d6e27)[_0x391e28(0x35e)](0x6))+'\x20'+_0x4a2b73(_0x4bd506[_0x391e28(0x250)],_0x391e28(0x441)));}console[_0x391e28(0x1f3)]('');}catch(_0x1afaf7){console[_0x391e28(0x2a2)](_0x4a2b73(_0x4bd506['red'],_0x391e28(0x59e)+_0x1afaf7[_0x391e28(0x453)]+'\x0a'));}return;}if(_0x152ba0===_0x391e28(0x2a0)){_0xc2426f(_0x1756b1,_0x1f699f['slice'](0x1)[_0x391e28(0x60e)]('\x20'));return;}if(_0x152ba0===_0x391e28(0x2b0)){const _0x181a2e=(_0x1f699f[0x1]??'')['toLowerCase']();if(!_0x181a2e||_0x181a2e==='on')_0x2b8196[_0x391e28(0x47c)]=!![],_0x2b8196[_0x391e28(0x4d2)]=_0x391e28(0x1bb),console[_0x391e28(0x1f3)](_0x391e28(0x59e)+_0x4a2b73(_0x4bd506[_0x391e28(0x50f)],'✓')+_0x391e28(0x569)+_0x4a2b73(_0x4bd506[_0x391e28(0x250)],'level:\x20info')+'\x0a');else{if(_0x181a2e===_0x391e28(0x247))_0x2b8196[_0x391e28(0x47c)]=![],console[_0x391e28(0x1f3)](_0x391e28(0x59e)+_0x4a2b73(_0x4bd506['yellow'],'○')+_0x391e28(0x1ac));else _0x5db5ed[_0x181a2e]!==undefined?(_0x2b8196['enabled']=!![],_0x2b8196[_0x391e28(0x4d2)]=_0x181a2e,console['log']('\x0a\x20\x20'+_0x4a2b73(_0x4bd506['green'],'✓')+_0x391e28(0x643)+_0x4a2b73(_0x4bd506[_0x391e28(0x303)],_0x181a2e)+'\x0a')):console['error'](_0x4a2b73(_0x4bd506[_0x391e28(0x319)],'\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]'));}return;}if(_0x152ba0===_0x391e28(0x412)||_0x152ba0===_0x391e28(0x5b3)){await _0xcc92b6(_0x1756b1,0x0);return;}if(_0x152ba0===_0x391e28(0x49e)){const _0x482768='http://localhost:'+_0x219111['port']+'/admin/index.html',_0x553461=process['platform']===_0x391e28(0x447)?'start\x20'+_0x482768:process[_0x391e28(0x474)]==='darwin'?_0x391e28(0x27f)+_0x482768:_0x391e28(0x5e1)+_0x482768;require$$4['exec'](_0x553461),console['log'](_0x391e28(0x59e)+_0x4a2b73(_0x4bd506[_0x391e28(0x50f)],'✓')+'\x20opening\x20'+_0x4a2b73(_0x4bd506[_0x391e28(0x301)],_0x482768)+'\x0a');return;}let _0xc76f70,_0x14569f,_0x9a9c6;if(_0x2ebcf0[_0x391e28(0x510)](_0x152ba0)){_0xc76f70=_0x152ba0,_0x14569f=_0x1f699f[0x1],_0x9a9c6=_0x1f699f[_0x391e28(0x20b)](0x2);if(!_0x14569f){console[_0x391e28(0x2a2)](_0x4a2b73(_0x4bd506[_0x391e28(0x319)],_0x391e28(0x1e6)+_0x4bf2a7+'\x20<path>\x20[json-body]'));return;}}else _0xc76f70=null,_0x14569f=_0x1f699f[0x0],_0x9a9c6=_0x1f699f[_0x391e28(0x20b)](0x1);const _0x47bc6a=_0x403a5e[_0x391e28(0x1c6)]??_0x2d10e9[_0x391e28(0x1c6)],_0x5058d8=_0x45f147(_0x14569f,_0x47bc6a);if(_0x403a5e['help']){_0x141921(_0x1756b1,_0x5058d8);return;}let _0x3d611d=null;if(_0x9a9c6[_0x391e28(0x246)]){const _0x287f84=_0x9a9c6['join']('\x20');try{_0x3d611d=_0x4f206f(_0x287f84);}catch(_0x91a313){console[_0x391e28(0x2a2)](_0x4a2b73(_0x4bd506[_0x391e28(0x319)],_0x391e28(0x4be)+_0x287f84+_0x391e28(0x59e)+_0x4a2b73(_0x4bd506[_0x391e28(0x250)],_0x91a313[_0x391e28(0x453)])+'\x0a'));return;}}if(!_0xc76f70)_0xc76f70=_0x3d611d!==null?_0x391e28(0x26b):'GET';try{const _0x372435=await _0xbd6e94(_0x1756b1,_0xc76f70,_0x5058d8,_0x3d611d);_0x3923eb(_0x372435['status'],_0x372435[_0x391e28(0x229)]);}catch(_0x30b2a7){console[_0x391e28(0x2a2)](_0x391e28(0x59e)+_0x4a2b73(_0x4bd506[_0x391e28(0x319)],'✗')+'\x20'+_0x30b2a7[_0x391e28(0x453)]+'\x0a');}}class _0x21cb45{constructor(){const _0x4d3a6c=_0x1ac697;this[_0x4d3a6c(0x340)]=new Map(),this[_0x4d3a6c(0x483)]=null,this['terminal']=![];}}function _0x4b851d(_0x2a15d7){const _0x5a76b1=_0x1ac697,_0x480282=new _0x21cb45();for(const _0x36fa42 of _0x2a15d7){if(_0x36fa42[_0x5a76b1(0x3f9)]?.[_0x5a76b1(0x547)])continue;const _0x4fbc2e=_0x36fa42['path'][_0x5a76b1(0x213)](/^\/api/,'')[_0x5a76b1(0x213)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x5a76b1(0x213)](/^\//,'');if(!_0x4fbc2e)continue;let _0x5d2587=_0x480282;for(const _0x214a0d of _0x4fbc2e[_0x5a76b1(0x5df)]('/')[_0x5a76b1(0x629)](Boolean)){if(_0x214a0d['startsWith'](':')){const _0x4d3b3a=_0x214a0d['slice'](0x1);if(!_0x5d2587['dynamic'])_0x5d2587['dynamic']={'param':_0x4d3b3a,'node':new _0x21cb45()};_0x5d2587=_0x5d2587[_0x5a76b1(0x483)][_0x5a76b1(0x58e)];}else{if(!_0x5d2587[_0x5a76b1(0x340)][_0x5a76b1(0x510)](_0x214a0d))_0x5d2587[_0x5a76b1(0x340)][_0x5a76b1(0x24b)](_0x214a0d,new _0x21cb45());_0x5d2587=_0x5d2587[_0x5a76b1(0x340)][_0x5a76b1(0x1fe)](_0x214a0d);}}_0x5d2587[_0x5a76b1(0x45f)]=!![];}return _0x480282;}const _0x22d931=new Map();function _0x162829(_0x4c5348,_0x3d5f53,_0x2c523b){const _0x114488=_0x1ac697,_0x1edbe8=_0x22d931[_0x114488(0x1fe)](_0x4c5348);if(_0x1edbe8&&_0x1edbe8['exp']>Date[_0x114488(0x5cc)]())return _0x1edbe8[_0x114488(0x5ec)];const _0x8c8d24=_0x2c523b();return _0x22d931[_0x114488(0x24b)](_0x4c5348,{'val':_0x8c8d24,'exp':Date[_0x114488(0x5cc)]()+_0x3d5f53}),_0x8c8d24;}function _0x3068d(_0x3c873a,_0x3c07f2,_0x49fecc,_0x3508ac){const _0x5d508c=_0x1ac697,_0x8db989=_0x3c07f2[_0x5d508c(0x1c6)]??_0x3508ac[_0x5d508c(0x1c6)];switch(_0x3c873a){case'env':return[..._0x49fecc[_0x5d508c(0x615)][_0x5d508c(0x60b)]()]['filter'](_0x23a0d9=>!_0x23a0d9['startsWith']('~'));case'type':return _0x162829(_0x5d508c(0x286)+_0x8db989,0x7d0,()=>{const _0x1e5c91=_0x5d508c;try{return[..._0x49fecc[_0x1e5c91(0x1c6)](_0x8db989)[_0x1e5c91(0x1dd)][_0x1e5c91(0x60b)]()][_0x1e5c91(0x629)](_0x58fd6b=>!_0x58fd6b['startsWith']('~'));}catch{return[];}});case _0x5d508c(0x660):if(!_0x3c07f2[_0x5d508c(0x628)])return[];return _0x162829(_0x5d508c(0x36d)+_0x8db989+':'+_0x3c07f2[_0x5d508c(0x628)],0x5dc,()=>{const _0xe890a0=_0x5d508c;try{const _0x176801=_0x49fecc['env'](_0x8db989)[_0xe890a0(0x1dd)][_0xe890a0(0x1fe)](_0x3c07f2['type']);if(!_0x176801?.[_0xe890a0(0x2ae)])return[];const _0xe33833=[];for(const {key:_0x3cce88}of _0x176801['data'][_0xe890a0(0x4cb)]({'limit':0x32})){_0xe33833[_0xe890a0(0x2c6)](String(_0x3cce88));if(_0xe33833[_0xe890a0(0x246)]>=0x32)break;}return _0xe33833;}catch{return[];}});case _0x5d508c(0x4ab):if(!_0x3c07f2['type'])return[];return _0x162829(_0x5d508c(0x2df)+_0x8db989+':'+_0x3c07f2[_0x5d508c(0x628)],0x7d0,()=>{const _0x458f43=_0x5d508c;try{const _0x2a9f2d=_0x49fecc[_0x458f43(0x1c6)](_0x8db989)['typeSubDbs']['get'](_0x3c07f2['type']);return _0x2a9f2d?[..._0x2a9f2d[_0x458f43(0x57e)]?.['keys']()??[]]:[];}catch{return[];}});case'ftsName':if(!_0x3c07f2[_0x5d508c(0x628)])return[];return _0x162829('fts:'+_0x8db989+':'+_0x3c07f2[_0x5d508c(0x628)],0x7d0,()=>{const _0x159d7e=_0x5d508c;try{return _0x49fecc[_0x159d7e(0x325)]?.[_0x159d7e(0x2e5)]?.(_0x3c07f2[_0x159d7e(0x628)],_0x49fecc[_0x159d7e(0x1c6)](_0x8db989))?.[_0x159d7e(0x52f)](_0x59fd49=>_0x59fd49[_0x159d7e(0x5c0)])??[];}catch{return[];}});default:return[];}}function _0x58344c(_0x2ff790,_0xd84bda,_0x250e1a,_0x225bb8){const _0x1e8d67=_0x1ac697,_0x1faa82=_0x2ff790[_0x1e8d67(0x2e6)]('/'),_0x408b36=_0x2ff790['split']('/'),_0x5496f0=_0x1faa82?_0x408b36[_0x1e8d67(0x20b)](0x0,-0x1):_0x408b36[_0x1e8d67(0x20b)](0x0,-0x1),_0x88410d=_0x1faa82?'':_0x408b36[_0x408b36[_0x1e8d67(0x246)]-0x1];let _0x5f23e1=_0xd84bda;const _0x189096={};for(const _0x133693 of _0x5496f0){if(!_0x133693)continue;if(_0x5f23e1[_0x1e8d67(0x340)][_0x1e8d67(0x510)](_0x133693))_0x5f23e1=_0x5f23e1[_0x1e8d67(0x340)][_0x1e8d67(0x1fe)](_0x133693);else{if(_0x5f23e1[_0x1e8d67(0x483)])_0x189096[_0x5f23e1[_0x1e8d67(0x483)][_0x1e8d67(0x487)]]=_0x133693,_0x5f23e1=_0x5f23e1[_0x1e8d67(0x483)][_0x1e8d67(0x58e)];else return[];}}const _0x5aa771=_0x5496f0['filter'](Boolean),_0x326950=_0x5aa771['length']?_0x5aa771[_0x1e8d67(0x60e)]('/')+'/':'',_0x712f31=[];for(const [_0x552859]of _0x5f23e1[_0x1e8d67(0x340)]){if(_0x552859[_0x1e8d67(0x4f7)](_0x88410d))_0x712f31['push'](_0x326950+_0x552859);}if(_0x5f23e1['dynamic'])for(const _0x4b7027 of _0x3068d(_0x5f23e1['dynamic'][_0x1e8d67(0x487)],_0x189096,_0x250e1a,_0x225bb8)){if(String(_0x4b7027)[_0x1e8d67(0x4f7)](_0x88410d))_0x712f31[_0x1e8d67(0x2c6)](_0x326950+_0x4b7027);}return _0x712f31[_0x1e8d67(0x20b)](0x0,0x64);}const _0x322374=[_0x1ac697(0x3e5),_0x1ac697(0x35d),_0x1ac697(0x1c6),_0x1ac697(0x4b4),_0x1ac697(0x42b),'routes',_0x1ac697(0x3c8),'open',_0x1ac697(0x5f7),_0x1ac697(0x654)];function _0x214e0b(_0x5a9dde,_0x712014,_0x1ab365){return function _0x5cbd0e(_0x351ead){const _0x2bbbb9=_0x3d59;try{const _0x2edada=_0x351ead['search'](/\s[{[]/),_0x3d3c50=_0x2edada>=0x0?_0x351ead[_0x2bbbb9(0x20b)](0x0,_0x2edada):_0x351ead,_0x58a60b=_0x3d3c50[_0x2bbbb9(0x215)]();if(!_0x58a60b){const _0x14d253=[..._0x322374,...[..._0x5a9dde[_0x2bbbb9(0x340)]['keys']()]][_0x2bbbb9(0x20b)](0x0,0x64);return[_0x14d253,''];}const _0x1b67d9=_0x58a60b['split'](/\s+/),_0x51af3a=_0x1b67d9[0x0],_0x115333=_0x51af3a[_0x2bbbb9(0x207)]();if(_0x1b67d9['length']===0x1){const _0x400935=_0x51af3a[_0x2bbbb9(0x56c)](),_0x5bf9e9=_0x322374[_0x2bbbb9(0x629)](_0x4d273b=>_0x4d273b[_0x2bbbb9(0x4f7)](_0x400935)),_0x1da930=_0x58344c(_0x51af3a,_0x5a9dde,_0x712014,_0x1ab365),_0x1ef8a5=[...new Set([..._0x5bf9e9,..._0x1da930])][_0x2bbbb9(0x20b)](0x0,0x64);return[_0x1ef8a5,_0x51af3a];}if(_0x2ebcf0[_0x2bbbb9(0x510)](_0x115333)&&_0x1b67d9[_0x2bbbb9(0x246)]===0x2){const _0x4506c6=_0x1b67d9[0x1],_0x237c26=_0x58344c(_0x4506c6,_0x5a9dde,_0x712014,_0x1ab365);return[_0x237c26[_0x2bbbb9(0x52f)](_0x12a754=>_0x51af3a+'\x20'+_0x12a754),_0x51af3a+'\x20'+_0x4506c6];}if(!_0x2ebcf0[_0x2bbbb9(0x510)](_0x115333)&&_0x1b67d9[_0x2bbbb9(0x246)]>0x1){const _0x1402d0=_0x58344c(_0x51af3a,_0x5a9dde,_0x712014,_0x1ab365),_0x5c2d4c='\x20'+_0x1b67d9[_0x2bbbb9(0x20b)](0x1)[_0x2bbbb9(0x60e)]('\x20');return[_0x1402d0['map'](_0xbc8296=>_0xbc8296+_0x5c2d4c),_0x51af3a+_0x5c2d4c];}return[[],_0x351ead];}catch{return[[],_0x351ead];}};}async function _0x2b2869(_0x1af792,_0x5df99f){const _0x17d7e2=_0x1ac697,_0x1e4ce8={'enabled':!![],'level':_0x5df99f[_0x17d7e2(0x3df)]??'info'},_0x1f9ee1={'env':_0x17d7e2(0x5c8)},_0x192fe3={'current':null},_0x5b2c4d=_0x4b851d(_0x1af792[_0x17d7e2(0x4f0)][_0x17d7e2(0x1ca)]()),_0x3fce0c=_0x214e0b(_0x5b2c4d,_0x1af792,_0x1f9ee1);_0x1af792['log'][_0x17d7e2(0x318)](_0x4edc64=>{const _0x40daca=_0x17d7e2;if(!_0x1e4ce8[_0x40daca(0x47c)])return;_0x576f86(_0x4edc64,_0x1e4ce8[_0x40daca(0x4d2)]),_0x192fe3[_0x40daca(0x575)]?.[_0x40daca(0x544)](!![]);}),_0x3669a2(_0x1af792,_0x5df99f);const _0x2e7c40=_0x2aae4c[_0x17d7e2(0x605)]({'input':process[_0x17d7e2(0x2cd)],'output':process[_0x17d7e2(0x4dd)],'terminal':!![],'completer':_0x3fce0c,'prompt':_0x1189ff(_0x1f9ee1),'historySize':_0x176655});try{const _0xc09abb=_0x4de2e5[_0x17d7e2(0x591)](_0x4c0023,_0x17d7e2(0x50e))[_0x17d7e2(0x5df)]('\x0a')['filter'](Boolean);_0x2e7c40[_0x17d7e2(0x583)]=_0xc09abb[_0x17d7e2(0x633)]()[_0x17d7e2(0x20b)](0x0,_0x176655);}catch{}_0x192fe3[_0x17d7e2(0x575)]=_0x2e7c40,_0x2e7c40['on'](_0x17d7e2(0x442),async _0x236ce5=>{const _0x102b3f=_0x17d7e2;_0x2e7c40[_0x102b3f(0x3fc)]();try{await _0x3ed2ca(_0x236ce5,_0x1af792,_0x5df99f,_0x1e4ce8,_0x1f9ee1,_0x2e7c40);}catch(_0x2f3ccd){console['error'](_0x4a2b73(_0x4bd506['red'],_0x102b3f(0x589)+_0x2f3ccd[_0x102b3f(0x453)]));}finally{_0x2e7c40[_0x102b3f(0x3b5)](),_0x2e7c40['prompt']();}}),_0x2e7c40['on'](_0x17d7e2(0x577),()=>{const _0x30e725=_0x17d7e2;try{const _0x5279a0=[..._0x2e7c40[_0x30e725(0x583)]]['reverse']()['filter'](Boolean)[_0x30e725(0x20b)](0x0,_0x176655);_0x4de2e5[_0x30e725(0x222)](_0x4c0023,_0x5279a0[_0x30e725(0x60e)]('\x0a')+'\x0a');}catch{}_0xcc92b6(_0x1af792,0x0);});let _0x4f803c=0x0;return process['on']('SIGINT',()=>{const _0xa126f1=_0x17d7e2;if(_0x1c5070)return _0xcc92b6(_0x1af792,0x82,_0xa126f1(0x1d8));if(_0x2e7c40[_0xa126f1(0x442)]==='')return _0xcc92b6(_0x1af792,0x0,_0xa126f1(0x1d8));const _0x18c748=Date['now']();if(_0x18c748-_0x4f803c<0x5dc)return _0xcc92b6(_0x1af792,0x0,_0xa126f1(0x200));_0x4f803c=_0x18c748,process[_0xa126f1(0x4dd)][_0xa126f1(0x4ae)]('\x0a'),_0x2e7c40['clearLine'](0x0),_0x2e7c40[_0xa126f1(0x544)](),process[_0xa126f1(0x504)][_0xa126f1(0x4ae)](_0x4a2b73(_0x4bd506[_0xa126f1(0x250)],_0xa126f1(0x624)));}),process['on'](_0x17d7e2(0x1b9),()=>_0xcc92b6(_0x1af792,0x0,_0x17d7e2(0x1b9))),process['on'](_0x17d7e2(0x668),()=>_0xcc92b6(_0x1af792,0x0,_0x17d7e2(0x668))),_0x2e7c40[_0x17d7e2(0x544)](),_0x2e7c40;}return okdbShell={'start':_0x2b2869,'colorLog':_0x576f86,'lenientParse':_0x4f206f,'_splitLine':_0x100025,'_formatRouteHelpLines':_0x1322c1,'_routeSummary':_0x253efb,'_routeTags':_0x1b7d83},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x4605aa=_0x38fa5f;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x55d91b,performance:_0xa6407e}=require$$0$4,_0x35a256=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x4ca250=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x38bc39=process.env.OKDB_LOOP_LAG_ALL==='1',_0x55da4d=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x2f98cd{constructor(){const _0x1f4344=_0x3d59;this['enabled']=_0x35a256,this[_0x1f4344(0x538)]=new Map(),this['_h']=null,this[_0x1f4344(0x277)]=null,this[_0x1f4344(0x298)]=![],this[_0x1f4344(0x435)]=(_0x48ffaf,_0x1c1e81)=>process[_0x1f4344(0x504)]['write'](_0x48ffaf+(_0x1c1e81?'\x20'+JSON['stringify'](_0x1c1e81):'')+'\x0a');}[_0x4605aa(0x5cc)](){return _0xa6407e['now']();}[_0x4605aa(0x612)](_0x47550b){const _0x320e17=_0x4605aa;if(typeof _0x47550b===_0x320e17(0x344))this['_log']=_0x47550b;}[_0x4605aa(0x593)](_0x16b46f,_0x42aab8,_0x5999f1){const _0x13f9b8=_0x4605aa;if(!this[_0x13f9b8(0x47c)])return;let _0x2dbf32=this[_0x13f9b8(0x538)][_0x13f9b8(0x1fe)](_0x16b46f);!_0x2dbf32&&(_0x2dbf32={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x13f9b8(0x24b)](_0x16b46f,_0x2dbf32)),_0x2dbf32['ms']+=_0x42aab8,_0x2dbf32['count']+=0x1,_0x42aab8>_0x2dbf32['maxMs']&&(_0x2dbf32[_0x13f9b8(0x2ba)]=_0x42aab8,_0x2dbf32[_0x13f9b8(0x365)]=_0x5999f1||'');}[_0x4605aa(0x4f3)](_0x45b65a){const _0x431d35=_0x4605aa;if(!this['enabled']||this[_0x431d35(0x298)])return;this[_0x431d35(0x298)]=!![];if(_0x45b65a)this['_log']=_0x45b65a;this['_h']=_0x55d91b({'resolution':0xa}),this['_h']['enable'](),this[_0x431d35(0x277)]=setInterval(()=>this['_report'](),_0x4ca250);if(this[_0x431d35(0x277)]['unref'])this[_0x431d35(0x277)][_0x431d35(0x476)]();}['onWindow'](_0x23295a){const _0x4dbf5f=_0x4605aa;if(!this[_0x4dbf5f(0x5a4)])this[_0x4dbf5f(0x5a4)]=new Set();this[_0x4dbf5f(0x5a4)][_0x4dbf5f(0x332)](_0x23295a);if(!this[_0x4dbf5f(0x298)])this[_0x4dbf5f(0x1c3)]();}[_0x4605aa(0x34e)](_0x2af505){const _0x267fe3=_0x4605aa;this['_windowCbs']?.[_0x267fe3(0x307)](_0x2af505);}['_startAdmission'](){const _0x5d2a44=_0x4605aa;if(this[_0x5d2a44(0x3d7)])return;this[_0x5d2a44(0x3d7)]=!![];!this['_h']&&(this['_h']=_0x55d91b({'resolution':0xa}),this['_h'][_0x5d2a44(0x2c5)]());const _0xead3d2=_0x4ca250;this[_0x5d2a44(0x352)]=setInterval(()=>{const _0x286cb7=_0x5d2a44,_0x2c312e=this['_h'];if(!_0x2c312e)return;const _0xa5bd08=_0x2c312e[_0x286cb7(0x373)](0x63)/0xf4240,_0x135d0f=_0x2c312e[_0x286cb7(0x4ca)]/0xf4240,_0x490e33=_0x2c312e['mean']/0xf4240;_0x2c312e['reset']();if(this[_0x286cb7(0x5a4)])for(const _0x4e6014 of this[_0x286cb7(0x5a4)]){try{_0x4e6014({'p99Ms':_0xa5bd08,'maxMs':_0x135d0f,'meanMs':_0x490e33,'reportMs':_0xead3d2});}catch{}}},_0xead3d2);if(this[_0x5d2a44(0x352)][_0x5d2a44(0x476)])this[_0x5d2a44(0x352)][_0x5d2a44(0x476)]();}[_0x4605aa(0x475)](){const _0x31fb16=_0x4605aa,_0x2d0559=this['_h'],_0x2dd483=_0x2d0559['max']/0xf4240,_0x474975=_0x2d0559[_0x31fb16(0x373)](0x63)/0xf4240,_0x47c74f=_0x2d0559[_0x31fb16(0x1d2)]/0xf4240;_0x2d0559[_0x31fb16(0x413)]();const _0x1a877a=[...this[_0x31fb16(0x538)][_0x31fb16(0x248)]()][_0x31fb16(0x52f)](([_0x1d397f,_0x2c1765])=>({'label':_0x1d397f,..._0x2c1765}))['sort']((_0x47163f,_0x4de321)=>_0x4de321['ms']-_0x47163f['ms'])['slice'](0x0,0x8);this[_0x31fb16(0x538)][_0x31fb16(0x24f)]();const _0x31631f=_0x1a877a[_0x31fb16(0x3ea)]((_0x8c388f,_0x13303f)=>_0x8c388f+_0x13303f['ms'],0x0),_0x9a0c9f=_0x1a877a['map'](_0x15f851=>_0x15f851[_0x31fb16(0x304)]+'='+_0x15f851['ms'][_0x31fb16(0x3d0)](0x0)+'ms/'+_0x15f851[_0x31fb16(0x2ad)]+(_0x15f851[_0x31fb16(0x2ba)]>0x5?_0x31fb16(0x45d)+_0x15f851[_0x31fb16(0x2ba)][_0x31fb16(0x3d0)](0x0)+'ms'+(_0x15f851[_0x31fb16(0x365)]?'\x20'+_0x15f851[_0x31fb16(0x365)]:'')+')':''));(_0x38bc39||_0x2dd483>=_0x55da4d)&&this['_log']('loop-lag\x20'+_0x4ca250+_0x31fb16(0x2f4)+_0x2dd483[_0x31fb16(0x3d0)](0x0)+_0x31fb16(0x404)+_0x474975['toFixed'](0x0)+'ms\x20mean='+_0x47c74f[_0x31fb16(0x3d0)](0x0)+'ms\x20busy='+_0x31631f[_0x31fb16(0x3d0)](0x0)+'ms'+(_0x9a0c9f[_0x31fb16(0x246)]?_0x31fb16(0x5cf)+_0x9a0c9f[_0x31fb16(0x60e)]('\x20\x20'):''),{'feature':_0x31fb16(0x55c)});if(this[_0x31fb16(0x5a4)])for(const _0x43e43e of this['_windowCbs']){try{_0x43e43e({'p99Ms':_0x474975,'maxMs':_0x2dd483,'meanMs':_0x47c74f,'reportMs':_0x4ca250});}catch{}}}[_0x4605aa(0x1b7)](){const _0x170139=_0x4605aa;if(this['_timer'])clearInterval(this[_0x170139(0x277)]);if(this['_h'])this['_h'][_0x170139(0x3de)]();this[_0x170139(0x277)]=null,this['_h']=null,this[_0x170139(0x298)]=![];}}const _0x5ae88e=new _0x2f98cd();if(_0x5ae88e[_0x4605aa(0x47c)])_0x5ae88e[_0x4605aa(0x4f3)]();return okdbLoopMonitor={'LOOP':_0x5ae88e},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x103eba=require$$1$1,_0x30ae6d=require$$1;let _0x33c6ea,_0x74c9ce,_0x395bd1,_0x433865,_0x8f8e8b,_0x3379fd,_0x21dde1,_0x159875=![];const _0x54be48=new Set();let _0x5acfb0=null;const _0xda2002=new Map();function _0x40fe9c(){const _0x35635d=_0x3d59;if(_0x33c6ea!==undefined)return _0x33c6ea;_0x33c6ea=process.env.OKDB_DIAG==='1';if(!_0x33c6ea)return![];_0x74c9ce=process.env.OKDB_DIAG_STACK==='1',_0x433865=Math[_0x35635d(0x4ca)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x395bd1=new Array(_0x433865),_0x8f8e8b=0x0,_0x3379fd=0x0,_0x21dde1=process.env.OKDB_DIAG_DIR||null;if(_0x21dde1)try{_0x103eba['mkdirSync'](_0x21dde1,{'recursive':!![]});}catch{}return!![];}function _0x26fcd3(){return _0x33c6ea===undefined?_0x40fe9c():_0x33c6ea;}function _0x3c709a(_0x19848a,_0x2709a5){const _0x14580e=_0x3d59;if(_0x33c6ea===undefined?!_0x40fe9c():!_0x33c6ea)return;let _0x1b379f;if(_0x74c9ce){const _0x5cb720=new Error()[_0x14580e(0x3d8)]||'';_0x1b379f=_0x5cb720['split']('\x0a')['slice'](0x3)[_0x14580e(0x52f)](_0xa623d6=>_0xa623d6['trim']())[_0x14580e(0x629)](Boolean)[_0x14580e(0x20b)](0x0,0x8);}_0x395bd1[_0x8f8e8b]={'seq':_0x3379fd++,'t':Date['now'](),'env':_0x19848a,'kind':_0x2709a5||_0x14580e(0x3e8),'stack':_0x1b379f},_0x8f8e8b=(_0x8f8e8b+0x1)%_0x433865;}function _0xfbd46c(_0x74ffb3){const _0x40a7fa=_0x3d59,_0x8130a2=[];for(let _0x5e4d43=0x0;_0x5e4d43<_0x433865;_0x5e4d43++){const _0x126bd0=_0x395bd1[(_0x8f8e8b-0x1-_0x5e4d43+_0x433865*0x2)%_0x433865];if(!_0x126bd0)continue;_0x8130a2['push'](_0x126bd0);if(_0x8130a2[_0x40a7fa(0x246)]>=_0x74ffb3)break;}return _0x8130a2;}function _0x21b7da(_0x2e21df){const _0x2bfeee=_0x3d59;try{process[_0x2bfeee(0x504)]['write'](_0x2e21df+'\x0a');}catch{}if(_0x21dde1)try{_0x103eba[_0x2bfeee(0x3f8)](_0x30ae6d[_0x2bfeee(0x60e)](_0x21dde1,_0x2bfeee(0x66e)+process[_0x2bfeee(0x53a)]+_0x2bfeee(0x4f8)),_0x2e21df+'\x0a');}catch{}}function _0x3fea1f(_0x19f014){const _0x1395ef=_0x3d59,_0x373bb5=_0xfbd46c(_0x19f014);if(!_0x373bb5[_0x1395ef(0x246)])return _0x1395ef(0x214);const _0x31742e=Date['now']();return _0x373bb5['map'](_0x4d2779=>{const _0x1fe399=_0x1395ef,_0x504311=_0x1fe399(0x4d6)+_0x4d2779['seq']+'\x20-'+(_0x31742e-_0x4d2779['t'])+_0x1fe399(0x243)+_0x4d2779[_0x1fe399(0x1c6)]+'\x20'+_0x4d2779['kind'];return _0x4d2779[_0x1fe399(0x3d8)]&&_0x4d2779[_0x1fe399(0x3d8)][_0x1fe399(0x246)]?_0x504311+_0x1fe399(0x52a)+_0x4d2779[_0x1fe399(0x3d8)][_0x1fe399(0x60e)](_0x1fe399(0x52a)):_0x504311;})[_0x1395ef(0x60e)]('\x0a');}function _0x121b13(_0x3c46fc,_0x2a9164){const _0x3773fb=_0x3d59,_0x43a901=_0x3773fb(0x1f0)+_0x3c46fc+_0x3773fb(0x273)+new Date()['toISOString']()+_0x3773fb(0x323)+process[_0x3773fb(0x53a)]+'\x20===',_0x2b9034=[_0x43a901,'error:\x20'+(_0x2a9164&&_0x2a9164[_0x3773fb(0x3d8)]?_0x2a9164[_0x3773fb(0x3d8)][_0x3773fb(0x5df)]('\x0a')[0x0]:_0x2a9164),_0x3773fb(0x208)+(_0x74c9ce?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x3fea1f(0x18),_0x6fe60f(),'='['repeat'](_0x43a901['length']-0x1)];_0x21b7da(_0x2b9034[_0x3773fb(0x60e)]('\x0a'));}function _0x358358(_0x3d8bbd){const _0xfe2cd3=_0x3d59;if(!_0x26fcd3())return;const _0x5f400a=String(_0x3d8bbd&&_0x3d8bbd[_0xfe2cd3(0x453)]||_0x3d8bbd||''),_0x35c923=/already closed|environment is already|invalid read txn|reset an invalid/i[_0xfe2cd3(0x48a)](_0x5f400a);_0x121b13(_0x35c923?_0xfe2cd3(0x2fb):_0xfe2cd3(0x53b),_0x3d8bbd);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x35c923)return;try{console[_0xfe2cd3(0x2a2)](_0x3d8bbd&&_0x3d8bbd[_0xfe2cd3(0x3d8)]?_0x3d8bbd[_0xfe2cd3(0x3d8)]:_0x3d8bbd);}catch{}process[_0xfe2cd3(0x5f7)](0x1);}function _0x22b426(_0x1177a0){const _0x8d94fb=_0x3d59;if(!_0x26fcd3())return;const _0x113846=String(_0x1177a0&&_0x1177a0[_0x8d94fb(0x453)]||_0x1177a0||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x8d94fb(0x48a)](_0x113846)&&_0x121b13(_0x8d94fb(0x51e),_0x1177a0);}function _0x6fe60f(){const _0x3f6eb0=_0x3d59,_0xda32fe=[_0x3f6eb0(0x527)];let _0x437edf=![];for(const _0x3b237e of _0x54be48){const _0x47a12c=_0x3b237e&&_0x3b237e[_0x3f6eb0(0x615)];if(!_0x47a12c)continue;for(const [_0x2f232b,_0x5ca3c8]of _0x47a12c){const _0xd141a6=_0x5ca3c8&&_0x5ca3c8['_coordinator']&&_0x5ca3c8[_0x3f6eb0(0x43e)][_0x3f6eb0(0x3b4)];if(!_0xd141a6)continue;let _0x34f6ec,_0x2f78c4;try{_0x34f6ec=Atomics[_0x3f6eb0(0x4af)](_0xd141a6,0x0),_0x2f78c4=Atomics[_0x3f6eb0(0x4af)](_0xd141a6,0x1);}catch{continue;}if(_0x34f6ec===0x0)continue;_0x437edf=!![];const _0x4dfc2e=_0x34f6ec>0x0?_0x3f6eb0(0x417):_0x3f6eb0(0x1d4),_0x568bc8=Date[_0x3f6eb0(0x5cc)]()-Math[_0x3f6eb0(0x1e0)](_0x34f6ec)*0x3e8,_0x313906=((()=>{const _0x342e75=_0x3f6eb0;try{return _0x5ca3c8[_0x342e75(0x4b2)]&&_0x5ca3c8[_0x342e75(0x4b2)]['status']?_0x5ca3c8['_writer'][_0x342e75(0x278)]():null;}catch{return null;}})());_0xda32fe[_0x3f6eb0(0x2c6)](_0x3f6eb0(0x581)+_0x2f232b+_0x3f6eb0(0x62e)+_0x4dfc2e+_0x3f6eb0(0x399)+_0x568bc8+_0x3f6eb0(0x517)+_0x2f78c4+(_0x313906?_0x3f6eb0(0x2c9)+_0x313906[_0x3f6eb0(0x1e5)]+'\x20oldestPendingMs='+_0x313906[_0x3f6eb0(0x393)]+_0x3f6eb0(0x1ae)+_0x313906[_0x3f6eb0(0x34a)]+'}':''));}}if(!_0x437edf)_0xda32fe[_0x3f6eb0(0x2c6)]('\x20\x20(no\x20env\x20draining)');return _0xda32fe[_0x3f6eb0(0x60e)]('\x0a');}function _0x3ab565(){const _0x1aa75a=_0x3d59;if(!_0x26fcd3())return;const _0x2075fc=Math[_0x1aa75a(0x4ca)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x31983b=Date[_0x1aa75a(0x5cc)]();for(const _0x169f86 of _0x54be48){const _0xc8db7f=_0x169f86&&_0x169f86[_0x1aa75a(0x615)];if(!_0xc8db7f)continue;for(const [_0x2ffce9,_0x177429]of _0xc8db7f){const _0x1091e8=_0x177429&&_0x177429[_0x1aa75a(0x43e)]&&_0x177429[_0x1aa75a(0x43e)]['view'];if(!_0x1091e8)continue;let _0x174da8;try{_0x174da8=Atomics['load'](_0x1091e8,0x0);}catch{continue;}const _0x4b1874=_0x169f86[_0x1aa75a(0x60a)]+'|'+_0x2ffce9;if(_0x174da8<=0x0){_0xda2002[_0x1aa75a(0x307)](_0x4b1874);continue;}const _0x116da0=_0x31983b-_0x174da8*0x3e8,_0x2ee46c=_0xda2002[_0x1aa75a(0x1fe)](_0x4b1874);if(_0x116da0<_0x2075fc)continue;if(_0x2ee46c&&_0x31983b-_0x2ee46c['dumpedAt']<_0x2075fc)continue;_0xda2002[_0x1aa75a(0x24b)](_0x4b1874,{'firstTs':_0x2ee46c?_0x2ee46c['firstTs']:_0x174da8,'dumpedAt':_0x31983b});const _0x56f8b2=_0x1aa75a(0x5cb)+_0x116da0+_0x1aa75a(0x22f)+_0x2ffce9+'\x20@\x20'+new Date()[_0x1aa75a(0x4ff)]()+_0x1aa75a(0x323)+process[_0x1aa75a(0x53a)]+_0x1aa75a(0x631);_0x21b7da([_0x56f8b2,_0x6fe60f(),'='[_0x1aa75a(0x5e3)](_0x56f8b2[_0x1aa75a(0x246)]-0x1)][_0x1aa75a(0x60e)]('\x0a'));}}}function _0x34c572(){const _0x330046=_0x3d59;if(!_0x26fcd3()||_0x159875)return;_0x159875=!![],process[_0x330046(0x3a9)](_0x330046(0x53b),_0x358358),process[_0x330046(0x3a9)](_0x330046(0x411),_0x22b426);const _0x9313ab=Math[_0x330046(0x4ca)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x5acfb0=setInterval(_0x3ab565,_0x9313ab);if(_0x5acfb0[_0x330046(0x476)])_0x5acfb0['unref']();}function _0x5d9d90(_0x362ccd){const _0x55166b=_0x3d59;if(!_0x26fcd3()||!_0x362ccd)return;_0x54be48[_0x55166b(0x332)](_0x362ccd),_0x34c572();}function _0x5b54c0(_0x1e0b75){const _0x533933=_0x3d59;_0x54be48[_0x533933(0x307)](_0x1e0b75);}function _0x540598(){const _0x4076d2=_0x3d59;if(!_0x26fcd3())return{'enabled':![],'hint':_0x4076d2(0x65c)};return{'enabled':!![],'stackCapture':!!_0x74c9ce,'recentWrites':_0xfbd46c(0x10),'drain':_0x6fe60f()};}return okdbDiag={'isEnabled':_0x26fcd3,'recordWrite':_0x3c709a,'installDiag':_0x34c572,'registerOkdb':_0x5d9d90,'unregisterOkdb':_0x5b54c0,'snapshot':_0x540598},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x51ba4b=_0x38fa5f;if(hasRequiredOkdbWriter)return okdbWriter[_0x51ba4b(0x368)];hasRequiredOkdbWriter=0x1;const {performance:_0x21eb99}=require$$0$5,_0x3bed3c=requireOkdbDiag(),_0xf85519=process.env.OKDB_COMMIT_MODE===_0x51ba4b(0x617);class _0x496818{constructor(_0x456f41){const _0x410391=_0x51ba4b;this['env']=_0x456f41,this['_inflight']=new Set(),this['_enqueuedAt']=new Map(),this[_0x410391(0x2c0)]=0x0,this[_0x410391(0x5de)]=[],this[_0x410391(0x4ea)]=[],this['_highWater']=Math[_0x410391(0x4ca)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x410391(0x30d)]=0x0,this['_bpWaiters']=[],this['_bpParkedTotal']=0x0;}async[_0x51ba4b(0x54c)](_0x587b49,_0x5e8f60){const _0x88031=_0x51ba4b;if(_0x3bed3c[_0x88031(0x1af)]())_0x3bed3c[_0x88031(0x52d)](this['env']?.[_0x88031(0x5c0)],_0x5e8f60);if(this[_0x88031(0x3e2)]){const _0x533ba8=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x533ba8[_0x88031(0x47d)]=_0x88031(0x423);throw _0x533ba8;}if(this['_highWater']>0x0){let _0x12822a=![];while(this[_0x88031(0x30d)]>=this[_0x88031(0x657)]&&!this['_closed']){!_0x12822a&&(_0x12822a=!![],this[_0x88031(0x541)]++),await new Promise(_0x13505c=>this[_0x88031(0x4d5)][_0x88031(0x2c6)](_0x13505c));}if(this[_0x88031(0x3e2)]){const _0x1af420=new Error(_0x88031(0x311));_0x1af420[_0x88031(0x47d)]=_0x88031(0x423);throw _0x1af420;}}this['_outstanding']++;const _0x2f5ca5=this[_0x88031(0x1c6)][_0x88031(0x43e)];if(_0x2f5ca5)await _0x2f5ca5[_0x88031(0x5a1)]();if(this[_0x88031(0x3e2)]){if(_0x2f5ca5)_0x2f5ca5['afterWrite']();this[_0x88031(0x30d)]--;if(this['_bpWaiters']['length']&&this['_outstanding']<this['_highWater'])this[_0x88031(0x4d5)][_0x88031(0x5d9)]()();const _0x59fd73=new Error(_0x88031(0x311));_0x59fd73[_0x88031(0x47d)]='ENV_CLOSING_RETRY';throw _0x59fd73;}const _0x493a88=_0x21eb99[_0x88031(0x5cc)]();if(_0xf85519)try{const _0x29c4ee=this['env']['db']['transactionSync'](_0x587b49);this[_0x88031(0x2c0)]++;if(this[_0x88031(0x5de)][_0x88031(0x2c6)](_0x21eb99[_0x88031(0x5cc)]()-_0x493a88)>0x100)this[_0x88031(0x5de)]['shift']();if(this[_0x88031(0x4ea)][_0x88031(0x2c6)](_0x21eb99['now']())>0x800)this[_0x88031(0x4ea)]['shift']();return _0x29c4ee;}finally{this['_outstanding']--;if(this[_0x88031(0x4d5)][_0x88031(0x246)]&&this[_0x88031(0x30d)]<this['_highWater'])this[_0x88031(0x4d5)][_0x88031(0x5d9)]()();if(_0x2f5ca5)_0x2f5ca5['afterWrite']();}const _0x2ac7ce=this[_0x88031(0x1c6)]['db'][_0x88031(0x5d2)](_0x587b49);this[_0x88031(0x387)][_0x88031(0x332)](_0x2ac7ce),this[_0x88031(0x4de)]['set'](_0x2ac7ce,_0x493a88);const _0x2a70c1=()=>{const _0x2dbf06=_0x88031;this[_0x2dbf06(0x387)][_0x2dbf06(0x307)](_0x2ac7ce),this[_0x2dbf06(0x4de)][_0x2dbf06(0x307)](_0x2ac7ce),this[_0x2dbf06(0x2c0)]++,this['_outstanding']--;this['_bpWaiters'][_0x2dbf06(0x246)]&&this['_outstanding']<this[_0x2dbf06(0x657)]&&this[_0x2dbf06(0x4d5)][_0x2dbf06(0x5d9)]()();if(this['_durs']['push'](_0x21eb99[_0x2dbf06(0x5cc)]()-_0x493a88)>0x100)this['_durs'][_0x2dbf06(0x5d9)]();if(this[_0x2dbf06(0x4ea)][_0x2dbf06(0x2c6)](_0x21eb99[_0x2dbf06(0x5cc)]())>0x800)this[_0x2dbf06(0x4ea)][_0x2dbf06(0x5d9)]();};_0x2ac7ce[_0x88031(0x55f)](_0x2a70c1,_0x2a70c1);try{return await _0x2ac7ce;}finally{if(_0x2f5ca5)_0x2f5ca5[_0x88031(0x1ee)]();}}['status'](){const _0x367116=_0x51ba4b,_0x283fa5=_0x21eb99[_0x367116(0x5cc)]();let _0x88c862=0x0;for(const _0x1e770c of this['_enqueuedAt']['values']()){const _0x3f1f41=_0x283fa5-_0x1e770c;if(_0x3f1f41>_0x88c862)_0x88c862=_0x3f1f41;}let _0x40435b=0x0;for(let _0x585264=this[_0x367116(0x4ea)][_0x367116(0x246)]-0x1;_0x585264>=0x0;_0x585264--){if(_0x283fa5-this['_done'][_0x585264]>0x3e8)break;_0x40435b++;}let _0x568c9d=0x0;if(this[_0x367116(0x5de)][_0x367116(0x246)]){const _0x535476=[...this[_0x367116(0x5de)]][_0x367116(0x40f)]((_0x41e6cc,_0x467a7f)=>_0x41e6cc-_0x467a7f);_0x568c9d=_0x535476[Math[_0x367116(0x356)](_0x535476['length']-0x1,Math['floor'](_0x535476['length']*0.99))];}return{'depth':this['_inflight'][_0x367116(0x419)],'oldestPendingMs':Math[_0x367116(0x1cd)](_0x88c862),'committed':this[_0x367116(0x2c0)],'commitsPerSec':_0x40435b,'commitP99Ms':Math[_0x367116(0x1cd)](_0x568c9d),'parkedNow':this[_0x367116(0x4d5)][_0x367116(0x246)],'parkedTotal':this[_0x367116(0x541)],'highWater':this[_0x367116(0x657)]};}[_0x51ba4b(0x620)](){const _0x4c0055=_0x51ba4b,_0xd46a96=_0x21eb99['now']();return[...this[_0x4c0055(0x4de)][_0x4c0055(0x4a0)]()]['map'](_0x300214=>Math[_0x4c0055(0x1cd)](_0xd46a96-_0x300214))['sort']((_0x13f9f7,_0x52b773)=>_0x52b773-_0x13f9f7);}[_0x51ba4b(0x21c)](){const _0x34db61=_0x51ba4b;this[_0x34db61(0x3e2)]=!![];for(const _0x2fe9c0 of this[_0x34db61(0x4d5)][_0x34db61(0x2d8)](0x0))_0x2fe9c0();}async['drain'](){const _0x425504=_0x51ba4b;let _0x55de1a=0x0;while(this[_0x425504(0x387)][_0x425504(0x419)]&&_0x55de1a++<0x3e8){await Promise['allSettled']([...this[_0x425504(0x387)]]);}}async['put'](_0x20c317,_0x5cd38e,_0x416761,_0x25a87f){const _0x89204=_0x51ba4b;return this[_0x89204(0x54c)](()=>{const _0x51bc18=_0x89204;if(_0x25a87f===undefined)_0x20c317[_0x51bc18(0x1f6)](_0x5cd38e,_0x416761);else _0x20c317[_0x51bc18(0x1f6)](_0x5cd38e,_0x416761,_0x25a87f);},_0x89204(0x2f8));}async[_0x51ba4b(0x492)](_0x101f2f,_0x268025){const _0x303ab7=_0x51ba4b;return this[_0x303ab7(0x54c)](()=>_0x101f2f['removeSync'](_0x268025),_0x303ab7(0x348));}}async function _0x305871(_0x11b398,_0x12b119){const _0x383086=_0x51ba4b;if(_0x12b119==null)_0x12b119=Math[_0x383086(0x4ca)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0xafe9c5=_0x11b398?.['flushed'];if(!_0xafe9c5||typeof _0xafe9c5['then']!=='function')return;await Promise[_0x383086(0x46b)]([Promise[_0x383086(0x299)](_0xafe9c5)[_0x383086(0x5c5)](()=>{}),new Promise(_0x4b83ea=>{const _0x560158=_0x383086,_0x5f10c9=setTimeout(_0x4b83ea,_0x12b119);if(_0x5f10c9[_0x560158(0x476)])_0x5f10c9[_0x560158(0x476)]();})]);}catch{}}function _0x119652(_0x23c4eb){const _0xebb18f=_0x51ba4b;if(_0xf85519)return Promise[_0xebb18f(0x299)]();const _0x41b78f=_0x23c4eb?.[_0xebb18f(0x221)];return _0x41b78f&&typeof _0x41b78f[_0xebb18f(0x55f)]===_0xebb18f(0x344)?_0x41b78f:Promise[_0xebb18f(0x299)]();}return okdbWriter[_0x51ba4b(0x368)]=_0x496818,okdbWriter[_0x51ba4b(0x368)][_0x51ba4b(0x5aa)]=_0x305871,okdbWriter[_0x51ba4b(0x368)][_0x51ba4b(0x221)]=_0x119652,okdbWriter[_0x51ba4b(0x368)][_0x51ba4b(0x1aa)]=_0xf85519,okdbWriter[_0x51ba4b(0x368)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0xcaadd6=_0x38fa5f;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x428b92=require$$0,{SYNC_COMMITS:_0x1e8238}=requireOkdbWriter(),_0xf6550e=_0xcaadd6(0x57b);class _0x12b295{constructor(_0x5d67a2,_0x3a20bd,_0x3c2d16){const _0x4641be=_0xcaadd6;this['_lock']=_0x5d67a2,this['_key']=_0x3a20bd,this[_0x4641be(0x383)]=_0x3c2d16,this[_0x4641be(0x43f)]=![],this['_heartbeatTimer']=null,this[_0x4641be(0x268)]=null;}[_0xcaadd6(0x41e)](){const _0x3f6e54=_0xcaadd6;if(this[_0x3f6e54(0x43f)])return![];try{const _0x1d8d48=this[_0x3f6e54(0x234)][_0x3f6e54(0x35b)]()[_0x3f6e54(0x1fe)](this[_0x3f6e54(0x670)]);if(!_0x1d8d48||_0x1d8d48[_0x3f6e54(0x1b1)]!==this[_0x3f6e54(0x383)])return![];const _0x47a66b=_0x1d8d48[_0x3f6e54(0x663)]??_0x1d8d48[_0x3f6e54(0x1b1)];if(_0x47a66b+_0x1d8d48[_0x3f6e54(0x327)]<Date['now']())return![];return!![];}catch{return!this['_released'];}}[_0xcaadd6(0x44c)](){const _0x3ca5eb=_0xcaadd6;if(this['_released'])return null;try{return this[_0x3ca5eb(0x234)][_0x3ca5eb(0x35b)]()[_0x3ca5eb(0x1fe)](this[_0x3ca5eb(0x670)])??null;}catch{return null;}}async[_0xcaadd6(0x3e9)](_0xacedf){const _0x25e3df=_0xcaadd6;if(this['_released'])return;try{const _0x15151d=this[_0x25e3df(0x234)]['_db']()[_0x25e3df(0x1fe)](this[_0x25e3df(0x670)]);if(!_0x15151d||_0x15151d[_0x25e3df(0x1b1)]!==this[_0x25e3df(0x383)])return;if(_0x1e8238)this[_0x25e3df(0x234)][_0x25e3df(0x35b)]()[_0x25e3df(0x1f6)](this[_0x25e3df(0x670)],{..._0x15151d,'ttlMs':_0x15151d[_0x25e3df(0x327)]+_0xacedf});else await this[_0x25e3df(0x234)]['_db']()['put'](this[_0x25e3df(0x670)],{..._0x15151d,'ttlMs':_0x15151d['ttlMs']+_0xacedf});}catch{}}async[_0xcaadd6(0x56a)](){const _0x5d8b98=_0xcaadd6;if(this[_0x5d8b98(0x43f)])return;if(this['_heartbeatInFlight'])try{await this[_0x5d8b98(0x268)];}catch{}clearInterval(this[_0x5d8b98(0x324)]),this[_0x5d8b98(0x324)]=null,this[_0x5d8b98(0x43f)]=!![];try{const _0x5f1704=this['_lock'][_0x5d8b98(0x35b)]()[_0x5d8b98(0x1fe)](this[_0x5d8b98(0x670)]);if(_0x5f1704&&_0x5f1704[_0x5d8b98(0x1b1)]===this['_acquiredAt']){if(_0x1e8238)this['_lock'][_0x5d8b98(0x35b)]()['removeSync'](this[_0x5d8b98(0x670)]);else await this[_0x5d8b98(0x234)][_0x5d8b98(0x35b)]()['remove'](this[_0x5d8b98(0x670)]);}}catch{}}[_0xcaadd6(0x3e6)](_0x4d080a,_0x3d2165){const _0x23f3cf=_0xcaadd6,_0x334d1e=_0x3d2165??Math[_0x23f3cf(0x5e8)](_0x4d080a/0x3);this[_0x23f3cf(0x324)]=setInterval(()=>{const _0x298196=_0x23f3cf;if(this[_0x298196(0x43f)])return;this[_0x298196(0x268)]=((async()=>{const _0x1f6eaf=_0x298196;try{const _0x304ecb=this[_0x1f6eaf(0x234)][_0x1f6eaf(0x35b)]()[_0x1f6eaf(0x1fe)](this[_0x1f6eaf(0x670)]);if(!_0x304ecb||_0x304ecb[_0x1f6eaf(0x1b1)]!==this[_0x1f6eaf(0x383)]){this[_0x1f6eaf(0x43f)]=!![],clearInterval(this[_0x1f6eaf(0x324)]),this[_0x1f6eaf(0x324)]=null;return;}if(_0x1e8238)this['_lock'][_0x1f6eaf(0x35b)]()['putSync'](this['_key'],{..._0x304ecb,'updatedAt':Date[_0x1f6eaf(0x5cc)]()});else await this['_lock'][_0x1f6eaf(0x35b)]()[_0x1f6eaf(0x1b3)](this[_0x1f6eaf(0x670)],{..._0x304ecb,'updatedAt':Date[_0x1f6eaf(0x5cc)]()});}catch{}this['_heartbeatInFlight']=null;})());},_0x334d1e);if(this[_0x23f3cf(0x324)][_0x23f3cf(0x476)])this[_0x23f3cf(0x324)]['unref']();}}class _0xae908c{constructor(_0x4d6019,{namespace:_0x17f2fb,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x3f8cc1=_0xcaadd6;this[_0x3f8cc1(0x1c5)]=_0x4d6019,this[_0x3f8cc1(0x4ce)]=_0x17f2fb,this[_0x3f8cc1(0x327)]=ttlMs,this[_0x3f8cc1(0x4a7)]=heartbeatMs,this['_lockDb']=null;}[_0xcaadd6(0x35b)](){const _0x5e5e31=_0xcaadd6;return!this[_0x5e5e31(0x551)]&&(this[_0x5e5e31(0x551)]=this[_0x5e5e31(0x1c5)][_0x5e5e31(0x4c3)](_0xf6550e,{'dupSort':![]})),this[_0x5e5e31(0x551)];}['_wantDb'](){const _0x4921f2=_0xcaadd6;return!this[_0x4921f2(0x531)]&&(this[_0x4921f2(0x531)]=this[_0x4921f2(0x1c5)]['openDB'](_0xf6550e+':want',{'dupSort':![]})),this[_0x4921f2(0x531)];}[_0xcaadd6(0x670)](_0x2afd2f){return this['namespace']+':'+_0x2afd2f;}['signalWant'](_0x5f2bd9){const _0xc2f605=_0xcaadd6;try{_0x1e8238?this['_wantDb']()['putSync'](this[_0xc2f605(0x670)](_0x5f2bd9),Date[_0xc2f605(0x5cc)]()):this['_wantDb']()[_0xc2f605(0x1b3)](this['_key'](_0x5f2bd9),Date['now']())?.[_0xc2f605(0x5c5)]?.(()=>{});}catch{}}[_0xcaadd6(0x1b0)](_0x21b1ed,_0x4addc9=0x3e8){const _0x5b56ed=_0xcaadd6;try{const _0x81b6b6=this[_0x5b56ed(0x2a8)]()[_0x5b56ed(0x1fe)](this[_0x5b56ed(0x670)](_0x21b1ed));return typeof _0x81b6b6===_0x5b56ed(0x4f6)&&Date['now']()-_0x81b6b6<_0x4addc9;}catch{return![];}}[_0xcaadd6(0x59b)](_0x5e399e){const _0x250579=_0xcaadd6,_0x467350=_0x5e399e[_0x250579(0x663)]??_0x5e399e[_0x250579(0x1b1)];return _0x467350+_0x5e399e[_0x250579(0x327)]<Date[_0x250579(0x5cc)]();}static[_0xcaadd6(0x371)](_0x4f6f38){const _0x2a65d0=_0xcaadd6,_0x1891b0=_0x4f6f38?.[_0x2a65d0(0x44c)];if(!_0x1891b0||typeof _0x1891b0[_0x2a65d0(0x53a)]!==_0x2a65d0(0x4f6))return![];if(_0x1891b0[_0x2a65d0(0x1d1)]!==_0x428b92[_0x2a65d0(0x1d1)]())return![];if(_0x1891b0[_0x2a65d0(0x53a)]===process[_0x2a65d0(0x53a)])return![];try{return process[_0x2a65d0(0x25e)](_0x1891b0[_0x2a65d0(0x53a)],0x0),![];}catch(_0x386587){return _0x386587[_0x2a65d0(0x47d)]===_0x2a65d0(0x25b);}}async[_0xcaadd6(0x2a9)](_0x30fa16,_0x5d23c6={},_0x31b257={}){const _0x556442=_0xcaadd6,_0x252dd4=this[_0x556442(0x670)](_0x30fa16),_0x2a83a0=_0x31b257[_0x556442(0x327)]??this[_0x556442(0x327)],_0x4d1dc5=Date[_0x556442(0x5cc)](),_0x3bfe9a={'holder':{'pid':process[_0x556442(0x53a)],'hostname':_0x428b92[_0x556442(0x1d1)](),..._0x5d23c6},'acquiredAt':_0x4d1dc5,'updatedAt':_0x4d1dc5,'ttlMs':_0x2a83a0};let _0x162992=![],_0xc9d26a=null;try{const _0x1b8c5b=()=>{const _0x1a0873=_0x556442,_0x38b61a=this[_0x1a0873(0x35b)]()['get'](_0x252dd4);if(_0x38b61a&&!this[_0x1a0873(0x59b)](_0x38b61a)&&!_0xae908c[_0x1a0873(0x371)](_0x38b61a)){const _0x567c65=_0x5d23c6['processorId']!=null&&_0x38b61a['holder'][_0x1a0873(0x53a)]===process[_0x1a0873(0x53a)]&&_0x38b61a[_0x1a0873(0x44c)][_0x1a0873(0x658)]===_0x5d23c6[_0x1a0873(0x658)];if(!_0x567c65){_0x162992=![],_0xc9d26a=_0x38b61a;return;}_0x3bfe9a['acquiredAt']<=_0x38b61a['acquiredAt']&&(_0x3bfe9a[_0x1a0873(0x1b1)]=_0x38b61a[_0x1a0873(0x1b1)]+0x1,_0x3bfe9a[_0x1a0873(0x663)]=_0x3bfe9a[_0x1a0873(0x1b1)]);}this[_0x1a0873(0x35b)]()[_0x1a0873(0x1b3)](_0x252dd4,_0x3bfe9a),_0x162992=!![],_0xc9d26a=_0x3bfe9a;};if(_0x1e8238)this[_0x556442(0x35b)]()[_0x556442(0x4fd)](_0x1b8c5b);else await this['_db']()[_0x556442(0x5d2)](_0x1b8c5b);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x162992)return{'acquired':![],'handle':null,'current':_0xc9d26a};const _0x230d63=new _0x12b295(this,_0x252dd4,_0x3bfe9a[_0x556442(0x1b1)]);return _0x230d63[_0x556442(0x3e6)](_0x2a83a0,this[_0x556442(0x4a7)]),{'acquired':!![],'handle':_0x230d63,'current':_0xc9d26a};}[_0xcaadd6(0x478)](_0x57c4cf){const _0xf4eb87=_0xcaadd6;try{return this[_0xf4eb87(0x35b)]()[_0xf4eb87(0x1fe)](this[_0xf4eb87(0x670)](_0x57c4cf))??null;}catch{return null;}}['list'](){const _0x4a05a8=_0xcaadd6,_0x2161a7=this['namespace']+':',_0x450a94=[];try{for(const {key:_0xf52a46,value:_0x51e7b5}of this[_0x4a05a8(0x35b)]()[_0x4a05a8(0x4cb)]({'start':_0x2161a7,'end':_0x2161a7+'ÿ'})){typeof _0xf52a46===_0x4a05a8(0x2fc)&&_0xf52a46['startsWith'](_0x2161a7)&&_0x450a94[_0x4a05a8(0x2c6)]({'id':_0xf52a46[_0x4a05a8(0x20b)](_0x2161a7[_0x4a05a8(0x246)]),'entry':_0x51e7b5});}}catch{}return _0x450a94;}static[_0xcaadd6(0x292)](_0x28cf82){const _0x2da9ee=_0xcaadd6,_0x552b6e=[];try{const _0x41d96d=_0x28cf82[_0x2da9ee(0x4c3)](_0xf6550e,{'dupSort':![]});for(const {key:_0x578c54,value:_0x567521}of _0x41d96d[_0x2da9ee(0x4cb)]({})){if(typeof _0x578c54!==_0x2da9ee(0x2fc))continue;const _0x50943f=_0x578c54[_0x2da9ee(0x388)](':');if(_0x50943f<0x1)continue;_0x552b6e[_0x2da9ee(0x2c6)]({'namespace':_0x578c54[_0x2da9ee(0x20b)](0x0,_0x50943f),'id':_0x578c54[_0x2da9ee(0x20b)](_0x50943f+0x1),'entry':_0x567521});}}catch{}return _0x552b6e;}}return okdbLock={'OKDBLock':_0xae908c},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function _0x4093(){const _0x5e1684=['verifyActivation','isArray','/api/','Invalid\x20license\x20blob:\x20','invalid','env/','stdout','_enqueuedAt','licenseHash','getPins','expiry','\x0a\x20\x20✓\x20Token\x20created','draining','[okdb]\x20reset\x20aborted','_isFree','concat','user','database\x20path\x20writable:\x20','system','_done','[okdb]\x20cluster\x20close\x20error:\x20','compact','\x20to\x20browse\x20the\x20API,\x20','~processes','view:progress','http','Cannot\x20delete\x20','LICENSE_TYPE_OPEN','start','\x20\x20\x20\x20graceful\x20shutdown\x0a','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','number','startsWith','.log','queue','consecutiveFailures','dropping','License\x20limit\x20exceeded:\x20','transactionSync','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','toISOString','procmodeack/','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','_migrateVocab','--label','stderr','PUBLIC_KEY_PEM','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','_activateProcesses','auth','_clusterOrphanWatch','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','_ensureDesired','_processStartedAt','_pending','utf8','green','has','type/users/query\x20{\x22active\x22:true}','[okdb]\x20error:\x20failed\x20to\x20read\x20','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x20\x20\x20http://localhost:','schema:set','\x20\x20\x20\x20limits:\x20\x20\x20\x20','ms\x20activeWriters=','\x20worker\x20slot=','other','migrate','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','identity','_handleInProcess','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','isInteger','detachConsole','\x20\x20[','\x20already\x20in\x20use','[okdb]\x20blobs:\x20imported=','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','node:events','toLocaleString','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','net','removeLicense','\x0a\x20\x20\x20\x20\x20\x20','derivePin','claimGated','recordWrite','\x20\x20Writes:\x20\x20','map','[okdb]\x20unknown\x20token\x20action:\x20\x22','_wantDbHandle','node:crypto','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','_removeRowAsync','--inspect','__esModule','stats','_buckets','import','pid','uncaughtException','clearThreadStats','Index\x20\x27','SYSTEM_PROC','unclaimed','port\x20','_bpParkedTotal','cli','(none)','prompt','transport','\x20in\x20','hidden','createHmac','\x20\x20Type\x20','[okdb]\x20export\x20complete','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','transaction','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','memoryUsage','cursorKey','--no-admin','_lockDb','valid','[okdb]\x20exported\x20\x20types=','participate','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','[okdb]\x20error:\x20','_onStop','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','dead','/type/users\x0a\x20\x20\x20\x20','\x20does\x20not\x20exist','loop-lag','cluster:\x20ready\x20(','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','then','INDEX_PROGRESS','SCHEMA_COLLECTION_INVALID','alloc','\x20result','_desiredOverlay','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','active:','_markSeen','[filter]','\x20logs\x20on\x20\x20','release','ref:violation','toLowerCase','blobs','writeUInt16BE','[okdb]\x20cluster\x20primary\x20pid=','\x22\x20matches\x20','_buildOwnRow','processor:error','assertLimit','call','current','includes','close','_isReader','decoded','processor:paused','~lock','publishChildRow','removeNode','indexToDb','exportToFile','Unique\x20constraint\x20violated\x20on\x20','\x20\x20env=',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','history','_seen','listDesired','_lastPublishAt','CREATED','backup','\x20\x20Error:\x20','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','__OKDB_PUB_FINGERPRINT__','body:\x20','okdb-http-worker-child.js','node','grants','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','readFileSync','OKDBSchemaValidationError','note','method','async','\x0d[okdb]\x20','database\x20path\x20not\x20writable:\x20','\x20\x20score:','processor:progress','true','_isStale','_collectWriterFacet','fts:registered','\x0a\x20\x20','INDEX_ALREADY_REGISTERED','\x20\x20@','beforeWrite','pending','state','_windowCbs','OKDBAlreadyExistsError','events','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20','\x20tokens:','assertFeature','flushLmdb','[okdb]\x20invalid\x20port:\x20','addLicense','permissions','cpuPct','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','value','\x20\x20\x20\x20licensee:\x20\x20','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','QUIT','active','boolean','dbPath','\x20\x20\x20\x20license:\x20','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','_isWriter','der','index:ready','getCmd','statSync','.kdbconfig','white','name','use\x20<env>','_onProcEvent','ITEM_CREATE',',\x20stopping\x20workers…\x0a','catch','\x20\x20(need\x20≥\x2018)','SIGKILL','default','_cmd','_isClusterController','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','now','ceil','decommissioned','\x20│\x20','files/','\x20\x20✓\x20','childTransaction','username','./okdb-backup','warn','INDEX_HAS_CONSUMERS','system:stopped','/admin/index.html','shift','_instanceId','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','started','deregisterSelf','_durs','split','bus:type_drop','xdg-open\x20','\x20HTTP\x20server(s)\x20on\x20port\x20','repeat','PUT\x20type/users/item/x\x20{\x22n\x22:1}','_groupByProcess','_publishFailWarned','killable','floor','3811619aGjaub','NAME','_draining','val','already\x20in\x20use','processorsView','--name','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','\x20\x20✗','workers','Full-text\x20search','processes','node\x20identity','from','exit','expires','schema:drop','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','txn:start','\x20references\x20','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','env:removed','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','<path>','digest','(add\x20a\x20license\x20first)','_listenAddr','createInterface','UNIQUE_CONSTRAINT','heapTotal','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','setSchema','path','keys','Admin','activateLicense','join','rawBuf','ingest','shutting\x20down…\x0a','setLogger','FTS_RESET','\x20\x20(name:\x20','_envs','/api/env/','sync','cluster','targetType','magenta','--env\x20<name>','\x20\x20·\x20\x20','\x20records…','dirname','\x20→\x20POST\x20/api/env/','inflightAgesMs','bus:drain','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','Environments','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','listenAddr','INVALID_VALUE','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','type','filter','runtimeProcessesView','ttl','--blobs','\x20(must\x20be\x201–65535)','\x20phase=','clearTtl','sourceType','\x20===','\x20\x20\x20\x20','reverse','registerIndex','PATCH','cpus','processor:retry','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20API\x20docs\x20for\x20a\x20path\x0a\x0a\x20\x20','\x1b[90m','license','[okdb]\x20reset:\x20','_threadStats','registry\x20heartbeat\x20skipped\x20(writer=','getCount','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','fanout','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','DELETE','\x20log\x20level:\x20','_cursors','\x20\x20✓\x20http\x20listening\x20on\x20:','\x1b[34m','\x27:\x20','event','\x20\x20\x20\x20\x20\x20\x20','logRequests','writeUInt8','\x20documents\x20fail\x20validation','[okdb]\x20invalid\x20','_handlePoke','\x0a[okdb]\x20received\x20','\x0a\x0a\x20\x20','[okdb]\x20import\x20complete','\x20\x20skipped=','\x20\x20Flags','quit',',\x20closing…\x0a','_license','_highWater','processorId','ttl:expired','setTtl','find','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','verify','pin','mode','key','--log-requests','unique:violation_resolved','updatedAt','getChanges','[okdb]\x20imported\x20\x20types=','\x20\x20\x20\x20status:\x20\x20\x20\x20','(empty)','SIGBREAK','admin','question','item:create','\x20worker(s)\x20remaining','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','okdb-diag.','charCodeAt','_key','\x1b[31m','OKDBVersionMismatchError','66355mVKjkj','stopped','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','listNodes','env:opened','SYNC_COMMITS','--port','\x20logs\x20off\x0a','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\x20parkedNow=','isEnabled','isWanted','acquiredAt','queue-worker','put','No\x20license\x20found\x20matching\x20this\x20activation\x20token','envs=','none','stop','nodeKey','SIGTERM','dropSchema','info','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','okdb.pid','_lastCpuWindowMs','failures','processKey','activation','type/users/item/alice','_startAdmission','\x20\x20\x20\x20expires:\x20\x20\x20','_rawDb','env','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','slotKey','export','listRoutes','doctor','ITEM_UPDATE','round','../','STATUS','null','hostname','mean','description','copy','processing','registry-publish','_sampleOwnStats','SIGINT','readUInt16BE','_hbTimer','default:\x20cores−1\x20=\x20','--username','typeSubDbs','process','cause','abs','removeSync','drop','./okdb-export.ndjson','address','depth','\x20\x20Usage:\x20','password','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','ALREADY_EXISTS','fork','SIG_INVALID','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','OKDBTypeNotRegisteredError','afterWrite','--ttl','\x0a===\x20OKDB_DIAG\x20','all','sizeBefore','log','licensee','__writeCounter','putSync','bus:proc','node/','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','~tokens','bumpCmd','_flushTimer','\x0a\x20\x20✓\x20License\x20added','get','--drop','SIGINT\x20(double-tap)','fieldPath','\x20not\x20found','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','licenseType','_scheduleFlush','\x20\x20http://localhost:','toUpperCase','recent\x20writes\x20(newest\x20first)','OKDBIndexNotRegisteredError','\x20(expires\x20in\x20','slice','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','\x27\x20doesn\x27t\x20exist','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','port','--help','readUInt32BE','(on\x20any\x20path\x20command)','replace','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','trimStart','cpuUsage','base64url','changes','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','type:drop','_putRowSync','markClosed','processors','[okdb]\x20invalid\x20log\x20level:\x20\x22','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','addedAt','committed','writeFileSync','title','workersConfigured','_putRowAsync','primary','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','isTTY','body','limits','[env]','../okdb','905176zyRuYC','false','ms\x20on\x20env=','\x20\x20Path\x20access','respawnTimer','\x20\x20✓\x20OKDB\x20server\x20running','Embeddings','_lock','decodeActivationToken','\x20\x20╚═══════════════════════════╝','index:reset','--token','--grants','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','\x20bytes,\x20need\x20>=\x2065)','freeze','hex','ENVS','LICENSE_ACTIVATION_INVALID','_lastCpuAt','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a','reason','ms\x20env=','\x1b[2m','0123456789ABCDEFGHJKMNPQRSTVWXYZ','length','off','entries','token','LICENSE_EXPIRED_ACTION','set','\x0a\x20\x20No\x20routes\x20matching\x20\x22','init','fast','clear','dim','envsOpen','received\x20','shutdown','_baselines','_rootDb','INDEX_REGISTERED','flushDebounce','/type/users/item/alice\x0a\x20\x20\x20\x20','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','okdb','ESRCH','rss','FEATURES','kill','FOREIGN_KEY_VIOLATION','_startedAt','--address','instances','host','LICENSED_BUILD','payload','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','\x20\x20\x20\x20\x20\x20','_heartbeatInFlight','Build\x20expects\x20public\x20key\x20fingerprint\x20','external','POST','noCluster','some','~licenses','_onTick','lifecycle','shmbuf/package.json','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','\x20@\x20','crypto','\x22\x20on\x20\x22','\x20\x20\x20\x20usage:\x20\x20\x20','_timer','status','[okdb-cluster]\x20slot=','input:\x20','__identity','OKDBUniqueConstraintError','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','_dedupeMax','open\x20','\x0a[okdb]\x20fatal\x20error:','shmbuf.node','typesPerEnv','access','config','~processes:cmd','types:','--log-level','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','sig','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','\x20\x20→\x20\x20','inputSchema','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','heapUsed','\x22\x20is\x20used\x20by:\x20','index:drop','unlinkSync','listAll','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20day(s).','LICENSE_FEATURE_DISABLED','type/','allocUnsafe','_started','resolve','system:proc','__okdbSlot','Records','exportBlobs','rowKey','\x22\x20already\x20exists','ROUTES','prototype','error','kind','cluster-wide','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','noRepl','_caps','_wantDb','tryAcquire','66969Vkpdkc','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','_desired','count','data','_openEnvLazy','LOGS','_ownMeta','_enableChangelog','targetKey','indexes','_clusterWorkerAttached','No\x20tokens.','--key','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','ref:violation_resolved','maxMs','reload','_nodeDbFor','272NPagSe','createdAt','type/users/item/alice\x20--env\x20staging','_committed','gray','INDEX_NOT_REGISTERED','\x20\x20[okdb]\x20','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','enable','push','building','fts:drop','\x20writer{depth=','[okdb]\x20preserved:\x20','importBlobs','node:perf_hooks','stdin','single','expired','ENV','\x20\x20[okdb]\x20closed\x20cleanly\x0a','Bearer\x20','license:added','maxWrites','unknown','\x22\x20→\x20','send','splice','473791EXJrhT','isDead','Processors','options','[okdb]\x20started\x20in\x20','_onPoke','idx:','execArgv','isWorker','[okdb]\x20closed\x20cleanly\x0a','\x20\x20\x20\x20permissions:\x20','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','list','endsWith','_kind','--env','registerType','fts:reset','Invalid\x20activation\x20token:\x20','(code=','(unset)','creating','reap','Queue','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','%),\x20','onLicenseExpired','ms\x20max=','\x20\x20\x20\x20path:\x20\x20\x20\x20','Schema\x20validation\x20failed\x20for\x20','_active','raw-put','Files','env/staging/info','ORPHAN\x20(env-closed\x20write)','string','readUInt8','features','\x20\x20+','worker','cyan','[on|off|level]','bold','label','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','passive\x20HTTP\x20worker(s)\x20serving\x20:','delete','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','OKDBIndexHasConsumersError','OKDB_HTTP_WORKERS\x20env','standalone','system:drain','_outstanding','exp','scrypt','getSecurityNotices','okdb-writer:\x20env\x20closing\x20—\x20retry','starting','tierList','ITEM_REMOVE','[okdb]\x20loaded\x20config:\x20','--version','[okdb]\x20error:\x20--password\x20requires\x20--name','attach','red','[okdb-cluster]\x20','\x22.\x20Use:\x20create,\x20list,\x20revoke','stringify','\x20already\x20exists','[okdb]\x20created\x20./okdb-data','txn:rollback','(no\x20types)','registry\x20publish\x20failing:\x20','<json-body>','\x20pid=','_heartbeatTimer','fts','license:removed','ttlMs','addSupervisedChild','2779340gRIcuX','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','_selfKey','noAdmin','summary','_computeStatus','existsSync','_singletonLock','timeMachine','add','\x20\x20(licensee:\x20','[okdb]\x20close\x20error:\x20','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','singletonClaims','_ensureTokensType','_flushDebounce','object','keys/public.pem','_refreshDesiredSnapshot','epoch','[okdb-cluster]\x20primary\x20pid=','caps','bus:env_release','children','sha256','time','INVALID_INDEX_KEY','function','supervisorKey','fromEntries','config\x20file\x20invalid:\x20','raw-remove','\x1b[32m','parkedNow','blob','licenses','\x20months\x20from\x20issuance)','offWindow','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','hasOwnProperty','\x0a[okdb]\x20error:\x20','_admissionTimer','_maybePublish','http.workers','NOT_FOUND','min','_dedupeKey','captureStackTrace','TYPE_ALREADY_REGISTERED',');\x20','_db','_adminRelay','use','padStart','OKDBForeignKeyError','types\x20--env\x20staging','finally','update','\x20/\x20','VIEW_PROGRESS','maxExtra','change','syncPeers','exports','threads','processingStatusView','hint','DELETE\x20type/users/item/x','keys:','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','sync:apply','/api','_holderDead','hasDesired','percentile','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','_quantum','setOwnMeta','Events','debug','OKDB-PIN-V1:','{}[]:,\x27\x22','SYSTEM_STOPPED','homedir','getDesired','every','\x20which\x20does\x20not\x20exist','nodesView','\x20records','License\x20expired\x20or\x20invalidated','_acquiredAt','emit','bind','\x20writes\x20(','_inflight','indexOf','bus:poke','treeView','slot','safety','cluster:','fill','_supervisorKey','\x0d[okdb]\x20blobs:\x20','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','writeUInt32BE','oldestPendingMs','\x20\x20\x20\x20\x20http://localhost:','--permissions','\x20(slot=','wrong_node','LICENSE_HASH_MISMATCH','\x20drainAge=','_lastCpuPct','SYSTEM_POKE','__vocab/version','--changes','License\x20already\x20stored','views','\x20+\x20','argv','.okdb-write-test','\x20\x20·\x20','rmSync','listen','loadEnvFile','type:registered','--open','prependListener','/type/users/query\x0a\x20\x20\x20\x20','\x20ipc\x20error:\x20','_nodeDead','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','engines','role','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','errors','\x20\x20\x20\x20id:\x20\x20\x20\x20','_sandbox','view','resume','OKDBForeignKeyDeleteError','open','padEnd','processors/','config\x20http.workers','\x20\x20✓\x20Revoked\x20token\x20','txn:end','startHeartbeat','\x1b[35m','mcp','_nodeDb','_role','\x27\x20on\x20type\x20\x27','\x20\x20Envs:\x20\x20\x20\x20','ttl:clear','toString','EXPIRES',':\x20expected\x20','logs','\x27\x20is\x20already\x20registered','isConnected','next','.kdb_history','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','FOREIGN_KEY_DELETE_RESTRICTED','--watch','toFixed','detectInputType','running','Release','randomBytes','putNode','\x20environment\x20','_admissionStarted','stack','_nodeDbCache','\x20HTTP\x20workers\x20','getClock','connected','REMOVE','disable','logLevel','SCHEMA_VALIDATION_FAILED','setPrompt','_closed','\x20\x20\x20\x20port:\x20\x20\x20\x20','--workers','help','_startHeartbeat','stopping','commit','extend','reduce','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','processor:ready','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','6qNxptc','no\x20.kdbconfig\x20(using\x20defaults)','\x20\x20\x20\x20admin:\x20http://localhost:','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','createPublicKey','\x0a\x20\x20\x20\x20','child_process','Version\x20mismatch\x20for\x20','_onItem','Invalid\x20primary\x20key\x20type:\x20','appendFileSync','meta','[okdb]\x20exporting\x20env\x20\x22','dropType','pause','\x20(expires\x20','byteLength','createEnvironment','\x20\x20Shell\x20commands','config\x20file\x20valid:\x20','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','[okdb-cluster]\x20worker\x20pid=','ms\x20p99=',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','license:invalid','listLicenses','force','columns','resetReadTxn','LICENSE_INVALID','Shutting\x20down\x20due\x20to\x20license\x20expiry','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','LICENSEE','sort','registerFts','unhandledRejection','EXIT','reset','\x20\x20\x20\x20port:\x20\x20','\x20times\x20in\x20','disconnect','SWAP','\x20license(s)','size','result','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','Type\x20\x27','dropIndex','isHeld','listening','Examples','--no-cluster','tags','ENV_CLOSING_RETRY','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','--test','\x20\x20records=','writes=','ephemeral','_children','embedded','types','version','setDesired','system:bus_state_change','\x20process','decodeLicenseBlob','trim','_rowKey','Indexes','removeSupervisedChild','_log','licensed','63642FWHqAW','Token\x20secret\x20not\x20configured','startedAt','confirm','processor:resumed','getProcess','246cnCsVQ','_coordinator','_released','embeddings','records','line',':\x20processor\x20(HTTP-silent),\x20','_statusEnv','--config','_singletonLocks','win32','uuid',':\x20key\x20[','\x20\x20Expected\x20one\x20of:','free\x20tier','holder',',\x20got\x20','roles','2.0.3','mkdirSync','attachFeed','\x1b[33m','message','sandbox','GET','[okdb]\x20starting…\x0a','_buildProcessingFacet','instanceId','\x20\x20(unlimited)','shmbufNative','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','http-server','(worst\x20','routes','terminal','Foreign\x20key\x20violation:\x20','workersFlag','expiresAt','_buildChildRow','\x20died\x20','\x20licenses','uptime','_licenseHash','feed:','index:registered','--types','race','Cannot\x20set\x20enforce\x20schema\x20on\x20','busy','_collectSingletonClaims','yellow','forEach','\x20\x20\x20\x20features:\x20\x20','effective','entry','platform','_report','unref','\x20\x20Usage:','inspect','deaths','once','id:\x20','enabled','code','OKDBIndexAlreadyRegisteredError','create','properties','OKDBError','createHash','dynamic','item:remove','PIN','/\x20quit\x20/\x20Ctrl+C','param','functions','system:ready','test','\x20envs','\x0a\x20\x20Joining\x20cluster\x20at\x20','\x20(durable\x20desired-state)','ACTIVATION_EXPIRED','--path','dedupeMax','standard','remove','LICENSE_LIMIT_EXCEEDED','\x20\x20╔═══════════════════════════╗','access:\x20','_changefeed','PUT','references','\x20\x20All\x20checks\x20passed.\x0a','\x20statusEnv=','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','OKDBTypeAlreadyRegisteredError','types/env=','OPEN','ppid','values','_systemEnv','\x1b[0m','OKDBInvalidIndexKeyError','decommission','(primary\x20=\x20processor)','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','heartbeatMs','hard-killed','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','index','compaction','HELP','write','load','\x20sync','hasType','_writer','pushEphemeral','envs','server','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Tier:\x20\x20\x20\x20','_drain','parse','operation','online','--password','api','\x0a\x20\x20Invalid\x20JSON:\x20','clusterWorkers','_lastCpuUsage','[okdb]\x20nothing\x20to\x20reset\x20—\x20','timingSafeEqual','openDB','PUB_FINGERPRINT','~processes:desired','./okdb-data','system:clock_change','_publishNow','\x20\x20changes=','max','getRange','randomUUID','_drainOne','namespace','Feature\x20not\x20licensed:\x20','\x20\x20(','\x20\x20Common\x20causes:','level','\x20env','created','_bpWaiters','\x20\x20#'];_0x4093=function(){return _0x5e1684;};return _0x4093();}function requireOkdbProcessRegistry(){const _0x32735b=_0x38fa5f;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x313de3=require$$0,_0x3798f6=require$$1$2,_0x5be8c6=require$$0$1,{LOOP:_0x46ab76}=requireOkdbLoopMonitor(),{OKDBLock:_0x430524}=requireOkdbLock(),{SYNC_COMMITS:_0x511043}=requireOkdbWriter(),_0x95e5cd=_0x32735b(0x4ee),_0x2cdb8d=_0x32735b(0x58e),_0x328018=_0x32735b(0x4c5),_0x4753b6=_0x32735b(0x285),_0x33dd5d=(_0x1b77c8,_0x4d5cfa)=>_0x1b77c8+':'+_0x4d5cfa,_0x24c945=(_0x5ec807,_0x271b8f)=>_0x5ec807+'::'+_0x271b8f,_0x26ab8f=(_0x21119c,_0xd20041)=>_0x21119c+'/'+_0xd20041,_0x52a36c=(_0x141e2e,_0x21c53d)=>_0x141e2e+'#'+_0x21c53d,_0x41a8b4=_0x12b32d=>{const _0x3c2759=_0x32735b;if(_0x12b32d?.[_0x3c2759(0x1c0)])return _0x12b32d[_0x3c2759(0x1c0)];const _0x2ae898=_0x12b32d?.['nodeKey'];return typeof _0x2ae898===_0x3c2759(0x2fc)&&_0x2ae898[_0x3c2759(0x576)]('#')?_0x2ae898['slice'](0x0,_0x2ae898['indexOf']('#')):_0x2ae898;},_0x438057=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x440f6a=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x3b3bd1=_0x438057*0x3,_0x5928d6=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x32735b(0x4ca)](0x927c0,_0x3b3bd1*0x14),_0x136314=[_0x32735b(0x599),_0x32735b(0x3ec),_0x32735b(0x637),_0x32735b(0x572),_0x32735b(0x57a),'processor:resumed'];let _0x4253e1=null;function _0x4ac5bc(){const _0x3fd986=_0x32735b;if(_0x4253e1==null)_0x4253e1=Math['round']((Date[_0x3fd986(0x5cc)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x4253e1;}function _0x2c1fed(_0x59c46f){const _0x482757=_0x32735b;if(process.env.OKDB_PROCESS_KILL===_0x482757(0x247))return![];if(_0x59c46f?.[_0x482757(0x2dc)]?.['processes']&&typeof _0x59c46f['options'][_0x482757(0x5f4)]==='object'&&_0x59c46f[_0x482757(0x2dc)][_0x482757(0x5f4)][_0x482757(0x25e)]===![])return![];return!![];}function _0xd81b52(_0x5d0909,_0x221992){const _0x40b498=_0x32735b,_0x236692=!!_0x221992?.[_0x40b498(0x21d)];switch(_0x5d0909){case _0x40b498(0x226):return{'controllable':_0x236692,'decommissionable':![],'killable':!![],'killConfirm':_0x40b498(0x2a4)};case'cli':case _0x40b498(0x30b):return{'controllable':_0x236692,'decommissionable':![],'killable':!![],'killConfirm':_0x40b498(0x43a)};case _0x40b498(0x42a):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x40b498(0x1b2):case'fn-runner':case _0x40b498(0x300):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x40b498(0x408)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x68b069{constructor(_0x314c95){const _0x320713=_0x32735b;this[_0x320713(0x25a)]=_0x314c95,this[_0x320713(0x444)]=null,this[_0x320713(0x2ac)]=null,this[_0x320713(0x564)]=new Map(),this[_0x320713(0x5c9)]=null,this[_0x320713(0x5b9)]=![],this[_0x320713(0x578)]=![],this[_0x320713(0x50c)]=_0x4ac5bc(),this[_0x320713(0x32b)]=_0x33dd5d(process[_0x320713(0x53a)],this[_0x320713(0x50c)]),this[_0x320713(0x5da)]=_0x5be8c6[_0x320713(0x4cc)]()['slice'](0x0,0x8),this[_0x320713(0x432)]=_0x52a36c(this[_0x320713(0x32b)],this['_instanceId']),this[_0x320713(0x260)]=Date[_0x320713(0x5cc)](),this[_0x320713(0x2e7)]=null,this[_0x320713(0x38f)]=null,this[_0x320713(0x604)]=null,this['_hbTimer']=null,this[_0x320713(0x5c2)]=null,this[_0x320713(0x26f)]=null,this[_0x320713(0x586)]=0x0,this['_ownMeta']={},this[_0x320713(0x429)]=new Map(),this[_0x320713(0x4c0)]=process[_0x320713(0x216)](),this['_lastCpuAt']=Date[_0x320713(0x5cc)](),this[_0x320713(0x39a)]=0x0,this['_threadStats']=new Map();}get['selfKey'](){const _0x45eb45=_0x32735b;return this[_0x45eb45(0x32b)];}get[_0x32735b(0x29e)](){return this['_rowKey'];}[_0x32735b(0x2a7)](_0x123d9e,_0x49f984){const _0x30a088=_0x32735b,_0x45cd35=_0xd81b52(_0x123d9e,_0x49f984);if(_0x45cd35[_0x30a088(0x5e7)]&&!_0x2c1fed(this[_0x30a088(0x25a)]))return{..._0x45cd35,'killable':![],'killConfirm':undefined};return _0x45cd35;}['isActive'](){const _0x209b79=_0x32735b;return!!this[_0x209b79(0x444)];}[_0x32735b(0x376)](_0x19302e){const _0x3845fb=_0x32735b;Object['assign'](this[_0x3845fb(0x2b1)],_0x19302e||{});}['noteListenAddr'](_0x13260b){const _0x472f90=_0x32735b;if(_0x13260b)this[_0x472f90(0x604)]=_0x13260b;}['register'](_0x55e474={}){const _0x54c3c4=_0x32735b;return this[_0x54c3c4(0x25a)][_0x54c3c4(0x507)](_0x55e474);}[_0x32735b(0x36a)](){const _0x545275=_0x32735b,_0x248b62={};let _0x962ab7=0x0,_0x1ffacc=0x0;const _0xecf458=new Set();for(const _0x22a4cb of this['listNodes']()){_0x1ffacc++;const _0x5cfece=_0x22a4cb[_0x545275(0x1d5)];if(!_0x5cfece)continue;if(_0x5cfece[_0x545275(0x554)])_0x962ab7++;for(const _0x19967c of _0x5cfece['processors']||[]){if(![_0x545275(0x2ce),_0x545275(0x640)][_0x545275(0x576)](_0x19967c[_0x545275(0x65f)]))continue;(_0x19967c[_0x545275(0x5a3)]===_0x545275(0x4bb)||_0x19967c[_0x545275(0x5a3)]===_0x545275(0x2c7))&&_0x19967c[_0x545275(0x54f)]&&_0xecf458[_0x545275(0x332)]((_0x19967c[_0x545275(0x1c6)]||_0x545275(0x5c8))+':'+_0x19967c[_0x545275(0x54f)]);const _0x230c46=_0x19967c[_0x545275(0x1c6)]||'default';(_0x248b62[_0x230c46]||=[])[_0x545275(0x2c6)]({..._0x19967c,'env':_0x230c46,'owner':{'pid':_0x22a4cb[_0x545275(0x53a)]??null,'kind':_0x22a4cb[_0x545275(0x2a3)]??null}});}}for(const [_0x5ac987,_0xab5ff8]of Object[_0x545275(0x248)](_0x248b62)){for(const _0x3ca728 of _0xab5ff8){if(_0x3ca728[_0x545275(0x65f)]===_0x545275(0x2ce)&&!_0x3ca728[_0x545275(0x52c)]){const _0x1e9aa1=_0x5ac987+':'+(_0x3ca728[_0x545275(0x54f)]??'');if(!_0xecf458[_0x545275(0x510)](_0x1e9aa1))_0x3ca728[_0x545275(0x53f)]=!![];}}}return{'envs':_0x248b62,'policy':null,'participation':{'participating':_0x962ab7,'total':_0x1ffacc},'source':_0x545275(0x5f2)};}[_0x32735b(0x5ee)](){const _0x35b9f6=_0x32735b,_0xff4fd5=_0x125b9b=>{const _0xaaafe0=_0x3d59;if(_0x125b9b[_0xaaafe0(0x5a3)]===_0xaaafe0(0x4bb)||_0x125b9b[_0xaaafe0(0x5a3)]===_0xaaafe0(0x2c7)||_0x125b9b[_0xaaafe0(0x5a3)]===_0xaaafe0(0x2a2))return 0x3;if(_0x125b9b[_0xaaafe0(0x52c)])return 0x1;return 0x2;},_0x1eb0e1=new Map();for(const _0x5222e0 of this['listNodes']()){for(const _0x58613a of _0x5222e0[_0x35b9f6(0x1d5)]?.[_0x35b9f6(0x21d)]||[]){const _0x2ca3b6={..._0x58613a,'owner':{'pid':_0x5222e0[_0x35b9f6(0x53a)]??null,'kind':_0x5222e0[_0x35b9f6(0x2a3)]??null,'host':_0x5222e0[_0x35b9f6(0x263)]??null}},_0x2585bf=_0x58613a[_0x35b9f6(0x65f)]==='single'?'1ofN:'+(_0x58613a[_0x35b9f6(0x1c6)]??'')+'::'+(_0x58613a[_0x35b9f6(0x54f)]??_0x58613a[_0x35b9f6(0x628)]??_0x58613a['id']):'inst:'+(_0x5222e0[_0x35b9f6(0x1b8)]??_0x5222e0[_0x35b9f6(0x1c0)]??'')+'::'+(_0x58613a[_0x35b9f6(0x1c6)]??'')+'::'+_0x58613a['id'],_0x4b1053=_0x1eb0e1[_0x35b9f6(0x1fe)](_0x2585bf);if(!_0x4b1053||_0xff4fd5(_0x2ca3b6)>_0xff4fd5(_0x4b1053))_0x1eb0e1[_0x35b9f6(0x24b)](_0x2585bf,_0x2ca3b6);}}return[..._0x1eb0e1[_0x35b9f6(0x4a0)]()];}['clusterStatusView'](){const _0x3bfba3=_0x32735b,_0x35ee30=Date[_0x3bfba3(0x5cc)](),_0x3f4ff0=this['listNodes'](),_0x36abfe=_0x5f2b4f=>Math['max'](0x0,Math[_0x3bfba3(0x1cd)]((_0x35ee30-(_0x5f2b4f['startedAt']||_0x35ee30))/0x3e8)),_0x56a766=_0x3f4ff0[_0x3bfba3(0x65b)](_0x34c7c8=>_0x34c7c8[_0x3bfba3(0x2a3)]==='primary'),_0xfe0abb=_0x3f4ff0[_0x3bfba3(0x629)](_0x3c197a=>_0x3c197a[_0x3bfba3(0x2a3)]===_0x3bfba3(0x45c));if(_0x56a766||_0xfe0abb['length'])return{'primary':_0x56a766?{'pid':_0x56a766[_0x3bfba3(0x53a)],'uptime':_0x36abfe(_0x56a766)}:null,'workers':_0xfe0abb['map'](_0x3825a3=>({'pid':_0x3825a3[_0x3bfba3(0x53a)],'uptime':_0x36abfe(_0x3825a3)})),'workersConfigured':_0x56a766?.[_0x3bfba3(0x3f9)]?.[_0x3bfba3(0x224)]??_0xfe0abb[_0x3bfba3(0x246)],'mode':'cluster'};const _0x11d7f1=_0x3f4ff0[_0x3bfba3(0x65b)](_0x7b5305=>_0x7b5305[_0x3bfba3(0x2a3)]===_0x3bfba3(0x542)||_0x7b5305[_0x3bfba3(0x2a3)]===_0x3bfba3(0x30b)||_0x7b5305['kind']===_0x3bfba3(0x42a)),_0x3e5aaf=_0x11d7f1?{'pid':_0x11d7f1[_0x3bfba3(0x53a)],'uptime':_0x36abfe(_0x11d7f1)}:{'pid':process[_0x3bfba3(0x53a)],'uptime':Math[_0x3bfba3(0x4ca)](0x0,Math[_0x3bfba3(0x1cd)](process[_0x3bfba3(0x466)]()))};return{'primary':_0x3e5aaf,'workers':[_0x3e5aaf],'workersConfigured':0x1,'mode':'single'};}[_0x32735b(0x380)](){return this['_groupByProcess']();}[_0x32735b(0x38a)](){const _0x231147=_0x32735b,_0x119d2f=new Map();for(const _0x5ef0f4 of this[_0x231147(0x5e5)]())_0x119d2f[_0x231147(0x24b)](_0x5ef0f4['processKey'],{..._0x5ef0f4,'children':[]});const _0x469439=[];for(const _0x13b3e2 of _0x119d2f[_0x231147(0x4a0)]()){const _0x1848a9=_0x13b3e2['supervisorKey']?_0x119d2f['get'](_0x13b3e2[_0x231147(0x345)]):null;if(_0x1848a9&&_0x1848a9!==_0x13b3e2)_0x1848a9['children'][_0x231147(0x2c6)](_0x13b3e2);else _0x469439[_0x231147(0x2c6)](_0x13b3e2);}const _0x654bba=(_0x502fad,_0x5b14f4)=>_0x502fad['kind']===_0x5b14f4[_0x231147(0x2a3)]?(_0x502fad[_0x231147(0x53a)]||0x0)-(_0x5b14f4[_0x231147(0x53a)]||0x0):(_0x502fad[_0x231147(0x2a3)]??'')<(_0x5b14f4[_0x231147(0x2a3)]??'')?-0x1:0x1,_0x10b25a=_0x10b0d4=>{const _0x2296a3=_0x231147;_0x10b0d4[_0x2296a3(0x40f)](_0x654bba);for(const _0x96e87f of _0x10b0d4)if(_0x96e87f[_0x2296a3(0x340)][_0x2296a3(0x246)])_0x10b25a(_0x96e87f['children']);};return _0x10b25a(_0x469439),_0x469439;}[_0x32735b(0x43c)](_0x1843a5){const _0x35fea2=_0x32735b;return this[_0x35fea2(0x5e5)]()[_0x35fea2(0x65b)](_0x16624b=>_0x16624b[_0x35fea2(0x1c0)]===_0x1843a5)??null;}['_groupByProcess'](_0xdca434=Date[_0x32735b(0x5cc)]()){const _0x1eca83=_0x32735b,_0x17f8c9=new Map();for(const _0x2d3cc5 of this[_0x1eca83(0x1a8)]()){const _0x577794=_0x41a8b4(_0x2d3cc5);let _0x227314=_0x17f8c9[_0x1eca83(0x1fe)](_0x577794);!_0x227314&&(_0x227314={'processKey':_0x577794,'nodeKey':_0x577794,'pid':_0x2d3cc5['pid'],'ppid':_0x2d3cc5['ppid']??null,'host':_0x2d3cc5[_0x1eca83(0x263)]??null,'kind':_0x2d3cc5[_0x1eca83(0x2a3)],'role':null,'supervisorKey':_0x2d3cc5['supervisorKey']??null,'slot':_0x2d3cc5[_0x1eca83(0x38b)]??null,'slotKey':_0x2d3cc5[_0x1eca83(0x1c8)]??null,'caps':_0x2d3cc5['caps']??null,'lifecycle':_0x2d3cc5[_0x1eca83(0x270)]??null,'uptime':Math[_0x1eca83(0x4ca)](0x0,Math['round']((_0xdca434-(_0x2d3cc5[_0x1eca83(0x439)]||_0xdca434))/0x3e8)),'startedAt':_0x2d3cc5[_0x1eca83(0x439)]??null,'meta':_0x2d3cc5['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x17f8c9['set'](_0x577794,_0x227314));_0x227314[_0x1eca83(0x262)][_0x1eca83(0x2c6)]({'instanceId':_0x2d3cc5[_0x1eca83(0x458)]??null,'role':_0x2d3cc5[_0x1eca83(0x3af)]??null,'listenAddr':_0x2d3cc5[_0x1eca83(0x625)]??null,'lifecycle':_0x2d3cc5[_0x1eca83(0x270)]??null,'processing':_0x2d3cc5[_0x1eca83(0x1d5)]??null});if(!_0x227314[_0x1eca83(0x3af)]&&_0x2d3cc5[_0x1eca83(0x3af)])_0x227314['role']=_0x2d3cc5['role'];if(!_0x227314[_0x1eca83(0x625)]&&_0x2d3cc5['listenAddr'])_0x227314[_0x1eca83(0x625)]=_0x2d3cc5[_0x1eca83(0x625)];if(!_0x227314['processing']&&_0x2d3cc5[_0x1eca83(0x1d5)])_0x227314[_0x1eca83(0x1d5)]=_0x2d3cc5[_0x1eca83(0x1d5)];if(!_0x227314[_0x1eca83(0x3ae)]&&_0x2d3cc5[_0x1eca83(0x3ae)])_0x227314['engines']=_0x2d3cc5[_0x1eca83(0x3ae)];if(!_0x227314['singletonClaims']&&_0x2d3cc5[_0x1eca83(0x336)])_0x227314[_0x1eca83(0x336)]=_0x2d3cc5['singletonClaims'];if(_0x227314[_0x1eca83(0x33e)]==null&&_0x2d3cc5[_0x1eca83(0x33e)])_0x227314[_0x1eca83(0x33e)]=_0x2d3cc5[_0x1eca83(0x33e)];if(_0x2d3cc5[_0x1eca83(0x537)]&&(!_0x227314[_0x1eca83(0x537)]||(_0x2d3cc5[_0x1eca83(0x537)]['at']??0x0)>(_0x227314['stats']['at']??0x0)))_0x227314[_0x1eca83(0x537)]=_0x2d3cc5[_0x1eca83(0x537)];}return[..._0x17f8c9[_0x1eca83(0x4a0)]()];}[_0x32735b(0x62a)](){const _0x21fd20=_0x32735b,_0x3907b1=[],_0x591e1d={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x79ddc6 of this[_0x21fd20(0x5e5)]()){_0x3907b1[_0x21fd20(0x2c6)]({'processKey':_0x79ddc6[_0x21fd20(0x1c0)],'kind':_0x79ddc6[_0x21fd20(0x2a3)],'pid':_0x79ddc6[_0x21fd20(0x53a)],'supervisorKey':_0x79ddc6[_0x21fd20(0x345)],'meta':_0x79ddc6['meta']??null,'uptime':_0x79ddc6[_0x21fd20(0x466)],'stats':_0x79ddc6[_0x21fd20(0x537)]??null}),_0x591e1d[_0x21fd20(0x5f4)]++;if(_0x79ddc6[_0x21fd20(0x537)]){_0x591e1d[_0x21fd20(0x25c)]+=_0x79ddc6[_0x21fd20(0x537)][_0x21fd20(0x25c)]||0x0,_0x591e1d[_0x21fd20(0x28e)]+=(_0x79ddc6[_0x21fd20(0x537)][_0x21fd20(0x28e)]||0x0)+(_0x79ddc6[_0x21fd20(0x537)][_0x21fd20(0x369)]?.[_0x21fd20(0x28e)]||0x0);const _0x96d5fb=_0x79ddc6[_0x21fd20(0x537)]['threads'];_0x96d5fb&&(_0x591e1d[_0x21fd20(0x369)][_0x21fd20(0x2ad)]+=_0x96d5fb[_0x21fd20(0x2ad)]||0x0,_0x591e1d[_0x21fd20(0x369)]['sandbox']+=_0x96d5fb[_0x21fd20(0x454)]||0x0,_0x591e1d[_0x21fd20(0x369)]['busy']+=_0x96d5fb[_0x21fd20(0x46d)]||0x0);}}return{'totals':_0x591e1d,'nodes':_0x3907b1};}async[_0x32735b(0x3b7)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x41daa9=_0x32735b;this['_isWriter']=this[_0x41daa9(0x5b9)]||!!writer,this[_0x41daa9(0x578)]=this['_isReader']||!!reader,this[_0x41daa9(0x2e7)]=kind||this[_0x41daa9(0x2e7)]||(_0x3798f6[_0x41daa9(0x2e1)]?_0x41daa9(0x45c):'cli'),this['_supervisorKey']=supervisorKey??this[_0x41daa9(0x38f)],this[_0x41daa9(0x604)]=listenAddr??this[_0x41daa9(0x604)],this[_0x41daa9(0x50b)](),await this[_0x41daa9(0x502)]();if(!writer&&!reader)return null;if(!this[_0x41daa9(0x444)]){const _0x978085=await this[_0x41daa9(0x25a)][_0x41daa9(0x3ff)](_0x95e5cd,{'sync':![],'durability':_0x41daa9(0x24e)});if(!_0x978085[_0x41daa9(0x4b1)](_0x2cdb8d))await _0x978085[_0x41daa9(0x2e9)](_0x2cdb8d);this[_0x41daa9(0x444)]=_0x978085;}return this['_statusEnv'];}[_0x32735b(0x3c0)](){const _0x117067=_0x32735b;return this[_0x117067(0x2bc)]!==this['_statusEnv']&&(this['_nodeDbFor']=this[_0x117067(0x444)],this[_0x117067(0x3d9)]=this[_0x117067(0x444)]['_getType'](_0x2cdb8d)['data']),this[_0x117067(0x3d9)];}[_0x32735b(0x225)](_0x3e326d){const _0x4f8c1c=_0x32735b;if(_0x511043)return this[_0x4f8c1c(0x3c0)]()['putSync'](_0x3e326d[_0x4f8c1c(0x1b8)],_0x3e326d,0x1);const _0x53608b=this['_nodeDb']()[_0x4f8c1c(0x1b3)](_0x3e326d[_0x4f8c1c(0x1b8)],_0x3e326d,0x1);if(_0x53608b&&typeof _0x53608b[_0x4f8c1c(0x55f)]===_0x4f8c1c(0x344))_0x53608b[_0x4f8c1c(0x55f)](undefined,()=>{});return _0x53608b;}[_0x32735b(0x21b)](_0x3cd1f8){const _0x3f4b95=_0x32735b;return this[_0x3f4b95(0x3c0)]()['putSync'](_0x3cd1f8[_0x3f4b95(0x1b8)],_0x3cd1f8,0x1);}[_0x32735b(0x534)](_0x29d014){const _0x306463=_0x32735b;if(_0x511043)try{return this['_nodeDb']()[_0x306463(0x1e1)](_0x29d014);}catch{return![];}const _0x31a1ca=this[_0x306463(0x3c0)]()[_0x306463(0x492)](_0x29d014);if(_0x31a1ca&&typeof _0x31a1ca[_0x306463(0x55f)]===_0x306463(0x344))_0x31a1ca[_0x306463(0x55f)](undefined,()=>{});return _0x31a1ca;}async['putNode'](_0x369d25){const _0x2febeb=_0x32735b;if(!this[_0x2febeb(0x444)]||!this[_0x2febeb(0x5b9)]||!_0x369d25?.[_0x2febeb(0x1b8)])return;return this[_0x2febeb(0x225)](_0x369d25);}async[_0x32735b(0x57d)](_0x24a64e){const _0x9de56b=_0x32735b;if(!this[_0x9de56b(0x444)]||!this[_0x9de56b(0x5b9)]||!_0x24a64e)return;const _0x4b73e8=_0x24a64e[_0x9de56b(0x576)]('#'),_0x205c72=[];for(const {key:_0x2b2cd3}of this[_0x9de56b(0x444)][_0x9de56b(0x4cb)](_0x2cdb8d)){if(_0x2b2cd3===_0x24a64e||!_0x4b73e8&&typeof _0x2b2cd3===_0x9de56b(0x2fc)&&_0x2b2cd3['startsWith'](_0x24a64e+'#'))_0x205c72[_0x9de56b(0x2c6)](_0x2b2cd3);}for(const _0x13de91 of _0x205c72){try{this[_0x9de56b(0x3c0)]()[_0x9de56b(0x1e1)](_0x13de91);}catch{}}}[_0x32735b(0x3ac)](_0x39786b){const _0x50e59f=_0x32735b;if(typeof _0x39786b?.['pid']!=='number')return![];if(_0x39786b[_0x50e59f(0x263)]!==_0x313de3['hostname']())return![];if(_0x39786b['pid']===process[_0x50e59f(0x53a)])return![];if(_0x39786b[_0x50e59f(0x462)]!=null&&_0x39786b[_0x50e59f(0x462)]<Date[_0x50e59f(0x5cc)]()-_0x5928d6)return!![];try{return process[_0x50e59f(0x25e)](_0x39786b[_0x50e59f(0x53a)],0x0),![];}catch(_0xa1478a){return _0xa1478a['code']==='ESRCH';}}[_0x32735b(0x1a8)](){const _0x32e1de=_0x32735b;if(!this[_0x32e1de(0x444)])return[];try{this[_0x32e1de(0x444)]['db']?.['resetReadTxn']?.();}catch{}const _0x43ba7c=Date[_0x32e1de(0x5cc)](),_0x4cdfdb=_0x313de3['hostname'](),_0x5c4c90=[];for(const {value:_0x27fd08}of this[_0x32e1de(0x444)][_0x32e1de(0x4cb)](_0x2cdb8d)){if(!_0x27fd08)continue;let _0x377598=null;_0x27fd08[_0x32e1de(0x263)]===_0x4cdfdb&&typeof _0x27fd08[_0x32e1de(0x53a)]==='number'&&(_0x377598=!this[_0x32e1de(0x3ac)](_0x27fd08));if(_0x377598===![])continue;const _0x452404=_0x27fd08[_0x32e1de(0x462)]==null||_0x27fd08[_0x32e1de(0x462)]>=_0x43ba7c;if(_0x377598===!![]||_0x452404)_0x5c4c90[_0x32e1de(0x2c6)](_0x27fd08);}return _0x5c4c90;}async[_0x32735b(0x2ef)](_0x1cac9a=0x0){const _0x363955=_0x32735b;if(!this[_0x363955(0x444)]||!this[_0x363955(0x5b9)])return;const _0x193c2d=Date[_0x363955(0x5cc)]()-_0x1cac9a,_0x324e84=new Set(),_0x42d6b9=[],_0x7964c3=_0x313de3[_0x363955(0x1d1)]();for(const {key:_0x54e066,value:_0x5948c5}of this['_statusEnv'][_0x363955(0x4cb)](_0x2cdb8d)){if(!_0x5948c5)continue;const _0x3ae5b1=_0x5948c5[_0x363955(0x263)]===_0x7964c3&&typeof _0x5948c5[_0x363955(0x53a)]==='number',_0x596519=_0x3ae5b1?this[_0x363955(0x3ac)](_0x5948c5):_0x5948c5[_0x363955(0x462)]!=null&&_0x5948c5['expiresAt']<_0x193c2d;if(_0x596519)_0x42d6b9['push'](_0x54e066);else _0x324e84[_0x363955(0x332)](_0x41a8b4(_0x5948c5)??_0x54e066);}for(const _0x4463f6 of _0x42d6b9)this[_0x363955(0x534)](_0x4463f6);if(this[_0x363955(0x50b)]()){const _0x2e214a=[];for(const {key:_0x2fa939}of this[_0x363955(0x585)](_0x363955(0x58e))){if(!_0x324e84[_0x363955(0x510)](_0x2fa939)){if(_0x511043)try{this[_0x363955(0x2ac)][_0x363955(0x1e1)](_0x363955(0x1f8)+_0x2fa939);}catch{}else _0x2e214a[_0x363955(0x2c6)](this['_desired'][_0x363955(0x492)]('node/'+_0x2fa939));}}if(_0x2e214a[_0x363955(0x246)])await Promise['allSettled'](_0x2e214a);}}[_0x32735b(0x3bd)](_0x4c5377=null){const _0x248b8a=_0x32735b;if(this[_0x248b8a(0x1da)])return;if(!this['_isWriter']||!this[_0x248b8a(0x444)]){this['okdb']?.[_0x248b8a(0x1f3)]?.['warn']?.(_0x248b8a(0x63d)+this[_0x248b8a(0x5b9)]+_0x248b8a(0x49a)+!!this[_0x248b8a(0x444)]+_0x248b8a(0x405),{'feature':'processes'});return;}this[_0x248b8a(0x26f)]=_0x4c5377,this['_onProcEvent']=()=>this['_maybePublish']();for(const _0x12e869 of _0x136314)this[_0x248b8a(0x25a)][_0x248b8a(0x5a6)]['on'](_0x12e869,this[_0x248b8a(0x5c2)]);this['_publishNow']();const _0x23bf71=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x438057;this[_0x248b8a(0x1da)]=setInterval(()=>{const _0x4511c5=_0x248b8a;if(this[_0x4511c5(0x26f)])try{this[_0x4511c5(0x26f)]();}catch{}this[_0x4511c5(0x4c8)](),this[_0x4511c5(0x2ef)]()['catch'](()=>{});},_0x23bf71);if(this[_0x248b8a(0x1da)]['unref'])this[_0x248b8a(0x1da)][_0x248b8a(0x476)]();}[_0x32735b(0x353)](){const _0x1de374=_0x32735b;if(!this[_0x1de374(0x5b9)]||!this['_statusEnv'])return;if(Date[_0x1de374(0x5cc)]()-this[_0x1de374(0x586)]<_0x440f6a)return;this[_0x1de374(0x4c8)]();}[_0x32735b(0x4c8)](){const _0x22f00c=_0x32735b;if(!this[_0x22f00c(0x5b9)]||!this['_statusEnv'])return;this['_lastPublishAt']=Date['now']();try{const _0x854719=[this[_0x22f00c(0x571)]()];for(const _0x8cdfa5 of this['_children'][_0x22f00c(0x4a0)]())_0x854719[_0x22f00c(0x2c6)](this[_0x22f00c(0x463)](_0x8cdfa5));const _0xde2a37=_0x46ab76[_0x22f00c(0x47c)]?_0x46ab76[_0x22f00c(0x5cc)]():0x0;for(const _0x17522a of _0x854719){try{this[_0x22f00c(0x21b)](_0x17522a),this['_publishFailWarned']=![];}catch(_0xc381){!this[_0x22f00c(0x5e6)]&&(this['_publishFailWarned']=!![],this[_0x22f00c(0x25a)]?.[_0x22f00c(0x1f3)]?.[_0x22f00c(0x5d5)]?.(_0x22f00c(0x321)+_0xc381[_0x22f00c(0x453)],{'feature':_0x22f00c(0x5f4)}));}}if(_0x46ab76['enabled'])_0x46ab76[_0x22f00c(0x593)](_0x22f00c(0x1d6),_0x46ab76[_0x22f00c(0x5cc)]()-_0xde2a37,'rows='+_0x854719[_0x22f00c(0x246)]+_0x22f00c(0x4b0));}catch(_0x3390a2){!this[_0x22f00c(0x5e6)]&&(this[_0x22f00c(0x5e6)]=!![],this[_0x22f00c(0x25a)]?.['log']?.[_0x22f00c(0x5d5)]?.('registry\x20publish\x20failing:\x20'+_0x3390a2['message'],{'feature':'processes'}));}}async['stopHeartbeat'](){const _0x413a77=_0x32735b;if(this['_onProcEvent']){for(const _0x395e02 of _0x136314){try{this[_0x413a77(0x25a)][_0x413a77(0x5a6)][_0x413a77(0x247)](_0x395e02,this[_0x413a77(0x5c2)]);}catch{}}this[_0x413a77(0x5c2)]=null;}this[_0x413a77(0x1da)]&&(clearInterval(this[_0x413a77(0x1da)]),this['_hbTimer']=null);try{if(this[_0x413a77(0x444)]&&this['_isWriter'])await this[_0x413a77(0x57d)](this[_0x413a77(0x432)]);}catch{}}async[_0x32735b(0x5dd)](){const _0x19b8e1=_0x32735b;if(!this['_statusEnv']||!this[_0x19b8e1(0x5b9)])return;try{await this[_0x19b8e1(0x57d)](this['_rowKey']);}catch{}try{const _0x48629f=[];for(const {value:_0x3098b3}of this[_0x19b8e1(0x444)][_0x19b8e1(0x4cb)](_0x2cdb8d)){if(_0x3098b3?.[_0x19b8e1(0x49f)]===process[_0x19b8e1(0x53a)]&&_0x3098b3[_0x19b8e1(0x1b8)])_0x48629f['push'](_0x3098b3[_0x19b8e1(0x1b8)]);}for(const _0x25857a of _0x48629f){try{await this['removeNode'](_0x25857a);}catch{}}}catch{}}async['publishOwnRow'](){const _0x2b3121=_0x32735b;return this[_0x2b3121(0x3d5)](this['_buildOwnRow']());}async['publishChildRow'](_0x1432b0){const _0x207bee=_0x32735b;if(!this['_statusEnv']||!this[_0x207bee(0x5b9)])return;return this['putNode'](this[_0x207bee(0x463)](_0x1432b0));}['_buildChildRow']({pid:_0x3499b2,startedAt:_0x296eef,kind:_0x3ce77e,supervisorKey:_0x4ac4cc,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x32735b(0x3d2),meta:meta=null,stats:stats=null}){const _0xc78a80=_0x32735b,_0x2b2d30=Date[_0xc78a80(0x5cc)](),_0x519b04=_0x33dd5d(_0x3499b2,_0x296eef);return{'nodeKey':_0x52a36c(_0x519b04,'0'),'processKey':_0x519b04,'instanceId':'0','pid':_0x3499b2,'startedAt':_0x296eef,'ppid':process['pid'],'host':_0x313de3[_0xc78a80(0x1d1)](),'supervisorKey':_0x4ac4cc,'slot':slot,'slotKey':slotKey,'kind':_0x3ce77e,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x2b2d30,'expiresAt':_0x2b2d30+_0x3b3bd1,'caps':this[_0xc78a80(0x2a7)](_0x3ce77e,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x32735b(0x328)](_0x49522b){const _0x1e124d=_0x32735b;if(!_0x49522b?.[_0x1e124d(0x53a)])return null;const _0x3ca600=_0x33dd5d(_0x49522b['pid'],_0x49522b[_0x1e124d(0x439)]);this[_0x1e124d(0x429)]['set'](_0x3ca600,{..._0x49522b,'supervisorKey':_0x49522b[_0x1e124d(0x345)]??this['_selfKey']});if(this[_0x1e124d(0x5b9)])await this[_0x1e124d(0x57c)](this['_children'][_0x1e124d(0x1fe)](_0x3ca600))[_0x1e124d(0x5c5)]?.(()=>{});return _0x3ca600;}[_0x32735b(0x434)](_0x107369){const _0x1b529c=_0x32735b;if(!_0x107369)return;return this[_0x1b529c(0x429)][_0x1b529c(0x307)](_0x107369),this[_0x1b529c(0x57d)](_0x107369);}[_0x32735b(0x1d7)](){const _0x537d66=_0x32735b,_0x569d7b=Date['now'](),_0x1c7e46=process[_0x537d66(0x216)](),_0x3a2e1c=(_0x569d7b-this[_0x537d66(0x240)])*0x3e8;if(_0x3a2e1c>=0x3d090){const _0x46a8b6=_0x1c7e46[_0x537d66(0x4e7)]-this[_0x537d66(0x4c0)][_0x537d66(0x4e7)]+(_0x1c7e46[_0x537d66(0x4e9)]-this[_0x537d66(0x4c0)]['system']),_0x848452=_0x313de3['cpus']()[_0x537d66(0x246)]||0x1;this[_0x537d66(0x39a)]=Math['min'](0x64,Math['round'](_0x46a8b6/(_0x3a2e1c*_0x848452)*0x64)),this[_0x537d66(0x1be)]=Math[_0x537d66(0x1cd)](_0x3a2e1c/0x3e8),this[_0x537d66(0x4c0)]=_0x1c7e46,this[_0x537d66(0x240)]=_0x569d7b;}const _0x18201d=process[_0x537d66(0x54e)](),_0x1d9b18=this[_0x537d66(0x63c)]['size'];let _0x47dc74=0x0;if(_0x1d9b18>0x0){const _0x3f91a2=[this[_0x537d66(0x25a)],...this['okdb'][_0x537d66(0x615)]?.[_0x537d66(0x4a0)]?.()??[]];for(const _0xdb2d4 of _0x3f91a2){const _0x2b3871=_0xdb2d4[_0x537d66(0x488)]?.[_0x537d66(0x3b3)];if(_0x2b3871)_0x47dc74+=_0x2b3871['liveThreadStats'][_0x537d66(0x46d)];}}let _0x462e2a=null;const _0x45a973=_0x1d9b18;if(_0x45a973>0x0){let _0x114142=0x0;for(const _0x47b8a5 of this['_threadStats'][_0x537d66(0x4a0)]())_0x114142+=_0x47b8a5[_0x537d66(0x28e)]||0x0;_0x462e2a={'count':_0x45a973,'heapUsed':_0x114142,'sandbox':_0x1d9b18,'busy':_0x47dc74};}return{'rss':_0x18201d['rss'],'heapUsed':_0x18201d[_0x537d66(0x28e)],'heapTotal':_0x18201d[_0x537d66(0x607)],'external':_0x18201d[_0x537d66(0x26a)],'cpuPct':this[_0x537d66(0x39a)],'cpuWindowMs':this[_0x537d66(0x1be)]??null,'threads':_0x462e2a,'at':_0x569d7b};}['reportThreadStats'](_0x46aa05,_0x377337){const _0x4ca376=_0x32735b;if(!_0x46aa05||!_0x377337)return;this[_0x4ca376(0x63c)]['set'](_0x46aa05,_0x377337);}[_0x32735b(0x53c)](_0x57cc48){const _0x2e84bf=_0x32735b;this[_0x2e84bf(0x63c)][_0x2e84bf(0x307)](_0x57cc48);}['updateSupervisedChildStats'](_0x263dcc,_0x309ded,_0x513d36=undefined){const _0x5a7e00=_0x32735b,_0x6fd16b=this[_0x5a7e00(0x429)][_0x5a7e00(0x1fe)](_0x263dcc);if(!_0x6fd16b||!_0x309ded)return;if(_0x513d36!==undefined)_0x6fd16b[_0x5a7e00(0x1d5)]=_0x513d36;_0x6fd16b[_0x5a7e00(0x537)]={'rss':_0x309ded[_0x5a7e00(0x25c)]??null,'heapUsed':_0x309ded[_0x5a7e00(0x28e)]??null,'heapTotal':_0x309ded[_0x5a7e00(0x607)]??null,'external':_0x309ded[_0x5a7e00(0x26a)]??null,'cpuPct':_0x309ded[_0x5a7e00(0x5ae)]??null,'cpuWindowMs':_0x309ded['cpuWindowMs']??null,'threads':_0x309ded[_0x5a7e00(0x369)]??null,'claims':_0x309ded['claims']??null,'envsOpen':_0x309ded[_0x5a7e00(0x251)]??null,'at':Date[_0x5a7e00(0x5cc)]()};}[_0x32735b(0x571)](){const _0x3ce2db=_0x32735b,_0x43fea0=Date['now'](),_0x571ddb=this[_0x3ce2db(0x25a)][_0x3ce2db(0x3c1)]||{},_0xb1f26a=this[_0x3ce2db(0x2e7)]||_0x3ce2db(0x542);return{'nodeKey':this[_0x3ce2db(0x432)],'processKey':this['_selfKey'],'instanceId':this[_0x3ce2db(0x5da)],'pid':process[_0x3ce2db(0x53a)],'startedAt':this[_0x3ce2db(0x50c)],'instanceStartedAt':this[_0x3ce2db(0x260)],'ppid':typeof process[_0x3ce2db(0x49f)]===_0x3ce2db(0x4f6)?process['ppid']:null,'host':_0x313de3[_0x3ce2db(0x1d1)](),'supervisorKey':this[_0x3ce2db(0x38f)]??null,'kind':_0xb1f26a,'role':{'engines':!!_0x571ddb[_0x3ce2db(0x3ae)],'processors':!!_0x571ddb[_0x3ce2db(0x21d)],'compaction':_0x571ddb[_0x3ce2db(0x4ac)],'http':_0x571ddb[_0x3ce2db(0x4f0)]},'listenAddr':this[_0x3ce2db(0x604)]??null,'heartbeatAt':_0x43fea0,'expiresAt':_0x43fea0+_0x3b3bd1,'caps':this[_0x3ce2db(0x2a7)](_0xb1f26a,_0x571ddb),'lifecycle':{'state':_0x3ce2db(0x3d2),'desiredVersionApplied':null},'meta':{...this[_0x3ce2db(0x2b1)]},'processing':_0x571ddb[_0x3ce2db(0x21d)]?this[_0x3ce2db(0x457)]():null,'engines':_0x571ddb[_0x3ce2db(0x3ae)]?[...this[_0x3ce2db(0x25a)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x3ce2db(0x46e)](),'stats':this['_sampleOwnStats'](),'writers':this[_0x3ce2db(0x59c)]()};}[_0x32735b(0x59c)](){const _0x13fd99=_0x32735b,_0x5ee3dc={};try{for(const [_0x32adcf,_0x300f9d]of this[_0x13fd99(0x25a)]['_envs']){try{const _0x3febfc=_0x300f9d['writerStatus']?.();if(!_0x3febfc)continue;if(!_0x3febfc[_0x13fd99(0x1e5)]&&!_0x3febfc['committed']&&!(_0x3febfc[_0x13fd99(0x34a)]??0x0)&&!_0x3febfc[_0x13fd99(0x4e3)])continue;_0x5ee3dc[_0x32adcf]={'depth':_0x3febfc[_0x13fd99(0x1e5)],'oldestPendingMs':_0x3febfc[_0x13fd99(0x393)],'committed':_0x3febfc[_0x13fd99(0x221)],'commitsPerSec':_0x3febfc['commitsPerSec'],'commitP99Ms':_0x3febfc['commitP99Ms'],'parkedNow':_0x3febfc['parkedNow']??0x0,'draining':!!_0x3febfc[_0x13fd99(0x4e3)]};}catch{}}}catch{}return Object[_0x13fd99(0x60b)](_0x5ee3dc)['length']?_0x5ee3dc:null;}[_0x32735b(0x46e)](){const _0x4ce3ac=_0x32735b,_0x419d34=process[_0x4ce3ac(0x53a)],_0x20520f=Date[_0x4ce3ac(0x5cc)](),_0x3f5605=_0x387b81=>{const _0x403f55=_0x4ce3ac;if(!_0x387b81)return[];const _0x206ff7=[];try{for(const {id:_0x1b4f27,entry:_0xd0cd26}of _0x387b81[_0x403f55(0x2e5)]()){if(_0xd0cd26?.[_0x403f55(0x44c)]?.[_0x403f55(0x53a)]!==_0x419d34)continue;const _0x2a4033=_0xd0cd26[_0x403f55(0x663)]??_0xd0cd26[_0x403f55(0x1b1)]??0x0;if(_0x2a4033+(_0xd0cd26['ttlMs']??0x0)<_0x20520f)continue;_0x206ff7[_0x403f55(0x2c6)](_0x1b4f27);}}catch{}return _0x206ff7;},_0x561f4d=_0x3f5605(this[_0x4ce3ac(0x330)](_0x4ce3ac(0x4ec))),_0x581c49=_0x3f5605(this[_0x4ce3ac(0x330)](_0x4ce3ac(0x617)));if(!_0x561f4d[_0x4ce3ac(0x246)]&&!_0x581c49['length'])return null;return{'compact':_0x561f4d,'replicate':_0x581c49};}[_0x32735b(0x330)](_0xa9a775){const _0x52db31=_0x32735b;if(!this[_0x52db31(0x25a)]?.[_0x52db31(0x255)])return null;if(!this[_0x52db31(0x446)])this[_0x52db31(0x446)]=new Map();let _0x415c48=this[_0x52db31(0x446)]['get'](_0xa9a775);if(!_0x415c48)try{_0x415c48=new _0x430524(this[_0x52db31(0x25a)][_0x52db31(0x255)],{'namespace':_0xa9a775}),this['_singletonLocks']['set'](_0xa9a775,_0x415c48);}catch{return null;}return _0x415c48;}[_0x32735b(0x457)](){const _0x587732=_0x32735b,_0x2061e0=[];try{for(const [_0x335b0f,_0x438881]of this['okdb']['_envs']){if(_0x335b0f[_0x587732(0x4f7)]('~'))continue;for(const _0x5875b9 of _0x438881['processor'][_0x587732(0x313)]())_0x2061e0[_0x587732(0x2c6)]({..._0x5875b9,'env':_0x335b0f});}}catch{}return{'participate':this[_0x587732(0x25a)][_0x587732(0x21d)]?.['_participate']??![],'processors':_0x2061e0};}[_0x32735b(0x50b)](){const _0x146993=_0x32735b;if(this[_0x146993(0x2ac)])return!![];const _0x1086db=this[_0x146993(0x25a)][_0x146993(0x255)];if(!_0x1086db)return![];return this[_0x146993(0x2ac)]=_0x1086db[_0x146993(0x4c3)](_0x328018,{'dupSort':![]}),this[_0x146993(0x5c9)]=_0x1086db['openDB'](_0x4753b6,{'dupSort':![]}),!![];}async[_0x32735b(0x502)](){const _0x4c8f75=_0x32735b;if(!this[_0x4c8f75(0x50b)]())return;const _0x2c7d40=_0x4c8f75(0x39c),_0x2d3373=0x1,_0x528ced=this[_0x4c8f75(0x2ac)][_0x4c8f75(0x1fe)](_0x2c7d40)??0x0;if(_0x528ced>=_0x2d3373)return;const _0x450892=_0x2e83e5=>{const _0x404704=_0x4c8f75;if(_0x2e83e5===_0x404704(0x300))return _0x404704(0x2ce);if(_0x2e83e5===_0x404704(0x595))return _0x404704(0x640);return _0x2e83e5;};await this[_0x4c8f75(0x25a)][_0x4c8f75(0x4a1)][_0x4c8f75(0x4b2)][_0x4c8f75(0x54c)](()=>{const _0x34612a=_0x4c8f75;for(const _0x28a256 of['procmode/',_0x34612a(0x500)]){for(const {key:_0x2cf51d,value:_0x4617ae}of this[_0x34612a(0x2ac)][_0x34612a(0x4cb)]({'start':_0x28a256,'end':_0x28a256+'ÿ'})){if(typeof _0x2cf51d!=='string'||!_0x2cf51d[_0x34612a(0x4f7)](_0x28a256))break;const _0x525929=_0x450892(_0x4617ae[_0x34612a(0x65f)]);if(_0x525929!==_0x4617ae['mode'])this['_desired']['put'](_0x2cf51d,{..._0x4617ae,'mode':_0x525929});}}this[_0x34612a(0x2ac)][_0x34612a(0x1b3)](_0x2c7d40,_0x2d3373);});}[_0x32735b(0x372)](){const _0x422313=_0x32735b;return!!this[_0x422313(0x2ac)];}[_0x32735b(0x37d)](_0x48c80a,_0x40f917){const _0x3524d0=_0x32735b;if(!this[_0x3524d0(0x50b)]())return null;const _0x43bce5=_0x48c80a+'/'+_0x40f917;return this['_refreshDesiredSnapshot'](),this[_0x3524d0(0x564)]['get'](_0x43bce5)??this[_0x3524d0(0x2ac)][_0x3524d0(0x1fe)](_0x43bce5)??null;}[_0x32735b(0x33b)](){const _0x1cff97=_0x32735b;if(!_0x511043)return;try{this['okdb'][_0x1cff97(0x4a1)]?.['db']?.[_0x1cff97(0x40a)]?.();}catch{}}async[_0x32735b(0x42d)](_0x1a4c94,_0x30b863,_0x122c7a){const _0x2f614f=_0x32735b;if(!this[_0x2f614f(0x50b)]())return null;const _0x57c6de=_0x1a4c94+'/'+_0x30b863;this[_0x2f614f(0x33b)]();const _0x305c81=this[_0x2f614f(0x564)][_0x2f614f(0x1fe)](_0x57c6de)??this[_0x2f614f(0x2ac)]['get'](_0x57c6de)??{'version':0x0},_0x1d9989=(_0x305c81[_0x2f614f(0x42c)]||0x0)+0x1,_0x42437c={..._0x305c81,..._0x122c7a,'version':_0x1d9989,'updatedAt':Date[_0x2f614f(0x5cc)]()};this['_desiredOverlay'][_0x2f614f(0x24b)](_0x57c6de,_0x42437c);try{await this[_0x2f614f(0x25a)][_0x2f614f(0x4a1)][_0x2f614f(0x4b2)]['transaction'](()=>{const _0x5d06b3=_0x2f614f;this[_0x5d06b3(0x2ac)][_0x5d06b3(0x1b3)](_0x57c6de,_0x42437c);});}finally{if(this[_0x2f614f(0x564)][_0x2f614f(0x1fe)](_0x57c6de)===_0x42437c)this[_0x2f614f(0x564)][_0x2f614f(0x307)](_0x57c6de);}return _0x1d9989;}[_0x32735b(0x585)](_0x79990b){const _0x198c61=_0x32735b;if(!this[_0x198c61(0x50b)]())return[];this[_0x198c61(0x33b)]();const _0x38b59a=_0x79990b+'/',_0xc9dec=[];for(const {key:_0x3a1eb4,value:_0x48e837}of this[_0x198c61(0x2ac)][_0x198c61(0x4cb)]({'start':_0x38b59a,'end':_0x38b59a+'ÿ'})){if(typeof _0x3a1eb4!==_0x198c61(0x2fc)||!_0x3a1eb4[_0x198c61(0x4f7)](_0x38b59a))break;_0xc9dec[_0x198c61(0x2c6)]({'key':_0x3a1eb4[_0x198c61(0x20b)](_0x38b59a[_0x198c61(0x246)]),'value':_0x48e837});}return _0xc9dec;}[_0x32735b(0x5bc)](_0x526777){const _0x1cda29=_0x32735b;if(!this[_0x1cda29(0x50b)]())return null;return this[_0x1cda29(0x5c9)][_0x1cda29(0x1fe)](_0x526777)??null;}async[_0x32735b(0x1fb)](_0x39ff7a,_0x549778,_0x457ebc={}){const _0x1e731a=_0x32735b;if(!this[_0x1e731a(0x50b)]())return null;let _0x4c2029;return await this['okdb'][_0x1e731a(0x4a1)][_0x1e731a(0x4b2)]['transaction'](()=>{const _0x5d66db=_0x1e731a,_0x26e1f5=this[_0x5d66db(0x5c9)][_0x5d66db(0x1fe)](_0x39ff7a)||{'epoch':0x0};_0x4c2029=(_0x26e1f5[_0x5d66db(0x33c)]||0x0)+0x1,this[_0x5d66db(0x5c9)][_0x5d66db(0x1b3)](_0x39ff7a,{..._0x26e1f5,..._0x457ebc,'cmd':_0x549778,'epoch':_0x4c2029,'updatedAt':Date[_0x5d66db(0x5cc)]()});}),_0x4c2029;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x68b069,'nodeKey':_0x33dd5d,'logicalKey':_0x24c945,'slotKey':_0x26ab8f,'PROCESS_ENV':_0x95e5cd,'NODE_TYPE':_0x2cdb8d},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0xfbb1a2=_0x38fa5f;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x4d0313=require$$0$6,{EVENTS:_0x2e5035,CHANGE_ACTIONS:_0x3ca3c2}=requireOkdbEnums(),{LOOP:_0x21bb65}=requireOkdbLoopMonitor(),_0x3ff348=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x109757=0x5,_0x217419=0x2710;class _0x9deeca extends _0x4d0313{constructor(_0x4a8a15,_0x4d0d52={}){const _0x3371d0=_0x3d59;super(),this[_0x3371d0(0x25a)]=_0x4a8a15,this[_0x3371d0(0x375)]=_0x4d0d52['quantum']??_0x3ff348,this[_0x3371d0(0x338)]=_0x4d0d52[_0x3371d0(0x257)]??_0x109757,this[_0x3371d0(0x27e)]=_0x4d0d52[_0x3371d0(0x490)]??_0x217419,this[_0x3371d0(0x298)]=![],this[_0x3371d0(0x644)]=new Map(),this[_0x3371d0(0x254)]=new Map(),this[_0x3371d0(0x50d)]=new Map(),this[_0x3371d0(0x1fc)]=null,this[_0x3371d0(0x5eb)]=![],this[_0x3371d0(0x584)]=new Set(),this['_onItem']=_0x11980b=>this[_0x3371d0(0x51d)](_0x11980b),this[_0x3371d0(0x2de)]=_0x47f46a=>this[_0x3371d0(0x64e)](_0x47f46a),this[_0x3371d0(0x557)]=()=>this[_0x3371d0(0x1b7)]();}['start'](){const _0x58fc21=_0x3d59;if(this[_0x58fc21(0x298)])return;this[_0x58fc21(0x298)]=!![];for(const [_0x2882d2,_0x34c30a]of this[_0x58fc21(0x25a)]['_envs']){if(_0x2882d2[_0x58fc21(0x4f7)]('~'))continue;try{_0x34c30a[_0x58fc21(0x2b2)]();}catch{}}for(const [_0x4f90dd,_0x4a3a60]of this[_0x58fc21(0x25a)][_0x58fc21(0x615)]){if(_0x4f90dd[_0x58fc21(0x4f7)]('~'))continue;try{this[_0x58fc21(0x254)][_0x58fc21(0x24b)](_0x4f90dd,_0x4a3a60[_0x58fc21(0x3db)]()||0x0);}catch{}}const {events:_0x397fc9}=this[_0x58fc21(0x25a)];_0x397fc9['on'](_0x2e5035[_0x58fc21(0x5c3)],this['_onItem']),_0x397fc9['on'](_0x2e5035['ITEM_UPDATE'],this[_0x58fc21(0x3f6)]),_0x397fc9['on'](_0x2e5035[_0x58fc21(0x314)],this[_0x58fc21(0x3f6)]),_0x397fc9['on'](_0x2e5035[_0x58fc21(0x39b)],this[_0x58fc21(0x2de)]),_0x397fc9[_0x58fc21(0x47a)](_0x2e5035[_0x58fc21(0x37b)],this['_onStop']);}['stop'](){const _0x20c5ff=_0x3d59;if(!this[_0x20c5ff(0x298)])return;this['_started']=![];const {events:_0x4449f5}=this[_0x20c5ff(0x25a)];_0x4449f5[_0x20c5ff(0x247)](_0x2e5035[_0x20c5ff(0x5c3)],this[_0x20c5ff(0x3f6)]),_0x4449f5['off'](_0x2e5035[_0x20c5ff(0x1cc)],this['_onItem']),_0x4449f5[_0x20c5ff(0x247)](_0x2e5035[_0x20c5ff(0x314)],this['_onItem']),_0x4449f5[_0x20c5ff(0x247)](_0x2e5035[_0x20c5ff(0x39b)],this[_0x20c5ff(0x2de)]);try{_0x4449f5[_0x20c5ff(0x247)](_0x2e5035['SYSTEM_STOPPED'],this[_0x20c5ff(0x557)]);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this['_pending']['clear'](),this['_cursors'][_0x20c5ff(0x24f)](),this['_baselines'][_0x20c5ff(0x24f)](),this[_0x20c5ff(0x584)][_0x20c5ff(0x24f)]();}[_0xfbb1a2(0x357)](_0x16986e,_0x2f2f0f,_0x1fc315,_0x8169a6){return _0x16986e+'\x00'+_0x2f2f0f+'\x00'+_0x1fc315+'\x00'+_0x8169a6;}[_0xfbb1a2(0x567)](_0x532a60,_0x33f285,_0x4cca71,_0xa7c3ec){const _0x27ad69=_0xfbb1a2,_0x49c2ef=this[_0x27ad69(0x357)](_0x532a60,_0x33f285,_0x4cca71,_0xa7c3ec);if(this[_0x27ad69(0x584)]['has'](_0x49c2ef))return![];this['_seen']['add'](_0x49c2ef);if(this[_0x27ad69(0x584)]['size']>this[_0x27ad69(0x27e)]){const _0x4c32a5=this[_0x27ad69(0x584)]['values']()[_0x27ad69(0x3cb)]()[_0x27ad69(0x5b0)];this['_seen'][_0x27ad69(0x307)](_0x4c32a5);}return!![];}[_0xfbb1a2(0x51d)](_0x519f00){const _0x2b0b8f=_0xfbb1a2;if(!this[_0x2b0b8f(0x298)]||!_0x519f00)return;const {env:_0x583d14,type:_0x59ebfe,key:_0xb0b75,clock:_0x3fbbdc,origin:_0x2f123d,action:_0x3c6624,newValue:_0x3766e4,oldValue:_0x44835f}=_0x519f00;if(_0x583d14==null||_0x59ebfe==null||_0xb0b75==null)return;if(typeof _0x583d14==='string'&&_0x583d14[_0x2b0b8f(0x4f7)]('~'))return;if(typeof _0x59ebfe===_0x2b0b8f(0x2fc)&&_0x59ebfe['startsWith']('~'))return;if(!this[_0x2b0b8f(0x567)](_0x583d14,_0x59ebfe,_0xb0b75,_0x3fbbdc))return;const _0x10405d=_0x3c6624===_0x3ca3c2[_0x2b0b8f(0x3dd)]?'remove':_0x2b0b8f(0x1b3);this['emit'](_0x2b0b8f(0x366),{'env':_0x583d14,'type':_0x59ebfe,'key':_0xb0b75,'op':_0x10405d,'clock':_0x3fbbdc,'origin':_0x2f123d,'value':_0x10405d===_0x2b0b8f(0x492)?null:_0x3766e4,'prevValue':_0x44835f});}[_0xfbb1a2(0x64e)](_0xc9c383){const _0x28a8e6=_0xfbb1a2;if(!this[_0x28a8e6(0x298)])return;if(!_0xc9c383||typeof _0xc9c383[_0x28a8e6(0x1c6)]!=='string'||typeof _0xc9c383[_0x28a8e6(0x628)]!==_0x28a8e6(0x2fc))return;const {env:_0x19fcb7,type:_0x4519a8}=_0xc9c383;if(_0x19fcb7[_0x28a8e6(0x4f7)]('~')||_0x4519a8[_0x28a8e6(0x4f7)]('~'))return;this[_0x28a8e6(0x50d)]['set'](_0x19fcb7+'\x00'+_0x4519a8,{'env':_0x19fcb7,'type':_0x4519a8}),this[_0x28a8e6(0x205)]();}[_0xfbb1a2(0x205)](){const _0x3ebb50=_0xfbb1a2;if(this[_0x3ebb50(0x1fc)])return;const _0x350155=()=>{const _0x208cb6=_0x3ebb50;this[_0x208cb6(0x1fc)]=null,this[_0x208cb6(0x4b8)]()[_0x208cb6(0x5c5)](()=>{});};this[_0x3ebb50(0x1fc)]=setTimeout(_0x350155,this[_0x3ebb50(0x338)]>0x0?this['_flushDebounce']:0x0);}async['_drain'](){const _0x7c1c58=_0xfbb1a2;if(this[_0x7c1c58(0x5eb)]){this[_0x7c1c58(0x205)]();return;}this[_0x7c1c58(0x5eb)]=!![];try{const _0x5e6e51=[...this[_0x7c1c58(0x50d)][_0x7c1c58(0x4a0)]()];this['_pending'][_0x7c1c58(0x24f)]();let _0x3c3aca=![];for(const {env:_0x12684d,type:_0x45b41a}of _0x5e6e51){try{const _0x14aff3=await this[_0x7c1c58(0x4cd)](_0x12684d,_0x45b41a);if(_0x14aff3)_0x3c3aca=!![];}catch{this[_0x7c1c58(0x50d)][_0x7c1c58(0x24b)](_0x12684d+'\x00'+_0x45b41a,{'env':_0x12684d,'type':_0x45b41a}),_0x3c3aca=!![];}}if(_0x3c3aca||this[_0x7c1c58(0x50d)][_0x7c1c58(0x419)]>0x0)this[_0x7c1c58(0x205)]();}finally{this[_0x7c1c58(0x5eb)]=![];}}async[_0xfbb1a2(0x4cd)](_0x109c9d,_0x4b9f2b){const _0x34a5db=_0xfbb1a2,_0x474328=await this[_0x34a5db(0x25a)][_0x34a5db(0x2af)](_0x109c9d),_0x1c06f7=_0x109c9d+'\x00'+_0x4b9f2b;!this['_cursors'][_0x34a5db(0x510)](_0x1c06f7)&&(!this[_0x34a5db(0x254)][_0x34a5db(0x510)](_0x109c9d)&&(_0x474328[_0x34a5db(0x2b2)](),this[_0x34a5db(0x254)][_0x34a5db(0x24b)](_0x109c9d,_0x474328['getClock']()||0x0)),this[_0x34a5db(0x644)][_0x34a5db(0x24b)](_0x1c06f7,this[_0x34a5db(0x254)][_0x34a5db(0x1fe)](_0x109c9d)));const _0x2f6976=this['_cursors'][_0x34a5db(0x1fe)](_0x1c06f7),_0x52b28e=_0x474328['getClock'](_0x4b9f2b)||0x0;if(_0x52b28e<=_0x2f6976)return![];const _0x276c4d=_0x2f6976+this[_0x34a5db(0x375)],_0x108c77=Math[_0x34a5db(0x356)](_0x52b28e,_0x276c4d),_0x27525e=_0x21bb65[_0x34a5db(0x47c)]?_0x21bb65[_0x34a5db(0x5cc)]():0x0,_0x5653df=Array['from'](_0x474328[_0x34a5db(0x664)](_0x4b9f2b,_0x2f6976+0x1,_0x108c77));let _0x4551fe=_0x2f6976;for(const _0x1aea40 of _0x5653df){const {clock:_0x19ca2a,key:_0x20c536,action:_0x48b3be,origin:_0x41be23}=_0x1aea40;if(_0x19ca2a>_0x4551fe)_0x4551fe=_0x19ca2a;if(_0x20c536==null)continue;if(!this[_0x34a5db(0x567)](_0x109c9d,_0x4b9f2b,_0x20c536,_0x19ca2a))continue;let _0x129008,_0x1a1085;if(_0x48b3be===_0x3ca3c2[_0x34a5db(0x3dd)])_0x129008='remove',_0x1a1085=null;else{const _0x3a6468=_0x474328['get'](_0x4b9f2b,_0x20c536);_0x3a6468==null?(_0x129008='remove',_0x1a1085=null):(_0x129008='put',_0x1a1085=_0x3a6468);}this[_0x34a5db(0x384)](_0x34a5db(0x366),{'env':_0x109c9d,'type':_0x4b9f2b,'key':_0x20c536,'op':_0x129008,'clock':_0x19ca2a,'origin':_0x41be23,'value':_0x1a1085});}if(_0x21bb65[_0x34a5db(0x47c)])_0x21bb65[_0x34a5db(0x593)](_0x34a5db(0x468)+_0x109c9d+':'+_0x4b9f2b,_0x21bb65[_0x34a5db(0x5cc)]()-_0x27525e,'n='+_0x5653df[_0x34a5db(0x246)]);return this[_0x34a5db(0x644)][_0x34a5db(0x24b)](_0x1c06f7,Math[_0x34a5db(0x4ca)](_0x4551fe,_0x108c77)),_0x474328[_0x34a5db(0x3db)](_0x4b9f2b)>_0x108c77;}[_0xfbb1a2(0x278)](){const _0xdd2a36=_0xfbb1a2;return{'started':this[_0xdd2a36(0x298)],'quantum':this[_0xdd2a36(0x375)],'flushDebounce':this[_0xdd2a36(0x338)],'cursors':Object['fromEntries']([...this[_0xdd2a36(0x644)][_0xdd2a36(0x248)]()][_0xdd2a36(0x52f)](([_0x5e9ae8,_0x236dd0])=>[_0x5e9ae8[_0xdd2a36(0x213)]('\x00',':'),_0x236dd0])),'pending':this[_0xdd2a36(0x50d)][_0xdd2a36(0x419)],'seen':this[_0xdd2a36(0x584)][_0xdd2a36(0x419)]};}}return _0x9deeca['CHANGEFEED_QUANTUM']=_0x3ff348,okdbChangefeed={'OKDBChangefeed':_0x9deeca},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0xfc57a2=_0x38fa5f;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x58d8ea=require$$1$2,_0x46eef4=require$$1,{EVENTS:_0x6cbc0e}=requireOkdbEnums(),_0x1242a1=require$$0,{slotKey:_0x2659cc}=requireOkdbProcessRegistry(),_0x374956=0xfa,_0x2cbb36=0xfa0,_0x4645d3=0x5,_0x41e85b=0x2710,_0x5bfea2=0xbb8,_0x4064a7=0x7d0,_0x2be9ed='__okdbCluster',_0x52d481=_0xfc57a2(0x428),_0x3cb93f=_0xfc57a2(0x1f3),_0x126544=_0xfc57a2(0x537),_0x116182=[_0x6cbc0e[_0xfc57a2(0x364)],_0x6cbc0e['FTS_REGISTERED'],_0x6cbc0e['FTS_DROP'],_0x6cbc0e[_0xfc57a2(0x613)],_0x6cbc0e[_0xfc57a2(0x560)],_0x6cbc0e['INDEX_READY'],_0x6cbc0e['INDEX_RESET'],_0x6cbc0e[_0xfc57a2(0x256)],_0xfc57a2(0x3ec),'processor:progress','processor:error','processor:paused',_0xfc57a2(0x43b),_0xfc57a2(0x637)],_0x5d0fd4=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x455c5f({workers:_0x55c110,makeOkdb:_0x20f71f,port:_0x17cb37,primaryOkdb:_0x83ed3,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x521667=_0xfc57a2;if(_0x58d8ea['isPrimary'])return childEntry&&_0x58d8ea['setupPrimary']({'exec':_0x46eef4[_0x521667(0x60e)](__dirname,_0x521667(0x58d)),'args':[],'execArgv':((()=>{const _0x1ad763=_0x521667,_0xa955a8=[];for(let _0x94ed40=0x0;_0x94ed40<process['execArgv'][_0x1ad763(0x246)];_0x94ed40++){const _0x12abef=process[_0x1ad763(0x2e0)][_0x94ed40];if(_0x12abef[_0x1ad763(0x4f7)](_0x1ad763(0x425))||_0x12abef[_0x1ad763(0x4f7)](_0x1ad763(0x3cf))||_0x12abef[_0x1ad763(0x4f7)](_0x1ad763(0x535)))continue;if(_0x12abef==='-e'||_0x12abef==='--eval'||_0x12abef==='-p'||_0x12abef==='--print'){_0x94ed40++;continue;}_0xa955a8[_0x1ad763(0x2c6)](_0x12abef);}return _0xa955a8;})())}),_0x44d1ea({'workers':_0x55c110,'port':_0x17cb37,'primaryOkdb':_0x83ed3,'workerEnv':workerEnv});return _0x2851db({'makeOkdb':_0x20f71f,'port':_0x17cb37});}function _0x44d1ea({workers:_0x4284eb,port:_0x191ebc,primaryOkdb:_0x4ca0d0,workerEnv:_0xaa0687}){const _0x40253f=_0xfc57a2,_0x2d103c=new Map(),_0x43d216=new Map();let _0x435e29=![];const _0x10edf4=_0x2eb9ab=>_0x2eb9ab?.[_0x40253f(0x29b)],_0x26c845=_0x15979a=>{const _0x31f78d=_0x40253f,_0x3d8b45=_0x58d8ea[_0x31f78d(0x1ea)]({...process.env,..._0xaa0687||{},'OKDB_CLUSTER_SLOT':String(_0x15979a)});return _0x3d8b45[_0x31f78d(0x29b)]=_0x15979a,_0x2d103c[_0x31f78d(0x24b)](_0x3d8b45[_0x31f78d(0x1de)][_0x31f78d(0x53a)],{'worker':_0x3d8b45,'startedAt':Date[_0x31f78d(0x5cc)](),'slot':_0x15979a}),_0x3d8b45['on'](_0x31f78d(0x2a2),_0x17e6ef=>{const _0x144c74=_0x31f78d;console[_0x144c74(0x1f3)](_0x144c74(0x403)+_0x3d8b45[_0x144c74(0x1de)][_0x144c74(0x53a)]+_0x144c74(0x3ab)+(_0x17e6ef?.['message']??_0x17e6ef));}),_0x3d8b45['on'](_0x31f78d(0x4bb),()=>_0x5c61b7()),_0x3d8b45;},_0x4b6654=_0x210965=>{const _0x36dcab=_0x40253f;for(const {worker:_0x2d0e6b}of _0x2d103c['values']()){if(_0x2d0e6b[_0x36dcab(0x2da)]()||!_0x2d0e6b[_0x36dcab(0x3ca)]())continue;try{_0x2d0e6b['send'](_0x210965);}catch{}}};_0x4ca0d0?.[_0x40253f(0x507)]?.({'kind':_0x40253f(0x226),'listenAddr':':'+_0x191ebc})[_0x40253f(0x5c5)](()=>{}),_0x4ca0d0?.[_0x40253f(0x5f4)]?.[_0x40253f(0x376)]?.({'workersConfigured':_0x4284eb});const _0x31212d={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x5c61b7=()=>{const _0x482f33=_0x40253f,_0xa967e5=_0x4ca0d0?.[_0x482f33(0x5f4)];if(!_0xa967e5||!_0xa967e5[_0x482f33(0x5b9)])return;const _0x370913=_0xa967e5['selfKey'];for(const {worker:_0x50dbf1,startedAt:_0x3e6632,slot:_0x20b414,stats:_0x257624,processing:_0x4862e9}of _0x2d103c[_0x482f33(0x4a0)]()){if(_0x50dbf1[_0x482f33(0x2da)]())continue;const _0x3083dc=_0xa967e5[_0x482f33(0x372)]?.()&&_0xa967e5[_0x482f33(0x37d)](_0x482f33(0x38b),_0x2fa7ca(_0x20b414))?.[_0x482f33(0x4a4)]===!![];_0xa967e5[_0x482f33(0x57c)]({'pid':_0x50dbf1['process']['pid'],'startedAt':_0x3e6632,'kind':_0x482f33(0x45c),'supervisorKey':_0x370913,'slot':_0x20b414,'slotKey':_0x2fa7ca(_0x20b414),'role':_0x31212d,'listenAddr':':'+_0x191ebc,'lifecycle':_0x3083dc?'decommissioning':_0x482f33(0x3d2),'processing':_0x4862e9??null,'stats':_0x257624??null})[_0x482f33(0x5c5)](()=>{});}},_0x2fa7ca=_0x2f995b=>_0x2659cc(_0x40253f(0x38d)+_0x191ebc,_0x2f995b),_0x4deecb=_0x560c84=>{const _0xb8886c=_0x40253f,_0x218876=_0x4ca0d0?.[_0xb8886c(0x5f4)];if(!_0x218876?.['hasDesired']?.())return![];return _0x218876[_0xb8886c(0x37d)](_0xb8886c(0x38b),_0x2fa7ca(_0x560c84))?.['decommission']===!![];};for(let _0x1e4dd8=0x0;_0x1e4dd8<_0x4284eb;_0x1e4dd8++){const _0x2ef47e=_0x4deecb(_0x1e4dd8);_0x43d216['set'](_0x1e4dd8,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x2ef47e,'respawnTimer':null}),_0x2ef47e?console[_0x40253f(0x1f3)](_0x40253f(0x279)+_0x1e4dd8+_0x40253f(0x3f1)):_0x26c845(_0x1e4dd8);}const _0xf3ba97=()=>{const _0x2d1103=_0x40253f,_0x6cdbc=_0x4ca0d0?.[_0x2d1103(0x5f4)];if(!_0x6cdbc?.[_0x2d1103(0x5b9)]||!_0x6cdbc[_0x2d1103(0x372)]?.())return;for(const [_0x2e9e51,_0x1e99fe]of _0x43d216[_0x2d1103(0x248)]()){const _0x4f174b=_0x6cdbc[_0x2d1103(0x37d)](_0x2d1103(0x38b),_0x2fa7ca(_0x2e9e51)),_0x31362c=_0x4f174b?.[_0x2d1103(0x4a4)]===!![],_0x24d845=_0x4f174b?.[_0x2d1103(0x25e)]===!![];if(_0x31362c&&!_0x1e99fe['dead']){_0x1e99fe[_0x2d1103(0x559)]=!![];_0x1e99fe['respawnTimer']&&(clearTimeout(_0x1e99fe['respawnTimer']),_0x1e99fe[_0x2d1103(0x231)]=null);for(const {worker:_0x410f91}of _0x2d103c[_0x2d1103(0x4a0)]()){if(_0x10edf4(_0x410f91)!==_0x2e9e51||_0x410f91['isDead']())continue;try{if(_0x24d845)_0x410f91[_0x2d1103(0x1de)][_0x2d1103(0x25e)](_0x2d1103(0x5c7));else _0x410f91['isConnected']()&&_0x410f91['disconnect']();}catch{}}console[_0x2d1103(0x1f3)](_0x2d1103(0x31a)+(_0x24d845?_0x2d1103(0x4a8):_0x2d1103(0x5ce))+_0x2d1103(0x518)+_0x2e9e51+_0x2d1103(0x48d));}else{if(!_0x31362c&&_0x1e99fe[_0x2d1103(0x559)]&&_0x4f174b){_0x1e99fe[_0x2d1103(0x559)]=![],_0x1e99fe[_0x2d1103(0x479)]=[],_0x1e99fe[_0x2d1103(0x4fa)]=0x0;const _0x133f9e=[..._0x2d103c[_0x2d1103(0x4a0)]()]['some'](({worker:_0x4ed55b})=>_0x10edf4(_0x4ed55b)===_0x2e9e51&&!_0x4ed55b[_0x2d1103(0x2da)]());!_0x133f9e&&!_0x435e29&&(_0x26c845(_0x2e9e51),console[_0x2d1103(0x1f3)](_0x2d1103(0x402)+_0x2e9e51));}}}},_0x37470b=()=>{try{_0xf3ba97();}catch{}};_0x4ca0d0?.[_0x40253f(0x5a6)]?.['on']?.(_0x6cbc0e[_0x40253f(0x53e)],_0x37470b);const _0x432733=[];if(_0x4ca0d0?.[_0x40253f(0x5a6)]?.['on'])for(const _0x57c878 of _0x116182){const _0x481baa=_0x44dc7e=>{_0x4b6654({[_0x2be9ed]:_0x52d481,'event':_0x57c878,'data':_0x44dc7e??{}});};_0x4ca0d0[_0x40253f(0x5a6)]['on'](_0x57c878,_0x481baa),_0x432733[_0x40253f(0x2c6)]({'event':_0x57c878,'handler':_0x481baa});}const _0x54e377=setInterval(()=>{_0xf3ba97(),_0x5c61b7();},_0x5d0fd4);_0x54e377[_0x40253f(0x476)]?.();const _0x4d70fc=(_0x2f6d62,_0xb73590)=>{const _0x14715d=_0x40253f;if(!_0xb73590||typeof _0xb73590!==_0x14715d(0x339)||_0xb73590[_0x2be9ed]!==_0x3cb93f)return;if(!_0x4ca0d0?.['log']?.[_0x14715d(0x610)])return;const _0x44aa7b=_0xb73590[_0x14715d(0x473)]||{};_0x4ca0d0['log'][_0x14715d(0x610)]({..._0x44aa7b,'msg':'[w'+_0xb73590[_0x14715d(0x38b)]+']\x20'+(_0x44aa7b['msg']??''),'meta':{..._0x44aa7b[_0x14715d(0x3f9)]||{},'worker':_0xb73590[_0x14715d(0x38b)],'workerPid':_0xb73590[_0x14715d(0x53a)]}});};_0x58d8ea['on'](_0x40253f(0x453),_0x4d70fc);const _0x27e53f=(_0x64a768,_0x11c4a8)=>{const _0x2df76e=_0x40253f;if(!_0x11c4a8||typeof _0x11c4a8!==_0x2df76e(0x339)||_0x11c4a8[_0x2be9ed]!==_0x126544)return;const _0x1fbcb9=_0x2d103c['get'](_0x64a768[_0x2df76e(0x1de)][_0x2df76e(0x53a)]);if(_0x1fbcb9){_0x1fbcb9[_0x2df76e(0x537)]={..._0x11c4a8[_0x2df76e(0x537)],'at':Date[_0x2df76e(0x5cc)]()};if(_0x11c4a8['processing']!==undefined)_0x1fbcb9[_0x2df76e(0x1d5)]=_0x11c4a8[_0x2df76e(0x1d5)];}};_0x58d8ea['on'](_0x40253f(0x453),_0x27e53f),_0x58d8ea['on'](_0x40253f(0x5f7),(_0x21c440,_0x5e4557,_0x3ea6da)=>{const _0xa24001=_0x40253f,_0x50d72c=_0x21c440['process']['pid'],_0x4800f6=_0x10edf4(_0x21c440),_0x234d0a=_0x2d103c['get'](_0x50d72c);if(_0x234d0a&&_0x4ca0d0?.[_0xa24001(0x5f4)])_0x4ca0d0['processes'][_0xa24001(0x57d)](_0x50d72c+':'+_0x234d0a[_0xa24001(0x439)])[_0xa24001(0x5c5)](()=>{});_0x2d103c[_0xa24001(0x307)](_0x50d72c),console[_0xa24001(0x1f3)](_0xa24001(0x403)+_0x50d72c+_0xa24001(0x396)+(_0x4800f6??'?')+')\x20exited\x20'+(_0xa24001(0x2ec)+_0x5e4557+',\x20signal='+(_0x3ea6da??_0xa24001(0x1b6))+_0xa24001(0x35a)+_0x2d103c['size']+_0xa24001(0x66c))),_0x5c61b7();if(_0x435e29||_0x4800f6==null)return;const _0x282f26=_0x43d216['get'](_0x4800f6);if(!_0x282f26||_0x282f26['dead'])return;const _0x54f561=Date[_0xa24001(0x5cc)]();_0x282f26['deaths'][_0xa24001(0x2c6)](_0x54f561),_0x282f26['deaths']=_0x282f26[_0xa24001(0x479)][_0xa24001(0x629)](_0x1987a4=>_0x54f561-_0x1987a4<=_0x41e85b);if(_0x282f26['deaths'][_0xa24001(0x246)]>=_0x4645d3){_0x282f26['dead']=!![],console[_0xa24001(0x2a2)](_0xa24001(0x2c4)+_0x4800f6+_0xa24001(0x464)+_0x282f26[_0xa24001(0x479)]['length']+_0xa24001(0x415)+(_0x41e85b+_0xa24001(0x533)+_0x2d103c[_0xa24001(0x419)]+'\x20worker(s)\x20still\x20serving'));return;}_0x282f26[_0xa24001(0x4fa)]++;const _0x4043d7=Math[_0xa24001(0x356)](_0x2cbb36,_0x374956*0x2**(_0x282f26['consecutiveFailures']-0x1));console['log']('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x4800f6+_0xa24001(0x546)+_0x4043d7+'ms\x20(attempt\x20'+_0x282f26[_0xa24001(0x4fa)]+')'),_0x282f26['respawnTimer']=setTimeout(()=>{const _0x49ea31=_0xa24001;_0x282f26[_0x49ea31(0x231)]=null;if(_0x435e29||_0x282f26[_0x49ea31(0x559)])return;const _0x28f404=_0x26c845(_0x4800f6);_0x28f404[_0x49ea31(0x47a)]('listening',()=>{const _0x2a3c9e=_0x49ea31;if(_0x43d216['get'](_0x4800f6)===_0x282f26)_0x282f26[_0x2a3c9e(0x4fa)]=0x0;});},_0x4043d7),_0x282f26[_0xa24001(0x231)][_0xa24001(0x476)]?.();});const _0x4a915b=[..._0x2d103c[_0x40253f(0x60b)]()];console['log'](_0x40253f(0x33d)+process[_0x40253f(0x53a)]+'\x20forked\x20'+_0x4284eb+_0x40253f(0x5e2)+_0x191ebc+':\x20'+('['+_0x4a915b[_0x40253f(0x60e)](',\x20')+']'));const _0x8b7557={'_isClusterController':!![],'port':_0x191ebc,'primaryOkdb':_0x4ca0d0??null,'status'(){const _0x4b37f6=_0x40253f;return{'clustered':!![],'primaryPid':process[_0x4b37f6(0x53a)],'port':_0x191ebc,'primaryRole':_0x4ca0d0?.[_0x4b37f6(0x3af)]??null,'processorPid':null,'supervisorPid':process[_0x4b37f6(0x53a)],'workers':[..._0x2d103c['values']()]['map'](({worker:_0x521d73})=>({'pid':_0x521d73[_0x4b37f6(0x1de)]['pid'],'id':_0x521d73['id'],'dead':_0x521d73[_0x4b37f6(0x2da)]()}))};},async 'close'(){const _0x590f50=_0x40253f;_0x435e29=!![];for(const _0x538273 of _0x43d216[_0x590f50(0x4a0)]()){_0x538273[_0x590f50(0x559)]=!![],_0x538273[_0x590f50(0x231)]&&(clearTimeout(_0x538273['respawnTimer']),_0x538273[_0x590f50(0x231)]=null);}clearInterval(_0x54e377),_0x58d8ea[_0x590f50(0x247)](_0x590f50(0x453),_0x4d70fc),_0x58d8ea['off'](_0x590f50(0x453),_0x27e53f),_0x4ca0d0?.[_0x590f50(0x5a6)]?.[_0x590f50(0x247)]?.(_0x6cbc0e['SYSTEM_PROC'],_0x37470b);if(_0x4ca0d0?.['events']?.[_0x590f50(0x247)])for(const {event:_0x3b64b8,handler:_0x5a53bb}of _0x432733){try{_0x4ca0d0[_0x590f50(0x5a6)][_0x590f50(0x247)](_0x3b64b8,_0x5a53bb);}catch{}}_0x432733[_0x590f50(0x246)]=0x0;const _0x5860b9=[..._0x2d103c['values']()][_0x590f50(0x52f)](({worker:_0x5410a9})=>_0x5410a9);if(_0x5860b9['length']===0x0)return;await Promise[_0x590f50(0x1f1)](_0x5860b9['map'](_0x1135ae=>new Promise(_0x78ec2=>{const _0x593ca9=_0x590f50;if(_0x1135ae[_0x593ca9(0x2da)]()){_0x78ec2();return;}let _0x541b31=![];const _0x59ba53=()=>{if(_0x541b31)return;_0x541b31=!![];if(_0x495d5b)clearTimeout(_0x495d5b);_0x78ec2();};_0x1135ae[_0x593ca9(0x47a)](_0x593ca9(0x5f7),_0x59ba53);const _0x495d5b=setTimeout(()=>{const _0x7aab24=_0x593ca9;try{_0x1135ae[_0x7aab24(0x1de)][_0x7aab24(0x25e)]();}catch{}},_0x5bfea2+0x1f4);_0x495d5b[_0x593ca9(0x476)]?.();try{_0x1135ae[_0x593ca9(0x416)]();}catch{try{_0x1135ae[_0x593ca9(0x1de)][_0x593ca9(0x25e)]();}catch{}}})));}};return _0x8b7557;}async function _0x2851db({makeOkdb:_0xc3e51e,port:_0x2a0b2c}){const _0x2d3616=_0xfc57a2,_0x5167d7=await _0xc3e51e();return _0x4e0240(_0x5167d7),_0x5167d7['http'][_0x2d3616(0x3a5)](_0x2a0b2c);}function _0x4e0240(_0x244d61){const _0x632215=_0xfc57a2;if(!_0x244d61||_0x244d61[_0x632215(0x2b5)])return;_0x244d61[_0x632215(0x2b5)]=!![];try{const {OKDBChangefeed:_0x54c2d2}=requireOkdbChangefeed(),_0x10297d=_0x244d61['_adminRelay'];if(_0x10297d&&typeof _0x10297d['attachFeed']===_0x632215(0x344)){const _0x251a10=new _0x54c2d2(_0x244d61);_0x251a10['start'](),_0x10297d[_0x632215(0x451)](_0x251a10),_0x244d61[_0x632215(0x496)]=_0x251a10;}}catch(_0x52df55){_0x244d61['log']?.[_0x632215(0x5d5)]?.(_0x632215(0x608)+(_0x52df55?.[_0x632215(0x453)]??_0x52df55),{'feature':_0x632215(0x618)});}const _0x4ec9b6=_0x2cc854=>{const _0x81166d=_0x632215;if(!_0x2cc854||typeof _0x2cc854!=='object'||_0x2cc854[_0x2be9ed]==null)return;if(_0x2cc854[_0x2be9ed]===_0x52d481)try{_0x244d61[_0x81166d(0x35c)]?.[_0x81166d(0x4b3)]?.(_0x2cc854[_0x81166d(0x648)],_0x2cc854[_0x81166d(0x2ae)]);}catch{}};process['on'](_0x632215(0x453),_0x4ec9b6),_0x244d61['_clusterOnMessage']=_0x4ec9b6;{let _0x5d1ee6=process['cpuUsage'](),_0x2e56a7=Date[_0x632215(0x5cc)]();const _0xfaaa74=()=>{const _0x14fa40=_0x632215;if(typeof process['send']!==_0x14fa40(0x344)||!process[_0x14fa40(0x3dc)])return;const _0x4b67f7=Date['now'](),_0x52102d=process['cpuUsage'](),_0x5a8af5=(_0x4b67f7-_0x2e56a7)*0x3e8,_0x52ca02=_0x52102d[_0x14fa40(0x4e7)]-_0x5d1ee6['user']+(_0x52102d[_0x14fa40(0x4e9)]-_0x5d1ee6[_0x14fa40(0x4e9)]),_0x20ea6c=_0x5a8af5>0x0?Math[_0x14fa40(0x356)](0x64,Math[_0x14fa40(0x1cd)](_0x52ca02/(_0x5a8af5*(_0x1242a1[_0x14fa40(0x636)]()[_0x14fa40(0x246)]||0x1))*0x64)):0x0;_0x5d1ee6=_0x52102d,_0x2e56a7=_0x4b67f7;const _0x29a215=process[_0x14fa40(0x54e)]();let _0x5a49a8=null;try{_0x5a49a8=_0x244d61['role']?.['processors']?_0x244d61[_0x14fa40(0x5f4)]?.[_0x14fa40(0x457)]?.()??null:null;}catch{}try{process[_0x14fa40(0x2d7)]({[_0x2be9ed]:_0x126544,'stats':{'rss':_0x29a215[_0x14fa40(0x25c)],'heapUsed':_0x29a215[_0x14fa40(0x28e)],'heapTotal':_0x29a215['heapTotal'],'external':_0x29a215[_0x14fa40(0x26a)],'cpuPct':_0x20ea6c,'cpuWindowMs':Math['round'](_0x5a8af5/0x3e8)||null},'processing':_0x5a49a8});}catch{}},_0x456de9=Math[_0x632215(0x4ca)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x27167a=setInterval(_0xfaaa74,_0x456de9);_0x27167a['unref']?.(),_0xfaaa74();for(const _0x43df21 of[_0x632215(0x57a),_0x632215(0x43b)]){_0x244d61[_0x632215(0x5a6)]?.['on']?.(_0x43df21,()=>{try{_0xfaaa74();}catch{}});}}let _0x5a67fb=![];const _0x426f05=async _0x1e93fc=>{const _0x4a3875=_0x632215;if(_0x5a67fb)return;_0x5a67fb=!![];const _0x9f851c=setTimeout(()=>process['exit'](_0x1e93fc),_0x5bfea2);_0x9f851c[_0x4a3875(0x476)]?.();try{await _0x244d61[_0x4a3875(0x577)]?.();}catch{}process[_0x4a3875(0x5f7)](_0x1e93fc);};process['on'](_0x632215(0x416),()=>_0x426f05(0x0));if(process[_0x632215(0x474)]!==_0x632215(0x447)){const _0x807178=setInterval(()=>{if(process['ppid']===0x1)_0x426f05(0x0);},_0x4064a7);_0x807178[_0x632215(0x476)]?.(),_0x244d61[_0x632215(0x509)]=_0x807178;}}return okdbCluster={'runClustered':_0x455c5f,'attachWorkerCluster':_0x4e0240},okdbCluster;}var hasRequiredOkdb;function requireOkdb(){const _0x171ef3=_0x38fa5f;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x171ef3(0x3a6)]();}catch{}const _0x219ced=require$$1,_0x27f300=require$$1$1,{resolveWorkers:_0x480cde,isShmbufNative:_0x643a7d}=requireOkdbWorkers();function _0x5b8be3(_0xf71d96){const _0xafe195=_0x171ef3,_0x3d12d4=_0xf71d96['slice'](0x2),_0x47e780={};let _0x42ca56=0x0;while(_0x42ca56<_0x3d12d4['length']){const _0x353cb5=_0x3d12d4[_0x42ca56];if(_0x353cb5===_0xafe195(0x1ab)||_0x353cb5==='-p')_0x47e780['port']=Number(_0x3d12d4[++_0x42ca56]);else{if(_0x353cb5==='--path'||_0x353cb5==='-d')_0x47e780[_0xafe195(0x60a)]=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5==='--key'||_0x353cb5==='-k')_0x47e780['key']=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5===_0xafe195(0x445)||_0x353cb5==='-c')_0x47e780[_0xafe195(0x284)]=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5===_0xafe195(0x287))_0x47e780['logLevel']=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5==='--no-repl')_0x47e780[_0xafe195(0x2a6)]=!![];else{if(_0x353cb5===_0xafe195(0x550))_0x47e780[_0xafe195(0x32c)]=!![];else{if(_0x353cb5===_0xafe195(0x3e4))_0x47e780[_0xafe195(0x5f2)]=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5===_0xafe195(0x421))_0x47e780['noCluster']=!![];else{if(_0x353cb5===_0xafe195(0x2e8)||_0x353cb5==='-e')_0x47e780[_0xafe195(0x1c6)]=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5===_0xafe195(0x46a))_0x47e780['types']=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5===_0xafe195(0x39d))_0x47e780['changes']=!![];else{if(_0x353cb5===_0xafe195(0x62c))_0x47e780[_0xafe195(0x56d)]=!![];else{if(_0x353cb5===_0xafe195(0x1ff))_0x47e780[_0xafe195(0x1e2)]=!![];else{if(_0x353cb5===_0xafe195(0x3a8)){const _0x4764ce=[];while(_0x42ca56+0x1<_0x3d12d4[_0xafe195(0x246)]&&!_0x3d12d4[_0x42ca56+0x1][_0xafe195(0x4f7)]('--')){_0x4764ce[_0xafe195(0x2c6)](_0x3d12d4[++_0x42ca56]);}_0x47e780['open']=_0x4764ce[_0xafe195(0x246)]>0x0?_0x4764ce:!![];}else{if(_0x353cb5===_0xafe195(0x661))_0x47e780[_0xafe195(0x64a)]=!![];else{if(_0x353cb5===_0xafe195(0x5ef))_0x47e780[_0xafe195(0x5c0)]=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5==='--password')_0x47e780[_0xafe195(0x1e7)]=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5==='--label')_0x47e780[_0xafe195(0x304)]=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5===_0xafe195(0x395))_0x47e780[_0xafe195(0x5ad)]=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5==='--grants')_0x47e780[_0xafe195(0x58f)]=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5===_0xafe195(0x1ef))_0x47e780[_0xafe195(0x62b)]=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5===_0xafe195(0x238))_0x47e780['token']=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5===_0xafe195(0x1dc)||_0x353cb5==='-u')_0x47e780[_0xafe195(0x5d3)]=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5===_0xafe195(0x261))_0x47e780['selfAddress']=_0x3d12d4[++_0x42ca56];else{if(_0x353cb5===_0xafe195(0x316)||_0x353cb5==='-v'){const _0x4d7463=require$$3;console[_0xafe195(0x1f3)](_0x4d7463[_0xafe195(0x42c)]),process[_0xafe195(0x5f7)](0x0);}else(_0x353cb5===_0xafe195(0x210)||_0x353cb5==='-h')&&(_0xe08856(),process[_0xafe195(0x5f7)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x42ca56++;}return _0x47e780;}function _0xe08856(){const _0x58fef5=_0x171ef3;console[_0x58fef5(0x1f3)](_0x58fef5(0x305));}const _0x31c00f=new Set([_0x171ef3(0x378),'info','warn',_0x171ef3(0x2a2)]);function _0x26e511(_0x5b20b0){const _0x3803ac=_0x171ef3,_0x584d6d=_0x5b20b0[_0x3803ac(0x284)]?_0x219ced['resolve'](_0x5b20b0[_0x3803ac(0x284)]):_0x219ced[_0x3803ac(0x299)](_0x3803ac(0x5be));let _0x27a12c={};if(_0x27f300[_0x3803ac(0x32f)](_0x584d6d))try{const _0x2e0a92=_0x27f300[_0x3803ac(0x591)](_0x584d6d,_0x3803ac(0x50e))[_0x3803ac(0x213)](/^\uFEFF/,'');_0x27a12c=JSON[_0x3803ac(0x4b9)](_0x2e0a92),console[_0x3803ac(0x1f3)](_0x3803ac(0x315)+_0x584d6d);}catch(_0x52b093){console[_0x3803ac(0x2a2)](_0x3803ac(0x28d)+_0x584d6d+':\x20'+_0x52b093[_0x3803ac(0x453)]),process[_0x3803ac(0x5f7)](0x1);}const _0x1dcba5={'port':process.env.OKDB_PORT?Number(process.env.OKDB_PORT):undefined,'path':process.env.OKDB_PATH??undefined,'key':process.env.OKDB_KEY??undefined,'logLevel':process.env.OKDB_LOG_LEVEL??undefined,'noRepl':process.env.OKDB_NO_REPL==='1'?!![]:undefined,'noAdmin':process.env.OKDB_NO_ADMIN==='1'?!![]:undefined},_0x200c19={'port':_0x5b20b0[_0x3803ac(0x20f)]??_0x27a12c[_0x3803ac(0x20f)]??_0x1dcba5[_0x3803ac(0x20f)]??0x2124,'dbPath':_0x5b20b0['path']??_0x27a12c[_0x3803ac(0x60a)]??_0x1dcba5['path']??_0x3803ac(0x4c6),'key':_0x5b20b0[_0x3803ac(0x660)]??_0x27a12c[_0x3803ac(0x660)]??_0x1dcba5[_0x3803ac(0x660)]??undefined,'logLevel':_0x5b20b0[_0x3803ac(0x3df)]??_0x27a12c['logLevel']??_0x1dcba5[_0x3803ac(0x3df)]??'info','noRepl':_0x5b20b0['noRepl']??_0x27a12c[_0x3803ac(0x2a6)]??_0x1dcba5[_0x3803ac(0x2a6)]??![],'noAdmin':_0x5b20b0['noAdmin']??_0x27a12c[_0x3803ac(0x32c)]??_0x1dcba5['noAdmin']??![],'admin':_0x27a12c['admin']??{},'api':_0x27a12c['api']??undefined,'auth':_0x27a12c['auth']??undefined,'mcp':_0x27a12c[_0x3803ac(0x3bf)]??undefined,'http':_0x27a12c[_0x3803ac(0x4f0)]??undefined,'timeMachine':_0x27a12c[_0x3803ac(0x331)]!==![]?_0x27a12c['timeMachine']??{}:![]};if(_0x5b20b0[_0x3803ac(0x26c)])_0x200c19[_0x3803ac(0x26c)]=!![];if(_0x5b20b0[_0x3803ac(0x5f2)]!==undefined)_0x200c19[_0x3803ac(0x461)]=_0x5b20b0[_0x3803ac(0x5f2)];return _0x5b20b0[_0x3803ac(0x3b7)]!==undefined&&(_0x200c19['auth']=_0x200c19[_0x3803ac(0x508)]||{},_0x200c19[_0x3803ac(0x508)]['open']=_0x5b20b0[_0x3803ac(0x3b7)]),_0x5b20b0['logRequests']&&(_0x200c19[_0x3803ac(0x378)]=_0x200c19[_0x3803ac(0x378)]||{},_0x200c19['debug'][_0x3803ac(0x64a)]=!![]),(!Number[_0x3803ac(0x51f)](_0x200c19[_0x3803ac(0x20f)])||_0x200c19['port']<0x1||_0x200c19[_0x3803ac(0x20f)]>0xffff)&&(console['error'](_0x3803ac(0x5ab)+_0x200c19[_0x3803ac(0x20f)]+_0x3803ac(0x62d)),process[_0x3803ac(0x5f7)](0x1)),!_0x31c00f[_0x3803ac(0x510)](_0x200c19[_0x3803ac(0x3df)])&&(console[_0x3803ac(0x2a2)](_0x3803ac(0x21e)+_0x200c19['logLevel']+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x3803ac(0x5f7)](0x1)),_0x200c19;}function _0x49b49c(_0x535c63){const _0x8bbc31=_0x171ef3;return!!(_0x535c63&&typeof _0x535c63===_0x8bbc31(0x339)&&!Array[_0x8bbc31(0x4d8)](_0x535c63)&&Object[_0x8bbc31(0x60b)](_0x535c63)[_0x8bbc31(0x246)]>0x0);}function _0x1b5105(_0x388ad4){const _0x33dc50=_0x171ef3;return{..._0x388ad4['key']?{'encryptionKey':_0x388ad4[_0x33dc50(0x660)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x3555b8=!process[_0x171ef3(0x4dd)][_0x171ef3(0x228)]||!!process.env.NO_COLOR;function _0x4eddb1(_0x432373,_0x1e03e4){return _0x3555b8?_0x1e03e4:'\x1b['+_0x432373+'m'+_0x1e03e4+'\x1b[0m';}function _0x38fd24(_0x2dfb00){const _0x21c126=_0x171ef3;if(!_0x2dfb00||_0x2dfb00[_0x21c126(0x246)]===0x0)return;const _0x20913c='─'['repeat'](0x38);process[_0x21c126(0x504)][_0x21c126(0x4ae)]('\x0a'),process['stderr']['write'](_0x4eddb1('33','\x20\x20⚠\x20\x20'+_0x2dfb00[_0x21c126(0x246)]+'\x20SECURITY\x20NOTICE'+(_0x2dfb00[_0x21c126(0x246)]>0x1?'S':'')+'\x0a')),process[_0x21c126(0x504)][_0x21c126(0x4ae)]('\x20\x20'+_0x20913c+'\x0a');for(const _0x40c76d of _0x2dfb00){const _0x4cdec5=_0x40c76d[_0x21c126(0x4d2)]==='error'?_0x4eddb1('31',_0x21c126(0x5f1)):_0x4eddb1('33','\x20\x20⚠');process[_0x21c126(0x504)][_0x21c126(0x4ae)](_0x4cdec5+'\x20\x20'+_0x4eddb1('1',_0x40c76d[_0x21c126(0x223)])+'\x0a'),process[_0x21c126(0x504)][_0x21c126(0x4ae)](_0x21c126(0x649)+_0x40c76d['message']+'\x0a');if(_0x40c76d[_0x21c126(0x36b)])process[_0x21c126(0x504)][_0x21c126(0x4ae)]('\x20\x20\x20\x20\x20\x20\x20'+_0x4eddb1('2','Hint:\x20'+_0x40c76d[_0x21c126(0x36b)])+'\x0a');process[_0x21c126(0x504)][_0x21c126(0x4ae)]('\x0a');}process[_0x21c126(0x504)][_0x21c126(0x4ae)]('\x20\x20'+_0x20913c+'\x0a\x0a');}function _0x263443(_0x1fa6ec,_0x410479,_0x42275d={}){const _0x4ea7af=_0x171ef3,_0x239e92=_0x1fa6ec[_0x4ea7af(0x4f0)][_0x4ea7af(0x3a5)](_0x410479,_0x42275d);if(_0x239e92&&_0x239e92[_0x4ea7af(0x5ca)])return Promise[_0x4ea7af(0x299)](_0x239e92);return new Promise((_0x10799f,_0x447809)=>{const _0xfb23f=_0x4ea7af;_0x239e92['once']('listening',_0x10799f),_0x239e92[_0xfb23f(0x47a)](_0xfb23f(0x2a2),_0x447809);});}async function _0x3645a2(_0x1f4135){const _0x1b98ee=_0x171ef3,_0x1cf07d=require$$4$1;console[_0x1b98ee(0x1f3)]('\x0a\x20\x20okdb\x20doctor\x0a');let _0xe6a3c6=!![];const _0x466946=(_0x7ff217,_0x26292a)=>{const _0x2c4be6=_0x1b98ee;console[_0x2c4be6(0x1f3)]('\x20\x20'+(_0x7ff217?'✓':'✗')+'\x20'+_0x26292a);if(!_0x7ff217)_0xe6a3c6=![];},_0x1a362d=Number(process['version'][_0x1b98ee(0x213)]('v','')['split']('.')[0x0]);_0x466946(_0x1a362d>=0x12,'node\x20'+process[_0x1b98ee(0x42c)]+(_0x1a362d<0x12?_0x1b98ee(0x5c6):''));const _0x2a281b=_0x219ced['resolve'](_0x1f4135[_0x1b98ee(0x5b6)]);try{_0x27f300[_0x1b98ee(0x450)](_0x2a281b,{'recursive':!![]});const _0x1ccb54=_0x219ced[_0x1b98ee(0x60e)](_0x2a281b,_0x1b98ee(0x3a2));_0x27f300[_0x1b98ee(0x222)](_0x1ccb54,''),_0x27f300[_0x1b98ee(0x291)](_0x1ccb54),_0x466946(!![],_0x1b98ee(0x4e8)+_0x2a281b);}catch(_0x2ba0e7){_0x466946(![],_0x1b98ee(0x597)+_0x2a281b+_0x1b98ee(0x4d0)+_0x2ba0e7[_0x1b98ee(0x453)]+')');}const _0x4d5429=await new Promise(_0x2fda7a=>{const _0x3b23f4=_0x1b98ee,_0x1ee74b=_0x1cf07d['createServer']();_0x1ee74b[_0x3b23f4(0x47a)]('error',()=>_0x2fda7a(![])),_0x1ee74b['once'](_0x3b23f4(0x41f),()=>{const _0x46083a=_0x3b23f4;_0x1ee74b[_0x46083a(0x577)](),_0x2fda7a(!![]);}),_0x1ee74b[_0x3b23f4(0x3a5)](_0x1f4135[_0x3b23f4(0x20f)],'127.0.0.1');});_0x466946(_0x4d5429,_0x1b98ee(0x540)+_0x1f4135[_0x1b98ee(0x20f)]+'\x20'+(_0x4d5429?'available':_0x1b98ee(0x5ed)));const _0x111927=_0x219ced[_0x1b98ee(0x299)](_0x1b98ee(0x5be));if(_0x27f300[_0x1b98ee(0x32f)](_0x111927))try{JSON['parse'](_0x27f300[_0x1b98ee(0x591)](_0x111927,_0x1b98ee(0x50e))[_0x1b98ee(0x213)](/^\uFEFF/,'')),_0x466946(!![],_0x1b98ee(0x401)+_0x111927);}catch(_0x3ac61b){_0x466946(![],_0x1b98ee(0x347)+_0x3ac61b['message']);}else _0x466946(!![],_0x1b98ee(0x3ef));if(_0x643a7d()){const _0x4a0b6b=_0x480cde(_0x1f4135,{'shmbufNative':!![]});_0x466946(!![],_0x1b98ee(0x55d)+_0x4a0b6b+'\x20worker'+(_0x4a0b6b===0x1?'':'s')+')');}else _0x466946(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x4d5429)try{const _0x38fd18=require(_0x1b98ee(0x22c)),_0x4f4715=new _0x38fd18(_0x2a281b,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x4f4715[_0x1b98ee(0x3b7)]();try{await _0x4f4715[_0x1b98ee(0x5f4)][_0x1b98ee(0x3b7)]({'reader':!![]});const _0x355b9d=_0x4f4715[_0x1b98ee(0x5f4)][_0x1b98ee(0x1a8)](),_0x53c324=_0x355b9d[_0x1b98ee(0x629)](_0x32a987=>_0x32a987['supervisorKey']!=null)[_0x1b98ee(0x246)];_0x466946(!![],'processes:\x20'+_0x355b9d[_0x1b98ee(0x246)]+_0x1b98ee(0x42f)+(_0x355b9d[_0x1b98ee(0x246)]===0x1?'':'es')+'\x20('+_0x53c324+'\x20supervised)');}finally{await _0x4f4715[_0x1b98ee(0x577)]();}}catch{}console[_0x1b98ee(0x1f3)](''),_0xe6a3c6?console[_0x1b98ee(0x1f3)](_0x1b98ee(0x499)):(console[_0x1b98ee(0x1f3)]('\x20\x20Some\x20checks\x20failed.\x0a'),process['exit'](0x1));}async function _0x4843fa(){const _0x5b75c9=_0x171ef3,_0x91c11=_0x219ced[_0x5b75c9(0x299)](_0x5b75c9(0x5be));!_0x27f300['existsSync'](_0x91c11)?(_0x27f300['writeFileSync'](_0x91c11,JSON[_0x5b75c9(0x31c)]({'port':0x2124,'path':'./okdb-data','logLevel':_0x5b75c9(0x1bb),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x5b75c9(0x1f3)]('[okdb]\x20created\x20.kdbconfig')):console[_0x5b75c9(0x1f3)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x2632e4=_0x219ced[_0x5b75c9(0x299)](_0x5b75c9(0x4c6));!_0x27f300['existsSync'](_0x2632e4)?(_0x27f300['mkdirSync'](_0x2632e4,{'recursive':!![]}),console[_0x5b75c9(0x1f3)](_0x5b75c9(0x31e))):console['log'](_0x5b75c9(0x5f0)),console[_0x5b75c9(0x1f3)](_0x5b75c9(0x227));}async function _0x16f3c7(_0x15eafd){const _0xd2ba5e=_0x171ef3,_0x379ced=_0x219ced['resolve'](_0x15eafd['dbPath']);if(!_0x27f300[_0xd2ba5e(0x32f)](_0x379ced)){console['log'](_0xd2ba5e(0x4c1)+_0x379ced+_0xd2ba5e(0x55b));return;}const _0x411951=require$$0$3,_0x3cf292=_0x411951[_0xd2ba5e(0x605)]({'input':process[_0xd2ba5e(0x2cd)],'output':process[_0xd2ba5e(0x4dd)]}),_0x1b1bb5=await new Promise(_0x445584=>_0x3cf292[_0xd2ba5e(0x66a)](_0xd2ba5e(0x2ab)+_0x379ced+_0xd2ba5e(0x63f),_0x445584));_0x3cf292['close'](),console[_0xd2ba5e(0x1f3)]('');if(_0x1b1bb5[_0xd2ba5e(0x431)]()[_0xd2ba5e(0x56c)]()!=='yes'){console[_0xd2ba5e(0x1f3)](_0xd2ba5e(0x4e4));return;}let _0x3ebc25=null;try{_0x3ebc25=await _0x2e5383(_0x379ced,_0x15eafd,async _0x309c28=>{const _0x457dd7=_0xd2ba5e,_0x16f1f6=_0x309c28['_systemEnv'],_0x50252f=_0x16f1f6?.['db']?.['get'](_0x457dd7(0x27b))??null,_0x42eb8b=[];if(_0x16f1f6?.['hasType'](_0x457dd7(0x26e)))for(const {key:_0x39050f,value:_0x37253f}of _0x16f1f6[_0x457dd7(0x4cb)]('~licenses')){_0x42eb8b[_0x457dd7(0x2c6)]({'key':_0x39050f,'value':_0x37253f});}return{'identity':_0x50252f,'licenses':_0x42eb8b};});}catch(_0x507f22){console[_0xd2ba5e(0x1f3)]('[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20('+_0x507f22[_0xd2ba5e(0x453)]+')\x20—\x20they\x20will\x20NOT\x20be\x20preserved');}_0x27f300[_0xd2ba5e(0x3a4)](_0x379ced,{'recursive':!![],'force':!![]}),console[_0xd2ba5e(0x1f3)](_0xd2ba5e(0x63b)+_0x379ced+'\x20deleted');if(_0x3ebc25&&(_0x3ebc25[_0xd2ba5e(0x51c)]||_0x3ebc25[_0xd2ba5e(0x34c)][_0xd2ba5e(0x246)]>0x0))try{await _0x2e5383(_0x379ced,_0x15eafd,async _0x164257=>{const _0x464cad=_0xd2ba5e,_0x30d508=_0x164257[_0x464cad(0x4a1)];_0x3ebc25[_0x464cad(0x51c)]&&_0x30d508['db'][_0x464cad(0x1f6)](_0x464cad(0x27b),_0x3ebc25[_0x464cad(0x51c)]);if(_0x3ebc25['licenses'][_0x464cad(0x246)]>0x0){if(!_0x30d508[_0x464cad(0x4b1)](_0x464cad(0x26e)))await _0x30d508[_0x464cad(0x2e9)](_0x464cad(0x26e));for(const {key:_0x442e06,value:_0x1c805e}of _0x3ebc25[_0x464cad(0x34c)]){await _0x30d508[_0x464cad(0x1b3)](_0x464cad(0x26e),_0x442e06,_0x1c805e);}}});const _0x1d8fc2=[];if(_0x3ebc25[_0xd2ba5e(0x51c)])_0x1d8fc2[_0xd2ba5e(0x2c6)](_0xd2ba5e(0x5f5));if(_0x3ebc25[_0xd2ba5e(0x34c)][_0xd2ba5e(0x246)]>0x0)_0x1d8fc2[_0xd2ba5e(0x2c6)](_0x3ebc25[_0xd2ba5e(0x34c)][_0xd2ba5e(0x246)]+_0xd2ba5e(0x418));console[_0xd2ba5e(0x1f3)](_0xd2ba5e(0x2ca)+_0x1d8fc2['join'](_0xd2ba5e(0x3a0)));}catch(_0xa689f){console[_0xd2ba5e(0x1f3)](_0xd2ba5e(0x3ad)+_0xa689f[_0xd2ba5e(0x453)]);}}async function _0x2e5383(_0x4db06c,_0x40dbed,_0x49c153){const _0x446699=_0x171ef3,_0x2a8039=require$$5,_0x12d4f7=new _0x2a8039(_0x4db06c,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x1b5105(_0x40dbed)});await _0x12d4f7[_0x446699(0x3b7)]();try{return await _0x49c153(_0x12d4f7);}finally{await _0x12d4f7[_0x446699(0x577)]();}}async function _0x344ee2(_0x59571a,_0x5bb17a){const _0x44b3ef=_0x171ef3,_0x568503=require$$5,_0x22b4cc=_0x219ced[_0x44b3ef(0x299)](_0x5bb17a['dbPath']);console[_0x44b3ef(0x1f3)]('[okdb]\x20opening\x20'+_0x22b4cc+'…');const _0x21e7a1=new _0x568503(_0x22b4cc,_0x1b5105(_0x5bb17a));await _0x21e7a1[_0x44b3ef(0x3b7)](),console[_0x44b3ef(0x1f3)]('[okdb]\x20backing\x20up\x20to\x20'+_0x59571a+'…');const {envs:_0x655ae9}=await _0x21e7a1[_0x44b3ef(0x51a)][_0x44b3ef(0x588)](_0x59571a);for(const _0xf125bc of _0x655ae9){const _0xb20cd=_0xf125bc[_0x44b3ef(0x1f2)]>0x0?_0x44b3ef(0x4d0)+(_0xf125bc['sizeBefore']/0x400/0x400)['toFixed'](0x2)+'\x20MB\x20→\x20'+(_0xf125bc['sizeAfter']/0x400/0x400)[_0x44b3ef(0x3d0)](0x2)+'\x20MB)':'';console[_0x44b3ef(0x1f3)](_0x44b3ef(0x5d1)+_0xf125bc[_0x44b3ef(0x5c0)]+_0x44b3ef(0x28b)+_0xf125bc['dest']+_0xb20cd);}await _0x21e7a1[_0x44b3ef(0x577)](),console[_0x44b3ef(0x1f3)]('[okdb]\x20backup\x20complete');}async function _0x259c16(_0x1deb73,_0x1e599a,_0x1894e7){const _0x6f86e6=_0x171ef3,_0x1918f2=require$$5,_0x470cea=_0x219ced[_0x6f86e6(0x299)](_0x1e599a['dbPath']),_0x2c25c5=_0x1894e7[_0x6f86e6(0x1c6)]??'default',_0x2bc2ab=_0x1894e7[_0x6f86e6(0x42b)]?_0x1894e7['types'][_0x6f86e6(0x5df)](',')[_0x6f86e6(0x52f)](_0x4cc515=>_0x4cc515[_0x6f86e6(0x431)]()):null;console['log']('[okdb]\x20opening\x20'+_0x470cea+'…');const _0x424f61=new _0x1918f2(_0x470cea,_0x1b5105(_0x1e599a));await _0x424f61['open'](),console[_0x6f86e6(0x1f3)](_0x6f86e6(0x3fa)+_0x2c25c5+_0x6f86e6(0x2d6)+_0x1deb73+'…');const _0x25a912=await _0x424f61[_0x6f86e6(0x51a)][_0x6f86e6(0x57f)](_0x1deb73,{'envName':_0x2c25c5,'types':_0x2bc2ab,'includeChanges':!!_0x1894e7[_0x6f86e6(0x218)]});console[_0x6f86e6(0x1f3)](_0x6f86e6(0x553)+_0x25a912[_0x6f86e6(0x42b)]+_0x6f86e6(0x426)+_0x25a912[_0x6f86e6(0x441)]+'\x20\x20changes='+_0x25a912['changes']);if(_0x1894e7[_0x6f86e6(0x56d)]){const _0x1ee6d8=_0x219ced[_0x6f86e6(0x60e)](_0x219ced['dirname'](_0x1deb73),_0x6f86e6(0x56d));process[_0x6f86e6(0x4dd)]['write']('[okdb]\x20exporting\x20blobs…');const {count:_0x1ade3b,bytes:_0x94acd0}=await _0x424f61[_0x6f86e6(0x51a)][_0x6f86e6(0x29d)](_0x1ee6d8);console['log'](_0x6f86e6(0x390)+_0x1ee6d8+'\x20\x20('+_0x1ade3b+'\x20file'+(_0x1ade3b!==0x1?'s':'')+',\x20'+(_0x94acd0/0x400/0x400)[_0x6f86e6(0x3d0)](0x2)+'\x20MB)');}await _0x424f61[_0x6f86e6(0x577)](),console[_0x6f86e6(0x1f3)](_0x6f86e6(0x54a));}async function _0x264ec0(_0x294e0e,_0x6dcf3e,_0x2e4860){const _0x3c856e=_0x171ef3,_0x57df91=require$$5,_0x306de9=_0x219ced[_0x3c856e(0x299)](_0x6dcf3e[_0x3c856e(0x5b6)]),_0x42b1ea=_0x2e4860[_0x3c856e(0x1c6)]??null,_0xa4af2d=_0x2e4860[_0x3c856e(0x42b)]?_0x2e4860[_0x3c856e(0x42b)][_0x3c856e(0x5df)](',')[_0x3c856e(0x52f)](_0xc4c922=>_0xc4c922[_0x3c856e(0x431)]()):null,_0x8b046b=!!_0x2e4860[_0x3c856e(0x1e2)];console[_0x3c856e(0x1f3)]('[okdb]\x20opening\x20'+_0x306de9+'…');const _0x1c7423=new _0x57df91(_0x306de9,_0x1b5105(_0x6dcf3e));await _0x1c7423[_0x3c856e(0x3b7)](),console[_0x3c856e(0x1f3)]('[okdb]\x20importing\x20'+_0x294e0e+'…');const _0x28c359=await _0x1c7423[_0x3c856e(0x51a)]['importFromFile'](_0x294e0e,{'envName':_0x42b1ea,'types':_0xa4af2d,'dropExisting':_0x8b046b,'includeChanges':!!_0x2e4860[_0x3c856e(0x218)],'onProgress':({type:_0x42e620,count:_0x48d4bd})=>{const _0x2171f4=_0x3c856e;process[_0x2171f4(0x4dd)][_0x2171f4(0x4ae)](_0x2171f4(0x596)+_0x42e620+':\x20'+_0x48d4bd+_0x2171f4(0x61d));}});process[_0x3c856e(0x4dd)][_0x3c856e(0x4ae)]('\x0a'),console[_0x3c856e(0x1f3)](_0x3c856e(0x665)+_0x28c359['types']+'\x20\x20records='+_0x28c359[_0x3c856e(0x441)]+_0x3c856e(0x4c9)+_0x28c359[_0x3c856e(0x218)]);if(_0x2e4860[_0x3c856e(0x56d)]){const _0x105c1a=_0x219ced[_0x3c856e(0x60e)](_0x219ced[_0x3c856e(0x61e)](_0x294e0e),_0x3c856e(0x56d));if(_0x27f300['existsSync'](_0x105c1a)){const {imported:_0x55c2ec,skipped:_0xf5e41c}=await _0x1c7423[_0x3c856e(0x51a)][_0x3c856e(0x2cb)](_0x105c1a);console[_0x3c856e(0x1f3)](_0x3c856e(0x523)+_0x55c2ec+_0x3c856e(0x652)+_0xf5e41c);}}await _0x1c7423[_0x3c856e(0x577)](),console[_0x3c856e(0x1f3)](_0x3c856e(0x651));}async function _0x11d61e(_0x311a4c,_0x143c8c){const _0x667a84=_0x171ef3;_0x143c8c[_0x667a84(0x1e7)]&&!_0x143c8c[_0x667a84(0x5c0)]&&(console[_0x667a84(0x2a2)](_0x667a84(0x317)),process[_0x667a84(0x5f7)](0x1));const _0x13b2c8=_0x143c8c[_0x667a84(0x5ad)]?_0x143c8c['permissions'][_0x667a84(0x5df)](',')[_0x667a84(0x52f)](_0x4aa092=>_0x4aa092['trim']())[_0x667a84(0x629)](Boolean):[];let _0x5e7f7d={};if(_0x143c8c[_0x667a84(0x58f)])try{_0x5e7f7d=JSON['parse'](_0x143c8c[_0x667a84(0x58f)]);if(typeof _0x5e7f7d!==_0x667a84(0x339)||Array[_0x667a84(0x4d8)](_0x5e7f7d)||_0x5e7f7d===null)throw new Error();}catch{console['error'](_0x667a84(0x1a7)),process[_0x667a84(0x5f7)](0x1);}const _0x41ddca=require$$5,{randomToken:_0x52452e,hashToken:_0x595071,hashPassword:_0xf95fcf}=requireOkdbAuthTokens(),_0x4ddaf3=require$$0$1,_0x301977=_0x219ced['resolve'](_0x311a4c[_0x667a84(0x5b6)]),_0x23a25d=new _0x41ddca(_0x301977,_0x1b5105(_0x311a4c));await _0x23a25d[_0x667a84(0x3b7)]();try{await _0x23a25d[_0x667a84(0x508)][_0x667a84(0x337)]();if(_0x143c8c[_0x667a84(0x5c0)]){const _0x48f435=await _0x23a25d[_0x667a84(0x508)]['_lookupByName'](_0x143c8c['name']);_0x48f435&&(console[_0x667a84(0x2a2)]('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x143c8c[_0x667a84(0x5c0)]+_0x667a84(0x29f)),process[_0x667a84(0x5f7)](0x1));}const _0x470f4c=_0x52452e(0x20),_0x516db9=_0x595071(_0x470f4c),_0x3efccd=_0x143c8c[_0x667a84(0x1e7)]?await _0xf95fcf(_0x143c8c[_0x667a84(0x1e7)]):null,_0x5c99a7=_0x4ddaf3[_0x667a84(0x4cc)](),_0xf44567={'tokenHash':_0x516db9,'name':_0x143c8c[_0x667a84(0x5c0)]||null,'passwordHash':_0x3efccd,'label':_0x143c8c['label']||null,'permissions':_0x13b2c8,'grants':_0x5e7f7d,'createdAt':Date['now'](),'lastUsedAt':null},_0x3bc2fa=_0x143c8c[_0x667a84(0x62b)]?{'ttl':Number(_0x143c8c[_0x667a84(0x62b)])}:undefined;await _0x23a25d[_0x667a84(0x4a1)][_0x667a84(0x1b3)]('~tokens',_0x5c99a7,_0xf44567,_0x3bc2fa),console[_0x667a84(0x1f3)](_0x667a84(0x4e2)),console['log'](_0x667a84(0x3ed)+_0x5c99a7),console[_0x667a84(0x1f3)](_0x667a84(0x4b6)+(_0x143c8c['name']||_0x667a84(0x2ed))),console['log'](_0x667a84(0x20c)+(_0x143c8c[_0x667a84(0x304)]||'(unset)')),console[_0x667a84(0x1f3)](_0x667a84(0x2e3)+(_0x13b2c8[_0x667a84(0x60e)](',\x20')||_0x667a84(0x543))),console[_0x667a84(0x1f3)](_0x667a84(0x5fa)),console['log'](_0x667a84(0x632)+_0x470f4c+'\x0a');}finally{await _0x23a25d[_0x667a84(0x577)]();}}async function _0x416744(_0x577275){const _0xf26aed=_0x171ef3,_0x1d3349=require$$5,_0x1de2fc=_0x219ced[_0xf26aed(0x299)](_0x577275[_0xf26aed(0x5b6)]),_0x62b1fc=new _0x1d3349(_0x1de2fc,_0x1b5105(_0x577275));await _0x62b1fc[_0xf26aed(0x3b7)]();try{const _0x25eb40=_0x62b1fc[_0xf26aed(0x4a1)];if(!_0x25eb40||!_0x25eb40[_0xf26aed(0x4b1)](_0xf26aed(0x1fa))){console[_0xf26aed(0x1f3)](_0xf26aed(0x2b6));return;}const _0x37bf2c=[];for(const {key:_0x4e31de,value:_0x3d1ec5}of _0x25eb40[_0xf26aed(0x4cb)](_0xf26aed(0x1fa))){_0x37bf2c[_0xf26aed(0x2c6)]({'id':_0x4e31de,'name':_0x3d1ec5[_0xf26aed(0x5c0)]||_0xf26aed(0x2ed),'label':_0x3d1ec5[_0xf26aed(0x304)]||'(unset)','permissions':Array[_0xf26aed(0x4d8)](_0x3d1ec5[_0xf26aed(0x5ad)])?_0x3d1ec5[_0xf26aed(0x5ad)][_0xf26aed(0x60e)](','):'','created':_0x3d1ec5['createdAt']?new Date(_0x3d1ec5[_0xf26aed(0x2be)])['toISOString']()[_0xf26aed(0x20b)](0x0,0xa):''});}if(_0x37bf2c[_0xf26aed(0x246)]===0x0){console['log'](_0xf26aed(0x2b6));return;}const _0x7c7fff=!process[_0xf26aed(0x4dd)]['columns']||process[_0xf26aed(0x4dd)][_0xf26aed(0x409)]>=0x64,_0x1045d5=_0x7c7fff?0x24:0xa,_0x954031=['ID'[_0xf26aed(0x3b8)](_0x1045d5),_0xf26aed(0x5ea)[_0xf26aed(0x3b8)](0x10),'LABEL'[_0xf26aed(0x3b8)](0x14),'PERMISSIONS'[_0xf26aed(0x3b8)](0x14),_0xf26aed(0x587)][_0xf26aed(0x60e)]('\x20\x20');console[_0xf26aed(0x1f3)]('\x0a'+_0x954031),console[_0xf26aed(0x1f3)]('-'[_0xf26aed(0x5e3)](_0x954031['length']));for(const _0x572f76 of _0x37bf2c){const _0x30d1c7=_0x7c7fff?_0x572f76['id']:_0x572f76['id'][_0xf26aed(0x20b)](0x0,0x8)+'…';console[_0xf26aed(0x1f3)]([_0x30d1c7['padEnd'](_0x1045d5),_0x572f76['name']['slice'](0x0,0x10)[_0xf26aed(0x3b8)](0x10),_0x572f76[_0xf26aed(0x304)][_0xf26aed(0x20b)](0x0,0x14)[_0xf26aed(0x3b8)](0x14),_0x572f76[_0xf26aed(0x5ad)][_0xf26aed(0x20b)](0x0,0x14)[_0xf26aed(0x3b8)](0x14),_0x572f76[_0xf26aed(0x4d4)]][_0xf26aed(0x60e)]('\x20\x20'));}console[_0xf26aed(0x1f3)]('');}finally{await _0x62b1fc[_0xf26aed(0x577)]();}}async function _0x3bf788(_0x2a0ed9,_0x16f11d){const _0xed0987=_0x171ef3;!_0x2a0ed9&&(console[_0xed0987(0x2a2)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process['exit'](0x1));const _0x508fa2=require$$5,_0x345414=_0x219ced[_0xed0987(0x299)](_0x16f11d[_0xed0987(0x5b6)]),_0x3d3e07=new _0x508fa2(_0x345414,_0x1b5105(_0x16f11d));await _0x3d3e07[_0xed0987(0x3b7)]();try{const _0xdf1cb6=_0x3d3e07[_0xed0987(0x4a1)];(!_0xdf1cb6||!_0xdf1cb6[_0xed0987(0x4b1)](_0xed0987(0x1fa)))&&(console[_0xed0987(0x2a2)](_0xed0987(0x391)+_0x2a0ed9+'\x22'),process[_0xed0987(0x5f7)](0x1));let _0xfae8b3=null,_0x48af2a=null;const _0x582451=_0xdf1cb6['get']('~tokens',_0x2a0ed9);if(_0x582451)_0xfae8b3=_0x2a0ed9,_0x48af2a=_0x582451;else{const _0xb5f32c=[];for(const {key:_0x25a12f,value:_0x225f83}of _0xdf1cb6['getRange'](_0xed0987(0x1fa))){if(_0x25a12f['startsWith'](_0x2a0ed9))_0xb5f32c['push']({'key':_0x25a12f,'value':_0x225f83});}_0xb5f32c[_0xed0987(0x246)]===0x0&&(console[_0xed0987(0x2a2)](_0xed0987(0x391)+_0x2a0ed9+'\x22'),process[_0xed0987(0x5f7)](0x1));if(_0xb5f32c[_0xed0987(0x246)]>0x1){console[_0xed0987(0x2a2)](_0xed0987(0x54b)+_0x2a0ed9+_0xed0987(0x570)+_0xb5f32c['length']+_0xed0987(0x5a8));for(const _0x1a9aeb of _0xb5f32c){console[_0xed0987(0x2a2)]('\x20\x20'+_0x1a9aeb[_0xed0987(0x660)]+_0xed0987(0x614)+(_0x1a9aeb[_0xed0987(0x5b0)]['name']||_0xed0987(0x2ed))+')');}process[_0xed0987(0x5f7)](0x1);}_0xfae8b3=_0xb5f32c[0x0][_0xed0987(0x660)],_0x48af2a=_0xb5f32c[0x0][_0xed0987(0x5b0)];}await _0xdf1cb6[_0xed0987(0x492)](_0xed0987(0x1fa),_0xfae8b3),console[_0xed0987(0x1f3)](_0xed0987(0x3bb)+_0xfae8b3+_0xed0987(0x614)+(_0x48af2a['name']||'(unset)')+',\x20label:\x20'+(_0x48af2a['label']||_0xed0987(0x2ed))+')');}finally{await _0x3d3e07[_0xed0987(0x577)]();}}function _0x1ef827(_0x349e4a,_0x504086){const _0x47c6bd=_0x171ef3;if(!_0x349e4a['activation'])return _0x47c6bd(0x5a2);const _0x321a29=_0x349e4a[_0x47c6bd(0x462)];if(!_0x321a29)return _0x47c6bd(0x5b4);if(_0x504086>_0x321a29)return _0x47c6bd(0x2cf);return _0x47c6bd(0x5b4);}function _0x19609b(_0x4080eb){const _0x51dccd=_0x171ef3;if(!_0x4080eb||typeof _0x4080eb!==_0x51dccd(0x339))return'';const _0x300ea3=Object[_0x51dccd(0x248)](_0x4080eb)['filter'](([,_0x4b9206])=>_0x4b9206)['map'](([_0xdaa23])=>_0xdaa23);if(_0x300ea3['length']===0x0)return _0x51dccd(0x543);if(_0x300ea3['length']<=0x3)return _0x300ea3[_0x51dccd(0x60e)]('\x20');return _0x300ea3[_0x51dccd(0x20b)](0x0,0x3)[_0x51dccd(0x60e)]('\x20')+('\x20+'+(_0x300ea3[_0x51dccd(0x246)]-0x3));}async function _0x29a2cc(_0x1b158d){const _0xee1a1f=_0x171ef3,_0x3ce1f8=require$$5,_0x40c903=requireOkdbLicenseCodec(),{_C:_0x1ebeb4}=requireOkdbLicense(),_0x3f0667=_0x219ced[_0xee1a1f(0x299)](_0x1b158d[_0xee1a1f(0x5b6)]),_0x56ede4=new _0x3ce1f8(_0x3f0667,_0x1b5105(_0x1b158d));await _0x56ede4[_0xee1a1f(0x3b7)]();try{const _0x5ae95c=_0x56ede4[_0xee1a1f(0x4a1)],_0x4da458=_0x5ae95c?.['db']?.[_0xee1a1f(0x1fe)]?.(_0xee1a1f(0x1f5))??0x0,_0x43e995=[..._0x56ede4[_0xee1a1f(0x615)][_0xee1a1f(0x60b)]()][_0xee1a1f(0x629)](_0x3bd5a8=>!_0x3bd5a8[_0xee1a1f(0x4f7)]('~'))[_0xee1a1f(0x246)],_0x45c016=_0x56ede4[_0xee1a1f(0x656)]?.[_0xee1a1f(0x472)];if(_0x45c016){const _0x33051d=_0x45c016['_isFree']===!![],_0x581a56=_0x33051d?_0xee1a1f(0x44b):_0x56ede4[_0xee1a1f(0x656)][_0xee1a1f(0x5b4)]?.[_0xee1a1f(0x1f4)]||_0xee1a1f(0x436);console[_0xee1a1f(0x1f3)](''),console[_0xee1a1f(0x1f3)](_0xee1a1f(0x4b7)+_0x581a56);const _0x47213f=_0x45c016[_0xee1a1f(0x22a)]||{};if(_0x47213f[_0xee1a1f(0x2d4)]){const _0x272114=Math[_0xee1a1f(0x1cd)](_0x4da458/_0x47213f[_0xee1a1f(0x2d4)]*0x64);console[_0xee1a1f(0x1f3)](_0xee1a1f(0x52e)+_0x4da458['toLocaleString']()+_0xee1a1f(0x363)+_0x47213f['maxWrites'][_0xee1a1f(0x526)]()+_0xee1a1f(0x4d0)+_0x272114+'%)');}else console[_0xee1a1f(0x1f3)](_0xee1a1f(0x52e)+_0x4da458[_0xee1a1f(0x526)]());_0x47213f[_0xee1a1f(0x4b4)]?console[_0xee1a1f(0x1f3)](_0xee1a1f(0x3c3)+_0x43e995+_0xee1a1f(0x363)+_0x47213f[_0xee1a1f(0x4b4)]):console['log'](_0xee1a1f(0x3c3)+_0x43e995),_0x1ebeb4?.[_0xee1a1f(0x4c4)]&&console[_0xee1a1f(0x1f3)](_0xee1a1f(0x55e)+_0x1ebeb4[_0xee1a1f(0x4c4)]+_0xee1a1f(0x32a));}if(!_0x5ae95c||!_0x5ae95c[_0xee1a1f(0x4b1)](_0xee1a1f(0x26e))){console[_0xee1a1f(0x1f3)](''),console[_0xee1a1f(0x1f3)](_0xee1a1f(0x555)),console[_0xee1a1f(0x1f3)]('');return;}const _0x309e20=[],_0x1f5a4b=Date[_0xee1a1f(0x5cc)](),_0x231bf3=_0x56ede4['id'],_0xa888a0=_0xee1a1f(0x58b);for(const {key:_0x5d4d17,value:_0x4d4f1b}of _0x5ae95c[_0xee1a1f(0x4cb)](_0xee1a1f(0x26e))){const _0x27e4a4=_0x4d4f1b[_0xee1a1f(0x467)]?Buffer[_0xee1a1f(0x5f6)](_0x4d4f1b['_licenseHash'],_0xee1a1f(0x23d)):Buffer[_0xee1a1f(0x562)](0x8);let _0xeca91d='';try{_0xeca91d=_0x40c903[_0xee1a1f(0x52b)](_0x231bf3,_0x27e4a4,_0xa888a0)[_0xee1a1f(0x65e)];}catch{}_0x309e20[_0xee1a1f(0x2c6)]({'id':_0x5d4d17,'licensee':_0x4d4f1b[_0xee1a1f(0x1f4)]||'','expires':_0x4d4f1b['expiresAt']?new Date(_0x4d4f1b['expiresAt'])[_0xee1a1f(0x4ff)]()[_0xee1a1f(0x20b)](0x0,0xa):'','features':_0x19609b(_0x4d4f1b['features']),'pin':_0xeca91d,'status':_0x1ef827(_0x4d4f1b,_0x1f5a4b)});}if(_0x309e20['length']===0x0){console[_0xee1a1f(0x1f3)](''),console[_0xee1a1f(0x1f3)](_0xee1a1f(0x555)),console[_0xee1a1f(0x1f3)]('');return;}const _0x35401c=['\x20\x20'+'ID'[_0xee1a1f(0x3b8)](0xe),_0xee1a1f(0x40e)[_0xee1a1f(0x3b8)](0xe),_0xee1a1f(0x3c6)[_0xee1a1f(0x3b8)](0xc),_0xee1a1f(0x25d)[_0xee1a1f(0x3b8)](0x1e),_0xee1a1f(0x485)[_0xee1a1f(0x3b8)](0xa),_0xee1a1f(0x1cf)][_0xee1a1f(0x60e)]('\x20');console['log']('\x0a'+_0x35401c);for(const _0x5029d7 of _0x309e20){const _0x21a0f0=_0x5029d7['id'][_0xee1a1f(0x20b)](0x0,0x8)+'…';console['log'](['\x20\x20'+_0x21a0f0['padEnd'](0xe),_0x5029d7[_0xee1a1f(0x1f4)]['slice'](0x0,0xe)[_0xee1a1f(0x3b8)](0xe),_0x5029d7[_0xee1a1f(0x5f8)][_0xee1a1f(0x3b8)](0xc),_0x5029d7[_0xee1a1f(0x2fe)][_0xee1a1f(0x20b)](0x0,0x1e)[_0xee1a1f(0x3b8)](0x1e),_0x5029d7[_0xee1a1f(0x65e)][_0xee1a1f(0x3b8)](0xa),_0x5029d7[_0xee1a1f(0x278)]]['join']('\x20'));}console['log']('');}finally{await _0x56ede4[_0xee1a1f(0x577)]();}}async function _0x167ede(_0x2e287a,_0x10bfbc){const _0x5831ea=_0x171ef3,_0x3aea50=require$$5,_0x125947=requireOkdbLicenseCodec();let _0x44769d=_0x2e287a;(_0x125947[_0x5831ea(0x3d1)](_0x2e287a)===_0x5831ea(0x60a)||_0x27f300['existsSync'](_0x2e287a)&&_0x27f300[_0x5831ea(0x5bd)](_0x2e287a)['isFile']())&&(_0x44769d=_0x27f300['readFileSync'](_0x2e287a,_0x5831ea(0x50e))[_0x5831ea(0x431)]());const _0x30c730=_0x219ced['resolve'](_0x10bfbc['dbPath']),_0x1d42a8=new _0x3aea50(_0x30c730,_0x1b5105(_0x10bfbc));await _0x1d42a8[_0x5831ea(0x3b7)]();try{!_0x1d42a8[_0x5831ea(0x656)]&&(console[_0x5831ea(0x2a2)](_0x5831ea(0x2a5)),process[_0x5831ea(0x5f7)](0x1));let _0x4695c2;try{_0x4695c2=await _0x1d42a8[_0x5831ea(0x656)][_0x5831ea(0x5ac)](_0x44769d);}catch(_0x52c7b2){console[_0x5831ea(0x2a2)](_0x5831ea(0x556)+_0x52c7b2[_0x5831ea(0x453)]),process[_0x5831ea(0x5f7)](0x1);}const _0x4d242a=_0x1d42a8[_0x5831ea(0x656)]['getPins'](),_0x49e058=_0x4d242a[_0x5831ea(0x65b)](_0x417a5c=>_0x417a5c['licenseId']===_0x4695c2['id'])?.['pin']||'',_0x2b48f6=Object['entries'](_0x4695c2['features']||{})['filter'](([,_0x2b2a4c])=>_0x2b2a4c)[_0x5831ea(0x52f)](([_0xa3737])=>_0xa3737),_0x176691=_0x4695c2[_0x5831ea(0x22a)]||{},_0x30af69=[_0x176691[_0x5831ea(0x4b4)]?_0x5831ea(0x1b5)+_0x176691[_0x5831ea(0x4b4)]:null,_0x176691[_0x5831ea(0x282)]?_0x5831ea(0x49d)+_0x176691['typesPerEnv']:null,_0x176691['syncPeers']?'peers='+_0x176691[_0x5831ea(0x367)]:null,_0x176691[_0x5831ea(0x2d4)]?_0x5831ea(0x427)+_0x176691['maxWrites'][_0x5831ea(0x526)]():null][_0x5831ea(0x629)](Boolean)[_0x5831ea(0x60e)]('\x20\x20'),_0x5a55c3=_0x4695c2[_0x5831ea(0x204)]===_0x125947[_0x5831ea(0x4f2)];console['log'](_0x5831ea(0x1fd)),console[_0x5831ea(0x1f3)](_0x5831ea(0x3eb)+_0x4695c2['id']),console[_0x5831ea(0x1f3)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x4695c2[_0x5831ea(0x1f4)]),console[_0x5831ea(0x1f3)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x4695c2['expiresAt'])[_0x5831ea(0x4ff)]()[_0x5831ea(0x20b)](0x0,0xa)),console[_0x5831ea(0x1f3)](_0x5831ea(0x471)+(_0x2b48f6[_0x5831ea(0x60e)](',\x20')||_0x5831ea(0x543)));if(_0x30af69)console[_0x5831ea(0x1f3)](_0x5831ea(0x516)+_0x30af69);_0x5a55c3?(console[_0x5831ea(0x1f3)](_0x5831ea(0x40d)),console[_0x5831ea(0x1f3)]('')):(console[_0x5831ea(0x1f3)](_0x5831ea(0x4a6)+_0x49e058),console[_0x5831ea(0x1f3)](_0x5831ea(0x524)),console[_0x5831ea(0x1f3)](''),console[_0x5831ea(0x1f3)](_0x5831ea(0x272)),console['log']('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x49e058+')\x20to\x20your\x20license\x20vendor.'),console[_0x5831ea(0x1f3)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x5831ea(0x1f3)](_0x5831ea(0x23a)),console[_0x5831ea(0x1f3)](''));}finally{await _0x1d42a8[_0x5831ea(0x577)]();}}async function _0x5968a5(_0x575c20,_0x3fb09b){const _0x39cff7=_0x171ef3,_0x12240c=require$$5,_0x567329=_0x219ced[_0x39cff7(0x299)](_0x3fb09b[_0x39cff7(0x5b6)]),_0x5955cf=new _0x12240c(_0x567329,_0x1b5105(_0x3fb09b));await _0x5955cf[_0x39cff7(0x3b7)]();try{!_0x5955cf[_0x39cff7(0x656)]&&(console[_0x39cff7(0x2a2)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x39cff7(0x5f7)](0x1));let _0x463685;try{_0x463685=await _0x5955cf[_0x39cff7(0x656)]['activateLicense'](_0x575c20[_0x39cff7(0x431)]());}catch(_0x18835b){console[_0x39cff7(0x2a2)](_0x39cff7(0x556)+_0x18835b['message']),console['error'](''),console[_0x39cff7(0x2a2)](_0x39cff7(0x4d1)),console[_0x39cff7(0x2a2)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0x39cff7(0x2a2)](_0x39cff7(0x565)),console[_0x39cff7(0x2a2)](_0x39cff7(0x45b)),console[_0x39cff7(0x2a2)](''),process[_0x39cff7(0x5f7)](0x1);}console[_0x39cff7(0x1f3)]('\x0a\x20\x20✓\x20License\x20activated'),console[_0x39cff7(0x1f3)](_0x39cff7(0x3eb)+_0x463685['id']),console[_0x39cff7(0x1f3)](_0x39cff7(0x5b1)+_0x463685[_0x39cff7(0x1f4)]),console['log'](_0x39cff7(0x1c4)+new Date(_0x463685[_0x39cff7(0x462)])[_0x39cff7(0x4ff)]()[_0x39cff7(0x20b)](0x0,0xa)),console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console['log']('');}finally{await _0x5955cf['close']();}}async function _0x53e87c(_0x487b0d,_0x437e5d){const _0x43218d=_0x171ef3;!_0x487b0d&&(console[_0x43218d(0x2a2)]('[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument'),process[_0x43218d(0x5f7)](0x1));const _0x12c4a2=require$$5,_0x3360b3=requireOkdbLicenseCodec(),_0x245bd1=_0x219ced[_0x43218d(0x299)](_0x437e5d['dbPath']),_0x150fa6=new _0x12c4a2(_0x245bd1,_0x1b5105(_0x437e5d));await _0x150fa6['open']();try{const _0x56e65d=_0x150fa6[_0x43218d(0x4a1)];(!_0x56e65d||!_0x56e65d[_0x43218d(0x4b1)](_0x43218d(0x26e)))&&(console['error'](_0x43218d(0x1c7)+_0x487b0d+'\x22'),process[_0x43218d(0x5f7)](0x1));let _0x4e8240=null,_0x87b74c=null;const _0xe188af=_0x56e65d['get'](_0x43218d(0x26e),_0x487b0d);if(_0xe188af)_0x4e8240=_0x487b0d,_0x87b74c=_0xe188af;else{const _0xd7f84b=[];for(const {key:_0x20a5b0,value:_0x5871c9}of _0x56e65d[_0x43218d(0x4cb)](_0x43218d(0x26e))){if(_0x20a5b0[_0x43218d(0x4f7)](_0x487b0d))_0xd7f84b[_0x43218d(0x2c6)]({'key':_0x20a5b0,'value':_0x5871c9});}_0xd7f84b[_0x43218d(0x246)]===0x0&&(console[_0x43218d(0x2a2)](_0x43218d(0x1c7)+_0x487b0d+'\x22'),process[_0x43218d(0x5f7)](0x1)),_0xd7f84b[_0x43218d(0x246)]>0x1&&(console[_0x43218d(0x2a2)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x487b0d+_0x43218d(0x570)+_0xd7f84b[_0x43218d(0x246)]+_0x43218d(0x465)),process['exit'](0x1)),_0x4e8240=_0xd7f84b[0x0]['key'],_0x87b74c=_0xd7f84b[0x0][_0x43218d(0x5b0)];}const _0x37b84b=Date['now'](),_0x2fedf1=_0x1ef827(_0x87b74c,_0x37b84b),_0x1f7959=_0x150fa6['id'],_0x2f2b7a='__OKDB_PUB_FINGERPRINT__';let _0x7e9dff='';try{const _0x42606f=Buffer['from'](_0x87b74c[_0x43218d(0x467)],'hex');_0x7e9dff=_0x3360b3[_0x43218d(0x52b)](_0x1f7959,_0x42606f,_0x2f2b7a)[_0x43218d(0x65e)];}catch{}const _0x539984=_0x87b74c[_0x43218d(0x2fe)]?Object[_0x43218d(0x248)](_0x87b74c[_0x43218d(0x2fe)])[_0x43218d(0x629)](([,_0xfa8c01])=>_0xfa8c01)[_0x43218d(0x52f)](([_0x39d513])=>_0x39d513):[],_0x15ea85=_0x87b74c[_0x43218d(0x22a)]||{},_0x215b40=_0x56e65d?.['db']?.['get']?.(_0x43218d(0x1f5))??0x0,_0x3915b0=[..._0x150fa6['_envs'][_0x43218d(0x60b)]()]['filter'](_0x4a07db=>!_0x4a07db[_0x43218d(0x4f7)]('~'))['length'];console['log']('\x0a\x20\x20License\x20details:'),console[_0x43218d(0x1f3)](_0x43218d(0x3eb)+_0x4e8240),console[_0x43218d(0x1f3)](_0x43218d(0x5b1)+(_0x87b74c[_0x43218d(0x1f4)]||'')),console[_0x43218d(0x1f3)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x87b74c[_0x43218d(0x462)]?new Date(_0x87b74c[_0x43218d(0x462)])[_0x43218d(0x4ff)]()[_0x43218d(0x20b)](0x0,0xa):'')),console[_0x43218d(0x1f3)](_0x43218d(0x471)+(_0x539984[_0x43218d(0x60e)](',\x20')||_0x43218d(0x543))),console[_0x43218d(0x1f3)](_0x43218d(0x4a6)+_0x7e9dff),console[_0x43218d(0x1f3)](_0x43218d(0x666)+_0x2fedf1),console[_0x43218d(0x1f3)]('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x87b74c[_0x43218d(0x220)])[_0x43218d(0x4ff)]());if(_0x2fedf1==='active'){console[_0x43218d(0x1f3)](''),console[_0x43218d(0x1f3)](_0x43218d(0x477));if(_0x15ea85[_0x43218d(0x2d4)]){const _0x1777cd=Math[_0x43218d(0x1cd)](_0x215b40/_0x15ea85[_0x43218d(0x2d4)]*0x64);console[_0x43218d(0x1f3)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x215b40[_0x43218d(0x526)]()+_0x43218d(0x363)+_0x15ea85[_0x43218d(0x2d4)][_0x43218d(0x526)]()+_0x43218d(0x4d0)+_0x1777cd+'%)');}else console[_0x43218d(0x1f3)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x215b40[_0x43218d(0x526)]()+_0x43218d(0x459));_0x15ea85[_0x43218d(0x4b4)]?console[_0x43218d(0x1f3)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x3915b0+_0x43218d(0x363)+_0x15ea85['envs']):console[_0x43218d(0x1f3)](_0x43218d(0x5af)+_0x3915b0+_0x43218d(0x459));}console['log']('');}finally{await _0x150fa6[_0x43218d(0x577)]();}}async function _0x400c2a(_0x93c947,_0x207620){const _0x2ac436=_0x171ef3;!_0x93c947&&(console[_0x2ac436(0x2a2)]('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x2ac436(0x5f7)](0x1));const _0x19b7d5=require$$5,_0x1cc703=_0x219ced[_0x2ac436(0x299)](_0x207620[_0x2ac436(0x5b6)]),_0x10eab8=new _0x19b7d5(_0x1cc703,_0x1b5105(_0x207620));await _0x10eab8[_0x2ac436(0x3b7)]();try{const _0x1fc542=_0x10eab8[_0x2ac436(0x4a1)];(!_0x1fc542||!_0x1fc542[_0x2ac436(0x4b1)](_0x2ac436(0x26e)))&&(console['error'](_0x2ac436(0x1c7)+_0x93c947+'\x22'),process[_0x2ac436(0x5f7)](0x1));let _0x4feaa6=null,_0xbcca8a=null;const _0x2dab43=_0x1fc542[_0x2ac436(0x1fe)]('~licenses',_0x93c947);if(_0x2dab43)_0x4feaa6=_0x93c947,_0xbcca8a=_0x2dab43;else{const _0x7578f8=[];for(const {key:_0x1c7ca4,value:_0x130966}of _0x1fc542[_0x2ac436(0x4cb)](_0x2ac436(0x26e))){if(_0x1c7ca4[_0x2ac436(0x4f7)](_0x93c947))_0x7578f8[_0x2ac436(0x2c6)]({'key':_0x1c7ca4,'value':_0x130966});}_0x7578f8[_0x2ac436(0x246)]===0x0&&(console[_0x2ac436(0x2a2)](_0x2ac436(0x1c7)+_0x93c947+'\x22'),process['exit'](0x1)),_0x7578f8['length']>0x1&&(console[_0x2ac436(0x2a2)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x93c947+_0x2ac436(0x570)+_0x7578f8[_0x2ac436(0x246)]+_0x2ac436(0x465)),process['exit'](0x1)),_0x4feaa6=_0x7578f8[0x0]['key'],_0xbcca8a=_0x7578f8[0x0][_0x2ac436(0x5b0)];}await _0x1fc542[_0x2ac436(0x492)](_0x2ac436(0x26e),_0x4feaa6),console[_0x2ac436(0x1f3)]('\x20\x20✓\x20Removed\x20license\x20'+_0x4feaa6+_0x2ac436(0x333)+(_0xbcca8a[_0x2ac436(0x1f4)]||_0x2ac436(0x2ed))+')');}finally{await _0x10eab8[_0x2ac436(0x577)]();}}async function _0x28909d(_0x1afefb,_0x55bf8d,_0x10b09c){const _0x2639dd=_0x171ef3;!_0x1afefb&&(console[_0x2639dd(0x2a2)](_0x2639dd(0x1ec)),process['exit'](0x1));!_0x10b09c[_0x2639dd(0x249)]&&!(_0x10b09c['username']&&_0x10b09c[_0x2639dd(0x1e7)])&&(console[_0x2639dd(0x2a2)](_0x2639dd(0x34f)),process[_0x2639dd(0x5f7)](0x1));const _0xa32e4d=_0x10b09c['selfAddress']||_0x55bf8d[_0x2639dd(0x617)]?.[_0x2639dd(0x1e4)];!_0xa32e4d&&(console[_0x2639dd(0x2a2)](_0x2639dd(0x5b8)+_0x2639dd(0x5fd)+_0x2639dd(0x1e8)),process[_0x2639dd(0x5f7)](0x1));const _0x3f01bb=require$$5,_0x372ed8=new _0x3f01bb(_0x55bf8d[_0x2639dd(0x5b6)],{'sync':{'address':_0xa32e4d,'auto_reconcile':![]}});await _0x372ed8[_0x2639dd(0x3b7)]();try{const _0x3cd839=_0x372ed8[_0x2639dd(0x4a1)];if(_0x3cd839&&_0x3cd839[_0x2639dd(0x4b1)](_0x2639dd(0x1fa))){let _0x545904=![];for(const _0x51670c of _0x3cd839[_0x2639dd(0x4cb)](_0x2639dd(0x1fa))){_0x545904=!![];break;}_0x545904&&console['log']('\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a'+_0x2639dd(0x335));}console[_0x2639dd(0x1f3)](_0x2639dd(0x48c)+_0x1afefb+'…'),await _0x372ed8[_0x2639dd(0x617)][_0x2639dd(0x60e)](_0x1afefb['replace'](/\/+$/,''),{'token':_0x10b09c[_0x2639dd(0x249)],'username':_0x10b09c[_0x2639dd(0x5d3)],'password':_0x10b09c[_0x2639dd(0x1e7)]}),console[_0x2639dd(0x1f3)]('\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated'),console[_0x2639dd(0x1f3)](_0x2639dd(0x41b));}finally{await _0x372ed8['close']();}}async function _0xe06528(){const _0x3f2b17=_0x171ef3,_0x14d451=Date['now'](),_0x3c4a93=_0x5b8be3(process[_0x3f2b17(0x3a1)]),_0x2f99d8=_0x26e511(_0x3c4a93),_0x34b41c=_0x219ced[_0x3f2b17(0x299)](_0x2f99d8['dbPath']);!_0x2f99d8['noRepl']&&!process[_0x3f2b17(0x2cd)]['isTTY']&&(_0x2f99d8[_0x3f2b17(0x2a6)]=!![]);const _0x35dab2=require$$5,{start:_0x361b28,colorLog:_0x789f13}=requireOkdbShell(),_0x521625=require$$1$2,_0x3f6f94={..._0x2f99d8['key']?{'encryptionKey':_0x2f99d8[_0x3f2b17(0x660)]}:{},..._0x2f99d8[_0x3f2b17(0x32c)]?{'admin':![]}:_0x49b49c(_0x2f99d8[_0x3f2b17(0x669)])?{'admin':_0x2f99d8[_0x3f2b17(0x669)]}:{},..._0x49b49c(_0x2f99d8[_0x3f2b17(0x4bd)])?{'api':_0x2f99d8['api']}:{},..._0x49b49c(_0x2f99d8[_0x3f2b17(0x508)])?{'auth':_0x2f99d8[_0x3f2b17(0x508)]}:{},..._0x49b49c(_0x2f99d8[_0x3f2b17(0x3bf)])?{'mcp':_0x2f99d8[_0x3f2b17(0x3bf)]}:{},..._0x2f99d8[_0x3f2b17(0x331)]!==![]?{'timeMachine':_0x2f99d8[_0x3f2b17(0x331)]}:{}},_0x414081=_0x480cde(_0x2f99d8);if(!_0x521625[_0x3f2b17(0x2e1)]){const _0xd13d01=_0x643a7d(),_0x2700f4=_0x2f99d8[_0x3f2b17(0x26c)]?_0x3f2b17(0x421):_0x2f99d8['workersFlag']!=null&&_0x2f99d8[_0x3f2b17(0x461)]!==''?_0x3f2b17(0x3e4):process.env.OKDB_HTTP_WORKERS?_0x3f2b17(0x30a):_0x2f99d8[_0x3f2b17(0x4f0)]?.[_0x3f2b17(0x5f2)]!=null?_0x3f2b17(0x3ba):_0x3f2b17(0x1db)+Math[_0x3f2b17(0x4ca)](0x1,require$$0[_0x3f2b17(0x636)]()['length']-0x1);process[_0x3f2b17(0x4dd)][_0x3f2b17(0x4ae)]('[okdb]\x20http\x20workers:\x20'+_0x414081+'\x20('+_0x2700f4+(!_0xd13d01?_0x3f2b17(0x582):'')+')\x0a');}if(_0x521625[_0x3f2b17(0x2e1)]){const _0x2678c8={..._0x3f6f94},_0x547ec9=new _0x35dab2(_0x34b41c,_0x2678c8);_0x547ec9[_0x3f2b17(0x1f3)][_0x3f2b17(0x520)]?.();const _0x4906b0=process.env.OKDB_CLUSTER_SLOT??'?',_0xd99321={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x578d98=_0xd99321[_0x2f99d8[_0x3f2b17(0x3df)]]??_0xd99321[_0x3f2b17(0x1bb)];_0x547ec9['log']['attach'](_0x71b702=>{const _0x586293=_0x3f2b17;if((_0xd99321[_0x71b702['level']]??0x1)<_0x578d98)return;try{process[_0x586293(0x2d7)]?.({'__okdbCluster':_0x586293(0x1f3),'slot':_0x4906b0,'pid':process[_0x586293(0x53a)],'entry':_0x71b702});}catch{}}),await _0x547ec9[_0x3f2b17(0x3b7)]();const {attachWorkerCluster:_0x3e6655}=requireOkdbCluster();_0x3e6655(_0x547ec9),await _0x263443(_0x547ec9,_0x2f99d8[_0x3f2b17(0x20f)]);return;}if(_0x414081>0x1){const {runClustered:_0x237dc2}=requireOkdbCluster(),_0x167800=new _0x35dab2(_0x34b41c,{..._0x3f6f94,'engines':![],'processors':![],'compaction':![]});await _0x167800[_0x3f2b17(0x3b7)]();const _0x4bbd83=async()=>{const _0x81fd56=_0x3f2b17,_0x47714c=new _0x35dab2(_0x34b41c,{..._0x3f6f94});return await _0x47714c[_0x81fd56(0x3b7)](),_0x47714c;},_0x55aed3=_0x237dc2({'workers':_0x414081,'makeOkdb':_0x4bbd83,'port':_0x2f99d8[_0x3f2b17(0x20f)],'primaryOkdb':_0x167800});let _0x34f683=![];async function _0x5c1507(_0x172b86){const _0x452be2=_0x3f2b17;_0x34f683&&(process[_0x452be2(0x504)][_0x452be2(0x4ae)](_0x452be2(0x4aa)),process[_0x452be2(0x5f7)](0x82));_0x34f683=!![],process[_0x452be2(0x504)]['write'](_0x452be2(0x64f)+(_0x172b86||'shutdown')+_0x452be2(0x5c4));const _0x35c68e=setTimeout(()=>{const _0x2eeb47=_0x452be2;process[_0x2eeb47(0x504)]['write'](_0x2eeb47(0x506)),process[_0x2eeb47(0x5f7)](0x0);},0xbb8);_0x35c68e[_0x452be2(0x476)]?.();try{await _0x55aed3['close']();}catch(_0x1129a6){process[_0x452be2(0x504)][_0x452be2(0x4ae)](_0x452be2(0x4eb)+(_0x1129a6?.[_0x452be2(0x453)]??_0x1129a6)+'\x0a');}try{await _0x167800[_0x452be2(0x577)]();}catch(_0x1380a2){process[_0x452be2(0x504)][_0x452be2(0x4ae)](_0x452be2(0x424)+(_0x1380a2?.[_0x452be2(0x453)]??_0x1380a2)+'\x0a');}process[_0x452be2(0x5f7)](0x0);}_0x2f99d8[_0x3f2b17(0x4bf)]=_0x414081;if(!_0x2f99d8['noRepl']){_0x167800[_0x3f2b17(0x1f3)]['detachConsole']?.(),_0x38fd24(_0x167800[_0x3f2b17(0x508)]?.['getSecurityNotices']?.()??[]),await _0x361b28(_0x167800,_0x2f99d8);return;}process[_0x3f2b17(0x4dd)]['write'](_0x3f2b17(0x56f)+process[_0x3f2b17(0x53a)]+_0x3f2b17(0x443)+_0x414081+'\x20'+(_0x3f2b17(0x306)+_0x2f99d8[_0x3f2b17(0x20f)]+'\x0a')),console[_0x3f2b17(0x1f3)](''),console[_0x3f2b17(0x1f3)]('\x20\x20✓\x20OKDB\x20cluster\x20running'),console['log'](_0x3f2b17(0x3e3)+_0x2f99d8['port']+_0x3f2b17(0x4d0)+_0x414081+_0x3f2b17(0x590)),console[_0x3f2b17(0x1f3)](_0x3f2b17(0x2f5)+_0x34b41c),console['log'](_0x3f2b17(0x558)+_0x167800['id']),console[_0x3f2b17(0x1f3)]('\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:'+_0x2f99d8[_0x3f2b17(0x20f)]+_0x3f2b17(0x370));!_0x2f99d8[_0x3f2b17(0x32c)]&&console[_0x3f2b17(0x1f3)]('\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:'+_0x2f99d8[_0x3f2b17(0x20f)]+_0x3f2b17(0x5d8));console[_0x3f2b17(0x1f3)](''),_0x38fd24(_0x167800[_0x3f2b17(0x508)]?.['getSecurityNotices']?.()??[]),process['on']('SIGINT',()=>_0x5c1507(_0x3f2b17(0x1d8))),process['on'](_0x3f2b17(0x1b9),()=>_0x5c1507(_0x3f2b17(0x1b9))),process['on']('SIGBREAK',()=>_0x5c1507('SIGBREAK'));return;}const _0x27daf3=new _0x35dab2(_0x34b41c,_0x3f6f94);_0x27daf3['log'][_0x3f2b17(0x520)]?.();const _0x48ed59=_0x27daf3[_0x3f2b17(0x1f3)][_0x3f2b17(0x318)](_0x4b5084=>_0x789f13(_0x4b5084,_0x2f99d8[_0x3f2b17(0x3df)]));if(_0x2f99d8['noRepl'])process[_0x3f2b17(0x4dd)][_0x3f2b17(0x4ae)](_0x3f2b17(0x456));await _0x27daf3[_0x3f2b17(0x3b7)]();if(_0x2f99d8[_0x3f2b17(0x2a6)])process[_0x3f2b17(0x4dd)][_0x3f2b17(0x4ae)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x263443(_0x27daf3,_0x2f99d8[_0x3f2b17(0x20f)]);}catch(_0x300a90){_0x300a90['code']==='EADDRINUSE'&&(console['error']('[okdb]\x20port\x20'+_0x2f99d8['port']+_0x3f2b17(0x522)),process[_0x3f2b17(0x5f7)](0x1));throw _0x300a90;}if(_0x2f99d8['noRepl'])process[_0x3f2b17(0x4dd)][_0x3f2b17(0x4ae)](_0x3f2b17(0x645)+_0x2f99d8[_0x3f2b17(0x20f)]+'\x0a');if(!_0x2f99d8[_0x3f2b17(0x2a6)])_0x27daf3['log'][_0x3f2b17(0x520)]?.(),_0x48ed59?.(),_0x38fd24(_0x27daf3['auth']?.[_0x3f2b17(0x310)]?.()??[]),await _0x361b28(_0x27daf3,_0x2f99d8);else{const _0x5b7707=_0x219ced[_0x3f2b17(0x60e)](_0x34b41c,_0x3f2b17(0x1bd));try{_0x27f300[_0x3f2b17(0x222)](_0x5b7707,String(process[_0x3f2b17(0x53a)]));}catch{}const _0x1af5eb=Date[_0x3f2b17(0x5cc)]()-_0x14d451;console['log'](''),console[_0x3f2b17(0x1f3)](_0x3f2b17(0x232)),console[_0x3f2b17(0x1f3)](_0x3f2b17(0x414)+_0x2f99d8[_0x3f2b17(0x20f)]),console['log']('\x20\x20\x20\x20path:\x20\x20'+_0x34b41c),console['log'](_0x3f2b17(0x3b2)+_0x27daf3['id']);{const _0xde8130=_0x27daf3['_systemEnv']?.['db']?.[_0x3f2b17(0x1fe)]?.(_0x3f2b17(0x1f5))??0x0,_0x3e532b=[..._0x27daf3[_0x3f2b17(0x615)][_0x3f2b17(0x60b)]()][_0x3f2b17(0x629)](_0x1b7cbe=>!_0x1b7cbe[_0x3f2b17(0x4f7)]('~'))['length'];if(_0x27daf3[_0x3f2b17(0x656)]?.[_0x3f2b17(0x5b4)]?.[_0x3f2b17(0x204)]===0x1){const _0x29817a=Math['ceil']((_0x27daf3[_0x3f2b17(0x656)][_0x3f2b17(0x5b4)][_0x3f2b17(0x462)]-Date['now']())/0x5265c00);console[_0x3f2b17(0x1f3)]('\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20'+_0x27daf3[_0x3f2b17(0x656)][_0x3f2b17(0x5b4)][_0x3f2b17(0x1f4)]+_0x3f2b17(0x20a)+_0x29817a+_0x3f2b17(0x4a9));}else{if(_0x27daf3[_0x3f2b17(0x656)]?.[_0x3f2b17(0x5b4)]){const _0x5822a2=_0x27daf3['_license'][_0x3f2b17(0x5b4)];console[_0x3f2b17(0x1f3)](_0x3f2b17(0x5b7)+_0x5822a2['licensee']+_0x3f2b17(0x3fd)+new Date(_0x5822a2[_0x3f2b17(0x462)])[_0x3f2b17(0x4ff)]()[_0x3f2b17(0x20b)](0x0,0xa)+')');const _0x38026e=_0x5822a2[_0x3f2b17(0x22a)]||{};if(_0x38026e['maxWrites']){const _0xf26c31=Math[_0x3f2b17(0x1cd)](_0xde8130/_0x38026e[_0x3f2b17(0x2d4)]*0x64);console[_0x3f2b17(0x1f3)](_0x3f2b17(0x276)+_0xde8130[_0x3f2b17(0x526)]()+_0x3f2b17(0x363)+_0x38026e[_0x3f2b17(0x2d4)]['toLocaleString']()+_0x3f2b17(0x386)+_0xf26c31+'%),\x20'+_0x3e532b+(_0x38026e['envs']?'/'+_0x38026e[_0x3f2b17(0x4b4)]:'')+_0x3f2b17(0x4d3)+(_0x3e532b===0x1?'':'s'));}}else{if(_0x27daf3[_0x3f2b17(0x656)]){const _0x5c859e=_0x27daf3['_license']['getPins'](),_0xd58f5c=_0x5c859e['length']?_0x5c859e[_0x3f2b17(0x52f)](_0x41a26a=>_0x41a26a[_0x3f2b17(0x65e)])[_0x3f2b17(0x60e)](',\x20'):_0x3f2b17(0x603),_0x50bf04=_0x27daf3[_0x3f2b17(0x656)][_0x3f2b17(0x472)],_0x36564e=_0x50bf04['limits'][_0x3f2b17(0x2d4)]?Math[_0x3f2b17(0x1cd)](_0xde8130/_0x50bf04[_0x3f2b17(0x22a)][_0x3f2b17(0x2d4)]*0x64):0x0;console['log'](_0x3f2b17(0x50a)),console[_0x3f2b17(0x1f3)](_0x3f2b17(0x276)+_0xde8130[_0x3f2b17(0x526)]()+_0x3f2b17(0x363)+_0x50bf04[_0x3f2b17(0x22a)][_0x3f2b17(0x2d4)]['toLocaleString']()+_0x3f2b17(0x386)+_0x36564e+_0x3f2b17(0x2f2)+_0x3e532b+'\x20/\x20'+_0x50bf04[_0x3f2b17(0x22a)]['envs']+_0x3f2b17(0x48b)),console[_0x3f2b17(0x1f3)](_0x3f2b17(0x513)+_0xd58f5c);}}}}console[_0x3f2b17(0x1f3)](_0x3f2b17(0x21f)+_0x2f99d8[_0x3f2b17(0x20f)]+_0x3f2b17(0x370));!_0x2f99d8[_0x3f2b17(0x32c)]&&console['log'](_0x3f2b17(0x3f0)+_0x2f99d8[_0x3f2b17(0x20f)]+_0x3f2b17(0x5d8));console[_0x3f2b17(0x1f3)](''),console['log'](_0x3f2b17(0x2dd)+_0x1af5eb+'ms'),_0x38fd24(_0x27daf3[_0x3f2b17(0x508)]?.[_0x3f2b17(0x310)]?.()??[]);let _0x463859=![];async function _0x222ab2(_0x22394f){const _0x3dacce=_0x3f2b17;_0x463859&&(process[_0x3dacce(0x504)][_0x3dacce(0x4ae)](_0x3dacce(0x4aa)),process[_0x3dacce(0x5f7)](0x82));_0x463859=!![],process['stderr'][_0x3dacce(0x4ae)](_0x3dacce(0x64f)+(_0x22394f||_0x3dacce(0x253))+_0x3dacce(0x655));const _0xce8d78=setTimeout(()=>{const _0x990c4c=_0x3dacce;process[_0x990c4c(0x504)][_0x990c4c(0x4ae)]('[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a'),process[_0x990c4c(0x5f7)](0x1);},0x1388);try{_0x27f300[_0x3dacce(0x291)](_0x5b7707);}catch{}try{await _0x27daf3[_0x3dacce(0x577)]();}catch(_0x49885c){process[_0x3dacce(0x504)][_0x3dacce(0x4ae)](_0x3dacce(0x334)+(_0x49885c?.['message']??_0x49885c)+'\x0a');}clearTimeout(_0xce8d78),process['stderr'][_0x3dacce(0x4ae)](_0x3dacce(0x2e2)),process[_0x3dacce(0x5f7)](0x0);}process['on']('SIGINT',()=>_0x222ab2(_0x3f2b17(0x1d8))),process['on'](_0x3f2b17(0x1b9),()=>_0x222ab2(_0x3f2b17(0x1b9))),process['on'](_0x3f2b17(0x668),()=>_0x222ab2('SIGBREAK'));}}const _0x29c37a=new Set([_0x171ef3(0x42c),_0x171ef3(0x1cb),_0x171ef3(0x24d),'backup',_0x171ef3(0x1c9),_0x171ef3(0x539),'reset','token','join',_0x171ef3(0x63a)]),_0x4bb768=process[_0x171ef3(0x3a1)][0x2];if(_0x4bb768===_0x171ef3(0x42c))console[_0x171ef3(0x1f3)](require$$3['version']),process[_0x171ef3(0x5f7)](0x0);else{if(_0x4bb768&&_0x29c37a[_0x171ef3(0x510)](_0x4bb768)){const _0x4633bf=process[_0x171ef3(0x3a1)][_0x171ef3(0x20b)](0x3),_0x5879fb=_0x5b8be3([_0x171ef3(0x58e),_0x171ef3(0x25a),..._0x4633bf]),_0x3acac8=_0x26e511(_0x5879fb),_0x53dfb5=new Set([_0x171ef3(0x48f),'-d',_0x171ef3(0x2b7),'-k',_0x171ef3(0x445),'-c',_0x171ef3(0x1ab),'-p',_0x171ef3(0x287),'--env','-e',_0x171ef3(0x46a),_0x171ef3(0x5ef),_0x171ef3(0x4bc),_0x171ef3(0x503),_0x171ef3(0x395),_0x171ef3(0x239),'--ttl','--token',_0x171ef3(0x1dc),'-u',_0x171ef3(0x261)]);let _0x51d536=null;for(let _0x500115=0x0;_0x500115<_0x4633bf['length'];_0x500115++){if(_0x53dfb5[_0x171ef3(0x510)](_0x4633bf[_0x500115])){_0x500115++;continue;}if(!_0x4633bf[_0x500115]['startsWith']('-')){_0x51d536=_0x4633bf[_0x500115];break;}}(async()=>{const _0x27d624=_0x171ef3;if(_0x4bb768===_0x27d624(0x249)){const _0xcf9702=process[_0x27d624(0x3a1)][0x3],_0x652212=process[_0x27d624(0x3a1)][_0x27d624(0x20b)](0x4),_0xed35eb=_0x5b8be3([_0x27d624(0x58e),'okdb',..._0x652212]),_0x48ba87=_0x26e511(_0xed35eb),_0x410202=new Set([_0x27d624(0x48f),'-d',_0x27d624(0x2b7),'-k',_0x27d624(0x445),'-c','--port','-p','--name',_0x27d624(0x4bc),'--label','--permissions',_0x27d624(0x239),'--ttl',_0x27d624(0x287),_0x27d624(0x2e8),'-e',_0x27d624(0x46a)]),_0x133d68=[];for(let _0x110697=0x0;_0x110697<_0x652212[_0x27d624(0x246)];_0x110697++){if(_0x410202[_0x27d624(0x510)](_0x652212[_0x110697])){_0x110697++;continue;}if(_0x652212[_0x110697][_0x27d624(0x4f7)]('-'))continue;_0x133d68['push'](_0x652212[_0x110697]);}switch(_0xcf9702){case _0x27d624(0x47f):await _0x11d61e(_0x48ba87,_0xed35eb);break;case _0x27d624(0x2e5):await _0x416744(_0x48ba87);break;case'revoke':await _0x3bf788(_0x133d68[0x0],_0x48ba87);break;default:console[_0x27d624(0x2a2)](_0x27d624(0x530)+_0xcf9702+_0x27d624(0x31b)),process[_0x27d624(0x5f7)](0x1);}return;}if(_0x4bb768===_0x27d624(0x63a)){const _0x5bc2e4=requireOkdbLicenseCodec(),_0x906076=process[_0x27d624(0x3a1)]['slice'](0x3),_0x4d9cbf=_0x5b8be3([_0x27d624(0x58e),_0x27d624(0x25a),..._0x906076]),_0xc0f92c=_0x26e511(_0x4d9cbf),_0x2c7683=new Set([_0x27d624(0x48f),'-d',_0x27d624(0x2b7),'-k',_0x27d624(0x445),'-c','--port','-p',_0x27d624(0x287)]),_0x3c2f5b=[];for(let _0xe4b47c=0x0;_0xe4b47c<_0x906076['length'];_0xe4b47c++){if(_0x2c7683[_0x27d624(0x510)](_0x906076[_0xe4b47c])){_0xe4b47c++;continue;}if(_0x906076[_0xe4b47c]['startsWith']('-'))continue;_0x3c2f5b['push'](_0x906076[_0xe4b47c]);}const _0x59f44a=_0x3c2f5b[0x0]??null;if(_0x59f44a===_0x27d624(0x492))await _0x400c2a(_0x3c2f5b[0x1],_0xc0f92c);else{if(!_0x59f44a)await _0x29a2cc(_0xc0f92c);else{let _0x5d2ee6=_0x5bc2e4[_0x27d624(0x3d1)](_0x59f44a);if(_0x5d2ee6===_0x27d624(0x2d5)&&_0x27f300[_0x27d624(0x32f)](_0x59f44a))_0x5d2ee6=_0x27d624(0x60a);if(_0x5d2ee6==='path')try{const _0xc342a0=_0x27f300[_0x27d624(0x591)](_0x59f44a,_0x27d624(0x50e))[_0x27d624(0x431)](),_0x5ca793=_0x5bc2e4['detectInputType'](_0xc342a0);if(_0x5ca793==='activation'){await _0x5968a5(_0xc342a0,_0xc0f92c);return;}await _0x167ede(_0x59f44a,_0xc0f92c);return;}catch(_0x553275){console[_0x27d624(0x2a2)](_0x27d624(0x512)+_0x59f44a+':\x20'+_0x553275[_0x27d624(0x453)]),process[_0x27d624(0x5f7)](0x1);}switch(_0x5d2ee6){case _0x27d624(0x34b):await _0x167ede(_0x59f44a,_0xc0f92c);break;case _0x27d624(0x1c1):await _0x5968a5(_0x59f44a,_0xc0f92c);break;case _0x27d624(0x448):await _0x53e87c(_0x59f44a,_0xc0f92c);break;default:console[_0x27d624(0x2a2)](_0x27d624(0x5b2)+_0x59f44a+'\x22'),console[_0x27d624(0x2a2)](''),console[_0x27d624(0x2a2)](_0x27d624(0x44a)),console['error'](_0x27d624(0x5ff)),console['error'](_0x27d624(0x1bc)),console[_0x27d624(0x2a2)]('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console['error'](_0x27d624(0x641)),console[_0x27d624(0x2a2)](''),console[_0x27d624(0x2a2)]('\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]'),process['exit'](0x1);}}}return;}switch(_0x4bb768){case'doctor':await _0x3645a2(_0x3acac8);break;case _0x27d624(0x24d):await _0x4843fa();break;case _0x27d624(0x413):await _0x16f3c7(_0x3acac8);break;case _0x27d624(0x588):await _0x344ee2(_0x51d536??_0x219ced['resolve'](_0x27d624(0x5d4)),_0x3acac8);break;case _0x27d624(0x1c9):await _0x259c16(_0x51d536??_0x219ced[_0x27d624(0x299)](_0x27d624(0x1e3)),_0x3acac8,_0x5879fb);break;case _0x27d624(0x539):await _0x264ec0(_0x51d536??_0x219ced[_0x27d624(0x299)](_0x27d624(0x1e3)),_0x3acac8,_0x5879fb);break;case'join':await _0x28909d(_0x51d536,_0x3acac8,_0x5879fb);break;}})()[_0x171ef3(0x55f)](()=>process[_0x171ef3(0x5f7)](0x0))['catch'](_0x325a9c=>{const _0x57b9ed=_0x171ef3;console['error'](_0x57b9ed(0x351)+(_0x325a9c['message']||_0x325a9c)+'\x0a'),process[_0x57b9ed(0x5f7)](0x1);});}else _0xe06528()['catch'](_0x35e21e=>{const _0x295ee1=_0x171ef3;console[_0x295ee1(0x2a2)](_0x295ee1(0x280)),console[_0x295ee1(0x2a2)](_0x35e21e['stack']||_0x35e21e),process[_0x295ee1(0x5f7)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x38fa5f(0x368)]=okdb;