@kedem/okdb 2.7.1 → 3.0.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/bin/okdb.js DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- 'use strict';const _0x55b176=_0x223d;(function(_0x36a0ac,_0x3f0b25){const _0x24a742=_0x223d,_0x428c9d=_0x36a0ac();while(!![]){try{const _0x5a9602=-parseInt(_0x24a742(0x6a4))/0x1+parseInt(_0x24a742(0x514))/0x2+-parseInt(_0x24a742(0x502))/0x3*(parseInt(_0x24a742(0x659))/0x4)+-parseInt(_0x24a742(0x4f4))/0x5*(parseInt(_0x24a742(0x1ef))/0x6)+parseInt(_0x24a742(0x43b))/0x7+parseInt(_0x24a742(0x34b))/0x8+-parseInt(_0x24a742(0x459))/0x9*(-parseInt(_0x24a742(0x5eb))/0xa);if(_0x5a9602===_0x3f0b25)break;else _0x428c9d['push'](_0x428c9d['shift']());}catch(_0x3d66d4){_0x428c9d['push'](_0x428c9d['shift']());}}}(_0x11b6,0x3d462));var require$$1=require(_0x55b176(0x239)),require$$0$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x55b176(0x617)),require$$5$1=require(_0x55b176(0x464)),require$$0$3=require(_0x55b176(0x3de)),require$$2=require(_0x55b176(0x532)),require$$5=require('stream'),require$$2$1=require(_0x55b176(0x37d)),require$$0$2=require(_0x55b176(0x4a5)),require$$4=require('child_process'),require$$1$1=require(_0x55b176(0x324)),require$$0$4=require(_0x55b176(0x4d9)),require$$0$5=require(_0x55b176(0x5c5)),require$$0$6=require(_0x55b176(0x273)),require$$0$7=require(_0x55b176(0x6e2)),require$$1$2=require(_0x55b176(0x81e)),require$$3$1=require('url'),require$$2$2=require(_0x55b176(0x300)),require$$3$2=require('shmbuf'),commonjsGlobal=typeof globalThis!==_0x55b176(0x265)?globalThis:typeof window!==_0x55b176(0x265)?window:typeof global!==_0x55b176(0x265)?global:typeof self!==_0x55b176(0x265)?self:{};function getDefaultExportFromCjs(_0x481d06){const _0x4e9b8e=_0x55b176;return _0x481d06&&_0x481d06[_0x4e9b8e(0x88a)]&&Object[_0x4e9b8e(0x1fb)][_0x4e9b8e(0x76b)][_0x4e9b8e(0x81a)](_0x481d06,'default')?_0x481d06[_0x4e9b8e(0x24a)]:_0x481d06;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x424c35=require$$0,_0x221c87=require$$0$1,_0x2ce740=require$$1;let _0xbafab5;function _0xdab983(){const _0x1b653a=_0x223d;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0xbafab5!==undefined)return _0xbafab5;try{const _0x1b7ef5=_0x2ce740[_0x1b653a(0x7de)](require[_0x1b653a(0x651)]('shmbuf/package.json'));_0xbafab5=_0x221c87[_0x1b653a(0x50f)](_0x2ce740[_0x1b653a(0x4e8)](_0x1b7ef5,_0x1b653a(0x8ad),_0x1b653a(0x840),_0x1b653a(0x852)));}catch{_0xbafab5=![];}return _0xbafab5;}function _0x2de075(){const _0x287007=_0x223d,_0x14daec=_0x424c35[_0x287007(0x797)]()[_0x287007(0x744)];return Math['max'](0x1,_0x14daec-0x1);}function _0x441f00(_0x1d2fa1,_0x14826e={}){const _0x2b028f=_0x223d,_0x2898ce=_0x14826e[_0x2b028f(0x638)]!==undefined?_0x14826e['shmbufNative']:_0xdab983();let _0x44242e;if(_0x1d2fa1?.['noCluster'])_0x44242e=0x1;else{let _0x3cfb9b,_0x13c2b8;if(_0x1d2fa1?.[_0x2b028f(0x299)]!==undefined&&_0x1d2fa1[_0x2b028f(0x299)]!==null&&_0x1d2fa1[_0x2b028f(0x299)]!=='')_0x3cfb9b=_0x1d2fa1[_0x2b028f(0x299)],_0x13c2b8=_0x2b028f(0x3b3);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x3cfb9b=process.env.OKDB_HTTP_WORKERS,_0x13c2b8=_0x2b028f(0x2e7);else _0x1d2fa1?.[_0x2b028f(0x6e2)]?.[_0x2b028f(0x4c4)]!==undefined&&_0x1d2fa1[_0x2b028f(0x6e2)][_0x2b028f(0x4c4)]!==null&&_0x1d2fa1['http'][_0x2b028f(0x4c4)]!==''&&(_0x3cfb9b=_0x1d2fa1['http'][_0x2b028f(0x4c4)],_0x13c2b8=_0x2b028f(0x271));}if(_0x3cfb9b===undefined)_0x44242e=_0x2de075();else{const _0x23ef33=Number(_0x3cfb9b);!Number['isInteger'](_0x23ef33)||_0x23ef33<0x1?(console[_0x2b028f(0x488)]('[okdb]\x20invalid\x20'+_0x13c2b8+'='+JSON[_0x2b028f(0x364)](_0x3cfb9b)+_0x2b028f(0x7ac)),_0x44242e=0x1):_0x44242e=_0x23ef33;}}return!_0x2898ce&&_0x44242e>0x1&&(console[_0x2b028f(0x488)](_0x2b028f(0x22e)+(_0x2b028f(0x839)+_0x44242e+').')),_0x44242e=0x1),_0x44242e;}return okdbWorkers={'isShmbufNative':_0xdab983,'defaultWorkers':_0x2de075,'resolveWorkers':_0x441f00},okdbWorkers;}var version=_0x55b176(0x530),require$$3={'version':version},okdbMigrate={'exports':{}},okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x372213 extends Error{constructor(_0x28e8fd,_0x490ce6,_0x4fae5d={}){const _0x14a6b0=_0x223d;super(_0x28e8fd),this['name']=_0x14a6b0(0x467),this[_0x14a6b0(0x247)]=_0x490ce6,this['details']=_0x4fae5d,_0x4fae5d['cause']&&(this[_0x14a6b0(0x865)]=_0x4fae5d[_0x14a6b0(0x865)]),Error[_0x14a6b0(0x819)](this,this[_0x14a6b0(0x581)]);}}class _0x5a6f27 extends _0x372213{constructor(_0xae40a,_0x4e2cc4,_0xdf8ebd,_0x4f222f){const _0x4854e9=_0x223d;super(_0x4854e9(0x767)+_0xae40a+'@'+_0x4e2cc4+':\x20expected\x20'+_0xdf8ebd+_0x4854e9(0x27a)+_0x4f222f,_0x4854e9(0x8c1),{'type':_0xae40a,'key':_0x4e2cc4,'expectedVersion':_0xdf8ebd,'actualVersion':_0x4f222f}),this['name']='OKDBVersionMismatchError';}}class _0x29d508 extends _0x372213{constructor(_0x5422e3,_0x285cf0){const _0x5d0a85=_0x223d;super(_0x5422e3+'@'+_0x285cf0+_0x5d0a85(0x556),_0x5d0a85(0x35a),{'type':_0x5422e3,'key':_0x285cf0}),this[_0x5d0a85(0x76e)]=_0x5d0a85(0x7f6);}}class _0x30732d extends _0x372213{constructor(_0x4fb063,_0x39a491){const _0x2e8cfa=_0x223d;super(_0x4fb063+'@'+_0x39a491+_0x2e8cfa(0x284),_0x2e8cfa(0x22d),{'type':_0x4fb063,'key':_0x39a491}),this[_0x2e8cfa(0x76e)]=_0x2e8cfa(0x718);}}class _0x30e42d extends _0x372213{constructor(_0x27bfee,_0x27dd7c){const _0x2f8f48=_0x223d,_0x20805f=typeof _0x27dd7c;super(_0x2f8f48(0x34e)+_0x27bfee+_0x2f8f48(0x216)+_0x20805f+_0x2f8f48(0x49c)+_0x27dd7c,_0x2f8f48(0x2f3),{'index':_0x27bfee,'key':_0x27dd7c,'keyType':_0x20805f}),this['name']=_0x2f8f48(0x73e);}}class _0x36812b extends _0x372213{constructor(_0x182efd){const _0x2e50f3=_0x223d,_0x2e7e7b=typeof _0x182efd;super(_0x2e50f3(0x2cf)+_0x2e7e7b+_0x2e50f3(0x685)+_0x182efd,_0x2e50f3(0x763),{'key':_0x182efd,'keyType':_0x2e7e7b}),this['name']=_0x2e50f3(0x8e4);}}class _0xc78d48 extends _0x372213{constructor(_0x100c5b){const _0x50082a=_0x223d;super(_0x50082a(0x209)+_0x100c5b+_0x50082a(0x75f),'TYPE_NOT_REGISTERED',{'type':_0x100c5b}),this[_0x50082a(0x76e)]=_0x50082a(0x302);}}class _0x4dc0d4 extends _0x372213{constructor(_0x1939be){const _0xc4867e=_0x223d;super(_0xc4867e(0x209)+_0x1939be+_0xc4867e(0x7b8),_0xc4867e(0x65f),{'type':_0x1939be}),this[_0xc4867e(0x76e)]=_0xc4867e(0x1f0);}}class _0x109dba extends _0x372213{constructor(_0x82bf00,_0x15dd77){const _0x260a5f=_0x223d;super(_0x260a5f(0x4ba)+_0x15dd77+_0x260a5f(0x653)+_0x82bf00+'\x27\x20doesn\x27t\x20exist','INDEX_NOT_REGISTERED',{'type':_0x82bf00,'index':_0x15dd77}),this['name']=_0x260a5f(0x87b);}}class _0x28bf6e extends _0x372213{constructor(_0x55662e,_0x1a1af4){const _0x10e8fe=_0x223d;super(_0x10e8fe(0x4ba)+_0x1a1af4+_0x10e8fe(0x653)+_0x55662e+'\x27\x20is\x20already\x20registered',_0x10e8fe(0x5e4),{'type':_0x55662e,'index':_0x1a1af4}),this[_0x10e8fe(0x76e)]=_0x10e8fe(0x289);}}class _0x2e90aa extends _0x372213{constructor(_0x599c97,_0x109e76={}){const _0x580d8b=_0x223d;super(_0x599c97,'INVALID_VALUE',_0x109e76),this['name']=_0x580d8b(0x60e);}}class _0x21ce02 extends _0x372213{constructor(_0x28b937,_0x4aeee0,_0x18c933,_0x4d1c20,_0x3f065c){const _0x5f1e80=_0x223d;super('Unique\x20constraint\x20violated\x20on\x20'+_0x28b937+'@'+_0x4aeee0+_0x5f1e80(0x3df)+_0x18c933+']\x20already\x20maps\x20to\x20\x27'+_0x4d1c20+_0x5f1e80(0x7be)+_0x3f065c+'\x27',_0x5f1e80(0x43d),{'type':_0x28b937,'index':_0x4aeee0,'indexKey':_0x18c933,'existingKey':_0x4d1c20,'conflictingKey':_0x3f065c}),this[_0x5f1e80(0x76e)]='OKDBUniqueConstraintError';}}class _0x48baf8 extends _0x372213{constructor(_0x3abd1e,_0x5475c8,_0x39f19d){const _0x7ced87=_0x223d;super('Schema\x20validation\x20failed\x20for\x20'+_0x3abd1e+'@'+_0x5475c8,'SCHEMA_VALIDATION_FAILED',{'type':_0x3abd1e,'key':_0x5475c8,'errors':_0x39f19d}),this[_0x7ced87(0x76e)]='OKDBSchemaValidationError',this['type']=_0x3abd1e,this[_0x7ced87(0x3ca)]=_0x5475c8,this['errors']=_0x39f19d;}}class _0x182fd4 extends _0x372213{constructor(_0x239a4d,_0x2cdff3){const _0x134fb7=_0x223d;super(_0x134fb7(0x63b)+_0x239a4d+':\x20'+_0x2cdff3['length']+_0x134fb7(0x566),'SCHEMA_COLLECTION_INVALID',{'type':_0x239a4d,'failures':_0x2cdff3}),this[_0x134fb7(0x76e)]=_0x134fb7(0x3e9),this[_0x134fb7(0x465)]=_0x239a4d,this[_0x134fb7(0x739)]=_0x2cdff3;}}class _0x15e472 extends _0x372213{constructor(_0x18ce81,_0x2b538f,_0x17928f,_0x3e40de,_0x587b52){const _0x3f3237=_0x223d;super(_0x3f3237(0x603)+_0x18ce81+'@'+_0x2b538f+'.'+_0x17928f+_0x3f3237(0x8d1)+_0x3e40de+'@'+_0x587b52+_0x3f3237(0x5d0),_0x3f3237(0x60a),{'sourceType':_0x18ce81,'sourceKey':_0x2b538f,'fieldPath':_0x17928f,'targetType':_0x3e40de,'targetKey':_0x587b52}),this[_0x3f3237(0x76e)]='OKDBForeignKeyError',this[_0x3f3237(0x3a3)]=_0x18ce81,this[_0x3f3237(0x3f9)]=_0x2b538f,this['fieldPath']=_0x17928f,this['targetType']=_0x3e40de,this['targetKey']=_0x587b52;}}class _0x2b6d66 extends _0x372213{constructor(_0x20834d,_0x4cedc9,_0x46428f){const _0x31ea42=_0x223d;super('Cannot\x20delete\x20'+_0x20834d+'@'+_0x4cedc9+':\x20'+_0x46428f['length']+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x31ea42(0x461),{'targetType':_0x20834d,'targetKey':_0x4cedc9,'references':_0x46428f}),this[_0x31ea42(0x76e)]=_0x31ea42(0x51b),this['targetType']=_0x20834d,this[_0x31ea42(0x6b4)]=_0x4cedc9,this[_0x31ea42(0x3f7)]=_0x46428f;}}class _0x1eabd1 extends _0x372213{constructor(_0x29c905,_0x3cfcef,_0x36fc71){const _0x1f40f6=_0x223d;super(_0x1f40f6(0x7cb)+_0x3cfcef+_0x1f40f6(0x379)+_0x29c905+_0x1f40f6(0x602)+_0x36fc71[_0x1f40f6(0x47f)](_0x5ef838=>_0x5ef838[_0x1f40f6(0x65d)]+':'+_0x5ef838[_0x1f40f6(0x76e)])[_0x1f40f6(0x4e8)](',\x20'),_0x1f40f6(0x7d6),{'type':_0x29c905,'index':_0x3cfcef,'usedBy':_0x36fc71}),this['name']=_0x1f40f6(0x59f);}}return okdbError={'OKDBError':_0x372213,'OKDBVersionMismatchError':_0x5a6f27,'OKDBNotFoundError':_0x29d508,'OKDBAlreadyExistsError':_0x30732d,'OKDBInvalidIndexKeyError':_0x30e42d,'OKDBInvalidPrimaryKeyError':_0x36812b,'OKDBTypeNotRegisteredError':_0xc78d48,'OKDBTypeAlreadyRegisteredError':_0x4dc0d4,'OKDBIndexNotRegisteredError':_0x109dba,'OKDBIndexAlreadyRegisteredError':_0x28bf6e,'OKDBInvalidValueError':_0x2e90aa,'OKDBUniqueConstraintError':_0x21ce02,'OKDBSchemaValidationError':_0x48baf8,'OKDBSchemaCollectionError':_0x182fd4,'OKDBForeignKeyError':_0x15e472,'OKDBForeignKeyDeleteError':_0x2b6d66,'OKDBIndexHasConsumersError':_0x1eabd1},okdbError;}var hasRequiredOkdbMigrate;function requireOkdbMigrate(){const _0x1cf9ad=_0x55b176;if(hasRequiredOkdbMigrate)return okdbMigrate[_0x1cf9ad(0x87e)];hasRequiredOkdbMigrate=0x1;const _0x498a3a=require$$0$1,_0x31a7a6=require$$1,_0x2ddbe4=require$$2,{OKDBError:_0x2c9b60}=requireOkdbError(),_0x13709b='header',_0x3e94cc=_0x1cf9ad(0x264),_0x28aacc=_0x1cf9ad(0x498),_0x5b0709=_0x1cf9ad(0x59c),_0x53c5f0=_0x1cf9ad(0x1c9),_0x3e51aa=0x1f4,_0x4c3b53=0x3e8,_0x8b4a6d=_0x1cf9ad(0x59d);async function _0x50a984(_0x3bb193,_0x5f502e,_0x2dc0af,_0x385041){const _0x1e6ebb=_0x1cf9ad;if(_0x3bb193){await _0x3bb193['backup'](_0x2dc0af,Boolean(_0x385041));return;}const _0x5c2677=_0x2ddbe4['open'](_0x5f502e,{'readOnly':!![],'maxDbs':0x8});try{await _0x5c2677[_0x1e6ebb(0x2b8)](_0x2dc0af,Boolean(_0x385041));}finally{await _0x5c2677[_0x1e6ebb(0x2de)]();}}const _0x17536f=()=>new Promise(_0x100598=>setImmediate(_0x100598));function _0x38833a(_0x5ded06,_0x270cbf){const _0x47450b=_0x1cf9ad;if(_0x5ded06[_0x47450b(0x5ae)](_0x270cbf))return Promise['resolve']();return new Promise((_0x34d3ff,_0x55aa0f)=>{const _0x5d0143=_0x47450b,_0x102fdf=_0x2c6e8d=>{const _0x36b672=_0x223d;_0x5ded06[_0x36b672(0x429)]?.(_0x36b672(0x668),_0x2c8b76),_0x5ded06['off']?.(_0x36b672(0x20b),_0x2d6b06),_0x5ded06['off']?.(_0x36b672(0x2de),_0x3162ac);if(_0x2c6e8d)_0x55aa0f(_0x2c6e8d);else _0x34d3ff();},_0x2c8b76=()=>_0x102fdf(),_0x2d6b06=_0x6409b6=>_0x102fdf(_0x6409b6),_0x3162ac=()=>_0x102fdf(new Error('export:\x20stream\x20closed\x20before\x20drain'));_0x5ded06[_0x5d0143(0x5af)](_0x5d0143(0x668),_0x2c8b76),_0x5ded06[_0x5d0143(0x5af)](_0x5d0143(0x20b),_0x2d6b06),_0x5ded06[_0x5d0143(0x5af)](_0x5d0143(0x2de),_0x3162ac);});}async function _0x39ad8d(_0x5e7e63,_0x1c970d,_0x36a4b1,{versions:versions=![]}={}){const _0x6c6272=_0x1cf9ad;let _0x44575e=0x0,_0x3173b2,_0x48a628=!![];for(;;){const _0x39feca={'snapshot':!![],'limit':_0x4c3b53};if(versions)_0x39feca[_0x6c6272(0x70c)]=!![];!_0x48a628&&(_0x39feca[_0x6c6272(0x352)]=_0x3173b2,_0x39feca[_0x6c6272(0x517)]=!![]);_0x48a628=![];const _0x1985e1=Array[_0x6c6272(0x83d)](_0x1c970d[_0x6c6272(0x33e)](_0x39feca));if(_0x1985e1[_0x6c6272(0x744)]===0x0)break;let _0x11725a='';for(const _0x5225fc of _0x1985e1)_0x11725a+=_0x36a4b1(_0x5225fc)+'\x0a';_0x3173b2=_0x1985e1[_0x1985e1[_0x6c6272(0x744)]-0x1][_0x6c6272(0x3ca)],_0x44575e+=_0x1985e1[_0x6c6272(0x744)],await _0x38833a(_0x5e7e63,_0x11725a);if(_0x1985e1[_0x6c6272(0x744)]<_0x4c3b53)break;await _0x17536f();}return _0x44575e;}class _0x3024c0{constructor(_0x139aa6){this['okdb']=_0x139aa6;}[_0x1cf9ad(0x5b6)](_0x8f0e34='default'){const _0x9a8d3f=_0x1cf9ad;return this[_0x9a8d3f(0x1cc)][_0x9a8d3f(0x264)](_0x8f0e34);}async['_resolveOrCreateEnv'](_0x13fa32=_0x1cf9ad(0x24a)){const _0x416adf=_0x1cf9ad;return!this[_0x416adf(0x1cc)][_0x416adf(0x441)][_0x416adf(0x5d6)](_0x13fa32)&&await this['okdb']['createEnvironment'](_0x13fa32,{'sync':!![]}),this[_0x416adf(0x1cc)][_0x416adf(0x264)](_0x13fa32);}[_0x1cf9ad(0x412)](_0x416057,_0x53e646){const _0x1369fd=_0x1cf9ad,_0x763e55=[..._0x416057[_0x1369fd(0x5aa)]['getKeys']()][_0x1369fd(0x7d3)](_0x3d33a1=>!_0x3d33a1[_0x1369fd(0x3b2)]('~')&&!_0x3d33a1[_0x1369fd(0x3b2)](_0x1369fd(0x78b)));if(!_0x53e646)return _0x763e55;return _0x763e55[_0x1369fd(0x7d3)](_0x11344b=>_0x53e646[_0x1369fd(0x361)](_0x11344b));}['_typeSchema'](_0x15ae59,_0x4df6f3){const _0x530fdd=_0x1cf9ad,_0x400fdc=_0x15ae59[_0x530fdd(0x4fc)][_0x530fdd(0x564)](_0x4df6f3),_0x3cdac7=_0x15ae59[_0x530fdd(0x5aa)][_0x530fdd(0x564)](_0x4df6f3)||{},_0x2cd8b1=[];for(const [,_0x3c3684]of _0x400fdc?.[_0x530fdd(0x536)]??new Map()){const _0x41a135={'fields':_0x3c3684[_0x530fdd(0x6b6)]};if(_0x3c3684[_0x530fdd(0x211)])_0x41a135[_0x530fdd(0x628)]=_0x3c3684[_0x530fdd(0x211)];if(_0x3c3684[_0x530fdd(0x1cb)])_0x41a135['unique']=!![];_0x2cd8b1[_0x530fdd(0x5bb)](_0x41a135);}const _0x14282c={};for(const [_0x8c50e6,_0x3068b2]of Object[_0x530fdd(0x7fb)](_0x3cdac7[_0x530fdd(0x7f5)]||{})){_0x14282c[_0x8c50e6]={'fields':_0x3068b2[_0x530fdd(0x51d)]?.[_0x530fdd(0x57a)],'tokenizer':_0x3068b2[_0x530fdd(0x51d)]?.['tokenizer']};}const _0x3ced6e={'indexes':_0x2cd8b1,'ftsIndexes':_0x14282c};return _0x3cdac7[_0x530fdd(0x498)]&&(_0x3ced6e[_0x530fdd(0x498)]=_0x3cdac7[_0x530fdd(0x498)]),_0x3ced6e;}async['exportToStream'](_0x59696e,_0x3b6b0e={}){const _0x4320a4=_0x1cf9ad,{envName:envName='default',types:types=null,includeChanges:includeChanges=![],_noHeader:_noHeader=![]}=_0x3b6b0e,_0x24ce7e=this[_0x4320a4(0x5b6)](envName),_0x1a8934=this[_0x4320a4(0x412)](_0x24ce7e,types);let _0x3d10a4=0x0,_0x3c0301=0x0;!_noHeader&&await _0x38833a(_0x59696e,JSON[_0x4320a4(0x364)]({'r':_0x13709b,'kdbVersion':require$$3[_0x4320a4(0x50b)],'exportedAt':Date['now'](),'envName':envName})+'\x0a');for(const _0x2612de of _0x1a8934){const _0x4f4074=_0x24ce7e[_0x4320a4(0x4fc)]['get'](_0x2612de);if(!_0x4f4074)continue;const _0x3fa75d=this[_0x4320a4(0x6b0)](_0x24ce7e,_0x2612de);await _0x38833a(_0x59696e,JSON[_0x4320a4(0x364)]({'r':_0x28aacc,'type':_0x2612de,..._0x3fa75d})+'\x0a'),_0x3d10a4+=await _0x39ad8d(_0x59696e,_0x4f4074[_0x4320a4(0x59c)],({key:_0x388357,value:_0x4b89b8,version:_0x46454a})=>JSON['stringify']({'r':_0x5b0709,'t':_0x2612de,'k':_0x388357,'v':_0x4b89b8,'ver':_0x46454a}),{'versions':!![]});}return includeChanges&&_0x24ce7e[_0x4320a4(0x677)]&&(_0x3c0301=await _0x39ad8d(_0x59696e,_0x24ce7e[_0x4320a4(0x7fe)],({key:_0x5ca81e,value:_0x46e126})=>JSON[_0x4320a4(0x364)]({'r':_0x53c5f0,'clock':_0x5ca81e,'event':_0x46e126}))),{'types':_0x1a8934['length'],'records':_0x3d10a4,'changes':_0x3c0301};}async[_0x1cf9ad(0x37b)](_0xf9744d,_0x2e3e25={}){const _0x17b572=_0x1cf9ad;_0x498a3a['mkdirSync'](_0x31a7a6['dirname'](_0xf9744d),{'recursive':!![]});const _0x51d218=_0x498a3a[_0x17b572(0x2fb)](_0xf9744d),_0x4c1db0=await this[_0x17b572(0x3e2)](_0x51d218,_0x2e3e25);return await new Promise((_0x20a640,_0x21a28d)=>{const _0x3ee2b1=_0x17b572;_0x51d218[_0x3ee2b1(0x4c5)](),_0x51d218[_0x3ee2b1(0x5af)](_0x3ee2b1(0x52f),_0x20a640),_0x51d218['once'](_0x3ee2b1(0x20b),_0x21a28d);}),{..._0x4c1db0,'filePath':_0xf9744d};}async[_0x1cf9ad(0x545)](_0xa86300,_0x557858={}){const _0x362ca6=_0x1cf9ad,{envNames:envNames=null,types:types=null,includeChanges:includeChanges=![]}=_0x557858,_0x5629bb=[...this['okdb'][_0x362ca6(0x441)]['keys']()]['filter'](_0x55506a=>!_0x55506a[_0x362ca6(0x3b2)]('~')),_0x1aa2e0=envNames?_0x5629bb[_0x362ca6(0x7d3)](_0x481b96=>envNames[_0x362ca6(0x361)](_0x481b96)):_0x5629bb;await _0x38833a(_0xa86300,JSON[_0x362ca6(0x364)]({'r':_0x13709b,'kdbVersion':require$$3[_0x362ca6(0x50b)],'exportedAt':Date['now'](),'envNames':_0x1aa2e0})+'\x0a');let _0x4b8abb=0x0,_0x2c2840=0x0,_0x516229=0x0;for(const _0x373a48 of _0x1aa2e0){await _0x38833a(_0xa86300,JSON[_0x362ca6(0x364)]({'r':_0x3e94cc,'name':_0x373a48})+'\x0a');const _0x589b4f=await this[_0x362ca6(0x3e2)](_0xa86300,{'envName':_0x373a48,'types':types,'includeChanges':includeChanges,'_noHeader':!![]});_0x4b8abb+=_0x589b4f[_0x362ca6(0x4f6)],_0x2c2840+=_0x589b4f[_0x362ca6(0x7f1)],_0x516229+=_0x589b4f[_0x362ca6(0x845)];}return{'envs':_0x1aa2e0[_0x362ca6(0x744)],'types':_0x4b8abb,'records':_0x2c2840,'changes':_0x516229};}async[_0x1cf9ad(0x666)](_0x1ad982,_0x12e5f4={}){const _0x1412de=_0x1cf9ad,{envName:_0x1d38e7=null,types:_0x338a36=null,dropExisting:dropExisting=![],batchSize:batchSize=_0x3e51aa,includeChanges:includeChanges=![],onProgress:onProgress=null}=_0x12e5f4;let _0x21cf60=_0x1d38e7??_0x1412de(0x24a),_0x37a262=null,_0x5c3bb5=0x0,_0x58898d=0x0,_0x3d281=0x0,_0x14358f=null,_0x49c127=[];const _0x123e26=[],_0x30d4ce=async()=>{const _0x40ca65=_0x1412de;if(!_0x49c127[_0x40ca65(0x744)]||!_0x14358f||!_0x37a262)return;await _0x37a262['_writer'][_0x40ca65(0x2f0)](()=>{const _0x5c2f19=_0x40ca65;for(const {k:_0x536f0c,v:_0x237337,ver:_0x514fa4}of _0x49c127){_0x37a262[_0x5c2f19(0x1b9)](null,_0x14358f,_0x536f0c,_0x237337,{'version':_0x514fa4,'origin':_0x5c2f19(0x3f8)});}}),_0x58898d+=_0x49c127[_0x40ca65(0x744)],onProgress?.({'type':_0x14358f,'count':_0x58898d}),_0x49c127=[];};await this[_0x1412de(0x3ff)](_0x1ad982,async _0x3a368a=>{const _0x301f26=_0x1412de,_0x36aa75=_0x3a368a['r'];if(_0x36aa75===_0x13709b){if(!_0x1d38e7&&_0x3a368a[_0x301f26(0x803)])_0x21cf60=_0x3a368a[_0x301f26(0x803)];_0x37a262=await this[_0x301f26(0x2ec)](_0x21cf60);return;}if(!_0x37a262)_0x37a262=await this[_0x301f26(0x2ec)](_0x21cf60);if(_0x36aa75===_0x3e94cc){await _0x30d4ce(),_0x14358f=null,_0x21cf60=_0x1d38e7??_0x3a368a['name'],_0x37a262=await this[_0x301f26(0x2ec)](_0x21cf60);return;}if(_0x36aa75===_0x28aacc){const {type:_0x3a5f4d,indexes:indexes=[],ftsIndexes:ftsIndexes={},schema:_0x690fe9}=_0x3a368a;if(_0x338a36&&!_0x338a36[_0x301f26(0x361)](_0x3a5f4d))return;await _0x30d4ce(),_0x14358f=_0x3a5f4d;dropExisting&&_0x37a262[_0x301f26(0x40b)](_0x3a5f4d)&&await _0x37a262['dropType'](_0x3a5f4d);!_0x37a262[_0x301f26(0x40b)](_0x3a5f4d)&&(await _0x37a262['registerType'](_0x3a5f4d),_0x5c3bb5++);for(const _0x313d32 of indexes){if(!_0x37a262[_0x301f26(0x771)](_0x3a5f4d,_0x313d32['fields'])){const _0x4e5145={};_0x313d32[_0x301f26(0x628)]&&(_0x4e5145[_0x301f26(0x465)]=_0x301f26(0x628),_0x4e5145[_0x301f26(0x368)]=_0x313d32[_0x301f26(0x628)][_0x301f26(0x368)]);if(_0x313d32['unique'])_0x4e5145['unique']=!![];await _0x37a262['registerIndex'](_0x3a5f4d,_0x313d32[_0x301f26(0x57a)],_0x4e5145);}}for(const [_0x37fa72,_0x16a776]of Object[_0x301f26(0x7fb)](ftsIndexes)){!this[_0x301f26(0x1cc)]['fts'][_0x301f26(0x5d6)](_0x3a5f4d,_0x37fa72,_0x37a262)&&await this['okdb'][_0x301f26(0x5ff)][_0x301f26(0x83f)](_0x3a5f4d,_0x37fa72,{'fields':_0x16a776[_0x301f26(0x57a)],'tokenizer':_0x16a776[_0x301f26(0x6d5)]},undefined,_0x37a262);}_0x690fe9?.['definition']&&_0x123e26[_0x301f26(0x5bb)]({'env':_0x37a262,'type':_0x3a5f4d,'schema':_0x690fe9});return;}if(_0x36aa75===_0x5b0709){if(_0x338a36&&!_0x338a36[_0x301f26(0x361)](_0x3a368a['t']))return;_0x3a368a['t']!==_0x14358f&&(await _0x30d4ce(),_0x14358f=_0x3a368a['t']);_0x49c127['push']({'k':_0x3a368a['k'],'v':_0x3a368a['v'],'ver':_0x3a368a[_0x301f26(0x268)]});if(_0x49c127['length']>=batchSize)await _0x30d4ce();return;}_0x36aa75===_0x53c5f0&&includeChanges&&_0x37a262[_0x301f26(0x677)]&&(_0x37a262[_0x301f26(0x7fe)][_0x301f26(0x7ef)](_0x3a368a[_0x301f26(0x1f5)],_0x3a368a[_0x301f26(0x83b)]),_0x3d281++);}),await _0x30d4ce();for(const {env:_0x241315,type:_0x1acfd2,schema:_0x73be6d}of _0x123e26){try{await _0x241315[_0x1412de(0x5f9)](_0x1acfd2,_0x73be6d);}catch{if(_0x73be6d[_0x1412de(0x47c)])try{await _0x241315[_0x1412de(0x5f9)](_0x1acfd2,{..._0x73be6d,'enforce':![]});}catch{}}}return{'types':_0x5c3bb5,'records':_0x58898d,'changes':_0x3d281};}async[_0x1cf9ad(0x8d2)](_0x487129,_0x502f96={}){const _0x5511f4=_0x1cf9ad,_0xda937d=_0x498a3a[_0x5511f4(0x63e)](_0x487129,{'encoding':'utf8'});return this[_0x5511f4(0x666)](_0xda937d,_0x502f96);}[_0x1cf9ad(0x3ff)](_0x33480d,_0x272916){return new Promise((_0x300f21,_0x379f4f)=>{const _0xb455e4=_0x223d;let _0x3347ab='',_0x22070f=Promise[_0xb455e4(0x651)]();const _0x16b64c=async _0x1a362e=>{const _0x202dd2=_0xb455e4;_0x3347ab+=_0x1a362e;const _0x5d79ab=_0x3347ab[_0x202dd2(0x310)]('\x0a');_0x3347ab=_0x5d79ab['pop']();for(const _0x172591 of _0x5d79ab){const _0x24e2c6=_0x172591[_0x202dd2(0x44e)]();if(!_0x24e2c6)continue;let _0x1f97dc;try{_0x1f97dc=JSON[_0x202dd2(0x527)](_0x24e2c6);}catch{continue;}await _0x272916(_0x1f97dc);}};_0x33480d['on']('data',_0x7a9ead=>{const _0x386a2b=_0xb455e4;_0x22070f=_0x22070f[_0x386a2b(0x39e)](()=>_0x16b64c(String(_0x7a9ead)));}),_0x33480d['on']('end',()=>{const _0x26d210=_0xb455e4;_0x22070f[_0x26d210(0x39e)](async()=>{const _0x4838b5=_0x26d210,_0x287b58=_0x3347ab[_0x4838b5(0x44e)]();if(_0x287b58)try{await _0x272916(JSON[_0x4838b5(0x527)](_0x287b58));}catch{}_0x300f21();})[_0x26d210(0x520)](_0x379f4f);}),_0x33480d['on']('error',_0x379f4f);});}async[_0x1cf9ad(0x2b8)](_0x2df599,_0x5dc184={}){const _0x1ce478=_0x1cf9ad,{envNames:envNames=null,compact:compact=!![]}=_0x5dc184,_0x15a177=this[_0x1ce478(0x1cc)],_0x23302b=_0x31a7a6[_0x1ce478(0x651)](_0x15a177[_0x1ce478(0x239)]),_0x3ea710=_0x31a7a6[_0x1ce478(0x651)](_0x2df599),_0x326607=_0x31a7a6[_0x1ce478(0x499)](_0x23302b,_0x3ea710);if(_0x326607===''||!(_0x326607['startsWith']('..')||_0x31a7a6[_0x1ce478(0x1e9)](_0x326607)))throw new _0x2c9b60(_0x1ce478(0x2da)+_0x3ea710+_0x1ce478(0x75d)+_0x23302b+_0x1ce478(0x3c4),_0x1ce478(0x8da));if(_0x498a3a['existsSync'](_0x3ea710)&&_0x498a3a['readdirSync'](_0x3ea710)[_0x1ce478(0x744)]>0x0)throw new _0x2c9b60(_0x1ce478(0x2da)+_0x3ea710+'\x22\x20is\x20not\x20empty\x20—\x20backups\x20never\x20overwrite;\x20choose\x20a\x20new\x20directory',_0x1ce478(0x358));_0x498a3a[_0x1ce478(0x753)](_0x3ea710,{'recursive':!![]});const _0x27a6e0=envNames?new Set([...envNames,_0x1ce478(0x5d5)]):null,_0x55943b=[],_0x12652b=[],_0x42030e=[];for(const [_0x14caf3,_0x5a329f]of[..._0x15a177[_0x1ce478(0x441)][_0x1ce478(0x7fb)]()]){if(_0x27a6e0&&!_0x27a6e0[_0x1ce478(0x5d6)](_0x14caf3))continue;if(_0x14caf3===_0x1ce478(0x7ba))continue;if(!_0x5a329f[_0x1ce478(0x7a3)]||!_0x5a329f['db']){_0x12652b[_0x1ce478(0x5bb)]({'name':_0x14caf3,'reason':_0x1ce478(0x460)});continue;}const _0x454444=_0x31a7a6[_0x1ce478(0x651)](_0x5a329f[_0x1ce478(0x239)]),_0x5a3a56=_0x31a7a6[_0x1ce478(0x499)](_0x23302b,_0x454444),_0xb33bb8=_0x5a3a56===''||_0x5a3a56['startsWith']('..')||_0x31a7a6['isAbsolute'](_0x5a3a56),_0x20fc30=_0xb33bb8?_0x15a177[_0x1ce478(0x74f)](_0x14caf3):_0x5a3a56,_0x512a50=_0x31a7a6[_0x1ce478(0x4e8)](_0x3ea710,_0x20fc30);_0x498a3a['mkdirSync'](_0x512a50,{'recursive':!![]});const _0x125698=_0x31a7a6[_0x1ce478(0x4e8)](_0x454444,_0x1ce478(0x670));let _0x4d67d9=![];if(_0x498a3a[_0x1ce478(0x50f)](_0x31a7a6['join'](_0x125698,_0x1ce478(0x28a)))){const _0x51cb66=_0x31a7a6[_0x1ce478(0x4e8)](_0x512a50,'time-machine');_0x498a3a['mkdirSync'](_0x51cb66,{'recursive':!![]}),await _0x50a984(_0x5a329f[_0x1ce478(0x5dc)]?.['_store']?.['db'],_0x125698,_0x51cb66,compact),_0x4d67d9=!![];}let _0x378705=0x0;try{_0x378705=_0x498a3a[_0x1ce478(0x77f)](_0x31a7a6[_0x1ce478(0x4e8)](_0x454444,_0x1ce478(0x28a)))[_0x1ce478(0x784)];}catch{}await _0x5a329f['db']['backup'](_0x512a50,Boolean(compact));let _0x27ad3a=0x0;try{_0x27ad3a=_0x498a3a['statSync'](_0x31a7a6[_0x1ce478(0x4e8)](_0x512a50,'data.mdb'))[_0x1ce478(0x784)];}catch{}_0x55943b[_0x1ce478(0x5bb)]({'name':_0x14caf3,'dest':_0x512a50,'sizeBefore':_0x378705,'sizeAfter':_0x27ad3a,'timeMachine':_0x4d67d9}),_0x42030e[_0x1ce478(0x5bb)]({'name':_0x14caf3,'dir':_0x20fc30,'timeMachine':_0x4d67d9,..._0xb33bb8?{'outOfTree':_0xb33bb8,'sourcePath':_0x454444}:{}});}for(const [_0x61228f,_0x32ed53]of _0x15a177[_0x1ce478(0x5b4)]??[]){if(_0x27a6e0&&!_0x27a6e0[_0x1ce478(0x5d6)](_0x61228f))continue;_0x12652b[_0x1ce478(0x5bb)]({'name':_0x61228f,'reason':_0x1ce478(0x286)+(_0x32ed53?.[_0x1ce478(0x20b)]??_0x1ce478(0x342))});}const _0x42a8af={'count':0x0,'bytes':0x0},_0x59e98d=_0x15a177[_0x1ce478(0x362)]?.[_0x1ce478(0x201)];_0x59e98d&&_0x498a3a[_0x1ce478(0x50f)](_0x59e98d)&&await this[_0x1ce478(0x4fa)](_0x59e98d,_0x31a7a6[_0x1ce478(0x4e8)](_0x3ea710,_0x1ce478(0x701)),_0x42a8af,(_0x123ac6,_0x5e448a)=>_0x5e448a===0x0&&_0x123ac6==='tmp');const _0x37e2c1=_0x31a7a6[_0x1ce478(0x4e8)](_0x3ea710,_0x8b4a6d),_0x574ef5={'format':0x1,'okdbVersion':require$$3['version'],'createdAt':new Date()['toISOString'](),'source':_0x23302b,'compact':Boolean(compact),'envs':_0x42030e,'blobs':_0x42a8af,'skipped':_0x12652b,'excluded':{'~fts':_0x1ce478(0x897),'~processes':_0x1ce478(0x6fa)}};return _0x498a3a['writeFileSync'](_0x37e2c1,JSON[_0x1ce478(0x364)](_0x574ef5,null,0x2)+'\x0a'),{'ok':!![],'dest':_0x3ea710,'envs':_0x55943b,'blobs':_0x42a8af,'skipped':_0x12652b,'manifest':_0x37e2c1};}[_0x1cf9ad(0x3bb)](){const _0x1f1cea=_0x1cf9ad,_0x25eeb3=this[_0x1f1cea(0x1cc)]['options']?.[_0x1f1cea(0x2b8)]?.['root'];if(_0x25eeb3)return _0x31a7a6[_0x1f1cea(0x651)](_0x25eeb3);const _0x18c531=_0x31a7a6[_0x1f1cea(0x651)](this['okdb'][_0x1f1cea(0x239)]);return _0x31a7a6[_0x1f1cea(0x4e8)](_0x31a7a6[_0x1f1cea(0x7de)](_0x18c531),_0x31a7a6[_0x1f1cea(0x3fa)](_0x18c531)+_0x1f1cea(0x26d));}['resolveBackupDest'](_0x5845fa){const _0x308e12=_0x1cf9ad,_0x38fa8b=this[_0x308e12(0x3bb)]();_0x498a3a[_0x308e12(0x753)](_0x38fa8b,{'recursive':!![]});const _0x2a4eab=_0x498a3a[_0x308e12(0x463)](_0x38fa8b),_0x5cbab4=_0x5845fa==null||String(_0x5845fa)[_0x308e12(0x44e)]()===''?_0x308e12(0x3cb)+new Date()[_0x308e12(0x794)]()[_0x308e12(0x798)](/[:.]/g,'-'):String(_0x5845fa)[_0x308e12(0x44e)](),_0x145706=_0x31a7a6[_0x308e12(0x651)](_0x38fa8b,_0x5cbab4);let _0x385146=_0x145706;const _0x42230f=[];while(!_0x498a3a[_0x308e12(0x50f)](_0x385146)){_0x42230f[_0x308e12(0x34c)](_0x31a7a6[_0x308e12(0x3fa)](_0x385146));const _0x19aa16=_0x31a7a6['dirname'](_0x385146);if(_0x19aa16===_0x385146)break;_0x385146=_0x19aa16;}const _0x34077b=_0x31a7a6[_0x308e12(0x4e8)](_0x498a3a[_0x308e12(0x463)](_0x385146),..._0x42230f),_0x157541=_0x31a7a6[_0x308e12(0x499)](_0x2a4eab,_0x34077b);if(_0x157541===''||_0x157541['startsWith']('..')||_0x31a7a6['isAbsolute'](_0x157541))throw new _0x2c9b60(_0x308e12(0x2da)+_0x5cbab4+_0x308e12(0x3a8)+_0x38fa8b+_0x308e12(0x3e7),_0x308e12(0x493),{'root':_0x38fa8b,'destDir':_0x5cbab4});return{'root':_0x38fa8b,'dest':_0x34077b};}async[_0x1cf9ad(0x4fa)](_0xd0dc7,_0x15226b,_0x1d584c={'count':0x0,'bytes':0x0},_0x659ad8=null,_0x22afff=0x0){const _0x2b9163=_0x1cf9ad;_0x498a3a[_0x2b9163(0x753)](_0x15226b,{'recursive':!![]});for(const _0x47fff2 of _0x498a3a[_0x2b9163(0x205)](_0xd0dc7,{'withFileTypes':!![]})){if(_0x659ad8?.(_0x47fff2[_0x2b9163(0x76e)],_0x22afff))continue;const _0x5c453b=_0x31a7a6[_0x2b9163(0x4e8)](_0xd0dc7,_0x47fff2[_0x2b9163(0x76e)]),_0x2fa309=_0x31a7a6[_0x2b9163(0x4e8)](_0x15226b,_0x47fff2[_0x2b9163(0x76e)]);if(_0x47fff2[_0x2b9163(0x4f8)]())await this['_copyDir'](_0x5c453b,_0x2fa309,_0x1d584c,_0x659ad8,_0x22afff+0x1);else{try{await _0x498a3a['promises'][_0x2b9163(0x6ea)](_0x5c453b,_0x2fa309);}catch(_0x2b75ec){if(_0x2b75ec?.[_0x2b9163(0x247)]===_0x2b9163(0x7c6))continue;throw _0x2b75ec;}_0x1d584c[_0x2b9163(0x39f)]++;try{_0x1d584c[_0x2b9163(0x40d)]+=_0x498a3a[_0x2b9163(0x77f)](_0x2fa309)[_0x2b9163(0x784)];}catch{}}}return _0x1d584c;}async[_0x1cf9ad(0x5f1)](_0x5502dc={}){const _0x421289=_0x1cf9ad,{envName:envName=_0x421289(0x24a),types:types=null,includeChanges:includeChanges=![]}=_0x5502dc,_0x17fe67={'types':{},'changes':[]},_0x3cddda=[],_0x425c36=new require$$5['Writable']({'write'(_0xe8dcbf,_0x83d48a,_0x27d80c){const _0x28e409=_0x421289;_0x3cddda[_0x28e409(0x5bb)](String(_0xe8dcbf)),_0x27d80c();}});await this[_0x421289(0x3e2)](_0x425c36,{'envName':envName,'types':types,'includeChanges':includeChanges});for(const _0x3c2360 of _0x3cddda['join']('')[_0x421289(0x310)]('\x0a')){const _0x32d44a=_0x3c2360[_0x421289(0x44e)]();if(!_0x32d44a)continue;let _0x1ae067;try{_0x1ae067=JSON[_0x421289(0x527)](_0x32d44a);}catch{continue;}if(_0x1ae067['r']===_0x28aacc){if(!_0x17fe67[_0x421289(0x4f6)][_0x1ae067[_0x421289(0x465)]])_0x17fe67[_0x421289(0x4f6)][_0x1ae067['type']]={'entries':[]};if(_0x1ae067[_0x421289(0x79b)])_0x17fe67[_0x421289(0x4f6)][_0x1ae067[_0x421289(0x465)]][_0x421289(0x79b)]=_0x1ae067[_0x421289(0x79b)];if(_0x1ae067[_0x421289(0x7f5)])_0x17fe67[_0x421289(0x4f6)][_0x1ae067['type']][_0x421289(0x7f5)]=_0x1ae067[_0x421289(0x7f5)];if(_0x1ae067['schema'])_0x17fe67[_0x421289(0x4f6)][_0x1ae067['type']][_0x421289(0x498)]=_0x1ae067[_0x421289(0x498)];}else{if(_0x1ae067['r']===_0x5b0709){if(!_0x17fe67[_0x421289(0x4f6)][_0x1ae067['t']])_0x17fe67[_0x421289(0x4f6)][_0x1ae067['t']]={'entries':[]};_0x17fe67[_0x421289(0x4f6)][_0x1ae067['t']]['entries'][_0x421289(0x5bb)]({'key':_0x1ae067['k'],'value':_0x1ae067['v'],'version':_0x1ae067[_0x421289(0x268)]});}else _0x1ae067['r']===_0x53c5f0&&_0x17fe67[_0x421289(0x845)]['push']({'clock':_0x1ae067['clock'],'event':_0x1ae067[_0x421289(0x83b)]});}}return _0x17fe67;}async[_0x1cf9ad(0x3f8)](_0x554aaf,_0x46d4be={}){const _0x2a24e3=_0x1cf9ad,_0x4375a0=[];for(const [_0x1aa888,_0x2ea9b0]of Object[_0x2a24e3(0x7fb)](_0x554aaf[_0x2a24e3(0x4f6)]||{})){const _0x3b29f0={'r':_0x28aacc,'type':_0x1aa888,'indexes':_0x2ea9b0[_0x2a24e3(0x79b)]||[],'ftsIndexes':_0x2ea9b0[_0x2a24e3(0x7f5)]||{}};if(_0x2ea9b0[_0x2a24e3(0x498)])_0x3b29f0[_0x2a24e3(0x498)]=_0x2ea9b0['schema'];_0x4375a0['push'](JSON[_0x2a24e3(0x364)](_0x3b29f0));for(const {key:_0x30f205,value:_0x4b5aa3,version:_0x5a09b5}of _0x2ea9b0[_0x2a24e3(0x7fb)]||[]){_0x4375a0['push'](JSON[_0x2a24e3(0x364)]({'r':_0x5b0709,'t':_0x1aa888,'k':_0x30f205,'v':_0x4b5aa3,'ver':_0x5a09b5}));}}for(const {clock:_0x307858,event:_0x3d8e08}of _0x554aaf[_0x2a24e3(0x845)]||[]){_0x4375a0['push'](JSON['stringify']({'r':_0x53c5f0,'clock':_0x307858,'event':_0x3d8e08}));}const {Readable:_0x39c726}=require$$5,_0x1be813=_0x39c726[_0x2a24e3(0x83d)](_0x4375a0[_0x2a24e3(0x4e8)]('\x0a')+'\x0a');return this[_0x2a24e3(0x666)](_0x1be813,{..._0x46d4be,'dropExisting':_0x46d4be[_0x2a24e3(0x2fe)]??!![]});}async[_0x1cf9ad(0x37e)]({pretty:pretty=![]}={}){const _0xfc3f72=await this['export']();return JSON['stringify'](_0xfc3f72,null,pretty?0x2:0x0);}async['importJSON'](_0x1c5926){const _0x7b1a1c=_0x1cf9ad,_0x11b0c8=JSON['parse'](_0x1c5926);return this[_0x7b1a1c(0x3f8)](_0x11b0c8);}async['exportBlobs'](_0x449db0){const _0x48424f=_0x1cf9ad;if(!this['okdb']['files'])throw new Error(_0x48424f(0x6a5));const _0x3b53f7=this[_0x48424f(0x1cc)][_0x48424f(0x362)]['_blobsDir'];let _0x48dabd=0x0,_0x3461a5=0x0;const _0x1eb0c7=_0x11a793=>{const _0x311d69=_0x48424f;if(!_0x498a3a[_0x311d69(0x50f)](_0x11a793))return;for(const _0x5af28b of _0x498a3a[_0x311d69(0x205)](_0x11a793,{'withFileTypes':!![]})){const _0x589d17=_0x31a7a6[_0x311d69(0x4e8)](_0x11a793,_0x5af28b['name']);if(_0x5af28b[_0x311d69(0x4f8)]()){if(_0x5af28b['name']===_0x311d69(0x49e))continue;_0x1eb0c7(_0x589d17);}else{const _0x519bbe=_0x31a7a6[_0x311d69(0x3fa)](_0x31a7a6[_0x311d69(0x7de)](_0x589d17)),_0x3c57dd=_0x519bbe+_0x5af28b[_0x311d69(0x76e)],_0x50b316=_0x31a7a6[_0x311d69(0x4e8)](_0x449db0,_0x3c57dd[_0x311d69(0x6f2)](0x0,0x2)),_0x4988ed=_0x31a7a6['join'](_0x50b316,_0x3c57dd[_0x311d69(0x6f2)](0x2));_0x498a3a[_0x311d69(0x753)](_0x50b316,{'recursive':!![]}),_0x498a3a[_0x311d69(0x251)](_0x589d17,_0x4988ed),_0x48dabd++;try{_0x3461a5+=_0x498a3a[_0x311d69(0x77f)](_0x589d17)[_0x311d69(0x784)];}catch{}}}};return _0x498a3a[_0x48424f(0x753)](_0x449db0,{'recursive':!![]}),_0x1eb0c7(_0x3b53f7),{'count':_0x48dabd,'bytes':_0x3461a5};}async[_0x1cf9ad(0x629)](_0x20f0d1){const _0x511bef=_0x1cf9ad;if(!this[_0x511bef(0x1cc)][_0x511bef(0x362)])throw new Error(_0x511bef(0x6a5));await this['okdb'][_0x511bef(0x362)][_0x511bef(0x285)]();let _0x5dc463=0x0,_0x1baa8d=0x0;const _0x5aabaa=_0x5a81e4=>{const _0x1e986c=_0x511bef;if(!_0x498a3a[_0x1e986c(0x50f)](_0x5a81e4))return;for(const _0x4314ef of _0x498a3a[_0x1e986c(0x205)](_0x5a81e4,{'withFileTypes':!![]})){const _0x1279f4=_0x31a7a6['join'](_0x5a81e4,_0x4314ef[_0x1e986c(0x76e)]);if(_0x4314ef['isDirectory']())_0x5aabaa(_0x1279f4);else{const _0x49f153=_0x31a7a6['basename'](_0x31a7a6[_0x1e986c(0x7de)](_0x1279f4)),_0x12f8f2=_0x49f153+_0x4314ef['name'],_0x16a9e2=this[_0x1e986c(0x1cc)][_0x1e986c(0x362)][_0x1e986c(0x301)](_0x12f8f2);if(_0x498a3a['existsSync'](_0x16a9e2)){_0x1baa8d++;continue;}const _0xbd9e20=_0x31a7a6['dirname'](_0x16a9e2);_0x498a3a[_0x1e986c(0x753)](_0xbd9e20,{'recursive':!![]}),_0x498a3a['copyFileSync'](_0x1279f4,_0x16a9e2);const _0x3ab1c1=this['okdb'][_0x1e986c(0x362)][_0x1e986c(0x395)](_0x12f8f2);this[_0x1e986c(0x1cc)][_0x1e986c(0x362)]['_blobStatusDb']?.['putSync'](_0x12f8f2,{'refs':_0x3ab1c1}),_0x5dc463++;}}};return _0x5aabaa(_0x20f0d1),{'imported':_0x5dc463,'skipped':_0x1baa8d};}[_0x1cf9ad(0x6c2)](){const _0x21df86=_0x1cf9ad,_0xe67091=[];for(const [,_0x1bb16]of this[_0x21df86(0x1cc)]['_envs']){if(_0x1bb16['_sync']&&_0x1bb16[_0x21df86(0x40b)]('~files'))_0xe67091[_0x21df86(0x5bb)](_0x1bb16);}return _0xe67091;}async[_0x1cf9ad(0x356)](){const _0x36643f=_0x1cf9ad;if(!this[_0x36643f(0x1cc)][_0x36643f(0x362)])throw new Error('files\x20feature\x20not\x20available');await this['okdb'][_0x36643f(0x362)]['_ensure']();const _0x2e9214=[],_0x32a218=this[_0x36643f(0x1cc)][_0x36643f(0x362)];for(const _0xdab187 of this[_0x36643f(0x6c2)]()){for(const {key:_0x28c85f,value:_0x574e96}of _0xdab187[_0x36643f(0x33e)]('~files')){if(!_0x574e96['hash'])continue;const _0x395fe6=_0x32a218[_0x36643f(0x301)](_0x574e96[_0x36643f(0x644)]);!_0x498a3a[_0x36643f(0x50f)](_0x395fe6)&&_0x2e9214['push']({'type':_0x36643f(0x1eb),'env':_0xdab187[_0x36643f(0x76e)],'id':String(_0x28c85f),'hash':_0x574e96[_0x36643f(0x644)],'message':_0x36643f(0x526)+_0x28c85f+'\x22\x20in\x20env\x20\x22'+_0xdab187[_0x36643f(0x76e)]+_0x36643f(0x1ee)+_0x574e96[_0x36643f(0x644)][_0x36643f(0x6f2)](0x0,0x8)+'…)'});const _0xd04fcf=_0x32a218[_0x36643f(0x884)]?.['get'](_0x574e96[_0x36643f(0x644)]);(!_0xd04fcf||_0xd04fcf[_0x36643f(0x250)]<=0x0)&&_0x2e9214[_0x36643f(0x5bb)]({'type':'zero_refs','env':_0xdab187[_0x36643f(0x76e)],'id':String(_0x28c85f),'hash':_0x574e96[_0x36643f(0x644)],'message':'Blob\x20ref-count\x20is\x20zero\x20for\x20~files\x20record\x20\x22'+_0x28c85f+_0x36643f(0x5a8)+_0xdab187['name']+_0x36643f(0x1ee)+_0x574e96[_0x36643f(0x644)][_0x36643f(0x6f2)](0x0,0x8)+'…)'});}}const _0x4f457b=new Set();for(const _0x12e1e4 of this[_0x36643f(0x6c2)]()){for(const {value:_0x41f65f}of _0x12e1e4['getRange']('~files')){if(_0x41f65f[_0x36643f(0x644)])_0x4f457b[_0x36643f(0x4d2)](_0x41f65f[_0x36643f(0x644)]);}}const _0x29bf1e=_0x51c4f2=>{const _0x1489dd=_0x36643f;if(!_0x498a3a[_0x1489dd(0x50f)](_0x51c4f2))return;for(const _0x1efd04 of _0x498a3a[_0x1489dd(0x205)](_0x51c4f2,{'withFileTypes':!![]})){const _0x13ff3f=_0x31a7a6[_0x1489dd(0x4e8)](_0x51c4f2,_0x1efd04[_0x1489dd(0x76e)]);if(_0x1efd04[_0x1489dd(0x4f8)]()){if(_0x1efd04[_0x1489dd(0x76e)]===_0x1489dd(0x49e))continue;_0x29bf1e(_0x13ff3f);}else{const _0x171cbd=_0x31a7a6['basename'](_0x31a7a6[_0x1489dd(0x7de)](_0x13ff3f)),_0x4cdd17=_0x171cbd+_0x1efd04['name'];!_0x4f457b[_0x1489dd(0x5d6)](_0x4cdd17)&&_0x2e9214[_0x1489dd(0x5bb)]({'type':_0x1489dd(0x56f),'hash':_0x4cdd17,'message':'Blob\x20on\x20disk\x20has\x20no\x20~files\x20record\x20in\x20any\x20env\x20(hash:\x20'+_0x4cdd17[_0x1489dd(0x6f2)](0x0,0x8)+'…)'});}}};return _0x29bf1e(_0x32a218[_0x36643f(0x201)]),_0x2e9214;}async[_0x1cf9ad(0x5fa)](){const _0x242ed3=_0x1cf9ad;if(!this[_0x242ed3(0x1cc)][_0x242ed3(0x362)])throw new Error(_0x242ed3(0x6a5));await this[_0x242ed3(0x1cc)][_0x242ed3(0x362)][_0x242ed3(0x285)]();const _0x54ebd9=this[_0x242ed3(0x1cc)][_0x242ed3(0x362)][_0x242ed3(0x884)];if(!_0x54ebd9)throw new Error(_0x242ed3(0x550));const _0x460ba8=[];for(const {key:_0x18cf0b}of _0x54ebd9['getRange']())_0x460ba8['push'](_0x18cf0b);for(const _0x105cc6 of _0x460ba8)_0x54ebd9[_0x242ed3(0x495)](_0x105cc6);const _0x2227ee=new Map();for(const _0x3b1d98 of this['_allEnvsWithFiles']()){for(const {value:_0x565e84}of _0x3b1d98['getRange'](_0x242ed3(0x5bc))){_0x565e84[_0x242ed3(0x644)]&&_0x2227ee[_0x242ed3(0x486)](_0x565e84[_0x242ed3(0x644)],(_0x2227ee[_0x242ed3(0x564)](_0x565e84[_0x242ed3(0x644)])??0x0)+0x1);}}for(const [_0x1465d9,_0x56bfeb]of _0x2227ee){_0x54ebd9[_0x242ed3(0x7ef)](_0x1465d9,{'refs':_0x56bfeb});}return{'rebuilt':_0x2227ee[_0x242ed3(0x784)]};}}return okdbMigrate[_0x1cf9ad(0x87e)]=_0x3024c0,okdbMigrate[_0x1cf9ad(0x87e)][_0x1cf9ad(0x31f)]=_0x8b4a6d,okdbMigrate[_0x1cf9ad(0x87e)];}var okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x588dbd=require$$2$1;function _0xf3764c(_0x327197,_0x224821){const _0x2fa3b3=_0x223d;return _0x588dbd['createHmac'](_0x2fa3b3(0x1be),_0x224821)['update'](_0x327197)[_0x2fa3b3(0x4b2)]('base64url');}function _0x19b346(_0x24a7bb,_0x203c60){const _0x47edf4=_0x223d;if(typeof _0x24a7bb!==_0x47edf4(0x7a6)||typeof _0x203c60!==_0x47edf4(0x7a6))return![];if(Buffer[_0x47edf4(0x849)](_0x24a7bb)!==Buffer[_0x47edf4(0x849)](_0x203c60))return![];return _0x588dbd[_0x47edf4(0x62b)](Buffer[_0x47edf4(0x83d)](_0x24a7bb),Buffer[_0x47edf4(0x83d)](_0x203c60));}function _0x5e0a24(_0x3300b0){const _0x23f7c8=_0x223d;if(!_0x3300b0?.['startsWith'](_0x23f7c8(0x30b)))return null;return _0x3300b0[_0x23f7c8(0x6f2)](0x7);}function _0x4bfa68(_0x4ee50b=0x20){const _0x1a95e3=_0x223d;return _0x588dbd[_0x1a95e3(0x43a)](_0x4ee50b)[_0x1a95e3(0x4c0)](_0x1a95e3(0x71b));}function _0x4fc0b2(_0x15962d){const _0x1fbeea=_0x223d;return _0x588dbd[_0x1fbeea(0x2e9)](_0x1fbeea(0x1be))[_0x1fbeea(0x528)](_0x15962d)[_0x1fbeea(0x4b2)](_0x1fbeea(0x4d4));}function _0x226c88(_0x235b5f,_0x30831e,_0x84dc06=0x36ee80){const _0x28b095=_0x223d;if(!_0x30831e)throw new Error(_0x28b095(0x7b3));const _0x4fa949=Date[_0x28b095(0x872)](),_0x2ede9b=Buffer[_0x28b095(0x83d)](JSON[_0x28b095(0x364)]({'iat':_0x4fa949,'exp':_0x4fa949+_0x84dc06,'sub':_0x235b5f?.['id']??_0x235b5f?.['sub']??null,'username':_0x235b5f?.[_0x28b095(0x4ad)]??_0x235b5f?.[_0x28b095(0x76e)]??null,'roles':Array['isArray'](_0x235b5f?.[_0x28b095(0x485)])?_0x235b5f[_0x28b095(0x485)]:[]}))[_0x28b095(0x4c0)](_0x28b095(0x71b)),_0xf72e0=_0xf3764c(_0x2ede9b,_0x30831e);return _0x2ede9b+'.'+_0xf72e0;}function _0x345724(_0x5f529d,_0x58b22f){const _0x3d05f8=_0x223d;if(!_0x58b22f||typeof _0x5f529d!==_0x3d05f8(0x7a6))return null;const [_0x7d3f3d,_0x4a9b1b]=_0x5f529d[_0x3d05f8(0x310)]('.');if(!_0x7d3f3d||!_0x4a9b1b)return null;const _0x5db3f2=_0xf3764c(_0x7d3f3d,_0x58b22f);if(!_0x19b346(_0x4a9b1b,_0x5db3f2))return null;try{const _0x5ed21b=JSON[_0x3d05f8(0x527)](Buffer['from'](_0x7d3f3d,_0x3d05f8(0x71b))[_0x3d05f8(0x4c0)]()),_0x110b95=0x7530;if(Date['now']()>Number(_0x5ed21b?.['exp']??0x0)+_0x110b95)return null;return _0x5ed21b;}catch{return null;}}async function _0x4d52b(_0x1cc966){return new Promise((_0x2c4c8a,_0x42dde7)=>{const _0x440ace=_0x588dbd['randomBytes'](0x10);_0x588dbd['scrypt'](_0x1cc966,_0x440ace,0x40,(_0x14de09,_0x37b777)=>{const _0x10aecd=_0x223d;if(_0x14de09)return _0x42dde7(_0x14de09);_0x2c4c8a(_0x440ace['toString'](_0x10aecd(0x4d4))+':'+_0x37b777[_0x10aecd(0x4c0)]('hex'));});});}async function _0x376be3(_0x55fc65,_0x1562b6){const _0x2f3c5e=_0x223d;if(typeof _0x1562b6!=='string')return![];const [_0x1bb4b1,_0x2c1a44]=_0x1562b6[_0x2f3c5e(0x310)](':');if(!_0x1bb4b1||!_0x2c1a44)return![];const _0x197e64=Buffer[_0x2f3c5e(0x83d)](_0x1bb4b1,'hex'),_0x335978=Buffer[_0x2f3c5e(0x83d)](_0x2c1a44,_0x2f3c5e(0x4d4));if(_0x335978[_0x2f3c5e(0x744)]!==0x40)return![];return new Promise((_0x1d72e3,_0x520c0e)=>{const _0x4553fb=_0x2f3c5e;_0x588dbd[_0x4553fb(0x438)](_0x55fc65,_0x197e64,0x40,(_0x197258,_0x1cd23d)=>{const _0x543036=_0x4553fb;if(_0x197258)return _0x520c0e(_0x197258);_0x1d72e3(_0x588dbd[_0x543036(0x62b)](_0x1cd23d,_0x335978));});});}return okdbAuthTokens={'hmac':_0xf3764c,'timingSafeEqual':_0x19b346,'parseBearer':_0x5e0a24,'randomToken':_0x4bfa68,'hashToken':_0x4fc0b2,'issueToken':_0x226c88,'authenticateToken':_0x345724,'hashPassword':_0x4d52b,'verifyPassword':_0x376be3},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x3502ba=_0x55b176;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x1ec6b4=require$$0$2,_0x5ccca1=_0x3502ba(0x795),_0x42afc0=new Uint8Array(0x100)[_0x3502ba(0x3b6)](0xff);for(let _0x4e563f=0x0;_0x4e563f<_0x5ccca1[_0x3502ba(0x744)];_0x4e563f++){_0x42afc0[_0x5ccca1['charCodeAt'](_0x4e563f)]=_0x4e563f,_0x42afc0[_0x5ccca1[_0x3502ba(0x343)](_0x4e563f)+0x20]=_0x4e563f;}_0x42afc0['O'['charCodeAt'](0x0)]=0x0,_0x42afc0['o'[_0x3502ba(0x343)](0x0)]=0x0,_0x42afc0['I'[_0x3502ba(0x343)](0x0)]=0x1,_0x42afc0['i'[_0x3502ba(0x343)](0x0)]=0x1,_0x42afc0['L'['charCodeAt'](0x0)]=0x1,_0x42afc0['l'['charCodeAt'](0x0)]=0x1;function _0x553acd(_0x4c243e){const _0xc6763e=_0x3502ba;let _0x381da5=0x0,_0x9f34e6=0x0,_0x6c725='';for(let _0x4300e1=0x0;_0x4300e1<_0x4c243e[_0xc6763e(0x744)];_0x4300e1++){_0x9f34e6=_0x9f34e6<<0x8|_0x4c243e[_0x4300e1],_0x381da5+=0x8;while(_0x381da5>=0x5){_0x381da5-=0x5,_0x6c725+=_0x5ccca1[_0x9f34e6>>>_0x381da5&0x1f];}}return _0x381da5>0x0&&(_0x6c725+=_0x5ccca1[_0x9f34e6<<0x5-_0x381da5&0x1f]),_0x6c725;}function _0x3ba881(_0x12d85c){const _0x1db7ea=_0x3502ba;_0x12d85c=_0x12d85c[_0x1db7ea(0x798)](/-/g,'')['toUpperCase']();let _0x35b195=0x0,_0x3fbc2f=0x0;const _0x46ca8b=[];for(let _0x4ce96a=0x0;_0x4ce96a<_0x12d85c[_0x1db7ea(0x744)];_0x4ce96a++){const _0x3064c9=_0x42afc0[_0x12d85c[_0x1db7ea(0x343)](_0x4ce96a)];if(_0x3064c9===0xff)continue;_0x3fbc2f=_0x3fbc2f<<0x5|_0x3064c9,_0x35b195+=0x5,_0x35b195>=0x8&&(_0x35b195-=0x8,_0x46ca8b[_0x1db7ea(0x5bb)](_0x3fbc2f>>>_0x35b195&0xff));}return Buffer[_0x1db7ea(0x83d)](_0x46ca8b);}const _0x25fa15=[_0x3502ba(0x5b7),'embeddings',_0x3502ba(0x61e),_0x3502ba(0x5ff),_0x3502ba(0x5dc),_0x3502ba(0x82e),_0x3502ba(0x28b),_0x3502ba(0x362)],_0x54f3b8=0x0,_0x51d428=0x1,_0x1026fe=0x2,_0x1bc0b9=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x3c07ba({issuedAt:_0x5533d3,expiresAt:_0x1a0ae6,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x54f3b8}){const _0x26cc2f=_0x3502ba,_0x3e3cc3=Buffer[_0x26cc2f(0x83d)](licensee,'utf8')[_0x26cc2f(0x6f2)](0x0,0x40),_0x2f5d70=0x1+0x1+0x4+0x4+0x1+_0x3e3cc3['length']+0x2+0x10,_0xda2830=Buffer[_0x26cc2f(0x457)](_0x2f5d70);let _0x32f349=0x0;_0xda2830[_0x26cc2f(0x816)](0x1,_0x32f349++),_0xda2830[_0x26cc2f(0x816)](licenseType,_0x32f349++),_0xda2830[_0x26cc2f(0x5a7)](Math[_0x26cc2f(0x259)](_0x5533d3/0x3e8),_0x32f349),_0x32f349+=0x4,_0xda2830[_0x26cc2f(0x5a7)](Math['floor'](_0x1a0ae6/0x3e8),_0x32f349),_0x32f349+=0x4,_0xda2830[_0x26cc2f(0x816)](_0x3e3cc3[_0x26cc2f(0x744)],_0x32f349++),_0x3e3cc3['copy'](_0xda2830,_0x32f349),_0x32f349+=_0x3e3cc3['length'];let _0x8f3180=0x0;for(let _0x7db96f=0x0;_0x7db96f<_0x25fa15['length'];_0x7db96f++){if(features[_0x25fa15[_0x7db96f]])_0x8f3180|=0x1<<_0x7db96f;}_0xda2830[_0x26cc2f(0x5c3)](_0x8f3180,_0x32f349),_0x32f349+=0x2;const _0x27aa17=[_0x26cc2f(0x8de),_0x26cc2f(0x757),_0x26cc2f(0x551),_0x26cc2f(0x7e1)];for(const _0x3b03ca of _0x27aa17){_0xda2830[_0x26cc2f(0x5a7)](limits[_0x3b03ca]||0x0,_0x32f349),_0x32f349+=0x4;}return _0xda2830;}function _0x4632a3(_0x35f68f){const _0x22632f=_0x3502ba;let _0x40c6e5=0x0;const _0x5e301e=_0x35f68f[_0x22632f(0x882)](_0x40c6e5++),_0x43ea71=_0x35f68f[_0x22632f(0x882)](_0x40c6e5++),_0x9e2141=_0x35f68f[_0x22632f(0x716)](_0x40c6e5);_0x40c6e5+=0x4;const _0x2e6b8f=_0x35f68f[_0x22632f(0x716)](_0x40c6e5);_0x40c6e5+=0x4;const _0x424606=_0x35f68f[_0x22632f(0x882)](_0x40c6e5++),_0x15a3f3=_0x35f68f[_0x22632f(0x6f2)](_0x40c6e5,_0x40c6e5+_0x424606)[_0x22632f(0x4c0)](_0x22632f(0x758));_0x40c6e5+=_0x424606;const _0x8e114d=_0x35f68f['readUInt16BE'](_0x40c6e5);_0x40c6e5+=0x2;const _0x58670a={};for(let _0x593774=0x0;_0x593774<_0x25fa15['length'];_0x593774++){_0x58670a[_0x25fa15[_0x593774]]=Boolean(_0x8e114d&0x1<<_0x593774);}const _0x11a861=[_0x22632f(0x8de),'typesPerEnv',_0x22632f(0x551),_0x22632f(0x7e1)],_0x168c1f={};for(const _0x1e8d35 of _0x11a861){const _0x217dcc=_0x35f68f[_0x22632f(0x716)](_0x40c6e5);_0x40c6e5+=0x4,_0x168c1f[_0x1e8d35]=_0x217dcc===0x0?null:_0x217dcc;}return{'v':_0x5e301e,'licenseType':_0x43ea71,'issuedAt':_0x9e2141*0x3e8,'expiresAt':_0x2e6b8f*0x3e8,'licensee':_0x15a3f3,'features':_0x58670a,'limits':_0x168c1f};}function _0xd51a1b(_0x17363f,_0x27d06f){const _0x7f0cb0=_0x3502ba,_0x6396d9=Buffer['concat']([_0x17363f,_0x27d06f]),_0x27c4ec=_0x553acd(_0x6396d9),_0x27b476=[];for(let _0x43ba65=0x0;_0x43ba65<_0x27c4ec['length'];_0x43ba65+=0x8){_0x27b476['push'](_0x27c4ec[_0x7f0cb0(0x6f2)](_0x43ba65,_0x43ba65+0x8));}return _0x27b476[_0x7f0cb0(0x4e8)]('-');}function _0x498205(_0x916426){const _0x3ec167=_0x3502ba;if(typeof _0x916426!==_0x3ec167(0x7a6))throw new Error(_0x3ec167(0x2c7));const _0x21ee2c=_0x3ba881(_0x916426[_0x3ec167(0x798)](/-/g,''));if(_0x21ee2c[_0x3ec167(0x744)]<0x41)throw new Error(_0x3ec167(0x561)+_0x21ee2c[_0x3ec167(0x744)]+_0x3ec167(0x6b8));const _0x4be9e1=_0x21ee2c['slice'](0x0,_0x21ee2c[_0x3ec167(0x744)]-0x40),_0x629ff5=_0x21ee2c[_0x3ec167(0x6f2)](_0x21ee2c[_0x3ec167(0x744)]-0x40);let _0xcee446;try{_0xcee446=_0x4632a3(_0x4be9e1);}catch(_0x5c44ff){throw new Error(_0x3ec167(0x6db)+_0x5c44ff[_0x3ec167(0x262)]);}return{'rawBuf':_0x21ee2c,'payload':_0x4be9e1,'sig':_0x629ff5,'decoded':_0xcee446};}function _0x2c555c(_0x113e6c){const _0x3c941e=_0x3502ba;return _0x1ec6b4[_0x3c941e(0x2e9)](_0x3c941e(0x1be))['update'](_0x113e6c)[_0x3c941e(0x4b2)]()[_0x3c941e(0x6f2)](0x0,0x8);}function _0x511ec2(_0x5b9012,_0x35c729,_0x56e119){const _0x27f21a=_0x3502ba,_0x792d2e=_0x27f21a(0x505)+_0x56e119,_0x10e59a=Buffer['concat']([Buffer['from'](_0x5b9012,_0x27f21a(0x758)),_0x35c729]),_0x33cce1=_0x1ec6b4[_0x27f21a(0x830)]('sha256',_0x792d2e)[_0x27f21a(0x528)](_0x10e59a)[_0x27f21a(0x4b2)](),_0x2523c7=_0x553acd(_0x33cce1[_0x27f21a(0x6f2)](0x0,0x5));return{'pin':_0x2523c7,'pinHmac':_0x33cce1};}function _0x4b2591(_0x3e731e,_0x520f95,_0x5a17f4){const _0x59b428=_0x3502ba,_0x2cef4a=Buffer['allocUnsafe'](0x4d);let _0x5d9352=0x0;_0x2cef4a[_0x59b428(0x816)](0x1,_0x5d9352++),_0x3e731e[_0x59b428(0x4f7)](_0x2cef4a,_0x5d9352),_0x5d9352+=0x8,_0x2cef4a['writeUInt32BE'](_0x520f95,_0x5d9352),_0x5d9352+=0x4,_0x5a17f4[_0x59b428(0x4f7)](_0x2cef4a,_0x5d9352);const _0x1ad8f9=_0x553acd(_0x2cef4a),_0x399439=[];for(let _0x35fd7b=0x0;_0x35fd7b<_0x1ad8f9[_0x59b428(0x744)];_0x35fd7b+=0x6){_0x399439[_0x59b428(0x5bb)](_0x1ad8f9['slice'](_0x35fd7b,_0x35fd7b+0x6));}return _0x399439[_0x59b428(0x4e8)]('-');}function _0x4d33fa(_0x3562f5){const _0x64e4e9=_0x3502ba;if(typeof _0x3562f5!==_0x64e4e9(0x7a6))throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x5a35a9=_0x3ba881(_0x3562f5[_0x64e4e9(0x798)](/-/g,''));if(_0x5a35a9[_0x64e4e9(0x744)]!==0x4d)throw new Error(_0x64e4e9(0x7df)+_0x5a35a9[_0x64e4e9(0x744)]);let _0x2ba844=0x0;const _0xf107db=_0x5a35a9[_0x64e4e9(0x882)](_0x2ba844++),_0x5877ab=_0x5a35a9[_0x64e4e9(0x6f2)](_0x2ba844,_0x2ba844+0x8);_0x2ba844+=0x8;const _0xff7cae=_0x5a35a9['readUInt32BE'](_0x2ba844);_0x2ba844+=0x4;const _0x67118a=_0x5a35a9[_0x64e4e9(0x6f2)](_0x2ba844);return{'v':_0xf107db,'licenseHash':_0x5877ab,'expiry':_0xff7cae,'sig':_0x67118a};}const _0x4eb844=0x100,_0x56a371=new Set(),_0x2579b8=new Map();function _0x1f3eb9(_0x3704eb,_0xb0252e,_0xbf21bc){const _0x518ae1=_0x3502ba;if(typeof _0xbf21bc!==_0x518ae1(0x7a6)||!Buffer[_0x518ae1(0x541)](_0x3704eb)||!Buffer[_0x518ae1(0x541)](_0xb0252e))return _0x1ec6b4[_0x518ae1(0x5a6)](null,_0x3704eb,_0xbf21bc,_0xb0252e);const _0x4678a0=_0xbf21bc+'\x0a'+_0x3704eb[_0x518ae1(0x4c0)]('base64')+'\x0a'+_0xb0252e[_0x518ae1(0x4c0)]('base64');if(_0x56a371[_0x518ae1(0x5d6)](_0x4678a0))return!![];let _0x3c293e=_0x2579b8[_0x518ae1(0x564)](_0xbf21bc);if(!_0x3c293e){_0x3c293e=_0x1ec6b4[_0x518ae1(0x712)](_0xbf21bc);if(_0x2579b8['size']>=0x10)_0x2579b8[_0x518ae1(0x679)]();_0x2579b8['set'](_0xbf21bc,_0x3c293e);}const _0x3dcb70=_0x1ec6b4[_0x518ae1(0x5a6)](null,_0x3704eb,_0x3c293e,_0xb0252e)===!![];if(_0x3dcb70){if(_0x56a371[_0x518ae1(0x784)]>=_0x4eb844)_0x56a371['clear']();_0x56a371[_0x518ae1(0x4d2)](_0x4678a0);}return _0x3dcb70;}function _0x92ae2a({tokenString:_0x395b7b,nodeId:_0x4f6386,rawBlobBuf:_0x192377,pubKeyPem:_0x379cf3,pubFingerprint:_0x354558}){const _0x28c055=_0x3502ba;let _0x8ec03c;try{_0x8ec03c=_0x4d33fa(_0x395b7b);}catch(_0x1da807){return{'valid':![],'reason':_0x28c055(0x7d5)};}const _0x30b23e=_0x2c555c(_0x192377);if(!_0x30b23e['equals'](_0x8ec03c[_0x28c055(0x2bc)]))return{'valid':![],'reason':_0x28c055(0x2f1)};const {pinHmac:_0x4dabc3}=_0x511ec2(_0x4f6386,_0x30b23e,_0x354558),_0x5b3186=Buffer[_0x28c055(0x457)](0x4);_0x5b3186['writeUInt32BE'](_0x8ec03c[_0x28c055(0x66a)],0x0);const _0x4609be=Buffer[_0x28c055(0x3e4)]([Buffer[_0x28c055(0x83d)]([_0x8ec03c['v']]),_0x4dabc3['slice'](0x0,0x5),_0x8ec03c[_0x28c055(0x2bc)],_0x5b3186]);try{const _0x3c02e6=_0x1f3eb9(_0x4609be,_0x8ec03c[_0x28c055(0x377)],_0x379cf3);if(!_0x3c02e6)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x17e196){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x8ec03c['expiry']<Date[_0x28c055(0x872)]()/0x3e8)return{'valid':![],'reason':_0x28c055(0x4f3)};return{'valid':!![],'reason':'ok'};}function _0xbe582a(_0x30548d){const _0x58a6a2=_0x3502ba;if(typeof _0x30548d!==_0x58a6a2(0x7a6))return'unknown';const _0x401e04=_0x30548d[_0x58a6a2(0x44e)]();if(_0x401e04[_0x58a6a2(0x3b2)]('/')||_0x401e04[_0x58a6a2(0x3b2)]('./')||_0x401e04[_0x58a6a2(0x3b2)](_0x58a6a2(0x2e3))||/^[A-Za-z]:[\\/]/[_0x58a6a2(0x52a)](_0x401e04))return _0x58a6a2(0x239);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x401e04))return _0x58a6a2(0x843);const _0x2719f7=_0x401e04['replace'](/[\s-]+/g,'')[_0x58a6a2(0x744)];if(_0x2719f7===0x7c)return'activation';if(_0x2719f7>=0x95&&_0x2719f7<=0xfc)return _0x58a6a2(0x592);return _0x58a6a2(0x3fb);}return okdbLicenseCodec={'toBase32':_0x553acd,'fromBase32':_0x3ba881,'encodeLicensePayload':_0x3c07ba,'decodeLicensePayload':_0x4632a3,'encodeLicenseBlob':_0xd51a1b,'decodeLicenseBlob':_0x498205,'licenseHash':_0x2c555c,'derivePin':_0x511ec2,'encodeActivationToken':_0x4b2591,'decodeActivationToken':_0x4d33fa,'verifyActivation':_0x92ae2a,'verifySignature':_0x1f3eb9,'detectInputType':_0xbe582a,'FEATURE_NAMES':_0x25fa15,'LICENSE_TYPE_STANDARD':_0x54f3b8,'LICENSE_TYPE_OPEN':_0x51d428,'LICENSE_TYPE_INTERNAL':_0x1026fe,'OPEN_LICENSE_MAX_DURATION_MS':_0x1bc0b9},okdbLicenseCodec;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x30c809=_0x55b176;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x4f2564={'PUT':'put','REMOVE':_0x30c809(0x7c3),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x30c809(0x80b),'INDEX_RESET':_0x30c809(0x8b8),'TYPE_REGISTER':'registerType','TYPE_DROP':_0x30c809(0x7cf),'FTS_REGISTER':_0x30c809(0x483),'FTS_DROP':_0x30c809(0x857),'FTS_RESET':_0x30c809(0x619),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x30c809(0x531),'TTL_SET':'setTtl','TTL_CLEAR':_0x30c809(0x407)},_0x4f0ea3={'SYSTEM_READY':_0x30c809(0x579),'FIELD_RESOLVER_REGISTERED':_0x30c809(0x1c8),'SYSTEM_STOPPED':_0x30c809(0x703),'SYSTEM_CLOCK_CHANGE':_0x30c809(0x383),'SYSTEM_POKE':_0x30c809(0x5ce),'SYSTEM_DRAIN':_0x30c809(0x56e),'SYSTEM_TYPE_DROP':_0x30c809(0x3ea),'SYSTEM_PROC':_0x30c809(0x329),'SYSTEM_BUS_STATE_CHANGE':_0x30c809(0x244),'ITEM_CREATE':_0x30c809(0x614),'ITEM_UPDATE':_0x30c809(0x834),'ITEM_REMOVE':'item:remove','ITEM_PENDING':_0x30c809(0x74c),'INDEX_RESET':_0x30c809(0x4ce),'INDEX_READY':_0x30c809(0x818),'INDEX_PROGRESS':_0x30c809(0x20e),'VIEW_PROGRESS':'view:progress','INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x30c809(0x1f9),'FTS_REGISTERED':_0x30c809(0x42e),'FTS_DROP':'fts:drop','FTS_RESET':_0x30c809(0x27b),'SCHEMA_SET':_0x30c809(0x41e),'SCHEMA_DROP':_0x30c809(0x5ec),'UNIQUE_VIOLATION':_0x30c809(0x202),'UNIQUE_VIOLATION_RESOLVED':_0x30c809(0x30c),'REF_VIOLATION':_0x30c809(0x4c2),'REF_VIOLATION_RESOLVED':_0x30c809(0x808),'SYNC_APPLY':'sync:apply','TXN_START':'txn:start','TXN_END':_0x30c809(0x2b6),'TXN_ROLLBACK':_0x30c809(0x4c9),'TYPE_REGISTERED':_0x30c809(0x1db),'TYPE_DROP':_0x30c809(0x44a),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x30c809(0x26f),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x30c809(0x41b),'TTL_SET':_0x30c809(0x8e1),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x30c809(0x833),'LICENSE_ADDED':_0x30c809(0x40a),'LICENSE_ACTIVATED':_0x30c809(0x7ee),'LICENSE_REMOVED':'license:removed'},_0x4a85c3={'CREATING':_0x30c809(0x8d8),'RESETTING':'resetting','READY':_0x30c809(0x404),'DROPPING':_0x30c809(0x724),'WAITING':'waiting','ERROR':_0x30c809(0x20b)},_0x696111={'CREATED':_0x30c809(0x4ea),'STARTING':_0x30c809(0x1b4),'STARTED':_0x30c809(0x783),'STOPPING':_0x30c809(0x40c),'STOPPED':_0x30c809(0x236)},_0x51a837={'CREATING':'creating','READY':'ready','HALTED':_0x30c809(0x393),'STOPPED':_0x30c809(0x236),'RESETTING':_0x30c809(0x444)},_0x134362=Object[_0x30c809(0x719)]({'POKE':_0x30c809(0x1d9),'DRAIN':'bus:drain','TYPE_DROP':_0x30c809(0x41f),'PROC':_0x30c809(0x452),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x134362,'CHANGE_ACTIONS':_0x4f2564,'EVENTS':_0x4f0ea3,'INDEX_STATE':_0x4a85c3,'OKDB_STATE':_0x696111,'VIEW_STATE':_0x51a837},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x13904b=_0x55b176;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x5659a2=require$$0$1,_0x587db8=require$$1,_0x1c40ff=require$$2$1,_0x139069=_0x5659a2['readFileSync'](_0x587db8[_0x13904b(0x4e8)](__dirname,_0x13904b(0x508)),_0x13904b(0x758))[_0x13904b(0x44e)](),_0x31bed0=_0x1c40ff[_0x13904b(0x712)](_0x139069)[_0x13904b(0x5f1)]({'type':_0x13904b(0x4fd),'format':_0x13904b(0x39a)}),_0xacc4dd=_0x1c40ff[_0x13904b(0x2e9)](_0x13904b(0x1be))['update'](_0x31bed0)[_0x13904b(0x4b2)]('hex')[_0x13904b(0x6f2)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x139069,'PUB_FINGERPRINT':_0xacc4dd},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x5621aa=_0x55b176;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x3386d0=require$$2$1,{OKDBError:_0x22ddb6}=requireOkdbError(),{EVENTS:_0x48c8dc}=requireOkdbEnums(),_0x45b620=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x14c19b,LICENSE_TYPE_INTERNAL:_0x3d8393,OPEN_LICENSE_MAX_DURATION_MS:_0x263dc1}=_0x45b620,_0x1e66da=requireOkdbPubkey(),_0x1e411c={'LICENSED_BUILD':_0x5621aa(0x1f8),'PUBLIC_KEY_PEM':_0x1e66da[_0x5621aa(0x4ae)],'PUB_FINGERPRINT':_0x1e66da['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':_0x5621aa(0x777)},_0x45afa4=_0x5621aa(0x8d7),_0x174dc2={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x245c74(_0x5ee244){const _0x487801=_0x5621aa;await _0x5ee244[_0x487801(0x1d5)](_0x45afa4);}class _0xb433de{constructor(_0x328c95){const _0x3071c1=_0x5621aa;this[_0x3071c1(0x1cc)]=_0x328c95,this[_0x3071c1(0x743)]=null;}async['reload'](){const _0x2f54a6=_0x5621aa,_0x15c544=this[_0x2f54a6(0x1cc)][_0x2f54a6(0x46c)];if(!_0x15c544||!_0x15c544[_0x2f54a6(0x40b)](_0x45afa4)){this[_0x2f54a6(0x743)]=null;return;}const _0x1a7035=this[_0x2f54a6(0x1cc)]['id'];let _0x3a8b64=null;for(const {key:_0x56f171,value:_0xd6f32}of _0x15c544[_0x2f54a6(0x33e)](_0x45afa4)){const _0x5642a6=this[_0x2f54a6(0x755)](_0xd6f32,_0x1a7035);_0x5642a6==='active'&&!_0x3a8b64&&(_0x3a8b64={..._0xd6f32,'id':_0x56f171,'status':_0x5642a6});}this[_0x2f54a6(0x743)]=_0x3a8b64;if(this[_0x2f54a6(0x743)]&&this[_0x2f54a6(0x743)]['licenseType']===_0x14c19b){const _0x1c3cd7=Math[_0x2f54a6(0x775)]((this[_0x2f54a6(0x743)][_0x2f54a6(0x481)]-Date[_0x2f54a6(0x872)]())/0x5265c00);this[_0x2f54a6(0x1cc)][_0x2f54a6(0x777)]?.[_0x2f54a6(0x488)](_0x2f54a6(0x697)+_0x1c3cd7+'\x20day(s).',{'feature':_0x2f54a6(0x42d),'licensee':this[_0x2f54a6(0x743)][_0x2f54a6(0x6e7)],'expiresAt':new Date(this[_0x2f54a6(0x743)][_0x2f54a6(0x481)])['toISOString']()});}this[_0x2f54a6(0x743)]&&this[_0x2f54a6(0x743)][_0x2f54a6(0x74e)]===_0x3d8393&&this['okdb']['log']?.[_0x2f54a6(0x488)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x2f54a6(0x42d),'licensee':this[_0x2f54a6(0x743)][_0x2f54a6(0x6e7)]});}[_0x5621aa(0x755)](_0xce7576,_0x19280c){const _0x3d04d5=_0x5621aa;if(!_0xce7576['blob'])return'invalid';let _0x5cec79;try{_0x5cec79=_0x45b620[_0x3d04d5(0x6bc)](_0xce7576[_0x3d04d5(0x592)]);}catch(_0x280b25){return _0x3d04d5(0x7d9);}try{const _0x219d26=_0x45b620[_0x3d04d5(0x5f4)](_0x5cec79['payload'],_0x5cec79[_0x3d04d5(0x377)],_0x1e411c[_0x3d04d5(0x4ae)]);if(!_0x219d26)return _0x3d04d5(0x7d9);}catch(_0x66f63e){return'invalid';}if(_0x5cec79[_0x3d04d5(0x3dc)][_0x3d04d5(0x74e)]===_0x3d8393)return'active';if(_0x5cec79['decoded'][_0x3d04d5(0x481)]<=Date[_0x3d04d5(0x872)]())return _0x3d04d5(0x7b6);if(_0x5cec79[_0x3d04d5(0x3dc)][_0x3d04d5(0x74e)]===_0x14c19b)return _0x3d04d5(0x1d6);if(!_0xce7576[_0x3d04d5(0x3f3)])return _0x3d04d5(0x7e8);const _0x56e552=_0x45b620[_0x3d04d5(0x6c4)]({'tokenString':_0xce7576[_0x3d04d5(0x3f3)],'nodeId':_0x19280c,'rawBlobBuf':_0x5cec79[_0x3d04d5(0x326)],'pubKeyPem':_0x1e411c['PUBLIC_KEY_PEM'],'pubFingerprint':_0x1e411c[_0x3d04d5(0x5dd)]});if(_0x56e552[_0x3d04d5(0x212)]===_0x3d04d5(0x2f1)||_0x56e552['reason']===_0x3d04d5(0x57e))return _0x3d04d5(0x815);if(_0x56e552[_0x3d04d5(0x212)]===_0x3d04d5(0x4f3))return _0x3d04d5(0x7b6);if(!_0x56e552[_0x3d04d5(0x2d4)])return _0x3d04d5(0x815);return _0x3d04d5(0x1d6);}get[_0x5621aa(0x1d6)](){const _0x1e7b63=_0x5621aa;return this[_0x1e7b63(0x743)];}get[_0x5621aa(0x817)](){const _0x546fe4=_0x5621aa;return this[_0x546fe4(0x743)]??_0x174dc2;}[_0x5621aa(0x67d)](_0x4511fd){const _0x481309=_0x5621aa;if(_0x1e411c[_0x481309(0x4af)]!==_0x481309(0x1f8))return;const _0x5570c4=this['effective'];if(!_0x5570c4[_0x481309(0x790)]?.[_0x4511fd]){const _0x543a02=_0x5570c4['_isFree']?_0x481309(0x56c)+_0x4511fd+_0x481309(0x388)+_0x4511fd+_0x481309(0x290):_0x481309(0x431)+_0x4511fd+_0x481309(0x764)+_0x4511fd+'\x22.';throw new _0x22ddb6(_0x543a02,_0x481309(0x47d),{'feature':_0x4511fd});}}['isFeatureEnabled'](_0x457cf8){const _0x3c5c67=_0x5621aa;if(_0x1e411c['LICENSED_BUILD']!==_0x3c5c67(0x1f8))return!![];return!!this[_0x3c5c67(0x817)]['features']?.[_0x457cf8];}[_0x5621aa(0x587)](_0x585ed7){const _0x4af371=_0x5621aa;if(_0x1e411c[_0x4af371(0x4af)]!==_0x4af371(0x1f8))return![];const _0x3f705d=this['effective'][_0x4af371(0x4b4)]?.[_0x585ed7];return!(_0x3f705d===null||_0x3f705d===undefined||_0x3f705d===0x0);}['assertLimit'](_0x462d52,_0x2d3465){const _0x3ab878=_0x5621aa;if(_0x1e411c['LICENSED_BUILD']!==_0x3ab878(0x1f8))return;const _0x3ea2c1=this['effective'],_0x3b0734=_0x3ea2c1['limits']?.[_0x462d52];if(_0x3b0734===null||_0x3b0734===undefined||_0x3b0734===0x0)return;if(_0x2d3465>=_0x3b0734)throw new _0x22ddb6(_0x3ab878(0x4c6)+_0x462d52+'\x20('+_0x2d3465+'/'+_0x3b0734+')',_0x3ab878(0x660),{'limit':_0x462d52,'current':_0x2d3465,'max':_0x3b0734});}async['addLicense'](_0xc9b300){const _0x5adbb7=_0x5621aa;let _0x2fd778;try{_0x2fd778=_0x45b620[_0x5adbb7(0x6bc)](_0xc9b300);}catch(_0x22fa5d){throw new _0x22ddb6('Invalid\x20license\x20blob:\x20'+_0x22fa5d[_0x5adbb7(0x262)],'LICENSE_INVALID');}let _0x2609ee;try{_0x2609ee=_0x45b620['verifySignature'](_0x2fd778[_0x5adbb7(0x81f)],_0x2fd778[_0x5adbb7(0x377)],_0x1e411c[_0x5adbb7(0x4ae)]);}catch(_0x3bc85e){throw new _0x22ddb6(_0x5adbb7(0x77c)+_0x3bc85e[_0x5adbb7(0x262)],_0x5adbb7(0x2e6));}if(!_0x2609ee)throw new _0x22ddb6(_0x5adbb7(0x397)+(_0x5adbb7(0x50d)+_0x1e411c[_0x5adbb7(0x5dd)]+'.\x20')+_0x5adbb7(0x64f),_0x5adbb7(0x2e6),{'expectedFingerprint':_0x1e411c[_0x5adbb7(0x5dd)]});if(_0x2fd778[_0x5adbb7(0x3dc)][_0x5adbb7(0x74e)]===_0x14c19b){const _0xf8b2a6=_0x2fd778[_0x5adbb7(0x3dc)][_0x5adbb7(0x481)]-_0x2fd778['decoded'][_0x5adbb7(0x588)];if(_0xf8b2a6>_0x263dc1)throw new _0x22ddb6(_0x5adbb7(0x5e7)+Math['ceil'](_0xf8b2a6/(0x1e*0x5265c00))+_0x5adbb7(0x684),'LICENSE_INVALID');}const _0x4ead04=this['okdb'][_0x5adbb7(0x46c)];await _0x245c74(_0x4ead04);const _0x287082=_0x45b620['licenseHash'](_0x2fd778[_0x5adbb7(0x326)])[_0x5adbb7(0x4c0)]('hex');for(const {key:_0x14cf79,value:_0x491554}of _0x4ead04['getRange'](_0x45afa4)){if(_0x491554[_0x5adbb7(0x6f4)]===_0x287082)throw new _0x22ddb6(_0x5adbb7(0x7ed),'LICENSE_ALREADY_STORED',{'id':_0x14cf79});}const _0x16d1b0=_0x3386d0['createHash'](_0x5adbb7(0x1be))['update'](_0x5adbb7(0x4c3))['update'](_0x2fd778[_0x5adbb7(0x326)])[_0x5adbb7(0x4b2)](_0x5adbb7(0x4d4)),_0xfbdceb=_0x16d1b0[_0x5adbb7(0x6f2)](0x0,0x8)+'-'+_0x16d1b0['slice'](0x8,0xc)+'-5'+_0x16d1b0['slice'](0xd,0x10)+'-'+(parseInt(_0x16d1b0[0x10],0x10)&0x3|0x8)[_0x5adbb7(0x4c0)](0x10)+_0x16d1b0[_0x5adbb7(0x6f2)](0x11,0x14)+'-'+_0x16d1b0[_0x5adbb7(0x6f2)](0x14,0x20),_0x376b03={'blob':_0xc9b300,'activation':null,'addedAt':Date[_0x5adbb7(0x872)](),'_licenseHash':_0x287082,'licensee':_0x2fd778['decoded'][_0x5adbb7(0x6e7)],'expiresAt':_0x2fd778[_0x5adbb7(0x3dc)]['expiresAt'],'features':_0x2fd778[_0x5adbb7(0x3dc)][_0x5adbb7(0x790)],'limits':_0x2fd778['decoded'][_0x5adbb7(0x4b4)],'licenseType':_0x2fd778[_0x5adbb7(0x3dc)][_0x5adbb7(0x74e)]};return await _0x4ead04[_0x5adbb7(0x625)](_0x45afa4,_0xfbdceb,_0x376b03),{'id':_0xfbdceb,..._0x376b03};}async[_0x5621aa(0x63f)](_0x876123){const _0x447d0c=_0x5621aa;let _0x5ac28d;try{_0x5ac28d=_0x45b620[_0x447d0c(0x749)](_0x876123);}catch(_0x56e4b6){throw new _0x22ddb6(_0x447d0c(0x5e9)+_0x56e4b6['message'],_0x447d0c(0x574));}const _0x379c1f=_0x5ac28d[_0x447d0c(0x2bc)]['toString'](_0x447d0c(0x4d4)),_0x295b75=this[_0x447d0c(0x1cc)]['_systemEnv'];if(!_0x295b75||!_0x295b75[_0x447d0c(0x40b)](_0x45afa4))throw new _0x22ddb6(_0x447d0c(0x58e),_0x447d0c(0x574));let _0x239421=null,_0x1d7aec=null;for(const {key:_0x2cd0e5,value:_0xe73da8}of _0x295b75['getRange'](_0x45afa4)){if(_0xe73da8[_0x447d0c(0x6f4)]===_0x379c1f){_0x239421=_0x2cd0e5,_0x1d7aec=_0xe73da8;break;}}if(!_0x239421)throw new _0x22ddb6(_0x447d0c(0x58e),_0x447d0c(0x574));const {rawBuf:_0x40bb64}=_0x45b620[_0x447d0c(0x6bc)](_0x1d7aec['blob']),_0x593d04=_0x45b620[_0x447d0c(0x6c4)]({'tokenString':_0x876123,'nodeId':this[_0x447d0c(0x1cc)]['id'],'rawBlobBuf':_0x40bb64,'pubKeyPem':_0x1e411c[_0x447d0c(0x4ae)],'pubFingerprint':_0x1e411c[_0x447d0c(0x5dd)]});if(!_0x593d04[_0x447d0c(0x2d4)])throw new _0x22ddb6('Activation\x20invalid:\x20'+_0x593d04[_0x447d0c(0x212)],_0x447d0c(0x574),{'reason':_0x593d04[_0x447d0c(0x212)]});const _0x1c2f61={..._0x1d7aec,'activation':_0x876123};return await _0x295b75[_0x447d0c(0x528)](_0x45afa4,_0x239421,_0x1c2f61),{'id':_0x239421,..._0x1c2f61};}async[_0x5621aa(0x20c)](_0x1bd9ac){const _0x3ada42=_0x5621aa,_0x4d170f=this[_0x3ada42(0x1cc)]['_systemEnv'];if(!_0x4d170f||!_0x4d170f[_0x3ada42(0x40b)](_0x45afa4))return;await _0x4d170f[_0x3ada42(0x7c3)](_0x45afa4,_0x1bd9ac);}async[_0x5621aa(0x249)](){const _0x1279bc=_0x5621aa,_0x222d8e=this[_0x1279bc(0x1cc)][_0x1279bc(0x46c)];if(!_0x222d8e||!_0x222d8e[_0x1279bc(0x40b)](_0x45afa4))return[];const _0x15e2c5=this[_0x1279bc(0x1cc)]['id'],_0x5c95b5=[];for(const {key:_0x5d4bab,value:_0x5dd572}of _0x222d8e['getRange'](_0x45afa4)){const _0x3b3d4f=this[_0x1279bc(0x755)](_0x5dd572,_0x15e2c5);_0x5c95b5['push']({..._0x5dd572,'id':_0x5d4bab,'status':_0x3b3d4f});}return _0x5c95b5;}[_0x5621aa(0x851)](){const _0x2f843f=_0x5621aa,_0x57e423=this[_0x2f843f(0x1cc)]['_systemEnv'];if(!_0x57e423||!_0x57e423[_0x2f843f(0x40b)](_0x45afa4))return[];const _0x485ff7=this[_0x2f843f(0x1cc)]['id'],_0x163720=[];for(const {key:_0x364fb0,value:_0xad06b}of _0x57e423[_0x2f843f(0x33e)](_0x45afa4)){if(_0xad06b[_0x2f843f(0x6f4)]){if(_0xad06b[_0x2f843f(0x74e)]===_0x14c19b)_0x163720[_0x2f843f(0x5bb)]({'licenseId':_0x364fb0,'pin':null});else{const _0x43b8f6=Buffer['from'](_0xad06b[_0x2f843f(0x6f4)],_0x2f843f(0x4d4)),{pin:_0x1458a1}=_0x45b620[_0x2f843f(0x254)](_0x485ff7,_0x43b8f6,_0x1e411c['PUB_FINGERPRINT']);_0x163720[_0x2f843f(0x5bb)]({'licenseId':_0x364fb0,'pin':_0x1458a1});}}}return _0x163720;}async[_0x5621aa(0x820)](){const _0x5bb360=_0x5621aa,_0x43b0c2=this[_0x5bb360(0x743)];await this[_0x5bb360(0x476)]();if(this['_active']&&this[_0x5bb360(0x743)][_0x5bb360(0x74e)]===_0x14c19b){const _0x135ca6=Math[_0x5bb360(0x775)]((this[_0x5bb360(0x743)]['expiresAt']-Date[_0x5bb360(0x872)]())/0x5265c00);this[_0x5bb360(0x1cc)][_0x5bb360(0x777)]?.[_0x5bb360(0x488)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x135ca6+_0x5bb360(0x728),{'feature':_0x5bb360(0x42d),'licensee':this[_0x5bb360(0x743)][_0x5bb360(0x6e7)],'expiresAt':new Date(this[_0x5bb360(0x743)][_0x5bb360(0x481)])[_0x5bb360(0x794)]()});}this[_0x5bb360(0x743)]&&this[_0x5bb360(0x743)]['licenseType']===_0x3d8393&&this[_0x5bb360(0x1cc)]['log']?.[_0x5bb360(0x488)](_0x5bb360(0x43e),{'feature':_0x5bb360(0x42d),'licensee':this[_0x5bb360(0x743)][_0x5bb360(0x6e7)]});if(_0x43b0c2&&!this['_active']){this[_0x5bb360(0x1cc)][_0x5bb360(0x777)]?.[_0x5bb360(0x488)](_0x5bb360(0x84f),{'feature':_0x5bb360(0x42d)}),this[_0x5bb360(0x1cc)][_0x5bb360(0x700)]?.['emit'](_0x48c8dc[_0x5bb360(0x2e6)],{'previous':_0x43b0c2});const _0xa2fed=this[_0x5bb360(0x1cc)][_0x5bb360(0x878)]?.[_0x5bb360(0x1b7)]??_0x1e411c[_0x5bb360(0x772)];_0xa2fed==='shutdown'&&(this[_0x5bb360(0x1cc)][_0x5bb360(0x777)]?.[_0x5bb360(0x20b)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':_0x5bb360(0x42d)}),this[_0x5bb360(0x1cc)]['close']()[_0x5bb360(0x520)](()=>{})['finally'](()=>process[_0x5bb360(0x633)](0x1)));}}}return okdbLicense={'LicenseChecker':_0xb433de,'_C':_0x1e411c,'FREE_TIER':_0x174dc2},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x3ab8eb=_0x55b176;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x98e306=require$$0$3,_0x500d09=require$$0$1,_0x29dcbc=require$$0,_0x27349d=require$$1,_0x2eda03=_0x27349d[_0x3ab8eb(0x4e8)](_0x29dcbc[_0x3ab8eb(0x786)](),_0x3ab8eb(0x855)),_0x169cfa=0x3e8,_0x3938ae={'reset':_0x3ab8eb(0x5f5),'bold':_0x3ab8eb(0x85e),'dim':_0x3ab8eb(0x1ed),'red':_0x3ab8eb(0x363),'green':_0x3ab8eb(0x5e8),'yellow':_0x3ab8eb(0x676),'blue':_0x3ab8eb(0x405),'magenta':_0x3ab8eb(0x77b),'cyan':'\x1b[36m','white':_0x3ab8eb(0x860),'gray':_0x3ab8eb(0x503)},_0x32c59b=!process[_0x3ab8eb(0x376)][_0x3ab8eb(0x2ea)]||!!process.env.NO_COLOR,_0x1f191f=(_0xd0d2d4,_0x549094)=>_0x32c59b?_0x549094:''+_0xd0d2d4+_0x549094+_0x3938ae['reset'],_0x433684={'error':_0x3938ae[_0x3ab8eb(0x24d)],'warn':_0x3938ae['yellow'],'info':_0x3938ae['cyan'],'debug':_0x3938ae[_0x3ab8eb(0x315)]},_0x527c20={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x4deb58(_0x147c82,_0x5c2502='info'){const _0x122d8a=_0x3ab8eb,{level:_0x2eaa57,msg:_0x149c1a,meta:_0x464c62,context:_0x237319,ts:_0x55a49f}=_0x147c82;if((_0x527c20[_0x2eaa57]??0x1)<(_0x527c20[_0x5c2502]??0x1))return;const _0x4f7058=_0x1f191f(_0x3938ae[_0x122d8a(0x315)],new Date(_0x55a49f)[_0x122d8a(0x794)]()),_0x47bbac=_0x1f191f(_0x433684[_0x2eaa57]??_0x3938ae[_0x122d8a(0x24e)],_0x2eaa57[_0x122d8a(0x435)](0x5));let _0x1a07aa='\x20\x20'+_0x4f7058+'\x20'+_0x1f191f(_0x3938ae[_0x122d8a(0x590)],_0x47bbac)+'\x20'+_0x149c1a;if(_0x464c62&&Object[_0x122d8a(0x766)](_0x464c62)[_0x122d8a(0x744)]>0x0){const _0x39e62e=Object[_0x122d8a(0x7fb)](_0x464c62)['map'](([_0x25d903,_0x3635d1])=>_0x25d903+'='+_0x3635d1)['join']('\x20');_0x1a07aa+=_0x1f191f(_0x3938ae[_0x122d8a(0x3bc)],_0x122d8a(0x2a2)+_0x39e62e+']');}if(_0x237319!==undefined){const _0x199605=typeof _0x237319===_0x122d8a(0x6ce)?JSON[_0x122d8a(0x364)](_0x237319):String(_0x237319);_0x1a07aa+=_0x1f191f(_0x3938ae['dim'],'\x20\x20'+_0x199605);}const _0x150700=_0x2eaa57===_0x122d8a(0x20b)||_0x2eaa57==='warn'?process['stderr']['write'][_0x122d8a(0x829)](process['stderr']):process[_0x122d8a(0x376)][_0x122d8a(0x5ae)][_0x122d8a(0x829)](process[_0x122d8a(0x376)]);_0x150700(_0x1a07aa+'\x0a');}function _0x562c00(_0x57fede,_0x433df4){const _0x17c546=_0x3ab8eb;if(_0x57fede===0xcc||_0x57fede>=0xc8&&_0x57fede<0x12c&&!_0x433df4){console[_0x17c546(0x777)](_0x17c546(0x7c7)+_0x1f191f(_0x3938ae[_0x17c546(0x748)],'✓')+'\x0a');return;}if(_0x57fede>=0x190||_0x433df4?.[_0x17c546(0x20b)]){const _0x31c127=_0x433df4?.['error']??_0x433df4?.['message']??_0x17c546(0x42b)+_0x57fede;console[_0x17c546(0x777)](_0x17c546(0x7c7)+_0x1f191f(_0x3938ae[_0x17c546(0x24d)],'✗')+'\x20'+_0x1f191f(_0x3938ae[_0x17c546(0x590)]+_0x3938ae[_0x17c546(0x24d)],String(_0x57fede))+'\x20\x20'+_0x31c127+'\x0a');return;}const _0x1b6dc5=Object['prototype']['hasOwnProperty'][_0x17c546(0x81a)](_0x433df4??{},_0x17c546(0x2df))?_0x433df4[_0x17c546(0x2df)]:_0x433df4,_0x36d361=_0x433df4?.[_0x17c546(0x56d)];console[_0x17c546(0x777)](''),_0x235326(_0x1b6dc5,'\x20\x20');if(_0x36d361?.['count']!=null||_0x36d361?.[_0x17c546(0x387)]!=null){const _0x1cfd25=[];if(_0x36d361[_0x17c546(0x39f)]!=null)_0x1cfd25[_0x17c546(0x5bb)](_0x36d361[_0x17c546(0x39f)]+_0x17c546(0x62d)+(_0x36d361[_0x17c546(0x39f)]!==0x1?'s':''));if(_0x36d361['time']!=null)_0x1cfd25[_0x17c546(0x5bb)](_0x36d361[_0x17c546(0x387)]+'ms');console[_0x17c546(0x777)](_0x17c546(0x7c7)+_0x1f191f(_0x3938ae[_0x17c546(0x3bc)],_0x1cfd25[_0x17c546(0x4e8)](_0x17c546(0x836))));}console['log']('');}function _0x235326(_0x45db34,_0x45439f=''){const _0x48490a=_0x3ab8eb;if(_0x45db34===null||_0x45db34===undefined){console[_0x48490a(0x777)](_0x45439f+_0x1f191f(_0x3938ae['dim'],'(null)'));return;}if(Array[_0x48490a(0x2fd)](_0x45db34)){if(_0x45db34[_0x48490a(0x744)]===0x0){console[_0x48490a(0x777)](_0x45439f+_0x1f191f(_0x3938ae['dim'],_0x48490a(0x71c)));return;}if(_0x45db34[_0x48490a(0x548)](_0x540766=>_0x540766&&typeof _0x540766==='object'&&_0x48490a(0x3ca)in _0x540766&&'value'in _0x540766)){_0x249641(_0x45db34,_0x45439f);return;}if(_0x45db34[_0x48490a(0x548)](_0x32d75e=>_0x32d75e&&typeof _0x32d75e===_0x48490a(0x6ce)&&_0x48490a(0x465)in _0x32d75e&&_0x48490a(0x39f)in _0x32d75e)){_0x199a9d(_0x45db34,_0x45439f);return;}if(_0x45db34[_0x48490a(0x548)](_0xdf4e25=>typeof _0xdf4e25!==_0x48490a(0x6ce)||_0xdf4e25===null)){_0x45db34['forEach']((_0x407ff4,_0x10fdd7)=>console[_0x48490a(0x777)](_0x45439f+_0x1f191f(_0x3938ae['gray'],_0x10fdd7+0x1+'.')+'\x20'+_0x1f191f(_0x3938ae['white'],String(_0x407ff4))));return;}_0x45db34[_0x48490a(0x4d0)]((_0x2a245a,_0x143429)=>{const _0x49ad9e=_0x48490a;console[_0x49ad9e(0x777)](_0x45439f+_0x1f191f(_0x3938ae[_0x49ad9e(0x3bc)],'['+_0x143429+']'));if(typeof _0x2a245a==='object'&&_0x2a245a!==null)_0xef3c48(_0x2a245a,_0x45439f+'\x20\x20');else console[_0x49ad9e(0x777)](_0x45439f+'\x20\x20'+String(_0x2a245a));});return;}if(typeof _0x45db34==='object'){if('key'in _0x45db34&&'value'in _0x45db34&&Object[_0x48490a(0x766)](_0x45db34)[_0x48490a(0x744)]<=0x3){console[_0x48490a(0x777)](_0x45439f+_0x1f191f(_0x3938ae[_0x48490a(0x590)]+_0x3938ae[_0x48490a(0x48d)],String(_0x45db34[_0x48490a(0x3ca)])));const _0x2d8580=_0x45db34[_0x48490a(0x29e)];if(_0x2d8580&&typeof _0x2d8580==='object')_0xef3c48(_0x2d8580,_0x45439f);else console['log'](_0x45439f+_0x1f191f(_0x3938ae[_0x48490a(0x24e)],String(_0x2d8580)));return;}_0xef3c48(_0x45db34,_0x45439f);return;}console[_0x48490a(0x777)](_0x45439f+_0x1f191f(_0x3938ae[_0x48490a(0x24e)],String(_0x45db34)));}function _0xef3c48(_0x1260e0,_0x5ff9b=''){const _0x25adcb=_0x3ab8eb,_0x3ee3c6=Object[_0x25adcb(0x7fb)](_0x1260e0);if(_0x3ee3c6[_0x25adcb(0x744)]===0x0){console[_0x25adcb(0x777)](_0x5ff9b+_0x1f191f(_0x3938ae[_0x25adcb(0x3bc)],'{}'));return;}const _0x4a13e8=Math[_0x25adcb(0x25f)](0x1c,Math[_0x25adcb(0x7d2)](..._0x3ee3c6['map'](([_0x508156])=>_0x508156[_0x25adcb(0x744)])));for(const [_0x46f8f0,_0x3db0b0]of _0x3ee3c6){const _0x42e7bf=_0x1f191f(_0x3938ae[_0x25adcb(0x48d)],_0x46f8f0[_0x25adcb(0x435)](_0x4a13e8));if(_0x3db0b0===null||_0x3db0b0===undefined)console['log'](_0x5ff9b+_0x42e7bf+'\x20\x20'+_0x1f191f(_0x3938ae[_0x25adcb(0x3bc)],_0x25adcb(0x68c)));else{if(typeof _0x3db0b0===_0x25adcb(0x6ce)){const _0x33166e=JSON['stringify'](_0x3db0b0);_0x33166e[_0x25adcb(0x744)]<=0x50?console[_0x25adcb(0x777)](_0x5ff9b+_0x42e7bf+'\x20\x20'+_0x1f191f(_0x3938ae[_0x25adcb(0x3bc)],_0x33166e)):(console[_0x25adcb(0x777)](_0x5ff9b+_0x42e7bf),_0x235326(_0x3db0b0,_0x5ff9b+'\x20\x20'));}else{const _0x38f520=typeof _0x3db0b0==='boolean'?_0x1f191f(_0x3db0b0?_0x3938ae[_0x25adcb(0x748)]:_0x3938ae['yellow'],String(_0x3db0b0)):typeof _0x3db0b0===_0x25adcb(0x1bc)?_0x1f191f(_0x3938ae[_0x25adcb(0x3dd)],String(_0x3db0b0)):_0x1f191f(_0x3938ae[_0x25adcb(0x24e)],String(_0x3db0b0));console[_0x25adcb(0x777)](_0x5ff9b+_0x42e7bf+'\x20\x20'+_0x38f520);}}}}function _0x249641(_0x1b2299,_0x23abb4=''){const _0x3b9da7=_0x3ab8eb,_0x4bda00=Math[_0x3b9da7(0x25f)](0x20,Math['max'](..._0x1b2299[_0x3b9da7(0x47f)](_0x271df3=>String(_0x271df3[_0x3b9da7(0x3ca)])[_0x3b9da7(0x744)])));for(const {key:_0x583ed3,value:_0x1409a9,score:_0x1b7fd1,clock:_0x275078}of _0x1b2299){const _0x299a1d=_0x1f191f(_0x3938ae[_0x3b9da7(0x590)]+_0x3938ae['cyan'],String(_0x583ed3)['padEnd'](_0x4bda00)),_0x208be7=_0x1409a9==null?_0x1f191f(_0x3938ae[_0x3b9da7(0x3bc)],_0x3b9da7(0x68c)):typeof _0x1409a9===_0x3b9da7(0x6ce)?_0x1f191f(_0x3938ae[_0x3b9da7(0x3bc)],JSON[_0x3b9da7(0x364)](_0x1409a9)):_0x1f191f(_0x3938ae[_0x3b9da7(0x24e)],String(_0x1409a9)),_0x4a1eb0=_0x1b7fd1!=null?_0x1f191f(_0x3938ae['gray'],'\x20\x20score:'+_0x1b7fd1['toFixed'](0x4)):'',_0x215376=_0x275078!=null?_0x1f191f(_0x3938ae[_0x3b9da7(0x315)],_0x3b9da7(0x778)+_0x275078):'';console[_0x3b9da7(0x777)](_0x23abb4+_0x299a1d+'\x20\x20'+_0x208be7+_0x4a1eb0+_0x215376);}}function _0x199a9d(_0x5ac9e3,_0x12bb28=''){const _0x2171a6=_0x3ab8eb,_0x3de99e=Math[_0x2171a6(0x25f)](0x20,Math['max'](..._0x5ac9e3['map'](_0x5bea17=>_0x5bea17['type'][_0x2171a6(0x744)])));for(const {type:_0x5ed69f,count:_0x2681a5,fields:_0x1104ac}of _0x5ac9e3){if(_0x5ed69f['startsWith']('~'))continue;const _0x5fa27d=_0x1f191f(_0x3938ae[_0x2171a6(0x590)]+_0x3938ae[_0x2171a6(0x48d)],_0x5ed69f[_0x2171a6(0x435)](_0x3de99e)),_0x50be8b=_0x1f191f(_0x3938ae['magenta'],String(_0x2681a5)[_0x2171a6(0x453)](0x6))+_0x1f191f(_0x3938ae[_0x2171a6(0x3bc)],_0x2171a6(0x45f)),_0x5bb9ef=_0x1104ac&&Object['keys'](_0x1104ac)[_0x2171a6(0x744)]?_0x1f191f(_0x3938ae[_0x2171a6(0x3bc)],'\x20\x20·\x20'+Object[_0x2171a6(0x766)](_0x1104ac)[_0x2171a6(0x6f2)](0x0,0x6)['join'](',\x20')+(Object[_0x2171a6(0x766)](_0x1104ac)[_0x2171a6(0x744)]>0x6?'…':'')):'';console[_0x2171a6(0x777)](_0x12bb28+_0x5fa27d+'\x20\x20'+_0x50be8b+_0x5bb9ef);}}const _0x457268=[_0x3ab8eb(0x4f6),_0x3ab8eb(0x572),_0x3ab8eb(0x2b3),_0x3ab8eb(0x8b0),_0x3ab8eb(0x2f0),_0x3ab8eb(0x4da)];function _0x343295(_0x522b75,_0x1120ca){const _0x3b876b=_0x3ab8eb;if(_0x522b75[_0x3b876b(0x3b2)]('/api/'))return _0x522b75;if(_0x522b75[_0x3b876b(0x3b2)]('/'))return _0x3b876b(0x824)+_0x522b75;if(_0x522b75[_0x3b876b(0x3b2)](_0x3b876b(0x1fc)))return _0x3b876b(0x7e4)+_0x522b75;const _0x4e2e44=_0x457268['some'](_0x5c5131=>_0x522b75===_0x5c5131[_0x3b876b(0x798)](/\/$/,'')||_0x522b75[_0x3b876b(0x3b2)](_0x5c5131));return _0x4e2e44?_0x3b876b(0x331)+_0x1120ca+'/'+_0x522b75:_0x3b876b(0x7e4)+_0x522b75;}function _0xe910e4(_0xf77fb6){const _0x1f135a=_0x3ab8eb,_0x360f59={},_0x3dda6f=[];let _0x23760d=0x0;while(_0x23760d<_0xf77fb6[_0x1f135a(0x744)]){if((_0xf77fb6[_0x23760d]==='--env'||_0xf77fb6[_0x23760d]==='-e')&&_0xf77fb6[_0x23760d+0x1]&&!_0xf77fb6[_0x23760d+0x1]['startsWith']('-'))_0x360f59['env']=_0xf77fb6[++_0x23760d];else _0xf77fb6[_0x23760d]===_0x1f135a(0x7b5)||_0xf77fb6[_0x23760d]==='-h'?_0x360f59['help']=!![]:_0x3dda6f['push'](_0xf77fb6[_0x23760d]);_0x23760d++;}return{'flags':_0x360f59,'rest':_0x3dda6f};}const _0x298a36={'system':_0x3ab8eb(0x24c),'envs':_0x3ab8eb(0x537),'types':_0x3ab8eb(0x1f6),'data':_0x3ab8eb(0x2f7),'indexes':_0x3ab8eb(0x5f6),'fts':'Full-text\x20search','sync':_0x3ab8eb(0x891),'queue':'Queue','files':_0x3ab8eb(0x2f4),'embeddings':'Embeddings','engines':'Engines','admin':_0x3ab8eb(0x45c),'event':'Events','processor':_0x3ab8eb(0x2d6)},_0x205088=[_0x3ab8eb(0x560),_0x3ab8eb(0x8de),_0x3ab8eb(0x4f6),_0x3ab8eb(0x59c),'indexes',_0x3ab8eb(0x5ff),_0x3ab8eb(0x5b7),_0x3ab8eb(0x26a),'files',_0x3ab8eb(0x248),_0x3ab8eb(0x61e),_0x3ab8eb(0x875)];function _0x5144b9(_0x389751){const _0x143b56=_0x3ab8eb;return _0x389751['replace'](/^\/api/,'')[_0x143b56(0x798)](/^\[\/env\/:env=[^\]]*\]/,_0x143b56(0x53e))['replace'](/^\/env\/:env/,'env/:env')[_0x143b56(0x798)](/^\//,'');}function _0x1e829e(_0x562931,_0x1d51a2=''){const _0x12f413=_0x3ab8eb,_0xbbc09e=_0x562931[_0x12f413(0x6e2)]['listRoutes']()[_0x12f413(0x7d3)](_0x5c74b1=>!_0x5c74b1[_0x12f413(0x56d)]?.['hidden']),_0x4d9a2d=_0x1d51a2?_0xbbc09e[_0x12f413(0x7d3)](_0x381264=>_0x381264[_0x12f413(0x239)][_0x12f413(0x55f)]()[_0x12f413(0x361)](_0x1d51a2[_0x12f413(0x55f)]())||(_0x3b96c3(_0x381264)??'')['toLowerCase']()['includes'](_0x1d51a2[_0x12f413(0x55f)]())||_0xe79d4(_0x381264)[_0x12f413(0x873)](_0x451ed2=>_0x451ed2[_0x12f413(0x55f)]()[_0x12f413(0x361)](_0x1d51a2[_0x12f413(0x55f)]()))):_0xbbc09e;if(!_0x4d9a2d[_0x12f413(0x744)]){console[_0x12f413(0x777)](_0x1f191f(_0x3938ae[_0x12f413(0x281)],_0x12f413(0x877)+_0x1d51a2+'\x22\x0a'));return;}const _0x24a629=new Map();for(const _0x41b55f of _0x4d9a2d){const _0x1d56f4=_0xe79d4(_0x41b55f)[0x0]??_0x12f413(0x468);if(!_0x24a629[_0x12f413(0x5d6)](_0x1d56f4))_0x24a629[_0x12f413(0x486)](_0x1d56f4,[]);_0x24a629['get'](_0x1d56f4)[_0x12f413(0x5bb)](_0x41b55f);}const _0x56163b=[..._0x205088[_0x12f413(0x7d3)](_0x19500e=>_0x24a629[_0x12f413(0x5d6)](_0x19500e)),...[..._0x24a629[_0x12f413(0x766)]()][_0x12f413(0x7d3)](_0x567de8=>!_0x205088[_0x12f413(0x361)](_0x567de8))];console[_0x12f413(0x777)]('');for(const _0x30f8d4 of _0x56163b){const _0x1716e2=_0x24a629['get'](_0x30f8d4);if(!_0x1716e2?.[_0x12f413(0x744)])continue;console[_0x12f413(0x777)](_0x1f191f(_0x3938ae[_0x12f413(0x590)],'\x20\x20'+(_0x298a36[_0x30f8d4]??_0x30f8d4)));for(const _0x166f88 of _0x1716e2){const _0x5bf55f=_0x1f191f(_0x3938ae['magenta'],_0x166f88[_0x12f413(0x827)]['padEnd'](0x7)),_0x50d274=_0x1f191f(_0x3938ae[_0x12f413(0x48d)],_0x5144b9(_0x166f88[_0x12f413(0x239)])),_0x4d56ef=_0x3b96c3(_0x166f88)?_0x1f191f(_0x3938ae[_0x12f413(0x3bc)],'\x20\x20'+_0x3b96c3(_0x166f88)):'',_0x1b83e9=_0x166f88[_0x12f413(0x3d9)]?.['id']?_0x1f191f(_0x3938ae['gray'],_0x12f413(0x2a2)+_0x166f88[_0x12f413(0x3d9)]['id']+']'):'';console[_0x12f413(0x777)](_0x12f413(0x316)+_0x5bf55f+'\x20'+_0x50d274+_0x4d56ef+_0x1b83e9);}console[_0x12f413(0x777)]('');}}function _0x58cc6a(_0x2045e0,_0x108fb6){const _0x4c6348=_0x3ab8eb,_0x3b382e=_0x108fb6[_0x4c6348(0x798)](/^\/api(\/env\/[^/]+)?\//,'')[_0x4c6348(0x310)]('/')[0x0],_0x2a0c64=_0x2045e0['http'][_0x4c6348(0x647)]()[_0x4c6348(0x7d3)](_0x299dfa=>_0x299dfa[_0x4c6348(0x239)]['toLowerCase']()[_0x4c6348(0x361)](_0x3b382e[_0x4c6348(0x55f)]()));if(!_0x2a0c64[_0x4c6348(0x744)]){console[_0x4c6348(0x777)](_0x1f191f(_0x3938ae['yellow'],_0x4c6348(0x3fe)+_0x108fb6+'\x0a'));return;}console[_0x4c6348(0x777)]('');for(const _0x1a5d4d of _0x2a0c64['slice'](0x0,0xc)){for(const _0x540014 of _0x22424d(_0x1a5d4d)){console['log'](_0x540014);}console[_0x4c6348(0x777)]('');}}function _0x3b96c3(_0x3e9bd5){const _0x65ee81=_0x3ab8eb;return _0x3e9bd5[_0x65ee81(0x3d9)]?.[_0x65ee81(0x29b)]??_0x3e9bd5[_0x65ee81(0x56d)]?.[_0x65ee81(0x29b)]??'';}function _0x3d53c9(_0x3b4fca){const _0xfb863f=_0x3ab8eb;return _0x3b4fca[_0xfb863f(0x3d9)]?.['description']??_0x3b4fca[_0xfb863f(0x56d)]?.[_0xfb863f(0x848)]??'';}function _0xe79d4(_0x4b14c3){const _0x52c367=_0x3ab8eb;return _0x4b14c3[_0x52c367(0x3d9)]?.['tags']?.[_0x52c367(0x744)]?_0x4b14c3[_0x52c367(0x3d9)][_0x52c367(0x2eb)]:_0x4b14c3[_0x52c367(0x56d)]?.[_0x52c367(0x2eb)]??[];}function _0x22424d(_0xcc503){const _0x22cac1=_0x3ab8eb,_0x5c90a2=[];_0x5c90a2['push']('\x20\x20'+_0x1f191f(_0x3938ae['bold']+_0x3938ae[_0x22cac1(0x3dd)],_0xcc503[_0x22cac1(0x827)][_0x22cac1(0x435)](0x7))+'\x20'+_0x1f191f(_0x3938ae[_0x22cac1(0x590)]+_0x3938ae[_0x22cac1(0x48d)],_0xcc503['path']));_0xcc503[_0x22cac1(0x3d9)]?.['id']&&_0x5c90a2['push'](_0x22cac1(0x1bd)+_0x1f191f(_0x3938ae[_0x22cac1(0x315)],_0x22cac1(0x21c)+_0xcc503[_0x22cac1(0x3d9)]['id']));_0x3b96c3(_0xcc503)&&_0x5c90a2[_0x22cac1(0x5bb)](_0x22cac1(0x1bd)+_0x1f191f(_0x3938ae[_0x22cac1(0x24e)],_0x3b96c3(_0xcc503)));_0x3d53c9(_0xcc503)&&_0x5c90a2[_0x22cac1(0x5bb)](_0x22cac1(0x1bd)+_0x1f191f(_0x3938ae['dim'],_0x3d53c9(_0xcc503)));_0xe79d4(_0xcc503)['length']&&_0x5c90a2[_0x22cac1(0x5bb)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1f191f(_0x3938ae[_0x22cac1(0x315)],'tags:\x20'+_0xe79d4(_0xcc503)[_0x22cac1(0x4e8)](',\x20')));_0xcc503[_0x22cac1(0x3d9)]?.['safety']?.[_0x22cac1(0x215)]&&_0x5c90a2[_0x22cac1(0x5bb)](_0x22cac1(0x1bd)+_0x1f191f(_0x3938ae['gray'],_0x22cac1(0x42c)+_0xcc503['operation'][_0x22cac1(0x7aa)][_0x22cac1(0x215)]));_0xcc503[_0x22cac1(0x3d9)]?.[_0x22cac1(0x6e2)]?.[_0x22cac1(0x3a0)]&&_0xcc503[_0x22cac1(0x3d9)]['http'][_0x22cac1(0x3a0)]!=='standard'&&_0x5c90a2[_0x22cac1(0x5bb)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1f191f(_0x3938ae[_0x22cac1(0x315)],_0x22cac1(0x86c)+_0xcc503[_0x22cac1(0x3d9)][_0x22cac1(0x6e2)][_0x22cac1(0x3a0)]));if(_0xcc503['operation']?.[_0x22cac1(0x725)]){const _0x72a09a=Object['keys'](_0xcc503[_0x22cac1(0x3d9)]['inputSchema']['properties']||{});if(_0x72a09a[_0x22cac1(0x744)])_0x5c90a2[_0x22cac1(0x5bb)](_0x22cac1(0x1bd)+_0x1f191f(_0x3938ae[_0x22cac1(0x315)],_0x22cac1(0x6be)+_0x72a09a[_0x22cac1(0x4e8)](',\x20')));}return _0xcc503['meta']?.['body']&&_0x5c90a2['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1f191f(_0x3938ae[_0x22cac1(0x315)],_0x22cac1(0x84b)+JSON[_0x22cac1(0x364)](_0xcc503[_0x22cac1(0x56d)]['body']))),_0x5c90a2;}async function _0x42122b(_0x1ad557,_0x1d7937,_0x17d6e0,_0x230bb5=null){const _0x5482ac=_0x3ab8eb,_0x515f7b=_0x17d6e0['indexOf']('?'),_0x42393b=_0x515f7b>=0x0?_0x17d6e0[_0x5482ac(0x6f2)](0x0,_0x515f7b):_0x17d6e0,_0x196a55=_0x515f7b>=0x0?_0x17d6e0[_0x5482ac(0x6f2)](_0x515f7b+0x1):'',_0x2697c2=Object[_0x5482ac(0x33d)](new URLSearchParams(_0x196a55)[_0x5482ac(0x7fb)]());return _0x1ad557['http'][_0x5482ac(0x894)](_0x1d7937,_0x42393b,{'body':_0x230bb5,'query':_0x2697c2,'headers':{'content-type':_0x5482ac(0x74b)}},{'internal':!![]});}function _0x52ad5e(_0x53884a){const _0x4238e6=_0x3ab8eb;if(!_0x53884a)return null;const _0x227492=_0x53884a[_0x4238e6(0x44e)]();if(!_0x227492)return null;try{return JSON['parse'](_0x227492);}catch{}try{return JSON[_0x4238e6(0x527)](_0x554c4d(_0x227492));}catch(_0xd9af7f){throw new SyntaxError(_0xd9af7f[_0x4238e6(0x262)],{'cause':_0xd9af7f});}}function _0x554c4d(_0x7c41af){const _0x67ed6=_0x3ab8eb;let _0x369bcd='',_0x2ef245=0x0;while(_0x2ef245<_0x7c41af[_0x67ed6(0x744)]){const _0x1de31f=_0x7c41af[_0x2ef245];if(_0x1de31f==='\x22'){_0x369bcd+='\x22',_0x2ef245++;while(_0x2ef245<_0x7c41af[_0x67ed6(0x744)]&&_0x7c41af[_0x2ef245]!=='\x22'){if(_0x7c41af[_0x2ef245]==='\x5c'){_0x369bcd+=_0x7c41af[_0x2ef245++];if(_0x2ef245<_0x7c41af[_0x67ed6(0x744)])_0x369bcd+=_0x7c41af[_0x2ef245++];}else _0x369bcd+=_0x7c41af[_0x2ef245++];}_0x369bcd+='\x22';if(_0x2ef245<_0x7c41af[_0x67ed6(0x744)])_0x2ef245++;continue;}if(_0x1de31f==='\x27'){_0x369bcd+='\x22',_0x2ef245++;while(_0x2ef245<_0x7c41af[_0x67ed6(0x744)]&&_0x7c41af[_0x2ef245]!=='\x27'){if(_0x7c41af[_0x2ef245]==='\x5c'&&_0x7c41af[_0x2ef245+0x1]==='\x27')_0x369bcd+='\x27',_0x2ef245+=0x2;else _0x7c41af[_0x2ef245]==='\x22'?(_0x369bcd+='\x5c\x22',_0x2ef245++):_0x369bcd+=_0x7c41af[_0x2ef245++];}_0x369bcd+='\x22';if(_0x2ef245<_0x7c41af['length'])_0x2ef245++;continue;}if(_0x67ed6(0x1c2)[_0x67ed6(0x361)](_0x1de31f)){_0x369bcd+=_0x1de31f,_0x2ef245++;continue;}let _0x20173f='';while(_0x2ef245<_0x7c41af[_0x67ed6(0x744)]&&!'{}[]:,\x27\x22'[_0x67ed6(0x361)](_0x7c41af[_0x2ef245])&&_0x7c41af[_0x2ef245]!=='\x20'&&_0x7c41af[_0x2ef245]!=='\x09'&&_0x7c41af[_0x2ef245]!=='\x0a'&&_0x7c41af[_0x2ef245]!=='\x0d'){_0x20173f+=_0x7c41af[_0x2ef245++];}let _0x3cf557=_0x2ef245;while(_0x3cf557<_0x7c41af[_0x67ed6(0x744)]&&(_0x7c41af[_0x3cf557]==='\x20'||_0x7c41af[_0x3cf557]==='\x09'))_0x3cf557++;if(_0x7c41af[_0x3cf557]===':')_0x369bcd+='\x22'+_0x20173f+'\x22';else _0x20173f===_0x67ed6(0x1f8)||_0x20173f===_0x67ed6(0x45a)||_0x20173f===_0x67ed6(0x68c)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/['test'](_0x20173f)?_0x369bcd+=_0x20173f:_0x369bcd+='\x22'+_0x20173f+'\x22';}return _0x369bcd[_0x67ed6(0x798)](/,(\s*[}\]])/g,'$1');}function _0x456d95(_0x4af369){const _0x10cdee=_0x3ab8eb,_0x2d8c62=[];let _0x581e95=0x0;while(_0x581e95<_0x4af369[_0x10cdee(0x744)]){while(_0x581e95<_0x4af369['length']&&(_0x4af369[_0x581e95]==='\x20'||_0x4af369[_0x581e95]==='\x09'))_0x581e95++;if(_0x581e95>=_0x4af369[_0x10cdee(0x744)])break;const _0x505c4=_0x4af369[_0x581e95];if(_0x505c4==='{'||_0x505c4==='['){const _0x14cda7=_0x505c4==='{'?'}':']',_0xde4de1=_0x581e95++;let _0x312f3b=0x1,_0x370ebf=![],_0x2c5845='';while(_0x581e95<_0x4af369[_0x10cdee(0x744)]&&_0x312f3b>0x0){const _0x5c292d=_0x4af369[_0x581e95];if(_0x370ebf){if(_0x5c292d==='\x5c')_0x581e95++;else{if(_0x5c292d===_0x2c5845)_0x370ebf=![];}}else{if(_0x5c292d==='\x22'||_0x5c292d==='\x27')_0x370ebf=!![],_0x2c5845=_0x5c292d;else{if(_0x5c292d===_0x505c4)_0x312f3b++;else{if(_0x5c292d===_0x14cda7)_0x312f3b--;}}}_0x581e95++;}_0x2d8c62[_0x10cdee(0x5bb)](_0x4af369[_0x10cdee(0x6f2)](_0xde4de1,_0x581e95));continue;}if(_0x505c4==='\x22'||_0x505c4==='\x27'){const _0xa238de=_0x505c4;_0x581e95++;let _0xf0c08c='';while(_0x581e95<_0x4af369[_0x10cdee(0x744)]&&_0x4af369[_0x581e95]!==_0xa238de){if(_0x4af369[_0x581e95]==='\x5c'&&_0x581e95+0x1<_0x4af369[_0x10cdee(0x744)])_0x581e95++,_0xf0c08c+=_0x4af369[_0x581e95++];else _0xf0c08c+=_0x4af369[_0x581e95++];}if(_0x581e95<_0x4af369[_0x10cdee(0x744)])_0x581e95++;_0x2d8c62[_0x10cdee(0x5bb)](_0xf0c08c);continue;}let _0x55554='';while(_0x581e95<_0x4af369['length']&&_0x4af369[_0x581e95]!=='\x20'&&_0x4af369[_0x581e95]!=='\x09'&&_0x4af369[_0x581e95]!=='{'&&_0x4af369[_0x581e95]!=='['){_0x55554+=_0x4af369[_0x581e95++];}if(_0x55554)_0x2d8c62[_0x10cdee(0x5bb)](_0x55554);}return _0x2d8c62;}function _0x3340f6(_0xe8e25e,_0x34fe9b){const _0x645f22=_0x3ab8eb,_0x50519d=[..._0xe8e25e['_envs']['keys']()]['filter'](_0x3291c8=>!_0x3291c8[_0x645f22(0x3b2)]('~'));console[_0x645f22(0x777)](['',_0x1f191f(_0x3938ae[_0x645f22(0x590)]+_0x3938ae['cyan'],'\x20\x20╔═══════════════════════════╗'),_0x1f191f(_0x3938ae[_0x645f22(0x590)]+_0x3938ae[_0x645f22(0x48d)],_0x645f22(0x2a8))+_0x1f191f(_0x3938ae['bold'],_0x645f22(0x7e5))+_0x1f191f(_0x3938ae['bold']+_0x3938ae[_0x645f22(0x48d)],'║'),_0x1f191f(_0x3938ae[_0x645f22(0x590)]+_0x3938ae[_0x645f22(0x48d)],_0x645f22(0x626)),'','\x20\x20'+_0x1f191f(_0x3938ae[_0x645f22(0x748)],'✓')+'\x20'+_0x1f191f(_0x3938ae[_0x645f22(0x590)],_0x645f22(0x6fb))+_0x645f22(0x6b3)+_0x34fe9b['port'],..._0x34fe9b['clusterWorkers']>0x1?['\x20\x20'+_0x1f191f(_0x3938ae[_0x645f22(0x748)],'✓')+'\x20'+_0x1f191f(_0x3938ae['bold'],_0x645f22(0x324))+'\x20'+_0x34fe9b[_0x645f22(0x881)]+_0x645f22(0x7ad)+_0x1f191f(_0x3938ae[_0x645f22(0x315)],_0x645f22(0x54e))]:[],'\x20\x20'+_0x1f191f(_0x3938ae['green'],'✓')+'\x20'+_0x1f191f(_0x3938ae['bold'],'api')+_0x645f22(0x41a)+_0x34fe9b[_0x645f22(0x689)]+_0x645f22(0x824),'\x20\x20'+_0x1f191f(_0x3938ae[_0x645f22(0x748)],'✓')+'\x20'+_0x1f191f(_0x3938ae[_0x645f22(0x590)],_0x645f22(0x239))+_0x645f22(0x316)+_0x34fe9b[_0x645f22(0x71d)],'\x20\x20'+_0x1f191f(_0x3938ae[_0x645f22(0x748)],'✓')+'\x20'+_0x1f191f(_0x3938ae[_0x645f22(0x590)],'id')+_0x645f22(0x1d0)+_0x1f191f(_0x3938ae[_0x645f22(0x315)],_0xe8e25e['id']),'\x20\x20'+_0x1f191f(_0x3938ae[_0x645f22(0x748)],'✓')+'\x20'+_0x1f191f(_0x3938ae[_0x645f22(0x590)],_0x645f22(0x8de))+_0x645f22(0x316)+_0x50519d['map'](_0x26e348=>_0x1f191f(_0x3938ae[_0x645f22(0x48d)],_0x26e348))[_0x645f22(0x4e8)]('\x20\x20'),..._0x34fe9b['noAdmin']?[]:['\x20\x20'+_0x1f191f(_0x3938ae['green'],'✓')+'\x20'+_0x1f191f(_0x3938ae[_0x645f22(0x590)],'admin')+_0x645f22(0x31e)+_0x34fe9b[_0x645f22(0x689)]+_0x645f22(0x7ca)],'',_0x1f191f(_0x3938ae[_0x645f22(0x3bc)],'\x20\x20Type\x20'+_0x1f191f(_0x3938ae[_0x645f22(0x590)],_0x645f22(0x228))+'\x20for\x20commands,\x20'+_0x1f191f(_0x3938ae['bold'],'routes')+_0x645f22(0x5c2)+_0x1f191f(_0x3938ae[_0x645f22(0x590)],'exit')+'\x20to\x20quit.'),''][_0x645f22(0x4e8)]('\x0a'));}function _0x5b401f(_0x51870b){const _0x3a514f=_0x3ab8eb;console[_0x3a514f(0x777)]('\x0a'+_0x1f191f(_0x3938ae[_0x3a514f(0x590)],_0x3a514f(0x681))+'\x20\x20'+_0x1f191f(_0x3938ae['dim'],_0x3a514f(0x3b8))+_0x3a514f(0x278)+_0x1f191f(_0x3938ae[_0x3a514f(0x48d)],_0x3a514f(0x86a))+_0x3a514f(0x3c8)+_0x1f191f(_0x3938ae['cyan'],_0x3a514f(0x86a))+'\x20'+_0x1f191f(_0x3938ae[_0x3a514f(0x281)],_0x3a514f(0x263))+_0x3a514f(0x5c1)+_0x1f191f(_0x3938ae[_0x3a514f(0x48d)],_0x3a514f(0x2cb))+'\x20'+_0x1f191f(_0x3938ae[_0x3a514f(0x48d)],_0x3a514f(0x86a))+'\x20'+_0x1f191f(_0x3938ae[_0x3a514f(0x281)],_0x3a514f(0x270))+_0x3a514f(0x5c6)+_0x1f191f(_0x3938ae[_0x3a514f(0x3bc)],_0x3a514f(0x477))+_0x3a514f(0x831)+_0x1f191f(_0x3938ae[_0x3a514f(0x315)],_0x3a514f(0x549))+'\x20\x20\x20\x20\x20\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'+_0x1f191f(_0x3938ae[_0x3a514f(0x315)],_0x3a514f(0x8de))+_0x3a514f(0x1dd)+_0x1f191f(_0x3938ae['gray'],_0x3a514f(0x4f6))+'\x20\x20\x20\x20\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/'+_0x51870b[_0x3a514f(0x264)]+_0x3a514f(0x899)+_0x1f191f(_0x3938ae[_0x3a514f(0x315)],_0x3a514f(0x37f))+_0x3a514f(0x1d7)+_0x51870b[_0x3a514f(0x264)]+'/type/users\x0a\x20\x20\x20\x20'+_0x1f191f(_0x3938ae[_0x3a514f(0x315)],_0x3a514f(0x381))+_0x3a514f(0x3e3)+_0x51870b[_0x3a514f(0x264)]+_0x3a514f(0x4a2)+_0x1f191f(_0x3938ae['gray'],_0x3a514f(0x20f))+'\x20→\x20POST\x20/api/env/'+_0x51870b[_0x3a514f(0x264)]+'/type/users/query\x0a\x20\x20\x20\x20'+_0x1f191f(_0x3938ae[_0x3a514f(0x315)],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+'\x0a\x20\x20\x20\x20'+_0x1f191f(_0x3938ae['gray'],_0x3a514f(0x473))+'\x0a\x20\x20\x20\x20'+_0x1f191f(_0x3938ae[_0x3a514f(0x315)],_0x3a514f(0x338))+_0x3a514f(0x756)+_0x1f191f(_0x3938ae['bold'],_0x3a514f(0x32c))+'\x20\x20'+_0x1f191f(_0x3938ae[_0x3a514f(0x3bc)],_0x3a514f(0x4dd))+_0x3a514f(0x278)+_0x1f191f(_0x3938ae['cyan'],_0x3a514f(0x7bf))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20'+_0x1f191f(_0x3938ae[_0x3a514f(0x48d)],'--help')+_0x3a514f(0x2e2)+_0x1f191f(_0x3938ae['dim'],_0x3a514f(0x477))+'\x0a\x20\x20\x20\x20'+_0x1f191f(_0x3938ae['gray'],_0x3a514f(0x805))+_0x3a514f(0x831)+_0x1f191f(_0x3938ae[_0x3a514f(0x315)],_0x3a514f(0x6e0))+_0x3a514f(0x831)+_0x1f191f(_0x3938ae['gray'],_0x3a514f(0x6e4))+'\x0a\x0a'+_0x1f191f(_0x3938ae['bold'],_0x3a514f(0x320))+_0x3a514f(0x278)+_0x1f191f(_0x3938ae[_0x3a514f(0x48d)],'use\x20<env>')+_0x3a514f(0x49d)+_0x1f191f(_0x3938ae[_0x3a514f(0x48d)],_0x3a514f(0x264))+_0x3a514f(0x232)+_0x1f191f(_0x3938ae[_0x3a514f(0x48d)],_0x3a514f(0x652))+'\x20'+_0x1f191f(_0x3938ae[_0x3a514f(0x3bc)],'[filter]')+_0x3a514f(0x31c)+_0x1f191f(_0x3938ae['cyan'],_0x3a514f(0x5a4))+'\x20'+_0x1f191f(_0x3938ae[_0x3a514f(0x3bc)],'[on|off|level]')+_0x3a514f(0x8cb)+_0x1f191f(_0x3938ae[_0x3a514f(0x48d)],_0x3a514f(0x35f))+_0x3a514f(0x2f2)+_0x1f191f(_0x3938ae[_0x3a514f(0x48d)],_0x3a514f(0x228))+_0x3a514f(0x422)+_0x1f191f(_0x3938ae[_0x3a514f(0x48d)],_0x3a514f(0x633))+'\x20'+_0x1f191f(_0x3938ae[_0x3a514f(0x3bc)],_0x3a514f(0x425))+_0x3a514f(0x5ed));}let _0x58a287=![];async function _0x5b7b15(_0x3e516f,_0x1eb4a5=0x0,_0x4cccac=null){const _0x399c2f=_0x3ab8eb;_0x58a287&&(process['stderr']['write'](_0x1f191f(_0x3938ae[_0x399c2f(0x24d)],_0x399c2f(0x47e))),process[_0x399c2f(0x633)](0x82));_0x58a287=!![],process['stdout'][_0x399c2f(0x5ae)]('\x0a'),process['stderr'][_0x399c2f(0x5ae)](_0x1f191f(_0x3938ae[_0x399c2f(0x281)],_0x399c2f(0x80c)+(_0x4cccac?'received\x20'+_0x4cccac+',\x20':'')+_0x399c2f(0x7da)));const _0x57eacd=setTimeout(()=>{const _0x8692ee=_0x399c2f;process[_0x8692ee(0x7f8)][_0x8692ee(0x5ae)](_0x1f191f(_0x3938ae[_0x8692ee(0x24d)],_0x8692ee(0x844))),process['exit'](0x1);},0x1388);try{await _0x3e516f[_0x399c2f(0x2de)]();}catch(_0xd1621d){console[_0x399c2f(0x20b)](_0x1f191f(_0x3938ae[_0x399c2f(0x24d)],'\x20\x20'+_0xd1621d['message']));}clearTimeout(_0x57eacd),process[_0x399c2f(0x7f8)][_0x399c2f(0x5ae)](_0x1f191f(_0x3938ae[_0x399c2f(0x3bc)],_0x399c2f(0x1ce))),process[_0x399c2f(0x633)](_0x1eb4a5);}function _0x54d300(_0x3a4914){const _0x3e1fd2=_0x3ab8eb,_0x2a8ac0=_0x3a4914[_0x3e1fd2(0x264)]!==_0x3e1fd2(0x24a)?_0x1f191f(_0x3938ae[_0x3e1fd2(0x281)],'['+_0x3a4914[_0x3e1fd2(0x264)]+']'):'';return _0x1f191f(_0x3938ae[_0x3e1fd2(0x590)]+_0x3938ae[_0x3e1fd2(0x48d)],_0x3e1fd2(0x1cc))+_0x2a8ac0+_0x1f191f(_0x3938ae['gray'],'>\x20');}const _0x52cd64=new Set(['GET',_0x3ab8eb(0x4aa),_0x3ab8eb(0x4b5),_0x3ab8eb(0x219),_0x3ab8eb(0x5e5)]);async function _0x57635f(_0x596788,_0x57223a,_0x44123f,_0x1b0073,_0x5a2541,_0x286505){const _0x19bc2a=_0x3ab8eb;_0x596788=_0x596788[_0x19bc2a(0x44e)]();if(!_0x596788||_0x596788['startsWith']('#'))return;const _0x5830b7=_0x456d95(_0x596788),{flags:_0x3bedfe,rest:_0x2b11e9}=_0xe910e4(_0x5830b7);if(!_0x2b11e9[_0x19bc2a(0x744)])return;const _0x177d35=_0x2b11e9[0x0],_0x4cfcec=_0x177d35[_0x19bc2a(0x475)]();if(_0x4cfcec===_0x19bc2a(0x600)){if(_0x2b11e9[0x1])_0x58cc6a(_0x57223a,_0x343295(_0x2b11e9[0x1],_0x3bedfe[_0x19bc2a(0x264)]??_0x5a2541['env']));else _0x5b401f(_0x5a2541);return;}if(_0x4cfcec===_0x19bc2a(0x30d)){const _0x5e0291=_0x2b11e9[0x1];if(!_0x5e0291){console[_0x19bc2a(0x777)](_0x1f191f(_0x3938ae[_0x19bc2a(0x24d)],_0x19bc2a(0x1f1)));return;}try{_0x57223a[_0x19bc2a(0x264)](_0x5e0291),_0x5a2541[_0x19bc2a(0x264)]=_0x5e0291,_0x286505?.['setPrompt'](_0x54d300(_0x5a2541)),console[_0x19bc2a(0x777)](_0x19bc2a(0x7c7)+_0x1f191f(_0x3938ae[_0x19bc2a(0x748)],'✓')+'\x20active\x20env:\x20'+_0x1f191f(_0x3938ae[_0x19bc2a(0x590)]+_0x3938ae['cyan'],_0x5e0291)+'\x0a');}catch{console['log'](_0x19bc2a(0x7c7)+_0x1f191f(_0x3938ae[_0x19bc2a(0x24d)],'✗')+'\x20environment\x20'+_0x1f191f(_0x3938ae['bold'],_0x5e0291)+'\x20not\x20found'+_0x1f191f(_0x3938ae[_0x19bc2a(0x3bc)],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x4cfcec===_0x19bc2a(0x1f3)){const _0x5eea6f=[..._0x57223a['_envs'][_0x19bc2a(0x766)]()][_0x19bc2a(0x7d3)](_0x2050aa=>!_0x2050aa[_0x19bc2a(0x3b2)]('~'));console['log']('');for(const _0x1c9a66 of _0x5eea6f){const _0x3008e6=_0x1c9a66===_0x5a2541[_0x19bc2a(0x264)];console[_0x19bc2a(0x777)]('\x20\x20'+(_0x3008e6?_0x1f191f(_0x3938ae['green'],'●'):_0x1f191f(_0x3938ae[_0x19bc2a(0x3bc)],'○'))+'\x20\x20'+(_0x3008e6?_0x1f191f(_0x3938ae['bold']+_0x3938ae['cyan'],_0x1c9a66):_0x1f191f(_0x3938ae[_0x19bc2a(0x3bc)],_0x1c9a66)));}console[_0x19bc2a(0x777)](_0x19bc2a(0x7c7)+_0x1f191f(_0x3938ae['dim'],_0x19bc2a(0x74a))+'\x20'+_0x1f191f(_0x3938ae['cyan'],_0x5a2541[_0x19bc2a(0x264)])),console[_0x19bc2a(0x777)]('');return;}if(_0x4cfcec===_0x19bc2a(0x624)){const _0x27e666=[..._0x57223a['_envs'][_0x19bc2a(0x5fb)]()][_0x19bc2a(0x7d3)](_0x340b6f=>!_0x340b6f[_0x19bc2a(0x76e)][_0x19bc2a(0x3b2)]('~'));console[_0x19bc2a(0x777)]('');const _0x47f20f=Math['max'](..._0x27e666[_0x19bc2a(0x47f)](_0x79a4e0=>_0x79a4e0[_0x19bc2a(0x76e)]['length']));for(const _0x581708 of _0x27e666){const _0x240105=_0x581708[_0x19bc2a(0x76e)]===_0x5a2541[_0x19bc2a(0x264)],_0x462b36=_0x240105?_0x1f191f(_0x3938ae[_0x19bc2a(0x748)],'●'):_0x1f191f(_0x3938ae[_0x19bc2a(0x3bc)],'○'),_0x22d59e=_0x240105?_0x1f191f(_0x3938ae[_0x19bc2a(0x590)]+_0x3938ae[_0x19bc2a(0x48d)],_0x581708['name'][_0x19bc2a(0x435)](_0x47f20f)):_0x1f191f(_0x3938ae[_0x19bc2a(0x3bc)],_0x581708[_0x19bc2a(0x76e)]['padEnd'](_0x47f20f)),_0x166bfe=[..._0x581708['typeSubDbs'][_0x19bc2a(0x766)]()]['filter'](_0x59888b=>!_0x59888b[_0x19bc2a(0x3b2)]('~')),_0x17b4fc=_0x166bfe[_0x19bc2a(0x744)]?_0x1f191f(_0x3938ae[_0x19bc2a(0x3bc)],_0x166bfe[_0x19bc2a(0x6f2)](0x0,0x5)[_0x19bc2a(0x4e8)](',\x20')+(_0x166bfe[_0x19bc2a(0x744)]>0x5?'\x20\x20+'+(_0x166bfe['length']-0x5)+_0x19bc2a(0x7eb):'')):_0x1f191f(_0x3938ae[_0x19bc2a(0x3bc)],_0x19bc2a(0x3c3));console[_0x19bc2a(0x777)]('\x20\x20'+_0x462b36+'\x20\x20'+_0x22d59e+'\x20\x20'+_0x17b4fc);}console[_0x19bc2a(0x777)]('');return;}if(_0x4cfcec===_0x19bc2a(0x81b)){const _0x1f930a=_0x3bedfe['env']??_0x2b11e9[0x1]??_0x5a2541[_0x19bc2a(0x264)];try{const _0x3a3c75=_0x57223a['env'](_0x1f930a),_0x3ce376=[..._0x3a3c75[_0x19bc2a(0x4fc)][_0x19bc2a(0x766)]()][_0x19bc2a(0x7d3)](_0xf6d88e=>!_0xf6d88e[_0x19bc2a(0x3b2)]('~'))[_0x19bc2a(0x54d)]();console[_0x19bc2a(0x777)](_0x19bc2a(0x7c7)+_0x1f191f(_0x3938ae[_0x19bc2a(0x3bc)],_0x3ce376[_0x19bc2a(0x744)]+'\x20type'+(_0x3ce376[_0x19bc2a(0x744)]!==0x1?'s':'')+_0x19bc2a(0x344)+_0x1f930a));for(const _0x7f935d of _0x3ce376){const _0x11efcc=_0x3a3c75[_0x19bc2a(0x4fc)][_0x19bc2a(0x564)](_0x7f935d),_0x25595d=_0x11efcc?.[_0x19bc2a(0x59c)]?.[_0x19bc2a(0x25b)]?.()??0x0,_0x31418b=_0x1f191f(_0x3938ae[_0x19bc2a(0x590)]+_0x3938ae[_0x19bc2a(0x48d)],_0x7f935d['padEnd'](0x1c));console['log'](_0x19bc2a(0x316)+_0x31418b+'\x20\x20'+_0x1f191f(_0x3938ae[_0x19bc2a(0x3dd)],String(_0x25595d)[_0x19bc2a(0x453)](0x6))+'\x20'+_0x1f191f(_0x3938ae[_0x19bc2a(0x3bc)],_0x19bc2a(0x7f1)));}console[_0x19bc2a(0x777)]('');}catch(_0x1c3189){console[_0x19bc2a(0x20b)](_0x1f191f(_0x3938ae['red'],'\x0a\x20\x20'+_0x1c3189[_0x19bc2a(0x262)]+'\x0a'));}return;}if(_0x4cfcec===_0x19bc2a(0x4df)){_0x1e829e(_0x57223a,_0x2b11e9[_0x19bc2a(0x6f2)](0x1)[_0x19bc2a(0x4e8)]('\x20'));return;}if(_0x4cfcec===_0x19bc2a(0x6e6)){const _0x3569ed=(_0x2b11e9[0x1]??'')[_0x19bc2a(0x55f)]();if(!_0x3569ed||_0x3569ed==='on')_0x1b0073[_0x19bc2a(0x3d8)]=!![],_0x1b0073[_0x19bc2a(0x774)]=_0x19bc2a(0x549),console['log'](_0x19bc2a(0x7c7)+_0x1f191f(_0x3938ae[_0x19bc2a(0x748)],'✓')+_0x19bc2a(0x547)+_0x1f191f(_0x3938ae[_0x19bc2a(0x3bc)],_0x19bc2a(0x2af))+'\x0a');else{if(_0x3569ed===_0x19bc2a(0x429))_0x1b0073[_0x19bc2a(0x3d8)]=![],console[_0x19bc2a(0x777)](_0x19bc2a(0x7c7)+_0x1f191f(_0x3938ae[_0x19bc2a(0x281)],'○')+_0x19bc2a(0x4e2));else _0x527c20[_0x3569ed]!==undefined?(_0x1b0073[_0x19bc2a(0x3d8)]=!![],_0x1b0073[_0x19bc2a(0x774)]=_0x3569ed,console[_0x19bc2a(0x777)](_0x19bc2a(0x7c7)+_0x1f191f(_0x3938ae[_0x19bc2a(0x748)],'✓')+_0x19bc2a(0x8dc)+_0x1f191f(_0x3938ae['bold'],_0x3569ed)+'\x0a')):console[_0x19bc2a(0x20b)](_0x1f191f(_0x3938ae[_0x19bc2a(0x24d)],_0x19bc2a(0x563)));}return;}if(_0x4cfcec===_0x19bc2a(0x47a)||_0x4cfcec==='QUIT'){await _0x5b7b15(_0x57223a,0x0);return;}if(_0x4cfcec===_0x19bc2a(0x27e)){const _0x2955d5=_0x19bc2a(0x5ab)+_0x44123f[_0x19bc2a(0x689)]+'/admin/index.html',_0x2ab0ec=process[_0x19bc2a(0x7b7)]===_0x19bc2a(0x4a0)?_0x19bc2a(0x7c4)+_0x2955d5:process['platform']===_0x19bc2a(0x203)?_0x19bc2a(0x297)+_0x2955d5:_0x19bc2a(0x1c1)+_0x2955d5;require$$4['exec'](_0x2ab0ec),console[_0x19bc2a(0x777)](_0x19bc2a(0x7c7)+_0x1f191f(_0x3938ae['green'],'✓')+_0x19bc2a(0x737)+_0x1f191f(_0x3938ae[_0x19bc2a(0x48d)],_0x2955d5)+'\x0a');return;}let _0x400f11,_0x41e728,_0x4f85aa;if(_0x52cd64['has'](_0x4cfcec)){_0x400f11=_0x4cfcec,_0x41e728=_0x2b11e9[0x1],_0x4f85aa=_0x2b11e9[_0x19bc2a(0x6f2)](0x2);if(!_0x41e728){console[_0x19bc2a(0x20b)](_0x1f191f(_0x3938ae[_0x19bc2a(0x24d)],_0x19bc2a(0x7e6)+_0x177d35+_0x19bc2a(0x51f)));return;}}else _0x400f11=null,_0x41e728=_0x2b11e9[0x0],_0x4f85aa=_0x2b11e9[_0x19bc2a(0x6f2)](0x1);const _0x1ef824=_0x3bedfe[_0x19bc2a(0x264)]??_0x5a2541[_0x19bc2a(0x264)],_0x2a828c=_0x343295(_0x41e728,_0x1ef824);if(_0x3bedfe[_0x19bc2a(0x228)]){_0x58cc6a(_0x57223a,_0x2a828c);return;}let _0x45d650=null;if(_0x4f85aa[_0x19bc2a(0x744)]){const _0x5d6d26=_0x4f85aa[_0x19bc2a(0x4e8)]('\x20');try{_0x45d650=_0x52ad5e(_0x5d6d26);}catch(_0x1f4846){console[_0x19bc2a(0x20b)](_0x1f191f(_0x3938ae[_0x19bc2a(0x24d)],_0x19bc2a(0x3ee)+_0x5d6d26+_0x19bc2a(0x7c7)+_0x1f191f(_0x3938ae[_0x19bc2a(0x3bc)],_0x1f4846[_0x19bc2a(0x262)])+'\x0a'));return;}}if(!_0x400f11)_0x400f11=_0x45d650!==null?_0x19bc2a(0x4aa):'GET';try{const _0x1f2f4e=await _0x42122b(_0x57223a,_0x400f11,_0x2a828c,_0x45d650);_0x562c00(_0x1f2f4e['status'],_0x1f2f4e[_0x19bc2a(0x6fd)]);}catch(_0x1f4239){console['error']('\x0a\x20\x20'+_0x1f191f(_0x3938ae[_0x19bc2a(0x24d)],'✗')+'\x20'+_0x1f4239[_0x19bc2a(0x262)]+'\x0a');}}class _0x4b6596{constructor(){const _0x1a0dc9=_0x3ab8eb;this[_0x1a0dc9(0x60d)]=new Map(),this[_0x1a0dc9(0x89c)]=null,this['terminal']=![];}}function _0x22ab05(_0x2c7ad5){const _0x4f3432=_0x3ab8eb,_0x3d2a0d=new _0x4b6596();for(const _0x30aa7f of _0x2c7ad5){if(_0x30aa7f['meta']?.['hidden'])continue;const _0x3e4a36=_0x30aa7f[_0x4f3432(0x239)][_0x4f3432(0x798)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')[_0x4f3432(0x798)](/^\//,'');if(!_0x3e4a36)continue;let _0x29c5fa=_0x3d2a0d;for(const _0x501533 of _0x3e4a36[_0x4f3432(0x310)]('/')[_0x4f3432(0x7d3)](Boolean)){if(_0x501533[_0x4f3432(0x3b2)](':')){const _0x3b437f=_0x501533[_0x4f3432(0x6f2)](0x1);if(!_0x29c5fa[_0x4f3432(0x89c)])_0x29c5fa[_0x4f3432(0x89c)]={'param':_0x3b437f,'node':new _0x4b6596()};_0x29c5fa=_0x29c5fa['dynamic'][_0x4f3432(0x2e5)];}else{if(!_0x29c5fa[_0x4f3432(0x60d)]['has'](_0x501533))_0x29c5fa['children']['set'](_0x501533,new _0x4b6596());_0x29c5fa=_0x29c5fa[_0x4f3432(0x60d)][_0x4f3432(0x564)](_0x501533);}}_0x29c5fa['terminal']=!![];}return _0x3d2a0d;}const _0x361ac5=new Map();function _0x2371e7(_0x294714,_0x1adce2,_0x3a5016){const _0x41a01a=_0x3ab8eb,_0x165141=_0x361ac5[_0x41a01a(0x564)](_0x294714);if(_0x165141&&_0x165141[_0x41a01a(0x706)]>Date[_0x41a01a(0x872)]())return _0x165141[_0x41a01a(0x8d4)];const _0x140ba1=_0x3a5016();return _0x361ac5['set'](_0x294714,{'val':_0x140ba1,'exp':Date[_0x41a01a(0x872)]()+_0x1adce2}),_0x140ba1;}function _0x47aaca(_0x34e1fb,_0xeaace0,_0x299f1d,_0x1c34c9){const _0x1459d3=_0x3ab8eb,_0x47c9b5=_0xeaace0[_0x1459d3(0x264)]??_0x1c34c9[_0x1459d3(0x264)];switch(_0x34e1fb){case _0x1459d3(0x264):return[..._0x299f1d[_0x1459d3(0x441)][_0x1459d3(0x766)]()][_0x1459d3(0x7d3)](_0x4e5294=>!_0x4e5294[_0x1459d3(0x3b2)]('~'));case'type':return _0x2371e7('types:'+_0x47c9b5,0x7d0,()=>{const _0x4d15e4=_0x1459d3;try{return[..._0x299f1d[_0x4d15e4(0x264)](_0x47c9b5)[_0x4d15e4(0x4fc)][_0x4d15e4(0x766)]()][_0x4d15e4(0x7d3)](_0x2cb2bc=>!_0x2cb2bc[_0x4d15e4(0x3b2)]('~'));}catch{return[];}});case'key':if(!_0xeaace0['type'])return[];return _0x2371e7(_0x1459d3(0x303)+_0x47c9b5+':'+_0xeaace0[_0x1459d3(0x465)],0x5dc,()=>{const _0x2e977e=_0x1459d3;try{const _0x1db007=_0x299f1d[_0x2e977e(0x264)](_0x47c9b5)[_0x2e977e(0x4fc)][_0x2e977e(0x564)](_0xeaace0['type']);if(!_0x1db007?.[_0x2e977e(0x59c)])return[];const _0x1b4707=[];for(const {key:_0x5ab75f}of _0x1db007[_0x2e977e(0x59c)][_0x2e977e(0x33e)]({'limit':0x32})){_0x1b4707[_0x2e977e(0x5bb)](String(_0x5ab75f));if(_0x1b4707[_0x2e977e(0x744)]>=0x32)break;}return _0x1b4707;}catch{return[];}});case _0x1459d3(0x2c6):if(!_0xeaace0[_0x1459d3(0x465)])return[];return _0x2371e7(_0x1459d3(0x4d8)+_0x47c9b5+':'+_0xeaace0[_0x1459d3(0x465)],0x7d0,()=>{const _0x50df93=_0x1459d3;try{const _0xd13905=_0x299f1d[_0x50df93(0x264)](_0x47c9b5)[_0x50df93(0x4fc)][_0x50df93(0x564)](_0xeaace0[_0x50df93(0x465)]);return _0xd13905?[..._0xd13905['indexToDb']?.[_0x50df93(0x766)]()??[]]:[];}catch{return[];}});case'ftsName':if(!_0xeaace0[_0x1459d3(0x465)])return[];return _0x2371e7(_0x1459d3(0x89d)+_0x47c9b5+':'+_0xeaace0[_0x1459d3(0x465)],0x7d0,()=>{const _0x44891e=_0x1459d3;try{return _0x299f1d[_0x44891e(0x5ff)]?.[_0x44891e(0x323)]?.(_0xeaace0['type'],_0x299f1d['env'](_0x47c9b5))?.[_0x44891e(0x47f)](_0x153f06=>_0x153f06['name'])??[];}catch{return[];}});default:return[];}}function _0x1b6c1b(_0x1f2a61,_0x532ea3,_0xce8316,_0x4e8929){const _0x299503=_0x3ab8eb,_0x3f495e=_0x1f2a61['endsWith']('/'),_0x4058a5=_0x1f2a61[_0x299503(0x310)]('/'),_0x236073=_0x3f495e?_0x4058a5[_0x299503(0x6f2)](0x0,-0x1):_0x4058a5[_0x299503(0x6f2)](0x0,-0x1),_0x2bcf95=_0x3f495e?'':_0x4058a5[_0x4058a5[_0x299503(0x744)]-0x1];let _0x240b81=_0x532ea3;const _0x46c8da={};for(const _0x13d021 of _0x236073){if(!_0x13d021)continue;if(_0x240b81['children'][_0x299503(0x5d6)](_0x13d021))_0x240b81=_0x240b81['children']['get'](_0x13d021);else{if(_0x240b81['dynamic'])_0x46c8da[_0x240b81[_0x299503(0x89c)][_0x299503(0x720)]]=_0x13d021,_0x240b81=_0x240b81[_0x299503(0x89c)][_0x299503(0x2e5)];else return[];}}const _0x3500b3=_0x236073['filter'](Boolean),_0x503a4e=_0x3500b3[_0x299503(0x744)]?_0x3500b3[_0x299503(0x4e8)]('/')+'/':'',_0x515e9f=[];for(const [_0x5c37a4]of _0x240b81[_0x299503(0x60d)]){if(_0x5c37a4[_0x299503(0x3b2)](_0x2bcf95))_0x515e9f[_0x299503(0x5bb)](_0x503a4e+_0x5c37a4);}if(_0x240b81[_0x299503(0x89c)])for(const _0x14cd77 of _0x47aaca(_0x240b81[_0x299503(0x89c)][_0x299503(0x720)],_0x46c8da,_0xce8316,_0x4e8929)){if(String(_0x14cd77)[_0x299503(0x3b2)](_0x2bcf95))_0x515e9f[_0x299503(0x5bb)](_0x503a4e+_0x14cd77);}return _0x515e9f['slice'](0x0,0x64);}const _0x4d4155=[_0x3ab8eb(0x228),_0x3ab8eb(0x687),_0x3ab8eb(0x264),_0x3ab8eb(0x8de),_0x3ab8eb(0x4f6),_0x3ab8eb(0x652),'logs','open',_0x3ab8eb(0x633),_0x3ab8eb(0x294)];function _0x1e53e8(_0x16c038,_0x1971f9,_0x35907b){return function _0x227e89(_0x2dd286){const _0x3169eb=_0x223d;try{const _0x2069f3=_0x2dd286['search'](/\s[{[]/),_0x221467=_0x2069f3>=0x0?_0x2dd286[_0x3169eb(0x6f2)](0x0,_0x2069f3):_0x2dd286,_0x3e0e1c=_0x221467[_0x3169eb(0x374)]();if(!_0x3e0e1c){const _0x364ccc=[..._0x4d4155,...[..._0x16c038[_0x3169eb(0x60d)][_0x3169eb(0x766)]()]]['slice'](0x0,0x64);return[_0x364ccc,''];}const _0xb43a77=_0x3e0e1c['split'](/\s+/),_0x10244d=_0xb43a77[0x0],_0x20b40c=_0x10244d[_0x3169eb(0x475)]();if(_0xb43a77[_0x3169eb(0x744)]===0x1){const _0x347ede=_0x10244d[_0x3169eb(0x55f)](),_0x50f826=_0x4d4155['filter'](_0x40b58b=>_0x40b58b[_0x3169eb(0x3b2)](_0x347ede)),_0x48043c=_0x1b6c1b(_0x10244d,_0x16c038,_0x1971f9,_0x35907b),_0x552ef8=[...new Set([..._0x50f826,..._0x48043c])][_0x3169eb(0x6f2)](0x0,0x64);return[_0x552ef8,_0x10244d];}if(_0x52cd64[_0x3169eb(0x5d6)](_0x20b40c)&&_0xb43a77[_0x3169eb(0x744)]===0x2){const _0x46aa96=_0xb43a77[0x1],_0x466699=_0x1b6c1b(_0x46aa96,_0x16c038,_0x1971f9,_0x35907b);return[_0x466699['map'](_0x57030d=>_0x10244d+'\x20'+_0x57030d),_0x10244d+'\x20'+_0x46aa96];}if(!_0x52cd64[_0x3169eb(0x5d6)](_0x20b40c)&&_0xb43a77[_0x3169eb(0x744)]>0x1){const _0x1084ac=_0x1b6c1b(_0x10244d,_0x16c038,_0x1971f9,_0x35907b),_0x43d1f9='\x20'+_0xb43a77[_0x3169eb(0x6f2)](0x1)['join']('\x20');return[_0x1084ac[_0x3169eb(0x47f)](_0x390df2=>_0x390df2+_0x43d1f9),_0x10244d+_0x43d1f9];}return[[],_0x2dd286];}catch{return[[],_0x2dd286];}};}async function _0x1a0596(_0x5397d5,_0xa71c66){const _0x445492=_0x3ab8eb,_0x51f738={'enabled':!![],'level':_0xa71c66[_0x445492(0x655)]??_0x445492(0x549)},_0x5a8a99={'env':_0x445492(0x24a)},_0x3ae92f={'current':null},_0x2a25c2=_0x22ab05(_0x5397d5[_0x445492(0x6e2)][_0x445492(0x647)]()),_0x1624ab=_0x1e53e8(_0x2a25c2,_0x5397d5,_0x5a8a99);_0x5397d5['log']['attach'](_0x522d8b=>{const _0x4a42be=_0x445492;if(!_0x51f738['enabled'])return;_0x4deb58(_0x522d8b,_0x51f738[_0x4a42be(0x774)]),_0x3ae92f[_0x4a42be(0x1d8)]?.[_0x4a42be(0x83e)](!![]);}),_0x3340f6(_0x5397d5,_0xa71c66);const _0x29ade7=_0x98e306[_0x445492(0x69e)]({'input':process[_0x445492(0x793)],'output':process[_0x445492(0x376)],'terminal':!![],'completer':_0x1624ab,'prompt':_0x54d300(_0x5a8a99),'historySize':_0x169cfa});try{const _0x54bb6e=_0x500d09[_0x445492(0x449)](_0x2eda03,'utf8')[_0x445492(0x310)]('\x0a')[_0x445492(0x7d3)](Boolean);_0x29ade7[_0x445492(0x6f5)]=_0x54bb6e['reverse']()[_0x445492(0x6f2)](0x0,_0x169cfa);}catch{}_0x3ae92f['current']=_0x29ade7,_0x29ade7['on'](_0x445492(0x79a),async _0x140be2=>{const _0x19a2fc=_0x445492;_0x29ade7[_0x19a2fc(0x351)]();try{await _0x57635f(_0x140be2,_0x5397d5,_0xa71c66,_0x51f738,_0x5a8a99,_0x29ade7);}catch(_0x5b1bf5){console[_0x19a2fc(0x20b)](_0x1f191f(_0x3938ae[_0x19a2fc(0x24d)],_0x19a2fc(0x450)+_0x5b1bf5[_0x19a2fc(0x262)]));}finally{_0x29ade7[_0x19a2fc(0x7a1)](),_0x29ade7[_0x19a2fc(0x83e)]();}}),_0x29ade7['on'](_0x445492(0x2de),()=>{const _0x18b6eb=_0x445492;try{const _0x308d97=[..._0x29ade7['history']][_0x18b6eb(0x8c3)]()[_0x18b6eb(0x7d3)](Boolean)['slice'](0x0,_0x169cfa);_0x500d09[_0x18b6eb(0x67e)](_0x2eda03,_0x308d97[_0x18b6eb(0x4e8)]('\x0a')+'\x0a');}catch{}_0x5b7b15(_0x5397d5,0x0);});let _0x2504b2=0x0;return process['on'](_0x445492(0x53f),()=>{const _0x1dffd8=_0x445492;if(_0x58a287)return _0x5b7b15(_0x5397d5,0x82,'SIGINT');if(_0x29ade7[_0x1dffd8(0x79a)]==='')return _0x5b7b15(_0x5397d5,0x0,_0x1dffd8(0x53f));const _0x2c1a47=Date['now']();if(_0x2c1a47-_0x2504b2<0x5dc)return _0x5b7b15(_0x5397d5,0x0,_0x1dffd8(0x445));_0x2504b2=_0x2c1a47,process[_0x1dffd8(0x376)][_0x1dffd8(0x5ae)]('\x0a'),_0x29ade7[_0x1dffd8(0x73c)](0x0),_0x29ade7[_0x1dffd8(0x83e)](),process['stderr'][_0x1dffd8(0x5ae)](_0x1f191f(_0x3938ae[_0x1dffd8(0x3bc)],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on']('SIGTERM',()=>_0x5b7b15(_0x5397d5,0x0,_0x445492(0x390))),process['on'](_0x445492(0x70b),()=>_0x5b7b15(_0x5397d5,0x0,_0x445492(0x70b))),_0x29ade7[_0x445492(0x83e)](),_0x29ade7;}return okdbShell={'start':_0x1a0596,'colorLog':_0x4deb58,'lenientParse':_0x52ad5e,'_splitLine':_0x456d95,'_formatRouteHelpLines':_0x22424d,'_routeSummary':_0x3b96c3,'_routeTags':_0xe79d4},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function _0x11b6(){const _0x22ffb6=['dirname','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','maxWrites','Usage:\x20okdb\x20shm-gc\x20[--dry-run]\x20[--prefix\x20<p>]\x20[--any-size]\x20[--force]\x20[--verbose]\x0a\x0aDelete\x20okdb\x20shared-memory\x20segments\x20in\x20/dev/shm\x20that\x20no\x20live\x20process\x20maps\x20or\x20holds\x20open\x0a(older\x20okdb\x20versions\x20never\x20unlinked\x20them).\x20Recognises\x20both\x20the\x20current\x20hashed\x20names\x0a(<path>-<hash>)\x20and\x20the\x20bare-path\x20names\x20of\x20okdb\x20<=\x202.4.0.\x20Linux\x20only.\x0a\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20report\x20what\x20would\x20be\x20deleted,\x20delete\x20nothing\x0a\x20\x20--prefix\x20<p>\x20\x20\x20\x20only\x20names\x20starting\x20with\x20<p>\x20(default\x20\x22-tmp-\x22:\x20stores\x20under\x20/tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22\x22\x20=\x20every\x20okdb-shaped\x20name)\x0a\x20\x20--any-size\x20\x20\x20\x20\x20\x20don\x27t\x20require\x20an\x20okdb\x20segment\x20size\x0a\x20\x20--force\x20\x20\x20\x20\x20\x20\x20\x20\x20delete\x20even\x20if\x20some\x20same-user\x20process\x27s\x20maps\x20could\x20not\x20be\x20read\x0a\x20\x20--verbose,\x20-v\x20\x20\x20print\x20every\x20kept\x20segment\x20and\x20why','startedAt','/api/','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Usage:\x20','\x20\x20(','pending','sub','processorId','\x20more','rss','License\x20already\x20stored','license:activated','putSync','REMOVE','records','reduce','auth','flushed','ftsIndexes','OKDBNotFoundError','searchParams','stderr','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','--log-level','entries','--grants','listenAddr','clockToChangeDb','_dedupeMax','cookieName','http://','okdb.pid','envName','rawResponse','types\x20--env\x20staging','_maybePublish','\x20HTTP\x20workers,\x20each\x20serves\x20+\x20processes)','ref:violation_resolved','\x20HTTP\x20server(s)\x20on\x20port\x20','_sockets','registerIndex','\x20\x20[okdb]\x20','GATEWAY_TIMEOUT','--test','\x22\x20(must\x20be\x20debug|info|warn|error)','_singletonLock','_enqueuedAt','_acquiredAt','stack','formatCookie','wrong_node','writeUInt8','effective','index:ready','captureStackTrace','call','TYPES','\x20\x20scanned\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','required','https','payload','recheck','isDead','verbose','\x20deleted','/api','_held','--permissions','method','holder','bind','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','_rotateBucket','response','Route\x20','views','flatMap','createHmac','\x0a\x20\x20\x20\x20','raw-remove','license:invalid','item:update','_jwksCache','\x20\x20·\x20\x20','\x20\x20⚠','run','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','inst:','event','loop-lag','from','prompt','register','Release','\x20(+','reads','uuid','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','changes','memoryUsage','UNSUPPORTED_MEDIA_TYPE','description','byteLength','read','body:\x20','_inflight','Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.','ES256','License\x20expired\x20or\x20invalidated','middlewares','getPins','shmbuf.node','JWT\x20expired','_buildChildRow','.kdb_history',',\x20label:\x20','dropFts',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','init','authorization','hard-killed','Content-Type','sourcePath','\x1b[1m','_handleInProcess','\x1b[37m','_dedupeKey','[okdb]\x20error:\x20failed\x20to\x20read\x20','\x20process','\x20\x20matching\x20prefix\x20\x20\x20\x20','cause','(?:','node/','instanceId','CHANGEFEED_QUANTUM','<path>','attached','transport:\x20','[okdb-cluster]\x20slot=','dest','Unknown\x20error','_shouldWrapResponse','\x20(expires\x20','now','some','compaction','admin',',\x20closing…\x0a','\x0a\x20\x20No\x20routes\x20matching\x20\x22','options',',\x20which\x20still\x20exists\x20—\x20the\x20restored\x20','reset','OKDBIndexNotRegisteredError','[okdb]\x20blobs:\x20imported=','disconnect','exports','cli','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','clusterWorkers','readUInt8','_writer','_blobStatusDb','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','shift','claims','seq','\x20\x20\x20\x20path:\x20\x20\x20\x20','__esModule','\x20===','_report','consecutiveFailures','deleted','SERVICE_UNAVAILABLE','additionalProperties','Sync','Read','claimGated','handle','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','noCluster','derived;\x20rebuilt\x20from\x20source\x20docs\x20on\x20first\x20open\x20of\x20the\x20restored\x20store','prependListener','/types\x0a\x20\x20\x20\x20','_userPhase','\x0a\x20\x20Joining\x20cluster\x20at\x20','dynamic','fts:','scopes','selfAddress','maxMs','doctor','requests','methods','_clusterOrphanWatch','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','_ensureTokensType','__writeCounter','processingStatusView','origins','processor:resumed','\x20\x20(licensee:\x20','build','reject','_buckets','files/','Peer','127.0.0.1',',\x20stopping\x20workers…\x0a','readlinkSync','_bpWaiters','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','rmSync','resetIndex','jwks_uri','[okdb]\x20loaded\x20config:\x20','dataBytes','_validateOidcAccessToken','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','formatListenAddr','_servingEngines','\x22\x20→\x20','VERSION_MISMATCH','Lax','reverse','_bpParkedTotal','blindPids','retiring','route','\x20\x20\x20\x20features:\x20\x20','newIdentity','/dev/shm/','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','~lock','assign','scope','query','authorizationUrl','\x20references\x20','importFromFile','\x22\x20has\x20been\x20retiring\x20for\x20','val','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','_kind','~licenses','creating','_baselines','BACKUP_DEST_INSIDE_STORE','compact','\x20log\x20level:\x20','_matchRoute','envs','\x20process(es)\x20had\x20unreadable\x20maps','\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)','ttl:set','VIEW_PROGRESS','okdb-writer:\x20env\x20closing\x20—\x20retry','OKDBInvalidPrimaryKeyError','_coordinator','OKDB_HTTP_WORKERS\x20env','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','processes','mean','\x20(must\x20be\x201–65535)','openDB','_totalRequests','starting','isConnected','_threadStats','onLicenseExpired','_rawDb','_put','writes=','--expose-gc','number','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','sha256','\x20\x20✓\x20marked\x20for\x20a\x20new\x20identity\x20—\x20the\x20first\x20open\x20gives\x20this\x20copy\x20its\x20own\x20node\x20id','\x20worker(s)\x20still\x20serving','xdg-open\x20','{}[]:,\x0a\x0d\x09\x20','_participate','_ensureDesired','header','_totalWriteMs','commit','field:resolver_registered','change','fork','unique','okdb','okdbVersion','\x20\x20[okdb]\x20closed\x20cleanly\x0a','\x20+\x20','\x20\x20\x20\x20\x20\x20','getCmd','Invalid\x20token','\x20\x20\x20\x20admin:\x20http://localhost:','ms\x20max=','ensureType','active','\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/','current','bus:poke','\x20cf-ip=','type:registered','cursorKey','\x20\x20\x20\x20\x20\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','\x20\x20⚠\x20\x20','\x20MB)','Access-Control-Request-Headers','ESRCH','createServer','_boot','send','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','HTTP_','(code=','isAbsolute','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','missing_blob','\x20\x20✗\x20','\x1b[2m','\x22\x20(hash:\x20','6rUNuvP','OKDBTypeAlreadyRegisteredError','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','ENV','legacy','clock','Types','_instanceId','true','index:registered','runInNewContext','prototype','env/','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','\x20(deleted)','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','--prefix=','_blobsDir','unique:violation','darwin','--print','readdirSync','\x20\x20(unlimited)','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','_draining','Type\x20\x27','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','error','removeLicense','[okdb]\x20closed\x20cleanly\x0a','index:progress','type/users/query\x20{\x22active\x22:true}','LABEL','geoConfig','reason','body.','hdr','access','\x27:\x20','onClaimed','\x20license(s)','PATCH','discoveryTtlMs','_lockDb','id:\x20','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','anySize','_supervisorKey','\x20is\x20inside\x20the\x20backup\x20','_jwksNegativeCache','hasDesired','handler','runtimeProcessesView','[okdb]\x20invalid\x20config\x20\x22','http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them','\x20\x20other\x20owner\x20\x20\x20\x20\x20\x20\x20\x20','help','--new-identity','stats','updatedAt','selfKey','ALREADY_EXISTS','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','participate','Payload\x20too\x20large','\x20\x20skipped=','\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','\x20statusEnv=','create','_runMiddlewares','stopped','detectInputType','List\x20tokens\x20and\x20users.','path','pipe','tokenSecret',')\x20to\x20your\x20license\x20vendor.','\x20(okdb\x20','candidatesLegacyNamed',';\x20Max-Age=','isSetupMode','\x20(id:\x20','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','setFlagsFromString','system:bus_state_change','_bestMatch','setDesired','code','embeddings','listLicenses','default','jwksTtlMs','System','red','white','processes:\x20','refs','copyFileSync','_lockDbOf','\x20more)','derivePin','HTTP_CLUSTER_REMOVED',';\x20Secure','__OKDB_PUB_FINGERPRINT__','status','floor','req','getCount','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','\x20\x20Usage:','processor:retry','min','.log','authenticateToken','message','<json-body>','env','undefined','[okdb-cluster]\x20primary\x20pid=','_wantDb','ver','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','queue','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','_nodeDbCache','-backups','_sandbox','env:removed','[body]','http.workers','\x20drainAge=','node:events','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','offWindow','./okdb-backup','_enableChangelog','\x0a\x0a\x20\x20','Register,\x20update,\x20and\x20delete\x20function\x20definitions.',',\x20got\x20','fts:reset','outputSchema','\x20\x20\x20\x20addedAt:\x20\x20\x20','OPEN','pid','jwk','yellow','Forbidden\x20—\x20requires\x20','issueToken','\x20already\x20exists','_ensure','quarantined:\x20','_heartbeatInFlight','defaults','OKDBIndexAlreadyRegisteredError','data.mdb','mcp','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','http-server','connection','cluster-wide','\x22\x20to\x20enable\x20it.','_db','unclaimed','\x20missing\x20path\x20field\x20in\x20inputSchema:\x20','quit','orphan','/.well-known/openid-configuration','open\x20','candidates','workersFlag','mode','summary','uncaughtException','_migrateVocab','value','isFinite','publishChildRow','\x0a[okdb]\x20error:\x20','\x20\x20[','addSSE','question','origin','title','Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.','\x20\x20║','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','hint','peers=','GET','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','level:\x20info','_lookupByName','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','remoteAddress','queue/','candidateAllocated','--ttl','txn:end','envs=','backup','hashed','Schema\x20&\x20Indexes','putNode','licenseHash','nodeKey','primary','\x20\x20All\x20checks\x20passed.\x0a','headers.','UNPROCESSABLE_ENTITY','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','[okdb]\x20started\x20in\x20','epoch','flushLmdb','index','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','_versionSkewWarned','activate','setupPrimary','VERB','_nodeDb','uid','\x20\x20Envs:\x20\x20\x20\x20','Invalid\x20primary\x20key\x20type:\x20','_rowKey','hasCanonical','\x20origin=','[okdb]\x20reset\x20aborted','valid','_isWriter','Processors','_isReader',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','No\x20tokens.','backup\x20destination\x20\x22','Search','database\x20path\x20not\x20writable:\x20','_changefeed','close','result','query.','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','\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','../','must\x20be\x20','node','LICENSE_INVALID','OKDB_HTTP_WORKERS','Forbidden','createHash','isTTY','tags','_resolveOrCreateEnv','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','Execute\x20full-text\x20and\x20vector\x20searches.','[okdb-cluster]\x20respawning\x20worker\x20slot=','transaction','LICENSE_HASH_MISMATCH','\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','INVALID_INDEX_KEY','Files','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','setOwnMeta','Records','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','base64','(?:/(.*))?$','createWriteStream','getSecurityNotices','isArray','dropExisting','noAdmin','worker_threads','_blobPath','OKDBTypeNotRegisteredError','keys:','_admissionStarted','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','_isStale','markClosed','_wantDbOf','--log-requests','operations','Bearer\x20','unique:violation_resolved','USE','execArgv','kdb_admin_csrf','split','ITEM_UPDATE','blocks','./okdb-export.ndjson','ms\x20p99=','gray','\x20\x20\x20\x20','socket','authorization_endpoint','_putRowSync','remaining-fields','cpuUsage','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','_buildOwnRow','\x20\x20\x20http://localhost:','BACKUP_MANIFEST','\x20\x20Shell\x20commands',')\x20exited\x20','shm-gc:\x20/proc\x20is\x20not\x20readable\x20—\x20cannot\x20tell\x20which\x20segments\x20are\x20in\x20use','list','cluster','raw','rawBuf','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','addedAt','system:proc','_highWater','Queue','\x20\x20Flags','ephemeral','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','debug','argv','/api/env/','processingSig','_loginStates','decommission','_lock','lifecycle','fn-runner','env/staging/info','closeSync','params','decommissioning','[okdb-cluster]\x20','fromEntries','getRange','.kdbconfig','unlinkSync','compareExchange','failed\x20to\x20open','charCodeAt','\x20in\x20','processorsView','EADDRINUSE','array','attach','_runGuards','preferred_username','1059240jfHduL','unshift','matched','Invalid\x20index\x20key\x20type\x20for\x20\x27','_selfKey','wait','pause','start','\x20binding\x20references\x20missing\x20input\x20field:\x20','maps','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','validateBlobIntegrity','NOT_IMPLEMENTED','BACKUP_DEST_NOT_EMPTY','cf-connecting-ip','NOT_FOUND','guards','getDesired','\x20\x20errors\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','destroyed','open','configureAuth','includes','files','\x1b[31m','stringify','shmbuf','oldestPendingMs','ms/','precision','error\x20','gate','worker',':\x20connected\x0a\x0a','_drain','--name','parkedNow','data:\x20','present','https:','_nodeDead','trimStart','_getOidcDiscovery','stdout','sig','permissions','\x22\x20on\x20\x22','\x20writes\x20(','exportToFile','_validateOperationRequest','crypto','exportJSON','type/users',':\x20prefix\x20','type/users/item/alice','processor','system:clock_change','internal','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','application/x-www-form-urlencoded','time','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','processor:paused','_desiredOverlay','Token\x20must\x20be\x20a\x20JWT','BAD_GATEWAY','hostname','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','feed:','SIGTERM','async','skippedByProtocol','halted','user','_countFileRefs','unreadablePids','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','\x20SECURITY\x20NOTICE','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','der','x-requested-with','exec','_role','then','count','transport','May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.','--watch','sourceType','BAD_HOST','caps','readMs','supervisorKey','\x22\x20resolves\x20outside\x20the\x20backup\x20root\x20\x22','getAuthOptions','\x20\x20✓\x20OKDB\x20server\x20running','_pending','_dispatch','_userRouteCount','shm-gc:\x20cannot\x20read\x20the\x20memory\x20maps\x20of\x20','CREATED','_released','\x20\x20\x20\x20limits:\x20\x20\x20\x20','startsWith','--workers','listening','\x20(expires\x20in\x20','fill','_publishNow','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','--config','SYSTEM_PROC','backupRoot','dim','MiB','\x20\x20✓\x20','\x22.\x20Use:\x20create,\x20list,\x20revoke','_pendingLocal','HEAD','search:query','(no\x20types)','\x22\x20—\x20choose\x20a\x20directory\x20outside\x20it','errors','shutdown','uri','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','entry','key','okdb-backup-','password','process','standalone','access-control-request-headers','token','splice','_normalizeOAuthAuthResult','removeSupervisedChild','is\x20required','(worst\x20','okdb_session_','draining','enabled','operation','segments\x20(','pathname','decoded','magenta','readline',':\x20key\x20[','_ownMeta','mcp-session-id','exportToStream','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','concat','match','_transactionOnce','\x22\x20—\x20pass\x20a\x20path\x20relative\x20to\x20it\x20(configure\x20with\x20the\x20`backup.root`\x20option)','[okdb]\x20error:\x20--password\x20requires\x20--name','OKDBSchemaCollectionError','system:type_drop','\x20(other\x20users;\x20cannot\x20map\x200600\x20segments)','statusCode','Execute\x20functions\x20over\x20HTTP/MCP/shell.','\x0a\x20\x20Invalid\x20JSON:\x20','cluster:','audiences','\x20\x20\x20\x20expires:\x20\x20\x20','_nodeDbFor','activation','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20','functions','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','references','import','sourceKey','basename','unknown','payload-or-self','_drainOne','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','_readNDJSON','updateSupervisedChildStats','cookies','registerType','_rootDb','ready','\x1b[34m','drop','clearTtl',';\x20Expires=','loadEnvFile','license:added','hasType','stopping','bytes','_outstanding','reidentify','okdb.http.listen(port)\x20in\x20each\x20worker.','_closed','_listTypes','config\x20file\x20valid:\x20','[okdb]\x20restoring\x20','listNodes','sizeBefore','content-type','onRetiring','\x20\x20Common\x20causes:','\x20\x20\x20\x20\x20http://localhost:','ttl:expired','[okdb]\x20cluster\x20close\x20error:\x20','\x20of\x20them\x20run\x20as\x20this\x20user\x20and\x20could\x20map\x20these\x20segments:\x20','schema:set','bus:type_drop','instances','querySchema','\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','_bucketIdx','/\x20quit\x20/\x20Ctrl+C','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','\x20\x20\x20\x20port:\x20\x20','off','allowHeaders','HTTP\x20','access:\x20','license','fts:registered','pathParams','[okdb]\x20backup\x20complete','Feature\x20not\x20licensed:\x20','kid','\x20\x20not\x20okdb-shaped\x20\x20\x20\x20','-tmp-','padEnd','_wrapApiResponse','aud','scrypt','Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.','randomBytes','2932076YFZuqX','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','UNIQUE_CONSTRAINT','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','endsWith','_key','_envs','isBusy','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','resetting','SIGINT\x20(double-tap)','\x20\x20skipped:\x20','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','no-cache,\x20no-transform','readFileSync','type:drop','_clusterWorkerAttached','[okdb]\x20close\x20error:\x20','processors','trim','prefix','\x20\x20Error:\x20','otherwise\x20rerun\x20as\x20root.','bus:proc','padStart','node\x20identity','./okdb-data','\x20│\x20','allocUnsafe','_startHeartbeat','18dzWzNt','false','workersConfigured','Admin','load','integer','\x20records','not\x20open','FOREIGN_KEY_DELETE_RESTRICTED','forceAfterMs','realpathSync','../okdb','type','BOOTSTRAP_LOCALHOST_ONLY','OKDBError','other','migrations','candidateBytes','paused','_systemEnv','processor:progress','already\x20in\x20use','\x20licenses','busy','writes','_committed','DELETE\x20type/users/item/x','(none)','toUpperCase','reload','Examples','\x20allocated','[okdb]\x20backing\x20up\x20to\x20','EXIT','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','enforce','LICENSE_FEATURE_DISABLED','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','map','okdb_session','expiresAt','NAME','registerFts','[okdb-cluster]\x20worker\x20pid=','roles','set','Views','warn','toLocaleString','processKey','building','%),\x20','cyan','GONE','content-length','identity','auth=','_lastCpuWindowMs','BACKUP_PATH_OUTSIDE_ROOT','sizeAfter','removeSync','getProcess','--open','schema','relative','--no-repl','_lastCpuAt','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','tmp','processor:ready','win32','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','/type/users/item/alice\x0a\x20\x20\x20\x20','[okdb]\x20invalid\x20log\x20level:\x20\x22','protected:read','node:crypto','\x20is\x20not\x20empty\x20—\x20restore\x20only\x20into\x20a\x20new\x20or\x20empty\x20directory','keep-alive','\x0a-----END\x20CERTIFICATE-----\x0a','sab','POST','slot','store','username','PUBLIC_KEY_PEM','LICENSED_BUILD','responseStatuses','ieee-p1363','digest','acquiredAt','limits','PUT','SWAP','config\x20file\x20invalid:\x20','unlinked','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Index\x20\x27','online','force','--no-cluster','\x0a[okdb]\x20received\x20','_clusterOnMessage','toString','[okdb]\x20exporting\x20env\x20\x22','ref:violation','okdb-license-id:','workers','end','License\x20limit\x20exceeded:\x20','reap','List\x20functions\x20and\x20inspect\x20their\x20source.','txn:rollback','publishOwnRow','fanout','__vocab/version','noteListenAddr','index:reset','\x20(dry\x20run)','forEach','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','add','permission','hex','external','ORPHAN\x20(env-closed\x20write)','~processes:desired','idx:','node:perf_hooks','processors/','_onPending','heapTotal','(on\x20any\x20path\x20command)','committed','ROUTES','_openEnvLazy','--port','\x20logs\x20off\x0a','category','RS256','\x20\x20✓\x20~blobs\x20\x20(','rows=','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','join','\x20times\x20in\x20','created','_cmd',';\x20SameSite=','_enforceOperationAccess','must\x20not\x20be\x20null','is\x20not\x20allowed','setHeader','_removeRowAsync','note','ACTIVATION_EXPIRED','1972325bBddnv','registry\x20publish\x20failing:\x20','types','copy','isDirectory','main','_copyDir','state','typeSubDbs','spki','bindings','statuses','.\x20Move\x20it\x20away\x20first\x20to\x20use\x20the\x20copy.','dryRun','3zFgtCt','\x1b[90m','--env','OKDB-PIN-V1:','isWanted','heapUsed','keys/public.pem','getHeader','reportThreadStats','version','_started','Build\x20expects\x20public\x20key\x20fingerprint\x20','createdAt','existsSync','recent\x20writes\x20(newest\x20first)','_getType','_statusEnv','licenses','584260oihXCr','revoke','deaths','exclusiveStart','email','ITEM_REMOVE','ms\x20(pid\x20','OKDBForeignKeyDeleteError','store\x20will\x20open\x20THAT\x20directory,\x20not\x20the\x20copy\x20in\x20','config','_groupByProcess','\x20<path>\x20[json-body]','catch','\x20fetching\x20','\x20phase=','INDEX_SET_CHANGED','shm-gc:\x20Linux\x20only\x20(POSIX\x20shared\x20memory\x20under\x20/dev/shm)','processing','Blob\x20file\x20missing\x20for\x20~files\x20record\x20\x22','parse','update','randomUUID','test','onThreadExit','properties','ENV_CLOSING_RETRY','--dry-run','finish','2.7.1','dropSchema','lmdb','cpSync','_adminRelay','outOfTree','indexToDb','Environments','MAX_POOL_HOLDS','toFixed','x5c','__okdbSlot','view','\x20(durable\x20desired-state)','[env]','SIGINT','allSettled','isBuffer','segmentNameFor:\x20suffix\x20must\x20look\x20like\x20\x22_name\x22\x20(got\x20','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','--drop','exportEnvsToStream','opendirSync','\x20logs\x20on\x20\x20','every','info','audience','percentile','_lastTick','sort','(primary\x20=\x20processor)','_totalReads','blob\x20status\x20db\x20not\x20available','syncPeers','ms\x20activeWriters=','_lastCpuUsage','cookie','label','\x20does\x20not\x20exist',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','embedded','changed','\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20','_quantum','CONFLICT','~tokens','--no-admin','toLowerCase','system','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','indexOf','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','get','\x20\x20✓\x20OKDB\x20cluster\x20running','\x20documents\x20fail\x20validation','foreignOwner','matcher','--key','--path','_collectWriterFacet','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','meta','system:drain','orphan_blob','\x0a\x20\x20\x20\x20\x20\x20','_publishFailWarned','type/','host','LICENSE_ACTIVATION_INVALID','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','sse','\x20\x20Tier:\x20\x20\x20\x20','primaryOkdb','system:ready','fields','\x20\x20\x20\x20licensee:\x20\x20','_onTick','destroy','SIG_INVALID','\x20for\x20system\x20env','cors','constructor','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','commitP99Ms','_heldTotal','blindCommands','_timer','hasLimit','issuedAt','JWT\x20issuer\x20mismatch','--verbose','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','kill','View\x20peer\x20status\x20and\x20replication\x20stats.','No\x20license\x20found\x20matching\x20this\x20activation\x20token','\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema','bold','delete','blob','clusterStatusView','allowedAlgs','alg','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','writerStatus','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','metrics','extend','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','data','okdb-backup.json','openSync','OKDBIndexHasConsumersError','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','\x0a[okdb]\x20fatal\x20error:','uptime','cluster:\x20ready\x20(','logs','\x0d[okdb]\x20','verify','writeUInt32BE','\x22\x20in\x20env\x20\x22','INTERNAL_ERROR','typesDb','http://localhost:','_lastCpuPct','\x20\x20deleted\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','write','once','processor:error','createLoginState','fetch','VALIDATION_ERROR','_quarantinedEnvs','\x20process(es)\x20that\x20could\x20map\x20these\x20','_resolveEnv','sync','known\x20field','_collectSingletonClaims',';\x20Path=','push','~files','.okdb-write-test','[okdb]\x20error:\x20','groups','\x20\x20✗','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','\x20to\x20browse\x20the\x20API,\x20','writeUInt16BE','record','perf_hooks','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','token_use','cf-ray','needsActivation','connected','data:read','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','\x20\x20(no\x20env\x20draining)','system:poke',';\x20HttpOnly','\x20which\x20does\x20not\x20exist','none','recordWrite','_oidcDiscoveryCache','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','~system','has','\x20\x20→\x20\x20','x-forwarded-for','isWorker','\x20@\x20','lstatSync','timeMachine','PUB_FINGERPRINT','tierList','nbf','x-okdb-raw-response','\x22\x20already\x20exists','ID\x20token\x20is\x20not\x20accepted','parseBearer','INDEX_ALREADY_REGISTERED','DELETE','_flushTimer','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','\x1b[32m','Invalid\x20activation\x20token:\x20','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','2029270jruZEL','schema:drop','\x20\x20\x20\x20graceful\x20shutdown\x0a','authRequired','[okdb]\x20import\x20complete','_onItem','export','SIGKILL','next','verifySignature','\x1b[0m','Indexes','isAuthenticated','shared-memory\x20segment\x20\x22','setSchema','repairBlobRefs','values','att','[okdb]\x20created\x20./okdb-data','FEATURES','fts','HELP','childTransaction','\x22\x20is\x20used\x20by:\x20','Foreign\x20key\x20violation:\x20','\x20\x20\x20\x20\x20\x20\x20','maxBodyBytes','[okdb]\x20imported\x20\x20types=','\x20/\x20','parseInt','\x20size,\x20','FOREIGN_KEY_VIOLATION','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','single','children','OKDBInvalidValueError','comm','--username','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','headers','[okdb]\x20starting…\x0a','item:create','setEncoding','addSupervisedChild','net','find','resetFts','[okdb]\x20invalid\x20port:\x20','readSync','_caps','\x20already\x20in\x20use','engines','Unknown\x20JWKS\x20kid:\x20','_nestedTotal','--types','_heartbeatTimer','INDEX_READY','ENVS','put','\x20\x20╚═══════════════════════════╝','ftruncateSync','geo','importBlobs','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','timingSafeEqual','[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20','\x20result','--force','OPTIONS','\x0a\x20\x20License\x20details:','round','regex','exit',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','signCookie','[okdb]\x20created\x20.kdbconfig','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','shmbufNative','maxAge','inflightAgesMs','Cannot\x20set\x20enforce\x20schema\x20on\x20','_totalErrors','\x20\x20\x20\x20status:\x20\x20\x20\x20','createReadStream','activateLicense','userAdded','repeat','Unsupported\x20JWT\x20alg:\x20','slotKey','hash','_okdb','\x20entries\x20in\x20','listRoutes','boolean','dumpedAt','_onProcEvent','\x20freed','dead','\x20\x20records=','procmode/','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','_admissionTimer','resolve','routes','\x27\x20on\x20type\x20\x27','signalWant','logLevel','sandbox','BAD_REQUEST','raw-put','1989172cqndEV','\x0a\x20\x20✓\x20License\x20added','\x20pid=','available','kind',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','TYPE_ALREADY_REGISTERED','LICENSE_LIMIT_EXCEEDED','_license','_hbTimer','threads','PERMISSIONS','\x20\x20kept\x20(attached/retiring\x20when\x20retired)\x20','importFromStream','_lastPublishAt','drain','[okdb]\x20port\x20','expiry',')\x20→\x20','ITEM_PENDING','PAYLOAD_TOO_LARGE','admitted','guard','time-machine','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','\x20(must\x20be\x20true\x20or\x20false)','_cursors','authMode','fast','\x1b[33m','_sync','lost','clear','tokenTtl','_assertUsable','_desired','assertFeature','writeFileSync','ms\x20busy=','\x20writer{depth=','\x20\x20Path\x20access','columns','blobs','\x20months\x20from\x20issuance)','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','validateRouteInput','use','_refreshDesiredSnapshot','port','Create,\x20delete,\x20and\x20compact\x20environments.','OKDB_CODE_TO_HTTP_STATUS','null','\x20—\x20','isPrimary','noRepl','\x20\x20Writes:\x20\x20','--eval','[okdb]\x20reset:\x20','consumeLoginState','[req]\x20','_singletonLocks','Unauthorized','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','1ofN:','isInteger','[okdb]\x20cluster\x20supervisor\x20pid=','__identity','kdb_admin_oauth_state','--version','createInterface','unref','_adoptPeerIndexes','listen','removeNode','\x20\x20Some\x20checks\x20failed.\x0a','106521uNcHas','files\x20feature\x20not\x20available','heartbeatMs','capable\x20HTTP\x20worker(s)\x20serving\x20:','\x20has\x20invalid\x20http.bodyMode:\x20','\x20\x20(name:\x20','_putRowAsync','\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\x20backup:\x20LMDB\x20snapshot\x20copy\x20of\x20every\x20env\x20+\x20time-machine\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\x20history\x20+\x20file\x20blobs\x20into\x20a\x20NEW\x20dir\x20(default:\x20./okdb-backup);\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\x20full-text\x20indexes\x20are\x20rebuilt\x20on\x20first\x20open,\x20not\x20copied\x0a\x20\x20\x20\x20restore\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Restore\x20a\x20backup\x20dir\x20into\x20--path\x20(must\x20not\x20exist\x20or\x20be\x20empty)\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--new-identity\x20\x20\x20\x20bring\x20the\x20copy\x20up\x20as\x20a\x20NEW\x20node\x20(fresh\x20id,\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\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20no\x20sync\x20membership)\x20instead\x20of\x20replacing\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\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20the\x20original\x20—\x20see\x20docs/migration.md\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\x20\x20\x20\x20shm-gc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20leaked\x20okdb\x20shared-memory\x20segments\x20no\x20process\x20uses\x20(Linux)\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--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20report\x20only\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--prefix\x20<p>\x20\x20\x20\x20\x20\x20\x20only\x20names\x20starting\x20with\x20<p>\x20(default\x20\x22-tmp-\x22)\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a\x20\x20\x20\x20okdb\x20restore\x20./my-backup\x20--path\x20./okdb-data\x0a','\x20\x20\x20\x20port:\x20\x20\x20\x20','race','Protected\x20(gate)','commitsPerSec','_typeSchema','okdb-lock:\x20env\x20closed','_activateProcesses','\x20\x20http://localhost:','targetKey','\x22:\x20','parts','subject','\x20bytes,\x20need\x20>=\x2065)','INDEX_REGISTERED','is\x20invalid','verifyCookie','decodeLicenseBlob','ttlMs','input:\x20','getClock','_listenAddr','Validation\x20failed','_allEnvsWithFiles','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','verifyActivation','closed','Internal\x20error','_processStartedAt','PIN','[okdb]\x20nothing\x20to\x20reset\x20—\x20','startHeartbeat','readInt32LE','maxExtra','_authOptions','object','--label','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','Write','_totalWrites','ITEM_CREATE','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','tokenizer','REQUEST_TIMEOUT','enable','_startAdmission','SYSTEM_POKE','credentials','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','Validation\x20failed:\x20','INDEX_PROGRESS','free\x20tier','\x20forked\x20','type/users/item/alice\x20--env\x20staging','detachConsole','http','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','type/users\x20--help','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','LOGS','licensee','ms\x20on\x20env=','_sampleOwnStats','copyFile','internalOnly','[okdb]\x20opening\x20','_scheduleFlush','/([^/]+)','isSystem','url','afterWrite','slice','running','_licenseHash','history','\x20bytes','procmodeack/','unhandledRejection','servers','live\x20process\x20registry;\x20disposable','server','(unset)','body','_wantDbHandle','\x20\x20✓\x20database\x20opened\x0a','events','~blobs','setNoDelay','system:stopped','\x20uses\x20bodyMode:array\x20but\x20does\x20not\x20have\x20exactly\x20one\x20unbound\x20array\x20input\x20field','_markSeen','exp','role','Not\x20Found','[res]\x20','pin','SIGBREAK','versions','transactionSync','examples','/proc','\x0a\x20\x20✓\x20License\x20activated','error:\x20','createPublicKey','API\x20tokens,\x20users,\x20and\x20credentials.','depth','token_endpoint','readUInt32BE','_children','OKDBAlreadyExistsError','freeze','toUTCString','base64url','(empty)','dbPath','\x20\x20\x20\x20permissions:\x20','ppid','param','ms\x20mean=','linux','\x20\x20\x20\x20usage:\x20\x20\x20','dropping','inputSchema','deregisterSelf','no\x20.kdbconfig\x20(using\x20defaults)','\x20day(s).','context','\x20has\x20ambiguous\x20query/path\x20field:\x20','field','Work','--blobs','_nestedWarned','ms\x20env=','--token','\x22\x20matches\x20','issuer','function','ms\x0a','_isClusterController','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','\x20opening\x20','treeView','failures','closeIdleConnections','\x20files)','clearLine','Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','OKDBInvalidIndexKeyError','process\x20',':\x20ping\x0a\x0a','usage:\x20okdb\x20restore\x20<backup-dir>\x20--path\x20<target-data-dir>','--address','_active','length','Hint:\x20','_totalReadMs','RSA-SHA256','green','decodeActivationToken','active:','application/json','item:pending','\x20\x20!\x20','licenseType','_safeEnvDirName','details','_log','_fetchJwks','mkdirSync','_done','_computeStatus','\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','typesPerEnv','utf8','logRequests','signingInput','migrate','_onStop','\x22\x20is\x20inside\x20the\x20store\x20\x22','_seen','\x27\x20doesn\x27t\x20exist','EXPIRES','all','bootstrapBlocked','INVALID_PRIMARY_KEY','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','restore','keys','Version\x20mismatch\x20for\x20','SYSTEM_STOPPED','skip\x20','onWindow','hasOwnProperty','FTS_RESET','\x20ipc\x20error:\x20','name','/dev/shm','List\x20environments\x20and\x20read\x20environment\x20info.','hasIndex','LICENSE_EXPIRED_ACTION','\x0a\x20\x20✓\x20Token\x20created','level','ceil','_durs','log','\x20\x20@','Functions','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','\x1b[35m','License\x20signature\x20invalid:\x20','\x20worker\x20slot=','stop','statSync','Data','SYNC_COMMITS','\x20(passive),\x20','started','size','api','homedir','standard','\x20\x20Expected\x20one\x20of:','items','createEnvironment','__fts:','grants','attachFeed','\x20file','abs','features','\x20\x20changes=','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','stdin','toISOString','0123456789ABCDEFGHJKMNPQRSTVWXYZ','_buildProcessingFacet','cpus','replace','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','line','indexes','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','jwksUri','shm\x20segment\x20','_windowCbs','decommissioned','resume','\x20envs','_isOpen','okdb-writer[','\x0a\x20\x20okdb\x20doctor\x0a','string','_holderDead','inUse','respawnTimer','safety','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','\x20HTTP\x20workers\x20','emit','signature','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','cpuWindowMs','TOO_MANY_REQUESTS','Token\x20secret\x20not\x20configured','\x20\x20(+\x20time-machine)','--help','expired','platform','\x27\x20already\x20registered','singletonClaims','~processes','namespace','oauth','shm-gc','\x27,\x20cannot\x20map\x20to\x20\x27','--env\x20<name>','text/event-stream;\x20charset=utf-8','_handlePending','_getJwkKey','remove','start\x20','listDesired','ENOENT','\x0a\x20\x20','_onPoke','authenticateRequest','/admin/index.html','Index\x20\x22','HTTP\x20server\x20already\x20running','_startedAt','isFile','dropType','ttl','msg','max','filter','_flushDebounce','MALFORMED_TOKEN','INDEX_HAS_CONSUMERS','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','onMapped','invalid','shutting\x20down…\x0a','stream','writeMs','clearCookie'];_0x11b6=function(){return _0x22ffb6;};return _0x11b6();}function requireOkdbLoopMonitor(){const _0x365948=_0x55b176;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1d0c94,performance:_0x2178bb}=require$$0$4,_0x5d75a7=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x365948(0x1f8),_0x50e48f=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x16dfe9=process.env.OKDB_LOOP_LAG_ALL==='1',_0x5cdbc2=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x4ed9ca{constructor(){const _0x2b955e=_0x365948;this[_0x2b955e(0x3d8)]=_0x5d75a7,this[_0x2b955e(0x8af)]=new Map(),this['_h']=null,this[_0x2b955e(0x586)]=null,this[_0x2b955e(0x50c)]=![],this[_0x2b955e(0x751)]=(_0x25523f,_0xdcc4bb)=>process[_0x2b955e(0x7f8)]['write'](_0x25523f+(_0xdcc4bb?'\x20'+JSON[_0x2b955e(0x364)](_0xdcc4bb):'')+'\x0a');}[_0x365948(0x872)](){return _0x2178bb['now']();}['setLogger'](_0x29db83){const _0x3fffd5=_0x365948;if(typeof _0x29db83===_0x3fffd5(0x733))this[_0x3fffd5(0x751)]=_0x29db83;}[_0x365948(0x4f2)](_0x2f99ce,_0x3b2f2d,_0x4ec08d){const _0xe1cd86=_0x365948;if(!this[_0xe1cd86(0x3d8)])return;let _0x4ab8c5=this[_0xe1cd86(0x8af)]['get'](_0x2f99ce);!_0x4ab8c5&&(_0x4ab8c5={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0xe1cd86(0x8af)][_0xe1cd86(0x486)](_0x2f99ce,_0x4ab8c5)),_0x4ab8c5['ms']+=_0x3b2f2d,_0x4ab8c5[_0xe1cd86(0x39f)]+=0x1,_0x3b2f2d>_0x4ab8c5[_0xe1cd86(0x8a0)]&&(_0x4ab8c5[_0xe1cd86(0x8a0)]=_0x3b2f2d,_0x4ab8c5[_0xe1cd86(0x6cc)]=_0x4ec08d||'');}[_0x365948(0x352)](_0x114402){const _0x499fb0=_0x365948;if(!this['enabled']||this['_started'])return;this[_0x499fb0(0x50c)]=!![];if(_0x114402)this[_0x499fb0(0x751)]=_0x114402;this['_h']=_0x1d0c94({'resolution':0xa}),this['_h'][_0x499fb0(0x6d7)](),this[_0x499fb0(0x586)]=setInterval(()=>this['_report'](),_0x50e48f);if(this['_timer'][_0x499fb0(0x69f)])this[_0x499fb0(0x586)][_0x499fb0(0x69f)]();}[_0x365948(0x76a)](_0x1347b1){const _0x52801f=_0x365948;if(!this[_0x52801f(0x79f)])this['_windowCbs']=new Set();this[_0x52801f(0x79f)][_0x52801f(0x4d2)](_0x1347b1);if(!this['_started'])this['_startAdmission']();}[_0x365948(0x275)](_0x2e6bd6){const _0x3de737=_0x365948;this[_0x3de737(0x79f)]?.[_0x3de737(0x591)](_0x2e6bd6);}[_0x365948(0x6d8)](){const _0x28add3=_0x365948;if(this[_0x28add3(0x304)])return;this[_0x28add3(0x304)]=!![];!this['_h']&&(this['_h']=_0x1d0c94({'resolution':0xa}),this['_h'][_0x28add3(0x6d7)]());const _0x3b6213=_0x50e48f;this[_0x28add3(0x650)]=setInterval(()=>{const _0x2b223d=_0x28add3,_0x9f51f1=this['_h'];if(!_0x9f51f1)return;const _0x1da7a4=_0x9f51f1[_0x2b223d(0x54b)](0x63)/0xf4240,_0x2733d4=_0x9f51f1[_0x2b223d(0x7d2)]/0xf4240,_0x15ab1f=_0x9f51f1[_0x2b223d(0x8ea)]/0xf4240;_0x9f51f1[_0x2b223d(0x87a)]();if(this['_windowCbs'])for(const _0xb680a4 of this['_windowCbs']){try{_0xb680a4({'p99Ms':_0x1da7a4,'maxMs':_0x2733d4,'meanMs':_0x15ab1f,'reportMs':_0x3b6213});}catch{}}},_0x3b6213);if(this[_0x28add3(0x650)][_0x28add3(0x69f)])this[_0x28add3(0x650)][_0x28add3(0x69f)]();}[_0x365948(0x88c)](){const _0x21cf65=_0x365948,_0x3dae51=this['_h'],_0x5b9afe=_0x3dae51['max']/0xf4240,_0x832505=_0x3dae51[_0x21cf65(0x54b)](0x63)/0xf4240,_0x5a967f=_0x3dae51[_0x21cf65(0x8ea)]/0xf4240;_0x3dae51[_0x21cf65(0x87a)]();const _0xbdd6d7=[...this[_0x21cf65(0x8af)][_0x21cf65(0x7fb)]()][_0x21cf65(0x47f)](([_0x71f0d3,_0x3151d7])=>({'label':_0x71f0d3,..._0x3151d7}))[_0x21cf65(0x54d)]((_0x52de11,_0xe54fc3)=>_0xe54fc3['ms']-_0x52de11['ms'])['slice'](0x0,0x8);this[_0x21cf65(0x8af)][_0x21cf65(0x679)]();const _0x36bb46=_0xbdd6d7[_0x21cf65(0x7f2)]((_0x3ad4f2,_0xf63ed7)=>_0x3ad4f2+_0xf63ed7['ms'],0x0),_0x53188b=_0xbdd6d7[_0x21cf65(0x47f)](_0x578642=>_0x578642[_0x21cf65(0x555)]+'='+_0x578642['ms'][_0x21cf65(0x539)](0x0)+_0x21cf65(0x367)+_0x578642[_0x21cf65(0x39f)]+(_0x578642[_0x21cf65(0x8a0)]>0x5?_0x21cf65(0x3d5)+_0x578642[_0x21cf65(0x8a0)]['toFixed'](0x0)+'ms'+(_0x578642['maxExtra']?'\x20'+_0x578642['maxExtra']:'')+')':''));(_0x16dfe9||_0x5b9afe>=_0x5cdbc2)&&this[_0x21cf65(0x751)]('loop-lag\x20'+_0x50e48f+_0x21cf65(0x1d4)+_0x5b9afe[_0x21cf65(0x539)](0x0)+_0x21cf65(0x314)+_0x832505[_0x21cf65(0x539)](0x0)+_0x21cf65(0x721)+_0x5a967f['toFixed'](0x0)+_0x21cf65(0x67f)+_0x36bb46['toFixed'](0x0)+'ms'+(_0x53188b[_0x21cf65(0x744)]?_0x21cf65(0x456)+_0x53188b[_0x21cf65(0x4e8)]('\x20\x20'):''),{'feature':_0x21cf65(0x83c)});if(this['_windowCbs'])for(const _0x18e42c of this[_0x21cf65(0x79f)]){try{_0x18e42c({'p99Ms':_0x832505,'maxMs':_0x5b9afe,'meanMs':_0x5a967f,'reportMs':_0x50e48f});}catch{}}}[_0x365948(0x77e)](){const _0x3bfea3=_0x365948;if(this[_0x3bfea3(0x586)])clearInterval(this['_timer']);if(this['_h'])this['_h']['disable']();this[_0x3bfea3(0x586)]=null,this['_h']=null,this[_0x3bfea3(0x50c)]=![];}}const _0xbec819=new _0x4ed9ca();if(_0xbec819[_0x365948(0x3d8)])_0xbec819[_0x365948(0x352)]();return okdbLoopMonitor={'LOOP':_0xbec819},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x592954=0x2**0x1f-0x1;function _0x2a4d49(_0x51250f){if(!(_0x51250f>0x0))return 0x0;return _0x51250f>_0x592954?_0x592954:_0x51250f;}function _0x41c26b(_0x238e2d){return _0x238e2d===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x592954,'clampTimerDelay':_0x2a4d49,'isNeverDelay':_0x41c26b},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x770914=require$$0$1,_0x1672bd=require$$1;let _0x5dded4,_0x52ea2d,_0x56ccd7,_0x1a620b,_0x35f0f9,_0xc5d430,_0x43d356,_0x2e1650=![];const _0x20283e=new Set();let _0x4ae72a=null;const _0x6e847d=new Map();function _0x3859ee(){const _0x485712=_0x223d;if(_0x5dded4!==undefined)return _0x5dded4;_0x5dded4=process.env.OKDB_DIAG==='1';if(!_0x5dded4)return![];_0x52ea2d=process.env.OKDB_DIAG_STACK==='1',_0x1a620b=Math[_0x485712(0x7d2)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x56ccd7=new Array(_0x1a620b),_0x35f0f9=0x0,_0xc5d430=0x0,_0x43d356=process.env.OKDB_DIAG_DIR||null;if(_0x43d356)try{_0x770914[_0x485712(0x753)](_0x43d356,{'recursive':!![]});}catch{}return!![];}function _0x48caab(){return _0x5dded4===undefined?_0x3859ee():_0x5dded4;}function _0x3eabc6(_0x8a3d5b,_0x845fe7){const _0x4ef7d4=_0x223d;if(_0x5dded4===undefined?!_0x3859ee():!_0x5dded4)return;let _0x26d55a;if(_0x52ea2d){const _0x3f1e47=new Error()[_0x4ef7d4(0x813)]||'';_0x26d55a=_0x3f1e47['split']('\x0a')['slice'](0x3)[_0x4ef7d4(0x47f)](_0x324a25=>_0x324a25['trim']())[_0x4ef7d4(0x7d3)](Boolean)[_0x4ef7d4(0x6f2)](0x0,0x8);}_0x56ccd7[_0x35f0f9]={'seq':_0xc5d430++,'t':Date['now'](),'env':_0x8a3d5b,'kind':_0x845fe7||_0x4ef7d4(0x1c7),'stack':_0x26d55a},_0x35f0f9=(_0x35f0f9+0x1)%_0x1a620b;}function _0x38222b(_0x4142a3){const _0x5d8494=_0x223d,_0x259a0b=[];for(let _0x23b3c8=0x0;_0x23b3c8<_0x1a620b;_0x23b3c8++){const _0xff6faf=_0x56ccd7[(_0x35f0f9-0x1-_0x23b3c8+_0x1a620b*0x2)%_0x1a620b];if(!_0xff6faf)continue;_0x259a0b[_0x5d8494(0x5bb)](_0xff6faf);if(_0x259a0b['length']>=_0x4142a3)break;}return _0x259a0b;}function _0x5d7c4a(_0x52c59a){const _0x3bce9f=_0x223d;try{process[_0x3bce9f(0x7f8)][_0x3bce9f(0x5ae)](_0x52c59a+'\x0a');}catch{}if(_0x43d356)try{_0x770914['appendFileSync'](_0x1672bd['join'](_0x43d356,'okdb-diag.'+process[_0x3bce9f(0x27f)]+_0x3bce9f(0x260)),_0x52c59a+'\x0a');}catch{}}function _0x4d9569(_0x208ae4){const _0x3f2815=_0x223d,_0x498555=_0x38222b(_0x208ae4);if(!_0x498555[_0x3f2815(0x744)])return _0x3f2815(0x274);const _0x22c01b=Date[_0x3f2815(0x872)]();return _0x498555[_0x3f2815(0x47f)](_0x849016=>{const _0x13470c=_0x3f2815,_0x27b92d='\x20\x20#'+_0x849016[_0x13470c(0x888)]+'\x20-'+(_0x22c01b-_0x849016['t'])+_0x13470c(0x72f)+_0x849016[_0x13470c(0x264)]+'\x20'+_0x849016[_0x13470c(0x65d)];return _0x849016[_0x13470c(0x813)]&&_0x849016['stack']['length']?_0x27b92d+'\x0a\x20\x20\x20\x20\x20\x20'+_0x849016[_0x13470c(0x813)][_0x13470c(0x4e8)](_0x13470c(0x570)):_0x27b92d;})[_0x3f2815(0x4e8)]('\x0a');}function _0x294621(_0x1928d9,_0x22ec16){const _0x5a9362=_0x223d,_0x42f377='\x0a===\x20OKDB_DIAG\x20'+_0x1928d9+'\x20@\x20'+new Date()[_0x5a9362(0x794)]()+'\x20pid='+process[_0x5a9362(0x27f)]+'\x20===',_0xdfaa0a=[_0x42f377,_0x5a9362(0x711)+(_0x22ec16&&_0x22ec16[_0x5a9362(0x813)]?_0x22ec16[_0x5a9362(0x813)][_0x5a9362(0x310)]('\x0a')[0x0]:_0x22ec16),_0x5a9362(0x510)+(_0x52ea2d?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x4d9569(0x18),_0x51ab9d(),'='[_0x5a9362(0x641)](_0x42f377[_0x5a9362(0x744)]-0x1)];_0x5d7c4a(_0xdfaa0a[_0x5a9362(0x4e8)]('\x0a'));}function _0x1691af(_0x424cad){const _0x5ac83a=_0x223d;if(!_0x48caab())return;const _0x39b4b7=String(_0x424cad&&_0x424cad[_0x5ac83a(0x262)]||_0x424cad||''),_0x1e191a=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x5ac83a(0x52a)](_0x39b4b7);_0x294621(_0x1e191a?_0x5ac83a(0x4d6):'uncaughtException',_0x424cad);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x1e191a)return;try{console[_0x5ac83a(0x20b)](_0x424cad&&_0x424cad['stack']?_0x424cad[_0x5ac83a(0x813)]:_0x424cad);}catch{}process['exit'](0x1);}function _0x494c54(_0x274a18){const _0x50020c=_0x223d;if(!_0x48caab())return;const _0x1efb42=String(_0x274a18&&_0x274a18['message']||_0x274a18||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x50020c(0x52a)](_0x1efb42)&&_0x294621(_0x50020c(0x895),_0x274a18);}function _0x51ab9d(){const _0x202886=_0x223d,_0x5c009c=[_0x202886(0x385)];let _0xa3403b=![];for(const _0x72f8b of _0x20283e){const _0x6afa2=_0x72f8b&&_0x72f8b[_0x202886(0x441)];if(!_0x6afa2)continue;for(const [_0x295278,_0x57720a]of _0x6afa2){const _0x6d768c=_0x57720a&&_0x57720a[_0x202886(0x8e5)]&&_0x57720a[_0x202886(0x8e5)][_0x202886(0x53c)];if(!_0x6d768c)continue;let _0x10e21b,_0x102a76;try{_0x10e21b=Atomics['load'](_0x6d768c,0x0),_0x102a76=Atomics['load'](_0x6d768c,0x1);}catch{continue;}if(_0x10e21b===0x0)continue;_0xa3403b=!![];const _0x5cb19d=_0x10e21b>0x0?_0x202886(0x4b6):_0x202886(0x4f7),_0x2b00d9=Date[_0x202886(0x872)]()-Math[_0x202886(0x78f)](_0x10e21b)*0x3e8,_0xe16012=((()=>{const _0x58edc2=_0x202886;try{return _0x57720a[_0x58edc2(0x883)]&&_0x57720a[_0x58edc2(0x883)][_0x58edc2(0x258)]?_0x57720a[_0x58edc2(0x883)]['status']():null;}catch{return null;}})());_0x5c009c[_0x202886(0x5bb)]('\x20\x20env='+_0x295278+_0x202886(0x522)+_0x5cb19d+_0x202886(0x272)+_0x2b00d9+_0x202886(0x552)+_0x102a76+(_0xe16012?_0x202886(0x680)+_0xe16012[_0x202886(0x714)]+'\x20oldestPendingMs='+_0xe16012[_0x202886(0x366)]+'\x20parkedNow='+_0xe16012['parkedNow']+'}':''));}}if(!_0xa3403b)_0x5c009c[_0x202886(0x5bb)](_0x202886(0x5cd));return _0x5c009c[_0x202886(0x4e8)]('\x0a');}function _0x5ae3f9(){const _0x36bedb=_0x223d;if(!_0x48caab())return;const _0x42407a=Math[_0x36bedb(0x7d2)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x4bb075=Date['now']();for(const _0x5a9143 of _0x20283e){const _0x44f6dc=_0x5a9143&&_0x5a9143[_0x36bedb(0x441)];if(!_0x44f6dc)continue;for(const [_0x4c2c75,_0x386e24]of _0x44f6dc){const _0x2add81=_0x386e24&&_0x386e24[_0x36bedb(0x8e5)]&&_0x386e24['_coordinator']['view'];if(!_0x2add81)continue;let _0x488bc4;try{_0x488bc4=Atomics[_0x36bedb(0x45d)](_0x2add81,0x0);}catch{continue;}const _0x1e9218=_0x5a9143[_0x36bedb(0x239)]+'|'+_0x4c2c75;if(_0x488bc4<=0x0){_0x6e847d[_0x36bedb(0x591)](_0x1e9218);continue;}const _0x4d9394=_0x4bb075-_0x488bc4*0x3e8,_0xf2eb37=_0x6e847d[_0x36bedb(0x564)](_0x1e9218);if(_0x4d9394<_0x42407a)continue;if(_0xf2eb37&&_0x4bb075-_0xf2eb37[_0x36bedb(0x649)]<_0x42407a)continue;_0x6e847d[_0x36bedb(0x486)](_0x1e9218,{'firstTs':_0xf2eb37?_0xf2eb37['firstTs']:_0x488bc4,'dumpedAt':_0x4bb075});const _0x3332ef=_0x36bedb(0x28c)+_0x4d9394+_0x36bedb(0x6e8)+_0x4c2c75+_0x36bedb(0x5da)+new Date()['toISOString']()+_0x36bedb(0x65b)+process[_0x36bedb(0x27f)]+_0x36bedb(0x88b);_0x5d7c4a([_0x3332ef,_0x51ab9d(),'='[_0x36bedb(0x641)](_0x3332ef[_0x36bedb(0x744)]-0x1)]['join']('\x0a'));}}}function _0x239518(){const _0x50c5c8=_0x223d;if(!_0x48caab()||_0x2e1650)return;_0x2e1650=!![],process['prependListener'](_0x50c5c8(0x29c),_0x1691af),process[_0x50c5c8(0x898)](_0x50c5c8(0x6f8),_0x494c54);const _0x4c8958=Math[_0x50c5c8(0x7d2)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x4ae72a=setInterval(_0x5ae3f9,_0x4c8958);if(_0x4ae72a[_0x50c5c8(0x69f)])_0x4ae72a[_0x50c5c8(0x69f)]();}function _0x3a4639(_0x2a0ea9){const _0x5a5acb=_0x223d;if(!_0x48caab()||!_0x2a0ea9)return;_0x20283e[_0x5a5acb(0x4d2)](_0x2a0ea9),_0x239518();}function _0x38b569(_0x51308c){const _0x302d4b=_0x223d;_0x20283e[_0x302d4b(0x591)](_0x51308c);}function _0x50b813(){const _0x1d138e=_0x223d;if(!_0x48caab())return{'enabled':![],'hint':_0x1d138e(0x25c)};return{'enabled':!![],'stackCapture':!!_0x52ea2d,'recentWrites':_0x38222b(0x10),'drain':_0x51ab9d()};}return okdbDiag={'isEnabled':_0x48caab,'recordWrite':_0x3eabc6,'installDiag':_0x239518,'registerOkdb':_0x3a4639,'unregisterOkdb':_0x38b569,'snapshot':_0x50b813},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x5194c9=_0x55b176;if(hasRequiredOkdbWriter)return okdbWriter[_0x5194c9(0x87e)];hasRequiredOkdbWriter=0x1;const {performance:_0x2865a9}=require$$0$5,_0x12208f=requireOkdbDiag(),_0x192581=process.env.OKDB_COMMIT_MODE===_0x5194c9(0x5b7);class _0x1ac459{constructor(_0x5071e1){const _0x21d024=_0x5194c9;this[_0x21d024(0x264)]=_0x5071e1,this[_0x21d024(0x84c)]=new Set(),this[_0x21d024(0x811)]=new Map(),this[_0x21d024(0x472)]=0x0,this[_0x21d024(0x776)]=[],this[_0x21d024(0x754)]=[],this[_0x21d024(0x32a)]=Math[_0x21d024(0x7d2)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x21d024(0x40e)]=0x0,this['_bpWaiters']=[],this[_0x21d024(0x8c4)]=0x0,this['_held']=null,this[_0x21d024(0x584)]=0x0,this['_nestedTotal']=0x0,this[_0x21d024(0x72e)]=![];}async[_0x5194c9(0x2f0)](_0x4cf783,_0x1cd909,_0x5c36fe={}){const _0x363503=_0x5194c9;for(let _0x4d5ae9=0x1;;_0x4d5ae9++){try{return await this[_0x363503(0x3e6)](_0x4cf783,_0x1cd909,_0x5c36fe);}catch(_0x5824c6){if(_0x5824c6?.['code']!==_0x363503(0x523)||_0x5c36fe[_0x363503(0x66e)]||_0x4d5ae9>=0x5)throw _0x5824c6;this[_0x363503(0x264)][_0x363503(0x6a0)](_0x5824c6['indexType']);}}}async['_transactionOnce'](_0x240526,_0x19ba79,{admitted:admitted=![]}={}){const _0x4ccccd=_0x5194c9;if(_0x12208f['isEnabled']())_0x12208f[_0x4ccccd(0x5d2)](this[_0x4ccccd(0x264)]?.[_0x4ccccd(0x76e)],_0x19ba79);if(this[_0x4ccccd(0x411)]){const _0x412f4b=new Error(_0x4ccccd(0x8e3));_0x412f4b[_0x4ccccd(0x247)]=_0x4ccccd(0x52d);throw _0x412f4b;}if(this['_highWater']>0x0){let _0x32a846=![];while(this['_outstanding']>=this[_0x4ccccd(0x32a)]&&!this[_0x4ccccd(0x411)]){!_0x32a846&&(_0x32a846=!![],this[_0x4ccccd(0x8c4)]++),await new Promise(_0x54a95e=>this[_0x4ccccd(0x8b5)][_0x4ccccd(0x5bb)](_0x54a95e));}if(this[_0x4ccccd(0x411)]){const _0x1136c1=new Error(_0x4ccccd(0x8e3));_0x1136c1[_0x4ccccd(0x247)]=_0x4ccccd(0x52d);throw _0x1136c1;}}this[_0x4ccccd(0x40e)]++;const _0x2399ec=admitted?null:this['env'][_0x4ccccd(0x8e5)];for(;;){while(this['_held'])await this[_0x4ccccd(0x825)];if(_0x2399ec)try{await _0x2399ec['beforeWrite']();}catch(_0x4542ae){this[_0x4ccccd(0x40e)]--;if(this[_0x4ccccd(0x8b5)][_0x4ccccd(0x744)]&&this['_outstanding']<this[_0x4ccccd(0x32a)])this['_bpWaiters'][_0x4ccccd(0x886)]()();throw _0x4542ae;}if(!this[_0x4ccccd(0x825)])break;if(_0x2399ec)_0x2399ec[_0x4ccccd(0x6f1)]();}if(this[_0x4ccccd(0x411)]){if(_0x2399ec)_0x2399ec[_0x4ccccd(0x6f1)]();this[_0x4ccccd(0x40e)]--;if(this[_0x4ccccd(0x8b5)][_0x4ccccd(0x744)]&&this[_0x4ccccd(0x40e)]<this[_0x4ccccd(0x32a)])this['_bpWaiters']['shift']()();const _0x3606b2=new Error(_0x4ccccd(0x8e3));_0x3606b2[_0x4ccccd(0x247)]=_0x4ccccd(0x52d);throw _0x3606b2;}const _0x5a3dae=_0x2865a9[_0x4ccccd(0x872)]();if(_0x192581)try{const _0x307e8d=this[_0x4ccccd(0x264)]['db'][_0x4ccccd(0x70d)](_0x240526);this['_committed']++;if(this[_0x4ccccd(0x776)][_0x4ccccd(0x5bb)](_0x2865a9[_0x4ccccd(0x872)]()-_0x5a3dae)>0x100)this['_durs'][_0x4ccccd(0x886)]();if(this[_0x4ccccd(0x754)][_0x4ccccd(0x5bb)](_0x2865a9[_0x4ccccd(0x872)]())>0x800)this['_done'][_0x4ccccd(0x886)]();return _0x307e8d;}finally{this[_0x4ccccd(0x40e)]--;if(this[_0x4ccccd(0x8b5)][_0x4ccccd(0x744)]&&this[_0x4ccccd(0x40e)]<this[_0x4ccccd(0x32a)])this[_0x4ccccd(0x8b5)][_0x4ccccd(0x886)]()();if(_0x2399ec)_0x2399ec[_0x4ccccd(0x6f1)]();}let _0x50da36=null;const _0x47deeb=()=>{const _0x19591f=_0x4ccccd,_0x1500a0=_0x240526();if(_0x1500a0&&typeof _0x1500a0['then']===_0x19591f(0x733)&&!_0x50da36){this[_0x19591f(0x584)]++;let _0x3c0ff3;const _0x20f1f3=new Promise(_0x481898=>_0x3c0ff3=_0x481898);this['_held']=_0x20f1f3,_0x50da36=()=>{const _0x26d2f5=_0x19591f;if(this[_0x26d2f5(0x825)]===_0x20f1f3)this[_0x26d2f5(0x825)]=null;_0x3c0ff3();};}return _0x1500a0;};let _0x44eab8;try{_0x44eab8=this[_0x4ccccd(0x264)]['db'][_0x4ccccd(0x601)](_0x47deeb);}catch(_0xd0afba){_0x44eab8=Promise[_0x4ccccd(0x8ae)](_0xd0afba);}(!_0x44eab8||typeof _0x44eab8[_0x4ccccd(0x39e)]!==_0x4ccccd(0x733))&&(this[_0x4ccccd(0x620)]++,!this[_0x4ccccd(0x72e)]&&(this[_0x4ccccd(0x72e)]=!![],console['warn'](_0x4ccccd(0x7a4)+(this['env']?.[_0x4ccccd(0x76e)]??'?')+_0x4ccccd(0x858))),_0x44eab8=Promise[_0x4ccccd(0x651)](_0x44eab8));const _0x4bda2d=()=>{if(_0x50da36)_0x50da36();};_0x44eab8[_0x4ccccd(0x39e)](_0x4bda2d,_0x4bda2d),this[_0x4ccccd(0x84c)]['add'](_0x44eab8),this[_0x4ccccd(0x811)][_0x4ccccd(0x486)](_0x44eab8,_0x5a3dae);const _0x4c58fe=()=>{const _0x60e0a3=_0x4ccccd;this[_0x60e0a3(0x84c)][_0x60e0a3(0x591)](_0x44eab8),this[_0x60e0a3(0x811)][_0x60e0a3(0x591)](_0x44eab8),this[_0x60e0a3(0x472)]++,this[_0x60e0a3(0x40e)]--;this['_bpWaiters'][_0x60e0a3(0x744)]&&this[_0x60e0a3(0x40e)]<this[_0x60e0a3(0x32a)]&&this[_0x60e0a3(0x8b5)][_0x60e0a3(0x886)]()();if(this[_0x60e0a3(0x776)][_0x60e0a3(0x5bb)](_0x2865a9[_0x60e0a3(0x872)]()-_0x5a3dae)>0x100)this['_durs'][_0x60e0a3(0x886)]();if(this[_0x60e0a3(0x754)][_0x60e0a3(0x5bb)](_0x2865a9['now']())>0x800)this[_0x60e0a3(0x754)][_0x60e0a3(0x886)]();};_0x44eab8[_0x4ccccd(0x39e)](_0x4c58fe,_0x4c58fe);try{return await _0x44eab8;}finally{if(_0x2399ec)_0x2399ec[_0x4ccccd(0x6f1)]();}}['status'](){const _0x50d813=_0x5194c9,_0xe927b1=_0x2865a9[_0x50d813(0x872)]();let _0xd71b2d=0x0;for(const _0x542844 of this['_enqueuedAt'][_0x50d813(0x5fb)]()){const _0x67cec9=_0xe927b1-_0x542844;if(_0x67cec9>_0xd71b2d)_0xd71b2d=_0x67cec9;}let _0x23ed03=0x0;for(let _0x2158d7=this[_0x50d813(0x754)][_0x50d813(0x744)]-0x1;_0x2158d7>=0x0;_0x2158d7--){if(_0xe927b1-this['_done'][_0x2158d7]>0x3e8)break;_0x23ed03++;}let _0x525d9f=0x0;if(this[_0x50d813(0x776)][_0x50d813(0x744)]){const _0x3361c0=[...this['_durs']]['sort']((_0x2ca962,_0x27a81e)=>_0x2ca962-_0x27a81e);_0x525d9f=_0x3361c0[Math[_0x50d813(0x25f)](_0x3361c0[_0x50d813(0x744)]-0x1,Math[_0x50d813(0x259)](_0x3361c0[_0x50d813(0x744)]*0.99))];}return{'depth':this[_0x50d813(0x84c)][_0x50d813(0x784)],'oldestPendingMs':Math[_0x50d813(0x631)](_0xd71b2d),'committed':this[_0x50d813(0x472)],'commitsPerSec':_0x23ed03,'commitP99Ms':Math[_0x50d813(0x631)](_0x525d9f),'parkedNow':this['_bpWaiters'][_0x50d813(0x744)],'parkedTotal':this[_0x50d813(0x8c4)],'highWater':this[_0x50d813(0x32a)]};}[_0x5194c9(0x63a)](){const _0x30a769=_0x5194c9,_0x441f7f=_0x2865a9[_0x30a769(0x872)]();return[...this['_enqueuedAt'][_0x30a769(0x5fb)]()][_0x30a769(0x47f)](_0x23c811=>Math[_0x30a769(0x631)](_0x441f7f-_0x23c811))[_0x30a769(0x54d)]((_0x50c271,_0x505206)=>_0x505206-_0x50c271);}[_0x5194c9(0x307)](){const _0x17370e=_0x5194c9;this['_closed']=!![];for(const _0x41fae4 of this[_0x17370e(0x8b5)][_0x17370e(0x3d1)](0x0))_0x41fae4();}async['drain'](){const _0xfa12f3=_0x5194c9;let _0x9cae0=0x0;while(this[_0xfa12f3(0x84c)]['size']&&_0x9cae0++<0x3e8){await Promise[_0xfa12f3(0x540)]([...this['_inflight']]);}}async['put'](_0x56ff10,_0x3d9abd,_0x2880c8,_0x4fdfcc){const _0x2a4cc7=_0x5194c9;return this[_0x2a4cc7(0x2f0)](()=>{const _0x13291d=_0x2a4cc7;if(_0x4fdfcc===undefined)_0x56ff10[_0x13291d(0x7ef)](_0x3d9abd,_0x2880c8);else _0x56ff10[_0x13291d(0x7ef)](_0x3d9abd,_0x2880c8,_0x4fdfcc);},_0x2a4cc7(0x658));}async[_0x5194c9(0x7c3)](_0x1ca78b,_0x43936b){const _0x5b901e=_0x5194c9;return this[_0x5b901e(0x2f0)](()=>_0x1ca78b[_0x5b901e(0x495)](_0x43936b),_0x5b901e(0x832));}}async function _0x334d82(_0x30b909,_0x4077e9){const _0xbc8fe=_0x5194c9;if(_0x4077e9==null)_0x4077e9=Math[_0xbc8fe(0x7d2)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x2a9aec=_0x30b909?.[_0xbc8fe(0x7f4)];if(!_0x2a9aec||typeof _0x2a9aec[_0xbc8fe(0x39e)]!==_0xbc8fe(0x733))return;await Promise[_0xbc8fe(0x6ad)]([Promise['resolve'](_0x2a9aec)[_0xbc8fe(0x520)](()=>{}),new Promise(_0x2bce69=>{const _0x2eb42e=_0xbc8fe,_0x48f7bb=setTimeout(_0x2bce69,_0x4077e9);if(_0x48f7bb['unref'])_0x48f7bb[_0x2eb42e(0x69f)]();})]);}catch{}}function _0x44e2e8(_0x4fbc5d){const _0x945526=_0x5194c9;if(_0x192581)return Promise[_0x945526(0x651)]();const _0xa8332b=_0x4fbc5d?.['committed'];return _0xa8332b&&typeof _0xa8332b[_0x945526(0x39e)]===_0x945526(0x733)?_0xa8332b:Promise['resolve']();}const _0x53c3ec=Math[_0x5194c9(0x7d2)](0x1,Math['floor'](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x40f502=Math[_0x5194c9(0x7d2)](0x1,_0x53c3ec-0x2);let _0x159b21=0x0;const _0x55f547=[];async function _0x5dfc5e(_0x12a062){const _0x1d4332=_0x5194c9;if(_0x159b21<_0x40f502)_0x159b21++;else await new Promise(_0x3197a7=>_0x55f547[_0x1d4332(0x5bb)](_0x3197a7));try{return await _0x12a062();}finally{const _0x4b8961=_0x55f547['shift']();if(_0x4b8961)_0x4b8961();else _0x159b21--;}}return okdbWriter['exports']=_0x1ac459,okdbWriter[_0x5194c9(0x87e)]['withPoolHold']=_0x5dfc5e,okdbWriter[_0x5194c9(0x87e)][_0x5194c9(0x538)]=_0x40f502,okdbWriter[_0x5194c9(0x87e)][_0x5194c9(0x2c5)]=_0x334d82,okdbWriter[_0x5194c9(0x87e)][_0x5194c9(0x4de)]=_0x44e2e8,okdbWriter[_0x5194c9(0x87e)][_0x5194c9(0x781)]=_0x192581,okdbWriter[_0x5194c9(0x87e)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x5e9051=_0x55b176;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x5572fb=require$$0,{clampTimerDelay:_0x130c89}=requireOkdbTimers(),{SYNC_COMMITS:_0x1f8b5d}=requireOkdbWriter(),_0x1bb4a0=_0x5e9051(0x8cc);class _0x521d15{constructor(_0x389f45,_0x3b0d01,_0x24e7ef){const _0x25e7c9=_0x5e9051;this[_0x25e7c9(0x335)]=_0x389f45,this[_0x25e7c9(0x440)]=_0x3b0d01,this[_0x25e7c9(0x812)]=_0x24e7ef,this['_released']=![],this[_0x25e7c9(0x622)]=null,this['_heartbeatInFlight']=null;}['isHeld'](){const _0x1caad3=_0x5e9051;if(this[_0x1caad3(0x3b0)])return![];try{const _0x865ca4=this['_lock'][_0x1caad3(0x291)]()[_0x1caad3(0x564)](this[_0x1caad3(0x440)]);if(!_0x865ca4||_0x865ca4[_0x1caad3(0x4b3)]!==this[_0x1caad3(0x812)])return![];const _0x4cc34d=_0x865ca4[_0x1caad3(0x22b)]??_0x865ca4[_0x1caad3(0x4b3)];if(_0x4cc34d+_0x865ca4[_0x1caad3(0x6bd)]<Date[_0x1caad3(0x872)]())return![];return!![];}catch{return!this[_0x1caad3(0x3b0)];}}[_0x5e9051(0x828)](){const _0x87dd7=_0x5e9051;if(this[_0x87dd7(0x3b0)])return null;try{return this['_lock'][_0x87dd7(0x291)]()[_0x87dd7(0x564)](this['_key'])??null;}catch{return null;}}async[_0x5e9051(0x59a)](_0x48a2a3){const _0xb9d598=_0x5e9051;if(this['_released'])return;try{if(this[_0xb9d598(0x335)][_0xb9d598(0x411)]())return;const _0x2bf81f=this['_lock']['_db']()['get'](this[_0xb9d598(0x440)]);if(!_0x2bf81f||_0x2bf81f[_0xb9d598(0x4b3)]!==this[_0xb9d598(0x812)])return;if(_0x1f8b5d)this['_lock'][_0xb9d598(0x291)]()[_0xb9d598(0x7ef)](this[_0xb9d598(0x440)],{..._0x2bf81f,'ttlMs':_0x2bf81f[_0xb9d598(0x6bd)]+_0x48a2a3});else await this[_0xb9d598(0x335)]['_db']()['put'](this[_0xb9d598(0x440)],{..._0x2bf81f,'ttlMs':_0x2bf81f['ttlMs']+_0x48a2a3});}catch{}}async['release'](){const _0x48068a=_0x5e9051;if(this[_0x48068a(0x3b0)])return;if(this[_0x48068a(0x287)])try{await this[_0x48068a(0x287)];}catch{}clearInterval(this[_0x48068a(0x622)]),this[_0x48068a(0x622)]=null,this[_0x48068a(0x3b0)]=!![];try{if(this[_0x48068a(0x335)]['_closed']())return;const _0x673765=this[_0x48068a(0x335)]['_db']()['get'](this[_0x48068a(0x440)]);if(_0x673765&&_0x673765[_0x48068a(0x4b3)]===this[_0x48068a(0x812)]){if(_0x1f8b5d)this['_lock'][_0x48068a(0x291)]()[_0x48068a(0x495)](this['_key']);else await this['_lock'][_0x48068a(0x291)]()[_0x48068a(0x7c3)](this[_0x48068a(0x440)]);}}catch{}}['_startHeartbeat'](_0x780575,_0x1c5961){const _0x889c2f=_0x5e9051,_0x382d6f=_0x130c89(_0x1c5961??Math[_0x889c2f(0x259)](_0x780575/0x3));this['_heartbeatTimer']=setInterval(()=>{const _0x44d401=_0x889c2f;if(this['_released'])return;this[_0x44d401(0x287)]=((async()=>{const _0x3391a1=_0x44d401;try{if(this[_0x3391a1(0x335)][_0x3391a1(0x411)]())return;const _0xf53231=this[_0x3391a1(0x335)]['_db']()[_0x3391a1(0x564)](this[_0x3391a1(0x440)]);if(!_0xf53231||_0xf53231[_0x3391a1(0x4b3)]!==this[_0x3391a1(0x812)]){this[_0x3391a1(0x3b0)]=!![],clearInterval(this[_0x3391a1(0x622)]),this[_0x3391a1(0x622)]=null;return;}if(_0x1f8b5d)this[_0x3391a1(0x335)][_0x3391a1(0x291)]()[_0x3391a1(0x7ef)](this[_0x3391a1(0x440)],{..._0xf53231,'updatedAt':Date[_0x3391a1(0x872)]()});else await this[_0x3391a1(0x335)][_0x3391a1(0x291)]()[_0x3391a1(0x625)](this[_0x3391a1(0x440)],{..._0xf53231,'updatedAt':Date['now']()});}catch{}this[_0x3391a1(0x287)]=null;})());},_0x382d6f);if(this[_0x889c2f(0x622)][_0x889c2f(0x69f)])this[_0x889c2f(0x622)][_0x889c2f(0x69f)]();}}class _0x4f2070{constructor(_0x4e5854,{namespace:_0x2f5ba7,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0xee3e1=_0x5e9051;this[_0xee3e1(0x1b8)]=_0x4e5854,this[_0xee3e1(0x7bb)]=_0x2f5ba7,this[_0xee3e1(0x6bd)]=ttlMs,this[_0xee3e1(0x6a6)]=heartbeatMs,this[_0xee3e1(0x21b)]=null;}[_0x5e9051(0x291)](){const _0x321f60=_0x5e9051;return this[_0x321f60(0x67b)](),(!this[_0x321f60(0x21b)]||this[_0x321f60(0x252)]!==this[_0x321f60(0x1b8)])&&(this[_0x321f60(0x21b)]=this[_0x321f60(0x1b8)]['openDB'](_0x1bb4a0,{'dupSort':![]}),this[_0x321f60(0x252)]=this[_0x321f60(0x1b8)]),this[_0x321f60(0x21b)];}[_0x5e9051(0x267)](){const _0x22ba28=_0x5e9051;return this[_0x22ba28(0x67b)](),(!this['_wantDbHandle']||this[_0x22ba28(0x308)]!==this['_rawDb'])&&(this[_0x22ba28(0x6fe)]=this[_0x22ba28(0x1b8)][_0x22ba28(0x8ec)](_0x1bb4a0+':want',{'dupSort':![]}),this[_0x22ba28(0x308)]=this[_0x22ba28(0x1b8)]),this[_0x22ba28(0x6fe)];}['_closed'](){const _0x2848a0=_0x5e9051,_0x17d8a7=this[_0x2848a0(0x1b8)]?.['status'];return _0x17d8a7==='closing'||_0x17d8a7===_0x2848a0(0x6c5);}['_assertUsable'](){const _0x2a8706=_0x5e9051;if(this[_0x2a8706(0x411)]())throw new Error(_0x2a8706(0x6b1));}[_0x5e9051(0x440)](_0x2a99a1){const _0x4beec1=_0x5e9051;return this[_0x4beec1(0x7bb)]+':'+_0x2a99a1;}[_0x5e9051(0x654)](_0x16066e){const _0x26317d=_0x5e9051;try{if(this['_closed']())return;_0x1f8b5d?this[_0x26317d(0x267)]()[_0x26317d(0x7ef)](this[_0x26317d(0x440)](_0x16066e),Date[_0x26317d(0x872)]()):this[_0x26317d(0x267)]()[_0x26317d(0x625)](this[_0x26317d(0x440)](_0x16066e),Date[_0x26317d(0x872)]())?.[_0x26317d(0x520)]?.(()=>{});}catch{}}[_0x5e9051(0x506)](_0xd2399e,_0x140969=0x3e8){const _0x52142d=_0x5e9051;try{const _0x11fb35=this[_0x52142d(0x267)]()[_0x52142d(0x564)](this['_key'](_0xd2399e));return typeof _0x11fb35===_0x52142d(0x1bc)&&Date[_0x52142d(0x872)]()-_0x11fb35<_0x140969;}catch{return![];}}[_0x5e9051(0x306)](_0x2794ec){const _0x4af5b8=_0x5e9051,_0x35acfe=_0x2794ec[_0x4af5b8(0x22b)]??_0x2794ec[_0x4af5b8(0x4b3)];return _0x35acfe+_0x2794ec[_0x4af5b8(0x6bd)]<Date[_0x4af5b8(0x872)]();}static[_0x5e9051(0x7a7)](_0x3bcdc8){const _0x189f81=_0x5e9051,_0x1f17c9=_0x3bcdc8?.[_0x189f81(0x828)];if(!_0x1f17c9||typeof _0x1f17c9['pid']!==_0x189f81(0x1bc))return![];if(_0x1f17c9[_0x189f81(0x38d)]!==_0x5572fb[_0x189f81(0x38d)]())return![];if(_0x1f17c9[_0x189f81(0x27f)]===process[_0x189f81(0x27f)])return![];try{return process['kill'](_0x1f17c9['pid'],0x0),![];}catch(_0x189491){return _0x189491[_0x189f81(0x247)]==='ESRCH';}}async['tryAcquire'](_0x26ae9f,_0xe28567={},_0x33d5df={}){const _0x1df312=_0x5e9051,_0x49ddfa=this['_key'](_0x26ae9f),_0x2d3029=_0x33d5df[_0x1df312(0x6bd)]??this[_0x1df312(0x6bd)],_0x2087b4=Date['now'](),_0x42b706={'holder':{'pid':process['pid'],'hostname':_0x5572fb[_0x1df312(0x38d)](),..._0xe28567},'acquiredAt':_0x2087b4,'updatedAt':_0x2087b4,'ttlMs':_0x2d3029};let _0x8e1b70=![],_0x205653=null;if(this[_0x1df312(0x411)]())return{'acquired':![],'handle':null,'current':null};try{const _0x53f8db=()=>{const _0x1ee220=_0x1df312,_0x1f681e=this['_db']()[_0x1ee220(0x564)](_0x49ddfa);if(_0x1f681e&&!this[_0x1ee220(0x306)](_0x1f681e)&&!_0x4f2070[_0x1ee220(0x7a7)](_0x1f681e)){const _0x3e1fa8=_0xe28567[_0x1ee220(0x7ea)]!=null&&_0x1f681e[_0x1ee220(0x828)][_0x1ee220(0x27f)]===process['pid']&&_0x1f681e[_0x1ee220(0x828)][_0x1ee220(0x7ea)]===_0xe28567[_0x1ee220(0x7ea)];if(!_0x3e1fa8){_0x8e1b70=![],_0x205653=_0x1f681e;return;}_0x42b706['acquiredAt']<=_0x1f681e[_0x1ee220(0x4b3)]&&(_0x42b706[_0x1ee220(0x4b3)]=_0x1f681e[_0x1ee220(0x4b3)]+0x1,_0x42b706[_0x1ee220(0x22b)]=_0x42b706[_0x1ee220(0x4b3)]);}this[_0x1ee220(0x291)]()[_0x1ee220(0x625)](_0x49ddfa,_0x42b706),_0x8e1b70=!![],_0x205653=_0x42b706;};if(_0x1f8b5d)this['_db']()[_0x1df312(0x70d)](_0x53f8db);else await this[_0x1df312(0x291)]()[_0x1df312(0x601)](_0x53f8db);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x8e1b70)return{'acquired':![],'handle':null,'current':_0x205653};const _0xff5831=new _0x521d15(this,_0x49ddfa,_0x42b706[_0x1df312(0x4b3)]);return _0xff5831[_0x1df312(0x458)](_0x2d3029,this[_0x1df312(0x6a6)]),{'acquired':!![],'handle':_0xff5831,'current':_0x205653};}['inspect'](_0x18e8c7){const _0x202645=_0x5e9051;try{return this[_0x202645(0x291)]()['get'](this[_0x202645(0x440)](_0x18e8c7))??null;}catch{return null;}}[_0x5e9051(0x323)](){const _0x3ad741=_0x5e9051,_0x32da25=this[_0x3ad741(0x7bb)]+':',_0x208d1d=[];try{for(const {key:_0x1687b2,value:_0x31f99a}of this['_db']()[_0x3ad741(0x33e)]({'start':_0x32da25,'end':_0x32da25+'\xff'})){typeof _0x1687b2===_0x3ad741(0x7a6)&&_0x1687b2[_0x3ad741(0x3b2)](_0x32da25)&&_0x208d1d[_0x3ad741(0x5bb)]({'id':_0x1687b2['slice'](_0x32da25[_0x3ad741(0x744)]),'entry':_0x31f99a});}}catch{}return _0x208d1d;}static['listAll'](_0x2068cc){const _0x716c79=_0x5e9051,_0x330d51=[];try{const _0x54ffa0=_0x2068cc[_0x716c79(0x8ec)](_0x1bb4a0,{'dupSort':![]});for(const {key:_0x11ccc3,value:_0x439b0c}of _0x54ffa0[_0x716c79(0x33e)]({})){if(typeof _0x11ccc3!=='string')continue;const _0x47f815=_0x11ccc3['indexOf'](':');if(_0x47f815<0x1)continue;_0x330d51[_0x716c79(0x5bb)]({'namespace':_0x11ccc3[_0x716c79(0x6f2)](0x0,_0x47f815),'id':_0x11ccc3[_0x716c79(0x6f2)](_0x47f815+0x1),'entry':_0x439b0c});}}catch{}return _0x330d51;}}return okdbLock={'OKDBLock':_0x4f2070},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x25ac33=_0x55b176;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x58d434=require$$0,_0x5c4d75=require$$1$1,_0x171077=require$$2$1,{LOOP:_0x1b4aad}=requireOkdbLoopMonitor(),{OKDBLock:_0x7db50f}=requireOkdbLock(),{SYNC_COMMITS:_0x20b63d}=requireOkdbWriter(),_0x1856a0=_0x25ac33(0x7ba),_0x20eda5='node',_0x227f55=_0x25ac33(0x4d7),_0x2d1047='~processes:cmd',_0x3d6144=(_0x2856aa,_0x146cac)=>_0x2856aa+':'+_0x146cac,_0x5ccdb4=(_0x359959,_0x53e46c)=>_0x359959+'::'+_0x53e46c,_0x7cc9e=(_0x32ddee,_0x40e572)=>_0x32ddee+'/'+_0x40e572,_0x4552fd=(_0x349e22,_0x118074)=>_0x349e22+'#'+_0x118074,_0x403e2d=_0xa872b7=>{const _0x192a81=_0x25ac33;if(_0xa872b7?.[_0x192a81(0x48a)])return _0xa872b7[_0x192a81(0x48a)];const _0x44036e=_0xa872b7?.['nodeKey'];return typeof _0x44036e===_0x192a81(0x7a6)&&_0x44036e[_0x192a81(0x361)]('#')?_0x44036e[_0x192a81(0x6f2)](0x0,_0x44036e[_0x192a81(0x562)]('#')):_0x44036e;},_0x365337=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x3b08d7=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4105b8=_0x365337*0x3,_0x354462=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x25ac33(0x7d2)](0x927c0,_0x4105b8*0x14),_0x1c1e1a=[_0x25ac33(0x46d),_0x25ac33(0x49f),_0x25ac33(0x25e),_0x25ac33(0x5b0),'processor:paused',_0x25ac33(0x8ab)];let _0x1ed523=null;function _0x1892a8(){const _0x1d43ca=_0x25ac33;if(_0x1ed523==null)_0x1ed523=Math[_0x1d43ca(0x631)]((Date['now']()-process[_0x1d43ca(0x5a2)]()*0x3e8)/0x3e8)*0x3e8;return _0x1ed523;}function _0x534c5f(_0x7900e6){const _0xf0261=_0x25ac33;if(process.env.OKDB_PROCESS_KILL===_0xf0261(0x429))return![];if(_0x7900e6?.['options']?.[_0xf0261(0x8e9)]&&typeof _0x7900e6[_0xf0261(0x878)]['processes']===_0xf0261(0x6ce)&&_0x7900e6[_0xf0261(0x878)][_0xf0261(0x8e9)][_0xf0261(0x58c)]===![])return![];return!![];}function _0x430963(_0x338254,_0x1d82eb){const _0x3aa00b=_0x25ac33,_0xd12223=!!_0x1d82eb?.[_0x3aa00b(0x44d)];switch(_0x338254){case _0x3aa00b(0x2be):return{'controllable':_0xd12223,'decommissionable':![],'killable':!![],'killConfirm':_0x3aa00b(0x28f)};case'cli':case _0x3aa00b(0x3ce):return{'controllable':_0xd12223,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x3aa00b(0x558):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x3aa00b(0x28d):case'queue-worker':case _0x3aa00b(0x337):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x3aa00b(0x4bc)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x435c8f{constructor(_0x219a2b){const _0x5617ea=_0x25ac33;this['okdb']=_0x219a2b,this[_0x5617ea(0x512)]=null,this[_0x5617ea(0x67c)]=null,this[_0x5617ea(0x38a)]=new Map(),this[_0x5617ea(0x4eb)]=null,this[_0x5617ea(0x2d5)]=![],this['_isReader']=![],this[_0x5617ea(0x6c7)]=_0x1892a8(),this[_0x5617ea(0x34f)]=_0x3d6144(process[_0x5617ea(0x27f)],this[_0x5617ea(0x6c7)]),this[_0x5617ea(0x1f7)]=_0x171077[_0x5617ea(0x529)]()['slice'](0x0,0x8),this[_0x5617ea(0x2d0)]=_0x4552fd(this[_0x5617ea(0x34f)],this[_0x5617ea(0x1f7)]),this[_0x5617ea(0x7cd)]=Date[_0x5617ea(0x872)](),this['_kind']=null,this[_0x5617ea(0x21f)]=null,this[_0x5617ea(0x6c0)]=null,this[_0x5617ea(0x662)]=null,this['_onProcEvent']=null,this[_0x5617ea(0x57c)]=null,this[_0x5617ea(0x667)]=0x0,this[_0x5617ea(0x3e0)]={},this[_0x5617ea(0x717)]=new Map(),this[_0x5617ea(0x553)]=process[_0x5617ea(0x31b)](),this[_0x5617ea(0x49b)]=Date[_0x5617ea(0x872)](),this[_0x5617ea(0x5ac)]=0x0,this['_threadStats']=new Map();}get[_0x25ac33(0x22c)](){const _0x19b1e5=_0x25ac33;return this[_0x19b1e5(0x34f)];}get['rowKey'](){const _0x55632c=_0x25ac33;return this[_0x55632c(0x2d0)];}['_caps'](_0x39bf6f,_0x40464e){const _0x507f8a=_0x25ac33,_0x3b8803=_0x430963(_0x39bf6f,_0x40464e);if(_0x3b8803['killable']&&!_0x534c5f(this[_0x507f8a(0x1cc)]))return{..._0x3b8803,'killable':![],'killConfirm':undefined};return _0x3b8803;}['isActive'](){const _0x2e5984=_0x25ac33;return!!this[_0x2e5984(0x512)];}[_0x25ac33(0x2f6)](_0x75c0ed){const _0x3949bf=_0x25ac33;Object[_0x3949bf(0x8cd)](this[_0x3949bf(0x3e0)],_0x75c0ed||{});}[_0x25ac33(0x4cd)](_0x2e5972){const _0x151c1f=_0x25ac33;if(_0x2e5972)this[_0x151c1f(0x6c0)]=_0x2e5972;}[_0x25ac33(0x83f)](_0x5c90df={}){const _0x187264=_0x25ac33;return this['okdb'][_0x187264(0x6b2)](_0x5c90df);}[_0x25ac33(0x8a9)](){const _0x5632d4=_0x25ac33,_0x276d08={};let _0x14a7c1=0x0,_0x441d60=0x0;const _0x1c4db5=new Set();for(const _0x42d635 of this['listNodes']()){_0x441d60++;const _0x1352bf=_0x42d635['processing'];if(!_0x1352bf)continue;if(_0x1352bf[_0x5632d4(0x22f)])_0x14a7c1++;for(const _0x5d5299 of _0x1352bf[_0x5632d4(0x44d)]||[]){if(![_0x5632d4(0x60c),_0x5632d4(0x4cb)]['includes'](_0x5d5299[_0x5632d4(0x29a)]))continue;(_0x5d5299[_0x5632d4(0x4fb)]===_0x5632d4(0x4bb)||_0x5d5299[_0x5632d4(0x4fb)]===_0x5632d4(0x48b))&&_0x5d5299[_0x5632d4(0x1dc)]&&_0x1c4db5[_0x5632d4(0x4d2)]((_0x5d5299['env']||'default')+':'+_0x5d5299['cursorKey']);const _0x273175=_0x5d5299[_0x5632d4(0x264)]||_0x5632d4(0x24a);(_0x276d08[_0x273175]||=[])['push']({..._0x5d5299,'env':_0x273175,'owner':{'pid':_0x42d635[_0x5632d4(0x27f)]??null,'kind':_0x42d635['kind']??null}});}}for(const [_0x51c1c6,_0x546705]of Object['entries'](_0x276d08)){for(const _0x4bc9b1 of _0x546705){if(_0x4bc9b1[_0x5632d4(0x29a)]==='single'&&!_0x4bc9b1[_0x5632d4(0x893)]){const _0x12f23d=_0x51c1c6+':'+(_0x4bc9b1['cursorKey']??'');if(!_0x1c4db5[_0x5632d4(0x5d6)](_0x12f23d))_0x4bc9b1['unclaimed']=!![];}}}return{'envs':_0x276d08,'policy':null,'participation':{'participating':_0x14a7c1,'total':_0x441d60},'source':_0x5632d4(0x4c4)};}[_0x25ac33(0x345)](){const _0x26b92e=_0x25ac33,_0x4c3b05=_0x175ac4=>{const _0xcb58c4=_0x223d;if(_0x175ac4[_0xcb58c4(0x4fb)]===_0xcb58c4(0x4bb)||_0x175ac4[_0xcb58c4(0x4fb)]===_0xcb58c4(0x48b)||_0x175ac4[_0xcb58c4(0x4fb)]===_0xcb58c4(0x20b))return 0x3;if(_0x175ac4[_0xcb58c4(0x893)])return 0x1;return 0x2;},_0x5160df=new Map();for(const _0x35926c of this[_0x26b92e(0x415)]()){for(const _0x39bcf0 of _0x35926c[_0x26b92e(0x525)]?.['processors']||[]){const _0x10eda9={..._0x39bcf0,'owner':{'pid':_0x35926c[_0x26b92e(0x27f)]??null,'kind':_0x35926c[_0x26b92e(0x65d)]??null,'host':_0x35926c['host']??null}},_0x448575=_0x39bcf0[_0x26b92e(0x29a)]===_0x26b92e(0x60c)?_0x26b92e(0x698)+(_0x39bcf0[_0x26b92e(0x264)]??'')+'::'+(_0x39bcf0[_0x26b92e(0x1dc)]??_0x39bcf0[_0x26b92e(0x465)]??_0x39bcf0['id']):_0x26b92e(0x83a)+(_0x35926c[_0x26b92e(0x2bd)]??_0x35926c[_0x26b92e(0x48a)]??'')+'::'+(_0x39bcf0['env']??'')+'::'+_0x39bcf0['id'],_0x471b8e=_0x5160df[_0x26b92e(0x564)](_0x448575);if(!_0x471b8e||_0x4c3b05(_0x10eda9)>_0x4c3b05(_0x471b8e))_0x5160df['set'](_0x448575,_0x10eda9);}}return[..._0x5160df[_0x26b92e(0x5fb)]()];}[_0x25ac33(0x593)](){const _0x4ef5a7=_0x25ac33,_0x13d16e=Date[_0x4ef5a7(0x872)](),_0x46da01=this['listNodes'](),_0x3ba1c1=_0x391e65=>Math['max'](0x0,Math[_0x4ef5a7(0x631)]((_0x13d16e-(_0x391e65['startedAt']||_0x13d16e))/0x3e8)),_0x3d8c09=_0x46da01[_0x4ef5a7(0x618)](_0x3d0c7d=>_0x3d0c7d[_0x4ef5a7(0x65d)]==='primary'),_0x4b978f=_0x46da01['filter'](_0x21935e=>_0x21935e[_0x4ef5a7(0x65d)]===_0x4ef5a7(0x28d));if(_0x3d8c09||_0x4b978f[_0x4ef5a7(0x744)])return{'primary':_0x3d8c09?{'pid':_0x3d8c09[_0x4ef5a7(0x27f)],'uptime':_0x3ba1c1(_0x3d8c09)}:null,'workers':_0x4b978f[_0x4ef5a7(0x47f)](_0x1f7ca3=>({'pid':_0x1f7ca3['pid'],'uptime':_0x3ba1c1(_0x1f7ca3)})),'workersConfigured':_0x3d8c09?.[_0x4ef5a7(0x56d)]?.[_0x4ef5a7(0x45b)]??_0x4b978f[_0x4ef5a7(0x744)],'mode':_0x4ef5a7(0x324)};const _0x29ae43=_0x46da01[_0x4ef5a7(0x618)](_0x3dde9c=>_0x3dde9c[_0x4ef5a7(0x65d)]===_0x4ef5a7(0x87f)||_0x3dde9c['kind']===_0x4ef5a7(0x3ce)||_0x3dde9c[_0x4ef5a7(0x65d)]===_0x4ef5a7(0x558)),_0xf0281c=_0x29ae43?{'pid':_0x29ae43[_0x4ef5a7(0x27f)],'uptime':_0x3ba1c1(_0x29ae43)}:{'pid':process['pid'],'uptime':Math[_0x4ef5a7(0x7d2)](0x0,Math[_0x4ef5a7(0x631)](process['uptime']()))};return{'primary':_0xf0281c,'workers':[_0xf0281c],'workersConfigured':0x1,'mode':'single'};}['nodesView'](){const _0x4d3cc7=_0x25ac33;return this[_0x4d3cc7(0x51e)]();}[_0x25ac33(0x738)](){const _0x5b5b0a=_0x25ac33,_0x339d05=new Map();for(const _0x16d598 of this[_0x5b5b0a(0x51e)]())_0x339d05[_0x5b5b0a(0x486)](_0x16d598[_0x5b5b0a(0x48a)],{..._0x16d598,'children':[]});const _0x4e313d=[];for(const _0x536bd4 of _0x339d05[_0x5b5b0a(0x5fb)]()){const _0x28e287=_0x536bd4[_0x5b5b0a(0x3a7)]?_0x339d05['get'](_0x536bd4['supervisorKey']):null;if(_0x28e287&&_0x28e287!==_0x536bd4)_0x28e287[_0x5b5b0a(0x60d)][_0x5b5b0a(0x5bb)](_0x536bd4);else _0x4e313d[_0x5b5b0a(0x5bb)](_0x536bd4);}const _0x48da1f=(_0x5340b9,_0x551127)=>_0x5340b9[_0x5b5b0a(0x65d)]===_0x551127['kind']?(_0x5340b9['pid']||0x0)-(_0x551127[_0x5b5b0a(0x27f)]||0x0):(_0x5340b9[_0x5b5b0a(0x65d)]??'')<(_0x551127[_0x5b5b0a(0x65d)]??'')?-0x1:0x1,_0x4a27e9=_0x4ce7fc=>{const _0x208829=_0x5b5b0a;_0x4ce7fc[_0x208829(0x54d)](_0x48da1f);for(const _0x527f91 of _0x4ce7fc)if(_0x527f91['children'][_0x208829(0x744)])_0x4a27e9(_0x527f91[_0x208829(0x60d)]);};return _0x4a27e9(_0x4e313d),_0x4e313d;}[_0x25ac33(0x496)](_0x3196b8){const _0xac3ac1=_0x25ac33;return this['_groupByProcess']()['find'](_0x25b9a0=>_0x25b9a0[_0xac3ac1(0x48a)]===_0x3196b8)??null;}[_0x25ac33(0x51e)](_0x535a14=Date[_0x25ac33(0x872)]()){const _0x3f68d3=_0x25ac33,_0x2331e5=new Map();for(const _0x383ff7 of this['listNodes']()){const _0x3aef6f=_0x403e2d(_0x383ff7);let _0x3534f5=_0x2331e5[_0x3f68d3(0x564)](_0x3aef6f);!_0x3534f5&&(_0x3534f5={'processKey':_0x3aef6f,'nodeKey':_0x3aef6f,'pid':_0x383ff7[_0x3f68d3(0x27f)],'ppid':_0x383ff7[_0x3f68d3(0x71f)]??null,'host':_0x383ff7['host']??null,'kind':_0x383ff7[_0x3f68d3(0x65d)],'role':null,'supervisorKey':_0x383ff7[_0x3f68d3(0x3a7)]??null,'slot':_0x383ff7[_0x3f68d3(0x4ab)]??null,'slotKey':_0x383ff7[_0x3f68d3(0x643)]??null,'caps':_0x383ff7[_0x3f68d3(0x3a5)]??null,'lifecycle':_0x383ff7[_0x3f68d3(0x336)]??null,'uptime':Math[_0x3f68d3(0x7d2)](0x0,Math[_0x3f68d3(0x631)]((_0x535a14-(_0x383ff7[_0x3f68d3(0x7e3)]||_0x535a14))/0x3e8)),'startedAt':_0x383ff7['startedAt']??null,'meta':_0x383ff7['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x2331e5['set'](_0x3aef6f,_0x3534f5));_0x3534f5[_0x3f68d3(0x420)][_0x3f68d3(0x5bb)]({'instanceId':_0x383ff7[_0x3f68d3(0x868)]??null,'role':_0x383ff7['role']??null,'listenAddr':_0x383ff7[_0x3f68d3(0x7fd)]??null,'lifecycle':_0x383ff7[_0x3f68d3(0x336)]??null,'processing':_0x383ff7['processing']??null});if(!_0x3534f5[_0x3f68d3(0x707)]&&_0x383ff7[_0x3f68d3(0x707)])_0x3534f5[_0x3f68d3(0x707)]=_0x383ff7[_0x3f68d3(0x707)];if(!_0x3534f5[_0x3f68d3(0x7fd)]&&_0x383ff7[_0x3f68d3(0x7fd)])_0x3534f5[_0x3f68d3(0x7fd)]=_0x383ff7[_0x3f68d3(0x7fd)];if(!_0x3534f5[_0x3f68d3(0x525)]&&_0x383ff7[_0x3f68d3(0x525)])_0x3534f5[_0x3f68d3(0x525)]=_0x383ff7['processing'];if(!_0x3534f5[_0x3f68d3(0x61e)]&&_0x383ff7[_0x3f68d3(0x61e)])_0x3534f5[_0x3f68d3(0x61e)]=_0x383ff7['engines'];if(!_0x3534f5[_0x3f68d3(0x7b9)]&&_0x383ff7[_0x3f68d3(0x7b9)])_0x3534f5[_0x3f68d3(0x7b9)]=_0x383ff7[_0x3f68d3(0x7b9)];if(_0x3534f5[_0x3f68d3(0x3a5)]==null&&_0x383ff7['caps'])_0x3534f5[_0x3f68d3(0x3a5)]=_0x383ff7[_0x3f68d3(0x3a5)];if(_0x383ff7[_0x3f68d3(0x22a)]&&(!_0x3534f5[_0x3f68d3(0x22a)]||(_0x383ff7['stats']['at']??0x0)>(_0x3534f5[_0x3f68d3(0x22a)]['at']??0x0)))_0x3534f5['stats']=_0x383ff7[_0x3f68d3(0x22a)];}return[..._0x2331e5[_0x3f68d3(0x5fb)]()];}[_0x25ac33(0x224)](){const _0x1c8bae=_0x25ac33,_0x565f32=[],_0x4cbf6a={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x3ed4b2 of this['_groupByProcess']()){_0x565f32[_0x1c8bae(0x5bb)]({'processKey':_0x3ed4b2[_0x1c8bae(0x48a)],'kind':_0x3ed4b2[_0x1c8bae(0x65d)],'pid':_0x3ed4b2[_0x1c8bae(0x27f)],'supervisorKey':_0x3ed4b2['supervisorKey'],'meta':_0x3ed4b2['meta']??null,'uptime':_0x3ed4b2[_0x1c8bae(0x5a2)],'stats':_0x3ed4b2['stats']??null}),_0x4cbf6a[_0x1c8bae(0x8e9)]++;if(_0x3ed4b2[_0x1c8bae(0x22a)]){_0x4cbf6a[_0x1c8bae(0x7ec)]+=_0x3ed4b2[_0x1c8bae(0x22a)][_0x1c8bae(0x7ec)]||0x0,_0x4cbf6a['heapUsed']+=(_0x3ed4b2['stats'][_0x1c8bae(0x507)]||0x0)+(_0x3ed4b2[_0x1c8bae(0x22a)]['threads']?.['heapUsed']||0x0);const _0x5c19f6=_0x3ed4b2[_0x1c8bae(0x22a)][_0x1c8bae(0x663)];_0x5c19f6&&(_0x4cbf6a[_0x1c8bae(0x663)][_0x1c8bae(0x39f)]+=_0x5c19f6[_0x1c8bae(0x39f)]||0x0,_0x4cbf6a['threads']['sandbox']+=_0x5c19f6[_0x1c8bae(0x656)]||0x0,_0x4cbf6a[_0x1c8bae(0x663)]['busy']+=_0x5c19f6[_0x1c8bae(0x470)]||0x0);}}return{'totals':_0x4cbf6a,'nodes':_0x565f32};}async[_0x25ac33(0x35f)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x3b10ed=_0x25ac33;this[_0x3b10ed(0x2d5)]=this['_isWriter']||!!writer,this['_isReader']=this[_0x3b10ed(0x2d7)]||!!reader,this[_0x3b10ed(0x8d6)]=kind||this[_0x3b10ed(0x8d6)]||(_0x5c4d75[_0x3b10ed(0x5d9)]?_0x3b10ed(0x28d):_0x3b10ed(0x87f)),this[_0x3b10ed(0x21f)]=supervisorKey??this[_0x3b10ed(0x21f)],this['_listenAddr']=listenAddr??this[_0x3b10ed(0x6c0)],this[_0x3b10ed(0x1c4)](),await this[_0x3b10ed(0x29d)]();if(!writer&&!reader)return null;if(!this[_0x3b10ed(0x512)]){const _0x552757=await this[_0x3b10ed(0x1cc)][_0x3b10ed(0x78a)](_0x1856a0,{'sync':![],'durability':_0x3b10ed(0x675)});await _0x552757[_0x3b10ed(0x1d5)](_0x20eda5),this[_0x3b10ed(0x512)]=_0x552757;}return this[_0x3b10ed(0x512)];}[_0x25ac33(0x2cc)](){const _0x286ccb=_0x25ac33;return this[_0x286ccb(0x3f2)]!==this[_0x286ccb(0x512)]&&(this[_0x286ccb(0x3f2)]=this[_0x286ccb(0x512)],this[_0x286ccb(0x26c)]=this[_0x286ccb(0x512)][_0x286ccb(0x511)](_0x20eda5)[_0x286ccb(0x59c)]),this[_0x286ccb(0x26c)];}[_0x25ac33(0x6aa)](_0x1c2333){const _0x1cedff=_0x25ac33;if(_0x20b63d)return this[_0x1cedff(0x2cc)]()[_0x1cedff(0x7ef)](_0x1c2333[_0x1cedff(0x2bd)],_0x1c2333,0x1);const _0x52f311=this['_nodeDb']()['put'](_0x1c2333[_0x1cedff(0x2bd)],_0x1c2333,0x1);if(_0x52f311&&typeof _0x52f311[_0x1cedff(0x39e)]===_0x1cedff(0x733))_0x52f311[_0x1cedff(0x39e)](undefined,()=>{});return _0x52f311;}[_0x25ac33(0x319)](_0x10b050){const _0x2914c4=_0x25ac33;return this['_nodeDb']()[_0x2914c4(0x7ef)](_0x10b050[_0x2914c4(0x2bd)],_0x10b050,0x1);}[_0x25ac33(0x4f1)](_0x11ff36){const _0x5cee3e=_0x25ac33;if(_0x20b63d)try{return this['_nodeDb']()[_0x5cee3e(0x495)](_0x11ff36);}catch{return![];}const _0x3afcd0=this['_nodeDb']()[_0x5cee3e(0x7c3)](_0x11ff36);if(_0x3afcd0&&typeof _0x3afcd0[_0x5cee3e(0x39e)]===_0x5cee3e(0x733))_0x3afcd0[_0x5cee3e(0x39e)](undefined,()=>{});return _0x3afcd0;}async['putNode'](_0x500645){const _0x223092=_0x25ac33;if(!this[_0x223092(0x512)]||!this['_isWriter']||!_0x500645?.[_0x223092(0x2bd)])return;return this['_putRowAsync'](_0x500645);}async['removeNode'](_0x283cbe){const _0x48003b=_0x25ac33;if(!this['_statusEnv']||!this[_0x48003b(0x2d5)]||!_0x283cbe)return;const _0x206868=_0x283cbe['includes']('#'),_0x57685a=[];for(const {key:_0x54b383}of this[_0x48003b(0x512)]['getRange'](_0x20eda5)){if(_0x54b383===_0x283cbe||!_0x206868&&typeof _0x54b383===_0x48003b(0x7a6)&&_0x54b383[_0x48003b(0x3b2)](_0x283cbe+'#'))_0x57685a['push'](_0x54b383);}for(const _0x3a90e1 of _0x57685a){try{this[_0x48003b(0x2cc)]()[_0x48003b(0x495)](_0x3a90e1);}catch{}}}[_0x25ac33(0x373)](_0x3826b4){const _0x5e63c9=_0x25ac33;if(typeof _0x3826b4?.[_0x5e63c9(0x27f)]!==_0x5e63c9(0x1bc))return![];if(_0x3826b4['host']!==_0x58d434[_0x5e63c9(0x38d)]())return![];if(_0x3826b4[_0x5e63c9(0x27f)]===process[_0x5e63c9(0x27f)])return![];if(_0x3826b4[_0x5e63c9(0x481)]!=null&&_0x3826b4[_0x5e63c9(0x481)]<Date['now']()-_0x354462)return!![];try{return process[_0x5e63c9(0x58c)](_0x3826b4['pid'],0x0),![];}catch(_0x32bf6f){return _0x32bf6f[_0x5e63c9(0x247)]===_0x5e63c9(0x1e1);}}[_0x25ac33(0x415)](){const _0x54c7c4=_0x25ac33;if(!this['_statusEnv'])return[];try{this[_0x54c7c4(0x512)]['db']?.['resetReadTxn']?.();}catch{}const _0x5094bf=Date[_0x54c7c4(0x872)](),_0xad7fbf=_0x58d434[_0x54c7c4(0x38d)](),_0xa1c592=[];for(const {value:_0x5cd584}of this[_0x54c7c4(0x512)][_0x54c7c4(0x33e)](_0x20eda5)){if(!_0x5cd584)continue;let _0x42df55=null;_0x5cd584[_0x54c7c4(0x573)]===_0xad7fbf&&typeof _0x5cd584[_0x54c7c4(0x27f)]==='number'&&(_0x42df55=!this[_0x54c7c4(0x373)](_0x5cd584));if(_0x42df55===![])continue;const _0x568c46=_0x5cd584['expiresAt']==null||_0x5cd584[_0x54c7c4(0x481)]>=_0x5094bf;if(_0x42df55===!![]||_0x568c46)_0xa1c592['push'](_0x5cd584);}return _0xa1c592;}async[_0x25ac33(0x4c7)](_0x377559=0x0){const _0x355989=_0x25ac33;if(!this['_statusEnv']||!this['_isWriter'])return;const _0x5c094f=Date[_0x355989(0x872)]()-_0x377559,_0x48c32f=new Set(),_0x1f8a96=[],_0x52a815=_0x58d434['hostname'](),_0x3c973c=require$$3['version'];for(const {key:_0xd3150e,value:_0x44bca2}of this[_0x355989(0x512)][_0x355989(0x33e)](_0x20eda5)){if(!_0x44bca2)continue;const _0x5d120e=_0x44bca2[_0x355989(0x573)]===_0x52a815&&typeof _0x44bca2[_0x355989(0x27f)]===_0x355989(0x1bc),_0x24707a=_0x5d120e?this['_nodeDead'](_0x44bca2):_0x44bca2['expiresAt']!=null&&_0x44bca2[_0x355989(0x481)]<_0x5c094f;if(_0x24707a)_0x1f8a96[_0x355989(0x5bb)](_0xd3150e);else{_0x48c32f[_0x355989(0x4d2)](_0x403e2d(_0x44bca2)??_0xd3150e);if(_0x44bca2[_0x355989(0x50b)]&&_0x44bca2[_0x355989(0x50b)]!==_0x3c973c){if(!this[_0x355989(0x2c8)])this['_versionSkewWarned']=new Set();!this[_0x355989(0x2c8)][_0x355989(0x5d6)](_0x44bca2[_0x355989(0x50b)])&&(this[_0x355989(0x2c8)][_0x355989(0x4d2)](_0x44bca2[_0x355989(0x50b)]),this[_0x355989(0x1cc)]['log']?.[_0x355989(0x488)]?.(_0x355989(0x73f)+(_0x44bca2['pid']??'?')+_0x355989(0x1fd)+_0x44bca2['version']+'\x20while\x20this\x20process\x20runs\x20'+_0x3c973c+_0x355989(0x68d)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x355989(0x469)}));}}}for(const _0x3f6362 of _0x1f8a96)this[_0x355989(0x4f1)](_0x3f6362);if(this['_ensureDesired']()){const _0x4fc11a=[];for(const {key:_0x3172ea}of this['listDesired'](_0x355989(0x2e5))){if(!_0x48c32f['has'](_0x3172ea)){if(_0x20b63d)try{this['_desired'][_0x355989(0x495)](_0x355989(0x867)+_0x3172ea);}catch{}else _0x4fc11a[_0x355989(0x5bb)](this[_0x355989(0x67c)][_0x355989(0x7c3)](_0x355989(0x867)+_0x3172ea));}}if(_0x4fc11a['length'])await Promise[_0x355989(0x540)](_0x4fc11a);}}[_0x25ac33(0x6ca)](_0x400448=null){const _0x4d0b6a=_0x25ac33;if(this[_0x4d0b6a(0x662)])return;if(!this[_0x4d0b6a(0x2d5)]||!this['_statusEnv']){this[_0x4d0b6a(0x1cc)]?.[_0x4d0b6a(0x777)]?.[_0x4d0b6a(0x488)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this[_0x4d0b6a(0x2d5)]+_0x4d0b6a(0x233)+!!this['_statusEnv']+_0x4d0b6a(0x557),{'feature':'processes'});return;}this[_0x4d0b6a(0x57c)]=_0x400448,this['_onProcEvent']=()=>this[_0x4d0b6a(0x806)]();for(const _0x2112e6 of _0x1c1e1a)this[_0x4d0b6a(0x1cc)][_0x4d0b6a(0x700)]['on'](_0x2112e6,this[_0x4d0b6a(0x64a)]);this['_publishNow']();const _0x26a13b=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x365337;this[_0x4d0b6a(0x662)]=setInterval(()=>{const _0x1b50d9=_0x4d0b6a;if(this[_0x1b50d9(0x57c)])try{this[_0x1b50d9(0x57c)]();}catch{}this[_0x1b50d9(0x3b7)](),this[_0x1b50d9(0x4c7)]()[_0x1b50d9(0x520)](()=>{});},_0x26a13b);if(this[_0x4d0b6a(0x662)][_0x4d0b6a(0x69f)])this[_0x4d0b6a(0x662)][_0x4d0b6a(0x69f)]();}[_0x25ac33(0x806)](){const _0x578e0d=_0x25ac33;if(!this['_isWriter']||!this['_statusEnv'])return;if(Date[_0x578e0d(0x872)]()-this[_0x578e0d(0x667)]<_0x3b08d7)return;this[_0x578e0d(0x3b7)]();}['_publishNow'](){const _0x2c7063=_0x25ac33;if(!this['_isWriter']||!this['_statusEnv'])return;this['_lastPublishAt']=Date[_0x2c7063(0x872)]();try{const _0x2ed1e4=[this[_0x2c7063(0x31d)]()];for(const _0x38d859 of this[_0x2c7063(0x717)]['values']())_0x2ed1e4[_0x2c7063(0x5bb)](this[_0x2c7063(0x854)](_0x38d859));const _0x6011d7=_0x1b4aad['enabled']?_0x1b4aad[_0x2c7063(0x872)]():0x0;for(const _0x249655 of _0x2ed1e4){try{this['_putRowSync'](_0x249655),this[_0x2c7063(0x571)]=![];}catch(_0x5669d5){!this['_publishFailWarned']&&(this[_0x2c7063(0x571)]=!![],this[_0x2c7063(0x1cc)]?.['log']?.[_0x2c7063(0x488)]?.(_0x2c7063(0x4f5)+_0x5669d5[_0x2c7063(0x262)],{'feature':'processes'}));}}if(_0x1b4aad[_0x2c7063(0x3d8)])_0x1b4aad[_0x2c7063(0x4f2)]('registry-publish',_0x1b4aad[_0x2c7063(0x872)]()-_0x6011d7,_0x2c7063(0x4e6)+_0x2ed1e4[_0x2c7063(0x744)]+'\x20sync');}catch(_0x1c373b){!this['_publishFailWarned']&&(this[_0x2c7063(0x571)]=!![],this[_0x2c7063(0x1cc)]?.[_0x2c7063(0x777)]?.['warn']?.(_0x2c7063(0x4f5)+_0x1c373b[_0x2c7063(0x262)],{'feature':'processes'}));}}async['stopHeartbeat'](){const _0xf1bdde=_0x25ac33;if(this['_onProcEvent']){for(const _0x22a461 of _0x1c1e1a){try{this['okdb'][_0xf1bdde(0x700)]['off'](_0x22a461,this[_0xf1bdde(0x64a)]);}catch{}}this[_0xf1bdde(0x64a)]=null;}this[_0xf1bdde(0x662)]&&(clearInterval(this[_0xf1bdde(0x662)]),this[_0xf1bdde(0x662)]=null);try{if(this[_0xf1bdde(0x512)]&&this[_0xf1bdde(0x2d5)])await this[_0xf1bdde(0x6a2)](this[_0xf1bdde(0x2d0)]);}catch{}}async[_0x25ac33(0x726)](){const _0x205d1c=_0x25ac33;if(!this['_statusEnv']||!this[_0x205d1c(0x2d5)])return;try{await this[_0x205d1c(0x6a2)](this['_rowKey']);}catch{}try{const _0x72443d=[];for(const {value:_0x232425}of this[_0x205d1c(0x512)][_0x205d1c(0x33e)](_0x20eda5)){if(_0x232425?.[_0x205d1c(0x71f)]===process['pid']&&_0x232425['nodeKey'])_0x72443d[_0x205d1c(0x5bb)](_0x232425[_0x205d1c(0x2bd)]);}for(const _0x580900 of _0x72443d){try{await this[_0x205d1c(0x6a2)](_0x580900);}catch{}}}catch{}}async[_0x25ac33(0x4ca)](){return this['putNode'](this['_buildOwnRow']());}async[_0x25ac33(0x2a0)](_0x48b6d5){const _0x5a2c87=_0x25ac33;if(!this[_0x5a2c87(0x512)]||!this[_0x5a2c87(0x2d5)])return;return this[_0x5a2c87(0x2bb)](this[_0x5a2c87(0x854)](_0x48b6d5));}['_buildChildRow']({pid:_0x20a5c6,startedAt:_0x554e05,kind:_0xa0ccc1,supervisorKey:_0x2e339d,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x44a157=_0x25ac33,_0x86525=Date['now'](),_0x157dcb=_0x3d6144(_0x20a5c6,_0x554e05);return{'nodeKey':_0x4552fd(_0x157dcb,'0'),'processKey':_0x157dcb,'instanceId':'0','pid':_0x20a5c6,'startedAt':_0x554e05,'ppid':process[_0x44a157(0x27f)],'host':_0x58d434[_0x44a157(0x38d)](),'supervisorKey':_0x2e339d,'slot':slot,'slotKey':slotKey,'kind':_0xa0ccc1,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x86525,'expiresAt':_0x86525+_0x4105b8,'caps':this[_0x44a157(0x61c)](_0xa0ccc1,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x25ac33(0x616)](_0x393b04){const _0x1eb0d7=_0x25ac33;if(!_0x393b04?.[_0x1eb0d7(0x27f)])return null;const _0x1bfe1b=_0x3d6144(_0x393b04[_0x1eb0d7(0x27f)],_0x393b04[_0x1eb0d7(0x7e3)]);this[_0x1eb0d7(0x717)][_0x1eb0d7(0x486)](_0x1bfe1b,{..._0x393b04,'supervisorKey':_0x393b04['supervisorKey']??this[_0x1eb0d7(0x34f)]});if(this[_0x1eb0d7(0x2d5)])await this['publishChildRow'](this[_0x1eb0d7(0x717)]['get'](_0x1bfe1b))[_0x1eb0d7(0x520)]?.(()=>{});return _0x1bfe1b;}[_0x25ac33(0x3d3)](_0x489f6e){const _0x4a189c=_0x25ac33;if(!_0x489f6e)return;return this[_0x4a189c(0x717)][_0x4a189c(0x591)](_0x489f6e),this[_0x4a189c(0x6a2)](_0x489f6e);}[_0x25ac33(0x6e9)](){const _0x48a576=_0x25ac33,_0x3717e1=Date['now'](),_0xccd36f=process[_0x48a576(0x31b)](),_0x546911=(_0x3717e1-this['_lastCpuAt'])*0x3e8;if(_0x546911>=0x3d090){const _0x47fd29=_0xccd36f['user']-this[_0x48a576(0x553)][_0x48a576(0x394)]+(_0xccd36f[_0x48a576(0x560)]-this[_0x48a576(0x553)][_0x48a576(0x560)]),_0x35c2a0=_0x58d434['cpus']()[_0x48a576(0x744)]||0x1;this[_0x48a576(0x5ac)]=Math['min'](0x64,Math[_0x48a576(0x631)](_0x47fd29/(_0x546911*_0x35c2a0)*0x64)),this['_lastCpuWindowMs']=Math[_0x48a576(0x631)](_0x546911/0x3e8),this[_0x48a576(0x553)]=_0xccd36f,this['_lastCpuAt']=_0x3717e1;}const _0x5008ce=process[_0x48a576(0x846)](),_0x4e7d93=this[_0x48a576(0x1b6)]['size'];let _0xcd7747=0x0;if(_0x4e7d93>0x0){const _0xef9283=[this[_0x48a576(0x1cc)],...this['okdb']['_envs']?.[_0x48a576(0x5fb)]?.()??[]];for(const _0xf8fa09 of _0xef9283){const _0x502514=_0xf8fa09[_0x48a576(0x3f5)]?.[_0x48a576(0x26e)];if(_0x502514)_0xcd7747+=_0x502514['liveThreadStats'][_0x48a576(0x470)];}}let _0x1a0090=null;const _0x55261d=_0x4e7d93;if(_0x55261d>0x0){let _0x275518=0x0;for(const _0x1ab349 of this['_threadStats'][_0x48a576(0x5fb)]())_0x275518+=_0x1ab349['heapUsed']||0x0;_0x1a0090={'count':_0x55261d,'heapUsed':_0x275518,'sandbox':_0x4e7d93,'busy':_0xcd7747};}return{'rss':_0x5008ce[_0x48a576(0x7ec)],'heapUsed':_0x5008ce[_0x48a576(0x507)],'heapTotal':_0x5008ce[_0x48a576(0x4dc)],'external':_0x5008ce[_0x48a576(0x4d5)],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x48a576(0x492)]??null,'threads':_0x1a0090,'at':_0x3717e1};}[_0x25ac33(0x50a)](_0x15654c,_0x3e258e){if(!_0x15654c||!_0x3e258e)return;this['_threadStats']['set'](_0x15654c,_0x3e258e);}['clearThreadStats'](_0x33dcf2){const _0x4affd0=_0x25ac33;this[_0x4affd0(0x1b6)][_0x4affd0(0x591)](_0x33dcf2);}[_0x25ac33(0x400)](_0x4bca49,_0x2ac545,_0xbfa3c=undefined){const _0x158302=_0x25ac33,_0x3f381e=this[_0x158302(0x717)][_0x158302(0x564)](_0x4bca49);if(!_0x3f381e||!_0x2ac545)return;if(_0xbfa3c!==undefined)_0x3f381e[_0x158302(0x525)]=_0xbfa3c;_0x3f381e[_0x158302(0x22a)]={'rss':_0x2ac545[_0x158302(0x7ec)]??null,'heapUsed':_0x2ac545['heapUsed']??null,'heapTotal':_0x2ac545[_0x158302(0x4dc)]??null,'external':_0x2ac545[_0x158302(0x4d5)]??null,'cpuPct':_0x2ac545['cpuPct']??null,'cpuWindowMs':_0x2ac545[_0x158302(0x7b1)]??null,'threads':_0x2ac545['threads']??null,'claims':_0x2ac545[_0x158302(0x887)]??null,'envsOpen':_0x2ac545['envsOpen']??null,'at':Date[_0x158302(0x872)]()};}[_0x25ac33(0x31d)](){const _0x558e9d=_0x25ac33,_0x4c9380=Date['now'](),_0x3a81f3=this['okdb'][_0x558e9d(0x39d)]||{},_0x171812=this[_0x558e9d(0x8d6)]||_0x558e9d(0x87f);return{'nodeKey':this['_rowKey'],'processKey':this['_selfKey'],'instanceId':this[_0x558e9d(0x1f7)],'pid':process[_0x558e9d(0x27f)],'startedAt':this[_0x558e9d(0x6c7)],'instanceStartedAt':this[_0x558e9d(0x7cd)],'ppid':typeof process[_0x558e9d(0x71f)]==='number'?process[_0x558e9d(0x71f)]:null,'host':_0x58d434[_0x558e9d(0x38d)](),'supervisorKey':this[_0x558e9d(0x21f)]??null,'version':require$$3[_0x558e9d(0x50b)],'kind':_0x171812,'role':{'engines':!!_0x3a81f3[_0x558e9d(0x61e)],'processors':!!_0x3a81f3[_0x558e9d(0x44d)],'compaction':_0x3a81f3[_0x558e9d(0x874)],'http':_0x3a81f3[_0x558e9d(0x6e2)]},'listenAddr':this[_0x558e9d(0x6c0)]??null,'heartbeatAt':_0x4c9380,'expiresAt':_0x4c9380+_0x4105b8,'caps':this[_0x558e9d(0x61c)](_0x171812,_0x3a81f3),'lifecycle':{'state':_0x558e9d(0x6f3),'desiredVersionApplied':null},'meta':{...this[_0x558e9d(0x3e0)]},'processing':_0x3a81f3[_0x558e9d(0x44d)]?this[_0x558e9d(0x796)]():null,'engines':_0x3a81f3[_0x558e9d(0x61e)]?[...this[_0x558e9d(0x1cc)][_0x558e9d(0x8bf)]??[]]:null,'singletonClaims':this[_0x558e9d(0x5b9)](),'stats':this[_0x558e9d(0x6e9)](),'writers':this['_collectWriterFacet']()};}[_0x25ac33(0x56b)](){const _0x2d0959=_0x25ac33,_0x1b91bb={};try{for(const [_0x4e8015,_0x4dd53a]of this[_0x2d0959(0x1cc)][_0x2d0959(0x441)]){try{const _0x349180=_0x4dd53a[_0x2d0959(0x597)]?.();if(!_0x349180)continue;if(!_0x349180['depth']&&!_0x349180['committed']&&!(_0x349180[_0x2d0959(0x36f)]??0x0)&&!_0x349180[_0x2d0959(0x3d7)])continue;_0x1b91bb[_0x4e8015]={'depth':_0x349180[_0x2d0959(0x714)],'oldestPendingMs':_0x349180[_0x2d0959(0x366)],'committed':_0x349180[_0x2d0959(0x4de)],'commitsPerSec':_0x349180[_0x2d0959(0x6af)],'commitP99Ms':_0x349180[_0x2d0959(0x583)],'parkedNow':_0x349180[_0x2d0959(0x36f)]??0x0,'draining':!!_0x349180[_0x2d0959(0x3d7)]};}catch{}}}catch{}return Object[_0x2d0959(0x766)](_0x1b91bb)[_0x2d0959(0x744)]?_0x1b91bb:null;}['_collectSingletonClaims'](){const _0x377d0c=_0x25ac33,_0x5d2470=process[_0x377d0c(0x27f)],_0x5ce2eb=Date[_0x377d0c(0x872)](),_0xe7f86c=_0x1035d2=>{const _0xaaec61=_0x377d0c;if(!_0x1035d2)return[];const _0x4e042f=[];try{for(const {id:_0x352ba4,entry:_0x572da3}of _0x1035d2[_0xaaec61(0x323)]()){if(_0x572da3?.[_0xaaec61(0x828)]?.['pid']!==_0x5d2470)continue;const _0x3fe70c=_0x572da3['updatedAt']??_0x572da3[_0xaaec61(0x4b3)]??0x0;if(_0x3fe70c+(_0x572da3['ttlMs']??0x0)<_0x5ce2eb)continue;_0x4e042f[_0xaaec61(0x5bb)](_0x352ba4);}}catch{}return _0x4e042f;},_0xbae503=_0xe7f86c(this[_0x377d0c(0x810)](_0x377d0c(0x8db))),_0x2d0354=_0xe7f86c(this[_0x377d0c(0x810)](_0x377d0c(0x5b7)));if(!_0xbae503[_0x377d0c(0x744)]&&!_0x2d0354['length'])return null;return{'compact':_0xbae503,'replicate':_0x2d0354};}[_0x25ac33(0x810)](_0x34e3b1){const _0x40a257=_0x25ac33;if(!this[_0x40a257(0x1cc)]?.['_rootDb'])return null;if(!this[_0x40a257(0x695)])this[_0x40a257(0x695)]=new Map();let _0xb5484=this[_0x40a257(0x695)]['get'](_0x34e3b1);if(!_0xb5484)try{_0xb5484=new _0x7db50f(this[_0x40a257(0x1cc)][_0x40a257(0x403)],{'namespace':_0x34e3b1}),this['_singletonLocks'][_0x40a257(0x486)](_0x34e3b1,_0xb5484);}catch{return null;}return _0xb5484;}[_0x25ac33(0x796)](){const _0xf245a6=_0x25ac33,_0x489f77=[];try{for(const [_0x5c7406,_0x5056ed]of this[_0xf245a6(0x1cc)][_0xf245a6(0x441)]){if(_0x5c7406[_0xf245a6(0x3b2)]('~'))continue;for(const _0x3cb837 of _0x5056ed[_0xf245a6(0x382)][_0xf245a6(0x5de)]())_0x489f77[_0xf245a6(0x5bb)]({..._0x3cb837,'env':_0x5c7406});}}catch{}return{'participate':this[_0xf245a6(0x1cc)][_0xf245a6(0x44d)]?.[_0xf245a6(0x1c3)]??![],'processors':_0x489f77};}[_0x25ac33(0x1c4)](){const _0xa5be51=_0x25ac33;if(this['_desired'])return!![];const _0x2f2e13=this['okdb'][_0xa5be51(0x403)];if(!_0x2f2e13)return![];return this[_0xa5be51(0x67c)]=_0x2f2e13[_0xa5be51(0x8ec)](_0x227f55,{'dupSort':![]}),this[_0xa5be51(0x4eb)]=_0x2f2e13[_0xa5be51(0x8ec)](_0x2d1047,{'dupSort':![]}),!![];}async[_0x25ac33(0x29d)](){const _0x318c7e=_0x25ac33;if(!this[_0x318c7e(0x1c4)]())return;const _0x289271=_0x318c7e(0x4cc),_0x5d98=0x1,_0x790ad0=this[_0x318c7e(0x67c)]['get'](_0x289271)??0x0;if(_0x790ad0>=_0x5d98)return;const _0x5f2dad=_0x45daea=>{const _0x5e09ea=_0x318c7e;if(_0x45daea===_0x5e09ea(0x36b))return _0x5e09ea(0x60c);if(_0x45daea===_0x5e09ea(0x391))return _0x5e09ea(0x4cb);return _0x45daea;};await this[_0x318c7e(0x1cc)][_0x318c7e(0x46c)][_0x318c7e(0x883)][_0x318c7e(0x2f0)](()=>{const _0xbc12ad=_0x318c7e;for(const _0x3ba2f7 of[_0xbc12ad(0x64e),_0xbc12ad(0x6f7)]){for(const {key:_0x39d5be,value:_0x4bdda0}of this[_0xbc12ad(0x67c)]['getRange']({'start':_0x3ba2f7,'end':_0x3ba2f7+'\xff'})){if(typeof _0x39d5be!=='string'||!_0x39d5be[_0xbc12ad(0x3b2)](_0x3ba2f7))break;const _0x647ba8=_0x5f2dad(_0x4bdda0['mode']);if(_0x647ba8!==_0x4bdda0['mode'])this[_0xbc12ad(0x67c)][_0xbc12ad(0x625)](_0x39d5be,{..._0x4bdda0,'mode':_0x647ba8});}}this[_0xbc12ad(0x67c)][_0xbc12ad(0x625)](_0x289271,_0x5d98);});}['hasDesired'](){return!!this['_desired'];}[_0x25ac33(0x35c)](_0x3279c0,_0x456de4){const _0x1287f7=_0x25ac33;if(!this[_0x1287f7(0x1c4)]())return null;const _0x26e69f=_0x3279c0+'/'+_0x456de4;return this[_0x1287f7(0x688)](),this[_0x1287f7(0x38a)][_0x1287f7(0x564)](_0x26e69f)??this[_0x1287f7(0x67c)]['get'](_0x26e69f)??null;}[_0x25ac33(0x688)](){const _0x255258=_0x25ac33;if(!_0x20b63d)return;try{this[_0x255258(0x1cc)][_0x255258(0x46c)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x25ac33(0x246)](_0x722714,_0x5350cb,_0xbe039d){const _0x4fe9b9=_0x25ac33;if(!this[_0x4fe9b9(0x1c4)]())return null;const _0x1ddcef=_0x722714+'/'+_0x5350cb;this[_0x4fe9b9(0x688)]();const _0x54f08f=this[_0x4fe9b9(0x38a)][_0x4fe9b9(0x564)](_0x1ddcef)??this['_desired'][_0x4fe9b9(0x564)](_0x1ddcef)??{'version':0x0},_0xfca90f=(_0x54f08f[_0x4fe9b9(0x50b)]||0x0)+0x1,_0x98a8a4={..._0x54f08f,..._0xbe039d,'version':_0xfca90f,'updatedAt':Date['now']()};this[_0x4fe9b9(0x38a)][_0x4fe9b9(0x486)](_0x1ddcef,_0x98a8a4);try{await this[_0x4fe9b9(0x1cc)][_0x4fe9b9(0x46c)][_0x4fe9b9(0x883)][_0x4fe9b9(0x2f0)](()=>{const _0x5cc06e=_0x4fe9b9;this[_0x5cc06e(0x67c)][_0x5cc06e(0x625)](_0x1ddcef,_0x98a8a4);});}finally{if(this[_0x4fe9b9(0x38a)][_0x4fe9b9(0x564)](_0x1ddcef)===_0x98a8a4)this[_0x4fe9b9(0x38a)]['delete'](_0x1ddcef);}return _0xfca90f;}[_0x25ac33(0x7c5)](_0x211d58){const _0x67c63b=_0x25ac33;if(!this[_0x67c63b(0x1c4)]())return[];this[_0x67c63b(0x688)]();const _0x5df21b=_0x211d58+'/',_0x144ce0=[];for(const {key:_0x2b46bd,value:_0x14a9f2}of this['_desired'][_0x67c63b(0x33e)]({'start':_0x5df21b,'end':_0x5df21b+'\xff'})){if(typeof _0x2b46bd!==_0x67c63b(0x7a6)||!_0x2b46bd[_0x67c63b(0x3b2)](_0x5df21b))break;_0x144ce0['push']({'key':_0x2b46bd[_0x67c63b(0x6f2)](_0x5df21b[_0x67c63b(0x744)]),'value':_0x14a9f2});}return _0x144ce0;}[_0x25ac33(0x1d1)](_0x153e16){const _0x5a71bc=_0x25ac33;if(!this[_0x5a71bc(0x1c4)]())return null;return this[_0x5a71bc(0x4eb)][_0x5a71bc(0x564)](_0x153e16)??null;}async['bumpCmd'](_0x3c3c14,_0x9bdd2f,_0x296dda={}){const _0x21db6f=_0x25ac33;if(!this['_ensureDesired']())return null;let _0x52f35b;return await this[_0x21db6f(0x1cc)]['_systemEnv'][_0x21db6f(0x883)][_0x21db6f(0x2f0)](()=>{const _0x9d0be8=_0x21db6f,_0x4e5fdb=this['_cmd']['get'](_0x3c3c14)||{'epoch':0x0};_0x52f35b=(_0x4e5fdb[_0x9d0be8(0x2c4)]||0x0)+0x1,this['_cmd'][_0x9d0be8(0x625)](_0x3c3c14,{..._0x4e5fdb,..._0x296dda,'cmd':_0x9bdd2f,'epoch':_0x52f35b,'updatedAt':Date['now']()});}),_0x52f35b;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x435c8f,'nodeKey':_0x3d6144,'logicalKey':_0x5ccdb4,'slotKey':_0x7cc9e,'PROCESS_ENV':_0x1856a0,'NODE_TYPE':_0x20eda5},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x1052e6=_0x55b176;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x1edb2=require$$0$6,{clampTimerDelay:_0x5720a3}=requireOkdbTimers(),{EVENTS:_0x1509d7,CHANGE_ACTIONS:_0x3337a6}=requireOkdbEnums(),{LOOP:_0x511b81}=requireOkdbLoopMonitor(),_0xb28cfa=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x338ee4=0x5,_0x3c6a83=0x2710;class _0x1fe5f5 extends _0x1edb2{constructor(_0x15df68,_0x4d5224={}){const _0x3c7ed1=_0x223d;super(),this[_0x3c7ed1(0x1cc)]=_0x15df68,this[_0x3c7ed1(0x55b)]=_0x4d5224['quantum']??_0xb28cfa,this['_flushDebounce']=_0x4d5224['flushDebounce']??_0x338ee4,this[_0x3c7ed1(0x7ff)]=_0x4d5224['dedupeMax']??_0x3c6a83,this[_0x3c7ed1(0x50c)]=![],this['_cursors']=new Map(),this[_0x3c7ed1(0x8d9)]=new Map(),this['_pending']=new Map(),this[_0x3c7ed1(0x5e6)]=null,this[_0x3c7ed1(0x208)]=![],this['_seen']=new Set(),this['_pendingLocal']=new Set(),this[_0x3c7ed1(0x5f0)]=_0x15e03c=>this[_0x3c7ed1(0x85f)](_0x15e03c),this[_0x3c7ed1(0x4db)]=_0x59be7c=>this[_0x3c7ed1(0x7c1)](_0x59be7c),this[_0x3c7ed1(0x7c8)]=_0x24016e=>this['_handlePoke'](_0x24016e),this['_onStop']=()=>this['stop']();}[_0x1052e6(0x352)](){const _0x3aa5f8=_0x1052e6;if(this['_started'])return;this[_0x3aa5f8(0x50c)]=!![];for(const [_0x4121f3,_0x3df5e5]of this[_0x3aa5f8(0x1cc)][_0x3aa5f8(0x441)]){if(_0x4121f3[_0x3aa5f8(0x3b2)]('~'))continue;try{_0x3df5e5[_0x3aa5f8(0x277)]();}catch{}}for(const [_0x27ccc3,_0x3ceff5]of this[_0x3aa5f8(0x1cc)][_0x3aa5f8(0x441)]){if(_0x27ccc3[_0x3aa5f8(0x3b2)]('~'))continue;try{this[_0x3aa5f8(0x8d9)]['set'](_0x27ccc3,_0x3ceff5[_0x3aa5f8(0x6bf)]()||0x0);}catch{}}const {events:_0x118291}=this[_0x3aa5f8(0x1cc)];_0x118291['on'](_0x1509d7[_0x3aa5f8(0x66c)],this[_0x3aa5f8(0x4db)]),_0x118291['on'](_0x1509d7[_0x3aa5f8(0x6d3)],this[_0x3aa5f8(0x5f0)]),_0x118291['on'](_0x1509d7[_0x3aa5f8(0x311)],this[_0x3aa5f8(0x5f0)]),_0x118291['on'](_0x1509d7[_0x3aa5f8(0x519)],this['_onItem']),_0x118291['on'](_0x1509d7[_0x3aa5f8(0x6d9)],this['_onPoke']),_0x118291[_0x3aa5f8(0x5af)](_0x1509d7[_0x3aa5f8(0x768)],this[_0x3aa5f8(0x75c)]);}['stop'](){const _0x3abbbc=_0x1052e6;if(!this[_0x3abbbc(0x50c)])return;this['_started']=![];const {events:_0x3ea848}=this[_0x3abbbc(0x1cc)];_0x3ea848[_0x3abbbc(0x429)](_0x1509d7[_0x3abbbc(0x66c)],this['_onPending']),_0x3ea848[_0x3abbbc(0x429)](_0x1509d7['ITEM_CREATE'],this[_0x3abbbc(0x5f0)]),_0x3ea848[_0x3abbbc(0x429)](_0x1509d7[_0x3abbbc(0x311)],this[_0x3abbbc(0x5f0)]),_0x3ea848[_0x3abbbc(0x429)](_0x1509d7['ITEM_REMOVE'],this[_0x3abbbc(0x5f0)]),_0x3ea848[_0x3abbbc(0x429)](_0x1509d7['SYSTEM_POKE'],this[_0x3abbbc(0x7c8)]);try{_0x3ea848['off'](_0x1509d7[_0x3abbbc(0x768)],this[_0x3abbbc(0x75c)]);}catch{}this['_flushTimer']&&(clearTimeout(this[_0x3abbbc(0x5e6)]),this[_0x3abbbc(0x5e6)]=null),this[_0x3abbbc(0x3ab)][_0x3abbbc(0x679)](),this[_0x3abbbc(0x673)][_0x3abbbc(0x679)](),this[_0x3abbbc(0x8d9)]['clear'](),this['_seen']['clear'](),this[_0x3abbbc(0x3c0)][_0x3abbbc(0x679)]();}[_0x1052e6(0x861)](_0x319c63,_0x4a879b,_0x4f3014,_0x50b250){return _0x319c63+'\x00'+_0x4a879b+'\x00'+_0x4f3014+'\x00'+_0x50b250;}[_0x1052e6(0x705)](_0x2066fd,_0x494537,_0x1df7f8,_0x13cae1){const _0x4c8e39=_0x1052e6,_0x267d5e=this[_0x4c8e39(0x861)](_0x2066fd,_0x494537,_0x1df7f8,_0x13cae1);if(this[_0x4c8e39(0x75e)][_0x4c8e39(0x5d6)](_0x267d5e))return![];this[_0x4c8e39(0x75e)][_0x4c8e39(0x4d2)](_0x267d5e);if(this['_seen']['size']>this['_dedupeMax']){const _0x3a0706=this[_0x4c8e39(0x75e)]['values']()[_0x4c8e39(0x5f3)]()[_0x4c8e39(0x29e)];this[_0x4c8e39(0x75e)][_0x4c8e39(0x591)](_0x3a0706);}return!![];}[_0x1052e6(0x7c1)](_0x41942c){const _0x523068=_0x1052e6;if(!this['_started']||!_0x41942c)return;const {env:_0x4c29e2,type:_0x385eda,key:_0xffb0e5,clock:_0x3ccbcc}=_0x41942c;if(_0x4c29e2==null||_0x385eda==null||_0xffb0e5==null)return;if(typeof _0x4c29e2==='string'&&_0x4c29e2[_0x523068(0x3b2)]('~'))return;if(typeof _0x385eda===_0x523068(0x7a6)&&_0x385eda[_0x523068(0x3b2)]('~'))return;this[_0x523068(0x3c0)][_0x523068(0x4d2)](this[_0x523068(0x861)](_0x4c29e2,_0x385eda,_0xffb0e5,_0x3ccbcc)),this[_0x523068(0x3c0)][_0x523068(0x784)]>this['_dedupeMax']&&this[_0x523068(0x3c0)]['delete'](this[_0x523068(0x3c0)][_0x523068(0x5fb)]()[_0x523068(0x5f3)]()['value']);}[_0x1052e6(0x85f)](_0x4fb85f){const _0x51f6b2=_0x1052e6;if(!this['_started']||!_0x4fb85f)return;const {env:_0x4f5d97,type:_0x5ec4ab,key:_0x179c64,clock:_0x493a5d,origin:_0x2ddba6,action:_0x23f4ab,newValue:_0x1d61f8,oldValue:_0x5db670}=_0x4fb85f;if(_0x4f5d97==null||_0x5ec4ab==null||_0x179c64==null)return;if(typeof _0x4f5d97===_0x51f6b2(0x7a6)&&_0x4f5d97['startsWith']('~'))return;if(typeof _0x5ec4ab==='string'&&_0x5ec4ab[_0x51f6b2(0x3b2)]('~'))return;this[_0x51f6b2(0x3c0)][_0x51f6b2(0x591)](this[_0x51f6b2(0x861)](_0x4f5d97,_0x5ec4ab,_0x179c64,_0x493a5d));if(!this[_0x51f6b2(0x705)](_0x4f5d97,_0x5ec4ab,_0x179c64,_0x493a5d))return;const _0x36a145=_0x23f4ab===_0x3337a6[_0x51f6b2(0x7f0)]?'remove':'put';this[_0x51f6b2(0x7ae)](_0x51f6b2(0x1c9),{'env':_0x4f5d97,'type':_0x5ec4ab,'key':_0x179c64,'op':_0x36a145,'clock':_0x493a5d,'origin':_0x2ddba6,'value':_0x36a145===_0x51f6b2(0x7c3)?null:_0x1d61f8,'prevValue':_0x5db670});}['_handlePoke'](_0x135faf){const _0x5c13a5=_0x1052e6;if(!this[_0x5c13a5(0x50c)])return;if(!_0x135faf||typeof _0x135faf[_0x5c13a5(0x264)]!=='string'||typeof _0x135faf[_0x5c13a5(0x465)]!==_0x5c13a5(0x7a6))return;const {env:_0x2782df,type:_0x300642}=_0x135faf;if(_0x2782df[_0x5c13a5(0x3b2)]('~')||_0x300642[_0x5c13a5(0x3b2)]('~'))return;this[_0x5c13a5(0x3ab)]['set'](_0x2782df+'\x00'+_0x300642,{'env':_0x2782df,'type':_0x300642}),this[_0x5c13a5(0x6ed)]();}['_scheduleFlush'](){const _0x587b9c=_0x1052e6;if(this['_flushTimer'])return;const _0x4b430e=()=>{const _0x404948=_0x223d;this['_flushTimer']=null,this[_0x404948(0x36d)]()[_0x404948(0x520)](()=>{});};this[_0x587b9c(0x5e6)]=setTimeout(_0x4b430e,_0x5720a3(this[_0x587b9c(0x7d4)]));}async[_0x1052e6(0x36d)](){const _0x420300=_0x1052e6;if(this[_0x420300(0x208)]){this[_0x420300(0x6ed)]();return;}this[_0x420300(0x208)]=!![];try{const _0x4f9b16=[...this[_0x420300(0x3ab)][_0x420300(0x5fb)]()];this[_0x420300(0x3ab)][_0x420300(0x679)]();let _0x232408=![];for(const {env:_0x2232cc,type:_0x5ef8cf}of _0x4f9b16){try{const _0x230a4c=await this[_0x420300(0x3fd)](_0x2232cc,_0x5ef8cf);if(_0x230a4c)_0x232408=!![];}catch{this[_0x420300(0x3ab)][_0x420300(0x486)](_0x2232cc+'\x00'+_0x5ef8cf,{'env':_0x2232cc,'type':_0x5ef8cf}),_0x232408=!![];}}if(_0x232408||this['_pending'][_0x420300(0x784)]>0x0)this[_0x420300(0x6ed)]();}finally{this[_0x420300(0x208)]=![];}}async[_0x1052e6(0x3fd)](_0x4206bc,_0x176a09){const _0x4f2826=_0x1052e6,_0x4e0f54=await this[_0x4f2826(0x1cc)][_0x4f2826(0x4e0)](_0x4206bc),_0x4df242=_0x4206bc+'\x00'+_0x176a09;!this[_0x4f2826(0x673)]['has'](_0x4df242)&&(!this[_0x4f2826(0x8d9)]['has'](_0x4206bc)&&(_0x4e0f54[_0x4f2826(0x277)](),this[_0x4f2826(0x8d9)][_0x4f2826(0x486)](_0x4206bc,_0x4e0f54[_0x4f2826(0x6bf)]()||0x0)),this[_0x4f2826(0x673)][_0x4f2826(0x486)](_0x4df242,this['_baselines'][_0x4f2826(0x564)](_0x4206bc)));const _0x2e78fe=this[_0x4f2826(0x673)][_0x4f2826(0x564)](_0x4df242),_0x51d1e6=_0x4e0f54[_0x4f2826(0x6bf)](_0x176a09)||0x0;if(_0x51d1e6<=_0x2e78fe)return![];const _0x17c6b3=_0x2e78fe+this['_quantum'],_0x4cabe1=Math['min'](_0x51d1e6,_0x17c6b3),_0x10e1b4=_0x511b81[_0x4f2826(0x3d8)]?_0x511b81[_0x4f2826(0x872)]():0x0,_0x422abb=Array[_0x4f2826(0x83d)](_0x4e0f54['getChanges'](_0x176a09,_0x2e78fe+0x1,_0x4cabe1));let _0x52f538=_0x2e78fe;for(const _0x16a0fe of _0x422abb){const {clock:_0x14e783,key:_0x1dd811,action:_0x5d39b5,origin:_0x1686db}=_0x16a0fe;if(_0x14e783>_0x52f538)_0x52f538=_0x14e783;if(_0x1dd811==null)continue;if(this[_0x4f2826(0x3c0)][_0x4f2826(0x5d6)](this[_0x4f2826(0x861)](_0x4206bc,_0x176a09,_0x1dd811,_0x14e783)))continue;if(!this[_0x4f2826(0x705)](_0x4206bc,_0x176a09,_0x1dd811,_0x14e783))continue;let _0x2513e0,_0xfc3825;if(_0x5d39b5===_0x3337a6['REMOVE'])_0x2513e0=_0x4f2826(0x7c3),_0xfc3825=null;else{const _0x239b15=_0x4e0f54[_0x4f2826(0x564)](_0x176a09,_0x1dd811);_0x239b15==null?(_0x2513e0=_0x4f2826(0x7c3),_0xfc3825=null):(_0x2513e0=_0x4f2826(0x625),_0xfc3825=_0x239b15);}this['emit'](_0x4f2826(0x1c9),{'env':_0x4206bc,'type':_0x176a09,'key':_0x1dd811,'op':_0x2513e0,'clock':_0x14e783,'origin':_0x1686db,'value':_0xfc3825});}if(_0x511b81[_0x4f2826(0x3d8)])_0x511b81[_0x4f2826(0x4f2)](_0x4f2826(0x38f)+_0x4206bc+':'+_0x176a09,_0x511b81[_0x4f2826(0x872)]()-_0x10e1b4,'n='+_0x422abb['length']);return this[_0x4f2826(0x673)][_0x4f2826(0x486)](_0x4df242,Math[_0x4f2826(0x7d2)](_0x52f538,_0x4cabe1)),_0x4e0f54[_0x4f2826(0x6bf)](_0x176a09)>_0x4cabe1;}[_0x1052e6(0x258)](){const _0x331b0d=_0x1052e6;return{'started':this['_started'],'quantum':this[_0x331b0d(0x55b)],'flushDebounce':this[_0x331b0d(0x7d4)],'cursors':Object[_0x331b0d(0x33d)]([...this[_0x331b0d(0x673)][_0x331b0d(0x7fb)]()][_0x331b0d(0x47f)](([_0xfb8295,_0x17c81d])=>[_0xfb8295[_0x331b0d(0x798)]('\x00',':'),_0x17c81d])),'pending':this['_pending'][_0x331b0d(0x784)],'seen':this[_0x331b0d(0x75e)]['size']};}}return _0x1fe5f5[_0x1052e6(0x869)]=_0xb28cfa,okdbChangefeed={'OKDBChangefeed':_0x1fe5f5},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3a590b=_0x55b176;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x4b05e1=require$$1$1,_0x33040c=require$$1,{EVENTS:_0x239722}=requireOkdbEnums(),_0x248999=require$$0,{slotKey:_0x5713c1}=requireOkdbProcessRegistry(),_0x3ae1e3=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x22d550=0xfa0,_0x31f070=0x5,_0x5e3351=0x2710,_0xb5b9bc=0xbb8,_0x370fe5=0x7d0,_0x1886d6='__okdbCluster',_0xcc144d=_0x3a590b(0x32d),_0x484427=_0x3a590b(0x777),_0xaf9b85='stats',_0x514db4=[_0x239722[_0x3a590b(0x8e2)],_0x239722['FTS_REGISTERED'],_0x239722['FTS_DROP'],_0x239722[_0x3a590b(0x76c)],_0x239722[_0x3a590b(0x6dd)],_0x239722[_0x3a590b(0x623)],_0x239722['INDEX_RESET'],_0x239722[_0x3a590b(0x6b9)],'processor:ready',_0x3a590b(0x46d),_0x3a590b(0x5b0),'processor:paused',_0x3a590b(0x8ab),_0x3a590b(0x25e)],_0x378aab=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x35e3bf=0x64;function _0x54ec76(_0x18d7d1){const _0x554d72=_0x3a590b;if(!_0x18d7d1)return _0x554d72(0x68c);const _0x26460c=(_0x18d7d1[_0x554d72(0x44d)]||[])['map'](_0x3218a1=>[_0x3218a1['env'],_0x3218a1['id'],_0x3218a1[_0x554d72(0x29a)],_0x3218a1[_0x554d72(0x4fb)],!!_0x3218a1[_0x554d72(0x46b)],!!_0x3218a1[_0x554d72(0x292)],!!_0x3218a1[_0x554d72(0x893)],_0x3218a1['heldBy']?.[_0x554d72(0x27f)]??null,_0x3218a1['error']?String(_0x3218a1['error']?.[_0x554d72(0x262)]??_0x3218a1[_0x554d72(0x20b)]):null]);return JSON[_0x554d72(0x364)]([!!_0x18d7d1['participate'],_0x26460c]);}function _0xccfcbc({workers:_0x937ae5,makeOkdb:_0xf5ccf7,port:_0x51c42b,primaryOkdb:_0x5c30ee,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x4c1ce6=_0x3a590b;if(_0x4b05e1[_0x4c1ce6(0x68e)])return childEntry&&_0x4b05e1[_0x4c1ce6(0x2ca)]({'exec':_0x33040c[_0x4c1ce6(0x4e8)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x4200bd=_0x4c1ce6,_0x1c8705=[];for(let _0x46d875=0x0;_0x46d875<process[_0x4200bd(0x30e)]['length'];_0x46d875++){const _0x5a38d8=process[_0x4200bd(0x30e)][_0x46d875];if(_0x5a38d8[_0x4200bd(0x3b2)](_0x4200bd(0x80e))||_0x5a38d8[_0x4200bd(0x3b2)](_0x4200bd(0x3a2))||_0x5a38d8[_0x4200bd(0x3b2)]('--inspect'))continue;if(_0x5a38d8==='-e'||_0x5a38d8===_0x4200bd(0x691)||_0x5a38d8==='-p'||_0x5a38d8===_0x4200bd(0x204)){_0x46d875++;continue;}_0x1c8705['push'](_0x5a38d8);}return _0x1c8705;})())}),_0x130768({'workers':_0x937ae5,'port':_0x51c42b,'primaryOkdb':_0x5c30ee,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x51c42b});return _0x4a765f({'makeOkdb':_0xf5ccf7,'port':_0x51c42b});}function _0x130768({workers:_0x17fe8b,port:_0x126507,primaryOkdb:_0x44f6aa,workerEnv:_0x4543a5,workerRole:_0x511062,listenAddr:_0x38c342}){const _0x3834b8=_0x3a590b,_0x555e4e=new Map(),_0x655292=new Map();let _0x3f30b6=![];const _0x37944e=_0x515038=>_0x515038?.[_0x3834b8(0x53b)],_0x36ab1b=_0x323e42=>{const _0x14202c=_0x3834b8,_0x1bbe0a=_0x4b05e1[_0x14202c(0x1ca)]({...process.env,..._0x4543a5||{},'OKDB_CLUSTER_SLOT':String(_0x323e42)});return _0x1bbe0a['__okdbSlot']=_0x323e42,_0x555e4e[_0x14202c(0x486)](_0x1bbe0a['process']['pid'],{'worker':_0x1bbe0a,'startedAt':Date['now'](),'slot':_0x323e42}),_0x1bbe0a['on'](_0x14202c(0x20b),_0x44fe61=>{const _0x4aaf3a=_0x14202c;console[_0x4aaf3a(0x777)](_0x4aaf3a(0x484)+_0x1bbe0a[_0x4aaf3a(0x3cd)]['pid']+_0x4aaf3a(0x76d)+(_0x44fe61?.[_0x4aaf3a(0x262)]??_0x44fe61));}),_0x1bbe0a['on'](_0x14202c(0x4bb),()=>_0x4301b3()),_0x1bbe0a;},_0x38e5be=_0x4c6c15=>{const _0x558b60=_0x3834b8;for(const {worker:_0x4ef41b}of _0x555e4e[_0x558b60(0x5fb)]()){if(_0x4ef41b[_0x558b60(0x821)]()||!_0x4ef41b[_0x558b60(0x1b5)]())continue;try{_0x4ef41b[_0x558b60(0x1e4)](_0x4c6c15);}catch{}}};_0x44f6aa?.[_0x3834b8(0x6b2)]?.({'kind':'primary','listenAddr':_0x38c342})['catch'](()=>{}),_0x44f6aa?.[_0x3834b8(0x8e9)]?.['setOwnMeta']?.({'workersConfigured':_0x17fe8b});const _0x39bc56={'engines':!![],'processors':!![],'compaction':!![],..._0x511062,'http':!![]},_0x4301b3=()=>{const _0x5978bc=_0x3834b8,_0x1c9155=_0x44f6aa?.[_0x5978bc(0x8e9)];if(!_0x1c9155||!_0x1c9155[_0x5978bc(0x2d5)])return;const _0xafb5f8=_0x1c9155[_0x5978bc(0x22c)];for(const {worker:_0xd062da,startedAt:_0x142a85,slot:_0x4838e8,stats:_0x41422b,processing:_0x370e4f}of _0x555e4e[_0x5978bc(0x5fb)]()){if(_0xd062da['isDead']())continue;const _0x3965b0=_0x1c9155[_0x5978bc(0x222)]?.()&&_0x1c9155[_0x5978bc(0x35c)]('slot',_0x550b87(_0x4838e8))?.[_0x5978bc(0x334)]===!![];_0x1c9155[_0x5978bc(0x2a0)]({'pid':_0xd062da[_0x5978bc(0x3cd)]['pid'],'startedAt':_0x142a85,'kind':_0x5978bc(0x28d),'supervisorKey':_0xafb5f8,'slot':_0x4838e8,'slotKey':_0x550b87(_0x4838e8),'role':_0x39bc56,'listenAddr':_0x38c342,'lifecycle':_0x3965b0?_0x5978bc(0x33b):_0x5978bc(0x6f3),'processing':_0x370e4f??null,'stats':_0x41422b??null})['catch'](()=>{});}},_0x550b87=_0xc500d7=>_0x5713c1(_0x3834b8(0x3ef)+_0x126507,_0xc500d7),_0x498eb1=_0x5dac39=>{const _0x4a2377=_0x3834b8,_0x473a77=_0x44f6aa?.['processes'];if(!_0x473a77?.[_0x4a2377(0x222)]?.())return![];return _0x473a77[_0x4a2377(0x35c)](_0x4a2377(0x4ab),_0x550b87(_0x5dac39))?.[_0x4a2377(0x334)]===!![];};for(let _0x486f96=0x0;_0x486f96<_0x17fe8b;_0x486f96++){const _0x4c4fdf=_0x498eb1(_0x486f96);_0x655292[_0x3834b8(0x486)](_0x486f96,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x4c4fdf,'respawnTimer':null}),_0x4c4fdf?console[_0x3834b8(0x777)](_0x3834b8(0x86d)+_0x486f96+_0x3834b8(0x8a5)):_0x36ab1b(_0x486f96);}const _0x17e18e=()=>{const _0x5f5486=_0x3834b8,_0x2efc63=_0x44f6aa?.[_0x5f5486(0x8e9)];if(!_0x2efc63?.[_0x5f5486(0x2d5)]||!_0x2efc63[_0x5f5486(0x222)]?.())return;for(const [_0x40e908,_0x502792]of _0x655292['entries']()){const _0x10e38b=_0x2efc63[_0x5f5486(0x35c)](_0x5f5486(0x4ab),_0x550b87(_0x40e908)),_0x16ca5f=_0x10e38b?.['decommission']===!![],_0x3bf6b9=_0x10e38b?.[_0x5f5486(0x58c)]===!![];if(_0x16ca5f&&!_0x502792[_0x5f5486(0x64c)]){_0x502792[_0x5f5486(0x64c)]=!![];_0x502792[_0x5f5486(0x7a9)]&&(clearTimeout(_0x502792[_0x5f5486(0x7a9)]),_0x502792['respawnTimer']=null);for(const {worker:_0x2a0a97}of _0x555e4e['values']()){if(_0x37944e(_0x2a0a97)!==_0x40e908||_0x2a0a97[_0x5f5486(0x821)]())continue;try{if(_0x3bf6b9)_0x2a0a97[_0x5f5486(0x3cd)][_0x5f5486(0x58c)](_0x5f5486(0x5f2));else _0x2a0a97['isConnected']()&&_0x2a0a97['disconnect']();}catch{}}console[_0x5f5486(0x777)](_0x5f5486(0x33c)+(_0x3bf6b9?_0x5f5486(0x85b):_0x5f5486(0x7a0))+_0x5f5486(0x77d)+_0x40e908+_0x5f5486(0x53d));}else{if(!_0x16ca5f&&_0x502792[_0x5f5486(0x64c)]&&_0x10e38b){_0x502792['dead']=![],_0x502792[_0x5f5486(0x516)]=[],_0x502792[_0x5f5486(0x88d)]=0x0;const _0xf684f8=[..._0x555e4e[_0x5f5486(0x5fb)]()][_0x5f5486(0x873)](({worker:_0x563315})=>_0x37944e(_0x563315)===_0x40e908&&!_0x563315['isDead']());!_0xf684f8&&!_0x3f30b6&&(_0x36ab1b(_0x40e908),console[_0x5f5486(0x777)](_0x5f5486(0x426)+_0x40e908));}}}},_0xdc9d21=()=>{try{_0x17e18e();}catch{}};_0x44f6aa?.[_0x3834b8(0x700)]?.['on']?.(_0x239722['SYSTEM_PROC'],_0xdc9d21);const _0x332446=[];if(_0x44f6aa?.[_0x3834b8(0x700)]?.['on'])for(const _0x7a2199 of _0x514db4){const _0x15d12f=_0x500730=>{_0x38e5be({[_0x1886d6]:_0xcc144d,'event':_0x7a2199,'data':_0x500730??{}});};_0x44f6aa[_0x3834b8(0x700)]['on'](_0x7a2199,_0x15d12f),_0x332446[_0x3834b8(0x5bb)]({'event':_0x7a2199,'handler':_0x15d12f});}const _0x11fdab=setInterval(()=>{_0x17e18e(),_0x4301b3();},_0x378aab);_0x11fdab['unref']?.();const _0x2d4489=(_0x3b4e6a,_0x206401)=>{const _0x426378=_0x3834b8;if(!_0x206401||typeof _0x206401!==_0x426378(0x6ce)||_0x206401[_0x1886d6]!==_0x484427)return;if(!_0x44f6aa?.[_0x426378(0x777)]?.['ingest'])return;const _0xd6b8c5=_0x206401[_0x426378(0x3c9)]||{};_0x44f6aa[_0x426378(0x777)]['ingest']({..._0xd6b8c5,'msg':'[w'+_0x206401[_0x426378(0x4ab)]+']\x20'+(_0xd6b8c5[_0x426378(0x7d1)]??''),'meta':{..._0xd6b8c5[_0x426378(0x56d)]||{},'worker':_0x206401['slot'],'workerPid':_0x206401[_0x426378(0x27f)]}});};_0x4b05e1['on']('message',_0x2d4489);const _0x134947=(_0x52cf1b,_0x51270b)=>{const _0x224ebe=_0x3834b8;if(!_0x51270b||typeof _0x51270b!=='object'||_0x51270b[_0x1886d6]!==_0xaf9b85)return;const _0x45087a=_0x555e4e[_0x224ebe(0x564)](_0x52cf1b[_0x224ebe(0x3cd)][_0x224ebe(0x27f)]);if(_0x45087a){_0x45087a[_0x224ebe(0x22a)]={..._0x51270b['stats'],'at':Date[_0x224ebe(0x872)]()};if(_0x51270b[_0x224ebe(0x525)]!==undefined){const _0x255b87=_0x54ec76(_0x51270b[_0x224ebe(0x525)]);_0x255b87!==_0x45087a[_0x224ebe(0x332)]&&(_0x45087a[_0x224ebe(0x332)]=_0x255b87,_0x205f3b()),_0x45087a[_0x224ebe(0x525)]=_0x51270b[_0x224ebe(0x525)];}}};let _0x57fba9=null;const _0x205f3b=()=>{if(_0x57fba9||_0x3f30b6)return;_0x57fba9=setTimeout(()=>{_0x57fba9=null;if(!_0x3f30b6)_0x4301b3();},_0x35e3bf),_0x57fba9['unref']?.();};_0x4b05e1['on']('message',_0x134947),_0x4b05e1['on']('exit',(_0x3668e9,_0x192843,_0x55311a)=>{const _0x4a3011=_0x3834b8,_0x2f1502=_0x3668e9[_0x4a3011(0x3cd)]['pid'],_0x55cbb8=_0x37944e(_0x3668e9),_0x260ab8=_0x555e4e['get'](_0x2f1502);if(_0x260ab8&&_0x44f6aa?.[_0x4a3011(0x8e9)])_0x44f6aa[_0x4a3011(0x8e9)][_0x4a3011(0x6a2)](_0x2f1502+':'+_0x260ab8[_0x4a3011(0x7e3)])[_0x4a3011(0x520)](()=>{});_0x555e4e[_0x4a3011(0x591)](_0x2f1502),console[_0x4a3011(0x777)]('[okdb-cluster]\x20worker\x20pid='+_0x2f1502+'\x20(slot='+(_0x55cbb8??'?')+_0x4a3011(0x321)+(_0x4a3011(0x1e8)+_0x192843+',\x20signal='+(_0x55311a??_0x4a3011(0x5d1))+_0x4a3011(0x423)+_0x555e4e[_0x4a3011(0x784)]+'\x20worker(s)\x20remaining')),_0x4301b3();if(_0x3f30b6||_0x55cbb8==null)return;const _0x5da148=_0x655292[_0x4a3011(0x564)](_0x55cbb8);if(!_0x5da148||_0x5da148[_0x4a3011(0x64c)])return;const _0x509c23=Date[_0x4a3011(0x872)]();_0x5da148[_0x4a3011(0x516)][_0x4a3011(0x5bb)](_0x509c23),_0x5da148[_0x4a3011(0x516)]=_0x5da148[_0x4a3011(0x516)][_0x4a3011(0x7d3)](_0x57a996=>_0x509c23-_0x57a996<=_0x5e3351);if(_0x5da148[_0x4a3011(0x516)][_0x4a3011(0x744)]>=_0x31f070){_0x5da148[_0x4a3011(0x64c)]=!![],console[_0x4a3011(0x20b)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x55cbb8+'\x20died\x20'+_0x5da148[_0x4a3011(0x516)][_0x4a3011(0x744)]+_0x4a3011(0x4e9)+(_0x5e3351+_0x4a3011(0x1ea)+_0x555e4e[_0x4a3011(0x784)]+_0x4a3011(0x1c0)));return;}_0x5da148[_0x4a3011(0x88d)]++;const _0x4ba216=Math[_0x4a3011(0x25f)](_0x22d550,_0x3ae1e3*0x2**(_0x5da148[_0x4a3011(0x88d)]-0x1));console['log'](_0x4a3011(0x2ef)+_0x55cbb8+_0x4a3011(0x344)+_0x4ba216+'ms\x20(attempt\x20'+_0x5da148[_0x4a3011(0x88d)]+')'),_0x5da148[_0x4a3011(0x7a9)]=setTimeout(()=>{const _0xaaf4a6=_0x4a3011;_0x5da148['respawnTimer']=null;if(_0x3f30b6||_0x5da148[_0xaaf4a6(0x64c)])return;const _0x28c37e=_0x36ab1b(_0x55cbb8);_0x28c37e[_0xaaf4a6(0x5af)](_0xaaf4a6(0x3b4),()=>{const _0x1d45ec=_0xaaf4a6;if(_0x655292[_0x1d45ec(0x564)](_0x55cbb8)===_0x5da148)_0x5da148[_0x1d45ec(0x88d)]=0x0;});},_0x4ba216),_0x5da148[_0x4a3011(0x7a9)]['unref']?.();});const _0x4f6de3=[..._0x555e4e['keys']()];console['log'](_0x3834b8(0x266)+process[_0x3834b8(0x27f)]+_0x3834b8(0x6df)+_0x17fe8b+_0x3834b8(0x809)+_0x126507+':\x20'+('['+_0x4f6de3[_0x3834b8(0x4e8)](',\x20')+']'));const _0x5239eb={'_isClusterController':!![],'port':_0x126507,'primaryOkdb':_0x44f6aa??null,'status'(){const _0x390493=_0x3834b8;return{'clustered':!![],'primaryPid':process[_0x390493(0x27f)],'port':_0x126507,'primaryRole':_0x44f6aa?.['role']??null,'processorPid':null,'supervisorPid':process[_0x390493(0x27f)],'workers':[..._0x555e4e[_0x390493(0x5fb)]()][_0x390493(0x47f)](({worker:_0x9e1a2b})=>({'pid':_0x9e1a2b[_0x390493(0x3cd)][_0x390493(0x27f)],'id':_0x9e1a2b['id'],'dead':_0x9e1a2b[_0x390493(0x821)]()}))};},async 'close'(){const _0x4ac1bd=_0x3834b8;_0x3f30b6=!![];for(const _0x404408 of _0x655292['values']()){_0x404408[_0x4ac1bd(0x64c)]=!![],_0x404408[_0x4ac1bd(0x7a9)]&&(clearTimeout(_0x404408[_0x4ac1bd(0x7a9)]),_0x404408['respawnTimer']=null);}clearInterval(_0x11fdab);_0x57fba9&&(clearTimeout(_0x57fba9),_0x57fba9=null);_0x4b05e1[_0x4ac1bd(0x429)](_0x4ac1bd(0x262),_0x2d4489),_0x4b05e1[_0x4ac1bd(0x429)]('message',_0x134947),_0x44f6aa?.[_0x4ac1bd(0x700)]?.[_0x4ac1bd(0x429)]?.(_0x239722[_0x4ac1bd(0x3ba)],_0xdc9d21);if(_0x44f6aa?.[_0x4ac1bd(0x700)]?.[_0x4ac1bd(0x429)])for(const {event:_0x371119,handler:_0x3f2be7}of _0x332446){try{_0x44f6aa[_0x4ac1bd(0x700)][_0x4ac1bd(0x429)](_0x371119,_0x3f2be7);}catch{}}_0x332446[_0x4ac1bd(0x744)]=0x0;const _0x4a32f5=[..._0x555e4e['values']()]['map'](({worker:_0xd2da14})=>_0xd2da14);if(_0x4a32f5[_0x4ac1bd(0x744)]===0x0)return;await Promise[_0x4ac1bd(0x761)](_0x4a32f5['map'](_0x1f9985=>new Promise(_0x5294e2=>{const _0x240805=_0x4ac1bd;if(_0x1f9985['isDead']()){_0x5294e2();return;}let _0x2f8b96=![];const _0x5de2cc=()=>{if(_0x2f8b96)return;_0x2f8b96=!![];if(_0xb88e15)clearTimeout(_0xb88e15);_0x5294e2();};_0x1f9985[_0x240805(0x5af)](_0x240805(0x633),_0x5de2cc);const _0xb88e15=setTimeout(()=>{try{_0x1f9985['process']['kill']();}catch{}},_0xb5b9bc+0x1f4);_0xb88e15[_0x240805(0x69f)]?.();try{_0x1f9985[_0x240805(0x87d)]();}catch{try{_0x1f9985[_0x240805(0x3cd)][_0x240805(0x58c)]();}catch{}}})));}};return _0x5239eb;}async function _0x4a765f({makeOkdb:_0x2a4c22,port:_0x47466f}){const _0x55d57c=_0x3a590b,_0x374d49=await _0x2a4c22();return _0x46a0af(_0x374d49),_0x374d49[_0x55d57c(0x6e2)][_0x55d57c(0x6a1)](_0x47466f);}function _0x46a0af(_0x53b763){const _0x22b2a0=_0x3a590b;if(!_0x53b763||_0x53b763[_0x22b2a0(0x44b)])return;_0x53b763[_0x22b2a0(0x44b)]=!![];try{const {OKDBChangefeed:_0x35db72}=requireOkdbChangefeed(),_0x383e81=_0x53b763[_0x22b2a0(0x534)];if(_0x383e81&&typeof _0x383e81[_0x22b2a0(0x78d)]===_0x22b2a0(0x733)){const _0x15dd40=new _0x35db72(_0x53b763);_0x15dd40[_0x22b2a0(0x352)](),_0x383e81['attachFeed'](_0x15dd40),_0x53b763[_0x22b2a0(0x2dd)]=_0x15dd40;}}catch(_0x4d9b4e){_0x53b763['log']?.[_0x22b2a0(0x488)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x4d9b4e?.[_0x22b2a0(0x262)]??_0x4d9b4e),{'feature':'cluster'});}const _0x430d67=_0x1a2f0d=>{const _0x10a73d=_0x22b2a0;if(!_0x1a2f0d||typeof _0x1a2f0d!==_0x10a73d(0x6ce)||_0x1a2f0d[_0x1886d6]==null)return;if(_0x1a2f0d[_0x1886d6]===_0xcc144d)try{_0x53b763[_0x10a73d(0x534)]?.['pushEphemeral']?.(_0x1a2f0d[_0x10a73d(0x83b)],_0x1a2f0d[_0x10a73d(0x59c)]);}catch{}};process['on'](_0x22b2a0(0x262),_0x430d67),_0x53b763[_0x22b2a0(0x4bf)]=_0x430d67;{let _0xb442ea=process[_0x22b2a0(0x31b)](),_0x252e85=Date[_0x22b2a0(0x872)]();const _0x302bea=()=>{const _0x4dc1f1=_0x22b2a0;if(typeof process[_0x4dc1f1(0x1e4)]!==_0x4dc1f1(0x733)||!process['connected'])return;const _0x3bba2a=Date['now'](),_0xa28341=process[_0x4dc1f1(0x31b)](),_0x2041fe=(_0x3bba2a-_0x252e85)*0x3e8,_0x33ee8b=_0xa28341['user']-_0xb442ea[_0x4dc1f1(0x394)]+(_0xa28341['system']-_0xb442ea['system']),_0xb30a5=_0x2041fe>0x0?Math[_0x4dc1f1(0x25f)](0x64,Math[_0x4dc1f1(0x631)](_0x33ee8b/(_0x2041fe*(_0x248999[_0x4dc1f1(0x797)]()[_0x4dc1f1(0x744)]||0x1))*0x64)):0x0;_0xb442ea=_0xa28341,_0x252e85=_0x3bba2a;const _0x2cc8cb=process[_0x4dc1f1(0x846)]();let _0x5cea06=null;try{_0x5cea06=_0x53b763[_0x4dc1f1(0x707)]?.[_0x4dc1f1(0x44d)]?_0x53b763[_0x4dc1f1(0x8e9)]?.[_0x4dc1f1(0x796)]?.()??null:null;}catch{}try{process[_0x4dc1f1(0x1e4)]({[_0x1886d6]:_0xaf9b85,'stats':{'rss':_0x2cc8cb[_0x4dc1f1(0x7ec)],'heapUsed':_0x2cc8cb[_0x4dc1f1(0x507)],'heapTotal':_0x2cc8cb[_0x4dc1f1(0x4dc)],'external':_0x2cc8cb[_0x4dc1f1(0x4d5)],'cpuPct':_0xb30a5,'cpuWindowMs':Math['round'](_0x2041fe/0x3e8)||null},'processing':_0x5cea06});}catch{}},_0x188b8b=Math[_0x22b2a0(0x7d2)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x49bc29=setInterval(_0x302bea,_0x188b8b);_0x49bc29[_0x22b2a0(0x69f)]?.(),_0x302bea();for(const _0x4e96f8 of[_0x22b2a0(0x389),_0x22b2a0(0x8ab)]){_0x53b763[_0x22b2a0(0x700)]?.['on']?.(_0x4e96f8,()=>{try{_0x302bea();}catch{}});}}let _0x367b5f=![];const _0x2135a6=async _0x162c2a=>{const _0x131f78=_0x22b2a0;if(_0x367b5f)return;_0x367b5f=!![];const _0x355772=setTimeout(()=>process['exit'](_0x162c2a),_0xb5b9bc);_0x355772[_0x131f78(0x69f)]?.();try{await _0x53b763['close']?.();}catch{}process['exit'](_0x162c2a);};process['on'](_0x22b2a0(0x87d),()=>_0x2135a6(0x0));if(process[_0x22b2a0(0x1e4)]&&!process[_0x22b2a0(0x5ca)])_0x2135a6(0x0);if(process[_0x22b2a0(0x7b7)]!==_0x22b2a0(0x4a0)){const _0x3af876=setInterval(()=>{const _0x1732fd=_0x22b2a0;if(process[_0x1732fd(0x71f)]===0x1)_0x2135a6(0x0);},_0x370fe5);_0x3af876[_0x22b2a0(0x69f)]?.(),_0x53b763[_0x22b2a0(0x8a4)]=_0x3af876;}}return okdbCluster={'runClustered':_0xccfcbc,'attachWorkerCluster':_0x46a0af},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x52efcc=_0x55b176;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x5b3a3e=0x3c;function _0x97fbde(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x305e8f{constructor(){const _0x419f3e=_0x223d;this[_0x419f3e(0x1b3)]=0x0,this[_0x419f3e(0x54f)]=0x0,this[_0x419f3e(0x6d2)]=0x0,this['_totalErrors']=0x0,this[_0x419f3e(0x746)]=0x0,this[_0x419f3e(0x1c6)]=0x0,this['_buckets']=Array[_0x419f3e(0x83d)]({'length':_0x5b3a3e},_0x97fbde),this[_0x419f3e(0x424)]=0x0,this[_0x419f3e(0x54c)]=Date[_0x419f3e(0x872)](),this[_0x419f3e(0x586)]=setInterval(()=>this['_rotateBucket'](),0x3e8);if(this[_0x419f3e(0x586)][_0x419f3e(0x69f)])this[_0x419f3e(0x586)][_0x419f3e(0x69f)]();}[_0x52efcc(0x82b)](){const _0x1ad2ea=_0x52efcc;this['_bucketIdx']=(this[_0x1ad2ea(0x424)]+0x1)%_0x5b3a3e,this[_0x1ad2ea(0x8af)][this[_0x1ad2ea(0x424)]]=_0x97fbde(),this[_0x1ad2ea(0x54c)]=Date[_0x1ad2ea(0x872)]();}[_0x52efcc(0x5c4)](_0x49d34d,_0x64a6af,_0x17bc72){const _0x280494=_0x52efcc,_0x3fcf7e=/^(POST|PUT|PATCH|DELETE)$/i[_0x280494(0x52a)](_0x49d34d),_0x23819b=this[_0x280494(0x8af)][this[_0x280494(0x424)]];this[_0x280494(0x1b3)]++,_0x23819b['requests']++,_0x17bc72&&(this[_0x280494(0x63c)]++,_0x23819b[_0x280494(0x3c5)]++),_0x3fcf7e?(this[_0x280494(0x6d2)]++,this[_0x280494(0x1c6)]+=_0x64a6af,_0x23819b[_0x280494(0x471)]++,_0x23819b['writeMs']+=_0x64a6af):(this[_0x280494(0x54f)]++,this[_0x280494(0x746)]+=_0x64a6af,_0x23819b[_0x280494(0x842)]++,_0x23819b[_0x280494(0x3a6)]+=_0x64a6af);}['stats'](){const _0x44c2fc=_0x52efcc;let _0x18c68c=0x0,_0x1b577f=0x0,_0x3d8bea=0x0,_0x5b7ddf=0x0,_0x50c3bd=0x0,_0x19db66=0x0;for(const _0x5bac64 of this['_buckets']){_0x18c68c+=_0x5bac64[_0x44c2fc(0x8a2)],_0x1b577f+=_0x5bac64[_0x44c2fc(0x842)],_0x3d8bea+=_0x5bac64[_0x44c2fc(0x471)],_0x5b7ddf+=_0x5bac64[_0x44c2fc(0x3c5)],_0x50c3bd+=_0x5bac64['readMs'],_0x19db66+=_0x5bac64[_0x44c2fc(0x7dc)];}const _0x31643f=_0x5b3a3e;return{'lifetime':{'requests':this['_totalRequests'],'reads':this[_0x44c2fc(0x54f)],'writes':this[_0x44c2fc(0x6d2)],'errors':this['_totalErrors'],'avgReadMs':this['_totalReads']>0x0?+(this[_0x44c2fc(0x746)]/this['_totalReads'])['toFixed'](0x2):null,'avgWriteMs':this[_0x44c2fc(0x6d2)]>0x0?+(this['_totalWriteMs']/this[_0x44c2fc(0x6d2)])[_0x44c2fc(0x539)](0x2):null},'window':{'seconds':_0x31643f,'requests':_0x18c68c,'reads':_0x1b577f,'writes':_0x3d8bea,'errors':_0x5b7ddf,'reqPerSec':+(_0x18c68c/_0x31643f)[_0x44c2fc(0x539)](0x2),'readPerSec':+(_0x1b577f/_0x31643f)['toFixed'](0x2),'writePerSec':+(_0x3d8bea/_0x31643f)[_0x44c2fc(0x539)](0x2),'avgReadMs':_0x1b577f>0x0?+(_0x50c3bd/_0x1b577f)[_0x44c2fc(0x539)](0x2):null,'avgWriteMs':_0x3d8bea>0x0?+(_0x19db66/_0x3d8bea)[_0x44c2fc(0x539)](0x2):null}};}[_0x52efcc(0x2de)](){const _0x513d51=_0x52efcc;clearInterval(this[_0x513d51(0x586)]);}}return okdbMetrics=_0x305e8f,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x4c8568=_0x55b176;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x380d68={'data':{'label':_0x4c8568(0x780),'scope':'env','description':_0x4c8568(0x58b),'operations':{'read':{'label':_0x4c8568(0x892),'summary':_0x4c8568(0x6d0)},'write':{'label':_0x4c8568(0x6d1),'summary':'Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).'}}},'schema':{'label':_0x4c8568(0x2ba),'scope':_0x4c8568(0x264),'description':'Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','operations':{'read':{'label':_0x4c8568(0x892),'summary':_0x4c8568(0x2c2)},'write':{'label':_0x4c8568(0x6d1),'summary':_0x4c8568(0x7f9)}}},'search':{'label':_0x4c8568(0x2db),'scope':_0x4c8568(0x264),'description':_0x4c8568(0x73d),'operations':{'query':{'label':'Query','summary':_0x4c8568(0x2ee)}}},'queue':{'label':_0x4c8568(0x32b),'scope':_0x4c8568(0x264),'description':_0x4c8568(0x637),'operations':{'read':{'label':_0x4c8568(0x892),'summary':_0x4c8568(0x327)},'write':{'label':_0x4c8568(0x6d1),'summary':_0x4c8568(0x6e3)},'work':{'label':_0x4c8568(0x72c),'summary':_0x4c8568(0x84d)}}},'files':{'label':'Files','scope':_0x4c8568(0x264),'description':_0x4c8568(0x77a),'operations':{'read':{'label':_0x4c8568(0x892),'summary':_0x4c8568(0x20a)},'write':{'label':_0x4c8568(0x6d1),'summary':_0x4c8568(0x4a1)}}},'functions':{'label':_0x4c8568(0x779),'scope':_0x4c8568(0x264),'description':_0x4c8568(0x1ff),'operations':{'read':{'label':_0x4c8568(0x892),'summary':_0x4c8568(0x4c8)},'write':{'label':_0x4c8568(0x6d1),'summary':_0x4c8568(0x279)},'run':{'label':'Run','summary':_0x4c8568(0x3ed)}}},'views':{'label':_0x4c8568(0x487),'scope':_0x4c8568(0x264),'description':_0x4c8568(0x2e1),'operations':{'read':{'label':_0x4c8568(0x892),'summary':_0x4c8568(0x5cc)},'write':{'label':'Write','summary':_0x4c8568(0x6e5)}}},'env':{'label':_0x4c8568(0x537),'scope':_0x4c8568(0x264),'description':'Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','operations':{'read':{'label':_0x4c8568(0x892),'summary':_0x4c8568(0x770)},'write':{'label':_0x4c8568(0x6d1),'summary':_0x4c8568(0x68a)}}},'auth':{'label':'Auth','scope':_0x4c8568(0x560),'description':_0x4c8568(0x713),'operations':{'read':{'label':_0x4c8568(0x892),'summary':_0x4c8568(0x238)},'write':{'label':_0x4c8568(0x6d1),'summary':_0x4c8568(0x439)}}},'system':{'label':'System','scope':'system','description':_0x4c8568(0x47b),'operations':{'read':{'label':_0x4c8568(0x892),'summary':_0x4c8568(0x6d4)},'write':{'label':_0x4c8568(0x6d1),'summary':_0x4c8568(0x8bd)}}},'sync':{'label':_0x4c8568(0x891),'scope':_0x4c8568(0x560),'description':_0x4c8568(0x1e5),'operations':{'read':{'label':_0x4c8568(0x892),'summary':_0x4c8568(0x58d)},'write':{'label':_0x4c8568(0x6d1),'summary':_0x4c8568(0x2ed)},'peer':{'label':_0x4c8568(0x8b1),'summary':_0x4c8568(0x8b6),'machineOnly':!![]}}},'protected':{'label':_0x4c8568(0x6ae),'scope':_0x4c8568(0x36a),'description':_0x4c8568(0x611),'operations':{'read':{'label':'Read','summary':_0x4c8568(0x3a1)},'write':{'label':_0x4c8568(0x6d1),'summary':_0x4c8568(0x59b)}}}},_0x546cf4={'schema:read':[_0x4c8568(0x5cb),'data:write',_0x4c8568(0x3c2)]},_0x21b8a9=[_0x4c8568(0x84a),_0x4c8568(0x8cf),_0x4c8568(0x838),'write','work','peer'];function _0x9a1047(){const _0x5e7469=_0x4c8568,_0x5981f2=[];for(const [_0x41efc6,_0x127a6a]of Object[_0x5e7469(0x7fb)](_0x380d68)){for(const _0x34184e of Object[_0x5e7469(0x766)](_0x127a6a[_0x5e7469(0x30a)])){_0x5981f2[_0x5e7469(0x5bb)](_0x41efc6+':'+_0x34184e);}}return _0x5981f2;}function _0x23854f(_0x34b9ce){return _0x380d68[_0x34b9ce]||null;}function _0x32f67d(_0x40cd6d,_0x1ed4f3){const _0xff9327=_0x4c8568;return _0x380d68[_0x40cd6d]?.[_0xff9327(0x30a)][_0x1ed4f3]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x380d68,'IMPLIED_BY':_0x546cf4,'OP_ORDER':_0x21b8a9,'listAllPermissions':_0x9a1047,'getNamespaceMeta':_0x23854f,'getOperationMeta':_0x32f67d},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x7df8b0=_0x55b176;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x3ffdcc}=requireOkdbAuthNamespaces(),_0xa04bed=new Set(['read',_0x7df8b0(0x8cf)]);function _0x419012(_0x2e1982,_0x520b65){const _0x3406c3=_0x7df8b0;if(!Array[_0x3406c3(0x2fd)](_0x2e1982)||_0x2e1982['length']===0x0)return![];for(const _0x1e7465 of _0x2e1982){if(typeof _0x1e7465!==_0x3406c3(0x7a6)||!_0x1e7465[_0x3406c3(0x361)](':')){if(_0x1e7465==='*')return!![];continue;}const [_0x3ea4fa,_0x5ec84f]=_0x1e7465[_0x3406c3(0x310)](':'),[_0x3858ef,_0x2936b0]=_0x520b65['split'](':'),_0x578e67=_0x3ea4fa==='*'||_0x3ea4fa===_0x3858ef,_0x4e523e=_0x5ec84f==='*'||_0x5ec84f===_0x2936b0;if(_0x578e67&&_0x4e523e)return!![];}const _0xe4dd9d=_0x3ffdcc[_0x520b65];if(_0xe4dd9d)for(const _0x59cbfb of _0xe4dd9d){if(_0x419012(_0x2e1982,_0x59cbfb))return!![];}return![];}function _0x34e31a(_0x1741a8,_0x4979a9){const _0x5f07e3=_0x7df8b0,_0x4d7b53=new Set();if(Array[_0x5f07e3(0x2fd)](_0x1741a8)){for(const _0x51f6cf of _0x1741a8)_0x4d7b53['add'](_0x51f6cf);}if(Array[_0x5f07e3(0x2fd)](_0x4979a9)){for(const _0x46d58b of _0x4979a9)_0x4d7b53[_0x5f07e3(0x4d2)](_0x46d58b);}return Array[_0x5f07e3(0x83d)](_0x4d7b53);}function _0x334dd1(_0x47912c){const _0x10865e=_0x7df8b0;if(typeof _0x47912c!=='string')return![];const [,_0x59dbaf]=_0x47912c['split'](':');return _0xa04bed[_0x10865e(0x5d6)](_0x59dbaf);}function _0x4a2d6d(_0x1eb695){const _0x11e195=_0x7df8b0;return _0x334dd1(_0x1eb695)?_0x11e195(0x4a4):'protected:write';}function _0x5c8a66(_0x2c4619,_0x45bf65){const _0x4f812d=_0x7df8b0;return _0x34e31a(_0x2c4619['permissions']||[],_0x45bf65?(_0x2c4619[_0x4f812d(0x78c)]||{})[_0x45bf65]||[]:[]);}function _0xcfa74(_0xfc1b92){const _0x55b236=_0x7df8b0,_0x1555d8=[];for(const _0x205f75 of _0xfc1b92['listRoutes']()){const _0x28088c=_0x205f75[_0x55b236(0x3d9)]?.[_0x55b236(0x215)];if(!_0x28088c)continue;_0x28088c[_0x55b236(0x5ee)]&&!_0x28088c[_0x55b236(0x4d3)]&&_0x1555d8['push'](_0x205f75['method']+'\x20'+_0x205f75['path']+_0x55b236(0x241)+(_0x205f75[_0x55b236(0x3d9)]['id']??'?')+')');}if(_0x1555d8[_0x55b236(0x744)])throw new Error(_0x55b236(0x8e8)+_0x1555d8[_0x55b236(0x4e8)](_0x55b236(0x7c7)));}return okdbAuthPermissions={'hasPermission':_0x419012,'unionPermissions':_0x34e31a,'isReadOperation':_0x334dd1,'resolveProtectedGate':_0x4a2d6d,'getEffectivePermissions':_0x5c8a66,'assertEveryRouteHasPermission':_0xcfa74},okdbAuthPermissions;}function _0x223d(_0x307116,_0x3704ee){_0x307116=_0x307116-0x1b3;const _0x11b64b=_0x11b6();let _0x223d7d=_0x11b64b[_0x307116];return _0x223d7d;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x1f3f76=require$$0$7,_0x324488=require$$1$2,_0x323f37=require$$2$1;function _0x524ecf(_0x5930ea){const _0xc701c3=_0x223d,_0x5baa89=String(_0x5930ea||'')[_0xc701c3(0x798)](/-/g,'+')['replace'](/_/g,'/'),_0x558250=_0x5baa89+'='[_0xc701c3(0x641)]((0x4-(_0x5baa89['length']%0x4||0x4))%0x4);return Buffer[_0xc701c3(0x83d)](_0x558250,_0xc701c3(0x2f9));}function _0x5273fc(_0x3384de){const _0x18d696=_0x223d;if(typeof _0x3384de!==_0x18d696(0x7a6))throw new Error(_0x18d696(0x1d2));const _0x434315=_0x3384de[_0x18d696(0x310)]('.');if(_0x434315['length']!==0x3)throw new Error(_0x18d696(0x38b));const [_0x12f9ea,_0x3703fb,_0x23ac1b]=_0x434315,_0x1ec36d=JSON[_0x18d696(0x527)](_0x524ecf(_0x12f9ea)[_0x18d696(0x4c0)](_0x18d696(0x758))),_0x3f37db=JSON[_0x18d696(0x527)](_0x524ecf(_0x3703fb)[_0x18d696(0x4c0)](_0x18d696(0x758)));return{'header':_0x1ec36d,'payload':_0x3f37db,'signature':_0x524ecf(_0x23ac1b),'signingInput':Buffer[_0x18d696(0x83d)](_0x12f9ea+'.'+_0x3703fb),'encodedHeader':_0x12f9ea,'encodedPayload':_0x3703fb};}function _0xfca204(_0x22c7f7){const _0xc1978f=_0x223d;if(Array[_0xc1978f(0x2fd)](_0x22c7f7))return _0x22c7f7;if(_0x22c7f7==null)return[];return[_0x22c7f7];}function _0x426ddd(_0x200617){const _0x14e035=_0x223d,_0x2a2d9f=String(_0x200617||'')[_0x14e035(0x3e5)](/.{1,64}/g)||[];return'-----BEGIN\x20CERTIFICATE-----\x0a'+_0x2a2d9f[_0x14e035(0x4e8)]('\x0a')+_0x14e035(0x4a8);}function _0xe10103(_0x200dc3={}){const _0x58ae28=_0x223d;if(_0x200dc3['x5c']?.[0x0])return _0x323f37[_0x58ae28(0x712)](_0x426ddd(_0x200dc3[_0x58ae28(0x53a)][0x0]));return _0x323f37[_0x58ae28(0x712)]({'key':_0x200dc3,'format':_0x58ae28(0x280)});}function _0x527838(_0x10bfae,_0x55727f,_0xf5ec8c,_0x39bd64){const _0x3020de=_0x223d;if(_0x10bfae===_0x3020de(0x4e4))return _0x323f37[_0x3020de(0x5a6)](_0x3020de(0x747),_0xf5ec8c,_0x55727f,_0x39bd64);if(_0x10bfae===_0x3020de(0x84e))return _0x323f37[_0x3020de(0x5a6)](_0x3020de(0x1be),_0xf5ec8c,{'key':_0x55727f,'dsaEncoding':_0x3020de(0x4b1)},_0x39bd64);return![];}function _0x32dc10(_0x3d4fa9){const _0xafdde1=_0x223d;if(typeof commonjsGlobal['fetch']===_0xafdde1(0x733))return commonjsGlobal[_0xafdde1(0x5b2)](_0x3d4fa9,{'headers':{'accept':'application/json'}})[_0xafdde1(0x39e)](async _0x162ec5=>{const _0x138048=_0xafdde1;if(!_0x162ec5['ok']){const _0x1bcb20=new Error(_0x138048(0x42b)+_0x162ec5[_0x138048(0x258)]+_0x138048(0x521)+_0x3d4fa9);_0x1bcb20['status']=_0x162ec5[_0x138048(0x258)];throw _0x1bcb20;}return _0x162ec5['json']();});return new Promise((_0x50c7a4,_0x5f84d1)=>{const _0x92f00a=_0xafdde1,_0xfd0201=String(_0x3d4fa9)['startsWith'](_0x92f00a(0x372))?_0x324488:_0x1f3f76,_0x376c78=_0xfd0201[_0x92f00a(0x564)](_0x3d4fa9,{'headers':{'accept':'application/json'}},_0x140b35=>{const _0x135706=_0x92f00a;let _0x2490d8='';_0x140b35[_0x135706(0x615)](_0x135706(0x758)),_0x140b35['on'](_0x135706(0x59c),_0x43af6f=>{_0x2490d8+=_0x43af6f;}),_0x140b35['on'](_0x135706(0x4c5),()=>{const _0x220dfe=_0x135706;if(_0x140b35[_0x220dfe(0x3ec)]<0xc8||_0x140b35[_0x220dfe(0x3ec)]>=0x12c){const _0x8811f=new Error(_0x220dfe(0x42b)+_0x140b35['statusCode']+'\x20fetching\x20'+_0x3d4fa9);return _0x8811f[_0x220dfe(0x258)]=_0x140b35[_0x220dfe(0x3ec)],_0x5f84d1(_0x8811f);}try{_0x50c7a4(JSON['parse'](_0x2490d8||'{}'));}catch(_0x58e9e6){_0x5f84d1(_0x58e9e6);}});});_0x376c78['on']('error',_0x5f84d1),_0x376c78[_0x92f00a(0x4c5)]();});}return okdbJwtUtils={'base64UrlDecode':_0x524ecf,'parseJwt':_0x5273fc,'normalizeAudience':_0xfca204,'normalizePemCertificate':_0x426ddd,'jwkToKeyObject':_0xe10103,'verifyJwtSignature':_0x527838,'fetchJson':_0x32dc10},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x1b1292=_0x55b176;if(hasRequiredOkdbHttp)return okdbHttp['exports'];hasRequiredOkdbHttp=0x1;const _0x39cc57=require$$0$7,{clampTimerDelay:_0x4f6149,isNeverDelay:_0x9ab0f2}=requireOkdbTimers(),{URL:_0x14a130}=require$$3$1,_0x3e599f=requireOkdbMetrics(),_0x5924ea=requireOkdbAuthTokens(),{hasPermission:_0x2ec52a,unionPermissions:_0x355330,resolveProtectedGate:_0x30c1fb}=requireOkdbAuthPermissions(),_0x1f4e68={0x190:_0x1b1292(0x657),0x191:'UNAUTHORIZED',0x193:'FORBIDDEN',0x194:_0x1b1292(0x35a),0x195:'METHOD_NOT_ALLOWED',0x198:_0x1b1292(0x6d6),0x199:_0x1b1292(0x55c),0x19a:_0x1b1292(0x48e),0x19b:'LENGTH_REQUIRED',0x19d:_0x1b1292(0x66d),0x19f:_0x1b1292(0x847),0x1a6:_0x1b1292(0x2c1),0x1ad:_0x1b1292(0x7b2),0x1f4:_0x1b1292(0x5a9),0x1f5:_0x1b1292(0x357),0x1f6:_0x1b1292(0x38c),0x1f7:_0x1b1292(0x88f),0x1f8:_0x1b1292(0x80d)},_0x2a6b18={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'QUERY_OPERATOR_FORBIDDEN':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'BUCKET_PROJECT_NOT_PERSISTABLE':0x190,'BUCKET_PROJECT_UNKNOWN':0x190,'VIEW_UNKNOWN_REDUCER':0x190,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x34ca41,timingSafeEqual:_0x4f5726,parseBearer:_0x4f4ec0,randomToken:_0x229c79,issueToken:_0x580550,authenticateToken:_0x2ea7e5}=_0x5924ea,{base64UrlDecode:_0x581018,parseJwt:_0x280278,normalizeAudience:_0x22b145,normalizePemCertificate:_0x357531,jwkToKeyObject:_0x4af272,verifyJwtSignature:_0x2ad727,fetchJson:_0x191d2b}=requireOkdbJwtUtils();function _0x1af7b7(_0x3f7570){const _0x3ecd64=_0x1b1292;return(_0x3f7570||_0x3ecd64(0x2ac))[_0x3ecd64(0x475)]();}function _0x3739b8(_0x5e29ae){const _0x4cefaf=_0x1b1292;if(Array[_0x4cefaf(0x2fd)](_0x5e29ae))return _0x5e29ae[_0x4cefaf(0x82f)](_0x3739b8);return String(_0x5e29ae||'')['split'](',')[_0x4cefaf(0x47f)](_0x50b678=>_0x50b678[_0x4cefaf(0x44e)]())['filter'](Boolean);}function _0x47dc70(..._0xcfd7d7){const _0x13bbe2=_0x1b1292;return[...new Set(_0xcfd7d7[_0x13bbe2(0x82f)](_0x3739b8))]['join'](',\x20');}function _0x40ec23(_0x171cd5,_0x3cebfe){const _0x312057=_0x1b1292;if(!_0x171cd5)return![];if(_0x3cebfe==='*')return!![];if(_0x3cebfe instanceof RegExp)return _0x3cebfe[_0x312057(0x52a)](_0x171cd5);if(typeof _0x3cebfe==='function')return!!_0x3cebfe(_0x171cd5);if(Array[_0x312057(0x2fd)](_0x3cebfe))return _0x3cebfe['includes'](_0x171cd5);return _0x3cebfe===_0x171cd5;}function _0x576245(_0x26f49c={},_0x535d02={},_0x1f339f=null){const _0x531970=_0x1b1292;if(!_0x535d02)return null;const _0x2051b2=_0x26f49c[_0x531970(0x2a5)],_0x15c943=_0x535d02[_0x531970(0x8aa)]??_0x535d02[_0x531970(0x2a5)]??'*',_0x37b81e=_0x15c943==='*'?'*':_0x40ec23(_0x2051b2,_0x15c943)?_0x2051b2:null;if(!_0x37b81e)return null;const _0x55563b=_0x26f49c[_0x531970(0x3cf)],_0x55b076=_0x535d02['headers']??_0x535d02[_0x531970(0x42a)]??[_0x531970(0x417),_0x531970(0x85a),_0x531970(0x3e1),'last-event-id',_0x531970(0x39b)],_0x518e8b=_0x535d02[_0x531970(0x8a3)]??_0x535d02['allowMethods']??(_0x1f339f?[_0x1f339f,'OPTIONS']:[_0x531970(0x2ac),_0x531970(0x4aa),_0x531970(0x62f)]),_0x2a3ce1=_0x535d02['exposeHeaders']??[_0x531970(0x3e1)],_0x4348c2={'access-control-allow-origin':_0x37b81e,'access-control-allow-methods':Array[_0x531970(0x2fd)](_0x518e8b)?_0x518e8b[_0x531970(0x4e8)](',\x20'):String(_0x518e8b),'access-control-allow-headers':_0x55563b?_0x47dc70(_0x55b076,_0x55563b):Array[_0x531970(0x2fd)](_0x55b076)?_0x55b076['join'](',\x20'):String(_0x55b076),'access-control-expose-headers':Array[_0x531970(0x2fd)](_0x2a3ce1)?_0x2a3ce1['join'](',\x20'):String(_0x2a3ce1),'vary':_0x47dc70('Origin',_0x37b81e==='*'?'':'Origin',_0x55563b?_0x531970(0x1e0):'')};if(_0x535d02[_0x531970(0x6da)])_0x4348c2['access-control-allow-credentials']=_0x531970(0x1f8);if(Number[_0x531970(0x29f)](_0x535d02[_0x531970(0x639)]))_0x4348c2['access-control-max-age']=String(_0x535d02[_0x531970(0x639)]);return _0x4348c2;}function _0x5a2dde(_0x4eeb2e){const _0x5192ad=_0x1b1292,_0x142fc4=[],_0x165e98={};let _0x46fcde=![];_0x4eeb2e[_0x5192ad(0x43f)]('/*')&&(_0x46fcde=!![],_0x4eeb2e=_0x4eeb2e['slice'](0x0,-0x2),_0x142fc4[_0x5192ad(0x5bb)]('*'));let _0x33cdff=_0x4eeb2e[_0x5192ad(0x798)](/\/+$/,'')['replace'](/\[([^\]]*)\]/g,(_0x2a33c2,_0x1261d0)=>{const _0x142272=_0x5192ad,_0x28e4f7=_0x1261d0[_0x142272(0x798)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x27ea5f,_0x14a71a,_0x549190)=>{const _0x27df11=_0x142272;_0x142fc4[_0x27df11(0x5bb)](_0x14a71a);if(_0x549190!==undefined)_0x165e98[_0x14a71a]=_0x549190;return'/([^/]+)';});return _0x142272(0x866)+_0x28e4f7+')?';})[_0x5192ad(0x798)](/\/:(\w+)/g,(_0x333cc6,_0x254ef7)=>{const _0x4d692b=_0x5192ad;return _0x142fc4['push'](_0x254ef7),_0x4d692b(0x6ee);});if(_0x33cdff==='')_0x33cdff='/';return{'keys':_0x142fc4,'defaults':_0x165e98,'wildcard':_0x46fcde,'regex':new RegExp(_0x46fcde?'^'+_0x33cdff+_0x5192ad(0x2fa):'^'+_0x33cdff+'$')};}function _0x3c94bf(_0x57901d){const _0x211149=_0x1b1292;if(_0x57901d==null)return _0x57901d;return JSON[_0x211149(0x527)](JSON[_0x211149(0x364)](_0x57901d));}function _0x2176a8(_0x139645){const _0x2a057e=_0x1b1292;if(_0x139645==null)return null;if(_0x139645[_0x2a057e(0x465)]==='object'&&_0x139645['properties']&&!Array[_0x2a057e(0x2fd)](_0x139645[_0x2a057e(0x52c)]))return _0x3c94bf(_0x139645);const _0x5c1aa6=Object[_0x2a057e(0x5fb)](_0x139645),_0x24e647=_0x5c1aa6[_0x2a057e(0x744)]>0x0&&_0x5c1aa6[_0x2a057e(0x548)](_0x3ff64c=>{const _0x2484d7=_0x2a057e;return _0x3ff64c&&typeof _0x3ff64c==='object'&&!Array[_0x2484d7(0x2fd)](_0x3ff64c)&&(Object[_0x2484d7(0x1fb)][_0x2484d7(0x76b)]['call'](_0x3ff64c,_0x2484d7(0x465))||Object['prototype']['hasOwnProperty'][_0x2484d7(0x81a)](_0x3ff64c,'properties')||Object[_0x2484d7(0x1fb)][_0x2484d7(0x76b)][_0x2484d7(0x81a)](_0x3ff64c,_0x2484d7(0x789))||Object['prototype'][_0x2484d7(0x76b)][_0x2484d7(0x81a)](_0x3ff64c,_0x2484d7(0x24a)));});if(_0x24e647)return{'type':_0x2a057e(0x6ce),'properties':_0x3c94bf(_0x139645),'required':[],'additionalProperties':![]};const _0xc499bb={},_0x2e6d24=[];for(const [_0x52caba,_0x46cc81]of Object[_0x2a057e(0x7fb)](_0x139645)){_0xc499bb[_0x52caba]=_0x3341b7(_0x46cc81);if(_0x46cc81!==null&&_0x46cc81!==undefined)_0x2e6d24['push'](_0x52caba);}return{'type':_0x2a057e(0x6ce),'properties':_0xc499bb,'required':_0x2e6d24,'additionalProperties':![]};}function _0x3341b7(_0x5a55da){const _0x3b8049=_0x1b1292;if(_0x5a55da===null)return{'type':[_0x3b8049(0x68c),'string',_0x3b8049(0x1bc),_0x3b8049(0x648),_0x3b8049(0x6ce),'array']};if(Array[_0x3b8049(0x2fd)](_0x5a55da))return{'type':_0x3b8049(0x347),'items':_0x5a55da[_0x3b8049(0x744)]>0x0?_0x3341b7(_0x5a55da[0x0]):{}};switch(typeof _0x5a55da){case _0x3b8049(0x7a6):return{'type':_0x3b8049(0x7a6),'default':_0x5a55da};case _0x3b8049(0x1bc):return{'type':Number[_0x3b8049(0x699)](_0x5a55da)?_0x3b8049(0x45e):'number','default':_0x5a55da};case _0x3b8049(0x648):return{'type':'boolean','default':_0x5a55da};case _0x3b8049(0x6ce):{const _0x2b41a2={};for(const [_0x8bf413,_0x33b17e]of Object[_0x3b8049(0x7fb)](_0x5a55da))_0x2b41a2[_0x8bf413]=_0x3341b7(_0x33b17e);return{'type':_0x3b8049(0x6ce),'properties':_0x2b41a2,'additionalProperties':!![],'default':_0x3c94bf(_0x5a55da)};}default:return{};}}function _0x378c83(_0x30cdf0,_0xf6096b){const _0x5c3df4=_0x1b1292,_0x36a3b1=[];for(const _0x20bc75 of _0xf6096b[_0x5c3df4(0x766)]){if(_0x20bc75==='*')continue;_0x36a3b1['push']({'name':_0x20bc75,'required':!Object[_0x5c3df4(0x1fb)]['hasOwnProperty'][_0x5c3df4(0x81a)](_0xf6096b[_0x5c3df4(0x288)],_0x20bc75),'default':_0xf6096b[_0x5c3df4(0x288)][_0x20bc75]});}return _0x36a3b1;}function _0x55fd32(_0x23fd62={},_0x2e9690){const _0x4546ec=_0x1b1292,_0x1a523f=_0x2176a8(_0x23fd62[_0x4546ec(0x6e2)]?.[_0x4546ec(0x421)]??_0x23fd62[_0x4546ec(0x8cf)]??null),_0x174f9b=_0x23fd62[_0x4546ec(0x6e2)]?.['bodyMode']??(_0x23fd62[_0x4546ec(0x325)]?'raw':_0x2e9690[_0x4546ec(0x827)]===_0x4546ec(0x2ac)||_0x2e9690[_0x4546ec(0x827)]===_0x4546ec(0x3c1)?_0x4546ec(0x5d1):_0x4546ec(0x31a));return{'querySchema':_0x1a523f,'bodyMode':_0x174f9b,'bindings':_0x3c94bf(_0x23fd62[_0x4546ec(0x6e2)]?.[_0x4546ec(0x4fe)]??{}),'statuses':_0x3c94bf(_0x23fd62['http']?.[_0x4546ec(0x4ff)]??(_0x23fd62[_0x4546ec(0x4b0)]||[])),'transport':_0x23fd62[_0x4546ec(0x6e2)]?.[_0x4546ec(0x3a0)]??(_0x23fd62[_0x4546ec(0x576)]?_0x4546ec(0x576):_0x23fd62['raw']?_0x4546ec(0x325):_0x4546ec(0x787)),'rawResponse':_0x23fd62[_0x4546ec(0x6e2)]?.[_0x4546ec(0x804)]??!!_0x23fd62[_0x4546ec(0x804)],'cors':_0x3c94bf(_0x23fd62['http']?.['cors']??_0x23fd62['cors']??null)};}function _0x4c0558(_0x534133){const _0x5e36b4=_0x1b1292,_0x5c4bff=_0x534133['meta']||{},_0xa3b48=_0x378c83(_0x534133[_0x5e36b4(0x239)],_0x534133['matcher']),_0x5983a5=!!(_0x5c4bff['id']||_0x5c4bff[_0x5e36b4(0x725)]||_0x5c4bff['outputSchema']||_0x5c4bff['http']||_0x5c4bff[_0x5e36b4(0x28b)]||_0x5c4bff[_0x5e36b4(0x87f)]||_0x5c4bff[_0x5e36b4(0x215)]||_0x5c4bff[_0x5e36b4(0x7aa)]),_0x221802=_0x55fd32(_0x5c4bff,_0x534133),_0x369640=_0x5c4bff[_0x5e36b4(0x725)]?_0x3c94bf(_0x5c4bff[_0x5e36b4(0x725)]):null;return{'id':_0x5c4bff['id']??null,'summary':_0x5c4bff[_0x5e36b4(0x29b)]??null,'description':_0x5c4bff[_0x5e36b4(0x848)]??null,'tags':_0x3c94bf(_0x5c4bff[_0x5e36b4(0x2eb)]??[]),'category':_0x5c4bff[_0x5e36b4(0x4e3)]??null,'safety':_0x3c94bf(_0x5c4bff[_0x5e36b4(0x7aa)]??null),'access':_0x3c94bf(_0x5c4bff['access']??null),'inputSchema':_0x369640,'outputSchema':_0x3c94bf(_0x5c4bff[_0x5e36b4(0x27c)]??null),'examples':_0x3c94bf(_0x5c4bff[_0x5e36b4(0x70e)]??[]),'pathParams':_0xa3b48,'http':_0x221802,'cli':_0x3c94bf(_0x5c4bff['cli']??null),'mcp':_0x3c94bf(_0x5c4bff[_0x5e36b4(0x28b)]??null),'legacy':{'params':_0x3c94bf(_0x5c4bff['params']??null),'query':_0x3c94bf(_0x5c4bff['query']??null),'body':_0x3c94bf(_0x5c4bff[_0x5e36b4(0x6fd)]??null),'response':_0x3c94bf(_0x5c4bff[_0x5e36b4(0x82c)]??null)},'transport':{'raw':!!_0x5c4bff[_0x5e36b4(0x325)],'sse':!!_0x5c4bff[_0x5e36b4(0x576)],'rawResponse':!!_0x5c4bff['rawResponse'],'cors':_0x3c94bf(_0x5c4bff['cors']??null)},'hasCanonical':_0x5983a5};}function _0x1c71fd(_0x565967,_0x469ee3){const _0x27ea85=_0x1b1292;if(!_0x469ee3?.[_0x27ea85(0x2d1)])return;if(!_0x469ee3[_0x27ea85(0x725)]||_0x469ee3[_0x27ea85(0x725)][_0x27ea85(0x465)]!=='object'||!_0x469ee3['inputSchema'][_0x27ea85(0x52c)])throw new Error('Route\x20'+_0x565967[_0x27ea85(0x827)]+'\x20'+_0x565967[_0x27ea85(0x239)]+_0x27ea85(0x58f));const _0x405307=_0x469ee3[_0x27ea85(0x725)][_0x27ea85(0x52c)]||{},_0x575033=new Set(_0x469ee3[_0x27ea85(0x42f)][_0x27ea85(0x47f)](_0x5219b8=>_0x5219b8[_0x27ea85(0x76e)])),_0x210ad3=new Set(Object['keys'](_0x469ee3[_0x27ea85(0x6e2)]?.[_0x27ea85(0x421)]?.[_0x27ea85(0x52c)]||{})),_0x294187=new Set(Object[_0x27ea85(0x766)](_0x469ee3['http']?.['bindings']||{}));for(const _0x1fd85d of _0x469ee3[_0x27ea85(0x42f)]){if(!_0x405307[_0x1fd85d[_0x27ea85(0x76e)]])throw new Error(_0x27ea85(0x82d)+_0x565967[_0x27ea85(0x827)]+'\x20'+_0x565967[_0x27ea85(0x239)]+_0x27ea85(0x293)+_0x1fd85d[_0x27ea85(0x76e)]);}for(const _0x5a287f of _0x210ad3){if(!_0x405307[_0x5a287f])throw new Error(_0x27ea85(0x82d)+_0x565967[_0x27ea85(0x827)]+'\x20'+_0x565967[_0x27ea85(0x239)]+_0x27ea85(0x4d1)+_0x5a287f);}for(const _0x278835 of _0x294187){if(!_0x405307[_0x278835])throw new Error(_0x27ea85(0x82d)+_0x565967[_0x27ea85(0x827)]+'\x20'+_0x565967[_0x27ea85(0x239)]+_0x27ea85(0x353)+_0x278835);}for(const _0x293e3c of _0x294187){if(_0x575033[_0x27ea85(0x5d6)](_0x293e3c))throw new Error(_0x27ea85(0x82d)+_0x565967[_0x27ea85(0x827)]+'\x20'+_0x565967[_0x27ea85(0x239)]+_0x27ea85(0x582)+_0x293e3c);if(_0x210ad3[_0x27ea85(0x5d6)](_0x293e3c))throw new Error('Route\x20'+_0x565967[_0x27ea85(0x827)]+'\x20'+_0x565967[_0x27ea85(0x239)]+_0x27ea85(0x3f4)+_0x293e3c);const _0x1b08b9=_0x469ee3[_0x27ea85(0x6e2)][_0x27ea85(0x4fe)][_0x293e3c];if(!/^params\.[A-Za-z0-9_*.-]+$/[_0x27ea85(0x52a)](_0x1b08b9)&&!/^query\.[A-Za-z0-9_*.-]+$/[_0x27ea85(0x52a)](_0x1b08b9)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/['test'](_0x1b08b9)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x27ea85(0x52a)](_0x1b08b9))throw new Error(_0x27ea85(0x82d)+_0x565967['method']+'\x20'+_0x565967[_0x27ea85(0x239)]+'\x20has\x20illegal\x20binding\x20target\x20for\x20'+_0x293e3c+':\x20'+_0x1b08b9);}for(const _0x40a153 of _0x210ad3){if(_0x575033['has'](_0x40a153))throw new Error('Route\x20'+_0x565967['method']+'\x20'+_0x565967[_0x27ea85(0x239)]+_0x27ea85(0x72a)+_0x40a153);}const _0x198aa7=_0x469ee3[_0x27ea85(0x6e2)]?.['bodyMode'],_0x5bde54=new Set(['none',_0x27ea85(0x31a),'object',_0x27ea85(0x3fc),'array',_0x27ea85(0x325)]);if(!_0x5bde54[_0x27ea85(0x5d6)](_0x198aa7))throw new Error(_0x27ea85(0x82d)+_0x565967[_0x27ea85(0x827)]+'\x20'+_0x565967[_0x27ea85(0x239)]+_0x27ea85(0x6a8)+_0x198aa7);if(_0x198aa7===_0x27ea85(0x325)&&!_0x565967[_0x27ea85(0x56d)]?.[_0x27ea85(0x325)])throw new Error('Route\x20'+_0x565967[_0x27ea85(0x827)]+'\x20'+_0x565967['path']+_0x27ea85(0x5d4));if(_0x469ee3[_0x27ea85(0x28b)]?.['include']!==![]&&(_0x565967[_0x27ea85(0x56d)]?.[_0x27ea85(0x325)]||_0x565967[_0x27ea85(0x56d)]?.[_0x27ea85(0x576)]||_0x469ee3[_0x27ea85(0x6e2)]?.[_0x27ea85(0x3a0)]===_0x27ea85(0x7db)))throw new Error('Route\x20'+_0x565967[_0x27ea85(0x827)]+'\x20'+_0x565967[_0x27ea85(0x239)]+_0x27ea85(0x55a)+_0x469ee3[_0x27ea85(0x6e2)]?.[_0x27ea85(0x3a0)]);const _0x4c3cbb=Object[_0x27ea85(0x766)](_0x405307)['filter'](_0x498c64=>{const _0x139148=_0x27ea85;if(_0x575033[_0x139148(0x5d6)](_0x498c64))return![];if(_0x210ad3['has'](_0x498c64))return![];if(_0x294187['has'](_0x498c64))return![];return!![];});if(_0x198aa7===_0x27ea85(0x5d1)&&_0x4c3cbb[_0x27ea85(0x744)]>0x0)throw new Error('Route\x20'+_0x565967[_0x27ea85(0x827)]+'\x20'+_0x565967[_0x27ea85(0x239)]+'\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20'+_0x4c3cbb['join'](',\x20'));if(_0x198aa7==='array'&&_0x4c3cbb[_0x27ea85(0x7d3)](_0x143608=>_0xaf41ea(_0x405307[_0x143608],_0x27ea85(0x347)))[_0x27ea85(0x744)]!==0x1)throw new Error('Route\x20'+_0x565967['method']+'\x20'+_0x565967[_0x27ea85(0x239)]+_0x27ea85(0x704));}function _0x568f81(_0x5b02dd,_0x5cd955,_0x19e9c1,_0x29ad81){const _0x58f311=_0x1b1292;for(const [_0x22336b,_0x3f5cbe]of Object[_0x58f311(0x7fb)](_0x5b02dd)){if(_0x5cd955[_0x58f311(0x5d6)](_0x22336b)||_0x19e9c1['has'](_0x22336b)||Object['prototype'][_0x58f311(0x76b)][_0x58f311(0x81a)](_0x29ad81,_0x22336b))continue;if(_0xaf41ea(_0x3f5cbe,_0x58f311(0x347)))return _0x22336b;}return null;}function _0x2576e4(_0x25ddce){const _0x1d3903=_0x1b1292;if(Array[_0x1d3903(0x2fd)](_0x25ddce))return _0x25ddce;if(_0x25ddce==null)return[];return[_0x25ddce];}function _0xaf41ea(_0x1b56b6,_0x40bd0f){const _0x4aa4de=_0x1b1292;return _0x2576e4(_0x1b56b6?.[_0x4aa4de(0x465)])['includes'](_0x40bd0f);}function _0xb9f4bd(_0x1637e3,_0x29e602){const _0xd98856=_0x1b1292;if(_0x1637e3==null||typeof _0x1637e3!==_0xd98856(0x7a6))return _0x1637e3;const _0x3127eb=_0x2576e4(_0x29e602?.['type']);if(_0x3127eb[_0xd98856(0x744)]===0x0)return _0x1637e3;if(_0x3127eb['includes'](_0xd98856(0x68c))&&_0x1637e3==='null')return null;if(_0x3127eb[_0xd98856(0x361)](_0xd98856(0x648))){if(_0x1637e3===_0xd98856(0x1f8))return!![];if(_0x1637e3===_0xd98856(0x45a))return![];}if(_0x3127eb[_0xd98856(0x361)]('integer')&&/^-?\d+$/['test'](_0x1637e3))return Number[_0xd98856(0x608)](_0x1637e3,0xa);if(_0x3127eb[_0xd98856(0x361)](_0xd98856(0x1bc))&&/^-?(?:\d+|\d*\.\d+)$/[_0xd98856(0x52a)](_0x1637e3))return Number(_0x1637e3);return _0x1637e3;}function _0x4f8293(_0x127c45){return _0x3c94bf(_0x127c45);}function _0xa4b064(_0x1829cf,_0x1b270d={},_0x16a7c9={},_0x5378c8=null,_0x2af0ce={}){const _0x53473c=_0x1b1292,_0x548f75=_0x1829cf?.[_0x53473c(0x3d9)];if(!_0x548f75?.['hasCanonical']||!_0x548f75[_0x53473c(0x725)])return null;const _0x32c5d1=_0x548f75[_0x53473c(0x725)][_0x53473c(0x52c)]||{},_0x107502=_0x548f75[_0x53473c(0x6e2)]?.[_0x53473c(0x421)]?.[_0x53473c(0x52c)]||{},_0x49d764=_0x548f75[_0x53473c(0x6e2)]?.[_0x53473c(0x4fe)]||{},_0x4bcb38=new Set((_0x548f75[_0x53473c(0x42f)]||[])[_0x53473c(0x47f)](_0x2ada94=>_0x2ada94['name'])),_0x4d0805=new Set(Object['keys'](_0x107502)),_0x15d179={};for(const [_0x290788,_0x4a7ac8]of Object['entries'](_0x32c5d1)){Object['prototype'][_0x53473c(0x76b)][_0x53473c(0x81a)](_0x4a7ac8||{},'default')&&(_0x15d179[_0x290788]=_0x4f8293(_0x4a7ac8[_0x53473c(0x24a)]));}for(const _0xfefeae of _0x548f75[_0x53473c(0x42f)]||[]){if(!Object[_0x53473c(0x1fb)][_0x53473c(0x76b)][_0x53473c(0x81a)](_0x1b270d,_0xfefeae[_0x53473c(0x76e)]))continue;const _0x32cef6=_0x32c5d1[_0xfefeae[_0x53473c(0x76e)]]||{};_0x15d179[_0xfefeae['name']]=_0xb9f4bd(_0x1b270d[_0xfefeae[_0x53473c(0x76e)]],_0x32cef6);}for(const [_0x217075,_0x4e5c78]of Object['entries'](_0x107502)){if(!Object['prototype'][_0x53473c(0x76b)][_0x53473c(0x81a)](_0x16a7c9,_0x217075))continue;_0x15d179[_0x217075]=_0xb9f4bd(_0x16a7c9[_0x217075],_0x4e5c78||_0x32c5d1[_0x217075]||{});}for(const [_0x322a5c,_0xf8fef9]of Object['entries'](_0x49d764)){if(typeof _0xf8fef9!=='string')continue;let _0x1147f5;if(_0xf8fef9[_0x53473c(0x3b2)]('params.'))_0x1147f5=_0x1b270d[_0xf8fef9[_0x53473c(0x6f2)](0x7)];else{if(_0xf8fef9[_0x53473c(0x3b2)](_0x53473c(0x2e0)))_0x1147f5=_0x16a7c9[_0xf8fef9[_0x53473c(0x6f2)](0x6)];else{if(_0xf8fef9==='body')_0x1147f5=_0x5378c8;else{if(_0xf8fef9[_0x53473c(0x3b2)](_0x53473c(0x213)))_0x1147f5=_0x5378c8?.[_0xf8fef9[_0x53473c(0x6f2)](0x5)];else{if(_0xf8fef9[_0x53473c(0x3b2)](_0x53473c(0x2c0)))_0x1147f5=_0x2af0ce?.[_0xf8fef9[_0x53473c(0x6f2)](0x8)['toLowerCase']()]??_0x2af0ce?.[_0xf8fef9[_0x53473c(0x6f2)](0x8)];}}}}if(_0x1147f5!==undefined)_0x15d179[_0x322a5c]=_0x1147f5;}const _0x3328d2=_0x548f75['http']?.['bodyMode'];if(_0x3328d2!=='none'&&_0x3328d2!=='raw'&&_0x5378c8!=null){if(_0x3328d2===_0x53473c(0x347)&&Array[_0x53473c(0x2fd)](_0x5378c8)){const _0x56a966=_0x568f81(_0x32c5d1,_0x4bcb38,_0x4d0805,_0x49d764);if(_0x56a966)_0x15d179[_0x56a966]=_0x5378c8;}else{if(_0x3328d2===_0x53473c(0x6ce))for(const [_0x447bbc,_0x3614b4]of Object[_0x53473c(0x7fb)](_0x32c5d1)){if(_0x4bcb38[_0x53473c(0x5d6)](_0x447bbc)||_0x4d0805[_0x53473c(0x5d6)](_0x447bbc)||Object['prototype'][_0x53473c(0x76b)][_0x53473c(0x81a)](_0x49d764,_0x447bbc))continue;if(Object['prototype'][_0x53473c(0x76b)]['call'](_0x5378c8,_0x447bbc))_0x15d179[_0x447bbc]=_0x5378c8[_0x447bbc];else{if(_0xaf41ea(_0x3614b4,_0x53473c(0x6ce)))_0x15d179[_0x447bbc]=_0x5378c8;}}else for(const [_0x9a1e4c,_0x3ab581]of Object[_0x53473c(0x7fb)](_0x5378c8)){if(_0x4bcb38[_0x53473c(0x5d6)](_0x9a1e4c)||_0x4d0805[_0x53473c(0x5d6)](_0x9a1e4c)||Object['prototype'][_0x53473c(0x76b)][_0x53473c(0x81a)](_0x49d764,_0x9a1e4c))continue;_0x15d179[_0x9a1e4c]=_0x3ab581;}}}return _0x15d179;}function _0x30ee64(_0x14f889,_0x154232,_0x3c9f63,_0x1a65cf){const _0x1cc35e=_0x1b1292;if(!_0x154232)return;const _0x41e36f=_0x2576e4(_0x154232['type']);if(_0x14f889===undefined)return;if(_0x14f889===null){_0x41e36f[_0x1cc35e(0x744)]>0x0&&!_0x41e36f['includes'](_0x1cc35e(0x68c))&&_0x1a65cf[_0x1cc35e(0x5bb)]({'field':_0x3c9f63,'message':_0x1cc35e(0x4ee),'expected':_0x41e36f[_0x1cc35e(0x4e8)]('|'),'actual':null});return;}if(_0x41e36f[_0x1cc35e(0x744)]===0x0)return;const _0x31cad3=_0x41e36f['some'](_0x2cde70=>{const _0x875eeb=_0x1cc35e;switch(_0x2cde70){case _0x875eeb(0x7a6):return typeof _0x14f889===_0x875eeb(0x7a6);case _0x875eeb(0x45e):return Number['isInteger'](_0x14f889);case _0x875eeb(0x1bc):return typeof _0x14f889===_0x875eeb(0x1bc)&&Number[_0x875eeb(0x29f)](_0x14f889);case _0x875eeb(0x648):return typeof _0x14f889==='boolean';case _0x875eeb(0x6ce):return _0x14f889&&typeof _0x14f889===_0x875eeb(0x6ce)&&!Array[_0x875eeb(0x2fd)](_0x14f889);case _0x875eeb(0x347):return Array[_0x875eeb(0x2fd)](_0x14f889);case _0x875eeb(0x68c):return _0x14f889===null;default:return!![];}});if(!_0x31cad3){_0x1a65cf[_0x1cc35e(0x5bb)]({'field':_0x3c9f63,'message':_0x1cc35e(0x2e4)+_0x41e36f[_0x1cc35e(0x4e8)]('|'),'expected':_0x41e36f[_0x1cc35e(0x4e8)]('|'),'actual':_0x14f889});return;}Array[_0x1cc35e(0x2fd)](_0x14f889)&&_0x154232['items']&&_0x14f889[_0x1cc35e(0x4d0)]((_0xe56112,_0x533f48)=>_0x30ee64(_0xe56112,_0x154232[_0x1cc35e(0x789)],_0x3c9f63+'['+_0x533f48+']',_0x1a65cf));}function _0x1c0f26(_0x12953e,_0x13e7a9){const _0xd45522=_0x1b1292,_0x5d7012=_0x12953e?.['operation'];if(!_0x5d7012?.[_0xd45522(0x2d1)]||!_0x5d7012[_0xd45522(0x725)])return null;const _0x5e6696=_0x5d7012[_0xd45522(0x725)],_0x38ee2c=_0x5e6696[_0xd45522(0x52c)]||{},_0x20c07d=new Set(_0x5e6696[_0xd45522(0x81d)]||[]),_0x27f176=[];for(const _0xc83cc9 of _0x20c07d){_0x13e7a9[_0xc83cc9]===undefined&&_0x27f176[_0xd45522(0x5bb)]({'field':_0xc83cc9,'message':_0xd45522(0x3d4),'expected':_0xd45522(0x371),'actual':undefined});}if(_0x5e6696[_0xd45522(0x890)]===![])for(const _0x4eda9c of Object['keys'](_0x13e7a9||{})){!Object[_0xd45522(0x1fb)][_0xd45522(0x76b)][_0xd45522(0x81a)](_0x38ee2c,_0x4eda9c)&&_0x27f176[_0xd45522(0x5bb)]({'field':_0x4eda9c,'message':_0xd45522(0x4ef),'expected':_0xd45522(0x5b8),'actual':_0x13e7a9[_0x4eda9c]});}for(const [_0x45b3c0,_0x5b8427]of Object[_0xd45522(0x7fb)](_0x38ee2c)){_0x30ee64(_0x13e7a9[_0x45b3c0],_0x5b8427,_0x45b3c0,_0x27f176);}if(_0x27f176[_0xd45522(0x744)]===0x0)return null;return{'code':'VALIDATION_ERROR','errors':_0x27f176};}function _0x39737d(_0x1399d9=[]){const _0xbcbbd9=_0x1b1292;if(!Array[_0xbcbbd9(0x2fd)](_0x1399d9)||_0x1399d9[_0xbcbbd9(0x744)]===0x0)return null;const _0x2eb427=_0x1399d9[_0xbcbbd9(0x6f2)](0x0,0x3)[_0xbcbbd9(0x47f)]((_0x3bf30d={})=>{const _0x51df99=_0xbcbbd9,_0x158772=_0x3bf30d[_0x51df99(0x72b)]?_0x3bf30d[_0x51df99(0x72b)]+'\x20':'';return(''+_0x158772+(_0x3bf30d['message']||_0x51df99(0x6ba)))[_0x51df99(0x44e)]();})[_0xbcbbd9(0x4e8)](';\x20');return _0x1399d9['length']>0x3?_0x2eb427+_0xbcbbd9(0x841)+(_0x1399d9[_0xbcbbd9(0x744)]-0x3)+_0xbcbbd9(0x253):_0x2eb427;}function _0x188692(_0x282def,_0x360e86={}){const _0x2894d9=_0x1b1292,_0x5cd350=_0x360e86?.[_0x2894d9(0x2df)]?.['error']??_0x360e86?.['error']??_0x2894d9(0x86f),_0x3e184c=_0x360e86?.[_0x2894d9(0x2df)]?.[_0x2894d9(0x750)]??_0x360e86?.[_0x2894d9(0x750)]??_0x5cd350?.[_0x2894d9(0x750)]??null,_0x4d3ba9=_0x360e86?.[_0x2894d9(0x2df)]?.[_0x2894d9(0x247)]??_0x360e86?.[_0x2894d9(0x247)]??_0x5cd350?.[_0x2894d9(0x247)]??null,_0x1df9f3=_0x360e86?.[_0x2894d9(0x2df)]?.[_0x2894d9(0x262)]??_0x360e86?.[_0x2894d9(0x262)]??_0x5cd350?.['message']??null,_0x356652=typeof _0x5cd350==='string'?_0x5cd350:null,_0x18adc4=typeof _0x356652===_0x2894d9(0x7a6)&&/^[A-Z0-9_]+$/[_0x2894d9(0x52a)](_0x356652),_0x367958=_0x4d3ba9??(_0x18adc4?_0x356652:null)??(_0x1f4e68[_0x282def]||_0x2894d9(0x1e7)+_0x282def);let _0x4f1106=_0x1df9f3;!_0x4f1106&&typeof _0x356652===_0x2894d9(0x7a6)&&!_0x18adc4&&(_0x4f1106=_0x356652);if(!_0x4f1106&&_0x367958===_0x2894d9(0x5b3)){const _0x357443=_0x39737d(_0x3e184c);_0x4f1106=_0x357443?_0x2894d9(0x6dc)+_0x357443:_0x2894d9(0x6c1);}if(!_0x4f1106&&Array[_0x2894d9(0x2fd)](_0x3e184c)&&_0x3e184c[_0x2894d9(0x744)]>0x0){const _0x369e90=_0x39737d(_0x3e184c);if(_0x369e90)_0x4f1106=_0x369e90;}if(!_0x4f1106)_0x4f1106=_0x1f4e68[_0x282def]||_0x2894d9(0x86f);const _0x11d2d0={'code':_0x367958,'message':_0x4f1106};if(_0x3e184c!=null)_0x11d2d0[_0x2894d9(0x750)]=_0x3e184c;return _0x11d2d0;}function _0x1be903(_0x493f62){const _0x50c855=_0x1b1292,_0x72c5d9={};if(!_0x493f62)return _0x72c5d9;for(const _0x1c6822 of _0x493f62[_0x50c855(0x310)](';')){const _0x40bb56=_0x1c6822[_0x50c855(0x562)]('=');if(_0x40bb56===-0x1)continue;const _0x36a13e=_0x1c6822['slice'](0x0,_0x40bb56)[_0x50c855(0x44e)](),_0x3153c3=_0x1c6822[_0x50c855(0x6f2)](_0x40bb56+0x1)[_0x50c855(0x44e)]();_0x72c5d9[_0x36a13e]=decodeURIComponent(_0x3153c3);}return _0x72c5d9;}function _0x492eb2(_0x30bff7,_0x4d6da1){const _0x2bdd98=_0x1b1292;return _0x4d6da1=_0x14425f(_0x4d6da1),{'status':_0x4d6da1[_0x2bdd98(0x258)]??_0x30bff7[_0x2bdd98(0x258)],'headers':{..._0x30bff7[_0x2bdd98(0x612)]||{},..._0x4d6da1['headers']||{}},'body':_0x4d6da1[_0x2bdd98(0x6fd)]??_0x30bff7[_0x2bdd98(0x6fd)]};}function _0x5d45b2(_0x354c4a={}){const _0x313127=_0x1b1292;return _0x354c4a[_0x313127(0x3a0)]||(_0x354c4a[_0x313127(0x384)]?_0x313127(0x384):_0x313127(0x6e2));}function _0x40fbd8(_0x470d4b){const _0x1d8d42=_0x1b1292;if(_0x470d4b[_0x1d8d42(0x729)]?.[_0x1d8d42(0x384)]===!![])return!![];if(_0x470d4b[_0x1d8d42(0x729)]?.[_0x1d8d42(0x7f3)]?.[_0x1d8d42(0x5f7)]===!![])return!![];if(_0x470d4b[_0x1d8d42(0x729)]?.['auth']?.['ok']===!![])return!![];return![];}function _0x1aff3a(_0x54fc6c,_0x284422){const _0x5184ba=_0x284422['split']('.');let _0x1ac708=_0x54fc6c;for(const _0x368fe6 of _0x5184ba){_0x1ac708=_0x1ac708?.[_0x368fe6];}return _0x1ac708||null;}class _0x18fe1b{constructor(){const _0x22e079=_0x1b1292;this['middlewares']=[],this[_0x22e079(0x35b)]=[],this[_0x22e079(0x652)]=[],this[_0x22e079(0x605)]=0x5*0x400*0x400,this[_0x22e079(0x6fb)]=null,this[_0x22e079(0x6f9)]=[],this['_sockets']=new Set(),this[_0x22e079(0x7f3)]={'cookieName':_0x22e079(0x480),'stateCookieName':_0x22e079(0x69c),'csrfCookieName':_0x22e079(0x30f)},this[_0x22e079(0x6cd)]={},this[_0x22e079(0x333)]=new Map(),this[_0x22e079(0x5d3)]=null,this['_jwksCache']=null,this[_0x22e079(0x221)]=new Map(),this[_0x22e079(0x599)]=new _0x3e599f(),this[_0x22e079(0x89a)]=![],this[_0x22e079(0x3ad)]=0x0;}[_0x1b1292(0x360)](_0x18f025={}){const _0x2aabbb=_0x1b1292;return this[_0x2aabbb(0x6cd)]=_0x18f025||{},this['authMode']=_0x18f025[_0x2aabbb(0x29a)]??_0x2aabbb(0x35f),this[_0x2aabbb(0x6cd)];}get[_0x1b1292(0x240)](){const _0x50f728=_0x1b1292;if(this[_0x50f728(0x645)]?.[_0x50f728(0x7f3)])return this[_0x50f728(0x645)]['auth'][_0x50f728(0x240)];return![];}[_0x1b1292(0x3a9)](){const _0x24c469=_0x1b1292;if(this['_okdb']?.[_0x24c469(0x7f3)])return this[_0x24c469(0x645)][_0x24c469(0x7f3)][_0x24c469(0x3a9)]();return this[_0x24c469(0x6cd)]||{};}[_0x1b1292(0x687)](_0x190561){const _0x45bd5f=_0x1b1292;this[_0x45bd5f(0x850)][_0x45bd5f(0x5bb)](_0x190561);}[_0x1b1292(0x66f)](_0x4fc08a,_0x17e539){const _0x53c55f=_0x1b1292;this['guards'][_0x53c55f(0x5bb)]({'match':_0x4fc08a,'handler':_0x17e539});}[_0x1b1292(0x4d2)](_0x563111,_0x3fbffa,_0x4b0a5a,_0x14752c={}){const _0x1f94cd=_0x1b1292,_0x111301={'method':_0x1af7b7(_0x563111),'path':_0x3fbffa,'matcher':_0x5a2dde(_0x3fbffa),'handler':_0x4b0a5a,'meta':_0x14752c||{}},_0x20c32b=_0x4c0558(_0x111301);_0x1c71fd(_0x111301,_0x20c32b),_0x111301['operation']=_0x20c32b,_0x111301[_0x1f94cd(0x640)]=this[_0x1f94cd(0x89a)]===!![];if(_0x111301[_0x1f94cd(0x640)])this[_0x1f94cd(0x3ad)]++;this[_0x1f94cd(0x652)][_0x1f94cd(0x5bb)](_0x111301);}['addRaw'](_0x238659,_0xd4af4a,_0x1a50a3,_0x457b67={}){const _0x44fba8=_0x1b1292;this[_0x44fba8(0x4d2)](_0x238659,_0xd4af4a,_0x1a50a3,{..._0x457b67,'raw':!![]});}[_0x1b1292(0x245)](_0x14dae4,_0x299314,{corsOnly:corsOnly=![]}={}){const _0x32c85e=_0x1b1292;let _0x20f8d6=null,_0x5287b5=Infinity;for(const _0x3afbc9 of this[_0x32c85e(0x652)]){if(corsOnly){if(!_0x3afbc9[_0x32c85e(0x56d)]?.[_0x32c85e(0x580)])continue;}else{if(_0x3afbc9['method']!==_0x14dae4)continue;}if(!_0x3afbc9[_0x32c85e(0x568)][_0x32c85e(0x632)][_0x32c85e(0x52a)](_0x299314))continue;const _0x376c7a=_0x3afbc9[_0x32c85e(0x568)][_0x32c85e(0x766)]?.['length']??0x0;if(_0x376c7a<_0x5287b5){_0x20f8d6=_0x3afbc9,_0x5287b5=_0x376c7a;if(_0x376c7a===0x0)break;}}return _0x20f8d6;}[_0x1b1292(0x8dd)](_0x3ad389,_0x37eee9){const _0x2dca65=_0x1b1292,_0x55e112=_0x1af7b7(_0x3ad389),_0x5c6b05=this[_0x2dca65(0x245)](_0x55e112,_0x37eee9);if(_0x5c6b05)return _0x5c6b05;if(_0x55e112===_0x2dca65(0x62f))return this[_0x2dca65(0x245)](_0x55e112,_0x37eee9,{'corsOnly':!![]});return null;}['_shouldWrapResponse'](_0x43e891,_0x4e3d05){const _0x5cd44c=_0x1b1292;if(_0x43e891?.[_0x5cd44c(0x56d)]?.[_0x5cd44c(0x804)])return![];if(_0x4e3d05?.['headers']?.[_0x5cd44c(0x5e0)])return![];return!![];}['listRoutes'](){const _0xf5bc=_0x1b1292;return this[_0xf5bc(0x652)]['filter'](_0x14c0f4=>!_0x14c0f4[_0xf5bc(0x56d)]?.['hidden'])['map'](_0x22d354=>({'method':_0x22d354[_0xf5bc(0x827)],'path':_0x22d354[_0xf5bc(0x239)],'defaults':_0x22d354[_0xf5bc(0x568)][_0xf5bc(0x288)],'meta':_0x22d354[_0xf5bc(0x56d)],'operation':_0x22d354[_0xf5bc(0x3d9)]}));}[_0x1b1292(0x2a3)](_0x2a1a84,_0x9d86e3,_0x3caf90={}){const _0x125a60=_0x1b1292,{PassThrough:_0x4e733a}=require$$5;this[_0x125a60(0x4d2)](_0x125a60(0x2ac),_0x2a1a84,({params:_0x1e2f6d,query:_0x4cae04,headers:_0x4b7799,context:_0x26d104})=>{const _0x2b77dd=_0x125a60,_0x2af497=new _0x4e733a();let _0x429261=null;const _0x162831={};try{_0x26d104?.[_0x2b77dd(0x25a)]?.[_0x2b77dd(0x317)]?.[_0x2b77dd(0x702)](!![]);}catch{}_0x2af497[_0x2b77dd(0x5ae)](_0x2b77dd(0x36c)),_0x429261=setInterval(()=>{const _0x2e5187=_0x2b77dd;try{_0x2af497[_0x2e5187(0x5ae)](_0x2e5187(0x740));}catch{}},0x3a98);const _0x32e6d3=(_0x158b6d,_0x52af3c,_0x3c4a6a={})=>{const _0x118785=_0x2b77dd;try{const _0x4977e6=_0x3c4a6a[_0x118785(0x325)]?String(_0x52af3c??''):JSON['stringify'](_0x52af3c);_0x3c4a6a['id']!=null&&_0x2af497['write'](_0x118785(0x21c)+_0x3c4a6a['id']+'\x0a');_0x2af497[_0x118785(0x5ae)]('event:\x20'+_0x158b6d+'\x0a');for(const _0x5880b8 of _0x4977e6[_0x118785(0x310)]('\x0a')){_0x2af497['write'](_0x118785(0x370)+_0x5880b8+'\x0a');}_0x2af497[_0x118785(0x5ae)]('\x0a');}catch{}},_0x20a04b=()=>{_0x429261&&(clearInterval(_0x429261),_0x429261=null);try{_0x2af497['destroy']();}catch{}},_0x2865c2=(_0x280259,_0x109e6f)=>{_0x162831[_0x280259]=_0x109e6f;};_0x26d104?.[_0x2b77dd(0x25a)]?.['on']('close',_0x20a04b),_0x2af497['on']('close',_0x20a04b);if(_0x26d104?.['auth']&&_0x26d104[_0x2b77dd(0x7f3)]['open']!==!![]&&_0x26d104[_0x2b77dd(0x7f3)][_0x2b77dd(0x5f7)]){const _0xee56cd={'headers':_0x4b7799??{},'cookies':_0x1be903(_0x4b7799?.[_0x2b77dd(0x554)]),'context':{},'socket':_0x26d104?.[_0x2b77dd(0x25a)]?.[_0x2b77dd(0x317)]??{'remoteAddress':null}},_0x46dde8=setInterval(async()=>{const _0x4b58af=_0x2b77dd;try{const _0x4a6a0d=await this[_0x4b58af(0x7c9)](_0xee56cd);if(_0x4a6a0d?.[_0x4b58af(0x35f)]===!![]||_0x4a6a0d?.['isAuthenticated'])return;_0x32e6d3('auth',{'expired':!![]}),_0x20a04b();}catch{_0x20a04b();}},0xea60);_0x46dde8[_0x2b77dd(0x69f)]?.(),_0x2af497['on'](_0x2b77dd(0x2de),()=>clearInterval(_0x46dde8));}const _0x5441e0=_0x9d86e3({'send':_0x32e6d3,'close':_0x20a04b,'params':_0x1e2f6d??{},'query':_0x4cae04??{},'headers':_0x4b7799??{},'context':_0x26d104,'setHeader':_0x2865c2});return typeof _0x5441e0===_0x2b77dd(0x733)&&_0x2af497['on'](_0x2b77dd(0x2de),_0x5441e0),{'status':0xc8,'headers':{'content-type':_0x2b77dd(0x7c0),'cache-control':_0x2b77dd(0x448),'connection':_0x2b77dd(0x4a7),'x-accel-buffering':'no',..._0x162831},'body':_0x2af497};},{..._0x3caf90,'sse':!![]});}async[_0x1b1292(0x349)](_0x4d0cc3,_0x3397a5){const _0x558d08=_0x1b1292;for(const _0x2d9b19 of this[_0x558d08(0x35b)]){if(!_0x2d9b19[_0x558d08(0x3e5)](_0x4d0cc3))continue;const _0x53714a=await _0x2d9b19[_0x558d08(0x223)](_0x4d0cc3,_0x3397a5);if(_0x53714a===![])return![];}return!![];}async[_0x1b1292(0x235)](_0x1bbe79,_0x4e29cd,_0x5dbac0){let _0x247220=0x0;const _0x2942fe=async()=>{const _0x248f8c=_0x223d,_0x150565=this[_0x248f8c(0x850)][_0x247220++];if(!_0x150565)return _0x5dbac0();return _0x150565(_0x1bbe79,_0x4e29cd,_0x2942fe);};return _0x2942fe();}[_0x1b1292(0x436)](_0x5e8889,_0x1ea018){const _0x3e1b86=_0x1b1292,{status:status=0xc8,headers:headers={},body:_0x5219e8}=_0x5e8889;if(status>=0x12c&&status<0x190)return _0x5e8889;if(_0x26bb27(_0x5219e8))return _0x5e8889;if(Buffer['isBuffer'](_0x5219e8))return _0x5e8889;if(typeof _0x5219e8===_0x3e1b86(0x7a6))return _0x5e8889;const _0x20e5aa={'time':+_0x1ea018[_0x3e1b86(0x539)](0x2)};if(_0x5219e8?.[_0x3e1b86(0x56d)]&&typeof _0x5219e8[_0x3e1b86(0x56d)]===_0x3e1b86(0x6ce)){const {time:_0xa4491b,..._0xcd1861}=_0x5219e8[_0x3e1b86(0x56d)];Object[_0x3e1b86(0x8cd)](_0x20e5aa,_0xcd1861);}let _0x313e6a;if(status>=0x190){const _0x4adf70=_0x188692(status,_0x5219e8);_0x313e6a={'data':null,'error':_0x4adf70,'meta':_0x20e5aa};}else{if(status===0xcc||_0x5219e8==null)_0x313e6a={'data':null,'error':null,'meta':_0x20e5aa};else{let _0x51dc53;if(_0x3e1b86(0x2df)in _0x5219e8)_0x51dc53=_0x5219e8['result'];else{const {meta:_0x37e000,..._0x48dc49}=_0x5219e8;_0x51dc53=Object[_0x3e1b86(0x766)](_0x48dc49)[_0x3e1b86(0x744)]>0x0?_0x48dc49:null;}_0x313e6a={'data':_0x51dc53,'error':null,'meta':_0x20e5aa};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x313e6a};}async['handle'](_0x1a88c8,_0x1fe3c6,_0x19de28={},_0x269dd8={}){const _0x16ea15=_0x1b1292;_0x1a88c8=_0x1af7b7(_0x1a88c8);const _0x5c442f=this[_0x16ea15(0x8dd)](_0x1a88c8,_0x1fe3c6),_0xa22a0c={'method':_0x1a88c8,'path':_0x1fe3c6,'headers':_0x19de28[_0x16ea15(0x612)]??{},'body':_0x19de28['body']??null,'query':_0x19de28[_0x16ea15(0x8cf)]??{},'context':_0x269dd8,'cookies':_0x1be903(_0x19de28[_0x16ea15(0x612)]?.[_0x16ea15(0x554)]),'route':_0x5c442f,'socket':{'remoteAddress':_0x19de28[_0x16ea15(0x2b2)]??_0x16ea15(0x8b2)}};_0xa22a0c[_0x16ea15(0x729)]=_0xa22a0c[_0x16ea15(0x729)]||{};!_0xa22a0c[_0x16ea15(0x729)][_0x16ea15(0x7f3)]&&(_0xa22a0c['context'][_0x16ea15(0x7f3)]=await this['authenticateRequest'](_0xa22a0c));if(_0xa22a0c[_0x16ea15(0x729)][_0x16ea15(0x7f3)]?.[_0x16ea15(0x762)])return _0x14425f({'status':0x193,'body':{'error':{'code':_0x16ea15(0x466),'message':_0x16ea15(0x2a7)}}});_0xa22a0c[_0x16ea15(0x729)]['auth']?.['user']&&!_0xa22a0c['context'][_0x16ea15(0x394)]&&(_0xa22a0c['context'][_0x16ea15(0x394)]=_0xa22a0c['context'][_0x16ea15(0x7f3)]['user']);let _0x12b624=null;const _0x4a4c9d={'status'(_0x3435a8){const _0x540ce3=_0x16ea15;_0x12b624=_0x12b624||{},_0x12b624[_0x540ce3(0x258)]=_0x3435a8;},'setHeader'(_0x395444,_0x2e4c5f){const _0x4325b1=_0x16ea15;_0x12b624=_0x12b624||{},_0x12b624[_0x4325b1(0x612)]=_0x12b624['headers']||{};const _0x136135=String(_0x395444)['toLowerCase']();if(_0x136135==='set-cookie'){const _0x42cde1=_0x12b624[_0x4325b1(0x612)][_0x395444];if(!_0x42cde1)_0x12b624[_0x4325b1(0x612)][_0x395444]=_0x2e4c5f;else{if(Array['isArray'](_0x42cde1))_0x42cde1[_0x4325b1(0x5bb)](_0x2e4c5f);else _0x12b624[_0x4325b1(0x612)][_0x395444]=[_0x42cde1,_0x2e4c5f];}return;}_0x12b624[_0x4325b1(0x612)][_0x395444]=_0x2e4c5f;},'send'(_0x535037){const _0x4808e1=_0x16ea15;_0x12b624=_0x12b624||{},_0x12b624[_0x4808e1(0x6fd)]=_0x535037;}},_0x44a6a4=await this['_runGuards'](_0xa22a0c,_0x4a4c9d);if(!_0x44a6a4)return _0x14425f(_0x12b624??{'status':0x193});const _0x177d88=this[_0x16ea15(0x4ed)](_0xa22a0c);if(_0x177d88)return _0x14425f(_0x177d88);const _0x312d72=this[_0x16ea15(0x37c)](_0xa22a0c);if(_0x312d72)return _0x14425f(_0x312d72);return await this[_0x16ea15(0x235)](_0xa22a0c,_0x4a4c9d,async()=>{const _0x32920d=_0x16ea15,_0x1072aa=await this[_0x32920d(0x3ac)](_0xa22a0c);if(_0x12b624==null){_0x12b624=_0x1072aa;return;}_0x12b624=_0x492eb2(_0x12b624,_0x1072aa);}),_0x14425f(_0x12b624);}['_enforceOperationAccess'](_0x426f27){const _0x3f55aa=_0x1b1292,_0x16c3e4=_0x426f27[_0x3f55aa(0x8c7)]?.[_0x3f55aa(0x3d9)],_0x30b7e4=_0x16c3e4?.[_0x3f55aa(0x215)];if(!_0x16c3e4?.['hasCanonical']||!_0x30b7e4)return null;if(_0x426f27[_0x3f55aa(0x729)]?.[_0x3f55aa(0x7f3)]?.['open']===!![]||_0x426f27[_0x3f55aa(0x729)]?.[_0x3f55aa(0x7f3)]?.[_0x3f55aa(0x6ef)]===!![])return null;const _0x36998b=_0x5d45b2(_0x426f27[_0x3f55aa(0x729)]),_0x54fb81=Array[_0x3f55aa(0x2fd)](_0x30b7e4[_0x3f55aa(0x3f0)])?_0x30b7e4['audiences']:null;if(_0x30b7e4[_0x3f55aa(0x6eb)]&&_0x426f27[_0x3f55aa(0x729)]?.['internal']!==!![])return{'status':0x193,'body':{'error':'Forbidden'}};if(_0x54fb81&&_0x54fb81[_0x3f55aa(0x744)]>0x0&&!_0x54fb81['includes'](_0x36998b)&&!(_0x36998b===_0x3f55aa(0x384)&&_0x54fb81['includes']('shell')))return{'status':0x193,'body':{'error':_0x3f55aa(0x2e8)}};if(_0x30b7e4[_0x3f55aa(0x5ee)]&&!_0x40fbd8(_0x426f27))return{'status':0x191,'body':{'error':_0x3f55aa(0x696)}};const _0x4fd0a4=_0x30b7e4[_0x3f55aa(0x4d3)];if(!_0x4fd0a4)return null;if(_0x426f27['context']?.[_0x3f55aa(0x7f3)]?.[_0x3f55aa(0x465)]==='sync-node')return null;const _0x49bb37=_0x426f27[_0x3f55aa(0x729)]?.[_0x3f55aa(0x7f3)]?.[_0x3f55aa(0x3d0)];if(!_0x49bb37){if(_0x426f27[_0x3f55aa(0x729)]?.[_0x3f55aa(0x7f3)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':'Forbidden\x20—\x20no\x20permissions\x20available'}};}if(!_0x426f27[_0x3f55aa(0x33a)]&&_0x426f27['route']?.[_0x3f55aa(0x568)]){const _0x5ad980=_0x426f27[_0x3f55aa(0x8c7)][_0x3f55aa(0x568)][_0x3f55aa(0x632)]['exec'](_0x426f27[_0x3f55aa(0x239)]);_0x5ad980&&(_0x426f27[_0x3f55aa(0x33a)]={},_0x426f27[_0x3f55aa(0x8c7)][_0x3f55aa(0x568)][_0x3f55aa(0x766)][_0x3f55aa(0x4d0)]((_0x31f1c1,_0x22e391)=>{const _0x3fb190=_0x3f55aa,_0x10bfd8=_0x5ad980[_0x22e391+0x1];_0x426f27['params'][_0x31f1c1]=_0x10bfd8?decodeURIComponent(_0x10bfd8):_0x426f27[_0x3fb190(0x8c7)][_0x3fb190(0x568)][_0x3fb190(0x288)][_0x31f1c1]??undefined;}));}let _0x1b260e=null;const _0x1d25ae=_0x30b7e4['scope']===_0x3f55aa(0x264)?'params.env':_0x30b7e4[_0x3f55aa(0x8ce)]?.[_0x3f55aa(0x264)];_0x1d25ae&&(_0x1b260e=_0x1aff3a(_0x426f27,_0x1d25ae));if(_0x1b260e&&_0x1b260e['startsWith']('~')){const _0xd59f7=_0x30c1fb(_0x4fd0a4),_0x5b4f6f=_0x355330(_0x49bb37[_0x3f55aa(0x378)]||[],(_0x49bb37[_0x3f55aa(0x78c)]||{})[_0x1b260e]||[]);if(!_0x2ec52a(_0x5b4f6f,_0xd59f7))return{'status':0x193,'body':{'error':_0x3f55aa(0x282)+_0xd59f7+_0x3f55aa(0x57f)}};}const _0x16a2d2=_0x355330(_0x49bb37[_0x3f55aa(0x378)]||[],_0x1b260e?(_0x49bb37[_0x3f55aa(0x78c)]||{})[_0x1b260e]||[]:[]);if(!_0x2ec52a(_0x16a2d2,_0x4fd0a4))return{'status':0x193,'body':{'error':_0x3f55aa(0x282)+_0x4fd0a4}};return null;}[_0x1b1292(0x37c)](_0x1b0b73){const _0x370dc7=_0x1b1292,_0x52d375=_0x1b0b73['route'],_0x1a40a2=_0x52d375?.[_0x370dc7(0x3d9)];if(!_0x1a40a2?.[_0x370dc7(0x2d1)]||!_0x1a40a2[_0x370dc7(0x725)])return null;let _0x5d1052=_0x1b0b73[_0x370dc7(0x33a)]??null;if(!_0x5d1052&&_0x52d375?.['matcher']){const _0x3b6ea7=_0x52d375['matcher'][_0x370dc7(0x632)][_0x370dc7(0x39c)](_0x1b0b73[_0x370dc7(0x239)]);_0x3b6ea7&&(_0x5d1052={},_0x52d375[_0x370dc7(0x568)]['keys'][_0x370dc7(0x4d0)]((_0x41051a,_0x1f4a75)=>{const _0x3542f1=_0x370dc7,_0x139efe=_0x3b6ea7[_0x1f4a75+0x1];_0x5d1052[_0x41051a]=_0x139efe?decodeURIComponent(_0x139efe):_0x52d375['matcher'][_0x3542f1(0x288)][_0x41051a]??undefined;}));}const _0x1baba2=_0xa4b064(_0x52d375,_0x5d1052??{},_0x1b0b73[_0x370dc7(0x8cf)]??{},_0x1b0b73[_0x370dc7(0x6fd)],_0x1b0b73[_0x370dc7(0x612)]??{}),_0x2852cb=_0x1c0f26(_0x52d375,_0x1baba2||{});if(!_0x2852cb)return null;const _0x2eead2=_0x39737d(_0x2852cb[_0x370dc7(0x3c5)]);return{'status':0x190,'body':{'error':_0x2852cb['code'],'code':_0x2852cb[_0x370dc7(0x247)],'message':_0x2eead2?_0x370dc7(0x6dc)+_0x2eead2:_0x370dc7(0x6c1),'details':_0x2852cb[_0x370dc7(0x3c5)]}};}[_0x1b1292(0x686)](_0x2f9c74,_0xb45414){const _0x18b8c8=_0x1b1292,_0x35c3e6=_0x1c0f26(_0x2f9c74,_0xb45414||{});if(!_0x35c3e6)return null;return{'code':_0x35c3e6[_0x18b8c8(0x247)],'message':_0x39737d(_0x35c3e6[_0x18b8c8(0x3c5)])?_0x18b8c8(0x6dc)+_0x39737d(_0x35c3e6[_0x18b8c8(0x3c5)]):_0x18b8c8(0x6c1),'details':_0x35c3e6[_0x18b8c8(0x3c5)]};}async['_dispatch'](_0x3bf1e9){const _0x884384=_0x1b1292;if(_0x3bf1e9[_0x884384(0x827)]===_0x884384(0x62f)){const _0x42b521=this[_0x884384(0x245)](_0x884384(0x62f),_0x3bf1e9[_0x884384(0x239)],{'corsOnly':!![]});if(_0x42b521)return{'status':0xcc,'headers':_0x576245(_0x3bf1e9[_0x884384(0x612)],_0x42b521[_0x884384(0x56d)][_0x884384(0x580)],_0x42b521[_0x884384(0x827)])||{}};}const _0x525fb8=this[_0x884384(0x245)](_0x3bf1e9[_0x884384(0x827)],_0x3bf1e9[_0x884384(0x239)]);if(_0x525fb8){const _0x278643=_0x525fb8['matcher'][_0x884384(0x632)][_0x884384(0x39c)](_0x3bf1e9[_0x884384(0x239)]),_0xebfc40={};_0x525fb8[_0x884384(0x568)]['keys'][_0x884384(0x4d0)]((_0x46a2cc,_0x519f50)=>{const _0x1093bb=_0x884384,_0x31e899=_0x278643[_0x519f50+0x1];_0xebfc40[_0x46a2cc]=_0x31e899?decodeURIComponent(_0x31e899):_0x525fb8['matcher'][_0x1093bb(0x288)][_0x46a2cc]??undefined;}),_0x3bf1e9['params']=_0xebfc40;try{const _0x40284a=await _0x525fb8[_0x884384(0x223)]({'params':_0xebfc40,'body':_0x3bf1e9[_0x884384(0x6fd)],'query':_0x3bf1e9[_0x884384(0x8cf)],'headers':_0x3bf1e9[_0x884384(0x612)],'context':_0x3bf1e9['context']}),_0xe16dbf=_0x14425f(_0x40284a),_0x46084b=_0x576245(_0x3bf1e9[_0x884384(0x612)],_0x525fb8['meta']?.['cors'],_0x525fb8['method']);if(!_0x46084b)return _0xe16dbf;return{..._0xe16dbf,'headers':{..._0xe16dbf['headers']||{},..._0x46084b}};}catch(_0x1efd6d){const _0x4706d4=_0x1efd6d?.[_0x884384(0x258)]||_0x2a6b18[_0x1efd6d?.[_0x884384(0x247)]]||0x1f4;return{'status':_0x4706d4,'body':{'error':_0x1efd6d[_0x884384(0x262)]||_0x884384(0x6c6),'code':_0x1efd6d?.['code']||_0x1f4e68[_0x4706d4]||'HTTP_'+_0x4706d4,'message':_0x1efd6d?.['message']||_0x884384(0x6c6),..._0x1efd6d?.[_0x884384(0x750)]!=null?{'details':_0x1efd6d['details']}:{}}};}}return{'status':0x194,'body':{'error':_0x884384(0x708)}};}[_0x1b1292(0x6a1)](_0x5a0008,_0x5797df={}){const _0x3ca316=_0x1b1292;if(typeof _0x5797df==='string'||Array[_0x3ca316(0x2fd)](_0x5797df))_0x5797df={'host':_0x5797df};_0x5797df=_0x5797df??{};const _0x5bc0cd=Number(_0x5797df['workers'])||0x0;if(_0x5bc0cd>=0x1||_0x5797df['makeOkdb']!=null||_0x5797df[_0x3ca316(0x578)]!=null){const _0x45c57a=new Error('http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20'+'library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20'+'CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20'+_0x3ca316(0x410));_0x45c57a['code']=_0x3ca316(0x255);throw _0x45c57a;}if(this[_0x3ca316(0x6fb)])throw new Error(_0x3ca316(0x7cc));const _0xa08726=_0x5797df['host']==null?[undefined]:[]['concat'](_0x5797df[_0x3ca316(0x573)]);if(!_0xa08726[_0x3ca316(0x744)]||_0xa08726[_0x3ca316(0x873)](_0x33324a=>_0x33324a!==undefined&&(typeof _0x33324a!==_0x3ca316(0x7a6)||!_0x33324a))){const _0x5ca5bf=new Error(_0x3ca316(0x226));_0x5ca5bf['code']=_0x3ca316(0x3a4);throw _0x5ca5bf;}_0x5a0008&&this[_0x3ca316(0x7f3)]['cookieName']==='okdb_session'&&(this[_0x3ca316(0x7f3)][_0x3ca316(0x800)]=_0x3ca316(0x3d6)+_0x5a0008,this['_okdb']?.[_0x3ca316(0x7f3)]&&(this['_okdb'][_0x3ca316(0x7f3)]['_cookieName']=this[_0x3ca316(0x7f3)][_0x3ca316(0x800)]));const _0x1dfc3a=this[_0x3ca316(0x645)]?.[_0x3ca316(0x878)]?.[_0x3ca316(0x32f)]?.['logRequests']??![],_0x518507=async(_0x2f310c,_0x2aed6e)=>{const _0x4002c2=_0x3ca316,_0x30abec=Date['now']();if(_0x1dfc3a){const _0x2210c2=_0x2f310c[_0x4002c2(0x6f0)]||'/',_0x49235c=_0x2f310c['headers']?.[_0x4002c2(0x85a)]?_0x2f310c[_0x4002c2(0x612)][_0x4002c2(0x85a)]['replace'](/^Bearer\s+(\S{0,8})\S*/i,'Bearer\x20$1…'):'-',_0x61581a=_0x2f310c['headers']?.[_0x4002c2(0x5c8)]||'-',_0x3ac390=_0x2f310c['headers']?.[_0x4002c2(0x359)]||_0x2f310c[_0x4002c2(0x612)]?.[_0x4002c2(0x5d8)]||'-',_0x3413cf=_0x2f310c[_0x4002c2(0x612)]?.['origin']||'-';process[_0x4002c2(0x376)][_0x4002c2(0x5ae)](_0x4002c2(0x694)+_0x2f310c[_0x4002c2(0x827)][_0x4002c2(0x435)](0x7)+'\x20'+_0x2210c2['padEnd'](0x2d)+'\x20'+(_0x4002c2(0x491)+_0x49235c+_0x4002c2(0x2d2)+_0x3413cf+'\x20cf-ray='+_0x61581a+_0x4002c2(0x1da)+_0x3ac390+'\x0a'));}try{const _0x508fff=new _0x14a130(_0x2f310c[_0x4002c2(0x6f0)],_0x4002c2(0x801)+_0x2f310c[_0x4002c2(0x612)]['host']),_0x3052f4=this[_0x4002c2(0x8dd)](_0x2f310c['method'],_0x508fff[_0x4002c2(0x3db)]),_0x55bd28=_0x3052f4?.[_0x4002c2(0x56d)]?.[_0x4002c2(0x325)]===!![];if(_0x55bd28){const _0x5dc522=_0x2f310c[_0x4002c2(0x612)]?.[_0x4002c2(0x48f)];if(_0x5dc522!=null){const _0x2f70c1=Number(_0x5dc522);if(Number['isFinite'](_0x2f70c1)&&_0x2f70c1>this[_0x4002c2(0x605)]){_0x2aed6e[_0x4002c2(0x3ec)]=0x19d,_0x2aed6e[_0x4002c2(0x4c5)](_0x4002c2(0x230));return;}}}const _0x4a7828=_0x55bd28?null:await _0x3c3af4(_0x2f310c,this[_0x4002c2(0x605)]),_0x51f651=_0x55bd28?_0x1595e2(_0x2f310c,this[_0x4002c2(0x605)]):undefined,_0x277d17=await this['handle'](_0x2f310c['method'],_0x508fff[_0x4002c2(0x3db)],{'body':_0x4a7828,'query':Object[_0x4002c2(0x33d)](_0x508fff[_0x4002c2(0x7f7)][_0x4002c2(0x7fb)]()),'headers':_0x2f310c[_0x4002c2(0x612)]},{'req':_0x2f310c,'res':_0x2aed6e,'rawStream':_0x51f651}),_0x26c630=this[_0x4002c2(0x8dd)](_0x2f310c[_0x4002c2(0x827)],_0x508fff[_0x4002c2(0x3db)]),_0x461fa3=Date[_0x4002c2(0x872)]()-_0x30abec,_0x3dcdd2=this[_0x4002c2(0x870)](_0x26c630,_0x277d17)?this[_0x4002c2(0x436)](_0x277d17,_0x461fa3):_0x14425f(_0x277d17),_0x1b962e=(_0x3dcdd2[_0x4002c2(0x258)]||0xc8)>=0x190;this['metrics'][_0x4002c2(0x5c4)](_0x2f310c[_0x4002c2(0x827)],_0x461fa3,_0x1b962e),_0xf35098(_0x2aed6e,_0x3dcdd2);if(_0x1dfc3a){const _0x56270c=_0x3dcdd2[_0x4002c2(0x258)]||0xc8,_0x28da89=Date[_0x4002c2(0x872)]()-_0x30abec;process[_0x4002c2(0x376)][_0x4002c2(0x5ae)](_0x4002c2(0x709)+_0x2f310c[_0x4002c2(0x827)][_0x4002c2(0x435)](0x7)+'\x20'+_0x508fff[_0x4002c2(0x3db)][_0x4002c2(0x435)](0x2d)+'\x20'+_0x56270c+'\x20\x20'+_0x28da89+_0x4002c2(0x734));}}catch(_0xb396ea){const _0x5aec1b=Date[_0x4002c2(0x872)]()-_0x30abec;this[_0x4002c2(0x599)]['record'](_0x2f310c[_0x4002c2(0x827)],_0x5aec1b,!![]);const _0x5657c2=_0xb396ea?.[_0x4002c2(0x258)]||0x1f4;_0x2aed6e[_0x4002c2(0x3ec)]=_0x5657c2,_0x5657c2===0x19d?_0x2aed6e[_0x4002c2(0x4c5)](_0x4002c2(0x230)):_0x2aed6e[_0x4002c2(0x4c5)](_0xb396ea['message']||_0x4002c2(0x6c6));}};this[_0x3ca316(0x6f9)]=_0xa08726[_0x3ca316(0x47f)](_0x2b06ad=>{const _0x4f3fdb=_0x3ca316,_0x239b22=_0x39cc57[_0x4f3fdb(0x1e2)](_0x518507);_0x239b22['on'](_0x4f3fdb(0x28e),_0x5231a8=>{const _0x314a1e=_0x4f3fdb;this[_0x314a1e(0x80a)]['add'](_0x5231a8),_0x5231a8['on'](_0x314a1e(0x2de),()=>this[_0x314a1e(0x80a)][_0x314a1e(0x591)](_0x5231a8));});if(_0x2b06ad===undefined)_0x239b22[_0x4f3fdb(0x6a1)](_0x5a0008);else _0x239b22[_0x4f3fdb(0x6a1)](_0x5a0008,_0x2b06ad);return _0x239b22;}),this[_0x3ca316(0x6fb)]=this[_0x3ca316(0x6f9)][0x0];for(const _0x26b873 of this['servers'][_0x3ca316(0x6f2)](0x1))_0x26b873['on']('error',_0x5de1cb=>this[_0x3ca316(0x6fb)]?.['emit'](_0x3ca316(0x20b),_0x5de1cb));const _0x21e262=_0x5cb20c(_0x5a0008,_0x5797df[_0x3ca316(0x573)]),_0x128038=this['_okdb'];return _0x128038?.[_0x3ca316(0x8e9)]&&(_0x128038['processes'][_0x3ca316(0x4cd)](_0x21e262),require$$1$1[_0x3ca316(0x5d9)]?_0x128038['_activateProcessesReader']?.({'kind':_0x3ca316(0x28d)})[_0x3ca316(0x520)](()=>{}):_0x128038['_activateProcesses']?.({'kind':_0x3ca316(0x3ce),'listenAddr':_0x21e262})[_0x3ca316(0x520)](()=>{})),this[_0x3ca316(0x6fb)];}async[_0x1b1292(0x2de)](_0x38991c={}){const _0xfb27c4=_0x1b1292,_0x197e43=this[_0xfb27c4(0x6fb)];this[_0xfb27c4(0x6fb)]=null;const _0x2a007b=this[_0xfb27c4(0x6f9)]['includes'](_0x197e43)?this[_0xfb27c4(0x6f9)]:_0x197e43?[_0x197e43]:[];this[_0xfb27c4(0x6f9)]=[];if(_0x197e43&&_0x197e43[_0xfb27c4(0x735)]){try{await _0x197e43[_0xfb27c4(0x2de)]();}catch{}this[_0xfb27c4(0x599)]&&this[_0xfb27c4(0x599)][_0xfb27c4(0x2de)]();return;}if(_0x2a007b[_0xfb27c4(0x744)]){const _0x213585=_0x38991c[_0xfb27c4(0x462)]===Infinity?Infinity:Number[_0xfb27c4(0x29f)](_0x38991c['forceAfterMs'])?Math[_0xfb27c4(0x7d2)](0x0,_0x38991c['forceAfterMs']):0x3e8,_0x24920e=_0x2fcd9a=>new Promise(_0x346a89=>{const _0x3d31c0=_0xfb27c4;let _0xcf2cc5=![],_0x873d33=null,_0x258a67=null;const _0x145758=()=>{if(_0xcf2cc5)return;_0xcf2cc5=!![];if(_0x873d33)clearTimeout(_0x873d33);if(_0x258a67)clearTimeout(_0x258a67);_0x346a89();};try{_0x2fcd9a[_0x3d31c0(0x2de)](_0x145758);}catch{_0x145758();return;}try{_0x2fcd9a[_0x3d31c0(0x73a)]?.();}catch{}if(_0x9ab0f2(_0x213585))return;_0x873d33=setTimeout(()=>{const _0x382449=_0x3d31c0;try{_0x2fcd9a['closeAllConnections']?.();}catch{}for(const _0x3470a9 of this['_sockets']){try{_0x3470a9[_0x382449(0x57d)]();}catch{}}_0x258a67=setTimeout(_0x145758,0x64),_0x258a67[_0x382449(0x69f)]?.();},_0x4f6149(_0x213585)),_0x873d33[_0x3d31c0(0x69f)]?.();});await Promise[_0xfb27c4(0x761)](_0x2a007b['map'](_0x24920e));}this[_0xfb27c4(0x599)]&&this[_0xfb27c4(0x599)][_0xfb27c4(0x2de)]();}[_0x1b1292(0x635)](_0x1acb96,_0x419bd2,_0x1fc7e2=0x36ee80){const _0x593347=_0x1b1292,_0xd9fea4=Date[_0x593347(0x872)](),_0x15f351=Buffer[_0x593347(0x83d)](JSON[_0x593347(0x364)]({'iat':_0xd9fea4,'exp':_0xd9fea4+_0x1fc7e2,..._0x1acb96}))[_0x593347(0x4c0)](_0x593347(0x71b)),_0x5e2967=_0x34ca41(_0x15f351,_0x419bd2);return _0x15f351+'.'+_0x5e2967;}[_0x1b1292(0x814)](_0x2b6b0d,_0x52dce9={}){const _0x4513de=_0x1b1292,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x4513de(0x8c2),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x52dce9;let _0x25a0af=this[_0x4513de(0x7f3)][_0x4513de(0x800)]+'='+_0x2b6b0d;if(httpOnly)_0x25a0af+=_0x4513de(0x5cf);if(sameSite)_0x25a0af+=';\x20SameSite='+sameSite;if(path)_0x25a0af+=_0x4513de(0x5ba)+path;if(secure)_0x25a0af+=';\x20Secure';if(Number[_0x4513de(0x29f)](maxAge))_0x25a0af+=_0x4513de(0x23f)+Math[_0x4513de(0x7d2)](0x0,Math[_0x4513de(0x259)](maxAge));if(expires instanceof Date)_0x25a0af+=_0x4513de(0x408)+expires[_0x4513de(0x71a)]();return _0x25a0af;}[_0x1b1292(0x7dd)](_0x35f2a5=this['auth'][_0x1b1292(0x800)],_0x1be833={}){const _0x126612=_0x1b1292,{path:path='/',sameSite:sameSite=_0x126612(0x8c2),secure:secure=![],httpOnly:httpOnly=!![]}=_0x1be833;let _0x2ce4c4=_0x35f2a5+'=';if(httpOnly)_0x2ce4c4+=';\x20HttpOnly';if(sameSite)_0x2ce4c4+=_0x126612(0x4ec)+sameSite;if(path)_0x2ce4c4+=_0x126612(0x5ba)+path;if(secure)_0x2ce4c4+=_0x126612(0x256);return _0x2ce4c4+=_0x126612(0x634),_0x2ce4c4;}[_0x1b1292(0x6bb)](_0x4ea945,_0x3409c7){const _0x30b501=_0x1b1292;if(!_0x4ea945)return null;const [_0x1a466e,_0x294577]=String(_0x4ea945)['split']('.');if(!_0x1a466e||!_0x294577)return null;const _0x77589e=_0x34ca41(_0x1a466e,_0x3409c7);if(!_0x4f5726(_0x294577,_0x77589e))return null;try{const _0x3ecdfa=JSON[_0x30b501(0x527)](Buffer[_0x30b501(0x83d)](_0x1a466e,_0x30b501(0x71b))['toString']());if(_0x3ecdfa[_0x30b501(0x706)]<=Date[_0x30b501(0x872)]())return null;return _0x3ecdfa;}catch{return null;}}['parseBearer'](_0x16fc98){const _0x1dc355=_0x1b1292;if(this[_0x1dc355(0x645)]?.['auth'])return this[_0x1dc355(0x645)][_0x1dc355(0x7f3)][_0x1dc355(0x5e3)](_0x16fc98);return _0x4f4ec0(_0x16fc98);}[_0x1b1292(0x283)](_0x3dd530){const _0x3590f5=_0x1b1292;if(this[_0x3590f5(0x645)]?.['auth'])return this[_0x3590f5(0x645)][_0x3590f5(0x7f3)]['issueToken'](_0x3dd530);const _0x6eac26=this[_0x3590f5(0x6cd)]?.[_0x3590f5(0x67a)]??0x36ee80,_0x30f206=this[_0x3590f5(0x6cd)]?.[_0x3590f5(0x23b)];return _0x580550(_0x3dd530,_0x30f206,_0x6eac26);}[_0x1b1292(0x261)](_0x51bbd9){const _0x4cbc51=_0x1b1292;if(this[_0x4cbc51(0x645)]?.[_0x4cbc51(0x7f3)])return this[_0x4cbc51(0x645)][_0x4cbc51(0x7f3)][_0x4cbc51(0x261)](_0x51bbd9);const _0x1e7cfc=this[_0x4cbc51(0x6cd)]?.[_0x4cbc51(0x23b)];return _0x2ea7e5(_0x51bbd9,_0x1e7cfc);}async[_0x1b1292(0x7c9)](_0x87dcfb){const _0x260ae3=_0x1b1292;if(this[_0x260ae3(0x645)]?.[_0x260ae3(0x7f3)])return this['_okdb'][_0x260ae3(0x7f3)][_0x260ae3(0x7c9)](_0x87dcfb);if(_0x87dcfb[_0x260ae3(0x729)]?.[_0x260ae3(0x384)]===!![]||this[_0x260ae3(0x674)]==='open')return{'id':_0x260ae3(0x560),'username':_0x260ae3(0x560),'roles':[_0x260ae3(0x875)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':'system','username':_0x260ae3(0x560),'roles':[_0x260ae3(0x875)],'isAuthenticated':!![],'isSystem':!![]}};const _0x478215=this[_0x260ae3(0x5e3)](_0x87dcfb[_0x260ae3(0x612)]?.['authorization']),_0x5296c3=_0x87dcfb[_0x260ae3(0x401)]?.[this['auth'][_0x260ae3(0x800)]],_0x3dd5bc=_0x478215||_0x5296c3;if(!_0x3dd5bc)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x502a71=this[_0x260ae3(0x261)](_0x3dd5bc);if(!_0x502a71)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x4879dd={'id':_0x502a71['sub']??null,'username':_0x502a71[_0x260ae3(0x4ad)]??null,'roles':Array[_0x260ae3(0x2fd)](_0x502a71[_0x260ae3(0x485)])?_0x502a71[_0x260ae3(0x485)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x4879dd['id'],'username':_0x4879dd[_0x260ae3(0x4ad)],'roles':_0x4879dd[_0x260ae3(0x485)],'isAuthenticated':!![],'isSystem':![],'user':_0x4879dd,'claims':_0x502a71,'subject':_0x4879dd['id']};}async[_0x1b1292(0x8bc)](_0x225424,_0x39ddb7={}){const _0x3eb726=_0x1b1292,_0x5c9a64=_0x280278(_0x225424),_0x2b739a=Array['isArray'](_0x39ddb7[_0x3eb726(0x594)])&&_0x39ddb7[_0x3eb726(0x594)]['length']>0x0?_0x39ddb7[_0x3eb726(0x594)]:[_0x3eb726(0x4e4),_0x3eb726(0x84e)],_0x4f0c19=_0x5c9a64['header']?.[_0x3eb726(0x595)];if(!_0x2b739a[_0x3eb726(0x361)](_0x4f0c19))throw new Error(_0x3eb726(0x642)+_0x4f0c19);if(!_0x5c9a64[_0x3eb726(0x1c5)]?.[_0x3eb726(0x432)])throw new Error('JWT\x20is\x20missing\x20kid');const _0x4e207c=await this[_0x3eb726(0x375)](_0x39ddb7);if(!_0x4e207c?.[_0x3eb726(0x8b9)])throw new Error('OIDC\x20discovery\x20missing\x20jwks_uri');const _0x2a9bd6=await this[_0x3eb726(0x7c2)](_0x4e207c[_0x3eb726(0x8b9)],_0x5c9a64[_0x3eb726(0x1c5)]['kid'],_0x39ddb7);if(!_0x2ad727(_0x4f0c19,_0x2a9bd6,_0x5c9a64[_0x3eb726(0x75a)],_0x5c9a64[_0x3eb726(0x7af)]))throw new Error('JWT\x20signature\x20verification\x20failed');const _0x2cfe6a=Math[_0x3eb726(0x259)](Date['now']()/0x3e8),_0x44b7d9=_0x5c9a64[_0x3eb726(0x81f)]||{};if(_0x44b7d9['iss']!==_0x4e207c[_0x3eb726(0x732)])throw new Error(_0x3eb726(0x589));const _0x96a53c=_0x39ddb7[_0x3eb726(0x54a)];if(_0x96a53c){const _0x1fc0a0=_0x22b145(_0x44b7d9[_0x3eb726(0x437)]);if(!_0x1fc0a0[_0x3eb726(0x361)](_0x96a53c))throw new Error('JWT\x20audience\x20mismatch');}if(typeof _0x44b7d9[_0x3eb726(0x706)]!==_0x3eb726(0x1bc)||_0x44b7d9[_0x3eb726(0x706)]<=_0x2cfe6a)throw new Error(_0x3eb726(0x853));if(_0x44b7d9[_0x3eb726(0x5df)]!=null&&_0x44b7d9['nbf']>_0x2cfe6a)throw new Error('JWT\x20not\x20yet\x20valid');if(_0x44b7d9[_0x3eb726(0x5c7)]==='id')throw new Error(_0x3eb726(0x5e2));return{'subject':_0x44b7d9[_0x3eb726(0x7e9)]??null,'email':_0x44b7d9[_0x3eb726(0x518)]??null,'scopes':typeof _0x44b7d9[_0x3eb726(0x8ce)]==='string'?_0x44b7d9[_0x3eb726(0x8ce)][_0x3eb726(0x310)](/\s+/)['filter'](Boolean):[],'claims':_0x44b7d9,'tokenType':_0x3eb726(0x215)};}async[_0x1b1292(0x375)](_0x47d55a={}){const _0x3b08a3=_0x1b1292,_0x305097=String(_0x47d55a[_0x3b08a3(0x732)]||'')[_0x3b08a3(0x798)](/\/+$/,'');if(!_0x305097)return null;const _0x4a974a=Number['isFinite'](_0x47d55a[_0x3b08a3(0x21a)])?_0x47d55a[_0x3b08a3(0x21a)]:0xa*0x3c*0x3e8;if(this[_0x3b08a3(0x5d3)]?.[_0x3b08a3(0x732)]===_0x305097&&this['_oidcDiscoveryCache'][_0x3b08a3(0x481)]>Date[_0x3b08a3(0x872)]())return this[_0x3b08a3(0x5d3)][_0x3b08a3(0x29e)];const _0x51276a=await _0x191d2b(_0x305097+_0x3b08a3(0x296)),_0x11c050={'issuer':_0x51276a[_0x3b08a3(0x732)]||_0x305097,'authorization_endpoint':_0x47d55a[_0x3b08a3(0x8d0)]||_0x51276a[_0x3b08a3(0x318)],'token_endpoint':_0x47d55a['tokenUrl']||_0x51276a[_0x3b08a3(0x715)],'jwks_uri':_0x47d55a[_0x3b08a3(0x79d)]||_0x51276a[_0x3b08a3(0x8b9)]};return this[_0x3b08a3(0x5d3)]={'issuer':_0x305097,'value':_0x11c050,'expiresAt':Date[_0x3b08a3(0x872)]()+_0x4a974a},_0x11c050;}async[_0x1b1292(0x752)](_0x551f52,_0x49bfe0=0x5*0x3c*0x3e8){const _0x8ad45a=_0x1b1292,_0x35e51b=await _0x191d2b(_0x551f52),_0x5b21e7=new Map();for(const _0x300987 of _0x35e51b[_0x8ad45a(0x766)]||[]){if(!_0x300987?.[_0x8ad45a(0x432)])continue;_0x5b21e7[_0x8ad45a(0x486)](_0x300987['kid'],_0x4af272(_0x300987));}return this[_0x8ad45a(0x835)]={'uri':_0x551f52,'keys':_0x5b21e7,'expiresAt':Date[_0x8ad45a(0x872)]()+_0x49bfe0},this[_0x8ad45a(0x835)];}async[_0x1b1292(0x7c2)](_0x4f5ab0,_0x2e4257,_0x5a1a8e={}){const _0x34d3fc=_0x1b1292,_0x4fa1ba=Number[_0x34d3fc(0x29f)](_0x5a1a8e[_0x34d3fc(0x24b)])?_0x5a1a8e[_0x34d3fc(0x24b)]:0x5*0x3c*0x3e8,_0x16a9d8=0x1e*0x3e8,_0x50689d=this[_0x34d3fc(0x221)][_0x34d3fc(0x564)](_0x2e4257);if(_0x50689d!==undefined&&_0x50689d>Date[_0x34d3fc(0x872)]())throw new Error('Unknown\x20JWKS\x20kid:\x20'+_0x2e4257);(!this[_0x34d3fc(0x835)]||this[_0x34d3fc(0x835)][_0x34d3fc(0x3c7)]!==_0x4f5ab0||this['_jwksCache'][_0x34d3fc(0x481)]<=Date[_0x34d3fc(0x872)]())&&await this[_0x34d3fc(0x752)](_0x4f5ab0,_0x4fa1ba);let _0xf1cbd6=this[_0x34d3fc(0x835)]?.[_0x34d3fc(0x766)]?.[_0x34d3fc(0x564)](_0x2e4257);if(_0xf1cbd6)return _0xf1cbd6;await this[_0x34d3fc(0x752)](_0x4f5ab0,_0x4fa1ba),_0xf1cbd6=this[_0x34d3fc(0x835)]?.[_0x34d3fc(0x766)]?.[_0x34d3fc(0x564)](_0x2e4257);if(!_0xf1cbd6){this[_0x34d3fc(0x221)]['set'](_0x2e4257,Date[_0x34d3fc(0x872)]()+_0x16a9d8);throw new Error(_0x34d3fc(0x61f)+_0x2e4257);}return _0xf1cbd6;}[_0x1b1292(0x3d2)](_0x572b5b){const _0x3d8aa7=_0x1b1292;if(this[_0x3d8aa7(0x645)]?.[_0x3d8aa7(0x7f3)])return this[_0x3d8aa7(0x645)][_0x3d8aa7(0x7f3)][_0x3d8aa7(0x3d2)](_0x572b5b);const _0xf998e3=_0x572b5b?.[_0x3d8aa7(0x887)]||{},_0x182b73={'sub':_0x572b5b?.[_0x3d8aa7(0x6b7)]??_0xf998e3['sub']??null,'email':_0x572b5b?.[_0x3d8aa7(0x518)]??_0xf998e3['email']??null,'name':_0x572b5b?.[_0x3d8aa7(0x76e)]??_0xf998e3[_0x3d8aa7(0x76e)]??_0xf998e3[_0x3d8aa7(0x34a)]??null,'groups':_0x572b5b?.[_0x3d8aa7(0x5bf)]??_0xf998e3[_0x3d8aa7(0x5bf)]??[],'roles':_0x572b5b?.['roles']??_0xf998e3[_0x3d8aa7(0x485)]??[]};return{'type':_0x3d8aa7(0x7bc),'tokenType':_0x572b5b?.['tokenType']??_0x3d8aa7(0x215),'subject':_0x182b73[_0x3d8aa7(0x7e9)],'email':_0x182b73[_0x3d8aa7(0x518)],'scopes':_0x572b5b?.[_0x3d8aa7(0x89e)]??_0xf998e3[_0x3d8aa7(0x8ce)]?.[_0x3d8aa7(0x310)]?.('\x20')?.['filter'](Boolean)??[],'claims':_0xf998e3,'user':_0x182b73,'isAuthenticated':!![]};}[_0x1b1292(0x5b1)](_0x4f3b08={},_0x4d548f=0x927c0){const _0x4dbca5=_0x1b1292;if(this[_0x4dbca5(0x645)]?.['auth'])return this['_okdb'][_0x4dbca5(0x7f3)]['createLoginState'](_0x4f3b08,_0x4d548f);const _0x3efb14=_0x229c79(0x18);this[_0x4dbca5(0x333)]['set'](_0x3efb14,{..._0x4f3b08,'exp':Date[_0x4dbca5(0x872)]()+_0x4d548f});if(this[_0x4dbca5(0x333)][_0x4dbca5(0x784)]%0x32===0x0){const _0x1882e8=Date[_0x4dbca5(0x872)]();for(const [_0x27dacb,_0x27d9f1]of this[_0x4dbca5(0x333)]){if(_0x27d9f1['exp']<=_0x1882e8)this[_0x4dbca5(0x333)][_0x4dbca5(0x591)](_0x27dacb);}}return _0x3efb14;}[_0x1b1292(0x693)](_0x3a5339){const _0x251fc7=_0x1b1292;if(this[_0x251fc7(0x645)]?.[_0x251fc7(0x7f3)])return this[_0x251fc7(0x645)][_0x251fc7(0x7f3)][_0x251fc7(0x693)](_0x3a5339);if(!_0x3a5339)return null;const _0x4dbe10=this[_0x251fc7(0x333)][_0x251fc7(0x564)](_0x3a5339);this[_0x251fc7(0x333)][_0x251fc7(0x591)](_0x3a5339);if(!_0x4dbe10)return null;if(_0x4dbe10[_0x251fc7(0x706)]<=Date[_0x251fc7(0x872)]())return null;return _0x4dbe10;}}function _0x14425f(_0x3a1821){const _0x3470ac=_0x1b1292;if(_0x3a1821==null)return{'status':0xcc};if(Buffer[_0x3470ac(0x541)](_0x3a1821)||_0x26bb27(_0x3a1821))return{'status':0xc8,'body':_0x3a1821};if(typeof _0x3a1821===_0x3470ac(0x6ce)&&_0x3470ac(0x258)in _0x3a1821){if(!(_0x3470ac(0x6fd)in _0x3a1821)&&!_0x26bb27(_0x3a1821['body'])){const {status:_0x441bee,headers:_0x46148a,..._0x218344}=_0x3a1821;if(Object[_0x3470ac(0x766)](_0x218344)['length']>0x0)return{'status':_0x441bee,'headers':_0x46148a,'body':_0x218344};}return _0x3a1821;}return{'status':0xc8,'body':_0x3a1821};}function _0x26bb27(_0x33eb90){const _0x56a48b=_0x1b1292;return _0x33eb90&&typeof _0x33eb90[_0x56a48b(0x23a)]==='function';}function _0x1595e2(_0xb9eabc,_0x5b939d){const _0x5527b0=_0x1b1292,{PassThrough:_0x28a3cf}=require$$5;let _0x564c4f=0x0,_0x137a34=![];const _0x31a9f2=new _0x28a3cf();return _0xb9eabc['on'](_0x5527b0(0x59c),_0x4fe901=>{const _0x60e250=_0x5527b0;if(_0x137a34)return;_0x564c4f+=_0x4fe901[_0x60e250(0x744)];if(_0x564c4f>_0x5b939d){_0x137a34=!![];const _0x18e2c7=new Error(_0x60e250(0x230));_0x18e2c7[_0x60e250(0x258)]=0x19d,_0x31a9f2[_0x60e250(0x57d)](_0x18e2c7);return;}if(!_0x31a9f2[_0x60e250(0x35e)])_0x31a9f2[_0x60e250(0x5bb)](_0x4fe901);}),_0xb9eabc['on'](_0x5527b0(0x4c5),()=>{const _0x5d5a4d=_0x5527b0;!_0x137a34&&!_0x31a9f2['destroyed']&&(_0x137a34=!![],_0x31a9f2[_0x5d5a4d(0x4c5)]());}),_0xb9eabc['on'](_0x5527b0(0x20b),_0x375b18=>{const _0x3edf70=_0x5527b0;if(!_0x31a9f2['destroyed'])_0x31a9f2[_0x3edf70(0x57d)](_0x375b18);}),_0xb9eabc['pause'](),_0x31a9f2['on'](_0x5527b0(0x7a1),()=>{const _0x132ecb=_0x5527b0;if(!_0x31a9f2[_0x132ecb(0x35e)])_0xb9eabc[_0x132ecb(0x7a1)]();}),_0x31a9f2;}function _0x3c3af4(_0x41efee,_0x905dd0){const _0x428a7c=_0x1b1292;if(_0x41efee[_0x428a7c(0x827)]===_0x428a7c(0x2ac)||_0x41efee[_0x428a7c(0x827)]===_0x428a7c(0x3c1))return null;const _0x5090a6=_0x41efee[_0x428a7c(0x612)]?.['content-length'];if(_0x5090a6!=null){const _0x393961=Number(_0x5090a6);if(Number['isFinite'](_0x393961)&&_0x393961>_0x905dd0){const _0x54dfe4=new Error(_0x428a7c(0x230));_0x54dfe4[_0x428a7c(0x258)]=0x19d;throw _0x54dfe4;}}return new Promise((_0x187ec7,_0x261674)=>{const _0xed5cd7=_0x428a7c;let _0x304afb='',_0x3fcc4b=0x0;_0x41efee['on']('data',_0x511486=>{const _0x3899ff=_0x223d;_0x3fcc4b+=_0x511486[_0x3899ff(0x744)];if(_0x3fcc4b>_0x905dd0){try{_0x41efee[_0x3899ff(0x57d)]();}catch{}const _0x5617c7=new Error(_0x3899ff(0x230));_0x5617c7['status']=0x19d,_0x261674(_0x5617c7);return;}_0x304afb+=_0x511486;}),_0x41efee['on'](_0xed5cd7(0x4c5),()=>{const _0xcc9b0e=_0xed5cd7;if(!_0x304afb)return _0x187ec7(null);const _0x2e551f=_0x41efee[_0xcc9b0e(0x612)]?.['content-type']||'';if(_0x2e551f['includes'](_0xcc9b0e(0x386))){const _0x29f6fb={};for(const [_0x2dafbf,_0x6427e8]of new URLSearchParams(_0x304afb))_0x29f6fb[_0x2dafbf]=_0x6427e8;return _0x187ec7(_0x29f6fb);}try{_0x187ec7(JSON['parse'](_0x304afb));}catch(_0x5ced89){_0x261674(_0x5ced89);}}),_0x41efee['on'](_0xed5cd7(0x20b),_0x261674);});}function _0xf35098(_0x30e4e1,_0x235988){const _0x253234=_0x1b1292,{status:status=0xc8,headers:headers={},body:_0xbef908}=_0x235988;_0x30e4e1[_0x253234(0x3ec)]=status;for(const [_0x3bc307,_0x1aa922]of Object[_0x253234(0x7fb)](headers)){_0x30e4e1[_0x253234(0x4f0)](_0x3bc307,_0x1aa922);}if(_0xbef908==null){_0x30e4e1['end']();return;}if(_0x26bb27(_0xbef908)){_0xbef908[_0x253234(0x23a)](_0x30e4e1);return;}if(Buffer[_0x253234(0x541)](_0xbef908)){_0x30e4e1[_0x253234(0x4c5)](_0xbef908);return;}if(typeof _0xbef908===_0x253234(0x6ce)){!_0x30e4e1[_0x253234(0x509)]('Content-Type')&&_0x30e4e1[_0x253234(0x4f0)](_0x253234(0x85c),'application/json');_0x30e4e1[_0x253234(0x4c5)](JSON[_0x253234(0x364)](_0xbef908));return;}_0x30e4e1['end'](String(_0xbef908));}function _0x5cb20c(_0x4a333e,_0x3da8b0){const _0x5a6b45=_0x1b1292;if(_0x3da8b0==null)return':'+_0x4a333e;return[][_0x5a6b45(0x3e4)](_0x3da8b0)[_0x5a6b45(0x47f)](_0x30f948=>(_0x30f948['includes'](':')?'['+_0x30f948+']':_0x30f948)+':'+_0x4a333e)[_0x5a6b45(0x4e8)](',\x20');}return okdbHttp[_0x1b1292(0x87e)]=_0x18fe1b,okdbHttp[_0x1b1292(0x87e)][_0x1b1292(0x8be)]=_0x5cb20c,okdbHttp[_0x1b1292(0x87e)][_0x1b1292(0x68b)]=_0x2a6b18,okdbHttp[_0x1b1292(0x87e)];}var okdbShmSegment,hasRequiredOkdbShmSegment;function requireOkdbShmSegment(){const _0x3ab17c=_0x55b176;if(hasRequiredOkdbShmSegment)return okdbShmSegment;hasRequiredOkdbShmSegment=0x1;const _0xfd58d1=require$$0$1,_0x3e0c1f=require$$2$1,_0x45a94b=0x80,_0x391ad5=0x0,_0x2265e4=0x1,_0x28e46c=0x2,_0x3f0027=0x3,_0x387cb5=0x4,_0x202ab8=_0x387cb5+_0x45a94b,_0x4c56e6=_0x202ab8+_0x45a94b,_0x319283=require$$2$2['threadId'],_0x11bbf7=_0x4c56e6*0x4,_0x466042=process[_0x3ab17c(0x7b7)]!=='win32',_0x432376=0xc,_0x48230c=process['platform']===_0x3ab17c(0x203)?0x1f:0xa0,_0x4421b8=/^[A-Za-z0-9-]+(?:_boot)?$/,_0x238739=/^[A-Za-z0-9-]*-[0-9a-f]{12}(?:_boot)?$/,_0x4881e2=_0x16cf84=>_0x16cf84[_0x3ab17c(0x798)](/[^a-zA-Z0-9]/g,'-');function _0x3b3841(_0x2bd2ec,_0x512fd7=''){const _0x38639d=_0x3ab17c;if(typeof _0x2bd2ec!==_0x38639d(0x7a6)||_0x2bd2ec==='')throw new TypeError('segmentNameFor:\x20canonicalPath\x20must\x20be\x20a\x20non-empty\x20string');if(_0x512fd7!==''&&!/^_[A-Za-z0-9]+$/[_0x38639d(0x52a)](_0x512fd7))throw new TypeError(_0x38639d(0x542)+JSON[_0x38639d(0x364)](_0x512fd7)+')');const _0x3c4e06=_0x3e0c1f[_0x38639d(0x2e9)](_0x38639d(0x1be))[_0x38639d(0x528)](_0x2bd2ec)['digest'](_0x38639d(0x4d4))[_0x38639d(0x6f2)](0x0,_0x432376),_0x12cbd1=Math[_0x38639d(0x7d2)](0x0,_0x48230c-0x1-_0x432376-_0x512fd7[_0x38639d(0x744)]);return _0x4881e2(_0x2bd2ec)[_0x38639d(0x6f2)](0x0,_0x12cbd1)+'-'+_0x3c4e06+_0x512fd7;}function _0x92f1e7(_0x3103b8,_0x4113c2=''){return''+_0x4881e2(_0x3103b8)+_0x4113c2;}function _0x34fcb9(_0x5ae6a7){const _0x4b5c25=_0x3ab17c;if(_0x238739[_0x4b5c25(0x52a)](_0x5ae6a7))return _0x4b5c25(0x2b9);if(_0x4421b8[_0x4b5c25(0x52a)](_0x5ae6a7))return'legacy';return null;}const _0x5e7b74={'onMapped':null,'onClaimed':null,'onRetiring':null},_0x127f80=_0x4bba26=>Math[_0x3ab17c(0x775)](_0x4bba26/0x8)*0x8,_0x133dbe=_0xdc8236=>_0x127f80(_0xdc8236)+_0x11bbf7;function _0x2a5e6e(_0x478553){const _0x1be68d=_0x3ab17c;try{return process['kill'](_0x478553,0x0),![];}catch(_0x2cc3d2){return _0x2cc3d2[_0x1be68d(0x247)]==='ESRCH';}}const _0x5d36f4=new Int32Array(new SharedArrayBuffer(0x4));function _0x564644(_0x253356){const _0x381e7b=_0x3ab17c;if(_0x253356>0x0)Atomics[_0x381e7b(0x350)](_0x5d36f4,0x0,0x0,_0x253356);}function _0x220464(_0x1ad360,_0x4b10df){const _0x4f5db0=_0x3ab17c;if(process[_0x4f5db0(0x7b7)]!==_0x4f5db0(0x722))return;let _0x463325;try{_0x463325=_0xfd58d1[_0x4f5db0(0x59e)](_0x4f5db0(0x8ca)+_0x1ad360,'r+');if(_0xfd58d1['fstatSync'](_0x463325)['size']<_0x4b10df)_0xfd58d1[_0x4f5db0(0x627)](_0x463325,_0x4b10df);}catch{}finally{if(_0x463325!==undefined)try{_0xfd58d1[_0x4f5db0(0x339)](_0x463325);}catch{}}}function _0x35343b(_0x27533b,_0x33c835){const _0x30ef64=_0x3ab17c,_0x496a02=require$$3$2;for(let _0x5685cc=0x0;;_0x5685cc++){try{return _0x496a02[_0x30ef64(0x35f)](_0x27533b,_0x33c835);}catch(_0x420108){if(_0x5685cc>=0x3e8||!/No such file or directory/[_0x30ef64(0x52a)](_0x420108?.['message']??''))throw _0x420108;}}}function _0x2c6192(_0x17d80e,_0x4895b3){const _0x5754bb=_0x3ab17c,_0x5dc073=_0x133dbe(_0x4895b3),_0x5ea1c9=_0x35343b(_0x17d80e,_0x5dc073);_0x220464(_0x17d80e,_0x5dc073);if(_0x5ea1c9['byteLength']<_0x5dc073)throw new Error(_0x5754bb(0x79e)+_0x17d80e+':\x20mapped\x20'+_0x5ea1c9['byteLength']+'\x20<\x20'+_0x5dc073+_0x5754bb(0x6f6));return{'sab':_0x5ea1c9,'hdr':new Int32Array(_0x5ea1c9,_0x127f80(_0x4895b3),_0x4c56e6)};}function _0x5aa17e(_0x4572ad){const _0x1c9074=_0x3ab17c;try{require(_0x1c9074(0x365))[_0x1c9074(0x2de)](_0x4572ad);}catch{}}function _0x2bbe4e(_0xabca04){const _0x20a6e3=_0x3ab17c;try{require(_0x20a6e3(0x365))['unlink'](_0xabca04);}catch{}}function _0x156493(_0x5a159e){const _0x5c0dbd=_0x3ab17c;if(Atomics['load'](_0x5a159e,_0x28e46c)!==0x0&&Atomics['load'](_0x5a159e,_0x3f0027)!==0x0)return;const _0x1d0faa=_0x3e0c1f['randomBytes'](0x8),_0x397c98=_0x1d0faa['readInt32LE'](0x0)||0x1,_0x394e12=_0x1d0faa[_0x5c0dbd(0x6cb)](0x4)||0x1;Atomics[_0x5c0dbd(0x341)](_0x5a159e,_0x28e46c,0x0,_0x397c98),Atomics[_0x5c0dbd(0x341)](_0x5a159e,_0x3f0027,0x0,_0x394e12);}function _0x52d809(_0x45e88e){const _0x552ddd=_0x3ab17c,_0x704d7d=process[_0x552ddd(0x27f)];for(let _0x449d30=0x0;_0x449d30<_0x45a94b;_0x449d30++){const _0x1cd3cf=Atomics[_0x552ddd(0x45d)](_0x45e88e,_0x387cb5+_0x449d30);if(_0x1cd3cf===0x0||_0x1cd3cf===_0x704d7d)continue;if(!_0x2a5e6e(_0x1cd3cf))continue;Atomics[_0x552ddd(0x4ac)](_0x45e88e,_0x202ab8+_0x449d30,0x0),Atomics['compareExchange'](_0x45e88e,_0x387cb5+_0x449d30,_0x1cd3cf,0x0);}}function _0x3e646b(_0x18f93f){const _0x43c03e=_0x3ab17c;if(Atomics[_0x43c03e(0x45d)](_0x18f93f,_0x2265e4)!==0x0)return!![];for(let _0x5df9aa=0x0;_0x5df9aa<_0x45a94b;_0x5df9aa++)if(Atomics['load'](_0x18f93f,_0x387cb5+_0x5df9aa)!==0x0)return!![];return![];}function _0x4ee22c(_0x9874b8){const _0x208d97=_0x3ab17c,_0x444972=process['pid'];for(let _0x1a97f7=0x0;_0x1a97f7<0x2;_0x1a97f7++){for(let _0x193970=0x0;_0x193970<_0x45a94b;_0x193970++){if(Atomics[_0x208d97(0x341)](_0x9874b8,_0x387cb5+_0x193970,0x0,_0x444972)===0x0)return Atomics[_0x208d97(0x4ac)](_0x9874b8,_0x202ab8+_0x193970,_0x319283),_0x193970;}_0x52d809(_0x9874b8);}return Atomics[_0x208d97(0x4d2)](_0x9874b8,_0x2265e4,0x1),-0x1;}function _0x34bee1(_0x209c33,_0x3ca579){const _0x1fbd2c=_0x3ab17c;if(_0x3ca579>=0x0)Atomics[_0x1fbd2c(0x4ac)](_0x209c33,_0x202ab8+_0x3ca579,0x0),Atomics[_0x1fbd2c(0x341)](_0x209c33,_0x387cb5+_0x3ca579,process[_0x1fbd2c(0x27f)],0x0);else Atomics['sub'](_0x209c33,_0x2265e4,0x1);}function _0xeea4c0(_0x318c9b,_0x2c4d82,_0x42a84e,_0x28d5f1){const _0x83573a=_0x3ab17c,_0x974639=process['pid'];if(Atomics[_0x83573a(0x341)](_0x42a84e,_0x391ad5,_0x28d5f1,_0x974639)!==_0x28d5f1)return _0x83573a(0x678);const _0x34247c=Atomics[_0x83573a(0x45d)](_0x42a84e,_0x28e46c),_0x3be144=Atomics[_0x83573a(0x45d)](_0x42a84e,_0x3f0027);let _0x13a425;try{_0x13a425=_0x2c6192(_0x318c9b,_0x2c4d82)['hdr'];}catch{return _0x83573a(0x295);}if(Atomics[_0x83573a(0x45d)](_0x13a425,_0x28e46c)!==_0x34247c||Atomics['load'](_0x13a425,_0x3f0027)!==_0x3be144)return _0x83573a(0x295);_0x52d809(_0x42a84e);if(_0x3e646b(_0x42a84e))return Atomics['compareExchange'](_0x42a84e,_0x391ad5,_0x974639,0x0),'revived';return _0x2bbe4e(_0x318c9b),_0x83573a(0x4b8);}function _0x40750e(_0x3c7f6d,_0x186451,{timeoutMs:_0x55ffba}={}){const _0x38428b=_0x3ab17c;_0x55ffba=_0x55ffba??(Number(process.env.OKDB_SHM_ATTACH_TIMEOUT_MS)||0x7530);const _0x22bb2c=process[_0x38428b(0x27f)],_0x2efbf3=Date['now']()+_0x55ffba;for(let _0x3b1148=0x0;;_0x3b1148++){const {sab:_0x1ad5ca,hdr:_0x6a9d70}=_0x2c6192(_0x3c7f6d,_0x186451);_0x5e7b74[_0x38428b(0x7d8)]?.(_0x3c7f6d,_0x3b1148),_0x156493(_0x6a9d70);const _0x1b596b=_0x4ee22c(_0x6a9d70);_0x5e7b74[_0x38428b(0x217)]?.(_0x3c7f6d,_0x3b1148);const _0x286d31=Atomics[_0x38428b(0x45d)](_0x6a9d70,_0x391ad5);if(_0x286d31===0x0||!_0x466042){if(_0x3b1148===0x0)_0x52d809(_0x6a9d70);return{'sab':_0x1ad5ca,'hdr':_0x6a9d70,'slot':_0x1b596b};}_0x34bee1(_0x6a9d70,_0x1b596b);if(_0x286d31!==_0x22bb2c&&_0x2a5e6e(_0x286d31))_0xeea4c0(_0x3c7f6d,_0x186451,_0x6a9d70,_0x286d31);_0x5aa17e(_0x3c7f6d);if(Date['now']()>_0x2efbf3){const {OKDBError:_0x319715}=requireOkdbError();throw new _0x319715(_0x38428b(0x5f8)+_0x3c7f6d+_0x38428b(0x8d3)+_0x55ffba+_0x38428b(0x51a)+_0x286d31+');\x20'+'stop\x20every\x20okdb\x20process\x20on\x20this\x20path\x20and\x20run\x20`okdb\x20shm-gc`.','SHM_SEGMENT_RETIRING');}_0x564644(_0x3b1148<0x14?0x0:0x1);}}function _0x5a91a0(_0x25fc29,_0x546344,_0x931af3,_0x5a9ea5){const _0x3b2253=_0x3ab17c,{hdr:_0x44c65d,slot:_0x37cdd4}=_0x931af3;if(_0x37cdd4!==null)_0x34bee1(_0x44c65d,_0x37cdd4);let _0x2149af=![];try{if(!_0x466042)return![];const _0x5589ae=process['pid'];_0x52d809(_0x44c65d);if(_0x3e646b(_0x44c65d)||_0x5a9ea5?.(_0x931af3[_0x3b2253(0x4a9)]))return![];if(Atomics[_0x3b2253(0x341)](_0x44c65d,_0x391ad5,0x0,_0x5589ae)!==0x0)return![];let _0x494c6a=!![];try{_0x5e7b74[_0x3b2253(0x418)]?.(_0x25fc29),!_0x3e646b(_0x44c65d)&&!_0x5a9ea5?.(_0x931af3[_0x3b2253(0x4a9)])&&(_0x494c6a=![],_0x2bbe4e(_0x25fc29),_0x2149af=!![]);}finally{if(_0x494c6a)Atomics['compareExchange'](_0x44c65d,_0x391ad5,_0x5589ae,0x0);}return _0x2149af;}finally{_0x5aa17e(_0x25fc29);}}function _0x15c86a(_0x5125d3,_0x4b2dfa,{isBusy:_0x1337d6}={}){const _0x373095=_0x3ab17c,_0x1c92d9=process[_0x373095(0x27f)],{sab:_0x12d5aa,hdr:_0x576c11}=_0x2c6192(_0x5125d3,_0x4b2dfa);try{_0x52d809(_0x576c11);const _0x4f5c8b=Atomics['load'](_0x576c11,_0x391ad5);if(_0x4f5c8b!==0x0){if(_0x4f5c8b===_0x1c92d9||!_0x2a5e6e(_0x4f5c8b))return _0x373095(0x8c6);return _0xeea4c0(_0x5125d3,_0x4b2dfa,_0x576c11,_0x4f5c8b);}if(_0x3e646b(_0x576c11))return _0x373095(0x86b);if(_0x1337d6?.(_0x12d5aa))return'busy';if(Atomics['compareExchange'](_0x576c11,_0x391ad5,0x0,_0x1c92d9)!==0x0)return _0x373095(0x8c6);if(_0x3e646b(_0x576c11)||_0x1337d6?.(_0x12d5aa))return Atomics['compareExchange'](_0x576c11,_0x391ad5,_0x1c92d9,0x0),_0x373095(0x86b);return _0x2bbe4e(_0x5125d3),_0x373095(0x4b8);}finally{_0x5aa17e(_0x5125d3);}}const _0x3a8ed9=new Map(),_0x3a8427=new Set();function _0x226b6a(_0x46ee45){const _0x106a32=_0x3ab17c,_0x4f16ff=process['pid'];for(let _0x4eee47=0x0;_0x4eee47<_0x45a94b;_0x4eee47++){if(Atomics[_0x106a32(0x45d)](_0x46ee45,_0x387cb5+_0x4eee47)===_0x4f16ff&&Atomics[_0x106a32(0x45d)](_0x46ee45,_0x202ab8+_0x4eee47)!==_0x319283)return!![];}return![];}function _0x59d5bb(_0x2919ea,_0x34d92c,_0x111743={}){const _0x402197=_0x3ab17c;let _0x3132fd=_0x3a8ed9[_0x402197(0x564)](_0x2919ea);if(!_0x3132fd){const _0x4b9f6a=_0x40750e(_0x2919ea,_0x34d92c,_0x111743);_0x3132fd={'att':_0x4b9f6a,'dataBytes':_0x34d92c,'refs':0x0,'isBusy':_0x111743['isBusy']??null,'onThreadExit':_0x111743['onThreadExit']??null},_0x3a8ed9[_0x402197(0x486)](_0x2919ea,_0x3132fd);}if(_0x111743[_0x402197(0x442)])_0x3132fd[_0x402197(0x442)]=_0x111743['isBusy'];if(_0x111743[_0x402197(0x52b)])_0x3132fd[_0x402197(0x52b)]=_0x111743[_0x402197(0x52b)];_0x3132fd['refs']++;let _0x5d29ed=![];return{'sab':_0x3132fd[_0x402197(0x5fc)][_0x402197(0x4a9)],'name':_0x2919ea,'release'(){const _0xd6a575=_0x402197;if(_0x5d29ed)return![];_0x5d29ed=!![];if(--_0x3132fd[_0xd6a575(0x250)]>0x0)return![];if(_0x3a8ed9[_0xd6a575(0x564)](_0x2919ea)===_0x3132fd)_0x3a8ed9[_0xd6a575(0x591)](_0x2919ea);const _0x54a862=_0x5a91a0(_0x2919ea,_0x3132fd[_0xd6a575(0x8bb)],_0x3132fd[_0xd6a575(0x5fc)],_0x3132fd[_0xd6a575(0x442)]);!_0x54a862&&_0x466042&&_0x226b6a(_0x3132fd['att'][_0xd6a575(0x214)])&&_0x3a8427['add']({'name':_0x2919ea,'dataBytes':_0x3132fd[_0xd6a575(0x8bb)],'att':{..._0x3132fd[_0xd6a575(0x5fc)],'slot':null},'isBusy':_0x3132fd['isBusy'],'onThreadExit':_0x3132fd[_0xd6a575(0x52b)]});if(_0x3a8427[_0xd6a575(0x784)])_0x4a14f3();return _0x54a862;}};}function _0x308091(_0x38ca1b){const _0xa3115c=_0x3ab17c;if(!(_0x38ca1b>0x0))return 0x0;const _0x14caf9=process[_0xa3115c(0x27f)];let _0x271fb2=0x0;const _0x201cac=({att:_0x124f27,onThreadExit:_0x5531fd})=>{const _0x229e71=_0xa3115c;try{_0x5531fd?.(_0x124f27['sab'],_0x38ca1b);}catch{}const {hdr:_0x5dda34}=_0x124f27;for(let _0x4e3d1d=0x0;_0x4e3d1d<_0x45a94b;_0x4e3d1d++){if(Atomics[_0x229e71(0x45d)](_0x5dda34,_0x387cb5+_0x4e3d1d)!==_0x14caf9||Atomics[_0x229e71(0x45d)](_0x5dda34,_0x202ab8+_0x4e3d1d)!==_0x38ca1b)continue;Atomics[_0x229e71(0x4ac)](_0x5dda34,_0x202ab8+_0x4e3d1d,0x0);if(Atomics[_0x229e71(0x341)](_0x5dda34,_0x387cb5+_0x4e3d1d,_0x14caf9,0x0)===_0x14caf9)_0x271fb2++;}};for(const _0x4f56d0 of _0x3a8ed9[_0xa3115c(0x5fb)]())_0x201cac(_0x4f56d0);for(const _0x1531a3 of _0x3a8427)_0x201cac(_0x1531a3);return _0x4a14f3(),_0x271fb2;}function _0x4a14f3(){const _0x235089=_0x3ab17c;for(const _0xc5f04d of[..._0x3a8427]){if(_0x226b6a(_0xc5f04d[_0x235089(0x5fc)][_0x235089(0x214)]))continue;_0x3a8427['delete'](_0xc5f04d),_0x5a91a0(_0xc5f04d[_0x235089(0x76e)],_0xc5f04d[_0x235089(0x8bb)],_0xc5f04d[_0x235089(0x5fc)],_0xc5f04d[_0x235089(0x442)]);}}return okdbShmSegment={'attachSegment':_0x59d5bb,'releaseThreadSlots':_0x308091,'segmentNameFor':_0x3b3841,'legacySegmentNameFor':_0x92f1e7,'segmentNameStyle':_0x34fcb9,'SEG_NAME_MAX':_0x48230c,'retireIfUnused':_0x15c86a,'totalBytes':_0x133dbe,'headerOffset':_0x127f80,'MAX_SLOTS':_0x45a94b,'_attachRaw':_0x40750e,'_detachRaw':_0x5a91a0,'_takeover':_0xeea4c0,'_mapByName':_0x2c6192,'_hooks':_0x5e7b74,'_registry':_0x3a8ed9,'_lingering':_0x3a8427,'_H':{'STATE':_0x391ad5,'OVERFLOW':_0x2265e4,'NONCE_A':_0x28e46c,'NONCE_B':_0x3f0027,'SLOTS':_0x387cb5,'TIDS':_0x202ab8}},okdbShmSegment;}var okdbShmGc,hasRequiredOkdbShmGc;function requireOkdbShmGc(){const _0x207156=_0x55b176;if(hasRequiredOkdbShmGc)return okdbShmGc;hasRequiredOkdbShmGc=0x1;const _0x5b7784=require$$0$1,_0xde02e7=require$$1,_0x3ad155=_0x207156(0x76f),_0x3c945b=0x18+0x3*0x100*0x4,_0x2befe4=0x18+0x2*0x100*0x4,_0x273169=0xc;function _0x1884dc(){const {totalBytes:_0x10f7a5}=requireOkdbShmSegment();return new Set([0x0,0x8,0x18,_0x2befe4,_0x273169,_0x10f7a5(_0x2befe4),_0x10f7a5(_0x3c945b),_0x10f7a5(_0x273169)]);}function _0x31f611(_0x6a56b3,_0x5f1957,_0x1b8526){const _0x24b66b=_0x207156,{totalBytes:_0x2f0ae3}=requireOkdbShmSegment();if(_0x6a56b3['endsWith'](_0x24b66b(0x1e3))||_0x5f1957===_0x273169||_0x5f1957===_0x2f0ae3(_0x273169))return _0x273169;if(_0x5f1957===_0x2f0ae3(_0x3c945b))return _0x3c945b;if(_0x5f1957===_0x2f0ae3(_0x2befe4))return _0x2befe4;return _0x1b8526==='hashed'?_0x3c945b:_0x2befe4;}function _0x5ba30f(){const _0x294357=_0x207156,_0x2eb6d3=new Set(),_0x54af96=[],_0x303b54=_0x3ad155+'/';let _0x360206;try{_0x360206=_0x5b7784[_0x294357(0x205)](_0x294357(0x70f))[_0x294357(0x7d3)](_0x15f9dc=>/^\d+$/['test'](_0x15f9dc));}catch{throw new Error(_0x294357(0x322));}for(const _0x389fe0 of _0x360206){const _0x16cbfc=_0xde02e7['join']('/proc',_0x389fe0);let _0x358187=!![];try{const _0x5b0e9d=_0x5b7784['readFileSync'](_0xde02e7['join'](_0x16cbfc,_0x294357(0x354)),_0x294357(0x758));let _0x44c856=_0x5b0e9d['indexOf'](_0x303b54);while(_0x44c856!==-0x1){const _0x22f31c=_0x5b0e9d[_0x294357(0x562)]('\x0a',_0x44c856),_0x21a315=_0x5b0e9d[_0x294357(0x6f2)](_0x44c856+_0x303b54['length'],_0x22f31c===-0x1?undefined:_0x22f31c);if(!_0x21a315['endsWith'](_0x294357(0x1fe)))_0x2eb6d3[_0x294357(0x4d2)](_0x21a315);_0x44c856=_0x5b0e9d[_0x294357(0x562)](_0x303b54,_0x44c856+0x1);}}catch(_0x3c6b9e){if(_0x3c6b9e[_0x294357(0x247)]!==_0x294357(0x7c6)&&_0x3c6b9e[_0x294357(0x247)]!==_0x294357(0x1e1))_0x358187=![];}try{for(const _0x5711d8 of _0x5b7784[_0x294357(0x205)](_0xde02e7['join'](_0x16cbfc,'fd'))){let _0x2e044e;try{_0x2e044e=_0x5b7784[_0x294357(0x8b4)](_0xde02e7[_0x294357(0x4e8)](_0x16cbfc,'fd',_0x5711d8));}catch{continue;}if(_0x2e044e[_0x294357(0x3b2)](_0x303b54)&&!_0x2e044e[_0x294357(0x43f)]('\x20(deleted)'))_0x2eb6d3[_0x294357(0x4d2)](_0x2e044e[_0x294357(0x6f2)](_0x303b54[_0x294357(0x744)]));}}catch(_0x510bf8){if(_0x510bf8[_0x294357(0x247)]!==_0x294357(0x7c6)&&_0x510bf8[_0x294357(0x247)]!==_0x294357(0x1e1))_0x358187=![];}if(!_0x358187){let _0x205fe3=null;try{_0x205fe3=_0x5b7784[_0x294357(0x77f)](_0x16cbfc)[_0x294357(0x2cd)];}catch{}let _0x51bf9b='?';try{_0x51bf9b=_0x5b7784[_0x294357(0x449)](_0xde02e7['join'](_0x16cbfc,_0x294357(0x60f)),_0x294357(0x758))[_0x294357(0x44e)]();}catch{}if(_0x205fe3!==null)_0x54af96[_0x294357(0x5bb)]({'pid':Number(_0x389fe0),'uid':_0x205fe3,'comm':_0x51bf9b});}}return{'inUse':_0x2eb6d3,'unreadable':_0x54af96};}function _0x528abe({prefix:prefix=_0x207156(0x434),dryRun:dryRun=![],anySize:anySize=![],force:force=![],log:log=()=>{}}={}){const _0x241570=_0x207156;if(process[_0x241570(0x7b7)]!==_0x241570(0x722)||!_0x5b7784['existsSync'](_0x3ad155))throw new Error(_0x241570(0x524));const _0x9a58d6=process['getuid'](),_0x98db3f=_0x9a58d6===0x0,_0x97e416=_0x1884dc(),{inUse:_0x18e9d2,unreadable:_0x54651e}=_0x5ba30f(),_0x1eac79=_0x54651e[_0x241570(0x7d3)](_0x2d1c79=>_0x98db3f||_0x2d1c79[_0x241570(0x2cd)]===_0x9a58d6),_0x317fa7={'dryRun':dryRun,'prefix':prefix,'scanned':0x0,'matched':0x0,'inUse':0x0,'notOkdbShaped':0x0,'foreignOwner':0x0,'candidates':0x0,'candidatesLegacyNamed':0x0,'candidateBytes':0x0,'candidateAllocated':0x0,'deleted':0x0,'deletedAllocated':0x0,'skippedByProtocol':0x0,'errors':0x0,'unreadablePids':_0x54651e[_0x241570(0x744)],'blindPids':_0x1eac79[_0x241570(0x47f)](_0xb73965=>_0xb73965[_0x241570(0x27f)]),'blindCommands':_0x248701(_0x1eac79)};if(_0x1eac79[_0x241570(0x744)]&&!dryRun&&!force)throw new Error(_0x241570(0x3ae)+_0x1eac79[_0x241570(0x744)]+_0x241570(0x5b5)+(_0x241570(0x3da)+_0x317fa7[_0x241570(0x585)]+').\x20If\x20none\x20of\x20them\x20runs\x20okdb,\x20pass\x20--force;\x20')+_0x241570(0x451));const {retireIfUnused:_0xb1099d,segmentNameStyle:_0x16a4d5,_registry:_0x27c22e}=requireOkdbShmSegment();let _0x48fb90=null;if(!dryRun)try{require('v8')[_0x241570(0x243)](_0x241570(0x1bb)),_0x48fb90=require('vm')[_0x241570(0x1fa)]('gc');}catch{}const _0x37033d=_0x5b7784[_0x241570(0x546)](_0x3ad155);try{let _0xe717ad,_0x4bd63f=0x0;while(_0xe717ad=_0x37033d[_0x241570(0x61b)]()){_0x317fa7['scanned']++;const _0x5569f0=_0xe717ad[_0x241570(0x76e)];if(!_0x5569f0['startsWith'](prefix))continue;_0x317fa7[_0x241570(0x34d)]++;if(_0x27c22e[_0x241570(0x5d6)](_0x5569f0)){_0x317fa7[_0x241570(0x7a8)]++;continue;}if(_0x18e9d2[_0x241570(0x5d6)](_0x5569f0)){_0x317fa7[_0x241570(0x7a8)]++;continue;}let _0xe41c7d;try{_0xe41c7d=_0x5b7784[_0x241570(0x5db)](_0xde02e7[_0x241570(0x4e8)](_0x3ad155,_0x5569f0));}catch{continue;}if(!_0xe41c7d[_0x241570(0x7ce)]())continue;const _0x36c7a2=_0x16a4d5(_0x5569f0);if(!_0x36c7a2||!anySize&&!_0x97e416['has'](_0xe41c7d[_0x241570(0x784)])){_0x317fa7['notOkdbShaped']++;continue;}if(!_0x98db3f&&_0xe41c7d[_0x241570(0x2cd)]!==_0x9a58d6){_0x317fa7[_0x241570(0x567)]++;continue;}_0x317fa7['candidates']++;if(_0x36c7a2===_0x241570(0x1f4))_0x317fa7[_0x241570(0x23e)]++;_0x317fa7[_0x241570(0x46a)]+=_0xe41c7d[_0x241570(0x784)],_0x317fa7[_0x241570(0x2b4)]+=_0xe41c7d[_0x241570(0x312)]*0x200;if(dryRun)continue;const _0x2534d2=_0x31f611(_0x5569f0,_0xe41c7d[_0x241570(0x784)],_0x36c7a2);try{const _0x5ba344=_0xb1099d(_0x5569f0,_0x2534d2);_0x5ba344===_0x241570(0x4b8)?(_0x317fa7['deleted']++,_0x317fa7['deletedAllocated']+=_0xe41c7d[_0x241570(0x312)]*0x200):(_0x317fa7['skippedByProtocol']++,log(_0x241570(0x769)+_0x5569f0+':\x20'+_0x5ba344));}catch(_0xec06f1){_0x317fa7[_0x241570(0x3c5)]++,log(_0x241570(0x369)+_0x5569f0+':\x20'+_0xec06f1['message']);}_0x48fb90&&++_0x4bd63f>=0x200&&(_0x4bd63f=0x0,_0x48fb90());}}finally{_0x37033d[_0x241570(0x339)]();}return _0x317fa7;}function _0x248701(_0x41b06e){const _0x2383fc=_0x207156,_0x33b8a8=new Map();for(const _0x28231d of _0x41b06e)_0x33b8a8[_0x2383fc(0x486)](_0x28231d['comm'],(_0x33b8a8['get'](_0x28231d[_0x2383fc(0x60f)])??0x0)+0x1);return[..._0x33b8a8][_0x2383fc(0x47f)](([_0x2f7334,_0x2621d9])=>_0x2621d9>0x1?_0x2f7334+'×'+_0x2621d9:_0x2f7334)[_0x2383fc(0x4e8)](',\x20');}function _0x414d13(_0x3bba67){const _0x9a0f95=_0x207156,_0x38bd4a=['B','KiB',_0x9a0f95(0x3bd),'GiB','TiB'];let _0x3d9ec9=0x0;while(_0x3bba67>=0x400&&_0x3d9ec9<_0x38bd4a[_0x9a0f95(0x744)]-0x1){_0x3bba67/=0x400,_0x3d9ec9++;}return _0x3bba67[_0x9a0f95(0x539)](_0x3d9ec9?0x1:0x0)+'\x20'+_0x38bd4a[_0x3d9ec9];}function _0x550468(_0x4b40ce){const _0x3f50d7=_0x207156,_0x3e71e1=[_0x3f50d7(0x7bd)+(_0x4b40ce[_0x3f50d7(0x501)]?_0x3f50d7(0x4cf):'')+_0x3f50d7(0x380)+JSON[_0x3f50d7(0x364)](_0x4b40ce[_0x3f50d7(0x44f)]),_0x3f50d7(0x81c)+_0x4b40ce['scanned']+_0x3f50d7(0x646)+_0x3ad155,_0x3f50d7(0x864)+_0x4b40ce['matched'],'\x20\x20in\x20use\x20(mapped/fd)\x20'+_0x4b40ce[_0x3f50d7(0x7a8)],_0x3f50d7(0x433)+_0x4b40ce['notOkdbShaped'],_0x3f50d7(0x227)+_0x4b40ce[_0x3f50d7(0x567)],'\x20\x20unused\x20(deletable)\x20'+_0x4b40ce[_0x3f50d7(0x298)]+_0x3f50d7(0x68d)+_0x414d13(_0x4b40ce[_0x3f50d7(0x46a)])+_0x3f50d7(0x609)+_0x414d13(_0x4b40ce[_0x3f50d7(0x2b4)])+_0x3f50d7(0x478)+(_0x4b40ce[_0x3f50d7(0x23e)]?'\x20('+_0x4b40ce[_0x3f50d7(0x23e)]+'\x20named\x20by\x20okdb\x20≤\x202.4.0)':'')];if(!_0x4b40ce[_0x3f50d7(0x501)]){_0x3e71e1['push'](_0x3f50d7(0x5ad)+_0x4b40ce[_0x3f50d7(0x88e)]+_0x3f50d7(0x68d)+_0x414d13(_0x4b40ce['deletedAllocated'])+_0x3f50d7(0x64b));if(_0x4b40ce[_0x3f50d7(0x392)])_0x3e71e1[_0x3f50d7(0x5bb)](_0x3f50d7(0x665)+_0x4b40ce[_0x3f50d7(0x392)]);if(_0x4b40ce['errors'])_0x3e71e1['push'](_0x3f50d7(0x35d)+_0x4b40ce[_0x3f50d7(0x3c5)]);}return _0x4b40ce[_0x3f50d7(0x396)]&&_0x3e71e1[_0x3f50d7(0x5bb)]('\x20\x20note:\x20'+_0x4b40ce[_0x3f50d7(0x396)]+_0x3f50d7(0x8df)+(_0x4b40ce[_0x3f50d7(0x8c5)]['length']?_0x3f50d7(0x68d)+_0x4b40ce[_0x3f50d7(0x8c5)][_0x3f50d7(0x744)]+_0x3f50d7(0x41d)+(_0x4b40ce['blindCommands']+'\x20(deleting\x20requires\x20--force\x20if\x20none\x20of\x20them\x20is\x20okdb)'):_0x3f50d7(0x3eb))),_0x3e71e1[_0x3f50d7(0x4e8)]('\x0a');}function _0x5eceb6(_0x4b98b4){const _0x5b7365=_0x207156,_0x30bf82={'prefix':_0x5b7365(0x434),'dryRun':![],'anySize':![],'force':![],'verbose':![]};for(let _0x27dc97=0x0;_0x27dc97<_0x4b98b4[_0x5b7365(0x744)];_0x27dc97++){const _0x46a6ab=_0x4b98b4[_0x27dc97];if(_0x46a6ab===_0x5b7365(0x52e)||_0x46a6ab==='-n')_0x30bf82[_0x5b7365(0x501)]=!![];else{if(_0x46a6ab==='--any-size')_0x30bf82[_0x5b7365(0x21e)]=!![];else{if(_0x46a6ab===_0x5b7365(0x62e))_0x30bf82[_0x5b7365(0x4bc)]=!![];else{if(_0x46a6ab===_0x5b7365(0x58a)||_0x46a6ab==='-v')_0x30bf82[_0x5b7365(0x822)]=!![];else{if(_0x46a6ab==='--prefix')_0x30bf82[_0x5b7365(0x44f)]=_0x4b98b4[++_0x27dc97]??'';else{if(_0x46a6ab[_0x5b7365(0x3b2)](_0x5b7365(0x200)))_0x30bf82[_0x5b7365(0x44f)]=_0x46a6ab[_0x5b7365(0x6f2)](_0x5b7365(0x200)[_0x5b7365(0x744)]);else{if(_0x46a6ab==='--help'||_0x46a6ab==='-h')_0x30bf82[_0x5b7365(0x228)]=!![];else throw new Error('shm-gc:\x20unknown\x20argument\x20'+_0x46a6ab);}}}}}}}return _0x30bf82;}const _0x392291=_0x207156(0x7e2);function _0x2fc5c3(_0x468a7e){const _0x48a12a=_0x207156;let _0x53888f;try{_0x53888f=_0x5eceb6(_0x468a7e);}catch(_0x1f83c0){return console[_0x48a12a(0x20b)](_0x1f83c0['message']),console[_0x48a12a(0x20b)](_0x392291),0x2;}if(_0x53888f['help'])return console['log'](_0x392291),0x0;const _0x5d8adf=_0x528abe({..._0x53888f,'log':_0x53888f[_0x48a12a(0x822)]?_0x34ca48=>console['log'](_0x34ca48):undefined});return console[_0x48a12a(0x777)](_0x550468(_0x5d8adf)),_0x5d8adf[_0x48a12a(0x3c5)]?0x1:0x0;}return okdbShmGc={'shmGc':_0x528abe,'formatReport':_0x550468,'main':_0x2fc5c3,'scanInUse':_0x5ba30f,'ENV_DATA_BYTES':_0x3c945b,'LEGACY_ENV_DATA_BYTES':_0x2befe4,'BOOT_DATA_BYTES':_0x273169},okdbShmGc;}var hasRequiredOkdb;function requireOkdb(){const _0x40e4c2=_0x55b176;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x40e4c2(0x409)]();}catch{}const _0x18d719=require$$1,_0x30761f=require$$0$1,{resolveWorkers:_0x55017e,isShmbufNative:_0x52ee9d}=requireOkdbWorkers();function _0x237a0d(_0x1c7aee){const _0x5e972d=_0x40e4c2,_0xdd3262=_0x1c7aee[_0x5e972d(0x6f2)](0x2),_0x2cfa7a={};let _0x5c2ff7=0x0;while(_0x5c2ff7<_0xdd3262[_0x5e972d(0x744)]){const _0x3dbccf=_0xdd3262[_0x5c2ff7];if(_0x3dbccf===_0x5e972d(0x4e1)||_0x3dbccf==='-p')_0x2cfa7a[_0x5e972d(0x689)]=Number(_0xdd3262[++_0x5c2ff7]);else{if(_0x3dbccf===_0x5e972d(0x56a)||_0x3dbccf==='-d')_0x2cfa7a[_0x5e972d(0x239)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf===_0x5e972d(0x569)||_0x3dbccf==='-k')_0x2cfa7a[_0x5e972d(0x3ca)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf==='--config'||_0x3dbccf==='-c')_0x2cfa7a[_0x5e972d(0x51d)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf===_0x5e972d(0x7fa))_0x2cfa7a[_0x5e972d(0x655)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf===_0x5e972d(0x49a))_0x2cfa7a['noRepl']=!![];else{if(_0x3dbccf===_0x5e972d(0x55e))_0x2cfa7a[_0x5e972d(0x2ff)]=!![];else{if(_0x3dbccf==='--workers')_0x2cfa7a[_0x5e972d(0x4c4)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf===_0x5e972d(0x4bd))_0x2cfa7a[_0x5e972d(0x896)]=!![];else{if(_0x3dbccf===_0x5e972d(0x504)||_0x3dbccf==='-e')_0x2cfa7a[_0x5e972d(0x264)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf==='--types')_0x2cfa7a[_0x5e972d(0x4f6)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf==='--changes')_0x2cfa7a[_0x5e972d(0x845)]=!![];else{if(_0x3dbccf===_0x5e972d(0x72d))_0x2cfa7a[_0x5e972d(0x683)]=!![];else{if(_0x3dbccf===_0x5e972d(0x229))_0x2cfa7a[_0x5e972d(0x8c9)]=!![];else{if(_0x3dbccf===_0x5e972d(0x544))_0x2cfa7a[_0x5e972d(0x406)]=!![];else{if(_0x3dbccf===_0x5e972d(0x497)){const _0x4a386d=[];while(_0x5c2ff7+0x1<_0xdd3262[_0x5e972d(0x744)]&&!_0xdd3262[_0x5c2ff7+0x1][_0x5e972d(0x3b2)]('--')){_0x4a386d[_0x5e972d(0x5bb)](_0xdd3262[++_0x5c2ff7]);}_0x2cfa7a[_0x5e972d(0x35f)]=_0x4a386d['length']>0x0?_0x4a386d:!![];}else{if(_0x3dbccf===_0x5e972d(0x309))_0x2cfa7a[_0x5e972d(0x759)]=!![];else{if(_0x3dbccf===_0x5e972d(0x36e))_0x2cfa7a[_0x5e972d(0x76e)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf==='--password')_0x2cfa7a[_0x5e972d(0x3cc)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf==='--label')_0x2cfa7a['label']=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf===_0x5e972d(0x826))_0x2cfa7a['permissions']=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf===_0x5e972d(0x7fc))_0x2cfa7a[_0x5e972d(0x78c)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf==='--ttl')_0x2cfa7a[_0x5e972d(0x7d0)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf===_0x5e972d(0x730))_0x2cfa7a[_0x5e972d(0x3d0)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf===_0x5e972d(0x610)||_0x3dbccf==='-u')_0x2cfa7a[_0x5e972d(0x4ad)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf==='--address')_0x2cfa7a[_0x5e972d(0x89f)]=_0xdd3262[++_0x5c2ff7];else{if(_0x3dbccf===_0x5e972d(0x69d)||_0x3dbccf==='-v'){const _0x21537e=require$$3;console[_0x5e972d(0x777)](_0x21537e[_0x5e972d(0x50b)]),process[_0x5e972d(0x633)](0x0);}else(_0x3dbccf===_0x5e972d(0x7b5)||_0x3dbccf==='-h')&&(_0x234d5b(),process[_0x5e972d(0x633)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}}_0x5c2ff7++;}return _0x2cfa7a;}function _0x234d5b(){const _0x156d67=_0x40e4c2;console['log'](_0x156d67(0x6ab));}const _0xb98afc=new Set([_0x40e4c2(0x32f),'info',_0x40e4c2(0x488),_0x40e4c2(0x20b)]);function _0x38d00c(_0x1760b5){const _0xe391f8=_0x40e4c2,_0x4a13f0=_0x1760b5[_0xe391f8(0x51d)]?_0x18d719[_0xe391f8(0x651)](_0x1760b5[_0xe391f8(0x51d)]):_0x18d719[_0xe391f8(0x651)]('.kdbconfig');let _0x53a1d6={};if(_0x30761f[_0xe391f8(0x50f)](_0x4a13f0))try{const _0x4691cd=_0x30761f['readFileSync'](_0x4a13f0,_0xe391f8(0x758))[_0xe391f8(0x798)](/^\uFEFF/,'');_0x53a1d6=JSON[_0xe391f8(0x527)](_0x4691cd),console[_0xe391f8(0x777)](_0xe391f8(0x8ba)+_0x4a13f0);}catch(_0x299157){console['error'](_0xe391f8(0x792)+_0x4a13f0+':\x20'+_0x299157[_0xe391f8(0x262)]),process[_0xe391f8(0x633)](0x1);}const _0xf30572={'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},_0x413040={'port':_0x1760b5[_0xe391f8(0x689)]??_0x53a1d6['port']??_0xf30572[_0xe391f8(0x689)]??0x2124,'dbPath':_0x1760b5[_0xe391f8(0x239)]??_0x53a1d6[_0xe391f8(0x239)]??_0xf30572[_0xe391f8(0x239)]??_0xe391f8(0x455),'key':_0x1760b5[_0xe391f8(0x3ca)]??_0x53a1d6[_0xe391f8(0x3ca)]??_0xf30572[_0xe391f8(0x3ca)]??undefined,'logLevel':_0x1760b5[_0xe391f8(0x655)]??_0x53a1d6['logLevel']??_0xf30572[_0xe391f8(0x655)]??'info','noRepl':_0x1760b5[_0xe391f8(0x68f)]??_0x53a1d6['noRepl']??_0xf30572['noRepl']??![],'noAdmin':_0x1760b5['noAdmin']??_0x53a1d6['noAdmin']??_0xf30572['noAdmin']??![],'admin':_0x53a1d6[_0xe391f8(0x875)]??{},'api':_0x53a1d6['api']??undefined,'auth':_0x53a1d6['auth']??undefined,'mcp':_0x53a1d6['mcp']??undefined,'http':_0x53a1d6[_0xe391f8(0x6e2)]??undefined,'backup':_0x53a1d6[_0xe391f8(0x2b8)]??undefined,'timeMachine':_0x53a1d6[_0xe391f8(0x5dc)]!==![]?_0x53a1d6[_0xe391f8(0x5dc)]??{}:![],'processors':_0x53a1d6['processors'],'engines':_0x53a1d6['engines'],'compaction':_0x53a1d6[_0xe391f8(0x874)]};if(_0x1760b5[_0xe391f8(0x896)])_0x413040[_0xe391f8(0x896)]=!![];if(_0x1760b5[_0xe391f8(0x4c4)]!==undefined)_0x413040[_0xe391f8(0x299)]=_0x1760b5[_0xe391f8(0x4c4)];_0x1760b5[_0xe391f8(0x35f)]!==undefined&&(_0x413040['auth']=_0x413040['auth']||{},_0x413040[_0xe391f8(0x7f3)][_0xe391f8(0x35f)]=_0x1760b5['open']);_0x1760b5['logRequests']&&(_0x413040[_0xe391f8(0x32f)]=_0x413040[_0xe391f8(0x32f)]||{},_0x413040[_0xe391f8(0x32f)]['logRequests']=!![]);(!Number[_0xe391f8(0x699)](_0x413040['port'])||_0x413040['port']<0x1||_0x413040[_0xe391f8(0x689)]>0xffff)&&(console['error'](_0xe391f8(0x61a)+_0x413040[_0xe391f8(0x689)]+_0xe391f8(0x8eb)),process['exit'](0x1));!_0xb98afc[_0xe391f8(0x5d6)](_0x413040[_0xe391f8(0x655)])&&(console['error'](_0xe391f8(0x4a3)+_0x413040['logLevel']+_0xe391f8(0x80f)),process[_0xe391f8(0x633)](0x1));const _0x54528e=_0x413040[_0xe391f8(0x6e2)]?.['host'];_0x54528e!==undefined&&!(typeof _0x54528e===_0xe391f8(0x7a6)&&_0x54528e)&&!(Array['isArray'](_0x54528e)&&_0x54528e[_0xe391f8(0x744)]&&_0x54528e['every'](_0x1423c2=>typeof _0x1423c2===_0xe391f8(0x7a6)&&_0x1423c2))&&(console['error'](_0xe391f8(0x62c)+JSON[_0xe391f8(0x364)](_0x54528e)+_0xe391f8(0x8e0)),process[_0xe391f8(0x633)](0x1));for(const _0xb6db6e of _0x17da0e){_0x413040[_0xb6db6e]!==undefined&&typeof _0x413040[_0xb6db6e]!=='boolean'&&(console['error'](_0xe391f8(0x225)+_0xb6db6e+_0xe391f8(0x6b5)+JSON['stringify'](_0x413040[_0xb6db6e])+_0xe391f8(0x672)),process[_0xe391f8(0x633)](0x1));}return _0x413040;}const _0x17da0e=[_0x40e4c2(0x44d),_0x40e4c2(0x61e),_0x40e4c2(0x874)];function _0x50cf99(_0x20f552){const _0x51941f=_0x40e4c2;return!!(_0x20f552&&typeof _0x20f552===_0x51941f(0x6ce)&&!Array[_0x51941f(0x2fd)](_0x20f552)&&Object[_0x51941f(0x766)](_0x20f552)[_0x51941f(0x744)]>0x0);}function _0x1b8c1d(_0x471b21){const _0x1be800=_0x40e4c2;return{..._0x471b21[_0x1be800(0x3ca)]?{'encryptionKey':_0x471b21[_0x1be800(0x3ca)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x520fe4=!process['stdout'][_0x40e4c2(0x2ea)]||!!process.env.NO_COLOR;function _0x1536af(_0xb7c1e,_0x4b0f0b){return _0x520fe4?_0x4b0f0b:'\x1b['+_0xb7c1e+'m'+_0x4b0f0b+'\x1b[0m';}function _0x134b25(_0x30c739){const _0x2d8065=_0x40e4c2;if(!_0x30c739||_0x30c739[_0x2d8065(0x744)]===0x0)return;const _0x37b890='─'[_0x2d8065(0x641)](0x38);process[_0x2d8065(0x7f8)][_0x2d8065(0x5ae)]('\x0a'),process[_0x2d8065(0x7f8)][_0x2d8065(0x5ae)](_0x1536af('33',_0x2d8065(0x1de)+_0x30c739[_0x2d8065(0x744)]+_0x2d8065(0x398)+(_0x30c739['length']>0x1?'S':'')+'\x0a')),process[_0x2d8065(0x7f8)][_0x2d8065(0x5ae)]('\x20\x20'+_0x37b890+'\x0a');for(const _0x22ffe8 of _0x30c739){const _0x4f77e4=_0x22ffe8[_0x2d8065(0x774)]===_0x2d8065(0x20b)?_0x1536af('31',_0x2d8065(0x5c0)):_0x1536af('33',_0x2d8065(0x837));process[_0x2d8065(0x7f8)][_0x2d8065(0x5ae)](_0x4f77e4+'\x20\x20'+_0x1536af('1',_0x22ffe8[_0x2d8065(0x2a6)])+'\x0a'),process[_0x2d8065(0x7f8)][_0x2d8065(0x5ae)](_0x2d8065(0x604)+_0x22ffe8['message']+'\x0a');if(_0x22ffe8['hint'])process['stderr']['write'](_0x2d8065(0x604)+_0x1536af('2',_0x2d8065(0x745)+_0x22ffe8[_0x2d8065(0x2aa)])+'\x0a');process[_0x2d8065(0x7f8)][_0x2d8065(0x5ae)]('\x0a');}process['stderr'][_0x2d8065(0x5ae)]('\x20\x20'+_0x37b890+'\x0a\x0a');}function _0x392887(_0x5730ca,_0x4825fb,_0x562ad3={}){const _0x582231=_0x40e4c2,_0x356545=_0x5730ca[_0x582231(0x6e2)][_0x582231(0x6a1)](_0x4825fb,_0x562ad3);if(_0x356545&&_0x356545[_0x582231(0x735)])return Promise[_0x582231(0x651)](_0x356545);const _0xde71e9=_0x5730ca['http'][_0x582231(0x6f9)]?.[_0x582231(0x744)]?_0x5730ca[_0x582231(0x6e2)][_0x582231(0x6f9)]:[_0x356545];return new Promise((_0x38b720,_0x5a0e75)=>{const _0x4b95cc=_0x582231;_0x356545[_0x4b95cc(0x5af)](_0x4b95cc(0x20b),_0x5a0e75),Promise[_0x4b95cc(0x761)](_0xde71e9[_0x4b95cc(0x47f)](_0x532d45=>_0x532d45['listening']?null:new Promise(_0x1e6368=>_0x532d45[_0x4b95cc(0x5af)](_0x4b95cc(0x3b4),_0x1e6368))))[_0x4b95cc(0x39e)](()=>_0x38b720(_0x356545));});}function _0x2bdc83(_0x567559){const _0x551285=_0x40e4c2;return _0x567559[_0x551285(0x6e2)]?.[_0x551285(0x573)]!==undefined?{'host':_0x567559[_0x551285(0x6e2)][_0x551285(0x573)]}:{};}async function _0x19f828(_0x5da4bb){const _0x5a33a9=_0x40e4c2,_0x1e3be0=require$$4$1;console[_0x5a33a9(0x777)](_0x5a33a9(0x7a5));let _0x7e68a7=!![];const _0x5f38c1=(_0x21ad7b,_0x387e03)=>{const _0x318dd5=_0x5a33a9;console[_0x318dd5(0x777)]('\x20\x20'+(_0x21ad7b?'✓':'✗')+'\x20'+_0x387e03);if(!_0x21ad7b)_0x7e68a7=![];},_0xf022c8=Number(process[_0x5a33a9(0x50b)][_0x5a33a9(0x798)]('v','')[_0x5a33a9(0x310)]('.')[0x0]);_0x5f38c1(_0xf022c8>=0x12,'node\x20'+process['version']+(_0xf022c8<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0xda206e=_0x18d719[_0x5a33a9(0x651)](_0x5da4bb['dbPath']);try{_0x30761f[_0x5a33a9(0x753)](_0xda206e,{'recursive':!![]});const _0x33aa67=_0x18d719[_0x5a33a9(0x4e8)](_0xda206e,_0x5a33a9(0x5bd));_0x30761f[_0x5a33a9(0x67e)](_0x33aa67,''),_0x30761f[_0x5a33a9(0x340)](_0x33aa67),_0x5f38c1(!![],'database\x20path\x20writable:\x20'+_0xda206e);}catch(_0x5f2a0c){_0x5f38c1(![],_0x5a33a9(0x2dc)+_0xda206e+'\x20\x20('+_0x5f2a0c['message']+')');}const _0x5a395e=await new Promise(_0x5c84f0=>{const _0x400171=_0x5a33a9,_0x86cc0c=_0x1e3be0['createServer']();_0x86cc0c['once']('error',()=>_0x5c84f0(![])),_0x86cc0c[_0x400171(0x5af)]('listening',()=>{const _0xe433cc=_0x400171;_0x86cc0c[_0xe433cc(0x2de)](),_0x5c84f0(!![]);}),_0x86cc0c[_0x400171(0x6a1)](_0x5da4bb[_0x400171(0x689)],_0x400171(0x8b2));});_0x5f38c1(_0x5a395e,'port\x20'+_0x5da4bb[_0x5a33a9(0x689)]+'\x20'+(_0x5a395e?_0x5a33a9(0x65c):_0x5a33a9(0x46e)));const _0x5016a7=_0x18d719[_0x5a33a9(0x651)](_0x5a33a9(0x33f));if(_0x30761f[_0x5a33a9(0x50f)](_0x5016a7))try{JSON[_0x5a33a9(0x527)](_0x30761f[_0x5a33a9(0x449)](_0x5016a7,_0x5a33a9(0x758))[_0x5a33a9(0x798)](/^\uFEFF/,'')),_0x5f38c1(!![],_0x5a33a9(0x413)+_0x5016a7);}catch(_0x56d725){_0x5f38c1(![],_0x5a33a9(0x4b7)+_0x56d725[_0x5a33a9(0x262)]);}else _0x5f38c1(!![],_0x5a33a9(0x727));if(_0x52ee9d()){const _0x360c70=_0x55017e(_0x5da4bb,{'shmbufNative':!![]});_0x5f38c1(!![],_0x5a33a9(0x5a3)+_0x360c70+'\x20worker'+(_0x360c70===0x1?'':'s')+')');}else _0x5f38c1(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x5a395e)try{const _0x190410=require(_0x5a33a9(0x464)),_0x1330b0=new _0x190410(_0xda206e,{'engines':![],'processors':![],'compaction':![],'auth':{'open':!![]}});await _0x1330b0[_0x5a33a9(0x35f)]();try{await _0x1330b0[_0x5a33a9(0x8e9)][_0x5a33a9(0x35f)]({'reader':!![]});const _0x4f94ed=_0x1330b0['processes'][_0x5a33a9(0x415)](),_0x49d166=_0x4f94ed[_0x5a33a9(0x7d3)](_0x4477dc=>_0x4477dc[_0x5a33a9(0x3a7)]!=null)[_0x5a33a9(0x744)];_0x5f38c1(!![],_0x5a33a9(0x24f)+_0x4f94ed[_0x5a33a9(0x744)]+_0x5a33a9(0x863)+(_0x4f94ed[_0x5a33a9(0x744)]===0x1?'':'es')+'\x20('+_0x49d166+'\x20supervised)');}finally{await _0x1330b0[_0x5a33a9(0x2de)]();}}catch{}console[_0x5a33a9(0x777)](''),_0x7e68a7?console[_0x5a33a9(0x777)](_0x5a33a9(0x2bf)):(console[_0x5a33a9(0x777)](_0x5a33a9(0x6a3)),process['exit'](0x1));}async function _0x2fdb13(){const _0x27186f=_0x40e4c2,_0x41d5db=_0x18d719[_0x27186f(0x651)](_0x27186f(0x33f));!_0x30761f[_0x27186f(0x50f)](_0x41d5db)?(_0x30761f['writeFileSync'](_0x41d5db,JSON[_0x27186f(0x364)]({'port':0x2124,'path':_0x27186f(0x455),'logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x27186f(0x777)](_0x27186f(0x636))):console[_0x27186f(0x777)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x493941=_0x18d719[_0x27186f(0x651)](_0x27186f(0x455));!_0x30761f['existsSync'](_0x493941)?(_0x30761f[_0x27186f(0x753)](_0x493941,{'recursive':!![]}),console[_0x27186f(0x777)](_0x27186f(0x5fd))):console[_0x27186f(0x777)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console['log'](_0x27186f(0x269));}async function _0x4adfc8(_0x1fa600){const _0x9e149c=_0x40e4c2,_0x25ca28=_0x18d719[_0x9e149c(0x651)](_0x1fa600['dbPath']);if(!_0x30761f[_0x9e149c(0x50f)](_0x25ca28)){console[_0x9e149c(0x777)](_0x9e149c(0x6c9)+_0x25ca28+_0x9e149c(0x556));return;}const _0x40c298=require$$0$3,_0x20fe9a=_0x40c298[_0x9e149c(0x69e)]({'input':process[_0x9e149c(0x793)],'output':process[_0x9e149c(0x376)]}),_0x7196c6=await new Promise(_0x42934c=>_0x20fe9a[_0x9e149c(0x2a4)](_0x9e149c(0x5ea)+_0x25ca28+_0x9e149c(0x5a0),_0x42934c));_0x20fe9a[_0x9e149c(0x2de)](),console[_0x9e149c(0x777)]('');if(_0x7196c6['trim']()['toLowerCase']()!=='yes'){console[_0x9e149c(0x777)](_0x9e149c(0x2d3));return;}let _0x3a570f=null;try{_0x3a570f=await _0x4c5b88(_0x25ca28,_0x1fa600,async _0x5a6807=>{const _0x4a1068=_0x9e149c,_0x245dd2=_0x5a6807[_0x4a1068(0x46c)],_0x360eac=_0x245dd2?.['db']?.[_0x4a1068(0x564)]('__identity')??null,_0x340a41=[];if(_0x245dd2?.[_0x4a1068(0x40b)](_0x4a1068(0x8d7)))for(const {key:_0x5354e5,value:_0x11f7b}of _0x245dd2['getRange']('~licenses')){_0x340a41[_0x4a1068(0x5bb)]({'key':_0x5354e5,'value':_0x11f7b});}return{'identity':_0x360eac,'licenses':_0x340a41};});}catch(_0x393567){console[_0x9e149c(0x777)]('[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20('+_0x393567['message']+_0x9e149c(0x65e));}_0x30761f[_0x9e149c(0x8b7)](_0x25ca28,{'recursive':!![],'force':!![]}),console[_0x9e149c(0x777)](_0x9e149c(0x692)+_0x25ca28+_0x9e149c(0x823));if(_0x3a570f&&(_0x3a570f[_0x9e149c(0x490)]||_0x3a570f[_0x9e149c(0x513)]['length']>0x0))try{await _0x4c5b88(_0x25ca28,_0x1fa600,async _0x39b14a=>{const _0x3b841c=_0x9e149c,_0x1e2bca=_0x39b14a[_0x3b841c(0x46c)];_0x3a570f[_0x3b841c(0x490)]&&_0x1e2bca['db'][_0x3b841c(0x7ef)](_0x3b841c(0x69b),_0x3a570f[_0x3b841c(0x490)]);if(_0x3a570f[_0x3b841c(0x513)][_0x3b841c(0x744)]>0x0){if(!_0x1e2bca[_0x3b841c(0x40b)](_0x3b841c(0x8d7)))await _0x1e2bca[_0x3b841c(0x402)]('~licenses');for(const {key:_0x4f9d03,value:_0x10ebec}of _0x3a570f[_0x3b841c(0x513)]){await _0x1e2bca[_0x3b841c(0x625)]('~licenses',_0x4f9d03,_0x10ebec);}}});const _0x37d739=[];if(_0x3a570f[_0x9e149c(0x490)])_0x37d739[_0x9e149c(0x5bb)](_0x9e149c(0x454));if(_0x3a570f[_0x9e149c(0x513)]['length']>0x0)_0x37d739[_0x9e149c(0x5bb)](_0x3a570f[_0x9e149c(0x513)][_0x9e149c(0x744)]+_0x9e149c(0x218));console['log']('[okdb]\x20preserved:\x20'+_0x37d739['join'](_0x9e149c(0x1cf)));}catch(_0x2db5b1){console[_0x9e149c(0x777)](_0x9e149c(0x1e6)+_0x2db5b1[_0x9e149c(0x262)]);}}async function _0x4c5b88(_0x3a3965,_0xc8f8f7,_0x2fd570){const _0x109c42=_0x40e4c2,_0x26055e=require$$5$1,_0x4046ad=new _0x26055e(_0x3a3965,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x1b8c1d(_0xc8f8f7)});await _0x4046ad['open']();try{return await _0x2fd570(_0x4046ad);}finally{await _0x4046ad[_0x109c42(0x2de)]();}}async function _0x26f23b(_0xf50aba,_0x10a16e){const _0x24d3c0=_0x40e4c2,_0x4ee4c3=require$$5$1,_0x161267=_0x18d719['resolve'](_0x10a16e['dbPath']);console[_0x24d3c0(0x777)](_0x24d3c0(0x6ec)+_0x161267+'…');const _0x729e30=new _0x4ee4c3(_0x161267,_0x1b8c1d(_0x10a16e));await _0x729e30[_0x24d3c0(0x35f)](),console['log'](_0x24d3c0(0x479)+_0xf50aba+'…');const {envs:_0x3c1b57,blobs:_0x51ad4c,skipped:_0xddc01c}=await _0x729e30[_0x24d3c0(0x75b)][_0x24d3c0(0x2b8)](_0xf50aba);for(const _0xb0c6fd of _0x3c1b57){const _0x3793b7=_0xb0c6fd[_0x24d3c0(0x416)]>0x0?_0x24d3c0(0x7e7)+(_0xb0c6fd[_0x24d3c0(0x416)]/0x400/0x400)['toFixed'](0x2)+'\x20MB\x20→\x20'+(_0xb0c6fd[_0x24d3c0(0x494)]/0x400/0x400)['toFixed'](0x2)+_0x24d3c0(0x1df):'';console[_0x24d3c0(0x777)](_0x24d3c0(0x3be)+_0xb0c6fd[_0x24d3c0(0x76e)]+_0x24d3c0(0x5d7)+_0xb0c6fd[_0x24d3c0(0x86e)]+_0x3793b7+(_0xb0c6fd[_0x24d3c0(0x5dc)]?_0x24d3c0(0x7b4):''));}if(_0x51ad4c[_0x24d3c0(0x39f)]>0x0)console[_0x24d3c0(0x777)](_0x24d3c0(0x4e5)+_0x51ad4c[_0x24d3c0(0x39f)]+_0x24d3c0(0x73b));for(const _0x340ade of _0xddc01c)console['log'](_0x24d3c0(0x1ec)+_0x340ade[_0x24d3c0(0x76e)]+_0x24d3c0(0x446)+_0x340ade[_0x24d3c0(0x212)]);await _0x729e30[_0x24d3c0(0x2de)](),console['log'](_0x24d3c0(0x430));}async function _0x21cb81(_0xd4fa89,_0xf462a6,_0x1901e1={}){const _0x33fdd3=_0x40e4c2,{BACKUP_MANIFEST:_0x44bc5e}=requireOkdbMigrate(),_0xc417ee=_0x18d719[_0x33fdd3(0x651)](_0xf462a6[_0x33fdd3(0x71d)]),_0x518a72=_0x18d719['join'](_0xd4fa89,_0x44bc5e);if(!_0x30761f['existsSync'](_0x518a72))throw new Error(_0xd4fa89+'\x20is\x20not\x20a\x20complete\x20okdb\x20backup\x20(no\x20'+_0x44bc5e+')');const _0x327f12=JSON[_0x33fdd3(0x527)](_0x30761f['readFileSync'](_0x518a72,_0x33fdd3(0x758))),_0x69e8fe=_0x18d719[_0x33fdd3(0x499)](_0xd4fa89,_0xc417ee);if(_0x69e8fe===''||!(_0x69e8fe[_0x33fdd3(0x3b2)]('..')||_0x18d719['isAbsolute'](_0x69e8fe)))throw new Error('target\x20'+_0xc417ee+_0x33fdd3(0x220)+_0xd4fa89);if(_0x30761f[_0x33fdd3(0x50f)](_0xc417ee)&&_0x30761f[_0x33fdd3(0x205)](_0xc417ee)[_0x33fdd3(0x744)]>0x0)throw new Error('target\x20'+_0xc417ee+_0x33fdd3(0x4a6));console[_0x33fdd3(0x777)](_0x33fdd3(0x414)+_0xd4fa89+_0x33fdd3(0x23d)+_0x327f12[_0x33fdd3(0x1cd)]+',\x20'+_0x327f12[_0x33fdd3(0x50e)]+_0x33fdd3(0x66b)+_0xc417ee+'…'),_0x30761f[_0x33fdd3(0x533)](_0xd4fa89,_0xc417ee,{'recursive':!![],'errorOnExist':!![]});for(const _0x35a3bd of _0x327f12[_0x33fdd3(0x8de)]??[]){console['log']('\x20\x20✓\x20'+_0x35a3bd[_0x33fdd3(0x76e)]+(_0x35a3bd['timeMachine']?'\x20\x20(+\x20time-machine)':'')),_0x35a3bd[_0x33fdd3(0x535)]&&_0x35a3bd[_0x33fdd3(0x85d)]&&_0x30761f[_0x33fdd3(0x50f)](_0x35a3bd[_0x33fdd3(0x85d)])&&console[_0x33fdd3(0x777)](_0x33fdd3(0x74d)+_0x35a3bd[_0x33fdd3(0x76e)]+'\x20lived\x20outside\x20the\x20store\x20at\x20'+_0x35a3bd[_0x33fdd3(0x85d)]+_0x33fdd3(0x879)+(_0x33fdd3(0x51c)+_0x35a3bd['dir']+_0x33fdd3(0x500)));}_0x1901e1['newIdentity']&&(require$$5$1[_0x33fdd3(0x40f)](_0xc417ee),console['log'](_0x33fdd3(0x1bf))),console[_0x33fdd3(0x777)]('[okdb]\x20restore\x20complete\x20—\x20full-text\x20indexes\x20rebuild\x20on\x20first\x20open');}async function _0x962d04(_0x1fed34,_0x388c8a,_0xdd027){const _0x155abd=_0x40e4c2,_0x251438=require$$5$1,_0x32fc4a=_0x18d719[_0x155abd(0x651)](_0x388c8a['dbPath']),_0x1d6a27=_0xdd027[_0x155abd(0x264)]??_0x155abd(0x24a),_0x4a7eb0=_0xdd027['types']?_0xdd027[_0x155abd(0x4f6)]['split'](',')[_0x155abd(0x47f)](_0x36a796=>_0x36a796[_0x155abd(0x44e)]()):null;console[_0x155abd(0x777)](_0x155abd(0x6ec)+_0x32fc4a+'…');const _0x5461c2=new _0x251438(_0x32fc4a,_0x1b8c1d(_0x388c8a));await _0x5461c2[_0x155abd(0x35f)](),console[_0x155abd(0x777)](_0x155abd(0x4c1)+_0x1d6a27+_0x155abd(0x8c0)+_0x1fed34+'…');const _0x1caf1c=await _0x5461c2[_0x155abd(0x75b)][_0x155abd(0x37b)](_0x1fed34,{'envName':_0x1d6a27,'types':_0x4a7eb0,'includeChanges':!!_0xdd027[_0x155abd(0x845)]});console[_0x155abd(0x777)]('[okdb]\x20exported\x20\x20types='+_0x1caf1c[_0x155abd(0x4f6)]+'\x20\x20records='+_0x1caf1c[_0x155abd(0x7f1)]+_0x155abd(0x791)+_0x1caf1c[_0x155abd(0x845)]);if(_0xdd027['blobs']){const _0x311c5c=_0x18d719[_0x155abd(0x4e8)](_0x18d719[_0x155abd(0x7de)](_0x1fed34),_0x155abd(0x683));process[_0x155abd(0x376)][_0x155abd(0x5ae)]('[okdb]\x20exporting\x20blobs…');const {count:_0x209a23,bytes:_0x350711}=await _0x5461c2['migrate']['exportBlobs'](_0x311c5c);console[_0x155abd(0x777)]('\x0d[okdb]\x20blobs:\x20'+_0x311c5c+_0x155abd(0x7e7)+_0x209a23+_0x155abd(0x78e)+(_0x209a23!==0x1?'s':'')+',\x20'+(_0x350711/0x400/0x400)[_0x155abd(0x539)](0x2)+_0x155abd(0x1df));}await _0x5461c2['close'](),console[_0x155abd(0x777)]('[okdb]\x20export\x20complete');}async function _0x157dbe(_0xe62828,_0x3a4592,_0xec098e){const _0x2ecf73=_0x40e4c2,_0x5531e2=require$$5$1,_0x253e86=_0x18d719[_0x2ecf73(0x651)](_0x3a4592['dbPath']),_0x1d60f1=_0xec098e['env']??null,_0x517c92=_0xec098e['types']?_0xec098e['types'][_0x2ecf73(0x310)](',')[_0x2ecf73(0x47f)](_0x4c08a4=>_0x4c08a4[_0x2ecf73(0x44e)]()):null,_0x511a16=!!_0xec098e['drop'];console['log'](_0x2ecf73(0x6ec)+_0x253e86+'…');const _0x1608ae=new _0x5531e2(_0x253e86,_0x1b8c1d(_0x3a4592));await _0x1608ae[_0x2ecf73(0x35f)](),console[_0x2ecf73(0x777)]('[okdb]\x20importing\x20'+_0xe62828+'…');const _0x274c58=await _0x1608ae[_0x2ecf73(0x75b)][_0x2ecf73(0x8d2)](_0xe62828,{'envName':_0x1d60f1,'types':_0x517c92,'dropExisting':_0x511a16,'includeChanges':!!_0xec098e[_0x2ecf73(0x845)],'onProgress':({type:_0x3e1eaa,count:_0xd55f21})=>{const _0x19e98c=_0x2ecf73;process[_0x19e98c(0x376)]['write'](_0x19e98c(0x5a5)+_0x3e1eaa+':\x20'+_0xd55f21+'\x20records…');}});process[_0x2ecf73(0x376)]['write']('\x0a'),console[_0x2ecf73(0x777)](_0x2ecf73(0x606)+_0x274c58[_0x2ecf73(0x4f6)]+_0x2ecf73(0x64d)+_0x274c58[_0x2ecf73(0x7f1)]+_0x2ecf73(0x791)+_0x274c58[_0x2ecf73(0x845)]);if(_0xec098e[_0x2ecf73(0x683)]){const _0x52bba2=_0x18d719[_0x2ecf73(0x4e8)](_0x18d719[_0x2ecf73(0x7de)](_0xe62828),_0x2ecf73(0x683));if(_0x30761f[_0x2ecf73(0x50f)](_0x52bba2)){const {imported:_0x12b1d6,skipped:_0x162c4f}=await _0x1608ae[_0x2ecf73(0x75b)][_0x2ecf73(0x629)](_0x52bba2);console[_0x2ecf73(0x777)](_0x2ecf73(0x87c)+_0x12b1d6+_0x2ecf73(0x231)+_0x162c4f);}}await _0x1608ae[_0x2ecf73(0x2de)](),console[_0x2ecf73(0x777)](_0x2ecf73(0x5ef));}async function _0x2fec49(_0xdef333,_0x12c30f){const _0x1b6b67=_0x40e4c2;_0x12c30f['password']&&!_0x12c30f['name']&&(console['error'](_0x1b6b67(0x3e8)),process['exit'](0x1));const _0x47196a=_0x12c30f['permissions']?_0x12c30f[_0x1b6b67(0x378)]['split'](',')[_0x1b6b67(0x47f)](_0x5911a9=>_0x5911a9['trim']())[_0x1b6b67(0x7d3)](Boolean):[];let _0x5352fa={};if(_0x12c30f[_0x1b6b67(0x78c)])try{_0x5352fa=JSON[_0x1b6b67(0x527)](_0x12c30f['grants']);if(typeof _0x5352fa!=='object'||Array['isArray'](_0x5352fa)||_0x5352fa===null)throw new Error();}catch{console[_0x1b6b67(0x20b)](_0x1b6b67(0x32e)),process['exit'](0x1);}const _0x3ad11e=require$$5$1,{randomToken:_0x37437d,hashToken:_0x43f903,hashPassword:_0x132566}=requireOkdbAuthTokens(),_0xeb8c2b=require$$2$1,_0x364698=_0x18d719[_0x1b6b67(0x651)](_0xdef333['dbPath']),_0x5cd8c0=new _0x3ad11e(_0x364698,_0x1b8c1d(_0xdef333));await _0x5cd8c0[_0x1b6b67(0x35f)]();try{await _0x5cd8c0[_0x1b6b67(0x7f3)][_0x1b6b67(0x8a7)]();if(_0x12c30f[_0x1b6b67(0x76e)]){const _0x5c8e5d=await _0x5cd8c0[_0x1b6b67(0x7f3)][_0x1b6b67(0x2b0)](_0x12c30f[_0x1b6b67(0x76e)]);_0x5c8e5d&&(console[_0x1b6b67(0x20b)](_0x1b6b67(0x62a)+_0x12c30f[_0x1b6b67(0x76e)]+_0x1b6b67(0x5e1)),process[_0x1b6b67(0x633)](0x1));}const _0x210f33=_0x37437d(0x20),_0x862305=_0x43f903(_0x210f33),_0x599704=_0x12c30f[_0x1b6b67(0x3cc)]?await _0x132566(_0x12c30f['password']):null,_0x3f62c0=_0xeb8c2b['randomUUID'](),_0x54bbf2={'tokenHash':_0x862305,'name':_0x12c30f['name']||null,'passwordHash':_0x599704,'label':_0x12c30f[_0x1b6b67(0x555)]||null,'permissions':_0x47196a,'grants':_0x5352fa,'createdAt':Date['now'](),'lastUsedAt':null},_0x555a81=_0x12c30f[_0x1b6b67(0x7d0)]?{'ttl':Number(_0x12c30f[_0x1b6b67(0x7d0)])}:undefined;await _0x5cd8c0['_systemEnv'][_0x1b6b67(0x625)](_0x1b6b67(0x55d),_0x3f62c0,_0x54bbf2,_0x555a81),console[_0x1b6b67(0x777)](_0x1b6b67(0x773)),console[_0x1b6b67(0x777)](_0x1b6b67(0x4b9)+_0x3f62c0),console[_0x1b6b67(0x777)](_0x1b6b67(0x2f8)+(_0x12c30f['name']||'(unset)')),console[_0x1b6b67(0x777)](_0x1b6b67(0x8a6)+(_0x12c30f['label']||_0x1b6b67(0x6fc))),console['log'](_0x1b6b67(0x71e)+(_0x47196a[_0x1b6b67(0x4e8)](',\x20')||_0x1b6b67(0x474))),console[_0x1b6b67(0x777)](_0x1b6b67(0x4e7)),console[_0x1b6b67(0x777)]('\x20\x20\x20\x20'+_0x210f33+'\x0a');}finally{await _0x5cd8c0[_0x1b6b67(0x2de)]();}}async function _0x333e5d(_0x2982ed){const _0x26dce0=_0x40e4c2,_0x15f93e=require$$5$1,_0x1e1245=_0x18d719[_0x26dce0(0x651)](_0x2982ed[_0x26dce0(0x71d)]),_0x1fbe2c=new _0x15f93e(_0x1e1245,_0x1b8c1d(_0x2982ed));await _0x1fbe2c[_0x26dce0(0x35f)]();try{const _0x39d9a8=_0x1fbe2c[_0x26dce0(0x46c)];if(!_0x39d9a8||!_0x39d9a8[_0x26dce0(0x40b)](_0x26dce0(0x55d))){console['log'](_0x26dce0(0x2d9));return;}const _0x2f66a7=[];for(const {key:_0x44af5c,value:_0x3906b7}of _0x39d9a8[_0x26dce0(0x33e)](_0x26dce0(0x55d))){_0x2f66a7[_0x26dce0(0x5bb)]({'id':_0x44af5c,'name':_0x3906b7[_0x26dce0(0x76e)]||_0x26dce0(0x6fc),'label':_0x3906b7[_0x26dce0(0x555)]||'(unset)','permissions':Array['isArray'](_0x3906b7[_0x26dce0(0x378)])?_0x3906b7[_0x26dce0(0x378)][_0x26dce0(0x4e8)](','):'','created':_0x3906b7[_0x26dce0(0x50e)]?new Date(_0x3906b7[_0x26dce0(0x50e)])[_0x26dce0(0x794)]()['slice'](0x0,0xa):''});}if(_0x2f66a7[_0x26dce0(0x744)]===0x0){console[_0x26dce0(0x777)](_0x26dce0(0x2d9));return;}const _0x32f3aa=!process[_0x26dce0(0x376)][_0x26dce0(0x682)]||process[_0x26dce0(0x376)][_0x26dce0(0x682)]>=0x64,_0x3601ca=_0x32f3aa?0x24:0xa,_0x45cd3f=['ID'[_0x26dce0(0x435)](_0x3601ca),_0x26dce0(0x482)['padEnd'](0x10),_0x26dce0(0x210)[_0x26dce0(0x435)](0x14),_0x26dce0(0x664)[_0x26dce0(0x435)](0x14),_0x26dce0(0x3af)]['join']('\x20\x20');console[_0x26dce0(0x777)]('\x0a'+_0x45cd3f),console['log']('-'[_0x26dce0(0x641)](_0x45cd3f[_0x26dce0(0x744)]));for(const _0x47f3a4 of _0x2f66a7){const _0x4428d7=_0x32f3aa?_0x47f3a4['id']:_0x47f3a4['id'][_0x26dce0(0x6f2)](0x0,0x8)+'…';console[_0x26dce0(0x777)]([_0x4428d7[_0x26dce0(0x435)](_0x3601ca),_0x47f3a4[_0x26dce0(0x76e)][_0x26dce0(0x6f2)](0x0,0x10)[_0x26dce0(0x435)](0x10),_0x47f3a4[_0x26dce0(0x555)]['slice'](0x0,0x14)[_0x26dce0(0x435)](0x14),_0x47f3a4[_0x26dce0(0x378)][_0x26dce0(0x6f2)](0x0,0x14)[_0x26dce0(0x435)](0x14),_0x47f3a4['created']][_0x26dce0(0x4e8)]('\x20\x20'));}console[_0x26dce0(0x777)]('');}finally{await _0x1fbe2c['close']();}}async function _0x1de6ce(_0x579b76,_0x386dea){const _0x50f61c=_0x40e4c2;!_0x579b76&&(console[_0x50f61c(0x20b)](_0x50f61c(0x26b)),process[_0x50f61c(0x633)](0x1));const _0x1a0aa0=require$$5$1,_0x29d800=_0x18d719['resolve'](_0x386dea[_0x50f61c(0x71d)]),_0x5379a8=new _0x1a0aa0(_0x29d800,_0x1b8c1d(_0x386dea));await _0x5379a8[_0x50f61c(0x35f)]();try{const _0x1dbadb=_0x5379a8[_0x50f61c(0x46c)];(!_0x1dbadb||!_0x1dbadb['hasType'](_0x50f61c(0x55d)))&&(console[_0x50f61c(0x20b)](_0x50f61c(0x7b0)+_0x579b76+'\x22'),process[_0x50f61c(0x633)](0x1));let _0x291f84=null,_0x773711=null;const _0x32f672=_0x1dbadb[_0x50f61c(0x564)](_0x50f61c(0x55d),_0x579b76);if(_0x32f672)_0x291f84=_0x579b76,_0x773711=_0x32f672;else{const _0x541687=[];for(const {key:_0x10ec17,value:_0x51e05a}of _0x1dbadb[_0x50f61c(0x33e)]('~tokens')){if(_0x10ec17[_0x50f61c(0x3b2)](_0x579b76))_0x541687['push']({'key':_0x10ec17,'value':_0x51e05a});}_0x541687['length']===0x0&&(console[_0x50f61c(0x20b)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x579b76+'\x22'),process[_0x50f61c(0x633)](0x1));if(_0x541687['length']>0x1){console[_0x50f61c(0x20b)](_0x50f61c(0x575)+_0x579b76+_0x50f61c(0x731)+_0x541687['length']+'\x20tokens:');for(const _0x3c45ac of _0x541687){console[_0x50f61c(0x20b)]('\x20\x20'+_0x3c45ac[_0x50f61c(0x3ca)]+_0x50f61c(0x6a9)+(_0x3c45ac[_0x50f61c(0x29e)]['name']||_0x50f61c(0x6fc))+')');}process[_0x50f61c(0x633)](0x1);}_0x291f84=_0x541687[0x0][_0x50f61c(0x3ca)],_0x773711=_0x541687[0x0][_0x50f61c(0x29e)];}await _0x1dbadb[_0x50f61c(0x7c3)](_0x50f61c(0x55d),_0x291f84),console['log']('\x20\x20✓\x20Revoked\x20token\x20'+_0x291f84+_0x50f61c(0x6a9)+(_0x773711[_0x50f61c(0x76e)]||_0x50f61c(0x6fc))+_0x50f61c(0x856)+(_0x773711[_0x50f61c(0x555)]||_0x50f61c(0x6fc))+')');}finally{await _0x5379a8[_0x50f61c(0x2de)]();}}function _0x4b169e(_0x4347b0,_0x3b7011){const _0x4624a4=_0x40e4c2;if(!_0x4347b0[_0x4624a4(0x3f3)])return _0x4624a4(0x7e8);const _0x2689e7=_0x4347b0[_0x4624a4(0x481)];if(!_0x2689e7)return _0x4624a4(0x1d6);if(_0x3b7011>_0x2689e7)return _0x4624a4(0x7b6);return _0x4624a4(0x1d6);}function _0x44cc8e(_0x493986){const _0x167f12=_0x40e4c2;if(!_0x493986||typeof _0x493986!=='object')return'';const _0x41a760=Object[_0x167f12(0x7fb)](_0x493986)[_0x167f12(0x7d3)](([,_0x11138a])=>_0x11138a)['map'](([_0x1ad346])=>_0x1ad346);if(_0x41a760[_0x167f12(0x744)]===0x0)return _0x167f12(0x474);if(_0x41a760['length']<=0x3)return _0x41a760['join']('\x20');return _0x41a760[_0x167f12(0x6f2)](0x0,0x3)[_0x167f12(0x4e8)]('\x20')+('\x20+'+(_0x41a760[_0x167f12(0x744)]-0x3));}async function _0x469c0a(_0x3ad722){const _0x854c14=_0x40e4c2,_0x1745c6=require$$5$1,_0x496434=requireOkdbLicenseCodec(),{_C:_0x15774f}=requireOkdbLicense(),_0x4dd97f=_0x18d719[_0x854c14(0x651)](_0x3ad722[_0x854c14(0x71d)]),_0xf1e484=new _0x1745c6(_0x4dd97f,_0x1b8c1d(_0x3ad722));await _0xf1e484[_0x854c14(0x35f)]();try{const _0x29f359=_0xf1e484[_0x854c14(0x46c)],_0x33e1b3=_0x29f359?.['db']?.['get']?.('__writeCounter')??0x0,_0x1060d7=[..._0xf1e484[_0x854c14(0x441)]['keys']()][_0x854c14(0x7d3)](_0x36d2e8=>!_0x36d2e8[_0x854c14(0x3b2)]('~'))[_0x854c14(0x744)],_0x4e36f6=_0xf1e484[_0x854c14(0x661)]?.['effective'];if(_0x4e36f6){const _0x11d758=_0x4e36f6['_isFree']===!![],_0x394b0e=_0x11d758?_0x854c14(0x6de):_0xf1e484['_license'][_0x854c14(0x1d6)]?.[_0x854c14(0x6e7)]||'licensed';console[_0x854c14(0x777)](''),console['log'](_0x854c14(0x577)+_0x394b0e);const _0x4ed51c=_0x4e36f6[_0x854c14(0x4b4)]||{};if(_0x4ed51c['maxWrites']){const _0x5f538b=Math['round'](_0x33e1b3/_0x4ed51c[_0x854c14(0x7e1)]*0x64);console[_0x854c14(0x777)](_0x854c14(0x690)+_0x33e1b3['toLocaleString']()+'\x20/\x20'+_0x4ed51c[_0x854c14(0x7e1)][_0x854c14(0x489)]()+_0x854c14(0x7e7)+_0x5f538b+'%)');}else console[_0x854c14(0x777)](_0x854c14(0x690)+_0x33e1b3['toLocaleString']());_0x4ed51c[_0x854c14(0x8de)]?console['log']('\x20\x20Envs:\x20\x20\x20\x20'+_0x1060d7+_0x854c14(0x607)+_0x4ed51c[_0x854c14(0x8de)]):console[_0x854c14(0x777)](_0x854c14(0x2ce)+_0x1060d7),_0x15774f?.[_0x854c14(0x5dd)]&&console[_0x854c14(0x777)](_0x854c14(0x885)+_0x15774f[_0x854c14(0x5dd)]+_0x854c14(0x2ae));}if(!_0x29f359||!_0x29f359[_0x854c14(0x40b)]('~licenses')){console[_0x854c14(0x777)](''),console[_0x854c14(0x777)](_0x854c14(0x2f5)),console[_0x854c14(0x777)]('');return;}const _0x6e41e7=[],_0x4e6585=Date[_0x854c14(0x872)](),_0x1a1320=_0xf1e484['id'],_0x4ef8cd=_0x854c14(0x257);for(const {key:_0x4654c2,value:_0x37cab2}of _0x29f359[_0x854c14(0x33e)](_0x854c14(0x8d7))){const _0x3870ef=_0x37cab2['_licenseHash']?Buffer[_0x854c14(0x83d)](_0x37cab2[_0x854c14(0x6f4)],_0x854c14(0x4d4)):Buffer['alloc'](0x8);let _0x3eb01c='';try{_0x3eb01c=_0x496434['derivePin'](_0x1a1320,_0x3870ef,_0x4ef8cd)['pin'];}catch{}_0x6e41e7['push']({'id':_0x4654c2,'licensee':_0x37cab2[_0x854c14(0x6e7)]||'','expires':_0x37cab2[_0x854c14(0x481)]?new Date(_0x37cab2[_0x854c14(0x481)])[_0x854c14(0x794)]()[_0x854c14(0x6f2)](0x0,0xa):'','features':_0x44cc8e(_0x37cab2[_0x854c14(0x790)]),'pin':_0x3eb01c,'status':_0x4b169e(_0x37cab2,_0x4e6585)});}if(_0x6e41e7[_0x854c14(0x744)]===0x0){console[_0x854c14(0x777)](''),console[_0x854c14(0x777)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x854c14(0x777)]('');return;}const _0x489a60=['\x20\x20'+'ID'[_0x854c14(0x435)](0xe),'LICENSEE'[_0x854c14(0x435)](0xe),_0x854c14(0x760)[_0x854c14(0x435)](0xc),_0x854c14(0x5fe)[_0x854c14(0x435)](0x1e),_0x854c14(0x6c8)[_0x854c14(0x435)](0xa),'STATUS'][_0x854c14(0x4e8)]('\x20');console['log']('\x0a'+_0x489a60);for(const _0x2afe75 of _0x6e41e7){const _0x3bfb61=_0x2afe75['id'][_0x854c14(0x6f2)](0x0,0x8)+'\u2026';console[_0x854c14(0x777)](['\x20\x20'+_0x3bfb61[_0x854c14(0x435)](0xe),_0x2afe75[_0x854c14(0x6e7)][_0x854c14(0x6f2)](0x0,0xe)[_0x854c14(0x435)](0xe),_0x2afe75['expires'][_0x854c14(0x435)](0xc),_0x2afe75['features']['slice'](0x0,0x1e)[_0x854c14(0x435)](0x1e),_0x2afe75[_0x854c14(0x70a)][_0x854c14(0x435)](0xa),_0x2afe75[_0x854c14(0x258)]]['join']('\x20'));}console[_0x854c14(0x777)]('');}finally{await _0xf1e484[_0x854c14(0x2de)]();}}async function _0x56db77(_0x5c1a45,_0xd7d314){const _0x4540af=_0x40e4c2,_0x3921c6=require$$5$1,_0x2778de=requireOkdbLicenseCodec();let _0x5a05c4=_0x5c1a45;(_0x2778de['detectInputType'](_0x5c1a45)==='path'||_0x30761f[_0x4540af(0x50f)](_0x5c1a45)&&_0x30761f['statSync'](_0x5c1a45)[_0x4540af(0x7ce)]())&&(_0x5a05c4=_0x30761f['readFileSync'](_0x5c1a45,_0x4540af(0x758))[_0x4540af(0x44e)]());const _0x4e5aaa=_0x18d719[_0x4540af(0x651)](_0xd7d314[_0x4540af(0x71d)]),_0x162e3e=new _0x3921c6(_0x4e5aaa,_0x1b8c1d(_0xd7d314));await _0x162e3e[_0x4540af(0x35f)]();try{let _0x173494;try{_0x173494=await _0x162e3e[_0x4540af(0x513)][_0x4540af(0x4d2)]({'blob':_0x5a05c4});}catch(_0x5c9166){console[_0x4540af(0x20b)](_0x4540af(0x5be)+_0x5c9166[_0x4540af(0x262)]),process['exit'](0x1);}const _0x51c9b4=_0x173494[_0x4540af(0x70a)]||'',_0x5281f4=Object[_0x4540af(0x7fb)](_0x173494[_0x4540af(0x790)]||{})['filter'](([,_0x59c84e])=>_0x59c84e)[_0x4540af(0x47f)](([_0x1fbe1d])=>_0x1fbe1d),_0x5aba46=_0x173494[_0x4540af(0x4b4)]||{},_0x29dfde=[_0x5aba46[_0x4540af(0x8de)]?_0x4540af(0x2b7)+_0x5aba46['envs']:null,_0x5aba46['typesPerEnv']?'types/env='+_0x5aba46[_0x4540af(0x757)]:null,_0x5aba46[_0x4540af(0x551)]?_0x4540af(0x2ab)+_0x5aba46[_0x4540af(0x551)]:null,_0x5aba46[_0x4540af(0x7e1)]?_0x4540af(0x1ba)+_0x5aba46['maxWrites'][_0x4540af(0x489)]():null][_0x4540af(0x7d3)](Boolean)[_0x4540af(0x4e8)]('\x20\x20'),_0x2e1c99=_0x173494[_0x4540af(0x465)]!==_0x4540af(0x787);console[_0x4540af(0x777)](_0x173494[_0x4540af(0x559)]?_0x4540af(0x65a):_0x4540af(0x447)),console[_0x4540af(0x777)](_0x4540af(0x2a9)+_0x173494['id']),console[_0x4540af(0x777)](_0x4540af(0x57b)+_0x173494['licensee']),console[_0x4540af(0x777)](_0x4540af(0x3f1)+(_0x173494[_0x4540af(0x481)]?new Date(_0x173494[_0x4540af(0x481)])[_0x4540af(0x794)]()['slice'](0x0,0xa):'never')),console[_0x4540af(0x777)]('\x20\x20\x20\x20features:\x20\x20'+(_0x5281f4['join'](',\x20')||'(none)'));if(_0x29dfde)console['log'](_0x4540af(0x3b1)+_0x29dfde);if(_0x2e1c99)console[_0x4540af(0x777)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20('+_0x173494[_0x4540af(0x465)]+'\x20license\x20—\x20no\x20activation\x20needed)'),console['log']('');else!_0x173494[_0x4540af(0x5c9)]?(console[_0x4540af(0x777)](_0x4540af(0x63d)+_0x173494[_0x4540af(0x258)]),console[_0x4540af(0x777)]('')):(console[_0x4540af(0x777)](_0x4540af(0x21d)+_0x51c9b4),console['log'](_0x4540af(0x880)),console[_0x4540af(0x777)](''),console[_0x4540af(0x777)](_0x4540af(0x7d7)),console[_0x4540af(0x777)](_0x4540af(0x60b)+_0x51c9b4+_0x4540af(0x23c)),console['log'](_0x4540af(0x427)),console[_0x4540af(0x777)]('\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>'),console[_0x4540af(0x777)](''));}finally{await _0x162e3e['close']();}}async function _0x2eb1d7(_0x2a922d,_0x31b000){const _0x486c3e=_0x40e4c2,_0x77d698=require$$5$1,_0x4839ff=_0x18d719['resolve'](_0x31b000[_0x486c3e(0x71d)]),_0x5e4476=new _0x77d698(_0x4839ff,_0x1b8c1d(_0x31b000));await _0x5e4476[_0x486c3e(0x35f)]();try{let _0x19abbd;try{_0x19abbd=await _0x5e4476['licenses'][_0x486c3e(0x2c9)](_0x2a922d);}catch(_0x9f73f8){console[_0x486c3e(0x20b)](_0x486c3e(0x5be)+_0x9f73f8['message']),console[_0x486c3e(0x20b)](''),console[_0x486c3e(0x20b)](_0x486c3e(0x419)),console[_0x486c3e(0x20b)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0x486c3e(0x20b)](_0x486c3e(0x2ad)),console['error'](_0x486c3e(0x736)),console[_0x486c3e(0x20b)](''),process[_0x486c3e(0x633)](0x1);}console[_0x486c3e(0x777)](_0x486c3e(0x710)),console['log'](_0x486c3e(0x2a9)+_0x19abbd['id']),console['log'](_0x486c3e(0x57b)+_0x19abbd[_0x486c3e(0x6e7)]),console[_0x486c3e(0x777)](_0x486c3e(0x3f1)+(_0x19abbd['expiresAt']?new Date(_0x19abbd['expiresAt'])[_0x486c3e(0x794)]()['slice'](0x0,0xa):'never')),console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x486c3e(0x777)]('');}finally{await _0x5e4476[_0x486c3e(0x2de)]();}}async function _0xb9d714(_0x13b4ff,_0x2d6302){const _0x1501d0=_0x40e4c2;!_0x13b4ff&&(console[_0x1501d0(0x20b)](_0x1501d0(0x3f6)),process[_0x1501d0(0x633)](0x1));const _0x51f8a7=require$$5$1,_0x1e6825=requireOkdbLicenseCodec(),_0x2f92c0=_0x18d719[_0x1501d0(0x651)](_0x2d6302[_0x1501d0(0x71d)]),_0x2a1f2c=new _0x51f8a7(_0x2f92c0,_0x1b8c1d(_0x2d6302));await _0x2a1f2c[_0x1501d0(0x35f)]();try{const _0x36fa52=_0x2a1f2c['_systemEnv'];(!_0x36fa52||!_0x36fa52['hasType'](_0x1501d0(0x8d7)))&&(console[_0x1501d0(0x20b)](_0x1501d0(0x43c)+_0x13b4ff+'\x22'),process[_0x1501d0(0x633)](0x1));let _0xd07ff2=null,_0x5a3b7e=null;const _0x15a06f=_0x36fa52[_0x1501d0(0x564)](_0x1501d0(0x8d7),_0x13b4ff);if(_0x15a06f)_0xd07ff2=_0x13b4ff,_0x5a3b7e=_0x15a06f;else{const _0x3d3d94=[];for(const {key:_0x15d2a4,value:_0x3131a0}of _0x36fa52[_0x1501d0(0x33e)](_0x1501d0(0x8d7))){if(_0x15d2a4[_0x1501d0(0x3b2)](_0x13b4ff))_0x3d3d94[_0x1501d0(0x5bb)]({'key':_0x15d2a4,'value':_0x3131a0});}_0x3d3d94[_0x1501d0(0x744)]===0x0&&(console['error'](_0x1501d0(0x43c)+_0x13b4ff+'\x22'),process[_0x1501d0(0x633)](0x1)),_0x3d3d94[_0x1501d0(0x744)]>0x1&&(console[_0x1501d0(0x20b)](_0x1501d0(0x575)+_0x13b4ff+_0x1501d0(0x731)+_0x3d3d94['length']+'\x20licenses'),process[_0x1501d0(0x633)](0x1)),_0xd07ff2=_0x3d3d94[0x0][_0x1501d0(0x3ca)],_0x5a3b7e=_0x3d3d94[0x0][_0x1501d0(0x29e)];}const _0x248774=Date['now'](),_0x3c9a0c=_0x4b169e(_0x5a3b7e,_0x248774),_0x3e0854=_0x2a1f2c['id'],_0x4b5e7f=_0x1501d0(0x257);let _0x4f3f9c='';try{const _0x20c7cc=Buffer[_0x1501d0(0x83d)](_0x5a3b7e['_licenseHash'],'hex');_0x4f3f9c=_0x1e6825[_0x1501d0(0x254)](_0x3e0854,_0x20c7cc,_0x4b5e7f)['pin'];}catch{}const _0x29aa9e=_0x5a3b7e[_0x1501d0(0x790)]?Object[_0x1501d0(0x7fb)](_0x5a3b7e[_0x1501d0(0x790)])[_0x1501d0(0x7d3)](([,_0x2020e8])=>_0x2020e8)[_0x1501d0(0x47f)](([_0x43ef17])=>_0x43ef17):[],_0x39790c=_0x5a3b7e[_0x1501d0(0x4b4)]||{},_0x175432=_0x36fa52?.['db']?.[_0x1501d0(0x564)]?.('__writeCounter')??0x0,_0x3568d8=[..._0x2a1f2c[_0x1501d0(0x441)][_0x1501d0(0x766)]()][_0x1501d0(0x7d3)](_0x16ef0a=>!_0x16ef0a[_0x1501d0(0x3b2)]('~'))['length'];console[_0x1501d0(0x777)](_0x1501d0(0x630)),console[_0x1501d0(0x777)](_0x1501d0(0x2a9)+_0xd07ff2),console[_0x1501d0(0x777)](_0x1501d0(0x57b)+(_0x5a3b7e[_0x1501d0(0x6e7)]||'')),console[_0x1501d0(0x777)](_0x1501d0(0x3f1)+(_0x5a3b7e[_0x1501d0(0x481)]?new Date(_0x5a3b7e[_0x1501d0(0x481)])[_0x1501d0(0x794)]()[_0x1501d0(0x6f2)](0x0,0xa):'')),console[_0x1501d0(0x777)](_0x1501d0(0x8c8)+(_0x29aa9e[_0x1501d0(0x4e8)](',\x20')||_0x1501d0(0x474))),console['log'](_0x1501d0(0x21d)+_0x4f3f9c),console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x3c9a0c),console[_0x1501d0(0x777)](_0x1501d0(0x27d)+new Date(_0x5a3b7e[_0x1501d0(0x328)])['toISOString']());if(_0x3c9a0c===_0x1501d0(0x1d6)){console[_0x1501d0(0x777)](''),console[_0x1501d0(0x777)](_0x1501d0(0x25d));if(_0x39790c[_0x1501d0(0x7e1)]){const _0x4dcf0e=Math[_0x1501d0(0x631)](_0x175432/_0x39790c[_0x1501d0(0x7e1)]*0x64);console['log']('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x175432[_0x1501d0(0x489)]()+'\x20/\x20'+_0x39790c[_0x1501d0(0x7e1)][_0x1501d0(0x489)]()+_0x1501d0(0x7e7)+_0x4dcf0e+'%)');}else console[_0x1501d0(0x777)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x175432[_0x1501d0(0x489)]()+_0x1501d0(0x206));_0x39790c['envs']?console[_0x1501d0(0x777)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x3568d8+_0x1501d0(0x607)+_0x39790c[_0x1501d0(0x8de)]):console[_0x1501d0(0x777)](_0x1501d0(0x7e0)+_0x3568d8+_0x1501d0(0x206));}console[_0x1501d0(0x777)]('');}finally{await _0x2a1f2c[_0x1501d0(0x2de)]();}}async function _0xbeb082(_0x190af6,_0xa3c23f){const _0x1ecf09=_0x40e4c2;!_0x190af6&&(console[_0x1ecf09(0x20b)]('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x1ecf09(0x633)](0x1));const _0x1faaa8=require$$5$1,_0x117edc=_0x18d719[_0x1ecf09(0x651)](_0xa3c23f[_0x1ecf09(0x71d)]),_0x4c3a44=new _0x1faaa8(_0x117edc,_0x1b8c1d(_0xa3c23f));await _0x4c3a44[_0x1ecf09(0x35f)]();try{const _0x535109=_0x4c3a44['_systemEnv'];(!_0x535109||!_0x535109['hasType'](_0x1ecf09(0x8d7)))&&(console['error'](_0x1ecf09(0x43c)+_0x190af6+'\x22'),process[_0x1ecf09(0x633)](0x1));let _0x364e29=null,_0x1fb143=null;const _0x58632e=_0x535109[_0x1ecf09(0x564)](_0x1ecf09(0x8d7),_0x190af6);if(_0x58632e)_0x364e29=_0x190af6,_0x1fb143=_0x58632e;else{const _0x181bbd=[];for(const {key:_0xa59b6a,value:_0x340378}of _0x535109[_0x1ecf09(0x33e)]('~licenses')){if(_0xa59b6a['startsWith'](_0x190af6))_0x181bbd[_0x1ecf09(0x5bb)]({'key':_0xa59b6a,'value':_0x340378});}_0x181bbd[_0x1ecf09(0x744)]===0x0&&(console[_0x1ecf09(0x20b)](_0x1ecf09(0x43c)+_0x190af6+'\x22'),process[_0x1ecf09(0x633)](0x1)),_0x181bbd[_0x1ecf09(0x744)]>0x1&&(console[_0x1ecf09(0x20b)](_0x1ecf09(0x575)+_0x190af6+_0x1ecf09(0x731)+_0x181bbd[_0x1ecf09(0x744)]+_0x1ecf09(0x46f)),process[_0x1ecf09(0x633)](0x1)),_0x364e29=_0x181bbd[0x0][_0x1ecf09(0x3ca)],_0x1fb143=_0x181bbd[0x0][_0x1ecf09(0x29e)];}await _0x535109[_0x1ecf09(0x7c3)]('~licenses',_0x364e29),console[_0x1ecf09(0x777)]('\x20\x20✓\x20Removed\x20license\x20'+_0x364e29+_0x1ecf09(0x8ac)+(_0x1fb143['licensee']||_0x1ecf09(0x6fc))+')');}finally{await _0x4c3a44[_0x1ecf09(0x2de)]();}}async function _0x296d47(_0x4aa329,_0x308f4f,_0x2eab77){const _0x5245de=_0x40e4c2;!_0x4aa329&&(console[_0x5245de(0x20b)](_0x5245de(0x8e7)),process[_0x5245de(0x633)](0x1));!_0x2eab77['token']&&!(_0x2eab77[_0x5245de(0x4ad)]&&_0x2eab77[_0x5245de(0x3cc)])&&(console[_0x5245de(0x20b)](_0x5245de(0x799)),process['exit'](0x1));const _0x2f1cec=_0x2eab77['selfAddress']||_0x308f4f[_0x5245de(0x5b7)]?.['address'];!_0x2f1cec&&(console[_0x5245de(0x20b)]('[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a'+_0x5245de(0x38e)+_0x5245de(0x2b1)),process['exit'](0x1));const _0x16d74b=require$$5$1,_0x11eb2c=new _0x16d74b(_0x308f4f[_0x5245de(0x71d)],{'sync':{'address':_0x2f1cec,'auto_reconcile':![]}});await _0x11eb2c[_0x5245de(0x35f)]();try{const _0x1a749f=_0x11eb2c[_0x5245de(0x46c)];if(_0x1a749f&&_0x1a749f[_0x5245de(0x40b)](_0x5245de(0x55d))){let _0x1a4b8f=![];for(const _0x1b36b6 of _0x1a749f[_0x5245de(0x33e)](_0x5245de(0x55d))){_0x1a4b8f=!![];break;}_0x1a4b8f&&console[_0x5245de(0x777)](_0x5245de(0x79c)+_0x5245de(0x355));}console['log'](_0x5245de(0x89b)+_0x4aa329+'…'),await _0x11eb2c[_0x5245de(0x5b7)][_0x5245de(0x4e8)](_0x4aa329['replace'](/\/+$/,''),{'token':_0x2eab77['token'],'username':_0x2eab77[_0x5245de(0x4ad)],'password':_0x2eab77['password']}),console['log'](_0x5245de(0x1f2)),console[_0x5245de(0x777)](_0x5245de(0x443));}finally{await _0x11eb2c[_0x5245de(0x2de)]();}}async function _0xc10ed7(){const _0x55d53c=_0x40e4c2,_0x4f0118=Date[_0x55d53c(0x872)](),_0x5163fa=_0x237a0d(process[_0x55d53c(0x330)]),_0x210e6d=_0x38d00c(_0x5163fa),_0x273a8a=_0x18d719['resolve'](_0x210e6d[_0x55d53c(0x71d)]);!_0x210e6d[_0x55d53c(0x68f)]&&!process[_0x55d53c(0x793)][_0x55d53c(0x2ea)]&&(_0x210e6d[_0x55d53c(0x68f)]=!![]);const _0x4a64ff=require$$5$1,{start:_0x55fb4f,colorLog:_0x1d5a84}=requireOkdbShell(),_0x15f6fc=require$$1$1,_0x5d11f9={..._0x210e6d[_0x55d53c(0x3ca)]?{'encryptionKey':_0x210e6d[_0x55d53c(0x3ca)]}:{},..._0x210e6d[_0x55d53c(0x2ff)]?{'admin':![]}:_0x50cf99(_0x210e6d[_0x55d53c(0x875)])?{'admin':_0x210e6d[_0x55d53c(0x875)]}:{},..._0x50cf99(_0x210e6d[_0x55d53c(0x785)])?{'api':_0x210e6d[_0x55d53c(0x785)]}:{},..._0x50cf99(_0x210e6d[_0x55d53c(0x7f3)])?{'auth':_0x210e6d[_0x55d53c(0x7f3)]}:{},..._0x50cf99(_0x210e6d[_0x55d53c(0x28b)])?{'mcp':_0x210e6d[_0x55d53c(0x28b)]}:{},..._0x50cf99(_0x210e6d['backup'])?{'backup':_0x210e6d[_0x55d53c(0x2b8)]}:{},..._0x210e6d[_0x55d53c(0x5dc)]!==![]?{'timeMachine':_0x210e6d['timeMachine']}:{},...Object['fromEntries'](_0x17da0e[_0x55d53c(0x7d3)](_0x2e5582=>_0x210e6d[_0x2e5582]!==undefined)[_0x55d53c(0x47f)](_0x27d821=>[_0x27d821,_0x210e6d[_0x27d821]]))},_0x895ccc=_0x55017e(_0x210e6d);if(!_0x15f6fc[_0x55d53c(0x5d9)]){const _0x261b97=_0x52ee9d(),_0x3b8d74=_0x210e6d[_0x55d53c(0x896)]?'--no-cluster':_0x210e6d['workersFlag']!=null&&_0x210e6d[_0x55d53c(0x299)]!==''?_0x55d53c(0x3b3):process.env.OKDB_HTTP_WORKERS?_0x55d53c(0x8e6):_0x210e6d[_0x55d53c(0x6e2)]?.[_0x55d53c(0x4c4)]!=null?'config\x20http.workers':'default:\x20cores−1\x20=\x20'+Math['max'](0x1,require$$0[_0x55d53c(0x797)]()['length']-0x1);process[_0x55d53c(0x376)][_0x55d53c(0x5ae)]('[okdb]\x20http\x20workers:\x20'+_0x895ccc+'\x20('+_0x3b8d74+(!_0x261b97?_0x55d53c(0x2d8):'')+')\x0a');}if(_0x15f6fc[_0x55d53c(0x5d9)]){const _0x23d173={..._0x5d11f9},_0x11e62c=new _0x4a64ff(_0x273a8a,_0x23d173);_0x11e62c['log'][_0x55d53c(0x6e1)]?.();const _0x4efbde=process.env.OKDB_CLUSTER_SLOT??'?',_0x2ab9e7={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x5cc460=_0x2ab9e7[_0x210e6d[_0x55d53c(0x655)]]??_0x2ab9e7['info'];_0x11e62c[_0x55d53c(0x777)][_0x55d53c(0x348)](_0xde88a5=>{const _0x2f887f=_0x55d53c;if((_0x2ab9e7[_0xde88a5[_0x2f887f(0x774)]]??0x1)<_0x5cc460)return;try{process[_0x2f887f(0x1e4)]?.({'__okdbCluster':_0x2f887f(0x777),'slot':_0x4efbde,'pid':process['pid'],'entry':_0xde88a5});}catch{}}),await _0x11e62c[_0x55d53c(0x35f)]();const {attachWorkerCluster:_0x1a3dc8}=requireOkdbCluster();_0x1a3dc8(_0x11e62c),await _0x392887(_0x11e62c,_0x210e6d[_0x55d53c(0x689)],_0x2bdc83(_0x210e6d));return;}if(_0x895ccc>0x1){const {runClustered:_0x4df96a}=requireOkdbCluster(),_0xada747=new _0x4a64ff(_0x273a8a,{..._0x5d11f9,'engines':![],'processors':![],'compaction':![]});await _0xada747[_0x55d53c(0x35f)]();const _0x1012ad=async()=>{const _0x3eab25=new _0x4a64ff(_0x273a8a,{..._0x5d11f9});return await _0x3eab25['open'](),_0x3eab25;},_0x10bd8f=Object[_0x55d53c(0x33d)](_0x17da0e[_0x55d53c(0x47f)](_0x260f37=>[_0x260f37,_0x5d11f9[_0x260f37]??!![]])),{formatListenAddr:_0x4482d6}=requireOkdbHttp(),_0x5e8a48=_0x4482d6(_0x210e6d['port'],_0x210e6d[_0x55d53c(0x6e2)]?.[_0x55d53c(0x573)]),_0x5c821d=_0x4df96a({'workers':_0x895ccc,'makeOkdb':_0x1012ad,'port':_0x210e6d[_0x55d53c(0x689)],'primaryOkdb':_0xada747,'workerRole':_0x10bd8f,'listenAddr':_0x5e8a48});let _0x392b24=![];async function _0x3daeeb(_0x22307a){const _0x4c347f=_0x55d53c;_0x392b24&&(process[_0x4c347f(0x7f8)][_0x4c347f(0x5ae)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process['exit'](0x82));_0x392b24=!![],process[_0x4c347f(0x7f8)][_0x4c347f(0x5ae)](_0x4c347f(0x4be)+(_0x22307a||_0x4c347f(0x3c6))+_0x4c347f(0x8b3));const _0x2b0df0=setTimeout(()=>{const _0x32b079=_0x4c347f;process['stderr'][_0x32b079(0x5ae)](_0x32b079(0x596)),process[_0x32b079(0x633)](0x0);},0xbb8);_0x2b0df0[_0x4c347f(0x69f)]?.();try{await _0x5c821d[_0x4c347f(0x2de)]();}catch(_0x4eac4d){process['stderr'][_0x4c347f(0x5ae)](_0x4c347f(0x41c)+(_0x4eac4d?.['message']??_0x4eac4d)+'\x0a');}try{await _0xada747[_0x4c347f(0x2de)]();}catch(_0x2fdf34){process[_0x4c347f(0x7f8)]['write']('[okdb]\x20primary\x20okdb\x20close\x20error:\x20'+(_0x2fdf34?.['message']??_0x2fdf34)+'\x0a');}process['exit'](0x0);}_0x210e6d[_0x55d53c(0x881)]=_0x895ccc;if(!_0x210e6d['noRepl']){_0xada747[_0x55d53c(0x777)]['detachConsole']?.(),_0x134b25(_0xada747[_0x55d53c(0x7f3)]?.[_0x55d53c(0x2fc)]?.()??[]),await _0x55fb4f(_0xada747,_0x210e6d);return;}process[_0x55d53c(0x376)][_0x55d53c(0x5ae)](_0x55d53c(0x69a)+process[_0x55d53c(0x27f)]+_0x55d53c(0x782)+_0x895ccc+'\x20'+(_0x55d53c(0x6a7)+_0x210e6d[_0x55d53c(0x689)]+'\x0a')),console[_0x55d53c(0x777)](''),console['log'](_0x55d53c(0x565)),console[_0x55d53c(0x777)](_0x55d53c(0x6ac)+_0x210e6d[_0x55d53c(0x689)]+'\x20\x20('+_0x895ccc+_0x55d53c(0x807)),console['log'](_0x55d53c(0x889)+_0x273a8a),console['log'](_0x55d53c(0x399)+_0xada747['id']),console[_0x55d53c(0x777)](_0x55d53c(0x305)+_0x210e6d[_0x55d53c(0x689)]+_0x55d53c(0x824));!_0x210e6d['noAdmin']&&console[_0x55d53c(0x777)]('\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:'+_0x210e6d[_0x55d53c(0x689)]+_0x55d53c(0x7ca));console['log'](''),_0x134b25(_0xada747[_0x55d53c(0x7f3)]?.[_0x55d53c(0x2fc)]?.()??[]),process['on']('SIGINT',()=>_0x3daeeb(_0x55d53c(0x53f))),process['on'](_0x55d53c(0x390),()=>_0x3daeeb(_0x55d53c(0x390))),process['on'](_0x55d53c(0x70b),()=>_0x3daeeb(_0x55d53c(0x70b)));return;}const _0x32f997=new _0x4a64ff(_0x273a8a,_0x5d11f9);_0x32f997[_0x55d53c(0x777)][_0x55d53c(0x6e1)]?.();const _0x2f9c57=_0x32f997[_0x55d53c(0x777)][_0x55d53c(0x348)](_0x5466e2=>_0x1d5a84(_0x5466e2,_0x210e6d[_0x55d53c(0x655)]));if(_0x210e6d[_0x55d53c(0x68f)])process[_0x55d53c(0x376)][_0x55d53c(0x5ae)](_0x55d53c(0x613));await _0x32f997[_0x55d53c(0x35f)]();if(_0x210e6d['noRepl'])process[_0x55d53c(0x376)][_0x55d53c(0x5ae)](_0x55d53c(0x6ff));try{await _0x392887(_0x32f997,_0x210e6d[_0x55d53c(0x689)],_0x2bdc83(_0x210e6d));}catch(_0x3c486f){_0x3c486f[_0x55d53c(0x247)]===_0x55d53c(0x346)&&(console[_0x55d53c(0x20b)](_0x55d53c(0x669)+_0x210e6d[_0x55d53c(0x689)]+_0x55d53c(0x61d)),process[_0x55d53c(0x633)](0x1));throw _0x3c486f;}if(_0x210e6d['noRepl']){const _0x36e26d=_0x210e6d[_0x55d53c(0x6e2)]?.[_0x55d53c(0x573)]!==undefined?[]['concat'](_0x210e6d[_0x55d53c(0x6e2)]['host'])[_0x55d53c(0x4e8)](',\x20')+'\x20':'';process[_0x55d53c(0x376)][_0x55d53c(0x5ae)]('\x20\x20✓\x20http\x20listening\x20on\x20'+_0x36e26d+':'+_0x210e6d['port']+'\x0a');}if(!_0x210e6d[_0x55d53c(0x68f)])_0x32f997[_0x55d53c(0x777)]['detachConsole']?.(),_0x2f9c57?.(),_0x134b25(_0x32f997[_0x55d53c(0x7f3)]?.[_0x55d53c(0x2fc)]?.()??[]),await _0x55fb4f(_0x32f997,_0x210e6d);else{const _0x51fc7e=_0x18d719[_0x55d53c(0x4e8)](_0x273a8a,_0x55d53c(0x802));try{_0x30761f[_0x55d53c(0x67e)](_0x51fc7e,String(process[_0x55d53c(0x27f)]));}catch{}const _0x4744b5=Date[_0x55d53c(0x872)]()-_0x4f0118;console[_0x55d53c(0x777)](''),console[_0x55d53c(0x777)](_0x55d53c(0x3aa)),console[_0x55d53c(0x777)](_0x55d53c(0x428)+_0x210e6d[_0x55d53c(0x689)]),console[_0x55d53c(0x777)]('\x20\x20\x20\x20path:\x20\x20'+_0x273a8a),console[_0x55d53c(0x777)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x32f997['id']);{const _0xd01c9c=_0x32f997[_0x55d53c(0x46c)]?.['db']?.[_0x55d53c(0x564)]?.(_0x55d53c(0x8a8))??0x0,_0x446cd8=[..._0x32f997[_0x55d53c(0x441)][_0x55d53c(0x766)]()][_0x55d53c(0x7d3)](_0x3cfece=>!_0x3cfece[_0x55d53c(0x3b2)]('~'))['length'];if(_0x32f997['_license']?.['active']?.['licenseType']===0x1){const _0x34ba5f=Math[_0x55d53c(0x775)]((_0x32f997[_0x55d53c(0x661)][_0x55d53c(0x1d6)]['expiresAt']-Date[_0x55d53c(0x872)]())/0x5265c00);console[_0x55d53c(0x777)](_0x55d53c(0x82a)+_0x32f997['_license'][_0x55d53c(0x1d6)][_0x55d53c(0x6e7)]+_0x55d53c(0x3b5)+_0x34ba5f+_0x55d53c(0x671));}else{if(_0x32f997[_0x55d53c(0x661)]?.[_0x55d53c(0x1d6)]){const _0x1453a7=_0x32f997[_0x55d53c(0x661)][_0x55d53c(0x1d6)];console[_0x55d53c(0x777)]('\x20\x20\x20\x20license:\x20'+_0x1453a7[_0x55d53c(0x6e7)]+_0x55d53c(0x871)+new Date(_0x1453a7[_0x55d53c(0x481)])[_0x55d53c(0x794)]()[_0x55d53c(0x6f2)](0x0,0xa)+')');const _0x26b620=_0x1453a7[_0x55d53c(0x4b4)]||{};if(_0x26b620[_0x55d53c(0x7e1)]){const _0x292f37=Math[_0x55d53c(0x631)](_0xd01c9c/_0x26b620[_0x55d53c(0x7e1)]*0x64);console[_0x55d53c(0x777)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0xd01c9c[_0x55d53c(0x489)]()+_0x55d53c(0x607)+_0x26b620[_0x55d53c(0x7e1)][_0x55d53c(0x489)]()+_0x55d53c(0x37a)+_0x292f37+'%),\x20'+_0x446cd8+(_0x26b620['envs']?'/'+_0x26b620[_0x55d53c(0x8de)]:'')+'\x20env'+(_0x446cd8===0x1?'':'s'));}}else{if(_0x32f997[_0x55d53c(0x661)]){const _0x39b07a=_0x32f997[_0x55d53c(0x661)]['getPins'](),_0x518773=_0x39b07a['length']?_0x39b07a[_0x55d53c(0x47f)](_0x4f8869=>_0x4f8869[_0x55d53c(0x70a)])[_0x55d53c(0x4e8)](',\x20'):'(add\x20a\x20license\x20first)',_0x1bfe0d=_0x32f997[_0x55d53c(0x661)][_0x55d53c(0x817)],_0x116bf0=_0x1bfe0d[_0x55d53c(0x4b4)][_0x55d53c(0x7e1)]?Math['round'](_0xd01c9c/_0x1bfe0d[_0x55d53c(0x4b4)][_0x55d53c(0x7e1)]*0x64):0x0;console[_0x55d53c(0x777)](_0x55d53c(0x543)),console['log'](_0x55d53c(0x723)+_0xd01c9c[_0x55d53c(0x489)]()+_0x55d53c(0x607)+_0x1bfe0d[_0x55d53c(0x4b4)][_0x55d53c(0x7e1)]['toLocaleString']()+_0x55d53c(0x37a)+_0x116bf0+_0x55d53c(0x48c)+_0x446cd8+_0x55d53c(0x607)+_0x1bfe0d[_0x55d53c(0x4b4)][_0x55d53c(0x8de)]+_0x55d53c(0x7a2)),console[_0x55d53c(0x777)](_0x55d53c(0x6c3)+_0x518773);}}}}console[_0x55d53c(0x777)](_0x55d53c(0x7ab)+_0x210e6d[_0x55d53c(0x689)]+_0x55d53c(0x824));!_0x210e6d[_0x55d53c(0x2ff)]&&console[_0x55d53c(0x777)](_0x55d53c(0x1d3)+_0x210e6d[_0x55d53c(0x689)]+_0x55d53c(0x7ca));console[_0x55d53c(0x777)](''),console[_0x55d53c(0x777)](_0x55d53c(0x2c3)+_0x4744b5+'ms'),_0x134b25(_0x32f997[_0x55d53c(0x7f3)]?.['getSecurityNotices']?.()??[]);let _0x45ec90=![];async function _0x1fc296(_0x45e8a7){const _0x1ce7dc=_0x55d53c;_0x45ec90&&(process[_0x1ce7dc(0x7f8)][_0x1ce7dc(0x5ae)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x1ce7dc(0x633)](0x82));_0x45ec90=!![],process['stderr'][_0x1ce7dc(0x5ae)](_0x1ce7dc(0x4be)+(_0x45e8a7||'shutdown')+_0x1ce7dc(0x876));const _0x203cce=setTimeout(()=>{const _0x4ba4ca=_0x1ce7dc;process['stderr']['write'](_0x4ba4ca(0x207)),process[_0x4ba4ca(0x633)](0x1);},0x1388);try{_0x30761f[_0x1ce7dc(0x340)](_0x51fc7e);}catch{}try{await _0x32f997[_0x1ce7dc(0x2de)]();}catch(_0x1f395f){process['stderr'][_0x1ce7dc(0x5ae)](_0x1ce7dc(0x44c)+(_0x1f395f?.[_0x1ce7dc(0x262)]??_0x1f395f)+'\x0a');}clearTimeout(_0x203cce),process['stderr'][_0x1ce7dc(0x5ae)](_0x1ce7dc(0x20d)),process[_0x1ce7dc(0x633)](0x0);}process['on'](_0x55d53c(0x53f),()=>_0x1fc296(_0x55d53c(0x53f))),process['on'](_0x55d53c(0x390),()=>_0x1fc296(_0x55d53c(0x390))),process['on'](_0x55d53c(0x70b),()=>_0x1fc296(_0x55d53c(0x70b)));}}const _0x13d896=new Set([_0x40e4c2(0x50b),'doctor',_0x40e4c2(0x859),_0x40e4c2(0x2b8),_0x40e4c2(0x765),_0x40e4c2(0x5f1),'import',_0x40e4c2(0x87a),_0x40e4c2(0x3d0),'join',_0x40e4c2(0x42d)]),_0x4ee045=process['argv'][0x2];if(_0x4ee045===_0x40e4c2(0x50b))console[_0x40e4c2(0x777)](require$$3[_0x40e4c2(0x50b)]),process[_0x40e4c2(0x633)](0x0);else{if(_0x4ee045==='shm-gc')process['exit'](requireOkdbShmGc()[_0x40e4c2(0x4f9)](process[_0x40e4c2(0x330)]['slice'](0x3)));else{if(_0x4ee045&&_0x13d896[_0x40e4c2(0x5d6)](_0x4ee045)){const _0x47e8c4=process[_0x40e4c2(0x330)]['slice'](0x3),_0x1b40f4=_0x237a0d([_0x40e4c2(0x2e5),'okdb',..._0x47e8c4]),_0x51b443=_0x38d00c(_0x1b40f4),_0x474144=new Set([_0x40e4c2(0x56a),'-d',_0x40e4c2(0x569),'-k','--config','-c',_0x40e4c2(0x4e1),'-p',_0x40e4c2(0x7fa),'--env','-e',_0x40e4c2(0x621),_0x40e4c2(0x36e),'--password',_0x40e4c2(0x6cf),_0x40e4c2(0x826),_0x40e4c2(0x7fc),_0x40e4c2(0x2b5),_0x40e4c2(0x730),_0x40e4c2(0x610),'-u',_0x40e4c2(0x742)]);let _0x285053=null;for(let _0x208413=0x0;_0x208413<_0x47e8c4[_0x40e4c2(0x744)];_0x208413++){if(_0x474144[_0x40e4c2(0x5d6)](_0x47e8c4[_0x208413])){_0x208413++;continue;}if(!_0x47e8c4[_0x208413][_0x40e4c2(0x3b2)]('-')){_0x285053=_0x47e8c4[_0x208413];break;}}(async()=>{const _0x20fea7=_0x40e4c2;if(_0x4ee045==='token'){const _0x50227d=process[_0x20fea7(0x330)][0x3],_0x17671e=process[_0x20fea7(0x330)][_0x20fea7(0x6f2)](0x4),_0x2d9692=_0x237a0d([_0x20fea7(0x2e5),'okdb',..._0x17671e]),_0x4a59df=_0x38d00c(_0x2d9692),_0x219854=new Set([_0x20fea7(0x56a),'-d','--key','-k','--config','-c',_0x20fea7(0x4e1),'-p','--name','--password',_0x20fea7(0x6cf),_0x20fea7(0x826),_0x20fea7(0x7fc),'--ttl',_0x20fea7(0x7fa),_0x20fea7(0x504),'-e',_0x20fea7(0x621)]),_0x432941=[];for(let _0x47ec52=0x0;_0x47ec52<_0x17671e[_0x20fea7(0x744)];_0x47ec52++){if(_0x219854['has'](_0x17671e[_0x47ec52])){_0x47ec52++;continue;}if(_0x17671e[_0x47ec52][_0x20fea7(0x3b2)]('-'))continue;_0x432941[_0x20fea7(0x5bb)](_0x17671e[_0x47ec52]);}switch(_0x50227d){case _0x20fea7(0x234):await _0x2fec49(_0x4a59df,_0x2d9692);break;case _0x20fea7(0x323):await _0x333e5d(_0x4a59df);break;case _0x20fea7(0x515):await _0x1de6ce(_0x432941[0x0],_0x4a59df);break;default:console[_0x20fea7(0x20b)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x50227d+_0x20fea7(0x3bf)),process[_0x20fea7(0x633)](0x1);}return;}if(_0x4ee045===_0x20fea7(0x42d)){const _0x5d5084=requireOkdbLicenseCodec(),_0x17d26a=process[_0x20fea7(0x330)]['slice'](0x3),_0x33186d=_0x237a0d([_0x20fea7(0x2e5),_0x20fea7(0x1cc),..._0x17d26a]),_0x46a9f4=_0x38d00c(_0x33186d),_0x393065=new Set([_0x20fea7(0x56a),'-d',_0x20fea7(0x569),'-k',_0x20fea7(0x3b9),'-c','--port','-p','--log-level']),_0x300b64=[];for(let _0x216f31=0x0;_0x216f31<_0x17d26a[_0x20fea7(0x744)];_0x216f31++){if(_0x393065[_0x20fea7(0x5d6)](_0x17d26a[_0x216f31])){_0x216f31++;continue;}if(_0x17d26a[_0x216f31][_0x20fea7(0x3b2)]('-'))continue;_0x300b64[_0x20fea7(0x5bb)](_0x17d26a[_0x216f31]);}const _0x54bb7c=_0x300b64[0x0]??null;if(_0x54bb7c===_0x20fea7(0x7c3))await _0xbeb082(_0x300b64[0x1],_0x46a9f4);else{if(!_0x54bb7c)await _0x469c0a(_0x46a9f4);else{let _0x4924be=_0x5d5084[_0x20fea7(0x237)](_0x54bb7c);if(_0x4924be===_0x20fea7(0x3fb)&&_0x30761f[_0x20fea7(0x50f)](_0x54bb7c))_0x4924be=_0x20fea7(0x239);if(_0x4924be===_0x20fea7(0x239))try{const _0x2633ee=_0x30761f['readFileSync'](_0x54bb7c,'utf8')[_0x20fea7(0x44e)](),_0xa06951=_0x5d5084['detectInputType'](_0x2633ee);if(_0xa06951===_0x20fea7(0x3f3)){await _0x2eb1d7(_0x2633ee,_0x46a9f4);return;}await _0x56db77(_0x54bb7c,_0x46a9f4);return;}catch(_0x56d3f2){console[_0x20fea7(0x20b)](_0x20fea7(0x862)+_0x54bb7c+':\x20'+_0x56d3f2[_0x20fea7(0x262)]),process[_0x20fea7(0x633)](0x1);}switch(_0x4924be){case'blob':await _0x56db77(_0x54bb7c,_0x46a9f4);break;case _0x20fea7(0x3f3):await _0x2eb1d7(_0x54bb7c,_0x46a9f4);break;case _0x20fea7(0x843):await _0xb9d714(_0x54bb7c,_0x46a9f4);break;default:console[_0x20fea7(0x20b)]('[okdb]\x20error:\x20unrecognized\x20input:\x20\x22'+_0x54bb7c+'\x22'),console[_0x20fea7(0x20b)](''),console[_0x20fea7(0x20b)](_0x20fea7(0x788)),console[_0x20fea7(0x20b)](_0x20fea7(0x598)),console['error'](_0x20fea7(0x8d5)),console[_0x20fea7(0x20b)]('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x20fea7(0x20b)](_0x20fea7(0x242)),console[_0x20fea7(0x20b)](''),console[_0x20fea7(0x20b)]('\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]'),process[_0x20fea7(0x633)](0x1);}}}return;}switch(_0x4ee045){case _0x20fea7(0x8a1):await _0x19f828(_0x51b443);break;case _0x20fea7(0x859):await _0x2fdb13();break;case _0x20fea7(0x87a):await _0x4adfc8(_0x51b443);break;case _0x20fea7(0x2b8):await _0x26f23b(_0x285053??_0x18d719[_0x20fea7(0x651)](_0x20fea7(0x276)),_0x51b443);break;case _0x20fea7(0x765):if(!_0x285053)throw new Error(_0x20fea7(0x741));await _0x21cb81(_0x18d719[_0x20fea7(0x651)](_0x285053),_0x51b443,_0x1b40f4);break;case _0x20fea7(0x5f1):await _0x962d04(_0x285053??_0x18d719[_0x20fea7(0x651)](_0x20fea7(0x313)),_0x51b443,_0x1b40f4);break;case _0x20fea7(0x3f8):await _0x157dbe(_0x285053??_0x18d719[_0x20fea7(0x651)]('./okdb-export.ndjson'),_0x51b443,_0x1b40f4);break;case _0x20fea7(0x4e8):await _0x296d47(_0x285053,_0x51b443,_0x1b40f4);break;}})()[_0x40e4c2(0x39e)](()=>process[_0x40e4c2(0x633)](0x0))[_0x40e4c2(0x520)](_0x54e3ae=>{const _0x46e7c9=_0x40e4c2;console['error'](_0x46e7c9(0x2a1)+(_0x54e3ae[_0x46e7c9(0x262)]||_0x54e3ae)+'\x0a'),process['exit'](0x1);});}else _0xc10ed7()[_0x40e4c2(0x520)](_0x521a9a=>{const _0x5a8787=_0x40e4c2;console[_0x5a8787(0x20b)](_0x5a8787(0x5a1)),console[_0x5a8787(0x20b)](_0x521a9a[_0x5a8787(0x813)]||_0x521a9a),process[_0x5a8787(0x633)](0x1);});}}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x55b176(0x87e)]=okdb;