@kedem/okdb 2.1.2 → 2.2.0
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/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/docs/embeddings.md +3 -3
- package/docs/querying.md +20 -0
- package/docs/views.md +32 -32
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/types/environment.d.ts +4 -2
- package/types/features/views.d.ts +38 -4
- package/types/index.d.ts +4 -2
- package/types/options.d.ts +25 -3
package/bin/okdb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const _0x1cf947=_0x196a;(function(_0x10bbd5,_0x4ba9b9){const _0x30801e=_0x196a,_0x1130f2=_0x10bbd5();while(!![]){try{const _0x3292dc=-parseInt(_0x30801e(0x1bc))/0x1*(parseInt(_0x30801e(0x505))/0x2)+-parseInt(_0x30801e(0x2d9))/0x3+-parseInt(_0x30801e(0x491))/0x4+parseInt(_0x30801e(0x2ad))/0x5+parseInt(_0x30801e(0x3df))/0x6*(-parseInt(_0x30801e(0x287))/0x7)+-parseInt(_0x30801e(0x394))/0x8*(-parseInt(_0x30801e(0x186))/0x9)+parseInt(_0x30801e(0x404))/0xa*(parseInt(_0x30801e(0x46c))/0xb);if(_0x3292dc===_0x4ba9b9)break;else _0x1130f2['push'](_0x1130f2['shift']());}catch(_0x39fe16){_0x1130f2['push'](_0x1130f2['shift']());}}}(_0x5639,0x7d881));var require$$1=require(_0x1cf947(0x289)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x1cf947(0x331)),require$$5=require(_0x1cf947(0x59c)),require$$0$3=require('readline'),require$$0$1=require(_0x1cf947(0x322)),require$$0$2=require(_0x1cf947(0x18d)),require$$4=require('child_process'),require$$1$2=require(_0x1cf947(0x27e)),require$$0$4=require(_0x1cf947(0x11d)),require$$0$5=require(_0x1cf947(0x2e2)),require$$0$6=require('node:events');function getDefaultExportFromCjs(_0x422c13){const _0x38d819=_0x1cf947;return _0x422c13&&_0x422c13[_0x38d819(0x11b)]&&Object[_0x38d819(0x1aa)][_0x38d819(0x5a5)]['call'](_0x422c13,_0x38d819(0x426))?_0x422c13[_0x38d819(0x426)]:_0x422c13;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x488ac6=require$$0,_0x51315c=require$$1$1,_0x3e58ec=require$$1;let _0x572df7;function _0x27809f(){const _0x473ed8=_0x196a;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x572df7!==undefined)return _0x572df7;try{const _0x3790db=_0x3e58ec[_0x473ed8(0x330)](require[_0x473ed8(0x318)](_0x473ed8(0x46f)));_0x572df7=_0x51315c[_0x473ed8(0x3c6)](_0x3e58ec[_0x473ed8(0x315)](_0x3790db,_0x473ed8(0x5c0),'Release',_0x473ed8(0x350)));}catch{_0x572df7=![];}return _0x572df7;}function _0x41cbbb(){const _0x1d814b=_0x196a,_0x4bd119=_0x488ac6[_0x1d814b(0x116)]()['length'];return Math[_0x1d814b(0x264)](0x1,_0x4bd119-0x1);}function _0x5f2f82(_0x33770,_0x5ad68f={}){const _0x1cd07d=_0x196a,_0x14f403=_0x5ad68f[_0x1cd07d(0x34d)]!==undefined?_0x5ad68f[_0x1cd07d(0x34d)]:_0x27809f();let _0x85bfc5;if(_0x33770?.['noCluster'])_0x85bfc5=0x1;else{let _0x1d0ee5,_0x32c18a;if(_0x33770?.[_0x1cd07d(0x152)]!==undefined&&_0x33770[_0x1cd07d(0x152)]!==null&&_0x33770[_0x1cd07d(0x152)]!=='')_0x1d0ee5=_0x33770[_0x1cd07d(0x152)],_0x32c18a=_0x1cd07d(0x131);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x1d0ee5=process.env.OKDB_HTTP_WORKERS,_0x32c18a=_0x1cd07d(0x43e);else _0x33770?.['http']?.[_0x1cd07d(0x3ba)]!==undefined&&_0x33770['http'][_0x1cd07d(0x3ba)]!==null&&_0x33770[_0x1cd07d(0x37d)][_0x1cd07d(0x3ba)]!==''&&(_0x1d0ee5=_0x33770[_0x1cd07d(0x37d)][_0x1cd07d(0x3ba)],_0x32c18a=_0x1cd07d(0x33a));}if(_0x1d0ee5===undefined)_0x85bfc5=_0x41cbbb();else{const _0x17380e=Number(_0x1d0ee5);!Number[_0x1cd07d(0x242)](_0x17380e)||_0x17380e<0x1?(console['warn'](_0x1cd07d(0x4a0)+_0x32c18a+'='+JSON[_0x1cd07d(0x18b)](_0x1d0ee5)+_0x1cd07d(0x3ef)),_0x85bfc5=0x1):_0x85bfc5=_0x17380e;}}return!_0x14f403&&_0x85bfc5>0x1&&(console['warn'](_0x1cd07d(0x328)+(_0x1cd07d(0x377)+_0x85bfc5+').')),_0x85bfc5=0x1),_0x85bfc5;}return okdbWorkers={'isShmbufNative':_0x27809f,'defaultWorkers':_0x41cbbb,'resolveWorkers':_0x5f2f82},okdbWorkers;}var version=_0x1cf947(0x2d1),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x5ccab5=require$$0$1;function _0x245730(_0x5b61df,_0x188036){const _0x442897=_0x196a;return _0x5ccab5[_0x442897(0x168)](_0x442897(0x124),_0x188036)[_0x442897(0x5bc)](_0x5b61df)[_0x442897(0x42e)](_0x442897(0x5c1));}function _0x3f0085(_0x31a53f,_0x409581){const _0x19c7f8=_0x196a;if(typeof _0x31a53f!=='string'||typeof _0x409581!==_0x19c7f8(0x3a6))return![];if(Buffer['byteLength'](_0x31a53f)!==Buffer[_0x19c7f8(0x461)](_0x409581))return![];return _0x5ccab5['timingSafeEqual'](Buffer[_0x19c7f8(0x424)](_0x31a53f),Buffer['from'](_0x409581));}function _0x13e0be(_0x598978){const _0x256ab6=_0x196a;if(!_0x598978?.[_0x256ab6(0x5a1)](_0x256ab6(0xf9)))return null;return _0x598978[_0x256ab6(0x3bc)](0x7);}function _0x4c0b80(_0x1ec77a=0x20){const _0x52e49d=_0x196a;return _0x5ccab5['randomBytes'](_0x1ec77a)[_0x52e49d(0x159)](_0x52e49d(0x5c1));}function _0x550100(_0x44c083){const _0x5e03d2=_0x196a;return _0x5ccab5['createHash'](_0x5e03d2(0x124))[_0x5e03d2(0x5bc)](_0x44c083)[_0x5e03d2(0x42e)](_0x5e03d2(0x105));}function _0x206af1(_0x25e0d5,_0x29cfab,_0x5cb650=0x36ee80){const _0x3b11d6=_0x196a;if(!_0x29cfab)throw new Error('Token\x20secret\x20not\x20configured');const _0x46ff77=Date[_0x3b11d6(0x4e7)](),_0x173612=Buffer[_0x3b11d6(0x424)](JSON[_0x3b11d6(0x18b)]({'iat':_0x46ff77,'exp':_0x46ff77+_0x5cb650,'sub':_0x25e0d5?.['id']??_0x25e0d5?.[_0x3b11d6(0x1c3)]??null,'username':_0x25e0d5?.[_0x3b11d6(0x3ac)]??_0x25e0d5?.['name']??null,'roles':Array[_0x3b11d6(0x397)](_0x25e0d5?.[_0x3b11d6(0x30f)])?_0x25e0d5['roles']:[]}))['toString'](_0x3b11d6(0x5c1)),_0x298671=_0x245730(_0x173612,_0x29cfab);return _0x173612+'.'+_0x298671;}function _0x50dd12(_0x38fba8,_0x39ae5b){const _0x762c9c=_0x196a;if(!_0x39ae5b||typeof _0x38fba8!==_0x762c9c(0x3a6))return null;const [_0x30226,_0x5ed186]=_0x38fba8['split']('.');if(!_0x30226||!_0x5ed186)return null;const _0x24fae7=_0x245730(_0x30226,_0x39ae5b);if(!_0x3f0085(_0x5ed186,_0x24fae7))return null;try{const _0x37205a=JSON[_0x762c9c(0x1c1)](Buffer[_0x762c9c(0x424)](_0x30226,_0x762c9c(0x5c1))[_0x762c9c(0x159)]()),_0xabd158=0x7530;if(Date[_0x762c9c(0x4e7)]()>Number(_0x37205a?.['exp']??0x0)+_0xabd158)return null;return _0x37205a;}catch{return null;}}async function _0x138deb(_0x74d424){return new Promise((_0x4f48d7,_0x414532)=>{const _0xdc1490=_0x196a,_0x3535a9=_0x5ccab5[_0xdc1490(0x516)](0x10);_0x5ccab5[_0xdc1490(0x3f7)](_0x74d424,_0x3535a9,0x40,(_0xbab99,_0x4614d6)=>{const _0x3affd4=_0xdc1490;if(_0xbab99)_0x414532(_0xbab99);_0x4f48d7(_0x3535a9[_0x3affd4(0x159)]('hex')+':'+_0x4614d6[_0x3affd4(0x159)]('hex'));});});}async function _0x34a718(_0x3c03e1,_0x3fd824){const _0x433b08=_0x196a,[_0x307b40,_0x59da30]=_0x3fd824[_0x433b08(0x280)](':');if(!_0x307b40||!_0x59da30)return![];const _0x13472c=Buffer['from'](_0x307b40,_0x433b08(0x105));return new Promise((_0x52a662,_0x33dfef)=>{const _0x2419e3=_0x433b08;_0x5ccab5[_0x2419e3(0x3f7)](_0x3c03e1,_0x13472c,0x40,(_0x1ee6ee,_0x528415)=>{const _0x553c7d=_0x2419e3;if(_0x1ee6ee)_0x33dfef(_0x1ee6ee);_0x52a662(_0x5ccab5[_0x553c7d(0x364)](_0x528415,Buffer[_0x553c7d(0x424)](_0x59da30,_0x553c7d(0x105))));});});}return okdbAuthTokens={'hmac':_0x245730,'timingSafeEqual':_0x3f0085,'parseBearer':_0x13e0be,'randomToken':_0x4c0b80,'hashToken':_0x550100,'issueToken':_0x206af1,'authenticateToken':_0x50dd12,'hashPassword':_0x138deb,'verifyPassword':_0x34a718},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x56bd4e=_0x1cf947;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x367842=require$$0$2,_0x4d1030=_0x56bd4e(0x3fd),_0x4e3f6c=new Uint8Array(0x100)[_0x56bd4e(0xfa)](0xff);for(let _0x22a50e=0x0;_0x22a50e<_0x4d1030['length'];_0x22a50e++){_0x4e3f6c[_0x4d1030[_0x56bd4e(0x109)](_0x22a50e)]=_0x22a50e,_0x4e3f6c[_0x4d1030[_0x56bd4e(0x109)](_0x22a50e)+0x20]=_0x22a50e;}_0x4e3f6c['O'[_0x56bd4e(0x109)](0x0)]=0x0,_0x4e3f6c['o'[_0x56bd4e(0x109)](0x0)]=0x0,_0x4e3f6c['I'[_0x56bd4e(0x109)](0x0)]=0x1,_0x4e3f6c['i'[_0x56bd4e(0x109)](0x0)]=0x1,_0x4e3f6c['L'[_0x56bd4e(0x109)](0x0)]=0x1,_0x4e3f6c['l'[_0x56bd4e(0x109)](0x0)]=0x1;function _0x5b40c6(_0x2e3eb7){const _0x147b6d=_0x56bd4e;let _0x234632=0x0,_0x7b443f=0x0,_0x44d94b='';for(let _0x13e447=0x0;_0x13e447<_0x2e3eb7[_0x147b6d(0x532)];_0x13e447++){_0x7b443f=_0x7b443f<<0x8|_0x2e3eb7[_0x13e447],_0x234632+=0x8;while(_0x234632>=0x5){_0x234632-=0x5,_0x44d94b+=_0x4d1030[_0x7b443f>>>_0x234632&0x1f];}}return _0x234632>0x0&&(_0x44d94b+=_0x4d1030[_0x7b443f<<0x5-_0x234632&0x1f]),_0x44d94b;}function _0xd1f6b7(_0x492971){const _0x31dbb9=_0x56bd4e;_0x492971=_0x492971['replace'](/-/g,'')[_0x31dbb9(0x511)]();let _0x1fcbf2=0x0,_0x58b193=0x0;const _0x4e1409=[];for(let _0x46b77f=0x0;_0x46b77f<_0x492971['length'];_0x46b77f++){const _0x422f70=_0x4e3f6c[_0x492971[_0x31dbb9(0x109)](_0x46b77f)];if(_0x422f70===0xff)continue;_0x58b193=_0x58b193<<0x5|_0x422f70,_0x1fcbf2+=0x5,_0x1fcbf2>=0x8&&(_0x1fcbf2-=0x8,_0x4e1409[_0x31dbb9(0x402)](_0x58b193>>>_0x1fcbf2&0xff));}return Buffer[_0x31dbb9(0x424)](_0x4e1409);}const _0x39b6d5=['sync','embeddings',_0x56bd4e(0x2cf),_0x56bd4e(0x230),_0x56bd4e(0x176),_0x56bd4e(0x53e),'mcp','files'],_0x26e41b=0x0,_0x5add00=0x1,_0x49de03=0x2,_0x7221e3=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x51f8bb({issuedAt:_0x29e8c7,expiresAt:_0x3bbc19,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x26e41b}){const _0x35bd83=_0x56bd4e,_0x408ec3=Buffer[_0x35bd83(0x424)](licensee,_0x35bd83(0x39f))[_0x35bd83(0x3bc)](0x0,0x40),_0x2c4910=0x1+0x1+0x4+0x4+0x1+_0x408ec3['length']+0x2+0x10,_0xed6222=Buffer[_0x35bd83(0x2d7)](_0x2c4910);let _0x3667a3=0x0;_0xed6222[_0x35bd83(0x158)](0x1,_0x3667a3++),_0xed6222['writeUInt8'](licenseType,_0x3667a3++),_0xed6222[_0x35bd83(0x496)](Math['floor'](_0x29e8c7/0x3e8),_0x3667a3),_0x3667a3+=0x4,_0xed6222[_0x35bd83(0x496)](Math[_0x35bd83(0x4fc)](_0x3bbc19/0x3e8),_0x3667a3),_0x3667a3+=0x4,_0xed6222[_0x35bd83(0x158)](_0x408ec3[_0x35bd83(0x532)],_0x3667a3++),_0x408ec3[_0x35bd83(0x405)](_0xed6222,_0x3667a3),_0x3667a3+=_0x408ec3[_0x35bd83(0x532)];let _0x302d95=0x0;for(let _0x1b4c68=0x0;_0x1b4c68<_0x39b6d5['length'];_0x1b4c68++){if(features[_0x39b6d5[_0x1b4c68]])_0x302d95|=0x1<<_0x1b4c68;}_0xed6222[_0x35bd83(0x4a1)](_0x302d95,_0x3667a3),_0x3667a3+=0x2;const _0x2e4202=['envs',_0x35bd83(0x4bd),_0x35bd83(0x385),_0x35bd83(0x2f1)];for(const _0x325f60 of _0x2e4202){_0xed6222[_0x35bd83(0x496)](limits[_0x325f60]||0x0,_0x3667a3),_0x3667a3+=0x4;}return _0xed6222;}function _0x8e9604(_0x3058c7){const _0x5eceae=_0x56bd4e;let _0xe25453=0x0;const _0x4b4bd1=_0x3058c7[_0x5eceae(0x143)](_0xe25453++),_0x1cfe3e=_0x3058c7[_0x5eceae(0x143)](_0xe25453++),_0x9a67d1=_0x3058c7[_0x5eceae(0x340)](_0xe25453);_0xe25453+=0x4;const _0x6bc2b1=_0x3058c7[_0x5eceae(0x340)](_0xe25453);_0xe25453+=0x4;const _0x3221a0=_0x3058c7[_0x5eceae(0x143)](_0xe25453++),_0x56158b=_0x3058c7[_0x5eceae(0x3bc)](_0xe25453,_0xe25453+_0x3221a0)[_0x5eceae(0x159)]('utf8');_0xe25453+=_0x3221a0;const _0x11bea5=_0x3058c7[_0x5eceae(0x2cd)](_0xe25453);_0xe25453+=0x2;const _0x2decdf={};for(let _0x710e67=0x0;_0x710e67<_0x39b6d5['length'];_0x710e67++){_0x2decdf[_0x39b6d5[_0x710e67]]=Boolean(_0x11bea5&0x1<<_0x710e67);}const _0x67929f=['envs',_0x5eceae(0x4bd),'syncPeers',_0x5eceae(0x2f1)],_0x2ffa92={};for(const _0x5bab75 of _0x67929f){const _0x12134b=_0x3058c7[_0x5eceae(0x340)](_0xe25453);_0xe25453+=0x4,_0x2ffa92[_0x5bab75]=_0x12134b===0x0?null:_0x12134b;}return{'v':_0x4b4bd1,'licenseType':_0x1cfe3e,'issuedAt':_0x9a67d1*0x3e8,'expiresAt':_0x6bc2b1*0x3e8,'licensee':_0x56158b,'features':_0x2decdf,'limits':_0x2ffa92};}function _0x1c375c(_0x5c03e6,_0x4694da){const _0x5cb256=_0x56bd4e,_0x502763=Buffer[_0x5cb256(0x3f4)]([_0x5c03e6,_0x4694da]),_0x4ee1ad=_0x5b40c6(_0x502763),_0x1c1692=[];for(let _0x21749c=0x0;_0x21749c<_0x4ee1ad[_0x5cb256(0x532)];_0x21749c+=0x8){_0x1c1692['push'](_0x4ee1ad[_0x5cb256(0x3bc)](_0x21749c,_0x21749c+0x8));}return _0x1c1692[_0x5cb256(0x315)]('-');}function _0x47a21f(_0x297a5f){const _0xbf2363=_0x56bd4e;if(typeof _0x297a5f!=='string')throw new Error(_0xbf2363(0x39c));const _0x177f8e=_0xd1f6b7(_0x297a5f[_0xbf2363(0x19c)](/-/g,''));if(_0x177f8e['length']<0x41)throw new Error(_0xbf2363(0x4e9)+_0x177f8e[_0xbf2363(0x532)]+_0xbf2363(0x223));const _0x37ac30=_0x177f8e[_0xbf2363(0x3bc)](0x0,_0x177f8e[_0xbf2363(0x532)]-0x40),_0x2fcf35=_0x177f8e[_0xbf2363(0x3bc)](_0x177f8e['length']-0x40);let _0x146f63;try{_0x146f63=_0x8e9604(_0x37ac30);}catch(_0x346f7e){throw new Error(_0xbf2363(0x581)+_0x346f7e[_0xbf2363(0x51e)]);}return{'rawBuf':_0x177f8e,'payload':_0x37ac30,'sig':_0x2fcf35,'decoded':_0x146f63};}function _0x4c7c8d(_0xfa3f66){const _0x384d73=_0x56bd4e;return _0x367842[_0x384d73(0x500)]('sha256')[_0x384d73(0x5bc)](_0xfa3f66)['digest']()[_0x384d73(0x3bc)](0x0,0x8);}function _0x2434a0(_0x4aa612,_0x1e1ccd,_0x525969){const _0x254530=_0x56bd4e,_0x5a85bb=_0x254530(0x4c6)+_0x525969,_0x893086=Buffer[_0x254530(0x3f4)]([Buffer[_0x254530(0x424)](_0x4aa612,'utf8'),_0x1e1ccd]),_0x2e8600=_0x367842['createHmac'](_0x254530(0x124),_0x5a85bb)[_0x254530(0x5bc)](_0x893086)['digest'](),_0x5ec8aa=_0x5b40c6(_0x2e8600[_0x254530(0x3bc)](0x0,0x5));return{'pin':_0x5ec8aa,'pinHmac':_0x2e8600};}function _0x1eb8b5(_0x4cdec9,_0x474dbf,_0x3845e){const _0x4c164b=_0x56bd4e,_0x1e0b79=Buffer['allocUnsafe'](0x4d);let _0x3c8c7a=0x0;_0x1e0b79[_0x4c164b(0x158)](0x1,_0x3c8c7a++),_0x4cdec9[_0x4c164b(0x405)](_0x1e0b79,_0x3c8c7a),_0x3c8c7a+=0x8,_0x1e0b79['writeUInt32BE'](_0x474dbf,_0x3c8c7a),_0x3c8c7a+=0x4,_0x3845e[_0x4c164b(0x405)](_0x1e0b79,_0x3c8c7a);const _0x36063f=_0x5b40c6(_0x1e0b79),_0x454f5b=[];for(let _0x366ded=0x0;_0x366ded<_0x36063f['length'];_0x366ded+=0x6){_0x454f5b[_0x4c164b(0x402)](_0x36063f[_0x4c164b(0x3bc)](_0x366ded,_0x366ded+0x6));}return _0x454f5b['join']('-');}function _0xcc1957(_0x59e205){const _0x2ea127=_0x56bd4e;if(typeof _0x59e205!=='string')throw new Error(_0x2ea127(0x32f));const _0x43cefc=_0xd1f6b7(_0x59e205[_0x2ea127(0x19c)](/-/g,''));if(_0x43cefc[_0x2ea127(0x532)]!==0x4d)throw new Error(_0x2ea127(0x23c)+_0x43cefc['length']);let _0x1deee4=0x0;const _0xe2c5ec=_0x43cefc[_0x2ea127(0x143)](_0x1deee4++),_0x5dbe19=_0x43cefc[_0x2ea127(0x3bc)](_0x1deee4,_0x1deee4+0x8);_0x1deee4+=0x8;const _0x2d43f6=_0x43cefc['readUInt32BE'](_0x1deee4);_0x1deee4+=0x4;const _0x1e592a=_0x43cefc[_0x2ea127(0x3bc)](_0x1deee4);return{'v':_0xe2c5ec,'licenseHash':_0x5dbe19,'expiry':_0x2d43f6,'sig':_0x1e592a};}function _0x3cef61({tokenString:_0xda197b,nodeId:_0x489998,rawBlobBuf:_0x259815,pubKeyPem:_0x1b3b85,pubFingerprint:_0x5de199}){const _0x438c13=_0x56bd4e;let _0x5a4f3c;try{_0x5a4f3c=_0xcc1957(_0xda197b);}catch(_0x445849){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x1f8366=_0x4c7c8d(_0x259815);if(!_0x1f8366['equals'](_0x5a4f3c[_0x438c13(0x4c9)]))return{'valid':![],'reason':_0x438c13(0x4cc)};const {pinHmac:_0x8007a6}=_0x2434a0(_0x489998,_0x1f8366,_0x5de199),_0xffb1d7=Buffer[_0x438c13(0x2d7)](0x4);_0xffb1d7[_0x438c13(0x496)](_0x5a4f3c[_0x438c13(0x1f0)],0x0);const _0x22f6bd=Buffer['concat']([Buffer[_0x438c13(0x424)]([_0x5a4f3c['v']]),_0x8007a6[_0x438c13(0x3bc)](0x0,0x5),_0x5a4f3c[_0x438c13(0x4c9)],_0xffb1d7]);try{const _0x2b9d68=_0x367842[_0x438c13(0x514)](null,_0x22f6bd,_0x1b3b85,_0x5a4f3c[_0x438c13(0x252)]);if(!_0x2b9d68)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x2d5a6f){return{'valid':![],'reason':_0x438c13(0x1ca)};}if(_0x5a4f3c[_0x438c13(0x1f0)]<Date['now']()/0x3e8)return{'valid':![],'reason':_0x438c13(0x286)};return{'valid':!![],'reason':'ok'};}function _0x200972(_0x3d7ba0){const _0x34b714=_0x56bd4e;if(typeof _0x3d7ba0!==_0x34b714(0x3a6))return _0x34b714(0x592);const _0xfd16e3=_0x3d7ba0[_0x34b714(0x551)]();if(_0xfd16e3[_0x34b714(0x5a1)]('/')||_0xfd16e3[_0x34b714(0x5a1)]('./')||_0xfd16e3[_0x34b714(0x5a1)](_0x34b714(0x410))||/^[A-Za-z]:[\\/]/[_0x34b714(0x436)](_0xfd16e3))return _0x34b714(0x289);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x34b714(0x436)](_0xfd16e3))return'uuid';const _0x3b4191=_0xfd16e3['replace'](/[\s-]+/g,'')[_0x34b714(0x532)];if(_0x3b4191===0x7c)return _0x34b714(0x161);if(_0x3b4191>=0x95&&_0x3b4191<=0xfc)return _0x34b714(0x24a);return _0x34b714(0x592);}return okdbLicenseCodec={'toBase32':_0x5b40c6,'fromBase32':_0xd1f6b7,'encodeLicensePayload':_0x51f8bb,'decodeLicensePayload':_0x8e9604,'encodeLicenseBlob':_0x1c375c,'decodeLicenseBlob':_0x47a21f,'licenseHash':_0x4c7c8d,'derivePin':_0x2434a0,'encodeActivationToken':_0x1eb8b5,'decodeActivationToken':_0xcc1957,'verifyActivation':_0x3cef61,'detectInputType':_0x200972,'FEATURE_NAMES':_0x39b6d5,'LICENSE_TYPE_STANDARD':_0x26e41b,'LICENSE_TYPE_OPEN':_0x5add00,'LICENSE_TYPE_INTERNAL':_0x49de03,'OPEN_LICENSE_MAX_DURATION_MS':_0x7221e3},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x295459 extends Error{constructor(_0xc9aefd,_0x56b086,_0x2e5d0b={}){const _0x2361c8=_0x196a;super(_0xc9aefd),this[_0x2361c8(0x24f)]=_0x2361c8(0x4c5),this[_0x2361c8(0x3d1)]=_0x56b086,this[_0x2361c8(0x271)]=_0x2e5d0b,_0x2e5d0b[_0x2361c8(0x4c7)]&&(this['cause']=_0x2e5d0b[_0x2361c8(0x4c7)]),Error['captureStackTrace'](this,this[_0x2361c8(0x5b8)]);}}class _0x2001d1 extends _0x295459{constructor(_0x29213b,_0x367fcf,_0x2d43bf,_0x3d264a){const _0x5dc467=_0x196a;super('Version\x20mismatch\x20for\x20'+_0x29213b+'@'+_0x367fcf+':\x20expected\x20'+_0x2d43bf+_0x5dc467(0x1c7)+_0x3d264a,_0x5dc467(0x2b4),{'type':_0x29213b,'key':_0x367fcf,'expectedVersion':_0x2d43bf,'actualVersion':_0x3d264a}),this[_0x5dc467(0x24f)]='OKDBVersionMismatchError';}}class _0x20485b extends _0x295459{constructor(_0x2ce8a9,_0x5e0656){const _0x5cab63=_0x196a;super(_0x2ce8a9+'@'+_0x5e0656+_0x5cab63(0x425),_0x5cab63(0x197),{'type':_0x2ce8a9,'key':_0x5e0656}),this[_0x5cab63(0x24f)]=_0x5cab63(0x3ca);}}class _0x2cd5d9 extends _0x295459{constructor(_0x37b32e,_0x17bbd2){const _0x2010b6=_0x196a;super(_0x37b32e+'@'+_0x17bbd2+_0x2010b6(0x526),_0x2010b6(0x367),{'type':_0x37b32e,'key':_0x17bbd2}),this['name']='OKDBAlreadyExistsError';}}class _0x4c592c extends _0x295459{constructor(_0x42d7fd,_0x1cec0b){const _0x51c773=_0x196a,_0x274300=typeof _0x1cec0b;super(_0x51c773(0x3e8)+_0x42d7fd+_0x51c773(0x2f2)+_0x274300+_0x51c773(0x388)+_0x1cec0b,_0x51c773(0x4ed),{'index':_0x42d7fd,'key':_0x1cec0b,'keyType':_0x274300}),this['name']=_0x51c773(0x4d4);}}class _0x1abb75 extends _0x295459{constructor(_0x31182d){const _0x3c5e35=_0x196a,_0x3bab1f=typeof _0x31182d;super(_0x3c5e35(0x4d3)+_0x3bab1f+_0x3c5e35(0x46d)+_0x31182d,_0x3c5e35(0x2db),{'key':_0x31182d,'keyType':_0x3bab1f}),this[_0x3c5e35(0x24f)]=_0x3c5e35(0x215);}}class _0x4b3fdc extends _0x295459{constructor(_0x53165f){const _0x3f0276=_0x196a;super(_0x3f0276(0x598)+_0x53165f+'\x27\x20doesn\x27t\x20exist',_0x3f0276(0x1ee),{'type':_0x53165f}),this[_0x3f0276(0x24f)]=_0x3f0276(0x154);}}class _0x1f66dd extends _0x295459{constructor(_0x4e6297){const _0x178d08=_0x196a;super('Type\x20\x27'+_0x4e6297+_0x178d08(0x383),_0x178d08(0x2f4),{'type':_0x4e6297}),this['name']=_0x178d08(0xf6);}}class _0x528da6 extends _0x295459{constructor(_0xe47db,_0x3d37da){const _0x43b144=_0x196a;super(_0x43b144(0x2dd)+_0x3d37da+_0x43b144(0x300)+_0xe47db+_0x43b144(0x5a0),_0x43b144(0x14b),{'type':_0xe47db,'index':_0x3d37da}),this[_0x43b144(0x24f)]=_0x43b144(0x1e1);}}class _0x1ae3f0 extends _0x295459{constructor(_0xc932be,_0x3889f1){const _0x18c529=_0x196a;super(_0x18c529(0x2dd)+_0x3889f1+_0x18c529(0x300)+_0xc932be+_0x18c529(0x111),_0x18c529(0x1a5),{'type':_0xc932be,'index':_0x3889f1}),this[_0x18c529(0x24f)]=_0x18c529(0x193);}}class _0x3f0644 extends _0x295459{constructor(_0x54cf13,_0xaea682={}){const _0x1e7a76=_0x196a;super(_0x54cf13,'INVALID_VALUE',_0xaea682),this[_0x1e7a76(0x24f)]='OKDBInvalidValueError';}}class _0x5bb61d extends _0x295459{constructor(_0x442ad0,_0x33b146,_0x4af9d9,_0x4c5158,_0xf9851c){const _0x107b5d=_0x196a;super('Unique\x20constraint\x20violated\x20on\x20'+_0x442ad0+'@'+_0x33b146+_0x107b5d(0x433)+_0x4af9d9+_0x107b5d(0x23e)+_0x4c5158+_0x107b5d(0x5cf)+_0xf9851c+'\x27',_0x107b5d(0x332),{'type':_0x442ad0,'index':_0x33b146,'indexKey':_0x4af9d9,'existingKey':_0x4c5158,'conflictingKey':_0xf9851c}),this[_0x107b5d(0x24f)]=_0x107b5d(0x54c);}}class _0x2bc2aa extends _0x295459{constructor(_0xaaef5f,_0xa6eb2d,_0x524f35){const _0x4eb64c=_0x196a;super(_0x4eb64c(0x43f)+_0xaaef5f+'@'+_0xa6eb2d,_0x4eb64c(0x41d),{'type':_0xaaef5f,'key':_0xa6eb2d,'errors':_0x524f35}),this[_0x4eb64c(0x24f)]=_0x4eb64c(0x160),this[_0x4eb64c(0x446)]=_0xaaef5f,this[_0x4eb64c(0x57a)]=_0xa6eb2d,this['errors']=_0x524f35;}}class _0x38fd59 extends _0x295459{constructor(_0x781b49,_0x329e81){const _0xc2b2d1=_0x196a;super(_0xc2b2d1(0x455)+_0x781b49+':\x20'+_0x329e81['length']+_0xc2b2d1(0x597),'SCHEMA_COLLECTION_INVALID',{'type':_0x781b49,'failures':_0x329e81}),this[_0xc2b2d1(0x24f)]=_0xc2b2d1(0x257),this[_0xc2b2d1(0x446)]=_0x781b49,this[_0xc2b2d1(0x536)]=_0x329e81;}}class _0x4333ad extends _0x295459{constructor(_0xf3732a,_0x329077,_0x4d26da,_0x4e55ea,_0x4d6e5f){const _0x458350=_0x196a;super(_0x458350(0x2e1)+_0xf3732a+'@'+_0x329077+'.'+_0x4d26da+_0x458350(0x31a)+_0x4e55ea+'@'+_0x4d6e5f+'\x20which\x20does\x20not\x20exist',_0x458350(0x4f4),{'sourceType':_0xf3732a,'sourceKey':_0x329077,'fieldPath':_0x4d26da,'targetType':_0x4e55ea,'targetKey':_0x4d6e5f}),this[_0x458350(0x24f)]=_0x458350(0x477),this[_0x458350(0x595)]=_0xf3732a,this['sourceKey']=_0x329077,this[_0x458350(0x12d)]=_0x4d26da,this[_0x458350(0x58e)]=_0x4e55ea,this[_0x458350(0x2fd)]=_0x4d6e5f;}}class _0x213b18 extends _0x295459{constructor(_0x1127ba,_0x173148,_0x53d28b){const _0xddef3f=_0x196a;super('Cannot\x20delete\x20'+_0x1127ba+'@'+_0x173148+':\x20'+_0x53d28b[_0xddef3f(0x532)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0xddef3f(0x422),{'targetType':_0x1127ba,'targetKey':_0x173148,'references':_0x53d28b}),this[_0xddef3f(0x24f)]=_0xddef3f(0x36b),this[_0xddef3f(0x58e)]=_0x1127ba,this[_0xddef3f(0x2fd)]=_0x173148,this[_0xddef3f(0x11a)]=_0x53d28b;}}class _0x176a0d extends _0x295459{constructor(_0x226fbc,_0x8e5f05,_0x4eff55){const _0x32c9ca=_0x196a;super('Index\x20\x22'+_0x8e5f05+_0x32c9ca(0x5c8)+_0x226fbc+_0x32c9ca(0x555)+_0x4eff55[_0x32c9ca(0x56a)](_0x14dc90=>_0x14dc90[_0x32c9ca(0x538)]+':'+_0x14dc90[_0x32c9ca(0x24f)])[_0x32c9ca(0x315)](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0x226fbc,'index':_0x8e5f05,'usedBy':_0x4eff55}),this[_0x32c9ca(0x24f)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x295459,'OKDBVersionMismatchError':_0x2001d1,'OKDBNotFoundError':_0x20485b,'OKDBAlreadyExistsError':_0x2cd5d9,'OKDBInvalidIndexKeyError':_0x4c592c,'OKDBInvalidPrimaryKeyError':_0x1abb75,'OKDBTypeNotRegisteredError':_0x4b3fdc,'OKDBTypeAlreadyRegisteredError':_0x1f66dd,'OKDBIndexNotRegisteredError':_0x528da6,'OKDBIndexAlreadyRegisteredError':_0x1ae3f0,'OKDBInvalidValueError':_0x3f0644,'OKDBUniqueConstraintError':_0x5bb61d,'OKDBSchemaValidationError':_0x2bc2aa,'OKDBSchemaCollectionError':_0x38fd59,'OKDBForeignKeyError':_0x4333ad,'OKDBForeignKeyDeleteError':_0x213b18,'OKDBIndexHasConsumersError':_0x176a0d},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x40201e=_0x1cf947;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x4d482c={'PUT':'put','REMOVE':_0x40201e(0x2cc),'INDEX_DROP':_0x40201e(0x440),'INDEX_REGISTER':_0x40201e(0x1ef),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':_0x40201e(0x510),'FTS_REGISTER':_0x40201e(0x183),'FTS_DROP':'dropFts','FTS_RESET':_0x40201e(0x50e),'SCHEMA_SET':_0x40201e(0x43d),'SCHEMA_DROP':_0x40201e(0x101),'TTL_SET':_0x40201e(0x5c3),'TTL_CLEAR':'clearTtl'},_0x16f3b6={'SYSTEM_READY':_0x40201e(0x26c),'SYSTEM_STOPPED':_0x40201e(0x3e7),'SYSTEM_CLOCK_CHANGE':_0x40201e(0x4e5),'SYSTEM_POKE':_0x40201e(0x2d2),'SYSTEM_DRAIN':_0x40201e(0x3b4),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x40201e(0x495),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x40201e(0x543),'ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':_0x40201e(0x1ac),'INDEX_READY':_0x40201e(0x566),'INDEX_PROGRESS':_0x40201e(0x3c8),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x40201e(0x19a),'INDEX_REGISTERED':_0x40201e(0x43a),'FTS_REGISTERED':_0x40201e(0x180),'FTS_DROP':_0x40201e(0x51a),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x40201e(0x272),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x40201e(0x1af),'UNIQUE_VIOLATION_RESOLVED':_0x40201e(0x3a0),'REF_VIOLATION':_0x40201e(0x568),'REF_VIOLATION_RESOLVED':_0x40201e(0x573),'SYNC_APPLY':_0x40201e(0x3d3),'TXN_START':_0x40201e(0x355),'TXN_END':'txn:end','TXN_ROLLBACK':_0x40201e(0x165),'TYPE_REGISTERED':_0x40201e(0x2f8),'TYPE_DROP':_0x40201e(0x55c),'ENV_OPENED':_0x40201e(0x3a9),'ENV_REMOVED':_0x40201e(0x2c0),'SYSTEM_ENV_RELEASE':_0x40201e(0x4e0),'TTL_EXPIRED':_0x40201e(0x115),'TTL_SET':'ttl:set','TTL_CLEAR':_0x40201e(0x389),'LICENSE_INVALID':_0x40201e(0x3dc),'LICENSE_ADDED':_0x40201e(0x333),'LICENSE_ACTIVATED':_0x40201e(0x5a6),'LICENSE_REMOVED':'license:removed'},_0x36dece={'CREATING':_0x40201e(0x17b),'RESETTING':_0x40201e(0x523),'READY':_0x40201e(0x26e),'DROPPING':'dropping','WAITING':'waiting'},_0x2e03f1={'CREATED':_0x40201e(0x47a),'STARTING':_0x40201e(0x25c),'STARTED':'started','STOPPING':_0x40201e(0x1a8),'STOPPED':_0x40201e(0x5c7)},_0x87183d={'CREATING':'creating','READY':_0x40201e(0x26e),'HALTED':'halted','STOPPED':'stopped','RESETTING':_0x40201e(0x523)},_0x152e6a=Object[_0x40201e(0x255)]({'POKE':_0x40201e(0x2be),'DRAIN':'bus:drain','TYPE_DROP':_0x40201e(0x452),'PROC':'bus:proc','ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x152e6a,'CHANGE_ACTIONS':_0x4d482c,'EVENTS':_0x16f3b6,'INDEX_STATE':_0x36dece,'OKDB_STATE':_0x2e03f1,'VIEW_STATE':_0x87183d},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x39e678=_0x1cf947;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x3c51dd=require$$1$1,_0xb2d684=require$$1,_0x1be5cb=require$$0$1,_0x3018a2=_0x3c51dd[_0x39e678(0x490)](_0xb2d684[_0x39e678(0x315)](__dirname,'keys/public.pem'),_0x39e678(0x39f))[_0x39e678(0x551)](),_0x138e0d=_0x1be5cb['createPublicKey'](_0x3018a2)[_0x39e678(0x43b)]({'type':_0x39e678(0x3cb),'format':_0x39e678(0x558)}),_0x2f7862=_0x1be5cb[_0x39e678(0x500)](_0x39e678(0x124))['update'](_0x138e0d)[_0x39e678(0x42e)](_0x39e678(0x105))[_0x39e678(0x3bc)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x3018a2,'PUB_FINGERPRINT':_0x2f7862},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x1d6606=_0x1cf947;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x2e22b7=require$$0$1,{OKDBError:_0x1c6262}=requireOkdbError(),{EVENTS:_0x485725}=requireOkdbEnums(),_0x329d38=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x1912b9,LICENSE_TYPE_INTERNAL:_0x40d946,OPEN_LICENSE_MAX_DURATION_MS:_0x3ab68c}=_0x329d38,_0x2133ab=requireOkdbPubkey(),_0x55604d={'LICENSED_BUILD':_0x1d6606(0x212),'PUBLIC_KEY_PEM':_0x2133ab[_0x1d6606(0x4fd)],'PUB_FINGERPRINT':_0x2133ab['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':_0x1d6606(0x481)},_0x4c2f1f='~licenses',_0x11debe={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x40dad9(_0x18b2a8){const _0x4b79bd=_0x1d6606;!_0x18b2a8[_0x4b79bd(0x1d5)](_0x4c2f1f)&&await _0x18b2a8['registerType'](_0x4c2f1f);}class _0x12cd0d{constructor(_0x1bbf55){const _0x235954=_0x1d6606;this['okdb']=_0x1bbf55,this[_0x235954(0x2ec)]=null;}async['reload'](){const _0x3e2150=_0x1d6606,_0x1e07e8=this['okdb'][_0x3e2150(0x24b)];if(!_0x1e07e8||!_0x1e07e8['hasType'](_0x4c2f1f)){this['_active']=null;return;}const _0x22dd5a=this[_0x3e2150(0x24e)]['id'];let _0x58f673=null;for(const {key:_0x2cad4c,value:_0x426eaf}of _0x1e07e8[_0x3e2150(0x268)](_0x4c2f1f)){const _0x243894=this[_0x3e2150(0x221)](_0x426eaf,_0x22dd5a);_0x243894==='active'&&!_0x58f673&&(_0x58f673={..._0x426eaf,'id':_0x2cad4c,'status':_0x243894});}this[_0x3e2150(0x2ec)]=_0x58f673;if(this[_0x3e2150(0x2ec)]&&this[_0x3e2150(0x2ec)][_0x3e2150(0x178)]===_0x1912b9){const _0x33e2ac=Math['ceil']((this[_0x3e2150(0x2ec)][_0x3e2150(0x27c)]-Date[_0x3e2150(0x4e7)]())/0x5265c00);this['okdb'][_0x3e2150(0x481)]?.[_0x3e2150(0x414)](_0x3e2150(0x4bc)+_0x33e2ac+_0x3e2150(0x359),{'feature':_0x3e2150(0x2bb),'licensee':this[_0x3e2150(0x2ec)][_0x3e2150(0x416)],'expiresAt':new Date(this['_active'][_0x3e2150(0x27c)])[_0x3e2150(0x373)]()});}this[_0x3e2150(0x2ec)]&&this[_0x3e2150(0x2ec)][_0x3e2150(0x178)]===_0x40d946&&this[_0x3e2150(0x24e)][_0x3e2150(0x481)]?.[_0x3e2150(0x414)](_0x3e2150(0x211),{'feature':_0x3e2150(0x2bb),'licensee':this[_0x3e2150(0x2ec)]['licensee']});}[_0x1d6606(0x221)](_0x5b7a46,_0x449a3b){const _0x12a721=_0x1d6606;if(!_0x5b7a46['blob'])return _0x12a721(0x1c2);let _0x266d33;try{_0x266d33=_0x329d38[_0x12a721(0x4db)](_0x5b7a46[_0x12a721(0x24a)]);}catch(_0x210622){return'invalid';}try{const _0x18d5c9=_0x2e22b7[_0x12a721(0x514)](null,_0x266d33['payload'],_0x55604d[_0x12a721(0x4fd)],_0x266d33[_0x12a721(0x252)]);if(!_0x18d5c9)return'invalid';}catch(_0x131c1b){return _0x12a721(0x1c2);}if(_0x266d33[_0x12a721(0x488)]['licenseType']===_0x40d946)return _0x12a721(0x4e6);if(_0x266d33[_0x12a721(0x488)][_0x12a721(0x27c)]<=Date['now']())return _0x12a721(0x24c);if(_0x266d33[_0x12a721(0x488)]['licenseType']===_0x1912b9)return _0x12a721(0x4e6);if(!_0x5b7a46[_0x12a721(0x161)])return _0x12a721(0x153);const _0x24824b=_0x329d38[_0x12a721(0x228)]({'tokenString':_0x5b7a46[_0x12a721(0x161)],'nodeId':_0x449a3b,'rawBlobBuf':_0x266d33[_0x12a721(0x55b)],'pubKeyPem':_0x55604d['PUBLIC_KEY_PEM'],'pubFingerprint':_0x55604d[_0x12a721(0x57d)]});if(_0x24824b['reason']==='LICENSE_HASH_MISMATCH'||_0x24824b[_0x12a721(0x219)]===_0x12a721(0x1ca))return _0x12a721(0x225);if(_0x24824b[_0x12a721(0x219)]==='ACTIVATION_EXPIRED')return _0x12a721(0x24c);if(!_0x24824b[_0x12a721(0x1b1)])return _0x12a721(0x225);return _0x12a721(0x4e6);}get['active'](){const _0x46c837=_0x1d6606;return this[_0x46c837(0x2ec)];}get[_0x1d6606(0x468)](){const _0x29b432=_0x1d6606;return this[_0x29b432(0x2ec)]??_0x11debe;}[_0x1d6606(0x429)](_0xb6653d){const _0x448c8b=_0x1d6606;if(_0x55604d[_0x448c8b(0x12f)]!==_0x448c8b(0x212))return;const _0x277b4f=this[_0x448c8b(0x468)];if(!_0x277b4f[_0x448c8b(0x138)]?.[_0xb6653d]){const _0x2ebe45=_0x277b4f[_0x448c8b(0x14c)]?_0x448c8b(0x2af)+_0xb6653d+_0x448c8b(0x38d)+_0xb6653d+'\x22\x20to\x20enable\x20it.':_0x448c8b(0x164)+_0xb6653d+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0xb6653d+'\x22.';throw new _0x1c6262(_0x2ebe45,_0x448c8b(0x141),{'feature':_0xb6653d});}}[_0x1d6606(0x1f4)](_0x2ad1dc){const _0x946282=_0x1d6606;if(_0x55604d[_0x946282(0x12f)]!==_0x946282(0x212))return!![];return!!this['effective'][_0x946282(0x138)]?.[_0x2ad1dc];}[_0x1d6606(0x149)](_0x1e0013,_0x18275b){const _0x423027=_0x1d6606;if(_0x55604d[_0x423027(0x12f)]!=='true')return;const _0x3d9e4c=this[_0x423027(0x468)],_0x42ce1a=_0x3d9e4c['limits']?.[_0x1e0013];if(_0x42ce1a===null||_0x42ce1a===undefined||_0x42ce1a===0x0)return;if(_0x18275b>=_0x42ce1a)throw new _0x1c6262('License\x20limit\x20exceeded:\x20'+_0x1e0013+'\x20('+_0x18275b+'/'+_0x42ce1a+')',_0x423027(0x413),{'limit':_0x1e0013,'current':_0x18275b,'max':_0x42ce1a});}async[_0x1d6606(0x28e)](_0x401e0a){const _0x9238ab=_0x1d6606;let _0x101a21;try{_0x101a21=_0x329d38[_0x9238ab(0x4db)](_0x401e0a);}catch(_0x3c415f){throw new _0x1c6262(_0x9238ab(0x319)+_0x3c415f[_0x9238ab(0x51e)],_0x9238ab(0x451));}let _0x5f3547;try{_0x5f3547=_0x2e22b7[_0x9238ab(0x514)](null,_0x101a21['payload'],_0x55604d[_0x9238ab(0x4fd)],_0x101a21[_0x9238ab(0x252)]);}catch(_0x3ee9ca){throw new _0x1c6262(_0x9238ab(0x5cc)+_0x3ee9ca[_0x9238ab(0x51e)],_0x9238ab(0x451));}if(!_0x5f3547)throw new _0x1c6262(_0x9238ab(0x295)+(_0x9238ab(0x4a9)+_0x55604d[_0x9238ab(0x57d)]+'.\x20')+_0x9238ab(0x27b),_0x9238ab(0x451),{'expectedFingerprint':_0x55604d[_0x9238ab(0x57d)]});if(_0x101a21[_0x9238ab(0x488)]['licenseType']===_0x1912b9){const _0x6e23da=_0x101a21[_0x9238ab(0x488)][_0x9238ab(0x27c)]-_0x101a21[_0x9238ab(0x488)]['issuedAt'];if(_0x6e23da>_0x3ab68c)throw new _0x1c6262('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math['ceil'](_0x6e23da/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)','LICENSE_INVALID');}const _0x499db0=this['okdb'][_0x9238ab(0x24b)];await _0x40dad9(_0x499db0);const _0x26b260=_0x329d38[_0x9238ab(0x4c9)](_0x101a21[_0x9238ab(0x55b)])[_0x9238ab(0x159)]('hex');for(const {value:_0x5933c2}of _0x499db0[_0x9238ab(0x268)](_0x4c2f1f)){if(_0x5933c2[_0x9238ab(0x4a2)]===_0x26b260)throw new _0x1c6262(_0x9238ab(0x52d),_0x9238ab(0x451));}const _0x2b1697=_0x2e22b7[_0x9238ab(0x3ae)](),_0x269c65={'blob':_0x401e0a,'activation':null,'addedAt':Date[_0x9238ab(0x4e7)](),'_licenseHash':_0x26b260,'licensee':_0x101a21[_0x9238ab(0x488)][_0x9238ab(0x416)],'expiresAt':_0x101a21['decoded']['expiresAt'],'features':_0x101a21[_0x9238ab(0x488)][_0x9238ab(0x138)],'limits':_0x101a21[_0x9238ab(0x488)][_0x9238ab(0x4df)],'licenseType':_0x101a21['decoded']['licenseType']};return await _0x499db0[_0x9238ab(0x3fa)](_0x4c2f1f,_0x2b1697,_0x269c65),{'id':_0x2b1697,..._0x269c65};}async[_0x1d6606(0x130)](_0x287fd5){const _0x12ddff=_0x1d6606;let _0x35a33b;try{_0x35a33b=_0x329d38[_0x12ddff(0x41c)](_0x287fd5);}catch(_0x2f3d18){throw new _0x1c6262(_0x12ddff(0x579)+_0x2f3d18[_0x12ddff(0x51e)],_0x12ddff(0x253));}const _0x4db18a=_0x35a33b[_0x12ddff(0x4c9)][_0x12ddff(0x159)](_0x12ddff(0x105)),_0x5f457c=this[_0x12ddff(0x24e)]['_systemEnv'];if(!_0x5f457c||!_0x5f457c[_0x12ddff(0x1d5)](_0x4c2f1f))throw new _0x1c6262(_0x12ddff(0x41a),_0x12ddff(0x253));let _0x1002ef=null,_0x4f1509=null;for(const {key:_0x23b627,value:_0x29cb71}of _0x5f457c[_0x12ddff(0x268)](_0x4c2f1f)){if(_0x29cb71[_0x12ddff(0x4a2)]===_0x4db18a){_0x1002ef=_0x23b627,_0x4f1509=_0x29cb71;break;}}if(!_0x1002ef)throw new _0x1c6262('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x12ddff(0x253));const {rawBuf:_0x245038}=_0x329d38[_0x12ddff(0x4db)](_0x4f1509['blob']),_0x1f5bfd=_0x329d38[_0x12ddff(0x228)]({'tokenString':_0x287fd5,'nodeId':this[_0x12ddff(0x24e)]['id'],'rawBlobBuf':_0x245038,'pubKeyPem':_0x55604d[_0x12ddff(0x4fd)],'pubFingerprint':_0x55604d[_0x12ddff(0x57d)]});if(!_0x1f5bfd[_0x12ddff(0x1b1)])throw new _0x1c6262(_0x12ddff(0xf7)+_0x1f5bfd[_0x12ddff(0x219)],_0x12ddff(0x253),{'reason':_0x1f5bfd['reason']});const _0x95c3a9={..._0x4f1509,'activation':_0x287fd5};return await _0x5f457c[_0x12ddff(0x5bc)](_0x4c2f1f,_0x1002ef,_0x95c3a9),{'id':_0x1002ef,..._0x95c3a9};}async[_0x1d6606(0x392)](_0x513caa){const _0x4053d8=_0x1d6606,_0x30d166=this[_0x4053d8(0x24e)]['_systemEnv'];if(!_0x30d166||!_0x30d166['hasType'](_0x4c2f1f))return;await _0x30d166[_0x4053d8(0x2cc)](_0x4c2f1f,_0x513caa);}async['listLicenses'](){const _0x40385c=_0x1d6606,_0x8fce56=this['okdb'][_0x40385c(0x24b)];if(!_0x8fce56||!_0x8fce56[_0x40385c(0x1d5)](_0x4c2f1f))return[];const _0xc8ad73=this['okdb']['id'],_0x223ffe=[];for(const {key:_0x1ae048,value:_0x109976}of _0x8fce56[_0x40385c(0x268)](_0x4c2f1f)){const _0x2fbd13=this[_0x40385c(0x221)](_0x109976,_0xc8ad73);_0x223ffe[_0x40385c(0x402)]({..._0x109976,'id':_0x1ae048,'status':_0x2fbd13});}return _0x223ffe;}['getPins'](){const _0x273f6a=_0x1d6606,_0x3b3dfe=this[_0x273f6a(0x24e)][_0x273f6a(0x24b)];if(!_0x3b3dfe||!_0x3b3dfe[_0x273f6a(0x1d5)](_0x4c2f1f))return[];const _0x7549b5=this[_0x273f6a(0x24e)]['id'],_0x43d21e=[];for(const {key:_0x39d565,value:_0x39027e}of _0x3b3dfe[_0x273f6a(0x268)](_0x4c2f1f)){if(_0x39027e[_0x273f6a(0x4a2)]){if(_0x39027e[_0x273f6a(0x178)]===_0x1912b9)_0x43d21e[_0x273f6a(0x402)]({'licenseId':_0x39d565,'pin':null});else{const _0xce0b82=Buffer[_0x273f6a(0x424)](_0x39027e[_0x273f6a(0x4a2)],_0x273f6a(0x105)),{pin:_0x115724}=_0x329d38[_0x273f6a(0x1e9)](_0x7549b5,_0xce0b82,_0x55604d[_0x273f6a(0x57d)]);_0x43d21e[_0x273f6a(0x402)]({'licenseId':_0x39d565,'pin':_0x115724});}}}return _0x43d21e;}async[_0x1d6606(0x226)](){const _0x2fb9b2=_0x1d6606,_0x4c234b=this[_0x2fb9b2(0x2ec)];await this[_0x2fb9b2(0x3c2)]();if(this[_0x2fb9b2(0x2ec)]&&this[_0x2fb9b2(0x2ec)][_0x2fb9b2(0x178)]===_0x1912b9){const _0x1838f6=Math[_0x2fb9b2(0x4b5)]((this[_0x2fb9b2(0x2ec)][_0x2fb9b2(0x27c)]-Date['now']())/0x5265c00);this[_0x2fb9b2(0x24e)][_0x2fb9b2(0x481)]?.[_0x2fb9b2(0x414)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x1838f6+'\x20day(s).',{'feature':_0x2fb9b2(0x2bb),'licensee':this[_0x2fb9b2(0x2ec)]['licensee'],'expiresAt':new Date(this['_active'][_0x2fb9b2(0x27c)])[_0x2fb9b2(0x373)]()});}this[_0x2fb9b2(0x2ec)]&&this['_active'][_0x2fb9b2(0x178)]===_0x40d946&&this[_0x2fb9b2(0x24e)][_0x2fb9b2(0x481)]?.['warn'](_0x2fb9b2(0x211),{'feature':_0x2fb9b2(0x2bb),'licensee':this[_0x2fb9b2(0x2ec)]['licensee']});if(_0x4c234b&&!this[_0x2fb9b2(0x2ec)]){this['okdb']['log']?.[_0x2fb9b2(0x414)](_0x2fb9b2(0x25e),{'feature':_0x2fb9b2(0x2bb)}),this[_0x2fb9b2(0x24e)][_0x2fb9b2(0x447)]?.[_0x2fb9b2(0x5be)](_0x485725['LICENSE_INVALID'],{'previous':_0x4c234b});const _0x16d6ca=this['okdb'][_0x2fb9b2(0x37e)]?.[_0x2fb9b2(0x4de)]??_0x55604d[_0x2fb9b2(0x3aa)];_0x16d6ca===_0x2fb9b2(0x464)&&(this[_0x2fb9b2(0x24e)][_0x2fb9b2(0x481)]?.[_0x2fb9b2(0x40f)](_0x2fb9b2(0x412),{'feature':_0x2fb9b2(0x2bb)}),this['okdb'][_0x2fb9b2(0x19f)]()[_0x2fb9b2(0x51d)](()=>{})[_0x2fb9b2(0x2bc)](()=>process[_0x2fb9b2(0x208)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x12cd0d,'_C':_0x55604d},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x54268c=_0x1cf947;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x41864b=require$$0$3,_0x46ffee=require$$1$1,_0x4fdcfb=require$$0,_0x3eb4fa=require$$1,_0x4447d2=_0x3eb4fa[_0x54268c(0x315)](_0x4fdcfb[_0x54268c(0x27f)](),_0x54268c(0x140)),_0x5b5681=0x3e8,_0x287342={'reset':_0x54268c(0x31f),'bold':_0x54268c(0x560),'dim':_0x54268c(0x540),'red':_0x54268c(0x156),'green':_0x54268c(0x525),'yellow':_0x54268c(0x2d8),'blue':'\x1b[34m','magenta':'\x1b[35m','cyan':_0x54268c(0x4d8),'white':_0x54268c(0x4b4),'gray':_0x54268c(0x546)},_0x510ee7=!process['stdout']['isTTY']||!!process.env.NO_COLOR,_0x3b9b0c=(_0x130d6c,_0x2a8cff)=>_0x510ee7?_0x2a8cff:''+_0x130d6c+_0x2a8cff+_0x287342[_0x54268c(0x234)],_0x1c1a91={'error':_0x287342[_0x54268c(0x45d)],'warn':_0x287342[_0x54268c(0x441)],'info':_0x287342[_0x54268c(0x349)],'debug':_0x287342['gray']},_0x5b428d={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x3affc8(_0x7cb5de,_0x1c53d3=_0x54268c(0x4ac)){const _0x1533a9=_0x54268c,{level:_0x4c7468,msg:_0x289314,meta:_0x75f16c,context:_0x3a263c,ts:_0x1fb0a9}=_0x7cb5de;if((_0x5b428d[_0x4c7468]??0x1)<(_0x5b428d[_0x1c53d3]??0x1))return;const _0x150c0e=_0x3b9b0c(_0x287342[_0x1533a9(0x39d)],new Date(_0x1fb0a9)[_0x1533a9(0x373)]()),_0x2292b9=_0x3b9b0c(_0x1c1a91[_0x4c7468]??_0x287342['white'],_0x4c7468['padEnd'](0x5));let _0x1a28a2='\x20\x20'+_0x150c0e+'\x20'+_0x3b9b0c(_0x287342['bold'],_0x2292b9)+'\x20'+_0x289314;if(_0x75f16c&&Object['keys'](_0x75f16c)['length']>0x0){const _0x10d87c=Object[_0x1533a9(0x530)](_0x75f16c)[_0x1533a9(0x56a)](([_0x4ea0df,_0x10518b])=>_0x4ea0df+'='+_0x10518b)[_0x1533a9(0x315)]('\x20');_0x1a28a2+=_0x3b9b0c(_0x287342[_0x1533a9(0x2fc)],'\x20\x20['+_0x10d87c+']');}if(_0x3a263c!==undefined){const _0xdc1bba=typeof _0x3a263c===_0x1533a9(0x261)?JSON[_0x1533a9(0x18b)](_0x3a263c):String(_0x3a263c);_0x1a28a2+=_0x3b9b0c(_0x287342[_0x1533a9(0x2fc)],'\x20\x20'+_0xdc1bba);}const _0x9edaf1=_0x4c7468===_0x1533a9(0x40f)||_0x4c7468===_0x1533a9(0x414)?process[_0x1533a9(0x48a)]['write']['bind'](process[_0x1533a9(0x48a)]):process['stdout']['write'][_0x1533a9(0x49b)](process[_0x1533a9(0x2df)]);_0x9edaf1(_0x1a28a2+'\x0a');}function _0x3cc423(_0x57ae3c,_0x59dc7d){const _0x13a928=_0x54268c;if(_0x57ae3c===0xcc||_0x57ae3c>=0xc8&&_0x57ae3c<0x12c&&!_0x59dc7d){console['log']('\x0a\x20\x20'+_0x3b9b0c(_0x287342[_0x13a928(0x5ae)],'✓')+'\x0a');return;}if(_0x57ae3c>=0x190||_0x59dc7d?.['error']){const _0x5bb8e4=_0x59dc7d?.['error']??_0x59dc7d?.[_0x13a928(0x51e)]??_0x13a928(0x529)+_0x57ae3c;console[_0x13a928(0x481)](_0x13a928(0x293)+_0x3b9b0c(_0x287342['red'],'✗')+'\x20'+_0x3b9b0c(_0x287342['bold']+_0x287342[_0x13a928(0x45d)],String(_0x57ae3c))+'\x20\x20'+_0x5bb8e4+'\x0a');return;}const _0x4f458a=Object[_0x13a928(0x1aa)][_0x13a928(0x5a5)][_0x13a928(0x2a0)](_0x59dc7d??{},_0x13a928(0x48d))?_0x59dc7d[_0x13a928(0x48d)]:_0x59dc7d,_0x30fad9=_0x59dc7d?.[_0x13a928(0x2c3)];console['log'](''),_0x3751f0(_0x4f458a,'\x20\x20');if(_0x30fad9?.[_0x13a928(0x535)]!=null||_0x30fad9?.[_0x13a928(0x33e)]!=null){const _0x42338d=[];if(_0x30fad9[_0x13a928(0x535)]!=null)_0x42338d[_0x13a928(0x402)](_0x30fad9['count']+_0x13a928(0x254)+(_0x30fad9['count']!==0x1?'s':''));if(_0x30fad9[_0x13a928(0x33e)]!=null)_0x42338d[_0x13a928(0x402)](_0x30fad9[_0x13a928(0x33e)]+'ms');console['log'](_0x13a928(0x293)+_0x3b9b0c(_0x287342[_0x13a928(0x2fc)],_0x42338d[_0x13a928(0x315)](_0x13a928(0x599))));}console[_0x13a928(0x481)]('');}function _0x3751f0(_0x412626,_0x3c472f=''){const _0x4c1337=_0x54268c;if(_0x412626===null||_0x412626===undefined){console[_0x4c1337(0x481)](_0x3c472f+_0x3b9b0c(_0x287342[_0x4c1337(0x2fc)],_0x4c1337(0x1cf)));return;}if(Array[_0x4c1337(0x397)](_0x412626)){if(_0x412626[_0x4c1337(0x532)]===0x0){console[_0x4c1337(0x481)](_0x3c472f+_0x3b9b0c(_0x287342['dim'],_0x4c1337(0x31c)));return;}if(_0x412626[_0x4c1337(0x220)](_0x325e48=>_0x325e48&&typeof _0x325e48==='object'&&_0x4c1337(0x57a)in _0x325e48&&'value'in _0x325e48)){_0x41e19a(_0x412626,_0x3c472f);return;}if(_0x412626[_0x4c1337(0x220)](_0x582baf=>_0x582baf&&typeof _0x582baf===_0x4c1337(0x261)&&_0x4c1337(0x446)in _0x582baf&&_0x4c1337(0x535)in _0x582baf)){_0x396f5a(_0x412626,_0x3c472f);return;}if(_0x412626['every'](_0x3ba7c9=>typeof _0x3ba7c9!==_0x4c1337(0x261)||_0x3ba7c9===null)){_0x412626['forEach']((_0x5ce4c5,_0x3f3b59)=>console[_0x4c1337(0x481)](_0x3c472f+_0x3b9b0c(_0x287342[_0x4c1337(0x39d)],_0x3f3b59+0x1+'.')+'\x20'+_0x3b9b0c(_0x287342[_0x4c1337(0x10b)],String(_0x5ce4c5))));return;}_0x412626[_0x4c1337(0x110)]((_0x48ecb4,_0x38bef2)=>{const _0x4815ce=_0x4c1337;console[_0x4815ce(0x481)](_0x3c472f+_0x3b9b0c(_0x287342[_0x4815ce(0x2fc)],'['+_0x38bef2+']'));if(typeof _0x48ecb4==='object'&&_0x48ecb4!==null)_0x24e17a(_0x48ecb4,_0x3c472f+'\x20\x20');else console[_0x4815ce(0x481)](_0x3c472f+'\x20\x20'+String(_0x48ecb4));});return;}if(typeof _0x412626==='object'){if(_0x4c1337(0x57a)in _0x412626&&_0x4c1337(0x155)in _0x412626&&Object['keys'](_0x412626)[_0x4c1337(0x532)]<=0x3){console[_0x4c1337(0x481)](_0x3c472f+_0x3b9b0c(_0x287342['bold']+_0x287342[_0x4c1337(0x349)],String(_0x412626[_0x4c1337(0x57a)])));const _0x5f0522=_0x412626[_0x4c1337(0x155)];if(_0x5f0522&&typeof _0x5f0522==='object')_0x24e17a(_0x5f0522,_0x3c472f);else console['log'](_0x3c472f+_0x3b9b0c(_0x287342['white'],String(_0x5f0522)));return;}_0x24e17a(_0x412626,_0x3c472f);return;}console[_0x4c1337(0x481)](_0x3c472f+_0x3b9b0c(_0x287342[_0x4c1337(0x10b)],String(_0x412626)));}function _0x24e17a(_0x31e07e,_0xeabfe5=''){const _0x1d36dd=_0x54268c,_0x4fc2b0=Object['entries'](_0x31e07e);if(_0x4fc2b0[_0x1d36dd(0x532)]===0x0){console[_0x1d36dd(0x481)](_0xeabfe5+_0x3b9b0c(_0x287342['dim'],'{}'));return;}const _0x1ef2fb=Math['min'](0x1c,Math[_0x1d36dd(0x264)](..._0x4fc2b0[_0x1d36dd(0x56a)](([_0x13527a])=>_0x13527a[_0x1d36dd(0x532)])));for(const [_0x12c5e7,_0x275d1d]of _0x4fc2b0){const _0x55a3e4=_0x3b9b0c(_0x287342['cyan'],_0x12c5e7[_0x1d36dd(0x302)](_0x1ef2fb));if(_0x275d1d===null||_0x275d1d===undefined)console[_0x1d36dd(0x481)](_0xeabfe5+_0x55a3e4+'\x20\x20'+_0x3b9b0c(_0x287342['dim'],_0x1d36dd(0xfb)));else{if(typeof _0x275d1d==='object'){const _0x5f279f=JSON['stringify'](_0x275d1d);_0x5f279f[_0x1d36dd(0x532)]<=0x50?console[_0x1d36dd(0x481)](_0xeabfe5+_0x55a3e4+'\x20\x20'+_0x3b9b0c(_0x287342[_0x1d36dd(0x2fc)],_0x5f279f)):(console[_0x1d36dd(0x481)](_0xeabfe5+_0x55a3e4),_0x3751f0(_0x275d1d,_0xeabfe5+'\x20\x20'));}else{const _0x2d1d7d=typeof _0x275d1d===_0x1d36dd(0x102)?_0x3b9b0c(_0x275d1d?_0x287342[_0x1d36dd(0x5ae)]:_0x287342[_0x1d36dd(0x441)],String(_0x275d1d)):typeof _0x275d1d===_0x1d36dd(0x4cd)?_0x3b9b0c(_0x287342[_0x1d36dd(0x30c)],String(_0x275d1d)):_0x3b9b0c(_0x287342[_0x1d36dd(0x10b)],String(_0x275d1d));console[_0x1d36dd(0x481)](_0xeabfe5+_0x55a3e4+'\x20\x20'+_0x2d1d7d);}}}}function _0x41e19a(_0x3634fc,_0x2d409b=''){const _0xe51baa=_0x54268c,_0x12bb56=Math[_0xe51baa(0x2ba)](0x20,Math[_0xe51baa(0x264)](..._0x3634fc[_0xe51baa(0x56a)](_0x21c181=>String(_0x21c181[_0xe51baa(0x57a)])[_0xe51baa(0x532)])));for(const {key:_0x44ce4b,value:_0x202e8a,score:_0x321dc7,clock:_0x48b93e}of _0x3634fc){const _0x1fc818=_0x3b9b0c(_0x287342[_0xe51baa(0x202)]+_0x287342[_0xe51baa(0x349)],String(_0x44ce4b)[_0xe51baa(0x302)](_0x12bb56)),_0x235cfc=_0x202e8a==null?_0x3b9b0c(_0x287342['dim'],_0xe51baa(0xfb)):typeof _0x202e8a===_0xe51baa(0x261)?_0x3b9b0c(_0x287342[_0xe51baa(0x2fc)],JSON[_0xe51baa(0x18b)](_0x202e8a)):_0x3b9b0c(_0x287342[_0xe51baa(0x10b)],String(_0x202e8a)),_0x4e1130=_0x321dc7!=null?_0x3b9b0c(_0x287342['gray'],'\x20\x20score:'+_0x321dc7[_0xe51baa(0x396)](0x4)):'',_0x14eecc=_0x48b93e!=null?_0x3b9b0c(_0x287342[_0xe51baa(0x39d)],'\x20\x20@'+_0x48b93e):'';console[_0xe51baa(0x481)](_0x2d409b+_0x1fc818+'\x20\x20'+_0x235cfc+_0x4e1130+_0x14eecc);}}function _0x396f5a(_0x56e656,_0x1aa926=''){const _0x4e14d8=_0x54268c,_0x5a3a39=Math[_0x4e14d8(0x2ba)](0x20,Math[_0x4e14d8(0x264)](..._0x56e656[_0x4e14d8(0x56a)](_0x8e5635=>_0x8e5635[_0x4e14d8(0x446)]['length'])));for(const {type:_0x1908b4,count:_0x5f1085,fields:_0x293f09}of _0x56e656){if(_0x1908b4['startsWith']('~'))continue;const _0x5dea00=_0x3b9b0c(_0x287342[_0x4e14d8(0x202)]+_0x287342[_0x4e14d8(0x349)],_0x1908b4[_0x4e14d8(0x302)](_0x5a3a39)),_0x31beec=_0x3b9b0c(_0x287342[_0x4e14d8(0x30c)],String(_0x5f1085)[_0x4e14d8(0x3c4)](0x6))+_0x3b9b0c(_0x287342[_0x4e14d8(0x2fc)],'\x20records'),_0x2b177c=_0x293f09&&Object['keys'](_0x293f09)[_0x4e14d8(0x532)]?_0x3b9b0c(_0x287342[_0x4e14d8(0x2fc)],_0x4e14d8(0x23a)+Object[_0x4e14d8(0x157)](_0x293f09)[_0x4e14d8(0x3bc)](0x0,0x6)[_0x4e14d8(0x315)](',\x20')+(Object[_0x4e14d8(0x157)](_0x293f09)[_0x4e14d8(0x532)]>0x6?'…':'')):'';console[_0x4e14d8(0x481)](_0x1aa926+_0x5dea00+'\x20\x20'+_0x31beec+_0x2b177c);}}const _0xf73b77=[_0x54268c(0x1ae),_0x54268c(0x38c),_0x54268c(0x38f),'files/','transaction','processors/'];function _0x1a8635(_0x596652,_0x471e81){const _0x4d37c3=_0x54268c;if(_0x596652['startsWith'](_0x4d37c3(0x23f)))return _0x596652;if(_0x596652[_0x4d37c3(0x5a1)]('/'))return _0x4d37c3(0x238)+_0x596652;if(_0x596652[_0x4d37c3(0x5a1)](_0x4d37c3(0x320)))return _0x4d37c3(0x23f)+_0x596652;const _0x5205d6=_0xf73b77[_0x4d37c3(0x386)](_0x5b70b9=>_0x596652===_0x5b70b9[_0x4d37c3(0x19c)](/\/$/,'')||_0x596652[_0x4d37c3(0x5a1)](_0x5b70b9));return _0x5205d6?'/api/env/'+_0x471e81+'/'+_0x596652:_0x4d37c3(0x23f)+_0x596652;}function _0x5caf46(_0x2a36c5){const _0x3ad2b1=_0x54268c,_0x4a903b={},_0x10335a=[];let _0xaa5d74=0x0;while(_0xaa5d74<_0x2a36c5[_0x3ad2b1(0x532)]){if((_0x2a36c5[_0xaa5d74]==='--env'||_0x2a36c5[_0xaa5d74]==='-e')&&_0x2a36c5[_0xaa5d74+0x1]&&!_0x2a36c5[_0xaa5d74+0x1][_0x3ad2b1(0x5a1)]('-'))_0x4a903b[_0x3ad2b1(0x10e)]=_0x2a36c5[++_0xaa5d74];else _0x2a36c5[_0xaa5d74]===_0x3ad2b1(0x2c9)||_0x2a36c5[_0xaa5d74]==='-h'?_0x4a903b['help']=!![]:_0x10335a[_0x3ad2b1(0x402)](_0x2a36c5[_0xaa5d74]);_0xaa5d74++;}return{'flags':_0x4a903b,'rest':_0x10335a};}const _0xa43f8b={'system':_0x54268c(0x4b9),'envs':_0x54268c(0x499),'types':'Types','data':_0x54268c(0x407),'indexes':_0x54268c(0x104),'fts':_0x54268c(0x3e1),'sync':_0x54268c(0x139),'queue':'Queue','files':'Files','embeddings':_0x54268c(0x5b5),'engines':'Engines','admin':_0x54268c(0x534),'event':_0x54268c(0x2fa),'processor':'Processors'},_0x287821=[_0x54268c(0x146),_0x54268c(0x283),_0x54268c(0x1ae),_0x54268c(0x3ff),_0x54268c(0x1fb),_0x54268c(0x230),'sync',_0x54268c(0x2a1),_0x54268c(0x145),'embeddings','engines',_0x54268c(0x357)];function _0x4d2696(_0x5373a5){const _0x1d9d05=_0x54268c;return _0x5373a5[_0x1d9d05(0x19c)](/^\/api/,'')[_0x1d9d05(0x19c)](/^\[\/env\/:env=[^\]]*\]/,_0x1d9d05(0x1df))[_0x1d9d05(0x19c)](/^\/env\/:env/,_0x1d9d05(0x3eb))[_0x1d9d05(0x19c)](/^\//,'');}function _0x5ab97a(_0x18cb57,_0x16202c=''){const _0x234414=_0x54268c,_0x22f3b3=_0x18cb57[_0x234414(0x37d)][_0x234414(0x40e)]()[_0x234414(0x59d)](_0x55152f=>!_0x55152f[_0x234414(0x2c3)]?.[_0x234414(0x528)]),_0x374ff2=_0x16202c?_0x22f3b3[_0x234414(0x59d)](_0x18aacc=>_0x18aacc['path'][_0x234414(0x2f5)]()[_0x234414(0x1c0)](_0x16202c[_0x234414(0x2f5)]())||(_0x2b0500(_0x18aacc)??'')[_0x234414(0x2f5)]()[_0x234414(0x1c0)](_0x16202c['toLowerCase']())||_0x1db1bb(_0x18aacc)[_0x234414(0x386)](_0x2b6dce=>_0x2b6dce[_0x234414(0x2f5)]()['includes'](_0x16202c[_0x234414(0x2f5)]()))):_0x22f3b3;if(!_0x374ff2[_0x234414(0x532)]){console['log'](_0x3b9b0c(_0x287342[_0x234414(0x441)],_0x234414(0x5b0)+_0x16202c+'\x22\x0a'));return;}const _0x554131=new Map();for(const _0x3e33e3 of _0x374ff2){const _0x13fb10=_0x1db1bb(_0x3e33e3)[0x0]??_0x234414(0x5ad);if(!_0x554131['has'](_0x13fb10))_0x554131[_0x234414(0x578)](_0x13fb10,[]);_0x554131['get'](_0x13fb10)[_0x234414(0x402)](_0x3e33e3);}const _0x40ab01=[..._0x287821[_0x234414(0x59d)](_0x21ed3b=>_0x554131[_0x234414(0x5b3)](_0x21ed3b)),...[..._0x554131['keys']()][_0x234414(0x59d)](_0x279c0e=>!_0x287821[_0x234414(0x1c0)](_0x279c0e))];console[_0x234414(0x481)]('');for(const _0x5c2379 of _0x40ab01){const _0x2d00f8=_0x554131[_0x234414(0x1d0)](_0x5c2379);if(!_0x2d00f8?.[_0x234414(0x532)])continue;console[_0x234414(0x481)](_0x3b9b0c(_0x287342[_0x234414(0x202)],'\x20\x20'+(_0xa43f8b[_0x5c2379]??_0x5c2379)));for(const _0x383ec of _0x2d00f8){const _0x19793e=_0x3b9b0c(_0x287342[_0x234414(0x30c)],_0x383ec['method']['padEnd'](0x7)),_0x69925a=_0x3b9b0c(_0x287342[_0x234414(0x349)],_0x4d2696(_0x383ec['path'])),_0x7c632c=_0x2b0500(_0x383ec)?_0x3b9b0c(_0x287342['dim'],'\x20\x20'+_0x2b0500(_0x383ec)):'',_0x2bc2b9=_0x383ec[_0x234414(0x2ee)]?.['id']?_0x3b9b0c(_0x287342[_0x234414(0x39d)],'\x20\x20['+_0x383ec[_0x234414(0x2ee)]['id']+']'):'';console[_0x234414(0x481)]('\x20\x20\x20\x20'+_0x19793e+'\x20'+_0x69925a+_0x7c632c+_0x2bc2b9);}console[_0x234414(0x481)]('');}}function _0xc78eac(_0x440e6f,_0x3c3daa){const _0x53f7ee=_0x54268c,_0x19128b=_0x3c3daa[_0x53f7ee(0x19c)](/^\/api(\/env\/[^/]+)?\//,'')[_0x53f7ee(0x280)]('/')[0x0],_0x689d2a=_0x440e6f[_0x53f7ee(0x37d)][_0x53f7ee(0x40e)]()[_0x53f7ee(0x59d)](_0x3718c0=>_0x3718c0['path'][_0x53f7ee(0x2f5)]()[_0x53f7ee(0x1c0)](_0x19128b[_0x53f7ee(0x2f5)]()));if(!_0x689d2a['length']){console[_0x53f7ee(0x481)](_0x3b9b0c(_0x287342[_0x53f7ee(0x441)],_0x53f7ee(0x1f2)+_0x3c3daa+'\x0a'));return;}console[_0x53f7ee(0x481)]('');for(const _0x1842aa of _0x689d2a[_0x53f7ee(0x3bc)](0x0,0xc)){for(const _0x4a89ca of _0x5d5c8c(_0x1842aa)){console['log'](_0x4a89ca);}console[_0x53f7ee(0x481)]('');}}function _0x2b0500(_0xe3fb4b){const _0x1fe379=_0x54268c;return _0xe3fb4b[_0x1fe379(0x2ee)]?.[_0x1fe379(0x321)]??_0xe3fb4b['meta']?.['summary']??'';}function _0x1fc2fb(_0x254ff6){const _0x45671f=_0x54268c;return _0x254ff6[_0x45671f(0x2ee)]?.[_0x45671f(0x2c1)]??_0x254ff6[_0x45671f(0x2c3)]?.[_0x45671f(0x2c1)]??'';}function _0x1db1bb(_0x2da410){const _0x4e09a2=_0x54268c;return _0x2da410[_0x4e09a2(0x2ee)]?.[_0x4e09a2(0x2d4)]?.[_0x4e09a2(0x532)]?_0x2da410['operation'][_0x4e09a2(0x2d4)]:_0x2da410[_0x4e09a2(0x2c3)]?.[_0x4e09a2(0x2d4)]??[];}function _0x5d5c8c(_0x22f623){const _0x14aa2e=_0x54268c,_0x12282d=[];_0x12282d[_0x14aa2e(0x402)]('\x20\x20'+_0x3b9b0c(_0x287342['bold']+_0x287342['magenta'],_0x22f623[_0x14aa2e(0x2fb)][_0x14aa2e(0x302)](0x7))+'\x20'+_0x3b9b0c(_0x287342[_0x14aa2e(0x202)]+_0x287342[_0x14aa2e(0x349)],_0x22f623[_0x14aa2e(0x289)]));_0x22f623[_0x14aa2e(0x2ee)]?.['id']&&_0x12282d[_0x14aa2e(0x402)](_0x14aa2e(0x49a)+_0x3b9b0c(_0x287342[_0x14aa2e(0x39d)],'id:\x20'+_0x22f623[_0x14aa2e(0x2ee)]['id']));_0x2b0500(_0x22f623)&&_0x12282d[_0x14aa2e(0x402)](_0x14aa2e(0x49a)+_0x3b9b0c(_0x287342[_0x14aa2e(0x10b)],_0x2b0500(_0x22f623)));_0x1fc2fb(_0x22f623)&&_0x12282d[_0x14aa2e(0x402)](_0x14aa2e(0x49a)+_0x3b9b0c(_0x287342['dim'],_0x1fc2fb(_0x22f623)));_0x1db1bb(_0x22f623)[_0x14aa2e(0x532)]&&_0x12282d['push'](_0x14aa2e(0x49a)+_0x3b9b0c(_0x287342[_0x14aa2e(0x39d)],'tags:\x20'+_0x1db1bb(_0x22f623)[_0x14aa2e(0x315)](',\x20')));_0x22f623['operation']?.['safety']?.['access']&&_0x12282d[_0x14aa2e(0x402)](_0x14aa2e(0x49a)+_0x3b9b0c(_0x287342[_0x14aa2e(0x39d)],_0x14aa2e(0x309)+_0x22f623['operation'][_0x14aa2e(0x415)][_0x14aa2e(0x218)]));_0x22f623[_0x14aa2e(0x2ee)]?.[_0x14aa2e(0x37d)]?.['transport']&&_0x22f623[_0x14aa2e(0x2ee)][_0x14aa2e(0x37d)]['transport']!==_0x14aa2e(0x356)&&_0x12282d[_0x14aa2e(0x402)](_0x14aa2e(0x49a)+_0x3b9b0c(_0x287342[_0x14aa2e(0x39d)],_0x14aa2e(0x53f)+_0x22f623['operation'][_0x14aa2e(0x37d)][_0x14aa2e(0x46b)]));if(_0x22f623[_0x14aa2e(0x2ee)]?.[_0x14aa2e(0x341)]){const _0x4a263d=Object[_0x14aa2e(0x157)](_0x22f623['operation'][_0x14aa2e(0x341)]['properties']||{});if(_0x4a263d[_0x14aa2e(0x532)])_0x12282d[_0x14aa2e(0x402)](_0x14aa2e(0x49a)+_0x3b9b0c(_0x287342['gray'],_0x14aa2e(0x16d)+_0x4a263d[_0x14aa2e(0x315)](',\x20')));}return _0x22f623[_0x14aa2e(0x2c3)]?.[_0x14aa2e(0x317)]&&_0x12282d[_0x14aa2e(0x402)](_0x14aa2e(0x49a)+_0x3b9b0c(_0x287342[_0x14aa2e(0x39d)],_0x14aa2e(0x59b)+JSON[_0x14aa2e(0x18b)](_0x22f623[_0x14aa2e(0x2c3)][_0x14aa2e(0x317)]))),_0x12282d;}async function _0x14ce0c(_0x381026,_0x331f07,_0x1e5c1c,_0x11fb1f=null){const _0x35d66a=_0x54268c,_0x409169=_0x1e5c1c[_0x35d66a(0x504)]('?'),_0x32f776=_0x409169>=0x0?_0x1e5c1c[_0x35d66a(0x3bc)](0x0,_0x409169):_0x1e5c1c,_0x2b260a=_0x409169>=0x0?_0x1e5c1c[_0x35d66a(0x3bc)](_0x409169+0x1):'',_0x15bc17=Object[_0x35d66a(0x31d)](new URLSearchParams(_0x2b260a)[_0x35d66a(0x530)]());return _0x381026[_0x35d66a(0x37d)][_0x35d66a(0x201)](_0x331f07,_0x32f776,{'body':_0x11fb1f,'query':_0x15bc17,'headers':{'content-type':_0x35d66a(0x4b6)}},{'internal':!![]});}function _0x459dd2(_0x27674d){const _0x5f19ab=_0x54268c;if(!_0x27674d)return null;const _0x49daa1=_0x27674d['trim']();if(!_0x49daa1)return null;try{return JSON['parse'](_0x49daa1);}catch{}try{return JSON[_0x5f19ab(0x1c1)](_0x4c2ab9(_0x49daa1));}catch(_0x17c0c5){throw new SyntaxError(_0x17c0c5[_0x5f19ab(0x51e)],{'cause':_0x17c0c5});}}function _0x4c2ab9(_0x5cbc59){const _0x108f33=_0x54268c;let _0x57aedc='',_0x1d843e=0x0;while(_0x1d843e<_0x5cbc59[_0x108f33(0x532)]){const _0x535fb3=_0x5cbc59[_0x1d843e];if(_0x535fb3==='\x22'){_0x57aedc+='\x22',_0x1d843e++;while(_0x1d843e<_0x5cbc59['length']&&_0x5cbc59[_0x1d843e]!=='\x22'){if(_0x5cbc59[_0x1d843e]==='\x5c'){_0x57aedc+=_0x5cbc59[_0x1d843e++];if(_0x1d843e<_0x5cbc59[_0x108f33(0x532)])_0x57aedc+=_0x5cbc59[_0x1d843e++];}else _0x57aedc+=_0x5cbc59[_0x1d843e++];}_0x57aedc+='\x22';if(_0x1d843e<_0x5cbc59['length'])_0x1d843e++;continue;}if(_0x535fb3==='\x27'){_0x57aedc+='\x22',_0x1d843e++;while(_0x1d843e<_0x5cbc59['length']&&_0x5cbc59[_0x1d843e]!=='\x27'){if(_0x5cbc59[_0x1d843e]==='\x5c'&&_0x5cbc59[_0x1d843e+0x1]==='\x27')_0x57aedc+='\x27',_0x1d843e+=0x2;else _0x5cbc59[_0x1d843e]==='\x22'?(_0x57aedc+='\x5c\x22',_0x1d843e++):_0x57aedc+=_0x5cbc59[_0x1d843e++];}_0x57aedc+='\x22';if(_0x1d843e<_0x5cbc59['length'])_0x1d843e++;continue;}if(_0x108f33(0x370)[_0x108f33(0x1c0)](_0x535fb3)){_0x57aedc+=_0x535fb3,_0x1d843e++;continue;}let _0x634e5='';while(_0x1d843e<_0x5cbc59[_0x108f33(0x532)]&&!'{}[]:,\x27\x22'[_0x108f33(0x1c0)](_0x5cbc59[_0x1d843e])&&_0x5cbc59[_0x1d843e]!=='\x20'&&_0x5cbc59[_0x1d843e]!=='\x09'&&_0x5cbc59[_0x1d843e]!=='\x0a'&&_0x5cbc59[_0x1d843e]!=='\x0d'){_0x634e5+=_0x5cbc59[_0x1d843e++];}let _0x3a39c5=_0x1d843e;while(_0x3a39c5<_0x5cbc59[_0x108f33(0x532)]&&(_0x5cbc59[_0x3a39c5]==='\x20'||_0x5cbc59[_0x3a39c5]==='\x09'))_0x3a39c5++;if(_0x5cbc59[_0x3a39c5]===':')_0x57aedc+='\x22'+_0x634e5+'\x22';else _0x634e5===_0x108f33(0x212)||_0x634e5===_0x108f33(0x190)||_0x634e5===_0x108f33(0xfb)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x108f33(0x436)](_0x634e5)?_0x57aedc+=_0x634e5:_0x57aedc+='\x22'+_0x634e5+'\x22';}return _0x57aedc[_0x108f33(0x19c)](/,(\s*[}\]])/g,'$1');}function _0x5ba264(_0x16dbc7){const _0x2980bd=_0x54268c,_0x26b8f7=[];let _0xa883b5=0x0;while(_0xa883b5<_0x16dbc7[_0x2980bd(0x532)]){while(_0xa883b5<_0x16dbc7['length']&&(_0x16dbc7[_0xa883b5]==='\x20'||_0x16dbc7[_0xa883b5]==='\x09'))_0xa883b5++;if(_0xa883b5>=_0x16dbc7[_0x2980bd(0x532)])break;const _0x38e1f1=_0x16dbc7[_0xa883b5];if(_0x38e1f1==='{'||_0x38e1f1==='['){const _0x196c82=_0x38e1f1==='{'?'}':']',_0x28960a=_0xa883b5++;let _0x5336f4=0x1,_0x39075b=![],_0x5ef303='';while(_0xa883b5<_0x16dbc7[_0x2980bd(0x532)]&&_0x5336f4>0x0){const _0x3437d4=_0x16dbc7[_0xa883b5];if(_0x39075b){if(_0x3437d4==='\x5c')_0xa883b5++;else{if(_0x3437d4===_0x5ef303)_0x39075b=![];}}else{if(_0x3437d4==='\x22'||_0x3437d4==='\x27')_0x39075b=!![],_0x5ef303=_0x3437d4;else{if(_0x3437d4===_0x38e1f1)_0x5336f4++;else{if(_0x3437d4===_0x196c82)_0x5336f4--;}}}_0xa883b5++;}_0x26b8f7[_0x2980bd(0x402)](_0x16dbc7[_0x2980bd(0x3bc)](_0x28960a,_0xa883b5));continue;}if(_0x38e1f1==='\x22'||_0x38e1f1==='\x27'){const _0x4ffc5c=_0x38e1f1;_0xa883b5++;let _0x358913='';while(_0xa883b5<_0x16dbc7[_0x2980bd(0x532)]&&_0x16dbc7[_0xa883b5]!==_0x4ffc5c){if(_0x16dbc7[_0xa883b5]==='\x5c'&&_0xa883b5+0x1<_0x16dbc7[_0x2980bd(0x532)])_0xa883b5++,_0x358913+=_0x16dbc7[_0xa883b5++];else _0x358913+=_0x16dbc7[_0xa883b5++];}if(_0xa883b5<_0x16dbc7[_0x2980bd(0x532)])_0xa883b5++;_0x26b8f7['push'](_0x358913);continue;}let _0x245447='';while(_0xa883b5<_0x16dbc7[_0x2980bd(0x532)]&&_0x16dbc7[_0xa883b5]!=='\x20'&&_0x16dbc7[_0xa883b5]!=='\x09'&&_0x16dbc7[_0xa883b5]!=='{'&&_0x16dbc7[_0xa883b5]!=='['){_0x245447+=_0x16dbc7[_0xa883b5++];}if(_0x245447)_0x26b8f7[_0x2980bd(0x402)](_0x245447);}return _0x26b8f7;}function _0x4ae4a4(_0x1314b9,_0x1f3995){const _0x2253ea=_0x54268c,_0xd3b8a0=[..._0x1314b9[_0x2253ea(0x18e)]['keys']()][_0x2253ea(0x59d)](_0x47acd6=>!_0x47acd6[_0x2253ea(0x5a1)]('~'));console[_0x2253ea(0x481)](['',_0x3b9b0c(_0x287342[_0x2253ea(0x202)]+_0x287342[_0x2253ea(0x349)],_0x2253ea(0x276)),_0x3b9b0c(_0x287342[_0x2253ea(0x202)]+_0x287342[_0x2253ea(0x349)],_0x2253ea(0x398))+_0x3b9b0c(_0x287342[_0x2253ea(0x202)],'\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20')+_0x3b9b0c(_0x287342['bold']+_0x287342[_0x2253ea(0x349)],'║'),_0x3b9b0c(_0x287342[_0x2253ea(0x202)]+_0x287342[_0x2253ea(0x349)],'\x20\x20╚═══════════════════════════╝'),'','\x20\x20'+_0x3b9b0c(_0x287342[_0x2253ea(0x5ae)],'✓')+'\x20'+_0x3b9b0c(_0x287342[_0x2253ea(0x202)],_0x2253ea(0x4d7))+_0x2253ea(0x570)+_0x1f3995['port'],..._0x1f3995[_0x2253ea(0x418)]>0x1?['\x20\x20'+_0x3b9b0c(_0x287342[_0x2253ea(0x5ae)],'✓')+'\x20'+_0x3b9b0c(_0x287342['bold'],_0x2253ea(0x27e))+'\x20'+_0x1f3995['clusterWorkers']+'\x20HTTP\x20workers\x20'+_0x3b9b0c(_0x287342['gray'],_0x2253ea(0x35f))]:[],'\x20\x20'+_0x3b9b0c(_0x287342[_0x2253ea(0x5ae)],'✓')+'\x20'+_0x3b9b0c(_0x287342['bold'],_0x2253ea(0x5bd))+_0x2253ea(0x348)+_0x1f3995[_0x2253ea(0x4cb)]+_0x2253ea(0x238),'\x20\x20'+_0x3b9b0c(_0x287342[_0x2253ea(0x5ae)],'✓')+'\x20'+_0x3b9b0c(_0x287342['bold'],_0x2253ea(0x289))+_0x2253ea(0x334)+_0x1f3995[_0x2253ea(0x23b)],'\x20\x20'+_0x3b9b0c(_0x287342[_0x2253ea(0x5ae)],'✓')+'\x20'+_0x3b9b0c(_0x287342[_0x2253ea(0x202)],'id')+_0x2253ea(0x275)+_0x3b9b0c(_0x287342['gray'],_0x1314b9['id']),'\x20\x20'+_0x3b9b0c(_0x287342['green'],'✓')+'\x20'+_0x3b9b0c(_0x287342[_0x2253ea(0x202)],'envs')+'\x20\x20\x20\x20'+_0xd3b8a0[_0x2253ea(0x56a)](_0x248d89=>_0x3b9b0c(_0x287342[_0x2253ea(0x349)],_0x248d89))['join']('\x20\x20'),..._0x1f3995['noAdmin']?[]:['\x20\x20'+_0x3b9b0c(_0x287342[_0x2253ea(0x5ae)],'✓')+'\x20'+_0x3b9b0c(_0x287342[_0x2253ea(0x202)],'admin')+_0x2253ea(0x5c2)+_0x1f3995[_0x2253ea(0x4cb)]+_0x2253ea(0x126)],'',_0x3b9b0c(_0x287342['dim'],_0x2253ea(0x2b3)+_0x3b9b0c(_0x287342['bold'],'help')+_0x2253ea(0x587)+_0x3b9b0c(_0x287342[_0x2253ea(0x202)],'routes')+_0x2253ea(0x475)+_0x3b9b0c(_0x287342[_0x2253ea(0x202)],_0x2253ea(0x208))+_0x2253ea(0x59e)),''][_0x2253ea(0x315)]('\x0a'));}function _0x2fb762(_0x58c22a){const _0x4aff67=_0x54268c;console['log']('\x0a'+_0x3b9b0c(_0x287342[_0x4aff67(0x202)],_0x4aff67(0x442))+'\x20\x20'+_0x3b9b0c(_0x287342[_0x4aff67(0x2fc)],_0x4aff67(0x3ed))+_0x4aff67(0x3cf)+_0x3b9b0c(_0x287342[_0x4aff67(0x349)],_0x4aff67(0x366))+_0x4aff67(0x1de)+_0x3b9b0c(_0x287342[_0x4aff67(0x349)],_0x4aff67(0x366))+'\x20'+_0x3b9b0c(_0x287342[_0x4aff67(0x441)],'<json-body>')+_0x4aff67(0x200)+_0x3b9b0c(_0x287342[_0x4aff67(0x349)],'VERB')+'\x20'+_0x3b9b0c(_0x287342[_0x4aff67(0x349)],_0x4aff67(0x366))+'\x20'+_0x3b9b0c(_0x287342[_0x4aff67(0x441)],_0x4aff67(0x533))+_0x4aff67(0x229)+_0x3b9b0c(_0x287342[_0x4aff67(0x2fc)],_0x4aff67(0x256))+'\x0a\x20\x20\x20\x20'+_0x3b9b0c(_0x287342[_0x4aff67(0x39d)],_0x4aff67(0x4ac))+_0x4aff67(0x3c1)+_0x3b9b0c(_0x287342['gray'],'envs')+_0x4aff67(0x32a)+_0x3b9b0c(_0x287342[_0x4aff67(0x39d)],'types')+_0x4aff67(0x27d)+_0x58c22a[_0x4aff67(0x10e)]+_0x4aff67(0x3b2)+_0x3b9b0c(_0x287342[_0x4aff67(0x39d)],_0x4aff67(0x311))+'\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/'+_0x58c22a[_0x4aff67(0x10e)]+'/type/users\x0a\x20\x20\x20\x20'+_0x3b9b0c(_0x287342[_0x4aff67(0x39d)],_0x4aff67(0x33f))+_0x4aff67(0x1e2)+_0x58c22a[_0x4aff67(0x10e)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x3b9b0c(_0x287342['gray'],_0x4aff67(0x5d4))+_0x4aff67(0x57b)+_0x58c22a[_0x4aff67(0x10e)]+_0x4aff67(0x1b0)+_0x3b9b0c(_0x287342[_0x4aff67(0x39d)],_0x4aff67(0x194))+_0x4aff67(0x476)+_0x3b9b0c(_0x287342['gray'],_0x4aff67(0x281))+_0x4aff67(0x476)+_0x3b9b0c(_0x287342['gray'],'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'+_0x3b9b0c(_0x287342['bold'],_0x4aff67(0x2de))+'\x20\x20'+_0x3b9b0c(_0x287342[_0x4aff67(0x2fc)],_0x4aff67(0x453))+_0x4aff67(0x3cf)+_0x3b9b0c(_0x287342['cyan'],_0x4aff67(0x241))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20'+_0x3b9b0c(_0x287342[_0x4aff67(0x349)],_0x4aff67(0x2c9))+_0x4aff67(0x353)+_0x3b9b0c(_0x287342[_0x4aff67(0x2fc)],_0x4aff67(0x256))+_0x4aff67(0x476)+_0x3b9b0c(_0x287342[_0x4aff67(0x39d)],_0x4aff67(0x42b))+_0x4aff67(0x476)+_0x3b9b0c(_0x287342[_0x4aff67(0x39d)],'type/users/item/alice\x20--env\x20staging')+_0x4aff67(0x476)+_0x3b9b0c(_0x287342['gray'],_0x4aff67(0x485))+'\x0a\x0a'+_0x3b9b0c(_0x287342['bold'],_0x4aff67(0x432))+'\x0a\x0a\x20\x20'+_0x3b9b0c(_0x287342[_0x4aff67(0x349)],_0x4aff67(0x243))+_0x4aff67(0x2c6)+_0x3b9b0c(_0x287342[_0x4aff67(0x349)],_0x4aff67(0x10e))+_0x4aff67(0x26a)+_0x3b9b0c(_0x287342[_0x4aff67(0x349)],_0x4aff67(0x53b))+'\x20'+_0x3b9b0c(_0x287342[_0x4aff67(0x2fc)],_0x4aff67(0x258))+_0x4aff67(0x346)+_0x3b9b0c(_0x287342[_0x4aff67(0x349)],_0x4aff67(0x3f5))+'\x20'+_0x3b9b0c(_0x287342[_0x4aff67(0x2fc)],_0x4aff67(0x1d4))+_0x4aff67(0x2dc)+_0x3b9b0c(_0x287342[_0x4aff67(0x349)],_0x4aff67(0x4ae))+_0x4aff67(0x1e0)+_0x3b9b0c(_0x287342[_0x4aff67(0x349)],_0x4aff67(0x54a))+_0x4aff67(0x456)+_0x3b9b0c(_0x287342[_0x4aff67(0x349)],_0x4aff67(0x208))+'\x20'+_0x3b9b0c(_0x287342['dim'],'/\x20quit\x20/\x20Ctrl+C')+_0x4aff67(0x507));}let _0x3f3c5b=![];async function _0x364ec2(_0x451e02,_0x5de277=0x0,_0x12b5ee=null){const _0x17f052=_0x54268c;_0x3f3c5b&&(process[_0x17f052(0x48a)]['write'](_0x3b9b0c(_0x287342[_0x17f052(0x45d)],_0x17f052(0x4b8))),process[_0x17f052(0x208)](0x82));_0x3f3c5b=!![],process[_0x17f052(0x2df)][_0x17f052(0x1c6)]('\x0a'),process['stderr'][_0x17f052(0x1c6)](_0x3b9b0c(_0x287342[_0x17f052(0x441)],'\x20\x20[okdb]\x20'+(_0x12b5ee?_0x17f052(0x4a6)+_0x12b5ee+',\x20':'')+_0x17f052(0x301)));const _0x38fd83=setTimeout(()=>{const _0x1a56e1=_0x17f052;process[_0x1a56e1(0x48a)]['write'](_0x3b9b0c(_0x287342['red'],'\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a')),process[_0x1a56e1(0x208)](0x1);},0x1388);try{await _0x451e02['close']();}catch(_0x16b2e8){console['error'](_0x3b9b0c(_0x287342[_0x17f052(0x45d)],'\x20\x20'+_0x16b2e8[_0x17f052(0x51e)]));}clearTimeout(_0x38fd83),process[_0x17f052(0x48a)][_0x17f052(0x1c6)](_0x3b9b0c(_0x287342[_0x17f052(0x2fc)],_0x17f052(0x52c))),process[_0x17f052(0x208)](_0x5de277);}function _0x3b507c(_0x268c26){const _0xfda162=_0x54268c,_0x410b87=_0x268c26['env']!==_0xfda162(0x426)?_0x3b9b0c(_0x287342[_0xfda162(0x441)],'['+_0x268c26[_0xfda162(0x10e)]+']'):'';return _0x3b9b0c(_0x287342[_0xfda162(0x202)]+_0x287342[_0xfda162(0x349)],_0xfda162(0x24e))+_0x410b87+_0x3b9b0c(_0x287342[_0xfda162(0x39d)],'>\x20');}const _0x512d4a=new Set([_0x54268c(0x55a),_0x54268c(0x585),_0x54268c(0x1f5),'PATCH',_0x54268c(0x25d)]);async function _0xd47c93(_0x577a4a,_0x4b8074,_0x32b776,_0x596a96,_0x4289bc,_0x34d552){const _0x29f932=_0x54268c;_0x577a4a=_0x577a4a[_0x29f932(0x551)]();if(!_0x577a4a||_0x577a4a[_0x29f932(0x5a1)]('#'))return;const _0x3d0d1e=_0x5ba264(_0x577a4a),{flags:_0x2046f1,rest:_0x14853a}=_0x5caf46(_0x3d0d1e);if(!_0x14853a['length'])return;const _0x5a5c1a=_0x14853a[0x0],_0x1b5da5=_0x5a5c1a[_0x29f932(0x511)]();if(_0x1b5da5===_0x29f932(0x44d)){if(_0x14853a[0x1])_0xc78eac(_0x4b8074,_0x1a8635(_0x14853a[0x1],_0x2046f1['env']??_0x4289bc['env']));else _0x2fb762(_0x4289bc);return;}if(_0x1b5da5===_0x29f932(0x2a2)){const _0x17b474=_0x14853a[0x1];if(!_0x17b474){console[_0x29f932(0x481)](_0x3b9b0c(_0x287342[_0x29f932(0x45d)],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x4b8074[_0x29f932(0x10e)](_0x17b474),_0x4289bc['env']=_0x17b474,_0x34d552?.[_0x29f932(0x237)](_0x3b507c(_0x4289bc)),console[_0x29f932(0x481)]('\x0a\x20\x20'+_0x3b9b0c(_0x287342['green'],'✓')+'\x20active\x20env:\x20'+_0x3b9b0c(_0x287342[_0x29f932(0x202)]+_0x287342[_0x29f932(0x349)],_0x17b474)+'\x0a');}catch{console[_0x29f932(0x481)](_0x29f932(0x293)+_0x3b9b0c(_0x287342[_0x29f932(0x45d)],'✗')+'\x20environment\x20'+_0x3b9b0c(_0x287342[_0x29f932(0x202)],_0x17b474)+'\x20not\x20found'+_0x3b9b0c(_0x287342[_0x29f932(0x2fc)],_0x29f932(0x36a)));}return;}if(_0x1b5da5===_0x29f932(0x269)){const _0x2cf53e=[..._0x4b8074[_0x29f932(0x18e)][_0x29f932(0x157)]()][_0x29f932(0x59d)](_0x5f2d34=>!_0x5f2d34[_0x29f932(0x5a1)]('~'));console[_0x29f932(0x481)]('');for(const _0x1dc750 of _0x2cf53e){const _0x1c7884=_0x1dc750===_0x4289bc['env'];console['log']('\x20\x20'+(_0x1c7884?_0x3b9b0c(_0x287342[_0x29f932(0x5ae)],'●'):_0x3b9b0c(_0x287342['dim'],'○'))+'\x20\x20'+(_0x1c7884?_0x3b9b0c(_0x287342['bold']+_0x287342[_0x29f932(0x349)],_0x1dc750):_0x3b9b0c(_0x287342[_0x29f932(0x2fc)],_0x1dc750)));}console[_0x29f932(0x481)]('\x0a\x20\x20'+_0x3b9b0c(_0x287342[_0x29f932(0x2fc)],_0x29f932(0x209))+'\x20'+_0x3b9b0c(_0x287342[_0x29f932(0x349)],_0x4289bc['env'])),console[_0x29f932(0x481)]('');return;}if(_0x1b5da5===_0x29f932(0x22f)){const _0x4a1873=[..._0x4b8074[_0x29f932(0x18e)][_0x29f932(0x4c0)]()]['filter'](_0x299b01=>!_0x299b01['name']['startsWith']('~'));console[_0x29f932(0x481)]('');const _0xb0865f=Math[_0x29f932(0x264)](..._0x4a1873[_0x29f932(0x56a)](_0x4afe4f=>_0x4afe4f[_0x29f932(0x24f)][_0x29f932(0x532)]));for(const _0x1309ae of _0x4a1873){const _0x55a921=_0x1309ae[_0x29f932(0x24f)]===_0x4289bc[_0x29f932(0x10e)],_0xf39b9e=_0x55a921?_0x3b9b0c(_0x287342[_0x29f932(0x5ae)],'●'):_0x3b9b0c(_0x287342[_0x29f932(0x2fc)],'○'),_0x32ed2b=_0x55a921?_0x3b9b0c(_0x287342['bold']+_0x287342['cyan'],_0x1309ae[_0x29f932(0x24f)][_0x29f932(0x302)](_0xb0865f)):_0x3b9b0c(_0x287342[_0x29f932(0x2fc)],_0x1309ae[_0x29f932(0x24f)][_0x29f932(0x302)](_0xb0865f)),_0x3c9de2=[..._0x1309ae[_0x29f932(0x2e3)]['keys']()][_0x29f932(0x59d)](_0x32c42a=>!_0x32c42a[_0x29f932(0x5a1)]('~')),_0x14a0cd=_0x3c9de2['length']?_0x3b9b0c(_0x287342[_0x29f932(0x2fc)],_0x3c9de2[_0x29f932(0x3bc)](0x0,0x5)[_0x29f932(0x315)](',\x20')+(_0x3c9de2[_0x29f932(0x532)]>0x5?'\x20\x20+'+(_0x3c9de2[_0x29f932(0x532)]-0x5)+'\x20more':'')):_0x3b9b0c(_0x287342[_0x29f932(0x2fc)],_0x29f932(0x557));console[_0x29f932(0x481)]('\x20\x20'+_0xf39b9e+'\x20\x20'+_0x32ed2b+'\x20\x20'+_0x14a0cd);}console[_0x29f932(0x481)]('');return;}if(_0x1b5da5===_0x29f932(0x2e0)){const _0x48be58=_0x2046f1[_0x29f932(0x10e)]??_0x14853a[0x1]??_0x4289bc['env'];try{const _0x3d2ef3=_0x4b8074[_0x29f932(0x10e)](_0x48be58),_0x4a7837=[..._0x3d2ef3['typeSubDbs'][_0x29f932(0x157)]()][_0x29f932(0x59d)](_0x458e82=>!_0x458e82['startsWith']('~'))[_0x29f932(0x56b)]();console[_0x29f932(0x481)](_0x29f932(0x293)+_0x3b9b0c(_0x287342[_0x29f932(0x2fc)],_0x4a7837['length']+'\x20type'+(_0x4a7837['length']!==0x1?'s':'')+'\x20in\x20'+_0x48be58));for(const _0x584ae4 of _0x4a7837){const _0x5daf8d=_0x3d2ef3[_0x29f932(0x2e3)][_0x29f932(0x1d0)](_0x584ae4),_0x292981=_0x5daf8d?.[_0x29f932(0x3ff)]?.[_0x29f932(0xff)]?.()??0x0,_0x4b48c6=_0x3b9b0c(_0x287342[_0x29f932(0x202)]+_0x287342['cyan'],_0x584ae4[_0x29f932(0x302)](0x1c));console[_0x29f932(0x481)](_0x29f932(0x334)+_0x4b48c6+'\x20\x20'+_0x3b9b0c(_0x287342['magenta'],String(_0x292981)[_0x29f932(0x3c4)](0x6))+'\x20'+_0x3b9b0c(_0x287342[_0x29f932(0x2fc)],_0x29f932(0x10d)));}console[_0x29f932(0x481)]('');}catch(_0x39664a){console['error'](_0x3b9b0c(_0x287342['red'],'\x0a\x20\x20'+_0x39664a[_0x29f932(0x51e)]+'\x0a'));}return;}if(_0x1b5da5===_0x29f932(0x314)){_0x5ab97a(_0x4b8074,_0x14853a[_0x29f932(0x3bc)](0x1)[_0x29f932(0x315)]('\x20'));return;}if(_0x1b5da5===_0x29f932(0x539)){const _0x44fcbf=(_0x14853a[0x1]??'')[_0x29f932(0x2f5)]();if(!_0x44fcbf||_0x44fcbf==='on')_0x596a96[_0x29f932(0x112)]=!![],_0x596a96[_0x29f932(0x169)]='info',console[_0x29f932(0x481)](_0x29f932(0x293)+_0x3b9b0c(_0x287342[_0x29f932(0x5ae)],'✓')+_0x29f932(0x2a4)+_0x3b9b0c(_0x287342['dim'],'level:\x20info')+'\x0a');else{if(_0x44fcbf==='off')_0x596a96[_0x29f932(0x112)]=![],console['log'](_0x29f932(0x293)+_0x3b9b0c(_0x287342[_0x29f932(0x441)],'○')+_0x29f932(0x2a9));else _0x5b428d[_0x44fcbf]!==undefined?(_0x596a96[_0x29f932(0x112)]=!![],_0x596a96[_0x29f932(0x169)]=_0x44fcbf,console['log'](_0x29f932(0x293)+_0x3b9b0c(_0x287342[_0x29f932(0x5ae)],'✓')+_0x29f932(0x553)+_0x3b9b0c(_0x287342[_0x29f932(0x202)],_0x44fcbf)+'\x0a')):console[_0x29f932(0x40f)](_0x3b9b0c(_0x287342[_0x29f932(0x45d)],_0x29f932(0x5b2)));}return;}if(_0x1b5da5===_0x29f932(0x199)||_0x1b5da5==='QUIT'){await _0x364ec2(_0x4b8074,0x0);return;}if(_0x1b5da5===_0x29f932(0x2f0)){const _0x4d4375=_0x29f932(0x39a)+_0x32b776[_0x29f932(0x4cb)]+_0x29f932(0x126),_0x51fc5b=process['platform']===_0x29f932(0xf4)?'start\x20'+_0x4d4375:process[_0x29f932(0x420)]==='darwin'?_0x29f932(0x493)+_0x4d4375:_0x29f932(0x57e)+_0x4d4375;require$$4[_0x29f932(0x4d5)](_0x51fc5b),console[_0x29f932(0x481)](_0x29f932(0x293)+_0x3b9b0c(_0x287342[_0x29f932(0x5ae)],'✓')+_0x29f932(0x4f0)+_0x3b9b0c(_0x287342[_0x29f932(0x349)],_0x4d4375)+'\x0a');return;}let _0x7435c6,_0x2dddb9,_0x3f6095;if(_0x512d4a[_0x29f932(0x5b3)](_0x1b5da5)){_0x7435c6=_0x1b5da5,_0x2dddb9=_0x14853a[0x1],_0x3f6095=_0x14853a['slice'](0x2);if(!_0x2dddb9){console[_0x29f932(0x40f)](_0x3b9b0c(_0x287342[_0x29f932(0x45d)],_0x29f932(0x135)+_0x5a5c1a+_0x29f932(0x55d)));return;}}else _0x7435c6=null,_0x2dddb9=_0x14853a[0x0],_0x3f6095=_0x14853a[_0x29f932(0x3bc)](0x1);const _0x141ddb=_0x2046f1[_0x29f932(0x10e)]??_0x4289bc[_0x29f932(0x10e)],_0x354a2c=_0x1a8635(_0x2dddb9,_0x141ddb);if(_0x2046f1[_0x29f932(0x54a)]){_0xc78eac(_0x4b8074,_0x354a2c);return;}let _0x593e55=null;if(_0x3f6095[_0x29f932(0x532)]){const _0xfaca69=_0x3f6095[_0x29f932(0x315)]('\x20');try{_0x593e55=_0x459dd2(_0xfaca69);}catch(_0x3a2179){console[_0x29f932(0x40f)](_0x3b9b0c(_0x287342[_0x29f932(0x45d)],_0x29f932(0x189)+_0xfaca69+_0x29f932(0x293)+_0x3b9b0c(_0x287342[_0x29f932(0x2fc)],_0x3a2179[_0x29f932(0x51e)])+'\x0a'));return;}}if(!_0x7435c6)_0x7435c6=_0x593e55!==null?_0x29f932(0x585):_0x29f932(0x55a);try{const _0x551012=await _0x14ce0c(_0x4b8074,_0x7435c6,_0x354a2c,_0x593e55);_0x3cc423(_0x551012['status'],_0x551012[_0x29f932(0x317)]);}catch(_0x178a2b){console['error']('\x0a\x20\x20'+_0x3b9b0c(_0x287342['red'],'✗')+'\x20'+_0x178a2b[_0x29f932(0x51e)]+'\x0a');}}class _0x573832{constructor(){const _0x382d10=_0x54268c;this[_0x382d10(0x2f3)]=new Map(),this[_0x382d10(0x49e)]=null,this[_0x382d10(0x502)]=![];}}function _0x50c598(_0x3a09eb){const _0x2dd65c=_0x54268c,_0x3621ac=new _0x573832();for(const _0x3dc41a of _0x3a09eb){if(_0x3dc41a['meta']?.[_0x2dd65c(0x528)])continue;const _0x2e34ef=_0x3dc41a[_0x2dd65c(0x289)][_0x2dd65c(0x19c)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x2e34ef)continue;let _0x50d88f=_0x3621ac;for(const _0x1a747f of _0x2e34ef[_0x2dd65c(0x280)]('/')['filter'](Boolean)){if(_0x1a747f['startsWith'](':')){const _0x4b037d=_0x1a747f['slice'](0x1);if(!_0x50d88f[_0x2dd65c(0x49e)])_0x50d88f['dynamic']={'param':_0x4b037d,'node':new _0x573832()};_0x50d88f=_0x50d88f[_0x2dd65c(0x49e)][_0x2dd65c(0x106)];}else{if(!_0x50d88f['children'][_0x2dd65c(0x5b3)](_0x1a747f))_0x50d88f[_0x2dd65c(0x2f3)][_0x2dd65c(0x578)](_0x1a747f,new _0x573832());_0x50d88f=_0x50d88f['children']['get'](_0x1a747f);}}_0x50d88f[_0x2dd65c(0x502)]=!![];}return _0x3621ac;}const _0x1e431b=new Map();function _0x5a1e47(_0x505b89,_0x201bd9,_0x236e02){const _0x3509f7=_0x54268c,_0x5b9e6b=_0x1e431b[_0x3509f7(0x1d0)](_0x505b89);if(_0x5b9e6b&&_0x5b9e6b['exp']>Date[_0x3509f7(0x4e7)]())return _0x5b9e6b[_0x3509f7(0x5af)];const _0x270b63=_0x236e02();return _0x1e431b[_0x3509f7(0x578)](_0x505b89,{'val':_0x270b63,'exp':Date[_0x3509f7(0x4e7)]()+_0x201bd9}),_0x270b63;}function _0x56c875(_0x2e1740,_0x5a6278,_0x255f8f,_0xa9da7c){const _0x5b4a9f=_0x54268c,_0x1d13e4=_0x5a6278[_0x5b4a9f(0x10e)]??_0xa9da7c[_0x5b4a9f(0x10e)];switch(_0x2e1740){case _0x5b4a9f(0x10e):return[..._0x255f8f[_0x5b4a9f(0x18e)]['keys']()]['filter'](_0x2a4de1=>!_0x2a4de1[_0x5b4a9f(0x5a1)]('~'));case _0x5b4a9f(0x446):return _0x5a1e47(_0x5b4a9f(0x5ab)+_0x1d13e4,0x7d0,()=>{const _0x66b019=_0x5b4a9f;try{return[..._0x255f8f[_0x66b019(0x10e)](_0x1d13e4)[_0x66b019(0x2e3)][_0x66b019(0x157)]()][_0x66b019(0x59d)](_0x57b899=>!_0x57b899['startsWith']('~'));}catch{return[];}});case _0x5b4a9f(0x57a):if(!_0x5a6278['type'])return[];return _0x5a1e47('keys:'+_0x1d13e4+':'+_0x5a6278['type'],0x5dc,()=>{const _0x2cac90=_0x5b4a9f;try{const _0x13c37d=_0x255f8f[_0x2cac90(0x10e)](_0x1d13e4)[_0x2cac90(0x2e3)]['get'](_0x5a6278[_0x2cac90(0x446)]);if(!_0x13c37d?.[_0x2cac90(0x3ff)])return[];const _0x554661=[];for(const {key:_0x2b1c85}of _0x13c37d[_0x2cac90(0x3ff)]['getRange']({'limit':0x32})){_0x554661[_0x2cac90(0x402)](String(_0x2b1c85));if(_0x554661[_0x2cac90(0x532)]>=0x32)break;}return _0x554661;}catch{return[];}});case _0x5b4a9f(0x5a7):if(!_0x5a6278[_0x5b4a9f(0x446)])return[];return _0x5a1e47(_0x5b4a9f(0x576)+_0x1d13e4+':'+_0x5a6278['type'],0x7d0,()=>{const _0x57f3aa=_0x5b4a9f;try{const _0x46f107=_0x255f8f['env'](_0x1d13e4)['typeSubDbs']['get'](_0x5a6278[_0x57f3aa(0x446)]);return _0x46f107?[..._0x46f107[_0x57f3aa(0x38b)]?.[_0x57f3aa(0x157)]()??[]]:[];}catch{return[];}});case _0x5b4a9f(0x162):if(!_0x5a6278[_0x5b4a9f(0x446)])return[];return _0x5a1e47('fts:'+_0x1d13e4+':'+_0x5a6278[_0x5b4a9f(0x446)],0x7d0,()=>{const _0x362ea9=_0x5b4a9f;try{return _0x255f8f[_0x362ea9(0x230)]?.[_0x362ea9(0x521)]?.(_0x5a6278[_0x362ea9(0x446)],_0x255f8f[_0x362ea9(0x10e)](_0x1d13e4))?.['map'](_0x571015=>_0x571015[_0x362ea9(0x24f)])??[];}catch{return[];}});default:return[];}}function _0x1f5cd4(_0x34bfe0,_0x2daff4,_0x2513b0,_0x51dc3b){const _0x472213=_0x54268c,_0x5165a6=_0x34bfe0[_0x472213(0x277)]('/'),_0x41cd6f=_0x34bfe0[_0x472213(0x280)]('/'),_0x4d822e=_0x5165a6?_0x41cd6f['slice'](0x0,-0x1):_0x41cd6f[_0x472213(0x3bc)](0x0,-0x1),_0x32829b=_0x5165a6?'':_0x41cd6f[_0x41cd6f[_0x472213(0x532)]-0x1];let _0x4154a5=_0x2daff4;const _0x18ca84={};for(const _0x34f038 of _0x4d822e){if(!_0x34f038)continue;if(_0x4154a5['children'][_0x472213(0x5b3)](_0x34f038))_0x4154a5=_0x4154a5[_0x472213(0x2f3)][_0x472213(0x1d0)](_0x34f038);else{if(_0x4154a5[_0x472213(0x49e)])_0x18ca84[_0x4154a5[_0x472213(0x49e)][_0x472213(0x312)]]=_0x34f038,_0x4154a5=_0x4154a5[_0x472213(0x49e)]['node'];else return[];}}const _0x2beec1=_0x4d822e[_0x472213(0x59d)](Boolean),_0x52388b=_0x2beec1[_0x472213(0x532)]?_0x2beec1[_0x472213(0x315)]('/')+'/':'',_0x2f7483=[];for(const [_0x434a15]of _0x4154a5[_0x472213(0x2f3)]){if(_0x434a15[_0x472213(0x5a1)](_0x32829b))_0x2f7483[_0x472213(0x402)](_0x52388b+_0x434a15);}if(_0x4154a5['dynamic'])for(const _0x40947d of _0x56c875(_0x4154a5['dynamic']['param'],_0x18ca84,_0x2513b0,_0x51dc3b)){if(String(_0x40947d)['startsWith'](_0x32829b))_0x2f7483[_0x472213(0x402)](_0x52388b+_0x40947d);}return _0x2f7483[_0x472213(0x3bc)](0x0,0x64);}const _0x4b0e79=[_0x54268c(0x54a),_0x54268c(0x567),'env','envs',_0x54268c(0x1ae),_0x54268c(0x53b),_0x54268c(0x3f5),'open',_0x54268c(0x208),_0x54268c(0x133)];function _0x11ee45(_0x45dca3,_0x5c9325,_0x2efd63){return function _0x1ee01a(_0x1381e9){const _0x4096d5=_0x196a;try{const _0x5d0c9f=_0x1381e9[_0x4096d5(0x34c)](/\s[{[]/),_0x54f8e6=_0x5d0c9f>=0x0?_0x1381e9['slice'](0x0,_0x5d0c9f):_0x1381e9,_0x4eead1=_0x54f8e6[_0x4096d5(0x399)]();if(!_0x4eead1){const _0x2c6278=[..._0x4b0e79,...[..._0x45dca3[_0x4096d5(0x2f3)]['keys']()]][_0x4096d5(0x3bc)](0x0,0x64);return[_0x2c6278,''];}const _0x5f2db5=_0x4eead1['split'](/\s+/),_0x297fef=_0x5f2db5[0x0],_0x1c9bb0=_0x297fef[_0x4096d5(0x511)]();if(_0x5f2db5['length']===0x1){const _0x2c7e62=_0x297fef[_0x4096d5(0x2f5)](),_0x19a1b3=_0x4b0e79[_0x4096d5(0x59d)](_0x25ab9c=>_0x25ab9c[_0x4096d5(0x5a1)](_0x2c7e62)),_0x25d6bc=_0x1f5cd4(_0x297fef,_0x45dca3,_0x5c9325,_0x2efd63),_0x30f35a=[...new Set([..._0x19a1b3,..._0x25d6bc])][_0x4096d5(0x3bc)](0x0,0x64);return[_0x30f35a,_0x297fef];}if(_0x512d4a[_0x4096d5(0x5b3)](_0x1c9bb0)&&_0x5f2db5[_0x4096d5(0x532)]===0x2){const _0x3182f6=_0x5f2db5[0x1],_0x2fcc9f=_0x1f5cd4(_0x3182f6,_0x45dca3,_0x5c9325,_0x2efd63);return[_0x2fcc9f[_0x4096d5(0x56a)](_0x5d49f4=>_0x297fef+'\x20'+_0x5d49f4),_0x297fef+'\x20'+_0x3182f6];}if(!_0x512d4a['has'](_0x1c9bb0)&&_0x5f2db5['length']>0x1){const _0x5b1278=_0x1f5cd4(_0x297fef,_0x45dca3,_0x5c9325,_0x2efd63),_0x3cd039='\x20'+_0x5f2db5[_0x4096d5(0x3bc)](0x1)[_0x4096d5(0x315)]('\x20');return[_0x5b1278['map'](_0x91771f=>_0x91771f+_0x3cd039),_0x297fef+_0x3cd039];}return[[],_0x1381e9];}catch{return[[],_0x1381e9];}};}async function _0x14fe21(_0x508766,_0x3aeccc){const _0x4a4269=_0x54268c,_0xdb0aeb={'enabled':!![],'level':_0x3aeccc[_0x4a4269(0x28b)]??'info'},_0x426e5c={'env':_0x4a4269(0x426)},_0x2b8788={'current':null},_0x2edd77=_0x50c598(_0x508766[_0x4a4269(0x37d)][_0x4a4269(0x40e)]()),_0x3711c0=_0x11ee45(_0x2edd77,_0x508766,_0x426e5c);_0x508766['log']['attach'](_0x4fb61f=>{const _0x397279=_0x4a4269;if(!_0xdb0aeb[_0x397279(0x112)])return;_0x3affc8(_0x4fb61f,_0xdb0aeb[_0x397279(0x169)]),_0x2b8788[_0x397279(0x266)]?.['prompt'](!![]);}),_0x4ae4a4(_0x508766,_0x3aeccc);const _0x4c48d1=_0x41864b[_0x4a4269(0x427)]({'input':process[_0x4a4269(0x121)],'output':process['stdout'],'terminal':!![],'completer':_0x3711c0,'prompt':_0x3b507c(_0x426e5c),'historySize':_0x5b5681});try{const _0xa5e745=_0x46ffee[_0x4a4269(0x490)](_0x4447d2,'utf8')[_0x4a4269(0x280)]('\x0a')[_0x4a4269(0x59d)](Boolean);_0x4c48d1['history']=_0xa5e745[_0x4a4269(0x411)]()[_0x4a4269(0x3bc)](0x0,_0x5b5681);}catch{}_0x2b8788['current']=_0x4c48d1,_0x4c48d1['on']('line',async _0x24fdff=>{const _0x84415a=_0x4a4269;_0x4c48d1[_0x84415a(0x123)]();try{await _0xd47c93(_0x24fdff,_0x508766,_0x3aeccc,_0xdb0aeb,_0x426e5c,_0x4c48d1);}catch(_0x532229){console[_0x84415a(0x40f)](_0x3b9b0c(_0x287342['red'],_0x84415a(0x588)+_0x532229[_0x84415a(0x51e)]));}finally{_0x4c48d1['resume'](),_0x4c48d1[_0x84415a(0x37f)]();}}),_0x4c48d1['on'](_0x4a4269(0x19f),()=>{const _0x3095b4=_0x4a4269;try{const _0x29ad0e=[..._0x4c48d1[_0x3095b4(0x306)]][_0x3095b4(0x411)]()[_0x3095b4(0x59d)](Boolean)[_0x3095b4(0x3bc)](0x0,_0x5b5681);_0x46ffee['writeFileSync'](_0x4447d2,_0x29ad0e[_0x3095b4(0x315)]('\x0a')+'\x0a');}catch{}_0x364ec2(_0x508766,0x0);});let _0x3d2ce3=0x0;return process['on'](_0x4a4269(0x3b0),()=>{const _0x1f2bb4=_0x4a4269;if(_0x3f3c5b)return _0x364ec2(_0x508766,0x82,'SIGINT');if(_0x4c48d1[_0x1f2bb4(0x2e9)]==='')return _0x364ec2(_0x508766,0x0,_0x1f2bb4(0x3b0));const _0x58ddbc=Date['now']();if(_0x58ddbc-_0x3d2ce3<0x5dc)return _0x364ec2(_0x508766,0x0,_0x1f2bb4(0x127));_0x3d2ce3=_0x58ddbc,process['stdout']['write']('\x0a'),_0x4c48d1[_0x1f2bb4(0x3d0)](0x0),_0x4c48d1[_0x1f2bb4(0x37f)](),process[_0x1f2bb4(0x48a)][_0x1f2bb4(0x1c6)](_0x3b9b0c(_0x287342[_0x1f2bb4(0x2fc)],_0x1f2bb4(0x591)));}),process['on'](_0x4a4269(0x2ab),()=>_0x364ec2(_0x508766,0x0,'SIGTERM')),process['on'](_0x4a4269(0x3d5),()=>_0x364ec2(_0x508766,0x0,'SIGBREAK')),_0x4c48d1[_0x4a4269(0x37f)](),_0x4c48d1;}return okdbShell={'start':_0x14fe21,'colorLog':_0x3affc8,'lenientParse':_0x459dd2,'_splitLine':_0x5ba264,'_formatRouteHelpLines':_0x5d5c8c,'_routeSummary':_0x2b0500,'_routeTags':_0x1db1bb},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x1d040a=_0x1cf947;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x5d4f69,performance:_0x3f395f}=require$$0$4,_0x272af6=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x1d040a(0x212),_0x27b976=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x3fbe57=process.env.OKDB_LOOP_LAG_ALL==='1',_0x38ea6d=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0xcebc01{constructor(){const _0x3d4bc2=_0x1d040a;this[_0x3d4bc2(0x112)]=_0x272af6,this[_0x3d4bc2(0x406)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x3d4bc2(0x52a)]=![],this[_0x3d4bc2(0x262)]=(_0x2c0b67,_0x482e08)=>process[_0x3d4bc2(0x48a)]['write'](_0x2c0b67+(_0x482e08?'\x20'+JSON[_0x3d4bc2(0x18b)](_0x482e08):'')+'\x0a');}['now'](){const _0x3c2ad4=_0x1d040a;return _0x3f395f[_0x3c2ad4(0x4e7)]();}[_0x1d040a(0x542)](_0x2aa093){const _0x171855=_0x1d040a;if(typeof _0x2aa093===_0x171855(0x28d))this[_0x171855(0x262)]=_0x2aa093;}[_0x1d040a(0x114)](_0x15802b,_0x55f78b,_0x4e349a){const _0x53048b=_0x1d040a;if(!this[_0x53048b(0x112)])return;let _0x44d470=this[_0x53048b(0x406)][_0x53048b(0x1d0)](_0x15802b);!_0x44d470&&(_0x44d470={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x53048b(0x406)][_0x53048b(0x578)](_0x15802b,_0x44d470)),_0x44d470['ms']+=_0x55f78b,_0x44d470['count']+=0x1,_0x55f78b>_0x44d470[_0x53048b(0x4b3)]&&(_0x44d470[_0x53048b(0x4b3)]=_0x55f78b,_0x44d470[_0x53048b(0x552)]=_0x4e349a||'');}[_0x1d040a(0x34a)](_0x33b08d){const _0x367e87=_0x1d040a;if(!this[_0x367e87(0x112)]||this[_0x367e87(0x52a)])return;this[_0x367e87(0x52a)]=!![];if(_0x33b08d)this[_0x367e87(0x262)]=_0x33b08d;this['_h']=_0x5d4f69({'resolution':0xa}),this['_h'][_0x367e87(0x305)](),this[_0x367e87(0x134)]=setInterval(()=>this[_0x367e87(0x29f)](),_0x27b976);if(this[_0x367e87(0x134)][_0x367e87(0x175)])this[_0x367e87(0x134)][_0x367e87(0x175)]();}[_0x1d040a(0x325)](_0x4d612a){const _0x23b9f8=_0x1d040a;if(!this[_0x23b9f8(0x282)])this['_windowCbs']=new Set();this[_0x23b9f8(0x282)][_0x23b9f8(0x136)](_0x4d612a);if(!this[_0x23b9f8(0x52a)])this['_startAdmission']();}[_0x1d040a(0x524)](_0x4ccf15){const _0x2d4213=_0x1d040a;this[_0x2d4213(0x282)]?.['delete'](_0x4ccf15);}['_startAdmission'](){const _0x1eac49=_0x1d040a;if(this[_0x1eac49(0x30d)])return;this[_0x1eac49(0x30d)]=!![];!this['_h']&&(this['_h']=_0x5d4f69({'resolution':0xa}),this['_h'][_0x1eac49(0x305)]());const _0x3f8c0d=_0x27b976;this[_0x1eac49(0x236)]=setInterval(()=>{const _0xd84dca=_0x1eac49,_0x377838=this['_h'];if(!_0x377838)return;const _0x57276b=_0x377838[_0xd84dca(0x231)](0x63)/0xf4240,_0x5c991f=_0x377838[_0xd84dca(0x264)]/0xf4240,_0x64eec7=_0x377838['mean']/0xf4240;_0x377838[_0xd84dca(0x234)]();if(this[_0xd84dca(0x282)])for(const _0x1cd3b6 of this[_0xd84dca(0x282)]){try{_0x1cd3b6({'p99Ms':_0x57276b,'maxMs':_0x5c991f,'meanMs':_0x64eec7,'reportMs':_0x3f8c0d});}catch{}}},_0x3f8c0d);if(this[_0x1eac49(0x236)][_0x1eac49(0x175)])this['_admissionTimer'][_0x1eac49(0x175)]();}[_0x1d040a(0x29f)](){const _0x5e35cf=_0x1d040a,_0x20ed2a=this['_h'],_0x491d6f=_0x20ed2a['max']/0xf4240,_0x2a5ac1=_0x20ed2a[_0x5e35cf(0x231)](0x63)/0xf4240,_0x1209e6=_0x20ed2a[_0x5e35cf(0x556)]/0xf4240;_0x20ed2a[_0x5e35cf(0x234)]();const _0xbb573b=[...this[_0x5e35cf(0x406)][_0x5e35cf(0x530)]()][_0x5e35cf(0x56a)](([_0x119021,_0x5e2600])=>({'label':_0x119021,..._0x5e2600}))['sort']((_0x5a2474,_0x2d3b59)=>_0x2d3b59['ms']-_0x5a2474['ms'])[_0x5e35cf(0x3bc)](0x0,0x8);this[_0x5e35cf(0x406)][_0x5e35cf(0x1a1)]();const _0x5cda9f=_0xbb573b['reduce']((_0x4980d3,_0x1bc15f)=>_0x4980d3+_0x1bc15f['ms'],0x0),_0x405475=_0xbb573b[_0x5e35cf(0x56a)](_0x4163ab=>_0x4163ab['label']+'='+_0x4163ab['ms'][_0x5e35cf(0x396)](0x0)+_0x5e35cf(0x360)+_0x4163ab[_0x5e35cf(0x535)]+(_0x4163ab['maxMs']>0x5?_0x5e35cf(0x16c)+_0x4163ab[_0x5e35cf(0x4b3)][_0x5e35cf(0x396)](0x0)+'ms'+(_0x4163ab[_0x5e35cf(0x552)]?'\x20'+_0x4163ab[_0x5e35cf(0x552)]:'')+')':''));(_0x3fbe57||_0x491d6f>=_0x38ea6d)&&this[_0x5e35cf(0x262)](_0x5e35cf(0x1f7)+_0x27b976+'ms\x20max='+_0x491d6f[_0x5e35cf(0x396)](0x0)+'ms\x20p99='+_0x2a5ac1[_0x5e35cf(0x396)](0x0)+_0x5e35cf(0x1f3)+_0x1209e6['toFixed'](0x0)+'ms\x20busy='+_0x5cda9f['toFixed'](0x0)+'ms'+(_0x405475[_0x5e35cf(0x532)]?'\x20│\x20'+_0x405475[_0x5e35cf(0x315)]('\x20\x20'):''),{'feature':_0x5e35cf(0x513)});if(this[_0x5e35cf(0x282)])for(const _0x20a060 of this['_windowCbs']){try{_0x20a060({'p99Ms':_0x2a5ac1,'maxMs':_0x491d6f,'meanMs':_0x1209e6,'reportMs':_0x27b976});}catch{}}}[_0x1d040a(0x1ba)](){const _0x114edc=_0x1d040a;if(this[_0x114edc(0x134)])clearInterval(this[_0x114edc(0x134)]);if(this['_h'])this['_h'][_0x114edc(0x1eb)]();this[_0x114edc(0x134)]=null,this['_h']=null,this['_started']=![];}}const _0x565a72=new _0xcebc01();if(_0x565a72[_0x1d040a(0x112)])_0x565a72[_0x1d040a(0x34a)]();return okdbLoopMonitor={'LOOP':_0x565a72},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x4dc181=require$$1$1,_0x500189=require$$1;let _0x9ade39,_0x3e656b,_0x52b1dd,_0x51f310,_0xe6a860,_0x222a43,_0x50e465,_0x185dda=![];const _0x5e00dd=new Set();let _0x12ad22=null;const _0x39b4e7=new Map();function _0x3442cc(){const _0x7b513c=_0x196a;if(_0x9ade39!==undefined)return _0x9ade39;_0x9ade39=process.env.OKDB_DIAG==='1';if(!_0x9ade39)return![];_0x3e656b=process.env.OKDB_DIAG_STACK==='1',_0x51f310=Math[_0x7b513c(0x264)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x52b1dd=new Array(_0x51f310),_0xe6a860=0x0,_0x222a43=0x0,_0x50e465=process.env.OKDB_DIAG_DIR||null;if(_0x50e465)try{_0x4dc181[_0x7b513c(0x466)](_0x50e465,{'recursive':!![]});}catch{}return!![];}function _0x1a771e(){return _0x9ade39===undefined?_0x3442cc():_0x9ade39;}function _0x341523(_0x15bfeb,_0xe2f830){const _0x339ea6=_0x196a;if(_0x9ade39===undefined?!_0x3442cc():!_0x9ade39)return;let _0x3ae96a;if(_0x3e656b){const _0x52096d=new Error()[_0x339ea6(0x304)]||'';_0x3ae96a=_0x52096d[_0x339ea6(0x280)]('\x0a')[_0x339ea6(0x3bc)](0x3)['map'](_0x43ceb2=>_0x43ceb2['trim']())['filter'](Boolean)['slice'](0x0,0x8);}_0x52b1dd[_0xe6a860]={'seq':_0x222a43++,'t':Date[_0x339ea6(0x4e7)](),'env':_0x15bfeb,'kind':_0xe2f830||'commit','stack':_0x3ae96a},_0xe6a860=(_0xe6a860+0x1)%_0x51f310;}function _0x3c440c(_0x43892f){const _0x2c6bfa=_0x196a,_0x9e4789=[];for(let _0x4bf1c2=0x0;_0x4bf1c2<_0x51f310;_0x4bf1c2++){const _0x1d27c9=_0x52b1dd[(_0xe6a860-0x1-_0x4bf1c2+_0x51f310*0x2)%_0x51f310];if(!_0x1d27c9)continue;_0x9e4789[_0x2c6bfa(0x402)](_0x1d27c9);if(_0x9e4789['length']>=_0x43892f)break;}return _0x9e4789;}function _0x15886f(_0x45568f){const _0x512d18=_0x196a;try{process[_0x512d18(0x48a)][_0x512d18(0x1c6)](_0x45568f+'\x0a');}catch{}if(_0x50e465)try{_0x4dc181[_0x512d18(0x5c5)](_0x500189[_0x512d18(0x315)](_0x50e465,_0x512d18(0x428)+process[_0x512d18(0x5b1)]+_0x512d18(0x3cd)),_0x45568f+'\x0a');}catch{}}function _0x30b5c8(_0x1cc529){const _0x4f0b5d=_0x196a,_0x4d4c42=_0x3c440c(_0x1cc529);if(!_0x4d4c42['length'])return _0x4f0b5d(0x38e);const _0x5e4f7f=Date[_0x4f0b5d(0x4e7)]();return _0x4d4c42[_0x4f0b5d(0x56a)](_0x2bb8b0=>{const _0x540941=_0x4f0b5d,_0x1041da=_0x540941(0x113)+_0x2bb8b0[_0x540941(0x365)]+'\x20-'+(_0x5e4f7f-_0x2bb8b0['t'])+_0x540941(0x39e)+_0x2bb8b0['env']+'\x20'+_0x2bb8b0[_0x540941(0x538)];return _0x2bb8b0[_0x540941(0x304)]&&_0x2bb8b0[_0x540941(0x304)][_0x540941(0x532)]?_0x1041da+_0x540941(0x4ef)+_0x2bb8b0[_0x540941(0x304)][_0x540941(0x315)](_0x540941(0x4ef)):_0x1041da;})['join']('\x0a');}function _0xed7789(_0x336256,_0x62b4e5){const _0x1cf7b6=_0x196a,_0x164acc=_0x1cf7b6(0x3ce)+_0x336256+_0x1cf7b6(0x291)+new Date()[_0x1cf7b6(0x373)]()+_0x1cf7b6(0x21e)+process[_0x1cf7b6(0x5b1)]+_0x1cf7b6(0x232),_0x3256ec=[_0x164acc,_0x1cf7b6(0x21a)+(_0x62b4e5&&_0x62b4e5['stack']?_0x62b4e5[_0x1cf7b6(0x304)][_0x1cf7b6(0x280)]('\x0a')[0x0]:_0x62b4e5),_0x1cf7b6(0x290)+(_0x3e656b?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x30b5c8(0x18),_0x5d3a87(),'='[_0x1cf7b6(0x5ca)](_0x164acc[_0x1cf7b6(0x532)]-0x1)];_0x15886f(_0x3256ec[_0x1cf7b6(0x315)]('\x0a'));}function _0x1d6c0c(_0x2a7fad){const _0x26821d=_0x196a;if(!_0x1a771e())return;const _0xc47e03=String(_0x2a7fad&&_0x2a7fad['message']||_0x2a7fad||''),_0x23f0b7=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x26821d(0x436)](_0xc47e03);_0xed7789(_0x23f0b7?'ORPHAN\x20(env-closed\x20write)':_0x26821d(0x4c3),_0x2a7fad);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x23f0b7)return;try{console[_0x26821d(0x40f)](_0x2a7fad&&_0x2a7fad[_0x26821d(0x304)]?_0x2a7fad[_0x26821d(0x304)]:_0x2a7fad);}catch{}process['exit'](0x1);}function _0xad0c9c(_0x4ea0be){const _0x155be7=_0x196a;if(!_0x1a771e())return;const _0x20a4de=String(_0x4ea0be&&_0x4ea0be['message']||_0x4ea0be||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x155be7(0x436)](_0x20a4de)&&_0xed7789(_0x155be7(0x263),_0x4ea0be);}function _0x5d3a87(){const _0x2416c6=_0x196a,_0x4c2997=[_0x2416c6(0x1f8)];let _0x1fe6d3=![];for(const _0x3794b0 of _0x5e00dd){const _0x568e19=_0x3794b0&&_0x3794b0[_0x2416c6(0x18e)];if(!_0x568e19)continue;for(const [_0x514aa4,_0x3d1925]of _0x568e19){const _0xf78170=_0x3d1925&&_0x3d1925[_0x2416c6(0x29c)]&&_0x3d1925[_0x2416c6(0x29c)][_0x2416c6(0x2c8)];if(!_0xf78170)continue;let _0x2d90ba,_0x4c5847;try{_0x2d90ba=Atomics[_0x2416c6(0x3e6)](_0xf78170,0x0),_0x4c5847=Atomics['load'](_0xf78170,0x1);}catch{continue;}if(_0x2d90ba===0x0)continue;_0x1fe6d3=!![];const _0x20dca2=_0x2d90ba>0x0?_0x2416c6(0x1a9):_0x2416c6(0x405),_0xee1fe7=Date[_0x2416c6(0x4e7)]()-Math['abs'](_0x2d90ba)*0x3e8,_0x6ddb69=((()=>{const _0x4637fc=_0x2416c6;try{return _0x3d1925['_writer']&&_0x3d1925[_0x4637fc(0x3e2)][_0x4637fc(0x437)]?_0x3d1925[_0x4637fc(0x3e2)][_0x4637fc(0x437)]():null;}catch{return null;}})());_0x4c2997[_0x2416c6(0x402)]('\x20\x20env='+_0x514aa4+'\x20phase='+_0x20dca2+_0x2416c6(0x299)+_0xee1fe7+_0x2416c6(0x274)+_0x4c5847+(_0x6ddb69?_0x2416c6(0x582)+_0x6ddb69['depth']+_0x2416c6(0x1cb)+_0x6ddb69[_0x2416c6(0x45f)]+_0x2416c6(0x53a)+_0x6ddb69['parkedNow']+'}':''));}}if(!_0x1fe6d3)_0x4c2997[_0x2416c6(0x402)]('\x20\x20(no\x20env\x20draining)');return _0x4c2997[_0x2416c6(0x315)]('\x0a');}function _0x8c10ad(){const _0x369d30=_0x196a;if(!_0x1a771e())return;const _0xdb064e=Math[_0x369d30(0x264)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0xc8c3f9=Date[_0x369d30(0x4e7)]();for(const _0x4065e2 of _0x5e00dd){const _0x4b788b=_0x4065e2&&_0x4065e2[_0x369d30(0x18e)];if(!_0x4b788b)continue;for(const [_0x5a4e5d,_0x1ad24d]of _0x4b788b){const _0x4980c3=_0x1ad24d&&_0x1ad24d[_0x369d30(0x29c)]&&_0x1ad24d[_0x369d30(0x29c)][_0x369d30(0x2c8)];if(!_0x4980c3)continue;let _0x4b0dcc;try{_0x4b0dcc=Atomics[_0x369d30(0x3e6)](_0x4980c3,0x0);}catch{continue;}const _0x11afdd=_0x4065e2[_0x369d30(0x289)]+'|'+_0x5a4e5d;if(_0x4b0dcc<=0x0){_0x39b4e7[_0x369d30(0x4d9)](_0x11afdd);continue;}const _0x34ae60=_0xc8c3f9-_0x4b0dcc*0x3e8,_0x3a4e97=_0x39b4e7[_0x369d30(0x1d0)](_0x11afdd);if(_0x34ae60<_0xdb064e)continue;if(_0x3a4e97&&_0xc8c3f9-_0x3a4e97[_0x369d30(0x3d2)]<_0xdb064e)continue;_0x39b4e7[_0x369d30(0x578)](_0x11afdd,{'firstTs':_0x3a4e97?_0x3a4e97[_0x369d30(0x1c5)]:_0x4b0dcc,'dumpedAt':_0xc8c3f9});const _0x3597cf=_0x369d30(0x270)+_0x34ae60+_0x369d30(0x150)+_0x5a4e5d+_0x369d30(0x291)+new Date()['toISOString']()+_0x369d30(0x21e)+process[_0x369d30(0x5b1)]+_0x369d30(0x232);_0x15886f([_0x3597cf,_0x5d3a87(),'='[_0x369d30(0x5ca)](_0x3597cf[_0x369d30(0x532)]-0x1)][_0x369d30(0x315)]('\x0a'));}}}function _0x534c96(){const _0x39c4fd=_0x196a;if(!_0x1a771e()||_0x185dda)return;_0x185dda=!![],process[_0x39c4fd(0x3a5)](_0x39c4fd(0x4c3),_0x1d6c0c),process['prependListener']('unhandledRejection',_0xad0c9c);const _0x1ed61d=Math[_0x39c4fd(0x264)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x12ad22=setInterval(_0x8c10ad,_0x1ed61d);if(_0x12ad22[_0x39c4fd(0x175)])_0x12ad22[_0x39c4fd(0x175)]();}function _0x1ae39a(_0x59df54){const _0x280acd=_0x196a;if(!_0x1a771e()||!_0x59df54)return;_0x5e00dd[_0x280acd(0x136)](_0x59df54),_0x534c96();}function _0x2f777c(_0x30c1ba){_0x5e00dd['delete'](_0x30c1ba);}function _0x54c77e(){const _0x4f87cd=_0x196a;if(!_0x1a771e())return{'enabled':![],'hint':_0x4f87cd(0x198)};return{'enabled':!![],'stackCapture':!!_0x3e656b,'recentWrites':_0x3c440c(0x10),'drain':_0x5d3a87()};}return okdbDiag={'isEnabled':_0x1a771e,'recordWrite':_0x341523,'installDiag':_0x534c96,'registerOkdb':_0x1ae39a,'unregisterOkdb':_0x2f777c,'snapshot':_0x54c77e},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x3dc353=_0x1cf947;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x3a0f0d}=require$$0$5,_0x2d7e5e=requireOkdbDiag(),_0x112ab2=process.env.OKDB_COMMIT_MODE===_0x3dc353(0x503);class _0x772e66{constructor(_0x53894e){const _0x215b45=_0x3dc353;this['env']=_0x53894e,this['_inflight']=new Set(),this['_enqueuedAt']=new Map(),this[_0x215b45(0x1c4)]=0x0,this['_durs']=[],this[_0x215b45(0x235)]=[],this[_0x215b45(0x3f0)]=Math[_0x215b45(0x264)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this[_0x215b45(0x1f9)]=[],this[_0x215b45(0x2d3)]=0x0;}async[_0x3dc353(0x26b)](_0xfbfbb6,_0x26bad0){const _0xe29678=_0x3dc353;if(_0x2d7e5e[_0xe29678(0x470)]())_0x2d7e5e[_0xe29678(0x3a8)](this[_0xe29678(0x10e)]?.['name'],_0x26bad0);if(this[_0xe29678(0x44c)]){const _0x3b5f2a=new Error(_0xe29678(0x15f));_0x3b5f2a[_0xe29678(0x3d1)]=_0xe29678(0x384);throw _0x3b5f2a;}if(this[_0xe29678(0x3f0)]>0x0){let _0x137d4=![];while(this[_0xe29678(0x2b5)]>=this[_0xe29678(0x3f0)]&&!this[_0xe29678(0x44c)]){!_0x137d4&&(_0x137d4=!![],this['_bpParkedTotal']++),await new Promise(_0x1be82e=>this['_bpWaiters'][_0xe29678(0x402)](_0x1be82e));}if(this[_0xe29678(0x44c)]){const _0x319b60=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x319b60[_0xe29678(0x3d1)]=_0xe29678(0x384);throw _0x319b60;}}this[_0xe29678(0x2b5)]++;const _0x4bb183=this[_0xe29678(0x10e)]['_coordinator'];if(_0x4bb183)await _0x4bb183[_0xe29678(0x55f)]();if(this[_0xe29678(0x44c)]){if(_0x4bb183)_0x4bb183[_0xe29678(0x1b4)]();this[_0xe29678(0x2b5)]--;if(this[_0xe29678(0x1f9)]['length']&&this[_0xe29678(0x2b5)]<this[_0xe29678(0x3f0)])this[_0xe29678(0x1f9)][_0xe29678(0x4cf)]()();const _0x69c36a=new Error(_0xe29678(0x15f));_0x69c36a['code']='ENV_CLOSING_RETRY';throw _0x69c36a;}const _0x10fe61=_0x3a0f0d[_0xe29678(0x4e7)]();if(_0x112ab2)try{const _0x400714=this[_0xe29678(0x10e)]['db'][_0xe29678(0x391)](_0xfbfbb6);this[_0xe29678(0x1c4)]++;if(this[_0xe29678(0x3af)]['push'](_0x3a0f0d['now']()-_0x10fe61)>0x100)this[_0xe29678(0x3af)]['shift']();if(this[_0xe29678(0x235)][_0xe29678(0x402)](_0x3a0f0d[_0xe29678(0x4e7)]())>0x800)this[_0xe29678(0x235)][_0xe29678(0x4cf)]();return _0x400714;}finally{this['_outstanding']--;if(this[_0xe29678(0x1f9)][_0xe29678(0x532)]&&this[_0xe29678(0x2b5)]<this[_0xe29678(0x3f0)])this[_0xe29678(0x1f9)][_0xe29678(0x4cf)]()();if(_0x4bb183)_0x4bb183[_0xe29678(0x1b4)]();}const _0x19d381=this[_0xe29678(0x10e)]['db'][_0xe29678(0x11f)](_0xfbfbb6);this['_inflight'][_0xe29678(0x136)](_0x19d381),this[_0xe29678(0x559)][_0xe29678(0x578)](_0x19d381,_0x10fe61);const _0x18be1e=()=>{const _0x2950cb=_0xe29678;this['_inflight'][_0x2950cb(0x4d9)](_0x19d381),this[_0x2950cb(0x559)][_0x2950cb(0x4d9)](_0x19d381),this[_0x2950cb(0x1c4)]++,this[_0x2950cb(0x2b5)]--;this['_bpWaiters'][_0x2950cb(0x532)]&&this[_0x2950cb(0x2b5)]<this[_0x2950cb(0x3f0)]&&this[_0x2950cb(0x1f9)]['shift']()();if(this['_durs'][_0x2950cb(0x402)](_0x3a0f0d[_0x2950cb(0x4e7)]()-_0x10fe61)>0x100)this[_0x2950cb(0x3af)][_0x2950cb(0x4cf)]();if(this[_0x2950cb(0x235)][_0x2950cb(0x402)](_0x3a0f0d[_0x2950cb(0x4e7)]())>0x800)this['_done'][_0x2950cb(0x4cf)]();};_0x19d381[_0xe29678(0x4a4)](_0x18be1e,_0x18be1e);try{return await _0x19d381;}finally{if(_0x4bb183)_0x4bb183[_0xe29678(0x1b4)]();}}['status'](){const _0x29056e=_0x3dc353,_0x25e6ea=_0x3a0f0d[_0x29056e(0x4e7)]();let _0x5da18a=0x0;for(const _0x25390e of this[_0x29056e(0x559)]['values']()){const _0x20debd=_0x25e6ea-_0x25390e;if(_0x20debd>_0x5da18a)_0x5da18a=_0x20debd;}let _0x21afd9=0x0;for(let _0x1d1dba=this['_done'][_0x29056e(0x532)]-0x1;_0x1d1dba>=0x0;_0x1d1dba--){if(_0x25e6ea-this[_0x29056e(0x235)][_0x1d1dba]>0x3e8)break;_0x21afd9++;}let _0x49c635=0x0;if(this[_0x29056e(0x3af)]['length']){const _0x1decda=[...this[_0x29056e(0x3af)]][_0x29056e(0x56b)]((_0x1c2f15,_0x558815)=>_0x1c2f15-_0x558815);_0x49c635=_0x1decda[Math[_0x29056e(0x2ba)](_0x1decda[_0x29056e(0x532)]-0x1,Math[_0x29056e(0x4fc)](_0x1decda[_0x29056e(0x532)]*0.99))];}return{'depth':this[_0x29056e(0x172)][_0x29056e(0x5cb)],'oldestPendingMs':Math[_0x29056e(0x3d8)](_0x5da18a),'committed':this['_committed'],'commitsPerSec':_0x21afd9,'commitP99Ms':Math[_0x29056e(0x3d8)](_0x49c635),'parkedNow':this['_bpWaiters'][_0x29056e(0x532)],'parkedTotal':this[_0x29056e(0x2d3)],'highWater':this[_0x29056e(0x3f0)]};}['inflightAgesMs'](){const _0x1b5d3d=_0x3dc353,_0x5d1498=_0x3a0f0d['now']();return[...this[_0x1b5d3d(0x559)][_0x1b5d3d(0x4c0)]()]['map'](_0x338944=>Math['round'](_0x5d1498-_0x338944))[_0x1b5d3d(0x56b)]((_0x18f7b9,_0xae9351)=>_0xae9351-_0x18f7b9);}['markClosed'](){const _0x3cb581=_0x3dc353;this[_0x3cb581(0x44c)]=!![];for(const _0x5284fa of this[_0x3cb581(0x1f9)][_0x3cb581(0x54b)](0x0))_0x5284fa();}async['drain'](){const _0x4f2c80=_0x3dc353;let _0x3f44d2=0x0;while(this[_0x4f2c80(0x172)][_0x4f2c80(0x5cb)]&&_0x3f44d2++<0x3e8){await Promise[_0x4f2c80(0x214)]([...this[_0x4f2c80(0x172)]]);}}async[_0x3dc353(0x3fa)](_0x2c26b5,_0x9d124e,_0x5f5461,_0x22219d){const _0x55c89f=_0x3dc353;return this[_0x55c89f(0x26b)](()=>{const _0x47b4ef=_0x55c89f;if(_0x22219d===undefined)_0x2c26b5['putSync'](_0x9d124e,_0x5f5461);else _0x2c26b5[_0x47b4ef(0x4b7)](_0x9d124e,_0x5f5461,_0x22219d);},_0x55c89f(0x3b6));}async['remove'](_0x48b525,_0x7e1531){const _0xd577fd=_0x3dc353;return this[_0xd577fd(0x26b)](()=>_0x48b525['removeSync'](_0x7e1531),_0xd577fd(0x5cd));}}async function _0x5a70ac(_0x3601c7,_0x31a54b){const _0x3e5a0f=_0x3dc353;if(_0x31a54b==null)_0x31a54b=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x5bb3fd=_0x3601c7?.[_0x3e5a0f(0x409)];if(!_0x5bb3fd||typeof _0x5bb3fd[_0x3e5a0f(0x4a4)]!==_0x3e5a0f(0x28d))return;await Promise[_0x3e5a0f(0x42d)]([Promise[_0x3e5a0f(0x318)](_0x5bb3fd)[_0x3e5a0f(0x51d)](()=>{}),new Promise(_0x2f3722=>{const _0xfef69=_0x3e5a0f,_0x344a13=setTimeout(_0x2f3722,_0x31a54b);if(_0x344a13[_0xfef69(0x175)])_0x344a13[_0xfef69(0x175)]();})]);}catch{}}function _0x56bd67(_0x244579){const _0x2a65f8=_0x3dc353;if(_0x112ab2)return Promise[_0x2a65f8(0x318)]();const _0x5d3808=_0x244579?.[_0x2a65f8(0x53c)];return _0x5d3808&&typeof _0x5d3808[_0x2a65f8(0x4a4)]===_0x2a65f8(0x28d)?_0x5d3808:Promise[_0x2a65f8(0x318)]();}return okdbWriter[_0x3dc353(0x374)]=_0x772e66,okdbWriter['exports'][_0x3dc353(0x336)]=_0x5a70ac,okdbWriter[_0x3dc353(0x374)][_0x3dc353(0x53c)]=_0x56bd67,okdbWriter[_0x3dc353(0x374)][_0x3dc353(0x1f6)]=_0x112ab2,okdbWriter[_0x3dc353(0x374)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x5cb51f=_0x1cf947;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x50ed9a=require$$0,{SYNC_COMMITS:_0x1e2dbc}=requireOkdbWriter(),_0x40c455=_0x5cb51f(0x1db);class _0x5233e6{constructor(_0x9f8102,_0x21f369,_0x920c24){const _0x5e9be5=_0x5cb51f;this[_0x5e9be5(0x342)]=_0x9f8102,this[_0x5e9be5(0x2e6)]=_0x21f369,this[_0x5e9be5(0x278)]=_0x920c24,this[_0x5e9be5(0x19b)]=![],this['_heartbeatTimer']=null,this[_0x5e9be5(0x5ac)]=null;}[_0x5cb51f(0x244)](){const _0x17e3a3=_0x5cb51f;if(this[_0x17e3a3(0x19b)])return![];try{const _0x3e9d7d=this[_0x17e3a3(0x342)][_0x17e3a3(0x5d2)]()[_0x17e3a3(0x1d0)](this['_key']);if(!_0x3e9d7d||_0x3e9d7d[_0x17e3a3(0x501)]!==this[_0x17e3a3(0x278)])return![];const _0x44d859=_0x3e9d7d[_0x17e3a3(0x22b)]??_0x3e9d7d[_0x17e3a3(0x501)];if(_0x44d859+_0x3e9d7d['ttlMs']<Date['now']())return![];return!![];}catch{return!this[_0x17e3a3(0x19b)];}}[_0x5cb51f(0x2d5)](){const _0x34277d=_0x5cb51f;if(this['_released'])return null;try{return this[_0x34277d(0x342)][_0x34277d(0x5d2)]()[_0x34277d(0x1d0)](this[_0x34277d(0x2e6)])??null;}catch{return null;}}async['extend'](_0x2cf3ef){const _0x38f207=_0x5cb51f;if(this[_0x38f207(0x19b)])return;try{const _0x6e5fda=this[_0x38f207(0x342)][_0x38f207(0x5d2)]()[_0x38f207(0x1d0)](this[_0x38f207(0x2e6)]);if(!_0x6e5fda||_0x6e5fda[_0x38f207(0x501)]!==this[_0x38f207(0x278)])return;if(_0x1e2dbc)this[_0x38f207(0x342)][_0x38f207(0x5d2)]()['putSync'](this[_0x38f207(0x2e6)],{..._0x6e5fda,'ttlMs':_0x6e5fda[_0x38f207(0x3fc)]+_0x2cf3ef});else await this[_0x38f207(0x342)]['_db']()['put'](this[_0x38f207(0x2e6)],{..._0x6e5fda,'ttlMs':_0x6e5fda[_0x38f207(0x3fc)]+_0x2cf3ef});}catch{}}async[_0x5cb51f(0x4da)](){const _0x4223a6=_0x5cb51f;if(this[_0x4223a6(0x19b)])return;if(this['_heartbeatInFlight'])try{await this['_heartbeatInFlight'];}catch{}clearInterval(this[_0x4223a6(0x1a6)]),this['_heartbeatTimer']=null,this[_0x4223a6(0x19b)]=!![];try{const _0x52a2df=this[_0x4223a6(0x342)][_0x4223a6(0x5d2)]()['get'](this[_0x4223a6(0x2e6)]);if(_0x52a2df&&_0x52a2df['acquiredAt']===this[_0x4223a6(0x278)]){if(_0x1e2dbc)this[_0x4223a6(0x342)][_0x4223a6(0x5d2)]()['removeSync'](this[_0x4223a6(0x2e6)]);else await this['_lock']['_db']()[_0x4223a6(0x2cc)](this[_0x4223a6(0x2e6)]);}}catch{}}[_0x5cb51f(0x37c)](_0x430117,_0xcb1782){const _0x355ca6=_0x5cb51f,_0x22d5c2=_0xcb1782??Math['floor'](_0x430117/0x3);this['_heartbeatTimer']=setInterval(()=>{if(this['_released'])return;this['_heartbeatInFlight']=((async()=>{const _0x35d08d=_0x196a;try{const _0x36f2d8=this[_0x35d08d(0x342)][_0x35d08d(0x5d2)]()[_0x35d08d(0x1d0)](this[_0x35d08d(0x2e6)]);if(!_0x36f2d8||_0x36f2d8['acquiredAt']!==this[_0x35d08d(0x278)]){this[_0x35d08d(0x19b)]=!![],clearInterval(this[_0x35d08d(0x1a6)]),this[_0x35d08d(0x1a6)]=null;return;}if(_0x1e2dbc)this[_0x35d08d(0x342)][_0x35d08d(0x5d2)]()['putSync'](this[_0x35d08d(0x2e6)],{..._0x36f2d8,'updatedAt':Date[_0x35d08d(0x4e7)]()});else await this['_lock'][_0x35d08d(0x5d2)]()[_0x35d08d(0x3fa)](this[_0x35d08d(0x2e6)],{..._0x36f2d8,'updatedAt':Date[_0x35d08d(0x4e7)]()});}catch{}this['_heartbeatInFlight']=null;})());},_0x22d5c2);if(this[_0x355ca6(0x1a6)][_0x355ca6(0x175)])this[_0x355ca6(0x1a6)]['unref']();}}class _0x4e2c0f{constructor(_0x6ac2d7,{namespace:_0x318148,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0xd32f81=_0x5cb51f;this[_0xd32f81(0x1b6)]=_0x6ac2d7,this[_0xd32f81(0x351)]=_0x318148,this[_0xd32f81(0x3fc)]=ttlMs,this[_0xd32f81(0x12e)]=heartbeatMs,this[_0xd32f81(0x37b)]=null;}[_0x5cb51f(0x5d2)](){const _0x34754b=_0x5cb51f;return!this['_lockDb']&&(this['_lockDb']=this[_0x34754b(0x1b6)]['openDB'](_0x40c455,{'dupSort':![]})),this[_0x34754b(0x37b)];}[_0x5cb51f(0x439)](){const _0x492b6b=_0x5cb51f;return!this[_0x492b6b(0x11e)]&&(this[_0x492b6b(0x11e)]=this[_0x492b6b(0x1b6)][_0x492b6b(0x494)](_0x40c455+_0x492b6b(0x1fc),{'dupSort':![]})),this[_0x492b6b(0x11e)];}[_0x5cb51f(0x2e6)](_0x2b0dbf){return this['namespace']+':'+_0x2b0dbf;}[_0x5cb51f(0x3f8)](_0x186d90){const _0xd7bf43=_0x5cb51f;try{_0x1e2dbc?this[_0xd7bf43(0x439)]()[_0xd7bf43(0x4b7)](this[_0xd7bf43(0x2e6)](_0x186d90),Date[_0xd7bf43(0x4e7)]()):this[_0xd7bf43(0x439)]()[_0xd7bf43(0x3fa)](this[_0xd7bf43(0x2e6)](_0x186d90),Date[_0xd7bf43(0x4e7)]())?.[_0xd7bf43(0x51d)]?.(()=>{});}catch{}}[_0x5cb51f(0x580)](_0x5eb09b,_0x4b86e8=0x3e8){const _0x320604=_0x5cb51f;try{const _0x1ee0f0=this[_0x320604(0x439)]()[_0x320604(0x1d0)](this[_0x320604(0x2e6)](_0x5eb09b));return typeof _0x1ee0f0==='number'&&Date[_0x320604(0x4e7)]()-_0x1ee0f0<_0x4b86e8;}catch{return![];}}[_0x5cb51f(0x2ca)](_0x25dccf){const _0x2af49f=_0x5cb51f,_0x3cb29b=_0x25dccf[_0x2af49f(0x22b)]??_0x25dccf[_0x2af49f(0x501)];return _0x3cb29b+_0x25dccf[_0x2af49f(0x3fc)]<Date['now']();}static[_0x5cb51f(0x3a3)](_0x4e5ee6){const _0xe35840=_0x5cb51f,_0xceb197=_0x4e5ee6?.[_0xe35840(0x2d5)];if(!_0xceb197||typeof _0xceb197[_0xe35840(0x5b1)]!==_0xe35840(0x4cd))return![];if(_0xceb197[_0xe35840(0x518)]!==_0x50ed9a[_0xe35840(0x518)]())return![];if(_0xceb197[_0xe35840(0x5b1)]===process[_0xe35840(0x5b1)])return![];try{return process['kill'](_0xceb197['pid'],0x0),![];}catch(_0x594de1){return _0x594de1['code']===_0xe35840(0x3bd);}}async[_0x5cb51f(0x4ad)](_0x41f793,_0x2ec9e7={},_0x28ac39={}){const _0x584ad6=_0x5cb51f,_0x577e62=this[_0x584ad6(0x2e6)](_0x41f793),_0xf33778=_0x28ac39[_0x584ad6(0x3fc)]??this[_0x584ad6(0x3fc)],_0x47846c=Date[_0x584ad6(0x4e7)](),_0x4ef5c4={'holder':{'pid':process[_0x584ad6(0x5b1)],'hostname':_0x50ed9a[_0x584ad6(0x518)](),..._0x2ec9e7},'acquiredAt':_0x47846c,'updatedAt':_0x47846c,'ttlMs':_0xf33778};let _0x16ebcf=![],_0x2f19ea=null;try{const _0x4a707e=()=>{const _0x5a1fb5=_0x584ad6,_0x34548b=this[_0x5a1fb5(0x5d2)]()[_0x5a1fb5(0x1d0)](_0x577e62);if(_0x34548b&&!this[_0x5a1fb5(0x2ca)](_0x34548b)&&!_0x4e2c0f[_0x5a1fb5(0x3a3)](_0x34548b)){const _0x575f18=_0x2ec9e7[_0x5a1fb5(0x3b3)]!=null&&_0x34548b['holder']['pid']===process['pid']&&_0x34548b['holder']['processorId']===_0x2ec9e7[_0x5a1fb5(0x3b3)];if(!_0x575f18){_0x16ebcf=![],_0x2f19ea=_0x34548b;return;}_0x4ef5c4[_0x5a1fb5(0x501)]<=_0x34548b['acquiredAt']&&(_0x4ef5c4[_0x5a1fb5(0x501)]=_0x34548b[_0x5a1fb5(0x501)]+0x1,_0x4ef5c4['updatedAt']=_0x4ef5c4[_0x5a1fb5(0x501)]);}this['_db']()['put'](_0x577e62,_0x4ef5c4),_0x16ebcf=!![],_0x2f19ea=_0x4ef5c4;};if(_0x1e2dbc)this[_0x584ad6(0x5d2)]()['transactionSync'](_0x4a707e);else await this[_0x584ad6(0x5d2)]()[_0x584ad6(0x11f)](_0x4a707e);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x16ebcf)return{'acquired':![],'handle':null,'current':_0x2f19ea};const _0x5d7223=new _0x5233e6(this,_0x577e62,_0x4ef5c4[_0x584ad6(0x501)]);return _0x5d7223[_0x584ad6(0x37c)](_0xf33778,this['heartbeatMs']),{'acquired':!![],'handle':_0x5d7223,'current':_0x2f19ea};}[_0x5cb51f(0x259)](_0x470302){const _0x4b4001=_0x5cb51f;try{return this[_0x4b4001(0x5d2)]()[_0x4b4001(0x1d0)](this['_key'](_0x470302))??null;}catch{return null;}}['list'](){const _0xeba845=_0x5cb51f,_0x3c1a44=this[_0xeba845(0x351)]+':',_0x6723d=[];try{for(const {key:_0x317dde,value:_0x3b35be}of this[_0xeba845(0x5d2)]()['getRange']({'start':_0x3c1a44,'end':_0x3c1a44+'\xff'})){typeof _0x317dde===_0xeba845(0x3a6)&&_0x317dde[_0xeba845(0x5a1)](_0x3c1a44)&&_0x6723d[_0xeba845(0x402)]({'id':_0x317dde[_0xeba845(0x3bc)](_0x3c1a44[_0xeba845(0x532)]),'entry':_0x3b35be});}}catch{}return _0x6723d;}static[_0x5cb51f(0x3f3)](_0x6e5f9a){const _0x1d0b2e=_0x5cb51f,_0x31e59f=[];try{const _0x3866c6=_0x6e5f9a[_0x1d0b2e(0x494)](_0x40c455,{'dupSort':![]});for(const {key:_0x1e47ad,value:_0x4a95f4}of _0x3866c6[_0x1d0b2e(0x268)]({})){if(typeof _0x1e47ad!==_0x1d0b2e(0x3a6))continue;const _0x43e8d4=_0x1e47ad[_0x1d0b2e(0x504)](':');if(_0x43e8d4<0x1)continue;_0x31e59f[_0x1d0b2e(0x402)]({'namespace':_0x1e47ad[_0x1d0b2e(0x3bc)](0x0,_0x43e8d4),'id':_0x1e47ad[_0x1d0b2e(0x3bc)](_0x43e8d4+0x1),'entry':_0x4a95f4});}}catch{}return _0x31e59f;}}return okdbLock={'OKDBLock':_0x4e2c0f},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x37ca6f=_0x1cf947;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x11bb10=require$$0,_0x1ae9ed=require$$1$2,_0x22280b=require$$0$1,{LOOP:_0x4295b5}=requireOkdbLoopMonitor(),{OKDBLock:_0x56cafc}=requireOkdbLock(),{SYNC_COMMITS:_0x2975c1}=requireOkdbWriter(),_0x52e0ec=_0x37ca6f(0x203),_0x1e47a3=_0x37ca6f(0x106),_0x44c053=_0x37ca6f(0x465),_0x3e119b=_0x37ca6f(0x1d1),_0x2fef74=(_0x35e077,_0x316158)=>_0x35e077+':'+_0x316158,_0x295a8b=(_0x26c9ad,_0x1df259)=>_0x26c9ad+'::'+_0x1df259,_0x3337c4=(_0x232e3a,_0x22d7fd)=>_0x232e3a+'/'+_0x22d7fd,_0x58289f=(_0x195b0c,_0xbda0c0)=>_0x195b0c+'#'+_0xbda0c0,_0x36a204=_0x104475=>{const _0x37bbbe=_0x37ca6f;if(_0x104475?.[_0x37bbbe(0x279)])return _0x104475[_0x37bbbe(0x279)];const _0x185c28=_0x104475?.[_0x37bbbe(0x577)];return typeof _0x185c28===_0x37bbbe(0x3a6)&&_0x185c28[_0x37bbbe(0x1c0)]('#')?_0x185c28[_0x37bbbe(0x3bc)](0x0,_0x185c28['indexOf']('#')):_0x185c28;},_0x447823=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x82ed39=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5b5f84=_0x447823*0x3,_0x2255cd=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x37ca6f(0x264)](0x927c0,_0x5b5f84*0x14),_0x27fc17=[_0x37ca6f(0x2f7),'processor:ready',_0x37ca6f(0x48b),_0x37ca6f(0x29d),_0x37ca6f(0x29b),_0x37ca6f(0x2cb)];let _0x205af4=null;function _0x1aa069(){const _0xd187b=_0x37ca6f;if(_0x205af4==null)_0x205af4=Math['round']((Date[_0xd187b(0x4e7)]()-process[_0xd187b(0x35a)]()*0x3e8)/0x3e8)*0x3e8;return _0x205af4;}function _0x1af7b3(_0x5646eb){const _0x1b7466=_0x37ca6f;if(process.env.OKDB_PROCESS_KILL===_0x1b7466(0x4e2))return![];if(_0x5646eb?.['options']?.['processes']&&typeof _0x5646eb[_0x1b7466(0x37e)][_0x1b7466(0x326)]===_0x1b7466(0x261)&&_0x5646eb[_0x1b7466(0x37e)][_0x1b7466(0x326)][_0x1b7466(0x590)]===![])return![];return!![];}function _0xd502a1(_0x94a1b5,_0x1b7c1b){const _0x2b7b0e=_0x37ca6f,_0x190e28=!!_0x1b7c1b?.['processors'];switch(_0x94a1b5){case'primary':return{'controllable':_0x190e28,'decommissionable':![],'killable':!![],'killConfirm':_0x2b7b0e(0x120)};case _0x2b7b0e(0x46a):case _0x2b7b0e(0x2f9):return{'controllable':_0x190e28,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x2b7b0e(0x509):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x2b7b0e(0x1bb):case _0x2b7b0e(0x4c8):case _0x2b7b0e(0x450):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x2b7b0e(0x1e5)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1dc7e5{constructor(_0x1fde28){const _0x33d670=_0x37ca6f;this[_0x33d670(0x24e)]=_0x1fde28,this[_0x33d670(0x4dd)]=null,this[_0x33d670(0x5c6)]=null,this[_0x33d670(0x379)]=new Map(),this['_cmd']=null,this[_0x33d670(0x45b)]=![],this[_0x33d670(0x2c5)]=![],this[_0x33d670(0x15d)]=_0x1aa069(),this[_0x33d670(0x480)]=_0x2fef74(process['pid'],this[_0x33d670(0x15d)]),this[_0x33d670(0x3e0)]=_0x22280b[_0x33d670(0x3ae)]()[_0x33d670(0x3bc)](0x0,0x8),this['_rowKey']=_0x58289f(this[_0x33d670(0x480)],this[_0x33d670(0x3e0)]),this[_0x33d670(0x2e5)]=Date['now'](),this[_0x33d670(0x3f1)]=null,this['_supervisorKey']=null,this[_0x33d670(0x1dd)]=null,this[_0x33d670(0x3da)]=null,this[_0x33d670(0x547)]=null,this['_onTick']=null,this[_0x33d670(0x191)]=0x0,this[_0x33d670(0x267)]={},this[_0x33d670(0x20d)]=new Map(),this[_0x33d670(0xfd)]=process[_0x33d670(0x380)](),this[_0x33d670(0x2a5)]=Date[_0x33d670(0x4e7)](),this[_0x33d670(0x3fe)]=0x0,this[_0x33d670(0x1a7)]=new Map();}get['selfKey'](){const _0x4d6c17=_0x37ca6f;return this[_0x4d6c17(0x480)];}get[_0x37ca6f(0x185)](){const _0x1058a4=_0x37ca6f;return this[_0x1058a4(0x4bb)];}['_caps'](_0x384ad4,_0x1dc42b){const _0x584c8e=_0x37ca6f,_0x977d76=_0xd502a1(_0x384ad4,_0x1dc42b);if(_0x977d76[_0x584c8e(0x248)]&&!_0x1af7b3(this[_0x584c8e(0x24e)]))return{..._0x977d76,'killable':![],'killConfirm':undefined};return _0x977d76;}[_0x37ca6f(0x171)](){const _0x403c0b=_0x37ca6f;return!!this[_0x403c0b(0x4dd)];}[_0x37ca6f(0x45a)](_0x4cd1e3){const _0x1866d8=_0x37ca6f;Object[_0x1866d8(0x166)](this[_0x1866d8(0x267)],_0x4cd1e3||{});}[_0x37ca6f(0x13d)](_0xf1babb){const _0x36b5bf=_0x37ca6f;if(_0xf1babb)this[_0x36b5bf(0x1dd)]=_0xf1babb;}[_0x37ca6f(0x479)](_0x39e993={}){const _0x1ff7d9=_0x37ca6f;return this[_0x1ff7d9(0x24e)][_0x1ff7d9(0x3fb)](_0x39e993);}[_0x37ca6f(0x174)](){const _0x507d3e=_0x37ca6f,_0x4768a6={};let _0x1b7227=0x0,_0x3fbfe1=0x0;const _0x52d6e2=new Set();for(const _0x433d5b of this[_0x507d3e(0x13e)]()){_0x3fbfe1++;const _0x22dd6b=_0x433d5b[_0x507d3e(0x32d)];if(!_0x22dd6b)continue;if(_0x22dd6b[_0x507d3e(0x36f)])_0x1b7227++;for(const _0x5707ad of _0x22dd6b[_0x507d3e(0x5b7)]||[]){if(![_0x507d3e(0x4f6),_0x507d3e(0x20c)]['includes'](_0x5707ad[_0x507d3e(0x2b9)]))continue;(_0x5707ad[_0x507d3e(0x58a)]===_0x507d3e(0x4d2)||_0x5707ad[_0x507d3e(0x58a)]===_0x507d3e(0x144))&&_0x5707ad[_0x507d3e(0x181)]&&_0x52d6e2[_0x507d3e(0x136)]((_0x5707ad[_0x507d3e(0x10e)]||'default')+':'+_0x5707ad[_0x507d3e(0x181)]);const _0x122c4d=_0x5707ad[_0x507d3e(0x10e)]||'default';(_0x4768a6[_0x122c4d]||=[])['push']({..._0x5707ad,'env':_0x122c4d,'owner':{'pid':_0x433d5b[_0x507d3e(0x5b1)]??null,'kind':_0x433d5b[_0x507d3e(0x538)]??null}});}}for(const [_0x6f3d48,_0x2faf76]of Object[_0x507d3e(0x530)](_0x4768a6)){for(const _0x33e197 of _0x2faf76){if(_0x33e197[_0x507d3e(0x2b9)]===_0x507d3e(0x4f6)&&!_0x33e197[_0x507d3e(0x2ff)]){const _0x412122=_0x6f3d48+':'+(_0x33e197[_0x507d3e(0x181)]??'');if(!_0x52d6e2[_0x507d3e(0x5b3)](_0x412122))_0x33e197[_0x507d3e(0x205)]=!![];}}}return{'envs':_0x4768a6,'policy':null,'participation':{'participating':_0x1b7227,'total':_0x3fbfe1},'source':_0x507d3e(0x3ba)};}[_0x37ca6f(0x39b)](){const _0x3009d5=_0x37ca6f,_0x678b0b=_0x5940e7=>{const _0xa28d80=_0x196a;if(_0x5940e7[_0xa28d80(0x58a)]===_0xa28d80(0x4d2)||_0x5940e7[_0xa28d80(0x58a)]==='building'||_0x5940e7[_0xa28d80(0x58a)]===_0xa28d80(0x40f))return 0x3;if(_0x5940e7['claimGated'])return 0x1;return 0x2;},_0x26281f=new Map();for(const _0x502d84 of this[_0x3009d5(0x13e)]()){for(const _0x549fdb of _0x502d84[_0x3009d5(0x32d)]?.[_0x3009d5(0x5b7)]||[]){const _0x3a356b={..._0x549fdb,'owner':{'pid':_0x502d84[_0x3009d5(0x5b1)]??null,'kind':_0x502d84[_0x3009d5(0x538)]??null,'host':_0x502d84['host']??null}},_0xa2eb4f=_0x549fdb[_0x3009d5(0x2b9)]===_0x3009d5(0x4f6)?_0x3009d5(0x297)+(_0x549fdb[_0x3009d5(0x10e)]??'')+'::'+(_0x549fdb[_0x3009d5(0x181)]??_0x549fdb[_0x3009d5(0x446)]??_0x549fdb['id']):_0x3009d5(0x4ff)+(_0x502d84['nodeKey']??_0x502d84[_0x3009d5(0x279)]??'')+'::'+(_0x549fdb[_0x3009d5(0x10e)]??'')+'::'+_0x549fdb['id'],_0x6d4a17=_0x26281f['get'](_0xa2eb4f);if(!_0x6d4a17||_0x678b0b(_0x3a356b)>_0x678b0b(_0x6d4a17))_0x26281f[_0x3009d5(0x578)](_0xa2eb4f,_0x3a356b);}}return[..._0x26281f['values']()];}[_0x37ca6f(0x26d)](){const _0x27fd00=_0x37ca6f,_0x7774e1=Date[_0x27fd00(0x4e7)](),_0x425c2d=this[_0x27fd00(0x13e)](),_0x90b4ba=_0x16460d=>Math[_0x27fd00(0x264)](0x0,Math[_0x27fd00(0x3d8)]((_0x7774e1-(_0x16460d[_0x27fd00(0x2fe)]||_0x7774e1))/0x3e8)),_0x2273aa=_0x425c2d[_0x27fd00(0x21f)](_0x9bbd0c=>_0x9bbd0c[_0x27fd00(0x538)]===_0x27fd00(0x572)),_0xc73271=_0x425c2d[_0x27fd00(0x59d)](_0x55014d=>_0x55014d['kind']===_0x27fd00(0x1bb));if(_0x2273aa||_0xc73271[_0x27fd00(0x532)])return{'primary':_0x2273aa?{'pid':_0x2273aa[_0x27fd00(0x5b1)],'uptime':_0x90b4ba(_0x2273aa)}:null,'workers':_0xc73271[_0x27fd00(0x56a)](_0x590157=>({'pid':_0x590157[_0x27fd00(0x5b1)],'uptime':_0x90b4ba(_0x590157)})),'workersConfigured':_0x2273aa?.[_0x27fd00(0x2c3)]?.['workersConfigured']??_0xc73271[_0x27fd00(0x532)],'mode':_0x27fd00(0x27e)};const _0x1ab15b=_0x425c2d[_0x27fd00(0x21f)](_0x553728=>_0x553728[_0x27fd00(0x538)]===_0x27fd00(0x46a)||_0x553728[_0x27fd00(0x538)]===_0x27fd00(0x2f9)||_0x553728['kind']==='embedded'),_0x22c7a5=_0x1ab15b?{'pid':_0x1ab15b[_0x27fd00(0x5b1)],'uptime':_0x90b4ba(_0x1ab15b)}:{'pid':process['pid'],'uptime':Math['max'](0x0,Math[_0x27fd00(0x3d8)](process[_0x27fd00(0x35a)]()))};return{'primary':_0x22c7a5,'workers':[_0x22c7a5],'workersConfigured':0x1,'mode':_0x27fd00(0x4f6)};}[_0x37ca6f(0x517)](){return this['_groupByProcess']();}['treeView'](){const _0x21c446=_0x37ca6f,_0xdb90f6=new Map();for(const _0x4b2d9b of this['_groupByProcess']())_0xdb90f6[_0x21c446(0x578)](_0x4b2d9b[_0x21c446(0x279)],{..._0x4b2d9b,'children':[]});const _0x2f1fd9=[];for(const _0x1e719e of _0xdb90f6[_0x21c446(0x4c0)]()){const _0x57b248=_0x1e719e[_0x21c446(0x284)]?_0xdb90f6[_0x21c446(0x1d0)](_0x1e719e[_0x21c446(0x284)]):null;if(_0x57b248&&_0x57b248!==_0x1e719e)_0x57b248[_0x21c446(0x2f3)]['push'](_0x1e719e);else _0x2f1fd9[_0x21c446(0x402)](_0x1e719e);}const _0x3a50cf=(_0x1cf0b4,_0x5c41e2)=>_0x1cf0b4['kind']===_0x5c41e2['kind']?(_0x1cf0b4[_0x21c446(0x5b1)]||0x0)-(_0x5c41e2['pid']||0x0):(_0x1cf0b4[_0x21c446(0x538)]??'')<(_0x5c41e2['kind']??'')?-0x1:0x1,_0x1a7670=_0x532b84=>{const _0x4d5f99=_0x21c446;_0x532b84['sort'](_0x3a50cf);for(const _0x824e5f of _0x532b84)if(_0x824e5f[_0x4d5f99(0x2f3)][_0x4d5f99(0x532)])_0x1a7670(_0x824e5f[_0x4d5f99(0x2f3)]);};return _0x1a7670(_0x2f1fd9),_0x2f1fd9;}[_0x37ca6f(0x36e)](_0x50ad49){const _0x15221e=_0x37ca6f;return this[_0x15221e(0x3cc)]()[_0x15221e(0x21f)](_0x9be1b8=>_0x9be1b8[_0x15221e(0x279)]===_0x50ad49)??null;}[_0x37ca6f(0x3cc)](_0x249de2=Date['now']()){const _0x14e619=_0x37ca6f,_0x428b1f=new Map();for(const _0x4d12d3 of this[_0x14e619(0x13e)]()){const _0x6d3d1d=_0x36a204(_0x4d12d3);let _0x5415a4=_0x428b1f[_0x14e619(0x1d0)](_0x6d3d1d);!_0x5415a4&&(_0x5415a4={'processKey':_0x6d3d1d,'nodeKey':_0x6d3d1d,'pid':_0x4d12d3[_0x14e619(0x5b1)],'ppid':_0x4d12d3['ppid']??null,'host':_0x4d12d3[_0x14e619(0x28a)]??null,'kind':_0x4d12d3[_0x14e619(0x538)],'role':null,'supervisorKey':_0x4d12d3[_0x14e619(0x284)]??null,'slot':_0x4d12d3['slot']??null,'slotKey':_0x4d12d3['slotKey']??null,'caps':_0x4d12d3['caps']??null,'lifecycle':_0x4d12d3['lifecycle']??null,'uptime':Math[_0x14e619(0x264)](0x0,Math[_0x14e619(0x3d8)]((_0x249de2-(_0x4d12d3['startedAt']||_0x249de2))/0x3e8)),'startedAt':_0x4d12d3['startedAt']??null,'meta':_0x4d12d3['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x428b1f['set'](_0x6d3d1d,_0x5415a4));_0x5415a4['instances'][_0x14e619(0x402)]({'instanceId':_0x4d12d3[_0x14e619(0x571)]??null,'role':_0x4d12d3['role']??null,'listenAddr':_0x4d12d3[_0x14e619(0x28c)]??null,'lifecycle':_0x4d12d3['lifecycle']??null,'processing':_0x4d12d3[_0x14e619(0x32d)]??null});if(!_0x5415a4[_0x14e619(0x17c)]&&_0x4d12d3[_0x14e619(0x17c)])_0x5415a4[_0x14e619(0x17c)]=_0x4d12d3['role'];if(!_0x5415a4[_0x14e619(0x28c)]&&_0x4d12d3[_0x14e619(0x28c)])_0x5415a4[_0x14e619(0x28c)]=_0x4d12d3['listenAddr'];if(!_0x5415a4[_0x14e619(0x32d)]&&_0x4d12d3[_0x14e619(0x32d)])_0x5415a4[_0x14e619(0x32d)]=_0x4d12d3[_0x14e619(0x32d)];if(!_0x5415a4[_0x14e619(0x2cf)]&&_0x4d12d3[_0x14e619(0x2cf)])_0x5415a4[_0x14e619(0x2cf)]=_0x4d12d3[_0x14e619(0x2cf)];if(!_0x5415a4['singletonClaims']&&_0x4d12d3[_0x14e619(0x5a9)])_0x5415a4['singletonClaims']=_0x4d12d3['singletonClaims'];if(_0x5415a4[_0x14e619(0x3b1)]==null&&_0x4d12d3[_0x14e619(0x3b1)])_0x5415a4[_0x14e619(0x3b1)]=_0x4d12d3[_0x14e619(0x3b1)];if(_0x4d12d3[_0x14e619(0x1b9)]&&(!_0x5415a4[_0x14e619(0x1b9)]||(_0x4d12d3[_0x14e619(0x1b9)]['at']??0x0)>(_0x5415a4['stats']['at']??0x0)))_0x5415a4[_0x14e619(0x1b9)]=_0x4d12d3['stats'];}return[..._0x428b1f[_0x14e619(0x4c0)]()];}[_0x37ca6f(0x227)](){const _0x48602c=_0x37ca6f,_0x7512e8=[],_0x18f25f={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x21b20b of this[_0x48602c(0x3cc)]()){_0x7512e8[_0x48602c(0x402)]({'processKey':_0x21b20b[_0x48602c(0x279)],'kind':_0x21b20b['kind'],'pid':_0x21b20b['pid'],'supervisorKey':_0x21b20b[_0x48602c(0x284)],'meta':_0x21b20b[_0x48602c(0x2c3)]??null,'uptime':_0x21b20b['uptime'],'stats':_0x21b20b[_0x48602c(0x1b9)]??null}),_0x18f25f[_0x48602c(0x326)]++;if(_0x21b20b['stats']){_0x18f25f[_0x48602c(0x487)]+=_0x21b20b[_0x48602c(0x1b9)][_0x48602c(0x487)]||0x0,_0x18f25f[_0x48602c(0x596)]+=(_0x21b20b[_0x48602c(0x1b9)]['heapUsed']||0x0)+(_0x21b20b['stats']['threads']?.[_0x48602c(0x596)]||0x0);const _0x338502=_0x21b20b['stats']['threads'];_0x338502&&(_0x18f25f['threads'][_0x48602c(0x535)]+=_0x338502[_0x48602c(0x535)]||0x0,_0x18f25f[_0x48602c(0x431)]['sandbox']+=_0x338502[_0x48602c(0x22e)]||0x0,_0x18f25f[_0x48602c(0x431)]['busy']+=_0x338502[_0x48602c(0x5bf)]||0x0);}}return{'totals':_0x18f25f,'nodes':_0x7512e8};}async[_0x37ca6f(0x4ae)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x28dedb=_0x37ca6f;this[_0x28dedb(0x45b)]=this[_0x28dedb(0x45b)]||!!writer,this[_0x28dedb(0x2c5)]=this[_0x28dedb(0x2c5)]||!!reader,this[_0x28dedb(0x3f1)]=kind||this[_0x28dedb(0x3f1)]||(_0x1ae9ed[_0x28dedb(0x474)]?_0x28dedb(0x1bb):_0x28dedb(0x46a)),this[_0x28dedb(0x3be)]=supervisorKey??this[_0x28dedb(0x3be)],this[_0x28dedb(0x1dd)]=listenAddr??this[_0x28dedb(0x1dd)],this[_0x28dedb(0x24d)](),await this[_0x28dedb(0x47c)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x4571fb=await this[_0x28dedb(0x24e)][_0x28dedb(0x2d6)](_0x52e0ec,{'sync':![],'durability':_0x28dedb(0x42f)});if(!_0x4571fb['hasType'](_0x1e47a3))await _0x4571fb['registerType'](_0x1e47a3);this['_statusEnv']=_0x4571fb;}return this[_0x28dedb(0x4dd)];}['_nodeDb'](){const _0x5db4c2=_0x37ca6f;return this[_0x5db4c2(0x33d)]!==this[_0x5db4c2(0x4dd)]&&(this[_0x5db4c2(0x33d)]=this['_statusEnv'],this[_0x5db4c2(0x3ea)]=this[_0x5db4c2(0x4dd)]['_getType'](_0x1e47a3)[_0x5db4c2(0x3ff)]),this[_0x5db4c2(0x3ea)];}['_putRowAsync'](_0x3ab693){const _0x3d24cf=_0x37ca6f;if(_0x2975c1)return this[_0x3d24cf(0x4e8)]()[_0x3d24cf(0x4b7)](_0x3ab693['nodeKey'],_0x3ab693,0x1);const _0x1ace5a=this[_0x3d24cf(0x4e8)]()[_0x3d24cf(0x3fa)](_0x3ab693[_0x3d24cf(0x577)],_0x3ab693,0x1);if(_0x1ace5a&&typeof _0x1ace5a['then']===_0x3d24cf(0x28d))_0x1ace5a[_0x3d24cf(0x4a4)](undefined,()=>{});return _0x1ace5a;}[_0x37ca6f(0x128)](_0x5090b3){const _0x16427d=_0x37ca6f;return this[_0x16427d(0x4e8)]()[_0x16427d(0x4b7)](_0x5090b3['nodeKey'],_0x5090b3,0x1);}[_0x37ca6f(0x4b0)](_0xa00e78){const _0x46bb2e=_0x37ca6f;if(_0x2975c1)try{return this[_0x46bb2e(0x4e8)]()[_0x46bb2e(0x217)](_0xa00e78);}catch{return![];}const _0x478803=this[_0x46bb2e(0x4e8)]()[_0x46bb2e(0x2cc)](_0xa00e78);if(_0x478803&&typeof _0x478803[_0x46bb2e(0x4a4)]==='function')_0x478803['then'](undefined,()=>{});return _0x478803;}async['putNode'](_0xcda1da){const _0x2e5db2=_0x37ca6f;if(!this[_0x2e5db2(0x4dd)]||!this[_0x2e5db2(0x45b)]||!_0xcda1da?.['nodeKey'])return;return this['_putRowAsync'](_0xcda1da);}async[_0x37ca6f(0x184)](_0x8fd1d3){const _0x3b2736=_0x37ca6f;if(!this['_statusEnv']||!this[_0x3b2736(0x45b)]||!_0x8fd1d3)return;const _0x478101=_0x8fd1d3[_0x3b2736(0x1c0)]('#'),_0x29d231=[];for(const {key:_0xac3121}of this[_0x3b2736(0x4dd)][_0x3b2736(0x268)](_0x1e47a3)){if(_0xac3121===_0x8fd1d3||!_0x478101&&typeof _0xac3121===_0x3b2736(0x3a6)&&_0xac3121[_0x3b2736(0x5a1)](_0x8fd1d3+'#'))_0x29d231['push'](_0xac3121);}for(const _0x2bd760 of _0x29d231){try{this[_0x3b2736(0x4e8)]()['removeSync'](_0x2bd760);}catch{}}}[_0x37ca6f(0x273)](_0x2beb8e){const _0x4f2dbe=_0x37ca6f;if(typeof _0x2beb8e?.[_0x4f2dbe(0x5b1)]!=='number')return![];if(_0x2beb8e['host']!==_0x11bb10['hostname']())return![];if(_0x2beb8e[_0x4f2dbe(0x5b1)]===process[_0x4f2dbe(0x5b1)])return![];if(_0x2beb8e[_0x4f2dbe(0x27c)]!=null&&_0x2beb8e[_0x4f2dbe(0x27c)]<Date[_0x4f2dbe(0x4e7)]()-_0x2255cd)return!![];try{return process['kill'](_0x2beb8e[_0x4f2dbe(0x5b1)],0x0),![];}catch(_0x474686){return _0x474686[_0x4f2dbe(0x3d1)]===_0x4f2dbe(0x3bd);}}[_0x37ca6f(0x13e)](){const _0x408994=_0x37ca6f;if(!this['_statusEnv'])return[];try{this[_0x408994(0x4dd)]['db']?.['resetReadTxn']?.();}catch{}const _0x2fd301=Date[_0x408994(0x4e7)](),_0x17c77e=_0x11bb10[_0x408994(0x518)](),_0x3bae3e=[];for(const {value:_0x36421a}of this[_0x408994(0x4dd)][_0x408994(0x268)](_0x1e47a3)){if(!_0x36421a)continue;let _0x24fe9e=null;_0x36421a[_0x408994(0x28a)]===_0x17c77e&&typeof _0x36421a[_0x408994(0x5b1)]===_0x408994(0x4cd)&&(_0x24fe9e=!this[_0x408994(0x273)](_0x36421a));if(_0x24fe9e===![])continue;const _0x327bc8=_0x36421a['expiresAt']==null||_0x36421a[_0x408994(0x27c)]>=_0x2fd301;if(_0x24fe9e===!![]||_0x327bc8)_0x3bae3e['push'](_0x36421a);}return _0x3bae3e;}async['reap'](_0x4072af=0x0){const _0xadacf9=_0x37ca6f;if(!this[_0xadacf9(0x4dd)]||!this[_0xadacf9(0x45b)])return;const _0x3665c3=Date[_0xadacf9(0x4e7)]()-_0x4072af,_0x59d36a=new Set(),_0x2ede2f=[],_0x2ed930=_0x11bb10[_0xadacf9(0x518)](),_0x19a8d2=require$$3[_0xadacf9(0x1ad)];for(const {key:_0x3e6c7d,value:_0x51f5ae}of this['_statusEnv'][_0xadacf9(0x268)](_0x1e47a3)){if(!_0x51f5ae)continue;const _0x50f96f=_0x51f5ae[_0xadacf9(0x28a)]===_0x2ed930&&typeof _0x51f5ae[_0xadacf9(0x5b1)]==='number',_0x538100=_0x50f96f?this[_0xadacf9(0x273)](_0x51f5ae):_0x51f5ae[_0xadacf9(0x27c)]!=null&&_0x51f5ae['expiresAt']<_0x3665c3;if(_0x538100)_0x2ede2f[_0xadacf9(0x402)](_0x3e6c7d);else{_0x59d36a[_0xadacf9(0x136)](_0x36a204(_0x51f5ae)??_0x3e6c7d);if(_0x51f5ae['version']&&_0x51f5ae[_0xadacf9(0x1ad)]!==_0x19a8d2){if(!this[_0xadacf9(0x575)])this[_0xadacf9(0x575)]=new Set();!this[_0xadacf9(0x575)][_0xadacf9(0x5b3)](_0x51f5ae[_0xadacf9(0x1ad)])&&(this[_0xadacf9(0x575)][_0xadacf9(0x136)](_0x51f5ae['version']),this['okdb'][_0xadacf9(0x481)]?.[_0xadacf9(0x414)]?.(_0xadacf9(0x1ab)+(_0x51f5ae[_0xadacf9(0x5b1)]??'?')+_0xadacf9(0x137)+_0x51f5ae[_0xadacf9(0x1ad)]+_0xadacf9(0x308)+_0x19a8d2+_0xadacf9(0x22a)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0xadacf9(0x239)}));}}}for(const _0xf9bf09 of _0x2ede2f)this[_0xadacf9(0x4b0)](_0xf9bf09);if(this[_0xadacf9(0x24d)]()){const _0x4fa6bc=[];for(const {key:_0x14a0c4}of this[_0xadacf9(0x484)](_0xadacf9(0x106))){if(!_0x59d36a[_0xadacf9(0x5b3)](_0x14a0c4)){if(_0x2975c1)try{this['_desired'][_0xadacf9(0x217)](_0xadacf9(0x3b9)+_0x14a0c4);}catch{}else _0x4fa6bc[_0xadacf9(0x402)](this[_0xadacf9(0x5c6)][_0xadacf9(0x2cc)](_0xadacf9(0x3b9)+_0x14a0c4));}}if(_0x4fa6bc[_0xadacf9(0x532)])await Promise[_0xadacf9(0x214)](_0x4fa6bc);}}[_0x37ca6f(0x3d7)](_0x3d0818=null){const _0x5ddd83=_0x37ca6f;if(this[_0x5ddd83(0x3da)])return;if(!this['_isWriter']||!this[_0x5ddd83(0x4dd)]){this[_0x5ddd83(0x24e)]?.[_0x5ddd83(0x481)]?.[_0x5ddd83(0x414)]?.(_0x5ddd83(0x1da)+this['_isWriter']+_0x5ddd83(0x4ea)+!!this[_0x5ddd83(0x4dd)]+_0x5ddd83(0x482),{'feature':_0x5ddd83(0x326)});return;}this['_onTick']=_0x3d0818,this[_0x5ddd83(0x547)]=()=>this['_maybePublish']();for(const _0x56504b of _0x27fc17)this[_0x5ddd83(0x24e)][_0x5ddd83(0x447)]['on'](_0x56504b,this[_0x5ddd83(0x547)]);this[_0x5ddd83(0x45c)]();const _0x1400f7=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x447823;this[_0x5ddd83(0x3da)]=setInterval(()=>{const _0x12f3d6=_0x5ddd83;if(this[_0x12f3d6(0x5a3)])try{this[_0x12f3d6(0x5a3)]();}catch{}this['_publishNow'](),this[_0x12f3d6(0x58b)]()['catch'](()=>{});},_0x1400f7);if(this[_0x5ddd83(0x3da)][_0x5ddd83(0x175)])this['_hbTimer'][_0x5ddd83(0x175)]();}['_maybePublish'](){const _0x42365a=_0x37ca6f;if(!this['_isWriter']||!this['_statusEnv'])return;if(Date[_0x42365a(0x4e7)]()-this['_lastPublishAt']<_0x82ed39)return;this['_publishNow']();}[_0x37ca6f(0x45c)](){const _0x3578e5=_0x37ca6f;if(!this['_isWriter']||!this[_0x3578e5(0x4dd)])return;this[_0x3578e5(0x191)]=Date['now']();try{const _0x5b1d56=[this[_0x3578e5(0x1b8)]()];for(const _0x4601c6 of this[_0x3578e5(0x20d)][_0x3578e5(0x4c0)]())_0x5b1d56['push'](this[_0x3578e5(0x18f)](_0x4601c6));const _0x2240b7=_0x4295b5[_0x3578e5(0x112)]?_0x4295b5[_0x3578e5(0x4e7)]():0x0;for(const _0x42f042 of _0x5b1d56){try{this[_0x3578e5(0x128)](_0x42f042),this[_0x3578e5(0x3ab)]=![];}catch(_0x5485ac){!this[_0x3578e5(0x3ab)]&&(this[_0x3578e5(0x3ab)]=!![],this[_0x3578e5(0x24e)]?.['log']?.[_0x3578e5(0x414)]?.(_0x3578e5(0x371)+_0x5485ac['message'],{'feature':'processes'}));}}if(_0x4295b5[_0x3578e5(0x112)])_0x4295b5[_0x3578e5(0x114)](_0x3578e5(0x44e),_0x4295b5['now']()-_0x2240b7,_0x3578e5(0x13a)+_0x5b1d56['length']+_0x3578e5(0x35e));}catch(_0x15eb6f){!this[_0x3578e5(0x3ab)]&&(this[_0x3578e5(0x3ab)]=!![],this['okdb']?.[_0x3578e5(0x481)]?.[_0x3578e5(0x414)]?.(_0x3578e5(0x371)+_0x15eb6f[_0x3578e5(0x51e)],{'feature':_0x3578e5(0x326)}));}}async[_0x37ca6f(0x1d8)](){const _0x3020a9=_0x37ca6f;if(this[_0x3020a9(0x547)]){for(const _0x2de0db of _0x27fc17){try{this[_0x3020a9(0x24e)][_0x3020a9(0x447)][_0x3020a9(0x4e2)](_0x2de0db,this[_0x3020a9(0x547)]);}catch{}}this[_0x3020a9(0x547)]=null;}this[_0x3020a9(0x3da)]&&(clearInterval(this[_0x3020a9(0x3da)]),this['_hbTimer']=null);try{if(this[_0x3020a9(0x4dd)]&&this[_0x3020a9(0x45b)])await this['removeNode'](this[_0x3020a9(0x4bb)]);}catch{}}async[_0x37ca6f(0x2ea)](){const _0x35204b=_0x37ca6f;if(!this[_0x35204b(0x4dd)]||!this[_0x35204b(0x45b)])return;try{await this[_0x35204b(0x184)](this[_0x35204b(0x4bb)]);}catch{}try{const _0x2ef713=[];for(const {value:_0x1b6d14}of this['_statusEnv'][_0x35204b(0x268)](_0x1e47a3)){if(_0x1b6d14?.[_0x35204b(0x347)]===process[_0x35204b(0x5b1)]&&_0x1b6d14[_0x35204b(0x577)])_0x2ef713[_0x35204b(0x402)](_0x1b6d14[_0x35204b(0x577)]);}for(const _0x19c70f of _0x2ef713){try{await this['removeNode'](_0x19c70f);}catch{}}}catch{}}async[_0x37ca6f(0x15b)](){const _0x25967d=_0x37ca6f;return this[_0x25967d(0x52e)](this[_0x25967d(0x1b8)]());}async[_0x37ca6f(0x549)](_0x2a5bb0){const _0x8e0b41=_0x37ca6f;if(!this['_statusEnv']||!this[_0x8e0b41(0x45b)])return;return this[_0x8e0b41(0x52e)](this[_0x8e0b41(0x18f)](_0x2a5bb0));}[_0x37ca6f(0x18f)]({pid:_0x4688ef,startedAt:_0x4536cb,kind:_0x2f7238,supervisorKey:_0x22d351,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x37ca6f(0x2ac),meta:meta=null,stats:stats=null}){const _0xebd85a=_0x37ca6f,_0x5376c8=Date[_0xebd85a(0x4e7)](),_0x13c47a=_0x2fef74(_0x4688ef,_0x4536cb);return{'nodeKey':_0x58289f(_0x13c47a,'0'),'processKey':_0x13c47a,'instanceId':'0','pid':_0x4688ef,'startedAt':_0x4536cb,'ppid':process[_0xebd85a(0x5b1)],'host':_0x11bb10[_0xebd85a(0x518)](),'supervisorKey':_0x22d351,'slot':slot,'slotKey':slotKey,'kind':_0x2f7238,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x5376c8,'expiresAt':_0x5376c8+_0x5b5f84,'caps':this[_0xebd85a(0x1cc)](_0x2f7238,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x37ca6f(0x13f)](_0x5a6a0c){const _0x312075=_0x37ca6f;if(!_0x5a6a0c?.[_0x312075(0x5b1)])return null;const _0x31bcb6=_0x2fef74(_0x5a6a0c[_0x312075(0x5b1)],_0x5a6a0c[_0x312075(0x2fe)]);this[_0x312075(0x20d)][_0x312075(0x578)](_0x31bcb6,{..._0x5a6a0c,'supervisorKey':_0x5a6a0c[_0x312075(0x284)]??this[_0x312075(0x480)]});if(this['_isWriter'])await this[_0x312075(0x549)](this[_0x312075(0x20d)][_0x312075(0x1d0)](_0x31bcb6))[_0x312075(0x51d)]?.(()=>{});return _0x31bcb6;}[_0x37ca6f(0x108)](_0x17d698){if(!_0x17d698)return;return this['_children']['delete'](_0x17d698),this['removeNode'](_0x17d698);}[_0x37ca6f(0x343)](){const _0x730200=_0x37ca6f,_0x50aab7=Date[_0x730200(0x4e7)](),_0x5e2b5e=process['cpuUsage'](),_0x12bd97=(_0x50aab7-this['_lastCpuAt'])*0x3e8;if(_0x12bd97>=0x3d090){const _0x319e78=_0x5e2b5e[_0x730200(0x247)]-this['_lastCpuUsage'][_0x730200(0x247)]+(_0x5e2b5e[_0x730200(0x146)]-this[_0x730200(0xfd)][_0x730200(0x146)]),_0x4c9adc=_0x11bb10[_0x730200(0x116)]()[_0x730200(0x532)]||0x1;this[_0x730200(0x3fe)]=Math[_0x730200(0x2ba)](0x64,Math[_0x730200(0x3d8)](_0x319e78/(_0x12bd97*_0x4c9adc)*0x64)),this[_0x730200(0x3a2)]=Math[_0x730200(0x3d8)](_0x12bd97/0x3e8),this[_0x730200(0xfd)]=_0x5e2b5e,this[_0x730200(0x2a5)]=_0x50aab7;}const _0x5dfa2c=process[_0x730200(0x4be)](),_0x5a4cf4=this[_0x730200(0x1a7)][_0x730200(0x5cb)];let _0x2bc091=0x0;if(_0x5a4cf4>0x0){const _0x33e58d=[this[_0x730200(0x24e)],...this['okdb'][_0x730200(0x18e)]?.[_0x730200(0x4c0)]?.()??[]];for(const _0x4c21b5 of _0x33e58d){const _0x2c8cc6=_0x4c21b5['functions']?.[_0x730200(0x561)];if(_0x2c8cc6)_0x2bc091+=_0x2c8cc6['liveThreadStats']['busy'];}}let _0x472659=null;const _0x429ea5=_0x5a4cf4;if(_0x429ea5>0x0){let _0x1a211d=0x0;for(const _0x3c6c8d of this[_0x730200(0x1a7)][_0x730200(0x4c0)]())_0x1a211d+=_0x3c6c8d[_0x730200(0x596)]||0x0;_0x472659={'count':_0x429ea5,'heapUsed':_0x1a211d,'sandbox':_0x5a4cf4,'busy':_0x2bc091};}return{'rss':_0x5dfa2c['rss'],'heapUsed':_0x5dfa2c[_0x730200(0x596)],'heapTotal':_0x5dfa2c[_0x730200(0x3de)],'external':_0x5dfa2c[_0x730200(0x43c)],'cpuPct':this[_0x730200(0x3fe)],'cpuWindowMs':this[_0x730200(0x3a2)]??null,'threads':_0x472659,'at':_0x50aab7};}['reportThreadStats'](_0xb8c28f,_0x11f36f){const _0x2c4b38=_0x37ca6f;if(!_0xb8c28f||!_0x11f36f)return;this['_threadStats'][_0x2c4b38(0x578)](_0xb8c28f,_0x11f36f);}[_0x37ca6f(0x4a3)](_0x27107c){const _0x5e0a03=_0x37ca6f;this['_threadStats'][_0x5e0a03(0x4d9)](_0x27107c);}[_0x37ca6f(0x5a2)](_0x2c658d,_0x59137e,_0x36d174=undefined){const _0x197b13=_0x37ca6f,_0x465fd8=this['_children']['get'](_0x2c658d);if(!_0x465fd8||!_0x59137e)return;if(_0x36d174!==undefined)_0x465fd8[_0x197b13(0x32d)]=_0x36d174;_0x465fd8[_0x197b13(0x1b9)]={'rss':_0x59137e['rss']??null,'heapUsed':_0x59137e['heapUsed']??null,'heapTotal':_0x59137e['heapTotal']??null,'external':_0x59137e['external']??null,'cpuPct':_0x59137e[_0x197b13(0x469)]??null,'cpuWindowMs':_0x59137e[_0x197b13(0x361)]??null,'threads':_0x59137e[_0x197b13(0x431)]??null,'claims':_0x59137e[_0x197b13(0x462)]??null,'envsOpen':_0x59137e[_0x197b13(0x1f1)]??null,'at':Date[_0x197b13(0x4e7)]()};}[_0x37ca6f(0x1b8)](){const _0x2105f8=_0x37ca6f,_0xa69048=Date['now'](),_0x86193b=this['okdb']['_role']||{},_0x12fc8c=this[_0x2105f8(0x3f1)]||_0x2105f8(0x46a);return{'nodeKey':this[_0x2105f8(0x4bb)],'processKey':this['_selfKey'],'instanceId':this['_instanceId'],'pid':process[_0x2105f8(0x5b1)],'startedAt':this['_processStartedAt'],'instanceStartedAt':this[_0x2105f8(0x2e5)],'ppid':typeof process[_0x2105f8(0x347)]===_0x2105f8(0x4cd)?process[_0x2105f8(0x347)]:null,'host':_0x11bb10[_0x2105f8(0x518)](),'supervisorKey':this[_0x2105f8(0x3be)]??null,'version':require$$3[_0x2105f8(0x1ad)],'kind':_0x12fc8c,'role':{'engines':!!_0x86193b[_0x2105f8(0x2cf)],'processors':!!_0x86193b[_0x2105f8(0x5b7)],'compaction':_0x86193b[_0x2105f8(0x35b)],'http':_0x86193b[_0x2105f8(0x37d)]},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0xa69048,'expiresAt':_0xa69048+_0x5b5f84,'caps':this['_caps'](_0x12fc8c,_0x86193b),'lifecycle':{'state':_0x2105f8(0x2ac),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x86193b[_0x2105f8(0x5b7)]?this[_0x2105f8(0x1fe)]():null,'engines':_0x86193b['engines']?[...this[_0x2105f8(0x24e)][_0x2105f8(0x2e7)]??[]]:null,'singletonClaims':this[_0x2105f8(0x449)](),'stats':this[_0x2105f8(0x343)](),'writers':this[_0x2105f8(0x545)]()};}[_0x37ca6f(0x545)](){const _0x4ce514=_0x37ca6f,_0x1f6373={};try{for(const [_0xf5fb74,_0x4901da]of this[_0x4ce514(0x24e)][_0x4ce514(0x18e)]){try{const _0x279dbe=_0x4901da[_0x4ce514(0x2e8)]?.();if(!_0x279dbe)continue;if(!_0x279dbe[_0x4ce514(0x435)]&&!_0x279dbe['committed']&&!(_0x279dbe[_0x4ce514(0x2b1)]??0x0)&&!_0x279dbe['draining'])continue;_0x1f6373[_0xf5fb74]={'depth':_0x279dbe[_0x4ce514(0x435)],'oldestPendingMs':_0x279dbe['oldestPendingMs'],'committed':_0x279dbe[_0x4ce514(0x53c)],'commitsPerSec':_0x279dbe[_0x4ce514(0x167)],'commitP99Ms':_0x279dbe[_0x4ce514(0x4a5)],'parkedNow':_0x279dbe['parkedNow']??0x0,'draining':!!_0x279dbe[_0x4ce514(0x296)]};}catch{}}}catch{}return Object[_0x4ce514(0x157)](_0x1f6373)[_0x4ce514(0x532)]?_0x1f6373:null;}[_0x37ca6f(0x449)](){const _0x42228a=_0x37ca6f,_0xdb87e8=process[_0x42228a(0x5b1)],_0x192403=Date['now'](),_0xc75e61=_0x52afec=>{const _0x4944f0=_0x42228a;if(!_0x52afec)return[];const _0xc9d988=[];try{for(const {id:_0xf94d62,entry:_0x29536c}of _0x52afec[_0x4944f0(0x521)]()){if(_0x29536c?.[_0x4944f0(0x2d5)]?.[_0x4944f0(0x5b1)]!==_0xdb87e8)continue;const _0x5c7338=_0x29536c[_0x4944f0(0x22b)]??_0x29536c['acquiredAt']??0x0;if(_0x5c7338+(_0x29536c[_0x4944f0(0x3fc)]??0x0)<_0x192403)continue;_0xc9d988['push'](_0xf94d62);}}catch{}return _0xc9d988;},_0x201af0=_0xc75e61(this[_0x42228a(0x5a8)]('compact')),_0x436b5f=_0xc75e61(this[_0x42228a(0x5a8)]('sync'));if(!_0x201af0[_0x42228a(0x532)]&&!_0x436b5f[_0x42228a(0x532)])return null;return{'compact':_0x201af0,'replicate':_0x436b5f};}[_0x37ca6f(0x5a8)](_0x438f92){const _0xd571d3=_0x37ca6f;if(!this[_0xd571d3(0x24e)]?.[_0xd571d3(0x58f)])return null;if(!this['_singletonLocks'])this['_singletonLocks']=new Map();let _0x23e9eb=this[_0xd571d3(0x421)][_0xd571d3(0x1d0)](_0x438f92);if(!_0x23e9eb)try{_0x23e9eb=new _0x56cafc(this[_0xd571d3(0x24e)][_0xd571d3(0x58f)],{'namespace':_0x438f92}),this[_0xd571d3(0x421)][_0xd571d3(0x578)](_0x438f92,_0x23e9eb);}catch{return null;}return _0x23e9eb;}[_0x37ca6f(0x1fe)](){const _0x3c7bec=_0x37ca6f,_0x304a00=[];try{for(const [_0x50ab2d,_0x2f5edc]of this['okdb'][_0x3c7bec(0x18e)]){if(_0x50ab2d[_0x3c7bec(0x5a1)]('~'))continue;for(const _0xe75e08 of _0x2f5edc[_0x3c7bec(0x337)][_0x3c7bec(0x4d1)]())_0x304a00[_0x3c7bec(0x402)]({..._0xe75e08,'env':_0x50ab2d});}}catch{}return{'participate':this[_0x3c7bec(0x24e)][_0x3c7bec(0x5b7)]?.[_0x3c7bec(0x1a2)]??![],'processors':_0x304a00};}[_0x37ca6f(0x24d)](){const _0x2df774=_0x37ca6f;if(this[_0x2df774(0x5c6)])return!![];const _0x3727ea=this['okdb'][_0x2df774(0x58f)];if(!_0x3727ea)return![];return this['_desired']=_0x3727ea[_0x2df774(0x494)](_0x44c053,{'dupSort':![]}),this[_0x2df774(0x3d4)]=_0x3727ea[_0x2df774(0x494)](_0x3e119b,{'dupSort':![]}),!![];}async[_0x37ca6f(0x47c)](){const _0x4cca95=_0x37ca6f;if(!this['_ensureDesired']())return;const _0x50e538=_0x4cca95(0x1c9),_0x3673b1=0x1,_0x1c396c=this[_0x4cca95(0x5c6)][_0x4cca95(0x1d0)](_0x50e538)??0x0;if(_0x1c396c>=_0x3673b1)return;const _0x1d14ac=_0x16f665=>{const _0x3dfb4d=_0x4cca95;if(_0x16f665==='worker')return'single';if(_0x16f665===_0x3dfb4d(0x463))return _0x3dfb4d(0x20c);return _0x16f665;};await this[_0x4cca95(0x24e)]['_systemEnv'][_0x4cca95(0x3e2)]['transaction'](()=>{const _0x480343=_0x4cca95;for(const _0x5bb72d of['procmode/',_0x480343(0x25b)]){for(const {key:_0x2514d0,value:_0x43111c}of this[_0x480343(0x5c6)][_0x480343(0x268)]({'start':_0x5bb72d,'end':_0x5bb72d+'\xff'})){if(typeof _0x2514d0!==_0x480343(0x3a6)||!_0x2514d0[_0x480343(0x5a1)](_0x5bb72d))break;const _0xcb8175=_0x1d14ac(_0x43111c['mode']);if(_0xcb8175!==_0x43111c['mode'])this[_0x480343(0x5c6)][_0x480343(0x3fa)](_0x2514d0,{..._0x43111c,'mode':_0xcb8175});}}this['_desired'][_0x480343(0x3fa)](_0x50e538,_0x3673b1);});}['hasDesired'](){return!!this['_desired'];}['getDesired'](_0xc7d487,_0x175532){const _0x10cc42=_0x37ca6f;if(!this['_ensureDesired']())return null;const _0x180c7e=_0xc7d487+'/'+_0x175532;return this[_0x10cc42(0x2ef)](),this[_0x10cc42(0x379)]['get'](_0x180c7e)??this[_0x10cc42(0x5c6)][_0x10cc42(0x1d0)](_0x180c7e)??null;}[_0x37ca6f(0x2ef)](){const _0x8e2143=_0x37ca6f;if(!_0x2975c1)return;try{this['okdb'][_0x8e2143(0x24b)]?.['db']?.[_0x8e2143(0x42c)]?.();}catch{}}async['setDesired'](_0x48dfbc,_0xad01d3,_0x4b1306){const _0x2a9f92=_0x37ca6f;if(!this[_0x2a9f92(0x24d)]())return null;const _0x1c8577=_0x48dfbc+'/'+_0xad01d3;this[_0x2a9f92(0x2ef)]();const _0x116ce3=this[_0x2a9f92(0x379)][_0x2a9f92(0x1d0)](_0x1c8577)??this[_0x2a9f92(0x5c6)]['get'](_0x1c8577)??{'version':0x0},_0x30901e=(_0x116ce3['version']||0x0)+0x1,_0x8b9088={..._0x116ce3,..._0x4b1306,'version':_0x30901e,'updatedAt':Date[_0x2a9f92(0x4e7)]()};this['_desiredOverlay']['set'](_0x1c8577,_0x8b9088);try{await this['okdb'][_0x2a9f92(0x24b)][_0x2a9f92(0x3e2)]['transaction'](()=>{const _0x4b6f57=_0x2a9f92;this[_0x4b6f57(0x5c6)][_0x4b6f57(0x3fa)](_0x1c8577,_0x8b9088);});}finally{if(this[_0x2a9f92(0x379)][_0x2a9f92(0x1d0)](_0x1c8577)===_0x8b9088)this['_desiredOverlay'][_0x2a9f92(0x4d9)](_0x1c8577);}return _0x30901e;}[_0x37ca6f(0x484)](_0x49c75e){const _0xf8751d=_0x37ca6f;if(!this['_ensureDesired']())return[];this['_refreshDesiredSnapshot']();const _0x51d1ac=_0x49c75e+'/',_0x2b5255=[];for(const {key:_0x47d2b5,value:_0x1aed9c}of this[_0xf8751d(0x5c6)][_0xf8751d(0x268)]({'start':_0x51d1ac,'end':_0x51d1ac+'\xff'})){if(typeof _0x47d2b5!=='string'||!_0x47d2b5[_0xf8751d(0x5a1)](_0x51d1ac))break;_0x2b5255[_0xf8751d(0x402)]({'key':_0x47d2b5['slice'](_0x51d1ac[_0xf8751d(0x532)]),'value':_0x1aed9c});}return _0x2b5255;}['getCmd'](_0x476f3c){const _0x32eed6=_0x37ca6f;if(!this[_0x32eed6(0x24d)]())return null;return this[_0x32eed6(0x3d4)][_0x32eed6(0x1d0)](_0x476f3c)??null;}async[_0x37ca6f(0x4f9)](_0x4d2253,_0x29d47c,_0x1dc66c={}){const _0x36988e=_0x37ca6f;if(!this[_0x36988e(0x24d)]())return null;let _0x11e2b7;return await this[_0x36988e(0x24e)]['_systemEnv'][_0x36988e(0x3e2)][_0x36988e(0x26b)](()=>{const _0x13b121=_0x36988e,_0x24716c=this['_cmd']['get'](_0x4d2253)||{'epoch':0x0};_0x11e2b7=(_0x24716c['epoch']||0x0)+0x1,this[_0x13b121(0x3d4)][_0x13b121(0x3fa)](_0x4d2253,{..._0x24716c,..._0x1dc66c,'cmd':_0x29d47c,'epoch':_0x11e2b7,'updatedAt':Date['now']()});}),_0x11e2b7;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1dc7e5,'nodeKey':_0x2fef74,'logicalKey':_0x295a8b,'slotKey':_0x3337c4,'PROCESS_ENV':_0x52e0ec,'NODE_TYPE':_0x1e47a3},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x10c9de=_0x1cf947;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x33bc08=require$$0$6,{EVENTS:_0x39aacd,CHANGE_ACTIONS:_0x2cc0c1}=requireOkdbEnums(),{LOOP:_0x8ed130}=requireOkdbLoopMonitor(),_0x3b8ab8=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x1e80fd=0x5,_0x2015be=0x2710;class _0x2f7309 extends _0x33bc08{constructor(_0x4acf99,_0xa70c03={}){const _0x202b89=_0x196a;super(),this[_0x202b89(0x24e)]=_0x4acf99,this[_0x202b89(0x1b5)]=_0xa70c03[_0x202b89(0x51f)]??_0x3b8ab8,this['_flushDebounce']=_0xa70c03['flushDebounce']??_0x1e80fd,this[_0x202b89(0x4f5)]=_0xa70c03[_0x202b89(0x21c)]??_0x2015be,this[_0x202b89(0x52a)]=![],this[_0x202b89(0x527)]=new Map(),this[_0x202b89(0x1a3)]=new Map(),this[_0x202b89(0x563)]=new Map(),this[_0x202b89(0x53d)]=null,this['_draining']=![],this[_0x202b89(0x16f)]=new Set(),this[_0x202b89(0x41e)]=_0x2324bb=>this['_handleInProcess'](_0x2324bb),this['_onPoke']=_0x134491=>this[_0x202b89(0x1e6)](_0x134491),this[_0x202b89(0x4d6)]=()=>this[_0x202b89(0x1ba)]();}[_0x10c9de(0x34a)](){const _0x5e51e3=_0x10c9de;if(this[_0x5e51e3(0x52a)])return;this[_0x5e51e3(0x52a)]=!![];for(const [_0x4f980f,_0x58d5b3]of this['okdb'][_0x5e51e3(0x18e)]){if(_0x4f980f[_0x5e51e3(0x5a1)]('~'))continue;try{_0x58d5b3[_0x5e51e3(0x1be)]();}catch{}}for(const [_0x5a3dd5,_0x58a441]of this['okdb'][_0x5e51e3(0x18e)]){if(_0x5a3dd5[_0x5e51e3(0x5a1)]('~'))continue;try{this[_0x5e51e3(0x1a3)][_0x5e51e3(0x578)](_0x5a3dd5,_0x58a441[_0x5e51e3(0x2d0)]()||0x0);}catch{}}const {events:_0x4f75ab}=this[_0x5e51e3(0x24e)];_0x4f75ab['on'](_0x39aacd[_0x5e51e3(0x251)],this[_0x5e51e3(0x41e)]),_0x4f75ab['on'](_0x39aacd['ITEM_UPDATE'],this['_onItem']),_0x4f75ab['on'](_0x39aacd[_0x5e51e3(0x206)],this[_0x5e51e3(0x41e)]),_0x4f75ab['on'](_0x39aacd[_0x5e51e3(0x125)],this[_0x5e51e3(0x363)]),_0x4f75ab[_0x5e51e3(0x4ce)](_0x39aacd['SYSTEM_STOPPED'],this[_0x5e51e3(0x4d6)]);}['stop'](){const _0x3e51a1=_0x10c9de;if(!this[_0x3e51a1(0x52a)])return;this[_0x3e51a1(0x52a)]=![];const {events:_0x57151a}=this[_0x3e51a1(0x24e)];_0x57151a[_0x3e51a1(0x4e2)](_0x39aacd[_0x3e51a1(0x251)],this[_0x3e51a1(0x41e)]),_0x57151a[_0x3e51a1(0x4e2)](_0x39aacd[_0x3e51a1(0x454)],this[_0x3e51a1(0x41e)]),_0x57151a['off'](_0x39aacd[_0x3e51a1(0x206)],this['_onItem']),_0x57151a[_0x3e51a1(0x4e2)](_0x39aacd[_0x3e51a1(0x125)],this[_0x3e51a1(0x363)]);try{_0x57151a[_0x3e51a1(0x4e2)](_0x39aacd['SYSTEM_STOPPED'],this[_0x3e51a1(0x4d6)]);}catch{}this[_0x3e51a1(0x53d)]&&(clearTimeout(this[_0x3e51a1(0x53d)]),this[_0x3e51a1(0x53d)]=null),this['_pending'][_0x3e51a1(0x1a1)](),this[_0x3e51a1(0x527)]['clear'](),this['_baselines']['clear'](),this['_seen'][_0x3e51a1(0x1a1)]();}[_0x10c9de(0x2a6)](_0x133b57,_0x33d1f7,_0x350dfd,_0x15193c){return _0x133b57+'\x00'+_0x33d1f7+'\x00'+_0x350dfd+'\x00'+_0x15193c;}[_0x10c9de(0x3b7)](_0x3660f4,_0x1ceae4,_0x396bc4,_0x983995){const _0x433563=_0x10c9de,_0x2ff053=this[_0x433563(0x2a6)](_0x3660f4,_0x1ceae4,_0x396bc4,_0x983995);if(this['_seen'][_0x433563(0x5b3)](_0x2ff053))return![];this[_0x433563(0x16f)][_0x433563(0x136)](_0x2ff053);if(this['_seen']['size']>this[_0x433563(0x4f5)]){const _0x4b415e=this[_0x433563(0x16f)][_0x433563(0x4c0)]()[_0x433563(0x56e)]()[_0x433563(0x155)];this['_seen'][_0x433563(0x4d9)](_0x4b415e);}return!![];}[_0x10c9de(0x49f)](_0x2b6c35){const _0x3ade04=_0x10c9de;if(!this['_started']||!_0x2b6c35)return;const {env:_0x3b24ed,type:_0x1a9f26,key:_0x393bc1,clock:_0x26b43f,origin:_0x28554f,action:_0x31705b,newValue:_0x4d8862,oldValue:_0x2ccbaf}=_0x2b6c35;if(_0x3b24ed==null||_0x1a9f26==null||_0x393bc1==null)return;if(typeof _0x3b24ed===_0x3ade04(0x3a6)&&_0x3b24ed[_0x3ade04(0x5a1)]('~'))return;if(typeof _0x1a9f26===_0x3ade04(0x3a6)&&_0x1a9f26[_0x3ade04(0x5a1)]('~'))return;if(!this[_0x3ade04(0x3b7)](_0x3b24ed,_0x1a9f26,_0x393bc1,_0x26b43f))return;const _0x3fe292=_0x31705b===_0x2cc0c1[_0x3ade04(0x129)]?_0x3ade04(0x2cc):_0x3ade04(0x3fa);this['emit'](_0x3ade04(0x3c9),{'env':_0x3b24ed,'type':_0x1a9f26,'key':_0x393bc1,'op':_0x3fe292,'clock':_0x26b43f,'origin':_0x28554f,'value':_0x3fe292==='remove'?null:_0x4d8862,'prevValue':_0x2ccbaf});}[_0x10c9de(0x1e6)](_0x2c2bc9){const _0x3041ff=_0x10c9de;if(!this[_0x3041ff(0x52a)])return;if(!_0x2c2bc9||typeof _0x2c2bc9['env']!==_0x3041ff(0x3a6)||typeof _0x2c2bc9[_0x3041ff(0x446)]!=='string')return;const {env:_0x47cea7,type:_0x5bcb74}=_0x2c2bc9;if(_0x47cea7[_0x3041ff(0x5a1)]('~')||_0x5bcb74[_0x3041ff(0x5a1)]('~'))return;this['_pending'][_0x3041ff(0x578)](_0x47cea7+'\x00'+_0x5bcb74,{'env':_0x47cea7,'type':_0x5bcb74}),this['_scheduleFlush']();}[_0x10c9de(0x19e)](){const _0x466122=_0x10c9de;if(this['_flushTimer'])return;const _0x3a3a67=()=>{const _0x317645=_0x196a;this['_flushTimer']=null,this[_0x317645(0x23d)]()[_0x317645(0x51d)](()=>{});};this[_0x466122(0x53d)]=setTimeout(_0x3a3a67,this[_0x466122(0x562)]>0x0?this['_flushDebounce']:0x0);}async[_0x10c9de(0x23d)](){const _0x18c7e3=_0x10c9de;if(this['_draining']){this[_0x18c7e3(0x19e)]();return;}this[_0x18c7e3(0x3a7)]=!![];try{const _0x3f0e8f=[...this[_0x18c7e3(0x563)]['values']()];this[_0x18c7e3(0x563)][_0x18c7e3(0x1a1)]();let _0x57bdb8=![];for(const {env:_0xb34a45,type:_0x5346e3}of _0x3f0e8f){try{const _0x16c45f=await this[_0x18c7e3(0x4f1)](_0xb34a45,_0x5346e3);if(_0x16c45f)_0x57bdb8=!![];}catch{this['_pending']['set'](_0xb34a45+'\x00'+_0x5346e3,{'env':_0xb34a45,'type':_0x5346e3}),_0x57bdb8=!![];}}if(_0x57bdb8||this[_0x18c7e3(0x563)][_0x18c7e3(0x5cb)]>0x0)this[_0x18c7e3(0x19e)]();}finally{this[_0x18c7e3(0x3a7)]=![];}}async['_drainOne'](_0x57527d,_0x1391c8){const _0xcf6163=_0x10c9de,_0x2e6766=await this[_0xcf6163(0x24e)][_0xcf6163(0x25a)](_0x57527d),_0x55ea05=_0x57527d+'\x00'+_0x1391c8;!this[_0xcf6163(0x527)][_0xcf6163(0x5b3)](_0x55ea05)&&(!this[_0xcf6163(0x1a3)][_0xcf6163(0x5b3)](_0x57527d)&&(_0x2e6766[_0xcf6163(0x1be)](),this[_0xcf6163(0x1a3)][_0xcf6163(0x578)](_0x57527d,_0x2e6766[_0xcf6163(0x2d0)]()||0x0)),this[_0xcf6163(0x527)]['set'](_0x55ea05,this[_0xcf6163(0x1a3)][_0xcf6163(0x1d0)](_0x57527d)));const _0x3b667c=this[_0xcf6163(0x527)][_0xcf6163(0x1d0)](_0x55ea05),_0x583264=_0x2e6766[_0xcf6163(0x2d0)](_0x1391c8)||0x0;if(_0x583264<=_0x3b667c)return![];const _0x25c491=_0x3b667c+this[_0xcf6163(0x1b5)],_0x22e01a=Math['min'](_0x583264,_0x25c491),_0x4c1a09=_0x8ed130[_0xcf6163(0x112)]?_0x8ed130[_0xcf6163(0x4e7)]():0x0,_0x4930cc=Array[_0xcf6163(0x424)](_0x2e6766[_0xcf6163(0x10c)](_0x1391c8,_0x3b667c+0x1,_0x22e01a));let _0x31d77a=_0x3b667c;for(const _0x27cd1d of _0x4930cc){const {clock:_0x16cfe8,key:_0x416039,action:_0x3010e4,origin:_0x7e1eee}=_0x27cd1d;if(_0x16cfe8>_0x31d77a)_0x31d77a=_0x16cfe8;if(_0x416039==null)continue;if(!this[_0xcf6163(0x3b7)](_0x57527d,_0x1391c8,_0x416039,_0x16cfe8))continue;let _0x81d21e,_0x12b4ac;if(_0x3010e4===_0x2cc0c1[_0xcf6163(0x129)])_0x81d21e=_0xcf6163(0x2cc),_0x12b4ac=null;else{const _0x4a507f=_0x2e6766[_0xcf6163(0x1d0)](_0x1391c8,_0x416039);_0x4a507f==null?(_0x81d21e='remove',_0x12b4ac=null):(_0x81d21e=_0xcf6163(0x3fa),_0x12b4ac=_0x4a507f);}this[_0xcf6163(0x5be)](_0xcf6163(0x3c9),{'env':_0x57527d,'type':_0x1391c8,'key':_0x416039,'op':_0x81d21e,'clock':_0x16cfe8,'origin':_0x7e1eee,'value':_0x12b4ac});}if(_0x8ed130[_0xcf6163(0x112)])_0x8ed130[_0xcf6163(0x114)]('feed:'+_0x57527d+':'+_0x1391c8,_0x8ed130[_0xcf6163(0x4e7)]()-_0x4c1a09,'n='+_0x4930cc[_0xcf6163(0x532)]);return this['_cursors'][_0xcf6163(0x578)](_0x55ea05,Math['max'](_0x31d77a,_0x22e01a)),_0x2e6766[_0xcf6163(0x2d0)](_0x1391c8)>_0x22e01a;}[_0x10c9de(0x437)](){const _0x35a8d2=_0x10c9de;return{'started':this['_started'],'quantum':this[_0x35a8d2(0x1b5)],'flushDebounce':this[_0x35a8d2(0x562)],'cursors':Object[_0x35a8d2(0x31d)]([...this[_0x35a8d2(0x527)][_0x35a8d2(0x530)]()][_0x35a8d2(0x56a)](([_0x56b52a,_0x4c6785])=>[_0x56b52a[_0x35a8d2(0x19c)]('\x00',':'),_0x4c6785])),'pending':this['_pending'][_0x35a8d2(0x5cb)],'seen':this[_0x35a8d2(0x16f)][_0x35a8d2(0x5cb)]};}}return _0x2f7309[_0x10c9de(0x3db)]=_0x3b8ab8,okdbChangefeed={'OKDBChangefeed':_0x2f7309},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0xdf3826=_0x1cf947;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x45186d=require$$1$2,_0x3cb6b3=require$$1,{EVENTS:_0xc16392}=requireOkdbEnums(),_0xe126e7=require$$0,{slotKey:_0x2b7fb9}=requireOkdbProcessRegistry(),_0x27ade5=0xfa,_0x329b8d=0xfa0,_0x3397db=0x5,_0x52e67a=0x2710,_0x22c1f0=0xbb8,_0x5d9d26=0x7d0,_0x1a17d7=_0xdf3826(0x1d2),_0x64910d=_0xdf3826(0x369),_0x384f96=_0xdf3826(0x481),_0x352ea1=_0xdf3826(0x1b9),_0x5f4f13=[_0xc16392[_0xdf3826(0x515)],_0xc16392[_0xdf3826(0x51c)],_0xc16392['FTS_DROP'],_0xc16392[_0xdf3826(0x2c2)],_0xc16392[_0xdf3826(0x29e)],_0xc16392[_0xdf3826(0x14f)],_0xc16392[_0xdf3826(0x19d)],_0xc16392[_0xdf3826(0x22d)],_0xdf3826(0x2a3),_0xdf3826(0x2f7),_0xdf3826(0x29d),'processor:paused',_0xdf3826(0x2cb),_0xdf3826(0x48b)],_0x5de1af=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x4e7bb7({workers:_0x40aa88,makeOkdb:_0x12e87b,port:_0x278d29,primaryOkdb:_0x5e49bb,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x44b2f1=_0xdf3826;if(_0x45186d[_0x44b2f1(0x37a)])return childEntry&&_0x45186d[_0x44b2f1(0x4d0)]({'exec':_0x3cb6b3[_0x44b2f1(0x315)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x2d44de=_0x44b2f1,_0x25dd51=[];for(let _0x4e355f=0x0;_0x4e355f<process[_0x2d44de(0x163)][_0x2d44de(0x532)];_0x4e355f++){const _0x230ec2=process[_0x2d44de(0x163)][_0x4e355f];if(_0x230ec2[_0x2d44de(0x5a1)](_0x2d44de(0x375))||_0x230ec2[_0x2d44de(0x5a1)](_0x2d44de(0x5b9))||_0x230ec2['startsWith'](_0x2d44de(0x372)))continue;if(_0x230ec2==='-e'||_0x230ec2===_0x2d44de(0x54f)||_0x230ec2==='-p'||_0x230ec2==='--print'){_0x4e355f++;continue;}_0x25dd51[_0x2d44de(0x402)](_0x230ec2);}return _0x25dd51;})())}),_0x25ed27({'workers':_0x40aa88,'port':_0x278d29,'primaryOkdb':_0x5e49bb,'workerEnv':workerEnv});return _0x2b08b1({'makeOkdb':_0x12e87b,'port':_0x278d29});}function _0x25ed27({workers:_0x213182,port:_0x2b01d0,primaryOkdb:_0x372d34,workerEnv:_0x234328}){const _0x2c2fde=_0xdf3826,_0xf154ac=new Map(),_0xdbacab=new Map();let _0x2ea017=![];const _0x1c6d39=_0x49b24a=>_0x49b24a?.[_0x2c2fde(0x16e)],_0x98a6de=_0x1b4020=>{const _0x4b976c=_0x2c2fde,_0x766ea0=_0x45186d[_0x4b976c(0x48c)]({...process.env,..._0x234328||{},'OKDB_CLUSTER_SLOT':String(_0x1b4020)});return _0x766ea0[_0x4b976c(0x16e)]=_0x1b4020,_0xf154ac[_0x4b976c(0x578)](_0x766ea0[_0x4b976c(0x5d0)][_0x4b976c(0x5b1)],{'worker':_0x766ea0,'startedAt':Date[_0x4b976c(0x4e7)](),'slot':_0x1b4020}),_0x766ea0['on'](_0x4b976c(0x40f),_0x4b451b=>{const _0x4741ac=_0x4b976c;console[_0x4741ac(0x481)](_0x4741ac(0x132)+_0x766ea0[_0x4741ac(0x5d0)][_0x4741ac(0x5b1)]+_0x4741ac(0x593)+(_0x4b451b?.[_0x4741ac(0x51e)]??_0x4b451b));}),_0x766ea0['on'](_0x4b976c(0x4d2),()=>_0x537e6b()),_0x766ea0;},_0x30bee9=_0xc0294f=>{const _0x19bb18=_0x2c2fde;for(const {worker:_0x27a0a2}of _0xf154ac[_0x19bb18(0x4c0)]()){if(_0x27a0a2[_0x19bb18(0x354)]()||!_0x27a0a2[_0x19bb18(0x376)]())continue;try{_0x27a0a2[_0x19bb18(0x100)](_0xc0294f);}catch{}}};_0x372d34?.[_0x2c2fde(0x3fb)]?.({'kind':_0x2c2fde(0x572),'listenAddr':':'+_0x2b01d0})[_0x2c2fde(0x51d)](()=>{}),_0x372d34?.[_0x2c2fde(0x326)]?.[_0x2c2fde(0x45a)]?.({'workersConfigured':_0x213182});const _0xb0f62b={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x537e6b=()=>{const _0x91e598=_0x2c2fde,_0x443f54=_0x372d34?.['processes'];if(!_0x443f54||!_0x443f54[_0x91e598(0x45b)])return;const _0x444bf1=_0x443f54[_0x91e598(0x16a)];for(const {worker:_0x3307e9,startedAt:_0x26f470,slot:_0x3fc9cd,stats:_0x1c2c68,processing:_0xbb95ec}of _0xf154ac[_0x91e598(0x4c0)]()){if(_0x3307e9[_0x91e598(0x354)]())continue;const _0x5bca5b=_0x443f54[_0x91e598(0x142)]?.()&&_0x443f54[_0x91e598(0x20f)]('slot',_0x423d3f(_0x3fc9cd))?.[_0x91e598(0x5b6)]===!![];_0x443f54[_0x91e598(0x549)]({'pid':_0x3307e9[_0x91e598(0x5d0)][_0x91e598(0x5b1)],'startedAt':_0x26f470,'kind':_0x91e598(0x1bb),'supervisorKey':_0x444bf1,'slot':_0x3fc9cd,'slotKey':_0x423d3f(_0x3fc9cd),'role':_0xb0f62b,'listenAddr':':'+_0x2b01d0,'lifecycle':_0x5bca5b?_0x91e598(0x443):_0x91e598(0x2ac),'processing':_0xbb95ec??null,'stats':_0x1c2c68??null})['catch'](()=>{});}},_0x423d3f=_0x29c8e4=>_0x2b7fb9(_0x2c2fde(0x32c)+_0x2b01d0,_0x29c8e4),_0x460313=_0x9b921=>{const _0x2298e1=_0x2c2fde,_0x121569=_0x372d34?.['processes'];if(!_0x121569?.[_0x2298e1(0x142)]?.())return![];return _0x121569['getDesired'](_0x2298e1(0x2bf),_0x423d3f(_0x9b921))?.[_0x2298e1(0x5b6)]===!![];};for(let _0x5af6d0=0x0;_0x5af6d0<_0x213182;_0x5af6d0++){const _0x1a38d5=_0x460313(_0x5af6d0);_0xdbacab[_0x2c2fde(0x578)](_0x5af6d0,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1a38d5,'respawnTimer':null}),_0x1a38d5?console[_0x2c2fde(0x481)](_0x2c2fde(0x47b)+_0x5af6d0+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x98a6de(_0x5af6d0);}const _0x2a3c56=()=>{const _0x466777=_0x2c2fde,_0x3f544a=_0x372d34?.['processes'];if(!_0x3f544a?.[_0x466777(0x45b)]||!_0x3f544a['hasDesired']?.())return;for(const [_0x571181,_0xfda14]of _0xdbacab[_0x466777(0x530)]()){const _0x390178=_0x3f544a[_0x466777(0x20f)](_0x466777(0x2bf),_0x423d3f(_0x571181)),_0x1897f5=_0x390178?.[_0x466777(0x5b6)]===!![],_0x205382=_0x390178?.['kill']===!![];if(_0x1897f5&&!_0xfda14[_0x466777(0x4f2)]){_0xfda14['dead']=!![];_0xfda14[_0x466777(0x210)]&&(clearTimeout(_0xfda14[_0x466777(0x210)]),_0xfda14[_0x466777(0x210)]=null);for(const {worker:_0x1cad8f}of _0xf154ac['values']()){if(_0x1c6d39(_0x1cad8f)!==_0x571181||_0x1cad8f[_0x466777(0x354)]())continue;try{if(_0x205382)_0x1cad8f[_0x466777(0x5d0)][_0x466777(0x590)](_0x466777(0x362));else _0x1cad8f[_0x466777(0x376)]()&&_0x1cad8f['disconnect']();}catch{}}console[_0x466777(0x481)](_0x466777(0x3c3)+(_0x205382?_0x466777(0x20a):_0x466777(0x45e))+_0x466777(0x12c)+_0x571181+'\x20(durable\x20desired-state)');}else{if(!_0x1897f5&&_0xfda14['dead']&&_0x390178){_0xfda14[_0x466777(0x4f2)]=![],_0xfda14[_0x466777(0x1d9)]=[],_0xfda14[_0x466777(0x589)]=0x0;const _0x358246=[..._0xf154ac[_0x466777(0x4c0)]()]['some'](({worker:_0x59c916})=>_0x1c6d39(_0x59c916)===_0x571181&&!_0x59c916['isDead']());!_0x358246&&!_0x2ea017&&(_0x98a6de(_0x571181),console[_0x466777(0x481)](_0x466777(0x216)+_0x571181));}}}},_0x41aa8d=()=>{try{_0x2a3c56();}catch{}};_0x372d34?.[_0x2c2fde(0x447)]?.['on']?.(_0xc16392[_0x2c2fde(0x56d)],_0x41aa8d);const _0x34b897=[];if(_0x372d34?.['events']?.['on'])for(const _0x14d3da of _0x5f4f13){const _0x50f928=_0x49d77f=>{_0x30bee9({[_0x1a17d7]:_0x64910d,'event':_0x14d3da,'data':_0x49d77f??{}});};_0x372d34[_0x2c2fde(0x447)]['on'](_0x14d3da,_0x50f928),_0x34b897[_0x2c2fde(0x402)]({'event':_0x14d3da,'handler':_0x50f928});}const _0x42531f=setInterval(()=>{_0x2a3c56(),_0x537e6b();},_0x5de1af);_0x42531f['unref']?.();const _0x3514e1=(_0x15f765,_0x41713d)=>{const _0x1b8cc7=_0x2c2fde;if(!_0x41713d||typeof _0x41713d!==_0x1b8cc7(0x261)||_0x41713d[_0x1a17d7]!==_0x384f96)return;if(!_0x372d34?.[_0x1b8cc7(0x481)]?.[_0x1b8cc7(0x5d5)])return;const _0x80024=_0x41713d[_0x1b8cc7(0x5a4)]||{};_0x372d34[_0x1b8cc7(0x481)]['ingest']({..._0x80024,'msg':'[w'+_0x41713d[_0x1b8cc7(0x2bf)]+']\x20'+(_0x80024[_0x1b8cc7(0x36c)]??''),'meta':{..._0x80024['meta']||{},'worker':_0x41713d[_0x1b8cc7(0x2bf)],'workerPid':_0x41713d[_0x1b8cc7(0x5b1)]}});};_0x45186d['on'](_0x2c2fde(0x51e),_0x3514e1);const _0x66c3e7=(_0x5e09a0,_0x459d9c)=>{const _0x3e8853=_0x2c2fde;if(!_0x459d9c||typeof _0x459d9c!=='object'||_0x459d9c[_0x1a17d7]!==_0x352ea1)return;const _0x5477e5=_0xf154ac[_0x3e8853(0x1d0)](_0x5e09a0[_0x3e8853(0x5d0)][_0x3e8853(0x5b1)]);if(_0x5477e5){_0x5477e5[_0x3e8853(0x1b9)]={..._0x459d9c[_0x3e8853(0x1b9)],'at':Date[_0x3e8853(0x4e7)]()};if(_0x459d9c[_0x3e8853(0x32d)]!==undefined)_0x5477e5['processing']=_0x459d9c[_0x3e8853(0x32d)];}};_0x45186d['on']('message',_0x66c3e7),_0x45186d['on']('exit',(_0x46150d,_0x538861,_0x356882)=>{const _0x163ef3=_0x2c2fde,_0x5e7a27=_0x46150d['process'][_0x163ef3(0x5b1)],_0x636cb=_0x1c6d39(_0x46150d),_0x209ed4=_0xf154ac[_0x163ef3(0x1d0)](_0x5e7a27);if(_0x209ed4&&_0x372d34?.[_0x163ef3(0x326)])_0x372d34['processes'][_0x163ef3(0x184)](_0x5e7a27+':'+_0x209ed4[_0x163ef3(0x2fe)])[_0x163ef3(0x51d)](()=>{});_0xf154ac[_0x163ef3(0x4d9)](_0x5e7a27),console[_0x163ef3(0x481)](_0x163ef3(0x132)+_0x5e7a27+'\x20(slot='+(_0x636cb??'?')+_0x163ef3(0x467)+(_0x163ef3(0x249)+_0x538861+_0x163ef3(0x20e)+(_0x356882??'none')+');\x20'+_0xf154ac[_0x163ef3(0x5cb)]+_0x163ef3(0x3b8))),_0x537e6b();if(_0x2ea017||_0x636cb==null)return;const _0x560372=_0xdbacab[_0x163ef3(0x1d0)](_0x636cb);if(!_0x560372||_0x560372[_0x163ef3(0x4f2)])return;const _0x492b2c=Date[_0x163ef3(0x4e7)]();_0x560372[_0x163ef3(0x1d9)][_0x163ef3(0x402)](_0x492b2c),_0x560372[_0x163ef3(0x1d9)]=_0x560372['deaths']['filter'](_0x3dbb80=>_0x492b2c-_0x3dbb80<=_0x52e67a);if(_0x560372[_0x163ef3(0x1d9)]['length']>=_0x3397db){_0x560372[_0x163ef3(0x4f2)]=!![],console[_0x163ef3(0x40f)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x636cb+_0x163ef3(0x408)+_0x560372[_0x163ef3(0x1d9)][_0x163ef3(0x532)]+_0x163ef3(0x4b1)+(_0x52e67a+_0x163ef3(0x1ed)+_0xf154ac[_0x163ef3(0x5cb)]+_0x163ef3(0x4e1)));return;}_0x560372[_0x163ef3(0x589)]++;const _0x53ca87=Math[_0x163ef3(0x2ba)](_0x329b8d,_0x27ade5*0x2**(_0x560372[_0x163ef3(0x589)]-0x1));console['log'](_0x163ef3(0x224)+_0x636cb+_0x163ef3(0x417)+_0x53ca87+_0x163ef3(0x246)+_0x560372[_0x163ef3(0x589)]+')'),_0x560372[_0x163ef3(0x210)]=setTimeout(()=>{const _0x2c5265=_0x163ef3;_0x560372['respawnTimer']=null;if(_0x2ea017||_0x560372[_0x2c5265(0x4f2)])return;const _0x2ca773=_0x98a6de(_0x636cb);_0x2ca773[_0x2c5265(0x4ce)](_0x2c5265(0x55e),()=>{const _0x2e785e=_0x2c5265;if(_0xdbacab[_0x2e785e(0x1d0)](_0x636cb)===_0x560372)_0x560372[_0x2e785e(0x589)]=0x0;});},_0x53ca87),_0x560372[_0x163ef3(0x210)][_0x163ef3(0x175)]?.();});const _0xffb168=[..._0xf154ac['keys']()];console[_0x2c2fde(0x481)](_0x2c2fde(0x12b)+process['pid']+'\x20forked\x20'+_0x213182+_0x2c2fde(0x22c)+_0x2b01d0+':\x20'+('['+_0xffb168[_0x2c2fde(0x315)](',\x20')+']'));const _0x3c36ce={'_isClusterController':!![],'port':_0x2b01d0,'primaryOkdb':_0x372d34??null,'status'(){const _0x10c580=_0x2c2fde;return{'clustered':!![],'primaryPid':process[_0x10c580(0x5b1)],'port':_0x2b01d0,'primaryRole':_0x372d34?.[_0x10c580(0x17c)]??null,'processorPid':null,'supervisorPid':process[_0x10c580(0x5b1)],'workers':[..._0xf154ac[_0x10c580(0x4c0)]()]['map'](({worker:_0x241ef4})=>({'pid':_0x241ef4[_0x10c580(0x5d0)][_0x10c580(0x5b1)],'id':_0x241ef4['id'],'dead':_0x241ef4[_0x10c580(0x354)]()}))};},async 'close'(){const _0x2d043e=_0x2c2fde;_0x2ea017=!![];for(const _0x292c07 of _0xdbacab['values']()){_0x292c07[_0x2d043e(0x4f2)]=!![],_0x292c07[_0x2d043e(0x210)]&&(clearTimeout(_0x292c07[_0x2d043e(0x210)]),_0x292c07[_0x2d043e(0x210)]=null);}clearInterval(_0x42531f),_0x45186d[_0x2d043e(0x4e2)](_0x2d043e(0x51e),_0x3514e1),_0x45186d['off'](_0x2d043e(0x51e),_0x66c3e7),_0x372d34?.['events']?.[_0x2d043e(0x4e2)]?.(_0xc16392[_0x2d043e(0x56d)],_0x41aa8d);if(_0x372d34?.[_0x2d043e(0x447)]?.['off'])for(const {event:_0x2713b3,handler:_0x1de9db}of _0x34b897){try{_0x372d34[_0x2d043e(0x447)][_0x2d043e(0x4e2)](_0x2713b3,_0x1de9db);}catch{}}_0x34b897[_0x2d043e(0x532)]=0x0;const _0x1a42e1=[..._0xf154ac['values']()][_0x2d043e(0x56a)](({worker:_0x1af5ad})=>_0x1af5ad);if(_0x1a42e1[_0x2d043e(0x532)]===0x0)return;await Promise[_0x2d043e(0xf8)](_0x1a42e1[_0x2d043e(0x56a)](_0x29fd8b=>new Promise(_0xdeecfb=>{const _0x2d7aac=_0x2d043e;if(_0x29fd8b[_0x2d7aac(0x354)]()){_0xdeecfb();return;}let _0x2ba58f=![];const _0x5c8ecd=()=>{if(_0x2ba58f)return;_0x2ba58f=!![];if(_0x317c4a)clearTimeout(_0x317c4a);_0xdeecfb();};_0x29fd8b[_0x2d7aac(0x4ce)](_0x2d7aac(0x208),_0x5c8ecd);const _0x317c4a=setTimeout(()=>{const _0x5a8281=_0x2d7aac;try{_0x29fd8b[_0x5a8281(0x5d0)][_0x5a8281(0x590)]();}catch{}},_0x22c1f0+0x1f4);_0x317c4a['unref']?.();try{_0x29fd8b[_0x2d7aac(0x459)]();}catch{try{_0x29fd8b['process'][_0x2d7aac(0x590)]();}catch{}}})));}};return _0x3c36ce;}async function _0x2b08b1({makeOkdb:_0x4c5d72,port:_0x4965a}){const _0xe6a8e=_0xdf3826,_0x5d7385=await _0x4c5d72();return _0x2dcfc2(_0x5d7385),_0x5d7385['http'][_0xe6a8e(0x548)](_0x4965a);}function _0x2dcfc2(_0x1252da){const _0x276634=_0xdf3826;if(!_0x1252da||_0x1252da[_0x276634(0x324)])return;_0x1252da[_0x276634(0x324)]=!![];try{const {OKDBChangefeed:_0x556f43}=requireOkdbChangefeed(),_0x169631=_0x1252da[_0x276634(0x48f)];if(_0x169631&&typeof _0x169631['attachFeed']===_0x276634(0x28d)){const _0xdd7524=new _0x556f43(_0x1252da);_0xdd7524[_0x276634(0x34a)](),_0x169631[_0x276634(0xf3)](_0xdd7524),_0x1252da['_changefeed']=_0xdd7524;}}catch(_0x513514){_0x1252da['log']?.[_0x276634(0x414)]?.(_0x276634(0x41f)+(_0x513514?.['message']??_0x513514),{'feature':_0x276634(0x27e)});}const _0x458a52=_0x2d67db=>{const _0x508045=_0x276634;if(!_0x2d67db||typeof _0x2d67db!==_0x508045(0x261)||_0x2d67db[_0x1a17d7]==null)return;if(_0x2d67db[_0x1a17d7]===_0x64910d)try{_0x1252da[_0x508045(0x48f)]?.[_0x508045(0x489)]?.(_0x2d67db[_0x508045(0x4aa)],_0x2d67db[_0x508045(0x3ff)]);}catch{}};process['on'](_0x276634(0x51e),_0x458a52),_0x1252da[_0x276634(0x151)]=_0x458a52;{let _0x5aedc2=process[_0x276634(0x380)](),_0x1a8fce=Date[_0x276634(0x4e7)]();const _0x1b82f5=()=>{const _0x3aecc0=_0x276634;if(typeof process[_0x3aecc0(0x100)]!==_0x3aecc0(0x28d)||!process['connected'])return;const _0x431d72=Date[_0x3aecc0(0x4e7)](),_0x4b630b=process['cpuUsage'](),_0x1ea7e0=(_0x431d72-_0x1a8fce)*0x3e8,_0x4ca226=_0x4b630b[_0x3aecc0(0x247)]-_0x5aedc2[_0x3aecc0(0x247)]+(_0x4b630b['system']-_0x5aedc2[_0x3aecc0(0x146)]),_0x2692ec=_0x1ea7e0>0x0?Math['min'](0x64,Math[_0x3aecc0(0x3d8)](_0x4ca226/(_0x1ea7e0*(_0xe126e7[_0x3aecc0(0x116)]()[_0x3aecc0(0x532)]||0x1))*0x64)):0x0;_0x5aedc2=_0x4b630b,_0x1a8fce=_0x431d72;const _0x145590=process[_0x3aecc0(0x4be)]();let _0x3b2637=null;try{_0x3b2637=_0x1252da[_0x3aecc0(0x17c)]?.[_0x3aecc0(0x5b7)]?_0x1252da[_0x3aecc0(0x326)]?.[_0x3aecc0(0x1fe)]?.()??null:null;}catch{}try{process[_0x3aecc0(0x100)]({[_0x1a17d7]:_0x352ea1,'stats':{'rss':_0x145590[_0x3aecc0(0x487)],'heapUsed':_0x145590[_0x3aecc0(0x596)],'heapTotal':_0x145590[_0x3aecc0(0x3de)],'external':_0x145590[_0x3aecc0(0x43c)],'cpuPct':_0x2692ec,'cpuWindowMs':Math[_0x3aecc0(0x3d8)](_0x1ea7e0/0x3e8)||null},'processing':_0x3b2637});}catch{}},_0x2e9ec1=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x47d424=setInterval(_0x1b82f5,_0x2e9ec1);_0x47d424[_0x276634(0x175)]?.(),_0x1b82f5();for(const _0x30ffa2 of[_0x276634(0x29b),_0x276634(0x2cb)]){_0x1252da[_0x276634(0x447)]?.['on']?.(_0x30ffa2,()=>{try{_0x1b82f5();}catch{}});}}let _0x3d9df1=![];const _0x109750=async _0x31c0ed=>{const _0x3afae0=_0x276634;if(_0x3d9df1)return;_0x3d9df1=!![];const _0x1b2a0d=setTimeout(()=>process[_0x3afae0(0x208)](_0x31c0ed),_0x22c1f0);_0x1b2a0d['unref']?.();try{await _0x1252da['close']?.();}catch{}process[_0x3afae0(0x208)](_0x31c0ed);};process['on'](_0x276634(0x459),()=>_0x109750(0x0));if(process[_0x276634(0x420)]!==_0x276634(0xf4)){const _0x5c0a80=setInterval(()=>{if(process['ppid']===0x1)_0x109750(0x0);},_0x5d9d26);_0x5c0a80[_0x276634(0x175)]?.(),_0x1252da['_clusterOrphanWatch']=_0x5c0a80;}}return okdbCluster={'runClustered':_0x4e7bb7,'attachWorkerCluster':_0x2dcfc2},okdbCluster;}var hasRequiredOkdb;function requireOkdb(){const _0x2521aa=_0x1cf947;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x2521aa(0x352)]();}catch{}const _0x3362ea=require$$1,_0xeda63a=require$$1$1,{resolveWorkers:_0x3df40a,isShmbufNative:_0x51d6ec}=requireOkdbWorkers();function _0x428e7d(_0x2a657c){const _0x3b2643=_0x2521aa,_0x33a93d=_0x2a657c[_0x3b2643(0x3bc)](0x2),_0x5b0d8e={};let _0x31e421=0x0;while(_0x31e421<_0x33a93d[_0x3b2643(0x532)]){const _0xdd0b03=_0x33a93d[_0x31e421];if(_0xdd0b03===_0x3b2643(0x3b5)||_0xdd0b03==='-p')_0x5b0d8e['port']=Number(_0x33a93d[++_0x31e421]);else{if(_0xdd0b03==='--path'||_0xdd0b03==='-d')_0x5b0d8e[_0x3b2643(0x289)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03==='--key'||_0xdd0b03==='-k')_0x5b0d8e[_0x3b2643(0x57a)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03===_0x3b2643(0x119)||_0xdd0b03==='-c')_0x5b0d8e['config']=_0x33a93d[++_0x31e421];else{if(_0xdd0b03===_0x3b2643(0x47e))_0x5b0d8e[_0x3b2643(0x28b)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03===_0x3b2643(0x344))_0x5b0d8e[_0x3b2643(0x483)]=!![];else{if(_0xdd0b03===_0x3b2643(0x4eb))_0x5b0d8e['noAdmin']=!![];else{if(_0xdd0b03==='--workers')_0x5b0d8e[_0x3b2643(0x3ba)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03===_0x3b2643(0xf5))_0x5b0d8e[_0x3b2643(0x34b)]=!![];else{if(_0xdd0b03===_0x3b2643(0x240)||_0xdd0b03==='-e')_0x5b0d8e[_0x3b2643(0x10e)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03==='--types')_0x5b0d8e[_0x3b2643(0x1ae)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03===_0x3b2643(0x4c1))_0x5b0d8e['changes']=!![];else{if(_0xdd0b03==='--blobs')_0x5b0d8e[_0x3b2643(0x40c)]=!![];else{if(_0xdd0b03==='--drop')_0x5b0d8e[_0x3b2643(0x445)]=!![];else{if(_0xdd0b03===_0x3b2643(0x4af)){const _0x5f4686=[];while(_0x31e421+0x1<_0x33a93d[_0x3b2643(0x532)]&&!_0x33a93d[_0x31e421+0x1][_0x3b2643(0x5a1)]('--')){_0x5f4686[_0x3b2643(0x402)](_0x33a93d[++_0x31e421]);}_0x5b0d8e['open']=_0x5f4686['length']>0x0?_0x5f4686:!![];}else{if(_0xdd0b03===_0x3b2643(0x5ba))_0x5b0d8e['logRequests']=!![];else{if(_0xdd0b03===_0x3b2643(0x107))_0x5b0d8e[_0x3b2643(0x24f)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03===_0x3b2643(0x50b))_0x5b0d8e['password']=_0x33a93d[++_0x31e421];else{if(_0xdd0b03===_0x3b2643(0x565))_0x5b0d8e[_0x3b2643(0x2b6)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03===_0x3b2643(0x20b))_0x5b0d8e[_0x3b2643(0x15c)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03===_0x3b2643(0x400))_0x5b0d8e[_0x3b2643(0x2b2)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03==='--ttl')_0x5b0d8e[_0x3b2643(0x1c8)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03===_0x3b2643(0x15e))_0x5b0d8e[_0x3b2643(0x2f6)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03===_0x3b2643(0x335)||_0xdd0b03==='-u')_0x5b0d8e[_0x3b2643(0x3ac)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03==='--address')_0x5b0d8e[_0x3b2643(0x522)]=_0x33a93d[++_0x31e421];else{if(_0xdd0b03===_0x3b2643(0x16b)||_0xdd0b03==='-v'){const _0x3c63bd=require$$3;console[_0x3b2643(0x481)](_0x3c63bd['version']),process[_0x3b2643(0x208)](0x0);}else(_0xdd0b03===_0x3b2643(0x2c9)||_0xdd0b03==='-h')&&(_0x11b6de(),process[_0x3b2643(0x208)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x31e421++;}return _0x5b0d8e;}function _0x11b6de(){const _0x2b299a=_0x2521aa;console[_0x2b299a(0x481)](_0x2b299a(0x4a8));}const _0x275468=new Set([_0x2521aa(0x5c4),_0x2521aa(0x4ac),_0x2521aa(0x414),_0x2521aa(0x40f)]);function _0x115ddd(_0x31ef29){const _0x404262=_0x2521aa,_0x31ee13=_0x31ef29[_0x404262(0x10f)]?_0x3362ea[_0x404262(0x318)](_0x31ef29[_0x404262(0x10f)]):_0x3362ea[_0x404262(0x318)]('.kdbconfig');let _0x4d57cc={};if(_0xeda63a[_0x404262(0x3c6)](_0x31ee13))try{const _0x235997=_0xeda63a[_0x404262(0x490)](_0x31ee13,_0x404262(0x39f))[_0x404262(0x19c)](/^\uFEFF/,'');_0x4d57cc=JSON[_0x404262(0x1c1)](_0x235997),console[_0x404262(0x481)](_0x404262(0x378)+_0x31ee13);}catch(_0x139261){console[_0x404262(0x40f)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x31ee13+':\x20'+_0x139261[_0x404262(0x51e)]),process[_0x404262(0x208)](0x1);}const _0x466966={'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},_0x1bdea6={'port':_0x31ef29[_0x404262(0x4cb)]??_0x4d57cc[_0x404262(0x4cb)]??_0x466966[_0x404262(0x4cb)]??0x2124,'dbPath':_0x31ef29[_0x404262(0x289)]??_0x4d57cc['path']??_0x466966['path']??_0x404262(0x1a4),'key':_0x31ef29[_0x404262(0x57a)]??_0x4d57cc[_0x404262(0x57a)]??_0x466966[_0x404262(0x57a)]??undefined,'logLevel':_0x31ef29['logLevel']??_0x4d57cc[_0x404262(0x28b)]??_0x466966[_0x404262(0x28b)]??_0x404262(0x4ac),'noRepl':_0x31ef29[_0x404262(0x483)]??_0x4d57cc[_0x404262(0x483)]??_0x466966[_0x404262(0x483)]??![],'noAdmin':_0x31ef29['noAdmin']??_0x4d57cc[_0x404262(0x4f8)]??_0x466966[_0x404262(0x4f8)]??![],'admin':_0x4d57cc[_0x404262(0x357)]??{},'api':_0x4d57cc[_0x404262(0x5bd)]??undefined,'auth':_0x4d57cc[_0x404262(0x4ba)]??undefined,'mcp':_0x4d57cc[_0x404262(0x520)]??undefined,'http':_0x4d57cc[_0x404262(0x37d)]??undefined,'timeMachine':_0x4d57cc[_0x404262(0x176)]!==![]?_0x4d57cc[_0x404262(0x176)]??{}:![]};if(_0x31ef29['noCluster'])_0x1bdea6[_0x404262(0x34b)]=!![];if(_0x31ef29[_0x404262(0x3ba)]!==undefined)_0x1bdea6[_0x404262(0x152)]=_0x31ef29[_0x404262(0x3ba)];return _0x31ef29[_0x404262(0x4ae)]!==undefined&&(_0x1bdea6[_0x404262(0x4ba)]=_0x1bdea6[_0x404262(0x4ba)]||{},_0x1bdea6[_0x404262(0x4ba)]['open']=_0x31ef29[_0x404262(0x4ae)]),_0x31ef29[_0x404262(0x423)]&&(_0x1bdea6[_0x404262(0x5c4)]=_0x1bdea6[_0x404262(0x5c4)]||{},_0x1bdea6[_0x404262(0x5c4)][_0x404262(0x423)]=!![]),(!Number[_0x404262(0x242)](_0x1bdea6[_0x404262(0x4cb)])||_0x1bdea6[_0x404262(0x4cb)]<0x1||_0x1bdea6['port']>0xffff)&&(console[_0x404262(0x40f)](_0x404262(0x49c)+_0x1bdea6['port']+_0x404262(0x21b)),process[_0x404262(0x208)](0x1)),!_0x275468[_0x404262(0x5b3)](_0x1bdea6['logLevel'])&&(console['error'](_0x404262(0x4a7)+_0x1bdea6[_0x404262(0x28b)]+_0x404262(0x4ca)),process['exit'](0x1)),_0x1bdea6;}function _0x54b588(_0x561483){const _0x3d1baa=_0x2521aa;return!!(_0x561483&&typeof _0x561483===_0x3d1baa(0x261)&&!Array['isArray'](_0x561483)&&Object[_0x3d1baa(0x157)](_0x561483)[_0x3d1baa(0x532)]>0x0);}function _0x2213b9(_0x46232d){const _0x22f827=_0x2521aa;return{..._0x46232d[_0x22f827(0x57a)]?{'encryptionKey':_0x46232d[_0x22f827(0x57a)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x33642a=!process[_0x2521aa(0x2df)]['isTTY']||!!process.env.NO_COLOR;function _0x5b07a7(_0x2b9eb2,_0x3432e7){const _0xb37b73=_0x2521aa;return _0x33642a?_0x3432e7:'\x1b['+_0x2b9eb2+'m'+_0x3432e7+_0xb37b73(0x31f);}function _0x164b48(_0x3bf05c){const _0x1fbd6a=_0x2521aa;if(!_0x3bf05c||_0x3bf05c[_0x1fbd6a(0x532)]===0x0)return;const _0x4441cf='─'[_0x1fbd6a(0x5ca)](0x38);process[_0x1fbd6a(0x48a)]['write']('\x0a'),process['stderr'][_0x1fbd6a(0x1c6)](_0x5b07a7('33',_0x1fbd6a(0x541)+_0x3bf05c[_0x1fbd6a(0x532)]+_0x1fbd6a(0x57c)+(_0x3bf05c['length']>0x1?'S':'')+'\x0a')),process[_0x1fbd6a(0x48a)][_0x1fbd6a(0x1c6)]('\x20\x20'+_0x4441cf+'\x0a');for(const _0x32f567 of _0x3bf05c){const _0x43af0d=_0x32f567[_0x1fbd6a(0x169)]===_0x1fbd6a(0x40f)?_0x5b07a7('31',_0x1fbd6a(0x31e)):_0x5b07a7('33',_0x1fbd6a(0x1e8));process[_0x1fbd6a(0x48a)][_0x1fbd6a(0x1c6)](_0x43af0d+'\x20\x20'+_0x5b07a7('1',_0x32f567['title'])+'\x0a'),process[_0x1fbd6a(0x48a)][_0x1fbd6a(0x1c6)](_0x1fbd6a(0x457)+_0x32f567[_0x1fbd6a(0x51e)]+'\x0a');if(_0x32f567[_0x1fbd6a(0xfe)])process['stderr'][_0x1fbd6a(0x1c6)](_0x1fbd6a(0x457)+_0x5b07a7('2',_0x1fbd6a(0x2eb)+_0x32f567['hint'])+'\x0a');process[_0x1fbd6a(0x48a)][_0x1fbd6a(0x1c6)]('\x0a');}process[_0x1fbd6a(0x48a)][_0x1fbd6a(0x1c6)]('\x20\x20'+_0x4441cf+'\x0a\x0a');}function _0x340c53(_0xc9ebf5,_0xfec974,_0xba331f={}){const _0x2c462c=_0x2521aa,_0x9ee8ed=_0xc9ebf5['http'][_0x2c462c(0x548)](_0xfec974,_0xba331f);if(_0x9ee8ed&&_0x9ee8ed[_0x2c462c(0x52f)])return Promise['resolve'](_0x9ee8ed);return new Promise((_0x273386,_0x301e2a)=>{const _0x18061c=_0x2c462c;_0x9ee8ed[_0x18061c(0x4ce)]('listening',_0x273386),_0x9ee8ed[_0x18061c(0x4ce)]('error',_0x301e2a);});}async function _0x391448(_0x43fc1f){const _0x209721=_0x2521aa,_0x1491b3=require$$4$1;console['log'](_0x209721(0x5bb));let _0x1b9a7c=!![];const _0x5beab8=(_0x47189b,_0x337a7d)=>{console['log']('\x20\x20'+(_0x47189b?'✓':'✗')+'\x20'+_0x337a7d);if(!_0x47189b)_0x1b9a7c=![];},_0x1d60eb=Number(process[_0x209721(0x1ad)][_0x209721(0x19c)]('v','')[_0x209721(0x280)]('.')[0x0]);_0x5beab8(_0x1d60eb>=0x12,_0x209721(0x213)+process[_0x209721(0x1ad)]+(_0x1d60eb<0x12?_0x209721(0x1cd):''));const _0x406397=_0x3362ea[_0x209721(0x318)](_0x43fc1f[_0x209721(0x23b)]);try{_0xeda63a[_0x209721(0x466)](_0x406397,{'recursive':!![]});const _0x223540=_0x3362ea[_0x209721(0x315)](_0x406397,'.okdb-write-test');_0xeda63a['writeFileSync'](_0x223540,''),_0xeda63a['unlinkSync'](_0x223540),_0x5beab8(!![],'database\x20path\x20writable:\x20'+_0x406397);}catch(_0x15b0d9){_0x5beab8(![],_0x209721(0x438)+_0x406397+_0x209721(0x303)+_0x15b0d9[_0x209721(0x51e)]+')');}const _0xbebaf4=await new Promise(_0x4d5a51=>{const _0x14eb21=_0x209721,_0x35e23c=_0x1491b3[_0x14eb21(0x1b7)]();_0x35e23c['once'](_0x14eb21(0x40f),()=>_0x4d5a51(![])),_0x35e23c['once'](_0x14eb21(0x55e),()=>{_0x35e23c['close'](),_0x4d5a51(!![]);}),_0x35e23c[_0x14eb21(0x548)](_0x43fc1f['port'],'127.0.0.1');});_0x5beab8(_0xbebaf4,_0x209721(0x17f)+_0x43fc1f[_0x209721(0x4cb)]+'\x20'+(_0xbebaf4?_0x209721(0x17e):_0x209721(0x32e)));const _0xfac9d7=_0x3362ea[_0x209721(0x318)](_0x209721(0x4c4));if(_0xeda63a['existsSync'](_0xfac9d7))try{JSON[_0x209721(0x1c1)](_0xeda63a[_0x209721(0x490)](_0xfac9d7,_0x209721(0x39f))[_0x209721(0x19c)](/^\uFEFF/,'')),_0x5beab8(!![],_0x209721(0x170)+_0xfac9d7);}catch(_0xf1742c){_0x5beab8(![],'config\x20file\x20invalid:\x20'+_0xf1742c['message']);}else _0x5beab8(!![],'no\x20.kdbconfig\x20(using\x20defaults)');if(_0x51d6ec()){const _0x113832=_0x3df40a(_0x43fc1f,{'shmbufNative':!![]});_0x5beab8(!![],'cluster:\x20ready\x20('+_0x113832+_0x209721(0x222)+(_0x113832===0x1?'':'s')+')');}else _0x5beab8(!![],_0x209721(0x1e7));if(!_0xbebaf4)try{const _0x903c4f=require(_0x209721(0x59c)),_0x4b5ea6=new _0x903c4f(_0x406397,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x4b5ea6['open']();try{await _0x4b5ea6[_0x209721(0x326)][_0x209721(0x4ae)]({'reader':!![]});const _0x4568e1=_0x4b5ea6['processes'][_0x209721(0x13e)](),_0x1fd057=_0x4568e1[_0x209721(0x59d)](_0x3433ff=>_0x3433ff[_0x209721(0x284)]!=null)[_0x209721(0x532)];_0x5beab8(!![],_0x209721(0x35d)+_0x4568e1[_0x209721(0x532)]+'\x20process'+(_0x4568e1['length']===0x1?'':'es')+'\x20('+_0x1fd057+_0x209721(0x56f));}finally{await _0x4b5ea6[_0x209721(0x19f)]();}}catch{}console['log'](''),_0x1b9a7c?console['log'](_0x209721(0x59a)):(console[_0x209721(0x481)](_0x209721(0x233)),process['exit'](0x1));}async function _0x155cb7(){const _0x30581e=_0x2521aa,_0x3f6194=_0x3362ea[_0x30581e(0x318)](_0x30581e(0x4c4));!_0xeda63a[_0x30581e(0x3c6)](_0x3f6194)?(_0xeda63a[_0x30581e(0x2a8)](_0x3f6194,JSON[_0x30581e(0x18b)]({'port':0x2124,'path':_0x30581e(0x1a4),'logLevel':_0x30581e(0x4ac),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x30581e(0x481)](_0x30581e(0x56c))):console[_0x30581e(0x481)](_0x30581e(0x48e));const _0x482be5=_0x3362ea[_0x30581e(0x318)](_0x30581e(0x1a4));!_0xeda63a[_0x30581e(0x3c6)](_0x482be5)?(_0xeda63a[_0x30581e(0x466)](_0x482be5,{'recursive':!![]}),console['log'](_0x30581e(0x4b2))):console[_0x30581e(0x481)](_0x30581e(0x3e9)),console[_0x30581e(0x481)](_0x30581e(0x2bd));}async function _0xe76108(_0x366beb){const _0x1baae3=_0x2521aa,_0x3f195f=_0x3362ea[_0x1baae3(0x318)](_0x366beb['dbPath']);if(!_0xeda63a[_0x1baae3(0x3c6)](_0x3f195f)){console[_0x1baae3(0x481)](_0x1baae3(0x2da)+_0x3f195f+_0x1baae3(0x425));return;}const _0x3e580c=require$$0$3,_0x537b0e=_0x3e580c[_0x1baae3(0x427)]({'input':process[_0x1baae3(0x121)],'output':process[_0x1baae3(0x2df)]}),_0x2c97a2=await new Promise(_0x4d7274=>_0x537b0e['question'](_0x1baae3(0x196)+_0x3f195f+_0x1baae3(0x292),_0x4d7274));_0x537b0e[_0x1baae3(0x19f)](),console['log']('');if(_0x2c97a2[_0x1baae3(0x551)]()[_0x1baae3(0x2f5)]()!==_0x1baae3(0x448)){console[_0x1baae3(0x481)](_0x1baae3(0x4fe));return;}let _0x4a36ec=null;try{_0x4a36ec=await _0x568245(_0x3f195f,_0x366beb,async _0x2e8264=>{const _0x46673d=_0x1baae3,_0x4c7b41=_0x2e8264[_0x46673d(0x24b)],_0x549371=_0x4c7b41?.['db']?.[_0x46673d(0x1d0)](_0x46673d(0x486))??null,_0x2ba5e5=[];if(_0x4c7b41?.['hasType'](_0x46673d(0x471)))for(const {key:_0x37a712,value:_0x2cc987}of _0x4c7b41['getRange'](_0x46673d(0x471))){_0x2ba5e5[_0x46673d(0x402)]({'key':_0x37a712,'value':_0x2cc987});}return{'identity':_0x549371,'licenses':_0x2ba5e5};});}catch(_0x3270ec){console[_0x1baae3(0x481)]('[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20('+_0x3270ec[_0x1baae3(0x51e)]+_0x1baae3(0x323));}_0xeda63a['rmSync'](_0x3f195f,{'recursive':!![],'force':!![]}),console[_0x1baae3(0x481)](_0x1baae3(0x434)+_0x3f195f+'\x20deleted');if(_0x4a36ec&&(_0x4a36ec[_0x1baae3(0x544)]||_0x4a36ec[_0x1baae3(0x3f2)]['length']>0x0))try{await _0x568245(_0x3f195f,_0x366beb,async _0xdddb8e=>{const _0x3ddad4=_0x1baae3,_0x3cfde0=_0xdddb8e[_0x3ddad4(0x24b)];_0x4a36ec[_0x3ddad4(0x544)]&&_0x3cfde0['db'][_0x3ddad4(0x4b7)]('__identity',_0x4a36ec[_0x3ddad4(0x544)]);if(_0x4a36ec[_0x3ddad4(0x3f2)]['length']>0x0){if(!_0x3cfde0[_0x3ddad4(0x1d5)](_0x3ddad4(0x471)))await _0x3cfde0[_0x3ddad4(0x512)](_0x3ddad4(0x471));for(const {key:_0x2697ce,value:_0x33b3e6}of _0x4a36ec[_0x3ddad4(0x3f2)]){await _0x3cfde0[_0x3ddad4(0x3fa)](_0x3ddad4(0x471),_0x2697ce,_0x33b3e6);}}});const _0x4b3c85=[];if(_0x4a36ec[_0x1baae3(0x544)])_0x4b3c85[_0x1baae3(0x402)](_0x1baae3(0x3dd));if(_0x4a36ec[_0x1baae3(0x3f2)][_0x1baae3(0x532)]>0x0)_0x4b3c85['push'](_0x4a36ec['licenses'][_0x1baae3(0x532)]+_0x1baae3(0x46e));console[_0x1baae3(0x481)]('[okdb]\x20preserved:\x20'+_0x4b3c85[_0x1baae3(0x315)]('\x20+\x20'));}catch(_0x151540){console['log'](_0x1baae3(0x2b0)+_0x151540[_0x1baae3(0x51e)]);}}async function _0x568245(_0x40abe1,_0x162396,_0x5c622c){const _0x16c03b=_0x2521aa,_0x56817c=require$$5,_0x13160c=new _0x56817c(_0x40abe1,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x2213b9(_0x162396)});await _0x13160c['open']();try{return await _0x5c622c(_0x13160c);}finally{await _0x13160c[_0x16c03b(0x19f)]();}}async function _0x13a394(_0x7ffb4f,_0x3167d4){const _0x3481cf=_0x2521aa,_0x9329f7=require$$5,_0x41d19f=_0x3362ea[_0x3481cf(0x318)](_0x3167d4[_0x3481cf(0x23b)]);console[_0x3481cf(0x481)]('[okdb]\x20opening\x20'+_0x41d19f+'…');const _0x4e9404=new _0x9329f7(_0x41d19f,_0x2213b9(_0x3167d4));await _0x4e9404['open'](),console[_0x3481cf(0x481)](_0x3481cf(0x3e5)+_0x7ffb4f+'…');const {envs:_0x3b30b6}=await _0x4e9404[_0x3481cf(0x3bf)][_0x3481cf(0x13b)](_0x7ffb4f);for(const _0x580839 of _0x3b30b6){const _0x198959=_0x580839[_0x3481cf(0x40a)]>0x0?_0x3481cf(0x303)+(_0x580839[_0x3481cf(0x40a)]/0x400/0x400)[_0x3481cf(0x396)](0x2)+'\x20MB\x20→\x20'+(_0x580839[_0x3481cf(0x1e3)]/0x400/0x400)[_0x3481cf(0x396)](0x2)+_0x3481cf(0x14d):'';console['log'](_0x3481cf(0x50a)+_0x580839[_0x3481cf(0x24f)]+_0x3481cf(0x188)+_0x580839['dest']+_0x198959);}await _0x4e9404['close'](),console[_0x3481cf(0x481)](_0x3481cf(0x32b));}async function _0x1b3623(_0x58f47d,_0x2a5372,_0x2bc5f7){const _0x1b50e1=_0x2521aa,_0x4009b3=require$$5,_0x1d18c9=_0x3362ea[_0x1b50e1(0x318)](_0x2a5372[_0x1b50e1(0x23b)]),_0x36a567=_0x2bc5f7[_0x1b50e1(0x10e)]??_0x1b50e1(0x426),_0x114f25=_0x2bc5f7['types']?_0x2bc5f7['types'][_0x1b50e1(0x280)](',')[_0x1b50e1(0x56a)](_0x583471=>_0x583471[_0x1b50e1(0x551)]()):null;console['log'](_0x1b50e1(0x59f)+_0x1d18c9+'…');const _0x56e633=new _0x4009b3(_0x1d18c9,_0x2213b9(_0x2a5372));await _0x56e633[_0x1b50e1(0x4ae)](),console[_0x1b50e1(0x481)]('[okdb]\x20exporting\x20env\x20\x22'+_0x36a567+'\x22\x20→\x20'+_0x58f47d+'…');const _0xe2820c=await _0x56e633['migrate'][_0x1b50e1(0x4e3)](_0x58f47d,{'envName':_0x36a567,'types':_0x114f25,'includeChanges':!!_0x2bc5f7['changes']});console[_0x1b50e1(0x481)](_0x1b50e1(0x26f)+_0xe2820c[_0x1b50e1(0x1ae)]+'\x20\x20records='+_0xe2820c['records']+_0x1b50e1(0x2e4)+_0xe2820c[_0x1b50e1(0x444)]);if(_0x2bc5f7[_0x1b50e1(0x40c)]){const _0x48160=_0x3362ea[_0x1b50e1(0x315)](_0x3362ea[_0x1b50e1(0x330)](_0x58f47d),_0x1b50e1(0x40c));process['stdout']['write'](_0x1b50e1(0x1a0));const {count:_0x14d399,bytes:_0x4b00e0}=await _0x56e633[_0x1b50e1(0x3bf)][_0x1b50e1(0x393)](_0x48160);console['log'](_0x1b50e1(0x1d7)+_0x48160+_0x1b50e1(0x303)+_0x14d399+_0x1b50e1(0x497)+(_0x14d399!==0x1?'s':'')+',\x20'+(_0x4b00e0/0x400/0x400)[_0x1b50e1(0x396)](0x2)+'\x20MB)');}await _0x56e633[_0x1b50e1(0x19f)](),console[_0x1b50e1(0x481)](_0x1b50e1(0x31b));}async function _0x92b814(_0x182f58,_0x1a3e9d,_0x2b96cc){const _0x31e051=_0x2521aa,_0x4f0f0a=require$$5,_0x54eac8=_0x3362ea[_0x31e051(0x318)](_0x1a3e9d['dbPath']),_0xf81f0c=_0x2b96cc[_0x31e051(0x10e)]??null,_0x394a19=_0x2b96cc['types']?_0x2b96cc[_0x31e051(0x1ae)][_0x31e051(0x280)](',')[_0x31e051(0x56a)](_0x4d4631=>_0x4d4631[_0x31e051(0x551)]()):null,_0x22a253=!!_0x2b96cc[_0x31e051(0x445)];console[_0x31e051(0x481)]('[okdb]\x20opening\x20'+_0x54eac8+'…');const _0x28427a=new _0x4f0f0a(_0x54eac8,_0x2213b9(_0x1a3e9d));await _0x28427a[_0x31e051(0x4ae)](),console[_0x31e051(0x481)](_0x31e051(0x44b)+_0x182f58+'…');const _0x141848=await _0x28427a[_0x31e051(0x3bf)][_0x31e051(0x14a)](_0x182f58,{'envName':_0xf81f0c,'types':_0x394a19,'dropExisting':_0x22a253,'includeChanges':!!_0x2b96cc['changes'],'onProgress':({type:_0x46f9bf,count:_0x58d004})=>{const _0x4ddb88=_0x31e051;process[_0x4ddb88(0x2df)][_0x4ddb88(0x1c6)](_0x4ddb88(0x265)+_0x46f9bf+':\x20'+_0x58d004+_0x4ddb88(0x122));}});process[_0x31e051(0x2df)][_0x31e051(0x1c6)]('\x0a'),console['log'](_0x31e051(0x313)+_0x141848[_0x31e051(0x1ae)]+_0x31e051(0x478)+_0x141848[_0x31e051(0x10d)]+_0x31e051(0x2e4)+_0x141848[_0x31e051(0x444)]);if(_0x2b96cc[_0x31e051(0x40c)]){const _0x27403d=_0x3362ea[_0x31e051(0x315)](_0x3362ea['dirname'](_0x182f58),_0x31e051(0x40c));if(_0xeda63a['existsSync'](_0x27403d)){const {imported:_0x3fa2dd,skipped:_0x1cd0f6}=await _0x28427a[_0x31e051(0x3bf)][_0x31e051(0x3e4)](_0x27403d);console['log'](_0x31e051(0x460)+_0x3fa2dd+_0x31e051(0x2a7)+_0x1cd0f6);}}await _0x28427a[_0x31e051(0x19f)](),console[_0x31e051(0x481)](_0x31e051(0x574));}async function _0x402178(_0x1ba0ac,_0x3201a6){const _0x22e62a=_0x2521aa;_0x3201a6[_0x22e62a(0x310)]&&!_0x3201a6['name']&&(console[_0x22e62a(0x40f)](_0x22e62a(0x50c)),process[_0x22e62a(0x208)](0x1));const _0x370cec=_0x3201a6[_0x22e62a(0x15c)]?_0x3201a6['permissions'][_0x22e62a(0x280)](',')['map'](_0x3c91e9=>_0x3c91e9[_0x22e62a(0x551)]())[_0x22e62a(0x59d)](Boolean):[];let _0x4c8155={};if(_0x3201a6[_0x22e62a(0x2b2)])try{_0x4c8155=JSON['parse'](_0x3201a6[_0x22e62a(0x2b2)]);if(typeof _0x4c8155!==_0x22e62a(0x261)||Array['isArray'](_0x4c8155)||_0x4c8155===null)throw new Error();}catch{console[_0x22e62a(0x40f)](_0x22e62a(0x492)),process[_0x22e62a(0x208)](0x1);}const _0x46bbd5=require$$5,{randomToken:_0x44a9ea,hashToken:_0x38a05d,hashPassword:_0x2ca808}=requireOkdbAuthTokens(),_0x5d85dd=require$$0$1,_0x5e3ea3=_0x3362ea[_0x22e62a(0x318)](_0x1ba0ac[_0x22e62a(0x23b)]),_0x28ebe7=new _0x46bbd5(_0x5e3ea3,_0x2213b9(_0x1ba0ac));await _0x28ebe7[_0x22e62a(0x4ae)]();try{await _0x28ebe7[_0x22e62a(0x4ba)][_0x22e62a(0x401)]();if(_0x3201a6[_0x22e62a(0x24f)]){const _0x7f9737=await _0x28ebe7[_0x22e62a(0x4ba)]['_lookupByName'](_0x3201a6[_0x22e62a(0x24f)]);_0x7f9737&&(console[_0x22e62a(0x40f)](_0x22e62a(0x2ed)+_0x3201a6[_0x22e62a(0x24f)]+'\x22\x20already\x20exists'),process[_0x22e62a(0x208)](0x1));}const _0x53012b=_0x44a9ea(0x20),_0x1444ba=_0x38a05d(_0x53012b),_0x5747d1=_0x3201a6['password']?await _0x2ca808(_0x3201a6[_0x22e62a(0x310)]):null,_0x1a8848=_0x5d85dd[_0x22e62a(0x3ae)](),_0x6ea71e={'tokenHash':_0x1444ba,'name':_0x3201a6[_0x22e62a(0x24f)]||null,'passwordHash':_0x5747d1,'label':_0x3201a6[_0x22e62a(0x2b6)]||null,'permissions':_0x370cec,'grants':_0x4c8155,'createdAt':Date[_0x22e62a(0x4e7)](),'lastUsedAt':null},_0x1b29d6=_0x3201a6[_0x22e62a(0x1c8)]?{'ttl':Number(_0x3201a6['ttl'])}:undefined;await _0x28ebe7['_systemEnv'][_0x22e62a(0x3fa)](_0x22e62a(0x195),_0x1a8848,_0x6ea71e,_0x1b29d6),console[_0x22e62a(0x481)](_0x22e62a(0x3d6)),console[_0x22e62a(0x481)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1a8848),console[_0x22e62a(0x481)](_0x22e62a(0x148)+(_0x3201a6[_0x22e62a(0x24f)]||_0x22e62a(0x173))),console[_0x22e62a(0x481)](_0x22e62a(0x2ae)+(_0x3201a6['label']||_0x22e62a(0x173))),console[_0x22e62a(0x481)]('\x20\x20\x20\x20permissions:\x20'+(_0x370cec[_0x22e62a(0x315)](',\x20')||_0x22e62a(0x182))),console[_0x22e62a(0x481)](_0x22e62a(0x2ce)),console['log'](_0x22e62a(0x334)+_0x53012b+'\x0a');}finally{await _0x28ebe7['close']();}}async function _0x28355c(_0x1b95ef){const _0x4ad0df=_0x2521aa,_0x4bc617=require$$5,_0x51d3a1=_0x3362ea[_0x4ad0df(0x318)](_0x1b95ef[_0x4ad0df(0x23b)]),_0xf19cb2=new _0x4bc617(_0x51d3a1,_0x2213b9(_0x1b95ef));await _0xf19cb2[_0x4ad0df(0x4ae)]();try{const _0x3ea4d7=_0xf19cb2[_0x4ad0df(0x24b)];if(!_0x3ea4d7||!_0x3ea4d7[_0x4ad0df(0x1d5)](_0x4ad0df(0x195))){console[_0x4ad0df(0x481)](_0x4ad0df(0x14e));return;}const _0x49af5f=[];for(const {key:_0x4aaa64,value:_0x40d333}of _0x3ea4d7['getRange'](_0x4ad0df(0x195))){_0x49af5f[_0x4ad0df(0x402)]({'id':_0x4aaa64,'name':_0x40d333['name']||_0x4ad0df(0x173),'label':_0x40d333[_0x4ad0df(0x2b6)]||_0x4ad0df(0x173),'permissions':Array['isArray'](_0x40d333[_0x4ad0df(0x15c)])?_0x40d333['permissions'][_0x4ad0df(0x315)](','):'','created':_0x40d333[_0x4ad0df(0x5aa)]?new Date(_0x40d333[_0x4ad0df(0x5aa)])[_0x4ad0df(0x373)]()[_0x4ad0df(0x3bc)](0x0,0xa):''});}if(_0x49af5f[_0x4ad0df(0x532)]===0x0){console[_0x4ad0df(0x481)](_0x4ad0df(0x14e));return;}const _0x4f52a9=!process[_0x4ad0df(0x2df)][_0x4ad0df(0x30b)]||process[_0x4ad0df(0x2df)][_0x4ad0df(0x30b)]>=0x64,_0x1512db=_0x4f52a9?0x24:0xa,_0x136929=['ID'['padEnd'](_0x1512db),_0x4ad0df(0x13c)[_0x4ad0df(0x302)](0x10),_0x4ad0df(0x35c)[_0x4ad0df(0x302)](0x14),_0x4ad0df(0x3ad)[_0x4ad0df(0x302)](0x14),'CREATED'][_0x4ad0df(0x315)]('\x20\x20');console[_0x4ad0df(0x481)]('\x0a'+_0x136929),console[_0x4ad0df(0x481)]('-'[_0x4ad0df(0x5ca)](_0x136929[_0x4ad0df(0x532)]));for(const _0x2d6412 of _0x49af5f){const _0x302f82=_0x4f52a9?_0x2d6412['id']:_0x2d6412['id'][_0x4ad0df(0x3bc)](0x0,0x8)+'…';console[_0x4ad0df(0x481)]([_0x302f82[_0x4ad0df(0x302)](_0x1512db),_0x2d6412[_0x4ad0df(0x24f)][_0x4ad0df(0x3bc)](0x0,0x10)['padEnd'](0x10),_0x2d6412[_0x4ad0df(0x2b6)]['slice'](0x0,0x14)[_0x4ad0df(0x302)](0x14),_0x2d6412[_0x4ad0df(0x15c)][_0x4ad0df(0x3bc)](0x0,0x14)[_0x4ad0df(0x302)](0x14),_0x2d6412[_0x4ad0df(0x47a)]][_0x4ad0df(0x315)]('\x20\x20'));}console[_0x4ad0df(0x481)]('');}finally{await _0xf19cb2[_0x4ad0df(0x19f)]();}}async function _0x2e75c3(_0x3b188d,_0x501f69){const _0x5919b0=_0x2521aa;!_0x3b188d&&(console[_0x5919b0(0x40f)](_0x5919b0(0x204)),process[_0x5919b0(0x208)](0x1));const _0x479b11=require$$5,_0x5e4df4=_0x3362ea[_0x5919b0(0x318)](_0x501f69[_0x5919b0(0x23b)]),_0x36d7ce=new _0x479b11(_0x5e4df4,_0x2213b9(_0x501f69));await _0x36d7ce[_0x5919b0(0x4ae)]();try{const _0xd3ca3b=_0x36d7ce['_systemEnv'];(!_0xd3ca3b||!_0xd3ca3b[_0x5919b0(0x1d5)](_0x5919b0(0x195)))&&(console[_0x5919b0(0x40f)](_0x5919b0(0x4dc)+_0x3b188d+'\x22'),process[_0x5919b0(0x208)](0x1));let _0x452ffc=null,_0x3f4bb9=null;const _0x804eda=_0xd3ca3b[_0x5919b0(0x1d0)]('~tokens',_0x3b188d);if(_0x804eda)_0x452ffc=_0x3b188d,_0x3f4bb9=_0x804eda;else{const _0xec6cce=[];for(const {key:_0x305afa,value:_0x1f7ba1}of _0xd3ca3b[_0x5919b0(0x268)]('~tokens')){if(_0x305afa[_0x5919b0(0x5a1)](_0x3b188d))_0xec6cce[_0x5919b0(0x402)]({'key':_0x305afa,'value':_0x1f7ba1});}_0xec6cce['length']===0x0&&(console[_0x5919b0(0x40f)](_0x5919b0(0x4dc)+_0x3b188d+'\x22'),process[_0x5919b0(0x208)](0x1));if(_0xec6cce[_0x5919b0(0x532)]>0x1){console[_0x5919b0(0x40f)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x3b188d+_0x5919b0(0x52b)+_0xec6cce[_0x5919b0(0x532)]+_0x5919b0(0x5d1));for(const _0x2ddac8 of _0xec6cce){console[_0x5919b0(0x40f)]('\x20\x20'+_0x2ddac8[_0x5919b0(0x57a)]+_0x5919b0(0x12a)+(_0x2ddac8[_0x5919b0(0x155)][_0x5919b0(0x24f)]||_0x5919b0(0x173))+')');}process['exit'](0x1);}_0x452ffc=_0xec6cce[0x0][_0x5919b0(0x57a)],_0x3f4bb9=_0xec6cce[0x0]['value'];}await _0xd3ca3b[_0x5919b0(0x2cc)](_0x5919b0(0x195),_0x452ffc),console[_0x5919b0(0x481)](_0x5919b0(0x245)+_0x452ffc+_0x5919b0(0x12a)+(_0x3f4bb9['name']||_0x5919b0(0x173))+_0x5919b0(0x531)+(_0x3f4bb9[_0x5919b0(0x2b6)]||_0x5919b0(0x173))+')');}finally{await _0x36d7ce[_0x5919b0(0x19f)]();}}function _0x3ba219(_0x587a8f,_0x64b98f){const _0xcca13=_0x2521aa;if(!_0x587a8f[_0xcca13(0x161)])return _0xcca13(0x153);const _0x235e13=_0x587a8f[_0xcca13(0x27c)];if(!_0x235e13)return _0xcca13(0x4e6);if(_0x64b98f>_0x235e13)return'expired';return _0xcca13(0x4e6);}function _0x78cfcb(_0x14d670){const _0x50400c=_0x2521aa;if(!_0x14d670||typeof _0x14d670!=='object')return'';const _0x1c4322=Object[_0x50400c(0x530)](_0x14d670)[_0x50400c(0x59d)](([,_0x1de8c6])=>_0x1de8c6)[_0x50400c(0x56a)](([_0x3b73cf])=>_0x3b73cf);if(_0x1c4322['length']===0x0)return'(none)';if(_0x1c4322[_0x50400c(0x532)]<=0x3)return _0x1c4322[_0x50400c(0x315)]('\x20');return _0x1c4322[_0x50400c(0x3bc)](0x0,0x3)[_0x50400c(0x315)]('\x20')+('\x20+'+(_0x1c4322['length']-0x3));}async function _0xb0ea31(_0x460faa){const _0x17f1d3=_0x2521aa,_0x17dc8c=require$$5,_0x10ad61=requireOkdbLicenseCodec(),{_C:_0x47e980}=requireOkdbLicense(),_0x4c4752=_0x3362ea[_0x17f1d3(0x318)](_0x460faa[_0x17f1d3(0x23b)]),_0x38ebaf=new _0x17dc8c(_0x4c4752,_0x2213b9(_0x460faa));await _0x38ebaf[_0x17f1d3(0x4ae)]();try{const _0x28ca62=_0x38ebaf[_0x17f1d3(0x24b)],_0x3f087=_0x28ca62?.['db']?.[_0x17f1d3(0x1d0)]?.(_0x17f1d3(0x177))??0x0,_0xd7772d=[..._0x38ebaf['_envs']['keys']()][_0x17f1d3(0x59d)](_0x9e5c70=>!_0x9e5c70[_0x17f1d3(0x5a1)]('~'))[_0x17f1d3(0x532)],_0x4fda8d=_0x38ebaf[_0x17f1d3(0x21d)]?.[_0x17f1d3(0x468)];if(_0x4fda8d){const _0x320e1d=_0x4fda8d[_0x17f1d3(0x14c)]===!![],_0x3f7eb5=_0x320e1d?_0x17f1d3(0x472):_0x38ebaf[_0x17f1d3(0x21d)][_0x17f1d3(0x4e6)]?.['licensee']||_0x17f1d3(0x382);console[_0x17f1d3(0x481)](''),console[_0x17f1d3(0x481)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x3f7eb5);const _0x4a2981=_0x4fda8d['limits']||{};if(_0x4a2981[_0x17f1d3(0x2f1)]){const _0x103a71=Math[_0x17f1d3(0x3d8)](_0x3f087/_0x4a2981[_0x17f1d3(0x2f1)]*0x64);console['log'](_0x17f1d3(0x33c)+_0x3f087['toLocaleString']()+_0x17f1d3(0x17a)+_0x4a2981[_0x17f1d3(0x2f1)][_0x17f1d3(0x1bd)]()+'\x20\x20('+_0x103a71+'%)');}else console[_0x17f1d3(0x481)](_0x17f1d3(0x33c)+_0x3f087['toLocaleString']());_0x4a2981['envs']?console[_0x17f1d3(0x481)](_0x17f1d3(0x498)+_0xd7772d+'\x20/\x20'+_0x4a2981[_0x17f1d3(0x283)]):console[_0x17f1d3(0x481)](_0x17f1d3(0x498)+_0xd7772d),_0x47e980?.[_0x17f1d3(0x57d)]&&console[_0x17f1d3(0x481)](_0x17f1d3(0x11c)+_0x47e980['PUB_FINGERPRINT']+_0x17f1d3(0x5ce));}if(!_0x28ca62||!_0x28ca62[_0x17f1d3(0x1d5)](_0x17f1d3(0x471))){console[_0x17f1d3(0x481)](''),console[_0x17f1d3(0x481)](_0x17f1d3(0x403)),console['log']('');return;}const _0x243e9b=[],_0x355980=Date['now'](),_0x2890a0=_0x38ebaf['id'],_0x517b3c=_0x17f1d3(0x345);for(const {key:_0x2c4aec,value:_0x417de7}of _0x28ca62['getRange'](_0x17f1d3(0x471))){const _0x290614=_0x417de7[_0x17f1d3(0x4a2)]?Buffer[_0x17f1d3(0x424)](_0x417de7[_0x17f1d3(0x4a2)],'hex'):Buffer[_0x17f1d3(0x390)](0x8);let _0x213704='';try{_0x213704=_0x10ad61['derivePin'](_0x2890a0,_0x290614,_0x517b3c)[_0x17f1d3(0x118)];}catch{}_0x243e9b[_0x17f1d3(0x402)]({'id':_0x2c4aec,'licensee':_0x417de7['licensee']||'','expires':_0x417de7[_0x17f1d3(0x27c)]?new Date(_0x417de7[_0x17f1d3(0x27c)])[_0x17f1d3(0x373)]()[_0x17f1d3(0x3bc)](0x0,0xa):'','features':_0x78cfcb(_0x417de7[_0x17f1d3(0x138)]),'pin':_0x213704,'status':_0x3ba219(_0x417de7,_0x355980)});}if(_0x243e9b[_0x17f1d3(0x532)]===0x0){console[_0x17f1d3(0x481)](''),console[_0x17f1d3(0x481)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x17f1d3(0x481)]('');return;}const _0x3a3212=['\x20\x20'+'ID'[_0x17f1d3(0x302)](0xe),_0x17f1d3(0x594)[_0x17f1d3(0x302)](0xe),_0x17f1d3(0x187)[_0x17f1d3(0x302)](0xc),_0x17f1d3(0x288)[_0x17f1d3(0x302)](0x1e),_0x17f1d3(0x54d)[_0x17f1d3(0x302)](0xa),_0x17f1d3(0x3f6)]['join']('\x20');console[_0x17f1d3(0x481)]('\x0a'+_0x3a3212);for(const _0x1a6c5c of _0x243e9b){const _0x191306=_0x1a6c5c['id'][_0x17f1d3(0x3bc)](0x0,0x8)+'\u2026';console[_0x17f1d3(0x481)](['\x20\x20'+_0x191306[_0x17f1d3(0x302)](0xe),_0x1a6c5c['licensee'][_0x17f1d3(0x3bc)](0x0,0xe)[_0x17f1d3(0x302)](0xe),_0x1a6c5c['expires'][_0x17f1d3(0x302)](0xc),_0x1a6c5c[_0x17f1d3(0x138)][_0x17f1d3(0x3bc)](0x0,0x1e)['padEnd'](0x1e),_0x1a6c5c[_0x17f1d3(0x118)]['padEnd'](0xa),_0x1a6c5c[_0x17f1d3(0x437)]][_0x17f1d3(0x315)]('\x20'));}console[_0x17f1d3(0x481)]('');}finally{await _0x38ebaf[_0x17f1d3(0x19f)]();}}async function _0x3f7af2(_0x34f129,_0x3a60bf){const _0x34c9cf=_0x2521aa,_0x3495c9=require$$5,_0x5f0acf=requireOkdbLicenseCodec();let _0x231ded=_0x34f129;(_0x5f0acf[_0x34c9cf(0x44a)](_0x34f129)===_0x34c9cf(0x289)||_0xeda63a['existsSync'](_0x34f129)&&_0xeda63a[_0x34c9cf(0x42a)](_0x34f129)[_0x34c9cf(0x207)]())&&(_0x231ded=_0xeda63a[_0x34c9cf(0x490)](_0x34f129,'utf8')[_0x34c9cf(0x551)]());const _0x1d6802=_0x3362ea[_0x34c9cf(0x318)](_0x3a60bf[_0x34c9cf(0x23b)]),_0xe6f464=new _0x3495c9(_0x1d6802,_0x2213b9(_0x3a60bf));await _0xe6f464['open']();try{!_0xe6f464[_0x34c9cf(0x21d)]&&(console[_0x34c9cf(0x40f)](_0x34c9cf(0x54e)),process[_0x34c9cf(0x208)](0x1));let _0x5e0e88;try{_0x5e0e88=await _0xe6f464[_0x34c9cf(0x21d)][_0x34c9cf(0x28e)](_0x231ded);}catch(_0x25854b){console[_0x34c9cf(0x40f)](_0x34c9cf(0x1b2)+_0x25854b[_0x34c9cf(0x51e)]),process['exit'](0x1);}const _0x4700f9=_0xe6f464[_0x34c9cf(0x21d)][_0x34c9cf(0x4e4)](),_0x1135cd=_0x4700f9[_0x34c9cf(0x21f)](_0x5e6b10=>_0x5e6b10['licenseId']===_0x5e0e88['id'])?.[_0x34c9cf(0x118)]||'',_0x372346=Object[_0x34c9cf(0x530)](_0x5e0e88[_0x34c9cf(0x138)]||{})['filter'](([,_0x2dd890])=>_0x2dd890)[_0x34c9cf(0x56a)](([_0x10b9f9])=>_0x10b9f9),_0x2d5506=_0x5e0e88['limits']||{},_0x17cdf8=[_0x2d5506[_0x34c9cf(0x283)]?_0x34c9cf(0x36d)+_0x2d5506['envs']:null,_0x2d5506['typesPerEnv']?'types/env='+_0x2d5506[_0x34c9cf(0x4bd)]:null,_0x2d5506['syncPeers']?_0x34c9cf(0x47d)+_0x2d5506[_0x34c9cf(0x385)]:null,_0x2d5506[_0x34c9cf(0x2f1)]?_0x34c9cf(0x4c2)+_0x2d5506[_0x34c9cf(0x2f1)][_0x34c9cf(0x1bd)]():null][_0x34c9cf(0x59d)](Boolean)[_0x34c9cf(0x315)]('\x20\x20'),_0xa5ab9=_0x5e0e88['licenseType']===_0x5f0acf[_0x34c9cf(0x1ce)];console[_0x34c9cf(0x481)](_0x34c9cf(0x5c9)),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5e0e88['id']),console[_0x34c9cf(0x481)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x5e0e88['licensee']),console['log']('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x5e0e88[_0x34c9cf(0x27c)])['toISOString']()[_0x34c9cf(0x3bc)](0x0,0xa)),console[_0x34c9cf(0x481)]('\x20\x20\x20\x20features:\x20\x20'+(_0x372346[_0x34c9cf(0x315)](',\x20')||_0x34c9cf(0x182)));if(_0x17cdf8)console['log']('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x17cdf8);_0xa5ab9?(console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x34c9cf(0x481)]('')):(console['log'](_0x34c9cf(0x1e4)+_0x1135cd),console[_0x34c9cf(0x481)](_0x34c9cf(0x564)),console['log'](''),console['log'](_0x34c9cf(0x2c7)),console['log'](_0x34c9cf(0x584)+_0x1135cd+_0x34c9cf(0x458)),console[_0x34c9cf(0x481)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x34c9cf(0x481)]('\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>'),console['log'](''));}finally{await _0xe6f464['close']();}}async function _0x38884f(_0xe709ae,_0x18f423){const _0xbdabdc=_0x2521aa,_0x1e8845=require$$5,_0x4ca42f=_0x3362ea['resolve'](_0x18f423[_0xbdabdc(0x23b)]),_0x225abb=new _0x1e8845(_0x4ca42f,_0x2213b9(_0x18f423));await _0x225abb[_0xbdabdc(0x4ae)]();try{!_0x225abb['_license']&&(console['error'](_0xbdabdc(0x54e)),process[_0xbdabdc(0x208)](0x1));let _0x43ca16;try{_0x43ca16=await _0x225abb[_0xbdabdc(0x21d)][_0xbdabdc(0x130)](_0xe709ae['trim']());}catch(_0x1bf774){console[_0xbdabdc(0x40f)](_0xbdabdc(0x1b2)+_0x1bf774[_0xbdabdc(0x51e)]),console[_0xbdabdc(0x40f)](''),console[_0xbdabdc(0x40f)](_0xbdabdc(0x298)),console['error'](_0xbdabdc(0x50f)),console['error'](_0xbdabdc(0x329)),console['error']('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.'),console[_0xbdabdc(0x40f)](''),process[_0xbdabdc(0x208)](0x1);}console[_0xbdabdc(0x481)](_0xbdabdc(0x1bf)),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x43ca16['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0x43ca16[_0xbdabdc(0x416)]),console[_0xbdabdc(0x481)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x43ca16[_0xbdabdc(0x27c)])[_0xbdabdc(0x373)]()[_0xbdabdc(0x3bc)](0x0,0xa)),console[_0xbdabdc(0x481)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console['log']('');}finally{await _0x225abb[_0xbdabdc(0x19f)]();}}async function _0xb09f26(_0x263817,_0x4b7a80){const _0x588c45=_0x2521aa;!_0x263817&&(console['error'](_0x588c45(0x29a)),process[_0x588c45(0x208)](0x1));const _0x13b527=require$$5,_0x28ff8a=requireOkdbLicenseCodec(),_0x49c091=_0x3362ea[_0x588c45(0x318)](_0x4b7a80[_0x588c45(0x23b)]),_0x546075=new _0x13b527(_0x49c091,_0x2213b9(_0x4b7a80));await _0x546075[_0x588c45(0x4ae)]();try{const _0x420bee=_0x546075[_0x588c45(0x24b)];(!_0x420bee||!_0x420bee[_0x588c45(0x1d5)](_0x588c45(0x471)))&&(console['error'](_0x588c45(0x1b3)+_0x263817+'\x22'),process[_0x588c45(0x208)](0x1));let _0x4a8791=null,_0x4ee9ac=null;const _0x313a35=_0x420bee['get'](_0x588c45(0x471),_0x263817);if(_0x313a35)_0x4a8791=_0x263817,_0x4ee9ac=_0x313a35;else{const _0x14c29e=[];for(const {key:_0x2ef276,value:_0x3101c1}of _0x420bee[_0x588c45(0x268)](_0x588c45(0x471))){if(_0x2ef276['startsWith'](_0x263817))_0x14c29e[_0x588c45(0x402)]({'key':_0x2ef276,'value':_0x3101c1});}_0x14c29e[_0x588c45(0x532)]===0x0&&(console[_0x588c45(0x40f)](_0x588c45(0x1b3)+_0x263817+'\x22'),process[_0x588c45(0x208)](0x1)),_0x14c29e[_0x588c45(0x532)]>0x1&&(console[_0x588c45(0x40f)](_0x588c45(0x4bf)+_0x263817+'\x22\x20matches\x20'+_0x14c29e[_0x588c45(0x532)]+_0x588c45(0x57f)),process[_0x588c45(0x208)](0x1)),_0x4a8791=_0x14c29e[0x0][_0x588c45(0x57a)],_0x4ee9ac=_0x14c29e[0x0][_0x588c45(0x155)];}const _0x2644c5=Date[_0x588c45(0x4e7)](),_0x5ea6e7=_0x3ba219(_0x4ee9ac,_0x2644c5),_0x34ddd7=_0x546075['id'],_0x2596d2=_0x588c45(0x345);let _0x163161='';try{const _0x59f3f1=Buffer[_0x588c45(0x424)](_0x4ee9ac[_0x588c45(0x4a2)],_0x588c45(0x105));_0x163161=_0x28ff8a['derivePin'](_0x34ddd7,_0x59f3f1,_0x2596d2)[_0x588c45(0x118)];}catch{}const _0x29607b=_0x4ee9ac[_0x588c45(0x138)]?Object[_0x588c45(0x530)](_0x4ee9ac[_0x588c45(0x138)])['filter'](([,_0x3205b2])=>_0x3205b2)['map'](([_0x590445])=>_0x590445):[],_0x3eda00=_0x4ee9ac['limits']||{},_0x57ef91=_0x420bee?.['db']?.[_0x588c45(0x1d0)]?.('__writeCounter')??0x0,_0x41c13a=[..._0x546075[_0x588c45(0x18e)][_0x588c45(0x157)]()][_0x588c45(0x59d)](_0x1e463f=>!_0x1e463f[_0x588c45(0x5a1)]('~'))[_0x588c45(0x532)];console['log'](_0x588c45(0x4ab)),console[_0x588c45(0x481)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4a8791),console[_0x588c45(0x481)](_0x588c45(0x18c)+(_0x4ee9ac[_0x588c45(0x416)]||'')),console[_0x588c45(0x481)](_0x588c45(0x473)+(_0x4ee9ac[_0x588c45(0x27c)]?new Date(_0x4ee9ac[_0x588c45(0x27c)])[_0x588c45(0x373)]()[_0x588c45(0x3bc)](0x0,0xa):'')),console['log'](_0x588c45(0x3e3)+(_0x29607b[_0x588c45(0x315)](',\x20')||_0x588c45(0x182))),console['log'](_0x588c45(0x1e4)+_0x163161),console['log'](_0x588c45(0x2c4)+_0x5ea6e7),console['log'](_0x588c45(0x2b8)+new Date(_0x4ee9ac[_0x588c45(0x327)])['toISOString']());if(_0x5ea6e7===_0x588c45(0x4e6)){console['log'](''),console[_0x588c45(0x481)](_0x588c45(0x28f));if(_0x3eda00[_0x588c45(0x2f1)]){const _0x2bebad=Math[_0x588c45(0x3d8)](_0x57ef91/_0x3eda00[_0x588c45(0x2f1)]*0x64);console[_0x588c45(0x481)](_0x588c45(0x381)+_0x57ef91[_0x588c45(0x1bd)]()+_0x588c45(0x17a)+_0x3eda00[_0x588c45(0x2f1)][_0x588c45(0x1bd)]()+_0x588c45(0x303)+_0x2bebad+'%)');}else console[_0x588c45(0x481)](_0x588c45(0x381)+_0x57ef91['toLocaleString']()+_0x588c45(0x34e));_0x3eda00[_0x588c45(0x283)]?console[_0x588c45(0x481)](_0x588c45(0x3a1)+_0x41c13a+_0x588c45(0x17a)+_0x3eda00[_0x588c45(0x283)]):console[_0x588c45(0x481)](_0x588c45(0x3a1)+_0x41c13a+'\x20\x20(unlimited)');}console[_0x588c45(0x481)]('');}finally{await _0x546075[_0x588c45(0x19f)]();}}async function _0x300b4d(_0x471701,_0x1df487){const _0x87996d=_0x2521aa;!_0x471701&&(console[_0x87996d(0x40f)](_0x87996d(0x569)),process[_0x87996d(0x208)](0x1));const _0x47f297=require$$5,_0x454cf3=_0x3362ea[_0x87996d(0x318)](_0x1df487[_0x87996d(0x23b)]),_0x3e267d=new _0x47f297(_0x454cf3,_0x2213b9(_0x1df487));await _0x3e267d['open']();try{const _0x2d13ed=_0x3e267d[_0x87996d(0x24b)];(!_0x2d13ed||!_0x2d13ed[_0x87996d(0x1d5)](_0x87996d(0x471)))&&(console['error'](_0x87996d(0x1b3)+_0x471701+'\x22'),process['exit'](0x1));let _0x516659=null,_0x18f500=null;const _0x174977=_0x2d13ed[_0x87996d(0x1d0)](_0x87996d(0x471),_0x471701);if(_0x174977)_0x516659=_0x471701,_0x18f500=_0x174977;else{const _0x5279da=[];for(const {key:_0x4af61c,value:_0x5b586f}of _0x2d13ed[_0x87996d(0x268)](_0x87996d(0x471))){if(_0x4af61c[_0x87996d(0x5a1)](_0x471701))_0x5279da[_0x87996d(0x402)]({'key':_0x4af61c,'value':_0x5b586f});}_0x5279da[_0x87996d(0x532)]===0x0&&(console[_0x87996d(0x40f)](_0x87996d(0x1b3)+_0x471701+'\x22'),process[_0x87996d(0x208)](0x1)),_0x5279da[_0x87996d(0x532)]>0x1&&(console[_0x87996d(0x40f)](_0x87996d(0x4bf)+_0x471701+'\x22\x20matches\x20'+_0x5279da['length']+_0x87996d(0x57f)),process[_0x87996d(0x208)](0x1)),_0x516659=_0x5279da[0x0][_0x87996d(0x57a)],_0x18f500=_0x5279da[0x0]['value'];}await _0x2d13ed['remove'](_0x87996d(0x471),_0x516659),console[_0x87996d(0x481)](_0x87996d(0x3a4)+_0x516659+_0x87996d(0x550)+(_0x18f500[_0x87996d(0x416)]||'(unset)')+')');}finally{await _0x3e267d[_0x87996d(0x19f)]();}}async function _0x1587e2(_0x45acd2,_0x44049a,_0x2f6592){const _0x5d8a0d=_0x2521aa;!_0x45acd2&&(console[_0x5d8a0d(0x40f)](_0x5d8a0d(0x338)),process[_0x5d8a0d(0x208)](0x1));!_0x2f6592['token']&&!(_0x2f6592[_0x5d8a0d(0x3ac)]&&_0x2f6592[_0x5d8a0d(0x310)])&&(console['error'](_0x5d8a0d(0x27a)),process[_0x5d8a0d(0x208)](0x1));const _0x458503=_0x2f6592[_0x5d8a0d(0x522)]||_0x44049a[_0x5d8a0d(0x503)]?.['address'];!_0x458503&&(console[_0x5d8a0d(0x40f)]('[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a'+_0x5d8a0d(0x358)+_0x5d8a0d(0x4f3)),process[_0x5d8a0d(0x208)](0x1));const _0x5a9e44=require$$5,_0x4e3d49=new _0x5a9e44(_0x44049a[_0x5d8a0d(0x23b)],{'sync':{'address':_0x458503,'auto_reconcile':![]}});await _0x4e3d49['open']();try{const _0x1a0567=_0x4e3d49[_0x5d8a0d(0x24b)];if(_0x1a0567&&_0x1a0567[_0x5d8a0d(0x1d5)](_0x5d8a0d(0x195))){let _0x25c5e3=![];for(const _0x7d1ad2 of _0x1a0567[_0x5d8a0d(0x268)]('~tokens')){_0x25c5e3=!![];break;}_0x25c5e3&&console[_0x5d8a0d(0x481)](_0x5d8a0d(0x51b)+_0x5d8a0d(0x17d));}console[_0x5d8a0d(0x481)]('\x0a\x20\x20Joining\x20cluster\x20at\x20'+_0x45acd2+'…'),await _0x4e3d49[_0x5d8a0d(0x503)][_0x5d8a0d(0x315)](_0x45acd2[_0x5d8a0d(0x19c)](/\/+$/,''),{'token':_0x2f6592[_0x5d8a0d(0x2f6)],'username':_0x2f6592[_0x5d8a0d(0x3ac)],'password':_0x2f6592[_0x5d8a0d(0x310)]}),console[_0x5d8a0d(0x481)]('\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated'),console[_0x5d8a0d(0x481)](_0x5d8a0d(0x40b));}finally{await _0x4e3d49[_0x5d8a0d(0x19f)]();}}async function _0x3396d1(){const _0x5ba1ca=_0x2521aa,_0xc82af3=Date[_0x5ba1ca(0x4e7)](),_0x99684f=_0x428e7d(process['argv']),_0x4be47f=_0x115ddd(_0x99684f),_0x1f10af=_0x3362ea['resolve'](_0x4be47f[_0x5ba1ca(0x23b)]);!_0x4be47f['noRepl']&&!process[_0x5ba1ca(0x121)][_0x5ba1ca(0x339)]&&(_0x4be47f[_0x5ba1ca(0x483)]=!![]);const _0x35d56c=require$$5,{start:_0xb97c99,colorLog:_0x690cc}=requireOkdbShell(),_0x3b68d5=require$$1$2,_0x5aa669={..._0x4be47f[_0x5ba1ca(0x57a)]?{'encryptionKey':_0x4be47f['key']}:{},..._0x4be47f['noAdmin']?{'admin':![]}:_0x54b588(_0x4be47f['admin'])?{'admin':_0x4be47f['admin']}:{},..._0x54b588(_0x4be47f[_0x5ba1ca(0x5bd)])?{'api':_0x4be47f[_0x5ba1ca(0x5bd)]}:{},..._0x54b588(_0x4be47f['auth'])?{'auth':_0x4be47f[_0x5ba1ca(0x4ba)]}:{},..._0x54b588(_0x4be47f['mcp'])?{'mcp':_0x4be47f[_0x5ba1ca(0x520)]}:{},..._0x4be47f[_0x5ba1ca(0x176)]!==![]?{'timeMachine':_0x4be47f[_0x5ba1ca(0x176)]}:{}},_0x5ea538=_0x3df40a(_0x4be47f);if(!_0x3b68d5[_0x5ba1ca(0x474)]){const _0x5203bc=_0x51d6ec(),_0x43c835=_0x4be47f['noCluster']?_0x5ba1ca(0xf5):_0x4be47f[_0x5ba1ca(0x152)]!=null&&_0x4be47f[_0x5ba1ca(0x152)]!==''?_0x5ba1ca(0x131):process.env.OKDB_HTTP_WORKERS?_0x5ba1ca(0x260):_0x4be47f[_0x5ba1ca(0x37d)]?.[_0x5ba1ca(0x3ba)]!=null?'config\x20http.workers':_0x5ba1ca(0x38a)+Math[_0x5ba1ca(0x264)](0x1,require$$0[_0x5ba1ca(0x116)]()[_0x5ba1ca(0x532)]-0x1);process['stdout']['write']('[okdb]\x20http\x20workers:\x20'+_0x5ea538+'\x20('+_0x43c835+(!_0x5203bc?_0x5ba1ca(0x537):'')+')\x0a');}if(_0x3b68d5[_0x5ba1ca(0x474)]){const _0x33661f={..._0x5aa669},_0x154486=new _0x35d56c(_0x1f10af,_0x33661f);_0x154486['log'][_0x5ba1ca(0x34f)]?.();const _0x36880e=process.env.OKDB_CLUSTER_SLOT??'?',_0x5349c2={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x236d9f=_0x5349c2[_0x4be47f[_0x5ba1ca(0x28b)]]??_0x5349c2['info'];_0x154486[_0x5ba1ca(0x481)][_0x5ba1ca(0x307)](_0x44b6b5=>{const _0x1aadee=_0x5ba1ca;if((_0x5349c2[_0x44b6b5[_0x1aadee(0x169)]]??0x1)<_0x236d9f)return;try{process[_0x1aadee(0x100)]?.({'__okdbCluster':'log','slot':_0x36880e,'pid':process[_0x1aadee(0x5b1)],'entry':_0x44b6b5});}catch{}}),await _0x154486[_0x5ba1ca(0x4ae)]();const {attachWorkerCluster:_0x3c7fab}=requireOkdbCluster();_0x3c7fab(_0x154486),await _0x340c53(_0x154486,_0x4be47f['port']);return;}if(_0x5ea538>0x1){const {runClustered:_0x1ee3be}=requireOkdbCluster(),_0xaee79c=new _0x35d56c(_0x1f10af,{..._0x5aa669,'engines':![],'processors':![],'compaction':![]});await _0xaee79c['open']();const _0x26cd46=async()=>{const _0x31b502=_0x5ba1ca,_0x14a724=new _0x35d56c(_0x1f10af,{..._0x5aa669});return await _0x14a724[_0x31b502(0x4ae)](),_0x14a724;},_0x5e2baa=_0x1ee3be({'workers':_0x5ea538,'makeOkdb':_0x26cd46,'port':_0x4be47f['port'],'primaryOkdb':_0xaee79c});let _0xabe935=![];async function _0x2e685d(_0x6a5129){const _0x1d87ef=_0x5ba1ca;_0xabe935&&(process[_0x1d87ef(0x48a)][_0x1d87ef(0x1c6)](_0x1d87ef(0x285)),process['exit'](0x82));_0xabe935=!![],process[_0x1d87ef(0x48a)]['write'](_0x1d87ef(0x1d6)+(_0x6a5129||'shutdown')+_0x1d87ef(0x1d3));const _0x5168d8=setTimeout(()=>{const _0x13a6f6=_0x1d87ef;process[_0x13a6f6(0x48a)][_0x13a6f6(0x1c6)](_0x13a6f6(0x103)),process[_0x13a6f6(0x208)](0x0);},0xbb8);_0x5168d8[_0x1d87ef(0x175)]?.();try{await _0x5e2baa['close']();}catch(_0x4ade74){process[_0x1d87ef(0x48a)][_0x1d87ef(0x1c6)](_0x1d87ef(0x3c7)+(_0x4ade74?.[_0x1d87ef(0x51e)]??_0x4ade74)+'\x0a');}try{await _0xaee79c[_0x1d87ef(0x19f)]();}catch(_0xe47689){process[_0x1d87ef(0x48a)][_0x1d87ef(0x1c6)](_0x1d87ef(0x3ec)+(_0xe47689?.['message']??_0xe47689)+'\x0a');}process[_0x1d87ef(0x208)](0x0);}_0x4be47f[_0x5ba1ca(0x418)]=_0x5ea538;if(!_0x4be47f[_0x5ba1ca(0x483)]){_0xaee79c[_0x5ba1ca(0x481)]['detachConsole']?.(),_0x164b48(_0xaee79c[_0x5ba1ca(0x4ba)]?.[_0x5ba1ca(0x4fa)]?.()??[]),await _0xb97c99(_0xaee79c,_0x4be47f);return;}process[_0x5ba1ca(0x2df)][_0x5ba1ca(0x1c6)]('[okdb]\x20cluster\x20primary\x20pid='+process['pid']+_0x5ba1ca(0x10a)+_0x5ea538+'\x20'+('passive\x20HTTP\x20worker(s)\x20serving\x20:'+_0x4be47f[_0x5ba1ca(0x4cb)]+'\x0a')),console[_0x5ba1ca(0x481)](''),console[_0x5ba1ca(0x481)](_0x5ba1ca(0x3c5)),console[_0x5ba1ca(0x481)]('\x20\x20\x20\x20port:\x20\x20\x20\x20'+_0x4be47f['port']+_0x5ba1ca(0x303)+_0x5ea538+_0x5ba1ca(0xfc)),console[_0x5ba1ca(0x481)](_0x5ba1ca(0x5d3)+_0x1f10af),console[_0x5ba1ca(0x481)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20'+_0xaee79c['id']),console['log']('\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:'+_0x4be47f[_0x5ba1ca(0x4cb)]+_0x5ba1ca(0x238));!_0x4be47f[_0x5ba1ca(0x4f8)]&&console['log'](_0x5ba1ca(0x506)+_0x4be47f[_0x5ba1ca(0x4cb)]+_0x5ba1ca(0x126));console[_0x5ba1ca(0x481)](''),_0x164b48(_0xaee79c[_0x5ba1ca(0x4ba)]?.[_0x5ba1ca(0x4fa)]?.()??[]),process['on']('SIGINT',()=>_0x2e685d(_0x5ba1ca(0x3b0))),process['on']('SIGTERM',()=>_0x2e685d(_0x5ba1ca(0x2ab))),process['on'](_0x5ba1ca(0x3d5),()=>_0x2e685d(_0x5ba1ca(0x3d5)));return;}const _0x118dbe=new _0x35d56c(_0x1f10af,_0x5aa669);_0x118dbe[_0x5ba1ca(0x481)][_0x5ba1ca(0x34f)]?.();const _0x458543=_0x118dbe['log'][_0x5ba1ca(0x307)](_0x4a5d67=>_0x690cc(_0x4a5d67,_0x4be47f['logLevel']));if(_0x4be47f[_0x5ba1ca(0x483)])process['stdout'][_0x5ba1ca(0x1c6)](_0x5ba1ca(0x294));await _0x118dbe[_0x5ba1ca(0x4ae)]();if(_0x4be47f[_0x5ba1ca(0x483)])process['stdout'][_0x5ba1ca(0x1c6)](_0x5ba1ca(0x30e));try{await _0x340c53(_0x118dbe,_0x4be47f[_0x5ba1ca(0x4cb)]);}catch(_0x2ffce7){_0x2ffce7[_0x5ba1ca(0x3d1)]===_0x5ba1ca(0x586)&&(console[_0x5ba1ca(0x40f)](_0x5ba1ca(0x117)+_0x4be47f['port']+_0x5ba1ca(0x583)),process[_0x5ba1ca(0x208)](0x1));throw _0x2ffce7;}if(_0x4be47f[_0x5ba1ca(0x483)])process['stdout'][_0x5ba1ca(0x1c6)](_0x5ba1ca(0x430)+_0x4be47f[_0x5ba1ca(0x4cb)]+'\x0a');if(!_0x4be47f[_0x5ba1ca(0x483)])_0x118dbe[_0x5ba1ca(0x481)][_0x5ba1ca(0x34f)]?.(),_0x458543?.(),_0x164b48(_0x118dbe[_0x5ba1ca(0x4ba)]?.[_0x5ba1ca(0x4fa)]?.()??[]),await _0xb97c99(_0x118dbe,_0x4be47f);else{const _0x48057d=_0x3362ea[_0x5ba1ca(0x315)](_0x1f10af,_0x5ba1ca(0x147));try{_0xeda63a[_0x5ba1ca(0x2a8)](_0x48057d,String(process['pid']));}catch{}const _0x59a9ec=Date[_0x5ba1ca(0x4e7)]()-_0xc82af3;console['log'](''),console[_0x5ba1ca(0x481)](_0x5ba1ca(0x387)),console[_0x5ba1ca(0x481)](_0x5ba1ca(0x30a)+_0x4be47f['port']),console[_0x5ba1ca(0x481)]('\x20\x20\x20\x20path:\x20\x20'+_0x1f10af),console['log'](_0x5ba1ca(0x4ee)+_0x118dbe['id']);{const _0x3ff3c6=_0x118dbe[_0x5ba1ca(0x24b)]?.['db']?.[_0x5ba1ca(0x1d0)]?.(_0x5ba1ca(0x177))??0x0,_0x7179e4=[..._0x118dbe['_envs'][_0x5ba1ca(0x157)]()][_0x5ba1ca(0x59d)](_0x2e311a=>!_0x2e311a[_0x5ba1ca(0x5a1)]('~'))[_0x5ba1ca(0x532)];if(_0x118dbe['_license']?.[_0x5ba1ca(0x4e6)]?.[_0x5ba1ca(0x178)]===0x1){const _0x5b6206=Math[_0x5ba1ca(0x4b5)]((_0x118dbe[_0x5ba1ca(0x21d)][_0x5ba1ca(0x4e6)]['expiresAt']-Date[_0x5ba1ca(0x4e7)]())/0x5265c00);console[_0x5ba1ca(0x481)](_0x5ba1ca(0x1ff)+_0x118dbe[_0x5ba1ca(0x21d)]['active'][_0x5ba1ca(0x416)]+_0x5ba1ca(0x508)+_0x5b6206+_0x5ba1ca(0x1fa));}else{if(_0x118dbe['_license']?.['active']){const _0x5f4906=_0x118dbe[_0x5ba1ca(0x21d)]['active'];console[_0x5ba1ca(0x481)]('\x20\x20\x20\x20license:\x20'+_0x5f4906[_0x5ba1ca(0x416)]+_0x5ba1ca(0x1ea)+new Date(_0x5f4906[_0x5ba1ca(0x27c)])[_0x5ba1ca(0x373)]()[_0x5ba1ca(0x3bc)](0x0,0xa)+')');const _0x1322c7=_0x5f4906[_0x5ba1ca(0x4df)]||{};if(_0x1322c7[_0x5ba1ca(0x2f1)]){const _0x547ea8=Math['round'](_0x3ff3c6/_0x1322c7[_0x5ba1ca(0x2f1)]*0x64);console[_0x5ba1ca(0x481)](_0x5ba1ca(0x25f)+_0x3ff3c6[_0x5ba1ca(0x1bd)]()+'\x20/\x20'+_0x1322c7[_0x5ba1ca(0x2f1)]['toLocaleString']()+_0x5ba1ca(0x2b7)+_0x547ea8+_0x5ba1ca(0x3d9)+_0x7179e4+(_0x1322c7[_0x5ba1ca(0x283)]?'/'+_0x1322c7[_0x5ba1ca(0x283)]:'')+_0x5ba1ca(0x5b4)+(_0x7179e4===0x1?'':'s'));}}else{if(_0x118dbe[_0x5ba1ca(0x21d)]){const _0x10f373=_0x118dbe[_0x5ba1ca(0x21d)][_0x5ba1ca(0x4e4)](),_0x477e1e=_0x10f373[_0x5ba1ca(0x532)]?_0x10f373['map'](_0x37e903=>_0x37e903[_0x5ba1ca(0x118)])['join'](',\x20'):_0x5ba1ca(0x1dc),_0x422211=_0x118dbe[_0x5ba1ca(0x21d)][_0x5ba1ca(0x468)],_0x11a74f=_0x422211[_0x5ba1ca(0x4df)][_0x5ba1ca(0x2f1)]?Math[_0x5ba1ca(0x3d8)](_0x3ff3c6/_0x422211[_0x5ba1ca(0x4df)][_0x5ba1ca(0x2f1)]*0x64):0x0;console[_0x5ba1ca(0x481)](_0x5ba1ca(0x40d)),console[_0x5ba1ca(0x481)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x3ff3c6[_0x5ba1ca(0x1bd)]()+_0x5ba1ca(0x17a)+_0x422211['limits'][_0x5ba1ca(0x2f1)]['toLocaleString']()+_0x5ba1ca(0x2b7)+_0x11a74f+_0x5ba1ca(0x3d9)+_0x7179e4+_0x5ba1ca(0x17a)+_0x422211[_0x5ba1ca(0x4df)][_0x5ba1ca(0x283)]+_0x5ba1ca(0x250)),console[_0x5ba1ca(0x481)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20'+_0x477e1e);}}}}console['log'](_0x5ba1ca(0x1ec)+_0x4be47f[_0x5ba1ca(0x4cb)]+_0x5ba1ca(0x238));!_0x4be47f[_0x5ba1ca(0x4f8)]&&console[_0x5ba1ca(0x481)](_0x5ba1ca(0x49d)+_0x4be47f[_0x5ba1ca(0x4cb)]+'/admin/index.html');console[_0x5ba1ca(0x481)](''),console[_0x5ba1ca(0x481)](_0x5ba1ca(0x554)+_0x59a9ec+'ms'),_0x164b48(_0x118dbe[_0x5ba1ca(0x4ba)]?.[_0x5ba1ca(0x4fa)]?.()??[]);let _0x46398b=![];async function _0x2a7ca9(_0x523ca5){const _0x140ac1=_0x5ba1ca;_0x46398b&&(process[_0x140ac1(0x48a)]['write'](_0x140ac1(0x285)),process[_0x140ac1(0x208)](0x82));_0x46398b=!![],process[_0x140ac1(0x48a)][_0x140ac1(0x1c6)](_0x140ac1(0x1d6)+(_0x523ca5||'shutdown')+_0x140ac1(0x4ec));const _0x5c7549=setTimeout(()=>{const _0x1a197f=_0x140ac1;process['stderr'][_0x1a197f(0x1c6)](_0x1a197f(0x3f9)),process['exit'](0x1);},0x1388);try{_0xeda63a['unlinkSync'](_0x48057d);}catch{}try{await _0x118dbe[_0x140ac1(0x19f)]();}catch(_0x1af402){process[_0x140ac1(0x48a)][_0x140ac1(0x1c6)]('[okdb]\x20close\x20error:\x20'+(_0x1af402?.['message']??_0x1af402)+'\x0a');}clearTimeout(_0x5c7549),process['stderr']['write'](_0x140ac1(0x395)),process[_0x140ac1(0x208)](0x0);}process['on'](_0x5ba1ca(0x3b0),()=>_0x2a7ca9('SIGINT')),process['on'](_0x5ba1ca(0x2ab),()=>_0x2a7ca9(_0x5ba1ca(0x2ab))),process['on']('SIGBREAK',()=>_0x2a7ca9(_0x5ba1ca(0x3d5)));}}const _0x3d0d53=new Set([_0x2521aa(0x1ad),_0x2521aa(0x58d),_0x2521aa(0x179),_0x2521aa(0x13b),'export',_0x2521aa(0x4f7),'reset',_0x2521aa(0x2f6),_0x2521aa(0x315),'license']),_0x39b4b2=process[_0x2521aa(0x33b)][0x2];if(_0x39b4b2==='version')console[_0x2521aa(0x481)](require$$3[_0x2521aa(0x1ad)]),process[_0x2521aa(0x208)](0x0);else{if(_0x39b4b2&&_0x3d0d53[_0x2521aa(0x5b3)](_0x39b4b2)){const _0x30e7e0=process['argv']['slice'](0x3),_0xa166c7=_0x428e7d([_0x2521aa(0x106),_0x2521aa(0x24e),..._0x30e7e0]),_0x51901a=_0x115ddd(_0xa166c7),_0x2ac42f=new Set([_0x2521aa(0x519),'-d','--key','-k',_0x2521aa(0x119),'-c',_0x2521aa(0x3b5),'-p',_0x2521aa(0x47e),_0x2521aa(0x240),'-e','--types',_0x2521aa(0x107),_0x2521aa(0x50b),_0x2521aa(0x565),_0x2521aa(0x20b),_0x2521aa(0x400),_0x2521aa(0x47f),_0x2521aa(0x15e),_0x2521aa(0x335),'-u','--address']);let _0x1dc427=null;for(let _0x4f6518=0x0;_0x4f6518<_0x30e7e0[_0x2521aa(0x532)];_0x4f6518++){if(_0x2ac42f[_0x2521aa(0x5b3)](_0x30e7e0[_0x4f6518])){_0x4f6518++;continue;}if(!_0x30e7e0[_0x4f6518][_0x2521aa(0x5a1)]('-')){_0x1dc427=_0x30e7e0[_0x4f6518];break;}}(async()=>{const _0x470c7a=_0x2521aa;if(_0x39b4b2===_0x470c7a(0x2f6)){const _0x41f56b=process[_0x470c7a(0x33b)][0x3],_0x396014=process[_0x470c7a(0x33b)]['slice'](0x4),_0xb0b680=_0x428e7d([_0x470c7a(0x106),_0x470c7a(0x24e),..._0x396014]),_0x55e6c3=_0x115ddd(_0xb0b680),_0x387291=new Set([_0x470c7a(0x519),'-d',_0x470c7a(0x3ee),'-k',_0x470c7a(0x119),'-c','--port','-p',_0x470c7a(0x107),_0x470c7a(0x50b),_0x470c7a(0x565),_0x470c7a(0x20b),_0x470c7a(0x400),_0x470c7a(0x47f),'--log-level',_0x470c7a(0x240),'-e','--types']),_0x3650c7=[];for(let _0x2600d0=0x0;_0x2600d0<_0x396014[_0x470c7a(0x532)];_0x2600d0++){if(_0x387291[_0x470c7a(0x5b3)](_0x396014[_0x2600d0])){_0x2600d0++;continue;}if(_0x396014[_0x2600d0]['startsWith']('-'))continue;_0x3650c7[_0x470c7a(0x402)](_0x396014[_0x2600d0]);}switch(_0x41f56b){case _0x470c7a(0x18a):await _0x402178(_0x55e6c3,_0xb0b680);break;case'list':await _0x28355c(_0x55e6c3);break;case _0x470c7a(0x50d):await _0x2e75c3(_0x3650c7[0x0],_0x55e6c3);break;default:console['error'](_0x470c7a(0x192)+_0x41f56b+_0x470c7a(0x41b)),process[_0x470c7a(0x208)](0x1);}return;}if(_0x39b4b2==='license'){const _0x587f71=requireOkdbLicenseCodec(),_0x5ce4fa=process['argv'][_0x470c7a(0x3bc)](0x3),_0x266f24=_0x428e7d(['node',_0x470c7a(0x24e),..._0x5ce4fa]),_0x42c29e=_0x115ddd(_0x266f24),_0x4352d0=new Set(['--path','-d',_0x470c7a(0x3ee),'-k',_0x470c7a(0x119),'-c',_0x470c7a(0x3b5),'-p',_0x470c7a(0x47e)]),_0x37fe68=[];for(let _0x10c394=0x0;_0x10c394<_0x5ce4fa[_0x470c7a(0x532)];_0x10c394++){if(_0x4352d0[_0x470c7a(0x5b3)](_0x5ce4fa[_0x10c394])){_0x10c394++;continue;}if(_0x5ce4fa[_0x10c394][_0x470c7a(0x5a1)]('-'))continue;_0x37fe68[_0x470c7a(0x402)](_0x5ce4fa[_0x10c394]);}const _0xc253ca=_0x37fe68[0x0]??null;if(_0xc253ca===_0x470c7a(0x2cc))await _0x300b4d(_0x37fe68[0x1],_0x42c29e);else{if(!_0xc253ca)await _0xb0ea31(_0x42c29e);else{let _0x5cbe94=_0x587f71['detectInputType'](_0xc253ca);if(_0x5cbe94===_0x470c7a(0x592)&&_0xeda63a[_0x470c7a(0x3c6)](_0xc253ca))_0x5cbe94=_0x470c7a(0x289);if(_0x5cbe94===_0x470c7a(0x289))try{const _0x4468de=_0xeda63a[_0x470c7a(0x490)](_0xc253ca,'utf8')[_0x470c7a(0x551)](),_0x31e04a=_0x587f71['detectInputType'](_0x4468de);if(_0x31e04a===_0x470c7a(0x161)){await _0x38884f(_0x4468de,_0x42c29e);return;}await _0x3f7af2(_0xc253ca,_0x42c29e);return;}catch(_0x22d65c){console[_0x470c7a(0x40f)](_0x470c7a(0x2aa)+_0xc253ca+':\x20'+_0x22d65c['message']),process['exit'](0x1);}switch(_0x5cbe94){case _0x470c7a(0x24a):await _0x3f7af2(_0xc253ca,_0x42c29e);break;case _0x470c7a(0x161):await _0x38884f(_0xc253ca,_0x42c29e);break;case _0x470c7a(0x419):await _0xb09f26(_0xc253ca,_0x42c29e);break;default:console[_0x470c7a(0x40f)](_0x470c7a(0x316)+_0xc253ca+'\x22'),console[_0x470c7a(0x40f)](''),console['error'](_0x470c7a(0x4fb)),console['error']('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console[_0x470c7a(0x40f)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console[_0x470c7a(0x40f)](_0x470c7a(0x58c)),console['error'](_0x470c7a(0x3bb)),console[_0x470c7a(0x40f)](''),console[_0x470c7a(0x40f)](_0x470c7a(0x15a)),process['exit'](0x1);}}}return;}switch(_0x39b4b2){case'doctor':await _0x391448(_0x51901a);break;case _0x470c7a(0x179):await _0x155cb7();break;case _0x470c7a(0x234):await _0xe76108(_0x51901a);break;case _0x470c7a(0x13b):await _0x13a394(_0x1dc427??_0x3362ea[_0x470c7a(0x318)](_0x470c7a(0x1fd)),_0x51901a);break;case _0x470c7a(0x43b):await _0x1b3623(_0x1dc427??_0x3362ea['resolve']('./okdb-export.ndjson'),_0x51901a,_0xa166c7);break;case _0x470c7a(0x4f7):await _0x92b814(_0x1dc427??_0x3362ea[_0x470c7a(0x318)](_0x470c7a(0x3c0)),_0x51901a,_0xa166c7);break;case'join':await _0x1587e2(_0x1dc427,_0x51901a,_0xa166c7);break;}})()['then'](()=>process[_0x2521aa(0x208)](0x0))[_0x2521aa(0x51d)](_0x5d0b3f=>{const _0x24c8de=_0x2521aa;console[_0x24c8de(0x40f)](_0x24c8de(0x368)+(_0x5d0b3f[_0x24c8de(0x51e)]||_0x5d0b3f)+'\x0a'),process[_0x24c8de(0x208)](0x1);});}else _0x3396d1()[_0x2521aa(0x51d)](_0x3bf3ff=>{const _0x2a70a7=_0x2521aa;console[_0x2a70a7(0x40f)](_0x2a70a7(0x44f)),console[_0x2a70a7(0x40f)](_0x3bf3ff[_0x2a70a7(0x304)]||_0x3bf3ff),process[_0x2a70a7(0x208)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);function _0x196a(_0x31fd1a,_0x1dcb55){_0x31fd1a=_0x31fd1a-0xf3;const _0x5639e0=_0x5639();let _0x196a05=_0x5639e0[_0x31fd1a];return _0x196a05;}function _0x5639(){const _0x114812=['listAll','concat','logs','STATUS','scrypt','signalWant','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','put','_activateProcesses','ttlMs','0123456789ABCDEFGHJKMNPQRSTVWXYZ','_lastCpuPct','data','--grants','_ensureTokensType','push','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','171740njVPFp','copy','_buckets','Records','\x20died\x20','flushed','sizeBefore','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','blobs','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','listRoutes','error','../','reverse','Shutting\x20down\x20due\x20to\x20license\x20expiry','LICENSE_LIMIT_EXCEEDED','warn','safety','licensee','\x20in\x20','clusterWorkers','uuid','No\x20license\x20found\x20matching\x20this\x20activation\x20token','\x22.\x20Use:\x20create,\x20list,\x20revoke','decodeActivationToken','SCHEMA_VALIDATION_FAILED','_onItem','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','platform','_singletonLocks','FOREIGN_KEY_DELETE_RESTRICTED','logRequests','from','\x20does\x20not\x20exist','default','createInterface','okdb-diag.','assertFeature','statSync','types\x20--env\x20staging','resetReadTxn','race','digest','fast','\x20\x20✓\x20http\x20listening\x20on\x20:','threads','\x20\x20Shell\x20commands',':\x20key\x20[','[okdb]\x20reset:\x20','depth','test','status','database\x20path\x20not\x20writable:\x20','_wantDb','index:registered','export','external','setSchema','OKDB_HTTP_WORKERS','Schema\x20validation\x20failed\x20for\x20','dropIndex','yellow','\x20\x20Path\x20access','decommissioning','changes','drop','type','events','yes','_collectSingletonClaims','detectInputType','[okdb]\x20importing\x20','_closed','HELP','registry-publish','\x0a[okdb]\x20fatal\x20error:','fn-runner','LICENSE_INVALID','bus:type_drop','(on\x20any\x20path\x20command)','ITEM_UPDATE','Cannot\x20set\x20enforce\x20schema\x20on\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','\x20\x20\x20\x20\x20\x20\x20',')\x20to\x20your\x20license\x20vendor.','disconnect','setOwnMeta','_isWriter','_publishNow','red','decommissioned','oldestPendingMs','[okdb]\x20blobs:\x20imported=','byteLength','claims','async','shutdown','~processes:desired','mkdirSync',')\x20exited\x20','effective','cpuPct','cli','transport','1177xpqZzb','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','\x20license(s)','shmbuf/package.json','isEnabled','~licenses','free\x20tier','\x20\x20\x20\x20expires:\x20\x20\x20','isWorker','\x20to\x20browse\x20the\x20API,\x20','\x0a\x20\x20\x20\x20','OKDBForeignKeyError','\x20\x20records=','register','created','[okdb-cluster]\x20slot=','_migrateVocab','peers=','--log-level','--ttl','_selfKey','log',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','noRepl','listDesired','type/users\x20--help','__identity','rss','decoded','pushEphemeral','stderr','processor:retry','fork','result','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','_adminRelay','readFileSync','9264CZlcYk','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','open\x20','openDB','system:proc','writeUInt32BE','\x20file','\x20\x20Envs:\x20\x20\x20\x20','Environments','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','bind','[okdb]\x20invalid\x20port:\x20','\x20\x20\x20\x20admin:\x20http://localhost:','dynamic','_handleInProcess','[okdb]\x20invalid\x20','writeUInt16BE','_licenseHash','clearThreadStats','then','commitP99Ms','received\x20','[okdb]\x20invalid\x20log\x20level:\x20\x22','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','Build\x20expects\x20public\x20key\x20fingerprint\x20','event','\x0a\x20\x20License\x20details:','info','tryAcquire','open','--open','_removeRowAsync','\x20times\x20in\x20','[okdb]\x20created\x20./okdb-data','maxMs','\x1b[37m','ceil','application/json','putSync','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','System','auth','_rowKey','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','typesPerEnv','memoryUsage','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','values','--changes','writes=','uncaughtException','.kdbconfig','OKDBError','OKDB-PIN-V1:','cause','queue-worker','licenseHash','\x22\x20(must\x20be\x20debug|info|warn|error)','port','LICENSE_HASH_MISMATCH','number','once','shift','setupPrimary','tierList','online','Invalid\x20primary\x20key\x20type:\x20','OKDBInvalidIndexKeyError','exec','_onStop','server','\x1b[36m','delete','release','decodeLicenseBlob','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','_statusEnv','onLicenseExpired','limits','system:env_release','\x20worker(s)\x20still\x20serving','off','exportToFile','getPins','system:clock_change','active','now','_nodeDb','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','\x20statusEnv=','--no-admin',',\x20closing…\x0a','INVALID_INDEX_KEY','\x20\x20\x20\x20id:\x20\x20\x20\x20','\x0a\x20\x20\x20\x20\x20\x20','\x20opening\x20','_drainOne','dead','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','FOREIGN_KEY_VIOLATION','_dedupeMax','single','import','noAdmin','bumpCmd','getSecurityNotices','\x20\x20Expected\x20one\x20of:','floor','PUBLIC_KEY_PEM','[okdb]\x20reset\x20aborted','inst:','createHash','acquiredAt','terminal','sync','indexOf','2yMDZgZ','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','\x20\x20\x20\x20graceful\x20shutdown\x0a','\x20(expires\x20in\x20','embedded','\x20\x20✓\x20','--password','[okdb]\x20error:\x20--password\x20requires\x20--name','revoke','resetFts','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','dropType','toUpperCase','registerType','loop-lag','verify','VIEW_PROGRESS','randomBytes','nodesView','hostname','--path','fts:drop','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','FTS_REGISTERED','catch','message','quantum','mcp','list','selfAddress','resetting','offWindow','\x1b[32m','\x20already\x20exists','_cursors','hidden','HTTP\x20','_started','\x22\x20matches\x20','\x20\x20[okdb]\x20closed\x20cleanly\x0a','License\x20already\x20stored','putNode','_isClusterController','entries',',\x20label:\x20','length','[body]','Admin','count','failures',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','kind','LOGS','\x20parkedNow=','routes','committed','_flushTimer','views','transport:\x20','\x1b[2m','\x20\x20⚠\x20\x20','setLogger','item:create','identity','_collectWriterFacet','\x1b[90m','_onProcEvent','listen','publishChildRow','help','splice','OKDBUniqueConstraintError','PIN','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','--eval','\x20\x20(licensee:\x20','trim','maxExtra','\x20log\x20level:\x20','[okdb]\x20started\x20in\x20','\x22\x20is\x20used\x20by:\x20','mean','(no\x20types)','der','_enqueuedAt','GET','rawBuf','type:drop','\x20<path>\x20[json-body]','listening','beforeWrite','\x1b[1m','_sandbox','_flushDebounce','_pending','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','--label','index:ready','use','ref:violation','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','map','sort','[okdb]\x20created\x20.kdbconfig','SYSTEM_PROC','next','\x20supervised)','\x20\x20http://localhost:','instanceId','primary','ref:violation_resolved','[okdb]\x20import\x20complete','_versionSkewWarned','idx:','nodeKey','set','Invalid\x20activation\x20token:\x20','key','\x20→\x20POST\x20/api/env/','\x20SECURITY\x20NOTICE','PUB_FINGERPRINT','xdg-open\x20','\x20licenses','isWanted','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','\x20writer{depth=','\x20already\x20in\x20use','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','POST','EADDRINUSE','\x20for\x20commands,\x20','\x20\x20Error:\x20','consecutiveFailures','state','reap','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','doctor','targetType','_rootDb','kill','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','unknown','\x20ipc\x20error:\x20','LICENSEE','sourceType','heapUsed','\x20documents\x20fail\x20validation','Type\x20\x27','\x20\x20·\x20\x20','\x20\x20All\x20checks\x20passed.\x0a','body:\x20','../okdb','filter','\x20to\x20quit.','[okdb]\x20opening\x20','\x27\x20doesn\x27t\x20exist','startsWith','updateSupervisedChildStats','_onTick','entry','hasOwnProperty','license:activated','index','_singletonLock','singletonClaims','createdAt','types:','_heartbeatInFlight','other','green','val','\x0a\x20\x20No\x20routes\x20matching\x20\x22','pid','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','has','\x20env','Embeddings','decommission','processors','constructor','--watch','--log-requests','\x0a\x20\x20okdb\x20doctor\x0a','update','api','emit','busy','build','base64url','\x20\x20\x20http://localhost:','setTtl','debug','appendFileSync','_desired','stopped','\x22\x20on\x20\x22','\x0a\x20\x20✓\x20License\x20added','repeat','size','License\x20signature\x20invalid:\x20','raw-remove','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','\x27,\x20cannot\x20map\x20to\x20\x27','process','\x20tokens:','_db','\x20\x20\x20\x20path:\x20\x20\x20\x20','type/users/query\x20{\x22active\x22:true}','ingest','attachFeed','win32','--no-cluster','OKDBTypeAlreadyRegisteredError','Activation\x20invalid:\x20','all','Bearer\x20','fill','null','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','_lastCpuUsage','hint','getCount','send','dropSchema','boolean','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','Indexes','hex','node','--name','removeSupervisedChild','charCodeAt',':\x20processor\x20(HTTP-silent),\x20','white','getChanges','records','env','config','forEach','\x27\x20is\x20already\x20registered','enabled','\x20\x20#','note','ttl:expired','cpus','[okdb]\x20port\x20','pin','--config','references','__esModule','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','node:perf_hooks','_wantDbHandle','childTransaction','cluster-wide','stdin','\x20records…','pause','sha256','SYSTEM_POKE','/admin/index.html','SIGINT\x20(double-tap)','_putRowSync','REMOVE','\x20\x20(name:\x20','[okdb-cluster]\x20primary\x20pid=','\x20worker\x20slot=','fieldPath','heartbeatMs','LICENSED_BUILD','activateLicense','--workers','[okdb-cluster]\x20worker\x20pid=','quit','_timer','\x20\x20Usage:\x20','add','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','features','Sync','rows=','backup','NAME','noteListenAddr','listNodes','addSupervisedChild','.kdb_history','LICENSE_FEATURE_DISABLED','hasDesired','readUInt8','building','files','system','okdb.pid','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','assertLimit','importFromFile','INDEX_NOT_REGISTERED','_isFree','\x20MB)','No\x20tokens.','INDEX_READY','ms\x20on\x20env=','_clusterOnMessage','workersFlag','pending','OKDBTypeNotRegisteredError','value','\x1b[31m','keys','writeUInt8','toString','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','publishOwnRow','permissions','_processStartedAt','--token','okdb-writer:\x20env\x20closing\x20—\x20retry','OKDBSchemaValidationError','activation','ftsName','execArgv','Feature\x20not\x20licensed:\x20','txn:rollback','assign','commitsPerSec','createHmac','level','selfKey','--version','(worst\x20','input:\x20','__okdbSlot','_seen','config\x20file\x20valid:\x20','isActive','_inflight','(unset)','processingStatusView','unref','timeMachine','__writeCounter','licenseType','init','\x20/\x20','creating','role','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','available','port\x20','fts:registered','cursorKey','(none)','registerFts','removeNode','rowKey','558FFjkmx','EXPIRES','\x20\x20→\x20\x20','\x0a\x20\x20Invalid\x20JSON:\x20','create','stringify','\x20\x20\x20\x20licensee:\x20\x20','node:crypto','_envs','_buildChildRow','false','_lastPublishAt','[okdb]\x20unknown\x20token\x20action:\x20\x22','OKDBIndexAlreadyRegisteredError','PUT\x20type/users/item/x\x20{\x22n\x22:1}','~tokens','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','NOT_FOUND','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','EXIT','index:drop','_released','replace','INDEX_RESET','_scheduleFlush','close','[okdb]\x20exporting\x20blobs…','clear','_participate','_baselines','./okdb-data','INDEX_ALREADY_REGISTERED','_heartbeatTimer','_threadStats','stopping','SWAP','prototype','process\x20','index:reset','version','types','unique:violation','/type/users/query\x0a\x20\x20\x20\x20','valid','[okdb]\x20error:\x20','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','afterWrite','_quantum','_rawDb','createServer','_buildOwnRow','stats','stop','http-server','984931rhoTKF','toLocaleString','_enableChangelog','\x0a\x20\x20✓\x20License\x20activated','includes','parse','invalid','sub','_committed','firstTs','write',',\x20got\x20','ttl','__vocab/version','SIG_INVALID','\x20oldestPendingMs=','_caps','\x20\x20(need\x20≥\x2018)','LICENSE_TYPE_OPEN','(null)','get','~processes:cmd','__okdbCluster',',\x20stopping\x20workers…\x0a','[on|off|level]','hasType','\x0a[okdb]\x20received\x20','\x0d[okdb]\x20blobs:\x20','stopHeartbeat','deaths','registry\x20heartbeat\x20skipped\x20(writer=','~lock','(add\x20a\x20license\x20first)','_listenAddr','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','[env]','\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','OKDBIndexNotRegisteredError','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','sizeAfter','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','force','_handlePoke','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','\x20\x20⚠','derivePin','\x20(expires\x20','disable','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','TYPE_NOT_REGISTERED','registerIndex','expiry','envsOpen','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','ms\x20mean=','isFeatureEnabled','PUT','SYNC_COMMITS','loop-lag\x20','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_bpWaiters','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','indexes',':want','./okdb-backup','_buildProcessingFacet','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','handle','bold','~processes','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','unclaimed','ITEM_REMOVE','isFile','exit','active:','hard-killed','--permissions','fanout','_children',',\x20signal=','getDesired','respawnTimer','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','true','node\x20','allSettled','OKDBInvalidPrimaryKeyError','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','removeSync','access','reason','error:\x20','\x20(must\x20be\x201–65535)','dedupeMax','_license','\x20pid=','find','every','_computeStatus','\x20worker','\x20bytes,\x20need\x20>=\x2065)','[okdb-cluster]\x20respawning\x20worker\x20slot=','wrong_node','recheck','runtimeProcessesView','verifyActivation','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','\x20—\x20','updatedAt','\x20HTTP\x20server(s)\x20on\x20port\x20','INDEX_REGISTERED','sandbox','ENVS','fts','percentile','\x20===','\x20\x20Some\x20checks\x20failed.\x0a','reset','_done','_admissionTimer','setPrompt','/api','migrations','\x20\x20·\x20','dbPath','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','_drain',']\x20already\x20maps\x20to\x20\x27','/api/','--env','--env\x20<name>','isInteger','use\x20<env>','isHeld','\x20\x20✓\x20Revoked\x20token\x20','ms\x20(attempt\x20','user','killable','(code=','blob','_systemEnv','expired','_ensureDesired','okdb','name','\x20envs','ITEM_CREATE','sig','LICENSE_ACTIVATION_INVALID','\x20result','freeze','Examples','OKDBSchemaCollectionError','[filter]','inspect','_openEnvLazy','procmodeack/','starting','DELETE','License\x20expired\x20or\x20invalidated','\x20\x20\x20\x20usage:\x20\x20\x20','OKDB_HTTP_WORKERS\x20env','object','_log','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','max','\x0d[okdb]\x20','current','_ownMeta','getRange','ENV','\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','transaction','system:ready','clusterStatusView','ready','[okdb]\x20exported\x20\x20types=','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','details','schema:set','_nodeDead','ms\x20activeWriters=','\x20\x20\x20\x20\x20\x20','\x20\x20╔═══════════════════════════╗','endsWith','_acquiredAt','processKey','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','expiresAt','\x20\x20\x20\x20\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/','cluster','homedir','split','DELETE\x20type/users/item/x','_windowCbs','envs','supervisorKey','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','ACTIVATION_EXPIRED','630770jAXIjd','FEATURES','path','host','logLevel','listenAddr','function','addLicense','\x20\x20Usage:','recent\x20writes\x20(newest\x20first)','\x20@\x20','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','\x0a\x20\x20','[okdb]\x20starting…\x0a','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','draining','1ofN:','\x20\x20Common\x20causes:','\x20drainAge=','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','processor:paused','_coordinator','processor:error','INDEX_PROGRESS','_report','call','queue','USE','processor:ready','\x20logs\x20on\x20\x20','_lastCpuAt','_dedupeKey','\x20\x20skipped=','writeFileSync','\x20logs\x20off\x0a','[okdb]\x20error:\x20failed\x20to\x20read\x20','SIGTERM','running','1143715NJuVLK','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','parkedNow','grants','\x20\x20Type\x20','VERSION_MISMATCH','_outstanding','label','\x20writes\x20(','\x20\x20\x20\x20addedAt:\x20\x20\x20','mode','min','license','finally','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','bus:poke','slot','env:removed','description','FTS_RESET','meta','\x20\x20\x20\x20status:\x20\x20\x20\x20','_isReader','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','view','--help','_isStale','processor:resumed','remove','readUInt16BE','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','engines','getClock','2.1.2','system:poke','_bpParkedTotal','tags','holder','createEnvironment','allocUnsafe','\x1b[33m','202959eOAIPj','[okdb]\x20nothing\x20to\x20reset\x20—\x20','INVALID_PRIMARY_KEY','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','Index\x20\x27','\x20\x20Flags','stdout','TYPES','Foreign\x20key\x20violation:\x20','perf_hooks','typeSubDbs','\x20\x20changes=','_startedAt','_key','_servingEngines','writerStatus','line','deregisterSelf','Hint:\x20','_active','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','operation','_refreshDesiredSnapshot','OPEN','maxWrites','\x27:\x20','children','TYPE_ALREADY_REGISTERED','toLowerCase','token','processor:progress','type:registered','standalone','Events','method','dim','targetKey','startedAt','claimGated','\x27\x20on\x20type\x20\x27','shutting\x20down…\x0a','padEnd','\x20\x20(','stack','enable','history','attach','\x20while\x20this\x20process\x20runs\x20','access:\x20','\x20\x20\x20\x20port:\x20\x20','columns','magenta','_admissionStarted','\x20\x20✓\x20database\x20opened\x0a','roles','password','type/users','param','[okdb]\x20imported\x20\x20types=','ROUTES','join','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','body','resolve','Invalid\x20license\x20blob:\x20','\x20references\x20','[okdb]\x20export\x20complete','(empty)','fromEntries','\x20\x20✗','\x1b[0m','env/','summary','crypto',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','_clusterWorkerAttached','onWindow','processes','addedAt','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','\x20\x20\x20\x20\x20\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]\x20backup\x20complete','cluster:','processing','already\x20in\x20use','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','dirname','net','UNIQUE_CONSTRAINT','license:added','\x20\x20\x20\x20','--username','flushLmdb','processor','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','isTTY','http.workers','argv','\x20\x20Writes:\x20\x20','_nodeDbFor','time','type/users/item/alice','readUInt32BE','inputSchema','_lock','_sampleOwnStats','--no-repl','__OKDB_PUB_FINGERPRINT__','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','ppid','\x20\x20\x20\x20\x20http://localhost:','cyan','start','noCluster','search','shmbufNative','\x20\x20(unlimited)','detachConsole','shmbuf.node','namespace','loadEnvFile','\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','isDead','txn:start','standard','admin','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','\x20day(s).','uptime','compaction','LABEL','processes:\x20','\x20sync','(primary\x20=\x20processor)','ms/','cpuWindowMs','SIGKILL','_onPoke','timingSafeEqual','seq','<path>','ALREADY_EXISTS','\x0a[okdb]\x20error:\x20','ephemeral','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','OKDBForeignKeyDeleteError','msg','envs=','getProcess','participate','{}[]:,\x0a\x0d\x09\x20','registry\x20publish\x20failing:\x20','--inspect','toISOString','exports','--test','isConnected','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','[okdb]\x20loaded\x20config:\x20','_desiredOverlay','isPrimary','_lockDb','_startHeartbeat','http','options','prompt','cpuUsage','\x20\x20\x20\x20writes:\x20\x20\x20\x20','licensed','\x27\x20already\x20registered','ENV_CLOSING_RETRY','syncPeers','some','\x20\x20✓\x20OKDB\x20server\x20running','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','ttl:clear','default:\x20cores−1\x20=\x20','indexToDb','type/','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','queue/','alloc','transactionSync','removeLicense','exportBlobs','17224GgTCnF','[okdb]\x20closed\x20cleanly\x0a','toFixed','isArray','\x20\x20║','trimStart','http://localhost:','processorsView','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','gray','ms\x20env=','utf8','unique:violation_resolved','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','_lastCpuWindowMs','_holderDead','\x20\x20✓\x20Removed\x20license\x20','prependListener','string','_draining','recordWrite','env:opened','LICENSE_EXPIRED_ACTION','_publishFailWarned','username','PERMISSIONS','randomUUID','_durs','SIGINT','caps','/types\x0a\x20\x20\x20\x20','processorId','system:drain','--port','raw-put','_markSeen','\x20worker(s)\x20remaining','node/','workers','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','slice','ESRCH','_supervisorKey','migrate','./okdb-export.ndjson','\x20\x20\x20\x20\x20\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','reload','[okdb-cluster]\x20','padStart','\x20\x20✓\x20OKDB\x20cluster\x20running','existsSync','[okdb]\x20cluster\x20close\x20error:\x20','index:progress','change','OKDBNotFoundError','spki','_groupByProcess','.log','\x0a===\x20OKDB_DIAG\x20','\x0a\x0a\x20\x20','clearLine','code','dumpedAt','sync:apply','_cmd','SIGBREAK','\x0a\x20\x20✓\x20Token\x20created','startHeartbeat','round','%),\x20','_hbTimer','CHANGEFEED_QUANTUM','license:invalid','node\x20identity','heapTotal','42LAexGq','_instanceId','Full-text\x20search','_writer','\x20\x20\x20\x20features:\x20\x20','importBlobs','[okdb]\x20backing\x20up\x20to\x20','load','system:stopped','Invalid\x20index\x20key\x20type\x20for\x20\x27','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','_nodeDbCache','env/:env','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','--key','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','_highWater','_kind','licenses'];_0x5639=function(){return _0x114812;};return _0x5639();}module[_0x1cf947(0x374)]=okdb;
|
|
2
|
+
'use strict';const _0x12dbbc=_0x16c8;(function(_0x3b929e,_0x18ddd2){const _0x34ec5b=_0x16c8,_0x1ac673=_0x3b929e();while(!![]){try{const _0x409f4f=parseInt(_0x34ec5b(0x1ca))/0x1+parseInt(_0x34ec5b(0x3c7))/0x2*(parseInt(_0x34ec5b(0x31d))/0x3)+parseInt(_0x34ec5b(0x19f))/0x4*(parseInt(_0x34ec5b(0x4fd))/0x5)+parseInt(_0x34ec5b(0x1a7))/0x6*(-parseInt(_0x34ec5b(0x239))/0x7)+parseInt(_0x34ec5b(0x3a0))/0x8*(-parseInt(_0x34ec5b(0x342))/0x9)+parseInt(_0x34ec5b(0x5f8))/0xa+-parseInt(_0x34ec5b(0x586))/0xb;if(_0x409f4f===_0x18ddd2)break;else _0x1ac673['push'](_0x1ac673['shift']());}catch(_0x4ccee0){_0x1ac673['push'](_0x1ac673['shift']());}}}(_0x5443,0x7319f));var require$$1=require(_0x12dbbc(0x60b)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x12dbbc(0x3a8)),require$$5=require(_0x12dbbc(0x1dd)),require$$0$3=require(_0x12dbbc(0x173)),require$$0$1=require('crypto'),require$$0$2=require(_0x12dbbc(0x34b)),require$$4=require(_0x12dbbc(0x58f)),require$$1$2=require(_0x12dbbc(0x3ac)),require$$0$4=require(_0x12dbbc(0x30b)),require$$0$5=require(_0x12dbbc(0x3e1)),require$$0$6=require(_0x12dbbc(0x18d));function getDefaultExportFromCjs(_0x2b73b8){const _0x5ec9ea=_0x12dbbc;return _0x2b73b8&&_0x2b73b8[_0x5ec9ea(0x59d)]&&Object[_0x5ec9ea(0x4b0)][_0x5ec9ea(0x4ee)][_0x5ec9ea(0x311)](_0x2b73b8,_0x5ec9ea(0x29c))?_0x2b73b8['default']:_0x2b73b8;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x27862d=require$$0,_0x42a46a=require$$1$1,_0x1c4311=require$$1;let _0x43ea3c;function _0x220bd2(){const _0x330b6f=_0x16c8;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x43ea3c!==undefined)return _0x43ea3c;try{const _0x153b39=_0x1c4311['dirname'](require[_0x330b6f(0x408)](_0x330b6f(0x255)));_0x43ea3c=_0x42a46a[_0x330b6f(0x39c)](_0x1c4311['join'](_0x153b39,_0x330b6f(0x212),_0x330b6f(0x3ba),_0x330b6f(0x611)));}catch{_0x43ea3c=![];}return _0x43ea3c;}function _0x267bc7(){const _0x1fb8d0=_0x16c8,_0x5b289d=_0x27862d['cpus']()[_0x1fb8d0(0x5b9)];return Math[_0x1fb8d0(0x4b9)](0x1,_0x5b289d-0x1);}function _0x57ca5e(_0x41eaac,_0x7d40be={}){const _0x358788=_0x16c8,_0x5e2afd=_0x7d40be[_0x358788(0x401)]!==undefined?_0x7d40be[_0x358788(0x401)]:_0x220bd2();let _0x37477c;if(_0x41eaac?.[_0x358788(0x310)])_0x37477c=0x1;else{let _0x4e792c,_0x4ca46d;if(_0x41eaac?.['workersFlag']!==undefined&&_0x41eaac[_0x358788(0x4bd)]!==null&&_0x41eaac[_0x358788(0x4bd)]!=='')_0x4e792c=_0x41eaac[_0x358788(0x4bd)],_0x4ca46d=_0x358788(0x5c3);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x4e792c=process.env.OKDB_HTTP_WORKERS,_0x4ca46d=_0x358788(0x51f);else _0x41eaac?.['http']?.[_0x358788(0x5f5)]!==undefined&&_0x41eaac['http'][_0x358788(0x5f5)]!==null&&_0x41eaac[_0x358788(0x349)]['workers']!==''&&(_0x4e792c=_0x41eaac['http'][_0x358788(0x5f5)],_0x4ca46d='http.workers');}if(_0x4e792c===undefined)_0x37477c=_0x267bc7();else{const _0x2a8789=Number(_0x4e792c);!Number[_0x358788(0x5d7)](_0x2a8789)||_0x2a8789<0x1?(console['warn'](_0x358788(0x292)+_0x4ca46d+'='+JSON['stringify'](_0x4e792c)+'\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201'),_0x37477c=0x1):_0x37477c=_0x2a8789;}}return!_0x5e2afd&&_0x37477c>0x1&&(console[_0x358788(0x3ed)](_0x358788(0x549)+(_0x358788(0x551)+_0x37477c+').')),_0x37477c=0x1),_0x37477c;}return okdbWorkers={'isShmbufNative':_0x220bd2,'defaultWorkers':_0x267bc7,'resolveWorkers':_0x57ca5e},okdbWorkers;}var version=_0x12dbbc(0x3f7),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function _0x5443(){const _0x5ccd35=['Shutting\x20down\x20due\x20to\x20license\x20expiry','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','\x20\x20\x20\x20writes:\x20\x20\x20\x20','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','_isClusterController','system:drain','equals','listRoutes','free\x20tier','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','_baselines','\x27\x20is\x20already\x20registered','base64url','threads','Full-text\x20search','write','~lock','./okdb-export.ndjson','dbPath','OKDBTypeNotRegisteredError','\x20\x20+','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','system:clock_change','\x20\x20(','~processes:desired','set','\x20writes\x20(','_lastPublishAt','NAME','epoch','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','depth','127.0.0.1','kill','--changes','Hint:\x20','readFileSync','_singletonLocks','level','VERSION_MISMATCH','clearTtl','padStart','\x1b[0m','[okdb]\x20nothing\x20to\x20reset\x20—\x20','(empty)','_onPoke','\x0a[okdb]\x20error:\x20','_nodeDbCache','sourceType','halted','\x1b[33m','null','[okdb]\x20close\x20error:\x20','failures','[okdb]\x20created\x20.kdbconfig','\x22\x20matches\x20','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','SYSTEM_PROC','_onStop','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','primary','\x20\x20\x20\x20licensee:\x20\x20','4916659XjIBfk','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','busy','stdin','views','lifecycle','_nodeDbFor','processor:progress','\x20writer{depth=','child_process','\x22\x20to\x20enable\x20it.','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','properties','\x20process','error','--log-requests','isEnabled','[okdb]\x20unknown\x20token\x20action:\x20\x22','putSync','_scheduleFlush','rawBuf','_maybePublish','pid','__esModule','(unset)','LICENSE_TYPE_OPEN','__OKDB_PUB_FINGERPRINT__','setOwnMeta','../','filter','expiresAt','clusterWorkers','key','has','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','cli','fts:reset','_ensureDesired','(none)','\x20\x20(licensee:\x20','instanceId','transaction','bus:poke','--password','homedir','HTTP\x20','\x1b[37m','features','getChanges','length',':\x20key\x20[','OKDB_HTTP_WORKERS\x20env','compact','getDesired','fast','--version','ORPHAN\x20(env-closed\x20write)','ESRCH','processorId','--workers','writes=','maxExtra','_buckets','\x20\x20Error:\x20','open\x20','queue','setDesired','runtimeProcessesView','unclaimed','splice','_pending','OPEN','\x20\x20Writes:\x20\x20','resetIndex','cyan','types/env=','verify','_hbTimer','reset','isInteger','toString','\x27,\x20cannot\x20map\x20to\x20\x27','\x20+\x20','emit','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string',']\x20already\x20maps\x20to\x20\x27','gray','[okdb-cluster]\x20respawning\x20worker\x20slot=','startedAt','port','[okdb]\x20created\x20./okdb-data','\x20(expires\x20','[okdb]\x20importing\x20','__okdbSlot','events','method','\x27\x20on\x20type\x20\x27','shutting\x20down…\x0a','\x20to\x20browse\x20the\x20API,\x20','Engines','0123456789ABCDEFGHJKMNPQRSTVWXYZ','.okdb-write-test','listDesired','error:\x20','_activateProcesses','system:poke','heapTotal','\x20result','slot','workers','flushDebounce','parse','367590ahPkRC','SIGBREAK','http-server','standard','columns','utf8','firstTs','records','participate','export',')\x20exited\x20','process\x20','memoryUsage','version','system:ready','fts','oldestPendingMs','_singletonLock','env','path','ttl:expired','ttlMs','envsOpen','config\x20file\x20invalid:\x20','resetReadTxn','shmbuf.node','createdAt','put','license','dumpedAt','OKDBTypeAlreadyRegisteredError','registerType','\x20\x20\x20\x20admin:\x20http://localhost:','\x20forked\x20','_isWriter','\x20SECURITY\x20NOTICE','_writer','embedded','_selfKey','description','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','quantum','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','flushed','Unique\x20constraint\x20violated\x20on\x20','\x20\x20⚠\x20\x20','other','stats','readUInt8','\x0a[okdb]\x20fatal\x20error:','(primary\x20=\x20processor)','_drain','system:type_drop','close','FTS_RESET','__okdbCluster','[okdb]\x20blobs:\x20imported=','TYPE_NOT_REGISTERED','--eval','\x1b[34m','decodeActivationToken','targetKey','getCmd','/api/env/','_acquiredAt','inflightAgesMs','activateLicense','unlinkSync','fieldPath','off','\x20\x20\x20\x20\x20\x20','slotKey','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','Examples','cpuUsage','clearLine','registry\x20heartbeat\x20skipped\x20(writer=','cluster:\x20ready\x20(','win32','\x20\x20✓\x20OKDB\x20cluster\x20running','created','--help','_durs','hard-killed','rss','_clusterWorkerAttached','FOREIGN_KEY_VIOLATION','\x20not\x20found','register','decoded','FTS_REGISTERED','_versionSkewWarned','\x1b[36m','\x20supervised)','_buildChildRow','ITEM_UPDATE','catch','system:env_release','references','_collectSingletonClaims','SCHEMA_COLLECTION_INVALID','removeNode','~licenses','SIGINT\x20(double-tap)','readline','\x1b[2m','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','logRequests','type:drop','access:\x20',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','typeSubDbs','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','issuedAt','transactionSync','enabled','selfKey','_ownMeta','INVALID_VALUE','\x0a\x0a\x20\x20','drop','blobs','dead','state',':\x20processor\x20(HTTP-silent),\x20','\x1b[35m','_refreshDesiredSnapshot','processes:\x20','license:activated','node:events','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','[okdb]\x20error:\x20failed\x20to\x20read\x20','--name','_putRowAsync','--port','stderr','clusterStatusView','\x20\x20\x20\x20\x20http://localhost:','workersConfigured','acquiredAt','exports','ttl:clear','NOT_FOUND','options','--config','\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','sync:apply','1967972vXlPLC','_cmd','[okdb-cluster]\x20slot=','ms\x20(attempt\x20','single','\x20—\x20','password','active:','1905324mHjsbU','\x20\x20http://localhost:','number','TYPES','expiry','_key','[okdb]\x20import\x20complete','embeddings','_collectWriterFacet','treeView','[okdb]\x20exporting\x20env\x20\x22','_closed','_caps','__identity','--log-level','prompt','values','prependListener','\x20/\x20','\x0a\x20\x20No\x20routes\x20matching\x20\x22','VIEW_PROGRESS','Queue','meta','valid','\x20tokens:','_publishNow','_rootDb','uptime','\x27\x20already\x20registered','\x20\x20(no\x20env\x20draining)','_sandbox','PERMISSIONS','bus:env_release','stopped','SYNC_COMMITS','220932dijrpr','result','License\x20already\x20stored','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','inst:','%),\x20','\x20\x20\x20\x20graceful\x20shutdown\x0a','function','randomBytes','tags:\x20','respawnTimer','isConnected','Index\x20\x22','handle','\x20\x20✓\x20Removed\x20license\x20','index','_lastCpuUsage','\x20\x20records=','procmodeack/','../okdb','<json-body>','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','reverse','api','_startedAt','\x20while\x20this\x20process\x20runs\x20','processingStatusView','env/staging/info','SYSTEM_POKE','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','Records','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','ppid','\x20HTTP\x20server(s)\x20on\x20port\x20','/admin/index.html','_coordinator','_migrateVocab','stop','reason','heartbeatMs','import','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','stopHeartbeat','fork','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','assertFeature','\x20\x20skipped=','recheck','txn:end','--username','body:\x20','count','instances','LICENSE_FEATURE_DISABLED','processor:retry','ftsName','INDEX_READY','heapUsed','\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','\x20\x20Usage:','[env]','\x20\x20(need\x20≥\x2018)','--open','code','okdb.pid','_released','isFile','\x20\x20\x20\x20license:\x20','holder','config\x20file\x20valid:\x20','false','build','signalWant','config','licensed','Files','white','decommission','toISOString','\x20\x20→\x20\x20','1ofN:','markClosed','name','\x20\x20Path\x20access','index:registered','[okdb]\x20loaded\x20config:\x20','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','--address','_admissionTimer','async','[body]','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','node\x20','\x20(expires\x20in\x20','licenseHash','\x20\x20\x20\x20port:\x20\x20','creating','keys/public.pem','admin','none','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','--grants','_desired','_lastCpuAt','pin','listNodes','_enableChangelog','System','exec','7LVarjT','INDEX_REGISTERED','--env','backup','start\x20','building','_getType','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','mean','loop-lag\x20','noAdmin','files/','waiting','--no-repl','.kdbconfig','GET',',\x20signal=','line','FTS_DROP','pause','every','isTTY','value','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','targetType','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','OKDBForeignKeyError','\x20\x20env=','shmbuf/package.json','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','type','trim','exportBlobs','<path>','cpuWindowMs','message','_processStartedAt','application/json','_report','resetting',',\x20got\x20','seq','_nodeDead','some','\x20day(s).','licenseId','Activation\x20invalid:\x20','\x20\x20\x20\x20path:\x20\x20','SIG_INVALID','(code=','_wantDbHandle','processors','reap','childTransaction','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','_threadStats','\x20<path>\x20[json-body]','license:removed',':want','xdg-open\x20','min','_sampleOwnStats','host','Schema\x20validation\x20failed\x20for\x20','setLogger','\x20\x20Common\x20causes:','_log','readUInt16BE','_onTick','\x20\x20·\x20\x20','recent\x20writes\x20(newest\x20first)','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','\x20\x20✗','expired','registry-publish','_rowKey','process','_quantum','\x20opening\x20','\x20\x20✓\x20Revoked\x20token\x20','debug','indexOf','database\x20path\x20writable:\x20','maxWrites','_nodeDb','_envs','_inflight','dedupeMax','importBlobs','[okdb]\x20invalid\x20','unique:violation_resolved','\x22.\x20Use:\x20create,\x20list,\x20revoke','updatedAt','(worst\x20','toUpperCase','setPrompt','hex','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','help','default','OKDBUniqueConstraintError','question','grants','effective','unknown','env:opened','killable','logLevel','_clusterOnMessage','[okdb]\x20error:\x20--password\x20requires\x20--name','isHeld','timeMachine','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','EXIT','ttl','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','\x20\x20\x20\x20usage:\x20\x20\x20','_buildProcessingFacet','license:added','processing','identity','\x20\x20\x20http://localhost:','bus:proc','_dedupeMax','type/users','ROUTES','round','_handleInProcess','_bpParkedTotal','status','caps','unref','stringify','licenses','der','--env\x20<name>','okdb','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','\x20statusEnv=','attachFeed','HELP','current','\x20\x20\x20\x20addedAt:\x20\x20\x20','decodeLicenseBlob','yes','getRange','--label','fill','startHeartbeat','finally','License\x20expired\x20or\x20invalidated','loadEnvFile','\x20logs\x20off\x0a','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','PIN','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','exp','green','level:\x20info','_lastCpuWindowMs','system:stopped','\x20MB)','raw-put','processor:paused','attach','--no-admin','hasType','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','received\x20','\x20died\x20','ITEM_REMOVE','isDead','publishChildRow','Environments','update','__writeCounter','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','changes','_lastCpuPct','\x20env','registerFts','kind','parkedNow','_ensureTokensType','processor:resumed','cluster:','writerStatus','deaths','cause','CREATED','hint','stopping','OKDB-PIN-V1:','port\x20','[okdb]\x20preserved:\x20','typesPerEnv','\x20deleted','item:remove','SIGINT','disconnect','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','syncPeers','once','/type/users\x0a\x20\x20\x20\x20','slice','stdout','supervisorKey','--ttl','get','node:perf_hooks','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','processes','LICENSE_HASH_MISMATCH','startsWith','noCluster','call','object','No\x20license\x20found\x20matching\x20this\x20activation\x20token','consecutiveFailures','envs','getSecurityNotices','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','_markSeen','env/','msg','node/','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','1713eDaQaI','data','_instanceId','[okdb]\x20started\x20in\x20','FEATURES','_active','createServer','access','INDEX_PROGRESS','maxMs','\x20pid=','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','[okdb]\x20export\x20complete','_statusEnv','reload','ENV','decommissioning','_heartbeatInFlight','captureStackTrace','\x20\x20✓\x20','timingSafeEqual','hostname','fromEntries','INDEX_ALREADY_REGISTERED','--watch','details','toLowerCase','schema:drop','\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','_admissionStarted','processKey','byteLength','\x20licenses','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','\x20\x20Expected\x20one\x20of:','\x20\x20\x20\x20port:\x20\x20\x20\x20','_db','3933117jVZvXJ','[okdb]\x20invalid\x20port:\x20','writeUInt8','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','view','confirm','clearThreadStats','http','_heartbeatTimer','node:crypto','children','\x20\x20(unlimited)','--permissions','ms\x20activeWriters=','beforeWrite','_cursors','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','event','__vocab/version','entries','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','No\x20tokens.','\x20active\x20env:\x20','rmSync','cursorKey','system','_buildOwnRow','active','magenta','database\x20path\x20not\x20writable:\x20','isPrimary','(no\x20types)','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','draining','mcp','ms\x20p99=','transport','addLicense','fn-runner','/\x20quit\x20/\x20Ctrl+C','LABEL','worker','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','OKDBIndexNotRegisteredError','procmode/','standalone','exit','\x20\x20Shell\x20commands','LICENSED_BUILD','_enqueuedAt','PATCH','types\x20--env\x20staging','argv','\x0a\x20\x20\x20\x20','LICENSE_ACTIVATION_INVALID','type:registered','\x20log\x20level:\x20','randomUUID','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','\x20sync','default:\x20cores−1\x20=\x20','Type\x20\x27','\x20parkedNow=','bus:drain','_removeRowAsync','race','create','\x20\x20\x20\x20','--no-cluster','_draining','\x20\x20\x20\x20path:\x20\x20\x20\x20','ingest','node','--test','unhandledRejection','readUInt32BE','appendFileSync','committed','\x0a\x20\x20okdb\x20doctor\x0a','_groupByProcess','external','allSettled','init','_lockDb','dynamic','\x20\x20\x20\x20\x20\x20\x20','rowKey','ITEM_CREATE','fts:drop','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','existsSync','\x0a\x20\x20\x20\x20\x20\x20','_isFree','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','8zndCkn','replace','resetFts','find','payload','afterWrite','_committed','_license','net','token','isArray','_listenAddr','cluster','bind','_startHeartbeat','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','\x20\x20[','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','quit','_outstanding','_flushTimer','license:invalid','no\x20.kdbconfig\x20(using\x20defaults)','forEach','_computeStatus','removeLicense','Release','freeze','_windowCbs','namespace','role','entry','split','\x20\x20[okdb]\x20closed\x20cleanly\x0a','_wantDb','offWindow','USE','writeUInt32BE','info','3234fOcyVP','feed:','_rawDb','\x20(durable\x20desired-state)','allocUnsafe','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','dim','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','repeat',',\x20closing…\x0a','derivePin','[okdb]\x20backup\x20complete','\x20\x20\x20\x20features:\x20\x20','\x27\x20doesn\x27t\x20exist','keys:','_dedupeKey','passive\x20HTTP\x20worker(s)\x20serving\x20:','claimGated','_startAdmission','_bpWaiters','_publishFailWarned','note','SIGTERM','[okdb]\x20error:\x20','[on|off|level]',');\x20','perf_hooks','[okdb]\x20exported\x20\x20types=','OKDBSchemaCollectionError','[okdb]\x20exporting\x20blobs…','copy','\x20for\x20commands,\x20','body','test','bold','License\x20limit\x20exceeded:\x20','\x20(slot=','/api/','warn','_highWater','\x20already\x20exists','[filter]','EXPIRES','listenAddr','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','Index\x20\x27','from','--inspect','2.2.0','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','digest','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','limits','ephemeral','listening','ms\x20env=','schema:set','Types','shmbufNative','\x20bytes,\x20need\x20>=\x2065)','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','\x20worker\x20slot=','processors/','OKDBInvalidIndexKeyError','writeUInt16BE','resolve','\x22\x20(must\x20be\x20debug|info|warn|error)','createEnvironment','cpus','blob','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','shift','singletonClaims','\x20does\x20not\x20exist',',\x20stopping\x20workers…\x0a','_done','PUT','\x20HTTP\x20workers\x20','--path','dropping','indexes','terminal','compaction','sizeBefore','map','okdb-diag.','\x20\x20\x20\x20expires:\x20\x20\x20','remove','transport:\x20','toLocaleString','recordWrite','bumpCmd','ref:violation','config\x20http.workers','createInterface','hasDesired','\x20\x20(name:\x20','\x20\x20\x20\x20permissions:\x20','ALREADY_EXISTS','--types','verifyActivation','ACTIVATION_EXPIRED','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','_isReader','\x20===','dropType','Embeddings','platform','_flushDebounce','system:bus_state_change','ENV_CLOSING_RETRY','LOGS','fts:registered','tags','reportThreadStats','load','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','~tokens','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','flushLmdb','dirname','\x0a\x20\x20Invalid\x20JSON:\x20','files','openDB','isFeatureEnabled','{}[]:,\x27\x22','INDEX_RESET','putNode','registry\x20publish\x20failing:\x20','licensee','execArgv','uuid','darwin','POST','\x20\x20Some\x20checks\x20failed.\x0a','\x20@\x20','list','_supervisorKey','nodeKey','getPins','\x20→\x20POST\x20/api/env/','running','INVALID_PRIMARY_KEY','removeSync','\x20in\x20','_handlePoke','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','indexToDb',')\x20to\x20your\x20license\x20vendor.','ready','MALFORMED_TOKEN','_timer','detectInputType','summary','invalid','_adminRelay','Cannot\x20set\x20enforce\x20schema\x20on\x20','ms\x20busy=','--key','PUT\x20type/users/item/x\x20{\x22n\x22:1}','types:','sizeAfter','_kind','\x20which\x20does\x20not\x20exist','size','includes','_seen','claims','change','floor','PUB_FINGERPRINT','publishOwnRow','auth','use','fts:','toFixed','\x20\x20╔═══════════════════════════╗','sync','\x22\x20→\x20','operation','pushEphemeral','OKDBForeignKeyDeleteError','migrate','_started','\x20logs\x20on\x20\x20','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','charCodeAt','LICENSE_LIMIT_EXCEEDED','ceil','TYPE_ALREADY_REGISTERED','resume','listen','sort','\x20\x20✓\x20http\x20listening\x20on\x20:','\x0a\x20\x20✓\x20License\x20added','\x20worker(s)\x20still\x20serving','fanout','sha256','PUBLIC_KEY_PEM','selfAddress','_desiredOverlay','_onItem','registerIndex','txn:start','\x20MB\x20→\x20','idx:','stack','\x20\x20Envs:\x20\x20\x20\x20','\x0a\x20\x20','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','start','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','updateSupervisedChildStats','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','nodesView','_openEnvLazy','OKDBNotFoundError','label','_participate','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','ms\x20on\x20env=','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','SIGKILL','functions','DELETE','user','safety','commitP99Ms','ref:violation_resolved','\x20file','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','prototype','activation','statSync','[okdb]\x20starting…\x0a','\x20\x20Type\x20','\x20\x20·\x20','username','\x20\x20@','(null)','max','then','ms\x20max=','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','workersFlag','SYSTEM_STOPPED','createHmac','delete','revoke','detachConsole','/api','join','use\x20<env>','clear','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','address','\x20records…','log','mode','enable','\x0a\x20\x20✓\x20Token\x20created','true','_changefeed','_systemEnv','disable','\x20\x20#','\x20\x20\x20\x20status:\x20\x20\x20\x20','getClock','isWanted','--token','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','add','Sync','param','_drainOne','wrong_node','OKDBIndexHasConsumersError','\x20documents\x20fail\x20validation','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','LICENSE_EXPIRED_ACTION','send','\x0a\x20\x20✓\x20License\x20activated','Version\x20mismatch\x20for\x20','\x20\x20✓\x20database\x20opened\x0a','processor:error','migrations','cpuPct','permissions','push','./okdb-data','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','routes','setTtl','hasOwnProperty','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','string',':\x20expected\x20','item:update','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','processor:ready','\x20\x20⚠','./okdb-backup','Invalid\x20license\x20blob:\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','getProcess','red','isWorker','5OSbRlS','padEnd','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','noRepl','mkdirSync','\x20already\x20in\x20use','env/:env','licenseType','assertLimit','\x20more','release','[okdb]\x20port\x20','[okdb]\x20cluster\x20primary\x20pid=','engines','listLicenses','[okdb]\x20opening\x20','keys','txn:rollback','online','Token\x20secret\x20not\x20configured','\x1b[90m','[okdb-cluster]\x20','[okdb-cluster]\x20worker\x20pid=','now','_children','history','concat','okdb-writer:\x20env\x20closing\x20—\x20retry','sig','writeFileSync','\x20\x20score:','hidden','open','UNIQUE_CONSTRAINT','OKDB_HTTP_WORKERS','\x20(must\x20be\x201–65535)','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','{}[]:,\x0a\x0d\x09\x20','extend','LICENSEE','\x20times\x20in\x20','INDEX_HAS_CONSUMERS','yellow','val','title','dropFts','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','LICENSE_INVALID','types','server','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','_putRowSync','time','starting','_onProcEvent','sub','/type/users/query\x0a\x20\x20\x20\x20','bus:type_drop','Admin','.kdb_history','input:\x20','Build\x20expects\x20public\x20key\x20fingerprint\x20','_isStale','(on\x20any\x20path\x20command)','ms\x20mean=','Feature\x20not\x20licensed:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','inputSchema','[okdb]\x20backing\x20up\x20to\x20','_role',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','shutdown','_licenseHash','_lock','boolean'];_0x5443=function(){return _0x5ccd35;};return _0x5443();}function _0x16c8(_0x4668a4,_0x7c64e9){_0x4668a4=_0x4668a4-0x162;const _0x544382=_0x5443();let _0x16c8a4=_0x544382[_0x4668a4];return _0x16c8a4;}function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x29aa26=require$$0$1;function _0x315973(_0x3f4cd5,_0x4f3708){const _0xd5b642=_0x16c8;return _0x29aa26[_0xd5b642(0x4bf)]('sha256',_0x4f3708)[_0xd5b642(0x2e8)](_0x3f4cd5)[_0xd5b642(0x3f9)](_0xd5b642(0x554));}function _0x6407a6(_0x17dc0b,_0x4d27e4){const _0x41d6cf=_0x16c8;if(typeof _0x17dc0b!==_0x41d6cf(0x4f0)||typeof _0x4d27e4!==_0x41d6cf(0x4f0))return![];if(Buffer[_0x41d6cf(0x33c)](_0x17dc0b)!==Buffer[_0x41d6cf(0x33c)](_0x4d27e4))return![];return _0x29aa26[_0x41d6cf(0x331)](Buffer['from'](_0x17dc0b),Buffer[_0x41d6cf(0x3f5)](_0x4d27e4));}function _0xc39b6f(_0x17a268){const _0x13e3dc=_0x16c8;if(!_0x17a268?.[_0x13e3dc(0x30f)]('Bearer\x20'))return null;return _0x17a268[_0x13e3dc(0x306)](0x7);}function _0x5461ba(_0x41104c=0x20){const _0x42f288=_0x16c8;return _0x29aa26['randomBytes'](_0x41104c)[_0x42f288(0x5d8)](_0x42f288(0x554));}function _0x14a091(_0x10b93b){const _0x2539e8=_0x16c8;return _0x29aa26['createHash'](_0x2539e8(0x48c))[_0x2539e8(0x2e8)](_0x10b93b)[_0x2539e8(0x3f9)](_0x2539e8(0x299));}function _0x3c6405(_0x204aff,_0x49b055,_0x383104=0x36ee80){const _0x4143f8=_0x16c8;if(!_0x49b055)throw new Error(_0x4143f8(0x510));const _0xc7a71b=Date[_0x4143f8(0x514)](),_0x219c62=Buffer[_0x4143f8(0x3f5)](JSON[_0x4143f8(0x2be)]({'iat':_0xc7a71b,'exp':_0xc7a71b+_0x383104,'sub':_0x204aff?.['id']??_0x204aff?.[_0x4143f8(0x534)]??null,'username':_0x204aff?.['username']??_0x204aff?.[_0x4143f8(0x21d)]??null,'roles':Array[_0x4143f8(0x3aa)](_0x204aff?.['roles'])?_0x204aff['roles']:[]}))['toString'](_0x4143f8(0x554)),_0x591cd9=_0x315973(_0x219c62,_0x49b055);return _0x219c62+'.'+_0x591cd9;}function _0x205de2(_0x5cb3e1,_0x6f600d){const _0x50698a=_0x16c8;if(!_0x6f600d||typeof _0x5cb3e1!==_0x50698a(0x4f0))return null;const [_0x1f110c,_0x1da088]=_0x5cb3e1[_0x50698a(0x3c0)]('.');if(!_0x1f110c||!_0x1da088)return null;const _0x2a3e3c=_0x315973(_0x1f110c,_0x6f600d);if(!_0x6407a6(_0x1da088,_0x2a3e3c))return null;try{const _0x4b5584=JSON[_0x50698a(0x5f7)](Buffer['from'](_0x1f110c,_0x50698a(0x554))[_0x50698a(0x5d8)]()),_0x15098a=0x7530;if(Date[_0x50698a(0x514)]()>Number(_0x4b5584?.['exp']??0x0)+_0x15098a)return null;return _0x4b5584;}catch{return null;}}async function _0x3d1657(_0x1304a1){return new Promise((_0x44859d,_0x1f8913)=>{const _0x1a8219=_0x16c8,_0x116f2a=_0x29aa26[_0x1a8219(0x1d2)](0x10);_0x29aa26['scrypt'](_0x1304a1,_0x116f2a,0x40,(_0x5c8ca8,_0x1d1fdf)=>{const _0x26562f=_0x1a8219;if(_0x5c8ca8)_0x1f8913(_0x5c8ca8);_0x44859d(_0x116f2a['toString'](_0x26562f(0x299))+':'+_0x1d1fdf[_0x26562f(0x5d8)]('hex'));});});}async function _0x149b4a(_0xde9410,_0x17f7df){const _0x52bdd7=_0x16c8,[_0x38790c,_0x1279e1]=_0x17f7df[_0x52bdd7(0x3c0)](':');if(!_0x38790c||!_0x1279e1)return![];const _0x4e36d9=Buffer[_0x52bdd7(0x3f5)](_0x38790c,_0x52bdd7(0x299));return new Promise((_0x59f443,_0x4df11f)=>{_0x29aa26['scrypt'](_0xde9410,_0x4e36d9,0x40,(_0x135f71,_0x1c49dd)=>{const _0x25a366=_0x16c8;if(_0x135f71)_0x4df11f(_0x135f71);_0x59f443(_0x29aa26[_0x25a366(0x331)](_0x1c49dd,Buffer[_0x25a366(0x3f5)](_0x1279e1,_0x25a366(0x299))));});});}return okdbAuthTokens={'hmac':_0x315973,'timingSafeEqual':_0x6407a6,'parseBearer':_0xc39b6f,'randomToken':_0x5461ba,'hashToken':_0x14a091,'issueToken':_0x3c6405,'authenticateToken':_0x205de2,'hashPassword':_0x3d1657,'verifyPassword':_0x149b4a},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x1b8c68=_0x12dbbc;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x2de0ba=require$$0$2,_0x412c71=_0x1b8c68(0x5ec),_0x2a1219=new Uint8Array(0x100)[_0x1b8c68(0x2cd)](0xff);for(let _0xb0e11e=0x0;_0xb0e11e<_0x412c71[_0x1b8c68(0x5b9)];_0xb0e11e++){_0x2a1219[_0x412c71[_0x1b8c68(0x481)](_0xb0e11e)]=_0xb0e11e,_0x2a1219[_0x412c71[_0x1b8c68(0x481)](_0xb0e11e)+0x20]=_0xb0e11e;}_0x2a1219['O'['charCodeAt'](0x0)]=0x0,_0x2a1219['o'[_0x1b8c68(0x481)](0x0)]=0x0,_0x2a1219['I'[_0x1b8c68(0x481)](0x0)]=0x1,_0x2a1219['i'[_0x1b8c68(0x481)](0x0)]=0x1,_0x2a1219['L'[_0x1b8c68(0x481)](0x0)]=0x1,_0x2a1219['l'[_0x1b8c68(0x481)](0x0)]=0x1;function _0x388001(_0x1f31ef){const _0x1411e3=_0x1b8c68;let _0x2da521=0x0,_0x10c92b=0x0,_0x3dab4f='';for(let _0x5a583d=0x0;_0x5a583d<_0x1f31ef[_0x1411e3(0x5b9)];_0x5a583d++){_0x10c92b=_0x10c92b<<0x8|_0x1f31ef[_0x5a583d],_0x2da521+=0x8;while(_0x2da521>=0x5){_0x2da521-=0x5,_0x3dab4f+=_0x412c71[_0x10c92b>>>_0x2da521&0x1f];}}return _0x2da521>0x0&&(_0x3dab4f+=_0x412c71[_0x10c92b<<0x5-_0x2da521&0x1f]),_0x3dab4f;}function _0x199519(_0xd7a0b1){const _0x30003a=_0x1b8c68;_0xd7a0b1=_0xd7a0b1['replace'](/-/g,'')[_0x30003a(0x297)]();let _0x2e0b9b=0x0,_0x262d57=0x0;const _0x4ab6b1=[];for(let _0x32e297=0x0;_0x32e297<_0xd7a0b1[_0x30003a(0x5b9)];_0x32e297++){const _0xfc725=_0x2a1219[_0xd7a0b1[_0x30003a(0x481)](_0x32e297)];if(_0xfc725===0xff)continue;_0x262d57=_0x262d57<<0x5|_0xfc725,_0x2e0b9b+=0x5,_0x2e0b9b>=0x8&&(_0x2e0b9b-=0x8,_0x4ab6b1[_0x30003a(0x4e9)](_0x262d57>>>_0x2e0b9b&0xff));}return Buffer[_0x30003a(0x3f5)](_0x4ab6b1);}const _0x3503e2=[_0x1b8c68(0x478),_0x1b8c68(0x1ae),_0x1b8c68(0x50a),_0x1b8c68(0x607),_0x1b8c68(0x2a8),_0x1b8c68(0x58a),'mcp',_0x1b8c68(0x441)],_0x23cea2=0x0,_0x460447=0x1,_0x565092=0x2,_0x25bee7=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x328e45({issuedAt:_0x2a041d,expiresAt:_0x529be4,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x23cea2}){const _0x1838cd=_0x1b8c68,_0x26b9ee=Buffer[_0x1838cd(0x3f5)](licensee,_0x1838cd(0x5fd))[_0x1838cd(0x306)](0x0,0x40),_0x441556=0x1+0x1+0x4+0x4+0x1+_0x26b9ee['length']+0x2+0x10,_0x18549c=Buffer[_0x1838cd(0x3cb)](_0x441556);let _0x30369b=0x0;_0x18549c[_0x1838cd(0x344)](0x1,_0x30369b++),_0x18549c['writeUInt8'](licenseType,_0x30369b++),_0x18549c[_0x1838cd(0x3c5)](Math[_0x1838cd(0x470)](_0x2a041d/0x3e8),_0x30369b),_0x30369b+=0x4,_0x18549c[_0x1838cd(0x3c5)](Math[_0x1838cd(0x470)](_0x529be4/0x3e8),_0x30369b),_0x30369b+=0x4,_0x18549c[_0x1838cd(0x344)](_0x26b9ee[_0x1838cd(0x5b9)],_0x30369b++),_0x26b9ee['copy'](_0x18549c,_0x30369b),_0x30369b+=_0x26b9ee['length'];let _0x4cbb06=0x0;for(let _0x44246f=0x0;_0x44246f<_0x3503e2[_0x1838cd(0x5b9)];_0x44246f++){if(features[_0x3503e2[_0x44246f]])_0x4cbb06|=0x1<<_0x44246f;}_0x18549c[_0x1838cd(0x407)](_0x4cbb06,_0x30369b),_0x30369b+=0x2;const _0x21c93f=[_0x1838cd(0x315),'typesPerEnv',_0x1838cd(0x303),_0x1838cd(0x28c)];for(const _0x1bdf50 of _0x21c93f){_0x18549c[_0x1838cd(0x3c5)](limits[_0x1bdf50]||0x0,_0x30369b),_0x30369b+=0x4;}return _0x18549c;}function _0x262117(_0x53dff2){const _0x23eee4=_0x1b8c68;let _0x1f2115=0x0;const _0x267c3a=_0x53dff2[_0x23eee4(0x628)](_0x1f2115++),_0x2bd2ea=_0x53dff2['readUInt8'](_0x1f2115++),_0x2251d7=_0x53dff2['readUInt32BE'](_0x1f2115);_0x1f2115+=0x4;const _0x1d87ac=_0x53dff2['readUInt32BE'](_0x1f2115);_0x1f2115+=0x4;const _0x1944f1=_0x53dff2[_0x23eee4(0x628)](_0x1f2115++),_0x39c103=_0x53dff2['slice'](_0x1f2115,_0x1f2115+_0x1944f1)[_0x23eee4(0x5d8)]('utf8');_0x1f2115+=_0x1944f1;const _0x299d24=_0x53dff2[_0x23eee4(0x27c)](_0x1f2115);_0x1f2115+=0x2;const _0x5e5f90={};for(let _0xc8a442=0x0;_0xc8a442<_0x3503e2[_0x23eee4(0x5b9)];_0xc8a442++){_0x5e5f90[_0x3503e2[_0xc8a442]]=Boolean(_0x299d24&0x1<<_0xc8a442);}const _0x4a4de0=[_0x23eee4(0x315),_0x23eee4(0x2fd),'syncPeers',_0x23eee4(0x28c)],_0x98e9cd={};for(const _0x26b587 of _0x4a4de0){const _0x29563c=_0x53dff2[_0x23eee4(0x38d)](_0x1f2115);_0x1f2115+=0x4,_0x98e9cd[_0x26b587]=_0x29563c===0x0?null:_0x29563c;}return{'v':_0x267c3a,'licenseType':_0x2bd2ea,'issuedAt':_0x2251d7*0x3e8,'expiresAt':_0x1d87ac*0x3e8,'licensee':_0x39c103,'features':_0x5e5f90,'limits':_0x98e9cd};}function _0xec55a5(_0x2b4663,_0x3e2718){const _0x2db9ea=_0x1b8c68,_0x3e6aac=Buffer['concat']([_0x2b4663,_0x3e2718]),_0x3bb459=_0x388001(_0x3e6aac),_0x5d19fd=[];for(let _0x3bd94c=0x0;_0x3bd94c<_0x3bb459[_0x2db9ea(0x5b9)];_0x3bd94c+=0x8){_0x5d19fd[_0x2db9ea(0x4e9)](_0x3bb459[_0x2db9ea(0x306)](_0x3bd94c,_0x3bd94c+0x8));}return _0x5d19fd[_0x2db9ea(0x4c4)]('-');}function _0x4731c6(_0x57117e){const _0x4d9d64=_0x1b8c68;if(typeof _0x57117e!=='string')throw new Error(_0x4d9d64(0x42d));const _0x50001f=_0x199519(_0x57117e[_0x4d9d64(0x3a1)](/-/g,''));if(_0x50001f[_0x4d9d64(0x5b9)]<0x41)throw new Error(_0x4d9d64(0x43b)+_0x50001f[_0x4d9d64(0x5b9)]+_0x4d9d64(0x402));const _0x492b53=_0x50001f[_0x4d9d64(0x306)](0x0,_0x50001f[_0x4d9d64(0x5b9)]-0x40),_0x568a3a=_0x50001f['slice'](_0x50001f[_0x4d9d64(0x5b9)]-0x40);let _0x171e56;try{_0x171e56=_0x262117(_0x492b53);}catch(_0x3fb675){throw new Error(_0x4d9d64(0x221)+_0x3fb675[_0x4d9d64(0x25c)]);}return{'rawBuf':_0x50001f,'payload':_0x492b53,'sig':_0x568a3a,'decoded':_0x171e56};}function _0x4223bd(_0x5a5ffd){const _0xa5dca7=_0x1b8c68;return _0x2de0ba['createHash'](_0xa5dca7(0x48c))[_0xa5dca7(0x2e8)](_0x5a5ffd)[_0xa5dca7(0x3f9)]()['slice'](0x0,0x8);}function _0x5ee7bb(_0x41d39b,_0x310bcf,_0x39fb97){const _0x3921a4=_0x1b8c68,_0x1ddddd=_0x3921a4(0x2fa)+_0x39fb97,_0x2fc2f9=Buffer[_0x3921a4(0x517)]([Buffer[_0x3921a4(0x3f5)](_0x41d39b,_0x3921a4(0x5fd)),_0x310bcf]),_0x3ed975=_0x2de0ba[_0x3921a4(0x4bf)](_0x3921a4(0x48c),_0x1ddddd)[_0x3921a4(0x2e8)](_0x2fc2f9)[_0x3921a4(0x3f9)](),_0x5a84cd=_0x388001(_0x3ed975['slice'](0x0,0x5));return{'pin':_0x5a84cd,'pinHmac':_0x3ed975};}function _0x316e33(_0x1cd39e,_0x178bef,_0x351611){const _0x387291=_0x1b8c68,_0x5bcdb2=Buffer[_0x387291(0x3cb)](0x4d);let _0xdbbd7b=0x0;_0x5bcdb2[_0x387291(0x344)](0x1,_0xdbbd7b++),_0x1cd39e[_0x387291(0x3e5)](_0x5bcdb2,_0xdbbd7b),_0xdbbd7b+=0x8,_0x5bcdb2[_0x387291(0x3c5)](_0x178bef,_0xdbbd7b),_0xdbbd7b+=0x4,_0x351611[_0x387291(0x3e5)](_0x5bcdb2,_0xdbbd7b);const _0xc2e8b8=_0x388001(_0x5bcdb2),_0x1f0474=[];for(let _0x2a452b=0x0;_0x2a452b<_0xc2e8b8[_0x387291(0x5b9)];_0x2a452b+=0x6){_0x1f0474[_0x387291(0x4e9)](_0xc2e8b8[_0x387291(0x306)](_0x2a452b,_0x2a452b+0x6));}return _0x1f0474[_0x387291(0x4c4)]('-');}function _0x26e8ca(_0xae5cf5){const _0x9786dd=_0x1b8c68;if(typeof _0xae5cf5!==_0x9786dd(0x4f0))throw new Error(_0x9786dd(0x5dc));const _0xb571b7=_0x199519(_0xae5cf5[_0x9786dd(0x3a1)](/-/g,''));if(_0xb571b7[_0x9786dd(0x5b9)]!==0x4d)throw new Error(_0x9786dd(0x2aa)+_0xb571b7[_0x9786dd(0x5b9)]);let _0x5e53ad=0x0;const _0x18dce6=_0xb571b7['readUInt8'](_0x5e53ad++),_0x219e71=_0xb571b7['slice'](_0x5e53ad,_0x5e53ad+0x8);_0x5e53ad+=0x8;const _0x330d12=_0xb571b7[_0x9786dd(0x38d)](_0x5e53ad);_0x5e53ad+=0x4;const _0x4d89b9=_0xb571b7[_0x9786dd(0x306)](_0x5e53ad);return{'v':_0x18dce6,'licenseHash':_0x219e71,'expiry':_0x330d12,'sig':_0x4d89b9};}function _0x2e06df({tokenString:_0x5b2feb,nodeId:_0x2cc190,rawBlobBuf:_0x325fa7,pubKeyPem:_0x5da63c,pubFingerprint:_0x3847f3}){const _0x59f970=_0x1b8c68;let _0x15cead;try{_0x15cead=_0x26e8ca(_0x5b2feb);}catch(_0x52f33a){return{'valid':![],'reason':_0x59f970(0x45d)};}const _0x24974a=_0x4223bd(_0x325fa7);if(!_0x24974a[_0x59f970(0x54e)](_0x15cead['licenseHash']))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0xb64d83}=_0x5ee7bb(_0x2cc190,_0x24974a,_0x3847f3),_0x4bc9ad=Buffer[_0x59f970(0x3cb)](0x4);_0x4bc9ad['writeUInt32BE'](_0x15cead[_0x59f970(0x1ab)],0x0);const _0x38ad4e=Buffer[_0x59f970(0x517)]([Buffer['from']([_0x15cead['v']]),_0xb64d83[_0x59f970(0x306)](0x0,0x5),_0x15cead[_0x59f970(0x22a)],_0x4bc9ad]);try{const _0x5b14ca=_0x2de0ba[_0x59f970(0x5d4)](null,_0x38ad4e,_0x5da63c,_0x15cead[_0x59f970(0x519)]);if(!_0x5b14ca)return{'valid':![],'reason':_0x59f970(0x269)};}catch(_0x5954c6){return{'valid':![],'reason':_0x59f970(0x269)};}if(_0x15cead[_0x59f970(0x1ab)]<Date[_0x59f970(0x514)]()/0x3e8)return{'valid':![],'reason':_0x59f970(0x42c)};return{'valid':!![],'reason':'ok'};}function _0x2cc4e3(_0x4105e1){const _0x278271=_0x1b8c68;if(typeof _0x4105e1!==_0x278271(0x4f0))return _0x278271(0x2a1);const _0x441392=_0x4105e1[_0x278271(0x258)]();if(_0x441392['startsWith']('/')||_0x441392['startsWith']('./')||_0x441392[_0x278271(0x30f)](_0x278271(0x5a2))||/^[A-Za-z]:[\\/]/[_0x278271(0x3e8)](_0x441392))return _0x278271(0x60b);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x278271(0x3e8)](_0x441392))return _0x278271(0x44a);const _0x533e33=_0x441392['replace'](/[\s-]+/g,'')[_0x278271(0x5b9)];if(_0x533e33===0x7c)return _0x278271(0x4b1);if(_0x533e33>=0x95&&_0x533e33<=0xfc)return'blob';return _0x278271(0x2a1);}return okdbLicenseCodec={'toBase32':_0x388001,'fromBase32':_0x199519,'encodeLicensePayload':_0x328e45,'decodeLicensePayload':_0x262117,'encodeLicenseBlob':_0xec55a5,'decodeLicenseBlob':_0x4731c6,'licenseHash':_0x4223bd,'derivePin':_0x5ee7bb,'encodeActivationToken':_0x316e33,'decodeActivationToken':_0x26e8ca,'verifyActivation':_0x2e06df,'detectInputType':_0x2cc4e3,'FEATURE_NAMES':_0x3503e2,'LICENSE_TYPE_STANDARD':_0x23cea2,'LICENSE_TYPE_OPEN':_0x460447,'LICENSE_TYPE_INTERNAL':_0x565092,'OPEN_LICENSE_MAX_DURATION_MS':_0x25bee7},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0xa4b00a extends Error{constructor(_0x2e1909,_0x485ffd,_0x50ab57={}){const _0x44d1eb=_0x16c8;super(_0x2e1909),this[_0x44d1eb(0x21d)]='OKDBError',this[_0x44d1eb(0x20a)]=_0x485ffd,this[_0x44d1eb(0x336)]=_0x50ab57,_0x50ab57[_0x44d1eb(0x2f6)]&&(this[_0x44d1eb(0x2f6)]=_0x50ab57[_0x44d1eb(0x2f6)]),Error[_0x44d1eb(0x32f)](this,this['constructor']);}}class _0x5c1c58 extends _0xa4b00a{constructor(_0x67821e,_0x582924,_0x4c25eb,_0x3c0d50){const _0x4763b1=_0x16c8;super(_0x4763b1(0x4e3)+_0x67821e+'@'+_0x582924+_0x4763b1(0x4f1)+_0x4c25eb+_0x4763b1(0x261)+_0x3c0d50,_0x4763b1(0x56f),{'type':_0x67821e,'key':_0x582924,'expectedVersion':_0x4c25eb,'actualVersion':_0x3c0d50}),this[_0x4763b1(0x21d)]='OKDBVersionMismatchError';}}class _0x114e25 extends _0xa4b00a{constructor(_0x301a91,_0x4979e2){const _0x3d25a6=_0x16c8;super(_0x301a91+'@'+_0x4979e2+'\x20does\x20not\x20exist',_0x3d25a6(0x19a),{'type':_0x301a91,'key':_0x4979e2}),this[_0x3d25a6(0x21d)]=_0x3d25a6(0x4a0);}}class _0x23bf38 extends _0xa4b00a{constructor(_0x11f382,_0x2fe09a){const _0x3c8eea=_0x16c8;super(_0x11f382+'@'+_0x2fe09a+_0x3c8eea(0x3ef),_0x3c8eea(0x429),{'type':_0x11f382,'key':_0x2fe09a}),this[_0x3c8eea(0x21d)]='OKDBAlreadyExistsError';}}class _0xd6e432 extends _0xa4b00a{constructor(_0x53fe71,_0xe18ad){const _0x45110a=_0x16c8,_0x12f4bc=typeof _0xe18ad;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x53fe71+'\x27:\x20'+_0x12f4bc+_0x45110a(0x580)+_0xe18ad,'INVALID_INDEX_KEY',{'index':_0x53fe71,'key':_0xe18ad,'keyType':_0x12f4bc}),this[_0x45110a(0x21d)]=_0x45110a(0x406);}}class _0x3af4a8 extends _0xa4b00a{constructor(_0x11721){const _0x27bdb0=_0x16c8,_0x59eef0=typeof _0x11721;super('Invalid\x20primary\x20key\x20type:\x20'+_0x59eef0+_0x27bdb0(0x26f)+_0x11721,_0x27bdb0(0x455),{'key':_0x11721,'keyType':_0x59eef0}),this[_0x27bdb0(0x21d)]='OKDBInvalidPrimaryKeyError';}}class _0x244179 extends _0xa4b00a{constructor(_0x4795c9){const _0x5173d7=_0x16c8;super(_0x5173d7(0x37f)+_0x4795c9+_0x5173d7(0x3d4),_0x5173d7(0x631),{'type':_0x4795c9}),this['name']=_0x5173d7(0x55b);}}class _0x594f83 extends _0xa4b00a{constructor(_0x5c4f4a){const _0x13b039=_0x16c8;super(_0x13b039(0x37f)+_0x5c4f4a+_0x13b039(0x1c3),_0x13b039(0x484),{'type':_0x5c4f4a}),this[_0x13b039(0x21d)]=_0x13b039(0x616);}}class _0x5d308d extends _0xa4b00a{constructor(_0x400a56,_0x5cf461){const _0x4b4a80=_0x16c8;super(_0x4b4a80(0x3f4)+_0x5cf461+_0x4b4a80(0x5e8)+_0x400a56+_0x4b4a80(0x3d4),'INDEX_NOT_REGISTERED',{'type':_0x400a56,'index':_0x5cf461}),this[_0x4b4a80(0x21d)]=_0x4b4a80(0x36d);}}class _0x3a23e1 extends _0xa4b00a{constructor(_0xd88b0e,_0x56585b){const _0x492fb7=_0x16c8;super(_0x492fb7(0x3f4)+_0x56585b+'\x27\x20on\x20type\x20\x27'+_0xd88b0e+_0x492fb7(0x553),_0x492fb7(0x334),{'type':_0xd88b0e,'index':_0x56585b}),this[_0x492fb7(0x21d)]='OKDBIndexAlreadyRegisteredError';}}class _0x4585a1 extends _0xa4b00a{constructor(_0x16958f,_0xdcae44={}){const _0x1a05df=_0x16c8;super(_0x16958f,_0x1a05df(0x182),_0xdcae44),this[_0x1a05df(0x21d)]='OKDBInvalidValueError';}}class _0x8cb119 extends _0xa4b00a{constructor(_0x5b0609,_0x255278,_0xfdc936,_0x20981c,_0x233494){const _0x1dde46=_0x16c8;super(_0x1dde46(0x624)+_0x5b0609+'@'+_0x255278+_0x1dde46(0x5ba)+_0xfdc936+_0x1dde46(0x5dd)+_0x20981c+_0x1dde46(0x5d9)+_0x233494+'\x27',_0x1dde46(0x51e),{'type':_0x5b0609,'index':_0x255278,'indexKey':_0xfdc936,'existingKey':_0x20981c,'conflictingKey':_0x233494}),this[_0x1dde46(0x21d)]=_0x1dde46(0x29d);}}class _0x369530 extends _0xa4b00a{constructor(_0x51c876,_0x4e6cb4,_0x3c6f89){const _0x573bf8=_0x16c8;super(_0x573bf8(0x278)+_0x51c876+'@'+_0x4e6cb4,'SCHEMA_VALIDATION_FAILED',{'type':_0x51c876,'key':_0x4e6cb4,'errors':_0x3c6f89}),this[_0x573bf8(0x21d)]='OKDBSchemaValidationError',this[_0x573bf8(0x257)]=_0x51c876,this[_0x573bf8(0x5a6)]=_0x4e6cb4,this['errors']=_0x3c6f89;}}class _0x4dc87c extends _0xa4b00a{constructor(_0x2ee6ca,_0x52bb5c){const _0x150278=_0x16c8;super(_0x150278(0x463)+_0x2ee6ca+':\x20'+_0x52bb5c[_0x150278(0x5b9)]+_0x150278(0x4de),_0x150278(0x16f),{'type':_0x2ee6ca,'failures':_0x52bb5c}),this[_0x150278(0x21d)]=_0x150278(0x3e3),this['type']=_0x2ee6ca,this[_0x150278(0x57d)]=_0x52bb5c;}}class _0x1e6483 extends _0xa4b00a{constructor(_0x401aeb,_0x9a6557,_0x4dd080,_0x20e66f,_0x437730){const _0x598c97=_0x16c8;super('Foreign\x20key\x20violation:\x20'+_0x401aeb+'@'+_0x9a6557+'.'+_0x4dd080+'\x20references\x20'+_0x20e66f+'@'+_0x437730+_0x598c97(0x46a),_0x598c97(0x64e),{'sourceType':_0x401aeb,'sourceKey':_0x9a6557,'fieldPath':_0x4dd080,'targetType':_0x20e66f,'targetKey':_0x437730}),this[_0x598c97(0x21d)]=_0x598c97(0x253),this[_0x598c97(0x578)]=_0x401aeb,this['sourceKey']=_0x9a6557,this[_0x598c97(0x63c)]=_0x4dd080,this[_0x598c97(0x251)]=_0x20e66f,this['targetKey']=_0x437730;}}class _0x336b32 extends _0xa4b00a{constructor(_0x89f879,_0x14e554,_0x3added){const _0x27fd45=_0x16c8;super('Cannot\x20delete\x20'+_0x89f879+'@'+_0x14e554+':\x20'+_0x3added[_0x27fd45(0x5b9)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x89f879,'targetKey':_0x14e554,'references':_0x3added}),this[_0x27fd45(0x21d)]=_0x27fd45(0x47c),this[_0x27fd45(0x251)]=_0x89f879,this[_0x27fd45(0x635)]=_0x14e554,this[_0x27fd45(0x16d)]=_0x3added;}}class _0x5246f5 extends _0xa4b00a{constructor(_0x136881,_0x224944,_0x32a59a){const _0x134903=_0x16c8;super(_0x134903(0x1d6)+_0x224944+'\x22\x20on\x20\x22'+_0x136881+'\x22\x20is\x20used\x20by:\x20'+_0x32a59a['map'](_0x1cc2da=>_0x1cc2da[_0x134903(0x2ef)]+':'+_0x1cc2da[_0x134903(0x21d)])[_0x134903(0x4c4)](',\x20'),_0x134903(0x526),{'type':_0x136881,'index':_0x224944,'usedBy':_0x32a59a}),this['name']=_0x134903(0x4dd);}}return okdbError={'OKDBError':_0xa4b00a,'OKDBVersionMismatchError':_0x5c1c58,'OKDBNotFoundError':_0x114e25,'OKDBAlreadyExistsError':_0x23bf38,'OKDBInvalidIndexKeyError':_0xd6e432,'OKDBInvalidPrimaryKeyError':_0x3af4a8,'OKDBTypeNotRegisteredError':_0x244179,'OKDBTypeAlreadyRegisteredError':_0x594f83,'OKDBIndexNotRegisteredError':_0x5d308d,'OKDBIndexAlreadyRegisteredError':_0x3a23e1,'OKDBInvalidValueError':_0x4585a1,'OKDBUniqueConstraintError':_0x8cb119,'OKDBSchemaValidationError':_0x369530,'OKDBSchemaCollectionError':_0x4dc87c,'OKDBForeignKeyError':_0x1e6483,'OKDBForeignKeyDeleteError':_0x336b32,'OKDBIndexHasConsumersError':_0x5246f5},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4be363=_0x12dbbc;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0xe2679e={'PUT':_0x4be363(0x613),'REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x4be363(0x491),'INDEX_RESET':_0x4be363(0x5d1),'TYPE_REGISTER':_0x4be363(0x617),'TYPE_DROP':_0x4be363(0x430),'FTS_REGISTER':_0x4be363(0x2ee),'FTS_DROP':_0x4be363(0x52a),'FTS_RESET':_0x4be363(0x3a2),'SCHEMA_SET':'setSchema','SCHEMA_DROP':'dropSchema','TTL_SET':_0x4be363(0x4ed),'TTL_CLEAR':_0x4be363(0x570)},_0x178604={'SYSTEM_READY':_0x4be363(0x606),'SYSTEM_STOPPED':_0x4be363(0x2da),'SYSTEM_CLOCK_CHANGE':_0x4be363(0x55e),'SYSTEM_POKE':_0x4be363(0x5f1),'SYSTEM_DRAIN':_0x4be363(0x54d),'SYSTEM_TYPE_DROP':_0x4be363(0x62c),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x4be363(0x434),'ITEM_CREATE':'item:create','ITEM_UPDATE':_0x4be363(0x4f2),'ITEM_REMOVE':_0x4be363(0x2ff),'INDEX_RESET':'index:reset','INDEX_READY':'index:ready','INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':'view:progress','INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x4be363(0x21f),'FTS_REGISTERED':_0x4be363(0x437),'FTS_DROP':_0x4be363(0x39a),'FTS_RESET':_0x4be363(0x5ac),'SCHEMA_SET':_0x4be363(0x3ff),'SCHEMA_DROP':_0x4be363(0x338),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x4be363(0x293),'REF_VIOLATION':_0x4be363(0x423),'REF_VIOLATION_RESOLVED':_0x4be363(0x4ac),'SYNC_APPLY':_0x4be363(0x19e),'TXN_START':_0x4be363(0x492),'TXN_END':_0x4be363(0x1fb),'TXN_ROLLBACK':_0x4be363(0x50e),'TYPE_REGISTERED':_0x4be363(0x379),'TYPE_DROP':_0x4be363(0x177),'ENV_OPENED':_0x4be363(0x2a2),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x4be363(0x16c),'TTL_EXPIRED':_0x4be363(0x60c),'TTL_SET':'ttl:set','TTL_CLEAR':_0x4be363(0x199),'LICENSE_INVALID':_0x4be363(0x3b5),'LICENSE_ADDED':_0x4be363(0x2b0),'LICENSE_ACTIVATED':_0x4be363(0x18c),'LICENSE_REMOVED':_0x4be363(0x272)},_0xad8861={'CREATING':_0x4be363(0x22c),'RESETTING':'resetting','READY':_0x4be363(0x45c),'DROPPING':_0x4be363(0x416),'WAITING':_0x4be363(0x245)},_0x43ecd9={'CREATED':_0x4be363(0x648),'STARTING':_0x4be363(0x532),'STARTED':'started','STOPPING':_0x4be363(0x2f9),'STOPPED':_0x4be363(0x1c8)},_0x564b31={'CREATING':'creating','READY':_0x4be363(0x45c),'HALTED':_0x4be363(0x579),'STOPPED':_0x4be363(0x1c8),'RESETTING':_0x4be363(0x260)},_0x442638=Object[_0x4be363(0x3bb)]({'POKE':_0x4be363(0x5b2),'DRAIN':_0x4be363(0x381),'TYPE_DROP':_0x4be363(0x536),'PROC':_0x4be363(0x2b4),'ENV_RELEASE':_0x4be363(0x1c7)});return okdbEnums={'BUS_EVENTS':_0x442638,'CHANGE_ACTIONS':_0xe2679e,'EVENTS':_0x178604,'INDEX_STATE':_0xad8861,'OKDB_STATE':_0x43ecd9,'VIEW_STATE':_0x564b31},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x559251=_0x12dbbc;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x12ab6d=require$$1$1,_0x44b078=require$$1,_0x460789=require$$0$1,_0x1124b4=_0x12ab6d['readFileSync'](_0x44b078[_0x559251(0x4c4)](__dirname,_0x559251(0x22d)),'utf8')[_0x559251(0x258)](),_0x5a7ebd=_0x460789['createPublicKey'](_0x1124b4)['export']({'type':'spki','format':_0x559251(0x2c0)}),_0x54a980=_0x460789['createHash'](_0x559251(0x48c))[_0x559251(0x2e8)](_0x5a7ebd)[_0x559251(0x3f9)](_0x559251(0x299))[_0x559251(0x306)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x1124b4,'PUB_FINGERPRINT':_0x54a980},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x11c154=_0x12dbbc;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x58747a=require$$0$1,{OKDBError:_0x435208}=requireOkdbError(),{EVENTS:_0x525625}=requireOkdbEnums(),_0xc2cb52=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x571ee3,LICENSE_TYPE_INTERNAL:_0x43500a,OPEN_LICENSE_MAX_DURATION_MS:_0x667443}=_0xc2cb52,_0x6b593a=requireOkdbPubkey(),_0xc7bac7={'LICENSED_BUILD':_0x11c154(0x4ce),'PUBLIC_KEY_PEM':_0x6b593a['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x6b593a['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':_0x11c154(0x4ca)},_0x4dbb72=_0x11c154(0x171),_0x2dc1a2={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x3a7ed3(_0x2d7e14){const _0x25541a=_0x11c154;!_0x2d7e14[_0x25541a(0x2e0)](_0x4dbb72)&&await _0x2d7e14['registerType'](_0x4dbb72);}class _0x52c2ef{constructor(_0x3e62ee){const _0x1dd543=_0x11c154;this['okdb']=_0x3e62ee,this[_0x1dd543(0x322)]=null;}async['reload'](){const _0x1f6b38=_0x11c154,_0x33fec2=this['okdb'][_0x1f6b38(0x4d0)];if(!_0x33fec2||!_0x33fec2[_0x1f6b38(0x2e0)](_0x4dbb72)){this['_active']=null;return;}const _0x3c3fa6=this[_0x1f6b38(0x2c2)]['id'];let _0x12aecb=null;for(const {key:_0x299ba7,value:_0x5a12dd}of _0x33fec2['getRange'](_0x4dbb72)){const _0x327788=this[_0x1f6b38(0x3b8)](_0x5a12dd,_0x3c3fa6);_0x327788===_0x1f6b38(0x35d)&&!_0x12aecb&&(_0x12aecb={..._0x5a12dd,'id':_0x299ba7,'status':_0x327788});}this['_active']=_0x12aecb;if(this[_0x1f6b38(0x322)]&&this[_0x1f6b38(0x322)][_0x1f6b38(0x504)]===_0x571ee3){const _0xedd8e7=Math[_0x1f6b38(0x483)]((this[_0x1f6b38(0x322)][_0x1f6b38(0x5a4)]-Date[_0x1f6b38(0x514)]())/0x5265c00);this[_0x1f6b38(0x2c2)][_0x1f6b38(0x4ca)]?.[_0x1f6b38(0x3ed)](_0x1f6b38(0x302)+_0xedd8e7+_0x1f6b38(0x265),{'feature':_0x1f6b38(0x614),'licensee':this[_0x1f6b38(0x322)][_0x1f6b38(0x448)],'expiresAt':new Date(this[_0x1f6b38(0x322)]['expiresAt'])[_0x1f6b38(0x219)]()});}this[_0x1f6b38(0x322)]&&this[_0x1f6b38(0x322)][_0x1f6b38(0x504)]===_0x43500a&&this[_0x1f6b38(0x2c2)][_0x1f6b38(0x4ca)]?.['warn'](_0x1f6b38(0x17c),{'feature':_0x1f6b38(0x614),'licensee':this[_0x1f6b38(0x322)][_0x1f6b38(0x448)]});}[_0x11c154(0x3b8)](_0x1a9fe0,_0x511ff9){const _0x39dde1=_0x11c154;if(!_0x1a9fe0[_0x39dde1(0x40c)])return _0x39dde1(0x461);let _0xbfdb74;try{_0xbfdb74=_0xc2cb52[_0x39dde1(0x2c9)](_0x1a9fe0[_0x39dde1(0x40c)]);}catch(_0x323af9){return _0x39dde1(0x461);}try{const _0x1a809d=_0x58747a[_0x39dde1(0x5d4)](null,_0xbfdb74[_0x39dde1(0x3a4)],_0xc7bac7[_0x39dde1(0x48d)],_0xbfdb74[_0x39dde1(0x519)]);if(!_0x1a809d)return _0x39dde1(0x461);}catch(_0x2cc242){return _0x39dde1(0x461);}if(_0xbfdb74['decoded'][_0x39dde1(0x504)]===_0x43500a)return _0x39dde1(0x35d);if(_0xbfdb74[_0x39dde1(0x164)]['expiresAt']<=Date['now']())return'expired';if(_0xbfdb74[_0x39dde1(0x164)][_0x39dde1(0x504)]===_0x571ee3)return'active';if(!_0x1a9fe0[_0x39dde1(0x4b1)])return'pending';const _0x1a335f=_0xc2cb52[_0x39dde1(0x42b)]({'tokenString':_0x1a9fe0['activation'],'nodeId':_0x511ff9,'rawBlobBuf':_0xbfdb74[_0x39dde1(0x59a)],'pubKeyPem':_0xc7bac7['PUBLIC_KEY_PEM'],'pubFingerprint':_0xc7bac7[_0x39dde1(0x471)]});if(_0x1a335f[_0x39dde1(0x1f1)]===_0x39dde1(0x30e)||_0x1a335f[_0x39dde1(0x1f1)]==='SIG_INVALID')return _0x39dde1(0x4dc);if(_0x1a335f[_0x39dde1(0x1f1)]==='ACTIVATION_EXPIRED')return'expired';if(!_0x1a335f[_0x39dde1(0x1be)])return _0x39dde1(0x4dc);return _0x39dde1(0x35d);}get[_0x11c154(0x35d)](){const _0x4e4483=_0x11c154;return this[_0x4e4483(0x322)];}get[_0x11c154(0x2a0)](){return this['_active']??_0x2dc1a2;}[_0x11c154(0x1f8)](_0x42ea12){const _0x3fc362=_0x11c154;if(_0xc7bac7['LICENSED_BUILD']!==_0x3fc362(0x4ce))return;const _0x1dd530=this[_0x3fc362(0x2a0)];if(!_0x1dd530['features']?.[_0x42ea12]){const _0x592fbd=_0x1dd530[_0x3fc362(0x39e)]?_0x3fc362(0x240)+_0x42ea12+_0x3fc362(0x33e)+_0x42ea12+_0x3fc362(0x590):_0x3fc362(0x53e)+_0x42ea12+_0x3fc362(0x362)+_0x42ea12+'\x22.';throw new _0x435208(_0x592fbd,_0x3fc362(0x200),{'feature':_0x42ea12});}}[_0x11c154(0x443)](_0x5b8e64){const _0x14db3f=_0x11c154;if(_0xc7bac7[_0x14db3f(0x372)]!==_0x14db3f(0x4ce))return!![];return!!this[_0x14db3f(0x2a0)][_0x14db3f(0x5b7)]?.[_0x5b8e64];}[_0x11c154(0x505)](_0x5925e3,_0x156de7){const _0x2e55d3=_0x11c154;if(_0xc7bac7[_0x2e55d3(0x372)]!==_0x2e55d3(0x4ce))return;const _0x230ff8=this[_0x2e55d3(0x2a0)],_0x1de844=_0x230ff8['limits']?.[_0x5925e3];if(_0x1de844===null||_0x1de844===undefined||_0x1de844===0x0)return;if(_0x156de7>=_0x1de844)throw new _0x435208(_0x2e55d3(0x3ea)+_0x5925e3+'\x20('+_0x156de7+'/'+_0x1de844+')',_0x2e55d3(0x482),{'limit':_0x5925e3,'current':_0x156de7,'max':_0x1de844});}async[_0x11c154(0x367)](_0x34637f){const _0x367dca=_0x11c154;let _0x5f114a;try{_0x5f114a=_0xc2cb52[_0x367dca(0x2c9)](_0x34637f);}catch(_0x156e36){throw new _0x435208(_0x367dca(0x4f8)+_0x156e36[_0x367dca(0x25c)],_0x367dca(0x52c));}let _0x25cfdb;try{_0x25cfdb=_0x58747a[_0x367dca(0x5d4)](null,_0x5f114a[_0x367dca(0x3a4)],_0xc7bac7[_0x367dca(0x48d)],_0x5f114a[_0x367dca(0x519)]);}catch(_0x325090){throw new _0x435208('License\x20signature\x20invalid:\x20'+_0x325090['message'],_0x367dca(0x52c));}if(!_0x25cfdb)throw new _0x435208(_0x367dca(0x583)+(_0x367dca(0x53a)+_0xc7bac7[_0x367dca(0x471)]+'.\x20')+_0x367dca(0x2ea),'LICENSE_INVALID',{'expectedFingerprint':_0xc7bac7[_0x367dca(0x471)]});if(_0x5f114a[_0x367dca(0x164)][_0x367dca(0x504)]===_0x571ee3){const _0x19f615=_0x5f114a[_0x367dca(0x164)][_0x367dca(0x5a4)]-_0x5f114a['decoded'][_0x367dca(0x17d)];if(_0x19f615>_0x667443)throw new _0x435208(_0x367dca(0x587)+Math[_0x367dca(0x483)](_0x19f615/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x367dca(0x52c));}const _0x1702da=this['okdb'][_0x367dca(0x4d0)];await _0x3a7ed3(_0x1702da);const _0x3ebc35=_0xc2cb52['licenseHash'](_0x5f114a[_0x367dca(0x59a)])[_0x367dca(0x5d8)]('hex');for(const {value:_0x57d2e5}of _0x1702da['getRange'](_0x4dbb72)){if(_0x57d2e5[_0x367dca(0x545)]===_0x3ebc35)throw new _0x435208(_0x367dca(0x1cc),'LICENSE_INVALID');}const _0x5393ca=_0x58747a[_0x367dca(0x37b)](),_0x14eca7={'blob':_0x34637f,'activation':null,'addedAt':Date[_0x367dca(0x514)](),'_licenseHash':_0x3ebc35,'licensee':_0x5f114a[_0x367dca(0x164)][_0x367dca(0x448)],'expiresAt':_0x5f114a['decoded'][_0x367dca(0x5a4)],'features':_0x5f114a['decoded'][_0x367dca(0x5b7)],'limits':_0x5f114a[_0x367dca(0x164)][_0x367dca(0x3fb)],'licenseType':_0x5f114a[_0x367dca(0x164)][_0x367dca(0x504)]};return await _0x1702da[_0x367dca(0x613)](_0x4dbb72,_0x5393ca,_0x14eca7),{'id':_0x5393ca,..._0x14eca7};}async['activateLicense'](_0x15bfe3){const _0x5ea62c=_0x11c154;let _0x4f3397;try{_0x4f3397=_0xc2cb52[_0x5ea62c(0x634)](_0x15bfe3);}catch(_0x55c3bb){throw new _0x435208('Invalid\x20activation\x20token:\x20'+_0x55c3bb[_0x5ea62c(0x25c)],_0x5ea62c(0x378));}const _0x38a23a=_0x4f3397['licenseHash'][_0x5ea62c(0x5d8)](_0x5ea62c(0x299)),_0x3eb020=this[_0x5ea62c(0x2c2)][_0x5ea62c(0x4d0)];if(!_0x3eb020||!_0x3eb020[_0x5ea62c(0x2e0)](_0x4dbb72))throw new _0x435208(_0x5ea62c(0x313),_0x5ea62c(0x378));let _0x7ff7a=null,_0x24d12d=null;for(const {key:_0xf69003,value:_0x1e3bdb}of _0x3eb020[_0x5ea62c(0x2cb)](_0x4dbb72)){if(_0x1e3bdb[_0x5ea62c(0x545)]===_0x38a23a){_0x7ff7a=_0xf69003,_0x24d12d=_0x1e3bdb;break;}}if(!_0x7ff7a)throw new _0x435208(_0x5ea62c(0x313),_0x5ea62c(0x378));const {rawBuf:_0x3527e8}=_0xc2cb52['decodeLicenseBlob'](_0x24d12d[_0x5ea62c(0x40c)]),_0x5172d3=_0xc2cb52['verifyActivation']({'tokenString':_0x15bfe3,'nodeId':this[_0x5ea62c(0x2c2)]['id'],'rawBlobBuf':_0x3527e8,'pubKeyPem':_0xc7bac7[_0x5ea62c(0x48d)],'pubFingerprint':_0xc7bac7[_0x5ea62c(0x471)]});if(!_0x5172d3[_0x5ea62c(0x1be)])throw new _0x435208(_0x5ea62c(0x267)+_0x5172d3[_0x5ea62c(0x1f1)],_0x5ea62c(0x378),{'reason':_0x5172d3['reason']});const _0x5a2b3d={..._0x24d12d,'activation':_0x15bfe3};return await _0x3eb020[_0x5ea62c(0x2e8)](_0x4dbb72,_0x7ff7a,_0x5a2b3d),{'id':_0x7ff7a,..._0x5a2b3d};}async[_0x11c154(0x3b9)](_0x33725d){const _0x222f95=_0x11c154,_0x21be1c=this[_0x222f95(0x2c2)][_0x222f95(0x4d0)];if(!_0x21be1c||!_0x21be1c['hasType'](_0x4dbb72))return;await _0x21be1c[_0x222f95(0x41e)](_0x4dbb72,_0x33725d);}async[_0x11c154(0x50b)](){const _0x33708f=_0x11c154,_0x254e2f=this[_0x33708f(0x2c2)][_0x33708f(0x4d0)];if(!_0x254e2f||!_0x254e2f['hasType'](_0x4dbb72))return[];const _0xea9cab=this['okdb']['id'],_0x2d84f5=[];for(const {key:_0x8d689c,value:_0x2a2d74}of _0x254e2f[_0x33708f(0x2cb)](_0x4dbb72)){const _0x5149c2=this[_0x33708f(0x3b8)](_0x2a2d74,_0xea9cab);_0x2d84f5[_0x33708f(0x4e9)]({..._0x2a2d74,'id':_0x8d689c,'status':_0x5149c2});}return _0x2d84f5;}[_0x11c154(0x452)](){const _0x3a39a7=_0x11c154,_0x472aef=this['okdb'][_0x3a39a7(0x4d0)];if(!_0x472aef||!_0x472aef[_0x3a39a7(0x2e0)](_0x4dbb72))return[];const _0x52f2bc=this[_0x3a39a7(0x2c2)]['id'],_0x4edd1d=[];for(const {key:_0xfb19bc,value:_0x17c00a}of _0x472aef[_0x3a39a7(0x2cb)](_0x4dbb72)){if(_0x17c00a[_0x3a39a7(0x545)]){if(_0x17c00a[_0x3a39a7(0x504)]===_0x571ee3)_0x4edd1d[_0x3a39a7(0x4e9)]({'licenseId':_0xfb19bc,'pin':null});else{const _0x411dcf=Buffer[_0x3a39a7(0x3f5)](_0x17c00a[_0x3a39a7(0x545)],_0x3a39a7(0x299)),{pin:_0x2b735e}=_0xc2cb52['derivePin'](_0x52f2bc,_0x411dcf,_0xc7bac7[_0x3a39a7(0x471)]);_0x4edd1d[_0x3a39a7(0x4e9)]({'licenseId':_0xfb19bc,'pin':_0x2b735e});}}}return _0x4edd1d;}async[_0x11c154(0x1fa)](){const _0x586a43=_0x11c154,_0x4a7e3c=this[_0x586a43(0x322)];await this[_0x586a43(0x32b)]();if(this[_0x586a43(0x322)]&&this[_0x586a43(0x322)]['licenseType']===_0x571ee3){const _0x191d53=Math[_0x586a43(0x483)]((this[_0x586a43(0x322)][_0x586a43(0x5a4)]-Date['now']())/0x5265c00);this['okdb'][_0x586a43(0x4ca)]?.['warn'](_0x586a43(0x302)+_0x191d53+_0x586a43(0x265),{'feature':_0x586a43(0x614),'licensee':this[_0x586a43(0x322)][_0x586a43(0x448)],'expiresAt':new Date(this[_0x586a43(0x322)][_0x586a43(0x5a4)])[_0x586a43(0x219)]()});}this['_active']&&this[_0x586a43(0x322)][_0x586a43(0x504)]===_0x43500a&&this[_0x586a43(0x2c2)]['log']?.[_0x586a43(0x3ed)](_0x586a43(0x17c),{'feature':_0x586a43(0x614),'licensee':this[_0x586a43(0x322)][_0x586a43(0x448)]});if(_0x4a7e3c&&!this[_0x586a43(0x322)]){this['okdb'][_0x586a43(0x4ca)]?.[_0x586a43(0x3ed)](_0x586a43(0x2d0),{'feature':_0x586a43(0x614)}),this[_0x586a43(0x2c2)][_0x586a43(0x5e6)]?.['emit'](_0x525625['LICENSE_INVALID'],{'previous':_0x4a7e3c});const _0x22b810=this[_0x586a43(0x2c2)]['options']?.['onLicenseExpired']??_0xc7bac7[_0x586a43(0x4e0)];_0x22b810==='shutdown'&&(this[_0x586a43(0x2c2)][_0x586a43(0x4ca)]?.[_0x586a43(0x594)](_0x586a43(0x548),{'feature':_0x586a43(0x614)}),this['okdb']['close']()[_0x586a43(0x16b)](()=>{})[_0x586a43(0x2cf)](()=>process[_0x586a43(0x370)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x52c2ef,'_C':_0xc7bac7},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x11db91=_0x12dbbc;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x1160c2=require$$0$3,_0x54201f=require$$1$1,_0x5434b5=require$$0,_0x470794=require$$1,_0x4f6315=_0x470794[_0x11db91(0x4c4)](_0x5434b5[_0x11db91(0x5b4)](),_0x11db91(0x538)),_0x2543dd=0x3e8,_0x514f55={'reset':_0x11db91(0x572),'bold':'\x1b[1m','dim':_0x11db91(0x174),'red':'\x1b[31m','green':'\x1b[32m','yellow':_0x11db91(0x57a),'blue':_0x11db91(0x633),'magenta':_0x11db91(0x189),'cyan':_0x11db91(0x167),'white':_0x11db91(0x5b6),'gray':_0x11db91(0x511)},_0x1aa003=!process[_0x11db91(0x307)][_0x11db91(0x24e)]||!!process.env.NO_COLOR,_0x2734e9=(_0x23ca70,_0x2df8c5)=>_0x1aa003?_0x2df8c5:''+_0x23ca70+_0x2df8c5+_0x514f55['reset'],_0x142678={'error':_0x514f55[_0x11db91(0x4fb)],'warn':_0x514f55[_0x11db91(0x527)],'info':_0x514f55['cyan'],'debug':_0x514f55['gray']},_0x2e7337={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x55d52d(_0x176883,_0x346620=_0x11db91(0x3c6)){const _0x2fc663=_0x11db91,{level:_0x402736,msg:_0x400213,meta:_0x58911a,context:_0x3f912c,ts:_0x163827}=_0x176883;if((_0x2e7337[_0x402736]??0x1)<(_0x2e7337[_0x346620]??0x1))return;const _0x56f563=_0x2734e9(_0x514f55[_0x2fc663(0x5de)],new Date(_0x163827)[_0x2fc663(0x219)]()),_0x31adab=_0x2734e9(_0x142678[_0x402736]??_0x514f55['white'],_0x402736['padEnd'](0x5));let _0x71ff4='\x20\x20'+_0x56f563+'\x20'+_0x2734e9(_0x514f55['bold'],_0x31adab)+'\x20'+_0x400213;if(_0x58911a&&Object[_0x2fc663(0x50d)](_0x58911a)[_0x2fc663(0x5b9)]>0x0){const _0x295dd2=Object[_0x2fc663(0x355)](_0x58911a)[_0x2fc663(0x41b)](([_0x28aa61,_0x439304])=>_0x28aa61+'='+_0x439304)[_0x2fc663(0x4c4)]('\x20');_0x71ff4+=_0x2734e9(_0x514f55['dim'],_0x2fc663(0x3b0)+_0x295dd2+']');}if(_0x3f912c!==undefined){const _0x3012fb=typeof _0x3f912c===_0x2fc663(0x312)?JSON[_0x2fc663(0x2be)](_0x3f912c):String(_0x3f912c);_0x71ff4+=_0x2734e9(_0x514f55[_0x2fc663(0x3cd)],'\x20\x20'+_0x3012fb);}const _0x1c0aa8=_0x402736===_0x2fc663(0x594)||_0x402736===_0x2fc663(0x3ed)?process[_0x2fc663(0x193)][_0x2fc663(0x557)][_0x2fc663(0x3ad)](process[_0x2fc663(0x193)]):process[_0x2fc663(0x307)][_0x2fc663(0x557)]['bind'](process[_0x2fc663(0x307)]);_0x1c0aa8(_0x71ff4+'\x0a');}function _0x13e7c7(_0x1d4604,_0x3d731d){const _0x4009e5=_0x11db91;if(_0x1d4604===0xcc||_0x1d4604>=0xc8&&_0x1d4604<0x12c&&!_0x3d731d){console[_0x4009e5(0x4ca)](_0x4009e5(0x497)+_0x2734e9(_0x514f55[_0x4009e5(0x2d7)],'✓')+'\x0a');return;}if(_0x1d4604>=0x190||_0x3d731d?.[_0x4009e5(0x594)]){const _0x4aaabc=_0x3d731d?.[_0x4009e5(0x594)]??_0x3d731d?.['message']??_0x4009e5(0x5b5)+_0x1d4604;console[_0x4009e5(0x4ca)](_0x4009e5(0x497)+_0x2734e9(_0x514f55[_0x4009e5(0x4fb)],'✗')+'\x20'+_0x2734e9(_0x514f55[_0x4009e5(0x3e9)]+_0x514f55['red'],String(_0x1d4604))+'\x20\x20'+_0x4aaabc+'\x0a');return;}const _0x43ad39=Object[_0x4009e5(0x4b0)]['hasOwnProperty']['call'](_0x3d731d??{},_0x4009e5(0x1cb))?_0x3d731d[_0x4009e5(0x1cb)]:_0x3d731d,_0x58ca8a=_0x3d731d?.[_0x4009e5(0x1bd)];console['log'](''),_0x3710af(_0x43ad39,'\x20\x20');if(_0x58ca8a?.[_0x4009e5(0x1fe)]!=null||_0x58ca8a?.[_0x4009e5(0x531)]!=null){const _0x2e99a3=[];if(_0x58ca8a[_0x4009e5(0x1fe)]!=null)_0x2e99a3[_0x4009e5(0x4e9)](_0x58ca8a['count']+_0x4009e5(0x5f3)+(_0x58ca8a[_0x4009e5(0x1fe)]!==0x1?'s':''));if(_0x58ca8a[_0x4009e5(0x531)]!=null)_0x2e99a3[_0x4009e5(0x4e9)](_0x58ca8a[_0x4009e5(0x531)]+'ms');console[_0x4009e5(0x4ca)](_0x4009e5(0x497)+_0x2734e9(_0x514f55[_0x4009e5(0x3cd)],_0x2e99a3[_0x4009e5(0x4c4)](_0x4009e5(0x27e))));}console[_0x4009e5(0x4ca)]('');}function _0x3710af(_0x4611e9,_0x334544=''){const _0x64f0b6=_0x11db91;if(_0x4611e9===null||_0x4611e9===undefined){console[_0x64f0b6(0x4ca)](_0x334544+_0x2734e9(_0x514f55[_0x64f0b6(0x3cd)],_0x64f0b6(0x4b8)));return;}if(Array[_0x64f0b6(0x3aa)](_0x4611e9)){if(_0x4611e9[_0x64f0b6(0x5b9)]===0x0){console[_0x64f0b6(0x4ca)](_0x334544+_0x2734e9(_0x514f55['dim'],_0x64f0b6(0x574)));return;}if(_0x4611e9['every'](_0x26f284=>_0x26f284&&typeof _0x26f284===_0x64f0b6(0x312)&&_0x64f0b6(0x5a6)in _0x26f284&&'value'in _0x26f284)){_0x12e126(_0x4611e9,_0x334544);return;}if(_0x4611e9['every'](_0x3c7b48=>_0x3c7b48&&typeof _0x3c7b48===_0x64f0b6(0x312)&&_0x64f0b6(0x257)in _0x3c7b48&&_0x64f0b6(0x1fe)in _0x3c7b48)){_0x2496de(_0x4611e9,_0x334544);return;}if(_0x4611e9[_0x64f0b6(0x24d)](_0x22db0d=>typeof _0x22db0d!==_0x64f0b6(0x312)||_0x22db0d===null)){_0x4611e9[_0x64f0b6(0x3b7)]((_0x17d1af,_0x5de5f2)=>console['log'](_0x334544+_0x2734e9(_0x514f55[_0x64f0b6(0x5de)],_0x5de5f2+0x1+'.')+'\x20'+_0x2734e9(_0x514f55['white'],String(_0x17d1af))));return;}_0x4611e9[_0x64f0b6(0x3b7)]((_0x1a9e27,_0x4bc405)=>{const _0x5ae6a4=_0x64f0b6;console[_0x5ae6a4(0x4ca)](_0x334544+_0x2734e9(_0x514f55[_0x5ae6a4(0x3cd)],'['+_0x4bc405+']'));if(typeof _0x1a9e27===_0x5ae6a4(0x312)&&_0x1a9e27!==null)_0x297d5a(_0x1a9e27,_0x334544+'\x20\x20');else console[_0x5ae6a4(0x4ca)](_0x334544+'\x20\x20'+String(_0x1a9e27));});return;}if(typeof _0x4611e9===_0x64f0b6(0x312)){if(_0x64f0b6(0x5a6)in _0x4611e9&&_0x64f0b6(0x24f)in _0x4611e9&&Object[_0x64f0b6(0x50d)](_0x4611e9)['length']<=0x3){console['log'](_0x334544+_0x2734e9(_0x514f55['bold']+_0x514f55[_0x64f0b6(0x5d2)],String(_0x4611e9[_0x64f0b6(0x5a6)])));const _0x491d88=_0x4611e9['value'];if(_0x491d88&&typeof _0x491d88==='object')_0x297d5a(_0x491d88,_0x334544);else console[_0x64f0b6(0x4ca)](_0x334544+_0x2734e9(_0x514f55['white'],String(_0x491d88)));return;}_0x297d5a(_0x4611e9,_0x334544);return;}console['log'](_0x334544+_0x2734e9(_0x514f55[_0x64f0b6(0x217)],String(_0x4611e9)));}function _0x297d5a(_0x272686,_0x30a618=''){const _0x233cee=_0x11db91,_0x3fa843=Object[_0x233cee(0x355)](_0x272686);if(_0x3fa843[_0x233cee(0x5b9)]===0x0){console[_0x233cee(0x4ca)](_0x30a618+_0x2734e9(_0x514f55[_0x233cee(0x3cd)],'{}'));return;}const _0x5a0069=Math[_0x233cee(0x275)](0x1c,Math[_0x233cee(0x4b9)](..._0x3fa843[_0x233cee(0x41b)](([_0x333db1])=>_0x333db1['length'])));for(const [_0x481e71,_0x463fe1]of _0x3fa843){const _0x3f1c95=_0x2734e9(_0x514f55[_0x233cee(0x5d2)],_0x481e71[_0x233cee(0x4fe)](_0x5a0069));if(_0x463fe1===null||_0x463fe1===undefined)console['log'](_0x30a618+_0x3f1c95+'\x20\x20'+_0x2734e9(_0x514f55[_0x233cee(0x3cd)],_0x233cee(0x57b)));else{if(typeof _0x463fe1===_0x233cee(0x312)){const _0x11d733=JSON[_0x233cee(0x2be)](_0x463fe1);_0x11d733[_0x233cee(0x5b9)]<=0x50?console[_0x233cee(0x4ca)](_0x30a618+_0x3f1c95+'\x20\x20'+_0x2734e9(_0x514f55[_0x233cee(0x3cd)],_0x11d733)):(console[_0x233cee(0x4ca)](_0x30a618+_0x3f1c95),_0x3710af(_0x463fe1,_0x30a618+'\x20\x20'));}else{const _0x58f22b=typeof _0x463fe1===_0x233cee(0x547)?_0x2734e9(_0x463fe1?_0x514f55[_0x233cee(0x2d7)]:_0x514f55[_0x233cee(0x527)],String(_0x463fe1)):typeof _0x463fe1===_0x233cee(0x1a9)?_0x2734e9(_0x514f55[_0x233cee(0x35e)],String(_0x463fe1)):_0x2734e9(_0x514f55[_0x233cee(0x217)],String(_0x463fe1));console['log'](_0x30a618+_0x3f1c95+'\x20\x20'+_0x58f22b);}}}}function _0x12e126(_0xf2abf1,_0xdeb8ec=''){const _0x2889f0=_0x11db91,_0x1d4e18=Math[_0x2889f0(0x275)](0x20,Math['max'](..._0xf2abf1[_0x2889f0(0x41b)](_0x454f1a=>String(_0x454f1a[_0x2889f0(0x5a6)])[_0x2889f0(0x5b9)])));for(const {key:_0x54c5f4,value:_0x3b1f7c,score:_0x2f7bf3,clock:_0x25a0dc}of _0xf2abf1){const _0x1e1e07=_0x2734e9(_0x514f55[_0x2889f0(0x3e9)]+_0x514f55['cyan'],String(_0x54c5f4)[_0x2889f0(0x4fe)](_0x1d4e18)),_0x10f09d=_0x3b1f7c==null?_0x2734e9(_0x514f55[_0x2889f0(0x3cd)],'null'):typeof _0x3b1f7c===_0x2889f0(0x312)?_0x2734e9(_0x514f55[_0x2889f0(0x3cd)],JSON['stringify'](_0x3b1f7c)):_0x2734e9(_0x514f55[_0x2889f0(0x217)],String(_0x3b1f7c)),_0x498ffa=_0x2f7bf3!=null?_0x2734e9(_0x514f55['gray'],_0x2889f0(0x51b)+_0x2f7bf3['toFixed'](0x4)):'',_0x39bbf0=_0x25a0dc!=null?_0x2734e9(_0x514f55[_0x2889f0(0x5de)],_0x2889f0(0x4b7)+_0x25a0dc):'';console[_0x2889f0(0x4ca)](_0xdeb8ec+_0x1e1e07+'\x20\x20'+_0x10f09d+_0x498ffa+_0x39bbf0);}}function _0x2496de(_0x4e58b7,_0x26ebb6=''){const _0x2d0073=_0x11db91,_0x804c8d=Math[_0x2d0073(0x275)](0x20,Math[_0x2d0073(0x4b9)](..._0x4e58b7[_0x2d0073(0x41b)](_0x1c3988=>_0x1c3988[_0x2d0073(0x257)][_0x2d0073(0x5b9)])));for(const {type:_0x3d393,count:_0x5a170c,fields:_0x42542d}of _0x4e58b7){if(_0x3d393[_0x2d0073(0x30f)]('~'))continue;const _0x21e92b=_0x2734e9(_0x514f55['bold']+_0x514f55[_0x2d0073(0x5d2)],_0x3d393[_0x2d0073(0x4fe)](_0x804c8d)),_0x55d0c1=_0x2734e9(_0x514f55['magenta'],String(_0x5a170c)[_0x2d0073(0x571)](0x6))+_0x2734e9(_0x514f55[_0x2d0073(0x3cd)],'\x20records'),_0x4cf145=_0x42542d&&Object[_0x2d0073(0x50d)](_0x42542d)[_0x2d0073(0x5b9)]?_0x2734e9(_0x514f55[_0x2d0073(0x3cd)],_0x2d0073(0x4b5)+Object['keys'](_0x42542d)[_0x2d0073(0x306)](0x0,0x6)[_0x2d0073(0x4c4)](',\x20')+(Object[_0x2d0073(0x50d)](_0x42542d)['length']>0x6?'…':'')):'';console[_0x2d0073(0x4ca)](_0x26ebb6+_0x21e92b+'\x20\x20'+_0x55d0c1+_0x4cf145);}}const _0xa273=[_0x11db91(0x52d),'type/','queue/',_0x11db91(0x244),_0x11db91(0x5b1),_0x11db91(0x405)];function _0x39d12e(_0xb7d4df,_0x5cdff8){const _0xf50b7d=_0x11db91;if(_0xb7d4df['startsWith'](_0xf50b7d(0x3ec)))return _0xb7d4df;if(_0xb7d4df[_0xf50b7d(0x30f)]('/'))return _0xf50b7d(0x4c3)+_0xb7d4df;if(_0xb7d4df['startsWith'](_0xf50b7d(0x319)))return _0xf50b7d(0x3ec)+_0xb7d4df;const _0x3b839d=_0xa273['some'](_0x185a04=>_0xb7d4df===_0x185a04[_0xf50b7d(0x3a1)](/\/$/,'')||_0xb7d4df[_0xf50b7d(0x30f)](_0x185a04));return _0x3b839d?_0xf50b7d(0x637)+_0x5cdff8+'/'+_0xb7d4df:_0xf50b7d(0x3ec)+_0xb7d4df;}function _0x55e9a3(_0x285038){const _0x36a950=_0x11db91,_0x2b3ea8={},_0x103434=[];let _0x2720b4=0x0;while(_0x2720b4<_0x285038[_0x36a950(0x5b9)]){if((_0x285038[_0x2720b4]===_0x36a950(0x23b)||_0x285038[_0x2720b4]==='-e')&&_0x285038[_0x2720b4+0x1]&&!_0x285038[_0x2720b4+0x1][_0x36a950(0x30f)]('-'))_0x2b3ea8[_0x36a950(0x60a)]=_0x285038[++_0x2720b4];else _0x285038[_0x2720b4]===_0x36a950(0x649)||_0x285038[_0x2720b4]==='-h'?_0x2b3ea8[_0x36a950(0x29b)]=!![]:_0x103434[_0x36a950(0x4e9)](_0x285038[_0x2720b4]);_0x2720b4++;}return{'flags':_0x2b3ea8,'rest':_0x103434};}const _0x4939b3={'system':_0x11db91(0x237),'envs':_0x11db91(0x2e7),'types':_0x11db91(0x400),'data':_0x11db91(0x1e8),'indexes':'Indexes','fts':_0x11db91(0x556),'sync':_0x11db91(0x4d9),'queue':_0x11db91(0x1bc),'files':_0x11db91(0x216),'embeddings':_0x11db91(0x431),'engines':_0x11db91(0x5eb),'admin':_0x11db91(0x537),'event':'Events','processor':'Processors'},_0x17422e=['system','envs',_0x11db91(0x52d),_0x11db91(0x31e),_0x11db91(0x417),'fts',_0x11db91(0x478),_0x11db91(0x5c9),_0x11db91(0x441),_0x11db91(0x1ae),_0x11db91(0x50a),_0x11db91(0x22e)];function _0x2a588f(_0x31bd43){const _0x34caf1=_0x11db91;return _0x31bd43[_0x34caf1(0x3a1)](/^\/api/,'')[_0x34caf1(0x3a1)](/^\[\/env\/:env=[^\]]*\]/,_0x34caf1(0x207))['replace'](/^\/env\/:env/,_0x34caf1(0x503))[_0x34caf1(0x3a1)](/^\//,'');}function _0x3cbe3a(_0x1fccc2,_0xc262e=''){const _0x522617=_0x11db91,_0x8c239=_0x1fccc2['http'][_0x522617(0x54f)]()[_0x522617(0x5a3)](_0x553a18=>!_0x553a18['meta']?.['hidden']),_0x3b321c=_0xc262e?_0x8c239[_0x522617(0x5a3)](_0x27e55=>_0x27e55['path'][_0x522617(0x337)]()[_0x522617(0x46c)](_0xc262e[_0x522617(0x337)]())||(_0x315df9(_0x27e55)??'')[_0x522617(0x337)]()['includes'](_0xc262e[_0x522617(0x337)]())||_0x56733e(_0x27e55)['some'](_0x17c267=>_0x17c267[_0x522617(0x337)]()[_0x522617(0x46c)](_0xc262e['toLowerCase']()))):_0x8c239;if(!_0x3b321c[_0x522617(0x5b9)]){console[_0x522617(0x4ca)](_0x2734e9(_0x514f55[_0x522617(0x527)],_0x522617(0x1ba)+_0xc262e+'\x22\x0a'));return;}const _0x2fd597=new Map();for(const _0x3e6cff of _0x3b321c){const _0x93a00e=_0x56733e(_0x3e6cff)[0x0]??_0x522617(0x626);if(!_0x2fd597[_0x522617(0x5a7)](_0x93a00e))_0x2fd597[_0x522617(0x561)](_0x93a00e,[]);_0x2fd597[_0x522617(0x30a)](_0x93a00e)['push'](_0x3e6cff);}const _0x130439=[..._0x17422e[_0x522617(0x5a3)](_0x5a32e8=>_0x2fd597[_0x522617(0x5a7)](_0x5a32e8)),...[..._0x2fd597[_0x522617(0x50d)]()][_0x522617(0x5a3)](_0x49211a=>!_0x17422e['includes'](_0x49211a))];console[_0x522617(0x4ca)]('');for(const _0x141660 of _0x130439){const _0x19b710=_0x2fd597[_0x522617(0x30a)](_0x141660);if(!_0x19b710?.[_0x522617(0x5b9)])continue;console[_0x522617(0x4ca)](_0x2734e9(_0x514f55[_0x522617(0x3e9)],'\x20\x20'+(_0x4939b3[_0x141660]??_0x141660)));for(const _0x397766 of _0x19b710){const _0x47dec5=_0x2734e9(_0x514f55['magenta'],_0x397766['method'][_0x522617(0x4fe)](0x7)),_0xcae87c=_0x2734e9(_0x514f55[_0x522617(0x5d2)],_0x2a588f(_0x397766[_0x522617(0x60b)])),_0x3651e2=_0x315df9(_0x397766)?_0x2734e9(_0x514f55['dim'],'\x20\x20'+_0x315df9(_0x397766)):'',_0x2bbfe7=_0x397766['operation']?.['id']?_0x2734e9(_0x514f55[_0x522617(0x5de)],_0x522617(0x3b0)+_0x397766[_0x522617(0x47a)]['id']+']'):'';console['log'](_0x522617(0x385)+_0x47dec5+'\x20'+_0xcae87c+_0x3651e2+_0x2bbfe7);}console[_0x522617(0x4ca)]('');}}function _0x750b70(_0x106b69,_0x43b8d0){const _0x2494ae=_0x11db91,_0x3e7cc6=_0x43b8d0[_0x2494ae(0x3a1)](/^\/api(\/env\/[^/]+)?\//,'')[_0x2494ae(0x3c0)]('/')[0x0],_0x259937=_0x106b69[_0x2494ae(0x349)][_0x2494ae(0x54f)]()[_0x2494ae(0x5a3)](_0xf68be6=>_0xf68be6[_0x2494ae(0x60b)][_0x2494ae(0x337)]()['includes'](_0x3e7cc6[_0x2494ae(0x337)]()));if(!_0x259937['length']){console['log'](_0x2734e9(_0x514f55['yellow'],_0x2494ae(0x3cc)+_0x43b8d0+'\x0a'));return;}console[_0x2494ae(0x4ca)]('');for(const _0x8bd6a3 of _0x259937[_0x2494ae(0x306)](0x0,0xc)){for(const _0x4dddff of _0x1940fd(_0x8bd6a3)){console[_0x2494ae(0x4ca)](_0x4dddff);}console['log']('');}}function _0x315df9(_0x9242bd){const _0x593e49=_0x11db91;return _0x9242bd[_0x593e49(0x47a)]?.['summary']??_0x9242bd[_0x593e49(0x1bd)]?.[_0x593e49(0x460)]??'';}function _0x30c3f2(_0x51133f){const _0x3c5868=_0x11db91;return _0x51133f[_0x3c5868(0x47a)]?.[_0x3c5868(0x61f)]??_0x51133f[_0x3c5868(0x1bd)]?.[_0x3c5868(0x61f)]??'';}function _0x56733e(_0x432ee6){const _0x3843d3=_0x11db91;return _0x432ee6[_0x3843d3(0x47a)]?.['tags']?.[_0x3843d3(0x5b9)]?_0x432ee6[_0x3843d3(0x47a)][_0x3843d3(0x438)]:_0x432ee6['meta']?.[_0x3843d3(0x438)]??[];}function _0x1940fd(_0x5be67a){const _0x2d41ec=_0x11db91,_0x47a37b=[];_0x47a37b[_0x2d41ec(0x4e9)]('\x20\x20'+_0x2734e9(_0x514f55[_0x2d41ec(0x3e9)]+_0x514f55['magenta'],_0x5be67a[_0x2d41ec(0x5e7)][_0x2d41ec(0x4fe)](0x7))+'\x20'+_0x2734e9(_0x514f55['bold']+_0x514f55[_0x2d41ec(0x5d2)],_0x5be67a[_0x2d41ec(0x60b)]));_0x5be67a['operation']?.['id']&&_0x47a37b[_0x2d41ec(0x4e9)](_0x2d41ec(0x230)+_0x2734e9(_0x514f55['gray'],'id:\x20'+_0x5be67a['operation']['id']));_0x315df9(_0x5be67a)&&_0x47a37b[_0x2d41ec(0x4e9)](_0x2d41ec(0x230)+_0x2734e9(_0x514f55[_0x2d41ec(0x217)],_0x315df9(_0x5be67a)));_0x30c3f2(_0x5be67a)&&_0x47a37b[_0x2d41ec(0x4e9)](_0x2d41ec(0x230)+_0x2734e9(_0x514f55[_0x2d41ec(0x3cd)],_0x30c3f2(_0x5be67a)));_0x56733e(_0x5be67a)[_0x2d41ec(0x5b9)]&&_0x47a37b[_0x2d41ec(0x4e9)](_0x2d41ec(0x230)+_0x2734e9(_0x514f55[_0x2d41ec(0x5de)],_0x2d41ec(0x1d3)+_0x56733e(_0x5be67a)[_0x2d41ec(0x4c4)](',\x20')));_0x5be67a[_0x2d41ec(0x47a)]?.[_0x2d41ec(0x4aa)]?.['access']&&_0x47a37b[_0x2d41ec(0x4e9)](_0x2d41ec(0x230)+_0x2734e9(_0x514f55['gray'],_0x2d41ec(0x178)+_0x5be67a['operation'][_0x2d41ec(0x4aa)][_0x2d41ec(0x324)]));_0x5be67a[_0x2d41ec(0x47a)]?.[_0x2d41ec(0x349)]?.[_0x2d41ec(0x366)]&&_0x5be67a[_0x2d41ec(0x47a)][_0x2d41ec(0x349)][_0x2d41ec(0x366)]!==_0x2d41ec(0x5fb)&&_0x47a37b['push'](_0x2d41ec(0x230)+_0x2734e9(_0x514f55[_0x2d41ec(0x5de)],_0x2d41ec(0x41f)+_0x5be67a[_0x2d41ec(0x47a)]['http']['transport']));if(_0x5be67a[_0x2d41ec(0x47a)]?.[_0x2d41ec(0x540)]){const _0x1efa07=Object[_0x2d41ec(0x50d)](_0x5be67a[_0x2d41ec(0x47a)]['inputSchema'][_0x2d41ec(0x592)]||{});if(_0x1efa07[_0x2d41ec(0x5b9)])_0x47a37b[_0x2d41ec(0x4e9)](_0x2d41ec(0x230)+_0x2734e9(_0x514f55[_0x2d41ec(0x5de)],_0x2d41ec(0x539)+_0x1efa07['join'](',\x20')));}return _0x5be67a[_0x2d41ec(0x1bd)]?.[_0x2d41ec(0x3e7)]&&_0x47a37b['push'](_0x2d41ec(0x230)+_0x2734e9(_0x514f55[_0x2d41ec(0x5de)],_0x2d41ec(0x1fd)+JSON['stringify'](_0x5be67a[_0x2d41ec(0x1bd)][_0x2d41ec(0x3e7)]))),_0x47a37b;}async function _0x1fd8d1(_0x3dc026,_0x415a77,_0x226ea8,_0x4ae8b8=null){const _0xe3ea17=_0x11db91,_0x5ace92=_0x226ea8[_0xe3ea17(0x28a)]('?'),_0x4d7a52=_0x5ace92>=0x0?_0x226ea8[_0xe3ea17(0x306)](0x0,_0x5ace92):_0x226ea8,_0x5cad8d=_0x5ace92>=0x0?_0x226ea8[_0xe3ea17(0x306)](_0x5ace92+0x1):'',_0x1f51f8=Object['fromEntries'](new URLSearchParams(_0x5cad8d)[_0xe3ea17(0x355)]());return _0x3dc026['http'][_0xe3ea17(0x1d7)](_0x415a77,_0x4d7a52,{'body':_0x4ae8b8,'query':_0x1f51f8,'headers':{'content-type':_0xe3ea17(0x25e)}},{'internal':!![]});}function _0xa5f929(_0x5d952f){const _0x4f3e07=_0x11db91;if(!_0x5d952f)return null;const _0x1e8458=_0x5d952f[_0x4f3e07(0x258)]();if(!_0x1e8458)return null;try{return JSON['parse'](_0x1e8458);}catch{}try{return JSON[_0x4f3e07(0x5f7)](_0x338841(_0x1e8458));}catch(_0x3c26bf){throw new SyntaxError(_0x3c26bf[_0x4f3e07(0x25c)],{'cause':_0x3c26bf});}}function _0x338841(_0xe18e3f){const _0x34e5b0=_0x11db91;let _0x28d8cf='',_0xa07302=0x0;while(_0xa07302<_0xe18e3f[_0x34e5b0(0x5b9)]){const _0x27cc0b=_0xe18e3f[_0xa07302];if(_0x27cc0b==='\x22'){_0x28d8cf+='\x22',_0xa07302++;while(_0xa07302<_0xe18e3f[_0x34e5b0(0x5b9)]&&_0xe18e3f[_0xa07302]!=='\x22'){if(_0xe18e3f[_0xa07302]==='\x5c'){_0x28d8cf+=_0xe18e3f[_0xa07302++];if(_0xa07302<_0xe18e3f['length'])_0x28d8cf+=_0xe18e3f[_0xa07302++];}else _0x28d8cf+=_0xe18e3f[_0xa07302++];}_0x28d8cf+='\x22';if(_0xa07302<_0xe18e3f['length'])_0xa07302++;continue;}if(_0x27cc0b==='\x27'){_0x28d8cf+='\x22',_0xa07302++;while(_0xa07302<_0xe18e3f[_0x34e5b0(0x5b9)]&&_0xe18e3f[_0xa07302]!=='\x27'){if(_0xe18e3f[_0xa07302]==='\x5c'&&_0xe18e3f[_0xa07302+0x1]==='\x27')_0x28d8cf+='\x27',_0xa07302+=0x2;else _0xe18e3f[_0xa07302]==='\x22'?(_0x28d8cf+='\x5c\x22',_0xa07302++):_0x28d8cf+=_0xe18e3f[_0xa07302++];}_0x28d8cf+='\x22';if(_0xa07302<_0xe18e3f[_0x34e5b0(0x5b9)])_0xa07302++;continue;}if(_0x34e5b0(0x522)[_0x34e5b0(0x46c)](_0x27cc0b)){_0x28d8cf+=_0x27cc0b,_0xa07302++;continue;}let _0x3876eb='';while(_0xa07302<_0xe18e3f[_0x34e5b0(0x5b9)]&&!_0x34e5b0(0x444)['includes'](_0xe18e3f[_0xa07302])&&_0xe18e3f[_0xa07302]!=='\x20'&&_0xe18e3f[_0xa07302]!=='\x09'&&_0xe18e3f[_0xa07302]!=='\x0a'&&_0xe18e3f[_0xa07302]!=='\x0d'){_0x3876eb+=_0xe18e3f[_0xa07302++];}let _0x540980=_0xa07302;while(_0x540980<_0xe18e3f[_0x34e5b0(0x5b9)]&&(_0xe18e3f[_0x540980]==='\x20'||_0xe18e3f[_0x540980]==='\x09'))_0x540980++;if(_0xe18e3f[_0x540980]===':')_0x28d8cf+='\x22'+_0x3876eb+'\x22';else _0x3876eb===_0x34e5b0(0x4ce)||_0x3876eb===_0x34e5b0(0x211)||_0x3876eb===_0x34e5b0(0x57b)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x34e5b0(0x3e8)](_0x3876eb)?_0x28d8cf+=_0x3876eb:_0x28d8cf+='\x22'+_0x3876eb+'\x22';}return _0x28d8cf[_0x34e5b0(0x3a1)](/,(\s*[}\]])/g,'$1');}function _0x589258(_0x30557e){const _0x1b0adb=_0x11db91,_0x1234d7=[];let _0x2a7bd7=0x0;while(_0x2a7bd7<_0x30557e[_0x1b0adb(0x5b9)]){while(_0x2a7bd7<_0x30557e[_0x1b0adb(0x5b9)]&&(_0x30557e[_0x2a7bd7]==='\x20'||_0x30557e[_0x2a7bd7]==='\x09'))_0x2a7bd7++;if(_0x2a7bd7>=_0x30557e[_0x1b0adb(0x5b9)])break;const _0x50648a=_0x30557e[_0x2a7bd7];if(_0x50648a==='{'||_0x50648a==='['){const _0x33ea9d=_0x50648a==='{'?'}':']',_0x552317=_0x2a7bd7++;let _0x3b0b11=0x1,_0x5010b1=![],_0xb73179='';while(_0x2a7bd7<_0x30557e[_0x1b0adb(0x5b9)]&&_0x3b0b11>0x0){const _0x5091c3=_0x30557e[_0x2a7bd7];if(_0x5010b1){if(_0x5091c3==='\x5c')_0x2a7bd7++;else{if(_0x5091c3===_0xb73179)_0x5010b1=![];}}else{if(_0x5091c3==='\x22'||_0x5091c3==='\x27')_0x5010b1=!![],_0xb73179=_0x5091c3;else{if(_0x5091c3===_0x50648a)_0x3b0b11++;else{if(_0x5091c3===_0x33ea9d)_0x3b0b11--;}}}_0x2a7bd7++;}_0x1234d7[_0x1b0adb(0x4e9)](_0x30557e[_0x1b0adb(0x306)](_0x552317,_0x2a7bd7));continue;}if(_0x50648a==='\x22'||_0x50648a==='\x27'){const _0x1acba3=_0x50648a;_0x2a7bd7++;let _0xd4ed55='';while(_0x2a7bd7<_0x30557e[_0x1b0adb(0x5b9)]&&_0x30557e[_0x2a7bd7]!==_0x1acba3){if(_0x30557e[_0x2a7bd7]==='\x5c'&&_0x2a7bd7+0x1<_0x30557e[_0x1b0adb(0x5b9)])_0x2a7bd7++,_0xd4ed55+=_0x30557e[_0x2a7bd7++];else _0xd4ed55+=_0x30557e[_0x2a7bd7++];}if(_0x2a7bd7<_0x30557e[_0x1b0adb(0x5b9)])_0x2a7bd7++;_0x1234d7[_0x1b0adb(0x4e9)](_0xd4ed55);continue;}let _0x109f91='';while(_0x2a7bd7<_0x30557e['length']&&_0x30557e[_0x2a7bd7]!=='\x20'&&_0x30557e[_0x2a7bd7]!=='\x09'&&_0x30557e[_0x2a7bd7]!=='{'&&_0x30557e[_0x2a7bd7]!=='['){_0x109f91+=_0x30557e[_0x2a7bd7++];}if(_0x109f91)_0x1234d7[_0x1b0adb(0x4e9)](_0x109f91);}return _0x1234d7;}function _0x4fb0b5(_0xe3690c,_0x22ba93){const _0x3bfb60=_0x11db91,_0x597e4e=[..._0xe3690c[_0x3bfb60(0x28e)][_0x3bfb60(0x50d)]()][_0x3bfb60(0x5a3)](_0x2b8976=>!_0x2b8976[_0x3bfb60(0x30f)]('~'));console[_0x3bfb60(0x4ca)](['',_0x2734e9(_0x514f55['bold']+_0x514f55[_0x3bfb60(0x5d2)],_0x3bfb60(0x477)),_0x2734e9(_0x514f55[_0x3bfb60(0x3e9)]+_0x514f55[_0x3bfb60(0x5d2)],'\x20\x20║')+_0x2734e9(_0x514f55[_0x3bfb60(0x3e9)],_0x3bfb60(0x620))+_0x2734e9(_0x514f55[_0x3bfb60(0x3e9)]+_0x514f55[_0x3bfb60(0x5d2)],'║'),_0x2734e9(_0x514f55[_0x3bfb60(0x3e9)]+_0x514f55[_0x3bfb60(0x5d2)],'\x20\x20╚═══════════════════════════╝'),'','\x20\x20'+_0x2734e9(_0x514f55[_0x3bfb60(0x2d7)],'✓')+'\x20'+_0x2734e9(_0x514f55['bold'],_0x3bfb60(0x52e))+_0x3bfb60(0x1a8)+_0x22ba93[_0x3bfb60(0x5e1)],..._0x22ba93[_0x3bfb60(0x5a5)]>0x1?['\x20\x20'+_0x2734e9(_0x514f55[_0x3bfb60(0x2d7)],'✓')+'\x20'+_0x2734e9(_0x514f55[_0x3bfb60(0x3e9)],_0x3bfb60(0x3ac))+'\x20'+_0x22ba93[_0x3bfb60(0x5a5)]+_0x3bfb60(0x414)+_0x2734e9(_0x514f55[_0x3bfb60(0x5de)],_0x3bfb60(0x62a))]:[],'\x20\x20'+_0x2734e9(_0x514f55[_0x3bfb60(0x2d7)],'✓')+'\x20'+_0x2734e9(_0x514f55['bold'],_0x3bfb60(0x1e1))+_0x3bfb60(0x195)+_0x22ba93[_0x3bfb60(0x5e1)]+'/api','\x20\x20'+_0x2734e9(_0x514f55[_0x3bfb60(0x2d7)],'✓')+'\x20'+_0x2734e9(_0x514f55[_0x3bfb60(0x3e9)],_0x3bfb60(0x60b))+'\x20\x20\x20\x20'+_0x22ba93['dbPath'],'\x20\x20'+_0x2734e9(_0x514f55[_0x3bfb60(0x2d7)],'✓')+'\x20'+_0x2734e9(_0x514f55['bold'],'id')+_0x3bfb60(0x63e)+_0x2734e9(_0x514f55[_0x3bfb60(0x5de)],_0xe3690c['id']),'\x20\x20'+_0x2734e9(_0x514f55[_0x3bfb60(0x2d7)],'✓')+'\x20'+_0x2734e9(_0x514f55[_0x3bfb60(0x3e9)],_0x3bfb60(0x315))+_0x3bfb60(0x385)+_0x597e4e[_0x3bfb60(0x41b)](_0x5abef8=>_0x2734e9(_0x514f55[_0x3bfb60(0x5d2)],_0x5abef8))[_0x3bfb60(0x4c4)]('\x20\x20'),..._0x22ba93[_0x3bfb60(0x243)]?[]:['\x20\x20'+_0x2734e9(_0x514f55[_0x3bfb60(0x2d7)],'✓')+'\x20'+_0x2734e9(_0x514f55['bold'],_0x3bfb60(0x22e))+_0x3bfb60(0x2b3)+_0x22ba93[_0x3bfb60(0x5e1)]+_0x3bfb60(0x1ed)],'',_0x2734e9(_0x514f55[_0x3bfb60(0x3cd)],_0x3bfb60(0x4b4)+_0x2734e9(_0x514f55[_0x3bfb60(0x3e9)],_0x3bfb60(0x29b))+_0x3bfb60(0x3e6)+_0x2734e9(_0x514f55[_0x3bfb60(0x3e9)],'routes')+_0x3bfb60(0x5ea)+_0x2734e9(_0x514f55['bold'],_0x3bfb60(0x370))+'\x20to\x20quit.'),''][_0x3bfb60(0x4c4)]('\x0a'));}function _0x41f86d(_0x2fa1d8){const _0x3dfc85=_0x11db91;console[_0x3dfc85(0x4ca)]('\x0a'+_0x2734e9(_0x514f55[_0x3dfc85(0x3e9)],_0x3dfc85(0x21e))+'\x20\x20'+_0x2734e9(_0x514f55[_0x3dfc85(0x3cd)],_0x3dfc85(0x4f4))+'\x0a\x0a\x20\x20'+_0x2734e9(_0x514f55[_0x3dfc85(0x5d2)],_0x3dfc85(0x25a))+_0x3dfc85(0x4a3)+_0x2734e9(_0x514f55[_0x3dfc85(0x5d2)],_0x3dfc85(0x25a))+'\x20'+_0x2734e9(_0x514f55[_0x3dfc85(0x527)],_0x3dfc85(0x1de))+_0x3dfc85(0x3f3)+_0x2734e9(_0x514f55[_0x3dfc85(0x5d2)],'VERB')+'\x20'+_0x2734e9(_0x514f55['cyan'],'<path>')+'\x20'+_0x2734e9(_0x514f55['yellow'],_0x3dfc85(0x225))+_0x3dfc85(0x36c)+_0x2734e9(_0x514f55[_0x3dfc85(0x3cd)],_0x3dfc85(0x641))+'\x0a\x20\x20\x20\x20'+_0x2734e9(_0x514f55['gray'],_0x3dfc85(0x3c6))+_0x3dfc85(0x328)+_0x2734e9(_0x514f55[_0x3dfc85(0x5de)],'envs')+'\x20\x20\x20\x20\x20\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'+_0x2734e9(_0x514f55[_0x3dfc85(0x5de)],'types')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x2fa1d8[_0x3dfc85(0x60a)]+'/types\x0a\x20\x20\x20\x20'+_0x2734e9(_0x514f55[_0x3dfc85(0x5de)],_0x3dfc85(0x2b6))+'\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/'+_0x2fa1d8[_0x3dfc85(0x60a)]+_0x3dfc85(0x305)+_0x2734e9(_0x514f55[_0x3dfc85(0x5de)],'type/users/item/alice')+_0x3dfc85(0x3b1)+_0x2fa1d8['env']+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x2734e9(_0x514f55[_0x3dfc85(0x5de)],'type/users/query\x20{\x22active\x22:true}')+_0x3dfc85(0x453)+_0x2fa1d8[_0x3dfc85(0x60a)]+_0x3dfc85(0x535)+_0x2734e9(_0x514f55['gray'],_0x3dfc85(0x466))+_0x3dfc85(0x377)+_0x2734e9(_0x514f55[_0x3dfc85(0x5de)],'DELETE\x20type/users/item/x')+_0x3dfc85(0x377)+_0x2734e9(_0x514f55[_0x3dfc85(0x5de)],_0x3dfc85(0x1e5))+_0x3dfc85(0x205)+_0x2734e9(_0x514f55[_0x3dfc85(0x3e9)],'\x20\x20Flags')+'\x20\x20'+_0x2734e9(_0x514f55[_0x3dfc85(0x3cd)],_0x3dfc85(0x53c))+_0x3dfc85(0x183)+_0x2734e9(_0x514f55['cyan'],_0x3dfc85(0x2c1))+_0x3dfc85(0x3af)+_0x2734e9(_0x514f55[_0x3dfc85(0x5d2)],_0x3dfc85(0x649))+_0x3dfc85(0x19d)+_0x2734e9(_0x514f55['dim'],_0x3dfc85(0x641))+_0x3dfc85(0x377)+_0x2734e9(_0x514f55[_0x3dfc85(0x5de)],_0x3dfc85(0x375))+_0x3dfc85(0x377)+_0x2734e9(_0x514f55[_0x3dfc85(0x5de)],'type/users/item/alice\x20--env\x20staging')+_0x3dfc85(0x377)+_0x2734e9(_0x514f55[_0x3dfc85(0x5de)],'type/users\x20--help')+'\x0a\x0a'+_0x2734e9(_0x514f55[_0x3dfc85(0x3e9)],_0x3dfc85(0x371))+_0x3dfc85(0x183)+_0x2734e9(_0x514f55[_0x3dfc85(0x5d2)],_0x3dfc85(0x4c5))+'\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'+_0x2734e9(_0x514f55[_0x3dfc85(0x5d2)],_0x3dfc85(0x60a))+_0x3dfc85(0x53f)+_0x2734e9(_0x514f55[_0x3dfc85(0x5d2)],'routes')+'\x20'+_0x2734e9(_0x514f55[_0x3dfc85(0x3cd)],_0x3dfc85(0x3f0))+_0x3dfc85(0x5aa)+_0x2734e9(_0x514f55[_0x3dfc85(0x5d2)],'logs')+'\x20'+_0x2734e9(_0x514f55[_0x3dfc85(0x3cd)],_0x3dfc85(0x3df))+'\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20'+_0x2734e9(_0x514f55[_0x3dfc85(0x5d2)],_0x3dfc85(0x51d))+'\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'+_0x2734e9(_0x514f55[_0x3dfc85(0x5d2)],_0x3dfc85(0x29b))+_0x3dfc85(0x339)+_0x2734e9(_0x514f55[_0x3dfc85(0x5d2)],'exit')+'\x20'+_0x2734e9(_0x514f55[_0x3dfc85(0x3cd)],_0x3dfc85(0x369))+_0x3dfc85(0x1d0));}let _0x3e9702=![];async function _0x1d56c7(_0x278f48,_0x46188b=0x0,_0x2f02cf=null){const _0xf06b1f=_0x11db91;_0x3e9702&&(process[_0xf06b1f(0x193)][_0xf06b1f(0x557)](_0x2734e9(_0x514f55['red'],_0xf06b1f(0x1f4))),process['exit'](0x82));_0x3e9702=!![],process['stdout'][_0xf06b1f(0x557)]('\x0a'),process[_0xf06b1f(0x193)][_0xf06b1f(0x557)](_0x2734e9(_0x514f55[_0xf06b1f(0x527)],'\x20\x20[okdb]\x20'+(_0x2f02cf?_0xf06b1f(0x2e2)+_0x2f02cf+',\x20':'')+_0xf06b1f(0x5e9)));const _0x5abfe7=setTimeout(()=>{const _0x12f04e=_0xf06b1f;process['stderr'][_0x12f04e(0x557)](_0x2734e9(_0x514f55['red'],_0x12f04e(0x1f7))),process[_0x12f04e(0x370)](0x1);},0x1388);try{await _0x278f48[_0xf06b1f(0x62d)]();}catch(_0x11b102){console[_0xf06b1f(0x594)](_0x2734e9(_0x514f55[_0xf06b1f(0x4fb)],'\x20\x20'+_0x11b102['message']));}clearTimeout(_0x5abfe7),process['stderr'][_0xf06b1f(0x557)](_0x2734e9(_0x514f55['dim'],_0xf06b1f(0x3c1))),process['exit'](_0x46188b);}function _0x1df729(_0x5d226f){const _0x987e93=_0x11db91,_0x54146e=_0x5d226f[_0x987e93(0x60a)]!=='default'?_0x2734e9(_0x514f55[_0x987e93(0x527)],'['+_0x5d226f[_0x987e93(0x60a)]+']'):'';return _0x2734e9(_0x514f55[_0x987e93(0x3e9)]+_0x514f55[_0x987e93(0x5d2)],_0x987e93(0x2c2))+_0x54146e+_0x2734e9(_0x514f55['gray'],'>\x20');}const _0x4614f8=new Set(['GET','POST',_0x11db91(0x413),_0x11db91(0x374),_0x11db91(0x4a8)]);async function _0x454ce6(_0x29b20b,_0x5e2bc7,_0xc69c25,_0x549c1f,_0x465626,_0xba4242){const _0xe8fcfa=_0x11db91;_0x29b20b=_0x29b20b[_0xe8fcfa(0x258)]();if(!_0x29b20b||_0x29b20b[_0xe8fcfa(0x30f)]('#'))return;const _0x1c3a2b=_0x589258(_0x29b20b),{flags:_0x5f3df0,rest:_0x471e62}=_0x55e9a3(_0x1c3a2b);if(!_0x471e62['length'])return;const _0x30e50c=_0x471e62[0x0],_0x1225ca=_0x30e50c[_0xe8fcfa(0x297)]();if(_0x1225ca===_0xe8fcfa(0x2c6)){if(_0x471e62[0x1])_0x750b70(_0x5e2bc7,_0x39d12e(_0x471e62[0x1],_0x5f3df0['env']??_0x465626[_0xe8fcfa(0x60a)]));else _0x41f86d(_0x465626);return;}if(_0x1225ca===_0xe8fcfa(0x3c4)){const _0x53ed68=_0x471e62[0x1];if(!_0x53ed68){console['log'](_0x2734e9(_0x514f55[_0xe8fcfa(0x4fb)],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x5e2bc7[_0xe8fcfa(0x60a)](_0x53ed68),_0x465626[_0xe8fcfa(0x60a)]=_0x53ed68,_0xba4242?.[_0xe8fcfa(0x298)](_0x1df729(_0x465626)),console['log']('\x0a\x20\x20'+_0x2734e9(_0x514f55[_0xe8fcfa(0x2d7)],'✓')+_0xe8fcfa(0x358)+_0x2734e9(_0x514f55[_0xe8fcfa(0x3e9)]+_0x514f55[_0xe8fcfa(0x5d2)],_0x53ed68)+'\x0a');}catch{console['log'](_0xe8fcfa(0x497)+_0x2734e9(_0x514f55['red'],'✗')+'\x20environment\x20'+_0x2734e9(_0x514f55[_0xe8fcfa(0x3e9)],_0x53ed68)+_0xe8fcfa(0x162)+_0x2734e9(_0x514f55['dim'],_0xe8fcfa(0x40d)));}return;}if(_0x1225ca===_0xe8fcfa(0x32c)){const _0x324bd1=[..._0x5e2bc7[_0xe8fcfa(0x28e)]['keys']()][_0xe8fcfa(0x5a3)](_0x36365c=>!_0x36365c[_0xe8fcfa(0x30f)]('~'));console[_0xe8fcfa(0x4ca)]('');for(const _0x40b642 of _0x324bd1){const _0x18378b=_0x40b642===_0x465626[_0xe8fcfa(0x60a)];console[_0xe8fcfa(0x4ca)]('\x20\x20'+(_0x18378b?_0x2734e9(_0x514f55[_0xe8fcfa(0x2d7)],'●'):_0x2734e9(_0x514f55[_0xe8fcfa(0x3cd)],'○'))+'\x20\x20'+(_0x18378b?_0x2734e9(_0x514f55[_0xe8fcfa(0x3e9)]+_0x514f55[_0xe8fcfa(0x5d2)],_0x40b642):_0x2734e9(_0x514f55[_0xe8fcfa(0x3cd)],_0x40b642)));}console[_0xe8fcfa(0x4ca)]('\x0a\x20\x20'+_0x2734e9(_0x514f55['dim'],_0xe8fcfa(0x1a6))+'\x20'+_0x2734e9(_0x514f55[_0xe8fcfa(0x5d2)],_0x465626[_0xe8fcfa(0x60a)])),console[_0xe8fcfa(0x4ca)]('');return;}if(_0x1225ca==='ENVS'){const _0x26b616=[..._0x5e2bc7[_0xe8fcfa(0x28e)]['values']()]['filter'](_0x28fc71=>!_0x28fc71['name'][_0xe8fcfa(0x30f)]('~'));console['log']('');const _0x1000a8=Math[_0xe8fcfa(0x4b9)](..._0x26b616['map'](_0x4184b9=>_0x4184b9['name'][_0xe8fcfa(0x5b9)]));for(const _0x2c36d0 of _0x26b616){const _0x8b4e48=_0x2c36d0[_0xe8fcfa(0x21d)]===_0x465626[_0xe8fcfa(0x60a)],_0x49a9b0=_0x8b4e48?_0x2734e9(_0x514f55[_0xe8fcfa(0x2d7)],'●'):_0x2734e9(_0x514f55['dim'],'○'),_0x4c566c=_0x8b4e48?_0x2734e9(_0x514f55[_0xe8fcfa(0x3e9)]+_0x514f55[_0xe8fcfa(0x5d2)],_0x2c36d0['name'][_0xe8fcfa(0x4fe)](_0x1000a8)):_0x2734e9(_0x514f55[_0xe8fcfa(0x3cd)],_0x2c36d0['name'][_0xe8fcfa(0x4fe)](_0x1000a8)),_0x5657ef=[..._0x2c36d0['typeSubDbs'][_0xe8fcfa(0x50d)]()][_0xe8fcfa(0x5a3)](_0x33ac50=>!_0x33ac50[_0xe8fcfa(0x30f)]('~')),_0x3b33c3=_0x5657ef['length']?_0x2734e9(_0x514f55[_0xe8fcfa(0x3cd)],_0x5657ef[_0xe8fcfa(0x306)](0x0,0x5)[_0xe8fcfa(0x4c4)](',\x20')+(_0x5657ef['length']>0x5?_0xe8fcfa(0x55c)+(_0x5657ef[_0xe8fcfa(0x5b9)]-0x5)+_0xe8fcfa(0x506):'')):_0x2734e9(_0x514f55[_0xe8fcfa(0x3cd)],_0xe8fcfa(0x361));console[_0xe8fcfa(0x4ca)]('\x20\x20'+_0x49a9b0+'\x20\x20'+_0x4c566c+'\x20\x20'+_0x3b33c3);}console[_0xe8fcfa(0x4ca)]('');return;}if(_0x1225ca===_0xe8fcfa(0x1aa)){const _0x3f1a42=_0x5f3df0[_0xe8fcfa(0x60a)]??_0x471e62[0x1]??_0x465626[_0xe8fcfa(0x60a)];try{const _0x4ccd6b=_0x5e2bc7[_0xe8fcfa(0x60a)](_0x3f1a42),_0x39b6d7=[..._0x4ccd6b[_0xe8fcfa(0x17b)][_0xe8fcfa(0x50d)]()][_0xe8fcfa(0x5a3)](_0x453959=>!_0x453959['startsWith']('~'))[_0xe8fcfa(0x487)]();console[_0xe8fcfa(0x4ca)]('\x0a\x20\x20'+_0x2734e9(_0x514f55[_0xe8fcfa(0x3cd)],_0x39b6d7[_0xe8fcfa(0x5b9)]+'\x20type'+(_0x39b6d7[_0xe8fcfa(0x5b9)]!==0x1?'s':'')+_0xe8fcfa(0x457)+_0x3f1a42));for(const _0x5afa8d of _0x39b6d7){const _0x54a0b=_0x4ccd6b[_0xe8fcfa(0x17b)][_0xe8fcfa(0x30a)](_0x5afa8d),_0x2b3346=_0x54a0b?.['data']?.['getCount']?.()??0x0,_0x533d95=_0x2734e9(_0x514f55['bold']+_0x514f55[_0xe8fcfa(0x5d2)],_0x5afa8d[_0xe8fcfa(0x4fe)](0x1c));console[_0xe8fcfa(0x4ca)](_0xe8fcfa(0x385)+_0x533d95+'\x20\x20'+_0x2734e9(_0x514f55[_0xe8fcfa(0x35e)],String(_0x2b3346)[_0xe8fcfa(0x571)](0x6))+'\x20'+_0x2734e9(_0x514f55[_0xe8fcfa(0x3cd)],_0xe8fcfa(0x5ff)));}console[_0xe8fcfa(0x4ca)]('');}catch(_0x16ddd3){console['error'](_0x2734e9(_0x514f55[_0xe8fcfa(0x4fb)],'\x0a\x20\x20'+_0x16ddd3[_0xe8fcfa(0x25c)]+'\x0a'));}return;}if(_0x1225ca===_0xe8fcfa(0x2b7)){_0x3cbe3a(_0x5e2bc7,_0x471e62['slice'](0x1)[_0xe8fcfa(0x4c4)]('\x20'));return;}if(_0x1225ca===_0xe8fcfa(0x436)){const _0x59ef46=(_0x471e62[0x1]??'')['toLowerCase']();if(!_0x59ef46||_0x59ef46==='on')_0x549c1f[_0xe8fcfa(0x17f)]=!![],_0x549c1f[_0xe8fcfa(0x56e)]='info',console['log'](_0xe8fcfa(0x497)+_0x2734e9(_0x514f55[_0xe8fcfa(0x2d7)],'✓')+_0xe8fcfa(0x47f)+_0x2734e9(_0x514f55['dim'],_0xe8fcfa(0x2d8))+'\x0a');else{if(_0x59ef46===_0xe8fcfa(0x63d))_0x549c1f[_0xe8fcfa(0x17f)]=![],console[_0xe8fcfa(0x4ca)]('\x0a\x20\x20'+_0x2734e9(_0x514f55[_0xe8fcfa(0x527)],'○')+_0xe8fcfa(0x2d2));else _0x2e7337[_0x59ef46]!==undefined?(_0x549c1f[_0xe8fcfa(0x17f)]=!![],_0x549c1f[_0xe8fcfa(0x56e)]=_0x59ef46,console[_0xe8fcfa(0x4ca)](_0xe8fcfa(0x497)+_0x2734e9(_0x514f55[_0xe8fcfa(0x2d7)],'✓')+_0xe8fcfa(0x37a)+_0x2734e9(_0x514f55[_0xe8fcfa(0x3e9)],_0x59ef46)+'\x0a')):console[_0xe8fcfa(0x594)](_0x2734e9(_0x514f55[_0xe8fcfa(0x4fb)],_0xe8fcfa(0x55d)));}return;}if(_0x1225ca===_0xe8fcfa(0x2ab)||_0x1225ca==='QUIT'){await _0x1d56c7(_0x5e2bc7,0x0);return;}if(_0x1225ca===_0xe8fcfa(0x5cf)){const _0x3edc91='http://localhost:'+_0xc69c25[_0xe8fcfa(0x5e1)]+_0xe8fcfa(0x1ed),_0x253723=process[_0xe8fcfa(0x432)]==='win32'?_0xe8fcfa(0x23d)+_0x3edc91:process[_0xe8fcfa(0x432)]===_0xe8fcfa(0x44b)?_0xe8fcfa(0x5c8)+_0x3edc91:_0xe8fcfa(0x274)+_0x3edc91;require$$4[_0xe8fcfa(0x238)](_0x253723),console[_0xe8fcfa(0x4ca)](_0xe8fcfa(0x497)+_0x2734e9(_0x514f55[_0xe8fcfa(0x2d7)],'✓')+_0xe8fcfa(0x287)+_0x2734e9(_0x514f55[_0xe8fcfa(0x5d2)],_0x3edc91)+'\x0a');return;}let _0x14b5b7,_0x5b60d8,_0xc77962;if(_0x4614f8[_0xe8fcfa(0x5a7)](_0x1225ca)){_0x14b5b7=_0x1225ca,_0x5b60d8=_0x471e62[0x1],_0xc77962=_0x471e62['slice'](0x2);if(!_0x5b60d8){console[_0xe8fcfa(0x594)](_0x2734e9(_0x514f55['red'],'\x20\x20Usage:\x20'+_0x30e50c+_0xe8fcfa(0x271)));return;}}else _0x14b5b7=null,_0x5b60d8=_0x471e62[0x0],_0xc77962=_0x471e62['slice'](0x1);const _0x1d021f=_0x5f3df0[_0xe8fcfa(0x60a)]??_0x465626['env'],_0x268005=_0x39d12e(_0x5b60d8,_0x1d021f);if(_0x5f3df0['help']){_0x750b70(_0x5e2bc7,_0x268005);return;}let _0x49491f=null;if(_0xc77962[_0xe8fcfa(0x5b9)]){const _0x1f7245=_0xc77962[_0xe8fcfa(0x4c4)]('\x20');try{_0x49491f=_0xa5f929(_0x1f7245);}catch(_0x2c04bf){console[_0xe8fcfa(0x594)](_0x2734e9(_0x514f55[_0xe8fcfa(0x4fb)],_0xe8fcfa(0x440)+_0x1f7245+_0xe8fcfa(0x497)+_0x2734e9(_0x514f55['dim'],_0x2c04bf['message'])+'\x0a'));return;}}if(!_0x14b5b7)_0x14b5b7=_0x49491f!==null?_0xe8fcfa(0x44c):_0xe8fcfa(0x248);try{const _0x40c7c7=await _0x1fd8d1(_0x5e2bc7,_0x14b5b7,_0x268005,_0x49491f);_0x13e7c7(_0x40c7c7['status'],_0x40c7c7[_0xe8fcfa(0x3e7)]);}catch(_0x59d1be){console[_0xe8fcfa(0x594)](_0xe8fcfa(0x497)+_0x2734e9(_0x514f55['red'],'✗')+'\x20'+_0x59d1be[_0xe8fcfa(0x25c)]+'\x0a');}}class _0x4286de{constructor(){const _0x471d6b=_0x11db91;this[_0x471d6b(0x34c)]=new Map(),this['dynamic']=null,this['terminal']=![];}}function _0x28f4c1(_0x53fba5){const _0x4be535=_0x11db91,_0x2da96b=new _0x4286de();for(const _0x69b282 of _0x53fba5){if(_0x69b282['meta']?.[_0x4be535(0x51c)])continue;const _0x21bfbd=_0x69b282[_0x4be535(0x60b)][_0x4be535(0x3a1)](/^\/api/,'')[_0x4be535(0x3a1)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x4be535(0x3a1)](/^\//,'');if(!_0x21bfbd)continue;let _0xd6123f=_0x2da96b;for(const _0x25447c of _0x21bfbd[_0x4be535(0x3c0)]('/')[_0x4be535(0x5a3)](Boolean)){if(_0x25447c[_0x4be535(0x30f)](':')){const _0x2811f1=_0x25447c[_0x4be535(0x306)](0x1);if(!_0xd6123f['dynamic'])_0xd6123f['dynamic']={'param':_0x2811f1,'node':new _0x4286de()};_0xd6123f=_0xd6123f[_0x4be535(0x396)][_0x4be535(0x38a)];}else{if(!_0xd6123f[_0x4be535(0x34c)][_0x4be535(0x5a7)](_0x25447c))_0xd6123f[_0x4be535(0x34c)][_0x4be535(0x561)](_0x25447c,new _0x4286de());_0xd6123f=_0xd6123f[_0x4be535(0x34c)][_0x4be535(0x30a)](_0x25447c);}}_0xd6123f[_0x4be535(0x418)]=!![];}return _0x2da96b;}const _0x342feb=new Map();function _0x59097a(_0x48df20,_0x1664a8,_0x49d0bf){const _0xad2920=_0x11db91,_0x65b4bb=_0x342feb[_0xad2920(0x30a)](_0x48df20);if(_0x65b4bb&&_0x65b4bb[_0xad2920(0x2d6)]>Date['now']())return _0x65b4bb[_0xad2920(0x528)];const _0x47c023=_0x49d0bf();return _0x342feb['set'](_0x48df20,{'val':_0x47c023,'exp':Date['now']()+_0x1664a8}),_0x47c023;}function _0x2c005d(_0x3d13f2,_0x2f7b3a,_0xb4cc51,_0x1122de){const _0x35bef9=_0x11db91,_0x15f01a=_0x2f7b3a[_0x35bef9(0x60a)]??_0x1122de[_0x35bef9(0x60a)];switch(_0x3d13f2){case'env':return[..._0xb4cc51[_0x35bef9(0x28e)][_0x35bef9(0x50d)]()]['filter'](_0x43b5fc=>!_0x43b5fc[_0x35bef9(0x30f)]('~'));case'type':return _0x59097a(_0x35bef9(0x467)+_0x15f01a,0x7d0,()=>{const _0x1b1dc3=_0x35bef9;try{return[..._0xb4cc51['env'](_0x15f01a)[_0x1b1dc3(0x17b)][_0x1b1dc3(0x50d)]()]['filter'](_0x1d4572=>!_0x1d4572['startsWith']('~'));}catch{return[];}});case _0x35bef9(0x5a6):if(!_0x2f7b3a[_0x35bef9(0x257)])return[];return _0x59097a(_0x35bef9(0x3d5)+_0x15f01a+':'+_0x2f7b3a[_0x35bef9(0x257)],0x5dc,()=>{const _0xbe468f=_0x35bef9;try{const _0x63340=_0xb4cc51[_0xbe468f(0x60a)](_0x15f01a)['typeSubDbs'][_0xbe468f(0x30a)](_0x2f7b3a[_0xbe468f(0x257)]);if(!_0x63340?.[_0xbe468f(0x31e)])return[];const _0x44ee2c=[];for(const {key:_0x3fd373}of _0x63340['data'][_0xbe468f(0x2cb)]({'limit':0x32})){_0x44ee2c['push'](String(_0x3fd373));if(_0x44ee2c[_0xbe468f(0x5b9)]>=0x32)break;}return _0x44ee2c;}catch{return[];}});case _0x35bef9(0x1d9):if(!_0x2f7b3a[_0x35bef9(0x257)])return[];return _0x59097a(_0x35bef9(0x494)+_0x15f01a+':'+_0x2f7b3a[_0x35bef9(0x257)],0x7d0,()=>{const _0x4fa804=_0x35bef9;try{const _0x1342f4=_0xb4cc51['env'](_0x15f01a)[_0x4fa804(0x17b)]['get'](_0x2f7b3a[_0x4fa804(0x257)]);return _0x1342f4?[..._0x1342f4[_0x4fa804(0x45a)]?.[_0x4fa804(0x50d)]()??[]]:[];}catch{return[];}});case _0x35bef9(0x202):if(!_0x2f7b3a['type'])return[];return _0x59097a(_0x35bef9(0x475)+_0x15f01a+':'+_0x2f7b3a['type'],0x7d0,()=>{const _0x422dbd=_0x35bef9;try{return _0xb4cc51['fts']?.[_0x422dbd(0x44f)]?.(_0x2f7b3a[_0x422dbd(0x257)],_0xb4cc51[_0x422dbd(0x60a)](_0x15f01a))?.[_0x422dbd(0x41b)](_0x1921ad=>_0x1921ad[_0x422dbd(0x21d)])??[];}catch{return[];}});default:return[];}}function _0x1ddcac(_0x3c72f8,_0x446348,_0x2e285b,_0x5e990d){const _0x356b8b=_0x11db91,_0x405f7a=_0x3c72f8['endsWith']('/'),_0x1a21eb=_0x3c72f8[_0x356b8b(0x3c0)]('/'),_0x36bf56=_0x405f7a?_0x1a21eb[_0x356b8b(0x306)](0x0,-0x1):_0x1a21eb[_0x356b8b(0x306)](0x0,-0x1),_0x2017d1=_0x405f7a?'':_0x1a21eb[_0x1a21eb[_0x356b8b(0x5b9)]-0x1];let _0x22b559=_0x446348;const _0x3e672b={};for(const _0x3b3140 of _0x36bf56){if(!_0x3b3140)continue;if(_0x22b559[_0x356b8b(0x34c)][_0x356b8b(0x5a7)](_0x3b3140))_0x22b559=_0x22b559[_0x356b8b(0x34c)][_0x356b8b(0x30a)](_0x3b3140);else{if(_0x22b559[_0x356b8b(0x396)])_0x3e672b[_0x22b559['dynamic']['param']]=_0x3b3140,_0x22b559=_0x22b559[_0x356b8b(0x396)]['node'];else return[];}}const _0x926b49=_0x36bf56[_0x356b8b(0x5a3)](Boolean),_0x379103=_0x926b49[_0x356b8b(0x5b9)]?_0x926b49[_0x356b8b(0x4c4)]('/')+'/':'',_0x21e9e8=[];for(const [_0x336f76]of _0x22b559[_0x356b8b(0x34c)]){if(_0x336f76[_0x356b8b(0x30f)](_0x2017d1))_0x21e9e8['push'](_0x379103+_0x336f76);}if(_0x22b559[_0x356b8b(0x396)])for(const _0x57a329 of _0x2c005d(_0x22b559[_0x356b8b(0x396)][_0x356b8b(0x4da)],_0x3e672b,_0x2e285b,_0x5e990d)){if(String(_0x57a329)[_0x356b8b(0x30f)](_0x2017d1))_0x21e9e8[_0x356b8b(0x4e9)](_0x379103+_0x57a329);}return _0x21e9e8[_0x356b8b(0x306)](0x0,0x64);}const _0x35894c=['help',_0x11db91(0x474),_0x11db91(0x60a),_0x11db91(0x315),_0x11db91(0x52d),_0x11db91(0x4ec),'logs','open',_0x11db91(0x370),_0x11db91(0x3b2)];function _0x4ad9b9(_0x558b01,_0x29af96,_0x1d990c){return function _0x59ab9a(_0x5a824b){const _0x19170c=_0x16c8;try{const _0x2056bf=_0x5a824b['search'](/\s[{[]/),_0x517afd=_0x2056bf>=0x0?_0x5a824b['slice'](0x0,_0x2056bf):_0x5a824b,_0x463806=_0x517afd['trimStart']();if(!_0x463806){const _0x5102e1=[..._0x35894c,...[..._0x558b01[_0x19170c(0x34c)][_0x19170c(0x50d)]()]][_0x19170c(0x306)](0x0,0x64);return[_0x5102e1,''];}const _0x45b4ca=_0x463806[_0x19170c(0x3c0)](/\s+/),_0x53fb4a=_0x45b4ca[0x0],_0x26a5df=_0x53fb4a['toUpperCase']();if(_0x45b4ca[_0x19170c(0x5b9)]===0x1){const _0x7cbebe=_0x53fb4a[_0x19170c(0x337)](),_0x3a9309=_0x35894c[_0x19170c(0x5a3)](_0x185493=>_0x185493[_0x19170c(0x30f)](_0x7cbebe)),_0x586a8c=_0x1ddcac(_0x53fb4a,_0x558b01,_0x29af96,_0x1d990c),_0x3fd868=[...new Set([..._0x3a9309,..._0x586a8c])]['slice'](0x0,0x64);return[_0x3fd868,_0x53fb4a];}if(_0x4614f8[_0x19170c(0x5a7)](_0x26a5df)&&_0x45b4ca[_0x19170c(0x5b9)]===0x2){const _0x25f744=_0x45b4ca[0x1],_0x33b8f4=_0x1ddcac(_0x25f744,_0x558b01,_0x29af96,_0x1d990c);return[_0x33b8f4[_0x19170c(0x41b)](_0x233f70=>_0x53fb4a+'\x20'+_0x233f70),_0x53fb4a+'\x20'+_0x25f744];}if(!_0x4614f8[_0x19170c(0x5a7)](_0x26a5df)&&_0x45b4ca[_0x19170c(0x5b9)]>0x1){const _0xfc0522=_0x1ddcac(_0x53fb4a,_0x558b01,_0x29af96,_0x1d990c),_0x1860f0='\x20'+_0x45b4ca[_0x19170c(0x306)](0x1)[_0x19170c(0x4c4)]('\x20');return[_0xfc0522[_0x19170c(0x41b)](_0x2078c3=>_0x2078c3+_0x1860f0),_0x53fb4a+_0x1860f0];}return[[],_0x5a824b];}catch{return[[],_0x5a824b];}};}async function _0x38799d(_0x1ba9e6,_0x3001df){const _0x30b93a=_0x11db91,_0x43d091={'enabled':!![],'level':_0x3001df[_0x30b93a(0x2a4)]??_0x30b93a(0x3c6)},_0x1d2cd1={'env':_0x30b93a(0x29c)},_0x484fce={'current':null},_0x24ea5a=_0x28f4c1(_0x1ba9e6[_0x30b93a(0x349)][_0x30b93a(0x54f)]()),_0x990a5f=_0x4ad9b9(_0x24ea5a,_0x1ba9e6,_0x1d2cd1);_0x1ba9e6[_0x30b93a(0x4ca)][_0x30b93a(0x2de)](_0x31fc31=>{const _0x5f568e=_0x30b93a;if(!_0x43d091['enabled'])return;_0x55d52d(_0x31fc31,_0x43d091[_0x5f568e(0x56e)]),_0x484fce[_0x5f568e(0x2c7)]?.['prompt'](!![]);}),_0x4fb0b5(_0x1ba9e6,_0x3001df);const _0x362e20=_0x1160c2['createInterface']({'input':process[_0x30b93a(0x589)],'output':process[_0x30b93a(0x307)],'terminal':!![],'completer':_0x990a5f,'prompt':_0x1df729(_0x1d2cd1),'historySize':_0x2543dd});try{const _0x353166=_0x54201f[_0x30b93a(0x56c)](_0x4f6315,_0x30b93a(0x5fd))[_0x30b93a(0x3c0)]('\x0a')['filter'](Boolean);_0x362e20['history']=_0x353166[_0x30b93a(0x1e0)]()[_0x30b93a(0x306)](0x0,_0x2543dd);}catch{}_0x484fce['current']=_0x362e20,_0x362e20['on'](_0x30b93a(0x24a),async _0xe5a92=>{const _0x4059e8=_0x30b93a;_0x362e20[_0x4059e8(0x24c)]();try{await _0x454ce6(_0xe5a92,_0x1ba9e6,_0x3001df,_0x43d091,_0x1d2cd1,_0x362e20);}catch(_0x1e3b1b){console[_0x4059e8(0x594)](_0x2734e9(_0x514f55[_0x4059e8(0x4fb)],_0x4059e8(0x5c7)+_0x1e3b1b['message']));}finally{_0x362e20[_0x4059e8(0x485)](),_0x362e20[_0x4059e8(0x1b6)]();}}),_0x362e20['on'](_0x30b93a(0x62d),()=>{const _0x5c1811=_0x30b93a;try{const _0x2eaed0=[..._0x362e20[_0x5c1811(0x516)]][_0x5c1811(0x1e0)]()[_0x5c1811(0x5a3)](Boolean)['slice'](0x0,_0x2543dd);_0x54201f['writeFileSync'](_0x4f6315,_0x2eaed0[_0x5c1811(0x4c4)]('\x0a')+'\x0a');}catch{}_0x1d56c7(_0x1ba9e6,0x0);});let _0x59e177=0x0;return process['on']('SIGINT',()=>{const _0x28a54f=_0x30b93a;if(_0x3e9702)return _0x1d56c7(_0x1ba9e6,0x82,_0x28a54f(0x300));if(_0x362e20[_0x28a54f(0x24a)]==='')return _0x1d56c7(_0x1ba9e6,0x0,_0x28a54f(0x300));const _0xa7576b=Date[_0x28a54f(0x514)]();if(_0xa7576b-_0x59e177<0x5dc)return _0x1d56c7(_0x1ba9e6,0x0,_0x28a54f(0x172));_0x59e177=_0xa7576b,process[_0x28a54f(0x307)][_0x28a54f(0x557)]('\x0a'),_0x362e20[_0x28a54f(0x643)](0x0),_0x362e20[_0x28a54f(0x1b6)](),process[_0x28a54f(0x193)][_0x28a54f(0x557)](_0x2734e9(_0x514f55['dim'],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on'](_0x30b93a(0x3dd),()=>_0x1d56c7(_0x1ba9e6,0x0,'SIGTERM')),process['on'](_0x30b93a(0x5f9),()=>_0x1d56c7(_0x1ba9e6,0x0,_0x30b93a(0x5f9))),_0x362e20[_0x30b93a(0x1b6)](),_0x362e20;}return okdbShell={'start':_0x38799d,'colorLog':_0x55d52d,'lenientParse':_0xa5f929,'_splitLine':_0x589258,'_formatRouteHelpLines':_0x1940fd,'_routeSummary':_0x315df9,'_routeTags':_0x56733e},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x5e9715=_0x12dbbc;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x568576,performance:_0x1f6ed5}=require$$0$4,_0x1044d9=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x5e9715(0x4ce),_0x3d560b=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0xa6697b=process.env.OKDB_LOOP_LAG_ALL==='1',_0xb416cc=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x5c066d{constructor(){const _0x2b0a25=_0x5e9715;this[_0x2b0a25(0x17f)]=_0x1044d9,this[_0x2b0a25(0x5c6)]=new Map(),this['_h']=null,this[_0x2b0a25(0x45e)]=null,this[_0x2b0a25(0x47e)]=![],this[_0x2b0a25(0x27b)]=(_0xe3a021,_0x1dad60)=>process[_0x2b0a25(0x193)][_0x2b0a25(0x557)](_0xe3a021+(_0x1dad60?'\x20'+JSON[_0x2b0a25(0x2be)](_0x1dad60):'')+'\x0a');}[_0x5e9715(0x514)](){const _0x889b7b=_0x5e9715;return _0x1f6ed5[_0x889b7b(0x514)]();}[_0x5e9715(0x279)](_0x395703){const _0x58b4f5=_0x5e9715;if(typeof _0x395703==='function')this[_0x58b4f5(0x27b)]=_0x395703;}['note'](_0x33ca24,_0xb8ab4a,_0x5a4896){const _0xaf0a3e=_0x5e9715;if(!this[_0xaf0a3e(0x17f)])return;let _0x17b53d=this[_0xaf0a3e(0x5c6)]['get'](_0x33ca24);!_0x17b53d&&(_0x17b53d={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0xaf0a3e(0x5c6)][_0xaf0a3e(0x561)](_0x33ca24,_0x17b53d)),_0x17b53d['ms']+=_0xb8ab4a,_0x17b53d[_0xaf0a3e(0x1fe)]+=0x1,_0xb8ab4a>_0x17b53d[_0xaf0a3e(0x326)]&&(_0x17b53d[_0xaf0a3e(0x326)]=_0xb8ab4a,_0x17b53d[_0xaf0a3e(0x5c5)]=_0x5a4896||'');}[_0x5e9715(0x499)](_0x3e29fa){const _0x365402=_0x5e9715;if(!this['enabled']||this[_0x365402(0x47e)])return;this['_started']=!![];if(_0x3e29fa)this[_0x365402(0x27b)]=_0x3e29fa;this['_h']=_0x568576({'resolution':0xa}),this['_h'][_0x365402(0x4cc)](),this[_0x365402(0x45e)]=setInterval(()=>this[_0x365402(0x25f)](),_0x3d560b);if(this[_0x365402(0x45e)][_0x365402(0x2bd)])this[_0x365402(0x45e)][_0x365402(0x2bd)]();}['onWindow'](_0x3e7250){const _0x2062f3=_0x5e9715;if(!this['_windowCbs'])this[_0x2062f3(0x3bc)]=new Set();this[_0x2062f3(0x3bc)][_0x2062f3(0x4d8)](_0x3e7250);if(!this[_0x2062f3(0x47e)])this['_startAdmission']();}[_0x5e9715(0x3c3)](_0x172004){const _0x44a84f=_0x5e9715;this[_0x44a84f(0x3bc)]?.['delete'](_0x172004);}[_0x5e9715(0x3d9)](){const _0x5c23b7=_0x5e9715;if(this[_0x5c23b7(0x33a)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x568576({'resolution':0xa}),this['_h'][_0x5c23b7(0x4cc)]());const _0x72559=_0x3d560b;this[_0x5c23b7(0x223)]=setInterval(()=>{const _0x3c70e8=_0x5c23b7,_0x45f7cd=this['_h'];if(!_0x45f7cd)return;const _0x392744=_0x45f7cd['percentile'](0x63)/0xf4240,_0x3ee8d7=_0x45f7cd[_0x3c70e8(0x4b9)]/0xf4240,_0x2ad7e6=_0x45f7cd['mean']/0xf4240;_0x45f7cd[_0x3c70e8(0x5d6)]();if(this[_0x3c70e8(0x3bc)])for(const _0x197cf1 of this[_0x3c70e8(0x3bc)]){try{_0x197cf1({'p99Ms':_0x392744,'maxMs':_0x3ee8d7,'meanMs':_0x2ad7e6,'reportMs':_0x72559});}catch{}}},_0x72559);if(this['_admissionTimer'][_0x5c23b7(0x2bd)])this[_0x5c23b7(0x223)]['unref']();}['_report'](){const _0x22a7ff=_0x5e9715,_0x12574c=this['_h'],_0x288cbf=_0x12574c[_0x22a7ff(0x4b9)]/0xf4240,_0x49a507=_0x12574c['percentile'](0x63)/0xf4240,_0x1d4d55=_0x12574c[_0x22a7ff(0x241)]/0xf4240;_0x12574c[_0x22a7ff(0x5d6)]();const _0x439f1c=[...this[_0x22a7ff(0x5c6)][_0x22a7ff(0x355)]()][_0x22a7ff(0x41b)](([_0x1bc082,_0x534a35])=>({'label':_0x1bc082,..._0x534a35}))['sort']((_0x28bfe8,_0x2541f4)=>_0x2541f4['ms']-_0x28bfe8['ms'])[_0x22a7ff(0x306)](0x0,0x8);this[_0x22a7ff(0x5c6)][_0x22a7ff(0x4c6)]();const _0x52a447=_0x439f1c['reduce']((_0x337e21,_0x1e6bed)=>_0x337e21+_0x1e6bed['ms'],0x0),_0x155a15=_0x439f1c[_0x22a7ff(0x41b)](_0x73cb51=>_0x73cb51[_0x22a7ff(0x4a1)]+'='+_0x73cb51['ms'][_0x22a7ff(0x476)](0x0)+'ms/'+_0x73cb51[_0x22a7ff(0x1fe)]+(_0x73cb51[_0x22a7ff(0x326)]>0x5?_0x22a7ff(0x296)+_0x73cb51[_0x22a7ff(0x326)]['toFixed'](0x0)+'ms'+(_0x73cb51['maxExtra']?'\x20'+_0x73cb51['maxExtra']:'')+')':''));(_0xa6697b||_0x288cbf>=_0xb416cc)&&this[_0x22a7ff(0x27b)](_0x22a7ff(0x242)+_0x3d560b+_0x22a7ff(0x4bb)+_0x288cbf[_0x22a7ff(0x476)](0x0)+_0x22a7ff(0x365)+_0x49a507[_0x22a7ff(0x476)](0x0)+_0x22a7ff(0x53d)+_0x1d4d55[_0x22a7ff(0x476)](0x0)+_0x22a7ff(0x464)+_0x52a447[_0x22a7ff(0x476)](0x0)+'ms'+(_0x155a15[_0x22a7ff(0x5b9)]?'\x20│\x20'+_0x155a15['join']('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x22a7ff(0x3bc)])for(const _0x5a93ea of this[_0x22a7ff(0x3bc)]){try{_0x5a93ea({'p99Ms':_0x49a507,'maxMs':_0x288cbf,'meanMs':_0x1d4d55,'reportMs':_0x3d560b});}catch{}}}[_0x5e9715(0x1f0)](){const _0x30e580=_0x5e9715;if(this[_0x30e580(0x45e)])clearInterval(this[_0x30e580(0x45e)]);if(this['_h'])this['_h'][_0x30e580(0x4d1)]();this[_0x30e580(0x45e)]=null,this['_h']=null,this['_started']=![];}}const _0x308eb2=new _0x5c066d();if(_0x308eb2['enabled'])_0x308eb2[_0x5e9715(0x499)]();return okdbLoopMonitor={'LOOP':_0x308eb2},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x27f333=require$$1$1,_0x21d825=require$$1;let _0x3c39fc,_0x29db84,_0x356af4,_0x278127,_0x16fa73,_0x4b62d5,_0x5de634,_0x24da3d=![];const _0x487376=new Set();let _0x4bd7eb=null;const _0xf3729e=new Map();function _0x5aebbb(){const _0x3a4ba6=_0x16c8;if(_0x3c39fc!==undefined)return _0x3c39fc;_0x3c39fc=process.env.OKDB_DIAG==='1';if(!_0x3c39fc)return![];_0x29db84=process.env.OKDB_DIAG_STACK==='1',_0x278127=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x356af4=new Array(_0x278127),_0x16fa73=0x0,_0x4b62d5=0x0,_0x5de634=process.env.OKDB_DIAG_DIR||null;if(_0x5de634)try{_0x27f333[_0x3a4ba6(0x501)](_0x5de634,{'recursive':!![]});}catch{}return!![];}function _0x1d11ae(){return _0x3c39fc===undefined?_0x5aebbb():_0x3c39fc;}function _0x1ad670(_0x56d227,_0x1944f9){const _0x4107cc=_0x16c8;if(_0x3c39fc===undefined?!_0x5aebbb():!_0x3c39fc)return;let _0x1a28a3;if(_0x29db84){const _0x302405=new Error()[_0x4107cc(0x495)]||'';_0x1a28a3=_0x302405[_0x4107cc(0x3c0)]('\x0a')[_0x4107cc(0x306)](0x3)[_0x4107cc(0x41b)](_0x3c70e4=>_0x3c70e4[_0x4107cc(0x258)]())[_0x4107cc(0x5a3)](Boolean)[_0x4107cc(0x306)](0x0,0x8);}_0x356af4[_0x16fa73]={'seq':_0x4b62d5++,'t':Date[_0x4107cc(0x514)](),'env':_0x56d227,'kind':_0x1944f9||'commit','stack':_0x1a28a3},_0x16fa73=(_0x16fa73+0x1)%_0x278127;}function _0x508b50(_0x2e22e3){const _0x1fc75d=_0x16c8,_0xa77f49=[];for(let _0x1a9f91=0x0;_0x1a9f91<_0x278127;_0x1a9f91++){const _0x27b09c=_0x356af4[(_0x16fa73-0x1-_0x1a9f91+_0x278127*0x2)%_0x278127];if(!_0x27b09c)continue;_0xa77f49[_0x1fc75d(0x4e9)](_0x27b09c);if(_0xa77f49[_0x1fc75d(0x5b9)]>=_0x2e22e3)break;}return _0xa77f49;}function _0x52581a(_0x47bdf6){const _0x2ff0e5=_0x16c8;try{process[_0x2ff0e5(0x193)][_0x2ff0e5(0x557)](_0x47bdf6+'\x0a');}catch{}if(_0x5de634)try{_0x27f333[_0x2ff0e5(0x38e)](_0x21d825[_0x2ff0e5(0x4c4)](_0x5de634,_0x2ff0e5(0x41c)+process[_0x2ff0e5(0x59c)]+'.log'),_0x47bdf6+'\x0a');}catch{}}function _0x54c586(_0x3308cf){const _0x389260=_0x16c8,_0x1b385c=_0x508b50(_0x3308cf);if(!_0x1b385c[_0x389260(0x5b9)])return _0x389260(0x256);const _0x4259e8=Date['now']();return _0x1b385c['map'](_0x79faed=>{const _0x318f11=_0x389260,_0x1ea3df=_0x318f11(0x4d2)+_0x79faed[_0x318f11(0x262)]+'\x20-'+(_0x4259e8-_0x79faed['t'])+_0x318f11(0x3fe)+_0x79faed[_0x318f11(0x60a)]+'\x20'+_0x79faed[_0x318f11(0x2ef)];return _0x79faed[_0x318f11(0x495)]&&_0x79faed[_0x318f11(0x495)]['length']?_0x1ea3df+'\x0a\x20\x20\x20\x20\x20\x20'+_0x79faed[_0x318f11(0x495)][_0x318f11(0x4c4)](_0x318f11(0x39d)):_0x1ea3df;})[_0x389260(0x4c4)]('\x0a');}function _0x146916(_0x5be74f,_0x1264f9){const _0xf99723=_0x16c8,_0x5c72a6='\x0a===\x20OKDB_DIAG\x20'+_0x5be74f+_0xf99723(0x44e)+new Date()[_0xf99723(0x219)]()+_0xf99723(0x327)+process[_0xf99723(0x59c)]+'\x20===',_0x271ff2=[_0x5c72a6,_0xf99723(0x5ef)+(_0x1264f9&&_0x1264f9[_0xf99723(0x495)]?_0x1264f9['stack'][_0xf99723(0x3c0)]('\x0a')[0x0]:_0x1264f9),_0xf99723(0x27f)+(_0x29db84?'':_0xf99723(0x4bc))+':',_0x54c586(0x18),_0x10a036(),'='[_0xf99723(0x3cf)](_0x5c72a6[_0xf99723(0x5b9)]-0x1)];_0x52581a(_0x271ff2[_0xf99723(0x4c4)]('\x0a'));}function _0x50d5bb(_0x2c2023){const _0xa8d9dc=_0x16c8;if(!_0x1d11ae())return;const _0x2e9abf=String(_0x2c2023&&_0x2c2023[_0xa8d9dc(0x25c)]||_0x2c2023||''),_0x5c4ce1=/already closed|environment is already|invalid read txn|reset an invalid/i[_0xa8d9dc(0x3e8)](_0x2e9abf);_0x146916(_0x5c4ce1?_0xa8d9dc(0x5c0):'uncaughtException',_0x2c2023);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x5c4ce1)return;try{console[_0xa8d9dc(0x594)](_0x2c2023&&_0x2c2023[_0xa8d9dc(0x495)]?_0x2c2023['stack']:_0x2c2023);}catch{}process['exit'](0x1);}function _0x365b97(_0x1b3121){const _0x13d6ba=_0x16c8;if(!_0x1d11ae())return;const _0x2193c2=String(_0x1b3121&&_0x1b3121['message']||_0x1b3121||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x13d6ba(0x3e8)](_0x2193c2)&&_0x146916('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x1b3121);}function _0x10a036(){const _0x2c07ce=_0x16c8,_0x39328e=[_0x2c07ce(0x4af)];let _0x23339a=![];for(const _0x393818 of _0x487376){const _0x49658=_0x393818&&_0x393818['_envs'];if(!_0x49658)continue;for(const [_0x3a3b60,_0x2f3cbf]of _0x49658){const _0x47d97a=_0x2f3cbf&&_0x2f3cbf[_0x2c07ce(0x1ee)]&&_0x2f3cbf['_coordinator'][_0x2c07ce(0x346)];if(!_0x47d97a)continue;let _0x2b752a,_0x23b9fc;try{_0x2b752a=Atomics['load'](_0x47d97a,0x0),_0x23b9fc=Atomics[_0x2c07ce(0x43a)](_0x47d97a,0x1);}catch{continue;}if(_0x2b752a===0x0)continue;_0x23339a=!![];const _0x2fc6b7=_0x2b752a>0x0?'SWAP':_0x2c07ce(0x3e5),_0x2380cd=Date[_0x2c07ce(0x514)]()-Math['abs'](_0x2b752a)*0x3e8,_0x43fa05=((()=>{const _0x5e77c5=_0x2c07ce;try{return _0x2f3cbf[_0x5e77c5(0x61c)]&&_0x2f3cbf[_0x5e77c5(0x61c)]['status']?_0x2f3cbf[_0x5e77c5(0x61c)][_0x5e77c5(0x2bb)]():null;}catch{return null;}})());_0x39328e[_0x2c07ce(0x4e9)](_0x2c07ce(0x254)+_0x3a3b60+'\x20phase='+_0x2fc6b7+'\x20drainAge='+_0x2380cd+_0x2c07ce(0x34f)+_0x23b9fc+(_0x43fa05?_0x2c07ce(0x58e)+_0x43fa05[_0x2c07ce(0x567)]+'\x20oldestPendingMs='+_0x43fa05[_0x2c07ce(0x608)]+_0x2c07ce(0x380)+_0x43fa05['parkedNow']+'}':''));}}if(!_0x23339a)_0x39328e['push'](_0x2c07ce(0x1c4));return _0x39328e[_0x2c07ce(0x4c4)]('\x0a');}function _0x24d63f(){const _0x29e834=_0x16c8;if(!_0x1d11ae())return;const _0x384ae3=Math[_0x29e834(0x4b9)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x3eee03=Date[_0x29e834(0x514)]();for(const _0x4af169 of _0x487376){const _0x2c9c9d=_0x4af169&&_0x4af169['_envs'];if(!_0x2c9c9d)continue;for(const [_0x20172f,_0x1db83f]of _0x2c9c9d){const _0x1de9e4=_0x1db83f&&_0x1db83f[_0x29e834(0x1ee)]&&_0x1db83f['_coordinator']['view'];if(!_0x1de9e4)continue;let _0x218693;try{_0x218693=Atomics[_0x29e834(0x43a)](_0x1de9e4,0x0);}catch{continue;}const _0x351162=_0x4af169['path']+'|'+_0x20172f;if(_0x218693<=0x0){_0xf3729e[_0x29e834(0x4c0)](_0x351162);continue;}const _0x2c9ea7=_0x3eee03-_0x218693*0x3e8,_0x3ada08=_0xf3729e[_0x29e834(0x30a)](_0x351162);if(_0x2c9ea7<_0x384ae3)continue;if(_0x3ada08&&_0x3eee03-_0x3ada08[_0x29e834(0x615)]<_0x384ae3)continue;_0xf3729e[_0x29e834(0x561)](_0x351162,{'firstTs':_0x3ada08?_0x3ada08[_0x29e834(0x5fe)]:_0x218693,'dumpedAt':_0x3eee03});const _0x14972f='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x2c9ea7+_0x29e834(0x4a4)+_0x20172f+_0x29e834(0x44e)+new Date()[_0x29e834(0x219)]()+_0x29e834(0x327)+process[_0x29e834(0x59c)]+_0x29e834(0x42f);_0x52581a([_0x14972f,_0x10a036(),'='['repeat'](_0x14972f['length']-0x1)]['join']('\x0a'));}}}function _0x552f35(){const _0x2ed5a6=_0x16c8;if(!_0x1d11ae()||_0x24da3d)return;_0x24da3d=!![],process['prependListener']('uncaughtException',_0x50d5bb),process[_0x2ed5a6(0x1b8)](_0x2ed5a6(0x38c),_0x365b97);const _0x1da74a=Math[_0x2ed5a6(0x4b9)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x4bd7eb=setInterval(_0x24d63f,_0x1da74a);if(_0x4bd7eb[_0x2ed5a6(0x2bd)])_0x4bd7eb['unref']();}function _0x3c8101(_0x2c3219){const _0x1895ed=_0x16c8;if(!_0x1d11ae()||!_0x2c3219)return;_0x487376[_0x1895ed(0x4d8)](_0x2c3219),_0x552f35();}function _0x2fc753(_0x2d1110){const _0xd0dbda=_0x16c8;_0x487376[_0xd0dbda(0x4c0)](_0x2d1110);}function _0x3107ad(){if(!_0x1d11ae())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x29db84,'recentWrites':_0x508b50(0x10),'drain':_0x10a036()};}return okdbDiag={'isEnabled':_0x1d11ae,'recordWrite':_0x1ad670,'installDiag':_0x552f35,'registerOkdb':_0x3c8101,'unregisterOkdb':_0x2fc753,'snapshot':_0x3107ad},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x5cd592=_0x12dbbc;if(hasRequiredOkdbWriter)return okdbWriter[_0x5cd592(0x198)];hasRequiredOkdbWriter=0x1;const {performance:_0xc2f16c}=require$$0$5,_0x4d0db5=requireOkdbDiag(),_0x34ea0f=process.env.OKDB_COMMIT_MODE===_0x5cd592(0x478);class _0x121bdf{constructor(_0x32c9f3){const _0x5ed9b6=_0x5cd592;this[_0x5ed9b6(0x60a)]=_0x32c9f3,this['_inflight']=new Set(),this['_enqueuedAt']=new Map(),this[_0x5ed9b6(0x3a6)]=0x0,this['_durs']=[],this[_0x5ed9b6(0x412)]=[],this[_0x5ed9b6(0x3ee)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x5ed9b6(0x3b3)]=0x0,this[_0x5ed9b6(0x3da)]=[],this[_0x5ed9b6(0x2ba)]=0x0;}async['transaction'](_0x47bb6c,_0x13c5ec){const _0x56d63e=_0x5cd592;if(_0x4d0db5[_0x56d63e(0x596)]())_0x4d0db5[_0x56d63e(0x421)](this[_0x56d63e(0x60a)]?.['name'],_0x13c5ec);if(this['_closed']){const _0x43978f=new Error(_0x56d63e(0x518));_0x43978f[_0x56d63e(0x20a)]=_0x56d63e(0x435);throw _0x43978f;}if(this['_highWater']>0x0){let _0x267bda=![];while(this[_0x56d63e(0x3b3)]>=this[_0x56d63e(0x3ee)]&&!this[_0x56d63e(0x1b2)]){!_0x267bda&&(_0x267bda=!![],this['_bpParkedTotal']++),await new Promise(_0x5db6b2=>this[_0x56d63e(0x3da)][_0x56d63e(0x4e9)](_0x5db6b2));}if(this['_closed']){const _0x42e04a=new Error(_0x56d63e(0x518));_0x42e04a[_0x56d63e(0x20a)]=_0x56d63e(0x435);throw _0x42e04a;}}this[_0x56d63e(0x3b3)]++;const _0x5e436a=this[_0x56d63e(0x60a)][_0x56d63e(0x1ee)];if(_0x5e436a)await _0x5e436a[_0x56d63e(0x350)]();if(this[_0x56d63e(0x1b2)]){if(_0x5e436a)_0x5e436a['afterWrite']();this[_0x56d63e(0x3b3)]--;if(this[_0x56d63e(0x3da)][_0x56d63e(0x5b9)]&&this['_outstanding']<this['_highWater'])this[_0x56d63e(0x3da)][_0x56d63e(0x40e)]()();const _0x2f8dae=new Error(_0x56d63e(0x518));_0x2f8dae[_0x56d63e(0x20a)]='ENV_CLOSING_RETRY';throw _0x2f8dae;}const _0x319599=_0xc2f16c[_0x56d63e(0x514)]();if(_0x34ea0f)try{const _0x3ecd67=this[_0x56d63e(0x60a)]['db']['transactionSync'](_0x47bb6c);this['_committed']++;if(this[_0x56d63e(0x64a)][_0x56d63e(0x4e9)](_0xc2f16c[_0x56d63e(0x514)]()-_0x319599)>0x100)this[_0x56d63e(0x64a)][_0x56d63e(0x40e)]();if(this[_0x56d63e(0x412)][_0x56d63e(0x4e9)](_0xc2f16c['now']())>0x800)this['_done']['shift']();return _0x3ecd67;}finally{this[_0x56d63e(0x3b3)]--;if(this[_0x56d63e(0x3da)][_0x56d63e(0x5b9)]&&this[_0x56d63e(0x3b3)]<this[_0x56d63e(0x3ee)])this[_0x56d63e(0x3da)][_0x56d63e(0x40e)]()();if(_0x5e436a)_0x5e436a[_0x56d63e(0x3a5)]();}const _0x5becca=this['env']['db']['childTransaction'](_0x47bb6c);this[_0x56d63e(0x28f)][_0x56d63e(0x4d8)](_0x5becca),this[_0x56d63e(0x373)][_0x56d63e(0x561)](_0x5becca,_0x319599);const _0xa7bec6=()=>{const _0x330947=_0x56d63e;this['_inflight'][_0x330947(0x4c0)](_0x5becca),this[_0x330947(0x373)][_0x330947(0x4c0)](_0x5becca),this[_0x330947(0x3a6)]++,this[_0x330947(0x3b3)]--;this[_0x330947(0x3da)][_0x330947(0x5b9)]&&this[_0x330947(0x3b3)]<this[_0x330947(0x3ee)]&&this['_bpWaiters'][_0x330947(0x40e)]()();if(this[_0x330947(0x64a)][_0x330947(0x4e9)](_0xc2f16c[_0x330947(0x514)]()-_0x319599)>0x100)this[_0x330947(0x64a)][_0x330947(0x40e)]();if(this[_0x330947(0x412)][_0x330947(0x4e9)](_0xc2f16c[_0x330947(0x514)]())>0x800)this[_0x330947(0x412)]['shift']();};_0x5becca['then'](_0xa7bec6,_0xa7bec6);try{return await _0x5becca;}finally{if(_0x5e436a)_0x5e436a[_0x56d63e(0x3a5)]();}}[_0x5cd592(0x2bb)](){const _0x6def5=_0x5cd592,_0x9aaae=_0xc2f16c['now']();let _0x596447=0x0;for(const _0x3b1e0e of this[_0x6def5(0x373)]['values']()){const _0x126ba0=_0x9aaae-_0x3b1e0e;if(_0x126ba0>_0x596447)_0x596447=_0x126ba0;}let _0x12e98c=0x0;for(let _0x3cf52b=this[_0x6def5(0x412)][_0x6def5(0x5b9)]-0x1;_0x3cf52b>=0x0;_0x3cf52b--){if(_0x9aaae-this[_0x6def5(0x412)][_0x3cf52b]>0x3e8)break;_0x12e98c++;}let _0x92cbf8=0x0;if(this[_0x6def5(0x64a)][_0x6def5(0x5b9)]){const _0x1da01f=[...this[_0x6def5(0x64a)]][_0x6def5(0x487)]((_0x1daf02,_0x50adcf)=>_0x1daf02-_0x50adcf);_0x92cbf8=_0x1da01f[Math[_0x6def5(0x275)](_0x1da01f['length']-0x1,Math[_0x6def5(0x470)](_0x1da01f[_0x6def5(0x5b9)]*0.99))];}return{'depth':this[_0x6def5(0x28f)][_0x6def5(0x46b)],'oldestPendingMs':Math[_0x6def5(0x2b8)](_0x596447),'committed':this[_0x6def5(0x3a6)],'commitsPerSec':_0x12e98c,'commitP99Ms':Math[_0x6def5(0x2b8)](_0x92cbf8),'parkedNow':this['_bpWaiters'][_0x6def5(0x5b9)],'parkedTotal':this[_0x6def5(0x2ba)],'highWater':this[_0x6def5(0x3ee)]};}[_0x5cd592(0x639)](){const _0x108bce=_0x5cd592,_0x2dd8d6=_0xc2f16c[_0x108bce(0x514)]();return[...this['_enqueuedAt'][_0x108bce(0x1b7)]()][_0x108bce(0x41b)](_0x56fb3a=>Math[_0x108bce(0x2b8)](_0x2dd8d6-_0x56fb3a))[_0x108bce(0x487)]((_0xba82ec,_0x5f4bd0)=>_0x5f4bd0-_0xba82ec);}[_0x5cd592(0x21c)](){const _0x3a13b1=_0x5cd592;this[_0x3a13b1(0x1b2)]=!![];for(const _0xfcaeb8 of this['_bpWaiters'][_0x3a13b1(0x5cd)](0x0))_0xfcaeb8();}async['drain'](){const _0x15fb74=_0x5cd592;let _0x57de8d=0x0;while(this['_inflight'][_0x15fb74(0x46b)]&&_0x57de8d++<0x3e8){await Promise[_0x15fb74(0x393)]([...this['_inflight']]);}}async[_0x5cd592(0x613)](_0x5f081a,_0x3d94aa,_0xa08bf0,_0x176dfd){const _0x9c472e=_0x5cd592;return this[_0x9c472e(0x5b1)](()=>{const _0x4bc008=_0x9c472e;if(_0x176dfd===undefined)_0x5f081a[_0x4bc008(0x598)](_0x3d94aa,_0xa08bf0);else _0x5f081a[_0x4bc008(0x598)](_0x3d94aa,_0xa08bf0,_0x176dfd);},_0x9c472e(0x2dc));}async['remove'](_0x4c5b1b,_0xa96912){const _0xd209f0=_0x5cd592;return this[_0xd209f0(0x5b1)](()=>_0x4c5b1b['removeSync'](_0xa96912),'raw-remove');}}async function _0x1cfa02(_0x3a46b2,_0x2b91fa){const _0x5057c6=_0x5cd592;if(_0x2b91fa==null)_0x2b91fa=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x2a5a07=_0x3a46b2?.[_0x5057c6(0x623)];if(!_0x2a5a07||typeof _0x2a5a07[_0x5057c6(0x4ba)]!==_0x5057c6(0x1d1))return;await Promise[_0x5057c6(0x383)]([Promise[_0x5057c6(0x408)](_0x2a5a07)[_0x5057c6(0x16b)](()=>{}),new Promise(_0x1a2888=>{const _0x373b8b=_0x5057c6,_0x4b4e7f=setTimeout(_0x1a2888,_0x2b91fa);if(_0x4b4e7f[_0x373b8b(0x2bd)])_0x4b4e7f['unref']();})]);}catch{}}function _0x393307(_0x438f4b){const _0x22918c=_0x5cd592;if(_0x34ea0f)return Promise[_0x22918c(0x408)]();const _0x1a057b=_0x438f4b?.[_0x22918c(0x38f)];return _0x1a057b&&typeof _0x1a057b[_0x22918c(0x4ba)]===_0x22918c(0x1d1)?_0x1a057b:Promise[_0x22918c(0x408)]();}return okdbWriter[_0x5cd592(0x198)]=_0x121bdf,okdbWriter['exports'][_0x5cd592(0x43e)]=_0x1cfa02,okdbWriter['exports']['committed']=_0x393307,okdbWriter[_0x5cd592(0x198)][_0x5cd592(0x1c9)]=_0x34ea0f,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x4e0103=_0x12dbbc;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x271965=require$$0,{SYNC_COMMITS:_0x552135}=requireOkdbWriter(),_0x584bf1=_0x4e0103(0x558);class _0x3e3b1e{constructor(_0x37e4d2,_0x402b15,_0x54b47a){const _0xe42b84=_0x4e0103;this['_lock']=_0x37e4d2,this[_0xe42b84(0x1ac)]=_0x402b15,this['_acquiredAt']=_0x54b47a,this[_0xe42b84(0x20c)]=![],this['_heartbeatTimer']=null,this[_0xe42b84(0x32e)]=null;}[_0x4e0103(0x2a7)](){const _0x350669=_0x4e0103;if(this[_0x350669(0x20c)])return![];try{const _0x384d5c=this[_0x350669(0x546)]['_db']()[_0x350669(0x30a)](this['_key']);if(!_0x384d5c||_0x384d5c[_0x350669(0x197)]!==this[_0x350669(0x638)])return![];const _0x506444=_0x384d5c[_0x350669(0x295)]??_0x384d5c[_0x350669(0x197)];if(_0x506444+_0x384d5c['ttlMs']<Date[_0x350669(0x514)]())return![];return!![];}catch{return!this[_0x350669(0x20c)];}}[_0x4e0103(0x20f)](){const _0x219ee1=_0x4e0103;if(this['_released'])return null;try{return this['_lock'][_0x219ee1(0x341)]()[_0x219ee1(0x30a)](this[_0x219ee1(0x1ac)])??null;}catch{return null;}}async[_0x4e0103(0x523)](_0x1b13c4){const _0x353d89=_0x4e0103;if(this[_0x353d89(0x20c)])return;try{const _0x25691c=this[_0x353d89(0x546)][_0x353d89(0x341)]()['get'](this[_0x353d89(0x1ac)]);if(!_0x25691c||_0x25691c[_0x353d89(0x197)]!==this['_acquiredAt'])return;if(_0x552135)this['_lock']['_db']()[_0x353d89(0x598)](this['_key'],{..._0x25691c,'ttlMs':_0x25691c[_0x353d89(0x60d)]+_0x1b13c4});else await this[_0x353d89(0x546)][_0x353d89(0x341)]()[_0x353d89(0x613)](this['_key'],{..._0x25691c,'ttlMs':_0x25691c[_0x353d89(0x60d)]+_0x1b13c4});}catch{}}async[_0x4e0103(0x507)](){const _0xbae024=_0x4e0103;if(this[_0xbae024(0x20c)])return;if(this[_0xbae024(0x32e)])try{await this['_heartbeatInFlight'];}catch{}clearInterval(this[_0xbae024(0x34a)]),this['_heartbeatTimer']=null,this[_0xbae024(0x20c)]=!![];try{const _0x188738=this['_lock'][_0xbae024(0x341)]()[_0xbae024(0x30a)](this[_0xbae024(0x1ac)]);if(_0x188738&&_0x188738[_0xbae024(0x197)]===this[_0xbae024(0x638)]){if(_0x552135)this[_0xbae024(0x546)][_0xbae024(0x341)]()[_0xbae024(0x456)](this[_0xbae024(0x1ac)]);else await this[_0xbae024(0x546)]['_db']()[_0xbae024(0x41e)](this[_0xbae024(0x1ac)]);}}catch{}}[_0x4e0103(0x3ae)](_0x45783e,_0x1f2167){const _0x499368=_0x4e0103,_0x3ab765=_0x1f2167??Math[_0x499368(0x470)](_0x45783e/0x3);this['_heartbeatTimer']=setInterval(()=>{if(this['_released'])return;this['_heartbeatInFlight']=((async()=>{const _0x291f2a=_0x16c8;try{const _0x602310=this[_0x291f2a(0x546)][_0x291f2a(0x341)]()[_0x291f2a(0x30a)](this[_0x291f2a(0x1ac)]);if(!_0x602310||_0x602310['acquiredAt']!==this[_0x291f2a(0x638)]){this[_0x291f2a(0x20c)]=!![],clearInterval(this[_0x291f2a(0x34a)]),this[_0x291f2a(0x34a)]=null;return;}if(_0x552135)this[_0x291f2a(0x546)]['_db']()[_0x291f2a(0x598)](this[_0x291f2a(0x1ac)],{..._0x602310,'updatedAt':Date[_0x291f2a(0x514)]()});else await this[_0x291f2a(0x546)]['_db']()['put'](this[_0x291f2a(0x1ac)],{..._0x602310,'updatedAt':Date[_0x291f2a(0x514)]()});}catch{}this[_0x291f2a(0x32e)]=null;})());},_0x3ab765);if(this[_0x499368(0x34a)][_0x499368(0x2bd)])this[_0x499368(0x34a)][_0x499368(0x2bd)]();}}class _0x498c91{constructor(_0x37f2d4,{namespace:_0x12433c,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x59f219=_0x4e0103;this[_0x59f219(0x3c9)]=_0x37f2d4,this[_0x59f219(0x3bd)]=_0x12433c,this['ttlMs']=ttlMs,this[_0x59f219(0x1f2)]=heartbeatMs,this[_0x59f219(0x395)]=null;}[_0x4e0103(0x341)](){const _0x488bf7=_0x4e0103;return!this[_0x488bf7(0x395)]&&(this[_0x488bf7(0x395)]=this['_rawDb']['openDB'](_0x584bf1,{'dupSort':![]})),this[_0x488bf7(0x395)];}[_0x4e0103(0x3c2)](){const _0x21d4d6=_0x4e0103;return!this[_0x21d4d6(0x26b)]&&(this[_0x21d4d6(0x26b)]=this['_rawDb']['openDB'](_0x584bf1+_0x21d4d6(0x273),{'dupSort':![]})),this[_0x21d4d6(0x26b)];}[_0x4e0103(0x1ac)](_0x11191f){const _0x41a3d0=_0x4e0103;return this[_0x41a3d0(0x3bd)]+':'+_0x11191f;}[_0x4e0103(0x213)](_0x22b9e9){const _0x211a6f=_0x4e0103;try{_0x552135?this[_0x211a6f(0x3c2)]()['putSync'](this[_0x211a6f(0x1ac)](_0x22b9e9),Date[_0x211a6f(0x514)]()):this[_0x211a6f(0x3c2)]()[_0x211a6f(0x613)](this[_0x211a6f(0x1ac)](_0x22b9e9),Date[_0x211a6f(0x514)]())?.[_0x211a6f(0x16b)]?.(()=>{});}catch{}}[_0x4e0103(0x4d5)](_0x4929d5,_0x524e26=0x3e8){const _0x33212e=_0x4e0103;try{const _0x4539ea=this['_wantDb']()[_0x33212e(0x30a)](this[_0x33212e(0x1ac)](_0x4929d5));return typeof _0x4539ea===_0x33212e(0x1a9)&&Date[_0x33212e(0x514)]()-_0x4539ea<_0x524e26;}catch{return![];}}[_0x4e0103(0x53b)](_0x3cb3e3){const _0x212bf2=_0x4e0103,_0x1d2edc=_0x3cb3e3[_0x212bf2(0x295)]??_0x3cb3e3[_0x212bf2(0x197)];return _0x1d2edc+_0x3cb3e3['ttlMs']<Date[_0x212bf2(0x514)]();}static['_holderDead'](_0x38aef2){const _0x1986f8=_0x4e0103,_0x209208=_0x38aef2?.[_0x1986f8(0x20f)];if(!_0x209208||typeof _0x209208[_0x1986f8(0x59c)]!==_0x1986f8(0x1a9))return![];if(_0x209208[_0x1986f8(0x332)]!==_0x271965[_0x1986f8(0x332)]())return![];if(_0x209208[_0x1986f8(0x59c)]===process[_0x1986f8(0x59c)])return![];try{return process[_0x1986f8(0x569)](_0x209208[_0x1986f8(0x59c)],0x0),![];}catch(_0x4f4bbb){return _0x4f4bbb[_0x1986f8(0x20a)]===_0x1986f8(0x5c1);}}async['tryAcquire'](_0x527d5d,_0x43a96a={},_0x5b1308={}){const _0x457cbb=_0x4e0103,_0x2f2b06=this['_key'](_0x527d5d),_0x67d031=_0x5b1308['ttlMs']??this['ttlMs'],_0x20b44a=Date[_0x457cbb(0x514)](),_0x16eed0={'holder':{'pid':process['pid'],'hostname':_0x271965['hostname'](),..._0x43a96a},'acquiredAt':_0x20b44a,'updatedAt':_0x20b44a,'ttlMs':_0x67d031};let _0x42416c=![],_0x192735=null;try{const _0x5983ca=()=>{const _0x9c2441=_0x457cbb,_0x1551a7=this['_db']()[_0x9c2441(0x30a)](_0x2f2b06);if(_0x1551a7&&!this['_isStale'](_0x1551a7)&&!_0x498c91['_holderDead'](_0x1551a7)){const _0x2cb5a8=_0x43a96a[_0x9c2441(0x5c2)]!=null&&_0x1551a7[_0x9c2441(0x20f)][_0x9c2441(0x59c)]===process['pid']&&_0x1551a7[_0x9c2441(0x20f)][_0x9c2441(0x5c2)]===_0x43a96a[_0x9c2441(0x5c2)];if(!_0x2cb5a8){_0x42416c=![],_0x192735=_0x1551a7;return;}_0x16eed0[_0x9c2441(0x197)]<=_0x1551a7[_0x9c2441(0x197)]&&(_0x16eed0[_0x9c2441(0x197)]=_0x1551a7[_0x9c2441(0x197)]+0x1,_0x16eed0['updatedAt']=_0x16eed0[_0x9c2441(0x197)]);}this['_db']()[_0x9c2441(0x613)](_0x2f2b06,_0x16eed0),_0x42416c=!![],_0x192735=_0x16eed0;};if(_0x552135)this[_0x457cbb(0x341)]()[_0x457cbb(0x17e)](_0x5983ca);else await this['_db']()[_0x457cbb(0x26e)](_0x5983ca);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x42416c)return{'acquired':![],'handle':null,'current':_0x192735};const _0x53e613=new _0x3e3b1e(this,_0x2f2b06,_0x16eed0[_0x457cbb(0x197)]);return _0x53e613[_0x457cbb(0x3ae)](_0x67d031,this['heartbeatMs']),{'acquired':!![],'handle':_0x53e613,'current':_0x192735};}['inspect'](_0x177e1e){const _0x321a24=_0x4e0103;try{return this[_0x321a24(0x341)]()[_0x321a24(0x30a)](this[_0x321a24(0x1ac)](_0x177e1e))??null;}catch{return null;}}[_0x4e0103(0x44f)](){const _0x39dc08=_0x4e0103,_0xef8735=this[_0x39dc08(0x3bd)]+':',_0x5e2797=[];try{for(const {key:_0x2576e2,value:_0x3b9137}of this['_db']()['getRange']({'start':_0xef8735,'end':_0xef8735+'\xff'})){typeof _0x2576e2===_0x39dc08(0x4f0)&&_0x2576e2[_0x39dc08(0x30f)](_0xef8735)&&_0x5e2797[_0x39dc08(0x4e9)]({'id':_0x2576e2['slice'](_0xef8735[_0x39dc08(0x5b9)]),'entry':_0x3b9137});}}catch{}return _0x5e2797;}static['listAll'](_0x412a30){const _0x2f1b69=_0x4e0103,_0x3546f5=[];try{const _0xb95625=_0x412a30[_0x2f1b69(0x442)](_0x584bf1,{'dupSort':![]});for(const {key:_0x44da7b,value:_0xaac425}of _0xb95625[_0x2f1b69(0x2cb)]({})){if(typeof _0x44da7b!=='string')continue;const _0x4e416f=_0x44da7b[_0x2f1b69(0x28a)](':');if(_0x4e416f<0x1)continue;_0x3546f5['push']({'namespace':_0x44da7b[_0x2f1b69(0x306)](0x0,_0x4e416f),'id':_0x44da7b['slice'](_0x4e416f+0x1),'entry':_0xaac425});}}catch{}return _0x3546f5;}}return okdbLock={'OKDBLock':_0x498c91},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x1ead83=_0x12dbbc;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x598361=require$$0,_0x1666bc=require$$1$2,_0x20d25c=require$$0$1,{LOOP:_0x16517e}=requireOkdbLoopMonitor(),{OKDBLock:_0x3986bc}=requireOkdbLock(),{SYNC_COMMITS:_0x44fa10}=requireOkdbWriter(),_0x37cc90='~processes',_0x8ae74c='node',_0x3bc311=_0x1ead83(0x560),_0x121bc6='~processes:cmd',_0x4c907a=(_0x3d0acd,_0x4cb241)=>_0x3d0acd+':'+_0x4cb241,_0x1ad780=(_0x4d2aca,_0x89ae6d)=>_0x4d2aca+'::'+_0x89ae6d,_0x568a97=(_0x2209fa,_0x59f463)=>_0x2209fa+'/'+_0x59f463,_0x269f13=(_0x12a2aa,_0x1d476d)=>_0x12a2aa+'#'+_0x1d476d,_0x26ff25=_0xb3b124=>{const _0x2978c6=_0x1ead83;if(_0xb3b124?.[_0x2978c6(0x33b)])return _0xb3b124[_0x2978c6(0x33b)];const _0x3585c6=_0xb3b124?.[_0x2978c6(0x451)];return typeof _0x3585c6===_0x2978c6(0x4f0)&&_0x3585c6[_0x2978c6(0x46c)]('#')?_0x3585c6[_0x2978c6(0x306)](0x0,_0x3585c6[_0x2978c6(0x28a)]('#')):_0x3585c6;},_0x113f9c=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x5d9a69=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x3edbfe=_0x113f9c*0x3,_0x579ebe=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x1ead83(0x4b9)](0x927c0,_0x3edbfe*0x14),_0x3bd9a3=[_0x1ead83(0x58d),'processor:ready',_0x1ead83(0x201),_0x1ead83(0x4e5),_0x1ead83(0x2dd),_0x1ead83(0x2f2)];let _0x243730=null;function _0x64cfbd(){const _0x4f3c66=_0x1ead83;if(_0x243730==null)_0x243730=Math[_0x4f3c66(0x2b8)]((Date['now']()-process[_0x4f3c66(0x1c2)]()*0x3e8)/0x3e8)*0x3e8;return _0x243730;}function _0x42137b(_0x1e66c3){const _0x4ac542=_0x1ead83;if(process.env.OKDB_PROCESS_KILL===_0x4ac542(0x63d))return![];if(_0x1e66c3?.['options']?.[_0x4ac542(0x30d)]&&typeof _0x1e66c3[_0x4ac542(0x19b)][_0x4ac542(0x30d)]==='object'&&_0x1e66c3[_0x4ac542(0x19b)][_0x4ac542(0x30d)][_0x4ac542(0x569)]===![])return![];return!![];}function _0x440266(_0x4cde78,_0xe467c8){const _0x23e5da=_0x1ead83,_0x54099e=!!_0xe467c8?.[_0x23e5da(0x26c)];switch(_0x4cde78){case _0x23e5da(0x584):return{'controllable':_0x54099e,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x23e5da(0x5ab):case _0x23e5da(0x36f):return{'controllable':_0x54099e,'decommissionable':![],'killable':!![],'killConfirm':_0x23e5da(0x347)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x23e5da(0x368):case _0x23e5da(0x36b):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x3f390d{constructor(_0x280eab){const _0x189c51=_0x1ead83;this['okdb']=_0x280eab,this['_statusEnv']=null,this[_0x189c51(0x232)]=null,this[_0x189c51(0x48f)]=new Map(),this[_0x189c51(0x1a0)]=null,this[_0x189c51(0x61a)]=![],this[_0x189c51(0x42e)]=![],this[_0x189c51(0x25d)]=_0x64cfbd(),this['_selfKey']=_0x4c907a(process[_0x189c51(0x59c)],this[_0x189c51(0x25d)]),this[_0x189c51(0x31f)]=_0x20d25c[_0x189c51(0x37b)]()['slice'](0x0,0x8),this[_0x189c51(0x284)]=_0x269f13(this['_selfKey'],this[_0x189c51(0x31f)]),this[_0x189c51(0x1e2)]=Date[_0x189c51(0x514)](),this['_kind']=null,this[_0x189c51(0x450)]=null,this[_0x189c51(0x3ab)]=null,this[_0x189c51(0x5d5)]=null,this['_onProcEvent']=null,this['_onTick']=null,this['_lastPublishAt']=0x0,this[_0x189c51(0x181)]={},this[_0x189c51(0x515)]=new Map(),this['_lastCpuUsage']=process[_0x189c51(0x642)](),this['_lastCpuAt']=Date[_0x189c51(0x514)](),this[_0x189c51(0x2ec)]=0x0,this[_0x189c51(0x270)]=new Map();}get[_0x1ead83(0x180)](){const _0x8b1bfd=_0x1ead83;return this[_0x8b1bfd(0x61e)];}get[_0x1ead83(0x398)](){const _0x2789c1=_0x1ead83;return this[_0x2789c1(0x284)];}['_caps'](_0xbb6944,_0xa0d87a){const _0x29b98f=_0x1ead83,_0x2ca43b=_0x440266(_0xbb6944,_0xa0d87a);if(_0x2ca43b[_0x29b98f(0x2a3)]&&!_0x42137b(this[_0x29b98f(0x2c2)]))return{..._0x2ca43b,'killable':![],'killConfirm':undefined};return _0x2ca43b;}['isActive'](){const _0x70bd85=_0x1ead83;return!!this[_0x70bd85(0x32a)];}['setOwnMeta'](_0x43c696){const _0x444987=_0x1ead83;Object['assign'](this[_0x444987(0x181)],_0x43c696||{});}['noteListenAddr'](_0x57ec0f){const _0x4674c0=_0x1ead83;if(_0x57ec0f)this[_0x4674c0(0x3ab)]=_0x57ec0f;}[_0x1ead83(0x163)](_0x54e2c1={}){const _0x2e2ac0=_0x1ead83;return this[_0x2e2ac0(0x2c2)][_0x2e2ac0(0x5f0)](_0x54e2c1);}[_0x1ead83(0x1e4)](){const _0x30c569=_0x1ead83,_0x448f3b={};let _0x4efe28=0x0,_0x327003=0x0;const _0x3d810e=new Set();for(const _0x4cab92 of this[_0x30c569(0x235)]()){_0x327003++;const _0x33a10f=_0x4cab92[_0x30c569(0x2b1)];if(!_0x33a10f)continue;if(_0x33a10f[_0x30c569(0x600)])_0x4efe28++;for(const _0x48dfdd of _0x33a10f[_0x30c569(0x26c)]||[]){if(![_0x30c569(0x1a3),_0x30c569(0x48b)][_0x30c569(0x46c)](_0x48dfdd['mode']))continue;(_0x48dfdd['state']===_0x30c569(0x50f)||_0x48dfdd['state']===_0x30c569(0x23e))&&_0x48dfdd[_0x30c569(0x35a)]&&_0x3d810e[_0x30c569(0x4d8)]((_0x48dfdd[_0x30c569(0x60a)]||_0x30c569(0x29c))+':'+_0x48dfdd[_0x30c569(0x35a)]);const _0x7da9a6=_0x48dfdd[_0x30c569(0x60a)]||'default';(_0x448f3b[_0x7da9a6]||=[])[_0x30c569(0x4e9)]({..._0x48dfdd,'env':_0x7da9a6,'owner':{'pid':_0x4cab92[_0x30c569(0x59c)]??null,'kind':_0x4cab92[_0x30c569(0x2ef)]??null}});}}for(const [_0x97c7e,_0x11d7f5]of Object[_0x30c569(0x355)](_0x448f3b)){for(const _0x3acaa9 of _0x11d7f5){if(_0x3acaa9['mode']===_0x30c569(0x1a3)&&!_0x3acaa9[_0x30c569(0x3d8)]){const _0x21e2a6=_0x97c7e+':'+(_0x3acaa9['cursorKey']??'');if(!_0x3d810e['has'](_0x21e2a6))_0x3acaa9[_0x30c569(0x5cc)]=!![];}}}return{'envs':_0x448f3b,'policy':null,'participation':{'participating':_0x4efe28,'total':_0x327003},'source':_0x30c569(0x5f5)};}['processorsView'](){const _0x15c965=_0x1ead83,_0x2c6828=_0x3bf893=>{const _0x1585e1=_0x16c8;if(_0x3bf893[_0x1585e1(0x187)]===_0x1585e1(0x50f)||_0x3bf893[_0x1585e1(0x187)]==='building'||_0x3bf893['state']===_0x1585e1(0x594))return 0x3;if(_0x3bf893[_0x1585e1(0x3d8)])return 0x1;return 0x2;},_0x23e536=new Map();for(const _0x58e843 of this[_0x15c965(0x235)]()){for(const _0x4811f6 of _0x58e843['processing']?.[_0x15c965(0x26c)]||[]){const _0x177c12={..._0x4811f6,'owner':{'pid':_0x58e843[_0x15c965(0x59c)]??null,'kind':_0x58e843[_0x15c965(0x2ef)]??null,'host':_0x58e843[_0x15c965(0x277)]??null}},_0x8d7c1b=_0x4811f6[_0x15c965(0x4cb)]===_0x15c965(0x1a3)?_0x15c965(0x21b)+(_0x4811f6[_0x15c965(0x60a)]??'')+'::'+(_0x4811f6[_0x15c965(0x35a)]??_0x4811f6[_0x15c965(0x257)]??_0x4811f6['id']):_0x15c965(0x1ce)+(_0x58e843[_0x15c965(0x451)]??_0x58e843['processKey']??'')+'::'+(_0x4811f6[_0x15c965(0x60a)]??'')+'::'+_0x4811f6['id'],_0x56d42c=_0x23e536['get'](_0x8d7c1b);if(!_0x56d42c||_0x2c6828(_0x177c12)>_0x2c6828(_0x56d42c))_0x23e536[_0x15c965(0x561)](_0x8d7c1b,_0x177c12);}}return[..._0x23e536[_0x15c965(0x1b7)]()];}[_0x1ead83(0x194)](){const _0x2e095c=_0x1ead83,_0x59e1e9=Date[_0x2e095c(0x514)](),_0x204291=this['listNodes'](),_0x13b47c=_0x17b87d=>Math[_0x2e095c(0x4b9)](0x0,Math['round']((_0x59e1e9-(_0x17b87d[_0x2e095c(0x5e0)]||_0x59e1e9))/0x3e8)),_0xb0ae53=_0x204291[_0x2e095c(0x3a3)](_0x48a55e=>_0x48a55e[_0x2e095c(0x2ef)]==='primary'),_0x30a762=_0x204291[_0x2e095c(0x5a3)](_0x1808b1=>_0x1808b1['kind']===_0x2e095c(0x5fa));if(_0xb0ae53||_0x30a762[_0x2e095c(0x5b9)])return{'primary':_0xb0ae53?{'pid':_0xb0ae53['pid'],'uptime':_0x13b47c(_0xb0ae53)}:null,'workers':_0x30a762[_0x2e095c(0x41b)](_0x426076=>({'pid':_0x426076[_0x2e095c(0x59c)],'uptime':_0x13b47c(_0x426076)})),'workersConfigured':_0xb0ae53?.['meta']?.[_0x2e095c(0x196)]??_0x30a762[_0x2e095c(0x5b9)],'mode':_0x2e095c(0x3ac)};const _0x57cdae=_0x204291[_0x2e095c(0x3a3)](_0x1330a6=>_0x1330a6['kind']===_0x2e095c(0x5ab)||_0x1330a6['kind']==='standalone'||_0x1330a6[_0x2e095c(0x2ef)]===_0x2e095c(0x61d)),_0x4b1280=_0x57cdae?{'pid':_0x57cdae[_0x2e095c(0x59c)],'uptime':_0x13b47c(_0x57cdae)}:{'pid':process['pid'],'uptime':Math[_0x2e095c(0x4b9)](0x0,Math[_0x2e095c(0x2b8)](process[_0x2e095c(0x1c2)]()))};return{'primary':_0x4b1280,'workers':[_0x4b1280],'workersConfigured':0x1,'mode':_0x2e095c(0x1a3)};}[_0x1ead83(0x49e)](){const _0xa8804=_0x1ead83;return this[_0xa8804(0x391)]();}[_0x1ead83(0x1b0)](){const _0x492d10=_0x1ead83,_0x1622b6=new Map();for(const _0x387e58 of this[_0x492d10(0x391)]())_0x1622b6[_0x492d10(0x561)](_0x387e58[_0x492d10(0x33b)],{..._0x387e58,'children':[]});const _0xd1b6b6=[];for(const _0x4f53ab of _0x1622b6[_0x492d10(0x1b7)]()){const _0x569e7c=_0x4f53ab[_0x492d10(0x308)]?_0x1622b6[_0x492d10(0x30a)](_0x4f53ab[_0x492d10(0x308)]):null;if(_0x569e7c&&_0x569e7c!==_0x4f53ab)_0x569e7c['children'][_0x492d10(0x4e9)](_0x4f53ab);else _0xd1b6b6[_0x492d10(0x4e9)](_0x4f53ab);}const _0x200b48=(_0x123435,_0x4ca3c9)=>_0x123435[_0x492d10(0x2ef)]===_0x4ca3c9[_0x492d10(0x2ef)]?(_0x123435[_0x492d10(0x59c)]||0x0)-(_0x4ca3c9[_0x492d10(0x59c)]||0x0):(_0x123435[_0x492d10(0x2ef)]??'')<(_0x4ca3c9[_0x492d10(0x2ef)]??'')?-0x1:0x1,_0x1c298b=_0x1809f7=>{const _0x3dd96d=_0x492d10;_0x1809f7[_0x3dd96d(0x487)](_0x200b48);for(const _0xf7d68c of _0x1809f7)if(_0xf7d68c[_0x3dd96d(0x34c)][_0x3dd96d(0x5b9)])_0x1c298b(_0xf7d68c[_0x3dd96d(0x34c)]);};return _0x1c298b(_0xd1b6b6),_0xd1b6b6;}[_0x1ead83(0x4fa)](_0x28f2d1){const _0x1a14ba=_0x1ead83;return this[_0x1a14ba(0x391)]()['find'](_0x57e2ba=>_0x57e2ba['processKey']===_0x28f2d1)??null;}['_groupByProcess'](_0x4fb5a2=Date['now']()){const _0x575b7d=_0x1ead83,_0x4b586d=new Map();for(const _0x538de4 of this[_0x575b7d(0x235)]()){const _0x322e33=_0x26ff25(_0x538de4);let _0x14333e=_0x4b586d[_0x575b7d(0x30a)](_0x322e33);!_0x14333e&&(_0x14333e={'processKey':_0x322e33,'nodeKey':_0x322e33,'pid':_0x538de4[_0x575b7d(0x59c)],'ppid':_0x538de4[_0x575b7d(0x1eb)]??null,'host':_0x538de4['host']??null,'kind':_0x538de4['kind'],'role':null,'supervisorKey':_0x538de4[_0x575b7d(0x308)]??null,'slot':_0x538de4['slot']??null,'slotKey':_0x538de4[_0x575b7d(0x63f)]??null,'caps':_0x538de4[_0x575b7d(0x2bc)]??null,'lifecycle':_0x538de4['lifecycle']??null,'uptime':Math[_0x575b7d(0x4b9)](0x0,Math[_0x575b7d(0x2b8)]((_0x4fb5a2-(_0x538de4['startedAt']||_0x4fb5a2))/0x3e8)),'startedAt':_0x538de4[_0x575b7d(0x5e0)]??null,'meta':_0x538de4[_0x575b7d(0x1bd)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x4b586d[_0x575b7d(0x561)](_0x322e33,_0x14333e));_0x14333e[_0x575b7d(0x1ff)][_0x575b7d(0x4e9)]({'instanceId':_0x538de4[_0x575b7d(0x5b0)]??null,'role':_0x538de4[_0x575b7d(0x3be)]??null,'listenAddr':_0x538de4[_0x575b7d(0x3f2)]??null,'lifecycle':_0x538de4[_0x575b7d(0x58b)]??null,'processing':_0x538de4[_0x575b7d(0x2b1)]??null});if(!_0x14333e['role']&&_0x538de4[_0x575b7d(0x3be)])_0x14333e[_0x575b7d(0x3be)]=_0x538de4[_0x575b7d(0x3be)];if(!_0x14333e[_0x575b7d(0x3f2)]&&_0x538de4['listenAddr'])_0x14333e[_0x575b7d(0x3f2)]=_0x538de4['listenAddr'];if(!_0x14333e[_0x575b7d(0x2b1)]&&_0x538de4[_0x575b7d(0x2b1)])_0x14333e['processing']=_0x538de4[_0x575b7d(0x2b1)];if(!_0x14333e[_0x575b7d(0x50a)]&&_0x538de4[_0x575b7d(0x50a)])_0x14333e[_0x575b7d(0x50a)]=_0x538de4['engines'];if(!_0x14333e[_0x575b7d(0x40f)]&&_0x538de4[_0x575b7d(0x40f)])_0x14333e[_0x575b7d(0x40f)]=_0x538de4['singletonClaims'];if(_0x14333e[_0x575b7d(0x2bc)]==null&&_0x538de4['caps'])_0x14333e[_0x575b7d(0x2bc)]=_0x538de4['caps'];if(_0x538de4['stats']&&(!_0x14333e[_0x575b7d(0x627)]||(_0x538de4[_0x575b7d(0x627)]['at']??0x0)>(_0x14333e[_0x575b7d(0x627)]['at']??0x0)))_0x14333e[_0x575b7d(0x627)]=_0x538de4[_0x575b7d(0x627)];}return[..._0x4b586d[_0x575b7d(0x1b7)]()];}[_0x1ead83(0x5cb)](){const _0x195a42=_0x1ead83,_0xf1bd63=[],_0x3fd157={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x5e8768 of this[_0x195a42(0x391)]()){_0xf1bd63['push']({'processKey':_0x5e8768[_0x195a42(0x33b)],'kind':_0x5e8768[_0x195a42(0x2ef)],'pid':_0x5e8768[_0x195a42(0x59c)],'supervisorKey':_0x5e8768[_0x195a42(0x308)],'meta':_0x5e8768['meta']??null,'uptime':_0x5e8768[_0x195a42(0x1c2)],'stats':_0x5e8768[_0x195a42(0x627)]??null}),_0x3fd157[_0x195a42(0x30d)]++;if(_0x5e8768[_0x195a42(0x627)]){_0x3fd157[_0x195a42(0x64c)]+=_0x5e8768[_0x195a42(0x627)]['rss']||0x0,_0x3fd157[_0x195a42(0x204)]+=(_0x5e8768[_0x195a42(0x627)][_0x195a42(0x204)]||0x0)+(_0x5e8768['stats'][_0x195a42(0x555)]?.[_0x195a42(0x204)]||0x0);const _0x509c46=_0x5e8768[_0x195a42(0x627)][_0x195a42(0x555)];_0x509c46&&(_0x3fd157['threads'][_0x195a42(0x1fe)]+=_0x509c46[_0x195a42(0x1fe)]||0x0,_0x3fd157['threads']['sandbox']+=_0x509c46['sandbox']||0x0,_0x3fd157['threads'][_0x195a42(0x588)]+=_0x509c46[_0x195a42(0x588)]||0x0);}}return{'totals':_0x3fd157,'nodes':_0xf1bd63};}async[_0x1ead83(0x51d)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x5ac0fe=_0x1ead83;this[_0x5ac0fe(0x61a)]=this[_0x5ac0fe(0x61a)]||!!writer,this[_0x5ac0fe(0x42e)]=this['_isReader']||!!reader,this[_0x5ac0fe(0x469)]=kind||this[_0x5ac0fe(0x469)]||(_0x1666bc[_0x5ac0fe(0x4fc)]?'http-server':_0x5ac0fe(0x5ab)),this[_0x5ac0fe(0x450)]=supervisorKey??this[_0x5ac0fe(0x450)],this['_listenAddr']=listenAddr??this[_0x5ac0fe(0x3ab)],this[_0x5ac0fe(0x5ad)](),await this[_0x5ac0fe(0x1ef)]();if(!writer&&!reader)return null;if(!this[_0x5ac0fe(0x32a)]){const _0x413a3c=await this[_0x5ac0fe(0x2c2)][_0x5ac0fe(0x40a)](_0x37cc90,{'sync':![],'durability':_0x5ac0fe(0x5be)});if(!_0x413a3c[_0x5ac0fe(0x2e0)](_0x8ae74c))await _0x413a3c[_0x5ac0fe(0x617)](_0x8ae74c);this[_0x5ac0fe(0x32a)]=_0x413a3c;}return this['_statusEnv'];}[_0x1ead83(0x28d)](){const _0x54ddb1=_0x1ead83;return this[_0x54ddb1(0x58c)]!==this[_0x54ddb1(0x32a)]&&(this[_0x54ddb1(0x58c)]=this[_0x54ddb1(0x32a)],this[_0x54ddb1(0x577)]=this[_0x54ddb1(0x32a)][_0x54ddb1(0x23f)](_0x8ae74c)[_0x54ddb1(0x31e)]),this[_0x54ddb1(0x577)];}[_0x1ead83(0x191)](_0x3e0443){const _0x385890=_0x1ead83;if(_0x44fa10)return this['_nodeDb']()[_0x385890(0x598)](_0x3e0443[_0x385890(0x451)],_0x3e0443,0x1);const _0x24d2ce=this[_0x385890(0x28d)]()['put'](_0x3e0443[_0x385890(0x451)],_0x3e0443,0x1);if(_0x24d2ce&&typeof _0x24d2ce[_0x385890(0x4ba)]==='function')_0x24d2ce[_0x385890(0x4ba)](undefined,()=>{});return _0x24d2ce;}[_0x1ead83(0x530)](_0xdbe9c){const _0xbfb2e6=_0x1ead83;return this[_0xbfb2e6(0x28d)]()['putSync'](_0xdbe9c[_0xbfb2e6(0x451)],_0xdbe9c,0x1);}[_0x1ead83(0x382)](_0xe2a338){const _0x15fb7c=_0x1ead83;if(_0x44fa10)try{return this[_0x15fb7c(0x28d)]()[_0x15fb7c(0x456)](_0xe2a338);}catch{return![];}const _0x2d9935=this[_0x15fb7c(0x28d)]()[_0x15fb7c(0x41e)](_0xe2a338);if(_0x2d9935&&typeof _0x2d9935[_0x15fb7c(0x4ba)]===_0x15fb7c(0x1d1))_0x2d9935['then'](undefined,()=>{});return _0x2d9935;}async['putNode'](_0x5ca95e){const _0x10b520=_0x1ead83;if(!this[_0x10b520(0x32a)]||!this['_isWriter']||!_0x5ca95e?.[_0x10b520(0x451)])return;return this['_putRowAsync'](_0x5ca95e);}async[_0x1ead83(0x170)](_0x328044){const _0x313be6=_0x1ead83;if(!this['_statusEnv']||!this['_isWriter']||!_0x328044)return;const _0x5bf24a=_0x328044['includes']('#'),_0x5026be=[];for(const {key:_0x27363a}of this['_statusEnv'][_0x313be6(0x2cb)](_0x8ae74c)){if(_0x27363a===_0x328044||!_0x5bf24a&&typeof _0x27363a===_0x313be6(0x4f0)&&_0x27363a[_0x313be6(0x30f)](_0x328044+'#'))_0x5026be[_0x313be6(0x4e9)](_0x27363a);}for(const _0x1fb417 of _0x5026be){try{this[_0x313be6(0x28d)]()[_0x313be6(0x456)](_0x1fb417);}catch{}}}[_0x1ead83(0x263)](_0x224487){const _0x1d2832=_0x1ead83;if(typeof _0x224487?.[_0x1d2832(0x59c)]!==_0x1d2832(0x1a9))return![];if(_0x224487['host']!==_0x598361['hostname']())return![];if(_0x224487[_0x1d2832(0x59c)]===process[_0x1d2832(0x59c)])return![];if(_0x224487[_0x1d2832(0x5a4)]!=null&&_0x224487['expiresAt']<Date['now']()-_0x579ebe)return!![];try{return process[_0x1d2832(0x569)](_0x224487[_0x1d2832(0x59c)],0x0),![];}catch(_0x5d5634){return _0x5d5634[_0x1d2832(0x20a)]===_0x1d2832(0x5c1);}}['listNodes'](){const _0x5e097a=_0x1ead83;if(!this[_0x5e097a(0x32a)])return[];try{this[_0x5e097a(0x32a)]['db']?.[_0x5e097a(0x610)]?.();}catch{}const _0xe7c8c6=Date[_0x5e097a(0x514)](),_0x4982e2=_0x598361[_0x5e097a(0x332)](),_0x56a630=[];for(const {value:_0x568bef}of this['_statusEnv'][_0x5e097a(0x2cb)](_0x8ae74c)){if(!_0x568bef)continue;let _0x7d737a=null;_0x568bef[_0x5e097a(0x277)]===_0x4982e2&&typeof _0x568bef[_0x5e097a(0x59c)]===_0x5e097a(0x1a9)&&(_0x7d737a=!this[_0x5e097a(0x263)](_0x568bef));if(_0x7d737a===![])continue;const _0x37612b=_0x568bef[_0x5e097a(0x5a4)]==null||_0x568bef[_0x5e097a(0x5a4)]>=_0xe7c8c6;if(_0x7d737a===!![]||_0x37612b)_0x56a630['push'](_0x568bef);}return _0x56a630;}async[_0x1ead83(0x26d)](_0x48b2c5=0x0){const _0x243dd8=_0x1ead83;if(!this[_0x243dd8(0x32a)]||!this['_isWriter'])return;const _0x115950=Date['now']()-_0x48b2c5,_0x45f171=new Set(),_0x3dda0e=[],_0x317bd7=_0x598361[_0x243dd8(0x332)](),_0x3668ae=require$$3['version'];for(const {key:_0x136405,value:_0x4e53fa}of this[_0x243dd8(0x32a)][_0x243dd8(0x2cb)](_0x8ae74c)){if(!_0x4e53fa)continue;const _0x463d06=_0x4e53fa[_0x243dd8(0x277)]===_0x317bd7&&typeof _0x4e53fa[_0x243dd8(0x59c)]===_0x243dd8(0x1a9),_0x4041d1=_0x463d06?this['_nodeDead'](_0x4e53fa):_0x4e53fa[_0x243dd8(0x5a4)]!=null&&_0x4e53fa['expiresAt']<_0x115950;if(_0x4041d1)_0x3dda0e[_0x243dd8(0x4e9)](_0x136405);else{_0x45f171[_0x243dd8(0x4d8)](_0x26ff25(_0x4e53fa)??_0x136405);if(_0x4e53fa[_0x243dd8(0x605)]&&_0x4e53fa[_0x243dd8(0x605)]!==_0x3668ae){if(!this[_0x243dd8(0x166)])this['_versionSkewWarned']=new Set();!this['_versionSkewWarned'][_0x243dd8(0x5a7)](_0x4e53fa[_0x243dd8(0x605)])&&(this['_versionSkewWarned'][_0x243dd8(0x4d8)](_0x4e53fa[_0x243dd8(0x605)]),this[_0x243dd8(0x2c2)][_0x243dd8(0x4ca)]?.['warn']?.(_0x243dd8(0x603)+(_0x4e53fa[_0x243dd8(0x59c)]??'?')+_0x243dd8(0x4ff)+_0x4e53fa[_0x243dd8(0x605)]+_0x243dd8(0x1e3)+_0x3668ae+_0x243dd8(0x1a4)+_0x243dd8(0x345),{'feature':_0x243dd8(0x4e6)}));}}}for(const _0x490984 of _0x3dda0e)this[_0x243dd8(0x382)](_0x490984);if(this[_0x243dd8(0x5ad)]()){const _0x2d8e84=[];for(const {key:_0x415a14}of this[_0x243dd8(0x5ee)](_0x243dd8(0x38a))){if(!_0x45f171[_0x243dd8(0x5a7)](_0x415a14)){if(_0x44fa10)try{this['_desired'][_0x243dd8(0x456)](_0x243dd8(0x31b)+_0x415a14);}catch{}else _0x2d8e84['push'](this[_0x243dd8(0x232)][_0x243dd8(0x41e)](_0x243dd8(0x31b)+_0x415a14));}}if(_0x2d8e84[_0x243dd8(0x5b9)])await Promise[_0x243dd8(0x393)](_0x2d8e84);}}[_0x1ead83(0x2ce)](_0x5789c7=null){const _0x3fb1f6=_0x1ead83;if(this[_0x3fb1f6(0x5d5)])return;if(!this[_0x3fb1f6(0x61a)]||!this['_statusEnv']){this['okdb']?.[_0x3fb1f6(0x4ca)]?.[_0x3fb1f6(0x3ed)]?.(_0x3fb1f6(0x644)+this[_0x3fb1f6(0x61a)]+_0x3fb1f6(0x2c4)+!!this[_0x3fb1f6(0x32a)]+_0x3fb1f6(0x179),{'feature':_0x3fb1f6(0x30d)});return;}this['_onTick']=_0x5789c7,this[_0x3fb1f6(0x533)]=()=>this[_0x3fb1f6(0x59b)]();for(const _0x55c602 of _0x3bd9a3)this[_0x3fb1f6(0x2c2)][_0x3fb1f6(0x5e6)]['on'](_0x55c602,this[_0x3fb1f6(0x533)]);this[_0x3fb1f6(0x1c0)]();const _0x2ae5e8=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x113f9c;this[_0x3fb1f6(0x5d5)]=setInterval(()=>{const _0x2e1699=_0x3fb1f6;if(this[_0x2e1699(0x27d)])try{this[_0x2e1699(0x27d)]();}catch{}this[_0x2e1699(0x1c0)](),this[_0x2e1699(0x26d)]()[_0x2e1699(0x16b)](()=>{});},_0x2ae5e8);if(this[_0x3fb1f6(0x5d5)][_0x3fb1f6(0x2bd)])this['_hbTimer'][_0x3fb1f6(0x2bd)]();}['_maybePublish'](){const _0x45faf9=_0x1ead83;if(!this[_0x45faf9(0x61a)]||!this[_0x45faf9(0x32a)])return;if(Date[_0x45faf9(0x514)]()-this[_0x45faf9(0x563)]<_0x5d9a69)return;this[_0x45faf9(0x1c0)]();}[_0x1ead83(0x1c0)](){const _0x147814=_0x1ead83;if(!this[_0x147814(0x61a)]||!this['_statusEnv'])return;this['_lastPublishAt']=Date[_0x147814(0x514)]();try{const _0x52df46=[this[_0x147814(0x35c)]()];for(const _0x5b8f15 of this[_0x147814(0x515)]['values']())_0x52df46[_0x147814(0x4e9)](this[_0x147814(0x169)](_0x5b8f15));const _0x3abd2a=_0x16517e[_0x147814(0x17f)]?_0x16517e[_0x147814(0x514)]():0x0;for(const _0xbdc87e of _0x52df46){try{this['_putRowSync'](_0xbdc87e),this[_0x147814(0x3db)]=![];}catch(_0x27ac93){!this[_0x147814(0x3db)]&&(this[_0x147814(0x3db)]=!![],this['okdb']?.[_0x147814(0x4ca)]?.[_0x147814(0x3ed)]?.('registry\x20publish\x20failing:\x20'+_0x27ac93['message'],{'feature':_0x147814(0x30d)}));}}if(_0x16517e[_0x147814(0x17f)])_0x16517e[_0x147814(0x3dc)](_0x147814(0x283),_0x16517e[_0x147814(0x514)]()-_0x3abd2a,'rows='+_0x52df46['length']+_0x147814(0x37d));}catch(_0x509563){!this['_publishFailWarned']&&(this[_0x147814(0x3db)]=!![],this[_0x147814(0x2c2)]?.[_0x147814(0x4ca)]?.['warn']?.(_0x147814(0x447)+_0x509563[_0x147814(0x25c)],{'feature':_0x147814(0x30d)}));}}async[_0x1ead83(0x1f5)](){const _0x1fdbd5=_0x1ead83;if(this['_onProcEvent']){for(const _0x1bbe06 of _0x3bd9a3){try{this[_0x1fdbd5(0x2c2)][_0x1fdbd5(0x5e6)][_0x1fdbd5(0x63d)](_0x1bbe06,this[_0x1fdbd5(0x533)]);}catch{}}this[_0x1fdbd5(0x533)]=null;}this[_0x1fdbd5(0x5d5)]&&(clearInterval(this['_hbTimer']),this[_0x1fdbd5(0x5d5)]=null);try{if(this[_0x1fdbd5(0x32a)]&&this['_isWriter'])await this[_0x1fdbd5(0x170)](this['_rowKey']);}catch{}}async['deregisterSelf'](){const _0x2bcfe9=_0x1ead83;if(!this[_0x2bcfe9(0x32a)]||!this[_0x2bcfe9(0x61a)])return;try{await this[_0x2bcfe9(0x170)](this[_0x2bcfe9(0x284)]);}catch{}try{const _0x15693e=[];for(const {value:_0x5bf86b}of this['_statusEnv'][_0x2bcfe9(0x2cb)](_0x8ae74c)){if(_0x5bf86b?.[_0x2bcfe9(0x1eb)]===process[_0x2bcfe9(0x59c)]&&_0x5bf86b[_0x2bcfe9(0x451)])_0x15693e['push'](_0x5bf86b['nodeKey']);}for(const _0xb8ed9b of _0x15693e){try{await this[_0x2bcfe9(0x170)](_0xb8ed9b);}catch{}}}catch{}}async[_0x1ead83(0x472)](){const _0x26e31b=_0x1ead83;return this[_0x26e31b(0x446)](this['_buildOwnRow']());}async[_0x1ead83(0x2e6)](_0x47194f){const _0x5196ba=_0x1ead83;if(!this[_0x5196ba(0x32a)]||!this[_0x5196ba(0x61a)])return;return this[_0x5196ba(0x446)](this[_0x5196ba(0x169)](_0x47194f));}[_0x1ead83(0x169)]({pid:_0x5bc238,startedAt:_0x2ec901,kind:_0x56804c,supervisorKey:_0x13e819,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x53b4e8=_0x1ead83,_0x10a66e=Date[_0x53b4e8(0x514)](),_0x676fb8=_0x4c907a(_0x5bc238,_0x2ec901);return{'nodeKey':_0x269f13(_0x676fb8,'0'),'processKey':_0x676fb8,'instanceId':'0','pid':_0x5bc238,'startedAt':_0x2ec901,'ppid':process[_0x53b4e8(0x59c)],'host':_0x598361['hostname'](),'supervisorKey':_0x13e819,'slot':slot,'slotKey':slotKey,'kind':_0x56804c,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x10a66e,'expiresAt':_0x10a66e+_0x3edbfe,'caps':this[_0x53b4e8(0x1b3)](_0x56804c,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x550b6b){const _0x2640fb=_0x1ead83;if(!_0x550b6b?.[_0x2640fb(0x59c)])return null;const _0x36bca8=_0x4c907a(_0x550b6b[_0x2640fb(0x59c)],_0x550b6b['startedAt']);this[_0x2640fb(0x515)][_0x2640fb(0x561)](_0x36bca8,{..._0x550b6b,'supervisorKey':_0x550b6b[_0x2640fb(0x308)]??this[_0x2640fb(0x61e)]});if(this[_0x2640fb(0x61a)])await this['publishChildRow'](this[_0x2640fb(0x515)][_0x2640fb(0x30a)](_0x36bca8))[_0x2640fb(0x16b)]?.(()=>{});return _0x36bca8;}['removeSupervisedChild'](_0x3b974b){const _0x51196f=_0x1ead83;if(!_0x3b974b)return;return this[_0x51196f(0x515)][_0x51196f(0x4c0)](_0x3b974b),this[_0x51196f(0x170)](_0x3b974b);}[_0x1ead83(0x276)](){const _0x528b5a=_0x1ead83,_0x23e6cd=Date[_0x528b5a(0x514)](),_0x444bb7=process['cpuUsage'](),_0x3c32c2=(_0x23e6cd-this[_0x528b5a(0x233)])*0x3e8;if(_0x3c32c2>=0x3d090){const _0x190014=_0x444bb7[_0x528b5a(0x4a9)]-this[_0x528b5a(0x1da)]['user']+(_0x444bb7[_0x528b5a(0x35b)]-this['_lastCpuUsage']['system']),_0x2a4f92=_0x598361[_0x528b5a(0x40b)]()[_0x528b5a(0x5b9)]||0x1;this[_0x528b5a(0x2ec)]=Math['min'](0x64,Math[_0x528b5a(0x2b8)](_0x190014/(_0x3c32c2*_0x2a4f92)*0x64)),this[_0x528b5a(0x2d9)]=Math[_0x528b5a(0x2b8)](_0x3c32c2/0x3e8),this[_0x528b5a(0x1da)]=_0x444bb7,this[_0x528b5a(0x233)]=_0x23e6cd;}const _0x317f64=process['memoryUsage'](),_0x36bb9a=this[_0x528b5a(0x270)]['size'];let _0x5dccf2=0x0;if(_0x36bb9a>0x0){const _0x126a48=[this[_0x528b5a(0x2c2)],...this[_0x528b5a(0x2c2)][_0x528b5a(0x28e)]?.[_0x528b5a(0x1b7)]?.()??[]];for(const _0xdddc25 of _0x126a48){const _0x262951=_0xdddc25[_0x528b5a(0x4a7)]?.[_0x528b5a(0x1c5)];if(_0x262951)_0x5dccf2+=_0x262951['liveThreadStats'][_0x528b5a(0x588)];}}let _0x41f6b7=null;const _0x5b7833=_0x36bb9a;if(_0x5b7833>0x0){let _0x568500=0x0;for(const _0x213980 of this[_0x528b5a(0x270)][_0x528b5a(0x1b7)]())_0x568500+=_0x213980[_0x528b5a(0x204)]||0x0;_0x41f6b7={'count':_0x5b7833,'heapUsed':_0x568500,'sandbox':_0x36bb9a,'busy':_0x5dccf2};}return{'rss':_0x317f64[_0x528b5a(0x64c)],'heapUsed':_0x317f64[_0x528b5a(0x204)],'heapTotal':_0x317f64['heapTotal'],'external':_0x317f64[_0x528b5a(0x392)],'cpuPct':this[_0x528b5a(0x2ec)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x41f6b7,'at':_0x23e6cd};}[_0x1ead83(0x439)](_0x4e2ac2,_0x553428){const _0x152ef1=_0x1ead83;if(!_0x4e2ac2||!_0x553428)return;this[_0x152ef1(0x270)]['set'](_0x4e2ac2,_0x553428);}[_0x1ead83(0x348)](_0x407864){const _0x287e47=_0x1ead83;this['_threadStats'][_0x287e47(0x4c0)](_0x407864);}[_0x1ead83(0x49b)](_0x395847,_0x13a609,_0x3ab576=undefined){const _0x3cdd78=_0x1ead83,_0x387f40=this['_children'][_0x3cdd78(0x30a)](_0x395847);if(!_0x387f40||!_0x13a609)return;if(_0x3ab576!==undefined)_0x387f40[_0x3cdd78(0x2b1)]=_0x3ab576;_0x387f40[_0x3cdd78(0x627)]={'rss':_0x13a609[_0x3cdd78(0x64c)]??null,'heapUsed':_0x13a609[_0x3cdd78(0x204)]??null,'heapTotal':_0x13a609[_0x3cdd78(0x5f2)]??null,'external':_0x13a609[_0x3cdd78(0x392)]??null,'cpuPct':_0x13a609[_0x3cdd78(0x4e7)]??null,'cpuWindowMs':_0x13a609[_0x3cdd78(0x25b)]??null,'threads':_0x13a609[_0x3cdd78(0x555)]??null,'claims':_0x13a609[_0x3cdd78(0x46e)]??null,'envsOpen':_0x13a609[_0x3cdd78(0x60e)]??null,'at':Date[_0x3cdd78(0x514)]()};}[_0x1ead83(0x35c)](){const _0x2943fd=_0x1ead83,_0xcdb1b1=Date[_0x2943fd(0x514)](),_0x2a973b=this[_0x2943fd(0x2c2)][_0x2943fd(0x542)]||{},_0x1bca86=this['_kind']||_0x2943fd(0x5ab);return{'nodeKey':this['_rowKey'],'processKey':this['_selfKey'],'instanceId':this[_0x2943fd(0x31f)],'pid':process[_0x2943fd(0x59c)],'startedAt':this['_processStartedAt'],'instanceStartedAt':this[_0x2943fd(0x1e2)],'ppid':typeof process[_0x2943fd(0x1eb)]===_0x2943fd(0x1a9)?process[_0x2943fd(0x1eb)]:null,'host':_0x598361[_0x2943fd(0x332)](),'supervisorKey':this[_0x2943fd(0x450)]??null,'version':require$$3[_0x2943fd(0x605)],'kind':_0x1bca86,'role':{'engines':!!_0x2a973b[_0x2943fd(0x50a)],'processors':!!_0x2a973b['processors'],'compaction':_0x2a973b[_0x2943fd(0x419)],'http':_0x2a973b[_0x2943fd(0x349)]},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0xcdb1b1,'expiresAt':_0xcdb1b1+_0x3edbfe,'caps':this['_caps'](_0x1bca86,_0x2a973b),'lifecycle':{'state':_0x2943fd(0x454),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x2a973b['processors']?this[_0x2943fd(0x2af)]():null,'engines':_0x2a973b['engines']?[...this[_0x2943fd(0x2c2)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x2943fd(0x16e)](),'stats':this[_0x2943fd(0x276)](),'writers':this[_0x2943fd(0x1af)]()};}[_0x1ead83(0x1af)](){const _0x3f3d47=_0x1ead83,_0x53830d={};try{for(const [_0x2ee52e,_0x51d1ef]of this[_0x3f3d47(0x2c2)][_0x3f3d47(0x28e)]){try{const _0x12b9bc=_0x51d1ef[_0x3f3d47(0x2f4)]?.();if(!_0x12b9bc)continue;if(!_0x12b9bc[_0x3f3d47(0x567)]&&!_0x12b9bc[_0x3f3d47(0x38f)]&&!(_0x12b9bc[_0x3f3d47(0x2f0)]??0x0)&&!_0x12b9bc[_0x3f3d47(0x363)])continue;_0x53830d[_0x2ee52e]={'depth':_0x12b9bc[_0x3f3d47(0x567)],'oldestPendingMs':_0x12b9bc[_0x3f3d47(0x608)],'committed':_0x12b9bc['committed'],'commitsPerSec':_0x12b9bc['commitsPerSec'],'commitP99Ms':_0x12b9bc[_0x3f3d47(0x4ab)],'parkedNow':_0x12b9bc[_0x3f3d47(0x2f0)]??0x0,'draining':!!_0x12b9bc[_0x3f3d47(0x363)]};}catch{}}}catch{}return Object[_0x3f3d47(0x50d)](_0x53830d)[_0x3f3d47(0x5b9)]?_0x53830d:null;}[_0x1ead83(0x16e)](){const _0x306235=_0x1ead83,_0x47c33e=process[_0x306235(0x59c)],_0x3358ef=Date[_0x306235(0x514)](),_0x3d6d8b=_0x183e30=>{const _0x24b3a4=_0x306235;if(!_0x183e30)return[];const _0x31312a=[];try{for(const {id:_0x5d4685,entry:_0x481316}of _0x183e30[_0x24b3a4(0x44f)]()){if(_0x481316?.[_0x24b3a4(0x20f)]?.[_0x24b3a4(0x59c)]!==_0x47c33e)continue;const _0x5c6150=_0x481316['updatedAt']??_0x481316['acquiredAt']??0x0;if(_0x5c6150+(_0x481316[_0x24b3a4(0x60d)]??0x0)<_0x3358ef)continue;_0x31312a[_0x24b3a4(0x4e9)](_0x5d4685);}}catch{}return _0x31312a;},_0x550929=_0x3d6d8b(this['_singletonLock'](_0x306235(0x5bc))),_0x1ced47=_0x3d6d8b(this['_singletonLock'](_0x306235(0x478)));if(!_0x550929['length']&&!_0x1ced47[_0x306235(0x5b9)])return null;return{'compact':_0x550929,'replicate':_0x1ced47};}[_0x1ead83(0x609)](_0x450c50){const _0x313a07=_0x1ead83;if(!this[_0x313a07(0x2c2)]?.[_0x313a07(0x1c1)])return null;if(!this[_0x313a07(0x56d)])this[_0x313a07(0x56d)]=new Map();let _0xcb5bbd=this[_0x313a07(0x56d)][_0x313a07(0x30a)](_0x450c50);if(!_0xcb5bbd)try{_0xcb5bbd=new _0x3986bc(this[_0x313a07(0x2c2)][_0x313a07(0x1c1)],{'namespace':_0x450c50}),this['_singletonLocks'][_0x313a07(0x561)](_0x450c50,_0xcb5bbd);}catch{return null;}return _0xcb5bbd;}[_0x1ead83(0x2af)](){const _0x5bfd84=_0x1ead83,_0x5257a6=[];try{for(const [_0x4e96c5,_0x2169a5]of this[_0x5bfd84(0x2c2)][_0x5bfd84(0x28e)]){if(_0x4e96c5[_0x5bfd84(0x30f)]('~'))continue;for(const _0x243458 of _0x2169a5['processor']['tierList']())_0x5257a6['push']({..._0x243458,'env':_0x4e96c5});}}catch{}return{'participate':this[_0x5bfd84(0x2c2)][_0x5bfd84(0x26c)]?.[_0x5bfd84(0x4a2)]??![],'processors':_0x5257a6};}[_0x1ead83(0x5ad)](){const _0x48cfa1=_0x1ead83;if(this[_0x48cfa1(0x232)])return!![];const _0x2ade3c=this[_0x48cfa1(0x2c2)]['_rootDb'];if(!_0x2ade3c)return![];return this[_0x48cfa1(0x232)]=_0x2ade3c[_0x48cfa1(0x442)](_0x3bc311,{'dupSort':![]}),this[_0x48cfa1(0x1a0)]=_0x2ade3c[_0x48cfa1(0x442)](_0x121bc6,{'dupSort':![]}),!![];}async[_0x1ead83(0x1ef)](){const _0x3da90d=_0x1ead83;if(!this[_0x3da90d(0x5ad)]())return;const _0x2dab25=_0x3da90d(0x354),_0x2101fc=0x1,_0x274b01=this[_0x3da90d(0x232)]['get'](_0x2dab25)??0x0;if(_0x274b01>=_0x2101fc)return;const _0x8660ad=_0x133d58=>{const _0x53b77a=_0x3da90d;if(_0x133d58==='worker')return _0x53b77a(0x1a3);if(_0x133d58===_0x53b77a(0x224))return _0x53b77a(0x48b);return _0x133d58;};await this[_0x3da90d(0x2c2)][_0x3da90d(0x4d0)][_0x3da90d(0x61c)][_0x3da90d(0x5b1)](()=>{const _0x459ba2=_0x3da90d;for(const _0x5da52e of[_0x459ba2(0x36e),_0x459ba2(0x1dc)]){for(const {key:_0x3c3460,value:_0x1f034f}of this[_0x459ba2(0x232)]['getRange']({'start':_0x5da52e,'end':_0x5da52e+'\xff'})){if(typeof _0x3c3460!==_0x459ba2(0x4f0)||!_0x3c3460[_0x459ba2(0x30f)](_0x5da52e))break;const _0x42acd8=_0x8660ad(_0x1f034f[_0x459ba2(0x4cb)]);if(_0x42acd8!==_0x1f034f['mode'])this['_desired'][_0x459ba2(0x613)](_0x3c3460,{..._0x1f034f,'mode':_0x42acd8});}}this['_desired'][_0x459ba2(0x613)](_0x2dab25,_0x2101fc);});}[_0x1ead83(0x426)](){const _0x2c1776=_0x1ead83;return!!this[_0x2c1776(0x232)];}[_0x1ead83(0x5bd)](_0x200ea8,_0x1568d2){const _0x3ac559=_0x1ead83;if(!this[_0x3ac559(0x5ad)]())return null;const _0x359dec=_0x200ea8+'/'+_0x1568d2;return this[_0x3ac559(0x18a)](),this['_desiredOverlay']['get'](_0x359dec)??this[_0x3ac559(0x232)][_0x3ac559(0x30a)](_0x359dec)??null;}['_refreshDesiredSnapshot'](){const _0x5c179a=_0x1ead83;if(!_0x44fa10)return;try{this[_0x5c179a(0x2c2)][_0x5c179a(0x4d0)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x1ead83(0x5ca)](_0x2924ef,_0x2c67dd,_0x54f94c){const _0x441595=_0x1ead83;if(!this[_0x441595(0x5ad)]())return null;const _0x16a952=_0x2924ef+'/'+_0x2c67dd;this[_0x441595(0x18a)]();const _0x120afa=this[_0x441595(0x48f)][_0x441595(0x30a)](_0x16a952)??this['_desired']['get'](_0x16a952)??{'version':0x0},_0x58e133=(_0x120afa[_0x441595(0x605)]||0x0)+0x1,_0x4d6708={..._0x120afa,..._0x54f94c,'version':_0x58e133,'updatedAt':Date['now']()};this[_0x441595(0x48f)]['set'](_0x16a952,_0x4d6708);try{await this[_0x441595(0x2c2)][_0x441595(0x4d0)][_0x441595(0x61c)][_0x441595(0x5b1)](()=>{const _0xc07896=_0x441595;this[_0xc07896(0x232)][_0xc07896(0x613)](_0x16a952,_0x4d6708);});}finally{if(this['_desiredOverlay'][_0x441595(0x30a)](_0x16a952)===_0x4d6708)this[_0x441595(0x48f)][_0x441595(0x4c0)](_0x16a952);}return _0x58e133;}[_0x1ead83(0x5ee)](_0x5eb42a){const _0x250158=_0x1ead83;if(!this[_0x250158(0x5ad)]())return[];this[_0x250158(0x18a)]();const _0x9b15e5=_0x5eb42a+'/',_0x4c9cea=[];for(const {key:_0x136db6,value:_0x210c6a}of this[_0x250158(0x232)][_0x250158(0x2cb)]({'start':_0x9b15e5,'end':_0x9b15e5+'\xff'})){if(typeof _0x136db6!==_0x250158(0x4f0)||!_0x136db6['startsWith'](_0x9b15e5))break;_0x4c9cea['push']({'key':_0x136db6[_0x250158(0x306)](_0x9b15e5[_0x250158(0x5b9)]),'value':_0x210c6a});}return _0x4c9cea;}[_0x1ead83(0x636)](_0x478c6){const _0x2c92eb=_0x1ead83;if(!this['_ensureDesired']())return null;return this[_0x2c92eb(0x1a0)][_0x2c92eb(0x30a)](_0x478c6)??null;}async[_0x1ead83(0x422)](_0x4e3237,_0x534174,_0x43ca3b={}){const _0x58a1fe=_0x1ead83;if(!this[_0x58a1fe(0x5ad)]())return null;let _0x24cdea;return await this[_0x58a1fe(0x2c2)][_0x58a1fe(0x4d0)][_0x58a1fe(0x61c)]['transaction'](()=>{const _0x3c1c84=_0x58a1fe,_0x3c4949=this[_0x3c1c84(0x1a0)][_0x3c1c84(0x30a)](_0x4e3237)||{'epoch':0x0};_0x24cdea=(_0x3c4949[_0x3c1c84(0x565)]||0x0)+0x1,this['_cmd'][_0x3c1c84(0x613)](_0x4e3237,{..._0x3c4949,..._0x43ca3b,'cmd':_0x534174,'epoch':_0x24cdea,'updatedAt':Date['now']()});}),_0x24cdea;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x3f390d,'nodeKey':_0x4c907a,'logicalKey':_0x1ad780,'slotKey':_0x568a97,'PROCESS_ENV':_0x37cc90,'NODE_TYPE':_0x8ae74c},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0xc67ab3=_0x12dbbc;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x48fa31=require$$0$6,{EVENTS:_0x346108,CHANGE_ACTIONS:_0x1ca7a5}=requireOkdbEnums(),{LOOP:_0xfe5321}=requireOkdbLoopMonitor(),_0x5a91d2=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x16e02a=0x5,_0xf98a95=0x2710;class _0x42a7f8 extends _0x48fa31{constructor(_0x37de5f,_0x5e32e6={}){const _0x5bc906=_0x16c8;super(),this[_0x5bc906(0x2c2)]=_0x37de5f,this[_0x5bc906(0x286)]=_0x5e32e6[_0x5bc906(0x621)]??_0x5a91d2,this[_0x5bc906(0x433)]=_0x5e32e6[_0x5bc906(0x5f6)]??_0x16e02a,this['_dedupeMax']=_0x5e32e6[_0x5bc906(0x290)]??_0xf98a95,this[_0x5bc906(0x47e)]=![],this[_0x5bc906(0x351)]=new Map(),this['_baselines']=new Map(),this[_0x5bc906(0x5ce)]=new Map(),this[_0x5bc906(0x3b4)]=null,this[_0x5bc906(0x387)]=![],this[_0x5bc906(0x46d)]=new Set(),this['_onItem']=_0x4e961f=>this[_0x5bc906(0x2b9)](_0x4e961f),this[_0x5bc906(0x575)]=_0x50c518=>this[_0x5bc906(0x458)](_0x50c518),this['_onStop']=()=>this['stop']();}[_0xc67ab3(0x499)](){const _0x47b180=_0xc67ab3;if(this['_started'])return;this[_0x47b180(0x47e)]=!![];for(const [_0x2f6eaa,_0x12c52a]of this[_0x47b180(0x2c2)][_0x47b180(0x28e)]){if(_0x2f6eaa[_0x47b180(0x30f)]('~'))continue;try{_0x12c52a[_0x47b180(0x236)]();}catch{}}for(const [_0x51e2b1,_0xed4409]of this[_0x47b180(0x2c2)]['_envs']){if(_0x51e2b1['startsWith']('~'))continue;try{this[_0x47b180(0x552)]['set'](_0x51e2b1,_0xed4409[_0x47b180(0x4d4)]()||0x0);}catch{}}const {events:_0x518c2c}=this[_0x47b180(0x2c2)];_0x518c2c['on'](_0x346108[_0x47b180(0x399)],this[_0x47b180(0x490)]),_0x518c2c['on'](_0x346108[_0x47b180(0x16a)],this[_0x47b180(0x490)]),_0x518c2c['on'](_0x346108['ITEM_REMOVE'],this[_0x47b180(0x490)]),_0x518c2c['on'](_0x346108[_0x47b180(0x1e6)],this[_0x47b180(0x575)]),_0x518c2c[_0x47b180(0x304)](_0x346108['SYSTEM_STOPPED'],this[_0x47b180(0x582)]);}[_0xc67ab3(0x1f0)](){const _0x205e3b=_0xc67ab3;if(!this[_0x205e3b(0x47e)])return;this[_0x205e3b(0x47e)]=![];const {events:_0x7c1b5b}=this[_0x205e3b(0x2c2)];_0x7c1b5b['off'](_0x346108['ITEM_CREATE'],this[_0x205e3b(0x490)]),_0x7c1b5b[_0x205e3b(0x63d)](_0x346108['ITEM_UPDATE'],this[_0x205e3b(0x490)]),_0x7c1b5b['off'](_0x346108[_0x205e3b(0x2e4)],this['_onItem']),_0x7c1b5b[_0x205e3b(0x63d)](_0x346108['SYSTEM_POKE'],this[_0x205e3b(0x575)]);try{_0x7c1b5b[_0x205e3b(0x63d)](_0x346108[_0x205e3b(0x4be)],this[_0x205e3b(0x582)]);}catch{}this[_0x205e3b(0x3b4)]&&(clearTimeout(this[_0x205e3b(0x3b4)]),this[_0x205e3b(0x3b4)]=null),this['_pending'][_0x205e3b(0x4c6)](),this[_0x205e3b(0x351)][_0x205e3b(0x4c6)](),this['_baselines'][_0x205e3b(0x4c6)](),this[_0x205e3b(0x46d)][_0x205e3b(0x4c6)]();}[_0xc67ab3(0x3d6)](_0x25aaf0,_0x51da2d,_0x2db264,_0x393901){return _0x25aaf0+'\x00'+_0x51da2d+'\x00'+_0x2db264+'\x00'+_0x393901;}[_0xc67ab3(0x318)](_0x241817,_0xaf14c0,_0x1544ec,_0x519fa9){const _0x3b2e36=_0xc67ab3,_0x470716=this[_0x3b2e36(0x3d6)](_0x241817,_0xaf14c0,_0x1544ec,_0x519fa9);if(this[_0x3b2e36(0x46d)][_0x3b2e36(0x5a7)](_0x470716))return![];this['_seen']['add'](_0x470716);if(this[_0x3b2e36(0x46d)][_0x3b2e36(0x46b)]>this[_0x3b2e36(0x2b5)]){const _0x4c6fb5=this[_0x3b2e36(0x46d)][_0x3b2e36(0x1b7)]()['next']()[_0x3b2e36(0x24f)];this[_0x3b2e36(0x46d)][_0x3b2e36(0x4c0)](_0x4c6fb5);}return!![];}[_0xc67ab3(0x2b9)](_0x25934a){const _0x5dc923=_0xc67ab3;if(!this[_0x5dc923(0x47e)]||!_0x25934a)return;const {env:_0x211ac6,type:_0x47da10,key:_0x4c1f3c,clock:_0x88434d,origin:_0x169baf,action:_0x55248f,newValue:_0x3a4210,oldValue:_0xfe878}=_0x25934a;if(_0x211ac6==null||_0x47da10==null||_0x4c1f3c==null)return;if(typeof _0x211ac6===_0x5dc923(0x4f0)&&_0x211ac6['startsWith']('~'))return;if(typeof _0x47da10===_0x5dc923(0x4f0)&&_0x47da10['startsWith']('~'))return;if(!this[_0x5dc923(0x318)](_0x211ac6,_0x47da10,_0x4c1f3c,_0x88434d))return;const _0x4b4d92=_0x55248f===_0x1ca7a5['REMOVE']?'remove':_0x5dc923(0x613);this[_0x5dc923(0x5db)]('change',{'env':_0x211ac6,'type':_0x47da10,'key':_0x4c1f3c,'op':_0x4b4d92,'clock':_0x88434d,'origin':_0x169baf,'value':_0x4b4d92===_0x5dc923(0x41e)?null:_0x3a4210,'prevValue':_0xfe878});}['_handlePoke'](_0x3b5de1){const _0x236bc6=_0xc67ab3;if(!this[_0x236bc6(0x47e)])return;if(!_0x3b5de1||typeof _0x3b5de1[_0x236bc6(0x60a)]!==_0x236bc6(0x4f0)||typeof _0x3b5de1[_0x236bc6(0x257)]!==_0x236bc6(0x4f0))return;const {env:_0x1dc833,type:_0x58a5bb}=_0x3b5de1;if(_0x1dc833[_0x236bc6(0x30f)]('~')||_0x58a5bb[_0x236bc6(0x30f)]('~'))return;this[_0x236bc6(0x5ce)][_0x236bc6(0x561)](_0x1dc833+'\x00'+_0x58a5bb,{'env':_0x1dc833,'type':_0x58a5bb}),this[_0x236bc6(0x599)]();}[_0xc67ab3(0x599)](){const _0x371d6c=_0xc67ab3;if(this[_0x371d6c(0x3b4)])return;const _0x854af1=()=>{const _0xbf96a8=_0x371d6c;this[_0xbf96a8(0x3b4)]=null,this[_0xbf96a8(0x62b)]()[_0xbf96a8(0x16b)](()=>{});};this[_0x371d6c(0x3b4)]=setTimeout(_0x854af1,this[_0x371d6c(0x433)]>0x0?this['_flushDebounce']:0x0);}async[_0xc67ab3(0x62b)](){const _0x30216d=_0xc67ab3;if(this[_0x30216d(0x387)]){this['_scheduleFlush']();return;}this['_draining']=!![];try{const _0x3a2a2e=[...this[_0x30216d(0x5ce)][_0x30216d(0x1b7)]()];this[_0x30216d(0x5ce)][_0x30216d(0x4c6)]();let _0x22ab13=![];for(const {env:_0x2cc846,type:_0x307f5a}of _0x3a2a2e){try{const _0x1afab7=await this['_drainOne'](_0x2cc846,_0x307f5a);if(_0x1afab7)_0x22ab13=!![];}catch{this[_0x30216d(0x5ce)][_0x30216d(0x561)](_0x2cc846+'\x00'+_0x307f5a,{'env':_0x2cc846,'type':_0x307f5a}),_0x22ab13=!![];}}if(_0x22ab13||this[_0x30216d(0x5ce)][_0x30216d(0x46b)]>0x0)this[_0x30216d(0x599)]();}finally{this[_0x30216d(0x387)]=![];}}async[_0xc67ab3(0x4db)](_0x5b2f3c,_0x4a13fd){const _0x1b1c13=_0xc67ab3,_0x412bcc=await this[_0x1b1c13(0x2c2)][_0x1b1c13(0x49f)](_0x5b2f3c),_0x35f5a0=_0x5b2f3c+'\x00'+_0x4a13fd;!this[_0x1b1c13(0x351)][_0x1b1c13(0x5a7)](_0x35f5a0)&&(!this['_baselines']['has'](_0x5b2f3c)&&(_0x412bcc[_0x1b1c13(0x236)](),this[_0x1b1c13(0x552)]['set'](_0x5b2f3c,_0x412bcc[_0x1b1c13(0x4d4)]()||0x0)),this[_0x1b1c13(0x351)]['set'](_0x35f5a0,this[_0x1b1c13(0x552)][_0x1b1c13(0x30a)](_0x5b2f3c)));const _0x5814e5=this[_0x1b1c13(0x351)][_0x1b1c13(0x30a)](_0x35f5a0),_0x3356ab=_0x412bcc[_0x1b1c13(0x4d4)](_0x4a13fd)||0x0;if(_0x3356ab<=_0x5814e5)return![];const _0x50f9c3=_0x5814e5+this['_quantum'],_0x41d0a6=Math[_0x1b1c13(0x275)](_0x3356ab,_0x50f9c3),_0x5e0c3b=_0xfe5321[_0x1b1c13(0x17f)]?_0xfe5321['now']():0x0,_0x27d1f0=Array['from'](_0x412bcc[_0x1b1c13(0x5b8)](_0x4a13fd,_0x5814e5+0x1,_0x41d0a6));let _0x3d0b5a=_0x5814e5;for(const _0xa4bfeb of _0x27d1f0){const {clock:_0x347ef1,key:_0x271e66,action:_0x407353,origin:_0x294755}=_0xa4bfeb;if(_0x347ef1>_0x3d0b5a)_0x3d0b5a=_0x347ef1;if(_0x271e66==null)continue;if(!this['_markSeen'](_0x5b2f3c,_0x4a13fd,_0x271e66,_0x347ef1))continue;let _0x1ae057,_0x2058b7;if(_0x407353===_0x1ca7a5['REMOVE'])_0x1ae057='remove',_0x2058b7=null;else{const _0x3fda5d=_0x412bcc[_0x1b1c13(0x30a)](_0x4a13fd,_0x271e66);_0x3fda5d==null?(_0x1ae057=_0x1b1c13(0x41e),_0x2058b7=null):(_0x1ae057=_0x1b1c13(0x613),_0x2058b7=_0x3fda5d);}this[_0x1b1c13(0x5db)](_0x1b1c13(0x46f),{'env':_0x5b2f3c,'type':_0x4a13fd,'key':_0x271e66,'op':_0x1ae057,'clock':_0x347ef1,'origin':_0x294755,'value':_0x2058b7});}if(_0xfe5321[_0x1b1c13(0x17f)])_0xfe5321[_0x1b1c13(0x3dc)](_0x1b1c13(0x3c8)+_0x5b2f3c+':'+_0x4a13fd,_0xfe5321['now']()-_0x5e0c3b,'n='+_0x27d1f0[_0x1b1c13(0x5b9)]);return this[_0x1b1c13(0x351)][_0x1b1c13(0x561)](_0x35f5a0,Math[_0x1b1c13(0x4b9)](_0x3d0b5a,_0x41d0a6)),_0x412bcc[_0x1b1c13(0x4d4)](_0x4a13fd)>_0x41d0a6;}[_0xc67ab3(0x2bb)](){const _0x3c8272=_0xc67ab3;return{'started':this['_started'],'quantum':this[_0x3c8272(0x286)],'flushDebounce':this[_0x3c8272(0x433)],'cursors':Object[_0x3c8272(0x333)]([...this[_0x3c8272(0x351)][_0x3c8272(0x355)]()][_0x3c8272(0x41b)](([_0x43330c,_0x173c57])=>[_0x43330c[_0x3c8272(0x3a1)]('\x00',':'),_0x173c57])),'pending':this[_0x3c8272(0x5ce)][_0x3c8272(0x46b)],'seen':this[_0x3c8272(0x46d)][_0x3c8272(0x46b)]};}}return _0x42a7f8['CHANGEFEED_QUANTUM']=_0x5a91d2,okdbChangefeed={'OKDBChangefeed':_0x42a7f8},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x541159=_0x12dbbc;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x14e17a=require$$1$2,_0x326f1e=require$$1,{EVENTS:_0x23ed11}=requireOkdbEnums(),_0x509e9f=require$$0,{slotKey:_0x3061e9}=requireOkdbProcessRegistry(),_0x215ce0=0xfa,_0x2ca095=0xfa0,_0x52ebb6=0x5,_0x48ccf0=0x2710,_0x2bf511=0xbb8,_0x3734f1=0x7d0,_0x3151ae=_0x541159(0x62f),_0x214d0f=_0x541159(0x3fc),_0x190191=_0x541159(0x4ca),_0x171b2e=_0x541159(0x627),_0x5d34e0=[_0x23ed11[_0x541159(0x1bb)],_0x23ed11[_0x541159(0x165)],_0x23ed11[_0x541159(0x24b)],_0x23ed11[_0x541159(0x62e)],_0x23ed11[_0x541159(0x325)],_0x23ed11[_0x541159(0x203)],_0x23ed11[_0x541159(0x445)],_0x23ed11[_0x541159(0x23a)],_0x541159(0x4f5),_0x541159(0x58d),'processor:error',_0x541159(0x2dd),_0x541159(0x2f2),_0x541159(0x201)],_0x3828be=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x261e34({workers:_0x48ef80,makeOkdb:_0x1d1db2,port:_0x1c6cfa,primaryOkdb:_0x571197,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x47468c=_0x541159;if(_0x14e17a[_0x47468c(0x360)])return childEntry&&_0x14e17a['setupPrimary']({'exec':_0x326f1e['join'](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x3115e3=_0x47468c,_0x4d8bf7=[];for(let _0x523428=0x0;_0x523428<process[_0x3115e3(0x449)][_0x3115e3(0x5b9)];_0x523428++){const _0x3b2502=process[_0x3115e3(0x449)][_0x523428];if(_0x3b2502[_0x3115e3(0x30f)](_0x3115e3(0x38b))||_0x3b2502[_0x3115e3(0x30f)](_0x3115e3(0x335))||_0x3b2502['startsWith'](_0x3115e3(0x3f6)))continue;if(_0x3b2502==='-e'||_0x3b2502===_0x3115e3(0x632)||_0x3b2502==='-p'||_0x3b2502==='--print'){_0x523428++;continue;}_0x4d8bf7[_0x3115e3(0x4e9)](_0x3b2502);}return _0x4d8bf7;})())}),_0x1c1709({'workers':_0x48ef80,'port':_0x1c6cfa,'primaryOkdb':_0x571197,'workerEnv':workerEnv});return _0x4211cd({'makeOkdb':_0x1d1db2,'port':_0x1c6cfa});}function _0x1c1709({workers:_0x35c30e,port:_0x348969,primaryOkdb:_0x63702b,workerEnv:_0x4ebf14}){const _0x506fae=_0x541159,_0xa27d7f=new Map(),_0x512e61=new Map();let _0x2c48da=![];const _0x310c86=_0x1c6469=>_0x1c6469?.[_0x506fae(0x5e5)],_0x2b4d80=_0x5b046e=>{const _0x5bc3e6=_0x506fae,_0x45d503=_0x14e17a[_0x5bc3e6(0x1f6)]({...process.env,..._0x4ebf14||{},'OKDB_CLUSTER_SLOT':String(_0x5b046e)});return _0x45d503[_0x5bc3e6(0x5e5)]=_0x5b046e,_0xa27d7f[_0x5bc3e6(0x561)](_0x45d503[_0x5bc3e6(0x285)][_0x5bc3e6(0x59c)],{'worker':_0x45d503,'startedAt':Date[_0x5bc3e6(0x514)](),'slot':_0x5b046e}),_0x45d503['on'](_0x5bc3e6(0x594),_0x52ece1=>{const _0x28abe4=_0x5bc3e6;console[_0x28abe4(0x4ca)](_0x28abe4(0x513)+_0x45d503[_0x28abe4(0x285)][_0x28abe4(0x59c)]+'\x20ipc\x20error:\x20'+(_0x52ece1?.[_0x28abe4(0x25c)]??_0x52ece1));}),_0x45d503['on']('online',()=>_0x316af3()),_0x45d503;},_0x113865=_0x4ec0cc=>{const _0x3c82bb=_0x506fae;for(const {worker:_0xf97f78}of _0xa27d7f[_0x3c82bb(0x1b7)]()){if(_0xf97f78[_0x3c82bb(0x2e5)]()||!_0xf97f78['isConnected']())continue;try{_0xf97f78[_0x3c82bb(0x4e1)](_0x4ec0cc);}catch{}}};_0x63702b?.[_0x506fae(0x5f0)]?.({'kind':'primary','listenAddr':':'+_0x348969})['catch'](()=>{}),_0x63702b?.[_0x506fae(0x30d)]?.[_0x506fae(0x5a1)]?.({'workersConfigured':_0x35c30e});const _0x2655dd={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x316af3=()=>{const _0xab12bf=_0x506fae,_0x34eac4=_0x63702b?.[_0xab12bf(0x30d)];if(!_0x34eac4||!_0x34eac4[_0xab12bf(0x61a)])return;const _0x437c53=_0x34eac4[_0xab12bf(0x180)];for(const {worker:_0x17c758,startedAt:_0x51985f,slot:_0x74a630,stats:_0x48fa43,processing:_0x541185}of _0xa27d7f[_0xab12bf(0x1b7)]()){if(_0x17c758['isDead']())continue;const _0x335cea=_0x34eac4[_0xab12bf(0x426)]?.()&&_0x34eac4[_0xab12bf(0x5bd)](_0xab12bf(0x5f4),_0xcb2837(_0x74a630))?.[_0xab12bf(0x218)]===!![];_0x34eac4[_0xab12bf(0x2e6)]({'pid':_0x17c758[_0xab12bf(0x285)][_0xab12bf(0x59c)],'startedAt':_0x51985f,'kind':_0xab12bf(0x5fa),'supervisorKey':_0x437c53,'slot':_0x74a630,'slotKey':_0xcb2837(_0x74a630),'role':_0x2655dd,'listenAddr':':'+_0x348969,'lifecycle':_0x335cea?_0xab12bf(0x32d):_0xab12bf(0x454),'processing':_0x541185??null,'stats':_0x48fa43??null})['catch'](()=>{});}},_0xcb2837=_0x1bb650=>_0x3061e9(_0x506fae(0x2f3)+_0x348969,_0x1bb650),_0x456cb4=_0x8631bb=>{const _0x16ffd7=_0x506fae,_0x562eae=_0x63702b?.[_0x16ffd7(0x30d)];if(!_0x562eae?.[_0x16ffd7(0x426)]?.())return![];return _0x562eae[_0x16ffd7(0x5bd)]('slot',_0xcb2837(_0x8631bb))?.[_0x16ffd7(0x218)]===!![];};for(let _0x2d2cbb=0x0;_0x2d2cbb<_0x35c30e;_0x2d2cbb++){const _0x53368b=_0x456cb4(_0x2d2cbb);_0x512e61[_0x506fae(0x561)](_0x2d2cbb,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x53368b,'respawnTimer':null}),_0x53368b?console[_0x506fae(0x4ca)](_0x506fae(0x1a1)+_0x2d2cbb+_0x506fae(0x352)):_0x2b4d80(_0x2d2cbb);}const _0x25ca73=()=>{const _0x54c958=_0x506fae,_0x3f5156=_0x63702b?.['processes'];if(!_0x3f5156?.[_0x54c958(0x61a)]||!_0x3f5156[_0x54c958(0x426)]?.())return;for(const [_0x39ba41,_0x2f7533]of _0x512e61[_0x54c958(0x355)]()){const _0x1ec503=_0x3f5156[_0x54c958(0x5bd)]('slot',_0xcb2837(_0x39ba41)),_0x4b7d95=_0x1ec503?.[_0x54c958(0x218)]===!![],_0x42c70b=_0x1ec503?.['kill']===!![];if(_0x4b7d95&&!_0x2f7533[_0x54c958(0x186)]){_0x2f7533['dead']=!![];_0x2f7533[_0x54c958(0x1d4)]&&(clearTimeout(_0x2f7533['respawnTimer']),_0x2f7533[_0x54c958(0x1d4)]=null);for(const {worker:_0x391551}of _0xa27d7f[_0x54c958(0x1b7)]()){if(_0x310c86(_0x391551)!==_0x39ba41||_0x391551['isDead']())continue;try{if(_0x42c70b)_0x391551[_0x54c958(0x285)][_0x54c958(0x569)](_0x54c958(0x4a6));else _0x391551[_0x54c958(0x1d5)]()&&_0x391551[_0x54c958(0x301)]();}catch{}}console[_0x54c958(0x4ca)](_0x54c958(0x512)+(_0x42c70b?_0x54c958(0x64b):'decommissioned')+_0x54c958(0x404)+_0x39ba41+_0x54c958(0x3ca));}else{if(!_0x4b7d95&&_0x2f7533[_0x54c958(0x186)]&&_0x1ec503){_0x2f7533[_0x54c958(0x186)]=![],_0x2f7533[_0x54c958(0x2f5)]=[],_0x2f7533[_0x54c958(0x314)]=0x0;const _0x584ad3=[..._0xa27d7f[_0x54c958(0x1b7)]()][_0x54c958(0x264)](({worker:_0x279baa})=>_0x310c86(_0x279baa)===_0x39ba41&&!_0x279baa[_0x54c958(0x2e5)]());!_0x584ad3&&!_0x2c48da&&(_0x2b4d80(_0x39ba41),console['log'](_0x54c958(0x2ad)+_0x39ba41));}}}},_0x89fbb6=()=>{try{_0x25ca73();}catch{}};_0x63702b?.[_0x506fae(0x5e6)]?.['on']?.(_0x23ed11[_0x506fae(0x581)],_0x89fbb6);const _0x2fbb1a=[];if(_0x63702b?.['events']?.['on'])for(const _0x55969a of _0x5d34e0){const _0x36dd85=_0x3e0b76=>{_0x113865({[_0x3151ae]:_0x214d0f,'event':_0x55969a,'data':_0x3e0b76??{}});};_0x63702b[_0x506fae(0x5e6)]['on'](_0x55969a,_0x36dd85),_0x2fbb1a[_0x506fae(0x4e9)]({'event':_0x55969a,'handler':_0x36dd85});}const _0x65ef91=setInterval(()=>{_0x25ca73(),_0x316af3();},_0x3828be);_0x65ef91[_0x506fae(0x2bd)]?.();const _0x85bd85=(_0x3ce8df,_0x5d1f79)=>{const _0xa1173e=_0x506fae;if(!_0x5d1f79||typeof _0x5d1f79!==_0xa1173e(0x312)||_0x5d1f79[_0x3151ae]!==_0x190191)return;if(!_0x63702b?.[_0xa1173e(0x4ca)]?.['ingest'])return;const _0x328038=_0x5d1f79[_0xa1173e(0x3bf)]||{};_0x63702b[_0xa1173e(0x4ca)][_0xa1173e(0x389)]({..._0x328038,'msg':'[w'+_0x5d1f79['slot']+']\x20'+(_0x328038[_0xa1173e(0x31a)]??''),'meta':{..._0x328038[_0xa1173e(0x1bd)]||{},'worker':_0x5d1f79[_0xa1173e(0x5f4)],'workerPid':_0x5d1f79[_0xa1173e(0x59c)]}});};_0x14e17a['on'](_0x506fae(0x25c),_0x85bd85);const _0x2c4ace=(_0x29f085,_0x46295f)=>{const _0x339283=_0x506fae;if(!_0x46295f||typeof _0x46295f!==_0x339283(0x312)||_0x46295f[_0x3151ae]!==_0x171b2e)return;const _0x473d24=_0xa27d7f[_0x339283(0x30a)](_0x29f085['process'][_0x339283(0x59c)]);if(_0x473d24){_0x473d24['stats']={..._0x46295f[_0x339283(0x627)],'at':Date[_0x339283(0x514)]()};if(_0x46295f[_0x339283(0x2b1)]!==undefined)_0x473d24[_0x339283(0x2b1)]=_0x46295f[_0x339283(0x2b1)];}};_0x14e17a['on']('message',_0x2c4ace),_0x14e17a['on'](_0x506fae(0x370),(_0x44d8f2,_0x10e30c,_0x497e6c)=>{const _0x3a7ca9=_0x506fae,_0x3942fe=_0x44d8f2[_0x3a7ca9(0x285)][_0x3a7ca9(0x59c)],_0x529ad8=_0x310c86(_0x44d8f2),_0x4fd34c=_0xa27d7f[_0x3a7ca9(0x30a)](_0x3942fe);if(_0x4fd34c&&_0x63702b?.['processes'])_0x63702b[_0x3a7ca9(0x30d)][_0x3a7ca9(0x170)](_0x3942fe+':'+_0x4fd34c[_0x3a7ca9(0x5e0)])[_0x3a7ca9(0x16b)](()=>{});_0xa27d7f['delete'](_0x3942fe),console[_0x3a7ca9(0x4ca)](_0x3a7ca9(0x513)+_0x3942fe+_0x3a7ca9(0x3eb)+(_0x529ad8??'?')+_0x3a7ca9(0x602)+(_0x3a7ca9(0x26a)+_0x10e30c+_0x3a7ca9(0x249)+(_0x497e6c??_0x3a7ca9(0x22f))+_0x3a7ca9(0x3e0)+_0xa27d7f[_0x3a7ca9(0x46b)]+'\x20worker(s)\x20remaining')),_0x316af3();if(_0x2c48da||_0x529ad8==null)return;const _0x41e1b9=_0x512e61[_0x3a7ca9(0x30a)](_0x529ad8);if(!_0x41e1b9||_0x41e1b9['dead'])return;const _0x2bfa5f=Date[_0x3a7ca9(0x514)]();_0x41e1b9[_0x3a7ca9(0x2f5)][_0x3a7ca9(0x4e9)](_0x2bfa5f),_0x41e1b9[_0x3a7ca9(0x2f5)]=_0x41e1b9[_0x3a7ca9(0x2f5)][_0x3a7ca9(0x5a3)](_0x536fd8=>_0x2bfa5f-_0x536fd8<=_0x48ccf0);if(_0x41e1b9[_0x3a7ca9(0x2f5)][_0x3a7ca9(0x5b9)]>=_0x52ebb6){_0x41e1b9[_0x3a7ca9(0x186)]=!![],console[_0x3a7ca9(0x594)](_0x3a7ca9(0x521)+_0x529ad8+_0x3a7ca9(0x2e3)+_0x41e1b9[_0x3a7ca9(0x2f5)][_0x3a7ca9(0x5b9)]+_0x3a7ca9(0x525)+(_0x48ccf0+_0x3a7ca9(0x4ef)+_0xa27d7f[_0x3a7ca9(0x46b)]+_0x3a7ca9(0x48a)));return;}_0x41e1b9[_0x3a7ca9(0x314)]++;const _0x179d5c=Math[_0x3a7ca9(0x275)](_0x2ca095,_0x215ce0*0x2**(_0x41e1b9[_0x3a7ca9(0x314)]-0x1));console[_0x3a7ca9(0x4ca)](_0x3a7ca9(0x5df)+_0x529ad8+'\x20in\x20'+_0x179d5c+_0x3a7ca9(0x1a2)+_0x41e1b9['consecutiveFailures']+')'),_0x41e1b9['respawnTimer']=setTimeout(()=>{const _0x3c8d6b=_0x3a7ca9;_0x41e1b9[_0x3c8d6b(0x1d4)]=null;if(_0x2c48da||_0x41e1b9[_0x3c8d6b(0x186)])return;const _0xa46182=_0x2b4d80(_0x529ad8);_0xa46182[_0x3c8d6b(0x304)](_0x3c8d6b(0x3fd),()=>{if(_0x512e61['get'](_0x529ad8)===_0x41e1b9)_0x41e1b9['consecutiveFailures']=0x0;});},_0x179d5c),_0x41e1b9[_0x3a7ca9(0x1d4)]['unref']?.();});const _0x8ba073=[..._0xa27d7f['keys']()];console['log']('[okdb-cluster]\x20primary\x20pid='+process['pid']+_0x506fae(0x619)+_0x35c30e+_0x506fae(0x1ec)+_0x348969+':\x20'+('['+_0x8ba073[_0x506fae(0x4c4)](',\x20')+']'));const _0x329876={'_isClusterController':!![],'port':_0x348969,'primaryOkdb':_0x63702b??null,'status'(){const _0xf6975=_0x506fae;return{'clustered':!![],'primaryPid':process[_0xf6975(0x59c)],'port':_0x348969,'primaryRole':_0x63702b?.[_0xf6975(0x3be)]??null,'processorPid':null,'supervisorPid':process[_0xf6975(0x59c)],'workers':[..._0xa27d7f[_0xf6975(0x1b7)]()][_0xf6975(0x41b)](({worker:_0xb077a4})=>({'pid':_0xb077a4[_0xf6975(0x285)][_0xf6975(0x59c)],'id':_0xb077a4['id'],'dead':_0xb077a4[_0xf6975(0x2e5)]()}))};},async 'close'(){const _0x101110=_0x506fae;_0x2c48da=!![];for(const _0x1987cb of _0x512e61[_0x101110(0x1b7)]()){_0x1987cb[_0x101110(0x186)]=!![],_0x1987cb['respawnTimer']&&(clearTimeout(_0x1987cb[_0x101110(0x1d4)]),_0x1987cb[_0x101110(0x1d4)]=null);}clearInterval(_0x65ef91),_0x14e17a[_0x101110(0x63d)](_0x101110(0x25c),_0x85bd85),_0x14e17a[_0x101110(0x63d)](_0x101110(0x25c),_0x2c4ace),_0x63702b?.[_0x101110(0x5e6)]?.['off']?.(_0x23ed11['SYSTEM_PROC'],_0x89fbb6);if(_0x63702b?.[_0x101110(0x5e6)]?.['off'])for(const {event:_0x343811,handler:_0x155bd1}of _0x2fbb1a){try{_0x63702b[_0x101110(0x5e6)]['off'](_0x343811,_0x155bd1);}catch{}}_0x2fbb1a[_0x101110(0x5b9)]=0x0;const _0x51311b=[..._0xa27d7f[_0x101110(0x1b7)]()][_0x101110(0x41b)](({worker:_0x45cb00})=>_0x45cb00);if(_0x51311b['length']===0x0)return;await Promise['all'](_0x51311b['map'](_0x2512e2=>new Promise(_0x41f00d=>{const _0x1ca8e9=_0x101110;if(_0x2512e2[_0x1ca8e9(0x2e5)]()){_0x41f00d();return;}let _0x22a0e3=![];const _0x2d654e=()=>{if(_0x22a0e3)return;_0x22a0e3=!![];if(_0x17fd81)clearTimeout(_0x17fd81);_0x41f00d();};_0x2512e2[_0x1ca8e9(0x304)](_0x1ca8e9(0x370),_0x2d654e);const _0x17fd81=setTimeout(()=>{const _0x1b2cdc=_0x1ca8e9;try{_0x2512e2[_0x1b2cdc(0x285)][_0x1b2cdc(0x569)]();}catch{}},_0x2bf511+0x1f4);_0x17fd81[_0x1ca8e9(0x2bd)]?.();try{_0x2512e2[_0x1ca8e9(0x301)]();}catch{try{_0x2512e2[_0x1ca8e9(0x285)][_0x1ca8e9(0x569)]();}catch{}}})));}};return _0x329876;}async function _0x4211cd({makeOkdb:_0x55c8dd,port:_0x2dbea2}){const _0xe2d533=_0x541159,_0x409567=await _0x55c8dd();return _0x220fe2(_0x409567),_0x409567['http'][_0xe2d533(0x486)](_0x2dbea2);}function _0x220fe2(_0xe07639){const _0x25e946=_0x541159;if(!_0xe07639||_0xe07639[_0x25e946(0x64d)])return;_0xe07639[_0x25e946(0x64d)]=!![];try{const {OKDBChangefeed:_0x3de778}=requireOkdbChangefeed(),_0x36740f=_0xe07639['_adminRelay'];if(_0x36740f&&typeof _0x36740f[_0x25e946(0x2c5)]==='function'){const _0x2b5775=new _0x3de778(_0xe07639);_0x2b5775[_0x25e946(0x499)](),_0x36740f[_0x25e946(0x2c5)](_0x2b5775),_0xe07639[_0x25e946(0x4cf)]=_0x2b5775;}}catch(_0x59f06e){_0xe07639[_0x25e946(0x4ca)]?.[_0x25e946(0x3ed)]?.(_0x25e946(0x2d5)+(_0x59f06e?.[_0x25e946(0x25c)]??_0x59f06e),{'feature':_0x25e946(0x3ac)});}const _0x42f19a=_0x4ea5b9=>{const _0x4800c9=_0x25e946;if(!_0x4ea5b9||typeof _0x4ea5b9!==_0x4800c9(0x312)||_0x4ea5b9[_0x3151ae]==null)return;if(_0x4ea5b9[_0x3151ae]===_0x214d0f)try{_0xe07639[_0x4800c9(0x462)]?.[_0x4800c9(0x47b)]?.(_0x4ea5b9[_0x4800c9(0x353)],_0x4ea5b9[_0x4800c9(0x31e)]);}catch{}};process['on'](_0x25e946(0x25c),_0x42f19a),_0xe07639[_0x25e946(0x2a5)]=_0x42f19a;{let _0x5c7803=process['cpuUsage'](),_0x7121b5=Date[_0x25e946(0x514)]();const _0x10ee00=()=>{const _0x46471a=_0x25e946;if(typeof process[_0x46471a(0x4e1)]!=='function'||!process['connected'])return;const _0x35ed27=Date[_0x46471a(0x514)](),_0x3f0da6=process[_0x46471a(0x642)](),_0x5ab21c=(_0x35ed27-_0x7121b5)*0x3e8,_0x4f51e3=_0x3f0da6[_0x46471a(0x4a9)]-_0x5c7803[_0x46471a(0x4a9)]+(_0x3f0da6['system']-_0x5c7803[_0x46471a(0x35b)]),_0x36a909=_0x5ab21c>0x0?Math[_0x46471a(0x275)](0x64,Math['round'](_0x4f51e3/(_0x5ab21c*(_0x509e9f[_0x46471a(0x40b)]()['length']||0x1))*0x64)):0x0;_0x5c7803=_0x3f0da6,_0x7121b5=_0x35ed27;const _0x25d415=process[_0x46471a(0x604)]();let _0x3f58b5=null;try{_0x3f58b5=_0xe07639['role']?.['processors']?_0xe07639[_0x46471a(0x30d)]?.[_0x46471a(0x2af)]?.()??null:null;}catch{}try{process[_0x46471a(0x4e1)]({[_0x3151ae]:_0x171b2e,'stats':{'rss':_0x25d415[_0x46471a(0x64c)],'heapUsed':_0x25d415[_0x46471a(0x204)],'heapTotal':_0x25d415[_0x46471a(0x5f2)],'external':_0x25d415[_0x46471a(0x392)],'cpuPct':_0x36a909,'cpuWindowMs':Math[_0x46471a(0x2b8)](_0x5ab21c/0x3e8)||null},'processing':_0x3f58b5});}catch{}},_0x19c00d=Math[_0x25e946(0x4b9)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x41915a=setInterval(_0x10ee00,_0x19c00d);_0x41915a['unref']?.(),_0x10ee00();for(const _0x3ad836 of[_0x25e946(0x2dd),'processor:resumed']){_0xe07639[_0x25e946(0x5e6)]?.['on']?.(_0x3ad836,()=>{try{_0x10ee00();}catch{}});}}let _0xcf45d7=![];const _0x4897cf=async _0x3158d3=>{const _0x5ea07a=_0x25e946;if(_0xcf45d7)return;_0xcf45d7=!![];const _0x21cbde=setTimeout(()=>process[_0x5ea07a(0x370)](_0x3158d3),_0x2bf511);_0x21cbde[_0x5ea07a(0x2bd)]?.();try{await _0xe07639['close']?.();}catch{}process[_0x5ea07a(0x370)](_0x3158d3);};process['on'](_0x25e946(0x301),()=>_0x4897cf(0x0));if(process[_0x25e946(0x432)]!==_0x25e946(0x646)){const _0x1eb931=setInterval(()=>{if(process['ppid']===0x1)_0x4897cf(0x0);},_0x3734f1);_0x1eb931[_0x25e946(0x2bd)]?.(),_0xe07639['_clusterOrphanWatch']=_0x1eb931;}}return okdbCluster={'runClustered':_0x261e34,'attachWorkerCluster':_0x220fe2},okdbCluster;}var hasRequiredOkdb;function requireOkdb(){const _0x4c2623=_0x12dbbc;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x4c2623(0x2d1)]();}catch{}const _0x4ec5c4=require$$1,_0x360f50=require$$1$1,{resolveWorkers:_0x5739c3,isShmbufNative:_0x49fb21}=requireOkdbWorkers();function _0x32499d(_0x23ca4d){const _0x33b284=_0x4c2623,_0x4a995d=_0x23ca4d['slice'](0x2),_0x565903={};let _0x5a45bf=0x0;while(_0x5a45bf<_0x4a995d[_0x33b284(0x5b9)]){const _0x245892=_0x4a995d[_0x5a45bf];if(_0x245892===_0x33b284(0x192)||_0x245892==='-p')_0x565903[_0x33b284(0x5e1)]=Number(_0x4a995d[++_0x5a45bf]);else{if(_0x245892===_0x33b284(0x415)||_0x245892==='-d')_0x565903['path']=_0x4a995d[++_0x5a45bf];else{if(_0x245892==='--key'||_0x245892==='-k')_0x565903[_0x33b284(0x5a6)]=_0x4a995d[++_0x5a45bf];else{if(_0x245892==='--config'||_0x245892==='-c')_0x565903[_0x33b284(0x214)]=_0x4a995d[++_0x5a45bf];else{if(_0x245892===_0x33b284(0x1b5))_0x565903[_0x33b284(0x2a4)]=_0x4a995d[++_0x5a45bf];else{if(_0x245892===_0x33b284(0x246))_0x565903['noRepl']=!![];else{if(_0x245892===_0x33b284(0x2df))_0x565903['noAdmin']=!![];else{if(_0x245892===_0x33b284(0x5c3))_0x565903['workers']=_0x4a995d[++_0x5a45bf];else{if(_0x245892===_0x33b284(0x386))_0x565903[_0x33b284(0x310)]=!![];else{if(_0x245892===_0x33b284(0x23b)||_0x245892==='-e')_0x565903['env']=_0x4a995d[++_0x5a45bf];else{if(_0x245892===_0x33b284(0x42a))_0x565903['types']=_0x4a995d[++_0x5a45bf];else{if(_0x245892===_0x33b284(0x56a))_0x565903[_0x33b284(0x2eb)]=!![];else{if(_0x245892==='--blobs')_0x565903[_0x33b284(0x185)]=!![];else{if(_0x245892==='--drop')_0x565903[_0x33b284(0x184)]=!![];else{if(_0x245892===_0x33b284(0x209)){const _0xa04f6=[];while(_0x5a45bf+0x1<_0x4a995d['length']&&!_0x4a995d[_0x5a45bf+0x1]['startsWith']('--')){_0xa04f6[_0x33b284(0x4e9)](_0x4a995d[++_0x5a45bf]);}_0x565903['open']=_0xa04f6[_0x33b284(0x5b9)]>0x0?_0xa04f6:!![];}else{if(_0x245892===_0x33b284(0x595))_0x565903[_0x33b284(0x176)]=!![];else{if(_0x245892===_0x33b284(0x190))_0x565903['name']=_0x4a995d[++_0x5a45bf];else{if(_0x245892===_0x33b284(0x5b3))_0x565903[_0x33b284(0x1a5)]=_0x4a995d[++_0x5a45bf];else{if(_0x245892==='--label')_0x565903['label']=_0x4a995d[++_0x5a45bf];else{if(_0x245892==='--permissions')_0x565903[_0x33b284(0x4e8)]=_0x4a995d[++_0x5a45bf];else{if(_0x245892===_0x33b284(0x231))_0x565903['grants']=_0x4a995d[++_0x5a45bf];else{if(_0x245892==='--ttl')_0x565903['ttl']=_0x4a995d[++_0x5a45bf];else{if(_0x245892==='--token')_0x565903[_0x33b284(0x3a9)]=_0x4a995d[++_0x5a45bf];else{if(_0x245892===_0x33b284(0x1fc)||_0x245892==='-u')_0x565903[_0x33b284(0x4b6)]=_0x4a995d[++_0x5a45bf];else{if(_0x245892===_0x33b284(0x222))_0x565903[_0x33b284(0x48e)]=_0x4a995d[++_0x5a45bf];else{if(_0x245892===_0x33b284(0x5bf)||_0x245892==='-v'){const _0x5b191b=require$$3;console['log'](_0x5b191b[_0x33b284(0x605)]),process[_0x33b284(0x370)](0x0);}else(_0x245892==='--help'||_0x245892==='-h')&&(_0x3346de(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x5a45bf++;}return _0x565903;}function _0x3346de(){const _0xf7c247=_0x4c2623;console[_0xf7c247(0x4ca)](_0xf7c247(0x2c3));}const _0x2b4da1=new Set([_0x4c2623(0x289),_0x4c2623(0x3c6),_0x4c2623(0x3ed),_0x4c2623(0x594)]);function _0xc26352(_0x2bf4b1){const _0x43252e=_0x4c2623,_0x3bd08c=_0x2bf4b1[_0x43252e(0x214)]?_0x4ec5c4[_0x43252e(0x408)](_0x2bf4b1['config']):_0x4ec5c4[_0x43252e(0x408)](_0x43252e(0x247));let _0x57d594={};if(_0x360f50[_0x43252e(0x39c)](_0x3bd08c))try{const _0x409f0c=_0x360f50[_0x43252e(0x56c)](_0x3bd08c,_0x43252e(0x5fd))[_0x43252e(0x3a1)](/^\uFEFF/,'');_0x57d594=JSON['parse'](_0x409f0c),console['log'](_0x43252e(0x220)+_0x3bd08c);}catch(_0x3dc792){console[_0x43252e(0x594)](_0x43252e(0x4a5)+_0x3bd08c+':\x20'+_0x3dc792[_0x43252e(0x25c)]),process['exit'](0x1);}const _0x4c5e06={'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},_0x494f39={'port':_0x2bf4b1['port']??_0x57d594['port']??_0x4c5e06[_0x43252e(0x5e1)]??0x2124,'dbPath':_0x2bf4b1[_0x43252e(0x60b)]??_0x57d594[_0x43252e(0x60b)]??_0x4c5e06[_0x43252e(0x60b)]??'./okdb-data','key':_0x2bf4b1[_0x43252e(0x5a6)]??_0x57d594['key']??_0x4c5e06[_0x43252e(0x5a6)]??undefined,'logLevel':_0x2bf4b1[_0x43252e(0x2a4)]??_0x57d594[_0x43252e(0x2a4)]??_0x4c5e06['logLevel']??'info','noRepl':_0x2bf4b1[_0x43252e(0x500)]??_0x57d594[_0x43252e(0x500)]??_0x4c5e06[_0x43252e(0x500)]??![],'noAdmin':_0x2bf4b1['noAdmin']??_0x57d594[_0x43252e(0x243)]??_0x4c5e06[_0x43252e(0x243)]??![],'admin':_0x57d594[_0x43252e(0x22e)]??{},'api':_0x57d594[_0x43252e(0x1e1)]??undefined,'auth':_0x57d594[_0x43252e(0x473)]??undefined,'mcp':_0x57d594[_0x43252e(0x364)]??undefined,'http':_0x57d594[_0x43252e(0x349)]??undefined,'timeMachine':_0x57d594['timeMachine']!==![]?_0x57d594[_0x43252e(0x2a8)]??{}:![]};if(_0x2bf4b1[_0x43252e(0x310)])_0x494f39[_0x43252e(0x310)]=!![];if(_0x2bf4b1[_0x43252e(0x5f5)]!==undefined)_0x494f39[_0x43252e(0x4bd)]=_0x2bf4b1['workers'];return _0x2bf4b1[_0x43252e(0x51d)]!==undefined&&(_0x494f39['auth']=_0x494f39[_0x43252e(0x473)]||{},_0x494f39[_0x43252e(0x473)][_0x43252e(0x51d)]=_0x2bf4b1[_0x43252e(0x51d)]),_0x2bf4b1[_0x43252e(0x176)]&&(_0x494f39[_0x43252e(0x289)]=_0x494f39[_0x43252e(0x289)]||{},_0x494f39[_0x43252e(0x289)][_0x43252e(0x176)]=!![]),(!Number[_0x43252e(0x5d7)](_0x494f39[_0x43252e(0x5e1)])||_0x494f39['port']<0x1||_0x494f39[_0x43252e(0x5e1)]>0xffff)&&(console[_0x43252e(0x594)](_0x43252e(0x343)+_0x494f39[_0x43252e(0x5e1)]+_0x43252e(0x520)),process[_0x43252e(0x370)](0x1)),!_0x2b4da1[_0x43252e(0x5a7)](_0x494f39[_0x43252e(0x2a4)])&&(console[_0x43252e(0x594)]('[okdb]\x20invalid\x20log\x20level:\x20\x22'+_0x494f39[_0x43252e(0x2a4)]+_0x43252e(0x409)),process[_0x43252e(0x370)](0x1)),_0x494f39;}function _0xca2787(_0xb6877d){const _0x1ea19f=_0x4c2623;return!!(_0xb6877d&&typeof _0xb6877d===_0x1ea19f(0x312)&&!Array[_0x1ea19f(0x3aa)](_0xb6877d)&&Object[_0x1ea19f(0x50d)](_0xb6877d)[_0x1ea19f(0x5b9)]>0x0);}function _0xc3c7ed(_0x198c32){const _0xf2e4fb=_0x4c2623;return{..._0x198c32[_0xf2e4fb(0x5a6)]?{'encryptionKey':_0x198c32[_0xf2e4fb(0x5a6)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x462b88=!process[_0x4c2623(0x307)][_0x4c2623(0x24e)]||!!process.env.NO_COLOR;function _0x298999(_0x435feb,_0x4caac3){const _0x3e4992=_0x4c2623;return _0x462b88?_0x4caac3:'\x1b['+_0x435feb+'m'+_0x4caac3+_0x3e4992(0x572);}function _0x297569(_0x2c3b85){const _0xbbe0b9=_0x4c2623;if(!_0x2c3b85||_0x2c3b85[_0xbbe0b9(0x5b9)]===0x0)return;const _0x40e33c='─'[_0xbbe0b9(0x3cf)](0x38);process[_0xbbe0b9(0x193)][_0xbbe0b9(0x557)]('\x0a'),process[_0xbbe0b9(0x193)][_0xbbe0b9(0x557)](_0x298999('33',_0xbbe0b9(0x625)+_0x2c3b85['length']+_0xbbe0b9(0x61b)+(_0x2c3b85[_0xbbe0b9(0x5b9)]>0x1?'S':'')+'\x0a')),process[_0xbbe0b9(0x193)][_0xbbe0b9(0x557)]('\x20\x20'+_0x40e33c+'\x0a');for(const _0x1c995f of _0x2c3b85){const _0x5b5855=_0x1c995f[_0xbbe0b9(0x56e)]===_0xbbe0b9(0x594)?_0x298999('31',_0xbbe0b9(0x281)):_0x298999('33',_0xbbe0b9(0x4f6));process[_0xbbe0b9(0x193)]['write'](_0x5b5855+'\x20\x20'+_0x298999('1',_0x1c995f[_0xbbe0b9(0x529)])+'\x0a'),process[_0xbbe0b9(0x193)][_0xbbe0b9(0x557)]('\x20\x20\x20\x20\x20\x20\x20'+_0x1c995f[_0xbbe0b9(0x25c)]+'\x0a');if(_0x1c995f['hint'])process[_0xbbe0b9(0x193)][_0xbbe0b9(0x557)](_0xbbe0b9(0x397)+_0x298999('2',_0xbbe0b9(0x56b)+_0x1c995f[_0xbbe0b9(0x2f8)])+'\x0a');process[_0xbbe0b9(0x193)]['write']('\x0a');}process[_0xbbe0b9(0x193)][_0xbbe0b9(0x557)]('\x20\x20'+_0x40e33c+'\x0a\x0a');}function _0x134a4e(_0x530169,_0x5f2f34,_0x783354={}){const _0x4a2657=_0x4c2623,_0x5230f9=_0x530169[_0x4a2657(0x349)][_0x4a2657(0x486)](_0x5f2f34,_0x783354);if(_0x5230f9&&_0x5230f9[_0x4a2657(0x54c)])return Promise[_0x4a2657(0x408)](_0x5230f9);return new Promise((_0x35668f,_0x2cfa54)=>{const _0x2e729c=_0x4a2657;_0x5230f9[_0x2e729c(0x304)](_0x2e729c(0x3fd),_0x35668f),_0x5230f9[_0x2e729c(0x304)](_0x2e729c(0x594),_0x2cfa54);});}async function _0x46d9bd(_0xb7cf28){const _0x577157=_0x4c2623,_0x186ad5=require$$4$1;console[_0x577157(0x4ca)](_0x577157(0x390));let _0x18af7b=!![];const _0x5e0af8=(_0x434005,_0x32f250)=>{const _0x19451d=_0x577157;console[_0x19451d(0x4ca)]('\x20\x20'+(_0x434005?'✓':'✗')+'\x20'+_0x32f250);if(!_0x434005)_0x18af7b=![];},_0x4e518a=Number(process[_0x577157(0x605)][_0x577157(0x3a1)]('v','')[_0x577157(0x3c0)]('.')[0x0]);_0x5e0af8(_0x4e518a>=0x12,_0x577157(0x228)+process[_0x577157(0x605)]+(_0x4e518a<0x12?_0x577157(0x208):''));const _0x1314ef=_0x4ec5c4[_0x577157(0x408)](_0xb7cf28[_0x577157(0x55a)]);try{_0x360f50[_0x577157(0x501)](_0x1314ef,{'recursive':!![]});const _0x3a30cb=_0x4ec5c4[_0x577157(0x4c4)](_0x1314ef,_0x577157(0x5ed));_0x360f50[_0x577157(0x51a)](_0x3a30cb,''),_0x360f50[_0x577157(0x63b)](_0x3a30cb),_0x5e0af8(!![],_0x577157(0x28b)+_0x1314ef);}catch(_0x24103e){_0x5e0af8(![],_0x577157(0x35f)+_0x1314ef+_0x577157(0x55f)+_0x24103e[_0x577157(0x25c)]+')');}const _0x32996f=await new Promise(_0x47e54a=>{const _0x214355=_0x577157,_0xc8811d=_0x186ad5[_0x214355(0x323)]();_0xc8811d[_0x214355(0x304)](_0x214355(0x594),()=>_0x47e54a(![])),_0xc8811d[_0x214355(0x304)](_0x214355(0x3fd),()=>{_0xc8811d['close'](),_0x47e54a(!![]);}),_0xc8811d['listen'](_0xb7cf28[_0x214355(0x5e1)],_0x214355(0x568));});_0x5e0af8(_0x32996f,_0x577157(0x2fb)+_0xb7cf28['port']+'\x20'+(_0x32996f?'available':'already\x20in\x20use'));const _0x4c19fa=_0x4ec5c4[_0x577157(0x408)](_0x577157(0x247));if(_0x360f50[_0x577157(0x39c)](_0x4c19fa))try{JSON[_0x577157(0x5f7)](_0x360f50['readFileSync'](_0x4c19fa,_0x577157(0x5fd))[_0x577157(0x3a1)](/^\uFEFF/,'')),_0x5e0af8(!![],_0x577157(0x210)+_0x4c19fa);}catch(_0x30a9ac){_0x5e0af8(![],_0x577157(0x60f)+_0x30a9ac['message']);}else _0x5e0af8(!![],_0x577157(0x3b6));if(_0x49fb21()){const _0x5bf121=_0x5739c3(_0xb7cf28,{'shmbufNative':!![]});_0x5e0af8(!![],_0x577157(0x645)+_0x5bf121+'\x20worker'+(_0x5bf121===0x1?'':'s')+')');}else _0x5e0af8(!![],_0x577157(0x280));if(!_0x32996f)try{const _0x1a31c3=require(_0x577157(0x1dd)),_0x1923cb=new _0x1a31c3(_0x1314ef,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x1923cb[_0x577157(0x51d)]();try{await _0x1923cb[_0x577157(0x30d)][_0x577157(0x51d)]({'reader':!![]});const _0x419640=_0x1923cb[_0x577157(0x30d)][_0x577157(0x235)](),_0x358013=_0x419640[_0x577157(0x5a3)](_0x232a94=>_0x232a94[_0x577157(0x308)]!=null)[_0x577157(0x5b9)];_0x5e0af8(!![],_0x577157(0x18b)+_0x419640['length']+_0x577157(0x593)+(_0x419640[_0x577157(0x5b9)]===0x1?'':'es')+'\x20('+_0x358013+_0x577157(0x168));}finally{await _0x1923cb[_0x577157(0x62d)]();}}catch{}console[_0x577157(0x4ca)](''),_0x18af7b?console[_0x577157(0x4ca)]('\x20\x20All\x20checks\x20passed.\x0a'):(console[_0x577157(0x4ca)](_0x577157(0x44d)),process[_0x577157(0x370)](0x1));}async function _0x543d76(){const _0x2ae364=_0x4c2623,_0x129734=_0x4ec5c4[_0x2ae364(0x408)]('.kdbconfig');!_0x360f50[_0x2ae364(0x39c)](_0x129734)?(_0x360f50['writeFileSync'](_0x129734,JSON[_0x2ae364(0x2be)]({'port':0x2124,'path':_0x2ae364(0x4ea),'logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x2ae364(0x4ca)](_0x2ae364(0x57e))):console[_0x2ae364(0x4ca)](_0x2ae364(0x2e1));const _0x55bebb=_0x4ec5c4[_0x2ae364(0x408)](_0x2ae364(0x4ea));!_0x360f50[_0x2ae364(0x39c)](_0x55bebb)?(_0x360f50['mkdirSync'](_0x55bebb,{'recursive':!![]}),console['log'](_0x2ae364(0x5e2))):console[_0x2ae364(0x4ca)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x2ae364(0x4ca)](_0x2ae364(0x31c));}async function _0x16a73f(_0x566638){const _0x5e33b3=_0x4c2623,_0x420d2b=_0x4ec5c4[_0x5e33b3(0x408)](_0x566638['dbPath']);if(!_0x360f50[_0x5e33b3(0x39c)](_0x420d2b)){console[_0x5e33b3(0x4ca)](_0x5e33b3(0x573)+_0x420d2b+_0x5e33b3(0x410));return;}const _0x1b79f2=require$$0$3,_0x16edf9=_0x1b79f2[_0x5e33b3(0x425)]({'input':process[_0x5e33b3(0x589)],'output':process[_0x5e33b3(0x307)]}),_0x4c861c=await new Promise(_0xc8f17d=>_0x16edf9[_0x5e33b3(0x29e)](_0x5e33b3(0x459)+_0x420d2b+'?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0xc8f17d));_0x16edf9[_0x5e33b3(0x62d)](),console[_0x5e33b3(0x4ca)]('');if(_0x4c861c[_0x5e33b3(0x258)]()[_0x5e33b3(0x337)]()!==_0x5e33b3(0x2ca)){console[_0x5e33b3(0x4ca)]('[okdb]\x20reset\x20aborted');return;}let _0x5e3b7b=null;try{_0x5e3b7b=await _0x29b22c(_0x420d2b,_0x566638,async _0x100339=>{const _0x10427c=_0x5e33b3,_0x1cb47a=_0x100339[_0x10427c(0x4d0)],_0x37b517=_0x1cb47a?.['db']?.[_0x10427c(0x30a)](_0x10427c(0x1b4))??null,_0x386cc0=[];if(_0x1cb47a?.['hasType']('~licenses'))for(const {key:_0x1a0235,value:_0x554f16}of _0x1cb47a['getRange'](_0x10427c(0x171))){_0x386cc0['push']({'key':_0x1a0235,'value':_0x554f16});}return{'identity':_0x37b517,'licenses':_0x386cc0};});}catch(_0x1b101b){console[_0x5e33b3(0x4ca)](_0x5e33b3(0x52f)+_0x1b101b['message']+')\x20—\x20they\x20will\x20NOT\x20be\x20preserved');}_0x360f50[_0x5e33b3(0x359)](_0x420d2b,{'recursive':!![],'force':!![]}),console['log']('[okdb]\x20reset:\x20'+_0x420d2b+_0x5e33b3(0x2fe));if(_0x5e3b7b&&(_0x5e3b7b[_0x5e33b3(0x2b2)]||_0x5e3b7b['licenses'][_0x5e33b3(0x5b9)]>0x0))try{await _0x29b22c(_0x420d2b,_0x566638,async _0x1b1883=>{const _0x329d7a=_0x5e33b3,_0x4d4dc0=_0x1b1883[_0x329d7a(0x4d0)];_0x5e3b7b[_0x329d7a(0x2b2)]&&_0x4d4dc0['db'][_0x329d7a(0x598)](_0x329d7a(0x1b4),_0x5e3b7b['identity']);if(_0x5e3b7b['licenses'][_0x329d7a(0x5b9)]>0x0){if(!_0x4d4dc0[_0x329d7a(0x2e0)](_0x329d7a(0x171)))await _0x4d4dc0[_0x329d7a(0x617)](_0x329d7a(0x171));for(const {key:_0x5c4f11,value:_0x35997e}of _0x5e3b7b['licenses']){await _0x4d4dc0['put'](_0x329d7a(0x171),_0x5c4f11,_0x35997e);}}});const _0x4e2a98=[];if(_0x5e3b7b[_0x5e33b3(0x2b2)])_0x4e2a98[_0x5e33b3(0x4e9)]('node\x20identity');if(_0x5e3b7b['licenses'][_0x5e33b3(0x5b9)]>0x0)_0x4e2a98[_0x5e33b3(0x4e9)](_0x5e3b7b[_0x5e33b3(0x2bf)][_0x5e33b3(0x5b9)]+'\x20license(s)');console[_0x5e33b3(0x4ca)](_0x5e33b3(0x2fc)+_0x4e2a98['join'](_0x5e33b3(0x5da)));}catch(_0x14ae3f){console['log'](_0x5e33b3(0x4df)+_0x14ae3f[_0x5e33b3(0x25c)]);}}async function _0x29b22c(_0x38374a,_0xf9b87b,_0x2e9ddd){const _0x4cfbf5=_0x4c2623,_0x5d1aed=require$$5,_0x3d87d3=new _0x5d1aed(_0x38374a,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0xc3c7ed(_0xf9b87b)});await _0x3d87d3[_0x4cfbf5(0x51d)]();try{return await _0x2e9ddd(_0x3d87d3);}finally{await _0x3d87d3[_0x4cfbf5(0x62d)]();}}async function _0x4a50bc(_0x41eddd,_0x50a463){const _0x30b126=_0x4c2623,_0x56624c=require$$5,_0x1aed99=_0x4ec5c4[_0x30b126(0x408)](_0x50a463['dbPath']);console[_0x30b126(0x4ca)](_0x30b126(0x50c)+_0x1aed99+'…');const _0x357a85=new _0x56624c(_0x1aed99,_0xc3c7ed(_0x50a463));await _0x357a85[_0x30b126(0x51d)](),console[_0x30b126(0x4ca)](_0x30b126(0x541)+_0x41eddd+'…');const {envs:_0x367718}=await _0x357a85['migrate'][_0x30b126(0x23c)](_0x41eddd);for(const _0x235e45 of _0x367718){const _0x2e7921=_0x235e45[_0x30b126(0x41a)]>0x0?'\x20\x20('+(_0x235e45[_0x30b126(0x41a)]/0x400/0x400)[_0x30b126(0x476)](0x2)+_0x30b126(0x493)+(_0x235e45[_0x30b126(0x468)]/0x400/0x400)[_0x30b126(0x476)](0x2)+'\x20MB)':'';console[_0x30b126(0x4ca)](_0x30b126(0x330)+_0x235e45[_0x30b126(0x21d)]+_0x30b126(0x21a)+_0x235e45['dest']+_0x2e7921);}await _0x357a85[_0x30b126(0x62d)](),console['log'](_0x30b126(0x3d2));}async function _0x554521(_0xf5d74e,_0x2b19a2,_0x517e2b){const _0x149bb6=_0x4c2623,_0x948203=require$$5,_0x695c64=_0x4ec5c4[_0x149bb6(0x408)](_0x2b19a2['dbPath']),_0x404220=_0x517e2b[_0x149bb6(0x60a)]??_0x149bb6(0x29c),_0xfe3192=_0x517e2b['types']?_0x517e2b[_0x149bb6(0x52d)][_0x149bb6(0x3c0)](',')['map'](_0x37cc44=>_0x37cc44[_0x149bb6(0x258)]()):null;console[_0x149bb6(0x4ca)](_0x149bb6(0x50c)+_0x695c64+'…');const _0x39ca60=new _0x948203(_0x695c64,_0xc3c7ed(_0x2b19a2));await _0x39ca60['open'](),console['log'](_0x149bb6(0x1b1)+_0x404220+_0x149bb6(0x479)+_0xf5d74e+'…');const _0x4c891d=await _0x39ca60[_0x149bb6(0x47d)]['exportToFile'](_0xf5d74e,{'envName':_0x404220,'types':_0xfe3192,'includeChanges':!!_0x517e2b[_0x149bb6(0x2eb)]});console['log'](_0x149bb6(0x3e2)+_0x4c891d[_0x149bb6(0x52d)]+_0x149bb6(0x1db)+_0x4c891d[_0x149bb6(0x5ff)]+'\x20\x20changes='+_0x4c891d[_0x149bb6(0x2eb)]);if(_0x517e2b[_0x149bb6(0x185)]){const _0x3038cb=_0x4ec5c4[_0x149bb6(0x4c4)](_0x4ec5c4[_0x149bb6(0x43f)](_0xf5d74e),_0x149bb6(0x185));process[_0x149bb6(0x307)][_0x149bb6(0x557)](_0x149bb6(0x3e4));const {count:_0x586445,bytes:_0x196a7a}=await _0x39ca60['migrate'][_0x149bb6(0x259)](_0x3038cb);console['log']('\x0d[okdb]\x20blobs:\x20'+_0x3038cb+_0x149bb6(0x55f)+_0x586445+_0x149bb6(0x4ad)+(_0x586445!==0x1?'s':'')+',\x20'+(_0x196a7a/0x400/0x400)['toFixed'](0x2)+_0x149bb6(0x2db));}await _0x39ca60['close'](),console[_0x149bb6(0x4ca)](_0x149bb6(0x329));}async function _0x4d310b(_0x2a2539,_0x50193d,_0x170386){const _0x5482bf=_0x4c2623,_0x1335af=require$$5,_0x5aaa68=_0x4ec5c4[_0x5482bf(0x408)](_0x50193d[_0x5482bf(0x55a)]),_0x19d88a=_0x170386['env']??null,_0x1227cb=_0x170386[_0x5482bf(0x52d)]?_0x170386['types'][_0x5482bf(0x3c0)](',')[_0x5482bf(0x41b)](_0x36445c=>_0x36445c['trim']()):null,_0x15e89b=!!_0x170386[_0x5482bf(0x184)];console[_0x5482bf(0x4ca)]('[okdb]\x20opening\x20'+_0x5aaa68+'…');const _0x1820f2=new _0x1335af(_0x5aaa68,_0xc3c7ed(_0x50193d));await _0x1820f2[_0x5482bf(0x51d)](),console[_0x5482bf(0x4ca)](_0x5482bf(0x5e4)+_0x2a2539+'…');const _0x525543=await _0x1820f2[_0x5482bf(0x47d)]['importFromFile'](_0x2a2539,{'envName':_0x19d88a,'types':_0x1227cb,'dropExisting':_0x15e89b,'includeChanges':!!_0x170386[_0x5482bf(0x2eb)],'onProgress':({type:_0x5dce0c,count:_0x196fb0})=>{const _0x5b093f=_0x5482bf;process[_0x5b093f(0x307)][_0x5b093f(0x557)]('\x0d[okdb]\x20'+_0x5dce0c+':\x20'+_0x196fb0+_0x5b093f(0x4c9));}});process[_0x5482bf(0x307)]['write']('\x0a'),console[_0x5482bf(0x4ca)]('[okdb]\x20imported\x20\x20types='+_0x525543[_0x5482bf(0x52d)]+'\x20\x20records='+_0x525543['records']+'\x20\x20changes='+_0x525543[_0x5482bf(0x2eb)]);if(_0x170386[_0x5482bf(0x185)]){const _0x25768e=_0x4ec5c4['join'](_0x4ec5c4[_0x5482bf(0x43f)](_0x2a2539),'blobs');if(_0x360f50['existsSync'](_0x25768e)){const {imported:_0x904854,skipped:_0x5d7beb}=await _0x1820f2[_0x5482bf(0x47d)][_0x5482bf(0x291)](_0x25768e);console[_0x5482bf(0x4ca)](_0x5482bf(0x630)+_0x904854+_0x5482bf(0x1f9)+_0x5d7beb);}}await _0x1820f2['close'](),console[_0x5482bf(0x4ca)](_0x5482bf(0x1ad));}async function _0x17eeb6(_0x54aa47,_0x6c808f){const _0x591ded=_0x4c2623;_0x6c808f['password']&&!_0x6c808f['name']&&(console[_0x591ded(0x594)](_0x591ded(0x2a6)),process[_0x591ded(0x370)](0x1));const _0x22ee72=_0x6c808f[_0x591ded(0x4e8)]?_0x6c808f[_0x591ded(0x4e8)][_0x591ded(0x3c0)](',')[_0x591ded(0x41b)](_0x46b1b3=>_0x46b1b3[_0x591ded(0x258)]())[_0x591ded(0x5a3)](Boolean):[];let _0x438ec5={};if(_0x6c808f[_0x591ded(0x29f)])try{_0x438ec5=JSON['parse'](_0x6c808f['grants']);if(typeof _0x438ec5!==_0x591ded(0x312)||Array['isArray'](_0x438ec5)||_0x438ec5===null)throw new Error();}catch{console[_0x591ded(0x594)]('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process[_0x591ded(0x370)](0x1);}const _0x1c7ded=require$$5,{randomToken:_0x116597,hashToken:_0x5cccc3,hashPassword:_0x527d6e}=requireOkdbAuthTokens(),_0x365963=require$$0$1,_0x4584f7=_0x4ec5c4[_0x591ded(0x408)](_0x54aa47[_0x591ded(0x55a)]),_0x22530f=new _0x1c7ded(_0x4584f7,_0xc3c7ed(_0x54aa47));await _0x22530f[_0x591ded(0x51d)]();try{await _0x22530f[_0x591ded(0x473)][_0x591ded(0x2f1)]();if(_0x6c808f['name']){const _0x273a60=await _0x22530f['auth']['_lookupByName'](_0x6c808f[_0x591ded(0x21d)]);_0x273a60&&(console[_0x591ded(0x594)](_0x591ded(0x566)+_0x6c808f[_0x591ded(0x21d)]+'\x22\x20already\x20exists'),process[_0x591ded(0x370)](0x1));}const _0xee5103=_0x116597(0x20),_0x586c74=_0x5cccc3(_0xee5103),_0x1f7e95=_0x6c808f[_0x591ded(0x1a5)]?await _0x527d6e(_0x6c808f[_0x591ded(0x1a5)]):null,_0x2ef8f3=_0x365963[_0x591ded(0x37b)](),_0x4358fe={'tokenHash':_0x586c74,'name':_0x6c808f[_0x591ded(0x21d)]||null,'passwordHash':_0x1f7e95,'label':_0x6c808f[_0x591ded(0x4a1)]||null,'permissions':_0x22ee72,'grants':_0x438ec5,'createdAt':Date['now'](),'lastUsedAt':null},_0x303b4f=_0x6c808f['ttl']?{'ttl':Number(_0x6c808f[_0x591ded(0x2ac)])}:undefined;await _0x22530f[_0x591ded(0x4d0)][_0x591ded(0x613)](_0x591ded(0x43c),_0x2ef8f3,_0x4358fe,_0x303b4f),console[_0x591ded(0x4ca)](_0x591ded(0x4cd)),console['log'](_0x591ded(0x591)+_0x2ef8f3),console[_0x591ded(0x4ca)](_0x591ded(0x3ce)+(_0x6c808f[_0x591ded(0x21d)]||'(unset)')),console['log'](_0x591ded(0x4d7)+(_0x6c808f[_0x591ded(0x4a1)]||_0x591ded(0x59e))),console[_0x591ded(0x4ca)](_0x591ded(0x428)+(_0x22ee72['join'](',\x20')||_0x591ded(0x5ae))),console['log']('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console['log'](_0x591ded(0x385)+_0xee5103+'\x0a');}finally{await _0x22530f[_0x591ded(0x62d)]();}}async function _0x18a4fa(_0x71bcc4){const _0xc1f403=_0x4c2623,_0x506125=require$$5,_0x1b1468=_0x4ec5c4['resolve'](_0x71bcc4[_0xc1f403(0x55a)]),_0x52b890=new _0x506125(_0x1b1468,_0xc3c7ed(_0x71bcc4));await _0x52b890[_0xc1f403(0x51d)]();try{const _0x58be44=_0x52b890['_systemEnv'];if(!_0x58be44||!_0x58be44[_0xc1f403(0x2e0)](_0xc1f403(0x43c))){console['log'](_0xc1f403(0x357));return;}const _0x289073=[];for(const {key:_0x2c6cb6,value:_0x4bc890}of _0x58be44[_0xc1f403(0x2cb)](_0xc1f403(0x43c))){_0x289073[_0xc1f403(0x4e9)]({'id':_0x2c6cb6,'name':_0x4bc890['name']||_0xc1f403(0x59e),'label':_0x4bc890[_0xc1f403(0x4a1)]||_0xc1f403(0x59e),'permissions':Array['isArray'](_0x4bc890[_0xc1f403(0x4e8)])?_0x4bc890[_0xc1f403(0x4e8)][_0xc1f403(0x4c4)](','):'','created':_0x4bc890[_0xc1f403(0x612)]?new Date(_0x4bc890[_0xc1f403(0x612)])[_0xc1f403(0x219)]()[_0xc1f403(0x306)](0x0,0xa):''});}if(_0x289073[_0xc1f403(0x5b9)]===0x0){console[_0xc1f403(0x4ca)](_0xc1f403(0x357));return;}const _0x138481=!process[_0xc1f403(0x307)][_0xc1f403(0x5fc)]||process[_0xc1f403(0x307)]['columns']>=0x64,_0x36f3e9=_0x138481?0x24:0xa,_0x214f5e=['ID'[_0xc1f403(0x4fe)](_0x36f3e9),_0xc1f403(0x564)[_0xc1f403(0x4fe)](0x10),_0xc1f403(0x36a)[_0xc1f403(0x4fe)](0x14),_0xc1f403(0x1c6)[_0xc1f403(0x4fe)](0x14),_0xc1f403(0x2f7)][_0xc1f403(0x4c4)]('\x20\x20');console[_0xc1f403(0x4ca)]('\x0a'+_0x214f5e),console[_0xc1f403(0x4ca)]('-'['repeat'](_0x214f5e[_0xc1f403(0x5b9)]));for(const _0x1a5b3a of _0x289073){const _0x1c148b=_0x138481?_0x1a5b3a['id']:_0x1a5b3a['id'][_0xc1f403(0x306)](0x0,0x8)+'…';console['log']([_0x1c148b[_0xc1f403(0x4fe)](_0x36f3e9),_0x1a5b3a['name'][_0xc1f403(0x306)](0x0,0x10)[_0xc1f403(0x4fe)](0x10),_0x1a5b3a[_0xc1f403(0x4a1)][_0xc1f403(0x306)](0x0,0x14)[_0xc1f403(0x4fe)](0x14),_0x1a5b3a[_0xc1f403(0x4e8)][_0xc1f403(0x306)](0x0,0x14)[_0xc1f403(0x4fe)](0x14),_0x1a5b3a[_0xc1f403(0x648)]]['join']('\x20\x20'));}console[_0xc1f403(0x4ca)]('');}finally{await _0x52b890['close']();}}async function _0x4bf0c2(_0xfe2ae2,_0x2a17fd){const _0x2ce077=_0x4c2623;!_0xfe2ae2&&(console['error'](_0x2ce077(0x5a8)),process['exit'](0x1));const _0x4cbb34=require$$5,_0x1cf88d=_0x4ec5c4['resolve'](_0x2a17fd['dbPath']),_0x558ce2=new _0x4cbb34(_0x1cf88d,_0xc3c7ed(_0x2a17fd));await _0x558ce2[_0x2ce077(0x51d)]();try{const _0x58dd94=_0x558ce2[_0x2ce077(0x4d0)];(!_0x58dd94||!_0x58dd94[_0x2ce077(0x2e0)](_0x2ce077(0x43c)))&&(console[_0x2ce077(0x594)](_0x2ce077(0x4eb)+_0xfe2ae2+'\x22'),process[_0x2ce077(0x370)](0x1));let _0x56a256=null,_0x27308b=null;const _0x1c2f59=_0x58dd94[_0x2ce077(0x30a)]('~tokens',_0xfe2ae2);if(_0x1c2f59)_0x56a256=_0xfe2ae2,_0x27308b=_0x1c2f59;else{const _0x3cdde3=[];for(const {key:_0x2f4341,value:_0x3e0045}of _0x58dd94[_0x2ce077(0x2cb)]('~tokens')){if(_0x2f4341[_0x2ce077(0x30f)](_0xfe2ae2))_0x3cdde3[_0x2ce077(0x4e9)]({'key':_0x2f4341,'value':_0x3e0045});}_0x3cdde3[_0x2ce077(0x5b9)]===0x0&&(console[_0x2ce077(0x594)](_0x2ce077(0x4eb)+_0xfe2ae2+'\x22'),process[_0x2ce077(0x370)](0x1));if(_0x3cdde3[_0x2ce077(0x5b9)]>0x1){console['error'](_0x2ce077(0x2a9)+_0xfe2ae2+_0x2ce077(0x57f)+_0x3cdde3[_0x2ce077(0x5b9)]+_0x2ce077(0x1bf));for(const _0x400074 of _0x3cdde3){console[_0x2ce077(0x594)]('\x20\x20'+_0x400074['key']+_0x2ce077(0x427)+(_0x400074['value'][_0x2ce077(0x21d)]||_0x2ce077(0x59e))+')');}process[_0x2ce077(0x370)](0x1);}_0x56a256=_0x3cdde3[0x0]['key'],_0x27308b=_0x3cdde3[0x0][_0x2ce077(0x24f)];}await _0x58dd94[_0x2ce077(0x41e)](_0x2ce077(0x43c),_0x56a256),console['log'](_0x2ce077(0x288)+_0x56a256+_0x2ce077(0x427)+(_0x27308b[_0x2ce077(0x21d)]||'(unset)')+',\x20label:\x20'+(_0x27308b['label']||_0x2ce077(0x59e))+')');}finally{await _0x558ce2['close']();}}function _0x1cd3be(_0x21e363,_0x44c96e){const _0x452ed9=_0x4c2623;if(!_0x21e363['activation'])return'pending';const _0x3d4891=_0x21e363[_0x452ed9(0x5a4)];if(!_0x3d4891)return _0x452ed9(0x35d);if(_0x44c96e>_0x3d4891)return _0x452ed9(0x282);return'active';}function _0x794384(_0x1c6538){const _0x221c6b=_0x4c2623;if(!_0x1c6538||typeof _0x1c6538!==_0x221c6b(0x312))return'';const _0x318e09=Object[_0x221c6b(0x355)](_0x1c6538)['filter'](([,_0x27ad23])=>_0x27ad23)[_0x221c6b(0x41b)](([_0x3a38aa])=>_0x3a38aa);if(_0x318e09[_0x221c6b(0x5b9)]===0x0)return _0x221c6b(0x5ae);if(_0x318e09['length']<=0x3)return _0x318e09[_0x221c6b(0x4c4)]('\x20');return _0x318e09[_0x221c6b(0x306)](0x0,0x3)['join']('\x20')+('\x20+'+(_0x318e09[_0x221c6b(0x5b9)]-0x3));}async function _0x1150d3(_0x3e844e){const _0x52826b=_0x4c2623,_0x4ebd52=require$$5,_0x2ec5a5=requireOkdbLicenseCodec(),{_C:_0x27f671}=requireOkdbLicense(),_0x4dc18c=_0x4ec5c4[_0x52826b(0x408)](_0x3e844e[_0x52826b(0x55a)]),_0x522671=new _0x4ebd52(_0x4dc18c,_0xc3c7ed(_0x3e844e));await _0x522671[_0x52826b(0x51d)]();try{const _0x469099=_0x522671['_systemEnv'],_0x488930=_0x469099?.['db']?.[_0x52826b(0x30a)]?.('__writeCounter')??0x0,_0x11d39f=[..._0x522671['_envs'][_0x52826b(0x50d)]()]['filter'](_0x32095e=>!_0x32095e[_0x52826b(0x30f)]('~'))[_0x52826b(0x5b9)],_0x4da03c=_0x522671['_license']?.[_0x52826b(0x2a0)];if(_0x4da03c){const _0x102286=_0x4da03c[_0x52826b(0x39e)]===!![],_0x30cc80=_0x102286?_0x52826b(0x550):_0x522671[_0x52826b(0x3a7)][_0x52826b(0x35d)]?.['licensee']||_0x52826b(0x215);console['log'](''),console[_0x52826b(0x4ca)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x30cc80);const _0x379693=_0x4da03c['limits']||{};if(_0x379693['maxWrites']){const _0x490899=Math[_0x52826b(0x2b8)](_0x488930/_0x379693[_0x52826b(0x28c)]*0x64);console[_0x52826b(0x4ca)](_0x52826b(0x5d0)+_0x488930[_0x52826b(0x420)]()+_0x52826b(0x1b9)+_0x379693[_0x52826b(0x28c)]['toLocaleString']()+_0x52826b(0x55f)+_0x490899+'%)');}else console[_0x52826b(0x4ca)](_0x52826b(0x5d0)+_0x488930[_0x52826b(0x420)]());_0x379693[_0x52826b(0x315)]?console[_0x52826b(0x4ca)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x11d39f+_0x52826b(0x1b9)+_0x379693['envs']):console[_0x52826b(0x4ca)](_0x52826b(0x496)+_0x11d39f),_0x27f671?.[_0x52826b(0x471)]&&console[_0x52826b(0x4ca)]('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x27f671[_0x52826b(0x471)]+_0x52826b(0x18e));}if(!_0x469099||!_0x469099[_0x52826b(0x2e0)](_0x52826b(0x171))){console[_0x52826b(0x4ca)](''),console[_0x52826b(0x4ca)](_0x52826b(0x3fa)),console[_0x52826b(0x4ca)]('');return;}const _0x339949=[],_0x55857e=Date[_0x52826b(0x514)](),_0x3ba3fa=_0x522671['id'],_0x4d74a7=_0x52826b(0x5a0);for(const {key:_0x443512,value:_0x3ee9c3}of _0x469099['getRange'](_0x52826b(0x171))){const _0x25f9e7=_0x3ee9c3[_0x52826b(0x545)]?Buffer[_0x52826b(0x3f5)](_0x3ee9c3[_0x52826b(0x545)],_0x52826b(0x299)):Buffer['alloc'](0x8);let _0x273203='';try{_0x273203=_0x2ec5a5['derivePin'](_0x3ba3fa,_0x25f9e7,_0x4d74a7)[_0x52826b(0x234)];}catch{}_0x339949['push']({'id':_0x443512,'licensee':_0x3ee9c3[_0x52826b(0x448)]||'','expires':_0x3ee9c3[_0x52826b(0x5a4)]?new Date(_0x3ee9c3['expiresAt'])[_0x52826b(0x219)]()[_0x52826b(0x306)](0x0,0xa):'','features':_0x794384(_0x3ee9c3[_0x52826b(0x5b7)]),'pin':_0x273203,'status':_0x1cd3be(_0x3ee9c3,_0x55857e)});}if(_0x339949[_0x52826b(0x5b9)]===0x0){console[_0x52826b(0x4ca)](''),console[_0x52826b(0x4ca)](_0x52826b(0x3fa)),console['log']('');return;}const _0xf74ebd=['\x20\x20'+'ID'['padEnd'](0xe),_0x52826b(0x524)[_0x52826b(0x4fe)](0xe),_0x52826b(0x3f1)[_0x52826b(0x4fe)](0xc),_0x52826b(0x321)[_0x52826b(0x4fe)](0x1e),_0x52826b(0x2d4)['padEnd'](0xa),'STATUS'][_0x52826b(0x4c4)]('\x20');console[_0x52826b(0x4ca)]('\x0a'+_0xf74ebd);for(const _0x29a0fe of _0x339949){const _0x2c56ea=_0x29a0fe['id'][_0x52826b(0x306)](0x0,0x8)+'\u2026';console[_0x52826b(0x4ca)](['\x20\x20'+_0x2c56ea[_0x52826b(0x4fe)](0xe),_0x29a0fe[_0x52826b(0x448)][_0x52826b(0x306)](0x0,0xe)[_0x52826b(0x4fe)](0xe),_0x29a0fe['expires'][_0x52826b(0x4fe)](0xc),_0x29a0fe[_0x52826b(0x5b7)][_0x52826b(0x306)](0x0,0x1e)[_0x52826b(0x4fe)](0x1e),_0x29a0fe[_0x52826b(0x234)][_0x52826b(0x4fe)](0xa),_0x29a0fe['status']]['join']('\x20'));}console[_0x52826b(0x4ca)]('');}finally{await _0x522671[_0x52826b(0x62d)]();}}async function _0xcd0b42(_0x23e02f,_0x1f5956){const _0x5550b9=_0x4c2623,_0x57986b=require$$5,_0x5633ea=requireOkdbLicenseCodec();let _0x271128=_0x23e02f;(_0x5633ea[_0x5550b9(0x45f)](_0x23e02f)==='path'||_0x360f50[_0x5550b9(0x39c)](_0x23e02f)&&_0x360f50[_0x5550b9(0x4b2)](_0x23e02f)[_0x5550b9(0x20d)]())&&(_0x271128=_0x360f50[_0x5550b9(0x56c)](_0x23e02f,_0x5550b9(0x5fd))[_0x5550b9(0x258)]());const _0x1bdc9c=_0x4ec5c4['resolve'](_0x1f5956[_0x5550b9(0x55a)]),_0x588222=new _0x57986b(_0x1bdc9c,_0xc3c7ed(_0x1f5956));await _0x588222[_0x5550b9(0x51d)]();try{!_0x588222['_license']&&(console['error'](_0x5550b9(0x1df)),process[_0x5550b9(0x370)](0x1));let _0x34c5d0;try{_0x34c5d0=await _0x588222['_license'][_0x5550b9(0x367)](_0x271128);}catch(_0x38242b){console[_0x5550b9(0x594)](_0x5550b9(0x3de)+_0x38242b['message']),process['exit'](0x1);}const _0x2c4d7e=_0x588222[_0x5550b9(0x3a7)][_0x5550b9(0x452)](),_0x9722c0=_0x2c4d7e[_0x5550b9(0x3a3)](_0x579ebc=>_0x579ebc[_0x5550b9(0x266)]===_0x34c5d0['id'])?.[_0x5550b9(0x234)]||'',_0xdfef95=Object[_0x5550b9(0x355)](_0x34c5d0[_0x5550b9(0x5b7)]||{})[_0x5550b9(0x5a3)](([,_0x227777])=>_0x227777)[_0x5550b9(0x41b)](([_0x398317])=>_0x398317),_0x4844=_0x34c5d0[_0x5550b9(0x3fb)]||{},_0x1be3ce=[_0x4844[_0x5550b9(0x315)]?'envs='+_0x4844[_0x5550b9(0x315)]:null,_0x4844[_0x5550b9(0x2fd)]?_0x5550b9(0x5d3)+_0x4844['typesPerEnv']:null,_0x4844[_0x5550b9(0x303)]?'peers='+_0x4844['syncPeers']:null,_0x4844[_0x5550b9(0x28c)]?_0x5550b9(0x5c4)+_0x4844[_0x5550b9(0x28c)]['toLocaleString']():null]['filter'](Boolean)['join']('\x20\x20'),_0x2a0d02=_0x34c5d0['licenseType']===_0x5633ea[_0x5550b9(0x59f)];console[_0x5550b9(0x4ca)](_0x5550b9(0x489)),console[_0x5550b9(0x4ca)](_0x5550b9(0x4f9)+_0x34c5d0['id']),console[_0x5550b9(0x4ca)](_0x5550b9(0x585)+_0x34c5d0[_0x5550b9(0x448)]),console[_0x5550b9(0x4ca)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x34c5d0['expiresAt'])['toISOString']()[_0x5550b9(0x306)](0x0,0xa)),console['log'](_0x5550b9(0x3d3)+(_0xdfef95['join'](',\x20')||_0x5550b9(0x5ae)));if(_0x1be3ce)console[_0x5550b9(0x4ca)]('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x1be3ce);_0x2a0d02?(console[_0x5550b9(0x4ca)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x5550b9(0x4ca)]('')):(console[_0x5550b9(0x4ca)](_0x5550b9(0x227)+_0x9722c0),console[_0x5550b9(0x4ca)](_0x5550b9(0x37c)),console['log'](''),console[_0x5550b9(0x4ca)](_0x5550b9(0x52b)),console['log'](_0x5550b9(0x252)+_0x9722c0+_0x5550b9(0x45b)),console[_0x5550b9(0x4ca)](_0x5550b9(0x1cd)),console['log'](_0x5550b9(0x480)),console[_0x5550b9(0x4ca)](''));}finally{await _0x588222[_0x5550b9(0x62d)]();}}async function _0x17e9f5(_0x49b547,_0x456a83){const _0x3e6e8b=_0x4c2623,_0xa1ee66=require$$5,_0x30e934=_0x4ec5c4[_0x3e6e8b(0x408)](_0x456a83[_0x3e6e8b(0x55a)]),_0xe9bdb2=new _0xa1ee66(_0x30e934,_0xc3c7ed(_0x456a83));await _0xe9bdb2['open']();try{!_0xe9bdb2[_0x3e6e8b(0x3a7)]&&(console['error']('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x3e6e8b(0x370)](0x1));let _0x1472d5;try{_0x1472d5=await _0xe9bdb2[_0x3e6e8b(0x3a7)][_0x3e6e8b(0x63a)](_0x49b547[_0x3e6e8b(0x258)]());}catch(_0x1d165c){console[_0x3e6e8b(0x594)](_0x3e6e8b(0x3de)+_0x1d165c[_0x3e6e8b(0x25c)]),console['error'](''),console['error'](_0x3e6e8b(0x27a)),console[_0x3e6e8b(0x594)](_0x3e6e8b(0x30c)),console[_0x3e6e8b(0x594)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x3e6e8b(0x594)](_0x3e6e8b(0x5a9)),console[_0x3e6e8b(0x594)](''),process[_0x3e6e8b(0x370)](0x1);}console[_0x3e6e8b(0x4ca)](_0x3e6e8b(0x4e2)),console[_0x3e6e8b(0x4ca)](_0x3e6e8b(0x4f9)+_0x1472d5['id']),console[_0x3e6e8b(0x4ca)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x1472d5[_0x3e6e8b(0x448)]),console[_0x3e6e8b(0x4ca)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x1472d5[_0x3e6e8b(0x5a4)])[_0x3e6e8b(0x219)]()['slice'](0x0,0xa)),console[_0x3e6e8b(0x4ca)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x3e6e8b(0x4ca)]('');}finally{await _0xe9bdb2[_0x3e6e8b(0x62d)]();}}async function _0x29329f(_0x56a97f,_0x27cafb){const _0x2ed314=_0x4c2623;!_0x56a97f&&(console[_0x2ed314(0x594)](_0x2ed314(0x1e7)),process[_0x2ed314(0x370)](0x1));const _0x256122=require$$5,_0x309849=requireOkdbLicenseCodec(),_0x92b60b=_0x4ec5c4[_0x2ed314(0x408)](_0x27cafb[_0x2ed314(0x55a)]),_0x3dfbda=new _0x256122(_0x92b60b,_0xc3c7ed(_0x27cafb));await _0x3dfbda[_0x2ed314(0x51d)]();try{const _0x12eeb4=_0x3dfbda['_systemEnv'];(!_0x12eeb4||!_0x12eeb4['hasType'](_0x2ed314(0x171)))&&(console[_0x2ed314(0x594)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x56a97f+'\x22'),process[_0x2ed314(0x370)](0x1));let _0x19314c=null,_0x3389c1=null;const _0x5d63f4=_0x12eeb4[_0x2ed314(0x30a)](_0x2ed314(0x171),_0x56a97f);if(_0x5d63f4)_0x19314c=_0x56a97f,_0x3389c1=_0x5d63f4;else{const _0x54e85c=[];for(const {key:_0x5e965a,value:_0x229b52}of _0x12eeb4[_0x2ed314(0x2cb)](_0x2ed314(0x171))){if(_0x5e965a[_0x2ed314(0x30f)](_0x56a97f))_0x54e85c[_0x2ed314(0x4e9)]({'key':_0x5e965a,'value':_0x229b52});}_0x54e85c[_0x2ed314(0x5b9)]===0x0&&(console[_0x2ed314(0x594)](_0x2ed314(0x622)+_0x56a97f+'\x22'),process['exit'](0x1)),_0x54e85c[_0x2ed314(0x5b9)]>0x1&&(console[_0x2ed314(0x594)](_0x2ed314(0x2a9)+_0x56a97f+_0x2ed314(0x57f)+_0x54e85c[_0x2ed314(0x5b9)]+_0x2ed314(0x33d)),process[_0x2ed314(0x370)](0x1)),_0x19314c=_0x54e85c[0x0][_0x2ed314(0x5a6)],_0x3389c1=_0x54e85c[0x0][_0x2ed314(0x24f)];}const _0xaf7228=Date['now'](),_0x31e9ad=_0x1cd3be(_0x3389c1,_0xaf7228),_0x3cd843=_0x3dfbda['id'],_0x315fef=_0x2ed314(0x5a0);let _0x29e8d1='';try{const _0x486e9a=Buffer['from'](_0x3389c1[_0x2ed314(0x545)],_0x2ed314(0x299));_0x29e8d1=_0x309849[_0x2ed314(0x3d1)](_0x3cd843,_0x486e9a,_0x315fef)[_0x2ed314(0x234)];}catch{}const _0xa7d0a9=_0x3389c1[_0x2ed314(0x5b7)]?Object['entries'](_0x3389c1[_0x2ed314(0x5b7)])['filter'](([,_0x3fae68])=>_0x3fae68)[_0x2ed314(0x41b)](([_0x189c90])=>_0x189c90):[],_0x133488=_0x3389c1[_0x2ed314(0x3fb)]||{},_0x3cc9bc=_0x12eeb4?.['db']?.[_0x2ed314(0x30a)]?.('__writeCounter')??0x0,_0x4e0021=[..._0x3dfbda[_0x2ed314(0x28e)]['keys']()][_0x2ed314(0x5a3)](_0x2867b1=>!_0x2867b1[_0x2ed314(0x30f)]('~'))[_0x2ed314(0x5b9)];console[_0x2ed314(0x4ca)]('\x0a\x20\x20License\x20details:'),console[_0x2ed314(0x4ca)](_0x2ed314(0x4f9)+_0x19314c),console[_0x2ed314(0x4ca)](_0x2ed314(0x585)+(_0x3389c1[_0x2ed314(0x448)]||'')),console[_0x2ed314(0x4ca)](_0x2ed314(0x41d)+(_0x3389c1[_0x2ed314(0x5a4)]?new Date(_0x3389c1[_0x2ed314(0x5a4)])['toISOString']()[_0x2ed314(0x306)](0x0,0xa):'')),console[_0x2ed314(0x4ca)](_0x2ed314(0x3d3)+(_0xa7d0a9[_0x2ed314(0x4c4)](',\x20')||_0x2ed314(0x5ae))),console[_0x2ed314(0x4ca)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x29e8d1),console[_0x2ed314(0x4ca)](_0x2ed314(0x4d3)+_0x31e9ad),console[_0x2ed314(0x4ca)](_0x2ed314(0x2c8)+new Date(_0x3389c1['addedAt'])[_0x2ed314(0x219)]());if(_0x31e9ad==='active'){console[_0x2ed314(0x4ca)](''),console[_0x2ed314(0x4ca)](_0x2ed314(0x206));if(_0x133488[_0x2ed314(0x28c)]){const _0x1fa790=Math[_0x2ed314(0x2b8)](_0x3cc9bc/_0x133488['maxWrites']*0x64);console[_0x2ed314(0x4ca)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x3cc9bc[_0x2ed314(0x420)]()+_0x2ed314(0x1b9)+_0x133488[_0x2ed314(0x28c)][_0x2ed314(0x420)]()+_0x2ed314(0x55f)+_0x1fa790+'%)');}else console[_0x2ed314(0x4ca)](_0x2ed314(0x54a)+_0x3cc9bc[_0x2ed314(0x420)]()+_0x2ed314(0x34d));_0x133488[_0x2ed314(0x315)]?console[_0x2ed314(0x4ca)](_0x2ed314(0x17a)+_0x4e0021+'\x20/\x20'+_0x133488['envs']):console[_0x2ed314(0x4ca)](_0x2ed314(0x17a)+_0x4e0021+_0x2ed314(0x34d));}console[_0x2ed314(0x4ca)]('');}finally{await _0x3dfbda[_0x2ed314(0x62d)]();}}async function _0x5b4171(_0x2e5728,_0x2f64ec){const _0x14d2e2=_0x4c2623;!_0x2e5728&&(console[_0x14d2e2(0x594)](_0x14d2e2(0x498)),process['exit'](0x1));const _0x45bc4e=require$$5,_0x46c956=_0x4ec5c4[_0x14d2e2(0x408)](_0x2f64ec[_0x14d2e2(0x55a)]),_0x42e662=new _0x45bc4e(_0x46c956,_0xc3c7ed(_0x2f64ec));await _0x42e662[_0x14d2e2(0x51d)]();try{const _0x6a7ce5=_0x42e662['_systemEnv'];(!_0x6a7ce5||!_0x6a7ce5[_0x14d2e2(0x2e0)](_0x14d2e2(0x171)))&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x2e5728+'\x22'),process[_0x14d2e2(0x370)](0x1));let _0x285861=null,_0x477ef0=null;const _0xbf469f=_0x6a7ce5[_0x14d2e2(0x30a)](_0x14d2e2(0x171),_0x2e5728);if(_0xbf469f)_0x285861=_0x2e5728,_0x477ef0=_0xbf469f;else{const _0x226176=[];for(const {key:_0x2c39e3,value:_0x2403de}of _0x6a7ce5[_0x14d2e2(0x2cb)]('~licenses')){if(_0x2c39e3[_0x14d2e2(0x30f)](_0x2e5728))_0x226176[_0x14d2e2(0x4e9)]({'key':_0x2c39e3,'value':_0x2403de});}_0x226176[_0x14d2e2(0x5b9)]===0x0&&(console[_0x14d2e2(0x594)](_0x14d2e2(0x622)+_0x2e5728+'\x22'),process[_0x14d2e2(0x370)](0x1)),_0x226176['length']>0x1&&(console[_0x14d2e2(0x594)](_0x14d2e2(0x2a9)+_0x2e5728+_0x14d2e2(0x57f)+_0x226176[_0x14d2e2(0x5b9)]+_0x14d2e2(0x33d)),process[_0x14d2e2(0x370)](0x1)),_0x285861=_0x226176[0x0][_0x14d2e2(0x5a6)],_0x477ef0=_0x226176[0x0][_0x14d2e2(0x24f)];}await _0x6a7ce5[_0x14d2e2(0x41e)](_0x14d2e2(0x171),_0x285861),console['log'](_0x14d2e2(0x1d8)+_0x285861+_0x14d2e2(0x5af)+(_0x477ef0['licensee']||_0x14d2e2(0x59e))+')');}finally{await _0x42e662[_0x14d2e2(0x62d)]();}}async function _0x1e4845(_0xa441b5,_0x27baaa,_0x460275){const _0x8d0ef1=_0x4c2623;!_0xa441b5&&(console[_0x8d0ef1(0x594)]('[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>'),process[_0x8d0ef1(0x370)](0x1));!_0x460275[_0x8d0ef1(0x3a9)]&&!(_0x460275[_0x8d0ef1(0x4b6)]&&_0x460275[_0x8d0ef1(0x1a5)])&&(console[_0x8d0ef1(0x594)](_0x8d0ef1(0x54b)),process[_0x8d0ef1(0x370)](0x1));const _0x5216b7=_0x460275[_0x8d0ef1(0x48e)]||_0x27baaa[_0x8d0ef1(0x478)]?.[_0x8d0ef1(0x4c8)];!_0x5216b7&&(console[_0x8d0ef1(0x594)](_0x8d0ef1(0x2d3)+'\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a'+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process['exit'](0x1));const _0x268631=require$$5,_0x5e753a=new _0x268631(_0x27baaa[_0x8d0ef1(0x55a)],{'sync':{'address':_0x5216b7,'auto_reconcile':![]}});await _0x5e753a[_0x8d0ef1(0x51d)]();try{const _0x2125de=_0x5e753a[_0x8d0ef1(0x4d0)];if(_0x2125de&&_0x2125de[_0x8d0ef1(0x2e0)]('~tokens')){let _0x5f275d=![];for(const _0x5c993b of _0x2125de[_0x8d0ef1(0x2cb)]('~tokens')){_0x5f275d=!![];break;}_0x5f275d&&console[_0x8d0ef1(0x4ca)](_0x8d0ef1(0x250)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console[_0x8d0ef1(0x4ca)]('\x0a\x20\x20Joining\x20cluster\x20at\x20'+_0xa441b5+'…'),await _0x5e753a['sync'][_0x8d0ef1(0x4c4)](_0xa441b5[_0x8d0ef1(0x3a1)](/\/+$/,''),{'token':_0x460275[_0x8d0ef1(0x3a9)],'username':_0x460275[_0x8d0ef1(0x4b6)],'password':_0x460275[_0x8d0ef1(0x1a5)]}),console['log'](_0x8d0ef1(0x49d)),console['log'](_0x8d0ef1(0x43d));}finally{await _0x5e753a['close']();}}async function _0x386502(){const _0xb44658=_0x4c2623,_0x1b3cda=Date[_0xb44658(0x514)](),_0x291b7c=_0x32499d(process[_0xb44658(0x376)]),_0x56cf87=_0xc26352(_0x291b7c),_0x683401=_0x4ec5c4[_0xb44658(0x408)](_0x56cf87['dbPath']);!_0x56cf87[_0xb44658(0x500)]&&!process[_0xb44658(0x589)][_0xb44658(0x24e)]&&(_0x56cf87['noRepl']=!![]);const _0x29e728=require$$5,{start:_0x5aa5e1,colorLog:_0x413c64}=requireOkdbShell(),_0x3e5889=require$$1$2,_0x1eca17={..._0x56cf87[_0xb44658(0x5a6)]?{'encryptionKey':_0x56cf87['key']}:{},..._0x56cf87[_0xb44658(0x243)]?{'admin':![]}:_0xca2787(_0x56cf87['admin'])?{'admin':_0x56cf87[_0xb44658(0x22e)]}:{},..._0xca2787(_0x56cf87['api'])?{'api':_0x56cf87[_0xb44658(0x1e1)]}:{},..._0xca2787(_0x56cf87['auth'])?{'auth':_0x56cf87[_0xb44658(0x473)]}:{},..._0xca2787(_0x56cf87[_0xb44658(0x364)])?{'mcp':_0x56cf87['mcp']}:{},..._0x56cf87['timeMachine']!==![]?{'timeMachine':_0x56cf87[_0xb44658(0x2a8)]}:{}},_0x3fd435=_0x5739c3(_0x56cf87);if(!_0x3e5889[_0xb44658(0x4fc)]){const _0x2f0d91=_0x49fb21(),_0x305d91=_0x56cf87[_0xb44658(0x310)]?'--no-cluster':_0x56cf87[_0xb44658(0x4bd)]!=null&&_0x56cf87['workersFlag']!==''?_0xb44658(0x5c3):process.env.OKDB_HTTP_WORKERS?_0xb44658(0x5bb):_0x56cf87[_0xb44658(0x349)]?.[_0xb44658(0x5f5)]!=null?_0xb44658(0x424):_0xb44658(0x37e)+Math['max'](0x1,require$$0[_0xb44658(0x40b)]()['length']-0x1);process[_0xb44658(0x307)]['write']('[okdb]\x20http\x20workers:\x20'+_0x3fd435+'\x20('+_0x305d91+(!_0x2f0d91?_0xb44658(0x543):'')+')\x0a');}if(_0x3e5889[_0xb44658(0x4fc)]){const _0x4c8806={..._0x1eca17},_0x639097=new _0x29e728(_0x683401,_0x4c8806);_0x639097[_0xb44658(0x4ca)]['detachConsole']?.();const _0x1d6596=process.env.OKDB_CLUSTER_SLOT??'?',_0xb0a30d={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3e0b78=_0xb0a30d[_0x56cf87[_0xb44658(0x2a4)]]??_0xb0a30d[_0xb44658(0x3c6)];_0x639097[_0xb44658(0x4ca)]['attach'](_0x3c4a48=>{const _0x1a33f7=_0xb44658;if((_0xb0a30d[_0x3c4a48['level']]??0x1)<_0x3e0b78)return;try{process[_0x1a33f7(0x4e1)]?.({'__okdbCluster':_0x1a33f7(0x4ca),'slot':_0x1d6596,'pid':process['pid'],'entry':_0x3c4a48});}catch{}}),await _0x639097[_0xb44658(0x51d)]();const {attachWorkerCluster:_0x22a54b}=requireOkdbCluster();_0x22a54b(_0x639097),await _0x134a4e(_0x639097,_0x56cf87[_0xb44658(0x5e1)]);return;}if(_0x3fd435>0x1){const {runClustered:_0x548aad}=requireOkdbCluster(),_0x523190=new _0x29e728(_0x683401,{..._0x1eca17,'engines':![],'processors':![],'compaction':![]});await _0x523190[_0xb44658(0x51d)]();const _0x26ef2d=async()=>{const _0x28fb98=_0xb44658,_0x58a7af=new _0x29e728(_0x683401,{..._0x1eca17});return await _0x58a7af[_0x28fb98(0x51d)](),_0x58a7af;},_0x430f52=_0x548aad({'workers':_0x3fd435,'makeOkdb':_0x26ef2d,'port':_0x56cf87[_0xb44658(0x5e1)],'primaryOkdb':_0x523190});let _0x51b8b0=![];async function _0x5cb110(_0x16ec9b){const _0x5c7699=_0xb44658;_0x51b8b0&&(process[_0x5c7699(0x193)]['write']('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x5c7699(0x370)](0x82));_0x51b8b0=!![],process[_0x5c7699(0x193)][_0x5c7699(0x557)]('\x0a[okdb]\x20received\x20'+(_0x16ec9b||_0x5c7699(0x544))+_0x5c7699(0x411));const _0x5242d3=setTimeout(()=>{const _0x5ae72a=_0x5c7699;process[_0x5ae72a(0x193)][_0x5ae72a(0x557)](_0x5ae72a(0x49c)),process['exit'](0x0);},0xbb8);_0x5242d3[_0x5c7699(0x2bd)]?.();try{await _0x430f52['close']();}catch(_0x48c4fa){process['stderr']['write']('[okdb]\x20cluster\x20close\x20error:\x20'+(_0x48c4fa?.[_0x5c7699(0x25c)]??_0x48c4fa)+'\x0a');}try{await _0x523190[_0x5c7699(0x62d)]();}catch(_0x5d56d7){process[_0x5c7699(0x193)][_0x5c7699(0x557)]('[okdb]\x20primary\x20okdb\x20close\x20error:\x20'+(_0x5d56d7?.[_0x5c7699(0x25c)]??_0x5d56d7)+'\x0a');}process[_0x5c7699(0x370)](0x0);}_0x56cf87[_0xb44658(0x5a5)]=_0x3fd435;if(!_0x56cf87['noRepl']){_0x523190[_0xb44658(0x4ca)]['detachConsole']?.(),_0x297569(_0x523190[_0xb44658(0x473)]?.['getSecurityNotices']?.()??[]),await _0x5aa5e1(_0x523190,_0x56cf87);return;}process[_0xb44658(0x307)][_0xb44658(0x557)](_0xb44658(0x509)+process[_0xb44658(0x59c)]+_0xb44658(0x188)+_0x3fd435+'\x20'+(_0xb44658(0x3d7)+_0x56cf87[_0xb44658(0x5e1)]+'\x0a')),console[_0xb44658(0x4ca)](''),console['log'](_0xb44658(0x647)),console[_0xb44658(0x4ca)](_0xb44658(0x340)+_0x56cf87[_0xb44658(0x5e1)]+_0xb44658(0x55f)+_0x3fd435+_0xb44658(0x175)),console[_0xb44658(0x4ca)](_0xb44658(0x388)+_0x683401),console['log'](_0xb44658(0x356)+_0x523190['id']),console['log'](_0xb44658(0x640)+_0x56cf87['port']+_0xb44658(0x4c3));!_0x56cf87[_0xb44658(0x243)]&&console[_0xb44658(0x4ca)](_0xb44658(0x39b)+_0x56cf87[_0xb44658(0x5e1)]+_0xb44658(0x1ed));console['log'](''),_0x297569(_0x523190[_0xb44658(0x473)]?.[_0xb44658(0x316)]?.()??[]),process['on']('SIGINT',()=>_0x5cb110(_0xb44658(0x300))),process['on'](_0xb44658(0x3dd),()=>_0x5cb110(_0xb44658(0x3dd))),process['on']('SIGBREAK',()=>_0x5cb110('SIGBREAK'));return;}const _0x2b5c9f=new _0x29e728(_0x683401,_0x1eca17);_0x2b5c9f[_0xb44658(0x4ca)][_0xb44658(0x4c2)]?.();const _0x49a4fe=_0x2b5c9f['log']['attach'](_0x3eff04=>_0x413c64(_0x3eff04,_0x56cf87[_0xb44658(0x2a4)]));if(_0x56cf87[_0xb44658(0x500)])process[_0xb44658(0x307)]['write'](_0xb44658(0x4b3));await _0x2b5c9f['open']();if(_0x56cf87[_0xb44658(0x500)])process[_0xb44658(0x307)][_0xb44658(0x557)](_0xb44658(0x4e4));try{await _0x134a4e(_0x2b5c9f,_0x56cf87[_0xb44658(0x5e1)]);}catch(_0xa6651d){_0xa6651d['code']==='EADDRINUSE'&&(console[_0xb44658(0x594)](_0xb44658(0x508)+_0x56cf87[_0xb44658(0x5e1)]+_0xb44658(0x502)),process['exit'](0x1));throw _0xa6651d;}if(_0x56cf87['noRepl'])process['stdout'][_0xb44658(0x557)](_0xb44658(0x488)+_0x56cf87[_0xb44658(0x5e1)]+'\x0a');if(!_0x56cf87[_0xb44658(0x500)])_0x2b5c9f[_0xb44658(0x4ca)][_0xb44658(0x4c2)]?.(),_0x49a4fe?.(),_0x297569(_0x2b5c9f['auth']?.[_0xb44658(0x316)]?.()??[]),await _0x5aa5e1(_0x2b5c9f,_0x56cf87);else{const _0x166205=_0x4ec5c4[_0xb44658(0x4c4)](_0x683401,_0xb44658(0x20b));try{_0x360f50[_0xb44658(0x51a)](_0x166205,String(process[_0xb44658(0x59c)]));}catch{}const _0x45b5e5=Date[_0xb44658(0x514)]()-_0x1b3cda;console[_0xb44658(0x4ca)](''),console[_0xb44658(0x4ca)]('\x20\x20✓\x20OKDB\x20server\x20running'),console[_0xb44658(0x4ca)](_0xb44658(0x22b)+_0x56cf87[_0xb44658(0x5e1)]),console[_0xb44658(0x4ca)](_0xb44658(0x268)+_0x683401),console[_0xb44658(0x4ca)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x2b5c9f['id']);{const _0x21467f=_0x2b5c9f[_0xb44658(0x4d0)]?.['db']?.['get']?.(_0xb44658(0x2e9))??0x0,_0x52d858=[..._0x2b5c9f[_0xb44658(0x28e)]['keys']()][_0xb44658(0x5a3)](_0x118355=>!_0x118355[_0xb44658(0x30f)]('~'))[_0xb44658(0x5b9)];if(_0x2b5c9f[_0xb44658(0x3a7)]?.[_0xb44658(0x35d)]?.[_0xb44658(0x504)]===0x1){const _0x5286a9=Math[_0xb44658(0x483)]((_0x2b5c9f[_0xb44658(0x3a7)][_0xb44658(0x35d)][_0xb44658(0x5a4)]-Date[_0xb44658(0x514)]())/0x5265c00);console[_0xb44658(0x4ca)](_0xb44658(0x3f8)+_0x2b5c9f['_license'][_0xb44658(0x35d)][_0xb44658(0x448)]+_0xb44658(0x229)+_0x5286a9+_0xb44658(0x29a));}else{if(_0x2b5c9f[_0xb44658(0x3a7)]?.[_0xb44658(0x35d)]){const _0x4838d8=_0x2b5c9f[_0xb44658(0x3a7)]['active'];console[_0xb44658(0x4ca)](_0xb44658(0x20e)+_0x4838d8[_0xb44658(0x448)]+_0xb44658(0x5e3)+new Date(_0x4838d8[_0xb44658(0x5a4)])[_0xb44658(0x219)]()['slice'](0x0,0xa)+')');const _0x39482d=_0x4838d8[_0xb44658(0x3fb)]||{};if(_0x39482d[_0xb44658(0x28c)]){const _0x13ef77=Math['round'](_0x21467f/_0x39482d[_0xb44658(0x28c)]*0x64);console[_0xb44658(0x4ca)](_0xb44658(0x2ae)+_0x21467f[_0xb44658(0x420)]()+'\x20/\x20'+_0x39482d['maxWrites'][_0xb44658(0x420)]()+_0xb44658(0x562)+_0x13ef77+_0xb44658(0x1cf)+_0x52d858+(_0x39482d['envs']?'/'+_0x39482d[_0xb44658(0x315)]:'')+_0xb44658(0x2ed)+(_0x52d858===0x1?'':'s'));}}else{if(_0x2b5c9f[_0xb44658(0x3a7)]){const _0x10c90c=_0x2b5c9f[_0xb44658(0x3a7)][_0xb44658(0x452)](),_0x264d9e=_0x10c90c[_0xb44658(0x5b9)]?_0x10c90c[_0xb44658(0x41b)](_0x26ee21=>_0x26ee21[_0xb44658(0x234)])[_0xb44658(0x4c4)](',\x20'):'(add\x20a\x20license\x20first)',_0x8652cb=_0x2b5c9f[_0xb44658(0x3a7)][_0xb44658(0x2a0)],_0x326583=_0x8652cb[_0xb44658(0x3fb)][_0xb44658(0x28c)]?Math[_0xb44658(0x2b8)](_0x21467f/_0x8652cb[_0xb44658(0x3fb)]['maxWrites']*0x64):0x0;console['log'](_0xb44658(0x317)),console[_0xb44658(0x4ca)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x21467f[_0xb44658(0x420)]()+'\x20/\x20'+_0x8652cb[_0xb44658(0x3fb)][_0xb44658(0x28c)][_0xb44658(0x420)]()+_0xb44658(0x562)+_0x326583+_0xb44658(0x1cf)+_0x52d858+_0xb44658(0x1b9)+_0x8652cb[_0xb44658(0x3fb)][_0xb44658(0x315)]+'\x20envs'),console[_0xb44658(0x4ca)](_0xb44658(0x4f3)+_0x264d9e);}}}}console[_0xb44658(0x4ca)](_0xb44658(0x49a)+_0x56cf87[_0xb44658(0x5e1)]+_0xb44658(0x4c3));!_0x56cf87[_0xb44658(0x243)]&&console['log'](_0xb44658(0x618)+_0x56cf87[_0xb44658(0x5e1)]+'/admin/index.html');console[_0xb44658(0x4ca)](''),console[_0xb44658(0x4ca)](_0xb44658(0x320)+_0x45b5e5+'ms'),_0x297569(_0x2b5c9f[_0xb44658(0x473)]?.[_0xb44658(0x316)]?.()??[]);let _0x39ebfb=![];async function _0xa2b63d(_0x4c49a9){const _0x2e051f=_0xb44658;_0x39ebfb&&(process[_0x2e051f(0x193)]['write'](_0x2e051f(0x1ea)),process[_0x2e051f(0x370)](0x82));_0x39ebfb=!![],process['stderr'][_0x2e051f(0x557)]('\x0a[okdb]\x20received\x20'+(_0x4c49a9||_0x2e051f(0x544))+_0x2e051f(0x3d0));const _0x3077b2=setTimeout(()=>{const _0x362ba5=_0x2e051f;process[_0x362ba5(0x193)]['write']('[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a'),process[_0x362ba5(0x370)](0x1);},0x1388);try{_0x360f50['unlinkSync'](_0x166205);}catch{}try{await _0x2b5c9f[_0x2e051f(0x62d)]();}catch(_0x2ed2d7){process[_0x2e051f(0x193)][_0x2e051f(0x557)](_0x2e051f(0x57c)+(_0x2ed2d7?.['message']??_0x2ed2d7)+'\x0a');}clearTimeout(_0x3077b2),process[_0x2e051f(0x193)][_0x2e051f(0x557)]('[okdb]\x20closed\x20cleanly\x0a'),process[_0x2e051f(0x370)](0x0);}process['on'](_0xb44658(0x300),()=>_0xa2b63d(_0xb44658(0x300))),process['on']('SIGTERM',()=>_0xa2b63d('SIGTERM')),process['on'](_0xb44658(0x5f9),()=>_0xa2b63d(_0xb44658(0x5f9)));}}const _0x25566f=new Set([_0x4c2623(0x605),'doctor',_0x4c2623(0x394),_0x4c2623(0x23c),_0x4c2623(0x601),_0x4c2623(0x1f3),_0x4c2623(0x5d6),_0x4c2623(0x3a9),_0x4c2623(0x4c4),'license']),_0x9af3f8=process[_0x4c2623(0x376)][0x2];if(_0x9af3f8===_0x4c2623(0x605))console[_0x4c2623(0x4ca)](require$$3[_0x4c2623(0x605)]),process[_0x4c2623(0x370)](0x0);else{if(_0x9af3f8&&_0x25566f['has'](_0x9af3f8)){const _0x3625a4=process[_0x4c2623(0x376)][_0x4c2623(0x306)](0x3),_0x588ea8=_0x32499d([_0x4c2623(0x38a),'okdb',..._0x3625a4]),_0xe0183d=_0xc26352(_0x588ea8),_0x49a8ec=new Set([_0x4c2623(0x415),'-d',_0x4c2623(0x465),'-k',_0x4c2623(0x19c),'-c',_0x4c2623(0x192),'-p',_0x4c2623(0x1b5),_0x4c2623(0x23b),'-e',_0x4c2623(0x42a),'--name',_0x4c2623(0x5b3),_0x4c2623(0x2cc),_0x4c2623(0x34e),_0x4c2623(0x231),_0x4c2623(0x309),_0x4c2623(0x4d6),_0x4c2623(0x1fc),'-u',_0x4c2623(0x222)]);let _0x1a5a3e=null;for(let _0x3c1cee=0x0;_0x3c1cee<_0x3625a4['length'];_0x3c1cee++){if(_0x49a8ec['has'](_0x3625a4[_0x3c1cee])){_0x3c1cee++;continue;}if(!_0x3625a4[_0x3c1cee][_0x4c2623(0x30f)]('-')){_0x1a5a3e=_0x3625a4[_0x3c1cee];break;}}(async()=>{const _0x2412f1=_0x4c2623;if(_0x9af3f8===_0x2412f1(0x3a9)){const _0x1091d2=process[_0x2412f1(0x376)][0x3],_0x853ca7=process[_0x2412f1(0x376)][_0x2412f1(0x306)](0x4),_0x8fe5d=_0x32499d([_0x2412f1(0x38a),_0x2412f1(0x2c2),..._0x853ca7]),_0x1d7be6=_0xc26352(_0x8fe5d),_0x234893=new Set(['--path','-d',_0x2412f1(0x465),'-k','--config','-c',_0x2412f1(0x192),'-p',_0x2412f1(0x190),_0x2412f1(0x5b3),_0x2412f1(0x2cc),'--permissions',_0x2412f1(0x231),_0x2412f1(0x309),_0x2412f1(0x1b5),_0x2412f1(0x23b),'-e',_0x2412f1(0x42a)]),_0x3f058d=[];for(let _0x218401=0x0;_0x218401<_0x853ca7['length'];_0x218401++){if(_0x234893[_0x2412f1(0x5a7)](_0x853ca7[_0x218401])){_0x218401++;continue;}if(_0x853ca7[_0x218401][_0x2412f1(0x30f)]('-'))continue;_0x3f058d['push'](_0x853ca7[_0x218401]);}switch(_0x1091d2){case _0x2412f1(0x384):await _0x17eeb6(_0x1d7be6,_0x8fe5d);break;case _0x2412f1(0x44f):await _0x18a4fa(_0x1d7be6);break;case _0x2412f1(0x4c1):await _0x4bf0c2(_0x3f058d[0x0],_0x1d7be6);break;default:console['error'](_0x2412f1(0x597)+_0x1091d2+_0x2412f1(0x294)),process[_0x2412f1(0x370)](0x1);}return;}if(_0x9af3f8===_0x2412f1(0x614)){const _0x1f4b1b=requireOkdbLicenseCodec(),_0x4049e9=process[_0x2412f1(0x376)][_0x2412f1(0x306)](0x3),_0x260253=_0x32499d([_0x2412f1(0x38a),'okdb',..._0x4049e9]),_0x3c0196=_0xc26352(_0x260253),_0x3414fd=new Set([_0x2412f1(0x415),'-d','--key','-k','--config','-c',_0x2412f1(0x192),'-p','--log-level']),_0x39aeca=[];for(let _0x2a2493=0x0;_0x2a2493<_0x4049e9['length'];_0x2a2493++){if(_0x3414fd['has'](_0x4049e9[_0x2a2493])){_0x2a2493++;continue;}if(_0x4049e9[_0x2a2493][_0x2412f1(0x30f)]('-'))continue;_0x39aeca[_0x2412f1(0x4e9)](_0x4049e9[_0x2a2493]);}const _0x5e3e0a=_0x39aeca[0x0]??null;if(_0x5e3e0a==='remove')await _0x5b4171(_0x39aeca[0x1],_0x3c0196);else{if(!_0x5e3e0a)await _0x1150d3(_0x3c0196);else{let _0x2b7974=_0x1f4b1b[_0x2412f1(0x45f)](_0x5e3e0a);if(_0x2b7974===_0x2412f1(0x2a1)&&_0x360f50[_0x2412f1(0x39c)](_0x5e3e0a))_0x2b7974='path';if(_0x2b7974===_0x2412f1(0x60b))try{const _0x5b65b3=_0x360f50[_0x2412f1(0x56c)](_0x5e3e0a,_0x2412f1(0x5fd))[_0x2412f1(0x258)](),_0x593d85=_0x1f4b1b[_0x2412f1(0x45f)](_0x5b65b3);if(_0x593d85===_0x2412f1(0x4b1)){await _0x17e9f5(_0x5b65b3,_0x3c0196);return;}await _0xcd0b42(_0x5e3e0a,_0x3c0196);return;}catch(_0x15a58f){console[_0x2412f1(0x594)](_0x2412f1(0x18f)+_0x5e3e0a+':\x20'+_0x15a58f[_0x2412f1(0x25c)]),process[_0x2412f1(0x370)](0x1);}switch(_0x2b7974){case'blob':await _0xcd0b42(_0x5e3e0a,_0x3c0196);break;case _0x2412f1(0x4b1):await _0x17e9f5(_0x5e3e0a,_0x3c0196);break;case _0x2412f1(0x44a):await _0x29329f(_0x5e3e0a,_0x3c0196);break;default:console[_0x2412f1(0x594)](_0x2412f1(0x4ae)+_0x5e3e0a+'\x22'),console[_0x2412f1(0x594)](''),console[_0x2412f1(0x594)](_0x2412f1(0x33f)),console[_0x2412f1(0x594)](_0x2412f1(0x403)),console[_0x2412f1(0x594)](_0x2412f1(0x1e9)),console[_0x2412f1(0x594)](_0x2412f1(0x39f)),console[_0x2412f1(0x594)](_0x2412f1(0x4c7)),console[_0x2412f1(0x594)](''),console['error'](_0x2412f1(0x226)),process[_0x2412f1(0x370)](0x1);}}}return;}switch(_0x9af3f8){case'doctor':await _0x46d9bd(_0xe0183d);break;case _0x2412f1(0x394):await _0x543d76();break;case _0x2412f1(0x5d6):await _0x16a73f(_0xe0183d);break;case _0x2412f1(0x23c):await _0x4a50bc(_0x1a5a3e??_0x4ec5c4[_0x2412f1(0x408)](_0x2412f1(0x4f7)),_0xe0183d);break;case _0x2412f1(0x601):await _0x554521(_0x1a5a3e??_0x4ec5c4[_0x2412f1(0x408)](_0x2412f1(0x559)),_0xe0183d,_0x588ea8);break;case _0x2412f1(0x1f3):await _0x4d310b(_0x1a5a3e??_0x4ec5c4[_0x2412f1(0x408)](_0x2412f1(0x559)),_0xe0183d,_0x588ea8);break;case _0x2412f1(0x4c4):await _0x1e4845(_0x1a5a3e,_0xe0183d,_0x588ea8);break;}})()['then'](()=>process[_0x4c2623(0x370)](0x0))[_0x4c2623(0x16b)](_0x563589=>{const _0x46a799=_0x4c2623;console[_0x46a799(0x594)](_0x46a799(0x576)+(_0x563589[_0x46a799(0x25c)]||_0x563589)+'\x0a'),process[_0x46a799(0x370)](0x1);});}else _0x386502()[_0x4c2623(0x16b)](_0x2ce4e8=>{const _0x4fdd87=_0x4c2623;console[_0x4fdd87(0x594)](_0x4fdd87(0x629)),console[_0x4fdd87(0x594)](_0x2ce4e8[_0x4fdd87(0x495)]||_0x2ce4e8),process[_0x4fdd87(0x370)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x12dbbc(0x198)]=okdb;
|