@kedem/okdb 1.8.17 → 1.9.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.
Files changed (39) hide show
  1. package/bin/okdb.js +1 -1
  2. package/docs/change-log.md +16 -16
  3. package/docs/embeddings.md +1 -1
  4. package/docs/functions.md +26 -25
  5. package/docs/http-cluster.md +157 -0
  6. package/docs/index.md +1 -0
  7. package/docs/manifest.json +5 -1
  8. package/docs/process-registry.md +185 -0
  9. package/docs/processors.md +61 -65
  10. package/docs/queue.md +23 -13
  11. package/docs/subscriptions.md +230 -0
  12. package/docs/worker-fleet.md +139 -0
  13. package/okdb-functions-runner-child.js +1 -1
  14. package/okdb-functions-sandbox-worker.js +1 -0
  15. package/okdb-http-worker-child.js +1 -0
  16. package/okdb-queue-load-handler.js +1 -0
  17. package/okdb-queue-spawn-child.js +1 -1
  18. package/okdb-views-bootstrap-worker.js +1 -1
  19. package/okdb-worker-child.js +1 -0
  20. package/okdb.js +1 -1
  21. package/package.json +1 -1
  22. package/public/sections/db/parts/db-overview.ok.js +1 -1
  23. package/public/sections/embeddings/parts/pipeline-create-panel.ok.js +1 -1
  24. package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
  25. package/public/sections/system/index.ok.html +1 -1
  26. package/public/sections/system/modals/data-ops-modal.ok.js +1 -1
  27. package/public/sections/system/parts/system-process-panel.ok.js +1 -0
  28. package/public/sections/system/parts/system-processing-panel.ok.js +1 -0
  29. package/public/sections/system/parts/system-runtime-overview.ok.js +1 -0
  30. package/public/sections/system/parts/system-workers-panel.ok.js +1 -0
  31. package/types/environment.d.ts +21 -4
  32. package/types/features/embeddings.d.ts +11 -2
  33. package/types/features/queue.d.ts +27 -5
  34. package/types/features/views.d.ts +10 -10
  35. package/types/index.d.ts +54 -6
  36. package/types/options.d.ts +12 -0
  37. package/okdb-fts-handler.js +0 -1
  38. package/okdb-processor-worker.js +0 -1
  39. package/public/sections/processors/index.ok.html +0 -1
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x3cf8a9=_0x4085;(function(_0x580c93,_0x192aae){const _0x57f419=_0x4085,_0x217ab9=_0x580c93();while(!![]){try{const _0x550b0a=-parseInt(_0x57f419(0x2a2))/0x1*(parseInt(_0x57f419(0x1d3))/0x2)+parseInt(_0x57f419(0x20d))/0x3+parseInt(_0x57f419(0x133))/0x4+parseInt(_0x57f419(0x2f9))/0x5+parseInt(_0x57f419(0x1ed))/0x6*(-parseInt(_0x57f419(0x320))/0x7)+parseInt(_0x57f419(0x413))/0x8+-parseInt(_0x57f419(0x279))/0x9;if(_0x550b0a===_0x192aae)break;else _0x217ab9['push'](_0x217ab9['shift']());}catch(_0x2b30fa){_0x217ab9['push'](_0x217ab9['shift']());}}}(_0x147a,0x86b9f));var require$$1$1=require(_0x3cf8a9(0x32b)),require$$1=require('fs'),require$$3=require(_0x3cf8a9(0x3f1)),require$$0$2=require(_0x3cf8a9(0x386)),require$$5=require(_0x3cf8a9(0x2bf)),require$$0=require(_0x3cf8a9(0x213)),require$$0$1=require(_0x3cf8a9(0x35d)),require$$2$1=require('os'),require$$4=require('child_process');function getDefaultExportFromCjs(_0x135289){const _0x5417fc=_0x3cf8a9;return _0x135289&&_0x135289[_0x5417fc(0x3fd)]&&Object[_0x5417fc(0x2f5)][_0x5417fc(0x3db)][_0x5417fc(0x38b)](_0x135289,_0x5417fc(0x2ab))?_0x135289[_0x5417fc(0x2ab)]:_0x135289;}var okdb$1={},version=_0x3cf8a9(0x381),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x36f6f0=require$$0;function _0x2391d6(_0x1a87c7,_0x43ec13){const _0x13f891=_0x4085;return _0x36f6f0[_0x13f891(0x3dd)](_0x13f891(0x33b),_0x43ec13)[_0x13f891(0x275)](_0x1a87c7)[_0x13f891(0x260)]('base64url');}function _0x239045(_0x31a56d,_0xbf569e){const _0x5de557=_0x4085;if(typeof _0x31a56d!==_0x5de557(0x395)||typeof _0xbf569e!==_0x5de557(0x395))return![];if(Buffer[_0x5de557(0x1ea)](_0x31a56d)!==Buffer[_0x5de557(0x1ea)](_0xbf569e))return![];return _0x36f6f0['timingSafeEqual'](Buffer[_0x5de557(0x1ff)](_0x31a56d),Buffer[_0x5de557(0x1ff)](_0xbf569e));}function _0xf1087f(_0x2cc73a){const _0x3d1434=_0x4085;if(!_0x2cc73a?.[_0x3d1434(0x343)](_0x3d1434(0x173)))return null;return _0x2cc73a[_0x3d1434(0x219)](0x7);}function _0x693b42(_0x30ae72=0x20){const _0x4f241b=_0x4085;return _0x36f6f0['randomBytes'](_0x30ae72)[_0x4f241b(0x1d9)](_0x4f241b(0x2b5));}function _0x3ae719(_0x505275){const _0x3a90b5=_0x4085;return _0x36f6f0[_0x3a90b5(0x295)](_0x3a90b5(0x33b))[_0x3a90b5(0x275)](_0x505275)[_0x3a90b5(0x260)](_0x3a90b5(0x17b));}function _0x148232(_0x552bb7,_0x355cb3,_0x815faa=0x36ee80){const _0x5c9953=_0x4085;if(!_0x355cb3)throw new Error('Token\x20secret\x20not\x20configured');const _0x5d9b95=Date[_0x5c9953(0x18f)](),_0x1e164d=Buffer[_0x5c9953(0x1ff)](JSON[_0x5c9953(0x21f)]({'iat':_0x5d9b95,'exp':_0x5d9b95+_0x815faa,'sub':_0x552bb7?.['id']??_0x552bb7?.[_0x5c9953(0x31f)]??null,'username':_0x552bb7?.[_0x5c9953(0x20c)]??_0x552bb7?.['name']??null,'roles':Array[_0x5c9953(0x105)](_0x552bb7?.[_0x5c9953(0x30c)])?_0x552bb7[_0x5c9953(0x30c)]:[]}))['toString'](_0x5c9953(0x2b5)),_0x331b0d=_0x2391d6(_0x1e164d,_0x355cb3);return _0x1e164d+'.'+_0x331b0d;}function _0x1452c8(_0x4488be,_0x321d39){const _0x2b6aae=_0x4085;if(!_0x321d39||typeof _0x4488be!==_0x2b6aae(0x395))return null;const [_0x2f9e7f,_0x3cdda2]=_0x4488be[_0x2b6aae(0x250)]('.');if(!_0x2f9e7f||!_0x3cdda2)return null;const _0x1bbf0a=_0x2391d6(_0x2f9e7f,_0x321d39);if(!_0x239045(_0x3cdda2,_0x1bbf0a))return null;try{const _0x5802e0=JSON[_0x2b6aae(0x17a)](Buffer[_0x2b6aae(0x1ff)](_0x2f9e7f,'base64url')['toString']()),_0x9bfed8=0x7530;if(Date[_0x2b6aae(0x18f)]()>Number(_0x5802e0?.[_0x2b6aae(0x3cf)]??0x0)+_0x9bfed8)return null;return _0x5802e0;}catch{return null;}}async function _0x2156ab(_0x545e22){return new Promise((_0x4bd513,_0x550568)=>{const _0x4005bd=_0x4085,_0xb6411=_0x36f6f0[_0x4005bd(0x3f5)](0x10);_0x36f6f0[_0x4005bd(0x362)](_0x545e22,_0xb6411,0x40,(_0x387ffb,_0x1615f6)=>{const _0x462b9c=_0x4005bd;if(_0x387ffb)_0x550568(_0x387ffb);_0x4bd513(_0xb6411[_0x462b9c(0x1d9)](_0x462b9c(0x17b))+':'+_0x1615f6[_0x462b9c(0x1d9)](_0x462b9c(0x17b)));});});}async function _0x2e4cf6(_0x1dad10,_0x15c699){const _0x5e458e=_0x4085,[_0xb0b8eb,_0x27bf89]=_0x15c699[_0x5e458e(0x250)](':');if(!_0xb0b8eb||!_0x27bf89)return![];const _0x33c657=Buffer[_0x5e458e(0x1ff)](_0xb0b8eb,_0x5e458e(0x17b));return new Promise((_0x3356a7,_0x285180)=>{const _0x415bb6=_0x5e458e;_0x36f6f0[_0x415bb6(0x362)](_0x1dad10,_0x33c657,0x40,(_0x4b0c2d,_0x4409fa)=>{const _0x47358c=_0x415bb6;if(_0x4b0c2d)_0x285180(_0x4b0c2d);_0x3356a7(_0x36f6f0[_0x47358c(0x217)](_0x4409fa,Buffer[_0x47358c(0x1ff)](_0x27bf89,_0x47358c(0x17b))));});});}return okdbAuthTokens={'hmac':_0x2391d6,'timingSafeEqual':_0x239045,'parseBearer':_0xf1087f,'randomToken':_0x693b42,'hashToken':_0x3ae719,'issueToken':_0x148232,'authenticateToken':_0x1452c8,'hashPassword':_0x2156ab,'verifyPassword':_0x2e4cf6},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function _0x4085(_0x3b9734,_0x217779){_0x3b9734=_0x3b9734-0x104;const _0x147adc=_0x147a();let _0x408582=_0x147adc[_0x3b9734];return _0x408582;}function requireOkdbLicenseCodec(){const _0x42eecf=_0x3cf8a9;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x611274=require$$0$1,_0xcb656e=_0x42eecf(0x183),_0x4c976a=new Uint8Array(0x100)[_0x42eecf(0x31a)](0xff);for(let _0x63da8c=0x0;_0x63da8c<_0xcb656e[_0x42eecf(0x340)];_0x63da8c++){_0x4c976a[_0xcb656e[_0x42eecf(0x3e1)](_0x63da8c)]=_0x63da8c,_0x4c976a[_0xcb656e['charCodeAt'](_0x63da8c)+0x20]=_0x63da8c;}_0x4c976a['O'[_0x42eecf(0x3e1)](0x0)]=0x0,_0x4c976a['o'[_0x42eecf(0x3e1)](0x0)]=0x0,_0x4c976a['I'[_0x42eecf(0x3e1)](0x0)]=0x1,_0x4c976a['i'[_0x42eecf(0x3e1)](0x0)]=0x1,_0x4c976a['L'[_0x42eecf(0x3e1)](0x0)]=0x1,_0x4c976a['l'[_0x42eecf(0x3e1)](0x0)]=0x1;function _0x3b11c6(_0x546b35){const _0x53507b=_0x42eecf;let _0x3a303f=0x0,_0x5775ed=0x0,_0x517ce0='';for(let _0x486314=0x0;_0x486314<_0x546b35[_0x53507b(0x340)];_0x486314++){_0x5775ed=_0x5775ed<<0x8|_0x546b35[_0x486314],_0x3a303f+=0x8;while(_0x3a303f>=0x5){_0x3a303f-=0x5,_0x517ce0+=_0xcb656e[_0x5775ed>>>_0x3a303f&0x1f];}}return _0x3a303f>0x0&&(_0x517ce0+=_0xcb656e[_0x5775ed<<0x5-_0x3a303f&0x1f]),_0x517ce0;}function _0x20e2d6(_0x264c20){const _0x2ac43d=_0x42eecf;_0x264c20=_0x264c20[_0x2ac43d(0x29d)](/-/g,'')[_0x2ac43d(0x3aa)]();let _0x160677=0x0,_0x57ff2c=0x0;const _0x5d2fe8=[];for(let _0x277eb1=0x0;_0x277eb1<_0x264c20[_0x2ac43d(0x340)];_0x277eb1++){const _0x4065b2=_0x4c976a[_0x264c20[_0x2ac43d(0x3e1)](_0x277eb1)];if(_0x4065b2===0xff)continue;_0x57ff2c=_0x57ff2c<<0x5|_0x4065b2,_0x160677+=0x5,_0x160677>=0x8&&(_0x160677-=0x8,_0x5d2fe8['push'](_0x57ff2c>>>_0x160677&0xff));}return Buffer[_0x2ac43d(0x1ff)](_0x5d2fe8);}const _0x511a35=[_0x42eecf(0x2b9),_0x42eecf(0x2c6),'engines',_0x42eecf(0x26e),_0x42eecf(0x27c),'views',_0x42eecf(0x3b1),_0x42eecf(0x243)],_0x307e40=0x0,_0x30d654=0x1,_0xefadbe=0x2,_0x16dc26=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x4f5939({issuedAt:_0x4faa4f,expiresAt:_0x283f59,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x307e40}){const _0x1bd331=_0x42eecf,_0x47e939=Buffer[_0x1bd331(0x1ff)](licensee,_0x1bd331(0x40c))[_0x1bd331(0x219)](0x0,0x40),_0x3cbc76=0x1+0x1+0x4+0x4+0x1+_0x47e939[_0x1bd331(0x340)]+0x2+0x10,_0x3a89a6=Buffer['allocUnsafe'](_0x3cbc76);let _0x2d2105=0x0;_0x3a89a6[_0x1bd331(0x306)](0x1,_0x2d2105++),_0x3a89a6[_0x1bd331(0x306)](licenseType,_0x2d2105++),_0x3a89a6[_0x1bd331(0x1cf)](Math[_0x1bd331(0x14b)](_0x4faa4f/0x3e8),_0x2d2105),_0x2d2105+=0x4,_0x3a89a6[_0x1bd331(0x1cf)](Math[_0x1bd331(0x14b)](_0x283f59/0x3e8),_0x2d2105),_0x2d2105+=0x4,_0x3a89a6[_0x1bd331(0x306)](_0x47e939['length'],_0x2d2105++),_0x47e939[_0x1bd331(0x1a8)](_0x3a89a6,_0x2d2105),_0x2d2105+=_0x47e939['length'];let _0x3183db=0x0;for(let _0x47992d=0x0;_0x47992d<_0x511a35[_0x1bd331(0x340)];_0x47992d++){if(features[_0x511a35[_0x47992d]])_0x3183db|=0x1<<_0x47992d;}_0x3a89a6[_0x1bd331(0x238)](_0x3183db,_0x2d2105),_0x2d2105+=0x2;const _0xff821a=[_0x1bd331(0x12c),'typesPerEnv','syncPeers',_0x1bd331(0x34a)];for(const _0x17b5dc of _0xff821a){_0x3a89a6[_0x1bd331(0x1cf)](limits[_0x17b5dc]||0x0,_0x2d2105),_0x2d2105+=0x4;}return _0x3a89a6;}function _0x203e14(_0x158457){const _0x2f0b32=_0x42eecf;let _0x213f8e=0x0;const _0x59e5bb=_0x158457[_0x2f0b32(0x38a)](_0x213f8e++),_0x1053c4=_0x158457[_0x2f0b32(0x38a)](_0x213f8e++),_0x14b064=_0x158457[_0x2f0b32(0x3c3)](_0x213f8e);_0x213f8e+=0x4;const _0x2fa1fe=_0x158457[_0x2f0b32(0x3c3)](_0x213f8e);_0x213f8e+=0x4;const _0x2fd059=_0x158457[_0x2f0b32(0x38a)](_0x213f8e++),_0x4f62da=_0x158457[_0x2f0b32(0x219)](_0x213f8e,_0x213f8e+_0x2fd059)[_0x2f0b32(0x1d9)](_0x2f0b32(0x40c));_0x213f8e+=_0x2fd059;const _0x274421=_0x158457[_0x2f0b32(0x418)](_0x213f8e);_0x213f8e+=0x2;const _0x1392d9={};for(let _0x3ed0fa=0x0;_0x3ed0fa<_0x511a35[_0x2f0b32(0x340)];_0x3ed0fa++){_0x1392d9[_0x511a35[_0x3ed0fa]]=Boolean(_0x274421&0x1<<_0x3ed0fa);}const _0x50641f=['envs',_0x2f0b32(0x265),_0x2f0b32(0x15d),_0x2f0b32(0x34a)],_0x2204ff={};for(const _0x32c991 of _0x50641f){const _0x260e44=_0x158457['readUInt32BE'](_0x213f8e);_0x213f8e+=0x4,_0x2204ff[_0x32c991]=_0x260e44===0x0?null:_0x260e44;}return{'v':_0x59e5bb,'licenseType':_0x1053c4,'issuedAt':_0x14b064*0x3e8,'expiresAt':_0x2fa1fe*0x3e8,'licensee':_0x4f62da,'features':_0x1392d9,'limits':_0x2204ff};}function _0x41a52a(_0x191935,_0x5003ca){const _0x56f457=_0x42eecf,_0x4f423e=Buffer[_0x56f457(0x398)]([_0x191935,_0x5003ca]),_0x29ca09=_0x3b11c6(_0x4f423e),_0x2d44d3=[];for(let _0x4545be=0x0;_0x4545be<_0x29ca09[_0x56f457(0x340)];_0x4545be+=0x8){_0x2d44d3[_0x56f457(0x2c5)](_0x29ca09[_0x56f457(0x219)](_0x4545be,_0x4545be+0x8));}return _0x2d44d3[_0x56f457(0x251)]('-');}function _0x426ddd(_0xfe478a){const _0x10160a=_0x42eecf;if(typeof _0xfe478a!==_0x10160a(0x395))throw new Error('decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string');const _0x3928e6=_0x20e2d6(_0xfe478a[_0x10160a(0x29d)](/-/g,''));if(_0x3928e6[_0x10160a(0x340)]<0x41)throw new Error(_0x10160a(0x1f6)+_0x3928e6['length']+_0x10160a(0x357));const _0x1aff62=_0x3928e6[_0x10160a(0x219)](0x0,_0x3928e6['length']-0x40),_0x4ff890=_0x3928e6[_0x10160a(0x219)](_0x3928e6[_0x10160a(0x340)]-0x40);let _0x1f1874;try{_0x1f1874=_0x203e14(_0x1aff62);}catch(_0x3d893c){throw new Error('decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20'+_0x3d893c[_0x10160a(0x227)]);}return{'rawBuf':_0x3928e6,'payload':_0x1aff62,'sig':_0x4ff890,'decoded':_0x1f1874};}function _0x384615(_0x525530){const _0x33f4fd=_0x42eecf;return _0x611274[_0x33f4fd(0x295)](_0x33f4fd(0x33b))[_0x33f4fd(0x275)](_0x525530)['digest']()[_0x33f4fd(0x219)](0x0,0x8);}function _0x421578(_0x1652d3,_0x5a468c,_0x298ecd){const _0x156e47=_0x42eecf,_0x2b3cd5=_0x156e47(0x1ef)+_0x298ecd,_0x58bbea=Buffer[_0x156e47(0x398)]([Buffer[_0x156e47(0x1ff)](_0x1652d3,_0x156e47(0x40c)),_0x5a468c]),_0x22a231=_0x611274[_0x156e47(0x3dd)](_0x156e47(0x33b),_0x2b3cd5)[_0x156e47(0x275)](_0x58bbea)['digest'](),_0x3675dd=_0x3b11c6(_0x22a231['slice'](0x0,0x5));return{'pin':_0x3675dd,'pinHmac':_0x22a231};}function _0xf4ec3e(_0x454f25,_0x5af387,_0x2f7ae3){const _0x5bf5f6=_0x42eecf,_0x57e695=Buffer[_0x5bf5f6(0x2de)](0x4d);let _0x3c522d=0x0;_0x57e695['writeUInt8'](0x1,_0x3c522d++),_0x454f25[_0x5bf5f6(0x1a8)](_0x57e695,_0x3c522d),_0x3c522d+=0x8,_0x57e695[_0x5bf5f6(0x1cf)](_0x5af387,_0x3c522d),_0x3c522d+=0x4,_0x2f7ae3[_0x5bf5f6(0x1a8)](_0x57e695,_0x3c522d);const _0x225ff7=_0x3b11c6(_0x57e695),_0x21f2e6=[];for(let _0x18741c=0x0;_0x18741c<_0x225ff7[_0x5bf5f6(0x340)];_0x18741c+=0x6){_0x21f2e6[_0x5bf5f6(0x2c5)](_0x225ff7[_0x5bf5f6(0x219)](_0x18741c,_0x18741c+0x6));}return _0x21f2e6['join']('-');}function _0x5e6dc2(_0x11cfaa){const _0x4a918b=_0x42eecf;if(typeof _0x11cfaa!=='string')throw new Error(_0x4a918b(0x337));const _0x25d99f=_0x20e2d6(_0x11cfaa[_0x4a918b(0x29d)](/-/g,''));if(_0x25d99f[_0x4a918b(0x340)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x25d99f[_0x4a918b(0x340)]);let _0x32300c=0x0;const _0x1b9f22=_0x25d99f[_0x4a918b(0x38a)](_0x32300c++),_0x87836=_0x25d99f[_0x4a918b(0x219)](_0x32300c,_0x32300c+0x8);_0x32300c+=0x8;const _0x40f48e=_0x25d99f['readUInt32BE'](_0x32300c);_0x32300c+=0x4;const _0x58a3ee=_0x25d99f[_0x4a918b(0x219)](_0x32300c);return{'v':_0x1b9f22,'licenseHash':_0x87836,'expiry':_0x40f48e,'sig':_0x58a3ee};}function _0x42227d({tokenString:_0x21ec78,nodeId:_0x5c4232,rawBlobBuf:_0x5e36b5,pubKeyPem:_0x28def0,pubFingerprint:_0x10efa1}){const _0x3a8171=_0x42eecf;let _0x3c473e;try{_0x3c473e=_0x5e6dc2(_0x21ec78);}catch(_0x72134e){return{'valid':![],'reason':_0x3a8171(0x1a9)};}const _0x452a82=_0x384615(_0x5e36b5);if(!_0x452a82[_0x3a8171(0x2cd)](_0x3c473e[_0x3a8171(0x254)]))return{'valid':![],'reason':_0x3a8171(0x2ec)};const {pinHmac:_0x1a2873}=_0x421578(_0x5c4232,_0x452a82,_0x10efa1),_0xa0323c=Buffer['allocUnsafe'](0x4);_0xa0323c[_0x3a8171(0x1cf)](_0x3c473e[_0x3a8171(0x1b8)],0x0);const _0x8fc9f6=Buffer[_0x3a8171(0x398)]([Buffer[_0x3a8171(0x1ff)]([_0x3c473e['v']]),_0x1a2873['slice'](0x0,0x5),_0x3c473e[_0x3a8171(0x254)],_0xa0323c]);try{const _0x4d17aa=_0x611274[_0x3a8171(0x303)](null,_0x8fc9f6,_0x28def0,_0x3c473e[_0x3a8171(0x325)]);if(!_0x4d17aa)return{'valid':![],'reason':_0x3a8171(0x331)};}catch(_0x7b4930){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x3c473e['expiry']<Date[_0x3a8171(0x18f)]()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x1397fa(_0x116a61){const _0x21fd94=_0x42eecf;if(typeof _0x116a61!==_0x21fd94(0x395))return _0x21fd94(0x2f2);const _0x5bc201=_0x116a61[_0x21fd94(0x324)]();if(_0x5bc201[_0x21fd94(0x343)]('/')||_0x5bc201[_0x21fd94(0x343)]('./')||_0x5bc201['startsWith'](_0x21fd94(0x1fa))||/^[A-Za-z]:[\\/]/[_0x21fd94(0x21b)](_0x5bc201))return _0x21fd94(0x32b);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x21fd94(0x21b)](_0x5bc201))return _0x21fd94(0x271);const _0x36972f=_0x5bc201[_0x21fd94(0x29d)](/[\s-]+/g,'')['length'];if(_0x36972f===0x7c)return _0x21fd94(0x38c);if(_0x36972f>=0x95&&_0x36972f<=0xfc)return'blob';return'unknown';}return okdbLicenseCodec={'toBase32':_0x3b11c6,'fromBase32':_0x20e2d6,'encodeLicensePayload':_0x4f5939,'decodeLicensePayload':_0x203e14,'encodeLicenseBlob':_0x41a52a,'decodeLicenseBlob':_0x426ddd,'licenseHash':_0x384615,'derivePin':_0x421578,'encodeActivationToken':_0xf4ec3e,'decodeActivationToken':_0x5e6dc2,'verifyActivation':_0x42227d,'detectInputType':_0x1397fa,'FEATURE_NAMES':_0x511a35,'LICENSE_TYPE_STANDARD':_0x307e40,'LICENSE_TYPE_OPEN':_0x30d654,'LICENSE_TYPE_INTERNAL':_0xefadbe,'OPEN_LICENSE_MAX_DURATION_MS':_0x16dc26},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x2ea604 extends Error{constructor(_0x4e0a9f,_0x1a1292,_0x577230={}){const _0x4cdbc2=_0x4085;super(_0x4e0a9f),this[_0x4cdbc2(0x167)]=_0x4cdbc2(0x186),this[_0x4cdbc2(0x341)]=_0x1a1292,this['details']=_0x577230,_0x577230[_0x4cdbc2(0x36a)]&&(this[_0x4cdbc2(0x36a)]=_0x577230[_0x4cdbc2(0x36a)]),Error['captureStackTrace'](this,this[_0x4cdbc2(0x2d4)]);}}class _0x4bbccd extends _0x2ea604{constructor(_0x58d193,_0x207b8e,_0x5eff4c,_0xd744f6){const _0x519b26=_0x4085;super('Version\x20mismatch\x20for\x20'+_0x58d193+'@'+_0x207b8e+_0x519b26(0x117)+_0x5eff4c+_0x519b26(0x300)+_0xd744f6,_0x519b26(0x27d),{'type':_0x58d193,'key':_0x207b8e,'expectedVersion':_0x5eff4c,'actualVersion':_0xd744f6}),this['name']=_0x519b26(0x15f);}}class _0x5ef54a extends _0x2ea604{constructor(_0xd46feb,_0x166536){const _0x3b6706=_0x4085;super(_0xd46feb+'@'+_0x166536+_0x3b6706(0x28e),'NOT_FOUND',{'type':_0xd46feb,'key':_0x166536}),this[_0x3b6706(0x167)]=_0x3b6706(0x245);}}class _0x3f5aee extends _0x2ea604{constructor(_0x4b4cd1,_0x423974){const _0x4a12b8=_0x4085;super(_0x4b4cd1+'@'+_0x423974+_0x4a12b8(0x2d3),_0x4a12b8(0x13b),{'type':_0x4b4cd1,'key':_0x423974}),this[_0x4a12b8(0x167)]=_0x4a12b8(0x33e);}}class _0x108b91 extends _0x2ea604{constructor(_0x2ea533,_0x1b8f7e){const _0x4caba0=_0x4085,_0x4a828e=typeof _0x1b8f7e;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x2ea533+_0x4caba0(0x38f)+_0x4a828e+_0x4caba0(0x2e3)+_0x1b8f7e,_0x4caba0(0x38e),{'index':_0x2ea533,'key':_0x1b8f7e,'keyType':_0x4a828e}),this['name']='OKDBInvalidIndexKeyError';}}class _0x5337ad extends _0x2ea604{constructor(_0x24ee95){const _0x14dea3=_0x4085,_0x18e30e=typeof _0x24ee95;super(_0x14dea3(0x21c)+_0x18e30e+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x24ee95,'INVALID_PRIMARY_KEY',{'key':_0x24ee95,'keyType':_0x18e30e}),this[_0x14dea3(0x167)]=_0x14dea3(0x1bb);}}class _0x1afefa extends _0x2ea604{constructor(_0x22c75b){const _0xc43f6b=_0x4085;super(_0xc43f6b(0x11e)+_0x22c75b+'\x27\x20doesn\x27t\x20exist',_0xc43f6b(0x136),{'type':_0x22c75b}),this['name']=_0xc43f6b(0x241);}}class _0x301062 extends _0x2ea604{constructor(_0x10b23c){const _0x582903=_0x4085;super('Type\x20\x27'+_0x10b23c+_0x582903(0x2ce),_0x582903(0x142),{'type':_0x10b23c}),this[_0x582903(0x167)]=_0x582903(0x346);}}class _0x505321 extends _0x2ea604{constructor(_0x43e014,_0x1b3fbb){const _0x1bebbf=_0x4085;super(_0x1bebbf(0x115)+_0x1b3fbb+'\x27\x20on\x20type\x20\x27'+_0x43e014+'\x27\x20doesn\x27t\x20exist',_0x1bebbf(0x370),{'type':_0x43e014,'index':_0x1b3fbb}),this[_0x1bebbf(0x167)]='OKDBIndexNotRegisteredError';}}class _0x62b4c5 extends _0x2ea604{constructor(_0x14f481,_0x4afa02){const _0x55d62b=_0x4085;super(_0x55d62b(0x115)+_0x4afa02+_0x55d62b(0x415)+_0x14f481+'\x27\x20is\x20already\x20registered',_0x55d62b(0x3d7),{'type':_0x14f481,'index':_0x4afa02}),this[_0x55d62b(0x167)]=_0x55d62b(0x366);}}class _0x992fd4 extends _0x2ea604{constructor(_0x1c2b01,_0x5dd790={}){const _0x4193c4=_0x4085;super(_0x1c2b01,'INVALID_VALUE',_0x5dd790),this[_0x4193c4(0x167)]=_0x4193c4(0x3a7);}}class _0x3416a0 extends _0x2ea604{constructor(_0x356b4a,_0x51e299,_0x12c548,_0x30be50,_0x5334ca){const _0x9542e7=_0x4085;super('Unique\x20constraint\x20violated\x20on\x20'+_0x356b4a+'@'+_0x51e299+_0x9542e7(0x34c)+_0x12c548+_0x9542e7(0x1dd)+_0x30be50+_0x9542e7(0x22b)+_0x5334ca+'\x27',_0x9542e7(0x1e9),{'type':_0x356b4a,'index':_0x51e299,'indexKey':_0x12c548,'existingKey':_0x30be50,'conflictingKey':_0x5334ca}),this[_0x9542e7(0x167)]=_0x9542e7(0x18b);}}class _0x41568b extends _0x2ea604{constructor(_0x956e23,_0x2f6d54,_0x3ce30d){const _0x2d0bd8=_0x4085;super('Schema\x20validation\x20failed\x20for\x20'+_0x956e23+'@'+_0x2f6d54,_0x2d0bd8(0x352),{'type':_0x956e23,'key':_0x2f6d54,'errors':_0x3ce30d}),this[_0x2d0bd8(0x167)]='OKDBSchemaValidationError',this[_0x2d0bd8(0x150)]=_0x956e23,this[_0x2d0bd8(0x407)]=_0x2f6d54,this[_0x2d0bd8(0x3c4)]=_0x3ce30d;}}class _0x35023f extends _0x2ea604{constructor(_0xb321b6,_0x344000){const _0x385601=_0x4085;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0xb321b6+':\x20'+_0x344000[_0x385601(0x340)]+_0x385601(0x294),_0x385601(0x326),{'type':_0xb321b6,'failures':_0x344000}),this[_0x385601(0x167)]=_0x385601(0x1f2),this[_0x385601(0x150)]=_0xb321b6,this[_0x385601(0x40e)]=_0x344000;}}class _0x4dd3b5 extends _0x2ea604{constructor(_0x55b591,_0x1aad54,_0x14cfc8,_0x265cfb,_0x2094e2){const _0xcb85cb=_0x4085;super(_0xcb85cb(0x330)+_0x55b591+'@'+_0x1aad54+'.'+_0x14cfc8+'\x20references\x20'+_0x265cfb+'@'+_0x2094e2+'\x20which\x20does\x20not\x20exist',_0xcb85cb(0x2a4),{'sourceType':_0x55b591,'sourceKey':_0x1aad54,'fieldPath':_0x14cfc8,'targetType':_0x265cfb,'targetKey':_0x2094e2}),this['name']=_0xcb85cb(0x2bd),this[_0xcb85cb(0x1ba)]=_0x55b591,this[_0xcb85cb(0x1d5)]=_0x1aad54,this[_0xcb85cb(0x3a8)]=_0x14cfc8,this[_0xcb85cb(0x1da)]=_0x265cfb,this['targetKey']=_0x2094e2;}}class _0x12cdc2 extends _0x2ea604{constructor(_0x4b5203,_0x5493c4,_0x4ec371){const _0x246ff8=_0x4085;super('Cannot\x20delete\x20'+_0x4b5203+'@'+_0x5493c4+':\x20'+_0x4ec371['length']+_0x246ff8(0x378),_0x246ff8(0x284),{'targetType':_0x4b5203,'targetKey':_0x5493c4,'references':_0x4ec371}),this['name']='OKDBForeignKeyDeleteError',this[_0x246ff8(0x1da)]=_0x4b5203,this['targetKey']=_0x5493c4,this[_0x246ff8(0x2b7)]=_0x4ec371;}}class _0x23fb9e extends _0x2ea604{constructor(_0x466297,_0x5cde0a,_0x20f0e1){const _0x382cf1=_0x4085;super(_0x382cf1(0x240)+_0x5cde0a+_0x382cf1(0x229)+_0x466297+_0x382cf1(0x2a1)+_0x20f0e1[_0x382cf1(0x2df)](_0x13d9cd=>_0x13d9cd[_0x382cf1(0x3af)]+':'+_0x13d9cd['name'])[_0x382cf1(0x251)](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0x466297,'index':_0x5cde0a,'usedBy':_0x20f0e1}),this[_0x382cf1(0x167)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x2ea604,'OKDBVersionMismatchError':_0x4bbccd,'OKDBNotFoundError':_0x5ef54a,'OKDBAlreadyExistsError':_0x3f5aee,'OKDBInvalidIndexKeyError':_0x108b91,'OKDBInvalidPrimaryKeyError':_0x5337ad,'OKDBTypeNotRegisteredError':_0x1afefa,'OKDBTypeAlreadyRegisteredError':_0x301062,'OKDBIndexNotRegisteredError':_0x505321,'OKDBIndexAlreadyRegisteredError':_0x62b4c5,'OKDBInvalidValueError':_0x992fd4,'OKDBUniqueConstraintError':_0x3416a0,'OKDBSchemaValidationError':_0x41568b,'OKDBSchemaCollectionError':_0x35023f,'OKDBForeignKeyError':_0x4dd3b5,'OKDBForeignKeyDeleteError':_0x12cdc2,'OKDBIndexHasConsumersError':_0x23fb9e},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x27bb12=_0x3cf8a9;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5210de={'PUT':_0x27bb12(0x158),'REMOVE':'remove','INDEX_DROP':_0x27bb12(0x1e4),'INDEX_REGISTER':_0x27bb12(0x1ab),'INDEX_RESET':_0x27bb12(0x140),'TYPE_REGISTER':_0x27bb12(0x1f1),'TYPE_DROP':_0x27bb12(0x3bd),'FTS_REGISTER':_0x27bb12(0x1fc),'FTS_DROP':_0x27bb12(0x2a3),'FTS_RESET':_0x27bb12(0x3e9),'SCHEMA_SET':_0x27bb12(0x153),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x27bb12(0x264),'TTL_CLEAR':_0x27bb12(0x11c)},_0x49eebd={'SYSTEM_READY':_0x27bb12(0x25c),'SYSTEM_STOPPED':_0x27bb12(0x22d),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x27bb12(0x2a5),'SYSTEM_DRAIN':_0x27bb12(0x24d),'SYSTEM_TYPE_DROP':_0x27bb12(0x280),'SYSTEM_BUS_STATE_CHANGE':_0x27bb12(0x316),'ITEM_CREATE':'item:create','ITEM_UPDATE':_0x27bb12(0x1fe),'ITEM_REMOVE':_0x27bb12(0x384),'INDEX_RESET':_0x27bb12(0x29f),'INDEX_READY':'index:ready','INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x27bb12(0x369),'INDEX_DROP':_0x27bb12(0x258),'INDEX_REGISTERED':_0x27bb12(0x135),'FTS_REGISTERED':_0x27bb12(0x253),'FTS_DROP':_0x27bb12(0x296),'FTS_RESET':_0x27bb12(0x3b5),'SCHEMA_SET':_0x27bb12(0x1a1),'SCHEMA_DROP':_0x27bb12(0x27a),'UNIQUE_VIOLATION':_0x27bb12(0x2fa),'UNIQUE_VIOLATION_RESOLVED':_0x27bb12(0x404),'REF_VIOLATION':_0x27bb12(0x37d),'REF_VIOLATION_RESOLVED':_0x27bb12(0x247),'SYNC_APPLY':_0x27bb12(0x396),'TXN_START':_0x27bb12(0x383),'TXN_END':_0x27bb12(0x237),'TXN_ROLLBACK':_0x27bb12(0x1c8),'TYPE_REGISTERED':_0x27bb12(0x2ea),'TYPE_DROP':_0x27bb12(0x1f0),'ENV_OPENED':_0x27bb12(0x3df),'ENV_REMOVED':_0x27bb12(0x166),'TTL_EXPIRED':_0x27bb12(0x119),'TTL_SET':_0x27bb12(0x106),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x27bb12(0x3c5),'LICENSE_ADDED':_0x27bb12(0x22c),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x27bb12(0x2e0)},_0x41d020={'CREATING':'creating','RESETTING':_0x27bb12(0x28a),'READY':_0x27bb12(0x201),'DROPPING':_0x27bb12(0x256),'WAITING':'waiting'},_0x190346={'CREATED':_0x27bb12(0x2ef),'STARTING':_0x27bb12(0x223),'STARTED':_0x27bb12(0x121),'STOPPING':_0x27bb12(0x1d6),'STOPPED':_0x27bb12(0x358)},_0x1a36c4={'CREATING':_0x27bb12(0x30b),'READY':_0x27bb12(0x201),'HALTED':'halted','STOPPED':'stopped','RESETTING':_0x27bb12(0x28a)},_0x17b6aa=Object[_0x27bb12(0x3a6)]({'POKE':_0x27bb12(0x3d4),'DRAIN':_0x27bb12(0x266),'TYPE_DROP':_0x27bb12(0x211)});return okdbEnums={'BUS_EVENTS':_0x17b6aa,'CHANGE_ACTIONS':_0x5210de,'EVENTS':_0x49eebd,'INDEX_STATE':_0x41d020,'OKDB_STATE':_0x190346,'VIEW_STATE':_0x1a36c4},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x5d2c28=_0x3cf8a9;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x3e4a63=require$$1,_0x5e81b1=require$$1$1,_0x4b56e0=require$$0,_0x123f6d=_0x3e4a63[_0x5d2c28(0x131)](_0x5e81b1['join'](__dirname,_0x5d2c28(0x2ad)),_0x5d2c28(0x40c))[_0x5d2c28(0x324)](),_0x2c28d0=_0x4b56e0[_0x5d2c28(0x203)](_0x123f6d)[_0x5d2c28(0x21d)]({'type':_0x5d2c28(0x224),'format':'der'}),_0x1fa776=_0x4b56e0[_0x5d2c28(0x295)](_0x5d2c28(0x33b))[_0x5d2c28(0x275)](_0x2c28d0)['digest'](_0x5d2c28(0x17b))[_0x5d2c28(0x219)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x123f6d,'PUB_FINGERPRINT':_0x1fa776},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x4fa557=_0x3cf8a9;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x21fe33=require$$0,{OKDBError:_0x48fcbd}=requireOkdbError(),{EVENTS:_0x5f1c6c}=requireOkdbEnums(),_0x1229da=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x53ac4d,LICENSE_TYPE_INTERNAL:_0xb3dab,OPEN_LICENSE_MAX_DURATION_MS:_0x8cba01}=_0x1229da,_0x5dc087=requireOkdbPubkey(),_0x21e34c={'LICENSED_BUILD':_0x4fa557(0x24f),'PUBLIC_KEY_PEM':_0x5dc087['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x5dc087[_0x4fa557(0x318)],'LICENSE_EXPIRED_ACTION':'log'},_0x113461=_0x4fa557(0x1a5),_0x36d43f={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x3e4759(_0x1e2e14){const _0x35446b=_0x4fa557;!_0x1e2e14[_0x35446b(0x397)](_0x113461)&&await _0x1e2e14['registerType'](_0x113461);}class _0x120707{constructor(_0x566fa8){const _0x348faa=_0x4fa557;this[_0x348faa(0x37b)]=_0x566fa8,this['_active']=null;}async[_0x4fa557(0x374)](){const _0x31e980=_0x4fa557,_0x15957f=this[_0x31e980(0x37b)][_0x31e980(0x12e)];if(!_0x15957f||!_0x15957f[_0x31e980(0x397)](_0x113461)){this[_0x31e980(0x204)]=null;return;}const _0x52ada5=this['okdb']['id'];let _0xfa02af=null;for(const {key:_0x19fca9,value:_0x5675fb}of _0x15957f[_0x31e980(0x184)](_0x113461)){const _0x4911cc=this[_0x31e980(0x364)](_0x5675fb,_0x52ada5);_0x4911cc===_0x31e980(0x235)&&!_0xfa02af&&(_0xfa02af={..._0x5675fb,'id':_0x19fca9,'status':_0x4911cc});}this[_0x31e980(0x204)]=_0xfa02af;if(this[_0x31e980(0x204)]&&this['_active'][_0x31e980(0x2c9)]===_0x53ac4d){const _0x567881=Math[_0x31e980(0x3c2)]((this[_0x31e980(0x204)][_0x31e980(0x19e)]-Date[_0x31e980(0x18f)]())/0x5265c00);this[_0x31e980(0x37b)][_0x31e980(0x30a)]?.['warn'](_0x31e980(0x13f)+_0x567881+_0x31e980(0x3f3),{'feature':'license','licensee':this['_active'][_0x31e980(0x15e)],'expiresAt':new Date(this[_0x31e980(0x204)][_0x31e980(0x19e)])[_0x31e980(0x2e8)]()});}this[_0x31e980(0x204)]&&this[_0x31e980(0x204)][_0x31e980(0x2c9)]===_0xb3dab&&this[_0x31e980(0x37b)]['log']?.[_0x31e980(0x39f)](_0x31e980(0x40f),{'feature':_0x31e980(0x22a),'licensee':this[_0x31e980(0x204)][_0x31e980(0x15e)]});}['_computeStatus'](_0x459767,_0x599651){const _0xd36d54=_0x4fa557;if(!_0x459767['blob'])return _0xd36d54(0x2ca);let _0x1f4b57;try{_0x1f4b57=_0x1229da[_0xd36d54(0x385)](_0x459767['blob']);}catch(_0x36c5b6){return _0xd36d54(0x2ca);}try{const _0x41c4d7=_0x21fe33[_0xd36d54(0x303)](null,_0x1f4b57[_0xd36d54(0x297)],_0x21e34c[_0xd36d54(0x2ed)],_0x1f4b57['sig']);if(!_0x41c4d7)return _0xd36d54(0x2ca);}catch(_0x491b5b){return _0xd36d54(0x2ca);}if(_0x1f4b57[_0xd36d54(0x282)][_0xd36d54(0x2c9)]===_0xb3dab)return _0xd36d54(0x235);if(_0x1f4b57[_0xd36d54(0x282)][_0xd36d54(0x19e)]<=Date[_0xd36d54(0x18f)]())return'expired';if(_0x1f4b57[_0xd36d54(0x282)][_0xd36d54(0x2c9)]===_0x53ac4d)return _0xd36d54(0x235);if(!_0x459767[_0xd36d54(0x38c)])return'pending';const _0x4adc4f=_0x1229da[_0xd36d54(0x40b)]({'tokenString':_0x459767['activation'],'nodeId':_0x599651,'rawBlobBuf':_0x1f4b57['rawBuf'],'pubKeyPem':_0x21e34c['PUBLIC_KEY_PEM'],'pubFingerprint':_0x21e34c['PUB_FINGERPRINT']});if(_0x4adc4f['reason']==='LICENSE_HASH_MISMATCH'||_0x4adc4f[_0xd36d54(0x12f)]===_0xd36d54(0x331))return _0xd36d54(0x1e0);if(_0x4adc4f[_0xd36d54(0x12f)]===_0xd36d54(0x1b2))return _0xd36d54(0x123);if(!_0x4adc4f['valid'])return'wrong_node';return'active';}get[_0x4fa557(0x235)](){return this['_active'];}get[_0x4fa557(0x126)](){const _0x201f3a=_0x4fa557;return this[_0x201f3a(0x204)]??_0x36d43f;}['assertFeature'](_0x2efea){const _0x2c8904=_0x4fa557;if(_0x21e34c[_0x2c8904(0x2f3)]!==_0x2c8904(0x24f))return;const _0xb0b40f=this[_0x2c8904(0x126)];if(!_0xb0b40f['features']?.[_0x2efea]){const _0x41a24c=_0xb0b40f[_0x2c8904(0x16a)]?'Feature\x20not\x20available\x20on\x20free\x20tier:\x20'+_0x2efea+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x2efea+_0x2c8904(0x375):_0x2c8904(0x1b6)+_0x2efea+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x2efea+'\x22.';throw new _0x48fcbd(_0x41a24c,'LICENSE_FEATURE_DISABLED',{'feature':_0x2efea});}}[_0x4fa557(0x1f8)](_0x1b526b){const _0x4f34d4=_0x4fa557;if(_0x21e34c['LICENSED_BUILD']!==_0x4f34d4(0x24f))return!![];return!!this['effective'][_0x4f34d4(0x2e2)]?.[_0x1b526b];}[_0x4fa557(0x2b2)](_0x1da7c0,_0x1ce046){const _0xf2926a=_0x4fa557;if(_0x21e34c[_0xf2926a(0x2f3)]!=='true')return;const _0xa674d3=this[_0xf2926a(0x126)],_0x42d208=_0xa674d3['limits']?.[_0x1da7c0];if(_0x42d208===null||_0x42d208===undefined||_0x42d208===0x0)return;if(_0x1ce046>=_0x42d208)throw new _0x48fcbd(_0xf2926a(0x19d)+_0x1da7c0+'\x20('+_0x1ce046+'/'+_0x42d208+')',_0xf2926a(0x1c1),{'limit':_0x1da7c0,'current':_0x1ce046,'max':_0x42d208});}async[_0x4fa557(0x2cc)](_0x16fec5){const _0x325820=_0x4fa557;let _0x2c7e96;try{_0x2c7e96=_0x1229da[_0x325820(0x385)](_0x16fec5);}catch(_0x102ede){throw new _0x48fcbd('Invalid\x20license\x20blob:\x20'+_0x102ede[_0x325820(0x227)],_0x325820(0x19a));}let _0x451545;try{_0x451545=_0x21fe33['verify'](null,_0x2c7e96['payload'],_0x21e34c[_0x325820(0x2ed)],_0x2c7e96[_0x325820(0x325)]);}catch(_0x2d8f75){throw new _0x48fcbd('License\x20signature\x20invalid:\x20'+_0x2d8f75[_0x325820(0x227)],_0x325820(0x19a));}if(!_0x451545)throw new _0x48fcbd(_0x325820(0x2c0)+(_0x325820(0x195)+_0x21e34c[_0x325820(0x318)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','LICENSE_INVALID',{'expectedFingerprint':_0x21e34c[_0x325820(0x318)]});if(_0x2c7e96[_0x325820(0x282)][_0x325820(0x2c9)]===_0x53ac4d){const _0x225adf=_0x2c7e96[_0x325820(0x282)][_0x325820(0x19e)]-_0x2c7e96[_0x325820(0x282)][_0x325820(0x276)];if(_0x225adf>_0x8cba01)throw new _0x48fcbd(_0x325820(0x231)+Math[_0x325820(0x3c2)](_0x225adf/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x325820(0x19a));}const _0x2db214=this['okdb']['_systemEnv'];await _0x3e4759(_0x2db214);const _0x140a35=_0x1229da['licenseHash'](_0x2c7e96[_0x325820(0x332)])['toString'](_0x325820(0x17b));for(const {value:_0xce324e}of _0x2db214[_0x325820(0x184)](_0x113461)){if(_0xce324e[_0x325820(0x417)]===_0x140a35)throw new _0x48fcbd(_0x325820(0x2b3),_0x325820(0x19a));}const _0x159cd7=_0x21fe33[_0x325820(0x37e)](),_0x2eb646={'blob':_0x16fec5,'activation':null,'addedAt':Date[_0x325820(0x18f)](),'_licenseHash':_0x140a35,'licensee':_0x2c7e96[_0x325820(0x282)]['licensee'],'expiresAt':_0x2c7e96[_0x325820(0x282)][_0x325820(0x19e)],'features':_0x2c7e96['decoded'][_0x325820(0x2e2)],'limits':_0x2c7e96[_0x325820(0x282)]['limits'],'licenseType':_0x2c7e96[_0x325820(0x282)][_0x325820(0x2c9)]};return await _0x2db214['put'](_0x113461,_0x159cd7,_0x2eb646),{'id':_0x159cd7,..._0x2eb646};}async[_0x4fa557(0x293)](_0x21813b){const _0xd1f2b2=_0x4fa557;let _0x12442e;try{_0x12442e=_0x1229da['decodeActivationToken'](_0x21813b);}catch(_0x42f6f4){throw new _0x48fcbd(_0xd1f2b2(0x28d)+_0x42f6f4[_0xd1f2b2(0x227)],_0xd1f2b2(0x301));}const _0x3c79e6=_0x12442e[_0xd1f2b2(0x254)][_0xd1f2b2(0x1d9)](_0xd1f2b2(0x17b)),_0x86fae8=this[_0xd1f2b2(0x37b)][_0xd1f2b2(0x12e)];if(!_0x86fae8||!_0x86fae8[_0xd1f2b2(0x397)](_0x113461))throw new _0x48fcbd(_0xd1f2b2(0x39c),_0xd1f2b2(0x301));let _0x442193=null,_0x49f4d2=null;for(const {key:_0xc7dcf0,value:_0x541b6e}of _0x86fae8[_0xd1f2b2(0x184)](_0x113461)){if(_0x541b6e[_0xd1f2b2(0x417)]===_0x3c79e6){_0x442193=_0xc7dcf0,_0x49f4d2=_0x541b6e;break;}}if(!_0x442193)throw new _0x48fcbd(_0xd1f2b2(0x39c),_0xd1f2b2(0x301));const {rawBuf:_0x1f755b}=_0x1229da[_0xd1f2b2(0x385)](_0x49f4d2[_0xd1f2b2(0x308)]),_0x362272=_0x1229da['verifyActivation']({'tokenString':_0x21813b,'nodeId':this[_0xd1f2b2(0x37b)]['id'],'rawBlobBuf':_0x1f755b,'pubKeyPem':_0x21e34c['PUBLIC_KEY_PEM'],'pubFingerprint':_0x21e34c[_0xd1f2b2(0x318)]});if(!_0x362272[_0xd1f2b2(0x401)])throw new _0x48fcbd(_0xd1f2b2(0x2da)+_0x362272[_0xd1f2b2(0x12f)],_0xd1f2b2(0x301),{'reason':_0x362272[_0xd1f2b2(0x12f)]});const _0x4e5322={..._0x49f4d2,'activation':_0x21813b};return await _0x86fae8['update'](_0x113461,_0x442193,_0x4e5322),{'id':_0x442193,..._0x4e5322};}async[_0x4fa557(0x116)](_0x312076){const _0xec7837=_0x4fa557,_0x234a77=this['okdb'][_0xec7837(0x12e)];if(!_0x234a77||!_0x234a77[_0xec7837(0x397)](_0x113461))return;await _0x234a77[_0xec7837(0x3b2)](_0x113461,_0x312076);}async[_0x4fa557(0x35a)](){const _0x1a48c4=_0x4fa557,_0x9395fd=this[_0x1a48c4(0x37b)][_0x1a48c4(0x12e)];if(!_0x9395fd||!_0x9395fd[_0x1a48c4(0x397)](_0x113461))return[];const _0x3d26b9=this[_0x1a48c4(0x37b)]['id'],_0x5b28ca=[];for(const {key:_0x3b07cc,value:_0x442787}of _0x9395fd[_0x1a48c4(0x184)](_0x113461)){const _0x20cc08=this[_0x1a48c4(0x364)](_0x442787,_0x3d26b9);_0x5b28ca[_0x1a48c4(0x2c5)]({..._0x442787,'id':_0x3b07cc,'status':_0x20cc08});}return _0x5b28ca;}[_0x4fa557(0x345)](){const _0xc273fd=_0x4fa557,_0x5e4b05=this[_0xc273fd(0x37b)][_0xc273fd(0x12e)];if(!_0x5e4b05||!_0x5e4b05[_0xc273fd(0x397)](_0x113461))return[];const _0x3b201a=this[_0xc273fd(0x37b)]['id'],_0x196ee4=[];for(const {key:_0x33ff13,value:_0x220df8}of _0x5e4b05[_0xc273fd(0x184)](_0x113461)){if(_0x220df8[_0xc273fd(0x417)]){if(_0x220df8[_0xc273fd(0x2c9)]===_0x53ac4d)_0x196ee4[_0xc273fd(0x2c5)]({'licenseId':_0x33ff13,'pin':null});else{const _0xea5f05=Buffer[_0xc273fd(0x1ff)](_0x220df8[_0xc273fd(0x417)],_0xc273fd(0x17b)),{pin:_0x39463b}=_0x1229da[_0xc273fd(0x348)](_0x3b201a,_0xea5f05,_0x21e34c[_0xc273fd(0x318)]);_0x196ee4[_0xc273fd(0x2c5)]({'licenseId':_0x33ff13,'pin':_0x39463b});}}}return _0x196ee4;}async[_0x4fa557(0x310)](){const _0x40a6af=_0x4fa557,_0x2e9a4f=this[_0x40a6af(0x204)];await this[_0x40a6af(0x374)]();if(this[_0x40a6af(0x204)]&&this[_0x40a6af(0x204)][_0x40a6af(0x2c9)]===_0x53ac4d){const _0x55cc88=Math['ceil']((this['_active'][_0x40a6af(0x19e)]-Date['now']())/0x5265c00);this['okdb'][_0x40a6af(0x30a)]?.['warn'](_0x40a6af(0x13f)+_0x55cc88+_0x40a6af(0x3f3),{'feature':_0x40a6af(0x22a),'licensee':this['_active']['licensee'],'expiresAt':new Date(this[_0x40a6af(0x204)][_0x40a6af(0x19e)])['toISOString']()});}this[_0x40a6af(0x204)]&&this[_0x40a6af(0x204)][_0x40a6af(0x2c9)]===_0xb3dab&&this[_0x40a6af(0x37b)][_0x40a6af(0x30a)]?.[_0x40a6af(0x39f)](_0x40a6af(0x40f),{'feature':_0x40a6af(0x22a),'licensee':this[_0x40a6af(0x204)][_0x40a6af(0x15e)]});if(_0x2e9a4f&&!this[_0x40a6af(0x204)]){this[_0x40a6af(0x37b)][_0x40a6af(0x30a)]?.['warn'](_0x40a6af(0x178),{'feature':'license'}),this['okdb'][_0x40a6af(0x2a8)]?.['emit'](_0x5f1c6c[_0x40a6af(0x19a)],{'previous':_0x2e9a4f});const _0x31de2b=this[_0x40a6af(0x37b)][_0x40a6af(0x3cc)]?.[_0x40a6af(0x1b7)]??_0x21e34c['LICENSE_EXPIRED_ACTION'];_0x31de2b===_0x40a6af(0x2d2)&&(this[_0x40a6af(0x37b)][_0x40a6af(0x30a)]?.[_0x40a6af(0x3ce)](_0x40a6af(0x285),{'feature':_0x40a6af(0x22a)}),this[_0x40a6af(0x37b)]['close']()[_0x40a6af(0x20e)](()=>{})[_0x40a6af(0x2be)](()=>process['exit'](0x1)));}}}return okdbLicense={'LicenseChecker':_0x120707,'_C':_0x21e34c},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x2af29f=_0x3cf8a9;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x419ae2=require$$0$2,_0x2524c6=require$$1,_0x5afb7e=require$$2$1,_0x55d3b7=require$$1$1,_0x42d646=_0x55d3b7['join'](_0x5afb7e['homedir'](),_0x2af29f(0x277)),_0x5e6922=0x3e8,_0x249307={'reset':_0x2af29f(0x1ca),'bold':_0x2af29f(0x402),'dim':_0x2af29f(0x104),'red':'\x1b[31m','green':_0x2af29f(0x3b7),'yellow':'\x1b[33m','blue':_0x2af29f(0x228),'magenta':'\x1b[35m','cyan':_0x2af29f(0x111),'white':_0x2af29f(0x363),'gray':_0x2af29f(0x22e)},_0x283660=!process['stdout'][_0x2af29f(0x2a9)]||!!process.env.NO_COLOR,_0xd4f90=(_0x4fc02f,_0x195a9f)=>_0x283660?_0x195a9f:''+_0x4fc02f+_0x195a9f+_0x249307['reset'],_0x2ce2eb={'error':_0x249307[_0x2af29f(0x286)],'warn':_0x249307[_0x2af29f(0x143)],'info':_0x249307[_0x2af29f(0x160)],'debug':_0x249307[_0x2af29f(0x31d)]},_0x33d84a={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x366ab8(_0x1cb7fa,_0x2a1fee=_0x2af29f(0x36c)){const _0x24d7b1=_0x2af29f,{level:_0x2d0769,msg:_0x4fceee,meta:_0x17a506,context:_0x515807,ts:_0x3e97f1}=_0x1cb7fa;if((_0x33d84a[_0x2d0769]??0x1)<(_0x33d84a[_0x2a1fee]??0x1))return;const _0x5b0e81=_0xd4f90(_0x249307[_0x24d7b1(0x31d)],new Date(_0x3e97f1)[_0x24d7b1(0x2e8)]()),_0x24b0ee=_0xd4f90(_0x2ce2eb[_0x2d0769]??_0x249307[_0x24d7b1(0x302)],_0x2d0769[_0x24d7b1(0x419)](0x5));let _0x2c9b55='\x20\x20'+_0x5b0e81+'\x20'+_0xd4f90(_0x249307[_0x24d7b1(0x162)],_0x24b0ee)+'\x20'+_0x4fceee;if(_0x17a506&&Object[_0x24d7b1(0x3e7)](_0x17a506)['length']>0x0){const _0x54a4aa=Object[_0x24d7b1(0x1a3)](_0x17a506)[_0x24d7b1(0x2df)](([_0x62828c,_0x2b67f3])=>_0x62828c+'='+_0x2b67f3)[_0x24d7b1(0x251)]('\x20');_0x2c9b55+=_0xd4f90(_0x249307['dim'],_0x24d7b1(0x169)+_0x54a4aa+']');}if(_0x515807!==undefined){const _0x2f098a=typeof _0x515807===_0x24d7b1(0x1c6)?JSON[_0x24d7b1(0x21f)](_0x515807):String(_0x515807);_0x2c9b55+=_0xd4f90(_0x249307['dim'],'\x20\x20'+_0x2f098a);}const _0x5b589f=_0x2d0769===_0x24d7b1(0x3ce)||_0x2d0769==='warn'?process[_0x24d7b1(0x13d)][_0x24d7b1(0x28f)][_0x24d7b1(0x155)](process['stderr']):process[_0x24d7b1(0x122)][_0x24d7b1(0x28f)][_0x24d7b1(0x155)](process[_0x24d7b1(0x122)]);_0x5b589f(_0x2c9b55+'\x0a');}function _0x1b9024(_0x444f38,_0x5e9a33){const _0x442f1d=_0x2af29f;if(_0x444f38===0xcc||_0x444f38>=0xc8&&_0x444f38<0x12c&&!_0x5e9a33){console[_0x442f1d(0x30a)](_0x442f1d(0x197)+_0xd4f90(_0x249307[_0x442f1d(0x112)],'✓')+'\x0a');return;}if(_0x444f38>=0x190||_0x5e9a33?.[_0x442f1d(0x3ce)]){const _0xc731a9=_0x5e9a33?.[_0x442f1d(0x3ce)]??_0x5e9a33?.[_0x442f1d(0x227)]??_0x442f1d(0x1d4)+_0x444f38;console[_0x442f1d(0x30a)](_0x442f1d(0x197)+_0xd4f90(_0x249307[_0x442f1d(0x286)],'✗')+'\x20'+_0xd4f90(_0x249307[_0x442f1d(0x162)]+_0x249307[_0x442f1d(0x286)],String(_0x444f38))+'\x20\x20'+_0xc731a9+'\x0a');return;}const _0x54345b=Object[_0x442f1d(0x2f5)][_0x442f1d(0x3db)][_0x442f1d(0x38b)](_0x5e9a33??{},'result')?_0x5e9a33[_0x442f1d(0x267)]:_0x5e9a33,_0x54b45a=_0x5e9a33?.['meta'];console[_0x442f1d(0x30a)](''),_0x4b7a92(_0x54345b,'\x20\x20');if(_0x54b45a?.[_0x442f1d(0x196)]!=null||_0x54b45a?.['time']!=null){const _0x470b74=[];if(_0x54b45a[_0x442f1d(0x196)]!=null)_0x470b74[_0x442f1d(0x2c5)](_0x54b45a[_0x442f1d(0x196)]+_0x442f1d(0x3c1)+(_0x54b45a[_0x442f1d(0x196)]!==0x1?'s':''));if(_0x54b45a[_0x442f1d(0x222)]!=null)_0x470b74[_0x442f1d(0x2c5)](_0x54b45a[_0x442f1d(0x222)]+'ms');console[_0x442f1d(0x30a)](_0x442f1d(0x197)+_0xd4f90(_0x249307[_0x442f1d(0x394)],_0x470b74['join']('\x20\x20·\x20\x20')));}console['log']('');}function _0x4b7a92(_0x3d4888,_0x4890de=''){const _0x31b0b2=_0x2af29f;if(_0x3d4888===null||_0x3d4888===undefined){console['log'](_0x4890de+_0xd4f90(_0x249307['dim'],'(null)'));return;}if(Array['isArray'](_0x3d4888)){if(_0x3d4888[_0x31b0b2(0x340)]===0x0){console[_0x31b0b2(0x30a)](_0x4890de+_0xd4f90(_0x249307[_0x31b0b2(0x394)],'(empty)'));return;}if(_0x3d4888[_0x31b0b2(0x1f5)](_0x375c09=>_0x375c09&&typeof _0x375c09===_0x31b0b2(0x1c6)&&_0x31b0b2(0x407)in _0x375c09&&_0x31b0b2(0x32e)in _0x375c09)){_0x236fc4(_0x3d4888,_0x4890de);return;}if(_0x3d4888['every'](_0x21e118=>_0x21e118&&typeof _0x21e118===_0x31b0b2(0x1c6)&&_0x31b0b2(0x150)in _0x21e118&&_0x31b0b2(0x196)in _0x21e118)){_0x3e336b(_0x3d4888,_0x4890de);return;}if(_0x3d4888[_0x31b0b2(0x1f5)](_0x2cdc25=>typeof _0x2cdc25!==_0x31b0b2(0x1c6)||_0x2cdc25===null)){_0x3d4888['forEach']((_0x5e0245,_0x254290)=>console[_0x31b0b2(0x30a)](_0x4890de+_0xd4f90(_0x249307['gray'],_0x254290+0x1+'.')+'\x20'+_0xd4f90(_0x249307[_0x31b0b2(0x302)],String(_0x5e0245))));return;}_0x3d4888[_0x31b0b2(0x3f8)]((_0x497025,_0x3b28cf)=>{const _0x559973=_0x31b0b2;console['log'](_0x4890de+_0xd4f90(_0x249307['dim'],'['+_0x3b28cf+']'));if(typeof _0x497025===_0x559973(0x1c6)&&_0x497025!==null)_0x1c7f75(_0x497025,_0x4890de+'\x20\x20');else console['log'](_0x4890de+'\x20\x20'+String(_0x497025));});return;}if(typeof _0x3d4888===_0x31b0b2(0x1c6)){if('key'in _0x3d4888&&_0x31b0b2(0x32e)in _0x3d4888&&Object[_0x31b0b2(0x3e7)](_0x3d4888)[_0x31b0b2(0x340)]<=0x3){console[_0x31b0b2(0x30a)](_0x4890de+_0xd4f90(_0x249307[_0x31b0b2(0x162)]+_0x249307['cyan'],String(_0x3d4888[_0x31b0b2(0x407)])));const _0x3cfaf0=_0x3d4888[_0x31b0b2(0x32e)];if(_0x3cfaf0&&typeof _0x3cfaf0===_0x31b0b2(0x1c6))_0x1c7f75(_0x3cfaf0,_0x4890de);else console['log'](_0x4890de+_0xd4f90(_0x249307['white'],String(_0x3cfaf0)));return;}_0x1c7f75(_0x3d4888,_0x4890de);return;}console[_0x31b0b2(0x30a)](_0x4890de+_0xd4f90(_0x249307[_0x31b0b2(0x302)],String(_0x3d4888)));}function _0x1c7f75(_0x587a63,_0x187201=''){const _0x1b5f28=_0x2af29f,_0x303259=Object['entries'](_0x587a63);if(_0x303259[_0x1b5f28(0x340)]===0x0){console[_0x1b5f28(0x30a)](_0x187201+_0xd4f90(_0x249307[_0x1b5f28(0x394)],'{}'));return;}const _0x3b3afd=Math['min'](0x1c,Math[_0x1b5f28(0x41b)](..._0x303259['map'](([_0x3ebd92])=>_0x3ebd92[_0x1b5f28(0x340)])));for(const [_0x2bb9e6,_0x52b1dc]of _0x303259){const _0x359489=_0xd4f90(_0x249307[_0x1b5f28(0x160)],_0x2bb9e6[_0x1b5f28(0x419)](_0x3b3afd));if(_0x52b1dc===null||_0x52b1dc===undefined)console[_0x1b5f28(0x30a)](_0x187201+_0x359489+'\x20\x20'+_0xd4f90(_0x249307[_0x1b5f28(0x394)],_0x1b5f28(0x207)));else{if(typeof _0x52b1dc===_0x1b5f28(0x1c6)){const _0x2fbfa3=JSON[_0x1b5f28(0x21f)](_0x52b1dc);_0x2fbfa3[_0x1b5f28(0x340)]<=0x50?console[_0x1b5f28(0x30a)](_0x187201+_0x359489+'\x20\x20'+_0xd4f90(_0x249307[_0x1b5f28(0x394)],_0x2fbfa3)):(console[_0x1b5f28(0x30a)](_0x187201+_0x359489),_0x4b7a92(_0x52b1dc,_0x187201+'\x20\x20'));}else{const _0x34416c=typeof _0x52b1dc===_0x1b5f28(0x2e6)?_0xd4f90(_0x52b1dc?_0x249307[_0x1b5f28(0x112)]:_0x249307[_0x1b5f28(0x143)],String(_0x52b1dc)):typeof _0x52b1dc===_0x1b5f28(0x18c)?_0xd4f90(_0x249307[_0x1b5f28(0x2ba)],String(_0x52b1dc)):_0xd4f90(_0x249307[_0x1b5f28(0x302)],String(_0x52b1dc));console[_0x1b5f28(0x30a)](_0x187201+_0x359489+'\x20\x20'+_0x34416c);}}}}function _0x236fc4(_0x562748,_0x3c2f49=''){const _0x14a12f=_0x2af29f,_0x5afaf6=Math[_0x14a12f(0x14f)](0x20,Math[_0x14a12f(0x41b)](..._0x562748[_0x14a12f(0x2df)](_0x126fdb=>String(_0x126fdb['key'])[_0x14a12f(0x340)])));for(const {key:_0x132f1f,value:_0x3f6d71,score:_0x25c71f,clock:_0x694499}of _0x562748){const _0x536ca3=_0xd4f90(_0x249307[_0x14a12f(0x162)]+_0x249307[_0x14a12f(0x160)],String(_0x132f1f)[_0x14a12f(0x419)](_0x5afaf6)),_0x3303a3=_0x3f6d71==null?_0xd4f90(_0x249307[_0x14a12f(0x394)],_0x14a12f(0x207)):typeof _0x3f6d71===_0x14a12f(0x1c6)?_0xd4f90(_0x249307[_0x14a12f(0x394)],JSON['stringify'](_0x3f6d71)):_0xd4f90(_0x249307[_0x14a12f(0x302)],String(_0x3f6d71)),_0x3a88a5=_0x25c71f!=null?_0xd4f90(_0x249307[_0x14a12f(0x31d)],_0x14a12f(0x20a)+_0x25c71f[_0x14a12f(0x335)](0x4)):'',_0x28d1ce=_0x694499!=null?_0xd4f90(_0x249307[_0x14a12f(0x31d)],_0x14a12f(0x3d6)+_0x694499):'';console[_0x14a12f(0x30a)](_0x3c2f49+_0x536ca3+'\x20\x20'+_0x3303a3+_0x3a88a5+_0x28d1ce);}}function _0x3e336b(_0x47bf32,_0x16e42d=''){const _0x2c922e=_0x2af29f,_0x270ca2=Math[_0x2c922e(0x14f)](0x20,Math[_0x2c922e(0x41b)](..._0x47bf32[_0x2c922e(0x2df)](_0x130ae6=>_0x130ae6['type'][_0x2c922e(0x340)])));for(const {type:_0x150830,count:_0x4eca33,fields:_0x102b99}of _0x47bf32){if(_0x150830['startsWith']('~'))continue;const _0x20c38d=_0xd4f90(_0x249307[_0x2c922e(0x162)]+_0x249307[_0x2c922e(0x160)],_0x150830[_0x2c922e(0x419)](_0x270ca2)),_0x3a9cef=_0xd4f90(_0x249307[_0x2c922e(0x2ba)],String(_0x4eca33)['padStart'](0x6))+_0xd4f90(_0x249307[_0x2c922e(0x394)],_0x2c922e(0x2fd)),_0x1927e8=_0x102b99&&Object['keys'](_0x102b99)[_0x2c922e(0x340)]?_0xd4f90(_0x249307[_0x2c922e(0x394)],'\x20\x20·\x20'+Object[_0x2c922e(0x3e7)](_0x102b99)[_0x2c922e(0x219)](0x0,0x6)['join'](',\x20')+(Object['keys'](_0x102b99)[_0x2c922e(0x340)]>0x6?'…':'')):'';console[_0x2c922e(0x30a)](_0x16e42d+_0x20c38d+'\x20\x20'+_0x3a9cef+_0x1927e8);}}const _0x53706f=['types',_0x2af29f(0x3e6),_0x2af29f(0x1cd),_0x2af29f(0x16d),_0x2af29f(0x1ad),'processors/'];function _0x26a1d5(_0x500fc6,_0x3468d4){const _0x2dde9a=_0x2af29f;if(_0x500fc6['startsWith'](_0x2dde9a(0x40a)))return _0x500fc6;if(_0x500fc6['startsWith']('/'))return'/api'+_0x500fc6;if(_0x500fc6[_0x2dde9a(0x343)](_0x2dde9a(0x182)))return _0x2dde9a(0x40a)+_0x500fc6;const _0x340eac=_0x53706f['some'](_0x13cb0a=>_0x500fc6===_0x13cb0a[_0x2dde9a(0x29d)](/\/$/,'')||_0x500fc6[_0x2dde9a(0x343)](_0x13cb0a));return _0x340eac?'/api/env/'+_0x3468d4+'/'+_0x500fc6:'/api/'+_0x500fc6;}function _0x2cfc2a(_0x4dd224){const _0x3e7556=_0x2af29f,_0x17fb16={},_0x18ead9=[];let _0x2a4083=0x0;while(_0x2a4083<_0x4dd224[_0x3e7556(0x340)]){if((_0x4dd224[_0x2a4083]===_0x3e7556(0x35b)||_0x4dd224[_0x2a4083]==='-e')&&_0x4dd224[_0x2a4083+0x1]&&!_0x4dd224[_0x2a4083+0x1][_0x3e7556(0x343)]('-'))_0x17fb16['env']=_0x4dd224[++_0x2a4083];else _0x4dd224[_0x2a4083]===_0x3e7556(0x19f)||_0x4dd224[_0x2a4083]==='-h'?_0x17fb16[_0x3e7556(0x3e0)]=!![]:_0x18ead9[_0x3e7556(0x2c5)](_0x4dd224[_0x2a4083]);_0x2a4083++;}return{'flags':_0x17fb16,'rest':_0x18ead9};}const _0x4471cb={'system':_0x2af29f(0x390),'envs':_0x2af29f(0x3ae),'types':_0x2af29f(0x33a),'data':_0x2af29f(0x3ba),'indexes':_0x2af29f(0x34f),'fts':'Full-text\x20search','sync':'Sync','queue':_0x2af29f(0x3d1),'files':'Files','embeddings':_0x2af29f(0x2a6),'engines':_0x2af29f(0x1a2),'admin':'Admin','event':_0x2af29f(0x2c2),'processor':_0x2af29f(0x3d5)},_0x58a856=[_0x2af29f(0x2ff),_0x2af29f(0x12c),_0x2af29f(0x3ea),_0x2af29f(0x3e2),_0x2af29f(0x1d1),_0x2af29f(0x26e),_0x2af29f(0x2b9),_0x2af29f(0x187),'files','embeddings',_0x2af29f(0x24b),'admin'];function _0x223ceb(_0x1c1f8){const _0x515196=_0x2af29f;return _0x1c1f8[_0x515196(0x29d)](/^\/api/,'')[_0x515196(0x29d)](/^\[\/env\/:env=[^\]]*\]/,_0x515196(0x176))[_0x515196(0x29d)](/^\/env\/:env/,'env/:env')[_0x515196(0x29d)](/^\//,'');}function _0x5bfc65(_0x4c1515,_0x3ff983=''){const _0x1c0637=_0x2af29f,_0x3fc757=_0x4c1515[_0x1c0637(0x19b)][_0x1c0637(0x148)]()[_0x1c0637(0x365)](_0x25fdbc=>!_0x25fdbc[_0x1c0637(0x249)]?.[_0x1c0637(0x252)]),_0x8e7ee4=_0x3ff983?_0x3fc757[_0x1c0637(0x365)](_0x441980=>_0x441980[_0x1c0637(0x32b)][_0x1c0637(0x342)]()[_0x1c0637(0x2a7)](_0x3ff983[_0x1c0637(0x342)]())||(_0x4529a4(_0x441980)??'')[_0x1c0637(0x342)]()['includes'](_0x3ff983['toLowerCase']())||_0x373f44(_0x441980)[_0x1c0637(0x11b)](_0x592805=>_0x592805['toLowerCase']()[_0x1c0637(0x2a7)](_0x3ff983[_0x1c0637(0x342)]()))):_0x3fc757;if(!_0x8e7ee4['length']){console['log'](_0xd4f90(_0x249307[_0x1c0637(0x143)],_0x1c0637(0x141)+_0x3ff983+'\x22\x0a'));return;}const _0x688b9=new Map();for(const _0x5a8a1e of _0x8e7ee4){const _0x421bbb=_0x373f44(_0x5a8a1e)[0x0]??_0x1c0637(0x2c3);if(!_0x688b9[_0x1c0637(0x305)](_0x421bbb))_0x688b9[_0x1c0637(0x27b)](_0x421bbb,[]);_0x688b9[_0x1c0637(0x299)](_0x421bbb)[_0x1c0637(0x2c5)](_0x5a8a1e);}const _0x3259ec=[..._0x58a856[_0x1c0637(0x365)](_0x122546=>_0x688b9[_0x1c0637(0x305)](_0x122546)),...[..._0x688b9['keys']()]['filter'](_0x2255be=>!_0x58a856[_0x1c0637(0x2a7)](_0x2255be))];console[_0x1c0637(0x30a)]('');for(const _0x13178f of _0x3259ec){const _0x4d7727=_0x688b9[_0x1c0637(0x299)](_0x13178f);if(!_0x4d7727?.[_0x1c0637(0x340)])continue;console[_0x1c0637(0x30a)](_0xd4f90(_0x249307['bold'],'\x20\x20'+(_0x4471cb[_0x13178f]??_0x13178f)));for(const _0x558060 of _0x4d7727){const _0x59a764=_0xd4f90(_0x249307['magenta'],_0x558060[_0x1c0637(0x257)]['padEnd'](0x7)),_0x124051=_0xd4f90(_0x249307[_0x1c0637(0x160)],_0x223ceb(_0x558060[_0x1c0637(0x32b)])),_0x2c1f95=_0x4529a4(_0x558060)?_0xd4f90(_0x249307[_0x1c0637(0x394)],'\x20\x20'+_0x4529a4(_0x558060)):'',_0x316eaa=_0x558060[_0x1c0637(0x24c)]?.['id']?_0xd4f90(_0x249307[_0x1c0637(0x31d)],'\x20\x20['+_0x558060[_0x1c0637(0x24c)]['id']+']'):'';console[_0x1c0637(0x30a)](_0x1c0637(0x26f)+_0x59a764+'\x20'+_0x124051+_0x2c1f95+_0x316eaa);}console[_0x1c0637(0x30a)]('');}}function _0x21809a(_0x3f7594,_0x422f54){const _0x451e3a=_0x2af29f,_0x3bf90c=_0x422f54[_0x451e3a(0x29d)](/^\/api(\/env\/[^/]+)?\//,'')['split']('/')[0x0],_0x227e1c=_0x3f7594[_0x451e3a(0x19b)][_0x451e3a(0x148)]()[_0x451e3a(0x365)](_0x3962f5=>_0x3962f5[_0x451e3a(0x32b)][_0x451e3a(0x342)]()[_0x451e3a(0x2a7)](_0x3bf90c[_0x451e3a(0x342)]()));if(!_0x227e1c[_0x451e3a(0x340)]){console[_0x451e3a(0x30a)](_0xd4f90(_0x249307['yellow'],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x422f54+'\x0a'));return;}console[_0x451e3a(0x30a)]('');for(const _0x4451a3 of _0x227e1c[_0x451e3a(0x219)](0x0,0xc)){for(const _0x5a887b of _0x4d698c(_0x4451a3)){console[_0x451e3a(0x30a)](_0x5a887b);}console[_0x451e3a(0x30a)]('');}}function _0x4529a4(_0x40b45d){const _0x362d3a=_0x2af29f;return _0x40b45d[_0x362d3a(0x24c)]?.[_0x362d3a(0x170)]??_0x40b45d[_0x362d3a(0x249)]?.[_0x362d3a(0x170)]??'';}function _0x55c374(_0x2bdc77){const _0x2a376d=_0x2af29f;return _0x2bdc77[_0x2a376d(0x24c)]?.[_0x2a376d(0x23d)]??_0x2bdc77[_0x2a376d(0x249)]?.[_0x2a376d(0x23d)]??'';}function _0x373f44(_0x4c484e){const _0xe1ceff=_0x2af29f;return _0x4c484e['operation']?.['tags']?.[_0xe1ceff(0x340)]?_0x4c484e[_0xe1ceff(0x24c)][_0xe1ceff(0x323)]:_0x4c484e['meta']?.[_0xe1ceff(0x323)]??[];}function _0x4d698c(_0x562838){const _0x79e27d=_0x2af29f,_0x37db5b=[];_0x37db5b[_0x79e27d(0x2c5)]('\x20\x20'+_0xd4f90(_0x249307['bold']+_0x249307['magenta'],_0x562838[_0x79e27d(0x257)][_0x79e27d(0x419)](0x7))+'\x20'+_0xd4f90(_0x249307['bold']+_0x249307[_0x79e27d(0x160)],_0x562838[_0x79e27d(0x32b)]));_0x562838['operation']?.['id']&&_0x37db5b[_0x79e27d(0x2c5)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xd4f90(_0x249307[_0x79e27d(0x31d)],_0x79e27d(0x2e5)+_0x562838[_0x79e27d(0x24c)]['id']));_0x4529a4(_0x562838)&&_0x37db5b[_0x79e27d(0x2c5)](_0x79e27d(0x327)+_0xd4f90(_0x249307['white'],_0x4529a4(_0x562838)));_0x55c374(_0x562838)&&_0x37db5b[_0x79e27d(0x2c5)](_0x79e27d(0x327)+_0xd4f90(_0x249307[_0x79e27d(0x394)],_0x55c374(_0x562838)));_0x373f44(_0x562838)['length']&&_0x37db5b[_0x79e27d(0x2c5)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xd4f90(_0x249307[_0x79e27d(0x31d)],_0x79e27d(0x1ac)+_0x373f44(_0x562838)[_0x79e27d(0x251)](',\x20')));_0x562838['operation']?.['safety']?.[_0x79e27d(0x179)]&&_0x37db5b['push'](_0x79e27d(0x327)+_0xd4f90(_0x249307[_0x79e27d(0x31d)],_0x79e27d(0x336)+_0x562838[_0x79e27d(0x24c)][_0x79e27d(0x36f)]['access']));_0x562838[_0x79e27d(0x24c)]?.[_0x79e27d(0x19b)]?.[_0x79e27d(0x288)]&&_0x562838['operation'][_0x79e27d(0x19b)][_0x79e27d(0x288)]!=='standard'&&_0x37db5b[_0x79e27d(0x2c5)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xd4f90(_0x249307[_0x79e27d(0x31d)],_0x79e27d(0x1b4)+_0x562838['operation'][_0x79e27d(0x19b)][_0x79e27d(0x288)]));if(_0x562838[_0x79e27d(0x24c)]?.[_0x79e27d(0x2cb)]){const _0xcb8c04=Object[_0x79e27d(0x3e7)](_0x562838['operation'][_0x79e27d(0x2cb)][_0x79e27d(0x26b)]||{});if(_0xcb8c04['length'])_0x37db5b[_0x79e27d(0x2c5)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xd4f90(_0x249307[_0x79e27d(0x31d)],'input:\x20'+_0xcb8c04['join'](',\x20')));}return _0x562838[_0x79e27d(0x249)]?.[_0x79e27d(0x399)]&&_0x37db5b['push'](_0x79e27d(0x327)+_0xd4f90(_0x249307[_0x79e27d(0x31d)],_0x79e27d(0x118)+JSON[_0x79e27d(0x21f)](_0x562838[_0x79e27d(0x249)]['body']))),_0x37db5b;}async function _0x4d1ff8(_0x4dea17,_0x5b971,_0x20294f,_0x1642a8=null){const _0x50998b=_0x2af29f,_0x334676=_0x20294f[_0x50998b(0x194)]('?'),_0x57a41c=_0x334676>=0x0?_0x20294f['slice'](0x0,_0x334676):_0x20294f,_0x105344=_0x334676>=0x0?_0x20294f[_0x50998b(0x219)](_0x334676+0x1):'',_0x510d41=Object[_0x50998b(0x3a9)](new URLSearchParams(_0x105344)['entries']());return _0x4dea17[_0x50998b(0x19b)]['handle'](_0x5b971,_0x57a41c,{'body':_0x1642a8,'query':_0x510d41,'headers':{'content-type':_0x50998b(0x25e)}},{'internal':!![]});}function _0x2eab1a(_0x213982){const _0x2c3b39=_0x2af29f;if(!_0x213982)return null;const _0x1511dc=_0x213982[_0x2c3b39(0x324)]();if(!_0x1511dc)return null;try{return JSON[_0x2c3b39(0x17a)](_0x1511dc);}catch{}try{return JSON['parse'](_0x341c54(_0x1511dc));}catch(_0x593254){throw new SyntaxError(_0x593254[_0x2c3b39(0x227)],{'cause':_0x593254});}}function _0x341c54(_0x1fdd77){const _0x3089f3=_0x2af29f;let _0x371f3e='',_0x17588f=0x0;while(_0x17588f<_0x1fdd77[_0x3089f3(0x340)]){const _0x55843e=_0x1fdd77[_0x17588f];if(_0x55843e==='\x22'){_0x371f3e+='\x22',_0x17588f++;while(_0x17588f<_0x1fdd77[_0x3089f3(0x340)]&&_0x1fdd77[_0x17588f]!=='\x22'){if(_0x1fdd77[_0x17588f]==='\x5c'){_0x371f3e+=_0x1fdd77[_0x17588f++];if(_0x17588f<_0x1fdd77[_0x3089f3(0x340)])_0x371f3e+=_0x1fdd77[_0x17588f++];}else _0x371f3e+=_0x1fdd77[_0x17588f++];}_0x371f3e+='\x22';if(_0x17588f<_0x1fdd77[_0x3089f3(0x340)])_0x17588f++;continue;}if(_0x55843e==='\x27'){_0x371f3e+='\x22',_0x17588f++;while(_0x17588f<_0x1fdd77[_0x3089f3(0x340)]&&_0x1fdd77[_0x17588f]!=='\x27'){if(_0x1fdd77[_0x17588f]==='\x5c'&&_0x1fdd77[_0x17588f+0x1]==='\x27')_0x371f3e+='\x27',_0x17588f+=0x2;else _0x1fdd77[_0x17588f]==='\x22'?(_0x371f3e+='\x5c\x22',_0x17588f++):_0x371f3e+=_0x1fdd77[_0x17588f++];}_0x371f3e+='\x22';if(_0x17588f<_0x1fdd77[_0x3089f3(0x340)])_0x17588f++;continue;}if(_0x3089f3(0x2b4)[_0x3089f3(0x2a7)](_0x55843e)){_0x371f3e+=_0x55843e,_0x17588f++;continue;}let _0x449d84='';while(_0x17588f<_0x1fdd77['length']&&!_0x3089f3(0x367)[_0x3089f3(0x2a7)](_0x1fdd77[_0x17588f])&&_0x1fdd77[_0x17588f]!=='\x20'&&_0x1fdd77[_0x17588f]!=='\x09'&&_0x1fdd77[_0x17588f]!=='\x0a'&&_0x1fdd77[_0x17588f]!=='\x0d'){_0x449d84+=_0x1fdd77[_0x17588f++];}let _0x59f73a=_0x17588f;while(_0x59f73a<_0x1fdd77['length']&&(_0x1fdd77[_0x59f73a]==='\x20'||_0x1fdd77[_0x59f73a]==='\x09'))_0x59f73a++;if(_0x1fdd77[_0x59f73a]===':')_0x371f3e+='\x22'+_0x449d84+'\x22';else _0x449d84==='true'||_0x449d84===_0x3089f3(0x3bf)||_0x449d84===_0x3089f3(0x207)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x3089f3(0x21b)](_0x449d84)?_0x371f3e+=_0x449d84:_0x371f3e+='\x22'+_0x449d84+'\x22';}return _0x371f3e['replace'](/,(\s*[}\]])/g,'$1');}function _0x3f684f(_0x1b746b){const _0x360809=_0x2af29f,_0xbcf4b=[];let _0x5e7e86=0x0;while(_0x5e7e86<_0x1b746b[_0x360809(0x340)]){while(_0x5e7e86<_0x1b746b['length']&&(_0x1b746b[_0x5e7e86]==='\x20'||_0x1b746b[_0x5e7e86]==='\x09'))_0x5e7e86++;if(_0x5e7e86>=_0x1b746b['length'])break;const _0x3fb389=_0x1b746b[_0x5e7e86];if(_0x3fb389==='{'||_0x3fb389==='['){const _0x30f25b=_0x3fb389==='{'?'}':']',_0x19dde1=_0x5e7e86++;let _0x107650=0x1,_0x30277f=![],_0x2849de='';while(_0x5e7e86<_0x1b746b[_0x360809(0x340)]&&_0x107650>0x0){const _0x415f82=_0x1b746b[_0x5e7e86];if(_0x30277f){if(_0x415f82==='\x5c')_0x5e7e86++;else{if(_0x415f82===_0x2849de)_0x30277f=![];}}else{if(_0x415f82==='\x22'||_0x415f82==='\x27')_0x30277f=!![],_0x2849de=_0x415f82;else{if(_0x415f82===_0x3fb389)_0x107650++;else{if(_0x415f82===_0x30f25b)_0x107650--;}}}_0x5e7e86++;}_0xbcf4b['push'](_0x1b746b[_0x360809(0x219)](_0x19dde1,_0x5e7e86));continue;}if(_0x3fb389==='\x22'||_0x3fb389==='\x27'){const _0x5e1a52=_0x3fb389;_0x5e7e86++;let _0x48ad91='';while(_0x5e7e86<_0x1b746b[_0x360809(0x340)]&&_0x1b746b[_0x5e7e86]!==_0x5e1a52){if(_0x1b746b[_0x5e7e86]==='\x5c'&&_0x5e7e86+0x1<_0x1b746b[_0x360809(0x340)])_0x5e7e86++,_0x48ad91+=_0x1b746b[_0x5e7e86++];else _0x48ad91+=_0x1b746b[_0x5e7e86++];}if(_0x5e7e86<_0x1b746b[_0x360809(0x340)])_0x5e7e86++;_0xbcf4b['push'](_0x48ad91);continue;}let _0xbacccd='';while(_0x5e7e86<_0x1b746b[_0x360809(0x340)]&&_0x1b746b[_0x5e7e86]!=='\x20'&&_0x1b746b[_0x5e7e86]!=='\x09'&&_0x1b746b[_0x5e7e86]!=='{'&&_0x1b746b[_0x5e7e86]!=='['){_0xbacccd+=_0x1b746b[_0x5e7e86++];}if(_0xbacccd)_0xbcf4b[_0x360809(0x2c5)](_0xbacccd);}return _0xbcf4b;}function _0x49c9a1(_0x30cd3e,_0x5e5c58){const _0x1006d0=_0x2af29f,_0x5481e8=[..._0x30cd3e['_envs'][_0x1006d0(0x3e7)]()][_0x1006d0(0x365)](_0x3aa174=>!_0x3aa174[_0x1006d0(0x343)]('~'));console[_0x1006d0(0x30a)](['',_0xd4f90(_0x249307[_0x1006d0(0x162)]+_0x249307[_0x1006d0(0x160)],_0x1006d0(0x1c7)),_0xd4f90(_0x249307['bold']+_0x249307['cyan'],_0x1006d0(0x28c))+_0xd4f90(_0x249307[_0x1006d0(0x162)],_0x1006d0(0x22f))+_0xd4f90(_0x249307[_0x1006d0(0x162)]+_0x249307[_0x1006d0(0x160)],'║'),_0xd4f90(_0x249307['bold']+_0x249307['cyan'],_0x1006d0(0x1c9)),'','\x20\x20'+_0xd4f90(_0x249307[_0x1006d0(0x112)],'✓')+'\x20'+_0xd4f90(_0x249307[_0x1006d0(0x162)],_0x1006d0(0x108))+_0x1006d0(0x3be)+_0x5e5c58[_0x1006d0(0x38d)],'\x20\x20'+_0xd4f90(_0x249307['green'],'✓')+'\x20'+_0xd4f90(_0x249307[_0x1006d0(0x162)],'api')+'\x20\x20\x20\x20\x20http://localhost:'+_0x5e5c58[_0x1006d0(0x38d)]+_0x1006d0(0x30f),'\x20\x20'+_0xd4f90(_0x249307[_0x1006d0(0x112)],'✓')+'\x20'+_0xd4f90(_0x249307[_0x1006d0(0x162)],_0x1006d0(0x32b))+_0x1006d0(0x26f)+_0x5e5c58[_0x1006d0(0x371)],'\x20\x20'+_0xd4f90(_0x249307[_0x1006d0(0x112)],'✓')+'\x20'+_0xd4f90(_0x249307['bold'],'id')+_0x1006d0(0x33c)+_0xd4f90(_0x249307[_0x1006d0(0x31d)],_0x30cd3e['id']),'\x20\x20'+_0xd4f90(_0x249307['green'],'✓')+'\x20'+_0xd4f90(_0x249307[_0x1006d0(0x162)],_0x1006d0(0x12c))+_0x1006d0(0x26f)+_0x5481e8[_0x1006d0(0x2df)](_0xd0d378=>_0xd4f90(_0x249307['cyan'],_0xd0d378))['join']('\x20\x20'),..._0x5e5c58[_0x1006d0(0x328)]?[]:['\x20\x20'+_0xd4f90(_0x249307[_0x1006d0(0x112)],'✓')+'\x20'+_0xd4f90(_0x249307['bold'],'admin')+_0x1006d0(0x230)+_0x5e5c58[_0x1006d0(0x38d)]+'/admin/index.html'],'',_0xd4f90(_0x249307[_0x1006d0(0x394)],_0x1006d0(0x317)+_0xd4f90(_0x249307[_0x1006d0(0x162)],_0x1006d0(0x3e0))+_0x1006d0(0x220)+_0xd4f90(_0x249307[_0x1006d0(0x162)],_0x1006d0(0x30d))+_0x1006d0(0x259)+_0xd4f90(_0x249307['bold'],_0x1006d0(0x2dc))+_0x1006d0(0x2d0)),''][_0x1006d0(0x251)]('\x0a'));}function _0x39e87a(_0x62eaca){const _0xcfce2d=_0x2af29f;console[_0xcfce2d(0x30a)]('\x0a'+_0xd4f90(_0x249307['bold'],_0xcfce2d(0x210))+'\x20\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x394)],'—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected')+_0xcfce2d(0x3f2)+_0xd4f90(_0x249307[_0xcfce2d(0x160)],'<path>')+_0xcfce2d(0x29a)+_0xd4f90(_0x249307[_0xcfce2d(0x160)],_0xcfce2d(0x2f7))+'\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x143)],'<json-body>')+_0xcfce2d(0x338)+_0xd4f90(_0x249307[_0xcfce2d(0x160)],_0xcfce2d(0x205))+'\x20'+_0xd4f90(_0x249307['cyan'],_0xcfce2d(0x2f7))+'\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x143)],_0xcfce2d(0x281))+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x394)],'Examples')+_0xcfce2d(0x3f0)+_0xd4f90(_0x249307[_0xcfce2d(0x31d)],'info')+_0xcfce2d(0x28b)+_0xd4f90(_0x249307[_0xcfce2d(0x31d)],'envs')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x31d)],'types')+_0xcfce2d(0x26a)+_0x62eaca[_0xcfce2d(0x319)]+'/types\x0a\x20\x20\x20\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x31d)],'type/users')+_0xcfce2d(0x149)+_0x62eaca[_0xcfce2d(0x319)]+_0xcfce2d(0x3b3)+_0xd4f90(_0x249307['gray'],_0xcfce2d(0x33d))+_0xcfce2d(0x216)+_0x62eaca[_0xcfce2d(0x319)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x31d)],_0xcfce2d(0x234))+_0xcfce2d(0x261)+_0x62eaca[_0xcfce2d(0x319)]+'/type/users/query\x0a\x20\x20\x20\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x31d)],_0xcfce2d(0x23f))+_0xcfce2d(0x3f0)+_0xd4f90(_0x249307[_0xcfce2d(0x31d)],_0xcfce2d(0x3ca))+_0xcfce2d(0x3f0)+_0xd4f90(_0x249307[_0xcfce2d(0x31d)],'env/staging/info')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a'+_0xd4f90(_0x249307['bold'],_0xcfce2d(0x177))+'\x20\x20'+_0xd4f90(_0x249307['dim'],'(on\x20any\x20path\x20command)')+'\x0a\x0a\x20\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x160)],_0xcfce2d(0x3da))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x160)],_0xcfce2d(0x19f))+_0xcfce2d(0x1b9)+_0xd4f90(_0x249307[_0xcfce2d(0x394)],_0xcfce2d(0x202))+_0xcfce2d(0x3f0)+_0xd4f90(_0x249307[_0xcfce2d(0x31d)],'types\x20--env\x20staging')+_0xcfce2d(0x3f0)+_0xd4f90(_0x249307[_0xcfce2d(0x31d)],_0xcfce2d(0x129))+'\x0a\x20\x20\x20\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x31d)],_0xcfce2d(0x2a0))+'\x0a\x0a'+_0xd4f90(_0x249307[_0xcfce2d(0x162)],_0xcfce2d(0x239))+_0xcfce2d(0x3f2)+_0xd4f90(_0x249307[_0xcfce2d(0x160)],_0xcfce2d(0x37f))+_0xcfce2d(0x411)+_0xd4f90(_0x249307[_0xcfce2d(0x160)],_0xcfce2d(0x319))+_0xcfce2d(0x334)+_0xd4f90(_0x249307[_0xcfce2d(0x160)],'routes')+'\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x394)],_0xcfce2d(0x14e))+_0xcfce2d(0x2b6)+_0xd4f90(_0x249307[_0xcfce2d(0x160)],'logs')+'\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x394)],'[on|off|level]')+_0xcfce2d(0x3ec)+_0xd4f90(_0x249307[_0xcfce2d(0x160)],_0xcfce2d(0x3b9))+_0xcfce2d(0x1d2)+_0xd4f90(_0x249307['cyan'],_0xcfce2d(0x3e0))+_0xcfce2d(0x29e)+_0xd4f90(_0x249307[_0xcfce2d(0x160)],_0xcfce2d(0x2dc))+'\x20'+_0xd4f90(_0x249307[_0xcfce2d(0x394)],_0xcfce2d(0x1e6))+_0xcfce2d(0x2d1));}let _0x5f1118=![];async function _0x613f3a(_0x46fae7,_0x27f6bd=0x0,_0x5a3c87=null){const _0x468a6a=_0x2af29f;_0x5f1118&&(process[_0x468a6a(0x13d)][_0x468a6a(0x28f)](_0xd4f90(_0x249307[_0x468a6a(0x286)],_0x468a6a(0x242))),process[_0x468a6a(0x2dc)](0x82));_0x5f1118=!![],process[_0x468a6a(0x122)][_0x468a6a(0x28f)]('\x0a'),process[_0x468a6a(0x13d)]['write'](_0xd4f90(_0x249307[_0x468a6a(0x143)],_0x468a6a(0x18d)+(_0x5a3c87?_0x468a6a(0x359)+_0x5a3c87+',\x20':'')+_0x468a6a(0x200)));const _0x542271=setTimeout(()=>{const _0x50c988=_0x468a6a;process['stderr'][_0x50c988(0x28f)](_0xd4f90(_0x249307[_0x50c988(0x286)],_0x50c988(0x3ed))),process[_0x50c988(0x2dc)](0x1);},0x1388);try{await _0x46fae7[_0x468a6a(0x15c)]();}catch(_0x7fac19){console[_0x468a6a(0x3ce)](_0xd4f90(_0x249307[_0x468a6a(0x286)],'\x20\x20'+_0x7fac19[_0x468a6a(0x227)]));}clearTimeout(_0x542271),process[_0x468a6a(0x13d)][_0x468a6a(0x28f)](_0xd4f90(_0x249307[_0x468a6a(0x394)],_0x468a6a(0x3a4))),process[_0x468a6a(0x2dc)](_0x27f6bd);}function _0x48fce9(_0x363a12){const _0xdfbb33=_0x2af29f,_0x506736=_0x363a12[_0xdfbb33(0x319)]!==_0xdfbb33(0x2ab)?_0xd4f90(_0x249307[_0xdfbb33(0x143)],'['+_0x363a12[_0xdfbb33(0x319)]+']'):'';return _0xd4f90(_0x249307[_0xdfbb33(0x162)]+_0x249307[_0xdfbb33(0x160)],'okdb')+_0x506736+_0xd4f90(_0x249307[_0xdfbb33(0x31d)],'>\x20');}const _0x408e56=new Set([_0x2af29f(0x180),_0x2af29f(0x3d2),_0x2af29f(0x2bc),_0x2af29f(0x32c),_0x2af29f(0x283)]);async function _0x13bb61(_0xd21ced,_0x5bb9b4,_0x3f44c3,_0x332647,_0x217a94,_0x4ab103){const _0x236108=_0x2af29f;_0xd21ced=_0xd21ced[_0x236108(0x324)]();if(!_0xd21ced||_0xd21ced[_0x236108(0x343)]('#'))return;const _0x5e5393=_0x3f684f(_0xd21ced),{flags:_0x4e1e35,rest:_0x355c1e}=_0x2cfc2a(_0x5e5393);if(!_0x355c1e[_0x236108(0x340)])return;const _0x21260d=_0x355c1e[0x0],_0x517246=_0x21260d[_0x236108(0x3aa)]();if(_0x517246===_0x236108(0x27f)){if(_0x355c1e[0x1])_0x21809a(_0x5bb9b4,_0x26a1d5(_0x355c1e[0x1],_0x4e1e35['env']??_0x217a94['env']));else _0x39e87a(_0x217a94);return;}if(_0x517246===_0x236108(0x10e)){const _0x2d404c=_0x355c1e[0x1];if(!_0x2d404c){console[_0x236108(0x30a)](_0xd4f90(_0x249307[_0x236108(0x286)],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x5bb9b4[_0x236108(0x319)](_0x2d404c),_0x217a94[_0x236108(0x319)]=_0x2d404c,_0x4ab103?.[_0x236108(0x3e5)](_0x48fce9(_0x217a94)),console[_0x236108(0x30a)]('\x0a\x20\x20'+_0xd4f90(_0x249307[_0x236108(0x112)],'✓')+_0x236108(0x134)+_0xd4f90(_0x249307[_0x236108(0x162)]+_0x249307[_0x236108(0x160)],_0x2d404c)+'\x0a');}catch{console['log'](_0x236108(0x197)+_0xd4f90(_0x249307[_0x236108(0x286)],'✗')+'\x20environment\x20'+_0xd4f90(_0x249307['bold'],_0x2d404c)+_0x236108(0x391)+_0xd4f90(_0x249307[_0x236108(0x394)],_0x236108(0x379)));}return;}if(_0x517246===_0x236108(0x2fe)){const _0x1e4b05=[..._0x5bb9b4[_0x236108(0x368)][_0x236108(0x3e7)]()][_0x236108(0x365)](_0x574ab0=>!_0x574ab0[_0x236108(0x343)]('~'));console['log']('');for(const _0x4ff1be of _0x1e4b05){const _0x162d23=_0x4ff1be===_0x217a94[_0x236108(0x319)];console[_0x236108(0x30a)]('\x20\x20'+(_0x162d23?_0xd4f90(_0x249307[_0x236108(0x112)],'●'):_0xd4f90(_0x249307['dim'],'○'))+'\x20\x20'+(_0x162d23?_0xd4f90(_0x249307[_0x236108(0x162)]+_0x249307[_0x236108(0x160)],_0x4ff1be):_0xd4f90(_0x249307[_0x236108(0x394)],_0x4ff1be)));}console['log'](_0x236108(0x197)+_0xd4f90(_0x249307['dim'],'active:')+'\x20'+_0xd4f90(_0x249307[_0x236108(0x160)],_0x217a94[_0x236108(0x319)])),console['log']('');return;}if(_0x517246===_0x236108(0x35c)){const _0x2cf8ff=[..._0x5bb9b4[_0x236108(0x368)][_0x236108(0x39d)]()][_0x236108(0x365)](_0x28b661=>!_0x28b661[_0x236108(0x167)]['startsWith']('~'));console[_0x236108(0x30a)]('');const _0x236d97=Math[_0x236108(0x41b)](..._0x2cf8ff[_0x236108(0x2df)](_0x2adf5e=>_0x2adf5e[_0x236108(0x167)][_0x236108(0x340)]));for(const _0x2e241e of _0x2cf8ff){const _0x3dc8d5=_0x2e241e[_0x236108(0x167)]===_0x217a94[_0x236108(0x319)],_0x7cbd73=_0x3dc8d5?_0xd4f90(_0x249307[_0x236108(0x112)],'●'):_0xd4f90(_0x249307[_0x236108(0x394)],'○'),_0x915778=_0x3dc8d5?_0xd4f90(_0x249307[_0x236108(0x162)]+_0x249307[_0x236108(0x160)],_0x2e241e['name'][_0x236108(0x419)](_0x236d97)):_0xd4f90(_0x249307[_0x236108(0x394)],_0x2e241e[_0x236108(0x167)][_0x236108(0x419)](_0x236d97)),_0x5e19ce=[..._0x2e241e[_0x236108(0x2e9)][_0x236108(0x3e7)]()][_0x236108(0x365)](_0x3ab4b6=>!_0x3ab4b6['startsWith']('~')),_0x5e1c5f=_0x5e19ce[_0x236108(0x340)]?_0xd4f90(_0x249307[_0x236108(0x394)],_0x5e19ce[_0x236108(0x219)](0x0,0x5)[_0x236108(0x251)](',\x20')+(_0x5e19ce['length']>0x5?_0x236108(0x3f6)+(_0x5e19ce[_0x236108(0x340)]-0x5)+'\x20more':'')):_0xd4f90(_0x249307[_0x236108(0x394)],_0x236108(0x189));console[_0x236108(0x30a)]('\x20\x20'+_0x7cbd73+'\x20\x20'+_0x915778+'\x20\x20'+_0x5e1c5f);}console[_0x236108(0x30a)]('');return;}if(_0x517246===_0x236108(0x168)){const _0x1caeb3=_0x4e1e35[_0x236108(0x319)]??_0x355c1e[0x1]??_0x217a94[_0x236108(0x319)];try{const _0x59132a=_0x5bb9b4[_0x236108(0x319)](_0x1caeb3),_0x1dfde5=[..._0x59132a[_0x236108(0x2e9)]['keys']()][_0x236108(0x365)](_0x4c154a=>!_0x4c154a[_0x236108(0x343)]('~'))[_0x236108(0x3a5)]();console['log'](_0x236108(0x197)+_0xd4f90(_0x249307[_0x236108(0x394)],_0x1dfde5[_0x236108(0x340)]+_0x236108(0x17f)+(_0x1dfde5['length']!==0x1?'s':'')+_0x236108(0x128)+_0x1caeb3));for(const _0x1a55f4 of _0x1dfde5){const _0x47c54e=_0x59132a[_0x236108(0x2e9)]['get'](_0x1a55f4),_0x118037=_0x47c54e?.[_0x236108(0x3e2)]?.[_0x236108(0x3cb)]?.()??0x0,_0x39ae9a=_0xd4f90(_0x249307[_0x236108(0x162)]+_0x249307[_0x236108(0x160)],_0x1a55f4[_0x236108(0x419)](0x1c));console[_0x236108(0x30a)](_0x236108(0x26f)+_0x39ae9a+'\x20\x20'+_0xd4f90(_0x249307[_0x236108(0x2ba)],String(_0x118037)[_0x236108(0x3c6)](0x6))+'\x20'+_0xd4f90(_0x249307[_0x236108(0x394)],'records'));}console[_0x236108(0x30a)]('');}catch(_0x404426){console[_0x236108(0x3ce)](_0xd4f90(_0x249307[_0x236108(0x286)],_0x236108(0x197)+_0x404426[_0x236108(0x227)]+'\x0a'));}return;}if(_0x517246==='ROUTES'){_0x5bfc65(_0x5bb9b4,_0x355c1e[_0x236108(0x219)](0x1)[_0x236108(0x251)]('\x20'));return;}if(_0x517246==='LOGS'){const _0x4587e5=(_0x355c1e[0x1]??'')[_0x236108(0x342)]();if(!_0x4587e5||_0x4587e5==='on')_0x332647[_0x236108(0x41d)]=!![],_0x332647[_0x236108(0x414)]=_0x236108(0x36c),console['log'](_0x236108(0x197)+_0xd4f90(_0x249307[_0x236108(0x112)],'✓')+'\x20logs\x20on\x20\x20'+_0xd4f90(_0x249307['dim'],_0x236108(0x232))+'\x0a');else{if(_0x4587e5==='off')_0x332647['enabled']=![],console[_0x236108(0x30a)](_0x236108(0x197)+_0xd4f90(_0x249307[_0x236108(0x143)],'○')+_0x236108(0x29c));else _0x33d84a[_0x4587e5]!==undefined?(_0x332647[_0x236108(0x41d)]=!![],_0x332647['level']=_0x4587e5,console[_0x236108(0x30a)](_0x236108(0x197)+_0xd4f90(_0x249307[_0x236108(0x112)],'✓')+'\x20log\x20level:\x20'+_0xd4f90(_0x249307[_0x236108(0x162)],_0x4587e5)+'\x0a')):console[_0x236108(0x3ce)](_0xd4f90(_0x249307[_0x236108(0x286)],_0x236108(0x333)));}return;}if(_0x517246==='EXIT'||_0x517246===_0x236108(0x14a)){await _0x613f3a(_0x5bb9b4,0x0);return;}if(_0x517246===_0x236108(0x1ee)){const _0x2f7e88=_0x236108(0x3ef)+_0x3f44c3[_0x236108(0x38d)]+_0x236108(0x321),_0x54d578=process[_0x236108(0x3a1)]===_0x236108(0x32d)?'start\x20'+_0x2f7e88:process[_0x236108(0x3a1)]===_0x236108(0x2fb)?_0x236108(0x139)+_0x2f7e88:_0x236108(0x3dc)+_0x2f7e88;require$$4[_0x236108(0x35f)](_0x54d578),console[_0x236108(0x30a)](_0x236108(0x197)+_0xd4f90(_0x249307[_0x236108(0x112)],'✓')+_0x236108(0x3d3)+_0xd4f90(_0x249307[_0x236108(0x160)],_0x2f7e88)+'\x0a');return;}let _0xfb2aec,_0x2c0fd3,_0x3683d8;if(_0x408e56[_0x236108(0x305)](_0x517246)){_0xfb2aec=_0x517246,_0x2c0fd3=_0x355c1e[0x1],_0x3683d8=_0x355c1e[_0x236108(0x219)](0x2);if(!_0x2c0fd3){console[_0x236108(0x3ce)](_0xd4f90(_0x249307[_0x236108(0x286)],'\x20\x20Usage:\x20'+_0x21260d+_0x236108(0x1dc)));return;}}else _0xfb2aec=null,_0x2c0fd3=_0x355c1e[0x0],_0x3683d8=_0x355c1e[_0x236108(0x219)](0x1);const _0x3a803c=_0x4e1e35[_0x236108(0x319)]??_0x217a94['env'],_0x2c0067=_0x26a1d5(_0x2c0fd3,_0x3a803c);if(_0x4e1e35[_0x236108(0x3e0)]){_0x21809a(_0x5bb9b4,_0x2c0067);return;}let _0x5b693e=null;if(_0x3683d8[_0x236108(0x340)]){const _0x5a85e3=_0x3683d8[_0x236108(0x251)]('\x20');try{_0x5b693e=_0x2eab1a(_0x5a85e3);}catch(_0x1b8a0d){console[_0x236108(0x3ce)](_0xd4f90(_0x249307[_0x236108(0x286)],_0x236108(0x2b0)+_0x5a85e3+_0x236108(0x197)+_0xd4f90(_0x249307['dim'],_0x1b8a0d[_0x236108(0x227)])+'\x0a'));return;}}if(!_0xfb2aec)_0xfb2aec=_0x5b693e!==null?_0x236108(0x3d2):'GET';try{const _0x1c9e04=await _0x4d1ff8(_0x5bb9b4,_0xfb2aec,_0x2c0067,_0x5b693e);_0x1b9024(_0x1c9e04['status'],_0x1c9e04[_0x236108(0x399)]);}catch(_0x1b1c0e){console[_0x236108(0x3ce)]('\x0a\x20\x20'+_0xd4f90(_0x249307['red'],'✗')+'\x20'+_0x1b1c0e['message']+'\x0a');}}class _0x2e9965{constructor(){const _0xfc5ca9=_0x2af29f;this[_0xfc5ca9(0x3ee)]=new Map(),this[_0xfc5ca9(0x416)]=null,this[_0xfc5ca9(0x1eb)]=![];}}function _0x598f80(_0x330a3d){const _0x421c55=_0x2af29f,_0x47bbc2=new _0x2e9965();for(const _0x3ca2de of _0x330a3d){if(_0x3ca2de[_0x421c55(0x249)]?.[_0x421c55(0x252)])continue;const _0x199cc4=_0x3ca2de[_0x421c55(0x32b)][_0x421c55(0x29d)](/^\/api/,'')[_0x421c55(0x29d)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x421c55(0x29d)](/^\//,'');if(!_0x199cc4)continue;let _0x2339b6=_0x47bbc2;for(const _0x5a6de9 of _0x199cc4[_0x421c55(0x250)]('/')[_0x421c55(0x365)](Boolean)){if(_0x5a6de9['startsWith'](':')){const _0x2e8c4c=_0x5a6de9[_0x421c55(0x219)](0x1);if(!_0x2339b6[_0x421c55(0x416)])_0x2339b6[_0x421c55(0x416)]={'param':_0x2e8c4c,'node':new _0x2e9965()};_0x2339b6=_0x2339b6[_0x421c55(0x416)][_0x421c55(0x3ab)];}else{if(!_0x2339b6['children'][_0x421c55(0x305)](_0x5a6de9))_0x2339b6[_0x421c55(0x3ee)][_0x421c55(0x27b)](_0x5a6de9,new _0x2e9965());_0x2339b6=_0x2339b6[_0x421c55(0x3ee)]['get'](_0x5a6de9);}}_0x2339b6['terminal']=!![];}return _0x47bbc2;}const _0x3b4c11=new Map();function _0x267424(_0x217062,_0x32b77b,_0x3e4e56){const _0x511947=_0x2af29f,_0x909291=_0x3b4c11['get'](_0x217062);if(_0x909291&&_0x909291[_0x511947(0x3cf)]>Date['now']())return _0x909291[_0x511947(0x20b)];const _0x48c52e=_0x3e4e56();return _0x3b4c11[_0x511947(0x27b)](_0x217062,{'val':_0x48c52e,'exp':Date[_0x511947(0x18f)]()+_0x32b77b}),_0x48c52e;}function _0x4f46fe(_0x3a83ed,_0x2dc0cd,_0x58ca1e,_0x2f0227){const _0x226d54=_0x2af29f,_0x36711c=_0x2dc0cd['env']??_0x2f0227[_0x226d54(0x319)];switch(_0x3a83ed){case'env':return[..._0x58ca1e['_envs'][_0x226d54(0x3e7)]()]['filter'](_0x441c7f=>!_0x441c7f['startsWith']('~'));case _0x226d54(0x150):return _0x267424(_0x226d54(0x3b6)+_0x36711c,0x7d0,()=>{const _0x2dae93=_0x226d54;try{return[..._0x58ca1e[_0x2dae93(0x319)](_0x36711c)[_0x2dae93(0x2e9)][_0x2dae93(0x3e7)]()]['filter'](_0x196196=>!_0x196196['startsWith']('~'));}catch{return[];}});case _0x226d54(0x407):if(!_0x2dc0cd[_0x226d54(0x150)])return[];return _0x267424(_0x226d54(0x349)+_0x36711c+':'+_0x2dc0cd[_0x226d54(0x150)],0x5dc,()=>{const _0xfcb417=_0x226d54;try{const _0x172ff5=_0x58ca1e[_0xfcb417(0x319)](_0x36711c)[_0xfcb417(0x2e9)][_0xfcb417(0x299)](_0x2dc0cd[_0xfcb417(0x150)]);if(!_0x172ff5?.[_0xfcb417(0x3e2)])return[];const _0x40e58d=[];for(const {key:_0x50606b}of _0x172ff5[_0xfcb417(0x3e2)][_0xfcb417(0x184)]({'limit':0x32})){_0x40e58d['push'](String(_0x50606b));if(_0x40e58d[_0xfcb417(0x340)]>=0x32)break;}return _0x40e58d;}catch{return[];}});case _0x226d54(0x192):if(!_0x2dc0cd[_0x226d54(0x150)])return[];return _0x267424(_0x226d54(0x408)+_0x36711c+':'+_0x2dc0cd['type'],0x7d0,()=>{const _0x45620d=_0x226d54;try{const _0x2da577=_0x58ca1e['env'](_0x36711c)['typeSubDbs'][_0x45620d(0x299)](_0x2dc0cd[_0x45620d(0x150)]);return _0x2da577?[..._0x2da577[_0x45620d(0x1e7)]?.[_0x45620d(0x3e7)]()??[]]:[];}catch{return[];}});case _0x226d54(0x3bc):if(!_0x2dc0cd['type'])return[];return _0x267424(_0x226d54(0x17e)+_0x36711c+':'+_0x2dc0cd[_0x226d54(0x150)],0x7d0,()=>{const _0x3ae1ac=_0x226d54;try{return _0x58ca1e[_0x3ae1ac(0x26e)]?.[_0x3ae1ac(0x34e)]?.(_0x2dc0cd[_0x3ae1ac(0x150)],_0x58ca1e[_0x3ae1ac(0x319)](_0x36711c))?.[_0x3ae1ac(0x2df)](_0x4ca94f=>_0x4ca94f['name'])??[];}catch{return[];}});default:return[];}}function _0xb4c870(_0x20554d,_0x56e69d,_0x1c2a20,_0x535ff7){const _0x331ff9=_0x2af29f,_0x167e42=_0x20554d[_0x331ff9(0x25b)]('/'),_0x4cba05=_0x20554d[_0x331ff9(0x250)]('/'),_0x5443f0=_0x167e42?_0x4cba05['slice'](0x0,-0x1):_0x4cba05[_0x331ff9(0x219)](0x0,-0x1),_0x28bb9c=_0x167e42?'':_0x4cba05[_0x4cba05[_0x331ff9(0x340)]-0x1];let _0x50377=_0x56e69d;const _0x4955fc={};for(const _0x34ab34 of _0x5443f0){if(!_0x34ab34)continue;if(_0x50377['children']['has'](_0x34ab34))_0x50377=_0x50377[_0x331ff9(0x3ee)]['get'](_0x34ab34);else{if(_0x50377[_0x331ff9(0x416)])_0x4955fc[_0x50377[_0x331ff9(0x416)][_0x331ff9(0x1bd)]]=_0x34ab34,_0x50377=_0x50377[_0x331ff9(0x416)][_0x331ff9(0x3ab)];else return[];}}const _0x344f48=_0x5443f0['filter'](Boolean),_0x44a5b1=_0x344f48[_0x331ff9(0x340)]?_0x344f48[_0x331ff9(0x251)]('/')+'/':'',_0x452eb2=[];for(const [_0x4806de]of _0x50377[_0x331ff9(0x3ee)]){if(_0x4806de[_0x331ff9(0x343)](_0x28bb9c))_0x452eb2['push'](_0x44a5b1+_0x4806de);}if(_0x50377[_0x331ff9(0x416)])for(const _0x115114 of _0x4f46fe(_0x50377[_0x331ff9(0x416)]['param'],_0x4955fc,_0x1c2a20,_0x535ff7)){if(String(_0x115114)[_0x331ff9(0x343)](_0x28bb9c))_0x452eb2[_0x331ff9(0x2c5)](_0x44a5b1+_0x115114);}return _0x452eb2['slice'](0x0,0x64);}const _0x4bfb33=[_0x2af29f(0x3e0),_0x2af29f(0x174),_0x2af29f(0x319),_0x2af29f(0x12c),_0x2af29f(0x3ea),_0x2af29f(0x30d),_0x2af29f(0x315),_0x2af29f(0x3b9),_0x2af29f(0x2dc),'quit'];function _0x4f50c8(_0x426250,_0x2c3911,_0x5cb541){return function _0x181440(_0x24e6fe){const _0x209be2=_0x4085;try{const _0x5cac70=_0x24e6fe[_0x209be2(0x255)](/\s[{[]/),_0x463c94=_0x5cac70>=0x0?_0x24e6fe[_0x209be2(0x219)](0x0,_0x5cac70):_0x24e6fe,_0x589eb4=_0x463c94[_0x209be2(0x1bf)]();if(!_0x589eb4){const _0x3f37b8=[..._0x4bfb33,...[..._0x426250[_0x209be2(0x3ee)][_0x209be2(0x3e7)]()]][_0x209be2(0x219)](0x0,0x64);return[_0x3f37b8,''];}const _0x99e452=_0x589eb4[_0x209be2(0x250)](/\s+/),_0x5a7604=_0x99e452[0x0],_0x75460f=_0x5a7604[_0x209be2(0x3aa)]();if(_0x99e452['length']===0x1){const _0xe5909d=_0x5a7604[_0x209be2(0x342)](),_0x5299ba=_0x4bfb33[_0x209be2(0x365)](_0x48f097=>_0x48f097[_0x209be2(0x343)](_0xe5909d)),_0x23eaa3=_0xb4c870(_0x5a7604,_0x426250,_0x2c3911,_0x5cb541),_0x39efd0=[...new Set([..._0x5299ba,..._0x23eaa3])]['slice'](0x0,0x64);return[_0x39efd0,_0x5a7604];}if(_0x408e56[_0x209be2(0x305)](_0x75460f)&&_0x99e452[_0x209be2(0x340)]===0x2){const _0x2ba0e7=_0x99e452[0x1],_0x182306=_0xb4c870(_0x2ba0e7,_0x426250,_0x2c3911,_0x5cb541);return[_0x182306['map'](_0x4214fe=>_0x5a7604+'\x20'+_0x4214fe),_0x5a7604+'\x20'+_0x2ba0e7];}if(!_0x408e56['has'](_0x75460f)&&_0x99e452[_0x209be2(0x340)]>0x1){const _0x255c53=_0xb4c870(_0x5a7604,_0x426250,_0x2c3911,_0x5cb541),_0x405814='\x20'+_0x99e452[_0x209be2(0x219)](0x1)['join']('\x20');return[_0x255c53['map'](_0x55663d=>_0x55663d+_0x405814),_0x5a7604+_0x405814];}return[[],_0x24e6fe];}catch{return[[],_0x24e6fe];}};}async function _0x565594(_0x2c2545,_0x2d995b){const _0x3b84a8=_0x2af29f,_0x3d16fa={'enabled':!![],'level':_0x2d995b[_0x3b84a8(0x40d)]??_0x3b84a8(0x36c)},_0x2c3a7c={'env':_0x3b84a8(0x2ab)},_0x255952={'current':null},_0x37d8e0=_0x598f80(_0x2c2545[_0x3b84a8(0x19b)]['listRoutes']()),_0x4b7732=_0x4f50c8(_0x37d8e0,_0x2c2545,_0x2c3a7c);_0x2c2545[_0x3b84a8(0x30a)][_0x3b84a8(0x2f4)](_0x270781=>{const _0x4e19e7=_0x3b84a8;if(!_0x3d16fa[_0x4e19e7(0x41d)])return;_0x366ab8(_0x270781,_0x3d16fa['level']),_0x255952[_0x4e19e7(0x214)]?.[_0x4e19e7(0x11f)](!![]);}),_0x49c9a1(_0x2c2545,_0x2d995b);const _0x47e42c=_0x419ae2[_0x3b84a8(0x1bc)]({'input':process[_0x3b84a8(0x278)],'output':process[_0x3b84a8(0x122)],'terminal':!![],'completer':_0x4b7732,'prompt':_0x48fce9(_0x2c3a7c),'historySize':_0x5e6922});try{const _0x301764=_0x2524c6[_0x3b84a8(0x131)](_0x42d646,_0x3b84a8(0x40c))[_0x3b84a8(0x250)]('\x0a')['filter'](Boolean);_0x47e42c[_0x3b84a8(0x154)]=_0x301764['reverse']()[_0x3b84a8(0x219)](0x0,_0x5e6922);}catch{}_0x255952['current']=_0x47e42c,_0x47e42c['on'](_0x3b84a8(0x2f8),async _0xd2389b=>{const _0x3d61b7=_0x3b84a8;_0x47e42c['pause']();try{await _0x13bb61(_0xd2389b,_0x2c2545,_0x2d995b,_0x3d16fa,_0x2c3a7c,_0x47e42c);}catch(_0xe2b0f){console['error'](_0xd4f90(_0x249307['red'],_0x3d61b7(0x1e1)+_0xe2b0f[_0x3d61b7(0x227)]));}finally{_0x47e42c[_0x3d61b7(0x1b5)](),_0x47e42c[_0x3d61b7(0x11f)]();}}),_0x47e42c['on']('close',()=>{const _0x5f0fcc=_0x3b84a8;try{const _0x3bc06f=[..._0x47e42c['history']][_0x5f0fcc(0x2af)]()['filter'](Boolean)[_0x5f0fcc(0x219)](0x0,_0x5e6922);_0x2524c6[_0x5f0fcc(0x2d7)](_0x42d646,_0x3bc06f[_0x5f0fcc(0x251)]('\x0a')+'\x0a');}catch{}_0x613f3a(_0x2c2545,0x0);});let _0x364f37=0x0;return process['on']('SIGINT',()=>{const _0x569d33=_0x3b84a8;if(_0x5f1118)return _0x613f3a(_0x2c2545,0x82,_0x569d33(0x10d));if(_0x47e42c[_0x569d33(0x2f8)]==='')return _0x613f3a(_0x2c2545,0x0,_0x569d33(0x10d));const _0x2ab0e1=Date[_0x569d33(0x18f)]();if(_0x2ab0e1-_0x364f37<0x5dc)return _0x613f3a(_0x2c2545,0x0,'SIGINT\x20(double-tap)');_0x364f37=_0x2ab0e1,process[_0x569d33(0x122)]['write']('\x0a'),_0x47e42c['clearLine'](0x0),_0x47e42c['prompt'](),process[_0x569d33(0x13d)][_0x569d33(0x28f)](_0xd4f90(_0x249307['dim'],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on'](_0x3b84a8(0x147),()=>_0x613f3a(_0x2c2545,0x0,_0x3b84a8(0x147))),process['on'](_0x3b84a8(0x18e),()=>_0x613f3a(_0x2c2545,0x0,'SIGBREAK')),_0x47e42c[_0x3b84a8(0x11f)](),_0x47e42c;}return okdbShell={'start':_0x565594,'colorLog':_0x366ab8,'lenientParse':_0x2eab1a,'_splitLine':_0x3f684f,'_formatRouteHelpLines':_0x4d698c,'_routeSummary':_0x4529a4,'_routeTags':_0x373f44},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x272e53=_0x3cf8a9;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process['loadEnvFile']();}catch{}const _0x505c89=require$$1$1,_0x81384d=require$$1;function _0x49ef41(_0x22040a){const _0x4c4d15=_0x4085,_0x21714e=_0x22040a[_0x4c4d15(0x219)](0x2),_0x19fdc8={};let _0xb0196e=0x0;while(_0xb0196e<_0x21714e['length']){const _0x19a653=_0x21714e[_0xb0196e];if(_0x19a653===_0x4c4d15(0x3ad)||_0x19a653==='-p')_0x19fdc8[_0x4c4d15(0x38d)]=Number(_0x21714e[++_0xb0196e]);else{if(_0x19a653===_0x4c4d15(0x161)||_0x19a653==='-d')_0x19fdc8[_0x4c4d15(0x32b)]=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x120)||_0x19a653==='-k')_0x19fdc8[_0x4c4d15(0x407)]=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x16c)||_0x19a653==='-c')_0x19fdc8[_0x4c4d15(0x248)]=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x193))_0x19fdc8[_0x4c4d15(0x40d)]=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x3c0))_0x19fdc8['noRepl']=!![];else{if(_0x19a653==='--no-admin')_0x19fdc8['noAdmin']=!![];else{if(_0x19a653===_0x4c4d15(0x35b)||_0x19a653==='-e')_0x19fdc8[_0x4c4d15(0x319)]=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x2f0))_0x19fdc8[_0x4c4d15(0x3ea)]=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x291))_0x19fdc8[_0x4c4d15(0x21e)]=!![];else{if(_0x19a653==='--blobs')_0x19fdc8[_0x4c4d15(0x2c8)]=!![];else{if(_0x19a653===_0x4c4d15(0x10b))_0x19fdc8[_0x4c4d15(0x31c)]=!![];else{if(_0x19a653===_0x4c4d15(0x2b1)){const _0x3b32d0=[];while(_0xb0196e+0x1<_0x21714e[_0x4c4d15(0x340)]&&!_0x21714e[_0xb0196e+0x1]['startsWith']('--')){_0x3b32d0[_0x4c4d15(0x2c5)](_0x21714e[++_0xb0196e]);}_0x19fdc8[_0x4c4d15(0x3b9)]=_0x3b32d0[_0x4c4d15(0x340)]>0x0?_0x3b32d0:!![];}else{if(_0x19a653===_0x4c4d15(0x1cc))_0x19fdc8[_0x4c4d15(0x37c)]=!![];else{if(_0x19a653==='--name')_0x19fdc8['name']=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x1fd))_0x19fdc8[_0x4c4d15(0x393)]=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x1d7))_0x19fdc8['label']=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x32a))_0x19fdc8[_0x4c4d15(0x14d)]=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x3b4))_0x19fdc8['grants']=_0x21714e[++_0xb0196e];else{if(_0x19a653==='--ttl')_0x19fdc8['ttl']=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x360))_0x19fdc8[_0x4c4d15(0x3ff)]=_0x21714e[++_0xb0196e];else{if(_0x19a653==='--username'||_0x19a653==='-u')_0x19fdc8[_0x4c4d15(0x20c)]=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x1d8))_0x19fdc8[_0x4c4d15(0x1c0)]=_0x21714e[++_0xb0196e];else{if(_0x19a653===_0x4c4d15(0x2aa)||_0x19a653==='-v'){const _0x3735d4=require$$2;console[_0x4c4d15(0x30a)](_0x3735d4['version']),process['exit'](0x0);}else(_0x19a653===_0x4c4d15(0x19f)||_0x19a653==='-h')&&(_0x3ac176(),process[_0x4c4d15(0x2dc)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0xb0196e++;}return _0x19fdc8;}function _0x3ac176(){const _0x349792=_0x4085;console[_0x349792(0x30a)](_0x349792(0x1e5));}const _0x1b12f7=new Set(['debug','info','warn',_0x272e53(0x3ce)]);function _0x4e8882(_0x2d4844){const _0xcb35ed=_0x272e53,_0x168fc6=_0x2d4844[_0xcb35ed(0x248)]?_0x505c89['resolve'](_0x2d4844[_0xcb35ed(0x248)]):_0x505c89[_0xcb35ed(0x350)]('.kdbconfig');let _0x127261={};if(_0x81384d[_0xcb35ed(0x1c5)](_0x168fc6))try{const _0x31a5fd=_0x81384d['readFileSync'](_0x168fc6,_0xcb35ed(0x40c))[_0xcb35ed(0x29d)](/^\uFEFF/,'');_0x127261=JSON[_0xcb35ed(0x17a)](_0x31a5fd),console['log'](_0xcb35ed(0x151)+_0x168fc6);}catch(_0x23df91){console[_0xcb35ed(0x3ce)](_0xcb35ed(0x380)+_0x168fc6+':\x20'+_0x23df91[_0xcb35ed(0x227)]),process[_0xcb35ed(0x2dc)](0x1);}const _0x126a41={'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},_0x3c6dcf={'port':_0x2d4844['port']??_0x127261[_0xcb35ed(0x38d)]??_0x126a41['port']??0x2124,'dbPath':_0x2d4844['path']??_0x127261[_0xcb35ed(0x32b)]??_0x126a41[_0xcb35ed(0x32b)]??_0xcb35ed(0x290),'key':_0x2d4844[_0xcb35ed(0x407)]??_0x127261[_0xcb35ed(0x407)]??_0x126a41['key']??undefined,'logLevel':_0x2d4844[_0xcb35ed(0x40d)]??_0x127261[_0xcb35ed(0x40d)]??_0x126a41[_0xcb35ed(0x40d)]??_0xcb35ed(0x36c),'noRepl':_0x2d4844['noRepl']??_0x127261['noRepl']??_0x126a41[_0xcb35ed(0x18a)]??![],'noAdmin':_0x2d4844[_0xcb35ed(0x328)]??_0x127261['noAdmin']??_0x126a41[_0xcb35ed(0x328)]??![],'admin':_0x127261[_0xcb35ed(0x12d)]??{},'api':_0x127261[_0xcb35ed(0x226)]??undefined,'auth':_0x127261[_0xcb35ed(0x41c)]??undefined,'mcp':_0x127261[_0xcb35ed(0x3b1)]??undefined,'timeMachine':_0x127261[_0xcb35ed(0x27c)]!==![]?_0x127261[_0xcb35ed(0x27c)]??{}:![]};return _0x2d4844[_0xcb35ed(0x3b9)]!==undefined&&(_0x3c6dcf[_0xcb35ed(0x41c)]=_0x3c6dcf[_0xcb35ed(0x41c)]||{},_0x3c6dcf[_0xcb35ed(0x41c)][_0xcb35ed(0x3b9)]=_0x2d4844[_0xcb35ed(0x3b9)]),_0x2d4844['logRequests']&&(_0x3c6dcf[_0xcb35ed(0x273)]=_0x3c6dcf[_0xcb35ed(0x273)]||{},_0x3c6dcf[_0xcb35ed(0x273)][_0xcb35ed(0x37c)]=!![]),(!Number[_0xcb35ed(0x13c)](_0x3c6dcf[_0xcb35ed(0x38d)])||_0x3c6dcf[_0xcb35ed(0x38d)]<0x1||_0x3c6dcf['port']>0xffff)&&(console['error']('[okdb]\x20invalid\x20port:\x20'+_0x3c6dcf[_0xcb35ed(0x38d)]+_0xcb35ed(0x236)),process[_0xcb35ed(0x2dc)](0x1)),!_0x1b12f7[_0xcb35ed(0x305)](_0x3c6dcf[_0xcb35ed(0x40d)])&&(console[_0xcb35ed(0x3ce)](_0xcb35ed(0x3fc)+_0x3c6dcf[_0xcb35ed(0x40d)]+_0xcb35ed(0x1f3)),process[_0xcb35ed(0x2dc)](0x1)),_0x3c6dcf;}function _0x102643(_0x2a0c32){const _0x49c271=_0x272e53;return!!(_0x2a0c32&&typeof _0x2a0c32===_0x49c271(0x1c6)&&!Array[_0x49c271(0x105)](_0x2a0c32)&&Object['keys'](_0x2a0c32)['length']>0x0);}const _0x55d8ad=!process['stdout']['isTTY']||!!process.env.NO_COLOR;function _0x3619b7(_0xc040f6,_0x423fe0){const _0x44a68b=_0x272e53;return _0x55d8ad?_0x423fe0:'\x1b['+_0xc040f6+'m'+_0x423fe0+_0x44a68b(0x1ca);}function _0x228397(_0x56ab2e){const _0x167752=_0x272e53;if(!_0x56ab2e||_0x56ab2e[_0x167752(0x340)]===0x0)return;const _0x4a19ba='─'[_0x167752(0x3ac)](0x38);process[_0x167752(0x13d)]['write']('\x0a'),process[_0x167752(0x13d)][_0x167752(0x28f)](_0x3619b7('33',_0x167752(0x268)+_0x56ab2e[_0x167752(0x340)]+_0x167752(0x144)+(_0x56ab2e[_0x167752(0x340)]>0x1?'S':'')+'\x0a')),process['stderr'][_0x167752(0x28f)]('\x20\x20'+_0x4a19ba+'\x0a');for(const _0x47b900 of _0x56ab2e){const _0x39141e=_0x47b900[_0x167752(0x414)]===_0x167752(0x3ce)?_0x3619b7('31',_0x167752(0x412)):_0x3619b7('33',_0x167752(0x36b));process[_0x167752(0x13d)]['write'](_0x39141e+'\x20\x20'+_0x3619b7('1',_0x47b900[_0x167752(0x1fb)])+'\x0a'),process[_0x167752(0x13d)]['write'](_0x167752(0x10a)+_0x47b900[_0x167752(0x227)]+'\x0a');if(_0x47b900[_0x167752(0x12b)])process[_0x167752(0x13d)][_0x167752(0x28f)](_0x167752(0x10a)+_0x3619b7('2',_0x167752(0x190)+_0x47b900[_0x167752(0x12b)])+'\x0a');process[_0x167752(0x13d)]['write']('\x0a');}process[_0x167752(0x13d)]['write']('\x20\x20'+_0x4a19ba+'\x0a\x0a');}function _0x11bd6a(_0x13618c,_0x34e809){const _0x1e95a1=_0x272e53,_0x4c39eb=_0x13618c[_0x1e95a1(0x19b)]['listen'](_0x34e809);return new Promise((_0x5da628,_0x1c9d22)=>{const _0x289d20=_0x1e95a1;_0x4c39eb[_0x289d20(0x2db)]('listening',_0x5da628),_0x4c39eb[_0x289d20(0x2db)]('error',_0x1c9d22);});}async function _0x5893ee(_0x719665){const _0x9ec9d7=_0x272e53,_0x1a3ea8=require$$3;console[_0x9ec9d7(0x30a)](_0x9ec9d7(0x1f7));let _0x4feea0=!![];const _0x1e960b=(_0x11cc75,_0x5b0940)=>{const _0x447494=_0x9ec9d7;console[_0x447494(0x30a)]('\x20\x20'+(_0x11cc75?'✓':'✗')+'\x20'+_0x5b0940);if(!_0x11cc75)_0x4feea0=![];},_0x619cf1=Number(process[_0x9ec9d7(0x304)][_0x9ec9d7(0x29d)]('v','')[_0x9ec9d7(0x250)]('.')[0x0]);_0x1e960b(_0x619cf1>=0x12,_0x9ec9d7(0x262)+process['version']+(_0x619cf1<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0x27d0a3=_0x505c89[_0x9ec9d7(0x350)](_0x719665['dbPath']);try{_0x81384d[_0x9ec9d7(0x1b0)](_0x27d0a3,{'recursive':!![]});const _0x1d3384=_0x505c89[_0x9ec9d7(0x251)](_0x27d0a3,_0x9ec9d7(0x185));_0x81384d[_0x9ec9d7(0x2d7)](_0x1d3384,''),_0x81384d[_0x9ec9d7(0x159)](_0x1d3384),_0x1e960b(!![],_0x9ec9d7(0x3a0)+_0x27d0a3);}catch(_0x3e93ca){_0x1e960b(![],_0x9ec9d7(0x372)+_0x27d0a3+_0x9ec9d7(0x1a6)+_0x3e93ca['message']+')');}const _0x5112be=await new Promise(_0x4f9d24=>{const _0x44b271=_0x9ec9d7,_0x8a6cbd=_0x1a3ea8[_0x44b271(0x2f1)]();_0x8a6cbd[_0x44b271(0x2db)]('error',()=>_0x4f9d24(![])),_0x8a6cbd[_0x44b271(0x2db)]('listening',()=>{_0x8a6cbd['close'](),_0x4f9d24(!![]);}),_0x8a6cbd['listen'](_0x719665[_0x44b271(0x38d)],'127.0.0.1');});_0x1e960b(_0x5112be,_0x9ec9d7(0x26c)+_0x719665['port']+'\x20'+(_0x5112be?_0x9ec9d7(0x311):_0x9ec9d7(0x309)));const _0x188965=_0x505c89[_0x9ec9d7(0x350)](_0x9ec9d7(0x1db));if(_0x81384d[_0x9ec9d7(0x1c5)](_0x188965))try{JSON[_0x9ec9d7(0x17a)](_0x81384d['readFileSync'](_0x188965,_0x9ec9d7(0x40c))[_0x9ec9d7(0x29d)](/^\uFEFF/,'')),_0x1e960b(!![],_0x9ec9d7(0x109)+_0x188965);}catch(_0x4faa36){_0x1e960b(![],'config\x20file\x20invalid:\x20'+_0x4faa36[_0x9ec9d7(0x227)]);}else _0x1e960b(!![],_0x9ec9d7(0x156));console['log'](''),_0x4feea0?console['log'](_0x9ec9d7(0x29b)):(console[_0x9ec9d7(0x30a)](_0x9ec9d7(0x2ee)),process[_0x9ec9d7(0x2dc)](0x1));}async function _0x432652(){const _0x4db0af=_0x272e53,_0x3f1277=_0x505c89[_0x4db0af(0x350)](_0x4db0af(0x1db));!_0x81384d['existsSync'](_0x3f1277)?(_0x81384d['writeFileSync'](_0x3f1277,JSON[_0x4db0af(0x21f)]({'port':0x2124,'path':'./okdb-data','logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console['log'](_0x4db0af(0x13a))):console[_0x4db0af(0x30a)](_0x4db0af(0x2bb));const _0x4f43fa=_0x505c89[_0x4db0af(0x350)](_0x4db0af(0x290));!_0x81384d[_0x4db0af(0x1c5)](_0x4f43fa)?(_0x81384d[_0x4db0af(0x1b0)](_0x4f43fa,{'recursive':!![]}),console['log']('[okdb]\x20created\x20./okdb-data')):console['log'](_0x4db0af(0x17d)),console[_0x4db0af(0x30a)](_0x4db0af(0x233));}async function _0x29d5eb(_0x570f41){const _0xbb8392=_0x272e53,_0x533c58=_0x505c89[_0xbb8392(0x350)](_0x570f41[_0xbb8392(0x371)]);if(!_0x81384d[_0xbb8392(0x1c5)](_0x533c58)){console['log'](_0xbb8392(0x1a4)+_0x533c58+_0xbb8392(0x28e));return;}const _0xfa7804=require$$0$2,_0x1fc89f=_0xfa7804[_0xbb8392(0x1bc)]({'input':process['stdin'],'output':process[_0xbb8392(0x122)]}),_0x29aef4=await new Promise(_0x2a9eec=>_0x1fc89f[_0xbb8392(0x313)](_0xbb8392(0x16f)+_0x533c58+_0xbb8392(0x1f9),_0x2a9eec));_0x1fc89f[_0xbb8392(0x15c)](),console[_0xbb8392(0x30a)]('');if(_0x29aef4[_0xbb8392(0x324)]()['toLowerCase']()!=='yes'){console[_0xbb8392(0x30a)](_0xbb8392(0x16e));return;}_0x81384d[_0xbb8392(0x3c9)](_0x533c58,{'recursive':!![],'force':!![]}),console[_0xbb8392(0x30a)]('[okdb]\x20reset:\x20'+_0x533c58+_0xbb8392(0x225));}async function _0xd3fa8(_0x30cf89,_0x552a08){const _0x1b5d50=_0x272e53,_0x10d8e7=require$$5,_0x447ba5=_0x505c89[_0x1b5d50(0x350)](_0x552a08['dbPath']);console[_0x1b5d50(0x30a)]('[okdb]\x20opening\x20'+_0x447ba5+'…');const _0x16bfdc=new _0x10d8e7(_0x447ba5,_0x552a08[_0x1b5d50(0x407)]?{'encryptionKey':_0x552a08[_0x1b5d50(0x407)]}:{});await _0x16bfdc['open'](),console[_0x1b5d50(0x30a)](_0x1b5d50(0x172)+_0x30cf89+'…');const {envs:_0x3fc029}=await _0x16bfdc[_0x1b5d50(0x36d)]['backup'](_0x30cf89);for(const _0x39ee81 of _0x3fc029){const _0xfea0ad=_0x39ee81[_0x1b5d50(0x353)]>0x0?_0x1b5d50(0x1a6)+(_0x39ee81[_0x1b5d50(0x353)]/0x400/0x400)[_0x1b5d50(0x335)](0x2)+_0x1b5d50(0x1b3)+(_0x39ee81[_0x1b5d50(0x1d0)]/0x400/0x400)[_0x1b5d50(0x335)](0x2)+'\x20MB)':'';console['log'](_0x1b5d50(0x244)+_0x39ee81['name']+_0x1b5d50(0x3d0)+_0x39ee81[_0x1b5d50(0x157)]+_0xfea0ad);}await _0x16bfdc[_0x1b5d50(0x15c)](),console[_0x1b5d50(0x30a)]('[okdb]\x20backup\x20complete');}async function _0x128edd(_0x74a0a2,_0x13d3c7,_0x5c869f){const _0x29c103=_0x272e53,_0x423b51=require$$5,_0x1f3a69=_0x505c89[_0x29c103(0x350)](_0x13d3c7[_0x29c103(0x371)]),_0x5c81b6=_0x5c869f['env']??_0x29c103(0x2ab),_0x23ef46=_0x5c869f['types']?_0x5c869f['types'][_0x29c103(0x250)](',')[_0x29c103(0x2df)](_0x560b21=>_0x560b21['trim']()):null;console['log'](_0x29c103(0x388)+_0x1f3a69+'…');const _0x28a67e=new _0x423b51(_0x1f3a69,_0x13d3c7[_0x29c103(0x407)]?{'encryptionKey':_0x13d3c7[_0x29c103(0x407)]}:{});await _0x28a67e[_0x29c103(0x3b9)](),console[_0x29c103(0x30a)](_0x29c103(0x2d5)+_0x5c81b6+_0x29c103(0x11a)+_0x74a0a2+'…');const _0x28ef55=await _0x28a67e[_0x29c103(0x36d)][_0x29c103(0x410)](_0x74a0a2,{'envName':_0x5c81b6,'types':_0x23ef46,'includeChanges':!!_0x5c869f[_0x29c103(0x21e)]});console[_0x29c103(0x30a)](_0x29c103(0x208)+_0x28ef55[_0x29c103(0x3ea)]+'\x20\x20records='+_0x28ef55[_0x29c103(0x1ae)]+_0x29c103(0x221)+_0x28ef55['changes']);if(_0x5c869f[_0x29c103(0x2c8)]){const _0x16379f=_0x505c89[_0x29c103(0x251)](_0x505c89[_0x29c103(0x2c7)](_0x74a0a2),_0x29c103(0x2c8));process[_0x29c103(0x122)][_0x29c103(0x28f)](_0x29c103(0x1c4));const {count:_0x179fb1,bytes:_0xcd62e8}=await _0x28a67e[_0x29c103(0x36d)][_0x29c103(0x171)](_0x16379f);console[_0x29c103(0x30a)]('\x0d[okdb]\x20blobs:\x20'+_0x16379f+'\x20\x20('+_0x179fb1+_0x29c103(0x3e4)+(_0x179fb1!==0x1?'s':'')+',\x20'+(_0xcd62e8/0x400/0x400)[_0x29c103(0x335)](0x2)+_0x29c103(0x376));}await _0x28a67e[_0x29c103(0x15c)](),console[_0x29c103(0x30a)]('[okdb]\x20export\x20complete');}async function _0x857a20(_0x96b3db,_0x43273b,_0xdc962a){const _0x28b7eb=_0x272e53,_0x510bfe=require$$5,_0x19ae31=_0x505c89['resolve'](_0x43273b['dbPath']),_0x19b0d0=_0xdc962a['env']??null,_0x4d0801=_0xdc962a[_0x28b7eb(0x3ea)]?_0xdc962a['types'][_0x28b7eb(0x250)](',')[_0x28b7eb(0x2df)](_0x3af6cd=>_0x3af6cd['trim']()):null,_0x4abd43=!!_0xdc962a['drop'];console[_0x28b7eb(0x30a)](_0x28b7eb(0x388)+_0x19ae31+'…');const _0x21644=new _0x510bfe(_0x19ae31,_0x43273b['key']?{'encryptionKey':_0x43273b[_0x28b7eb(0x407)]}:{});await _0x21644[_0x28b7eb(0x3b9)](),console[_0x28b7eb(0x30a)](_0x28b7eb(0x1cb)+_0x96b3db+'…');const _0x59b8cf=await _0x21644[_0x28b7eb(0x36d)][_0x28b7eb(0x23e)](_0x96b3db,{'envName':_0x19b0d0,'types':_0x4d0801,'dropExisting':_0x4abd43,'includeChanges':!!_0xdc962a[_0x28b7eb(0x21e)],'onProgress':({type:_0x1b1141,count:_0x6b688f})=>{const _0x5264f6=_0x28b7eb;process[_0x5264f6(0x122)][_0x5264f6(0x28f)]('\x0d[okdb]\x20'+_0x1b1141+':\x20'+_0x6b688f+_0x5264f6(0x15a));}});process[_0x28b7eb(0x122)]['write']('\x0a'),console['log'](_0x28b7eb(0x3f9)+_0x59b8cf[_0x28b7eb(0x3ea)]+_0x28b7eb(0x3f4)+_0x59b8cf[_0x28b7eb(0x1ae)]+_0x28b7eb(0x221)+_0x59b8cf[_0x28b7eb(0x21e)]);if(_0xdc962a[_0x28b7eb(0x2c8)]){const _0x4a2d0c=_0x505c89[_0x28b7eb(0x251)](_0x505c89[_0x28b7eb(0x2c7)](_0x96b3db),_0x28b7eb(0x2c8));if(_0x81384d[_0x28b7eb(0x1c5)](_0x4a2d0c)){const {imported:_0x1a15e7,skipped:_0x28ce3d}=await _0x21644[_0x28b7eb(0x36d)][_0x28b7eb(0x373)](_0x4a2d0c);console[_0x28b7eb(0x30a)]('[okdb]\x20blobs:\x20imported='+_0x1a15e7+_0x28b7eb(0x39a)+_0x28ce3d);}}await _0x21644[_0x28b7eb(0x15c)](),console[_0x28b7eb(0x30a)]('[okdb]\x20import\x20complete');}async function _0x2d3459(_0x1444d9,_0x9c11a4){const _0x32d953=_0x272e53;_0x9c11a4[_0x32d953(0x393)]&&!_0x9c11a4['name']&&(console[_0x32d953(0x3ce)]('[okdb]\x20error:\x20--password\x20requires\x20--name'),process[_0x32d953(0x2dc)](0x1));const _0x4bc96c=_0x9c11a4['permissions']?_0x9c11a4[_0x32d953(0x14d)][_0x32d953(0x250)](',')[_0x32d953(0x2df)](_0x256bea=>_0x256bea[_0x32d953(0x324)]())[_0x32d953(0x365)](Boolean):[];let _0x39df62={};if(_0x9c11a4[_0x32d953(0x2e7)])try{_0x39df62=JSON[_0x32d953(0x17a)](_0x9c11a4[_0x32d953(0x2e7)]);if(typeof _0x39df62!==_0x32d953(0x1c6)||Array['isArray'](_0x39df62)||_0x39df62===null)throw new Error();}catch{console[_0x32d953(0x3ce)](_0x32d953(0x107)),process[_0x32d953(0x2dc)](0x1);}const _0x98d491=require$$5,{randomToken:_0x53697f,hashToken:_0x3d7e9a,hashPassword:_0x2e5a30}=requireOkdbAuthTokens(),_0x431c5d=require$$0,_0x26df9c=_0x505c89[_0x32d953(0x350)](_0x1444d9[_0x32d953(0x371)]),_0x2a909b=new _0x98d491(_0x26df9c,_0x1444d9[_0x32d953(0x407)]?{'encryptionKey':_0x1444d9[_0x32d953(0x407)]}:{});await _0x2a909b['open']();try{await _0x2a909b[_0x32d953(0x41c)][_0x32d953(0x39b)]();if(_0x9c11a4[_0x32d953(0x167)]){const _0x57c303=await _0x2a909b['auth']['_lookupByName'](_0x9c11a4[_0x32d953(0x167)]);_0x57c303&&(console['error'](_0x32d953(0x127)+_0x9c11a4[_0x32d953(0x167)]+_0x32d953(0x3a3)),process['exit'](0x1));}const _0xcbc3d2=_0x53697f(0x20),_0x5bb406=_0x3d7e9a(_0xcbc3d2),_0x26aae1=_0x9c11a4[_0x32d953(0x393)]?await _0x2e5a30(_0x9c11a4[_0x32d953(0x393)]):null,_0x279aa3=_0x431c5d['randomUUID'](),_0x2853c0={'tokenHash':_0x5bb406,'name':_0x9c11a4['name']||null,'passwordHash':_0x26aae1,'label':_0x9c11a4[_0x32d953(0x3e3)]||null,'permissions':_0x4bc96c,'grants':_0x39df62,'createdAt':Date[_0x32d953(0x18f)](),'lastUsedAt':null},_0x2f033b=_0x9c11a4[_0x32d953(0x114)]?{'ttl':Number(_0x9c11a4[_0x32d953(0x114)])}:undefined;await _0x2a909b[_0x32d953(0x12e)][_0x32d953(0x158)](_0x32d953(0x405),_0x279aa3,_0x2853c0,_0x2f033b),console[_0x32d953(0x30a)](_0x32d953(0x344)),console[_0x32d953(0x30a)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x279aa3),console[_0x32d953(0x30a)]('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x9c11a4[_0x32d953(0x167)]||_0x32d953(0x2e1))),console[_0x32d953(0x30a)](_0x32d953(0x2d6)+(_0x9c11a4[_0x32d953(0x3e3)]||'(unset)')),console[_0x32d953(0x30a)](_0x32d953(0x263)+(_0x4bc96c[_0x32d953(0x251)](',\x20')||_0x32d953(0x1c2))),console[_0x32d953(0x30a)](_0x32d953(0x175)),console[_0x32d953(0x30a)](_0x32d953(0x26f)+_0xcbc3d2+'\x0a');}finally{await _0x2a909b[_0x32d953(0x15c)]();}}async function _0x31618(_0x465d54){const _0x4cddad=_0x272e53,_0x565f81=require$$5,_0x441d84=_0x505c89[_0x4cddad(0x350)](_0x465d54[_0x4cddad(0x371)]),_0x2c487e=new _0x565f81(_0x441d84,_0x465d54[_0x4cddad(0x407)]?{'encryptionKey':_0x465d54[_0x4cddad(0x407)]}:{});await _0x2c487e[_0x4cddad(0x3b9)]();try{const _0x189d58=_0x2c487e[_0x4cddad(0x12e)];if(!_0x189d58||!_0x189d58[_0x4cddad(0x397)](_0x4cddad(0x405))){console[_0x4cddad(0x30a)]('No\x20tokens.');return;}const _0xd10174=[];for(const {key:_0x45af9f,value:_0x812533}of _0x189d58[_0x4cddad(0x184)](_0x4cddad(0x405))){_0xd10174[_0x4cddad(0x2c5)]({'id':_0x45af9f,'name':_0x812533[_0x4cddad(0x167)]||_0x4cddad(0x2e1),'label':_0x812533[_0x4cddad(0x3e3)]||'(unset)','permissions':Array[_0x4cddad(0x105)](_0x812533[_0x4cddad(0x14d)])?_0x812533[_0x4cddad(0x14d)][_0x4cddad(0x251)](','):'','created':_0x812533[_0x4cddad(0x314)]?new Date(_0x812533[_0x4cddad(0x314)])[_0x4cddad(0x2e8)]()[_0x4cddad(0x219)](0x0,0xa):''});}if(_0xd10174[_0x4cddad(0x340)]===0x0){console[_0x4cddad(0x30a)](_0x4cddad(0x206));return;}const _0x4a4659=!process[_0x4cddad(0x122)]['columns']||process[_0x4cddad(0x122)]['columns']>=0x64,_0x3fab10=_0x4a4659?0x24:0xa,_0x360a3e=['ID'[_0x4cddad(0x419)](_0x3fab10),_0x4cddad(0x24a)['padEnd'](0x10),'LABEL'['padEnd'](0x14),_0x4cddad(0x1c3)[_0x4cddad(0x419)](0x14),'CREATED'][_0x4cddad(0x251)]('\x20\x20');console[_0x4cddad(0x30a)]('\x0a'+_0x360a3e),console[_0x4cddad(0x30a)]('-'[_0x4cddad(0x3ac)](_0x360a3e['length']));for(const _0x258e2a of _0xd10174){const _0x24759f=_0x4a4659?_0x258e2a['id']:_0x258e2a['id'][_0x4cddad(0x219)](0x0,0x8)+'…';console['log']([_0x24759f[_0x4cddad(0x419)](_0x3fab10),_0x258e2a['name'][_0x4cddad(0x219)](0x0,0x10)[_0x4cddad(0x419)](0x10),_0x258e2a[_0x4cddad(0x3e3)][_0x4cddad(0x219)](0x0,0x14)['padEnd'](0x14),_0x258e2a['permissions'][_0x4cddad(0x219)](0x0,0x14)[_0x4cddad(0x419)](0x14),_0x258e2a[_0x4cddad(0x2ef)]][_0x4cddad(0x251)]('\x20\x20'));}console[_0x4cddad(0x30a)]('');}finally{await _0x2c487e[_0x4cddad(0x15c)]();}}async function _0x2f6c9f(_0x36e3fe,_0x1431c2){const _0x5a922a=_0x272e53;!_0x36e3fe&&(console[_0x5a922a(0x3ce)](_0x5a922a(0x209)),process[_0x5a922a(0x2dc)](0x1));const _0x40398a=require$$5,_0x5b939d=_0x505c89[_0x5a922a(0x350)](_0x1431c2[_0x5a922a(0x371)]),_0x5de8c8=new _0x40398a(_0x5b939d,_0x1431c2[_0x5a922a(0x407)]?{'encryptionKey':_0x1431c2['key']}:{});await _0x5de8c8[_0x5a922a(0x3b9)]();try{const _0x20e62d=_0x5de8c8[_0x5a922a(0x12e)];(!_0x20e62d||!_0x20e62d[_0x5a922a(0x397)]('~tokens'))&&(console[_0x5a922a(0x3ce)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x36e3fe+'\x22'),process[_0x5a922a(0x2dc)](0x1));let _0x2ae382=null,_0x5383e8=null;const _0x14b042=_0x20e62d[_0x5a922a(0x299)](_0x5a922a(0x405),_0x36e3fe);if(_0x14b042)_0x2ae382=_0x36e3fe,_0x5383e8=_0x14b042;else{const _0x3af6ea=[];for(const {key:_0x42e160,value:_0xbf9620}of _0x20e62d['getRange'](_0x5a922a(0x405))){if(_0x42e160['startsWith'](_0x36e3fe))_0x3af6ea[_0x5a922a(0x2c5)]({'key':_0x42e160,'value':_0xbf9620});}_0x3af6ea[_0x5a922a(0x340)]===0x0&&(console[_0x5a922a(0x3ce)](_0x5a922a(0x13e)+_0x36e3fe+'\x22'),process[_0x5a922a(0x2dc)](0x1));if(_0x3af6ea[_0x5a922a(0x340)]>0x1){console[_0x5a922a(0x3ce)](_0x5a922a(0x2eb)+_0x36e3fe+_0x5a922a(0x274)+_0x3af6ea[_0x5a922a(0x340)]+_0x5a922a(0x1e8));for(const _0x268b8d of _0x3af6ea){console[_0x5a922a(0x3ce)]('\x20\x20'+_0x268b8d[_0x5a922a(0x407)]+_0x5a922a(0x3eb)+(_0x268b8d[_0x5a922a(0x32e)][_0x5a922a(0x167)]||_0x5a922a(0x2e1))+')');}process[_0x5a922a(0x2dc)](0x1);}_0x2ae382=_0x3af6ea[0x0][_0x5a922a(0x407)],_0x5383e8=_0x3af6ea[0x0][_0x5a922a(0x32e)];}await _0x20e62d[_0x5a922a(0x3b2)]('~tokens',_0x2ae382),console[_0x5a922a(0x30a)](_0x5a922a(0x1a7)+_0x2ae382+_0x5a922a(0x3eb)+(_0x5383e8[_0x5a922a(0x167)]||_0x5a922a(0x2e1))+_0x5a922a(0x16b)+(_0x5383e8[_0x5a922a(0x3e3)]||_0x5a922a(0x2e1))+')');}finally{await _0x5de8c8['close']();}}function _0x25b165(_0x5efe6c,_0x56b4f7){const _0x44c319=_0x272e53;if(!_0x5efe6c['activation'])return _0x44c319(0x270);const _0x142370=_0x5efe6c[_0x44c319(0x19e)];if(!_0x142370)return _0x44c319(0x235);if(_0x56b4f7>_0x142370)return'expired';return _0x44c319(0x235);}function _0x4e5f46(_0x5b8fa0){const _0x2c80f2=_0x272e53;if(!_0x5b8fa0||typeof _0x5b8fa0!==_0x2c80f2(0x1c6))return'';const _0x31c4cb=Object['entries'](_0x5b8fa0)[_0x2c80f2(0x365)](([,_0x6ee04c])=>_0x6ee04c)['map'](([_0x170eac])=>_0x170eac);if(_0x31c4cb[_0x2c80f2(0x340)]===0x0)return _0x2c80f2(0x1c2);if(_0x31c4cb[_0x2c80f2(0x340)]<=0x3)return _0x31c4cb[_0x2c80f2(0x251)]('\x20');return _0x31c4cb[_0x2c80f2(0x219)](0x0,0x3)[_0x2c80f2(0x251)]('\x20')+('\x20+'+(_0x31c4cb[_0x2c80f2(0x340)]-0x3));}async function _0x352bd7(_0x490f37){const _0xb0abd2=_0x272e53,_0x8b4b83=require$$5,_0x1d5d39=requireOkdbLicenseCodec(),{_C:_0x193886}=requireOkdbLicense(),_0x204066=_0x505c89['resolve'](_0x490f37['dbPath']),_0x980b87=new _0x8b4b83(_0x204066,_0x490f37[_0xb0abd2(0x407)]?{'encryptionKey':_0x490f37['key']}:{});await _0x980b87['open']();try{const _0x5683c8=_0x980b87[_0xb0abd2(0x12e)],_0x3fd241=_0x5683c8?.['db']?.['get']?.(_0xb0abd2(0x152))??0x0,_0x285e81=[..._0x980b87[_0xb0abd2(0x368)][_0xb0abd2(0x3e7)]()][_0xb0abd2(0x365)](_0x300365=>!_0x300365['startsWith']('~'))[_0xb0abd2(0x340)],_0x4d7cfd=_0x980b87['_license']?.[_0xb0abd2(0x126)];if(_0x4d7cfd){const _0xf9e7c4=_0x4d7cfd[_0xb0abd2(0x16a)]===!![],_0x4c9e25=_0xf9e7c4?'free\x20tier':_0x980b87[_0xb0abd2(0x1e3)][_0xb0abd2(0x235)]?.[_0xb0abd2(0x15e)]||_0xb0abd2(0x2d8);console[_0xb0abd2(0x30a)](''),console[_0xb0abd2(0x30a)](_0xb0abd2(0x3d9)+_0x4c9e25);const _0x5401f1=_0x4d7cfd['limits']||{};if(_0x5401f1[_0xb0abd2(0x34a)]){const _0x77a9a1=Math[_0xb0abd2(0x406)](_0x3fd241/_0x5401f1[_0xb0abd2(0x34a)]*0x64);console[_0xb0abd2(0x30a)](_0xb0abd2(0x138)+_0x3fd241['toLocaleString']()+_0xb0abd2(0x2cf)+_0x5401f1['maxWrites']['toLocaleString']()+_0xb0abd2(0x1a6)+_0x77a9a1+'%)');}else console['log']('\x20\x20Writes:\x20\x20'+_0x3fd241[_0xb0abd2(0x392)]());_0x5401f1['envs']?console[_0xb0abd2(0x30a)](_0xb0abd2(0x2c1)+_0x285e81+_0xb0abd2(0x2cf)+_0x5401f1[_0xb0abd2(0x12c)]):console[_0xb0abd2(0x30a)](_0xb0abd2(0x2c1)+_0x285e81),_0x193886?.[_0xb0abd2(0x318)]&&console[_0xb0abd2(0x30a)](_0xb0abd2(0x25f)+_0x193886[_0xb0abd2(0x318)]+_0xb0abd2(0x329));}if(!_0x5683c8||!_0x5683c8[_0xb0abd2(0x397)](_0xb0abd2(0x1a5))){console[_0xb0abd2(0x30a)](''),console['log'](_0xb0abd2(0x163)),console[_0xb0abd2(0x30a)]('');return;}const _0x425099=[],_0x3e3111=Date['now'](),_0x48b3a8=_0x980b87['id'],_0x551f67=_0xb0abd2(0x361);for(const {key:_0x2d063f,value:_0x373866}of _0x5683c8[_0xb0abd2(0x184)](_0xb0abd2(0x1a5))){const _0x3a5b46=_0x373866[_0xb0abd2(0x417)]?Buffer[_0xb0abd2(0x1ff)](_0x373866['_licenseHash'],'hex'):Buffer[_0xb0abd2(0x188)](0x8);let _0x4ce544='';try{_0x4ce544=_0x1d5d39[_0xb0abd2(0x348)](_0x48b3a8,_0x3a5b46,_0x551f67)[_0xb0abd2(0x25a)];}catch{}_0x425099[_0xb0abd2(0x2c5)]({'id':_0x2d063f,'licensee':_0x373866[_0xb0abd2(0x15e)]||'','expires':_0x373866[_0xb0abd2(0x19e)]?new Date(_0x373866['expiresAt'])['toISOString']()[_0xb0abd2(0x219)](0x0,0xa):'','features':_0x4e5f46(_0x373866['features']),'pin':_0x4ce544,'status':_0x25b165(_0x373866,_0x3e3111)});}if(_0x425099[_0xb0abd2(0x340)]===0x0){console[_0xb0abd2(0x30a)](''),console['log']('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0xb0abd2(0x30a)]('');return;}const _0x2e1909=['\x20\x20'+'ID'[_0xb0abd2(0x419)](0xe),_0xb0abd2(0x36e)[_0xb0abd2(0x419)](0xe),_0xb0abd2(0x191)[_0xb0abd2(0x419)](0xc),_0xb0abd2(0x2ae)['padEnd'](0x1e),_0xb0abd2(0x269)[_0xb0abd2(0x419)](0xa),'STATUS'][_0xb0abd2(0x251)]('\x20');console[_0xb0abd2(0x30a)]('\x0a'+_0x2e1909);for(const _0x4f3746 of _0x425099){const _0x377f21=_0x4f3746['id'][_0xb0abd2(0x219)](0x0,0x8)+'…';console[_0xb0abd2(0x30a)](['\x20\x20'+_0x377f21[_0xb0abd2(0x419)](0xe),_0x4f3746['licensee']['slice'](0x0,0xe)['padEnd'](0xe),_0x4f3746[_0xb0abd2(0x1b1)][_0xb0abd2(0x419)](0xc),_0x4f3746[_0xb0abd2(0x2e2)]['slice'](0x0,0x1e)[_0xb0abd2(0x419)](0x1e),_0x4f3746[_0xb0abd2(0x25a)]['padEnd'](0xa),_0x4f3746[_0xb0abd2(0x3fe)]][_0xb0abd2(0x251)]('\x20'));}console[_0xb0abd2(0x30a)]('');}finally{await _0x980b87[_0xb0abd2(0x15c)]();}}async function _0x15aab7(_0x5150c0,_0xd8ca8a){const _0x4f3d40=_0x272e53,_0x501286=require$$5,_0xa821ab=requireOkdbLicenseCodec();let _0x46bcc9=_0x5150c0;(_0xa821ab['detectInputType'](_0x5150c0)===_0x4f3d40(0x32b)||_0x81384d['existsSync'](_0x5150c0)&&_0x81384d[_0x4f3d40(0x3b8)](_0x5150c0)[_0x4f3d40(0x30e)]())&&(_0x46bcc9=_0x81384d[_0x4f3d40(0x131)](_0x5150c0,_0x4f3d40(0x40c))[_0x4f3d40(0x324)]());const _0x26244a=_0x505c89['resolve'](_0xd8ca8a[_0x4f3d40(0x371)]),_0xfa626a=new _0x501286(_0x26244a,_0xd8ca8a[_0x4f3d40(0x407)]?{'encryptionKey':_0xd8ca8a[_0x4f3d40(0x407)]}:{});await _0xfa626a[_0x4f3d40(0x3b9)]();try{!_0xfa626a[_0x4f3d40(0x1e3)]&&(console[_0x4f3d40(0x3ce)](_0x4f3d40(0x1e2)),process[_0x4f3d40(0x2dc)](0x1));let _0x4effbd;try{_0x4effbd=await _0xfa626a[_0x4f3d40(0x1e3)][_0x4f3d40(0x2cc)](_0x46bcc9);}catch(_0xcb470c){console['error'](_0x4f3d40(0x165)+_0xcb470c[_0x4f3d40(0x227)]),process[_0x4f3d40(0x2dc)](0x1);}const _0x3ab859=_0xfa626a[_0x4f3d40(0x1e3)][_0x4f3d40(0x345)](),_0x24ca5e=_0x3ab859[_0x4f3d40(0x1aa)](_0x2c27f4=>_0x2c27f4[_0x4f3d40(0x3e8)]===_0x4effbd['id'])?.[_0x4f3d40(0x25a)]||'',_0x2ae652=Object[_0x4f3d40(0x1a3)](_0x4effbd[_0x4f3d40(0x2e2)]||{})[_0x4f3d40(0x365)](([,_0x49820f])=>_0x49820f)[_0x4f3d40(0x2df)](([_0x2b2f5b])=>_0x2b2f5b),_0x2a1ceb=_0x4effbd[_0x4f3d40(0x198)]||{},_0x399bed=[_0x2a1ceb[_0x4f3d40(0x12c)]?_0x4f3d40(0x31e)+_0x2a1ceb['envs']:null,_0x2a1ceb[_0x4f3d40(0x265)]?'types/env='+_0x2a1ceb['typesPerEnv']:null,_0x2a1ceb[_0x4f3d40(0x15d)]?_0x4f3d40(0x2c4)+_0x2a1ceb[_0x4f3d40(0x15d)]:null,_0x2a1ceb[_0x4f3d40(0x34a)]?'writes='+_0x2a1ceb[_0x4f3d40(0x34a)][_0x4f3d40(0x392)]():null][_0x4f3d40(0x365)](Boolean)[_0x4f3d40(0x251)]('\x20\x20'),_0x545b18=_0x4effbd[_0x4f3d40(0x2c9)]===_0xa821ab[_0x4f3d40(0x164)];console['log']('\x0a\x20\x20✓\x20License\x20added'),console[_0x4f3d40(0x30a)](_0x4f3d40(0x2f6)+_0x4effbd['id']),console[_0x4f3d40(0x30a)](_0x4f3d40(0x124)+_0x4effbd[_0x4f3d40(0x15e)]),console['log'](_0x4f3d40(0x3c8)+new Date(_0x4effbd[_0x4f3d40(0x19e)])[_0x4f3d40(0x2e8)]()['slice'](0x0,0xa)),console[_0x4f3d40(0x30a)](_0x4f3d40(0x289)+(_0x2ae652[_0x4f3d40(0x251)](',\x20')||_0x4f3d40(0x1c2)));if(_0x399bed)console['log'](_0x4f3d40(0x400)+_0x399bed);_0x545b18?(console[_0x4f3d40(0x30a)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console['log']('')):(console[_0x4f3d40(0x30a)](_0x4f3d40(0x199)+_0x24ca5e),console[_0x4f3d40(0x30a)]('\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation'),console['log'](''),console['log'](_0x4f3d40(0x322)),console[_0x4f3d40(0x30a)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x24ca5e+_0x4f3d40(0x409)),console['log'](_0x4f3d40(0x181)),console[_0x4f3d40(0x30a)](_0x4f3d40(0x3a2)),console[_0x4f3d40(0x30a)](''));}finally{await _0xfa626a[_0x4f3d40(0x15c)]();}}async function _0x3130c9(_0x246501,_0x5a4c0f){const _0x535008=_0x272e53,_0x143c67=require$$5,_0x2e6519=_0x505c89['resolve'](_0x5a4c0f['dbPath']),_0x35db16=new _0x143c67(_0x2e6519,_0x5a4c0f['key']?{'encryptionKey':_0x5a4c0f['key']}:{});await _0x35db16[_0x535008(0x3b9)]();try{!_0x35db16[_0x535008(0x1e3)]&&(console[_0x535008(0x3ce)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process['exit'](0x1));let _0x51f2ad;try{_0x51f2ad=await _0x35db16['_license'][_0x535008(0x293)](_0x246501[_0x535008(0x324)]());}catch(_0x130ce2){console[_0x535008(0x3ce)](_0x535008(0x165)+_0x130ce2[_0x535008(0x227)]),console[_0x535008(0x3ce)](''),console[_0x535008(0x3ce)]('\x20\x20Common\x20causes:'),console[_0x535008(0x3ce)](_0x535008(0x41a)),console[_0x535008(0x3ce)](_0x535008(0x1ec)),console[_0x535008(0x3ce)](_0x535008(0x287)),console[_0x535008(0x3ce)](''),process[_0x535008(0x2dc)](0x1);}console[_0x535008(0x30a)](_0x535008(0x110)),console[_0x535008(0x30a)](_0x535008(0x2f6)+_0x51f2ad['id']),console[_0x535008(0x30a)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x51f2ad[_0x535008(0x15e)]),console[_0x535008(0x30a)](_0x535008(0x3c8)+new Date(_0x51f2ad[_0x535008(0x19e)])[_0x535008(0x2e8)]()[_0x535008(0x219)](0x0,0xa)),console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x535008(0x30a)]('');}finally{await _0x35db16[_0x535008(0x15c)]();}}async function _0x1be9cf(_0x2f612e,_0x233c25){const _0x18cce3=_0x272e53;!_0x2f612e&&(console[_0x18cce3(0x3ce)]('[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument'),process[_0x18cce3(0x2dc)](0x1));const _0x39cecd=require$$5,_0x111384=requireOkdbLicenseCodec(),_0x2254f8=_0x505c89[_0x18cce3(0x350)](_0x233c25['dbPath']),_0x258f00=new _0x39cecd(_0x2254f8,_0x233c25[_0x18cce3(0x407)]?{'encryptionKey':_0x233c25['key']}:{});await _0x258f00[_0x18cce3(0x3b9)]();try{const _0x527c47=_0x258f00[_0x18cce3(0x12e)];(!_0x527c47||!_0x527c47[_0x18cce3(0x397)](_0x18cce3(0x1a5)))&&(console[_0x18cce3(0x3ce)](_0x18cce3(0x130)+_0x2f612e+'\x22'),process[_0x18cce3(0x2dc)](0x1));let _0x3e1311=null,_0x5f2036=null;const _0x1ebdcd=_0x527c47[_0x18cce3(0x299)](_0x18cce3(0x1a5),_0x2f612e);if(_0x1ebdcd)_0x3e1311=_0x2f612e,_0x5f2036=_0x1ebdcd;else{const _0x5437e4=[];for(const {key:_0x3afa8e,value:_0xf8d5ba}of _0x527c47[_0x18cce3(0x184)](_0x18cce3(0x1a5))){if(_0x3afa8e[_0x18cce3(0x343)](_0x2f612e))_0x5437e4[_0x18cce3(0x2c5)]({'key':_0x3afa8e,'value':_0xf8d5ba});}_0x5437e4[_0x18cce3(0x340)]===0x0&&(console[_0x18cce3(0x3ce)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x2f612e+'\x22'),process[_0x18cce3(0x2dc)](0x1)),_0x5437e4[_0x18cce3(0x340)]>0x1&&(console[_0x18cce3(0x3ce)](_0x18cce3(0x2eb)+_0x2f612e+_0x18cce3(0x274)+_0x5437e4[_0x18cce3(0x340)]+_0x18cce3(0x2dd)),process[_0x18cce3(0x2dc)](0x1)),_0x3e1311=_0x5437e4[0x0]['key'],_0x5f2036=_0x5437e4[0x0]['value'];}const _0x1bc517=Date[_0x18cce3(0x18f)](),_0x215884=_0x25b165(_0x5f2036,_0x1bc517),_0x3ba54d=_0x258f00['id'],_0x5c1cc4=_0x18cce3(0x361);let _0x493116='';try{const _0x573b9c=Buffer[_0x18cce3(0x1ff)](_0x5f2036[_0x18cce3(0x417)],'hex');_0x493116=_0x111384[_0x18cce3(0x348)](_0x3ba54d,_0x573b9c,_0x5c1cc4)[_0x18cce3(0x25a)];}catch{}const _0x24d8b7=_0x5f2036['features']?Object['entries'](_0x5f2036[_0x18cce3(0x2e2)])[_0x18cce3(0x365)](([,_0xd261b0])=>_0xd261b0)[_0x18cce3(0x2df)](([_0xa2eadc])=>_0xa2eadc):[],_0x3e50e0=_0x5f2036[_0x18cce3(0x198)]||{},_0x41d7dc=_0x527c47?.['db']?.[_0x18cce3(0x299)]?.(_0x18cce3(0x152))??0x0,_0x5e41fe=[..._0x258f00['_envs'][_0x18cce3(0x3e7)]()][_0x18cce3(0x365)](_0x122144=>!_0x122144[_0x18cce3(0x343)]('~'))[_0x18cce3(0x340)];console[_0x18cce3(0x30a)](_0x18cce3(0x387)),console[_0x18cce3(0x30a)](_0x18cce3(0x2f6)+_0x3e1311),console[_0x18cce3(0x30a)]('\x20\x20\x20\x20licensee:\x20\x20'+(_0x5f2036['licensee']||'')),console['log'](_0x18cce3(0x3c8)+(_0x5f2036[_0x18cce3(0x19e)]?new Date(_0x5f2036[_0x18cce3(0x19e)])[_0x18cce3(0x2e8)]()[_0x18cce3(0x219)](0x0,0xa):'')),console[_0x18cce3(0x30a)]('\x20\x20\x20\x20features:\x20\x20'+(_0x24d8b7[_0x18cce3(0x251)](',\x20')||_0x18cce3(0x1c2))),console['log'](_0x18cce3(0x199)+_0x493116),console[_0x18cce3(0x30a)](_0x18cce3(0x1ce)+_0x215884),console[_0x18cce3(0x30a)]('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x5f2036['addedAt'])[_0x18cce3(0x2e8)]());if(_0x215884===_0x18cce3(0x235)){console[_0x18cce3(0x30a)](''),console[_0x18cce3(0x30a)]('\x20\x20Usage:');if(_0x3e50e0[_0x18cce3(0x34a)]){const _0x38e6f6=Math['round'](_0x41d7dc/_0x3e50e0['maxWrites']*0x64);console[_0x18cce3(0x30a)](_0x18cce3(0x2e4)+_0x41d7dc['toLocaleString']()+_0x18cce3(0x2cf)+_0x3e50e0['maxWrites'][_0x18cce3(0x392)]()+_0x18cce3(0x1a6)+_0x38e6f6+'%)');}else console['log'](_0x18cce3(0x2e4)+_0x41d7dc[_0x18cce3(0x392)]()+'\x20\x20(unlimited)');_0x3e50e0[_0x18cce3(0x12c)]?console['log']('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x5e41fe+_0x18cce3(0x2cf)+_0x3e50e0[_0x18cce3(0x12c)]):console[_0x18cce3(0x30a)](_0x18cce3(0x377)+_0x5e41fe+_0x18cce3(0x34d));}console[_0x18cce3(0x30a)]('');}finally{await _0x258f00[_0x18cce3(0x15c)]();}}async function _0x4ee0c5(_0x2bd4d7,_0x2d6a95){const _0x1e67db=_0x272e53;!_0x2bd4d7&&(console[_0x1e67db(0x3ce)](_0x1e67db(0x32f)),process[_0x1e67db(0x2dc)](0x1));const _0x21a642=require$$5,_0x3c36d2=_0x505c89[_0x1e67db(0x350)](_0x2d6a95[_0x1e67db(0x371)]),_0x4de30d=new _0x21a642(_0x3c36d2,_0x2d6a95[_0x1e67db(0x407)]?{'encryptionKey':_0x2d6a95[_0x1e67db(0x407)]}:{});await _0x4de30d['open']();try{const _0x3e4276=_0x4de30d['_systemEnv'];(!_0x3e4276||!_0x3e4276['hasType'](_0x1e67db(0x1a5)))&&(console[_0x1e67db(0x3ce)](_0x1e67db(0x130)+_0x2bd4d7+'\x22'),process['exit'](0x1));let _0x427193=null,_0x1fe5ac=null;const _0x1bbb17=_0x3e4276[_0x1e67db(0x299)]('~licenses',_0x2bd4d7);if(_0x1bbb17)_0x427193=_0x2bd4d7,_0x1fe5ac=_0x1bbb17;else{const _0x1ed389=[];for(const {key:_0x6ca131,value:_0x3033b3}of _0x3e4276[_0x1e67db(0x184)](_0x1e67db(0x1a5))){if(_0x6ca131[_0x1e67db(0x343)](_0x2bd4d7))_0x1ed389[_0x1e67db(0x2c5)]({'key':_0x6ca131,'value':_0x3033b3});}_0x1ed389['length']===0x0&&(console[_0x1e67db(0x3ce)](_0x1e67db(0x130)+_0x2bd4d7+'\x22'),process[_0x1e67db(0x2dc)](0x1)),_0x1ed389[_0x1e67db(0x340)]>0x1&&(console[_0x1e67db(0x3ce)](_0x1e67db(0x2eb)+_0x2bd4d7+_0x1e67db(0x274)+_0x1ed389[_0x1e67db(0x340)]+_0x1e67db(0x2dd)),process[_0x1e67db(0x2dc)](0x1)),_0x427193=_0x1ed389[0x0][_0x1e67db(0x407)],_0x1fe5ac=_0x1ed389[0x0][_0x1e67db(0x32e)];}await _0x3e4276[_0x1e67db(0x3b2)](_0x1e67db(0x1a5),_0x427193),console[_0x1e67db(0x30a)](_0x1e67db(0x3c7)+_0x427193+_0x1e67db(0x1a0)+(_0x1fe5ac[_0x1e67db(0x15e)]||_0x1e67db(0x2e1))+')');}finally{await _0x4de30d[_0x1e67db(0x15c)]();}}async function _0x3f5f64(_0x167a38,_0x12b769,_0x4eb7df){const _0x2434db=_0x272e53;!_0x167a38&&(console[_0x2434db(0x3ce)](_0x2434db(0x113)),process[_0x2434db(0x2dc)](0x1));!_0x4eb7df['token']&&!(_0x4eb7df[_0x2434db(0x20c)]&&_0x4eb7df[_0x2434db(0x393)])&&(console[_0x2434db(0x3ce)](_0x2434db(0x389)),process[_0x2434db(0x2dc)](0x1));const _0x18e5f1=_0x4eb7df[_0x2434db(0x1c0)]||_0x12b769[_0x2434db(0x2b9)]?.[_0x2434db(0x246)];!_0x18e5f1&&(console[_0x2434db(0x3ce)](_0x2434db(0x312)+_0x2434db(0x347)+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process[_0x2434db(0x2dc)](0x1));const _0x3aa05f=require$$5,_0x310bd5=new _0x3aa05f(_0x12b769['dbPath'],{'sync':{'address':_0x18e5f1,'auto_reconcile':![]}});await _0x310bd5[_0x2434db(0x3b9)]();try{const _0x36aa82=_0x310bd5['_systemEnv'];if(_0x36aa82&&_0x36aa82[_0x2434db(0x397)]('~tokens')){let _0x5b2262=![];for(const _0xcdaa51 of _0x36aa82[_0x2434db(0x184)]('~tokens')){_0x5b2262=!![];break;}_0x5b2262&&console[_0x2434db(0x30a)](_0x2434db(0x1be)+_0x2434db(0x146));}console[_0x2434db(0x30a)](_0x2434db(0x20f)+_0x167a38+'…'),await _0x310bd5[_0x2434db(0x2b9)][_0x2434db(0x251)](_0x167a38[_0x2434db(0x29d)](/\/+$/,''),{'token':_0x4eb7df[_0x2434db(0x3ff)],'username':_0x4eb7df[_0x2434db(0x20c)],'password':_0x4eb7df['password']}),console[_0x2434db(0x30a)](_0x2434db(0x35e)),console['log'](_0x2434db(0x25d));}finally{await _0x310bd5[_0x2434db(0x15c)]();}}async function _0x15e922(){const _0x28424b=_0x272e53,_0x541f3f=Date[_0x28424b(0x18f)](),_0x2acab8=_0x49ef41(process[_0x28424b(0x1df)]),_0x35d247=_0x4e8882(_0x2acab8),_0x455cf0=_0x505c89[_0x28424b(0x350)](_0x35d247[_0x28424b(0x371)]);!_0x35d247['noRepl']&&!process[_0x28424b(0x278)][_0x28424b(0x2a9)]&&(_0x35d247[_0x28424b(0x18a)]=!![]);const _0x150e50=require$$5,{start:_0x2ba759,colorLog:_0x55a94d}=requireOkdbShell(),_0x261060={..._0x35d247['key']?{'encryptionKey':_0x35d247[_0x28424b(0x407)]}:{},..._0x35d247[_0x28424b(0x328)]?{'admin':![]}:_0x102643(_0x35d247[_0x28424b(0x12d)])?{'admin':_0x35d247['admin']}:{},..._0x102643(_0x35d247['api'])?{'api':_0x35d247[_0x28424b(0x226)]}:{},..._0x102643(_0x35d247['auth'])?{'auth':_0x35d247['auth']}:{},..._0x102643(_0x35d247['mcp'])?{'mcp':_0x35d247[_0x28424b(0x3b1)]}:{},..._0x35d247[_0x28424b(0x27c)]!==![]?{'timeMachine':_0x35d247[_0x28424b(0x27c)]}:{}},_0x22439c=new _0x150e50(_0x455cf0,_0x261060);_0x22439c[_0x28424b(0x30a)][_0x28424b(0x137)]?.();const _0x24d429=_0x22439c[_0x28424b(0x30a)][_0x28424b(0x2f4)](_0x1b380f=>_0x55a94d(_0x1b380f,_0x35d247[_0x28424b(0x40d)]));if(_0x35d247['noRepl'])process[_0x28424b(0x122)][_0x28424b(0x28f)]('[okdb]\x20starting…\x0a');await _0x22439c[_0x28424b(0x3b9)]();if(_0x35d247[_0x28424b(0x18a)])process['stdout'][_0x28424b(0x28f)](_0x28424b(0x356));try{await _0x11bd6a(_0x22439c,_0x35d247[_0x28424b(0x38d)]);}catch(_0xffa37e){_0xffa37e['code']===_0x28424b(0x3de)&&(console[_0x28424b(0x3ce)](_0x28424b(0x215)+_0x35d247[_0x28424b(0x38d)]+_0x28424b(0x132)),process[_0x28424b(0x2dc)](0x1));throw _0xffa37e;}if(_0x35d247[_0x28424b(0x18a)])process['stdout'][_0x28424b(0x28f)](_0x28424b(0x272)+_0x35d247['port']+'\x0a');if(!_0x35d247[_0x28424b(0x18a)])_0x22439c['log'][_0x28424b(0x137)]?.(),_0x24d429?.(),_0x228397(_0x22439c[_0x28424b(0x41c)]?.[_0x28424b(0x34b)]?.()??[]),await _0x2ba759(_0x22439c,_0x35d247);else{const _0x375e1f=_0x505c89[_0x28424b(0x251)](_0x455cf0,_0x28424b(0x12a));try{_0x81384d[_0x28424b(0x2d7)](_0x375e1f,String(process['pid']));}catch{}const _0x2fe504=Date['now']()-_0x541f3f;console[_0x28424b(0x30a)](''),console[_0x28424b(0x30a)]('\x20\x20✓\x20OKDB\x20server\x20running'),console[_0x28424b(0x30a)](_0x28424b(0x3fa)+_0x35d247[_0x28424b(0x38d)]),console[_0x28424b(0x30a)](_0x28424b(0x31b)+_0x455cf0),console[_0x28424b(0x30a)](_0x28424b(0x307)+_0x22439c['id']);{const _0x4fa67b=_0x22439c[_0x28424b(0x12e)]?.['db']?.[_0x28424b(0x299)]?.(_0x28424b(0x152))??0x0,_0x3c8b4=[..._0x22439c['_envs'][_0x28424b(0x3e7)]()][_0x28424b(0x365)](_0x3cedfe=>!_0x3cedfe['startsWith']('~'))['length'];if(_0x22439c[_0x28424b(0x1e3)]?.[_0x28424b(0x235)]?.['licenseType']===0x1){const _0x2a5458=Math[_0x28424b(0x3c2)]((_0x22439c[_0x28424b(0x1e3)]['active'][_0x28424b(0x19e)]-Date[_0x28424b(0x18f)]())/0x5265c00);console[_0x28424b(0x30a)](_0x28424b(0x11d)+_0x22439c[_0x28424b(0x1e3)][_0x28424b(0x235)][_0x28424b(0x15e)]+_0x28424b(0x14c)+_0x2a5458+_0x28424b(0x2d9));}else{if(_0x22439c['_license']?.[_0x28424b(0x235)]){const _0x402828=_0x22439c['_license']['active'];console[_0x28424b(0x30a)]('\x20\x20\x20\x20license:\x20'+_0x402828[_0x28424b(0x15e)]+_0x28424b(0x351)+new Date(_0x402828[_0x28424b(0x19e)])[_0x28424b(0x2e8)]()[_0x28424b(0x219)](0x0,0xa)+')');const _0x512717=_0x402828[_0x28424b(0x198)]||{};if(_0x512717[_0x28424b(0x34a)]){const _0x15f6d7=Math[_0x28424b(0x406)](_0x4fa67b/_0x512717[_0x28424b(0x34a)]*0x64);console['log']('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x4fa67b[_0x28424b(0x392)]()+_0x28424b(0x2cf)+_0x512717[_0x28424b(0x34a)][_0x28424b(0x392)]()+_0x28424b(0x1f4)+_0x15f6d7+_0x28424b(0x3bb)+_0x3c8b4+(_0x512717[_0x28424b(0x12c)]?'/'+_0x512717[_0x28424b(0x12c)]:'')+_0x28424b(0x39e)+(_0x3c8b4===0x1?'':'s'));}}else{if(_0x22439c[_0x28424b(0x1e3)]){const _0x5de5e4=_0x22439c['_license'][_0x28424b(0x345)](),_0x37f985=_0x5de5e4[_0x28424b(0x340)]?_0x5de5e4[_0x28424b(0x2df)](_0x19f752=>_0x19f752[_0x28424b(0x25a)])[_0x28424b(0x251)](',\x20'):_0x28424b(0x23b),_0x75fad0=_0x22439c['_license']['effective'],_0x5d4f13=_0x75fad0['limits'][_0x28424b(0x34a)]?Math['round'](_0x4fa67b/_0x75fad0[_0x28424b(0x198)][_0x28424b(0x34a)]*0x64):0x0;console[_0x28424b(0x30a)](_0x28424b(0x19c)),console[_0x28424b(0x30a)](_0x28424b(0x125)+_0x4fa67b[_0x28424b(0x392)]()+_0x28424b(0x2cf)+_0x75fad0['limits'][_0x28424b(0x34a)][_0x28424b(0x392)]()+_0x28424b(0x1f4)+_0x5d4f13+'%),\x20'+_0x3c8b4+_0x28424b(0x2cf)+_0x75fad0[_0x28424b(0x198)][_0x28424b(0x12c)]+_0x28424b(0x3d8)),console[_0x28424b(0x30a)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20'+_0x37f985);}}}}console[_0x28424b(0x30a)](_0x28424b(0x298)+_0x35d247[_0x28424b(0x38d)]+_0x28424b(0x30f));!_0x35d247['noAdmin']&&console[_0x28424b(0x30a)](_0x28424b(0x2ac)+_0x35d247[_0x28424b(0x38d)]+_0x28424b(0x321));console[_0x28424b(0x30a)](''),console[_0x28424b(0x30a)](_0x28424b(0x292)+_0x2fe504+'ms'),_0x228397(_0x22439c[_0x28424b(0x41c)]?.['getSecurityNotices']?.()??[]);let _0xbdba27=![];async function _0x381e53(_0x183ba8){const _0x10e215=_0x28424b;_0xbdba27&&(process['stderr'][_0x10e215(0x28f)](_0x10e215(0x403)),process[_0x10e215(0x2dc)](0x82));_0xbdba27=!![],process['stderr'][_0x10e215(0x28f)](_0x10e215(0x33f)+(_0x183ba8||'shutdown')+_0x10e215(0x17c));const _0x1833aa=setTimeout(()=>{const _0x5a1669=_0x10e215;process[_0x5a1669(0x13d)][_0x5a1669(0x28f)](_0x5a1669(0x2fc)),process[_0x5a1669(0x2dc)](0x1);},0x1388);try{_0x81384d[_0x10e215(0x159)](_0x375e1f);}catch{}try{await _0x22439c['close']();}catch(_0x1bfcc6){process[_0x10e215(0x13d)][_0x10e215(0x28f)]('[okdb]\x20close\x20error:\x20'+(_0x1bfcc6?.['message']??_0x1bfcc6)+'\x0a');}clearTimeout(_0x1833aa),process[_0x10e215(0x13d)][_0x10e215(0x28f)](_0x10e215(0x1de)),process[_0x10e215(0x2dc)](0x0);}process['on'](_0x28424b(0x10d),()=>_0x381e53(_0x28424b(0x10d))),process['on'](_0x28424b(0x147),()=>_0x381e53(_0x28424b(0x147))),process['on'](_0x28424b(0x18e),()=>_0x381e53(_0x28424b(0x18e)));}}const _0x1f321b=new Set([_0x272e53(0x304),_0x272e53(0x218),_0x272e53(0x21a),_0x272e53(0x212),_0x272e53(0x21d),_0x272e53(0x382),_0x272e53(0x26d),_0x272e53(0x3ff),'join',_0x272e53(0x22a)]),_0x1cd3ae=process['argv'][0x2];if(_0x1cd3ae===_0x272e53(0x304))console[_0x272e53(0x30a)](require$$2[_0x272e53(0x304)]),process['exit'](0x0);else{if(_0x1cd3ae&&_0x1f321b[_0x272e53(0x305)](_0x1cd3ae)){const _0xd5f50f=process[_0x272e53(0x1df)][_0x272e53(0x219)](0x3),_0x119e14=_0x49ef41(['node',_0x272e53(0x37b),..._0xd5f50f]),_0x25a341=_0x4e8882(_0x119e14),_0x16e1c5=new Set([_0x272e53(0x161),'-d',_0x272e53(0x120),'-k',_0x272e53(0x16c),'-c',_0x272e53(0x3ad),'-p',_0x272e53(0x193),_0x272e53(0x35b),'-e',_0x272e53(0x2f0),_0x272e53(0x3f7),_0x272e53(0x1fd),_0x272e53(0x1d7),_0x272e53(0x32a),_0x272e53(0x3b4),'--ttl',_0x272e53(0x360),_0x272e53(0x10c),'-u',_0x272e53(0x1d8)]);let _0x3697e3=null;for(let _0xd5a888=0x0;_0xd5a888<_0xd5f50f['length'];_0xd5a888++){if(_0x16e1c5[_0x272e53(0x305)](_0xd5f50f[_0xd5a888])){_0xd5a888++;continue;}if(!_0xd5f50f[_0xd5a888][_0x272e53(0x343)]('-')){_0x3697e3=_0xd5f50f[_0xd5a888];break;}}(async()=>{const _0x49e888=_0x272e53;if(_0x1cd3ae==='token'){const _0x1a33de=process[_0x49e888(0x1df)][0x3],_0x40bb4f=process[_0x49e888(0x1df)][_0x49e888(0x219)](0x4),_0x54ac7d=_0x49ef41([_0x49e888(0x3ab),_0x49e888(0x37b),..._0x40bb4f]),_0x54790e=_0x4e8882(_0x54ac7d),_0x167c6e=new Set([_0x49e888(0x161),'-d',_0x49e888(0x120),'-k',_0x49e888(0x16c),'-c',_0x49e888(0x3ad),'-p',_0x49e888(0x3f7),_0x49e888(0x1fd),_0x49e888(0x1d7),_0x49e888(0x32a),_0x49e888(0x3b4),_0x49e888(0x37a),_0x49e888(0x193),_0x49e888(0x35b),'-e',_0x49e888(0x2f0)]),_0x4b452b=[];for(let _0x2a876d=0x0;_0x2a876d<_0x40bb4f[_0x49e888(0x340)];_0x2a876d++){if(_0x167c6e[_0x49e888(0x305)](_0x40bb4f[_0x2a876d])){_0x2a876d++;continue;}if(_0x40bb4f[_0x2a876d][_0x49e888(0x343)]('-'))continue;_0x4b452b[_0x49e888(0x2c5)](_0x40bb4f[_0x2a876d]);}switch(_0x1a33de){case _0x49e888(0x3fb):await _0x2d3459(_0x54790e,_0x54ac7d);break;case'list':await _0x31618(_0x54790e);break;case _0x49e888(0x3b0):await _0x2f6c9f(_0x4b452b[0x0],_0x54790e);break;default:console[_0x49e888(0x3ce)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x1a33de+_0x49e888(0x1af)),process[_0x49e888(0x2dc)](0x1);}return;}if(_0x1cd3ae===_0x49e888(0x22a)){const _0x287127=requireOkdbLicenseCodec(),_0x40fed1=process[_0x49e888(0x1df)][_0x49e888(0x219)](0x3),_0x363898=_0x49ef41([_0x49e888(0x3ab),_0x49e888(0x37b),..._0x40fed1]),_0x23ba9f=_0x4e8882(_0x363898),_0x4463ef=new Set([_0x49e888(0x161),'-d','--key','-k',_0x49e888(0x16c),'-c',_0x49e888(0x3ad),'-p','--log-level']),_0xb2b7f6=[];for(let _0x36b7b0=0x0;_0x36b7b0<_0x40fed1[_0x49e888(0x340)];_0x36b7b0++){if(_0x4463ef[_0x49e888(0x305)](_0x40fed1[_0x36b7b0])){_0x36b7b0++;continue;}if(_0x40fed1[_0x36b7b0][_0x49e888(0x343)]('-'))continue;_0xb2b7f6['push'](_0x40fed1[_0x36b7b0]);}const _0x5e214a=_0xb2b7f6[0x0]??null;if(_0x5e214a==='remove')await _0x4ee0c5(_0xb2b7f6[0x1],_0x23ba9f);else{if(!_0x5e214a)await _0x352bd7(_0x23ba9f);else{let _0x9c26ef=_0x287127[_0x49e888(0x354)](_0x5e214a);if(_0x9c26ef===_0x49e888(0x2f2)&&_0x81384d['existsSync'](_0x5e214a))_0x9c26ef=_0x49e888(0x32b);if(_0x9c26ef===_0x49e888(0x32b))try{const _0x59f80e=_0x81384d[_0x49e888(0x131)](_0x5e214a,_0x49e888(0x40c))[_0x49e888(0x324)](),_0x3e79a1=_0x287127[_0x49e888(0x354)](_0x59f80e);if(_0x3e79a1===_0x49e888(0x38c)){await _0x3130c9(_0x59f80e,_0x23ba9f);return;}await _0x15aab7(_0x5e214a,_0x23ba9f);return;}catch(_0x580af5){console[_0x49e888(0x3ce)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x5e214a+':\x20'+_0x580af5['message']),process[_0x49e888(0x2dc)](0x1);}switch(_0x9c26ef){case _0x49e888(0x308):await _0x15aab7(_0x5e214a,_0x23ba9f);break;case _0x49e888(0x38c):await _0x3130c9(_0x5e214a,_0x23ba9f);break;case _0x49e888(0x271):await _0x1be9cf(_0x5e214a,_0x23ba9f);break;default:console['error'](_0x49e888(0x15b)+_0x5e214a+'\x22'),console[_0x49e888(0x3ce)](''),console[_0x49e888(0x3ce)](_0x49e888(0x23c)),console[_0x49e888(0x3ce)]('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console[_0x49e888(0x3ce)](_0x49e888(0x2b8)),console[_0x49e888(0x3ce)]('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x49e888(0x3ce)](_0x49e888(0x355)),console[_0x49e888(0x3ce)](''),console['error'](_0x49e888(0x23a)),process['exit'](0x1);}}}return;}switch(_0x1cd3ae){case _0x49e888(0x218):await _0x5893ee(_0x25a341);break;case _0x49e888(0x21a):await _0x432652();break;case'reset':await _0x29d5eb(_0x25a341);break;case _0x49e888(0x212):await _0xd3fa8(_0x3697e3??_0x505c89[_0x49e888(0x350)](_0x49e888(0x3cd)),_0x25a341);break;case _0x49e888(0x21d):await _0x128edd(_0x3697e3??_0x505c89[_0x49e888(0x350)](_0x49e888(0x145)),_0x25a341,_0x119e14);break;case'import':await _0x857a20(_0x3697e3??_0x505c89[_0x49e888(0x350)](_0x49e888(0x145)),_0x25a341,_0x119e14);break;case _0x49e888(0x251):await _0x3f5f64(_0x3697e3,_0x25a341,_0x119e14);break;}})()[_0x272e53(0x10f)](()=>process['exit'](0x0))['catch'](_0x50d8e8=>{const _0x3771fe=_0x272e53;console['error'](_0x3771fe(0x27e)+(_0x50d8e8[_0x3771fe(0x227)]||_0x50d8e8)+'\x0a'),process[_0x3771fe(0x2dc)](0x1);});}else _0x15e922()[_0x272e53(0x20e)](_0x14758d=>{const _0x520315=_0x272e53;console[_0x520315(0x3ce)]('\x0a[okdb]\x20fatal\x20error:'),console['error'](_0x14758d[_0x520315(0x339)]||_0x14758d),process[_0x520315(0x2dc)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);function _0x147a(){const _0x376544=['log','creating','roles','routes','isFile','/api','recheck','available','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','question','createdAt','logs','system:bus_state_change','\x20\x20Type\x20','PUB_FINGERPRINT','env','fill','\x20\x20\x20\x20path:\x20\x20','drop','gray','envs=','sub','7eKUlVh','/admin/index.html','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','tags','trim','sig','SCHEMA_COLLECTION_INVALID','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','noAdmin','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','--permissions','path','PATCH','win32','value','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','Foreign\x20key\x20violation:\x20','SIG_INVALID','rawBuf','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','\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','toFixed','access:\x20','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','stack','Types','sha256','\x20\x20\x20\x20\x20\x20','type/users/item/alice','OKDBAlreadyExistsError','\x0a[okdb]\x20received\x20','length','code','toLowerCase','startsWith','\x0a\x20\x20✓\x20Token\x20created','getPins','OKDBTypeAlreadyRegisteredError','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','derivePin','keys:','maxWrites','getSecurityNotices',':\x20key\x20[','\x20\x20(unlimited)','list','Indexes','resolve','\x20(expires\x20','SCHEMA_VALIDATION_FAILED','sizeBefore','detectInputType','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','\x20\x20✓\x20database\x20opened\x0a','\x20bytes,\x20need\x20>=\x2065)','stopped','received\x20','listLicenses','--env','ENVS','node:crypto','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','exec','--token','__OKDB_PUB_FINGERPRINT__','scrypt','\x1b[37m','_computeStatus','filter','OKDBIndexAlreadyRegisteredError','{}[]:,\x27\x22','_envs','view:progress','cause','\x20\x20⚠','info','migrate','LICENSEE','safety','INDEX_NOT_REGISTERED','dbPath','database\x20path\x20not\x20writable:\x20','importBlobs','reload','\x22\x20to\x20enable\x20it.','\x20MB)','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','--ttl','okdb','logRequests','ref:violation','randomUUID','use\x20<env>','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','1.8.17','import','txn:start','item:remove','decodeLicenseBlob','readline','\x0a\x20\x20License\x20details:','[okdb]\x20opening\x20','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','readUInt8','call','activation','port','INVALID_INDEX_KEY','\x27:\x20','System','\x20not\x20found','toLocaleString','password','dim','string','sync:apply','hasType','concat','body','\x20\x20skipped=','_ensureTokensType','No\x20license\x20found\x20matching\x20this\x20activation\x20token','values','\x20env','warn','database\x20path\x20writable:\x20','platform','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','\x22\x20already\x20exists','\x20\x20[okdb]\x20closed\x20cleanly\x0a','sort','freeze','OKDBInvalidValueError','fieldPath','fromEntries','toUpperCase','node','repeat','--port','Environments','kind','revoke','mcp','remove','/type/users\x0a\x20\x20\x20\x20','--grants','fts:reset','types:','\x1b[32m','statSync','open','Records','%),\x20','ftsName','dropType','\x20\x20http://localhost:','false','--no-repl','\x20result','ceil','readUInt32BE','errors','license:invalid','padStart','\x20\x20✓\x20Removed\x20license\x20','\x20\x20\x20\x20expires:\x20\x20\x20','rmSync','DELETE\x20type/users/item/x','getCount','options','./okdb-backup','error','exp','\x20\x20→\x20\x20','Queue','POST','\x20opening\x20','bus:poke','Processors','\x20\x20@','INDEX_ALREADY_REGISTERED','\x20envs','\x20\x20Tier:\x20\x20\x20\x20','--env\x20<name>','hasOwnProperty','xdg-open\x20','createHmac','EADDRINUSE','env:opened','help','charCodeAt','data','label','\x20file','setPrompt','type/','keys','licenseId','resetFts','types','\x20\x20(name:\x20','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','children','http://localhost:','\x0a\x20\x20\x20\x20','net','\x0a\x0a\x20\x20','\x20day(s).','\x20\x20records=','randomBytes','\x20\x20+','--name','forEach','[okdb]\x20imported\x20\x20types=','\x20\x20\x20\x20port:\x20\x20','create','[okdb]\x20invalid\x20log\x20level:\x20\x22','__esModule','status','token','\x20\x20\x20\x20limits:\x20\x20\x20\x20','valid','\x1b[1m','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','unique:violation_resolved','~tokens','round','key','idx:',')\x20to\x20your\x20license\x20vendor.','/api/','verifyActivation','utf8','logLevel','failures','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','exportToFile','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','\x20\x20✗','8550176roGwjG','level','\x27\x20on\x20type\x20\x27','dynamic','_licenseHash','readUInt16BE','padEnd','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','max','auth','enabled','\x1b[2m','isArray','ttl:set','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','server','config\x20file\x20valid:\x20','\x20\x20\x20\x20\x20\x20\x20','--drop','--username','SIGINT','USE','then','\x0a\x20\x20✓\x20License\x20activated','\x1b[36m','green','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','ttl','Index\x20\x27','removeLicense',':\x20expected\x20','body:\x20','ttl:expired','\x22\x20→\x20','some','clearTtl','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','Type\x20\x27','prompt','--key','started','stdout','expired','\x20\x20\x20\x20licensee:\x20\x20','\x20\x20\x20\x20usage:\x20\x20\x20','effective','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','\x20in\x20','type/users/item/alice\x20--env\x20staging','okdb.pid','hint','envs','admin','_systemEnv','reason','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','readFileSync','\x20already\x20in\x20use','282632rAMwxc','\x20active\x20env:\x20','index:registered','TYPE_NOT_REGISTERED','detachConsole','\x20\x20Writes:\x20\x20','open\x20','[okdb]\x20created\x20.kdbconfig','ALREADY_EXISTS','isInteger','stderr','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','resetIndex','\x0a\x20\x20No\x20routes\x20matching\x20\x22','TYPE_ALREADY_REGISTERED','yellow','\x20SECURITY\x20NOTICE','./okdb-export.ndjson','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','SIGTERM','listRoutes','\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/','QUIT','floor','\x20(expires\x20in\x20','permissions','[filter]','min','type','[okdb]\x20loaded\x20config:\x20','__writeCounter','setSchema','history','bind','no\x20.kdbconfig\x20(using\x20defaults)','dest','put','unlinkSync','\x20records…','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','close','syncPeers','licensee','OKDBVersionMismatchError','cyan','--path','bold','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','LICENSE_TYPE_OPEN','[okdb]\x20error:\x20','env:removed','name','TYPES','\x20\x20[','_isFree',',\x20label:\x20','--config','files/','[okdb]\x20reset\x20aborted','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','summary','exportBlobs','[okdb]\x20backing\x20up\x20to\x20','Bearer\x20','use','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','[env]','\x20\x20Flags','License\x20expired\x20or\x20invalidated','access','parse','hex',',\x20closing…\x0a','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','fts:','\x20type','GET','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','env/','0123456789ABCDEFGHJKMNPQRSTVWXYZ','getRange','.okdb-write-test','OKDBError','queue','alloc','(no\x20types)','noRepl','OKDBUniqueConstraintError','number','\x20\x20[okdb]\x20','SIGBREAK','now','Hint:\x20','EXPIRES','index','--log-level','indexOf','Build\x20expects\x20public\x20key\x20fingerprint\x20','count','\x0a\x20\x20','limits','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','LICENSE_INVALID','http','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','License\x20limit\x20exceeded:\x20','expiresAt','--help','\x20\x20(licensee:\x20','schema:set','Engines','entries','[okdb]\x20nothing\x20to\x20reset\x20—\x20','~licenses','\x20\x20(','\x20\x20✓\x20Revoked\x20token\x20','copy','MALFORMED_TOKEN','find','registerIndex','tags:\x20','transaction','records','\x22.\x20Use:\x20create,\x20list,\x20revoke','mkdirSync','expires','ACTIVATION_EXPIRED','\x20MB\x20→\x20','transport:\x20','resume','Feature\x20not\x20licensed:\x20','onLicenseExpired','expiry','\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','sourceType','OKDBInvalidPrimaryKeyError','createInterface','param','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','trimStart','selfAddress','LICENSE_LIMIT_EXCEEDED','(none)','PERMISSIONS','[okdb]\x20exporting\x20blobs…','existsSync','object','\x20\x20╔═══════════════════════════╗','txn:rollback','\x20\x20╚═══════════════════════════╝','\x1b[0m','[okdb]\x20importing\x20','--log-requests','queue/','\x20\x20\x20\x20status:\x20\x20\x20\x20','writeUInt32BE','sizeAfter','indexes','\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','2hCNKCm','HTTP\x20','sourceKey','stopping','--label','--address','toString','targetType','.kdbconfig','\x20<path>\x20[json-body]',']\x20already\x20maps\x20to\x20\x27','[okdb]\x20closed\x20cleanly\x0a','argv','wrong_node','\x20\x20Error:\x20','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','_license','dropIndex','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation)\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','/\x20quit\x20/\x20Ctrl+C','indexToDb','\x20tokens:','UNIQUE_CONSTRAINT','byteLength','terminal','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','6116190TknhOP','OPEN','OKDB-PIN-V1:','type:drop','registerType','OKDBSchemaCollectionError','\x22\x20(must\x20be\x20debug|info|warn|error)','\x20writes\x20(','every','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','\x0a\x20\x20okdb\x20doctor\x0a','isFeatureEnabled','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','../','title','registerFts','--password','item:update','from','shutting\x20down…\x0a','ready','Examples','createPublicKey','_active','VERB','No\x20tokens.','null','[okdb]\x20exported\x20\x20types=','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','\x20\x20score:','val','username','3128727PNWQZj','catch','\x0a\x20\x20Joining\x20cluster\x20at\x20','\x20\x20Path\x20access','bus:type_drop','backup','crypto','current','[okdb]\x20port\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','timingSafeEqual','doctor','slice','init','test','Invalid\x20primary\x20key\x20type:\x20','export','changes','stringify','\x20for\x20commands,\x20','\x20\x20changes=','time','starting','spki','\x20deleted','api','message','\x1b[34m','\x22\x20on\x20\x22','license','\x27,\x20cannot\x20map\x20to\x20\x27','license:added','system:stopped','\x1b[90m','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20http://localhost:','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','level:\x20info','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','type/users/query\x20{\x22active\x22:true}','active','\x20(must\x20be\x201–65535)','txn:end','writeUInt16BE','\x20\x20Shell\x20commands','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','(add\x20a\x20license\x20first)','\x20\x20Expected\x20one\x20of:','description','importFromFile','PUT\x20type/users/item/x\x20{\x22n\x22:1}','Index\x20\x22','OKDBTypeNotRegisteredError','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','files','\x20\x20✓\x20','OKDBNotFoundError','address','ref:violation_resolved','config','meta','NAME','engines','operation','system:drain','exports','true','split','join','hidden','fts:registered','licenseHash','search','dropping','method','index:drop','\x20to\x20browse\x20the\x20API,\x20','pin','endsWith','system:ready','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','application/json','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','digest','\x20→\x20POST\x20/api/env/','node\x20','\x20\x20\x20\x20permissions:\x20','setTtl','typesPerEnv','bus:drain','result','\x20\x20⚠\x20\x20','PIN','\x20\x20\x20\x20\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/','properties','port\x20','reset','fts','\x20\x20\x20\x20','pending','uuid','\x20\x20✓\x20http\x20listening\x20on\x20:','debug','\x22\x20matches\x20','update','issuedAt','.kdb_history','stdin','10031247mrMHzJ','schema:drop','set','timeMachine','VERSION_MISMATCH','\x0a[okdb]\x20error:\x20','HELP','system:type_drop','[body]','decoded','DELETE','FOREIGN_KEY_DELETE_RESTRICTED','Shutting\x20down\x20due\x20to\x20license\x20expiry','red','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','transport','\x20\x20\x20\x20features:\x20\x20','resetting','\x20\x20\x20\x20\x20\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','\x20\x20║','Invalid\x20activation\x20token:\x20','\x20does\x20not\x20exist','write','./okdb-data','--changes','[okdb]\x20started\x20in\x20','activateLicense','\x20documents\x20fail\x20validation','createHash','fts:drop','payload','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','get','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','\x20\x20All\x20checks\x20passed.\x0a','\x20logs\x20off\x0a','replace','\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','index:reset','type/users\x20--help','\x22\x20is\x20used\x20by:\x20','312283QQFfPD','dropFts','FOREIGN_KEY_VIOLATION','system:poke','Embeddings','includes','events','isTTY','--version','default','\x20\x20\x20\x20admin:\x20http://localhost:','keys/public.pem','FEATURES','reverse','\x0a\x20\x20Invalid\x20JSON:\x20','--open','assertLimit','License\x20already\x20stored','{}[]:,\x0a\x0d\x09\x20','base64url','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','references','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','sync','magenta','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','PUT','OKDBForeignKeyError','finally','../okdb','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','\x20\x20Envs:\x20\x20\x20\x20','Events','other','peers=','push','embeddings','dirname','blobs','licenseType','invalid','inputSchema','addLicense','equals','\x27\x20already\x20registered','\x20/\x20','\x20to\x20quit.','\x20\x20\x20\x20graceful\x20shutdown\x0a','shutdown','\x20already\x20exists','constructor','[okdb]\x20exporting\x20env\x20\x22','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','writeFileSync','licensed','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','Activation\x20invalid:\x20','once','exit','\x20licenses','allocUnsafe','map','license:removed','(unset)','features','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','\x20\x20\x20\x20writes:\x20\x20\x20\x20','id:\x20','boolean','grants','toISOString','typeSubDbs','type:registered','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','LICENSE_HASH_MISMATCH','PUBLIC_KEY_PEM','\x20\x20Some\x20checks\x20failed.\x0a','created','--types','createServer','unknown','LICENSED_BUILD','attach','prototype','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','<path>','line','4078655qBEKUJ','unique:violation','darwin','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x20records','ENV','system',',\x20got\x20','LICENSE_ACTIVATION_INVALID','white','verify','version','has','writeUInt8','\x20\x20\x20\x20id:\x20\x20\x20\x20','blob','already\x20in\x20use'];_0x147a=function(){return _0x376544;};return _0x147a();}module[_0x3cf8a9(0x24e)]=okdb;
2
+ 'use strict';const _0x4b361c=_0x2368;(function(_0x1f184f,_0x618959){const _0x15427f=_0x2368,_0x273e40=_0x1f184f();while(!![]){try{const _0x361008=parseInt(_0x15427f(0x158))/0x1+parseInt(_0x15427f(0x100))/0x2+parseInt(_0x15427f(0x534))/0x3+-parseInt(_0x15427f(0x223))/0x4*(parseInt(_0x15427f(0x434))/0x5)+parseInt(_0x15427f(0x38d))/0x6*(parseInt(_0x15427f(0x48c))/0x7)+-parseInt(_0x15427f(0x4e3))/0x8+-parseInt(_0x15427f(0x30c))/0x9*(parseInt(_0x15427f(0x22c))/0xa);if(_0x361008===_0x618959)break;else _0x273e40['push'](_0x273e40['shift']());}catch(_0x43c3d3){_0x273e40['push'](_0x273e40['shift']());}}}(_0x5b4d,0x387ab));var require$$1=require(_0x4b361c(0x42d)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x4b361c(0x636)),require$$5=require('../okdb'),require$$0$2=require('readline'),require$$2=require(_0x4b361c(0x35e)),require$$0$1=require('node:crypto'),require$$4=require(_0x4b361c(0x442)),require$$1$2=require(_0x4b361c(0xfe)),require$$0$3=require(_0x4b361c(0x42a)),require$$0$4=require(_0x4b361c(0x328)),require$$0$5=require(_0x4b361c(0x5d0)),require$$1$3=require(_0x4b361c(0x19b)),require$$2$1=require(_0x4b361c(0x2c4)),require$$8=require(_0x4b361c(0x25a)),commonjsGlobal=typeof globalThis!==_0x4b361c(0x1eb)?globalThis:typeof window!=='undefined'?window:typeof global!==_0x4b361c(0x1eb)?global:typeof self!==_0x4b361c(0x1eb)?self:{};function getDefaultExportFromCjs(_0x41eff4){const _0x279468=_0x4b361c;return _0x41eff4&&_0x41eff4['__esModule']&&Object['prototype'][_0x279468(0x51a)]['call'](_0x41eff4,'default')?_0x41eff4['default']:_0x41eff4;}function _0x5b4d(){const _0x21cdbc=['map','ceil','--env\x20<name>','dest','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','\x1b[35m','putNode','primary','\x20\x20+','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','maxMs','isWorker','Route\x20','code','api','issueToken','\x20\x20✓\x20http\x20listening\x20on\x20:','forEach','Cannot\x20set\x20enforce\x20schema\x20on\x20','push','sync:apply','use\x20<env>','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','_seen','type:drop','SIGTERM','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','stdin','add','rowKey','/admin/index.html','toLocaleString','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','fts:drop','_cookieName','values','verifyCookie','status','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','\x0a[okdb]\x20error:\x20','Search','validateRouteInput','INDEX_READY','end','Forbidden\x20—\x20no\x20permissions\x20available','maxBodyBytes','authorizationUrl','removeNode','open\x20','typeSubDbs','okdb-http-worker-child.js','import','SIGINT\x20(double-tap)','net','\x20\x20·\x20\x20','processKey','assertFeature','\x20\x20\x20\x20\x20\x20\x20',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','expiresAt','importFromFile','mode','No\x20license\x20found\x20matching\x20this\x20activation\x20token','OKDBSchemaValidationError','caps','rawResponse','Activation\x20invalid:\x20','(worst\x20','\x0d[okdb]\x20blobs:\x20','_validateOperationRequest','field','_listenAddr','attach','Invalid\x20activation\x20token:\x20','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','dbPath','_nodeDbFor','\x20\x20\x20\x20limits:\x20\x20\x20\x20','INTERNAL_ERROR','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','querySchema','\x20active\x20env:\x20','_log','valid','licenseHash','outputSchema','result','resetting','_buckets','[okdb]\x20port\x20','cookies','getClock','startHeartbeat','getAuthOptions','HTTP\x20server\x20already\x20running','userAdded','okdb.pid','cookieName','type/users/item/alice\x20--env\x20staging','meta','identity','isBuffer','asyncProcessors','req','changes','--types','Type\x20\x27','event','FOREIGN_KEY_DELETE_RESTRICTED','Run','_report','License\x20expired\x20or\x20invalidated','resetFts','View\x20peer\x20status\x20and\x20replication\x20stats.','noAdmin','JWT\x20is\x20missing\x20kid','\x0a\x20\x20','txn:start','.okdb-write-test','last-event-id','[okdb]\x20exporting\x20env\x20\x22','OIDC\x20discovery\x20missing\x20jwks_uri',')\x20to\x20your\x20license\x20vendor.','matcher','isInteger','allowMethods','inputSchema','pathname','\x20binding\x20references\x20missing\x20input\x20field:\x20','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','CHANGEFEED_QUANTUM','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','readFileSync','listenAddr','_licenseHash','ESRCH','rmSync','envs','_computeStatus','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','Foreign\x20key\x20violation:\x20','\x20/\x20','tierList','[okdb]\x20backup\x20complete','[okdb]\x20close\x20error:\x20','running','Invalid\x20license\x20blob:\x20','isDead','[okdb]\x20reset\x20aborted','search:query','\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','\x20records','sizeBefore','instanceId','exp','cluster','\x20\x20Expected\x20one\x20of:','368122BGFdOR','bus:poke','--workers','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','http.workers','verifyActivation','__OKDB_PUB_FINGERPRINT__','authorization_endpoint','details','transport','closures\x20in\x20THIS\x20process\x20—\x20forked\x20workers\x20cannot\x20serve\x20them\x20(cluster\x20distributes\x20','kid','readUInt32BE','\x0a[okdb]\x20fatal\x20error:','PUB_FINGERPRINT','cause','Validation\x20failed:\x20','cf-ray','username','Bearer\x20$1…','Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','concat','Validation\x20failed','_dedupeKey','\x20\x20✓\x20','available','processingStatusView','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','[env]','Index\x20\x27','issuer','role','fieldPath','_maybePublish','Content-Type','active:','handler','[okdb]\x20imported\x20\x20types=','_flushDebounce','SYSTEM_POKE','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','\x20\x20(','hostname','[okdb]\x20invalid\x20port:\x20','OKDBAlreadyExistsError','\x20\x20⚠','stopHeartbeat','reap','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','__okdbCluster','_getJwkKey','ACTIVATION_EXPIRED','uuid','cpuPct',',\x20got\x20','\x20<path>\x20[json-body]','min','\x20\x20✓\x20Revoked\x20token\x20','_supervisorKey','raw','Schema\x20&\x20Indexes',',\x20stopping\x20workers…\x0a','\x20documents\x20fail\x20validation','_getOidcDiscovery','LOGS','(code=','\x1b[90m','socket','_admissionTimer','gray','expiry','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','protected:write','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','\x20\x20[okdb]\x20','integer','force','dropIndex','ENVS','OKDBNotFoundError','files','_buildProcessingFacet','pause','content-type','Hint:\x20','NOT_FOUND','dropFts','startedAt','459169bAzJeC',':\x20ping\x0a\x0a','createInterface','val','connected','(primary\x20=\x20processor)','\x20more)','_onItem','--label','types','_removeRowAsync','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','waiting','_totalWrites','fill','destroy','_startAdmission','\x22.\x20Use:\x20create,\x20list,\x20revoke','now','\x20\x20✓\x20Removed\x20license\x20','\x0a\x20\x20✓\x20License\x20activated','[okdb]\x20invalid\x20log\x20level:\x20\x22','getCount','stderr','verify','every','Records','ID\x20token\x20is\x20not\x20accepted','key','\x20licenses','readUInt8','Files','maxWrites','token_use','--eval','_activateProcesses','number','_handleInProcess','\x27\x20on\x20type\x20\x27','Data','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\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','middlewares','\x0a\x20\x20✓\x20Token\x20created','LENGTH_REQUIRED','\x1b[33m','\x20file','_dispatch','\x20references\x20','config\x20http.workers','\x20has\x20illegal\x20binding\x20target\x20for\x20','_threadStats','ephemeral','open','createPublicKey','_systemEnv','none','\x22\x20on\x20\x22','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','payload','workersFlag','ftsName','_rotateBucket','Token\x20must\x20be\x20a\x20JWT','signCookie','current','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','https','license:invalid','fetch','change','runtimeProcessesView','killable','worker','state','Unique\x20constraint\x20violated\x20on\x20','hint','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','\x20\x20\x20\x20features:\x20\x20','policy','\x20does\x20not\x20exist','[okdb-cluster]\x20worker\x20pid=','responseStatuses','xdg-open\x20','idx:','http://localhost:','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','\x20worker(s)\x20still\x20serving','_drain','remove','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','exports','ieee-p1363','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','Sync','\x20which\x20does\x20not\x20exist','JWT\x20signature\x20verification\x20failed','[okdb]\x20reset:\x20','_started','host','dim','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','/api/env/','\x20cf-ray=','setSchema','cookie','reset','bumpCmd','base64url','\x20\x20Tier:\x20\x20\x20\x20','filter','other','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','\x1b[32m','license:activated','[okdb]\x20opening\x20','\x20\x20Error:\x20','_role','\x0a\x20\x20okdb\x20doctor\x0a','[okdb]\x20created\x20.kdbconfig','~processes:desired','_lastPublishAt','_bucketIdx','bootstrapBlocked','protected:read','\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','_desired','REMOVE','blob','issuedAt','(none)','\x20\x20·\x20','syncPeers','\x20\x20Some\x20checks\x20failed.\x0a','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','round','decommission',']\x20already\x20maps\x20to\x20\x27','auth=','_dedupeMax','default','--version','_ensureTokensType','_license','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','cluster:','processes:\x20','undefined','--no-admin','response','./okdb-data','authenticateToken','lifecycle','\x20\x20score:','getSecurityNotices','stack','Events','threads','[okdb]\x20blobs:\x20imported=','decommissioning','~processes','cyan','OKDBIndexHasConsumersError','cors','context','question','--path','audience','destroyed','_ensureDesired','typesPerEnv',':\x20key\x20[','txn:rollback','_authOptions','data','unlinkSync','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','time','\x20fetching\x20','Examples','processor:retry','\x20env','object','bus:type_drop','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','_selfKey','x5c','confirm','_kind','[okdb-cluster]\x20slot=',')\x20exited\x20','_runMiddlewares','\x20records…','must\x20be\x20','\x20envs','effective','/([^/]+)','getDesired','\x27:\x20','Access-Control-Request-Headers','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','HELP','detachConsole','1605252XRNNIR','fts:','\x22\x20→\x20','transactionSync','OKDBInvalidPrimaryKeyError','--inspect','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','process','green','2894290UaHMJH','active','requests','processor:error','loop-lag\x20','--key','timeMachine','[req]\x20','ITEM_UPDATE','flatMap','grants','STATUS','engines','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','getPins','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','License\x20limit\x20exceeded:\x20','[okdb]\x20http\x20workers:\x20','remaining-fields','_enforceOperationAccess','envs=','close','\x1b[34m','_caps','_scheduleFlush','License\x20signature\x20invalid:\x20','\x20day(s).','system:type_drop','../okdb','guard','\x20\x20(need\x20≥\x2018)','%),\x20','history','padStart','\x20to\x20browse\x20the\x20API,\x20','_clusterWorkerAttached','\x20\x20\x20\x20\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/','update','setDesired','/api','internalOnly','catch','_lastCpuUsage','level:\x20info','prototype','Origin','stream','list','hasDesired','register','__writeCounter','\x20\x20Flags','all','toString','cursorKey','BOOTSTRAP_LOCALHOST_ONLY','\x20(must\x20be\x201–65535)','INDEX_RESET','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','safety','system','kill','free\x20tier','function','enabled','features','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','port','send','is\x20invalid','_validateOidcAccessToken','[okdb]\x20error:\x20--password\x20requires\x20--name','pipe','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','text/event-stream;\x20charset=utf-8','_startedAt','_adminRelay','parseInt','starting','statusCode','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','warn','admin','Create,\x20delete,\x20and\x20compact\x20environments.','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x20\x20skipped=',';\x20SameSite=','\x20deleted','assertLimit','\x20cf-ip=','writes=','form\x20listen(port,\x20{\x20workers,\x20makeOkdb\x20})\x20and\x20register\x20the\x20routes\x20inside\x20makeOkdb,\x20','noCluster','queue/','copy','some','keep-alive','Invalid\x20token','_isReader','argv','createHash','once','ITEM_CREATE','level','\x27,\x20cannot\x20map\x20to\x20\x27','Functions','--print','dropType','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','find','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','message','resume','OKDB_HTTP_WORKERS','access:\x20','listening','EXPIRES','ES256','Peer','timingSafeEqual','writes','_sampleOwnStats','createServer','supervisorKey','respawnTimer','options','\x20\x20✓\x20OKDB\x20server\x20running','Queue','LICENSE_TYPE_OPEN','fast','consumeLoginState','.kdb_history','is\x20required','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x20(expires\x20in\x20','DELETE','scrypt','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','UNAUTHORIZED','config','INDEX_REGISTERED','writeMs','jwk','openDB','noRepl','created','_statusEnv','x-forwarded-for','QUIT','set','publishChildRow','url','_active','[okdb]\x20import\x20complete','tags:\x20','EADDRINUSE','padEnd','use','unique:violation_resolved','name','node\x20','pushEphemeral','mkdirSync','Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.','\x20\x20changes=','--address','okdb','maxAge','_pending','export','\x20origin=','_normalizeOAuthAuthResult','shutdown','FORBIDDEN','authMode','Work','registry-publish','mcp-session-id','_lookupByName','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','cpuUsage','help','platform','writeUInt8','bodyMode','SCHEMA_COLLECTION_INVALID','UNPROCESSABLE_ENTITY','null','stop','version','length','examples','JWT\x20audience\x20mismatch','Invalid\x20primary\x20key\x20type:\x20','index:drop','listNodes','keys','makeOkdb','configureAuth','ms/','header','Types','inst:','processing','_nodeDbCache','\x20(expires\x20','trimStart','expired','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','No\x20tokens.','\x20\x20→\x20\x20','--no-cluster','_timer',':\x20connected\x0a\x0a','reportThreadStats','array','{}[]:,\x0a\x0d\x09\x20','\x22\x20is\x20used\x20by:\x20','\x20\x20✗','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','\x20worker\x20slot=','invalid','randomBytes','9WpKnuJ','test','port\x20','sort','build','http-server','shmbuf.node','addLicense','\x0a\x0a\x20\x20','hard-killed','\x20has\x20invalid\x20http.bodyMode:\x20','_isClusterController','signature','summary','__okdbSlot','error','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','_okdb','OKDBIndexAlreadyRegisteredError','listen','offWindow','\x20\x20records=','--port','_rootDb','endsWith','noteListenAddr','unknown','setTtl','node:events','backup','read','mcp','\x20MB\x20→\x20','sync','ingest','listen({\x20workers\x20>\x201\x20})\x20without\x20makeOkdb\x20requires\x20an\x20OPEN\x20okdb\x20—\x20call\x20after\x20open()\x20','roles','children','email','allowHeaders','SERVICE_UNAVAILABLE','origins','JWT\x20issuer\x20mismatch','\x1b[0m','revoke','decommissioned','./okdb-export.ndjson','sha256','listRoutes',',\x20closing…\x0a','okdb_session_',';\x20Path=','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','floor','treeView','ppid','Unknown\x20error','\x20\x20\x20\x20status:\x20\x20\x20\x20','OPTIONS',');\x20','jwks_uri','[okdb]\x20unknown\x20token\x20action:\x20\x22','der','server','digest','\x20user-registered\x20route(s)\x20are\x20','_processingPolicy','parse','hidden','\x0d[okdb]\x20','maxExtra','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','licensed','bus:proc','HTTP\x20','\x20\x20\x20\x20port:\x20\x20','decodeLicenseBlob','token','_lastCpuWindowMs','(null)','\x22\x20to\x20enable\x20it.','access','crypto','token_endpoint','record','ENV','equals','\x20opening\x20','\x20\x20\x20\x20licensee:\x20\x20','utf8','Execute\x20full-text\x20and\x20vector\x20searches.','LICENSE_FEATURE_DISABLED','Lax','license:removed','PIN','setHeader','_processStartedAt','from','SYSTEM_STOPPED','fts:reset','[okdb]\x20export\x20complete','\x20\x20⚠\x20\x20','targetType','[res]\x20','\x20bytes,\x20need\x20>=\x2065)','createdAt','_isWriter','activation','quit','INDEX_ALREADY_REGISTERED','rss','payload-or-self','split','auth','shmbufNative','TYPES','string','https:','txn:end','shmbuf/package.json','index:progress','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','unref','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','_hbTimer','isConnected','clusterStatusView','replace','false','1708872oigNhQ','Payload\x20too\x20large','or\x20serve\x20single-process.','Index\x20\x22','getRange','value','http://','system:drain','stopping','INVALID_INDEX_KEY','decoded','listen({\x20workers:\x20','bus:drain','RSA-SHA256','isFeatureEnabled','_fetchJwks','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','\x20writes\x20(','has','Release','ms\x20p99=','system:stopped','removeSync','join','ITEM_REMOVE','~licenses',';\x20Expires=','enable','pending','get','METHOD_NOT_ALLOWED','\x20\x20\x20\x20permissions:\x20','single','\x20\x20(name:\x20','_flushTimer','PUBLIC_KEY_PEM','/api/','reload','cli','allocUnsafe','/type/users\x0a\x20\x20\x20\x20','HTTP_','(?:/(.*))?$','Internal\x20error','ms\x20max=','randomUUID','LICENSED_BUILD','received\x20','Views','_rowKey','_wrapApiResponse','/.well-known/openid-configuration','workersConfigured','\x20logs\x20on\x20\x20','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','--env','query','\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20','_nodeDb','_jwksNegativeCache','getCmd','CONFLICT','logRequests','startsWith','\x20to\x20quit.','clearLine','\x20\x20\x20\x20','_matchRoute','Unknown\x20JWKS\x20kid:\x20','env/','List\x20environments\x20and\x20read\x20environment\x20info.','exposeHeaders','operation','--password','info','ms\x20(attempt\x20','stringify','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','_clusterOnMessage','msg','must\x20not\x20be\x20null','stats','slot','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','halted','\x20\x20║','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','fromEntries','_buildOwnRow','pid','--token','embedded','size','LICENSE_INVALID','\x20\x20Writes:\x20\x20','--watch','<path>','ref:violation','Forbidden','toLowerCase','prompt','permissions','groups','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','epoch','OKDBInvalidValueError','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','node','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','LICENSEE','<json-body>','\x0a\x20\x20Joining\x20cluster\x20at\x20','\x20times\x20in\x20','licenseType','hasCanonical','memoryUsage','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','closeIdleConnections','win32','(unset)','node/','debug','content-length','data:read','\x20+\x20','--no-repl','_onTick','./okdb-backup','getProcess','\x20\x20╔═══════════════════════════╗','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','route','description','reverse','view:progress','cf-connecting-ip','--log-level','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','next','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','pin','\x20\x20✓\x20OKDB\x20cluster\x20running','registerIndex','Read','lastClock','\x20\x20\x20\x20writes:\x20\x20\x20\x20','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','homedir','_publishNow','origin','SYSTEM_PROC','\x20\x20\x20\x20status:\x20\x20\x20\x20active','entries','registerType','Token\x20secret\x20not\x20configured','node:perf_hooks','indexOf','bind','path','claims','put','\x0a\x20\x20No\x20routes\x20matching\x20\x22','hasType','~processes:cmd','item:remove','5kkolJy','isSystem','targetKey','isSetupMode','registerFts','hex','body.','gate','readMs','\x22\x20already\x20exists','dirname','_totalWriteMs','\x20MB)','operations','child_process','\x20\x20(licensee:\x20','errors','SIG_INVALID','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','_getType','properties','(no\x20types)','_putRowAsync','--help','index:ready','[okdb]\x20started\x20in\x20','[okdb]\x20importing\x20','start\x20','fts:registered','assign','statuses','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','boolean','call','ttl:expired','fts','NOT_IMPLEMENTED','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','nbf','license:added','logLevel','slice','[okdb-cluster]\x20primary\x20pid=',',\x20signal=','writeUInt32BE','RS256','--username','emit','INDEX_PROGRESS','system:clock_change','access-control-allow-credentials','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','wrong_node','POST','default:\x20cores−1\x20=\x20','discoveryTtlMs','\x20\x20\x20\x20addedAt:\x20\x20\x20','env','password','\x0a\x20\x20License\x20details:','~tokens','nodeKey','repeat','Full-text\x20search','_windowCbs','_oidcDiscoveryCache','_cmd','exportToFile','clear','cpuWindowMs','FTS_DROP','processors','okdb_session','max','address','note','building','_runGuards','queue-worker','OKDBTypeNotRegisteredError','\x20\x20╚═══════════════════════════╝','trim','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','jwksUri','INDEX_HAS_CONSUMERS',';\x20Secure','7zLtcuR','PUT','no\x20.kdbconfig\x20(using\x20defaults)','isPrimary','keys/public.pem','_sockets','cluster:\x20ready\x20(','removeSupervisedChild','authorization','create','\x20log\x20level:\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','doctor','audiences','readUInt16BE','type','_groupByProcess','_onPoke','writeUInt16BE','config\x20file\x20valid:\x20','external','resolve','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','bindings','dead','Invalid\x20index\x20key\x20type\x20for\x20\x27','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','ttl','toFixed','createEnvironment','[okdb]\x20cluster\x20close\x20error:\x20','loop-lag','online','primaryOkdb','write','slotKey','\x20\x20Common\x20causes:','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','processorsView','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','clearTtl','Schema\x20validation\x20failed\x20for\x20','[okdb]\x20error:\x20','dynamic','tags','\x20type','_instanceId','reason','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','OKDBForeignKeyError','type/','\x20already\x20in\x20use','closeAllConnections','_userPhase','listen({\x20workers\x20}):\x20okdb\x20options\x20are\x20not\x20serializable\x20for\x20workers:\x20','tokenTtl','metrics',';\x20HttpOnly','exec','toISOString','processor:resumed','PATCH','_jwksCache','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x20\x20[okdb]\x20closed\x20cleanly\x0a','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','no-cache,\x20no-transform','uptime','params.','\x20already\x20exists','Environments','_loginStates','HTTP_WORKERS_REQUIRE_PORTABLE_ROUTES','kind','category','heapTotal','1ofN:','[okdb]\x20preserved:\x20','_nodeDead',',\x20label:\x20','logs','event:\x20','red','env:removed','Unauthorized','\x20\x20\x20\x20usage:\x20\x20\x20','1714312NHahpF','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','events','charCodeAt','searchParams','\x20\x20(unlimited)','isFile','TOO_MANY_REQUESTS','../','passive\x20HTTP\x20worker(s)\x20serving\x20:','_quantum','_buildChildRow','OKDB_HTTP_WORKERS\x20env','credentials','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','fn-runner','handle','\x20worker(s)\x20remaining','base64','types/env=','log','scope','_children','\x20\x20\x20\x20port:\x20\x20\x20\x20','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','(?:','user','alloc','sig','\x22\x20matches\x20','addSupervisedChild','type:registered','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','\x20supervised)','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','blobs','search','label','application/json','\x20forked\x20','processor:paused','List\x20tokens\x20and\x20users.','\x27\x20doesn\x27t\x20exist','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','consecutiveFailures','then','access-control-max-age','\x20\x20\x20\x20graceful\x20shutdown\x0a','ms\x20busy=','\x20\x20@','known\x20field','_totalReadMs','set-cookie','getHeader','guards','hasOwnProperty','rawBuf','BAD_GATEWAY','_totalRequests','VERB','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','records','authenticateRequest','tokenType','standard','forceAfterMs','Write','\x20(slot=','method','SCHEMA_VALIDATION_FAILED','LICENSE_ACTIVATION_INVALID','_totalErrors','isTTY','clusterWorkers','\x20more','_shouldWrapResponse','terminal','cluster-wide','\x20\x20\x20\x20path:\x20\x20\x20\x20','processes','Not\x20Found','624984LXJmsZ','attachFeed','[okdb]\x20exported\x20\x20types=','cpus','pathParams','\x20\x20Envs:\x20\x20\x20\x20','standalone','SIGINT','isAuthenticated','kdb_admin_csrf','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','--permissions','white','activateLicense','exit','ms\x0a','\x20for\x20system\x20env','start','limits','parseBearer','x-requested-with','Unsupported\x20JWT\x20alg:\x20','sse','processors/','reads','disconnect','_onProcEvent','_lastCpuPct','LICENSE_HASH_MISMATCH','__identity','[okdb]\x20created\x20./okdb-data','formatCookie','\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','GATEWAY_TIMEOUT','\x20(id:\x20','EXIT','darwin','stdout','sync-node','onLicenseExpired','connection','deaths','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','views','\x20\x20Usage:\x20','_cursors','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','body:\x20','/types\x0a\x20\x20\x20\x20','_activateProcessesReader','--blobs','internal','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','System','execArgv','mean','licensee',':\x20expected\x20','\x20\x20[','additionalProperties','Admin','\x20\x20\x20\x20expires:\x20\x20\x20','processor:progress','passive','FTS_REGISTERED','alg','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','yellow','index:reset','isArray','licenseId','_totalReads','[okdb]\x20starting…\x0a','0123456789ABCDEFGHJKMNPQRSTVWXYZ','\x0a[okdb]\x20received\x20','sub','\x20\x20Usage:','publishOwnRow','clearCookie','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','ttl:set','connections\x20blindly;\x20a\x20worker\x20lacking\x20the\x20route\x20404s).\x20Either\x20use\x20the\x20cooperative\x20','127.0.0.1','\x20environment\x20','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','id:\x20','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','\x20\x20Path\x20access','license','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','--grants','GET','ttl:clear','embeddings','licenses','index','HEAD','\x20not\x20found','resetIndex','failures','permission','_lastTick','byteLength','allowedAlgs','\x20\x20\x20\x20license:\x20','writeFileSync','columns','_isOpen','magenta','setOwnMeta','\x20│\x20','[okdb]\x20nothing\x20to\x20reset\x20—\x20','USE','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','\x20license(s)','_draining','_userRouteCount','.kdbconfig','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','clearThreadStats','_markSeen','_ownMeta','\x1b[31m','\x20ipc\x20error:\x20','DELETE\x20type/users/item/x','headers','data:write','--config','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','PUT\x20type/users/item/x\x20{\x22n\x22:1}','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','items','\x20in\x20','heapUsed','percentile','migrate','item:update','_envs','creating','workers','includes','lag','sourceType','\x20\x20Shell\x20commands','\x20}):\x20','OKDBError','addedAt','\x0a\x20\x20\x20\x20','include','VERSION_MISMATCH','defaults','methods','setupPrimary','\x20\x20✓\x20database\x20opened\x0a','line','_lastCpuAt','http','setNoDelay','regex','[okdb-cluster]\x20','VALIDATION_ERROR','selfAddress','authRequired','routes','off','detectInputType','fanout','_onStop','deregisterSelf','OPEN','ready','shell','getChanges','true','flushDebounce','derivePin','recheck','processor:ready',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','SIGBREAK','bold','body','listDesired','Shutting\x20down\x20due\x20to\x20license\x20expiry','count','delete','existsSync','toUpperCase','selfKey','toUTCString','Forbidden\x20—\x20requires\x20','keys:','--ttl','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','[okdb]\x20backing\x20up\x20to\x20','isFinite','unique:violation','headClock','JWT\x20not\x20yet\x20valid','transport:\x20','_baselines','params','entry','GONE'];_0x5b4d=function(){return _0x21cdbc;};return _0x5b4d();}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0xfb8a20=require$$0,_0x265cb8=require$$1$1,_0x1ad243=require$$1;let _0x2fed05;function _0x444b4a(){const _0x4d07a7=_0x2368;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x2fed05!==undefined)return _0x2fed05;try{const _0x222e2f=_0x1ad243[_0x4d07a7(0x43e)](require['resolve'](_0x4d07a7(0x383)));_0x2fed05=_0x265cb8[_0x4d07a7(0x5ee)](_0x1ad243[_0x4d07a7(0x3a4)](_0x222e2f,_0x4d07a7(0x310),_0x4d07a7(0x3a0),_0x4d07a7(0x312)));}catch{_0x2fed05=![];}return _0x2fed05;}function _0xba226c(){const _0x59717e=_0xfb8a20['cpus']()['length'];return Math['max'](0x1,_0x59717e-0x1);}function _0x243b88(_0x2ab767,_0x5eecff={}){const _0x186416=_0x2368,_0x4cc5ae=_0x5eecff['shmbufNative']!==undefined?_0x5eecff[_0x186416(0x37e)]:_0x444b4a();let _0x4f677e;if(_0x2ab767?.[_0x186416(0x289)])_0x4f677e=0x1;else{let _0x181734,_0xc0dddb;if(_0x2ab767?.[_0x186416(0x194)]!==undefined&&_0x2ab767['workersFlag']!==null&&_0x2ab767[_0x186416(0x194)]!=='')_0x181734=_0x2ab767[_0x186416(0x194)],_0xc0dddb=_0x186416(0x102);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x181734=process.env.OKDB_HTTP_WORKERS,_0xc0dddb=_0x186416(0x29e);else _0x2ab767?.[_0x186416(0x5d0)]?.[_0x186416(0x5bf)]!==undefined&&_0x2ab767[_0x186416(0x5d0)][_0x186416(0x5bf)]!==null&&_0x2ab767['http'][_0x186416(0x5bf)]!==''&&(_0x181734=_0x2ab767[_0x186416(0x5d0)][_0x186416(0x5bf)],_0xc0dddb=_0x186416(0x104));}if(_0x181734===undefined)_0x4f677e=_0xba226c();else{const _0x355114=Number(_0x181734);!Number['isInteger'](_0x355114)||_0x355114<0x1?(console[_0x186416(0x27e)]('[okdb]\x20invalid\x20'+_0xc0dddb+'='+JSON[_0x186416(0x3d9)](_0x181734)+'\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201'),_0x4f677e=0x1):_0x4f677e=_0x355114;}}return!_0x4cc5ae&&_0x4f677e>0x1&&(console[_0x186416(0x27e)](_0x186416(0x149)+(_0x186416(0x4bd)+_0x4f677e+').')),_0x4f677e=0x1),_0x4f677e;}return okdbWorkers={'isShmbufNative':_0x444b4a,'defaultWorkers':_0xba226c,'resolveWorkers':_0x243b88},okdbWorkers;}var version='1.9.0',require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0xa8518b=require$$2;function _0x1597f9(_0x418388,_0x29f2cd){const _0x22483c=_0x2368;return _0xa8518b['createHmac'](_0x22483c(0x33b),_0x29f2cd)[_0x22483c(0x251)](_0x418388)[_0x22483c(0x34c)](_0x22483c(0x1c4));}function _0x4f1de5(_0x2a7c83,_0x42b473){const _0x4f6fdc=_0x2368;if(typeof _0x2a7c83!==_0x4f6fdc(0x380)||typeof _0x42b473!=='string')return![];if(Buffer[_0x4f6fdc(0x59a)](_0x2a7c83)!==Buffer['byteLength'](_0x42b473))return![];return _0xa8518b[_0x4f6fdc(0x2a4)](Buffer['from'](_0x2a7c83),Buffer['from'](_0x42b473));}function _0x3d694a(_0x3a3661){const _0x2442ef=_0x2368;if(!_0x3a3661?.['startsWith']('Bearer\x20'))return null;return _0x3a3661[_0x2442ef(0x45e)](0x7);}function _0x5f22e4(_0x20648e=0x20){const _0x8fc8e8=_0x2368;return _0xa8518b['randomBytes'](_0x20648e)[_0x8fc8e8(0x261)](_0x8fc8e8(0x1c4));}function _0x17643b(_0x2ce688){const _0x3a7522=_0x2368;return _0xa8518b[_0x3a7522(0x291)]('sha256')[_0x3a7522(0x251)](_0x2ce688)['digest'](_0x3a7522(0x439));}function _0x30ce30(_0x33ec23,_0x53a9c7,_0x46468f=0x36ee80){const _0x1ecd2e=_0x2368;if(!_0x53a9c7)throw new Error(_0x1ecd2e(0x429));const _0x5830a5=Date['now'](),_0x33c712=Buffer[_0x1ecd2e(0x36d)](JSON[_0x1ecd2e(0x3d9)]({'iat':_0x5830a5,'exp':_0x5830a5+_0x46468f,'sub':_0x33ec23?.['id']??_0x33ec23?.['sub']??null,'username':_0x33ec23?.[_0x1ecd2e(0x112)]??_0x33ec23?.['name']??null,'roles':Array['isArray'](_0x33ec23?.['roles'])?_0x33ec23[_0x1ecd2e(0x330)]:[]}))['toString'](_0x1ecd2e(0x1c4)),_0x112073=_0x1597f9(_0x33c712,_0x53a9c7);return _0x33c712+'.'+_0x112073;}function _0x4aa26b(_0x308ce5,_0x48a9e5){const _0x13cfc3=_0x2368;if(!_0x48a9e5||typeof _0x308ce5!==_0x13cfc3(0x380))return null;const [_0x337c4d,_0x16bea8]=_0x308ce5[_0x13cfc3(0x37c)]('.');if(!_0x337c4d||!_0x16bea8)return null;const _0x407d86=_0x1597f9(_0x337c4d,_0x48a9e5);if(!_0x4f1de5(_0x16bea8,_0x407d86))return null;try{const _0x396480=JSON[_0x13cfc3(0x34f)](Buffer['from'](_0x337c4d,_0x13cfc3(0x1c4))['toString']()),_0x5718ca=0x7530;if(Date[_0x13cfc3(0x16a)]()>Number(_0x396480?.[_0x13cfc3(0xfd)]??0x0)+_0x5718ca)return null;return _0x396480;}catch{return null;}}async function _0x3d42fe(_0x29d337){return new Promise((_0x517805,_0x4cb221)=>{const _0x23cc3c=_0x2368,_0xb7d691=_0xa8518b[_0x23cc3c(0x30b)](0x10);_0xa8518b[_0x23cc3c(0x2b5)](_0x29d337,_0xb7d691,0x40,(_0x50bac6,_0x453921)=>{const _0x2fe43e=_0x23cc3c;if(_0x50bac6)_0x4cb221(_0x50bac6);_0x517805(_0xb7d691[_0x2fe43e(0x261)](_0x2fe43e(0x439))+':'+_0x453921['toString'](_0x2fe43e(0x439)));});});}async function _0x2055a3(_0x77c073,_0x1f2e31){const _0x2ffc50=_0x2368,[_0x1cb861,_0x406ad0]=_0x1f2e31[_0x2ffc50(0x37c)](':');if(!_0x1cb861||!_0x406ad0)return![];const _0x7bfb91=Buffer[_0x2ffc50(0x36d)](_0x1cb861,_0x2ffc50(0x439));return new Promise((_0x189a51,_0x3ce84e)=>{_0xa8518b['scrypt'](_0x77c073,_0x7bfb91,0x40,(_0x227466,_0x184b72)=>{const _0x5b3d4e=_0x2368;if(_0x227466)_0x3ce84e(_0x227466);_0x189a51(_0xa8518b[_0x5b3d4e(0x2a4)](_0x184b72,Buffer['from'](_0x406ad0,_0x5b3d4e(0x439))));});});}return okdbAuthTokens={'hmac':_0x1597f9,'timingSafeEqual':_0x4f1de5,'parseBearer':_0x3d694a,'randomToken':_0x5f22e4,'hashToken':_0x17643b,'issueToken':_0x30ce30,'authenticateToken':_0x4aa26b,'hashPassword':_0x3d42fe,'verifyPassword':_0x2055a3},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x565ecd=_0x4b361c;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x4febc8=require$$0$1,_0x257e26=_0x565ecd(0x57d),_0x153ca2=new Uint8Array(0x100)[_0x565ecd(0x166)](0xff);for(let _0x36c4ec=0x0;_0x36c4ec<_0x257e26[_0x565ecd(0x2eb)];_0x36c4ec++){_0x153ca2[_0x257e26['charCodeAt'](_0x36c4ec)]=_0x36c4ec,_0x153ca2[_0x257e26[_0x565ecd(0x4e6)](_0x36c4ec)+0x20]=_0x36c4ec;}_0x153ca2['O'[_0x565ecd(0x4e6)](0x0)]=0x0,_0x153ca2['o'[_0x565ecd(0x4e6)](0x0)]=0x0,_0x153ca2['I'[_0x565ecd(0x4e6)](0x0)]=0x1,_0x153ca2['i'[_0x565ecd(0x4e6)](0x0)]=0x1,_0x153ca2['L'[_0x565ecd(0x4e6)](0x0)]=0x1,_0x153ca2['l'[_0x565ecd(0x4e6)](0x0)]=0x1;function _0x52d4d1(_0x1f4fd7){let _0x2a4e97=0x0,_0x5024f7=0x0,_0x520f3e='';for(let _0x192a60=0x0;_0x192a60<_0x1f4fd7['length'];_0x192a60++){_0x5024f7=_0x5024f7<<0x8|_0x1f4fd7[_0x192a60],_0x2a4e97+=0x8;while(_0x2a4e97>=0x5){_0x2a4e97-=0x5,_0x520f3e+=_0x257e26[_0x5024f7>>>_0x2a4e97&0x1f];}}return _0x2a4e97>0x0&&(_0x520f3e+=_0x257e26[_0x5024f7<<0x5-_0x2a4e97&0x1f]),_0x520f3e;}function _0x13ca8f(_0x24f29b){const _0x107f27=_0x565ecd;_0x24f29b=_0x24f29b[_0x107f27(0x38b)](/-/g,'')[_0x107f27(0x5ef)]();let _0xe56562=0x0,_0x21129c=0x0;const _0x179ef2=[];for(let _0x43c40f=0x0;_0x43c40f<_0x24f29b[_0x107f27(0x2eb)];_0x43c40f++){const _0x29eba6=_0x153ca2[_0x24f29b[_0x107f27(0x4e6)](_0x43c40f)];if(_0x29eba6===0xff)continue;_0x21129c=_0x21129c<<0x5|_0x29eba6,_0xe56562+=0x5,_0xe56562>=0x8&&(_0xe56562-=0x8,_0x179ef2[_0x107f27(0x614)](_0x21129c>>>_0xe56562&0xff));}return Buffer['from'](_0x179ef2);}const _0x61bd1a=[_0x565ecd(0x32d),_0x565ecd(0x591),_0x565ecd(0x238),_0x565ecd(0x458),'timeMachine',_0x565ecd(0x55f),_0x565ecd(0x32b),'files'],_0x3ca68d=0x0,_0x448090=0x1,_0x5e316a=0x2,_0x9cc9b5=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x10ede0({issuedAt:_0x1cf6a7,expiresAt:_0x99a7ac,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x3ca68d}){const _0x3199e7=_0x565ecd,_0x5a78d8=Buffer['from'](licensee,_0x3199e7(0x365))[_0x3199e7(0x45e)](0x0,0x40),_0x54b5da=0x1+0x1+0x4+0x4+0x1+_0x5a78d8[_0x3199e7(0x2eb)]+0x2+0x10,_0x48c274=Buffer[_0x3199e7(0x3b4)](_0x54b5da);let _0x37430b=0x0;_0x48c274[_0x3199e7(0x2e4)](0x1,_0x37430b++),_0x48c274[_0x3199e7(0x2e4)](licenseType,_0x37430b++),_0x48c274[_0x3199e7(0x461)](Math[_0x3199e7(0x341)](_0x1cf6a7/0x3e8),_0x37430b),_0x37430b+=0x4,_0x48c274[_0x3199e7(0x461)](Math[_0x3199e7(0x341)](_0x99a7ac/0x3e8),_0x37430b),_0x37430b+=0x4,_0x48c274[_0x3199e7(0x2e4)](_0x5a78d8[_0x3199e7(0x2eb)],_0x37430b++),_0x5a78d8['copy'](_0x48c274,_0x37430b),_0x37430b+=_0x5a78d8['length'];let _0x5270a4=0x0;for(let _0x17bc54=0x0;_0x17bc54<_0x61bd1a['length'];_0x17bc54++){if(features[_0x61bd1a[_0x17bc54]])_0x5270a4|=0x1<<_0x17bc54;}_0x48c274[_0x3199e7(0x49e)](_0x5270a4,_0x37430b),_0x37430b+=0x2;const _0xb792d5=['envs',_0x3199e7(0x202),_0x3199e7(0x1dc),_0x3199e7(0x178)];for(const _0x480803 of _0xb792d5){_0x48c274['writeUInt32BE'](limits[_0x480803]||0x0,_0x37430b),_0x37430b+=0x4;}return _0x48c274;}function _0x4f58c0(_0xa7340a){const _0x2f2685=_0x565ecd;let _0x4e9dfa=0x0;const _0x14eb1f=_0xa7340a[_0x2f2685(0x176)](_0x4e9dfa++),_0x3fef41=_0xa7340a[_0x2f2685(0x176)](_0x4e9dfa++),_0x5f123e=_0xa7340a[_0x2f2685(0x10c)](_0x4e9dfa);_0x4e9dfa+=0x4;const _0x18e6c0=_0xa7340a[_0x2f2685(0x10c)](_0x4e9dfa);_0x4e9dfa+=0x4;const _0x35e88e=_0xa7340a['readUInt8'](_0x4e9dfa++),_0x29e571=_0xa7340a[_0x2f2685(0x45e)](_0x4e9dfa,_0x4e9dfa+_0x35e88e)[_0x2f2685(0x261)](_0x2f2685(0x365));_0x4e9dfa+=_0x35e88e;const _0x3f535d=_0xa7340a[_0x2f2685(0x49a)](_0x4e9dfa);_0x4e9dfa+=0x2;const _0x55e12b={};for(let _0x57473d=0x0;_0x57473d<_0x61bd1a[_0x2f2685(0x2eb)];_0x57473d++){_0x55e12b[_0x61bd1a[_0x57473d]]=Boolean(_0x3f535d&0x1<<_0x57473d);}const _0x25888d=[_0x2f2685(0xec),'typesPerEnv',_0x2f2685(0x1dc),_0x2f2685(0x178)],_0x1ee51f={};for(const _0x43bdfc of _0x25888d){const _0x1b4159=_0xa7340a[_0x2f2685(0x10c)](_0x4e9dfa);_0x4e9dfa+=0x4,_0x1ee51f[_0x43bdfc]=_0x1b4159===0x0?null:_0x1b4159;}return{'v':_0x14eb1f,'licenseType':_0x3fef41,'issuedAt':_0x5f123e*0x3e8,'expiresAt':_0x18e6c0*0x3e8,'licensee':_0x29e571,'features':_0x55e12b,'limits':_0x1ee51f};}function _0x2abc25(_0x5a56ea,_0xe8497a){const _0x242a20=_0x565ecd,_0x275efd=Buffer[_0x242a20(0x115)]([_0x5a56ea,_0xe8497a]),_0x4c3608=_0x52d4d1(_0x275efd),_0x3ae566=[];for(let _0x359474=0x0;_0x359474<_0x4c3608[_0x242a20(0x2eb)];_0x359474+=0x8){_0x3ae566['push'](_0x4c3608[_0x242a20(0x45e)](_0x359474,_0x359474+0x8));}return _0x3ae566[_0x242a20(0x3a4)]('-');}function _0x1251fc(_0x24cfaf){const _0x398ba7=_0x565ecd;if(typeof _0x24cfaf!==_0x398ba7(0x380))throw new Error('decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string');const _0x533a02=_0x13ca8f(_0x24cfaf[_0x398ba7(0x38b)](/-/g,''));if(_0x533a02['length']<0x41)throw new Error(_0x398ba7(0x299)+_0x533a02[_0x398ba7(0x2eb)]+_0x398ba7(0x374));const _0x42d8be=_0x533a02[_0x398ba7(0x45e)](0x0,_0x533a02[_0x398ba7(0x2eb)]-0x40),_0x53edfb=_0x533a02[_0x398ba7(0x45e)](_0x533a02[_0x398ba7(0x2eb)]-0x40);let _0x220191;try{_0x220191=_0x4f58c0(_0x42d8be);}catch(_0x419ad5){throw new Error(_0x398ba7(0x1de)+_0x419ad5['message']);}return{'rawBuf':_0x533a02,'payload':_0x42d8be,'sig':_0x53edfb,'decoded':_0x220191};}function _0x572f3c(_0x5857c8){const _0xe4db47=_0x565ecd;return _0x4febc8[_0xe4db47(0x291)]('sha256')[_0xe4db47(0x251)](_0x5857c8)['digest']()[_0xe4db47(0x45e)](0x0,0x8);}function _0xdb96dc(_0x5891eb,_0x2f3980,_0x13b0e5){const _0x3dc917=_0x565ecd,_0x50324a='OKDB-PIN-V1:'+_0x13b0e5,_0x5e814e=Buffer['concat']([Buffer['from'](_0x5891eb,_0x3dc917(0x365)),_0x2f3980]),_0x4a6705=_0x4febc8['createHmac']('sha256',_0x50324a)[_0x3dc917(0x251)](_0x5e814e)[_0x3dc917(0x34c)](),_0x2fd411=_0x52d4d1(_0x4a6705[_0x3dc917(0x45e)](0x0,0x5));return{'pin':_0x2fd411,'pinHmac':_0x4a6705};}function _0x5a6dd0(_0xa941a4,_0x2c99f2,_0x49d473){const _0x3cf6b2=_0x565ecd,_0x4a5e56=Buffer[_0x3cf6b2(0x3b4)](0x4d);let _0x3b88b4=0x0;_0x4a5e56['writeUInt8'](0x1,_0x3b88b4++),_0xa941a4['copy'](_0x4a5e56,_0x3b88b4),_0x3b88b4+=0x8,_0x4a5e56[_0x3cf6b2(0x461)](_0x2c99f2,_0x3b88b4),_0x3b88b4+=0x4,_0x49d473[_0x3cf6b2(0x28b)](_0x4a5e56,_0x3b88b4);const _0x5adba3=_0x52d4d1(_0x4a5e56),_0x1a2bcd=[];for(let _0x30aee7=0x0;_0x30aee7<_0x5adba3['length'];_0x30aee7+=0x6){_0x1a2bcd[_0x3cf6b2(0x614)](_0x5adba3[_0x3cf6b2(0x45e)](_0x30aee7,_0x30aee7+0x6));}return _0x1a2bcd['join']('-');}function _0xbf9911(_0x5017e4){const _0x3879b8=_0x565ecd;if(typeof _0x5017e4!==_0x3879b8(0x380))throw new Error(_0x3879b8(0x29b));const _0x514e90=_0x13ca8f(_0x5017e4['replace'](/-/g,''));if(_0x514e90[_0x3879b8(0x2eb)]!==0x4d)throw new Error(_0x3879b8(0x23b)+_0x514e90[_0x3879b8(0x2eb)]);let _0x51e75e=0x0;const _0x3eb37f=_0x514e90[_0x3879b8(0x176)](_0x51e75e++),_0x33b048=_0x514e90[_0x3879b8(0x45e)](_0x51e75e,_0x51e75e+0x8);_0x51e75e+=0x8;const _0x3b58a9=_0x514e90[_0x3879b8(0x10c)](_0x51e75e);_0x51e75e+=0x4;const _0x3fdbf0=_0x514e90[_0x3879b8(0x45e)](_0x51e75e);return{'v':_0x3eb37f,'licenseHash':_0x33b048,'expiry':_0x3b58a9,'sig':_0x3fdbf0};}function _0x239512({tokenString:_0x1c4e11,nodeId:_0x3b94f1,rawBlobBuf:_0x59b74a,pubKeyPem:_0x1098f6,pubFingerprint:_0x4e401d}){const _0x315c41=_0x565ecd;let _0x18fa21;try{_0x18fa21=_0xbf9911(_0x1c4e11);}catch(_0x37f9eb){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x82ba79=_0x572f3c(_0x59b74a);if(!_0x82ba79[_0x315c41(0x362)](_0x18fa21[_0x315c41(0x655)]))return{'valid':![],'reason':_0x315c41(0x550)};const {pinHmac:_0x49491a}=_0xdb96dc(_0x3b94f1,_0x82ba79,_0x4e401d),_0xce1430=Buffer['allocUnsafe'](0x4);_0xce1430['writeUInt32BE'](_0x18fa21['expiry'],0x0);const _0x20a59d=Buffer[_0x315c41(0x115)]([Buffer[_0x315c41(0x36d)]([_0x18fa21['v']]),_0x49491a[_0x315c41(0x45e)](0x0,0x5),_0x18fa21[_0x315c41(0x655)],_0xce1430]);try{const _0xc0c9aa=_0x4febc8[_0x315c41(0x170)](null,_0x20a59d,_0x1098f6,_0x18fa21['sig']);if(!_0xc0c9aa)return{'valid':![],'reason':_0x315c41(0x445)};}catch(_0x546a02){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x18fa21[_0x315c41(0x146)]<Date['now']()/0x3e8)return{'valid':![],'reason':_0x315c41(0x133)};return{'valid':!![],'reason':'ok'};}function _0x109b45(_0x17eba3){const _0x36f284=_0x565ecd;if(typeof _0x17eba3!==_0x36f284(0x380))return'unknown';const _0x2955d2=_0x17eba3[_0x36f284(0x486)]();if(_0x2955d2[_0x36f284(0x3cc)]('/')||_0x2955d2[_0x36f284(0x3cc)]('./')||_0x2955d2[_0x36f284(0x3cc)](_0x36f284(0x4eb))||/^[A-Za-z]:[\\/]/[_0x36f284(0x30d)](_0x2955d2))return _0x36f284(0x42d);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x36f284(0x30d)](_0x2955d2))return _0x36f284(0x134);const _0x185682=_0x2955d2[_0x36f284(0x38b)](/[\s-]+/g,'')[_0x36f284(0x2eb)];if(_0x185682===0x7c)return _0x36f284(0x377);if(_0x185682>=0x95&&_0x185682<=0xfc)return _0x36f284(0x1d8);return _0x36f284(0x326);}return okdbLicenseCodec={'toBase32':_0x52d4d1,'fromBase32':_0x13ca8f,'encodeLicensePayload':_0x10ede0,'decodeLicensePayload':_0x4f58c0,'encodeLicenseBlob':_0x2abc25,'decodeLicenseBlob':_0x1251fc,'licenseHash':_0x572f3c,'derivePin':_0xdb96dc,'encodeActivationToken':_0x5a6dd0,'decodeActivationToken':_0xbf9911,'verifyActivation':_0x239512,'detectInputType':_0x109b45,'FEATURE_NAMES':_0x61bd1a,'LICENSE_TYPE_STANDARD':_0x3ca68d,'LICENSE_TYPE_OPEN':_0x448090,'LICENSE_TYPE_INTERNAL':_0x5e316a,'OPEN_LICENSE_MAX_DURATION_MS':_0x9cc9b5},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x24cdc6 extends Error{constructor(_0x42f50e,_0x1c4a9b,_0x37faec={}){const _0x3dacf9=_0x2368;super(_0x42f50e),this['name']=_0x3dacf9(0x5c5),this[_0x3dacf9(0x60e)]=_0x1c4a9b,this[_0x3dacf9(0x108)]=_0x37faec,_0x37faec[_0x3dacf9(0x10f)]&&(this['cause']=_0x37faec[_0x3dacf9(0x10f)]),Error['captureStackTrace'](this,this['constructor']);}}class _0x4354fa extends _0x24cdc6{constructor(_0x25fdce,_0x373d2a,_0x21d618,_0xa44c60){const _0x4675ce=_0x2368;super('Version\x20mismatch\x20for\x20'+_0x25fdce+'@'+_0x373d2a+_0x4675ce(0x56d)+_0x21d618+_0x4675ce(0x136)+_0xa44c60,_0x4675ce(0x5c9),{'type':_0x25fdce,'key':_0x373d2a,'expectedVersion':_0x21d618,'actualVersion':_0xa44c60}),this[_0x4675ce(0x2cc)]='OKDBVersionMismatchError';}}class _0x2a7149 extends _0x24cdc6{constructor(_0x167bb5,_0x1a4360){const _0x3255a3=_0x2368;super(_0x167bb5+'@'+_0x1a4360+_0x3255a3(0x1a8),_0x3255a3(0x155),{'type':_0x167bb5,'key':_0x1a4360}),this[_0x3255a3(0x2cc)]=_0x3255a3(0x14f);}}class _0x641a67 extends _0x24cdc6{constructor(_0x25ad3f,_0x7e2074){const _0xb69159=_0x2368;super(_0x25ad3f+'@'+_0x7e2074+_0xb69159(0x4d2),'ALREADY_EXISTS',{'type':_0x25ad3f,'key':_0x7e2074}),this[_0xb69159(0x2cc)]=_0xb69159(0x12c);}}class _0x4b5f56 extends _0x24cdc6{constructor(_0x366337,_0x42452f){const _0x2050e9=_0x2368,_0x193237=typeof _0x42452f;super(_0x2050e9(0x4a5)+_0x366337+_0x2050e9(0x21e)+_0x193237+_0x2050e9(0x1a5)+_0x42452f,_0x2050e9(0x396),{'index':_0x366337,'key':_0x42452f,'keyType':_0x193237}),this[_0x2050e9(0x2cc)]='OKDBInvalidIndexKeyError';}}class _0xb68d6d extends _0x24cdc6{constructor(_0xbe77a){const _0xbeabe3=_0x2368,_0x578114=typeof _0xbe77a;super(_0xbeabe3(0x2ee)+_0x578114+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0xbe77a,'INVALID_PRIMARY_KEY',{'key':_0xbe77a,'keyType':_0x578114}),this[_0xbeabe3(0x2cc)]=_0xbeabe3(0x227);}}class _0x1056ba extends _0x24cdc6{constructor(_0x2f13c8){const _0x594c28=_0x2368;super(_0x594c28(0x66b)+_0x2f13c8+_0x594c28(0x50d),'TYPE_NOT_REGISTERED',{'type':_0x2f13c8}),this['name']=_0x594c28(0x484);}}class _0xac327a extends _0x24cdc6{constructor(_0x5d6773){const _0x5d8635=_0x2368;super('Type\x20\x27'+_0x5d6773+'\x27\x20already\x20registered','TYPE_ALREADY_REGISTERED',{'type':_0x5d6773}),this[_0x5d8635(0x2cc)]='OKDBTypeAlreadyRegisteredError';}}class _0x157879 extends _0x24cdc6{constructor(_0x16eecd,_0x3585e9){const _0x19bd05=_0x2368;super(_0x19bd05(0x11d)+_0x3585e9+_0x19bd05(0x17e)+_0x16eecd+'\x27\x20doesn\x27t\x20exist','INDEX_NOT_REGISTERED',{'type':_0x16eecd,'index':_0x3585e9}),this['name']='OKDBIndexNotRegisteredError';}}class _0x489c95 extends _0x24cdc6{constructor(_0x516dd4,_0x24051c){const _0x468171=_0x2368;super(_0x468171(0x11d)+_0x24051c+_0x468171(0x17e)+_0x516dd4+'\x27\x20is\x20already\x20registered',_0x468171(0x379),{'type':_0x516dd4,'index':_0x24051c}),this[_0x468171(0x2cc)]=_0x468171(0x31e);}}class _0xe2d01 extends _0x24cdc6{constructor(_0x57d0ac,_0x4a995e={}){const _0x518813=_0x2368;super(_0x57d0ac,'INVALID_VALUE',_0x4a995e),this[_0x518813(0x2cc)]=_0x518813(0x3f8);}}class _0x158880 extends _0x24cdc6{constructor(_0x56e109,_0x2e47f7,_0x25dd4a,_0x1110d9,_0x5b3b4d){const _0x4d9289=_0x2368;super(_0x4d9289(0x1a3)+_0x56e109+'@'+_0x2e47f7+_0x4d9289(0x203)+_0x25dd4a+_0x4d9289(0x1e1)+_0x1110d9+_0x4d9289(0x295)+_0x5b3b4d+'\x27','UNIQUE_CONSTRAINT',{'type':_0x56e109,'index':_0x2e47f7,'indexKey':_0x25dd4a,'existingKey':_0x1110d9,'conflictingKey':_0x5b3b4d}),this[_0x4d9289(0x2cc)]='OKDBUniqueConstraintError';}}class _0xb43cf5 extends _0x24cdc6{constructor(_0x20d98b,_0x4285fa,_0x4b13c9){const _0x1764fd=_0x2368;super(_0x1764fd(0x4b5)+_0x20d98b+'@'+_0x4285fa,_0x1764fd(0x528),{'type':_0x20d98b,'key':_0x4285fa,'errors':_0x4b13c9}),this[_0x1764fd(0x2cc)]=_0x1764fd(0x640),this[_0x1764fd(0x49b)]=_0x20d98b,this[_0x1764fd(0x174)]=_0x4285fa,this[_0x1764fd(0x444)]=_0x4b13c9;}}class _0x3db255 extends _0x24cdc6{constructor(_0x1068f7,_0x4ba1f0){const _0x477822=_0x2368;super(_0x477822(0x613)+_0x1068f7+':\x20'+_0x4ba1f0[_0x477822(0x2eb)]+_0x477822(0x13e),_0x477822(0x2e6),{'type':_0x1068f7,'failures':_0x4ba1f0}),this[_0x477822(0x2cc)]='OKDBSchemaCollectionError',this[_0x477822(0x49b)]=_0x1068f7,this[_0x477822(0x597)]=_0x4ba1f0;}}class _0x15c33f extends _0x24cdc6{constructor(_0x4a7cab,_0x26703e,_0x4a1ebb,_0x26f8f8,_0x35f38b){const _0xe2f450=_0x2368;super(_0xe2f450(0xef)+_0x4a7cab+'@'+_0x26703e+'.'+_0x4a1ebb+_0xe2f450(0x188)+_0x26f8f8+'@'+_0x35f38b+_0xe2f450(0x1b7),'FOREIGN_KEY_VIOLATION',{'sourceType':_0x4a7cab,'sourceKey':_0x26703e,'fieldPath':_0x4a1ebb,'targetType':_0x26f8f8,'targetKey':_0x35f38b}),this[_0xe2f450(0x2cc)]=_0xe2f450(0x4be),this[_0xe2f450(0x5c2)]=_0x4a7cab,this['sourceKey']=_0x26703e,this[_0xe2f450(0x120)]=_0x4a1ebb,this[_0xe2f450(0x372)]=_0x26f8f8,this['targetKey']=_0x35f38b;}}class _0x5df77e extends _0x24cdc6{constructor(_0x5bcfa0,_0x2a0522,_0x10c8f3){const _0x327039=_0x2368;super('Cannot\x20delete\x20'+_0x5bcfa0+'@'+_0x2a0522+':\x20'+_0x10c8f3['length']+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x327039(0x66d),{'targetType':_0x5bcfa0,'targetKey':_0x2a0522,'references':_0x10c8f3}),this[_0x327039(0x2cc)]='OKDBForeignKeyDeleteError',this[_0x327039(0x372)]=_0x5bcfa0,this[_0x327039(0x436)]=_0x2a0522,this['references']=_0x10c8f3;}}class _0x4ca79f extends _0x24cdc6{constructor(_0x4de81a,_0x4611c8,_0x5c1f00){const _0x4d7a45=_0x2368;super(_0x4d7a45(0x390)+_0x4611c8+_0x4d7a45(0x191)+_0x4de81a+_0x4d7a45(0x306)+_0x5c1f00[_0x4d7a45(0x601)](_0x9172c5=>_0x9172c5[_0x4d7a45(0x4d6)]+':'+_0x9172c5[_0x4d7a45(0x2cc)])[_0x4d7a45(0x3a4)](',\x20'),_0x4d7a45(0x48a),{'type':_0x4de81a,'index':_0x4611c8,'usedBy':_0x5c1f00}),this[_0x4d7a45(0x2cc)]=_0x4d7a45(0x1fa);}}return okdbError={'OKDBError':_0x24cdc6,'OKDBVersionMismatchError':_0x4354fa,'OKDBNotFoundError':_0x2a7149,'OKDBAlreadyExistsError':_0x641a67,'OKDBInvalidIndexKeyError':_0x4b5f56,'OKDBInvalidPrimaryKeyError':_0xb68d6d,'OKDBTypeNotRegisteredError':_0x1056ba,'OKDBTypeAlreadyRegisteredError':_0xac327a,'OKDBIndexNotRegisteredError':_0x157879,'OKDBIndexAlreadyRegisteredError':_0x489c95,'OKDBInvalidValueError':_0xe2d01,'OKDBUniqueConstraintError':_0x158880,'OKDBSchemaValidationError':_0xb43cf5,'OKDBSchemaCollectionError':_0x3db255,'OKDBForeignKeyError':_0x15c33f,'OKDBForeignKeyDeleteError':_0x5df77e,'OKDBIndexHasConsumersError':_0x4ca79f},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5adc1c=_0x4b361c;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5073ab={'PUT':_0x5adc1c(0x42f),'REMOVE':_0x5adc1c(0x1b1),'INDEX_DROP':_0x5adc1c(0x14d),'INDEX_REGISTER':_0x5adc1c(0x41d),'INDEX_RESET':_0x5adc1c(0x596),'TYPE_REGISTER':'registerType','TYPE_DROP':_0x5adc1c(0x298),'FTS_REGISTER':_0x5adc1c(0x438),'FTS_DROP':_0x5adc1c(0x156),'FTS_RESET':_0x5adc1c(0x671),'SCHEMA_SET':_0x5adc1c(0x1c0),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x5adc1c(0x327),'TTL_CLEAR':_0x5adc1c(0x4b4)},_0x46c743={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x5adc1c(0x3a2),'SYSTEM_CLOCK_CHANGE':_0x5adc1c(0x466),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x5adc1c(0x394),'SYSTEM_TYPE_DROP':_0x5adc1c(0x247),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':_0x5adc1c(0x5bc),'ITEM_REMOVE':_0x5adc1c(0x433),'INDEX_RESET':_0x5adc1c(0x578),'INDEX_READY':_0x5adc1c(0x44c),'INDEX_PROGRESS':_0x5adc1c(0x384),'VIEW_PROGRESS':_0x5adc1c(0x415),'INDEX_DROP':_0x5adc1c(0x2ef),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x5adc1c(0x450),'FTS_DROP':_0x5adc1c(0x622),'FTS_RESET':_0x5adc1c(0x36f),'SCHEMA_SET':'schema:set','SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x5adc1c(0x5f9),'UNIQUE_VIOLATION_RESOLVED':_0x5adc1c(0x2cb),'REF_VIOLATION':_0x5adc1c(0x3ef),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x5adc1c(0x615),'TXN_START':_0x5adc1c(0x676),'TXN_END':_0x5adc1c(0x382),'TXN_ROLLBACK':_0x5adc1c(0x204),'TYPE_REGISTERED':_0x5adc1c(0x502),'TYPE_DROP':_0x5adc1c(0x619),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x5adc1c(0x4e0),'TTL_EXPIRED':_0x5adc1c(0x457),'TTL_SET':_0x5adc1c(0x584),'TTL_CLEAR':_0x5adc1c(0x590),'LICENSE_INVALID':_0x5adc1c(0x19c),'LICENSE_ADDED':_0x5adc1c(0x45c),'LICENSE_ACTIVATED':_0x5adc1c(0x1ca),'LICENSE_REMOVED':_0x5adc1c(0x369)},_0x20d21b={'CREATING':'creating','RESETTING':_0x5adc1c(0x658),'READY':_0x5adc1c(0x5de),'DROPPING':'dropping','WAITING':_0x5adc1c(0x164)},_0x4a5770={'CREATED':_0x5adc1c(0x2be),'STARTING':_0x5adc1c(0x27a),'STARTED':'started','STOPPING':_0x5adc1c(0x395),'STOPPED':'stopped'},_0x2a622d={'CREATING':_0x5adc1c(0x5be),'READY':_0x5adc1c(0x5de),'HALTED':_0x5adc1c(0x3e2),'STOPPED':'stopped','RESETTING':'resetting'},_0x46fc38=Object['freeze']({'POKE':_0x5adc1c(0x101),'DRAIN':_0x5adc1c(0x399),'TYPE_DROP':_0x5adc1c(0x20f),'PROC':_0x5adc1c(0x355)});return okdbEnums={'BUS_EVENTS':_0x46fc38,'CHANGE_ACTIONS':_0x5073ab,'EVENTS':_0x46c743,'INDEX_STATE':_0x20d21b,'OKDB_STATE':_0x4a5770,'VIEW_STATE':_0x2a622d},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x4d578a=_0x4b361c;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x1b810b=require$$1$1,_0x395870=require$$1,_0x52acb3=require$$2,_0x2c99c0=_0x1b810b[_0x4d578a(0xe7)](_0x395870[_0x4d578a(0x3a4)](__dirname,_0x4d578a(0x490)),_0x4d578a(0x365))[_0x4d578a(0x486)](),_0x5bac0f=_0x52acb3[_0x4d578a(0x18e)](_0x2c99c0)[_0x4d578a(0x2d6)]({'type':'spki','format':_0x4d578a(0x34a)}),_0x23aabf=_0x52acb3['createHash']('sha256')[_0x4d578a(0x251)](_0x5bac0f)[_0x4d578a(0x34c)](_0x4d578a(0x439))[_0x4d578a(0x45e)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x2c99c0,'PUB_FINGERPRINT':_0x23aabf},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x196ac9=_0x4b361c;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0xaf761=require$$2,{OKDBError:_0x4640cd}=requireOkdbError(),{EVENTS:_0x551069}=requireOkdbEnums(),_0x535a30=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x1b43e4,LICENSE_TYPE_INTERNAL:_0x43264b,OPEN_LICENSE_MAX_DURATION_MS:_0x395586}=_0x535a30,_0xd89aac=requireOkdbPubkey(),_0x4e1b2f={'LICENSED_BUILD':'true','PUBLIC_KEY_PEM':_0xd89aac[_0x196ac9(0x3b0)],'PUB_FINGERPRINT':_0xd89aac[_0x196ac9(0x10e)],'LICENSE_EXPIRED_ACTION':_0x196ac9(0x4f7)},_0x48b8b8='~licenses',_0x38eeef={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x196631(_0x4c14c5){const _0x3e88b6=_0x196ac9;!_0x4c14c5[_0x3e88b6(0x431)](_0x48b8b8)&&await _0x4c14c5[_0x3e88b6(0x428)](_0x48b8b8);}class _0x12dd99{constructor(_0x3a4d39){const _0x1382b9=_0x196ac9;this['okdb']=_0x3a4d39,this[_0x1382b9(0x2c5)]=null;}async[_0x196ac9(0x3b2)](){const _0x563fdc=_0x196ac9,_0x17a302=this[_0x563fdc(0x2d3)][_0x563fdc(0x18f)];if(!_0x17a302||!_0x17a302['hasType'](_0x48b8b8)){this['_active']=null;return;}const _0x315c24=this['okdb']['id'];let _0x19295f=null;for(const {key:_0x4aba3e,value:_0x2bd270}of _0x17a302[_0x563fdc(0x391)](_0x48b8b8)){const _0x46f4eb=this[_0x563fdc(0xed)](_0x2bd270,_0x315c24);_0x46f4eb==='active'&&!_0x19295f&&(_0x19295f={..._0x2bd270,'id':_0x4aba3e,'status':_0x46f4eb});}this[_0x563fdc(0x2c5)]=_0x19295f;if(this['_active']&&this[_0x563fdc(0x2c5)][_0x563fdc(0x400)]===_0x1b43e4){const _0x4e4d1a=Math[_0x563fdc(0x602)]((this[_0x563fdc(0x2c5)]['expiresAt']-Date[_0x563fdc(0x16a)]())/0x5265c00);this[_0x563fdc(0x2d3)][_0x563fdc(0x4f7)]?.[_0x563fdc(0x27e)](_0x563fdc(0x5f6)+_0x4e4d1a+_0x563fdc(0x246),{'feature':_0x563fdc(0x58c),'licensee':this[_0x563fdc(0x2c5)][_0x563fdc(0x56c)],'expiresAt':new Date(this['_active'][_0x563fdc(0x63c)])[_0x563fdc(0x4c8)]()});}this[_0x563fdc(0x2c5)]&&this['_active'][_0x563fdc(0x400)]===_0x43264b&&this[_0x563fdc(0x2d3)][_0x563fdc(0x4f7)]?.[_0x563fdc(0x27e)](_0x563fdc(0x61b),{'feature':_0x563fdc(0x58c),'licensee':this['_active']['licensee']});}[_0x196ac9(0xed)](_0xe07c7e,_0x373277){const _0x34dadb=_0x196ac9;if(!_0xe07c7e['blob'])return _0x34dadb(0x30a);let _0x4d2a95;try{_0x4d2a95=_0x535a30[_0x34dadb(0x358)](_0xe07c7e[_0x34dadb(0x1d8)]);}catch(_0x3fe73a){return _0x34dadb(0x30a);}try{const _0x5d3deb=_0xaf761['verify'](null,_0x4d2a95['payload'],_0x4e1b2f['PUBLIC_KEY_PEM'],_0x4d2a95[_0x34dadb(0x4ff)]);if(!_0x5d3deb)return _0x34dadb(0x30a);}catch(_0x1bf032){return _0x34dadb(0x30a);}if(_0x4d2a95[_0x34dadb(0x397)][_0x34dadb(0x400)]===_0x43264b)return _0x34dadb(0x22d);if(_0x4d2a95[_0x34dadb(0x397)][_0x34dadb(0x63c)]<=Date[_0x34dadb(0x16a)]())return _0x34dadb(0x2fc);if(_0x4d2a95[_0x34dadb(0x397)]['licenseType']===_0x1b43e4)return _0x34dadb(0x22d);if(!_0xe07c7e[_0x34dadb(0x377)])return'pending';const _0x5234ea=_0x535a30[_0x34dadb(0x105)]({'tokenString':_0xe07c7e[_0x34dadb(0x377)],'nodeId':_0x373277,'rawBlobBuf':_0x4d2a95[_0x34dadb(0x51b)],'pubKeyPem':_0x4e1b2f[_0x34dadb(0x3b0)],'pubFingerprint':_0x4e1b2f['PUB_FINGERPRINT']});if(_0x5234ea['reason']==='LICENSE_HASH_MISMATCH'||_0x5234ea[_0x34dadb(0x4bb)]===_0x34dadb(0x445))return _0x34dadb(0x469);if(_0x5234ea[_0x34dadb(0x4bb)]===_0x34dadb(0x133))return _0x34dadb(0x2fc);if(!_0x5234ea[_0x34dadb(0x654)])return'wrong_node';return _0x34dadb(0x22d);}get[_0x196ac9(0x22d)](){const _0x5bb9a8=_0x196ac9;return this[_0x5bb9a8(0x2c5)];}get[_0x196ac9(0x21b)](){const _0x2e6b02=_0x196ac9;return this[_0x2e6b02(0x2c5)]??_0x38eeef;}[_0x196ac9(0x639)](_0x289922){const _0x5cd16d=_0x196ac9;if(_0x4e1b2f[_0x5cd16d(0x3bb)]!==_0x5cd16d(0x5e1))return;const _0x44afa0=this[_0x5cd16d(0x21b)];if(!_0x44afa0[_0x5cd16d(0x26d)]?.[_0x289922]){const _0xe2ea72=_0x44afa0['_isFree']?_0x5cd16d(0x275)+_0x289922+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x289922+_0x5cd16d(0x35c):'Feature\x20not\x20licensed:\x20'+_0x289922+_0x5cd16d(0x147)+_0x289922+'\x22.';throw new _0x4640cd(_0xe2ea72,_0x5cd16d(0x367),{'feature':_0x289922});}}[_0x196ac9(0x39b)](_0x46fc31){const _0x272d02=_0x196ac9;if(_0x4e1b2f[_0x272d02(0x3bb)]!==_0x272d02(0x5e1))return!![];return!!this[_0x272d02(0x21b)][_0x272d02(0x26d)]?.[_0x46fc31];}[_0x196ac9(0x285)](_0x23a68a,_0x483542){const _0x1c377f=_0x196ac9;if(_0x4e1b2f['LICENSED_BUILD']!==_0x1c377f(0x5e1))return;const _0x52b7b3=this[_0x1c377f(0x21b)],_0x155cf3=_0x52b7b3[_0x1c377f(0x546)]?.[_0x23a68a];if(_0x155cf3===null||_0x155cf3===undefined||_0x155cf3===0x0)return;if(_0x483542>=_0x155cf3)throw new _0x4640cd(_0x1c377f(0x23c)+_0x23a68a+'\x20('+_0x483542+'/'+_0x155cf3+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x23a68a,'current':_0x483542,'max':_0x155cf3});}async[_0x196ac9(0x313)](_0x154cf7){const _0x35ba2c=_0x196ac9;let _0x1b3a5d;try{_0x1b3a5d=_0x535a30[_0x35ba2c(0x358)](_0x154cf7);}catch(_0x196aef){throw new _0x4640cd(_0x35ba2c(0xf5)+_0x196aef[_0x35ba2c(0x29c)],_0x35ba2c(0x3eb));}let _0x34c1b9;try{_0x34c1b9=_0xaf761['verify'](null,_0x1b3a5d['payload'],_0x4e1b2f[_0x35ba2c(0x3b0)],_0x1b3a5d[_0x35ba2c(0x4ff)]);}catch(_0x5b6dde){throw new _0x4640cd(_0x35ba2c(0x245)+_0x5b6dde['message'],'LICENSE_INVALID');}if(!_0x34c1b9)throw new _0x4640cd(_0x35ba2c(0x568)+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x4e1b2f[_0x35ba2c(0x10e)]+'.\x20')+_0x35ba2c(0x353),_0x35ba2c(0x3eb),{'expectedFingerprint':_0x4e1b2f[_0x35ba2c(0x10e)]});if(_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x400)]===_0x1b43e4){const _0x4a6500=_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x63c)]-_0x1b3a5d['decoded'][_0x35ba2c(0x1d9)];if(_0x4a6500>_0x395586)throw new _0x4640cd('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math[_0x35ba2c(0x602)](_0x4a6500/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x35ba2c(0x3eb));}const _0x36f8af=this[_0x35ba2c(0x2d3)][_0x35ba2c(0x18f)];await _0x196631(_0x36f8af);const _0x37c967=_0x535a30[_0x35ba2c(0x655)](_0x1b3a5d[_0x35ba2c(0x51b)])[_0x35ba2c(0x261)](_0x35ba2c(0x439));for(const {value:_0x7fdfe3}of _0x36f8af[_0x35ba2c(0x391)](_0x48b8b8)){if(_0x7fdfe3[_0x35ba2c(0xe9)]===_0x37c967)throw new _0x4640cd('License\x20already\x20stored',_0x35ba2c(0x3eb));}const _0x5068b1=_0xaf761[_0x35ba2c(0x3ba)](),_0x29e0b7={'blob':_0x154cf7,'activation':null,'addedAt':Date['now'](),'_licenseHash':_0x37c967,'licensee':_0x1b3a5d[_0x35ba2c(0x397)]['licensee'],'expiresAt':_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x63c)],'features':_0x1b3a5d[_0x35ba2c(0x397)]['features'],'limits':_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x546)],'licenseType':_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x400)]};return await _0x36f8af[_0x35ba2c(0x42f)](_0x48b8b8,_0x5068b1,_0x29e0b7),{'id':_0x5068b1,..._0x29e0b7};}async[_0x196ac9(0x541)](_0x544d5d){const _0x92c3ac=_0x196ac9;let _0x5d7230;try{_0x5d7230=_0x535a30['decodeActivationToken'](_0x544d5d);}catch(_0x44be7e){throw new _0x4640cd(_0x92c3ac(0x64a)+_0x44be7e[_0x92c3ac(0x29c)],_0x92c3ac(0x529));}const _0x190241=_0x5d7230['licenseHash'][_0x92c3ac(0x261)](_0x92c3ac(0x439)),_0x5186de=this[_0x92c3ac(0x2d3)][_0x92c3ac(0x18f)];if(!_0x5186de||!_0x5186de[_0x92c3ac(0x431)](_0x48b8b8))throw new _0x4640cd(_0x92c3ac(0x63f),_0x92c3ac(0x529));let _0x22f60d=null,_0x79b29b=null;for(const {key:_0x48dc30,value:_0xeeb963}of _0x5186de['getRange'](_0x48b8b8)){if(_0xeeb963[_0x92c3ac(0xe9)]===_0x190241){_0x22f60d=_0x48dc30,_0x79b29b=_0xeeb963;break;}}if(!_0x22f60d)throw new _0x4640cd(_0x92c3ac(0x63f),_0x92c3ac(0x529));const {rawBuf:_0x1b26fa}=_0x535a30['decodeLicenseBlob'](_0x79b29b[_0x92c3ac(0x1d8)]),_0x48689f=_0x535a30[_0x92c3ac(0x105)]({'tokenString':_0x544d5d,'nodeId':this[_0x92c3ac(0x2d3)]['id'],'rawBlobBuf':_0x1b26fa,'pubKeyPem':_0x4e1b2f[_0x92c3ac(0x3b0)],'pubFingerprint':_0x4e1b2f[_0x92c3ac(0x10e)]});if(!_0x48689f[_0x92c3ac(0x654)])throw new _0x4640cd(_0x92c3ac(0x643)+_0x48689f[_0x92c3ac(0x4bb)],_0x92c3ac(0x529),{'reason':_0x48689f[_0x92c3ac(0x4bb)]});const _0x2b4b44={..._0x79b29b,'activation':_0x544d5d};return await _0x5186de['update'](_0x48b8b8,_0x22f60d,_0x2b4b44),{'id':_0x22f60d,..._0x2b4b44};}async['removeLicense'](_0x1047ca){const _0x2772ae=_0x196ac9,_0x50d9a1=this[_0x2772ae(0x2d3)][_0x2772ae(0x18f)];if(!_0x50d9a1||!_0x50d9a1[_0x2772ae(0x431)](_0x48b8b8))return;await _0x50d9a1[_0x2772ae(0x1b1)](_0x48b8b8,_0x1047ca);}async['listLicenses'](){const _0x1f85ad=_0x196ac9,_0xb7519b=this['okdb'][_0x1f85ad(0x18f)];if(!_0xb7519b||!_0xb7519b[_0x1f85ad(0x431)](_0x48b8b8))return[];const _0x4a99b3=this[_0x1f85ad(0x2d3)]['id'],_0x25bf36=[];for(const {key:_0x17dc33,value:_0x430044}of _0xb7519b['getRange'](_0x48b8b8)){const _0x35abed=this[_0x1f85ad(0xed)](_0x430044,_0x4a99b3);_0x25bf36[_0x1f85ad(0x614)]({..._0x430044,'id':_0x17dc33,'status':_0x35abed});}return _0x25bf36;}[_0x196ac9(0x23a)](){const _0x4ca620=_0x196ac9,_0x3a8d22=this[_0x4ca620(0x2d3)][_0x4ca620(0x18f)];if(!_0x3a8d22||!_0x3a8d22[_0x4ca620(0x431)](_0x48b8b8))return[];const _0x3e527c=this[_0x4ca620(0x2d3)]['id'],_0x48461e=[];for(const {key:_0x3922d4,value:_0x17e1b6}of _0x3a8d22[_0x4ca620(0x391)](_0x48b8b8)){if(_0x17e1b6['_licenseHash']){if(_0x17e1b6[_0x4ca620(0x400)]===_0x1b43e4)_0x48461e['push']({'licenseId':_0x3922d4,'pin':null});else{const _0x32a221=Buffer['from'](_0x17e1b6['_licenseHash'],_0x4ca620(0x439)),{pin:_0x4bf445}=_0x535a30['derivePin'](_0x3e527c,_0x32a221,_0x4e1b2f[_0x4ca620(0x10e)]);_0x48461e[_0x4ca620(0x614)]({'licenseId':_0x3922d4,'pin':_0x4bf445});}}}return _0x48461e;}async[_0x196ac9(0x5e4)](){const _0x3d9cc6=_0x196ac9,_0x1e4f16=this['_active'];await this[_0x3d9cc6(0x3b2)]();if(this[_0x3d9cc6(0x2c5)]&&this[_0x3d9cc6(0x2c5)]['licenseType']===_0x1b43e4){const _0xf928f0=Math[_0x3d9cc6(0x602)]((this[_0x3d9cc6(0x2c5)]['expiresAt']-Date[_0x3d9cc6(0x16a)]())/0x5265c00);this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4f7)]?.[_0x3d9cc6(0x27e)](_0x3d9cc6(0x5f6)+_0xf928f0+_0x3d9cc6(0x246),{'feature':_0x3d9cc6(0x58c),'licensee':this[_0x3d9cc6(0x2c5)]['licensee'],'expiresAt':new Date(this[_0x3d9cc6(0x2c5)][_0x3d9cc6(0x63c)])[_0x3d9cc6(0x4c8)]()});}this[_0x3d9cc6(0x2c5)]&&this[_0x3d9cc6(0x2c5)][_0x3d9cc6(0x400)]===_0x43264b&&this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4f7)]?.[_0x3d9cc6(0x27e)](_0x3d9cc6(0x61b),{'feature':_0x3d9cc6(0x58c),'licensee':this['_active'][_0x3d9cc6(0x56c)]});if(_0x1e4f16&&!this[_0x3d9cc6(0x2c5)]){this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4f7)]?.[_0x3d9cc6(0x27e)](_0x3d9cc6(0x670),{'feature':_0x3d9cc6(0x58c)}),this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4e5)]?.['emit'](_0x551069[_0x3d9cc6(0x3eb)],{'previous':_0x1e4f16});const _0x439c39=this['okdb']['options']?.[_0x3d9cc6(0x55b)]??_0x4e1b2f['LICENSE_EXPIRED_ACTION'];_0x439c39===_0x3d9cc6(0x2d9)&&(this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4f7)]?.[_0x3d9cc6(0x31b)](_0x3d9cc6(0x5eb),{'feature':_0x3d9cc6(0x58c)}),this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x241)]()[_0x3d9cc6(0x255)](()=>{})['finally'](()=>process[_0x3d9cc6(0x542)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x12dd99,'_C':_0x4e1b2f},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x4cdaa0=_0x4b361c;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x722dec=require$$0$2,_0x1f435f=require$$1$1,_0x1c9745=require$$0,_0x2addee=require$$1,_0x32c291=_0x2addee['join'](_0x1c9745[_0x4cdaa0(0x422)](),_0x4cdaa0(0x2b0)),_0x2536e3=0x3e8,_0x21ec5b={'reset':_0x4cdaa0(0x337),'bold':'\x1b[1m','dim':'\x1b[2m','red':_0x4cdaa0(0x5ae),'green':_0x4cdaa0(0x1c9),'yellow':_0x4cdaa0(0x185),'blue':_0x4cdaa0(0x242),'magenta':_0x4cdaa0(0x606),'cyan':'\x1b[36m','white':'\x1b[37m','gray':_0x4cdaa0(0x142)},_0x38ab9a=!process['stdout']['isTTY']||!!process.env.NO_COLOR,_0x2ad0ce=(_0x2464a7,_0xb53040)=>_0x38ab9a?_0xb53040:''+_0x2464a7+_0xb53040+_0x21ec5b[_0x4cdaa0(0x1c2)],_0x4f3a9b={'error':_0x21ec5b[_0x4cdaa0(0x4df)],'warn':_0x21ec5b['yellow'],'info':_0x21ec5b[_0x4cdaa0(0x1f9)],'debug':_0x21ec5b[_0x4cdaa0(0x145)]},_0x43e787={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x4c4864(_0x47cf56,_0x5190ee=_0x4cdaa0(0x3d7)){const _0x1f09d6=_0x4cdaa0,{level:_0x138f39,msg:_0x58fe47,meta:_0x2f542b,context:_0x443596,ts:_0x374779}=_0x47cf56;if((_0x43e787[_0x138f39]??0x1)<(_0x43e787[_0x5190ee]??0x1))return;const _0x12f1af=_0x2ad0ce(_0x21ec5b[_0x1f09d6(0x145)],new Date(_0x374779)['toISOString']()),_0x2c2e3b=_0x2ad0ce(_0x4f3a9b[_0x138f39]??_0x21ec5b[_0x1f09d6(0x540)],_0x138f39['padEnd'](0x5));let _0x49aa76='\x20\x20'+_0x12f1af+'\x20'+_0x2ad0ce(_0x21ec5b[_0x1f09d6(0x5e8)],_0x2c2e3b)+'\x20'+_0x58fe47;if(_0x2f542b&&Object[_0x1f09d6(0x2f1)](_0x2f542b)['length']>0x0){const _0x9299b=Object[_0x1f09d6(0x427)](_0x2f542b)['map'](([_0x1184bd,_0x24a78a])=>_0x1184bd+'='+_0x24a78a)['join']('\x20');_0x49aa76+=_0x2ad0ce(_0x21ec5b[_0x1f09d6(0x1bc)],_0x1f09d6(0x56e)+_0x9299b+']');}if(_0x443596!==undefined){const _0x3c7da8=typeof _0x443596===_0x1f09d6(0x20e)?JSON[_0x1f09d6(0x3d9)](_0x443596):String(_0x443596);_0x49aa76+=_0x2ad0ce(_0x21ec5b[_0x1f09d6(0x1bc)],'\x20\x20'+_0x3c7da8);}const _0x102c96=_0x138f39==='error'||_0x138f39===_0x1f09d6(0x27e)?process[_0x1f09d6(0x16f)][_0x1f09d6(0x4ae)][_0x1f09d6(0x42c)](process[_0x1f09d6(0x16f)]):process[_0x1f09d6(0x559)][_0x1f09d6(0x4ae)]['bind'](process[_0x1f09d6(0x559)]);_0x102c96(_0x49aa76+'\x0a');}function _0x17e613(_0x488e8a,_0x122b5b){const _0x3dd784=_0x4cdaa0;if(_0x488e8a===0xcc||_0x488e8a>=0xc8&&_0x488e8a<0x12c&&!_0x122b5b){console['log']('\x0a\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x3dd784(0x22b)],'✓')+'\x0a');return;}if(_0x488e8a>=0x190||_0x122b5b?.[_0x3dd784(0x31b)]){const _0x49bcc9=_0x122b5b?.[_0x3dd784(0x31b)]??_0x122b5b?.['message']??_0x3dd784(0x356)+_0x488e8a;console['log'](_0x3dd784(0x675)+_0x2ad0ce(_0x21ec5b[_0x3dd784(0x4df)],'✗')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x3dd784(0x5e8)]+_0x21ec5b[_0x3dd784(0x4df)],String(_0x488e8a))+'\x20\x20'+_0x49bcc9+'\x0a');return;}const _0x5137f0=Object[_0x3dd784(0x258)][_0x3dd784(0x51a)]['call'](_0x122b5b??{},_0x3dd784(0x657))?_0x122b5b[_0x3dd784(0x657)]:_0x122b5b,_0xdcdc8e=_0x122b5b?.['meta'];console[_0x3dd784(0x4f7)](''),_0x58e442(_0x5137f0,'\x20\x20');if(_0xdcdc8e?.['count']!=null||_0xdcdc8e?.[_0x3dd784(0x209)]!=null){const _0x6a9ba9=[];if(_0xdcdc8e[_0x3dd784(0x5ec)]!=null)_0x6a9ba9['push'](_0xdcdc8e[_0x3dd784(0x5ec)]+'\x20result'+(_0xdcdc8e[_0x3dd784(0x5ec)]!==0x1?'s':''));if(_0xdcdc8e['time']!=null)_0x6a9ba9[_0x3dd784(0x614)](_0xdcdc8e[_0x3dd784(0x209)]+'ms');console[_0x3dd784(0x4f7)]('\x0a\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x3dd784(0x1bc)],_0x6a9ba9['join'](_0x3dd784(0x637))));}console[_0x3dd784(0x4f7)]('');}function _0x58e442(_0x3f2f93,_0x24863e=''){const _0x73dfb6=_0x4cdaa0;if(_0x3f2f93===null||_0x3f2f93===undefined){console[_0x73dfb6(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b['dim'],_0x73dfb6(0x35b)));return;}if(Array[_0x73dfb6(0x579)](_0x3f2f93)){if(_0x3f2f93[_0x73dfb6(0x2eb)]===0x0){console['log'](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x1bc)],'(empty)'));return;}if(_0x3f2f93[_0x73dfb6(0x171)](_0x3a51e3=>_0x3a51e3&&typeof _0x3a51e3===_0x73dfb6(0x20e)&&_0x73dfb6(0x174)in _0x3a51e3&&_0x73dfb6(0x392)in _0x3a51e3)){_0x485521(_0x3f2f93,_0x24863e);return;}if(_0x3f2f93[_0x73dfb6(0x171)](_0x58d8fe=>_0x58d8fe&&typeof _0x58d8fe===_0x73dfb6(0x20e)&&_0x73dfb6(0x49b)in _0x58d8fe&&_0x73dfb6(0x5ec)in _0x58d8fe)){_0x3edbf0(_0x3f2f93,_0x24863e);return;}if(_0x3f2f93[_0x73dfb6(0x171)](_0x2a41d5=>typeof _0x2a41d5!==_0x73dfb6(0x20e)||_0x2a41d5===null)){_0x3f2f93[_0x73dfb6(0x612)]((_0x1311d3,_0x444354)=>console['log'](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x145)],_0x444354+0x1+'.')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x540)],String(_0x1311d3))));return;}_0x3f2f93[_0x73dfb6(0x612)]((_0x45908d,_0x2bee75)=>{const _0x58761c=_0x73dfb6;console[_0x58761c(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x58761c(0x1bc)],'['+_0x2bee75+']'));if(typeof _0x45908d===_0x58761c(0x20e)&&_0x45908d!==null)_0xd22dc3(_0x45908d,_0x24863e+'\x20\x20');else console[_0x58761c(0x4f7)](_0x24863e+'\x20\x20'+String(_0x45908d));});return;}if(typeof _0x3f2f93===_0x73dfb6(0x20e)){if('key'in _0x3f2f93&&'value'in _0x3f2f93&&Object[_0x73dfb6(0x2f1)](_0x3f2f93)['length']<=0x3){console[_0x73dfb6(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x5e8)]+_0x21ec5b[_0x73dfb6(0x1f9)],String(_0x3f2f93[_0x73dfb6(0x174)])));const _0x3c3e2b=_0x3f2f93[_0x73dfb6(0x392)];if(_0x3c3e2b&&typeof _0x3c3e2b==='object')_0xd22dc3(_0x3c3e2b,_0x24863e);else console[_0x73dfb6(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x540)],String(_0x3c3e2b)));return;}_0xd22dc3(_0x3f2f93,_0x24863e);return;}console[_0x73dfb6(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x540)],String(_0x3f2f93)));}function _0xd22dc3(_0x37c2d5,_0x5587db=''){const _0x31722d=_0x4cdaa0,_0x493b7c=Object[_0x31722d(0x427)](_0x37c2d5);if(_0x493b7c[_0x31722d(0x2eb)]===0x0){console['log'](_0x5587db+_0x2ad0ce(_0x21ec5b['dim'],'{}'));return;}const _0x338c56=Math[_0x31722d(0x138)](0x1c,Math['max'](..._0x493b7c['map'](([_0x520f97])=>_0x520f97['length'])));for(const [_0x53be3a,_0x13ce78]of _0x493b7c){const _0x1ab362=_0x2ad0ce(_0x21ec5b[_0x31722d(0x1f9)],_0x53be3a[_0x31722d(0x2c9)](_0x338c56));if(_0x13ce78===null||_0x13ce78===undefined)console['log'](_0x5587db+_0x1ab362+'\x20\x20'+_0x2ad0ce(_0x21ec5b['dim'],_0x31722d(0x2e8)));else{if(typeof _0x13ce78===_0x31722d(0x20e)){const _0x26db24=JSON[_0x31722d(0x3d9)](_0x13ce78);_0x26db24[_0x31722d(0x2eb)]<=0x50?console[_0x31722d(0x4f7)](_0x5587db+_0x1ab362+'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x31722d(0x1bc)],_0x26db24)):(console[_0x31722d(0x4f7)](_0x5587db+_0x1ab362),_0x58e442(_0x13ce78,_0x5587db+'\x20\x20'));}else{const _0x166d60=typeof _0x13ce78===_0x31722d(0x455)?_0x2ad0ce(_0x13ce78?_0x21ec5b['green']:_0x21ec5b[_0x31722d(0x577)],String(_0x13ce78)):typeof _0x13ce78===_0x31722d(0x17c)?_0x2ad0ce(_0x21ec5b[_0x31722d(0x5a0)],String(_0x13ce78)):_0x2ad0ce(_0x21ec5b[_0x31722d(0x540)],String(_0x13ce78));console['log'](_0x5587db+_0x1ab362+'\x20\x20'+_0x166d60);}}}}function _0x485521(_0x1c1275,_0x3a0591=''){const _0x45d9b9=_0x4cdaa0,_0x29fe48=Math[_0x45d9b9(0x138)](0x20,Math[_0x45d9b9(0x47e)](..._0x1c1275[_0x45d9b9(0x601)](_0x11bb54=>String(_0x11bb54[_0x45d9b9(0x174)])[_0x45d9b9(0x2eb)])));for(const {key:_0x363eb7,value:_0x4916eb,score:_0x4b692d,clock:_0x47633e}of _0x1c1275){const _0x17c98d=_0x2ad0ce(_0x21ec5b['bold']+_0x21ec5b[_0x45d9b9(0x1f9)],String(_0x363eb7)['padEnd'](_0x29fe48)),_0x3a35e4=_0x4916eb==null?_0x2ad0ce(_0x21ec5b['dim'],_0x45d9b9(0x2e8)):typeof _0x4916eb===_0x45d9b9(0x20e)?_0x2ad0ce(_0x21ec5b[_0x45d9b9(0x1bc)],JSON[_0x45d9b9(0x3d9)](_0x4916eb)):_0x2ad0ce(_0x21ec5b['white'],String(_0x4916eb)),_0x2d1f87=_0x4b692d!=null?_0x2ad0ce(_0x21ec5b['gray'],_0x45d9b9(0x1f1)+_0x4b692d[_0x45d9b9(0x4a8)](0x4)):'',_0x233f6f=_0x47633e!=null?_0x2ad0ce(_0x21ec5b[_0x45d9b9(0x145)],_0x45d9b9(0x514)+_0x47633e):'';console['log'](_0x3a0591+_0x17c98d+'\x20\x20'+_0x3a35e4+_0x2d1f87+_0x233f6f);}}function _0x3edbf0(_0x16e3db,_0x112d4a=''){const _0x2f0ecd=_0x4cdaa0,_0x2672fa=Math[_0x2f0ecd(0x138)](0x20,Math[_0x2f0ecd(0x47e)](..._0x16e3db['map'](_0x478665=>_0x478665['type'][_0x2f0ecd(0x2eb)])));for(const {type:_0x1bee9c,count:_0x46443f,fields:_0x56e59e}of _0x16e3db){if(_0x1bee9c[_0x2f0ecd(0x3cc)]('~'))continue;const _0xf4a77c=_0x2ad0ce(_0x21ec5b['bold']+_0x21ec5b['cyan'],_0x1bee9c[_0x2f0ecd(0x2c9)](_0x2672fa)),_0x2a25e9=_0x2ad0ce(_0x21ec5b[_0x2f0ecd(0x5a0)],String(_0x46443f)[_0x2f0ecd(0x24d)](0x6))+_0x2ad0ce(_0x21ec5b[_0x2f0ecd(0x1bc)],_0x2f0ecd(0xfa)),_0x59dd5d=_0x56e59e&&Object['keys'](_0x56e59e)[_0x2f0ecd(0x2eb)]?_0x2ad0ce(_0x21ec5b[_0x2f0ecd(0x1bc)],_0x2f0ecd(0x1db)+Object['keys'](_0x56e59e)[_0x2f0ecd(0x45e)](0x0,0x6)[_0x2f0ecd(0x3a4)](',\x20')+(Object[_0x2f0ecd(0x2f1)](_0x56e59e)['length']>0x6?'…':'')):'';console[_0x2f0ecd(0x4f7)](_0x112d4a+_0xf4a77c+'\x20\x20'+_0x2a25e9+_0x59dd5d);}}const _0x19fec0=[_0x4cdaa0(0x161),_0x4cdaa0(0x4bf),_0x4cdaa0(0x28a),'files/','transaction',_0x4cdaa0(0x54b)];function _0x121b52(_0x25e6ff,_0x157e94){const _0x599f81=_0x4cdaa0;if(_0x25e6ff[_0x599f81(0x3cc)](_0x599f81(0x3b1)))return _0x25e6ff;if(_0x25e6ff['startsWith']('/'))return _0x599f81(0x253)+_0x25e6ff;if(_0x25e6ff[_0x599f81(0x3cc)](_0x599f81(0x3d2)))return'/api/'+_0x25e6ff;const _0xdbecb8=_0x19fec0[_0x599f81(0x28c)](_0x325f5f=>_0x25e6ff===_0x325f5f[_0x599f81(0x38b)](/\/$/,'')||_0x25e6ff['startsWith'](_0x325f5f));return _0xdbecb8?_0x599f81(0x1be)+_0x157e94+'/'+_0x25e6ff:_0x599f81(0x3b1)+_0x25e6ff;}function _0x4454a8(_0x3ea845){const _0x231f42=_0x4cdaa0,_0x5773db={},_0x1f150b=[];let _0x93f7fe=0x0;while(_0x93f7fe<_0x3ea845[_0x231f42(0x2eb)]){if((_0x3ea845[_0x93f7fe]===_0x231f42(0x3c4)||_0x3ea845[_0x93f7fe]==='-e')&&_0x3ea845[_0x93f7fe+0x1]&&!_0x3ea845[_0x93f7fe+0x1][_0x231f42(0x3cc)]('-'))_0x5773db[_0x231f42(0x46e)]=_0x3ea845[++_0x93f7fe];else _0x3ea845[_0x93f7fe]===_0x231f42(0x44b)||_0x3ea845[_0x93f7fe]==='-h'?_0x5773db['help']=!![]:_0x1f150b[_0x231f42(0x614)](_0x3ea845[_0x93f7fe]);_0x93f7fe++;}return{'flags':_0x5773db,'rest':_0x1f150b};}const _0x7b0183={'system':_0x4cdaa0(0x569),'envs':_0x4cdaa0(0x4d3),'types':_0x4cdaa0(0x2f6),'data':_0x4cdaa0(0x172),'indexes':'Indexes','fts':_0x4cdaa0(0x474),'sync':_0x4cdaa0(0x1b6),'queue':_0x4cdaa0(0x2ac),'files':_0x4cdaa0(0x177),'embeddings':'Embeddings','engines':'Engines','admin':_0x4cdaa0(0x570),'event':_0x4cdaa0(0x1f4),'processor':'Processors'},_0x1776aa=[_0x4cdaa0(0x268),_0x4cdaa0(0xec),_0x4cdaa0(0x161),_0x4cdaa0(0x206),'indexes',_0x4cdaa0(0x458),'sync','queue',_0x4cdaa0(0x150),'embeddings',_0x4cdaa0(0x238),_0x4cdaa0(0x27f)];function _0x40a1f5(_0x44adee){const _0x49808a=_0x4cdaa0;return _0x44adee[_0x49808a(0x38b)](/^\/api/,'')[_0x49808a(0x38b)](/^\[\/env\/:env=[^\]]*\]/,_0x49808a(0x11c))[_0x49808a(0x38b)](/^\/env\/:env/,'env/:env')[_0x49808a(0x38b)](/^\//,'');}function _0x192571(_0x56e948,_0x56b328=''){const _0x508034=_0x4cdaa0,_0x55df9f=_0x56e948[_0x508034(0x5d0)][_0x508034(0x33c)]()[_0x508034(0x1c6)](_0x496f6b=>!_0x496f6b[_0x508034(0x664)]?.['hidden']),_0x313e9a=_0x56b328?_0x55df9f[_0x508034(0x1c6)](_0xa2f633=>_0xa2f633[_0x508034(0x42d)][_0x508034(0x3f1)]()['includes'](_0x56b328[_0x508034(0x3f1)]())||(_0x196b8a(_0xa2f633)??'')[_0x508034(0x3f1)]()[_0x508034(0x5c0)](_0x56b328[_0x508034(0x3f1)]())||_0x212050(_0xa2f633)['some'](_0x34f643=>_0x34f643[_0x508034(0x3f1)]()[_0x508034(0x5c0)](_0x56b328['toLowerCase']()))):_0x55df9f;if(!_0x313e9a[_0x508034(0x2eb)]){console['log'](_0x2ad0ce(_0x21ec5b[_0x508034(0x577)],_0x508034(0x430)+_0x56b328+'\x22\x0a'));return;}const _0x4574ff=new Map();for(const _0x25cf5e of _0x313e9a){const _0x5950ff=_0x212050(_0x25cf5e)[0x0]??_0x508034(0x1c7);if(!_0x4574ff[_0x508034(0x39f)](_0x5950ff))_0x4574ff[_0x508034(0x2c2)](_0x5950ff,[]);_0x4574ff[_0x508034(0x3aa)](_0x5950ff)[_0x508034(0x614)](_0x25cf5e);}const _0x2e0a60=[..._0x1776aa[_0x508034(0x1c6)](_0x3a710c=>_0x4574ff[_0x508034(0x39f)](_0x3a710c)),...[..._0x4574ff[_0x508034(0x2f1)]()][_0x508034(0x1c6)](_0x237a2c=>!_0x1776aa[_0x508034(0x5c0)](_0x237a2c))];console[_0x508034(0x4f7)]('');for(const _0x3e9b52 of _0x2e0a60){const _0x3b993c=_0x4574ff[_0x508034(0x3aa)](_0x3e9b52);if(!_0x3b993c?.[_0x508034(0x2eb)])continue;console[_0x508034(0x4f7)](_0x2ad0ce(_0x21ec5b[_0x508034(0x5e8)],'\x20\x20'+(_0x7b0183[_0x3e9b52]??_0x3e9b52)));for(const _0x510c05 of _0x3b993c){const _0x2fa994=_0x2ad0ce(_0x21ec5b[_0x508034(0x5a0)],_0x510c05[_0x508034(0x527)][_0x508034(0x2c9)](0x7)),_0x47ca4e=_0x2ad0ce(_0x21ec5b[_0x508034(0x1f9)],_0x40a1f5(_0x510c05[_0x508034(0x42d)])),_0x53f8c6=_0x196b8a(_0x510c05)?_0x2ad0ce(_0x21ec5b[_0x508034(0x1bc)],'\x20\x20'+_0x196b8a(_0x510c05)):'',_0x46d2b8=_0x510c05[_0x508034(0x3d5)]?.['id']?_0x2ad0ce(_0x21ec5b[_0x508034(0x145)],'\x20\x20['+_0x510c05[_0x508034(0x3d5)]['id']+']'):'';console[_0x508034(0x4f7)](_0x508034(0x3cf)+_0x2fa994+'\x20'+_0x47ca4e+_0x53f8c6+_0x46d2b8);}console[_0x508034(0x4f7)]('');}}function _0x7df7db(_0x272928,_0x2f2c3d){const _0x290216=_0x4cdaa0,_0xe69ab2=_0x2f2c3d[_0x290216(0x38b)](/^\/api(\/env\/[^/]+)?\//,'')[_0x290216(0x37c)]('/')[0x0],_0x471867=_0x272928[_0x290216(0x5d0)][_0x290216(0x33c)]()[_0x290216(0x1c6)](_0x53d713=>_0x53d713[_0x290216(0x42d)][_0x290216(0x3f1)]()[_0x290216(0x5c0)](_0xe69ab2['toLowerCase']()));if(!_0x471867['length']){console['log'](_0x2ad0ce(_0x21ec5b['yellow'],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x2f2c3d+'\x0a'));return;}console[_0x290216(0x4f7)]('');for(const _0xe31fc5 of _0x471867['slice'](0x0,0xc)){for(const _0x5bf1c2 of _0x5e930(_0xe31fc5)){console['log'](_0x5bf1c2);}console[_0x290216(0x4f7)]('');}}function _0x196b8a(_0xf143b){const _0x3659bc=_0x4cdaa0;return _0xf143b['operation']?.[_0x3659bc(0x319)]??_0xf143b[_0x3659bc(0x664)]?.[_0x3659bc(0x319)]??'';}function _0xd347e5(_0x409b0d){const _0x35836b=_0x4cdaa0;return _0x409b0d[_0x35836b(0x3d5)]?.[_0x35836b(0x413)]??_0x409b0d['meta']?.['description']??'';}function _0x212050(_0x5184b9){const _0x572338=_0x4cdaa0;return _0x5184b9[_0x572338(0x3d5)]?.[_0x572338(0x4b8)]?.[_0x572338(0x2eb)]?_0x5184b9['operation'][_0x572338(0x4b8)]:_0x5184b9[_0x572338(0x664)]?.[_0x572338(0x4b8)]??[];}function _0x5e930(_0x55aec5){const _0x1ca64e=_0x4cdaa0,_0x298d08=[];_0x298d08[_0x1ca64e(0x614)]('\x20\x20'+_0x2ad0ce(_0x21ec5b['bold']+_0x21ec5b['magenta'],_0x55aec5['method'][_0x1ca64e(0x2c9)](0x7))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x5e8)]+_0x21ec5b[_0x1ca64e(0x1f9)],_0x55aec5['path']));_0x55aec5['operation']?.['id']&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x145)],_0x1ca64e(0x589)+_0x55aec5['operation']['id']));_0x196b8a(_0x55aec5)&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b['white'],_0x196b8a(_0x55aec5)));_0xd347e5(_0x55aec5)&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x1bc)],_0xd347e5(_0x55aec5)));_0x212050(_0x55aec5)['length']&&_0x298d08['push'](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x145)],_0x1ca64e(0x2c7)+_0x212050(_0x55aec5)[_0x1ca64e(0x3a4)](',\x20')));_0x55aec5[_0x1ca64e(0x3d5)]?.['safety']?.[_0x1ca64e(0x35d)]&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b['gray'],_0x1ca64e(0x29f)+_0x55aec5['operation'][_0x1ca64e(0x267)][_0x1ca64e(0x35d)]));_0x55aec5[_0x1ca64e(0x3d5)]?.[_0x1ca64e(0x5d0)]?.[_0x1ca64e(0x109)]&&_0x55aec5[_0x1ca64e(0x3d5)][_0x1ca64e(0x5d0)][_0x1ca64e(0x109)]!==_0x1ca64e(0x523)&&_0x298d08['push'](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x145)],_0x1ca64e(0x5fc)+_0x55aec5[_0x1ca64e(0x3d5)][_0x1ca64e(0x5d0)][_0x1ca64e(0x109)]));if(_0x55aec5[_0x1ca64e(0x3d5)]?.[_0x1ca64e(0xe0)]){const _0x26a4d3=Object[_0x1ca64e(0x2f1)](_0x55aec5['operation'][_0x1ca64e(0xe0)][_0x1ca64e(0x448)]||{});if(_0x26a4d3[_0x1ca64e(0x2eb)])_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b['gray'],'input:\x20'+_0x26a4d3[_0x1ca64e(0x3a4)](',\x20')));}return _0x55aec5[_0x1ca64e(0x664)]?.['body']&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x145)],_0x1ca64e(0x563)+JSON['stringify'](_0x55aec5[_0x1ca64e(0x664)]['body']))),_0x298d08;}async function _0x21c433(_0x4abbbe,_0x4097b1,_0x136b6b,_0x4f1342=null){const _0x570fa8=_0x4cdaa0,_0x2a0377=_0x136b6b[_0x570fa8(0x42b)]('?'),_0x1d6b01=_0x2a0377>=0x0?_0x136b6b[_0x570fa8(0x45e)](0x0,_0x2a0377):_0x136b6b,_0x52d314=_0x2a0377>=0x0?_0x136b6b[_0x570fa8(0x45e)](_0x2a0377+0x1):'',_0x5dca7c=Object[_0x570fa8(0x3e5)](new URLSearchParams(_0x52d314)[_0x570fa8(0x427)]());return _0x4abbbe['http'][_0x570fa8(0x4f3)](_0x4097b1,_0x1d6b01,{'body':_0x4f1342,'query':_0x5dca7c,'headers':{'content-type':_0x570fa8(0x509)}},{'internal':!![]});}function _0x198e98(_0x35b6bb){const _0x50030b=_0x4cdaa0;if(!_0x35b6bb)return null;const _0x38e7e5=_0x35b6bb[_0x50030b(0x486)]();if(!_0x38e7e5)return null;try{return JSON[_0x50030b(0x34f)](_0x38e7e5);}catch{}try{return JSON[_0x50030b(0x34f)](_0x42ddea(_0x38e7e5));}catch(_0x556864){throw new SyntaxError(_0x556864[_0x50030b(0x29c)],{'cause':_0x556864});}}function _0x42ddea(_0xf6cd99){const _0x3ee4b2=_0x4cdaa0;let _0x88f26a='',_0x3a2bba=0x0;while(_0x3a2bba<_0xf6cd99[_0x3ee4b2(0x2eb)]){const _0x25bd51=_0xf6cd99[_0x3a2bba];if(_0x25bd51==='\x22'){_0x88f26a+='\x22',_0x3a2bba++;while(_0x3a2bba<_0xf6cd99[_0x3ee4b2(0x2eb)]&&_0xf6cd99[_0x3a2bba]!=='\x22'){if(_0xf6cd99[_0x3a2bba]==='\x5c'){_0x88f26a+=_0xf6cd99[_0x3a2bba++];if(_0x3a2bba<_0xf6cd99[_0x3ee4b2(0x2eb)])_0x88f26a+=_0xf6cd99[_0x3a2bba++];}else _0x88f26a+=_0xf6cd99[_0x3a2bba++];}_0x88f26a+='\x22';if(_0x3a2bba<_0xf6cd99['length'])_0x3a2bba++;continue;}if(_0x25bd51==='\x27'){_0x88f26a+='\x22',_0x3a2bba++;while(_0x3a2bba<_0xf6cd99[_0x3ee4b2(0x2eb)]&&_0xf6cd99[_0x3a2bba]!=='\x27'){if(_0xf6cd99[_0x3a2bba]==='\x5c'&&_0xf6cd99[_0x3a2bba+0x1]==='\x27')_0x88f26a+='\x27',_0x3a2bba+=0x2;else _0xf6cd99[_0x3a2bba]==='\x22'?(_0x88f26a+='\x5c\x22',_0x3a2bba++):_0x88f26a+=_0xf6cd99[_0x3a2bba++];}_0x88f26a+='\x22';if(_0x3a2bba<_0xf6cd99['length'])_0x3a2bba++;continue;}if(_0x3ee4b2(0x305)[_0x3ee4b2(0x5c0)](_0x25bd51)){_0x88f26a+=_0x25bd51,_0x3a2bba++;continue;}let _0x4726d1='';while(_0x3a2bba<_0xf6cd99['length']&&!'{}[]:,\x27\x22'[_0x3ee4b2(0x5c0)](_0xf6cd99[_0x3a2bba])&&_0xf6cd99[_0x3a2bba]!=='\x20'&&_0xf6cd99[_0x3a2bba]!=='\x09'&&_0xf6cd99[_0x3a2bba]!=='\x0a'&&_0xf6cd99[_0x3a2bba]!=='\x0d'){_0x4726d1+=_0xf6cd99[_0x3a2bba++];}let _0x4af9d0=_0x3a2bba;while(_0x4af9d0<_0xf6cd99[_0x3ee4b2(0x2eb)]&&(_0xf6cd99[_0x4af9d0]==='\x20'||_0xf6cd99[_0x4af9d0]==='\x09'))_0x4af9d0++;if(_0xf6cd99[_0x4af9d0]===':')_0x88f26a+='\x22'+_0x4726d1+'\x22';else _0x4726d1===_0x3ee4b2(0x5e1)||_0x4726d1===_0x3ee4b2(0x38c)||_0x4726d1==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x3ee4b2(0x30d)](_0x4726d1)?_0x88f26a+=_0x4726d1:_0x88f26a+='\x22'+_0x4726d1+'\x22';}return _0x88f26a[_0x3ee4b2(0x38b)](/,(\s*[}\]])/g,'$1');}function _0x3c36dc(_0x2b7e7f){const _0x54e17a=_0x4cdaa0,_0x454451=[];let _0x370a7c=0x0;while(_0x370a7c<_0x2b7e7f['length']){while(_0x370a7c<_0x2b7e7f['length']&&(_0x2b7e7f[_0x370a7c]==='\x20'||_0x2b7e7f[_0x370a7c]==='\x09'))_0x370a7c++;if(_0x370a7c>=_0x2b7e7f[_0x54e17a(0x2eb)])break;const _0x56e6cf=_0x2b7e7f[_0x370a7c];if(_0x56e6cf==='{'||_0x56e6cf==='['){const _0x2385f0=_0x56e6cf==='{'?'}':']',_0x5adcab=_0x370a7c++;let _0x413481=0x1,_0x4f4570=![],_0x38702d='';while(_0x370a7c<_0x2b7e7f[_0x54e17a(0x2eb)]&&_0x413481>0x0){const _0x21f11a=_0x2b7e7f[_0x370a7c];if(_0x4f4570){if(_0x21f11a==='\x5c')_0x370a7c++;else{if(_0x21f11a===_0x38702d)_0x4f4570=![];}}else{if(_0x21f11a==='\x22'||_0x21f11a==='\x27')_0x4f4570=!![],_0x38702d=_0x21f11a;else{if(_0x21f11a===_0x56e6cf)_0x413481++;else{if(_0x21f11a===_0x2385f0)_0x413481--;}}}_0x370a7c++;}_0x454451[_0x54e17a(0x614)](_0x2b7e7f[_0x54e17a(0x45e)](_0x5adcab,_0x370a7c));continue;}if(_0x56e6cf==='\x22'||_0x56e6cf==='\x27'){const _0x18800e=_0x56e6cf;_0x370a7c++;let _0x1d8753='';while(_0x370a7c<_0x2b7e7f['length']&&_0x2b7e7f[_0x370a7c]!==_0x18800e){if(_0x2b7e7f[_0x370a7c]==='\x5c'&&_0x370a7c+0x1<_0x2b7e7f[_0x54e17a(0x2eb)])_0x370a7c++,_0x1d8753+=_0x2b7e7f[_0x370a7c++];else _0x1d8753+=_0x2b7e7f[_0x370a7c++];}if(_0x370a7c<_0x2b7e7f[_0x54e17a(0x2eb)])_0x370a7c++;_0x454451[_0x54e17a(0x614)](_0x1d8753);continue;}let _0x218d99='';while(_0x370a7c<_0x2b7e7f[_0x54e17a(0x2eb)]&&_0x2b7e7f[_0x370a7c]!=='\x20'&&_0x2b7e7f[_0x370a7c]!=='\x09'&&_0x2b7e7f[_0x370a7c]!=='{'&&_0x2b7e7f[_0x370a7c]!=='['){_0x218d99+=_0x2b7e7f[_0x370a7c++];}if(_0x218d99)_0x454451[_0x54e17a(0x614)](_0x218d99);}return _0x454451;}function _0x62d3fc(_0x3f84fe,_0x263393){const _0x2f9c8d=_0x4cdaa0,_0x1baafc=[..._0x3f84fe[_0x2f9c8d(0x5bd)][_0x2f9c8d(0x2f1)]()][_0x2f9c8d(0x1c6)](_0x5e6307=>!_0x5e6307['startsWith']('~'));console[_0x2f9c8d(0x4f7)](['',_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)]+_0x21ec5b['cyan'],_0x2f9c8d(0x410)),_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)]+_0x21ec5b[_0x2f9c8d(0x1f9)],_0x2f9c8d(0x3e3))+_0x2ad0ce(_0x21ec5b['bold'],_0x2f9c8d(0x3f6))+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)]+_0x21ec5b[_0x2f9c8d(0x1f9)],'║'),_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)]+_0x21ec5b[_0x2f9c8d(0x1f9)],_0x2f9c8d(0x485)),'','\x20\x20'+_0x2ad0ce(_0x21ec5b['green'],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0x34b))+'\x20\x20http://localhost:'+_0x263393[_0x2f9c8d(0x26f)],..._0x263393[_0x2f9c8d(0x52c)]>0x1?['\x20\x20'+_0x2ad0ce(_0x21ec5b['green'],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0xfe))+'\x20'+_0x263393[_0x2f9c8d(0x52c)]+'\x20HTTP\x20workers\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x145)],_0x2f9c8d(0x15d))]:[],'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x22b)],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],'api')+'\x20\x20\x20\x20\x20http://localhost:'+_0x263393[_0x2f9c8d(0x26f)]+_0x2f9c8d(0x253),'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x22b)],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b['bold'],_0x2f9c8d(0x42d))+_0x2f9c8d(0x3cf)+_0x263393[_0x2f9c8d(0x64c)],'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x22b)],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],'id')+'\x20\x20\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x145)],_0x3f84fe['id']),'\x20\x20'+_0x2ad0ce(_0x21ec5b['green'],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0xec))+'\x20\x20\x20\x20'+_0x1baafc[_0x2f9c8d(0x601)](_0x29f878=>_0x2ad0ce(_0x21ec5b['cyan'],_0x29f878))[_0x2f9c8d(0x3a4)]('\x20\x20'),..._0x263393[_0x2f9c8d(0x673)]?[]:['\x20\x20'+_0x2ad0ce(_0x21ec5b['green'],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],'admin')+'\x20\x20\x20http://localhost:'+_0x263393[_0x2f9c8d(0x26f)]+_0x2f9c8d(0x61f)],'',_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x1bc)],'\x20\x20Type\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0x2e2))+'\x20for\x20commands,\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0x5d7))+_0x2f9c8d(0x24e)+_0x2ad0ce(_0x21ec5b['bold'],_0x2f9c8d(0x542))+_0x2f9c8d(0x3cd)),''][_0x2f9c8d(0x3a4)]('\x0a'));}function _0x4d9898(_0x2b2b54){const _0x5f555a=_0x4cdaa0;console[_0x5f555a(0x4f7)]('\x0a'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x5e8)],_0x5f555a(0x58b))+'\x20\x20'+_0x2ad0ce(_0x21ec5b['dim'],_0x5f555a(0x11b))+_0x5f555a(0x314)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x3ee))+_0x5f555a(0x4b1)+_0x2ad0ce(_0x21ec5b['cyan'],_0x5f555a(0x3ee))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x577)],_0x5f555a(0x3fd))+_0x5f555a(0x454)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x51e))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],'<path>')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x577)],'[body]')+_0x5f555a(0x4bc)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],_0x5f555a(0x20b))+_0x5f555a(0x5c7)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0x3d7))+'\x20\x20\x20\x20\x20\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'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0xec))+'\x20\x20\x20\x20\x20\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'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0x161))+_0x5f555a(0x250)+_0x2b2b54[_0x5f555a(0x46e)]+_0x5f555a(0x564)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'type/users')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x2b2b54['env']+_0x5f555a(0x3b5)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'type/users/item/alice')+_0x5f555a(0x239)+_0x2b2b54[_0x5f555a(0x46e)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'type/users/query\x20{\x22active\x22:true}')+'\x20→\x20POST\x20/api/env/'+_0x2b2b54['env']+'/type/users/query\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0x5b5))+_0x5f555a(0x5c7)+_0x2ad0ce(_0x21ec5b['gray'],_0x5f555a(0x5b0))+'\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'env/staging/info')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a'+_0x2ad0ce(_0x21ec5b['bold'],_0x5f555a(0x25f))+'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],'(on\x20any\x20path\x20command)')+_0x5f555a(0x314)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x603))+_0x5f555a(0x51f)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],'--help')+_0x5f555a(0x554)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],_0x5f555a(0x20b))+'\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'types\x20--env\x20staging')+'\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0x663))+_0x5f555a(0x5c7)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'type/users\x20--help')+'\x0a\x0a'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x5e8)],_0x5f555a(0x5c3))+_0x5f555a(0x314)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x616))+_0x5f555a(0x1d5)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x46e))+_0x5f555a(0x181)+_0x2ad0ce(_0x21ec5b['cyan'],'routes')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],'[filter]')+_0x5f555a(0x210)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x4dd))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],'[on|off|level]')+_0x5f555a(0x1ae)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x18d))+'\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'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x2e2))+_0x5f555a(0xf9)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x542))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],'/\x20quit\x20/\x20Ctrl+C')+_0x5f555a(0x512));}let _0x1d6d38=![];async function _0x5e9f7e(_0x452ead,_0x22e5f0=0x0,_0x28f24d=null){const _0x1304cf=_0x4cdaa0;_0x1d6d38&&(process[_0x1304cf(0x16f)][_0x1304cf(0x4ae)](_0x2ad0ce(_0x21ec5b['red'],_0x1304cf(0x31c))),process[_0x1304cf(0x542)](0x82));_0x1d6d38=!![],process[_0x1304cf(0x559)][_0x1304cf(0x4ae)]('\x0a'),process['stderr']['write'](_0x2ad0ce(_0x21ec5b['yellow'],_0x1304cf(0x14a)+(_0x28f24d?_0x1304cf(0x3bc)+_0x28f24d+',\x20':'')+'shutting\x20down…\x0a'));const _0x5142ec=setTimeout(()=>{const _0xe3fbe4=_0x1304cf;process[_0xe3fbe4(0x16f)][_0xe3fbe4(0x4ae)](_0x2ad0ce(_0x21ec5b[_0xe3fbe4(0x4df)],_0xe3fbe4(0x192))),process[_0xe3fbe4(0x542)](0x1);},0x1388);try{await _0x452ead['close']();}catch(_0x2b69e2){console[_0x1304cf(0x31b)](_0x2ad0ce(_0x21ec5b['red'],'\x20\x20'+_0x2b69e2['message']));}clearTimeout(_0x5142ec),process[_0x1304cf(0x16f)]['write'](_0x2ad0ce(_0x21ec5b[_0x1304cf(0x1bc)],_0x1304cf(0x4cd))),process[_0x1304cf(0x542)](_0x22e5f0);}function _0x5976b2(_0x2cd0d0){const _0x10c3fb=_0x4cdaa0,_0x3ddd29=_0x2cd0d0[_0x10c3fb(0x46e)]!==_0x10c3fb(0x1e4)?_0x2ad0ce(_0x21ec5b[_0x10c3fb(0x577)],'['+_0x2cd0d0[_0x10c3fb(0x46e)]+']'):'';return _0x2ad0ce(_0x21ec5b[_0x10c3fb(0x5e8)]+_0x21ec5b[_0x10c3fb(0x1f9)],_0x10c3fb(0x2d3))+_0x3ddd29+_0x2ad0ce(_0x21ec5b[_0x10c3fb(0x145)],'>\x20');}const _0x53c4ad=new Set([_0x4cdaa0(0x58f),_0x4cdaa0(0x46a),_0x4cdaa0(0x48d),_0x4cdaa0(0x4ca),_0x4cdaa0(0x2b4)]);async function _0x1f8215(_0x3d395d,_0x514be6,_0x111adf,_0x49f561,_0xfcbcba,_0x1f0b56){const _0x40deef=_0x4cdaa0;_0x3d395d=_0x3d395d[_0x40deef(0x486)]();if(!_0x3d395d||_0x3d395d[_0x40deef(0x3cc)]('#'))return;const _0x3278d0=_0x3c36dc(_0x3d395d),{flags:_0x5dc510,rest:_0xb0d7e5}=_0x4454a8(_0x3278d0);if(!_0xb0d7e5['length'])return;const _0x393063=_0xb0d7e5[0x0],_0xa74ecb=_0x393063[_0x40deef(0x5ef)]();if(_0xa74ecb===_0x40deef(0x221)){if(_0xb0d7e5[0x1])_0x7df7db(_0x514be6,_0x121b52(_0xb0d7e5[0x1],_0x5dc510[_0x40deef(0x46e)]??_0xfcbcba[_0x40deef(0x46e)]));else _0x4d9898(_0xfcbcba);return;}if(_0xa74ecb===_0x40deef(0x5a4)){const _0x39d17b=_0xb0d7e5[0x1];if(!_0x39d17b){console[_0x40deef(0x4f7)](_0x2ad0ce(_0x21ec5b['red'],_0x40deef(0x3f9)));return;}try{_0x514be6[_0x40deef(0x46e)](_0x39d17b),_0xfcbcba[_0x40deef(0x46e)]=_0x39d17b,_0x1f0b56?.['setPrompt'](_0x5976b2(_0xfcbcba)),console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x22b)],'✓')+_0x40deef(0x652)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)]+_0x21ec5b[_0x40deef(0x1f9)],_0x39d17b)+'\x0a');}catch{console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x4df)],'✗')+_0x40deef(0x587)+_0x2ad0ce(_0x21ec5b['bold'],_0x39d17b)+_0x40deef(0x595)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x40deef(0x421)));}return;}if(_0xa74ecb===_0x40deef(0x361)){const _0xccfd0c=[..._0x514be6[_0x40deef(0x5bd)]['keys']()][_0x40deef(0x1c6)](_0x55e3a1=>!_0x55e3a1['startsWith']('~'));console[_0x40deef(0x4f7)]('');for(const _0x474cbc of _0xccfd0c){const _0x562f98=_0x474cbc===_0xfcbcba[_0x40deef(0x46e)];console[_0x40deef(0x4f7)]('\x20\x20'+(_0x562f98?_0x2ad0ce(_0x21ec5b[_0x40deef(0x22b)],'●'):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],'○'))+'\x20\x20'+(_0x562f98?_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)]+_0x21ec5b[_0x40deef(0x1f9)],_0x474cbc):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x474cbc)));}console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x40deef(0x123))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1f9)],_0xfcbcba['env'])),console['log']('');return;}if(_0xa74ecb===_0x40deef(0x14e)){const _0x31c80e=[..._0x514be6['_envs'][_0x40deef(0x624)]()][_0x40deef(0x1c6)](_0x17ab5f=>!_0x17ab5f['name'][_0x40deef(0x3cc)]('~'));console[_0x40deef(0x4f7)]('');const _0x4cca3d=Math['max'](..._0x31c80e[_0x40deef(0x601)](_0x8092d7=>_0x8092d7['name'][_0x40deef(0x2eb)]));for(const _0x16f9c4 of _0x31c80e){const _0x4a46c1=_0x16f9c4['name']===_0xfcbcba[_0x40deef(0x46e)],_0x41553d=_0x4a46c1?_0x2ad0ce(_0x21ec5b['green'],'●'):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],'○'),_0x57587b=_0x4a46c1?_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)]+_0x21ec5b['cyan'],_0x16f9c4[_0x40deef(0x2cc)][_0x40deef(0x2c9)](_0x4cca3d)):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x16f9c4['name'][_0x40deef(0x2c9)](_0x4cca3d)),_0x5daa8f=[..._0x16f9c4[_0x40deef(0x632)][_0x40deef(0x2f1)]()]['filter'](_0x2fda21=>!_0x2fda21[_0x40deef(0x3cc)]('~')),_0x2370b6=_0x5daa8f[_0x40deef(0x2eb)]?_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x5daa8f[_0x40deef(0x45e)](0x0,0x5)[_0x40deef(0x3a4)](',\x20')+(_0x5daa8f[_0x40deef(0x2eb)]>0x5?_0x40deef(0x609)+(_0x5daa8f['length']-0x5)+_0x40deef(0x52d):'')):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x40deef(0x449));console['log']('\x20\x20'+_0x41553d+'\x20\x20'+_0x57587b+'\x20\x20'+_0x2370b6);}console[_0x40deef(0x4f7)]('');return;}if(_0xa74ecb===_0x40deef(0x37f)){const _0x5b47fd=_0x5dc510[_0x40deef(0x46e)]??_0xb0d7e5[0x1]??_0xfcbcba[_0x40deef(0x46e)];try{const _0x1f69e0=_0x514be6[_0x40deef(0x46e)](_0x5b47fd),_0x236404=[..._0x1f69e0[_0x40deef(0x632)][_0x40deef(0x2f1)]()][_0x40deef(0x1c6)](_0x38d648=>!_0x38d648[_0x40deef(0x3cc)]('~'))[_0x40deef(0x30f)]();console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x236404[_0x40deef(0x2eb)]+_0x40deef(0x4b9)+(_0x236404[_0x40deef(0x2eb)]!==0x1?'s':'')+_0x40deef(0x5b8)+_0x5b47fd));for(const _0x30c4f9 of _0x236404){const _0x3926ac=_0x1f69e0['typeSubDbs'][_0x40deef(0x3aa)](_0x30c4f9),_0x2ff6d0=_0x3926ac?.[_0x40deef(0x206)]?.[_0x40deef(0x16e)]?.()??0x0,_0x25cf5d=_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)]+_0x21ec5b[_0x40deef(0x1f9)],_0x30c4f9[_0x40deef(0x2c9)](0x1c));console['log'](_0x40deef(0x3cf)+_0x25cf5d+'\x20\x20'+_0x2ad0ce(_0x21ec5b['magenta'],String(_0x2ff6d0)[_0x40deef(0x24d)](0x6))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],'records'));}console['log']('');}catch(_0x1cd0f7){console['error'](_0x2ad0ce(_0x21ec5b[_0x40deef(0x4df)],_0x40deef(0x675)+_0x1cd0f7[_0x40deef(0x29c)]+'\x0a'));}return;}if(_0xa74ecb==='ROUTES'){_0x192571(_0x514be6,_0xb0d7e5[_0x40deef(0x45e)](0x1)[_0x40deef(0x3a4)]('\x20'));return;}if(_0xa74ecb===_0x40deef(0x140)){const _0x1a8bdc=(_0xb0d7e5[0x1]??'')[_0x40deef(0x3f1)]();if(!_0x1a8bdc||_0x1a8bdc==='on')_0x49f561[_0x40deef(0x26c)]=!![],_0x49f561[_0x40deef(0x294)]=_0x40deef(0x3d7),console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b['green'],'✓')+_0x40deef(0x3c2)+_0x2ad0ce(_0x21ec5b['dim'],_0x40deef(0x257))+'\x0a');else{if(_0x1a8bdc===_0x40deef(0x5d8))_0x49f561[_0x40deef(0x26c)]=![],console[_0x40deef(0x4f7)]('\x0a\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x40deef(0x577)],'○')+'\x20logs\x20off\x0a');else _0x43e787[_0x1a8bdc]!==undefined?(_0x49f561[_0x40deef(0x26c)]=!![],_0x49f561['level']=_0x1a8bdc,console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x22b)],'✓')+_0x40deef(0x496)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)],_0x1a8bdc)+'\x0a')):console[_0x40deef(0x31b)](_0x2ad0ce(_0x21ec5b['red'],_0x40deef(0x453)));}return;}if(_0xa74ecb===_0x40deef(0x557)||_0xa74ecb===_0x40deef(0x2c1)){await _0x5e9f7e(_0x514be6,0x0);return;}if(_0xa74ecb===_0x40deef(0x5dd)){const _0x578eed=_0x40deef(0x1ad)+_0x111adf[_0x40deef(0x26f)]+'/admin/index.html',_0x36f1df=process[_0x40deef(0x2e3)]===_0x40deef(0x405)?_0x40deef(0x44f)+_0x578eed:process[_0x40deef(0x2e3)]===_0x40deef(0x558)?_0x40deef(0x631)+_0x578eed:_0x40deef(0x1ab)+_0x578eed;require$$4[_0x40deef(0x4c7)](_0x36f1df),console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x22b)],'✓')+_0x40deef(0x363)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1f9)],_0x578eed)+'\x0a');return;}let _0x16fd29,_0x4674ef,_0x4343f8;if(_0x53c4ad['has'](_0xa74ecb)){_0x16fd29=_0xa74ecb,_0x4674ef=_0xb0d7e5[0x1],_0x4343f8=_0xb0d7e5[_0x40deef(0x45e)](0x2);if(!_0x4674ef){console[_0x40deef(0x31b)](_0x2ad0ce(_0x21ec5b['red'],_0x40deef(0x560)+_0x393063+_0x40deef(0x137)));return;}}else _0x16fd29=null,_0x4674ef=_0xb0d7e5[0x0],_0x4343f8=_0xb0d7e5['slice'](0x1);const _0x1487c9=_0x5dc510[_0x40deef(0x46e)]??_0xfcbcba[_0x40deef(0x46e)],_0x2c35ae=_0x121b52(_0x4674ef,_0x1487c9);if(_0x5dc510['help']){_0x7df7db(_0x514be6,_0x2c35ae);return;}let _0x4849e0=null;if(_0x4343f8['length']){const _0x2683a7=_0x4343f8[_0x40deef(0x3a4)]('\x20');try{_0x4849e0=_0x198e98(_0x2683a7);}catch(_0x3e9702){console[_0x40deef(0x31b)](_0x2ad0ce(_0x21ec5b[_0x40deef(0x4df)],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x2683a7+_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x3e9702[_0x40deef(0x29c)])+'\x0a'));return;}}if(!_0x16fd29)_0x16fd29=_0x4849e0!==null?_0x40deef(0x46a):_0x40deef(0x58f);try{const _0x5f2798=await _0x21c433(_0x514be6,_0x16fd29,_0x2c35ae,_0x4849e0);_0x17e613(_0x5f2798[_0x40deef(0x626)],_0x5f2798[_0x40deef(0x5e9)]);}catch(_0x24a555){console[_0x40deef(0x31b)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b['red'],'✗')+'\x20'+_0x24a555[_0x40deef(0x29c)]+'\x0a');}}class _0x36d363{constructor(){const _0x375166=_0x4cdaa0;this['children']=new Map(),this[_0x375166(0x4b7)]=null,this[_0x375166(0x52f)]=![];}}function _0x2af4fd(_0x3d3e42){const _0x205e7c=_0x4cdaa0,_0x4fa729=new _0x36d363();for(const _0xf23853 of _0x3d3e42){if(_0xf23853[_0x205e7c(0x664)]?.[_0x205e7c(0x350)])continue;const _0x3d87db=_0xf23853[_0x205e7c(0x42d)]['replace'](/^\/api/,'')[_0x205e7c(0x38b)](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x3d87db)continue;let _0x242291=_0x4fa729;for(const _0xbf785d of _0x3d87db['split']('/')[_0x205e7c(0x1c6)](Boolean)){if(_0xbf785d[_0x205e7c(0x3cc)](':')){const _0x348792=_0xbf785d[_0x205e7c(0x45e)](0x1);if(!_0x242291[_0x205e7c(0x4b7)])_0x242291[_0x205e7c(0x4b7)]={'param':_0x348792,'node':new _0x36d363()};_0x242291=_0x242291[_0x205e7c(0x4b7)][_0x205e7c(0x3fa)];}else{if(!_0x242291[_0x205e7c(0x331)][_0x205e7c(0x39f)](_0xbf785d))_0x242291[_0x205e7c(0x331)][_0x205e7c(0x2c2)](_0xbf785d,new _0x36d363());_0x242291=_0x242291[_0x205e7c(0x331)][_0x205e7c(0x3aa)](_0xbf785d);}}_0x242291['terminal']=!![];}return _0x4fa729;}const _0x25e579=new Map();function _0x40702b(_0x1c4315,_0x49a001,_0x3cd419){const _0x23756f=_0x4cdaa0,_0x1eb305=_0x25e579['get'](_0x1c4315);if(_0x1eb305&&_0x1eb305[_0x23756f(0xfd)]>Date[_0x23756f(0x16a)]())return _0x1eb305[_0x23756f(0x15b)];const _0x1d621c=_0x3cd419();return _0x25e579[_0x23756f(0x2c2)](_0x1c4315,{'val':_0x1d621c,'exp':Date['now']()+_0x49a001}),_0x1d621c;}function _0x3e2cdc(_0x35aafb,_0x4554fe,_0x37df23,_0x44c42a){const _0x2641c4=_0x4cdaa0,_0x23881f=_0x4554fe[_0x2641c4(0x46e)]??_0x44c42a[_0x2641c4(0x46e)];switch(_0x35aafb){case'env':return[..._0x37df23[_0x2641c4(0x5bd)]['keys']()][_0x2641c4(0x1c6)](_0x19c328=>!_0x19c328[_0x2641c4(0x3cc)]('~'));case'type':return _0x40702b('types:'+_0x23881f,0x7d0,()=>{const _0x580a14=_0x2641c4;try{return[..._0x37df23[_0x580a14(0x46e)](_0x23881f)['typeSubDbs'][_0x580a14(0x2f1)]()][_0x580a14(0x1c6)](_0xaac5dd=>!_0xaac5dd[_0x580a14(0x3cc)]('~'));}catch{return[];}});case _0x2641c4(0x174):if(!_0x4554fe[_0x2641c4(0x49b)])return[];return _0x40702b(_0x2641c4(0x5f3)+_0x23881f+':'+_0x4554fe[_0x2641c4(0x49b)],0x5dc,()=>{const _0x3e97f1=_0x2641c4;try{const _0x3db13e=_0x37df23[_0x3e97f1(0x46e)](_0x23881f)[_0x3e97f1(0x632)][_0x3e97f1(0x3aa)](_0x4554fe[_0x3e97f1(0x49b)]);if(!_0x3db13e?.[_0x3e97f1(0x206)])return[];const _0x1d7d73=[];for(const {key:_0x3e2e87}of _0x3db13e[_0x3e97f1(0x206)][_0x3e97f1(0x391)]({'limit':0x32})){_0x1d7d73[_0x3e97f1(0x614)](String(_0x3e2e87));if(_0x1d7d73[_0x3e97f1(0x2eb)]>=0x32)break;}return _0x1d7d73;}catch{return[];}});case _0x2641c4(0x593):if(!_0x4554fe[_0x2641c4(0x49b)])return[];return _0x40702b(_0x2641c4(0x1ac)+_0x23881f+':'+_0x4554fe[_0x2641c4(0x49b)],0x7d0,()=>{const _0x3070fc=_0x2641c4;try{const _0x3faac1=_0x37df23[_0x3070fc(0x46e)](_0x23881f)[_0x3070fc(0x632)]['get'](_0x4554fe[_0x3070fc(0x49b)]);return _0x3faac1?[..._0x3faac1['indexToDb']?.['keys']()??[]]:[];}catch{return[];}});case _0x2641c4(0x195):if(!_0x4554fe['type'])return[];return _0x40702b(_0x2641c4(0x224)+_0x23881f+':'+_0x4554fe['type'],0x7d0,()=>{const _0x44fca6=_0x2641c4;try{return _0x37df23[_0x44fca6(0x458)]?.[_0x44fca6(0x25b)]?.(_0x4554fe[_0x44fca6(0x49b)],_0x37df23['env'](_0x23881f))?.[_0x44fca6(0x601)](_0x203d08=>_0x203d08[_0x44fca6(0x2cc)])??[];}catch{return[];}});default:return[];}}function _0x130473(_0x228221,_0x61e623,_0x20065e,_0x46e3a4){const _0x569dd5=_0x4cdaa0,_0x4f51e6=_0x228221['endsWith']('/'),_0x56e768=_0x228221[_0x569dd5(0x37c)]('/'),_0x288062=_0x4f51e6?_0x56e768[_0x569dd5(0x45e)](0x0,-0x1):_0x56e768['slice'](0x0,-0x1),_0x263e7d=_0x4f51e6?'':_0x56e768[_0x56e768[_0x569dd5(0x2eb)]-0x1];let _0x18904a=_0x61e623;const _0x4a5d74={};for(const _0x410de0 of _0x288062){if(!_0x410de0)continue;if(_0x18904a[_0x569dd5(0x331)][_0x569dd5(0x39f)](_0x410de0))_0x18904a=_0x18904a['children']['get'](_0x410de0);else{if(_0x18904a[_0x569dd5(0x4b7)])_0x4a5d74[_0x18904a[_0x569dd5(0x4b7)]['param']]=_0x410de0,_0x18904a=_0x18904a['dynamic'][_0x569dd5(0x3fa)];else return[];}}const _0x37a4dc=_0x288062[_0x569dd5(0x1c6)](Boolean),_0x22f4e3=_0x37a4dc['length']?_0x37a4dc['join']('/')+'/':'',_0x3fd61f=[];for(const [_0x455c13]of _0x18904a[_0x569dd5(0x331)]){if(_0x455c13[_0x569dd5(0x3cc)](_0x263e7d))_0x3fd61f[_0x569dd5(0x614)](_0x22f4e3+_0x455c13);}if(_0x18904a['dynamic'])for(const _0x3b6a2a of _0x3e2cdc(_0x18904a['dynamic']['param'],_0x4a5d74,_0x20065e,_0x46e3a4)){if(String(_0x3b6a2a)[_0x569dd5(0x3cc)](_0x263e7d))_0x3fd61f[_0x569dd5(0x614)](_0x22f4e3+_0x3b6a2a);}return _0x3fd61f[_0x569dd5(0x45e)](0x0,0x64);}const _0x19ea08=[_0x4cdaa0(0x2e2),_0x4cdaa0(0x2ca),_0x4cdaa0(0x46e),'envs',_0x4cdaa0(0x161),_0x4cdaa0(0x5d7),_0x4cdaa0(0x4dd),'open',_0x4cdaa0(0x542),_0x4cdaa0(0x378)];function _0x550414(_0x3d09b4,_0x485daf,_0x3dda8f){return function _0x4076a0(_0x5e3d02){const _0x11cac4=_0x2368;try{const _0x53dc2d=_0x5e3d02[_0x11cac4(0x507)](/\s[{[]/),_0x3619a3=_0x53dc2d>=0x0?_0x5e3d02[_0x11cac4(0x45e)](0x0,_0x53dc2d):_0x5e3d02,_0xa82097=_0x3619a3[_0x11cac4(0x2fb)]();if(!_0xa82097){const _0x17c266=[..._0x19ea08,...[..._0x3d09b4['children'][_0x11cac4(0x2f1)]()]][_0x11cac4(0x45e)](0x0,0x64);return[_0x17c266,''];}const _0x58c287=_0xa82097[_0x11cac4(0x37c)](/\s+/),_0x318632=_0x58c287[0x0],_0x35e642=_0x318632[_0x11cac4(0x5ef)]();if(_0x58c287[_0x11cac4(0x2eb)]===0x1){const _0x153ed3=_0x318632['toLowerCase'](),_0x1bd30a=_0x19ea08[_0x11cac4(0x1c6)](_0x57203e=>_0x57203e[_0x11cac4(0x3cc)](_0x153ed3)),_0x10cb21=_0x130473(_0x318632,_0x3d09b4,_0x485daf,_0x3dda8f),_0x320f84=[...new Set([..._0x1bd30a,..._0x10cb21])]['slice'](0x0,0x64);return[_0x320f84,_0x318632];}if(_0x53c4ad[_0x11cac4(0x39f)](_0x35e642)&&_0x58c287[_0x11cac4(0x2eb)]===0x2){const _0xb4dd70=_0x58c287[0x1],_0x2651e2=_0x130473(_0xb4dd70,_0x3d09b4,_0x485daf,_0x3dda8f);return[_0x2651e2[_0x11cac4(0x601)](_0x1d5701=>_0x318632+'\x20'+_0x1d5701),_0x318632+'\x20'+_0xb4dd70];}if(!_0x53c4ad[_0x11cac4(0x39f)](_0x35e642)&&_0x58c287[_0x11cac4(0x2eb)]>0x1){const _0x442044=_0x130473(_0x318632,_0x3d09b4,_0x485daf,_0x3dda8f),_0x1a8a93='\x20'+_0x58c287[_0x11cac4(0x45e)](0x1)[_0x11cac4(0x3a4)]('\x20');return[_0x442044[_0x11cac4(0x601)](_0x230ba6=>_0x230ba6+_0x1a8a93),_0x318632+_0x1a8a93];}return[[],_0x5e3d02];}catch{return[[],_0x5e3d02];}};}async function _0x11044f(_0x3d9d54,_0x12188e){const _0x426dde=_0x4cdaa0,_0x5b0eb6={'enabled':!![],'level':_0x12188e['logLevel']??_0x426dde(0x3d7)},_0x3b8b2e={'env':'default'},_0x5d7caa={'current':null},_0x15f1c5=_0x2af4fd(_0x3d9d54[_0x426dde(0x5d0)][_0x426dde(0x33c)]()),_0x32a174=_0x550414(_0x15f1c5,_0x3d9d54,_0x3b8b2e);_0x3d9d54[_0x426dde(0x4f7)]['attach'](_0x2a2469=>{const _0x45f88c=_0x426dde;if(!_0x5b0eb6[_0x45f88c(0x26c)])return;_0x4c4864(_0x2a2469,_0x5b0eb6[_0x45f88c(0x294)]),_0x5d7caa[_0x45f88c(0x199)]?.['prompt'](!![]);}),_0x62d3fc(_0x3d9d54,_0x12188e);const _0x3c56b3=_0x722dec[_0x426dde(0x15a)]({'input':process[_0x426dde(0x61c)],'output':process[_0x426dde(0x559)],'terminal':!![],'completer':_0x32a174,'prompt':_0x5976b2(_0x3b8b2e),'historySize':_0x2536e3});try{const _0x311b03=_0x1f435f[_0x426dde(0xe7)](_0x32c291,_0x426dde(0x365))['split']('\x0a')[_0x426dde(0x1c6)](Boolean);_0x3c56b3[_0x426dde(0x24c)]=_0x311b03[_0x426dde(0x414)]()[_0x426dde(0x45e)](0x0,_0x2536e3);}catch{}_0x5d7caa[_0x426dde(0x199)]=_0x3c56b3,_0x3c56b3['on'](_0x426dde(0x5ce),async _0x3c02e5=>{const _0x66f1b4=_0x426dde;_0x3c56b3[_0x66f1b4(0x152)]();try{await _0x1f8215(_0x3c02e5,_0x3d9d54,_0x12188e,_0x5b0eb6,_0x3b8b2e,_0x3c56b3);}catch(_0x158da5){console[_0x66f1b4(0x31b)](_0x2ad0ce(_0x21ec5b[_0x66f1b4(0x4df)],_0x66f1b4(0x1cc)+_0x158da5[_0x66f1b4(0x29c)]));}finally{_0x3c56b3[_0x66f1b4(0x29d)](),_0x3c56b3[_0x66f1b4(0x3f2)]();}}),_0x3c56b3['on'](_0x426dde(0x241),()=>{const _0x382b09=_0x426dde;try{const _0x5bedfe=[..._0x3c56b3[_0x382b09(0x24c)]][_0x382b09(0x414)]()[_0x382b09(0x1c6)](Boolean)[_0x382b09(0x45e)](0x0,_0x2536e3);_0x1f435f['writeFileSync'](_0x32c291,_0x5bedfe[_0x382b09(0x3a4)]('\x0a')+'\x0a');}catch{}_0x5e9f7e(_0x3d9d54,0x0);});let _0x26c1fc=0x0;return process['on'](_0x426dde(0x53b),()=>{const _0x30e292=_0x426dde;if(_0x1d6d38)return _0x5e9f7e(_0x3d9d54,0x82,_0x30e292(0x53b));if(_0x3c56b3[_0x30e292(0x5ce)]==='')return _0x5e9f7e(_0x3d9d54,0x0,_0x30e292(0x53b));const _0x5957c1=Date[_0x30e292(0x16a)]();if(_0x5957c1-_0x26c1fc<0x5dc)return _0x5e9f7e(_0x3d9d54,0x0,_0x30e292(0x635));_0x26c1fc=_0x5957c1,process[_0x30e292(0x559)][_0x30e292(0x4ae)]('\x0a'),_0x3c56b3[_0x30e292(0x3ce)](0x0),_0x3c56b3['prompt'](),process[_0x30e292(0x16f)][_0x30e292(0x4ae)](_0x2ad0ce(_0x21ec5b[_0x30e292(0x1bc)],_0x30e292(0xe4)));}),process['on']('SIGTERM',()=>_0x5e9f7e(_0x3d9d54,0x0,'SIGTERM')),process['on'](_0x426dde(0x5e7),()=>_0x5e9f7e(_0x3d9d54,0x0,_0x426dde(0x5e7))),_0x3c56b3[_0x426dde(0x3f2)](),_0x3c56b3;}return okdbShell={'start':_0x11044f,'colorLog':_0x4c4864,'lenientParse':_0x198e98,'_splitLine':_0x3c36dc,'_formatRouteHelpLines':_0x5e930,'_routeSummary':_0x196b8a,'_routeTags':_0x212050},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x1ebffb=_0x4b361c;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x3fa839,performance:_0x20f3b8}=require$$0$3,_0x3f376a=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x1ebffb(0x5e1),_0x3b2a21=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x250321=process.env.OKDB_LOOP_LAG_ALL==='1',_0x48b3ae=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x2de414{constructor(){const _0x4be28d=_0x1ebffb;this['enabled']=_0x3f376a,this[_0x4be28d(0x659)]=new Map(),this['_h']=null,this[_0x4be28d(0x301)]=null,this[_0x4be28d(0x1ba)]=![],this[_0x4be28d(0x653)]=(_0x5997b9,_0x403f1d)=>process[_0x4be28d(0x16f)][_0x4be28d(0x4ae)](_0x5997b9+(_0x403f1d?'\x20'+JSON[_0x4be28d(0x3d9)](_0x403f1d):'')+'\x0a');}[_0x1ebffb(0x16a)](){const _0x3c29d6=_0x1ebffb;return _0x20f3b8[_0x3c29d6(0x16a)]();}['setLogger'](_0x3f2a21){const _0x4f2232=_0x1ebffb;if(typeof _0x3f2a21===_0x4f2232(0x26b))this[_0x4f2232(0x653)]=_0x3f2a21;}[_0x1ebffb(0x480)](_0x800bb4,_0x4b4861,_0x239771){const _0x4dccab=_0x1ebffb;if(!this[_0x4dccab(0x26c)])return;let _0x38b926=this[_0x4dccab(0x659)][_0x4dccab(0x3aa)](_0x800bb4);!_0x38b926&&(_0x38b926={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x4dccab(0x659)]['set'](_0x800bb4,_0x38b926)),_0x38b926['ms']+=_0x4b4861,_0x38b926[_0x4dccab(0x5ec)]+=0x1,_0x4b4861>_0x38b926[_0x4dccab(0x60b)]&&(_0x38b926[_0x4dccab(0x60b)]=_0x4b4861,_0x38b926['maxExtra']=_0x239771||'');}[_0x1ebffb(0x545)](_0x51621a){const _0x161a83=_0x1ebffb;if(!this['enabled']||this[_0x161a83(0x1ba)])return;this[_0x161a83(0x1ba)]=!![];if(_0x51621a)this[_0x161a83(0x653)]=_0x51621a;this['_h']=_0x3fa839({'resolution':0xa}),this['_h'][_0x161a83(0x3a8)](),this[_0x161a83(0x301)]=setInterval(()=>this[_0x161a83(0x66f)](),_0x3b2a21);if(this[_0x161a83(0x301)]['unref'])this[_0x161a83(0x301)][_0x161a83(0x386)]();}['onWindow'](_0x307a77){const _0x17213b=_0x1ebffb;if(!this[_0x17213b(0x475)])this[_0x17213b(0x475)]=new Set();this[_0x17213b(0x475)][_0x17213b(0x61d)](_0x307a77);if(!this[_0x17213b(0x1ba)])this['_startAdmission']();}[_0x1ebffb(0x320)](_0x2d89f2){const _0x39661d=_0x1ebffb;this['_windowCbs']?.[_0x39661d(0x5ed)](_0x2d89f2);}[_0x1ebffb(0x168)](){const _0x3dc4c5=_0x1ebffb;if(this['_admissionStarted'])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x3fa839({'resolution':0xa}),this['_h'][_0x3dc4c5(0x3a8)]());const _0x4f3a46=_0x3b2a21;this[_0x3dc4c5(0x144)]=setInterval(()=>{const _0x37dd50=_0x3dc4c5,_0x4a8c9b=this['_h'];if(!_0x4a8c9b)return;const _0xade6ef=_0x4a8c9b[_0x37dd50(0x5ba)](0x63)/0xf4240,_0xe12fca=_0x4a8c9b[_0x37dd50(0x47e)]/0xf4240,_0x13b1ff=_0x4a8c9b['mean']/0xf4240;_0x4a8c9b[_0x37dd50(0x1c2)]();if(this[_0x37dd50(0x475)])for(const _0x5477eb of this[_0x37dd50(0x475)]){try{_0x5477eb({'p99Ms':_0xade6ef,'maxMs':_0xe12fca,'meanMs':_0x13b1ff,'reportMs':_0x4f3a46});}catch{}}},_0x4f3a46);if(this['_admissionTimer'][_0x3dc4c5(0x386)])this[_0x3dc4c5(0x144)][_0x3dc4c5(0x386)]();}[_0x1ebffb(0x66f)](){const _0x5f6f74=_0x1ebffb,_0x317b94=this['_h'],_0x2d5d4c=_0x317b94[_0x5f6f74(0x47e)]/0xf4240,_0x1d3791=_0x317b94[_0x5f6f74(0x5ba)](0x63)/0xf4240,_0x1b8e36=_0x317b94[_0x5f6f74(0x56b)]/0xf4240;_0x317b94[_0x5f6f74(0x1c2)]();const _0x2981c1=[...this[_0x5f6f74(0x659)][_0x5f6f74(0x427)]()][_0x5f6f74(0x601)](([_0x79aade,_0x29e731])=>({'label':_0x79aade,..._0x29e731}))[_0x5f6f74(0x30f)]((_0x3f8529,_0x1dedd4)=>_0x1dedd4['ms']-_0x3f8529['ms'])[_0x5f6f74(0x45e)](0x0,0x8);this[_0x5f6f74(0x659)][_0x5f6f74(0x479)]();const _0x38d601=_0x2981c1['reduce']((_0x721540,_0x14d5fc)=>_0x721540+_0x14d5fc['ms'],0x0),_0x3d2991=_0x2981c1[_0x5f6f74(0x601)](_0x2d51a1=>_0x2d51a1[_0x5f6f74(0x508)]+'='+_0x2d51a1['ms'][_0x5f6f74(0x4a8)](0x0)+_0x5f6f74(0x2f4)+_0x2d51a1[_0x5f6f74(0x5ec)]+(_0x2d51a1['maxMs']>0x5?_0x5f6f74(0x644)+_0x2d51a1[_0x5f6f74(0x60b)]['toFixed'](0x0)+'ms'+(_0x2d51a1[_0x5f6f74(0x352)]?'\x20'+_0x2d51a1[_0x5f6f74(0x352)]:'')+')':''));(_0x250321||_0x2d5d4c>=_0x48b3ae)&&this[_0x5f6f74(0x653)](_0x5f6f74(0x230)+_0x3b2a21+_0x5f6f74(0x3b9)+_0x2d5d4c[_0x5f6f74(0x4a8)](0x0)+_0x5f6f74(0x3a1)+_0x1d3791[_0x5f6f74(0x4a8)](0x0)+'ms\x20mean='+_0x1b8e36[_0x5f6f74(0x4a8)](0x0)+_0x5f6f74(0x513)+_0x38d601['toFixed'](0x0)+'ms'+(_0x3d2991['length']?_0x5f6f74(0x5a2)+_0x3d2991[_0x5f6f74(0x3a4)]('\x20\x20'):''),{'feature':_0x5f6f74(0x4ab)});if(this[_0x5f6f74(0x475)])for(const _0xf5ed0a of this[_0x5f6f74(0x475)]){try{_0xf5ed0a({'p99Ms':_0x1d3791,'maxMs':_0x2d5d4c,'meanMs':_0x1b8e36,'reportMs':_0x3b2a21});}catch{}}}['stop'](){const _0x660071=_0x1ebffb;if(this[_0x660071(0x301)])clearInterval(this[_0x660071(0x301)]);if(this['_h'])this['_h']['disable']();this['_timer']=null,this['_h']=null,this[_0x660071(0x1ba)]=![];}}const _0x43c77b=new _0x2de414();if(_0x43c77b[_0x1ebffb(0x26c)])_0x43c77b['start']();return okdbLoopMonitor={'LOOP':_0x43c77b},okdbLoopMonitor;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x42a870=_0x4b361c;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x297dda=require$$0,_0x5813e1=require$$1$2,_0x36f838=require$$2,{LOOP:_0x1b606f}=requireOkdbLoopMonitor(),_0x128dd8=_0x42a870(0x1f8),_0x22fe37=_0x42a870(0x3fa),_0x421837=_0x42a870(0x1d0),_0x2025ea=_0x42a870(0x432),_0x26e303=(_0x7cbb31,_0xa7293f)=>_0x7cbb31+':'+_0xa7293f,_0x3d454f=(_0x4661e2,_0x1a455f)=>_0x4661e2+'::'+_0x1a455f,_0x101cc0=(_0x545819,_0x1679cc)=>_0x545819+'/'+_0x1679cc,_0x38bc5b=(_0x45f68f,_0x3a3f6a)=>_0x45f68f+'#'+_0x3a3f6a,_0x46d10e=_0x4ee0d6=>{const _0x3d0956=_0x42a870;if(_0x4ee0d6?.[_0x3d0956(0x638)])return _0x4ee0d6[_0x3d0956(0x638)];const _0x9b1c37=_0x4ee0d6?.[_0x3d0956(0x472)];return typeof _0x9b1c37===_0x3d0956(0x380)&&_0x9b1c37[_0x3d0956(0x5c0)]('#')?_0x9b1c37[_0x3d0956(0x45e)](0x0,_0x9b1c37[_0x3d0956(0x42b)]('#')):_0x9b1c37;},_0x568dec=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x25d8d0=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x320f2c=_0x568dec*0x3,_0x23ce58=[_0x42a870(0x572),_0x42a870(0x5e5),'processor:retry',_0x42a870(0x22f)];let _0xb24364=null;function _0x22fb9b(){const _0x30012b=_0x42a870;if(_0xb24364==null)_0xb24364=Math[_0x30012b(0x1df)]((Date['now']()-process[_0x30012b(0x4d0)]()*0x3e8)/0x3e8)*0x3e8;return _0xb24364;}function _0x85fc2d(_0x57c5ce){const _0x4bf111=_0x42a870;if(process.env.OKDB_PROCESS_KILL==='off')return![];if(_0x57c5ce?.[_0x4bf111(0x2aa)]?.[_0x4bf111(0x532)]&&typeof _0x57c5ce['options'][_0x4bf111(0x532)]===_0x4bf111(0x20e)&&_0x57c5ce[_0x4bf111(0x2aa)]['processes'][_0x4bf111(0x269)]===![])return![];return!![];}function _0x3d73c2(_0x46a3ca,_0x4b2723){const _0x1ed14f=_0x42a870,_0x4d62b9=!!_0x4b2723?.['asyncProcessors'];switch(_0x46a3ca){case _0x1ed14f(0x608):return{'controllable':_0x4d62b9,'decommissionable':![],'killable':!![],'killConfirm':_0x1ed14f(0x530)};case'cli':case'standalone':return{'controllable':_0x4d62b9,'decommissionable':![],'killable':!![],'killConfirm':_0x1ed14f(0x213)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x1ed14f(0x311):case _0x1ed14f(0x483):case _0x1ed14f(0x4f2):case _0x1ed14f(0x1a1):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x1ed14f(0x14c)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x59d1c0{constructor(_0x434dc7){const _0xe16ec2=_0x42a870;this['okdb']=_0x434dc7,this[_0xe16ec2(0x2bf)]=null,this['_desired']=null,this[_0xe16ec2(0x477)]=null,this['_isWriter']=![],this[_0xe16ec2(0x28f)]=![],this[_0xe16ec2(0x36c)]=_0x22fb9b(),this[_0xe16ec2(0x211)]=_0x26e303(process[_0xe16ec2(0x3e7)],this['_processStartedAt']),this[_0xe16ec2(0x4ba)]=_0x36f838[_0xe16ec2(0x3ba)]()[_0xe16ec2(0x45e)](0x0,0x8),this[_0xe16ec2(0x3be)]=_0x38bc5b(this[_0xe16ec2(0x211)],this[_0xe16ec2(0x4ba)]),this[_0xe16ec2(0x277)]=Date[_0xe16ec2(0x16a)](),this[_0xe16ec2(0x214)]=null,this['_supervisorKey']=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0xe16ec2(0x54e)]=null,this[_0xe16ec2(0x40d)]=null,this[_0xe16ec2(0x1d1)]=0x0,this[_0xe16ec2(0x5ad)]={},this[_0xe16ec2(0x4f9)]=new Map(),this[_0xe16ec2(0x256)]=process['cpuUsage'](),this[_0xe16ec2(0x5cf)]=Date[_0xe16ec2(0x16a)](),this['_lastCpuPct']=0x0,this[_0xe16ec2(0x18b)]=new Map();}get[_0x42a870(0x5f0)](){const _0xbbed6d=_0x42a870;return this[_0xbbed6d(0x211)];}get[_0x42a870(0x61e)](){const _0x120663=_0x42a870;return this[_0x120663(0x3be)];}[_0x42a870(0x243)](_0x2a9f8b,_0x243699){const _0x1343da=_0x42a870,_0x523126=_0x3d73c2(_0x2a9f8b,_0x243699);if(_0x523126[_0x1343da(0x1a0)]&&!_0x85fc2d(this['okdb']))return{..._0x523126,'killable':![],'killConfirm':undefined};return _0x523126;}['isActive'](){return!!this['_statusEnv'];}['setOwnMeta'](_0x2c7c49){const _0x9229b3=_0x42a870;Object[_0x9229b3(0x451)](this[_0x9229b3(0x5ad)],_0x2c7c49||{});}[_0x42a870(0x325)](_0x5aaf4b){const _0x3a3dbd=_0x42a870;if(_0x5aaf4b)this[_0x3a3dbd(0x648)]=_0x5aaf4b;}[_0x42a870(0x25d)](_0x3a9f72={}){const _0x23618d=_0x42a870;return this[_0x23618d(0x2d3)]['_activateProcesses'](_0x3a9f72);}[_0x42a870(0x11a)](){const _0x5a9b43=_0x42a870;let _0x5e246e=null;const _0xacdd5b={};for(const _0x502007 of this[_0x5a9b43(0x2f0)]()){const _0x5cda06=_0x502007[_0x5a9b43(0x2f8)];if(!_0x5cda06)continue;if(_0x5e246e==null)_0x5e246e=_0x5cda06[_0x5a9b43(0x1a7)];for(const _0x4ad8ac of _0x5cda06[_0x5a9b43(0x47c)]||[]){if(![_0x5a9b43(0x3ad),_0x5a9b43(0x5da),'worker','async'][_0x5a9b43(0x5c0)](_0x4ad8ac[_0x5a9b43(0x63e)]))continue;const _0x181a90=_0x4ad8ac['env']||_0x5a9b43(0x1e4);(_0xacdd5b[_0x181a90]||=[])[_0x5a9b43(0x614)]({'type':_0x4ad8ac[_0x5a9b43(0x49b)],'mode':_0x4ad8ac[_0x5a9b43(0x63e)],'state':_0x4ad8ac[_0x5a9b43(0x1a2)],'lastClock':_0x4ad8ac[_0x5a9b43(0x41f)],'headClock':_0x4ad8ac[_0x5a9b43(0x5fa)],'lag':_0x4ad8ac[_0x5a9b43(0x5c1)]});}}return{'envs':_0xacdd5b,'policy':_0x5e246e,'source':_0x5a9b43(0x5bf)};}[_0x42a870(0x4b2)](){const _0x3130ec=_0x42a870,_0x3ab08a=_0x3cd9f3=>{const _0x4f759e=_0x2368;if(_0x3cd9f3[_0x4f759e(0x1a2)]===_0x4f759e(0x4ac)||_0x3cd9f3[_0x4f759e(0x1a2)]===_0x4f759e(0x481)||_0x3cd9f3[_0x4f759e(0x1a2)]===_0x4f759e(0x31b))return 0x3;if(_0x3cd9f3['claimGated'])return 0x1;return 0x2;},_0x14d1a2=new Map();for(const _0x15029a of this[_0x3130ec(0x2f0)]()){for(const _0x194126 of _0x15029a['processing']?.[_0x3130ec(0x47c)]||[]){const _0x1da551={..._0x194126,'owner':{'pid':_0x15029a[_0x3130ec(0x3e7)]??null,'kind':_0x15029a[_0x3130ec(0x4d6)]??null,'host':_0x15029a['host']??null}},_0x3ce28d=_0x194126['mode']==='single'?_0x3130ec(0x4d9)+(_0x194126[_0x3130ec(0x46e)]??'')+'::'+(_0x194126[_0x3130ec(0x262)]??_0x194126[_0x3130ec(0x49b)]??_0x194126['id']):_0x3130ec(0x2f7)+(_0x15029a[_0x3130ec(0x472)]??_0x15029a[_0x3130ec(0x638)]??'')+'::'+(_0x194126[_0x3130ec(0x46e)]??'')+'::'+_0x194126['id'],_0x2fb827=_0x14d1a2[_0x3130ec(0x3aa)](_0x3ce28d);if(!_0x2fb827||_0x3ab08a(_0x1da551)>_0x3ab08a(_0x2fb827))_0x14d1a2[_0x3130ec(0x2c2)](_0x3ce28d,_0x1da551);}}return[..._0x14d1a2['values']()];}[_0x42a870(0x38a)](){const _0xcc191b=_0x42a870,_0x1024d2=Date[_0xcc191b(0x16a)](),_0x22b780=this[_0xcc191b(0x2f0)](),_0x8053db=_0x44ed5c=>Math[_0xcc191b(0x47e)](0x0,Math[_0xcc191b(0x1df)]((_0x1024d2-(_0x44ed5c[_0xcc191b(0x157)]||_0x1024d2))/0x3e8)),_0x80cf08=_0x22b780[_0xcc191b(0x29a)](_0x2f2291=>_0x2f2291[_0xcc191b(0x4d6)]===_0xcc191b(0x608)),_0x280f43=_0x22b780[_0xcc191b(0x1c6)](_0x3bf274=>_0x3bf274['kind']===_0xcc191b(0x311));if(_0x80cf08||_0x280f43[_0xcc191b(0x2eb)])return{'primary':_0x80cf08?{'pid':_0x80cf08['pid'],'uptime':_0x8053db(_0x80cf08)}:null,'workers':_0x280f43['map'](_0xd7e16f=>({'pid':_0xd7e16f[_0xcc191b(0x3e7)],'uptime':_0x8053db(_0xd7e16f)})),'workersConfigured':_0x80cf08?.[_0xcc191b(0x664)]?.[_0xcc191b(0x3c1)]??_0x280f43[_0xcc191b(0x2eb)],'mode':_0xcc191b(0xfe)};const _0x33bfa6=_0x22b780['find'](_0xb22a18=>_0xb22a18[_0xcc191b(0x4d6)]===_0xcc191b(0x3b3)||_0xb22a18[_0xcc191b(0x4d6)]===_0xcc191b(0x53a)||_0xb22a18['kind']===_0xcc191b(0x3e9)),_0x335360=_0x33bfa6?{'pid':_0x33bfa6['pid'],'uptime':_0x8053db(_0x33bfa6)}:{'pid':process[_0xcc191b(0x3e7)],'uptime':Math[_0xcc191b(0x47e)](0x0,Math[_0xcc191b(0x1df)](process[_0xcc191b(0x4d0)]()))};return{'primary':_0x335360,'workers':[_0x335360],'workersConfigured':0x1,'mode':_0xcc191b(0x3ad)};}['nodesView'](){const _0x3b1039=_0x42a870;return this[_0x3b1039(0x49c)]();}[_0x42a870(0x342)](){const _0x49dc5c=_0x42a870,_0x229075=new Map();for(const _0x57c442 of this[_0x49dc5c(0x49c)]())_0x229075[_0x49dc5c(0x2c2)](_0x57c442[_0x49dc5c(0x638)],{..._0x57c442,'children':[]});const _0xd0c2af=[];for(const _0x44c0ce of _0x229075[_0x49dc5c(0x624)]()){const _0x34acee=_0x44c0ce[_0x49dc5c(0x2a8)]?_0x229075[_0x49dc5c(0x3aa)](_0x44c0ce[_0x49dc5c(0x2a8)]):null;if(_0x34acee&&_0x34acee!==_0x44c0ce)_0x34acee[_0x49dc5c(0x331)]['push'](_0x44c0ce);else _0xd0c2af[_0x49dc5c(0x614)](_0x44c0ce);}const _0x501bcf=(_0x27c0a2,_0x2d93d2)=>_0x27c0a2[_0x49dc5c(0x4d6)]===_0x2d93d2[_0x49dc5c(0x4d6)]?(_0x27c0a2[_0x49dc5c(0x3e7)]||0x0)-(_0x2d93d2['pid']||0x0):(_0x27c0a2[_0x49dc5c(0x4d6)]??'')<(_0x2d93d2[_0x49dc5c(0x4d6)]??'')?-0x1:0x1,_0x3e17ac=_0x41d1de=>{const _0x2be9c7=_0x49dc5c;_0x41d1de[_0x2be9c7(0x30f)](_0x501bcf);for(const _0x32511a of _0x41d1de)if(_0x32511a[_0x2be9c7(0x331)][_0x2be9c7(0x2eb)])_0x3e17ac(_0x32511a['children']);};return _0x3e17ac(_0xd0c2af),_0xd0c2af;}[_0x42a870(0x40f)](_0x59dba8){const _0x3e0aaf=_0x42a870;return this[_0x3e0aaf(0x49c)]()[_0x3e0aaf(0x29a)](_0x3a25c6=>_0x3a25c6[_0x3e0aaf(0x638)]===_0x59dba8)??null;}[_0x42a870(0x49c)](_0x184a8a=Date[_0x42a870(0x16a)]()){const _0x1c336c=_0x42a870,_0x384df8=new Map();for(const _0x4ee032 of this[_0x1c336c(0x2f0)]()){const _0x11e55b=_0x46d10e(_0x4ee032);let _0x240aca=_0x384df8['get'](_0x11e55b);!_0x240aca&&(_0x240aca={'processKey':_0x11e55b,'nodeKey':_0x11e55b,'pid':_0x4ee032[_0x1c336c(0x3e7)],'ppid':_0x4ee032[_0x1c336c(0x343)]??null,'host':_0x4ee032['host']??null,'kind':_0x4ee032[_0x1c336c(0x4d6)],'role':null,'supervisorKey':_0x4ee032[_0x1c336c(0x2a8)]??null,'slot':_0x4ee032[_0x1c336c(0x3df)]??null,'slotKey':_0x4ee032[_0x1c336c(0x4af)]??null,'caps':_0x4ee032['caps']??null,'lifecycle':_0x4ee032[_0x1c336c(0x1f0)]??null,'uptime':Math['max'](0x0,Math[_0x1c336c(0x1df)]((_0x184a8a-(_0x4ee032['startedAt']||_0x184a8a))/0x3e8)),'startedAt':_0x4ee032[_0x1c336c(0x157)]??null,'meta':_0x4ee032[_0x1c336c(0x664)]??null,'listenAddr':null,'processing':null,'stats':null,'instances':[]},_0x384df8[_0x1c336c(0x2c2)](_0x11e55b,_0x240aca));_0x240aca['instances'][_0x1c336c(0x614)]({'instanceId':_0x4ee032[_0x1c336c(0xfc)]??null,'role':_0x4ee032[_0x1c336c(0x11f)]??null,'listenAddr':_0x4ee032[_0x1c336c(0xe8)]??null,'lifecycle':_0x4ee032['lifecycle']??null,'processing':_0x4ee032[_0x1c336c(0x2f8)]??null});if(!_0x240aca[_0x1c336c(0x11f)]&&_0x4ee032[_0x1c336c(0x11f)])_0x240aca[_0x1c336c(0x11f)]=_0x4ee032[_0x1c336c(0x11f)];if(!_0x240aca[_0x1c336c(0xe8)]&&_0x4ee032[_0x1c336c(0xe8)])_0x240aca[_0x1c336c(0xe8)]=_0x4ee032[_0x1c336c(0xe8)];if(!_0x240aca[_0x1c336c(0x2f8)]&&_0x4ee032[_0x1c336c(0x2f8)])_0x240aca[_0x1c336c(0x2f8)]=_0x4ee032[_0x1c336c(0x2f8)];if(_0x240aca['caps']==null&&_0x4ee032[_0x1c336c(0x641)])_0x240aca[_0x1c336c(0x641)]=_0x4ee032[_0x1c336c(0x641)];if(_0x4ee032[_0x1c336c(0x3de)]&&(!_0x240aca['stats']||(_0x4ee032['stats']['at']??0x0)>(_0x240aca[_0x1c336c(0x3de)]['at']??0x0)))_0x240aca[_0x1c336c(0x3de)]=_0x4ee032[_0x1c336c(0x3de)];}return[..._0x384df8[_0x1c336c(0x624)]()];}[_0x42a870(0x19f)](){const _0x2f98bc=_0x42a870,_0x5223ee=[],_0x3c1b0a={'rss':0x0,'heapUsed':0x0,'processes':0x0};for(const _0x40fd8d of this[_0x2f98bc(0x49c)]()){_0x5223ee[_0x2f98bc(0x614)]({'processKey':_0x40fd8d['processKey'],'kind':_0x40fd8d[_0x2f98bc(0x4d6)],'pid':_0x40fd8d[_0x2f98bc(0x3e7)],'supervisorKey':_0x40fd8d['supervisorKey'],'meta':_0x40fd8d[_0x2f98bc(0x664)]??null,'uptime':_0x40fd8d[_0x2f98bc(0x4d0)],'stats':_0x40fd8d[_0x2f98bc(0x3de)]??null}),_0x3c1b0a[_0x2f98bc(0x532)]++,_0x40fd8d['stats']&&(_0x3c1b0a[_0x2f98bc(0x37a)]+=_0x40fd8d[_0x2f98bc(0x3de)]['rss']||0x0,_0x3c1b0a['heapUsed']+=(_0x40fd8d[_0x2f98bc(0x3de)][_0x2f98bc(0x5b9)]||0x0)+(_0x40fd8d[_0x2f98bc(0x3de)][_0x2f98bc(0x1f5)]?.[_0x2f98bc(0x5b9)]||0x0));}return{'totals':_0x3c1b0a,'nodes':_0x5223ee};}async[_0x42a870(0x18d)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x5ef415=_0x42a870;this[_0x5ef415(0x376)]=this[_0x5ef415(0x376)]||!!writer,this[_0x5ef415(0x28f)]=this[_0x5ef415(0x28f)]||!!reader,this[_0x5ef415(0x214)]=kind||this['_kind']||(_0x5813e1[_0x5ef415(0x60c)]?_0x5ef415(0x311):_0x5ef415(0x3b3)),this[_0x5ef415(0x13a)]=supervisorKey??this[_0x5ef415(0x13a)],this[_0x5ef415(0x648)]=listenAddr??this[_0x5ef415(0x648)],this['_ensureDesired']();if(!writer&&!reader)return null;if(!this[_0x5ef415(0x2bf)]){const _0x4b3ba8=await this[_0x5ef415(0x2d3)][_0x5ef415(0x4a9)](_0x128dd8,{'sync':![],'durability':_0x5ef415(0x2ae)});if(!_0x4b3ba8[_0x5ef415(0x431)](_0x22fe37))await _0x4b3ba8[_0x5ef415(0x428)](_0x22fe37);this[_0x5ef415(0x2bf)]=_0x4b3ba8;}return this[_0x5ef415(0x2bf)];}[_0x42a870(0x3c7)](){const _0x39887f=_0x42a870;return this[_0x39887f(0x64d)]!==this[_0x39887f(0x2bf)]&&(this[_0x39887f(0x64d)]=this[_0x39887f(0x2bf)],this[_0x39887f(0x2f9)]=this[_0x39887f(0x2bf)][_0x39887f(0x447)](_0x22fe37)[_0x39887f(0x206)]),this[_0x39887f(0x2f9)];}[_0x42a870(0x44a)](_0x4be30f){const _0x59402e=_0x42a870,_0x3478f1=this['_nodeDb']()[_0x59402e(0x42f)](_0x4be30f['nodeKey'],_0x4be30f,0x1);if(_0x3478f1&&typeof _0x3478f1[_0x59402e(0x510)]===_0x59402e(0x26b))_0x3478f1[_0x59402e(0x510)](undefined,()=>{});return _0x3478f1;}[_0x42a870(0x162)](_0x446a04){const _0x592f95=_0x42a870,_0x3e9e83=this[_0x592f95(0x3c7)]()[_0x592f95(0x1b1)](_0x446a04);if(_0x3e9e83&&typeof _0x3e9e83[_0x592f95(0x510)]===_0x592f95(0x26b))_0x3e9e83[_0x592f95(0x510)](undefined,()=>{});return _0x3e9e83;}async[_0x42a870(0x607)](_0x4ee01b){const _0x57a0cf=_0x42a870;if(!this['_statusEnv']||!this[_0x57a0cf(0x376)]||!_0x4ee01b?.[_0x57a0cf(0x472)])return;return this[_0x57a0cf(0x44a)](_0x4ee01b);}async[_0x42a870(0x630)](_0x185427){const _0x1096c6=_0x42a870;if(!this['_statusEnv']||!this[_0x1096c6(0x376)]||!_0x185427)return;const _0x3448c1=_0x185427[_0x1096c6(0x5c0)]('#'),_0x577530=[];for(const {key:_0x1bba77}of this['_statusEnv'][_0x1096c6(0x391)](_0x22fe37)){if(_0x1bba77===_0x185427||!_0x3448c1&&typeof _0x1bba77===_0x1096c6(0x380)&&_0x1bba77[_0x1096c6(0x3cc)](_0x185427+'#'))_0x577530[_0x1096c6(0x614)](_0x1bba77);}return Promise[_0x1096c6(0x260)](_0x577530[_0x1096c6(0x601)](_0xac5b65=>this['_removeRowAsync'](_0xac5b65)));}[_0x42a870(0x4db)](_0x8e2c70){const _0x5342c6=_0x42a870;if(typeof _0x8e2c70?.[_0x5342c6(0x3e7)]!==_0x5342c6(0x17c))return![];if(_0x8e2c70[_0x5342c6(0x1bb)]!==_0x297dda[_0x5342c6(0x12a)]())return![];if(_0x8e2c70[_0x5342c6(0x3e7)]===process[_0x5342c6(0x3e7)])return![];try{return process[_0x5342c6(0x269)](_0x8e2c70['pid'],0x0),![];}catch(_0x4032a3){return _0x4032a3[_0x5342c6(0x60e)]===_0x5342c6(0xea);}}[_0x42a870(0x2f0)](){const _0x4fb214=_0x42a870;if(!this[_0x4fb214(0x2bf)])return[];const _0x54b9b4=Date['now'](),_0x3924e0=[];for(const {value:_0x29b50a}of this[_0x4fb214(0x2bf)][_0x4fb214(0x391)](_0x22fe37)){if(_0x29b50a&&(_0x29b50a[_0x4fb214(0x63c)]==null||_0x29b50a[_0x4fb214(0x63c)]>=_0x54b9b4)&&!this['_nodeDead'](_0x29b50a))_0x3924e0[_0x4fb214(0x614)](_0x29b50a);}return _0x3924e0;}[_0x42a870(0x12f)](_0x532d26=0x0){const _0x5e22fe=_0x42a870;if(!this[_0x5e22fe(0x2bf)]||!this[_0x5e22fe(0x376)])return;const _0x34ee86=Date['now']()-_0x532d26,_0x1b5829=new Set(),_0x3d9fad=[];for(const {key:_0x174124,value:_0xd2d6c2}of this[_0x5e22fe(0x2bf)]['getRange'](_0x22fe37)){if(_0xd2d6c2&&(_0xd2d6c2[_0x5e22fe(0x63c)]!=null&&_0xd2d6c2[_0x5e22fe(0x63c)]<_0x34ee86||this['_nodeDead'](_0xd2d6c2)))_0x3d9fad['push'](_0x174124);else _0x1b5829[_0x5e22fe(0x61d)](_0x46d10e(_0xd2d6c2)??_0x174124);}for(const _0x4764eb of _0x3d9fad)this[_0x5e22fe(0x162)](_0x4764eb);if(this[_0x5e22fe(0x201)]())for(const {key:_0x534cea}of this['listDesired']('node')){if(!_0x1b5829['has'](_0x534cea))this['_desired'][_0x5e22fe(0x3a3)](_0x5e22fe(0x407)+_0x534cea);}}[_0x42a870(0x65d)](_0x5a4268=null){const _0x3acf5b=_0x42a870;if(this[_0x3acf5b(0x388)]||!this[_0x3acf5b(0x376)]||!this['_statusEnv'])return;this[_0x3acf5b(0x40d)]=_0x5a4268,this[_0x3acf5b(0x54e)]=()=>this[_0x3acf5b(0x121)]();for(const _0x3f8e9a of _0x23ce58)this[_0x3acf5b(0x2d3)][_0x3acf5b(0x4e5)]['on'](_0x3f8e9a,this[_0x3acf5b(0x54e)]);this[_0x3acf5b(0x423)]();const _0x5e11c0=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x568dec;this['_hbTimer']=setInterval(()=>{const _0x55dff3=_0x3acf5b;if(this[_0x55dff3(0x40d)])try{this[_0x55dff3(0x40d)]();}catch{}this[_0x55dff3(0x423)](),this[_0x55dff3(0x12f)]();},_0x5e11c0);if(this[_0x3acf5b(0x388)]['unref'])this[_0x3acf5b(0x388)]['unref']();}['_maybePublish'](){const _0x4d441a=_0x42a870;if(!this[_0x4d441a(0x376)]||!this['_statusEnv'])return;if(Date[_0x4d441a(0x16a)]()-this[_0x4d441a(0x1d1)]<_0x25d8d0)return;this[_0x4d441a(0x423)]();}['_publishNow'](){const _0x61b709=_0x42a870;if(!this[_0x61b709(0x376)]||!this[_0x61b709(0x2bf)])return;this[_0x61b709(0x1d1)]=Date['now']();try{const _0x2ed879=[this['_buildOwnRow']()];for(const _0x19c188 of this[_0x61b709(0x4f9)]['values']())_0x2ed879[_0x61b709(0x614)](this[_0x61b709(0x4ee)](_0x19c188));const _0x106216=_0x1b606f[_0x61b709(0x26c)]?_0x1b606f[_0x61b709(0x16a)]():0x0,_0x3369cd=Promise['all'](_0x2ed879[_0x61b709(0x601)](_0x342ac9=>this['_putRowAsync'](_0x342ac9)))['catch'](()=>{});if(_0x1b606f[_0x61b709(0x26c)])_0x1b606f[_0x61b709(0x480)](_0x61b709(0x2dd),_0x1b606f[_0x61b709(0x16a)]()-_0x106216,'rows='+_0x2ed879[_0x61b709(0x2eb)]);return _0x3369cd;}catch{}}async[_0x42a870(0x12e)](){const _0x3b5023=_0x42a870;if(this[_0x3b5023(0x54e)]){for(const _0x254f8c of _0x23ce58){try{this[_0x3b5023(0x2d3)][_0x3b5023(0x4e5)][_0x3b5023(0x5d8)](_0x254f8c,this[_0x3b5023(0x54e)]);}catch{}}this[_0x3b5023(0x54e)]=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x3b5023(0x388)]=null);try{if(this[_0x3b5023(0x2bf)]&&this[_0x3b5023(0x376)])await this[_0x3b5023(0x630)](this['_rowKey']);}catch{}}async[_0x42a870(0x5dc)](){const _0x417abe=_0x42a870;if(!this[_0x417abe(0x2bf)]||!this[_0x417abe(0x376)])return;try{await this[_0x417abe(0x630)](this[_0x417abe(0x3be)]);}catch{}try{const _0x2ea02f=[];for(const {value:_0x171d39}of this[_0x417abe(0x2bf)][_0x417abe(0x391)](_0x22fe37)){if(_0x171d39?.[_0x417abe(0x343)]===process[_0x417abe(0x3e7)]&&_0x171d39[_0x417abe(0x472)])_0x2ea02f[_0x417abe(0x614)](_0x171d39[_0x417abe(0x472)]);}for(const _0x2e414e of _0x2ea02f){try{await this[_0x417abe(0x630)](_0x2e414e);}catch{}}}catch{}}async[_0x42a870(0x581)](){const _0x376e03=_0x42a870;return this[_0x376e03(0x607)](this[_0x376e03(0x3e6)]());}async[_0x42a870(0x2c3)](_0x2ae359){const _0x1d398a=_0x42a870;if(!this[_0x1d398a(0x2bf)]||!this[_0x1d398a(0x376)])return;return this['putNode'](this['_buildChildRow'](_0x2ae359));}[_0x42a870(0x4ee)]({pid:_0x9fcc7a,startedAt:_0x1182c1,kind:_0x29cfa9,supervisorKey:_0x5f2923,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x42a870(0xf4),meta:meta=null,stats:stats=null}){const _0x1427ee=_0x42a870,_0x2d4b4b=Date['now'](),_0x241e7d=_0x26e303(_0x9fcc7a,_0x1182c1);return{'nodeKey':_0x38bc5b(_0x241e7d,'0'),'processKey':_0x241e7d,'instanceId':'0','pid':_0x9fcc7a,'startedAt':_0x1182c1,'ppid':process[_0x1427ee(0x3e7)],'host':_0x297dda[_0x1427ee(0x12a)](),'supervisorKey':_0x5f2923,'slot':slot,'slotKey':slotKey,'kind':_0x29cfa9,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x2d4b4b,'expiresAt':_0x2d4b4b+_0x320f2c,'caps':this[_0x1427ee(0x243)](_0x29cfa9,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x42a870(0x501)](_0x311ff9){const _0x3d1713=_0x42a870;if(!_0x311ff9?.[_0x3d1713(0x3e7)])return null;const _0x51a51e=_0x26e303(_0x311ff9[_0x3d1713(0x3e7)],_0x311ff9['startedAt']);this[_0x3d1713(0x4f9)]['set'](_0x51a51e,{..._0x311ff9,'supervisorKey':_0x311ff9[_0x3d1713(0x2a8)]??this[_0x3d1713(0x211)]});if(this[_0x3d1713(0x376)])await this['publishChildRow'](this[_0x3d1713(0x4f9)]['get'](_0x51a51e))[_0x3d1713(0x255)]?.(()=>{});return _0x51a51e;}[_0x42a870(0x493)](_0x331817){const _0x3c7455=_0x42a870;if(!_0x331817)return;return this[_0x3c7455(0x4f9)][_0x3c7455(0x5ed)](_0x331817),this[_0x3c7455(0x630)](_0x331817);}[_0x42a870(0x2a6)](){const _0x5275a2=_0x42a870,_0x4d73fe=Date['now'](),_0x1dcf36=process[_0x5275a2(0x2e1)](),_0x4836ac=(_0x4d73fe-this[_0x5275a2(0x5cf)])*0x3e8;if(_0x4836ac>=0x3d090){const _0x56bff2=_0x1dcf36[_0x5275a2(0x4fd)]-this['_lastCpuUsage'][_0x5275a2(0x4fd)]+(_0x1dcf36[_0x5275a2(0x268)]-this[_0x5275a2(0x256)][_0x5275a2(0x268)]),_0x33567f=_0x297dda['cpus']()[_0x5275a2(0x2eb)]||0x1;this[_0x5275a2(0x54f)]=Math['min'](0x64,Math['round'](_0x56bff2/(_0x4836ac*_0x33567f)*0x64)),this[_0x5275a2(0x35a)]=Math[_0x5275a2(0x1df)](_0x4836ac/0x3e8),this[_0x5275a2(0x256)]=_0x1dcf36,this['_lastCpuAt']=_0x4d73fe;}const _0x527296=process['memoryUsage']();let _0x5dd018=null;if(this[_0x5275a2(0x18b)][_0x5275a2(0x3ea)]>0x0){let _0x179bf6=0x0;for(const _0x446497 of this[_0x5275a2(0x18b)][_0x5275a2(0x624)]())_0x179bf6+=_0x446497[_0x5275a2(0x5b9)]||0x0;_0x5dd018={'count':this[_0x5275a2(0x18b)][_0x5275a2(0x3ea)],'heapUsed':_0x179bf6};}return{'rss':_0x527296[_0x5275a2(0x37a)],'heapUsed':_0x527296[_0x5275a2(0x5b9)],'heapTotal':_0x527296[_0x5275a2(0x4d8)],'external':_0x527296[_0x5275a2(0x4a0)],'cpuPct':this[_0x5275a2(0x54f)],'cpuWindowMs':this[_0x5275a2(0x35a)]??null,'threads':_0x5dd018,'at':_0x4d73fe};}[_0x42a870(0x303)](_0x13af51,_0x30a33d){const _0x3b75e4=_0x42a870;if(!_0x13af51||!_0x30a33d)return;this[_0x3b75e4(0x18b)][_0x3b75e4(0x2c2)](_0x13af51,_0x30a33d);}[_0x42a870(0x5ab)](_0x7480b4){const _0x3fbc3b=_0x42a870;this[_0x3fbc3b(0x18b)][_0x3fbc3b(0x5ed)](_0x7480b4);}['updateSupervisedChildStats'](_0x998655,_0x18c7fc,_0x3f61d6=undefined){const _0x45cfb6=_0x42a870,_0x222e56=this['_children'][_0x45cfb6(0x3aa)](_0x998655);if(!_0x222e56||!_0x18c7fc)return;if(_0x3f61d6!==undefined)_0x222e56[_0x45cfb6(0x2f8)]=_0x3f61d6;_0x222e56[_0x45cfb6(0x3de)]={'rss':_0x18c7fc[_0x45cfb6(0x37a)]??null,'heapUsed':_0x18c7fc[_0x45cfb6(0x5b9)]??null,'heapTotal':_0x18c7fc['heapTotal']??null,'external':_0x18c7fc[_0x45cfb6(0x4a0)]??null,'cpuPct':_0x18c7fc[_0x45cfb6(0x135)]??null,'cpuWindowMs':_0x18c7fc[_0x45cfb6(0x47a)]??null,'threads':_0x18c7fc['threads']??null,'claims':_0x18c7fc['claims']??null,'envsOpen':_0x18c7fc['envsOpen']??null,'at':Date[_0x45cfb6(0x16a)]()};}[_0x42a870(0x3e6)](){const _0x1503ce=_0x42a870,_0x1a7911=Date[_0x1503ce(0x16a)](),_0x25ef4f=this['okdb'][_0x1503ce(0x1cd)]||{},_0x4ec859=this[_0x1503ce(0x214)]||_0x1503ce(0x3b3);return{'nodeKey':this[_0x1503ce(0x3be)],'processKey':this[_0x1503ce(0x211)],'instanceId':this[_0x1503ce(0x4ba)],'pid':process[_0x1503ce(0x3e7)],'startedAt':this[_0x1503ce(0x36c)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x1503ce(0x343)]===_0x1503ce(0x17c)?process['ppid']:null,'host':_0x297dda[_0x1503ce(0x12a)](),'supervisorKey':this[_0x1503ce(0x13a)]??null,'kind':_0x4ec859,'role':{'engines':!!_0x25ef4f['engines'],'asyncProcessors':!!_0x25ef4f[_0x1503ce(0x667)],'compaction':_0x25ef4f['compaction'],'http':_0x25ef4f[_0x1503ce(0x5d0)]},'listenAddr':this[_0x1503ce(0x648)]??null,'heartbeatAt':_0x1a7911,'expiresAt':_0x1a7911+_0x320f2c,'caps':this[_0x1503ce(0x243)](_0x4ec859,_0x25ef4f),'lifecycle':{'state':_0x1503ce(0xf4),'desiredVersionApplied':null},'meta':{...this[_0x1503ce(0x5ad)]},'processing':_0x25ef4f['asyncProcessors']?this[_0x1503ce(0x151)]():null,'stats':this[_0x1503ce(0x2a6)]()};}[_0x42a870(0x151)](){const _0x4b410e=_0x42a870,_0x35aa57=[];try{for(const [_0x2587a5,_0x34aecb]of this['okdb'][_0x4b410e(0x5bd)]){if(_0x2587a5[_0x4b410e(0x3cc)]('~'))continue;for(const _0x7840d of _0x34aecb['processor'][_0x4b410e(0xf1)]())_0x35aa57[_0x4b410e(0x614)]({..._0x7840d,'env':_0x2587a5});}}catch{}return{'policy':this['okdb'][_0x4b410e(0x34e)]??null,'processors':_0x35aa57};}[_0x42a870(0x201)](){const _0x17c1d6=_0x42a870;if(this[_0x17c1d6(0x1d6)])return!![];const _0x1ba4d1=this['okdb'][_0x17c1d6(0x323)];if(!_0x1ba4d1)return![];return this[_0x17c1d6(0x1d6)]=_0x1ba4d1[_0x17c1d6(0x2bc)](_0x421837,{'dupSort':![]}),this[_0x17c1d6(0x477)]=_0x1ba4d1[_0x17c1d6(0x2bc)](_0x2025ea,{'dupSort':![]}),!![];}[_0x42a870(0x25c)](){const _0x575644=_0x42a870;return!!this[_0x575644(0x1d6)];}[_0x42a870(0x21d)](_0x1fc893,_0xe43a76){const _0x57a40c=_0x42a870;if(!this[_0x57a40c(0x201)]())return null;return this[_0x57a40c(0x1d6)]['get'](_0x1fc893+'/'+_0xe43a76)??null;}[_0x42a870(0x252)](_0x3b2804,_0x50c6b9,_0x127357){const _0x13adf1=_0x42a870;if(!this[_0x13adf1(0x201)]())return null;const _0x240504=_0x3b2804+'/'+_0x50c6b9;let _0x153b03;return this[_0x13adf1(0x1d6)]['transactionSync'](()=>{const _0x6c90f6=_0x13adf1,_0x370921=this[_0x6c90f6(0x1d6)][_0x6c90f6(0x3aa)](_0x240504)||{'version':0x0};_0x153b03=(_0x370921[_0x6c90f6(0x2ea)]||0x0)+0x1,this[_0x6c90f6(0x1d6)][_0x6c90f6(0x42f)](_0x240504,{..._0x370921,..._0x127357,'version':_0x153b03,'updatedAt':Date[_0x6c90f6(0x16a)]()});}),_0x153b03;}[_0x42a870(0x5ea)](_0x5c135f){const _0x1dbb8b=_0x42a870;if(!this[_0x1dbb8b(0x201)]())return[];const _0x55f58c=_0x5c135f+'/',_0x5792e7=[];for(const {key:_0x16c1ee,value:_0x2e1bd2}of this['_desired']['getRange']({'start':_0x55f58c,'end':_0x55f58c+'ÿ'})){if(typeof _0x16c1ee!==_0x1dbb8b(0x380)||!_0x16c1ee['startsWith'](_0x55f58c))break;_0x5792e7['push']({'key':_0x16c1ee[_0x1dbb8b(0x45e)](_0x55f58c[_0x1dbb8b(0x2eb)]),'value':_0x2e1bd2});}return _0x5792e7;}[_0x42a870(0x3c9)](_0xd371db){if(!this['_ensureDesired']())return null;return this['_cmd']['get'](_0xd371db)??null;}[_0x42a870(0x1c3)](_0x478ebf,_0x1d9c8e,_0x2f772e={}){const _0x22faab=_0x42a870;if(!this['_ensureDesired']())return null;let _0x370b32;return this['_cmd'][_0x22faab(0x226)](()=>{const _0xf15677=_0x22faab,_0x1fe9bd=this[_0xf15677(0x477)]['get'](_0x478ebf)||{'epoch':0x0};_0x370b32=(_0x1fe9bd[_0xf15677(0x3f7)]||0x0)+0x1,this[_0xf15677(0x477)][_0xf15677(0x42f)](_0x478ebf,{..._0x1fe9bd,..._0x2f772e,'cmd':_0x1d9c8e,'epoch':_0x370b32,'updatedAt':Date[_0xf15677(0x16a)]()});}),_0x370b32;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x59d1c0,'nodeKey':_0x26e303,'logicalKey':_0x3d454f,'slotKey':_0x101cc0,'PROCESS_ENV':_0x128dd8,'NODE_TYPE':_0x22fe37},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x5d9114=_0x4b361c;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x1f270e=require$$0$4,{EVENTS:_0xaa13c7,CHANGE_ACTIONS:_0x18930f}=requireOkdbEnums(),{LOOP:_0x28c49f}=requireOkdbLoopMonitor(),_0x4715d4=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x7fe3d=0x5,_0x3364cd=0x2710;class _0x3e5c11 extends _0x1f270e{constructor(_0x48d816,_0x1f8013={}){const _0x231e4a=_0x2368;super(),this[_0x231e4a(0x2d3)]=_0x48d816,this[_0x231e4a(0x4ed)]=_0x1f8013['quantum']??_0x4715d4,this[_0x231e4a(0x126)]=_0x1f8013[_0x231e4a(0x5e2)]??_0x7fe3d,this['_dedupeMax']=_0x1f8013['dedupeMax']??_0x3364cd,this[_0x231e4a(0x1ba)]=![],this[_0x231e4a(0x561)]=new Map(),this['_baselines']=new Map(),this[_0x231e4a(0x2d5)]=new Map(),this['_flushTimer']=null,this[_0x231e4a(0x5a7)]=![],this['_seen']=new Set(),this[_0x231e4a(0x15f)]=_0x307536=>this[_0x231e4a(0x17d)](_0x307536),this[_0x231e4a(0x49d)]=_0x257552=>this['_handlePoke'](_0x257552),this[_0x231e4a(0x5db)]=()=>this[_0x231e4a(0x2e9)]();}[_0x5d9114(0x545)](){const _0x4d5c24=_0x5d9114;if(this['_started'])return;this[_0x4d5c24(0x1ba)]=!![];for(const [_0xcf6370,_0x4c6b2e]of this['okdb'][_0x4d5c24(0x5bd)]){if(_0xcf6370[_0x4d5c24(0x3cc)]('~'))continue;try{this[_0x4d5c24(0x5fd)][_0x4d5c24(0x2c2)](_0xcf6370,_0x4c6b2e[_0x4d5c24(0x65c)]()||0x0);}catch{}}const {events:_0x44a88a}=this[_0x4d5c24(0x2d3)];_0x44a88a['on'](_0xaa13c7[_0x4d5c24(0x293)],this[_0x4d5c24(0x15f)]),_0x44a88a['on'](_0xaa13c7['ITEM_UPDATE'],this[_0x4d5c24(0x15f)]),_0x44a88a['on'](_0xaa13c7[_0x4d5c24(0x3a5)],this[_0x4d5c24(0x15f)]),_0x44a88a['on'](_0xaa13c7['SYSTEM_POKE'],this[_0x4d5c24(0x49d)]),_0x44a88a[_0x4d5c24(0x292)](_0xaa13c7[_0x4d5c24(0x36e)],this['_onStop']);}[_0x5d9114(0x2e9)](){const _0x3c5db5=_0x5d9114;if(!this[_0x3c5db5(0x1ba)])return;this[_0x3c5db5(0x1ba)]=![];const {events:_0x1b24f7}=this['okdb'];_0x1b24f7[_0x3c5db5(0x5d8)](_0xaa13c7[_0x3c5db5(0x293)],this[_0x3c5db5(0x15f)]),_0x1b24f7[_0x3c5db5(0x5d8)](_0xaa13c7[_0x3c5db5(0x234)],this['_onItem']),_0x1b24f7[_0x3c5db5(0x5d8)](_0xaa13c7[_0x3c5db5(0x3a5)],this[_0x3c5db5(0x15f)]),_0x1b24f7[_0x3c5db5(0x5d8)](_0xaa13c7[_0x3c5db5(0x127)],this[_0x3c5db5(0x49d)]);try{_0x1b24f7['off'](_0xaa13c7[_0x3c5db5(0x36e)],this['_onStop']);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this[_0x3c5db5(0x2d5)]['clear'](),this[_0x3c5db5(0x561)][_0x3c5db5(0x479)](),this[_0x3c5db5(0x5fd)][_0x3c5db5(0x479)](),this[_0x3c5db5(0x618)][_0x3c5db5(0x479)]();}[_0x5d9114(0x117)](_0x19bc3f,_0x4ada7a,_0x8126e2,_0x254240){return _0x19bc3f+'\x00'+_0x4ada7a+'\x00'+_0x8126e2+'\x00'+_0x254240;}[_0x5d9114(0x5ac)](_0x189513,_0x832dc0,_0x389f9a,_0x3b41da){const _0x2933b9=_0x5d9114,_0x4eb80f=this['_dedupeKey'](_0x189513,_0x832dc0,_0x389f9a,_0x3b41da);if(this[_0x2933b9(0x618)]['has'](_0x4eb80f))return![];this[_0x2933b9(0x618)][_0x2933b9(0x61d)](_0x4eb80f);if(this[_0x2933b9(0x618)][_0x2933b9(0x3ea)]>this[_0x2933b9(0x1e3)]){const _0x5ac00e=this[_0x2933b9(0x618)][_0x2933b9(0x624)]()[_0x2933b9(0x419)]()['value'];this[_0x2933b9(0x618)]['delete'](_0x5ac00e);}return!![];}[_0x5d9114(0x17d)](_0x2f57f6){const _0x5e144e=_0x5d9114;if(!this[_0x5e144e(0x1ba)]||!_0x2f57f6)return;const {env:_0x3ff3cd,type:_0x4b618e,key:_0x44c2b7,clock:_0x491291,origin:_0x3542ce,action:_0x3430e6,newValue:_0x48ba28,oldValue:_0x56869c}=_0x2f57f6;if(_0x3ff3cd==null||_0x4b618e==null||_0x44c2b7==null)return;if(typeof _0x3ff3cd===_0x5e144e(0x380)&&_0x3ff3cd['startsWith']('~'))return;if(typeof _0x4b618e===_0x5e144e(0x380)&&_0x4b618e[_0x5e144e(0x3cc)]('~'))return;if(!this[_0x5e144e(0x5ac)](_0x3ff3cd,_0x4b618e,_0x44c2b7,_0x491291))return;const _0x100883=_0x3430e6===_0x18930f['REMOVE']?_0x5e144e(0x1b1):_0x5e144e(0x42f);this[_0x5e144e(0x464)](_0x5e144e(0x19e),{'env':_0x3ff3cd,'type':_0x4b618e,'key':_0x44c2b7,'op':_0x100883,'clock':_0x491291,'origin':_0x3542ce,'value':_0x100883===_0x5e144e(0x1b1)?null:_0x48ba28,'prevValue':_0x56869c});}['_handlePoke'](_0x147796){const _0x25afe5=_0x5d9114;if(!this[_0x25afe5(0x1ba)])return;if(!_0x147796||typeof _0x147796[_0x25afe5(0x46e)]!==_0x25afe5(0x380)||typeof _0x147796[_0x25afe5(0x49b)]!==_0x25afe5(0x380))return;const {env:_0x46c0ec,type:_0x45480a}=_0x147796;if(_0x46c0ec[_0x25afe5(0x3cc)]('~')||_0x45480a['startsWith']('~'))return;this[_0x25afe5(0x2d5)][_0x25afe5(0x2c2)](_0x46c0ec+'\x00'+_0x45480a,{'env':_0x46c0ec,'type':_0x45480a}),this['_scheduleFlush']();}['_scheduleFlush'](){const _0x42d346=_0x5d9114;if(this[_0x42d346(0x3af)])return;const _0x4d3fe2=()=>{const _0x363e3d=_0x42d346;this[_0x363e3d(0x3af)]=null,this[_0x363e3d(0x1b0)]()[_0x363e3d(0x255)](()=>{});};this[_0x42d346(0x3af)]=setTimeout(_0x4d3fe2,this[_0x42d346(0x126)]>0x0?this[_0x42d346(0x126)]:0x0);}async[_0x5d9114(0x1b0)](){const _0x176c58=_0x5d9114;if(this['_draining']){this[_0x176c58(0x244)]();return;}this['_draining']=!![];try{const _0x1f1bc9=[...this[_0x176c58(0x2d5)]['values']()];this[_0x176c58(0x2d5)][_0x176c58(0x479)]();let _0x4fe65d=![];for(const {env:_0xc9f7b2,type:_0x15c17b}of _0x1f1bc9){try{const _0x4c5fad=await this['_drainOne'](_0xc9f7b2,_0x15c17b);if(_0x4c5fad)_0x4fe65d=!![];}catch{this['_pending'][_0x176c58(0x2c2)](_0xc9f7b2+'\x00'+_0x15c17b,{'env':_0xc9f7b2,'type':_0x15c17b}),_0x4fe65d=!![];}}if(_0x4fe65d||this[_0x176c58(0x2d5)]['size']>0x0)this[_0x176c58(0x244)]();}finally{this[_0x176c58(0x5a7)]=![];}}async['_drainOne'](_0x550865,_0x1eb598){const _0x584f69=_0x5d9114,_0x505a12=await this[_0x584f69(0x2d3)]['_openEnvLazy'](_0x550865),_0x253bc9=_0x550865+'\x00'+_0x1eb598;!this['_cursors']['has'](_0x253bc9)&&(!this['_baselines']['has'](_0x550865)&&this[_0x584f69(0x5fd)][_0x584f69(0x2c2)](_0x550865,_0x505a12['getClock']()||0x0),this[_0x584f69(0x561)]['set'](_0x253bc9,this[_0x584f69(0x5fd)][_0x584f69(0x3aa)](_0x550865)));const _0x3d1383=this[_0x584f69(0x561)][_0x584f69(0x3aa)](_0x253bc9),_0x1b431b=_0x505a12['getClock'](_0x1eb598)||0x0;if(_0x1b431b<=_0x3d1383)return![];const _0x201616=_0x3d1383+this['_quantum'],_0x772b08=Math['min'](_0x1b431b,_0x201616),_0x33e32f=_0x28c49f['enabled']?_0x28c49f[_0x584f69(0x16a)]():0x0,_0x52eefa=Array[_0x584f69(0x36d)](_0x505a12[_0x584f69(0x5e0)](_0x1eb598,_0x3d1383+0x1,_0x772b08));let _0x32ed64=_0x3d1383;for(const _0x25a34e of _0x52eefa){const {clock:_0x3bcb64,key:_0x341b1a,action:_0x23b699,origin:_0x486659}=_0x25a34e;if(_0x3bcb64>_0x32ed64)_0x32ed64=_0x3bcb64;if(_0x341b1a==null)continue;if(!this['_markSeen'](_0x550865,_0x1eb598,_0x341b1a,_0x3bcb64))continue;let _0x5b3081,_0x2b4261;if(_0x23b699===_0x18930f[_0x584f69(0x1d7)])_0x5b3081=_0x584f69(0x1b1),_0x2b4261=null;else{const _0x1047a3=_0x505a12[_0x584f69(0x3aa)](_0x1eb598,_0x341b1a);_0x1047a3==null?(_0x5b3081='remove',_0x2b4261=null):(_0x5b3081=_0x584f69(0x42f),_0x2b4261=_0x1047a3);}this[_0x584f69(0x464)]('change',{'env':_0x550865,'type':_0x1eb598,'key':_0x341b1a,'op':_0x5b3081,'clock':_0x3bcb64,'origin':_0x486659,'value':_0x2b4261});}if(_0x28c49f[_0x584f69(0x26c)])_0x28c49f[_0x584f69(0x480)]('feed:'+_0x550865+':'+_0x1eb598,_0x28c49f[_0x584f69(0x16a)]()-_0x33e32f,'n='+_0x52eefa[_0x584f69(0x2eb)]);return this['_cursors'][_0x584f69(0x2c2)](_0x253bc9,Math[_0x584f69(0x47e)](_0x32ed64,_0x772b08)),_0x505a12[_0x584f69(0x65c)](_0x1eb598)>_0x772b08;}[_0x5d9114(0x626)](){const _0x2dc7c6=_0x5d9114;return{'started':this[_0x2dc7c6(0x1ba)],'quantum':this[_0x2dc7c6(0x4ed)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x2dc7c6(0x3e5)]([...this[_0x2dc7c6(0x561)][_0x2dc7c6(0x427)]()][_0x2dc7c6(0x601)](([_0x43f316,_0x332e6b])=>[_0x43f316[_0x2dc7c6(0x38b)]('\x00',':'),_0x332e6b])),'pending':this[_0x2dc7c6(0x2d5)][_0x2dc7c6(0x3ea)],'seen':this[_0x2dc7c6(0x618)][_0x2dc7c6(0x3ea)]};}}return _0x3e5c11[_0x5d9114(0xe5)]=_0x4715d4,okdbChangefeed={'OKDBChangefeed':_0x3e5c11},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x40f568=_0x4b361c;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x5468af=require$$1$2,_0x376275=require$$1,{EVENTS:_0x54a1fc}=requireOkdbEnums(),_0x3fef7c=require$$0,{slotKey:_0xf72e58}=requireOkdbProcessRegistry(),_0xb6955d=0xfa,_0x16d07c=0xfa0,_0x1e1416=0x5,_0x4cae38=0x2710,_0x10ac10=0xbb8,_0x5b9bf5=0x7d0,_0x1d8ea3=_0x40f568(0x131),_0x102d63=_0x40f568(0x18c),_0xc2631='log',_0x4c5b04=_0x40f568(0x3de),_0x30b6a4=[_0x54a1fc['VIEW_PROGRESS'],_0x54a1fc[_0x40f568(0x574)],_0x54a1fc[_0x40f568(0x47b)],_0x54a1fc['FTS_RESET'],_0x54a1fc[_0x40f568(0x465)],_0x54a1fc[_0x40f568(0x62b)],_0x54a1fc[_0x40f568(0x265)],_0x54a1fc[_0x40f568(0x2b9)],_0x40f568(0x5e5),_0x40f568(0x572),'processor:error',_0x40f568(0x50b),_0x40f568(0x4c9),_0x40f568(0x20c)],_0x4d710c=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x40ea2b({workers:_0x2fc46c,makeOkdb:_0x19dfc6,port:_0x5051b3,primaryOkdb:_0x12a268,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x162a47=_0x40f568;if(_0x5468af[_0x162a47(0x48f)])return childEntry&&_0x5468af[_0x162a47(0x5cc)]({'exec':_0x376275[_0x162a47(0x3a4)](__dirname,_0x162a47(0x633)),'args':[],'execArgv':((()=>{const _0x45a56c=_0x162a47,_0x5133b7=[];for(let _0x171d1c=0x0;_0x171d1c<process[_0x45a56c(0x56a)][_0x45a56c(0x2eb)];_0x171d1c++){const _0x3d6e30=process['execArgv'][_0x171d1c];if(_0x3d6e30['startsWith']('--test')||_0x3d6e30[_0x45a56c(0x3cc)](_0x45a56c(0x3ed))||_0x3d6e30[_0x45a56c(0x3cc)](_0x45a56c(0x228)))continue;if(_0x3d6e30==='-e'||_0x3d6e30===_0x45a56c(0x17a)||_0x3d6e30==='-p'||_0x3d6e30===_0x45a56c(0x297)){_0x171d1c++;continue;}_0x5133b7[_0x45a56c(0x614)](_0x3d6e30);}return _0x5133b7;})())}),_0x59eeef({'workers':_0x2fc46c,'port':_0x5051b3,'primaryOkdb':_0x12a268,'workerEnv':workerEnv});return _0x4374ac({'makeOkdb':_0x19dfc6,'port':_0x5051b3});}function _0x59eeef({workers:_0x1626b0,port:_0x1b776b,primaryOkdb:_0x4f7da7,workerEnv:_0x5b6c74}){const _0x7eaec9=_0x40f568,_0x37706a=new Map(),_0x4f062c=new Map();let _0x2096bb=![];const _0x42692c=_0x29a3b3=>_0x29a3b3?.[_0x7eaec9(0x31a)],_0x56d543=_0x1ad2d1=>{const _0x17d7a3=_0x7eaec9,_0x202acb=_0x5468af['fork']({...process.env,..._0x5b6c74||{},'OKDB_CLUSTER_SLOT':String(_0x1ad2d1)});return _0x202acb[_0x17d7a3(0x31a)]=_0x1ad2d1,_0x37706a[_0x17d7a3(0x2c2)](_0x202acb[_0x17d7a3(0x22a)][_0x17d7a3(0x3e7)],{'worker':_0x202acb,'startedAt':Date[_0x17d7a3(0x16a)](),'slot':_0x1ad2d1}),_0x202acb['on'](_0x17d7a3(0x31b),_0x36eb3a=>{const _0x301393=_0x17d7a3;console[_0x301393(0x4f7)](_0x301393(0x1a9)+_0x202acb['process'][_0x301393(0x3e7)]+_0x301393(0x5af)+(_0x36eb3a?.['message']??_0x36eb3a));}),_0x202acb['on'](_0x17d7a3(0x4ac),()=>_0x3defd0()),_0x202acb;},_0x50e228=_0x103cc6=>{const _0x41e35b=_0x7eaec9;for(const {worker:_0x4ae217}of _0x37706a[_0x41e35b(0x624)]()){if(_0x4ae217['isDead']()||!_0x4ae217[_0x41e35b(0x389)]())continue;try{_0x4ae217['send'](_0x103cc6);}catch{}}};_0x4f7da7?.[_0x7eaec9(0x17b)]?.({'kind':_0x7eaec9(0x608),'listenAddr':':'+_0x1b776b})[_0x7eaec9(0x255)](()=>{}),_0x4f7da7?.[_0x7eaec9(0x532)]?.[_0x7eaec9(0x5a1)]?.({'workersConfigured':_0x1626b0});const _0x20c757={'engines':![],'asyncProcessors':![],'compaction':_0x7eaec9(0x573),'http':!![]},_0x3defd0=()=>{const _0x45e08e=_0x7eaec9,_0x1c5f7b=_0x4f7da7?.[_0x45e08e(0x532)];if(!_0x1c5f7b||!_0x1c5f7b[_0x45e08e(0x376)])return;const _0x31eef2=_0x1c5f7b['selfKey'];for(const {worker:_0xe936c0,startedAt:_0x53d54f,slot:_0x4d1264,stats:_0x955b45}of _0x37706a[_0x45e08e(0x624)]()){if(_0xe936c0[_0x45e08e(0xf6)]())continue;const _0x4ee4b0=_0x1c5f7b[_0x45e08e(0x25c)]?.()&&_0x1c5f7b[_0x45e08e(0x21d)]('slot',_0x5a0a58(_0x4d1264))?.[_0x45e08e(0x1e0)]===!![];_0x1c5f7b[_0x45e08e(0x2c3)]({'pid':_0xe936c0['process'][_0x45e08e(0x3e7)],'startedAt':_0x53d54f,'kind':_0x45e08e(0x311),'supervisorKey':_0x31eef2,'slot':_0x4d1264,'slotKey':_0x5a0a58(_0x4d1264),'role':_0x20c757,'listenAddr':':'+_0x1b776b,'lifecycle':_0x4ee4b0?_0x45e08e(0x1f7):_0x45e08e(0xf4),'stats':_0x955b45??null})['catch'](()=>{});}},_0x5a0a58=_0x1934e6=>_0xf72e58(_0x7eaec9(0x1e9)+_0x1b776b,_0x1934e6),_0x3de097=_0xacb531=>{const _0x41554b=_0x7eaec9,_0x21711e=_0x4f7da7?.['processes'];if(!_0x21711e?.['hasDesired']?.())return![];return _0x21711e[_0x41554b(0x21d)](_0x41554b(0x3df),_0x5a0a58(_0xacb531))?.[_0x41554b(0x1e0)]===!![];};for(let _0x5efc6d=0x0;_0x5efc6d<_0x1626b0;_0x5efc6d++){const _0x1b45ba=_0x3de097(_0x5efc6d);_0x4f062c[_0x7eaec9(0x2c2)](_0x5efc6d,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1b45ba,'respawnTimer':null}),_0x1b45ba?console[_0x7eaec9(0x4f7)](_0x7eaec9(0x215)+_0x5efc6d+_0x7eaec9(0x130)):_0x56d543(_0x5efc6d);}const _0x226817=()=>{const _0x3a7b65=_0x7eaec9,_0x1191ed=_0x4f7da7?.[_0x3a7b65(0x532)];if(!_0x1191ed?.[_0x3a7b65(0x376)]||!_0x1191ed['hasDesired']?.())return;for(const [_0x192d43,_0x4ad7d8]of _0x4f062c[_0x3a7b65(0x427)]()){const _0x57264b=_0x1191ed[_0x3a7b65(0x21d)](_0x3a7b65(0x3df),_0x5a0a58(_0x192d43)),_0x38ed1f=_0x57264b?.[_0x3a7b65(0x1e0)]===!![],_0x503ce3=_0x57264b?.[_0x3a7b65(0x269)]===!![];if(_0x38ed1f&&!_0x4ad7d8['dead']){_0x4ad7d8[_0x3a7b65(0x4a4)]=!![];_0x4ad7d8[_0x3a7b65(0x2a9)]&&(clearTimeout(_0x4ad7d8[_0x3a7b65(0x2a9)]),_0x4ad7d8['respawnTimer']=null);for(const {worker:_0x2a3db8}of _0x37706a[_0x3a7b65(0x624)]()){if(_0x42692c(_0x2a3db8)!==_0x192d43||_0x2a3db8[_0x3a7b65(0xf6)]())continue;try{if(_0x503ce3)_0x2a3db8[_0x3a7b65(0x22a)][_0x3a7b65(0x269)]('SIGKILL');else _0x2a3db8[_0x3a7b65(0x389)]()&&_0x2a3db8[_0x3a7b65(0x54d)]();}catch{}}console[_0x3a7b65(0x4f7)](_0x3a7b65(0x5d3)+(_0x503ce3?_0x3a7b65(0x315):_0x3a7b65(0x339))+_0x3a7b65(0x309)+_0x192d43+'\x20(durable\x20desired-state)');}else{if(!_0x38ed1f&&_0x4ad7d8[_0x3a7b65(0x4a4)]&&_0x57264b){_0x4ad7d8[_0x3a7b65(0x4a4)]=![],_0x4ad7d8['deaths']=[],_0x4ad7d8[_0x3a7b65(0x50f)]=0x0;const _0x50d0d9=[..._0x37706a['values']()][_0x3a7b65(0x28c)](({worker:_0x1522a5})=>_0x42692c(_0x1522a5)===_0x192d43&&!_0x1522a5['isDead']());!_0x50d0d9&&!_0x2096bb&&(_0x56d543(_0x192d43),console['log'](_0x3a7b65(0x5aa)+_0x192d43));}}}},_0x25750c=()=>{try{_0x226817();}catch{}};_0x4f7da7?.['events']?.['on']?.(_0x54a1fc[_0x7eaec9(0x425)],_0x25750c);const _0x4a4971=[];if(_0x4f7da7?.[_0x7eaec9(0x4e5)]?.['on'])for(const _0x48b483 of _0x30b6a4){const _0x444c9d=_0x48b2b6=>{_0x50e228({[_0x1d8ea3]:_0x102d63,'event':_0x48b483,'data':_0x48b2b6??{}});};_0x4f7da7[_0x7eaec9(0x4e5)]['on'](_0x48b483,_0x444c9d),_0x4a4971[_0x7eaec9(0x614)]({'event':_0x48b483,'handler':_0x444c9d});}const _0x2c48b5=setInterval(()=>{_0x226817(),_0x3defd0();},_0x4d710c);_0x2c48b5['unref']?.();const _0x1deb65=(_0x15402a,_0x3be158)=>{const _0x3a8dde=_0x7eaec9;if(!_0x3be158||typeof _0x3be158!=='object'||_0x3be158[_0x1d8ea3]!==_0xc2631)return;if(!_0x4f7da7?.[_0x3a8dde(0x4f7)]?.['ingest'])return;const _0x247aa7=_0x3be158[_0x3a8dde(0x5ff)]||{};_0x4f7da7[_0x3a8dde(0x4f7)][_0x3a8dde(0x32e)]({..._0x247aa7,'msg':'[w'+_0x3be158[_0x3a8dde(0x3df)]+']\x20'+(_0x247aa7[_0x3a8dde(0x3dc)]??''),'meta':{..._0x247aa7[_0x3a8dde(0x664)]||{},'worker':_0x3be158[_0x3a8dde(0x3df)],'workerPid':_0x3be158[_0x3a8dde(0x3e7)]}});};_0x5468af['on'](_0x7eaec9(0x29c),_0x1deb65);const _0x1d07d1=(_0xa1861c,_0x4ed5f1)=>{const _0x392711=_0x7eaec9;if(!_0x4ed5f1||typeof _0x4ed5f1!==_0x392711(0x20e)||_0x4ed5f1[_0x1d8ea3]!==_0x4c5b04)return;const _0xbda037=_0x37706a[_0x392711(0x3aa)](_0xa1861c[_0x392711(0x22a)][_0x392711(0x3e7)]);if(_0xbda037)_0xbda037[_0x392711(0x3de)]={..._0x4ed5f1['stats'],'at':Date[_0x392711(0x16a)]()};};_0x5468af['on'](_0x7eaec9(0x29c),_0x1d07d1),_0x5468af['on'](_0x7eaec9(0x542),(_0x43c0f1,_0x5b2131,_0x39da6b)=>{const _0x3da6ca=_0x7eaec9,_0x33e0da=_0x43c0f1[_0x3da6ca(0x22a)][_0x3da6ca(0x3e7)],_0x327e6b=_0x42692c(_0x43c0f1),_0x5bc400=_0x37706a[_0x3da6ca(0x3aa)](_0x33e0da);if(_0x5bc400&&_0x4f7da7?.[_0x3da6ca(0x532)])_0x4f7da7['processes']['removeNode'](_0x33e0da+':'+_0x5bc400['startedAt'])[_0x3da6ca(0x255)](()=>{});_0x37706a[_0x3da6ca(0x5ed)](_0x33e0da),console['log'](_0x3da6ca(0x1a9)+_0x33e0da+_0x3da6ca(0x526)+(_0x327e6b??'?')+_0x3da6ca(0x216)+(_0x3da6ca(0x141)+_0x5b2131+_0x3da6ca(0x460)+(_0x39da6b??_0x3da6ca(0x190))+_0x3da6ca(0x347)+_0x37706a[_0x3da6ca(0x3ea)]+_0x3da6ca(0x4f4))),_0x3defd0();if(_0x2096bb||_0x327e6b==null)return;const _0x1e0fa2=_0x4f062c['get'](_0x327e6b);if(!_0x1e0fa2||_0x1e0fa2[_0x3da6ca(0x4a4)])return;const _0x4463ce=Date[_0x3da6ca(0x16a)]();_0x1e0fa2[_0x3da6ca(0x55d)][_0x3da6ca(0x614)](_0x4463ce),_0x1e0fa2['deaths']=_0x1e0fa2[_0x3da6ca(0x55d)][_0x3da6ca(0x1c6)](_0x67ca15=>_0x4463ce-_0x67ca15<=_0x4cae38);if(_0x1e0fa2['deaths']['length']>=_0x1e1416){_0x1e0fa2[_0x3da6ca(0x4a4)]=!![],console['error']('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x327e6b+'\x20died\x20'+_0x1e0fa2['deaths'][_0x3da6ca(0x2eb)]+_0x3da6ca(0x3ff)+(_0x4cae38+_0x3da6ca(0x45a)+_0x37706a[_0x3da6ca(0x3ea)]+_0x3da6ca(0x1af)));return;}_0x1e0fa2[_0x3da6ca(0x50f)]++;const _0x3d0713=Math[_0x3da6ca(0x138)](_0x16d07c,_0xb6955d*0x2**(_0x1e0fa2['consecutiveFailures']-0x1));console['log']('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x327e6b+'\x20in\x20'+_0x3d0713+_0x3da6ca(0x3d8)+_0x1e0fa2[_0x3da6ca(0x50f)]+')'),_0x1e0fa2[_0x3da6ca(0x2a9)]=setTimeout(()=>{const _0x4dbc0b=_0x3da6ca;_0x1e0fa2[_0x4dbc0b(0x2a9)]=null;if(_0x2096bb||_0x1e0fa2[_0x4dbc0b(0x4a4)])return;const _0x5028c2=_0x56d543(_0x327e6b);_0x5028c2[_0x4dbc0b(0x292)](_0x4dbc0b(0x2a0),()=>{const _0x127263=_0x4dbc0b;if(_0x4f062c[_0x127263(0x3aa)](_0x327e6b)===_0x1e0fa2)_0x1e0fa2['consecutiveFailures']=0x0;});},_0x3d0713),_0x1e0fa2['respawnTimer']['unref']?.();});const _0x27c711=[..._0x37706a[_0x7eaec9(0x2f1)]()];console[_0x7eaec9(0x4f7)](_0x7eaec9(0x45f)+process['pid']+_0x7eaec9(0x50a)+_0x1626b0+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x1b776b+':\x20'+('['+_0x27c711[_0x7eaec9(0x3a4)](',\x20')+']'));const _0x4ffd24={'_isClusterController':!![],'port':_0x1b776b,'primaryOkdb':_0x4f7da7??null,'status'(){const _0x1b0f0e=_0x7eaec9;return{'clustered':!![],'primaryPid':process[_0x1b0f0e(0x3e7)],'port':_0x1b776b,'primaryRole':_0x4f7da7?.['role']??null,'processorPid':_0x4f7da7?process[_0x1b0f0e(0x3e7)]:null,'workers':[..._0x37706a[_0x1b0f0e(0x624)]()][_0x1b0f0e(0x601)](({worker:_0x5c9aed})=>({'pid':_0x5c9aed['process'][_0x1b0f0e(0x3e7)],'id':_0x5c9aed['id'],'dead':_0x5c9aed[_0x1b0f0e(0xf6)]()}))};},async 'close'(){const _0x5bb6e2=_0x7eaec9;_0x2096bb=!![];for(const _0x369539 of _0x4f062c['values']()){_0x369539[_0x5bb6e2(0x4a4)]=!![],_0x369539['respawnTimer']&&(clearTimeout(_0x369539['respawnTimer']),_0x369539['respawnTimer']=null);}clearInterval(_0x2c48b5),_0x5468af['off'](_0x5bb6e2(0x29c),_0x1deb65),_0x5468af[_0x5bb6e2(0x5d8)]('message',_0x1d07d1),_0x4f7da7?.[_0x5bb6e2(0x4e5)]?.[_0x5bb6e2(0x5d8)]?.(_0x54a1fc['SYSTEM_PROC'],_0x25750c);if(_0x4f7da7?.['events']?.['off'])for(const {event:_0x31f394,handler:_0x56cf38}of _0x4a4971){try{_0x4f7da7[_0x5bb6e2(0x4e5)][_0x5bb6e2(0x5d8)](_0x31f394,_0x56cf38);}catch{}}_0x4a4971[_0x5bb6e2(0x2eb)]=0x0;const _0x5eecad=[..._0x37706a[_0x5bb6e2(0x624)]()]['map'](({worker:_0x1f7829})=>_0x1f7829);if(_0x5eecad['length']===0x0)return;await Promise[_0x5bb6e2(0x260)](_0x5eecad['map'](_0x505c93=>new Promise(_0x482fb1=>{const _0x3f9a98=_0x5bb6e2;if(_0x505c93[_0x3f9a98(0xf6)]()){_0x482fb1();return;}let _0x3fdcd7=![];const _0x44a452=()=>{if(_0x3fdcd7)return;_0x3fdcd7=!![];if(_0x4f59ba)clearTimeout(_0x4f59ba);_0x482fb1();};_0x505c93['once'](_0x3f9a98(0x542),_0x44a452);const _0x4f59ba=setTimeout(()=>{try{_0x505c93['process']['kill']();}catch{}},_0x10ac10+0x1f4);_0x4f59ba[_0x3f9a98(0x386)]?.();try{_0x505c93[_0x3f9a98(0x54d)]();}catch{try{_0x505c93[_0x3f9a98(0x22a)]['kill']();}catch{}}})));}};return _0x4ffd24;}async function _0x4374ac({makeOkdb:_0x5380be,port:_0x5571e2}){const _0x5f4ca5=await _0x5380be();return _0x7d76e7(_0x5f4ca5),_0x5f4ca5['http']['listen'](_0x5571e2);}function _0x7d76e7(_0xf9a827){const _0x11ed7e=_0x40f568;if(!_0xf9a827||_0xf9a827[_0x11ed7e(0x24f)])return;_0xf9a827[_0x11ed7e(0x24f)]=!![];try{const {OKDBChangefeed:_0x5e84d1}=requireOkdbChangefeed(),_0x4f4703=_0xf9a827[_0x11ed7e(0x278)];if(_0x4f4703&&typeof _0x4f4703[_0x11ed7e(0x535)]===_0x11ed7e(0x26b)){const _0x45ae82=new _0x5e84d1(_0xf9a827);_0x45ae82[_0x11ed7e(0x545)](),_0x4f4703['attachFeed'](_0x45ae82),_0xf9a827['_changefeed']=_0x45ae82;}}catch(_0x5829c){_0xf9a827[_0x11ed7e(0x4f7)]?.[_0x11ed7e(0x27e)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x5829c?.[_0x11ed7e(0x29c)]??_0x5829c),{'feature':_0x11ed7e(0xfe)});}const _0x5205b5=_0x374afb=>{const _0x1faf7b=_0x11ed7e;if(!_0x374afb||typeof _0x374afb!==_0x1faf7b(0x20e)||_0x374afb[_0x1d8ea3]==null)return;if(_0x374afb[_0x1d8ea3]===_0x102d63)try{_0xf9a827['_adminRelay']?.[_0x1faf7b(0x2ce)]?.(_0x374afb[_0x1faf7b(0x66c)],_0x374afb[_0x1faf7b(0x206)]);}catch{}};process['on'](_0x11ed7e(0x29c),_0x5205b5),_0xf9a827[_0x11ed7e(0x3db)]=_0x5205b5;{let _0x437525=process[_0x11ed7e(0x2e1)](),_0x551144=Date[_0x11ed7e(0x16a)]();const _0x163fb1=()=>{const _0x3b1c68=_0x11ed7e;if(typeof process[_0x3b1c68(0x270)]!==_0x3b1c68(0x26b)||!process[_0x3b1c68(0x15c)])return;const _0x43609e=Date[_0x3b1c68(0x16a)](),_0x4290ad=process[_0x3b1c68(0x2e1)](),_0x5864a8=(_0x43609e-_0x551144)*0x3e8,_0x1abf70=_0x4290ad[_0x3b1c68(0x4fd)]-_0x437525[_0x3b1c68(0x4fd)]+(_0x4290ad[_0x3b1c68(0x268)]-_0x437525[_0x3b1c68(0x268)]),_0xc7a131=_0x5864a8>0x0?Math[_0x3b1c68(0x138)](0x64,Math[_0x3b1c68(0x1df)](_0x1abf70/(_0x5864a8*(_0x3fef7c[_0x3b1c68(0x537)]()['length']||0x1))*0x64)):0x0;_0x437525=_0x4290ad,_0x551144=_0x43609e;const _0x20692c=process[_0x3b1c68(0x402)]();try{process[_0x3b1c68(0x270)]({[_0x1d8ea3]:_0x4c5b04,'stats':{'rss':_0x20692c['rss'],'heapUsed':_0x20692c[_0x3b1c68(0x5b9)],'heapTotal':_0x20692c[_0x3b1c68(0x4d8)],'external':_0x20692c[_0x3b1c68(0x4a0)],'cpuPct':_0xc7a131,'cpuWindowMs':Math[_0x3b1c68(0x1df)](_0x5864a8/0x3e8)||null}});}catch{}},_0x258e65=Math[_0x11ed7e(0x47e)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0xcd1c50=setInterval(_0x163fb1,_0x258e65);_0xcd1c50[_0x11ed7e(0x386)]?.(),_0x163fb1();}let _0x488ea5=![];const _0x183a99=async _0x5a9262=>{const _0x7ca366=_0x11ed7e;if(_0x488ea5)return;_0x488ea5=!![];const _0x5bfe6b=setTimeout(()=>process[_0x7ca366(0x542)](_0x5a9262),_0x10ac10);_0x5bfe6b[_0x7ca366(0x386)]?.();try{await _0xf9a827[_0x7ca366(0x241)]?.();}catch{}process[_0x7ca366(0x542)](_0x5a9262);};process['on'](_0x11ed7e(0x54d),()=>_0x183a99(0x0));if(process[_0x11ed7e(0x2e3)]!==_0x11ed7e(0x405)){const _0x56918b=setInterval(()=>{if(process['ppid']===0x1)_0x183a99(0x0);},_0x5b9bf5);_0x56918b[_0x11ed7e(0x386)]?.(),_0xf9a827['_clusterOrphanWatch']=_0x56918b;}}return okdbCluster={'runClustered':_0x40ea2b,'attachWorkerCluster':_0x7d76e7},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x589270=_0x4b361c;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x1d2355=0x3c;function _0x18ff3e(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0xf56716{constructor(){const _0x37d6f6=_0x2368;this[_0x37d6f6(0x51d)]=0x0,this[_0x37d6f6(0x57b)]=0x0,this[_0x37d6f6(0x165)]=0x0,this['_totalErrors']=0x0,this[_0x37d6f6(0x516)]=0x0,this['_totalWriteMs']=0x0,this['_buckets']=Array[_0x37d6f6(0x36d)]({'length':_0x1d2355},_0x18ff3e),this[_0x37d6f6(0x1d2)]=0x0,this[_0x37d6f6(0x599)]=Date[_0x37d6f6(0x16a)](),this[_0x37d6f6(0x301)]=setInterval(()=>this[_0x37d6f6(0x196)](),0x3e8);if(this[_0x37d6f6(0x301)][_0x37d6f6(0x386)])this[_0x37d6f6(0x301)][_0x37d6f6(0x386)]();}['_rotateBucket'](){const _0x46d9ce=_0x2368;this[_0x46d9ce(0x1d2)]=(this['_bucketIdx']+0x1)%_0x1d2355,this[_0x46d9ce(0x659)][this[_0x46d9ce(0x1d2)]]=_0x18ff3e(),this[_0x46d9ce(0x599)]=Date['now']();}[_0x589270(0x360)](_0x3c03aa,_0x45c09e,_0x3cff75){const _0x314dac=_0x589270,_0x5e8485=/^(POST|PUT|PATCH|DELETE)$/i[_0x314dac(0x30d)](_0x3c03aa),_0x200380=this[_0x314dac(0x659)][this['_bucketIdx']];this[_0x314dac(0x51d)]++,_0x200380[_0x314dac(0x22e)]++,_0x3cff75&&(this[_0x314dac(0x52a)]++,_0x200380[_0x314dac(0x444)]++),_0x5e8485?(this['_totalWrites']++,this[_0x314dac(0x43f)]+=_0x45c09e,_0x200380[_0x314dac(0x2a5)]++,_0x200380['writeMs']+=_0x45c09e):(this['_totalReads']++,this[_0x314dac(0x516)]+=_0x45c09e,_0x200380[_0x314dac(0x54c)]++,_0x200380[_0x314dac(0x43c)]+=_0x45c09e);}['stats'](){const _0x58a58d=_0x589270;let _0x1b7c12=0x0,_0x5d586e=0x0,_0x409879=0x0,_0x3c3374=0x0,_0x4879f0=0x0,_0xcba8a0=0x0;for(const _0x298637 of this['_buckets']){_0x1b7c12+=_0x298637[_0x58a58d(0x22e)],_0x5d586e+=_0x298637[_0x58a58d(0x54c)],_0x409879+=_0x298637[_0x58a58d(0x2a5)],_0x3c3374+=_0x298637[_0x58a58d(0x444)],_0x4879f0+=_0x298637[_0x58a58d(0x43c)],_0xcba8a0+=_0x298637[_0x58a58d(0x2ba)];}const _0x1af44d=_0x1d2355;return{'lifetime':{'requests':this[_0x58a58d(0x51d)],'reads':this[_0x58a58d(0x57b)],'writes':this[_0x58a58d(0x165)],'errors':this[_0x58a58d(0x52a)],'avgReadMs':this[_0x58a58d(0x57b)]>0x0?+(this['_totalReadMs']/this[_0x58a58d(0x57b)])[_0x58a58d(0x4a8)](0x2):null,'avgWriteMs':this['_totalWrites']>0x0?+(this[_0x58a58d(0x43f)]/this['_totalWrites'])[_0x58a58d(0x4a8)](0x2):null},'window':{'seconds':_0x1af44d,'requests':_0x1b7c12,'reads':_0x5d586e,'writes':_0x409879,'errors':_0x3c3374,'reqPerSec':+(_0x1b7c12/_0x1af44d)[_0x58a58d(0x4a8)](0x2),'readPerSec':+(_0x5d586e/_0x1af44d)[_0x58a58d(0x4a8)](0x2),'writePerSec':+(_0x409879/_0x1af44d)['toFixed'](0x2),'avgReadMs':_0x5d586e>0x0?+(_0x4879f0/_0x5d586e)[_0x58a58d(0x4a8)](0x2):null,'avgWriteMs':_0x409879>0x0?+(_0xcba8a0/_0x409879)['toFixed'](0x2):null}};}[_0x589270(0x241)](){const _0x1ab367=_0x589270;clearInterval(this[_0x1ab367(0x301)]);}}return okdbMetrics=_0xf56716,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x439f19=_0x4b361c;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x1b9815={'data':{'label':_0x439f19(0x17f),'scope':_0x439f19(0x46e),'description':_0x439f19(0x128),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x503)},'write':{'label':'Write','summary':'Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).'}}},'schema':{'label':_0x439f19(0x13c),'scope':_0x439f19(0x46e),'description':_0x439f19(0x5b4),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x650)},'write':{'label':_0x439f19(0x525),'summary':_0x439f19(0x5f5)}}},'search':{'label':_0x439f19(0x629),'scope':_0x439f19(0x46e),'description':_0x439f19(0x114),'operations':{'query':{'label':'Query','summary':_0x439f19(0x366)}}},'queue':{'label':_0x439f19(0x2ac),'scope':_0x439f19(0x46e),'description':_0x439f19(0x163),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x403)},'write':{'label':'Write','summary':_0x439f19(0x50e)},'work':{'label':_0x439f19(0x2dc),'summary':'Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.'}}},'files':{'label':'Files','scope':_0x439f19(0x46e),'description':'Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x583)},'write':{'label':_0x439f19(0x525),'summary':_0x439f19(0x5a5)}}},'functions':{'label':_0x439f19(0x296),'scope':'env','description':_0x439f19(0x58a),'operations':{'read':{'label':'Read','summary':'List\x20functions\x20and\x20inspect\x20their\x20source.'},'write':{'label':_0x439f19(0x525),'summary':_0x439f19(0x103)},'run':{'label':_0x439f19(0x66e),'summary':'Execute\x20functions\x20over\x20HTTP/MCP/shell.'}}},'views':{'label':_0x439f19(0x3bd),'scope':_0x439f19(0x46e),'description':_0x439f19(0x3e4),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x58d)},'write':{'label':'Write','summary':'Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.'}}},'env':{'label':_0x439f19(0x4d3),'scope':'env','description':_0x439f19(0x418),'operations':{'read':{'label':'Read','summary':_0x439f19(0x3d3)},'write':{'label':'Write','summary':_0x439f19(0x280)}}},'auth':{'label':'Auth','scope':'system','description':'API\x20tokens,\x20users,\x20and\x20credentials.','operations':{'read':{'label':'Read','summary':_0x439f19(0x50c)},'write':{'label':_0x439f19(0x525),'summary':'Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.'}}},'system':{'label':_0x439f19(0x569),'scope':_0x439f19(0x268),'description':'Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','operations':{'read':{'label':'Read','summary':_0x439f19(0x446)},'write':{'label':'Write','summary':_0x439f19(0x487)}}},'sync':{'label':'Sync','scope':_0x439f19(0x268),'description':_0x439f19(0x468),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x672)},'write':{'label':'Write','summary':_0x439f19(0x4a2)},'peer':{'label':_0x439f19(0x2a3),'summary':_0x439f19(0x1b2),'machineOnly':!![]}}},'protected':{'label':'Protected\x20(gate)','scope':_0x439f19(0x43b),'description':_0x439f19(0x605),'operations':{'read':{'label':'Read','summary':'May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.'},'write':{'label':_0x439f19(0x525),'summary':_0x439f19(0x308)}}}},_0x19ea4a={'schema:read':[_0x439f19(0x40a),_0x439f19(0x5b2),_0x439f19(0xf8)]},_0x43ab65=[_0x439f19(0x32a),_0x439f19(0x3c5),'run',_0x439f19(0x4ae),'work','peer'];function _0x12b6b3(){const _0x2a6f34=_0x439f19,_0x3b932f=[];for(const [_0x44f764,_0x92ad5d]of Object[_0x2a6f34(0x427)](_0x1b9815)){for(const _0x1391f4 of Object[_0x2a6f34(0x2f1)](_0x92ad5d[_0x2a6f34(0x441)])){_0x3b932f[_0x2a6f34(0x614)](_0x44f764+':'+_0x1391f4);}}return _0x3b932f;}function _0x4da5fc(_0xa63751){return _0x1b9815[_0xa63751]||null;}function _0x5f1243(_0x543ab7,_0x5b86f7){return _0x1b9815[_0x543ab7]?.['operations'][_0x5b86f7]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x1b9815,'IMPLIED_BY':_0x19ea4a,'OP_ORDER':_0x43ab65,'listAllPermissions':_0x12b6b3,'getNamespaceMeta':_0x4da5fc,'getOperationMeta':_0x5f1243},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0xfb0c40}=requireOkdbAuthNamespaces(),_0x25129d=new Set(['read','query']);function _0x41039a(_0x1ec797,_0x3ab167){const _0x25cc15=_0x2368;if(!Array[_0x25cc15(0x579)](_0x1ec797)||_0x1ec797['length']===0x0)return![];for(const _0x5adc0a of _0x1ec797){if(typeof _0x5adc0a!==_0x25cc15(0x380)||!_0x5adc0a[_0x25cc15(0x5c0)](':')){if(_0x5adc0a==='*')return!![];continue;}const [_0x5de594,_0x6eb8b1]=_0x5adc0a[_0x25cc15(0x37c)](':'),[_0x3615bb,_0x3501aa]=_0x3ab167[_0x25cc15(0x37c)](':'),_0x139a48=_0x5de594==='*'||_0x5de594===_0x3615bb,_0x52e90d=_0x6eb8b1==='*'||_0x6eb8b1===_0x3501aa;if(_0x139a48&&_0x52e90d)return!![];}const _0x535663=_0xfb0c40[_0x3ab167];if(_0x535663)for(const _0x154860 of _0x535663){if(_0x41039a(_0x1ec797,_0x154860))return!![];}return![];}function _0x46b56c(_0xdbd6c7,_0x2a5b56){const _0x53ae42=_0x2368,_0x2d1dbe=new Set();if(Array[_0x53ae42(0x579)](_0xdbd6c7)){for(const _0x226360 of _0xdbd6c7)_0x2d1dbe['add'](_0x226360);}if(Array['isArray'](_0x2a5b56)){for(const _0xaf3e51 of _0x2a5b56)_0x2d1dbe['add'](_0xaf3e51);}return Array['from'](_0x2d1dbe);}function _0x3bdb55(_0x1233dc){const _0x4ba40a=_0x2368;if(typeof _0x1233dc!==_0x4ba40a(0x380))return![];const [,_0x44ef93]=_0x1233dc['split'](':');return _0x25129d[_0x4ba40a(0x39f)](_0x44ef93);}function _0xfaeaaa(_0x2a7c5c){const _0x268648=_0x2368;return _0x3bdb55(_0x2a7c5c)?_0x268648(0x1d4):_0x268648(0x148);}function _0x1c32c1(_0x356e7d,_0x4060fd){const _0x5024e1=_0x2368;return _0x46b56c(_0x356e7d[_0x5024e1(0x3f3)]||[],_0x4060fd?(_0x356e7d['grants']||{})[_0x4060fd]||[]:[]);}function _0x444758(_0x4dfa14){const _0xcec091=_0x2368,_0x31f028=[];for(const _0x457c2d of _0x4dfa14[_0xcec091(0x33c)]()){const _0x49bbb6=_0x457c2d[_0xcec091(0x3d5)]?.[_0xcec091(0x35d)];if(!_0x49bbb6)continue;_0x49bbb6['authRequired']&&!_0x49bbb6[_0xcec091(0x598)]&&_0x31f028[_0xcec091(0x614)](_0x457c2d[_0xcec091(0x527)]+'\x20'+_0x457c2d['path']+_0xcec091(0x556)+(_0x457c2d[_0xcec091(0x3d5)]['id']??'?')+')');}if(_0x31f028[_0xcec091(0x2eb)])throw new Error(_0xcec091(0x26e)+_0x31f028[_0xcec091(0x3a4)](_0xcec091(0x675)));}return okdbAuthPermissions={'hasPermission':_0x41039a,'unionPermissions':_0x46b56c,'isReadOperation':_0x3bdb55,'resolveProtectedGate':_0xfaeaaa,'getEffectivePermissions':_0x1c32c1,'assertEveryRouteHasPermission':_0x444758},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x227c91=require$$0$5,_0x173eb3=require$$1$3,_0x331002=require$$2;function _0x586254(_0x59ddcd){const _0x9175e=_0x2368,_0x3818e3=String(_0x59ddcd||'')[_0x9175e(0x38b)](/-/g,'+')[_0x9175e(0x38b)](/_/g,'/'),_0x375952=_0x3818e3+'='[_0x9175e(0x473)]((0x4-(_0x3818e3[_0x9175e(0x2eb)]%0x4||0x4))%0x4);return Buffer[_0x9175e(0x36d)](_0x375952,_0x9175e(0x4f5));}function _0x316f19(_0x59ed3a){const _0xebc1db=_0x2368;if(typeof _0x59ed3a!==_0xebc1db(0x380))throw new Error(_0xebc1db(0x28e));const _0x533b02=_0x59ed3a[_0xebc1db(0x37c)]('.');if(_0x533b02[_0xebc1db(0x2eb)]!==0x3)throw new Error(_0xebc1db(0x197));const [_0x558002,_0x5a53a0,_0x199ca9]=_0x533b02,_0x132f5b=JSON[_0xebc1db(0x34f)](_0x586254(_0x558002)[_0xebc1db(0x261)](_0xebc1db(0x365))),_0x2ce88d=JSON['parse'](_0x586254(_0x5a53a0)['toString'](_0xebc1db(0x365)));return{'header':_0x132f5b,'payload':_0x2ce88d,'signature':_0x586254(_0x199ca9),'signingInput':Buffer['from'](_0x558002+'.'+_0x5a53a0),'encodedHeader':_0x558002,'encodedPayload':_0x5a53a0};}function _0x2c9614(_0x491e1c){const _0x2a3642=_0x2368;if(Array[_0x2a3642(0x579)](_0x491e1c))return _0x491e1c;if(_0x491e1c==null)return[];return[_0x491e1c];}function _0x1926eb(_0x4d2630){const _0x17562d=String(_0x4d2630||'')['match'](/.{1,64}/g)||[];return'-----BEGIN\x20CERTIFICATE-----\x0a'+_0x17562d['join']('\x0a')+'\x0a-----END\x20CERTIFICATE-----\x0a';}function _0xd2fa04(_0x43efda={}){const _0x5bcf98=_0x2368;if(_0x43efda['x5c']?.[0x0])return _0x331002[_0x5bcf98(0x18e)](_0x1926eb(_0x43efda[_0x5bcf98(0x212)][0x0]));return _0x331002['createPublicKey']({'key':_0x43efda,'format':_0x5bcf98(0x2bb)});}function _0x20ae5c(_0x43702e,_0x642925,_0x37fb25,_0x3bc3a4){const _0x4c600f=_0x2368;if(_0x43702e==='RS256')return _0x331002[_0x4c600f(0x170)](_0x4c600f(0x39a),_0x37fb25,_0x642925,_0x3bc3a4);if(_0x43702e===_0x4c600f(0x2a2))return _0x331002[_0x4c600f(0x170)](_0x4c600f(0x33b),_0x37fb25,{'key':_0x642925,'dsaEncoding':_0x4c600f(0x1b4)},_0x3bc3a4);return![];}function _0x2b513b(_0x4b2967){const _0x4d5125=_0x2368;if(typeof commonjsGlobal[_0x4d5125(0x19d)]==='function')return commonjsGlobal[_0x4d5125(0x19d)](_0x4b2967,{'headers':{'accept':_0x4d5125(0x509)}})['then'](async _0x5ba232=>{const _0x544a72=_0x4d5125;if(!_0x5ba232['ok']){const _0x4b8db8=new Error(_0x544a72(0x356)+_0x5ba232[_0x544a72(0x626)]+_0x544a72(0x20a)+_0x4b2967);_0x4b8db8['status']=_0x5ba232['status'];throw _0x4b8db8;}return _0x5ba232['json']();});return new Promise((_0x3fbcbf,_0x27fec5)=>{const _0x22cfef=_0x4d5125,_0x3cb80f=String(_0x4b2967)[_0x22cfef(0x3cc)](_0x22cfef(0x381))?_0x173eb3:_0x227c91,_0x4aec26=_0x3cb80f[_0x22cfef(0x3aa)](_0x4b2967,{'headers':{'accept':'application/json'}},_0x5cf026=>{const _0x229d1c=_0x22cfef;let _0x3caa17='';_0x5cf026['setEncoding'](_0x229d1c(0x365)),_0x5cf026['on'](_0x229d1c(0x206),_0x1e02e0=>{_0x3caa17+=_0x1e02e0;}),_0x5cf026['on']('end',()=>{const _0x351b2b=_0x229d1c;if(_0x5cf026[_0x351b2b(0x27b)]<0xc8||_0x5cf026[_0x351b2b(0x27b)]>=0x12c){const _0x35e0de=new Error(_0x351b2b(0x356)+_0x5cf026['statusCode']+_0x351b2b(0x20a)+_0x4b2967);return _0x35e0de[_0x351b2b(0x626)]=_0x5cf026[_0x351b2b(0x27b)],_0x27fec5(_0x35e0de);}try{_0x3fbcbf(JSON['parse'](_0x3caa17||'{}'));}catch(_0x34eeb1){_0x27fec5(_0x34eeb1);}});});_0x4aec26['on'](_0x22cfef(0x31b),_0x27fec5),_0x4aec26[_0x22cfef(0x62c)]();});}return okdbJwtUtils={'base64UrlDecode':_0x586254,'parseJwt':_0x316f19,'normalizeAudience':_0x2c9614,'normalizePemCertificate':_0x1926eb,'jwkToKeyObject':_0xd2fa04,'verifyJwtSignature':_0x20ae5c,'fetchJson':_0x2b513b},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x404a63=_0x4b361c;if(hasRequiredOkdbHttp)return okdbHttp[_0x404a63(0x1b3)];hasRequiredOkdbHttp=0x1;const _0x53a26f=require$$0$5,{URL:_0x451322}=require$$2$1,_0x19a34d=requireOkdbMetrics(),_0x391527=requireOkdbAuthTokens(),{hasPermission:_0x19937c,unionPermissions:_0x11a074,resolveProtectedGate:_0x3c5d4e}=requireOkdbAuthPermissions(),_0x552970={0x190:'BAD_REQUEST',0x191:_0x404a63(0x2b7),0x193:_0x404a63(0x2da),0x194:'NOT_FOUND',0x195:_0x404a63(0x3ab),0x198:'REQUEST_TIMEOUT',0x199:_0x404a63(0x3ca),0x19a:_0x404a63(0x600),0x19b:_0x404a63(0x184),0x19d:'PAYLOAD_TOO_LARGE',0x19f:'UNSUPPORTED_MEDIA_TYPE',0x1a6:_0x404a63(0x2e7),0x1ad:_0x404a63(0x4ea),0x1f4:_0x404a63(0x64f),0x1f5:_0x404a63(0x459),0x1f6:_0x404a63(0x51c),0x1f7:_0x404a63(0x334),0x1f8:_0x404a63(0x555)},_0x3da15a={'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,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'BUCKET_PROJECT_NOT_SYNCABLE':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:_0x1d100f,timingSafeEqual:_0x54f11b,parseBearer:_0x3c10e5,randomToken:_0xf804a3,issueToken:_0x580b0f,authenticateToken:_0x3e87bf}=_0x391527,{base64UrlDecode:_0x28871b,parseJwt:_0x10c589,normalizeAudience:_0x35ee01,normalizePemCertificate:_0x57b06b,jwkToKeyObject:_0x41a13a,verifyJwtSignature:_0xba07c4,fetchJson:_0x5b4187}=requireOkdbJwtUtils();function _0x34134f(_0x29ae15){const _0x2aea87=_0x404a63;return(_0x29ae15||_0x2aea87(0x58f))[_0x2aea87(0x5ef)]();}function _0xdc08e4(_0x5d447f){const _0x36becd=_0x404a63;if(Array['isArray'](_0x5d447f))return _0x5d447f['flatMap'](_0xdc08e4);return String(_0x5d447f||'')['split'](',')[_0x36becd(0x601)](_0x2c61cd=>_0x2c61cd['trim']())['filter'](Boolean);}function _0x303df2(..._0x3204f1){const _0x356750=_0x404a63;return[...new Set(_0x3204f1[_0x356750(0x235)](_0xdc08e4))]['join'](',\x20');}function _0x1eeb11(_0x236f4b,_0x5f4b7c){const _0x51b338=_0x404a63;if(!_0x236f4b)return![];if(_0x5f4b7c==='*')return!![];if(_0x5f4b7c instanceof RegExp)return _0x5f4b7c[_0x51b338(0x30d)](_0x236f4b);if(typeof _0x5f4b7c===_0x51b338(0x26b))return!!_0x5f4b7c(_0x236f4b);if(Array[_0x51b338(0x579)](_0x5f4b7c))return _0x5f4b7c[_0x51b338(0x5c0)](_0x236f4b);return _0x5f4b7c===_0x236f4b;}function _0x2a8e64(_0x37c385={},_0x38b5c9={},_0x487b8c=null){const _0x11d35a=_0x404a63;if(!_0x38b5c9)return null;const _0x24c484=_0x37c385[_0x11d35a(0x424)],_0x1a0c64=_0x38b5c9[_0x11d35a(0x335)]??_0x38b5c9[_0x11d35a(0x424)]??'*',_0x4d2958=_0x1a0c64==='*'?'*':_0x1eeb11(_0x24c484,_0x1a0c64)?_0x24c484:null;if(!_0x4d2958)return null;const _0x1f0450=_0x37c385['access-control-request-headers'],_0x246e54=_0x38b5c9[_0x11d35a(0x5b1)]??_0x38b5c9[_0x11d35a(0x333)]??['content-type',_0x11d35a(0x494),_0x11d35a(0x2de),_0x11d35a(0x678),_0x11d35a(0x548)],_0x221cc2=_0x38b5c9[_0x11d35a(0x5cb)]??_0x38b5c9[_0x11d35a(0xdf)]??(_0x487b8c?[_0x487b8c,'OPTIONS']:[_0x11d35a(0x58f),_0x11d35a(0x46a),_0x11d35a(0x346)]),_0x20d09a=_0x38b5c9[_0x11d35a(0x3d4)]??['mcp-session-id'],_0x625526={'access-control-allow-origin':_0x4d2958,'access-control-allow-methods':Array['isArray'](_0x221cc2)?_0x221cc2[_0x11d35a(0x3a4)](',\x20'):String(_0x221cc2),'access-control-allow-headers':_0x1f0450?_0x303df2(_0x246e54,_0x1f0450):Array[_0x11d35a(0x579)](_0x246e54)?_0x246e54[_0x11d35a(0x3a4)](',\x20'):String(_0x246e54),'access-control-expose-headers':Array[_0x11d35a(0x579)](_0x20d09a)?_0x20d09a[_0x11d35a(0x3a4)](',\x20'):String(_0x20d09a),'vary':_0x303df2('Origin',_0x4d2958==='*'?'':_0x11d35a(0x259),_0x1f0450?_0x11d35a(0x21f):'')};if(_0x38b5c9[_0x11d35a(0x4f0)])_0x625526[_0x11d35a(0x467)]='true';if(Number[_0x11d35a(0x5f8)](_0x38b5c9[_0x11d35a(0x2d4)]))_0x625526[_0x11d35a(0x511)]=String(_0x38b5c9[_0x11d35a(0x2d4)]);return _0x625526;}function _0x50387f(_0x343cb3){const _0x4918dc=_0x404a63,_0x11a7b0=[],_0x5553b2={};let _0x1c6184=![];_0x343cb3[_0x4918dc(0x324)]('/*')&&(_0x1c6184=!![],_0x343cb3=_0x343cb3[_0x4918dc(0x45e)](0x0,-0x2),_0x11a7b0['push']('*'));let _0x1a96d5=_0x343cb3[_0x4918dc(0x38b)](/\/+$/,'')['replace'](/\[([^\]]*)\]/g,(_0x414b55,_0x22d01a)=>{const _0x5b3eba=_0x4918dc,_0x50aee4=_0x22d01a[_0x5b3eba(0x38b)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x4a3017,_0x412c0b,_0x3ccf79)=>{const _0x54fd62=_0x5b3eba;_0x11a7b0[_0x54fd62(0x614)](_0x412c0b);if(_0x3ccf79!==undefined)_0x5553b2[_0x412c0b]=_0x3ccf79;return'/([^/]+)';});return _0x5b3eba(0x4fc)+_0x50aee4+')?';})['replace'](/\/:(\w+)/g,(_0x3a12fe,_0x160609)=>{const _0x38bd06=_0x4918dc;return _0x11a7b0[_0x38bd06(0x614)](_0x160609),_0x38bd06(0x21c);});if(_0x1a96d5==='')_0x1a96d5='/';return{'keys':_0x11a7b0,'defaults':_0x5553b2,'wildcard':_0x1c6184,'regex':new RegExp(_0x1c6184?'^'+_0x1a96d5+_0x4918dc(0x3b7):'^'+_0x1a96d5+'$')};}function _0x1de9c7(_0x32eb32){const _0x522928=_0x404a63;if(_0x32eb32==null)return _0x32eb32;return JSON[_0x522928(0x34f)](JSON['stringify'](_0x32eb32));}function _0x51f60e(_0x5cb894){const _0x4ce0b6=_0x404a63;if(_0x5cb894==null)return null;if(_0x5cb894['type']==='object'&&_0x5cb894[_0x4ce0b6(0x448)]&&!Array[_0x4ce0b6(0x579)](_0x5cb894[_0x4ce0b6(0x448)]))return _0x1de9c7(_0x5cb894);const _0x499368=Object['values'](_0x5cb894),_0x3f213a=_0x499368[_0x4ce0b6(0x2eb)]>0x0&&_0x499368[_0x4ce0b6(0x171)](_0xa9c61=>{const _0x2e8829=_0x4ce0b6;return _0xa9c61&&typeof _0xa9c61===_0x2e8829(0x20e)&&!Array[_0x2e8829(0x579)](_0xa9c61)&&(Object[_0x2e8829(0x258)]['hasOwnProperty'][_0x2e8829(0x456)](_0xa9c61,_0x2e8829(0x49b))||Object[_0x2e8829(0x258)][_0x2e8829(0x51a)][_0x2e8829(0x456)](_0xa9c61,_0x2e8829(0x448))||Object[_0x2e8829(0x258)][_0x2e8829(0x51a)][_0x2e8829(0x456)](_0xa9c61,_0x2e8829(0x5b7))||Object[_0x2e8829(0x258)][_0x2e8829(0x51a)][_0x2e8829(0x456)](_0xa9c61,'default'));});if(_0x3f213a)return{'type':_0x4ce0b6(0x20e),'properties':_0x1de9c7(_0x5cb894),'required':[],'additionalProperties':![]};const _0x6880d8={},_0x352029=[];for(const [_0x35c60a,_0x3187ba]of Object[_0x4ce0b6(0x427)](_0x5cb894)){_0x6880d8[_0x35c60a]=_0x5ab5b8(_0x3187ba);if(_0x3187ba!==null&&_0x3187ba!==undefined)_0x352029[_0x4ce0b6(0x614)](_0x35c60a);}return{'type':_0x4ce0b6(0x20e),'properties':_0x6880d8,'required':_0x352029,'additionalProperties':![]};}function _0x5ab5b8(_0x618d9e){const _0x3ffc4c=_0x404a63;if(_0x618d9e===null)return{'type':[_0x3ffc4c(0x2e8),_0x3ffc4c(0x380),'number',_0x3ffc4c(0x455),_0x3ffc4c(0x20e),_0x3ffc4c(0x304)]};if(Array[_0x3ffc4c(0x579)](_0x618d9e))return{'type':_0x3ffc4c(0x304),'items':_0x618d9e[_0x3ffc4c(0x2eb)]>0x0?_0x5ab5b8(_0x618d9e[0x0]):{}};switch(typeof _0x618d9e){case _0x3ffc4c(0x380):return{'type':'string','default':_0x618d9e};case _0x3ffc4c(0x17c):return{'type':Number[_0x3ffc4c(0xde)](_0x618d9e)?_0x3ffc4c(0x14b):_0x3ffc4c(0x17c),'default':_0x618d9e};case'boolean':return{'type':'boolean','default':_0x618d9e};case _0x3ffc4c(0x20e):{const _0x2ce015={};for(const [_0x390287,_0x5666b3]of Object[_0x3ffc4c(0x427)](_0x618d9e))_0x2ce015[_0x390287]=_0x5ab5b8(_0x5666b3);return{'type':'object','properties':_0x2ce015,'additionalProperties':!![],'default':_0x1de9c7(_0x618d9e)};}default:return{};}}function _0x40d518(_0xde597f,_0x42e729){const _0x433062=_0x404a63,_0x3f7e82=[];for(const _0x97dae9 of _0x42e729[_0x433062(0x2f1)]){if(_0x97dae9==='*')continue;_0x3f7e82['push']({'name':_0x97dae9,'required':!Object[_0x433062(0x258)][_0x433062(0x51a)][_0x433062(0x456)](_0x42e729['defaults'],_0x97dae9),'default':_0x42e729['defaults'][_0x97dae9]});}return _0x3f7e82;}function _0x44ff79(_0x1b23c8={},_0x449761){const _0x4aa600=_0x404a63,_0x5af02c=_0x51f60e(_0x1b23c8[_0x4aa600(0x5d0)]?.[_0x4aa600(0x651)]??_0x1b23c8[_0x4aa600(0x3c5)]??null),_0xfd4c43=_0x1b23c8[_0x4aa600(0x5d0)]?.[_0x4aa600(0x2e5)]??(_0x1b23c8[_0x4aa600(0x13b)]?_0x4aa600(0x13b):_0x449761[_0x4aa600(0x527)]==='GET'||_0x449761['method']===_0x4aa600(0x594)?_0x4aa600(0x190):'remaining-fields');return{'querySchema':_0x5af02c,'bodyMode':_0xfd4c43,'bindings':_0x1de9c7(_0x1b23c8[_0x4aa600(0x5d0)]?.['bindings']??{}),'statuses':_0x1de9c7(_0x1b23c8['http']?.[_0x4aa600(0x452)]??(_0x1b23c8[_0x4aa600(0x1aa)]||[])),'transport':_0x1b23c8['http']?.['transport']??(_0x1b23c8[_0x4aa600(0x54a)]?'sse':_0x1b23c8['raw']?_0x4aa600(0x13b):_0x4aa600(0x523)),'rawResponse':_0x1b23c8[_0x4aa600(0x5d0)]?.['rawResponse']??!!_0x1b23c8['rawResponse'],'cors':_0x1de9c7(_0x1b23c8[_0x4aa600(0x5d0)]?.['cors']??_0x1b23c8['cors']??null)};}function _0x34f30f(_0x203e1f){const _0x3cf5d3=_0x404a63,_0x47ffb1=_0x203e1f[_0x3cf5d3(0x664)]||{},_0x3223de=_0x40d518(_0x203e1f['path'],_0x203e1f[_0x3cf5d3(0xdd)]),_0x196a92=!!(_0x47ffb1['id']||_0x47ffb1[_0x3cf5d3(0xe0)]||_0x47ffb1[_0x3cf5d3(0x656)]||_0x47ffb1['http']||_0x47ffb1[_0x3cf5d3(0x32b)]||_0x47ffb1[_0x3cf5d3(0x3b3)]||_0x47ffb1[_0x3cf5d3(0x35d)]||_0x47ffb1[_0x3cf5d3(0x267)]),_0x132c5a=_0x44ff79(_0x47ffb1,_0x203e1f),_0xcbf908=_0x47ffb1[_0x3cf5d3(0xe0)]?_0x1de9c7(_0x47ffb1[_0x3cf5d3(0xe0)]):null;return{'id':_0x47ffb1['id']??null,'summary':_0x47ffb1[_0x3cf5d3(0x319)]??null,'description':_0x47ffb1[_0x3cf5d3(0x413)]??null,'tags':_0x1de9c7(_0x47ffb1['tags']??[]),'category':_0x47ffb1[_0x3cf5d3(0x4d7)]??null,'safety':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x267)]??null),'access':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x35d)]??null),'inputSchema':_0xcbf908,'outputSchema':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x656)]??null),'examples':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x2ec)]??[]),'pathParams':_0x3223de,'http':_0x132c5a,'cli':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x3b3)]??null),'mcp':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x32b)]??null),'legacy':{'params':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x5fe)]??null),'query':_0x1de9c7(_0x47ffb1['query']??null),'body':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x5e9)]??null),'response':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x1ed)]??null)},'transport':{'raw':!!_0x47ffb1[_0x3cf5d3(0x13b)],'sse':!!_0x47ffb1[_0x3cf5d3(0x54a)],'rawResponse':!!_0x47ffb1[_0x3cf5d3(0x642)],'cors':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x1fb)]??null)},'hasCanonical':_0x196a92};}function _0x39e179(_0xcbfb3e,_0x3f876c){const _0x1fcd82=_0x404a63;if(!_0x3f876c?.[_0x1fcd82(0x401)])return;if(!_0x3f876c[_0x1fcd82(0xe0)]||_0x3f876c[_0x1fcd82(0xe0)]['type']!==_0x1fcd82(0x20e)||!_0x3f876c[_0x1fcd82(0xe0)][_0x1fcd82(0x448)])throw new Error('Route\x20'+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema');const _0x22ac43=_0x3f876c[_0x1fcd82(0xe0)][_0x1fcd82(0x448)]||{},_0x21171a=new Set(_0x3f876c['pathParams'][_0x1fcd82(0x601)](_0x15a203=>_0x15a203[_0x1fcd82(0x2cc)])),_0x2e08c9=new Set(Object[_0x1fcd82(0x2f1)](_0x3f876c[_0x1fcd82(0x5d0)]?.[_0x1fcd82(0x651)]?.[_0x1fcd82(0x448)]||{})),_0x277482=new Set(Object[_0x1fcd82(0x2f1)](_0x3f876c[_0x1fcd82(0x5d0)]?.[_0x1fcd82(0x4a3)]||{}));for(const _0x3d06d5 of _0x3f876c['pathParams']){if(!_0x22ac43[_0x3d06d5[_0x1fcd82(0x2cc)]])throw new Error('Route\x20'+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20missing\x20path\x20field\x20in\x20inputSchema:\x20'+_0x3d06d5[_0x1fcd82(0x2cc)]);}for(const _0x470a4c of _0x2e08c9){if(!_0x22ac43[_0x470a4c])throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x3e1)+_0x470a4c);}for(const _0x13ec4d of _0x277482){if(!_0x22ac43[_0x13ec4d])throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0xe2)+_0x13ec4d);}for(const _0x38e4a1 of _0x277482){if(_0x21171a[_0x1fcd82(0x39f)](_0x38e4a1))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x5b6)+_0x38e4a1);if(_0x2e08c9[_0x1fcd82(0x39f)](_0x38e4a1))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0xe3)+_0x38e4a1);const _0xdd0a4f=_0x3f876c[_0x1fcd82(0x5d0)]['bindings'][_0x38e4a1];if(!/^params\.[A-Za-z0-9_*.-]+$/[_0x1fcd82(0x30d)](_0xdd0a4f)&&!/^query\.[A-Za-z0-9_*.-]+$/['test'](_0xdd0a4f)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/[_0x1fcd82(0x30d)](_0xdd0a4f)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x1fcd82(0x30d)](_0xdd0a4f))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x18a)+_0x38e4a1+':\x20'+_0xdd0a4f);}for(const _0x4af07b of _0x2e08c9){if(_0x21171a['has'](_0x4af07b))throw new Error('Route\x20'+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20has\x20ambiguous\x20query/path\x20field:\x20'+_0x4af07b);}const _0x25f25b=_0x3f876c[_0x1fcd82(0x5d0)]?.[_0x1fcd82(0x2e5)],_0x5beee3=new Set(['none',_0x1fcd82(0x23e),_0x1fcd82(0x20e),_0x1fcd82(0x37b),'array',_0x1fcd82(0x13b)]);if(!_0x5beee3[_0x1fcd82(0x39f)](_0x25f25b))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x316)+_0x25f25b);if(_0x25f25b==='raw'&&!_0xcbfb3e[_0x1fcd82(0x664)]?.[_0x1fcd82(0x13b)])throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata');if(_0x3f876c[_0x1fcd82(0x32b)]?.[_0x1fcd82(0x5c8)]!==![]&&(_0xcbfb3e['meta']?.['raw']||_0xcbfb3e[_0x1fcd82(0x664)]?.[_0x1fcd82(0x54a)]||_0x3f876c[_0x1fcd82(0x5d0)]?.['transport']===_0x1fcd82(0x25a)))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e['method']+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x3c6)+_0x3f876c[_0x1fcd82(0x5d0)]?.[_0x1fcd82(0x109)]);const _0xee6aed=Object[_0x1fcd82(0x2f1)](_0x22ac43)[_0x1fcd82(0x1c6)](_0x16a9d2=>{const _0x51fd41=_0x1fcd82;if(_0x21171a[_0x51fd41(0x39f)](_0x16a9d2))return![];if(_0x2e08c9['has'](_0x16a9d2))return![];if(_0x277482[_0x51fd41(0x39f)](_0x16a9d2))return![];return!![];});if(_0x25f25b===_0x1fcd82(0x190)&&_0xee6aed['length']>0x0)throw new Error('Route\x20'+_0xcbfb3e['method']+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20'+_0xee6aed[_0x1fcd82(0x3a4)](',\x20'));}function _0x30ca70(_0x2fd64e){if(Array['isArray'](_0x2fd64e))return _0x2fd64e;if(_0x2fd64e==null)return[];return[_0x2fd64e];}function _0xcc8d80(_0x55a093,_0x10d643){const _0x5b0326=_0x404a63;return _0x30ca70(_0x55a093?.['type'])[_0x5b0326(0x5c0)](_0x10d643);}function _0x4d7513(_0x2e3b28,_0x4ec6fe){const _0x3ecb1e=_0x404a63;if(_0x2e3b28==null||typeof _0x2e3b28!==_0x3ecb1e(0x380))return _0x2e3b28;const _0x14a31e=_0x30ca70(_0x4ec6fe?.[_0x3ecb1e(0x49b)]);if(_0x14a31e['length']===0x0)return _0x2e3b28;if(_0x14a31e[_0x3ecb1e(0x5c0)](_0x3ecb1e(0x2e8))&&_0x2e3b28===_0x3ecb1e(0x2e8))return null;if(_0x14a31e[_0x3ecb1e(0x5c0)](_0x3ecb1e(0x455))){if(_0x2e3b28===_0x3ecb1e(0x5e1))return!![];if(_0x2e3b28===_0x3ecb1e(0x38c))return![];}if(_0x14a31e[_0x3ecb1e(0x5c0)](_0x3ecb1e(0x14b))&&/^-?\d+$/['test'](_0x2e3b28))return Number[_0x3ecb1e(0x279)](_0x2e3b28,0xa);if(_0x14a31e['includes'](_0x3ecb1e(0x17c))&&/^-?(?:\d+|\d*\.\d+)$/['test'](_0x2e3b28))return Number(_0x2e3b28);return _0x2e3b28;}function _0x127e06(_0x55869c){return _0x1de9c7(_0x55869c);}function _0x3414aa(_0x3283c6,_0x277164={},_0xef39e2={},_0x42f934=null,_0x4e031d={}){const _0x309df0=_0x404a63,_0x590fd1=_0x3283c6?.['operation'];if(!_0x590fd1?.['hasCanonical']||!_0x590fd1[_0x309df0(0xe0)])return null;const _0x14e54c=_0x590fd1[_0x309df0(0xe0)][_0x309df0(0x448)]||{},_0x6b5496=_0x590fd1[_0x309df0(0x5d0)]?.['querySchema']?.['properties']||{},_0x313cb4=_0x590fd1[_0x309df0(0x5d0)]?.[_0x309df0(0x4a3)]||{},_0x26e236=new Set((_0x590fd1[_0x309df0(0x538)]||[])[_0x309df0(0x601)](_0x568b5d=>_0x568b5d[_0x309df0(0x2cc)])),_0x465bf9=new Set(Object[_0x309df0(0x2f1)](_0x6b5496)),_0x4a756f={};for(const [_0x11aa84,_0x5951d0]of Object[_0x309df0(0x427)](_0x14e54c)){Object['prototype'][_0x309df0(0x51a)][_0x309df0(0x456)](_0x5951d0||{},_0x309df0(0x1e4))&&(_0x4a756f[_0x11aa84]=_0x127e06(_0x5951d0['default']));}for(const _0x4673a1 of _0x590fd1[_0x309df0(0x538)]||[]){if(!Object[_0x309df0(0x258)]['hasOwnProperty']['call'](_0x277164,_0x4673a1[_0x309df0(0x2cc)]))continue;const _0x5a2bbd=_0x14e54c[_0x4673a1[_0x309df0(0x2cc)]]||{};_0x4a756f[_0x4673a1[_0x309df0(0x2cc)]]=_0x4d7513(_0x277164[_0x4673a1[_0x309df0(0x2cc)]],_0x5a2bbd);}for(const [_0x5e92d0,_0x4a5675]of Object[_0x309df0(0x427)](_0x6b5496)){if(!Object['prototype'][_0x309df0(0x51a)][_0x309df0(0x456)](_0xef39e2,_0x5e92d0))continue;_0x4a756f[_0x5e92d0]=_0x4d7513(_0xef39e2[_0x5e92d0],_0x4a5675||_0x14e54c[_0x5e92d0]||{});}for(const [_0x435a08,_0x32238d]of Object[_0x309df0(0x427)](_0x313cb4)){if(typeof _0x32238d!==_0x309df0(0x380))continue;let _0x5b34e3;if(_0x32238d['startsWith'](_0x309df0(0x4d1)))_0x5b34e3=_0x277164[_0x32238d[_0x309df0(0x45e)](0x7)];else{if(_0x32238d[_0x309df0(0x3cc)]('query.'))_0x5b34e3=_0xef39e2[_0x32238d[_0x309df0(0x45e)](0x6)];else{if(_0x32238d===_0x309df0(0x5e9))_0x5b34e3=_0x42f934;else{if(_0x32238d[_0x309df0(0x3cc)](_0x309df0(0x43a)))_0x5b34e3=_0x42f934?.[_0x32238d[_0x309df0(0x45e)](0x5)];else{if(_0x32238d[_0x309df0(0x3cc)]('headers.'))_0x5b34e3=_0x4e031d?.[_0x32238d[_0x309df0(0x45e)](0x8)[_0x309df0(0x3f1)]()]??_0x4e031d?.[_0x32238d[_0x309df0(0x45e)](0x8)];}}}}if(_0x5b34e3!==undefined)_0x4a756f[_0x435a08]=_0x5b34e3;}const _0x28d437=_0x590fd1[_0x309df0(0x5d0)]?.[_0x309df0(0x2e5)];if(_0x28d437!==_0x309df0(0x190)&&_0x28d437!=='raw'&&_0x42f934!=null){if(_0x28d437===_0x309df0(0x20e))for(const [_0x2c1069,_0x28fa9e]of Object[_0x309df0(0x427)](_0x14e54c)){if(_0x26e236['has'](_0x2c1069)||_0x465bf9[_0x309df0(0x39f)](_0x2c1069)||Object[_0x309df0(0x258)]['hasOwnProperty']['call'](_0x313cb4,_0x2c1069))continue;if(Object[_0x309df0(0x258)][_0x309df0(0x51a)][_0x309df0(0x456)](_0x42f934,_0x2c1069))_0x4a756f[_0x2c1069]=_0x42f934[_0x2c1069];else{if(_0xcc8d80(_0x28fa9e,_0x309df0(0x20e)))_0x4a756f[_0x2c1069]=_0x42f934;}}else for(const [_0x342bcf,_0x3f3d95]of Object[_0x309df0(0x427)](_0x42f934)){if(_0x26e236['has'](_0x342bcf)||_0x465bf9[_0x309df0(0x39f)](_0x342bcf)||Object[_0x309df0(0x258)]['hasOwnProperty']['call'](_0x313cb4,_0x342bcf))continue;_0x4a756f[_0x342bcf]=_0x3f3d95;}}return _0x4a756f;}function _0x1b37ef(_0x103491,_0x55f4f7,_0x4e5071,_0x1abcb7){const _0x3b447b=_0x404a63;if(!_0x55f4f7)return;const _0x2f7362=_0x30ca70(_0x55f4f7[_0x3b447b(0x49b)]);if(_0x103491===undefined)return;if(_0x103491===null){_0x2f7362[_0x3b447b(0x2eb)]>0x0&&!_0x2f7362['includes'](_0x3b447b(0x2e8))&&_0x1abcb7[_0x3b447b(0x614)]({'field':_0x4e5071,'message':_0x3b447b(0x3dd),'expected':_0x2f7362[_0x3b447b(0x3a4)]('|'),'actual':null});return;}if(_0x2f7362[_0x3b447b(0x2eb)]===0x0)return;const _0x1a003d=_0x2f7362[_0x3b447b(0x28c)](_0x38c013=>{const _0x9ecf66=_0x3b447b;switch(_0x38c013){case _0x9ecf66(0x380):return typeof _0x103491===_0x9ecf66(0x380);case _0x9ecf66(0x14b):return Number['isInteger'](_0x103491);case _0x9ecf66(0x17c):return typeof _0x103491==='number'&&Number['isFinite'](_0x103491);case _0x9ecf66(0x455):return typeof _0x103491===_0x9ecf66(0x455);case _0x9ecf66(0x20e):return _0x103491&&typeof _0x103491===_0x9ecf66(0x20e)&&!Array[_0x9ecf66(0x579)](_0x103491);case'array':return Array['isArray'](_0x103491);case _0x9ecf66(0x2e8):return _0x103491===null;default:return!![];}});if(!_0x1a003d){_0x1abcb7[_0x3b447b(0x614)]({'field':_0x4e5071,'message':_0x3b447b(0x219)+_0x2f7362[_0x3b447b(0x3a4)]('|'),'expected':_0x2f7362[_0x3b447b(0x3a4)]('|'),'actual':_0x103491});return;}Array[_0x3b447b(0x579)](_0x103491)&&_0x55f4f7[_0x3b447b(0x5b7)]&&_0x103491[_0x3b447b(0x612)]((_0x1d5aef,_0x118307)=>_0x1b37ef(_0x1d5aef,_0x55f4f7[_0x3b447b(0x5b7)],_0x4e5071+'['+_0x118307+']',_0x1abcb7));}function _0x51c91b(_0xc9069f,_0x4386bf){const _0x4804c6=_0x404a63,_0x4fc8e6=_0xc9069f?.['operation'];if(!_0x4fc8e6?.['hasCanonical']||!_0x4fc8e6['inputSchema'])return null;const _0x2a7484=_0x4fc8e6[_0x4804c6(0xe0)],_0x41dad6=_0x2a7484[_0x4804c6(0x448)]||{},_0x2f4508=new Set(_0x2a7484['required']||[]),_0xa5500a=[];for(const _0x28a9ea of _0x2f4508){_0x4386bf[_0x28a9ea]===undefined&&_0xa5500a[_0x4804c6(0x614)]({'field':_0x28a9ea,'message':_0x4804c6(0x2b1),'expected':'present','actual':undefined});}if(_0x2a7484[_0x4804c6(0x56f)]===![])for(const _0x1ebfe4 of Object['keys'](_0x4386bf||{})){!Object[_0x4804c6(0x258)][_0x4804c6(0x51a)][_0x4804c6(0x456)](_0x41dad6,_0x1ebfe4)&&_0xa5500a[_0x4804c6(0x614)]({'field':_0x1ebfe4,'message':'is\x20not\x20allowed','expected':_0x4804c6(0x515),'actual':_0x4386bf[_0x1ebfe4]});}for(const [_0x569aa4,_0x40871e]of Object[_0x4804c6(0x427)](_0x41dad6)){_0x1b37ef(_0x4386bf[_0x569aa4],_0x40871e,_0x569aa4,_0xa5500a);}if(_0xa5500a[_0x4804c6(0x2eb)]===0x0)return null;return{'code':_0x4804c6(0x5d4),'errors':_0xa5500a};}function _0x19f9b4(_0x1aec5a=[]){const _0x38badc=_0x404a63;if(!Array[_0x38badc(0x579)](_0x1aec5a)||_0x1aec5a['length']===0x0)return null;const _0x2b662d=_0x1aec5a['slice'](0x0,0x3)['map']((_0x5a379f={})=>{const _0x160585=_0x38badc,_0x3dbf57=_0x5a379f[_0x160585(0x647)]?_0x5a379f[_0x160585(0x647)]+'\x20':'';return(''+_0x3dbf57+(_0x5a379f[_0x160585(0x29c)]||_0x160585(0x271)))[_0x160585(0x486)]();})[_0x38badc(0x3a4)](';\x20');return _0x1aec5a[_0x38badc(0x2eb)]>0x3?_0x2b662d+'\x20(+'+(_0x1aec5a[_0x38badc(0x2eb)]-0x3)+_0x38badc(0x15e):_0x2b662d;}function _0x4f037b(_0x24e315,_0x1b2021={}){const _0x22eaf3=_0x404a63,_0x4445c1=_0x1b2021?.[_0x22eaf3(0x657)]?.[_0x22eaf3(0x31b)]??_0x1b2021?.['error']??_0x22eaf3(0x344),_0x505c90=_0x1b2021?.[_0x22eaf3(0x657)]?.[_0x22eaf3(0x108)]??_0x1b2021?.[_0x22eaf3(0x108)]??_0x4445c1?.['details']??null,_0xe70de9=_0x1b2021?.['result']?.[_0x22eaf3(0x60e)]??_0x1b2021?.[_0x22eaf3(0x60e)]??_0x4445c1?.[_0x22eaf3(0x60e)]??null,_0x4c5fb0=_0x1b2021?.[_0x22eaf3(0x657)]?.[_0x22eaf3(0x29c)]??_0x1b2021?.[_0x22eaf3(0x29c)]??_0x4445c1?.[_0x22eaf3(0x29c)]??null,_0x394774=typeof _0x4445c1===_0x22eaf3(0x380)?_0x4445c1:null,_0x1e6d08=typeof _0x394774===_0x22eaf3(0x380)&&/^[A-Z0-9_]+$/[_0x22eaf3(0x30d)](_0x394774),_0x5d9d6=_0xe70de9??(_0x1e6d08?_0x394774:null)??(_0x552970[_0x24e315]||_0x22eaf3(0x3b6)+_0x24e315);let _0x49189b=_0x4c5fb0;!_0x49189b&&typeof _0x394774===_0x22eaf3(0x380)&&!_0x1e6d08&&(_0x49189b=_0x394774);if(!_0x49189b&&_0x5d9d6===_0x22eaf3(0x5d4)){const _0x1952f5=_0x19f9b4(_0x505c90);_0x49189b=_0x1952f5?_0x22eaf3(0x110)+_0x1952f5:_0x22eaf3(0x116);}if(!_0x49189b&&Array[_0x22eaf3(0x579)](_0x505c90)&&_0x505c90['length']>0x0){const _0x202d06=_0x19f9b4(_0x505c90);if(_0x202d06)_0x49189b=_0x202d06;}if(!_0x49189b)_0x49189b=_0x552970[_0x24e315]||_0x22eaf3(0x344);const _0x360537={'code':_0x5d9d6,'message':_0x49189b};if(_0x505c90!=null)_0x360537[_0x22eaf3(0x108)]=_0x505c90;return _0x360537;}function _0x9f9de8(_0x1a454a){const _0x1c7695=_0x404a63,_0x1998e5={};if(!_0x1a454a)return _0x1998e5;for(const _0x19f750 of _0x1a454a[_0x1c7695(0x37c)](';')){const _0x41be89=_0x19f750[_0x1c7695(0x42b)]('=');if(_0x41be89===-0x1)continue;const _0x503dea=_0x19f750[_0x1c7695(0x45e)](0x0,_0x41be89)[_0x1c7695(0x486)](),_0x3020c9=_0x19f750[_0x1c7695(0x45e)](_0x41be89+0x1)['trim']();_0x1998e5[_0x503dea]=decodeURIComponent(_0x3020c9);}return _0x1998e5;}function _0x7db96a(_0x2770cc,_0xe0488d){const _0x212040=_0x404a63;return _0xe0488d=_0x5b8fc6(_0xe0488d),{'status':_0xe0488d[_0x212040(0x626)]??_0x2770cc[_0x212040(0x626)],'headers':{..._0x2770cc[_0x212040(0x5b1)]||{},..._0xe0488d[_0x212040(0x5b1)]||{}},'body':_0xe0488d[_0x212040(0x5e9)]??_0x2770cc['body']};}function _0x3efcfe(_0x30a88a={}){const _0x1ad1fa=_0x404a63;return _0x30a88a[_0x1ad1fa(0x109)]||(_0x30a88a[_0x1ad1fa(0x567)]?_0x1ad1fa(0x567):_0x1ad1fa(0x5d0));}function _0x1ba266(_0xb12e4b){const _0x265069=_0x404a63;if(_0xb12e4b[_0x265069(0x1fc)]?.['internal']===!![])return!![];if(_0xb12e4b[_0x265069(0x1fc)]?.['auth']?.[_0x265069(0x53c)]===!![])return!![];if(_0xb12e4b[_0x265069(0x1fc)]?.[_0x265069(0x37d)]?.['ok']===!![])return!![];return![];}function _0x267036(_0x4406d5,_0x9033a8){const _0x564e74=_0x404a63,_0x2982ea=_0x9033a8[_0x564e74(0x37c)]('.');let _0x35ba41=_0x4406d5;for(const _0x19f97a of _0x2982ea){_0x35ba41=_0x35ba41?.[_0x19f97a];}return _0x35ba41||null;}class _0x38c7a0{constructor(){const _0x272f51=_0x404a63;this[_0x272f51(0x182)]=[],this['guards']=[],this[_0x272f51(0x5d7)]=[],this[_0x272f51(0x62e)]=0x5*0x400*0x400,this['server']=null,this['_sockets']=new Set(),this['auth']={'cookieName':'okdb_session','stateCookieName':'kdb_admin_oauth_state','csrfCookieName':_0x272f51(0x53d)},this['_authOptions']={},this[_0x272f51(0x4d4)]=new Map(),this[_0x272f51(0x476)]=null,this[_0x272f51(0x4cb)]=null,this[_0x272f51(0x3c8)]=new Map(),this[_0x272f51(0x4c5)]=new _0x19a34d(),this[_0x272f51(0x4c2)]=![],this[_0x272f51(0x5a8)]=0x0;}[_0x404a63(0x2f3)](_0x515c7f={}){const _0x1cfd04=_0x404a63;return this['_authOptions']=_0x515c7f||{},this[_0x1cfd04(0x2db)]=_0x515c7f[_0x1cfd04(0x63e)]??'open',this[_0x1cfd04(0x205)];}get['isSetupMode'](){const _0x14cc4f=_0x404a63;if(this[_0x14cc4f(0x31d)]?.['auth'])return this[_0x14cc4f(0x31d)][_0x14cc4f(0x37d)][_0x14cc4f(0x437)];return![];}[_0x404a63(0x65e)](){const _0x5d4295=_0x404a63;if(this['_okdb']?.[_0x5d4295(0x37d)])return this['_okdb'][_0x5d4295(0x37d)][_0x5d4295(0x65e)]();return this[_0x5d4295(0x205)]||{};}['use'](_0x3d3579){const _0xa2affc=_0x404a63;this['middlewares'][_0xa2affc(0x614)](_0x3d3579);}[_0x404a63(0x249)](_0x5793a9,_0x2c3c4d){const _0x4078ea=_0x404a63;this[_0x4078ea(0x519)][_0x4078ea(0x614)]({'match':_0x5793a9,'handler':_0x2c3c4d});}[_0x404a63(0x61d)](_0x192313,_0x14020d,_0x5ba12c,_0x16dbd9={}){const _0x30b292=_0x404a63,_0x52af51={'method':_0x34134f(_0x192313),'path':_0x14020d,'matcher':_0x50387f(_0x14020d),'handler':_0x5ba12c,'meta':_0x16dbd9||{}},_0x598d06=_0x34f30f(_0x52af51);_0x39e179(_0x52af51,_0x598d06),_0x52af51[_0x30b292(0x3d5)]=_0x598d06,_0x52af51[_0x30b292(0x660)]=this[_0x30b292(0x4c2)]===!![];if(_0x52af51['userAdded'])this[_0x30b292(0x5a8)]++;this[_0x30b292(0x5d7)][_0x30b292(0x614)](_0x52af51);}['addRaw'](_0x5e1146,_0x4d0ce4,_0xa7e4af,_0x46a0cb={}){this['add'](_0x5e1146,_0x4d0ce4,_0xa7e4af,{..._0x46a0cb,'raw':!![]});}[_0x404a63(0x3d0)](_0xd49fd5,_0x40120c){const _0x5650ec=_0x404a63;for(const _0x163509 of this['routes']){if(_0x163509[_0x5650ec(0x527)]!==_0x34134f(_0xd49fd5))continue;if(_0x163509[_0x5650ec(0xdd)]['regex'][_0x5650ec(0x30d)](_0x40120c))return _0x163509;}if(_0x34134f(_0xd49fd5)===_0x5650ec(0x346))for(const _0x5c0903 of this['routes']){if(_0x5c0903['matcher']['regex']['test'](_0x40120c)&&_0x5c0903[_0x5650ec(0x664)]?.[_0x5650ec(0x1fb)])return _0x5c0903;}return null;}[_0x404a63(0x52e)](_0x1f839b,_0x51ce1f){const _0x407c5d=_0x404a63;if(_0x1f839b?.['meta']?.[_0x407c5d(0x642)])return![];if(_0x51ce1f?.[_0x407c5d(0x5b1)]?.['x-okdb-raw-response'])return![];return!![];}[_0x404a63(0x33c)](){const _0x8fd44=_0x404a63;return this[_0x8fd44(0x5d7)][_0x8fd44(0x1c6)](_0x3fdeca=>!_0x3fdeca['meta']?.[_0x8fd44(0x350)])[_0x8fd44(0x601)](_0x1c34da=>({'method':_0x1c34da[_0x8fd44(0x527)],'path':_0x1c34da[_0x8fd44(0x42d)],'defaults':_0x1c34da[_0x8fd44(0xdd)]['defaults'],'meta':_0x1c34da['meta'],'operation':_0x1c34da[_0x8fd44(0x3d5)]}));}['addSSE'](_0x2b4d1d,_0x2caf11,_0x389560={}){const _0x56107c=_0x404a63,{PassThrough:_0x1bb23d}=require$$8;this[_0x56107c(0x61d)](_0x56107c(0x58f),_0x2b4d1d,({params:_0x265d40,query:_0x565899,headers:_0x119d21,context:_0x2cb12c})=>{const _0x48ed5f=_0x56107c,_0x59df6a=new _0x1bb23d();let _0x5a5610=null;const _0x508130={};try{_0x2cb12c?.['req']?.[_0x48ed5f(0x143)]?.[_0x48ed5f(0x5d1)](!![]);}catch{}_0x59df6a[_0x48ed5f(0x4ae)](_0x48ed5f(0x302)),_0x5a5610=setInterval(()=>{const _0x1c7a27=_0x48ed5f;try{_0x59df6a['write'](_0x1c7a27(0x159));}catch{}},0x3a98);const _0x163d86=(_0x59bab3,_0x3d8fd0,_0x4cb1e6={})=>{const _0x43efab=_0x48ed5f;try{const _0x44cc26=_0x4cb1e6[_0x43efab(0x13b)]?String(_0x3d8fd0??''):JSON['stringify'](_0x3d8fd0);_0x4cb1e6['id']!=null&&_0x59df6a[_0x43efab(0x4ae)]('id:\x20'+_0x4cb1e6['id']+'\x0a');_0x59df6a[_0x43efab(0x4ae)](_0x43efab(0x4de)+_0x59bab3+'\x0a');for(const _0x28ccac of _0x44cc26[_0x43efab(0x37c)]('\x0a')){_0x59df6a[_0x43efab(0x4ae)]('data:\x20'+_0x28ccac+'\x0a');}_0x59df6a[_0x43efab(0x4ae)]('\x0a');}catch{}},_0x454c97=()=>{const _0x2f3fb9=_0x48ed5f;_0x5a5610&&(clearInterval(_0x5a5610),_0x5a5610=null);try{_0x59df6a[_0x2f3fb9(0x167)]();}catch{}},_0x5e0469=(_0x1883c0,_0x54b510)=>{_0x508130[_0x1883c0]=_0x54b510;};_0x2cb12c?.[_0x48ed5f(0x668)]?.['on'](_0x48ed5f(0x241),_0x454c97),_0x59df6a['on'](_0x48ed5f(0x241),_0x454c97);const _0x403c42=_0x2caf11({'send':_0x163d86,'close':_0x454c97,'params':_0x265d40??{},'query':_0x565899??{},'headers':_0x119d21??{},'context':_0x2cb12c,'setHeader':_0x5e0469});return typeof _0x403c42==='function'&&_0x59df6a['on'](_0x48ed5f(0x241),_0x403c42),{'status':0xc8,'headers':{'content-type':_0x48ed5f(0x276),'cache-control':_0x48ed5f(0x4cf),'connection':_0x48ed5f(0x28d),'x-accel-buffering':'no',..._0x508130},'body':_0x59df6a};},{..._0x389560,'sse':!![]});}async[_0x404a63(0x482)](_0x139878,_0x3b4da1){const _0x195b6d=_0x404a63;for(const _0x383cdd of this['guards']){if(!_0x383cdd['match'](_0x139878))continue;const _0x36ba45=await _0x383cdd[_0x195b6d(0x124)](_0x139878,_0x3b4da1);if(_0x36ba45===![])return![];}return!![];}async[_0x404a63(0x217)](_0x350bcf,_0xe27361,_0x2d2cfb){let _0x4d2f5b=0x0;const _0x407cda=async()=>{const _0x3e80a3=_0x2368,_0x2d6dd5=this[_0x3e80a3(0x182)][_0x4d2f5b++];if(!_0x2d6dd5)return _0x2d2cfb();return _0x2d6dd5(_0x350bcf,_0xe27361,_0x407cda);};return _0x407cda();}[_0x404a63(0x3bf)](_0x513b69,_0x3aa2a3){const _0x1e0a69=_0x404a63,{status:status=0xc8,headers:headers={},body:_0x1a5a9b}=_0x513b69;if(status>=0x12c&&status<0x190)return _0x513b69;if(_0x3e2d4c(_0x1a5a9b))return _0x513b69;if(Buffer[_0x1e0a69(0x666)](_0x1a5a9b))return _0x513b69;if(typeof _0x1a5a9b===_0x1e0a69(0x380))return _0x513b69;const _0xa2d628={'time':+_0x3aa2a3['toFixed'](0x2)};if(_0x1a5a9b?.[_0x1e0a69(0x664)]&&typeof _0x1a5a9b['meta']===_0x1e0a69(0x20e)){const {time:_0x5bddf8,..._0x3f67fb}=_0x1a5a9b[_0x1e0a69(0x664)];Object[_0x1e0a69(0x451)](_0xa2d628,_0x3f67fb);}let _0x5b9e2f;if(status>=0x190){const _0x5d8007=_0x4f037b(status,_0x1a5a9b);_0x5b9e2f={'data':null,'error':_0x5d8007,'meta':_0xa2d628};}else{if(status===0xcc||_0x1a5a9b==null)_0x5b9e2f={'data':null,'error':null,'meta':_0xa2d628};else{let _0x17450e;if(_0x1e0a69(0x657)in _0x1a5a9b)_0x17450e=_0x1a5a9b[_0x1e0a69(0x657)];else{const {meta:_0x4d4fc5,..._0x179d18}=_0x1a5a9b;_0x17450e=Object[_0x1e0a69(0x2f1)](_0x179d18)[_0x1e0a69(0x2eb)]>0x0?_0x179d18:null;}_0x5b9e2f={'data':_0x17450e,'error':null,'meta':_0xa2d628};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x5b9e2f};}async[_0x404a63(0x4f3)](_0x24172e,_0x51558c,_0x3591ff={},_0x7df325={}){const _0x5d9a1a=_0x404a63;_0x24172e=_0x34134f(_0x24172e);const _0x5f1097=this['_matchRoute'](_0x24172e,_0x51558c),_0x28cfc2={'method':_0x24172e,'path':_0x51558c,'headers':_0x3591ff[_0x5d9a1a(0x5b1)]??{},'body':_0x3591ff[_0x5d9a1a(0x5e9)]??null,'query':_0x3591ff[_0x5d9a1a(0x3c5)]??{},'context':_0x7df325,'cookies':_0x9f9de8(_0x3591ff[_0x5d9a1a(0x5b1)]?.[_0x5d9a1a(0x1c1)]),'route':_0x5f1097,'socket':{'remoteAddress':_0x3591ff['remoteAddress']??_0x5d9a1a(0x586)}};_0x28cfc2[_0x5d9a1a(0x1fc)]=_0x28cfc2[_0x5d9a1a(0x1fc)]||{};!_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x37d)]&&(_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x37d)]=await this['authenticateRequest'](_0x28cfc2));if(_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x37d)]?.[_0x5d9a1a(0x1d3)])return _0x5b8fc6({'status':0x193,'body':{'error':{'code':_0x5d9a1a(0x263),'message':_0x5d9a1a(0x2d0)}}});_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x37d)]?.['user']&&!_0x28cfc2['context'][_0x5d9a1a(0x4fd)]&&(_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x4fd)]=_0x28cfc2[_0x5d9a1a(0x1fc)]['auth']['user']);let _0x4bb1eb=null;const _0x15e957={'status'(_0x67693d){const _0x4e31e4=_0x5d9a1a;_0x4bb1eb=_0x4bb1eb||{},_0x4bb1eb[_0x4e31e4(0x626)]=_0x67693d;},'setHeader'(_0x1b3617,_0x331ae3){const _0x29cf5b=_0x5d9a1a;_0x4bb1eb=_0x4bb1eb||{},_0x4bb1eb[_0x29cf5b(0x5b1)]=_0x4bb1eb['headers']||{};const _0x5aa0c0=String(_0x1b3617)[_0x29cf5b(0x3f1)]();if(_0x5aa0c0===_0x29cf5b(0x517)){const _0x25bdf7=_0x4bb1eb[_0x29cf5b(0x5b1)][_0x1b3617];if(!_0x25bdf7)_0x4bb1eb[_0x29cf5b(0x5b1)][_0x1b3617]=_0x331ae3;else{if(Array[_0x29cf5b(0x579)](_0x25bdf7))_0x25bdf7[_0x29cf5b(0x614)](_0x331ae3);else _0x4bb1eb['headers'][_0x1b3617]=[_0x25bdf7,_0x331ae3];}return;}_0x4bb1eb['headers'][_0x1b3617]=_0x331ae3;},'send'(_0x4e413b){const _0x3366e6=_0x5d9a1a;_0x4bb1eb=_0x4bb1eb||{},_0x4bb1eb[_0x3366e6(0x5e9)]=_0x4e413b;}},_0x19dad9=await this[_0x5d9a1a(0x482)](_0x28cfc2,_0x15e957);if(!_0x19dad9)return _0x5b8fc6(_0x4bb1eb??{'status':0x193});const _0x38537b=this[_0x5d9a1a(0x23f)](_0x28cfc2);if(_0x38537b)return _0x5b8fc6(_0x38537b);const _0x1d232a=this[_0x5d9a1a(0x646)](_0x28cfc2);if(_0x1d232a)return _0x5b8fc6(_0x1d232a);return await this[_0x5d9a1a(0x217)](_0x28cfc2,_0x15e957,async()=>{const _0x2a4222=_0x5d9a1a,_0x2184a5=await this[_0x2a4222(0x187)](_0x28cfc2);if(_0x4bb1eb==null){_0x4bb1eb=_0x2184a5;return;}_0x4bb1eb=_0x7db96a(_0x4bb1eb,_0x2184a5);}),_0x5b8fc6(_0x4bb1eb);}[_0x404a63(0x23f)](_0x565d26){const _0x35eb0c=_0x404a63,_0x2ca852=_0x565d26[_0x35eb0c(0x412)]?.[_0x35eb0c(0x3d5)],_0x1c4bd7=_0x2ca852?.['access'];if(!_0x2ca852?.[_0x35eb0c(0x401)]||!_0x1c4bd7)return null;if(_0x565d26[_0x35eb0c(0x1fc)]?.[_0x35eb0c(0x37d)]?.[_0x35eb0c(0x18d)]===!![]||_0x565d26['context']?.[_0x35eb0c(0x37d)]?.[_0x35eb0c(0x435)]===!![])return null;const _0x5828dc=_0x3efcfe(_0x565d26[_0x35eb0c(0x1fc)]),_0x54eef7=Array[_0x35eb0c(0x579)](_0x1c4bd7[_0x35eb0c(0x499)])?_0x1c4bd7['audiences']:null;if(_0x1c4bd7[_0x35eb0c(0x254)]&&_0x565d26[_0x35eb0c(0x1fc)]?.[_0x35eb0c(0x567)]!==!![])return{'status':0x193,'body':{'error':_0x35eb0c(0x3f0)}};if(_0x54eef7&&_0x54eef7[_0x35eb0c(0x2eb)]>0x0&&!_0x54eef7[_0x35eb0c(0x5c0)](_0x5828dc)&&!(_0x5828dc===_0x35eb0c(0x567)&&_0x54eef7['includes'](_0x35eb0c(0x5df))))return{'status':0x193,'body':{'error':'Forbidden'}};if(_0x1c4bd7[_0x35eb0c(0x5d6)]&&!_0x1ba266(_0x565d26))return{'status':0x191,'body':{'error':_0x35eb0c(0x4e1)}};const _0x444a6b=_0x1c4bd7[_0x35eb0c(0x598)];if(!_0x444a6b)return null;if(_0x565d26[_0x35eb0c(0x1fc)]?.[_0x35eb0c(0x37d)]?.[_0x35eb0c(0x49b)]===_0x35eb0c(0x55a))return null;const _0x1fabb9=_0x565d26['context']?.[_0x35eb0c(0x37d)]?.[_0x35eb0c(0x359)];if(!_0x1fabb9){if(_0x565d26[_0x35eb0c(0x1fc)]?.[_0x35eb0c(0x37d)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x35eb0c(0x62d)}};}if(!_0x565d26['params']&&_0x565d26[_0x35eb0c(0x412)]?.['matcher']){const _0x1ed1e0=_0x565d26['route']['matcher']['regex'][_0x35eb0c(0x4c7)](_0x565d26[_0x35eb0c(0x42d)]);_0x1ed1e0&&(_0x565d26[_0x35eb0c(0x5fe)]={},_0x565d26[_0x35eb0c(0x412)][_0x35eb0c(0xdd)][_0x35eb0c(0x2f1)]['forEach']((_0x597a5c,_0x12e6bc)=>{const _0xe95d6d=_0x35eb0c,_0x2a64a9=_0x1ed1e0[_0x12e6bc+0x1];_0x565d26[_0xe95d6d(0x5fe)][_0x597a5c]=_0x2a64a9?decodeURIComponent(_0x2a64a9):_0x565d26['route'][_0xe95d6d(0xdd)][_0xe95d6d(0x5ca)][_0x597a5c]??undefined;}));}let _0x2ce10a=null;_0x1c4bd7[_0x35eb0c(0x4f8)]?.[_0x35eb0c(0x46e)]&&(_0x2ce10a=_0x267036(_0x565d26,_0x1c4bd7[_0x35eb0c(0x4f8)][_0x35eb0c(0x46e)]));if(_0x2ce10a&&_0x2ce10a['startsWith']('~')){const _0x2c593c=_0x3c5d4e(_0x444a6b),_0x11fd10=_0x11a074(_0x1fabb9[_0x35eb0c(0x3f3)]||[],(_0x1fabb9[_0x35eb0c(0x236)]||{})[_0x2ce10a]||[]);if(!_0x19937c(_0x11fd10,_0x2c593c))return{'status':0x193,'body':{'error':_0x35eb0c(0x5f2)+_0x2c593c+_0x35eb0c(0x544)}};}const _0x37d06b=_0x11a074(_0x1fabb9[_0x35eb0c(0x3f3)]||[],_0x2ce10a?(_0x1fabb9[_0x35eb0c(0x236)]||{})[_0x2ce10a]||[]:[]);if(!_0x19937c(_0x37d06b,_0x444a6b))return{'status':0x193,'body':{'error':_0x35eb0c(0x5f2)+_0x444a6b}};return null;}[_0x404a63(0x646)](_0x5ea775){const _0x20c9fa=_0x404a63,_0x411bb4=_0x5ea775[_0x20c9fa(0x412)],_0x205dae=_0x411bb4?.[_0x20c9fa(0x3d5)];if(!_0x205dae?.[_0x20c9fa(0x401)]||!_0x205dae['inputSchema'])return null;let _0x13c76a=_0x5ea775[_0x20c9fa(0x5fe)]??null;if(!_0x13c76a&&_0x411bb4?.[_0x20c9fa(0xdd)]){const _0x57714a=_0x411bb4[_0x20c9fa(0xdd)][_0x20c9fa(0x5d2)][_0x20c9fa(0x4c7)](_0x5ea775[_0x20c9fa(0x42d)]);_0x57714a&&(_0x13c76a={},_0x411bb4[_0x20c9fa(0xdd)][_0x20c9fa(0x2f1)][_0x20c9fa(0x612)]((_0x3faf64,_0x33749)=>{const _0x5990d0=_0x20c9fa,_0x5c4d0a=_0x57714a[_0x33749+0x1];_0x13c76a[_0x3faf64]=_0x5c4d0a?decodeURIComponent(_0x5c4d0a):_0x411bb4[_0x5990d0(0xdd)]['defaults'][_0x3faf64]??undefined;}));}const _0x55e132=_0x3414aa(_0x411bb4,_0x13c76a??{},_0x5ea775[_0x20c9fa(0x3c5)]??{},_0x5ea775[_0x20c9fa(0x5e9)],_0x5ea775[_0x20c9fa(0x5b1)]??{}),_0x7e8e6a=_0x51c91b(_0x411bb4,_0x55e132||{});if(!_0x7e8e6a)return null;const _0x2a1db0=_0x19f9b4(_0x7e8e6a[_0x20c9fa(0x444)]);return{'status':0x190,'body':{'error':_0x7e8e6a[_0x20c9fa(0x60e)],'code':_0x7e8e6a[_0x20c9fa(0x60e)],'message':_0x2a1db0?_0x20c9fa(0x110)+_0x2a1db0:'Validation\x20failed','details':_0x7e8e6a[_0x20c9fa(0x444)]}};}[_0x404a63(0x62a)](_0x1ecc06,_0x57e5a9){const _0x5f07ce=_0x404a63,_0x1abcaf=_0x51c91b(_0x1ecc06,_0x57e5a9||{});if(!_0x1abcaf)return null;return{'code':_0x1abcaf[_0x5f07ce(0x60e)],'message':_0x19f9b4(_0x1abcaf[_0x5f07ce(0x444)])?_0x5f07ce(0x110)+_0x19f9b4(_0x1abcaf[_0x5f07ce(0x444)]):_0x5f07ce(0x116),'details':_0x1abcaf[_0x5f07ce(0x444)]};}async['_dispatch'](_0x3d6cc0){const _0x180213=_0x404a63;if(_0x3d6cc0[_0x180213(0x527)]==='OPTIONS')for(const _0x173b11 of this[_0x180213(0x5d7)]){const _0xf1d153=_0x173b11['matcher'][_0x180213(0x5d2)][_0x180213(0x4c7)](_0x3d6cc0[_0x180213(0x42d)]);if(!_0xf1d153||!_0x173b11[_0x180213(0x664)]?.[_0x180213(0x1fb)])continue;return{'status':0xcc,'headers':_0x2a8e64(_0x3d6cc0['headers'],_0x173b11[_0x180213(0x664)]['cors'],_0x173b11[_0x180213(0x527)])||{}};}for(const _0x411a81 of this[_0x180213(0x5d7)]){if(_0x411a81[_0x180213(0x527)]!==_0x3d6cc0[_0x180213(0x527)])continue;const _0x55bb9c=_0x411a81[_0x180213(0xdd)][_0x180213(0x5d2)][_0x180213(0x4c7)](_0x3d6cc0[_0x180213(0x42d)]);if(!_0x55bb9c)continue;const _0x2f2d1b={};_0x411a81['matcher'][_0x180213(0x2f1)][_0x180213(0x612)]((_0x5d581e,_0x295b09)=>{const _0x5730e5=_0x180213,_0x5d6c57=_0x55bb9c[_0x295b09+0x1];_0x2f2d1b[_0x5d581e]=_0x5d6c57?decodeURIComponent(_0x5d6c57):_0x411a81['matcher'][_0x5730e5(0x5ca)][_0x5d581e]??undefined;}),_0x3d6cc0[_0x180213(0x5fe)]=_0x2f2d1b;try{const _0x26aca0=await _0x411a81[_0x180213(0x124)]({'params':_0x2f2d1b,'body':_0x3d6cc0[_0x180213(0x5e9)],'query':_0x3d6cc0[_0x180213(0x3c5)],'headers':_0x3d6cc0['headers'],'context':_0x3d6cc0[_0x180213(0x1fc)]}),_0x20b9c7=_0x5b8fc6(_0x26aca0),_0x3cb5bb=_0x2a8e64(_0x3d6cc0[_0x180213(0x5b1)],_0x411a81[_0x180213(0x664)]?.[_0x180213(0x1fb)],_0x411a81[_0x180213(0x527)]);if(!_0x3cb5bb)return _0x20b9c7;return{..._0x20b9c7,'headers':{..._0x20b9c7['headers']||{},..._0x3cb5bb}};}catch(_0x12567c){const _0x5bb3ef=_0x12567c?.['status']||_0x3da15a[_0x12567c?.[_0x180213(0x60e)]]||0x1f4;return{'status':_0x5bb3ef,'body':{'error':_0x12567c[_0x180213(0x29c)]||'Internal\x20error','code':_0x12567c?.['code']||_0x552970[_0x5bb3ef]||_0x180213(0x3b6)+_0x5bb3ef,'message':_0x12567c?.[_0x180213(0x29c)]||_0x180213(0x3b8),..._0x12567c?.[_0x180213(0x108)]!=null?{'details':_0x12567c[_0x180213(0x108)]}:{}}};}}return{'status':0x194,'body':{'error':_0x180213(0x533)}};}[_0x404a63(0x31f)](_0x42317c,_0x3a9588={}){const _0x434338=_0x404a63,_0x3631b4=require$$1$2,_0x174f71=Number(_0x3a9588[_0x434338(0x5bf)])||0x0,_0x39ef88=_0x3a9588[_0x434338(0x2f2)],_0x47f526=_0x3631b4[_0x434338(0x48f)]&&(typeof _0x39ef88===_0x434338(0x26b)?_0x174f71>0x1:_0x174f71>=0x1);if(_0x47f526){if(this[_0x434338(0x34b)])throw new Error(_0x434338(0x65f));const {runClustered:_0x585703}=requireOkdbCluster();if(typeof _0x39ef88==='function')return this[_0x434338(0x34b)]=_0x585703({'workers':_0x174f71,'makeOkdb':_0x39ef88,'port':_0x42317c,'primaryOkdb':_0x3a9588[_0x434338(0x4ad)]}),this['server'];const _0xc25e25=this[_0x434338(0x31d)];if(!_0xc25e25?.[_0x434338(0x59f)])throw new Error(_0x434338(0x32f)+'(open-before-fork\x20seeds\x20the\x20shared\x20__tokenSecret\x20and\x20gives\x20workers\x20the\x20root\x20path).');if(this[_0x434338(0x5a8)]>0x0){const _0x32dd19=new Error(_0x434338(0x398)+_0x174f71+_0x434338(0x5c4)+this['_userRouteCount']+_0x434338(0x34d)+_0x434338(0x10a)+_0x434338(0x585)+_0x434338(0x288)+_0x434338(0x38f));_0x32dd19[_0x434338(0x60e)]=_0x434338(0x4d5);throw _0x32dd19;}let _0x204b8b;try{_0x204b8b=JSON[_0x434338(0x34f)](JSON[_0x434338(0x3d9)](_0xc25e25[_0x434338(0x2aa)]??{}));}catch(_0x16ead7){throw new Error(_0x434338(0x4c3)+_0x16ead7['message']);}return this[_0x434338(0x34b)]=_0x585703({'workers':_0x174f71,'port':_0x42317c,'primaryOkdb':_0xc25e25,'childEntry':!![],'workerEnv':{'OKDB_HTTP_CHILD':JSON[_0x434338(0x3d9)]({'rootPath':_0xc25e25[_0x434338(0x42d)],'port':_0x42317c,'options':_0x204b8b,'logLevel':_0xc25e25[_0x434338(0x2aa)]?.[_0x434338(0x45d)]??_0x434338(0x3d7)})}}),this[_0x434338(0x34b)];}if(this[_0x434338(0x34b)])throw new Error('HTTP\x20server\x20already\x20running');_0x42317c&&this[_0x434338(0x37d)][_0x434338(0x662)]===_0x434338(0x47d)&&(this[_0x434338(0x37d)][_0x434338(0x662)]=_0x434338(0x33e)+_0x42317c,this[_0x434338(0x31d)]?.['auth']&&(this[_0x434338(0x31d)]['auth'][_0x434338(0x623)]=this['auth'][_0x434338(0x662)]));const _0x29a689=this['_okdb']?.[_0x434338(0x2aa)]?.[_0x434338(0x408)]?.[_0x434338(0x3cb)]??![];this[_0x434338(0x34b)]=_0x53a26f[_0x434338(0x2a7)](async(_0x169714,_0x5f332d)=>{const _0x2d8cac=_0x434338,_0x16f343=Date[_0x2d8cac(0x16a)]();if(_0x29a689){const _0x47fabf=_0x169714['url']||'/',_0x46546f=_0x169714['headers']?.[_0x2d8cac(0x494)]?_0x169714[_0x2d8cac(0x5b1)][_0x2d8cac(0x494)][_0x2d8cac(0x38b)](/^Bearer\s+(\S{0,8})\S*/i,_0x2d8cac(0x113)):'-',_0x4de6e1=_0x169714[_0x2d8cac(0x5b1)]?.[_0x2d8cac(0x111)]||'-',_0x13c9f9=_0x169714['headers']?.[_0x2d8cac(0x416)]||_0x169714[_0x2d8cac(0x5b1)]?.[_0x2d8cac(0x2c0)]||'-',_0x438661=_0x169714[_0x2d8cac(0x5b1)]?.[_0x2d8cac(0x424)]||'-';process['stdout'][_0x2d8cac(0x4ae)](_0x2d8cac(0x233)+_0x169714[_0x2d8cac(0x527)]['padEnd'](0x7)+'\x20'+_0x47fabf[_0x2d8cac(0x2c9)](0x2d)+'\x20'+(_0x2d8cac(0x1e2)+_0x46546f+_0x2d8cac(0x2d7)+_0x438661+_0x2d8cac(0x1bf)+_0x4de6e1+_0x2d8cac(0x286)+_0x13c9f9+'\x0a'));}try{const _0x18fe3c=new _0x451322(_0x169714[_0x2d8cac(0x2c4)],_0x2d8cac(0x393)+_0x169714[_0x2d8cac(0x5b1)]['host']),_0x2d8eb5=this[_0x2d8cac(0x3d0)](_0x169714[_0x2d8cac(0x527)],_0x18fe3c[_0x2d8cac(0xe1)]),_0x5b45f0=_0x2d8eb5?.[_0x2d8cac(0x664)]?.[_0x2d8cac(0x13b)]===!![];if(_0x5b45f0){const _0x37b38e=_0x169714['headers']?.[_0x2d8cac(0x409)];if(_0x37b38e!=null){const _0x1d6082=Number(_0x37b38e);if(Number[_0x2d8cac(0x5f8)](_0x1d6082)&&_0x1d6082>this[_0x2d8cac(0x62e)]){_0x5f332d[_0x2d8cac(0x27b)]=0x19d,_0x5f332d[_0x2d8cac(0x62c)]('Payload\x20too\x20large');return;}}}const _0x391b71=_0x5b45f0?null:await _0x559c79(_0x169714,this['maxBodyBytes']),_0x2154db=_0x5b45f0?_0x2003a(_0x169714,this[_0x2d8cac(0x62e)]):undefined,_0x317af5=await this['handle'](_0x169714[_0x2d8cac(0x527)],_0x18fe3c[_0x2d8cac(0xe1)],{'body':_0x391b71,'query':Object[_0x2d8cac(0x3e5)](_0x18fe3c[_0x2d8cac(0x4e7)]['entries']()),'headers':_0x169714[_0x2d8cac(0x5b1)]},{'req':_0x169714,'res':_0x5f332d,'rawStream':_0x2154db}),_0xd06c33=this[_0x2d8cac(0x3d0)](_0x169714[_0x2d8cac(0x527)],_0x18fe3c['pathname']),_0x2d236d=Date['now']()-_0x16f343,_0x136119=this[_0x2d8cac(0x52e)](_0xd06c33,_0x317af5)?this['_wrapApiResponse'](_0x317af5,_0x2d236d):_0x5b8fc6(_0x317af5),_0x31d72a=(_0x136119[_0x2d8cac(0x626)]||0xc8)>=0x190;this[_0x2d8cac(0x4c5)]['record'](_0x169714[_0x2d8cac(0x527)],_0x2d236d,_0x31d72a),_0x287734(_0x5f332d,_0x136119);if(_0x29a689){const _0x533aa8=_0x136119[_0x2d8cac(0x626)]||0xc8,_0x3784f5=Date[_0x2d8cac(0x16a)]()-_0x16f343;process[_0x2d8cac(0x559)][_0x2d8cac(0x4ae)](_0x2d8cac(0x373)+_0x169714[_0x2d8cac(0x527)]['padEnd'](0x7)+'\x20'+_0x18fe3c['pathname'][_0x2d8cac(0x2c9)](0x2d)+'\x20'+_0x533aa8+'\x20\x20'+_0x3784f5+_0x2d8cac(0x543));}}catch(_0x537888){const _0x21d72c=Date[_0x2d8cac(0x16a)]()-_0x16f343;this[_0x2d8cac(0x4c5)]['record'](_0x169714[_0x2d8cac(0x527)],_0x21d72c,!![]);const _0x1ffc72=_0x537888?.[_0x2d8cac(0x626)]||0x1f4;_0x5f332d[_0x2d8cac(0x27b)]=_0x1ffc72,_0x1ffc72===0x19d?_0x5f332d[_0x2d8cac(0x62c)]('Payload\x20too\x20large'):_0x5f332d['end'](_0x537888[_0x2d8cac(0x29c)]||_0x2d8cac(0x3b8));}}),this['server']['on'](_0x434338(0x55c),_0x914894=>{const _0x357629=_0x434338;this[_0x357629(0x491)][_0x357629(0x61d)](_0x914894),_0x914894['on'](_0x357629(0x241),()=>this[_0x357629(0x491)][_0x357629(0x5ed)](_0x914894));}),this[_0x434338(0x34b)]['listen'](_0x42317c);const _0x5b6a57=this['_okdb'];return _0x5b6a57?.[_0x434338(0x532)]&&(_0x5b6a57[_0x434338(0x532)][_0x434338(0x325)](':'+_0x42317c),_0x3631b4[_0x434338(0x60c)]?_0x5b6a57[_0x434338(0x565)]?.({'kind':_0x434338(0x311)})[_0x434338(0x255)](()=>{}):_0x5b6a57[_0x434338(0x17b)]?.({'kind':_0x434338(0x53a),'listenAddr':':'+_0x42317c})['catch'](()=>{})),this[_0x434338(0x34b)];}async[_0x404a63(0x241)](_0x1c0b8f={}){const _0xf5f01f=_0x404a63,_0x51f764=this[_0xf5f01f(0x34b)];this['server']=null;if(_0x51f764&&_0x51f764[_0xf5f01f(0x317)]){try{await _0x51f764[_0xf5f01f(0x241)]();}catch{}this[_0xf5f01f(0x4c5)]&&this['metrics'][_0xf5f01f(0x241)]();return;}if(_0x51f764){const _0x2a7bc9=Number[_0xf5f01f(0x5f8)](_0x1c0b8f[_0xf5f01f(0x524)])?Math[_0xf5f01f(0x47e)](0x0,_0x1c0b8f[_0xf5f01f(0x524)]):0x3e8;await new Promise(_0x3056f7=>{const _0x36fec4=_0xf5f01f;let _0x4489b3=![],_0x495a10=null,_0x58f437=null;const _0xd8ac63=()=>{if(_0x4489b3)return;_0x4489b3=!![];if(_0x495a10)clearTimeout(_0x495a10);if(_0x58f437)clearTimeout(_0x58f437);_0x3056f7();};try{_0x51f764[_0x36fec4(0x241)](_0xd8ac63);}catch{_0xd8ac63();return;}try{_0x51f764[_0x36fec4(0x404)]?.();}catch{}_0x495a10=setTimeout(()=>{const _0x1cf0f3=_0x36fec4;try{_0x51f764[_0x1cf0f3(0x4c1)]?.();}catch{}for(const _0x84a19a of this[_0x1cf0f3(0x491)]){try{_0x84a19a[_0x1cf0f3(0x167)]();}catch{}}_0x58f437=setTimeout(_0xd8ac63,0x64),_0x58f437['unref']?.();},_0x2a7bc9),_0x495a10[_0x36fec4(0x386)]?.();});}this[_0xf5f01f(0x4c5)]&&this[_0xf5f01f(0x4c5)][_0xf5f01f(0x241)]();}[_0x404a63(0x198)](_0x5d3a62,_0x211f68,_0x2cf2db=0x36ee80){const _0x34eb2d=_0x404a63,_0x45e125=Date['now'](),_0x317cb2=Buffer[_0x34eb2d(0x36d)](JSON[_0x34eb2d(0x3d9)]({'iat':_0x45e125,'exp':_0x45e125+_0x2cf2db,..._0x5d3a62}))[_0x34eb2d(0x261)](_0x34eb2d(0x1c4)),_0x1cb073=_0x1d100f(_0x317cb2,_0x211f68);return _0x317cb2+'.'+_0x1cb073;}[_0x404a63(0x553)](_0x809ad9,_0x3eeb41={}){const _0x52f790=_0x404a63,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x52f790(0x368),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x3eeb41;let _0x955ae5=this[_0x52f790(0x37d)]['cookieName']+'='+_0x809ad9;if(httpOnly)_0x955ae5+=_0x52f790(0x4c6);if(sameSite)_0x955ae5+=_0x52f790(0x283)+sameSite;if(path)_0x955ae5+=_0x52f790(0x33f)+path;if(secure)_0x955ae5+=_0x52f790(0x48b);if(Number[_0x52f790(0x5f8)](maxAge))_0x955ae5+=';\x20Max-Age='+Math[_0x52f790(0x47e)](0x0,Math[_0x52f790(0x341)](maxAge));if(expires instanceof Date)_0x955ae5+=_0x52f790(0x3a7)+expires[_0x52f790(0x5f1)]();return _0x955ae5;}[_0x404a63(0x582)](_0x189d88=this[_0x404a63(0x37d)][_0x404a63(0x662)],_0xfc0858={}){const _0x173056=_0x404a63,{path:path='/',sameSite:sameSite='Lax',secure:secure=![],httpOnly:httpOnly=!![]}=_0xfc0858;let _0xf1145f=_0x189d88+'=';if(httpOnly)_0xf1145f+=_0x173056(0x4c6);if(sameSite)_0xf1145f+=';\x20SameSite='+sameSite;if(path)_0xf1145f+=';\x20Path='+path;if(secure)_0xf1145f+=';\x20Secure';return _0xf1145f+=_0x173056(0x5e6),_0xf1145f;}[_0x404a63(0x625)](_0x2ea90f,_0x13b64d){const _0x4be9da=_0x404a63;if(!_0x2ea90f)return null;const [_0x446456,_0x5b4e90]=String(_0x2ea90f)[_0x4be9da(0x37c)]('.');if(!_0x446456||!_0x5b4e90)return null;const _0x1df725=_0x1d100f(_0x446456,_0x13b64d);if(!_0x54f11b(_0x5b4e90,_0x1df725))return null;try{const _0x4ba4be=JSON[_0x4be9da(0x34f)](Buffer['from'](_0x446456,_0x4be9da(0x1c4))[_0x4be9da(0x261)]());if(_0x4ba4be[_0x4be9da(0xfd)]<=Date[_0x4be9da(0x16a)]())return null;return _0x4ba4be;}catch{return null;}}[_0x404a63(0x547)](_0x1477dd){const _0x3239e0=_0x404a63;if(this[_0x3239e0(0x31d)]?.[_0x3239e0(0x37d)])return this['_okdb'][_0x3239e0(0x37d)][_0x3239e0(0x547)](_0x1477dd);return _0x3c10e5(_0x1477dd);}['issueToken'](_0x42f95b){const _0x181832=_0x404a63;if(this[_0x181832(0x31d)]?.[_0x181832(0x37d)])return this[_0x181832(0x31d)][_0x181832(0x37d)][_0x181832(0x610)](_0x42f95b);const _0x1f8ef5=this[_0x181832(0x205)]?.[_0x181832(0x4c4)]??0x36ee80,_0x41f575=this[_0x181832(0x205)]?.['tokenSecret'];return _0x580b0f(_0x42f95b,_0x41f575,_0x1f8ef5);}[_0x404a63(0x1ef)](_0x46c3f6){const _0x6bcd86=_0x404a63;if(this[_0x6bcd86(0x31d)]?.['auth'])return this['_okdb'][_0x6bcd86(0x37d)][_0x6bcd86(0x1ef)](_0x46c3f6);const _0x46ef26=this['_authOptions']?.['tokenSecret'];return _0x3e87bf(_0x46c3f6,_0x46ef26);}async[_0x404a63(0x521)](_0x2b974f){const _0x39923a=_0x404a63;if(this[_0x39923a(0x31d)]?.[_0x39923a(0x37d)])return this[_0x39923a(0x31d)]['auth'][_0x39923a(0x521)](_0x2b974f);if(_0x2b974f[_0x39923a(0x1fc)]?.[_0x39923a(0x567)]===!![]||this[_0x39923a(0x2db)]===_0x39923a(0x18d))return{'id':_0x39923a(0x268),'username':'system','roles':[_0x39923a(0x27f)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':_0x39923a(0x268),'username':_0x39923a(0x268),'roles':[_0x39923a(0x27f)],'isAuthenticated':!![],'isSystem':!![]}};const _0x1e7a2d=this[_0x39923a(0x547)](_0x2b974f['headers']?.[_0x39923a(0x494)]),_0x55f5a3=_0x2b974f[_0x39923a(0x65b)]?.[this['auth']['cookieName']],_0x4973ce=_0x1e7a2d||_0x55f5a3;if(!_0x4973ce)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x2bba77=this[_0x39923a(0x1ef)](_0x4973ce);if(!_0x2bba77)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x116eae={'id':_0x2bba77[_0x39923a(0x57f)]??null,'username':_0x2bba77[_0x39923a(0x112)]??null,'roles':Array[_0x39923a(0x579)](_0x2bba77[_0x39923a(0x330)])?_0x2bba77[_0x39923a(0x330)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x116eae['id'],'username':_0x116eae[_0x39923a(0x112)],'roles':_0x116eae[_0x39923a(0x330)],'isAuthenticated':!![],'isSystem':![],'user':_0x116eae,'claims':_0x2bba77,'subject':_0x116eae['id']};}async[_0x404a63(0x272)](_0xf4ce4a,_0x455793={}){const _0x5d8a3a=_0x404a63,_0x17a644=_0x10c589(_0xf4ce4a),_0x29e035=Array[_0x5d8a3a(0x579)](_0x455793['allowedAlgs'])&&_0x455793[_0x5d8a3a(0x59b)][_0x5d8a3a(0x2eb)]>0x0?_0x455793[_0x5d8a3a(0x59b)]:[_0x5d8a3a(0x462),_0x5d8a3a(0x2a2)],_0x1e85dd=_0x17a644[_0x5d8a3a(0x2f5)]?.[_0x5d8a3a(0x575)];if(!_0x29e035[_0x5d8a3a(0x5c0)](_0x1e85dd))throw new Error(_0x5d8a3a(0x549)+_0x1e85dd);if(!_0x17a644['header']?.[_0x5d8a3a(0x10b)])throw new Error(_0x5d8a3a(0x674));const _0x161549=await this[_0x5d8a3a(0x13f)](_0x455793);if(!_0x161549?.[_0x5d8a3a(0x348)])throw new Error(_0x5d8a3a(0xdb));const _0x1b4247=await this[_0x5d8a3a(0x132)](_0x161549[_0x5d8a3a(0x348)],_0x17a644[_0x5d8a3a(0x2f5)][_0x5d8a3a(0x10b)],_0x455793);if(!_0xba07c4(_0x1e85dd,_0x1b4247,_0x17a644['signingInput'],_0x17a644[_0x5d8a3a(0x318)]))throw new Error(_0x5d8a3a(0x1b8));const _0x59e01c=Math[_0x5d8a3a(0x341)](Date[_0x5d8a3a(0x16a)]()/0x3e8),_0x41a039=_0x17a644[_0x5d8a3a(0x193)]||{};if(_0x41a039['iss']!==_0x161549[_0x5d8a3a(0x11e)])throw new Error(_0x5d8a3a(0x336));const _0x3ca8b1=_0x455793[_0x5d8a3a(0x1ff)];if(_0x3ca8b1){const _0x3ec115=_0x35ee01(_0x41a039['aud']);if(!_0x3ec115[_0x5d8a3a(0x5c0)](_0x3ca8b1))throw new Error(_0x5d8a3a(0x2ed));}if(typeof _0x41a039[_0x5d8a3a(0xfd)]!==_0x5d8a3a(0x17c)||_0x41a039[_0x5d8a3a(0xfd)]<=_0x59e01c)throw new Error('JWT\x20expired');if(_0x41a039[_0x5d8a3a(0x45b)]!=null&&_0x41a039[_0x5d8a3a(0x45b)]>_0x59e01c)throw new Error(_0x5d8a3a(0x5fb));if(_0x41a039[_0x5d8a3a(0x179)]==='id')throw new Error(_0x5d8a3a(0x173));return{'subject':_0x41a039[_0x5d8a3a(0x57f)]??null,'email':_0x41a039[_0x5d8a3a(0x332)]??null,'scopes':typeof _0x41a039[_0x5d8a3a(0x4f8)]==='string'?_0x41a039[_0x5d8a3a(0x4f8)][_0x5d8a3a(0x37c)](/\s+/)[_0x5d8a3a(0x1c6)](Boolean):[],'claims':_0x41a039,'tokenType':_0x5d8a3a(0x35d)};}async['_getOidcDiscovery'](_0x5cad45={}){const _0x366acf=_0x404a63,_0x32d4f6=String(_0x5cad45[_0x366acf(0x11e)]||'')[_0x366acf(0x38b)](/\/+$/,'');if(!_0x32d4f6)return null;const _0x3305f4=Number['isFinite'](_0x5cad45[_0x366acf(0x46c)])?_0x5cad45['discoveryTtlMs']:0xa*0x3c*0x3e8;if(this[_0x366acf(0x476)]?.[_0x366acf(0x11e)]===_0x32d4f6&&this[_0x366acf(0x476)]['expiresAt']>Date[_0x366acf(0x16a)]())return this[_0x366acf(0x476)][_0x366acf(0x392)];const _0x41f8bb=await _0x5b4187(_0x32d4f6+_0x366acf(0x3c0)),_0x409517={'issuer':_0x41f8bb['issuer']||_0x32d4f6,'authorization_endpoint':_0x5cad45[_0x366acf(0x62f)]||_0x41f8bb[_0x366acf(0x107)],'token_endpoint':_0x5cad45['tokenUrl']||_0x41f8bb[_0x366acf(0x35f)],'jwks_uri':_0x5cad45[_0x366acf(0x489)]||_0x41f8bb[_0x366acf(0x348)]};return this[_0x366acf(0x476)]={'issuer':_0x32d4f6,'value':_0x409517,'expiresAt':Date[_0x366acf(0x16a)]()+_0x3305f4},_0x409517;}async[_0x404a63(0x39c)](_0x10efb9,_0x28feea=0x5*0x3c*0x3e8){const _0x4f1427=_0x404a63,_0x25004f=await _0x5b4187(_0x10efb9),_0x2117d6=new Map();for(const _0x48edaa of _0x25004f['keys']||[]){if(!_0x48edaa?.[_0x4f1427(0x10b)])continue;_0x2117d6['set'](_0x48edaa['kid'],_0x41a13a(_0x48edaa));}return this['_jwksCache']={'uri':_0x10efb9,'keys':_0x2117d6,'expiresAt':Date[_0x4f1427(0x16a)]()+_0x28feea},this['_jwksCache'];}async[_0x404a63(0x132)](_0x128044,_0x500ab4,_0x5a7c43={}){const _0x33d9f2=_0x404a63,_0x29eff3=Number[_0x33d9f2(0x5f8)](_0x5a7c43['jwksTtlMs'])?_0x5a7c43['jwksTtlMs']:0x5*0x3c*0x3e8,_0x558df5=0x1e*0x3e8,_0x5d8d38=this[_0x33d9f2(0x3c8)]['get'](_0x500ab4);if(_0x5d8d38!==undefined&&_0x5d8d38>Date[_0x33d9f2(0x16a)]())throw new Error(_0x33d9f2(0x3d1)+_0x500ab4);(!this[_0x33d9f2(0x4cb)]||this[_0x33d9f2(0x4cb)]['uri']!==_0x128044||this['_jwksCache'][_0x33d9f2(0x63c)]<=Date['now']())&&await this[_0x33d9f2(0x39c)](_0x128044,_0x29eff3);let _0x3bc1fd=this[_0x33d9f2(0x4cb)]?.[_0x33d9f2(0x2f1)]?.[_0x33d9f2(0x3aa)](_0x500ab4);if(_0x3bc1fd)return _0x3bc1fd;await this[_0x33d9f2(0x39c)](_0x128044,_0x29eff3),_0x3bc1fd=this[_0x33d9f2(0x4cb)]?.[_0x33d9f2(0x2f1)]?.[_0x33d9f2(0x3aa)](_0x500ab4);if(!_0x3bc1fd){this[_0x33d9f2(0x3c8)][_0x33d9f2(0x2c2)](_0x500ab4,Date[_0x33d9f2(0x16a)]()+_0x558df5);throw new Error(_0x33d9f2(0x3d1)+_0x500ab4);}return _0x3bc1fd;}[_0x404a63(0x2d8)](_0x3d33b7){const _0x2b9200=_0x404a63;if(this[_0x2b9200(0x31d)]?.[_0x2b9200(0x37d)])return this[_0x2b9200(0x31d)][_0x2b9200(0x37d)][_0x2b9200(0x2d8)](_0x3d33b7);const _0x150317=_0x3d33b7?.[_0x2b9200(0x42e)]||{},_0x2fba03={'sub':_0x3d33b7?.['subject']??_0x150317[_0x2b9200(0x57f)]??null,'email':_0x3d33b7?.['email']??_0x150317[_0x2b9200(0x332)]??null,'name':_0x3d33b7?.[_0x2b9200(0x2cc)]??_0x150317[_0x2b9200(0x2cc)]??_0x150317['preferred_username']??null,'groups':_0x3d33b7?.[_0x2b9200(0x3f4)]??_0x150317['groups']??[],'roles':_0x3d33b7?.[_0x2b9200(0x330)]??_0x150317[_0x2b9200(0x330)]??[]};return{'type':'oauth','tokenType':_0x3d33b7?.[_0x2b9200(0x522)]??_0x2b9200(0x35d),'subject':_0x2fba03['sub'],'email':_0x2fba03['email'],'scopes':_0x3d33b7?.['scopes']??_0x150317[_0x2b9200(0x4f8)]?.['split']?.('\x20')?.[_0x2b9200(0x1c6)](Boolean)??[],'claims':_0x150317,'user':_0x2fba03,'isAuthenticated':!![]};}['createLoginState'](_0x5c2525={},_0x3702ef=0x927c0){const _0x149173=_0x404a63;if(this['_okdb']?.['auth'])return this[_0x149173(0x31d)]['auth']['createLoginState'](_0x5c2525,_0x3702ef);const _0x1bdf03=_0xf804a3(0x18);this['_loginStates'][_0x149173(0x2c2)](_0x1bdf03,{..._0x5c2525,'exp':Date['now']()+_0x3702ef});if(this['_loginStates'][_0x149173(0x3ea)]%0x32===0x0){const _0x18a367=Date[_0x149173(0x16a)]();for(const [_0x45e61f,_0x1d6dc8]of this[_0x149173(0x4d4)]){if(_0x1d6dc8[_0x149173(0xfd)]<=_0x18a367)this[_0x149173(0x4d4)][_0x149173(0x5ed)](_0x45e61f);}}return _0x1bdf03;}[_0x404a63(0x2af)](_0x5bce6e){const _0x18f6dd=_0x404a63;if(this[_0x18f6dd(0x31d)]?.[_0x18f6dd(0x37d)])return this[_0x18f6dd(0x31d)][_0x18f6dd(0x37d)][_0x18f6dd(0x2af)](_0x5bce6e);if(!_0x5bce6e)return null;const _0x344a66=this[_0x18f6dd(0x4d4)]['get'](_0x5bce6e);this[_0x18f6dd(0x4d4)][_0x18f6dd(0x5ed)](_0x5bce6e);if(!_0x344a66)return null;if(_0x344a66['exp']<=Date[_0x18f6dd(0x16a)]())return null;return _0x344a66;}}function _0x5b8fc6(_0x625d95){const _0x404a0d=_0x404a63;if(_0x625d95==null)return{'status':0xcc};if(Buffer[_0x404a0d(0x666)](_0x625d95)||_0x3e2d4c(_0x625d95))return{'status':0xc8,'body':_0x625d95};if(typeof _0x625d95==='object'&&'status'in _0x625d95){if(!(_0x404a0d(0x5e9)in _0x625d95)&&!_0x3e2d4c(_0x625d95['body'])){const {status:_0x26774a,headers:_0x4bcd53,..._0x8c4776}=_0x625d95;if(Object[_0x404a0d(0x2f1)](_0x8c4776)['length']>0x0)return{'status':_0x26774a,'headers':_0x4bcd53,'body':_0x8c4776};}return _0x625d95;}return{'status':0xc8,'body':_0x625d95};}function _0x3e2d4c(_0x3ff921){const _0x50aa67=_0x404a63;return _0x3ff921&&typeof _0x3ff921[_0x50aa67(0x274)]===_0x50aa67(0x26b);}function _0x2003a(_0x4dd012,_0x4708f2){const _0x31678d=_0x404a63,{PassThrough:_0x40abb1}=require$$8;let _0x473ef6=0x0,_0x30e5d7=![];const _0x58a056=new _0x40abb1();return _0x4dd012['on'](_0x31678d(0x206),_0xa53f38=>{const _0x2fde96=_0x31678d;if(_0x30e5d7)return;_0x473ef6+=_0xa53f38[_0x2fde96(0x2eb)];if(_0x473ef6>_0x4708f2){_0x30e5d7=!![];const _0x38b06c=new Error('Payload\x20too\x20large');_0x38b06c['status']=0x19d,_0x58a056[_0x2fde96(0x167)](_0x38b06c);return;}if(!_0x58a056[_0x2fde96(0x200)])_0x58a056[_0x2fde96(0x614)](_0xa53f38);}),_0x4dd012['on'](_0x31678d(0x62c),()=>{const _0x3fb3bf=_0x31678d;!_0x30e5d7&&!_0x58a056[_0x3fb3bf(0x200)]&&(_0x30e5d7=!![],_0x58a056[_0x3fb3bf(0x62c)]());}),_0x4dd012['on'](_0x31678d(0x31b),_0x1d1b89=>{const _0x47e74c=_0x31678d;if(!_0x58a056[_0x47e74c(0x200)])_0x58a056[_0x47e74c(0x167)](_0x1d1b89);}),_0x4dd012[_0x31678d(0x152)](),_0x58a056['on'](_0x31678d(0x29d),()=>{const _0x78ab8f=_0x31678d;if(!_0x58a056[_0x78ab8f(0x200)])_0x4dd012[_0x78ab8f(0x29d)]();}),_0x58a056;}function _0x559c79(_0x4a3167,_0x5e7094){const _0x196dea=_0x404a63;if(_0x4a3167[_0x196dea(0x527)]===_0x196dea(0x58f)||_0x4a3167[_0x196dea(0x527)]===_0x196dea(0x594))return null;const _0x4a8c9c=_0x4a3167[_0x196dea(0x5b1)]?.['content-length'];if(_0x4a8c9c!=null){const _0x208fd1=Number(_0x4a8c9c);if(Number[_0x196dea(0x5f8)](_0x208fd1)&&_0x208fd1>_0x5e7094){const _0x1d787a=new Error(_0x196dea(0x38e));_0x1d787a[_0x196dea(0x626)]=0x19d;throw _0x1d787a;}}return new Promise((_0x662fe7,_0x1b0345)=>{const _0x529241=_0x196dea;let _0x5e9d78='',_0x4033b4=0x0;_0x4a3167['on'](_0x529241(0x206),_0x280bf4=>{const _0x42bbbe=_0x529241;_0x4033b4+=_0x280bf4[_0x42bbbe(0x2eb)];if(_0x4033b4>_0x5e7094){try{_0x4a3167[_0x42bbbe(0x167)]();}catch{}const _0x47168d=new Error('Payload\x20too\x20large');_0x47168d[_0x42bbbe(0x626)]=0x19d,_0x1b0345(_0x47168d);return;}_0x5e9d78+=_0x280bf4;}),_0x4a3167['on'](_0x529241(0x62c),()=>{const _0x3d1e4f=_0x529241;if(!_0x5e9d78)return _0x662fe7(null);const _0x50d9b9=_0x4a3167['headers']?.[_0x3d1e4f(0x153)]||'';if(_0x50d9b9['includes']('application/x-www-form-urlencoded')){const _0x4e9b7a={};for(const [_0x2ab30d,_0x1902ca]of new URLSearchParams(_0x5e9d78))_0x4e9b7a[_0x2ab30d]=_0x1902ca;return _0x662fe7(_0x4e9b7a);}try{_0x662fe7(JSON['parse'](_0x5e9d78));}catch(_0x40ecdb){_0x1b0345(_0x40ecdb);}}),_0x4a3167['on']('error',_0x1b0345);});}function _0x287734(_0x3edeb5,_0x155a5e){const _0xf129de=_0x404a63,{status:status=0xc8,headers:headers={},body:_0x56ffe3}=_0x155a5e;_0x3edeb5['statusCode']=status;for(const [_0x1dccc1,_0x37523b]of Object[_0xf129de(0x427)](headers)){_0x3edeb5[_0xf129de(0x36b)](_0x1dccc1,_0x37523b);}if(_0x56ffe3==null){_0x3edeb5[_0xf129de(0x62c)]();return;}if(_0x3e2d4c(_0x56ffe3)){_0x56ffe3['pipe'](_0x3edeb5);return;}if(Buffer[_0xf129de(0x666)](_0x56ffe3)){_0x3edeb5[_0xf129de(0x62c)](_0x56ffe3);return;}if(typeof _0x56ffe3===_0xf129de(0x20e)){!_0x3edeb5[_0xf129de(0x518)](_0xf129de(0x122))&&_0x3edeb5[_0xf129de(0x36b)](_0xf129de(0x122),_0xf129de(0x509));_0x3edeb5['end'](JSON[_0xf129de(0x3d9)](_0x56ffe3));return;}_0x3edeb5[_0xf129de(0x62c)](String(_0x56ffe3));}return okdbHttp[_0x404a63(0x1b3)]=_0x38c7a0,okdbHttp[_0x404a63(0x1b3)]['OKDB_CODE_TO_HTTP_STATUS']=_0x3da15a,okdbHttp[_0x404a63(0x1b3)];}function _0x2368(_0x43d7b3,_0x46a43e){_0x43d7b3=_0x43d7b3-0xdb;const _0x5b4d2d=_0x5b4d();let _0x2368bf=_0x5b4d2d[_0x43d7b3];return _0x2368bf;}var hasRequiredOkdb;function requireOkdb(){const _0x2feb2b=_0x4b361c;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process['loadEnvFile']();}catch{}const _0x1b65f1=require$$1,_0x56a80a=require$$1$1,{resolveWorkers:_0x2c44bd,isShmbufNative:_0x4b1d13}=requireOkdbWorkers();function _0x4f700b(_0x53e6d6){const _0xa1e032=_0x2368,_0x14c20d=_0x53e6d6[_0xa1e032(0x45e)](0x2),_0x44ee19={};let _0x32303b=0x0;while(_0x32303b<_0x14c20d['length']){const _0x5f5585=_0x14c20d[_0x32303b];if(_0x5f5585===_0xa1e032(0x322)||_0x5f5585==='-p')_0x44ee19[_0xa1e032(0x26f)]=Number(_0x14c20d[++_0x32303b]);else{if(_0x5f5585==='--path'||_0x5f5585==='-d')_0x44ee19['path']=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--key'||_0x5f5585==='-k')_0x44ee19[_0xa1e032(0x174)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x5b3)||_0x5f5585==='-c')_0x44ee19[_0xa1e032(0x2b8)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x417))_0x44ee19[_0xa1e032(0x45d)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x40c))_0x44ee19['noRepl']=!![];else{if(_0x5f5585===_0xa1e032(0x1ec))_0x44ee19[_0xa1e032(0x673)]=!![];else{if(_0x5f5585===_0xa1e032(0x102))_0x44ee19[_0xa1e032(0x5bf)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x300))_0x44ee19[_0xa1e032(0x289)]=!![];else{if(_0x5f5585==='--env'||_0x5f5585==='-e')_0x44ee19['env']=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x66a))_0x44ee19[_0xa1e032(0x161)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--changes')_0x44ee19[_0xa1e032(0x669)]=!![];else{if(_0x5f5585===_0xa1e032(0x566))_0x44ee19[_0xa1e032(0x506)]=!![];else{if(_0x5f5585==='--drop')_0x44ee19['drop']=!![];else{if(_0x5f5585==='--open'){const _0x5341bc=[];while(_0x32303b+0x1<_0x14c20d[_0xa1e032(0x2eb)]&&!_0x14c20d[_0x32303b+0x1]['startsWith']('--')){_0x5341bc[_0xa1e032(0x614)](_0x14c20d[++_0x32303b]);}_0x44ee19['open']=_0x5341bc[_0xa1e032(0x2eb)]>0x0?_0x5341bc:!![];}else{if(_0x5f5585==='--log-requests')_0x44ee19[_0xa1e032(0x3cb)]=!![];else{if(_0x5f5585==='--name')_0x44ee19['name']=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x3d6))_0x44ee19[_0xa1e032(0x46f)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x160))_0x44ee19[_0xa1e032(0x508)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--permissions')_0x44ee19[_0xa1e032(0x3f3)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x58e))_0x44ee19[_0xa1e032(0x236)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x5f4))_0x44ee19[_0xa1e032(0x4a7)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--token')_0x44ee19[_0xa1e032(0x359)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x463)||_0x5f5585==='-u')_0x44ee19[_0xa1e032(0x112)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--address')_0x44ee19[_0xa1e032(0x5d5)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x1e5)||_0x5f5585==='-v'){const _0x4a709f=require$$3;console['log'](_0x4a709f['version']),process['exit'](0x0);}else(_0x5f5585===_0xa1e032(0x44b)||_0x5f5585==='-h')&&(_0xcf29f7(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x32303b++;}return _0x44ee19;}function _0xcf29f7(){const _0x19c3c2=_0x2368;console[_0x19c3c2(0x4f7)]('\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\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\x20The\x20primary\x20runs\x20processing;\x20workers\x20serve\x20HTTP\x20+\x20SSE.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a');}const _0x5eb53f=new Set([_0x2feb2b(0x408),'info',_0x2feb2b(0x27e),_0x2feb2b(0x31b)]);function _0x58293d(_0x20873b){const _0x45668b=_0x2feb2b,_0x3adf30=_0x20873b[_0x45668b(0x2b8)]?_0x1b65f1[_0x45668b(0x4a1)](_0x20873b[_0x45668b(0x2b8)]):_0x1b65f1[_0x45668b(0x4a1)](_0x45668b(0x5a9));let _0x40e4cd={};if(_0x56a80a[_0x45668b(0x5ee)](_0x3adf30))try{const _0x4d2f97=_0x56a80a['readFileSync'](_0x3adf30,_0x45668b(0x365))[_0x45668b(0x38b)](/^\uFEFF/,'');_0x40e4cd=JSON[_0x45668b(0x34f)](_0x4d2f97),console[_0x45668b(0x4f7)]('[okdb]\x20loaded\x20config:\x20'+_0x3adf30);}catch(_0x4676ee){console['error'](_0x45668b(0x562)+_0x3adf30+':\x20'+_0x4676ee[_0x45668b(0x29c)]),process['exit'](0x1);}const _0x2e65f9={'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},_0x7be6de={'port':_0x20873b[_0x45668b(0x26f)]??_0x40e4cd[_0x45668b(0x26f)]??_0x2e65f9[_0x45668b(0x26f)]??0x2124,'dbPath':_0x20873b[_0x45668b(0x42d)]??_0x40e4cd['path']??_0x2e65f9[_0x45668b(0x42d)]??_0x45668b(0x1ee),'key':_0x20873b['key']??_0x40e4cd[_0x45668b(0x174)]??_0x2e65f9[_0x45668b(0x174)]??undefined,'logLevel':_0x20873b[_0x45668b(0x45d)]??_0x40e4cd[_0x45668b(0x45d)]??_0x2e65f9[_0x45668b(0x45d)]??_0x45668b(0x3d7),'noRepl':_0x20873b[_0x45668b(0x2bd)]??_0x40e4cd[_0x45668b(0x2bd)]??_0x2e65f9[_0x45668b(0x2bd)]??![],'noAdmin':_0x20873b['noAdmin']??_0x40e4cd[_0x45668b(0x673)]??_0x2e65f9['noAdmin']??![],'admin':_0x40e4cd[_0x45668b(0x27f)]??{},'api':_0x40e4cd[_0x45668b(0x60f)]??undefined,'auth':_0x40e4cd['auth']??undefined,'mcp':_0x40e4cd['mcp']??undefined,'http':_0x40e4cd[_0x45668b(0x5d0)]??undefined,'timeMachine':_0x40e4cd[_0x45668b(0x232)]!==![]?_0x40e4cd[_0x45668b(0x232)]??{}:![]};if(_0x20873b['noCluster'])_0x7be6de[_0x45668b(0x289)]=!![];if(_0x20873b['workers']!==undefined)_0x7be6de[_0x45668b(0x194)]=_0x20873b[_0x45668b(0x5bf)];return _0x20873b[_0x45668b(0x18d)]!==undefined&&(_0x7be6de['auth']=_0x7be6de['auth']||{},_0x7be6de[_0x45668b(0x37d)]['open']=_0x20873b[_0x45668b(0x18d)]),_0x20873b[_0x45668b(0x3cb)]&&(_0x7be6de[_0x45668b(0x408)]=_0x7be6de[_0x45668b(0x408)]||{},_0x7be6de[_0x45668b(0x408)]['logRequests']=!![]),(!Number[_0x45668b(0xde)](_0x7be6de[_0x45668b(0x26f)])||_0x7be6de[_0x45668b(0x26f)]<0x1||_0x7be6de[_0x45668b(0x26f)]>0xffff)&&(console[_0x45668b(0x31b)](_0x45668b(0x12b)+_0x7be6de['port']+_0x45668b(0x264)),process[_0x45668b(0x542)](0x1)),!_0x5eb53f[_0x45668b(0x39f)](_0x7be6de[_0x45668b(0x45d)])&&(console[_0x45668b(0x31b)](_0x45668b(0x16d)+_0x7be6de[_0x45668b(0x45d)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x45668b(0x542)](0x1)),_0x7be6de;}function _0x2b35c1(_0x5b8243){const _0x417be4=_0x2feb2b;return!!(_0x5b8243&&typeof _0x5b8243===_0x417be4(0x20e)&&!Array[_0x417be4(0x579)](_0x5b8243)&&Object[_0x417be4(0x2f1)](_0x5b8243)[_0x417be4(0x2eb)]>0x0);}const _0xb6fba5=!process[_0x2feb2b(0x559)][_0x2feb2b(0x52b)]||!!process.env.NO_COLOR;function _0x48ad76(_0x83c403,_0xc57ff6){return _0xb6fba5?_0xc57ff6:'\x1b['+_0x83c403+'m'+_0xc57ff6+'\x1b[0m';}function _0x5b43a0(_0x444caa){const _0x394236=_0x2feb2b;if(!_0x444caa||_0x444caa[_0x394236(0x2eb)]===0x0)return;const _0x5cf756='─'[_0x394236(0x473)](0x38);process['stderr'][_0x394236(0x4ae)]('\x0a'),process[_0x394236(0x16f)][_0x394236(0x4ae)](_0x48ad76('33',_0x394236(0x371)+_0x444caa[_0x394236(0x2eb)]+'\x20SECURITY\x20NOTICE'+(_0x444caa[_0x394236(0x2eb)]>0x1?'S':'')+'\x0a')),process[_0x394236(0x16f)][_0x394236(0x4ae)]('\x20\x20'+_0x5cf756+'\x0a');for(const _0x227fef of _0x444caa){const _0x20c330=_0x227fef[_0x394236(0x294)]===_0x394236(0x31b)?_0x48ad76('31',_0x394236(0x307)):_0x48ad76('33',_0x394236(0x12d));process['stderr'][_0x394236(0x4ae)](_0x20c330+'\x20\x20'+_0x48ad76('1',_0x227fef['title'])+'\x0a'),process[_0x394236(0x16f)]['write'](_0x394236(0x63a)+_0x227fef['message']+'\x0a');if(_0x227fef[_0x394236(0x1a4)])process['stderr']['write'](_0x394236(0x63a)+_0x48ad76('2',_0x394236(0x154)+_0x227fef[_0x394236(0x1a4)])+'\x0a');process[_0x394236(0x16f)][_0x394236(0x4ae)]('\x0a');}process['stderr'][_0x394236(0x4ae)]('\x20\x20'+_0x5cf756+'\x0a\x0a');}function _0x47de7d(_0x2f7381,_0x20686c,_0x17b9a8={}){const _0x40e962=_0x2feb2b,_0x31c77b=_0x2f7381[_0x40e962(0x5d0)][_0x40e962(0x31f)](_0x20686c,_0x17b9a8);if(_0x31c77b&&_0x31c77b[_0x40e962(0x317)])return Promise['resolve'](_0x31c77b);return new Promise((_0x5d7547,_0x35af26)=>{const _0x5b7c7a=_0x40e962;_0x31c77b[_0x5b7c7a(0x292)]('listening',_0x5d7547),_0x31c77b['once'](_0x5b7c7a(0x31b),_0x35af26);});}async function _0x3a8f5c(_0x28e023){const _0x1991b8=_0x2feb2b,_0x2856cf=require$$4$1;console[_0x1991b8(0x4f7)](_0x1991b8(0x1ce));let _0x151427=!![];const _0x314fa7=(_0x202188,_0x2ae8f1)=>{console['log']('\x20\x20'+(_0x202188?'✓':'✗')+'\x20'+_0x2ae8f1);if(!_0x202188)_0x151427=![];},_0x2e609b=Number(process[_0x1991b8(0x2ea)][_0x1991b8(0x38b)]('v','')['split']('.')[0x0]);_0x314fa7(_0x2e609b>=0x12,_0x1991b8(0x2cd)+process[_0x1991b8(0x2ea)]+(_0x2e609b<0x12?_0x1991b8(0x24a):''));const _0x334f4e=_0x1b65f1[_0x1991b8(0x4a1)](_0x28e023[_0x1991b8(0x64c)]);try{_0x56a80a[_0x1991b8(0x2cf)](_0x334f4e,{'recursive':!![]});const _0xb23b33=_0x1b65f1['join'](_0x334f4e,_0x1991b8(0x677));_0x56a80a[_0x1991b8(0x59d)](_0xb23b33,''),_0x56a80a[_0x1991b8(0x207)](_0xb23b33),_0x314fa7(!![],'database\x20path\x20writable:\x20'+_0x334f4e);}catch(_0x2b4225){_0x314fa7(![],'database\x20path\x20not\x20writable:\x20'+_0x334f4e+_0x1991b8(0x129)+_0x2b4225[_0x1991b8(0x29c)]+')');}const _0x420ef2=await new Promise(_0x87d6d9=>{const _0x30530d=_0x1991b8,_0x56656c=_0x2856cf[_0x30530d(0x2a7)]();_0x56656c[_0x30530d(0x292)](_0x30530d(0x31b),()=>_0x87d6d9(![])),_0x56656c['once']('listening',()=>{const _0x1cc671=_0x30530d;_0x56656c[_0x1cc671(0x241)](),_0x87d6d9(!![]);}),_0x56656c[_0x30530d(0x31f)](_0x28e023['port'],_0x30530d(0x586));});_0x314fa7(_0x420ef2,_0x1991b8(0x30e)+_0x28e023['port']+'\x20'+(_0x420ef2?_0x1991b8(0x119):'already\x20in\x20use'));const _0x4ae031=_0x1b65f1[_0x1991b8(0x4a1)](_0x1991b8(0x5a9));if(_0x56a80a['existsSync'](_0x4ae031))try{JSON[_0x1991b8(0x34f)](_0x56a80a[_0x1991b8(0xe7)](_0x4ae031,'utf8')['replace'](/^\uFEFF/,'')),_0x314fa7(!![],_0x1991b8(0x49f)+_0x4ae031);}catch(_0x35d536){_0x314fa7(![],'config\x20file\x20invalid:\x20'+_0x35d536['message']);}else _0x314fa7(!![],_0x1991b8(0x48e));if(_0x4b1d13()){const _0x1922ad=_0x2c44bd(_0x28e023,{'shmbufNative':!![]});_0x314fa7(!![],_0x1991b8(0x492)+_0x1922ad+'\x20worker'+(_0x1922ad===0x1?'':'s')+')');}else _0x314fa7(!![],_0x1991b8(0x55e));if(!_0x420ef2)try{const _0x2d4d85=require(_0x1991b8(0x248)),_0x17f5f8=new _0x2d4d85(_0x334f4e,{'engines':![],'asyncProcessors':![],'compaction':_0x1991b8(0x573),'http':![],'bus':![],'auth':{'open':!![]}});await _0x17f5f8[_0x1991b8(0x18d)]();try{await _0x17f5f8[_0x1991b8(0x532)]['open']({'reader':!![]});const _0x8b2530=_0x17f5f8[_0x1991b8(0x532)]['listNodes'](),_0x2f3989=_0x8b2530[_0x1991b8(0x1c6)](_0x20b7c3=>_0x20b7c3['supervisorKey']!=null)[_0x1991b8(0x2eb)];_0x314fa7(!![],_0x1991b8(0x1ea)+_0x8b2530[_0x1991b8(0x2eb)]+'\x20process'+(_0x8b2530[_0x1991b8(0x2eb)]===0x1?'':'es')+'\x20('+_0x2f3989+_0x1991b8(0x504));}finally{await _0x17f5f8['close']();}}catch{}console[_0x1991b8(0x4f7)](''),_0x151427?console['log']('\x20\x20All\x20checks\x20passed.\x0a'):(console['log'](_0x1991b8(0x1dd)),process[_0x1991b8(0x542)](0x1));}async function _0x35ffc0(){const _0x54a9a8=_0x2feb2b,_0xffe557=_0x1b65f1['resolve'](_0x54a9a8(0x5a9));!_0x56a80a[_0x54a9a8(0x5ee)](_0xffe557)?(_0x56a80a[_0x54a9a8(0x59d)](_0xffe557,JSON[_0x54a9a8(0x3d9)]({'port':0x2124,'path':_0x54a9a8(0x1ee),'logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x54a9a8(0x4f7)](_0x54a9a8(0x1cf))):console['log']('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x4d2c7b=_0x1b65f1[_0x54a9a8(0x4a1)](_0x54a9a8(0x1ee));!_0x56a80a[_0x54a9a8(0x5ee)](_0x4d2c7b)?(_0x56a80a[_0x54a9a8(0x2cf)](_0x4d2c7b,{'recursive':!![]}),console[_0x54a9a8(0x4f7)](_0x54a9a8(0x552))):console[_0x54a9a8(0x4f7)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x54a9a8(0x4f7)]('\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a');}async function _0x44b834(_0x7f2725){const _0x5be37f=_0x2feb2b,_0x38ee1b=_0x1b65f1[_0x5be37f(0x4a1)](_0x7f2725['dbPath']);if(!_0x56a80a[_0x5be37f(0x5ee)](_0x38ee1b)){console['log'](_0x5be37f(0x5a3)+_0x38ee1b+_0x5be37f(0x1a8));return;}const _0x513721=require$$0$2,_0x3f48d9=_0x513721[_0x5be37f(0x15a)]({'input':process[_0x5be37f(0x61c)],'output':process[_0x5be37f(0x559)]}),_0x34af10=await new Promise(_0x1a47fa=>_0x3f48d9[_0x5be37f(0x1fd)](_0x5be37f(0x3da)+_0x38ee1b+_0x5be37f(0x3c3),_0x1a47fa));_0x3f48d9[_0x5be37f(0x241)](),console['log']('');if(_0x34af10[_0x5be37f(0x486)]()['toLowerCase']()!=='yes'){console[_0x5be37f(0x4f7)](_0x5be37f(0xf7));return;}let _0x2e987c=null;try{_0x2e987c=await _0x3d51a4(_0x38ee1b,_0x7f2725,async _0x318ce5=>{const _0x44a7a5=_0x5be37f,_0x516b30=_0x318ce5[_0x44a7a5(0x18f)],_0x3aee24=_0x516b30?.['db']?.['get'](_0x44a7a5(0x551))??null,_0x219294=[];if(_0x516b30?.[_0x44a7a5(0x431)]('~licenses'))for(const {key:_0x406f41,value:_0xfa4961}of _0x516b30[_0x44a7a5(0x391)](_0x44a7a5(0x3a6))){_0x219294[_0x44a7a5(0x614)]({'key':_0x406f41,'value':_0xfa4961});}return{'identity':_0x3aee24,'licenses':_0x219294};});}catch(_0x2df5ee){console['log']('[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20('+_0x2df5ee[_0x5be37f(0x29c)]+')\x20—\x20they\x20will\x20NOT\x20be\x20preserved');}_0x56a80a[_0x5be37f(0xeb)](_0x38ee1b,{'recursive':!![],'force':!![]}),console[_0x5be37f(0x4f7)](_0x5be37f(0x1b9)+_0x38ee1b+_0x5be37f(0x284));if(_0x2e987c&&(_0x2e987c['identity']||_0x2e987c[_0x5be37f(0x592)][_0x5be37f(0x2eb)]>0x0))try{await _0x3d51a4(_0x38ee1b,_0x7f2725,async _0x44ccbb=>{const _0x56e6a4=_0x5be37f,_0x5f13b9=_0x44ccbb[_0x56e6a4(0x18f)];_0x2e987c[_0x56e6a4(0x665)]&&_0x5f13b9['db']['putSync'](_0x56e6a4(0x551),_0x2e987c[_0x56e6a4(0x665)]);if(_0x2e987c[_0x56e6a4(0x592)][_0x56e6a4(0x2eb)]>0x0){if(!_0x5f13b9[_0x56e6a4(0x431)]('~licenses'))await _0x5f13b9[_0x56e6a4(0x428)](_0x56e6a4(0x3a6));for(const {key:_0x406bf0,value:_0x2107b1}of _0x2e987c[_0x56e6a4(0x592)]){await _0x5f13b9[_0x56e6a4(0x42f)]('~licenses',_0x406bf0,_0x2107b1);}}});const _0x502d5e=[];if(_0x2e987c[_0x5be37f(0x665)])_0x502d5e['push']('node\x20identity');if(_0x2e987c[_0x5be37f(0x592)]['length']>0x0)_0x502d5e['push'](_0x2e987c[_0x5be37f(0x592)][_0x5be37f(0x2eb)]+_0x5be37f(0x5a6));console[_0x5be37f(0x4f7)](_0x5be37f(0x4da)+_0x502d5e[_0x5be37f(0x3a4)](_0x5be37f(0x40b)));}catch(_0x23ed7b){console[_0x5be37f(0x4f7)](_0x5be37f(0x266)+_0x23ed7b[_0x5be37f(0x29c)]);}}async function _0x3d51a4(_0xe4748e,_0x5da162,_0x3f1cb2){const _0x1f370c=_0x2feb2b,_0x5f085a=require$$5,_0xc10287=new _0x5f085a(_0xe4748e,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'asyncProcessors':![],'compaction':_0x1f370c(0x573),'bus':![],'_skipBootRuntime':!![],..._0x5da162[_0x1f370c(0x174)]?{'encryptionKey':_0x5da162[_0x1f370c(0x174)]}:{}});await _0xc10287[_0x1f370c(0x18d)]();try{return await _0x3f1cb2(_0xc10287);}finally{await _0xc10287['close']();}}async function _0x1eecf7(_0x4bc9d8,_0x5621c5){const _0x845b32=_0x2feb2b,_0x4aa841=require$$5,_0x51813c=_0x1b65f1[_0x845b32(0x4a1)](_0x5621c5['dbPath']);console[_0x845b32(0x4f7)]('[okdb]\x20opening\x20'+_0x51813c+'…');const _0x5a6255=new _0x4aa841(_0x51813c,_0x5621c5[_0x845b32(0x174)]?{'encryptionKey':_0x5621c5[_0x845b32(0x174)]}:{});await _0x5a6255['open'](),console['log'](_0x845b32(0x5f7)+_0x4bc9d8+'…');const {envs:_0x24e36f}=await _0x5a6255[_0x845b32(0x5bb)][_0x845b32(0x329)](_0x4bc9d8);for(const _0x37888c of _0x24e36f){const _0x4ee6ff=_0x37888c[_0x845b32(0xfb)]>0x0?_0x845b32(0x129)+(_0x37888c[_0x845b32(0xfb)]/0x400/0x400)[_0x845b32(0x4a8)](0x2)+_0x845b32(0x32c)+(_0x37888c['sizeAfter']/0x400/0x400)[_0x845b32(0x4a8)](0x2)+_0x845b32(0x440):'';console[_0x845b32(0x4f7)](_0x845b32(0x118)+_0x37888c[_0x845b32(0x2cc)]+_0x845b32(0x2ff)+_0x37888c[_0x845b32(0x604)]+_0x4ee6ff);}await _0x5a6255[_0x845b32(0x241)](),console[_0x845b32(0x4f7)](_0x845b32(0xf2));}async function _0x27c3f3(_0x34c5f9,_0x13de21,_0x4be405){const _0x359289=_0x2feb2b,_0x3b19fb=require$$5,_0x47f23a=_0x1b65f1[_0x359289(0x4a1)](_0x13de21[_0x359289(0x64c)]),_0x5970c3=_0x4be405[_0x359289(0x46e)]??_0x359289(0x1e4),_0x518056=_0x4be405['types']?_0x4be405['types']['split'](',')[_0x359289(0x601)](_0x5ac672=>_0x5ac672[_0x359289(0x486)]()):null;console[_0x359289(0x4f7)](_0x359289(0x1cb)+_0x47f23a+'…');const _0x26c496=new _0x3b19fb(_0x47f23a,_0x13de21[_0x359289(0x174)]?{'encryptionKey':_0x13de21['key']}:{});await _0x26c496[_0x359289(0x18d)](),console['log'](_0x359289(0x679)+_0x5970c3+_0x359289(0x225)+_0x34c5f9+'…');const _0x26365e=await _0x26c496[_0x359289(0x5bb)][_0x359289(0x478)](_0x34c5f9,{'envName':_0x5970c3,'types':_0x518056,'includeChanges':!!_0x4be405[_0x359289(0x669)]});console[_0x359289(0x4f7)](_0x359289(0x536)+_0x26365e['types']+_0x359289(0x321)+_0x26365e[_0x359289(0x520)]+_0x359289(0x2d1)+_0x26365e[_0x359289(0x669)]);if(_0x4be405['blobs']){const _0x4ec6e1=_0x1b65f1[_0x359289(0x3a4)](_0x1b65f1['dirname'](_0x34c5f9),_0x359289(0x506));process[_0x359289(0x559)][_0x359289(0x4ae)]('[okdb]\x20exporting\x20blobs…');const {count:_0x47987d,bytes:_0x1cdadf}=await _0x26c496[_0x359289(0x5bb)]['exportBlobs'](_0x4ec6e1);console[_0x359289(0x4f7)](_0x359289(0x645)+_0x4ec6e1+_0x359289(0x129)+_0x47987d+_0x359289(0x186)+(_0x47987d!==0x1?'s':'')+',\x20'+(_0x1cdadf/0x400/0x400)[_0x359289(0x4a8)](0x2)+_0x359289(0x440));}await _0x26c496['close'](),console[_0x359289(0x4f7)](_0x359289(0x370));}async function _0x58e636(_0x5e67b7,_0xdc6aa5,_0x2613fd){const _0x541a65=_0x2feb2b,_0xadc158=require$$5,_0x3c1c57=_0x1b65f1[_0x541a65(0x4a1)](_0xdc6aa5['dbPath']),_0x39ce2e=_0x2613fd['env']??null,_0x4f8b81=_0x2613fd['types']?_0x2613fd[_0x541a65(0x161)][_0x541a65(0x37c)](',')[_0x541a65(0x601)](_0x19d7f3=>_0x19d7f3[_0x541a65(0x486)]()):null,_0x838679=!!_0x2613fd['drop'];console['log'](_0x541a65(0x1cb)+_0x3c1c57+'…');const _0x45f7b0=new _0xadc158(_0x3c1c57,_0xdc6aa5[_0x541a65(0x174)]?{'encryptionKey':_0xdc6aa5['key']}:{});await _0x45f7b0[_0x541a65(0x18d)](),console[_0x541a65(0x4f7)](_0x541a65(0x44e)+_0x5e67b7+'…');const _0x414bcd=await _0x45f7b0['migrate'][_0x541a65(0x63d)](_0x5e67b7,{'envName':_0x39ce2e,'types':_0x4f8b81,'dropExisting':_0x838679,'includeChanges':!!_0x2613fd[_0x541a65(0x669)],'onProgress':({type:_0x17bdb8,count:_0x392269})=>{const _0x5a8233=_0x541a65;process[_0x5a8233(0x559)]['write'](_0x5a8233(0x351)+_0x17bdb8+':\x20'+_0x392269+_0x5a8233(0x218));}});process['stdout']['write']('\x0a'),console['log'](_0x541a65(0x125)+_0x414bcd[_0x541a65(0x161)]+_0x541a65(0x321)+_0x414bcd[_0x541a65(0x520)]+_0x541a65(0x2d1)+_0x414bcd['changes']);if(_0x2613fd[_0x541a65(0x506)]){const _0x42d906=_0x1b65f1[_0x541a65(0x3a4)](_0x1b65f1[_0x541a65(0x43e)](_0x5e67b7),_0x541a65(0x506));if(_0x56a80a[_0x541a65(0x5ee)](_0x42d906)){const {imported:_0x52cbe4,skipped:_0x2457c0}=await _0x45f7b0['migrate']['importBlobs'](_0x42d906);console[_0x541a65(0x4f7)](_0x541a65(0x1f6)+_0x52cbe4+_0x541a65(0x282)+_0x2457c0);}}await _0x45f7b0[_0x541a65(0x241)](),console[_0x541a65(0x4f7)](_0x541a65(0x2c6));}async function _0x3217eb(_0x59dddb,_0x584e4b){const _0x1e5644=_0x2feb2b;_0x584e4b[_0x1e5644(0x46f)]&&!_0x584e4b[_0x1e5644(0x2cc)]&&(console[_0x1e5644(0x31b)](_0x1e5644(0x273)),process[_0x1e5644(0x542)](0x1));const _0x5c842a=_0x584e4b[_0x1e5644(0x3f3)]?_0x584e4b[_0x1e5644(0x3f3)]['split'](',')[_0x1e5644(0x601)](_0x2d5616=>_0x2d5616[_0x1e5644(0x486)]())[_0x1e5644(0x1c6)](Boolean):[];let _0xf5f55f={};if(_0x584e4b['grants'])try{_0xf5f55f=JSON[_0x1e5644(0x34f)](_0x584e4b['grants']);if(typeof _0xf5f55f!=='object'||Array[_0x1e5644(0x579)](_0xf5f55f)||_0xf5f55f===null)throw new Error();}catch{console[_0x1e5644(0x31b)](_0x1e5644(0x2b6)),process[_0x1e5644(0x542)](0x1);}const _0x21e0a6=require$$5,{randomToken:_0x318445,hashToken:_0x23c126,hashPassword:_0x28c77b}=requireOkdbAuthTokens(),_0x3830ad=require$$2,_0xdd64c8=_0x1b65f1['resolve'](_0x59dddb[_0x1e5644(0x64c)]),_0x830200=new _0x21e0a6(_0xdd64c8,_0x59dddb['key']?{'encryptionKey':_0x59dddb[_0x1e5644(0x174)]}:{});await _0x830200[_0x1e5644(0x18d)]();try{await _0x830200[_0x1e5644(0x37d)][_0x1e5644(0x1e6)]();if(_0x584e4b[_0x1e5644(0x2cc)]){const _0x19e6b2=await _0x830200[_0x1e5644(0x37d)][_0x1e5644(0x2df)](_0x584e4b[_0x1e5644(0x2cc)]);_0x19e6b2&&(console[_0x1e5644(0x31b)](_0x1e5644(0x39d)+_0x584e4b['name']+_0x1e5644(0x43d)),process[_0x1e5644(0x542)](0x1));}const _0xf1f171=_0x318445(0x20),_0x5713f5=_0x23c126(_0xf1f171),_0x2d4d2c=_0x584e4b[_0x1e5644(0x46f)]?await _0x28c77b(_0x584e4b[_0x1e5644(0x46f)]):null,_0xdffca4=_0x3830ad[_0x1e5644(0x3ba)](),_0x217149={'tokenHash':_0x5713f5,'name':_0x584e4b[_0x1e5644(0x2cc)]||null,'passwordHash':_0x2d4d2c,'label':_0x584e4b[_0x1e5644(0x508)]||null,'permissions':_0x5c842a,'grants':_0xf5f55f,'createdAt':Date[_0x1e5644(0x16a)](),'lastUsedAt':null},_0x5538f8=_0x584e4b[_0x1e5644(0x4a7)]?{'ttl':Number(_0x584e4b[_0x1e5644(0x4a7)])}:undefined;await _0x830200['_systemEnv']['put'](_0x1e5644(0x471),_0xdffca4,_0x217149,_0x5538f8),console['log'](_0x1e5644(0x183)),console[_0x1e5644(0x4f7)](_0x1e5644(0x621)+_0xdffca4),console['log']('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x584e4b[_0x1e5644(0x2cc)]||_0x1e5644(0x406))),console[_0x1e5644(0x4f7)]('\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20'+(_0x584e4b[_0x1e5644(0x508)]||_0x1e5644(0x406))),console[_0x1e5644(0x4f7)](_0x1e5644(0x3ac)+(_0x5c842a[_0x1e5644(0x3a4)](',\x20')||_0x1e5644(0x1da))),console['log'](_0x1e5644(0x4b3)),console[_0x1e5644(0x4f7)](_0x1e5644(0x3cf)+_0xf1f171+'\x0a');}finally{await _0x830200[_0x1e5644(0x241)]();}}async function _0x21c86d(_0x27c195){const _0x5421bb=_0x2feb2b,_0x3dd9df=require$$5,_0x8140b9=_0x1b65f1['resolve'](_0x27c195['dbPath']),_0x4a761a=new _0x3dd9df(_0x8140b9,_0x27c195[_0x5421bb(0x174)]?{'encryptionKey':_0x27c195[_0x5421bb(0x174)]}:{});await _0x4a761a['open']();try{const _0x44fc96=_0x4a761a[_0x5421bb(0x18f)];if(!_0x44fc96||!_0x44fc96['hasType'](_0x5421bb(0x471))){console[_0x5421bb(0x4f7)](_0x5421bb(0x2fe));return;}const _0x23f114=[];for(const {key:_0x3a4ec2,value:_0x2842ee}of _0x44fc96[_0x5421bb(0x391)]('~tokens')){_0x23f114[_0x5421bb(0x614)]({'id':_0x3a4ec2,'name':_0x2842ee['name']||_0x5421bb(0x406),'label':_0x2842ee[_0x5421bb(0x508)]||_0x5421bb(0x406),'permissions':Array[_0x5421bb(0x579)](_0x2842ee[_0x5421bb(0x3f3)])?_0x2842ee[_0x5421bb(0x3f3)]['join'](','):'','created':_0x2842ee[_0x5421bb(0x375)]?new Date(_0x2842ee[_0x5421bb(0x375)])[_0x5421bb(0x4c8)]()[_0x5421bb(0x45e)](0x0,0xa):''});}if(_0x23f114[_0x5421bb(0x2eb)]===0x0){console[_0x5421bb(0x4f7)](_0x5421bb(0x2fe));return;}const _0x37f545=!process[_0x5421bb(0x559)][_0x5421bb(0x59e)]||process[_0x5421bb(0x559)][_0x5421bb(0x59e)]>=0x64,_0x301b7c=_0x37f545?0x24:0xa,_0x185908=['ID'[_0x5421bb(0x2c9)](_0x301b7c),'NAME'['padEnd'](0x10),'LABEL'[_0x5421bb(0x2c9)](0x14),'PERMISSIONS'[_0x5421bb(0x2c9)](0x14),'CREATED'][_0x5421bb(0x3a4)]('\x20\x20');console[_0x5421bb(0x4f7)]('\x0a'+_0x185908),console[_0x5421bb(0x4f7)]('-'[_0x5421bb(0x473)](_0x185908[_0x5421bb(0x2eb)]));for(const _0xfee115 of _0x23f114){const _0x474259=_0x37f545?_0xfee115['id']:_0xfee115['id'][_0x5421bb(0x45e)](0x0,0x8)+'…';console[_0x5421bb(0x4f7)]([_0x474259[_0x5421bb(0x2c9)](_0x301b7c),_0xfee115[_0x5421bb(0x2cc)][_0x5421bb(0x45e)](0x0,0x10)[_0x5421bb(0x2c9)](0x10),_0xfee115[_0x5421bb(0x508)]['slice'](0x0,0x14)[_0x5421bb(0x2c9)](0x14),_0xfee115[_0x5421bb(0x3f3)]['slice'](0x0,0x14)[_0x5421bb(0x2c9)](0x14),_0xfee115[_0x5421bb(0x2be)]][_0x5421bb(0x3a4)]('\x20\x20'));}console[_0x5421bb(0x4f7)]('');}finally{await _0x4a761a[_0x5421bb(0x241)]();}}async function _0x2e0358(_0xd6c2b8,_0x166adb){const _0x26b541=_0x2feb2b;!_0xd6c2b8&&(console[_0x26b541(0x31b)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x26b541(0x542)](0x1));const _0x2352d4=require$$5,_0x1007dd=_0x1b65f1[_0x26b541(0x4a1)](_0x166adb[_0x26b541(0x64c)]),_0x4787ec=new _0x2352d4(_0x1007dd,_0x166adb[_0x26b541(0x174)]?{'encryptionKey':_0x166adb[_0x26b541(0x174)]}:{});await _0x4787ec[_0x26b541(0x18d)]();try{const _0x4b1c73=_0x4787ec[_0x26b541(0x18f)];(!_0x4b1c73||!_0x4b1c73['hasType'](_0x26b541(0x471)))&&(console[_0x26b541(0x31b)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0xd6c2b8+'\x22'),process[_0x26b541(0x542)](0x1));let _0x17af17=null,_0x1425ce=null;const _0x3b1733=_0x4b1c73[_0x26b541(0x3aa)](_0x26b541(0x471),_0xd6c2b8);if(_0x3b1733)_0x17af17=_0xd6c2b8,_0x1425ce=_0x3b1733;else{const _0x20dda8=[];for(const {key:_0x351bbf,value:_0xd922d7}of _0x4b1c73[_0x26b541(0x391)]('~tokens')){if(_0x351bbf[_0x26b541(0x3cc)](_0xd6c2b8))_0x20dda8['push']({'key':_0x351bbf,'value':_0xd922d7});}_0x20dda8[_0x26b541(0x2eb)]===0x0&&(console[_0x26b541(0x31b)](_0x26b541(0x505)+_0xd6c2b8+'\x22'),process['exit'](0x1));if(_0x20dda8['length']>0x1){console[_0x26b541(0x31b)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0xd6c2b8+_0x26b541(0x500)+_0x20dda8[_0x26b541(0x2eb)]+'\x20tokens:');for(const _0x2af5a7 of _0x20dda8){console[_0x26b541(0x31b)]('\x20\x20'+_0x2af5a7['key']+'\x20\x20(name:\x20'+(_0x2af5a7[_0x26b541(0x392)][_0x26b541(0x2cc)]||_0x26b541(0x406))+')');}process['exit'](0x1);}_0x17af17=_0x20dda8[0x0][_0x26b541(0x174)],_0x1425ce=_0x20dda8[0x0]['value'];}await _0x4b1c73['remove']('~tokens',_0x17af17),console['log'](_0x26b541(0x139)+_0x17af17+_0x26b541(0x3ae)+(_0x1425ce[_0x26b541(0x2cc)]||_0x26b541(0x406))+_0x26b541(0x4dc)+(_0x1425ce['label']||_0x26b541(0x406))+')');}finally{await _0x4787ec['close']();}}function _0x1eeb01(_0x4fefa9,_0x59ffab){const _0x56c18e=_0x2feb2b;if(!_0x4fefa9[_0x56c18e(0x377)])return _0x56c18e(0x3a9);const _0x45e678=_0x4fefa9[_0x56c18e(0x63c)];if(!_0x45e678)return _0x56c18e(0x22d);if(_0x59ffab>_0x45e678)return _0x56c18e(0x2fc);return _0x56c18e(0x22d);}function _0x581cc9(_0x37bcfc){const _0x52a0ac=_0x2feb2b;if(!_0x37bcfc||typeof _0x37bcfc!==_0x52a0ac(0x20e))return'';const _0x5c6902=Object['entries'](_0x37bcfc)[_0x52a0ac(0x1c6)](([,_0x3c7ff4])=>_0x3c7ff4)[_0x52a0ac(0x601)](([_0x3ed2a2])=>_0x3ed2a2);if(_0x5c6902[_0x52a0ac(0x2eb)]===0x0)return _0x52a0ac(0x1da);if(_0x5c6902['length']<=0x3)return _0x5c6902[_0x52a0ac(0x3a4)]('\x20');return _0x5c6902[_0x52a0ac(0x45e)](0x0,0x3)[_0x52a0ac(0x3a4)]('\x20')+('\x20+'+(_0x5c6902[_0x52a0ac(0x2eb)]-0x3));}async function _0x2c9abf(_0x31aa83){const _0x173144=_0x2feb2b,_0x595094=require$$5,_0x29b1f7=requireOkdbLicenseCodec(),{_C:_0x5c5b1a}=requireOkdbLicense(),_0x102fce=_0x1b65f1[_0x173144(0x4a1)](_0x31aa83['dbPath']),_0x467745=new _0x595094(_0x102fce,_0x31aa83[_0x173144(0x174)]?{'encryptionKey':_0x31aa83[_0x173144(0x174)]}:{});await _0x467745[_0x173144(0x18d)]();try{const _0xc195b9=_0x467745[_0x173144(0x18f)],_0x563002=_0xc195b9?.['db']?.[_0x173144(0x3aa)]?.(_0x173144(0x25e))??0x0,_0x3bcdde=[..._0x467745[_0x173144(0x5bd)][_0x173144(0x2f1)]()][_0x173144(0x1c6)](_0x4e323a=>!_0x4e323a[_0x173144(0x3cc)]('~'))[_0x173144(0x2eb)],_0x314839=_0x467745[_0x173144(0x1e7)]?.['effective'];if(_0x314839){const _0x147a8f=_0x314839['_isFree']===!![],_0x505b64=_0x147a8f?_0x173144(0x26a):_0x467745['_license'][_0x173144(0x22d)]?.[_0x173144(0x56c)]||_0x173144(0x354);console[_0x173144(0x4f7)](''),console[_0x173144(0x4f7)](_0x173144(0x1c5)+_0x505b64);const _0xa64902=_0x314839[_0x173144(0x546)]||{};if(_0xa64902['maxWrites']){const _0x22574f=Math[_0x173144(0x1df)](_0x563002/_0xa64902[_0x173144(0x178)]*0x64);console[_0x173144(0x4f7)](_0x173144(0x3ec)+_0x563002[_0x173144(0x620)]()+_0x173144(0xf0)+_0xa64902[_0x173144(0x178)][_0x173144(0x620)]()+_0x173144(0x129)+_0x22574f+'%)');}else console[_0x173144(0x4f7)](_0x173144(0x3ec)+_0x563002[_0x173144(0x620)]());_0xa64902[_0x173144(0xec)]?console[_0x173144(0x4f7)](_0x173144(0x539)+_0x3bcdde+_0x173144(0xf0)+_0xa64902[_0x173144(0xec)]):console[_0x173144(0x4f7)](_0x173144(0x539)+_0x3bcdde),_0x5c5b1a?.[_0x173144(0x10e)]&&console[_0x173144(0x4f7)](_0x173144(0x627)+_0x5c5b1a[_0x173144(0x10e)]+_0x173144(0x208));}if(!_0xc195b9||!_0xc195b9[_0x173144(0x431)](_0x173144(0x3a6))){console[_0x173144(0x4f7)](''),console[_0x173144(0x4f7)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x173144(0x4f7)]('');return;}const _0x22bcf9=[],_0x449f44=Date[_0x173144(0x16a)](),_0x2c17dc=_0x467745['id'],_0x3707dc=_0x173144(0x106);for(const {key:_0x58089a,value:_0x2e132f}of _0xc195b9[_0x173144(0x391)](_0x173144(0x3a6))){const _0x54f0fa=_0x2e132f[_0x173144(0xe9)]?Buffer[_0x173144(0x36d)](_0x2e132f[_0x173144(0xe9)],_0x173144(0x439)):Buffer[_0x173144(0x4fe)](0x8);let _0x573bdd='';try{_0x573bdd=_0x29b1f7[_0x173144(0x5e3)](_0x2c17dc,_0x54f0fa,_0x3707dc)[_0x173144(0x41b)];}catch{}_0x22bcf9[_0x173144(0x614)]({'id':_0x58089a,'licensee':_0x2e132f[_0x173144(0x56c)]||'','expires':_0x2e132f[_0x173144(0x63c)]?new Date(_0x2e132f[_0x173144(0x63c)])[_0x173144(0x4c8)]()[_0x173144(0x45e)](0x0,0xa):'','features':_0x581cc9(_0x2e132f[_0x173144(0x26d)]),'pin':_0x573bdd,'status':_0x1eeb01(_0x2e132f,_0x449f44)});}if(_0x22bcf9[_0x173144(0x2eb)]===0x0){console['log'](''),console[_0x173144(0x4f7)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x173144(0x4f7)]('');return;}const _0x295280=['\x20\x20'+'ID'[_0x173144(0x2c9)](0xe),_0x173144(0x3fc)[_0x173144(0x2c9)](0xe),_0x173144(0x2a1)[_0x173144(0x2c9)](0xc),'FEATURES'[_0x173144(0x2c9)](0x1e),_0x173144(0x36a)[_0x173144(0x2c9)](0xa),_0x173144(0x237)][_0x173144(0x3a4)]('\x20');console[_0x173144(0x4f7)]('\x0a'+_0x295280);for(const _0x357335 of _0x22bcf9){const _0x8c003e=_0x357335['id']['slice'](0x0,0x8)+'…';console[_0x173144(0x4f7)](['\x20\x20'+_0x8c003e[_0x173144(0x2c9)](0xe),_0x357335[_0x173144(0x56c)]['slice'](0x0,0xe)[_0x173144(0x2c9)](0xe),_0x357335['expires'][_0x173144(0x2c9)](0xc),_0x357335['features']['slice'](0x0,0x1e)[_0x173144(0x2c9)](0x1e),_0x357335[_0x173144(0x41b)][_0x173144(0x2c9)](0xa),_0x357335['status']][_0x173144(0x3a4)]('\x20'));}console[_0x173144(0x4f7)]('');}finally{await _0x467745['close']();}}async function _0x595de3(_0x2e957d,_0x204b71){const _0x5cceef=_0x2feb2b,_0xd9e739=require$$5,_0x36c56e=requireOkdbLicenseCodec();let _0x1a8a8c=_0x2e957d;(_0x36c56e[_0x5cceef(0x5d9)](_0x2e957d)==='path'||_0x56a80a[_0x5cceef(0x5ee)](_0x2e957d)&&_0x56a80a['statSync'](_0x2e957d)[_0x5cceef(0x4e9)]())&&(_0x1a8a8c=_0x56a80a[_0x5cceef(0xe7)](_0x2e957d,'utf8')[_0x5cceef(0x486)]());const _0x3d9d68=_0x1b65f1[_0x5cceef(0x4a1)](_0x204b71[_0x5cceef(0x64c)]),_0x2a0eb3=new _0xd9e739(_0x3d9d68,_0x204b71[_0x5cceef(0x174)]?{'encryptionKey':_0x204b71[_0x5cceef(0x174)]}:{});await _0x2a0eb3['open']();try{!_0x2a0eb3[_0x5cceef(0x1e7)]&&(console[_0x5cceef(0x31b)](_0x5cceef(0x411)),process[_0x5cceef(0x542)](0x1));let _0x133d70;try{_0x133d70=await _0x2a0eb3['_license'][_0x5cceef(0x313)](_0x1a8a8c);}catch(_0x2d6f75){console[_0x5cceef(0x31b)](_0x5cceef(0x4b6)+_0x2d6f75[_0x5cceef(0x29c)]),process[_0x5cceef(0x542)](0x1);}const _0x4faeaa=_0x2a0eb3[_0x5cceef(0x1e7)][_0x5cceef(0x23a)](),_0x4b5222=_0x4faeaa[_0x5cceef(0x29a)](_0x5df53a=>_0x5df53a[_0x5cceef(0x57a)]===_0x133d70['id'])?.[_0x5cceef(0x41b)]||'',_0x57af43=Object['entries'](_0x133d70[_0x5cceef(0x26d)]||{})[_0x5cceef(0x1c6)](([,_0x4f6d58])=>_0x4f6d58)[_0x5cceef(0x601)](([_0x2083b7])=>_0x2083b7),_0x4a7d6a=_0x133d70[_0x5cceef(0x546)]||{},_0x58afd0=[_0x4a7d6a[_0x5cceef(0xec)]?_0x5cceef(0x240)+_0x4a7d6a['envs']:null,_0x4a7d6a[_0x5cceef(0x202)]?_0x5cceef(0x4f6)+_0x4a7d6a['typesPerEnv']:null,_0x4a7d6a['syncPeers']?'peers='+_0x4a7d6a[_0x5cceef(0x1dc)]:null,_0x4a7d6a[_0x5cceef(0x178)]?_0x5cceef(0x287)+_0x4a7d6a[_0x5cceef(0x178)][_0x5cceef(0x620)]():null][_0x5cceef(0x1c6)](Boolean)['join']('\x20\x20'),_0x4d5872=_0x133d70[_0x5cceef(0x400)]===_0x36c56e[_0x5cceef(0x2ad)];console[_0x5cceef(0x4f7)]('\x0a\x20\x20✓\x20License\x20added'),console[_0x5cceef(0x4f7)](_0x5cceef(0x41a)+_0x133d70['id']),console[_0x5cceef(0x4f7)](_0x5cceef(0x364)+_0x133d70[_0x5cceef(0x56c)]),console[_0x5cceef(0x4f7)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x133d70['expiresAt'])['toISOString']()[_0x5cceef(0x45e)](0x0,0xa)),console[_0x5cceef(0x4f7)](_0x5cceef(0x1a6)+(_0x57af43['join'](',\x20')||'(none)'));if(_0x58afd0)console['log'](_0x5cceef(0x64e)+_0x58afd0);_0x4d5872?(console[_0x5cceef(0x4f7)](_0x5cceef(0x229)),console['log']('')):(console[_0x5cceef(0x4f7)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x4b5222),console['log'](_0x5cceef(0x497)),console[_0x5cceef(0x4f7)](''),console['log'](_0x5cceef(0x1bd)),console[_0x5cceef(0x4f7)](_0x5cceef(0x53e)+_0x4b5222+_0x5cceef(0xdc)),console[_0x5cceef(0x4f7)](_0x5cceef(0x1c8)),console[_0x5cceef(0x4f7)](_0x5cceef(0x1b5)),console[_0x5cceef(0x4f7)](''));}finally{await _0x2a0eb3['close']();}}async function _0x4e05a9(_0x2744fd,_0x4ac45b){const _0x22b8b5=_0x2feb2b,_0xc3fc1d=require$$5,_0x573ee4=_0x1b65f1[_0x22b8b5(0x4a1)](_0x4ac45b[_0x22b8b5(0x64c)]),_0x25eff4=new _0xc3fc1d(_0x573ee4,_0x4ac45b[_0x22b8b5(0x174)]?{'encryptionKey':_0x4ac45b[_0x22b8b5(0x174)]}:{});await _0x25eff4[_0x22b8b5(0x18d)]();try{!_0x25eff4[_0x22b8b5(0x1e7)]&&(console[_0x22b8b5(0x31b)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x22b8b5(0x542)](0x1));let _0x112ab0;try{_0x112ab0=await _0x25eff4[_0x22b8b5(0x1e7)]['activateLicense'](_0x2744fd['trim']());}catch(_0x35e7ef){console[_0x22b8b5(0x31b)](_0x22b8b5(0x4b6)+_0x35e7ef[_0x22b8b5(0x29c)]),console['error'](''),console[_0x22b8b5(0x31b)](_0x22b8b5(0x4b0)),console['error'](_0x22b8b5(0x19a)),console[_0x22b8b5(0x31b)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x22b8b5(0x31b)](_0x22b8b5(0x2fd)),console[_0x22b8b5(0x31b)](''),process[_0x22b8b5(0x542)](0x1);}console[_0x22b8b5(0x4f7)](_0x22b8b5(0x16c)),console[_0x22b8b5(0x4f7)](_0x22b8b5(0x41a)+_0x112ab0['id']),console[_0x22b8b5(0x4f7)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x112ab0['licensee']),console[_0x22b8b5(0x4f7)](_0x22b8b5(0x571)+new Date(_0x112ab0[_0x22b8b5(0x63c)])['toISOString']()[_0x22b8b5(0x45e)](0x0,0xa)),console['log'](_0x22b8b5(0x426)),console[_0x22b8b5(0x4f7)]('');}finally{await _0x25eff4[_0x22b8b5(0x241)]();}}async function _0x56c23b(_0x16052e,_0x54622c){const _0x496b5f=_0x2feb2b;!_0x16052e&&(console['error'](_0x496b5f(0x4a6)),process[_0x496b5f(0x542)](0x1));const _0x514cfc=require$$5,_0x5042d6=requireOkdbLicenseCodec(),_0x58b713=_0x1b65f1[_0x496b5f(0x4a1)](_0x54622c[_0x496b5f(0x64c)]),_0x4e104d=new _0x514cfc(_0x58b713,_0x54622c[_0x496b5f(0x174)]?{'encryptionKey':_0x54622c[_0x496b5f(0x174)]}:{});await _0x4e104d['open']();try{const _0x248b43=_0x4e104d['_systemEnv'];(!_0x248b43||!_0x248b43['hasType'](_0x496b5f(0x3a6)))&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x16052e+'\x22'),process[_0x496b5f(0x542)](0x1));let _0x38638f=null,_0xfbd70a=null;const _0x3b866d=_0x248b43[_0x496b5f(0x3aa)](_0x496b5f(0x3a6),_0x16052e);if(_0x3b866d)_0x38638f=_0x16052e,_0xfbd70a=_0x3b866d;else{const _0x4d3995=[];for(const {key:_0x309fd0,value:_0x2cc05a}of _0x248b43[_0x496b5f(0x391)](_0x496b5f(0x3a6))){if(_0x309fd0[_0x496b5f(0x3cc)](_0x16052e))_0x4d3995['push']({'key':_0x309fd0,'value':_0x2cc05a});}_0x4d3995[_0x496b5f(0x2eb)]===0x0&&(console[_0x496b5f(0x31b)](_0x496b5f(0x1e8)+_0x16052e+'\x22'),process[_0x496b5f(0x542)](0x1)),_0x4d3995[_0x496b5f(0x2eb)]>0x1&&(console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x16052e+_0x496b5f(0x500)+_0x4d3995['length']+_0x496b5f(0x175)),process['exit'](0x1)),_0x38638f=_0x4d3995[0x0][_0x496b5f(0x174)],_0xfbd70a=_0x4d3995[0x0][_0x496b5f(0x392)];}const _0x1de12b=Date[_0x496b5f(0x16a)](),_0x47f1bc=_0x1eeb01(_0xfbd70a,_0x1de12b),_0x3ebe65=_0x4e104d['id'],_0xc4be21=_0x496b5f(0x106);let _0x328628='';try{const _0x542fd7=Buffer[_0x496b5f(0x36d)](_0xfbd70a[_0x496b5f(0xe9)],'hex');_0x328628=_0x5042d6[_0x496b5f(0x5e3)](_0x3ebe65,_0x542fd7,_0xc4be21)[_0x496b5f(0x41b)];}catch{}const _0x49ea2c=_0xfbd70a[_0x496b5f(0x26d)]?Object[_0x496b5f(0x427)](_0xfbd70a[_0x496b5f(0x26d)])['filter'](([,_0x4c182d])=>_0x4c182d)[_0x496b5f(0x601)](([_0x3018bc])=>_0x3018bc):[],_0x1e6a3a=_0xfbd70a[_0x496b5f(0x546)]||{},_0x1131c8=_0x248b43?.['db']?.[_0x496b5f(0x3aa)]?.(_0x496b5f(0x25e))??0x0,_0x2b57f2=[..._0x4e104d[_0x496b5f(0x5bd)]['keys']()][_0x496b5f(0x1c6)](_0x1f68f8=>!_0x1f68f8[_0x496b5f(0x3cc)]('~'))[_0x496b5f(0x2eb)];console[_0x496b5f(0x4f7)](_0x496b5f(0x470)),console[_0x496b5f(0x4f7)](_0x496b5f(0x41a)+_0x38638f),console[_0x496b5f(0x4f7)](_0x496b5f(0x364)+(_0xfbd70a[_0x496b5f(0x56c)]||'')),console[_0x496b5f(0x4f7)](_0x496b5f(0x571)+(_0xfbd70a['expiresAt']?new Date(_0xfbd70a[_0x496b5f(0x63c)])[_0x496b5f(0x4c8)]()[_0x496b5f(0x45e)](0x0,0xa):'')),console['log'](_0x496b5f(0x1a6)+(_0x49ea2c['join'](',\x20')||_0x496b5f(0x1da))),console[_0x496b5f(0x4f7)](_0x496b5f(0x576)+_0x328628),console[_0x496b5f(0x4f7)](_0x496b5f(0x345)+_0x47f1bc),console[_0x496b5f(0x4f7)](_0x496b5f(0x46d)+new Date(_0xfbd70a[_0x496b5f(0x5c6)])[_0x496b5f(0x4c8)]());if(_0x47f1bc==='active'){console['log'](''),console[_0x496b5f(0x4f7)](_0x496b5f(0x580));if(_0x1e6a3a['maxWrites']){const _0x4a29b5=Math[_0x496b5f(0x1df)](_0x1131c8/_0x1e6a3a[_0x496b5f(0x178)]*0x64);console[_0x496b5f(0x4f7)](_0x496b5f(0x420)+_0x1131c8[_0x496b5f(0x620)]()+'\x20/\x20'+_0x1e6a3a[_0x496b5f(0x178)][_0x496b5f(0x620)]()+_0x496b5f(0x129)+_0x4a29b5+'%)');}else console[_0x496b5f(0x4f7)](_0x496b5f(0x420)+_0x1131c8['toLocaleString']()+'\x20\x20(unlimited)');_0x1e6a3a['envs']?console[_0x496b5f(0x4f7)](_0x496b5f(0x27c)+_0x2b57f2+_0x496b5f(0xf0)+_0x1e6a3a[_0x496b5f(0xec)]):console[_0x496b5f(0x4f7)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x2b57f2+_0x496b5f(0x4e8));}console[_0x496b5f(0x4f7)]('');}finally{await _0x4e104d[_0x496b5f(0x241)]();}}async function _0x5d17e7(_0x45bd23,_0x40eff9){const _0x496960=_0x2feb2b;!_0x45bd23&&(console['error']('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x496960(0x542)](0x1));const _0x3df4f6=require$$5,_0xd5bade=_0x1b65f1[_0x496960(0x4a1)](_0x40eff9[_0x496960(0x64c)]),_0xd0295f=new _0x3df4f6(_0xd5bade,_0x40eff9['key']?{'encryptionKey':_0x40eff9[_0x496960(0x174)]}:{});await _0xd0295f[_0x496960(0x18d)]();try{const _0x3c91fe=_0xd0295f[_0x496960(0x18f)];(!_0x3c91fe||!_0x3c91fe[_0x496960(0x431)](_0x496960(0x3a6)))&&(console[_0x496960(0x31b)](_0x496960(0x1e8)+_0x45bd23+'\x22'),process[_0x496960(0x542)](0x1));let _0x46dfad=null,_0xcb9448=null;const _0x460282=_0x3c91fe[_0x496960(0x3aa)]('~licenses',_0x45bd23);if(_0x460282)_0x46dfad=_0x45bd23,_0xcb9448=_0x460282;else{const _0x30b505=[];for(const {key:_0x17eb85,value:_0x379dd8}of _0x3c91fe[_0x496960(0x391)](_0x496960(0x3a6))){if(_0x17eb85[_0x496960(0x3cc)](_0x45bd23))_0x30b505[_0x496960(0x614)]({'key':_0x17eb85,'value':_0x379dd8});}_0x30b505[_0x496960(0x2eb)]===0x0&&(console[_0x496960(0x31b)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x45bd23+'\x22'),process[_0x496960(0x542)](0x1)),_0x30b505[_0x496960(0x2eb)]>0x1&&(console[_0x496960(0x31b)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x45bd23+_0x496960(0x500)+_0x30b505['length']+_0x496960(0x175)),process[_0x496960(0x542)](0x1)),_0x46dfad=_0x30b505[0x0][_0x496960(0x174)],_0xcb9448=_0x30b505[0x0][_0x496960(0x392)];}await _0x3c91fe[_0x496960(0x1b1)](_0x496960(0x3a6),_0x46dfad),console[_0x496960(0x4f7)](_0x496960(0x16b)+_0x46dfad+_0x496960(0x443)+(_0xcb9448[_0x496960(0x56c)]||_0x496960(0x406))+')');}finally{await _0xd0295f[_0x496960(0x241)]();}}async function _0x1da8e5(_0x554add,_0x4cd400,_0x10c82d){const _0x4896ec=_0x2feb2b;!_0x554add&&(console[_0x4896ec(0x31b)](_0x4896ec(0x27d)),process[_0x4896ec(0x542)](0x1));!_0x10c82d[_0x4896ec(0x359)]&&!(_0x10c82d[_0x4896ec(0x112)]&&_0x10c82d[_0x4896ec(0x46f)])&&(console['error'](_0x4896ec(0x4e4)),process['exit'](0x1));const _0x2d9d87=_0x10c82d[_0x4896ec(0x5d5)]||_0x4cd400[_0x4896ec(0x32d)]?.[_0x4896ec(0x47f)];!_0x2d9d87&&(console[_0x4896ec(0x31b)](_0x4896ec(0x385)+'\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a'+_0x4896ec(0x64b)),process[_0x4896ec(0x542)](0x1));const _0x96f882=require$$5,_0x9a78d0=new _0x96f882(_0x4cd400[_0x4896ec(0x64c)],{'sync':{'address':_0x2d9d87,'auto_reconcile':![]}});await _0x9a78d0[_0x4896ec(0x18d)]();try{const _0x3559ea=_0x9a78d0[_0x4896ec(0x18f)];if(_0x3559ea&&_0x3559ea['hasType'](_0x4896ec(0x471))){let _0x29871f=![];for(const _0x327bcd of _0x3559ea[_0x4896ec(0x391)](_0x4896ec(0x471))){_0x29871f=!![];break;}_0x29871f&&console['log'](_0x4896ec(0x588)+_0x4896ec(0x3fb));}console[_0x4896ec(0x4f7)](_0x4896ec(0x3fe)+_0x554add+'…'),await _0x9a78d0[_0x4896ec(0x32d)][_0x4896ec(0x3a4)](_0x554add['replace'](/\/+$/,''),{'token':_0x10c82d[_0x4896ec(0x359)],'username':_0x10c82d[_0x4896ec(0x112)],'password':_0x10c82d[_0x4896ec(0x46f)]}),console[_0x4896ec(0x4f7)](_0x4896ec(0x4ce)),console[_0x4896ec(0x4f7)](_0x4896ec(0x4f1));}finally{await _0x9a78d0[_0x4896ec(0x241)]();}}async function _0x508cad(){const _0x183505=_0x2feb2b,_0x2792ff=Date[_0x183505(0x16a)](),_0x3dfbf5=_0x4f700b(process[_0x183505(0x290)]),_0x1dded1=_0x58293d(_0x3dfbf5),_0x40578e=_0x1b65f1[_0x183505(0x4a1)](_0x1dded1[_0x183505(0x64c)]);!_0x1dded1['noRepl']&&!process[_0x183505(0x61c)][_0x183505(0x52b)]&&(_0x1dded1[_0x183505(0x2bd)]=!![]);const _0x1adc04=require$$5,{start:_0x226790,colorLog:_0x4d883a}=requireOkdbShell(),_0x46ba31=require$$1$2,_0x144a5={..._0x1dded1[_0x183505(0x174)]?{'encryptionKey':_0x1dded1['key']}:{},..._0x1dded1[_0x183505(0x673)]?{'admin':![]}:_0x2b35c1(_0x1dded1[_0x183505(0x27f)])?{'admin':_0x1dded1['admin']}:{},..._0x2b35c1(_0x1dded1[_0x183505(0x60f)])?{'api':_0x1dded1[_0x183505(0x60f)]}:{},..._0x2b35c1(_0x1dded1[_0x183505(0x37d)])?{'auth':_0x1dded1['auth']}:{},..._0x2b35c1(_0x1dded1['mcp'])?{'mcp':_0x1dded1[_0x183505(0x32b)]}:{},..._0x1dded1[_0x183505(0x232)]!==![]?{'timeMachine':_0x1dded1['timeMachine']}:{}},_0x43bbbe=_0x2c44bd(_0x1dded1);if(!_0x46ba31[_0x183505(0x60c)]){const _0x5caf19=_0x4b1d13(),_0x2b5083=_0x1dded1[_0x183505(0x289)]?_0x183505(0x300):_0x1dded1[_0x183505(0x194)]!=null&&_0x1dded1['workersFlag']!==''?_0x183505(0x102):process.env.OKDB_HTTP_WORKERS?_0x183505(0x4ef):_0x1dded1[_0x183505(0x5d0)]?.['workers']!=null?_0x183505(0x189):_0x183505(0x46b)+Math[_0x183505(0x47e)](0x1,require$$0['cpus']()[_0x183505(0x2eb)]-0x1);process['stdout'][_0x183505(0x4ae)](_0x183505(0x23d)+_0x43bbbe+'\x20('+_0x2b5083+(!_0x5caf19?_0x183505(0x63b):'')+')\x0a');}if(_0x46ba31[_0x183505(0x60c)]){const _0x3b7da6={..._0x144a5,'engines':![],'asyncProcessors':![],'compaction':_0x183505(0x573),'bus':!![]},_0x53d82b=new _0x1adc04(_0x40578e,_0x3b7da6);_0x53d82b['log']['detachConsole']?.();const _0x12bbea=process.env.OKDB_CLUSTER_SLOT??'?',_0x3dd986={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x34b7f0=_0x3dd986[_0x1dded1[_0x183505(0x45d)]]??_0x3dd986[_0x183505(0x3d7)];_0x53d82b[_0x183505(0x4f7)][_0x183505(0x649)](_0x40964c=>{const _0x188fb0=_0x183505;if((_0x3dd986[_0x40964c[_0x188fb0(0x294)]]??0x1)<_0x34b7f0)return;try{process[_0x188fb0(0x270)]?.({'__okdbCluster':_0x188fb0(0x4f7),'slot':_0x12bbea,'pid':process[_0x188fb0(0x3e7)],'entry':_0x40964c});}catch{}}),await _0x53d82b['open']();const {attachWorkerCluster:_0x383239}=requireOkdbCluster();_0x383239(_0x53d82b),await _0x47de7d(_0x53d82b,_0x1dded1[_0x183505(0x26f)]);return;}if(_0x43bbbe>0x1){const _0x2efce5=requireOkdbHttp(),_0x3a4707=new _0x2efce5(),_0x4a4128=new _0x1adc04(_0x40578e,_0x144a5);await _0x4a4128[_0x183505(0x18d)]();const _0x31c885=async()=>{const _0x6e1ad9=_0x183505,_0x725ef1={..._0x144a5,'engines':![],'asyncProcessors':![],'compaction':_0x6e1ad9(0x573),'bus':!![]},_0x4316f7=new _0x1adc04(_0x40578e,_0x725ef1);return await _0x4316f7[_0x6e1ad9(0x18d)](),_0x4316f7;},_0x2a773a=_0x3a4707[_0x183505(0x31f)](_0x1dded1[_0x183505(0x26f)],{'workers':_0x43bbbe,'makeOkdb':_0x31c885,'primaryOkdb':_0x4a4128});let _0x476897=![];async function _0x304e73(_0x178a13){const _0x2469c6=_0x183505;_0x476897&&(process['stderr'][_0x2469c6(0x4ae)](_0x2469c6(0x180)),process[_0x2469c6(0x542)](0x82));_0x476897=!![],process['stderr'][_0x2469c6(0x4ae)]('\x0a[okdb]\x20received\x20'+(_0x178a13||_0x2469c6(0x2d9))+_0x2469c6(0x13d));const _0x35a565=setTimeout(()=>{const _0x37443a=_0x2469c6;process[_0x37443a(0x16f)]['write'](_0x37443a(0xe6)),process[_0x37443a(0x542)](0x0);},0xbb8);_0x35a565[_0x2469c6(0x386)]?.();try{await _0x2a773a[_0x2469c6(0x241)]();}catch(_0x3670ff){process[_0x2469c6(0x16f)][_0x2469c6(0x4ae)](_0x2469c6(0x4aa)+(_0x3670ff?.['message']??_0x3670ff)+'\x0a');}try{await _0x4a4128[_0x2469c6(0x241)]();}catch(_0x44b80d){process[_0x2469c6(0x16f)][_0x2469c6(0x4ae)](_0x2469c6(0x3e0)+(_0x44b80d?.[_0x2469c6(0x29c)]??_0x44b80d)+'\x0a');}process[_0x2469c6(0x542)](0x0);}_0x1dded1[_0x183505(0x52c)]=_0x43bbbe;if(!_0x1dded1[_0x183505(0x2bd)]){_0x4a4128['log'][_0x183505(0x222)]?.(),_0x5b43a0(_0x4a4128[_0x183505(0x37d)]?.[_0x183505(0x1f2)]?.()??[]),await _0x226790(_0x4a4128,_0x1dded1);return;}process[_0x183505(0x559)][_0x183505(0x4ae)]('[okdb]\x20cluster\x20primary\x20pid='+process[_0x183505(0x3e7)]+':\x20processor\x20(HTTP-silent),\x20'+_0x43bbbe+'\x20'+(_0x183505(0x4ec)+_0x1dded1[_0x183505(0x26f)]+'\x0a')),console[_0x183505(0x4f7)](''),console[_0x183505(0x4f7)](_0x183505(0x41c)),console[_0x183505(0x4f7)](_0x183505(0x4fa)+_0x1dded1[_0x183505(0x26f)]+_0x183505(0x129)+_0x43bbbe+_0x183505(0x220)),console[_0x183505(0x4f7)](_0x183505(0x531)+_0x40578e),console[_0x183505(0x4f7)](_0x183505(0x2e0)+_0x4a4128['id']),console[_0x183505(0x4f7)](_0x183505(0x3f5)+_0x1dded1[_0x183505(0x26f)]+'/api');!_0x1dded1['noAdmin']&&console[_0x183505(0x4f7)](_0x183505(0x387)+_0x1dded1[_0x183505(0x26f)]+_0x183505(0x61f));console[_0x183505(0x4f7)](''),_0x5b43a0(_0x4a4128[_0x183505(0x37d)]?.[_0x183505(0x1f2)]?.()??[]),process['on']('SIGINT',()=>_0x304e73(_0x183505(0x53b))),process['on']('SIGTERM',()=>_0x304e73(_0x183505(0x61a))),process['on'](_0x183505(0x5e7),()=>_0x304e73('SIGBREAK'));return;}const _0x395adb=new _0x1adc04(_0x40578e,_0x144a5);_0x395adb[_0x183505(0x4f7)][_0x183505(0x222)]?.();const _0x36c564=_0x395adb[_0x183505(0x4f7)][_0x183505(0x649)](_0x122b18=>_0x4d883a(_0x122b18,_0x1dded1[_0x183505(0x45d)]));if(_0x1dded1[_0x183505(0x2bd)])process[_0x183505(0x559)]['write'](_0x183505(0x57c));await _0x395adb['open']();if(_0x1dded1[_0x183505(0x2bd)])process[_0x183505(0x559)][_0x183505(0x4ae)](_0x183505(0x5cd));try{await _0x47de7d(_0x395adb,_0x1dded1['port']);}catch(_0x2b99ee){_0x2b99ee[_0x183505(0x60e)]===_0x183505(0x2c8)&&(console[_0x183505(0x31b)](_0x183505(0x65a)+_0x1dded1[_0x183505(0x26f)]+_0x183505(0x4c0)),process[_0x183505(0x542)](0x1));throw _0x2b99ee;}if(_0x1dded1[_0x183505(0x2bd)])process[_0x183505(0x559)][_0x183505(0x4ae)](_0x183505(0x611)+_0x1dded1[_0x183505(0x26f)]+'\x0a');if(!_0x1dded1[_0x183505(0x2bd)])_0x395adb[_0x183505(0x4f7)]['detachConsole']?.(),_0x36c564?.(),_0x5b43a0(_0x395adb['auth']?.['getSecurityNotices']?.()??[]),await _0x226790(_0x395adb,_0x1dded1);else{const _0x523df3=_0x1b65f1[_0x183505(0x3a4)](_0x40578e,_0x183505(0x661));try{_0x56a80a[_0x183505(0x59d)](_0x523df3,String(process[_0x183505(0x3e7)]));}catch{}const _0x3259f2=Date[_0x183505(0x16a)]()-_0x2792ff;console[_0x183505(0x4f7)](''),console[_0x183505(0x4f7)](_0x183505(0x2ab)),console[_0x183505(0x4f7)](_0x183505(0x357)+_0x1dded1[_0x183505(0x26f)]),console[_0x183505(0x4f7)]('\x20\x20\x20\x20path:\x20\x20'+_0x40578e),console[_0x183505(0x4f7)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x395adb['id']);{const _0xf315dd=_0x395adb[_0x183505(0x18f)]?.['db']?.[_0x183505(0x3aa)]?.(_0x183505(0x25e))??0x0,_0x2b7ea0=[..._0x395adb[_0x183505(0x5bd)][_0x183505(0x2f1)]()][_0x183505(0x1c6)](_0x2288fe=>!_0x2288fe[_0x183505(0x3cc)]('~'))[_0x183505(0x2eb)];if(_0x395adb[_0x183505(0x1e7)]?.['active']?.['licenseType']===0x1){const _0x1ac8f0=Math[_0x183505(0x602)]((_0x395adb[_0x183505(0x1e7)][_0x183505(0x22d)]['expiresAt']-Date[_0x183505(0x16a)]())/0x5265c00);console[_0x183505(0x4f7)]('\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20'+_0x395adb['_license'][_0x183505(0x22d)][_0x183505(0x56c)]+_0x183505(0x2b3)+_0x1ac8f0+_0x183505(0x340));}else{if(_0x395adb[_0x183505(0x1e7)]?.[_0x183505(0x22d)]){const _0x5b1f38=_0x395adb['_license'][_0x183505(0x22d)];console[_0x183505(0x4f7)](_0x183505(0x59c)+_0x5b1f38[_0x183505(0x56c)]+_0x183505(0x2fa)+new Date(_0x5b1f38[_0x183505(0x63c)])[_0x183505(0x4c8)]()['slice'](0x0,0xa)+')');const _0x27f171=_0x5b1f38[_0x183505(0x546)]||{};if(_0x27f171[_0x183505(0x178)]){const _0x4e0c8e=Math[_0x183505(0x1df)](_0xf315dd/_0x27f171[_0x183505(0x178)]*0x64);console['log'](_0x183505(0x4e2)+_0xf315dd[_0x183505(0x620)]()+_0x183505(0xf0)+_0x27f171[_0x183505(0x178)][_0x183505(0x620)]()+_0x183505(0x39e)+_0x4e0c8e+_0x183505(0x24b)+_0x2b7ea0+(_0x27f171[_0x183505(0xec)]?'/'+_0x27f171[_0x183505(0xec)]:'')+_0x183505(0x20d)+(_0x2b7ea0===0x1?'':'s'));}}else{if(_0x395adb[_0x183505(0x1e7)]){const _0x34fb0f=_0x395adb[_0x183505(0x1e7)][_0x183505(0x23a)](),_0xafcaca=_0x34fb0f['length']?_0x34fb0f['map'](_0x1551c5=>_0x1551c5[_0x183505(0x41b)])[_0x183505(0x3a4)](',\x20'):'(add\x20a\x20license\x20first)',_0x198d4d=_0x395adb[_0x183505(0x1e7)]['effective'],_0x8b65c9=_0x198d4d['limits']['maxWrites']?Math['round'](_0xf315dd/_0x198d4d['limits'][_0x183505(0x178)]*0x64):0x0;console[_0x183505(0x4f7)](_0x183505(0x60a)),console[_0x183505(0x4f7)](_0x183505(0x4e2)+_0xf315dd[_0x183505(0x620)]()+_0x183505(0xf0)+_0x198d4d[_0x183505(0x546)]['maxWrites'][_0x183505(0x620)]()+_0x183505(0x39e)+_0x8b65c9+_0x183505(0x24b)+_0x2b7ea0+_0x183505(0xf0)+_0x198d4d[_0x183505(0x546)][_0x183505(0xec)]+_0x183505(0x21a)),console[_0x183505(0x4f7)](_0x183505(0x4cc)+_0xafcaca);}}}}console[_0x183505(0x4f7)]('\x20\x20\x20\x20api:\x20\x20\x20http://localhost:'+_0x1dded1[_0x183505(0x26f)]+_0x183505(0x253));!_0x1dded1[_0x183505(0x673)]&&console[_0x183505(0x4f7)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x1dded1[_0x183505(0x26f)]+'/admin/index.html');console[_0x183505(0x4f7)](''),console[_0x183505(0x4f7)](_0x183505(0x44d)+_0x3259f2+'ms'),_0x5b43a0(_0x395adb['auth']?.[_0x183505(0x1f2)]?.()??[]);let _0x54fbeb=![];async function _0x4b2b2a(_0x22f448){const _0x39fbca=_0x183505;_0x54fbeb&&(process[_0x39fbca(0x16f)]['write'](_0x39fbca(0x180)),process[_0x39fbca(0x542)](0x82));_0x54fbeb=!![],process[_0x39fbca(0x16f)][_0x39fbca(0x4ae)](_0x39fbca(0x57e)+(_0x22f448||_0x39fbca(0x2d9))+_0x39fbca(0x33d));const _0x179129=setTimeout(()=>{const _0x5a0177=_0x39fbca;process[_0x5a0177(0x16f)][_0x5a0177(0x4ae)](_0x5a0177(0x281)),process[_0x5a0177(0x542)](0x1);},0x1388);try{_0x56a80a[_0x39fbca(0x207)](_0x523df3);}catch{}try{await _0x395adb['close']();}catch(_0x4b89bf){process[_0x39fbca(0x16f)][_0x39fbca(0x4ae)](_0x39fbca(0xf3)+(_0x4b89bf?.[_0x39fbca(0x29c)]??_0x4b89bf)+'\x0a');}clearTimeout(_0x179129),process[_0x39fbca(0x16f)][_0x39fbca(0x4ae)]('[okdb]\x20closed\x20cleanly\x0a'),process[_0x39fbca(0x542)](0x0);}process['on'](_0x183505(0x53b),()=>_0x4b2b2a(_0x183505(0x53b))),process['on'](_0x183505(0x61a),()=>_0x4b2b2a(_0x183505(0x61a))),process['on'](_0x183505(0x5e7),()=>_0x4b2b2a('SIGBREAK'));}}const _0x1482fe=new Set([_0x2feb2b(0x2ea),'doctor','init','backup',_0x2feb2b(0x2d6),_0x2feb2b(0x634),'reset',_0x2feb2b(0x359),'join',_0x2feb2b(0x58c)]),_0x584a2f=process[_0x2feb2b(0x290)][0x2];if(_0x584a2f===_0x2feb2b(0x2ea))console[_0x2feb2b(0x4f7)](require$$3[_0x2feb2b(0x2ea)]),process[_0x2feb2b(0x542)](0x0);else{if(_0x584a2f&&_0x1482fe[_0x2feb2b(0x39f)](_0x584a2f)){const _0x1932e0=process['argv'][_0x2feb2b(0x45e)](0x3),_0x2523dd=_0x4f700b([_0x2feb2b(0x3fa),_0x2feb2b(0x2d3),..._0x1932e0]),_0x11abeb=_0x58293d(_0x2523dd),_0x27e279=new Set([_0x2feb2b(0x1fe),'-d','--key','-k',_0x2feb2b(0x5b3),'-c','--port','-p',_0x2feb2b(0x417),_0x2feb2b(0x3c4),'-e',_0x2feb2b(0x66a),'--name','--password',_0x2feb2b(0x160),_0x2feb2b(0x53f),_0x2feb2b(0x58e),_0x2feb2b(0x5f4),_0x2feb2b(0x3e8),_0x2feb2b(0x463),'-u',_0x2feb2b(0x2d2)]);let _0x15f6f4=null;for(let _0x1a5c9b=0x0;_0x1a5c9b<_0x1932e0['length'];_0x1a5c9b++){if(_0x27e279[_0x2feb2b(0x39f)](_0x1932e0[_0x1a5c9b])){_0x1a5c9b++;continue;}if(!_0x1932e0[_0x1a5c9b][_0x2feb2b(0x3cc)]('-')){_0x15f6f4=_0x1932e0[_0x1a5c9b];break;}}(async()=>{const _0x53bdce=_0x2feb2b;if(_0x584a2f===_0x53bdce(0x359)){const _0xf734da=process['argv'][0x3],_0x2e8c81=process[_0x53bdce(0x290)]['slice'](0x4),_0x1e9039=_0x4f700b([_0x53bdce(0x3fa),_0x53bdce(0x2d3),..._0x2e8c81]),_0x287f08=_0x58293d(_0x1e9039),_0x5a5036=new Set(['--path','-d',_0x53bdce(0x231),'-k',_0x53bdce(0x5b3),'-c',_0x53bdce(0x322),'-p','--name',_0x53bdce(0x3d6),_0x53bdce(0x160),_0x53bdce(0x53f),_0x53bdce(0x58e),_0x53bdce(0x5f4),'--log-level',_0x53bdce(0x3c4),'-e',_0x53bdce(0x66a)]),_0x317a64=[];for(let _0xd4187e=0x0;_0xd4187e<_0x2e8c81[_0x53bdce(0x2eb)];_0xd4187e++){if(_0x5a5036[_0x53bdce(0x39f)](_0x2e8c81[_0xd4187e])){_0xd4187e++;continue;}if(_0x2e8c81[_0xd4187e][_0x53bdce(0x3cc)]('-'))continue;_0x317a64['push'](_0x2e8c81[_0xd4187e]);}switch(_0xf734da){case _0x53bdce(0x495):await _0x3217eb(_0x287f08,_0x1e9039);break;case _0x53bdce(0x25b):await _0x21c86d(_0x287f08);break;case _0x53bdce(0x338):await _0x2e0358(_0x317a64[0x0],_0x287f08);break;default:console[_0x53bdce(0x31b)](_0x53bdce(0x349)+_0xf734da+_0x53bdce(0x169)),process[_0x53bdce(0x542)](0x1);}return;}if(_0x584a2f==='license'){const _0x4c4573=requireOkdbLicenseCodec(),_0x251df0=process[_0x53bdce(0x290)][_0x53bdce(0x45e)](0x3),_0x3c8575=_0x4f700b([_0x53bdce(0x3fa),'okdb',..._0x251df0]),_0x412e5e=_0x58293d(_0x3c8575),_0xe065d7=new Set(['--path','-d',_0x53bdce(0x231),'-k',_0x53bdce(0x5b3),'-c',_0x53bdce(0x322),'-p','--log-level']),_0x2882f7=[];for(let _0x142229=0x0;_0x142229<_0x251df0[_0x53bdce(0x2eb)];_0x142229++){if(_0xe065d7[_0x53bdce(0x39f)](_0x251df0[_0x142229])){_0x142229++;continue;}if(_0x251df0[_0x142229][_0x53bdce(0x3cc)]('-'))continue;_0x2882f7[_0x53bdce(0x614)](_0x251df0[_0x142229]);}const _0x4489e2=_0x2882f7[0x0]??null;if(_0x4489e2===_0x53bdce(0x1b1))await _0x5d17e7(_0x2882f7[0x1],_0x412e5e);else{if(!_0x4489e2)await _0x2c9abf(_0x412e5e);else{let _0x46e21c=_0x4c4573['detectInputType'](_0x4489e2);if(_0x46e21c===_0x53bdce(0x326)&&_0x56a80a[_0x53bdce(0x5ee)](_0x4489e2))_0x46e21c='path';if(_0x46e21c===_0x53bdce(0x42d))try{const _0x4195a4=_0x56a80a[_0x53bdce(0xe7)](_0x4489e2,_0x53bdce(0x365))[_0x53bdce(0x486)](),_0x52ab52=_0x4c4573[_0x53bdce(0x5d9)](_0x4195a4);if(_0x52ab52===_0x53bdce(0x377)){await _0x4e05a9(_0x4195a4,_0x412e5e);return;}await _0x595de3(_0x4489e2,_0x412e5e);return;}catch(_0x87ab15){console[_0x53bdce(0x31b)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x4489e2+':\x20'+_0x87ab15[_0x53bdce(0x29c)]),process[_0x53bdce(0x542)](0x1);}switch(_0x46e21c){case _0x53bdce(0x1d8):await _0x595de3(_0x4489e2,_0x412e5e);break;case _0x53bdce(0x377):await _0x4e05a9(_0x4489e2,_0x412e5e);break;case _0x53bdce(0x134):await _0x56c23b(_0x4489e2,_0x412e5e);break;default:console[_0x53bdce(0x31b)](_0x53bdce(0x2b2)+_0x4489e2+'\x22'),console[_0x53bdce(0x31b)](''),console[_0x53bdce(0x31b)](_0x53bdce(0xff)),console[_0x53bdce(0x31b)]('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console[_0x53bdce(0x31b)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console[_0x53bdce(0x31b)](_0x53bdce(0xee)),console['error'](_0x53bdce(0x617)),console[_0x53bdce(0x31b)](''),console[_0x53bdce(0x31b)](_0x53bdce(0x4fb)),process[_0x53bdce(0x542)](0x1);}}}return;}switch(_0x584a2f){case _0x53bdce(0x498):await _0x3a8f5c(_0x11abeb);break;case'init':await _0x35ffc0();break;case _0x53bdce(0x1c2):await _0x44b834(_0x11abeb);break;case _0x53bdce(0x329):await _0x1eecf7(_0x15f6f4??_0x1b65f1[_0x53bdce(0x4a1)](_0x53bdce(0x40e)),_0x11abeb);break;case'export':await _0x27c3f3(_0x15f6f4??_0x1b65f1['resolve'](_0x53bdce(0x33a)),_0x11abeb,_0x2523dd);break;case _0x53bdce(0x634):await _0x58e636(_0x15f6f4??_0x1b65f1[_0x53bdce(0x4a1)](_0x53bdce(0x33a)),_0x11abeb,_0x2523dd);break;case'join':await _0x1da8e5(_0x15f6f4,_0x11abeb,_0x2523dd);break;}})()['then'](()=>process['exit'](0x0))[_0x2feb2b(0x255)](_0x3ae1c8=>{const _0x5dcbb8=_0x2feb2b;console[_0x5dcbb8(0x31b)](_0x5dcbb8(0x628)+(_0x3ae1c8[_0x5dcbb8(0x29c)]||_0x3ae1c8)+'\x0a'),process[_0x5dcbb8(0x542)](0x1);});}else _0x508cad()[_0x2feb2b(0x255)](_0x15cf91=>{const _0x1bc5ef=_0x2feb2b;console[_0x1bc5ef(0x31b)](_0x1bc5ef(0x10d)),console[_0x1bc5ef(0x31b)](_0x15cf91[_0x1bc5ef(0x1f3)]||_0x15cf91),process[_0x1bc5ef(0x542)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x4b361c(0x1b3)]=okdb;