@kedem/okdb 1.6.0 → 1.6.1

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.
Files changed (3) hide show
  1. package/bin/okdb.js +1 -1
  2. package/okdb.js +1 -1
  3. package/package.json +1 -1
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x152c38=_0x1dd2;(function(_0x5bc889,_0x18bc78){const _0x560efe=_0x1dd2,_0x1d52ed=_0x5bc889();while(!![]){try{const _0xb2dfff=-parseInt(_0x560efe(0x11e))/0x1*(parseInt(_0x560efe(0x2ac))/0x2)+parseInt(_0x560efe(0x313))/0x3+parseInt(_0x560efe(0x2d1))/0x4*(-parseInt(_0x560efe(0x176))/0x5)+parseInt(_0x560efe(0x2a7))/0x6+-parseInt(_0x560efe(0x273))/0x7+parseInt(_0x560efe(0x144))/0x8+-parseInt(_0x560efe(0x33a))/0x9;if(_0xb2dfff===_0x18bc78)break;else _0x1d52ed['push'](_0x1d52ed['shift']());}catch(_0x4b8284){_0x1d52ed['push'](_0x1d52ed['shift']());}}}(_0x18ba,0xe597d));var require$$1$1=require('path'),require$$1=require('fs'),require$$3=require('net'),require$$0$2=require(_0x152c38(0x1fd)),require$$5=require(_0x152c38(0x382)),require$$0=require(_0x152c38(0xc5)),require$$0$1=require(_0x152c38(0xa9)),require$$2$1=require('os'),require$$4=require(_0x152c38(0x308));function getDefaultExportFromCjs(_0x4fc338){const _0x10a0ec=_0x152c38;return _0x4fc338&&_0x4fc338[_0x10a0ec(0x26d)]&&Object[_0x10a0ec(0x285)][_0x10a0ec(0x336)][_0x10a0ec(0xb4)](_0x4fc338,'default')?_0x4fc338['default']:_0x4fc338;}var okdb$1={},version=_0x152c38(0x1d9),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x54125b=require$$0;function _0x387f5a(_0x2c5359,_0x47f70d){const _0x3defb1=_0x1dd2;return _0x54125b[_0x3defb1(0x2f2)](_0x3defb1(0xa0),_0x47f70d)[_0x3defb1(0x2a3)](_0x2c5359)[_0x3defb1(0x20f)](_0x3defb1(0x1a1));}function _0xfdc848(_0x227835,_0x1ba3c6){const _0x1e0186=_0x1dd2;if(typeof _0x227835!=='string'||typeof _0x1ba3c6!==_0x1e0186(0x2f3))return![];if(Buffer[_0x1e0186(0x24c)](_0x227835)!==Buffer[_0x1e0186(0x24c)](_0x1ba3c6))return![];return _0x54125b[_0x1e0186(0x263)](Buffer[_0x1e0186(0xb5)](_0x227835),Buffer[_0x1e0186(0xb5)](_0x1ba3c6));}function _0x140b61(_0x43528a){const _0x465d39=_0x1dd2;if(!_0x43528a?.[_0x465d39(0x1ef)](_0x465d39(0x180)))return null;return _0x43528a[_0x465d39(0x341)](0x7);}function _0xe089ba(_0x538693=0x20){const _0x2a4388=_0x1dd2;return _0x54125b[_0x2a4388(0x2aa)](_0x538693)[_0x2a4388(0x350)](_0x2a4388(0x1a1));}function _0x565686(_0x78c538){const _0x13c1ae=_0x1dd2;return _0x54125b[_0x13c1ae(0x160)](_0x13c1ae(0xa0))['update'](_0x78c538)[_0x13c1ae(0x20f)](_0x13c1ae(0x360));}function _0x11b2fb(_0x351bca,_0x24bc6b,_0x3c6787=0x36ee80){const _0x4923b7=_0x1dd2;if(!_0x24bc6b)throw new Error(_0x4923b7(0x345));const _0x4fa4fe=Date['now'](),_0x67b49b=Buffer[_0x4923b7(0xb5)](JSON[_0x4923b7(0xf3)]({'iat':_0x4fa4fe,'exp':_0x4fa4fe+_0x3c6787,'sub':_0x351bca?.['id']??_0x351bca?.[_0x4923b7(0x2b0)]??null,'username':_0x351bca?.[_0x4923b7(0x1c2)]??_0x351bca?.[_0x4923b7(0x167)]??null,'roles':Array[_0x4923b7(0x140)](_0x351bca?.[_0x4923b7(0xde)])?_0x351bca[_0x4923b7(0xde)]:[]}))[_0x4923b7(0x350)]('base64url'),_0x52c559=_0x387f5a(_0x67b49b,_0x24bc6b);return _0x67b49b+'.'+_0x52c559;}function _0x4afbfd(_0x47fd80,_0x4a4167){const _0x13e225=_0x1dd2;if(!_0x4a4167||typeof _0x47fd80!==_0x13e225(0x2f3))return null;const [_0x367be0,_0x233491]=_0x47fd80['split']('.');if(!_0x367be0||!_0x233491)return null;const _0x348daa=_0x387f5a(_0x367be0,_0x4a4167);if(!_0xfdc848(_0x233491,_0x348daa))return null;try{const _0x526026=JSON[_0x13e225(0x179)](Buffer[_0x13e225(0xb5)](_0x367be0,'base64url')[_0x13e225(0x350)]()),_0x469b60=0x7530;if(Date[_0x13e225(0x149)]()>Number(_0x526026?.[_0x13e225(0xcc)]??0x0)+_0x469b60)return null;return _0x526026;}catch{return null;}}async function _0x18bbec(_0x5eac46){return new Promise((_0x4d51d5,_0x836dc2)=>{const _0x4d49ce=_0x1dd2,_0x32ec3e=_0x54125b[_0x4d49ce(0x2aa)](0x10);_0x54125b[_0x4d49ce(0x102)](_0x5eac46,_0x32ec3e,0x40,(_0x3be54b,_0x24cf1a)=>{const _0xf21291=_0x4d49ce;if(_0x3be54b)_0x836dc2(_0x3be54b);_0x4d51d5(_0x32ec3e['toString'](_0xf21291(0x360))+':'+_0x24cf1a['toString']('hex'));});});}async function _0x2deeda(_0x3994e1,_0x204953){const _0x17f556=_0x1dd2,[_0x2b1799,_0x507d8a]=_0x204953[_0x17f556(0xb7)](':');if(!_0x2b1799||!_0x507d8a)return![];const _0x3bf251=Buffer[_0x17f556(0xb5)](_0x2b1799,'hex');return new Promise((_0x573160,_0x596acb)=>{_0x54125b['scrypt'](_0x3994e1,_0x3bf251,0x40,(_0x22c9da,_0xce6de3)=>{const _0x404546=_0x1dd2;if(_0x22c9da)_0x596acb(_0x22c9da);_0x573160(_0x54125b[_0x404546(0x263)](_0xce6de3,Buffer[_0x404546(0xb5)](_0x507d8a,'hex')));});});}return okdbAuthTokens={'hmac':_0x387f5a,'timingSafeEqual':_0xfdc848,'parseBearer':_0x140b61,'randomToken':_0xe089ba,'hashToken':_0x565686,'issueToken':_0x11b2fb,'authenticateToken':_0x4afbfd,'hashPassword':_0x18bbec,'verifyPassword':_0x2deeda},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x3dba17=_0x152c38;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0xe83bd1=require$$0$1,_0x10f581=_0x3dba17(0x166),_0x1781be=new Uint8Array(0x100)['fill'](0xff);for(let _0xe87dae=0x0;_0xe87dae<_0x10f581[_0x3dba17(0x1b0)];_0xe87dae++){_0x1781be[_0x10f581[_0x3dba17(0x306)](_0xe87dae)]=_0xe87dae,_0x1781be[_0x10f581[_0x3dba17(0x306)](_0xe87dae)+0x20]=_0xe87dae;}_0x1781be['O'['charCodeAt'](0x0)]=0x0,_0x1781be['o'[_0x3dba17(0x306)](0x0)]=0x0,_0x1781be['I'['charCodeAt'](0x0)]=0x1,_0x1781be['i'[_0x3dba17(0x306)](0x0)]=0x1,_0x1781be['L'[_0x3dba17(0x306)](0x0)]=0x1,_0x1781be['l'[_0x3dba17(0x306)](0x0)]=0x1;function _0x1bcfe5(_0x31ed49){const _0x1fd2df=_0x3dba17;let _0x55cd38=0x0,_0x2d42cc=0x0,_0x5ebf5b='';for(let _0x2b56d5=0x0;_0x2b56d5<_0x31ed49[_0x1fd2df(0x1b0)];_0x2b56d5++){_0x2d42cc=_0x2d42cc<<0x8|_0x31ed49[_0x2b56d5],_0x55cd38+=0x8;while(_0x55cd38>=0x5){_0x55cd38-=0x5,_0x5ebf5b+=_0x10f581[_0x2d42cc>>>_0x55cd38&0x1f];}}return _0x55cd38>0x0&&(_0x5ebf5b+=_0x10f581[_0x2d42cc<<0x5-_0x55cd38&0x1f]),_0x5ebf5b;}function _0x4146a7(_0x10e341){const _0x53184f=_0x3dba17;_0x10e341=_0x10e341[_0x53184f(0x156)](/-/g,'')[_0x53184f(0x361)]();let _0x44bbbd=0x0,_0x5207fb=0x0;const _0x539ac3=[];for(let _0x11ec0f=0x0;_0x11ec0f<_0x10e341['length'];_0x11ec0f++){const _0x298658=_0x1781be[_0x10e341['charCodeAt'](_0x11ec0f)];if(_0x298658===0xff)continue;_0x5207fb=_0x5207fb<<0x5|_0x298658,_0x44bbbd+=0x5,_0x44bbbd>=0x8&&(_0x44bbbd-=0x8,_0x539ac3[_0x53184f(0x231)](_0x5207fb>>>_0x44bbbd&0xff));}return Buffer[_0x53184f(0xb5)](_0x539ac3);}const _0x498869=[_0x3dba17(0x36a),_0x3dba17(0x25c),_0x3dba17(0x34a),_0x3dba17(0x1b6),_0x3dba17(0x32e),_0x3dba17(0x9a),'mcp',_0x3dba17(0x174)],_0x2a7c45=0x0,_0x4d82a1=0x1,_0x2b2c59=0x2,_0xcf6134=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x843f65({issuedAt:_0x4cc665,expiresAt:_0x47039e,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x2a7c45}){const _0x16f57c=_0x3dba17,_0x4bdd44=Buffer['from'](licensee,_0x16f57c(0x30f))['slice'](0x0,0x40),_0xbf4cb=0x1+0x1+0x4+0x4+0x1+_0x4bdd44[_0x16f57c(0x1b0)]+0x2+0x10,_0x2e5fff=Buffer[_0x16f57c(0x1bf)](_0xbf4cb);let _0x5a0964=0x0;_0x2e5fff[_0x16f57c(0x311)](0x1,_0x5a0964++),_0x2e5fff[_0x16f57c(0x311)](licenseType,_0x5a0964++),_0x2e5fff[_0x16f57c(0xfa)](Math[_0x16f57c(0x380)](_0x4cc665/0x3e8),_0x5a0964),_0x5a0964+=0x4,_0x2e5fff['writeUInt32BE'](Math[_0x16f57c(0x380)](_0x47039e/0x3e8),_0x5a0964),_0x5a0964+=0x4,_0x2e5fff[_0x16f57c(0x311)](_0x4bdd44['length'],_0x5a0964++),_0x4bdd44[_0x16f57c(0x17f)](_0x2e5fff,_0x5a0964),_0x5a0964+=_0x4bdd44[_0x16f57c(0x1b0)];let _0xcaeae0=0x0;for(let _0x118282=0x0;_0x118282<_0x498869[_0x16f57c(0x1b0)];_0x118282++){if(features[_0x498869[_0x118282]])_0xcaeae0|=0x1<<_0x118282;}_0x2e5fff[_0x16f57c(0x233)](_0xcaeae0,_0x5a0964),_0x5a0964+=0x2;const _0x1a85e3=[_0x16f57c(0x355),_0x16f57c(0x2af),_0x16f57c(0x2e2),'maxWrites'];for(const _0x5aed68 of _0x1a85e3){_0x2e5fff['writeUInt32BE'](limits[_0x5aed68]||0x0,_0x5a0964),_0x5a0964+=0x4;}return _0x2e5fff;}function _0x304598(_0x4441b4){const _0x521df4=_0x3dba17;let _0x433345=0x0;const _0x2c9141=_0x4441b4[_0x521df4(0x35b)](_0x433345++),_0x3492cd=_0x4441b4[_0x521df4(0x35b)](_0x433345++),_0x43a858=_0x4441b4[_0x521df4(0xd0)](_0x433345);_0x433345+=0x4;const _0x4b47a8=_0x4441b4['readUInt32BE'](_0x433345);_0x433345+=0x4;const _0x587998=_0x4441b4[_0x521df4(0x35b)](_0x433345++),_0x5b510b=_0x4441b4[_0x521df4(0x341)](_0x433345,_0x433345+_0x587998)[_0x521df4(0x350)](_0x521df4(0x30f));_0x433345+=_0x587998;const _0x59f5ae=_0x4441b4[_0x521df4(0x28b)](_0x433345);_0x433345+=0x2;const _0x25d558={};for(let _0x35e617=0x0;_0x35e617<_0x498869[_0x521df4(0x1b0)];_0x35e617++){_0x25d558[_0x498869[_0x35e617]]=Boolean(_0x59f5ae&0x1<<_0x35e617);}const _0xa04f81=[_0x521df4(0x355),_0x521df4(0x2af),_0x521df4(0x2e2),_0x521df4(0x322)],_0x218517={};for(const _0x4e621c of _0xa04f81){const _0x56ea20=_0x4441b4[_0x521df4(0xd0)](_0x433345);_0x433345+=0x4,_0x218517[_0x4e621c]=_0x56ea20===0x0?null:_0x56ea20;}return{'v':_0x2c9141,'licenseType':_0x3492cd,'issuedAt':_0x43a858*0x3e8,'expiresAt':_0x4b47a8*0x3e8,'licensee':_0x5b510b,'features':_0x25d558,'limits':_0x218517};}function _0x328d27(_0x578c42,_0x4139d1){const _0x344725=_0x3dba17,_0x1388a4=Buffer[_0x344725(0x139)]([_0x578c42,_0x4139d1]),_0x119e2f=_0x1bcfe5(_0x1388a4),_0x864db0=[];for(let _0x3a4a89=0x0;_0x3a4a89<_0x119e2f['length'];_0x3a4a89+=0x8){_0x864db0['push'](_0x119e2f[_0x344725(0x341)](_0x3a4a89,_0x3a4a89+0x8));}return _0x864db0['join']('-');}function _0x51084c(_0x33126d){const _0x172c0e=_0x3dba17;if(typeof _0x33126d!==_0x172c0e(0x2f3))throw new Error(_0x172c0e(0x11b));const _0x19de28=_0x4146a7(_0x33126d[_0x172c0e(0x156)](/-/g,''));if(_0x19de28[_0x172c0e(0x1b0)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x19de28['length']+_0x172c0e(0x27d));const _0x3049c1=_0x19de28[_0x172c0e(0x341)](0x0,_0x19de28[_0x172c0e(0x1b0)]-0x40),_0x155545=_0x19de28[_0x172c0e(0x341)](_0x19de28[_0x172c0e(0x1b0)]-0x40);let _0x46ba63;try{_0x46ba63=_0x304598(_0x3049c1);}catch(_0x46d080){throw new Error('decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20'+_0x46d080[_0x172c0e(0x307)]);}return{'rawBuf':_0x19de28,'payload':_0x3049c1,'sig':_0x155545,'decoded':_0x46ba63};}function _0x2958c1(_0x24e917){const _0x595154=_0x3dba17;return _0xe83bd1[_0x595154(0x160)](_0x595154(0xa0))[_0x595154(0x2a3)](_0x24e917)[_0x595154(0x20f)]()[_0x595154(0x341)](0x0,0x8);}function _0x11dcb1(_0x79d97d,_0x528010,_0x39d8b4){const _0x40b779=_0x3dba17,_0x2b7d02=_0x40b779(0x314)+_0x39d8b4,_0x438112=Buffer[_0x40b779(0x139)]([Buffer[_0x40b779(0xb5)](_0x79d97d,_0x40b779(0x30f)),_0x528010]),_0x402605=_0xe83bd1['createHmac']('sha256',_0x2b7d02)['update'](_0x438112)[_0x40b779(0x20f)](),_0x535d8f=_0x1bcfe5(_0x402605[_0x40b779(0x341)](0x0,0x5));return{'pin':_0x535d8f,'pinHmac':_0x402605};}function _0x4650e7(_0x186b55,_0x5dc75e,_0x476934){const _0x20621d=_0x3dba17,_0x1e116a=Buffer[_0x20621d(0x1bf)](0x4d);let _0x5ae934=0x0;_0x1e116a[_0x20621d(0x311)](0x1,_0x5ae934++),_0x186b55[_0x20621d(0x17f)](_0x1e116a,_0x5ae934),_0x5ae934+=0x8,_0x1e116a[_0x20621d(0xfa)](_0x5dc75e,_0x5ae934),_0x5ae934+=0x4,_0x476934[_0x20621d(0x17f)](_0x1e116a,_0x5ae934);const _0x4dae58=_0x1bcfe5(_0x1e116a),_0x3d19d5=[];for(let _0x2d9c76=0x0;_0x2d9c76<_0x4dae58['length'];_0x2d9c76+=0x6){_0x3d19d5[_0x20621d(0x231)](_0x4dae58[_0x20621d(0x341)](_0x2d9c76,_0x2d9c76+0x6));}return _0x3d19d5[_0x20621d(0x161)]('-');}function _0x35960c(_0x31a11a){const _0x4e9d51=_0x3dba17;if(typeof _0x31a11a!==_0x4e9d51(0x2f3))throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x3b2f00=_0x4146a7(_0x31a11a[_0x4e9d51(0x156)](/-/g,''));if(_0x3b2f00[_0x4e9d51(0x1b0)]!==0x4d)throw new Error(_0x4e9d51(0x369)+_0x3b2f00[_0x4e9d51(0x1b0)]);let _0x434760=0x0;const _0x4153c7=_0x3b2f00['readUInt8'](_0x434760++),_0x2a18fa=_0x3b2f00[_0x4e9d51(0x341)](_0x434760,_0x434760+0x8);_0x434760+=0x8;const _0xe1b91f=_0x3b2f00['readUInt32BE'](_0x434760);_0x434760+=0x4;const _0x549fc7=_0x3b2f00[_0x4e9d51(0x341)](_0x434760);return{'v':_0x4153c7,'licenseHash':_0x2a18fa,'expiry':_0xe1b91f,'sig':_0x549fc7};}function _0x75ae52({tokenString:_0x19d612,nodeId:_0x20d591,rawBlobBuf:_0x5c9e8b,pubKeyPem:_0x370027,pubFingerprint:_0x3b2dc6}){const _0x21ba79=_0x3dba17;let _0xcf5f2c;try{_0xcf5f2c=_0x35960c(_0x19d612);}catch(_0x5aede3){return{'valid':![],'reason':_0x21ba79(0x1f4)};}const _0xdc9d97=_0x2958c1(_0x5c9e8b);if(!_0xdc9d97[_0x21ba79(0x1f7)](_0xcf5f2c[_0x21ba79(0x9c)]))return{'valid':![],'reason':_0x21ba79(0xfc)};const {pinHmac:_0x409f2d}=_0x11dcb1(_0x20d591,_0xdc9d97,_0x3b2dc6),_0xec8847=Buffer['allocUnsafe'](0x4);_0xec8847[_0x21ba79(0xfa)](_0xcf5f2c[_0x21ba79(0x143)],0x0);const _0x562ad2=Buffer[_0x21ba79(0x139)]([Buffer['from']([_0xcf5f2c['v']]),_0x409f2d[_0x21ba79(0x341)](0x0,0x5),_0xcf5f2c[_0x21ba79(0x9c)],_0xec8847]);try{const _0x3324a4=_0xe83bd1[_0x21ba79(0x34c)](null,_0x562ad2,_0x370027,_0xcf5f2c[_0x21ba79(0x1ea)]);if(!_0x3324a4)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x2b9403){return{'valid':![],'reason':_0x21ba79(0x18a)};}if(_0xcf5f2c[_0x21ba79(0x143)]<Date[_0x21ba79(0x149)]()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x284602(_0x5203ed){const _0x270189=_0x3dba17;if(typeof _0x5203ed!==_0x270189(0x2f3))return _0x270189(0x32b);const _0x390681=_0x5203ed[_0x270189(0x15e)]();if(_0x390681[_0x270189(0x1ef)]('/')||_0x390681[_0x270189(0x1ef)]('./')||_0x390681['startsWith'](_0x270189(0x23c))||/^[A-Za-z]:[\\/]/[_0x270189(0x2f5)](_0x390681))return _0x270189(0x348);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x390681))return _0x270189(0x297);const _0x462376=_0x390681[_0x270189(0x156)](/[\s-]+/g,'')[_0x270189(0x1b0)];if(_0x462376===0x7c)return _0x270189(0x2e0);if(_0x462376>=0x95&&_0x462376<=0xfc)return'blob';return _0x270189(0x32b);}return okdbLicenseCodec={'toBase32':_0x1bcfe5,'fromBase32':_0x4146a7,'encodeLicensePayload':_0x843f65,'decodeLicensePayload':_0x304598,'encodeLicenseBlob':_0x328d27,'decodeLicenseBlob':_0x51084c,'licenseHash':_0x2958c1,'derivePin':_0x11dcb1,'encodeActivationToken':_0x4650e7,'decodeActivationToken':_0x35960c,'verifyActivation':_0x75ae52,'detectInputType':_0x284602,'FEATURE_NAMES':_0x498869,'LICENSE_TYPE_STANDARD':_0x2a7c45,'LICENSE_TYPE_OPEN':_0x4d82a1,'LICENSE_TYPE_INTERNAL':_0x2b2c59,'OPEN_LICENSE_MAX_DURATION_MS':_0xcf6134},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x3f1ae9 extends Error{constructor(_0x473cd7,_0x553426,_0x431cd3={}){const _0x3d2451=_0x1dd2;super(_0x473cd7),this['name']=_0x3d2451(0x208),this['code']=_0x553426,this[_0x3d2451(0x1b1)]=_0x431cd3,_0x431cd3[_0x3d2451(0x346)]&&(this[_0x3d2451(0x346)]=_0x431cd3['cause']),Error[_0x3d2451(0x228)](this,this['constructor']);}}class _0x612b54 extends _0x3f1ae9{constructor(_0x1c0058,_0x4c622a,_0x13e0bf,_0x39ad11){const _0x1dc37a=_0x1dd2;super(_0x1dc37a(0x24a)+_0x1c0058+'@'+_0x4c622a+_0x1dc37a(0x19b)+_0x13e0bf+_0x1dc37a(0x145)+_0x39ad11,_0x1dc37a(0x1cc),{'type':_0x1c0058,'key':_0x4c622a,'expectedVersion':_0x13e0bf,'actualVersion':_0x39ad11}),this[_0x1dc37a(0x167)]='OKDBVersionMismatchError';}}class _0x27218b extends _0x3f1ae9{constructor(_0x1b7489,_0x399a7d){const _0x5ca603=_0x1dd2;super(_0x1b7489+'@'+_0x399a7d+_0x5ca603(0xe2),_0x5ca603(0x119),{'type':_0x1b7489,'key':_0x399a7d}),this[_0x5ca603(0x167)]=_0x5ca603(0x190);}}class _0x195e38 extends _0x3f1ae9{constructor(_0xdbb398,_0x4a03f3){const _0x14cb4b=_0x1dd2;super(_0xdbb398+'@'+_0x4a03f3+'\x20already\x20exists',_0x14cb4b(0x302),{'type':_0xdbb398,'key':_0x4a03f3}),this[_0x14cb4b(0x167)]=_0x14cb4b(0x12a);}}class _0x15f468 extends _0x3f1ae9{constructor(_0xacb85c,_0x1eefc3){const _0x205d3e=_0x1dd2,_0x3a559c=typeof _0x1eefc3;super(_0x205d3e(0x296)+_0xacb85c+'\x27:\x20'+_0x3a559c+_0x205d3e(0x1eb)+_0x1eefc3,_0x205d3e(0x2c9),{'index':_0xacb85c,'key':_0x1eefc3,'keyType':_0x3a559c}),this[_0x205d3e(0x167)]=_0x205d3e(0x2e7);}}class _0x5562f7 extends _0x3f1ae9{constructor(_0x8fbac9){const _0x6fe259=_0x1dd2,_0x2b9dc8=typeof _0x8fbac9;super(_0x6fe259(0x2f0)+_0x2b9dc8+_0x6fe259(0xad)+_0x8fbac9,'INVALID_PRIMARY_KEY',{'key':_0x8fbac9,'keyType':_0x2b9dc8}),this[_0x6fe259(0x167)]=_0x6fe259(0x11c);}}class _0x44bd34 extends _0x3f1ae9{constructor(_0x43659a){const _0xdf92ae=_0x1dd2;super(_0xdf92ae(0x29c)+_0x43659a+_0xdf92ae(0x2bd),_0xdf92ae(0x289),{'type':_0x43659a}),this[_0xdf92ae(0x167)]=_0xdf92ae(0x13e);}}class _0x4fae61 extends _0x3f1ae9{constructor(_0x3d2709){const _0x32e5ce=_0x1dd2;super('Type\x20\x27'+_0x3d2709+'\x27\x20already\x20registered',_0x32e5ce(0xa8),{'type':_0x3d2709}),this[_0x32e5ce(0x167)]='OKDBTypeAlreadyRegisteredError';}}class _0x6f9262 extends _0x3f1ae9{constructor(_0x85c538,_0x4f954a){const _0x5a28f5=_0x1dd2;super(_0x5a28f5(0x173)+_0x4f954a+_0x5a28f5(0x31e)+_0x85c538+'\x27\x20doesn\x27t\x20exist',_0x5a28f5(0x25d),{'type':_0x85c538,'index':_0x4f954a}),this['name']='OKDBIndexNotRegisteredError';}}class _0x1004a3 extends _0x3f1ae9{constructor(_0x318090,_0x3ebc3a){const _0x489be0=_0x1dd2;super(_0x489be0(0x173)+_0x3ebc3a+'\x27\x20on\x20type\x20\x27'+_0x318090+_0x489be0(0x19f),_0x489be0(0x244),{'type':_0x318090,'index':_0x3ebc3a}),this[_0x489be0(0x167)]='OKDBIndexAlreadyRegisteredError';}}class _0xa8e908 extends _0x3f1ae9{constructor(_0x2c456b,_0x36cbeb={}){const _0x2473f5=_0x1dd2;super(_0x2c456b,_0x2473f5(0x276),_0x36cbeb),this[_0x2473f5(0x167)]=_0x2473f5(0x115);}}class _0x4e6409 extends _0x3f1ae9{constructor(_0x1df64a,_0x278ef2,_0x234a7b,_0x587a50,_0x50a164){const _0x164441=_0x1dd2;super('Unique\x20constraint\x20violated\x20on\x20'+_0x1df64a+'@'+_0x278ef2+':\x20key\x20['+_0x234a7b+_0x164441(0x211)+_0x587a50+_0x164441(0x1dc)+_0x50a164+'\x27',_0x164441(0x1c6),{'type':_0x1df64a,'index':_0x278ef2,'indexKey':_0x234a7b,'existingKey':_0x587a50,'conflictingKey':_0x50a164}),this[_0x164441(0x167)]=_0x164441(0x24e);}}class _0x825b16 extends _0x3f1ae9{constructor(_0x35e027,_0x36359e,_0x45783b){const _0x1ab0aa=_0x1dd2;super('Schema\x20validation\x20failed\x20for\x20'+_0x35e027+'@'+_0x36359e,_0x1ab0aa(0x15a),{'type':_0x35e027,'key':_0x36359e,'errors':_0x45783b}),this[_0x1ab0aa(0x167)]=_0x1ab0aa(0x2a2),this[_0x1ab0aa(0x358)]=_0x35e027,this[_0x1ab0aa(0x15b)]=_0x36359e,this[_0x1ab0aa(0x120)]=_0x45783b;}}class _0x4fe7f5 extends _0x3f1ae9{constructor(_0x46c11b,_0x158818){const _0x586a7b=_0x1dd2;super(_0x586a7b(0x373)+_0x46c11b+':\x20'+_0x158818[_0x586a7b(0x1b0)]+'\x20documents\x20fail\x20validation',_0x586a7b(0x2b2),{'type':_0x46c11b,'failures':_0x158818}),this['name']=_0x586a7b(0x193),this['type']=_0x46c11b,this[_0x586a7b(0x381)]=_0x158818;}}class _0x3cc4cc extends _0x3f1ae9{constructor(_0x5549e1,_0x13072a,_0x3cfafb,_0x3e9e99,_0x218bfb){const _0x492c93=_0x1dd2;super(_0x492c93(0x2c1)+_0x5549e1+'@'+_0x13072a+'.'+_0x3cfafb+'\x20references\x20'+_0x3e9e99+'@'+_0x218bfb+_0x492c93(0x14d),_0x492c93(0x38e),{'sourceType':_0x5549e1,'sourceKey':_0x13072a,'fieldPath':_0x3cfafb,'targetType':_0x3e9e99,'targetKey':_0x218bfb}),this['name']=_0x492c93(0xf1),this['sourceType']=_0x5549e1,this[_0x492c93(0x2a4)]=_0x13072a,this[_0x492c93(0x24b)]=_0x3cfafb,this[_0x492c93(0x287)]=_0x3e9e99,this[_0x492c93(0xc8)]=_0x218bfb;}}class _0x19c3ca extends _0x3f1ae9{constructor(_0x1808b4,_0x4e594a,_0x575d6b){const _0x30e50e=_0x1dd2;super(_0x30e50e(0xf4)+_0x1808b4+'@'+_0x4e594a+':\x20'+_0x575d6b[_0x30e50e(0x1b0)]+_0x30e50e(0x169),_0x30e50e(0x32f),{'targetType':_0x1808b4,'targetKey':_0x4e594a,'references':_0x575d6b}),this[_0x30e50e(0x167)]=_0x30e50e(0x94),this[_0x30e50e(0x287)]=_0x1808b4,this[_0x30e50e(0xc8)]=_0x4e594a,this['references']=_0x575d6b;}}class _0x271850 extends _0x3f1ae9{constructor(_0x1cb2b3,_0x482c37,_0x4f3c86){const _0x37e9eb=_0x1dd2;super(_0x37e9eb(0x2da)+_0x482c37+_0x37e9eb(0x28d)+_0x1cb2b3+'\x22\x20is\x20used\x20by:\x20'+_0x4f3c86[_0x37e9eb(0x282)](_0x1edaaf=>_0x1edaaf[_0x37e9eb(0x18b)]+':'+_0x1edaaf[_0x37e9eb(0x167)])[_0x37e9eb(0x161)](',\x20'),_0x37e9eb(0x2a9),{'type':_0x1cb2b3,'index':_0x482c37,'usedBy':_0x4f3c86}),this[_0x37e9eb(0x167)]=_0x37e9eb(0x1ba);}}return okdbError={'OKDBError':_0x3f1ae9,'OKDBVersionMismatchError':_0x612b54,'OKDBNotFoundError':_0x27218b,'OKDBAlreadyExistsError':_0x195e38,'OKDBInvalidIndexKeyError':_0x15f468,'OKDBInvalidPrimaryKeyError':_0x5562f7,'OKDBTypeNotRegisteredError':_0x44bd34,'OKDBTypeAlreadyRegisteredError':_0x4fae61,'OKDBIndexNotRegisteredError':_0x6f9262,'OKDBIndexAlreadyRegisteredError':_0x1004a3,'OKDBInvalidValueError':_0xa8e908,'OKDBUniqueConstraintError':_0x4e6409,'OKDBSchemaValidationError':_0x825b16,'OKDBSchemaCollectionError':_0x4fe7f5,'OKDBForeignKeyError':_0x3cc4cc,'OKDBForeignKeyDeleteError':_0x19c3ca,'OKDBIndexHasConsumersError':_0x271850},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x3a3d73=_0x152c38;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x28c2a6={'PUT':'put','REMOVE':'remove','INDEX_DROP':_0x3a3d73(0x328),'INDEX_REGISTER':_0x3a3d73(0x2d5),'INDEX_RESET':_0x3a3d73(0x101),'TYPE_REGISTER':_0x3a3d73(0x30d),'TYPE_DROP':_0x3a3d73(0x159),'FTS_REGISTER':_0x3a3d73(0x1e2),'FTS_DROP':_0x3a3d73(0x2c5),'FTS_RESET':_0x3a3d73(0x1e3),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x3a3d73(0x35c),'TTL_SET':'setTtl','TTL_CLEAR':_0x3a3d73(0xe9)},_0x2bed8b={'SYSTEM_READY':_0x3a3d73(0x1c3),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x3a3d73(0xd3),'SYSTEM_POKE':_0x3a3d73(0x26c),'SYSTEM_DRAIN':_0x3a3d73(0x221),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x3a3d73(0x2df),'INDEX_RESET':'index:reset','INDEX_READY':_0x3a3d73(0x92),'INDEX_PROGRESS':_0x3a3d73(0x136),'INDEX_DROP':_0x3a3d73(0x2bc),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x3a3d73(0x243),'FTS_DROP':_0x3a3d73(0x225),'FTS_RESET':_0x3a3d73(0x222),'SCHEMA_SET':_0x3a3d73(0x191),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x3a3d73(0x1aa),'UNIQUE_VIOLATION_RESOLVED':_0x3a3d73(0x30a),'REF_VIOLATION':_0x3a3d73(0x34d),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x3a3d73(0x383),'TXN_START':_0x3a3d73(0x1c4),'TXN_END':_0x3a3d73(0x1ed),'TXN_ROLLBACK':_0x3a3d73(0xae),'TYPE_REGISTERED':_0x3a3d73(0x34e),'TYPE_DROP':_0x3a3d73(0xaa),'ENV_OPENED':_0x3a3d73(0xf5),'ENV_REMOVED':'env:removed','TTL_EXPIRED':_0x3a3d73(0x199),'TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x3a3d73(0x374),'LICENSE_ADDED':_0x3a3d73(0x246),'LICENSE_ACTIVATED':_0x3a3d73(0x17d),'LICENSE_REMOVED':_0x3a3d73(0x37a)},_0x4bfc36={'CREATING':_0x3a3d73(0x220),'RESETTING':_0x3a3d73(0x111),'READY':_0x3a3d73(0x2be),'DROPPING':_0x3a3d73(0x207),'WAITING':_0x3a3d73(0x324)},_0x5b4f52={'CREATED':_0x3a3d73(0x18d),'STARTING':_0x3a3d73(0x265),'STARTED':_0x3a3d73(0xed),'STOPPING':_0x3a3d73(0x1e7),'STOPPED':'stopped'},_0x2138a3={'CREATING':_0x3a3d73(0x220),'READY':_0x3a3d73(0x2be),'HALTED':_0x3a3d73(0xb8),'STOPPED':_0x3a3d73(0x286),'RESETTING':_0x3a3d73(0x111)},_0x394949=Object[_0x3a3d73(0x186)]({'POKE':'bus:poke','DRAIN':_0x3a3d73(0x13c)});return okdbEnums={'BUS_EVENTS':_0x394949,'CHANGE_ACTIONS':_0x28c2a6,'EVENTS':_0x2bed8b,'INDEX_STATE':_0x4bfc36,'OKDB_STATE':_0x5b4f52,'VIEW_STATE':_0x2138a3},okdbEnums;}function _0x1dd2(_0x47bab3,_0x24ec8b){_0x47bab3=_0x47bab3-0x84;const _0x18ba0e=_0x18ba();let _0x1dd2e2=_0x18ba0e[_0x47bab3];return _0x1dd2e2;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x814c66=_0x152c38;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x45297b=require$$1,_0x1e1c7c=require$$1$1,_0x367e4a=require$$0,_0x4f3f33=_0x45297b['readFileSync'](_0x1e1c7c['join'](__dirname,'keys/public.pem'),_0x814c66(0x30f))[_0x814c66(0x15e)](),_0x267456=_0x367e4a[_0x814c66(0x1e4)](_0x4f3f33)[_0x814c66(0xc7)]({'type':'spki','format':_0x814c66(0x93)}),_0x6db8a3=_0x367e4a[_0x814c66(0x160)](_0x814c66(0xa0))[_0x814c66(0x2a3)](_0x267456)[_0x814c66(0x20f)](_0x814c66(0x360))['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x4f3f33,'PUB_FINGERPRINT':_0x6db8a3},okdbPubkey;}function _0x18ba(){const _0x42afa0=['createHmac','string','License\x20limit\x20exceeded:\x20','test','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','[okdb]\x20reset:\x20','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','open','derivePin','migrate','/admin/index.html','env','[okdb]\x20opening\x20','No\x20tokens.','\x0a\x20\x20✓\x20License\x20added','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','ALREADY_EXISTS','help','\x20\x20\x20\x20status:\x20\x20\x20\x20active','--log-level','charCodeAt','message','child_process','code','unique:violation_resolved','types','statSync','registerType','(null)','utf8','processors/','writeUInt8','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','4694961KOGFdu','OKDB-PIN-V1:','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','line','status','\x20→\x20POST\x20/api/env/','recheck','--key','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','Activation\x20invalid:\x20','\x0d[okdb]\x20blobs:\x20','\x27\x20on\x20type\x20\x27','toLocaleString','\x0a\x20\x20\x20\x20','\x20\x20\x20\x20port:\x20\x20','maxWrites','wrong_node','waiting','\x20\x20║','body','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','dropIndex','type/','\x20\x20⚠','unknown','/api','application/json','timeMachine','FOREIGN_KEY_DELETE_RESTRICTED','/type/users\x0a\x20\x20\x20\x20','warn','open\x20','type/users','\x20\x20\x20\x20admin:\x20http://localhost:','\x20\x20changes=','hasOwnProperty','Embeddings','result','Processors','206730ZoxxZi','every','CREATED','\x20\x20\x20http://localhost:','blob','Full-text\x20search','\x20\x20Usage:\x20','slice','SIGINT','./okdb-export.ndjson','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','Token\x20secret\x20not\x20configured','cause','object','path','summary','engines','\x20envs','verify','ref:violation','type:registered','\x20\x20Writes:\x20\x20','toString','logRequests','pause','time','hidden','envs','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','[okdb]\x20nothing\x20to\x20reset\x20—\x20','type','writeFileSync','toFixed','readUInt8','dropSchema','import','ttl','changes','hex','toUpperCase','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','detachConsole','setPrompt','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','includes','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','peers=','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','sync','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','\x20\x20records=','dbPath','ceil','existsSync','--ttl','fts:','[body]','Cannot\x20set\x20enforce\x20schema\x20on\x20','license:invalid','Records','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','\x0a\x20\x20✓\x20Token\x20created','./okdb-backup','--blobs','license:removed','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','features','\x20deleted','history','floor','failures','../okdb','sync:apply','win32','padStart','.kdb_history','assertLimit','\x20\x20Common\x20causes:','types\x20--env\x20staging','\x0a[okdb]\x20fatal\x20error:','--help','\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','FOREIGN_KEY_VIOLATION','\x20\x20\x20\x20\x20\x20','--path','Environments','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','\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','listLicenses','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','\x20env','--no-repl','\x20\x20\x20\x20limits:\x20\x20\x20\x20','level','\x20environment\x20','_computeStatus','--permissions','data','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','\x0a\x20\x20Invalid\x20JSON:\x20','logs','index:ready','der','OKDBForeignKeyDeleteError','backup','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','type/users/item/alice','repeat','views','isFile','licenseHash','LICENSE_FEATURE_DISABLED','ROUTES','PUBLIC_KEY_PEM','sha256','\x20\x20\x20\x20writes:\x20\x20\x20\x20','hasType','input:\x20','\x20\x20Expected\x20one\x20of:','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','--username','node\x20','TYPE_ALREADY_REGISTERED','node:crypto','type:drop','QUIT','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','txn:rollback','\x1b[32m','[okdb]\x20export\x20complete','dirname','--port','licenseId','call','from','\x20file','split','halted','okdb.pid','\x20\x20\x20\x20expires:\x20\x20\x20','[okdb]\x20exported\x20\x20types=','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','body:\x20','min','\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','toISOString','Invalid\x20license\x20blob:\x20','listening','stack','drop','crypto','green','export','targetKey','\x20\x20\x20\x20usage:\x20\x20\x20','\x20\x20✓\x20http\x20listening\x20on\x20:','rmSync','exp','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','readUInt32BE','\x20\x20✓\x20database\x20opened\x0a','addedAt','system:clock_change','then','free\x20tier','\x20\x20→\x20\x20','server','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','title','No\x20license\x20found\x20matching\x20this\x20activation\x20token','STATUS','api','log','roles','ENVS','<path>','/api/','\x20does\x20not\x20exist','white','\x20\x20✓\x20Revoked\x20token\x20','loadEnvFile','\x20\x20\x20\x20addedAt:\x20\x20\x20','LICENSE_ACTIVATION_INVALID','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','clearTtl','indexOf','--types','Sync','started','/types\x0a\x20\x20\x20\x20','write','\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/','OKDBForeignKeyError','indexToDb','stringify','Cannot\x20delete\x20','env:opened','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x22.\x20Use:\x20create,\x20list,\x20revoke','_envs','writeUInt32BE','LICENSE_LIMIT_EXCEEDED','LICENSE_HASH_MISMATCH','~tokens','\x20\x20Path\x20access','invalid','logLevel','resetIndex','scrypt','database\x20path\x20writable:\x20','\x20\x20\x20\x20features:\x20\x20','--config','--password','{}[]:,\x27\x22','toLowerCase','version','\x20months\x20from\x20issuance)','\x0a\x20\x20Joining\x20cluster\x20at\x20','mkdirSync','type/users/item/alice\x20--env\x20staging','payload','[okdb]\x20error:\x20failed\x20to\x20read\x20','[okdb]\x20started\x20in\x20','resetting','_lookupByName','\x20records…','config\x20file\x20invalid:\x20','OKDBInvalidValueError','keys','[okdb]\x20exporting\x20env\x20\x22','transaction','NOT_FOUND','expiresAt','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','OKDBInvalidPrimaryKeyError','\x20(must\x20be\x201–65535)','10qJwlzN','\x0a\x0a\x20\x20','errors','--changes','_systemEnv','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','exec','\x20\x20\x20\x20','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','catch','typeSubDbs','OKDBAlreadyExistsError','\x20to\x20quit.','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','getSecurityNotices','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','PUB_FINGERPRINT','\x20SECURITY\x20NOTICE','emit','EXPIRES','\x20\x20+','set','index:progress','val','events','concat','{}[]:,\x0a\x0d\x09\x20','exports','bus:drain','License\x20already\x20stored','OKDBTypeNotRegisteredError','(none)','isArray','reload','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','expiry','11403016rFieuD',',\x20got\x20','readFileSync','node','xdg-open\x20','now','columns','sizeBefore','\x20logs\x20on\x20\x20','\x20which\x20does\x20not\x20exist','_ensureTokensType','licensed','\x20\x20Envs:\x20\x20\x20\x20','createdAt','\x0d[okdb]\x20','remove','licenseType','valid','replace','already\x20in\x20use','has','dropType','SCHEMA_VALIDATION_FAILED','key','[okdb]\x20invalid\x20port:\x20','exit','trim','transport:\x20','createHash','join','\x1b[34m','\x20\x20(','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','exportBlobs','0123456789ABCDEFGHJKMNPQRSTVWXYZ','name','start\x20','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','platform','License\x20expired\x20or\x20invalidated','types/env=','some','\x20\x20·\x20','Examples','rawBuf','--grants','--env','Index\x20\x27','files','types:','7060OaDCdr','yellow','--drop','parse','find','config\x20file\x20valid:\x20','DELETE\x20type/users/item/x','license:activated','removeLicense','copy','Bearer\x20','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','\x20to\x20browse\x20the\x20API,\x20','TYPES','\x0a\x20\x20✓\x20License\x20activated','--address','freeze','get','\x20\x20╔═══════════════════════════╗','Build\x20expects\x20public\x20key\x20fingerprint\x20','SIG_INVALID','kind','createInterface','created','decodeActivationToken','importBlobs','OKDBNotFoundError','schema:set','\x1b[0m','OKDBSchemaCollectionError','verifyActivation','\x20licenses','\x0a[okdb]\x20shutting\x20down…\x0a','DELETE','database\x20path\x20not\x20writable:\x20','ttl:expired','reset',':\x20expected\x20','__writeCounter','\x20\x20\x20\x20status:\x20\x20\x20\x20','available','\x27\x20is\x20already\x20registered','.kdbconfig','base64url','bold','\x22\x20(must\x20be\x20debug|info|warn|error)','put','create','queue/','%),\x20','_licenseHash','[okdb]\x20unknown\x20token\x20action:\x20\x22','unique:violation','OPEN','noAdmin','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','[filter]','reason','length','details','LICENSED_BUILD','/type/users/query\x0a\x20\x20\x20\x20','detectInputType','grants','fts','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','enabled','\x0a\x20\x20','OKDBIndexHasConsumersError','LABEL','SIGTERM','inputSchema','\x22\x20matches\x20','allocUnsafe','finally','\x20already\x20in\x20use','username','system:ready','txn:start','\x20\x20✓\x20','UNIQUE_CONSTRAINT','--name','search','list','\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','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','VERSION_MISMATCH','address','active','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','--token','dest','value','exportToFile','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x20(expires\x20in\x20','listen','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20type','1.6.0','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','\x27,\x20cannot\x20map\x20to\x20\x27','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','once','[okdb]\x20port\x20','terminal','shutdown','registerFts','resetFts','createPublicKey','effective','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','stopping','\x20\x20\x20\x20path:\x20\x20','port','sig','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','pending','txn:end','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','startsWith','[okdb]\x20error:\x20','getCount','admin','default','MALFORMED_TOKEN','operation','\x1b[2m','equals','info','[env]','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','Files','\x20\x20✗','readline','(add\x20a\x20license\x20first)','issuedAt','\x20\x20\x20\x20\x20\x20\x20','false','~licenses','\x20for\x20commands,\x20','\x20writes\x20(','unlinkSync','\x1b[31m','dropping','OKDBError','[okdb]\x20importing\x20','type/users\x20--help','padEnd','records','bind','[okdb]\x20created\x20./okdb-data','digest','homedir',']\x20already\x20maps\x20to\x20\x27','\x20MB\x20→\x20','_active','limits','[okdb]\x20error:\x20--password\x20requires\x20--name','[okdb]\x20import\x20complete','description','listRoutes','--log-requests','ENV','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','activateLicense','routes','importFromFile','[okdb]\x20backup\x20complete','creating','system:drain','fts:reset','PERMISSIONS','\x20records','fts:drop','true','\x22\x20already\x20exists','captureStackTrace','null','license','stderr','active:','sort','\x20more','\x20\x20(licensee:\x20','reverse','push','http','writeUInt16BE','filter','resolve','/\x20quit\x20/\x20Ctrl+C','token','doctor','dim','VERB','tags','../','handle','\x20/\x20','GET','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x20\x20[','fts:registered','INDEX_ALREADY_REGISTERED','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','license:added','\x20\x20⚠\x20\x20','pin','\x1b[90m','Version\x20mismatch\x20for\x20','fieldPath','byteLength','\x20\x20Tier:\x20\x20\x20\x20','OKDBUniqueConstraintError','\x20\x20skipped=','\x20\x20✓\x20Removed\x20license\x20','prompt','\x20\x20All\x20checks\x20passed.\x0a','permissions','boolean','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','magenta','param','meta','getPins','\x20\x20@','embeddings','INDEX_NOT_REGISTERED','[on|off|level]','isInteger','PUT\x20type/users/item/x\x20{\x22n\x22:1}','max','forEach','timingSafeEqual','idx:','starting','error','./okdb-data','_license','onLicenseExpired','\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','\x20not\x20found','system:poke','__esModule','password','label','off','config','.okdb-write-test','5794635DGzRxe','stdin','keys:','INVALID_VALUE','sizeAfter','(no\x20types)','isFeatureEnabled','noRepl','red','entries','\x20bytes,\x20need\x20>=\x2065)','\x22\x20→\x20','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','Shutting\x20down\x20due\x20to\x20license\x20expiry','License\x20signature\x20invalid:\x20','map','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','(unset)','prototype','stopped','targetType','licensee','TYPE_NOT_REGISTERED','okdb','readUInt16BE','\x1b[37m','\x22\x20on\x20\x22','round','dynamic','\x1b[35m','\x20\x20Some\x20checks\x20failed.\x0a','expired','decodeLicenseBlob','stdout','debug','Invalid\x20index\x20key\x20type\x20for\x20\x27','uuid','envs=','addLicense','EXIT','\x20active\x20env:\x20','Type\x20\x27','count','\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','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','auth','OKDBSchemaValidationError','update','sourceKey','close','yes','1938936rjaMga','cyan','INDEX_HAS_CONSUMERS','randomBytes','\x22\x20to\x20enable\x20it.','9076Buqfzh','--env\x20<name>',',\x20label:\x20','typesPerEnv','sub','selfAddress','SCHEMA_COLLECTION_INVALID','_isFree','blobs','\x20\x20✓\x20OKDB\x20server\x20running','USE','[okdb]\x20exporting\x20blobs…','LICENSE_TYPE_OPEN','\x20\x20\x20\x20licensee:\x20\x20','children','\x0a\x20\x20License\x20details:','index:drop','\x27\x20doesn\x27t\x20exist','ready','trimStart','\x20\x20\x20\x20license:\x20','Foreign\x20key\x20violation:\x20','ACTIVATION_EXPIRED','current','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','dropFts','getRange','safety','hint','INVALID_INDEX_KEY','method','\x20MB)','\x20\x20[okdb]\x20shutting\x20down…','\x20\x20\x20\x20graceful\x20shutdown\x0a','darwin','\x0a[okdb]\x20error:\x20','attach','4184CBXkeK','gray','\x20\x20(unlimited)','LICENSE_INVALID','registerIndex','--version','POST','type/users/query\x20{\x22active\x22:true}','assertFeature','Index\x20\x22','env/:env','randomUUID','transport','[okdb]\x20invalid\x20log\x20level:\x20\x22','item:remove','activation','/api/env/','syncPeers','number','argv','\x20\x20Usage:','use\x20<env>','OKDBInvalidIndexKeyError','mcp','\x20\x20\x20\x20permissions:\x20','\x20\x20(name:\x20','options','--label','index','decoded','Types','Invalid\x20primary\x20key\x20type:\x20','/type/users/item/alice\x0a\x20\x20\x20\x20'];_0x18ba=function(){return _0x42afa0;};return _0x18ba();}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x4d9960=_0x152c38;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x1a5e85=require$$0,{OKDBError:_0x2a30d1}=requireOkdbError(),{EVENTS:_0x5a6d0a}=requireOkdbEnums(),_0x79d811=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x5b9ae9,LICENSE_TYPE_INTERNAL:_0x175933,OPEN_LICENSE_MAX_DURATION_MS:_0x1a2c08}=_0x79d811,_0x2e3db8=requireOkdbPubkey(),_0x1b916b={'LICENSED_BUILD':_0x4d9960(0x226),'PUBLIC_KEY_PEM':_0x2e3db8[_0x4d9960(0x9f)],'PUB_FINGERPRINT':_0x2e3db8[_0x4d9960(0x130)],'LICENSE_EXPIRED_ACTION':'log'},_0xac745f=_0x4d9960(0x202),_0x2a2a73={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0xd99774(_0x53550b){const _0xc18d4e=_0x4d9960;!_0x53550b[_0xc18d4e(0xa2)](_0xac745f)&&await _0x53550b[_0xc18d4e(0x30d)](_0xac745f);}class _0x4e059a{constructor(_0x1842d6){const _0x45d4e4=_0x4d9960;this[_0x45d4e4(0x28a)]=_0x1842d6,this[_0x45d4e4(0x213)]=null;}async[_0x4d9960(0x141)](){const _0x52a31d=_0x4d9960,_0x3e22ec=this[_0x52a31d(0x28a)]['_systemEnv'];if(!_0x3e22ec||!_0x3e22ec[_0x52a31d(0xa2)](_0xac745f)){this[_0x52a31d(0x213)]=null;return;}const _0x27b5df=this[_0x52a31d(0x28a)]['id'];let _0x164991=null;for(const {key:_0x3bcdcd,value:_0x50ca87}of _0x3e22ec['getRange'](_0xac745f)){const _0x29c565=this[_0x52a31d(0x8c)](_0x50ca87,_0x27b5df);_0x29c565===_0x52a31d(0x1ce)&&!_0x164991&&(_0x164991={..._0x50ca87,'id':_0x3bcdcd,'status':_0x29c565});}this['_active']=_0x164991;if(this[_0x52a31d(0x213)]&&this[_0x52a31d(0x213)][_0x52a31d(0x154)]===_0x5b9ae9){const _0xcbeb5d=Math[_0x52a31d(0x36e)]((this[_0x52a31d(0x213)][_0x52a31d(0x11a)]-Date['now']())/0x5265c00);this['okdb']['log']?.['warn'](_0x52a31d(0x2f6)+_0xcbeb5d+'\x20day(s).',{'feature':'license','licensee':this[_0x52a31d(0x213)][_0x52a31d(0x288)],'expiresAt':new Date(this[_0x52a31d(0x213)][_0x52a31d(0x11a)])['toISOString']()});}this['_active']&&this[_0x52a31d(0x213)][_0x52a31d(0x154)]===_0x175933&&this[_0x52a31d(0x28a)][_0x52a31d(0xdd)]?.[_0x52a31d(0x331)](_0x52a31d(0x367),{'feature':_0x52a31d(0x22a),'licensee':this['_active'][_0x52a31d(0x288)]});}[_0x4d9960(0x8c)](_0x5c5b8f,_0x4a427c){const _0x5ec12e=_0x4d9960;if(!_0x5c5b8f[_0x5ec12e(0x33e)])return'invalid';let _0x22d32d;try{_0x22d32d=_0x79d811['decodeLicenseBlob'](_0x5c5b8f[_0x5ec12e(0x33e)]);}catch(_0x3ae9f6){return'invalid';}try{const _0x1d2922=_0x1a5e85['verify'](null,_0x22d32d[_0x5ec12e(0x10e)],_0x1b916b[_0x5ec12e(0x9f)],_0x22d32d[_0x5ec12e(0x1ea)]);if(!_0x1d2922)return'invalid';}catch(_0x1d6b4a){return _0x5ec12e(0xff);}if(_0x22d32d[_0x5ec12e(0x2ee)]['licenseType']===_0x175933)return'active';if(_0x22d32d[_0x5ec12e(0x2ee)][_0x5ec12e(0x11a)]<=Date[_0x5ec12e(0x149)]())return _0x5ec12e(0x292);if(_0x22d32d['decoded'][_0x5ec12e(0x154)]===_0x5b9ae9)return _0x5ec12e(0x1ce);if(!_0x5c5b8f[_0x5ec12e(0x2e0)])return _0x5ec12e(0x1ec);const _0x8e10ce=_0x79d811[_0x5ec12e(0x194)]({'tokenString':_0x5c5b8f[_0x5ec12e(0x2e0)],'nodeId':_0x4a427c,'rawBlobBuf':_0x22d32d[_0x5ec12e(0x170)],'pubKeyPem':_0x1b916b[_0x5ec12e(0x9f)],'pubFingerprint':_0x1b916b[_0x5ec12e(0x130)]});if(_0x8e10ce[_0x5ec12e(0x1af)]===_0x5ec12e(0xfc)||_0x8e10ce[_0x5ec12e(0x1af)]===_0x5ec12e(0x18a))return _0x5ec12e(0x323);if(_0x8e10ce[_0x5ec12e(0x1af)]===_0x5ec12e(0x2c2))return _0x5ec12e(0x292);if(!_0x8e10ce[_0x5ec12e(0x155)])return'wrong_node';return'active';}get[_0x4d9960(0x1ce)](){const _0x370a86=_0x4d9960;return this[_0x370a86(0x213)];}get[_0x4d9960(0x1e5)](){const _0x44cc97=_0x4d9960;return this[_0x44cc97(0x213)]??_0x2a2a73;}[_0x4d9960(0x2d9)](_0x739bf7){const _0x1c6d96=_0x4d9960;if(_0x1b916b[_0x1c6d96(0x1b2)]!==_0x1c6d96(0x226))return;const _0x2ed7be=this[_0x1c6d96(0x1e5)];if(!_0x2ed7be[_0x1c6d96(0x37d)]?.[_0x739bf7]){const _0x5f2cab=_0x2ed7be[_0x1c6d96(0x2b3)]?_0x1c6d96(0x181)+_0x739bf7+_0x1c6d96(0x37c)+_0x739bf7+_0x1c6d96(0x2ab):'Feature\x20not\x20licensed:\x20'+_0x739bf7+_0x1c6d96(0x1da)+_0x739bf7+'\x22.';throw new _0x2a30d1(_0x5f2cab,_0x1c6d96(0x9d),{'feature':_0x739bf7});}}[_0x4d9960(0x279)](_0x2ac7d5){const _0x52209a=_0x4d9960;if(_0x1b916b[_0x52209a(0x1b2)]!==_0x52209a(0x226))return!![];return!!this['effective'][_0x52209a(0x37d)]?.[_0x2ac7d5];}[_0x4d9960(0x387)](_0x1c016b,_0x43621b){const _0x4dae16=_0x4d9960;if(_0x1b916b[_0x4dae16(0x1b2)]!==_0x4dae16(0x226))return;const _0x13a641=this['effective'],_0x3b7f7f=_0x13a641[_0x4dae16(0x214)]?.[_0x1c016b];if(_0x3b7f7f===null||_0x3b7f7f===undefined||_0x3b7f7f===0x0)return;if(_0x43621b>=_0x3b7f7f)throw new _0x2a30d1(_0x4dae16(0x2f4)+_0x1c016b+'\x20('+_0x43621b+'/'+_0x3b7f7f+')',_0x4dae16(0xfb),{'limit':_0x1c016b,'current':_0x43621b,'max':_0x3b7f7f});}async[_0x4d9960(0x299)](_0x2484da){const _0x30641e=_0x4d9960;let _0x25fc73;try{_0x25fc73=_0x79d811[_0x30641e(0x293)](_0x2484da);}catch(_0x5281a8){throw new _0x2a30d1(_0x30641e(0xc1)+_0x5281a8[_0x30641e(0x307)],_0x30641e(0x2d4));}let _0x44523a;try{_0x44523a=_0x1a5e85[_0x30641e(0x34c)](null,_0x25fc73[_0x30641e(0x10e)],_0x1b916b[_0x30641e(0x9f)],_0x25fc73[_0x30641e(0x1ea)]);}catch(_0x327824){throw new _0x2a30d1(_0x30641e(0x281)+_0x327824['message'],_0x30641e(0x2d4));}if(!_0x44523a)throw new _0x2a30d1('License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20'+(_0x30641e(0x189)+_0x1b916b[_0x30641e(0x130)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x30641e(0x2d4),{'expectedFingerprint':_0x1b916b[_0x30641e(0x130)]});if(_0x25fc73[_0x30641e(0x2ee)][_0x30641e(0x154)]===_0x5b9ae9){const _0x35a6a1=_0x25fc73[_0x30641e(0x2ee)][_0x30641e(0x11a)]-_0x25fc73['decoded'][_0x30641e(0x1ff)];if(_0x35a6a1>_0x1a2c08)throw new _0x2a30d1(_0x30641e(0x1dd)+Math[_0x30641e(0x36e)](_0x35a6a1/(0x1e*0x5265c00))+_0x30641e(0x10a),_0x30641e(0x2d4));}const _0xc82acc=this[_0x30641e(0x28a)][_0x30641e(0x122)];await _0xd99774(_0xc82acc);const _0x276420=_0x79d811[_0x30641e(0x9c)](_0x25fc73[_0x30641e(0x170)])[_0x30641e(0x350)](_0x30641e(0x360));for(const {value:_0xa6d545}of _0xc82acc['getRange'](_0xac745f)){if(_0xa6d545[_0x30641e(0x1a8)]===_0x276420)throw new _0x2a30d1(_0x30641e(0x13d),_0x30641e(0x2d4));}const _0x3ba0c5=_0x1a5e85[_0x30641e(0x2dc)](),_0x39f3a3={'blob':_0x2484da,'activation':null,'addedAt':Date[_0x30641e(0x149)](),'_licenseHash':_0x276420,'licensee':_0x25fc73[_0x30641e(0x2ee)][_0x30641e(0x288)],'expiresAt':_0x25fc73['decoded'][_0x30641e(0x11a)],'features':_0x25fc73['decoded'][_0x30641e(0x37d)],'limits':_0x25fc73[_0x30641e(0x2ee)][_0x30641e(0x214)],'licenseType':_0x25fc73[_0x30641e(0x2ee)][_0x30641e(0x154)]};return await _0xc82acc[_0x30641e(0x1a4)](_0xac745f,_0x3ba0c5,_0x39f3a3),{'id':_0x3ba0c5,..._0x39f3a3};}async[_0x4d9960(0x21c)](_0x51fb10){const _0x33cf5f=_0x4d9960;let _0x20e907;try{_0x20e907=_0x79d811[_0x33cf5f(0x18e)](_0x51fb10);}catch(_0x4fd7f0){throw new _0x2a30d1('Invalid\x20activation\x20token:\x20'+_0x4fd7f0[_0x33cf5f(0x307)],'LICENSE_ACTIVATION_INVALID');}const _0x50317a=_0x20e907[_0x33cf5f(0x9c)][_0x33cf5f(0x350)]('hex'),_0x40d5b5=this[_0x33cf5f(0x28a)][_0x33cf5f(0x122)];if(!_0x40d5b5||!_0x40d5b5[_0x33cf5f(0xa2)](_0xac745f))throw new _0x2a30d1('No\x20license\x20found\x20matching\x20this\x20activation\x20token','LICENSE_ACTIVATION_INVALID');let _0x26d489=null,_0x34c0d=null;for(const {key:_0x15a12a,value:_0x5620f2}of _0x40d5b5[_0x33cf5f(0x2c6)](_0xac745f)){if(_0x5620f2['_licenseHash']===_0x50317a){_0x26d489=_0x15a12a,_0x34c0d=_0x5620f2;break;}}if(!_0x26d489)throw new _0x2a30d1(_0x33cf5f(0xda),'LICENSE_ACTIVATION_INVALID');const {rawBuf:_0x45747b}=_0x79d811[_0x33cf5f(0x293)](_0x34c0d[_0x33cf5f(0x33e)]),_0x52d10d=_0x79d811[_0x33cf5f(0x194)]({'tokenString':_0x51fb10,'nodeId':this[_0x33cf5f(0x28a)]['id'],'rawBlobBuf':_0x45747b,'pubKeyPem':_0x1b916b[_0x33cf5f(0x9f)],'pubFingerprint':_0x1b916b[_0x33cf5f(0x130)]});if(!_0x52d10d['valid'])throw new _0x2a30d1(_0x33cf5f(0x31c)+_0x52d10d['reason'],_0x33cf5f(0xe7),{'reason':_0x52d10d['reason']});const _0x34d235={..._0x34c0d,'activation':_0x51fb10};return await _0x40d5b5[_0x33cf5f(0x2a3)](_0xac745f,_0x26d489,_0x34d235),{'id':_0x26d489,..._0x34d235};}async[_0x4d9960(0x17e)](_0x731882){const _0x21d8fc=_0x4d9960,_0x479d24=this[_0x21d8fc(0x28a)][_0x21d8fc(0x122)];if(!_0x479d24||!_0x479d24[_0x21d8fc(0xa2)](_0xac745f))return;await _0x479d24[_0x21d8fc(0x153)](_0xac745f,_0x731882);}async[_0x4d9960(0x85)](){const _0x384633=_0x4d9960,_0x4cad11=this[_0x384633(0x28a)][_0x384633(0x122)];if(!_0x4cad11||!_0x4cad11['hasType'](_0xac745f))return[];const _0x448537=this[_0x384633(0x28a)]['id'],_0x388d38=[];for(const {key:_0x5380cf,value:_0x2d1771}of _0x4cad11[_0x384633(0x2c6)](_0xac745f)){const _0x4a08ef=this[_0x384633(0x8c)](_0x2d1771,_0x448537);_0x388d38['push']({..._0x2d1771,'id':_0x5380cf,'status':_0x4a08ef});}return _0x388d38;}[_0x4d9960(0x25a)](){const _0x1da484=_0x4d9960,_0x3ee6e5=this[_0x1da484(0x28a)][_0x1da484(0x122)];if(!_0x3ee6e5||!_0x3ee6e5[_0x1da484(0xa2)](_0xac745f))return[];const _0x5992ce=this[_0x1da484(0x28a)]['id'],_0x4f844f=[];for(const {key:_0xf7af5e,value:_0x12494f}of _0x3ee6e5[_0x1da484(0x2c6)](_0xac745f)){if(_0x12494f[_0x1da484(0x1a8)]){if(_0x12494f[_0x1da484(0x154)]===_0x5b9ae9)_0x4f844f[_0x1da484(0x231)]({'licenseId':_0xf7af5e,'pin':null});else{const _0x3d82e3=Buffer[_0x1da484(0xb5)](_0x12494f['_licenseHash'],_0x1da484(0x360)),{pin:_0x44db42}=_0x79d811[_0x1da484(0x2fa)](_0x5992ce,_0x3d82e3,_0x1b916b['PUB_FINGERPRINT']);_0x4f844f[_0x1da484(0x231)]({'licenseId':_0xf7af5e,'pin':_0x44db42});}}}return _0x4f844f;}async[_0x4d9960(0x319)](){const _0x2471e5=_0x4d9960,_0x33bd69=this['_active'];await this[_0x2471e5(0x141)]();if(this[_0x2471e5(0x213)]&&this['_active'][_0x2471e5(0x154)]===_0x5b9ae9){const _0x502a79=Math['ceil']((this['_active'][_0x2471e5(0x11a)]-Date[_0x2471e5(0x149)]())/0x5265c00);this['okdb']['log']?.['warn'](_0x2471e5(0x2f6)+_0x502a79+'\x20day(s).',{'feature':_0x2471e5(0x22a),'licensee':this[_0x2471e5(0x213)]['licensee'],'expiresAt':new Date(this[_0x2471e5(0x213)][_0x2471e5(0x11a)])[_0x2471e5(0xc0)]()});}this[_0x2471e5(0x213)]&&this[_0x2471e5(0x213)][_0x2471e5(0x154)]===_0x175933&&this[_0x2471e5(0x28a)]['log']?.[_0x2471e5(0x331)](_0x2471e5(0x367),{'feature':_0x2471e5(0x22a),'licensee':this[_0x2471e5(0x213)][_0x2471e5(0x288)]});if(_0x33bd69&&!this[_0x2471e5(0x213)]){this[_0x2471e5(0x28a)][_0x2471e5(0xdd)]?.[_0x2471e5(0x331)](_0x2471e5(0x16b),{'feature':_0x2471e5(0x22a)}),this['okdb'][_0x2471e5(0x138)]?.[_0x2471e5(0x132)](_0x5a6d0a[_0x2471e5(0x2d4)],{'previous':_0x33bd69});const _0x3693eb=this['okdb'][_0x2471e5(0x2eb)]?.[_0x2471e5(0x269)]??_0x1b916b['LICENSE_EXPIRED_ACTION'];_0x3693eb===_0x2471e5(0x1e1)&&(this[_0x2471e5(0x28a)][_0x2471e5(0xdd)]?.['error'](_0x2471e5(0x280),{'feature':_0x2471e5(0x22a)}),this[_0x2471e5(0x28a)]['close']()['catch'](()=>{})[_0x2471e5(0x1c0)](()=>process[_0x2471e5(0x15d)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x4e059a,'_C':_0x1b916b},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x42fa8f=_0x152c38;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x4caf77=require$$0$2,_0xe972e0=require$$1,_0x338959=require$$2$1,_0x38b637=require$$1$1,_0x26105a=_0x38b637['join'](_0x338959[_0x42fa8f(0x210)](),_0x42fa8f(0x386)),_0x2504a4=0x3e8,_0x11b2f7={'reset':_0x42fa8f(0x192),'bold':'\x1b[1m','dim':_0x42fa8f(0x1f6),'red':_0x42fa8f(0x206),'green':_0x42fa8f(0xaf),'yellow':'\x1b[33m','blue':_0x42fa8f(0x162),'magenta':_0x42fa8f(0x290),'cyan':'\x1b[36m','white':_0x42fa8f(0x28c),'gray':_0x42fa8f(0x249)},_0xd217bf=!process['stdout']['isTTY']||!!process.env.NO_COLOR,_0x89fdf=(_0x4d60fb,_0x36c91b)=>_0xd217bf?_0x36c91b:''+_0x4d60fb+_0x36c91b+_0x11b2f7[_0x42fa8f(0x19a)],_0x18aa8e={'error':_0x11b2f7[_0x42fa8f(0x27b)],'warn':_0x11b2f7[_0x42fa8f(0x177)],'info':_0x11b2f7['cyan'],'debug':_0x11b2f7[_0x42fa8f(0x2d2)]},_0x1b2c94={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x263a36(_0x3f4aff,_0x22e605='info'){const _0x1da9a4=_0x42fa8f,{level:_0x5aee4a,msg:_0x298c09,meta:_0x40a45f,context:_0x43a821,ts:_0x15201f}=_0x3f4aff;if((_0x1b2c94[_0x5aee4a]??0x1)<(_0x1b2c94[_0x22e605]??0x1))return;const _0x168949=_0x89fdf(_0x11b2f7['gray'],new Date(_0x15201f)[_0x1da9a4(0xc0)]()),_0x57f5d0=_0x89fdf(_0x18aa8e[_0x5aee4a]??_0x11b2f7[_0x1da9a4(0xe3)],_0x5aee4a[_0x1da9a4(0x20b)](0x5));let _0x28593a='\x20\x20'+_0x168949+'\x20'+_0x89fdf(_0x11b2f7[_0x1da9a4(0x1a2)],_0x57f5d0)+'\x20'+_0x298c09;if(_0x40a45f&&Object[_0x1da9a4(0x116)](_0x40a45f)[_0x1da9a4(0x1b0)]>0x0){const _0x4243fc=Object['entries'](_0x40a45f)[_0x1da9a4(0x282)](([_0x3d139b,_0x2e1f8e])=>_0x3d139b+'='+_0x2e1f8e)[_0x1da9a4(0x161)]('\x20');_0x28593a+=_0x89fdf(_0x11b2f7['dim'],_0x1da9a4(0x242)+_0x4243fc+']');}if(_0x43a821!==undefined){const _0x1d689=typeof _0x43a821===_0x1da9a4(0x347)?JSON[_0x1da9a4(0xf3)](_0x43a821):String(_0x43a821);_0x28593a+=_0x89fdf(_0x11b2f7[_0x1da9a4(0x239)],'\x20\x20'+_0x1d689);}const _0x340d9a=_0x5aee4a===_0x1da9a4(0x266)||_0x5aee4a===_0x1da9a4(0x331)?process[_0x1da9a4(0x22b)][_0x1da9a4(0xef)][_0x1da9a4(0x20d)](process[_0x1da9a4(0x22b)]):process[_0x1da9a4(0x294)][_0x1da9a4(0xef)][_0x1da9a4(0x20d)](process[_0x1da9a4(0x294)]);_0x340d9a(_0x28593a+'\x0a');}function _0x5a56a0(_0xff9650,_0x139e6a){const _0x1abba1=_0x42fa8f;if(_0xff9650===0xcc||_0xff9650>=0xc8&&_0xff9650<0x12c&&!_0x139e6a){console[_0x1abba1(0xdd)](_0x1abba1(0x1b9)+_0x89fdf(_0x11b2f7[_0x1abba1(0xc6)],'✓')+'\x0a');return;}if(_0xff9650>=0x190||_0x139e6a?.['error']){const _0x370403=_0x139e6a?.[_0x1abba1(0x266)]??_0x139e6a?.[_0x1abba1(0x307)]??'HTTP\x20'+_0xff9650;console[_0x1abba1(0xdd)]('\x0a\x20\x20'+_0x89fdf(_0x11b2f7[_0x1abba1(0x27b)],'✗')+'\x20'+_0x89fdf(_0x11b2f7['bold']+_0x11b2f7[_0x1abba1(0x27b)],String(_0xff9650))+'\x20\x20'+_0x370403+'\x0a');return;}const _0x66be2b=Object[_0x1abba1(0x285)][_0x1abba1(0x336)][_0x1abba1(0xb4)](_0x139e6a??{},_0x1abba1(0x338))?_0x139e6a[_0x1abba1(0x338)]:_0x139e6a,_0x12d460=_0x139e6a?.['meta'];console['log'](''),_0x1f2b9e(_0x66be2b,'\x20\x20');if(_0x12d460?.[_0x1abba1(0x29d)]!=null||_0x12d460?.[_0x1abba1(0x353)]!=null){const _0x337bf4=[];if(_0x12d460['count']!=null)_0x337bf4['push'](_0x12d460[_0x1abba1(0x29d)]+'\x20result'+(_0x12d460[_0x1abba1(0x29d)]!==0x1?'s':''));if(_0x12d460[_0x1abba1(0x353)]!=null)_0x337bf4['push'](_0x12d460[_0x1abba1(0x353)]+'ms');console['log'](_0x1abba1(0x1b9)+_0x89fdf(_0x11b2f7[_0x1abba1(0x239)],_0x337bf4[_0x1abba1(0x161)]('\x20\x20·\x20\x20')));}console[_0x1abba1(0xdd)]('');}function _0x1f2b9e(_0x2bd5b8,_0x10ee2e=''){const _0x2d3f58=_0x42fa8f;if(_0x2bd5b8===null||_0x2bd5b8===undefined){console['log'](_0x10ee2e+_0x89fdf(_0x11b2f7['dim'],_0x2d3f58(0x30e)));return;}if(Array['isArray'](_0x2bd5b8)){if(_0x2bd5b8[_0x2d3f58(0x1b0)]===0x0){console[_0x2d3f58(0xdd)](_0x10ee2e+_0x89fdf(_0x11b2f7[_0x2d3f58(0x239)],'(empty)'));return;}if(_0x2bd5b8['every'](_0x3919f2=>_0x3919f2&&typeof _0x3919f2===_0x2d3f58(0x347)&&_0x2d3f58(0x15b)in _0x3919f2&&_0x2d3f58(0x1d2)in _0x3919f2)){_0x19fc3a(_0x2bd5b8,_0x10ee2e);return;}if(_0x2bd5b8[_0x2d3f58(0x33b)](_0x464259=>_0x464259&&typeof _0x464259==='object'&&_0x2d3f58(0x358)in _0x464259&&_0x2d3f58(0x29d)in _0x464259)){_0x562255(_0x2bd5b8,_0x10ee2e);return;}if(_0x2bd5b8[_0x2d3f58(0x33b)](_0x2a3292=>typeof _0x2a3292!=='object'||_0x2a3292===null)){_0x2bd5b8[_0x2d3f58(0x262)]((_0x661939,_0x5ae58c)=>console['log'](_0x10ee2e+_0x89fdf(_0x11b2f7[_0x2d3f58(0x2d2)],_0x5ae58c+0x1+'.')+'\x20'+_0x89fdf(_0x11b2f7[_0x2d3f58(0xe3)],String(_0x661939))));return;}_0x2bd5b8[_0x2d3f58(0x262)]((_0x5b0a76,_0xf3db8d)=>{const _0x273399=_0x2d3f58;console[_0x273399(0xdd)](_0x10ee2e+_0x89fdf(_0x11b2f7[_0x273399(0x239)],'['+_0xf3db8d+']'));if(typeof _0x5b0a76===_0x273399(0x347)&&_0x5b0a76!==null)_0x20d724(_0x5b0a76,_0x10ee2e+'\x20\x20');else console[_0x273399(0xdd)](_0x10ee2e+'\x20\x20'+String(_0x5b0a76));});return;}if(typeof _0x2bd5b8==='object'){if(_0x2d3f58(0x15b)in _0x2bd5b8&&_0x2d3f58(0x1d2)in _0x2bd5b8&&Object[_0x2d3f58(0x116)](_0x2bd5b8)[_0x2d3f58(0x1b0)]<=0x3){console['log'](_0x10ee2e+_0x89fdf(_0x11b2f7[_0x2d3f58(0x1a2)]+_0x11b2f7[_0x2d3f58(0x2a8)],String(_0x2bd5b8['key'])));const _0x7798a3=_0x2bd5b8[_0x2d3f58(0x1d2)];if(_0x7798a3&&typeof _0x7798a3==='object')_0x20d724(_0x7798a3,_0x10ee2e);else console[_0x2d3f58(0xdd)](_0x10ee2e+_0x89fdf(_0x11b2f7[_0x2d3f58(0xe3)],String(_0x7798a3)));return;}_0x20d724(_0x2bd5b8,_0x10ee2e);return;}console['log'](_0x10ee2e+_0x89fdf(_0x11b2f7[_0x2d3f58(0xe3)],String(_0x2bd5b8)));}function _0x20d724(_0xeddde0,_0x19f0e9=''){const _0x30153d=_0x42fa8f,_0x3d6b5f=Object[_0x30153d(0x27c)](_0xeddde0);if(_0x3d6b5f[_0x30153d(0x1b0)]===0x0){console[_0x30153d(0xdd)](_0x19f0e9+_0x89fdf(_0x11b2f7[_0x30153d(0x239)],'{}'));return;}const _0x3f1407=Math[_0x30153d(0xbe)](0x1c,Math[_0x30153d(0x261)](..._0x3d6b5f[_0x30153d(0x282)](([_0x2b0642])=>_0x2b0642[_0x30153d(0x1b0)])));for(const [_0x28014b,_0x17a310]of _0x3d6b5f){const _0x440f20=_0x89fdf(_0x11b2f7[_0x30153d(0x2a8)],_0x28014b[_0x30153d(0x20b)](_0x3f1407));if(_0x17a310===null||_0x17a310===undefined)console[_0x30153d(0xdd)](_0x19f0e9+_0x440f20+'\x20\x20'+_0x89fdf(_0x11b2f7[_0x30153d(0x239)],_0x30153d(0x229)));else{if(typeof _0x17a310===_0x30153d(0x347)){const _0x523634=JSON[_0x30153d(0xf3)](_0x17a310);_0x523634[_0x30153d(0x1b0)]<=0x50?console[_0x30153d(0xdd)](_0x19f0e9+_0x440f20+'\x20\x20'+_0x89fdf(_0x11b2f7[_0x30153d(0x239)],_0x523634)):(console['log'](_0x19f0e9+_0x440f20),_0x1f2b9e(_0x17a310,_0x19f0e9+'\x20\x20'));}else{const _0x19d57c=typeof _0x17a310===_0x30153d(0x254)?_0x89fdf(_0x17a310?_0x11b2f7[_0x30153d(0xc6)]:_0x11b2f7['yellow'],String(_0x17a310)):typeof _0x17a310===_0x30153d(0x2e3)?_0x89fdf(_0x11b2f7['magenta'],String(_0x17a310)):_0x89fdf(_0x11b2f7['white'],String(_0x17a310));console[_0x30153d(0xdd)](_0x19f0e9+_0x440f20+'\x20\x20'+_0x19d57c);}}}}function _0x19fc3a(_0x1f37d6,_0x4f9098=''){const _0x49d882=_0x42fa8f,_0x395ea2=Math[_0x49d882(0xbe)](0x20,Math[_0x49d882(0x261)](..._0x1f37d6['map'](_0x431e6e=>String(_0x431e6e[_0x49d882(0x15b)])[_0x49d882(0x1b0)])));for(const {key:_0xbb3203,value:_0x37ec04,score:_0x1eade7,clock:_0x2c7dbf}of _0x1f37d6){const _0x161566=_0x89fdf(_0x11b2f7['bold']+_0x11b2f7[_0x49d882(0x2a8)],String(_0xbb3203)[_0x49d882(0x20b)](_0x395ea2)),_0x2ccf93=_0x37ec04==null?_0x89fdf(_0x11b2f7[_0x49d882(0x239)],_0x49d882(0x229)):typeof _0x37ec04==='object'?_0x89fdf(_0x11b2f7['dim'],JSON[_0x49d882(0xf3)](_0x37ec04)):_0x89fdf(_0x11b2f7[_0x49d882(0xe3)],String(_0x37ec04)),_0x3ce274=_0x1eade7!=null?_0x89fdf(_0x11b2f7[_0x49d882(0x2d2)],'\x20\x20score:'+_0x1eade7[_0x49d882(0x35a)](0x4)):'',_0x5a5db0=_0x2c7dbf!=null?_0x89fdf(_0x11b2f7['gray'],_0x49d882(0x25b)+_0x2c7dbf):'';console[_0x49d882(0xdd)](_0x4f9098+_0x161566+'\x20\x20'+_0x2ccf93+_0x3ce274+_0x5a5db0);}}function _0x562255(_0x47f340,_0x2f4df6=''){const _0x3a05f8=_0x42fa8f,_0x22f38c=Math[_0x3a05f8(0xbe)](0x20,Math[_0x3a05f8(0x261)](..._0x47f340['map'](_0x19c897=>_0x19c897['type']['length'])));for(const {type:_0x321d7e,count:_0x4751d0,fields:_0x62fb4c}of _0x47f340){if(_0x321d7e[_0x3a05f8(0x1ef)]('~'))continue;const _0x4688c2=_0x89fdf(_0x11b2f7[_0x3a05f8(0x1a2)]+_0x11b2f7[_0x3a05f8(0x2a8)],_0x321d7e[_0x3a05f8(0x20b)](_0x22f38c)),_0x274eef=_0x89fdf(_0x11b2f7[_0x3a05f8(0x257)],String(_0x4751d0)[_0x3a05f8(0x385)](0x6))+_0x89fdf(_0x11b2f7['dim'],_0x3a05f8(0x224)),_0x4bad99=_0x62fb4c&&Object[_0x3a05f8(0x116)](_0x62fb4c)[_0x3a05f8(0x1b0)]?_0x89fdf(_0x11b2f7['dim'],_0x3a05f8(0x16e)+Object[_0x3a05f8(0x116)](_0x62fb4c)['slice'](0x0,0x6)[_0x3a05f8(0x161)](',\x20')+(Object[_0x3a05f8(0x116)](_0x62fb4c)[_0x3a05f8(0x1b0)]>0x6?'…':'')):'';console[_0x3a05f8(0xdd)](_0x2f4df6+_0x4688c2+'\x20\x20'+_0x274eef+_0x4bad99);}}const _0x3c2de4=['types',_0x42fa8f(0x329),_0x42fa8f(0x1a6),'files/',_0x42fa8f(0x118),_0x42fa8f(0x310)];function _0x16edf5(_0x504656,_0x4ac1fb){const _0x259df2=_0x42fa8f;if(_0x504656['startsWith'](_0x259df2(0xe1)))return _0x504656;if(_0x504656[_0x259df2(0x1ef)]('/'))return _0x259df2(0x32c)+_0x504656;if(_0x504656[_0x259df2(0x1ef)]('env/'))return _0x259df2(0xe1)+_0x504656;const _0x18eb5e=_0x3c2de4[_0x259df2(0x16d)](_0x14b44e=>_0x504656===_0x14b44e[_0x259df2(0x156)](/\/$/,'')||_0x504656[_0x259df2(0x1ef)](_0x14b44e));return _0x18eb5e?_0x259df2(0x2e1)+_0x4ac1fb+'/'+_0x504656:_0x259df2(0xe1)+_0x504656;}function _0x1b4e59(_0x37a67b){const _0x28fd01=_0x42fa8f,_0x1fdae3={},_0x2533bf=[];let _0x37d070=0x0;while(_0x37d070<_0x37a67b[_0x28fd01(0x1b0)]){if((_0x37a67b[_0x37d070]===_0x28fd01(0x172)||_0x37a67b[_0x37d070]==='-e')&&_0x37a67b[_0x37d070+0x1]&&!_0x37a67b[_0x37d070+0x1][_0x28fd01(0x1ef)]('-'))_0x1fdae3['env']=_0x37a67b[++_0x37d070];else _0x37a67b[_0x37d070]==='--help'||_0x37a67b[_0x37d070]==='-h'?_0x1fdae3[_0x28fd01(0x303)]=!![]:_0x2533bf[_0x28fd01(0x231)](_0x37a67b[_0x37d070]);_0x37d070++;}return{'flags':_0x1fdae3,'rest':_0x2533bf};}const _0x2abba6={'system':'System','envs':_0x42fa8f(0x391),'types':_0x42fa8f(0x2ef),'data':_0x42fa8f(0x375),'indexes':'Indexes','fts':_0x42fa8f(0x33f),'sync':_0x42fa8f(0xec),'queue':'Queue','files':_0x42fa8f(0x1fb),'embeddings':_0x42fa8f(0x337),'engines':'Engines','admin':'Admin','event':'Events','processor':_0x42fa8f(0x339)},_0x407553=['system',_0x42fa8f(0x355),_0x42fa8f(0x30b),'data','indexes',_0x42fa8f(0x1b6),_0x42fa8f(0x36a),'queue',_0x42fa8f(0x174),'embeddings',_0x42fa8f(0x34a),_0x42fa8f(0x1f2)];function _0x199895(_0x861990){const _0x576933=_0x42fa8f;return _0x861990['replace'](/^\/api/,'')[_0x576933(0x156)](/^\[\/env\/:env=[^\]]*\]/,_0x576933(0x1f9))[_0x576933(0x156)](/^\/env\/:env/,_0x576933(0x2db))[_0x576933(0x156)](/^\//,'');}function _0x5226e8(_0x5cb07d,_0x3145da=''){const _0x5ac13d=_0x42fa8f,_0x1becee=_0x5cb07d['http']['listRoutes']()[_0x5ac13d(0x234)](_0x1b6342=>!_0x1b6342['meta']?.['hidden']),_0x50bf5b=_0x3145da?_0x1becee['filter'](_0x3a6326=>_0x3a6326[_0x5ac13d(0x348)][_0x5ac13d(0x108)]()[_0x5ac13d(0x366)](_0x3145da[_0x5ac13d(0x108)]())||(_0x4caf95(_0x3a6326)??'')[_0x5ac13d(0x108)]()[_0x5ac13d(0x366)](_0x3145da[_0x5ac13d(0x108)]())||_0x1d4312(_0x3a6326)[_0x5ac13d(0x16d)](_0x39e136=>_0x39e136['toLowerCase']()[_0x5ac13d(0x366)](_0x3145da['toLowerCase']()))):_0x1becee;if(!_0x50bf5b[_0x5ac13d(0x1b0)]){console['log'](_0x89fdf(_0x11b2f7['yellow'],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x3145da+'\x22\x0a'));return;}const _0x4a9628=new Map();for(const _0x48bc89 of _0x50bf5b){const _0x225d57=_0x1d4312(_0x48bc89)[0x0]??'other';if(!_0x4a9628[_0x5ac13d(0x158)](_0x225d57))_0x4a9628['set'](_0x225d57,[]);_0x4a9628[_0x5ac13d(0x187)](_0x225d57)['push'](_0x48bc89);}const _0x57cb2b=[..._0x407553[_0x5ac13d(0x234)](_0x1c8d43=>_0x4a9628[_0x5ac13d(0x158)](_0x1c8d43)),...[..._0x4a9628[_0x5ac13d(0x116)]()][_0x5ac13d(0x234)](_0x372af5=>!_0x407553[_0x5ac13d(0x366)](_0x372af5))];console[_0x5ac13d(0xdd)]('');for(const _0x1eaf06 of _0x57cb2b){const _0x22397f=_0x4a9628[_0x5ac13d(0x187)](_0x1eaf06);if(!_0x22397f?.[_0x5ac13d(0x1b0)])continue;console[_0x5ac13d(0xdd)](_0x89fdf(_0x11b2f7['bold'],'\x20\x20'+(_0x2abba6[_0x1eaf06]??_0x1eaf06)));for(const _0xa8df98 of _0x22397f){const _0x500bf5=_0x89fdf(_0x11b2f7[_0x5ac13d(0x257)],_0xa8df98[_0x5ac13d(0x2ca)][_0x5ac13d(0x20b)](0x7)),_0x157d55=_0x89fdf(_0x11b2f7['cyan'],_0x199895(_0xa8df98[_0x5ac13d(0x348)])),_0x332a8f=_0x4caf95(_0xa8df98)?_0x89fdf(_0x11b2f7[_0x5ac13d(0x239)],'\x20\x20'+_0x4caf95(_0xa8df98)):'',_0x3bf0fa=_0xa8df98[_0x5ac13d(0x1f5)]?.['id']?_0x89fdf(_0x11b2f7[_0x5ac13d(0x2d2)],_0x5ac13d(0x242)+_0xa8df98[_0x5ac13d(0x1f5)]['id']+']'):'';console[_0x5ac13d(0xdd)]('\x20\x20\x20\x20'+_0x500bf5+'\x20'+_0x157d55+_0x332a8f+_0x3bf0fa);}console[_0x5ac13d(0xdd)]('');}}function _0x4ef7a5(_0x615dad,_0x52c776){const _0x5b2862=_0x42fa8f,_0x5f1b07=_0x52c776[_0x5b2862(0x156)](/^\/api(\/env\/[^/]+)?\//,'')[_0x5b2862(0xb7)]('/')[0x0],_0x54a4ed=_0x615dad[_0x5b2862(0x232)]['listRoutes']()[_0x5b2862(0x234)](_0x4ce8b9=>_0x4ce8b9[_0x5b2862(0x348)][_0x5b2862(0x108)]()[_0x5b2862(0x366)](_0x5f1b07['toLowerCase']()));if(!_0x54a4ed[_0x5b2862(0x1b0)]){console[_0x5b2862(0xdd)](_0x89fdf(_0x11b2f7[_0x5b2862(0x177)],_0x5b2862(0x126)+_0x52c776+'\x0a'));return;}console[_0x5b2862(0xdd)]('');for(const _0x58737d of _0x54a4ed[_0x5b2862(0x341)](0x0,0xc)){for(const _0x4cd0e5 of _0x3d612c(_0x58737d)){console[_0x5b2862(0xdd)](_0x4cd0e5);}console['log']('');}}function _0x4caf95(_0x3920fd){const _0x27facf=_0x42fa8f;return _0x3920fd[_0x27facf(0x1f5)]?.['summary']??_0x3920fd['meta']?.[_0x27facf(0x349)]??'';}function _0x5b4d99(_0x6d2279){const _0x200532=_0x42fa8f;return _0x6d2279[_0x200532(0x1f5)]?.['description']??_0x6d2279['meta']?.[_0x200532(0x217)]??'';}function _0x1d4312(_0x39e3ba){const _0x59c5ec=_0x42fa8f;return _0x39e3ba[_0x59c5ec(0x1f5)]?.[_0x59c5ec(0x23b)]?.[_0x59c5ec(0x1b0)]?_0x39e3ba[_0x59c5ec(0x1f5)][_0x59c5ec(0x23b)]:_0x39e3ba[_0x59c5ec(0x259)]?.['tags']??[];}function _0x3d612c(_0x1e9073){const _0x75356a=_0x42fa8f,_0x438931=[];_0x438931[_0x75356a(0x231)]('\x20\x20'+_0x89fdf(_0x11b2f7[_0x75356a(0x1a2)]+_0x11b2f7[_0x75356a(0x257)],_0x1e9073[_0x75356a(0x2ca)]['padEnd'](0x7))+'\x20'+_0x89fdf(_0x11b2f7['bold']+_0x11b2f7[_0x75356a(0x2a8)],_0x1e9073[_0x75356a(0x348)]));_0x1e9073[_0x75356a(0x1f5)]?.['id']&&_0x438931[_0x75356a(0x231)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x89fdf(_0x11b2f7[_0x75356a(0x2d2)],'id:\x20'+_0x1e9073['operation']['id']));_0x4caf95(_0x1e9073)&&_0x438931[_0x75356a(0x231)](_0x75356a(0x12d)+_0x89fdf(_0x11b2f7['white'],_0x4caf95(_0x1e9073)));_0x5b4d99(_0x1e9073)&&_0x438931[_0x75356a(0x231)](_0x75356a(0x12d)+_0x89fdf(_0x11b2f7[_0x75356a(0x239)],_0x5b4d99(_0x1e9073)));_0x1d4312(_0x1e9073)[_0x75356a(0x1b0)]&&_0x438931['push'](_0x75356a(0x12d)+_0x89fdf(_0x11b2f7['gray'],'tags:\x20'+_0x1d4312(_0x1e9073)[_0x75356a(0x161)](',\x20')));_0x1e9073['operation']?.['safety']?.['access']&&_0x438931[_0x75356a(0x231)](_0x75356a(0x12d)+_0x89fdf(_0x11b2f7[_0x75356a(0x2d2)],'access:\x20'+_0x1e9073[_0x75356a(0x1f5)][_0x75356a(0x2c7)]['access']));_0x1e9073[_0x75356a(0x1f5)]?.[_0x75356a(0x232)]?.[_0x75356a(0x2dd)]&&_0x1e9073[_0x75356a(0x1f5)][_0x75356a(0x232)][_0x75356a(0x2dd)]!=='standard'&&_0x438931[_0x75356a(0x231)](_0x75356a(0x12d)+_0x89fdf(_0x11b2f7[_0x75356a(0x2d2)],_0x75356a(0x15f)+_0x1e9073[_0x75356a(0x1f5)][_0x75356a(0x232)][_0x75356a(0x2dd)]));if(_0x1e9073[_0x75356a(0x1f5)]?.['inputSchema']){const _0x393c58=Object[_0x75356a(0x116)](_0x1e9073[_0x75356a(0x1f5)][_0x75356a(0x1bd)]['properties']||{});if(_0x393c58['length'])_0x438931[_0x75356a(0x231)](_0x75356a(0x12d)+_0x89fdf(_0x11b2f7[_0x75356a(0x2d2)],_0x75356a(0xa3)+_0x393c58['join'](',\x20')));}return _0x1e9073[_0x75356a(0x259)]?.['body']&&_0x438931[_0x75356a(0x231)](_0x75356a(0x12d)+_0x89fdf(_0x11b2f7['gray'],_0x75356a(0xbd)+JSON['stringify'](_0x1e9073[_0x75356a(0x259)][_0x75356a(0x326)]))),_0x438931;}async function _0x383b4c(_0x56ba09,_0x11b283,_0x54784a,_0x2e3a2c=null){const _0x58d010=_0x42fa8f,_0x3a4ed1=_0x54784a[_0x58d010(0xea)]('?'),_0x2fde4a=_0x3a4ed1>=0x0?_0x54784a[_0x58d010(0x341)](0x0,_0x3a4ed1):_0x54784a,_0x2d40ff=_0x3a4ed1>=0x0?_0x54784a['slice'](_0x3a4ed1+0x1):'',_0x5e4a3d=Object['fromEntries'](new URLSearchParams(_0x2d40ff)[_0x58d010(0x27c)]());return _0x56ba09[_0x58d010(0x232)][_0x58d010(0x23d)](_0x11b283,_0x2fde4a,{'body':_0x2e3a2c,'query':_0x5e4a3d,'headers':{'content-type':_0x58d010(0x32d)}},{'internal':!![]});}function _0x2ca322(_0x3fc29b){const _0x795468=_0x42fa8f;if(!_0x3fc29b)return null;const _0x34d15f=_0x3fc29b[_0x795468(0x15e)]();if(!_0x34d15f)return null;try{return JSON[_0x795468(0x179)](_0x34d15f);}catch{}try{return JSON[_0x795468(0x179)](_0x460b19(_0x34d15f));}catch(_0x232d69){throw new SyntaxError(_0x232d69['message'],{'cause':_0x232d69});}}function _0x460b19(_0x3e5681){const _0x41f141=_0x42fa8f;let _0x292d49='',_0xfde5bf=0x0;while(_0xfde5bf<_0x3e5681['length']){const _0xee358a=_0x3e5681[_0xfde5bf];if(_0xee358a==='\x22'){_0x292d49+='\x22',_0xfde5bf++;while(_0xfde5bf<_0x3e5681[_0x41f141(0x1b0)]&&_0x3e5681[_0xfde5bf]!=='\x22'){if(_0x3e5681[_0xfde5bf]==='\x5c'){_0x292d49+=_0x3e5681[_0xfde5bf++];if(_0xfde5bf<_0x3e5681['length'])_0x292d49+=_0x3e5681[_0xfde5bf++];}else _0x292d49+=_0x3e5681[_0xfde5bf++];}_0x292d49+='\x22';if(_0xfde5bf<_0x3e5681[_0x41f141(0x1b0)])_0xfde5bf++;continue;}if(_0xee358a==='\x27'){_0x292d49+='\x22',_0xfde5bf++;while(_0xfde5bf<_0x3e5681[_0x41f141(0x1b0)]&&_0x3e5681[_0xfde5bf]!=='\x27'){if(_0x3e5681[_0xfde5bf]==='\x5c'&&_0x3e5681[_0xfde5bf+0x1]==='\x27')_0x292d49+='\x27',_0xfde5bf+=0x2;else _0x3e5681[_0xfde5bf]==='\x22'?(_0x292d49+='\x5c\x22',_0xfde5bf++):_0x292d49+=_0x3e5681[_0xfde5bf++];}_0x292d49+='\x22';if(_0xfde5bf<_0x3e5681['length'])_0xfde5bf++;continue;}if(_0x41f141(0x13a)[_0x41f141(0x366)](_0xee358a)){_0x292d49+=_0xee358a,_0xfde5bf++;continue;}let _0x1aeebb='';while(_0xfde5bf<_0x3e5681[_0x41f141(0x1b0)]&&!_0x41f141(0x107)['includes'](_0x3e5681[_0xfde5bf])&&_0x3e5681[_0xfde5bf]!=='\x20'&&_0x3e5681[_0xfde5bf]!=='\x09'&&_0x3e5681[_0xfde5bf]!=='\x0a'&&_0x3e5681[_0xfde5bf]!=='\x0d'){_0x1aeebb+=_0x3e5681[_0xfde5bf++];}let _0x3adea4=_0xfde5bf;while(_0x3adea4<_0x3e5681[_0x41f141(0x1b0)]&&(_0x3e5681[_0x3adea4]==='\x20'||_0x3e5681[_0x3adea4]==='\x09'))_0x3adea4++;if(_0x3e5681[_0x3adea4]===':')_0x292d49+='\x22'+_0x1aeebb+'\x22';else _0x1aeebb===_0x41f141(0x226)||_0x1aeebb===_0x41f141(0x201)||_0x1aeebb===_0x41f141(0x229)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x41f141(0x2f5)](_0x1aeebb)?_0x292d49+=_0x1aeebb:_0x292d49+='\x22'+_0x1aeebb+'\x22';}return _0x292d49[_0x41f141(0x156)](/,(\s*[}\]])/g,'$1');}function _0x3c020f(_0x1a516c){const _0x3fd64a=_0x42fa8f,_0x593b3f=[];let _0xfcd69d=0x0;while(_0xfcd69d<_0x1a516c[_0x3fd64a(0x1b0)]){while(_0xfcd69d<_0x1a516c[_0x3fd64a(0x1b0)]&&(_0x1a516c[_0xfcd69d]==='\x20'||_0x1a516c[_0xfcd69d]==='\x09'))_0xfcd69d++;if(_0xfcd69d>=_0x1a516c[_0x3fd64a(0x1b0)])break;const _0x5162df=_0x1a516c[_0xfcd69d];if(_0x5162df==='{'||_0x5162df==='['){const _0x23fc26=_0x5162df==='{'?'}':']',_0x396a81=_0xfcd69d++;let _0x3af341=0x1,_0x454852=![],_0x1f779d='';while(_0xfcd69d<_0x1a516c[_0x3fd64a(0x1b0)]&&_0x3af341>0x0){const _0x51036d=_0x1a516c[_0xfcd69d];if(_0x454852){if(_0x51036d==='\x5c')_0xfcd69d++;else{if(_0x51036d===_0x1f779d)_0x454852=![];}}else{if(_0x51036d==='\x22'||_0x51036d==='\x27')_0x454852=!![],_0x1f779d=_0x51036d;else{if(_0x51036d===_0x5162df)_0x3af341++;else{if(_0x51036d===_0x23fc26)_0x3af341--;}}}_0xfcd69d++;}_0x593b3f[_0x3fd64a(0x231)](_0x1a516c[_0x3fd64a(0x341)](_0x396a81,_0xfcd69d));continue;}if(_0x5162df==='\x22'||_0x5162df==='\x27'){const _0xd85401=_0x5162df;_0xfcd69d++;let _0x82d7e1='';while(_0xfcd69d<_0x1a516c[_0x3fd64a(0x1b0)]&&_0x1a516c[_0xfcd69d]!==_0xd85401){if(_0x1a516c[_0xfcd69d]==='\x5c'&&_0xfcd69d+0x1<_0x1a516c['length'])_0xfcd69d++,_0x82d7e1+=_0x1a516c[_0xfcd69d++];else _0x82d7e1+=_0x1a516c[_0xfcd69d++];}if(_0xfcd69d<_0x1a516c[_0x3fd64a(0x1b0)])_0xfcd69d++;_0x593b3f['push'](_0x82d7e1);continue;}let _0x1c257d='';while(_0xfcd69d<_0x1a516c['length']&&_0x1a516c[_0xfcd69d]!=='\x20'&&_0x1a516c[_0xfcd69d]!=='\x09'&&_0x1a516c[_0xfcd69d]!=='{'&&_0x1a516c[_0xfcd69d]!=='['){_0x1c257d+=_0x1a516c[_0xfcd69d++];}if(_0x1c257d)_0x593b3f['push'](_0x1c257d);}return _0x593b3f;}function _0x575b07(_0x1d1216,_0x294101){const _0xdadd60=_0x42fa8f,_0x432477=[..._0x1d1216[_0xdadd60(0xf9)][_0xdadd60(0x116)]()][_0xdadd60(0x234)](_0xc13a11=>!_0xc13a11[_0xdadd60(0x1ef)]('~'));console['log'](['',_0x89fdf(_0x11b2f7[_0xdadd60(0x1a2)]+_0x11b2f7[_0xdadd60(0x2a8)],_0xdadd60(0x188)),_0x89fdf(_0x11b2f7[_0xdadd60(0x1a2)]+_0x11b2f7[_0xdadd60(0x2a8)],_0xdadd60(0x325))+_0x89fdf(_0x11b2f7[_0xdadd60(0x1a2)],_0xdadd60(0x1cf))+_0x89fdf(_0x11b2f7[_0xdadd60(0x1a2)]+_0x11b2f7[_0xdadd60(0x2a8)],'║'),_0x89fdf(_0x11b2f7[_0xdadd60(0x1a2)]+_0x11b2f7[_0xdadd60(0x2a8)],_0xdadd60(0x38c)),'','\x20\x20'+_0x89fdf(_0x11b2f7[_0xdadd60(0xc6)],'✓')+'\x20'+_0x89fdf(_0x11b2f7[_0xdadd60(0x1a2)],_0xdadd60(0xd7))+'\x20\x20http://localhost:'+_0x294101[_0xdadd60(0x1e9)],'\x20\x20'+_0x89fdf(_0x11b2f7[_0xdadd60(0xc6)],'✓')+'\x20'+_0x89fdf(_0x11b2f7['bold'],_0xdadd60(0xdc))+'\x20\x20\x20\x20\x20http://localhost:'+_0x294101[_0xdadd60(0x1e9)]+'/api','\x20\x20'+_0x89fdf(_0x11b2f7[_0xdadd60(0xc6)],'✓')+'\x20'+_0x89fdf(_0x11b2f7[_0xdadd60(0x1a2)],_0xdadd60(0x348))+_0xdadd60(0x125)+_0x294101[_0xdadd60(0x36d)],'\x20\x20'+_0x89fdf(_0x11b2f7[_0xdadd60(0xc6)],'✓')+'\x20'+_0x89fdf(_0x11b2f7['bold'],'id')+_0xdadd60(0x38f)+_0x89fdf(_0x11b2f7[_0xdadd60(0x2d2)],_0x1d1216['id']),'\x20\x20'+_0x89fdf(_0x11b2f7[_0xdadd60(0xc6)],'✓')+'\x20'+_0x89fdf(_0x11b2f7[_0xdadd60(0x1a2)],_0xdadd60(0x355))+_0xdadd60(0x125)+_0x432477[_0xdadd60(0x282)](_0x29ab05=>_0x89fdf(_0x11b2f7[_0xdadd60(0x2a8)],_0x29ab05))['join']('\x20\x20'),..._0x294101['noAdmin']?[]:['\x20\x20'+_0x89fdf(_0x11b2f7[_0xdadd60(0xc6)],'✓')+'\x20'+_0x89fdf(_0x11b2f7[_0xdadd60(0x1a2)],'admin')+_0xdadd60(0x33d)+_0x294101['port']+_0xdadd60(0x2fc)],'',_0x89fdf(_0x11b2f7['dim'],'\x20\x20Type\x20'+_0x89fdf(_0x11b2f7[_0xdadd60(0x1a2)],_0xdadd60(0x303))+_0xdadd60(0x203)+_0x89fdf(_0x11b2f7[_0xdadd60(0x1a2)],_0xdadd60(0x21d))+_0xdadd60(0x182)+_0x89fdf(_0x11b2f7[_0xdadd60(0x1a2)],'exit')+_0xdadd60(0x12b)),'']['join']('\x0a'));}function _0x28cfb6(_0x34330c){const _0xe0ff00=_0x42fa8f;console[_0xe0ff00(0xdd)]('\x0a'+_0x89fdf(_0x11b2f7[_0xe0ff00(0x1a2)],_0xe0ff00(0xfe))+'\x20\x20'+_0x89fdf(_0x11b2f7[_0xe0ff00(0x239)],_0xe0ff00(0x27f))+_0xe0ff00(0x11f)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2a8)],_0xe0ff00(0xe0))+_0xe0ff00(0x12c)+_0x89fdf(_0x11b2f7['cyan'],_0xe0ff00(0xe0))+'\x20'+_0x89fdf(_0x11b2f7[_0xe0ff00(0x177)],'<json-body>')+_0xe0ff00(0xa5)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2a8)],_0xe0ff00(0x23a))+'\x20'+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2a8)],_0xe0ff00(0xe0))+'\x20'+_0x89fdf(_0x11b2f7[_0xe0ff00(0x177)],_0xe0ff00(0x372))+_0xe0ff00(0x123)+_0x89fdf(_0x11b2f7['dim'],_0xe0ff00(0x16f))+_0xe0ff00(0x320)+_0x89fdf(_0x11b2f7['gray'],_0xe0ff00(0x1f8))+'\x20\x20\x20\x20\x20\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'+_0x89fdf(_0x11b2f7['gray'],_0xe0ff00(0x355))+'\x20\x20\x20\x20\x20\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'+_0x89fdf(_0x11b2f7['gray'],'types')+'\x20\x20\x20\x20\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/'+_0x34330c['env']+_0xe0ff00(0xee)+_0x89fdf(_0x11b2f7['gray'],_0xe0ff00(0x333))+_0xe0ff00(0xf0)+_0x34330c[_0xe0ff00(0x2fd)]+_0xe0ff00(0x330)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2d2)],_0xe0ff00(0x98))+_0xe0ff00(0x142)+_0x34330c[_0xe0ff00(0x2fd)]+_0xe0ff00(0x2f1)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2d2)],_0xe0ff00(0x2d8))+_0xe0ff00(0x318)+_0x34330c[_0xe0ff00(0x2fd)]+_0xe0ff00(0x1b3)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2d2)],_0xe0ff00(0x260))+_0xe0ff00(0x320)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2d2)],_0xe0ff00(0x17c))+_0xe0ff00(0x320)+_0x89fdf(_0x11b2f7['gray'],'env/staging/info')+_0xe0ff00(0xbf)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x1a2)],'\x20\x20Flags')+'\x20\x20'+_0x89fdf(_0x11b2f7['dim'],'(on\x20any\x20path\x20command)')+_0xe0ff00(0x11f)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2a8)],_0xe0ff00(0x2ad))+_0xe0ff00(0x312)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2a8)],_0xe0ff00(0x38b))+_0xe0ff00(0x26a)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x239)],_0xe0ff00(0x16f))+_0xe0ff00(0x320)+_0x89fdf(_0x11b2f7['gray'],_0xe0ff00(0x389))+_0xe0ff00(0x320)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2d2)],_0xe0ff00(0x10d))+_0xe0ff00(0x320)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2d2)],_0xe0ff00(0x20a))+'\x0a\x0a'+_0x89fdf(_0x11b2f7['bold'],'\x20\x20Shell\x20commands')+'\x0a\x0a\x20\x20'+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2a8)],_0xe0ff00(0x2e6))+_0xe0ff00(0x1ca)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2a8)],_0xe0ff00(0x2fd))+_0xe0ff00(0x38d)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2a8)],'routes')+'\x20'+_0x89fdf(_0x11b2f7[_0xe0ff00(0x239)],_0xe0ff00(0x1ae))+_0xe0ff00(0x256)+_0x89fdf(_0x11b2f7['cyan'],_0xe0ff00(0x91))+'\x20'+_0x89fdf(_0x11b2f7['dim'],_0xe0ff00(0x25e))+_0xe0ff00(0x36b)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2a8)],_0xe0ff00(0x2f9))+_0xe0ff00(0x84)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2a8)],_0xe0ff00(0x303))+_0xe0ff00(0x29e)+_0x89fdf(_0x11b2f7[_0xe0ff00(0x2a8)],_0xe0ff00(0x15d))+'\x20'+_0x89fdf(_0x11b2f7[_0xe0ff00(0x239)],_0xe0ff00(0x236))+_0xe0ff00(0x2cd));}async function _0x2ce730(_0x4630d4,_0x5be2b4=0x0){const _0x5b6c52=_0x42fa8f;process['stdout']['write']('\x0a'),console[_0x5b6c52(0xdd)](_0x89fdf(_0x11b2f7[_0x5b6c52(0x177)],_0x5b6c52(0x2cc)));try{await _0x4630d4[_0x5b6c52(0x2a5)]();}catch(_0x3d2309){console[_0x5b6c52(0x266)](_0x89fdf(_0x11b2f7['red'],'\x20\x20'+_0x3d2309[_0x5b6c52(0x307)]));}process[_0x5b6c52(0x15d)](_0x5be2b4);}function _0x55df33(_0x14fa3f){const _0x1b97a5=_0x42fa8f,_0x2fac78=_0x14fa3f[_0x1b97a5(0x2fd)]!=='default'?_0x89fdf(_0x11b2f7['yellow'],'['+_0x14fa3f['env']+']'):'';return _0x89fdf(_0x11b2f7['bold']+_0x11b2f7['cyan'],_0x1b97a5(0x28a))+_0x2fac78+_0x89fdf(_0x11b2f7[_0x1b97a5(0x2d2)],'>\x20');}const _0x20373a=new Set([_0x42fa8f(0x23f),_0x42fa8f(0x2d7),'PUT','PATCH',_0x42fa8f(0x197)]);async function _0x561de8(_0x44976a,_0x356b54,_0x86a75a,_0x34622f,_0x31a5d6,_0x21b0cf){const _0x53e7b0=_0x42fa8f;_0x44976a=_0x44976a[_0x53e7b0(0x15e)]();if(!_0x44976a||_0x44976a[_0x53e7b0(0x1ef)]('#'))return;const _0x1fb9f4=_0x3c020f(_0x44976a),{flags:_0x20c8b5,rest:_0x447605}=_0x1b4e59(_0x1fb9f4);if(!_0x447605[_0x53e7b0(0x1b0)])return;const _0xb8dec1=_0x447605[0x0],_0x5971fd=_0xb8dec1['toUpperCase']();if(_0x5971fd==='HELP'){if(_0x447605[0x1])_0x4ef7a5(_0x356b54,_0x16edf5(_0x447605[0x1],_0x20c8b5[_0x53e7b0(0x2fd)]??_0x31a5d6[_0x53e7b0(0x2fd)]));else _0x28cfb6(_0x31a5d6);return;}if(_0x5971fd===_0x53e7b0(0x2b6)){const _0x224301=_0x447605[0x1];if(!_0x224301){console['log'](_0x89fdf(_0x11b2f7[_0x53e7b0(0x27b)],_0x53e7b0(0x37b)));return;}try{_0x356b54[_0x53e7b0(0x2fd)](_0x224301),_0x31a5d6[_0x53e7b0(0x2fd)]=_0x224301,_0x21b0cf?.[_0x53e7b0(0x364)](_0x55df33(_0x31a5d6)),console[_0x53e7b0(0xdd)](_0x53e7b0(0x1b9)+_0x89fdf(_0x11b2f7['green'],'✓')+_0x53e7b0(0x29b)+_0x89fdf(_0x11b2f7['bold']+_0x11b2f7[_0x53e7b0(0x2a8)],_0x224301)+'\x0a');}catch{console[_0x53e7b0(0xdd)]('\x0a\x20\x20'+_0x89fdf(_0x11b2f7[_0x53e7b0(0x27b)],'✗')+_0x53e7b0(0x8b)+_0x89fdf(_0x11b2f7[_0x53e7b0(0x1a2)],_0x224301)+_0x53e7b0(0x26b)+_0x89fdf(_0x11b2f7[_0x53e7b0(0x239)],_0x53e7b0(0x21b)));}return;}if(_0x5971fd===_0x53e7b0(0x21a)){const _0x1fd495=[..._0x356b54[_0x53e7b0(0xf9)]['keys']()][_0x53e7b0(0x234)](_0x305329=>!_0x305329[_0x53e7b0(0x1ef)]('~'));console[_0x53e7b0(0xdd)]('');for(const _0x25111e of _0x1fd495){const _0x4d59d4=_0x25111e===_0x31a5d6[_0x53e7b0(0x2fd)];console['log']('\x20\x20'+(_0x4d59d4?_0x89fdf(_0x11b2f7['green'],'●'):_0x89fdf(_0x11b2f7[_0x53e7b0(0x239)],'○'))+'\x20\x20'+(_0x4d59d4?_0x89fdf(_0x11b2f7['bold']+_0x11b2f7[_0x53e7b0(0x2a8)],_0x25111e):_0x89fdf(_0x11b2f7[_0x53e7b0(0x239)],_0x25111e)));}console[_0x53e7b0(0xdd)]('\x0a\x20\x20'+_0x89fdf(_0x11b2f7['dim'],_0x53e7b0(0x22c))+'\x20'+_0x89fdf(_0x11b2f7[_0x53e7b0(0x2a8)],_0x31a5d6[_0x53e7b0(0x2fd)])),console[_0x53e7b0(0xdd)]('');return;}if(_0x5971fd===_0x53e7b0(0xdf)){const _0x10692d=[..._0x356b54['_envs']['values']()][_0x53e7b0(0x234)](_0x1fef31=>!_0x1fef31[_0x53e7b0(0x167)]['startsWith']('~'));console[_0x53e7b0(0xdd)]('');const _0x56924d=Math[_0x53e7b0(0x261)](..._0x10692d[_0x53e7b0(0x282)](_0x384a24=>_0x384a24[_0x53e7b0(0x167)]['length']));for(const _0x3fb735 of _0x10692d){const _0x280905=_0x3fb735[_0x53e7b0(0x167)]===_0x31a5d6[_0x53e7b0(0x2fd)],_0x2d4dc3=_0x280905?_0x89fdf(_0x11b2f7[_0x53e7b0(0xc6)],'●'):_0x89fdf(_0x11b2f7[_0x53e7b0(0x239)],'○'),_0x100d95=_0x280905?_0x89fdf(_0x11b2f7[_0x53e7b0(0x1a2)]+_0x11b2f7[_0x53e7b0(0x2a8)],_0x3fb735[_0x53e7b0(0x167)][_0x53e7b0(0x20b)](_0x56924d)):_0x89fdf(_0x11b2f7[_0x53e7b0(0x239)],_0x3fb735[_0x53e7b0(0x167)][_0x53e7b0(0x20b)](_0x56924d)),_0x5338a3=[..._0x3fb735[_0x53e7b0(0x129)][_0x53e7b0(0x116)]()][_0x53e7b0(0x234)](_0x2c3919=>!_0x2c3919['startsWith']('~')),_0x98369f=_0x5338a3['length']?_0x89fdf(_0x11b2f7['dim'],_0x5338a3[_0x53e7b0(0x341)](0x0,0x5)['join'](',\x20')+(_0x5338a3[_0x53e7b0(0x1b0)]>0x5?_0x53e7b0(0x134)+(_0x5338a3[_0x53e7b0(0x1b0)]-0x5)+_0x53e7b0(0x22e):'')):_0x89fdf(_0x11b2f7['dim'],_0x53e7b0(0x278));console[_0x53e7b0(0xdd)]('\x20\x20'+_0x2d4dc3+'\x20\x20'+_0x100d95+'\x20\x20'+_0x98369f);}console[_0x53e7b0(0xdd)]('');return;}if(_0x5971fd===_0x53e7b0(0x183)){const _0x4761ab=_0x20c8b5[_0x53e7b0(0x2fd)]??_0x447605[0x1]??_0x31a5d6[_0x53e7b0(0x2fd)];try{const _0x3818e8=_0x356b54['env'](_0x4761ab),_0x169190=[..._0x3818e8['typeSubDbs'][_0x53e7b0(0x116)]()][_0x53e7b0(0x234)](_0x45903b=>!_0x45903b[_0x53e7b0(0x1ef)]('~'))[_0x53e7b0(0x22d)]();console['log'](_0x53e7b0(0x1b9)+_0x89fdf(_0x11b2f7[_0x53e7b0(0x239)],_0x169190[_0x53e7b0(0x1b0)]+_0x53e7b0(0x1d8)+(_0x169190[_0x53e7b0(0x1b0)]!==0x1?'s':'')+'\x20in\x20'+_0x4761ab));for(const _0x312929 of _0x169190){const _0x17af54=_0x3818e8['typeSubDbs'][_0x53e7b0(0x187)](_0x312929),_0x5033b8=_0x17af54?.[_0x53e7b0(0x8e)]?.[_0x53e7b0(0x1f1)]?.()??0x0,_0x23ca8e=_0x89fdf(_0x11b2f7['bold']+_0x11b2f7[_0x53e7b0(0x2a8)],_0x312929[_0x53e7b0(0x20b)](0x1c));console[_0x53e7b0(0xdd)](_0x53e7b0(0x125)+_0x23ca8e+'\x20\x20'+_0x89fdf(_0x11b2f7[_0x53e7b0(0x257)],String(_0x5033b8)[_0x53e7b0(0x385)](0x6))+'\x20'+_0x89fdf(_0x11b2f7['dim'],'records'));}console[_0x53e7b0(0xdd)]('');}catch(_0x4d52b4){console[_0x53e7b0(0x266)](_0x89fdf(_0x11b2f7[_0x53e7b0(0x27b)],'\x0a\x20\x20'+_0x4d52b4['message']+'\x0a'));}return;}if(_0x5971fd===_0x53e7b0(0x9e)){_0x5226e8(_0x356b54,_0x447605['slice'](0x1)[_0x53e7b0(0x161)]('\x20'));return;}if(_0x5971fd==='LOGS'){const _0x129540=(_0x447605[0x1]??'')[_0x53e7b0(0x108)]();if(!_0x129540||_0x129540==='on')_0x34622f[_0x53e7b0(0x1b8)]=!![],_0x34622f[_0x53e7b0(0x8a)]='info',console[_0x53e7b0(0xdd)](_0x53e7b0(0x1b9)+_0x89fdf(_0x11b2f7[_0x53e7b0(0xc6)],'✓')+_0x53e7b0(0x14c)+_0x89fdf(_0x11b2f7[_0x53e7b0(0x239)],'level:\x20info')+'\x0a');else{if(_0x129540===_0x53e7b0(0x270))_0x34622f[_0x53e7b0(0x1b8)]=![],console['log'](_0x53e7b0(0x1b9)+_0x89fdf(_0x11b2f7['yellow'],'○')+'\x20logs\x20off\x0a');else _0x1b2c94[_0x129540]!==undefined?(_0x34622f[_0x53e7b0(0x1b8)]=!![],_0x34622f[_0x53e7b0(0x8a)]=_0x129540,console['log']('\x0a\x20\x20'+_0x89fdf(_0x11b2f7[_0x53e7b0(0xc6)],'✓')+'\x20log\x20level:\x20'+_0x89fdf(_0x11b2f7[_0x53e7b0(0x1a2)],_0x129540)+'\x0a')):console[_0x53e7b0(0x266)](_0x89fdf(_0x11b2f7[_0x53e7b0(0x27b)],_0x53e7b0(0x12f)));}return;}if(_0x5971fd===_0x53e7b0(0x29a)||_0x5971fd===_0x53e7b0(0xab)){await _0x2ce730(_0x356b54,0x0);return;}if(_0x5971fd===_0x53e7b0(0x1ab)){const _0xaa705e='http://localhost:'+_0x86a75a[_0x53e7b0(0x1e9)]+'/admin/index.html',_0x312814=process[_0x53e7b0(0x16a)]===_0x53e7b0(0x384)?_0x53e7b0(0x168)+_0xaa705e:process[_0x53e7b0(0x16a)]===_0x53e7b0(0x2ce)?_0x53e7b0(0x332)+_0xaa705e:_0x53e7b0(0x148)+_0xaa705e;require$$4[_0x53e7b0(0x124)](_0x312814),console['log']('\x0a\x20\x20'+_0x89fdf(_0x11b2f7['green'],'✓')+'\x20opening\x20'+_0x89fdf(_0x11b2f7[_0x53e7b0(0x2a8)],_0xaa705e)+'\x0a');return;}let _0x5e196c,_0x25b808,_0x79977c;if(_0x20373a[_0x53e7b0(0x158)](_0x5971fd)){_0x5e196c=_0x5971fd,_0x25b808=_0x447605[0x1],_0x79977c=_0x447605['slice'](0x2);if(!_0x25b808){console[_0x53e7b0(0x266)](_0x89fdf(_0x11b2f7['red'],_0x53e7b0(0x340)+_0xb8dec1+'\x20<path>\x20[json-body]'));return;}}else _0x5e196c=null,_0x25b808=_0x447605[0x0],_0x79977c=_0x447605[_0x53e7b0(0x341)](0x1);const _0x2b9a21=_0x20c8b5[_0x53e7b0(0x2fd)]??_0x31a5d6[_0x53e7b0(0x2fd)],_0xff506c=_0x16edf5(_0x25b808,_0x2b9a21);if(_0x20c8b5[_0x53e7b0(0x303)]){_0x4ef7a5(_0x356b54,_0xff506c);return;}let _0x248055=null;if(_0x79977c[_0x53e7b0(0x1b0)]){const _0x4373ef=_0x79977c[_0x53e7b0(0x161)]('\x20');try{_0x248055=_0x2ca322(_0x4373ef);}catch(_0x3da39d){console[_0x53e7b0(0x266)](_0x89fdf(_0x11b2f7[_0x53e7b0(0x27b)],_0x53e7b0(0x90)+_0x4373ef+_0x53e7b0(0x1b9)+_0x89fdf(_0x11b2f7['dim'],_0x3da39d['message'])+'\x0a'));return;}}if(!_0x5e196c)_0x5e196c=_0x248055!==null?_0x53e7b0(0x2d7):_0x53e7b0(0x23f);try{const _0x32043a=await _0x383b4c(_0x356b54,_0x5e196c,_0xff506c,_0x248055);_0x5a56a0(_0x32043a['status'],_0x32043a[_0x53e7b0(0x326)]);}catch(_0x2124ed){console[_0x53e7b0(0x266)](_0x53e7b0(0x1b9)+_0x89fdf(_0x11b2f7['red'],'✗')+'\x20'+_0x2124ed[_0x53e7b0(0x307)]+'\x0a');}}class _0x146d3c{constructor(){const _0x253082=_0x42fa8f;this[_0x253082(0x2ba)]=new Map(),this[_0x253082(0x28f)]=null,this[_0x253082(0x1e0)]=![];}}function _0x5523ad(_0x405782){const _0x4b12e8=_0x42fa8f,_0x32d21b=new _0x146d3c();for(const _0x14c1e4 of _0x405782){if(_0x14c1e4[_0x4b12e8(0x259)]?.[_0x4b12e8(0x354)])continue;const _0xa6ede3=_0x14c1e4[_0x4b12e8(0x348)][_0x4b12e8(0x156)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0xa6ede3)continue;let _0x3db3a4=_0x32d21b;for(const _0x151590 of _0xa6ede3[_0x4b12e8(0xb7)]('/')['filter'](Boolean)){if(_0x151590[_0x4b12e8(0x1ef)](':')){const _0x3f0b6f=_0x151590[_0x4b12e8(0x341)](0x1);if(!_0x3db3a4[_0x4b12e8(0x28f)])_0x3db3a4[_0x4b12e8(0x28f)]={'param':_0x3f0b6f,'node':new _0x146d3c()};_0x3db3a4=_0x3db3a4[_0x4b12e8(0x28f)][_0x4b12e8(0x147)];}else{if(!_0x3db3a4[_0x4b12e8(0x2ba)][_0x4b12e8(0x158)](_0x151590))_0x3db3a4[_0x4b12e8(0x2ba)][_0x4b12e8(0x135)](_0x151590,new _0x146d3c());_0x3db3a4=_0x3db3a4[_0x4b12e8(0x2ba)][_0x4b12e8(0x187)](_0x151590);}}_0x3db3a4[_0x4b12e8(0x1e0)]=!![];}return _0x32d21b;}const _0x1beb63=new Map();function _0x5b7cb1(_0x173255,_0x2dc120,_0xffbbf2){const _0x11e714=_0x42fa8f,_0x435ed6=_0x1beb63[_0x11e714(0x187)](_0x173255);if(_0x435ed6&&_0x435ed6[_0x11e714(0xcc)]>Date[_0x11e714(0x149)]())return _0x435ed6[_0x11e714(0x137)];const _0x1af8ba=_0xffbbf2();return _0x1beb63[_0x11e714(0x135)](_0x173255,{'val':_0x1af8ba,'exp':Date[_0x11e714(0x149)]()+_0x2dc120}),_0x1af8ba;}function _0x2dc97f(_0x55b04d,_0x31c46d,_0x34254a,_0x21ec1a){const _0x1bd4cd=_0x42fa8f,_0x27c8b0=_0x31c46d[_0x1bd4cd(0x2fd)]??_0x21ec1a['env'];switch(_0x55b04d){case _0x1bd4cd(0x2fd):return[..._0x34254a[_0x1bd4cd(0xf9)][_0x1bd4cd(0x116)]()][_0x1bd4cd(0x234)](_0x14c731=>!_0x14c731[_0x1bd4cd(0x1ef)]('~'));case _0x1bd4cd(0x358):return _0x5b7cb1(_0x1bd4cd(0x175)+_0x27c8b0,0x7d0,()=>{const _0x4d7b94=_0x1bd4cd;try{return[..._0x34254a[_0x4d7b94(0x2fd)](_0x27c8b0)[_0x4d7b94(0x129)][_0x4d7b94(0x116)]()][_0x4d7b94(0x234)](_0x129552=>!_0x129552[_0x4d7b94(0x1ef)]('~'));}catch{return[];}});case'key':if(!_0x31c46d[_0x1bd4cd(0x358)])return[];return _0x5b7cb1(_0x1bd4cd(0x275)+_0x27c8b0+':'+_0x31c46d[_0x1bd4cd(0x358)],0x5dc,()=>{const _0x586e3d=_0x1bd4cd;try{const _0x2d621d=_0x34254a['env'](_0x27c8b0)['typeSubDbs']['get'](_0x31c46d[_0x586e3d(0x358)]);if(!_0x2d621d?.[_0x586e3d(0x8e)])return[];const _0x45dd2c=[];for(const {key:_0x5d28e7}of _0x2d621d[_0x586e3d(0x8e)]['getRange']({'limit':0x32})){_0x45dd2c[_0x586e3d(0x231)](String(_0x5d28e7));if(_0x45dd2c[_0x586e3d(0x1b0)]>=0x32)break;}return _0x45dd2c;}catch{return[];}});case _0x1bd4cd(0x2ed):if(!_0x31c46d[_0x1bd4cd(0x358)])return[];return _0x5b7cb1(_0x1bd4cd(0x264)+_0x27c8b0+':'+_0x31c46d[_0x1bd4cd(0x358)],0x7d0,()=>{const _0x21f853=_0x1bd4cd;try{const _0xf40fc3=_0x34254a[_0x21f853(0x2fd)](_0x27c8b0)[_0x21f853(0x129)]['get'](_0x31c46d[_0x21f853(0x358)]);return _0xf40fc3?[..._0xf40fc3[_0x21f853(0xf2)]?.[_0x21f853(0x116)]()??[]]:[];}catch{return[];}});case'ftsName':if(!_0x31c46d['type'])return[];return _0x5b7cb1(_0x1bd4cd(0x371)+_0x27c8b0+':'+_0x31c46d[_0x1bd4cd(0x358)],0x7d0,()=>{const _0x469d11=_0x1bd4cd;try{return _0x34254a[_0x469d11(0x1b6)]?.[_0x469d11(0x1c9)]?.(_0x31c46d[_0x469d11(0x358)],_0x34254a[_0x469d11(0x2fd)](_0x27c8b0))?.[_0x469d11(0x282)](_0x59e0f1=>_0x59e0f1[_0x469d11(0x167)])??[];}catch{return[];}});default:return[];}}function _0x538abe(_0x17521f,_0x1ad3fb,_0x4255be,_0x5a0822){const _0x5503b2=_0x42fa8f,_0x16dba7=_0x17521f['endsWith']('/'),_0x1eda04=_0x17521f[_0x5503b2(0xb7)]('/'),_0x19e3b2=_0x16dba7?_0x1eda04['slice'](0x0,-0x1):_0x1eda04[_0x5503b2(0x341)](0x0,-0x1),_0x4120b3=_0x16dba7?'':_0x1eda04[_0x1eda04['length']-0x1];let _0x1e7c93=_0x1ad3fb;const _0x1f0f90={};for(const _0x4c683b of _0x19e3b2){if(!_0x4c683b)continue;if(_0x1e7c93['children'][_0x5503b2(0x158)](_0x4c683b))_0x1e7c93=_0x1e7c93[_0x5503b2(0x2ba)][_0x5503b2(0x187)](_0x4c683b);else{if(_0x1e7c93['dynamic'])_0x1f0f90[_0x1e7c93[_0x5503b2(0x28f)][_0x5503b2(0x258)]]=_0x4c683b,_0x1e7c93=_0x1e7c93[_0x5503b2(0x28f)]['node'];else return[];}}const _0x6f5c4a=_0x19e3b2[_0x5503b2(0x234)](Boolean),_0x465384=_0x6f5c4a[_0x5503b2(0x1b0)]?_0x6f5c4a[_0x5503b2(0x161)]('/')+'/':'',_0x4cfeb0=[];for(const [_0x4c6e3b]of _0x1e7c93[_0x5503b2(0x2ba)]){if(_0x4c6e3b['startsWith'](_0x4120b3))_0x4cfeb0[_0x5503b2(0x231)](_0x465384+_0x4c6e3b);}if(_0x1e7c93[_0x5503b2(0x28f)])for(const _0x731dd7 of _0x2dc97f(_0x1e7c93[_0x5503b2(0x28f)][_0x5503b2(0x258)],_0x1f0f90,_0x4255be,_0x5a0822)){if(String(_0x731dd7)[_0x5503b2(0x1ef)](_0x4120b3))_0x4cfeb0[_0x5503b2(0x231)](_0x465384+_0x731dd7);}return _0x4cfeb0[_0x5503b2(0x341)](0x0,0x64);}const _0x25b77b=[_0x42fa8f(0x303),'use',_0x42fa8f(0x2fd),_0x42fa8f(0x355),_0x42fa8f(0x30b),_0x42fa8f(0x21d),_0x42fa8f(0x91),_0x42fa8f(0x2f9),_0x42fa8f(0x15d),'quit'];function _0x2d53ed(_0x43468a,_0x4bb1eb,_0x5a24ad){return function _0x17decc(_0x3b20ef){const _0x55f5da=_0x1dd2;try{const _0x5dc740=_0x3b20ef[_0x55f5da(0x1c8)](/\s[{[]/),_0x1adb68=_0x5dc740>=0x0?_0x3b20ef[_0x55f5da(0x341)](0x0,_0x5dc740):_0x3b20ef,_0x52f951=_0x1adb68[_0x55f5da(0x2bf)]();if(!_0x52f951){const _0x560a98=[..._0x25b77b,...[..._0x43468a[_0x55f5da(0x2ba)][_0x55f5da(0x116)]()]][_0x55f5da(0x341)](0x0,0x64);return[_0x560a98,''];}const _0x4a243e=_0x52f951[_0x55f5da(0xb7)](/\s+/),_0x59f359=_0x4a243e[0x0],_0x120b88=_0x59f359[_0x55f5da(0x361)]();if(_0x4a243e[_0x55f5da(0x1b0)]===0x1){const _0x51a42b=_0x59f359[_0x55f5da(0x108)](),_0x2b35e7=_0x25b77b[_0x55f5da(0x234)](_0x3b56e8=>_0x3b56e8['startsWith'](_0x51a42b)),_0x129422=_0x538abe(_0x59f359,_0x43468a,_0x4bb1eb,_0x5a24ad),_0x194582=[...new Set([..._0x2b35e7,..._0x129422])]['slice'](0x0,0x64);return[_0x194582,_0x59f359];}if(_0x20373a[_0x55f5da(0x158)](_0x120b88)&&_0x4a243e[_0x55f5da(0x1b0)]===0x2){const _0x12ecdb=_0x4a243e[0x1],_0x485547=_0x538abe(_0x12ecdb,_0x43468a,_0x4bb1eb,_0x5a24ad);return[_0x485547[_0x55f5da(0x282)](_0x31725e=>_0x59f359+'\x20'+_0x31725e),_0x59f359+'\x20'+_0x12ecdb];}if(!_0x20373a[_0x55f5da(0x158)](_0x120b88)&&_0x4a243e[_0x55f5da(0x1b0)]>0x1){const _0xf4219c=_0x538abe(_0x59f359,_0x43468a,_0x4bb1eb,_0x5a24ad),_0x433a8d='\x20'+_0x4a243e[_0x55f5da(0x341)](0x1)[_0x55f5da(0x161)]('\x20');return[_0xf4219c[_0x55f5da(0x282)](_0x148335=>_0x148335+_0x433a8d),_0x59f359+_0x433a8d];}return[[],_0x3b20ef];}catch{return[[],_0x3b20ef];}};}async function _0x24ee55(_0x5cd3be,_0x527c95){const _0x38fa2a=_0x42fa8f,_0x5df37e={'enabled':!![],'level':_0x527c95[_0x38fa2a(0x100)]??_0x38fa2a(0x1f8)},_0x49b028={'env':_0x38fa2a(0x1f3)},_0x563188={'current':null},_0x4e185c=_0x5523ad(_0x5cd3be[_0x38fa2a(0x232)][_0x38fa2a(0x218)]()),_0x27459c=_0x2d53ed(_0x4e185c,_0x5cd3be,_0x49b028);_0x5cd3be[_0x38fa2a(0xdd)][_0x38fa2a(0x2d0)](_0x21e9a4=>{const _0x49e574=_0x38fa2a;if(!_0x5df37e[_0x49e574(0x1b8)])return;_0x263a36(_0x21e9a4,_0x5df37e['level']),_0x563188['current']?.[_0x49e574(0x251)](!![]);}),_0x575b07(_0x5cd3be,_0x527c95);const _0x6fd59e=_0x4caf77['createInterface']({'input':process[_0x38fa2a(0x274)],'output':process['stdout'],'terminal':!![],'completer':_0x27459c,'prompt':_0x55df33(_0x49b028),'historySize':_0x2504a4});try{const _0x1b7768=_0xe972e0[_0x38fa2a(0x146)](_0x26105a,'utf8')[_0x38fa2a(0xb7)]('\x0a')[_0x38fa2a(0x234)](Boolean);_0x6fd59e['history']=_0x1b7768[_0x38fa2a(0x230)]()[_0x38fa2a(0x341)](0x0,_0x2504a4);}catch{}return _0x563188[_0x38fa2a(0x2c3)]=_0x6fd59e,_0x6fd59e['on'](_0x38fa2a(0x316),async _0xfe36cd=>{const _0x217e43=_0x38fa2a;_0x6fd59e[_0x217e43(0x352)]();try{await _0x561de8(_0xfe36cd,_0x5cd3be,_0x527c95,_0x5df37e,_0x49b028,_0x6fd59e);}catch(_0x1a0577){console[_0x217e43(0x266)](_0x89fdf(_0x11b2f7[_0x217e43(0x27b)],'\x20\x20Error:\x20'+_0x1a0577['message']));}finally{_0x6fd59e['resume'](),_0x6fd59e[_0x217e43(0x251)]();}}),_0x6fd59e['on']('close',()=>{const _0xba68da=_0x38fa2a;try{const _0x1a2f98=[..._0x6fd59e[_0xba68da(0x37f)]][_0xba68da(0x230)]()[_0xba68da(0x234)](Boolean)[_0xba68da(0x341)](0x0,_0x2504a4);_0xe972e0[_0xba68da(0x359)](_0x26105a,_0x1a2f98[_0xba68da(0x161)]('\x0a')+'\x0a');}catch{}_0x2ce730(_0x5cd3be,0x0);}),process['on']('SIGINT',()=>{const _0x36aacc=_0x38fa2a;if(_0x6fd59e[_0x36aacc(0x316)]==='')_0x2ce730(_0x5cd3be,0x0);else process['stdout'][_0x36aacc(0xef)]('\x0a'),_0x6fd59e['clearLine'](0x0),_0x6fd59e['prompt']();}),process['on'](_0x38fa2a(0x1bc),()=>_0x2ce730(_0x5cd3be,0x0)),_0x6fd59e[_0x38fa2a(0x251)](),_0x6fd59e;}return okdbShell={'start':_0x24ee55,'colorLog':_0x263a36,'lenientParse':_0x2ca322,'_splitLine':_0x3c020f,'_formatRouteHelpLines':_0x3d612c,'_routeSummary':_0x4caf95,'_routeTags':_0x1d4312},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x178958=_0x152c38;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x178958(0xe5)]();}catch{}const _0x4e5a5b=require$$1$1,_0x31ec50=require$$1;function _0x15c3e1(_0x1938da){const _0x3d2b66=_0x178958,_0x4f8ac6=_0x1938da[_0x3d2b66(0x341)](0x2),_0x489dca={};let _0x36ded0=0x0;while(_0x36ded0<_0x4f8ac6[_0x3d2b66(0x1b0)]){const _0x1ee5a1=_0x4f8ac6[_0x36ded0];if(_0x1ee5a1===_0x3d2b66(0xb2)||_0x1ee5a1==='-p')_0x489dca['port']=Number(_0x4f8ac6[++_0x36ded0]);else{if(_0x1ee5a1===_0x3d2b66(0x390)||_0x1ee5a1==='-d')_0x489dca[_0x3d2b66(0x348)]=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1===_0x3d2b66(0x31a)||_0x1ee5a1==='-k')_0x489dca[_0x3d2b66(0x15b)]=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1==='--config'||_0x1ee5a1==='-c')_0x489dca[_0x3d2b66(0x271)]=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1==='--log-level')_0x489dca['logLevel']=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1===_0x3d2b66(0x88))_0x489dca[_0x3d2b66(0x27a)]=!![];else{if(_0x1ee5a1==='--no-admin')_0x489dca[_0x3d2b66(0x1ac)]=!![];else{if(_0x1ee5a1===_0x3d2b66(0x172)||_0x1ee5a1==='-e')_0x489dca[_0x3d2b66(0x2fd)]=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1===_0x3d2b66(0xeb))_0x489dca[_0x3d2b66(0x30b)]=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1===_0x3d2b66(0x121))_0x489dca['changes']=!![];else{if(_0x1ee5a1===_0x3d2b66(0x379))_0x489dca['blobs']=!![];else{if(_0x1ee5a1===_0x3d2b66(0x178))_0x489dca[_0x3d2b66(0xc4)]=!![];else{if(_0x1ee5a1==='--open'){const _0x3c6a70=[];while(_0x36ded0+0x1<_0x4f8ac6[_0x3d2b66(0x1b0)]&&!_0x4f8ac6[_0x36ded0+0x1][_0x3d2b66(0x1ef)]('--')){_0x3c6a70[_0x3d2b66(0x231)](_0x4f8ac6[++_0x36ded0]);}_0x489dca[_0x3d2b66(0x2f9)]=_0x3c6a70[_0x3d2b66(0x1b0)]>0x0?_0x3c6a70:!![];}else{if(_0x1ee5a1===_0x3d2b66(0x219))_0x489dca['logRequests']=!![];else{if(_0x1ee5a1===_0x3d2b66(0x1c7))_0x489dca[_0x3d2b66(0x167)]=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1===_0x3d2b66(0x106))_0x489dca[_0x3d2b66(0x26e)]=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1==='--label')_0x489dca['label']=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1==='--permissions')_0x489dca[_0x3d2b66(0x253)]=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1===_0x3d2b66(0x171))_0x489dca[_0x3d2b66(0x1b5)]=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1===_0x3d2b66(0x370))_0x489dca['ttl']=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1===_0x3d2b66(0x1d0))_0x489dca['token']=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1==='--username'||_0x1ee5a1==='-u')_0x489dca[_0x3d2b66(0x1c2)]=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1===_0x3d2b66(0x185))_0x489dca[_0x3d2b66(0x2b1)]=_0x4f8ac6[++_0x36ded0];else{if(_0x1ee5a1===_0x3d2b66(0x2d6)||_0x1ee5a1==='-v'){const _0x22b306=require$$2;console['log'](_0x22b306[_0x3d2b66(0x109)]),process[_0x3d2b66(0x15d)](0x0);}else(_0x1ee5a1===_0x3d2b66(0x38b)||_0x1ee5a1==='-h')&&(_0x57be3d(),process[_0x3d2b66(0x15d)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x36ded0++;}return _0x489dca;}function _0x57be3d(){const _0x1223f8=_0x178958;console[_0x1223f8(0xdd)]('\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-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\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\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');}const _0x3fc97c=new Set([_0x178958(0x295),_0x178958(0x1f8),_0x178958(0x331),_0x178958(0x266)]);function _0x4d61dd(_0x53a9f7){const _0x42715f=_0x178958,_0x35764b=_0x53a9f7[_0x42715f(0x271)]?_0x4e5a5b['resolve'](_0x53a9f7[_0x42715f(0x271)]):_0x4e5a5b[_0x42715f(0x235)](_0x42715f(0x1a0));let _0x2830fd={};if(_0x31ec50['existsSync'](_0x35764b))try{const _0x143834=_0x31ec50[_0x42715f(0x146)](_0x35764b,'utf8')[_0x42715f(0x156)](/^\uFEFF/,'');_0x2830fd=JSON[_0x42715f(0x179)](_0x143834),console[_0x42715f(0xdd)]('[okdb]\x20loaded\x20config:\x20'+_0x35764b);}catch(_0x2e49b7){console['error']('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x35764b+':\x20'+_0x2e49b7['message']),process[_0x42715f(0x15d)](0x1);}const _0x243963={'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},_0x3bf65e={'port':_0x53a9f7[_0x42715f(0x1e9)]??_0x2830fd[_0x42715f(0x1e9)]??_0x243963[_0x42715f(0x1e9)]??0x2124,'dbPath':_0x53a9f7[_0x42715f(0x348)]??_0x2830fd[_0x42715f(0x348)]??_0x243963[_0x42715f(0x348)]??_0x42715f(0x267),'key':_0x53a9f7[_0x42715f(0x15b)]??_0x2830fd[_0x42715f(0x15b)]??_0x243963[_0x42715f(0x15b)]??undefined,'logLevel':_0x53a9f7[_0x42715f(0x100)]??_0x2830fd['logLevel']??_0x243963['logLevel']??'info','noRepl':_0x53a9f7['noRepl']??_0x2830fd[_0x42715f(0x27a)]??_0x243963[_0x42715f(0x27a)]??![],'noAdmin':_0x53a9f7[_0x42715f(0x1ac)]??_0x2830fd[_0x42715f(0x1ac)]??_0x243963[_0x42715f(0x1ac)]??![],'admin':_0x2830fd[_0x42715f(0x1f2)]??{},'api':_0x2830fd[_0x42715f(0xdc)]??undefined,'auth':_0x2830fd[_0x42715f(0x2a1)]??undefined,'mcp':_0x2830fd['mcp']??undefined,'timeMachine':_0x2830fd[_0x42715f(0x32e)]!==![]?_0x2830fd['timeMachine']??{}:![]};return _0x53a9f7[_0x42715f(0x2f9)]!==undefined&&(_0x3bf65e['auth']=_0x3bf65e[_0x42715f(0x2a1)]||{},_0x3bf65e[_0x42715f(0x2a1)][_0x42715f(0x2f9)]=_0x53a9f7[_0x42715f(0x2f9)]),_0x53a9f7[_0x42715f(0x351)]&&(_0x3bf65e['debug']=_0x3bf65e[_0x42715f(0x295)]||{},_0x3bf65e[_0x42715f(0x295)][_0x42715f(0x351)]=!![]),(!Number[_0x42715f(0x25f)](_0x3bf65e[_0x42715f(0x1e9)])||_0x3bf65e['port']<0x1||_0x3bf65e[_0x42715f(0x1e9)]>0xffff)&&(console[_0x42715f(0x266)](_0x42715f(0x15c)+_0x3bf65e[_0x42715f(0x1e9)]+_0x42715f(0x11d)),process['exit'](0x1)),!_0x3fc97c[_0x42715f(0x158)](_0x3bf65e[_0x42715f(0x100)])&&(console['error'](_0x42715f(0x2de)+_0x3bf65e[_0x42715f(0x100)]+_0x42715f(0x1a3)),process[_0x42715f(0x15d)](0x1)),_0x3bf65e;}function _0x4297a1(_0x33f478){const _0x4551ad=_0x178958;return!!(_0x33f478&&typeof _0x33f478===_0x4551ad(0x347)&&!Array['isArray'](_0x33f478)&&Object['keys'](_0x33f478)[_0x4551ad(0x1b0)]>0x0);}const _0x3e7f9a=!process[_0x178958(0x294)]['isTTY']||!!process.env.NO_COLOR;function _0x211b7d(_0x3a818a,_0x5eab68){const _0x494da0=_0x178958;return _0x3e7f9a?_0x5eab68:'\x1b['+_0x3a818a+'m'+_0x5eab68+_0x494da0(0x192);}function _0x1297e8(_0x33f047){const _0x2b7b19=_0x178958;if(!_0x33f047||_0x33f047[_0x2b7b19(0x1b0)]===0x0)return;const _0xb4593f='─'['repeat'](0x38);process[_0x2b7b19(0x22b)][_0x2b7b19(0xef)]('\x0a'),process['stderr'][_0x2b7b19(0xef)](_0x211b7d('33',_0x2b7b19(0x247)+_0x33f047[_0x2b7b19(0x1b0)]+_0x2b7b19(0x131)+(_0x33f047[_0x2b7b19(0x1b0)]>0x1?'S':'')+'\x0a')),process[_0x2b7b19(0x22b)][_0x2b7b19(0xef)]('\x20\x20'+_0xb4593f+'\x0a');for(const _0xb1d77b of _0x33f047){const _0x3ff58e=_0xb1d77b[_0x2b7b19(0x8a)]===_0x2b7b19(0x266)?_0x211b7d('31',_0x2b7b19(0x1fc)):_0x211b7d('33',_0x2b7b19(0x32a));process['stderr']['write'](_0x3ff58e+'\x20\x20'+_0x211b7d('1',_0xb1d77b[_0x2b7b19(0xd9)])+'\x0a'),process['stderr'][_0x2b7b19(0xef)](_0x2b7b19(0x200)+_0xb1d77b['message']+'\x0a');if(_0xb1d77b[_0x2b7b19(0x2c8)])process['stderr']['write'](_0x2b7b19(0x200)+_0x211b7d('2','Hint:\x20'+_0xb1d77b[_0x2b7b19(0x2c8)])+'\x0a');process[_0x2b7b19(0x22b)]['write']('\x0a');}process[_0x2b7b19(0x22b)][_0x2b7b19(0xef)]('\x20\x20'+_0xb4593f+'\x0a\x0a');}function _0x38fa7e(_0x1423ba,_0x24e27d){const _0x169023=_0x178958,_0x555b4a=_0x1423ba[_0x169023(0x232)][_0x169023(0x1d6)](_0x24e27d);return new Promise((_0x364bb3,_0x138917)=>{const _0x37938f=_0x169023;_0x555b4a[_0x37938f(0x1de)]('listening',_0x364bb3),_0x555b4a['once'](_0x37938f(0x266),_0x138917);});}async function _0x2aee4d(_0x10a467){const _0x2c7309=_0x178958,_0x4dca2d=require$$3;console['log']('\x0a\x20\x20okdb\x20doctor\x0a');let _0x228e2f=!![];const _0x1a89a5=(_0x137f4d,_0x31fd8a)=>{console['log']('\x20\x20'+(_0x137f4d?'✓':'✗')+'\x20'+_0x31fd8a);if(!_0x137f4d)_0x228e2f=![];},_0xf7f30f=Number(process[_0x2c7309(0x109)][_0x2c7309(0x156)]('v','')[_0x2c7309(0xb7)]('.')[0x0]);_0x1a89a5(_0xf7f30f>=0x12,_0x2c7309(0xa7)+process[_0x2c7309(0x109)]+(_0xf7f30f<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0x3cc5f7=_0x4e5a5b[_0x2c7309(0x235)](_0x10a467[_0x2c7309(0x36d)]);try{_0x31ec50[_0x2c7309(0x10c)](_0x3cc5f7,{'recursive':!![]});const _0x1e3252=_0x4e5a5b[_0x2c7309(0x161)](_0x3cc5f7,_0x2c7309(0x272));_0x31ec50[_0x2c7309(0x359)](_0x1e3252,''),_0x31ec50[_0x2c7309(0x205)](_0x1e3252),_0x1a89a5(!![],_0x2c7309(0x103)+_0x3cc5f7);}catch(_0x18fe14){_0x1a89a5(![],_0x2c7309(0x198)+_0x3cc5f7+_0x2c7309(0x163)+_0x18fe14[_0x2c7309(0x307)]+')');}const _0x3f63a5=await new Promise(_0x214c4b=>{const _0x4cf0ca=_0x2c7309,_0xed9452=_0x4dca2d['createServer']();_0xed9452[_0x4cf0ca(0x1de)](_0x4cf0ca(0x266),()=>_0x214c4b(![])),_0xed9452[_0x4cf0ca(0x1de)](_0x4cf0ca(0xc2),()=>{const _0x4fb2e5=_0x4cf0ca;_0xed9452[_0x4fb2e5(0x2a5)](),_0x214c4b(!![]);}),_0xed9452[_0x4cf0ca(0x1d6)](_0x10a467['port'],'127.0.0.1');});_0x1a89a5(_0x3f63a5,'port\x20'+_0x10a467[_0x2c7309(0x1e9)]+'\x20'+(_0x3f63a5?_0x2c7309(0x19e):_0x2c7309(0x157)));const _0x5dbfb9=_0x4e5a5b[_0x2c7309(0x235)](_0x2c7309(0x1a0));if(_0x31ec50[_0x2c7309(0x36f)](_0x5dbfb9))try{JSON[_0x2c7309(0x179)](_0x31ec50['readFileSync'](_0x5dbfb9,_0x2c7309(0x30f))['replace'](/^\uFEFF/,'')),_0x1a89a5(!![],_0x2c7309(0x17b)+_0x5dbfb9);}catch(_0x424be2){_0x1a89a5(![],_0x2c7309(0x114)+_0x424be2[_0x2c7309(0x307)]);}else _0x1a89a5(!![],'no\x20.kdbconfig\x20(using\x20defaults)');console[_0x2c7309(0xdd)](''),_0x228e2f?console[_0x2c7309(0xdd)](_0x2c7309(0x252)):(console[_0x2c7309(0xdd)](_0x2c7309(0x291)),process['exit'](0x1));}async function _0x5dbf09(){const _0x3375c2=_0x178958,_0x33bdd3=_0x4e5a5b['resolve']('.kdbconfig');!_0x31ec50[_0x3375c2(0x36f)](_0x33bdd3)?(_0x31ec50['writeFileSync'](_0x33bdd3,JSON[_0x3375c2(0xf3)]({'port':0x2124,'path':_0x3375c2(0x267),'logLevel':_0x3375c2(0x1f8),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console['log']('[okdb]\x20created\x20.kdbconfig')):console[_0x3375c2(0xdd)](_0x3375c2(0x1b7));const _0xa7d683=_0x4e5a5b[_0x3375c2(0x235)](_0x3375c2(0x267));!_0x31ec50[_0x3375c2(0x36f)](_0xa7d683)?(_0x31ec50[_0x3375c2(0x10c)](_0xa7d683,{'recursive':!![]}),console[_0x3375c2(0xdd)](_0x3375c2(0x20e))):console['log'](_0x3375c2(0x1e6)),console['log']('\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a');}async function _0x265e3a(_0x58ba6b){const _0x36187=_0x178958,_0x4fb5f6=_0x4e5a5b[_0x36187(0x235)](_0x58ba6b[_0x36187(0x36d)]);if(!_0x31ec50[_0x36187(0x36f)](_0x4fb5f6)){console[_0x36187(0xdd)](_0x36187(0x357)+_0x4fb5f6+_0x36187(0xe2));return;}const _0x173fcc=require$$0$2,_0x4ad09e=_0x173fcc[_0x36187(0x18c)]({'input':process[_0x36187(0x274)],'output':process[_0x36187(0x294)]}),_0xfba6e=await new Promise(_0x44c972=>_0x4ad09e['question'](_0x36187(0xcf)+_0x4fb5f6+_0x36187(0x1ad),_0x44c972));_0x4ad09e['close'](),console[_0x36187(0xdd)]('');if(_0xfba6e[_0x36187(0x15e)]()[_0x36187(0x108)]()!==_0x36187(0x2a6)){console[_0x36187(0xdd)]('[okdb]\x20reset\x20aborted');return;}_0x31ec50[_0x36187(0xcb)](_0x4fb5f6,{'recursive':!![],'force':!![]}),console[_0x36187(0xdd)](_0x36187(0x2f7)+_0x4fb5f6+_0x36187(0x37e));}async function _0x494019(_0x1e6ef3,_0x996b57){const _0x4f08df=_0x178958,_0x3d50b2=require$$5,_0x1cc9d7=_0x4e5a5b[_0x4f08df(0x235)](_0x996b57[_0x4f08df(0x36d)]);console[_0x4f08df(0xdd)](_0x4f08df(0x2fe)+_0x1cc9d7+'…');const _0x9f5952=new _0x3d50b2(_0x1cc9d7,_0x996b57[_0x4f08df(0x15b)]?{'encryptionKey':_0x996b57['key']}:{});await _0x9f5952['open'](),console['log']('[okdb]\x20backing\x20up\x20to\x20'+_0x1e6ef3+'…');const {envs:_0x1a5ce4}=await _0x9f5952[_0x4f08df(0x2fb)][_0x4f08df(0x95)](_0x1e6ef3);for(const _0x4ae039 of _0x1a5ce4){const _0x49dc5c=_0x4ae039['sizeBefore']>0x0?'\x20\x20('+(_0x4ae039[_0x4f08df(0x14b)]/0x400/0x400)[_0x4f08df(0x35a)](0x2)+_0x4f08df(0x212)+(_0x4ae039[_0x4f08df(0x277)]/0x400/0x400)[_0x4f08df(0x35a)](0x2)+'\x20MB)':'';console[_0x4f08df(0xdd)](_0x4f08df(0x1c5)+_0x4ae039[_0x4f08df(0x167)]+_0x4f08df(0xd6)+_0x4ae039[_0x4f08df(0x1d1)]+_0x49dc5c);}await _0x9f5952['close'](),console[_0x4f08df(0xdd)](_0x4f08df(0x21f));}async function _0x194b4b(_0x4119bc,_0x128780,_0x2ac7f3){const _0x4f3f77=_0x178958,_0x1e77c8=require$$5,_0xb12b7c=_0x4e5a5b[_0x4f3f77(0x235)](_0x128780['dbPath']),_0x9f95b0=_0x2ac7f3['env']??_0x4f3f77(0x1f3),_0x553228=_0x2ac7f3[_0x4f3f77(0x30b)]?_0x2ac7f3[_0x4f3f77(0x30b)][_0x4f3f77(0xb7)](',')['map'](_0x1b8ac8=>_0x1b8ac8[_0x4f3f77(0x15e)]()):null;console[_0x4f3f77(0xdd)](_0x4f3f77(0x2fe)+_0xb12b7c+'…');const _0x5d3a91=new _0x1e77c8(_0xb12b7c,_0x128780[_0x4f3f77(0x15b)]?{'encryptionKey':_0x128780[_0x4f3f77(0x15b)]}:{});await _0x5d3a91[_0x4f3f77(0x2f9)](),console['log'](_0x4f3f77(0x117)+_0x9f95b0+_0x4f3f77(0x27e)+_0x4119bc+'…');const _0x383415=await _0x5d3a91[_0x4f3f77(0x2fb)][_0x4f3f77(0x1d3)](_0x4119bc,{'envName':_0x9f95b0,'types':_0x553228,'includeChanges':!!_0x2ac7f3[_0x4f3f77(0x35f)]});console[_0x4f3f77(0xdd)](_0x4f3f77(0xbb)+_0x383415['types']+_0x4f3f77(0x36c)+_0x383415['records']+_0x4f3f77(0x335)+_0x383415[_0x4f3f77(0x35f)]);if(_0x2ac7f3[_0x4f3f77(0x2b4)]){const _0x5b2a54=_0x4e5a5b[_0x4f3f77(0x161)](_0x4e5a5b[_0x4f3f77(0xb1)](_0x4119bc),_0x4f3f77(0x2b4));process['stdout'][_0x4f3f77(0xef)](_0x4f3f77(0x2b7));const {count:_0x3606f1,bytes:_0x4574c6}=await _0x5d3a91[_0x4f3f77(0x2fb)][_0x4f3f77(0x165)](_0x5b2a54);console[_0x4f3f77(0xdd)](_0x4f3f77(0x31d)+_0x5b2a54+_0x4f3f77(0x163)+_0x3606f1+_0x4f3f77(0xb6)+(_0x3606f1!==0x1?'s':'')+',\x20'+(_0x4574c6/0x400/0x400)['toFixed'](0x2)+_0x4f3f77(0x2cb));}await _0x5d3a91[_0x4f3f77(0x2a5)](),console[_0x4f3f77(0xdd)](_0x4f3f77(0xb0));}async function _0x40f9ff(_0x293a9c,_0x206351,_0x379887){const _0x4fd2ab=_0x178958,_0x2ea7a3=require$$5,_0x3f36d0=_0x4e5a5b[_0x4fd2ab(0x235)](_0x206351[_0x4fd2ab(0x36d)]),_0x5de6ba=_0x379887[_0x4fd2ab(0x2fd)]??null,_0xf9a960=_0x379887['types']?_0x379887[_0x4fd2ab(0x30b)][_0x4fd2ab(0xb7)](',')['map'](_0x34c34b=>_0x34c34b['trim']()):null,_0x40a015=!!_0x379887[_0x4fd2ab(0xc4)];console[_0x4fd2ab(0xdd)](_0x4fd2ab(0x2fe)+_0x3f36d0+'…');const _0x22ff20=new _0x2ea7a3(_0x3f36d0,_0x206351[_0x4fd2ab(0x15b)]?{'encryptionKey':_0x206351[_0x4fd2ab(0x15b)]}:{});await _0x22ff20['open'](),console[_0x4fd2ab(0xdd)](_0x4fd2ab(0x209)+_0x293a9c+'…');const _0xfead9=await _0x22ff20['migrate'][_0x4fd2ab(0x21e)](_0x293a9c,{'envName':_0x5de6ba,'types':_0xf9a960,'dropExisting':_0x40a015,'includeChanges':!!_0x379887[_0x4fd2ab(0x35f)],'onProgress':({type:_0x21032e,count:_0x57c6de})=>{const _0x532205=_0x4fd2ab;process[_0x532205(0x294)][_0x532205(0xef)](_0x532205(0x152)+_0x21032e+':\x20'+_0x57c6de+_0x532205(0x113));}});process[_0x4fd2ab(0x294)][_0x4fd2ab(0xef)]('\x0a'),console[_0x4fd2ab(0xdd)]('[okdb]\x20imported\x20\x20types='+_0xfead9[_0x4fd2ab(0x30b)]+_0x4fd2ab(0x36c)+_0xfead9[_0x4fd2ab(0x20c)]+_0x4fd2ab(0x335)+_0xfead9[_0x4fd2ab(0x35f)]);if(_0x379887[_0x4fd2ab(0x2b4)]){const _0x367d9b=_0x4e5a5b['join'](_0x4e5a5b[_0x4fd2ab(0xb1)](_0x293a9c),_0x4fd2ab(0x2b4));if(_0x31ec50[_0x4fd2ab(0x36f)](_0x367d9b)){const {imported:_0x175157,skipped:_0x4c50c5}=await _0x22ff20['migrate'][_0x4fd2ab(0x18f)](_0x367d9b);console['log']('[okdb]\x20blobs:\x20imported='+_0x175157+_0x4fd2ab(0x24f)+_0x4c50c5);}}await _0x22ff20[_0x4fd2ab(0x2a5)](),console[_0x4fd2ab(0xdd)](_0x4fd2ab(0x216));}async function _0x19981c(_0x4127f9,_0x2b8b01){const _0x2d1613=_0x178958;_0x2b8b01[_0x2d1613(0x26e)]&&!_0x2b8b01[_0x2d1613(0x167)]&&(console[_0x2d1613(0x266)](_0x2d1613(0x215)),process[_0x2d1613(0x15d)](0x1));const _0x462274=_0x2b8b01[_0x2d1613(0x253)]?_0x2b8b01[_0x2d1613(0x253)][_0x2d1613(0xb7)](',')[_0x2d1613(0x282)](_0x2d1a32=>_0x2d1a32['trim']())['filter'](Boolean):[];let _0x19ee6a={};if(_0x2b8b01['grants'])try{_0x19ee6a=JSON['parse'](_0x2b8b01[_0x2d1613(0x1b5)]);if(typeof _0x19ee6a!=='object'||Array[_0x2d1613(0x140)](_0x19ee6a)||_0x19ee6a===null)throw new Error();}catch{console[_0x2d1613(0x266)](_0x2d1613(0xce)),process[_0x2d1613(0x15d)](0x1);}const _0x384841=require$$5,{randomToken:_0x452531,hashToken:_0x2deb58,hashPassword:_0x2a1526}=requireOkdbAuthTokens(),_0x192fca=require$$0,_0x48befb=_0x4e5a5b[_0x2d1613(0x235)](_0x4127f9[_0x2d1613(0x36d)]),_0x4b57cb=new _0x384841(_0x48befb,_0x4127f9[_0x2d1613(0x15b)]?{'encryptionKey':_0x4127f9[_0x2d1613(0x15b)]}:{});await _0x4b57cb['open']();try{await _0x4b57cb[_0x2d1613(0x2a1)][_0x2d1613(0x14e)]();if(_0x2b8b01[_0x2d1613(0x167)]){const _0x579009=await _0x4b57cb['auth'][_0x2d1613(0x112)](_0x2b8b01[_0x2d1613(0x167)]);_0x579009&&(console[_0x2d1613(0x266)](_0x2d1613(0x315)+_0x2b8b01[_0x2d1613(0x167)]+_0x2d1613(0x227)),process[_0x2d1613(0x15d)](0x1));}const _0x161dc1=_0x452531(0x20),_0x4218a5=_0x2deb58(_0x161dc1),_0x1553d4=_0x2b8b01['password']?await _0x2a1526(_0x2b8b01[_0x2d1613(0x26e)]):null,_0x2a94ad=_0x192fca[_0x2d1613(0x2dc)](),_0x16dfe9={'tokenHash':_0x4218a5,'name':_0x2b8b01[_0x2d1613(0x167)]||null,'passwordHash':_0x1553d4,'label':_0x2b8b01[_0x2d1613(0x26f)]||null,'permissions':_0x462274,'grants':_0x19ee6a,'createdAt':Date[_0x2d1613(0x149)](),'lastUsedAt':null},_0x2603ce=_0x2b8b01[_0x2d1613(0x35e)]?{'ttl':Number(_0x2b8b01['ttl'])}:undefined;await _0x4b57cb[_0x2d1613(0x122)][_0x2d1613(0x1a4)](_0x2d1613(0xfd),_0x2a94ad,_0x16dfe9,_0x2603ce),console[_0x2d1613(0xdd)](_0x2d1613(0x377)),console[_0x2d1613(0xdd)](_0x2d1613(0x1d7)+_0x2a94ad),console[_0x2d1613(0xdd)](_0x2d1613(0x127)+(_0x2b8b01[_0x2d1613(0x167)]||_0x2d1613(0x284))),console[_0x2d1613(0xdd)](_0x2d1613(0xd8)+(_0x2b8b01[_0x2d1613(0x26f)]||'(unset)')),console[_0x2d1613(0xdd)](_0x2d1613(0x2e9)+(_0x462274[_0x2d1613(0x161)](',\x20')||_0x2d1613(0x13f))),console[_0x2d1613(0xdd)](_0x2d1613(0x376)),console[_0x2d1613(0xdd)](_0x2d1613(0x125)+_0x161dc1+'\x0a');}finally{await _0x4b57cb[_0x2d1613(0x2a5)]();}}async function _0x54d243(_0x13e77b){const _0x485926=_0x178958,_0x1ede47=require$$5,_0x3e6257=_0x4e5a5b[_0x485926(0x235)](_0x13e77b[_0x485926(0x36d)]),_0x67a0f3=new _0x1ede47(_0x3e6257,_0x13e77b[_0x485926(0x15b)]?{'encryptionKey':_0x13e77b[_0x485926(0x15b)]}:{});await _0x67a0f3[_0x485926(0x2f9)]();try{const _0x4f60f7=_0x67a0f3[_0x485926(0x122)];if(!_0x4f60f7||!_0x4f60f7[_0x485926(0xa2)](_0x485926(0xfd))){console[_0x485926(0xdd)](_0x485926(0x2ff));return;}const _0x17cd43=[];for(const {key:_0x537521,value:_0x6f2050}of _0x4f60f7['getRange'](_0x485926(0xfd))){_0x17cd43[_0x485926(0x231)]({'id':_0x537521,'name':_0x6f2050['name']||_0x485926(0x284),'label':_0x6f2050['label']||_0x485926(0x284),'permissions':Array[_0x485926(0x140)](_0x6f2050[_0x485926(0x253)])?_0x6f2050[_0x485926(0x253)][_0x485926(0x161)](','):'','created':_0x6f2050[_0x485926(0x151)]?new Date(_0x6f2050[_0x485926(0x151)])['toISOString']()[_0x485926(0x341)](0x0,0xa):''});}if(_0x17cd43[_0x485926(0x1b0)]===0x0){console[_0x485926(0xdd)](_0x485926(0x2ff));return;}const _0x492b58=!process[_0x485926(0x294)]['columns']||process[_0x485926(0x294)][_0x485926(0x14a)]>=0x64,_0x4c442a=_0x492b58?0x24:0xa,_0x5459d5=['ID'[_0x485926(0x20b)](_0x4c442a),'NAME'[_0x485926(0x20b)](0x10),_0x485926(0x1bb)['padEnd'](0x14),_0x485926(0x223)[_0x485926(0x20b)](0x14),_0x485926(0x33c)]['join']('\x20\x20');console['log']('\x0a'+_0x5459d5),console[_0x485926(0xdd)]('-'[_0x485926(0x99)](_0x5459d5[_0x485926(0x1b0)]));for(const _0x5eb119 of _0x17cd43){const _0x2ce68b=_0x492b58?_0x5eb119['id']:_0x5eb119['id'][_0x485926(0x341)](0x0,0x8)+'…';console[_0x485926(0xdd)]([_0x2ce68b[_0x485926(0x20b)](_0x4c442a),_0x5eb119[_0x485926(0x167)][_0x485926(0x341)](0x0,0x10)['padEnd'](0x10),_0x5eb119['label'][_0x485926(0x341)](0x0,0x14)[_0x485926(0x20b)](0x14),_0x5eb119[_0x485926(0x253)][_0x485926(0x341)](0x0,0x14)[_0x485926(0x20b)](0x14),_0x5eb119[_0x485926(0x18d)]][_0x485926(0x161)]('\x20\x20'));}console['log']('');}finally{await _0x67a0f3[_0x485926(0x2a5)]();}}async function _0x58a0e2(_0x1a3a79,_0x9d0f1a){const _0x13c15=_0x178958;!_0x1a3a79&&(console['error'](_0x13c15(0x283)),process[_0x13c15(0x15d)](0x1));const _0xde296c=require$$5,_0x3670d8=_0x4e5a5b[_0x13c15(0x235)](_0x9d0f1a[_0x13c15(0x36d)]),_0x46ab39=new _0xde296c(_0x3670d8,_0x9d0f1a[_0x13c15(0x15b)]?{'encryptionKey':_0x9d0f1a['key']}:{});await _0x46ab39['open']();try{const _0x11f16d=_0x46ab39[_0x13c15(0x122)];(!_0x11f16d||!_0x11f16d['hasType'](_0x13c15(0xfd)))&&(console[_0x13c15(0x266)](_0x13c15(0x164)+_0x1a3a79+'\x22'),process[_0x13c15(0x15d)](0x1));let _0x4959b5=null,_0x464d2a=null;const _0x5765e9=_0x11f16d[_0x13c15(0x187)](_0x13c15(0xfd),_0x1a3a79);if(_0x5765e9)_0x4959b5=_0x1a3a79,_0x464d2a=_0x5765e9;else{const _0x38caaa=[];for(const {key:_0x590d7c,value:_0x32dfc8}of _0x11f16d['getRange'](_0x13c15(0xfd))){if(_0x590d7c[_0x13c15(0x1ef)](_0x1a3a79))_0x38caaa[_0x13c15(0x231)]({'key':_0x590d7c,'value':_0x32dfc8});}_0x38caaa['length']===0x0&&(console[_0x13c15(0x266)](_0x13c15(0x164)+_0x1a3a79+'\x22'),process[_0x13c15(0x15d)](0x1));if(_0x38caaa['length']>0x1){console[_0x13c15(0x266)](_0x13c15(0xf7)+_0x1a3a79+_0x13c15(0x1be)+_0x38caaa[_0x13c15(0x1b0)]+'\x20tokens:');for(const _0x28f71e of _0x38caaa){console[_0x13c15(0x266)]('\x20\x20'+_0x28f71e[_0x13c15(0x15b)]+'\x20\x20(name:\x20'+(_0x28f71e['value'][_0x13c15(0x167)]||_0x13c15(0x284))+')');}process[_0x13c15(0x15d)](0x1);}_0x4959b5=_0x38caaa[0x0][_0x13c15(0x15b)],_0x464d2a=_0x38caaa[0x0][_0x13c15(0x1d2)];}await _0x11f16d['remove'](_0x13c15(0xfd),_0x4959b5),console[_0x13c15(0xdd)](_0x13c15(0xe4)+_0x4959b5+_0x13c15(0x2ea)+(_0x464d2a[_0x13c15(0x167)]||_0x13c15(0x284))+_0x13c15(0x2ae)+(_0x464d2a[_0x13c15(0x26f)]||_0x13c15(0x284))+')');}finally{await _0x46ab39['close']();}}function _0x30fb7a(_0x192b94,_0x17d41b){const _0xc42afb=_0x178958;if(!_0x192b94[_0xc42afb(0x2e0)])return _0xc42afb(0x1ec);const _0x5e53ac=_0x192b94[_0xc42afb(0x11a)];if(!_0x5e53ac)return _0xc42afb(0x1ce);if(_0x17d41b>_0x5e53ac)return'expired';return _0xc42afb(0x1ce);}function _0x3af915(_0x544287){const _0x178311=_0x178958;if(!_0x544287||typeof _0x544287!==_0x178311(0x347))return'';const _0x28fdb9=Object[_0x178311(0x27c)](_0x544287)[_0x178311(0x234)](([,_0x2ab8f7])=>_0x2ab8f7)[_0x178311(0x282)](([_0x1604e5])=>_0x1604e5);if(_0x28fdb9[_0x178311(0x1b0)]===0x0)return _0x178311(0x13f);if(_0x28fdb9['length']<=0x3)return _0x28fdb9['join']('\x20');return _0x28fdb9[_0x178311(0x341)](0x0,0x3)[_0x178311(0x161)]('\x20')+('\x20+'+(_0x28fdb9[_0x178311(0x1b0)]-0x3));}async function _0x340528(_0x88f514){const _0x3251fa=_0x178958,_0x1d39ca=require$$5,_0x389cdc=requireOkdbLicenseCodec(),{_C:_0x422ce4}=requireOkdbLicense(),_0x4fccf1=_0x4e5a5b['resolve'](_0x88f514[_0x3251fa(0x36d)]),_0x4514cb=new _0x1d39ca(_0x4fccf1,_0x88f514[_0x3251fa(0x15b)]?{'encryptionKey':_0x88f514[_0x3251fa(0x15b)]}:{});await _0x4514cb[_0x3251fa(0x2f9)]();try{const _0x187337=_0x4514cb[_0x3251fa(0x122)],_0x351590=_0x187337?.['db']?.['get']?.(_0x3251fa(0x19c))??0x0,_0x58a50d=[..._0x4514cb[_0x3251fa(0xf9)][_0x3251fa(0x116)]()][_0x3251fa(0x234)](_0x1476ae=>!_0x1476ae[_0x3251fa(0x1ef)]('~'))[_0x3251fa(0x1b0)],_0x20c263=_0x4514cb['_license']?.[_0x3251fa(0x1e5)];if(_0x20c263){const _0x139592=_0x20c263['_isFree']===!![],_0x3a9412=_0x139592?_0x3251fa(0xd5):_0x4514cb[_0x3251fa(0x268)][_0x3251fa(0x1ce)]?.[_0x3251fa(0x288)]||_0x3251fa(0x14f);console[_0x3251fa(0xdd)](''),console[_0x3251fa(0xdd)](_0x3251fa(0x24d)+_0x3a9412);const _0x17370c=_0x20c263[_0x3251fa(0x214)]||{};if(_0x17370c['maxWrites']){const _0x4914fd=Math[_0x3251fa(0x28e)](_0x351590/_0x17370c[_0x3251fa(0x322)]*0x64);console[_0x3251fa(0xdd)](_0x3251fa(0x34f)+_0x351590[_0x3251fa(0x31f)]()+_0x3251fa(0x23e)+_0x17370c[_0x3251fa(0x322)]['toLocaleString']()+_0x3251fa(0x163)+_0x4914fd+'%)');}else console[_0x3251fa(0xdd)](_0x3251fa(0x34f)+_0x351590[_0x3251fa(0x31f)]());_0x17370c['envs']?console[_0x3251fa(0xdd)](_0x3251fa(0x150)+_0x58a50d+_0x3251fa(0x23e)+_0x17370c[_0x3251fa(0x355)]):console[_0x3251fa(0xdd)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x58a50d),_0x422ce4?.['PUB_FINGERPRINT']&&console[_0x3251fa(0xdd)](_0x3251fa(0x245)+_0x422ce4[_0x3251fa(0x130)]+_0x3251fa(0x8f));}if(!_0x187337||!_0x187337[_0x3251fa(0xa2)]('~licenses')){console['log'](''),console[_0x3251fa(0xdd)](_0x3251fa(0xcd)),console[_0x3251fa(0xdd)]('');return;}const _0x29c76b=[],_0x200d87=Date['now'](),_0x248816=_0x4514cb['id'],_0x3fd0cf='__OKDB_PUB_FINGERPRINT__';for(const {key:_0x1696a1,value:_0x4d0eee}of _0x187337['getRange']('~licenses')){const _0x2cec37=_0x4d0eee[_0x3251fa(0x1a8)]?Buffer[_0x3251fa(0xb5)](_0x4d0eee[_0x3251fa(0x1a8)],_0x3251fa(0x360)):Buffer['alloc'](0x8);let _0x2970f7='';try{_0x2970f7=_0x389cdc[_0x3251fa(0x2fa)](_0x248816,_0x2cec37,_0x3fd0cf)[_0x3251fa(0x248)];}catch{}_0x29c76b[_0x3251fa(0x231)]({'id':_0x1696a1,'licensee':_0x4d0eee['licensee']||'','expires':_0x4d0eee[_0x3251fa(0x11a)]?new Date(_0x4d0eee[_0x3251fa(0x11a)])[_0x3251fa(0xc0)]()['slice'](0x0,0xa):'','features':_0x3af915(_0x4d0eee[_0x3251fa(0x37d)]),'pin':_0x2970f7,'status':_0x30fb7a(_0x4d0eee,_0x200d87)});}if(_0x29c76b['length']===0x0){console['log'](''),console['log']('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x3251fa(0xdd)]('');return;}const _0x41fd04=['\x20\x20'+'ID'[_0x3251fa(0x20b)](0xe),'LICENSEE'[_0x3251fa(0x20b)](0xe),_0x3251fa(0x133)['padEnd'](0xc),'FEATURES'[_0x3251fa(0x20b)](0x1e),'PIN'[_0x3251fa(0x20b)](0xa),_0x3251fa(0xdb)][_0x3251fa(0x161)]('\x20');console[_0x3251fa(0xdd)]('\x0a'+_0x41fd04);for(const _0x11b6b5 of _0x29c76b){const _0x2b746b=_0x11b6b5['id'][_0x3251fa(0x341)](0x0,0x8)+'…';console[_0x3251fa(0xdd)](['\x20\x20'+_0x2b746b[_0x3251fa(0x20b)](0xe),_0x11b6b5[_0x3251fa(0x288)][_0x3251fa(0x341)](0x0,0xe)[_0x3251fa(0x20b)](0xe),_0x11b6b5['expires'][_0x3251fa(0x20b)](0xc),_0x11b6b5[_0x3251fa(0x37d)]['slice'](0x0,0x1e)[_0x3251fa(0x20b)](0x1e),_0x11b6b5[_0x3251fa(0x248)][_0x3251fa(0x20b)](0xa),_0x11b6b5[_0x3251fa(0x317)]]['join']('\x20'));}console[_0x3251fa(0xdd)]('');}finally{await _0x4514cb[_0x3251fa(0x2a5)]();}}async function _0x3a4f0c(_0x1d45c8,_0xfdca06){const _0x200497=_0x178958,_0x4207b2=require$$5,_0x377dc0=requireOkdbLicenseCodec();let _0x2537f2=_0x1d45c8;(_0x377dc0['detectInputType'](_0x1d45c8)===_0x200497(0x348)||_0x31ec50['existsSync'](_0x1d45c8)&&_0x31ec50[_0x200497(0x30c)](_0x1d45c8)[_0x200497(0x9b)]())&&(_0x2537f2=_0x31ec50[_0x200497(0x146)](_0x1d45c8,_0x200497(0x30f))[_0x200497(0x15e)]());const _0x49f362=_0x4e5a5b[_0x200497(0x235)](_0xfdca06[_0x200497(0x36d)]),_0x328d86=new _0x4207b2(_0x49f362,_0xfdca06[_0x200497(0x15b)]?{'encryptionKey':_0xfdca06[_0x200497(0x15b)]}:{});await _0x328d86[_0x200497(0x2f9)]();try{!_0x328d86['_license']&&(console[_0x200497(0x266)](_0x200497(0x86)),process['exit'](0x1));let _0x54db30;try{_0x54db30=await _0x328d86[_0x200497(0x268)][_0x200497(0x299)](_0x2537f2);}catch(_0xab2cc6){console[_0x200497(0x266)](_0x200497(0x1f0)+_0xab2cc6[_0x200497(0x307)]),process[_0x200497(0x15d)](0x1);}const _0x5d57a5=_0x328d86[_0x200497(0x268)][_0x200497(0x25a)](),_0x405c93=_0x5d57a5[_0x200497(0x17a)](_0x2766f8=>_0x2766f8[_0x200497(0xb3)]===_0x54db30['id'])?.['pin']||'',_0x35761c=Object['entries'](_0x54db30['features']||{})['filter'](([,_0x4bde10])=>_0x4bde10)[_0x200497(0x282)](([_0x9078ef])=>_0x9078ef),_0x34d300=_0x54db30['limits']||{},_0x588876=[_0x34d300[_0x200497(0x355)]?_0x200497(0x298)+_0x34d300['envs']:null,_0x34d300[_0x200497(0x2af)]?_0x200497(0x16c)+_0x34d300['typesPerEnv']:null,_0x34d300['syncPeers']?_0x200497(0x368)+_0x34d300[_0x200497(0x2e2)]:null,_0x34d300[_0x200497(0x322)]?'writes='+_0x34d300[_0x200497(0x322)][_0x200497(0x31f)]():null]['filter'](Boolean)[_0x200497(0x161)]('\x20\x20'),_0x65036d=_0x54db30['licenseType']===_0x377dc0[_0x200497(0x2b8)];console[_0x200497(0xdd)](_0x200497(0x300)),console[_0x200497(0xdd)](_0x200497(0x1cb)+_0x54db30['id']),console[_0x200497(0xdd)](_0x200497(0x2b9)+_0x54db30[_0x200497(0x288)]),console[_0x200497(0xdd)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x54db30[_0x200497(0x11a)])[_0x200497(0xc0)]()[_0x200497(0x341)](0x0,0xa)),console['log'](_0x200497(0x104)+(_0x35761c[_0x200497(0x161)](',\x20')||'(none)'));if(_0x588876)console[_0x200497(0xdd)](_0x200497(0x89)+_0x588876);_0x65036d?(console[_0x200497(0xdd)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x200497(0xdd)]('')):(console['log'](_0x200497(0x2f8)+_0x405c93),console[_0x200497(0xdd)]('\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation'),console[_0x200497(0xdd)](''),console[_0x200497(0xdd)](_0x200497(0xbc)),console[_0x200497(0xdd)](_0x200497(0xac)+_0x405c93+')\x20to\x20your\x20license\x20vendor.'),console[_0x200497(0xdd)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console['log']('\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>'),console[_0x200497(0xdd)](''));}finally{await _0x328d86['close']();}}async function _0x310d55(_0x1f6ef1,_0x11cf41){const _0x1819a3=_0x178958,_0x459501=require$$5,_0x19e693=_0x4e5a5b[_0x1819a3(0x235)](_0x11cf41['dbPath']),_0xf78192=new _0x459501(_0x19e693,_0x11cf41[_0x1819a3(0x15b)]?{'encryptionKey':_0x11cf41[_0x1819a3(0x15b)]}:{});await _0xf78192[_0x1819a3(0x2f9)]();try{!_0xf78192[_0x1819a3(0x268)]&&(console[_0x1819a3(0x266)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x1819a3(0x15d)](0x1));let _0x37830f;try{_0x37830f=await _0xf78192[_0x1819a3(0x268)][_0x1819a3(0x21c)](_0x1f6ef1[_0x1819a3(0x15e)]());}catch(_0x1ccd39){console['error'](_0x1819a3(0x1f0)+_0x1ccd39[_0x1819a3(0x307)]),console[_0x1819a3(0x266)](''),console[_0x1819a3(0x266)](_0x1819a3(0x388)),console[_0x1819a3(0x266)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0x1819a3(0x266)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x1819a3(0x266)](_0x1819a3(0x2c4)),console['error'](''),process[_0x1819a3(0x15d)](0x1);}console['log'](_0x1819a3(0x184)),console['log'](_0x1819a3(0x1cb)+_0x37830f['id']),console[_0x1819a3(0xdd)](_0x1819a3(0x2b9)+_0x37830f[_0x1819a3(0x288)]),console[_0x1819a3(0xdd)](_0x1819a3(0xba)+new Date(_0x37830f['expiresAt'])[_0x1819a3(0xc0)]()[_0x1819a3(0x341)](0x0,0xa)),console[_0x1819a3(0xdd)](_0x1819a3(0x304)),console[_0x1819a3(0xdd)]('');}finally{await _0xf78192[_0x1819a3(0x2a5)]();}}async function _0x334955(_0x10a89d,_0x371b40){const _0x4f3a4f=_0x178958;!_0x10a89d&&(console[_0x4f3a4f(0x266)](_0x4f3a4f(0x1ee)),process[_0x4f3a4f(0x15d)](0x1));const _0xa1325a=require$$5,_0x4aa033=requireOkdbLicenseCodec(),_0x31a923=_0x4e5a5b['resolve'](_0x371b40[_0x4f3a4f(0x36d)]),_0x5cb61c=new _0xa1325a(_0x31a923,_0x371b40['key']?{'encryptionKey':_0x371b40[_0x4f3a4f(0x15b)]}:{});await _0x5cb61c['open']();try{const _0x1c5bc6=_0x5cb61c['_systemEnv'];(!_0x1c5bc6||!_0x1c5bc6[_0x4f3a4f(0xa2)](_0x4f3a4f(0x202)))&&(console[_0x4f3a4f(0x266)](_0x4f3a4f(0x240)+_0x10a89d+'\x22'),process[_0x4f3a4f(0x15d)](0x1));let _0x5a52ed=null,_0x1dab95=null;const _0xceba3f=_0x1c5bc6[_0x4f3a4f(0x187)](_0x4f3a4f(0x202),_0x10a89d);if(_0xceba3f)_0x5a52ed=_0x10a89d,_0x1dab95=_0xceba3f;else{const _0x56bb00=[];for(const {key:_0x4f8fc5,value:_0x33b495}of _0x1c5bc6[_0x4f3a4f(0x2c6)]('~licenses')){if(_0x4f8fc5['startsWith'](_0x10a89d))_0x56bb00[_0x4f3a4f(0x231)]({'key':_0x4f8fc5,'value':_0x33b495});}_0x56bb00[_0x4f3a4f(0x1b0)]===0x0&&(console['error'](_0x4f3a4f(0x240)+_0x10a89d+'\x22'),process['exit'](0x1)),_0x56bb00[_0x4f3a4f(0x1b0)]>0x1&&(console[_0x4f3a4f(0x266)](_0x4f3a4f(0xf7)+_0x10a89d+_0x4f3a4f(0x1be)+_0x56bb00[_0x4f3a4f(0x1b0)]+_0x4f3a4f(0x195)),process[_0x4f3a4f(0x15d)](0x1)),_0x5a52ed=_0x56bb00[0x0][_0x4f3a4f(0x15b)],_0x1dab95=_0x56bb00[0x0][_0x4f3a4f(0x1d2)];}const _0x3865da=Date[_0x4f3a4f(0x149)](),_0x29aac8=_0x30fb7a(_0x1dab95,_0x3865da),_0x584f21=_0x5cb61c['id'],_0x428c4c='__OKDB_PUB_FINGERPRINT__';let _0x22f24f='';try{const _0xecd900=Buffer[_0x4f3a4f(0xb5)](_0x1dab95[_0x4f3a4f(0x1a8)],_0x4f3a4f(0x360));_0x22f24f=_0x4aa033['derivePin'](_0x584f21,_0xecd900,_0x428c4c)[_0x4f3a4f(0x248)];}catch{}const _0x557ecb=_0x1dab95[_0x4f3a4f(0x37d)]?Object[_0x4f3a4f(0x27c)](_0x1dab95[_0x4f3a4f(0x37d)])[_0x4f3a4f(0x234)](([,_0x3b875e])=>_0x3b875e)[_0x4f3a4f(0x282)](([_0x10c0cf])=>_0x10c0cf):[],_0x3623e9=_0x1dab95[_0x4f3a4f(0x214)]||{},_0x25c786=_0x1c5bc6?.['db']?.[_0x4f3a4f(0x187)]?.(_0x4f3a4f(0x19c))??0x0,_0x57e4f8=[..._0x5cb61c[_0x4f3a4f(0xf9)][_0x4f3a4f(0x116)]()][_0x4f3a4f(0x234)](_0x3dfa6f=>!_0x3dfa6f[_0x4f3a4f(0x1ef)]('~'))[_0x4f3a4f(0x1b0)];console[_0x4f3a4f(0xdd)](_0x4f3a4f(0x2bb)),console[_0x4f3a4f(0xdd)](_0x4f3a4f(0x1cb)+_0x5a52ed),console[_0x4f3a4f(0xdd)](_0x4f3a4f(0x2b9)+(_0x1dab95[_0x4f3a4f(0x288)]||'')),console[_0x4f3a4f(0xdd)](_0x4f3a4f(0xba)+(_0x1dab95[_0x4f3a4f(0x11a)]?new Date(_0x1dab95['expiresAt'])[_0x4f3a4f(0xc0)]()[_0x4f3a4f(0x341)](0x0,0xa):'')),console[_0x4f3a4f(0xdd)](_0x4f3a4f(0x104)+(_0x557ecb['join'](',\x20')||_0x4f3a4f(0x13f))),console['log']('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x22f24f),console[_0x4f3a4f(0xdd)](_0x4f3a4f(0x19d)+_0x29aac8),console[_0x4f3a4f(0xdd)](_0x4f3a4f(0xe6)+new Date(_0x1dab95[_0x4f3a4f(0xd2)])[_0x4f3a4f(0xc0)]());if(_0x29aac8==='active'){console[_0x4f3a4f(0xdd)](''),console[_0x4f3a4f(0xdd)](_0x4f3a4f(0x2e5));if(_0x3623e9[_0x4f3a4f(0x322)]){const _0x68ebb9=Math['round'](_0x25c786/_0x3623e9['maxWrites']*0x64);console[_0x4f3a4f(0xdd)](_0x4f3a4f(0xa1)+_0x25c786[_0x4f3a4f(0x31f)]()+_0x4f3a4f(0x23e)+_0x3623e9[_0x4f3a4f(0x322)][_0x4f3a4f(0x31f)]()+'\x20\x20('+_0x68ebb9+'%)');}else console[_0x4f3a4f(0xdd)](_0x4f3a4f(0xa1)+_0x25c786[_0x4f3a4f(0x31f)]()+'\x20\x20(unlimited)');_0x3623e9['envs']?console[_0x4f3a4f(0xdd)](_0x4f3a4f(0x1fa)+_0x57e4f8+_0x4f3a4f(0x23e)+_0x3623e9[_0x4f3a4f(0x355)]):console[_0x4f3a4f(0xdd)](_0x4f3a4f(0x1fa)+_0x57e4f8+_0x4f3a4f(0x2d3));}console[_0x4f3a4f(0xdd)]('');}finally{await _0x5cb61c[_0x4f3a4f(0x2a5)]();}}async function _0x3bae57(_0x365c70,_0x32916a){const _0x38fe92=_0x178958;!_0x365c70&&(console['error'](_0x38fe92(0x365)),process[_0x38fe92(0x15d)](0x1));const _0x1b43dc=require$$5,_0x2686a1=_0x4e5a5b[_0x38fe92(0x235)](_0x32916a[_0x38fe92(0x36d)]),_0x53aa78=new _0x1b43dc(_0x2686a1,_0x32916a[_0x38fe92(0x15b)]?{'encryptionKey':_0x32916a['key']}:{});await _0x53aa78[_0x38fe92(0x2f9)]();try{const _0x692452=_0x53aa78[_0x38fe92(0x122)];(!_0x692452||!_0x692452[_0x38fe92(0xa2)](_0x38fe92(0x202)))&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x365c70+'\x22'),process[_0x38fe92(0x15d)](0x1));let _0x19b5df=null,_0x1b9efe=null;const _0x443460=_0x692452['get'](_0x38fe92(0x202),_0x365c70);if(_0x443460)_0x19b5df=_0x365c70,_0x1b9efe=_0x443460;else{const _0x1b2403=[];for(const {key:_0x824a24,value:_0x18252d}of _0x692452[_0x38fe92(0x2c6)](_0x38fe92(0x202))){if(_0x824a24['startsWith'](_0x365c70))_0x1b2403['push']({'key':_0x824a24,'value':_0x18252d});}_0x1b2403[_0x38fe92(0x1b0)]===0x0&&(console[_0x38fe92(0x266)](_0x38fe92(0x240)+_0x365c70+'\x22'),process['exit'](0x1)),_0x1b2403[_0x38fe92(0x1b0)]>0x1&&(console[_0x38fe92(0x266)](_0x38fe92(0xf7)+_0x365c70+_0x38fe92(0x1be)+_0x1b2403[_0x38fe92(0x1b0)]+_0x38fe92(0x195)),process['exit'](0x1)),_0x19b5df=_0x1b2403[0x0][_0x38fe92(0x15b)],_0x1b9efe=_0x1b2403[0x0][_0x38fe92(0x1d2)];}await _0x692452[_0x38fe92(0x153)]('~licenses',_0x19b5df),console[_0x38fe92(0xdd)](_0x38fe92(0x250)+_0x19b5df+_0x38fe92(0x22f)+(_0x1b9efe[_0x38fe92(0x288)]||_0x38fe92(0x284))+')');}finally{await _0x53aa78['close']();}}async function _0x2e83df(_0x21cc33,_0x57454c,_0x1e9ed7){const _0x30d96f=_0x178958;!_0x21cc33&&(console[_0x30d96f(0x266)]('[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>'),process[_0x30d96f(0x15d)](0x1));!_0x1e9ed7[_0x30d96f(0x237)]&&!(_0x1e9ed7[_0x30d96f(0x1c2)]&&_0x1e9ed7[_0x30d96f(0x26e)])&&(console[_0x30d96f(0x266)](_0x30d96f(0x356)),process[_0x30d96f(0x15d)](0x1));const _0x3b2bc3=_0x1e9ed7['selfAddress']||_0x57454c[_0x30d96f(0x36a)]?.[_0x30d96f(0x1cd)];!_0x3b2bc3&&(console['error'](_0x30d96f(0xe8)+_0x30d96f(0x97)+_0x30d96f(0x301)),process['exit'](0x1));const _0x5b216c=require$$5,_0x8e3065=new _0x5b216c(_0x57454c[_0x30d96f(0x36d)],{'sync':{'address':_0x3b2bc3,'auto_reconcile':![]}});await _0x8e3065[_0x30d96f(0x2f9)]();try{const _0x52ebaf=_0x8e3065[_0x30d96f(0x122)];if(_0x52ebaf&&_0x52ebaf[_0x30d96f(0xa2)]('~tokens')){let _0x41afbf=![];for(const _0x1237bb of _0x52ebaf['getRange']('~tokens')){_0x41afbf=!![];break;}_0x41afbf&&console[_0x30d96f(0xdd)](_0x30d96f(0x29f)+_0x30d96f(0x31b));}console[_0x30d96f(0xdd)](_0x30d96f(0x10b)+_0x21cc33+'…'),await _0x8e3065[_0x30d96f(0x36a)][_0x30d96f(0x161)](_0x21cc33[_0x30d96f(0x156)](/\/+$/,''),{'token':_0x1e9ed7[_0x30d96f(0x237)],'username':_0x1e9ed7['username'],'password':_0x1e9ed7[_0x30d96f(0x26e)]}),console[_0x30d96f(0xdd)](_0x30d96f(0x344)),console[_0x30d96f(0xdd)](_0x30d96f(0x2a0));}finally{await _0x8e3065[_0x30d96f(0x2a5)]();}}async function _0x2b37cf(){const _0x11ad31=_0x178958,_0x4c8833=Date[_0x11ad31(0x149)](),_0x58301e=_0x15c3e1(process[_0x11ad31(0x2e4)]),_0x50e1fa=_0x4d61dd(_0x58301e),_0xb16085=_0x4e5a5b[_0x11ad31(0x235)](_0x50e1fa[_0x11ad31(0x36d)]);!_0x50e1fa['noRepl']&&!process[_0x11ad31(0x274)]['isTTY']&&(_0x50e1fa[_0x11ad31(0x27a)]=!![]);const _0xbbaed9=require$$5,{start:_0x25d893,colorLog:_0x40ebfb}=requireOkdbShell(),_0xf4b52c={..._0x50e1fa[_0x11ad31(0x15b)]?{'encryptionKey':_0x50e1fa['key']}:{},..._0x50e1fa['noAdmin']?{'admin':![]}:_0x4297a1(_0x50e1fa[_0x11ad31(0x1f2)])?{'admin':_0x50e1fa[_0x11ad31(0x1f2)]}:{},..._0x4297a1(_0x50e1fa[_0x11ad31(0xdc)])?{'api':_0x50e1fa[_0x11ad31(0xdc)]}:{},..._0x4297a1(_0x50e1fa[_0x11ad31(0x2a1)])?{'auth':_0x50e1fa['auth']}:{},..._0x4297a1(_0x50e1fa[_0x11ad31(0x2e8)])?{'mcp':_0x50e1fa['mcp']}:{},..._0x50e1fa[_0x11ad31(0x32e)]!==![]?{'timeMachine':_0x50e1fa['timeMachine']}:{}},_0x24002f=new _0xbbaed9(_0xb16085,_0xf4b52c);_0x24002f[_0x11ad31(0xdd)][_0x11ad31(0x363)]?.();const _0x57a03d=_0x24002f[_0x11ad31(0xdd)][_0x11ad31(0x2d0)](_0x2a7bc8=>_0x40ebfb(_0x2a7bc8,_0x50e1fa['logLevel']));if(_0x50e1fa['noRepl'])process['stdout'][_0x11ad31(0xef)]('[okdb]\x20starting…\x0a');await _0x24002f[_0x11ad31(0x2f9)]();if(_0x50e1fa[_0x11ad31(0x27a)])process['stdout'][_0x11ad31(0xef)](_0x11ad31(0xd1));try{await _0x38fa7e(_0x24002f,_0x50e1fa['port']);}catch(_0x376f55){_0x376f55[_0x11ad31(0x309)]==='EADDRINUSE'&&(console['error'](_0x11ad31(0x1df)+_0x50e1fa[_0x11ad31(0x1e9)]+_0x11ad31(0x1c1)),process['exit'](0x1));throw _0x376f55;}if(_0x50e1fa[_0x11ad31(0x27a)])process['stdout'][_0x11ad31(0xef)](_0x11ad31(0xca)+_0x50e1fa[_0x11ad31(0x1e9)]+'\x0a');if(!_0x50e1fa[_0x11ad31(0x27a)])_0x24002f[_0x11ad31(0xdd)][_0x11ad31(0x363)]?.(),_0x57a03d?.(),_0x1297e8(_0x24002f[_0x11ad31(0x2a1)]?.[_0x11ad31(0x12e)]?.()??[]),await _0x25d893(_0x24002f,_0x50e1fa);else{const _0x4f506e=_0x4e5a5b['join'](_0xb16085,_0x11ad31(0xb9));try{_0x31ec50[_0x11ad31(0x359)](_0x4f506e,String(process['pid']));}catch{}const _0x523158=Date['now']()-_0x4c8833;console['log'](''),console[_0x11ad31(0xdd)](_0x11ad31(0x2b5)),console[_0x11ad31(0xdd)](_0x11ad31(0x321)+_0x50e1fa[_0x11ad31(0x1e9)]),console[_0x11ad31(0xdd)](_0x11ad31(0x1e8)+_0xb16085),console[_0x11ad31(0xdd)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x24002f['id']);{const _0x2a0ba5=_0x24002f['_systemEnv']?.['db']?.['get']?.(_0x11ad31(0x19c))??0x0,_0x1c6ddd=[..._0x24002f[_0x11ad31(0xf9)]['keys']()][_0x11ad31(0x234)](_0xf8f92=>!_0xf8f92[_0x11ad31(0x1ef)]('~'))[_0x11ad31(0x1b0)];if(_0x24002f['_license']?.[_0x11ad31(0x1ce)]?.[_0x11ad31(0x154)]===0x1){const _0x2e1043=Math[_0x11ad31(0x36e)]((_0x24002f[_0x11ad31(0x268)]['active'][_0x11ad31(0x11a)]-Date[_0x11ad31(0x149)]())/0x5265c00);console[_0x11ad31(0xdd)](_0x11ad31(0x96)+_0x24002f[_0x11ad31(0x268)]['active'][_0x11ad31(0x288)]+_0x11ad31(0x1d5)+_0x2e1043+_0x11ad31(0x392));}else{if(_0x24002f[_0x11ad31(0x268)]?.[_0x11ad31(0x1ce)]){const _0x492c76=_0x24002f[_0x11ad31(0x268)]['active'];console['log'](_0x11ad31(0x2c0)+_0x492c76[_0x11ad31(0x288)]+'\x20(expires\x20'+new Date(_0x492c76[_0x11ad31(0x11a)])[_0x11ad31(0xc0)]()['slice'](0x0,0xa)+')');const _0x11436b=_0x492c76[_0x11ad31(0x214)]||{};if(_0x11436b[_0x11ad31(0x322)]){const _0x26f3bf=Math['round'](_0x2a0ba5/_0x11436b[_0x11ad31(0x322)]*0x64);console['log'](_0x11ad31(0xc9)+_0x2a0ba5[_0x11ad31(0x31f)]()+'\x20/\x20'+_0x11436b['maxWrites']['toLocaleString']()+_0x11ad31(0x204)+_0x26f3bf+'%),\x20'+_0x1c6ddd+(_0x11436b[_0x11ad31(0x355)]?'/'+_0x11436b[_0x11ad31(0x355)]:'')+_0x11ad31(0x87)+(_0x1c6ddd===0x1?'':'s'));}}else{if(_0x24002f['_license']){const _0x5a6fac=_0x24002f[_0x11ad31(0x268)][_0x11ad31(0x25a)](),_0x1d316b=_0x5a6fac[_0x11ad31(0x1b0)]?_0x5a6fac[_0x11ad31(0x282)](_0x582910=>_0x582910[_0x11ad31(0x248)])[_0x11ad31(0x161)](',\x20'):_0x11ad31(0x1fe),_0x247f62=_0x24002f[_0x11ad31(0x268)][_0x11ad31(0x1e5)],_0xaf2013=_0x247f62['limits'][_0x11ad31(0x322)]?Math['round'](_0x2a0ba5/_0x247f62['limits'][_0x11ad31(0x322)]*0x64):0x0;console['log']('\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine'),console['log'](_0x11ad31(0xc9)+_0x2a0ba5[_0x11ad31(0x31f)]()+_0x11ad31(0x23e)+_0x247f62[_0x11ad31(0x214)]['maxWrites'][_0x11ad31(0x31f)]()+_0x11ad31(0x204)+_0xaf2013+_0x11ad31(0x1a7)+_0x1c6ddd+_0x11ad31(0x23e)+_0x247f62[_0x11ad31(0x214)][_0x11ad31(0x355)]+_0x11ad31(0x34b)),console[_0x11ad31(0xdd)](_0x11ad31(0x241)+_0x1d316b);}}}}console[_0x11ad31(0xdd)](_0x11ad31(0x327)+_0x50e1fa[_0x11ad31(0x1e9)]+_0x11ad31(0x32c));!_0x50e1fa[_0x11ad31(0x1ac)]&&console[_0x11ad31(0xdd)](_0x11ad31(0x334)+_0x50e1fa[_0x11ad31(0x1e9)]+_0x11ad31(0x2fc));console[_0x11ad31(0xdd)](''),console[_0x11ad31(0xdd)](_0x11ad31(0x110)+_0x523158+'ms'),_0x1297e8(_0x24002f[_0x11ad31(0x2a1)]?.[_0x11ad31(0x12e)]?.()??[]);async function _0x5dc956(){const _0x437e33=_0x11ad31;process['stdout'][_0x437e33(0xef)](_0x437e33(0x196));try{_0x31ec50[_0x437e33(0x205)](_0x4f506e);}catch{}await _0x24002f[_0x437e33(0x2a5)](),process[_0x437e33(0x15d)](0x0);}process['on'](_0x11ad31(0x342),_0x5dc956),process['on'](_0x11ad31(0x1bc),_0x5dc956);}}const _0x3398cb=new Set([_0x178958(0x109),_0x178958(0x238),'init',_0x178958(0x95),'export',_0x178958(0x35d),_0x178958(0x19a),_0x178958(0x237),_0x178958(0x161),_0x178958(0x22a)]),_0x78651f=process[_0x178958(0x2e4)][0x2];if(_0x78651f==='version')console[_0x178958(0xdd)](require$$2[_0x178958(0x109)]),process[_0x178958(0x15d)](0x0);else{if(_0x78651f&&_0x3398cb['has'](_0x78651f)){const _0x23d2bd=process['argv'][_0x178958(0x341)](0x3),_0x2eeead=_0x15c3e1([_0x178958(0x147),_0x178958(0x28a),..._0x23d2bd]),_0x50abdd=_0x4d61dd(_0x2eeead),_0x4b1b28=new Set([_0x178958(0x390),'-d',_0x178958(0x31a),'-k',_0x178958(0x105),'-c',_0x178958(0xb2),'-p',_0x178958(0x305),_0x178958(0x172),'-e',_0x178958(0xeb),_0x178958(0x1c7),'--password',_0x178958(0x2ec),_0x178958(0x8d),_0x178958(0x171),_0x178958(0x370),_0x178958(0x1d0),_0x178958(0xa6),'-u',_0x178958(0x185)]);let _0x4d57c6=null;for(let _0x1395d2=0x0;_0x1395d2<_0x23d2bd[_0x178958(0x1b0)];_0x1395d2++){if(_0x4b1b28[_0x178958(0x158)](_0x23d2bd[_0x1395d2])){_0x1395d2++;continue;}if(!_0x23d2bd[_0x1395d2][_0x178958(0x1ef)]('-')){_0x4d57c6=_0x23d2bd[_0x1395d2];break;}}(async()=>{const _0x377ea8=_0x178958;if(_0x78651f===_0x377ea8(0x237)){const _0x40ca55=process[_0x377ea8(0x2e4)][0x3],_0x3ed08e=process[_0x377ea8(0x2e4)][_0x377ea8(0x341)](0x4),_0x37ca97=_0x15c3e1(['node','okdb',..._0x3ed08e]),_0xbe166b=_0x4d61dd(_0x37ca97),_0x350ab6=new Set([_0x377ea8(0x390),'-d',_0x377ea8(0x31a),'-k',_0x377ea8(0x105),'-c',_0x377ea8(0xb2),'-p','--name',_0x377ea8(0x106),_0x377ea8(0x2ec),_0x377ea8(0x8d),'--grants','--ttl','--log-level',_0x377ea8(0x172),'-e',_0x377ea8(0xeb)]),_0x4ccde6=[];for(let _0x1f8dc4=0x0;_0x1f8dc4<_0x3ed08e['length'];_0x1f8dc4++){if(_0x350ab6['has'](_0x3ed08e[_0x1f8dc4])){_0x1f8dc4++;continue;}if(_0x3ed08e[_0x1f8dc4][_0x377ea8(0x1ef)]('-'))continue;_0x4ccde6[_0x377ea8(0x231)](_0x3ed08e[_0x1f8dc4]);}switch(_0x40ca55){case _0x377ea8(0x1a5):await _0x19981c(_0xbe166b,_0x37ca97);break;case'list':await _0x54d243(_0xbe166b);break;case'revoke':await _0x58a0e2(_0x4ccde6[0x0],_0xbe166b);break;default:console['error'](_0x377ea8(0x1a9)+_0x40ca55+_0x377ea8(0xf8)),process['exit'](0x1);}return;}if(_0x78651f==='license'){const _0x17b963=requireOkdbLicenseCodec(),_0x4c8805=process[_0x377ea8(0x2e4)][_0x377ea8(0x341)](0x3),_0x3737a9=_0x15c3e1([_0x377ea8(0x147),_0x377ea8(0x28a),..._0x4c8805]),_0x4beab3=_0x4d61dd(_0x3737a9),_0x5322e2=new Set([_0x377ea8(0x390),'-d',_0x377ea8(0x31a),'-k','--config','-c','--port','-p',_0x377ea8(0x305)]),_0x13b980=[];for(let _0x14df7f=0x0;_0x14df7f<_0x4c8805[_0x377ea8(0x1b0)];_0x14df7f++){if(_0x5322e2[_0x377ea8(0x158)](_0x4c8805[_0x14df7f])){_0x14df7f++;continue;}if(_0x4c8805[_0x14df7f][_0x377ea8(0x1ef)]('-'))continue;_0x13b980[_0x377ea8(0x231)](_0x4c8805[_0x14df7f]);}const _0xf9a6a1=_0x13b980[0x0]??null;if(_0xf9a6a1===_0x377ea8(0x153))await _0x3bae57(_0x13b980[0x1],_0x4beab3);else{if(!_0xf9a6a1)await _0x340528(_0x4beab3);else{let _0x47268a=_0x17b963[_0x377ea8(0x1b4)](_0xf9a6a1);if(_0x47268a===_0x377ea8(0x32b)&&_0x31ec50[_0x377ea8(0x36f)](_0xf9a6a1))_0x47268a=_0x377ea8(0x348);if(_0x47268a==='path')try{const _0xe1bbd5=_0x31ec50[_0x377ea8(0x146)](_0xf9a6a1,'utf8')['trim'](),_0x363904=_0x17b963['detectInputType'](_0xe1bbd5);if(_0x363904==='activation'){await _0x310d55(_0xe1bbd5,_0x4beab3);return;}await _0x3a4f0c(_0xf9a6a1,_0x4beab3);return;}catch(_0x5a018c){console[_0x377ea8(0x266)](_0x377ea8(0x10f)+_0xf9a6a1+':\x20'+_0x5a018c[_0x377ea8(0x307)]),process['exit'](0x1);}switch(_0x47268a){case'blob':await _0x3a4f0c(_0xf9a6a1,_0x4beab3);break;case _0x377ea8(0x2e0):await _0x310d55(_0xf9a6a1,_0x4beab3);break;case _0x377ea8(0x297):await _0x334955(_0xf9a6a1,_0x4beab3);break;default:console[_0x377ea8(0x266)](_0x377ea8(0x1d4)+_0xf9a6a1+'\x22'),console[_0x377ea8(0x266)](''),console[_0x377ea8(0x266)](_0x377ea8(0xa4)),console[_0x377ea8(0x266)](_0x377ea8(0xf6)),console[_0x377ea8(0x266)](_0x377ea8(0x1db)),console[_0x377ea8(0x266)]('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x377ea8(0x266)](_0x377ea8(0x255)),console[_0x377ea8(0x266)](''),console['error'](_0x377ea8(0x362)),process[_0x377ea8(0x15d)](0x1);}}}return;}switch(_0x78651f){case _0x377ea8(0x238):await _0x2aee4d(_0x50abdd);break;case'init':await _0x5dbf09();break;case _0x377ea8(0x19a):await _0x265e3a(_0x50abdd);break;case _0x377ea8(0x95):await _0x494019(_0x4d57c6??_0x4e5a5b[_0x377ea8(0x235)](_0x377ea8(0x378)),_0x50abdd);break;case'export':await _0x194b4b(_0x4d57c6??_0x4e5a5b[_0x377ea8(0x235)](_0x377ea8(0x343)),_0x50abdd,_0x2eeead);break;case _0x377ea8(0x35d):await _0x40f9ff(_0x4d57c6??_0x4e5a5b[_0x377ea8(0x235)](_0x377ea8(0x343)),_0x50abdd,_0x2eeead);break;case _0x377ea8(0x161):await _0x2e83df(_0x4d57c6,_0x50abdd,_0x2eeead);break;}})()[_0x178958(0xd4)](()=>process[_0x178958(0x15d)](0x0))[_0x178958(0x128)](_0x29077b=>{const _0x46a7d3=_0x178958;console[_0x46a7d3(0x266)](_0x46a7d3(0x2cf)+(_0x29077b['message']||_0x29077b)+'\x0a'),process[_0x46a7d3(0x15d)](0x1);});}else _0x2b37cf()[_0x178958(0x128)](_0x3f383b=>{const _0x1525fd=_0x178958;console[_0x1525fd(0x266)](_0x1525fd(0x38a)),console[_0x1525fd(0x266)](_0x3f383b[_0x1525fd(0xc3)]||_0x3f383b),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x152c38(0x13b)]=okdb;
2
+ 'use strict';const _0x3f2430=_0x6e57;(function(_0x871478,_0xeddd56){const _0x3341a1=_0x6e57,_0x57ee75=_0x871478();while(!![]){try{const _0x355cbd=parseInt(_0x3341a1(0x3a3))/0x1+parseInt(_0x3341a1(0x26e))/0x2*(parseInt(_0x3341a1(0x31e))/0x3)+parseInt(_0x3341a1(0x3be))/0x4+-parseInt(_0x3341a1(0x2ad))/0x5+-parseInt(_0x3341a1(0x3ca))/0x6*(-parseInt(_0x3341a1(0x370))/0x7)+-parseInt(_0x3341a1(0x3da))/0x8*(-parseInt(_0x3341a1(0x10e))/0x9)+parseInt(_0x3341a1(0x1ce))/0xa*(-parseInt(_0x3341a1(0x3c2))/0xb);if(_0x355cbd===_0xeddd56)break;else _0x57ee75['push'](_0x57ee75['shift']());}catch(_0x500842){_0x57ee75['push'](_0x57ee75['shift']());}}}(_0xa73d,0x5e94d));var require$$1$1=require(_0x3f2430(0x217)),require$$1=require('fs'),require$$3=require(_0x3f2430(0x3bb)),require$$0$2=require(_0x3f2430(0x102)),require$$5=require('../okdb'),require$$0=require(_0x3f2430(0x247)),require$$0$1=require('node:crypto'),require$$2$1=require('os'),require$$4=require('child_process');function getDefaultExportFromCjs(_0x51d44a){const _0x330bb8=_0x3f2430;return _0x51d44a&&_0x51d44a[_0x330bb8(0x111)]&&Object[_0x330bb8(0x309)]['hasOwnProperty'][_0x330bb8(0x17c)](_0x51d44a,_0x330bb8(0x3eb))?_0x51d44a['default']:_0x51d44a;}var okdb$1={},version='1.6.1',require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function _0xa73d(){const _0x1db676=['body:\x20','OKDBSchemaCollectionError','\x20\x20\x20\x20\x20\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]\x20port\x20','info','der','\x20\x20Error:\x20','started','--address','free\x20tier','length','issuedAt','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','/api/','open','allocUnsafe','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','4711oZAxuB','hint','STATUS','Invalid\x20license\x20blob:\x20','\x20\x20score:','mkdirSync','_license','exit','fill','[okdb]\x20starting…\x0a','\x20more','\x20\x20\x20\x20port:\x20\x20','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','system:bus_state_change','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','indexes','NAME','--key','_lookupByName','finally','/types\x0a\x20\x20\x20\x20','index:registered','fts:reset','\x20\x20http://localhost:','equals','FOREIGN_KEY_VIOLATION','create','env:opened','types:','Activation\x20invalid:\x20','auth','TYPE_NOT_REGISTERED','ACTIVATION_EXPIRED','every','trimStart','start\x20','GET','bold','token','description','/type/users/query\x0a\x20\x20\x20\x20','code','\x20\x20\x20\x20license:\x20','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','[okdb]\x20unknown\x20token\x20action:\x20\x22','gray','txn:end','\x20\x20⚠\x20\x20','handle','type/users/query\x20{\x22active\x22:true}','properties','195904FpMzJq','listen','logs','config','copy','system:poke','\x20\x20✗','\x20\x20Writes:\x20\x20','database\x20path\x20writable:\x20','--token','\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','system:ready','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','param','endsWith','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','exportToFile','sig','EXIT','\x22\x20to\x20enable\x20it.','operation','stringify','Unique\x20constraint\x20violated\x20on\x20','\x27:\x20','net','decodeActivationToken','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','1120972KFpwNf','\x20\x20\x20\x20features:\x20\x20','OKDBInvalidValueError','PUBLIC_KEY_PEM','860233xQayYX','sync','ref:violation_resolved','roles','help','[okdb]\x20exporting\x20blobs…','push','method','3906plFNSn','\x20\x20\x20\x20\x20\x20\x20','standard','\x20\x20(need\x20≥\x2018)','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','randomBytes','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','./okdb-data','Bearer\x20','OKDBIndexNotRegisteredError','Events','addLicense','\x0a[okdb]\x20fatal\x20error:','_isFree','%),\x20','1497712lbrmdE','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','body','stdin','selfAddress','level','warn','use\x20<env>','http','\x20MB)','address','prompt',')\x20to\x20your\x20license\x20vendor.','isFile','onLicenseExpired','\x0a\x20\x20✓\x20License\x20activated','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','default','exp','\x20\x20·\x20\x20','pending','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','readUInt8','listening','\x20documents\x20fail\x20validation','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','ttl:clear','PUT\x20type/users/item/x\x20{\x22n\x22:1}','--drop','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','tags','result','--env','\x20for\x20commands,\x20','\x20\x20\x20\x20path:\x20\x20','\x20\x20\x20\x20\x20http://localhost:','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','transport:\x20','env','\x27\x20doesn\x27t\x20exist','readline','dim','registerType','readUInt32BE','effective',',\x20got\x20','\x0a\x0a\x20\x20','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','message','unlinkSync','{}[]:,\x27\x22','\x20\x20\x20\x20limits:\x20\x20\x20\x20','9oTkFFv','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','bind','__esModule','_active','scrypt','concat','OKDBUniqueConstraintError','setTtl','status','\x1b[34m','wrong_node','.kdbconfig','parse','OKDBIndexHasConsumersError','\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-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\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\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','toLowerCase','freeze','licenseHash','exports','floor','[okdb]\x20opening\x20','\x20(expires\x20','toString','log','~tokens','\x20log\x20level:\x20','_systemEnv','use','\x1b[33m','license:activated','SCHEMA_VALIDATION_FAILED','payload','type/users/item/alice\x20--env\x20staging','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','0123456789ABCDEFGHJKMNPQRSTVWXYZ','resolve','init','\x0a\x20\x20\x20\x20','ref:violation','node\x20','username','SCHEMA_COLLECTION_INVALID','hex','\x0a[okdb]\x20error:\x20','startsWith','readUInt16BE','[okdb]\x20reset:\x20','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','127.0.0.1','details','randomUUID','\x20active\x20env:\x20','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','recheck','LICENSE_TYPE_OPEN','DELETE','includes','\x20\x20\x20\x20\x20\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','Index\x20\x27','assertFeature','\x20\x20⚠','HELP','\x20\x20✓\x20','PIN','SIG_INVALID','Foreign\x20key\x20violation:\x20','--path','label','shutdown','~licenses','clearLine','licenseType','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','__OKDB_PUB_FINGERPRINT__','license:removed','createInterface','envs=','--name','\x0a\x20\x20No\x20routes\x20matching\x20\x22','data','[okdb]\x20import\x20complete','routes','--permissions','system:stopped','summary','Engines','embeddings','\x20\x20Flags','\x20to\x20browse\x20the\x20API,\x20','OKDBVersionMismatchError','createdAt','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','\x1b[0m','typeSubDbs','\x20tokens:','--no-admin','fieldPath','verifyActivation','INDEX_NOT_REGISTERED','System','ready','INDEX_ALREADY_REGISTERED','\x20records…','permissions','database\x20path\x20not\x20writable:\x20','hidden','\x27\x20on\x20type\x20\x27','targetType','value','call','OKDBInvalidIndexKeyError','verify','export','http://localhost:','Token\x20secret\x20not\x20configured','argv','types','tags:\x20','index:ready','types\x20--env\x20staging','\x20deleted','backup','level:\x20info','_ensureTokensType','--password','isArray','unknown','\x0a\x20\x20Invalid\x20JSON:\x20','padEnd','once','\x1b[1m','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','--log-level','active:','\x22\x20→\x20','already\x20in\x20use','Type\x20\x27','exec','close','queue','win32','digest','DELETE\x20type/users/item/x','emit','activateLicense','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','removeLicense','(add\x20a\x20license\x20first)','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x20\x20→\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','\x20references\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','port','\x20already\x20exists','fts:','\x20\x20Common\x20causes:','existsSync','quit','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','padStart','migrate','index:progress','map','--label','line','sha256','Queue','type:drop','byteLength','access:\x20','\x20\x20records=','some','_licenseHash','importFromFile','forEach','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','--blobs','No\x20license\x20found\x20matching\x20this\x20activation\x20token','--changes','now','targetKey','files/','catch','\x20logs\x20off\x0a','\x1b[36m','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','access','\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','stack','min','70wzEUxx','__writeCounter','columns','failures','isTTY','type','version','env/:env','\x20\x20╚═══════════════════════════╝','reset','other','\x20writes\x20(','platform','\x0a\x20\x20okdb\x20doctor\x0a','writeUInt8','--help','fts','dropFts','toFixed','../','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','join','[body]','max','then','ftsName','homedir','\x20\x20\x20\x20graceful\x20shutdown\x0a','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','\x20/\x20','key','ENV','UNIQUE_CONSTRAINT','val','License\x20limit\x20exceeded:\x20','item:create','importBlobs','INVALID_PRIMARY_KEY','yellow','\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','round','\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','env/staging/info','\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','type/users\x20--help','licenseId','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','cyan','[okdb]\x20loaded\x20config:\x20','getRange','\x0a\x20\x20','trim','true','OPEN','okdb','writes=','type/','valid','dynamic','stdout','grants','LICENSE_ACTIVATION_INVALID','./okdb-export.ndjson','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','\x20\x20All\x20checks\x20passed.\x0a','[okdb]\x20error:\x20','\x1b[35m','\x20\x20✓\x20OKDB\x20server\x20running','addedAt','PATCH','\x20\x20(unlimited)','ttl','createHmac','path','filter','getPins','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','red','[env]','sizeBefore','timeMachine','\x20bytes,\x20need\x20>=\x2065)','Invalid\x20activation\x20token:\x20','ttl:expired','off','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','[okdb]\x20reset\x20aborted','stopped','hasType','LICENSE_HASH_MISMATCH','reverse','find','fromEntries','isInteger','Environments','\x20\x20[','expiresAt','TYPES','ceil','PUB_FINGERPRINT','safety','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','[on|off|level]','[filter]','\x20\x20Usage:\x20','peers=','setSchema','toISOString','\x20\x20Envs:\x20\x20\x20\x20','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','yes','options','(no\x20types)','children','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','\x22\x20matches\x20','LICENSE_LIMIT_EXCEEDED','./okdb-backup','\x20opening\x20','crypto','drop','magenta','\x0a\x20\x20✓\x20License\x20added','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','getSecurityNotices','current','debug','schema:drop','ENVS','sort','\x20not\x20found','config\x20file\x20valid:\x20','null','\x22\x20(must\x20be\x20debug|info|warn|error)','(empty)','engines','bus:drain','update','registerIndex','<path>','\x1b[31m','utf8','--types','[okdb]\x20created\x20.kdbconfig','INVALID_INDEX_KEY','doctor','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','enabled','\x20licenses','reason','\x20\x20║','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','getCount','terminal','toLocaleString','\x22\x20is\x20used\x20by:\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','1170116lmRnPC','CREATED','created','blob','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','transaction','meta','[okdb]\x20backing\x20up\x20to\x20','import','readFileSync','env/','writeUInt16BE','index:reset','\x20does\x20not\x20exist','\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','test','--open','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','waiting','syncPeers','time','files','dirname','\x20\x20(','expiry','writeUInt32BE','get','resetting','\x0d[okdb]\x20','derivePin','license','cause','pause','Cannot\x20delete\x20','item:remove','set','search','schema:set','OKDBForeignKeyError','captureStackTrace','LABEL','\x20env','charCodeAt','detachConsole','question','noAdmin','type/users/item/alice','\x20months\x20from\x20issuance)','--env\x20<name>','dbPath','Examples','(unset)','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','\x1b[37m','idx:','pin','keys:','system:drain','open\x20','_envs','active','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22',']\x20already\x20maps\x20to\x20\x27','3758580xGYazX','split','\x20\x20\x20\x20expires:\x20\x20\x20','unique:violation_resolved','--port','expired','white','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','ttl:set','\x20\x20(name:\x20','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','config\x20file\x20invalid:\x20','OKDBTypeNotRegisteredError','Embeddings','processors/','ALREADY_EXISTS','\x20\x20\x20\x20\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/','\x22\x20on\x20\x22','\x20\x20·\x20','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','application/json','xdg-open\x20','Build\x20expects\x20public\x20key\x20fingerprint\x20','password','--ttl','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','mcp','\x27,\x20cannot\x20map\x20to\x20\x27','--config','keys','fts:registered','\x20\x20\x20\x20usage:\x20\x20\x20','\x20type','[okdb]\x20started\x20in\x20','transport','\x20(expires\x20in\x20','sub','--username','envs','sync:apply','sizeAfter','Feature\x20not\x20licensed:\x20','activation','write','\x20\x20\x20\x20','\x20in\x20','Types','\x20\x20Expected\x20one\x20of:','License\x20already\x20stored','\x20<path>\x20[json-body]','\x20\x20✓\x20Removed\x20license\x20','LICENSEE','base64url','attach','licensed','loadEnvFile','\x22\x20already\x20exists','decoded','SIGTERM','[okdb]\x20invalid\x20port:\x20','\x0d[okdb]\x20blobs:\x20','createHash','\x20\x20Type\x20','INVALID_VALUE','LICENSE_INVALID','string','decodeLicenseBlob','LICENSED_BUILD','rawBuf','creating','/type/users/item/alice\x0a\x20\x20\x20\x20','Hint:\x20','limits','\x1b[2m','noRepl','Invalid\x20primary\x20key\x20type:\x20','history','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','\x20\x20(licensee:\x20','OKDBAlreadyExistsError','txn:start','\x20day(s).','remove','{}[]:,\x0a\x0d\x09\x20','indexOf','count','\x20\x20skipped=','_computeStatus','inputSchema','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','listRoutes','prototype','toUpperCase','\x20\x20Shell\x20commands','index','detectInputType','/admin/index.html','logRequests','licensee','PERMISSIONS','OKDBNotFoundError','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','setPrompt','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','entries','stderr','blobs','type:registered','Admin','createPublicKey','node','No\x20tokens.','3HQWFSs','green','replace','LICENSE_FEATURE_DISABLED','rmSync','index:drop','fts:drop','repeat','sourceType','kind','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','(none)','has','--version','\x20\x20✓\x20Revoked\x20token\x20','object','\x20\x20Usage:','\x20\x20changes=','changes','EXPIRES','errors','maxWrites','POST','\x0a[okdb]\x20shutting\x20down…\x0a','\x20\x20\x20\x20licensee:\x20\x20','Full-text\x20search','hasOwnProperty','typesPerEnv','from','expires','error','system','name','--grants','license:invalid','records','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','slice','\x20MB\x20→\x20','timingSafeEqual','[okdb]\x20exported\x20\x20types=','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','api','assertLimit','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','\x20\x20\x20\x20permissions:\x20','features','writeFileSync','\x20already\x20in\x20use','\x20\x20✓\x20database\x20opened\x0a','(on\x20any\x20path\x20command)','invalid','put','admin','logLevel','SIGINT','\x20\x20\x20\x20\x20\x20','number','[okdb]\x20importing\x20','--no-repl','Sync','OKDBError','\x20environment\x20','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','EADDRINUSE'];_0xa73d=function(){return _0x1db676;};return _0xa73d();}function _0x6e57(_0x3b80a0,_0xaefe7b){_0x3b80a0=_0x3b80a0-0xf9;const _0xa73d48=_0xa73d();let _0x6e5788=_0xa73d48[_0x3b80a0];return _0x6e5788;}function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x382795=require$$0;function _0x43e4cc(_0x2f03b7,_0x1f354b){const _0x59d01c=_0x6e57;return _0x382795[_0x59d01c(0x216)](_0x59d01c(0x1b5),_0x1f354b)[_0x59d01c(0x259)](_0x2f03b7)[_0x59d01c(0x19c)](_0x59d01c(0x2e2));}function _0x279b72(_0x43bd01,_0x1fe01a){const _0x28db9f=_0x6e57;if(typeof _0x43bd01!=='string'||typeof _0x1fe01a!==_0x28db9f(0x2ef))return![];if(Buffer[_0x28db9f(0x1b8)](_0x43bd01)!==Buffer[_0x28db9f(0x1b8)](_0x1fe01a))return![];return _0x382795[_0x28db9f(0x345)](Buffer[_0x28db9f(0x33a)](_0x43bd01),Buffer[_0x28db9f(0x33a)](_0x1fe01a));}function _0x560f5b(_0x467c10){const _0x52a587=_0x6e57;if(!_0x467c10?.[_0x52a587(0x13b)](_0x52a587(0x3d3)))return null;return _0x467c10[_0x52a587(0x343)](0x7);}function _0x40ab01(_0xea7d77=0x20){const _0xd43095=_0x6e57;return _0x382795['randomBytes'](_0xea7d77)['toString'](_0xd43095(0x2e2));}function _0x39c508(_0x1b668c){const _0x2a70b2=_0x6e57;return _0x382795[_0x2a70b2(0x2eb)](_0x2a70b2(0x1b5))['update'](_0x1b668c)[_0x2a70b2(0x19c)](_0x2a70b2(0x139));}function _0x3b9118(_0x2b99a7,_0x1a11d0,_0x1c252a=0x36ee80){const _0x352667=_0x6e57;if(!_0x1a11d0)throw new Error(_0x352667(0x181));const _0x140666=Date['now'](),_0x3e9796=Buffer[_0x352667(0x33a)](JSON[_0x352667(0x3b8)]({'iat':_0x140666,'exp':_0x140666+_0x1c252a,'sub':_0x2b99a7?.['id']??_0x2b99a7?.[_0x352667(0x2d2)]??null,'username':_0x2b99a7?.[_0x352667(0x137)]??_0x2b99a7?.[_0x352667(0x33e)]??null,'roles':Array[_0x352667(0x18c)](_0x2b99a7?.[_0x352667(0x3c5)])?_0x2b99a7[_0x352667(0x3c5)]:[]}))[_0x352667(0x125)](_0x352667(0x2e2)),_0x110314=_0x43e4cc(_0x3e9796,_0x1a11d0);return _0x3e9796+'.'+_0x110314;}function _0x33cd07(_0x3ce705,_0x4e817b){const _0x16202e=_0x6e57;if(!_0x4e817b||typeof _0x3ce705!=='string')return null;const [_0x518f08,_0x590ec6]=_0x3ce705[_0x16202e(0x2ae)]('.');if(!_0x518f08||!_0x590ec6)return null;const _0x2b2fe3=_0x43e4cc(_0x518f08,_0x4e817b);if(!_0x279b72(_0x590ec6,_0x2b2fe3))return null;try{const _0x592ccf=JSON[_0x16202e(0x11b)](Buffer[_0x16202e(0x33a)](_0x518f08,_0x16202e(0x2e2))['toString']()),_0x139a9d=0x7530;if(Date[_0x16202e(0x1c3)]()>Number(_0x592ccf?.['exp']??0x0)+_0x139a9d)return null;return _0x592ccf;}catch{return null;}}async function _0x1a534d(_0x591f8d){return new Promise((_0x3dd9e5,_0x44b897)=>{const _0x3a7798=_0x6e57,_0x5f0d1e=_0x382795[_0x3a7798(0x3cf)](0x10);_0x382795['scrypt'](_0x591f8d,_0x5f0d1e,0x40,(_0x47336e,_0x58c1ca)=>{const _0x1c0d81=_0x3a7798;if(_0x47336e)_0x44b897(_0x47336e);_0x3dd9e5(_0x5f0d1e[_0x1c0d81(0x125)](_0x1c0d81(0x139))+':'+_0x58c1ca[_0x1c0d81(0x125)]('hex'));});});}async function _0x111e7b(_0x47e4b7,_0x4de176){const _0x3c8d11=_0x6e57,[_0x83db04,_0x1eefe2]=_0x4de176[_0x3c8d11(0x2ae)](':');if(!_0x83db04||!_0x1eefe2)return![];const _0xd4e126=Buffer[_0x3c8d11(0x33a)](_0x83db04,_0x3c8d11(0x139));return new Promise((_0xa7b1ed,_0x12c9c5)=>{const _0x4b6b24=_0x3c8d11;_0x382795[_0x4b6b24(0x113)](_0x47e4b7,_0xd4e126,0x40,(_0x174449,_0x1be0ba)=>{const _0x1233c0=_0x4b6b24;if(_0x174449)_0x12c9c5(_0x174449);_0xa7b1ed(_0x382795[_0x1233c0(0x345)](_0x1be0ba,Buffer['from'](_0x1eefe2,_0x1233c0(0x139))));});});}return okdbAuthTokens={'hmac':_0x43e4cc,'timingSafeEqual':_0x279b72,'parseBearer':_0x560f5b,'randomToken':_0x40ab01,'hashToken':_0x39c508,'issueToken':_0x3b9118,'authenticateToken':_0x33cd07,'hashPassword':_0x1a534d,'verifyPassword':_0x111e7b},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x4150dd=_0x3f2430;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x1d8bf3=require$$0$1,_0x53442a=_0x4150dd(0x131),_0x5adac6=new Uint8Array(0x100)[_0x4150dd(0x378)](0xff);for(let _0x349354=0x0;_0x349354<_0x53442a[_0x4150dd(0x369)];_0x349354++){_0x5adac6[_0x53442a[_0x4150dd(0x298)](_0x349354)]=_0x349354,_0x5adac6[_0x53442a['charCodeAt'](_0x349354)+0x20]=_0x349354;}_0x5adac6['O'[_0x4150dd(0x298)](0x0)]=0x0,_0x5adac6['o'['charCodeAt'](0x0)]=0x0,_0x5adac6['I'['charCodeAt'](0x0)]=0x1,_0x5adac6['i'['charCodeAt'](0x0)]=0x1,_0x5adac6['L'[_0x4150dd(0x298)](0x0)]=0x1,_0x5adac6['l'[_0x4150dd(0x298)](0x0)]=0x1;function _0x3c03f6(_0x5a588b){const _0x1fbc10=_0x4150dd;let _0x55a8fe=0x0,_0x2bea84=0x0,_0x4ec844='';for(let _0x14ef7b=0x0;_0x14ef7b<_0x5a588b[_0x1fbc10(0x369)];_0x14ef7b++){_0x2bea84=_0x2bea84<<0x8|_0x5a588b[_0x14ef7b],_0x55a8fe+=0x8;while(_0x55a8fe>=0x5){_0x55a8fe-=0x5,_0x4ec844+=_0x53442a[_0x2bea84>>>_0x55a8fe&0x1f];}}return _0x55a8fe>0x0&&(_0x4ec844+=_0x53442a[_0x2bea84<<0x5-_0x55a8fe&0x1f]),_0x4ec844;}function _0xd14a7c(_0x3509d1){const _0x3902d7=_0x4150dd;_0x3509d1=_0x3509d1[_0x3902d7(0x320)](/-/g,'')[_0x3902d7(0x30a)]();let _0x24238b=0x0,_0xa42359=0x0;const _0x42d0eb=[];for(let _0x253896=0x0;_0x253896<_0x3509d1['length'];_0x253896++){const _0x2ebd73=_0x5adac6[_0x3509d1['charCodeAt'](_0x253896)];if(_0x2ebd73===0xff)continue;_0xa42359=_0xa42359<<0x5|_0x2ebd73,_0x24238b+=0x5,_0x24238b>=0x8&&(_0x24238b-=0x8,_0x42d0eb[_0x3902d7(0x3c8)](_0xa42359>>>_0x24238b&0xff));}return Buffer[_0x3902d7(0x33a)](_0x42d0eb);}const _0x391f53=[_0x4150dd(0x3c3),_0x4150dd(0x165),_0x4150dd(0x257),_0x4150dd(0x1de),_0x4150dd(0x21e),'views',_0x4150dd(0x2c8),_0x4150dd(0x283)],_0x4ff0ae=0x0,_0x3da6d1=0x1,_0x25f0fe=0x2,_0x168067=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0xe92de2({issuedAt:_0x222602,expiresAt:_0x249f90,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x4ff0ae}){const _0x2a1c34=_0x4150dd,_0x113f20=Buffer[_0x2a1c34(0x33a)](licensee,_0x2a1c34(0x25d))['slice'](0x0,0x40),_0x4d4ee7=0x1+0x1+0x4+0x4+0x1+_0x113f20[_0x2a1c34(0x369)]+0x2+0x10,_0x27f27c=Buffer[_0x2a1c34(0x36e)](_0x4d4ee7);let _0x15f121=0x0;_0x27f27c[_0x2a1c34(0x1dc)](0x1,_0x15f121++),_0x27f27c[_0x2a1c34(0x1dc)](licenseType,_0x15f121++),_0x27f27c[_0x2a1c34(0x287)](Math[_0x2a1c34(0x122)](_0x222602/0x3e8),_0x15f121),_0x15f121+=0x4,_0x27f27c[_0x2a1c34(0x287)](Math[_0x2a1c34(0x122)](_0x249f90/0x3e8),_0x15f121),_0x15f121+=0x4,_0x27f27c[_0x2a1c34(0x1dc)](_0x113f20[_0x2a1c34(0x369)],_0x15f121++),_0x113f20[_0x2a1c34(0x3a7)](_0x27f27c,_0x15f121),_0x15f121+=_0x113f20['length'];let _0x2b7bcf=0x0;for(let _0x9bc362=0x0;_0x9bc362<_0x391f53['length'];_0x9bc362++){if(features[_0x391f53[_0x9bc362]])_0x2b7bcf|=0x1<<_0x9bc362;}_0x27f27c[_0x2a1c34(0x279)](_0x2b7bcf,_0x15f121),_0x15f121+=0x2;const _0x32fe95=[_0x2a1c34(0x2d4),'typesPerEnv',_0x2a1c34(0x281),_0x2a1c34(0x333)];for(const _0x1e6a91 of _0x32fe95){_0x27f27c['writeUInt32BE'](limits[_0x1e6a91]||0x0,_0x15f121),_0x15f121+=0x4;}return _0x27f27c;}function _0x396aa2(_0x29d215){const _0x466091=_0x4150dd;let _0x824cbc=0x0;const _0x17f3b4=_0x29d215[_0x466091(0x3f0)](_0x824cbc++),_0x5ee4dd=_0x29d215['readUInt8'](_0x824cbc++),_0x3c28b9=_0x29d215['readUInt32BE'](_0x824cbc);_0x824cbc+=0x4;const _0x2cd320=_0x29d215[_0x466091(0x105)](_0x824cbc);_0x824cbc+=0x4;const _0x2e7c39=_0x29d215[_0x466091(0x3f0)](_0x824cbc++),_0x241067=_0x29d215['slice'](_0x824cbc,_0x824cbc+_0x2e7c39)[_0x466091(0x125)]('utf8');_0x824cbc+=_0x2e7c39;const _0x4ad3d6=_0x29d215[_0x466091(0x13c)](_0x824cbc);_0x824cbc+=0x2;const _0x8c6a30={};for(let _0x2ac1b1=0x0;_0x2ac1b1<_0x391f53[_0x466091(0x369)];_0x2ac1b1++){_0x8c6a30[_0x391f53[_0x2ac1b1]]=Boolean(_0x4ad3d6&0x1<<_0x2ac1b1);}const _0xb60f4c=['envs',_0x466091(0x339),_0x466091(0x281),'maxWrites'],_0xfa0462={};for(const _0x4e9390 of _0xb60f4c){const _0x403daf=_0x29d215[_0x466091(0x105)](_0x824cbc);_0x824cbc+=0x4,_0xfa0462[_0x4e9390]=_0x403daf===0x0?null:_0x403daf;}return{'v':_0x17f3b4,'licenseType':_0x5ee4dd,'issuedAt':_0x3c28b9*0x3e8,'expiresAt':_0x2cd320*0x3e8,'licensee':_0x241067,'features':_0x8c6a30,'limits':_0xfa0462};}function _0x2710ac(_0x5aabae,_0x691fa){const _0x6389ef=_0x4150dd,_0x49dcbc=Buffer[_0x6389ef(0x114)]([_0x5aabae,_0x691fa]),_0x567ca6=_0x3c03f6(_0x49dcbc),_0x294e90=[];for(let _0x629464=0x0;_0x629464<_0x567ca6[_0x6389ef(0x369)];_0x629464+=0x8){_0x294e90['push'](_0x567ca6['slice'](_0x629464,_0x629464+0x8));}return _0x294e90['join']('-');}function _0x2e9875(_0x445c99){const _0xa55e06=_0x4150dd;if(typeof _0x445c99!==_0xa55e06(0x2ef))throw new Error(_0xa55e06(0x1e2));const _0x5971e5=_0xd14a7c(_0x445c99['replace'](/-/g,''));if(_0x5971e5[_0xa55e06(0x369)]<0x41)throw new Error(_0xa55e06(0x3af)+_0x5971e5['length']+_0xa55e06(0x21f));const _0x5d97df=_0x5971e5['slice'](0x0,_0x5971e5['length']-0x40),_0x2436db=_0x5971e5[_0xa55e06(0x343)](_0x5971e5[_0xa55e06(0x369)]-0x40);let _0x141e39;try{_0x141e39=_0x396aa2(_0x5d97df);}catch(_0x429a71){throw new Error(_0xa55e06(0x2fb)+_0x429a71[_0xa55e06(0x10a)]);}return{'rawBuf':_0x5971e5,'payload':_0x5d97df,'sig':_0x2436db,'decoded':_0x141e39};}function _0x1cac95(_0x3d296c){const _0xd52bb=_0x4150dd;return _0x1d8bf3[_0xd52bb(0x2eb)](_0xd52bb(0x1b5))['update'](_0x3d296c)[_0xd52bb(0x19c)]()[_0xd52bb(0x343)](0x0,0x8);}function _0x2b5d27(_0x1b7c66,_0x2426b4,_0x3f7932){const _0x2f8acd=_0x4150dd,_0x73f55='OKDB-PIN-V1:'+_0x3f7932,_0x2eeb41=Buffer[_0x2f8acd(0x114)]([Buffer[_0x2f8acd(0x33a)](_0x1b7c66,_0x2f8acd(0x25d)),_0x2426b4]),_0x3cef23=_0x1d8bf3[_0x2f8acd(0x216)](_0x2f8acd(0x1b5),_0x73f55)[_0x2f8acd(0x259)](_0x2eeb41)[_0x2f8acd(0x19c)](),_0x5f3298=_0x3c03f6(_0x3cef23[_0x2f8acd(0x343)](0x0,0x5));return{'pin':_0x5f3298,'pinHmac':_0x3cef23};}function _0xfb7163(_0x5d4739,_0x204eea,_0x1a6843){const _0x30fb16=_0x4150dd,_0x67c3fe=Buffer[_0x30fb16(0x36e)](0x4d);let _0x139061=0x0;_0x67c3fe[_0x30fb16(0x1dc)](0x1,_0x139061++),_0x5d4739[_0x30fb16(0x3a7)](_0x67c3fe,_0x139061),_0x139061+=0x8,_0x67c3fe['writeUInt32BE'](_0x204eea,_0x139061),_0x139061+=0x4,_0x1a6843['copy'](_0x67c3fe,_0x139061);const _0x9f8955=_0x3c03f6(_0x67c3fe),_0x2b3bec=[];for(let _0x12cf2d=0x0;_0x12cf2d<_0x9f8955[_0x30fb16(0x369)];_0x12cf2d+=0x6){_0x2b3bec['push'](_0x9f8955[_0x30fb16(0x343)](_0x12cf2d,_0x12cf2d+0x6));}return _0x2b3bec['join']('-');}function _0x45a046(_0x5d90b0){const _0x1652fc=_0x4150dd;if(typeof _0x5d90b0!==_0x1652fc(0x2ef))throw new Error(_0x1652fc(0x223));const _0x5d827e=_0xd14a7c(_0x5d90b0[_0x1652fc(0x320)](/-/g,''));if(_0x5d827e[_0x1652fc(0x369)]!==0x4d)throw new Error(_0x1652fc(0x10f)+_0x5d827e[_0x1652fc(0x369)]);let _0x4e3cbd=0x0;const _0x454138=_0x5d827e[_0x1652fc(0x3f0)](_0x4e3cbd++),_0x23a5a0=_0x5d827e[_0x1652fc(0x343)](_0x4e3cbd,_0x4e3cbd+0x8);_0x4e3cbd+=0x8;const _0x575c73=_0x5d827e[_0x1652fc(0x105)](_0x4e3cbd);_0x4e3cbd+=0x4;const _0x373c43=_0x5d827e[_0x1652fc(0x343)](_0x4e3cbd);return{'v':_0x454138,'licenseHash':_0x23a5a0,'expiry':_0x575c73,'sig':_0x373c43};}function _0x3c2e3a({tokenString:_0x54a4a7,nodeId:_0x316cc1,rawBlobBuf:_0x3ebe22,pubKeyPem:_0x15f223,pubFingerprint:_0x2f98e7}){const _0x1abc41=_0x4150dd;let _0x2f81dc;try{_0x2f81dc=_0x45a046(_0x54a4a7);}catch(_0x90d230){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x54126c=_0x1cac95(_0x3ebe22);if(!_0x54126c[_0x1abc41(0x388)](_0x2f81dc['licenseHash']))return{'valid':![],'reason':_0x1abc41(0x229)};const {pinHmac:_0x15b96}=_0x2b5d27(_0x316cc1,_0x54126c,_0x2f98e7),_0x51bf72=Buffer['allocUnsafe'](0x4);_0x51bf72[_0x1abc41(0x287)](_0x2f81dc[_0x1abc41(0x286)],0x0);const _0x19cf9f=Buffer['concat']([Buffer[_0x1abc41(0x33a)]([_0x2f81dc['v']]),_0x15b96['slice'](0x0,0x5),_0x2f81dc[_0x1abc41(0x120)],_0x51bf72]);try{const _0x3e799a=_0x1d8bf3[_0x1abc41(0x17e)](null,_0x19cf9f,_0x15f223,_0x2f81dc[_0x1abc41(0x3b4)]);if(!_0x3e799a)return{'valid':![],'reason':_0x1abc41(0x14f)};}catch(_0x47a27d){return{'valid':![],'reason':_0x1abc41(0x14f)};}if(_0x2f81dc[_0x1abc41(0x286)]<Date[_0x1abc41(0x1c3)]()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x43a182(_0x5882f3){const _0x5e787a=_0x4150dd;if(typeof _0x5882f3!==_0x5e787a(0x2ef))return'unknown';const _0x53e61b=_0x5882f3[_0x5e787a(0x201)]();if(_0x53e61b[_0x5e787a(0x13b)]('/')||_0x53e61b[_0x5e787a(0x13b)]('./')||_0x53e61b[_0x5e787a(0x13b)](_0x5e787a(0x1e1))||/^[A-Za-z]:[\\/]/[_0x5e787a(0x27d)](_0x53e61b))return _0x5e787a(0x217);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x53e61b))return'uuid';const _0x246273=_0x53e61b[_0x5e787a(0x320)](/[\s-]+/g,'')[_0x5e787a(0x369)];if(_0x246273===0x7c)return _0x5e787a(0x2d8);if(_0x246273>=0x95&&_0x246273<=0xfc)return _0x5e787a(0x271);return _0x5e787a(0x18d);}return okdbLicenseCodec={'toBase32':_0x3c03f6,'fromBase32':_0xd14a7c,'encodeLicensePayload':_0xe92de2,'decodeLicensePayload':_0x396aa2,'encodeLicenseBlob':_0x2710ac,'decodeLicenseBlob':_0x2e9875,'licenseHash':_0x1cac95,'derivePin':_0x2b5d27,'encodeActivationToken':_0xfb7163,'decodeActivationToken':_0x45a046,'verifyActivation':_0x3c2e3a,'detectInputType':_0x43a182,'FEATURE_NAMES':_0x391f53,'LICENSE_TYPE_STANDARD':_0x4ff0ae,'LICENSE_TYPE_OPEN':_0x3da6d1,'LICENSE_TYPE_INTERNAL':_0x25f0fe,'OPEN_LICENSE_MAX_DURATION_MS':_0x168067},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x149c18 extends Error{constructor(_0x16be90,_0x19dbc1,_0xadb7cf={}){const _0x4f9564=_0x6e57;super(_0x16be90),this[_0x4f9564(0x33e)]=_0x4f9564(0x35b),this['code']=_0x19dbc1,this[_0x4f9564(0x140)]=_0xadb7cf,_0xadb7cf[_0x4f9564(0x28d)]&&(this[_0x4f9564(0x28d)]=_0xadb7cf[_0x4f9564(0x28d)]),Error[_0x4f9564(0x295)](this,this['constructor']);}}class _0xecfd1b extends _0x149c18{constructor(_0x35a64f,_0x47187d,_0x398d2a,_0xfbebd){const _0x24b29c=_0x6e57;super('Version\x20mismatch\x20for\x20'+_0x35a64f+'@'+_0x47187d+':\x20expected\x20'+_0x398d2a+_0x24b29c(0x107)+_0xfbebd,'VERSION_MISMATCH',{'type':_0x35a64f,'key':_0x47187d,'expectedVersion':_0x398d2a,'actualVersion':_0xfbebd}),this[_0x24b29c(0x33e)]=_0x24b29c(0x168);}}class _0x3ff1fa extends _0x149c18{constructor(_0xfb5886,_0x1cb82b){const _0x574378=_0x6e57;super(_0xfb5886+'@'+_0x1cb82b+_0x574378(0x27b),'NOT_FOUND',{'type':_0xfb5886,'key':_0x1cb82b}),this[_0x574378(0x33e)]=_0x574378(0x312);}}class _0x5f3082 extends _0x149c18{constructor(_0x118fb6,_0x4a3066){const _0x4d991b=_0x6e57;super(_0x118fb6+'@'+_0x4a3066+_0x4d991b(0x1a9),_0x4d991b(0x2bc),{'type':_0x118fb6,'key':_0x4a3066}),this['name']=_0x4d991b(0x2fd);}}class _0x1336ba extends _0x149c18{constructor(_0x20ec00,_0x3fd25d){const _0xf2a87e=_0x6e57,_0x4aebff=typeof _0x3fd25d;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x20ec00+_0xf2a87e(0x3ba)+_0x4aebff+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x3fd25d,_0xf2a87e(0x260),{'index':_0x20ec00,'key':_0x3fd25d,'keyType':_0x4aebff}),this[_0xf2a87e(0x33e)]=_0xf2a87e(0x17d);}}class _0x4ce904 extends _0x149c18{constructor(_0x47b8ad){const _0x21d7cb=_0x6e57,_0x3379be=typeof _0x47b8ad;super(_0x21d7cb(0x2f9)+_0x3379be+_0x21d7cb(0x130)+_0x47b8ad,_0x21d7cb(0x1f3),{'key':_0x47b8ad,'keyType':_0x3379be}),this[_0x21d7cb(0x33e)]='OKDBInvalidPrimaryKeyError';}}class _0x35ebb2 extends _0x149c18{constructor(_0x51cd5a){const _0x1cac13=_0x6e57;super(_0x1cac13(0x197)+_0x51cd5a+_0x1cac13(0x101),_0x1cac13(0x38f),{'type':_0x51cd5a}),this[_0x1cac13(0x33e)]=_0x1cac13(0x2b9);}}class _0x246227 extends _0x149c18{constructor(_0x5710be){const _0x5b18d6=_0x6e57;super(_0x5b18d6(0x197)+_0x5710be+'\x27\x20already\x20registered','TYPE_ALREADY_REGISTERED',{'type':_0x5710be}),this['name']='OKDBTypeAlreadyRegisteredError';}}class _0x291d02 extends _0x149c18{constructor(_0x3ac58d,_0x4f4f4d){const _0x3d8805=_0x6e57;super(_0x3d8805(0x149)+_0x4f4f4d+'\x27\x20on\x20type\x20\x27'+_0x3ac58d+_0x3d8805(0x101),_0x3d8805(0x171),{'type':_0x3ac58d,'index':_0x4f4f4d}),this[_0x3d8805(0x33e)]=_0x3d8805(0x3d4);}}class _0x41c816 extends _0x149c18{constructor(_0x5200f9,_0x31aae1){const _0x45781e=_0x6e57;super(_0x45781e(0x149)+_0x31aae1+_0x45781e(0x179)+_0x5200f9+'\x27\x20is\x20already\x20registered',_0x45781e(0x174),{'type':_0x5200f9,'index':_0x31aae1}),this[_0x45781e(0x33e)]='OKDBIndexAlreadyRegisteredError';}}class _0x5c2a62 extends _0x149c18{constructor(_0x2ed430,_0x20aa50={}){const _0x4d834a=_0x6e57;super(_0x2ed430,_0x4d834a(0x2ed),_0x20aa50),this[_0x4d834a(0x33e)]=_0x4d834a(0x3c0);}}class _0x50b3dc extends _0x149c18{constructor(_0x32b00e,_0x1c986f,_0xb39035,_0xa58c98,_0x2d9948){const _0x3c9984=_0x6e57;super(_0x3c9984(0x3b9)+_0x32b00e+'@'+_0x1c986f+':\x20key\x20['+_0xb39035+_0x3c9984(0x2ac)+_0xa58c98+_0x3c9984(0x2c9)+_0x2d9948+'\x27',_0x3c9984(0x1ee),{'type':_0x32b00e,'index':_0x1c986f,'indexKey':_0xb39035,'existingKey':_0xa58c98,'conflictingKey':_0x2d9948}),this[_0x3c9984(0x33e)]=_0x3c9984(0x115);}}class _0x490b6a extends _0x149c18{constructor(_0x1e041d,_0x53be06,_0x286f17){const _0x440509=_0x6e57;super('Schema\x20validation\x20failed\x20for\x20'+_0x1e041d+'@'+_0x53be06,_0x440509(0x12d),{'type':_0x1e041d,'key':_0x53be06,'errors':_0x286f17}),this['name']='OKDBSchemaValidationError',this[_0x440509(0x1d3)]=_0x1e041d,this[_0x440509(0x1ec)]=_0x53be06,this[_0x440509(0x332)]=_0x286f17;}}class _0x497c31 extends _0x149c18{constructor(_0x407686,_0x2fa695){const _0x3ca817=_0x6e57;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x407686+':\x20'+_0x2fa695['length']+_0x3ca817(0x3f2),_0x3ca817(0x138),{'type':_0x407686,'failures':_0x2fa695}),this['name']=_0x3ca817(0x360),this[_0x3ca817(0x1d3)]=_0x407686,this[_0x3ca817(0x1d1)]=_0x2fa695;}}class _0x173287 extends _0x149c18{constructor(_0x49ad66,_0xd8d136,_0x3bb1ad,_0x44b024,_0x4bb0a2){const _0x8f0462=_0x6e57;super(_0x8f0462(0x150)+_0x49ad66+'@'+_0xd8d136+'.'+_0x3bb1ad+_0x8f0462(0x1a6)+_0x44b024+'@'+_0x4bb0a2+'\x20which\x20does\x20not\x20exist',_0x8f0462(0x389),{'sourceType':_0x49ad66,'sourceKey':_0xd8d136,'fieldPath':_0x3bb1ad,'targetType':_0x44b024,'targetKey':_0x4bb0a2}),this[_0x8f0462(0x33e)]=_0x8f0462(0x294),this[_0x8f0462(0x326)]=_0x49ad66,this['sourceKey']=_0xd8d136,this[_0x8f0462(0x16f)]=_0x3bb1ad,this[_0x8f0462(0x17a)]=_0x44b024,this[_0x8f0462(0x1c4)]=_0x4bb0a2;}}class _0x19e621 extends _0x149c18{constructor(_0x575520,_0x6d06f9,_0x1bb9da){const _0x6a047a=_0x6e57;super(_0x6a047a(0x28f)+_0x575520+'@'+_0x6d06f9+':\x20'+_0x1bb9da['length']+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x575520,'targetKey':_0x6d06f9,'references':_0x1bb9da}),this[_0x6a047a(0x33e)]='OKDBForeignKeyDeleteError',this[_0x6a047a(0x17a)]=_0x575520,this[_0x6a047a(0x1c4)]=_0x6d06f9,this['references']=_0x1bb9da;}}class _0x56a09a extends _0x149c18{constructor(_0x2ba3a1,_0x356ac5,_0x451057){const _0x452d01=_0x6e57;super('Index\x20\x22'+_0x356ac5+_0x452d01(0x2be)+_0x2ba3a1+_0x452d01(0x26b)+_0x451057[_0x452d01(0x1b2)](_0x49896c=>_0x49896c[_0x452d01(0x327)]+':'+_0x49896c[_0x452d01(0x33e)])[_0x452d01(0x1e3)](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0x2ba3a1,'index':_0x356ac5,'usedBy':_0x451057}),this[_0x452d01(0x33e)]=_0x452d01(0x11c);}}return okdbError={'OKDBError':_0x149c18,'OKDBVersionMismatchError':_0xecfd1b,'OKDBNotFoundError':_0x3ff1fa,'OKDBAlreadyExistsError':_0x5f3082,'OKDBInvalidIndexKeyError':_0x1336ba,'OKDBInvalidPrimaryKeyError':_0x4ce904,'OKDBTypeNotRegisteredError':_0x35ebb2,'OKDBTypeAlreadyRegisteredError':_0x246227,'OKDBIndexNotRegisteredError':_0x291d02,'OKDBIndexAlreadyRegisteredError':_0x41c816,'OKDBInvalidValueError':_0x5c2a62,'OKDBUniqueConstraintError':_0x50b3dc,'OKDBSchemaValidationError':_0x490b6a,'OKDBSchemaCollectionError':_0x497c31,'OKDBForeignKeyError':_0x173287,'OKDBForeignKeyDeleteError':_0x19e621,'OKDBIndexHasConsumersError':_0x56a09a},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x61af14=_0x3f2430;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x1135f0={'PUT':'put','REMOVE':_0x61af14(0x300),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x61af14(0x25a),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':'dropType','FTS_REGISTER':'registerFts','FTS_DROP':_0x61af14(0x1df),'FTS_RESET':'resetFts','SCHEMA_SET':_0x61af14(0x23a),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x61af14(0x116),'TTL_CLEAR':'clearTtl'},_0x13efad={'SYSTEM_READY':_0x61af14(0x3ae),'SYSTEM_STOPPED':_0x61af14(0x162),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x61af14(0x3a8),'SYSTEM_DRAIN':_0x61af14(0x2a7),'SYSTEM_BUS_STATE_CHANGE':_0x61af14(0x37d),'ITEM_CREATE':_0x61af14(0x1f1),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x61af14(0x290),'INDEX_RESET':_0x61af14(0x27a),'INDEX_READY':_0x61af14(0x185),'INDEX_PROGRESS':_0x61af14(0x1b1),'INDEX_DROP':_0x61af14(0x323),'INDEX_REGISTERED':_0x61af14(0x385),'FTS_REGISTERED':_0x61af14(0x2cc),'FTS_DROP':_0x61af14(0x324),'FTS_RESET':_0x61af14(0x386),'SCHEMA_SET':_0x61af14(0x293),'SCHEMA_DROP':_0x61af14(0x24f),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x61af14(0x2b0),'REF_VIOLATION':_0x61af14(0x135),'REF_VIOLATION_RESOLVED':_0x61af14(0x3c4),'SYNC_APPLY':_0x61af14(0x2d5),'TXN_START':_0x61af14(0x2fe),'TXN_END':_0x61af14(0x39e),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x61af14(0x319),'TYPE_DROP':_0x61af14(0x1b7),'ENV_OPENED':_0x61af14(0x38b),'ENV_REMOVED':'env:removed','TTL_EXPIRED':_0x61af14(0x221),'TTL_SET':_0x61af14(0x2b5),'TTL_CLEAR':_0x61af14(0x3f4),'LICENSE_INVALID':_0x61af14(0x340),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x61af14(0x12c),'LICENSE_REMOVED':_0x61af14(0x159)},_0xe373b={'CREATING':_0x61af14(0x2f3),'RESETTING':_0x61af14(0x289),'READY':_0x61af14(0x173),'DROPPING':'dropping','WAITING':_0x61af14(0x280)},_0x51d934={'CREATED':_0x61af14(0x270),'STARTING':'starting','STARTED':_0x61af14(0x366),'STOPPING':'stopping','STOPPED':_0x61af14(0x227)},_0x3750e5={'CREATING':_0x61af14(0x2f3),'READY':_0x61af14(0x173),'HALTED':'halted','STOPPED':_0x61af14(0x227),'RESETTING':'resetting'},_0x47745b=Object[_0x61af14(0x11f)]({'POKE':'bus:poke','DRAIN':_0x61af14(0x258)});return okdbEnums={'BUS_EVENTS':_0x47745b,'CHANGE_ACTIONS':_0x1135f0,'EVENTS':_0x13efad,'INDEX_STATE':_0xe373b,'OKDB_STATE':_0x51d934,'VIEW_STATE':_0x3750e5},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x594e0d=_0x3f2430;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x35eaa1=require$$1,_0x466c94=require$$1$1,_0x49dd16=require$$0,_0xcaea86=_0x35eaa1[_0x594e0d(0x277)](_0x466c94[_0x594e0d(0x1e3)](__dirname,'keys/public.pem'),_0x594e0d(0x25d))['trim'](),_0x3db2e9=_0x49dd16[_0x594e0d(0x31b)](_0xcaea86)[_0x594e0d(0x17f)]({'type':'spki','format':_0x594e0d(0x364)}),_0x22d16e=_0x49dd16[_0x594e0d(0x2eb)](_0x594e0d(0x1b5))[_0x594e0d(0x259)](_0x3db2e9)['digest']('hex')['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0xcaea86,'PUB_FINGERPRINT':_0x22d16e},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x5b89ba=_0x3f2430;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x5b0f93=require$$0,{OKDBError:_0x2be7b6}=requireOkdbError(),{EVENTS:_0x330adb}=requireOkdbEnums(),_0x4f1d2a=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x456e0d,LICENSE_TYPE_INTERNAL:_0xa662e4,OPEN_LICENSE_MAX_DURATION_MS:_0xa5ee56}=_0x4f1d2a,_0x5af5df=requireOkdbPubkey(),_0x1e2ff9={'LICENSED_BUILD':_0x5b89ba(0x202),'PUBLIC_KEY_PEM':_0x5af5df[_0x5b89ba(0x3c1)],'PUB_FINGERPRINT':_0x5af5df[_0x5b89ba(0x233)],'LICENSE_EXPIRED_ACTION':_0x5b89ba(0x126)},_0x38a7a1=_0x5b89ba(0x154),_0x540eeb={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x26fc37(_0x4c8950){const _0x147d11=_0x5b89ba;!_0x4c8950[_0x147d11(0x228)](_0x38a7a1)&&await _0x4c8950[_0x147d11(0x104)](_0x38a7a1);}class _0x553e46{constructor(_0x298a03){const _0xff8492=_0x5b89ba;this['okdb']=_0x298a03,this[_0xff8492(0x112)]=null;}async['reload'](){const _0x2ebb55=_0x5b89ba,_0x3201f2=this[_0x2ebb55(0x204)][_0x2ebb55(0x129)];if(!_0x3201f2||!_0x3201f2[_0x2ebb55(0x228)](_0x38a7a1)){this[_0x2ebb55(0x112)]=null;return;}const _0x22630c=this['okdb']['id'];let _0x9ec17=null;for(const {key:_0x379ef3,value:_0x252fea}of _0x3201f2['getRange'](_0x38a7a1)){const _0xbf256d=this['_computeStatus'](_0x252fea,_0x22630c);_0xbf256d===_0x2ebb55(0x2aa)&&!_0x9ec17&&(_0x9ec17={..._0x252fea,'id':_0x379ef3,'status':_0xbf256d});}this[_0x2ebb55(0x112)]=_0x9ec17;if(this[_0x2ebb55(0x112)]&&this['_active'][_0x2ebb55(0x156)]===_0x456e0d){const _0x133a2a=Math['ceil']((this['_active'][_0x2ebb55(0x230)]-Date[_0x2ebb55(0x1c3)]())/0x5265c00);this[_0x2ebb55(0x204)][_0x2ebb55(0x126)]?.['warn'](_0x2ebb55(0x2c0)+_0x133a2a+_0x2ebb55(0x2ff),{'feature':_0x2ebb55(0x28c),'licensee':this[_0x2ebb55(0x112)][_0x2ebb55(0x310)],'expiresAt':new Date(this['_active'][_0x2ebb55(0x230)])['toISOString']()});}this[_0x2ebb55(0x112)]&&this[_0x2ebb55(0x112)][_0x2ebb55(0x156)]===_0xa662e4&&this['okdb'][_0x2ebb55(0x126)]?.['warn'](_0x2ebb55(0x313),{'feature':_0x2ebb55(0x28c),'licensee':this[_0x2ebb55(0x112)][_0x2ebb55(0x310)]});}[_0x5b89ba(0x305)](_0x174663,_0x5cd26c){const _0x472315=_0x5b89ba;if(!_0x174663[_0x472315(0x271)])return'invalid';let _0x7f810a;try{_0x7f810a=_0x4f1d2a[_0x472315(0x2f0)](_0x174663[_0x472315(0x271)]);}catch(_0x2b345b){return'invalid';}try{const _0x7dfb89=_0x5b0f93['verify'](null,_0x7f810a[_0x472315(0x12e)],_0x1e2ff9[_0x472315(0x3c1)],_0x7f810a[_0x472315(0x3b4)]);if(!_0x7dfb89)return _0x472315(0x351);}catch(_0x42d5e4){return _0x472315(0x351);}if(_0x7f810a[_0x472315(0x2e7)][_0x472315(0x156)]===_0xa662e4)return _0x472315(0x2aa);if(_0x7f810a[_0x472315(0x2e7)][_0x472315(0x230)]<=Date['now']())return _0x472315(0x2b2);if(_0x7f810a[_0x472315(0x2e7)][_0x472315(0x156)]===_0x456e0d)return'active';if(!_0x174663[_0x472315(0x2d8)])return'pending';const _0x29e7b1=_0x4f1d2a[_0x472315(0x170)]({'tokenString':_0x174663[_0x472315(0x2d8)],'nodeId':_0x5cd26c,'rawBlobBuf':_0x7f810a['rawBuf'],'pubKeyPem':_0x1e2ff9[_0x472315(0x3c1)],'pubFingerprint':_0x1e2ff9[_0x472315(0x233)]});if(_0x29e7b1[_0x472315(0x265)]===_0x472315(0x229)||_0x29e7b1[_0x472315(0x265)]==='SIG_INVALID')return _0x472315(0x119);if(_0x29e7b1[_0x472315(0x265)]===_0x472315(0x390))return _0x472315(0x2b2);if(!_0x29e7b1[_0x472315(0x207)])return _0x472315(0x119);return'active';}get[_0x5b89ba(0x2aa)](){const _0x2067a8=_0x5b89ba;return this[_0x2067a8(0x112)];}get[_0x5b89ba(0x106)](){return this['_active']??_0x540eeb;}[_0x5b89ba(0x14a)](_0x1f368a){const _0x3b699a=_0x5b89ba;if(_0x1e2ff9[_0x3b699a(0x2f1)]!==_0x3b699a(0x202))return;const _0x437b5c=this[_0x3b699a(0x106)];if(!_0x437b5c[_0x3b699a(0x34c)]?.[_0x1f368a]){const _0x257691=_0x437b5c[_0x3b699a(0x3d8)]?'Feature\x20not\x20available\x20on\x20free\x20tier:\x20'+_0x1f368a+_0x3b699a(0x109)+_0x1f368a+_0x3b699a(0x3b6):_0x3b699a(0x2d7)+_0x1f368a+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x1f368a+'\x22.';throw new _0x2be7b6(_0x257691,_0x3b699a(0x321),{'feature':_0x1f368a});}}['isFeatureEnabled'](_0x6e6765){const _0x303ed8=_0x5b89ba;if(_0x1e2ff9['LICENSED_BUILD']!=='true')return!![];return!!this[_0x303ed8(0x106)][_0x303ed8(0x34c)]?.[_0x6e6765];}[_0x5b89ba(0x349)](_0x13b1cd,_0x263565){const _0xc075ce=_0x5b89ba;if(_0x1e2ff9[_0xc075ce(0x2f1)]!==_0xc075ce(0x202))return;const _0x2f2514=this[_0xc075ce(0x106)],_0x50f788=_0x2f2514['limits']?.[_0x13b1cd];if(_0x50f788===null||_0x50f788===undefined||_0x50f788===0x0)return;if(_0x263565>=_0x50f788)throw new _0x2be7b6(_0xc075ce(0x1f0)+_0x13b1cd+'\x20('+_0x263565+'/'+_0x50f788+')',_0xc075ce(0x244),{'limit':_0x13b1cd,'current':_0x263565,'max':_0x50f788});}async[_0x5b89ba(0x3d6)](_0xae305a){const _0x3432b2=_0x5b89ba;let _0x714545;try{_0x714545=_0x4f1d2a[_0x3432b2(0x2f0)](_0xae305a);}catch(_0x4f2768){throw new _0x2be7b6(_0x3432b2(0x373)+_0x4f2768[_0x3432b2(0x10a)],_0x3432b2(0x2ee));}let _0x1e979a;try{_0x1e979a=_0x5b0f93[_0x3432b2(0x17e)](null,_0x714545[_0x3432b2(0x12e)],_0x1e2ff9[_0x3432b2(0x3c1)],_0x714545[_0x3432b2(0x3b4)]);}catch(_0x4c3617){throw new _0x2be7b6('License\x20signature\x20invalid:\x20'+_0x4c3617[_0x3432b2(0x10a)],_0x3432b2(0x2ee));}if(!_0x1e979a)throw new _0x2be7b6(_0x3432b2(0x262)+(_0x3432b2(0x2c3)+_0x1e2ff9['PUB_FINGERPRINT']+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x3432b2(0x2ee),{'expectedFingerprint':_0x1e2ff9[_0x3432b2(0x233)]});if(_0x714545[_0x3432b2(0x2e7)][_0x3432b2(0x156)]===_0x456e0d){const _0xe4af49=_0x714545[_0x3432b2(0x2e7)][_0x3432b2(0x230)]-_0x714545[_0x3432b2(0x2e7)][_0x3432b2(0x36a)];if(_0xe4af49>_0xa5ee56)throw new _0x2be7b6(_0x3432b2(0x235)+Math['ceil'](_0xe4af49/(0x1e*0x5265c00))+_0x3432b2(0x29d),_0x3432b2(0x2ee));}const _0x3e56d7=this[_0x3432b2(0x204)][_0x3432b2(0x129)];await _0x26fc37(_0x3e56d7);const _0xf4ed6e=_0x4f1d2a[_0x3432b2(0x120)](_0x714545[_0x3432b2(0x2f2)])[_0x3432b2(0x125)]('hex');for(const {value:_0x3ef04b}of _0x3e56d7['getRange'](_0x38a7a1)){if(_0x3ef04b[_0x3432b2(0x1bc)]===_0xf4ed6e)throw new _0x2be7b6(_0x3432b2(0x2de),_0x3432b2(0x2ee));}const _0xdb5589=_0x5b0f93[_0x3432b2(0x141)](),_0x28e5ea={'blob':_0xae305a,'activation':null,'addedAt':Date[_0x3432b2(0x1c3)](),'_licenseHash':_0xf4ed6e,'licensee':_0x714545[_0x3432b2(0x2e7)][_0x3432b2(0x310)],'expiresAt':_0x714545[_0x3432b2(0x2e7)]['expiresAt'],'features':_0x714545[_0x3432b2(0x2e7)][_0x3432b2(0x34c)],'limits':_0x714545[_0x3432b2(0x2e7)][_0x3432b2(0x2f6)],'licenseType':_0x714545['decoded'][_0x3432b2(0x156)]};return await _0x3e56d7[_0x3432b2(0x352)](_0x38a7a1,_0xdb5589,_0x28e5ea),{'id':_0xdb5589,..._0x28e5ea};}async[_0x5b89ba(0x19f)](_0x33503b){const _0x5a9d3d=_0x5b89ba;let _0x2e4c5f;try{_0x2e4c5f=_0x4f1d2a[_0x5a9d3d(0x3bc)](_0x33503b);}catch(_0x4015e6){throw new _0x2be7b6(_0x5a9d3d(0x220)+_0x4015e6['message'],'LICENSE_ACTIVATION_INVALID');}const _0x4a9cbc=_0x2e4c5f[_0x5a9d3d(0x120)]['toString'](_0x5a9d3d(0x139)),_0x6a9a24=this[_0x5a9d3d(0x204)][_0x5a9d3d(0x129)];if(!_0x6a9a24||!_0x6a9a24['hasType'](_0x38a7a1))throw new _0x2be7b6('No\x20license\x20found\x20matching\x20this\x20activation\x20token','LICENSE_ACTIVATION_INVALID');let _0x271167=null,_0x1dd5cd=null;for(const {key:_0x4156c3,value:_0x4935a8}of _0x6a9a24['getRange'](_0x38a7a1)){if(_0x4935a8[_0x5a9d3d(0x1bc)]===_0x4a9cbc){_0x271167=_0x4156c3,_0x1dd5cd=_0x4935a8;break;}}if(!_0x271167)throw new _0x2be7b6(_0x5a9d3d(0x1c1),_0x5a9d3d(0x20b));const {rawBuf:_0x4fd12e}=_0x4f1d2a[_0x5a9d3d(0x2f0)](_0x1dd5cd[_0x5a9d3d(0x271)]),_0x3d15a5=_0x4f1d2a['verifyActivation']({'tokenString':_0x33503b,'nodeId':this[_0x5a9d3d(0x204)]['id'],'rawBlobBuf':_0x4fd12e,'pubKeyPem':_0x1e2ff9['PUBLIC_KEY_PEM'],'pubFingerprint':_0x1e2ff9['PUB_FINGERPRINT']});if(!_0x3d15a5[_0x5a9d3d(0x207)])throw new _0x2be7b6(_0x5a9d3d(0x38d)+_0x3d15a5[_0x5a9d3d(0x265)],_0x5a9d3d(0x20b),{'reason':_0x3d15a5[_0x5a9d3d(0x265)]});const _0xb77dff={..._0x1dd5cd,'activation':_0x33503b};return await _0x6a9a24[_0x5a9d3d(0x259)](_0x38a7a1,_0x271167,_0xb77dff),{'id':_0x271167,..._0xb77dff};}async[_0x5b89ba(0x1a1)](_0x47b49f){const _0x182ffe=_0x5b89ba,_0x32f66c=this[_0x182ffe(0x204)][_0x182ffe(0x129)];if(!_0x32f66c||!_0x32f66c[_0x182ffe(0x228)](_0x38a7a1))return;await _0x32f66c['remove'](_0x38a7a1,_0x47b49f);}async['listLicenses'](){const _0x158cfa=_0x5b89ba,_0x8daed7=this['okdb'][_0x158cfa(0x129)];if(!_0x8daed7||!_0x8daed7['hasType'](_0x38a7a1))return[];const _0x5d6a23=this[_0x158cfa(0x204)]['id'],_0x4bdea5=[];for(const {key:_0x37cf66,value:_0x577dc0}of _0x8daed7[_0x158cfa(0x1ff)](_0x38a7a1)){const _0x33717b=this[_0x158cfa(0x305)](_0x577dc0,_0x5d6a23);_0x4bdea5['push']({..._0x577dc0,'id':_0x37cf66,'status':_0x33717b});}return _0x4bdea5;}[_0x5b89ba(0x219)](){const _0x1b2dc2=_0x5b89ba,_0x70aba8=this[_0x1b2dc2(0x204)][_0x1b2dc2(0x129)];if(!_0x70aba8||!_0x70aba8[_0x1b2dc2(0x228)](_0x38a7a1))return[];const _0x240483=this['okdb']['id'],_0x3bf97d=[];for(const {key:_0xcd4864,value:_0x177e45}of _0x70aba8[_0x1b2dc2(0x1ff)](_0x38a7a1)){if(_0x177e45[_0x1b2dc2(0x1bc)]){if(_0x177e45[_0x1b2dc2(0x156)]===_0x456e0d)_0x3bf97d[_0x1b2dc2(0x3c8)]({'licenseId':_0xcd4864,'pin':null});else{const _0x3022db=Buffer[_0x1b2dc2(0x33a)](_0x177e45[_0x1b2dc2(0x1bc)],_0x1b2dc2(0x139)),{pin:_0x1b6429}=_0x4f1d2a[_0x1b2dc2(0x28b)](_0x240483,_0x3022db,_0x1e2ff9[_0x1b2dc2(0x233)]);_0x3bf97d[_0x1b2dc2(0x3c8)]({'licenseId':_0xcd4864,'pin':_0x1b6429});}}}return _0x3bf97d;}async[_0x5b89ba(0x144)](){const _0x130985=_0x5b89ba,_0x3e2d5f=this[_0x130985(0x112)];await this['reload']();if(this[_0x130985(0x112)]&&this[_0x130985(0x112)][_0x130985(0x156)]===_0x456e0d){const _0x254c46=Math[_0x130985(0x232)]((this['_active'][_0x130985(0x230)]-Date[_0x130985(0x1c3)]())/0x5265c00);this[_0x130985(0x204)][_0x130985(0x126)]?.[_0x130985(0x3e0)](_0x130985(0x2c0)+_0x254c46+_0x130985(0x2ff),{'feature':_0x130985(0x28c),'licensee':this[_0x130985(0x112)][_0x130985(0x310)],'expiresAt':new Date(this[_0x130985(0x112)][_0x130985(0x230)])['toISOString']()});}this[_0x130985(0x112)]&&this['_active'][_0x130985(0x156)]===_0xa662e4&&this[_0x130985(0x204)][_0x130985(0x126)]?.[_0x130985(0x3e0)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x130985(0x28c),'licensee':this['_active']['licensee']});if(_0x3e2d5f&&!this[_0x130985(0x112)]){this[_0x130985(0x204)][_0x130985(0x126)]?.[_0x130985(0x3e0)]('License\x20expired\x20or\x20invalidated',{'feature':_0x130985(0x28c)}),this[_0x130985(0x204)]['events']?.[_0x130985(0x19e)](_0x330adb['LICENSE_INVALID'],{'previous':_0x3e2d5f});const _0x1190ee=this[_0x130985(0x204)][_0x130985(0x23f)]?.[_0x130985(0x3e8)]??_0x1e2ff9['LICENSE_EXPIRED_ACTION'];_0x1190ee===_0x130985(0x153)&&(this['okdb']['log']?.[_0x130985(0x33c)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':'license'}),this[_0x130985(0x204)][_0x130985(0x199)]()[_0x130985(0x1c6)](()=>{})[_0x130985(0x383)](()=>process[_0x130985(0x377)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x553e46,'_C':_0x1e2ff9},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x18ab97=_0x3f2430;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x1ab16c=require$$0$2,_0x22b295=require$$1,_0x123acf=require$$2$1,_0x29e34b=require$$1$1,_0x5ddc9e=_0x29e34b['join'](_0x123acf[_0x18ab97(0x1e8)](),'.kdb_history'),_0x3966e7=0x3e8,_0x23104a={'reset':_0x18ab97(0x16b),'bold':_0x18ab97(0x191),'dim':_0x18ab97(0x2f7),'red':_0x18ab97(0x25c),'green':'\x1b[32m','yellow':_0x18ab97(0x12b),'blue':_0x18ab97(0x118),'magenta':_0x18ab97(0x210),'cyan':_0x18ab97(0x1c8),'white':_0x18ab97(0x2a3),'gray':'\x1b[90m'},_0x48ce0c=!process['stdout'][_0x18ab97(0x1d2)]||!!process.env.NO_COLOR,_0x1cdc15=(_0x229d86,_0x1ae1e6)=>_0x48ce0c?_0x1ae1e6:''+_0x229d86+_0x1ae1e6+_0x23104a[_0x18ab97(0x1d7)],_0x1fff08={'error':_0x23104a[_0x18ab97(0x21b)],'warn':_0x23104a[_0x18ab97(0x1f4)],'info':_0x23104a[_0x18ab97(0x1fd)],'debug':_0x23104a[_0x18ab97(0x39d)]},_0x596a76={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x2d3514(_0x42b9a6,_0x384852=_0x18ab97(0x363)){const _0x2f236c=_0x18ab97,{level:_0x293ad2,msg:_0x5e977c,meta:_0x35e4c3,context:_0x5ccd3f,ts:_0x2b274f}=_0x42b9a6;if((_0x596a76[_0x293ad2]??0x1)<(_0x596a76[_0x384852]??0x1))return;const _0x2d0cfa=_0x1cdc15(_0x23104a['gray'],new Date(_0x2b274f)['toISOString']()),_0x3a95f8=_0x1cdc15(_0x1fff08[_0x293ad2]??_0x23104a['white'],_0x293ad2[_0x2f236c(0x18f)](0x5));let _0x11c091='\x20\x20'+_0x2d0cfa+'\x20'+_0x1cdc15(_0x23104a[_0x2f236c(0x395)],_0x3a95f8)+'\x20'+_0x5e977c;if(_0x35e4c3&&Object['keys'](_0x35e4c3)['length']>0x0){const _0x2c6f9a=Object[_0x2f236c(0x316)](_0x35e4c3)['map'](([_0x40d334,_0x23a5a3])=>_0x40d334+'='+_0x23a5a3)[_0x2f236c(0x1e3)]('\x20');_0x11c091+=_0x1cdc15(_0x23104a[_0x2f236c(0x103)],'\x20\x20['+_0x2c6f9a+']');}if(_0x5ccd3f!==undefined){const _0x512b70=typeof _0x5ccd3f==='object'?JSON['stringify'](_0x5ccd3f):String(_0x5ccd3f);_0x11c091+=_0x1cdc15(_0x23104a[_0x2f236c(0x103)],'\x20\x20'+_0x512b70);}const _0x42ce9c=_0x293ad2===_0x2f236c(0x33c)||_0x293ad2===_0x2f236c(0x3e0)?process[_0x2f236c(0x317)][_0x2f236c(0x2d9)][_0x2f236c(0x110)](process[_0x2f236c(0x317)]):process['stdout']['write'][_0x2f236c(0x110)](process['stdout']);_0x42ce9c(_0x11c091+'\x0a');}function _0x1f3cbe(_0x41a03f,_0x514c30){const _0x5068c1=_0x18ab97;if(_0x41a03f===0xcc||_0x41a03f>=0xc8&&_0x41a03f<0x12c&&!_0x514c30){console[_0x5068c1(0x126)](_0x5068c1(0x200)+_0x1cdc15(_0x23104a[_0x5068c1(0x31f)],'✓')+'\x0a');return;}if(_0x41a03f>=0x190||_0x514c30?.[_0x5068c1(0x33c)]){const _0x3ed12b=_0x514c30?.['error']??_0x514c30?.[_0x5068c1(0x10a)]??'HTTP\x20'+_0x41a03f;console[_0x5068c1(0x126)](_0x5068c1(0x200)+_0x1cdc15(_0x23104a['red'],'✗')+'\x20'+_0x1cdc15(_0x23104a[_0x5068c1(0x395)]+_0x23104a[_0x5068c1(0x21b)],String(_0x41a03f))+'\x20\x20'+_0x3ed12b+'\x0a');return;}const _0x24afd8=Object['prototype'][_0x5068c1(0x338)]['call'](_0x514c30??{},_0x5068c1(0xf9))?_0x514c30[_0x5068c1(0xf9)]:_0x514c30,_0x52241f=_0x514c30?.[_0x5068c1(0x274)];console['log'](''),_0x4cf735(_0x24afd8,'\x20\x20');if(_0x52241f?.[_0x5068c1(0x303)]!=null||_0x52241f?.['time']!=null){const _0x14ba9e=[];if(_0x52241f[_0x5068c1(0x303)]!=null)_0x14ba9e[_0x5068c1(0x3c8)](_0x52241f['count']+'\x20result'+(_0x52241f['count']!==0x1?'s':''));if(_0x52241f[_0x5068c1(0x282)]!=null)_0x14ba9e[_0x5068c1(0x3c8)](_0x52241f[_0x5068c1(0x282)]+'ms');console[_0x5068c1(0x126)](_0x5068c1(0x200)+_0x1cdc15(_0x23104a['dim'],_0x14ba9e[_0x5068c1(0x1e3)](_0x5068c1(0x3ed))));}console[_0x5068c1(0x126)]('');}function _0x4cf735(_0x117f07,_0xf43857=''){const _0xed8572=_0x18ab97;if(_0x117f07===null||_0x117f07===undefined){console[_0xed8572(0x126)](_0xf43857+_0x1cdc15(_0x23104a['dim'],'(null)'));return;}if(Array['isArray'](_0x117f07)){if(_0x117f07['length']===0x0){console[_0xed8572(0x126)](_0xf43857+_0x1cdc15(_0x23104a['dim'],_0xed8572(0x256)));return;}if(_0x117f07['every'](_0x27ce2b=>_0x27ce2b&&typeof _0x27ce2b==='object'&&_0xed8572(0x1ec)in _0x27ce2b&&_0xed8572(0x17b)in _0x27ce2b)){_0x433c82(_0x117f07,_0xf43857);return;}if(_0x117f07[_0xed8572(0x391)](_0x1c3c86=>_0x1c3c86&&typeof _0x1c3c86===_0xed8572(0x32d)&&_0xed8572(0x1d3)in _0x1c3c86&&'count'in _0x1c3c86)){_0x39807f(_0x117f07,_0xf43857);return;}if(_0x117f07[_0xed8572(0x391)](_0x53393c=>typeof _0x53393c!==_0xed8572(0x32d)||_0x53393c===null)){_0x117f07[_0xed8572(0x1be)]((_0x95a851,_0x494797)=>console['log'](_0xf43857+_0x1cdc15(_0x23104a['gray'],_0x494797+0x1+'.')+'\x20'+_0x1cdc15(_0x23104a['white'],String(_0x95a851))));return;}_0x117f07[_0xed8572(0x1be)]((_0x13e163,_0x34a804)=>{const _0x5afc8e=_0xed8572;console['log'](_0xf43857+_0x1cdc15(_0x23104a[_0x5afc8e(0x103)],'['+_0x34a804+']'));if(typeof _0x13e163===_0x5afc8e(0x32d)&&_0x13e163!==null)_0x2ea36b(_0x13e163,_0xf43857+'\x20\x20');else console['log'](_0xf43857+'\x20\x20'+String(_0x13e163));});return;}if(typeof _0x117f07===_0xed8572(0x32d)){if('key'in _0x117f07&&_0xed8572(0x17b)in _0x117f07&&Object[_0xed8572(0x2cb)](_0x117f07)['length']<=0x3){console[_0xed8572(0x126)](_0xf43857+_0x1cdc15(_0x23104a[_0xed8572(0x395)]+_0x23104a[_0xed8572(0x1fd)],String(_0x117f07[_0xed8572(0x1ec)])));const _0x38c877=_0x117f07['value'];if(_0x38c877&&typeof _0x38c877==='object')_0x2ea36b(_0x38c877,_0xf43857);else console[_0xed8572(0x126)](_0xf43857+_0x1cdc15(_0x23104a[_0xed8572(0x2b3)],String(_0x38c877)));return;}_0x2ea36b(_0x117f07,_0xf43857);return;}console[_0xed8572(0x126)](_0xf43857+_0x1cdc15(_0x23104a['white'],String(_0x117f07)));}function _0x2ea36b(_0x50514b,_0x5c2035=''){const _0x5ae718=_0x18ab97,_0x242a8f=Object[_0x5ae718(0x316)](_0x50514b);if(_0x242a8f[_0x5ae718(0x369)]===0x0){console['log'](_0x5c2035+_0x1cdc15(_0x23104a['dim'],'{}'));return;}const _0x2dfaa8=Math[_0x5ae718(0x1cd)](0x1c,Math['max'](..._0x242a8f[_0x5ae718(0x1b2)](([_0x37cf4b])=>_0x37cf4b[_0x5ae718(0x369)])));for(const [_0x5ec558,_0x62ae33]of _0x242a8f){const _0x492c03=_0x1cdc15(_0x23104a[_0x5ae718(0x1fd)],_0x5ec558[_0x5ae718(0x18f)](_0x2dfaa8));if(_0x62ae33===null||_0x62ae33===undefined)console[_0x5ae718(0x126)](_0x5c2035+_0x492c03+'\x20\x20'+_0x1cdc15(_0x23104a['dim'],'null'));else{if(typeof _0x62ae33===_0x5ae718(0x32d)){const _0x4ca3aa=JSON['stringify'](_0x62ae33);_0x4ca3aa[_0x5ae718(0x369)]<=0x50?console['log'](_0x5c2035+_0x492c03+'\x20\x20'+_0x1cdc15(_0x23104a[_0x5ae718(0x103)],_0x4ca3aa)):(console[_0x5ae718(0x126)](_0x5c2035+_0x492c03),_0x4cf735(_0x62ae33,_0x5c2035+'\x20\x20'));}else{const _0x12fc9c=typeof _0x62ae33==='boolean'?_0x1cdc15(_0x62ae33?_0x23104a[_0x5ae718(0x31f)]:_0x23104a[_0x5ae718(0x1f4)],String(_0x62ae33)):typeof _0x62ae33===_0x5ae718(0x357)?_0x1cdc15(_0x23104a[_0x5ae718(0x249)],String(_0x62ae33)):_0x1cdc15(_0x23104a[_0x5ae718(0x2b3)],String(_0x62ae33));console[_0x5ae718(0x126)](_0x5c2035+_0x492c03+'\x20\x20'+_0x12fc9c);}}}}function _0x433c82(_0x4ffedd,_0x4ee09f=''){const _0x14f78e=_0x18ab97,_0x1b1491=Math['min'](0x20,Math[_0x14f78e(0x1e5)](..._0x4ffedd[_0x14f78e(0x1b2)](_0x1df76b=>String(_0x1df76b[_0x14f78e(0x1ec)])[_0x14f78e(0x369)])));for(const {key:_0xe973d5,value:_0x5dcf46,score:_0x14d7d1,clock:_0x546238}of _0x4ffedd){const _0x531862=_0x1cdc15(_0x23104a[_0x14f78e(0x395)]+_0x23104a['cyan'],String(_0xe973d5)[_0x14f78e(0x18f)](_0x1b1491)),_0x43bc7d=_0x5dcf46==null?_0x1cdc15(_0x23104a['dim'],_0x14f78e(0x254)):typeof _0x5dcf46==='object'?_0x1cdc15(_0x23104a[_0x14f78e(0x103)],JSON[_0x14f78e(0x3b8)](_0x5dcf46)):_0x1cdc15(_0x23104a['white'],String(_0x5dcf46)),_0x58bdbe=_0x14d7d1!=null?_0x1cdc15(_0x23104a[_0x14f78e(0x39d)],_0x14f78e(0x374)+_0x14d7d1['toFixed'](0x4)):'',_0xb49166=_0x546238!=null?_0x1cdc15(_0x23104a[_0x14f78e(0x39d)],'\x20\x20@'+_0x546238):'';console[_0x14f78e(0x126)](_0x4ee09f+_0x531862+'\x20\x20'+_0x43bc7d+_0x58bdbe+_0xb49166);}}function _0x39807f(_0x4e89ed,_0x138839=''){const _0x5037c2=_0x18ab97,_0x10c0ea=Math[_0x5037c2(0x1cd)](0x20,Math['max'](..._0x4e89ed[_0x5037c2(0x1b2)](_0x220ef5=>_0x220ef5[_0x5037c2(0x1d3)][_0x5037c2(0x369)])));for(const {type:_0x504e1a,count:_0x277a5f,fields:_0x34ba63}of _0x4e89ed){if(_0x504e1a[_0x5037c2(0x13b)]('~'))continue;const _0x151099=_0x1cdc15(_0x23104a[_0x5037c2(0x395)]+_0x23104a[_0x5037c2(0x1fd)],_0x504e1a[_0x5037c2(0x18f)](_0x10c0ea)),_0x3e3ad4=_0x1cdc15(_0x23104a[_0x5037c2(0x249)],String(_0x277a5f)['padStart'](0x6))+_0x1cdc15(_0x23104a[_0x5037c2(0x103)],'\x20records'),_0x4b97f5=_0x34ba63&&Object['keys'](_0x34ba63)[_0x5037c2(0x369)]?_0x1cdc15(_0x23104a[_0x5037c2(0x103)],_0x5037c2(0x2bf)+Object['keys'](_0x34ba63)[_0x5037c2(0x343)](0x0,0x6)[_0x5037c2(0x1e3)](',\x20')+(Object['keys'](_0x34ba63)[_0x5037c2(0x369)]>0x6?'…':'')):'';console[_0x5037c2(0x126)](_0x138839+_0x151099+'\x20\x20'+_0x3e3ad4+_0x4b97f5);}}const _0x24bbeb=[_0x18ab97(0x183),_0x18ab97(0x206),'queue/',_0x18ab97(0x1c5),_0x18ab97(0x273),_0x18ab97(0x2bb)];function _0x2b2bd2(_0x2e076f,_0x24085e){const _0xaf75e7=_0x18ab97;if(_0x2e076f[_0xaf75e7(0x13b)](_0xaf75e7(0x36c)))return _0x2e076f;if(_0x2e076f[_0xaf75e7(0x13b)]('/'))return'/api'+_0x2e076f;if(_0x2e076f[_0xaf75e7(0x13b)](_0xaf75e7(0x278)))return _0xaf75e7(0x36c)+_0x2e076f;const _0xdf4898=_0x24bbeb[_0xaf75e7(0x1bb)](_0x478e51=>_0x2e076f===_0x478e51[_0xaf75e7(0x320)](/\/$/,'')||_0x2e076f['startsWith'](_0x478e51));return _0xdf4898?'/api/env/'+_0x24085e+'/'+_0x2e076f:_0xaf75e7(0x36c)+_0x2e076f;}function _0x3a34e7(_0x3f90c9){const _0x4ab87c=_0x18ab97,_0x3aa175={},_0xb0b30a=[];let _0x52cf9d=0x0;while(_0x52cf9d<_0x3f90c9[_0x4ab87c(0x369)]){if((_0x3f90c9[_0x52cf9d]===_0x4ab87c(0xfa)||_0x3f90c9[_0x52cf9d]==='-e')&&_0x3f90c9[_0x52cf9d+0x1]&&!_0x3f90c9[_0x52cf9d+0x1]['startsWith']('-'))_0x3aa175[_0x4ab87c(0x100)]=_0x3f90c9[++_0x52cf9d];else _0x3f90c9[_0x52cf9d]===_0x4ab87c(0x1dd)||_0x3f90c9[_0x52cf9d]==='-h'?_0x3aa175['help']=!![]:_0xb0b30a[_0x4ab87c(0x3c8)](_0x3f90c9[_0x52cf9d]);_0x52cf9d++;}return{'flags':_0x3aa175,'rest':_0xb0b30a};}const _0x4f021e={'system':_0x18ab97(0x172),'envs':_0x18ab97(0x22e),'types':_0x18ab97(0x2dc),'data':'Records','indexes':'Indexes','fts':_0x18ab97(0x337),'sync':_0x18ab97(0x35a),'queue':_0x18ab97(0x1b6),'files':'Files','embeddings':_0x18ab97(0x2ba),'engines':_0x18ab97(0x164),'admin':_0x18ab97(0x31a),'event':_0x18ab97(0x3d5),'processor':'Processors'},_0xd45f0=[_0x18ab97(0x33d),'envs',_0x18ab97(0x183),'data',_0x18ab97(0x37f),'fts',_0x18ab97(0x3c3),_0x18ab97(0x19a),_0x18ab97(0x283),'embeddings','engines','admin'];function _0x3785d2(_0x17c3bf){const _0x4de69c=_0x18ab97;return _0x17c3bf[_0x4de69c(0x320)](/^\/api/,'')[_0x4de69c(0x320)](/^\[\/env\/:env=[^\]]*\]/,_0x4de69c(0x21c))[_0x4de69c(0x320)](/^\/env\/:env/,_0x4de69c(0x1d5))[_0x4de69c(0x320)](/^\//,'');}function _0x4a8792(_0xd0098e,_0x22c974=''){const _0x3e2808=_0x18ab97,_0x4ccd7b=_0xd0098e[_0x3e2808(0x3e2)][_0x3e2808(0x308)]()[_0x3e2808(0x218)](_0x550bdf=>!_0x550bdf['meta']?.['hidden']),_0xdfc92=_0x22c974?_0x4ccd7b[_0x3e2808(0x218)](_0x345666=>_0x345666['path'][_0x3e2808(0x11e)]()['includes'](_0x22c974[_0x3e2808(0x11e)]())||(_0x210a22(_0x345666)??'')[_0x3e2808(0x11e)]()[_0x3e2808(0x147)](_0x22c974['toLowerCase']())||_0x270c7c(_0x345666)[_0x3e2808(0x1bb)](_0x242df9=>_0x242df9[_0x3e2808(0x11e)]()['includes'](_0x22c974['toLowerCase']()))):_0x4ccd7b;if(!_0xdfc92[_0x3e2808(0x369)]){console[_0x3e2808(0x126)](_0x1cdc15(_0x23104a['yellow'],_0x3e2808(0x15d)+_0x22c974+'\x22\x0a'));return;}const _0x26e677=new Map();for(const _0x5b79c7 of _0xdfc92){const _0x47d4dc=_0x270c7c(_0x5b79c7)[0x0]??_0x3e2808(0x1d8);if(!_0x26e677[_0x3e2808(0x32a)](_0x47d4dc))_0x26e677[_0x3e2808(0x291)](_0x47d4dc,[]);_0x26e677['get'](_0x47d4dc)[_0x3e2808(0x3c8)](_0x5b79c7);}const _0x58a213=[..._0xd45f0[_0x3e2808(0x218)](_0x42bd4d=>_0x26e677[_0x3e2808(0x32a)](_0x42bd4d)),...[..._0x26e677[_0x3e2808(0x2cb)]()][_0x3e2808(0x218)](_0x3584e7=>!_0xd45f0['includes'](_0x3584e7))];console[_0x3e2808(0x126)]('');for(const _0x593bbb of _0x58a213){const _0x3751d1=_0x26e677[_0x3e2808(0x288)](_0x593bbb);if(!_0x3751d1?.[_0x3e2808(0x369)])continue;console[_0x3e2808(0x126)](_0x1cdc15(_0x23104a[_0x3e2808(0x395)],'\x20\x20'+(_0x4f021e[_0x593bbb]??_0x593bbb)));for(const _0x12809b of _0x3751d1){const _0x1accf0=_0x1cdc15(_0x23104a[_0x3e2808(0x249)],_0x12809b[_0x3e2808(0x3c9)]['padEnd'](0x7)),_0x23ea0e=_0x1cdc15(_0x23104a[_0x3e2808(0x1fd)],_0x3785d2(_0x12809b['path'])),_0x33b7d2=_0x210a22(_0x12809b)?_0x1cdc15(_0x23104a[_0x3e2808(0x103)],'\x20\x20'+_0x210a22(_0x12809b)):'',_0x33e145=_0x12809b[_0x3e2808(0x3b7)]?.['id']?_0x1cdc15(_0x23104a[_0x3e2808(0x39d)],_0x3e2808(0x22f)+_0x12809b[_0x3e2808(0x3b7)]['id']+']'):'';console[_0x3e2808(0x126)]('\x20\x20\x20\x20'+_0x1accf0+'\x20'+_0x23ea0e+_0x33b7d2+_0x33e145);}console['log']('');}}function _0x1f2307(_0xb922fa,_0x280241){const _0x4feafa=_0x18ab97,_0x550e91=_0x280241[_0x4feafa(0x320)](/^\/api(\/env\/[^/]+)?\//,'')[_0x4feafa(0x2ae)]('/')[0x0],_0x6ff072=_0xb922fa[_0x4feafa(0x3e2)]['listRoutes']()[_0x4feafa(0x218)](_0x20bc72=>_0x20bc72[_0x4feafa(0x217)]['toLowerCase']()[_0x4feafa(0x147)](_0x550e91[_0x4feafa(0x11e)]()));if(!_0x6ff072['length']){console[_0x4feafa(0x126)](_0x1cdc15(_0x23104a[_0x4feafa(0x1f4)],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x280241+'\x0a'));return;}console[_0x4feafa(0x126)]('');for(const _0x465be7 of _0x6ff072[_0x4feafa(0x343)](0x0,0xc)){for(const _0x21faac of _0x14fc66(_0x465be7)){console['log'](_0x21faac);}console[_0x4feafa(0x126)]('');}}function _0x210a22(_0x234379){const _0x28f4d1=_0x18ab97;return _0x234379[_0x28f4d1(0x3b7)]?.[_0x28f4d1(0x163)]??_0x234379[_0x28f4d1(0x274)]?.['summary']??'';}function _0x53f627(_0x1e73a3){const _0x1b2648=_0x18ab97;return _0x1e73a3[_0x1b2648(0x3b7)]?.[_0x1b2648(0x397)]??_0x1e73a3['meta']?.[_0x1b2648(0x397)]??'';}function _0x270c7c(_0x2a8e85){const _0x5a2ad7=_0x18ab97;return _0x2a8e85['operation']?.[_0x5a2ad7(0x3f8)]?.[_0x5a2ad7(0x369)]?_0x2a8e85['operation'][_0x5a2ad7(0x3f8)]:_0x2a8e85[_0x5a2ad7(0x274)]?.[_0x5a2ad7(0x3f8)]??[];}function _0x14fc66(_0x15287b){const _0x416674=_0x18ab97,_0x2dd02f=[];_0x2dd02f['push']('\x20\x20'+_0x1cdc15(_0x23104a[_0x416674(0x395)]+_0x23104a[_0x416674(0x249)],_0x15287b[_0x416674(0x3c9)][_0x416674(0x18f)](0x7))+'\x20'+_0x1cdc15(_0x23104a[_0x416674(0x395)]+_0x23104a[_0x416674(0x1fd)],_0x15287b[_0x416674(0x217)]));_0x15287b[_0x416674(0x3b7)]?.['id']&&_0x2dd02f[_0x416674(0x3c8)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1cdc15(_0x23104a[_0x416674(0x39d)],'id:\x20'+_0x15287b[_0x416674(0x3b7)]['id']));_0x210a22(_0x15287b)&&_0x2dd02f[_0x416674(0x3c8)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1cdc15(_0x23104a[_0x416674(0x2b3)],_0x210a22(_0x15287b)));_0x53f627(_0x15287b)&&_0x2dd02f[_0x416674(0x3c8)](_0x416674(0x21a)+_0x1cdc15(_0x23104a[_0x416674(0x103)],_0x53f627(_0x15287b)));_0x270c7c(_0x15287b)[_0x416674(0x369)]&&_0x2dd02f[_0x416674(0x3c8)](_0x416674(0x21a)+_0x1cdc15(_0x23104a[_0x416674(0x39d)],_0x416674(0x184)+_0x270c7c(_0x15287b)[_0x416674(0x1e3)](',\x20')));_0x15287b['operation']?.['safety']?.['access']&&_0x2dd02f[_0x416674(0x3c8)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1cdc15(_0x23104a[_0x416674(0x39d)],_0x416674(0x1b9)+_0x15287b[_0x416674(0x3b7)][_0x416674(0x234)][_0x416674(0x1ca)]));_0x15287b[_0x416674(0x3b7)]?.[_0x416674(0x3e2)]?.['transport']&&_0x15287b[_0x416674(0x3b7)][_0x416674(0x3e2)][_0x416674(0x2d0)]!==_0x416674(0x3cc)&&_0x2dd02f['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1cdc15(_0x23104a['gray'],_0x416674(0xff)+_0x15287b[_0x416674(0x3b7)][_0x416674(0x3e2)][_0x416674(0x2d0)]));if(_0x15287b[_0x416674(0x3b7)]?.[_0x416674(0x306)]){const _0x251cbe=Object[_0x416674(0x2cb)](_0x15287b[_0x416674(0x3b7)][_0x416674(0x306)][_0x416674(0x3a2)]||{});if(_0x251cbe['length'])_0x2dd02f[_0x416674(0x3c8)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1cdc15(_0x23104a[_0x416674(0x39d)],'input:\x20'+_0x251cbe[_0x416674(0x1e3)](',\x20')));}return _0x15287b[_0x416674(0x274)]?.[_0x416674(0x3dc)]&&_0x2dd02f[_0x416674(0x3c8)](_0x416674(0x21a)+_0x1cdc15(_0x23104a[_0x416674(0x39d)],_0x416674(0x35f)+JSON['stringify'](_0x15287b['meta']['body']))),_0x2dd02f;}async function _0x3e3ca1(_0x658f4,_0x1bdff0,_0x5662dc,_0x203f19=null){const _0x4576c6=_0x18ab97,_0x2f86d1=_0x5662dc[_0x4576c6(0x302)]('?'),_0xa8a1d0=_0x2f86d1>=0x0?_0x5662dc['slice'](0x0,_0x2f86d1):_0x5662dc,_0x353bcf=_0x2f86d1>=0x0?_0x5662dc[_0x4576c6(0x343)](_0x2f86d1+0x1):'',_0x1eed77=Object[_0x4576c6(0x22c)](new URLSearchParams(_0x353bcf)[_0x4576c6(0x316)]());return _0x658f4[_0x4576c6(0x3e2)][_0x4576c6(0x3a0)](_0x1bdff0,_0xa8a1d0,{'body':_0x203f19,'query':_0x1eed77,'headers':{'content-type':_0x4576c6(0x2c1)}},{'internal':!![]});}function _0x4bdb26(_0x3fc2dc){const _0x5b6c62=_0x18ab97;if(!_0x3fc2dc)return null;const _0x14c2bb=_0x3fc2dc[_0x5b6c62(0x201)]();if(!_0x14c2bb)return null;try{return JSON[_0x5b6c62(0x11b)](_0x14c2bb);}catch{}try{return JSON['parse'](_0x22d128(_0x14c2bb));}catch(_0x40ba42){throw new SyntaxError(_0x40ba42[_0x5b6c62(0x10a)],{'cause':_0x40ba42});}}function _0x22d128(_0x7d6a84){const _0x272f9c=_0x18ab97;let _0x1629d1='',_0x5e8c4d=0x0;while(_0x5e8c4d<_0x7d6a84[_0x272f9c(0x369)]){const _0x1c7cf1=_0x7d6a84[_0x5e8c4d];if(_0x1c7cf1==='\x22'){_0x1629d1+='\x22',_0x5e8c4d++;while(_0x5e8c4d<_0x7d6a84[_0x272f9c(0x369)]&&_0x7d6a84[_0x5e8c4d]!=='\x22'){if(_0x7d6a84[_0x5e8c4d]==='\x5c'){_0x1629d1+=_0x7d6a84[_0x5e8c4d++];if(_0x5e8c4d<_0x7d6a84[_0x272f9c(0x369)])_0x1629d1+=_0x7d6a84[_0x5e8c4d++];}else _0x1629d1+=_0x7d6a84[_0x5e8c4d++];}_0x1629d1+='\x22';if(_0x5e8c4d<_0x7d6a84[_0x272f9c(0x369)])_0x5e8c4d++;continue;}if(_0x1c7cf1==='\x27'){_0x1629d1+='\x22',_0x5e8c4d++;while(_0x5e8c4d<_0x7d6a84['length']&&_0x7d6a84[_0x5e8c4d]!=='\x27'){if(_0x7d6a84[_0x5e8c4d]==='\x5c'&&_0x7d6a84[_0x5e8c4d+0x1]==='\x27')_0x1629d1+='\x27',_0x5e8c4d+=0x2;else _0x7d6a84[_0x5e8c4d]==='\x22'?(_0x1629d1+='\x5c\x22',_0x5e8c4d++):_0x1629d1+=_0x7d6a84[_0x5e8c4d++];}_0x1629d1+='\x22';if(_0x5e8c4d<_0x7d6a84[_0x272f9c(0x369)])_0x5e8c4d++;continue;}if(_0x272f9c(0x301)[_0x272f9c(0x147)](_0x1c7cf1)){_0x1629d1+=_0x1c7cf1,_0x5e8c4d++;continue;}let _0x2fffea='';while(_0x5e8c4d<_0x7d6a84['length']&&!_0x272f9c(0x10c)['includes'](_0x7d6a84[_0x5e8c4d])&&_0x7d6a84[_0x5e8c4d]!=='\x20'&&_0x7d6a84[_0x5e8c4d]!=='\x09'&&_0x7d6a84[_0x5e8c4d]!=='\x0a'&&_0x7d6a84[_0x5e8c4d]!=='\x0d'){_0x2fffea+=_0x7d6a84[_0x5e8c4d++];}let _0x3e5e2a=_0x5e8c4d;while(_0x3e5e2a<_0x7d6a84['length']&&(_0x7d6a84[_0x3e5e2a]==='\x20'||_0x7d6a84[_0x3e5e2a]==='\x09'))_0x3e5e2a++;if(_0x7d6a84[_0x3e5e2a]===':')_0x1629d1+='\x22'+_0x2fffea+'\x22';else _0x2fffea===_0x272f9c(0x202)||_0x2fffea==='false'||_0x2fffea==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x272f9c(0x27d)](_0x2fffea)?_0x1629d1+=_0x2fffea:_0x1629d1+='\x22'+_0x2fffea+'\x22';}return _0x1629d1[_0x272f9c(0x320)](/,(\s*[}\]])/g,'$1');}function _0x43484a(_0x42d291){const _0x570607=_0x18ab97,_0x371d93=[];let _0x4f1cbc=0x0;while(_0x4f1cbc<_0x42d291['length']){while(_0x4f1cbc<_0x42d291[_0x570607(0x369)]&&(_0x42d291[_0x4f1cbc]==='\x20'||_0x42d291[_0x4f1cbc]==='\x09'))_0x4f1cbc++;if(_0x4f1cbc>=_0x42d291[_0x570607(0x369)])break;const _0x273148=_0x42d291[_0x4f1cbc];if(_0x273148==='{'||_0x273148==='['){const _0x4eb868=_0x273148==='{'?'}':']',_0xd19189=_0x4f1cbc++;let _0x4d3666=0x1,_0x5275ad=![],_0x324c3d='';while(_0x4f1cbc<_0x42d291[_0x570607(0x369)]&&_0x4d3666>0x0){const _0x242456=_0x42d291[_0x4f1cbc];if(_0x5275ad){if(_0x242456==='\x5c')_0x4f1cbc++;else{if(_0x242456===_0x324c3d)_0x5275ad=![];}}else{if(_0x242456==='\x22'||_0x242456==='\x27')_0x5275ad=!![],_0x324c3d=_0x242456;else{if(_0x242456===_0x273148)_0x4d3666++;else{if(_0x242456===_0x4eb868)_0x4d3666--;}}}_0x4f1cbc++;}_0x371d93[_0x570607(0x3c8)](_0x42d291[_0x570607(0x343)](_0xd19189,_0x4f1cbc));continue;}if(_0x273148==='\x22'||_0x273148==='\x27'){const _0x5030da=_0x273148;_0x4f1cbc++;let _0x5de568='';while(_0x4f1cbc<_0x42d291['length']&&_0x42d291[_0x4f1cbc]!==_0x5030da){if(_0x42d291[_0x4f1cbc]==='\x5c'&&_0x4f1cbc+0x1<_0x42d291[_0x570607(0x369)])_0x4f1cbc++,_0x5de568+=_0x42d291[_0x4f1cbc++];else _0x5de568+=_0x42d291[_0x4f1cbc++];}if(_0x4f1cbc<_0x42d291[_0x570607(0x369)])_0x4f1cbc++;_0x371d93[_0x570607(0x3c8)](_0x5de568);continue;}let _0x47968c='';while(_0x4f1cbc<_0x42d291['length']&&_0x42d291[_0x4f1cbc]!=='\x20'&&_0x42d291[_0x4f1cbc]!=='\x09'&&_0x42d291[_0x4f1cbc]!=='{'&&_0x42d291[_0x4f1cbc]!=='['){_0x47968c+=_0x42d291[_0x4f1cbc++];}if(_0x47968c)_0x371d93['push'](_0x47968c);}return _0x371d93;}function _0x1ec145(_0x469c99,_0x4733c3){const _0x2b57c5=_0x18ab97,_0x14f293=[..._0x469c99[_0x2b57c5(0x2a9)][_0x2b57c5(0x2cb)]()][_0x2b57c5(0x218)](_0x4c0e8a=>!_0x4c0e8a[_0x2b57c5(0x13b)]('~'));console[_0x2b57c5(0x126)](['',_0x1cdc15(_0x23104a[_0x2b57c5(0x395)]+_0x23104a[_0x2b57c5(0x1fd)],'\x20\x20╔═══════════════════════════╗'),_0x1cdc15(_0x23104a[_0x2b57c5(0x395)]+_0x23104a['cyan'],_0x2b57c5(0x266))+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],_0x2b57c5(0x307))+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)]+_0x23104a[_0x2b57c5(0x1fd)],'║'),_0x1cdc15(_0x23104a[_0x2b57c5(0x395)]+_0x23104a[_0x2b57c5(0x1fd)],_0x2b57c5(0x1d6)),'','\x20\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x31f)],'✓')+'\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],'server')+_0x2b57c5(0x387)+_0x4733c3[_0x2b57c5(0x1a8)],'\x20\x20'+_0x1cdc15(_0x23104a['green'],'✓')+'\x20'+_0x1cdc15(_0x23104a['bold'],_0x2b57c5(0x348))+_0x2b57c5(0xfd)+_0x4733c3[_0x2b57c5(0x1a8)]+'/api','\x20\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x31f)],'✓')+'\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],_0x2b57c5(0x217))+_0x2b57c5(0x2da)+_0x4733c3[_0x2b57c5(0x29f)],'\x20\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x31f)],'✓')+'\x20'+_0x1cdc15(_0x23104a['bold'],'id')+_0x2b57c5(0x356)+_0x1cdc15(_0x23104a['gray'],_0x469c99['id']),'\x20\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x31f)],'✓')+'\x20'+_0x1cdc15(_0x23104a['bold'],_0x2b57c5(0x2d4))+_0x2b57c5(0x2da)+_0x14f293[_0x2b57c5(0x1b2)](_0x22a4b9=>_0x1cdc15(_0x23104a['cyan'],_0x22a4b9))[_0x2b57c5(0x1e3)]('\x20\x20'),..._0x4733c3[_0x2b57c5(0x29b)]?[]:['\x20\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x31f)],'✓')+'\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],_0x2b57c5(0x353))+'\x20\x20\x20http://localhost:'+_0x4733c3['port']+_0x2b57c5(0x30e)],'',_0x1cdc15(_0x23104a[_0x2b57c5(0x103)],_0x2b57c5(0x2ec)+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],_0x2b57c5(0x3c6))+_0x2b57c5(0xfb)+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],_0x2b57c5(0x160))+_0x2b57c5(0x167)+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],'exit')+'\x20to\x20quit.'),''][_0x2b57c5(0x1e3)]('\x0a'));}function _0x2fa813(_0x19b9aa){const _0x49b02e=_0x18ab97;console[_0x49b02e(0x126)]('\x0a'+_0x1cdc15(_0x23104a[_0x49b02e(0x395)],'\x20\x20Path\x20access')+'\x20\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x103)],_0x49b02e(0x157))+_0x49b02e(0x108)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],'<path>')+_0x49b02e(0x1a7)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],'<path>')+'\x20'+_0x1cdc15(_0x23104a['yellow'],'<json-body>')+_0x49b02e(0x37e)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],'VERB')+'\x20'+_0x1cdc15(_0x23104a['cyan'],_0x49b02e(0x25b))+'\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x1f4)],_0x49b02e(0x1e4))+_0x49b02e(0x2b7)+_0x1cdc15(_0x23104a[_0x49b02e(0x103)],_0x49b02e(0x2a0))+_0x49b02e(0x134)+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],_0x49b02e(0x363))+_0x49b02e(0x361)+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],_0x49b02e(0x2d4))+_0x49b02e(0x148)+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],_0x49b02e(0x183))+_0x49b02e(0x2bd)+_0x19b9aa[_0x49b02e(0x100)]+_0x49b02e(0x384)+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],'type/users')+'\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/'+_0x19b9aa[_0x49b02e(0x100)]+'/type/users\x0a\x20\x20\x20\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],_0x49b02e(0x29c))+_0x49b02e(0x24b)+_0x19b9aa['env']+_0x49b02e(0x2f4)+_0x1cdc15(_0x23104a['gray'],_0x49b02e(0x3a1))+'\x20→\x20POST\x20/api/env/'+_0x19b9aa[_0x49b02e(0x100)]+_0x49b02e(0x398)+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],_0x49b02e(0x3f5))+_0x49b02e(0x134)+_0x1cdc15(_0x23104a['gray'],_0x49b02e(0x19d))+_0x49b02e(0x134)+_0x1cdc15(_0x23104a['gray'],_0x49b02e(0x1f8))+_0x49b02e(0x1f5)+_0x1cdc15(_0x23104a[_0x49b02e(0x395)],_0x49b02e(0x166))+'\x20\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x103)],_0x49b02e(0x350))+_0x49b02e(0x108)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],_0x49b02e(0x29e))+_0x49b02e(0x2a2)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],_0x49b02e(0x1dd))+_0x49b02e(0x1cb)+_0x1cdc15(_0x23104a['dim'],_0x49b02e(0x2a0))+_0x49b02e(0x134)+_0x1cdc15(_0x23104a['gray'],_0x49b02e(0x186))+_0x49b02e(0x134)+_0x1cdc15(_0x23104a['gray'],_0x49b02e(0x12f))+_0x49b02e(0x134)+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],_0x49b02e(0x1fa))+'\x0a\x0a'+_0x1cdc15(_0x23104a['bold'],_0x49b02e(0x30b))+'\x0a\x0a\x20\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],_0x49b02e(0x3e1))+_0x49b02e(0x27c)+_0x1cdc15(_0x23104a['cyan'],_0x49b02e(0x100))+_0x49b02e(0x3ad)+_0x1cdc15(_0x23104a['cyan'],_0x49b02e(0x160))+'\x20'+_0x1cdc15(_0x23104a['dim'],_0x49b02e(0x237))+_0x49b02e(0x1a5)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],_0x49b02e(0x3a5))+'\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x103)],_0x49b02e(0x236))+_0x49b02e(0x20d)+_0x1cdc15(_0x23104a['cyan'],_0x49b02e(0x36d))+_0x49b02e(0x1f9)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],'help')+_0x49b02e(0x1f7)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],_0x49b02e(0x377))+'\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x103)],'/\x20quit\x20/\x20Ctrl+C')+_0x49b02e(0x1e9));}async function _0x13fed7(_0x5445fb,_0x11528b=0x0){const _0x1d3121=_0x18ab97;process[_0x1d3121(0x209)][_0x1d3121(0x2d9)]('\x0a'),console[_0x1d3121(0x126)](_0x1cdc15(_0x23104a[_0x1d3121(0x1f4)],'\x20\x20[okdb]\x20shutting\x20down…'));try{await _0x5445fb[_0x1d3121(0x199)]();}catch(_0x564b6a){console['error'](_0x1cdc15(_0x23104a[_0x1d3121(0x21b)],'\x20\x20'+_0x564b6a[_0x1d3121(0x10a)]));}process['exit'](_0x11528b);}function _0x2bb8ec(_0x5ac863){const _0x44a21c=_0x18ab97,_0xc20be1=_0x5ac863[_0x44a21c(0x100)]!==_0x44a21c(0x3eb)?_0x1cdc15(_0x23104a[_0x44a21c(0x1f4)],'['+_0x5ac863[_0x44a21c(0x100)]+']'):'';return _0x1cdc15(_0x23104a['bold']+_0x23104a['cyan'],_0x44a21c(0x204))+_0xc20be1+_0x1cdc15(_0x23104a['gray'],'>\x20');}const _0x3df2c4=new Set([_0x18ab97(0x394),_0x18ab97(0x334),'PUT',_0x18ab97(0x213),_0x18ab97(0x146)]);async function _0x189d2b(_0x48e86e,_0x383e55,_0x511d74,_0x4265de,_0x34f038,_0x46501c){const _0x233a1b=_0x18ab97;_0x48e86e=_0x48e86e['trim']();if(!_0x48e86e||_0x48e86e[_0x233a1b(0x13b)]('#'))return;const _0x3bc50a=_0x43484a(_0x48e86e),{flags:_0x2c61e1,rest:_0x15565f}=_0x3a34e7(_0x3bc50a);if(!_0x15565f['length'])return;const _0x1d7d81=_0x15565f[0x0],_0x138f8b=_0x1d7d81[_0x233a1b(0x30a)]();if(_0x138f8b===_0x233a1b(0x14c)){if(_0x15565f[0x1])_0x1f2307(_0x383e55,_0x2b2bd2(_0x15565f[0x1],_0x2c61e1[_0x233a1b(0x100)]??_0x34f038[_0x233a1b(0x100)]));else _0x2fa813(_0x34f038);return;}if(_0x138f8b==='USE'){const _0x31851a=_0x15565f[0x1];if(!_0x31851a){console[_0x233a1b(0x126)](_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],_0x233a1b(0x1ae)));return;}try{_0x383e55[_0x233a1b(0x100)](_0x31851a),_0x34f038[_0x233a1b(0x100)]=_0x31851a,_0x46501c?.[_0x233a1b(0x314)](_0x2bb8ec(_0x34f038)),console[_0x233a1b(0x126)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x31f)],'✓')+_0x233a1b(0x142)+_0x1cdc15(_0x23104a['bold']+_0x23104a[_0x233a1b(0x1fd)],_0x31851a)+'\x0a');}catch{console['log'](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],'✗')+_0x233a1b(0x35c)+_0x1cdc15(_0x23104a[_0x233a1b(0x395)],_0x31851a)+_0x233a1b(0x252)+_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x233a1b(0x34a)));}return;}if(_0x138f8b===_0x233a1b(0x1ed)){const _0x891d92=[..._0x383e55[_0x233a1b(0x2a9)][_0x233a1b(0x2cb)]()][_0x233a1b(0x218)](_0x496be0=>!_0x496be0[_0x233a1b(0x13b)]('~'));console[_0x233a1b(0x126)]('');for(const _0x2ff72d of _0x891d92){const _0x2a0934=_0x2ff72d===_0x34f038[_0x233a1b(0x100)];console[_0x233a1b(0x126)]('\x20\x20'+(_0x2a0934?_0x1cdc15(_0x23104a['green'],'●'):_0x1cdc15(_0x23104a[_0x233a1b(0x103)],'○'))+'\x20\x20'+(_0x2a0934?_0x1cdc15(_0x23104a['bold']+_0x23104a['cyan'],_0x2ff72d):_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x2ff72d)));}console['log'](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x233a1b(0x194))+'\x20'+_0x1cdc15(_0x23104a[_0x233a1b(0x1fd)],_0x34f038[_0x233a1b(0x100)])),console['log']('');return;}if(_0x138f8b===_0x233a1b(0x250)){const _0x2b73ca=[..._0x383e55['_envs']['values']()][_0x233a1b(0x218)](_0x2a9b9c=>!_0x2a9b9c[_0x233a1b(0x33e)]['startsWith']('~'));console[_0x233a1b(0x126)]('');const _0x5d841e=Math[_0x233a1b(0x1e5)](..._0x2b73ca[_0x233a1b(0x1b2)](_0x2eeaf2=>_0x2eeaf2[_0x233a1b(0x33e)][_0x233a1b(0x369)]));for(const _0x542404 of _0x2b73ca){const _0x1f697b=_0x542404[_0x233a1b(0x33e)]===_0x34f038[_0x233a1b(0x100)],_0xc91f39=_0x1f697b?_0x1cdc15(_0x23104a['green'],'●'):_0x1cdc15(_0x23104a[_0x233a1b(0x103)],'○'),_0x3d5d68=_0x1f697b?_0x1cdc15(_0x23104a[_0x233a1b(0x395)]+_0x23104a[_0x233a1b(0x1fd)],_0x542404[_0x233a1b(0x33e)]['padEnd'](_0x5d841e)):_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x542404[_0x233a1b(0x33e)][_0x233a1b(0x18f)](_0x5d841e)),_0x2a8213=[..._0x542404['typeSubDbs'][_0x233a1b(0x2cb)]()][_0x233a1b(0x218)](_0x56a9f5=>!_0x56a9f5[_0x233a1b(0x13b)]('~')),_0x5d5d8e=_0x2a8213[_0x233a1b(0x369)]?_0x1cdc15(_0x23104a['dim'],_0x2a8213[_0x233a1b(0x343)](0x0,0x5)[_0x233a1b(0x1e3)](',\x20')+(_0x2a8213[_0x233a1b(0x369)]>0x5?'\x20\x20+'+(_0x2a8213[_0x233a1b(0x369)]-0x5)+_0x233a1b(0x37a):'')):_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x233a1b(0x240));console[_0x233a1b(0x126)]('\x20\x20'+_0xc91f39+'\x20\x20'+_0x3d5d68+'\x20\x20'+_0x5d5d8e);}console[_0x233a1b(0x126)]('');return;}if(_0x138f8b===_0x233a1b(0x231)){const _0x531c4d=_0x2c61e1[_0x233a1b(0x100)]??_0x15565f[0x1]??_0x34f038[_0x233a1b(0x100)];try{const _0x27f423=_0x383e55['env'](_0x531c4d),_0x24fc2e=[..._0x27f423['typeSubDbs'][_0x233a1b(0x2cb)]()][_0x233a1b(0x218)](_0x375213=>!_0x375213['startsWith']('~'))[_0x233a1b(0x251)]();console[_0x233a1b(0x126)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x24fc2e[_0x233a1b(0x369)]+_0x233a1b(0x2ce)+(_0x24fc2e['length']!==0x1?'s':'')+_0x233a1b(0x2db)+_0x531c4d));for(const _0x2e6ef1 of _0x24fc2e){const _0x558b87=_0x27f423[_0x233a1b(0x16c)][_0x233a1b(0x288)](_0x2e6ef1),_0x26501e=_0x558b87?.[_0x233a1b(0x15e)]?.[_0x233a1b(0x268)]?.()??0x0,_0x14c834=_0x1cdc15(_0x23104a[_0x233a1b(0x395)]+_0x23104a['cyan'],_0x2e6ef1[_0x233a1b(0x18f)](0x1c));console[_0x233a1b(0x126)](_0x233a1b(0x2da)+_0x14c834+'\x20\x20'+_0x1cdc15(_0x23104a[_0x233a1b(0x249)],String(_0x26501e)[_0x233a1b(0x1af)](0x6))+'\x20'+_0x1cdc15(_0x23104a['dim'],_0x233a1b(0x341)));}console[_0x233a1b(0x126)]('');}catch(_0x4bbbfb){console[_0x233a1b(0x33c)](_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],_0x233a1b(0x200)+_0x4bbbfb[_0x233a1b(0x10a)]+'\x0a'));}return;}if(_0x138f8b==='ROUTES'){_0x4a8792(_0x383e55,_0x15565f[_0x233a1b(0x343)](0x1)[_0x233a1b(0x1e3)]('\x20'));return;}if(_0x138f8b==='LOGS'){const _0x30493a=(_0x15565f[0x1]??'')[_0x233a1b(0x11e)]();if(!_0x30493a||_0x30493a==='on')_0x4265de[_0x233a1b(0x263)]=!![],_0x4265de['level']=_0x233a1b(0x363),console[_0x233a1b(0x126)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x31f)],'✓')+'\x20logs\x20on\x20\x20'+_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x233a1b(0x189))+'\x0a');else{if(_0x30493a===_0x233a1b(0x222))_0x4265de[_0x233a1b(0x263)]=![],console[_0x233a1b(0x126)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x1f4)],'○')+_0x233a1b(0x1c7));else _0x596a76[_0x30493a]!==undefined?(_0x4265de[_0x233a1b(0x263)]=!![],_0x4265de[_0x233a1b(0x3df)]=_0x30493a,console[_0x233a1b(0x126)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a['green'],'✓')+_0x233a1b(0x128)+_0x1cdc15(_0x23104a[_0x233a1b(0x395)],_0x30493a)+'\x0a')):console[_0x233a1b(0x33c)](_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],_0x233a1b(0x1fc)));}return;}if(_0x138f8b===_0x233a1b(0x3b5)||_0x138f8b==='QUIT'){await _0x13fed7(_0x383e55,0x0);return;}if(_0x138f8b===_0x233a1b(0x203)){const _0x27be06=_0x233a1b(0x180)+_0x511d74[_0x233a1b(0x1a8)]+_0x233a1b(0x30e),_0x3e8297=process[_0x233a1b(0x1da)]===_0x233a1b(0x19b)?_0x233a1b(0x393)+_0x27be06:process[_0x233a1b(0x1da)]==='darwin'?_0x233a1b(0x2a8)+_0x27be06:_0x233a1b(0x2c2)+_0x27be06;require$$4[_0x233a1b(0x198)](_0x3e8297),console[_0x233a1b(0x126)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x31f)],'✓')+_0x233a1b(0x246)+_0x1cdc15(_0x23104a['cyan'],_0x27be06)+'\x0a');return;}let _0x5ee650,_0x1858f4,_0x397f63;if(_0x3df2c4[_0x233a1b(0x32a)](_0x138f8b)){_0x5ee650=_0x138f8b,_0x1858f4=_0x15565f[0x1],_0x397f63=_0x15565f['slice'](0x2);if(!_0x1858f4){console['error'](_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],_0x233a1b(0x238)+_0x1d7d81+_0x233a1b(0x2df)));return;}}else _0x5ee650=null,_0x1858f4=_0x15565f[0x0],_0x397f63=_0x15565f[_0x233a1b(0x343)](0x1);const _0x4af0cc=_0x2c61e1['env']??_0x34f038[_0x233a1b(0x100)],_0x17eab2=_0x2b2bd2(_0x1858f4,_0x4af0cc);if(_0x2c61e1[_0x233a1b(0x3c6)]){_0x1f2307(_0x383e55,_0x17eab2);return;}let _0x17fa45=null;if(_0x397f63[_0x233a1b(0x369)]){const _0x2abeed=_0x397f63[_0x233a1b(0x1e3)]('\x20');try{_0x17fa45=_0x4bdb26(_0x2abeed);}catch(_0x384a63){console['error'](_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],_0x233a1b(0x18e)+_0x2abeed+'\x0a\x20\x20'+_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x384a63[_0x233a1b(0x10a)])+'\x0a'));return;}}if(!_0x5ee650)_0x5ee650=_0x17fa45!==null?_0x233a1b(0x334):_0x233a1b(0x394);try{const _0x5c689a=await _0x3e3ca1(_0x383e55,_0x5ee650,_0x17eab2,_0x17fa45);_0x1f3cbe(_0x5c689a[_0x233a1b(0x117)],_0x5c689a[_0x233a1b(0x3dc)]);}catch(_0x47f1f5){console[_0x233a1b(0x33c)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],'✗')+'\x20'+_0x47f1f5['message']+'\x0a');}}class _0x21b169{constructor(){const _0x5b056b=_0x18ab97;this[_0x5b056b(0x241)]=new Map(),this['dynamic']=null,this[_0x5b056b(0x269)]=![];}}function _0x38867e(_0x4605d5){const _0x3d9531=_0x18ab97,_0x1a2f77=new _0x21b169();for(const _0x4163b3 of _0x4605d5){if(_0x4163b3[_0x3d9531(0x274)]?.[_0x3d9531(0x178)])continue;const _0x53e9da=_0x4163b3[_0x3d9531(0x217)][_0x3d9531(0x320)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x53e9da)continue;let _0x11977a=_0x1a2f77;for(const _0x61edfa of _0x53e9da['split']('/')[_0x3d9531(0x218)](Boolean)){if(_0x61edfa['startsWith'](':')){const _0x1b625a=_0x61edfa['slice'](0x1);if(!_0x11977a['dynamic'])_0x11977a[_0x3d9531(0x208)]={'param':_0x1b625a,'node':new _0x21b169()};_0x11977a=_0x11977a[_0x3d9531(0x208)][_0x3d9531(0x31c)];}else{if(!_0x11977a[_0x3d9531(0x241)][_0x3d9531(0x32a)](_0x61edfa))_0x11977a['children']['set'](_0x61edfa,new _0x21b169());_0x11977a=_0x11977a[_0x3d9531(0x241)][_0x3d9531(0x288)](_0x61edfa);}}_0x11977a[_0x3d9531(0x269)]=!![];}return _0x1a2f77;}const _0x19cd41=new Map();function _0xbd958(_0x38019e,_0x105e18,_0x55d8d8){const _0x4443e8=_0x18ab97,_0x3096a0=_0x19cd41[_0x4443e8(0x288)](_0x38019e);if(_0x3096a0&&_0x3096a0[_0x4443e8(0x3ec)]>Date['now']())return _0x3096a0[_0x4443e8(0x1ef)];const _0x1f75be=_0x55d8d8();return _0x19cd41[_0x4443e8(0x291)](_0x38019e,{'val':_0x1f75be,'exp':Date['now']()+_0x105e18}),_0x1f75be;}function _0x11f08e(_0x15aee9,_0x418367,_0x51e3be,_0x687e33){const _0x3f9099=_0x18ab97,_0x525b35=_0x418367[_0x3f9099(0x100)]??_0x687e33[_0x3f9099(0x100)];switch(_0x15aee9){case _0x3f9099(0x100):return[..._0x51e3be[_0x3f9099(0x2a9)][_0x3f9099(0x2cb)]()]['filter'](_0x5a5b69=>!_0x5a5b69['startsWith']('~'));case _0x3f9099(0x1d3):return _0xbd958(_0x3f9099(0x38c)+_0x525b35,0x7d0,()=>{const _0x12d494=_0x3f9099;try{return[..._0x51e3be['env'](_0x525b35)[_0x12d494(0x16c)][_0x12d494(0x2cb)]()][_0x12d494(0x218)](_0x26e917=>!_0x26e917[_0x12d494(0x13b)]('~'));}catch{return[];}});case _0x3f9099(0x1ec):if(!_0x418367[_0x3f9099(0x1d3)])return[];return _0xbd958(_0x3f9099(0x2a6)+_0x525b35+':'+_0x418367['type'],0x5dc,()=>{const _0x48f995=_0x3f9099;try{const _0x31eb61=_0x51e3be[_0x48f995(0x100)](_0x525b35)[_0x48f995(0x16c)][_0x48f995(0x288)](_0x418367[_0x48f995(0x1d3)]);if(!_0x31eb61?.[_0x48f995(0x15e)])return[];const _0x295dec=[];for(const {key:_0x273214}of _0x31eb61[_0x48f995(0x15e)][_0x48f995(0x1ff)]({'limit':0x32})){_0x295dec[_0x48f995(0x3c8)](String(_0x273214));if(_0x295dec['length']>=0x32)break;}return _0x295dec;}catch{return[];}});case _0x3f9099(0x30c):if(!_0x418367[_0x3f9099(0x1d3)])return[];return _0xbd958(_0x3f9099(0x2a4)+_0x525b35+':'+_0x418367[_0x3f9099(0x1d3)],0x7d0,()=>{const _0x26dbbc=_0x3f9099;try{const _0x453936=_0x51e3be['env'](_0x525b35)[_0x26dbbc(0x16c)][_0x26dbbc(0x288)](_0x418367[_0x26dbbc(0x1d3)]);return _0x453936?[..._0x453936['indexToDb']?.[_0x26dbbc(0x2cb)]()??[]]:[];}catch{return[];}});case _0x3f9099(0x1e7):if(!_0x418367['type'])return[];return _0xbd958(_0x3f9099(0x1aa)+_0x525b35+':'+_0x418367['type'],0x7d0,()=>{const _0x48b076=_0x3f9099;try{return _0x51e3be[_0x48b076(0x1de)]?.['list']?.(_0x418367[_0x48b076(0x1d3)],_0x51e3be[_0x48b076(0x100)](_0x525b35))?.[_0x48b076(0x1b2)](_0x1d81cb=>_0x1d81cb[_0x48b076(0x33e)])??[];}catch{return[];}});default:return[];}}function _0x17a20c(_0x1b19bc,_0x581afe,_0x1ad547,_0x346dd9){const _0x20a61a=_0x18ab97,_0x5bb0ed=_0x1b19bc[_0x20a61a(0x3b1)]('/'),_0x445e7b=_0x1b19bc[_0x20a61a(0x2ae)]('/'),_0x21643b=_0x5bb0ed?_0x445e7b[_0x20a61a(0x343)](0x0,-0x1):_0x445e7b[_0x20a61a(0x343)](0x0,-0x1),_0x4b3312=_0x5bb0ed?'':_0x445e7b[_0x445e7b[_0x20a61a(0x369)]-0x1];let _0x90854d=_0x581afe;const _0x1b64ec={};for(const _0x8d294a of _0x21643b){if(!_0x8d294a)continue;if(_0x90854d[_0x20a61a(0x241)][_0x20a61a(0x32a)](_0x8d294a))_0x90854d=_0x90854d[_0x20a61a(0x241)][_0x20a61a(0x288)](_0x8d294a);else{if(_0x90854d[_0x20a61a(0x208)])_0x1b64ec[_0x90854d[_0x20a61a(0x208)][_0x20a61a(0x3b0)]]=_0x8d294a,_0x90854d=_0x90854d[_0x20a61a(0x208)][_0x20a61a(0x31c)];else return[];}}const _0x100942=_0x21643b[_0x20a61a(0x218)](Boolean),_0x53e688=_0x100942[_0x20a61a(0x369)]?_0x100942[_0x20a61a(0x1e3)]('/')+'/':'',_0x269098=[];for(const [_0x5eff40]of _0x90854d['children']){if(_0x5eff40[_0x20a61a(0x13b)](_0x4b3312))_0x269098['push'](_0x53e688+_0x5eff40);}if(_0x90854d[_0x20a61a(0x208)])for(const _0x3f22b9 of _0x11f08e(_0x90854d[_0x20a61a(0x208)][_0x20a61a(0x3b0)],_0x1b64ec,_0x1ad547,_0x346dd9)){if(String(_0x3f22b9)[_0x20a61a(0x13b)](_0x4b3312))_0x269098[_0x20a61a(0x3c8)](_0x53e688+_0x3f22b9);}return _0x269098[_0x20a61a(0x343)](0x0,0x64);}const _0xf07045=['help',_0x18ab97(0x12a),_0x18ab97(0x100),_0x18ab97(0x2d4),_0x18ab97(0x183),_0x18ab97(0x160),_0x18ab97(0x3a5),'open',_0x18ab97(0x377),_0x18ab97(0x1ad)];function _0x326a3e(_0x14026a,_0x1261f7,_0x36ca29){return function _0x27f7e2(_0x1d427d){const _0x53bab4=_0x6e57;try{const _0x65a5ec=_0x1d427d[_0x53bab4(0x292)](/\s[{[]/),_0x3785f6=_0x65a5ec>=0x0?_0x1d427d[_0x53bab4(0x343)](0x0,_0x65a5ec):_0x1d427d,_0x351778=_0x3785f6[_0x53bab4(0x392)]();if(!_0x351778){const _0x54a3dd=[..._0xf07045,...[..._0x14026a[_0x53bab4(0x241)][_0x53bab4(0x2cb)]()]][_0x53bab4(0x343)](0x0,0x64);return[_0x54a3dd,''];}const _0x2d50ab=_0x351778[_0x53bab4(0x2ae)](/\s+/),_0x42d88d=_0x2d50ab[0x0],_0x2c67c4=_0x42d88d[_0x53bab4(0x30a)]();if(_0x2d50ab[_0x53bab4(0x369)]===0x1){const _0x17048a=_0x42d88d[_0x53bab4(0x11e)](),_0x23552c=_0xf07045[_0x53bab4(0x218)](_0x487cac=>_0x487cac[_0x53bab4(0x13b)](_0x17048a)),_0x5a0d6d=_0x17a20c(_0x42d88d,_0x14026a,_0x1261f7,_0x36ca29),_0x3bae3c=[...new Set([..._0x23552c,..._0x5a0d6d])]['slice'](0x0,0x64);return[_0x3bae3c,_0x42d88d];}if(_0x3df2c4[_0x53bab4(0x32a)](_0x2c67c4)&&_0x2d50ab[_0x53bab4(0x369)]===0x2){const _0x159b3e=_0x2d50ab[0x1],_0x21f159=_0x17a20c(_0x159b3e,_0x14026a,_0x1261f7,_0x36ca29);return[_0x21f159[_0x53bab4(0x1b2)](_0x44a535=>_0x42d88d+'\x20'+_0x44a535),_0x42d88d+'\x20'+_0x159b3e];}if(!_0x3df2c4[_0x53bab4(0x32a)](_0x2c67c4)&&_0x2d50ab['length']>0x1){const _0x2d7c03=_0x17a20c(_0x42d88d,_0x14026a,_0x1261f7,_0x36ca29),_0xe37042='\x20'+_0x2d50ab[_0x53bab4(0x343)](0x1)[_0x53bab4(0x1e3)]('\x20');return[_0x2d7c03[_0x53bab4(0x1b2)](_0x39f4a0=>_0x39f4a0+_0xe37042),_0x42d88d+_0xe37042];}return[[],_0x1d427d];}catch{return[[],_0x1d427d];}};}async function _0x1c1228(_0x44789c,_0x3038df){const _0x1631fd=_0x18ab97,_0x28b2a0={'enabled':!![],'level':_0x3038df[_0x1631fd(0x354)]??_0x1631fd(0x363)},_0x30c06f={'env':'default'},_0x1b3755={'current':null},_0x4ea907=_0x38867e(_0x44789c[_0x1631fd(0x3e2)]['listRoutes']()),_0x18ed32=_0x326a3e(_0x4ea907,_0x44789c,_0x30c06f);_0x44789c[_0x1631fd(0x126)]['attach'](_0x3c81c7=>{const _0xc7aef1=_0x1631fd;if(!_0x28b2a0[_0xc7aef1(0x263)])return;_0x2d3514(_0x3c81c7,_0x28b2a0['level']),_0x1b3755[_0xc7aef1(0x24d)]?.[_0xc7aef1(0x3e5)](!![]);}),_0x1ec145(_0x44789c,_0x3038df);const _0x581089=_0x1ab16c[_0x1631fd(0x15a)]({'input':process['stdin'],'output':process['stdout'],'terminal':!![],'completer':_0x18ed32,'prompt':_0x2bb8ec(_0x30c06f),'historySize':_0x3966e7});try{const _0x589026=_0x22b295[_0x1631fd(0x277)](_0x5ddc9e,'utf8')[_0x1631fd(0x2ae)]('\x0a')[_0x1631fd(0x218)](Boolean);_0x581089[_0x1631fd(0x2fa)]=_0x589026[_0x1631fd(0x22a)]()[_0x1631fd(0x343)](0x0,_0x3966e7);}catch{}return _0x1b3755[_0x1631fd(0x24d)]=_0x581089,_0x581089['on'](_0x1631fd(0x1b4),async _0x1bb07b=>{const _0x37a10f=_0x1631fd;_0x581089[_0x37a10f(0x28e)]();try{await _0x189d2b(_0x1bb07b,_0x44789c,_0x3038df,_0x28b2a0,_0x30c06f,_0x581089);}catch(_0x486cc2){console['error'](_0x1cdc15(_0x23104a[_0x37a10f(0x21b)],_0x37a10f(0x365)+_0x486cc2[_0x37a10f(0x10a)]));}finally{_0x581089['resume'](),_0x581089[_0x37a10f(0x3e5)]();}}),_0x581089['on'](_0x1631fd(0x199),()=>{const _0x17a76f=_0x1631fd;try{const _0x17630e=[..._0x581089[_0x17a76f(0x2fa)]][_0x17a76f(0x22a)]()[_0x17a76f(0x218)](Boolean)[_0x17a76f(0x343)](0x0,_0x3966e7);_0x22b295[_0x17a76f(0x34d)](_0x5ddc9e,_0x17630e['join']('\x0a')+'\x0a');}catch{}_0x13fed7(_0x44789c,0x0);}),process['on'](_0x1631fd(0x355),()=>{const _0x4430e9=_0x1631fd;if(_0x581089['line']==='')_0x13fed7(_0x44789c,0x0);else process[_0x4430e9(0x209)][_0x4430e9(0x2d9)]('\x0a'),_0x581089[_0x4430e9(0x155)](0x0),_0x581089['prompt']();}),process['on'](_0x1631fd(0x2e8),()=>_0x13fed7(_0x44789c,0x0)),_0x581089[_0x1631fd(0x3e5)](),_0x581089;}return okdbShell={'start':_0x1c1228,'colorLog':_0x2d3514,'lenientParse':_0x4bdb26,'_splitLine':_0x43484a,'_formatRouteHelpLines':_0x14fc66,'_routeSummary':_0x210a22,'_routeTags':_0x270c7c},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x45586a=_0x3f2430;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x45586a(0x2e5)]();}catch{}const _0x170f48=require$$1$1,_0x465e48=require$$1;function _0x2f33be(_0x3ce0b3){const _0x35430e=_0x45586a,_0xce32=_0x3ce0b3['slice'](0x2),_0x2ffa13={};let _0x6834a2=0x0;while(_0x6834a2<_0xce32['length']){const _0xc6c0f7=_0xce32[_0x6834a2];if(_0xc6c0f7===_0x35430e(0x2b1)||_0xc6c0f7==='-p')_0x2ffa13[_0x35430e(0x1a8)]=Number(_0xce32[++_0x6834a2]);else{if(_0xc6c0f7===_0x35430e(0x151)||_0xc6c0f7==='-d')_0x2ffa13['path']=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x381)||_0xc6c0f7==='-k')_0x2ffa13['key']=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x2ca)||_0xc6c0f7==='-c')_0x2ffa13[_0x35430e(0x3a6)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x193))_0x2ffa13[_0x35430e(0x354)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x359))_0x2ffa13[_0x35430e(0x2f8)]=!![];else{if(_0xc6c0f7===_0x35430e(0x16e))_0x2ffa13[_0x35430e(0x29b)]=!![];else{if(_0xc6c0f7==='--env'||_0xc6c0f7==='-e')_0x2ffa13[_0x35430e(0x100)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x25e))_0x2ffa13[_0x35430e(0x183)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x1c2))_0x2ffa13[_0x35430e(0x330)]=!![];else{if(_0xc6c0f7===_0x35430e(0x1c0))_0x2ffa13['blobs']=!![];else{if(_0xc6c0f7===_0x35430e(0x3f6))_0x2ffa13[_0x35430e(0x248)]=!![];else{if(_0xc6c0f7===_0x35430e(0x27e)){const _0x200f06=[];while(_0x6834a2+0x1<_0xce32[_0x35430e(0x369)]&&!_0xce32[_0x6834a2+0x1][_0x35430e(0x13b)]('--')){_0x200f06[_0x35430e(0x3c8)](_0xce32[++_0x6834a2]);}_0x2ffa13[_0x35430e(0x36d)]=_0x200f06[_0x35430e(0x369)]>0x0?_0x200f06:!![];}else{if(_0xc6c0f7==='--log-requests')_0x2ffa13[_0x35430e(0x30f)]=!![];else{if(_0xc6c0f7===_0x35430e(0x15c))_0x2ffa13['name']=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x18b))_0x2ffa13[_0x35430e(0x2c4)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x1b3))_0x2ffa13[_0x35430e(0x152)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x161))_0x2ffa13[_0x35430e(0x176)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x33f))_0x2ffa13[_0x35430e(0x20a)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x2c5))_0x2ffa13[_0x35430e(0x215)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7==='--token')_0x2ffa13[_0x35430e(0x396)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x2d3)||_0xc6c0f7==='-u')_0x2ffa13[_0x35430e(0x137)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x367))_0x2ffa13[_0x35430e(0x3de)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x32b)||_0xc6c0f7==='-v'){const _0x45b322=require$$2;console[_0x35430e(0x126)](_0x45b322['version']),process[_0x35430e(0x377)](0x0);}else(_0xc6c0f7===_0x35430e(0x1dd)||_0xc6c0f7==='-h')&&(_0xc29876(),process[_0x35430e(0x377)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x6834a2++;}return _0x2ffa13;}function _0xc29876(){const _0x10541d=_0x45586a;console[_0x10541d(0x126)](_0x10541d(0x11d));}const _0x5561cc=new Set([_0x45586a(0x24e),_0x45586a(0x363),_0x45586a(0x3e0),_0x45586a(0x33c)]);function _0x2bdfc3(_0x3dd0d0){const _0x542852=_0x45586a,_0x396143=_0x3dd0d0[_0x542852(0x3a6)]?_0x170f48[_0x542852(0x132)](_0x3dd0d0['config']):_0x170f48[_0x542852(0x132)](_0x542852(0x11a));let _0x5befe6={};if(_0x465e48[_0x542852(0x1ac)](_0x396143))try{const _0x6f89a7=_0x465e48[_0x542852(0x277)](_0x396143,_0x542852(0x25d))[_0x542852(0x320)](/^\uFEFF/,'');_0x5befe6=JSON['parse'](_0x6f89a7),console[_0x542852(0x126)](_0x542852(0x1fe)+_0x396143);}catch(_0x37dadd){console[_0x542852(0x33c)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x396143+':\x20'+_0x37dadd[_0x542852(0x10a)]),process[_0x542852(0x377)](0x1);}const _0x3f3126={'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},_0x57b0db={'port':_0x3dd0d0[_0x542852(0x1a8)]??_0x5befe6['port']??_0x3f3126['port']??0x2124,'dbPath':_0x3dd0d0[_0x542852(0x217)]??_0x5befe6[_0x542852(0x217)]??_0x3f3126[_0x542852(0x217)]??'./okdb-data','key':_0x3dd0d0[_0x542852(0x1ec)]??_0x5befe6[_0x542852(0x1ec)]??_0x3f3126[_0x542852(0x1ec)]??undefined,'logLevel':_0x3dd0d0['logLevel']??_0x5befe6[_0x542852(0x354)]??_0x3f3126['logLevel']??'info','noRepl':_0x3dd0d0['noRepl']??_0x5befe6[_0x542852(0x2f8)]??_0x3f3126[_0x542852(0x2f8)]??![],'noAdmin':_0x3dd0d0['noAdmin']??_0x5befe6[_0x542852(0x29b)]??_0x3f3126[_0x542852(0x29b)]??![],'admin':_0x5befe6[_0x542852(0x353)]??{},'api':_0x5befe6[_0x542852(0x348)]??undefined,'auth':_0x5befe6[_0x542852(0x38e)]??undefined,'mcp':_0x5befe6[_0x542852(0x2c8)]??undefined,'timeMachine':_0x5befe6[_0x542852(0x21e)]!==![]?_0x5befe6['timeMachine']??{}:![]};return _0x3dd0d0['open']!==undefined&&(_0x57b0db['auth']=_0x57b0db[_0x542852(0x38e)]||{},_0x57b0db[_0x542852(0x38e)][_0x542852(0x36d)]=_0x3dd0d0[_0x542852(0x36d)]),_0x3dd0d0[_0x542852(0x30f)]&&(_0x57b0db[_0x542852(0x24e)]=_0x57b0db[_0x542852(0x24e)]||{},_0x57b0db[_0x542852(0x24e)][_0x542852(0x30f)]=!![]),(!Number[_0x542852(0x22d)](_0x57b0db['port'])||_0x57b0db[_0x542852(0x1a8)]<0x1||_0x57b0db[_0x542852(0x1a8)]>0xffff)&&(console['error'](_0x542852(0x2e9)+_0x57b0db[_0x542852(0x1a8)]+'\x20(must\x20be\x201–65535)'),process[_0x542852(0x377)](0x1)),!_0x5561cc[_0x542852(0x32a)](_0x57b0db[_0x542852(0x354)])&&(console['error']('[okdb]\x20invalid\x20log\x20level:\x20\x22'+_0x57b0db[_0x542852(0x354)]+_0x542852(0x255)),process[_0x542852(0x377)](0x1)),_0x57b0db;}function _0x3b22c0(_0x6f6c15){const _0x26c31a=_0x45586a;return!!(_0x6f6c15&&typeof _0x6f6c15===_0x26c31a(0x32d)&&!Array[_0x26c31a(0x18c)](_0x6f6c15)&&Object[_0x26c31a(0x2cb)](_0x6f6c15)[_0x26c31a(0x369)]>0x0);}const _0x16fd10=!process[_0x45586a(0x209)]['isTTY']||!!process.env.NO_COLOR;function _0x78fc88(_0x441c7b,_0xbb1b97){return _0x16fd10?_0xbb1b97:'\x1b['+_0x441c7b+'m'+_0xbb1b97+'\x1b[0m';}function _0x30eb13(_0x2ee51a){const _0x41a7c9=_0x45586a;if(!_0x2ee51a||_0x2ee51a[_0x41a7c9(0x369)]===0x0)return;const _0x2b32b9='─'[_0x41a7c9(0x325)](0x38);process[_0x41a7c9(0x317)][_0x41a7c9(0x2d9)]('\x0a'),process['stderr'][_0x41a7c9(0x2d9)](_0x78fc88('33',_0x41a7c9(0x39f)+_0x2ee51a[_0x41a7c9(0x369)]+'\x20SECURITY\x20NOTICE'+(_0x2ee51a[_0x41a7c9(0x369)]>0x1?'S':'')+'\x0a')),process[_0x41a7c9(0x317)][_0x41a7c9(0x2d9)]('\x20\x20'+_0x2b32b9+'\x0a');for(const _0x41802a of _0x2ee51a){const _0x1cdc36=_0x41802a[_0x41a7c9(0x3df)]===_0x41a7c9(0x33c)?_0x78fc88('31',_0x41a7c9(0x3a9)):_0x78fc88('33',_0x41a7c9(0x14b));process[_0x41a7c9(0x317)][_0x41a7c9(0x2d9)](_0x1cdc36+'\x20\x20'+_0x78fc88('1',_0x41802a['title'])+'\x0a'),process['stderr']['write'](_0x41a7c9(0x3cb)+_0x41802a[_0x41a7c9(0x10a)]+'\x0a');if(_0x41802a['hint'])process['stderr']['write']('\x20\x20\x20\x20\x20\x20\x20'+_0x78fc88('2',_0x41a7c9(0x2f5)+_0x41802a[_0x41a7c9(0x371)])+'\x0a');process['stderr'][_0x41a7c9(0x2d9)]('\x0a');}process[_0x41a7c9(0x317)][_0x41a7c9(0x2d9)]('\x20\x20'+_0x2b32b9+'\x0a\x0a');}function _0x2e8ce7(_0xb25959,_0x594b04){const _0x56cf08=_0xb25959['http']['listen'](_0x594b04);return new Promise((_0x2d8f87,_0x471fd3)=>{const _0x37c599=_0x6e57;_0x56cf08[_0x37c599(0x190)](_0x37c599(0x3f1),_0x2d8f87),_0x56cf08[_0x37c599(0x190)](_0x37c599(0x33c),_0x471fd3);});}async function _0x4d4079(_0x2e3c15){const _0x43ce09=_0x45586a,_0x196de9=require$$3;console[_0x43ce09(0x126)](_0x43ce09(0x1db));let _0x586676=!![];const _0x423afe=(_0x459991,_0x2d8dfe)=>{const _0x23055e=_0x43ce09;console[_0x23055e(0x126)]('\x20\x20'+(_0x459991?'✓':'✗')+'\x20'+_0x2d8dfe);if(!_0x459991)_0x586676=![];},_0x4ee5e6=Number(process[_0x43ce09(0x1d4)][_0x43ce09(0x320)]('v','')['split']('.')[0x0]);_0x423afe(_0x4ee5e6>=0x12,_0x43ce09(0x136)+process['version']+(_0x4ee5e6<0x12?_0x43ce09(0x3cd):''));const _0x421e51=_0x170f48['resolve'](_0x2e3c15[_0x43ce09(0x29f)]);try{_0x465e48[_0x43ce09(0x375)](_0x421e51,{'recursive':!![]});const _0xbf2234=_0x170f48[_0x43ce09(0x1e3)](_0x421e51,'.okdb-write-test');_0x465e48[_0x43ce09(0x34d)](_0xbf2234,''),_0x465e48[_0x43ce09(0x10b)](_0xbf2234),_0x423afe(!![],_0x43ce09(0x3ab)+_0x421e51);}catch(_0x51884a){_0x423afe(![],_0x43ce09(0x177)+_0x421e51+'\x20\x20('+_0x51884a['message']+')');}const _0x4f4e3d=await new Promise(_0xf38399=>{const _0x23fe24=_0x43ce09,_0x5b10d4=_0x196de9['createServer']();_0x5b10d4[_0x23fe24(0x190)](_0x23fe24(0x33c),()=>_0xf38399(![])),_0x5b10d4[_0x23fe24(0x190)](_0x23fe24(0x3f1),()=>{const _0x3b6d4d=_0x23fe24;_0x5b10d4[_0x3b6d4d(0x199)](),_0xf38399(!![]);}),_0x5b10d4[_0x23fe24(0x3a4)](_0x2e3c15[_0x23fe24(0x1a8)],_0x23fe24(0x13f));});_0x423afe(_0x4f4e3d,'port\x20'+_0x2e3c15['port']+'\x20'+(_0x4f4e3d?'available':_0x43ce09(0x196)));const _0x26fd67=_0x170f48[_0x43ce09(0x132)](_0x43ce09(0x11a));if(_0x465e48['existsSync'](_0x26fd67))try{JSON['parse'](_0x465e48['readFileSync'](_0x26fd67,_0x43ce09(0x25d))[_0x43ce09(0x320)](/^\uFEFF/,'')),_0x423afe(!![],_0x43ce09(0x253)+_0x26fd67);}catch(_0x36e462){_0x423afe(![],_0x43ce09(0x2b8)+_0x36e462[_0x43ce09(0x10a)]);}else _0x423afe(!![],'no\x20.kdbconfig\x20(using\x20defaults)');console['log'](''),_0x586676?console[_0x43ce09(0x126)](_0x43ce09(0x20e)):(console['log']('\x20\x20Some\x20checks\x20failed.\x0a'),process[_0x43ce09(0x377)](0x1));}async function _0x321815(){const _0x25dfec=_0x45586a,_0x3ad6f9=_0x170f48['resolve']('.kdbconfig');!_0x465e48[_0x25dfec(0x1ac)](_0x3ad6f9)?(_0x465e48[_0x25dfec(0x34d)](_0x3ad6f9,JSON['stringify']({'port':0x2124,'path':_0x25dfec(0x3d2),'logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x25dfec(0x126)](_0x25dfec(0x25f))):console[_0x25dfec(0x126)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x39432d=_0x170f48['resolve'](_0x25dfec(0x3d2));!_0x465e48[_0x25dfec(0x1ac)](_0x39432d)?(_0x465e48[_0x25dfec(0x375)](_0x39432d,{'recursive':!![]}),console[_0x25dfec(0x126)]('[okdb]\x20created\x20./okdb-data')):console['log']('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x25dfec(0x126)](_0x25dfec(0x36b));}async function _0xca7103(_0x4cb8f1){const _0x142f63=_0x45586a,_0x68a54d=_0x170f48[_0x142f63(0x132)](_0x4cb8f1['dbPath']);if(!_0x465e48[_0x142f63(0x1ac)](_0x68a54d)){console['log']('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x68a54d+'\x20does\x20not\x20exist');return;}const _0x48b9a5=require$$0$2,_0x1d8a4b=_0x48b9a5['createInterface']({'input':process[_0x142f63(0x3dd)],'output':process['stdout']}),_0x1367a4=await new Promise(_0x2a55cd=>_0x1d8a4b[_0x142f63(0x29a)](_0x142f63(0x342)+_0x68a54d+_0x142f63(0x3ce),_0x2a55cd));_0x1d8a4b[_0x142f63(0x199)](),console['log']('');if(_0x1367a4[_0x142f63(0x201)]()[_0x142f63(0x11e)]()!==_0x142f63(0x23e)){console[_0x142f63(0x126)](_0x142f63(0x226));return;}_0x465e48[_0x142f63(0x322)](_0x68a54d,{'recursive':!![],'force':!![]}),console['log'](_0x142f63(0x13d)+_0x68a54d+_0x142f63(0x187));}async function _0x51a49e(_0x5b65e8,_0x1ce396){const _0x15a26a=_0x45586a,_0x33207d=require$$5,_0x3e02c4=_0x170f48[_0x15a26a(0x132)](_0x1ce396['dbPath']);console[_0x15a26a(0x126)](_0x15a26a(0x123)+_0x3e02c4+'…');const _0x59b3da=new _0x33207d(_0x3e02c4,_0x1ce396[_0x15a26a(0x1ec)]?{'encryptionKey':_0x1ce396['key']}:{});await _0x59b3da[_0x15a26a(0x36d)](),console[_0x15a26a(0x126)](_0x15a26a(0x275)+_0x5b65e8+'…');const {envs:_0x71a13d}=await _0x59b3da[_0x15a26a(0x1b0)][_0x15a26a(0x188)](_0x5b65e8);for(const _0xf8991b of _0x71a13d){const _0x138c0b=_0xf8991b['sizeBefore']>0x0?'\x20\x20('+(_0xf8991b[_0x15a26a(0x21d)]/0x400/0x400)[_0x15a26a(0x1e0)](0x2)+_0x15a26a(0x344)+(_0xf8991b[_0x15a26a(0x2d6)]/0x400/0x400)[_0x15a26a(0x1e0)](0x2)+_0x15a26a(0x3e3):'';console[_0x15a26a(0x126)](_0x15a26a(0x14d)+_0xf8991b[_0x15a26a(0x33e)]+_0x15a26a(0x1a4)+_0xf8991b['dest']+_0x138c0b);}await _0x59b3da[_0x15a26a(0x199)](),console[_0x15a26a(0x126)]('[okdb]\x20backup\x20complete');}async function _0xd44625(_0x12d847,_0x118c89,_0x1f12f8){const _0x430178=_0x45586a,_0x35a4dd=require$$5,_0x288e0f=_0x170f48[_0x430178(0x132)](_0x118c89[_0x430178(0x29f)]),_0x3d4f08=_0x1f12f8[_0x430178(0x100)]??'default',_0x9e5783=_0x1f12f8[_0x430178(0x183)]?_0x1f12f8[_0x430178(0x183)][_0x430178(0x2ae)](',')[_0x430178(0x1b2)](_0x32bb42=>_0x32bb42[_0x430178(0x201)]()):null;console[_0x430178(0x126)](_0x430178(0x123)+_0x288e0f+'…');const _0x3bb4c3=new _0x35a4dd(_0x288e0f,_0x118c89[_0x430178(0x1ec)]?{'encryptionKey':_0x118c89[_0x430178(0x1ec)]}:{});await _0x3bb4c3[_0x430178(0x36d)](),console[_0x430178(0x126)]('[okdb]\x20exporting\x20env\x20\x22'+_0x3d4f08+_0x430178(0x195)+_0x12d847+'…');const _0x35d641=await _0x3bb4c3[_0x430178(0x1b0)][_0x430178(0x3b3)](_0x12d847,{'envName':_0x3d4f08,'types':_0x9e5783,'includeChanges':!!_0x1f12f8['changes']});console[_0x430178(0x126)](_0x430178(0x346)+_0x35d641[_0x430178(0x183)]+'\x20\x20records='+_0x35d641['records']+_0x430178(0x32f)+_0x35d641['changes']);if(_0x1f12f8[_0x430178(0x318)]){const _0x77041d=_0x170f48[_0x430178(0x1e3)](_0x170f48[_0x430178(0x284)](_0x12d847),'blobs');process[_0x430178(0x209)]['write'](_0x430178(0x3c7));const {count:_0x23ef3d,bytes:_0x46938c}=await _0x3bb4c3[_0x430178(0x1b0)]['exportBlobs'](_0x77041d);console[_0x430178(0x126)](_0x430178(0x2ea)+_0x77041d+_0x430178(0x285)+_0x23ef3d+'\x20file'+(_0x23ef3d!==0x1?'s':'')+',\x20'+(_0x46938c/0x400/0x400)[_0x430178(0x1e0)](0x2)+'\x20MB)');}await _0x3bb4c3[_0x430178(0x199)](),console['log']('[okdb]\x20export\x20complete');}async function _0x14dd19(_0x5a25d5,_0x5e2bdf,_0x55538b){const _0x282399=_0x45586a,_0x349230=require$$5,_0x272a87=_0x170f48['resolve'](_0x5e2bdf['dbPath']),_0x21c6e8=_0x55538b[_0x282399(0x100)]??null,_0x1f4031=_0x55538b['types']?_0x55538b[_0x282399(0x183)][_0x282399(0x2ae)](',')[_0x282399(0x1b2)](_0x52ef2b=>_0x52ef2b[_0x282399(0x201)]()):null,_0xa23dd2=!!_0x55538b[_0x282399(0x248)];console[_0x282399(0x126)](_0x282399(0x123)+_0x272a87+'…');const _0x558c37=new _0x349230(_0x272a87,_0x5e2bdf['key']?{'encryptionKey':_0x5e2bdf['key']}:{});await _0x558c37[_0x282399(0x36d)](),console[_0x282399(0x126)](_0x282399(0x358)+_0x5a25d5+'…');const _0x217740=await _0x558c37[_0x282399(0x1b0)][_0x282399(0x1bd)](_0x5a25d5,{'envName':_0x21c6e8,'types':_0x1f4031,'dropExisting':_0xa23dd2,'includeChanges':!!_0x55538b[_0x282399(0x330)],'onProgress':({type:_0x3768b8,count:_0x17e567})=>{const _0xb9d21e=_0x282399;process['stdout'][_0xb9d21e(0x2d9)](_0xb9d21e(0x28a)+_0x3768b8+':\x20'+_0x17e567+_0xb9d21e(0x175));}});process['stdout'][_0x282399(0x2d9)]('\x0a'),console['log']('[okdb]\x20imported\x20\x20types='+_0x217740[_0x282399(0x183)]+_0x282399(0x1ba)+_0x217740[_0x282399(0x341)]+_0x282399(0x32f)+_0x217740[_0x282399(0x330)]);if(_0x55538b[_0x282399(0x318)]){const _0x5ed52f=_0x170f48[_0x282399(0x1e3)](_0x170f48[_0x282399(0x284)](_0x5a25d5),_0x282399(0x318));if(_0x465e48['existsSync'](_0x5ed52f)){const {imported:_0xe07339,skipped:_0xfdcd25}=await _0x558c37['migrate'][_0x282399(0x1f2)](_0x5ed52f);console[_0x282399(0x126)]('[okdb]\x20blobs:\x20imported='+_0xe07339+_0x282399(0x304)+_0xfdcd25);}}await _0x558c37[_0x282399(0x199)](),console[_0x282399(0x126)](_0x282399(0x15f));}async function _0x5a8a9e(_0x2651f8,_0x39328f){const _0x183ec6=_0x45586a;_0x39328f[_0x183ec6(0x2c4)]&&!_0x39328f[_0x183ec6(0x33e)]&&(console[_0x183ec6(0x33c)]('[okdb]\x20error:\x20--password\x20requires\x20--name'),process[_0x183ec6(0x377)](0x1));const _0x24569f=_0x39328f[_0x183ec6(0x176)]?_0x39328f[_0x183ec6(0x176)][_0x183ec6(0x2ae)](',')[_0x183ec6(0x1b2)](_0x11422e=>_0x11422e['trim']())['filter'](Boolean):[];let _0x47126e={};if(_0x39328f[_0x183ec6(0x20a)])try{_0x47126e=JSON[_0x183ec6(0x11b)](_0x39328f['grants']);if(typeof _0x47126e!==_0x183ec6(0x32d)||Array[_0x183ec6(0x18c)](_0x47126e)||_0x47126e===null)throw new Error();}catch{console['error'](_0x183ec6(0x16a)),process[_0x183ec6(0x377)](0x1);}const _0x5c23af=require$$5,{randomToken:_0x4b487d,hashToken:_0x141d6e,hashPassword:_0x2e6885}=requireOkdbAuthTokens(),_0x5138a6=require$$0,_0x1a9156=_0x170f48[_0x183ec6(0x132)](_0x2651f8[_0x183ec6(0x29f)]),_0x4fbb5f=new _0x5c23af(_0x1a9156,_0x2651f8[_0x183ec6(0x1ec)]?{'encryptionKey':_0x2651f8[_0x183ec6(0x1ec)]}:{});await _0x4fbb5f[_0x183ec6(0x36d)]();try{await _0x4fbb5f[_0x183ec6(0x38e)][_0x183ec6(0x18a)]();if(_0x39328f[_0x183ec6(0x33e)]){const _0x117039=await _0x4fbb5f[_0x183ec6(0x38e)][_0x183ec6(0x382)](_0x39328f['name']);_0x117039&&(console[_0x183ec6(0x33c)]('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x39328f[_0x183ec6(0x33e)]+_0x183ec6(0x2e6)),process['exit'](0x1));}const _0x2704af=_0x4b487d(0x20),_0x8e5fba=_0x141d6e(_0x2704af),_0x238bdc=_0x39328f[_0x183ec6(0x2c4)]?await _0x2e6885(_0x39328f[_0x183ec6(0x2c4)]):null,_0x42d311=_0x5138a6['randomUUID'](),_0x19c204={'tokenHash':_0x8e5fba,'name':_0x39328f[_0x183ec6(0x33e)]||null,'passwordHash':_0x238bdc,'label':_0x39328f[_0x183ec6(0x152)]||null,'permissions':_0x24569f,'grants':_0x47126e,'createdAt':Date[_0x183ec6(0x1c3)](),'lastUsedAt':null},_0x1a9907=_0x39328f[_0x183ec6(0x215)]?{'ttl':Number(_0x39328f[_0x183ec6(0x215)])}:undefined;await _0x4fbb5f[_0x183ec6(0x129)][_0x183ec6(0x352)](_0x183ec6(0x127),_0x42d311,_0x19c204,_0x1a9907),console['log']('\x0a\x20\x20✓\x20Token\x20created'),console[_0x183ec6(0x126)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x42d311),console[_0x183ec6(0x126)](_0x183ec6(0x267)+(_0x39328f[_0x183ec6(0x33e)]||_0x183ec6(0x2a1))),console[_0x183ec6(0x126)](_0x183ec6(0x272)+(_0x39328f[_0x183ec6(0x152)]||'(unset)')),console[_0x183ec6(0x126)](_0x183ec6(0x34b)+(_0x24569f[_0x183ec6(0x1e3)](',\x20')||_0x183ec6(0x329))),console[_0x183ec6(0x126)](_0x183ec6(0x1bf)),console[_0x183ec6(0x126)](_0x183ec6(0x2da)+_0x2704af+'\x0a');}finally{await _0x4fbb5f[_0x183ec6(0x199)]();}}async function _0x516630(_0x1b2f75){const _0x484b71=_0x45586a,_0x12fc25=require$$5,_0x31d324=_0x170f48[_0x484b71(0x132)](_0x1b2f75[_0x484b71(0x29f)]),_0x36bfb9=new _0x12fc25(_0x31d324,_0x1b2f75[_0x484b71(0x1ec)]?{'encryptionKey':_0x1b2f75[_0x484b71(0x1ec)]}:{});await _0x36bfb9['open']();try{const _0x1a0359=_0x36bfb9['_systemEnv'];if(!_0x1a0359||!_0x1a0359[_0x484b71(0x228)]('~tokens')){console['log'](_0x484b71(0x31d));return;}const _0x4401cb=[];for(const {key:_0x3b928c,value:_0xce3a18}of _0x1a0359[_0x484b71(0x1ff)]('~tokens')){_0x4401cb[_0x484b71(0x3c8)]({'id':_0x3b928c,'name':_0xce3a18[_0x484b71(0x33e)]||_0x484b71(0x2a1),'label':_0xce3a18[_0x484b71(0x152)]||_0x484b71(0x2a1),'permissions':Array[_0x484b71(0x18c)](_0xce3a18[_0x484b71(0x176)])?_0xce3a18[_0x484b71(0x176)]['join'](','):'','created':_0xce3a18[_0x484b71(0x169)]?new Date(_0xce3a18[_0x484b71(0x169)])[_0x484b71(0x23b)]()[_0x484b71(0x343)](0x0,0xa):''});}if(_0x4401cb[_0x484b71(0x369)]===0x0){console['log'](_0x484b71(0x31d));return;}const _0x110d05=!process[_0x484b71(0x209)]['columns']||process[_0x484b71(0x209)][_0x484b71(0x1d0)]>=0x64,_0x531b8c=_0x110d05?0x24:0xa,_0x15cfcf=['ID'['padEnd'](_0x531b8c),_0x484b71(0x380)['padEnd'](0x10),_0x484b71(0x296)['padEnd'](0x14),_0x484b71(0x311)[_0x484b71(0x18f)](0x14),_0x484b71(0x26f)][_0x484b71(0x1e3)]('\x20\x20');console['log']('\x0a'+_0x15cfcf),console[_0x484b71(0x126)]('-'[_0x484b71(0x325)](_0x15cfcf[_0x484b71(0x369)]));for(const _0x1c3e3a of _0x4401cb){const _0x32eaa9=_0x110d05?_0x1c3e3a['id']:_0x1c3e3a['id'][_0x484b71(0x343)](0x0,0x8)+'…';console[_0x484b71(0x126)]([_0x32eaa9[_0x484b71(0x18f)](_0x531b8c),_0x1c3e3a['name'][_0x484b71(0x343)](0x0,0x10)[_0x484b71(0x18f)](0x10),_0x1c3e3a[_0x484b71(0x152)][_0x484b71(0x343)](0x0,0x14)['padEnd'](0x14),_0x1c3e3a[_0x484b71(0x176)][_0x484b71(0x343)](0x0,0x14)[_0x484b71(0x18f)](0x14),_0x1c3e3a[_0x484b71(0x270)]][_0x484b71(0x1e3)]('\x20\x20'));}console['log']('');}finally{await _0x36bfb9[_0x484b71(0x199)]();}}async function _0xef998c(_0x24716e,_0x193af5){const _0x1d4a25=_0x45586a;!_0x24716e&&(console[_0x1d4a25(0x33c)](_0x1d4a25(0x13e)),process[_0x1d4a25(0x377)](0x1));const _0x293c61=require$$5,_0x5f5b41=_0x170f48['resolve'](_0x193af5[_0x1d4a25(0x29f)]),_0x470475=new _0x293c61(_0x5f5b41,_0x193af5[_0x1d4a25(0x1ec)]?{'encryptionKey':_0x193af5[_0x1d4a25(0x1ec)]}:{});await _0x470475[_0x1d4a25(0x36d)]();try{const _0x32b8e4=_0x470475['_systemEnv'];(!_0x32b8e4||!_0x32b8e4[_0x1d4a25(0x228)](_0x1d4a25(0x127)))&&(console['error'](_0x1d4a25(0x2b4)+_0x24716e+'\x22'),process[_0x1d4a25(0x377)](0x1));let _0x2102b9=null,_0x3f0168=null;const _0x9073f3=_0x32b8e4['get']('~tokens',_0x24716e);if(_0x9073f3)_0x2102b9=_0x24716e,_0x3f0168=_0x9073f3;else{const _0x30d712=[];for(const {key:_0x5d5ca3,value:_0x32cdda}of _0x32b8e4['getRange'](_0x1d4a25(0x127))){if(_0x5d5ca3[_0x1d4a25(0x13b)](_0x24716e))_0x30d712[_0x1d4a25(0x3c8)]({'key':_0x5d5ca3,'value':_0x32cdda});}_0x30d712['length']===0x0&&(console[_0x1d4a25(0x33c)](_0x1d4a25(0x2b4)+_0x24716e+'\x22'),process[_0x1d4a25(0x377)](0x1));if(_0x30d712['length']>0x1){console[_0x1d4a25(0x33c)](_0x1d4a25(0x2ab)+_0x24716e+_0x1d4a25(0x243)+_0x30d712[_0x1d4a25(0x369)]+_0x1d4a25(0x16d));for(const _0x14eab of _0x30d712){console[_0x1d4a25(0x33c)]('\x20\x20'+_0x14eab['key']+_0x1d4a25(0x2b6)+(_0x14eab['value'][_0x1d4a25(0x33e)]||_0x1d4a25(0x2a1))+')');}process[_0x1d4a25(0x377)](0x1);}_0x2102b9=_0x30d712[0x0][_0x1d4a25(0x1ec)],_0x3f0168=_0x30d712[0x0][_0x1d4a25(0x17b)];}await _0x32b8e4[_0x1d4a25(0x300)]('~tokens',_0x2102b9),console['log'](_0x1d4a25(0x32c)+_0x2102b9+'\x20\x20(name:\x20'+(_0x3f0168['name']||_0x1d4a25(0x2a1))+',\x20label:\x20'+(_0x3f0168['label']||_0x1d4a25(0x2a1))+')');}finally{await _0x470475[_0x1d4a25(0x199)]();}}function _0x4fcf48(_0xe1dc03,_0x16d694){const _0x4778c8=_0x45586a;if(!_0xe1dc03[_0x4778c8(0x2d8)])return _0x4778c8(0x3ee);const _0x313525=_0xe1dc03[_0x4778c8(0x230)];if(!_0x313525)return _0x4778c8(0x2aa);if(_0x16d694>_0x313525)return _0x4778c8(0x2b2);return'active';}function _0x28984f(_0x3cdc71){const _0x5a6e80=_0x45586a;if(!_0x3cdc71||typeof _0x3cdc71!=='object')return'';const _0x341e29=Object[_0x5a6e80(0x316)](_0x3cdc71)['filter'](([,_0x5a9a9b])=>_0x5a9a9b)[_0x5a6e80(0x1b2)](([_0x538511])=>_0x538511);if(_0x341e29[_0x5a6e80(0x369)]===0x0)return'(none)';if(_0x341e29[_0x5a6e80(0x369)]<=0x3)return _0x341e29['join']('\x20');return _0x341e29['slice'](0x0,0x3)[_0x5a6e80(0x1e3)]('\x20')+('\x20+'+(_0x341e29['length']-0x3));}async function _0xf4c92f(_0x1a9f58){const _0x470061=_0x45586a,_0x46fc21=require$$5,_0x27c437=requireOkdbLicenseCodec(),{_C:_0x50b477}=requireOkdbLicense(),_0x502458=_0x170f48[_0x470061(0x132)](_0x1a9f58[_0x470061(0x29f)]),_0x1b7d3b=new _0x46fc21(_0x502458,_0x1a9f58['key']?{'encryptionKey':_0x1a9f58[_0x470061(0x1ec)]}:{});await _0x1b7d3b[_0x470061(0x36d)]();try{const _0xc3c6=_0x1b7d3b[_0x470061(0x129)],_0x3ed25a=_0xc3c6?.['db']?.[_0x470061(0x288)]?.('__writeCounter')??0x0,_0xaa0ee7=[..._0x1b7d3b['_envs']['keys']()][_0x470061(0x218)](_0x524703=>!_0x524703[_0x470061(0x13b)]('~'))[_0x470061(0x369)],_0x5118fc=_0x1b7d3b[_0x470061(0x376)]?.[_0x470061(0x106)];if(_0x5118fc){const _0x31c70e=_0x5118fc[_0x470061(0x3d8)]===!![],_0x3f85e8=_0x31c70e?_0x470061(0x368):_0x1b7d3b[_0x470061(0x376)][_0x470061(0x2aa)]?.[_0x470061(0x310)]||_0x470061(0x2e4);console[_0x470061(0x126)](''),console[_0x470061(0x126)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x3f85e8);const _0x302cf8=_0x5118fc[_0x470061(0x2f6)]||{};if(_0x302cf8[_0x470061(0x333)]){const _0x49167a=Math[_0x470061(0x1f6)](_0x3ed25a/_0x302cf8[_0x470061(0x333)]*0x64);console['log'](_0x470061(0x3aa)+_0x3ed25a[_0x470061(0x26a)]()+_0x470061(0x1eb)+_0x302cf8[_0x470061(0x333)]['toLocaleString']()+_0x470061(0x285)+_0x49167a+'%)');}else console[_0x470061(0x126)](_0x470061(0x3aa)+_0x3ed25a[_0x470061(0x26a)]());_0x302cf8['envs']?console[_0x470061(0x126)](_0x470061(0x23c)+_0xaa0ee7+_0x470061(0x1eb)+_0x302cf8['envs']):console[_0x470061(0x126)](_0x470061(0x23c)+_0xaa0ee7),_0x50b477?.[_0x470061(0x233)]&&console[_0x470061(0x126)](_0x470061(0x3bd)+_0x50b477[_0x470061(0x233)]+'\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)');}if(!_0xc3c6||!_0xc3c6[_0x470061(0x228)](_0x470061(0x154))){console[_0x470061(0x126)](''),console[_0x470061(0x126)](_0x470061(0x26d)),console[_0x470061(0x126)]('');return;}const _0x4ad6a9=[],_0xdada1e=Date[_0x470061(0x1c3)](),_0x1195f0=_0x1b7d3b['id'],_0x10e591='__OKDB_PUB_FINGERPRINT__';for(const {key:_0x3238ec,value:_0x11d7db}of _0xc3c6['getRange'](_0x470061(0x154))){const _0x332c0e=_0x11d7db[_0x470061(0x1bc)]?Buffer['from'](_0x11d7db[_0x470061(0x1bc)],'hex'):Buffer['alloc'](0x8);let _0x4b08c5='';try{_0x4b08c5=_0x27c437[_0x470061(0x28b)](_0x1195f0,_0x332c0e,_0x10e591)[_0x470061(0x2a5)];}catch{}_0x4ad6a9[_0x470061(0x3c8)]({'id':_0x3238ec,'licensee':_0x11d7db['licensee']||'','expires':_0x11d7db['expiresAt']?new Date(_0x11d7db[_0x470061(0x230)])[_0x470061(0x23b)]()[_0x470061(0x343)](0x0,0xa):'','features':_0x28984f(_0x11d7db[_0x470061(0x34c)]),'pin':_0x4b08c5,'status':_0x4fcf48(_0x11d7db,_0xdada1e)});}if(_0x4ad6a9[_0x470061(0x369)]===0x0){console['log'](''),console[_0x470061(0x126)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x470061(0x126)]('');return;}const _0x2371e6=['\x20\x20'+'ID'[_0x470061(0x18f)](0xe),_0x470061(0x2e1)[_0x470061(0x18f)](0xe),_0x470061(0x331)[_0x470061(0x18f)](0xc),'FEATURES'[_0x470061(0x18f)](0x1e),_0x470061(0x14e)[_0x470061(0x18f)](0xa),_0x470061(0x372)][_0x470061(0x1e3)]('\x20');console[_0x470061(0x126)]('\x0a'+_0x2371e6);for(const _0x1139a2 of _0x4ad6a9){const _0x37cf75=_0x1139a2['id']['slice'](0x0,0x8)+'…';console[_0x470061(0x126)](['\x20\x20'+_0x37cf75['padEnd'](0xe),_0x1139a2['licensee'][_0x470061(0x343)](0x0,0xe)[_0x470061(0x18f)](0xe),_0x1139a2[_0x470061(0x33b)][_0x470061(0x18f)](0xc),_0x1139a2[_0x470061(0x34c)]['slice'](0x0,0x1e)['padEnd'](0x1e),_0x1139a2['pin'][_0x470061(0x18f)](0xa),_0x1139a2['status']][_0x470061(0x1e3)]('\x20'));}console[_0x470061(0x126)]('');}finally{await _0x1b7d3b[_0x470061(0x199)]();}}async function _0x4b0bea(_0x550257,_0x38b3fa){const _0xcbc10=_0x45586a,_0x2a59d1=require$$5,_0x18dcc9=requireOkdbLicenseCodec();let _0x173e6e=_0x550257;(_0x18dcc9[_0xcbc10(0x30d)](_0x550257)==='path'||_0x465e48[_0xcbc10(0x1ac)](_0x550257)&&_0x465e48['statSync'](_0x550257)[_0xcbc10(0x3e7)]())&&(_0x173e6e=_0x465e48[_0xcbc10(0x277)](_0x550257,_0xcbc10(0x25d))['trim']());const _0x44354f=_0x170f48[_0xcbc10(0x132)](_0x38b3fa[_0xcbc10(0x29f)]),_0x48712b=new _0x2a59d1(_0x44354f,_0x38b3fa[_0xcbc10(0x1ec)]?{'encryptionKey':_0x38b3fa['key']}:{});await _0x48712b[_0xcbc10(0x36d)]();try{!_0x48712b[_0xcbc10(0x376)]&&(console['error'](_0xcbc10(0x39b)),process[_0xcbc10(0x377)](0x1));let _0x1e5123;try{_0x1e5123=await _0x48712b[_0xcbc10(0x376)][_0xcbc10(0x3d6)](_0x173e6e);}catch(_0x1b8b50){console[_0xcbc10(0x33c)](_0xcbc10(0x20f)+_0x1b8b50[_0xcbc10(0x10a)]),process[_0xcbc10(0x377)](0x1);}const _0x26902b=_0x48712b['_license'][_0xcbc10(0x219)](),_0x9ab0d8=_0x26902b[_0xcbc10(0x22b)](_0x14854b=>_0x14854b[_0xcbc10(0x1fb)]===_0x1e5123['id'])?.['pin']||'',_0x33d2aa=Object[_0xcbc10(0x316)](_0x1e5123[_0xcbc10(0x34c)]||{})[_0xcbc10(0x218)](([,_0x303f6b])=>_0x303f6b)[_0xcbc10(0x1b2)](([_0x5d4147])=>_0x5d4147),_0x471719=_0x1e5123[_0xcbc10(0x2f6)]||{},_0x1e40f2=[_0x471719[_0xcbc10(0x2d4)]?_0xcbc10(0x15b)+_0x471719[_0xcbc10(0x2d4)]:null,_0x471719[_0xcbc10(0x339)]?'types/env='+_0x471719[_0xcbc10(0x339)]:null,_0x471719[_0xcbc10(0x281)]?_0xcbc10(0x239)+_0x471719[_0xcbc10(0x281)]:null,_0x471719['maxWrites']?_0xcbc10(0x205)+_0x471719[_0xcbc10(0x333)][_0xcbc10(0x26a)]():null]['filter'](Boolean)[_0xcbc10(0x1e3)]('\x20\x20'),_0x4d0fb6=_0x1e5123[_0xcbc10(0x156)]===_0x18dcc9[_0xcbc10(0x145)];console[_0xcbc10(0x126)](_0xcbc10(0x24a)),console[_0xcbc10(0x126)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1e5123['id']),console[_0xcbc10(0x126)](_0xcbc10(0x336)+_0x1e5123['licensee']),console[_0xcbc10(0x126)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x1e5123[_0xcbc10(0x230)])[_0xcbc10(0x23b)]()[_0xcbc10(0x343)](0x0,0xa)),console[_0xcbc10(0x126)](_0xcbc10(0x3bf)+(_0x33d2aa[_0xcbc10(0x1e3)](',\x20')||_0xcbc10(0x329)));if(_0x1e40f2)console['log'](_0xcbc10(0x10d)+_0x1e40f2);_0x4d0fb6?(console[_0xcbc10(0x126)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console['log']('')):(console[_0xcbc10(0x126)](_0xcbc10(0x315)+_0x9ab0d8),console[_0xcbc10(0x126)](_0xcbc10(0x3f7)),console['log'](''),console['log'](_0xcbc10(0x224)),console[_0xcbc10(0x126)](_0xcbc10(0x242)+_0x9ab0d8+_0xcbc10(0x3e6)),console[_0xcbc10(0x126)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0xcbc10(0x126)](_0xcbc10(0x2c6)),console[_0xcbc10(0x126)](''));}finally{await _0x48712b[_0xcbc10(0x199)]();}}async function _0x2f88d0(_0x5e23a0,_0x161145){const _0x500a6d=_0x45586a,_0x95f374=require$$5,_0x515f8f=_0x170f48[_0x500a6d(0x132)](_0x161145[_0x500a6d(0x29f)]),_0x46ef36=new _0x95f374(_0x515f8f,_0x161145[_0x500a6d(0x1ec)]?{'encryptionKey':_0x161145[_0x500a6d(0x1ec)]}:{});await _0x46ef36['open']();try{!_0x46ef36['_license']&&(console[_0x500a6d(0x33c)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x500a6d(0x377)](0x1));let _0x2ae327;try{_0x2ae327=await _0x46ef36[_0x500a6d(0x376)]['activateLicense'](_0x5e23a0[_0x500a6d(0x201)]());}catch(_0x13a070){console[_0x500a6d(0x33c)]('[okdb]\x20error:\x20'+_0x13a070[_0x500a6d(0x10a)]),console[_0x500a6d(0x33c)](''),console['error'](_0x500a6d(0x1ab)),console[_0x500a6d(0x33c)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console['error'](_0x500a6d(0x1ea)),console[_0x500a6d(0x33c)](_0x500a6d(0x1a0)),console[_0x500a6d(0x33c)](''),process[_0x500a6d(0x377)](0x1);}console['log'](_0x500a6d(0x3e9)),console[_0x500a6d(0x126)](_0x500a6d(0x3d0)+_0x2ae327['id']),console[_0x500a6d(0x126)](_0x500a6d(0x336)+_0x2ae327['licensee']),console[_0x500a6d(0x126)](_0x500a6d(0x2af)+new Date(_0x2ae327[_0x500a6d(0x230)])[_0x500a6d(0x23b)]()[_0x500a6d(0x343)](0x0,0xa)),console[_0x500a6d(0x126)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x500a6d(0x126)]('');}finally{await _0x46ef36[_0x500a6d(0x199)]();}}async function _0x50929f(_0xcb5c34,_0xed665){const _0x41968f=_0x45586a;!_0xcb5c34&&(console['error'](_0x41968f(0x143)),process[_0x41968f(0x377)](0x1));const _0x33190b=require$$5,_0x510321=requireOkdbLicenseCodec(),_0x3cecc5=_0x170f48['resolve'](_0xed665['dbPath']),_0x3831fa=new _0x33190b(_0x3cecc5,_0xed665[_0x41968f(0x1ec)]?{'encryptionKey':_0xed665['key']}:{});await _0x3831fa[_0x41968f(0x36d)]();try{const _0x540a62=_0x3831fa[_0x41968f(0x129)];(!_0x540a62||!_0x540a62[_0x41968f(0x228)](_0x41968f(0x154)))&&(console[_0x41968f(0x33c)](_0x41968f(0x1c9)+_0xcb5c34+'\x22'),process[_0x41968f(0x377)](0x1));let _0x2f9bc6=null,_0x42a72e=null;const _0xcf89b1=_0x540a62[_0x41968f(0x288)](_0x41968f(0x154),_0xcb5c34);if(_0xcf89b1)_0x2f9bc6=_0xcb5c34,_0x42a72e=_0xcf89b1;else{const _0x36290b=[];for(const {key:_0x3bd37d,value:_0x600c98}of _0x540a62['getRange'](_0x41968f(0x154))){if(_0x3bd37d['startsWith'](_0xcb5c34))_0x36290b[_0x41968f(0x3c8)]({'key':_0x3bd37d,'value':_0x600c98});}_0x36290b[_0x41968f(0x369)]===0x0&&(console['error'](_0x41968f(0x1c9)+_0xcb5c34+'\x22'),process[_0x41968f(0x377)](0x1)),_0x36290b['length']>0x1&&(console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0xcb5c34+_0x41968f(0x243)+_0x36290b[_0x41968f(0x369)]+_0x41968f(0x264)),process[_0x41968f(0x377)](0x1)),_0x2f9bc6=_0x36290b[0x0]['key'],_0x42a72e=_0x36290b[0x0][_0x41968f(0x17b)];}const _0x252d5e=Date[_0x41968f(0x1c3)](),_0x3f61f8=_0x4fcf48(_0x42a72e,_0x252d5e),_0x45633a=_0x3831fa['id'],_0x5beff2=_0x41968f(0x158);let _0x795064='';try{const _0x3e3e56=Buffer['from'](_0x42a72e[_0x41968f(0x1bc)],_0x41968f(0x139));_0x795064=_0x510321[_0x41968f(0x28b)](_0x45633a,_0x3e3e56,_0x5beff2)['pin'];}catch{}const _0x3c9ae0=_0x42a72e['features']?Object[_0x41968f(0x316)](_0x42a72e[_0x41968f(0x34c)])[_0x41968f(0x218)](([,_0x21b230])=>_0x21b230)[_0x41968f(0x1b2)](([_0x55c0a8])=>_0x55c0a8):[],_0x39cca3=_0x42a72e[_0x41968f(0x2f6)]||{},_0x4bd557=_0x540a62?.['db']?.[_0x41968f(0x288)]?.(_0x41968f(0x1cf))??0x0,_0x47c940=[..._0x3831fa[_0x41968f(0x2a9)][_0x41968f(0x2cb)]()][_0x41968f(0x218)](_0x11dc01=>!_0x11dc01[_0x41968f(0x13b)]('~'))[_0x41968f(0x369)];console[_0x41968f(0x126)]('\x0a\x20\x20License\x20details:'),console[_0x41968f(0x126)](_0x41968f(0x3d0)+_0x2f9bc6),console[_0x41968f(0x126)]('\x20\x20\x20\x20licensee:\x20\x20'+(_0x42a72e[_0x41968f(0x310)]||'')),console[_0x41968f(0x126)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x42a72e['expiresAt']?new Date(_0x42a72e[_0x41968f(0x230)])[_0x41968f(0x23b)]()[_0x41968f(0x343)](0x0,0xa):'')),console[_0x41968f(0x126)]('\x20\x20\x20\x20features:\x20\x20'+(_0x3c9ae0[_0x41968f(0x1e3)](',\x20')||_0x41968f(0x329))),console['log'](_0x41968f(0x315)+_0x795064),console[_0x41968f(0x126)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x3f61f8),console[_0x41968f(0x126)]('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x42a72e[_0x41968f(0x212)])[_0x41968f(0x23b)]());if(_0x3f61f8===_0x41968f(0x2aa)){console[_0x41968f(0x126)](''),console[_0x41968f(0x126)](_0x41968f(0x32e));if(_0x39cca3['maxWrites']){const _0xc685b=Math[_0x41968f(0x1f6)](_0x4bd557/_0x39cca3[_0x41968f(0x333)]*0x64);console[_0x41968f(0x126)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x4bd557['toLocaleString']()+_0x41968f(0x1eb)+_0x39cca3[_0x41968f(0x333)][_0x41968f(0x26a)]()+'\x20\x20('+_0xc685b+'%)');}else console['log']('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x4bd557[_0x41968f(0x26a)]()+_0x41968f(0x214));_0x39cca3[_0x41968f(0x2d4)]?console[_0x41968f(0x126)](_0x41968f(0x2c7)+_0x47c940+_0x41968f(0x1eb)+_0x39cca3[_0x41968f(0x2d4)]):console[_0x41968f(0x126)](_0x41968f(0x2c7)+_0x47c940+_0x41968f(0x214));}console[_0x41968f(0x126)]('');}finally{await _0x3831fa[_0x41968f(0x199)]();}}async function _0x5a171d(_0x6e0e18,_0x35ced8){const _0x34a628=_0x45586a;!_0x6e0e18&&(console[_0x34a628(0x33c)](_0x34a628(0x1a3)),process[_0x34a628(0x377)](0x1));const _0x287db0=require$$5,_0x2c3871=_0x170f48[_0x34a628(0x132)](_0x35ced8[_0x34a628(0x29f)]),_0x2af399=new _0x287db0(_0x2c3871,_0x35ced8[_0x34a628(0x1ec)]?{'encryptionKey':_0x35ced8[_0x34a628(0x1ec)]}:{});await _0x2af399[_0x34a628(0x36d)]();try{const _0x5b5571=_0x2af399[_0x34a628(0x129)];(!_0x5b5571||!_0x5b5571[_0x34a628(0x228)](_0x34a628(0x154)))&&(console[_0x34a628(0x33c)](_0x34a628(0x1c9)+_0x6e0e18+'\x22'),process[_0x34a628(0x377)](0x1));let _0x2db695=null,_0x3723b2=null;const _0x31a5c4=_0x5b5571['get'](_0x34a628(0x154),_0x6e0e18);if(_0x31a5c4)_0x2db695=_0x6e0e18,_0x3723b2=_0x31a5c4;else{const _0x34f587=[];for(const {key:_0x228ec8,value:_0x121fad}of _0x5b5571[_0x34a628(0x1ff)](_0x34a628(0x154))){if(_0x228ec8['startsWith'](_0x6e0e18))_0x34f587[_0x34a628(0x3c8)]({'key':_0x228ec8,'value':_0x121fad});}_0x34f587[_0x34a628(0x369)]===0x0&&(console[_0x34a628(0x33c)](_0x34a628(0x1c9)+_0x6e0e18+'\x22'),process['exit'](0x1)),_0x34f587['length']>0x1&&(console[_0x34a628(0x33c)](_0x34a628(0x2ab)+_0x6e0e18+_0x34a628(0x243)+_0x34f587[_0x34a628(0x369)]+_0x34a628(0x264)),process[_0x34a628(0x377)](0x1)),_0x2db695=_0x34f587[0x0][_0x34a628(0x1ec)],_0x3723b2=_0x34f587[0x0][_0x34a628(0x17b)];}await _0x5b5571[_0x34a628(0x300)](_0x34a628(0x154),_0x2db695),console[_0x34a628(0x126)](_0x34a628(0x2e0)+_0x2db695+_0x34a628(0x2fc)+(_0x3723b2[_0x34a628(0x310)]||_0x34a628(0x2a1))+')');}finally{await _0x2af399[_0x34a628(0x199)]();}}async function _0x3a1a26(_0x2d190f,_0x17f3c2,_0x540144){const _0x3764c8=_0x45586a;!_0x2d190f&&(console[_0x3764c8(0x33c)](_0x3764c8(0x3ef)),process['exit'](0x1));!_0x540144[_0x3764c8(0x396)]&&!(_0x540144[_0x3764c8(0x137)]&&_0x540144[_0x3764c8(0x2c4)])&&(console[_0x3764c8(0x33c)](_0x3764c8(0x35d)),process[_0x3764c8(0x377)](0x1));const _0x44e60b=_0x540144[_0x3764c8(0x3de)]||_0x17f3c2[_0x3764c8(0x3c3)]?.[_0x3764c8(0x3e4)];!_0x44e60b&&(console[_0x3764c8(0x33c)](_0x3764c8(0x37c)+_0x3764c8(0x3d1)+_0x3764c8(0x192)),process[_0x3764c8(0x377)](0x1));const _0x15f3aa=require$$5,_0x97b54=new _0x15f3aa(_0x17f3c2[_0x3764c8(0x29f)],{'sync':{'address':_0x44e60b,'auto_reconcile':![]}});await _0x97b54[_0x3764c8(0x36d)]();try{const _0xf6d304=_0x97b54[_0x3764c8(0x129)];if(_0xf6d304&&_0xf6d304[_0x3764c8(0x228)](_0x3764c8(0x127))){let _0xc4dff7=![];for(const _0x5c53a0 of _0xf6d304[_0x3764c8(0x1ff)](_0x3764c8(0x127))){_0xc4dff7=!![];break;}_0xc4dff7&&console[_0x3764c8(0x126)](_0x3764c8(0x3ea)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console[_0x3764c8(0x126)]('\x0a\x20\x20Joining\x20cluster\x20at\x20'+_0x2d190f+'…'),await _0x97b54['sync'][_0x3764c8(0x1e3)](_0x2d190f[_0x3764c8(0x320)](/\/+$/,''),{'token':_0x540144[_0x3764c8(0x396)],'username':_0x540144['username'],'password':_0x540144[_0x3764c8(0x2c4)]}),console['log'](_0x3764c8(0x225)),console[_0x3764c8(0x126)](_0x3764c8(0x3f3));}finally{await _0x97b54[_0x3764c8(0x199)]();}}async function _0x632ee1(){const _0x309dc5=_0x45586a,_0x366a36=Date['now'](),_0x529a4d=_0x2f33be(process[_0x309dc5(0x182)]),_0x3db002=_0x2bdfc3(_0x529a4d),_0x541011=_0x170f48[_0x309dc5(0x132)](_0x3db002[_0x309dc5(0x29f)]);!_0x3db002[_0x309dc5(0x2f8)]&&!process[_0x309dc5(0x3dd)][_0x309dc5(0x1d2)]&&(_0x3db002['noRepl']=!![]);const _0x3d726d=require$$5,{start:_0x59f7bb,colorLog:_0x36fffe}=requireOkdbShell(),_0x4cc28d={..._0x3db002['key']?{'encryptionKey':_0x3db002['key']}:{},..._0x3db002[_0x309dc5(0x29b)]?{'admin':![]}:_0x3b22c0(_0x3db002[_0x309dc5(0x353)])?{'admin':_0x3db002[_0x309dc5(0x353)]}:{},..._0x3b22c0(_0x3db002[_0x309dc5(0x348)])?{'api':_0x3db002['api']}:{},..._0x3b22c0(_0x3db002[_0x309dc5(0x38e)])?{'auth':_0x3db002[_0x309dc5(0x38e)]}:{},..._0x3b22c0(_0x3db002['mcp'])?{'mcp':_0x3db002[_0x309dc5(0x2c8)]}:{},..._0x3db002[_0x309dc5(0x21e)]!==![]?{'timeMachine':_0x3db002[_0x309dc5(0x21e)]}:{}},_0x44fcdc=new _0x3d726d(_0x541011,_0x4cc28d);_0x44fcdc[_0x309dc5(0x126)][_0x309dc5(0x299)]?.();const _0x3b1369=_0x44fcdc[_0x309dc5(0x126)][_0x309dc5(0x2e3)](_0x491981=>_0x36fffe(_0x491981,_0x3db002[_0x309dc5(0x354)]));if(_0x3db002[_0x309dc5(0x2f8)])process[_0x309dc5(0x209)]['write'](_0x309dc5(0x379));await _0x44fcdc[_0x309dc5(0x36d)]();if(_0x3db002[_0x309dc5(0x2f8)])process[_0x309dc5(0x209)]['write'](_0x309dc5(0x34f));try{await _0x2e8ce7(_0x44fcdc,_0x3db002[_0x309dc5(0x1a8)]);}catch(_0x25b70a){_0x25b70a[_0x309dc5(0x399)]===_0x309dc5(0x35e)&&(console[_0x309dc5(0x33c)](_0x309dc5(0x362)+_0x3db002[_0x309dc5(0x1a8)]+_0x309dc5(0x34e)),process[_0x309dc5(0x377)](0x1));throw _0x25b70a;}if(_0x3db002[_0x309dc5(0x2f8)])process['stdout'][_0x309dc5(0x2d9)]('\x20\x20✓\x20http\x20listening\x20on\x20:'+_0x3db002[_0x309dc5(0x1a8)]+'\x0a');if(!_0x3db002[_0x309dc5(0x2f8)])_0x44fcdc[_0x309dc5(0x126)][_0x309dc5(0x299)]?.(),_0x3b1369?.(),_0x30eb13(_0x44fcdc[_0x309dc5(0x38e)]?.[_0x309dc5(0x24c)]?.()??[]),await _0x59f7bb(_0x44fcdc,_0x3db002);else{const _0x4556da=_0x170f48[_0x309dc5(0x1e3)](_0x541011,'okdb.pid');try{_0x465e48[_0x309dc5(0x34d)](_0x4556da,String(process['pid']));}catch{}const _0x37a043=Date[_0x309dc5(0x1c3)]()-_0x366a36;console['log'](''),console[_0x309dc5(0x126)](_0x309dc5(0x211)),console['log'](_0x309dc5(0x37b)+_0x3db002[_0x309dc5(0x1a8)]),console['log'](_0x309dc5(0xfc)+_0x541011),console['log'](_0x309dc5(0x26c)+_0x44fcdc['id']);{const _0x2a245b=_0x44fcdc[_0x309dc5(0x129)]?.['db']?.[_0x309dc5(0x288)]?.(_0x309dc5(0x1cf))??0x0,_0x24628f=[..._0x44fcdc[_0x309dc5(0x2a9)]['keys']()]['filter'](_0x5c19c0=>!_0x5c19c0[_0x309dc5(0x13b)]('~'))[_0x309dc5(0x369)];if(_0x44fcdc[_0x309dc5(0x376)]?.[_0x309dc5(0x2aa)]?.[_0x309dc5(0x156)]===0x1){const _0x52751a=Math[_0x309dc5(0x232)]((_0x44fcdc[_0x309dc5(0x376)]['active'][_0x309dc5(0x230)]-Date[_0x309dc5(0x1c3)]())/0x5265c00);console[_0x309dc5(0x126)](_0x309dc5(0x3db)+_0x44fcdc['_license'][_0x309dc5(0x2aa)][_0x309dc5(0x310)]+_0x309dc5(0x2d1)+_0x52751a+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x44fcdc[_0x309dc5(0x376)]?.[_0x309dc5(0x2aa)]){const _0x46701f=_0x44fcdc[_0x309dc5(0x376)][_0x309dc5(0x2aa)];console[_0x309dc5(0x126)](_0x309dc5(0x39a)+_0x46701f[_0x309dc5(0x310)]+_0x309dc5(0x124)+new Date(_0x46701f[_0x309dc5(0x230)])[_0x309dc5(0x23b)]()['slice'](0x0,0xa)+')');const _0x32e944=_0x46701f[_0x309dc5(0x2f6)]||{};if(_0x32e944[_0x309dc5(0x333)]){const _0x30edff=Math[_0x309dc5(0x1f6)](_0x2a245b/_0x32e944[_0x309dc5(0x333)]*0x64);console['log'](_0x309dc5(0x2cd)+_0x2a245b[_0x309dc5(0x26a)]()+_0x309dc5(0x1eb)+_0x32e944['maxWrites'][_0x309dc5(0x26a)]()+_0x309dc5(0x1d9)+_0x30edff+_0x309dc5(0x3d9)+_0x24628f+(_0x32e944['envs']?'/'+_0x32e944[_0x309dc5(0x2d4)]:'')+_0x309dc5(0x297)+(_0x24628f===0x1?'':'s'));}}else{if(_0x44fcdc[_0x309dc5(0x376)]){const _0x20c8c9=_0x44fcdc['_license'][_0x309dc5(0x219)](),_0x2f591a=_0x20c8c9['length']?_0x20c8c9['map'](_0x3bcb6f=>_0x3bcb6f['pin'])['join'](',\x20'):_0x309dc5(0x1a2),_0x5db02c=_0x44fcdc[_0x309dc5(0x376)][_0x309dc5(0x106)],_0xce2e0f=_0x5db02c[_0x309dc5(0x2f6)]['maxWrites']?Math['round'](_0x2a245b/_0x5db02c[_0x309dc5(0x2f6)]['maxWrites']*0x64):0x0;console['log'](_0x309dc5(0x27f)),console[_0x309dc5(0x126)](_0x309dc5(0x2cd)+_0x2a245b[_0x309dc5(0x26a)]()+'\x20/\x20'+_0x5db02c[_0x309dc5(0x2f6)][_0x309dc5(0x333)][_0x309dc5(0x26a)]()+_0x309dc5(0x1d9)+_0xce2e0f+_0x309dc5(0x3d9)+_0x24628f+'\x20/\x20'+_0x5db02c[_0x309dc5(0x2f6)][_0x309dc5(0x2d4)]+'\x20envs'),console[_0x309dc5(0x126)](_0x309dc5(0x347)+_0x2f591a);}}}}console[_0x309dc5(0x126)](_0x309dc5(0x328)+_0x3db002[_0x309dc5(0x1a8)]+'/api');!_0x3db002[_0x309dc5(0x29b)]&&console[_0x309dc5(0x126)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x3db002[_0x309dc5(0x1a8)]+'/admin/index.html');console['log'](''),console[_0x309dc5(0x126)](_0x309dc5(0x2cf)+_0x37a043+'ms'),_0x30eb13(_0x44fcdc['auth']?.[_0x309dc5(0x24c)]?.()??[]);async function _0x2674c7(){const _0x361789=_0x309dc5;process[_0x361789(0x209)][_0x361789(0x2d9)](_0x361789(0x335));try{_0x465e48[_0x361789(0x10b)](_0x4556da);}catch{}await _0x44fcdc[_0x361789(0x199)](),process[_0x361789(0x377)](0x0);}process['on']('SIGINT',_0x2674c7),process['on'](_0x309dc5(0x2e8),_0x2674c7);}}const _0x35aefb=new Set([_0x45586a(0x1d4),_0x45586a(0x261),_0x45586a(0x133),_0x45586a(0x188),_0x45586a(0x17f),_0x45586a(0x276),'reset','token',_0x45586a(0x1e3),_0x45586a(0x28c)]),_0x413071=process[_0x45586a(0x182)][0x2];if(_0x413071==='version')console[_0x45586a(0x126)](require$$2['version']),process[_0x45586a(0x377)](0x0);else{if(_0x413071&&_0x35aefb[_0x45586a(0x32a)](_0x413071)){const _0x30c534=process[_0x45586a(0x182)][_0x45586a(0x343)](0x3),_0x1e900b=_0x2f33be([_0x45586a(0x31c),_0x45586a(0x204),..._0x30c534]),_0x9d16f8=_0x2bdfc3(_0x1e900b),_0x520570=new Set([_0x45586a(0x151),'-d',_0x45586a(0x381),'-k',_0x45586a(0x2ca),'-c','--port','-p',_0x45586a(0x193),_0x45586a(0xfa),'-e',_0x45586a(0x25e),_0x45586a(0x15c),_0x45586a(0x18b),_0x45586a(0x1b3),_0x45586a(0x161),_0x45586a(0x33f),_0x45586a(0x2c5),_0x45586a(0x3ac),_0x45586a(0x2d3),'-u',_0x45586a(0x367)]);let _0x2b3e39=null;for(let _0x2e9a7d=0x0;_0x2e9a7d<_0x30c534[_0x45586a(0x369)];_0x2e9a7d++){if(_0x520570[_0x45586a(0x32a)](_0x30c534[_0x2e9a7d])){_0x2e9a7d++;continue;}if(!_0x30c534[_0x2e9a7d][_0x45586a(0x13b)]('-')){_0x2b3e39=_0x30c534[_0x2e9a7d];break;}}(async()=>{const _0x5012b2=_0x45586a;if(_0x413071==='token'){const _0x5d2974=process[_0x5012b2(0x182)][0x3],_0x5a6f53=process[_0x5012b2(0x182)][_0x5012b2(0x343)](0x4),_0x59c135=_0x2f33be([_0x5012b2(0x31c),_0x5012b2(0x204),..._0x5a6f53]),_0x35d297=_0x2bdfc3(_0x59c135),_0x1360a4=new Set([_0x5012b2(0x151),'-d',_0x5012b2(0x381),'-k',_0x5012b2(0x2ca),'-c','--port','-p',_0x5012b2(0x15c),'--password',_0x5012b2(0x1b3),'--permissions',_0x5012b2(0x33f),_0x5012b2(0x2c5),_0x5012b2(0x193),_0x5012b2(0xfa),'-e',_0x5012b2(0x25e)]),_0x1200bf=[];for(let _0x5ae763=0x0;_0x5ae763<_0x5a6f53['length'];_0x5ae763++){if(_0x1360a4[_0x5012b2(0x32a)](_0x5a6f53[_0x5ae763])){_0x5ae763++;continue;}if(_0x5a6f53[_0x5ae763][_0x5012b2(0x13b)]('-'))continue;_0x1200bf[_0x5012b2(0x3c8)](_0x5a6f53[_0x5ae763]);}switch(_0x5d2974){case _0x5012b2(0x38a):await _0x5a8a9e(_0x35d297,_0x59c135);break;case'list':await _0x516630(_0x35d297);break;case'revoke':await _0xef998c(_0x1200bf[0x0],_0x35d297);break;default:console[_0x5012b2(0x33c)](_0x5012b2(0x39c)+_0x5d2974+'\x22.\x20Use:\x20create,\x20list,\x20revoke'),process[_0x5012b2(0x377)](0x1);}return;}if(_0x413071===_0x5012b2(0x28c)){const _0x3746cf=requireOkdbLicenseCodec(),_0x180e11=process['argv']['slice'](0x3),_0x20ef7e=_0x2f33be([_0x5012b2(0x31c),_0x5012b2(0x204),..._0x180e11]),_0x8e784a=_0x2bdfc3(_0x20ef7e),_0x389cea=new Set([_0x5012b2(0x151),'-d',_0x5012b2(0x381),'-k',_0x5012b2(0x2ca),'-c','--port','-p',_0x5012b2(0x193)]),_0x147037=[];for(let _0x4a6757=0x0;_0x4a6757<_0x180e11[_0x5012b2(0x369)];_0x4a6757++){if(_0x389cea[_0x5012b2(0x32a)](_0x180e11[_0x4a6757])){_0x4a6757++;continue;}if(_0x180e11[_0x4a6757][_0x5012b2(0x13b)]('-'))continue;_0x147037[_0x5012b2(0x3c8)](_0x180e11[_0x4a6757]);}const _0x116425=_0x147037[0x0]??null;if(_0x116425===_0x5012b2(0x300))await _0x5a171d(_0x147037[0x1],_0x8e784a);else{if(!_0x116425)await _0xf4c92f(_0x8e784a);else{let _0x49be49=_0x3746cf[_0x5012b2(0x30d)](_0x116425);if(_0x49be49===_0x5012b2(0x18d)&&_0x465e48['existsSync'](_0x116425))_0x49be49=_0x5012b2(0x217);if(_0x49be49===_0x5012b2(0x217))try{const _0x1b3c77=_0x465e48[_0x5012b2(0x277)](_0x116425,_0x5012b2(0x25d))['trim'](),_0x35e25e=_0x3746cf['detectInputType'](_0x1b3c77);if(_0x35e25e===_0x5012b2(0x2d8)){await _0x2f88d0(_0x1b3c77,_0x8e784a);return;}await _0x4b0bea(_0x116425,_0x8e784a);return;}catch(_0x29972b){console[_0x5012b2(0x33c)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x116425+':\x20'+_0x29972b[_0x5012b2(0x10a)]),process[_0x5012b2(0x377)](0x1);}switch(_0x49be49){case _0x5012b2(0x271):await _0x4b0bea(_0x116425,_0x8e784a);break;case'activation':await _0x2f88d0(_0x116425,_0x8e784a);break;case'uuid':await _0x50929f(_0x116425,_0x8e784a);break;default:console['error']('[okdb]\x20error:\x20unrecognized\x20input:\x20\x22'+_0x116425+'\x22'),console[_0x5012b2(0x33c)](''),console[_0x5012b2(0x33c)](_0x5012b2(0x2dd)),console[_0x5012b2(0x33c)](_0x5012b2(0xfe)),console[_0x5012b2(0x33c)](_0x5012b2(0x3b2)),console[_0x5012b2(0x33c)]('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x5012b2(0x33c)](_0x5012b2(0x23d)),console['error'](''),console['error'](_0x5012b2(0x36f)),process[_0x5012b2(0x377)](0x1);}}}return;}switch(_0x413071){case _0x5012b2(0x261):await _0x4d4079(_0x9d16f8);break;case _0x5012b2(0x133):await _0x321815();break;case _0x5012b2(0x1d7):await _0xca7103(_0x9d16f8);break;case _0x5012b2(0x188):await _0x51a49e(_0x2b3e39??_0x170f48['resolve'](_0x5012b2(0x245)),_0x9d16f8);break;case _0x5012b2(0x17f):await _0xd44625(_0x2b3e39??_0x170f48[_0x5012b2(0x132)]('./okdb-export.ndjson'),_0x9d16f8,_0x1e900b);break;case _0x5012b2(0x276):await _0x14dd19(_0x2b3e39??_0x170f48['resolve'](_0x5012b2(0x20c)),_0x9d16f8,_0x1e900b);break;case'join':await _0x3a1a26(_0x2b3e39,_0x9d16f8,_0x1e900b);break;}})()[_0x45586a(0x1e6)](()=>process[_0x45586a(0x377)](0x0))[_0x45586a(0x1c6)](_0x41d3e0=>{const _0xdb6f44=_0x45586a;console[_0xdb6f44(0x33c)](_0xdb6f44(0x13a)+(_0x41d3e0[_0xdb6f44(0x10a)]||_0x41d3e0)+'\x0a'),process[_0xdb6f44(0x377)](0x1);});}else _0x632ee1()['catch'](_0x3eb245=>{const _0x52d60d=_0x45586a;console['error'](_0x52d60d(0x3d7)),console['error'](_0x3eb245[_0x52d60d(0x1cc)]||_0x3eb245),process[_0x52d60d(0x377)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x3f2430(0x121)]=okdb;