@kedem/okdb 1.8.15 → 1.8.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x239a30=_0x4918;(function(_0x285266,_0x12f59b){const _0x1ca676=_0x4918,_0x410a46=_0x285266();while(!![]){try{const _0x3c12ff=parseInt(_0x1ca676(0x256))/0x1*(parseInt(_0x1ca676(0x233))/0x2)+parseInt(_0x1ca676(0x1bf))/0x3*(parseInt(_0x1ca676(0x232))/0x4)+-parseInt(_0x1ca676(0x361))/0x5*(-parseInt(_0x1ca676(0x1fb))/0x6)+parseInt(_0x1ca676(0x16b))/0x7+parseInt(_0x1ca676(0x181))/0x8*(-parseInt(_0x1ca676(0x338))/0x9)+-parseInt(_0x1ca676(0x1d6))/0xa*(parseInt(_0x1ca676(0x1f0))/0xb)+parseInt(_0x1ca676(0x18c))/0xc*(-parseInt(_0x1ca676(0x341))/0xd);if(_0x3c12ff===_0x12f59b)break;else _0x410a46['push'](_0x410a46['shift']());}catch(_0x1f0719){_0x410a46['push'](_0x410a46['shift']());}}}(_0x13b9,0xd56f9));var require$$1$1=require(_0x239a30(0x1b1)),require$$1=require('fs'),require$$3=require('net'),require$$0$2=require(_0x239a30(0x11b)),require$$5=require(_0x239a30(0x3c0)),require$$0=require(_0x239a30(0x290)),require$$0$1=require(_0x239a30(0x1af)),require$$2$1=require('os'),require$$4=require(_0x239a30(0x13e));function _0x4918(_0x11943c,_0x5b303f){_0x11943c=_0x11943c-0xba;const _0x13b916=_0x13b9();let _0x4918fb=_0x13b916[_0x11943c];return _0x4918fb;}function getDefaultExportFromCjs(_0x38a904){const _0x8b3cf9=_0x239a30;return _0x38a904&&_0x38a904[_0x8b3cf9(0x386)]&&Object[_0x8b3cf9(0x284)][_0x8b3cf9(0x25a)]['call'](_0x38a904,_0x8b3cf9(0x21a))?_0x38a904[_0x8b3cf9(0x21a)]:_0x38a904;}var okdb$1={},version=_0x239a30(0x241),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x1f67ce=require$$0;function _0xf548a7(_0x5ad3b0,_0x4b952e){const _0x4ca5f1=_0x4918;return _0x1f67ce[_0x4ca5f1(0x2f7)]('sha256',_0x4b952e)[_0x4ca5f1(0x20c)](_0x5ad3b0)['digest'](_0x4ca5f1(0x339));}function _0x5e1867(_0x5e91f9,_0x374869){const _0xba2bb=_0x4918;if(typeof _0x5e91f9!==_0xba2bb(0x18f)||typeof _0x374869!==_0xba2bb(0x18f))return![];if(Buffer[_0xba2bb(0x1e6)](_0x5e91f9)!==Buffer[_0xba2bb(0x1e6)](_0x374869))return![];return _0x1f67ce[_0xba2bb(0x245)](Buffer[_0xba2bb(0xf2)](_0x5e91f9),Buffer['from'](_0x374869));}function _0x222a4d(_0x392bc6){const _0x57bb49=_0x4918;if(!_0x392bc6?.['startsWith']('Bearer\x20'))return null;return _0x392bc6[_0x57bb49(0x144)](0x7);}function _0x6dedd3(_0x43287b=0x20){const _0x29b084=_0x4918;return _0x1f67ce[_0x29b084(0x2f2)](_0x43287b)[_0x29b084(0x240)]('base64url');}function _0x10d861(_0x2fee42){const _0x46750e=_0x4918;return _0x1f67ce[_0x46750e(0x301)](_0x46750e(0x325))['update'](_0x2fee42)[_0x46750e(0x102)](_0x46750e(0x316));}function _0x3b5cdc(_0x2dd2c0,_0x56fbf0,_0x1883a6=0x36ee80){const _0x5ace5f=_0x4918;if(!_0x56fbf0)throw new Error(_0x5ace5f(0x382));const _0x4f7cf1=Date[_0x5ace5f(0x1f5)](),_0x36c8d8=Buffer[_0x5ace5f(0xf2)](JSON[_0x5ace5f(0x3b7)]({'iat':_0x4f7cf1,'exp':_0x4f7cf1+_0x1883a6,'sub':_0x2dd2c0?.['id']??_0x2dd2c0?.[_0x5ace5f(0x157)]??null,'username':_0x2dd2c0?.[_0x5ace5f(0x352)]??_0x2dd2c0?.[_0x5ace5f(0x30f)]??null,'roles':Array[_0x5ace5f(0x211)](_0x2dd2c0?.['roles'])?_0x2dd2c0[_0x5ace5f(0xe6)]:[]}))['toString'](_0x5ace5f(0x339)),_0xbaf6c=_0xf548a7(_0x36c8d8,_0x56fbf0);return _0x36c8d8+'.'+_0xbaf6c;}function _0x17fdd2(_0x489dc8,_0x235c42){const _0x4cae53=_0x4918;if(!_0x235c42||typeof _0x489dc8!==_0x4cae53(0x18f))return null;const [_0x36c9c1,_0x361580]=_0x489dc8['split']('.');if(!_0x36c9c1||!_0x361580)return null;const _0x5f1c7b=_0xf548a7(_0x36c9c1,_0x235c42);if(!_0x5e1867(_0x361580,_0x5f1c7b))return null;try{const _0x3236ba=JSON[_0x4cae53(0x1a5)](Buffer[_0x4cae53(0xf2)](_0x36c9c1,_0x4cae53(0x339))[_0x4cae53(0x240)]()),_0x8a70a7=0x7530;if(Date[_0x4cae53(0x1f5)]()>Number(_0x3236ba?.[_0x4cae53(0x1cc)]??0x0)+_0x8a70a7)return null;return _0x3236ba;}catch{return null;}}async function _0x7b8b7c(_0x567658){return new Promise((_0x26be42,_0x38bdd5)=>{const _0x48755c=_0x4918,_0x584ee4=_0x1f67ce[_0x48755c(0x2f2)](0x10);_0x1f67ce[_0x48755c(0x298)](_0x567658,_0x584ee4,0x40,(_0x414ff5,_0x519307)=>{const _0x471137=_0x48755c;if(_0x414ff5)_0x38bdd5(_0x414ff5);_0x26be42(_0x584ee4[_0x471137(0x240)](_0x471137(0x316))+':'+_0x519307[_0x471137(0x240)](_0x471137(0x316)));});});}async function _0x32fbf3(_0x134ecb,_0x25cfe2){const _0x4409a4=_0x4918,[_0x55b901,_0x116890]=_0x25cfe2[_0x4409a4(0x311)](':');if(!_0x55b901||!_0x116890)return![];const _0x19c312=Buffer[_0x4409a4(0xf2)](_0x55b901,_0x4409a4(0x316));return new Promise((_0x3ba8fb,_0x49d0d5)=>{const _0x37340e=_0x4409a4;_0x1f67ce[_0x37340e(0x298)](_0x134ecb,_0x19c312,0x40,(_0x23bfd6,_0x5d3665)=>{const _0xbaff3=_0x37340e;if(_0x23bfd6)_0x49d0d5(_0x23bfd6);_0x3ba8fb(_0x1f67ce[_0xbaff3(0x245)](_0x5d3665,Buffer[_0xbaff3(0xf2)](_0x116890,_0xbaff3(0x316))));});});}return okdbAuthTokens={'hmac':_0xf548a7,'timingSafeEqual':_0x5e1867,'parseBearer':_0x222a4d,'randomToken':_0x6dedd3,'hashToken':_0x10d861,'issueToken':_0x3b5cdc,'authenticateToken':_0x17fdd2,'hashPassword':_0x7b8b7c,'verifyPassword':_0x32fbf3},okdbAuthTokens;}function _0x13b9(){const _0x244c2a=['port','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation)\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','index:drop','open\x20','already\x20in\x20use','migrate','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','licensed','License\x20already\x20stored','write','drop','\x20more','Activation\x20invalid:\x20','types\x20--env\x20staging','unique:violation_resolved','fts:drop','Examples','valid','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','ready','\x20documents\x20fail\x20validation','changes','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','decoded','--log-level','expires','cause','\x20log\x20level:\x20','true','\x20\x20(need\x20≥\x2018)','--drop','close','[okdb]\x20nothing\x20to\x20reset\x20—\x20','/types\x0a\x20\x20\x20\x20','limits','LICENSE_FEATURE_DISABLED','fts:','resume','set','[okdb]\x20unknown\x20token\x20action:\x20\x22','\x20\x20✗','<json-body>','ceil','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','permissions','OKDBNotFoundError','LICENSE_ACTIVATION_INVALID','registerType','logRequests','records','stderr','[okdb]\x20reset:\x20','createdAt','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','[okdb]\x20error:\x20failed\x20to\x20read\x20','node','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','stdin','logLevel','randomBytes','\x20\x20\x20\x20licensee:\x20\x20','activateLicense','Foreign\x20key\x20violation:\x20','OKDBForeignKeyDeleteError','createHmac','level','unknown','EXPIRES','yellow','features','includes','ROUTES','index','free\x20tier','createHash','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','[okdb]\x20backing\x20up\x20to\x20','enabled','Index\x20\x22','SIG_INVALID','License\x20signature\x20invalid:\x20','\x20\x20score:','\x20\x20Some\x20checks\x20failed.\x0a','\x20type','listening','call','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','name','LICENSED_BUILD','split','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','derivePin','\x0a\x0a\x20\x20','OKDBSchemaValidationError','hex','fts:reset','[okdb]\x20error:\x20','\x20licenses','\x20SECURITY\x20NOTICE','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','%),\x20','\x20\x20[okdb]\x20','utf8','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','key','import','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','sha256','INVALID_VALUE','getRange','--port','statSync','ftsName','length','status','[okdb]\x20invalid\x20log\x20level:\x20\x22','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','GET','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','created','toLocaleString','\x20\x20[okdb]\x20closed\x20cleanly\x0a','exports','win32','operation','setTtl','7646301fJwSfl','base64url','id:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','\x20\x20Type\x20','active','TYPE_NOT_REGISTERED','\x20\x20(name:\x20','\x0a[okdb]\x20error:\x20','689LMVgtp','address','detachConsole','then','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','\x1b[90m','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','envs','wrong_node','\x20\x20\x20\x20expires:\x20\x20\x20','fromEntries','listRoutes','LICENSE_LIMIT_EXCEEDED','\x20\x20Shell\x20commands','cyan','system:bus_state_change','val','username','failures','\x27\x20doesn\x27t\x20exist','/admin/index.html','targetKey','max','\x1b[33m','\x20\x20@','bus:poke','sync:apply','writeUInt32BE','addedAt','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','PIN','\x20day(s).','7533335rEnhzl','~licenses','sync','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x20\x20\x20http://localhost:','system:ready','\x27\x20already\x20registered','rmSync','summary','has','inputSchema','[okdb]\x20backup\x20complete','details','index:reset','--username','\x20months\x20from\x20issuance)','list','trimStart','typesPerEnv','setPrompt','\x20\x20✓\x20Removed\x20license\x20','repeat','\x20\x20(unlimited)','\x22\x20matches\x20','.okdb-write-test','white','exec','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','127.0.0.1','[okdb]\x20export\x20complete','grants','routes','Token\x20secret\x20not\x20configured','[env]','transaction','OKDBSchemaCollectionError','__esModule','--password','shutting\x20down…\x0a','env:removed','\x20\x20╚═══════════════════════════╝','ref:violation','--address','\x20logs\x20on\x20\x20','Invalid\x20index\x20key\x20type\x20for\x20\x27','history','Queue','--permissions','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','\x1b[0m','clearLine','--ttl','dest','expiry','dbPath','search','token','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','active:','\x20records…','system:poke','\x20bytes,\x20need\x20>=\x2065)','index:progress','dropType','_systemEnv','--name','embeddings','keys/public.pem','getPins','OKDBInvalidValueError','creating',':\x20key\x20[','logs','(none)','expiresAt','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','LICENSE_HASH_MISMATCH','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','argv','transport','processors/','--config','\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/','alloc','put','stringify','magenta','indexes','reverse','noRepl','0123456789ABCDEFGHJKMNPQRSTVWXYZ','No\x20license\x20found\x20matching\x20this\x20activation\x20token','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','dynamic','../okdb','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','clearTtl','allocUnsafe','config','--help','VERSION_MISMATCH','_envs','toLowerCase','\x1b[34m','config\x20file\x20valid:\x20','SIGINT','_licenseHash','env','{}[]:,\x0a\x0d\x09\x20','properties','bold','number','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','schema:set','_isFree','\x0a\x20\x20','\x20deleted','current','LOGS','copy','Admin','\x20to\x20quit.','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','database\x20path\x20writable:\x20','gray','TYPES','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','Unique\x20constraint\x20violated\x20on\x20','envs=','licenseId','sizeBefore','randomUUID','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','./okdb-export.ndjson','PATCH','\x0a\x20\x20\x20\x20','__OKDB_PUB_FINGERPRINT__','env/','\x20\x20\x20\x20admin:\x20http://localhost:','\x20\x20(','type/users/item/alice\x20--env\x20staging','ttl:clear','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','detectInputType','roles','INVALID_INDEX_KEY','open','\x0d[okdb]\x20','isTTY','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','label','OKDBInvalidIndexKeyError','SIGTERM','files','\x20tokens:','OKDBTypeNotRegisteredError','from','LICENSEE','startsWith','config\x20file\x20invalid:\x20','Events','pause','level:\x20info','bus:drain','standard','HELP','\x20\x20Usage:','\x20\x20\x20\x20addedAt:\x20\x20\x20','OKDBAlreadyExistsError','\x20\x20Path\x20access','debug','version','digest','warn','port\x20','.kdb_history','bind','concat','count','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','\x20\x20Usage:\x20','code','view:progress','darwin','resolve','INDEX_NOT_REGISTERED','once','padEnd','map','QUIT','body','\x20\x20skipped=','_computeStatus','catch','\x1b[1m','--env','trim','readline','value','fill','blobs','license','_ensureTokensType','addLicense','\x20\x20✓\x20Revoked\x20token\x20','<path>','[okdb]\x20started\x20in\x20','\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','some','queue/','\x20\x20Error:\x20','\x1b[31m','\x20opening\x20','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x20does\x20not\x20exist','toUpperCase','\x20(must\x20be\x201–65535)','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','blob','min','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','PUBLIC_KEY_PEM','--no-admin','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','platform','[body]','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','okdb','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','_license','INDEX_HAS_CONSUMERS','child_process','/api/','dropping','activation','Type\x20\x27','[okdb]\x20close\x20error:\x20','slice','(add\x20a\x20license\x20first)','\x0a\x20\x20Invalid\x20JSON:\x20','decodeLicenseBlob','handle','\x20\x20Envs:\x20\x20\x20\x20','readFileSync','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','halted',']\x20already\x20maps\x20to\x20\x27','Invalid\x20primary\x20key\x20type:\x20','\x0a\x20\x20okdb\x20doctor\x0a','starting','red','dropSchema','safety','Cannot\x20delete\x20','rawBuf','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','sub','Cannot\x20set\x20enforce\x20schema\x20on\x20','importFromFile','fts','forEach','mkdirSync','licenseHash','method','time','\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','noAdmin','Engines','\x20\x20\x20\x20port:\x20\x20','LICENSE_INVALID','readUInt32BE','\x20\x20\x20\x20usage:\x20\x20\x20','get','\x22\x20to\x20enable\x20it.','http://localhost:','\x20\x20\x20\x20\x20http://localhost:','11369414fQPncM','database\x20path\x20not\x20writable:\x20','errors','keys','\x0a\x20\x20Joining\x20cluster\x20at\x20','auth','[okdb]\x20invalid\x20port:\x20','dropIndex','shutdown','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','\x20\x20✓\x20database\x20opened\x0a','[on|off|level]','toFixed','\x20\x20✓\x20','\x20\x20✓\x20http\x20listening\x20on\x20:','\x0a\x20\x20✓\x20Token\x20created','--log-requests','targetType','./okdb-data','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','\x1b[37m','16fxEGHQ','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','(null)','types/env=','Environments','readUInt8','\x22\x20→\x20','txn:rollback','onLicenseExpired','reset','\x20\x20Common\x20causes:','130044WgNyDn','message','LABEL','string','info','init','\x20\x20→\x20\x20','item:update','children','pin','--types','\x27\x20on\x20type\x20\x27','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','schema:drop','other','.kdbconfig','expired','[okdb]\x20loaded\x20config:\x20','POST','type/users/query\x20{\x22active\x22:true}','--key','\x20\x20(licensee:\x20','Hint:\x20','invalid','find','parse','effective','Indexes','\x20\x20·\x20\x20','system:drain','\x0a[okdb]\x20received\x20','typeSubDbs','data','okdb.pid','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','node:crypto','stopping','path','\x20\x20✓\x20OKDB\x20server\x20running','indexOf','Sync','\x0a\x20\x20License\x20details:','[okdb]\x20exporting\x20blobs…','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','meta','[okdb]\x20error:\x20--password\x20requires\x20--name','\x20for\x20commands,\x20','env/staging/info','\x20\x20\x20\x20permissions:\x20','remove','transport:\x20','100728tTNJPR','verify','export','index:registered','sizeAfter','replace','\x20MB\x20→\x20','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','type','\x20active\x20env:\x20','tags','ENVS','index:ready','exp','assertFeature','every','boolean','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','EXIT','PERMISSIONS','indexToDb','finally','sort','10nvfWJo','licensee','(no\x20types)','stack','existsSync','\x20\x20Flags','Files','--no-repl','doctor','--open','prompt','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','OKDBError','homedir','item:create','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','byteLength','uuid','Invalid\x20activation\x20token:\x20','line','writeUInt8','\x20\x20All\x20checks\x20passed.\x0a','verifyActivation','hasType','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','PUB_FINGERPRINT','18390009vJziVO','maxWrites','[okdb]\x20created\x20.kdbconfig','createInterface','env:opened','now','dim','\x20MB)','\x20\x20Tier:\x20\x20\x20\x20','hint','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','6fKMiPf','green','EADDRINUSE','application/json','values','started','\x27\x20is\x20already\x20registered','recheck','\x20writes\x20(','registerIndex','emit','filter','type:drop','OKDBInvalidPrimaryKeyError','unlinkSync','txn:end','listen','update','/type/users/item/alice\x0a\x20\x20\x20\x20','\x20records','question','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','isArray','pending','off','\x1b[32m','resetIndex','[okdb]\x20exported\x20\x20types=','~tokens','PUT','start\x20','default','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','system:clock_change','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','timeMachine','\x20not\x20found','server','\x20/\x20','syncPeers','files/','constructor','writeFileSync','kind','param','exit','writes=','license:invalid','engines','padStart','/api/env/','\x20\x20Writes:\x20\x20','Build\x20expects\x20public\x20key\x20fingerprint\x20','\x20\x20\x20\x20license:\x20','20OsIsRW','1520842tUEAEn','--label','options','toISOString','sig','resetting','dropFts','LICENSE_EXPIRED_ACTION','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','--env\x20<name>','object','(unset)','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','toString','1.8.15','selfAddress','admin','listLicenses','timingSafeEqual','getSecurityNotices','charCodeAt','item:remove','\x1b[35m','\x20\x20\x20\x20\x20\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','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','\x20\x20\x20\x20limits:\x20\x20\x20\x20','licenseType','hidden','\x20already\x20in\x20use','Embeddings','--version','password','\x20references\x20','error','\x0d[okdb]\x20blobs:\x20','2ukCbGS','\x1b[2m','help','equals','hasOwnProperty','ttl:expired','\x20\x20\x20\x20graceful\x20shutdown\x0a','OKDBUniqueConstraintError','decodeActivationToken','\x27:\x20','backup','\x20\x20\x20\x20\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/','system:stopped','keys:','__writeCounter','[okdb]\x20exporting\x20env\x20\x22','\x20\x20\x20\x20','queue','stdout','waiting','Shutting\x20down\x20due\x20to\x20license\x20expiry','--token','events','test','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','issuedAt','log','[okdb]\x20port\x20','dirname','isFeatureEnabled','[okdb]\x20imported\x20\x20types=','Version\x20mismatch\x20for\x20','views','join','resetFts','columns','floor','\x20in\x20','\x20\x20\x20\x20\x20\x20','types','round','ACTIVATION_EXPIRED','_active','OKDBIndexNotRegisteredError','pid','endsWith','prototype','ttl','ttl:set','type/users\x20--help','--changes','env/:env','[okdb]\x20opening\x20','--path','--grants','\x22\x20(must\x20be\x20debug|info|warn|error)','stopped','Schema\x20validation\x20failed\x20for\x20','crypto','reason','assertLimit','access','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','description','\x20\x20\x20\x20features:\x20\x20','scrypt','terminal','VERB','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','api','\x20\x20⚠\x20\x20','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','SIGBREAK','node\x20','INDEX_ALREADY_REGISTERED','/api','createServer','title','\x22\x20is\x20used\x20by:\x20','entries','\x20\x20records=','[okdb]\x20blobs:\x20imported=','license:activated','idx:','mcp','push','unique:violation','importBlobs','\x20\x20\x20\x20writes:\x20\x20\x20\x20','No\x20tokens.','http','writeUInt16BE','DELETE','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'];_0x13b9=function(){return _0x244c2a;};return _0x13b9();}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x2fe675=_0x239a30;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x403d9a=require$$0$1,_0x1d9953=_0x2fe675(0x3bc),_0x12c16f=new Uint8Array(0x100)[_0x2fe675(0x11d)](0xff);for(let _0x1acb35=0x0;_0x1acb35<_0x1d9953[_0x2fe675(0x32b)];_0x1acb35++){_0x12c16f[_0x1d9953['charCodeAt'](_0x1acb35)]=_0x1acb35,_0x12c16f[_0x1d9953[_0x2fe675(0x247)](_0x1acb35)+0x20]=_0x1acb35;}_0x12c16f['O'[_0x2fe675(0x247)](0x0)]=0x0,_0x12c16f['o'[_0x2fe675(0x247)](0x0)]=0x0,_0x12c16f['I'[_0x2fe675(0x247)](0x0)]=0x1,_0x12c16f['i'['charCodeAt'](0x0)]=0x1,_0x12c16f['L'['charCodeAt'](0x0)]=0x1,_0x12c16f['l'[_0x2fe675(0x247)](0x0)]=0x1;function _0x4c4f7b(_0xe04656){let _0x2167c8=0x0,_0xc21e6c=0x0,_0x3ac065='';for(let _0x4e2fe9=0x0;_0x4e2fe9<_0xe04656['length'];_0x4e2fe9++){_0xc21e6c=_0xc21e6c<<0x8|_0xe04656[_0x4e2fe9],_0x2167c8+=0x8;while(_0x2167c8>=0x5){_0x2167c8-=0x5,_0x3ac065+=_0x1d9953[_0xc21e6c>>>_0x2167c8&0x1f];}}return _0x2167c8>0x0&&(_0x3ac065+=_0x1d9953[_0xc21e6c<<0x5-_0x2167c8&0x1f]),_0x3ac065;}function _0xeadbc3(_0x23b80b){const _0x270aec=_0x2fe675;_0x23b80b=_0x23b80b['replace'](/-/g,'')[_0x270aec(0x12e)]();let _0x1df158=0x0,_0x5624a9=0x0;const _0x148ac6=[];for(let _0x3e1b8d=0x0;_0x3e1b8d<_0x23b80b[_0x270aec(0x32b)];_0x3e1b8d++){const _0x2a7d97=_0x12c16f[_0x23b80b[_0x270aec(0x247)](_0x3e1b8d)];if(_0x2a7d97===0xff)continue;_0x5624a9=_0x5624a9<<0x5|_0x2a7d97,_0x1df158+=0x5,_0x1df158>=0x8&&(_0x1df158-=0x8,_0x148ac6[_0x270aec(0x2ad)](_0x5624a9>>>_0x1df158&0xff));}return Buffer['from'](_0x148ac6);}const _0x46d879=[_0x2fe675(0x363),_0x2fe675(0x3a4),_0x2fe675(0x22c),_0x2fe675(0x15a),'timeMachine',_0x2fe675(0x276),_0x2fe675(0x2ac),_0x2fe675(0xef)],_0x11753b=0x0,_0x4c64f3=0x1,_0x2fd5d1=0x2,_0x5d6d5c=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0xdf8083({issuedAt:_0x59245e,expiresAt:_0x2ce872,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x11753b}){const _0x173387=_0x2fe675,_0x54e932=Buffer[_0x173387(0xf2)](licensee,'utf8')[_0x173387(0x144)](0x0,0x40),_0xffcfd0=0x1+0x1+0x4+0x4+0x1+_0x54e932['length']+0x2+0x10,_0x158cb9=Buffer['allocUnsafe'](_0xffcfd0);let _0x58a42c=0x0;_0x158cb9[_0x173387(0x1ea)](0x1,_0x58a42c++),_0x158cb9[_0x173387(0x1ea)](licenseType,_0x58a42c++),_0x158cb9[_0x173387(0x35c)](Math['floor'](_0x59245e/0x3e8),_0x58a42c),_0x58a42c+=0x4,_0x158cb9[_0x173387(0x35c)](Math[_0x173387(0x27a)](_0x2ce872/0x3e8),_0x58a42c),_0x58a42c+=0x4,_0x158cb9[_0x173387(0x1ea)](_0x54e932[_0x173387(0x32b)],_0x58a42c++),_0x54e932[_0x173387(0xcd)](_0x158cb9,_0x58a42c),_0x58a42c+=_0x54e932['length'];let _0x17db8c=0x0;for(let _0x4447f1=0x0;_0x4447f1<_0x46d879[_0x173387(0x32b)];_0x4447f1++){if(features[_0x46d879[_0x4447f1]])_0x17db8c|=0x1<<_0x4447f1;}_0x158cb9[_0x173387(0x2b3)](_0x17db8c,_0x58a42c),_0x58a42c+=0x2;const _0x1d513f=[_0x173387(0x348),_0x173387(0x373),_0x173387(0x223),'maxWrites'];for(const _0x567069 of _0x1d513f){_0x158cb9[_0x173387(0x35c)](limits[_0x567069]||0x0,_0x58a42c),_0x58a42c+=0x4;}return _0x158cb9;}function _0x57ac96(_0x295bcf){const _0x24a1e1=_0x2fe675;let _0x3b8324=0x0;const _0x289a34=_0x295bcf[_0x24a1e1(0x186)](_0x3b8324++),_0x5c504f=_0x295bcf[_0x24a1e1(0x186)](_0x3b8324++),_0x26e3ef=_0x295bcf[_0x24a1e1(0x165)](_0x3b8324);_0x3b8324+=0x4;const _0x51e5c5=_0x295bcf['readUInt32BE'](_0x3b8324);_0x3b8324+=0x4;const _0x3d2077=_0x295bcf['readUInt8'](_0x3b8324++),_0x16ede1=_0x295bcf[_0x24a1e1(0x144)](_0x3b8324,_0x3b8324+_0x3d2077)[_0x24a1e1(0x240)]('utf8');_0x3b8324+=_0x3d2077;const _0x1f2cf1=_0x295bcf['readUInt16BE'](_0x3b8324);_0x3b8324+=0x2;const _0x3eaab2={};for(let _0x32655f=0x0;_0x32655f<_0x46d879[_0x24a1e1(0x32b)];_0x32655f++){_0x3eaab2[_0x46d879[_0x32655f]]=Boolean(_0x1f2cf1&0x1<<_0x32655f);}const _0x453079=[_0x24a1e1(0x348),_0x24a1e1(0x373),_0x24a1e1(0x223),_0x24a1e1(0x1f1)],_0x34e51b={};for(const _0x2d4129 of _0x453079){const _0x1b6aa6=_0x295bcf[_0x24a1e1(0x165)](_0x3b8324);_0x3b8324+=0x4,_0x34e51b[_0x2d4129]=_0x1b6aa6===0x0?null:_0x1b6aa6;}return{'v':_0x289a34,'licenseType':_0x5c504f,'issuedAt':_0x26e3ef*0x3e8,'expiresAt':_0x51e5c5*0x3e8,'licensee':_0x16ede1,'features':_0x3eaab2,'limits':_0x34e51b};}function _0x1a2e7c(_0x2c8d4a,_0x28bbdc){const _0x52dceb=_0x2fe675,_0xd388d4=Buffer[_0x52dceb(0x107)]([_0x2c8d4a,_0x28bbdc]),_0x262588=_0x4c4f7b(_0xd388d4),_0x55bf35=[];for(let _0x2cf642=0x0;_0x2cf642<_0x262588[_0x52dceb(0x32b)];_0x2cf642+=0x8){_0x55bf35[_0x52dceb(0x2ad)](_0x262588[_0x52dceb(0x144)](_0x2cf642,_0x2cf642+0x8));}return _0x55bf35['join']('-');}function _0xf0eedf(_0xcb3533){const _0x44e8e7=_0x2fe675;if(typeof _0xcb3533!=='string')throw new Error(_0x44e8e7(0x29b));const _0x3a1e4c=_0xeadbc3(_0xcb3533['replace'](/-/g,''));if(_0x3a1e4c[_0x44e8e7(0x32b)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x3a1e4c[_0x44e8e7(0x32b)]+_0x44e8e7(0x39f));const _0x1fc52f=_0x3a1e4c[_0x44e8e7(0x144)](0x0,_0x3a1e4c[_0x44e8e7(0x32b)]-0x40),_0x4a67ed=_0x3a1e4c['slice'](_0x3a1e4c['length']-0x40);let _0x27905c;try{_0x27905c=_0x57ac96(_0x1fc52f);}catch(_0x59de3e){throw new Error(_0x44e8e7(0x320)+_0x59de3e[_0x44e8e7(0x18d)]);}return{'rawBuf':_0x3a1e4c,'payload':_0x1fc52f,'sig':_0x4a67ed,'decoded':_0x27905c};}function _0x1d084f(_0x315eb2){const _0xbf408b=_0x2fe675;return _0x403d9a[_0xbf408b(0x301)]('sha256')[_0xbf408b(0x20c)](_0x315eb2)['digest']()[_0xbf408b(0x144)](0x0,0x8);}function _0x2f30a1(_0x4a42e4,_0x56013e,_0xd4c8ee){const _0x1b9a31=_0x2fe675,_0x11fda5='OKDB-PIN-V1:'+_0xd4c8ee,_0x44ad3a=Buffer[_0x1b9a31(0x107)]([Buffer['from'](_0x4a42e4,_0x1b9a31(0x31f)),_0x56013e]),_0x3d3d5b=_0x403d9a[_0x1b9a31(0x2f7)](_0x1b9a31(0x325),_0x11fda5)['update'](_0x44ad3a)[_0x1b9a31(0x102)](),_0x160f1f=_0x4c4f7b(_0x3d3d5b[_0x1b9a31(0x144)](0x0,0x5));return{'pin':_0x160f1f,'pinHmac':_0x3d3d5b};}function _0x3a269b(_0x5214be,_0x13694d,_0x4e6346){const _0x2663f7=_0x2fe675,_0x31bb7a=Buffer['allocUnsafe'](0x4d);let _0x5bf8e0=0x0;_0x31bb7a[_0x2663f7(0x1ea)](0x1,_0x5bf8e0++),_0x5214be[_0x2663f7(0xcd)](_0x31bb7a,_0x5bf8e0),_0x5bf8e0+=0x8,_0x31bb7a[_0x2663f7(0x35c)](_0x13694d,_0x5bf8e0),_0x5bf8e0+=0x4,_0x4e6346[_0x2663f7(0xcd)](_0x31bb7a,_0x5bf8e0);const _0x157e04=_0x4c4f7b(_0x31bb7a),_0x13f6b6=[];for(let _0x174628=0x0;_0x174628<_0x157e04[_0x2663f7(0x32b)];_0x174628+=0x6){_0x13f6b6[_0x2663f7(0x2ad)](_0x157e04[_0x2663f7(0x144)](_0x174628,_0x174628+0x6));}return _0x13f6b6[_0x2663f7(0x277)]('-');}function _0x230189(_0x1d4f86){const _0x59d6f2=_0x2fe675;if(typeof _0x1d4f86!==_0x59d6f2(0x18f))throw new Error(_0x59d6f2(0x2cd));const _0x581cbb=_0xeadbc3(_0x1d4f86[_0x59d6f2(0x1c4)](/-/g,''));if(_0x581cbb[_0x59d6f2(0x32b)]!==0x4d)throw new Error(_0x59d6f2(0xda)+_0x581cbb[_0x59d6f2(0x32b)]);let _0x32f964=0x0;const _0x3bc879=_0x581cbb['readUInt8'](_0x32f964++),_0x423d68=_0x581cbb['slice'](_0x32f964,_0x32f964+0x8);_0x32f964+=0x8;const _0x4b07aa=_0x581cbb[_0x59d6f2(0x165)](_0x32f964);_0x32f964+=0x4;const _0x2741ce=_0x581cbb[_0x59d6f2(0x144)](_0x32f964);return{'v':_0x3bc879,'licenseHash':_0x423d68,'expiry':_0x4b07aa,'sig':_0x2741ce};}function _0x46346c({tokenString:_0x161bd1,nodeId:_0x5ef0d9,rawBlobBuf:_0x5b4709,pubKeyPem:_0x292897,pubFingerprint:_0x436258}){const _0xcaf3fb=_0x2fe675;let _0x8c6095;try{_0x8c6095=_0x230189(_0x161bd1);}catch(_0x105600){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x3ef13e=_0x1d084f(_0x5b4709);if(!_0x3ef13e[_0xcaf3fb(0x259)](_0x8c6095[_0xcaf3fb(0x15d)]))return{'valid':![],'reason':_0xcaf3fb(0x3ae)};const {pinHmac:_0x46c7f2}=_0x2f30a1(_0x5ef0d9,_0x3ef13e,_0x436258),_0x9c1ac7=Buffer[_0xcaf3fb(0x3c3)](0x4);_0x9c1ac7[_0xcaf3fb(0x35c)](_0x8c6095[_0xcaf3fb(0x397)],0x0);const _0xad079e=Buffer[_0xcaf3fb(0x107)]([Buffer[_0xcaf3fb(0xf2)]([_0x8c6095['v']]),_0x46c7f2[_0xcaf3fb(0x144)](0x0,0x5),_0x8c6095[_0xcaf3fb(0x15d)],_0x9c1ac7]);try{const _0xd448c7=_0x403d9a[_0xcaf3fb(0x1c0)](null,_0xad079e,_0x292897,_0x8c6095['sig']);if(!_0xd448c7)return{'valid':![],'reason':_0xcaf3fb(0x306)};}catch(_0x5e8d92){return{'valid':![],'reason':_0xcaf3fb(0x306)};}if(_0x8c6095[_0xcaf3fb(0x397)]<Date[_0xcaf3fb(0x1f5)]()/0x3e8)return{'valid':![],'reason':_0xcaf3fb(0x27f)};return{'valid':!![],'reason':'ok'};}function _0x5cd78c(_0x1e5f26){const _0x10bfd9=_0x2fe675;if(typeof _0x1e5f26!==_0x10bfd9(0x18f))return _0x10bfd9(0x2f9);const _0x15479b=_0x1e5f26['trim']();if(_0x15479b[_0x10bfd9(0xf4)]('/')||_0x15479b[_0x10bfd9(0xf4)]('./')||_0x15479b['startsWith']('../')||/^[A-Za-z]:[\\/]/[_0x10bfd9(0x26d)](_0x15479b))return _0x10bfd9(0x1b1);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x10bfd9(0x26d)](_0x15479b))return'uuid';const _0x3433b4=_0x15479b[_0x10bfd9(0x1c4)](/[\s-]+/g,'')['length'];if(_0x3433b4===0x7c)return _0x10bfd9(0x141);if(_0x3433b4>=0x95&&_0x3433b4<=0xfc)return _0x10bfd9(0x131);return _0x10bfd9(0x2f9);}return okdbLicenseCodec={'toBase32':_0x4c4f7b,'fromBase32':_0xeadbc3,'encodeLicensePayload':_0xdf8083,'decodeLicensePayload':_0x57ac96,'encodeLicenseBlob':_0x1a2e7c,'decodeLicenseBlob':_0xf0eedf,'licenseHash':_0x1d084f,'derivePin':_0x2f30a1,'encodeActivationToken':_0x3a269b,'decodeActivationToken':_0x230189,'verifyActivation':_0x46346c,'detectInputType':_0x5cd78c,'FEATURE_NAMES':_0x46d879,'LICENSE_TYPE_STANDARD':_0x11753b,'LICENSE_TYPE_OPEN':_0x4c64f3,'LICENSE_TYPE_INTERNAL':_0x2fd5d1,'OPEN_LICENSE_MAX_DURATION_MS':_0x5d6d5c},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x27c005 extends Error{constructor(_0x22dc61,_0x4bef2b,_0x2d0917={}){const _0x1084bd=_0x4918;super(_0x22dc61),this[_0x1084bd(0x30f)]=_0x1084bd(0x1e2),this[_0x1084bd(0x10b)]=_0x4bef2b,this[_0x1084bd(0x36d)]=_0x2d0917,_0x2d0917[_0x1084bd(0x2d1)]&&(this[_0x1084bd(0x2d1)]=_0x2d0917[_0x1084bd(0x2d1)]),Error['captureStackTrace'](this,this[_0x1084bd(0x225)]);}}class _0x414dc1 extends _0x27c005{constructor(_0x4dcb40,_0x22c342,_0x21b000,_0x2cfc9b){const _0x1d269c=_0x4918;super(_0x1d269c(0x275)+_0x4dcb40+'@'+_0x22c342+':\x20expected\x20'+_0x21b000+',\x20got\x20'+_0x2cfc9b,_0x1d269c(0xba),{'type':_0x4dcb40,'key':_0x22c342,'expectedVersion':_0x21b000,'actualVersion':_0x2cfc9b}),this[_0x1d269c(0x30f)]='OKDBVersionMismatchError';}}class _0x45b744 extends _0x27c005{constructor(_0x81053d,_0x2dc9a1){const _0x245b57=_0x4918;super(_0x81053d+'@'+_0x2dc9a1+'\x20does\x20not\x20exist','NOT_FOUND',{'type':_0x81053d,'key':_0x2dc9a1}),this[_0x245b57(0x30f)]=_0x245b57(0x2e4);}}class _0x3a76a3 extends _0x27c005{constructor(_0x721c90,_0xc0a8c7){const _0x18c481=_0x4918;super(_0x721c90+'@'+_0xc0a8c7+'\x20already\x20exists','ALREADY_EXISTS',{'type':_0x721c90,'key':_0xc0a8c7}),this['name']=_0x18c481(0xfe);}}class _0x525adb extends _0x27c005{constructor(_0x5eb684,_0x1a87a7){const _0x289574=_0x4918,_0x4a7c59=typeof _0x1a87a7;super(_0x289574(0x38e)+_0x5eb684+_0x289574(0x25f)+_0x4a7c59+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x1a87a7,_0x289574(0xe7),{'index':_0x5eb684,'key':_0x1a87a7,'keyType':_0x4a7c59}),this[_0x289574(0x30f)]=_0x289574(0xed);}}class _0x34ff1e extends _0x27c005{constructor(_0x2ffbe2){const _0x22340e=_0x4918,_0x1de3fe=typeof _0x2ffbe2;super(_0x22340e(0x14e)+_0x1de3fe+_0x22340e(0x12b)+_0x2ffbe2,'INVALID_PRIMARY_KEY',{'key':_0x2ffbe2,'keyType':_0x1de3fe}),this[_0x22340e(0x30f)]=_0x22340e(0x208);}}class _0x5901b4 extends _0x27c005{constructor(_0x2f3308){const _0x3ca10e=_0x4918;super(_0x3ca10e(0x142)+_0x2f3308+_0x3ca10e(0x354),_0x3ca10e(0x33e),{'type':_0x2f3308}),this['name']=_0x3ca10e(0xf1);}}class _0x2f29b8 extends _0x27c005{constructor(_0x5a621b){const _0x27bd0f=_0x4918;super(_0x27bd0f(0x142)+_0x5a621b+_0x27bd0f(0x367),'TYPE_ALREADY_REGISTERED',{'type':_0x5a621b}),this['name']='OKDBTypeAlreadyRegisteredError';}}class _0xe4c00a extends _0x27c005{constructor(_0x1dbee5,_0x51fb61){const _0x333877=_0x4918;super('Index\x20\x27'+_0x51fb61+_0x333877(0x197)+_0x1dbee5+_0x333877(0x354),_0x333877(0x10f),{'type':_0x1dbee5,'index':_0x51fb61}),this[_0x333877(0x30f)]=_0x333877(0x281);}}class _0x30e08f extends _0x27c005{constructor(_0x1cb174,_0x1dc2ca){const _0x2b3cca=_0x4918;super('Index\x20\x27'+_0x1dc2ca+_0x2b3cca(0x197)+_0x1cb174+_0x2b3cca(0x201),_0x2b3cca(0x2a2),{'type':_0x1cb174,'index':_0x1dc2ca}),this['name']='OKDBIndexAlreadyRegisteredError';}}class _0x1676bd extends _0x27c005{constructor(_0x20a144,_0x5c2b56={}){const _0x45f0ce=_0x4918;super(_0x20a144,_0x45f0ce(0x326),_0x5c2b56),this['name']=_0x45f0ce(0x3a7);}}class _0x455801 extends _0x27c005{constructor(_0x7d31cc,_0x1e70d5,_0x1aad2e,_0x22b3de,_0x45c327){const _0x55a719=_0x4918;super(_0x55a719(0xd5)+_0x7d31cc+'@'+_0x1e70d5+_0x55a719(0x3a9)+_0x1aad2e+_0x55a719(0x14d)+_0x22b3de+'\x27,\x20cannot\x20map\x20to\x20\x27'+_0x45c327+'\x27','UNIQUE_CONSTRAINT',{'type':_0x7d31cc,'index':_0x1e70d5,'indexKey':_0x1aad2e,'existingKey':_0x22b3de,'conflictingKey':_0x45c327}),this['name']=_0x55a719(0x25d);}}class _0x5db5a1 extends _0x27c005{constructor(_0x23d21d,_0x39fe9f,_0x99a8ce){const _0xc4f7bf=_0x4918;super(_0xc4f7bf(0x28f)+_0x23d21d+'@'+_0x39fe9f,'SCHEMA_VALIDATION_FAILED',{'type':_0x23d21d,'key':_0x39fe9f,'errors':_0x99a8ce}),this[_0xc4f7bf(0x30f)]=_0xc4f7bf(0x315),this['type']=_0x23d21d,this[_0xc4f7bf(0x321)]=_0x39fe9f,this[_0xc4f7bf(0x16d)]=_0x99a8ce;}}class _0x2142f6 extends _0x27c005{constructor(_0x2bfcbf,_0xbb20f5){const _0x4123cd=_0x4918;super(_0x4123cd(0x158)+_0x2bfcbf+':\x20'+_0xbb20f5['length']+_0x4123cd(0x2cb),'SCHEMA_COLLECTION_INVALID',{'type':_0x2bfcbf,'failures':_0xbb20f5}),this['name']=_0x4123cd(0x385),this[_0x4123cd(0x1c7)]=_0x2bfcbf,this[_0x4123cd(0x353)]=_0xbb20f5;}}class _0x44664c extends _0x27c005{constructor(_0x4c6cdb,_0x5ee653,_0x9e5a12,_0x4bf24c,_0x25a80b){const _0x53f070=_0x4918;super(_0x53f070(0x2f5)+_0x4c6cdb+'@'+_0x5ee653+'.'+_0x9e5a12+_0x53f070(0x253)+_0x4bf24c+'@'+_0x25a80b+'\x20which\x20does\x20not\x20exist','FOREIGN_KEY_VIOLATION',{'sourceType':_0x4c6cdb,'sourceKey':_0x5ee653,'fieldPath':_0x9e5a12,'targetType':_0x4bf24c,'targetKey':_0x25a80b}),this['name']='OKDBForeignKeyError',this['sourceType']=_0x4c6cdb,this['sourceKey']=_0x5ee653,this['fieldPath']=_0x9e5a12,this[_0x53f070(0x17c)]=_0x4bf24c,this['targetKey']=_0x25a80b;}}class _0x1353e1 extends _0x27c005{constructor(_0x1f650d,_0xa74db1,_0x12eb36){const _0xbfad38=_0x4918;super(_0xbfad38(0x154)+_0x1f650d+'@'+_0xa74db1+':\x20'+_0x12eb36[_0xbfad38(0x32b)]+_0xbfad38(0x156),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x1f650d,'targetKey':_0xa74db1,'references':_0x12eb36}),this[_0xbfad38(0x30f)]=_0xbfad38(0x2f6),this[_0xbfad38(0x17c)]=_0x1f650d,this[_0xbfad38(0x356)]=_0xa74db1,this['references']=_0x12eb36;}}class _0x286fa1 extends _0x27c005{constructor(_0x368cfb,_0x2a2396,_0x366fe0){const _0x49c3cc=_0x4918;super(_0x49c3cc(0x305)+_0x2a2396+'\x22\x20on\x20\x22'+_0x368cfb+_0x49c3cc(0x2a6)+_0x366fe0['map'](_0x153309=>_0x153309[_0x49c3cc(0x227)]+':'+_0x153309[_0x49c3cc(0x30f)])[_0x49c3cc(0x277)](',\x20'),_0x49c3cc(0x13d),{'type':_0x368cfb,'index':_0x2a2396,'usedBy':_0x366fe0}),this[_0x49c3cc(0x30f)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x27c005,'OKDBVersionMismatchError':_0x414dc1,'OKDBNotFoundError':_0x45b744,'OKDBAlreadyExistsError':_0x3a76a3,'OKDBInvalidIndexKeyError':_0x525adb,'OKDBInvalidPrimaryKeyError':_0x34ff1e,'OKDBTypeNotRegisteredError':_0x5901b4,'OKDBTypeAlreadyRegisteredError':_0x2f29b8,'OKDBIndexNotRegisteredError':_0xe4c00a,'OKDBIndexAlreadyRegisteredError':_0x30e08f,'OKDBInvalidValueError':_0x1676bd,'OKDBUniqueConstraintError':_0x455801,'OKDBSchemaValidationError':_0x5db5a1,'OKDBSchemaCollectionError':_0x2142f6,'OKDBForeignKeyError':_0x44664c,'OKDBForeignKeyDeleteError':_0x1353e1,'OKDBIndexHasConsumersError':_0x286fa1},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x266338=_0x239a30;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x433bf1={'PUT':'put','REMOVE':_0x266338(0x1bd),'INDEX_DROP':_0x266338(0x172),'INDEX_REGISTER':_0x266338(0x204),'INDEX_RESET':_0x266338(0x215),'TYPE_REGISTER':_0x266338(0x2e6),'TYPE_DROP':_0x266338(0x3a1),'FTS_REGISTER':'registerFts','FTS_DROP':_0x266338(0x239),'FTS_RESET':_0x266338(0x278),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x266338(0x152),'TTL_SET':_0x266338(0x337),'TTL_CLEAR':_0x266338(0x3c2)},_0x4ac231={'SYSTEM_READY':_0x266338(0x366),'SYSTEM_STOPPED':_0x266338(0x262),'SYSTEM_CLOCK_CHANGE':_0x266338(0x21d),'SYSTEM_POKE':_0x266338(0x39e),'SYSTEM_DRAIN':_0x266338(0x1a9),'SYSTEM_BUS_STATE_CHANGE':_0x266338(0x350),'ITEM_CREATE':_0x266338(0x1e4),'ITEM_UPDATE':_0x266338(0x193),'ITEM_REMOVE':_0x266338(0x248),'INDEX_RESET':_0x266338(0x36e),'INDEX_READY':_0x266338(0x1cb),'INDEX_PROGRESS':_0x266338(0x3a0),'VIEW_PROGRESS':_0x266338(0x10c),'INDEX_DROP':_0x266338(0x2b9),'INDEX_REGISTERED':_0x266338(0x1c2),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x266338(0x2c6),'FTS_RESET':_0x266338(0x317),'SCHEMA_SET':_0x266338(0xc7),'SCHEMA_DROP':_0x266338(0x199),'UNIQUE_VIOLATION':_0x266338(0x2ae),'UNIQUE_VIOLATION_RESOLVED':_0x266338(0x2c5),'REF_VIOLATION':_0x266338(0x38b),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x266338(0x35b),'TXN_START':'txn:start','TXN_END':_0x266338(0x20a),'TXN_ROLLBACK':_0x266338(0x188),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x266338(0x207),'ENV_OPENED':_0x266338(0x1f4),'ENV_REMOVED':_0x266338(0x389),'TTL_EXPIRED':_0x266338(0x25b),'TTL_SET':_0x266338(0x286),'TTL_CLEAR':_0x266338(0xe3),'LICENSE_INVALID':_0x266338(0x22b),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x266338(0x2aa),'LICENSE_REMOVED':'license:removed'},_0x5e1167={'CREATING':_0x266338(0x3a8),'RESETTING':'resetting','READY':_0x266338(0x2ca),'DROPPING':_0x266338(0x140),'WAITING':_0x266338(0x269)},_0x23dc2f={'CREATED':_0x266338(0x331),'STARTING':_0x266338(0x150),'STARTED':_0x266338(0x200),'STOPPING':_0x266338(0x1b0),'STOPPED':_0x266338(0x28e)},_0x2dc392={'CREATING':_0x266338(0x3a8),'READY':_0x266338(0x2ca),'HALTED':_0x266338(0x14c),'STOPPED':'stopped','RESETTING':_0x266338(0x238)},_0x396767=Object['freeze']({'POKE':_0x266338(0x35a),'DRAIN':_0x266338(0xf9)});return okdbEnums={'BUS_EVENTS':_0x396767,'CHANGE_ACTIONS':_0x433bf1,'EVENTS':_0x4ac231,'INDEX_STATE':_0x5e1167,'OKDB_STATE':_0x23dc2f,'VIEW_STATE':_0x2dc392},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0xd99516=_0x239a30;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x388581=require$$1,_0x4951ac=require$$1$1,_0x2f11d5=require$$0,_0x5b642f=_0x388581[_0xd99516(0x14a)](_0x4951ac[_0xd99516(0x277)](__dirname,_0xd99516(0x3a5)),_0xd99516(0x31f))[_0xd99516(0x11a)](),_0x2dc51b=_0x2f11d5['createPublicKey'](_0x5b642f)[_0xd99516(0x1c1)]({'type':'spki','format':'der'}),_0x5a6a57=_0x2f11d5[_0xd99516(0x301)](_0xd99516(0x325))[_0xd99516(0x20c)](_0x2dc51b)['digest']('hex')[_0xd99516(0x144)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x5b642f,'PUB_FINGERPRINT':_0x5a6a57},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x4cf916=_0x239a30;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x338d3e=require$$0,{OKDBError:_0x5edebb}=requireOkdbError(),{EVENTS:_0x523b71}=requireOkdbEnums(),_0x2ef3ca=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x46bac9,LICENSE_TYPE_INTERNAL:_0xdf1904,OPEN_LICENSE_MAX_DURATION_MS:_0x36ad35}=_0x2ef3ca,_0x14c768=requireOkdbPubkey(),_0x308313={'LICENSED_BUILD':'true','PUBLIC_KEY_PEM':_0x14c768[_0x4cf916(0x134)],'PUB_FINGERPRINT':_0x14c768['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':'log'},_0x41e3fe=_0x4cf916(0x362),_0x66befe={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x3a212e(_0x4a169a){const _0x1175d7=_0x4cf916;!_0x4a169a['hasType'](_0x41e3fe)&&await _0x4a169a[_0x1175d7(0x2e6)](_0x41e3fe);}class _0xe8abfc{constructor(_0x576785){const _0x27401c=_0x4cf916;this[_0x27401c(0x13a)]=_0x576785,this[_0x27401c(0x280)]=null;}async['reload'](){const _0x1386a5=_0x4cf916,_0x220a12=this[_0x1386a5(0x13a)][_0x1386a5(0x3a2)];if(!_0x220a12||!_0x220a12[_0x1386a5(0x1ed)](_0x41e3fe)){this[_0x1386a5(0x280)]=null;return;}const _0x40a035=this[_0x1386a5(0x13a)]['id'];let _0x2ee98a=null;for(const {key:_0x321672,value:_0x10ddaa}of _0x220a12[_0x1386a5(0x327)](_0x41e3fe)){const _0x7561a4=this[_0x1386a5(0x116)](_0x10ddaa,_0x40a035);_0x7561a4==='active'&&!_0x2ee98a&&(_0x2ee98a={..._0x10ddaa,'id':_0x321672,'status':_0x7561a4});}this[_0x1386a5(0x280)]=_0x2ee98a;if(this['_active']&&this[_0x1386a5(0x280)][_0x1386a5(0x24d)]===_0x46bac9){const _0x5b11bf=Math['ceil']((this[_0x1386a5(0x280)][_0x1386a5(0x3ac)]-Date['now']())/0x5265c00);this[_0x1386a5(0x13a)]['log']?.[_0x1386a5(0x103)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x5b11bf+'\x20day(s).',{'feature':'license','licensee':this[_0x1386a5(0x280)][_0x1386a5(0x1d7)],'expiresAt':new Date(this[_0x1386a5(0x280)][_0x1386a5(0x3ac)])[_0x1386a5(0x236)]()});}this['_active']&&this[_0x1386a5(0x280)][_0x1386a5(0x24d)]===_0xdf1904&&this[_0x1386a5(0x13a)][_0x1386a5(0x270)]?.[_0x1386a5(0x103)](_0x1386a5(0x1e5),{'feature':_0x1386a5(0x11f),'licensee':this[_0x1386a5(0x280)][_0x1386a5(0x1d7)]});}[_0x4cf916(0x116)](_0x51cff2,_0x5bb6ad){const _0x40516e=_0x4cf916;if(!_0x51cff2[_0x40516e(0x131)])return _0x40516e(0x1a3);let _0x252570;try{_0x252570=_0x2ef3ca[_0x40516e(0x147)](_0x51cff2['blob']);}catch(_0x40331a){return _0x40516e(0x1a3);}try{const _0x51ced7=_0x338d3e[_0x40516e(0x1c0)](null,_0x252570['payload'],_0x308313[_0x40516e(0x134)],_0x252570[_0x40516e(0x237)]);if(!_0x51ced7)return'invalid';}catch(_0x24cf24){return _0x40516e(0x1a3);}if(_0x252570[_0x40516e(0x2ce)][_0x40516e(0x24d)]===_0xdf1904)return _0x40516e(0x33d);if(_0x252570['decoded']['expiresAt']<=Date['now']())return _0x40516e(0x19c);if(_0x252570[_0x40516e(0x2ce)][_0x40516e(0x24d)]===_0x46bac9)return _0x40516e(0x33d);if(!_0x51cff2['activation'])return _0x40516e(0x212);const _0xe54823=_0x2ef3ca[_0x40516e(0x1ec)]({'tokenString':_0x51cff2[_0x40516e(0x141)],'nodeId':_0x5bb6ad,'rawBlobBuf':_0x252570[_0x40516e(0x155)],'pubKeyPem':_0x308313['PUBLIC_KEY_PEM'],'pubFingerprint':_0x308313[_0x40516e(0x1ef)]});if(_0xe54823['reason']==='LICENSE_HASH_MISMATCH'||_0xe54823[_0x40516e(0x291)]===_0x40516e(0x306))return _0x40516e(0x349);if(_0xe54823[_0x40516e(0x291)]==='ACTIVATION_EXPIRED')return _0x40516e(0x19c);if(!_0xe54823[_0x40516e(0x2c8)])return _0x40516e(0x349);return'active';}get[_0x4cf916(0x33d)](){const _0x2d5b8a=_0x4cf916;return this[_0x2d5b8a(0x280)];}get['effective'](){const _0x5e3503=_0x4cf916;return this[_0x5e3503(0x280)]??_0x66befe;}[_0x4cf916(0x1cd)](_0x477a22){const _0x403658=_0x4cf916;if(_0x308313[_0x403658(0x310)]!==_0x403658(0x2d3))return;const _0x4f6f95=this[_0x403658(0x1a6)];if(!_0x4f6f95['features']?.[_0x477a22]){const _0xe846f9=_0x4f6f95[_0x403658(0xc8)]?_0x403658(0x24b)+_0x477a22+_0x403658(0x1c6)+_0x477a22+_0x403658(0x168):'Feature\x20not\x20licensed:\x20'+_0x477a22+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x477a22+'\x22.';throw new _0x5edebb(_0xe846f9,_0x403658(0x2da),{'feature':_0x477a22});}}[_0x4cf916(0x273)](_0x40afc4){const _0x5161db=_0x4cf916;if(_0x308313[_0x5161db(0x310)]!==_0x5161db(0x2d3))return!![];return!!this[_0x5161db(0x1a6)][_0x5161db(0x2fc)]?.[_0x40afc4];}[_0x4cf916(0x292)](_0x44ffd6,_0x5b8f71){const _0x144067=_0x4cf916;if(_0x308313['LICENSED_BUILD']!==_0x144067(0x2d3))return;const _0xeae076=this[_0x144067(0x1a6)],_0x34015c=_0xeae076[_0x144067(0x2d9)]?.[_0x44ffd6];if(_0x34015c===null||_0x34015c===undefined||_0x34015c===0x0)return;if(_0x5b8f71>=_0x34015c)throw new _0x5edebb('License\x20limit\x20exceeded:\x20'+_0x44ffd6+'\x20('+_0x5b8f71+'/'+_0x34015c+')',_0x144067(0x34d),{'limit':_0x44ffd6,'current':_0x5b8f71,'max':_0x34015c});}async[_0x4cf916(0x121)](_0xf908c6){const _0x25884d=_0x4cf916;let _0x20386d;try{_0x20386d=_0x2ef3ca[_0x25884d(0x147)](_0xf908c6);}catch(_0x2ffe88){throw new _0x5edebb('Invalid\x20license\x20blob:\x20'+_0x2ffe88[_0x25884d(0x18d)],_0x25884d(0x164));}let _0x4f0304;try{_0x4f0304=_0x338d3e[_0x25884d(0x1c0)](null,_0x20386d['payload'],_0x308313[_0x25884d(0x134)],_0x20386d[_0x25884d(0x237)]);}catch(_0x4f39ca){throw new _0x5edebb(_0x25884d(0x307)+_0x4f39ca['message'],_0x25884d(0x164));}if(!_0x4f0304)throw new _0x5edebb(_0x25884d(0x29e)+(_0x25884d(0x230)+_0x308313[_0x25884d(0x1ef)]+'.\x20')+_0x25884d(0x1d0),'LICENSE_INVALID',{'expectedFingerprint':_0x308313[_0x25884d(0x1ef)]});if(_0x20386d['decoded'][_0x25884d(0x24d)]===_0x46bac9){const _0x16afdb=_0x20386d[_0x25884d(0x2ce)][_0x25884d(0x3ac)]-_0x20386d[_0x25884d(0x2ce)][_0x25884d(0x26f)];if(_0x16afdb>_0x36ad35)throw new _0x5edebb(_0x25884d(0x2b7)+Math[_0x25884d(0x2e1)](_0x16afdb/(0x1e*0x5265c00))+_0x25884d(0x370),'LICENSE_INVALID');}const _0xdb1744=this[_0x25884d(0x13a)][_0x25884d(0x3a2)];await _0x3a212e(_0xdb1744);const _0x1e602d=_0x2ef3ca['licenseHash'](_0x20386d[_0x25884d(0x155)])[_0x25884d(0x240)](_0x25884d(0x316));for(const {value:_0x164911}of _0xdb1744[_0x25884d(0x327)](_0x41e3fe)){if(_0x164911[_0x25884d(0xc0)]===_0x1e602d)throw new _0x5edebb(_0x25884d(0x2bf),_0x25884d(0x164));}const _0x1b8dfd=_0x338d3e[_0x25884d(0xd9)](),_0x240561={'blob':_0xf908c6,'activation':null,'addedAt':Date[_0x25884d(0x1f5)](),'_licenseHash':_0x1e602d,'licensee':_0x20386d[_0x25884d(0x2ce)]['licensee'],'expiresAt':_0x20386d[_0x25884d(0x2ce)][_0x25884d(0x3ac)],'features':_0x20386d[_0x25884d(0x2ce)][_0x25884d(0x2fc)],'limits':_0x20386d[_0x25884d(0x2ce)][_0x25884d(0x2d9)],'licenseType':_0x20386d[_0x25884d(0x2ce)][_0x25884d(0x24d)]};return await _0xdb1744[_0x25884d(0x3b6)](_0x41e3fe,_0x1b8dfd,_0x240561),{'id':_0x1b8dfd,..._0x240561};}async[_0x4cf916(0x2f4)](_0x2f4d76){const _0x16c11b=_0x4cf916;let _0x1c89e8;try{_0x1c89e8=_0x2ef3ca[_0x16c11b(0x25e)](_0x2f4d76);}catch(_0x5cbbca){throw new _0x5edebb(_0x16c11b(0x1e8)+_0x5cbbca[_0x16c11b(0x18d)],_0x16c11b(0x2e5));}const _0x3e6226=_0x1c89e8[_0x16c11b(0x15d)][_0x16c11b(0x240)](_0x16c11b(0x316)),_0x2789ca=this[_0x16c11b(0x13a)][_0x16c11b(0x3a2)];if(!_0x2789ca||!_0x2789ca[_0x16c11b(0x1ed)](_0x41e3fe))throw new _0x5edebb(_0x16c11b(0x3bd),_0x16c11b(0x2e5));let _0x2952af=null,_0x4bbef9=null;for(const {key:_0x2697c4,value:_0x41d6f5}of _0x2789ca[_0x16c11b(0x327)](_0x41e3fe)){if(_0x41d6f5[_0x16c11b(0xc0)]===_0x3e6226){_0x2952af=_0x2697c4,_0x4bbef9=_0x41d6f5;break;}}if(!_0x2952af)throw new _0x5edebb(_0x16c11b(0x3bd),_0x16c11b(0x2e5));const {rawBuf:_0x7c0ac7}=_0x2ef3ca[_0x16c11b(0x147)](_0x4bbef9['blob']),_0x30500a=_0x2ef3ca[_0x16c11b(0x1ec)]({'tokenString':_0x2f4d76,'nodeId':this['okdb']['id'],'rawBlobBuf':_0x7c0ac7,'pubKeyPem':_0x308313[_0x16c11b(0x134)],'pubFingerprint':_0x308313[_0x16c11b(0x1ef)]});if(!_0x30500a[_0x16c11b(0x2c8)])throw new _0x5edebb(_0x16c11b(0x2c3)+_0x30500a[_0x16c11b(0x291)],_0x16c11b(0x2e5),{'reason':_0x30500a[_0x16c11b(0x291)]});const _0x453238={..._0x4bbef9,'activation':_0x2f4d76};return await _0x2789ca[_0x16c11b(0x20c)](_0x41e3fe,_0x2952af,_0x453238),{'id':_0x2952af,..._0x453238};}async['removeLicense'](_0x5ce02b){const _0x53e372=_0x4cf916,_0x4cc34e=this[_0x53e372(0x13a)][_0x53e372(0x3a2)];if(!_0x4cc34e||!_0x4cc34e[_0x53e372(0x1ed)](_0x41e3fe))return;await _0x4cc34e['remove'](_0x41e3fe,_0x5ce02b);}async[_0x4cf916(0x244)](){const _0x53be76=_0x4cf916,_0x11d0e4=this[_0x53be76(0x13a)][_0x53be76(0x3a2)];if(!_0x11d0e4||!_0x11d0e4[_0x53be76(0x1ed)](_0x41e3fe))return[];const _0x3ff783=this[_0x53be76(0x13a)]['id'],_0x4da542=[];for(const {key:_0x511761,value:_0x355dc5}of _0x11d0e4[_0x53be76(0x327)](_0x41e3fe)){const _0x5f4225=this['_computeStatus'](_0x355dc5,_0x3ff783);_0x4da542[_0x53be76(0x2ad)]({..._0x355dc5,'id':_0x511761,'status':_0x5f4225});}return _0x4da542;}[_0x4cf916(0x3a6)](){const _0x3eea11=_0x4cf916,_0x9344ea=this[_0x3eea11(0x13a)][_0x3eea11(0x3a2)];if(!_0x9344ea||!_0x9344ea[_0x3eea11(0x1ed)](_0x41e3fe))return[];const _0x208d80=this['okdb']['id'],_0x91a198=[];for(const {key:_0x399930,value:_0x58c805}of _0x9344ea[_0x3eea11(0x327)](_0x41e3fe)){if(_0x58c805[_0x3eea11(0xc0)]){if(_0x58c805['licenseType']===_0x46bac9)_0x91a198['push']({'licenseId':_0x399930,'pin':null});else{const _0x9b893f=Buffer[_0x3eea11(0xf2)](_0x58c805[_0x3eea11(0xc0)],_0x3eea11(0x316)),{pin:_0x5dcc7f}=_0x2ef3ca[_0x3eea11(0x313)](_0x208d80,_0x9b893f,_0x308313[_0x3eea11(0x1ef)]);_0x91a198[_0x3eea11(0x2ad)]({'licenseId':_0x399930,'pin':_0x5dcc7f});}}}return _0x91a198;}async[_0x4cf916(0x202)](){const _0x52d73d=_0x4cf916,_0x522f80=this['_active'];await this['reload']();if(this[_0x52d73d(0x280)]&&this[_0x52d73d(0x280)][_0x52d73d(0x24d)]===_0x46bac9){const _0x50aac2=Math[_0x52d73d(0x2e1)]((this[_0x52d73d(0x280)][_0x52d73d(0x3ac)]-Date[_0x52d73d(0x1f5)]())/0x5265c00);this['okdb'][_0x52d73d(0x270)]?.[_0x52d73d(0x103)](_0x52d73d(0xd4)+_0x50aac2+_0x52d73d(0x360),{'feature':_0x52d73d(0x11f),'licensee':this[_0x52d73d(0x280)][_0x52d73d(0x1d7)],'expiresAt':new Date(this[_0x52d73d(0x280)]['expiresAt'])[_0x52d73d(0x236)]()});}this[_0x52d73d(0x280)]&&this['_active'][_0x52d73d(0x24d)]===_0xdf1904&&this[_0x52d73d(0x13a)][_0x52d73d(0x270)]?.[_0x52d73d(0x103)](_0x52d73d(0x1e5),{'feature':_0x52d73d(0x11f),'licensee':this[_0x52d73d(0x280)]['licensee']});if(_0x522f80&&!this['_active']){this[_0x52d73d(0x13a)][_0x52d73d(0x270)]?.[_0x52d73d(0x103)]('License\x20expired\x20or\x20invalidated',{'feature':_0x52d73d(0x11f)}),this['okdb'][_0x52d73d(0x26c)]?.[_0x52d73d(0x205)](_0x523b71[_0x52d73d(0x164)],{'previous':_0x522f80});const _0x497db7=this['okdb'][_0x52d73d(0x235)]?.[_0x52d73d(0x189)]??_0x308313[_0x52d73d(0x23a)];_0x497db7===_0x52d73d(0x173)&&(this[_0x52d73d(0x13a)][_0x52d73d(0x270)]?.[_0x52d73d(0x254)](_0x52d73d(0x26a),{'feature':_0x52d73d(0x11f)}),this[_0x52d73d(0x13a)][_0x52d73d(0x2d6)]()[_0x52d73d(0x117)](()=>{})[_0x52d73d(0x1d4)](()=>process['exit'](0x1)));}}}return okdbLicense={'LicenseChecker':_0xe8abfc,'_C':_0x308313},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x3ca3a4=_0x239a30;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x535cf0=require$$0$2,_0x2c04a6=require$$1,_0x237f42=require$$2$1,_0x2a8f49=require$$1$1,_0x17a0b6=_0x2a8f49['join'](_0x237f42[_0x3ca3a4(0x1e3)](),_0x3ca3a4(0x105)),_0x45c497=0x3e8,_0x35bd9c={'reset':_0x3ca3a4(0x393),'bold':_0x3ca3a4(0x118),'dim':_0x3ca3a4(0x257),'red':_0x3ca3a4(0x129),'green':_0x3ca3a4(0x214),'yellow':_0x3ca3a4(0x358),'blue':_0x3ca3a4(0xbd),'magenta':_0x3ca3a4(0x249),'cyan':'\x1b[36m','white':_0x3ca3a4(0x180),'gray':_0x3ca3a4(0x346)},_0x4bb71a=!process[_0x3ca3a4(0x268)][_0x3ca3a4(0xea)]||!!process.env.NO_COLOR,_0xa66a3f=(_0x34d508,_0x21a7c8)=>_0x4bb71a?_0x21a7c8:''+_0x34d508+_0x21a7c8+_0x35bd9c[_0x3ca3a4(0x18a)],_0x28f6b9={'error':_0x35bd9c[_0x3ca3a4(0x151)],'warn':_0x35bd9c['yellow'],'info':_0x35bd9c[_0x3ca3a4(0x34f)],'debug':_0x35bd9c[_0x3ca3a4(0xd2)]},_0x21e39f={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x5b5ce4(_0x18c9c0,_0x31ffdf='info'){const _0x36f28c=_0x3ca3a4,{level:_0x1b8f07,msg:_0x4156e7,meta:_0x4461fc,context:_0x15d0dc,ts:_0x578830}=_0x18c9c0;if((_0x21e39f[_0x1b8f07]??0x1)<(_0x21e39f[_0x31ffdf]??0x1))return;const _0x5584c4=_0xa66a3f(_0x35bd9c[_0x36f28c(0xd2)],new Date(_0x578830)[_0x36f28c(0x236)]()),_0x1d60c5=_0xa66a3f(_0x28f6b9[_0x1b8f07]??_0x35bd9c[_0x36f28c(0x37a)],_0x1b8f07[_0x36f28c(0x111)](0x5));let _0x7c1afa='\x20\x20'+_0x5584c4+'\x20'+_0xa66a3f(_0x35bd9c[_0x36f28c(0xc4)],_0x1d60c5)+'\x20'+_0x4156e7;if(_0x4461fc&&Object[_0x36f28c(0x16e)](_0x4461fc)[_0x36f28c(0x32b)]>0x0){const _0xb21bb8=Object[_0x36f28c(0x2a7)](_0x4461fc)[_0x36f28c(0x112)](([_0x468c1d,_0x5a4886])=>_0x468c1d+'='+_0x5a4886)['join']('\x20');_0x7c1afa+=_0xa66a3f(_0x35bd9c[_0x36f28c(0x1f6)],'\x20\x20['+_0xb21bb8+']');}if(_0x15d0dc!==undefined){const _0x3c2744=typeof _0x15d0dc===_0x36f28c(0x23d)?JSON[_0x36f28c(0x3b7)](_0x15d0dc):String(_0x15d0dc);_0x7c1afa+=_0xa66a3f(_0x35bd9c[_0x36f28c(0x1f6)],'\x20\x20'+_0x3c2744);}const _0x5cba98=_0x1b8f07===_0x36f28c(0x254)||_0x1b8f07==='warn'?process[_0x36f28c(0x2e9)][_0x36f28c(0x2c0)][_0x36f28c(0x106)](process['stderr']):process[_0x36f28c(0x268)]['write']['bind'](process['stdout']);_0x5cba98(_0x7c1afa+'\x0a');}function _0xf87905(_0x578427,_0x3b56df){const _0x3413b4=_0x3ca3a4;if(_0x578427===0xcc||_0x578427>=0xc8&&_0x578427<0x12c&&!_0x3b56df){console[_0x3413b4(0x270)](_0x3413b4(0xc9)+_0xa66a3f(_0x35bd9c['green'],'✓')+'\x0a');return;}if(_0x578427>=0x190||_0x3b56df?.['error']){const _0x5db543=_0x3b56df?.[_0x3413b4(0x254)]??_0x3b56df?.['message']??'HTTP\x20'+_0x578427;console[_0x3413b4(0x270)]('\x0a\x20\x20'+_0xa66a3f(_0x35bd9c['red'],'✗')+'\x20'+_0xa66a3f(_0x35bd9c[_0x3413b4(0xc4)]+_0x35bd9c[_0x3413b4(0x151)],String(_0x578427))+'\x20\x20'+_0x5db543+'\x0a');return;}const _0x317080=Object[_0x3413b4(0x284)][_0x3413b4(0x25a)][_0x3413b4(0x30c)](_0x3b56df??{},'result')?_0x3b56df['result']:_0x3b56df,_0x1344f8=_0x3b56df?.[_0x3413b4(0x1b8)];console[_0x3413b4(0x270)](''),_0x15f096(_0x317080,'\x20\x20');if(_0x1344f8?.[_0x3413b4(0x108)]!=null||_0x1344f8?.[_0x3413b4(0x15f)]!=null){const _0x2e028b=[];if(_0x1344f8['count']!=null)_0x2e028b[_0x3413b4(0x2ad)](_0x1344f8['count']+'\x20result'+(_0x1344f8[_0x3413b4(0x108)]!==0x1?'s':''));if(_0x1344f8['time']!=null)_0x2e028b[_0x3413b4(0x2ad)](_0x1344f8[_0x3413b4(0x15f)]+'ms');console['log'](_0x3413b4(0xc9)+_0xa66a3f(_0x35bd9c[_0x3413b4(0x1f6)],_0x2e028b[_0x3413b4(0x277)](_0x3413b4(0x1a8))));}console[_0x3413b4(0x270)]('');}function _0x15f096(_0x1a8a33,_0x548542=''){const _0x313764=_0x3ca3a4;if(_0x1a8a33===null||_0x1a8a33===undefined){console[_0x313764(0x270)](_0x548542+_0xa66a3f(_0x35bd9c[_0x313764(0x1f6)],_0x313764(0x183)));return;}if(Array[_0x313764(0x211)](_0x1a8a33)){if(_0x1a8a33[_0x313764(0x32b)]===0x0){console[_0x313764(0x270)](_0x548542+_0xa66a3f(_0x35bd9c[_0x313764(0x1f6)],'(empty)'));return;}if(_0x1a8a33[_0x313764(0x1ce)](_0x26b1a4=>_0x26b1a4&&typeof _0x26b1a4===_0x313764(0x23d)&&_0x313764(0x321)in _0x26b1a4&&_0x313764(0x11c)in _0x26b1a4)){_0xc429b9(_0x1a8a33,_0x548542);return;}if(_0x1a8a33[_0x313764(0x1ce)](_0x116887=>_0x116887&&typeof _0x116887==='object'&&_0x313764(0x1c7)in _0x116887&&'count'in _0x116887)){_0x1ebec0(_0x1a8a33,_0x548542);return;}if(_0x1a8a33['every'](_0x470c0b=>typeof _0x470c0b!==_0x313764(0x23d)||_0x470c0b===null)){_0x1a8a33[_0x313764(0x15b)]((_0x29495b,_0x574ee9)=>console[_0x313764(0x270)](_0x548542+_0xa66a3f(_0x35bd9c[_0x313764(0xd2)],_0x574ee9+0x1+'.')+'\x20'+_0xa66a3f(_0x35bd9c[_0x313764(0x37a)],String(_0x29495b))));return;}_0x1a8a33[_0x313764(0x15b)]((_0x1f5e6c,_0x3b2b57)=>{const _0x244db9=_0x313764;console[_0x244db9(0x270)](_0x548542+_0xa66a3f(_0x35bd9c[_0x244db9(0x1f6)],'['+_0x3b2b57+']'));if(typeof _0x1f5e6c==='object'&&_0x1f5e6c!==null)_0x1019c2(_0x1f5e6c,_0x548542+'\x20\x20');else console[_0x244db9(0x270)](_0x548542+'\x20\x20'+String(_0x1f5e6c));});return;}if(typeof _0x1a8a33===_0x313764(0x23d)){if(_0x313764(0x321)in _0x1a8a33&&_0x313764(0x11c)in _0x1a8a33&&Object[_0x313764(0x16e)](_0x1a8a33)[_0x313764(0x32b)]<=0x3){console['log'](_0x548542+_0xa66a3f(_0x35bd9c[_0x313764(0xc4)]+_0x35bd9c[_0x313764(0x34f)],String(_0x1a8a33[_0x313764(0x321)])));const _0x5da718=_0x1a8a33[_0x313764(0x11c)];if(_0x5da718&&typeof _0x5da718==='object')_0x1019c2(_0x5da718,_0x548542);else console[_0x313764(0x270)](_0x548542+_0xa66a3f(_0x35bd9c[_0x313764(0x37a)],String(_0x5da718)));return;}_0x1019c2(_0x1a8a33,_0x548542);return;}console[_0x313764(0x270)](_0x548542+_0xa66a3f(_0x35bd9c['white'],String(_0x1a8a33)));}function _0x1019c2(_0x24d3e3,_0x179555=''){const _0xa7d083=_0x3ca3a4,_0x5bbdd9=Object[_0xa7d083(0x2a7)](_0x24d3e3);if(_0x5bbdd9['length']===0x0){console[_0xa7d083(0x270)](_0x179555+_0xa66a3f(_0x35bd9c[_0xa7d083(0x1f6)],'{}'));return;}const _0x2f10ca=Math[_0xa7d083(0x132)](0x1c,Math['max'](..._0x5bbdd9[_0xa7d083(0x112)](([_0xc296a1])=>_0xc296a1[_0xa7d083(0x32b)])));for(const [_0x5081fe,_0x8b970b]of _0x5bbdd9){const _0xcbc3b4=_0xa66a3f(_0x35bd9c[_0xa7d083(0x34f)],_0x5081fe[_0xa7d083(0x111)](_0x2f10ca));if(_0x8b970b===null||_0x8b970b===undefined)console['log'](_0x179555+_0xcbc3b4+'\x20\x20'+_0xa66a3f(_0x35bd9c[_0xa7d083(0x1f6)],'null'));else{if(typeof _0x8b970b===_0xa7d083(0x23d)){const _0x2f8424=JSON[_0xa7d083(0x3b7)](_0x8b970b);_0x2f8424[_0xa7d083(0x32b)]<=0x50?console['log'](_0x179555+_0xcbc3b4+'\x20\x20'+_0xa66a3f(_0x35bd9c[_0xa7d083(0x1f6)],_0x2f8424)):(console[_0xa7d083(0x270)](_0x179555+_0xcbc3b4),_0x15f096(_0x8b970b,_0x179555+'\x20\x20'));}else{const _0x52e03a=typeof _0x8b970b===_0xa7d083(0x1cf)?_0xa66a3f(_0x8b970b?_0x35bd9c[_0xa7d083(0x1fc)]:_0x35bd9c[_0xa7d083(0x2fb)],String(_0x8b970b)):typeof _0x8b970b===_0xa7d083(0xc5)?_0xa66a3f(_0x35bd9c[_0xa7d083(0x3b8)],String(_0x8b970b)):_0xa66a3f(_0x35bd9c[_0xa7d083(0x37a)],String(_0x8b970b));console[_0xa7d083(0x270)](_0x179555+_0xcbc3b4+'\x20\x20'+_0x52e03a);}}}}function _0xc429b9(_0x1603cb,_0xca8a06=''){const _0x1c176c=_0x3ca3a4,_0x184dd1=Math[_0x1c176c(0x132)](0x20,Math[_0x1c176c(0x357)](..._0x1603cb[_0x1c176c(0x112)](_0x11a2d9=>String(_0x11a2d9[_0x1c176c(0x321)])['length'])));for(const {key:_0x48897d,value:_0x20f6fd,score:_0x509bda,clock:_0x461a87}of _0x1603cb){const _0x20a038=_0xa66a3f(_0x35bd9c[_0x1c176c(0xc4)]+_0x35bd9c[_0x1c176c(0x34f)],String(_0x48897d)[_0x1c176c(0x111)](_0x184dd1)),_0x34dc26=_0x20f6fd==null?_0xa66a3f(_0x35bd9c[_0x1c176c(0x1f6)],'null'):typeof _0x20f6fd===_0x1c176c(0x23d)?_0xa66a3f(_0x35bd9c[_0x1c176c(0x1f6)],JSON['stringify'](_0x20f6fd)):_0xa66a3f(_0x35bd9c[_0x1c176c(0x37a)],String(_0x20f6fd)),_0x390ede=_0x509bda!=null?_0xa66a3f(_0x35bd9c['gray'],_0x1c176c(0x308)+_0x509bda['toFixed'](0x4)):'',_0xec5700=_0x461a87!=null?_0xa66a3f(_0x35bd9c['gray'],_0x1c176c(0x359)+_0x461a87):'';console[_0x1c176c(0x270)](_0xca8a06+_0x20a038+'\x20\x20'+_0x34dc26+_0x390ede+_0xec5700);}}function _0x1ebec0(_0x167295,_0x50b70c=''){const _0x1de693=_0x3ca3a4,_0x3ef48e=Math[_0x1de693(0x132)](0x20,Math['max'](..._0x167295[_0x1de693(0x112)](_0x2f7576=>_0x2f7576[_0x1de693(0x1c7)][_0x1de693(0x32b)])));for(const {type:_0x1a53ff,count:_0x59981f,fields:_0x364ad1}of _0x167295){if(_0x1a53ff[_0x1de693(0xf4)]('~'))continue;const _0x419c2d=_0xa66a3f(_0x35bd9c[_0x1de693(0xc4)]+_0x35bd9c[_0x1de693(0x34f)],_0x1a53ff[_0x1de693(0x111)](_0x3ef48e)),_0x17848d=_0xa66a3f(_0x35bd9c[_0x1de693(0x3b8)],String(_0x59981f)[_0x1de693(0x22d)](0x6))+_0xa66a3f(_0x35bd9c[_0x1de693(0x1f6)],_0x1de693(0x20e)),_0x410c33=_0x364ad1&&Object['keys'](_0x364ad1)[_0x1de693(0x32b)]?_0xa66a3f(_0x35bd9c['dim'],'\x20\x20·\x20'+Object[_0x1de693(0x16e)](_0x364ad1)[_0x1de693(0x144)](0x0,0x6)['join'](',\x20')+(Object[_0x1de693(0x16e)](_0x364ad1)[_0x1de693(0x32b)]>0x6?'…':'')):'';console[_0x1de693(0x270)](_0x50b70c+_0x419c2d+'\x20\x20'+_0x17848d+_0x410c33);}}const _0x2ad0a7=[_0x3ca3a4(0x27d),'type/',_0x3ca3a4(0x127),_0x3ca3a4(0x224),_0x3ca3a4(0x384),_0x3ca3a4(0x3b2)];function _0x5ed241(_0x140aad,_0x352857){const _0x476c0d=_0x3ca3a4;if(_0x140aad['startsWith'](_0x476c0d(0x13f)))return _0x140aad;if(_0x140aad[_0x476c0d(0xf4)]('/'))return'/api'+_0x140aad;if(_0x140aad[_0x476c0d(0xf4)](_0x476c0d(0xdf)))return'/api/'+_0x140aad;const _0x2788b8=_0x2ad0a7[_0x476c0d(0x126)](_0x1f24dc=>_0x140aad===_0x1f24dc[_0x476c0d(0x1c4)](/\/$/,'')||_0x140aad[_0x476c0d(0xf4)](_0x1f24dc));return _0x2788b8?_0x476c0d(0x22e)+_0x352857+'/'+_0x140aad:_0x476c0d(0x13f)+_0x140aad;}function _0x30580b(_0x10cf01){const _0x11af6a=_0x3ca3a4,_0x24f2de={},_0x19479c=[];let _0x143339=0x0;while(_0x143339<_0x10cf01['length']){if((_0x10cf01[_0x143339]===_0x11af6a(0x119)||_0x10cf01[_0x143339]==='-e')&&_0x10cf01[_0x143339+0x1]&&!_0x10cf01[_0x143339+0x1][_0x11af6a(0xf4)]('-'))_0x24f2de['env']=_0x10cf01[++_0x143339];else _0x10cf01[_0x143339]===_0x11af6a(0x3c5)||_0x10cf01[_0x143339]==='-h'?_0x24f2de[_0x11af6a(0x258)]=!![]:_0x19479c[_0x11af6a(0x2ad)](_0x10cf01[_0x143339]);_0x143339++;}return{'flags':_0x24f2de,'rest':_0x19479c};}const _0x4b250e={'system':'System','envs':_0x3ca3a4(0x185),'types':'Types','data':'Records','indexes':_0x3ca3a4(0x1a7),'fts':'Full-text\x20search','sync':_0x3ca3a4(0x1b4),'queue':_0x3ca3a4(0x390),'files':_0x3ca3a4(0x1dc),'embeddings':_0x3ca3a4(0x250),'engines':_0x3ca3a4(0x162),'admin':_0x3ca3a4(0xce),'event':_0x3ca3a4(0xf6),'processor':'Processors'},_0x1decd7=['system',_0x3ca3a4(0x348),_0x3ca3a4(0x27d),_0x3ca3a4(0x1ac),_0x3ca3a4(0x3b9),'fts',_0x3ca3a4(0x363),_0x3ca3a4(0x267),_0x3ca3a4(0xef),_0x3ca3a4(0x3a4),'engines',_0x3ca3a4(0x243)];function _0xa47c4f(_0x50df32){const _0x3d2543=_0x3ca3a4;return _0x50df32[_0x3d2543(0x1c4)](/^\/api/,'')[_0x3d2543(0x1c4)](/^\[\/env\/:env=[^\]]*\]/,_0x3d2543(0x383))[_0x3d2543(0x1c4)](/^\/env\/:env/,_0x3d2543(0x289))[_0x3d2543(0x1c4)](/^\//,'');}function _0x25a477(_0x2ce3c5,_0x566d8c=''){const _0x43b778=_0x3ca3a4,_0x4c0611=_0x2ce3c5[_0x43b778(0x2b2)]['listRoutes']()[_0x43b778(0x206)](_0x2f891b=>!_0x2f891b[_0x43b778(0x1b8)]?.[_0x43b778(0x24e)]),_0x5e69f8=_0x566d8c?_0x4c0611['filter'](_0x406ab5=>_0x406ab5[_0x43b778(0x1b1)][_0x43b778(0xbc)]()[_0x43b778(0x2fd)](_0x566d8c[_0x43b778(0xbc)]())||(_0xc5239f(_0x406ab5)??'')['toLowerCase']()['includes'](_0x566d8c['toLowerCase']())||_0x3a8570(_0x406ab5)[_0x43b778(0x126)](_0x63e93f=>_0x63e93f['toLowerCase']()['includes'](_0x566d8c[_0x43b778(0xbc)]()))):_0x4c0611;if(!_0x5e69f8[_0x43b778(0x32b)]){console[_0x43b778(0x270)](_0xa66a3f(_0x35bd9c[_0x43b778(0x2fb)],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x566d8c+'\x22\x0a'));return;}const _0x28527e=new Map();for(const _0x3b83e8 of _0x5e69f8){const _0x3efd65=_0x3a8570(_0x3b83e8)[0x0]??_0x43b778(0x19a);if(!_0x28527e[_0x43b778(0x36a)](_0x3efd65))_0x28527e[_0x43b778(0x2dd)](_0x3efd65,[]);_0x28527e['get'](_0x3efd65)[_0x43b778(0x2ad)](_0x3b83e8);}const _0x3b70dc=[..._0x1decd7[_0x43b778(0x206)](_0x43fae1=>_0x28527e[_0x43b778(0x36a)](_0x43fae1)),...[..._0x28527e['keys']()][_0x43b778(0x206)](_0x5d8006=>!_0x1decd7[_0x43b778(0x2fd)](_0x5d8006))];console[_0x43b778(0x270)]('');for(const _0x531692 of _0x3b70dc){const _0x5a0642=_0x28527e['get'](_0x531692);if(!_0x5a0642?.[_0x43b778(0x32b)])continue;console[_0x43b778(0x270)](_0xa66a3f(_0x35bd9c['bold'],'\x20\x20'+(_0x4b250e[_0x531692]??_0x531692)));for(const _0x44c118 of _0x5a0642){const _0x39d117=_0xa66a3f(_0x35bd9c['magenta'],_0x44c118[_0x43b778(0x15e)][_0x43b778(0x111)](0x7)),_0x3abeb6=_0xa66a3f(_0x35bd9c['cyan'],_0xa47c4f(_0x44c118[_0x43b778(0x1b1)])),_0x40ac25=_0xc5239f(_0x44c118)?_0xa66a3f(_0x35bd9c[_0x43b778(0x1f6)],'\x20\x20'+_0xc5239f(_0x44c118)):'',_0x6ded71=_0x44c118[_0x43b778(0x336)]?.['id']?_0xa66a3f(_0x35bd9c['gray'],'\x20\x20['+_0x44c118[_0x43b778(0x336)]['id']+']'):'';console[_0x43b778(0x270)](_0x43b778(0x266)+_0x39d117+'\x20'+_0x3abeb6+_0x40ac25+_0x6ded71);}console[_0x43b778(0x270)]('');}}function _0x3e4d4b(_0x4dda0d,_0x200161){const _0x2bd85b=_0x3ca3a4,_0x1a1c8e=_0x200161[_0x2bd85b(0x1c4)](/^\/api(\/env\/[^/]+)?\//,'')[_0x2bd85b(0x311)]('/')[0x0],_0x344316=_0x4dda0d[_0x2bd85b(0x2b2)][_0x2bd85b(0x34c)]()[_0x2bd85b(0x206)](_0x2dbbc1=>_0x2dbbc1[_0x2bd85b(0x1b1)][_0x2bd85b(0xbc)]()['includes'](_0x1a1c8e['toLowerCase']()));if(!_0x344316['length']){console[_0x2bd85b(0x270)](_0xa66a3f(_0x35bd9c[_0x2bd85b(0x2fb)],_0x2bd85b(0x21c)+_0x200161+'\x0a'));return;}console['log']('');for(const _0xccebdc of _0x344316[_0x2bd85b(0x144)](0x0,0xc)){for(const _0x48a7e5 of _0x3ffdd9(_0xccebdc)){console[_0x2bd85b(0x270)](_0x48a7e5);}console['log']('');}}function _0xc5239f(_0x4eba17){const _0xa20c49=_0x3ca3a4;return _0x4eba17[_0xa20c49(0x336)]?.[_0xa20c49(0x369)]??_0x4eba17[_0xa20c49(0x1b8)]?.[_0xa20c49(0x369)]??'';}function _0x5be315(_0x3d2ce3){const _0x21f9b6=_0x3ca3a4;return _0x3d2ce3[_0x21f9b6(0x336)]?.['description']??_0x3d2ce3[_0x21f9b6(0x1b8)]?.[_0x21f9b6(0x296)]??'';}function _0x3a8570(_0xc1f70c){const _0x16d5e5=_0x3ca3a4;return _0xc1f70c[_0x16d5e5(0x336)]?.[_0x16d5e5(0x1c9)]?.['length']?_0xc1f70c['operation'][_0x16d5e5(0x1c9)]:_0xc1f70c['meta']?.[_0x16d5e5(0x1c9)]??[];}function _0x3ffdd9(_0x1e000b){const _0x266e79=_0x3ca3a4,_0x2cecf4=[];_0x2cecf4[_0x266e79(0x2ad)]('\x20\x20'+_0xa66a3f(_0x35bd9c[_0x266e79(0xc4)]+_0x35bd9c[_0x266e79(0x3b8)],_0x1e000b[_0x266e79(0x15e)]['padEnd'](0x7))+'\x20'+_0xa66a3f(_0x35bd9c[_0x266e79(0xc4)]+_0x35bd9c[_0x266e79(0x34f)],_0x1e000b['path']));_0x1e000b[_0x266e79(0x336)]?.['id']&&_0x2cecf4['push'](_0x266e79(0x198)+_0xa66a3f(_0x35bd9c[_0x266e79(0xd2)],_0x266e79(0x33a)+_0x1e000b[_0x266e79(0x336)]['id']));_0xc5239f(_0x1e000b)&&_0x2cecf4[_0x266e79(0x2ad)](_0x266e79(0x198)+_0xa66a3f(_0x35bd9c[_0x266e79(0x37a)],_0xc5239f(_0x1e000b)));_0x5be315(_0x1e000b)&&_0x2cecf4[_0x266e79(0x2ad)](_0x266e79(0x198)+_0xa66a3f(_0x35bd9c['dim'],_0x5be315(_0x1e000b)));_0x3a8570(_0x1e000b)[_0x266e79(0x32b)]&&_0x2cecf4[_0x266e79(0x2ad)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xa66a3f(_0x35bd9c['gray'],'tags:\x20'+_0x3a8570(_0x1e000b)[_0x266e79(0x277)](',\x20')));_0x1e000b[_0x266e79(0x336)]?.['safety']?.[_0x266e79(0x293)]&&_0x2cecf4[_0x266e79(0x2ad)](_0x266e79(0x198)+_0xa66a3f(_0x35bd9c[_0x266e79(0xd2)],'access:\x20'+_0x1e000b[_0x266e79(0x336)][_0x266e79(0x153)][_0x266e79(0x293)]));_0x1e000b[_0x266e79(0x336)]?.[_0x266e79(0x2b2)]?.['transport']&&_0x1e000b[_0x266e79(0x336)][_0x266e79(0x2b2)][_0x266e79(0x3b1)]!==_0x266e79(0xfa)&&_0x2cecf4['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xa66a3f(_0x35bd9c[_0x266e79(0xd2)],_0x266e79(0x1be)+_0x1e000b[_0x266e79(0x336)]['http'][_0x266e79(0x3b1)]));if(_0x1e000b['operation']?.[_0x266e79(0x36b)]){const _0x5ef35d=Object[_0x266e79(0x16e)](_0x1e000b['operation'][_0x266e79(0x36b)][_0x266e79(0xc3)]||{});if(_0x5ef35d[_0x266e79(0x32b)])_0x2cecf4[_0x266e79(0x2ad)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xa66a3f(_0x35bd9c[_0x266e79(0xd2)],'input:\x20'+_0x5ef35d[_0x266e79(0x277)](',\x20')));}return _0x1e000b[_0x266e79(0x1b8)]?.[_0x266e79(0x114)]&&_0x2cecf4[_0x266e79(0x2ad)](_0x266e79(0x198)+_0xa66a3f(_0x35bd9c['gray'],'body:\x20'+JSON[_0x266e79(0x3b7)](_0x1e000b[_0x266e79(0x1b8)][_0x266e79(0x114)]))),_0x2cecf4;}async function _0x3d5b83(_0xdb3d81,_0x1dbe13,_0x5ed04f,_0x2b42ec=null){const _0x5b1a59=_0x3ca3a4,_0x440263=_0x5ed04f[_0x5b1a59(0x1b3)]('?'),_0x47d8ac=_0x440263>=0x0?_0x5ed04f[_0x5b1a59(0x144)](0x0,_0x440263):_0x5ed04f,_0xb38d4c=_0x440263>=0x0?_0x5ed04f[_0x5b1a59(0x144)](_0x440263+0x1):'',_0x5305ea=Object[_0x5b1a59(0x34b)](new URLSearchParams(_0xb38d4c)[_0x5b1a59(0x2a7)]());return _0xdb3d81[_0x5b1a59(0x2b2)][_0x5b1a59(0x148)](_0x1dbe13,_0x47d8ac,{'body':_0x2b42ec,'query':_0x5305ea,'headers':{'content-type':_0x5b1a59(0x1fe)}},{'internal':!![]});}function _0x53e5fa(_0x2151ef){const _0x5c23da=_0x3ca3a4;if(!_0x2151ef)return null;const _0x52769c=_0x2151ef[_0x5c23da(0x11a)]();if(!_0x52769c)return null;try{return JSON['parse'](_0x52769c);}catch{}try{return JSON['parse'](_0x512336(_0x52769c));}catch(_0x166ac6){throw new SyntaxError(_0x166ac6[_0x5c23da(0x18d)],{'cause':_0x166ac6});}}function _0x512336(_0x2fe392){const _0x29aff5=_0x3ca3a4;let _0x2709a1='',_0x46f269=0x0;while(_0x46f269<_0x2fe392['length']){const _0x63bc8d=_0x2fe392[_0x46f269];if(_0x63bc8d==='\x22'){_0x2709a1+='\x22',_0x46f269++;while(_0x46f269<_0x2fe392[_0x29aff5(0x32b)]&&_0x2fe392[_0x46f269]!=='\x22'){if(_0x2fe392[_0x46f269]==='\x5c'){_0x2709a1+=_0x2fe392[_0x46f269++];if(_0x46f269<_0x2fe392[_0x29aff5(0x32b)])_0x2709a1+=_0x2fe392[_0x46f269++];}else _0x2709a1+=_0x2fe392[_0x46f269++];}_0x2709a1+='\x22';if(_0x46f269<_0x2fe392[_0x29aff5(0x32b)])_0x46f269++;continue;}if(_0x63bc8d==='\x27'){_0x2709a1+='\x22',_0x46f269++;while(_0x46f269<_0x2fe392['length']&&_0x2fe392[_0x46f269]!=='\x27'){if(_0x2fe392[_0x46f269]==='\x5c'&&_0x2fe392[_0x46f269+0x1]==='\x27')_0x2709a1+='\x27',_0x46f269+=0x2;else _0x2fe392[_0x46f269]==='\x22'?(_0x2709a1+='\x5c\x22',_0x46f269++):_0x2709a1+=_0x2fe392[_0x46f269++];}_0x2709a1+='\x22';if(_0x46f269<_0x2fe392[_0x29aff5(0x32b)])_0x46f269++;continue;}if(_0x29aff5(0xc2)['includes'](_0x63bc8d)){_0x2709a1+=_0x63bc8d,_0x46f269++;continue;}let _0x3e695d='';while(_0x46f269<_0x2fe392['length']&&!'{}[]:,\x27\x22'['includes'](_0x2fe392[_0x46f269])&&_0x2fe392[_0x46f269]!=='\x20'&&_0x2fe392[_0x46f269]!=='\x09'&&_0x2fe392[_0x46f269]!=='\x0a'&&_0x2fe392[_0x46f269]!=='\x0d'){_0x3e695d+=_0x2fe392[_0x46f269++];}let _0x4c3c5d=_0x46f269;while(_0x4c3c5d<_0x2fe392[_0x29aff5(0x32b)]&&(_0x2fe392[_0x4c3c5d]==='\x20'||_0x2fe392[_0x4c3c5d]==='\x09'))_0x4c3c5d++;if(_0x2fe392[_0x4c3c5d]===':')_0x2709a1+='\x22'+_0x3e695d+'\x22';else _0x3e695d==='true'||_0x3e695d==='false'||_0x3e695d==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x29aff5(0x26d)](_0x3e695d)?_0x2709a1+=_0x3e695d:_0x2709a1+='\x22'+_0x3e695d+'\x22';}return _0x2709a1['replace'](/,(\s*[}\]])/g,'$1');}function _0x285933(_0x861486){const _0x5ab0cd=_0x3ca3a4,_0x26e180=[];let _0x1cde6a=0x0;while(_0x1cde6a<_0x861486[_0x5ab0cd(0x32b)]){while(_0x1cde6a<_0x861486['length']&&(_0x861486[_0x1cde6a]==='\x20'||_0x861486[_0x1cde6a]==='\x09'))_0x1cde6a++;if(_0x1cde6a>=_0x861486[_0x5ab0cd(0x32b)])break;const _0x24e278=_0x861486[_0x1cde6a];if(_0x24e278==='{'||_0x24e278==='['){const _0x1672a9=_0x24e278==='{'?'}':']',_0x14fafb=_0x1cde6a++;let _0x4561b1=0x1,_0x40fc25=![],_0x242401='';while(_0x1cde6a<_0x861486[_0x5ab0cd(0x32b)]&&_0x4561b1>0x0){const _0x1e2bdc=_0x861486[_0x1cde6a];if(_0x40fc25){if(_0x1e2bdc==='\x5c')_0x1cde6a++;else{if(_0x1e2bdc===_0x242401)_0x40fc25=![];}}else{if(_0x1e2bdc==='\x22'||_0x1e2bdc==='\x27')_0x40fc25=!![],_0x242401=_0x1e2bdc;else{if(_0x1e2bdc===_0x24e278)_0x4561b1++;else{if(_0x1e2bdc===_0x1672a9)_0x4561b1--;}}}_0x1cde6a++;}_0x26e180[_0x5ab0cd(0x2ad)](_0x861486[_0x5ab0cd(0x144)](_0x14fafb,_0x1cde6a));continue;}if(_0x24e278==='\x22'||_0x24e278==='\x27'){const _0x22e180=_0x24e278;_0x1cde6a++;let _0x14b03e='';while(_0x1cde6a<_0x861486[_0x5ab0cd(0x32b)]&&_0x861486[_0x1cde6a]!==_0x22e180){if(_0x861486[_0x1cde6a]==='\x5c'&&_0x1cde6a+0x1<_0x861486[_0x5ab0cd(0x32b)])_0x1cde6a++,_0x14b03e+=_0x861486[_0x1cde6a++];else _0x14b03e+=_0x861486[_0x1cde6a++];}if(_0x1cde6a<_0x861486[_0x5ab0cd(0x32b)])_0x1cde6a++;_0x26e180[_0x5ab0cd(0x2ad)](_0x14b03e);continue;}let _0x214d85='';while(_0x1cde6a<_0x861486[_0x5ab0cd(0x32b)]&&_0x861486[_0x1cde6a]!=='\x20'&&_0x861486[_0x1cde6a]!=='\x09'&&_0x861486[_0x1cde6a]!=='{'&&_0x861486[_0x1cde6a]!=='['){_0x214d85+=_0x861486[_0x1cde6a++];}if(_0x214d85)_0x26e180['push'](_0x214d85);}return _0x26e180;}function _0x5779ca(_0x29f298,_0x1e8c3e){const _0xb695fe=_0x3ca3a4,_0x36055b=[..._0x29f298[_0xb695fe(0xbb)][_0xb695fe(0x16e)]()][_0xb695fe(0x206)](_0x17e996=>!_0x17e996[_0xb695fe(0xf4)]('~'));console[_0xb695fe(0x270)](['',_0xa66a3f(_0x35bd9c[_0xb695fe(0xc4)]+_0x35bd9c[_0xb695fe(0x34f)],'\x20\x20╔═══════════════════════════╗'),_0xa66a3f(_0x35bd9c[_0xb695fe(0xc4)]+_0x35bd9c[_0xb695fe(0x34f)],'\x20\x20║')+_0xa66a3f(_0x35bd9c[_0xb695fe(0xc4)],_0xb695fe(0x29f))+_0xa66a3f(_0x35bd9c['bold']+_0x35bd9c[_0xb695fe(0x34f)],'║'),_0xa66a3f(_0x35bd9c[_0xb695fe(0xc4)]+_0x35bd9c[_0xb695fe(0x34f)],_0xb695fe(0x38a)),'','\x20\x20'+_0xa66a3f(_0x35bd9c[_0xb695fe(0x1fc)],'✓')+'\x20'+_0xa66a3f(_0x35bd9c[_0xb695fe(0xc4)],_0xb695fe(0x221))+'\x20\x20http://localhost:'+_0x1e8c3e[_0xb695fe(0x2b6)],'\x20\x20'+_0xa66a3f(_0x35bd9c[_0xb695fe(0x1fc)],'✓')+'\x20'+_0xa66a3f(_0x35bd9c['bold'],_0xb695fe(0x29c))+_0xb695fe(0x16a)+_0x1e8c3e[_0xb695fe(0x2b6)]+_0xb695fe(0x2a3),'\x20\x20'+_0xa66a3f(_0x35bd9c[_0xb695fe(0x1fc)],'✓')+'\x20'+_0xa66a3f(_0x35bd9c[_0xb695fe(0xc4)],_0xb695fe(0x1b1))+_0xb695fe(0x266)+_0x1e8c3e['dbPath'],'\x20\x20'+_0xa66a3f(_0x35bd9c['green'],'✓')+'\x20'+_0xa66a3f(_0x35bd9c[_0xb695fe(0xc4)],'id')+_0xb695fe(0x27c)+_0xa66a3f(_0x35bd9c[_0xb695fe(0xd2)],_0x29f298['id']),'\x20\x20'+_0xa66a3f(_0x35bd9c[_0xb695fe(0x1fc)],'✓')+'\x20'+_0xa66a3f(_0x35bd9c['bold'],_0xb695fe(0x348))+_0xb695fe(0x266)+_0x36055b[_0xb695fe(0x112)](_0x1fd11e=>_0xa66a3f(_0x35bd9c[_0xb695fe(0x34f)],_0x1fd11e))[_0xb695fe(0x277)]('\x20\x20'),..._0x1e8c3e[_0xb695fe(0x161)]?[]:['\x20\x20'+_0xa66a3f(_0x35bd9c[_0xb695fe(0x1fc)],'✓')+'\x20'+_0xa66a3f(_0x35bd9c[_0xb695fe(0xc4)],_0xb695fe(0x243))+_0xb695fe(0x365)+_0x1e8c3e[_0xb695fe(0x2b6)]+_0xb695fe(0x355)],'',_0xa66a3f(_0x35bd9c[_0xb695fe(0x1f6)],_0xb695fe(0x33c)+_0xa66a3f(_0x35bd9c['bold'],_0xb695fe(0x258))+_0xb695fe(0x1ba)+_0xa66a3f(_0x35bd9c[_0xb695fe(0xc4)],_0xb695fe(0x381))+'\x20to\x20browse\x20the\x20API,\x20'+_0xa66a3f(_0x35bd9c[_0xb695fe(0xc4)],_0xb695fe(0x229))+_0xb695fe(0xcf)),'']['join']('\x0a'));}function _0x1788e2(_0x2a9bc0){const _0x4fb75e=_0x3ca3a4;console[_0x4fb75e(0x270)]('\x0a'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0xc4)],_0x4fb75e(0xff))+'\x20\x20'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x1f6)],_0x4fb75e(0x295))+_0x4fb75e(0x314)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x34f)],_0x4fb75e(0x123))+_0x4fb75e(0x392)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x34f)],_0x4fb75e(0x123))+'\x20'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x2fb)],_0x4fb75e(0x2e0))+'\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20'+_0xa66a3f(_0x35bd9c['cyan'],_0x4fb75e(0x29a))+'\x20'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x34f)],_0x4fb75e(0x123))+'\x20'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x2fb)],_0x4fb75e(0x138))+_0x4fb75e(0x1b7)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x1f6)],_0x4fb75e(0x2c7))+_0x4fb75e(0xdd)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0xd2)],_0x4fb75e(0x190))+_0x4fb75e(0x24a)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0xd2)],_0x4fb75e(0x348))+'\x20\x20\x20\x20\x20\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'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0xd2)],_0x4fb75e(0x27d))+_0x4fb75e(0x261)+_0x2a9bc0[_0x4fb75e(0xc1)]+_0x4fb75e(0x2d8)+_0xa66a3f(_0x35bd9c['gray'],'type/users')+_0x4fb75e(0x3b4)+_0x2a9bc0[_0x4fb75e(0xc1)]+'/type/users\x0a\x20\x20\x20\x20'+_0xa66a3f(_0x35bd9c['gray'],'type/users/item/alice')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x2a9bc0[_0x4fb75e(0xc1)]+_0x4fb75e(0x20d)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0xd2)],_0x4fb75e(0x19f))+'\x20→\x20POST\x20/api/env/'+_0x2a9bc0[_0x4fb75e(0xc1)]+'/type/users/query\x0a\x20\x20\x20\x20'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0xd2)],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+_0x4fb75e(0xdd)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0xd2)],'DELETE\x20type/users/item/x')+_0x4fb75e(0xdd)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0xd2)],_0x4fb75e(0x1bb))+_0x4fb75e(0x125)+_0xa66a3f(_0x35bd9c['bold'],_0x4fb75e(0x1db))+'\x20\x20'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x1f6)],'(on\x20any\x20path\x20command)')+_0x4fb75e(0x314)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x34f)],_0x4fb75e(0x23c))+_0x4fb75e(0x345)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x34f)],_0x4fb75e(0x3c5))+_0x4fb75e(0x160)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x1f6)],_0x4fb75e(0x2c7))+_0x4fb75e(0xdd)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0xd2)],_0x4fb75e(0x2c4))+_0x4fb75e(0xdd)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0xd2)],_0x4fb75e(0xe2))+_0x4fb75e(0xdd)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0xd2)],_0x4fb75e(0x287))+'\x0a\x0a'+_0xa66a3f(_0x35bd9c['bold'],_0x4fb75e(0x34e))+'\x0a\x0a\x20\x20'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x34f)],'use\x20<env>')+'\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'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x34f)],_0x4fb75e(0xc1))+'\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'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x34f)],_0x4fb75e(0x381))+'\x20'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x1f6)],'[filter]')+_0x4fb75e(0x1fa)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x34f)],_0x4fb75e(0x3aa))+'\x20'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x1f6)],_0x4fb75e(0x176))+_0x4fb75e(0x2bd)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x34f)],'open')+_0x4fb75e(0x33b)+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x34f)],_0x4fb75e(0x258))+'\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'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x34f)],'exit')+'\x20'+_0xa66a3f(_0x35bd9c[_0x4fb75e(0x1f6)],'/\x20quit\x20/\x20Ctrl+C')+_0x4fb75e(0x25c));}let _0x2bf856=![];async function _0x5455d0(_0x5c7b1d,_0x15b765=0x0,_0x1b541e=null){const _0x2ca571=_0x3ca3a4;_0x2bf856&&(process[_0x2ca571(0x2e9)][_0x2ca571(0x2c0)](_0xa66a3f(_0x35bd9c[_0x2ca571(0x151)],_0x2ca571(0x1ee))),process['exit'](0x82));_0x2bf856=!![],process[_0x2ca571(0x268)][_0x2ca571(0x2c0)]('\x0a'),process[_0x2ca571(0x2e9)][_0x2ca571(0x2c0)](_0xa66a3f(_0x35bd9c[_0x2ca571(0x2fb)],_0x2ca571(0x31e)+(_0x1b541e?'received\x20'+_0x1b541e+',\x20':'')+_0x2ca571(0x388)));const _0x2c6c2d=setTimeout(()=>{const _0x2382fa=_0x2ca571;process[_0x2382fa(0x2e9)][_0x2382fa(0x2c0)](_0xa66a3f(_0x35bd9c[_0x2382fa(0x151)],_0x2382fa(0x12c))),process[_0x2382fa(0x229)](0x1);},0x1388);try{await _0x5c7b1d[_0x2ca571(0x2d6)]();}catch(_0x859b8d){console[_0x2ca571(0x254)](_0xa66a3f(_0x35bd9c[_0x2ca571(0x151)],'\x20\x20'+_0x859b8d[_0x2ca571(0x18d)]));}clearTimeout(_0x2c6c2d),process['stderr']['write'](_0xa66a3f(_0x35bd9c[_0x2ca571(0x1f6)],_0x2ca571(0x333))),process[_0x2ca571(0x229)](_0x15b765);}function _0x453017(_0x42d582){const _0x1fcbdc=_0x3ca3a4,_0x104343=_0x42d582[_0x1fcbdc(0xc1)]!==_0x1fcbdc(0x21a)?_0xa66a3f(_0x35bd9c[_0x1fcbdc(0x2fb)],'['+_0x42d582[_0x1fcbdc(0xc1)]+']'):'';return _0xa66a3f(_0x35bd9c[_0x1fcbdc(0xc4)]+_0x35bd9c[_0x1fcbdc(0x34f)],_0x1fcbdc(0x13a))+_0x104343+_0xa66a3f(_0x35bd9c['gray'],'>\x20');}const _0x5dd2ac=new Set([_0x3ca3a4(0x32f),_0x3ca3a4(0x19e),_0x3ca3a4(0x218),_0x3ca3a4(0xdc),_0x3ca3a4(0x2b4)]);async function _0x465270(_0x2472fb,_0x39993d,_0x578929,_0x58baa9,_0x5f3a85,_0x2b4a33){const _0x266415=_0x3ca3a4;_0x2472fb=_0x2472fb[_0x266415(0x11a)]();if(!_0x2472fb||_0x2472fb[_0x266415(0xf4)]('#'))return;const _0x3017b7=_0x285933(_0x2472fb),{flags:_0xc80ca7,rest:_0x436451}=_0x30580b(_0x3017b7);if(!_0x436451['length'])return;const _0x4d707c=_0x436451[0x0],_0x2f9964=_0x4d707c[_0x266415(0x12e)]();if(_0x2f9964===_0x266415(0xfb)){if(_0x436451[0x1])_0x3e4d4b(_0x39993d,_0x5ed241(_0x436451[0x1],_0xc80ca7[_0x266415(0xc1)]??_0x5f3a85[_0x266415(0xc1)]));else _0x1788e2(_0x5f3a85);return;}if(_0x2f9964==='USE'){const _0x34f71b=_0x436451[0x1];if(!_0x34f71b){console[_0x266415(0x270)](_0xa66a3f(_0x35bd9c['red'],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x39993d[_0x266415(0xc1)](_0x34f71b),_0x5f3a85[_0x266415(0xc1)]=_0x34f71b,_0x2b4a33?.[_0x266415(0x374)](_0x453017(_0x5f3a85)),console[_0x266415(0x270)]('\x0a\x20\x20'+_0xa66a3f(_0x35bd9c['green'],'✓')+_0x266415(0x1c8)+_0xa66a3f(_0x35bd9c[_0x266415(0xc4)]+_0x35bd9c[_0x266415(0x34f)],_0x34f71b)+'\x0a');}catch{console[_0x266415(0x270)](_0x266415(0xc9)+_0xa66a3f(_0x35bd9c[_0x266415(0x151)],'✗')+'\x20environment\x20'+_0xa66a3f(_0x35bd9c[_0x266415(0xc4)],_0x34f71b)+_0x266415(0x220)+_0xa66a3f(_0x35bd9c[_0x266415(0x1f6)],_0x266415(0x109)));}return;}if(_0x2f9964==='ENV'){const _0x574d71=[..._0x39993d['_envs'][_0x266415(0x16e)]()][_0x266415(0x206)](_0x2da170=>!_0x2da170[_0x266415(0xf4)]('~'));console[_0x266415(0x270)]('');for(const _0x13ee19 of _0x574d71){const _0x82919b=_0x13ee19===_0x5f3a85[_0x266415(0xc1)];console[_0x266415(0x270)]('\x20\x20'+(_0x82919b?_0xa66a3f(_0x35bd9c[_0x266415(0x1fc)],'●'):_0xa66a3f(_0x35bd9c[_0x266415(0x1f6)],'○'))+'\x20\x20'+(_0x82919b?_0xa66a3f(_0x35bd9c[_0x266415(0xc4)]+_0x35bd9c[_0x266415(0x34f)],_0x13ee19):_0xa66a3f(_0x35bd9c[_0x266415(0x1f6)],_0x13ee19)));}console[_0x266415(0x270)]('\x0a\x20\x20'+_0xa66a3f(_0x35bd9c[_0x266415(0x1f6)],_0x266415(0x39c))+'\x20'+_0xa66a3f(_0x35bd9c['cyan'],_0x5f3a85[_0x266415(0xc1)])),console[_0x266415(0x270)]('');return;}if(_0x2f9964===_0x266415(0x1ca)){const _0x2684e6=[..._0x39993d[_0x266415(0xbb)][_0x266415(0x1ff)]()][_0x266415(0x206)](_0x50e6c6=>!_0x50e6c6[_0x266415(0x30f)][_0x266415(0xf4)]('~'));console['log']('');const _0x149803=Math['max'](..._0x2684e6['map'](_0x319e60=>_0x319e60['name'][_0x266415(0x32b)]));for(const _0x58a99e of _0x2684e6){const _0x2c93a4=_0x58a99e[_0x266415(0x30f)]===_0x5f3a85['env'],_0x1320e2=_0x2c93a4?_0xa66a3f(_0x35bd9c[_0x266415(0x1fc)],'●'):_0xa66a3f(_0x35bd9c[_0x266415(0x1f6)],'○'),_0x5c61e9=_0x2c93a4?_0xa66a3f(_0x35bd9c['bold']+_0x35bd9c[_0x266415(0x34f)],_0x58a99e['name'][_0x266415(0x111)](_0x149803)):_0xa66a3f(_0x35bd9c[_0x266415(0x1f6)],_0x58a99e[_0x266415(0x30f)][_0x266415(0x111)](_0x149803)),_0x4c5832=[..._0x58a99e[_0x266415(0x1ab)]['keys']()]['filter'](_0x1ea661=>!_0x1ea661['startsWith']('~')),_0x20c05b=_0x4c5832[_0x266415(0x32b)]?_0xa66a3f(_0x35bd9c['dim'],_0x4c5832['slice'](0x0,0x5)[_0x266415(0x277)](',\x20')+(_0x4c5832[_0x266415(0x32b)]>0x5?'\x20\x20+'+(_0x4c5832[_0x266415(0x32b)]-0x5)+_0x266415(0x2c2):'')):_0xa66a3f(_0x35bd9c[_0x266415(0x1f6)],_0x266415(0x1d8));console[_0x266415(0x270)]('\x20\x20'+_0x1320e2+'\x20\x20'+_0x5c61e9+'\x20\x20'+_0x20c05b);}console[_0x266415(0x270)]('');return;}if(_0x2f9964===_0x266415(0xd3)){const _0x1314e0=_0xc80ca7[_0x266415(0xc1)]??_0x436451[0x1]??_0x5f3a85['env'];try{const _0x56f3eb=_0x39993d[_0x266415(0xc1)](_0x1314e0),_0x1bc587=[..._0x56f3eb['typeSubDbs'][_0x266415(0x16e)]()][_0x266415(0x206)](_0x20a244=>!_0x20a244[_0x266415(0xf4)]('~'))[_0x266415(0x1d5)]();console[_0x266415(0x270)]('\x0a\x20\x20'+_0xa66a3f(_0x35bd9c[_0x266415(0x1f6)],_0x1bc587[_0x266415(0x32b)]+_0x266415(0x30a)+(_0x1bc587['length']!==0x1?'s':'')+_0x266415(0x27b)+_0x1314e0));for(const _0x313029 of _0x1bc587){const _0x1190c6=_0x56f3eb[_0x266415(0x1ab)]['get'](_0x313029),_0xa84e74=_0x1190c6?.[_0x266415(0x1ac)]?.['getCount']?.()??0x0,_0x4f02a8=_0xa66a3f(_0x35bd9c['bold']+_0x35bd9c['cyan'],_0x313029['padEnd'](0x1c));console[_0x266415(0x270)](_0x266415(0x266)+_0x4f02a8+'\x20\x20'+_0xa66a3f(_0x35bd9c['magenta'],String(_0xa84e74)[_0x266415(0x22d)](0x6))+'\x20'+_0xa66a3f(_0x35bd9c[_0x266415(0x1f6)],_0x266415(0x2e8)));}console[_0x266415(0x270)]('');}catch(_0x22d399){console[_0x266415(0x254)](_0xa66a3f(_0x35bd9c[_0x266415(0x151)],_0x266415(0xc9)+_0x22d399['message']+'\x0a'));}return;}if(_0x2f9964===_0x266415(0x2fe)){_0x25a477(_0x39993d,_0x436451[_0x266415(0x144)](0x1)[_0x266415(0x277)]('\x20'));return;}if(_0x2f9964===_0x266415(0xcc)){const _0x3803ce=(_0x436451[0x1]??'')[_0x266415(0xbc)]();if(!_0x3803ce||_0x3803ce==='on')_0x58baa9[_0x266415(0x304)]=!![],_0x58baa9['level']=_0x266415(0x190),console[_0x266415(0x270)](_0x266415(0xc9)+_0xa66a3f(_0x35bd9c[_0x266415(0x1fc)],'✓')+_0x266415(0x38d)+_0xa66a3f(_0x35bd9c[_0x266415(0x1f6)],_0x266415(0xf8))+'\x0a');else{if(_0x3803ce===_0x266415(0x213))_0x58baa9[_0x266415(0x304)]=![],console['log'](_0x266415(0xc9)+_0xa66a3f(_0x35bd9c[_0x266415(0x2fb)],'○')+'\x20logs\x20off\x0a');else _0x21e39f[_0x3803ce]!==undefined?(_0x58baa9[_0x266415(0x304)]=!![],_0x58baa9['level']=_0x3803ce,console[_0x266415(0x270)](_0x266415(0xc9)+_0xa66a3f(_0x35bd9c[_0x266415(0x1fc)],'✓')+_0x266415(0x2d2)+_0xa66a3f(_0x35bd9c[_0x266415(0xc4)],_0x3803ce)+'\x0a')):console[_0x266415(0x254)](_0xa66a3f(_0x35bd9c[_0x266415(0x151)],_0x266415(0x324)));}return;}if(_0x2f9964===_0x266415(0x1d1)||_0x2f9964===_0x266415(0x113)){await _0x5455d0(_0x39993d,0x0);return;}if(_0x2f9964==='OPEN'){const _0x347d8b=_0x266415(0x169)+_0x578929[_0x266415(0x2b6)]+'/admin/index.html',_0x57cc2d=process['platform']===_0x266415(0x335)?_0x266415(0x219)+_0x347d8b:process[_0x266415(0x137)]===_0x266415(0x10d)?_0x266415(0x2ba)+_0x347d8b:'xdg-open\x20'+_0x347d8b;require$$4[_0x266415(0x37b)](_0x57cc2d),console[_0x266415(0x270)](_0x266415(0xc9)+_0xa66a3f(_0x35bd9c[_0x266415(0x1fc)],'✓')+_0x266415(0x12a)+_0xa66a3f(_0x35bd9c['cyan'],_0x347d8b)+'\x0a');return;}let _0x1731e4,_0x508872,_0x1a1c8c;if(_0x5dd2ac[_0x266415(0x36a)](_0x2f9964)){_0x1731e4=_0x2f9964,_0x508872=_0x436451[0x1],_0x1a1c8c=_0x436451['slice'](0x2);if(!_0x508872){console[_0x266415(0x254)](_0xa66a3f(_0x35bd9c[_0x266415(0x151)],_0x266415(0x10a)+_0x4d707c+'\x20<path>\x20[json-body]'));return;}}else _0x1731e4=null,_0x508872=_0x436451[0x0],_0x1a1c8c=_0x436451['slice'](0x1);const _0xea985c=_0xc80ca7['env']??_0x5f3a85[_0x266415(0xc1)],_0x53e146=_0x5ed241(_0x508872,_0xea985c);if(_0xc80ca7[_0x266415(0x258)]){_0x3e4d4b(_0x39993d,_0x53e146);return;}let _0x3e91b6=null;if(_0x1a1c8c['length']){const _0x342fd0=_0x1a1c8c[_0x266415(0x277)]('\x20');try{_0x3e91b6=_0x53e5fa(_0x342fd0);}catch(_0x331167){console[_0x266415(0x254)](_0xa66a3f(_0x35bd9c[_0x266415(0x151)],_0x266415(0x146)+_0x342fd0+'\x0a\x20\x20'+_0xa66a3f(_0x35bd9c[_0x266415(0x1f6)],_0x331167[_0x266415(0x18d)])+'\x0a'));return;}}if(!_0x1731e4)_0x1731e4=_0x3e91b6!==null?_0x266415(0x19e):_0x266415(0x32f);try{const _0x4d2219=await _0x3d5b83(_0x39993d,_0x1731e4,_0x53e146,_0x3e91b6);_0xf87905(_0x4d2219[_0x266415(0x32c)],_0x4d2219['body']);}catch(_0x3741b7){console[_0x266415(0x254)](_0x266415(0xc9)+_0xa66a3f(_0x35bd9c[_0x266415(0x151)],'✗')+'\x20'+_0x3741b7[_0x266415(0x18d)]+'\x0a');}}class _0x4328ff{constructor(){const _0x18f5c6=_0x3ca3a4;this['children']=new Map(),this[_0x18f5c6(0x3bf)]=null,this['terminal']=![];}}function _0x57a61b(_0x24e771){const _0x111c7d=_0x3ca3a4,_0x40b8a9=new _0x4328ff();for(const _0x40dca9 of _0x24e771){if(_0x40dca9['meta']?.[_0x111c7d(0x24e)])continue;const _0x46b3cc=_0x40dca9[_0x111c7d(0x1b1)][_0x111c7d(0x1c4)](/^\/api/,'')[_0x111c7d(0x1c4)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x111c7d(0x1c4)](/^\//,'');if(!_0x46b3cc)continue;let _0x29094d=_0x40b8a9;for(const _0x15acda of _0x46b3cc[_0x111c7d(0x311)]('/')[_0x111c7d(0x206)](Boolean)){if(_0x15acda[_0x111c7d(0xf4)](':')){const _0x1808b9=_0x15acda[_0x111c7d(0x144)](0x1);if(!_0x29094d[_0x111c7d(0x3bf)])_0x29094d['dynamic']={'param':_0x1808b9,'node':new _0x4328ff()};_0x29094d=_0x29094d['dynamic'][_0x111c7d(0x2ee)];}else{if(!_0x29094d['children'][_0x111c7d(0x36a)](_0x15acda))_0x29094d[_0x111c7d(0x194)][_0x111c7d(0x2dd)](_0x15acda,new _0x4328ff());_0x29094d=_0x29094d[_0x111c7d(0x194)]['get'](_0x15acda);}}_0x29094d[_0x111c7d(0x299)]=!![];}return _0x40b8a9;}const _0x47cb6c=new Map();function _0x2c66c4(_0x44f2eb,_0x29b9cb,_0x5b7ba6){const _0x2073db=_0x3ca3a4,_0x1110f4=_0x47cb6c[_0x2073db(0x167)](_0x44f2eb);if(_0x1110f4&&_0x1110f4[_0x2073db(0x1cc)]>Date[_0x2073db(0x1f5)]())return _0x1110f4[_0x2073db(0x351)];const _0x234ef2=_0x5b7ba6();return _0x47cb6c[_0x2073db(0x2dd)](_0x44f2eb,{'val':_0x234ef2,'exp':Date[_0x2073db(0x1f5)]()+_0x29b9cb}),_0x234ef2;}function _0xb20e29(_0x53cf75,_0x102931,_0x19b174,_0x4f8f39){const _0x1085a3=_0x3ca3a4,_0x43e9a6=_0x102931[_0x1085a3(0xc1)]??_0x4f8f39['env'];switch(_0x53cf75){case'env':return[..._0x19b174[_0x1085a3(0xbb)][_0x1085a3(0x16e)]()][_0x1085a3(0x206)](_0x29109d=>!_0x29109d[_0x1085a3(0xf4)]('~'));case _0x1085a3(0x1c7):return _0x2c66c4('types:'+_0x43e9a6,0x7d0,()=>{const _0x2b46e9=_0x1085a3;try{return[..._0x19b174[_0x2b46e9(0xc1)](_0x43e9a6)[_0x2b46e9(0x1ab)][_0x2b46e9(0x16e)]()][_0x2b46e9(0x206)](_0x19c69b=>!_0x19c69b['startsWith']('~'));}catch{return[];}});case'key':if(!_0x102931['type'])return[];return _0x2c66c4(_0x1085a3(0x263)+_0x43e9a6+':'+_0x102931['type'],0x5dc,()=>{const _0x30a6cb=_0x1085a3;try{const _0x2a325e=_0x19b174['env'](_0x43e9a6)[_0x30a6cb(0x1ab)][_0x30a6cb(0x167)](_0x102931[_0x30a6cb(0x1c7)]);if(!_0x2a325e?.['data'])return[];const _0x46b4b6=[];for(const {key:_0x5642e7}of _0x2a325e['data']['getRange']({'limit':0x32})){_0x46b4b6['push'](String(_0x5642e7));if(_0x46b4b6[_0x30a6cb(0x32b)]>=0x32)break;}return _0x46b4b6;}catch{return[];}});case _0x1085a3(0x2ff):if(!_0x102931['type'])return[];return _0x2c66c4(_0x1085a3(0x2ab)+_0x43e9a6+':'+_0x102931['type'],0x7d0,()=>{const _0x2a87df=_0x1085a3;try{const _0x30655d=_0x19b174[_0x2a87df(0xc1)](_0x43e9a6)[_0x2a87df(0x1ab)][_0x2a87df(0x167)](_0x102931['type']);return _0x30655d?[..._0x30655d[_0x2a87df(0x1d3)]?.[_0x2a87df(0x16e)]()??[]]:[];}catch{return[];}});case _0x1085a3(0x32a):if(!_0x102931[_0x1085a3(0x1c7)])return[];return _0x2c66c4(_0x1085a3(0x2db)+_0x43e9a6+':'+_0x102931['type'],0x7d0,()=>{const _0x1d61d2=_0x1085a3;try{return _0x19b174[_0x1d61d2(0x15a)]?.[_0x1d61d2(0x371)]?.(_0x102931[_0x1d61d2(0x1c7)],_0x19b174[_0x1d61d2(0xc1)](_0x43e9a6))?.[_0x1d61d2(0x112)](_0x3f1255=>_0x3f1255[_0x1d61d2(0x30f)])??[];}catch{return[];}});default:return[];}}function _0x126c07(_0x30190f,_0x202165,_0x13a007,_0xa21996){const _0x456a81=_0x3ca3a4,_0x5a56f5=_0x30190f[_0x456a81(0x283)]('/'),_0x3b4f5c=_0x30190f[_0x456a81(0x311)]('/'),_0x1050db=_0x5a56f5?_0x3b4f5c[_0x456a81(0x144)](0x0,-0x1):_0x3b4f5c[_0x456a81(0x144)](0x0,-0x1),_0x5b4967=_0x5a56f5?'':_0x3b4f5c[_0x3b4f5c[_0x456a81(0x32b)]-0x1];let _0x1b3a35=_0x202165;const _0x506586={};for(const _0x47c7a5 of _0x1050db){if(!_0x47c7a5)continue;if(_0x1b3a35[_0x456a81(0x194)]['has'](_0x47c7a5))_0x1b3a35=_0x1b3a35['children'][_0x456a81(0x167)](_0x47c7a5);else{if(_0x1b3a35['dynamic'])_0x506586[_0x1b3a35[_0x456a81(0x3bf)][_0x456a81(0x228)]]=_0x47c7a5,_0x1b3a35=_0x1b3a35[_0x456a81(0x3bf)]['node'];else return[];}}const _0x33518a=_0x1050db[_0x456a81(0x206)](Boolean),_0x357020=_0x33518a[_0x456a81(0x32b)]?_0x33518a[_0x456a81(0x277)]('/')+'/':'',_0xad4c5c=[];for(const [_0x2f5336]of _0x1b3a35['children']){if(_0x2f5336[_0x456a81(0xf4)](_0x5b4967))_0xad4c5c[_0x456a81(0x2ad)](_0x357020+_0x2f5336);}if(_0x1b3a35['dynamic'])for(const _0x4d5a97 of _0xb20e29(_0x1b3a35['dynamic'][_0x456a81(0x228)],_0x506586,_0x13a007,_0xa21996)){if(String(_0x4d5a97)[_0x456a81(0xf4)](_0x5b4967))_0xad4c5c[_0x456a81(0x2ad)](_0x357020+_0x4d5a97);}return _0xad4c5c[_0x456a81(0x144)](0x0,0x64);}const _0x3bb552=[_0x3ca3a4(0x258),'use',_0x3ca3a4(0xc1),_0x3ca3a4(0x348),_0x3ca3a4(0x27d),'routes',_0x3ca3a4(0x3aa),'open',_0x3ca3a4(0x229),'quit'];function _0x2837b1(_0x311a1c,_0x4bb0e2,_0x51220a){return function _0x40551b(_0x4d9b10){const _0x23d5ba=_0x4918;try{const _0x29cde1=_0x4d9b10[_0x23d5ba(0x399)](/\s[{[]/),_0x5cd15a=_0x29cde1>=0x0?_0x4d9b10['slice'](0x0,_0x29cde1):_0x4d9b10,_0x2d61be=_0x5cd15a[_0x23d5ba(0x372)]();if(!_0x2d61be){const _0x4b70e8=[..._0x3bb552,...[..._0x311a1c[_0x23d5ba(0x194)][_0x23d5ba(0x16e)]()]][_0x23d5ba(0x144)](0x0,0x64);return[_0x4b70e8,''];}const _0x378540=_0x2d61be[_0x23d5ba(0x311)](/\s+/),_0x2ae770=_0x378540[0x0],_0x44471d=_0x2ae770['toUpperCase']();if(_0x378540[_0x23d5ba(0x32b)]===0x1){const _0x2f6808=_0x2ae770[_0x23d5ba(0xbc)](),_0x7f36af=_0x3bb552['filter'](_0x2557de=>_0x2557de[_0x23d5ba(0xf4)](_0x2f6808)),_0x4d718e=_0x126c07(_0x2ae770,_0x311a1c,_0x4bb0e2,_0x51220a),_0x4e84bf=[...new Set([..._0x7f36af,..._0x4d718e])][_0x23d5ba(0x144)](0x0,0x64);return[_0x4e84bf,_0x2ae770];}if(_0x5dd2ac[_0x23d5ba(0x36a)](_0x44471d)&&_0x378540[_0x23d5ba(0x32b)]===0x2){const _0xe1d8d5=_0x378540[0x1],_0x3763c7=_0x126c07(_0xe1d8d5,_0x311a1c,_0x4bb0e2,_0x51220a);return[_0x3763c7['map'](_0xec5156=>_0x2ae770+'\x20'+_0xec5156),_0x2ae770+'\x20'+_0xe1d8d5];}if(!_0x5dd2ac[_0x23d5ba(0x36a)](_0x44471d)&&_0x378540['length']>0x1){const _0x37b3b2=_0x126c07(_0x2ae770,_0x311a1c,_0x4bb0e2,_0x51220a),_0x59f1b6='\x20'+_0x378540[_0x23d5ba(0x144)](0x1)[_0x23d5ba(0x277)]('\x20');return[_0x37b3b2[_0x23d5ba(0x112)](_0x392c29=>_0x392c29+_0x59f1b6),_0x2ae770+_0x59f1b6];}return[[],_0x4d9b10];}catch{return[[],_0x4d9b10];}};}async function _0x69b5c(_0x51bb87,_0xc4400c){const _0x40bb33=_0x3ca3a4,_0x434c43={'enabled':!![],'level':_0xc4400c[_0x40bb33(0x2f1)]??_0x40bb33(0x190)},_0x55964e={'env':_0x40bb33(0x21a)},_0x42124c={'current':null},_0x470a96=_0x57a61b(_0x51bb87[_0x40bb33(0x2b2)][_0x40bb33(0x34c)]()),_0x49d572=_0x2837b1(_0x470a96,_0x51bb87,_0x55964e);_0x51bb87[_0x40bb33(0x270)]['attach'](_0x145d66=>{const _0x1a4989=_0x40bb33;if(!_0x434c43[_0x1a4989(0x304)])return;_0x5b5ce4(_0x145d66,_0x434c43[_0x1a4989(0x2f8)]),_0x42124c['current']?.['prompt'](!![]);}),_0x5779ca(_0x51bb87,_0xc4400c);const _0x583e4c=_0x535cf0[_0x40bb33(0x1f3)]({'input':process[_0x40bb33(0x2f0)],'output':process[_0x40bb33(0x268)],'terminal':!![],'completer':_0x49d572,'prompt':_0x453017(_0x55964e),'historySize':_0x45c497});try{const _0x1358a4=_0x2c04a6[_0x40bb33(0x14a)](_0x17a0b6,_0x40bb33(0x31f))[_0x40bb33(0x311)]('\x0a')['filter'](Boolean);_0x583e4c['history']=_0x1358a4[_0x40bb33(0x3ba)]()['slice'](0x0,_0x45c497);}catch{}_0x42124c[_0x40bb33(0xcb)]=_0x583e4c,_0x583e4c['on'](_0x40bb33(0x1e9),async _0x5891bd=>{const _0x4a9b2a=_0x40bb33;_0x583e4c[_0x4a9b2a(0xf7)]();try{await _0x465270(_0x5891bd,_0x51bb87,_0xc4400c,_0x434c43,_0x55964e,_0x583e4c);}catch(_0xf3d50){console[_0x4a9b2a(0x254)](_0xa66a3f(_0x35bd9c['red'],_0x4a9b2a(0x128)+_0xf3d50['message']));}finally{_0x583e4c[_0x4a9b2a(0x2dc)](),_0x583e4c['prompt']();}}),_0x583e4c['on']('close',()=>{const _0x251013=_0x40bb33;try{const _0x453dcb=[..._0x583e4c[_0x251013(0x38f)]][_0x251013(0x3ba)]()['filter'](Boolean)['slice'](0x0,_0x45c497);_0x2c04a6[_0x251013(0x226)](_0x17a0b6,_0x453dcb[_0x251013(0x277)]('\x0a')+'\x0a');}catch{}_0x5455d0(_0x51bb87,0x0);});let _0x5d2b83=0x0;return process['on']('SIGINT',()=>{const _0x3df76a=_0x40bb33;if(_0x2bf856)return _0x5455d0(_0x51bb87,0x82,_0x3df76a(0xbf));if(_0x583e4c[_0x3df76a(0x1e9)]==='')return _0x5455d0(_0x51bb87,0x0,_0x3df76a(0xbf));const _0x2d8871=Date['now']();if(_0x2d8871-_0x5d2b83<0x5dc)return _0x5455d0(_0x51bb87,0x0,'SIGINT\x20(double-tap)');_0x5d2b83=_0x2d8871,process[_0x3df76a(0x268)]['write']('\x0a'),_0x583e4c[_0x3df76a(0x394)](0x0),_0x583e4c[_0x3df76a(0x1e0)](),process['stderr'][_0x3df76a(0x2c0)](_0xa66a3f(_0x35bd9c['dim'],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on'](_0x40bb33(0xee),()=>_0x5455d0(_0x51bb87,0x0,_0x40bb33(0xee))),process['on'](_0x40bb33(0x2a0),()=>_0x5455d0(_0x51bb87,0x0,_0x40bb33(0x2a0))),_0x583e4c['prompt'](),_0x583e4c;}return okdbShell={'start':_0x69b5c,'colorLog':_0x5b5ce4,'lenientParse':_0x53e5fa,'_splitLine':_0x285933,'_formatRouteHelpLines':_0x3ffdd9,'_routeSummary':_0xc5239f,'_routeTags':_0x3a8570},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x5230c9=_0x239a30;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process['loadEnvFile']();}catch{}const _0x4c20f1=require$$1$1,_0x4850d0=require$$1;function _0x2798fe(_0x321d17){const _0x21da9b=_0x4918,_0x164e88=_0x321d17['slice'](0x2),_0x116d34={};let _0x297fb9=0x0;while(_0x297fb9<_0x164e88['length']){const _0x55a9bf=_0x164e88[_0x297fb9];if(_0x55a9bf===_0x21da9b(0x328)||_0x55a9bf==='-p')_0x116d34['port']=Number(_0x164e88[++_0x297fb9]);else{if(_0x55a9bf===_0x21da9b(0x28b)||_0x55a9bf==='-d')_0x116d34['path']=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x1a0)||_0x55a9bf==='-k')_0x116d34[_0x21da9b(0x321)]=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x3b3)||_0x55a9bf==='-c')_0x116d34[_0x21da9b(0x3c4)]=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x2cf))_0x116d34[_0x21da9b(0x2f1)]=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x1dd))_0x116d34[_0x21da9b(0x3bb)]=!![];else{if(_0x55a9bf===_0x21da9b(0x135))_0x116d34['noAdmin']=!![];else{if(_0x55a9bf===_0x21da9b(0x119)||_0x55a9bf==='-e')_0x116d34['env']=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x196))_0x116d34[_0x21da9b(0x27d)]=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x288))_0x116d34[_0x21da9b(0x2cc)]=!![];else{if(_0x55a9bf==='--blobs')_0x116d34[_0x21da9b(0x11e)]=!![];else{if(_0x55a9bf===_0x21da9b(0x2d5))_0x116d34[_0x21da9b(0x2c1)]=!![];else{if(_0x55a9bf===_0x21da9b(0x1df)){const _0x3c5104=[];while(_0x297fb9+0x1<_0x164e88['length']&&!_0x164e88[_0x297fb9+0x1][_0x21da9b(0xf4)]('--')){_0x3c5104[_0x21da9b(0x2ad)](_0x164e88[++_0x297fb9]);}_0x116d34[_0x21da9b(0xe8)]=_0x3c5104['length']>0x0?_0x3c5104:!![];}else{if(_0x55a9bf===_0x21da9b(0x17b))_0x116d34[_0x21da9b(0x2e7)]=!![];else{if(_0x55a9bf===_0x21da9b(0x3a3))_0x116d34['name']=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x387))_0x116d34[_0x21da9b(0x252)]=_0x164e88[++_0x297fb9];else{if(_0x55a9bf==='--label')_0x116d34['label']=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x391))_0x116d34[_0x21da9b(0x2e3)]=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x28c))_0x116d34['grants']=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x395))_0x116d34[_0x21da9b(0x285)]=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x26b))_0x116d34[_0x21da9b(0x39a)]=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x36f)||_0x55a9bf==='-u')_0x116d34[_0x21da9b(0x352)]=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x38c))_0x116d34[_0x21da9b(0x242)]=_0x164e88[++_0x297fb9];else{if(_0x55a9bf===_0x21da9b(0x251)||_0x55a9bf==='-v'){const _0x5cadef=require$$2;console[_0x21da9b(0x270)](_0x5cadef[_0x21da9b(0x101)]),process[_0x21da9b(0x229)](0x0);}else(_0x55a9bf===_0x21da9b(0x3c5)||_0x55a9bf==='-h')&&(_0x2356f9(),process[_0x21da9b(0x229)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x297fb9++;}return _0x116d34;}function _0x2356f9(){const _0x402dc5=_0x4918;console[_0x402dc5(0x270)](_0x402dc5(0x2b8));}const _0x5615c4=new Set([_0x5230c9(0x100),'info',_0x5230c9(0x103),_0x5230c9(0x254)]);function _0x1fc862(_0x526440){const _0x2af730=_0x5230c9,_0x253141=_0x526440[_0x2af730(0x3c4)]?_0x4c20f1[_0x2af730(0x10e)](_0x526440[_0x2af730(0x3c4)]):_0x4c20f1['resolve'](_0x2af730(0x19b));let _0x4e5a56={};if(_0x4850d0[_0x2af730(0x1da)](_0x253141))try{const _0x1d3528=_0x4850d0[_0x2af730(0x14a)](_0x253141,'utf8')[_0x2af730(0x1c4)](/^\uFEFF/,'');_0x4e5a56=JSON[_0x2af730(0x1a5)](_0x1d3528),console[_0x2af730(0x270)](_0x2af730(0x19d)+_0x253141);}catch(_0x5d1fb9){console[_0x2af730(0x254)](_0x2af730(0x3c1)+_0x253141+':\x20'+_0x5d1fb9[_0x2af730(0x18d)]),process[_0x2af730(0x229)](0x1);}const _0x34fe6b={'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},_0x42a2da={'port':_0x526440[_0x2af730(0x2b6)]??_0x4e5a56[_0x2af730(0x2b6)]??_0x34fe6b[_0x2af730(0x2b6)]??0x2124,'dbPath':_0x526440[_0x2af730(0x1b1)]??_0x4e5a56[_0x2af730(0x1b1)]??_0x34fe6b[_0x2af730(0x1b1)]??_0x2af730(0x17d),'key':_0x526440[_0x2af730(0x321)]??_0x4e5a56[_0x2af730(0x321)]??_0x34fe6b[_0x2af730(0x321)]??undefined,'logLevel':_0x526440[_0x2af730(0x2f1)]??_0x4e5a56[_0x2af730(0x2f1)]??_0x34fe6b['logLevel']??_0x2af730(0x190),'noRepl':_0x526440['noRepl']??_0x4e5a56['noRepl']??_0x34fe6b[_0x2af730(0x3bb)]??![],'noAdmin':_0x526440[_0x2af730(0x161)]??_0x4e5a56['noAdmin']??_0x34fe6b['noAdmin']??![],'admin':_0x4e5a56['admin']??{},'api':_0x4e5a56[_0x2af730(0x29c)]??undefined,'auth':_0x4e5a56['auth']??undefined,'mcp':_0x4e5a56[_0x2af730(0x2ac)]??undefined,'timeMachine':_0x4e5a56[_0x2af730(0x21f)]!==![]?_0x4e5a56['timeMachine']??{}:![]};return _0x526440['open']!==undefined&&(_0x42a2da['auth']=_0x42a2da['auth']||{},_0x42a2da[_0x2af730(0x170)][_0x2af730(0xe8)]=_0x526440[_0x2af730(0xe8)]),_0x526440['logRequests']&&(_0x42a2da[_0x2af730(0x100)]=_0x42a2da[_0x2af730(0x100)]||{},_0x42a2da[_0x2af730(0x100)]['logRequests']=!![]),(!Number['isInteger'](_0x42a2da[_0x2af730(0x2b6)])||_0x42a2da[_0x2af730(0x2b6)]<0x1||_0x42a2da[_0x2af730(0x2b6)]>0xffff)&&(console['error'](_0x2af730(0x171)+_0x42a2da[_0x2af730(0x2b6)]+_0x2af730(0x12f)),process[_0x2af730(0x229)](0x1)),!_0x5615c4[_0x2af730(0x36a)](_0x42a2da[_0x2af730(0x2f1)])&&(console[_0x2af730(0x254)](_0x2af730(0x32d)+_0x42a2da['logLevel']+_0x2af730(0x28d)),process[_0x2af730(0x229)](0x1)),_0x42a2da;}function _0x2e1402(_0x42c213){const _0x1646e8=_0x5230c9;return!!(_0x42c213&&typeof _0x42c213===_0x1646e8(0x23d)&&!Array['isArray'](_0x42c213)&&Object[_0x1646e8(0x16e)](_0x42c213)[_0x1646e8(0x32b)]>0x0);}const _0xe7068a=!process['stdout']['isTTY']||!!process.env.NO_COLOR;function _0x359a7d(_0xf1fa59,_0x513c6c){const _0x564e50=_0x5230c9;return _0xe7068a?_0x513c6c:'\x1b['+_0xf1fa59+'m'+_0x513c6c+_0x564e50(0x393);}function _0x47c70e(_0x3f1f24){const _0x1dab78=_0x5230c9;if(!_0x3f1f24||_0x3f1f24[_0x1dab78(0x32b)]===0x0)return;const _0x50099a='─'[_0x1dab78(0x376)](0x38);process[_0x1dab78(0x2e9)][_0x1dab78(0x2c0)]('\x0a'),process[_0x1dab78(0x2e9)]['write'](_0x359a7d('33',_0x1dab78(0x29d)+_0x3f1f24[_0x1dab78(0x32b)]+_0x1dab78(0x31a)+(_0x3f1f24['length']>0x1?'S':'')+'\x0a')),process[_0x1dab78(0x2e9)][_0x1dab78(0x2c0)]('\x20\x20'+_0x50099a+'\x0a');for(const _0x2289a7 of _0x3f1f24){const _0x448eb1=_0x2289a7[_0x1dab78(0x2f8)]===_0x1dab78(0x254)?_0x359a7d('31',_0x1dab78(0x2df)):_0x359a7d('33','\x20\x20⚠');process[_0x1dab78(0x2e9)][_0x1dab78(0x2c0)](_0x448eb1+'\x20\x20'+_0x359a7d('1',_0x2289a7[_0x1dab78(0x2a5)])+'\x0a'),process[_0x1dab78(0x2e9)][_0x1dab78(0x2c0)]('\x20\x20\x20\x20\x20\x20\x20'+_0x2289a7[_0x1dab78(0x18d)]+'\x0a');if(_0x2289a7[_0x1dab78(0x1f9)])process[_0x1dab78(0x2e9)][_0x1dab78(0x2c0)]('\x20\x20\x20\x20\x20\x20\x20'+_0x359a7d('2',_0x1dab78(0x1a2)+_0x2289a7['hint'])+'\x0a');process[_0x1dab78(0x2e9)][_0x1dab78(0x2c0)]('\x0a');}process[_0x1dab78(0x2e9)][_0x1dab78(0x2c0)]('\x20\x20'+_0x50099a+'\x0a\x0a');}function _0x1c0eae(_0xa30408,_0x37846d){const _0x531747=_0x5230c9,_0x4555ea=_0xa30408['http'][_0x531747(0x20b)](_0x37846d);return new Promise((_0x1b25af,_0x1cde06)=>{const _0x352e1b=_0x531747;_0x4555ea['once']('listening',_0x1b25af),_0x4555ea[_0x352e1b(0x110)](_0x352e1b(0x254),_0x1cde06);});}async function _0x470d64(_0x2bcfe0){const _0x1c658c=_0x5230c9,_0x20c92d=require$$3;console[_0x1c658c(0x270)](_0x1c658c(0x14f));let _0x48ee57=!![];const _0x43d7a0=(_0x592188,_0x17e871)=>{const _0x5ac396=_0x1c658c;console[_0x5ac396(0x270)]('\x20\x20'+(_0x592188?'✓':'✗')+'\x20'+_0x17e871);if(!_0x592188)_0x48ee57=![];},_0x3bd82b=Number(process['version']['replace']('v','')[_0x1c658c(0x311)]('.')[0x0]);_0x43d7a0(_0x3bd82b>=0x12,_0x1c658c(0x2a1)+process[_0x1c658c(0x101)]+(_0x3bd82b<0x12?_0x1c658c(0x2d4):''));const _0x18ddff=_0x4c20f1[_0x1c658c(0x10e)](_0x2bcfe0[_0x1c658c(0x398)]);try{_0x4850d0[_0x1c658c(0x15c)](_0x18ddff,{'recursive':!![]});const _0x2ee7fd=_0x4c20f1[_0x1c658c(0x277)](_0x18ddff,_0x1c658c(0x379));_0x4850d0[_0x1c658c(0x226)](_0x2ee7fd,''),_0x4850d0[_0x1c658c(0x209)](_0x2ee7fd),_0x43d7a0(!![],_0x1c658c(0xd1)+_0x18ddff);}catch(_0x3eb10d){_0x43d7a0(![],_0x1c658c(0x16c)+_0x18ddff+_0x1c658c(0xe1)+_0x3eb10d[_0x1c658c(0x18d)]+')');}const _0x4a494b=await new Promise(_0x2163d7=>{const _0x3a2e27=_0x1c658c,_0x9754f5=_0x20c92d[_0x3a2e27(0x2a4)]();_0x9754f5[_0x3a2e27(0x110)]('error',()=>_0x2163d7(![])),_0x9754f5[_0x3a2e27(0x110)](_0x3a2e27(0x30b),()=>{_0x9754f5['close'](),_0x2163d7(!![]);}),_0x9754f5[_0x3a2e27(0x20b)](_0x2bcfe0[_0x3a2e27(0x2b6)],_0x3a2e27(0x37e));});_0x43d7a0(_0x4a494b,_0x1c658c(0x104)+_0x2bcfe0[_0x1c658c(0x2b6)]+'\x20'+(_0x4a494b?'available':_0x1c658c(0x2bb)));const _0x313dca=_0x4c20f1[_0x1c658c(0x10e)]('.kdbconfig');if(_0x4850d0[_0x1c658c(0x1da)](_0x313dca))try{JSON[_0x1c658c(0x1a5)](_0x4850d0['readFileSync'](_0x313dca,_0x1c658c(0x31f))[_0x1c658c(0x1c4)](/^\uFEFF/,'')),_0x43d7a0(!![],_0x1c658c(0xbe)+_0x313dca);}catch(_0x33efe0){_0x43d7a0(![],_0x1c658c(0xf5)+_0x33efe0[_0x1c658c(0x18d)]);}else _0x43d7a0(!![],'no\x20.kdbconfig\x20(using\x20defaults)');console[_0x1c658c(0x270)](''),_0x48ee57?console[_0x1c658c(0x270)](_0x1c658c(0x1eb)):(console[_0x1c658c(0x270)](_0x1c658c(0x309)),process[_0x1c658c(0x229)](0x1));}async function _0x102569(){const _0x434f78=_0x5230c9,_0x2dc222=_0x4c20f1[_0x434f78(0x10e)]('.kdbconfig');!_0x4850d0[_0x434f78(0x1da)](_0x2dc222)?(_0x4850d0['writeFileSync'](_0x2dc222,JSON['stringify']({'port':0x2124,'path':'./okdb-data','logLevel':_0x434f78(0x190),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x434f78(0x270)](_0x434f78(0x1f2))):console[_0x434f78(0x270)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x262d59=_0x4c20f1[_0x434f78(0x10e)]('./okdb-data');!_0x4850d0[_0x434f78(0x1da)](_0x262d59)?(_0x4850d0[_0x434f78(0x15c)](_0x262d59,{'recursive':!![]}),console[_0x434f78(0x270)]('[okdb]\x20created\x20./okdb-data')):console['log']('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x434f78(0x270)](_0x434f78(0x3af));}async function _0x5f4d12(_0x178d83){const _0x199b95=_0x5230c9,_0x11b426=_0x4c20f1[_0x199b95(0x10e)](_0x178d83[_0x199b95(0x398)]);if(!_0x4850d0['existsSync'](_0x11b426)){console[_0x199b95(0x270)](_0x199b95(0x2d7)+_0x11b426+_0x199b95(0x12d));return;}const _0x369e01=require$$0$2,_0x53943d=_0x369e01[_0x199b95(0x1f3)]({'input':process[_0x199b95(0x2f0)],'output':process[_0x199b95(0x268)]}),_0x1200bd=await new Promise(_0x4059e3=>_0x53943d[_0x199b95(0x20f)]('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x11b426+_0x199b95(0x23f),_0x4059e3));_0x53943d['close'](),console[_0x199b95(0x270)]('');if(_0x1200bd[_0x199b95(0x11a)]()[_0x199b95(0xbc)]()!=='yes'){console['log']('[okdb]\x20reset\x20aborted');return;}_0x4850d0[_0x199b95(0x368)](_0x11b426,{'recursive':!![],'force':!![]}),console[_0x199b95(0x270)](_0x199b95(0x2ea)+_0x11b426+_0x199b95(0xca));}async function _0x3f53e2(_0x1820c0,_0x2132f1){const _0xa32bf1=_0x5230c9,_0x230951=require$$5,_0x5a430c=_0x4c20f1[_0xa32bf1(0x10e)](_0x2132f1[_0xa32bf1(0x398)]);console['log'](_0xa32bf1(0x28a)+_0x5a430c+'…');const _0x21c22b=new _0x230951(_0x5a430c,_0x2132f1[_0xa32bf1(0x321)]?{'encryptionKey':_0x2132f1[_0xa32bf1(0x321)]}:{});await _0x21c22b[_0xa32bf1(0xe8)](),console[_0xa32bf1(0x270)](_0xa32bf1(0x303)+_0x1820c0+'…');const {envs:_0x12ebb9}=await _0x21c22b[_0xa32bf1(0x2bc)]['backup'](_0x1820c0);for(const _0x58584b of _0x12ebb9){const _0x1bebbe=_0x58584b[_0xa32bf1(0xd8)]>0x0?_0xa32bf1(0xe1)+(_0x58584b[_0xa32bf1(0xd8)]/0x400/0x400)[_0xa32bf1(0x177)](0x2)+_0xa32bf1(0x1c5)+(_0x58584b[_0xa32bf1(0x1c3)]/0x400/0x400)['toFixed'](0x2)+_0xa32bf1(0x1f7):'';console['log'](_0xa32bf1(0x178)+_0x58584b[_0xa32bf1(0x30f)]+_0xa32bf1(0x192)+_0x58584b[_0xa32bf1(0x396)]+_0x1bebbe);}await _0x21c22b[_0xa32bf1(0x2d6)](),console[_0xa32bf1(0x270)](_0xa32bf1(0x36c));}async function _0x2dd11e(_0xac92bb,_0x372557,_0x3f4844){const _0x35c4fd=_0x5230c9,_0x24b4b5=require$$5,_0x3ce273=_0x4c20f1[_0x35c4fd(0x10e)](_0x372557['dbPath']),_0x2bf4e3=_0x3f4844[_0x35c4fd(0xc1)]??'default',_0x2bdf25=_0x3f4844[_0x35c4fd(0x27d)]?_0x3f4844['types'][_0x35c4fd(0x311)](',')[_0x35c4fd(0x112)](_0x56e10c=>_0x56e10c[_0x35c4fd(0x11a)]()):null;console[_0x35c4fd(0x270)](_0x35c4fd(0x28a)+_0x3ce273+'…');const _0x47c631=new _0x24b4b5(_0x3ce273,_0x372557[_0x35c4fd(0x321)]?{'encryptionKey':_0x372557[_0x35c4fd(0x321)]}:{});await _0x47c631[_0x35c4fd(0xe8)](),console[_0x35c4fd(0x270)](_0x35c4fd(0x265)+_0x2bf4e3+_0x35c4fd(0x187)+_0xac92bb+'…');const _0x5e2d0=await _0x47c631[_0x35c4fd(0x2bc)]['exportToFile'](_0xac92bb,{'envName':_0x2bf4e3,'types':_0x2bdf25,'includeChanges':!!_0x3f4844[_0x35c4fd(0x2cc)]});console[_0x35c4fd(0x270)](_0x35c4fd(0x216)+_0x5e2d0['types']+_0x35c4fd(0x2a8)+_0x5e2d0['records']+'\x20\x20changes='+_0x5e2d0['changes']);if(_0x3f4844[_0x35c4fd(0x11e)]){const _0x13757b=_0x4c20f1[_0x35c4fd(0x277)](_0x4c20f1[_0x35c4fd(0x272)](_0xac92bb),_0x35c4fd(0x11e));process[_0x35c4fd(0x268)][_0x35c4fd(0x2c0)](_0x35c4fd(0x1b6));const {count:_0x34a93c,bytes:_0xa7b0a0}=await _0x47c631[_0x35c4fd(0x2bc)]['exportBlobs'](_0x13757b);console['log'](_0x35c4fd(0x255)+_0x13757b+_0x35c4fd(0xe1)+_0x34a93c+'\x20file'+(_0x34a93c!==0x1?'s':'')+',\x20'+(_0xa7b0a0/0x400/0x400)['toFixed'](0x2)+'\x20MB)');}await _0x47c631[_0x35c4fd(0x2d6)](),console[_0x35c4fd(0x270)](_0x35c4fd(0x37f));}async function _0x45e73b(_0x5887d0,_0x14857c,_0x5c0cc1){const _0x422e35=_0x5230c9,_0x48073c=require$$5,_0x31bab9=_0x4c20f1[_0x422e35(0x10e)](_0x14857c['dbPath']),_0x3d6405=_0x5c0cc1[_0x422e35(0xc1)]??null,_0x2cb247=_0x5c0cc1['types']?_0x5c0cc1[_0x422e35(0x27d)]['split'](',')[_0x422e35(0x112)](_0xcdab57=>_0xcdab57[_0x422e35(0x11a)]()):null,_0x2c0bda=!!_0x5c0cc1[_0x422e35(0x2c1)];console[_0x422e35(0x270)](_0x422e35(0x28a)+_0x31bab9+'…');const _0x40d14d=new _0x48073c(_0x31bab9,_0x14857c[_0x422e35(0x321)]?{'encryptionKey':_0x14857c[_0x422e35(0x321)]}:{});await _0x40d14d[_0x422e35(0xe8)](),console[_0x422e35(0x270)]('[okdb]\x20importing\x20'+_0x5887d0+'…');const _0x40140f=await _0x40d14d[_0x422e35(0x2bc)][_0x422e35(0x159)](_0x5887d0,{'envName':_0x3d6405,'types':_0x2cb247,'dropExisting':_0x2c0bda,'includeChanges':!!_0x5c0cc1[_0x422e35(0x2cc)],'onProgress':({type:_0x6699d4,count:_0x9948dc})=>{const _0xa68d58=_0x422e35;process[_0xa68d58(0x268)][_0xa68d58(0x2c0)](_0xa68d58(0xe9)+_0x6699d4+':\x20'+_0x9948dc+_0xa68d58(0x39d));}});process[_0x422e35(0x268)]['write']('\x0a'),console[_0x422e35(0x270)](_0x422e35(0x274)+_0x40140f[_0x422e35(0x27d)]+_0x422e35(0x2a8)+_0x40140f[_0x422e35(0x2e8)]+'\x20\x20changes='+_0x40140f['changes']);if(_0x5c0cc1[_0x422e35(0x11e)]){const _0x2d0225=_0x4c20f1['join'](_0x4c20f1[_0x422e35(0x272)](_0x5887d0),_0x422e35(0x11e));if(_0x4850d0[_0x422e35(0x1da)](_0x2d0225)){const {imported:_0x3a3a22,skipped:_0x4ae6f1}=await _0x40d14d[_0x422e35(0x2bc)][_0x422e35(0x2af)](_0x2d0225);console['log'](_0x422e35(0x2a9)+_0x3a3a22+_0x422e35(0x115)+_0x4ae6f1);}}await _0x40d14d[_0x422e35(0x2d6)](),console[_0x422e35(0x270)]('[okdb]\x20import\x20complete');}async function _0x2ae153(_0x27850b,_0x5aed7f){const _0x37bc2d=_0x5230c9;_0x5aed7f[_0x37bc2d(0x252)]&&!_0x5aed7f[_0x37bc2d(0x30f)]&&(console[_0x37bc2d(0x254)](_0x37bc2d(0x1b9)),process[_0x37bc2d(0x229)](0x1));const _0x18f86c=_0x5aed7f[_0x37bc2d(0x2e3)]?_0x5aed7f[_0x37bc2d(0x2e3)][_0x37bc2d(0x311)](',')['map'](_0x863b02=>_0x863b02[_0x37bc2d(0x11a)]())['filter'](Boolean):[];let _0x124354={};if(_0x5aed7f[_0x37bc2d(0x380)])try{_0x124354=JSON[_0x37bc2d(0x1a5)](_0x5aed7f[_0x37bc2d(0x380)]);if(typeof _0x124354!==_0x37bc2d(0x23d)||Array[_0x37bc2d(0x211)](_0x124354)||_0x124354===null)throw new Error();}catch{console[_0x37bc2d(0x254)](_0x37bc2d(0x13b)),process[_0x37bc2d(0x229)](0x1);}const _0x13b103=require$$5,{randomToken:_0x27813d,hashToken:_0x1e4232,hashPassword:_0x20cc12}=requireOkdbAuthTokens(),_0x6075f4=require$$0,_0x28e09c=_0x4c20f1[_0x37bc2d(0x10e)](_0x27850b[_0x37bc2d(0x398)]),_0x3c0444=new _0x13b103(_0x28e09c,_0x27850b[_0x37bc2d(0x321)]?{'encryptionKey':_0x27850b[_0x37bc2d(0x321)]}:{});await _0x3c0444[_0x37bc2d(0xe8)]();try{await _0x3c0444['auth'][_0x37bc2d(0x120)]();if(_0x5aed7f[_0x37bc2d(0x30f)]){const _0x4099e4=await _0x3c0444[_0x37bc2d(0x170)]['_lookupByName'](_0x5aed7f[_0x37bc2d(0x30f)]);_0x4099e4&&(console['error'](_0x37bc2d(0x3be)+_0x5aed7f[_0x37bc2d(0x30f)]+'\x22\x20already\x20exists'),process[_0x37bc2d(0x229)](0x1));}const _0x2308a9=_0x27813d(0x20),_0x553508=_0x1e4232(_0x2308a9),_0x2edfc7=_0x5aed7f[_0x37bc2d(0x252)]?await _0x20cc12(_0x5aed7f[_0x37bc2d(0x252)]):null,_0x550a9c=_0x6075f4['randomUUID'](),_0x2837f9={'tokenHash':_0x553508,'name':_0x5aed7f[_0x37bc2d(0x30f)]||null,'passwordHash':_0x2edfc7,'label':_0x5aed7f['label']||null,'permissions':_0x18f86c,'grants':_0x124354,'createdAt':Date['now'](),'lastUsedAt':null},_0x9e76bc=_0x5aed7f['ttl']?{'ttl':Number(_0x5aed7f[_0x37bc2d(0x285)])}:undefined;await _0x3c0444['_systemEnv'][_0x37bc2d(0x3b6)](_0x37bc2d(0x217),_0x550a9c,_0x2837f9,_0x9e76bc),console['log'](_0x37bc2d(0x17a)),console['log'](_0x37bc2d(0x139)+_0x550a9c),console['log'](_0x37bc2d(0x30e)+(_0x5aed7f['name']||_0x37bc2d(0x23e))),console['log'](_0x37bc2d(0x30d)+(_0x5aed7f[_0x37bc2d(0xec)]||'(unset)')),console[_0x37bc2d(0x270)](_0x37bc2d(0x1bc)+(_0x18f86c['join'](',\x20')||_0x37bc2d(0x3ab))),console[_0x37bc2d(0x270)](_0x37bc2d(0x32e)),console[_0x37bc2d(0x270)]('\x20\x20\x20\x20'+_0x2308a9+'\x0a');}finally{await _0x3c0444[_0x37bc2d(0x2d6)]();}}async function _0x1a0869(_0x2590df){const _0x8bfe15=_0x5230c9,_0x3f8d87=require$$5,_0x33703c=_0x4c20f1[_0x8bfe15(0x10e)](_0x2590df[_0x8bfe15(0x398)]),_0x52c3be=new _0x3f8d87(_0x33703c,_0x2590df[_0x8bfe15(0x321)]?{'encryptionKey':_0x2590df[_0x8bfe15(0x321)]}:{});await _0x52c3be[_0x8bfe15(0xe8)]();try{const _0x5c2e3d=_0x52c3be[_0x8bfe15(0x3a2)];if(!_0x5c2e3d||!_0x5c2e3d[_0x8bfe15(0x1ed)]('~tokens')){console[_0x8bfe15(0x270)](_0x8bfe15(0x2b1));return;}const _0x3b0913=[];for(const {key:_0x5a4b28,value:_0x20469b}of _0x5c2e3d[_0x8bfe15(0x327)](_0x8bfe15(0x217))){_0x3b0913['push']({'id':_0x5a4b28,'name':_0x20469b['name']||_0x8bfe15(0x23e),'label':_0x20469b[_0x8bfe15(0xec)]||_0x8bfe15(0x23e),'permissions':Array[_0x8bfe15(0x211)](_0x20469b[_0x8bfe15(0x2e3)])?_0x20469b[_0x8bfe15(0x2e3)][_0x8bfe15(0x277)](','):'','created':_0x20469b[_0x8bfe15(0x2eb)]?new Date(_0x20469b['createdAt'])['toISOString']()[_0x8bfe15(0x144)](0x0,0xa):''});}if(_0x3b0913['length']===0x0){console[_0x8bfe15(0x270)]('No\x20tokens.');return;}const _0x5a29b3=!process[_0x8bfe15(0x268)][_0x8bfe15(0x279)]||process[_0x8bfe15(0x268)]['columns']>=0x64,_0x473b39=_0x5a29b3?0x24:0xa,_0x40056b=['ID'['padEnd'](_0x473b39),'NAME'[_0x8bfe15(0x111)](0x10),_0x8bfe15(0x18e)[_0x8bfe15(0x111)](0x14),_0x8bfe15(0x1d2)[_0x8bfe15(0x111)](0x14),'CREATED'][_0x8bfe15(0x277)]('\x20\x20');console[_0x8bfe15(0x270)]('\x0a'+_0x40056b),console['log']('-'[_0x8bfe15(0x376)](_0x40056b['length']));for(const _0x24e915 of _0x3b0913){const _0x284815=_0x5a29b3?_0x24e915['id']:_0x24e915['id'][_0x8bfe15(0x144)](0x0,0x8)+'…';console['log']([_0x284815[_0x8bfe15(0x111)](_0x473b39),_0x24e915[_0x8bfe15(0x30f)][_0x8bfe15(0x144)](0x0,0x10)[_0x8bfe15(0x111)](0x10),_0x24e915['label'][_0x8bfe15(0x144)](0x0,0x14)[_0x8bfe15(0x111)](0x14),_0x24e915[_0x8bfe15(0x2e3)][_0x8bfe15(0x144)](0x0,0x14)[_0x8bfe15(0x111)](0x14),_0x24e915['created']][_0x8bfe15(0x277)]('\x20\x20'));}console['log']('');}finally{await _0x52c3be[_0x8bfe15(0x2d6)]();}}async function _0x215560(_0x87f16a,_0x1a0b1e){const _0x4aabbe=_0x5230c9;!_0x87f16a&&(console[_0x4aabbe(0x254)](_0x4aabbe(0xeb)),process[_0x4aabbe(0x229)](0x1));const _0x116bdf=require$$5,_0x5cb1a0=_0x4c20f1[_0x4aabbe(0x10e)](_0x1a0b1e[_0x4aabbe(0x398)]),_0x57c7b1=new _0x116bdf(_0x5cb1a0,_0x1a0b1e[_0x4aabbe(0x321)]?{'encryptionKey':_0x1a0b1e['key']}:{});await _0x57c7b1[_0x4aabbe(0xe8)]();try{const _0x594d28=_0x57c7b1[_0x4aabbe(0x3a2)];(!_0x594d28||!_0x594d28['hasType'](_0x4aabbe(0x217)))&&(console[_0x4aabbe(0x254)](_0x4aabbe(0x1ae)+_0x87f16a+'\x22'),process['exit'](0x1));let _0x14fc1c=null,_0x88159b=null;const _0x3f882e=_0x594d28[_0x4aabbe(0x167)](_0x4aabbe(0x217),_0x87f16a);if(_0x3f882e)_0x14fc1c=_0x87f16a,_0x88159b=_0x3f882e;else{const _0x5d7c9b=[];for(const {key:_0xcece52,value:_0x4cca89}of _0x594d28['getRange'](_0x4aabbe(0x217))){if(_0xcece52[_0x4aabbe(0xf4)](_0x87f16a))_0x5d7c9b[_0x4aabbe(0x2ad)]({'key':_0xcece52,'value':_0x4cca89});}_0x5d7c9b[_0x4aabbe(0x32b)]===0x0&&(console['error'](_0x4aabbe(0x1ae)+_0x87f16a+'\x22'),process[_0x4aabbe(0x229)](0x1));if(_0x5d7c9b[_0x4aabbe(0x32b)]>0x1){console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x87f16a+_0x4aabbe(0x378)+_0x5d7c9b[_0x4aabbe(0x32b)]+_0x4aabbe(0xf0));for(const _0x29fcb6 of _0x5d7c9b){console[_0x4aabbe(0x254)]('\x20\x20'+_0x29fcb6[_0x4aabbe(0x321)]+_0x4aabbe(0x33f)+(_0x29fcb6['value'][_0x4aabbe(0x30f)]||'(unset)')+')');}process[_0x4aabbe(0x229)](0x1);}_0x14fc1c=_0x5d7c9b[0x0][_0x4aabbe(0x321)],_0x88159b=_0x5d7c9b[0x0][_0x4aabbe(0x11c)];}await _0x594d28[_0x4aabbe(0x1bd)]('~tokens',_0x14fc1c),console['log'](_0x4aabbe(0x122)+_0x14fc1c+'\x20\x20(name:\x20'+(_0x88159b[_0x4aabbe(0x30f)]||'(unset)')+',\x20label:\x20'+(_0x88159b[_0x4aabbe(0xec)]||'(unset)')+')');}finally{await _0x57c7b1[_0x4aabbe(0x2d6)]();}}function _0x115ed9(_0x15cd5f,_0x1bbff9){const _0x247cbf=_0x5230c9;if(!_0x15cd5f[_0x247cbf(0x141)])return'pending';const _0x5a5054=_0x15cd5f[_0x247cbf(0x3ac)];if(!_0x5a5054)return'active';if(_0x1bbff9>_0x5a5054)return _0x247cbf(0x19c);return _0x247cbf(0x33d);}function _0x2b43b3(_0x42b155){const _0x13aa30=_0x5230c9;if(!_0x42b155||typeof _0x42b155!=='object')return'';const _0x4e1402=Object[_0x13aa30(0x2a7)](_0x42b155)[_0x13aa30(0x206)](([,_0x425562])=>_0x425562)[_0x13aa30(0x112)](([_0x208047])=>_0x208047);if(_0x4e1402[_0x13aa30(0x32b)]===0x0)return _0x13aa30(0x3ab);if(_0x4e1402['length']<=0x3)return _0x4e1402[_0x13aa30(0x277)]('\x20');return _0x4e1402[_0x13aa30(0x144)](0x0,0x3)['join']('\x20')+('\x20+'+(_0x4e1402[_0x13aa30(0x32b)]-0x3));}async function _0x3a0eb0(_0x1a0ebb){const _0x38a6b5=_0x5230c9,_0xd93599=require$$5,_0x135826=requireOkdbLicenseCodec(),{_C:_0x5b6b57}=requireOkdbLicense(),_0x38b96f=_0x4c20f1[_0x38a6b5(0x10e)](_0x1a0ebb[_0x38a6b5(0x398)]),_0x28d9a1=new _0xd93599(_0x38b96f,_0x1a0ebb[_0x38a6b5(0x321)]?{'encryptionKey':_0x1a0ebb[_0x38a6b5(0x321)]}:{});await _0x28d9a1[_0x38a6b5(0xe8)]();try{const _0x273ace=_0x28d9a1[_0x38a6b5(0x3a2)],_0x4fe20a=_0x273ace?.['db']?.[_0x38a6b5(0x167)]?.(_0x38a6b5(0x264))??0x0,_0x4c0a64=[..._0x28d9a1[_0x38a6b5(0xbb)][_0x38a6b5(0x16e)]()][_0x38a6b5(0x206)](_0x4d16af=>!_0x4d16af[_0x38a6b5(0xf4)]('~'))[_0x38a6b5(0x32b)],_0x3a603c=_0x28d9a1[_0x38a6b5(0x13c)]?.[_0x38a6b5(0x1a6)];if(_0x3a603c){const _0xdc6072=_0x3a603c[_0x38a6b5(0xc8)]===!![],_0x36a1f2=_0xdc6072?_0x38a6b5(0x300):_0x28d9a1[_0x38a6b5(0x13c)][_0x38a6b5(0x33d)]?.[_0x38a6b5(0x1d7)]||_0x38a6b5(0x2be);console[_0x38a6b5(0x270)](''),console[_0x38a6b5(0x270)](_0x38a6b5(0x1f8)+_0x36a1f2);const _0x92e89f=_0x3a603c[_0x38a6b5(0x2d9)]||{};if(_0x92e89f['maxWrites']){const _0x101d2a=Math[_0x38a6b5(0x27e)](_0x4fe20a/_0x92e89f[_0x38a6b5(0x1f1)]*0x64);console['log'](_0x38a6b5(0x22f)+_0x4fe20a['toLocaleString']()+_0x38a6b5(0x222)+_0x92e89f[_0x38a6b5(0x1f1)][_0x38a6b5(0x332)]()+_0x38a6b5(0xe1)+_0x101d2a+'%)');}else console['log']('\x20\x20Writes:\x20\x20'+_0x4fe20a[_0x38a6b5(0x332)]());_0x92e89f[_0x38a6b5(0x348)]?console[_0x38a6b5(0x270)](_0x38a6b5(0x149)+_0x4c0a64+'\x20/\x20'+_0x92e89f[_0x38a6b5(0x348)]):console['log'](_0x38a6b5(0x149)+_0x4c0a64),_0x5b6b57?.[_0x38a6b5(0x1ef)]&&console['log'](_0x38a6b5(0x31c)+_0x5b6b57[_0x38a6b5(0x1ef)]+_0x38a6b5(0x330));}if(!_0x273ace||!_0x273ace[_0x38a6b5(0x1ed)](_0x38a6b5(0x362))){console[_0x38a6b5(0x270)](''),console[_0x38a6b5(0x270)](_0x38a6b5(0x2b5)),console[_0x38a6b5(0x270)]('');return;}const _0xf7567d=[],_0x642f0f=Date['now'](),_0x5cb900=_0x28d9a1['id'],_0x1b99c5=_0x38a6b5(0xde);for(const {key:_0x656d61,value:_0x966e54}of _0x273ace[_0x38a6b5(0x327)](_0x38a6b5(0x362))){const _0x4fed00=_0x966e54['_licenseHash']?Buffer[_0x38a6b5(0xf2)](_0x966e54['_licenseHash'],_0x38a6b5(0x316)):Buffer[_0x38a6b5(0x3b5)](0x8);let _0x5b6c44='';try{_0x5b6c44=_0x135826[_0x38a6b5(0x313)](_0x5cb900,_0x4fed00,_0x1b99c5)['pin'];}catch{}_0xf7567d[_0x38a6b5(0x2ad)]({'id':_0x656d61,'licensee':_0x966e54[_0x38a6b5(0x1d7)]||'','expires':_0x966e54[_0x38a6b5(0x3ac)]?new Date(_0x966e54[_0x38a6b5(0x3ac)])[_0x38a6b5(0x236)]()[_0x38a6b5(0x144)](0x0,0xa):'','features':_0x2b43b3(_0x966e54[_0x38a6b5(0x2fc)]),'pin':_0x5b6c44,'status':_0x115ed9(_0x966e54,_0x642f0f)});}if(_0xf7567d[_0x38a6b5(0x32b)]===0x0){console[_0x38a6b5(0x270)](''),console['log']('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x38a6b5(0x270)]('');return;}const _0x4b40d5=['\x20\x20'+'ID'[_0x38a6b5(0x111)](0xe),_0x38a6b5(0xf3)[_0x38a6b5(0x111)](0xe),_0x38a6b5(0x2fa)['padEnd'](0xc),'FEATURES'['padEnd'](0x1e),_0x38a6b5(0x35f)['padEnd'](0xa),'STATUS'][_0x38a6b5(0x277)]('\x20');console[_0x38a6b5(0x270)]('\x0a'+_0x4b40d5);for(const _0x1d5952 of _0xf7567d){const _0x30390b=_0x1d5952['id'][_0x38a6b5(0x144)](0x0,0x8)+'…';console[_0x38a6b5(0x270)](['\x20\x20'+_0x30390b[_0x38a6b5(0x111)](0xe),_0x1d5952[_0x38a6b5(0x1d7)][_0x38a6b5(0x144)](0x0,0xe)[_0x38a6b5(0x111)](0xe),_0x1d5952[_0x38a6b5(0x2d0)]['padEnd'](0xc),_0x1d5952[_0x38a6b5(0x2fc)][_0x38a6b5(0x144)](0x0,0x1e)[_0x38a6b5(0x111)](0x1e),_0x1d5952[_0x38a6b5(0x195)]['padEnd'](0xa),_0x1d5952['status']][_0x38a6b5(0x277)]('\x20'));}console['log']('');}finally{await _0x28d9a1[_0x38a6b5(0x2d6)]();}}async function _0x1b82df(_0x340d73,_0x2cd6c7){const _0x4e6892=_0x5230c9,_0x3020f8=require$$5,_0x4ba199=requireOkdbLicenseCodec();let _0x1d7322=_0x340d73;(_0x4ba199[_0x4e6892(0xe5)](_0x340d73)===_0x4e6892(0x1b1)||_0x4850d0['existsSync'](_0x340d73)&&_0x4850d0[_0x4e6892(0x329)](_0x340d73)['isFile']())&&(_0x1d7322=_0x4850d0[_0x4e6892(0x14a)](_0x340d73,_0x4e6892(0x31f))[_0x4e6892(0x11a)]());const _0x266ff9=_0x4c20f1[_0x4e6892(0x10e)](_0x2cd6c7['dbPath']),_0x115fb0=new _0x3020f8(_0x266ff9,_0x2cd6c7[_0x4e6892(0x321)]?{'encryptionKey':_0x2cd6c7[_0x4e6892(0x321)]}:{});await _0x115fb0['open']();try{!_0x115fb0[_0x4e6892(0x13c)]&&(console['error']('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x4e6892(0x229)](0x1));let _0xc6ce56;try{_0xc6ce56=await _0x115fb0[_0x4e6892(0x13c)][_0x4e6892(0x121)](_0x1d7322);}catch(_0x40b2f4){console['error'](_0x4e6892(0x318)+_0x40b2f4[_0x4e6892(0x18d)]),process[_0x4e6892(0x229)](0x1);}const _0x3e9148=_0x115fb0[_0x4e6892(0x13c)]['getPins'](),_0x4bc942=_0x3e9148[_0x4e6892(0x1a4)](_0x3cd7b4=>_0x3cd7b4[_0x4e6892(0xd7)]===_0xc6ce56['id'])?.[_0x4e6892(0x195)]||'',_0x5f2ade=Object[_0x4e6892(0x2a7)](_0xc6ce56[_0x4e6892(0x2fc)]||{})['filter'](([,_0x25dec4])=>_0x25dec4)[_0x4e6892(0x112)](([_0x548544])=>_0x548544),_0x397a24=_0xc6ce56[_0x4e6892(0x2d9)]||{},_0x5cb172=[_0x397a24[_0x4e6892(0x348)]?_0x4e6892(0xd6)+_0x397a24[_0x4e6892(0x348)]:null,_0x397a24['typesPerEnv']?_0x4e6892(0x184)+_0x397a24[_0x4e6892(0x373)]:null,_0x397a24[_0x4e6892(0x223)]?'peers='+_0x397a24[_0x4e6892(0x223)]:null,_0x397a24[_0x4e6892(0x1f1)]?_0x4e6892(0x22a)+_0x397a24['maxWrites'][_0x4e6892(0x332)]():null][_0x4e6892(0x206)](Boolean)[_0x4e6892(0x277)]('\x20\x20'),_0x5dc242=_0xc6ce56[_0x4e6892(0x24d)]===_0x4ba199['LICENSE_TYPE_OPEN'];console[_0x4e6892(0x270)]('\x0a\x20\x20✓\x20License\x20added'),console[_0x4e6892(0x270)](_0x4e6892(0x1e1)+_0xc6ce56['id']),console[_0x4e6892(0x270)]('\x20\x20\x20\x20licensee:\x20\x20'+_0xc6ce56[_0x4e6892(0x1d7)]),console[_0x4e6892(0x270)](_0x4e6892(0x34a)+new Date(_0xc6ce56[_0x4e6892(0x3ac)])[_0x4e6892(0x236)]()[_0x4e6892(0x144)](0x0,0xa)),console[_0x4e6892(0x270)](_0x4e6892(0x297)+(_0x5f2ade['join'](',\x20')||_0x4e6892(0x3ab)));if(_0x5cb172)console['log'](_0x4e6892(0x24c)+_0x5cb172);_0x5dc242?(console[_0x4e6892(0x270)](_0x4e6892(0x294)),console['log']('')):(console['log'](_0x4e6892(0x37d)+_0x4bc942),console['log'](_0x4e6892(0xd0)),console[_0x4e6892(0x270)](''),console[_0x4e6892(0x270)](_0x4e6892(0xe4)),console['log'](_0x4e6892(0x182)+_0x4bc942+')\x20to\x20your\x20license\x20vendor.'),console['log'](_0x4e6892(0x2ec)),console[_0x4e6892(0x270)](_0x4e6892(0x14b)),console['log'](''));}finally{await _0x115fb0[_0x4e6892(0x2d6)]();}}async function _0x1fc597(_0x1eeedf,_0x299744){const _0x5eb4f6=_0x5230c9,_0x3d097d=require$$5,_0x3f7b51=_0x4c20f1[_0x5eb4f6(0x10e)](_0x299744[_0x5eb4f6(0x398)]),_0x244d18=new _0x3d097d(_0x3f7b51,_0x299744[_0x5eb4f6(0x321)]?{'encryptionKey':_0x299744[_0x5eb4f6(0x321)]}:{});await _0x244d18['open']();try{!_0x244d18[_0x5eb4f6(0x13c)]&&(console[_0x5eb4f6(0x254)](_0x5eb4f6(0x133)),process[_0x5eb4f6(0x229)](0x1));let _0x329bed;try{_0x329bed=await _0x244d18['_license'][_0x5eb4f6(0x2f4)](_0x1eeedf[_0x5eb4f6(0x11a)]());}catch(_0x1586cc){console[_0x5eb4f6(0x254)](_0x5eb4f6(0x318)+_0x1586cc[_0x5eb4f6(0x18d)]),console[_0x5eb4f6(0x254)](''),console[_0x5eb4f6(0x254)](_0x5eb4f6(0x18b)),console[_0x5eb4f6(0x254)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0x5eb4f6(0x254)](_0x5eb4f6(0x174)),console[_0x5eb4f6(0x254)](_0x5eb4f6(0x312)),console[_0x5eb4f6(0x254)](''),process[_0x5eb4f6(0x229)](0x1);}console[_0x5eb4f6(0x270)]('\x0a\x20\x20✓\x20License\x20activated'),console[_0x5eb4f6(0x270)](_0x5eb4f6(0x1e1)+_0x329bed['id']),console['log'](_0x5eb4f6(0x2f3)+_0x329bed[_0x5eb4f6(0x1d7)]),console[_0x5eb4f6(0x270)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x329bed['expiresAt'])[_0x5eb4f6(0x236)]()['slice'](0x0,0xa)),console[_0x5eb4f6(0x270)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x5eb4f6(0x270)]('');}finally{await _0x244d18[_0x5eb4f6(0x2d6)]();}}async function _0x12574f(_0x4f4e6a,_0x1a0d82){const _0x3ebb08=_0x5230c9;!_0x4f4e6a&&(console[_0x3ebb08(0x254)](_0x3ebb08(0x23b)),process[_0x3ebb08(0x229)](0x1));const _0x12f8f8=require$$5,_0x4b21d9=requireOkdbLicenseCodec(),_0x58664b=_0x4c20f1[_0x3ebb08(0x10e)](_0x1a0d82[_0x3ebb08(0x398)]),_0x2ab37b=new _0x12f8f8(_0x58664b,_0x1a0d82['key']?{'encryptionKey':_0x1a0d82[_0x3ebb08(0x321)]}:{});await _0x2ab37b['open']();try{const _0x15f286=_0x2ab37b[_0x3ebb08(0x3a2)];(!_0x15f286||!_0x15f286[_0x3ebb08(0x1ed)](_0x3ebb08(0x362)))&&(console[_0x3ebb08(0x254)](_0x3ebb08(0x130)+_0x4f4e6a+'\x22'),process[_0x3ebb08(0x229)](0x1));let _0x17435b=null,_0x1dfd7f=null;const _0x324622=_0x15f286[_0x3ebb08(0x167)](_0x3ebb08(0x362),_0x4f4e6a);if(_0x324622)_0x17435b=_0x4f4e6a,_0x1dfd7f=_0x324622;else{const _0x600b86=[];for(const {key:_0x53c3ef,value:_0x5249a2}of _0x15f286['getRange'](_0x3ebb08(0x362))){if(_0x53c3ef[_0x3ebb08(0xf4)](_0x4f4e6a))_0x600b86[_0x3ebb08(0x2ad)]({'key':_0x53c3ef,'value':_0x5249a2});}_0x600b86[_0x3ebb08(0x32b)]===0x0&&(console[_0x3ebb08(0x254)](_0x3ebb08(0x130)+_0x4f4e6a+'\x22'),process['exit'](0x1)),_0x600b86[_0x3ebb08(0x32b)]>0x1&&(console['error'](_0x3ebb08(0x2ef)+_0x4f4e6a+_0x3ebb08(0x378)+_0x600b86[_0x3ebb08(0x32b)]+_0x3ebb08(0x319)),process[_0x3ebb08(0x229)](0x1)),_0x17435b=_0x600b86[0x0][_0x3ebb08(0x321)],_0x1dfd7f=_0x600b86[0x0][_0x3ebb08(0x11c)];}const _0x18679a=Date[_0x3ebb08(0x1f5)](),_0x462030=_0x115ed9(_0x1dfd7f,_0x18679a),_0x96cbc4=_0x2ab37b['id'],_0x2025cd=_0x3ebb08(0xde);let _0x27b416='';try{const _0x35afa0=Buffer[_0x3ebb08(0xf2)](_0x1dfd7f[_0x3ebb08(0xc0)],_0x3ebb08(0x316));_0x27b416=_0x4b21d9[_0x3ebb08(0x313)](_0x96cbc4,_0x35afa0,_0x2025cd)[_0x3ebb08(0x195)];}catch{}const _0x2fff0f=_0x1dfd7f[_0x3ebb08(0x2fc)]?Object['entries'](_0x1dfd7f['features'])[_0x3ebb08(0x206)](([,_0x222827])=>_0x222827)[_0x3ebb08(0x112)](([_0x4314cf])=>_0x4314cf):[],_0x25f972=_0x1dfd7f[_0x3ebb08(0x2d9)]||{},_0x544f20=_0x15f286?.['db']?.['get']?.(_0x3ebb08(0x264))??0x0,_0x12454e=[..._0x2ab37b['_envs'][_0x3ebb08(0x16e)]()][_0x3ebb08(0x206)](_0x8a7dbc=>!_0x8a7dbc[_0x3ebb08(0xf4)]('~'))[_0x3ebb08(0x32b)];console[_0x3ebb08(0x270)](_0x3ebb08(0x1b5)),console[_0x3ebb08(0x270)](_0x3ebb08(0x1e1)+_0x17435b),console[_0x3ebb08(0x270)](_0x3ebb08(0x2f3)+(_0x1dfd7f[_0x3ebb08(0x1d7)]||'')),console[_0x3ebb08(0x270)](_0x3ebb08(0x34a)+(_0x1dfd7f['expiresAt']?new Date(_0x1dfd7f['expiresAt'])['toISOString']()[_0x3ebb08(0x144)](0x0,0xa):'')),console['log']('\x20\x20\x20\x20features:\x20\x20'+(_0x2fff0f['join'](',\x20')||_0x3ebb08(0x3ab))),console[_0x3ebb08(0x270)](_0x3ebb08(0x37d)+_0x27b416),console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x462030),console['log'](_0x3ebb08(0xfd)+new Date(_0x1dfd7f[_0x3ebb08(0x35d)])[_0x3ebb08(0x236)]());if(_0x462030==='active'){console[_0x3ebb08(0x270)](''),console['log'](_0x3ebb08(0xfc));if(_0x25f972[_0x3ebb08(0x1f1)]){const _0xfd5d72=Math['round'](_0x544f20/_0x25f972['maxWrites']*0x64);console[_0x3ebb08(0x270)](_0x3ebb08(0x2b0)+_0x544f20[_0x3ebb08(0x332)]()+_0x3ebb08(0x222)+_0x25f972[_0x3ebb08(0x1f1)]['toLocaleString']()+'\x20\x20('+_0xfd5d72+'%)');}else console[_0x3ebb08(0x270)](_0x3ebb08(0x2b0)+_0x544f20[_0x3ebb08(0x332)]()+'\x20\x20(unlimited)');_0x25f972[_0x3ebb08(0x348)]?console[_0x3ebb08(0x270)](_0x3ebb08(0x17e)+_0x12454e+_0x3ebb08(0x222)+_0x25f972[_0x3ebb08(0x348)]):console[_0x3ebb08(0x270)](_0x3ebb08(0x17e)+_0x12454e+_0x3ebb08(0x377));}console[_0x3ebb08(0x270)]('');}finally{await _0x2ab37b[_0x3ebb08(0x2d6)]();}}async function _0x33e03f(_0x190ca9,_0x2ede84){const _0x5c5e8d=_0x5230c9;!_0x190ca9&&(console[_0x5c5e8d(0x254)](_0x5c5e8d(0x37c)),process[_0x5c5e8d(0x229)](0x1));const _0x3e7b7b=require$$5,_0x28a432=_0x4c20f1['resolve'](_0x2ede84[_0x5c5e8d(0x398)]),_0x48671b=new _0x3e7b7b(_0x28a432,_0x2ede84[_0x5c5e8d(0x321)]?{'encryptionKey':_0x2ede84[_0x5c5e8d(0x321)]}:{});await _0x48671b['open']();try{const _0x377cf4=_0x48671b[_0x5c5e8d(0x3a2)];(!_0x377cf4||!_0x377cf4[_0x5c5e8d(0x1ed)](_0x5c5e8d(0x362)))&&(console[_0x5c5e8d(0x254)](_0x5c5e8d(0x130)+_0x190ca9+'\x22'),process[_0x5c5e8d(0x229)](0x1));let _0x525da0=null,_0x58fcd8=null;const _0x1bfb1e=_0x377cf4[_0x5c5e8d(0x167)]('~licenses',_0x190ca9);if(_0x1bfb1e)_0x525da0=_0x190ca9,_0x58fcd8=_0x1bfb1e;else{const _0x29a40b=[];for(const {key:_0x31dabc,value:_0x978350}of _0x377cf4[_0x5c5e8d(0x327)](_0x5c5e8d(0x362))){if(_0x31dabc[_0x5c5e8d(0xf4)](_0x190ca9))_0x29a40b[_0x5c5e8d(0x2ad)]({'key':_0x31dabc,'value':_0x978350});}_0x29a40b['length']===0x0&&(console[_0x5c5e8d(0x254)](_0x5c5e8d(0x130)+_0x190ca9+'\x22'),process['exit'](0x1)),_0x29a40b[_0x5c5e8d(0x32b)]>0x1&&(console['error'](_0x5c5e8d(0x2ef)+_0x190ca9+_0x5c5e8d(0x378)+_0x29a40b[_0x5c5e8d(0x32b)]+'\x20licenses'),process['exit'](0x1)),_0x525da0=_0x29a40b[0x0][_0x5c5e8d(0x321)],_0x58fcd8=_0x29a40b[0x0]['value'];}await _0x377cf4[_0x5c5e8d(0x1bd)]('~licenses',_0x525da0),console[_0x5c5e8d(0x270)](_0x5c5e8d(0x375)+_0x525da0+_0x5c5e8d(0x1a1)+(_0x58fcd8[_0x5c5e8d(0x1d7)]||_0x5c5e8d(0x23e))+')');}finally{await _0x48671b[_0x5c5e8d(0x2d6)]();}}async function _0x316530(_0x14f03f,_0x217fbf,_0xfba2ca){const _0x9c1f4b=_0x5230c9;!_0x14f03f&&(console['error'](_0x9c1f4b(0x210)),process[_0x9c1f4b(0x229)](0x1));!_0xfba2ca['token']&&!(_0xfba2ca[_0x9c1f4b(0x352)]&&_0xfba2ca[_0x9c1f4b(0x252)])&&(console[_0x9c1f4b(0x254)](_0x9c1f4b(0x3ad)),process[_0x9c1f4b(0x229)](0x1));const _0x4a41c8=_0xfba2ca['selfAddress']||_0x217fbf[_0x9c1f4b(0x363)]?.[_0x9c1f4b(0x342)];!_0x4a41c8&&(console[_0x9c1f4b(0x254)]('[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a'+_0x9c1f4b(0xc6)+_0x9c1f4b(0x323)),process[_0x9c1f4b(0x229)](0x1));const _0x454cd1=require$$5,_0x380eb5=new _0x454cd1(_0x217fbf['dbPath'],{'sync':{'address':_0x4a41c8,'auto_reconcile':![]}});await _0x380eb5[_0x9c1f4b(0xe8)]();try{const _0x5a2b6f=_0x380eb5['_systemEnv'];if(_0x5a2b6f&&_0x5a2b6f[_0x9c1f4b(0x1ed)]('~tokens')){let _0x374ca0=![];for(const _0x409985 of _0x5a2b6f['getRange'](_0x9c1f4b(0x217))){_0x374ca0=!![];break;}_0x374ca0&&console[_0x9c1f4b(0x270)](_0x9c1f4b(0x26e)+_0x9c1f4b(0x31b));}console['log'](_0x9c1f4b(0x16f)+_0x14f03f+'…'),await _0x380eb5[_0x9c1f4b(0x363)][_0x9c1f4b(0x277)](_0x14f03f[_0x9c1f4b(0x1c4)](/\/+$/,''),{'token':_0xfba2ca[_0x9c1f4b(0x39a)],'username':_0xfba2ca[_0x9c1f4b(0x352)],'password':_0xfba2ca['password']}),console[_0x9c1f4b(0x270)](_0x9c1f4b(0x136)),console[_0x9c1f4b(0x270)]('\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a');}finally{await _0x380eb5[_0x9c1f4b(0x2d6)]();}}async function _0x5f130c(){const _0x5f1fbc=_0x5230c9,_0x484add=Date[_0x5f1fbc(0x1f5)](),_0x1b1670=_0x2798fe(process['argv']),_0x21a6e2=_0x1fc862(_0x1b1670),_0x172fa5=_0x4c20f1[_0x5f1fbc(0x10e)](_0x21a6e2[_0x5f1fbc(0x398)]);!_0x21a6e2[_0x5f1fbc(0x3bb)]&&!process[_0x5f1fbc(0x2f0)][_0x5f1fbc(0xea)]&&(_0x21a6e2[_0x5f1fbc(0x3bb)]=!![]);const _0x2fd31d=require$$5,{start:_0x57285d,colorLog:_0x37d829}=requireOkdbShell(),_0x24e28b={..._0x21a6e2[_0x5f1fbc(0x321)]?{'encryptionKey':_0x21a6e2['key']}:{},..._0x21a6e2[_0x5f1fbc(0x161)]?{'admin':![]}:_0x2e1402(_0x21a6e2[_0x5f1fbc(0x243)])?{'admin':_0x21a6e2[_0x5f1fbc(0x243)]}:{},..._0x2e1402(_0x21a6e2[_0x5f1fbc(0x29c)])?{'api':_0x21a6e2[_0x5f1fbc(0x29c)]}:{},..._0x2e1402(_0x21a6e2[_0x5f1fbc(0x170)])?{'auth':_0x21a6e2[_0x5f1fbc(0x170)]}:{},..._0x2e1402(_0x21a6e2[_0x5f1fbc(0x2ac)])?{'mcp':_0x21a6e2['mcp']}:{},..._0x21a6e2[_0x5f1fbc(0x21f)]!==![]?{'timeMachine':_0x21a6e2['timeMachine']}:{}},_0x4a5fe5=new _0x2fd31d(_0x172fa5,_0x24e28b);_0x4a5fe5[_0x5f1fbc(0x270)]['detachConsole']?.();const _0x2cbef6=_0x4a5fe5[_0x5f1fbc(0x270)]['attach'](_0x119eea=>_0x37d829(_0x119eea,_0x21a6e2[_0x5f1fbc(0x2f1)]));if(_0x21a6e2[_0x5f1fbc(0x3bb)])process['stdout'][_0x5f1fbc(0x2c0)]('[okdb]\x20starting…\x0a');await _0x4a5fe5[_0x5f1fbc(0xe8)]();if(_0x21a6e2[_0x5f1fbc(0x3bb)])process[_0x5f1fbc(0x268)][_0x5f1fbc(0x2c0)](_0x5f1fbc(0x175));try{await _0x1c0eae(_0x4a5fe5,_0x21a6e2[_0x5f1fbc(0x2b6)]);}catch(_0x1feccc){_0x1feccc[_0x5f1fbc(0x10b)]===_0x5f1fbc(0x1fd)&&(console[_0x5f1fbc(0x254)](_0x5f1fbc(0x271)+_0x21a6e2[_0x5f1fbc(0x2b6)]+_0x5f1fbc(0x24f)),process[_0x5f1fbc(0x229)](0x1));throw _0x1feccc;}if(_0x21a6e2[_0x5f1fbc(0x3bb)])process['stdout'][_0x5f1fbc(0x2c0)](_0x5f1fbc(0x179)+_0x21a6e2[_0x5f1fbc(0x2b6)]+'\x0a');if(!_0x21a6e2[_0x5f1fbc(0x3bb)])_0x4a5fe5['log'][_0x5f1fbc(0x343)]?.(),_0x2cbef6?.(),_0x47c70e(_0x4a5fe5[_0x5f1fbc(0x170)]?.[_0x5f1fbc(0x246)]?.()??[]),await _0x57285d(_0x4a5fe5,_0x21a6e2);else{const _0x3ea792=_0x4c20f1[_0x5f1fbc(0x277)](_0x172fa5,_0x5f1fbc(0x1ad));try{_0x4850d0['writeFileSync'](_0x3ea792,String(process[_0x5f1fbc(0x282)]));}catch{}const _0x2afe46=Date['now']()-_0x484add;console[_0x5f1fbc(0x270)](''),console[_0x5f1fbc(0x270)](_0x5f1fbc(0x1b2)),console['log'](_0x5f1fbc(0x163)+_0x21a6e2[_0x5f1fbc(0x2b6)]),console[_0x5f1fbc(0x270)]('\x20\x20\x20\x20path:\x20\x20'+_0x172fa5),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x4a5fe5['id']);{const _0x43f9d5=_0x4a5fe5[_0x5f1fbc(0x3a2)]?.['db']?.[_0x5f1fbc(0x167)]?.(_0x5f1fbc(0x264))??0x0,_0x506fdc=[..._0x4a5fe5[_0x5f1fbc(0xbb)]['keys']()]['filter'](_0xbd01fe=>!_0xbd01fe[_0x5f1fbc(0xf4)]('~'))[_0x5f1fbc(0x32b)];if(_0x4a5fe5['_license']?.[_0x5f1fbc(0x33d)]?.['licenseType']===0x1){const _0x4c21f5=Math[_0x5f1fbc(0x2e1)]((_0x4a5fe5[_0x5f1fbc(0x13c)]['active'][_0x5f1fbc(0x3ac)]-Date['now']())/0x5265c00);console[_0x5f1fbc(0x270)](_0x5f1fbc(0x21b)+_0x4a5fe5['_license'][_0x5f1fbc(0x33d)][_0x5f1fbc(0x1d7)]+'\x20(expires\x20in\x20'+_0x4c21f5+_0x5f1fbc(0x17f));}else{if(_0x4a5fe5[_0x5f1fbc(0x13c)]?.[_0x5f1fbc(0x33d)]){const _0x11114a=_0x4a5fe5[_0x5f1fbc(0x13c)][_0x5f1fbc(0x33d)];console['log'](_0x5f1fbc(0x231)+_0x11114a[_0x5f1fbc(0x1d7)]+'\x20(expires\x20'+new Date(_0x11114a[_0x5f1fbc(0x3ac)])[_0x5f1fbc(0x236)]()[_0x5f1fbc(0x144)](0x0,0xa)+')');const _0xfbf7ee=_0x11114a[_0x5f1fbc(0x2d9)]||{};if(_0xfbf7ee[_0x5f1fbc(0x1f1)]){const _0x397558=Math['round'](_0x43f9d5/_0xfbf7ee['maxWrites']*0x64);console[_0x5f1fbc(0x270)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x43f9d5[_0x5f1fbc(0x332)]()+_0x5f1fbc(0x222)+_0xfbf7ee[_0x5f1fbc(0x1f1)][_0x5f1fbc(0x332)]()+'\x20writes\x20('+_0x397558+_0x5f1fbc(0x31d)+_0x506fdc+(_0xfbf7ee[_0x5f1fbc(0x348)]?'/'+_0xfbf7ee[_0x5f1fbc(0x348)]:'')+'\x20env'+(_0x506fdc===0x1?'':'s'));}}else{if(_0x4a5fe5[_0x5f1fbc(0x13c)]){const _0x2b95ec=_0x4a5fe5[_0x5f1fbc(0x13c)][_0x5f1fbc(0x3a6)](),_0x49ca0e=_0x2b95ec[_0x5f1fbc(0x32b)]?_0x2b95ec[_0x5f1fbc(0x112)](_0x597f7e=>_0x597f7e[_0x5f1fbc(0x195)])[_0x5f1fbc(0x277)](',\x20'):_0x5f1fbc(0x145),_0x1b60d5=_0x4a5fe5[_0x5f1fbc(0x13c)][_0x5f1fbc(0x1a6)],_0x5dcc46=_0x1b60d5['limits'][_0x5f1fbc(0x1f1)]?Math['round'](_0x43f9d5/_0x1b60d5[_0x5f1fbc(0x2d9)][_0x5f1fbc(0x1f1)]*0x64):0x0;console[_0x5f1fbc(0x270)]('\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine'),console['log'](_0x5f1fbc(0x166)+_0x43f9d5[_0x5f1fbc(0x332)]()+_0x5f1fbc(0x222)+_0x1b60d5[_0x5f1fbc(0x2d9)]['maxWrites'][_0x5f1fbc(0x332)]()+_0x5f1fbc(0x203)+_0x5dcc46+'%),\x20'+_0x506fdc+_0x5f1fbc(0x222)+_0x1b60d5[_0x5f1fbc(0x2d9)]['envs']+'\x20envs'),console[_0x5f1fbc(0x270)](_0x5f1fbc(0x2c9)+_0x49ca0e);}}}}console[_0x5f1fbc(0x270)](_0x5f1fbc(0x302)+_0x21a6e2[_0x5f1fbc(0x2b6)]+_0x5f1fbc(0x2a3));!_0x21a6e2[_0x5f1fbc(0x161)]&&console['log'](_0x5f1fbc(0xe0)+_0x21a6e2['port']+_0x5f1fbc(0x355));console[_0x5f1fbc(0x270)](''),console[_0x5f1fbc(0x270)](_0x5f1fbc(0x124)+_0x2afe46+'ms'),_0x47c70e(_0x4a5fe5['auth']?.['getSecurityNotices']?.()??[]);let _0x3e05e4=![];async function _0x903469(_0x293530){const _0x24b77c=_0x5f1fbc;_0x3e05e4&&(process['stderr']['write'](_0x24b77c(0x39b)),process[_0x24b77c(0x229)](0x82));_0x3e05e4=!![],process[_0x24b77c(0x2e9)][_0x24b77c(0x2c0)](_0x24b77c(0x1aa)+(_0x293530||_0x24b77c(0x173))+',\x20closing…\x0a');const _0x314ebe=setTimeout(()=>{const _0x1b5460=_0x24b77c;process[_0x1b5460(0x2e9)][_0x1b5460(0x2c0)]('[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a'),process[_0x1b5460(0x229)](0x1);},0x1388);try{_0x4850d0[_0x24b77c(0x209)](_0x3ea792);}catch{}try{await _0x4a5fe5[_0x24b77c(0x2d6)]();}catch(_0x44323d){process['stderr'][_0x24b77c(0x2c0)](_0x24b77c(0x143)+(_0x44323d?.[_0x24b77c(0x18d)]??_0x44323d)+'\x0a');}clearTimeout(_0x314ebe),process[_0x24b77c(0x2e9)]['write']('[okdb]\x20closed\x20cleanly\x0a'),process[_0x24b77c(0x229)](0x0);}process['on'](_0x5f1fbc(0xbf),()=>_0x903469(_0x5f1fbc(0xbf))),process['on']('SIGTERM',()=>_0x903469(_0x5f1fbc(0xee))),process['on'](_0x5f1fbc(0x2a0),()=>_0x903469(_0x5f1fbc(0x2a0)));}}const _0x9d374e=new Set([_0x5230c9(0x101),_0x5230c9(0x1de),_0x5230c9(0x191),_0x5230c9(0x260),'export','import','reset',_0x5230c9(0x39a),_0x5230c9(0x277),_0x5230c9(0x11f)]),_0x1b3172=process[_0x5230c9(0x3b0)][0x2];if(_0x1b3172==='version')console[_0x5230c9(0x270)](require$$2[_0x5230c9(0x101)]),process[_0x5230c9(0x229)](0x0);else{if(_0x1b3172&&_0x9d374e[_0x5230c9(0x36a)](_0x1b3172)){const _0x155416=process[_0x5230c9(0x3b0)][_0x5230c9(0x144)](0x3),_0x2db24a=_0x2798fe([_0x5230c9(0x2ee),_0x5230c9(0x13a),..._0x155416]),_0x32774e=_0x1fc862(_0x2db24a),_0x5638a9=new Set([_0x5230c9(0x28b),'-d',_0x5230c9(0x1a0),'-k',_0x5230c9(0x3b3),'-c',_0x5230c9(0x328),'-p',_0x5230c9(0x2cf),'--env','-e',_0x5230c9(0x196),_0x5230c9(0x3a3),_0x5230c9(0x387),_0x5230c9(0x234),_0x5230c9(0x391),_0x5230c9(0x28c),'--ttl',_0x5230c9(0x26b),_0x5230c9(0x36f),'-u','--address']);let _0x2aa59c=null;for(let _0x2a9b48=0x0;_0x2a9b48<_0x155416[_0x5230c9(0x32b)];_0x2a9b48++){if(_0x5638a9['has'](_0x155416[_0x2a9b48])){_0x2a9b48++;continue;}if(!_0x155416[_0x2a9b48][_0x5230c9(0xf4)]('-')){_0x2aa59c=_0x155416[_0x2a9b48];break;}}(async()=>{const _0x1fdc84=_0x5230c9;if(_0x1b3172===_0x1fdc84(0x39a)){const _0x1b0892=process['argv'][0x3],_0x21d125=process[_0x1fdc84(0x3b0)][_0x1fdc84(0x144)](0x4),_0xee134b=_0x2798fe([_0x1fdc84(0x2ee),_0x1fdc84(0x13a),..._0x21d125]),_0x10c32e=_0x1fc862(_0xee134b),_0x1f486f=new Set([_0x1fdc84(0x28b),'-d',_0x1fdc84(0x1a0),'-k',_0x1fdc84(0x3b3),'-c',_0x1fdc84(0x328),'-p',_0x1fdc84(0x3a3),_0x1fdc84(0x387),_0x1fdc84(0x234),_0x1fdc84(0x391),_0x1fdc84(0x28c),_0x1fdc84(0x395),_0x1fdc84(0x2cf),_0x1fdc84(0x119),'-e',_0x1fdc84(0x196)]),_0x5bbd30=[];for(let _0x26ab56=0x0;_0x26ab56<_0x21d125[_0x1fdc84(0x32b)];_0x26ab56++){if(_0x1f486f[_0x1fdc84(0x36a)](_0x21d125[_0x26ab56])){_0x26ab56++;continue;}if(_0x21d125[_0x26ab56][_0x1fdc84(0xf4)]('-'))continue;_0x5bbd30[_0x1fdc84(0x2ad)](_0x21d125[_0x26ab56]);}switch(_0x1b0892){case'create':await _0x2ae153(_0x10c32e,_0xee134b);break;case _0x1fdc84(0x371):await _0x1a0869(_0x10c32e);break;case'revoke':await _0x215560(_0x5bbd30[0x0],_0x10c32e);break;default:console[_0x1fdc84(0x254)](_0x1fdc84(0x2de)+_0x1b0892+'\x22.\x20Use:\x20create,\x20list,\x20revoke'),process[_0x1fdc84(0x229)](0x1);}return;}if(_0x1b3172===_0x1fdc84(0x11f)){const _0x462ca4=requireOkdbLicenseCodec(),_0x4733ae=process[_0x1fdc84(0x3b0)][_0x1fdc84(0x144)](0x3),_0x5b386d=_0x2798fe([_0x1fdc84(0x2ee),_0x1fdc84(0x13a),..._0x4733ae]),_0x5c5886=_0x1fc862(_0x5b386d),_0x2bcb74=new Set([_0x1fdc84(0x28b),'-d',_0x1fdc84(0x1a0),'-k',_0x1fdc84(0x3b3),'-c',_0x1fdc84(0x328),'-p','--log-level']),_0x131c07=[];for(let _0x18c1dc=0x0;_0x18c1dc<_0x4733ae[_0x1fdc84(0x32b)];_0x18c1dc++){if(_0x2bcb74['has'](_0x4733ae[_0x18c1dc])){_0x18c1dc++;continue;}if(_0x4733ae[_0x18c1dc]['startsWith']('-'))continue;_0x131c07[_0x1fdc84(0x2ad)](_0x4733ae[_0x18c1dc]);}const _0x471a14=_0x131c07[0x0]??null;if(_0x471a14===_0x1fdc84(0x1bd))await _0x33e03f(_0x131c07[0x1],_0x5c5886);else{if(!_0x471a14)await _0x3a0eb0(_0x5c5886);else{let _0x5d72aa=_0x462ca4[_0x1fdc84(0xe5)](_0x471a14);if(_0x5d72aa===_0x1fdc84(0x2f9)&&_0x4850d0[_0x1fdc84(0x1da)](_0x471a14))_0x5d72aa=_0x1fdc84(0x1b1);if(_0x5d72aa==='path')try{const _0x4c7c1d=_0x4850d0['readFileSync'](_0x471a14,_0x1fdc84(0x31f))[_0x1fdc84(0x11a)](),_0x4ebd10=_0x462ca4[_0x1fdc84(0xe5)](_0x4c7c1d);if(_0x4ebd10===_0x1fdc84(0x141)){await _0x1fc597(_0x4c7c1d,_0x5c5886);return;}await _0x1b82df(_0x471a14,_0x5c5886);return;}catch(_0x3211db){console[_0x1fdc84(0x254)](_0x1fdc84(0x2ed)+_0x471a14+':\x20'+_0x3211db[_0x1fdc84(0x18d)]),process[_0x1fdc84(0x229)](0x1);}switch(_0x5d72aa){case'blob':await _0x1b82df(_0x471a14,_0x5c5886);break;case'activation':await _0x1fc597(_0x471a14,_0x5c5886);break;case _0x1fdc84(0x1e7):await _0x12574f(_0x471a14,_0x5c5886);break;default:console[_0x1fdc84(0x254)](_0x1fdc84(0x364)+_0x471a14+'\x22'),console[_0x1fdc84(0x254)](''),console[_0x1fdc84(0x254)]('\x20\x20Expected\x20one\x20of:'),console['error'](_0x1fdc84(0x21e)),console['error'](_0x1fdc84(0x2e2)),console['error']('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x1fdc84(0x254)](_0x1fdc84(0x347)),console[_0x1fdc84(0x254)](''),console[_0x1fdc84(0x254)](_0x1fdc84(0x35e)),process[_0x1fdc84(0x229)](0x1);}}}return;}switch(_0x1b3172){case _0x1fdc84(0x1de):await _0x470d64(_0x32774e);break;case _0x1fdc84(0x191):await _0x102569();break;case _0x1fdc84(0x18a):await _0x5f4d12(_0x32774e);break;case'backup':await _0x3f53e2(_0x2aa59c??_0x4c20f1[_0x1fdc84(0x10e)]('./okdb-backup'),_0x32774e);break;case _0x1fdc84(0x1c1):await _0x2dd11e(_0x2aa59c??_0x4c20f1[_0x1fdc84(0x10e)](_0x1fdc84(0xdb)),_0x32774e,_0x2db24a);break;case _0x1fdc84(0x322):await _0x45e73b(_0x2aa59c??_0x4c20f1[_0x1fdc84(0x10e)](_0x1fdc84(0xdb)),_0x32774e,_0x2db24a);break;case _0x1fdc84(0x277):await _0x316530(_0x2aa59c,_0x32774e,_0x2db24a);break;}})()[_0x5230c9(0x344)](()=>process[_0x5230c9(0x229)](0x0))[_0x5230c9(0x117)](_0x5885ef=>{const _0x34bdc2=_0x5230c9;console[_0x34bdc2(0x254)](_0x34bdc2(0x340)+(_0x5885ef[_0x34bdc2(0x18d)]||_0x5885ef)+'\x0a'),process[_0x34bdc2(0x229)](0x1);});}else _0x5f130c()[_0x5230c9(0x117)](_0x30db27=>{const _0xcfb536=_0x5230c9;console[_0xcfb536(0x254)]('\x0a[okdb]\x20fatal\x20error:'),console[_0xcfb536(0x254)](_0x30db27[_0xcfb536(0x1d9)]||_0x30db27),process[_0xcfb536(0x229)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x239a30(0x334)]=okdb;
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;