@kedem/okdb 1.8.13 → 1.8.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x1f0ec4=_0x5721;(function(_0x3d2eb9,_0x43c910){const _0x41eaf0=_0x5721,_0x1a25a1=_0x3d2eb9();while(!![]){try{const _0x56a55d=-parseInt(_0x41eaf0(0x2dc))/0x1*(-parseInt(_0x41eaf0(0x107))/0x2)+-parseInt(_0x41eaf0(0xbd))/0x3*(-parseInt(_0x41eaf0(0x2de))/0x4)+-parseInt(_0x41eaf0(0x1c9))/0x5+parseInt(_0x41eaf0(0x25f))/0x6+-parseInt(_0x41eaf0(0x2fc))/0x7*(parseInt(_0x41eaf0(0xa3))/0x8)+-parseInt(_0x41eaf0(0x2c7))/0x9+parseInt(_0x41eaf0(0x91))/0xa;if(_0x56a55d===_0x43c910)break;else _0x1a25a1['push'](_0x1a25a1['shift']());}catch(_0x1ac468){_0x1a25a1['push'](_0x1a25a1['shift']());}}}(_0x4510,0xe6087));var require$$1$1=require(_0x1f0ec4(0x36a)),require$$1=require('fs'),require$$3=require('net'),require$$0$2=require(_0x1f0ec4(0x3a7)),require$$5=require(_0x1f0ec4(0x345)),require$$0=require(_0x1f0ec4(0x365)),require$$0$1=require(_0x1f0ec4(0x1a9)),require$$2$1=require('os'),require$$4=require(_0x1f0ec4(0x360));function getDefaultExportFromCjs(_0x1b5b58){const _0x5e1847=_0x1f0ec4;return _0x1b5b58&&_0x1b5b58['__esModule']&&Object[_0x5e1847(0xb2)][_0x5e1847(0x248)][_0x5e1847(0x2d9)](_0x1b5b58,_0x5e1847(0x354))?_0x1b5b58['default']:_0x1b5b58;}function _0x5721(_0x5d0e39,_0x1f469a){_0x5d0e39=_0x5d0e39-0x7f;const _0x4510d6=_0x4510();let _0x5721cd=_0x4510d6[_0x5d0e39];return _0x5721cd;}var okdb$1={},version=_0x1f0ec4(0x35d),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x2fda57=require$$0;function _0x10cf52(_0x302bea,_0x158a78){const _0x56ff1a=_0x5721;return _0x2fda57[_0x56ff1a(0x13d)](_0x56ff1a(0x380),_0x158a78)[_0x56ff1a(0x222)](_0x302bea)['digest'](_0x56ff1a(0x319));}function _0x4db840(_0x906b5e,_0x439ef4){const _0x1a9539=_0x5721;if(typeof _0x906b5e!==_0x1a9539(0x1e9)||typeof _0x439ef4!=='string')return![];if(Buffer[_0x1a9539(0x9c)](_0x906b5e)!==Buffer['byteLength'](_0x439ef4))return![];return _0x2fda57['timingSafeEqual'](Buffer[_0x1a9539(0x1e1)](_0x906b5e),Buffer[_0x1a9539(0x1e1)](_0x439ef4));}function _0x367c46(_0x310c1c){const _0xeb184d=_0x5721;if(!_0x310c1c?.['startsWith'](_0xeb184d(0x160)))return null;return _0x310c1c[_0xeb184d(0x19b)](0x7);}function _0x1e2fc4(_0x37f331=0x20){const _0x42d3ef=_0x5721;return _0x2fda57[_0x42d3ef(0x1a4)](_0x37f331)[_0x42d3ef(0x314)](_0x42d3ef(0x319));}function _0x49190f(_0x235230){const _0x4b7173=_0x5721;return _0x2fda57[_0x4b7173(0x34e)](_0x4b7173(0x380))[_0x4b7173(0x222)](_0x235230)[_0x4b7173(0x23f)](_0x4b7173(0xa8));}function _0x58d95e(_0xebfa2,_0x3d6e9d,_0x19f216=0x36ee80){const _0x9e026c=_0x5721;if(!_0x3d6e9d)throw new Error('Token\x20secret\x20not\x20configured');const _0x3173c6=Date[_0x9e026c(0x3a5)](),_0x5699e6=Buffer[_0x9e026c(0x1e1)](JSON[_0x9e026c(0x287)]({'iat':_0x3173c6,'exp':_0x3173c6+_0x19f216,'sub':_0xebfa2?.['id']??_0xebfa2?.[_0x9e026c(0x1b7)]??null,'username':_0xebfa2?.[_0x9e026c(0x2e3)]??_0xebfa2?.[_0x9e026c(0x383)]??null,'roles':Array[_0x9e026c(0x214)](_0xebfa2?.[_0x9e026c(0x24e)])?_0xebfa2[_0x9e026c(0x24e)]:[]}))[_0x9e026c(0x314)](_0x9e026c(0x319)),_0x5cbfab=_0x10cf52(_0x5699e6,_0x3d6e9d);return _0x5699e6+'.'+_0x5cbfab;}function _0x2c128a(_0x45e514,_0x5392d4){const _0x57b459=_0x5721;if(!_0x5392d4||typeof _0x45e514!==_0x57b459(0x1e9))return null;const [_0x444d6b,_0x531838]=_0x45e514['split']('.');if(!_0x444d6b||!_0x531838)return null;const _0x1087b3=_0x10cf52(_0x444d6b,_0x5392d4);if(!_0x4db840(_0x531838,_0x1087b3))return null;try{const _0x29bfcf=JSON[_0x57b459(0x211)](Buffer[_0x57b459(0x1e1)](_0x444d6b,_0x57b459(0x319))[_0x57b459(0x314)]()),_0x1b293b=0x7530;if(Date[_0x57b459(0x3a5)]()>Number(_0x29bfcf?.[_0x57b459(0x192)]??0x0)+_0x1b293b)return null;return _0x29bfcf;}catch{return null;}}async function _0x3977be(_0x53482a){return new Promise((_0x445daa,_0x4e9322)=>{const _0x13a24b=_0x5721,_0x12a58f=_0x2fda57[_0x13a24b(0x1a4)](0x10);_0x2fda57[_0x13a24b(0x201)](_0x53482a,_0x12a58f,0x40,(_0x4247d9,_0x50f52f)=>{const _0x5b08eb=_0x13a24b;if(_0x4247d9)_0x4e9322(_0x4247d9);_0x445daa(_0x12a58f['toString'](_0x5b08eb(0xa8))+':'+_0x50f52f[_0x5b08eb(0x314)](_0x5b08eb(0xa8)));});});}async function _0xb6d64c(_0xfd99ab,_0x582b28){const _0xa7a1b6=_0x5721,[_0x20ba72,_0x1674e5]=_0x582b28[_0xa7a1b6(0x242)](':');if(!_0x20ba72||!_0x1674e5)return![];const _0x115848=Buffer[_0xa7a1b6(0x1e1)](_0x20ba72,'hex');return new Promise((_0xd89325,_0x1457b1)=>{_0x2fda57['scrypt'](_0xfd99ab,_0x115848,0x40,(_0x1fc73d,_0x5a5cc9)=>{const _0xa083f9=_0x5721;if(_0x1fc73d)_0x1457b1(_0x1fc73d);_0xd89325(_0x2fda57['timingSafeEqual'](_0x5a5cc9,Buffer[_0xa083f9(0x1e1)](_0x1674e5,_0xa083f9(0xa8))));});});}return okdbAuthTokens={'hmac':_0x10cf52,'timingSafeEqual':_0x4db840,'parseBearer':_0x367c46,'randomToken':_0x1e2fc4,'hashToken':_0x49190f,'issueToken':_0x58d95e,'authenticateToken':_0x2c128a,'hashPassword':_0x3977be,'verifyPassword':_0xb6d64c},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x4217cf=_0x1f0ec4;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x5bda64=require$$0$1,_0x3c8b70=_0x4217cf(0x26e),_0x28356d=new Uint8Array(0x100)[_0x4217cf(0x225)](0xff);for(let _0x250caf=0x0;_0x250caf<_0x3c8b70['length'];_0x250caf++){_0x28356d[_0x3c8b70['charCodeAt'](_0x250caf)]=_0x250caf,_0x28356d[_0x3c8b70[_0x4217cf(0x174)](_0x250caf)+0x20]=_0x250caf;}_0x28356d['O'['charCodeAt'](0x0)]=0x0,_0x28356d['o'['charCodeAt'](0x0)]=0x0,_0x28356d['I'['charCodeAt'](0x0)]=0x1,_0x28356d['i'[_0x4217cf(0x174)](0x0)]=0x1,_0x28356d['L'[_0x4217cf(0x174)](0x0)]=0x1,_0x28356d['l'[_0x4217cf(0x174)](0x0)]=0x1;function _0x2196ab(_0x537c52){const _0x2f4039=_0x4217cf;let _0x46b4fd=0x0,_0x2b2d2b=0x0,_0xb2a429='';for(let _0x29267e=0x0;_0x29267e<_0x537c52[_0x2f4039(0x252)];_0x29267e++){_0x2b2d2b=_0x2b2d2b<<0x8|_0x537c52[_0x29267e],_0x46b4fd+=0x8;while(_0x46b4fd>=0x5){_0x46b4fd-=0x5,_0xb2a429+=_0x3c8b70[_0x2b2d2b>>>_0x46b4fd&0x1f];}}return _0x46b4fd>0x0&&(_0xb2a429+=_0x3c8b70[_0x2b2d2b<<0x5-_0x46b4fd&0x1f]),_0xb2a429;}function _0x1ea359(_0x10c0be){const _0x19c068=_0x4217cf;_0x10c0be=_0x10c0be[_0x19c068(0x141)](/-/g,'')[_0x19c068(0x290)]();let _0x2ef034=0x0,_0x2d95f5=0x0;const _0x171d92=[];for(let _0x327cf0=0x0;_0x327cf0<_0x10c0be[_0x19c068(0x252)];_0x327cf0++){const _0xa98d77=_0x28356d[_0x10c0be[_0x19c068(0x174)](_0x327cf0)];if(_0xa98d77===0xff)continue;_0x2d95f5=_0x2d95f5<<0x5|_0xa98d77,_0x2ef034+=0x5,_0x2ef034>=0x8&&(_0x2ef034-=0x8,_0x171d92['push'](_0x2d95f5>>>_0x2ef034&0xff));}return Buffer[_0x19c068(0x1e1)](_0x171d92);}const _0x543955=[_0x4217cf(0x26d),_0x4217cf(0x1ed),_0x4217cf(0x2f0),_0x4217cf(0xc0),_0x4217cf(0xd8),'views',_0x4217cf(0x381),'files'],_0x9cdecc=0x0,_0x264c23=0x1,_0x250681=0x2,_0x22e34f=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x1bc024({issuedAt:_0x529dc7,expiresAt:_0x40d854,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x9cdecc}){const _0x1a479e=_0x4217cf,_0x14ef50=Buffer[_0x1a479e(0x1e1)](licensee,_0x1a479e(0x1cf))[_0x1a479e(0x19b)](0x0,0x40),_0x2e0f11=0x1+0x1+0x4+0x4+0x1+_0x14ef50[_0x1a479e(0x252)]+0x2+0x10,_0x3ba38b=Buffer[_0x1a479e(0x364)](_0x2e0f11);let _0x387fe2=0x0;_0x3ba38b['writeUInt8'](0x1,_0x387fe2++),_0x3ba38b[_0x1a479e(0x3a2)](licenseType,_0x387fe2++),_0x3ba38b[_0x1a479e(0xe1)](Math['floor'](_0x529dc7/0x3e8),_0x387fe2),_0x387fe2+=0x4,_0x3ba38b[_0x1a479e(0xe1)](Math[_0x1a479e(0xb3)](_0x40d854/0x3e8),_0x387fe2),_0x387fe2+=0x4,_0x3ba38b[_0x1a479e(0x3a2)](_0x14ef50[_0x1a479e(0x252)],_0x387fe2++),_0x14ef50[_0x1a479e(0x129)](_0x3ba38b,_0x387fe2),_0x387fe2+=_0x14ef50['length'];let _0x38c896=0x0;for(let _0x2e42f0=0x0;_0x2e42f0<_0x543955[_0x1a479e(0x252)];_0x2e42f0++){if(features[_0x543955[_0x2e42f0]])_0x38c896|=0x1<<_0x2e42f0;}_0x3ba38b[_0x1a479e(0x1a6)](_0x38c896,_0x387fe2),_0x387fe2+=0x2;const _0x8a253f=[_0x1a479e(0xf4),_0x1a479e(0xf8),_0x1a479e(0x312),'maxWrites'];for(const _0x5cb0a4 of _0x8a253f){_0x3ba38b['writeUInt32BE'](limits[_0x5cb0a4]||0x0,_0x387fe2),_0x387fe2+=0x4;}return _0x3ba38b;}function _0x378f88(_0x367b2f){const _0x5b38e0=_0x4217cf;let _0x42d688=0x0;const _0x861316=_0x367b2f[_0x5b38e0(0x32e)](_0x42d688++),_0x41d97d=_0x367b2f[_0x5b38e0(0x32e)](_0x42d688++),_0x5f02e7=_0x367b2f[_0x5b38e0(0x254)](_0x42d688);_0x42d688+=0x4;const _0x5d4ad6=_0x367b2f[_0x5b38e0(0x254)](_0x42d688);_0x42d688+=0x4;const _0x62c7e4=_0x367b2f[_0x5b38e0(0x32e)](_0x42d688++),_0x16992c=_0x367b2f['slice'](_0x42d688,_0x42d688+_0x62c7e4)[_0x5b38e0(0x314)]('utf8');_0x42d688+=_0x62c7e4;const _0x3067fa=_0x367b2f['readUInt16BE'](_0x42d688);_0x42d688+=0x2;const _0x4a0956={};for(let _0x756ed6=0x0;_0x756ed6<_0x543955[_0x5b38e0(0x252)];_0x756ed6++){_0x4a0956[_0x543955[_0x756ed6]]=Boolean(_0x3067fa&0x1<<_0x756ed6);}const _0x332294=[_0x5b38e0(0xf4),_0x5b38e0(0xf8),_0x5b38e0(0x312),'maxWrites'],_0x5b22dc={};for(const _0x542d9c of _0x332294){const _0x52edb2=_0x367b2f[_0x5b38e0(0x254)](_0x42d688);_0x42d688+=0x4,_0x5b22dc[_0x542d9c]=_0x52edb2===0x0?null:_0x52edb2;}return{'v':_0x861316,'licenseType':_0x41d97d,'issuedAt':_0x5f02e7*0x3e8,'expiresAt':_0x5d4ad6*0x3e8,'licensee':_0x16992c,'features':_0x4a0956,'limits':_0x5b22dc};}function _0x1f09ff(_0xb8e119,_0x49d238){const _0x3ec4f2=_0x4217cf,_0x1eb871=Buffer['concat']([_0xb8e119,_0x49d238]),_0x1b604f=_0x2196ab(_0x1eb871),_0x1f282d=[];for(let _0x111a13=0x0;_0x111a13<_0x1b604f[_0x3ec4f2(0x252)];_0x111a13+=0x8){_0x1f282d[_0x3ec4f2(0x34f)](_0x1b604f['slice'](_0x111a13,_0x111a13+0x8));}return _0x1f282d[_0x3ec4f2(0x347)]('-');}function _0x56ffae(_0x5949ea){const _0x32edbb=_0x4217cf;if(typeof _0x5949ea!==_0x32edbb(0x1e9))throw new Error(_0x32edbb(0xe5));const _0x4c9604=_0x1ea359(_0x5949ea[_0x32edbb(0x141)](/-/g,''));if(_0x4c9604['length']<0x41)throw new Error(_0x32edbb(0x114)+_0x4c9604[_0x32edbb(0x252)]+_0x32edbb(0x2b9));const _0x55130a=_0x4c9604[_0x32edbb(0x19b)](0x0,_0x4c9604[_0x32edbb(0x252)]-0x40),_0x3689be=_0x4c9604['slice'](_0x4c9604[_0x32edbb(0x252)]-0x40);let _0x3e8d83;try{_0x3e8d83=_0x378f88(_0x55130a);}catch(_0x156168){throw new Error('decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20'+_0x156168['message']);}return{'rawBuf':_0x4c9604,'payload':_0x55130a,'sig':_0x3689be,'decoded':_0x3e8d83};}function _0x460a4d(_0x138467){const _0x4b33ad=_0x4217cf;return _0x5bda64[_0x4b33ad(0x34e)]('sha256')[_0x4b33ad(0x222)](_0x138467)[_0x4b33ad(0x23f)]()[_0x4b33ad(0x19b)](0x0,0x8);}function _0x22da65(_0x2ab471,_0x572ec2,_0x49eef2){const _0x27848f=_0x4217cf,_0x4384cc='OKDB-PIN-V1:'+_0x49eef2,_0x339c6e=Buffer[_0x27848f(0x398)]([Buffer[_0x27848f(0x1e1)](_0x2ab471,_0x27848f(0x1cf)),_0x572ec2]),_0x29ffad=_0x5bda64[_0x27848f(0x13d)](_0x27848f(0x380),_0x4384cc)[_0x27848f(0x222)](_0x339c6e)[_0x27848f(0x23f)](),_0x24cfcc=_0x2196ab(_0x29ffad[_0x27848f(0x19b)](0x0,0x5));return{'pin':_0x24cfcc,'pinHmac':_0x29ffad};}function _0x3347c2(_0x54318e,_0x2e297d,_0x2686b0){const _0x175a79=_0x4217cf,_0x1a9aae=Buffer[_0x175a79(0x364)](0x4d);let _0x2ac999=0x0;_0x1a9aae[_0x175a79(0x3a2)](0x1,_0x2ac999++),_0x54318e[_0x175a79(0x129)](_0x1a9aae,_0x2ac999),_0x2ac999+=0x8,_0x1a9aae['writeUInt32BE'](_0x2e297d,_0x2ac999),_0x2ac999+=0x4,_0x2686b0[_0x175a79(0x129)](_0x1a9aae,_0x2ac999);const _0x4f2855=_0x2196ab(_0x1a9aae),_0x1bf77e=[];for(let _0x4ec0d4=0x0;_0x4ec0d4<_0x4f2855[_0x175a79(0x252)];_0x4ec0d4+=0x6){_0x1bf77e['push'](_0x4f2855['slice'](_0x4ec0d4,_0x4ec0d4+0x6));}return _0x1bf77e['join']('-');}function _0x1b08e4(_0x877963){const _0x55fac8=_0x4217cf;if(typeof _0x877963!=='string')throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x54e7f8=_0x1ea359(_0x877963[_0x55fac8(0x141)](/-/g,''));if(_0x54e7f8['length']!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x54e7f8[_0x55fac8(0x252)]);let _0x378200=0x0;const _0x41b91f=_0x54e7f8['readUInt8'](_0x378200++),_0x166870=_0x54e7f8[_0x55fac8(0x19b)](_0x378200,_0x378200+0x8);_0x378200+=0x8;const _0x920c6d=_0x54e7f8[_0x55fac8(0x254)](_0x378200);_0x378200+=0x4;const _0x3c0880=_0x54e7f8[_0x55fac8(0x19b)](_0x378200);return{'v':_0x41b91f,'licenseHash':_0x166870,'expiry':_0x920c6d,'sig':_0x3c0880};}function _0x15efd7({tokenString:_0x536064,nodeId:_0x1911d2,rawBlobBuf:_0x3dc99b,pubKeyPem:_0x5f5176,pubFingerprint:_0x45c979}){const _0x223cc3=_0x4217cf;let _0x3cae62;try{_0x3cae62=_0x1b08e4(_0x536064);}catch(_0x9e8b65){return{'valid':![],'reason':_0x223cc3(0x13b)};}const _0x5a97a1=_0x460a4d(_0x3dc99b);if(!_0x5a97a1[_0x223cc3(0x292)](_0x3cae62['licenseHash']))return{'valid':![],'reason':_0x223cc3(0x316)};const {pinHmac:_0x14dfd0}=_0x22da65(_0x1911d2,_0x5a97a1,_0x45c979),_0x27b192=Buffer['allocUnsafe'](0x4);_0x27b192[_0x223cc3(0xe1)](_0x3cae62[_0x223cc3(0x2da)],0x0);const _0x53a999=Buffer['concat']([Buffer[_0x223cc3(0x1e1)]([_0x3cae62['v']]),_0x14dfd0[_0x223cc3(0x19b)](0x0,0x5),_0x3cae62[_0x223cc3(0x27e)],_0x27b192]);try{const _0x2e14a4=_0x5bda64[_0x223cc3(0x238)](null,_0x53a999,_0x5f5176,_0x3cae62[_0x223cc3(0x1ff)]);if(!_0x2e14a4)return{'valid':![],'reason':_0x223cc3(0xee)};}catch(_0x15b9f3){return{'valid':![],'reason':_0x223cc3(0xee)};}if(_0x3cae62['expiry']<Date[_0x223cc3(0x3a5)]()/0x3e8)return{'valid':![],'reason':_0x223cc3(0x179)};return{'valid':!![],'reason':'ok'};}function _0x56e4d6(_0x4b11d3){const _0x58ed18=_0x4217cf;if(typeof _0x4b11d3!==_0x58ed18(0x1e9))return'unknown';const _0x337321=_0x4b11d3['trim']();if(_0x337321[_0x58ed18(0x84)]('/')||_0x337321[_0x58ed18(0x84)]('./')||_0x337321[_0x58ed18(0x84)]('../')||/^[A-Za-z]:[\\/]/[_0x58ed18(0x2ea)](_0x337321))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x58ed18(0x2ea)](_0x337321))return _0x58ed18(0xa2);const _0x137423=_0x337321[_0x58ed18(0x141)](/[\s-]+/g,'')[_0x58ed18(0x252)];if(_0x137423===0x7c)return _0x58ed18(0x375);if(_0x137423>=0x95&&_0x137423<=0xfc)return _0x58ed18(0xb4);return _0x58ed18(0xde);}return okdbLicenseCodec={'toBase32':_0x2196ab,'fromBase32':_0x1ea359,'encodeLicensePayload':_0x1bc024,'decodeLicensePayload':_0x378f88,'encodeLicenseBlob':_0x1f09ff,'decodeLicenseBlob':_0x56ffae,'licenseHash':_0x460a4d,'derivePin':_0x22da65,'encodeActivationToken':_0x3347c2,'decodeActivationToken':_0x1b08e4,'verifyActivation':_0x15efd7,'detectInputType':_0x56e4d6,'FEATURE_NAMES':_0x543955,'LICENSE_TYPE_STANDARD':_0x9cdecc,'LICENSE_TYPE_OPEN':_0x264c23,'LICENSE_TYPE_INTERNAL':_0x250681,'OPEN_LICENSE_MAX_DURATION_MS':_0x22e34f},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x3c6ac2 extends Error{constructor(_0x5c01aa,_0x353bb3,_0x36ca59={}){const _0xe6563=_0x5721;super(_0x5c01aa),this['name']=_0xe6563(0xdc),this[_0xe6563(0x191)]=_0x353bb3,this[_0xe6563(0x34c)]=_0x36ca59,_0x36ca59[_0xe6563(0x3a0)]&&(this[_0xe6563(0x3a0)]=_0x36ca59[_0xe6563(0x3a0)]),Error['captureStackTrace'](this,this['constructor']);}}class _0x3aa723 extends _0x3c6ac2{constructor(_0x246d72,_0x4a5e9c,_0x4358d6,_0x4c707e){const _0x5b8afe=_0x5721;super(_0x5b8afe(0x2cb)+_0x246d72+'@'+_0x4a5e9c+_0x5b8afe(0x246)+_0x4358d6+',\x20got\x20'+_0x4c707e,_0x5b8afe(0x32b),{'type':_0x246d72,'key':_0x4a5e9c,'expectedVersion':_0x4358d6,'actualVersion':_0x4c707e}),this[_0x5b8afe(0x383)]=_0x5b8afe(0x27a);}}class _0x336d63 extends _0x3c6ac2{constructor(_0x22e24f,_0x2d1d81){const _0x4ca454=_0x5721;super(_0x22e24f+'@'+_0x2d1d81+_0x4ca454(0x2f3),_0x4ca454(0xd3),{'type':_0x22e24f,'key':_0x2d1d81}),this[_0x4ca454(0x383)]=_0x4ca454(0x149);}}class _0x4096b9 extends _0x3c6ac2{constructor(_0x53293b,_0x895bfc){const _0x2c7198=_0x5721;super(_0x53293b+'@'+_0x895bfc+'\x20already\x20exists',_0x2c7198(0x270),{'type':_0x53293b,'key':_0x895bfc}),this['name']='OKDBAlreadyExistsError';}}class _0x146a1f extends _0x3c6ac2{constructor(_0x3369a1,_0x10c561){const _0x40544b=_0x5721,_0x52eca0=typeof _0x10c561;super(_0x40544b(0x2e1)+_0x3369a1+_0x40544b(0x14b)+_0x52eca0+_0x40544b(0x282)+_0x10c561,'INVALID_INDEX_KEY',{'index':_0x3369a1,'key':_0x10c561,'keyType':_0x52eca0}),this['name']=_0x40544b(0x133);}}class _0xa25824 extends _0x3c6ac2{constructor(_0x3bfe74){const _0x54cf69=_0x5721,_0x4493f9=typeof _0x3bfe74;super(_0x54cf69(0x161)+_0x4493f9+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x3bfe74,_0x54cf69(0x29b),{'key':_0x3bfe74,'keyType':_0x4493f9}),this[_0x54cf69(0x383)]=_0x54cf69(0x31b);}}class _0x11d04b extends _0x3c6ac2{constructor(_0x5350f7){const _0x364157=_0x5721;super(_0x364157(0x1e5)+_0x5350f7+'\x27\x20doesn\x27t\x20exist',_0x364157(0x1c0),{'type':_0x5350f7}),this['name']=_0x364157(0xdb);}}class _0x376579 extends _0x3c6ac2{constructor(_0xa409cb){const _0x41dff2=_0x5721;super(_0x41dff2(0x1e5)+_0xa409cb+'\x27\x20already\x20registered',_0x41dff2(0x28a),{'type':_0xa409cb}),this[_0x41dff2(0x383)]=_0x41dff2(0x10b);}}class _0x4afb88 extends _0x3c6ac2{constructor(_0x44c643,_0x3de961){const _0x22718a=_0x5721;super(_0x22718a(0xca)+_0x3de961+_0x22718a(0x11c)+_0x44c643+_0x22718a(0x182),_0x22718a(0x29d),{'type':_0x44c643,'index':_0x3de961}),this[_0x22718a(0x383)]=_0x22718a(0x1f6);}}class _0x2ffc1d extends _0x3c6ac2{constructor(_0x3d7343,_0x3d14c5){const _0xd25aa8=_0x5721;super(_0xd25aa8(0xca)+_0x3d14c5+_0xd25aa8(0x11c)+_0x3d7343+'\x27\x20is\x20already\x20registered',_0xd25aa8(0x353),{'type':_0x3d7343,'index':_0x3d14c5}),this['name']='OKDBIndexAlreadyRegisteredError';}}class _0x509e1a extends _0x3c6ac2{constructor(_0x121eed,_0x125940={}){const _0x3758b4=_0x5721;super(_0x121eed,'INVALID_VALUE',_0x125940),this[_0x3758b4(0x383)]=_0x3758b4(0x386);}}class _0x3fd49e extends _0x3c6ac2{constructor(_0x3e43d6,_0x25fd20,_0x3a4e2e,_0x46cc68,_0x1bdf79){const _0x5d4de1=_0x5721;super(_0x5d4de1(0x356)+_0x3e43d6+'@'+_0x25fd20+_0x5d4de1(0xcf)+_0x3a4e2e+_0x5d4de1(0x143)+_0x46cc68+_0x5d4de1(0x19f)+_0x1bdf79+'\x27','UNIQUE_CONSTRAINT',{'type':_0x3e43d6,'index':_0x25fd20,'indexKey':_0x3a4e2e,'existingKey':_0x46cc68,'conflictingKey':_0x1bdf79}),this[_0x5d4de1(0x383)]=_0x5d4de1(0x2a5);}}class _0x242486 extends _0x3c6ac2{constructor(_0x583afd,_0x389771,_0x39a40f){const _0x58c796=_0x5721;super(_0x58c796(0x367)+_0x583afd+'@'+_0x389771,_0x58c796(0x11b),{'type':_0x583afd,'key':_0x389771,'errors':_0x39a40f}),this[_0x58c796(0x383)]='OKDBSchemaValidationError',this[_0x58c796(0x87)]=_0x583afd,this[_0x58c796(0x168)]=_0x389771,this[_0x58c796(0x124)]=_0x39a40f;}}class _0x2906bd extends _0x3c6ac2{constructor(_0x33a79f,_0x500527){const _0x3f2e28=_0x5721;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x33a79f+':\x20'+_0x500527[_0x3f2e28(0x252)]+_0x3f2e28(0x342),_0x3f2e28(0xa6),{'type':_0x33a79f,'failures':_0x500527}),this[_0x3f2e28(0x383)]='OKDBSchemaCollectionError',this[_0x3f2e28(0x87)]=_0x33a79f,this[_0x3f2e28(0x2d5)]=_0x500527;}}class _0x121c4d extends _0x3c6ac2{constructor(_0x13eafa,_0x1b3441,_0x29bb5a,_0x415ad0,_0x82d23d){const _0x44ff6c=_0x5721;super(_0x44ff6c(0x30f)+_0x13eafa+'@'+_0x1b3441+'.'+_0x29bb5a+_0x44ff6c(0xd4)+_0x415ad0+'@'+_0x82d23d+_0x44ff6c(0x27f),_0x44ff6c(0x119),{'sourceType':_0x13eafa,'sourceKey':_0x1b3441,'fieldPath':_0x29bb5a,'targetType':_0x415ad0,'targetKey':_0x82d23d}),this[_0x44ff6c(0x383)]='OKDBForeignKeyError',this[_0x44ff6c(0x1b3)]=_0x13eafa,this[_0x44ff6c(0xab)]=_0x1b3441,this[_0x44ff6c(0x262)]=_0x29bb5a,this['targetType']=_0x415ad0,this[_0x44ff6c(0x9a)]=_0x82d23d;}}class _0x5660cc extends _0x3c6ac2{constructor(_0x1a1e0a,_0x283360,_0x36be0b){const _0x1f7830=_0x5721;super(_0x1f7830(0x291)+_0x1a1e0a+'@'+_0x283360+':\x20'+_0x36be0b[_0x1f7830(0x252)]+_0x1f7830(0x177),_0x1f7830(0x324),{'targetType':_0x1a1e0a,'targetKey':_0x283360,'references':_0x36be0b}),this['name']=_0x1f7830(0x267),this['targetType']=_0x1a1e0a,this[_0x1f7830(0x9a)]=_0x283360,this['references']=_0x36be0b;}}class _0x1dd900 extends _0x3c6ac2{constructor(_0x36baa7,_0x261da2,_0x3b55ab){const _0x437f6a=_0x5721;super('Index\x20\x22'+_0x261da2+'\x22\x20on\x20\x22'+_0x36baa7+_0x437f6a(0x8f)+_0x3b55ab['map'](_0x3855ba=>_0x3855ba[_0x437f6a(0xdf)]+':'+_0x3855ba[_0x437f6a(0x383)])[_0x437f6a(0x347)](',\x20'),_0x437f6a(0x9e),{'type':_0x36baa7,'index':_0x261da2,'usedBy':_0x3b55ab}),this[_0x437f6a(0x383)]=_0x437f6a(0x35b);}}return okdbError={'OKDBError':_0x3c6ac2,'OKDBVersionMismatchError':_0x3aa723,'OKDBNotFoundError':_0x336d63,'OKDBAlreadyExistsError':_0x4096b9,'OKDBInvalidIndexKeyError':_0x146a1f,'OKDBInvalidPrimaryKeyError':_0xa25824,'OKDBTypeNotRegisteredError':_0x11d04b,'OKDBTypeAlreadyRegisteredError':_0x376579,'OKDBIndexNotRegisteredError':_0x4afb88,'OKDBIndexAlreadyRegisteredError':_0x2ffc1d,'OKDBInvalidValueError':_0x509e1a,'OKDBUniqueConstraintError':_0x3fd49e,'OKDBSchemaValidationError':_0x242486,'OKDBSchemaCollectionError':_0x2906bd,'OKDBForeignKeyError':_0x121c4d,'OKDBForeignKeyDeleteError':_0x5660cc,'OKDBIndexHasConsumersError':_0x1dd900},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x11a3ef=_0x1f0ec4;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x34f93c={'PUT':_0x11a3ef(0x233),'REMOVE':_0x11a3ef(0x26b),'INDEX_DROP':_0x11a3ef(0x2d8),'INDEX_REGISTER':_0x11a3ef(0x219),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':'dropType','FTS_REGISTER':_0x11a3ef(0x15b),'FTS_DROP':'dropFts','FTS_RESET':_0x11a3ef(0x22e),'SCHEMA_SET':_0x11a3ef(0x343),'SCHEMA_DROP':_0x11a3ef(0x1f2),'TTL_SET':'setTtl','TTL_CLEAR':_0x11a3ef(0x1ee)},_0xa00202={'SYSTEM_READY':_0x11a3ef(0x170),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x11a3ef(0x37c),'SYSTEM_POKE':_0x11a3ef(0x1d8),'SYSTEM_DRAIN':_0x11a3ef(0x122),'SYSTEM_BUS_STATE_CHANGE':_0x11a3ef(0x337),'ITEM_CREATE':_0x11a3ef(0x1fd),'ITEM_UPDATE':_0x11a3ef(0xe7),'ITEM_REMOVE':_0x11a3ef(0x1d1),'INDEX_RESET':_0x11a3ef(0x377),'INDEX_READY':'index:ready','INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x11a3ef(0x1b0),'INDEX_DROP':_0x11a3ef(0xf9),'INDEX_REGISTERED':_0x11a3ef(0x27b),'FTS_REGISTERED':_0x11a3ef(0x17e),'FTS_DROP':_0x11a3ef(0xfd),'FTS_RESET':_0x11a3ef(0x30a),'SCHEMA_SET':_0x11a3ef(0x187),'SCHEMA_DROP':_0x11a3ef(0x36c),'UNIQUE_VIOLATION':_0x11a3ef(0x127),'UNIQUE_VIOLATION_RESOLVED':_0x11a3ef(0x1cd),'REF_VIOLATION':_0x11a3ef(0x144),'REF_VIOLATION_RESOLVED':_0x11a3ef(0x24d),'SYNC_APPLY':_0x11a3ef(0x2c2),'TXN_START':_0x11a3ef(0x273),'TXN_END':_0x11a3ef(0x2cd),'TXN_ROLLBACK':_0x11a3ef(0x128),'TYPE_REGISTERED':_0x11a3ef(0x39c),'TYPE_DROP':_0x11a3ef(0x202),'ENV_OPENED':_0x11a3ef(0xbb),'ENV_REMOVED':_0x11a3ef(0x283),'TTL_EXPIRED':_0x11a3ef(0x38b),'TTL_SET':_0x11a3ef(0xad),'TTL_CLEAR':_0x11a3ef(0x1c8),'LICENSE_INVALID':_0x11a3ef(0x95),'LICENSE_ADDED':_0x11a3ef(0x2fd),'LICENSE_ACTIVATED':_0x11a3ef(0xc4),'LICENSE_REMOVED':_0x11a3ef(0x382)},_0x36e3dc={'CREATING':_0x11a3ef(0x1f1),'RESETTING':_0x11a3ef(0x376),'READY':_0x11a3ef(0x17d),'DROPPING':_0x11a3ef(0x1f0),'WAITING':_0x11a3ef(0x2aa)},_0x4a6d4f={'CREATED':_0x11a3ef(0x19a),'STARTING':_0x11a3ef(0x199),'STARTED':_0x11a3ef(0x396),'STOPPING':_0x11a3ef(0x80),'STOPPED':'stopped'},_0x3b7059={'CREATING':_0x11a3ef(0x1f1),'READY':_0x11a3ef(0x17d),'HALTED':_0x11a3ef(0x203),'STOPPED':_0x11a3ef(0x14d),'RESETTING':_0x11a3ef(0x376)},_0x1bc037=Object[_0x11a3ef(0x30b)]({'POKE':'bus:poke','DRAIN':'bus:drain'});return okdbEnums={'BUS_EVENTS':_0x1bc037,'CHANGE_ACTIONS':_0x34f93c,'EVENTS':_0xa00202,'INDEX_STATE':_0x36e3dc,'OKDB_STATE':_0x4a6d4f,'VIEW_STATE':_0x3b7059},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x5bf02a=_0x1f0ec4;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x29e37c=require$$1,_0x174d61=require$$1$1,_0x3d19ae=require$$0,_0x4b01d3=_0x29e37c[_0x5bf02a(0x37a)](_0x174d61[_0x5bf02a(0x347)](__dirname,'keys/public.pem'),_0x5bf02a(0x1cf))[_0x5bf02a(0x213)](),_0x34556b=_0x3d19ae[_0x5bf02a(0x2b5)](_0x4b01d3)['export']({'type':_0x5bf02a(0x344),'format':_0x5bf02a(0x2af)}),_0x1e43d9=_0x3d19ae[_0x5bf02a(0x34e)]('sha256')[_0x5bf02a(0x222)](_0x34556b)[_0x5bf02a(0x23f)](_0x5bf02a(0xa8))[_0x5bf02a(0x19b)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x4b01d3,'PUB_FINGERPRINT':_0x1e43d9},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0xe4e190=_0x1f0ec4;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x29ff27=require$$0,{OKDBError:_0x312bb6}=requireOkdbError(),{EVENTS:_0x22c4ea}=requireOkdbEnums(),_0x1b9765=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x4acefb,LICENSE_TYPE_INTERNAL:_0x4076ff,OPEN_LICENSE_MAX_DURATION_MS:_0x36a249}=_0x1b9765,_0x214533=requireOkdbPubkey(),_0x342141={'LICENSED_BUILD':'true','PUBLIC_KEY_PEM':_0x214533[_0xe4e190(0x1ac)],'PUB_FINGERPRINT':_0x214533[_0xe4e190(0xbf)],'LICENSE_EXPIRED_ACTION':_0xe4e190(0xcc)},_0x337b63='~licenses',_0x5543ee={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x491e53(_0x9380e7){const _0x11c9ac=_0xe4e190;!_0x9380e7[_0x11c9ac(0x8c)](_0x337b63)&&await _0x9380e7[_0x11c9ac(0x9d)](_0x337b63);}class _0x1b2e25{constructor(_0x49c6ab){const _0x11e97f=_0xe4e190;this[_0x11e97f(0x146)]=_0x49c6ab,this[_0x11e97f(0x2c1)]=null;}async[_0xe4e190(0xc1)](){const _0x55e42e=_0xe4e190,_0x3c87c1=this[_0x55e42e(0x146)]['_systemEnv'];if(!_0x3c87c1||!_0x3c87c1['hasType'](_0x337b63)){this[_0x55e42e(0x2c1)]=null;return;}const _0x4fae98=this[_0x55e42e(0x146)]['id'];let _0x1c335b=null;for(const {key:_0x1e547a,value:_0xaaee1b}of _0x3c87c1[_0x55e42e(0x2c8)](_0x337b63)){const _0x3d3c29=this['_computeStatus'](_0xaaee1b,_0x4fae98);_0x3d3c29==='active'&&!_0x1c335b&&(_0x1c335b={..._0xaaee1b,'id':_0x1e547a,'status':_0x3d3c29});}this[_0x55e42e(0x2c1)]=_0x1c335b;if(this[_0x55e42e(0x2c1)]&&this['_active']['licenseType']===_0x4acefb){const _0x3a67ad=Math[_0x55e42e(0x10c)]((this['_active'][_0x55e42e(0x9b)]-Date[_0x55e42e(0x3a5)]())/0x5265c00);this['okdb'][_0x55e42e(0xcc)]?.['warn']('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x3a67ad+'\x20day(s).',{'feature':_0x55e42e(0x14a),'licensee':this[_0x55e42e(0x2c1)][_0x55e42e(0x21b)],'expiresAt':new Date(this[_0x55e42e(0x2c1)]['expiresAt'])[_0x55e42e(0x1aa)]()});}this['_active']&&this[_0x55e42e(0x2c1)][_0x55e42e(0x263)]===_0x4076ff&&this[_0x55e42e(0x146)][_0x55e42e(0xcc)]?.[_0x55e42e(0xa7)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':'license','licensee':this[_0x55e42e(0x2c1)][_0x55e42e(0x21b)]});}['_computeStatus'](_0x5e23b3,_0x4a99d0){const _0x4fa8fa=_0xe4e190;if(!_0x5e23b3[_0x4fa8fa(0xb4)])return _0x4fa8fa(0xa1);let _0x3b74ec;try{_0x3b74ec=_0x1b9765[_0x4fa8fa(0x2ad)](_0x5e23b3[_0x4fa8fa(0xb4)]);}catch(_0x4795f7){return'invalid';}try{const _0x36fc82=_0x29ff27['verify'](null,_0x3b74ec[_0x4fa8fa(0x2c3)],_0x342141[_0x4fa8fa(0x1ac)],_0x3b74ec['sig']);if(!_0x36fc82)return _0x4fa8fa(0xa1);}catch(_0x547c74){return _0x4fa8fa(0xa1);}if(_0x3b74ec[_0x4fa8fa(0x18b)][_0x4fa8fa(0x263)]===_0x4076ff)return _0x4fa8fa(0x2ed);if(_0x3b74ec[_0x4fa8fa(0x18b)][_0x4fa8fa(0x9b)]<=Date[_0x4fa8fa(0x3a5)]())return _0x4fa8fa(0x38d);if(_0x3b74ec[_0x4fa8fa(0x18b)][_0x4fa8fa(0x263)]===_0x4acefb)return _0x4fa8fa(0x2ed);if(!_0x5e23b3[_0x4fa8fa(0x375)])return _0x4fa8fa(0xe2);const _0x350e91=_0x1b9765[_0x4fa8fa(0x189)]({'tokenString':_0x5e23b3[_0x4fa8fa(0x375)],'nodeId':_0x4a99d0,'rawBlobBuf':_0x3b74ec[_0x4fa8fa(0x338)],'pubKeyPem':_0x342141['PUBLIC_KEY_PEM'],'pubFingerprint':_0x342141['PUB_FINGERPRINT']});if(_0x350e91[_0x4fa8fa(0x32f)]===_0x4fa8fa(0x316)||_0x350e91[_0x4fa8fa(0x32f)]===_0x4fa8fa(0xee))return _0x4fa8fa(0x31e);if(_0x350e91[_0x4fa8fa(0x32f)]===_0x4fa8fa(0x179))return _0x4fa8fa(0x38d);if(!_0x350e91[_0x4fa8fa(0x101)])return _0x4fa8fa(0x31e);return _0x4fa8fa(0x2ed);}get[_0xe4e190(0x2ed)](){return this['_active'];}get[_0xe4e190(0x3a1)](){const _0x25fa7f=_0xe4e190;return this[_0x25fa7f(0x2c1)]??_0x5543ee;}['assertFeature'](_0x3ce0da){const _0x217223=_0xe4e190;if(_0x342141[_0x217223(0xc9)]!==_0x217223(0x173))return;const _0x26621c=this['effective'];if(!_0x26621c[_0x217223(0x1fc)]?.[_0x3ce0da]){const _0x5d5180=_0x26621c[_0x217223(0x35f)]?_0x217223(0x276)+_0x3ce0da+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x3ce0da+_0x217223(0x2bf):_0x217223(0x351)+_0x3ce0da+_0x217223(0x379)+_0x3ce0da+'\x22.';throw new _0x312bb6(_0x5d5180,_0x217223(0xa0),{'feature':_0x3ce0da});}}[_0xe4e190(0x258)](_0x19ee8a){const _0x25da3a=_0xe4e190;if(_0x342141[_0x25da3a(0xc9)]!=='true')return!![];return!!this[_0x25da3a(0x3a1)][_0x25da3a(0x1fc)]?.[_0x19ee8a];}['assertLimit'](_0x4f17d4,_0x59ffbd){const _0x4d7fc5=_0xe4e190;if(_0x342141[_0x4d7fc5(0xc9)]!==_0x4d7fc5(0x173))return;const _0x20ed3d=this[_0x4d7fc5(0x3a1)],_0x1a7433=_0x20ed3d[_0x4d7fc5(0x2bd)]?.[_0x4f17d4];if(_0x1a7433===null||_0x1a7433===undefined||_0x1a7433===0x0)return;if(_0x59ffbd>=_0x1a7433)throw new _0x312bb6(_0x4d7fc5(0x226)+_0x4f17d4+'\x20('+_0x59ffbd+'/'+_0x1a7433+')',_0x4d7fc5(0x198),{'limit':_0x4f17d4,'current':_0x59ffbd,'max':_0x1a7433});}async[_0xe4e190(0x1df)](_0x1de88e){const _0x4b87f6=_0xe4e190;let _0x3e767d;try{_0x3e767d=_0x1b9765['decodeLicenseBlob'](_0x1de88e);}catch(_0x2981c5){throw new _0x312bb6(_0x4b87f6(0x1c1)+_0x2981c5['message'],'LICENSE_INVALID');}let _0x3fdb9b;try{_0x3fdb9b=_0x29ff27[_0x4b87f6(0x238)](null,_0x3e767d[_0x4b87f6(0x2c3)],_0x342141[_0x4b87f6(0x1ac)],_0x3e767d[_0x4b87f6(0x1ff)]);}catch(_0x5844ec){throw new _0x312bb6(_0x4b87f6(0x268)+_0x5844ec[_0x4b87f6(0x394)],'LICENSE_INVALID');}if(!_0x3fdb9b)throw new _0x312bb6(_0x4b87f6(0x130)+(_0x4b87f6(0x206)+_0x342141[_0x4b87f6(0xbf)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x4b87f6(0x323),{'expectedFingerprint':_0x342141[_0x4b87f6(0xbf)]});if(_0x3e767d['decoded'][_0x4b87f6(0x263)]===_0x4acefb){const _0x18a165=_0x3e767d['decoded'][_0x4b87f6(0x9b)]-_0x3e767d[_0x4b87f6(0x18b)]['issuedAt'];if(_0x18a165>_0x36a249)throw new _0x312bb6(_0x4b87f6(0x373)+Math[_0x4b87f6(0x10c)](_0x18a165/(0x1e*0x5265c00))+_0x4b87f6(0x229),'LICENSE_INVALID');}const _0xc40857=this[_0x4b87f6(0x146)][_0x4b87f6(0x249)];await _0x491e53(_0xc40857);const _0x358c3f=_0x1b9765[_0x4b87f6(0x27e)](_0x3e767d[_0x4b87f6(0x338)])[_0x4b87f6(0x314)](_0x4b87f6(0xa8));for(const {value:_0x2723bf}of _0xc40857[_0x4b87f6(0x2c8)](_0x337b63)){if(_0x2723bf[_0x4b87f6(0x1a8)]===_0x358c3f)throw new _0x312bb6(_0x4b87f6(0x309),'LICENSE_INVALID');}const _0x83e406=_0x29ff27[_0x4b87f6(0x138)](),_0x487a42={'blob':_0x1de88e,'activation':null,'addedAt':Date['now'](),'_licenseHash':_0x358c3f,'licensee':_0x3e767d[_0x4b87f6(0x18b)][_0x4b87f6(0x21b)],'expiresAt':_0x3e767d['decoded'][_0x4b87f6(0x9b)],'features':_0x3e767d[_0x4b87f6(0x18b)]['features'],'limits':_0x3e767d[_0x4b87f6(0x18b)][_0x4b87f6(0x2bd)],'licenseType':_0x3e767d[_0x4b87f6(0x18b)]['licenseType']};return await _0xc40857[_0x4b87f6(0x233)](_0x337b63,_0x83e406,_0x487a42),{'id':_0x83e406,..._0x487a42};}async['activateLicense'](_0x36f7bf){const _0x1b433c=_0xe4e190;let _0xa79e75;try{_0xa79e75=_0x1b9765['decodeActivationToken'](_0x36f7bf);}catch(_0x399b11){throw new _0x312bb6(_0x1b433c(0xac)+_0x399b11[_0x1b433c(0x394)],_0x1b433c(0x193));}const _0x1849af=_0xa79e75[_0x1b433c(0x27e)]['toString'](_0x1b433c(0xa8)),_0xb223a5=this[_0x1b433c(0x146)][_0x1b433c(0x249)];if(!_0xb223a5||!_0xb223a5[_0x1b433c(0x8c)](_0x337b63))throw new _0x312bb6(_0x1b433c(0x2a4),_0x1b433c(0x193));let _0xad1378=null,_0x190898=null;for(const {key:_0x105713,value:_0x1d49ee}of _0xb223a5['getRange'](_0x337b63)){if(_0x1d49ee[_0x1b433c(0x1a8)]===_0x1849af){_0xad1378=_0x105713,_0x190898=_0x1d49ee;break;}}if(!_0xad1378)throw new _0x312bb6(_0x1b433c(0x2a4),_0x1b433c(0x193));const {rawBuf:_0xbfb4e9}=_0x1b9765[_0x1b433c(0x2ad)](_0x190898[_0x1b433c(0xb4)]),_0x109b51=_0x1b9765[_0x1b433c(0x189)]({'tokenString':_0x36f7bf,'nodeId':this[_0x1b433c(0x146)]['id'],'rawBlobBuf':_0xbfb4e9,'pubKeyPem':_0x342141[_0x1b433c(0x1ac)],'pubFingerprint':_0x342141[_0x1b433c(0xbf)]});if(!_0x109b51[_0x1b433c(0x101)])throw new _0x312bb6('Activation\x20invalid:\x20'+_0x109b51[_0x1b433c(0x32f)],_0x1b433c(0x193),{'reason':_0x109b51['reason']});const _0x35d4fd={..._0x190898,'activation':_0x36f7bf};return await _0xb223a5['update'](_0x337b63,_0xad1378,_0x35d4fd),{'id':_0xad1378,..._0x35d4fd};}async['removeLicense'](_0x6221b1){const _0x173b83=_0xe4e190,_0x25ad0f=this[_0x173b83(0x146)][_0x173b83(0x249)];if(!_0x25ad0f||!_0x25ad0f[_0x173b83(0x8c)](_0x337b63))return;await _0x25ad0f[_0x173b83(0x26b)](_0x337b63,_0x6221b1);}async[_0xe4e190(0x288)](){const _0x29ff0c=_0xe4e190,_0x42a7a7=this[_0x29ff0c(0x146)][_0x29ff0c(0x249)];if(!_0x42a7a7||!_0x42a7a7['hasType'](_0x337b63))return[];const _0x44cf74=this[_0x29ff0c(0x146)]['id'],_0x50d85b=[];for(const {key:_0x262af2,value:_0x237524}of _0x42a7a7['getRange'](_0x337b63)){const _0x21c82b=this['_computeStatus'](_0x237524,_0x44cf74);_0x50d85b[_0x29ff0c(0x34f)]({..._0x237524,'id':_0x262af2,'status':_0x21c82b});}return _0x50d85b;}[_0xe4e190(0x39d)](){const _0xd2b003=_0xe4e190,_0x3c1c3b=this[_0xd2b003(0x146)][_0xd2b003(0x249)];if(!_0x3c1c3b||!_0x3c1c3b[_0xd2b003(0x8c)](_0x337b63))return[];const _0x1938bd=this[_0xd2b003(0x146)]['id'],_0x24e047=[];for(const {key:_0x3de879,value:_0x1fc1f8}of _0x3c1c3b[_0xd2b003(0x2c8)](_0x337b63)){if(_0x1fc1f8[_0xd2b003(0x1a8)]){if(_0x1fc1f8[_0xd2b003(0x263)]===_0x4acefb)_0x24e047[_0xd2b003(0x34f)]({'licenseId':_0x3de879,'pin':null});else{const _0x2d336b=Buffer['from'](_0x1fc1f8[_0xd2b003(0x1a8)],_0xd2b003(0xa8)),{pin:_0x4290f4}=_0x1b9765[_0xd2b003(0x92)](_0x1938bd,_0x2d336b,_0x342141[_0xd2b003(0xbf)]);_0x24e047[_0xd2b003(0x34f)]({'licenseId':_0x3de879,'pin':_0x4290f4});}}}return _0x24e047;}async['recheck'](){const _0x102fcb=_0xe4e190,_0x3fa79a=this['_active'];await this[_0x102fcb(0xc1)]();if(this[_0x102fcb(0x2c1)]&&this[_0x102fcb(0x2c1)]['licenseType']===_0x4acefb){const _0x1835c4=Math['ceil']((this[_0x102fcb(0x2c1)][_0x102fcb(0x9b)]-Date[_0x102fcb(0x3a5)]())/0x5265c00);this[_0x102fcb(0x146)][_0x102fcb(0xcc)]?.[_0x102fcb(0xa7)](_0x102fcb(0x325)+_0x1835c4+_0x102fcb(0xd2),{'feature':_0x102fcb(0x14a),'licensee':this[_0x102fcb(0x2c1)]['licensee'],'expiresAt':new Date(this[_0x102fcb(0x2c1)]['expiresAt'])[_0x102fcb(0x1aa)]()});}this[_0x102fcb(0x2c1)]&&this['_active'][_0x102fcb(0x263)]===_0x4076ff&&this[_0x102fcb(0x146)][_0x102fcb(0xcc)]?.[_0x102fcb(0xa7)](_0x102fcb(0x2ee),{'feature':_0x102fcb(0x14a),'licensee':this[_0x102fcb(0x2c1)][_0x102fcb(0x21b)]});if(_0x3fa79a&&!this['_active']){this[_0x102fcb(0x146)]['log']?.[_0x102fcb(0xa7)](_0x102fcb(0x33d),{'feature':'license'}),this['okdb'][_0x102fcb(0x265)]?.[_0x102fcb(0x371)](_0x22c4ea[_0x102fcb(0x323)],{'previous':_0x3fa79a});const _0x51dac8=this[_0x102fcb(0x146)][_0x102fcb(0x10a)]?.[_0x102fcb(0x83)]??_0x342141[_0x102fcb(0x178)];_0x51dac8===_0x102fcb(0xfb)&&(this[_0x102fcb(0x146)][_0x102fcb(0xcc)]?.[_0x102fcb(0x28b)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':_0x102fcb(0x14a)}),this[_0x102fcb(0x146)][_0x102fcb(0x1e2)]()['catch'](()=>{})[_0x102fcb(0x23d)](()=>process[_0x102fcb(0x2be)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x1b2e25,'_C':_0x342141},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x446cc8=_0x1f0ec4;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x528c4b=require$$0$2,_0x4dfee7=require$$1,_0x5cebcc=require$$2$1,_0x12e6ce=require$$1$1,_0x186741=_0x12e6ce['join'](_0x5cebcc[_0x446cc8(0xfa)](),_0x446cc8(0x374)),_0x117674=0x3e8,_0x4d1020={'reset':_0x446cc8(0x12a),'bold':_0x446cc8(0x244),'dim':_0x446cc8(0x1a7),'red':'\x1b[31m','green':_0x446cc8(0x151),'yellow':_0x446cc8(0x81),'blue':_0x446cc8(0x38e),'magenta':'\x1b[35m','cyan':_0x446cc8(0x93),'white':_0x446cc8(0x19c),'gray':_0x446cc8(0x186)},_0x38ad63=!process[_0x446cc8(0x2c0)][_0x446cc8(0x24c)]||!!process.env.NO_COLOR,_0x3e9ea7=(_0x1fccb6,_0x203604)=>_0x38ad63?_0x203604:''+_0x1fccb6+_0x203604+_0x4d1020[_0x446cc8(0x185)],_0x2ec620={'error':_0x4d1020[_0x446cc8(0x1f4)],'warn':_0x4d1020[_0x446cc8(0x123)],'info':_0x4d1020[_0x446cc8(0x28c)],'debug':_0x4d1020[_0x446cc8(0x2ef)]},_0x1054aa={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x75416f(_0x1739e3,_0x18d0b3=_0x446cc8(0x21a)){const _0x55cb32=_0x446cc8,{level:_0x52ab03,msg:_0x168e9e,meta:_0x65e0ae,context:_0x4b269f,ts:_0x579310}=_0x1739e3;if((_0x1054aa[_0x52ab03]??0x1)<(_0x1054aa[_0x18d0b3]??0x1))return;const _0x53572f=_0x3e9ea7(_0x4d1020[_0x55cb32(0x2ef)],new Date(_0x579310)[_0x55cb32(0x1aa)]()),_0x3e10c2=_0x3e9ea7(_0x2ec620[_0x52ab03]??_0x4d1020['white'],_0x52ab03['padEnd'](0x5));let _0x4e1155='\x20\x20'+_0x53572f+'\x20'+_0x3e9ea7(_0x4d1020[_0x55cb32(0x16d)],_0x3e10c2)+'\x20'+_0x168e9e;if(_0x65e0ae&&Object[_0x55cb32(0x140)](_0x65e0ae)['length']>0x0){const _0x1eb56a=Object[_0x55cb32(0x2d2)](_0x65e0ae)[_0x55cb32(0x296)](([_0x259105,_0x987f4b])=>_0x259105+'='+_0x987f4b)[_0x55cb32(0x347)]('\x20');_0x4e1155+=_0x3e9ea7(_0x4d1020[_0x55cb32(0x8e)],_0x55cb32(0xc8)+_0x1eb56a+']');}if(_0x4b269f!==undefined){const _0x25f9ef=typeof _0x4b269f==='object'?JSON[_0x55cb32(0x287)](_0x4b269f):String(_0x4b269f);_0x4e1155+=_0x3e9ea7(_0x4d1020[_0x55cb32(0x8e)],'\x20\x20'+_0x25f9ef);}const _0xb316c4=_0x52ab03===_0x55cb32(0x28b)||_0x52ab03===_0x55cb32(0xa7)?process[_0x55cb32(0x2e9)][_0x55cb32(0x21e)]['bind'](process[_0x55cb32(0x2e9)]):process[_0x55cb32(0x2c0)][_0x55cb32(0x21e)]['bind'](process['stdout']);_0xb316c4(_0x4e1155+'\x0a');}function _0x4896a(_0x14adf3,_0x350a31){const _0x385bc3=_0x446cc8;if(_0x14adf3===0xcc||_0x14adf3>=0xc8&&_0x14adf3<0x12c&&!_0x350a31){console[_0x385bc3(0xcc)](_0x385bc3(0xe6)+_0x3e9ea7(_0x4d1020[_0x385bc3(0x15a)],'✓')+'\x0a');return;}if(_0x14adf3>=0x190||_0x350a31?.[_0x385bc3(0x28b)]){const _0x1e2323=_0x350a31?.['error']??_0x350a31?.[_0x385bc3(0x394)]??_0x385bc3(0x221)+_0x14adf3;console[_0x385bc3(0xcc)](_0x385bc3(0xe6)+_0x3e9ea7(_0x4d1020['red'],'✗')+'\x20'+_0x3e9ea7(_0x4d1020[_0x385bc3(0x16d)]+_0x4d1020[_0x385bc3(0x1f4)],String(_0x14adf3))+'\x20\x20'+_0x1e2323+'\x0a');return;}const _0x43c8da=Object[_0x385bc3(0xb2)]['hasOwnProperty'][_0x385bc3(0x2d9)](_0x350a31??{},'result')?_0x350a31[_0x385bc3(0xc7)]:_0x350a31,_0x368bce=_0x350a31?.[_0x385bc3(0x216)];console[_0x385bc3(0xcc)](''),_0x5bfc94(_0x43c8da,'\x20\x20');if(_0x368bce?.['count']!=null||_0x368bce?.[_0x385bc3(0x264)]!=null){const _0x159dd3=[];if(_0x368bce['count']!=null)_0x159dd3['push'](_0x368bce[_0x385bc3(0x152)]+_0x385bc3(0x39b)+(_0x368bce[_0x385bc3(0x152)]!==0x1?'s':''));if(_0x368bce[_0x385bc3(0x264)]!=null)_0x159dd3[_0x385bc3(0x34f)](_0x368bce[_0x385bc3(0x264)]+'ms');console['log'](_0x385bc3(0xe6)+_0x3e9ea7(_0x4d1020[_0x385bc3(0x8e)],_0x159dd3[_0x385bc3(0x347)](_0x385bc3(0x26a))));}console[_0x385bc3(0xcc)]('');}function _0x5bfc94(_0x4e0a22,_0x4c4e23=''){const _0x95f6ea=_0x446cc8;if(_0x4e0a22===null||_0x4e0a22===undefined){console['log'](_0x4c4e23+_0x3e9ea7(_0x4d1020[_0x95f6ea(0x8e)],_0x95f6ea(0x1b9)));return;}if(Array[_0x95f6ea(0x214)](_0x4e0a22)){if(_0x4e0a22[_0x95f6ea(0x252)]===0x0){console[_0x95f6ea(0xcc)](_0x4c4e23+_0x3e9ea7(_0x4d1020[_0x95f6ea(0x8e)],'(empty)'));return;}if(_0x4e0a22[_0x95f6ea(0x358)](_0x4d4b92=>_0x4d4b92&&typeof _0x4d4b92===_0x95f6ea(0x25a)&&'key'in _0x4d4b92&&'value'in _0x4d4b92)){_0x2152f1(_0x4e0a22,_0x4c4e23);return;}if(_0x4e0a22[_0x95f6ea(0x358)](_0x15090c=>_0x15090c&&typeof _0x15090c===_0x95f6ea(0x25a)&&_0x95f6ea(0x87)in _0x15090c&&'count'in _0x15090c)){_0x1c3c3d(_0x4e0a22,_0x4c4e23);return;}if(_0x4e0a22['every'](_0xba0662=>typeof _0xba0662!=='object'||_0xba0662===null)){_0x4e0a22[_0x95f6ea(0x2f7)]((_0x41511e,_0x370dac)=>console[_0x95f6ea(0xcc)](_0x4c4e23+_0x3e9ea7(_0x4d1020[_0x95f6ea(0x2ef)],_0x370dac+0x1+'.')+'\x20'+_0x3e9ea7(_0x4d1020[_0x95f6ea(0xb7)],String(_0x41511e))));return;}_0x4e0a22[_0x95f6ea(0x2f7)]((_0x2bc0f7,_0x1011c2)=>{const _0x321419=_0x95f6ea;console['log'](_0x4c4e23+_0x3e9ea7(_0x4d1020[_0x321419(0x8e)],'['+_0x1011c2+']'));if(typeof _0x2bc0f7===_0x321419(0x25a)&&_0x2bc0f7!==null)_0x38253b(_0x2bc0f7,_0x4c4e23+'\x20\x20');else console[_0x321419(0xcc)](_0x4c4e23+'\x20\x20'+String(_0x2bc0f7));});return;}if(typeof _0x4e0a22===_0x95f6ea(0x25a)){if(_0x95f6ea(0x168)in _0x4e0a22&&_0x95f6ea(0xdd)in _0x4e0a22&&Object['keys'](_0x4e0a22)[_0x95f6ea(0x252)]<=0x3){console[_0x95f6ea(0xcc)](_0x4c4e23+_0x3e9ea7(_0x4d1020[_0x95f6ea(0x16d)]+_0x4d1020[_0x95f6ea(0x28c)],String(_0x4e0a22[_0x95f6ea(0x168)])));const _0x36b11d=_0x4e0a22['value'];if(_0x36b11d&&typeof _0x36b11d===_0x95f6ea(0x25a))_0x38253b(_0x36b11d,_0x4c4e23);else console[_0x95f6ea(0xcc)](_0x4c4e23+_0x3e9ea7(_0x4d1020[_0x95f6ea(0xb7)],String(_0x36b11d)));return;}_0x38253b(_0x4e0a22,_0x4c4e23);return;}console[_0x95f6ea(0xcc)](_0x4c4e23+_0x3e9ea7(_0x4d1020[_0x95f6ea(0xb7)],String(_0x4e0a22)));}function _0x38253b(_0x17583f,_0x3b3c32=''){const _0x1094f4=_0x446cc8,_0x5ebf26=Object[_0x1094f4(0x2d2)](_0x17583f);if(_0x5ebf26[_0x1094f4(0x252)]===0x0){console[_0x1094f4(0xcc)](_0x3b3c32+_0x3e9ea7(_0x4d1020[_0x1094f4(0x8e)],'{}'));return;}const _0x2e865d=Math[_0x1094f4(0x131)](0x1c,Math[_0x1094f4(0x212)](..._0x5ebf26[_0x1094f4(0x296)](([_0x2f7902])=>_0x2f7902['length'])));for(const [_0x245ee5,_0x185144]of _0x5ebf26){const _0x17d700=_0x3e9ea7(_0x4d1020[_0x1094f4(0x28c)],_0x245ee5[_0x1094f4(0x2b3)](_0x2e865d));if(_0x185144===null||_0x185144===undefined)console['log'](_0x3b3c32+_0x17d700+'\x20\x20'+_0x3e9ea7(_0x4d1020[_0x1094f4(0x8e)],'null'));else{if(typeof _0x185144===_0x1094f4(0x25a)){const _0xfd57b1=JSON[_0x1094f4(0x287)](_0x185144);_0xfd57b1[_0x1094f4(0x252)]<=0x50?console[_0x1094f4(0xcc)](_0x3b3c32+_0x17d700+'\x20\x20'+_0x3e9ea7(_0x4d1020['dim'],_0xfd57b1)):(console[_0x1094f4(0xcc)](_0x3b3c32+_0x17d700),_0x5bfc94(_0x185144,_0x3b3c32+'\x20\x20'));}else{const _0x3359a6=typeof _0x185144===_0x1094f4(0x31c)?_0x3e9ea7(_0x185144?_0x4d1020[_0x1094f4(0x15a)]:_0x4d1020[_0x1094f4(0x123)],String(_0x185144)):typeof _0x185144===_0x1094f4(0x82)?_0x3e9ea7(_0x4d1020[_0x1094f4(0x1ea)],String(_0x185144)):_0x3e9ea7(_0x4d1020[_0x1094f4(0xb7)],String(_0x185144));console[_0x1094f4(0xcc)](_0x3b3c32+_0x17d700+'\x20\x20'+_0x3359a6);}}}}function _0x2152f1(_0x6a95a7,_0x182323=''){const _0x33e9d3=_0x446cc8,_0x2d6ecd=Math[_0x33e9d3(0x131)](0x20,Math['max'](..._0x6a95a7[_0x33e9d3(0x296)](_0x4fb44e=>String(_0x4fb44e[_0x33e9d3(0x168)])[_0x33e9d3(0x252)])));for(const {key:_0x5c3577,value:_0x2e818b,score:_0x35c2b1,clock:_0x629cc3}of _0x6a95a7){const _0x192c00=_0x3e9ea7(_0x4d1020['bold']+_0x4d1020[_0x33e9d3(0x28c)],String(_0x5c3577)['padEnd'](_0x2d6ecd)),_0x25fe6f=_0x2e818b==null?_0x3e9ea7(_0x4d1020[_0x33e9d3(0x8e)],_0x33e9d3(0x31a)):typeof _0x2e818b===_0x33e9d3(0x25a)?_0x3e9ea7(_0x4d1020[_0x33e9d3(0x8e)],JSON[_0x33e9d3(0x287)](_0x2e818b)):_0x3e9ea7(_0x4d1020[_0x33e9d3(0xb7)],String(_0x2e818b)),_0x416557=_0x35c2b1!=null?_0x3e9ea7(_0x4d1020['gray'],'\x20\x20score:'+_0x35c2b1[_0x33e9d3(0x34a)](0x4)):'',_0x258cc5=_0x629cc3!=null?_0x3e9ea7(_0x4d1020[_0x33e9d3(0x2ef)],_0x33e9d3(0x28f)+_0x629cc3):'';console[_0x33e9d3(0xcc)](_0x182323+_0x192c00+'\x20\x20'+_0x25fe6f+_0x416557+_0x258cc5);}}function _0x1c3c3d(_0x1b5db3,_0x30d0d2=''){const _0x5d8f72=_0x446cc8,_0x2dc9ae=Math[_0x5d8f72(0x131)](0x20,Math[_0x5d8f72(0x212)](..._0x1b5db3[_0x5d8f72(0x296)](_0x18c50d=>_0x18c50d[_0x5d8f72(0x87)][_0x5d8f72(0x252)])));for(const {type:_0x1621e8,count:_0x52da59,fields:_0x5f1737}of _0x1b5db3){if(_0x1621e8[_0x5d8f72(0x84)]('~'))continue;const _0x1d4437=_0x3e9ea7(_0x4d1020[_0x5d8f72(0x16d)]+_0x4d1020['cyan'],_0x1621e8[_0x5d8f72(0x2b3)](_0x2dc9ae)),_0xfa723a=_0x3e9ea7(_0x4d1020[_0x5d8f72(0x1ea)],String(_0x52da59)[_0x5d8f72(0x294)](0x6))+_0x3e9ea7(_0x4d1020[_0x5d8f72(0x8e)],_0x5d8f72(0xb0)),_0x29610d=_0x5f1737&&Object[_0x5d8f72(0x140)](_0x5f1737)[_0x5d8f72(0x252)]?_0x3e9ea7(_0x4d1020[_0x5d8f72(0x8e)],'\x20\x20·\x20'+Object[_0x5d8f72(0x140)](_0x5f1737)['slice'](0x0,0x6)[_0x5d8f72(0x347)](',\x20')+(Object['keys'](_0x5f1737)[_0x5d8f72(0x252)]>0x6?'…':'')):'';console[_0x5d8f72(0xcc)](_0x30d0d2+_0x1d4437+'\x20\x20'+_0xfa723a+_0x29610d);}}const _0x5b1f5b=[_0x446cc8(0x2d3),_0x446cc8(0x196),_0x446cc8(0x33b),_0x446cc8(0x362),'transaction',_0x446cc8(0x2f8)];function _0x53aef6(_0x48c999,_0x344fd0){const _0x5f3531=_0x446cc8;if(_0x48c999[_0x5f3531(0x84)](_0x5f3531(0x1b2)))return _0x48c999;if(_0x48c999[_0x5f3531(0x84)]('/'))return'/api'+_0x48c999;if(_0x48c999[_0x5f3531(0x84)](_0x5f3531(0x89)))return _0x5f3531(0x1b2)+_0x48c999;const _0x445a2e=_0x5b1f5b[_0x5f3531(0x300)](_0x326720=>_0x48c999===_0x326720[_0x5f3531(0x141)](/\/$/,'')||_0x48c999[_0x5f3531(0x84)](_0x326720));return _0x445a2e?_0x5f3531(0x322)+_0x344fd0+'/'+_0x48c999:'/api/'+_0x48c999;}function _0x5c48c8(_0x269351){const _0x4f1288=_0x446cc8,_0xf1afae={},_0x527263=[];let _0x17810f=0x0;while(_0x17810f<_0x269351[_0x4f1288(0x252)]){if((_0x269351[_0x17810f]===_0x4f1288(0x2a2)||_0x269351[_0x17810f]==='-e')&&_0x269351[_0x17810f+0x1]&&!_0x269351[_0x17810f+0x1]['startsWith']('-'))_0xf1afae['env']=_0x269351[++_0x17810f];else _0x269351[_0x17810f]===_0x4f1288(0xaf)||_0x269351[_0x17810f]==='-h'?_0xf1afae['help']=!![]:_0x527263['push'](_0x269351[_0x17810f]);_0x17810f++;}return{'flags':_0xf1afae,'rest':_0x527263};}const _0x49f95d={'system':_0x446cc8(0x339),'envs':_0x446cc8(0x1d0),'types':_0x446cc8(0x118),'data':_0x446cc8(0x102),'indexes':_0x446cc8(0x14f),'fts':'Full-text\x20search','sync':'Sync','queue':'Queue','files':_0x446cc8(0x207),'embeddings':_0x446cc8(0xe4),'engines':_0x446cc8(0x111),'admin':_0x446cc8(0x1b5),'event':'Events','processor':_0x446cc8(0x2df)},_0x139321=[_0x446cc8(0x14e),'envs',_0x446cc8(0x2d3),'data',_0x446cc8(0x1db),_0x446cc8(0xc0),'sync',_0x446cc8(0x1af),_0x446cc8(0x188),_0x446cc8(0x1ed),_0x446cc8(0x2f0),_0x446cc8(0x366)];function _0x4c8dcb(_0x2a2564){const _0x3f0175=_0x446cc8;return _0x2a2564[_0x3f0175(0x141)](/^\/api/,'')[_0x3f0175(0x141)](/^\[\/env\/:env=[^\]]*\]/,_0x3f0175(0x13e))[_0x3f0175(0x141)](/^\/env\/:env/,_0x3f0175(0xd7))['replace'](/^\//,'');}function _0x963a58(_0x4f939b,_0x118be5=''){const _0x1648be=_0x446cc8,_0x21e2bf=_0x4f939b[_0x1648be(0x256)][_0x1648be(0x97)]()[_0x1648be(0x33e)](_0x2cbc7e=>!_0x2cbc7e[_0x1648be(0x216)]?.[_0x1648be(0x3a8)]),_0x183939=_0x118be5?_0x21e2bf[_0x1648be(0x33e)](_0x3a0b6a=>_0x3a0b6a['path'][_0x1648be(0x35a)]()[_0x1648be(0x327)](_0x118be5[_0x1648be(0x35a)]())||(_0x4ad167(_0x3a0b6a)??'')[_0x1648be(0x35a)]()[_0x1648be(0x327)](_0x118be5[_0x1648be(0x35a)]())||_0x52c26d(_0x3a0b6a)[_0x1648be(0x300)](_0x4adee2=>_0x4adee2[_0x1648be(0x35a)]()[_0x1648be(0x327)](_0x118be5[_0x1648be(0x35a)]()))):_0x21e2bf;if(!_0x183939[_0x1648be(0x252)]){console[_0x1648be(0xcc)](_0x3e9ea7(_0x4d1020['yellow'],_0x1648be(0x28e)+_0x118be5+'\x22\x0a'));return;}const _0x23116b=new Map();for(const _0x215306 of _0x183939){const _0xeccb00=_0x52c26d(_0x215306)[0x0]??_0x1648be(0x341);if(!_0x23116b[_0x1648be(0x2f4)](_0xeccb00))_0x23116b[_0x1648be(0x253)](_0xeccb00,[]);_0x23116b[_0x1648be(0xfc)](_0xeccb00)[_0x1648be(0x34f)](_0x215306);}const _0x12571b=[..._0x139321[_0x1648be(0x33e)](_0xa9ec57=>_0x23116b[_0x1648be(0x2f4)](_0xa9ec57)),...[..._0x23116b[_0x1648be(0x140)]()][_0x1648be(0x33e)](_0x5a60fd=>!_0x139321[_0x1648be(0x327)](_0x5a60fd))];console['log']('');for(const _0x1d9e63 of _0x12571b){const _0x26495f=_0x23116b[_0x1648be(0xfc)](_0x1d9e63);if(!_0x26495f?.[_0x1648be(0x252)])continue;console[_0x1648be(0xcc)](_0x3e9ea7(_0x4d1020[_0x1648be(0x16d)],'\x20\x20'+(_0x49f95d[_0x1d9e63]??_0x1d9e63)));for(const _0x4010de of _0x26495f){const _0x9b3387=_0x3e9ea7(_0x4d1020[_0x1648be(0x1ea)],_0x4010de['method'][_0x1648be(0x2b3)](0x7)),_0x4f4918=_0x3e9ea7(_0x4d1020['cyan'],_0x4c8dcb(_0x4010de[_0x1648be(0x36a)])),_0x4de4bf=_0x4ad167(_0x4010de)?_0x3e9ea7(_0x4d1020[_0x1648be(0x8e)],'\x20\x20'+_0x4ad167(_0x4010de)):'',_0x246bbb=_0x4010de['operation']?.['id']?_0x3e9ea7(_0x4d1020['gray'],_0x1648be(0xc8)+_0x4010de[_0x1648be(0x1bf)]['id']+']'):'';console['log']('\x20\x20\x20\x20'+_0x9b3387+'\x20'+_0x4f4918+_0x4de4bf+_0x246bbb);}console[_0x1648be(0xcc)]('');}}function _0x41008b(_0x234e8b,_0x42b069){const _0x261352=_0x446cc8,_0x760fa5=_0x42b069[_0x261352(0x141)](/^\/api(\/env\/[^/]+)?\//,'')['split']('/')[0x0],_0x35ebee=_0x234e8b['http'][_0x261352(0x97)]()['filter'](_0x25880a=>_0x25880a[_0x261352(0x36a)]['toLowerCase']()[_0x261352(0x327)](_0x760fa5[_0x261352(0x35a)]()));if(!_0x35ebee[_0x261352(0x252)]){console['log'](_0x3e9ea7(_0x4d1020[_0x261352(0x123)],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x42b069+'\x0a'));return;}console[_0x261352(0xcc)]('');for(const _0x2611fa of _0x35ebee[_0x261352(0x19b)](0x0,0xc)){for(const _0x52f2e4 of _0x613704(_0x2611fa)){console[_0x261352(0xcc)](_0x52f2e4);}console[_0x261352(0xcc)]('');}}function _0x4ad167(_0xf1218e){const _0x33fdba=_0x446cc8;return _0xf1218e[_0x33fdba(0x1bf)]?.['summary']??_0xf1218e[_0x33fdba(0x216)]?.[_0x33fdba(0x99)]??'';}function _0x31096a(_0x4168f7){const _0xbb98aa=_0x446cc8;return _0x4168f7[_0xbb98aa(0x1bf)]?.['description']??_0x4168f7[_0xbb98aa(0x216)]?.[_0xbb98aa(0x39f)]??'';}function _0x52c26d(_0x52fa8f){const _0x37a8fc=_0x446cc8;return _0x52fa8f[_0x37a8fc(0x1bf)]?.['tags']?.['length']?_0x52fa8f[_0x37a8fc(0x1bf)][_0x37a8fc(0x2f6)]:_0x52fa8f['meta']?.['tags']??[];}function _0x613704(_0x3e8490){const _0x4d5f9c=_0x446cc8,_0x11b77f=[];_0x11b77f[_0x4d5f9c(0x34f)]('\x20\x20'+_0x3e9ea7(_0x4d1020[_0x4d5f9c(0x16d)]+_0x4d1020['magenta'],_0x3e8490[_0x4d5f9c(0x2a9)][_0x4d5f9c(0x2b3)](0x7))+'\x20'+_0x3e9ea7(_0x4d1020['bold']+_0x4d1020[_0x4d5f9c(0x28c)],_0x3e8490[_0x4d5f9c(0x36a)]));_0x3e8490[_0x4d5f9c(0x1bf)]?.['id']&&_0x11b77f[_0x4d5f9c(0x34f)](_0x4d5f9c(0x2e7)+_0x3e9ea7(_0x4d1020['gray'],_0x4d5f9c(0x136)+_0x3e8490['operation']['id']));_0x4ad167(_0x3e8490)&&_0x11b77f[_0x4d5f9c(0x34f)](_0x4d5f9c(0x2e7)+_0x3e9ea7(_0x4d1020['white'],_0x4ad167(_0x3e8490)));_0x31096a(_0x3e8490)&&_0x11b77f[_0x4d5f9c(0x34f)](_0x4d5f9c(0x2e7)+_0x3e9ea7(_0x4d1020[_0x4d5f9c(0x8e)],_0x31096a(_0x3e8490)));_0x52c26d(_0x3e8490)[_0x4d5f9c(0x252)]&&_0x11b77f['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3e9ea7(_0x4d1020['gray'],_0x4d5f9c(0x17a)+_0x52c26d(_0x3e8490)['join'](',\x20')));_0x3e8490[_0x4d5f9c(0x1bf)]?.[_0x4d5f9c(0x38f)]?.[_0x4d5f9c(0x139)]&&_0x11b77f[_0x4d5f9c(0x34f)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3e9ea7(_0x4d1020['gray'],_0x4d5f9c(0x142)+_0x3e8490[_0x4d5f9c(0x1bf)][_0x4d5f9c(0x38f)][_0x4d5f9c(0x139)]));_0x3e8490[_0x4d5f9c(0x1bf)]?.[_0x4d5f9c(0x256)]?.[_0x4d5f9c(0x306)]&&_0x3e8490[_0x4d5f9c(0x1bf)][_0x4d5f9c(0x256)]['transport']!==_0x4d5f9c(0x25b)&&_0x11b77f[_0x4d5f9c(0x34f)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3e9ea7(_0x4d1020[_0x4d5f9c(0x2ef)],_0x4d5f9c(0x39a)+_0x3e8490['operation'][_0x4d5f9c(0x256)][_0x4d5f9c(0x306)]));if(_0x3e8490['operation']?.['inputSchema']){const _0x4dba1c=Object[_0x4d5f9c(0x140)](_0x3e8490[_0x4d5f9c(0x1bf)][_0x4d5f9c(0x171)][_0x4d5f9c(0xd0)]||{});if(_0x4dba1c['length'])_0x11b77f[_0x4d5f9c(0x34f)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3e9ea7(_0x4d1020[_0x4d5f9c(0x2ef)],'input:\x20'+_0x4dba1c[_0x4d5f9c(0x347)](',\x20')));}return _0x3e8490[_0x4d5f9c(0x216)]?.[_0x4d5f9c(0x30c)]&&_0x11b77f['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3e9ea7(_0x4d1020['gray'],_0x4d5f9c(0x2c9)+JSON[_0x4d5f9c(0x287)](_0x3e8490[_0x4d5f9c(0x216)][_0x4d5f9c(0x30c)]))),_0x11b77f;}async function _0x331e64(_0x16f71c,_0x3591aa,_0x2bb7e8,_0x609912=null){const _0x10b2da=_0x446cc8,_0x43a159=_0x2bb7e8[_0x10b2da(0x295)]('?'),_0x3406a8=_0x43a159>=0x0?_0x2bb7e8[_0x10b2da(0x19b)](0x0,_0x43a159):_0x2bb7e8,_0x277aaf=_0x43a159>=0x0?_0x2bb7e8[_0x10b2da(0x19b)](_0x43a159+0x1):'',_0x4bdef3=Object['fromEntries'](new URLSearchParams(_0x277aaf)['entries']());return _0x16f71c[_0x10b2da(0x256)][_0x10b2da(0x1b4)](_0x3591aa,_0x3406a8,{'body':_0x609912,'query':_0x4bdef3,'headers':{'content-type':_0x10b2da(0x285)}},{'internal':!![]});}function _0x464fb0(_0x522b8c){const _0x73ed10=_0x446cc8;if(!_0x522b8c)return null;const _0x362750=_0x522b8c[_0x73ed10(0x213)]();if(!_0x362750)return null;try{return JSON[_0x73ed10(0x211)](_0x362750);}catch{}try{return JSON[_0x73ed10(0x211)](_0x2b4e06(_0x362750));}catch(_0x5d9119){throw new SyntaxError(_0x5d9119[_0x73ed10(0x394)],{'cause':_0x5d9119});}}function _0x2b4e06(_0xdacd0e){const _0x49b15f=_0x446cc8;let _0x257bf7='',_0x5bd2ce=0x0;while(_0x5bd2ce<_0xdacd0e[_0x49b15f(0x252)]){const _0x1ff47b=_0xdacd0e[_0x5bd2ce];if(_0x1ff47b==='\x22'){_0x257bf7+='\x22',_0x5bd2ce++;while(_0x5bd2ce<_0xdacd0e[_0x49b15f(0x252)]&&_0xdacd0e[_0x5bd2ce]!=='\x22'){if(_0xdacd0e[_0x5bd2ce]==='\x5c'){_0x257bf7+=_0xdacd0e[_0x5bd2ce++];if(_0x5bd2ce<_0xdacd0e[_0x49b15f(0x252)])_0x257bf7+=_0xdacd0e[_0x5bd2ce++];}else _0x257bf7+=_0xdacd0e[_0x5bd2ce++];}_0x257bf7+='\x22';if(_0x5bd2ce<_0xdacd0e['length'])_0x5bd2ce++;continue;}if(_0x1ff47b==='\x27'){_0x257bf7+='\x22',_0x5bd2ce++;while(_0x5bd2ce<_0xdacd0e[_0x49b15f(0x252)]&&_0xdacd0e[_0x5bd2ce]!=='\x27'){if(_0xdacd0e[_0x5bd2ce]==='\x5c'&&_0xdacd0e[_0x5bd2ce+0x1]==='\x27')_0x257bf7+='\x27',_0x5bd2ce+=0x2;else _0xdacd0e[_0x5bd2ce]==='\x22'?(_0x257bf7+='\x5c\x22',_0x5bd2ce++):_0x257bf7+=_0xdacd0e[_0x5bd2ce++];}_0x257bf7+='\x22';if(_0x5bd2ce<_0xdacd0e['length'])_0x5bd2ce++;continue;}if(_0x49b15f(0x1e8)[_0x49b15f(0x327)](_0x1ff47b)){_0x257bf7+=_0x1ff47b,_0x5bd2ce++;continue;}let _0xa28d8c='';while(_0x5bd2ce<_0xdacd0e[_0x49b15f(0x252)]&&!_0x49b15f(0xa9)[_0x49b15f(0x327)](_0xdacd0e[_0x5bd2ce])&&_0xdacd0e[_0x5bd2ce]!=='\x20'&&_0xdacd0e[_0x5bd2ce]!=='\x09'&&_0xdacd0e[_0x5bd2ce]!=='\x0a'&&_0xdacd0e[_0x5bd2ce]!=='\x0d'){_0xa28d8c+=_0xdacd0e[_0x5bd2ce++];}let _0xeac513=_0x5bd2ce;while(_0xeac513<_0xdacd0e['length']&&(_0xdacd0e[_0xeac513]==='\x20'||_0xdacd0e[_0xeac513]==='\x09'))_0xeac513++;if(_0xdacd0e[_0xeac513]===':')_0x257bf7+='\x22'+_0xa28d8c+'\x22';else _0xa28d8c==='true'||_0xa28d8c==='false'||_0xa28d8c==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x49b15f(0x2ea)](_0xa28d8c)?_0x257bf7+=_0xa28d8c:_0x257bf7+='\x22'+_0xa28d8c+'\x22';}return _0x257bf7[_0x49b15f(0x141)](/,(\s*[}\]])/g,'$1');}function _0x47f0dd(_0x3b7ca7){const _0x4683d4=_0x446cc8,_0xdb25d5=[];let _0xab1747=0x0;while(_0xab1747<_0x3b7ca7[_0x4683d4(0x252)]){while(_0xab1747<_0x3b7ca7[_0x4683d4(0x252)]&&(_0x3b7ca7[_0xab1747]==='\x20'||_0x3b7ca7[_0xab1747]==='\x09'))_0xab1747++;if(_0xab1747>=_0x3b7ca7[_0x4683d4(0x252)])break;const _0x25f8cd=_0x3b7ca7[_0xab1747];if(_0x25f8cd==='{'||_0x25f8cd==='['){const _0x265619=_0x25f8cd==='{'?'}':']',_0x39678d=_0xab1747++;let _0x527285=0x1,_0x500de6=![],_0x172f5f='';while(_0xab1747<_0x3b7ca7[_0x4683d4(0x252)]&&_0x527285>0x0){const _0x309755=_0x3b7ca7[_0xab1747];if(_0x500de6){if(_0x309755==='\x5c')_0xab1747++;else{if(_0x309755===_0x172f5f)_0x500de6=![];}}else{if(_0x309755==='\x22'||_0x309755==='\x27')_0x500de6=!![],_0x172f5f=_0x309755;else{if(_0x309755===_0x25f8cd)_0x527285++;else{if(_0x309755===_0x265619)_0x527285--;}}}_0xab1747++;}_0xdb25d5[_0x4683d4(0x34f)](_0x3b7ca7[_0x4683d4(0x19b)](_0x39678d,_0xab1747));continue;}if(_0x25f8cd==='\x22'||_0x25f8cd==='\x27'){const _0x157a7a=_0x25f8cd;_0xab1747++;let _0x7cd710='';while(_0xab1747<_0x3b7ca7['length']&&_0x3b7ca7[_0xab1747]!==_0x157a7a){if(_0x3b7ca7[_0xab1747]==='\x5c'&&_0xab1747+0x1<_0x3b7ca7[_0x4683d4(0x252)])_0xab1747++,_0x7cd710+=_0x3b7ca7[_0xab1747++];else _0x7cd710+=_0x3b7ca7[_0xab1747++];}if(_0xab1747<_0x3b7ca7[_0x4683d4(0x252)])_0xab1747++;_0xdb25d5['push'](_0x7cd710);continue;}let _0x5ab4d2='';while(_0xab1747<_0x3b7ca7['length']&&_0x3b7ca7[_0xab1747]!=='\x20'&&_0x3b7ca7[_0xab1747]!=='\x09'&&_0x3b7ca7[_0xab1747]!=='{'&&_0x3b7ca7[_0xab1747]!=='['){_0x5ab4d2+=_0x3b7ca7[_0xab1747++];}if(_0x5ab4d2)_0xdb25d5['push'](_0x5ab4d2);}return _0xdb25d5;}function _0xedfd61(_0x568d28,_0x594785){const _0x36b75b=_0x446cc8,_0x8142b4=[..._0x568d28['_envs']['keys']()]['filter'](_0xd71aea=>!_0xd71aea['startsWith']('~'));console[_0x36b75b(0xcc)](['',_0x3e9ea7(_0x4d1020[_0x36b75b(0x16d)]+_0x4d1020[_0x36b75b(0x28c)],_0x36b75b(0xb8)),_0x3e9ea7(_0x4d1020[_0x36b75b(0x16d)]+_0x4d1020[_0x36b75b(0x28c)],_0x36b75b(0x147))+_0x3e9ea7(_0x4d1020['bold'],_0x36b75b(0x126))+_0x3e9ea7(_0x4d1020[_0x36b75b(0x16d)]+_0x4d1020['cyan'],'║'),_0x3e9ea7(_0x4d1020[_0x36b75b(0x16d)]+_0x4d1020[_0x36b75b(0x28c)],_0x36b75b(0xe9)),'','\x20\x20'+_0x3e9ea7(_0x4d1020['green'],'✓')+'\x20'+_0x3e9ea7(_0x4d1020[_0x36b75b(0x16d)],_0x36b75b(0x255))+_0x36b75b(0x2a8)+_0x594785['port'],'\x20\x20'+_0x3e9ea7(_0x4d1020[_0x36b75b(0x15a)],'✓')+'\x20'+_0x3e9ea7(_0x4d1020[_0x36b75b(0x16d)],_0x36b75b(0xeb))+_0x36b75b(0xef)+_0x594785[_0x36b75b(0x239)]+_0x36b75b(0x157),'\x20\x20'+_0x3e9ea7(_0x4d1020[_0x36b75b(0x15a)],'✓')+'\x20'+_0x3e9ea7(_0x4d1020[_0x36b75b(0x16d)],'path')+'\x20\x20\x20\x20'+_0x594785[_0x36b75b(0x2e2)],'\x20\x20'+_0x3e9ea7(_0x4d1020[_0x36b75b(0x15a)],'✓')+'\x20'+_0x3e9ea7(_0x4d1020[_0x36b75b(0x16d)],'id')+_0x36b75b(0x318)+_0x3e9ea7(_0x4d1020[_0x36b75b(0x2ef)],_0x568d28['id']),'\x20\x20'+_0x3e9ea7(_0x4d1020[_0x36b75b(0x15a)],'✓')+'\x20'+_0x3e9ea7(_0x4d1020[_0x36b75b(0x16d)],_0x36b75b(0xf4))+_0x36b75b(0x2a1)+_0x8142b4[_0x36b75b(0x296)](_0x3761ad=>_0x3e9ea7(_0x4d1020[_0x36b75b(0x28c)],_0x3761ad))[_0x36b75b(0x347)]('\x20\x20'),..._0x594785['noAdmin']?[]:['\x20\x20'+_0x3e9ea7(_0x4d1020[_0x36b75b(0x15a)],'✓')+'\x20'+_0x3e9ea7(_0x4d1020[_0x36b75b(0x16d)],'admin')+_0x36b75b(0x10f)+_0x594785[_0x36b75b(0x239)]+_0x36b75b(0x137)],'',_0x3e9ea7(_0x4d1020['dim'],_0x36b75b(0x313)+_0x3e9ea7(_0x4d1020[_0x36b75b(0x16d)],'help')+_0x36b75b(0x121)+_0x3e9ea7(_0x4d1020['bold'],_0x36b75b(0xc5))+_0x36b75b(0x2a3)+_0x3e9ea7(_0x4d1020[_0x36b75b(0x16d)],_0x36b75b(0x2be))+_0x36b75b(0x34d)),''][_0x36b75b(0x347)]('\x0a'));}function _0x4ebad6(_0x30aeab){const _0x2e9574=_0x446cc8;console['log']('\x0a'+_0x3e9ea7(_0x4d1020['bold'],_0x2e9574(0x2a0))+'\x20\x20'+_0x3e9ea7(_0x4d1020[_0x2e9574(0x8e)],_0x2e9574(0x156))+_0x2e9574(0x311)+_0x3e9ea7(_0x4d1020['cyan'],_0x2e9574(0x11e))+_0x2e9574(0x346)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x28c)],_0x2e9574(0x11e))+'\x20'+_0x3e9ea7(_0x4d1020[_0x2e9574(0x123)],_0x2e9574(0xd6))+_0x2e9574(0xb9)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x28c)],_0x2e9574(0x236))+'\x20'+_0x3e9ea7(_0x4d1020[_0x2e9574(0x28c)],_0x2e9574(0x11e))+'\x20'+_0x3e9ea7(_0x4d1020[_0x2e9574(0x123)],'[body]')+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0x3e9ea7(_0x4d1020['dim'],'Examples')+_0x2e9574(0x1be)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x2ef)],_0x2e9574(0x21a))+_0x2e9574(0xb5)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x2ef)],_0x2e9574(0xf4))+_0x2e9574(0x1a0)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x2ef)],_0x2e9574(0x2d3))+_0x2e9574(0x163)+_0x30aeab[_0x2e9574(0x308)]+_0x2e9574(0xf0)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x2ef)],_0x2e9574(0x304))+_0x2e9574(0x1a5)+_0x30aeab[_0x2e9574(0x308)]+'/type/users\x0a\x20\x20\x20\x20'+_0x3e9ea7(_0x4d1020[_0x2e9574(0x2ef)],_0x2e9574(0x8d))+_0x2e9574(0xd1)+_0x30aeab['env']+_0x2e9574(0x22f)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x2ef)],'type/users/query\x20{\x22active\x22:true}')+'\x20→\x20POST\x20/api/env/'+_0x30aeab[_0x2e9574(0x308)]+_0x2e9574(0x1ae)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x2ef)],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+_0x2e9574(0x1be)+_0x3e9ea7(_0x4d1020['gray'],_0x2e9574(0x28d))+'\x0a\x20\x20\x20\x20'+_0x3e9ea7(_0x4d1020[_0x2e9574(0x2ef)],'env/staging/info')+'\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'+_0x3e9ea7(_0x4d1020[_0x2e9574(0x16d)],_0x2e9574(0x2ac))+'\x20\x20'+_0x3e9ea7(_0x4d1020[_0x2e9574(0x8e)],'(on\x20any\x20path\x20command)')+'\x0a\x0a\x20\x20'+_0x3e9ea7(_0x4d1020['cyan'],_0x2e9574(0x1c6))+_0x2e9574(0x22c)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x28c)],'--help')+_0x2e9574(0x18e)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x8e)],_0x2e9574(0x230))+_0x2e9574(0x1be)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x2ef)],_0x2e9574(0x1ab))+_0x2e9574(0x1be)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x2ef)],'type/users/item/alice\x20--env\x20staging')+_0x2e9574(0x1be)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x2ef)],_0x2e9574(0x372))+'\x0a\x0a'+_0x3e9ea7(_0x4d1020[_0x2e9574(0x16d)],_0x2e9574(0x1c7))+_0x2e9574(0x311)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x28c)],_0x2e9574(0x1fb))+_0x2e9574(0x165)+_0x3e9ea7(_0x4d1020['cyan'],'env')+_0x2e9574(0x29c)+_0x3e9ea7(_0x4d1020['cyan'],'routes')+'\x20'+_0x3e9ea7(_0x4d1020[_0x2e9574(0x8e)],_0x2e9574(0x15f))+_0x2e9574(0x392)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x28c)],_0x2e9574(0x217))+'\x20'+_0x3e9ea7(_0x4d1020['dim'],_0x2e9574(0x2cf))+_0x2e9574(0x11d)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x28c)],_0x2e9574(0x224))+_0x2e9574(0x227)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x28c)],'help')+_0x2e9574(0x1e3)+_0x3e9ea7(_0x4d1020[_0x2e9574(0x28c)],'exit')+'\x20'+_0x3e9ea7(_0x4d1020[_0x2e9574(0x8e)],_0x2e9574(0x350))+_0x2e9574(0x231));}let _0x12e1a8=![];async function _0x5c331f(_0x530b84,_0x5a3553=0x0,_0x12d00b=null){const _0x1ce519=_0x446cc8;_0x12e1a8&&(process[_0x1ce519(0x2e9)][_0x1ce519(0x21e)](_0x3e9ea7(_0x4d1020[_0x1ce519(0x1f4)],_0x1ce519(0x2f1))),process[_0x1ce519(0x2be)](0x82));_0x12e1a8=!![],process[_0x1ce519(0x2c0)]['write']('\x0a'),process['stderr'][_0x1ce519(0x21e)](_0x3e9ea7(_0x4d1020[_0x1ce519(0x123)],'\x20\x20[okdb]\x20'+(_0x12d00b?_0x1ce519(0x24b)+_0x12d00b+',\x20':'')+_0x1ce519(0x2e5)));const _0x51b1cf=setTimeout(()=>{const _0x87c4f2=_0x1ce519;process[_0x87c4f2(0x2e9)]['write'](_0x3e9ea7(_0x4d1020[_0x87c4f2(0x1f4)],_0x87c4f2(0x336))),process['exit'](0x1);},0x1388);try{await _0x530b84[_0x1ce519(0x1e2)]();}catch(_0x23a8c3){console['error'](_0x3e9ea7(_0x4d1020[_0x1ce519(0x1f4)],'\x20\x20'+_0x23a8c3[_0x1ce519(0x394)]));}clearTimeout(_0x51b1cf),process[_0x1ce519(0x2e9)][_0x1ce519(0x21e)](_0x3e9ea7(_0x4d1020[_0x1ce519(0x8e)],'\x20\x20[okdb]\x20closed\x20cleanly\x0a')),process[_0x1ce519(0x2be)](_0x5a3553);}function _0x217d01(_0xe32d2d){const _0x1e7e67=_0x446cc8,_0x3a7ced=_0xe32d2d[_0x1e7e67(0x308)]!==_0x1e7e67(0x354)?_0x3e9ea7(_0x4d1020[_0x1e7e67(0x123)],'['+_0xe32d2d[_0x1e7e67(0x308)]+']'):'';return _0x3e9ea7(_0x4d1020[_0x1e7e67(0x16d)]+_0x4d1020[_0x1e7e67(0x28c)],'okdb')+_0x3a7ced+_0x3e9ea7(_0x4d1020['gray'],'>\x20');}const _0x482320=new Set([_0x446cc8(0x36d),_0x446cc8(0x361),_0x446cc8(0x245),_0x446cc8(0x24a),_0x446cc8(0x385)]);async function _0x1c8e67(_0x4b2a9b,_0x3042f9,_0x4d99ed,_0x31ff01,_0x3b8ee0,_0x40ef66){const _0x3b4082=_0x446cc8;_0x4b2a9b=_0x4b2a9b[_0x3b4082(0x213)]();if(!_0x4b2a9b||_0x4b2a9b['startsWith']('#'))return;const _0xb493c4=_0x47f0dd(_0x4b2a9b),{flags:_0x558cb4,rest:_0x3d40d2}=_0x5c48c8(_0xb493c4);if(!_0x3d40d2[_0x3b4082(0x252)])return;const _0x4c039c=_0x3d40d2[0x0],_0x332034=_0x4c039c[_0x3b4082(0x290)]();if(_0x332034===_0x3b4082(0x237)){if(_0x3d40d2[0x1])_0x41008b(_0x3042f9,_0x53aef6(_0x3d40d2[0x1],_0x558cb4[_0x3b4082(0x308)]??_0x3b8ee0['env']));else _0x4ebad6(_0x3b8ee0);return;}if(_0x332034===_0x3b4082(0x2bb)){const _0x2704a2=_0x3d40d2[0x1];if(!_0x2704a2){console[_0x3b4082(0xcc)](_0x3e9ea7(_0x4d1020['red'],_0x3b4082(0x39e)));return;}try{_0x3042f9['env'](_0x2704a2),_0x3b8ee0['env']=_0x2704a2,_0x40ef66?.[_0x3b4082(0x3a3)](_0x217d01(_0x3b8ee0)),console['log'](_0x3b4082(0xe6)+_0x3e9ea7(_0x4d1020[_0x3b4082(0x15a)],'✓')+_0x3b4082(0x235)+_0x3e9ea7(_0x4d1020[_0x3b4082(0x16d)]+_0x4d1020['cyan'],_0x2704a2)+'\x0a');}catch{console[_0x3b4082(0xcc)](_0x3b4082(0xe6)+_0x3e9ea7(_0x4d1020[_0x3b4082(0x1f4)],'✗')+_0x3b4082(0x2d0)+_0x3e9ea7(_0x4d1020['bold'],_0x2704a2)+_0x3b4082(0x26c)+_0x3e9ea7(_0x4d1020[_0x3b4082(0x8e)],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x332034===_0x3b4082(0x16f)){const _0x1068bc=[..._0x3042f9[_0x3b4082(0x307)]['keys']()][_0x3b4082(0x33e)](_0x431051=>!_0x431051[_0x3b4082(0x84)]('~'));console[_0x3b4082(0xcc)]('');for(const _0x5e8d76 of _0x1068bc){const _0x263ba6=_0x5e8d76===_0x3b8ee0[_0x3b4082(0x308)];console[_0x3b4082(0xcc)]('\x20\x20'+(_0x263ba6?_0x3e9ea7(_0x4d1020['green'],'●'):_0x3e9ea7(_0x4d1020['dim'],'○'))+'\x20\x20'+(_0x263ba6?_0x3e9ea7(_0x4d1020[_0x3b4082(0x16d)]+_0x4d1020[_0x3b4082(0x28c)],_0x5e8d76):_0x3e9ea7(_0x4d1020[_0x3b4082(0x8e)],_0x5e8d76)));}console[_0x3b4082(0xcc)](_0x3b4082(0xe6)+_0x3e9ea7(_0x4d1020[_0x3b4082(0x8e)],_0x3b4082(0x21c))+'\x20'+_0x3e9ea7(_0x4d1020[_0x3b4082(0x28c)],_0x3b8ee0[_0x3b4082(0x308)])),console[_0x3b4082(0xcc)]('');return;}if(_0x332034===_0x3b4082(0x1f9)){const _0x587b64=[..._0x3042f9[_0x3b4082(0x307)][_0x3b4082(0x36e)]()][_0x3b4082(0x33e)](_0x11ac6d=>!_0x11ac6d[_0x3b4082(0x383)][_0x3b4082(0x84)]('~'));console[_0x3b4082(0xcc)]('');const _0x25b29a=Math[_0x3b4082(0x212)](..._0x587b64[_0x3b4082(0x296)](_0x24bbaa=>_0x24bbaa['name']['length']));for(const _0x560dfe of _0x587b64){const _0x473d3f=_0x560dfe[_0x3b4082(0x383)]===_0x3b8ee0[_0x3b4082(0x308)],_0x56fb34=_0x473d3f?_0x3e9ea7(_0x4d1020[_0x3b4082(0x15a)],'●'):_0x3e9ea7(_0x4d1020['dim'],'○'),_0x599014=_0x473d3f?_0x3e9ea7(_0x4d1020[_0x3b4082(0x16d)]+_0x4d1020['cyan'],_0x560dfe['name'][_0x3b4082(0x2b3)](_0x25b29a)):_0x3e9ea7(_0x4d1020[_0x3b4082(0x8e)],_0x560dfe[_0x3b4082(0x383)]['padEnd'](_0x25b29a)),_0x530ace=[..._0x560dfe['typeSubDbs'][_0x3b4082(0x140)]()]['filter'](_0x38e73d=>!_0x38e73d['startsWith']('~')),_0x244e80=_0x530ace['length']?_0x3e9ea7(_0x4d1020[_0x3b4082(0x8e)],_0x530ace[_0x3b4082(0x19b)](0x0,0x5)['join'](',\x20')+(_0x530ace[_0x3b4082(0x252)]>0x5?_0x3b4082(0x29e)+(_0x530ace[_0x3b4082(0x252)]-0x5)+_0x3b4082(0x88):'')):_0x3e9ea7(_0x4d1020[_0x3b4082(0x8e)],_0x3b4082(0x16a));console[_0x3b4082(0xcc)]('\x20\x20'+_0x56fb34+'\x20\x20'+_0x599014+'\x20\x20'+_0x244e80);}console[_0x3b4082(0xcc)]('');return;}if(_0x332034===_0x3b4082(0x117)){const _0x1735de=_0x558cb4['env']??_0x3d40d2[0x1]??_0x3b8ee0['env'];try{const _0x10b6e8=_0x3042f9[_0x3b4082(0x308)](_0x1735de),_0x208418=[..._0x10b6e8[_0x3b4082(0x14c)]['keys']()][_0x3b4082(0x33e)](_0x173457=>!_0x173457[_0x3b4082(0x84)]('~'))['sort']();console[_0x3b4082(0xcc)](_0x3b4082(0xe6)+_0x3e9ea7(_0x4d1020[_0x3b4082(0x8e)],_0x208418[_0x3b4082(0x252)]+_0x3b4082(0x8a)+(_0x208418[_0x3b4082(0x252)]!==0x1?'s':'')+_0x3b4082(0x158)+_0x1735de));for(const _0x2094ec of _0x208418){const _0x2b41ab=_0x10b6e8[_0x3b4082(0x14c)]['get'](_0x2094ec),_0x36980e=_0x2b41ab?.[_0x3b4082(0x1bb)]?.[_0x3b4082(0x1ce)]?.()??0x0,_0x38a5bf=_0x3e9ea7(_0x4d1020[_0x3b4082(0x16d)]+_0x4d1020[_0x3b4082(0x28c)],_0x2094ec[_0x3b4082(0x2b3)](0x1c));console[_0x3b4082(0xcc)]('\x20\x20\x20\x20'+_0x38a5bf+'\x20\x20'+_0x3e9ea7(_0x4d1020[_0x3b4082(0x1ea)],String(_0x36980e)[_0x3b4082(0x294)](0x6))+'\x20'+_0x3e9ea7(_0x4d1020['dim'],'records'));}console['log']('');}catch(_0x546e4d){console[_0x3b4082(0x28b)](_0x3e9ea7(_0x4d1020[_0x3b4082(0x1f4)],_0x3b4082(0xe6)+_0x546e4d[_0x3b4082(0x394)]+'\x0a'));}return;}if(_0x332034===_0x3b4082(0x2fa)){_0x963a58(_0x3042f9,_0x3d40d2[_0x3b4082(0x19b)](0x1)[_0x3b4082(0x347)]('\x20'));return;}if(_0x332034===_0x3b4082(0x384)){const _0x5f3f78=(_0x3d40d2[0x1]??'')[_0x3b4082(0x35a)]();if(!_0x5f3f78||_0x5f3f78==='on')_0x31ff01[_0x3b4082(0x110)]=!![],_0x31ff01[_0x3b4082(0x37d)]='info',console[_0x3b4082(0xcc)](_0x3b4082(0xe6)+_0x3e9ea7(_0x4d1020[_0x3b4082(0x15a)],'✓')+_0x3b4082(0x1e6)+_0x3e9ea7(_0x4d1020[_0x3b4082(0x8e)],'level:\x20info')+'\x0a');else{if(_0x5f3f78===_0x3b4082(0x278))_0x31ff01['enabled']=![],console[_0x3b4082(0xcc)](_0x3b4082(0xe6)+_0x3e9ea7(_0x4d1020[_0x3b4082(0x123)],'○')+_0x3b4082(0x25d));else _0x1054aa[_0x5f3f78]!==undefined?(_0x31ff01['enabled']=!![],_0x31ff01[_0x3b4082(0x37d)]=_0x5f3f78,console[_0x3b4082(0xcc)](_0x3b4082(0xe6)+_0x3e9ea7(_0x4d1020[_0x3b4082(0x15a)],'✓')+'\x20log\x20level:\x20'+_0x3e9ea7(_0x4d1020['bold'],_0x5f3f78)+'\x0a')):console[_0x3b4082(0x28b)](_0x3e9ea7(_0x4d1020[_0x3b4082(0x1f4)],_0x3b4082(0x389)));}return;}if(_0x332034===_0x3b4082(0x29a)||_0x332034===_0x3b4082(0x10d)){await _0x5c331f(_0x3042f9,0x0);return;}if(_0x332034===_0x3b4082(0x2fe)){const _0x33bf21=_0x3b4082(0x20e)+_0x4d99ed['port']+_0x3b4082(0x137),_0x23cace=process[_0x3b4082(0x109)]===_0x3b4082(0xf7)?_0x3b4082(0x1e4)+_0x33bf21:process[_0x3b4082(0x109)]==='darwin'?_0x3b4082(0x16e)+_0x33bf21:_0x3b4082(0x332)+_0x33bf21;require$$4[_0x3b4082(0x1c4)](_0x23cace),console[_0x3b4082(0xcc)](_0x3b4082(0xe6)+_0x3e9ea7(_0x4d1020[_0x3b4082(0x15a)],'✓')+'\x20opening\x20'+_0x3e9ea7(_0x4d1020[_0x3b4082(0x28c)],_0x33bf21)+'\x0a');return;}let _0x4484f3,_0x11ee02,_0x198991;if(_0x482320[_0x3b4082(0x2f4)](_0x332034)){_0x4484f3=_0x332034,_0x11ee02=_0x3d40d2[0x1],_0x198991=_0x3d40d2[_0x3b4082(0x19b)](0x2);if(!_0x11ee02){console['error'](_0x3e9ea7(_0x4d1020['red'],_0x3b4082(0x1ec)+_0x4c039c+_0x3b4082(0x2ab)));return;}}else _0x4484f3=null,_0x11ee02=_0x3d40d2[0x0],_0x198991=_0x3d40d2[_0x3b4082(0x19b)](0x1);const _0x1a0f07=_0x558cb4[_0x3b4082(0x308)]??_0x3b8ee0[_0x3b4082(0x308)],_0x51b4cb=_0x53aef6(_0x11ee02,_0x1a0f07);if(_0x558cb4[_0x3b4082(0x1a3)]){_0x41008b(_0x3042f9,_0x51b4cb);return;}let _0x72251c=null;if(_0x198991['length']){const _0x597a9b=_0x198991[_0x3b4082(0x347)]('\x20');try{_0x72251c=_0x464fb0(_0x597a9b);}catch(_0x9ab08a){console[_0x3b4082(0x28b)](_0x3e9ea7(_0x4d1020['red'],_0x3b4082(0x159)+_0x597a9b+_0x3b4082(0xe6)+_0x3e9ea7(_0x4d1020[_0x3b4082(0x8e)],_0x9ab08a[_0x3b4082(0x394)])+'\x0a'));return;}}if(!_0x4484f3)_0x4484f3=_0x72251c!==null?_0x3b4082(0x361):_0x3b4082(0x36d);try{const _0x59c684=await _0x331e64(_0x3042f9,_0x4484f3,_0x51b4cb,_0x72251c);_0x4896a(_0x59c684[_0x3b4082(0x240)],_0x59c684['body']);}catch(_0x4364d8){console[_0x3b4082(0x28b)]('\x0a\x20\x20'+_0x3e9ea7(_0x4d1020['red'],'✗')+'\x20'+_0x4364d8[_0x3b4082(0x394)]+'\x0a');}}class _0x16a3d1{constructor(){const _0x1b93fb=_0x446cc8;this['children']=new Map(),this[_0x1b93fb(0x2ca)]=null,this[_0x1b93fb(0x391)]=![];}}function _0x2ebfb9(_0x1d4372){const _0x106989=_0x446cc8,_0x389e05=new _0x16a3d1();for(const _0x3e140e of _0x1d4372){if(_0x3e140e[_0x106989(0x216)]?.['hidden'])continue;const _0x3fcac0=_0x3e140e['path'][_0x106989(0x141)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')[_0x106989(0x141)](/^\//,'');if(!_0x3fcac0)continue;let _0x2d3c84=_0x389e05;for(const _0x5268c3 of _0x3fcac0[_0x106989(0x242)]('/')['filter'](Boolean)){if(_0x5268c3[_0x106989(0x84)](':')){const _0x1211e3=_0x5268c3[_0x106989(0x19b)](0x1);if(!_0x2d3c84[_0x106989(0x2ca)])_0x2d3c84[_0x106989(0x2ca)]={'param':_0x1211e3,'node':new _0x16a3d1()};_0x2d3c84=_0x2d3c84['dynamic'][_0x106989(0x31f)];}else{if(!_0x2d3c84[_0x106989(0x12f)][_0x106989(0x2f4)](_0x5268c3))_0x2d3c84[_0x106989(0x12f)][_0x106989(0x253)](_0x5268c3,new _0x16a3d1());_0x2d3c84=_0x2d3c84['children'][_0x106989(0xfc)](_0x5268c3);}}_0x2d3c84[_0x106989(0x391)]=!![];}return _0x389e05;}const _0x1aebe2=new Map();function _0x44f252(_0x47e892,_0x52b583,_0x2be6f6){const _0x216516=_0x446cc8,_0x2b92d3=_0x1aebe2[_0x216516(0xfc)](_0x47e892);if(_0x2b92d3&&_0x2b92d3[_0x216516(0x192)]>Date[_0x216516(0x3a5)]())return _0x2b92d3[_0x216516(0x23c)];const _0x38a4d8=_0x2be6f6();return _0x1aebe2[_0x216516(0x253)](_0x47e892,{'val':_0x38a4d8,'exp':Date[_0x216516(0x3a5)]()+_0x52b583}),_0x38a4d8;}function _0x5962db(_0x2391d3,_0x501779,_0x500c42,_0x530a69){const _0x3b624f=_0x446cc8,_0x25c9d5=_0x501779[_0x3b624f(0x308)]??_0x530a69[_0x3b624f(0x308)];switch(_0x2391d3){case _0x3b624f(0x308):return[..._0x500c42[_0x3b624f(0x307)][_0x3b624f(0x140)]()]['filter'](_0x38e26e=>!_0x38e26e[_0x3b624f(0x84)]('~'));case _0x3b624f(0x87):return _0x44f252(_0x3b624f(0xe0)+_0x25c9d5,0x7d0,()=>{const _0x37d8d9=_0x3b624f;try{return[..._0x500c42[_0x37d8d9(0x308)](_0x25c9d5)[_0x37d8d9(0x14c)][_0x37d8d9(0x140)]()][_0x37d8d9(0x33e)](_0x30db4e=>!_0x30db4e['startsWith']('~'));}catch{return[];}});case _0x3b624f(0x168):if(!_0x501779[_0x3b624f(0x87)])return[];return _0x44f252('keys:'+_0x25c9d5+':'+_0x501779[_0x3b624f(0x87)],0x5dc,()=>{const _0x399515=_0x3b624f;try{const _0x3f4dcc=_0x500c42[_0x399515(0x308)](_0x25c9d5)[_0x399515(0x14c)][_0x399515(0xfc)](_0x501779[_0x399515(0x87)]);if(!_0x3f4dcc?.['data'])return[];const _0x179aa0=[];for(const {key:_0x48d1fe}of _0x3f4dcc[_0x399515(0x1bb)][_0x399515(0x2c8)]({'limit':0x32})){_0x179aa0[_0x399515(0x34f)](String(_0x48d1fe));if(_0x179aa0['length']>=0x32)break;}return _0x179aa0;}catch{return[];}});case _0x3b624f(0x1f3):if(!_0x501779['type'])return[];return _0x44f252(_0x3b624f(0x164)+_0x25c9d5+':'+_0x501779['type'],0x7d0,()=>{const _0x498777=_0x3b624f;try{const _0x19b77c=_0x500c42[_0x498777(0x308)](_0x25c9d5)[_0x498777(0x14c)][_0x498777(0xfc)](_0x501779[_0x498777(0x87)]);return _0x19b77c?[..._0x19b77c[_0x498777(0x315)]?.['keys']()??[]]:[];}catch{return[];}});case _0x3b624f(0x17c):if(!_0x501779[_0x3b624f(0x87)])return[];return _0x44f252(_0x3b624f(0x330)+_0x25c9d5+':'+_0x501779[_0x3b624f(0x87)],0x7d0,()=>{const _0x3858dd=_0x3b624f;try{return _0x500c42[_0x3858dd(0xc0)]?.[_0x3858dd(0x2b0)]?.(_0x501779['type'],_0x500c42[_0x3858dd(0x308)](_0x25c9d5))?.[_0x3858dd(0x296)](_0x2a9761=>_0x2a9761['name'])??[];}catch{return[];}});default:return[];}}function _0xe94eb0(_0x3566f1,_0x5cb3fe,_0x39e4af,_0x4ed503){const _0x44b866=_0x446cc8,_0x563859=_0x3566f1[_0x44b866(0x1dd)]('/'),_0x749725=_0x3566f1['split']('/'),_0x9cb638=_0x563859?_0x749725[_0x44b866(0x19b)](0x0,-0x1):_0x749725[_0x44b866(0x19b)](0x0,-0x1),_0x4680ef=_0x563859?'':_0x749725[_0x749725[_0x44b866(0x252)]-0x1];let _0x5eaaa5=_0x5cb3fe;const _0x12efc1={};for(const _0x5c4c68 of _0x9cb638){if(!_0x5c4c68)continue;if(_0x5eaaa5[_0x44b866(0x12f)][_0x44b866(0x2f4)](_0x5c4c68))_0x5eaaa5=_0x5eaaa5['children'][_0x44b866(0xfc)](_0x5c4c68);else{if(_0x5eaaa5[_0x44b866(0x2ca)])_0x12efc1[_0x5eaaa5[_0x44b866(0x2ca)][_0x44b866(0x169)]]=_0x5c4c68,_0x5eaaa5=_0x5eaaa5[_0x44b866(0x2ca)][_0x44b866(0x31f)];else return[];}}const _0x3cbe18=_0x9cb638[_0x44b866(0x33e)](Boolean),_0x126ba5=_0x3cbe18[_0x44b866(0x252)]?_0x3cbe18[_0x44b866(0x347)]('/')+'/':'',_0x4561a3=[];for(const [_0x5a60ee]of _0x5eaaa5['children']){if(_0x5a60ee[_0x44b866(0x84)](_0x4680ef))_0x4561a3[_0x44b866(0x34f)](_0x126ba5+_0x5a60ee);}if(_0x5eaaa5[_0x44b866(0x2ca)])for(const _0x1c8e07 of _0x5962db(_0x5eaaa5[_0x44b866(0x2ca)]['param'],_0x12efc1,_0x39e4af,_0x4ed503)){if(String(_0x1c8e07)['startsWith'](_0x4680ef))_0x4561a3[_0x44b866(0x34f)](_0x126ba5+_0x1c8e07);}return _0x4561a3[_0x44b866(0x19b)](0x0,0x64);}const _0x1955ad=[_0x446cc8(0x1a3),_0x446cc8(0x348),_0x446cc8(0x308),_0x446cc8(0xf4),'types',_0x446cc8(0xc5),_0x446cc8(0x217),_0x446cc8(0x224),_0x446cc8(0x2be),'quit'];function _0x22ee9d(_0x2bdf5c,_0x537293,_0x3e8e2d){return function _0x4bc27b(_0x2c9a5a){const _0x149208=_0x5721;try{const _0x2fcb69=_0x2c9a5a['search'](/\s[{[]/),_0x2292fb=_0x2fcb69>=0x0?_0x2c9a5a[_0x149208(0x19b)](0x0,_0x2fcb69):_0x2c9a5a,_0x4c563f=_0x2292fb[_0x149208(0x15c)]();if(!_0x4c563f){const _0x41971b=[..._0x1955ad,...[..._0x2bdf5c[_0x149208(0x12f)][_0x149208(0x140)]()]][_0x149208(0x19b)](0x0,0x64);return[_0x41971b,''];}const _0x467ff6=_0x4c563f[_0x149208(0x242)](/\s+/),_0x51e5e4=_0x467ff6[0x0],_0x3e6332=_0x51e5e4[_0x149208(0x290)]();if(_0x467ff6[_0x149208(0x252)]===0x1){const _0x139b63=_0x51e5e4[_0x149208(0x35a)](),_0x5b2cb8=_0x1955ad[_0x149208(0x33e)](_0x3262e3=>_0x3262e3[_0x149208(0x84)](_0x139b63)),_0x457dc5=_0xe94eb0(_0x51e5e4,_0x2bdf5c,_0x537293,_0x3e8e2d),_0x42a608=[...new Set([..._0x5b2cb8,..._0x457dc5])][_0x149208(0x19b)](0x0,0x64);return[_0x42a608,_0x51e5e4];}if(_0x482320['has'](_0x3e6332)&&_0x467ff6[_0x149208(0x252)]===0x2){const _0x5c7583=_0x467ff6[0x1],_0x148222=_0xe94eb0(_0x5c7583,_0x2bdf5c,_0x537293,_0x3e8e2d);return[_0x148222[_0x149208(0x296)](_0x34d34e=>_0x51e5e4+'\x20'+_0x34d34e),_0x51e5e4+'\x20'+_0x5c7583];}if(!_0x482320[_0x149208(0x2f4)](_0x3e6332)&&_0x467ff6[_0x149208(0x252)]>0x1){const _0x113250=_0xe94eb0(_0x51e5e4,_0x2bdf5c,_0x537293,_0x3e8e2d),_0x431012='\x20'+_0x467ff6[_0x149208(0x19b)](0x1)[_0x149208(0x347)]('\x20');return[_0x113250['map'](_0x387bb4=>_0x387bb4+_0x431012),_0x51e5e4+_0x431012];}return[[],_0x2c9a5a];}catch{return[[],_0x2c9a5a];}};}async function _0x3cd1fc(_0x55405f,_0x28141a){const _0xf0da59=_0x446cc8,_0x5e0a50={'enabled':!![],'level':_0x28141a['logLevel']??'info'},_0x550749={'env':_0xf0da59(0x354)},_0x358652={'current':null},_0x530fdd=_0x2ebfb9(_0x55405f[_0xf0da59(0x256)][_0xf0da59(0x97)]()),_0x4d0fd5=_0x22ee9d(_0x530fdd,_0x55405f,_0x550749);_0x55405f[_0xf0da59(0xcc)][_0xf0da59(0x2c5)](_0xab3f30=>{const _0x52b136=_0xf0da59;if(!_0x5e0a50[_0x52b136(0x110)])return;_0x75416f(_0xab3f30,_0x5e0a50[_0x52b136(0x37d)]),_0x358652[_0x52b136(0x2a6)]?.[_0x52b136(0xc3)](!![]);}),_0xedfd61(_0x55405f,_0x28141a);const _0x3cd913=_0x528c4b[_0xf0da59(0x1ca)]({'input':process['stdin'],'output':process[_0xf0da59(0x2c0)],'terminal':!![],'completer':_0x4d0fd5,'prompt':_0x217d01(_0x550749),'historySize':_0x117674});try{const _0x2a0cf5=_0x4dfee7['readFileSync'](_0x186741,_0xf0da59(0x1cf))[_0xf0da59(0x242)]('\x0a')[_0xf0da59(0x33e)](Boolean);_0x3cd913[_0xf0da59(0x153)]=_0x2a0cf5[_0xf0da59(0x2d4)]()['slice'](0x0,_0x117674);}catch{}_0x358652[_0xf0da59(0x2a6)]=_0x3cd913,_0x3cd913['on'](_0xf0da59(0x321),async _0x580d3b=>{const _0x1dfb6f=_0xf0da59;_0x3cd913[_0x1dfb6f(0x15e)]();try{await _0x1c8e67(_0x580d3b,_0x55405f,_0x28141a,_0x5e0a50,_0x550749,_0x3cd913);}catch(_0x3adfd1){console['error'](_0x3e9ea7(_0x4d1020['red'],'\x20\x20Error:\x20'+_0x3adfd1['message']));}finally{_0x3cd913[_0x1dfb6f(0x259)](),_0x3cd913[_0x1dfb6f(0xc3)]();}}),_0x3cd913['on'](_0xf0da59(0x1e2),()=>{const _0x5d4092=_0xf0da59;try{const _0x9ff107=[..._0x3cd913[_0x5d4092(0x153)]]['reverse']()[_0x5d4092(0x33e)](Boolean)['slice'](0x0,_0x117674);_0x4dfee7[_0x5d4092(0x154)](_0x186741,_0x9ff107[_0x5d4092(0x347)]('\x0a')+'\x0a');}catch{}_0x5c331f(_0x55405f,0x0);});let _0x59b129=0x0;return process['on']('SIGINT',()=>{const _0x517390=_0xf0da59;if(_0x12e1a8)return _0x5c331f(_0x55405f,0x82,_0x517390(0x1f7));if(_0x3cd913['line']==='')return _0x5c331f(_0x55405f,0x0,_0x517390(0x1f7));const _0x5c6b74=Date[_0x517390(0x3a5)]();if(_0x5c6b74-_0x59b129<0x5dc)return _0x5c331f(_0x55405f,0x0,'SIGINT\x20(double-tap)');_0x59b129=_0x5c6b74,process[_0x517390(0x2c0)]['write']('\x0a'),_0x3cd913['clearLine'](0x0),_0x3cd913[_0x517390(0xc3)](),process[_0x517390(0x2e9)][_0x517390(0x21e)](_0x3e9ea7(_0x4d1020[_0x517390(0x8e)],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on'](_0xf0da59(0x232),()=>_0x5c331f(_0x55405f,0x0,_0xf0da59(0x232))),process['on']('SIGBREAK',()=>_0x5c331f(_0x55405f,0x0,_0xf0da59(0x35e))),_0x3cd913[_0xf0da59(0xc3)](),_0x3cd913;}return okdbShell={'start':_0x3cd1fc,'colorLog':_0x75416f,'lenientParse':_0x464fb0,'_splitLine':_0x47f0dd,'_formatRouteHelpLines':_0x613704,'_routeSummary':_0x4ad167,'_routeTags':_0x52c26d},okdbShell;}var hasRequiredOkdb;function _0x4510(){const _0x442c26=['127.0.0.1','der','list','CREATED','\x20MB)','padEnd','\x20\x20✗','createPublicKey','\x0a[okdb]\x20received\x20','./okdb-data','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','\x20bytes,\x20need\x20>=\x2065)','\x20already\x20in\x20use','USE','addedAt','limits','exit','\x22\x20to\x20enable\x20it.','stdout','_active','sync:apply','payload','--log-requests','attach','blobs','1866096acqKSJ','getRange','body:\x20','dynamic','Version\x20mismatch\x20for\x20','columns','txn:end','\x0d[okdb]\x20','[on|off|level]','\x20environment\x20','listen','entries','types','reverse','failures','--port','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','dropIndex','call','expiry','[okdb]\x20reset:\x20','29758QkocKL','FEATURES','4ZUWVFA','Processors','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','Invalid\x20index\x20key\x20type\x20for\x20\x27','dbPath','username','--drop','shutting\x20down…\x0a','alloc','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20import\x20complete','stderr','test','config\x20file\x20invalid:\x20','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','active','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','gray','engines','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','--label','\x20does\x20not\x20exist','has','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','tags','forEach','processors/','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','ROUTES','\x20envs','1797670pXDIJO','license:added','OPEN','\x20\x20✓\x20database\x20opened\x0a','some','PERMISSIONS','[okdb]\x20invalid\x20log\x20level:\x20\x22','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','type/users','exportToFile','transport','_envs','env','License\x20already\x20stored','fts:reset','freeze','body','find','LICENSE_TYPE_OPEN','Foreign\x20key\x20violation:\x20','init','\x0a\x0a\x20\x20','syncPeers','\x20\x20Type\x20','toString','indexToDb','LICENSE_HASH_MISMATCH','[okdb]\x20created\x20./okdb-data','\x20\x20\x20\x20\x20\x20','base64url','null','OKDBInvalidPrimaryKeyError','boolean','--username','wrong_node','node','permissions','line','/api/env/','LICENSE_INVALID','FOREIGN_KEY_DELETE_RESTRICTED','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','writes=','includes','sizeBefore','--token','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','VERSION_MISMATCH','[okdb]\x20created\x20.kdbconfig','resolve','readUInt8','reason','fts:','__OKDB_PUB_FINGERPRINT__','xdg-open\x20','(none)','logLevel','expires','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','system:bus_state_change','rawBuf','System','[okdb]\x20loaded\x20config:\x20','queue/','\x20\x20(need\x20≥\x2018)','License\x20expired\x20or\x20invalidated','filter','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','version','other','\x20documents\x20fail\x20validation','setSchema','spki','../okdb','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','join','use','(unset)','toFixed','noAdmin','details','\x20to\x20quit.','createHash','push','/\x20quit\x20/\x20Ctrl+C','Feature\x20not\x20licensed:\x20','_license','INDEX_ALREADY_REGISTERED','default','\x20\x20→\x20\x20','Unique\x20constraint\x20violated\x20on\x20','stack','every','question','toLowerCase','OKDBIndexHasConsumersError','pin','1.8.13','SIGBREAK','_isFree','child_process','POST','files/','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','allocUnsafe','crypto','admin','Schema\x20validation\x20failed\x20for\x20','config','.kdbconfig','path','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','schema:drop','GET','values','exportBlobs','then','emit','type/users\x20--help','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','.kdb_history','activation','resetting','index:reset','No\x20tokens.','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','readFileSync','sizeAfter','system:clock_change','level','\x20\x20(','--password','sha256','mcp','license:removed','name','LOGS','DELETE','OKDBInvalidValueError','\x20\x20✓\x20OKDB\x20server\x20running','stdin','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','\x20\x20\x20\x20addedAt:\x20\x20\x20','ttl:expired','\x20\x20\x20\x20licensee:\x20\x20','expired','\x1b[34m','safety','dest','terminal','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','rmSync','message','envs=','started','_ensureTokensType','concat','./okdb-backup','transport:\x20','\x20result','type:registered','getPins','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','description','cause','effective','writeUInt8','setPrompt','\x20\x20\x20\x20id:\x20\x20\x20\x20','now','\x0a\x20\x20License\x20details:','readline','hidden','\x20\x20(licensee:\x20','backup','\x20\x20\x20\x20usage:\x20\x20\x20','stopping','\x1b[33m','number','onLicenseExpired','startsWith','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','\x20deleted','type','\x20more','env/','\x20type','peers=','hasType','type/users/item/alice','dim','\x22\x20is\x20used\x20by:\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','3297130TLASMt','derivePin','\x1b[36m','available','license:invalid','_lookupByName','listRoutes','--grants','summary','targetKey','expiresAt','byteLength','registerType','INDEX_HAS_CONSUMERS','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','LICENSE_FEATURE_DISABLED','invalid','uuid','56WzxYVh','maxWrites','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','SCHEMA_COLLECTION_INVALID','warn','hex','{}[]:,\x27\x22','label','sourceKey','Invalid\x20activation\x20token:\x20','ttl:set','unlinkSync','--help','\x20records','\x0a\x20\x20Joining\x20cluster\x20at\x20','prototype','floor','blob','\x20\x20\x20\x20\x20\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','node\x20','white','\x20\x20╔═══════════════════════════╗','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','env:opened','\x20\x20✓\x20Removed\x20license\x20','162555RCxnEM','\x20\x20changes=','PUB_FINGERPRINT','fts','reload','\x20\x20Common\x20causes:','prompt','license:activated','routes','[okdb]\x20blobs:\x20imported=','result','\x20\x20[','LICENSED_BUILD','Index\x20\x27','[okdb]\x20export\x20complete','log','[okdb]\x20opening\x20','detachConsole',':\x20key\x20[','properties','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x20day(s).','NOT_FOUND','\x20references\x20','database\x20path\x20writable:\x20','<json-body>','env/:env','timeMachine','ttl','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','OKDBTypeNotRegisteredError','OKDBError','value','unknown','kind','types:','writeUInt32BE','pending','toLocaleString','Embeddings','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','\x0a\x20\x20','item:update',',\x20closing…\x0a','\x20\x20╚═══════════════════════════╝','[okdb]\x20error:\x20--password\x20requires\x20--name','api','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','--permissions','SIG_INVALID','\x20\x20\x20\x20\x20http://localhost:','/types\x0a\x20\x20\x20\x20','\x20\x20⚠','dirname','round','envs','~tokens','--key','win32','typesPerEnv','index:drop','homedir','shutdown','get','fts:drop','[okdb]\x20importing\x20','--version','--path','valid','Records','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','[okdb]\x20invalid\x20port:\x20','--address','\x22\x20already\x20exists','114TFHdOy','once','platform','options','OKDBTypeAlreadyRegisteredError','ceil','QUIT','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','\x20\x20\x20http://localhost:','enabled','Engines','\x20SECURITY\x20NOTICE','createServer','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x20\x20✓\x20','TYPES','Types','FOREIGN_KEY_VIOLATION','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','SCHEMA_VALIDATION_FAILED','\x27\x20on\x20type\x20\x27','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','<path>','\x22\x20(must\x20be\x20debug|info|warn|error)','[okdb]\x20closed\x20cleanly\x0a','\x20for\x20commands,\x20','system:drain','yellow','errors','okdb.pid','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','unique:violation','txn:rollback','copy','\x1b[0m','licenseId','Hint:\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20','title','children','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','min','createdAt','OKDBInvalidIndexKeyError','\x20\x20✓\x20Revoked\x20token\x20','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','id:\x20','/admin/index.html','randomUUID','access','\x20licenses','MALFORMED_TOKEN','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','createHmac','[env]','debug','keys','replace','access:\x20',']\x20already\x20maps\x20to\x20\x27','ref:violation','\x20\x20⚠\x20\x20','okdb','\x20\x20║','\x20\x20(name:\x20','OKDBNotFoundError','license','\x27:\x20','typeSubDbs','stopped','system','Indexes',',\x20label:\x20','\x1b[32m','count','history','writeFileSync','pid','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','/api','\x20in\x20','\x0a\x20\x20Invalid\x20JSON:\x20','green','registerFts','trimStart','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','pause','[filter]','Bearer\x20','Invalid\x20primary\x20key\x20type:\x20','argv','\x20\x20\x20\x20\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/','idx:','\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','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','\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','key','param','(no\x20types)','yes','[okdb]\x20started\x20in\x20','bold','open\x20','ENV','system:ready','inputSchema','token','true','charCodeAt','isInteger','importFromFile','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','LICENSE_EXPIRED_ACTION','ACTIVATION_EXPIRED','tags:\x20','\x20(must\x20be\x201–65535)','ftsName','ready','fts:registered','\x22.\x20Use:\x20create,\x20list,\x20revoke','\x20\x20skipped=','password','\x27\x20doesn\x27t\x20exist','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','[okdb]\x20backing\x20up\x20to\x20','reset','\x1b[90m','schema:set','files','verifyActivation','\x22\x20→\x20','decoded','doctor','__writeCounter','\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','importBlobs','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','code','exp','LICENSE_ACTIVATION_INVALID','--log-level','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','type/','PIN','LICENSE_LIMIT_EXCEEDED','starting','created','slice','\x1b[37m','listening','loadEnvFile','\x27,\x20cannot\x20map\x20to\x20\x27','\x20\x20\x20\x20\x20\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','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','EADDRINUSE','help','randomBytes','\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/','writeUInt16BE','\x1b[2m','_licenseHash','node:crypto','toISOString','types\x20--env\x20staging','PUBLIC_KEY_PEM','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','/type/users/query\x0a\x20\x20\x20\x20','queue','view:progress','\x20file','/api/','sourceType','handle','Admin','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','sub','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','(null)','\x20\x20\x20\x20limits:\x20\x20\x20\x20','data','drop','[okdb]\x20exporting\x20blobs…','\x0a\x20\x20\x20\x20','operation','TYPE_NOT_REGISTERED','Invalid\x20license\x20blob:\x20','\x20\x20All\x20checks\x20passed.\x0a','[okdb]\x20error:\x20failed\x20to\x20read\x20','exec','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','--env\x20<name>','\x20\x20Shell\x20commands','ttl:clear','1557430QloldH','createInterface','create','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','unique:violation_resolved','getCount','utf8','Environments','item:remove','EXPIRES','\x20\x20\x20\x20writes:\x20\x20\x20\x20','[okdb]\x20error:\x20','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','existsSync','[okdb]\x20port\x20','system:poke','--no-admin','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','indexes','[okdb]\x20nothing\x20to\x20reset\x20—\x20','endsWith','\x20(expires\x20','addLicense','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','from','close','\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','start\x20','Type\x20\x27','\x20logs\x20on\x20\x20','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','{}[]:,\x0a\x0d\x09\x20','string','magenta','\x20\x20\x20\x20\x20\x20\x20','\x20\x20Usage:\x20','embeddings','clearTtl','migrate','dropping','creating','dropSchema','index','red','\x20\x20\x20\x20license:\x20','OKDBIndexNotRegisteredError','SIGINT','grants','ENVS','STATUS','use\x20<env>','features','item:create','\x20/\x20','sig','noRepl','scrypt','type:drop','halted','activateLicense','\x20\x20\x20\x20features:\x20\x20','Build\x20expects\x20public\x20key\x20fingerprint\x20','Files','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','exports','\x20\x20Some\x20checks\x20failed.\x0a','\x20\x20\x20\x20expires:\x20\x20\x20','licensed','--no-repl','http://localhost:','--types','\x20\x20(unlimited)','parse','max','trim','isArray','\x20\x20Envs:\x20\x20\x20\x20','meta','logs','\x22\x20matches\x20','registerIndex','info','licensee','active:','\x20\x20\x20\x20permissions:\x20','write','\x20\x20\x20\x20admin:\x20http://localhost:','logRequests','HTTP\x20','update','\x20\x20\x20\x20status:\x20\x20\x20\x20active','open','fill','License\x20limit\x20exceeded:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','\x0a\x20\x20✓\x20Token\x20created','\x20months\x20from\x20issuance)','%),\x20','\x20\x20Expected\x20one\x20of:','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','--ttl','resetFts','/type/users/item/alice\x0a\x20\x20\x20\x20','Examples','\x20\x20\x20\x20graceful\x20shutdown\x0a','SIGTERM','put','\x20\x20Usage:','\x20active\x20env:\x20','VERB','HELP','verify','port','--name','no\x20.kdbconfig\x20(using\x20defaults)','val','finally','\x20MB\x20→\x20','digest','status','records','split','./okdb-export.ndjson','\x1b[1m','PUT',':\x20expected\x20',')\x20to\x20your\x20license\x20vendor.','hasOwnProperty','_systemEnv','PATCH','received\x20','isTTY','ref:violation_resolved','roles','\x0a\x20\x20✓\x20License\x20added','[okdb]\x20imported\x20\x20types=','address','length','set','readUInt32BE','server','http','mkdirSync','isFeatureEnabled','resume','object','standard','[okdb]\x20exported\x20\x20types=','\x20logs\x20off\x0a','isFile','7071666JApXJS','repeat','\x20writes\x20(','fieldPath','licenseType','time','events','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','OKDBForeignKeyDeleteError','License\x20signature\x20invalid:\x20','--changes','\x20\x20·\x20\x20','remove','\x20not\x20found','sync','0123456789ABCDEFGHJKMNPQRSTVWXYZ','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','ALREADY_EXISTS','NAME','~licenses','txn:start','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','detectInputType','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','(add\x20a\x20license\x20first)','off','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','OKDBVersionMismatchError','index:registered','changes','revoke','licenseHash','\x20which\x20does\x20not\x20exist','export','[okdb]\x20exporting\x20env\x20\x22','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','env:removed','--config','application/json','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','stringify','listLicenses','[okdb]\x20reset\x20aborted','TYPE_ALREADY_REGISTERED','error','cyan','DELETE\x20type/users/item/x','\x0a\x20\x20No\x20routes\x20matching\x20\x22','\x20\x20@','toUpperCase','Cannot\x20delete\x20','equals','\x20(expires\x20in\x20','padStart','indexOf','map','import','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','selfAddress','EXIT','INVALID_PRIMARY_KEY','\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','INDEX_NOT_REGISTERED','\x20\x20+','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x20\x20Path\x20access','\x20\x20\x20\x20','--env','\x20to\x20browse\x20the\x20API,\x20','No\x20license\x20found\x20matching\x20this\x20activation\x20token','OKDBUniqueConstraintError','current','auth','\x20\x20http://localhost:','method','waiting','\x20<path>\x20[json-body]','\x20\x20Flags','decodeLicenseBlob'];_0x4510=function(){return _0x442c26;};return _0x4510();}function requireOkdb(){const _0x87d22a=_0x1f0ec4;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x87d22a(0x19e)]();}catch{}const _0x25cc68=require$$1$1,_0x190973=require$$1;function _0x1b438f(_0x934cea){const _0x26be8d=_0x87d22a,_0x336d52=_0x934cea[_0x26be8d(0x19b)](0x2),_0x3a0b47={};let _0x35f309=0x0;while(_0x35f309<_0x336d52[_0x26be8d(0x252)]){const _0x597b79=_0x336d52[_0x35f309];if(_0x597b79==='--port'||_0x597b79==='-p')_0x3a0b47[_0x26be8d(0x239)]=Number(_0x336d52[++_0x35f309]);else{if(_0x597b79===_0x26be8d(0x100)||_0x597b79==='-d')_0x3a0b47[_0x26be8d(0x36a)]=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0xf6)||_0x597b79==='-k')_0x3a0b47[_0x26be8d(0x168)]=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0x284)||_0x597b79==='-c')_0x3a0b47[_0x26be8d(0x368)]=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0x194))_0x3a0b47['logLevel']=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0x20d))_0x3a0b47[_0x26be8d(0x200)]=!![];else{if(_0x597b79===_0x26be8d(0x1d9))_0x3a0b47[_0x26be8d(0x34b)]=!![];else{if(_0x597b79===_0x26be8d(0x2a2)||_0x597b79==='-e')_0x3a0b47[_0x26be8d(0x308)]=_0x336d52[++_0x35f309];else{if(_0x597b79==='--types')_0x3a0b47[_0x26be8d(0x2d3)]=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0x269))_0x3a0b47[_0x26be8d(0x27c)]=!![];else{if(_0x597b79==='--blobs')_0x3a0b47[_0x26be8d(0x2c6)]=!![];else{if(_0x597b79===_0x26be8d(0x2e4))_0x3a0b47[_0x26be8d(0x1bc)]=!![];else{if(_0x597b79==='--open'){const _0x288120=[];while(_0x35f309+0x1<_0x336d52[_0x26be8d(0x252)]&&!_0x336d52[_0x35f309+0x1][_0x26be8d(0x84)]('--')){_0x288120[_0x26be8d(0x34f)](_0x336d52[++_0x35f309]);}_0x3a0b47[_0x26be8d(0x224)]=_0x288120[_0x26be8d(0x252)]>0x0?_0x288120:!![];}else{if(_0x597b79===_0x26be8d(0x2c4))_0x3a0b47[_0x26be8d(0x220)]=!![];else{if(_0x597b79==='--name')_0x3a0b47[_0x26be8d(0x383)]=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0x37f))_0x3a0b47['password']=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0x2f2))_0x3a0b47['label']=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0xed))_0x3a0b47[_0x26be8d(0x320)]=_0x336d52[++_0x35f309];else{if(_0x597b79==='--grants')_0x3a0b47['grants']=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0x22d))_0x3a0b47[_0x26be8d(0xd9)]=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0x329))_0x3a0b47['token']=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0x31d)||_0x597b79==='-u')_0x3a0b47[_0x26be8d(0x2e3)]=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0x105))_0x3a0b47[_0x26be8d(0x299)]=_0x336d52[++_0x35f309];else{if(_0x597b79===_0x26be8d(0xff)||_0x597b79==='-v'){const _0x5978ba=require$$2;console['log'](_0x5978ba[_0x26be8d(0x340)]),process[_0x26be8d(0x2be)](0x0);}else(_0x597b79===_0x26be8d(0xaf)||_0x597b79==='-h')&&(_0x81309b(),process[_0x26be8d(0x2be)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x35f309++;}return _0x3a0b47;}function _0x81309b(){const _0x37ed17=_0x87d22a;console[_0x37ed17(0xcc)](_0x37ed17(0x167));}const _0x14eabd=new Set([_0x87d22a(0x13f),_0x87d22a(0x21a),_0x87d22a(0xa7),_0x87d22a(0x28b)]);function _0x1c6f3d(_0x178056){const _0x32d732=_0x87d22a,_0x1243f2=_0x178056[_0x32d732(0x368)]?_0x25cc68[_0x32d732(0x32d)](_0x178056['config']):_0x25cc68[_0x32d732(0x32d)](_0x32d732(0x369));let _0x2fa7f5={};if(_0x190973['existsSync'](_0x1243f2))try{const _0x527f8a=_0x190973[_0x32d732(0x37a)](_0x1243f2,_0x32d732(0x1cf))[_0x32d732(0x141)](/^\uFEFF/,'');_0x2fa7f5=JSON[_0x32d732(0x211)](_0x527f8a),console[_0x32d732(0xcc)](_0x32d732(0x33a)+_0x1243f2);}catch(_0x4c457b){console['error'](_0x32d732(0x166)+_0x1243f2+':\x20'+_0x4c457b[_0x32d732(0x394)]),process[_0x32d732(0x2be)](0x1);}const _0xa5bde5={'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},_0xf34186={'port':_0x178056[_0x32d732(0x239)]??_0x2fa7f5['port']??_0xa5bde5['port']??0x2124,'dbPath':_0x178056[_0x32d732(0x36a)]??_0x2fa7f5[_0x32d732(0x36a)]??_0xa5bde5[_0x32d732(0x36a)]??_0x32d732(0x2b7),'key':_0x178056[_0x32d732(0x168)]??_0x2fa7f5[_0x32d732(0x168)]??_0xa5bde5[_0x32d732(0x168)]??undefined,'logLevel':_0x178056['logLevel']??_0x2fa7f5[_0x32d732(0x334)]??_0xa5bde5['logLevel']??_0x32d732(0x21a),'noRepl':_0x178056[_0x32d732(0x200)]??_0x2fa7f5[_0x32d732(0x200)]??_0xa5bde5[_0x32d732(0x200)]??![],'noAdmin':_0x178056[_0x32d732(0x34b)]??_0x2fa7f5[_0x32d732(0x34b)]??_0xa5bde5[_0x32d732(0x34b)]??![],'admin':_0x2fa7f5[_0x32d732(0x366)]??{},'api':_0x2fa7f5[_0x32d732(0xeb)]??undefined,'auth':_0x2fa7f5[_0x32d732(0x2a7)]??undefined,'mcp':_0x2fa7f5[_0x32d732(0x381)]??undefined,'timeMachine':_0x2fa7f5[_0x32d732(0xd8)]!==![]?_0x2fa7f5['timeMachine']??{}:![]};return _0x178056['open']!==undefined&&(_0xf34186[_0x32d732(0x2a7)]=_0xf34186[_0x32d732(0x2a7)]||{},_0xf34186['auth'][_0x32d732(0x224)]=_0x178056[_0x32d732(0x224)]),_0x178056[_0x32d732(0x220)]&&(_0xf34186['debug']=_0xf34186['debug']||{},_0xf34186[_0x32d732(0x13f)][_0x32d732(0x220)]=!![]),(!Number[_0x32d732(0x175)](_0xf34186[_0x32d732(0x239)])||_0xf34186['port']<0x1||_0xf34186[_0x32d732(0x239)]>0xffff)&&(console[_0x32d732(0x28b)](_0x32d732(0x104)+_0xf34186[_0x32d732(0x239)]+_0x32d732(0x17b)),process[_0x32d732(0x2be)](0x1)),!_0x14eabd[_0x32d732(0x2f4)](_0xf34186[_0x32d732(0x334)])&&(console[_0x32d732(0x28b)](_0x32d732(0x302)+_0xf34186[_0x32d732(0x334)]+_0x32d732(0x11f)),process[_0x32d732(0x2be)](0x1)),_0xf34186;}function _0x5c1149(_0x12b9ef){const _0x5d53c7=_0x87d22a;return!!(_0x12b9ef&&typeof _0x12b9ef===_0x5d53c7(0x25a)&&!Array[_0x5d53c7(0x214)](_0x12b9ef)&&Object[_0x5d53c7(0x140)](_0x12b9ef)[_0x5d53c7(0x252)]>0x0);}const _0x4a8390=!process['stdout'][_0x87d22a(0x24c)]||!!process.env.NO_COLOR;function _0x2ae864(_0x462d02,_0x133cc4){const _0x3bec96=_0x87d22a;return _0x4a8390?_0x133cc4:'\x1b['+_0x462d02+'m'+_0x133cc4+_0x3bec96(0x12a);}function _0x534ac9(_0x490fb5){const _0x68eefc=_0x87d22a;if(!_0x490fb5||_0x490fb5[_0x68eefc(0x252)]===0x0)return;const _0x4e3346='─'[_0x68eefc(0x260)](0x38);process[_0x68eefc(0x2e9)][_0x68eefc(0x21e)]('\x0a'),process[_0x68eefc(0x2e9)]['write'](_0x2ae864('33',_0x68eefc(0x145)+_0x490fb5[_0x68eefc(0x252)]+_0x68eefc(0x112)+(_0x490fb5[_0x68eefc(0x252)]>0x1?'S':'')+'\x0a')),process[_0x68eefc(0x2e9)][_0x68eefc(0x21e)]('\x20\x20'+_0x4e3346+'\x0a');for(const _0x38bcdf of _0x490fb5){const _0x257f6b=_0x38bcdf[_0x68eefc(0x37d)]===_0x68eefc(0x28b)?_0x2ae864('31',_0x68eefc(0x2b4)):_0x2ae864('33',_0x68eefc(0xf1));process['stderr']['write'](_0x257f6b+'\x20\x20'+_0x2ae864('1',_0x38bcdf[_0x68eefc(0x12e)])+'\x0a'),process[_0x68eefc(0x2e9)][_0x68eefc(0x21e)](_0x68eefc(0x1eb)+_0x38bcdf[_0x68eefc(0x394)]+'\x0a');if(_0x38bcdf['hint'])process[_0x68eefc(0x2e9)][_0x68eefc(0x21e)](_0x68eefc(0x1eb)+_0x2ae864('2',_0x68eefc(0x12c)+_0x38bcdf['hint'])+'\x0a');process[_0x68eefc(0x2e9)][_0x68eefc(0x21e)]('\x0a');}process['stderr'][_0x68eefc(0x21e)]('\x20\x20'+_0x4e3346+'\x0a\x0a');}function _0x3ceab3(_0x2cb12d,_0x396c32){const _0x135565=_0x87d22a,_0x5262ea=_0x2cb12d[_0x135565(0x256)][_0x135565(0x2d1)](_0x396c32);return new Promise((_0x3f96fe,_0x4fac6)=>{const _0x5b21e1=_0x135565;_0x5262ea['once'](_0x5b21e1(0x19d),_0x3f96fe),_0x5262ea[_0x5b21e1(0x108)](_0x5b21e1(0x28b),_0x4fac6);});}async function _0x169ce5(_0x52afd4){const _0x1f9183=_0x87d22a,_0x2be0fe=require$$3;console[_0x1f9183(0xcc)]('\x0a\x20\x20okdb\x20doctor\x0a');let _0x2f3f1b=!![];const _0x4c5f23=(_0x35bdfd,_0x293bac)=>{const _0x1675f5=_0x1f9183;console[_0x1675f5(0xcc)]('\x20\x20'+(_0x35bdfd?'✓':'✗')+'\x20'+_0x293bac);if(!_0x35bdfd)_0x2f3f1b=![];},_0x1d83e2=Number(process[_0x1f9183(0x340)]['replace']('v','')[_0x1f9183(0x242)]('.')[0x0]);_0x4c5f23(_0x1d83e2>=0x12,_0x1f9183(0xb6)+process['version']+(_0x1d83e2<0x12?_0x1f9183(0x33c):''));const _0x4b7d79=_0x25cc68[_0x1f9183(0x32d)](_0x52afd4[_0x1f9183(0x2e2)]);try{_0x190973[_0x1f9183(0x257)](_0x4b7d79,{'recursive':!![]});const _0x5cca27=_0x25cc68[_0x1f9183(0x347)](_0x4b7d79,'.okdb-write-test');_0x190973[_0x1f9183(0x154)](_0x5cca27,''),_0x190973[_0x1f9183(0xae)](_0x5cca27),_0x4c5f23(!![],_0x1f9183(0xd5)+_0x4b7d79);}catch(_0x33e912){_0x4c5f23(![],'database\x20path\x20not\x20writable:\x20'+_0x4b7d79+_0x1f9183(0x37e)+_0x33e912['message']+')');}const _0x5cdf66=await new Promise(_0x395558=>{const _0x468e4f=_0x1f9183,_0x23b4fc=_0x2be0fe[_0x468e4f(0x113)]();_0x23b4fc[_0x468e4f(0x108)](_0x468e4f(0x28b),()=>_0x395558(![])),_0x23b4fc[_0x468e4f(0x108)]('listening',()=>{const _0x3246d3=_0x468e4f;_0x23b4fc[_0x3246d3(0x1e2)](),_0x395558(!![]);}),_0x23b4fc['listen'](_0x52afd4[_0x468e4f(0x239)],_0x468e4f(0x2ae));});_0x4c5f23(_0x5cdf66,'port\x20'+_0x52afd4[_0x1f9183(0x239)]+'\x20'+(_0x5cdf66?_0x1f9183(0x94):'already\x20in\x20use'));const _0x1834a5=_0x25cc68['resolve'](_0x1f9183(0x369));if(_0x190973[_0x1f9183(0x1d6)](_0x1834a5))try{JSON[_0x1f9183(0x211)](_0x190973[_0x1f9183(0x37a)](_0x1834a5,_0x1f9183(0x1cf))['replace'](/^\uFEFF/,'')),_0x4c5f23(!![],'config\x20file\x20valid:\x20'+_0x1834a5);}catch(_0x10c2ff){_0x4c5f23(![],_0x1f9183(0x2eb)+_0x10c2ff[_0x1f9183(0x394)]);}else _0x4c5f23(!![],_0x1f9183(0x23b));console[_0x1f9183(0xcc)](''),_0x2f3f1b?console['log'](_0x1f9183(0x1c2)):(console[_0x1f9183(0xcc)](_0x1f9183(0x20a)),process['exit'](0x1));}async function _0x34ea33(){const _0x583e23=_0x87d22a,_0x6012ac=_0x25cc68[_0x583e23(0x32d)](_0x583e23(0x369));!_0x190973[_0x583e23(0x1d6)](_0x6012ac)?(_0x190973[_0x583e23(0x154)](_0x6012ac,JSON['stringify']({'port':0x2124,'path':_0x583e23(0x2b7),'logLevel':_0x583e23(0x21a),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x583e23(0xcc)](_0x583e23(0x32c))):console[_0x583e23(0xcc)](_0x583e23(0x33f));const _0x1b64ee=_0x25cc68[_0x583e23(0x32d)](_0x583e23(0x2b7));!_0x190973[_0x583e23(0x1d6)](_0x1b64ee)?(_0x190973[_0x583e23(0x257)](_0x1b64ee,{'recursive':!![]}),console['log'](_0x583e23(0x317))):console[_0x583e23(0xcc)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x583e23(0xcc)](_0x583e23(0x1cc));}async function _0x595bcc(_0x44cbb4){const _0x33ba34=_0x87d22a,_0x491904=_0x25cc68[_0x33ba34(0x32d)](_0x44cbb4['dbPath']);if(!_0x190973[_0x33ba34(0x1d6)](_0x491904)){console['log'](_0x33ba34(0x1dc)+_0x491904+_0x33ba34(0x2f3));return;}const _0x112446=require$$0$2,_0x2f9b07=_0x112446[_0x33ba34(0x1ca)]({'input':process[_0x33ba34(0x388)],'output':process['stdout']}),_0xd08048=await new Promise(_0x1c0d73=>_0x2f9b07[_0x33ba34(0x359)](_0x33ba34(0x1e7)+_0x491904+'?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0x1c0d73));_0x2f9b07[_0x33ba34(0x1e2)](),console[_0x33ba34(0xcc)]('');if(_0xd08048[_0x33ba34(0x213)]()['toLowerCase']()!==_0x33ba34(0x16b)){console['log'](_0x33ba34(0x289));return;}_0x190973[_0x33ba34(0x393)](_0x491904,{'recursive':!![],'force':!![]}),console['log'](_0x33ba34(0x2db)+_0x491904+_0x33ba34(0x86));}async function _0x70d6ee(_0x5bcf55,_0x1eefc2){const _0x871854=_0x87d22a,_0x59a880=require$$5,_0x5be172=_0x25cc68[_0x871854(0x32d)](_0x1eefc2['dbPath']);console['log'](_0x871854(0xcd)+_0x5be172+'…');const _0x42beb0=new _0x59a880(_0x5be172,_0x1eefc2[_0x871854(0x168)]?{'encryptionKey':_0x1eefc2[_0x871854(0x168)]}:{});await _0x42beb0[_0x871854(0x224)](),console['log'](_0x871854(0x184)+_0x5bcf55+'…');const {envs:_0x40ad71}=await _0x42beb0[_0x871854(0x1ef)][_0x871854(0x3aa)](_0x5bcf55);for(const _0xe25d45 of _0x40ad71){const _0x2f9911=_0xe25d45[_0x871854(0x328)]>0x0?_0x871854(0x37e)+(_0xe25d45['sizeBefore']/0x400/0x400)[_0x871854(0x34a)](0x2)+_0x871854(0x23e)+(_0xe25d45[_0x871854(0x37b)]/0x400/0x400)[_0x871854(0x34a)](0x2)+_0x871854(0x2b2):'';console[_0x871854(0xcc)](_0x871854(0x116)+_0xe25d45['name']+_0x871854(0x355)+_0xe25d45[_0x871854(0x390)]+_0x2f9911);}await _0x42beb0['close'](),console[_0x871854(0xcc)]('[okdb]\x20backup\x20complete');}async function _0x576a4a(_0x3bbbec,_0x131167,_0x43a51f){const _0x2730a3=_0x87d22a,_0x3df5d8=require$$5,_0x975551=_0x25cc68[_0x2730a3(0x32d)](_0x131167[_0x2730a3(0x2e2)]),_0x593382=_0x43a51f[_0x2730a3(0x308)]??_0x2730a3(0x354),_0xe8ae89=_0x43a51f['types']?_0x43a51f[_0x2730a3(0x2d3)]['split'](',')['map'](_0x147078=>_0x147078[_0x2730a3(0x213)]()):null;console['log']('[okdb]\x20opening\x20'+_0x975551+'…');const _0x49ccbf=new _0x3df5d8(_0x975551,_0x131167['key']?{'encryptionKey':_0x131167[_0x2730a3(0x168)]}:{});await _0x49ccbf[_0x2730a3(0x224)](),console[_0x2730a3(0xcc)](_0x2730a3(0x281)+_0x593382+_0x2730a3(0x18a)+_0x3bbbec+'…');const _0x4b3248=await _0x49ccbf['migrate'][_0x2730a3(0x305)](_0x3bbbec,{'envName':_0x593382,'types':_0xe8ae89,'includeChanges':!!_0x43a51f[_0x2730a3(0x27c)]});console[_0x2730a3(0xcc)](_0x2730a3(0x25c)+_0x4b3248['types']+'\x20\x20records='+_0x4b3248[_0x2730a3(0x241)]+_0x2730a3(0xbe)+_0x4b3248[_0x2730a3(0x27c)]);if(_0x43a51f['blobs']){const _0x3a807d=_0x25cc68[_0x2730a3(0x347)](_0x25cc68[_0x2730a3(0xf2)](_0x3bbbec),_0x2730a3(0x2c6));process[_0x2730a3(0x2c0)][_0x2730a3(0x21e)](_0x2730a3(0x1bd));const {count:_0x43864d,bytes:_0x599e41}=await _0x49ccbf[_0x2730a3(0x1ef)][_0x2730a3(0x36f)](_0x3a807d);console[_0x2730a3(0xcc)]('\x0d[okdb]\x20blobs:\x20'+_0x3a807d+_0x2730a3(0x37e)+_0x43864d+_0x2730a3(0x1b1)+(_0x43864d!==0x1?'s':'')+',\x20'+(_0x599e41/0x400/0x400)[_0x2730a3(0x34a)](0x2)+_0x2730a3(0x2b2));}await _0x49ccbf[_0x2730a3(0x1e2)](),console[_0x2730a3(0xcc)](_0x2730a3(0xcb));}async function _0x59ec3f(_0x4fc501,_0x51322b,_0x4aed60){const _0x4aae0d=_0x87d22a,_0x6e12c3=require$$5,_0x5a5c14=_0x25cc68[_0x4aae0d(0x32d)](_0x51322b['dbPath']),_0x456daa=_0x4aed60['env']??null,_0x2963b2=_0x4aed60[_0x4aae0d(0x2d3)]?_0x4aed60['types']['split'](',')[_0x4aae0d(0x296)](_0x4a6e26=>_0x4a6e26[_0x4aae0d(0x213)]()):null,_0x161b47=!!_0x4aed60[_0x4aae0d(0x1bc)];console[_0x4aae0d(0xcc)](_0x4aae0d(0xcd)+_0x5a5c14+'…');const _0x593703=new _0x6e12c3(_0x5a5c14,_0x51322b['key']?{'encryptionKey':_0x51322b[_0x4aae0d(0x168)]}:{});await _0x593703['open'](),console[_0x4aae0d(0xcc)](_0x4aae0d(0xfe)+_0x4fc501+'…');const _0x39b15d=await _0x593703[_0x4aae0d(0x1ef)][_0x4aae0d(0x176)](_0x4fc501,{'envName':_0x456daa,'types':_0x2963b2,'dropExisting':_0x161b47,'includeChanges':!!_0x4aed60[_0x4aae0d(0x27c)],'onProgress':({type:_0x1f82ee,count:_0x46780a})=>{const _0x3d4c4e=_0x4aae0d;process[_0x3d4c4e(0x2c0)]['write'](_0x3d4c4e(0x2ce)+_0x1f82ee+':\x20'+_0x46780a+'\x20records…');}});process[_0x4aae0d(0x2c0)][_0x4aae0d(0x21e)]('\x0a'),console['log'](_0x4aae0d(0x250)+_0x39b15d[_0x4aae0d(0x2d3)]+'\x20\x20records='+_0x39b15d[_0x4aae0d(0x241)]+_0x4aae0d(0xbe)+_0x39b15d[_0x4aae0d(0x27c)]);if(_0x4aed60[_0x4aae0d(0x2c6)]){const _0xead4f7=_0x25cc68[_0x4aae0d(0x347)](_0x25cc68[_0x4aae0d(0xf2)](_0x4fc501),_0x4aae0d(0x2c6));if(_0x190973[_0x4aae0d(0x1d6)](_0xead4f7)){const {imported:_0x4bfdbd,skipped:_0x39f2ad}=await _0x593703[_0x4aae0d(0x1ef)][_0x4aae0d(0x18f)](_0xead4f7);console[_0x4aae0d(0xcc)](_0x4aae0d(0xc6)+_0x4bfdbd+_0x4aae0d(0x180)+_0x39f2ad);}}await _0x593703[_0x4aae0d(0x1e2)](),console['log'](_0x4aae0d(0x2e8));}async function _0x40d5c4(_0x583571,_0x3c6171){const _0x39711e=_0x87d22a;_0x3c6171['password']&&!_0x3c6171[_0x39711e(0x383)]&&(console[_0x39711e(0x28b)](_0x39711e(0xea)),process[_0x39711e(0x2be)](0x1));const _0x5ee9a1=_0x3c6171[_0x39711e(0x320)]?_0x3c6171['permissions'][_0x39711e(0x242)](',')[_0x39711e(0x296)](_0x19812d=>_0x19812d[_0x39711e(0x213)]())[_0x39711e(0x33e)](Boolean):[];let _0x3cb893={};if(_0x3c6171[_0x39711e(0x1f8)])try{_0x3cb893=JSON[_0x39711e(0x211)](_0x3c6171[_0x39711e(0x1f8)]);if(typeof _0x3cb893!=='object'||Array['isArray'](_0x3cb893)||_0x3cb893===null)throw new Error();}catch{console['error'](_0x39711e(0xa5)),process['exit'](0x1);}const _0x440506=require$$5,{randomToken:_0x4a32da,hashToken:_0x213489,hashPassword:_0x2841f7}=requireOkdbAuthTokens(),_0x408940=require$$0,_0x309c3d=_0x25cc68[_0x39711e(0x32d)](_0x583571[_0x39711e(0x2e2)]),_0x3f3abd=new _0x440506(_0x309c3d,_0x583571[_0x39711e(0x168)]?{'encryptionKey':_0x583571[_0x39711e(0x168)]}:{});await _0x3f3abd[_0x39711e(0x224)]();try{await _0x3f3abd[_0x39711e(0x2a7)][_0x39711e(0x397)]();if(_0x3c6171[_0x39711e(0x383)]){const _0x3c43e2=await _0x3f3abd['auth'][_0x39711e(0x96)](_0x3c6171[_0x39711e(0x383)]);_0x3c43e2&&(console[_0x39711e(0x28b)](_0x39711e(0x2b8)+_0x3c6171['name']+_0x39711e(0x106)),process[_0x39711e(0x2be)](0x1));}const _0x5d0b31=_0x4a32da(0x20),_0x1cd6df=_0x213489(_0x5d0b31),_0x584d36=_0x3c6171[_0x39711e(0x181)]?await _0x2841f7(_0x3c6171['password']):null,_0x46b000=_0x408940['randomUUID'](),_0x403e59={'tokenHash':_0x1cd6df,'name':_0x3c6171[_0x39711e(0x383)]||null,'passwordHash':_0x584d36,'label':_0x3c6171['label']||null,'permissions':_0x5ee9a1,'grants':_0x3cb893,'createdAt':Date[_0x39711e(0x3a5)](),'lastUsedAt':null},_0x31e46f=_0x3c6171['ttl']?{'ttl':Number(_0x3c6171[_0x39711e(0xd9)])}:undefined;await _0x3f3abd[_0x39711e(0x249)][_0x39711e(0x233)](_0x39711e(0xf5),_0x46b000,_0x403e59,_0x31e46f),console[_0x39711e(0xcc)](_0x39711e(0x228)),console[_0x39711e(0xcc)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x46b000),console[_0x39711e(0xcc)](_0x39711e(0x195)+(_0x3c6171['name']||_0x39711e(0x349))),console[_0x39711e(0xcc)](_0x39711e(0x32a)+(_0x3c6171['label']||_0x39711e(0x349))),console['log'](_0x39711e(0x21d)+(_0x5ee9a1['join'](',\x20')||_0x39711e(0x333))),console[_0x39711e(0xcc)](_0x39711e(0x183)),console['log'](_0x39711e(0x2a1)+_0x5d0b31+'\x0a');}finally{await _0x3f3abd[_0x39711e(0x1e2)]();}}async function _0x20ae04(_0x850179){const _0x41037f=_0x87d22a,_0x37239f=require$$5,_0x35e642=_0x25cc68[_0x41037f(0x32d)](_0x850179[_0x41037f(0x2e2)]),_0x1f44a3=new _0x37239f(_0x35e642,_0x850179[_0x41037f(0x168)]?{'encryptionKey':_0x850179[_0x41037f(0x168)]}:{});await _0x1f44a3[_0x41037f(0x224)]();try{const _0x21b113=_0x1f44a3[_0x41037f(0x249)];if(!_0x21b113||!_0x21b113[_0x41037f(0x8c)](_0x41037f(0xf5))){console[_0x41037f(0xcc)]('No\x20tokens.');return;}const _0x23c971=[];for(const {key:_0x507e6d,value:_0x1addc1}of _0x21b113[_0x41037f(0x2c8)](_0x41037f(0xf5))){_0x23c971['push']({'id':_0x507e6d,'name':_0x1addc1['name']||_0x41037f(0x349),'label':_0x1addc1[_0x41037f(0xaa)]||'(unset)','permissions':Array[_0x41037f(0x214)](_0x1addc1[_0x41037f(0x320)])?_0x1addc1[_0x41037f(0x320)][_0x41037f(0x347)](','):'','created':_0x1addc1[_0x41037f(0x132)]?new Date(_0x1addc1['createdAt'])[_0x41037f(0x1aa)]()['slice'](0x0,0xa):''});}if(_0x23c971[_0x41037f(0x252)]===0x0){console[_0x41037f(0xcc)](_0x41037f(0x378));return;}const _0x4efd6f=!process[_0x41037f(0x2c0)][_0x41037f(0x2cc)]||process[_0x41037f(0x2c0)]['columns']>=0x64,_0x86e6b9=_0x4efd6f?0x24:0xa,_0x51878c=['ID'[_0x41037f(0x2b3)](_0x86e6b9),_0x41037f(0x271)[_0x41037f(0x2b3)](0x10),'LABEL'['padEnd'](0x14),_0x41037f(0x301)['padEnd'](0x14),_0x41037f(0x2b1)][_0x41037f(0x347)]('\x20\x20');console[_0x41037f(0xcc)]('\x0a'+_0x51878c),console[_0x41037f(0xcc)]('-'['repeat'](_0x51878c[_0x41037f(0x252)]));for(const _0x1609ad of _0x23c971){const _0x4f86eb=_0x4efd6f?_0x1609ad['id']:_0x1609ad['id'][_0x41037f(0x19b)](0x0,0x8)+'…';console[_0x41037f(0xcc)]([_0x4f86eb[_0x41037f(0x2b3)](_0x86e6b9),_0x1609ad['name'][_0x41037f(0x19b)](0x0,0x10)['padEnd'](0x10),_0x1609ad[_0x41037f(0xaa)][_0x41037f(0x19b)](0x0,0x14)[_0x41037f(0x2b3)](0x14),_0x1609ad[_0x41037f(0x320)][_0x41037f(0x19b)](0x0,0x14)[_0x41037f(0x2b3)](0x14),_0x1609ad[_0x41037f(0x19a)]][_0x41037f(0x347)]('\x20\x20'));}console[_0x41037f(0xcc)]('');}finally{await _0x1f44a3[_0x41037f(0x1e2)]();}}async function _0x27a7a1(_0x4e3f40,_0xefa594){const _0x8a6c54=_0x87d22a;!_0x4e3f40&&(console[_0x8a6c54(0x28b)](_0x8a6c54(0x279)),process[_0x8a6c54(0x2be)](0x1));const _0x4a5990=require$$5,_0x3e4c1f=_0x25cc68['resolve'](_0xefa594[_0x8a6c54(0x2e2)]),_0x4219c7=new _0x4a5990(_0x3e4c1f,_0xefa594[_0x8a6c54(0x168)]?{'encryptionKey':_0xefa594['key']}:{});await _0x4219c7[_0x8a6c54(0x224)]();try{const _0x2e1a45=_0x4219c7[_0x8a6c54(0x249)];(!_0x2e1a45||!_0x2e1a45[_0x8a6c54(0x8c)](_0x8a6c54(0xf5)))&&(console[_0x8a6c54(0x28b)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x4e3f40+'\x22'),process[_0x8a6c54(0x2be)](0x1));let _0x49db8=null,_0x522423=null;const _0xf676a=_0x2e1a45[_0x8a6c54(0xfc)](_0x8a6c54(0xf5),_0x4e3f40);if(_0xf676a)_0x49db8=_0x4e3f40,_0x522423=_0xf676a;else{const _0x5af16a=[];for(const {key:_0x4bf06a,value:_0x672d22}of _0x2e1a45[_0x8a6c54(0x2c8)](_0x8a6c54(0xf5))){if(_0x4bf06a[_0x8a6c54(0x84)](_0x4e3f40))_0x5af16a[_0x8a6c54(0x34f)]({'key':_0x4bf06a,'value':_0x672d22});}_0x5af16a[_0x8a6c54(0x252)]===0x0&&(console[_0x8a6c54(0x28b)](_0x8a6c54(0x36b)+_0x4e3f40+'\x22'),process[_0x8a6c54(0x2be)](0x1));if(_0x5af16a[_0x8a6c54(0x252)]>0x1){console[_0x8a6c54(0x28b)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x4e3f40+_0x8a6c54(0x218)+_0x5af16a[_0x8a6c54(0x252)]+'\x20tokens:');for(const _0x32ed91 of _0x5af16a){console['error']('\x20\x20'+_0x32ed91[_0x8a6c54(0x168)]+_0x8a6c54(0x148)+(_0x32ed91[_0x8a6c54(0xdd)][_0x8a6c54(0x383)]||_0x8a6c54(0x349))+')');}process[_0x8a6c54(0x2be)](0x1);}_0x49db8=_0x5af16a[0x0]['key'],_0x522423=_0x5af16a[0x0]['value'];}await _0x2e1a45[_0x8a6c54(0x26b)](_0x8a6c54(0xf5),_0x49db8),console[_0x8a6c54(0xcc)](_0x8a6c54(0x134)+_0x49db8+'\x20\x20(name:\x20'+(_0x522423[_0x8a6c54(0x383)]||_0x8a6c54(0x349))+_0x8a6c54(0x150)+(_0x522423[_0x8a6c54(0xaa)]||_0x8a6c54(0x349))+')');}finally{await _0x4219c7['close']();}}function _0x584962(_0x372150,_0x1cc762){const _0x51a77d=_0x87d22a;if(!_0x372150['activation'])return'pending';const _0x3f1fb9=_0x372150['expiresAt'];if(!_0x3f1fb9)return _0x51a77d(0x2ed);if(_0x1cc762>_0x3f1fb9)return _0x51a77d(0x38d);return _0x51a77d(0x2ed);}function _0x3a74a5(_0x3a2b46){const _0x424920=_0x87d22a;if(!_0x3a2b46||typeof _0x3a2b46!=='object')return'';const _0x4c1895=Object[_0x424920(0x2d2)](_0x3a2b46)[_0x424920(0x33e)](([,_0xc4c74d])=>_0xc4c74d)[_0x424920(0x296)](([_0x51bba6])=>_0x51bba6);if(_0x4c1895[_0x424920(0x252)]===0x0)return'(none)';if(_0x4c1895[_0x424920(0x252)]<=0x3)return _0x4c1895[_0x424920(0x347)]('\x20');return _0x4c1895[_0x424920(0x19b)](0x0,0x3)[_0x424920(0x347)]('\x20')+('\x20+'+(_0x4c1895[_0x424920(0x252)]-0x3));}async function _0x53751e(_0x1b589c){const _0x2a450e=_0x87d22a,_0x64ce02=require$$5,_0x1e9ca6=requireOkdbLicenseCodec(),{_C:_0x589e0e}=requireOkdbLicense(),_0x59d08f=_0x25cc68[_0x2a450e(0x32d)](_0x1b589c['dbPath']),_0x3eea83=new _0x64ce02(_0x59d08f,_0x1b589c[_0x2a450e(0x168)]?{'encryptionKey':_0x1b589c[_0x2a450e(0x168)]}:{});await _0x3eea83[_0x2a450e(0x224)]();try{const _0x54cfde=_0x3eea83[_0x2a450e(0x249)],_0x2016da=_0x54cfde?.['db']?.['get']?.(_0x2a450e(0x18d))??0x0,_0x24b9e4=[..._0x3eea83[_0x2a450e(0x307)][_0x2a450e(0x140)]()][_0x2a450e(0x33e)](_0x298c24=>!_0x298c24[_0x2a450e(0x84)]('~'))['length'],_0x9f6ec3=_0x3eea83[_0x2a450e(0x352)]?.['effective'];if(_0x9f6ec3){const _0x105e6c=_0x9f6ec3[_0x2a450e(0x35f)]===!![],_0x139f3b=_0x105e6c?'free\x20tier':_0x3eea83[_0x2a450e(0x352)]['active']?.[_0x2a450e(0x21b)]||_0x2a450e(0x20c);console[_0x2a450e(0xcc)](''),console[_0x2a450e(0xcc)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x139f3b);const _0x21ed84=_0x9f6ec3[_0x2a450e(0x2bd)]||{};if(_0x21ed84['maxWrites']){const _0x4fd871=Math[_0x2a450e(0xf3)](_0x2016da/_0x21ed84[_0x2a450e(0xa4)]*0x64);console[_0x2a450e(0xcc)]('\x20\x20Writes:\x20\x20'+_0x2016da['toLocaleString']()+_0x2a450e(0x1fe)+_0x21ed84[_0x2a450e(0xa4)]['toLocaleString']()+'\x20\x20('+_0x4fd871+'%)');}else console[_0x2a450e(0xcc)]('\x20\x20Writes:\x20\x20'+_0x2016da['toLocaleString']());_0x21ed84[_0x2a450e(0xf4)]?console[_0x2a450e(0xcc)](_0x2a450e(0x215)+_0x24b9e4+_0x2a450e(0x1fe)+_0x21ed84[_0x2a450e(0xf4)]):console[_0x2a450e(0xcc)](_0x2a450e(0x215)+_0x24b9e4),_0x589e0e?.[_0x2a450e(0xbf)]&&console['log'](_0x2a450e(0x1ad)+_0x589e0e['PUB_FINGERPRINT']+_0x2a450e(0xda));}if(!_0x54cfde||!_0x54cfde[_0x2a450e(0x8c)](_0x2a450e(0x272))){console[_0x2a450e(0xcc)](''),console['log'](_0x2a450e(0x2ec)),console[_0x2a450e(0xcc)]('');return;}const _0x356143=[],_0x7800dd=Date[_0x2a450e(0x3a5)](),_0x2dac10=_0x3eea83['id'],_0x1f4a52='__OKDB_PUB_FINGERPRINT__';for(const {key:_0x290dda,value:_0x2faa9e}of _0x54cfde['getRange']('~licenses')){const _0x4ce72c=_0x2faa9e[_0x2a450e(0x1a8)]?Buffer['from'](_0x2faa9e['_licenseHash'],_0x2a450e(0xa8)):Buffer[_0x2a450e(0x2e6)](0x8);let _0x3ac50e='';try{_0x3ac50e=_0x1e9ca6[_0x2a450e(0x92)](_0x2dac10,_0x4ce72c,_0x1f4a52)['pin'];}catch{}_0x356143['push']({'id':_0x290dda,'licensee':_0x2faa9e[_0x2a450e(0x21b)]||'','expires':_0x2faa9e['expiresAt']?new Date(_0x2faa9e[_0x2a450e(0x9b)])[_0x2a450e(0x1aa)]()[_0x2a450e(0x19b)](0x0,0xa):'','features':_0x3a74a5(_0x2faa9e[_0x2a450e(0x1fc)]),'pin':_0x3ac50e,'status':_0x584962(_0x2faa9e,_0x7800dd)});}if(_0x356143[_0x2a450e(0x252)]===0x0){console['log'](''),console['log'](_0x2a450e(0x2ec)),console[_0x2a450e(0xcc)]('');return;}const _0x3c0195=['\x20\x20'+'ID'['padEnd'](0xe),'LICENSEE'[_0x2a450e(0x2b3)](0xe),_0x2a450e(0x1d2)[_0x2a450e(0x2b3)](0xc),_0x2a450e(0x2dd)[_0x2a450e(0x2b3)](0x1e),_0x2a450e(0x197)[_0x2a450e(0x2b3)](0xa),_0x2a450e(0x1fa)][_0x2a450e(0x347)]('\x20');console[_0x2a450e(0xcc)]('\x0a'+_0x3c0195);for(const _0x2a141f of _0x356143){const _0x30a74a=_0x2a141f['id'][_0x2a450e(0x19b)](0x0,0x8)+'…';console['log'](['\x20\x20'+_0x30a74a[_0x2a450e(0x2b3)](0xe),_0x2a141f[_0x2a450e(0x21b)]['slice'](0x0,0xe)[_0x2a450e(0x2b3)](0xe),_0x2a141f[_0x2a450e(0x335)][_0x2a450e(0x2b3)](0xc),_0x2a141f[_0x2a450e(0x1fc)]['slice'](0x0,0x1e)[_0x2a450e(0x2b3)](0x1e),_0x2a141f[_0x2a450e(0x35c)][_0x2a450e(0x2b3)](0xa),_0x2a141f[_0x2a450e(0x240)]]['join']('\x20'));}console[_0x2a450e(0xcc)]('');}finally{await _0x3eea83[_0x2a450e(0x1e2)]();}}async function _0x4eb215(_0xb9ffb,_0x5bfcf1){const _0x5b1340=_0x87d22a,_0x4a2b2c=require$$5,_0x3d2f24=requireOkdbLicenseCodec();let _0x454b5d=_0xb9ffb;(_0x3d2f24['detectInputType'](_0xb9ffb)===_0x5b1340(0x36a)||_0x190973[_0x5b1340(0x1d6)](_0xb9ffb)&&_0x190973['statSync'](_0xb9ffb)[_0x5b1340(0x25e)]())&&(_0x454b5d=_0x190973[_0x5b1340(0x37a)](_0xb9ffb,_0x5b1340(0x1cf))[_0x5b1340(0x213)]());const _0x4cc53e=_0x25cc68[_0x5b1340(0x32d)](_0x5bfcf1[_0x5b1340(0x2e2)]),_0x5a56ed=new _0x4a2b2c(_0x4cc53e,_0x5bfcf1['key']?{'encryptionKey':_0x5bfcf1[_0x5b1340(0x168)]}:{});await _0x5a56ed[_0x5b1340(0x224)]();try{!_0x5a56ed[_0x5b1340(0x352)]&&(console[_0x5b1340(0x28b)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x5b1340(0x2be)](0x1));let _0x1adcc2;try{_0x1adcc2=await _0x5a56ed[_0x5b1340(0x352)][_0x5b1340(0x1df)](_0x454b5d);}catch(_0x2bd5c0){console[_0x5b1340(0x28b)](_0x5b1340(0x1d4)+_0x2bd5c0[_0x5b1340(0x394)]),process[_0x5b1340(0x2be)](0x1);}const _0x8d587d=_0x5a56ed['_license'][_0x5b1340(0x39d)](),_0x5a4f9e=_0x8d587d[_0x5b1340(0x30d)](_0x331b6d=>_0x331b6d[_0x5b1340(0x12b)]===_0x1adcc2['id'])?.[_0x5b1340(0x35c)]||'',_0x4c82e6=Object['entries'](_0x1adcc2[_0x5b1340(0x1fc)]||{})[_0x5b1340(0x33e)](([,_0x46ca0b])=>_0x46ca0b)['map'](([_0x537c28])=>_0x537c28),_0x9ccaa8=_0x1adcc2[_0x5b1340(0x2bd)]||{},_0x4dda40=[_0x9ccaa8[_0x5b1340(0xf4)]?_0x5b1340(0x395)+_0x9ccaa8['envs']:null,_0x9ccaa8['typesPerEnv']?'types/env='+_0x9ccaa8[_0x5b1340(0xf8)]:null,_0x9ccaa8[_0x5b1340(0x312)]?_0x5b1340(0x8b)+_0x9ccaa8['syncPeers']:null,_0x9ccaa8[_0x5b1340(0xa4)]?_0x5b1340(0x326)+_0x9ccaa8['maxWrites'][_0x5b1340(0xe3)]():null][_0x5b1340(0x33e)](Boolean)['join']('\x20\x20'),_0x15e194=_0x1adcc2[_0x5b1340(0x263)]===_0x3d2f24[_0x5b1340(0x30e)];console['log'](_0x5b1340(0x24f)),console['log'](_0x5b1340(0x90)+_0x1adcc2['id']),console['log'](_0x5b1340(0x38c)+_0x1adcc2[_0x5b1340(0x21b)]),console[_0x5b1340(0xcc)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x1adcc2[_0x5b1340(0x9b)])['toISOString']()[_0x5b1340(0x19b)](0x0,0xa)),console[_0x5b1340(0xcc)](_0x5b1340(0x205)+(_0x4c82e6['join'](',\x20')||_0x5b1340(0x333)));if(_0x4dda40)console[_0x5b1340(0xcc)](_0x5b1340(0x1ba)+_0x4dda40);_0x15e194?(console[_0x5b1340(0xcc)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console['log']('')):(console['log'](_0x5b1340(0x13c)+_0x5a4f9e),console[_0x5b1340(0xcc)]('\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation'),console['log'](''),console['log']('\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:'),console[_0x5b1340(0xcc)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x5a4f9e+_0x5b1340(0x247)),console['log'](_0x5b1340(0x135)),console[_0x5b1340(0xcc)]('\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>'),console[_0x5b1340(0xcc)](''));}finally{await _0x5a56ed[_0x5b1340(0x1e2)]();}}async function _0x484ddc(_0x2cca35,_0x57be56){const _0x6f50=_0x87d22a,_0x48def9=require$$5,_0x320762=_0x25cc68[_0x6f50(0x32d)](_0x57be56['dbPath']),_0x9dfaed=new _0x48def9(_0x320762,_0x57be56['key']?{'encryptionKey':_0x57be56['key']}:{});await _0x9dfaed[_0x6f50(0x224)]();try{!_0x9dfaed[_0x6f50(0x352)]&&(console[_0x6f50(0x28b)](_0x6f50(0x1a1)),process[_0x6f50(0x2be)](0x1));let _0x167532;try{_0x167532=await _0x9dfaed[_0x6f50(0x352)][_0x6f50(0x204)](_0x2cca35[_0x6f50(0x213)]());}catch(_0x41522a){console['error']('[okdb]\x20error:\x20'+_0x41522a['message']),console[_0x6f50(0x28b)](''),console['error'](_0x6f50(0xc2)),console[_0x6f50(0x28b)](_0x6f50(0x26f)),console['error'](_0x6f50(0x190)),console[_0x6f50(0x28b)](_0x6f50(0x85)),console[_0x6f50(0x28b)](''),process[_0x6f50(0x2be)](0x1);}console[_0x6f50(0xcc)]('\x0a\x20\x20✓\x20License\x20activated'),console['log'](_0x6f50(0x90)+_0x167532['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0x167532[_0x6f50(0x21b)]),console['log'](_0x6f50(0x20b)+new Date(_0x167532[_0x6f50(0x9b)])[_0x6f50(0x1aa)]()[_0x6f50(0x19b)](0x0,0xa)),console[_0x6f50(0xcc)](_0x6f50(0x223)),console[_0x6f50(0xcc)]('');}finally{await _0x9dfaed['close']();}}async function _0x5c9661(_0x1b58e5,_0x381969){const _0x5e4fd4=_0x87d22a;!_0x1b58e5&&(console['error'](_0x5e4fd4(0x208)),process[_0x5e4fd4(0x2be)](0x1));const _0x8794c8=require$$5,_0x3eba2e=requireOkdbLicenseCodec(),_0x579cef=_0x25cc68[_0x5e4fd4(0x32d)](_0x381969['dbPath']),_0xe626af=new _0x8794c8(_0x579cef,_0x381969[_0x5e4fd4(0x168)]?{'encryptionKey':_0x381969[_0x5e4fd4(0x168)]}:{});await _0xe626af['open']();try{const _0xfc392a=_0xe626af[_0x5e4fd4(0x249)];(!_0xfc392a||!_0xfc392a[_0x5e4fd4(0x8c)](_0x5e4fd4(0x272)))&&(console[_0x5e4fd4(0x28b)](_0x5e4fd4(0x298)+_0x1b58e5+'\x22'),process[_0x5e4fd4(0x2be)](0x1));let _0x5dc744=null,_0x16cc0c=null;const _0x1bf21a=_0xfc392a['get'](_0x5e4fd4(0x272),_0x1b58e5);if(_0x1bf21a)_0x5dc744=_0x1b58e5,_0x16cc0c=_0x1bf21a;else{const _0x2d4f20=[];for(const {key:_0x10b99b,value:_0x3135b2}of _0xfc392a['getRange'](_0x5e4fd4(0x272))){if(_0x10b99b[_0x5e4fd4(0x84)](_0x1b58e5))_0x2d4f20[_0x5e4fd4(0x34f)]({'key':_0x10b99b,'value':_0x3135b2});}_0x2d4f20[_0x5e4fd4(0x252)]===0x0&&(console[_0x5e4fd4(0x28b)](_0x5e4fd4(0x298)+_0x1b58e5+'\x22'),process[_0x5e4fd4(0x2be)](0x1)),_0x2d4f20['length']>0x1&&(console[_0x5e4fd4(0x28b)](_0x5e4fd4(0x29f)+_0x1b58e5+'\x22\x20matches\x20'+_0x2d4f20['length']+_0x5e4fd4(0x13a)),process[_0x5e4fd4(0x2be)](0x1)),_0x5dc744=_0x2d4f20[0x0][_0x5e4fd4(0x168)],_0x16cc0c=_0x2d4f20[0x0][_0x5e4fd4(0xdd)];}const _0x500db4=Date[_0x5e4fd4(0x3a5)](),_0x52530b=_0x584962(_0x16cc0c,_0x500db4),_0x343abe=_0xe626af['id'],_0x2c45d3=_0x5e4fd4(0x331);let _0x3ab663='';try{const _0x507162=Buffer[_0x5e4fd4(0x1e1)](_0x16cc0c[_0x5e4fd4(0x1a8)],_0x5e4fd4(0xa8));_0x3ab663=_0x3eba2e[_0x5e4fd4(0x92)](_0x343abe,_0x507162,_0x2c45d3)[_0x5e4fd4(0x35c)];}catch{}const _0x3bf4d6=_0x16cc0c['features']?Object['entries'](_0x16cc0c[_0x5e4fd4(0x1fc)])[_0x5e4fd4(0x33e)](([,_0x5f39b8])=>_0x5f39b8)[_0x5e4fd4(0x296)](([_0x3b921b])=>_0x3b921b):[],_0x561a5c=_0x16cc0c[_0x5e4fd4(0x2bd)]||{},_0x29208d=_0xfc392a?.['db']?.[_0x5e4fd4(0xfc)]?.('__writeCounter')??0x0,_0x269a0e=[..._0xe626af[_0x5e4fd4(0x307)][_0x5e4fd4(0x140)]()][_0x5e4fd4(0x33e)](_0x20bcea=>!_0x20bcea[_0x5e4fd4(0x84)]('~'))[_0x5e4fd4(0x252)];console[_0x5e4fd4(0xcc)](_0x5e4fd4(0x3a6)),console[_0x5e4fd4(0xcc)](_0x5e4fd4(0x90)+_0x5dc744),console['log'](_0x5e4fd4(0x38c)+(_0x16cc0c['licensee']||'')),console[_0x5e4fd4(0xcc)](_0x5e4fd4(0x20b)+(_0x16cc0c['expiresAt']?new Date(_0x16cc0c['expiresAt'])[_0x5e4fd4(0x1aa)]()['slice'](0x0,0xa):'')),console[_0x5e4fd4(0xcc)](_0x5e4fd4(0x205)+(_0x3bf4d6[_0x5e4fd4(0x347)](',\x20')||_0x5e4fd4(0x333))),console[_0x5e4fd4(0xcc)](_0x5e4fd4(0x13c)+_0x3ab663),console[_0x5e4fd4(0xcc)](_0x5e4fd4(0x12d)+_0x52530b),console[_0x5e4fd4(0xcc)](_0x5e4fd4(0x38a)+new Date(_0x16cc0c[_0x5e4fd4(0x2bc)])[_0x5e4fd4(0x1aa)]());if(_0x52530b==='active'){console[_0x5e4fd4(0xcc)](''),console['log'](_0x5e4fd4(0x234));if(_0x561a5c['maxWrites']){const _0x5b764a=Math[_0x5e4fd4(0xf3)](_0x29208d/_0x561a5c[_0x5e4fd4(0xa4)]*0x64);console[_0x5e4fd4(0xcc)](_0x5e4fd4(0x1d3)+_0x29208d[_0x5e4fd4(0xe3)]()+_0x5e4fd4(0x1fe)+_0x561a5c['maxWrites']['toLocaleString']()+_0x5e4fd4(0x37e)+_0x5b764a+'%)');}else console[_0x5e4fd4(0xcc)](_0x5e4fd4(0x1d3)+_0x29208d[_0x5e4fd4(0xe3)]()+'\x20\x20(unlimited)');_0x561a5c['envs']?console[_0x5e4fd4(0xcc)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x269a0e+_0x5e4fd4(0x1fe)+_0x561a5c['envs']):console[_0x5e4fd4(0xcc)](_0x5e4fd4(0x11a)+_0x269a0e+_0x5e4fd4(0x210));}console[_0x5e4fd4(0xcc)]('');}finally{await _0xe626af[_0x5e4fd4(0x1e2)]();}}async function _0x2f06aa(_0x549007,_0x4989c2){const _0xffe8e9=_0x87d22a;!_0x549007&&(console[_0xffe8e9(0x28b)](_0xffe8e9(0x274)),process[_0xffe8e9(0x2be)](0x1));const _0x1230f4=require$$5,_0x18358d=_0x25cc68[_0xffe8e9(0x32d)](_0x4989c2['dbPath']),_0x45cb83=new _0x1230f4(_0x18358d,_0x4989c2[_0xffe8e9(0x168)]?{'encryptionKey':_0x4989c2[_0xffe8e9(0x168)]}:{});await _0x45cb83[_0xffe8e9(0x224)]();try{const _0x1c1954=_0x45cb83[_0xffe8e9(0x249)];(!_0x1c1954||!_0x1c1954['hasType'](_0xffe8e9(0x272)))&&(console[_0xffe8e9(0x28b)](_0xffe8e9(0x298)+_0x549007+'\x22'),process[_0xffe8e9(0x2be)](0x1));let _0x42642b=null,_0x502e13=null;const _0x58dc6f=_0x1c1954[_0xffe8e9(0xfc)]('~licenses',_0x549007);if(_0x58dc6f)_0x42642b=_0x549007,_0x502e13=_0x58dc6f;else{const _0x285a84=[];for(const {key:_0x24d03b,value:_0x29055d}of _0x1c1954[_0xffe8e9(0x2c8)](_0xffe8e9(0x272))){if(_0x24d03b[_0xffe8e9(0x84)](_0x549007))_0x285a84[_0xffe8e9(0x34f)]({'key':_0x24d03b,'value':_0x29055d});}_0x285a84[_0xffe8e9(0x252)]===0x0&&(console['error'](_0xffe8e9(0x298)+_0x549007+'\x22'),process[_0xffe8e9(0x2be)](0x1)),_0x285a84[_0xffe8e9(0x252)]>0x1&&(console['error'](_0xffe8e9(0x29f)+_0x549007+'\x22\x20matches\x20'+_0x285a84[_0xffe8e9(0x252)]+_0xffe8e9(0x13a)),process[_0xffe8e9(0x2be)](0x1)),_0x42642b=_0x285a84[0x0][_0xffe8e9(0x168)],_0x502e13=_0x285a84[0x0][_0xffe8e9(0xdd)];}await _0x1c1954['remove']('~licenses',_0x42642b),console['log'](_0xffe8e9(0xbc)+_0x42642b+_0xffe8e9(0x3a9)+(_0x502e13[_0xffe8e9(0x21b)]||_0xffe8e9(0x349))+')');}finally{await _0x45cb83[_0xffe8e9(0x1e2)]();}}async function _0x43b2f1(_0x59d893,_0x2ea8bf,_0x45fa94){const _0x57032e=_0x87d22a;!_0x59d893&&(console[_0x57032e(0x28b)]('[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>'),process['exit'](0x1));!_0x45fa94[_0x57032e(0x172)]&&!(_0x45fa94[_0x57032e(0x2e3)]&&_0x45fa94[_0x57032e(0x181)])&&(console[_0x57032e(0x28b)](_0x57032e(0x15d)),process[_0x57032e(0x2be)](0x1));const _0x3b96af=_0x45fa94[_0x57032e(0x299)]||_0x2ea8bf[_0x57032e(0x26d)]?.[_0x57032e(0x251)];!_0x3b96af&&(console[_0x57032e(0x28b)](_0x57032e(0x1e0)+_0x57032e(0x1b6)+_0x57032e(0x266)),process['exit'](0x1));const _0x429b68=require$$5,_0x30ca90=new _0x429b68(_0x2ea8bf[_0x57032e(0x2e2)],{'sync':{'address':_0x3b96af,'auto_reconcile':![]}});await _0x30ca90[_0x57032e(0x224)]();try{const _0x33f8ea=_0x30ca90['_systemEnv'];if(_0x33f8ea&&_0x33f8ea[_0x57032e(0x8c)](_0x57032e(0xf5))){let _0x542810=![];for(const _0x32f93c of _0x33f8ea[_0x57032e(0x2c8)](_0x57032e(0xf5))){_0x542810=!![];break;}_0x542810&&console[_0x57032e(0xcc)](_0x57032e(0x2d7)+_0x57032e(0x103));}console[_0x57032e(0xcc)](_0x57032e(0xb1)+_0x59d893+'…'),await _0x30ca90[_0x57032e(0x26d)][_0x57032e(0x347)](_0x59d893[_0x57032e(0x141)](/\/+$/,''),{'token':_0x45fa94['token'],'username':_0x45fa94['username'],'password':_0x45fa94[_0x57032e(0x181)]}),console[_0x57032e(0xcc)](_0x57032e(0x2f9)),console[_0x57032e(0xcc)](_0x57032e(0x10e));}finally{await _0x30ca90[_0x57032e(0x1e2)]();}}async function _0x4663b9(){const _0x48d0aa=_0x87d22a,_0x1afb88=Date[_0x48d0aa(0x3a5)](),_0x2ffe84=_0x1b438f(process['argv']),_0x530e5d=_0x1c6f3d(_0x2ffe84),_0x21204d=_0x25cc68[_0x48d0aa(0x32d)](_0x530e5d[_0x48d0aa(0x2e2)]);!_0x530e5d[_0x48d0aa(0x200)]&&!process[_0x48d0aa(0x388)][_0x48d0aa(0x24c)]&&(_0x530e5d['noRepl']=!![]);const _0x1f7bf6=require$$5,{start:_0x561808,colorLog:_0x206b90}=requireOkdbShell(),_0xec2f98={..._0x530e5d[_0x48d0aa(0x168)]?{'encryptionKey':_0x530e5d[_0x48d0aa(0x168)]}:{},..._0x530e5d['noAdmin']?{'admin':![]}:_0x5c1149(_0x530e5d['admin'])?{'admin':_0x530e5d[_0x48d0aa(0x366)]}:{},..._0x5c1149(_0x530e5d[_0x48d0aa(0xeb)])?{'api':_0x530e5d[_0x48d0aa(0xeb)]}:{},..._0x5c1149(_0x530e5d[_0x48d0aa(0x2a7)])?{'auth':_0x530e5d['auth']}:{},..._0x5c1149(_0x530e5d[_0x48d0aa(0x381)])?{'mcp':_0x530e5d[_0x48d0aa(0x381)]}:{},..._0x530e5d[_0x48d0aa(0xd8)]!==![]?{'timeMachine':_0x530e5d['timeMachine']}:{}},_0x48d5e7=new _0x1f7bf6(_0x21204d,_0xec2f98);_0x48d5e7[_0x48d0aa(0xcc)]['detachConsole']?.();const _0x2dc850=_0x48d5e7[_0x48d0aa(0xcc)][_0x48d0aa(0x2c5)](_0x2c1de3=>_0x206b90(_0x2c1de3,_0x530e5d[_0x48d0aa(0x334)]));if(_0x530e5d[_0x48d0aa(0x200)])process[_0x48d0aa(0x2c0)][_0x48d0aa(0x21e)]('[okdb]\x20starting…\x0a');await _0x48d5e7[_0x48d0aa(0x224)]();if(_0x530e5d[_0x48d0aa(0x200)])process[_0x48d0aa(0x2c0)][_0x48d0aa(0x21e)](_0x48d0aa(0x2ff));try{await _0x3ceab3(_0x48d5e7,_0x530e5d[_0x48d0aa(0x239)]);}catch(_0x31f381){_0x31f381[_0x48d0aa(0x191)]===_0x48d0aa(0x1a2)&&(console[_0x48d0aa(0x28b)](_0x48d0aa(0x1d7)+_0x530e5d[_0x48d0aa(0x239)]+_0x48d0aa(0x2ba)),process[_0x48d0aa(0x2be)](0x1));throw _0x31f381;}if(_0x530e5d[_0x48d0aa(0x200)])process[_0x48d0aa(0x2c0)]['write']('\x20\x20✓\x20http\x20listening\x20on\x20:'+_0x530e5d[_0x48d0aa(0x239)]+'\x0a');if(!_0x530e5d[_0x48d0aa(0x200)])_0x48d5e7[_0x48d0aa(0xcc)][_0x48d0aa(0xce)]?.(),_0x2dc850?.(),_0x534ac9(_0x48d5e7['auth']?.['getSecurityNotices']?.()??[]),await _0x561808(_0x48d5e7,_0x530e5d);else{const _0x4d484c=_0x25cc68[_0x48d0aa(0x347)](_0x21204d,_0x48d0aa(0x125));try{_0x190973[_0x48d0aa(0x154)](_0x4d484c,String(process[_0x48d0aa(0x155)]));}catch{}const _0x3799a6=Date[_0x48d0aa(0x3a5)]()-_0x1afb88;console[_0x48d0aa(0xcc)](''),console['log'](_0x48d0aa(0x387)),console[_0x48d0aa(0xcc)]('\x20\x20\x20\x20port:\x20\x20'+_0x530e5d[_0x48d0aa(0x239)]),console[_0x48d0aa(0xcc)]('\x20\x20\x20\x20path:\x20\x20'+_0x21204d),console[_0x48d0aa(0xcc)](_0x48d0aa(0x3a4)+_0x48d5e7['id']);{const _0x32f072=_0x48d5e7[_0x48d0aa(0x249)]?.['db']?.[_0x48d0aa(0xfc)]?.('__writeCounter')??0x0,_0x1161e2=[..._0x48d5e7[_0x48d0aa(0x307)]['keys']()][_0x48d0aa(0x33e)](_0x423ad9=>!_0x423ad9['startsWith']('~'))[_0x48d0aa(0x252)];if(_0x48d5e7['_license']?.[_0x48d0aa(0x2ed)]?.[_0x48d0aa(0x263)]===0x1){const _0x2d886d=Math['ceil']((_0x48d5e7['_license'][_0x48d0aa(0x2ed)][_0x48d0aa(0x9b)]-Date[_0x48d0aa(0x3a5)]())/0x5265c00);console[_0x48d0aa(0xcc)](_0x48d0aa(0xba)+_0x48d5e7[_0x48d0aa(0x352)][_0x48d0aa(0x2ed)][_0x48d0aa(0x21b)]+_0x48d0aa(0x293)+_0x2d886d+_0x48d0aa(0xec));}else{if(_0x48d5e7[_0x48d0aa(0x352)]?.[_0x48d0aa(0x2ed)]){const _0x258138=_0x48d5e7[_0x48d0aa(0x352)][_0x48d0aa(0x2ed)];console[_0x48d0aa(0xcc)](_0x48d0aa(0x1f5)+_0x258138[_0x48d0aa(0x21b)]+_0x48d0aa(0x1de)+new Date(_0x258138['expiresAt'])['toISOString']()[_0x48d0aa(0x19b)](0x0,0xa)+')');const _0x6e467=_0x258138[_0x48d0aa(0x2bd)]||{};if(_0x6e467[_0x48d0aa(0xa4)]){const _0x392a72=Math[_0x48d0aa(0xf3)](_0x32f072/_0x6e467[_0x48d0aa(0xa4)]*0x64);console[_0x48d0aa(0xcc)](_0x48d0aa(0x7f)+_0x32f072[_0x48d0aa(0xe3)]()+_0x48d0aa(0x1fe)+_0x6e467[_0x48d0aa(0xa4)][_0x48d0aa(0xe3)]()+'\x20writes\x20('+_0x392a72+'%),\x20'+_0x1161e2+(_0x6e467[_0x48d0aa(0xf4)]?'/'+_0x6e467[_0x48d0aa(0xf4)]:'')+'\x20env'+(_0x1161e2===0x1?'':'s'));}}else{if(_0x48d5e7[_0x48d0aa(0x352)]){const _0x1a3ddf=_0x48d5e7['_license']['getPins'](),_0x313b88=_0x1a3ddf['length']?_0x1a3ddf[_0x48d0aa(0x296)](_0x1c90b5=>_0x1c90b5[_0x48d0aa(0x35c)])[_0x48d0aa(0x347)](',\x20'):_0x48d0aa(0x277),_0x46272f=_0x48d5e7[_0x48d0aa(0x352)][_0x48d0aa(0x3a1)],_0x1550e2=_0x46272f[_0x48d0aa(0x2bd)][_0x48d0aa(0xa4)]?Math[_0x48d0aa(0xf3)](_0x32f072/_0x46272f['limits'][_0x48d0aa(0xa4)]*0x64):0x0;console[_0x48d0aa(0xcc)](_0x48d0aa(0x1c5)),console[_0x48d0aa(0xcc)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x32f072[_0x48d0aa(0xe3)]()+_0x48d0aa(0x1fe)+_0x46272f[_0x48d0aa(0x2bd)]['maxWrites'][_0x48d0aa(0xe3)]()+_0x48d0aa(0x261)+_0x1550e2+_0x48d0aa(0x22a)+_0x1161e2+'\x20/\x20'+_0x46272f[_0x48d0aa(0x2bd)]['envs']+_0x48d0aa(0x2fb)),console['log'](_0x48d0aa(0x1da)+_0x313b88);}}}}console[_0x48d0aa(0xcc)](_0x48d0aa(0x286)+_0x530e5d[_0x48d0aa(0x239)]+'/api');!_0x530e5d[_0x48d0aa(0x34b)]&&console['log'](_0x48d0aa(0x21f)+_0x530e5d[_0x48d0aa(0x239)]+'/admin/index.html');console[_0x48d0aa(0xcc)](''),console[_0x48d0aa(0xcc)](_0x48d0aa(0x16c)+_0x3799a6+'ms'),_0x534ac9(_0x48d5e7['auth']?.['getSecurityNotices']?.()??[]);let _0x473b85=![];async function _0x237408(_0x44746b){const _0x53a80f=_0x48d0aa;_0x473b85&&(process['stderr'][_0x53a80f(0x21e)](_0x53a80f(0x9f)),process[_0x53a80f(0x2be)](0x82));_0x473b85=!![],process[_0x53a80f(0x2e9)][_0x53a80f(0x21e)](_0x53a80f(0x2b6)+(_0x44746b||_0x53a80f(0xfb))+_0x53a80f(0xe8));const _0x5d994=setTimeout(()=>{const _0x50bc35=_0x53a80f;process[_0x50bc35(0x2e9)][_0x50bc35(0x21e)](_0x50bc35(0x363)),process['exit'](0x1);},0x1388);try{_0x190973['unlinkSync'](_0x4d484c);}catch{}try{await _0x48d5e7[_0x53a80f(0x1e2)]();}catch(_0xc9bf4d){process['stderr'][_0x53a80f(0x21e)]('[okdb]\x20close\x20error:\x20'+(_0xc9bf4d?.[_0x53a80f(0x394)]??_0xc9bf4d)+'\x0a');}clearTimeout(_0x5d994),process[_0x53a80f(0x2e9)][_0x53a80f(0x21e)](_0x53a80f(0x120)),process[_0x53a80f(0x2be)](0x0);}process['on'](_0x48d0aa(0x1f7),()=>_0x237408(_0x48d0aa(0x1f7))),process['on'](_0x48d0aa(0x232),()=>_0x237408(_0x48d0aa(0x232))),process['on'](_0x48d0aa(0x35e),()=>_0x237408(_0x48d0aa(0x35e)));}}const _0x565656=new Set([_0x87d22a(0x340),_0x87d22a(0x18c),_0x87d22a(0x310),'backup',_0x87d22a(0x280),_0x87d22a(0x297),'reset',_0x87d22a(0x172),_0x87d22a(0x347),_0x87d22a(0x14a)]),_0x5cce1a=process[_0x87d22a(0x162)][0x2];if(_0x5cce1a===_0x87d22a(0x340))console[_0x87d22a(0xcc)](require$$2[_0x87d22a(0x340)]),process[_0x87d22a(0x2be)](0x0);else{if(_0x5cce1a&&_0x565656['has'](_0x5cce1a)){const _0x2fff70=process[_0x87d22a(0x162)][_0x87d22a(0x19b)](0x3),_0x4f569c=_0x1b438f([_0x87d22a(0x31f),'okdb',..._0x2fff70]),_0x478b00=_0x1c6f3d(_0x4f569c),_0x476ee5=new Set(['--path','-d',_0x87d22a(0xf6),'-k',_0x87d22a(0x284),'-c',_0x87d22a(0x2d6),'-p',_0x87d22a(0x194),_0x87d22a(0x2a2),'-e',_0x87d22a(0x20f),_0x87d22a(0x23a),'--password',_0x87d22a(0x2f2),_0x87d22a(0xed),_0x87d22a(0x98),'--ttl',_0x87d22a(0x329),_0x87d22a(0x31d),'-u','--address']);let _0x15856b=null;for(let _0x5580de=0x0;_0x5580de<_0x2fff70[_0x87d22a(0x252)];_0x5580de++){if(_0x476ee5[_0x87d22a(0x2f4)](_0x2fff70[_0x5580de])){_0x5580de++;continue;}if(!_0x2fff70[_0x5580de][_0x87d22a(0x84)]('-')){_0x15856b=_0x2fff70[_0x5580de];break;}}(async()=>{const _0x5e068b=_0x87d22a;if(_0x5cce1a===_0x5e068b(0x172)){const _0x4e621a=process[_0x5e068b(0x162)][0x3],_0x431c04=process[_0x5e068b(0x162)][_0x5e068b(0x19b)](0x4),_0x2b9c4f=_0x1b438f([_0x5e068b(0x31f),'okdb',..._0x431c04]),_0x2cf323=_0x1c6f3d(_0x2b9c4f),_0x80749c=new Set(['--path','-d',_0x5e068b(0xf6),'-k',_0x5e068b(0x284),'-c',_0x5e068b(0x2d6),'-p',_0x5e068b(0x23a),'--password',_0x5e068b(0x2f2),'--permissions',_0x5e068b(0x98),'--ttl',_0x5e068b(0x194),_0x5e068b(0x2a2),'-e',_0x5e068b(0x20f)]),_0x1bdc56=[];for(let _0x5b75a5=0x0;_0x5b75a5<_0x431c04['length'];_0x5b75a5++){if(_0x80749c['has'](_0x431c04[_0x5b75a5])){_0x5b75a5++;continue;}if(_0x431c04[_0x5b75a5][_0x5e068b(0x84)]('-'))continue;_0x1bdc56[_0x5e068b(0x34f)](_0x431c04[_0x5b75a5]);}switch(_0x4e621a){case _0x5e068b(0x1cb):await _0x40d5c4(_0x2cf323,_0x2b9c4f);break;case _0x5e068b(0x2b0):await _0x20ae04(_0x2cf323);break;case _0x5e068b(0x27d):await _0x27a7a1(_0x1bdc56[0x0],_0x2cf323);break;default:console['error']('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x4e621a+_0x5e068b(0x17f)),process['exit'](0x1);}return;}if(_0x5cce1a===_0x5e068b(0x14a)){const _0x1797c0=requireOkdbLicenseCodec(),_0x4b6b61=process[_0x5e068b(0x162)][_0x5e068b(0x19b)](0x3),_0x2552eb=_0x1b438f([_0x5e068b(0x31f),'okdb',..._0x4b6b61]),_0x41bc62=_0x1c6f3d(_0x2552eb),_0x84170c=new Set(['--path','-d',_0x5e068b(0xf6),'-k',_0x5e068b(0x284),'-c',_0x5e068b(0x2d6),'-p',_0x5e068b(0x194)]),_0x21d649=[];for(let _0xf7fbae=0x0;_0xf7fbae<_0x4b6b61[_0x5e068b(0x252)];_0xf7fbae++){if(_0x84170c[_0x5e068b(0x2f4)](_0x4b6b61[_0xf7fbae])){_0xf7fbae++;continue;}if(_0x4b6b61[_0xf7fbae][_0x5e068b(0x84)]('-'))continue;_0x21d649[_0x5e068b(0x34f)](_0x4b6b61[_0xf7fbae]);}const _0x43c834=_0x21d649[0x0]??null;if(_0x43c834===_0x5e068b(0x26b))await _0x2f06aa(_0x21d649[0x1],_0x41bc62);else{if(!_0x43c834)await _0x53751e(_0x41bc62);else{let _0x4dccec=_0x1797c0['detectInputType'](_0x43c834);if(_0x4dccec===_0x5e068b(0xde)&&_0x190973['existsSync'](_0x43c834))_0x4dccec=_0x5e068b(0x36a);if(_0x4dccec===_0x5e068b(0x36a))try{const _0x2077bb=_0x190973['readFileSync'](_0x43c834,_0x5e068b(0x1cf))[_0x5e068b(0x213)](),_0x3482c4=_0x1797c0[_0x5e068b(0x275)](_0x2077bb);if(_0x3482c4===_0x5e068b(0x375)){await _0x484ddc(_0x2077bb,_0x41bc62);return;}await _0x4eb215(_0x43c834,_0x41bc62);return;}catch(_0x16ae03){console['error'](_0x5e068b(0x1c3)+_0x43c834+':\x20'+_0x16ae03[_0x5e068b(0x394)]),process['exit'](0x1);}switch(_0x4dccec){case'blob':await _0x4eb215(_0x43c834,_0x41bc62);break;case _0x5e068b(0x375):await _0x484ddc(_0x43c834,_0x41bc62);break;case _0x5e068b(0xa2):await _0x5c9661(_0x43c834,_0x41bc62);break;default:console[_0x5e068b(0x28b)](_0x5e068b(0x115)+_0x43c834+'\x22'),console['error'](''),console[_0x5e068b(0x28b)](_0x5e068b(0x22b)),console[_0x5e068b(0x28b)](_0x5e068b(0x1b8)),console[_0x5e068b(0x28b)](_0x5e068b(0x2f5)),console[_0x5e068b(0x28b)](_0x5e068b(0x2e0)),console[_0x5e068b(0x28b)](_0x5e068b(0x303)),console['error'](''),console['error'](_0x5e068b(0x1d5)),process[_0x5e068b(0x2be)](0x1);}}}return;}switch(_0x5cce1a){case'doctor':await _0x169ce5(_0x478b00);break;case _0x5e068b(0x310):await _0x34ea33();break;case'reset':await _0x595bcc(_0x478b00);break;case _0x5e068b(0x3aa):await _0x70d6ee(_0x15856b??_0x25cc68['resolve'](_0x5e068b(0x399)),_0x478b00);break;case _0x5e068b(0x280):await _0x576a4a(_0x15856b??_0x25cc68[_0x5e068b(0x32d)](_0x5e068b(0x243)),_0x478b00,_0x4f569c);break;case'import':await _0x59ec3f(_0x15856b??_0x25cc68[_0x5e068b(0x32d)]('./okdb-export.ndjson'),_0x478b00,_0x4f569c);break;case _0x5e068b(0x347):await _0x43b2f1(_0x15856b,_0x478b00,_0x4f569c);break;}})()[_0x87d22a(0x370)](()=>process['exit'](0x0))['catch'](_0x2f6b86=>{const _0xe9aa0=_0x87d22a;console[_0xe9aa0(0x28b)]('\x0a[okdb]\x20error:\x20'+(_0x2f6b86[_0xe9aa0(0x394)]||_0x2f6b86)+'\x0a'),process[_0xe9aa0(0x2be)](0x1);});}else _0x4663b9()['catch'](_0x49dacd=>{const _0x17ead9=_0x87d22a;console[_0x17ead9(0x28b)]('\x0a[okdb]\x20fatal\x20error:'),console[_0x17ead9(0x28b)](_0x49dacd[_0x17ead9(0x357)]||_0x49dacd),process[_0x17ead9(0x2be)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x1f0ec4(0x209)]=okdb;
2
+ 'use strict';function _0x5d2b(){const _0x5eb6d8=['operation','127.0.0.1','\x20\x20→\x20\x20','\x20\x20⚠\x20\x20','[okdb]\x20imported\x20\x20types=','listRoutes','665KJrWuZ','inputSchema','\x27\x20on\x20type\x20\x27','[okdb]\x20invalid\x20port:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','type/users/item/alice\x20--env\x20staging','object','fts','exportBlobs','views','Schema\x20validation\x20failed\x20for\x20','[okdb]\x20invalid\x20log\x20level:\x20\x22','payload','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','toFixed','okdb','created','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','system:clock_change','exec','_envs','OKDBForeignKeyDeleteError','\x20\x20║','stderr','FEATURES','resume','ttl:clear','schema:set','length','find','Hint:\x20','[okdb]\x20blobs:\x20imported=','_licenseHash','\x20writes\x20(','resetting','gray','timeMachine','crypto','\x27\x20is\x20already\x20registered','\x20(must\x20be\x201–65535)','magenta','auth','yellow','addedAt','_lookupByName','properties','\x1b[32m','\x0a\x20\x20\x20\x20','writeUInt8','ACTIVATION_EXPIRED','--username','CREATED','System','system:poke','\x20\x20Some\x20checks\x20failed.\x0a','\x20does\x20not\x20exist','reason','\x20references\x20','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','Indexes','txn:start','\x20\x20\x20\x20port:\x20\x20','listening','embeddings','tags:\x20','bind','\x20already\x20exists','\x20\x20\x20\x20\x20\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','ttl:set','isInteger','--help','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','OKDBTypeNotRegisteredError','data','clearLine','search','.okdb-write-test','\x20\x20(licensee:\x20','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','description','Index\x20\x27','toString','License\x20limit\x20exceeded:\x20','env','line','targetType','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','sub','detectInputType','exports','darwin','--env\x20<name>','events','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','wrong_node','utf8','./okdb-data','PUT','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','index:registered','help','active','PIN','padEnd','MALFORMED_TOKEN','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','\x1b[1m','readUInt32BE','system:stopped','.kdbconfig','label','application/json','replace','__OKDB_PUB_FINGERPRINT__','\x22\x20already\x20exists','startsWith','scrypt','licenseType','\x20\x20changes=','<path>','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','Invalid\x20activation\x20token:\x20','\x20/\x20','open','\x20tokens:','\x20day(s).','\x20\x20✓\x20OKDB\x20server\x20running','dynamic','charCodeAt','resetIndex','slice','stdout','PUB_FINGERPRINT','green','keys/public.pem','verifyActivation','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','dim','\x22\x20on\x20\x22','round','fts:reset','OKDBNotFoundError','writeUInt32BE','once','decodeLicenseBlob','base64url','/admin/index.html','Index\x20\x22','error','Cannot\x20set\x20enforce\x20schema\x20on\x20','\x20\x20✗','\x22\x20→\x20','--blobs','code','\x20\x20Type\x20','export','LICENSE_EXPIRED_ACTION','password','type/users/query\x20{\x22active\x22:true}','OKDBInvalidValueError','captureStackTrace','dest','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','ENVS','details','\x20\x20Writes:\x20\x20','No\x20license\x20found\x20matching\x20this\x20activation\x20token','warn','Environments','readUInt8','existsSync','ROUTES','HELP','doctor','files/','effective','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','pid','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','some','Queue','license:added','Type\x20\x27','dbPath','test','api','min','\x20\x20(unlimited)','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','setPrompt','typesPerEnv','toLocaleString','queue','dropIndex','default','index:progress','\x20\x20Path\x20access','floor','node:crypto','--log-level','~tokens','shutting\x20down…\x0a','\x20\x20\x20\x20expires:\x20\x20\x20','ready','isTTY','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','includes','getRange','net','\x20\x20\x20\x20\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/','stack','LICENSE_TYPE_OPEN','~licenses','assertLimit','access:\x20','input:\x20','\x20\x20\x20\x20writes:\x20\x20\x20\x20','envs','\x20\x20\x20\x20permissions:\x20','ALREADY_EXISTS','\x20\x20Shell\x20commands','\x27\x20already\x20registered','--log-requests','key','EADDRINUSE','--address','\x0a\x20\x20✓\x20License\x20added','\x20\x20\x20\x20status:\x20\x20\x20\x20','--token','\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','val','hasType','attach','features','1427724nXJndc','\x0a[okdb]\x20received\x20','use\x20<env>','\x0a\x20\x20Invalid\x20JSON:\x20','licensed','Admin','log','\x0a[okdb]\x20fatal\x20error:','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','transport','standard','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','peers=','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','readline','ref:violation_resolved','active:','finally','time','createInterface','method','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','OKDBUniqueConstraintError','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','create','\x20\x20(need\x20≥\x2018)','hasOwnProperty','message','free\x20tier','License\x20already\x20stored','hint','clearTtl','[okdb]\x20error:\x20','[okdb]\x20loaded\x20config:\x20','decodeActivationToken','processors/','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','decoded','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','\x1b[34m','derivePin','\x20\x20Expected\x20one\x20of:','118808MlaQjZ','index:ready','readFileSync','handle','1223478NzrynF','LICENSE_LIMIT_EXCEEDED','okdb.pid','sourceType','./okdb-backup','starting','issuedAt','version','dropSchema','[okdb]\x20opening\x20','\x20\x20\x20\x20path:\x20\x20','\x20\x20[okdb]\x20','sizeAfter','0123456789ABCDEFGHJKMNPQRSTVWXYZ','Version\x20mismatch\x20for\x20','\x0d[okdb]\x20','mcp','expires','pause','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','xdg-open\x20','2503392XsZGrP','system:drain','\x20which\x20does\x20not\x20exist','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','Invalid\x20primary\x20key\x20type:\x20','\x20records','sha256','trimStart','init','type/users','8688AfrDTp','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','\x20type','\x20already\x20in\x20use','type:registered','OKDBError','set','DELETE\x20type/users/item/x','SIGINT','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','put','changes','env:removed','listLicenses','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','\x20\x20\x20\x20usage:\x20\x20\x20','debug','\x20licenses','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','config','../','drop','\x0a\x20\x20okdb\x20doctor\x0a','body','STATUS','License\x20expired\x20or\x20invalidated','[okdb]\x20close\x20error:\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/','\x27\x20doesn\x27t\x20exist','\x20MB\x20→\x20','_license','Foreign\x20key\x20violation:\x20','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','timingSafeEqual','fts:drop','/\x20quit\x20/\x20Ctrl+C','\x20\x20\x20\x20addedAt:\x20\x20\x20','/api/env/','\x0a\x0a\x20\x20','--changes','maxWrites','activateLicense','info','DELETE','freeze','onLicenseExpired','\x20<path>\x20[json-body]','node\x20','createHash','no\x20.kdbconfig\x20(using\x20defaults)','/api','constructor','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','\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','GET','\x20for\x20commands,\x20','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\x0a\x20\x20','database\x20path\x20writable:\x20','repeat','\x20documents\x20fail\x20validation','writeUInt16BE','[okdb]\x20export\x20complete','INDEX_HAS_CONSUMERS','(unset)','VERSION_MISMATCH','--no-admin','type:drop','OKDBInvalidIndexKeyError','\x20log\x20level:\x20','hidden','cyan','[okdb]\x20importing\x20','detachConsole','\x20envs','available','type/','\x0a\x20\x20License\x20details:','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Tier:\x20\x20\x20\x20','Feature\x20not\x20licensed:\x20','der','\x20opening\x20','__writeCounter','emit','LICENSE_INVALID','files','off','split','PUBLIC_KEY_PEM','%),\x20','../okdb','OKDBIndexNotRegisteredError','from','transport:\x20','http://localhost:','--grants','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','true','sig','hex','fts:registered','\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','isFeatureEnabled','verify','syncPeers','push','POST','stringify','expired','getPins','registerType','\x20\x20Common\x20causes:','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','\x20records…','FOREIGN_KEY_VIOLATION','\x20\x20\x20\x20licensee:\x20\x20','sync','map','_active','activation','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','\x20\x20·\x20','assertFeature','quit','toISOString','--config','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','listen','importFromFile','\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','[body]','update','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','homedir','env:opened','2243430ymWQtO','Activation\x20invalid:\x20','\x22.\x20Use:\x20create,\x20list,\x20revoke','logRequests','halted',',\x20closing…\x0a','body:\x20','columns','spki','--key','stopping','references','logLevel','\x20environment\x20','valid','--path','\x20\x20Usage:\x20','entries','safety','port\x20','importBlobs','\x20\x20╔═══════════════════════════╗','already\x20in\x20use','kind','dropping','result','--drop','\x20\x20·\x20\x20','allocUnsafe','path','idx:','\x1b[31m','revoke','expiry','{}[]:,\x27\x22','close','platform','index:reset','Examples','INVALID_VALUE','fill','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','reverse','started','logs','\x20env','\x20\x20skipped=','admin','\x20months\x20from\x20issuance)','\x20more','Engines','--permissions','migrate','view:progress','\x20\x20\x20\x20','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','license','LICENSED_BUILD','LICENSE_FEATURE_DISABLED','blobs','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','getSecurityNotices','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','sizeBefore','null','\x1b[90m','noRepl','current','\x20\x20╚═══════════════════════════╝','\x27,\x20cannot\x20map\x20to\x20\x27','now','catch','UNIQUE_CONSTRAINT','remove','prototype','(empty)','padStart','writeFileSync','limits','item:create','NOT_FOUND','name','\x20logs\x20on\x20\x20','[okdb]\x20backup\x20complete','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','envs=','{}[]:,\x0a\x0d\x09\x20','NAME','\x0a\x20\x20✓\x20Token\x20created','\x20\x20score:','rawBuf','shutdown','\x20\x20\x20\x20features:\x20\x20','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','ftsName','unknown','terminal','cause','\x20\x20(name:\x20','creating','resetFts','\x0a\x20\x20Joining\x20cluster\x20at\x20','\x20\x20Flags','white','reload','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','ref:violation','port','number','type','boolean','unlinkSync','\x20\x20Envs:\x20\x20\x20\x20','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','OKDBSchemaCollectionError','\x20not\x20found','string','[okdb]\x20port\x20','write','OKDBIndexHasConsumersError','other','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','engines','dropType','[okdb]\x20created\x20./okdb-data','--port','value','PATCH','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','\x20\x20(','types','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','registerFts','licenseHash','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','get','has','children','stopped','\x22\x20matches\x20','stdin','\x20(expires\x20in\x20','system','[okdb]\x20reset\x20aborted','\x20\x20records=','digest','exit','fieldPath','alloc','createPublicKey','resolve','\x20\x20✓\x20database\x20opened\x0a',')\x20to\x20your\x20license\x20vendor.','typeSubDbs','max','INVALID_INDEX_KEY','meta','prompt','enabled','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','Shutting\x20down\x20due\x20to\x20license\x20expiry','indexOf','PUT\x20type/users/item/x\x20{\x22n\x22:1}','bus:drain','byteLength','registerIndex','\x20\x20+','license:removed','INDEX_NOT_REGISTERED','--types','[okdb]\x20import\x20complete','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','licensee','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','_systemEnv','env/staging/info','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','mkdirSync','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','failures','status','blob','No\x20tokens.','\x20\x20✓\x20http\x20listening\x20on\x20:','keys','_isFree','history','address','Embeddings','access','SIGBREAK','Cannot\x20delete\x20','createServer','count','Types','\x20(expires\x20','Records','removeLicense','\x20\x20[okdb]\x20closed\x20cleanly\x0a','\x1b[33m','--no-repl','config\x20file\x20invalid:\x20','_computeStatus','\x20\x20@','options','bold','use','false','keys:','txn:end','title','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','concat','\x20\x20\x20\x20limits:\x20\x20\x20\x20','records','trim','(none)','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','types:','parse','LICENSE_ACTIVATION_INVALID','child_process','system:bus_state_change','\x22\x20to\x20enable\x20it.','--name','./okdb-export.ndjson','\x20logs\x20off\x0a','http','Full-text\x20search','\x20SECURITY\x20NOTICE','statSync','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','pin','list','then','every','\x1b[37m','expiresAt','(no\x20types)','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','selfAddress','roles','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','SIGTERM','Invalid\x20index\x20key\x20type\x20for\x20\x27','open\x20','toLowerCase','(on\x20any\x20path\x20command)','node','level','filter','exp','SCHEMA_COLLECTION_INVALID','index','\x20\x20Error:\x20','backup','uuid','--env','[okdb]\x20starting…\x0a','createHmac','licenseId','\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','ceil','noAdmin','[on|off|level]','[okdb]\x20exported\x20\x20types=','\x20\x20✓\x20Revoked\x20token\x20','argv',':\x20expected\x20','grants','SIG_INVALID','OKDBForeignKeyError','randomBytes','received\x20','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','unique:violation_resolved','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','\x20bytes,\x20need\x20>=\x2065)','\x20\x20[','permissions','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','ttl','OKDBSchemaValidationError','tags','type/users/item/alice','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','TYPE_NOT_REGISTERED','routes','--ttl','join','755634csvkaO','red','targetKey','types\x20--env\x20staging','token','Build\x20expects\x20public\x20key\x20fingerprint\x20','\x20\x20✓\x20','reset','\x20\x20Usage:','\x1b[36m',',\x20got\x20','[okdb]\x20nothing\x20to\x20reset\x20—\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','copy','toUpperCase','dirname','invalid','setTtl','OKDB-PIN-V1:','\x20MB)','fromEntries','rmSync','[okdb]\x20error:\x20--password\x20requires\x20--name','__esModule','id:\x20','unique:violation','OKDBVersionMismatchError','/api/','username','\x0d[okdb]\x20blobs:\x20','pending','\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','[okdb]\x20reset:\x20','randomUUID','--label','<json-body>','item:remove','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','--password','isArray','\x1b[35m','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','TYPES','OPEN'];_0x5d2b=function(){return _0x5eb6d8;};return _0x5d2b();}const _0x27fb86=_0x5271;(function(_0x3c4417,_0x144ab1){const _0x34fadf=_0x5271,_0x22ea76=_0x3c4417();while(!![]){try{const _0x531766=parseInt(_0x34fadf(0x226))/0x1+-parseInt(_0x34fadf(0x3d6))/0x2+parseInt(_0x34fadf(0x207))/0x3+-parseInt(_0x34fadf(0x1d8))/0x4+-parseInt(_0x34fadf(0x2af))/0x5+-parseInt(_0x34fadf(0x21c))/0x6+-parseInt(_0x34fadf(0x408))/0x7*(-parseInt(_0x34fadf(0x203))/0x8);if(_0x531766===_0x144ab1)break;else _0x22ea76['push'](_0x22ea76['shift']());}catch(_0x24aa72){_0x22ea76['push'](_0x22ea76['shift']());}}}(_0x5d2b,0x37585));var require$$1$1=require(_0x27fb86(0x2cc)),require$$1=require('fs'),require$$3=require(_0x27fb86(0x1be)),require$$0$2=require(_0x27fb86(0x1e6)),require$$5=require(_0x27fb86(0x281)),require$$0=require(_0x27fb86(0x42d)),require$$0$1=require(_0x27fb86(0x1b4)),require$$2$1=require('os'),require$$4=require(_0x27fb86(0x390));function getDefaultExportFromCjs(_0x5da364){const _0x346c3f=_0x27fb86;return _0x5da364&&_0x5da364[_0x346c3f(0x3ed)]&&Object['prototype'][_0x346c3f(0x1f2)]['call'](_0x5da364,_0x346c3f(0x1b0))?_0x5da364['default']:_0x5da364;}var okdb$1={},version='1.8.14',require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x5fbfc2=require$$0;function _0x5473d0(_0x117a33,_0x11fc95){const _0x1b3a99=_0x5271;return _0x5fbfc2[_0x1b3a99(0x3b6)](_0x1b3a99(0x222),_0x11fc95)[_0x1b3a99(0x2ab)](_0x117a33)[_0x1b3a99(0x342)]('base64url');}function _0x18d773(_0x424a03,_0x5f0690){const _0x164330=_0x5271;if(typeof _0x424a03!==_0x164330(0x323)||typeof _0x5f0690!==_0x164330(0x323))return![];if(Buffer[_0x164330(0x355)](_0x424a03)!==Buffer['byteLength'](_0x5f0690))return![];return _0x5fbfc2[_0x164330(0x247)](Buffer['from'](_0x424a03),Buffer[_0x164330(0x283)](_0x5f0690));}function _0x48bec6(_0x591e92){const _0xcdee6c=_0x5271;if(!_0x591e92?.[_0xcdee6c(0x47b)]('Bearer\x20'))return null;return _0x591e92['slice'](0x7);}function _0x26758b(_0x3963d0=0x20){const _0x32e88b=_0x5271;return _0x5fbfc2[_0x32e88b(0x3c3)](_0x3963d0)[_0x32e88b(0x459)](_0x32e88b(0x499));}function _0x469bff(_0x1af8d7){const _0x3132e3=_0x5271;return _0x5fbfc2[_0x3132e3(0x256)](_0x3132e3(0x222))[_0x3132e3(0x2ab)](_0x1af8d7)[_0x3132e3(0x342)](_0x3132e3(0x28a));}function _0x978ddd(_0x5b3052,_0x30a32e,_0x1456b0=0x36ee80){const _0x4b0fce=_0x5271;if(!_0x30a32e)throw new Error('Token\x20secret\x20not\x20configured');const _0x39f1de=Date[_0x4b0fce(0x2f5)](),_0x1ab5f8=Buffer['from'](JSON[_0x4b0fce(0x292)]({'iat':_0x39f1de,'exp':_0x39f1de+_0x1456b0,'sub':_0x5b3052?.['id']??_0x5b3052?.[_0x4b0fce(0x45f)]??null,'username':_0x5b3052?.[_0x4b0fce(0x3f2)]??_0x5b3052?.[_0x4b0fce(0x300)]??null,'roles':Array[_0x4b0fce(0x3fd)](_0x5b3052?.[_0x4b0fce(0x3a4)])?_0x5b3052['roles']:[]}))['toString'](_0x4b0fce(0x499)),_0x28b2ae=_0x5473d0(_0x1ab5f8,_0x30a32e);return _0x1ab5f8+'.'+_0x28b2ae;}function _0x3f015e(_0x56d0aa,_0x5473b){const _0x520fb6=_0x5271;if(!_0x5473b||typeof _0x56d0aa!==_0x520fb6(0x323))return null;const [_0xa9f280,_0x4a3b60]=_0x56d0aa[_0x520fb6(0x27e)]('.');if(!_0xa9f280||!_0x4a3b60)return null;const _0x14fa4c=_0x5473d0(_0xa9f280,_0x5473b);if(!_0x18d773(_0x4a3b60,_0x14fa4c))return null;try{const _0x2b86aa=JSON['parse'](Buffer[_0x520fb6(0x283)](_0xa9f280,_0x520fb6(0x499))[_0x520fb6(0x459)]()),_0x35e4c5=0x7530;if(Date['now']()>Number(_0x2b86aa?.[_0x520fb6(0x3ae)]??0x0)+_0x35e4c5)return null;return _0x2b86aa;}catch{return null;}}async function _0x21e842(_0xbb0a7c){return new Promise((_0x4bb0e0,_0x3def10)=>{const _0x3c9387=_0x5271,_0x19edbf=_0x5fbfc2['randomBytes'](0x10);_0x5fbfc2[_0x3c9387(0x47c)](_0xbb0a7c,_0x19edbf,0x40,(_0x2193a7,_0x22dffd)=>{const _0x448523=_0x3c9387;if(_0x2193a7)_0x3def10(_0x2193a7);_0x4bb0e0(_0x19edbf[_0x448523(0x459)](_0x448523(0x28a))+':'+_0x22dffd[_0x448523(0x459)](_0x448523(0x28a)));});});}async function _0x2cc08f(_0x2fbcc7,_0x5cad26){const _0x105abe=_0x5271,[_0x4285c1,_0x2f9e16]=_0x5cad26[_0x105abe(0x27e)](':');if(!_0x4285c1||!_0x2f9e16)return![];const _0x2386af=Buffer[_0x105abe(0x283)](_0x4285c1,'hex');return new Promise((_0x6fb192,_0x7715fd)=>{const _0x188b75=_0x105abe;_0x5fbfc2[_0x188b75(0x47c)](_0x2fbcc7,_0x2386af,0x40,(_0x1fbd2e,_0x595051)=>{const _0x56bdc9=_0x188b75;if(_0x1fbd2e)_0x7715fd(_0x1fbd2e);_0x6fb192(_0x5fbfc2[_0x56bdc9(0x247)](_0x595051,Buffer['from'](_0x2f9e16,'hex')));});});}return okdbAuthTokens={'hmac':_0x5473d0,'timingSafeEqual':_0x18d773,'parseBearer':_0x48bec6,'randomToken':_0x26758b,'hashToken':_0x469bff,'issueToken':_0x978ddd,'authenticateToken':_0x3f015e,'hashPassword':_0x21e842,'verifyPassword':_0x2cc08f},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x3afe0a=_0x27fb86;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x2f04cc=require$$0$1,_0x45064c=_0x3afe0a(0x214),_0x9e5bc7=new Uint8Array(0x100)[_0x3afe0a(0x2d7)](0xff);for(let _0x2fd468=0x0;_0x2fd468<_0x45064c[_0x3afe0a(0x424)];_0x2fd468++){_0x9e5bc7[_0x45064c[_0x3afe0a(0x488)](_0x2fd468)]=_0x2fd468,_0x9e5bc7[_0x45064c[_0x3afe0a(0x488)](_0x2fd468)+0x20]=_0x2fd468;}_0x9e5bc7['O'['charCodeAt'](0x0)]=0x0,_0x9e5bc7['o'[_0x3afe0a(0x488)](0x0)]=0x0,_0x9e5bc7['I'[_0x3afe0a(0x488)](0x0)]=0x1,_0x9e5bc7['i'[_0x3afe0a(0x488)](0x0)]=0x1,_0x9e5bc7['L'[_0x3afe0a(0x488)](0x0)]=0x1,_0x9e5bc7['l'['charCodeAt'](0x0)]=0x1;function _0x58e1fc(_0x386bdd){let _0x323aaf=0x0,_0x5d4b76=0x0,_0x51b9ed='';for(let _0x11e64d=0x0;_0x11e64d<_0x386bdd['length'];_0x11e64d++){_0x5d4b76=_0x5d4b76<<0x8|_0x386bdd[_0x11e64d],_0x323aaf+=0x8;while(_0x323aaf>=0x5){_0x323aaf-=0x5,_0x51b9ed+=_0x45064c[_0x5d4b76>>>_0x323aaf&0x1f];}}return _0x323aaf>0x0&&(_0x51b9ed+=_0x45064c[_0x5d4b76<<0x5-_0x323aaf&0x1f]),_0x51b9ed;}function _0x12a508(_0x5a476e){const _0x5a20e9=_0x3afe0a;_0x5a476e=_0x5a476e[_0x5a20e9(0x478)](/-/g,'')['toUpperCase']();let _0x12bec4=0x0,_0x1c0711=0x0;const _0x4a0fbb=[];for(let _0x1374cd=0x0;_0x1374cd<_0x5a476e['length'];_0x1374cd++){const _0x2ed6c0=_0x9e5bc7[_0x5a476e[_0x5a20e9(0x488)](_0x1374cd)];if(_0x2ed6c0===0xff)continue;_0x1c0711=_0x1c0711<<0x5|_0x2ed6c0,_0x12bec4+=0x5,_0x12bec4>=0x8&&(_0x12bec4-=0x8,_0x4a0fbb[_0x5a20e9(0x290)](_0x1c0711>>>_0x12bec4&0xff));}return Buffer[_0x5a20e9(0x283)](_0x4a0fbb);}const _0x1c7e6d=[_0x3afe0a(0x29b),_0x3afe0a(0x447),_0x3afe0a(0x32a),_0x3afe0a(0x40f),_0x3afe0a(0x42c),_0x3afe0a(0x411),_0x3afe0a(0x217),_0x3afe0a(0x27c)],_0x479ee2=0x0,_0x5cf1b0=0x1,_0x4ab77f=0x2,_0x46b8ab=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x28b3f1({issuedAt:_0x477731,expiresAt:_0x60a5ea,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x479ee2}){const _0x4f4b0f=_0x3afe0a,_0x10106b=Buffer[_0x4f4b0f(0x283)](licensee,_0x4f4b0f(0x467))['slice'](0x0,0x40),_0x52e677=0x1+0x1+0x4+0x4+0x1+_0x10106b[_0x4f4b0f(0x424)]+0x2+0x10,_0x1e8c39=Buffer[_0x4f4b0f(0x2cb)](_0x52e677);let _0x3b5338=0x0;_0x1e8c39[_0x4f4b0f(0x438)](0x1,_0x3b5338++),_0x1e8c39[_0x4f4b0f(0x438)](licenseType,_0x3b5338++),_0x1e8c39[_0x4f4b0f(0x496)](Math[_0x4f4b0f(0x1b3)](_0x477731/0x3e8),_0x3b5338),_0x3b5338+=0x4,_0x1e8c39[_0x4f4b0f(0x496)](Math[_0x4f4b0f(0x1b3)](_0x60a5ea/0x3e8),_0x3b5338),_0x3b5338+=0x4,_0x1e8c39['writeUInt8'](_0x10106b[_0x4f4b0f(0x424)],_0x3b5338++),_0x10106b['copy'](_0x1e8c39,_0x3b5338),_0x3b5338+=_0x10106b[_0x4f4b0f(0x424)];let _0x6911ea=0x0;for(let _0x28dfe1=0x0;_0x28dfe1<_0x1c7e6d[_0x4f4b0f(0x424)];_0x28dfe1++){if(features[_0x1c7e6d[_0x28dfe1]])_0x6911ea|=0x1<<_0x28dfe1;}_0x1e8c39[_0x4f4b0f(0x263)](_0x6911ea,_0x3b5338),_0x3b5338+=0x2;const _0x16f650=[_0x4f4b0f(0x1c7),'typesPerEnv',_0x4f4b0f(0x28f),_0x4f4b0f(0x24e)];for(const _0x13a62f of _0x16f650){_0x1e8c39['writeUInt32BE'](limits[_0x13a62f]||0x0,_0x3b5338),_0x3b5338+=0x4;}return _0x1e8c39;}function _0x4a3092(_0x23a32e){const _0x2b89d7=_0x3afe0a;let _0x58e599=0x0;const _0xd07f8b=_0x23a32e[_0x2b89d7(0x197)](_0x58e599++),_0x4c6e64=_0x23a32e[_0x2b89d7(0x197)](_0x58e599++),_0x2ca88e=_0x23a32e[_0x2b89d7(0x473)](_0x58e599);_0x58e599+=0x4;const _0x53b354=_0x23a32e['readUInt32BE'](_0x58e599);_0x58e599+=0x4;const _0x137a94=_0x23a32e['readUInt8'](_0x58e599++),_0x58e985=_0x23a32e[_0x2b89d7(0x48a)](_0x58e599,_0x58e599+_0x137a94)['toString'](_0x2b89d7(0x467));_0x58e599+=_0x137a94;const _0x44ba4f=_0x23a32e['readUInt16BE'](_0x58e599);_0x58e599+=0x2;const _0x473498={};for(let _0x24c46a=0x0;_0x24c46a<_0x1c7e6d[_0x2b89d7(0x424)];_0x24c46a++){_0x473498[_0x1c7e6d[_0x24c46a]]=Boolean(_0x44ba4f&0x1<<_0x24c46a);}const _0x771fed=[_0x2b89d7(0x1c7),'typesPerEnv',_0x2b89d7(0x28f),'maxWrites'],_0xb8fd23={};for(const _0x33ec3e of _0x771fed){const _0x281e55=_0x23a32e['readUInt32BE'](_0x58e599);_0x58e599+=0x4,_0xb8fd23[_0x33ec3e]=_0x281e55===0x0?null:_0x281e55;}return{'v':_0xd07f8b,'licenseType':_0x4c6e64,'issuedAt':_0x2ca88e*0x3e8,'expiresAt':_0x53b354*0x3e8,'licensee':_0x58e985,'features':_0x473498,'limits':_0xb8fd23};}function _0x2b7615(_0x4bb0c9,_0x50b012){const _0x15adef=_0x3afe0a,_0x502210=Buffer[_0x15adef(0x385)]([_0x4bb0c9,_0x50b012]),_0x4d6dba=_0x58e1fc(_0x502210),_0x1e7716=[];for(let _0x2f67d6=0x0;_0x2f67d6<_0x4d6dba[_0x15adef(0x424)];_0x2f67d6+=0x8){_0x1e7716[_0x15adef(0x290)](_0x4d6dba[_0x15adef(0x48a)](_0x2f67d6,_0x2f67d6+0x8));}return _0x1e7716['join']('-');}function _0x8de5cb(_0x34d9ec){const _0x536bae=_0x3afe0a;if(typeof _0x34d9ec!==_0x536bae(0x323))throw new Error(_0x536bae(0x337));const _0x4580b4=_0x12a508(_0x34d9ec['replace'](/-/g,''));if(_0x4580b4['length']<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x4580b4[_0x536bae(0x424)]+_0x536bae(0x3c9));const _0xd3b80a=_0x4580b4[_0x536bae(0x48a)](0x0,_0x4580b4[_0x536bae(0x424)]-0x40),_0x1672de=_0x4580b4[_0x536bae(0x48a)](_0x4580b4[_0x536bae(0x424)]-0x40);let _0x118ff5;try{_0x118ff5=_0x4a3092(_0xd3b80a);}catch(_0x5613fa){throw new Error(_0x536bae(0x3a5)+_0x5613fa[_0x536bae(0x1f3)]);}return{'rawBuf':_0x4580b4,'payload':_0xd3b80a,'sig':_0x1672de,'decoded':_0x118ff5};}function _0x16fd9c(_0x21df45){const _0x2ed950=_0x3afe0a;return _0x2f04cc[_0x2ed950(0x256)](_0x2ed950(0x222))[_0x2ed950(0x2ab)](_0x21df45)[_0x2ed950(0x342)]()[_0x2ed950(0x48a)](0x0,0x8);}function _0x71a440(_0x5de7f3,_0x1b10ca,_0x4ad50b){const _0x2811d9=_0x3afe0a,_0x1cf640=_0x2811d9(0x3e8)+_0x4ad50b,_0x2676c5=Buffer['concat']([Buffer[_0x2811d9(0x283)](_0x5de7f3,_0x2811d9(0x467)),_0x1b10ca]),_0x45da34=_0x2f04cc[_0x2811d9(0x3b6)]('sha256',_0x1cf640)[_0x2811d9(0x2ab)](_0x2676c5)[_0x2811d9(0x342)](),_0x227f24=_0x58e1fc(_0x45da34[_0x2811d9(0x48a)](0x0,0x5));return{'pin':_0x227f24,'pinHmac':_0x45da34};}function _0x3c3928(_0x15cb0d,_0x1edfe7,_0x114f1b){const _0x3f95eb=_0x3afe0a,_0x4f9a79=Buffer[_0x3f95eb(0x2cb)](0x4d);let _0x499ad9=0x0;_0x4f9a79[_0x3f95eb(0x438)](0x1,_0x499ad9++),_0x15cb0d[_0x3f95eb(0x3e3)](_0x4f9a79,_0x499ad9),_0x499ad9+=0x8,_0x4f9a79[_0x3f95eb(0x496)](_0x1edfe7,_0x499ad9),_0x499ad9+=0x4,_0x114f1b[_0x3f95eb(0x3e3)](_0x4f9a79,_0x499ad9);const _0x2280b6=_0x58e1fc(_0x4f9a79),_0x2edda4=[];for(let _0x2f13b7=0x0;_0x2f13b7<_0x2280b6['length'];_0x2f13b7+=0x6){_0x2edda4['push'](_0x2280b6['slice'](_0x2f13b7,_0x2f13b7+0x6));}return _0x2edda4[_0x3f95eb(0x3d5)]('-');}function _0x54853f(_0x39314a){const _0x3ee706=_0x3afe0a;if(typeof _0x39314a!==_0x3ee706(0x323))throw new Error(_0x3ee706(0x1ef));const _0x34f02c=_0x12a508(_0x39314a[_0x3ee706(0x478)](/-/g,''));if(_0x34f02c[_0x3ee706(0x424)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x34f02c[_0x3ee706(0x424)]);let _0x2c8e14=0x0;const _0x20ce15=_0x34f02c['readUInt8'](_0x2c8e14++),_0x579b0c=_0x34f02c[_0x3ee706(0x48a)](_0x2c8e14,_0x2c8e14+0x8);_0x2c8e14+=0x8;const _0x4c718b=_0x34f02c[_0x3ee706(0x473)](_0x2c8e14);_0x2c8e14+=0x4;const _0x89ce88=_0x34f02c[_0x3ee706(0x48a)](_0x2c8e14);return{'v':_0x20ce15,'licenseHash':_0x579b0c,'expiry':_0x4c718b,'sig':_0x89ce88};}function _0x16eed0({tokenString:_0x585003,nodeId:_0x3f4bd1,rawBlobBuf:_0x3242e8,pubKeyPem:_0x392859,pubFingerprint:_0x2fbadf}){const _0x238edd=_0x3afe0a;let _0x1953a7;try{_0x1953a7=_0x54853f(_0x585003);}catch(_0x181e02){return{'valid':![],'reason':_0x238edd(0x470)};}const _0x237a90=_0x16fd9c(_0x3242e8);if(!_0x237a90['equals'](_0x1953a7[_0x238edd(0x336)]))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x4ac968}=_0x71a440(_0x3f4bd1,_0x237a90,_0x2fbadf),_0x2bb8f5=Buffer['allocUnsafe'](0x4);_0x2bb8f5[_0x238edd(0x496)](_0x1953a7[_0x238edd(0x2d0)],0x0);const _0x36a3f2=Buffer[_0x238edd(0x385)]([Buffer['from']([_0x1953a7['v']]),_0x4ac968[_0x238edd(0x48a)](0x0,0x5),_0x1953a7[_0x238edd(0x336)],_0x2bb8f5]);try{const _0x8d4d0a=_0x2f04cc[_0x238edd(0x28e)](null,_0x36a3f2,_0x392859,_0x1953a7[_0x238edd(0x289)]);if(!_0x8d4d0a)return{'valid':![],'reason':_0x238edd(0x3c1)};}catch(_0xbd7cca){return{'valid':![],'reason':_0x238edd(0x3c1)};}if(_0x1953a7['expiry']<Date[_0x238edd(0x2f5)]()/0x3e8)return{'valid':![],'reason':_0x238edd(0x439)};return{'valid':!![],'reason':'ok'};}function _0x4c092c(_0x1c658d){const _0x5e2dc8=_0x3afe0a;if(typeof _0x1c658d!=='string')return'unknown';const _0x32fcd2=_0x1c658d['trim']();if(_0x32fcd2[_0x5e2dc8(0x47b)]('/')||_0x32fcd2[_0x5e2dc8(0x47b)]('./')||_0x32fcd2[_0x5e2dc8(0x47b)](_0x5e2dc8(0x23a))||/^[A-Za-z]:[\\/]/[_0x5e2dc8(0x1a6)](_0x32fcd2))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x5e2dc8(0x1a6)](_0x32fcd2))return'uuid';const _0x27257d=_0x32fcd2[_0x5e2dc8(0x478)](/[\s-]+/g,'')['length'];if(_0x27257d===0x7c)return _0x5e2dc8(0x29e);if(_0x27257d>=0x95&&_0x27257d<=0xfc)return _0x5e2dc8(0x366);return _0x5e2dc8(0x30e);}return okdbLicenseCodec={'toBase32':_0x58e1fc,'fromBase32':_0x12a508,'encodeLicensePayload':_0x28b3f1,'decodeLicensePayload':_0x4a3092,'encodeLicenseBlob':_0x2b7615,'decodeLicenseBlob':_0x8de5cb,'licenseHash':_0x16fd9c,'derivePin':_0x71a440,'encodeActivationToken':_0x3c3928,'decodeActivationToken':_0x54853f,'verifyActivation':_0x16eed0,'detectInputType':_0x4c092c,'FEATURE_NAMES':_0x1c7e6d,'LICENSE_TYPE_STANDARD':_0x479ee2,'LICENSE_TYPE_OPEN':_0x5cf1b0,'LICENSE_TYPE_INTERNAL':_0x4ab77f,'OPEN_LICENSE_MAX_DURATION_MS':_0x46b8ab},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x8560b1 extends Error{constructor(_0x335a86,_0x391646,_0xe3e01c={}){const _0x27eb2=_0x5271;super(_0x335a86),this[_0x27eb2(0x300)]=_0x27eb2(0x22b),this[_0x27eb2(0x4a1)]=_0x391646,this[_0x27eb2(0x4ac)]=_0xe3e01c,_0xe3e01c[_0x27eb2(0x310)]&&(this[_0x27eb2(0x310)]=_0xe3e01c[_0x27eb2(0x310)]),Error[_0x27eb2(0x4a8)](this,this[_0x27eb2(0x259)]);}}class _0x58ae18 extends _0x8560b1{constructor(_0x2c0c29,_0x327f1e,_0x3cbc78,_0x3dfe59){const _0x10b243=_0x5271;super(_0x10b243(0x215)+_0x2c0c29+'@'+_0x327f1e+_0x10b243(0x3bf)+_0x3cbc78+_0x10b243(0x3e0)+_0x3dfe59,_0x10b243(0x267),{'type':_0x2c0c29,'key':_0x327f1e,'expectedVersion':_0x3cbc78,'actualVersion':_0x3dfe59}),this[_0x10b243(0x300)]=_0x10b243(0x3f0);}}class _0x2a8086 extends _0x8560b1{constructor(_0x513ec3,_0x34a493){const _0x1652f6=_0x5271;super(_0x513ec3+'@'+_0x34a493+_0x1652f6(0x43f),_0x1652f6(0x2ff),{'type':_0x513ec3,'key':_0x34a493}),this['name']=_0x1652f6(0x495);}}class _0x13a7e2 extends _0x8560b1{constructor(_0x4fcbfd,_0x401a13){const _0x438a5b=_0x5271;super(_0x4fcbfd+'@'+_0x401a13+_0x438a5b(0x44a),_0x438a5b(0x1c9),{'type':_0x4fcbfd,'key':_0x401a13}),this[_0x438a5b(0x300)]='OKDBAlreadyExistsError';}}class _0x3ce9cf extends _0x8560b1{constructor(_0x57531b,_0x5ecdb2){const _0x5c58bc=_0x5271,_0x1e4743=typeof _0x5ecdb2;super(_0x5c58bc(0x3a7)+_0x57531b+'\x27:\x20'+_0x1e4743+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x5ecdb2,_0x5c58bc(0x34c),{'index':_0x57531b,'key':_0x5ecdb2,'keyType':_0x1e4743}),this[_0x5c58bc(0x300)]=_0x5c58bc(0x26a);}}class _0x369f85 extends _0x8560b1{constructor(_0x25d5fb){const _0x450403=_0x5271,_0x3303df=typeof _0x25d5fb;super(_0x450403(0x220)+_0x3303df+_0x450403(0x22f)+_0x25d5fb,'INVALID_PRIMARY_KEY',{'key':_0x25d5fb,'keyType':_0x3303df}),this[_0x450403(0x300)]='OKDBInvalidPrimaryKeyError';}}class _0x1a738f extends _0x8560b1{constructor(_0x2af0cd){const _0x18231b=_0x5271;super(_0x18231b(0x1a4)+_0x2af0cd+_0x18231b(0x242),_0x18231b(0x3d2),{'type':_0x2af0cd}),this[_0x18231b(0x300)]=_0x18231b(0x450);}}class _0x59a834 extends _0x8560b1{constructor(_0x128756){const _0x54dd40=_0x5271;super('Type\x20\x27'+_0x128756+_0x54dd40(0x1cb),'TYPE_ALREADY_REGISTERED',{'type':_0x128756}),this[_0x54dd40(0x300)]='OKDBTypeAlreadyRegisteredError';}}class _0x5a49f7 extends _0x8560b1{constructor(_0x772d89,_0x5544ba){const _0x163056=_0x5271;super(_0x163056(0x458)+_0x5544ba+_0x163056(0x40a)+_0x772d89+_0x163056(0x242),_0x163056(0x359),{'type':_0x772d89,'index':_0x5544ba}),this[_0x163056(0x300)]=_0x163056(0x282);}}class _0x39013c extends _0x8560b1{constructor(_0x15aaf0,_0x5088ab){const _0x204fc7=_0x5271;super(_0x204fc7(0x458)+_0x5088ab+_0x204fc7(0x40a)+_0x15aaf0+_0x204fc7(0x42e),'INDEX_ALREADY_REGISTERED',{'type':_0x15aaf0,'index':_0x5088ab}),this[_0x204fc7(0x300)]='OKDBIndexAlreadyRegisteredError';}}class _0x28ca72 extends _0x8560b1{constructor(_0x115690,_0x24cb52={}){const _0x2463c2=_0x5271;super(_0x115690,_0x2463c2(0x2d6),_0x24cb52),this[_0x2463c2(0x300)]=_0x2463c2(0x4a7);}}class _0x4c2191 extends _0x8560b1{constructor(_0x259bfc,_0x46a380,_0x20f278,_0x560443,_0x168197){const _0x3a1b77=_0x5271;super('Unique\x20constraint\x20violated\x20on\x20'+_0x259bfc+'@'+_0x46a380+':\x20key\x20['+_0x20f278+']\x20already\x20maps\x20to\x20\x27'+_0x560443+_0x3a1b77(0x2f4)+_0x168197+'\x27',_0x3a1b77(0x2f7),{'type':_0x259bfc,'index':_0x46a380,'indexKey':_0x20f278,'existingKey':_0x560443,'conflictingKey':_0x168197}),this[_0x3a1b77(0x300)]=_0x3a1b77(0x1ee);}}class _0x29f64a extends _0x8560b1{constructor(_0x738491,_0x107704,_0x506429){const _0x2ca85c=_0x5271;super(_0x2ca85c(0x412)+_0x738491+'@'+_0x107704,'SCHEMA_VALIDATION_FAILED',{'type':_0x738491,'key':_0x107704,'errors':_0x506429}),this[_0x2ca85c(0x300)]=_0x2ca85c(0x3ce),this[_0x2ca85c(0x31c)]=_0x738491,this[_0x2ca85c(0x1cd)]=_0x107704,this['errors']=_0x506429;}}class _0x3ab3cd extends _0x8560b1{constructor(_0xf4e5cf,_0xa0f5a0){const _0x3661e0=_0x5271;super(_0x3661e0(0x49d)+_0xf4e5cf+':\x20'+_0xa0f5a0['length']+_0x3661e0(0x262),_0x3661e0(0x3af),{'type':_0xf4e5cf,'failures':_0xa0f5a0}),this[_0x3661e0(0x300)]=_0x3661e0(0x321),this[_0x3661e0(0x31c)]=_0xf4e5cf,this[_0x3661e0(0x364)]=_0xa0f5a0;}}class _0x2424e8 extends _0x8560b1{constructor(_0x208d64,_0x6702e9,_0x5f3533,_0x17cc0c,_0x157f7c){const _0x44e7d3=_0x5271;super(_0x44e7d3(0x245)+_0x208d64+'@'+_0x6702e9+'.'+_0x5f3533+_0x44e7d3(0x441)+_0x17cc0c+'@'+_0x157f7c+_0x44e7d3(0x21e),_0x44e7d3(0x299),{'sourceType':_0x208d64,'sourceKey':_0x6702e9,'fieldPath':_0x5f3533,'targetType':_0x17cc0c,'targetKey':_0x157f7c}),this[_0x44e7d3(0x300)]=_0x44e7d3(0x3c2),this[_0x44e7d3(0x20a)]=_0x208d64,this['sourceKey']=_0x6702e9,this[_0x44e7d3(0x344)]=_0x5f3533,this['targetType']=_0x17cc0c,this[_0x44e7d3(0x3d8)]=_0x157f7c;}}class _0x4daaa9 extends _0x8560b1{constructor(_0x379bc7,_0x5db604,_0x52681e){const _0x935f5f=_0x5271;super(_0x935f5f(0x370)+_0x379bc7+'@'+_0x5db604+':\x20'+_0x52681e[_0x935f5f(0x424)]+_0x935f5f(0x1bb),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x379bc7,'targetKey':_0x5db604,'references':_0x52681e}),this[_0x935f5f(0x300)]=_0x935f5f(0x41d),this[_0x935f5f(0x45d)]=_0x379bc7,this[_0x935f5f(0x3d8)]=_0x5db604,this[_0x935f5f(0x2ba)]=_0x52681e;}}class _0x146941 extends _0x8560b1{constructor(_0xbf11b2,_0x178188,_0x49b486){const _0x3aec73=_0x5271;super(_0x3aec73(0x49b)+_0x178188+_0x3aec73(0x492)+_0xbf11b2+'\x22\x20is\x20used\x20by:\x20'+_0x49b486['map'](_0x426315=>_0x426315[_0x3aec73(0x2c6)]+':'+_0x426315[_0x3aec73(0x300)])['join'](',\x20'),_0x3aec73(0x265),{'type':_0xbf11b2,'index':_0x178188,'usedBy':_0x49b486}),this['name']=_0x3aec73(0x326);}}return okdbError={'OKDBError':_0x8560b1,'OKDBVersionMismatchError':_0x58ae18,'OKDBNotFoundError':_0x2a8086,'OKDBAlreadyExistsError':_0x13a7e2,'OKDBInvalidIndexKeyError':_0x3ce9cf,'OKDBInvalidPrimaryKeyError':_0x369f85,'OKDBTypeNotRegisteredError':_0x1a738f,'OKDBTypeAlreadyRegisteredError':_0x59a834,'OKDBIndexNotRegisteredError':_0x5a49f7,'OKDBIndexAlreadyRegisteredError':_0x39013c,'OKDBInvalidValueError':_0x28ca72,'OKDBUniqueConstraintError':_0x4c2191,'OKDBSchemaValidationError':_0x29f64a,'OKDBSchemaCollectionError':_0x3ab3cd,'OKDBForeignKeyError':_0x2424e8,'OKDBForeignKeyDeleteError':_0x4daaa9,'OKDBIndexHasConsumersError':_0x146941},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4216db=_0x27fb86;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x596f4d={'PUT':_0x4216db(0x230),'REMOVE':_0x4216db(0x2f8),'INDEX_DROP':_0x4216db(0x1af),'INDEX_REGISTER':_0x4216db(0x356),'INDEX_RESET':_0x4216db(0x489),'TYPE_REGISTER':_0x4216db(0x295),'TYPE_DROP':_0x4216db(0x32b),'FTS_REGISTER':_0x4216db(0x335),'FTS_DROP':'dropFts','FTS_RESET':_0x4216db(0x313),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x4216db(0x20f),'TTL_SET':_0x4216db(0x3e7),'TTL_CLEAR':_0x4216db(0x1f7)},_0x5e47fc={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x4216db(0x474),'SYSTEM_CLOCK_CHANGE':_0x4216db(0x41a),'SYSTEM_POKE':_0x4216db(0x43d),'SYSTEM_DRAIN':_0x4216db(0x21d),'SYSTEM_BUS_STATE_CHANGE':_0x4216db(0x391),'ITEM_CREATE':_0x4216db(0x2fe),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x4216db(0x3fa),'INDEX_RESET':_0x4216db(0x2d4),'INDEX_READY':_0x4216db(0x204),'INDEX_PROGRESS':_0x4216db(0x1b1),'VIEW_PROGRESS':_0x4216db(0x2e4),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x4216db(0x46b),'FTS_REGISTERED':_0x4216db(0x28b),'FTS_DROP':_0x4216db(0x248),'FTS_RESET':_0x4216db(0x494),'SCHEMA_SET':_0x4216db(0x423),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x4216db(0x3ef),'UNIQUE_VIOLATION_RESOLVED':_0x4216db(0x3c6),'REF_VIOLATION':_0x4216db(0x319),'REF_VIOLATION_RESOLVED':_0x4216db(0x1e7),'SYNC_APPLY':'sync:apply','TXN_START':_0x4216db(0x444),'TXN_END':_0x4216db(0x382),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x4216db(0x22a),'TYPE_DROP':_0x4216db(0x269),'ENV_OPENED':_0x4216db(0x2ae),'ENV_REMOVED':_0x4216db(0x232),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x4216db(0x44c),'TTL_CLEAR':_0x4216db(0x422),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x4216db(0x1a3),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x4216db(0x358)},_0xa67d04={'CREATING':_0x4216db(0x312),'RESETTING':_0x4216db(0x42a),'READY':_0x4216db(0x1b9),'DROPPING':_0x4216db(0x2c7),'WAITING':'waiting'},_0x20c039={'CREATED':_0x4216db(0x418),'STARTING':_0x4216db(0x20c),'STARTED':_0x4216db(0x2da),'STOPPING':_0x4216db(0x2b9),'STOPPED':_0x4216db(0x33b)},_0x4cf35d={'CREATING':_0x4216db(0x312),'READY':_0x4216db(0x1b9),'HALTED':_0x4216db(0x2b3),'STOPPED':_0x4216db(0x33b),'RESETTING':_0x4216db(0x42a)},_0x3488da=Object[_0x4216db(0x252)]({'POKE':'bus:poke','DRAIN':_0x4216db(0x354)});return okdbEnums={'BUS_EVENTS':_0x3488da,'CHANGE_ACTIONS':_0x596f4d,'EVENTS':_0x5e47fc,'INDEX_STATE':_0xa67d04,'OKDB_STATE':_0x20c039,'VIEW_STATE':_0x4cf35d},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x46b43=_0x27fb86;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x4ec4d2=require$$1,_0x10a21a=require$$1$1,_0x3ad87e=require$$0,_0x374dde=_0x4ec4d2[_0x46b43(0x205)](_0x10a21a[_0x46b43(0x3d5)](__dirname,_0x46b43(0x48e)),'utf8')['trim'](),_0x86c48=_0x3ad87e[_0x46b43(0x346)](_0x374dde)[_0x46b43(0x4a3)]({'type':_0x46b43(0x2b7),'format':_0x46b43(0x277)}),_0x49875a=_0x3ad87e[_0x46b43(0x256)]('sha256')['update'](_0x86c48)[_0x46b43(0x342)](_0x46b43(0x28a))['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x374dde,'PUB_FINGERPRINT':_0x49875a},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function _0x5271(_0x37ca92,_0x286581){_0x37ca92=_0x37ca92-0x194;const _0x5d2bd9=_0x5d2b();let _0x5271f8=_0x5d2bd9[_0x37ca92];return _0x5271f8;}function requireOkdbLicense(){const _0x5ae284=_0x27fb86;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x41c72f=require$$0,{OKDBError:_0x3b364b}=requireOkdbError(),{EVENTS:_0x367df5}=requireOkdbEnums(),_0x1acc9b=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x568fd0,LICENSE_TYPE_INTERNAL:_0x1d3470,OPEN_LICENSE_MAX_DURATION_MS:_0x707426}=_0x1acc9b,_0x2d17e8=requireOkdbPubkey(),_0x30f1ca={'LICENSED_BUILD':_0x5ae284(0x288),'PUBLIC_KEY_PEM':_0x2d17e8['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x2d17e8[_0x5ae284(0x48c)],'LICENSE_EXPIRED_ACTION':_0x5ae284(0x1de)},_0xdaf3cd=_0x5ae284(0x1c2),_0x4d1aa1={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x4a10d8(_0x65e7ac){const _0x25681e=_0x5ae284;!_0x65e7ac[_0x25681e(0x1d5)](_0xdaf3cd)&&await _0x65e7ac[_0x25681e(0x295)](_0xdaf3cd);}class _0x3f9863{constructor(_0x56076e){const _0x48af7c=_0x5ae284;this[_0x48af7c(0x417)]=_0x56076e,this[_0x48af7c(0x29d)]=null;}async[_0x5ae284(0x317)](){const _0x1bd9d5=_0x5ae284,_0x53b3ff=this[_0x1bd9d5(0x417)][_0x1bd9d5(0x35f)];if(!_0x53b3ff||!_0x53b3ff['hasType'](_0xdaf3cd)){this['_active']=null;return;}const _0x439260=this[_0x1bd9d5(0x417)]['id'];let _0x3f4d59=null;for(const {key:_0x19d59c,value:_0x50d522}of _0x53b3ff[_0x1bd9d5(0x1bd)](_0xdaf3cd)){const _0x954ec2=this[_0x1bd9d5(0x37b)](_0x50d522,_0x439260);_0x954ec2==='active'&&!_0x3f4d59&&(_0x3f4d59={..._0x50d522,'id':_0x19d59c,'status':_0x954ec2});}this[_0x1bd9d5(0x29d)]=_0x3f4d59;if(this[_0x1bd9d5(0x29d)]&&this[_0x1bd9d5(0x29d)][_0x1bd9d5(0x47d)]===_0x568fd0){const _0x4625b5=Math[_0x1bd9d5(0x3b9)]((this['_active']['expiresAt']-Date[_0x1bd9d5(0x2f5)]())/0x5265c00);this[_0x1bd9d5(0x417)][_0x1bd9d5(0x1de)]?.[_0x1bd9d5(0x195)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x4625b5+'\x20day(s).',{'feature':'license','licensee':this[_0x1bd9d5(0x29d)][_0x1bd9d5(0x35d)],'expiresAt':new Date(this['_active'][_0x1bd9d5(0x3a0)])[_0x1bd9d5(0x2a3)]()});}this[_0x1bd9d5(0x29d)]&&this[_0x1bd9d5(0x29d)][_0x1bd9d5(0x47d)]===_0x1d3470&&this['okdb']['log']?.['warn'](_0x1bd9d5(0x1fc),{'feature':'license','licensee':this['_active'][_0x1bd9d5(0x35d)]});}[_0x5ae284(0x37b)](_0x4abfc0,_0x356c42){const _0x478096=_0x5ae284;if(!_0x4abfc0[_0x478096(0x366)])return _0x478096(0x3e6);let _0x1b035a;try{_0x1b035a=_0x1acc9b[_0x478096(0x498)](_0x4abfc0[_0x478096(0x366)]);}catch(_0x17f4ef){return _0x478096(0x3e6);}try{const _0x2c5b69=_0x41c72f[_0x478096(0x28e)](null,_0x1b035a[_0x478096(0x414)],_0x30f1ca[_0x478096(0x27f)],_0x1b035a[_0x478096(0x289)]);if(!_0x2c5b69)return _0x478096(0x3e6);}catch(_0x5c8980){return _0x478096(0x3e6);}if(_0x1b035a['decoded'][_0x478096(0x47d)]===_0x1d3470)return'active';if(_0x1b035a['decoded'][_0x478096(0x3a0)]<=Date[_0x478096(0x2f5)]())return'expired';if(_0x1b035a[_0x478096(0x1fd)][_0x478096(0x47d)]===_0x568fd0)return _0x478096(0x46d);if(!_0x4abfc0[_0x478096(0x29e)])return _0x478096(0x3f4);const _0x26609d=_0x1acc9b[_0x478096(0x48f)]({'tokenString':_0x4abfc0[_0x478096(0x29e)],'nodeId':_0x356c42,'rawBlobBuf':_0x1b035a['rawBuf'],'pubKeyPem':_0x30f1ca[_0x478096(0x27f)],'pubFingerprint':_0x30f1ca[_0x478096(0x48c)]});if(_0x26609d[_0x478096(0x440)]==='LICENSE_HASH_MISMATCH'||_0x26609d[_0x478096(0x440)]==='SIG_INVALID')return'wrong_node';if(_0x26609d[_0x478096(0x440)]===_0x478096(0x439))return _0x478096(0x293);if(!_0x26609d[_0x478096(0x2bd)])return _0x478096(0x466);return _0x478096(0x46d);}get[_0x5ae284(0x46d)](){return this['_active'];}get['effective'](){return this['_active']??_0x4d1aa1;}[_0x5ae284(0x2a1)](_0x348d4c){const _0x1cb376=_0x5ae284;if(_0x30f1ca['LICENSED_BUILD']!=='true')return;const _0x3c48a4=this['effective'];if(!_0x3c48a4[_0x1cb376(0x1d7)]?.[_0x348d4c]){const _0x163680=_0x3c48a4[_0x1cb376(0x36a)]?_0x1cb376(0x465)+_0x348d4c+_0x1cb376(0x38a)+_0x348d4c+_0x1cb376(0x392):_0x1cb376(0x276)+_0x348d4c+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x348d4c+'\x22.';throw new _0x3b364b(_0x163680,_0x1cb376(0x2e9),{'feature':_0x348d4c});}}[_0x5ae284(0x28d)](_0xb0e886){const _0x5556c5=_0x5ae284;if(_0x30f1ca[_0x5556c5(0x2e8)]!==_0x5556c5(0x288))return!![];return!!this[_0x5556c5(0x19d)][_0x5556c5(0x1d7)]?.[_0xb0e886];}[_0x5ae284(0x1c3)](_0x3b9ac1,_0x5de231){const _0x4490a8=_0x5ae284;if(_0x30f1ca[_0x4490a8(0x2e8)]!==_0x4490a8(0x288))return;const _0xbdc9f=this[_0x4490a8(0x19d)],_0x113546=_0xbdc9f[_0x4490a8(0x2fd)]?.[_0x3b9ac1];if(_0x113546===null||_0x113546===undefined||_0x113546===0x0)return;if(_0x5de231>=_0x113546)throw new _0x3b364b(_0x4490a8(0x45a)+_0x3b9ac1+'\x20('+_0x5de231+'/'+_0x113546+')',_0x4490a8(0x208),{'limit':_0x3b9ac1,'current':_0x5de231,'max':_0x113546});}async['addLicense'](_0x34ac32){const _0x512d39=_0x5ae284;let _0x2cd677;try{_0x2cd677=_0x1acc9b[_0x512d39(0x498)](_0x34ac32);}catch(_0x5c37de){throw new _0x3b364b('Invalid\x20license\x20blob:\x20'+_0x5c37de[_0x512d39(0x1f3)],_0x512d39(0x27b));}let _0x2d1d72;try{_0x2d1d72=_0x41c72f[_0x512d39(0x28e)](null,_0x2cd677[_0x512d39(0x414)],_0x30f1ca[_0x512d39(0x27f)],_0x2cd677['sig']);}catch(_0x1371dd){throw new _0x3b364b('License\x20signature\x20invalid:\x20'+_0x1371dd[_0x512d39(0x1f3)],'LICENSE_INVALID');}if(!_0x2d1d72)throw new _0x3b364b(_0x512d39(0x287)+(_0x512d39(0x3db)+_0x30f1ca[_0x512d39(0x48c)]+'.\x20')+_0x512d39(0x1e3),_0x512d39(0x27b),{'expectedFingerprint':_0x30f1ca[_0x512d39(0x48c)]});if(_0x2cd677['decoded']['licenseType']===_0x568fd0){const _0x74d15a=_0x2cd677[_0x512d39(0x1fd)][_0x512d39(0x3a0)]-_0x2cd677[_0x512d39(0x1fd)][_0x512d39(0x20d)];if(_0x74d15a>_0x707426)throw new _0x3b364b(_0x512d39(0x39a)+Math[_0x512d39(0x3b9)](_0x74d15a/(0x1e*0x5265c00))+_0x512d39(0x2df),_0x512d39(0x27b));}const _0x5bc46a=this[_0x512d39(0x417)][_0x512d39(0x35f)];await _0x4a10d8(_0x5bc46a);const _0x3c3028=_0x1acc9b[_0x512d39(0x336)](_0x2cd677[_0x512d39(0x309)])[_0x512d39(0x459)](_0x512d39(0x28a));for(const {value:_0x5af357}of _0x5bc46a['getRange'](_0xdaf3cd)){if(_0x5af357[_0x512d39(0x428)]===_0x3c3028)throw new _0x3b364b(_0x512d39(0x1f5),_0x512d39(0x27b));}const _0x117065=_0x41c72f[_0x512d39(0x3f7)](),_0x3136bc={'blob':_0x34ac32,'activation':null,'addedAt':Date[_0x512d39(0x2f5)](),'_licenseHash':_0x3c3028,'licensee':_0x2cd677[_0x512d39(0x1fd)][_0x512d39(0x35d)],'expiresAt':_0x2cd677['decoded'][_0x512d39(0x3a0)],'features':_0x2cd677[_0x512d39(0x1fd)]['features'],'limits':_0x2cd677[_0x512d39(0x1fd)][_0x512d39(0x2fd)],'licenseType':_0x2cd677['decoded']['licenseType']};return await _0x5bc46a[_0x512d39(0x230)](_0xdaf3cd,_0x117065,_0x3136bc),{'id':_0x117065,..._0x3136bc};}async[_0x5ae284(0x24f)](_0xe0bc51){const _0x2724be=_0x5ae284;let _0x22120c;try{_0x22120c=_0x1acc9b[_0x2724be(0x1fa)](_0xe0bc51);}catch(_0x48c800){throw new _0x3b364b(_0x2724be(0x481)+_0x48c800[_0x2724be(0x1f3)],'LICENSE_ACTIVATION_INVALID');}const _0x4ac75d=_0x22120c[_0x2724be(0x336)][_0x2724be(0x459)](_0x2724be(0x28a)),_0x161d31=this[_0x2724be(0x417)][_0x2724be(0x35f)];if(!_0x161d31||!_0x161d31[_0x2724be(0x1d5)](_0xdaf3cd))throw new _0x3b364b(_0x2724be(0x194),'LICENSE_ACTIVATION_INVALID');let _0xe064d1=null,_0x5635bf=null;for(const {key:_0x35f2d9,value:_0x3d1ed1}of _0x161d31['getRange'](_0xdaf3cd)){if(_0x3d1ed1[_0x2724be(0x428)]===_0x4ac75d){_0xe064d1=_0x35f2d9,_0x5635bf=_0x3d1ed1;break;}}if(!_0xe064d1)throw new _0x3b364b(_0x2724be(0x194),_0x2724be(0x38f));const {rawBuf:_0x2ba154}=_0x1acc9b[_0x2724be(0x498)](_0x5635bf['blob']),_0x1b8ad3=_0x1acc9b[_0x2724be(0x48f)]({'tokenString':_0xe0bc51,'nodeId':this[_0x2724be(0x417)]['id'],'rawBlobBuf':_0x2ba154,'pubKeyPem':_0x30f1ca[_0x2724be(0x27f)],'pubFingerprint':_0x30f1ca[_0x2724be(0x48c)]});if(!_0x1b8ad3['valid'])throw new _0x3b364b(_0x2724be(0x2b0)+_0x1b8ad3[_0x2724be(0x440)],'LICENSE_ACTIVATION_INVALID',{'reason':_0x1b8ad3[_0x2724be(0x440)]});const _0x561c8c={..._0x5635bf,'activation':_0xe0bc51};return await _0x161d31[_0x2724be(0x2ab)](_0xdaf3cd,_0xe064d1,_0x561c8c),{'id':_0xe064d1,..._0x561c8c};}async[_0x5ae284(0x376)](_0x989909){const _0x511335=_0x5ae284,_0x5aa8d9=this['okdb'][_0x511335(0x35f)];if(!_0x5aa8d9||!_0x5aa8d9[_0x511335(0x1d5)](_0xdaf3cd))return;await _0x5aa8d9[_0x511335(0x2f8)](_0xdaf3cd,_0x989909);}async[_0x5ae284(0x233)](){const _0x563581=_0x5ae284,_0x29592c=this['okdb'][_0x563581(0x35f)];if(!_0x29592c||!_0x29592c['hasType'](_0xdaf3cd))return[];const _0x364cfb=this[_0x563581(0x417)]['id'],_0x2e7525=[];for(const {key:_0x5ab3e4,value:_0x3eb47f}of _0x29592c['getRange'](_0xdaf3cd)){const _0x422a1c=this['_computeStatus'](_0x3eb47f,_0x364cfb);_0x2e7525[_0x563581(0x290)]({..._0x3eb47f,'id':_0x5ab3e4,'status':_0x422a1c});}return _0x2e7525;}[_0x5ae284(0x294)](){const _0x3b56ef=_0x5ae284,_0x5dea6b=this[_0x3b56ef(0x417)][_0x3b56ef(0x35f)];if(!_0x5dea6b||!_0x5dea6b[_0x3b56ef(0x1d5)](_0xdaf3cd))return[];const _0x472ea0=this[_0x3b56ef(0x417)]['id'],_0x4da23f=[];for(const {key:_0x2469b3,value:_0x65e973}of _0x5dea6b[_0x3b56ef(0x1bd)](_0xdaf3cd)){if(_0x65e973[_0x3b56ef(0x428)]){if(_0x65e973[_0x3b56ef(0x47d)]===_0x568fd0)_0x4da23f[_0x3b56ef(0x290)]({'licenseId':_0x2469b3,'pin':null});else{const _0x13ab65=Buffer[_0x3b56ef(0x283)](_0x65e973['_licenseHash'],_0x3b56ef(0x28a)),{pin:_0x266a86}=_0x1acc9b[_0x3b56ef(0x201)](_0x472ea0,_0x13ab65,_0x30f1ca[_0x3b56ef(0x48c)]);_0x4da23f[_0x3b56ef(0x290)]({'licenseId':_0x2469b3,'pin':_0x266a86});}}}return _0x4da23f;}async['recheck'](){const _0xa58ea7=_0x5ae284,_0x12aec8=this[_0xa58ea7(0x29d)];await this[_0xa58ea7(0x317)]();if(this[_0xa58ea7(0x29d)]&&this[_0xa58ea7(0x29d)][_0xa58ea7(0x47d)]===_0x568fd0){const _0x58e96c=Math[_0xa58ea7(0x3b9)]((this[_0xa58ea7(0x29d)][_0xa58ea7(0x3a0)]-Date[_0xa58ea7(0x2f5)]())/0x5265c00);this[_0xa58ea7(0x417)]['log']?.['warn']('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x58e96c+_0xa58ea7(0x485),{'feature':'license','licensee':this[_0xa58ea7(0x29d)][_0xa58ea7(0x35d)],'expiresAt':new Date(this[_0xa58ea7(0x29d)]['expiresAt'])[_0xa58ea7(0x2a3)]()});}this['_active']&&this[_0xa58ea7(0x29d)][_0xa58ea7(0x47d)]===_0x1d3470&&this[_0xa58ea7(0x417)][_0xa58ea7(0x1de)]?.[_0xa58ea7(0x195)](_0xa58ea7(0x1fc),{'feature':_0xa58ea7(0x2e7),'licensee':this[_0xa58ea7(0x29d)][_0xa58ea7(0x35d)]});if(_0x12aec8&&!this[_0xa58ea7(0x29d)]){this[_0xa58ea7(0x417)][_0xa58ea7(0x1de)]?.[_0xa58ea7(0x195)](_0xa58ea7(0x23f),{'feature':_0xa58ea7(0x2e7)}),this[_0xa58ea7(0x417)][_0xa58ea7(0x464)]?.[_0xa58ea7(0x27a)](_0x367df5['LICENSE_INVALID'],{'previous':_0x12aec8});const _0x190524=this['okdb'][_0xa58ea7(0x37d)]?.[_0xa58ea7(0x253)]??_0x30f1ca[_0xa58ea7(0x4a4)];_0x190524==='shutdown'&&(this[_0xa58ea7(0x417)][_0xa58ea7(0x1de)]?.[_0xa58ea7(0x49c)](_0xa58ea7(0x351),{'feature':_0xa58ea7(0x2e7)}),this[_0xa58ea7(0x417)][_0xa58ea7(0x2d2)]()[_0xa58ea7(0x2f6)](()=>{})[_0xa58ea7(0x1e9)](()=>process['exit'](0x1)));}}}return okdbLicense={'LicenseChecker':_0x3f9863,'_C':_0x30f1ca},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x4aed9e=_0x27fb86;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0xcb6bba=require$$0$2,_0x51aced=require$$1,_0x82572=require$$2$1,_0x3043e7=require$$1$1,_0x4fb660=_0x3043e7['join'](_0x82572[_0x4aed9e(0x2ad)](),'.kdb_history'),_0x1566cf=0x3e8,_0x4c3062={'reset':'\x1b[0m','bold':_0x4aed9e(0x472),'dim':'\x1b[2m','red':_0x4aed9e(0x2ce),'green':_0x4aed9e(0x436),'yellow':_0x4aed9e(0x378),'blue':_0x4aed9e(0x200),'magenta':_0x4aed9e(0x3fe),'cyan':_0x4aed9e(0x3df),'white':_0x4aed9e(0x39f),'gray':_0x4aed9e(0x2f0)},_0xba8001=!process[_0x4aed9e(0x48b)][_0x4aed9e(0x1ba)]||!!process.env.NO_COLOR,_0x5cf930=(_0x1c0c64,_0x21baec)=>_0xba8001?_0x21baec:''+_0x1c0c64+_0x21baec+_0x4c3062['reset'],_0x55a6bf={'error':_0x4c3062[_0x4aed9e(0x3d7)],'warn':_0x4c3062['yellow'],'info':_0x4c3062[_0x4aed9e(0x26d)],'debug':_0x4c3062['gray']},_0x1e170e={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x10fcd2(_0x12eef1,_0x4c2f33='info'){const _0x22c35f=_0x4aed9e,{level:_0x2ce0ee,msg:_0x493070,meta:_0x258035,context:_0x19bfdb,ts:_0x51aa00}=_0x12eef1;if((_0x1e170e[_0x2ce0ee]??0x1)<(_0x1e170e[_0x4c2f33]??0x1))return;const _0x163252=_0x5cf930(_0x4c3062[_0x22c35f(0x42b)],new Date(_0x51aa00)[_0x22c35f(0x2a3)]()),_0x45670b=_0x5cf930(_0x55a6bf[_0x2ce0ee]??_0x4c3062['white'],_0x2ce0ee[_0x22c35f(0x46f)](0x5));let _0x1aaf11='\x20\x20'+_0x163252+'\x20'+_0x5cf930(_0x4c3062[_0x22c35f(0x37e)],_0x45670b)+'\x20'+_0x493070;if(_0x258035&&Object[_0x22c35f(0x369)](_0x258035)[_0x22c35f(0x424)]>0x0){const _0xa5160b=Object[_0x22c35f(0x2c0)](_0x258035)[_0x22c35f(0x29c)](([_0x33e09a,_0x547286])=>_0x33e09a+'='+_0x547286)[_0x22c35f(0x3d5)]('\x20');_0x1aaf11+=_0x5cf930(_0x4c3062['dim'],'\x20\x20['+_0xa5160b+']');}if(_0x19bfdb!==undefined){const _0x28ed71=typeof _0x19bfdb==='object'?JSON[_0x22c35f(0x292)](_0x19bfdb):String(_0x19bfdb);_0x1aaf11+=_0x5cf930(_0x4c3062[_0x22c35f(0x491)],'\x20\x20'+_0x28ed71);}const _0x141256=_0x2ce0ee===_0x22c35f(0x49c)||_0x2ce0ee===_0x22c35f(0x195)?process['stderr']['write'][_0x22c35f(0x449)](process[_0x22c35f(0x41f)]):process['stdout'][_0x22c35f(0x325)][_0x22c35f(0x449)](process[_0x22c35f(0x48b)]);_0x141256(_0x1aaf11+'\x0a');}function _0x592b5c(_0x3741a9,_0x108074){const _0x12722d=_0x4aed9e;if(_0x3741a9===0xcc||_0x3741a9>=0xc8&&_0x3741a9<0x12c&&!_0x108074){console[_0x12722d(0x1de)]('\x0a\x20\x20'+_0x5cf930(_0x4c3062[_0x12722d(0x48d)],'✓')+'\x0a');return;}if(_0x3741a9>=0x190||_0x108074?.['error']){const _0xeaa602=_0x108074?.[_0x12722d(0x49c)]??_0x108074?.[_0x12722d(0x1f3)]??'HTTP\x20'+_0x3741a9;console[_0x12722d(0x1de)](_0x12722d(0x25f)+_0x5cf930(_0x4c3062[_0x12722d(0x3d7)],'✗')+'\x20'+_0x5cf930(_0x4c3062[_0x12722d(0x37e)]+_0x4c3062[_0x12722d(0x3d7)],String(_0x3741a9))+'\x20\x20'+_0xeaa602+'\x0a');return;}const _0x187bd9=Object[_0x12722d(0x2f9)][_0x12722d(0x1f2)]['call'](_0x108074??{},_0x12722d(0x2c8))?_0x108074[_0x12722d(0x2c8)]:_0x108074,_0x28b002=_0x108074?.[_0x12722d(0x34d)];console[_0x12722d(0x1de)](''),_0x1036ee(_0x187bd9,'\x20\x20');if(_0x28b002?.[_0x12722d(0x372)]!=null||_0x28b002?.[_0x12722d(0x1ea)]!=null){const _0x386d86=[];if(_0x28b002[_0x12722d(0x372)]!=null)_0x386d86['push'](_0x28b002['count']+'\x20result'+(_0x28b002[_0x12722d(0x372)]!==0x1?'s':''));if(_0x28b002[_0x12722d(0x1ea)]!=null)_0x386d86[_0x12722d(0x290)](_0x28b002[_0x12722d(0x1ea)]+'ms');console[_0x12722d(0x1de)](_0x12722d(0x25f)+_0x5cf930(_0x4c3062[_0x12722d(0x491)],_0x386d86[_0x12722d(0x3d5)](_0x12722d(0x2ca))));}console[_0x12722d(0x1de)]('');}function _0x1036ee(_0x153e05,_0x2d99e3=''){const _0x19f527=_0x4aed9e;if(_0x153e05===null||_0x153e05===undefined){console[_0x19f527(0x1de)](_0x2d99e3+_0x5cf930(_0x4c3062[_0x19f527(0x491)],'(null)'));return;}if(Array[_0x19f527(0x3fd)](_0x153e05)){if(_0x153e05[_0x19f527(0x424)]===0x0){console[_0x19f527(0x1de)](_0x2d99e3+_0x5cf930(_0x4c3062[_0x19f527(0x491)],_0x19f527(0x2fa)));return;}if(_0x153e05[_0x19f527(0x39e)](_0x4a4fc2=>_0x4a4fc2&&typeof _0x4a4fc2===_0x19f527(0x40e)&&_0x19f527(0x1cd)in _0x4a4fc2&&'value'in _0x4a4fc2)){_0x254e83(_0x153e05,_0x2d99e3);return;}if(_0x153e05[_0x19f527(0x39e)](_0x36d0d0=>_0x36d0d0&&typeof _0x36d0d0===_0x19f527(0x40e)&&_0x19f527(0x31c)in _0x36d0d0&&_0x19f527(0x372)in _0x36d0d0)){_0x237bd3(_0x153e05,_0x2d99e3);return;}if(_0x153e05[_0x19f527(0x39e)](_0x5ba22e=>typeof _0x5ba22e!==_0x19f527(0x40e)||_0x5ba22e===null)){_0x153e05['forEach']((_0x45dbe1,_0x3c171e)=>console[_0x19f527(0x1de)](_0x2d99e3+_0x5cf930(_0x4c3062['gray'],_0x3c171e+0x1+'.')+'\x20'+_0x5cf930(_0x4c3062['white'],String(_0x45dbe1))));return;}_0x153e05['forEach']((_0x4b7740,_0x386b08)=>{const _0x41efbe=_0x19f527;console[_0x41efbe(0x1de)](_0x2d99e3+_0x5cf930(_0x4c3062[_0x41efbe(0x491)],'['+_0x386b08+']'));if(typeof _0x4b7740===_0x41efbe(0x40e)&&_0x4b7740!==null)_0x3de09a(_0x4b7740,_0x2d99e3+'\x20\x20');else console[_0x41efbe(0x1de)](_0x2d99e3+'\x20\x20'+String(_0x4b7740));});return;}if(typeof _0x153e05==='object'){if(_0x19f527(0x1cd)in _0x153e05&&_0x19f527(0x32e)in _0x153e05&&Object[_0x19f527(0x369)](_0x153e05)[_0x19f527(0x424)]<=0x3){console[_0x19f527(0x1de)](_0x2d99e3+_0x5cf930(_0x4c3062[_0x19f527(0x37e)]+_0x4c3062[_0x19f527(0x26d)],String(_0x153e05[_0x19f527(0x1cd)])));const _0x242a08=_0x153e05[_0x19f527(0x32e)];if(_0x242a08&&typeof _0x242a08===_0x19f527(0x40e))_0x3de09a(_0x242a08,_0x2d99e3);else console[_0x19f527(0x1de)](_0x2d99e3+_0x5cf930(_0x4c3062['white'],String(_0x242a08)));return;}_0x3de09a(_0x153e05,_0x2d99e3);return;}console[_0x19f527(0x1de)](_0x2d99e3+_0x5cf930(_0x4c3062[_0x19f527(0x316)],String(_0x153e05)));}function _0x3de09a(_0xf353eb,_0x470cdb=''){const _0x5f0063=_0x4aed9e,_0x331cf6=Object[_0x5f0063(0x2c0)](_0xf353eb);if(_0x331cf6['length']===0x0){console[_0x5f0063(0x1de)](_0x470cdb+_0x5cf930(_0x4c3062[_0x5f0063(0x491)],'{}'));return;}const _0x35fffa=Math[_0x5f0063(0x1a8)](0x1c,Math[_0x5f0063(0x34b)](..._0x331cf6[_0x5f0063(0x29c)](([_0x2de945])=>_0x2de945[_0x5f0063(0x424)])));for(const [_0x1cb3b3,_0x33c631]of _0x331cf6){const _0x367351=_0x5cf930(_0x4c3062[_0x5f0063(0x26d)],_0x1cb3b3[_0x5f0063(0x46f)](_0x35fffa));if(_0x33c631===null||_0x33c631===undefined)console[_0x5f0063(0x1de)](_0x470cdb+_0x367351+'\x20\x20'+_0x5cf930(_0x4c3062['dim'],_0x5f0063(0x2ef)));else{if(typeof _0x33c631==='object'){const _0xe01f43=JSON['stringify'](_0x33c631);_0xe01f43[_0x5f0063(0x424)]<=0x50?console[_0x5f0063(0x1de)](_0x470cdb+_0x367351+'\x20\x20'+_0x5cf930(_0x4c3062[_0x5f0063(0x491)],_0xe01f43)):(console['log'](_0x470cdb+_0x367351),_0x1036ee(_0x33c631,_0x470cdb+'\x20\x20'));}else{const _0x594557=typeof _0x33c631===_0x5f0063(0x31d)?_0x5cf930(_0x33c631?_0x4c3062[_0x5f0063(0x48d)]:_0x4c3062[_0x5f0063(0x432)],String(_0x33c631)):typeof _0x33c631===_0x5f0063(0x31b)?_0x5cf930(_0x4c3062[_0x5f0063(0x430)],String(_0x33c631)):_0x5cf930(_0x4c3062[_0x5f0063(0x316)],String(_0x33c631));console[_0x5f0063(0x1de)](_0x470cdb+_0x367351+'\x20\x20'+_0x594557);}}}}function _0x254e83(_0x4cd3d7,_0x539ced=''){const _0x3da44b=_0x4aed9e,_0x1be8f1=Math[_0x3da44b(0x1a8)](0x20,Math[_0x3da44b(0x34b)](..._0x4cd3d7[_0x3da44b(0x29c)](_0x2efe62=>String(_0x2efe62[_0x3da44b(0x1cd)])['length'])));for(const {key:_0x1143cc,value:_0x2573d5,score:_0x5e7645,clock:_0x2c4a82}of _0x4cd3d7){const _0x44401a=_0x5cf930(_0x4c3062[_0x3da44b(0x37e)]+_0x4c3062[_0x3da44b(0x26d)],String(_0x1143cc)[_0x3da44b(0x46f)](_0x1be8f1)),_0x29fc35=_0x2573d5==null?_0x5cf930(_0x4c3062['dim'],_0x3da44b(0x2ef)):typeof _0x2573d5==='object'?_0x5cf930(_0x4c3062[_0x3da44b(0x491)],JSON['stringify'](_0x2573d5)):_0x5cf930(_0x4c3062['white'],String(_0x2573d5)),_0x34263b=_0x5e7645!=null?_0x5cf930(_0x4c3062['gray'],_0x3da44b(0x308)+_0x5e7645[_0x3da44b(0x416)](0x4)):'',_0x13dc51=_0x2c4a82!=null?_0x5cf930(_0x4c3062['gray'],_0x3da44b(0x37c)+_0x2c4a82):'';console['log'](_0x539ced+_0x44401a+'\x20\x20'+_0x29fc35+_0x34263b+_0x13dc51);}}function _0x237bd3(_0x11e5be,_0x258ff9=''){const _0x2e555e=_0x4aed9e,_0x54adfc=Math[_0x2e555e(0x1a8)](0x20,Math['max'](..._0x11e5be[_0x2e555e(0x29c)](_0x370393=>_0x370393['type'][_0x2e555e(0x424)])));for(const {type:_0x831cd3,count:_0x41e9f6,fields:_0x430f1c}of _0x11e5be){if(_0x831cd3['startsWith']('~'))continue;const _0x8af885=_0x5cf930(_0x4c3062[_0x2e555e(0x37e)]+_0x4c3062[_0x2e555e(0x26d)],_0x831cd3[_0x2e555e(0x46f)](_0x54adfc)),_0x200d6c=_0x5cf930(_0x4c3062[_0x2e555e(0x430)],String(_0x41e9f6)[_0x2e555e(0x2fb)](0x6))+_0x5cf930(_0x4c3062[_0x2e555e(0x491)],_0x2e555e(0x221)),_0x598aef=_0x430f1c&&Object[_0x2e555e(0x369)](_0x430f1c)[_0x2e555e(0x424)]?_0x5cf930(_0x4c3062[_0x2e555e(0x491)],_0x2e555e(0x2a0)+Object[_0x2e555e(0x369)](_0x430f1c)[_0x2e555e(0x48a)](0x0,0x6)[_0x2e555e(0x3d5)](',\x20')+(Object['keys'](_0x430f1c)[_0x2e555e(0x424)]>0x6?'…':'')):'';console[_0x2e555e(0x1de)](_0x258ff9+_0x8af885+'\x20\x20'+_0x200d6c+_0x598aef);}}const _0xe31c36=[_0x4aed9e(0x332),_0x4aed9e(0x272),'queue/',_0x4aed9e(0x19c),'transaction',_0x4aed9e(0x1fb)];function _0x5be183(_0x4ab623,_0x35c642){const _0x4d1a01=_0x4aed9e;if(_0x4ab623['startsWith'](_0x4d1a01(0x3f1)))return _0x4ab623;if(_0x4ab623['startsWith']('/'))return _0x4d1a01(0x258)+_0x4ab623;if(_0x4ab623['startsWith']('env/'))return _0x4d1a01(0x3f1)+_0x4ab623;const _0x3b7895=_0xe31c36[_0x4d1a01(0x1a1)](_0xf84e47=>_0x4ab623===_0xf84e47[_0x4d1a01(0x478)](/\/$/,'')||_0x4ab623[_0x4d1a01(0x47b)](_0xf84e47));return _0x3b7895?_0x4d1a01(0x24b)+_0x35c642+'/'+_0x4ab623:_0x4d1a01(0x3f1)+_0x4ab623;}function _0x161e09(_0xebe349){const _0x3997a8=_0x4aed9e,_0x311705={},_0x45312e=[];let _0x4f059e=0x0;while(_0x4f059e<_0xebe349[_0x3997a8(0x424)]){if((_0xebe349[_0x4f059e]==='--env'||_0xebe349[_0x4f059e]==='-e')&&_0xebe349[_0x4f059e+0x1]&&!_0xebe349[_0x4f059e+0x1][_0x3997a8(0x47b)]('-'))_0x311705[_0x3997a8(0x45b)]=_0xebe349[++_0x4f059e];else _0xebe349[_0x4f059e]==='--help'||_0xebe349[_0x4f059e]==='-h'?_0x311705['help']=!![]:_0x45312e[_0x3997a8(0x290)](_0xebe349[_0x4f059e]);_0x4f059e++;}return{'flags':_0x311705,'rest':_0x45312e};}const _0x4d640a={'system':_0x4aed9e(0x43c),'envs':_0x4aed9e(0x196),'types':_0x4aed9e(0x373),'data':_0x4aed9e(0x375),'indexes':_0x4aed9e(0x443),'fts':_0x4aed9e(0x397),'sync':'Sync','queue':_0x4aed9e(0x1a2),'files':'Files','embeddings':_0x4aed9e(0x36d),'engines':_0x4aed9e(0x2e1),'admin':_0x4aed9e(0x1dd),'event':'Events','processor':'Processors'},_0x2df7ba=[_0x4aed9e(0x33f),_0x4aed9e(0x1c7),'types',_0x4aed9e(0x451),'indexes',_0x4aed9e(0x40f),'sync',_0x4aed9e(0x1ae),'files',_0x4aed9e(0x447),'engines','admin'];function _0x54a64a(_0x2c3bed){const _0x5b877a=_0x4aed9e;return _0x2c3bed[_0x5b877a(0x478)](/^\/api/,'')[_0x5b877a(0x478)](/^\[\/env\/:env=[^\]]*\]/,'[env]')[_0x5b877a(0x478)](/^\/env\/:env/,'env/:env')[_0x5b877a(0x478)](/^\//,'');}function _0x3217fd(_0xd81031,_0x8888b3=''){const _0x4a1bc9=_0x4aed9e,_0x5cd4d6=_0xd81031[_0x4a1bc9(0x396)][_0x4a1bc9(0x407)]()[_0x4a1bc9(0x3ad)](_0x2c6583=>!_0x2c6583[_0x4a1bc9(0x34d)]?.[_0x4a1bc9(0x26c)]),_0x28bfdd=_0x8888b3?_0x5cd4d6[_0x4a1bc9(0x3ad)](_0xc6302c=>_0xc6302c['path']['toLowerCase']()[_0x4a1bc9(0x1bc)](_0x8888b3[_0x4a1bc9(0x3a9)]())||(_0x4ea688(_0xc6302c)??'')[_0x4a1bc9(0x3a9)]()[_0x4a1bc9(0x1bc)](_0x8888b3['toLowerCase']())||_0x489d7d(_0xc6302c)[_0x4a1bc9(0x1a1)](_0x266e8f=>_0x266e8f[_0x4a1bc9(0x3a9)]()['includes'](_0x8888b3[_0x4a1bc9(0x3a9)]()))):_0x5cd4d6;if(!_0x28bfdd[_0x4a1bc9(0x424)]){console[_0x4a1bc9(0x1de)](_0x5cf930(_0x4c3062[_0x4a1bc9(0x432)],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x8888b3+'\x22\x0a'));return;}const _0x484088=new Map();for(const _0x54e155 of _0x28bfdd){const _0x27a3eb=_0x489d7d(_0x54e155)[0x0]??_0x4a1bc9(0x327);if(!_0x484088[_0x4a1bc9(0x339)](_0x27a3eb))_0x484088[_0x4a1bc9(0x22c)](_0x27a3eb,[]);_0x484088[_0x4a1bc9(0x338)](_0x27a3eb)[_0x4a1bc9(0x290)](_0x54e155);}const _0x2f669e=[..._0x2df7ba['filter'](_0x15f0ff=>_0x484088['has'](_0x15f0ff)),...[..._0x484088[_0x4a1bc9(0x369)]()]['filter'](_0x42b476=>!_0x2df7ba[_0x4a1bc9(0x1bc)](_0x42b476))];console[_0x4a1bc9(0x1de)]('');for(const _0x34e1e8 of _0x2f669e){const _0x5890e4=_0x484088[_0x4a1bc9(0x338)](_0x34e1e8);if(!_0x5890e4?.[_0x4a1bc9(0x424)])continue;console['log'](_0x5cf930(_0x4c3062['bold'],'\x20\x20'+(_0x4d640a[_0x34e1e8]??_0x34e1e8)));for(const _0x15a3dc of _0x5890e4){const _0x4dbc45=_0x5cf930(_0x4c3062['magenta'],_0x15a3dc[_0x4a1bc9(0x1ec)]['padEnd'](0x7)),_0x4f48f8=_0x5cf930(_0x4c3062['cyan'],_0x54a64a(_0x15a3dc['path'])),_0x19fc29=_0x4ea688(_0x15a3dc)?_0x5cf930(_0x4c3062[_0x4a1bc9(0x491)],'\x20\x20'+_0x4ea688(_0x15a3dc)):'',_0x3a43b3=_0x15a3dc[_0x4a1bc9(0x402)]?.['id']?_0x5cf930(_0x4c3062[_0x4a1bc9(0x42b)],_0x4a1bc9(0x3ca)+_0x15a3dc[_0x4a1bc9(0x402)]['id']+']'):'';console[_0x4a1bc9(0x1de)](_0x4a1bc9(0x2e5)+_0x4dbc45+'\x20'+_0x4f48f8+_0x19fc29+_0x3a43b3);}console[_0x4a1bc9(0x1de)]('');}}function _0x1857af(_0x481880,_0x4ece96){const _0x4f7cc8=_0x4aed9e,_0xd1b1df=_0x4ece96[_0x4f7cc8(0x478)](/^\/api(\/env\/[^/]+)?\//,'')[_0x4f7cc8(0x27e)]('/')[0x0],_0x1e8b20=_0x481880['http'][_0x4f7cc8(0x407)]()[_0x4f7cc8(0x3ad)](_0x4e4a3b=>_0x4e4a3b[_0x4f7cc8(0x2cc)]['toLowerCase']()[_0x4f7cc8(0x1bc)](_0xd1b1df[_0x4f7cc8(0x3a9)]()));if(!_0x1e8b20[_0x4f7cc8(0x424)]){console[_0x4f7cc8(0x1de)](_0x5cf930(_0x4c3062[_0x4f7cc8(0x432)],_0x4f7cc8(0x3a2)+_0x4ece96+'\x0a'));return;}console['log']('');for(const _0x379257 of _0x1e8b20[_0x4f7cc8(0x48a)](0x0,0xc)){for(const _0x242f14 of _0x8a386d(_0x379257)){console['log'](_0x242f14);}console['log']('');}}function _0x4ea688(_0x4c8cdf){const _0x540e2c=_0x4aed9e;return _0x4c8cdf[_0x540e2c(0x402)]?.['summary']??_0x4c8cdf[_0x540e2c(0x34d)]?.['summary']??'';}function _0x1c3aa4(_0x5ae5b3){const _0x10e27e=_0x4aed9e;return _0x5ae5b3['operation']?.[_0x10e27e(0x457)]??_0x5ae5b3[_0x10e27e(0x34d)]?.[_0x10e27e(0x457)]??'';}function _0x489d7d(_0x4fb0c7){const _0x5da68b=_0x4aed9e;return _0x4fb0c7[_0x5da68b(0x402)]?.[_0x5da68b(0x3cf)]?.[_0x5da68b(0x424)]?_0x4fb0c7['operation'][_0x5da68b(0x3cf)]:_0x4fb0c7[_0x5da68b(0x34d)]?.['tags']??[];}function _0x8a386d(_0xba669){const _0xae072d=_0x4aed9e,_0x1dfd65=[];_0x1dfd65[_0xae072d(0x290)]('\x20\x20'+_0x5cf930(_0x4c3062[_0xae072d(0x37e)]+_0x4c3062[_0xae072d(0x430)],_0xba669['method'][_0xae072d(0x46f)](0x7))+'\x20'+_0x5cf930(_0x4c3062[_0xae072d(0x37e)]+_0x4c3062['cyan'],_0xba669['path']));_0xba669[_0xae072d(0x402)]?.['id']&&_0x1dfd65['push'](_0xae072d(0x363)+_0x5cf930(_0x4c3062[_0xae072d(0x42b)],_0xae072d(0x3ee)+_0xba669[_0xae072d(0x402)]['id']));_0x4ea688(_0xba669)&&_0x1dfd65[_0xae072d(0x290)](_0xae072d(0x363)+_0x5cf930(_0x4c3062[_0xae072d(0x316)],_0x4ea688(_0xba669)));_0x1c3aa4(_0xba669)&&_0x1dfd65[_0xae072d(0x290)](_0xae072d(0x363)+_0x5cf930(_0x4c3062[_0xae072d(0x491)],_0x1c3aa4(_0xba669)));_0x489d7d(_0xba669)[_0xae072d(0x424)]&&_0x1dfd65['push'](_0xae072d(0x363)+_0x5cf930(_0x4c3062[_0xae072d(0x42b)],_0xae072d(0x448)+_0x489d7d(_0xba669)[_0xae072d(0x3d5)](',\x20')));_0xba669[_0xae072d(0x402)]?.[_0xae072d(0x2c1)]?.[_0xae072d(0x36e)]&&_0x1dfd65['push'](_0xae072d(0x363)+_0x5cf930(_0x4c3062[_0xae072d(0x42b)],_0xae072d(0x1c4)+_0xba669[_0xae072d(0x402)][_0xae072d(0x2c1)]['access']));_0xba669['operation']?.[_0xae072d(0x396)]?.[_0xae072d(0x1e1)]&&_0xba669[_0xae072d(0x402)][_0xae072d(0x396)]['transport']!==_0xae072d(0x1e2)&&_0x1dfd65['push'](_0xae072d(0x363)+_0x5cf930(_0x4c3062[_0xae072d(0x42b)],_0xae072d(0x284)+_0xba669['operation'][_0xae072d(0x396)][_0xae072d(0x1e1)]));if(_0xba669[_0xae072d(0x402)]?.[_0xae072d(0x409)]){const _0x1b2bb9=Object['keys'](_0xba669['operation'][_0xae072d(0x409)][_0xae072d(0x435)]||{});if(_0x1b2bb9[_0xae072d(0x424)])_0x1dfd65[_0xae072d(0x290)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5cf930(_0x4c3062[_0xae072d(0x42b)],_0xae072d(0x1c5)+_0x1b2bb9['join'](',\x20')));}return _0xba669[_0xae072d(0x34d)]?.[_0xae072d(0x23d)]&&_0x1dfd65[_0xae072d(0x290)](_0xae072d(0x363)+_0x5cf930(_0x4c3062[_0xae072d(0x42b)],_0xae072d(0x2b5)+JSON['stringify'](_0xba669[_0xae072d(0x34d)]['body']))),_0x1dfd65;}async function _0x2097ab(_0x12407f,_0x516b54,_0x252583,_0xdefa0e=null){const _0x571557=_0x4aed9e,_0x1ae03c=_0x252583[_0x571557(0x352)]('?'),_0x46cb1f=_0x1ae03c>=0x0?_0x252583[_0x571557(0x48a)](0x0,_0x1ae03c):_0x252583,_0x1367a2=_0x1ae03c>=0x0?_0x252583['slice'](_0x1ae03c+0x1):'',_0x22395d=Object[_0x571557(0x3ea)](new URLSearchParams(_0x1367a2)[_0x571557(0x2c0)]());return _0x12407f[_0x571557(0x396)][_0x571557(0x206)](_0x516b54,_0x46cb1f,{'body':_0xdefa0e,'query':_0x22395d,'headers':{'content-type':_0x571557(0x477)}},{'internal':!![]});}function _0x138e56(_0x39add4){const _0x352e41=_0x4aed9e;if(!_0x39add4)return null;const _0x1512d4=_0x39add4[_0x352e41(0x388)]();if(!_0x1512d4)return null;try{return JSON[_0x352e41(0x38e)](_0x1512d4);}catch{}try{return JSON[_0x352e41(0x38e)](_0x1c9d62(_0x1512d4));}catch(_0x233e97){throw new SyntaxError(_0x233e97[_0x352e41(0x1f3)],{'cause':_0x233e97});}}function _0x1c9d62(_0x5a0c57){const _0x59b647=_0x4aed9e;let _0xf21a4f='',_0x1ac438=0x0;while(_0x1ac438<_0x5a0c57[_0x59b647(0x424)]){const _0x1cc429=_0x5a0c57[_0x1ac438];if(_0x1cc429==='\x22'){_0xf21a4f+='\x22',_0x1ac438++;while(_0x1ac438<_0x5a0c57[_0x59b647(0x424)]&&_0x5a0c57[_0x1ac438]!=='\x22'){if(_0x5a0c57[_0x1ac438]==='\x5c'){_0xf21a4f+=_0x5a0c57[_0x1ac438++];if(_0x1ac438<_0x5a0c57['length'])_0xf21a4f+=_0x5a0c57[_0x1ac438++];}else _0xf21a4f+=_0x5a0c57[_0x1ac438++];}_0xf21a4f+='\x22';if(_0x1ac438<_0x5a0c57[_0x59b647(0x424)])_0x1ac438++;continue;}if(_0x1cc429==='\x27'){_0xf21a4f+='\x22',_0x1ac438++;while(_0x1ac438<_0x5a0c57[_0x59b647(0x424)]&&_0x5a0c57[_0x1ac438]!=='\x27'){if(_0x5a0c57[_0x1ac438]==='\x5c'&&_0x5a0c57[_0x1ac438+0x1]==='\x27')_0xf21a4f+='\x27',_0x1ac438+=0x2;else _0x5a0c57[_0x1ac438]==='\x22'?(_0xf21a4f+='\x5c\x22',_0x1ac438++):_0xf21a4f+=_0x5a0c57[_0x1ac438++];}_0xf21a4f+='\x22';if(_0x1ac438<_0x5a0c57[_0x59b647(0x424)])_0x1ac438++;continue;}if(_0x59b647(0x305)[_0x59b647(0x1bc)](_0x1cc429)){_0xf21a4f+=_0x1cc429,_0x1ac438++;continue;}let _0x327466='';while(_0x1ac438<_0x5a0c57[_0x59b647(0x424)]&&!_0x59b647(0x2d1)['includes'](_0x5a0c57[_0x1ac438])&&_0x5a0c57[_0x1ac438]!=='\x20'&&_0x5a0c57[_0x1ac438]!=='\x09'&&_0x5a0c57[_0x1ac438]!=='\x0a'&&_0x5a0c57[_0x1ac438]!=='\x0d'){_0x327466+=_0x5a0c57[_0x1ac438++];}let _0x369569=_0x1ac438;while(_0x369569<_0x5a0c57[_0x59b647(0x424)]&&(_0x5a0c57[_0x369569]==='\x20'||_0x5a0c57[_0x369569]==='\x09'))_0x369569++;if(_0x5a0c57[_0x369569]===':')_0xf21a4f+='\x22'+_0x327466+'\x22';else _0x327466===_0x59b647(0x288)||_0x327466===_0x59b647(0x380)||_0x327466===_0x59b647(0x2ef)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x59b647(0x1a6)](_0x327466)?_0xf21a4f+=_0x327466:_0xf21a4f+='\x22'+_0x327466+'\x22';}return _0xf21a4f[_0x59b647(0x478)](/,(\s*[}\]])/g,'$1');}function _0x4c6da1(_0x242d79){const _0x245a2f=_0x4aed9e,_0x3003e6=[];let _0x247f0f=0x0;while(_0x247f0f<_0x242d79['length']){while(_0x247f0f<_0x242d79['length']&&(_0x242d79[_0x247f0f]==='\x20'||_0x242d79[_0x247f0f]==='\x09'))_0x247f0f++;if(_0x247f0f>=_0x242d79[_0x245a2f(0x424)])break;const _0x22ed24=_0x242d79[_0x247f0f];if(_0x22ed24==='{'||_0x22ed24==='['){const _0x1d0242=_0x22ed24==='{'?'}':']',_0x127b32=_0x247f0f++;let _0x915e4f=0x1,_0x8e63e0=![],_0x3d5ed8='';while(_0x247f0f<_0x242d79[_0x245a2f(0x424)]&&_0x915e4f>0x0){const _0x211bda=_0x242d79[_0x247f0f];if(_0x8e63e0){if(_0x211bda==='\x5c')_0x247f0f++;else{if(_0x211bda===_0x3d5ed8)_0x8e63e0=![];}}else{if(_0x211bda==='\x22'||_0x211bda==='\x27')_0x8e63e0=!![],_0x3d5ed8=_0x211bda;else{if(_0x211bda===_0x22ed24)_0x915e4f++;else{if(_0x211bda===_0x1d0242)_0x915e4f--;}}}_0x247f0f++;}_0x3003e6['push'](_0x242d79[_0x245a2f(0x48a)](_0x127b32,_0x247f0f));continue;}if(_0x22ed24==='\x22'||_0x22ed24==='\x27'){const _0x208fb8=_0x22ed24;_0x247f0f++;let _0xbda46='';while(_0x247f0f<_0x242d79['length']&&_0x242d79[_0x247f0f]!==_0x208fb8){if(_0x242d79[_0x247f0f]==='\x5c'&&_0x247f0f+0x1<_0x242d79[_0x245a2f(0x424)])_0x247f0f++,_0xbda46+=_0x242d79[_0x247f0f++];else _0xbda46+=_0x242d79[_0x247f0f++];}if(_0x247f0f<_0x242d79[_0x245a2f(0x424)])_0x247f0f++;_0x3003e6[_0x245a2f(0x290)](_0xbda46);continue;}let _0x96782='';while(_0x247f0f<_0x242d79[_0x245a2f(0x424)]&&_0x242d79[_0x247f0f]!=='\x20'&&_0x242d79[_0x247f0f]!=='\x09'&&_0x242d79[_0x247f0f]!=='{'&&_0x242d79[_0x247f0f]!=='['){_0x96782+=_0x242d79[_0x247f0f++];}if(_0x96782)_0x3003e6['push'](_0x96782);}return _0x3003e6;}function _0x2d0ea4(_0x4f79f6,_0x2ae60a){const _0x1e3d41=_0x4aed9e,_0x2560f4=[..._0x4f79f6[_0x1e3d41(0x41c)][_0x1e3d41(0x369)]()][_0x1e3d41(0x3ad)](_0x1f7da1=>!_0x1f7da1[_0x1e3d41(0x47b)]('~'));console[_0x1e3d41(0x1de)](['',_0x5cf930(_0x4c3062['bold']+_0x4c3062[_0x1e3d41(0x26d)],_0x1e3d41(0x2c4)),_0x5cf930(_0x4c3062[_0x1e3d41(0x37e)]+_0x4c3062['cyan'],_0x1e3d41(0x41e))+_0x5cf930(_0x4c3062[_0x1e3d41(0x37e)],_0x1e3d41(0x3d1))+_0x5cf930(_0x4c3062[_0x1e3d41(0x37e)]+_0x4c3062[_0x1e3d41(0x26d)],'║'),_0x5cf930(_0x4c3062[_0x1e3d41(0x37e)]+_0x4c3062['cyan'],_0x1e3d41(0x2f3)),'','\x20\x20'+_0x5cf930(_0x4c3062['green'],'✓')+'\x20'+_0x5cf930(_0x4c3062[_0x1e3d41(0x37e)],'server')+'\x20\x20http://localhost:'+_0x2ae60a[_0x1e3d41(0x31a)],'\x20\x20'+_0x5cf930(_0x4c3062[_0x1e3d41(0x48d)],'✓')+'\x20'+_0x5cf930(_0x4c3062[_0x1e3d41(0x37e)],_0x1e3d41(0x1a7))+'\x20\x20\x20\x20\x20http://localhost:'+_0x2ae60a['port']+_0x1e3d41(0x258),'\x20\x20'+_0x5cf930(_0x4c3062[_0x1e3d41(0x48d)],'✓')+'\x20'+_0x5cf930(_0x4c3062['bold'],_0x1e3d41(0x2cc))+_0x1e3d41(0x2e5)+_0x2ae60a[_0x1e3d41(0x1a5)],'\x20\x20'+_0x5cf930(_0x4c3062[_0x1e3d41(0x48d)],'✓')+'\x20'+_0x5cf930(_0x4c3062[_0x1e3d41(0x37e)],'id')+'\x20\x20\x20\x20\x20\x20'+_0x5cf930(_0x4c3062[_0x1e3d41(0x42b)],_0x4f79f6['id']),'\x20\x20'+_0x5cf930(_0x4c3062[_0x1e3d41(0x48d)],'✓')+'\x20'+_0x5cf930(_0x4c3062[_0x1e3d41(0x37e)],_0x1e3d41(0x1c7))+'\x20\x20\x20\x20'+_0x2560f4[_0x1e3d41(0x29c)](_0x16363d=>_0x5cf930(_0x4c3062[_0x1e3d41(0x26d)],_0x16363d))[_0x1e3d41(0x3d5)]('\x20\x20'),..._0x2ae60a[_0x1e3d41(0x3ba)]?[]:['\x20\x20'+_0x5cf930(_0x4c3062[_0x1e3d41(0x48d)],'✓')+'\x20'+_0x5cf930(_0x4c3062[_0x1e3d41(0x37e)],_0x1e3d41(0x2de))+'\x20\x20\x20http://localhost:'+_0x2ae60a[_0x1e3d41(0x31a)]+_0x1e3d41(0x49a)],'',_0x5cf930(_0x4c3062[_0x1e3d41(0x491)],_0x1e3d41(0x4a2)+_0x5cf930(_0x4c3062['bold'],_0x1e3d41(0x46c))+_0x1e3d41(0x25d)+_0x5cf930(_0x4c3062[_0x1e3d41(0x37e)],'routes')+'\x20to\x20browse\x20the\x20API,\x20'+_0x5cf930(_0x4c3062[_0x1e3d41(0x37e)],_0x1e3d41(0x343))+'\x20to\x20quit.'),''][_0x1e3d41(0x3d5)]('\x0a'));}function _0x370e21(_0x20b521){const _0x454d6e=_0x4aed9e;console[_0x454d6e(0x1de)]('\x0a'+_0x5cf930(_0x4c3062['bold'],_0x454d6e(0x1b2))+'\x20\x20'+_0x5cf930(_0x4c3062[_0x454d6e(0x491)],_0x454d6e(0x318))+_0x454d6e(0x24c)+_0x5cf930(_0x4c3062['cyan'],'<path>')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20'+_0x5cf930(_0x4c3062[_0x454d6e(0x26d)],_0x454d6e(0x47f))+'\x20'+_0x5cf930(_0x4c3062['yellow'],_0x454d6e(0x3f9))+_0x454d6e(0x3c7)+_0x5cf930(_0x4c3062[_0x454d6e(0x26d)],'VERB')+'\x20'+_0x5cf930(_0x4c3062[_0x454d6e(0x26d)],'<path>')+'\x20'+_0x5cf930(_0x4c3062['yellow'],_0x454d6e(0x2aa))+_0x454d6e(0x1e0)+_0x5cf930(_0x4c3062[_0x454d6e(0x491)],_0x454d6e(0x2d5))+_0x454d6e(0x437)+_0x5cf930(_0x4c3062['gray'],'info')+'\x20\x20\x20\x20\x20\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'+_0x5cf930(_0x4c3062[_0x454d6e(0x42b)],'envs')+_0x454d6e(0x44b)+_0x5cf930(_0x4c3062[_0x454d6e(0x42b)],_0x454d6e(0x332))+_0x454d6e(0x1bf)+_0x20b521[_0x454d6e(0x45b)]+'/types\x0a\x20\x20\x20\x20'+_0x5cf930(_0x4c3062['gray'],_0x454d6e(0x225))+_0x454d6e(0x241)+_0x20b521['env']+'/type/users\x0a\x20\x20\x20\x20'+_0x5cf930(_0x4c3062[_0x454d6e(0x42b)],_0x454d6e(0x3d0))+_0x454d6e(0x490)+_0x20b521[_0x454d6e(0x45b)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x5cf930(_0x4c3062[_0x454d6e(0x42b)],_0x454d6e(0x4a6))+'\x20→\x20POST\x20/api/env/'+_0x20b521[_0x454d6e(0x45b)]+'/type/users/query\x0a\x20\x20\x20\x20'+_0x5cf930(_0x4c3062[_0x454d6e(0x42b)],_0x454d6e(0x353))+_0x454d6e(0x437)+_0x5cf930(_0x4c3062['gray'],_0x454d6e(0x22d))+_0x454d6e(0x437)+_0x5cf930(_0x4c3062[_0x454d6e(0x42b)],_0x454d6e(0x360))+'\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'+_0x5cf930(_0x4c3062['bold'],_0x454d6e(0x315))+'\x20\x20'+_0x5cf930(_0x4c3062['dim'],_0x454d6e(0x3aa))+_0x454d6e(0x24c)+_0x5cf930(_0x4c3062[_0x454d6e(0x26d)],_0x454d6e(0x463))+_0x454d6e(0x40c)+_0x5cf930(_0x4c3062[_0x454d6e(0x26d)],_0x454d6e(0x44e))+_0x454d6e(0x3b8)+_0x5cf930(_0x4c3062[_0x454d6e(0x491)],'Examples')+_0x454d6e(0x437)+_0x5cf930(_0x4c3062[_0x454d6e(0x42b)],_0x454d6e(0x3d9))+_0x454d6e(0x437)+_0x5cf930(_0x4c3062[_0x454d6e(0x42b)],_0x454d6e(0x40d))+_0x454d6e(0x437)+_0x5cf930(_0x4c3062['gray'],'type/users\x20--help')+'\x0a\x0a'+_0x5cf930(_0x4c3062[_0x454d6e(0x37e)],_0x454d6e(0x1ca))+_0x454d6e(0x24c)+_0x5cf930(_0x4c3062[_0x454d6e(0x26d)],_0x454d6e(0x1da))+_0x454d6e(0x1d3)+_0x5cf930(_0x4c3062['cyan'],'env')+_0x454d6e(0x28c)+_0x5cf930(_0x4c3062['cyan'],_0x454d6e(0x3d3))+'\x20'+_0x5cf930(_0x4c3062['dim'],'[filter]')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20'+_0x5cf930(_0x4c3062[_0x454d6e(0x26d)],_0x454d6e(0x2db))+'\x20'+_0x5cf930(_0x4c3062[_0x454d6e(0x491)],_0x454d6e(0x3bb))+_0x454d6e(0x2d8)+_0x5cf930(_0x4c3062['cyan'],'open')+_0x454d6e(0x3e2)+_0x5cf930(_0x4c3062[_0x454d6e(0x26d)],_0x454d6e(0x46c))+_0x454d6e(0x3f5)+_0x5cf930(_0x4c3062['cyan'],_0x454d6e(0x343))+'\x20'+_0x5cf930(_0x4c3062[_0x454d6e(0x491)],_0x454d6e(0x249))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}let _0x3f14ba=![];async function _0x501c1d(_0x10c896,_0x139d05=0x0,_0x2e6947=null){const _0x44b17a=_0x4aed9e;_0x3f14ba&&(process[_0x44b17a(0x41f)][_0x44b17a(0x325)](_0x5cf930(_0x4c3062['red'],_0x44b17a(0x303))),process[_0x44b17a(0x343)](0x82));_0x3f14ba=!![],process[_0x44b17a(0x48b)][_0x44b17a(0x325)]('\x0a'),process[_0x44b17a(0x41f)][_0x44b17a(0x325)](_0x5cf930(_0x4c3062['yellow'],_0x44b17a(0x212)+(_0x2e6947?_0x44b17a(0x3c4)+_0x2e6947+',\x20':'')+_0x44b17a(0x1b7)));const _0x2f453c=setTimeout(()=>{const _0x2f0ae9=_0x44b17a;process[_0x2f0ae9(0x41f)][_0x2f0ae9(0x325)](_0x5cf930(_0x4c3062[_0x2f0ae9(0x3d7)],_0x2f0ae9(0x334))),process[_0x2f0ae9(0x343)](0x1);},0x1388);try{await _0x10c896[_0x44b17a(0x2d2)]();}catch(_0x107576){console[_0x44b17a(0x49c)](_0x5cf930(_0x4c3062[_0x44b17a(0x3d7)],'\x20\x20'+_0x107576[_0x44b17a(0x1f3)]));}clearTimeout(_0x2f453c),process[_0x44b17a(0x41f)][_0x44b17a(0x325)](_0x5cf930(_0x4c3062[_0x44b17a(0x491)],_0x44b17a(0x377))),process[_0x44b17a(0x343)](_0x139d05);}function _0x6d18af(_0x4c53a6){const _0x19741b=_0x4aed9e,_0x39bb81=_0x4c53a6[_0x19741b(0x45b)]!==_0x19741b(0x1b0)?_0x5cf930(_0x4c3062[_0x19741b(0x432)],'['+_0x4c53a6[_0x19741b(0x45b)]+']'):'';return _0x5cf930(_0x4c3062[_0x19741b(0x37e)]+_0x4c3062[_0x19741b(0x26d)],_0x19741b(0x417))+_0x39bb81+_0x5cf930(_0x4c3062['gray'],'>\x20');}const _0x33faee=new Set([_0x4aed9e(0x25c),_0x4aed9e(0x291),_0x4aed9e(0x469),_0x4aed9e(0x32f),_0x4aed9e(0x251)]);async function _0x4a7b60(_0x57ad32,_0x44ac18,_0x4aa38f,_0x47b1d1,_0x30d99c,_0x5a5930){const _0x733673=_0x4aed9e;_0x57ad32=_0x57ad32[_0x733673(0x388)]();if(!_0x57ad32||_0x57ad32[_0x733673(0x47b)]('#'))return;const _0x33390f=_0x4c6da1(_0x57ad32),{flags:_0x14abc0,rest:_0x46bf01}=_0x161e09(_0x33390f);if(!_0x46bf01[_0x733673(0x424)])return;const _0x24581d=_0x46bf01[0x0],_0x16a206=_0x24581d[_0x733673(0x3e4)]();if(_0x16a206===_0x733673(0x19a)){if(_0x46bf01[0x1])_0x1857af(_0x44ac18,_0x5be183(_0x46bf01[0x1],_0x14abc0['env']??_0x30d99c[_0x733673(0x45b)]));else _0x370e21(_0x30d99c);return;}if(_0x16a206==='USE'){const _0xbb6001=_0x46bf01[0x1];if(!_0xbb6001){console['log'](_0x5cf930(_0x4c3062['red'],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x44ac18[_0x733673(0x45b)](_0xbb6001),_0x30d99c[_0x733673(0x45b)]=_0xbb6001,_0x5a5930?.[_0x733673(0x1ab)](_0x6d18af(_0x30d99c)),console[_0x733673(0x1de)](_0x733673(0x25f)+_0x5cf930(_0x4c3062[_0x733673(0x48d)],'✓')+'\x20active\x20env:\x20'+_0x5cf930(_0x4c3062['bold']+_0x4c3062[_0x733673(0x26d)],_0xbb6001)+'\x0a');}catch{console[_0x733673(0x1de)](_0x733673(0x25f)+_0x5cf930(_0x4c3062[_0x733673(0x3d7)],'✗')+_0x733673(0x2bc)+_0x5cf930(_0x4c3062['bold'],_0xbb6001)+_0x733673(0x322)+_0x5cf930(_0x4c3062[_0x733673(0x491)],_0x733673(0x384)));}return;}if(_0x16a206==='ENV'){const _0x48e2ea=[..._0x44ac18['_envs'][_0x733673(0x369)]()]['filter'](_0x41ace4=>!_0x41ace4[_0x733673(0x47b)]('~'));console[_0x733673(0x1de)]('');for(const _0xef0b16 of _0x48e2ea){const _0x531396=_0xef0b16===_0x30d99c[_0x733673(0x45b)];console[_0x733673(0x1de)]('\x20\x20'+(_0x531396?_0x5cf930(_0x4c3062[_0x733673(0x48d)],'●'):_0x5cf930(_0x4c3062[_0x733673(0x491)],'○'))+'\x20\x20'+(_0x531396?_0x5cf930(_0x4c3062[_0x733673(0x37e)]+_0x4c3062[_0x733673(0x26d)],_0xef0b16):_0x5cf930(_0x4c3062[_0x733673(0x491)],_0xef0b16)));}console[_0x733673(0x1de)](_0x733673(0x25f)+_0x5cf930(_0x4c3062['dim'],_0x733673(0x1e8))+'\x20'+_0x5cf930(_0x4c3062['cyan'],_0x30d99c[_0x733673(0x45b)])),console['log']('');return;}if(_0x16a206===_0x733673(0x4ab)){const _0x38c097=[..._0x44ac18[_0x733673(0x41c)]['values']()][_0x733673(0x3ad)](_0x43ae3e=>!_0x43ae3e[_0x733673(0x300)][_0x733673(0x47b)]('~'));console[_0x733673(0x1de)]('');const _0xe6a15c=Math[_0x733673(0x34b)](..._0x38c097['map'](_0x2f0990=>_0x2f0990[_0x733673(0x300)][_0x733673(0x424)]));for(const _0x1d47c2 of _0x38c097){const _0x10b726=_0x1d47c2[_0x733673(0x300)]===_0x30d99c[_0x733673(0x45b)],_0x33aea4=_0x10b726?_0x5cf930(_0x4c3062[_0x733673(0x48d)],'●'):_0x5cf930(_0x4c3062[_0x733673(0x491)],'○'),_0x5183de=_0x10b726?_0x5cf930(_0x4c3062['bold']+_0x4c3062[_0x733673(0x26d)],_0x1d47c2[_0x733673(0x300)]['padEnd'](_0xe6a15c)):_0x5cf930(_0x4c3062['dim'],_0x1d47c2[_0x733673(0x300)][_0x733673(0x46f)](_0xe6a15c)),_0x20f4bf=[..._0x1d47c2[_0x733673(0x34a)][_0x733673(0x369)]()]['filter'](_0x3e3ff6=>!_0x3e3ff6[_0x733673(0x47b)]('~')),_0x48bfee=_0x20f4bf[_0x733673(0x424)]?_0x5cf930(_0x4c3062[_0x733673(0x491)],_0x20f4bf['slice'](0x0,0x5)[_0x733673(0x3d5)](',\x20')+(_0x20f4bf[_0x733673(0x424)]>0x5?_0x733673(0x357)+(_0x20f4bf[_0x733673(0x424)]-0x5)+_0x733673(0x2e0):'')):_0x5cf930(_0x4c3062['dim'],_0x733673(0x3a1));console[_0x733673(0x1de)]('\x20\x20'+_0x33aea4+'\x20\x20'+_0x5183de+'\x20\x20'+_0x48bfee);}console[_0x733673(0x1de)]('');return;}if(_0x16a206===_0x733673(0x400)){const _0x1df335=_0x14abc0[_0x733673(0x45b)]??_0x46bf01[0x1]??_0x30d99c[_0x733673(0x45b)];try{const _0x287a59=_0x44ac18[_0x733673(0x45b)](_0x1df335),_0x4cd4f1=[..._0x287a59[_0x733673(0x34a)]['keys']()][_0x733673(0x3ad)](_0x53700e=>!_0x53700e[_0x733673(0x47b)]('~'))['sort']();console[_0x733673(0x1de)](_0x733673(0x25f)+_0x5cf930(_0x4c3062[_0x733673(0x491)],_0x4cd4f1['length']+_0x733673(0x228)+(_0x4cd4f1[_0x733673(0x424)]!==0x1?'s':'')+'\x20in\x20'+_0x1df335));for(const _0x52f80f of _0x4cd4f1){const _0x341d6b=_0x287a59[_0x733673(0x34a)]['get'](_0x52f80f),_0x53148a=_0x341d6b?.[_0x733673(0x451)]?.['getCount']?.()??0x0,_0x387e30=_0x5cf930(_0x4c3062[_0x733673(0x37e)]+_0x4c3062[_0x733673(0x26d)],_0x52f80f[_0x733673(0x46f)](0x1c));console[_0x733673(0x1de)]('\x20\x20\x20\x20'+_0x387e30+'\x20\x20'+_0x5cf930(_0x4c3062[_0x733673(0x430)],String(_0x53148a)[_0x733673(0x2fb)](0x6))+'\x20'+_0x5cf930(_0x4c3062[_0x733673(0x491)],_0x733673(0x387)));}console[_0x733673(0x1de)]('');}catch(_0x7b406c){console[_0x733673(0x49c)](_0x5cf930(_0x4c3062[_0x733673(0x3d7)],_0x733673(0x25f)+_0x7b406c[_0x733673(0x1f3)]+'\x0a'));}return;}if(_0x16a206===_0x733673(0x199)){_0x3217fd(_0x44ac18,_0x46bf01[_0x733673(0x48a)](0x1)['join']('\x20'));return;}if(_0x16a206==='LOGS'){const _0xbf6cec=(_0x46bf01[0x1]??'')[_0x733673(0x3a9)]();if(!_0xbf6cec||_0xbf6cec==='on')_0x47b1d1[_0x733673(0x34f)]=!![],_0x47b1d1['level']='info',console[_0x733673(0x1de)](_0x733673(0x25f)+_0x5cf930(_0x4c3062[_0x733673(0x48d)],'✓')+_0x733673(0x301)+_0x5cf930(_0x4c3062[_0x733673(0x491)],'level:\x20info')+'\x0a');else{if(_0xbf6cec===_0x733673(0x27d))_0x47b1d1[_0x733673(0x34f)]=![],console[_0x733673(0x1de)]('\x0a\x20\x20'+_0x5cf930(_0x4c3062[_0x733673(0x432)],'○')+_0x733673(0x395));else _0x1e170e[_0xbf6cec]!==undefined?(_0x47b1d1[_0x733673(0x34f)]=!![],_0x47b1d1[_0x733673(0x3ac)]=_0xbf6cec,console[_0x733673(0x1de)](_0x733673(0x25f)+_0x5cf930(_0x4c3062[_0x733673(0x48d)],'✓')+_0x733673(0x26b)+_0x5cf930(_0x4c3062[_0x733673(0x37e)],_0xbf6cec)+'\x0a')):console[_0x733673(0x49c)](_0x5cf930(_0x4c3062[_0x733673(0x3d7)],_0x733673(0x1aa)));}return;}if(_0x16a206==='EXIT'||_0x16a206==='QUIT'){await _0x501c1d(_0x44ac18,0x0);return;}if(_0x16a206===_0x733673(0x401)){const _0x5dc3de=_0x733673(0x285)+_0x4aa38f['port']+'/admin/index.html',_0x2686db=process[_0x733673(0x2d3)]==='win32'?'start\x20'+_0x5dc3de:process[_0x733673(0x2d3)]===_0x733673(0x462)?_0x733673(0x3a8)+_0x5dc3de:_0x733673(0x21b)+_0x5dc3de;require$$4[_0x733673(0x41b)](_0x2686db),console['log'](_0x733673(0x25f)+_0x5cf930(_0x4c3062[_0x733673(0x48d)],'✓')+_0x733673(0x278)+_0x5cf930(_0x4c3062[_0x733673(0x26d)],_0x5dc3de)+'\x0a');return;}let _0x3992e0,_0x463090,_0x1daee0;if(_0x33faee[_0x733673(0x339)](_0x16a206)){_0x3992e0=_0x16a206,_0x463090=_0x46bf01[0x1],_0x1daee0=_0x46bf01[_0x733673(0x48a)](0x2);if(!_0x463090){console[_0x733673(0x49c)](_0x5cf930(_0x4c3062[_0x733673(0x3d7)],_0x733673(0x2bf)+_0x24581d+_0x733673(0x254)));return;}}else _0x3992e0=null,_0x463090=_0x46bf01[0x0],_0x1daee0=_0x46bf01[_0x733673(0x48a)](0x1);const _0x315d76=_0x14abc0[_0x733673(0x45b)]??_0x30d99c[_0x733673(0x45b)],_0x2317bf=_0x5be183(_0x463090,_0x315d76);if(_0x14abc0['help']){_0x1857af(_0x44ac18,_0x2317bf);return;}let _0x365fce=null;if(_0x1daee0[_0x733673(0x424)]){const _0x5b5711=_0x1daee0[_0x733673(0x3d5)]('\x20');try{_0x365fce=_0x138e56(_0x5b5711);}catch(_0x210d3e){console[_0x733673(0x49c)](_0x5cf930(_0x4c3062[_0x733673(0x3d7)],_0x733673(0x1db)+_0x5b5711+'\x0a\x20\x20'+_0x5cf930(_0x4c3062[_0x733673(0x491)],_0x210d3e['message'])+'\x0a'));return;}}if(!_0x3992e0)_0x3992e0=_0x365fce!==null?_0x733673(0x291):_0x733673(0x25c);try{const _0x43590c=await _0x2097ab(_0x44ac18,_0x3992e0,_0x2317bf,_0x365fce);_0x592b5c(_0x43590c['status'],_0x43590c['body']);}catch(_0x118ac4){console[_0x733673(0x49c)]('\x0a\x20\x20'+_0x5cf930(_0x4c3062[_0x733673(0x3d7)],'✗')+'\x20'+_0x118ac4[_0x733673(0x1f3)]+'\x0a');}}class _0x3508e8{constructor(){const _0x2080de=_0x4aed9e;this[_0x2080de(0x33a)]=new Map(),this[_0x2080de(0x487)]=null,this[_0x2080de(0x30f)]=![];}}function _0x1fb4c8(_0x5f5c63){const _0x1a5791=_0x4aed9e,_0xc7a8f8=new _0x3508e8();for(const _0x260e83 of _0x5f5c63){if(_0x260e83['meta']?.[_0x1a5791(0x26c)])continue;const _0x194fcf=_0x260e83[_0x1a5791(0x2cc)][_0x1a5791(0x478)](/^\/api/,'')[_0x1a5791(0x478)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x1a5791(0x478)](/^\//,'');if(!_0x194fcf)continue;let _0x4f24c4=_0xc7a8f8;for(const _0x3140cb of _0x194fcf[_0x1a5791(0x27e)]('/')[_0x1a5791(0x3ad)](Boolean)){if(_0x3140cb[_0x1a5791(0x47b)](':')){const _0x25606e=_0x3140cb[_0x1a5791(0x48a)](0x1);if(!_0x4f24c4[_0x1a5791(0x487)])_0x4f24c4['dynamic']={'param':_0x25606e,'node':new _0x3508e8()};_0x4f24c4=_0x4f24c4[_0x1a5791(0x487)]['node'];}else{if(!_0x4f24c4[_0x1a5791(0x33a)]['has'](_0x3140cb))_0x4f24c4['children'][_0x1a5791(0x22c)](_0x3140cb,new _0x3508e8());_0x4f24c4=_0x4f24c4[_0x1a5791(0x33a)][_0x1a5791(0x338)](_0x3140cb);}}_0x4f24c4['terminal']=!![];}return _0xc7a8f8;}const _0x184807=new Map();function _0x8c3b1a(_0x24563b,_0xcaec11,_0xa48ea3){const _0xfcacdb=_0x4aed9e,_0x22fb06=_0x184807[_0xfcacdb(0x338)](_0x24563b);if(_0x22fb06&&_0x22fb06[_0xfcacdb(0x3ae)]>Date[_0xfcacdb(0x2f5)]())return _0x22fb06[_0xfcacdb(0x1d4)];const _0x7d8a94=_0xa48ea3();return _0x184807[_0xfcacdb(0x22c)](_0x24563b,{'val':_0x7d8a94,'exp':Date[_0xfcacdb(0x2f5)]()+_0xcaec11}),_0x7d8a94;}function _0x2e6e76(_0x44489c,_0x50de88,_0x53c716,_0x295d15){const _0x21e8f7=_0x4aed9e,_0x1f2145=_0x50de88[_0x21e8f7(0x45b)]??_0x295d15[_0x21e8f7(0x45b)];switch(_0x44489c){case'env':return[..._0x53c716[_0x21e8f7(0x41c)]['keys']()][_0x21e8f7(0x3ad)](_0x928bad=>!_0x928bad[_0x21e8f7(0x47b)]('~'));case _0x21e8f7(0x31c):return _0x8c3b1a(_0x21e8f7(0x38d)+_0x1f2145,0x7d0,()=>{const _0x538cbc=_0x21e8f7;try{return[..._0x53c716[_0x538cbc(0x45b)](_0x1f2145)['typeSubDbs'][_0x538cbc(0x369)]()][_0x538cbc(0x3ad)](_0x380091=>!_0x380091['startsWith']('~'));}catch{return[];}});case _0x21e8f7(0x1cd):if(!_0x50de88[_0x21e8f7(0x31c)])return[];return _0x8c3b1a(_0x21e8f7(0x381)+_0x1f2145+':'+_0x50de88[_0x21e8f7(0x31c)],0x5dc,()=>{const _0x4e9145=_0x21e8f7;try{const _0x470ea8=_0x53c716[_0x4e9145(0x45b)](_0x1f2145)[_0x4e9145(0x34a)][_0x4e9145(0x338)](_0x50de88[_0x4e9145(0x31c)]);if(!_0x470ea8?.[_0x4e9145(0x451)])return[];const _0x2a9115=[];for(const {key:_0x33c1dc}of _0x470ea8[_0x4e9145(0x451)][_0x4e9145(0x1bd)]({'limit':0x32})){_0x2a9115[_0x4e9145(0x290)](String(_0x33c1dc));if(_0x2a9115[_0x4e9145(0x424)]>=0x32)break;}return _0x2a9115;}catch{return[];}});case _0x21e8f7(0x3b0):if(!_0x50de88[_0x21e8f7(0x31c)])return[];return _0x8c3b1a(_0x21e8f7(0x2cd)+_0x1f2145+':'+_0x50de88[_0x21e8f7(0x31c)],0x7d0,()=>{try{const _0x3a30f9=_0x53c716['env'](_0x1f2145)['typeSubDbs']['get'](_0x50de88['type']);return _0x3a30f9?[..._0x3a30f9['indexToDb']?.['keys']()??[]]:[];}catch{return[];}});case _0x21e8f7(0x30d):if(!_0x50de88[_0x21e8f7(0x31c)])return[];return _0x8c3b1a('fts:'+_0x1f2145+':'+_0x50de88['type'],0x7d0,()=>{const _0x713e1b=_0x21e8f7;try{return _0x53c716[_0x713e1b(0x40f)]?.[_0x713e1b(0x39c)]?.(_0x50de88[_0x713e1b(0x31c)],_0x53c716[_0x713e1b(0x45b)](_0x1f2145))?.['map'](_0x191426=>_0x191426[_0x713e1b(0x300)])??[];}catch{return[];}});default:return[];}}function _0x13a98c(_0x2a8dfd,_0x22b225,_0x56bd97,_0x47fc7a){const _0x2a5446=_0x4aed9e,_0x417efe=_0x2a8dfd['endsWith']('/'),_0x1dee75=_0x2a8dfd[_0x2a5446(0x27e)]('/'),_0x23d255=_0x417efe?_0x1dee75['slice'](0x0,-0x1):_0x1dee75[_0x2a5446(0x48a)](0x0,-0x1),_0x401aec=_0x417efe?'':_0x1dee75[_0x1dee75[_0x2a5446(0x424)]-0x1];let _0x3bcc9a=_0x22b225;const _0x3fcb63={};for(const _0x5c8dfe of _0x23d255){if(!_0x5c8dfe)continue;if(_0x3bcc9a['children'][_0x2a5446(0x339)](_0x5c8dfe))_0x3bcc9a=_0x3bcc9a[_0x2a5446(0x33a)]['get'](_0x5c8dfe);else{if(_0x3bcc9a[_0x2a5446(0x487)])_0x3fcb63[_0x3bcc9a[_0x2a5446(0x487)]['param']]=_0x5c8dfe,_0x3bcc9a=_0x3bcc9a[_0x2a5446(0x487)]['node'];else return[];}}const _0x4af503=_0x23d255[_0x2a5446(0x3ad)](Boolean),_0x348751=_0x4af503['length']?_0x4af503['join']('/')+'/':'',_0x155f33=[];for(const [_0x50f949]of _0x3bcc9a['children']){if(_0x50f949[_0x2a5446(0x47b)](_0x401aec))_0x155f33[_0x2a5446(0x290)](_0x348751+_0x50f949);}if(_0x3bcc9a[_0x2a5446(0x487)])for(const _0x212d51 of _0x2e6e76(_0x3bcc9a['dynamic']['param'],_0x3fcb63,_0x56bd97,_0x47fc7a)){if(String(_0x212d51)['startsWith'](_0x401aec))_0x155f33['push'](_0x348751+_0x212d51);}return _0x155f33[_0x2a5446(0x48a)](0x0,0x64);}const _0x538e5b=[_0x4aed9e(0x46c),_0x4aed9e(0x37f),_0x4aed9e(0x45b),_0x4aed9e(0x1c7),_0x4aed9e(0x332),_0x4aed9e(0x3d3),_0x4aed9e(0x2db),_0x4aed9e(0x483),'exit',_0x4aed9e(0x2a2)];function _0x4494d2(_0xf93e6a,_0x2f159a,_0x3be045){return function _0x5b9e29(_0x5b5f4a){const _0x47ae2b=_0x5271;try{const _0x1bf94f=_0x5b5f4a[_0x47ae2b(0x453)](/\s[{[]/),_0x2ce4c7=_0x1bf94f>=0x0?_0x5b5f4a['slice'](0x0,_0x1bf94f):_0x5b5f4a,_0x1a185f=_0x2ce4c7[_0x47ae2b(0x223)]();if(!_0x1a185f){const _0x1f250c=[..._0x538e5b,...[..._0xf93e6a[_0x47ae2b(0x33a)][_0x47ae2b(0x369)]()]]['slice'](0x0,0x64);return[_0x1f250c,''];}const _0x25d27c=_0x1a185f['split'](/\s+/),_0x166557=_0x25d27c[0x0],_0x518cc0=_0x166557[_0x47ae2b(0x3e4)]();if(_0x25d27c[_0x47ae2b(0x424)]===0x1){const _0x15882a=_0x166557[_0x47ae2b(0x3a9)](),_0x5995de=_0x538e5b[_0x47ae2b(0x3ad)](_0x406e90=>_0x406e90[_0x47ae2b(0x47b)](_0x15882a)),_0x4f1430=_0x13a98c(_0x166557,_0xf93e6a,_0x2f159a,_0x3be045),_0x125ca7=[...new Set([..._0x5995de,..._0x4f1430])]['slice'](0x0,0x64);return[_0x125ca7,_0x166557];}if(_0x33faee[_0x47ae2b(0x339)](_0x518cc0)&&_0x25d27c[_0x47ae2b(0x424)]===0x2){const _0x2e525d=_0x25d27c[0x1],_0x562fc5=_0x13a98c(_0x2e525d,_0xf93e6a,_0x2f159a,_0x3be045);return[_0x562fc5[_0x47ae2b(0x29c)](_0x47d32c=>_0x166557+'\x20'+_0x47d32c),_0x166557+'\x20'+_0x2e525d];}if(!_0x33faee[_0x47ae2b(0x339)](_0x518cc0)&&_0x25d27c[_0x47ae2b(0x424)]>0x1){const _0x2b914b=_0x13a98c(_0x166557,_0xf93e6a,_0x2f159a,_0x3be045),_0x292043='\x20'+_0x25d27c[_0x47ae2b(0x48a)](0x1)['join']('\x20');return[_0x2b914b[_0x47ae2b(0x29c)](_0x5cd475=>_0x5cd475+_0x292043),_0x166557+_0x292043];}return[[],_0x5b5f4a];}catch{return[[],_0x5b5f4a];}};}async function _0xef2c30(_0x4ab600,_0x59eb58){const _0x3bf680=_0x4aed9e,_0x37bc95={'enabled':!![],'level':_0x59eb58[_0x3bf680(0x2bb)]??_0x3bf680(0x250)},_0x16f008={'env':'default'},_0x4db875={'current':null},_0x19ee09=_0x1fb4c8(_0x4ab600['http'][_0x3bf680(0x407)]()),_0x1af14d=_0x4494d2(_0x19ee09,_0x4ab600,_0x16f008);_0x4ab600[_0x3bf680(0x1de)][_0x3bf680(0x1d6)](_0x3c6837=>{const _0x491792=_0x3bf680;if(!_0x37bc95[_0x491792(0x34f)])return;_0x10fcd2(_0x3c6837,_0x37bc95[_0x491792(0x3ac)]),_0x4db875[_0x491792(0x2f2)]?.[_0x491792(0x34e)](!![]);}),_0x2d0ea4(_0x4ab600,_0x59eb58);const _0x31566f=_0xcb6bba[_0x3bf680(0x1eb)]({'input':process[_0x3bf680(0x33d)],'output':process[_0x3bf680(0x48b)],'terminal':!![],'completer':_0x1af14d,'prompt':_0x6d18af(_0x16f008),'historySize':_0x1566cf});try{const _0x445e04=_0x51aced[_0x3bf680(0x205)](_0x4fb660,_0x3bf680(0x467))[_0x3bf680(0x27e)]('\x0a')['filter'](Boolean);_0x31566f[_0x3bf680(0x36b)]=_0x445e04['reverse']()[_0x3bf680(0x48a)](0x0,_0x1566cf);}catch{}_0x4db875['current']=_0x31566f,_0x31566f['on'](_0x3bf680(0x45c),async _0x1606e1=>{const _0x1b6169=_0x3bf680;_0x31566f[_0x1b6169(0x219)]();try{await _0x4a7b60(_0x1606e1,_0x4ab600,_0x59eb58,_0x37bc95,_0x16f008,_0x31566f);}catch(_0x3e6533){console[_0x1b6169(0x49c)](_0x5cf930(_0x4c3062[_0x1b6169(0x3d7)],_0x1b6169(0x3b1)+_0x3e6533[_0x1b6169(0x1f3)]));}finally{_0x31566f[_0x1b6169(0x421)](),_0x31566f[_0x1b6169(0x34e)]();}}),_0x31566f['on'](_0x3bf680(0x2d2),()=>{const _0x3a4221=_0x3bf680;try{const _0x55250c=[..._0x31566f['history']][_0x3a4221(0x2d9)]()[_0x3a4221(0x3ad)](Boolean)[_0x3a4221(0x48a)](0x0,_0x1566cf);_0x51aced[_0x3a4221(0x2fc)](_0x4fb660,_0x55250c['join']('\x0a')+'\x0a');}catch{}_0x501c1d(_0x4ab600,0x0);});let _0x364e66=0x0;return process['on']('SIGINT',()=>{const _0x602a61=_0x3bf680;if(_0x3f14ba)return _0x501c1d(_0x4ab600,0x82,_0x602a61(0x22e));if(_0x31566f['line']==='')return _0x501c1d(_0x4ab600,0x0,_0x602a61(0x22e));const _0x4f805b=Date[_0x602a61(0x2f5)]();if(_0x4f805b-_0x364e66<0x5dc)return _0x501c1d(_0x4ab600,0x0,'SIGINT\x20(double-tap)');_0x364e66=_0x4f805b,process[_0x602a61(0x48b)][_0x602a61(0x325)]('\x0a'),_0x31566f[_0x602a61(0x452)](0x0),_0x31566f[_0x602a61(0x34e)](),process['stderr'][_0x602a61(0x325)](_0x5cf930(_0x4c3062[_0x602a61(0x491)],_0x602a61(0x3c5)));}),process['on'](_0x3bf680(0x3a6),()=>_0x501c1d(_0x4ab600,0x0,_0x3bf680(0x3a6))),process['on'](_0x3bf680(0x36f),()=>_0x501c1d(_0x4ab600,0x0,'SIGBREAK')),_0x31566f[_0x3bf680(0x34e)](),_0x31566f;}return okdbShell={'start':_0xef2c30,'colorLog':_0x10fcd2,'lenientParse':_0x138e56,'_splitLine':_0x4c6da1,'_formatRouteHelpLines':_0x8a386d,'_routeSummary':_0x4ea688,'_routeTags':_0x489d7d},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x3849e1=_0x27fb86;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process['loadEnvFile']();}catch{}const _0x46367d=require$$1$1,_0x27690c=require$$1;function _0xa5732d(_0x176bb6){const _0x343dbd=_0x5271,_0x15cad3=_0x176bb6['slice'](0x2),_0x39a071={};let _0x57d662=0x0;while(_0x57d662<_0x15cad3[_0x343dbd(0x424)]){const _0x480d1a=_0x15cad3[_0x57d662];if(_0x480d1a===_0x343dbd(0x32d)||_0x480d1a==='-p')_0x39a071['port']=Number(_0x15cad3[++_0x57d662]);else{if(_0x480d1a===_0x343dbd(0x2be)||_0x480d1a==='-d')_0x39a071[_0x343dbd(0x2cc)]=_0x15cad3[++_0x57d662];else{if(_0x480d1a==='--key'||_0x480d1a==='-k')_0x39a071[_0x343dbd(0x1cd)]=_0x15cad3[++_0x57d662];else{if(_0x480d1a==='--config'||_0x480d1a==='-c')_0x39a071[_0x343dbd(0x239)]=_0x15cad3[++_0x57d662];else{if(_0x480d1a===_0x343dbd(0x1b5))_0x39a071[_0x343dbd(0x2bb)]=_0x15cad3[++_0x57d662];else{if(_0x480d1a===_0x343dbd(0x379))_0x39a071['noRepl']=!![];else{if(_0x480d1a===_0x343dbd(0x268))_0x39a071[_0x343dbd(0x3ba)]=!![];else{if(_0x480d1a===_0x343dbd(0x3b4)||_0x480d1a==='-e')_0x39a071[_0x343dbd(0x45b)]=_0x15cad3[++_0x57d662];else{if(_0x480d1a===_0x343dbd(0x35a))_0x39a071[_0x343dbd(0x332)]=_0x15cad3[++_0x57d662];else{if(_0x480d1a===_0x343dbd(0x24d))_0x39a071[_0x343dbd(0x231)]=!![];else{if(_0x480d1a===_0x343dbd(0x4a0))_0x39a071[_0x343dbd(0x2ea)]=!![];else{if(_0x480d1a===_0x343dbd(0x2c9))_0x39a071[_0x343dbd(0x23b)]=!![];else{if(_0x480d1a==='--open'){const _0x497ecc=[];while(_0x57d662+0x1<_0x15cad3[_0x343dbd(0x424)]&&!_0x15cad3[_0x57d662+0x1][_0x343dbd(0x47b)]('--')){_0x497ecc[_0x343dbd(0x290)](_0x15cad3[++_0x57d662]);}_0x39a071[_0x343dbd(0x483)]=_0x497ecc[_0x343dbd(0x424)]>0x0?_0x497ecc:!![];}else{if(_0x480d1a===_0x343dbd(0x1cc))_0x39a071[_0x343dbd(0x2b2)]=!![];else{if(_0x480d1a==='--name')_0x39a071['name']=_0x15cad3[++_0x57d662];else{if(_0x480d1a==='--password')_0x39a071[_0x343dbd(0x4a5)]=_0x15cad3[++_0x57d662];else{if(_0x480d1a===_0x343dbd(0x3f8))_0x39a071[_0x343dbd(0x476)]=_0x15cad3[++_0x57d662];else{if(_0x480d1a===_0x343dbd(0x2e2))_0x39a071['permissions']=_0x15cad3[++_0x57d662];else{if(_0x480d1a==='--grants')_0x39a071[_0x343dbd(0x3c0)]=_0x15cad3[++_0x57d662];else{if(_0x480d1a===_0x343dbd(0x3d4))_0x39a071['ttl']=_0x15cad3[++_0x57d662];else{if(_0x480d1a===_0x343dbd(0x1d2))_0x39a071[_0x343dbd(0x3da)]=_0x15cad3[++_0x57d662];else{if(_0x480d1a==='--username'||_0x480d1a==='-u')_0x39a071[_0x343dbd(0x3f2)]=_0x15cad3[++_0x57d662];else{if(_0x480d1a===_0x343dbd(0x1cf))_0x39a071['selfAddress']=_0x15cad3[++_0x57d662];else{if(_0x480d1a==='--version'||_0x480d1a==='-v'){const _0x4a2306=require$$2;console[_0x343dbd(0x1de)](_0x4a2306['version']),process['exit'](0x0);}else(_0x480d1a==='--help'||_0x480d1a==='-h')&&(_0x3136d1(),process[_0x343dbd(0x343)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x57d662++;}return _0x39a071;}function _0x3136d1(){const _0x1e4be0=_0x5271;console['log'](_0x1e4be0(0x25b));}const _0x2982e1=new Set([_0x3849e1(0x236),_0x3849e1(0x250),_0x3849e1(0x195),_0x3849e1(0x49c)]);function _0x4f1808(_0x518846){const _0xd6e123=_0x3849e1,_0x5f4e12=_0x518846[_0xd6e123(0x239)]?_0x46367d['resolve'](_0x518846['config']):_0x46367d[_0xd6e123(0x347)](_0xd6e123(0x475));let _0x2e2947={};if(_0x27690c[_0xd6e123(0x198)](_0x5f4e12))try{const _0x6cc3fd=_0x27690c[_0xd6e123(0x205)](_0x5f4e12,_0xd6e123(0x467))[_0xd6e123(0x478)](/^\uFEFF/,'');_0x2e2947=JSON[_0xd6e123(0x38e)](_0x6cc3fd),console[_0xd6e123(0x1de)](_0xd6e123(0x1f9)+_0x5f4e12);}catch(_0x225fc9){console[_0xd6e123(0x49c)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x5f4e12+':\x20'+_0x225fc9[_0xd6e123(0x1f3)]),process[_0xd6e123(0x343)](0x1);}const _0x38ca1d={'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},_0xaa4905={'port':_0x518846[_0xd6e123(0x31a)]??_0x2e2947[_0xd6e123(0x31a)]??_0x38ca1d[_0xd6e123(0x31a)]??0x2124,'dbPath':_0x518846[_0xd6e123(0x2cc)]??_0x2e2947[_0xd6e123(0x2cc)]??_0x38ca1d['path']??_0xd6e123(0x468),'key':_0x518846[_0xd6e123(0x1cd)]??_0x2e2947[_0xd6e123(0x1cd)]??_0x38ca1d[_0xd6e123(0x1cd)]??undefined,'logLevel':_0x518846[_0xd6e123(0x2bb)]??_0x2e2947[_0xd6e123(0x2bb)]??_0x38ca1d[_0xd6e123(0x2bb)]??_0xd6e123(0x250),'noRepl':_0x518846[_0xd6e123(0x2f1)]??_0x2e2947[_0xd6e123(0x2f1)]??_0x38ca1d['noRepl']??![],'noAdmin':_0x518846['noAdmin']??_0x2e2947['noAdmin']??_0x38ca1d['noAdmin']??![],'admin':_0x2e2947['admin']??{},'api':_0x2e2947[_0xd6e123(0x1a7)]??undefined,'auth':_0x2e2947[_0xd6e123(0x431)]??undefined,'mcp':_0x2e2947[_0xd6e123(0x217)]??undefined,'timeMachine':_0x2e2947[_0xd6e123(0x42c)]!==![]?_0x2e2947['timeMachine']??{}:![]};return _0x518846[_0xd6e123(0x483)]!==undefined&&(_0xaa4905[_0xd6e123(0x431)]=_0xaa4905[_0xd6e123(0x431)]||{},_0xaa4905[_0xd6e123(0x431)]['open']=_0x518846[_0xd6e123(0x483)]),_0x518846[_0xd6e123(0x2b2)]&&(_0xaa4905['debug']=_0xaa4905[_0xd6e123(0x236)]||{},_0xaa4905[_0xd6e123(0x236)][_0xd6e123(0x2b2)]=!![]),(!Number[_0xd6e123(0x44d)](_0xaa4905[_0xd6e123(0x31a)])||_0xaa4905[_0xd6e123(0x31a)]<0x1||_0xaa4905[_0xd6e123(0x31a)]>0xffff)&&(console[_0xd6e123(0x49c)](_0xd6e123(0x40b)+_0xaa4905[_0xd6e123(0x31a)]+_0xd6e123(0x42f)),process['exit'](0x1)),!_0x2982e1[_0xd6e123(0x339)](_0xaa4905['logLevel'])&&(console[_0xd6e123(0x49c)](_0xd6e123(0x413)+_0xaa4905[_0xd6e123(0x2bb)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0xd6e123(0x343)](0x1)),_0xaa4905;}function _0x2a835c(_0x35c750){return!!(_0x35c750&&typeof _0x35c750==='object'&&!Array['isArray'](_0x35c750)&&Object['keys'](_0x35c750)['length']>0x0);}const _0x4ff008=!process[_0x3849e1(0x48b)][_0x3849e1(0x1ba)]||!!process.env.NO_COLOR;function _0x148dae(_0x489da2,_0x5dc50a){return _0x4ff008?_0x5dc50a:'\x1b['+_0x489da2+'m'+_0x5dc50a+'\x1b[0m';}function _0x1908dc(_0x4fa458){const _0x14fb3f=_0x3849e1;if(!_0x4fa458||_0x4fa458['length']===0x0)return;const _0x401e2c='─'[_0x14fb3f(0x261)](0x38);process[_0x14fb3f(0x41f)][_0x14fb3f(0x325)]('\x0a'),process[_0x14fb3f(0x41f)][_0x14fb3f(0x325)](_0x148dae('33',_0x14fb3f(0x405)+_0x4fa458[_0x14fb3f(0x424)]+_0x14fb3f(0x398)+(_0x4fa458['length']>0x1?'S':'')+'\x0a')),process[_0x14fb3f(0x41f)][_0x14fb3f(0x325)]('\x20\x20'+_0x401e2c+'\x0a');for(const _0x3c2a21 of _0x4fa458){const _0x5d2b21=_0x3c2a21['level']===_0x14fb3f(0x49c)?_0x148dae('31',_0x14fb3f(0x49e)):_0x148dae('33','\x20\x20⚠');process['stderr']['write'](_0x5d2b21+'\x20\x20'+_0x148dae('1',_0x3c2a21[_0x14fb3f(0x383)])+'\x0a'),process[_0x14fb3f(0x41f)][_0x14fb3f(0x325)](_0x14fb3f(0x2a8)+_0x3c2a21[_0x14fb3f(0x1f3)]+'\x0a');if(_0x3c2a21[_0x14fb3f(0x1f6)])process[_0x14fb3f(0x41f)][_0x14fb3f(0x325)](_0x14fb3f(0x2a8)+_0x148dae('2',_0x14fb3f(0x426)+_0x3c2a21[_0x14fb3f(0x1f6)])+'\x0a');process[_0x14fb3f(0x41f)][_0x14fb3f(0x325)]('\x0a');}process[_0x14fb3f(0x41f)][_0x14fb3f(0x325)]('\x20\x20'+_0x401e2c+'\x0a\x0a');}function _0x3213c7(_0x17995b,_0x540c94){const _0x4b889c=_0x3849e1,_0x3950f9=_0x17995b[_0x4b889c(0x396)][_0x4b889c(0x2a6)](_0x540c94);return new Promise((_0x1e3965,_0x56643a)=>{const _0x59e6da=_0x4b889c;_0x3950f9[_0x59e6da(0x497)]('listening',_0x1e3965),_0x3950f9['once']('error',_0x56643a);});}async function _0x27e83b(_0x174315){const _0x142e07=_0x3849e1,_0x3035f3=require$$3;console['log'](_0x142e07(0x23c));let _0x51fe8d=!![];const _0x24429a=(_0x21fd6b,_0x54e563)=>{const _0x1acda1=_0x142e07;console[_0x1acda1(0x1de)]('\x20\x20'+(_0x21fd6b?'✓':'✗')+'\x20'+_0x54e563);if(!_0x21fd6b)_0x51fe8d=![];},_0x27f4da=Number(process[_0x142e07(0x20e)]['replace']('v','')[_0x142e07(0x27e)]('.')[0x0]);_0x24429a(_0x27f4da>=0x12,_0x142e07(0x255)+process[_0x142e07(0x20e)]+(_0x27f4da<0x12?_0x142e07(0x1f1):''));const _0x88b3b8=_0x46367d[_0x142e07(0x347)](_0x174315[_0x142e07(0x1a5)]);try{_0x27690c[_0x142e07(0x362)](_0x88b3b8,{'recursive':!![]});const _0x379676=_0x46367d[_0x142e07(0x3d5)](_0x88b3b8,_0x142e07(0x454));_0x27690c[_0x142e07(0x2fc)](_0x379676,''),_0x27690c[_0x142e07(0x31e)](_0x379676),_0x24429a(!![],_0x142e07(0x260)+_0x88b3b8);}catch(_0x1aae9c){_0x24429a(![],'database\x20path\x20not\x20writable:\x20'+_0x88b3b8+_0x142e07(0x331)+_0x1aae9c[_0x142e07(0x1f3)]+')');}const _0x267810=await new Promise(_0x481901=>{const _0x1fb5a3=_0x142e07,_0x133a02=_0x3035f3[_0x1fb5a3(0x371)]();_0x133a02[_0x1fb5a3(0x497)](_0x1fb5a3(0x49c),()=>_0x481901(![])),_0x133a02['once'](_0x1fb5a3(0x446),()=>{const _0x1d3f93=_0x1fb5a3;_0x133a02[_0x1d3f93(0x2d2)](),_0x481901(!![]);}),_0x133a02[_0x1fb5a3(0x2a6)](_0x174315[_0x1fb5a3(0x31a)],_0x1fb5a3(0x403));});_0x24429a(_0x267810,_0x142e07(0x2c2)+_0x174315[_0x142e07(0x31a)]+'\x20'+(_0x267810?_0x142e07(0x271):_0x142e07(0x2c5)));const _0x38c525=_0x46367d[_0x142e07(0x347)]('.kdbconfig');if(_0x27690c[_0x142e07(0x198)](_0x38c525))try{JSON['parse'](_0x27690c[_0x142e07(0x205)](_0x38c525,_0x142e07(0x467))['replace'](/^\uFEFF/,'')),_0x24429a(!![],'config\x20file\x20valid:\x20'+_0x38c525);}catch(_0x183c01){_0x24429a(![],_0x142e07(0x37a)+_0x183c01['message']);}else _0x24429a(!![],_0x142e07(0x257));console[_0x142e07(0x1de)](''),_0x51fe8d?console['log']('\x20\x20All\x20checks\x20passed.\x0a'):(console[_0x142e07(0x1de)](_0x142e07(0x43e)),process[_0x142e07(0x343)](0x1));}async function _0x171b47(){const _0x255f68=_0x3849e1,_0x474594=_0x46367d[_0x255f68(0x347)](_0x255f68(0x475));!_0x27690c[_0x255f68(0x198)](_0x474594)?(_0x27690c[_0x255f68(0x2fc)](_0x474594,JSON['stringify']({'port':0x2124,'path':'./okdb-data','logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x255f68(0x1de)]('[okdb]\x20created\x20.kdbconfig')):console[_0x255f68(0x1de)](_0x255f68(0x320));const _0x121cd3=_0x46367d[_0x255f68(0x347)](_0x255f68(0x468));!_0x27690c[_0x255f68(0x198)](_0x121cd3)?(_0x27690c['mkdirSync'](_0x121cd3,{'recursive':!![]}),console[_0x255f68(0x1de)](_0x255f68(0x32c))):console[_0x255f68(0x1de)](_0x255f68(0x238)),console[_0x255f68(0x1de)](_0x255f68(0x25a));}async function _0x6f980a(_0x88ccc2){const _0xe82be3=_0x3849e1,_0x58a8c3=_0x46367d['resolve'](_0x88ccc2[_0xe82be3(0x1a5)]);if(!_0x27690c[_0xe82be3(0x198)](_0x58a8c3)){console[_0xe82be3(0x1de)](_0xe82be3(0x3e1)+_0x58a8c3+_0xe82be3(0x43f));return;}const _0x510406=require$$0$2,_0x39d7f9=_0x510406[_0xe82be3(0x1eb)]({'input':process[_0xe82be3(0x33d)],'output':process['stdout']}),_0x2c3e9d=await new Promise(_0x1f17c8=>_0x39d7f9['question'](_0xe82be3(0x330)+_0x58a8c3+_0xe82be3(0x30c),_0x1f17c8));_0x39d7f9[_0xe82be3(0x2d2)](),console[_0xe82be3(0x1de)]('');if(_0x2c3e9d['trim']()[_0xe82be3(0x3a9)]()!=='yes'){console[_0xe82be3(0x1de)](_0xe82be3(0x340));return;}_0x27690c[_0xe82be3(0x3eb)](_0x58a8c3,{'recursive':!![],'force':!![]}),console[_0xe82be3(0x1de)](_0xe82be3(0x3f6)+_0x58a8c3+'\x20deleted');}async function _0x1a45c6(_0x161342,_0x48e731){const _0x48112d=_0x3849e1,_0xa06ea0=require$$5,_0x1c47e2=_0x46367d['resolve'](_0x48e731[_0x48112d(0x1a5)]);console['log'](_0x48112d(0x210)+_0x1c47e2+'…');const _0x9fc745=new _0xa06ea0(_0x1c47e2,_0x48e731[_0x48112d(0x1cd)]?{'encryptionKey':_0x48e731[_0x48112d(0x1cd)]}:{});await _0x9fc745[_0x48112d(0x483)](),console['log']('[okdb]\x20backing\x20up\x20to\x20'+_0x161342+'…');const {envs:_0x283f83}=await _0x9fc745[_0x48112d(0x2e3)][_0x48112d(0x3b2)](_0x161342);for(const _0x4c13aa of _0x283f83){const _0x4d9ba6=_0x4c13aa['sizeBefore']>0x0?_0x48112d(0x331)+(_0x4c13aa[_0x48112d(0x2ee)]/0x400/0x400)['toFixed'](0x2)+_0x48112d(0x243)+(_0x4c13aa[_0x48112d(0x213)]/0x400/0x400)[_0x48112d(0x416)](0x2)+_0x48112d(0x3e9):'';console[_0x48112d(0x1de)](_0x48112d(0x3dc)+_0x4c13aa[_0x48112d(0x300)]+_0x48112d(0x404)+_0x4c13aa[_0x48112d(0x4a9)]+_0x4d9ba6);}await _0x9fc745[_0x48112d(0x2d2)](),console[_0x48112d(0x1de)](_0x48112d(0x302));}async function _0x2b3b03(_0x349e0b,_0x8139fc,_0xe48316){const _0x2aadd7=_0x3849e1,_0x5c1755=require$$5,_0x1a22d1=_0x46367d[_0x2aadd7(0x347)](_0x8139fc[_0x2aadd7(0x1a5)]),_0x29a84f=_0xe48316[_0x2aadd7(0x45b)]??_0x2aadd7(0x1b0),_0x335ea2=_0xe48316[_0x2aadd7(0x332)]?_0xe48316[_0x2aadd7(0x332)][_0x2aadd7(0x27e)](',')[_0x2aadd7(0x29c)](_0x357ace=>_0x357ace[_0x2aadd7(0x388)]()):null;console[_0x2aadd7(0x1de)](_0x2aadd7(0x210)+_0x1a22d1+'…');const _0x208bb8=new _0x5c1755(_0x1a22d1,_0x8139fc[_0x2aadd7(0x1cd)]?{'encryptionKey':_0x8139fc['key']}:{});await _0x208bb8['open'](),console['log']('[okdb]\x20exporting\x20env\x20\x22'+_0x29a84f+_0x2aadd7(0x49f)+_0x349e0b+'…');const _0x51c941=await _0x208bb8[_0x2aadd7(0x2e3)]['exportToFile'](_0x349e0b,{'envName':_0x29a84f,'types':_0x335ea2,'includeChanges':!!_0xe48316[_0x2aadd7(0x231)]});console[_0x2aadd7(0x1de)](_0x2aadd7(0x3bc)+_0x51c941[_0x2aadd7(0x332)]+_0x2aadd7(0x341)+_0x51c941[_0x2aadd7(0x387)]+_0x2aadd7(0x47e)+_0x51c941[_0x2aadd7(0x231)]);if(_0xe48316[_0x2aadd7(0x2ea)]){const _0x15a6d6=_0x46367d[_0x2aadd7(0x3d5)](_0x46367d[_0x2aadd7(0x3e5)](_0x349e0b),_0x2aadd7(0x2ea));process[_0x2aadd7(0x48b)][_0x2aadd7(0x325)]('[okdb]\x20exporting\x20blobs…');const {count:_0x2f23e3,bytes:_0x14f675}=await _0x208bb8['migrate'][_0x2aadd7(0x410)](_0x15a6d6);console[_0x2aadd7(0x1de)](_0x2aadd7(0x3f3)+_0x15a6d6+_0x2aadd7(0x331)+_0x2f23e3+'\x20file'+(_0x2f23e3!==0x1?'s':'')+',\x20'+(_0x14f675/0x400/0x400)[_0x2aadd7(0x416)](0x2)+_0x2aadd7(0x3e9));}await _0x208bb8[_0x2aadd7(0x2d2)](),console[_0x2aadd7(0x1de)](_0x2aadd7(0x264));}async function _0x52eea5(_0x4896d3,_0x32464c,_0x5a0b16){const _0x4a1f84=_0x3849e1,_0x1709e7=require$$5,_0x208c96=_0x46367d[_0x4a1f84(0x347)](_0x32464c[_0x4a1f84(0x1a5)]),_0x21640d=_0x5a0b16[_0x4a1f84(0x45b)]??null,_0x65356=_0x5a0b16[_0x4a1f84(0x332)]?_0x5a0b16[_0x4a1f84(0x332)][_0x4a1f84(0x27e)](',')[_0x4a1f84(0x29c)](_0x396a59=>_0x396a59[_0x4a1f84(0x388)]()):null,_0x44d490=!!_0x5a0b16[_0x4a1f84(0x23b)];console['log']('[okdb]\x20opening\x20'+_0x208c96+'…');const _0x530527=new _0x1709e7(_0x208c96,_0x32464c[_0x4a1f84(0x1cd)]?{'encryptionKey':_0x32464c[_0x4a1f84(0x1cd)]}:{});await _0x530527['open'](),console[_0x4a1f84(0x1de)](_0x4a1f84(0x26e)+_0x4896d3+'…');const _0x535bc0=await _0x530527[_0x4a1f84(0x2e3)][_0x4a1f84(0x2a7)](_0x4896d3,{'envName':_0x21640d,'types':_0x65356,'dropExisting':_0x44d490,'includeChanges':!!_0x5a0b16[_0x4a1f84(0x231)],'onProgress':({type:_0x513fa5,count:_0x1daf9b})=>{const _0x46541f=_0x4a1f84;process['stdout']['write'](_0x46541f(0x216)+_0x513fa5+':\x20'+_0x1daf9b+_0x46541f(0x298));}});process[_0x4a1f84(0x48b)][_0x4a1f84(0x325)]('\x0a'),console[_0x4a1f84(0x1de)](_0x4a1f84(0x406)+_0x535bc0[_0x4a1f84(0x332)]+_0x4a1f84(0x341)+_0x535bc0[_0x4a1f84(0x387)]+_0x4a1f84(0x47e)+_0x535bc0[_0x4a1f84(0x231)]);if(_0x5a0b16[_0x4a1f84(0x2ea)]){const _0x1c8e6d=_0x46367d['join'](_0x46367d[_0x4a1f84(0x3e5)](_0x4896d3),'blobs');if(_0x27690c[_0x4a1f84(0x198)](_0x1c8e6d)){const {imported:_0x4fcdd4,skipped:_0x3e580c}=await _0x530527[_0x4a1f84(0x2e3)][_0x4a1f84(0x2c3)](_0x1c8e6d);console['log'](_0x4a1f84(0x427)+_0x4fcdd4+_0x4a1f84(0x2dd)+_0x3e580c);}}await _0x530527[_0x4a1f84(0x2d2)](),console['log'](_0x4a1f84(0x35b));}async function _0xcb2f2c(_0x2eb191,_0x3a0def){const _0x32a592=_0x3849e1;_0x3a0def[_0x32a592(0x4a5)]&&!_0x3a0def[_0x32a592(0x300)]&&(console[_0x32a592(0x49c)](_0x32a592(0x3ec)),process[_0x32a592(0x343)](0x1));const _0x5d0305=_0x3a0def[_0x32a592(0x3cb)]?_0x3a0def[_0x32a592(0x3cb)]['split'](',')[_0x32a592(0x29c)](_0x5e574a=>_0x5e574a[_0x32a592(0x388)]())['filter'](Boolean):[];let _0x293a5c={};if(_0x3a0def['grants'])try{_0x293a5c=JSON[_0x32a592(0x38e)](_0x3a0def[_0x32a592(0x3c0)]);if(typeof _0x293a5c!=='object'||Array[_0x32a592(0x3fd)](_0x293a5c)||_0x293a5c===null)throw new Error();}catch{console[_0x32a592(0x49c)](_0x32a592(0x44f)),process[_0x32a592(0x343)](0x1);}const _0x2b539e=require$$5,{randomToken:_0x1db6c9,hashToken:_0x4070a1,hashPassword:_0x412ad1}=requireOkdbAuthTokens(),_0x18f312=require$$0,_0x4c2aa1=_0x46367d[_0x32a592(0x347)](_0x2eb191[_0x32a592(0x1a5)]),_0x3fbe63=new _0x2b539e(_0x4c2aa1,_0x2eb191[_0x32a592(0x1cd)]?{'encryptionKey':_0x2eb191[_0x32a592(0x1cd)]}:{});await _0x3fbe63[_0x32a592(0x483)]();try{await _0x3fbe63['auth']['_ensureTokensType']();if(_0x3a0def[_0x32a592(0x300)]){const _0xe8bb3=await _0x3fbe63[_0x32a592(0x431)][_0x32a592(0x434)](_0x3a0def['name']);_0xe8bb3&&(console[_0x32a592(0x49c)]('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x3a0def[_0x32a592(0x300)]+_0x32a592(0x47a)),process['exit'](0x1));}const _0x579620=_0x1db6c9(0x20),_0x5262a1=_0x4070a1(_0x579620),_0x259b7c=_0x3a0def['password']?await _0x412ad1(_0x3a0def[_0x32a592(0x4a5)]):null,_0x303b5e=_0x18f312['randomUUID'](),_0x251b47={'tokenHash':_0x5262a1,'name':_0x3a0def[_0x32a592(0x300)]||null,'passwordHash':_0x259b7c,'label':_0x3a0def[_0x32a592(0x476)]||null,'permissions':_0x5d0305,'grants':_0x293a5c,'createdAt':Date[_0x32a592(0x2f5)](),'lastUsedAt':null},_0x1c3525=_0x3a0def[_0x32a592(0x3cd)]?{'ttl':Number(_0x3a0def[_0x32a592(0x3cd)])}:undefined;await _0x3fbe63[_0x32a592(0x35f)][_0x32a592(0x230)]('~tokens',_0x303b5e,_0x251b47,_0x1c3525),console[_0x32a592(0x1de)](_0x32a592(0x307)),console[_0x32a592(0x1de)](_0x32a592(0x38b)+_0x303b5e),console[_0x32a592(0x1de)](_0x32a592(0x480)+(_0x3a0def[_0x32a592(0x300)]||_0x32a592(0x266))),console[_0x32a592(0x1de)](_0x32a592(0x274)+(_0x3a0def[_0x32a592(0x476)]||'(unset)')),console[_0x32a592(0x1de)](_0x32a592(0x1c8)+(_0x5d0305[_0x32a592(0x3d5)](',\x20')||_0x32a592(0x389))),console['log'](_0x32a592(0x227)),console[_0x32a592(0x1de)](_0x32a592(0x2e5)+_0x579620+'\x0a');}finally{await _0x3fbe63['close']();}}async function _0x2b7eb7(_0x55207a){const _0x1dc180=_0x3849e1,_0x394fca=require$$5,_0x175e63=_0x46367d[_0x1dc180(0x347)](_0x55207a['dbPath']),_0x4ce251=new _0x394fca(_0x175e63,_0x55207a[_0x1dc180(0x1cd)]?{'encryptionKey':_0x55207a[_0x1dc180(0x1cd)]}:{});await _0x4ce251['open']();try{const _0x21a5e6=_0x4ce251[_0x1dc180(0x35f)];if(!_0x21a5e6||!_0x21a5e6[_0x1dc180(0x1d5)](_0x1dc180(0x1b6))){console[_0x1dc180(0x1de)](_0x1dc180(0x367));return;}const _0x370f0d=[];for(const {key:_0x395fee,value:_0x10252d}of _0x21a5e6[_0x1dc180(0x1bd)](_0x1dc180(0x1b6))){_0x370f0d[_0x1dc180(0x290)]({'id':_0x395fee,'name':_0x10252d['name']||'(unset)','label':_0x10252d[_0x1dc180(0x476)]||_0x1dc180(0x266),'permissions':Array[_0x1dc180(0x3fd)](_0x10252d['permissions'])?_0x10252d[_0x1dc180(0x3cb)][_0x1dc180(0x3d5)](','):'','created':_0x10252d['createdAt']?new Date(_0x10252d['createdAt'])[_0x1dc180(0x2a3)]()[_0x1dc180(0x48a)](0x0,0xa):''});}if(_0x370f0d[_0x1dc180(0x424)]===0x0){console[_0x1dc180(0x1de)](_0x1dc180(0x367));return;}const _0x1a6c50=!process[_0x1dc180(0x48b)][_0x1dc180(0x2b6)]||process['stdout'][_0x1dc180(0x2b6)]>=0x64,_0x3889a7=_0x1a6c50?0x24:0xa,_0x4252dd=['ID'[_0x1dc180(0x46f)](_0x3889a7),_0x1dc180(0x306)[_0x1dc180(0x46f)](0x10),'LABEL'['padEnd'](0x14),'PERMISSIONS'['padEnd'](0x14),_0x1dc180(0x43b)][_0x1dc180(0x3d5)]('\x20\x20');console[_0x1dc180(0x1de)]('\x0a'+_0x4252dd),console[_0x1dc180(0x1de)]('-'[_0x1dc180(0x261)](_0x4252dd['length']));for(const _0x312bc5 of _0x370f0d){const _0x399143=_0x1a6c50?_0x312bc5['id']:_0x312bc5['id'][_0x1dc180(0x48a)](0x0,0x8)+'…';console[_0x1dc180(0x1de)]([_0x399143['padEnd'](_0x3889a7),_0x312bc5[_0x1dc180(0x300)][_0x1dc180(0x48a)](0x0,0x10)[_0x1dc180(0x46f)](0x10),_0x312bc5[_0x1dc180(0x476)][_0x1dc180(0x48a)](0x0,0x14)[_0x1dc180(0x46f)](0x14),_0x312bc5[_0x1dc180(0x3cb)]['slice'](0x0,0x14)[_0x1dc180(0x46f)](0x14),_0x312bc5[_0x1dc180(0x418)]][_0x1dc180(0x3d5)]('\x20\x20'));}console[_0x1dc180(0x1de)]('');}finally{await _0x4ce251[_0x1dc180(0x2d2)]();}}async function _0xda9caa(_0x1a88c8,_0x5c37b2){const _0x1dadf8=_0x3849e1;!_0x1a88c8&&(console[_0x1dadf8(0x49c)](_0x1dadf8(0x471)),process[_0x1dadf8(0x343)](0x1));const _0x3a33ad=require$$5,_0x52b696=_0x46367d[_0x1dadf8(0x347)](_0x5c37b2[_0x1dadf8(0x1a5)]),_0x556c5f=new _0x3a33ad(_0x52b696,_0x5c37b2['key']?{'encryptionKey':_0x5c37b2[_0x1dadf8(0x1cd)]}:{});await _0x556c5f[_0x1dadf8(0x483)]();try{const _0x52b6b0=_0x556c5f['_systemEnv'];(!_0x52b6b0||!_0x52b6b0[_0x1dadf8(0x1d5)](_0x1dadf8(0x1b6)))&&(console[_0x1dadf8(0x49c)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x1a88c8+'\x22'),process[_0x1dadf8(0x343)](0x1));let _0x464061=null,_0x5469fd=null;const _0x324bfa=_0x52b6b0[_0x1dadf8(0x338)](_0x1dadf8(0x1b6),_0x1a88c8);if(_0x324bfa)_0x464061=_0x1a88c8,_0x5469fd=_0x324bfa;else{const _0x31fd36=[];for(const {key:_0x260aa6,value:_0x38f91a}of _0x52b6b0[_0x1dadf8(0x1bd)](_0x1dadf8(0x1b6))){if(_0x260aa6[_0x1dadf8(0x47b)](_0x1a88c8))_0x31fd36[_0x1dadf8(0x290)]({'key':_0x260aa6,'value':_0x38f91a});}_0x31fd36[_0x1dadf8(0x424)]===0x0&&(console[_0x1dadf8(0x49c)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x1a88c8+'\x22'),process[_0x1dadf8(0x343)](0x1));if(_0x31fd36[_0x1dadf8(0x424)]>0x1){console['error'](_0x1dadf8(0x1e5)+_0x1a88c8+_0x1dadf8(0x33c)+_0x31fd36[_0x1dadf8(0x424)]+_0x1dadf8(0x484));for(const _0xe56609 of _0x31fd36){console[_0x1dadf8(0x49c)]('\x20\x20'+_0xe56609[_0x1dadf8(0x1cd)]+_0x1dadf8(0x311)+(_0xe56609[_0x1dadf8(0x32e)][_0x1dadf8(0x300)]||'(unset)')+')');}process['exit'](0x1);}_0x464061=_0x31fd36[0x0][_0x1dadf8(0x1cd)],_0x5469fd=_0x31fd36[0x0]['value'];}await _0x52b6b0[_0x1dadf8(0x2f8)](_0x1dadf8(0x1b6),_0x464061),console[_0x1dadf8(0x1de)](_0x1dadf8(0x3bd)+_0x464061+'\x20\x20(name:\x20'+(_0x5469fd['name']||_0x1dadf8(0x266))+',\x20label:\x20'+(_0x5469fd[_0x1dadf8(0x476)]||_0x1dadf8(0x266))+')');}finally{await _0x556c5f[_0x1dadf8(0x2d2)]();}}function _0x2bc2c3(_0x55b271,_0x29f333){const _0x3b7fea=_0x3849e1;if(!_0x55b271[_0x3b7fea(0x29e)])return'pending';const _0xe10036=_0x55b271['expiresAt'];if(!_0xe10036)return _0x3b7fea(0x46d);if(_0x29f333>_0xe10036)return'expired';return _0x3b7fea(0x46d);}function _0x2e2dd1(_0x5ecfcc){const _0x502a81=_0x3849e1;if(!_0x5ecfcc||typeof _0x5ecfcc!==_0x502a81(0x40e))return'';const _0x13c85e=Object[_0x502a81(0x2c0)](_0x5ecfcc)[_0x502a81(0x3ad)](([,_0x45720b])=>_0x45720b)['map'](([_0x13e06a])=>_0x13e06a);if(_0x13c85e['length']===0x0)return _0x502a81(0x389);if(_0x13c85e[_0x502a81(0x424)]<=0x3)return _0x13c85e['join']('\x20');return _0x13c85e[_0x502a81(0x48a)](0x0,0x3)[_0x502a81(0x3d5)]('\x20')+('\x20+'+(_0x13c85e[_0x502a81(0x424)]-0x3));}async function _0xb82748(_0xdc664d){const _0x49ca2d=_0x3849e1,_0x3a183d=require$$5,_0x5e92fc=requireOkdbLicenseCodec(),{_C:_0x165d85}=requireOkdbLicense(),_0x2dbc7c=_0x46367d[_0x49ca2d(0x347)](_0xdc664d['dbPath']),_0x4e5224=new _0x3a183d(_0x2dbc7c,_0xdc664d['key']?{'encryptionKey':_0xdc664d[_0x49ca2d(0x1cd)]}:{});await _0x4e5224[_0x49ca2d(0x483)]();try{const _0x259ac4=_0x4e5224[_0x49ca2d(0x35f)],_0x40078e=_0x259ac4?.['db']?.[_0x49ca2d(0x338)]?.(_0x49ca2d(0x279))??0x0,_0x2fbeb0=[..._0x4e5224['_envs']['keys']()][_0x49ca2d(0x3ad)](_0x35c06b=>!_0x35c06b[_0x49ca2d(0x47b)]('~'))[_0x49ca2d(0x424)],_0x198d35=_0x4e5224['_license']?.[_0x49ca2d(0x19d)];if(_0x198d35){const _0x2d05de=_0x198d35[_0x49ca2d(0x36a)]===!![],_0xf4e83f=_0x2d05de?_0x49ca2d(0x1f4):_0x4e5224[_0x49ca2d(0x244)][_0x49ca2d(0x46d)]?.['licensee']||_0x49ca2d(0x1dc);console[_0x49ca2d(0x1de)](''),console[_0x49ca2d(0x1de)](_0x49ca2d(0x275)+_0xf4e83f);const _0xaad46e=_0x198d35[_0x49ca2d(0x2fd)]||{};if(_0xaad46e['maxWrites']){const _0x598097=Math[_0x49ca2d(0x493)](_0x40078e/_0xaad46e[_0x49ca2d(0x24e)]*0x64);console[_0x49ca2d(0x1de)](_0x49ca2d(0x4ad)+_0x40078e[_0x49ca2d(0x1ad)]()+_0x49ca2d(0x482)+_0xaad46e['maxWrites'][_0x49ca2d(0x1ad)]()+_0x49ca2d(0x331)+_0x598097+'%)');}else console[_0x49ca2d(0x1de)]('\x20\x20Writes:\x20\x20'+_0x40078e[_0x49ca2d(0x1ad)]());_0xaad46e[_0x49ca2d(0x1c7)]?console['log'](_0x49ca2d(0x31f)+_0x2fbeb0+_0x49ca2d(0x482)+_0xaad46e[_0x49ca2d(0x1c7)]):console[_0x49ca2d(0x1de)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x2fbeb0),_0x165d85?.[_0x49ca2d(0x48c)]&&console[_0x49ca2d(0x1de)](_0x49ca2d(0x442)+_0x165d85[_0x49ca2d(0x48c)]+_0x49ca2d(0x4aa));}if(!_0x259ac4||!_0x259ac4[_0x49ca2d(0x1d5)](_0x49ca2d(0x1c2))){console[_0x49ca2d(0x1de)](''),console[_0x49ca2d(0x1de)](_0x49ca2d(0x2ed)),console[_0x49ca2d(0x1de)]('');return;}const _0x25b6b2=[],_0x4d29ad=Date[_0x49ca2d(0x2f5)](),_0x3fb2ca=_0x4e5224['id'],_0x590ca7=_0x49ca2d(0x479);for(const {key:_0x57f10a,value:_0x14bf27}of _0x259ac4[_0x49ca2d(0x1bd)](_0x49ca2d(0x1c2))){const _0x2e130c=_0x14bf27[_0x49ca2d(0x428)]?Buffer[_0x49ca2d(0x283)](_0x14bf27[_0x49ca2d(0x428)],_0x49ca2d(0x28a)):Buffer[_0x49ca2d(0x345)](0x8);let _0x11f6c2='';try{_0x11f6c2=_0x5e92fc[_0x49ca2d(0x201)](_0x3fb2ca,_0x2e130c,_0x590ca7)[_0x49ca2d(0x39b)];}catch{}_0x25b6b2['push']({'id':_0x57f10a,'licensee':_0x14bf27[_0x49ca2d(0x35d)]||'','expires':_0x14bf27['expiresAt']?new Date(_0x14bf27[_0x49ca2d(0x3a0)])[_0x49ca2d(0x2a3)]()['slice'](0x0,0xa):'','features':_0x2e2dd1(_0x14bf27[_0x49ca2d(0x1d7)]),'pin':_0x11f6c2,'status':_0x2bc2c3(_0x14bf27,_0x4d29ad)});}if(_0x25b6b2[_0x49ca2d(0x424)]===0x0){console['log'](''),console[_0x49ca2d(0x1de)](_0x49ca2d(0x2ed)),console[_0x49ca2d(0x1de)]('');return;}const _0xfd4461=['\x20\x20'+'ID'[_0x49ca2d(0x46f)](0xe),'LICENSEE'['padEnd'](0xe),'EXPIRES'[_0x49ca2d(0x46f)](0xc),_0x49ca2d(0x420)[_0x49ca2d(0x46f)](0x1e),_0x49ca2d(0x46e)[_0x49ca2d(0x46f)](0xa),_0x49ca2d(0x23e)][_0x49ca2d(0x3d5)]('\x20');console[_0x49ca2d(0x1de)]('\x0a'+_0xfd4461);for(const _0x45b043 of _0x25b6b2){const _0x1769b1=_0x45b043['id'][_0x49ca2d(0x48a)](0x0,0x8)+'…';console['log'](['\x20\x20'+_0x1769b1[_0x49ca2d(0x46f)](0xe),_0x45b043['licensee'][_0x49ca2d(0x48a)](0x0,0xe)[_0x49ca2d(0x46f)](0xe),_0x45b043[_0x49ca2d(0x218)][_0x49ca2d(0x46f)](0xc),_0x45b043[_0x49ca2d(0x1d7)]['slice'](0x0,0x1e)[_0x49ca2d(0x46f)](0x1e),_0x45b043['pin']['padEnd'](0xa),_0x45b043[_0x49ca2d(0x365)]][_0x49ca2d(0x3d5)]('\x20'));}console['log']('');}finally{await _0x4e5224[_0x49ca2d(0x2d2)]();}}async function _0x58f627(_0x4382da,_0x2a2fc5){const _0x4084ec=_0x3849e1,_0x1151d2=require$$5,_0xd1b3=requireOkdbLicenseCodec();let _0x4d6322=_0x4382da;(_0xd1b3[_0x4084ec(0x460)](_0x4382da)===_0x4084ec(0x2cc)||_0x27690c[_0x4084ec(0x198)](_0x4382da)&&_0x27690c[_0x4084ec(0x399)](_0x4382da)['isFile']())&&(_0x4d6322=_0x27690c[_0x4084ec(0x205)](_0x4382da,_0x4084ec(0x467))[_0x4084ec(0x388)]());const _0x328a31=_0x46367d[_0x4084ec(0x347)](_0x2a2fc5[_0x4084ec(0x1a5)]),_0x4d97e1=new _0x1151d2(_0x328a31,_0x2a2fc5[_0x4084ec(0x1cd)]?{'encryptionKey':_0x2a2fc5[_0x4084ec(0x1cd)]}:{});await _0x4d97e1[_0x4084ec(0x483)]();try{!_0x4d97e1[_0x4084ec(0x244)]&&(console[_0x4084ec(0x49c)](_0x4084ec(0x38c)),process[_0x4084ec(0x343)](0x1));let _0x3d7cce;try{_0x3d7cce=await _0x4d97e1['_license']['addLicense'](_0x4d6322);}catch(_0xae439e){console[_0x4084ec(0x49c)](_0x4084ec(0x1f8)+_0xae439e[_0x4084ec(0x1f3)]),process[_0x4084ec(0x343)](0x1);}const _0x28ad53=_0x4d97e1[_0x4084ec(0x244)][_0x4084ec(0x294)](),_0x1728e4=_0x28ad53[_0x4084ec(0x425)](_0x3e7954=>_0x3e7954[_0x4084ec(0x3b7)]===_0x3d7cce['id'])?.[_0x4084ec(0x39b)]||'',_0x448f54=Object[_0x4084ec(0x2c0)](_0x3d7cce[_0x4084ec(0x1d7)]||{})[_0x4084ec(0x3ad)](([,_0x1c3f20])=>_0x1c3f20)[_0x4084ec(0x29c)](([_0x38d860])=>_0x38d860),_0x4e64db=_0x3d7cce[_0x4084ec(0x2fd)]||{},_0x3fc19b=[_0x4e64db[_0x4084ec(0x1c7)]?_0x4084ec(0x304)+_0x4e64db[_0x4084ec(0x1c7)]:null,_0x4e64db[_0x4084ec(0x1ac)]?'types/env='+_0x4e64db[_0x4084ec(0x1ac)]:null,_0x4e64db[_0x4084ec(0x28f)]?_0x4084ec(0x1e4)+_0x4e64db['syncPeers']:null,_0x4e64db['maxWrites']?'writes='+_0x4e64db[_0x4084ec(0x24e)]['toLocaleString']():null]['filter'](Boolean)[_0x4084ec(0x3d5)]('\x20\x20'),_0x40379f=_0x3d7cce[_0x4084ec(0x47d)]===_0xd1b3[_0x4084ec(0x1c1)];console[_0x4084ec(0x1de)](_0x4084ec(0x1d0)),console[_0x4084ec(0x1de)](_0x4084ec(0x350)+_0x3d7cce['id']),console['log'](_0x4084ec(0x29a)+_0x3d7cce[_0x4084ec(0x35d)]),console[_0x4084ec(0x1de)](_0x4084ec(0x1b8)+new Date(_0x3d7cce[_0x4084ec(0x3a0)])[_0x4084ec(0x2a3)]()[_0x4084ec(0x48a)](0x0,0xa)),console[_0x4084ec(0x1de)](_0x4084ec(0x30b)+(_0x448f54['join'](',\x20')||_0x4084ec(0x389)));if(_0x3fc19b)console[_0x4084ec(0x1de)](_0x4084ec(0x386)+_0x3fc19b);_0x40379f?(console['log'](_0x4084ec(0x333)),console[_0x4084ec(0x1de)]('')):(console[_0x4084ec(0x1de)](_0x4084ec(0x2eb)+_0x1728e4),console['log'](_0x4084ec(0x1ed)),console['log'](''),console[_0x4084ec(0x1de)](_0x4084ec(0x1fe)),console[_0x4084ec(0x1de)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x1728e4+_0x4084ec(0x349)),console[_0x4084ec(0x1de)](_0x4084ec(0x329)),console[_0x4084ec(0x1de)](_0x4084ec(0x3fb)),console[_0x4084ec(0x1de)](''));}finally{await _0x4d97e1[_0x4084ec(0x2d2)]();}}async function _0x3f476a(_0x9346ce,_0x45f183){const _0x186e35=_0x3849e1,_0x12511a=require$$5,_0x4926c1=_0x46367d['resolve'](_0x45f183[_0x186e35(0x1a5)]),_0x2a6e01=new _0x12511a(_0x4926c1,_0x45f183[_0x186e35(0x1cd)]?{'encryptionKey':_0x45f183['key']}:{});await _0x2a6e01['open']();try{!_0x2a6e01[_0x186e35(0x244)]&&(console['error']('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x186e35(0x343)](0x1));let _0x332367;try{_0x332367=await _0x2a6e01[_0x186e35(0x244)]['activateLicense'](_0x9346ce[_0x186e35(0x388)]());}catch(_0xb0575){console[_0x186e35(0x49c)]('[okdb]\x20error:\x20'+_0xb0575[_0x186e35(0x1f3)]),console['error'](''),console[_0x186e35(0x49c)](_0x186e35(0x296)),console[_0x186e35(0x49c)](_0x186e35(0x35c)),console[_0x186e35(0x49c)](_0x186e35(0x361)),console[_0x186e35(0x49c)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.'),console[_0x186e35(0x49c)](''),process[_0x186e35(0x343)](0x1);}console['log']('\x0a\x20\x20✓\x20License\x20activated'),console[_0x186e35(0x1de)](_0x186e35(0x350)+_0x332367['id']),console[_0x186e35(0x1de)](_0x186e35(0x29a)+_0x332367[_0x186e35(0x35d)]),console[_0x186e35(0x1de)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x332367[_0x186e35(0x3a0)])['toISOString']()[_0x186e35(0x48a)](0x0,0xa)),console[_0x186e35(0x1de)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x186e35(0x1de)]('');}finally{await _0x2a6e01['close']();}}async function _0x12977c(_0x2085e6,_0x2aac9a){const _0xddfc19=_0x3849e1;!_0x2085e6&&(console[_0xddfc19(0x49c)](_0xddfc19(0x29f)),process[_0xddfc19(0x343)](0x1));const _0x4e943b=require$$5,_0x2e15fa=requireOkdbLicenseCodec(),_0x50f84d=_0x46367d[_0xddfc19(0x347)](_0x2aac9a[_0xddfc19(0x1a5)]),_0x4f0867=new _0x4e943b(_0x50f84d,_0x2aac9a['key']?{'encryptionKey':_0x2aac9a[_0xddfc19(0x1cd)]}:{});await _0x4f0867[_0xddfc19(0x483)]();try{const _0x4b0e7a=_0x4f0867[_0xddfc19(0x35f)];(!_0x4b0e7a||!_0x4b0e7a[_0xddfc19(0x1d5)](_0xddfc19(0x1c2)))&&(console['error'](_0xddfc19(0x46a)+_0x2085e6+'\x22'),process[_0xddfc19(0x343)](0x1));let _0x5f316f=null,_0x24a548=null;const _0x51fa04=_0x4b0e7a[_0xddfc19(0x338)]('~licenses',_0x2085e6);if(_0x51fa04)_0x5f316f=_0x2085e6,_0x24a548=_0x51fa04;else{const _0x5e1ea5=[];for(const {key:_0xe7d57d,value:_0x4824a5}of _0x4b0e7a['getRange'](_0xddfc19(0x1c2))){if(_0xe7d57d['startsWith'](_0x2085e6))_0x5e1ea5[_0xddfc19(0x290)]({'key':_0xe7d57d,'value':_0x4824a5});}_0x5e1ea5[_0xddfc19(0x424)]===0x0&&(console[_0xddfc19(0x49c)](_0xddfc19(0x46a)+_0x2085e6+'\x22'),process[_0xddfc19(0x343)](0x1)),_0x5e1ea5[_0xddfc19(0x424)]>0x1&&(console[_0xddfc19(0x49c)](_0xddfc19(0x1e5)+_0x2085e6+'\x22\x20matches\x20'+_0x5e1ea5['length']+_0xddfc19(0x237)),process[_0xddfc19(0x343)](0x1)),_0x5f316f=_0x5e1ea5[0x0][_0xddfc19(0x1cd)],_0x24a548=_0x5e1ea5[0x0]['value'];}const _0x29c91a=Date[_0xddfc19(0x2f5)](),_0x1ad84c=_0x2bc2c3(_0x24a548,_0x29c91a),_0x4900e8=_0x4f0867['id'],_0x45cc2e=_0xddfc19(0x479);let _0x58ba31='';try{const _0x3d829e=Buffer[_0xddfc19(0x283)](_0x24a548[_0xddfc19(0x428)],_0xddfc19(0x28a));_0x58ba31=_0x2e15fa[_0xddfc19(0x201)](_0x4900e8,_0x3d829e,_0x45cc2e)['pin'];}catch{}const _0x592967=_0x24a548[_0xddfc19(0x1d7)]?Object[_0xddfc19(0x2c0)](_0x24a548['features'])['filter'](([,_0x261fd6])=>_0x261fd6)['map'](([_0x10645c])=>_0x10645c):[],_0x5386b3=_0x24a548[_0xddfc19(0x2fd)]||{},_0x2591d1=_0x4b0e7a?.['db']?.['get']?.(_0xddfc19(0x279))??0x0,_0x556ce5=[..._0x4f0867[_0xddfc19(0x41c)]['keys']()]['filter'](_0x3dd3b6=>!_0x3dd3b6[_0xddfc19(0x47b)]('~'))[_0xddfc19(0x424)];console[_0xddfc19(0x1de)](_0xddfc19(0x273)),console['log'](_0xddfc19(0x350)+_0x5f316f),console['log'](_0xddfc19(0x29a)+(_0x24a548[_0xddfc19(0x35d)]||'')),console['log'](_0xddfc19(0x1b8)+(_0x24a548[_0xddfc19(0x3a0)]?new Date(_0x24a548[_0xddfc19(0x3a0)])[_0xddfc19(0x2a3)]()[_0xddfc19(0x48a)](0x0,0xa):'')),console[_0xddfc19(0x1de)]('\x20\x20\x20\x20features:\x20\x20'+(_0x592967[_0xddfc19(0x3d5)](',\x20')||_0xddfc19(0x389))),console[_0xddfc19(0x1de)](_0xddfc19(0x2eb)+_0x58ba31),console[_0xddfc19(0x1de)](_0xddfc19(0x1d1)+_0x1ad84c),console['log'](_0xddfc19(0x24a)+new Date(_0x24a548[_0xddfc19(0x433)])[_0xddfc19(0x2a3)]());if(_0x1ad84c==='active'){console[_0xddfc19(0x1de)](''),console[_0xddfc19(0x1de)](_0xddfc19(0x3de));if(_0x5386b3[_0xddfc19(0x24e)]){const _0x5e0488=Math[_0xddfc19(0x493)](_0x2591d1/_0x5386b3[_0xddfc19(0x24e)]*0x64);console[_0xddfc19(0x1de)](_0xddfc19(0x1c6)+_0x2591d1['toLocaleString']()+_0xddfc19(0x482)+_0x5386b3[_0xddfc19(0x24e)][_0xddfc19(0x1ad)]()+_0xddfc19(0x331)+_0x5e0488+'%)');}else console[_0xddfc19(0x1de)](_0xddfc19(0x1c6)+_0x2591d1[_0xddfc19(0x1ad)]()+_0xddfc19(0x1a9));_0x5386b3[_0xddfc19(0x1c7)]?console[_0xddfc19(0x1de)](_0xddfc19(0x21f)+_0x556ce5+_0xddfc19(0x482)+_0x5386b3[_0xddfc19(0x1c7)]):console[_0xddfc19(0x1de)](_0xddfc19(0x21f)+_0x556ce5+'\x20\x20(unlimited)');}console[_0xddfc19(0x1de)]('');}finally{await _0x4f0867[_0xddfc19(0x2d2)]();}}async function _0x2cdc8f(_0x597cd9,_0x10b728){const _0x1db3d5=_0x3849e1;!_0x597cd9&&(console[_0x1db3d5(0x49c)](_0x1db3d5(0x2a9)),process['exit'](0x1));const _0x719775=require$$5,_0x1c634b=_0x46367d['resolve'](_0x10b728[_0x1db3d5(0x1a5)]),_0x537f39=new _0x719775(_0x1c634b,_0x10b728[_0x1db3d5(0x1cd)]?{'encryptionKey':_0x10b728['key']}:{});await _0x537f39[_0x1db3d5(0x483)]();try{const _0x42d83b=_0x537f39[_0x1db3d5(0x35f)];(!_0x42d83b||!_0x42d83b[_0x1db3d5(0x1d5)](_0x1db3d5(0x1c2)))&&(console[_0x1db3d5(0x49c)](_0x1db3d5(0x46a)+_0x597cd9+'\x22'),process[_0x1db3d5(0x343)](0x1));let _0x5b8b11=null,_0x2f36e4=null;const _0x359736=_0x42d83b[_0x1db3d5(0x338)]('~licenses',_0x597cd9);if(_0x359736)_0x5b8b11=_0x597cd9,_0x2f36e4=_0x359736;else{const _0x5dbd32=[];for(const {key:_0x3ff4b0,value:_0x1119d9}of _0x42d83b['getRange'](_0x1db3d5(0x1c2))){if(_0x3ff4b0[_0x1db3d5(0x47b)](_0x597cd9))_0x5dbd32[_0x1db3d5(0x290)]({'key':_0x3ff4b0,'value':_0x1119d9});}_0x5dbd32[_0x1db3d5(0x424)]===0x0&&(console[_0x1db3d5(0x49c)](_0x1db3d5(0x46a)+_0x597cd9+'\x22'),process[_0x1db3d5(0x343)](0x1)),_0x5dbd32[_0x1db3d5(0x424)]>0x1&&(console['error'](_0x1db3d5(0x1e5)+_0x597cd9+_0x1db3d5(0x33c)+_0x5dbd32[_0x1db3d5(0x424)]+'\x20licenses'),process[_0x1db3d5(0x343)](0x1)),_0x5b8b11=_0x5dbd32[0x0]['key'],_0x2f36e4=_0x5dbd32[0x0][_0x1db3d5(0x32e)];}await _0x42d83b[_0x1db3d5(0x2f8)](_0x1db3d5(0x1c2),_0x5b8b11),console[_0x1db3d5(0x1de)]('\x20\x20✓\x20Removed\x20license\x20'+_0x5b8b11+_0x1db3d5(0x455)+(_0x2f36e4[_0x1db3d5(0x35d)]||'(unset)')+')');}finally{await _0x537f39[_0x1db3d5(0x2d2)]();}}async function _0x24347a(_0x408ee4,_0xb831e4,_0x1c2711){const _0x307704=_0x3849e1;!_0x408ee4&&(console[_0x307704(0x49c)](_0x307704(0x2a5)),process[_0x307704(0x343)](0x1));!_0x1c2711['token']&&!(_0x1c2711[_0x307704(0x3f2)]&&_0x1c2711[_0x307704(0x4a5)])&&(console[_0x307704(0x49c)](_0x307704(0x297)),process[_0x307704(0x343)](0x1));const _0x43bb1d=_0x1c2711[_0x307704(0x3a3)]||_0xb831e4[_0x307704(0x29b)]?.[_0x307704(0x36c)];!_0x43bb1d&&(console[_0x307704(0x49c)](_0x307704(0x19e)+_0x307704(0x246)+_0x307704(0x2ac)),process[_0x307704(0x343)](0x1));const _0x2723dc=require$$5,_0x123b00=new _0x2723dc(_0xb831e4[_0x307704(0x1a5)],{'sync':{'address':_0x43bb1d,'auto_reconcile':![]}});await _0x123b00[_0x307704(0x483)]();try{const _0x5f31df=_0x123b00[_0x307704(0x35f)];if(_0x5f31df&&_0x5f31df[_0x307704(0x1d5)](_0x307704(0x1b6))){let _0x1e3ea9=![];for(const _0x2f4df6 of _0x5f31df[_0x307704(0x1bd)](_0x307704(0x1b6))){_0x1e3ea9=!![];break;}_0x1e3ea9&&console['log'](_0x307704(0x328)+_0x307704(0x3c8));}console[_0x307704(0x1de)](_0x307704(0x314)+_0x408ee4+'…'),await _0x123b00[_0x307704(0x29b)][_0x307704(0x3d5)](_0x408ee4[_0x307704(0x478)](/\/+$/,''),{'token':_0x1c2711[_0x307704(0x3da)],'username':_0x1c2711[_0x307704(0x3f2)],'password':_0x1c2711[_0x307704(0x4a5)]}),console['log'](_0x307704(0x415)),console[_0x307704(0x1de)](_0x307704(0x456));}finally{await _0x123b00['close']();}}async function _0x438b92(){const _0x34b1c9=_0x3849e1,_0x4970ba=Date[_0x34b1c9(0x2f5)](),_0x2827f7=_0xa5732d(process['argv']),_0x5143b5=_0x4f1808(_0x2827f7),_0x1607e9=_0x46367d[_0x34b1c9(0x347)](_0x5143b5[_0x34b1c9(0x1a5)]);!_0x5143b5['noRepl']&&!process[_0x34b1c9(0x33d)]['isTTY']&&(_0x5143b5['noRepl']=!![]);const _0x563a8d=require$$5,{start:_0x44902a,colorLog:_0x489b88}=requireOkdbShell(),_0x47cb1f={..._0x5143b5['key']?{'encryptionKey':_0x5143b5[_0x34b1c9(0x1cd)]}:{},..._0x5143b5[_0x34b1c9(0x3ba)]?{'admin':![]}:_0x2a835c(_0x5143b5[_0x34b1c9(0x2de)])?{'admin':_0x5143b5[_0x34b1c9(0x2de)]}:{},..._0x2a835c(_0x5143b5[_0x34b1c9(0x1a7)])?{'api':_0x5143b5[_0x34b1c9(0x1a7)]}:{},..._0x2a835c(_0x5143b5[_0x34b1c9(0x431)])?{'auth':_0x5143b5[_0x34b1c9(0x431)]}:{},..._0x2a835c(_0x5143b5[_0x34b1c9(0x217)])?{'mcp':_0x5143b5[_0x34b1c9(0x217)]}:{},..._0x5143b5[_0x34b1c9(0x42c)]!==![]?{'timeMachine':_0x5143b5[_0x34b1c9(0x42c)]}:{}},_0x53759e=new _0x563a8d(_0x1607e9,_0x47cb1f);_0x53759e[_0x34b1c9(0x1de)][_0x34b1c9(0x26f)]?.();const _0x380442=_0x53759e[_0x34b1c9(0x1de)]['attach'](_0x5cfcbc=>_0x489b88(_0x5cfcbc,_0x5143b5[_0x34b1c9(0x2bb)]));if(_0x5143b5[_0x34b1c9(0x2f1)])process['stdout'][_0x34b1c9(0x325)](_0x34b1c9(0x3b5));await _0x53759e[_0x34b1c9(0x483)]();if(_0x5143b5['noRepl'])process[_0x34b1c9(0x48b)][_0x34b1c9(0x325)](_0x34b1c9(0x348));try{await _0x3213c7(_0x53759e,_0x5143b5['port']);}catch(_0x3dd42a){_0x3dd42a['code']===_0x34b1c9(0x1ce)&&(console['error'](_0x34b1c9(0x324)+_0x5143b5[_0x34b1c9(0x31a)]+_0x34b1c9(0x229)),process[_0x34b1c9(0x343)](0x1));throw _0x3dd42a;}if(_0x5143b5[_0x34b1c9(0x2f1)])process[_0x34b1c9(0x48b)][_0x34b1c9(0x325)](_0x34b1c9(0x368)+_0x5143b5['port']+'\x0a');if(!_0x5143b5[_0x34b1c9(0x2f1)])_0x53759e[_0x34b1c9(0x1de)][_0x34b1c9(0x26f)]?.(),_0x380442?.(),_0x1908dc(_0x53759e[_0x34b1c9(0x431)]?.[_0x34b1c9(0x2ec)]?.()??[]),await _0x44902a(_0x53759e,_0x5143b5);else{const _0x5c8a02=_0x46367d[_0x34b1c9(0x3d5)](_0x1607e9,_0x34b1c9(0x209));try{_0x27690c[_0x34b1c9(0x2fc)](_0x5c8a02,String(process[_0x34b1c9(0x19f)]));}catch{}const _0x507d42=Date[_0x34b1c9(0x2f5)]()-_0x4970ba;console[_0x34b1c9(0x1de)](''),console[_0x34b1c9(0x1de)](_0x34b1c9(0x486)),console[_0x34b1c9(0x1de)](_0x34b1c9(0x445)+_0x5143b5['port']),console[_0x34b1c9(0x1de)](_0x34b1c9(0x211)+_0x1607e9),console[_0x34b1c9(0x1de)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x53759e['id']);{const _0x1afcb5=_0x53759e['_systemEnv']?.['db']?.[_0x34b1c9(0x338)]?.('__writeCounter')??0x0,_0x501af9=[..._0x53759e[_0x34b1c9(0x41c)]['keys']()]['filter'](_0x2b37c7=>!_0x2b37c7[_0x34b1c9(0x47b)]('~'))[_0x34b1c9(0x424)];if(_0x53759e['_license']?.[_0x34b1c9(0x46d)]?.['licenseType']===0x1){const _0x423007=Math[_0x34b1c9(0x3b9)]((_0x53759e[_0x34b1c9(0x244)][_0x34b1c9(0x46d)][_0x34b1c9(0x3a0)]-Date[_0x34b1c9(0x2f5)]())/0x5265c00);console['log'](_0x34b1c9(0x1ff)+_0x53759e['_license'][_0x34b1c9(0x46d)][_0x34b1c9(0x35d)]+_0x34b1c9(0x33e)+_0x423007+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x53759e[_0x34b1c9(0x244)]?.[_0x34b1c9(0x46d)]){const _0x2c195a=_0x53759e['_license']['active'];console[_0x34b1c9(0x1de)]('\x20\x20\x20\x20license:\x20'+_0x2c195a[_0x34b1c9(0x35d)]+_0x34b1c9(0x374)+new Date(_0x2c195a['expiresAt'])[_0x34b1c9(0x2a3)]()[_0x34b1c9(0x48a)](0x0,0xa)+')');const _0x2978e0=_0x2c195a[_0x34b1c9(0x2fd)]||{};if(_0x2978e0['maxWrites']){const _0x3da842=Math[_0x34b1c9(0x493)](_0x1afcb5/_0x2978e0[_0x34b1c9(0x24e)]*0x64);console['log'](_0x34b1c9(0x235)+_0x1afcb5['toLocaleString']()+_0x34b1c9(0x482)+_0x2978e0[_0x34b1c9(0x24e)][_0x34b1c9(0x1ad)]()+_0x34b1c9(0x429)+_0x3da842+_0x34b1c9(0x280)+_0x501af9+(_0x2978e0[_0x34b1c9(0x1c7)]?'/'+_0x2978e0['envs']:'')+_0x34b1c9(0x2dc)+(_0x501af9===0x1?'':'s'));}}else{if(_0x53759e[_0x34b1c9(0x244)]){const _0x4b86aa=_0x53759e[_0x34b1c9(0x244)][_0x34b1c9(0x294)](),_0x42734d=_0x4b86aa[_0x34b1c9(0x424)]?_0x4b86aa[_0x34b1c9(0x29c)](_0x2fb91c=>_0x2fb91c[_0x34b1c9(0x39b)])[_0x34b1c9(0x3d5)](',\x20'):'(add\x20a\x20license\x20first)',_0x53044c=_0x53759e[_0x34b1c9(0x244)][_0x34b1c9(0x19d)],_0x42c16d=_0x53044c[_0x34b1c9(0x2fd)][_0x34b1c9(0x24e)]?Math['round'](_0x1afcb5/_0x53044c[_0x34b1c9(0x2fd)][_0x34b1c9(0x24e)]*0x64):0x0;console[_0x34b1c9(0x1de)](_0x34b1c9(0x3cc)),console['log'](_0x34b1c9(0x235)+_0x1afcb5['toLocaleString']()+_0x34b1c9(0x482)+_0x53044c['limits'][_0x34b1c9(0x24e)][_0x34b1c9(0x1ad)]()+_0x34b1c9(0x429)+_0x42c16d+_0x34b1c9(0x280)+_0x501af9+'\x20/\x20'+_0x53044c['limits'][_0x34b1c9(0x1c7)]+_0x34b1c9(0x270)),console[_0x34b1c9(0x1de)](_0x34b1c9(0x1a0)+_0x42734d);}}}}console[_0x34b1c9(0x1de)](_0x34b1c9(0x3ff)+_0x5143b5[_0x34b1c9(0x31a)]+_0x34b1c9(0x258));!_0x5143b5[_0x34b1c9(0x3ba)]&&console[_0x34b1c9(0x1de)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x5143b5[_0x34b1c9(0x31a)]+_0x34b1c9(0x49a));console[_0x34b1c9(0x1de)](''),console[_0x34b1c9(0x1de)]('[okdb]\x20started\x20in\x20'+_0x507d42+'ms'),_0x1908dc(_0x53759e['auth']?.[_0x34b1c9(0x2ec)]?.()??[]);let _0x4709ae=![];async function _0x2b0333(_0x69fdc5){const _0x28ae92=_0x34b1c9;_0x4709ae&&(process[_0x28ae92(0x41f)][_0x28ae92(0x325)](_0x28ae92(0x25e)),process[_0x28ae92(0x343)](0x82));_0x4709ae=!![],process[_0x28ae92(0x41f)][_0x28ae92(0x325)](_0x28ae92(0x1d9)+(_0x69fdc5||_0x28ae92(0x30a))+_0x28ae92(0x2b4));const _0x118036=setTimeout(()=>{const _0x27b797=_0x28ae92;process[_0x27b797(0x41f)][_0x27b797(0x325)](_0x27b797(0x419)),process[_0x27b797(0x343)](0x1);},0x1388);try{_0x27690c[_0x28ae92(0x31e)](_0x5c8a02);}catch{}try{await _0x53759e[_0x28ae92(0x2d2)]();}catch(_0xf48f4c){process[_0x28ae92(0x41f)][_0x28ae92(0x325)](_0x28ae92(0x240)+(_0xf48f4c?.[_0x28ae92(0x1f3)]??_0xf48f4c)+'\x0a');}clearTimeout(_0x118036),process[_0x28ae92(0x41f)][_0x28ae92(0x325)]('[okdb]\x20closed\x20cleanly\x0a'),process[_0x28ae92(0x343)](0x0);}process['on'](_0x34b1c9(0x22e),()=>_0x2b0333(_0x34b1c9(0x22e))),process['on'](_0x34b1c9(0x3a6),()=>_0x2b0333('SIGTERM')),process['on'](_0x34b1c9(0x36f),()=>_0x2b0333(_0x34b1c9(0x36f)));}}const _0x5c353c=new Set([_0x3849e1(0x20e),'doctor',_0x3849e1(0x224),_0x3849e1(0x3b2),_0x3849e1(0x4a3),'import','reset','token',_0x3849e1(0x3d5),_0x3849e1(0x2e7)]),_0x351697=process['argv'][0x2];if(_0x351697===_0x3849e1(0x20e))console['log'](require$$2[_0x3849e1(0x20e)]),process['exit'](0x0);else{if(_0x351697&&_0x5c353c[_0x3849e1(0x339)](_0x351697)){const _0x187c57=process['argv'][_0x3849e1(0x48a)](0x3),_0x16a54f=_0xa5732d([_0x3849e1(0x3ab),'okdb',..._0x187c57]),_0xd84a60=_0x4f1808(_0x16a54f),_0x51bc3c=new Set([_0x3849e1(0x2be),'-d',_0x3849e1(0x2b8),'-k','--config','-c',_0x3849e1(0x32d),'-p',_0x3849e1(0x1b5),_0x3849e1(0x3b4),'-e',_0x3849e1(0x35a),_0x3849e1(0x393),_0x3849e1(0x3fc),_0x3849e1(0x3f8),_0x3849e1(0x2e2),_0x3849e1(0x286),_0x3849e1(0x3d4),_0x3849e1(0x1d2),_0x3849e1(0x43a),'-u',_0x3849e1(0x1cf)]);let _0x2104f5=null;for(let _0x18c6f9=0x0;_0x18c6f9<_0x187c57[_0x3849e1(0x424)];_0x18c6f9++){if(_0x51bc3c[_0x3849e1(0x339)](_0x187c57[_0x18c6f9])){_0x18c6f9++;continue;}if(!_0x187c57[_0x18c6f9][_0x3849e1(0x47b)]('-')){_0x2104f5=_0x187c57[_0x18c6f9];break;}}(async()=>{const _0x26aa8d=_0x3849e1;if(_0x351697===_0x26aa8d(0x3da)){const _0x2544af=process[_0x26aa8d(0x3be)][0x3],_0x1703c4=process[_0x26aa8d(0x3be)][_0x26aa8d(0x48a)](0x4),_0x29acf7=_0xa5732d([_0x26aa8d(0x3ab),_0x26aa8d(0x417),..._0x1703c4]),_0x393c95=_0x4f1808(_0x29acf7),_0x5376e4=new Set([_0x26aa8d(0x2be),'-d',_0x26aa8d(0x2b8),'-k',_0x26aa8d(0x2a4),'-c','--port','-p',_0x26aa8d(0x393),'--password','--label',_0x26aa8d(0x2e2),_0x26aa8d(0x286),_0x26aa8d(0x3d4),_0x26aa8d(0x1b5),_0x26aa8d(0x3b4),'-e',_0x26aa8d(0x35a)]),_0x46db79=[];for(let _0x31588e=0x0;_0x31588e<_0x1703c4[_0x26aa8d(0x424)];_0x31588e++){if(_0x5376e4[_0x26aa8d(0x339)](_0x1703c4[_0x31588e])){_0x31588e++;continue;}if(_0x1703c4[_0x31588e]['startsWith']('-'))continue;_0x46db79[_0x26aa8d(0x290)](_0x1703c4[_0x31588e]);}switch(_0x2544af){case _0x26aa8d(0x1f0):await _0xcb2f2c(_0x393c95,_0x29acf7);break;case'list':await _0x2b7eb7(_0x393c95);break;case _0x26aa8d(0x2cf):await _0xda9caa(_0x46db79[0x0],_0x393c95);break;default:console[_0x26aa8d(0x49c)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x2544af+_0x26aa8d(0x2b1)),process[_0x26aa8d(0x343)](0x1);}return;}if(_0x351697==='license'){const _0x1f40d5=requireOkdbLicenseCodec(),_0x36737c=process[_0x26aa8d(0x3be)][_0x26aa8d(0x48a)](0x3),_0x3a9f16=_0xa5732d([_0x26aa8d(0x3ab),_0x26aa8d(0x417),..._0x36737c]),_0x1ce450=_0x4f1808(_0x3a9f16),_0xc630ba=new Set([_0x26aa8d(0x2be),'-d',_0x26aa8d(0x2b8),'-k','--config','-c',_0x26aa8d(0x32d),'-p',_0x26aa8d(0x1b5)]),_0x12e9f1=[];for(let _0x5b263a=0x0;_0x5b263a<_0x36737c[_0x26aa8d(0x424)];_0x5b263a++){if(_0xc630ba['has'](_0x36737c[_0x5b263a])){_0x5b263a++;continue;}if(_0x36737c[_0x5b263a][_0x26aa8d(0x47b)]('-'))continue;_0x12e9f1[_0x26aa8d(0x290)](_0x36737c[_0x5b263a]);}const _0x23f4b7=_0x12e9f1[0x0]??null;if(_0x23f4b7===_0x26aa8d(0x2f8))await _0x2cdc8f(_0x12e9f1[0x1],_0x1ce450);else{if(!_0x23f4b7)await _0xb82748(_0x1ce450);else{let _0x4a0c9b=_0x1f40d5[_0x26aa8d(0x460)](_0x23f4b7);if(_0x4a0c9b==='unknown'&&_0x27690c[_0x26aa8d(0x198)](_0x23f4b7))_0x4a0c9b=_0x26aa8d(0x2cc);if(_0x4a0c9b===_0x26aa8d(0x2cc))try{const _0x26571f=_0x27690c[_0x26aa8d(0x205)](_0x23f4b7,_0x26aa8d(0x467))[_0x26aa8d(0x388)](),_0x360df0=_0x1f40d5[_0x26aa8d(0x460)](_0x26571f);if(_0x360df0===_0x26aa8d(0x29e)){await _0x3f476a(_0x26571f,_0x1ce450);return;}await _0x58f627(_0x23f4b7,_0x1ce450);return;}catch(_0x4a2292){console['error']('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x23f4b7+':\x20'+_0x4a2292[_0x26aa8d(0x1f3)]),process[_0x26aa8d(0x343)](0x1);}switch(_0x4a0c9b){case _0x26aa8d(0x366):await _0x58f627(_0x23f4b7,_0x1ce450);break;case _0x26aa8d(0x29e):await _0x3f476a(_0x23f4b7,_0x1ce450);break;case _0x26aa8d(0x3b3):await _0x12977c(_0x23f4b7,_0x1ce450);break;default:console[_0x26aa8d(0x49c)](_0x26aa8d(0x35e)+_0x23f4b7+'\x22'),console[_0x26aa8d(0x49c)](''),console[_0x26aa8d(0x49c)](_0x26aa8d(0x202)),console[_0x26aa8d(0x49c)](_0x26aa8d(0x2e6)),console[_0x26aa8d(0x49c)](_0x26aa8d(0x21a)),console[_0x26aa8d(0x49c)](_0x26aa8d(0x45e)),console[_0x26aa8d(0x49c)]('\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file'),console[_0x26aa8d(0x49c)](''),console[_0x26aa8d(0x49c)](_0x26aa8d(0x234)),process[_0x26aa8d(0x343)](0x1);}}}return;}switch(_0x351697){case _0x26aa8d(0x19b):await _0x27e83b(_0xd84a60);break;case'init':await _0x171b47();break;case _0x26aa8d(0x3dd):await _0x6f980a(_0xd84a60);break;case'backup':await _0x1a45c6(_0x2104f5??_0x46367d[_0x26aa8d(0x347)](_0x26aa8d(0x20b)),_0xd84a60);break;case'export':await _0x2b3b03(_0x2104f5??_0x46367d[_0x26aa8d(0x347)]('./okdb-export.ndjson'),_0xd84a60,_0x16a54f);break;case'import':await _0x52eea5(_0x2104f5??_0x46367d[_0x26aa8d(0x347)](_0x26aa8d(0x394)),_0xd84a60,_0x16a54f);break;case'join':await _0x24347a(_0x2104f5,_0xd84a60,_0x16a54f);break;}})()[_0x3849e1(0x39d)](()=>process[_0x3849e1(0x343)](0x0))[_0x3849e1(0x2f6)](_0x35d5a5=>{const _0x45bcd6=_0x3849e1;console[_0x45bcd6(0x49c)]('\x0a[okdb]\x20error:\x20'+(_0x35d5a5[_0x45bcd6(0x1f3)]||_0x35d5a5)+'\x0a'),process[_0x45bcd6(0x343)](0x1);});}else _0x438b92()[_0x3849e1(0x2f6)](_0x4755e2=>{const _0x3fa509=_0x3849e1;console[_0x3fa509(0x49c)](_0x3fa509(0x1df)),console[_0x3fa509(0x49c)](_0x4755e2[_0x3fa509(0x1c0)]||_0x4755e2),process[_0x3fa509(0x343)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x27fb86(0x461)]=okdb;