@kedem/okdb 1.5.3 → 1.6.1

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 _0x2d33c9=_0x2d34;(function(_0x192583,_0x5deb12){const _0x35e35e=_0x2d34,_0x3df68d=_0x192583();while(!![]){try{const _0x4cb623=parseInt(_0x35e35e(0x297))/0x1*(parseInt(_0x35e35e(0x2a9))/0x2)+-parseInt(_0x35e35e(0x3af))/0x3+parseInt(_0x35e35e(0x3b6))/0x4*(parseInt(_0x35e35e(0x168))/0x5)+-parseInt(_0x35e35e(0x337))/0x6+parseInt(_0x35e35e(0x35b))/0x7*(-parseInt(_0x35e35e(0x1bb))/0x8)+parseInt(_0x35e35e(0x3ba))/0x9*(parseInt(_0x35e35e(0x195))/0xa)+parseInt(_0x35e35e(0x1d6))/0xb;if(_0x4cb623===_0x5deb12)break;else _0x3df68d['push'](_0x3df68d['shift']());}catch(_0x2329d6){_0x3df68d['push'](_0x3df68d['shift']());}}}(_0x3dcf,0x553e1));function _0x3dcf(){const _0x42d83a=['\x27\x20already\x20registered','wrong_node','ref:violation_resolved','_licenseHash','port','item:remove','LICENSE_HASH_MISMATCH','License\x20expired\x20or\x20invalidated','debug','put','platform','--no-repl','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','index:ready','importFromFile','listen','fts:reset','uuid','line','\x20\x20⚠','\x22\x20already\x20exists','[okdb]\x20error:\x20--password\x20requires\x20--name','HELP','/api/','pid','net','toLocaleString','Indexes','files','Activation\x20invalid:\x20','application/json','type:drop','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','quit','noRepl','reverse','types/env=','_computeStatus','queue/','OKDBIndexNotRegisteredError','embeddings','resetFts','reload','\x0a[okdb]\x20shutting\x20down…\x0a','[on|off|level]','\x20\x20\x20\x20graceful\x20shutdown\x0a','env:removed','null','\x20\x20\x20\x20\x20\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','peers=','Invalid\x20primary\x20key\x20type:\x20','logLevel','OKDBSchemaValidationError','val','ttl:set','copy','[okdb]\x20unknown\x20token\x20action:\x20\x22','VERB','\x20\x20\x20http://localhost:','\x20\x20\x20\x20','GET','\x20\x20skipped=','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','[okdb]\x20imported\x20\x20types=','\x20day(s).','body','NAME','config\x20file\x20invalid:\x20','429141wRTixA','error','[okdb]\x20starting…\x0a','OKDBInvalidValueError','type/users/query\x20{\x22active\x22:true}','test','createdAt','8JuXHZd','pin','keys','setSchema','2415978szyoLU','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','grants','\x1b[35m','limits','\x20\x20Expected\x20one\x20of:','then','detectInputType','LICENSED_BUILD','resetting','\x20\x20Error:\x20','\x20env','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','input:\x20','clearLine','\x20result','PIN','\x20to\x20browse\x20the\x20API,\x20','License\x20limit\x20exceeded:\x20','engines','\x20writes\x20(','files/','\x20\x20\x20\x20usage:\x20\x20\x20','database\x20path\x20writable:\x20','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','operation','find','call','stdin','references','\x20\x20\x20\x20port:\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','body:\x20','[okdb]\x20invalid\x20log\x20level:\x20\x22','\x1b[33m','[okdb]\x20nothing\x20to\x20reset\x20—\x20','Schema\x20validation\x20failed\x20for\x20','type/','ttl','types:','LICENSE_EXPIRED_ACTION','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','\x20months\x20from\x20issuance)','SIGINT','now','Engines','api','\x1b[37m','bus:drain','magenta','alloc','sig','starting','prompt','Feature\x20not\x20licensed:\x20','--path','\x20records','_active','FOREIGN_KEY_DELETE_RESTRICTED','dbPath','address','\x20already\x20exists','string','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','unknown','\x20\x20(','_systemEnv','env/:env','crypto','\x20licenses','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','\x0a[okdb]\x20fatal\x20error:','ready','method','exit','dest','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','fts','EADDRINUSE','transport','der','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','options','\x20\x20✓\x20OKDB\x20server\x20running','endsWith','derivePin','transaction','\x20\x20Usage:','children','waiting','env','\x20\x20\x20\x20expires:\x20\x20\x20','log','importBlobs','targetKey','.kdbconfig','__esModule','%),\x20','system','--permissions','\x20does\x20not\x20exist','stderr','system:ready','node','\x0a\x0a\x20\x20','expiry','--label','isFile','[okdb]\x20loaded\x20config:\x20','id:\x20','max','hex','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','slice','--log-level','[okdb]\x20invalid\x20port:\x20','existsSync','transport:\x20','timeMachine','clearTtl','OKDBInvalidPrimaryKeyError','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20backup\x20complete','bus:poke','OKDBInvalidIndexKeyError','payload','server','PUB_FINGERPRINT','readUInt8','sizeBefore','toString','\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','name','Queue','SIG_INVALID','count','onLicenseExpired','licenseId','blob','key','\x20\x20Writes:\x20\x20','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','ref:violation','\x20\x20Flags','features','ttl:clear','values','dropping','export','syncPeers','yellow','toLowerCase','init','current','Types','\x20\x20\x20\x20features:\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','trim','createServer','floor','dropSchema','\x20active\x20env:\x20','summary','Cannot\x20delete\x20','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','verifyActivation','changes','Hint:\x20','length','set','INDEX_HAS_CONSUMERS','[okdb]\x20created\x20.kdbconfig','\x20\x20\x20\x20id:\x20\x20\x20\x20','./okdb-data','base64url','\x20\x20·\x20\x20','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','.kdb_history','addedAt','license:invalid','\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','indexToDb','\x1b[90m','writeFileSync','rawBuf','__OKDB_PUB_FINGERPRINT__','\x20\x20(need\x20≥\x2018)','587645JYeNeM','history','/api','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','\x0a\x20\x20Joining\x20cluster\x20at\x20','\x20\x20+','writes=','Build\x20expects\x20public\x20key\x20fingerprint\x20','views','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','SIGTERM','addLicense','\x20already\x20in\x20use','indexOf','licenseHash','INDEX_NOT_REGISTERED','license:activated','--open','\x0a\x20\x20✓\x20License\x20activated','\x20log\x20level:\x20','--changes','sha256','Cannot\x20set\x20enforce\x20schema\x20on\x20','\x0a\x20\x20✓\x20Token\x20created','license:added','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','code','\x20\x20(unlimited)','OKDBError','open','index','result','\x22\x20→\x20','[okdb]\x20error:\x20','_lookupByName','assertLimit','No\x20tokens.','status','digest','\x22\x20(must\x20be\x20debug|info|warn|error)','\x20\x20✓\x20','\x20\x20╔═══════════════════════════╗','dirname','Records','false','20HjJliw','spki','question','--env','valid','Index\x20\x27','hasType','resolve','create','INDEX_ALREADY_REGISTERED','activateLicense','[okdb]\x20exporting\x20blobs…','padStart','drop','[okdb]\x20export\x20complete','exportToFile','writeUInt32BE','\x0a\x20\x20okdb\x20doctor\x0a','tags:\x20','ttl:expired','username','\x27\x20doesn\x27t\x20exist','halted','removeLicense','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','issuedAt','setTtl','(empty)','logs','{}[]:,\x0a\x0d\x09\x20','HTTP\x20','unique:violation_resolved','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','type:registered','green','node:crypto','OKDBTypeAlreadyRegisteredError','LICENSE_LIMIT_EXCEEDED','24XhFAiZ','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','help','backup','includes','\x1b[31m','License\x20signature\x20invalid:\x20','columns','../','\x0a\x20\x20\x20\x20','INVALID_VALUE','[okdb]\x20port\x20','node\x20','LICENSE_INVALID','randomBytes','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','every','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','migrate','free\x20tier','OKDBTypeNotRegisteredError','object','\x1b[1m','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','\x20\x20score:','\x20environment\x20','type/users/item/alice\x20--env\x20staging','3590180rZirZi','DELETE\x20type/users/item/x','\x20\x20records=','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','\x20\x20\x20\x20\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/','assertFeature','constructor','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','Index\x20\x22','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','OKDBAlreadyExistsError','\x20\x20✓\x20Revoked\x20token\x20','Embeddings','license','{}[]:,\x27\x22','\x20\x20\x20\x20\x20\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\x20\x20writes:\x20\x20\x20\x20','(null)','failures','\x20opening\x20','\x0a\x20\x20Invalid\x20JSON:\x20','\x0a\x20\x20No\x20routes\x20matching\x20\x22','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','LICENSE_TYPE_OPEN','safety','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','active:','access:\x20','true','[okdb]\x20started\x20in\x20','min','repeat','txn:start','\x20\x20Envs:\x20\x20\x20\x20','typesPerEnv','\x20(expires\x20in\x20','title','replace','\x20\x20Shell\x20commands','\x20\x20changes=','toUpperCase','filter','isTTY','types\x20--env\x20staging',':\x20key\x20[','_isFree','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','prototype','trimStart','utf8','(none)','gray','OKDBVersionMismatchError','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','--config','\x0a[okdb]\x20error:\x20','exportBlobs','auth','unique:violation','argv','\x20\x20Path\x20access','./okdb-export.ndjson','\x20\x20✓\x20Removed\x20license\x20','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','\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','push','get','config','darwin','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','[okdb]\x20importing\x20','Invalid\x20license\x20blob:\x20','fill','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','MALFORMED_TOKEN','__writeCounter','equals','decodeLicenseBlob','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','reset','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','effective','attach','VERSION_MISMATCH','version','errors','\x20\x20All\x20checks\x20passed.\x0a','--log-requests','logRequests','sub','./okdb-backup','cyan','--port','details','ACTIVATION_EXPIRED','\x20\x20Usage:\x20','POST','PUT\x20type/users/item/x\x20{\x22n\x22:1}','created','update',',\x20got\x20','catch','\x20\x20\x20\x20status:\x20\x20\x20\x20','red','expired','type','round','[okdb]\x20created\x20./okdb-data','Examples','\x20for\x20commands,\x20','hasOwnProperty','access','expiresAt','--grants','--drop','Sync','xdg-open\x20','byteLength','\x20\x20Some\x20checks\x20failed.\x0a','noAdmin','okdb','STATUS','Invalid\x20index\x20key\x20type\x20for\x20\x27','roles','forEach','\x20\x20·\x20','hidden','~licenses','INVALID_INDEX_KEY','start\x20','admin','writeUInt8','Environments','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','terminal','.okdb-write-test','setPrompt','has','config\x20file\x20valid:\x20','LICENSE_ACTIVATION_INVALID','Unique\x20constraint\x20violated\x20on\x20','LICENSE_FEATURE_DISABLED','No\x20license\x20found\x20matching\x20this\x20activation\x20token','loadEnvFile','properties','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','sourceType','\x20references\x20','\x20/\x20','\x22\x20matches\x20','stringify','keys:','--token','write',')\x20to\x20your\x20license\x20vendor.','getSecurityNotices','unlinkSync','\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','close','dim','PUT','\x20\x20✓\x20database\x20opened\x0a','createHmac','invalid','\x20\x20\x20\x20status:\x20\x20\x20\x20active','\x20\x20[','127.0.0.1','description','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','OKDBIndexHasConsumersError','--username','finally','\x20MB\x20→\x20','--ttl','[okdb]\x20opening\x20','level','sync:apply','isInteger','homedir','\x20\x20(licensee:\x20','readFileSync','resume','exec','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','\x20\x20✓\x20http\x20listening\x20on\x20:','/type/users/query\x0a\x20\x20\x20\x20','\x1b[0m','activation','from','tags','getRange','database\x20path\x20not\x20writable:\x20','59093yfHdev','toISOString','inputSchema','available','<json-body>','FOREIGN_KEY_VIOLATION','\x20which\x20does\x20not\x20exist','\x20\x20✗','default','SCHEMA_VALIDATION_FAILED','ENV','licensee','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','createHash','~tokens','decodeActivationToken','dropType','listLicenses','6nwPdsm','Shutting\x20down\x20due\x20to\x20license\x20expiry','cause','remove','\x1b[34m','<path>','open\x20','USE','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','\x20deleted','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','\x1b[32m','join','bold','FEATURES','\x20\x20\x20\x20path:\x20\x20','TYPE_ALREADY_REGISTERED','path','\x20\x20\x20\x20\x20http://localhost:','ftsName','records','\x20\x20\x20\x20admin:\x20http://localhost:','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','[okdb]\x20reset:\x20','ceil','\x27\x20is\x20already\x20registered','getPins','fromEntries','use\x20<env>','licenseType','\x22.\x20Use:\x20create,\x20list,\x20revoke','\x20in\x20','\x20SECURITY\x20NOTICE','token','--help','type/users','boolean','writeUInt16BE','dropIndex','port\x20','--key','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','(unset)','DELETE','\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','keys/public.pem','\x20\x20\x20\x20\x20\x20\x20','\x20logs\x20on\x20\x20','\x0a\x20\x20','Bearer\x20','dropFts','/api/env/','toFixed','dynamic','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','(no\x20types)','okdb.pid','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','http://localhost:','exp','1.5.3','standard','param','index:registered','EXPIRES','PUBLIC_KEY_PEM','Files','NOT_FOUND','fts:drop','startsWith','targetType','--address','stopped','licensed','createInterface','\x22\x20is\x20used\x20by:\x20','number','\x20\x20\x20\x20\x20\x20','[okdb]\x20exported\x20\x20types=','data','registerIndex','(add\x20a\x20license\x20first)','QUIT','\x20<path>\x20[json-body]','listRoutes','mcp','kind','typeSubDbs','Full-text\x20search','allocUnsafe','time','Version\x20mismatch\x20for\x20','off','_ensureTokensType','[okdb]\x20reset\x20aborted','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','SCHEMA_COLLECTION_INVALID','\x1b[36m','verify','once','Events','\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/','split','isArray','LICENSEE','\x20\x20\x20\x20licensee:\x20\x20','parse','schema:set','types','[okdb]\x20blobs:\x20imported=','reason','[okdb]\x20exporting\x20env\x20\x22','concat','message','meta','\x0a\x20\x20License\x20details:','index:reset','\x20to\x20quit.','value','pending','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','\x20\x20[okdb]\x20shutting\x20down…','--types','permissions','OKDBIndexAlreadyRegisteredError','txn:rollback','/admin/index.html','\x20MB)','sync','entries','\x20file','[okdb]\x20backing\x20up\x20to\x20','TYPES','password','list','scrypt','timingSafeEqual','_envs','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','readUInt16BE','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','listening','1082784NKJNhp','--blobs','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','some','CREATED','bind','charCodeAt','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','fieldPath','--no-admin','\x20→\x20POST\x20/api/env/','selfAddress','\x20(expires\x20','\x27\x20on\x20type\x20\x27','envs','label','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','active','item:create','maxWrites','[filter]','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','warn','no\x20.kdbconfig\x20(using\x20defaults)','ALREADY_EXISTS','_license','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','map','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','routes','enabled','[env]','info','recheck','stdout','1406853WsIhTP','other','randomUUID','padEnd','OKDBUniqueConstraintError','schema:drop','captureStackTrace','blobs','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','white','decoded','[okdb]\x20import\x20complete','--name','readUInt32BE','http'];_0x3dcf=function(){return _0x42d83a;};return _0x3dcf();}var require$$1$1=require(_0x2d33c9(0x2ba)),require$$1=require('fs'),require$$3=require(_0x2d33c9(0x384)),require$$0$2=require('readline'),require$$5=require('../okdb'),require$$0=require(_0x2d33c9(0x3fe)),require$$0$1=require(_0x2d33c9(0x1b8)),require$$2$1=require('os'),require$$4=require('child_process');function getDefaultExportFromCjs(_0x1fca36){const _0x38d2aa=_0x2d33c9;return _0x1fca36&&_0x1fca36[_0x38d2aa(0x41a)]&&Object[_0x38d2aa(0x206)][_0x38d2aa(0x245)][_0x38d2aa(0x3d5)](_0x1fca36,'default')?_0x1fca36['default']:_0x1fca36;}function _0x2d34(_0x33f281,_0x1327f7){_0x33f281=_0x33f281-0x15c;const _0x3dcf3d=_0x3dcf();let _0x2d3456=_0x3dcf3d[_0x33f281];return _0x2d3456;}var okdb$1={},version=_0x2d33c9(0x2e5),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x18882e=require$$0;function _0x11f364(_0x180175,_0x2eb281){const _0xcfe902=_0x2d34;return _0x18882e['createHmac']('sha256',_0x2eb281)[_0xcfe902(0x23a)](_0x180175)['digest']('base64url');}function _0x27e957(_0x560a21,_0x369a9c){const _0x5ba9ba=_0x2d34;if(typeof _0x560a21!=='string'||typeof _0x369a9c!==_0x5ba9ba(0x3f8))return![];if(Buffer['byteLength'](_0x560a21)!==Buffer[_0x5ba9ba(0x24c)](_0x369a9c))return![];return _0x18882e[_0x5ba9ba(0x331)](Buffer['from'](_0x560a21),Buffer[_0x5ba9ba(0x293)](_0x369a9c));}function _0x3941b6(_0x3b2f32){const _0xf02e3c=_0x2d34;if(!_0x3b2f32?.['startsWith'](_0xf02e3c(0x2da)))return null;return _0x3b2f32[_0xf02e3c(0x42b)](0x7);}function _0x4eeae0(_0xb7ff91=0x20){const _0x5c4acb=_0x2d34;return _0x18882e[_0x5c4acb(0x1c9)](_0xb7ff91)[_0x5c4acb(0x43c)](_0x5c4acb(0x468));}function _0x5732a1(_0xd775c9){const _0x44b703=_0x2d34;return _0x18882e[_0x44b703(0x2a4)]('sha256')[_0x44b703(0x23a)](_0xd775c9)[_0x44b703(0x18e)](_0x44b703(0x429));}function _0x36f0b2(_0x34df82,_0x499718,_0x5d2186=0x36ee80){const _0x1295dc=_0x2d34;if(!_0x499718)throw new Error('Token\x20secret\x20not\x20configured');const _0x33b37a=Date[_0x1295dc(0x3e6)](),_0x12c906=Buffer[_0x1295dc(0x293)](JSON[_0x1295dc(0x26d)]({'iat':_0x33b37a,'exp':_0x33b37a+_0x5d2186,'sub':_0x34df82?.['id']??_0x34df82?.[_0x1295dc(0x230)]??null,'username':_0x34df82?.['username']??_0x34df82?.['name']??null,'roles':Array[_0x1295dc(0x310)](_0x34df82?.[_0x1295dc(0x252)])?_0x34df82[_0x1295dc(0x252)]:[]}))[_0x1295dc(0x43c)](_0x1295dc(0x468)),_0x30d206=_0x11f364(_0x12c906,_0x499718);return _0x12c906+'.'+_0x30d206;}function _0x203859(_0x497c62,_0x1dc453){const _0x5504ca=_0x2d34;if(!_0x1dc453||typeof _0x497c62!==_0x5504ca(0x3f8))return null;const [_0x3b158d,_0x5aa0b3]=_0x497c62[_0x5504ca(0x30f)]('.');if(!_0x3b158d||!_0x5aa0b3)return null;const _0x11b030=_0x11f364(_0x3b158d,_0x1dc453);if(!_0x27e957(_0x5aa0b3,_0x11b030))return null;try{const _0x3c31b9=JSON['parse'](Buffer['from'](_0x3b158d,_0x5504ca(0x468))[_0x5504ca(0x43c)]()),_0x536ef7=0x7530;if(Date[_0x5504ca(0x3e6)]()>Number(_0x3c31b9?.[_0x5504ca(0x2e4)]??0x0)+_0x536ef7)return null;return _0x3c31b9;}catch{return null;}}async function _0x152df6(_0xbba389){return new Promise((_0x42c4ef,_0x487574)=>{const _0x17903d=_0x2d34,_0x373b47=_0x18882e[_0x17903d(0x1c9)](0x10);_0x18882e[_0x17903d(0x330)](_0xbba389,_0x373b47,0x40,(_0x484fd2,_0xced8fa)=>{const _0x2a0b58=_0x17903d;if(_0x484fd2)_0x487574(_0x484fd2);_0x42c4ef(_0x373b47[_0x2a0b58(0x43c)](_0x2a0b58(0x429))+':'+_0xced8fa['toString'](_0x2a0b58(0x429)));});});}async function _0x1a0d2a(_0x2d732e,_0x313fb8){const _0x4b2bc8=_0x2d34,[_0x5ce48d,_0x495a3b]=_0x313fb8['split'](':');if(!_0x5ce48d||!_0x495a3b)return![];const _0x4626d5=Buffer[_0x4b2bc8(0x293)](_0x5ce48d,_0x4b2bc8(0x429));return new Promise((_0x2f52ba,_0x86f422)=>{const _0x5d143e=_0x4b2bc8;_0x18882e[_0x5d143e(0x330)](_0x2d732e,_0x4626d5,0x40,(_0x105054,_0x3609f7)=>{const _0x2187e2=_0x5d143e;if(_0x105054)_0x86f422(_0x105054);_0x2f52ba(_0x18882e[_0x2187e2(0x331)](_0x3609f7,Buffer[_0x2187e2(0x293)](_0x495a3b,_0x2187e2(0x429))));});});}return okdbAuthTokens={'hmac':_0x11f364,'timingSafeEqual':_0x27e957,'parseBearer':_0x3941b6,'randomToken':_0x4eeae0,'hashToken':_0x5732a1,'issueToken':_0x36f0b2,'authenticateToken':_0x203859,'hashPassword':_0x152df6,'verifyPassword':_0x1a0d2a},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x3cdb92=_0x2d33c9;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x29d077=require$$0$1,_0x533b23='0123456789ABCDEFGHJKMNPQRSTVWXYZ',_0x298af4=new Uint8Array(0x100)[_0x3cdb92(0x21f)](0xff);for(let _0xa0d38e=0x0;_0xa0d38e<_0x533b23[_0x3cdb92(0x462)];_0xa0d38e++){_0x298af4[_0x533b23[_0x3cdb92(0x33e)](_0xa0d38e)]=_0xa0d38e,_0x298af4[_0x533b23['charCodeAt'](_0xa0d38e)+0x20]=_0xa0d38e;}_0x298af4['O'[_0x3cdb92(0x33e)](0x0)]=0x0,_0x298af4['o'[_0x3cdb92(0x33e)](0x0)]=0x0,_0x298af4['I'['charCodeAt'](0x0)]=0x1,_0x298af4['i'['charCodeAt'](0x0)]=0x1,_0x298af4['L'['charCodeAt'](0x0)]=0x1,_0x298af4['l'[_0x3cdb92(0x33e)](0x0)]=0x1;function _0x47322d(_0x26ac6b){let _0x1cc8f4=0x0,_0x1bd834=0x0,_0x476129='';for(let _0x1588d6=0x0;_0x1588d6<_0x26ac6b['length'];_0x1588d6++){_0x1bd834=_0x1bd834<<0x8|_0x26ac6b[_0x1588d6],_0x1cc8f4+=0x8;while(_0x1cc8f4>=0x5){_0x1cc8f4-=0x5,_0x476129+=_0x533b23[_0x1bd834>>>_0x1cc8f4&0x1f];}}return _0x1cc8f4>0x0&&(_0x476129+=_0x533b23[_0x1bd834<<0x5-_0x1cc8f4&0x1f]),_0x476129;}function _0x4523b2(_0x3acf12){const _0x4ed389=_0x3cdb92;_0x3acf12=_0x3acf12[_0x4ed389(0x1fc)](/-/g,'')['toUpperCase']();let _0x48a888=0x0,_0x299bdb=0x0;const _0x42121e=[];for(let _0x1cded1=0x0;_0x1cded1<_0x3acf12['length'];_0x1cded1++){const _0xc9136a=_0x298af4[_0x3acf12[_0x4ed389(0x33e)](_0x1cded1)];if(_0xc9136a===0xff)continue;_0x299bdb=_0x299bdb<<0x5|_0xc9136a,_0x48a888+=0x5,_0x48a888>=0x8&&(_0x48a888-=0x8,_0x42121e[_0x4ed389(0x218)](_0x299bdb>>>_0x48a888&0xff));}return Buffer[_0x4ed389(0x293)](_0x42121e);}const _0x485dd5=[_0x3cdb92(0x329),_0x3cdb92(0x393),_0x3cdb92(0x3cd),_0x3cdb92(0x407),_0x3cdb92(0x430),_0x3cdb92(0x170),_0x3cdb92(0x2fe),_0x3cdb92(0x387)],_0x3aaf21=0x0,_0x369243=0x1,_0x334dcd=0x2,_0x40c501=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x2a82f1({issuedAt:_0x8bc4e,expiresAt:_0xb1ab1b,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x3aaf21}){const _0x218ce7=_0x3cdb92,_0x20980c=Buffer[_0x218ce7(0x293)](licensee,_0x218ce7(0x208))[_0x218ce7(0x42b)](0x0,0x40),_0x24b8fb=0x1+0x1+0x4+0x4+0x1+_0x20980c['length']+0x2+0x10,_0x5ababf=Buffer[_0x218ce7(0x302)](_0x24b8fb);let _0x44da28=0x0;_0x5ababf['writeUInt8'](0x1,_0x44da28++),_0x5ababf[_0x218ce7(0x25a)](licenseType,_0x44da28++),_0x5ababf[_0x218ce7(0x1a5)](Math[_0x218ce7(0x459)](_0x8bc4e/0x3e8),_0x44da28),_0x44da28+=0x4,_0x5ababf['writeUInt32BE'](Math[_0x218ce7(0x459)](_0xb1ab1b/0x3e8),_0x44da28),_0x44da28+=0x4,_0x5ababf[_0x218ce7(0x25a)](_0x20980c[_0x218ce7(0x462)],_0x44da28++),_0x20980c[_0x218ce7(0x3a2)](_0x5ababf,_0x44da28),_0x44da28+=_0x20980c[_0x218ce7(0x462)];let _0x415ee4=0x0;for(let _0x3a7fb6=0x0;_0x3a7fb6<_0x485dd5[_0x218ce7(0x462)];_0x3a7fb6++){if(features[_0x485dd5[_0x3a7fb6]])_0x415ee4|=0x1<<_0x3a7fb6;}_0x5ababf[_0x218ce7(0x2ce)](_0x415ee4,_0x44da28),_0x44da28+=0x2;const _0x5b43b2=[_0x218ce7(0x346),'typesPerEnv',_0x218ce7(0x44f),_0x218ce7(0x34b)];for(const _0x5af840 of _0x5b43b2){_0x5ababf['writeUInt32BE'](limits[_0x5af840]||0x0,_0x44da28),_0x44da28+=0x4;}return _0x5ababf;}function _0x55f7d4(_0x50437c){const _0x11c29f=_0x3cdb92;let _0x2777d3=0x0;const _0x421c49=_0x50437c['readUInt8'](_0x2777d3++),_0x5dcf5a=_0x50437c[_0x11c29f(0x43a)](_0x2777d3++),_0xdf7168=_0x50437c[_0x11c29f(0x369)](_0x2777d3);_0x2777d3+=0x4;const _0x42a8b9=_0x50437c[_0x11c29f(0x369)](_0x2777d3);_0x2777d3+=0x4;const _0x234ea1=_0x50437c[_0x11c29f(0x43a)](_0x2777d3++),_0x5ca5e5=_0x50437c[_0x11c29f(0x42b)](_0x2777d3,_0x2777d3+_0x234ea1)[_0x11c29f(0x43c)]('utf8');_0x2777d3+=_0x234ea1;const _0x57320d=_0x50437c[_0x11c29f(0x334)](_0x2777d3);_0x2777d3+=0x2;const _0x2d3ebc={};for(let _0x24fc7a=0x0;_0x24fc7a<_0x485dd5[_0x11c29f(0x462)];_0x24fc7a++){_0x2d3ebc[_0x485dd5[_0x24fc7a]]=Boolean(_0x57320d&0x1<<_0x24fc7a);}const _0x107b50=[_0x11c29f(0x346),'typesPerEnv','syncPeers','maxWrites'],_0xaa5cd0={};for(const _0x192843 of _0x107b50){const _0x57cbdc=_0x50437c['readUInt32BE'](_0x2777d3);_0x2777d3+=0x4,_0xaa5cd0[_0x192843]=_0x57cbdc===0x0?null:_0x57cbdc;}return{'v':_0x421c49,'licenseType':_0x5dcf5a,'issuedAt':_0xdf7168*0x3e8,'expiresAt':_0x42a8b9*0x3e8,'licensee':_0x5ca5e5,'features':_0x2d3ebc,'limits':_0xaa5cd0};}function _0x47e501(_0xb8db96,_0x4732f8){const _0x2db5e3=_0x3cdb92,_0x32bfcc=Buffer[_0x2db5e3(0x319)]([_0xb8db96,_0x4732f8]),_0x66337c=_0x47322d(_0x32bfcc),_0x1411c0=[];for(let _0x4e3618=0x0;_0x4e3618<_0x66337c[_0x2db5e3(0x462)];_0x4e3618+=0x8){_0x1411c0['push'](_0x66337c[_0x2db5e3(0x42b)](_0x4e3618,_0x4e3618+0x8));}return _0x1411c0[_0x2db5e3(0x2b5)]('-');}function _0x32f5f1(_0x24ba88){const _0x387556=_0x3cdb92;if(typeof _0x24ba88!==_0x387556(0x3f8))throw new Error(_0x387556(0x1ad));const _0x4650e7=_0x4523b2(_0x24ba88[_0x387556(0x1fc)](/-/g,''));if(_0x4650e7['length']<0x41)throw new Error(_0x387556(0x2e2)+_0x4650e7[_0x387556(0x462)]+'\x20bytes,\x20need\x20>=\x2065)');const _0xdd6607=_0x4650e7[_0x387556(0x42b)](0x0,_0x4650e7[_0x387556(0x462)]-0x40),_0x4c1e16=_0x4650e7[_0x387556(0x42b)](_0x4650e7[_0x387556(0x462)]-0x40);let _0x5cbc40;try{_0x5cbc40=_0x55f7d4(_0xdd6607);}catch(_0x73c0f2){throw new Error(_0x387556(0x171)+_0x73c0f2['message']);}return{'rawBuf':_0x4650e7,'payload':_0xdd6607,'sig':_0x4c1e16,'decoded':_0x5cbc40};}function _0x5b7140(_0x55d476){const _0x1131bf=_0x3cdb92;return _0x29d077[_0x1131bf(0x2a4)]('sha256')[_0x1131bf(0x23a)](_0x55d476)[_0x1131bf(0x18e)]()[_0x1131bf(0x42b)](0x0,0x8);}function _0x7df642(_0x26688c,_0x57ef73,_0x256c0c){const _0x21dbc7=_0x3cdb92,_0x4e6367='OKDB-PIN-V1:'+_0x256c0c,_0x5869ef=Buffer[_0x21dbc7(0x319)]([Buffer[_0x21dbc7(0x293)](_0x26688c,_0x21dbc7(0x208)),_0x57ef73]),_0x3bc87a=_0x29d077[_0x21dbc7(0x279)](_0x21dbc7(0x17d),_0x4e6367)['update'](_0x5869ef)['digest'](),_0x18e6a9=_0x47322d(_0x3bc87a[_0x21dbc7(0x42b)](0x0,0x5));return{'pin':_0x18e6a9,'pinHmac':_0x3bc87a};}function _0x31f1da(_0x525f3a,_0x47eb88,_0x31a0a0){const _0x3b4896=_0x3cdb92,_0x54811d=Buffer[_0x3b4896(0x302)](0x4d);let _0x1d9909=0x0;_0x54811d['writeUInt8'](0x1,_0x1d9909++),_0x525f3a[_0x3b4896(0x3a2)](_0x54811d,_0x1d9909),_0x1d9909+=0x8,_0x54811d['writeUInt32BE'](_0x47eb88,_0x1d9909),_0x1d9909+=0x4,_0x31a0a0[_0x3b4896(0x3a2)](_0x54811d,_0x1d9909);const _0x13c87b=_0x47322d(_0x54811d),_0x403fcb=[];for(let _0x47667e=0x0;_0x47667e<_0x13c87b['length'];_0x47667e+=0x6){_0x403fcb[_0x3b4896(0x218)](_0x13c87b[_0x3b4896(0x42b)](_0x47667e,_0x47667e+0x6));}return _0x403fcb[_0x3b4896(0x2b5)]('-');}function _0x452442(_0x5f189a){const _0x59a375=_0x3cdb92;if(typeof _0x5f189a!=='string')throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x160935=_0x4523b2(_0x5f189a[_0x59a375(0x1fc)](/-/g,''));if(_0x160935['length']!==0x4d)throw new Error(_0x59a375(0x45e)+_0x160935[_0x59a375(0x462)]);let _0x59c12a=0x0;const _0x53f9b2=_0x160935[_0x59a375(0x43a)](_0x59c12a++),_0x2ffcf8=_0x160935[_0x59a375(0x42b)](_0x59c12a,_0x59c12a+0x8);_0x59c12a+=0x8;const _0x2b387c=_0x160935[_0x59a375(0x369)](_0x59c12a);_0x59c12a+=0x4;const _0x4998d9=_0x160935[_0x59a375(0x42b)](_0x59c12a);return{'v':_0x53f9b2,'licenseHash':_0x2ffcf8,'expiry':_0x2b387c,'sig':_0x4998d9};}function _0x1bf9c6({tokenString:_0x532ab4,nodeId:_0x29789c,rawBlobBuf:_0x2b0a4a,pubKeyPem:_0x197256,pubFingerprint:_0x3406e5}){const _0xfb239e=_0x3cdb92;let _0x22cdb2;try{_0x22cdb2=_0x452442(_0x532ab4);}catch(_0x49f22b){return{'valid':![],'reason':_0xfb239e(0x221)};}const _0x137996=_0x5b7140(_0x2b0a4a);if(!_0x137996[_0xfb239e(0x223)](_0x22cdb2[_0xfb239e(0x176)]))return{'valid':![],'reason':_0xfb239e(0x371)};const {pinHmac:_0x281637}=_0x7df642(_0x29789c,_0x137996,_0x3406e5),_0x93e2c5=Buffer['allocUnsafe'](0x4);_0x93e2c5[_0xfb239e(0x1a5)](_0x22cdb2[_0xfb239e(0x423)],0x0);const _0x179716=Buffer[_0xfb239e(0x319)]([Buffer[_0xfb239e(0x293)]([_0x22cdb2['v']]),_0x281637[_0xfb239e(0x42b)](0x0,0x5),_0x22cdb2[_0xfb239e(0x176)],_0x93e2c5]);try{const _0x64f0aa=_0x29d077[_0xfb239e(0x30b)](null,_0x179716,_0x197256,_0x22cdb2['sig']);if(!_0x64f0aa)return{'valid':![],'reason':_0xfb239e(0x440)};}catch(_0xc9d734){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x22cdb2[_0xfb239e(0x423)]<Date[_0xfb239e(0x3e6)]()/0x3e8)return{'valid':![],'reason':_0xfb239e(0x235)};return{'valid':!![],'reason':'ok'};}function _0x3406ac(_0x5ecffd){const _0x412045=_0x3cdb92;if(typeof _0x5ecffd!==_0x412045(0x3f8))return'unknown';const _0x58bb42=_0x5ecffd[_0x412045(0x457)]();if(_0x58bb42[_0x412045(0x2ee)]('/')||_0x58bb42['startsWith']('./')||_0x58bb42[_0x412045(0x2ee)](_0x412045(0x1c3))||/^[A-Za-z]:[\\/]/['test'](_0x58bb42))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x412045(0x3b4)](_0x58bb42))return _0x412045(0x37c);const _0x526cc5=_0x58bb42[_0x412045(0x1fc)](/[\s-]+/g,'')['length'];if(_0x526cc5===0x7c)return _0x412045(0x292);if(_0x526cc5>=0x95&&_0x526cc5<=0xfc)return _0x412045(0x444);return'unknown';}return okdbLicenseCodec={'toBase32':_0x47322d,'fromBase32':_0x4523b2,'encodeLicensePayload':_0x2a82f1,'decodeLicensePayload':_0x55f7d4,'encodeLicenseBlob':_0x47e501,'decodeLicenseBlob':_0x32f5f1,'licenseHash':_0x5b7140,'derivePin':_0x7df642,'encodeActivationToken':_0x31f1da,'decodeActivationToken':_0x452442,'verifyActivation':_0x1bf9c6,'detectInputType':_0x3406ac,'FEATURE_NAMES':_0x485dd5,'LICENSE_TYPE_STANDARD':_0x3aaf21,'LICENSE_TYPE_OPEN':_0x369243,'LICENSE_TYPE_INTERNAL':_0x334dcd,'OPEN_LICENSE_MAX_DURATION_MS':_0x40c501},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x200eec extends Error{constructor(_0x19c175,_0x569321,_0x2558d9={}){const _0x1e3a33=_0x2d34;super(_0x19c175),this[_0x1e3a33(0x43e)]=_0x1e3a33(0x184),this[_0x1e3a33(0x182)]=_0x569321,this[_0x1e3a33(0x234)]=_0x2558d9,_0x2558d9[_0x1e3a33(0x2ab)]&&(this[_0x1e3a33(0x2ab)]=_0x2558d9[_0x1e3a33(0x2ab)]),Error[_0x1e3a33(0x361)](this,this[_0x1e3a33(0x1dc)]);}}class _0x665649 extends _0x200eec{constructor(_0x5c87bc,_0x2f6a92,_0x45fda0,_0x9c6e2a){const _0x387647=_0x2d34;super(_0x387647(0x304)+_0x5c87bc+'@'+_0x2f6a92+':\x20expected\x20'+_0x45fda0+_0x387647(0x23b)+_0x9c6e2a,_0x387647(0x22a),{'type':_0x5c87bc,'key':_0x2f6a92,'expectedVersion':_0x45fda0,'actualVersion':_0x9c6e2a}),this[_0x387647(0x43e)]=_0x387647(0x20b);}}class _0x30d335 extends _0x200eec{constructor(_0x4d6e19,_0x1e0970){const _0x4171a1=_0x2d34;super(_0x4d6e19+'@'+_0x1e0970+_0x4171a1(0x41e),_0x4171a1(0x2ec),{'type':_0x4d6e19,'key':_0x1e0970}),this['name']='OKDBNotFoundError';}}class _0x29dfc6 extends _0x200eec{constructor(_0xe93f0f,_0x25fe5f){const _0x14d97d=_0x2d34;super(_0xe93f0f+'@'+_0x25fe5f+_0x14d97d(0x3f7),_0x14d97d(0x350),{'type':_0xe93f0f,'key':_0x25fe5f}),this[_0x14d97d(0x43e)]=_0x14d97d(0x1e0);}}class _0x59ada7 extends _0x200eec{constructor(_0x3a52aa,_0x12ba28){const _0x743a1a=_0x2d34,_0x13bf26=typeof _0x12ba28;super(_0x743a1a(0x251)+_0x3a52aa+'\x27:\x20'+_0x13bf26+_0x743a1a(0x1ec)+_0x12ba28,_0x743a1a(0x257),{'index':_0x3a52aa,'key':_0x12ba28,'keyType':_0x13bf26}),this[_0x743a1a(0x43e)]=_0x743a1a(0x436);}}class _0x2e857d extends _0x200eec{constructor(_0x126e22){const _0x30911f=_0x2d34,_0x4747ba=typeof _0x126e22;super(_0x30911f(0x39d)+_0x4747ba+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x126e22,'INVALID_PRIMARY_KEY',{'key':_0x126e22,'keyType':_0x4747ba}),this[_0x30911f(0x43e)]=_0x30911f(0x432);}}class _0x29b120 extends _0x200eec{constructor(_0x453c5b){const _0x5d928e=_0x2d34;super('Type\x20\x27'+_0x453c5b+'\x27\x20doesn\x27t\x20exist','TYPE_NOT_REGISTERED',{'type':_0x453c5b}),this['name']=_0x5d928e(0x1cf);}}class _0x35331b extends _0x200eec{constructor(_0x2545ea){const _0x384da8=_0x2d34;super('Type\x20\x27'+_0x2545ea+_0x384da8(0x36b),_0x384da8(0x2b9),{'type':_0x2545ea}),this[_0x384da8(0x43e)]=_0x384da8(0x1b9);}}class _0x46fa87 extends _0x200eec{constructor(_0x17a690,_0x5bd384){const _0x4d0a90=_0x2d34;super(_0x4d0a90(0x19a)+_0x5bd384+_0x4d0a90(0x345)+_0x17a690+_0x4d0a90(0x1aa),_0x4d0a90(0x177),{'type':_0x17a690,'index':_0x5bd384}),this[_0x4d0a90(0x43e)]=_0x4d0a90(0x392);}}class _0x51703f extends _0x200eec{constructor(_0x29fbd2,_0x2eb080){const _0x193f3e=_0x2d34;super('Index\x20\x27'+_0x2eb080+_0x193f3e(0x345)+_0x29fbd2+_0x193f3e(0x2c2),_0x193f3e(0x19e),{'type':_0x29fbd2,'index':_0x2eb080}),this[_0x193f3e(0x43e)]=_0x193f3e(0x325);}}class _0xe3fb45 extends _0x200eec{constructor(_0x1c69db,_0x18f1b7={}){const _0x6ca712=_0x2d34;super(_0x1c69db,_0x6ca712(0x1c5),_0x18f1b7),this[_0x6ca712(0x43e)]=_0x6ca712(0x3b2);}}class _0x385a89 extends _0x200eec{constructor(_0x3f7dcb,_0x3875e7,_0x11286b,_0x4e0576,_0x541637){const _0x1cc914=_0x2d34;super(_0x1cc914(0x263)+_0x3f7dcb+'@'+_0x3875e7+_0x1cc914(0x203)+_0x11286b+']\x20already\x20maps\x20to\x20\x27'+_0x4e0576+'\x27,\x20cannot\x20map\x20to\x20\x27'+_0x541637+'\x27','UNIQUE_CONSTRAINT',{'type':_0x3f7dcb,'index':_0x3875e7,'indexKey':_0x11286b,'existingKey':_0x4e0576,'conflictingKey':_0x541637}),this[_0x1cc914(0x43e)]=_0x1cc914(0x35f);}}class _0x8ce92b extends _0x200eec{constructor(_0x5e05d4,_0x151606,_0x1ab359){const _0x26cbef=_0x2d34;super(_0x26cbef(0x3de)+_0x5e05d4+'@'+_0x151606,_0x26cbef(0x2a0),{'type':_0x5e05d4,'key':_0x151606,'errors':_0x1ab359}),this[_0x26cbef(0x43e)]=_0x26cbef(0x39f),this['type']=_0x5e05d4,this[_0x26cbef(0x445)]=_0x151606,this[_0x26cbef(0x22c)]=_0x1ab359;}}class _0xcfff87 extends _0x200eec{constructor(_0x174084,_0xeeecaf){const _0x33b4da=_0x2d34;super(_0x33b4da(0x17e)+_0x174084+':\x20'+_0xeeecaf['length']+'\x20documents\x20fail\x20validation',_0x33b4da(0x309),{'type':_0x174084,'failures':_0xeeecaf}),this[_0x33b4da(0x43e)]='OKDBSchemaCollectionError',this['type']=_0x174084,this[_0x33b4da(0x1e8)]=_0xeeecaf;}}class _0x254b53 extends _0x200eec{constructor(_0x3ef255,_0x135616,_0x551c05,_0x5b90b6,_0x4c319e){const _0xf136ec=_0x2d34;super('Foreign\x20key\x20violation:\x20'+_0x3ef255+'@'+_0x135616+'.'+_0x551c05+_0xf136ec(0x26a)+_0x5b90b6+'@'+_0x4c319e+_0xf136ec(0x29d),_0xf136ec(0x29c),{'sourceType':_0x3ef255,'sourceKey':_0x135616,'fieldPath':_0x551c05,'targetType':_0x5b90b6,'targetKey':_0x4c319e}),this[_0xf136ec(0x43e)]='OKDBForeignKeyError',this[_0xf136ec(0x269)]=_0x3ef255,this['sourceKey']=_0x135616,this[_0xf136ec(0x340)]=_0x551c05,this[_0xf136ec(0x2ef)]=_0x5b90b6,this[_0xf136ec(0x418)]=_0x4c319e;}}class _0x80b9ad extends _0x200eec{constructor(_0x29d80f,_0x19da85,_0x61faa2){const _0x2f7981=_0x2d34;super(_0x2f7981(0x45d)+_0x29d80f+'@'+_0x19da85+':\x20'+_0x61faa2['length']+_0x2f7981(0x2bf),_0x2f7981(0x3f4),{'targetType':_0x29d80f,'targetKey':_0x19da85,'references':_0x61faa2}),this[_0x2f7981(0x43e)]='OKDBForeignKeyDeleteError',this[_0x2f7981(0x2ef)]=_0x29d80f,this[_0x2f7981(0x418)]=_0x19da85,this[_0x2f7981(0x3d7)]=_0x61faa2;}}class _0x12730a extends _0x200eec{constructor(_0x15aa7c,_0x3fbb8e,_0x7bcc52){const _0x2e618c=_0x2d34;super(_0x2e618c(0x1de)+_0x3fbb8e+'\x22\x20on\x20\x22'+_0x15aa7c+_0x2e618c(0x2f4)+_0x7bcc52[_0x2e618c(0x353)](_0x386a34=>_0x386a34[_0x2e618c(0x2ff)]+':'+_0x386a34[_0x2e618c(0x43e)])[_0x2e618c(0x2b5)](',\x20'),_0x2e618c(0x464),{'type':_0x15aa7c,'index':_0x3fbb8e,'usedBy':_0x7bcc52}),this[_0x2e618c(0x43e)]=_0x2e618c(0x280);}}return okdbError={'OKDBError':_0x200eec,'OKDBVersionMismatchError':_0x665649,'OKDBNotFoundError':_0x30d335,'OKDBAlreadyExistsError':_0x29dfc6,'OKDBInvalidIndexKeyError':_0x59ada7,'OKDBInvalidPrimaryKeyError':_0x2e857d,'OKDBTypeNotRegisteredError':_0x29b120,'OKDBTypeAlreadyRegisteredError':_0x35331b,'OKDBIndexNotRegisteredError':_0x46fa87,'OKDBIndexAlreadyRegisteredError':_0x51703f,'OKDBInvalidValueError':_0xe3fb45,'OKDBUniqueConstraintError':_0x385a89,'OKDBSchemaValidationError':_0x8ce92b,'OKDBSchemaCollectionError':_0xcfff87,'OKDBForeignKeyError':_0x254b53,'OKDBForeignKeyDeleteError':_0x80b9ad,'OKDBIndexHasConsumersError':_0x12730a},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2c0c00=_0x2d33c9;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3045bc={'PUT':_0x2c0c00(0x374),'REMOVE':_0x2c0c00(0x2ac),'INDEX_DROP':_0x2c0c00(0x2cf),'INDEX_REGISTER':_0x2c0c00(0x2f9),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':_0x2c0c00(0x2a7),'FTS_REGISTER':'registerFts','FTS_DROP':_0x2c0c00(0x2db),'FTS_RESET':_0x2c0c00(0x394),'SCHEMA_SET':_0x2c0c00(0x3b9),'SCHEMA_DROP':_0x2c0c00(0x45a),'TTL_SET':_0x2c0c00(0x1af),'TTL_CLEAR':_0x2c0c00(0x431)},_0x1d7c20={'SYSTEM_READY':_0x2c0c00(0x420),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':'system:drain','SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x2c0c00(0x34a),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x2c0c00(0x370),'INDEX_RESET':_0x2c0c00(0x31d),'INDEX_READY':_0x2c0c00(0x378),'INDEX_PROGRESS':'index:progress','INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x2c0c00(0x2e8),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x2c0c00(0x2ed),'FTS_RESET':_0x2c0c00(0x37b),'SCHEMA_SET':_0x2c0c00(0x314),'SCHEMA_DROP':_0x2c0c00(0x360),'UNIQUE_VIOLATION':_0x2c0c00(0x211),'UNIQUE_VIOLATION_RESOLVED':_0x2c0c00(0x1b4),'REF_VIOLATION':_0x2c0c00(0x448),'REF_VIOLATION_RESOLVED':_0x2c0c00(0x36d),'SYNC_APPLY':_0x2c0c00(0x287),'TXN_START':_0x2c0c00(0x1f7),'TXN_END':'txn:end','TXN_ROLLBACK':_0x2c0c00(0x326),'TYPE_REGISTERED':_0x2c0c00(0x1b6),'TYPE_DROP':_0x2c0c00(0x38a),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x2c0c00(0x399),'TTL_EXPIRED':_0x2c0c00(0x1a8),'TTL_SET':_0x2c0c00(0x3a1),'TTL_CLEAR':_0x2c0c00(0x44b),'LICENSE_INVALID':_0x2c0c00(0x160),'LICENSE_ADDED':_0x2c0c00(0x180),'LICENSE_ACTIVATED':_0x2c0c00(0x178),'LICENSE_REMOVED':'license:removed'},_0x530c15={'CREATING':'creating','RESETTING':_0x2c0c00(0x3c3),'READY':'ready','DROPPING':_0x2c0c00(0x44d),'WAITING':_0x2c0c00(0x413)},_0x75275b={'CREATED':_0x2c0c00(0x239),'STARTING':_0x2c0c00(0x3ee),'STARTED':'started','STOPPING':'stopping','STOPPED':_0x2c0c00(0x2f1)},_0x29aa38={'CREATING':'creating','READY':_0x2c0c00(0x402),'HALTED':_0x2c0c00(0x1ab),'STOPPED':_0x2c0c00(0x2f1),'RESETTING':_0x2c0c00(0x3c3)},_0x578baa=Object['freeze']({'POKE':_0x2c0c00(0x435),'DRAIN':_0x2c0c00(0x3ea)});return okdbEnums={'BUS_EVENTS':_0x578baa,'CHANGE_ACTIONS':_0x3045bc,'EVENTS':_0x1d7c20,'INDEX_STATE':_0x530c15,'OKDB_STATE':_0x75275b,'VIEW_STATE':_0x29aa38},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x2908fb=_0x2d33c9;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x3a1a4d=require$$1,_0x28105c=require$$1$1,_0x515a29=require$$0,_0x4155cd=_0x3a1a4d[_0x2908fb(0x28b)](_0x28105c[_0x2908fb(0x2b5)](__dirname,_0x2908fb(0x2d6)),'utf8')['trim'](),_0x564c0f=_0x515a29['createPublicKey'](_0x4155cd)[_0x2908fb(0x44e)]({'type':_0x2908fb(0x196),'format':_0x2908fb(0x40a)}),_0xb67e06=_0x515a29[_0x2908fb(0x2a4)](_0x2908fb(0x17d))['update'](_0x564c0f)[_0x2908fb(0x18e)]('hex')[_0x2908fb(0x42b)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x4155cd,'PUB_FINGERPRINT':_0xb67e06},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x7017dc=_0x2d33c9;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x1cad26=require$$0,{OKDBError:_0x2869cd}=requireOkdbError(),{EVENTS:_0x4c7608}=requireOkdbEnums(),_0x1298b0=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x327d70,LICENSE_TYPE_INTERNAL:_0x5281c9,OPEN_LICENSE_MAX_DURATION_MS:_0x3aa451}=_0x1298b0,_0x2e54f9=requireOkdbPubkey(),_0xcddb7a={'LICENSED_BUILD':_0x7017dc(0x1f3),'PUBLIC_KEY_PEM':_0x2e54f9['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x2e54f9[_0x7017dc(0x439)],'LICENSE_EXPIRED_ACTION':_0x7017dc(0x416)},_0x40d757=_0x7017dc(0x256),_0x39a65b={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x52bc01(_0x48917b){const _0x4395be=_0x7017dc;!_0x48917b[_0x4395be(0x19b)](_0x40d757)&&await _0x48917b['registerType'](_0x40d757);}class _0xf6692f{constructor(_0x2fcb67){const _0xeec9c2=_0x7017dc;this[_0xeec9c2(0x24f)]=_0x2fcb67,this[_0xeec9c2(0x3f3)]=null;}async['reload'](){const _0x162f7d=_0x7017dc,_0xebce85=this[_0x162f7d(0x24f)]['_systemEnv'];if(!_0xebce85||!_0xebce85[_0x162f7d(0x19b)](_0x40d757)){this[_0x162f7d(0x3f3)]=null;return;}const _0x20e5bd=this[_0x162f7d(0x24f)]['id'];let _0x562f91=null;for(const {key:_0x4e437a,value:_0x4c51e8}of _0xebce85[_0x162f7d(0x295)](_0x40d757)){const _0x172c5f=this[_0x162f7d(0x390)](_0x4c51e8,_0x20e5bd);_0x172c5f===_0x162f7d(0x349)&&!_0x562f91&&(_0x562f91={..._0x4c51e8,'id':_0x4e437a,'status':_0x172c5f});}this[_0x162f7d(0x3f3)]=_0x562f91;if(this[_0x162f7d(0x3f3)]&&this[_0x162f7d(0x3f3)][_0x162f7d(0x2c6)]===_0x327d70){const _0x31533f=Math[_0x162f7d(0x2c1)]((this[_0x162f7d(0x3f3)]['expiresAt']-Date[_0x162f7d(0x3e6)]())/0x5265c00);this[_0x162f7d(0x24f)][_0x162f7d(0x416)]?.[_0x162f7d(0x34e)](_0x162f7d(0x339)+_0x31533f+_0x162f7d(0x3ab),{'feature':_0x162f7d(0x1e3),'licensee':this['_active'][_0x162f7d(0x2a2)],'expiresAt':new Date(this[_0x162f7d(0x3f3)][_0x162f7d(0x247)])[_0x162f7d(0x298)]()});}this[_0x162f7d(0x3f3)]&&this[_0x162f7d(0x3f3)]['licenseType']===_0x5281c9&&this[_0x162f7d(0x24f)][_0x162f7d(0x416)]?.[_0x162f7d(0x34e)](_0x162f7d(0x1ed),{'feature':_0x162f7d(0x1e3),'licensee':this['_active'][_0x162f7d(0x2a2)]});}['_computeStatus'](_0x3efd3c,_0x567efc){const _0x522d80=_0x7017dc;if(!_0x3efd3c['blob'])return _0x522d80(0x27a);let _0x5e55eb;try{_0x5e55eb=_0x1298b0[_0x522d80(0x224)](_0x3efd3c[_0x522d80(0x444)]);}catch(_0x3e0953){return _0x522d80(0x27a);}try{const _0x367f6a=_0x1cad26[_0x522d80(0x30b)](null,_0x5e55eb[_0x522d80(0x437)],_0xcddb7a[_0x522d80(0x2ea)],_0x5e55eb['sig']);if(!_0x367f6a)return _0x522d80(0x27a);}catch(_0x572fc1){return'invalid';}if(_0x5e55eb['decoded'][_0x522d80(0x2c6)]===_0x5281c9)return'active';if(_0x5e55eb[_0x522d80(0x366)][_0x522d80(0x247)]<=Date[_0x522d80(0x3e6)]())return _0x522d80(0x23f);if(_0x5e55eb[_0x522d80(0x366)][_0x522d80(0x2c6)]===_0x327d70)return _0x522d80(0x349);if(!_0x3efd3c[_0x522d80(0x292)])return _0x522d80(0x320);const _0x180108=_0x1298b0[_0x522d80(0x45f)]({'tokenString':_0x3efd3c['activation'],'nodeId':_0x567efc,'rawBlobBuf':_0x5e55eb[_0x522d80(0x165)],'pubKeyPem':_0xcddb7a[_0x522d80(0x2ea)],'pubFingerprint':_0xcddb7a[_0x522d80(0x439)]});if(_0x180108[_0x522d80(0x317)]===_0x522d80(0x371)||_0x180108['reason']===_0x522d80(0x440))return _0x522d80(0x36c);if(_0x180108['reason']===_0x522d80(0x235))return'expired';if(!_0x180108[_0x522d80(0x199)])return _0x522d80(0x36c);return'active';}get[_0x7017dc(0x349)](){const _0x527535=_0x7017dc;return this[_0x527535(0x3f3)];}get['effective'](){const _0x1440c5=_0x7017dc;return this[_0x1440c5(0x3f3)]??_0x39a65b;}[_0x7017dc(0x1db)](_0x531702){const _0xa5fb2f=_0x7017dc;if(_0xcddb7a[_0xa5fb2f(0x3c2)]!==_0xa5fb2f(0x1f3))return;const _0x4908ab=this['effective'];if(!_0x4908ab[_0xa5fb2f(0x44a)]?.[_0x531702]){const _0x1d1c24=_0x4908ab[_0xa5fb2f(0x204)]?_0xa5fb2f(0x363)+_0x531702+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x531702+'\x22\x20to\x20enable\x20it.':_0xa5fb2f(0x3f0)+_0x531702+_0xa5fb2f(0x16b)+_0x531702+'\x22.';throw new _0x2869cd(_0x1d1c24,_0xa5fb2f(0x264),{'feature':_0x531702});}}['isFeatureEnabled'](_0x443448){const _0x3d6b10=_0x7017dc;if(_0xcddb7a[_0x3d6b10(0x3c2)]!==_0x3d6b10(0x1f3))return!![];return!!this[_0x3d6b10(0x228)][_0x3d6b10(0x44a)]?.[_0x443448];}[_0x7017dc(0x18b)](_0xc61eca,_0x4e4d14){const _0x5cb4da=_0x7017dc;if(_0xcddb7a[_0x5cb4da(0x3c2)]!==_0x5cb4da(0x1f3))return;const _0x24c8a5=this[_0x5cb4da(0x228)],_0x39a847=_0x24c8a5[_0x5cb4da(0x3be)]?.[_0xc61eca];if(_0x39a847===null||_0x39a847===undefined||_0x39a847===0x0)return;if(_0x4e4d14>=_0x39a847)throw new _0x2869cd(_0x5cb4da(0x3cc)+_0xc61eca+'\x20('+_0x4e4d14+'/'+_0x39a847+')',_0x5cb4da(0x1ba),{'limit':_0xc61eca,'current':_0x4e4d14,'max':_0x39a847});}async[_0x7017dc(0x173)](_0xd446b1){const _0x4cb19f=_0x7017dc;let _0x5f1159;try{_0x5f1159=_0x1298b0['decodeLicenseBlob'](_0xd446b1);}catch(_0xc1f8f0){throw new _0x2869cd(_0x4cb19f(0x21e)+_0xc1f8f0[_0x4cb19f(0x31a)],'LICENSE_INVALID');}let _0x2cc246;try{_0x2cc246=_0x1cad26[_0x4cb19f(0x30b)](null,_0x5f1159[_0x4cb19f(0x437)],_0xcddb7a[_0x4cb19f(0x2ea)],_0x5f1159[_0x4cb19f(0x3ed)]);}catch(_0x5def1b){throw new _0x2869cd(_0x4cb19f(0x1c1)+_0x5def1b['message'],_0x4cb19f(0x1c8));}if(!_0x2cc246)throw new _0x2869cd(_0x4cb19f(0x25c)+(_0x4cb19f(0x16f)+_0xcddb7a['PUB_FINGERPRINT']+'.\x20')+_0x4cb19f(0x220),_0x4cb19f(0x1c8),{'expectedFingerprint':_0xcddb7a['PUB_FINGERPRINT']});if(_0x5f1159[_0x4cb19f(0x366)][_0x4cb19f(0x2c6)]===_0x327d70){const _0x4f5f49=_0x5f1159['decoded'][_0x4cb19f(0x247)]-_0x5f1159[_0x4cb19f(0x366)][_0x4cb19f(0x1ae)];if(_0x4f5f49>_0x3aa451)throw new _0x2869cd(_0x4cb19f(0x308)+Math[_0x4cb19f(0x2c1)](_0x4f5f49/(0x1e*0x5265c00))+_0x4cb19f(0x3e4),_0x4cb19f(0x1c8));}const _0x27686c=this[_0x4cb19f(0x24f)][_0x4cb19f(0x3fc)];await _0x52bc01(_0x27686c);const _0x343f45=_0x1298b0[_0x4cb19f(0x176)](_0x5f1159[_0x4cb19f(0x165)])[_0x4cb19f(0x43c)](_0x4cb19f(0x429));for(const {value:_0x394c89}of _0x27686c['getRange'](_0x40d757)){if(_0x394c89[_0x4cb19f(0x36e)]===_0x343f45)throw new _0x2869cd('License\x20already\x20stored',_0x4cb19f(0x1c8));}const _0x8a67fc=_0x1cad26[_0x4cb19f(0x35d)](),_0x239e39={'blob':_0xd446b1,'activation':null,'addedAt':Date[_0x4cb19f(0x3e6)](),'_licenseHash':_0x343f45,'licensee':_0x5f1159[_0x4cb19f(0x366)][_0x4cb19f(0x2a2)],'expiresAt':_0x5f1159[_0x4cb19f(0x366)][_0x4cb19f(0x247)],'features':_0x5f1159['decoded'][_0x4cb19f(0x44a)],'limits':_0x5f1159[_0x4cb19f(0x366)][_0x4cb19f(0x3be)],'licenseType':_0x5f1159[_0x4cb19f(0x366)][_0x4cb19f(0x2c6)]};return await _0x27686c['put'](_0x40d757,_0x8a67fc,_0x239e39),{'id':_0x8a67fc,..._0x239e39};}async[_0x7017dc(0x19f)](_0x1091ca){const _0x26ece7=_0x7017dc;let _0x56894d;try{_0x56894d=_0x1298b0[_0x26ece7(0x2a6)](_0x1091ca);}catch(_0x3e17a8){throw new _0x2869cd('Invalid\x20activation\x20token:\x20'+_0x3e17a8[_0x26ece7(0x31a)],_0x26ece7(0x262));}const _0x2fe251=_0x56894d['licenseHash'][_0x26ece7(0x43c)](_0x26ece7(0x429)),_0x2bc9f1=this[_0x26ece7(0x24f)]['_systemEnv'];if(!_0x2bc9f1||!_0x2bc9f1[_0x26ece7(0x19b)](_0x40d757))throw new _0x2869cd('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x26ece7(0x262));let _0x4098f7=null,_0x3710e0=null;for(const {key:_0x2027e9,value:_0x565b50}of _0x2bc9f1[_0x26ece7(0x295)](_0x40d757)){if(_0x565b50[_0x26ece7(0x36e)]===_0x2fe251){_0x4098f7=_0x2027e9,_0x3710e0=_0x565b50;break;}}if(!_0x4098f7)throw new _0x2869cd(_0x26ece7(0x265),_0x26ece7(0x262));const {rawBuf:_0x4aa480}=_0x1298b0[_0x26ece7(0x224)](_0x3710e0[_0x26ece7(0x444)]),_0xc1b07a=_0x1298b0['verifyActivation']({'tokenString':_0x1091ca,'nodeId':this[_0x26ece7(0x24f)]['id'],'rawBlobBuf':_0x4aa480,'pubKeyPem':_0xcddb7a[_0x26ece7(0x2ea)],'pubFingerprint':_0xcddb7a['PUB_FINGERPRINT']});if(!_0xc1b07a['valid'])throw new _0x2869cd(_0x26ece7(0x388)+_0xc1b07a[_0x26ece7(0x317)],_0x26ece7(0x262),{'reason':_0xc1b07a['reason']});const _0x3815={..._0x3710e0,'activation':_0x1091ca};return await _0x2bc9f1['update'](_0x40d757,_0x4098f7,_0x3815),{'id':_0x4098f7,..._0x3815};}async[_0x7017dc(0x1ac)](_0x36cb95){const _0x15c273=_0x7017dc,_0x4cb27a=this['okdb'][_0x15c273(0x3fc)];if(!_0x4cb27a||!_0x4cb27a['hasType'](_0x40d757))return;await _0x4cb27a[_0x15c273(0x2ac)](_0x40d757,_0x36cb95);}async[_0x7017dc(0x2a8)](){const _0x52f659=_0x7017dc,_0x496f42=this[_0x52f659(0x24f)][_0x52f659(0x3fc)];if(!_0x496f42||!_0x496f42[_0x52f659(0x19b)](_0x40d757))return[];const _0x5d3444=this[_0x52f659(0x24f)]['id'],_0x598ca5=[];for(const {key:_0x1ba0e7,value:_0x522f92}of _0x496f42['getRange'](_0x40d757)){const _0x4784ec=this[_0x52f659(0x390)](_0x522f92,_0x5d3444);_0x598ca5['push']({..._0x522f92,'id':_0x1ba0e7,'status':_0x4784ec});}return _0x598ca5;}['getPins'](){const _0x3f596f=_0x7017dc,_0x153caf=this[_0x3f596f(0x24f)][_0x3f596f(0x3fc)];if(!_0x153caf||!_0x153caf['hasType'](_0x40d757))return[];const _0x30acea=this[_0x3f596f(0x24f)]['id'],_0x40bda5=[];for(const {key:_0x9934a6,value:_0x1aac59}of _0x153caf[_0x3f596f(0x295)](_0x40d757)){if(_0x1aac59[_0x3f596f(0x36e)]){if(_0x1aac59[_0x3f596f(0x2c6)]===_0x327d70)_0x40bda5[_0x3f596f(0x218)]({'licenseId':_0x9934a6,'pin':null});else{const _0x2c69da=Buffer[_0x3f596f(0x293)](_0x1aac59['_licenseHash'],_0x3f596f(0x429)),{pin:_0x767520}=_0x1298b0[_0x3f596f(0x40f)](_0x30acea,_0x2c69da,_0xcddb7a['PUB_FINGERPRINT']);_0x40bda5['push']({'licenseId':_0x9934a6,'pin':_0x767520});}}}return _0x40bda5;}async[_0x7017dc(0x359)](){const _0x501104=_0x7017dc,_0x2ccee7=this['_active'];await this[_0x501104(0x395)]();if(this[_0x501104(0x3f3)]&&this['_active'][_0x501104(0x2c6)]===_0x327d70){const _0x820637=Math[_0x501104(0x2c1)]((this[_0x501104(0x3f3)]['expiresAt']-Date[_0x501104(0x3e6)]())/0x5265c00);this[_0x501104(0x24f)][_0x501104(0x416)]?.[_0x501104(0x34e)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x820637+'\x20day(s).',{'feature':'license','licensee':this[_0x501104(0x3f3)][_0x501104(0x2a2)],'expiresAt':new Date(this[_0x501104(0x3f3)][_0x501104(0x247)])['toISOString']()});}this[_0x501104(0x3f3)]&&this[_0x501104(0x3f3)][_0x501104(0x2c6)]===_0x5281c9&&this[_0x501104(0x24f)]['log']?.[_0x501104(0x34e)](_0x501104(0x1ed),{'feature':_0x501104(0x1e3),'licensee':this[_0x501104(0x3f3)][_0x501104(0x2a2)]});if(_0x2ccee7&&!this[_0x501104(0x3f3)]){this[_0x501104(0x24f)][_0x501104(0x416)]?.['warn'](_0x501104(0x372),{'feature':_0x501104(0x1e3)}),this['okdb']['events']?.['emit'](_0x4c7608[_0x501104(0x1c8)],{'previous':_0x2ccee7});const _0x39484e=this[_0x501104(0x24f)][_0x501104(0x40c)]?.[_0x501104(0x442)]??_0xcddb7a[_0x501104(0x3e2)];_0x39484e==='shutdown'&&(this[_0x501104(0x24f)]['log']?.['error'](_0x501104(0x2aa),{'feature':'license'}),this['okdb'][_0x501104(0x275)]()[_0x501104(0x23c)](()=>{})[_0x501104(0x282)](()=>process[_0x501104(0x404)](0x1)));}}}return okdbLicense={'LicenseChecker':_0xf6692f,'_C':_0xcddb7a},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x20f8bb=_0x2d33c9;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x5a7e09=require$$0$2,_0x147197=require$$1,_0x2f9b6b=require$$2$1,_0x124b76=require$$1$1,_0x4658d1=_0x124b76[_0x20f8bb(0x2b5)](_0x2f9b6b[_0x20f8bb(0x289)](),_0x20f8bb(0x15e)),_0x2f465f=0x3e8,_0x41f5b5={'reset':_0x20f8bb(0x291),'bold':_0x20f8bb(0x1d1),'dim':'\x1b[2m','red':_0x20f8bb(0x1c0),'green':_0x20f8bb(0x2b4),'yellow':_0x20f8bb(0x3dc),'blue':_0x20f8bb(0x2ad),'magenta':_0x20f8bb(0x3bd),'cyan':_0x20f8bb(0x30a),'white':_0x20f8bb(0x3e9),'gray':_0x20f8bb(0x163)},_0x4110e5=!process[_0x20f8bb(0x35a)][_0x20f8bb(0x201)]||!!process.env.NO_COLOR,_0x441717=(_0x5f2efc,_0x1cff23)=>_0x4110e5?_0x1cff23:''+_0x5f2efc+_0x1cff23+_0x41f5b5[_0x20f8bb(0x226)],_0xaef36b={'error':_0x41f5b5['red'],'warn':_0x41f5b5['yellow'],'info':_0x41f5b5[_0x20f8bb(0x232)],'debug':_0x41f5b5['gray']},_0x57bb57={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x25e233(_0x1a4df3,_0x289654='info'){const _0x4fd865=_0x20f8bb,{level:_0x305735,msg:_0x1270b0,meta:_0x5c0092,context:_0x527d97,ts:_0x403844}=_0x1a4df3;if((_0x57bb57[_0x305735]??0x1)<(_0x57bb57[_0x289654]??0x1))return;const _0xa557c4=_0x441717(_0x41f5b5[_0x4fd865(0x20a)],new Date(_0x403844)[_0x4fd865(0x298)]()),_0x14fc58=_0x441717(_0xaef36b[_0x305735]??_0x41f5b5[_0x4fd865(0x365)],_0x305735[_0x4fd865(0x35e)](0x5));let _0x1459c1='\x20\x20'+_0xa557c4+'\x20'+_0x441717(_0x41f5b5['bold'],_0x14fc58)+'\x20'+_0x1270b0;if(_0x5c0092&&Object['keys'](_0x5c0092)['length']>0x0){const _0x4bfdd8=Object['entries'](_0x5c0092)[_0x4fd865(0x353)](([_0x1b2688,_0x3d712f])=>_0x1b2688+'='+_0x3d712f)[_0x4fd865(0x2b5)]('\x20');_0x1459c1+=_0x441717(_0x41f5b5[_0x4fd865(0x276)],'\x20\x20['+_0x4bfdd8+']');}if(_0x527d97!==undefined){const _0x4dc9ab=typeof _0x527d97===_0x4fd865(0x1d0)?JSON[_0x4fd865(0x26d)](_0x527d97):String(_0x527d97);_0x1459c1+=_0x441717(_0x41f5b5['dim'],'\x20\x20'+_0x4dc9ab);}const _0x20fc12=_0x305735==='error'||_0x305735===_0x4fd865(0x34e)?process[_0x4fd865(0x41f)][_0x4fd865(0x270)][_0x4fd865(0x33d)](process[_0x4fd865(0x41f)]):process[_0x4fd865(0x35a)][_0x4fd865(0x270)][_0x4fd865(0x33d)](process[_0x4fd865(0x35a)]);_0x20fc12(_0x1459c1+'\x0a');}function _0x1270d0(_0x298ba6,_0x322345){const _0xd29dd9=_0x20f8bb;if(_0x298ba6===0xcc||_0x298ba6>=0xc8&&_0x298ba6<0x12c&&!_0x322345){console[_0xd29dd9(0x416)](_0xd29dd9(0x2d9)+_0x441717(_0x41f5b5[_0xd29dd9(0x1b7)],'✓')+'\x0a');return;}if(_0x298ba6>=0x190||_0x322345?.[_0xd29dd9(0x3b0)]){const _0x1a5e0a=_0x322345?.['error']??_0x322345?.[_0xd29dd9(0x31a)]??_0xd29dd9(0x1b3)+_0x298ba6;console['log'](_0xd29dd9(0x2d9)+_0x441717(_0x41f5b5['red'],'✗')+'\x20'+_0x441717(_0x41f5b5[_0xd29dd9(0x2b6)]+_0x41f5b5[_0xd29dd9(0x23e)],String(_0x298ba6))+'\x20\x20'+_0x1a5e0a+'\x0a');return;}const _0x25574e=Object[_0xd29dd9(0x206)][_0xd29dd9(0x245)][_0xd29dd9(0x3d5)](_0x322345??{},_0xd29dd9(0x187))?_0x322345['result']:_0x322345,_0x34e362=_0x322345?.[_0xd29dd9(0x31b)];console[_0xd29dd9(0x416)](''),_0x3d7a85(_0x25574e,'\x20\x20');if(_0x34e362?.[_0xd29dd9(0x441)]!=null||_0x34e362?.['time']!=null){const _0x26afa6=[];if(_0x34e362['count']!=null)_0x26afa6['push'](_0x34e362[_0xd29dd9(0x441)]+_0xd29dd9(0x3c9)+(_0x34e362[_0xd29dd9(0x441)]!==0x1?'s':''));if(_0x34e362[_0xd29dd9(0x303)]!=null)_0x26afa6[_0xd29dd9(0x218)](_0x34e362['time']+'ms');console['log'](_0xd29dd9(0x2d9)+_0x441717(_0x41f5b5[_0xd29dd9(0x276)],_0x26afa6[_0xd29dd9(0x2b5)](_0xd29dd9(0x15c))));}console['log']('');}function _0x3d7a85(_0x1a23d3,_0x1b4aba=''){const _0x43ae74=_0x20f8bb;if(_0x1a23d3===null||_0x1a23d3===undefined){console['log'](_0x1b4aba+_0x441717(_0x41f5b5[_0x43ae74(0x276)],_0x43ae74(0x1e7)));return;}if(Array[_0x43ae74(0x310)](_0x1a23d3)){if(_0x1a23d3['length']===0x0){console['log'](_0x1b4aba+_0x441717(_0x41f5b5['dim'],_0x43ae74(0x1b0)));return;}if(_0x1a23d3[_0x43ae74(0x1cb)](_0x31fb4e=>_0x31fb4e&&typeof _0x31fb4e===_0x43ae74(0x1d0)&&'key'in _0x31fb4e&&_0x43ae74(0x31f)in _0x31fb4e)){_0x2ae83c(_0x1a23d3,_0x1b4aba);return;}if(_0x1a23d3[_0x43ae74(0x1cb)](_0x40e84f=>_0x40e84f&&typeof _0x40e84f===_0x43ae74(0x1d0)&&_0x43ae74(0x240)in _0x40e84f&&_0x43ae74(0x441)in _0x40e84f)){_0x342f68(_0x1a23d3,_0x1b4aba);return;}if(_0x1a23d3[_0x43ae74(0x1cb)](_0x52b37b=>typeof _0x52b37b!==_0x43ae74(0x1d0)||_0x52b37b===null)){_0x1a23d3['forEach']((_0x2ebc85,_0x3350cb)=>console[_0x43ae74(0x416)](_0x1b4aba+_0x441717(_0x41f5b5[_0x43ae74(0x20a)],_0x3350cb+0x1+'.')+'\x20'+_0x441717(_0x41f5b5[_0x43ae74(0x365)],String(_0x2ebc85))));return;}_0x1a23d3[_0x43ae74(0x253)]((_0x65ac1a,_0x13238d)=>{const _0x384802=_0x43ae74;console[_0x384802(0x416)](_0x1b4aba+_0x441717(_0x41f5b5[_0x384802(0x276)],'['+_0x13238d+']'));if(typeof _0x65ac1a===_0x384802(0x1d0)&&_0x65ac1a!==null)_0x4d9f95(_0x65ac1a,_0x1b4aba+'\x20\x20');else console[_0x384802(0x416)](_0x1b4aba+'\x20\x20'+String(_0x65ac1a));});return;}if(typeof _0x1a23d3===_0x43ae74(0x1d0)){if(_0x43ae74(0x445)in _0x1a23d3&&_0x43ae74(0x31f)in _0x1a23d3&&Object[_0x43ae74(0x3b8)](_0x1a23d3)[_0x43ae74(0x462)]<=0x3){console[_0x43ae74(0x416)](_0x1b4aba+_0x441717(_0x41f5b5[_0x43ae74(0x2b6)]+_0x41f5b5[_0x43ae74(0x232)],String(_0x1a23d3[_0x43ae74(0x445)])));const _0x468c59=_0x1a23d3[_0x43ae74(0x31f)];if(_0x468c59&&typeof _0x468c59===_0x43ae74(0x1d0))_0x4d9f95(_0x468c59,_0x1b4aba);else console['log'](_0x1b4aba+_0x441717(_0x41f5b5['white'],String(_0x468c59)));return;}_0x4d9f95(_0x1a23d3,_0x1b4aba);return;}console[_0x43ae74(0x416)](_0x1b4aba+_0x441717(_0x41f5b5['white'],String(_0x1a23d3)));}function _0x4d9f95(_0x3d64c6,_0x7d0858=''){const _0x1f0d48=_0x20f8bb,_0x46ee23=Object[_0x1f0d48(0x32a)](_0x3d64c6);if(_0x46ee23[_0x1f0d48(0x462)]===0x0){console['log'](_0x7d0858+_0x441717(_0x41f5b5[_0x1f0d48(0x276)],'{}'));return;}const _0x2590ed=Math[_0x1f0d48(0x1f5)](0x1c,Math[_0x1f0d48(0x428)](..._0x46ee23[_0x1f0d48(0x353)](([_0x5daf26])=>_0x5daf26[_0x1f0d48(0x462)])));for(const [_0x376c84,_0x3bbe12]of _0x46ee23){const _0x55db9d=_0x441717(_0x41f5b5['cyan'],_0x376c84[_0x1f0d48(0x35e)](_0x2590ed));if(_0x3bbe12===null||_0x3bbe12===undefined)console[_0x1f0d48(0x416)](_0x7d0858+_0x55db9d+'\x20\x20'+_0x441717(_0x41f5b5['dim'],_0x1f0d48(0x39a)));else{if(typeof _0x3bbe12==='object'){const _0x1cdc45=JSON[_0x1f0d48(0x26d)](_0x3bbe12);_0x1cdc45[_0x1f0d48(0x462)]<=0x50?console[_0x1f0d48(0x416)](_0x7d0858+_0x55db9d+'\x20\x20'+_0x441717(_0x41f5b5[_0x1f0d48(0x276)],_0x1cdc45)):(console[_0x1f0d48(0x416)](_0x7d0858+_0x55db9d),_0x3d7a85(_0x3bbe12,_0x7d0858+'\x20\x20'));}else{const _0x72e090=typeof _0x3bbe12===_0x1f0d48(0x2cd)?_0x441717(_0x3bbe12?_0x41f5b5[_0x1f0d48(0x1b7)]:_0x41f5b5[_0x1f0d48(0x450)],String(_0x3bbe12)):typeof _0x3bbe12===_0x1f0d48(0x2f5)?_0x441717(_0x41f5b5[_0x1f0d48(0x3eb)],String(_0x3bbe12)):_0x441717(_0x41f5b5[_0x1f0d48(0x365)],String(_0x3bbe12));console[_0x1f0d48(0x416)](_0x7d0858+_0x55db9d+'\x20\x20'+_0x72e090);}}}}function _0x2ae83c(_0x2c2216,_0x3647c7=''){const _0x283d23=_0x20f8bb,_0x11cf78=Math[_0x283d23(0x1f5)](0x20,Math['max'](..._0x2c2216[_0x283d23(0x353)](_0xdf665f=>String(_0xdf665f[_0x283d23(0x445)])[_0x283d23(0x462)])));for(const {key:_0x88c266,value:_0x4c2e0c,score:_0x405bc9,clock:_0x31f45d}of _0x2c2216){const _0x2bc2b1=_0x441717(_0x41f5b5[_0x283d23(0x2b6)]+_0x41f5b5[_0x283d23(0x232)],String(_0x88c266)['padEnd'](_0x11cf78)),_0x6f6fec=_0x4c2e0c==null?_0x441717(_0x41f5b5[_0x283d23(0x276)],_0x283d23(0x39a)):typeof _0x4c2e0c===_0x283d23(0x1d0)?_0x441717(_0x41f5b5[_0x283d23(0x276)],JSON[_0x283d23(0x26d)](_0x4c2e0c)):_0x441717(_0x41f5b5[_0x283d23(0x365)],String(_0x4c2e0c)),_0x8e18ff=_0x405bc9!=null?_0x441717(_0x41f5b5[_0x283d23(0x20a)],_0x283d23(0x1d3)+_0x405bc9[_0x283d23(0x2dd)](0x4)):'',_0x133ee5=_0x31f45d!=null?_0x441717(_0x41f5b5[_0x283d23(0x20a)],'\x20\x20@'+_0x31f45d):'';console['log'](_0x3647c7+_0x2bc2b1+'\x20\x20'+_0x6f6fec+_0x8e18ff+_0x133ee5);}}function _0x342f68(_0x2b7cf6,_0x43d586=''){const _0xcfd2b6=_0x20f8bb,_0x2702f9=Math[_0xcfd2b6(0x1f5)](0x20,Math[_0xcfd2b6(0x428)](..._0x2b7cf6['map'](_0x4bdf74=>_0x4bdf74[_0xcfd2b6(0x240)][_0xcfd2b6(0x462)])));for(const {type:_0x5365ab,count:_0x2df147,fields:_0x42df0b}of _0x2b7cf6){if(_0x5365ab[_0xcfd2b6(0x2ee)]('~'))continue;const _0x3fda24=_0x441717(_0x41f5b5[_0xcfd2b6(0x2b6)]+_0x41f5b5[_0xcfd2b6(0x232)],_0x5365ab[_0xcfd2b6(0x35e)](_0x2702f9)),_0xf29906=_0x441717(_0x41f5b5['magenta'],String(_0x2df147)[_0xcfd2b6(0x1a1)](0x6))+_0x441717(_0x41f5b5[_0xcfd2b6(0x276)],_0xcfd2b6(0x3f2)),_0x3a0201=_0x42df0b&&Object[_0xcfd2b6(0x3b8)](_0x42df0b)[_0xcfd2b6(0x462)]?_0x441717(_0x41f5b5[_0xcfd2b6(0x276)],_0xcfd2b6(0x254)+Object[_0xcfd2b6(0x3b8)](_0x42df0b)[_0xcfd2b6(0x42b)](0x0,0x6)[_0xcfd2b6(0x2b5)](',\x20')+(Object[_0xcfd2b6(0x3b8)](_0x42df0b)[_0xcfd2b6(0x462)]>0x6?'…':'')):'';console[_0xcfd2b6(0x416)](_0x43d586+_0x3fda24+'\x20\x20'+_0xf29906+_0x3a0201);}}const _0x4905c4=[_0x20f8bb(0x315),_0x20f8bb(0x3df),_0x20f8bb(0x391),_0x20f8bb(0x3cf),_0x20f8bb(0x410),'processors/'];function _0x325ee4(_0x3195aa,_0x441848){const _0x22c171=_0x20f8bb;if(_0x3195aa[_0x22c171(0x2ee)](_0x22c171(0x382)))return _0x3195aa;if(_0x3195aa['startsWith']('/'))return _0x22c171(0x16a)+_0x3195aa;if(_0x3195aa[_0x22c171(0x2ee)]('env/'))return'/api/'+_0x3195aa;const _0x13b963=_0x4905c4[_0x22c171(0x33b)](_0x2d22e6=>_0x3195aa===_0x2d22e6[_0x22c171(0x1fc)](/\/$/,'')||_0x3195aa[_0x22c171(0x2ee)](_0x2d22e6));return _0x13b963?_0x22c171(0x2dc)+_0x441848+'/'+_0x3195aa:_0x22c171(0x382)+_0x3195aa;}function _0x594d4d(_0x1dbd9e){const _0x265309=_0x20f8bb,_0x12b004={},_0x1cc285=[];let _0x52386e=0x0;while(_0x52386e<_0x1dbd9e['length']){if((_0x1dbd9e[_0x52386e]===_0x265309(0x198)||_0x1dbd9e[_0x52386e]==='-e')&&_0x1dbd9e[_0x52386e+0x1]&&!_0x1dbd9e[_0x52386e+0x1][_0x265309(0x2ee)]('-'))_0x12b004[_0x265309(0x414)]=_0x1dbd9e[++_0x52386e];else _0x1dbd9e[_0x52386e]===_0x265309(0x2cb)||_0x1dbd9e[_0x52386e]==='-h'?_0x12b004[_0x265309(0x1bd)]=!![]:_0x1cc285[_0x265309(0x218)](_0x1dbd9e[_0x52386e]);_0x52386e++;}return{'flags':_0x12b004,'rest':_0x1cc285};}const _0x569bff={'system':'System','envs':_0x20f8bb(0x25b),'types':_0x20f8bb(0x454),'data':_0x20f8bb(0x193),'indexes':_0x20f8bb(0x386),'fts':_0x20f8bb(0x301),'sync':_0x20f8bb(0x24a),'queue':_0x20f8bb(0x43f),'files':_0x20f8bb(0x2eb),'embeddings':_0x20f8bb(0x1e2),'engines':_0x20f8bb(0x3e7),'admin':'Admin','event':_0x20f8bb(0x30d),'processor':'Processors'},_0x3259bb=[_0x20f8bb(0x41c),_0x20f8bb(0x346),_0x20f8bb(0x315),_0x20f8bb(0x2f8),'indexes',_0x20f8bb(0x407),_0x20f8bb(0x329),'queue',_0x20f8bb(0x387),_0x20f8bb(0x393),'engines',_0x20f8bb(0x259)];function _0x334294(_0x4284a5){const _0x444660=_0x20f8bb;return _0x4284a5[_0x444660(0x1fc)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,_0x444660(0x357))[_0x444660(0x1fc)](/^\/env\/:env/,_0x444660(0x3fd))[_0x444660(0x1fc)](/^\//,'');}function _0x33c89a(_0x469f92,_0x2efff8=''){const _0x211b03=_0x20f8bb,_0x5464cb=_0x469f92[_0x211b03(0x36a)][_0x211b03(0x2fd)]()[_0x211b03(0x200)](_0x4e7f57=>!_0x4e7f57[_0x211b03(0x31b)]?.[_0x211b03(0x255)]),_0x246d94=_0x2efff8?_0x5464cb[_0x211b03(0x200)](_0x214936=>_0x214936[_0x211b03(0x2ba)]['toLowerCase']()['includes'](_0x2efff8['toLowerCase']())||(_0x21ec21(_0x214936)??'')[_0x211b03(0x451)]()['includes'](_0x2efff8[_0x211b03(0x451)]())||_0x43e6dc(_0x214936)[_0x211b03(0x33b)](_0x256232=>_0x256232[_0x211b03(0x451)]()[_0x211b03(0x1bf)](_0x2efff8[_0x211b03(0x451)]()))):_0x5464cb;if(!_0x246d94[_0x211b03(0x462)]){console[_0x211b03(0x416)](_0x441717(_0x41f5b5[_0x211b03(0x450)],_0x211b03(0x1eb)+_0x2efff8+'\x22\x0a'));return;}const _0x577e5e=new Map();for(const _0x42233a of _0x246d94){const _0x5a7cf3=_0x43e6dc(_0x42233a)[0x0]??_0x211b03(0x35c);if(!_0x577e5e['has'](_0x5a7cf3))_0x577e5e[_0x211b03(0x463)](_0x5a7cf3,[]);_0x577e5e[_0x211b03(0x219)](_0x5a7cf3)[_0x211b03(0x218)](_0x42233a);}const _0x377799=[..._0x3259bb[_0x211b03(0x200)](_0x2e7721=>_0x577e5e[_0x211b03(0x260)](_0x2e7721)),...[..._0x577e5e[_0x211b03(0x3b8)]()]['filter'](_0x33bde1=>!_0x3259bb[_0x211b03(0x1bf)](_0x33bde1))];console['log']('');for(const _0x518c2a of _0x377799){const _0x58d04d=_0x577e5e[_0x211b03(0x219)](_0x518c2a);if(!_0x58d04d?.['length'])continue;console[_0x211b03(0x416)](_0x441717(_0x41f5b5['bold'],'\x20\x20'+(_0x569bff[_0x518c2a]??_0x518c2a)));for(const _0x1dadc8 of _0x58d04d){const _0x124bbf=_0x441717(_0x41f5b5[_0x211b03(0x3eb)],_0x1dadc8[_0x211b03(0x403)][_0x211b03(0x35e)](0x7)),_0x2a16a7=_0x441717(_0x41f5b5[_0x211b03(0x232)],_0x334294(_0x1dadc8['path'])),_0x149b98=_0x21ec21(_0x1dadc8)?_0x441717(_0x41f5b5[_0x211b03(0x276)],'\x20\x20'+_0x21ec21(_0x1dadc8)):'',_0xee8ac3=_0x1dadc8[_0x211b03(0x3d3)]?.['id']?_0x441717(_0x41f5b5[_0x211b03(0x20a)],_0x211b03(0x27c)+_0x1dadc8['operation']['id']+']'):'';console[_0x211b03(0x416)](_0x211b03(0x3a6)+_0x124bbf+'\x20'+_0x2a16a7+_0x149b98+_0xee8ac3);}console[_0x211b03(0x416)]('');}}function _0x5ab844(_0x26253a,_0x433e74){const _0x1e412a=_0x20f8bb,_0x2b78fa=_0x433e74[_0x1e412a(0x1fc)](/^\/api(\/env\/[^/]+)?\//,'')[_0x1e412a(0x30f)]('/')[0x0],_0x31c41b=_0x26253a['http'][_0x1e412a(0x2fd)]()[_0x1e412a(0x200)](_0x298ac9=>_0x298ac9['path'][_0x1e412a(0x451)]()['includes'](_0x2b78fa[_0x1e412a(0x451)]()));if(!_0x31c41b['length']){console[_0x1e412a(0x416)](_0x441717(_0x41f5b5[_0x1e412a(0x450)],_0x1e412a(0x2d2)+_0x433e74+'\x0a'));return;}console[_0x1e412a(0x416)]('');for(const _0x137d7e of _0x31c41b[_0x1e412a(0x42b)](0x0,0xc)){for(const _0x1dff06 of _0x299103(_0x137d7e)){console[_0x1e412a(0x416)](_0x1dff06);}console[_0x1e412a(0x416)]('');}}function _0x21ec21(_0x44f29c){const _0x483e8d=_0x20f8bb;return _0x44f29c[_0x483e8d(0x3d3)]?.[_0x483e8d(0x45c)]??_0x44f29c[_0x483e8d(0x31b)]?.[_0x483e8d(0x45c)]??'';}function _0x45c0fd(_0x7c591c){const _0x52bbe0=_0x20f8bb;return _0x7c591c[_0x52bbe0(0x3d3)]?.[_0x52bbe0(0x27e)]??_0x7c591c['meta']?.[_0x52bbe0(0x27e)]??'';}function _0x43e6dc(_0x50b53e){const _0x23bfbf=_0x20f8bb;return _0x50b53e[_0x23bfbf(0x3d3)]?.[_0x23bfbf(0x294)]?.[_0x23bfbf(0x462)]?_0x50b53e[_0x23bfbf(0x3d3)][_0x23bfbf(0x294)]:_0x50b53e[_0x23bfbf(0x31b)]?.[_0x23bfbf(0x294)]??[];}function _0x299103(_0x5e6049){const _0x20260f=_0x20f8bb,_0x3371db=[];_0x3371db[_0x20260f(0x218)]('\x20\x20'+_0x441717(_0x41f5b5[_0x20260f(0x2b6)]+_0x41f5b5[_0x20260f(0x3eb)],_0x5e6049['method'][_0x20260f(0x35e)](0x7))+'\x20'+_0x441717(_0x41f5b5[_0x20260f(0x2b6)]+_0x41f5b5[_0x20260f(0x232)],_0x5e6049[_0x20260f(0x2ba)]));_0x5e6049['operation']?.['id']&&_0x3371db[_0x20260f(0x218)](_0x20260f(0x2a3)+_0x441717(_0x41f5b5[_0x20260f(0x20a)],_0x20260f(0x427)+_0x5e6049[_0x20260f(0x3d3)]['id']));_0x21ec21(_0x5e6049)&&_0x3371db[_0x20260f(0x218)](_0x20260f(0x2a3)+_0x441717(_0x41f5b5[_0x20260f(0x365)],_0x21ec21(_0x5e6049)));_0x45c0fd(_0x5e6049)&&_0x3371db[_0x20260f(0x218)](_0x20260f(0x2a3)+_0x441717(_0x41f5b5[_0x20260f(0x276)],_0x45c0fd(_0x5e6049)));_0x43e6dc(_0x5e6049)[_0x20260f(0x462)]&&_0x3371db['push'](_0x20260f(0x2a3)+_0x441717(_0x41f5b5[_0x20260f(0x20a)],_0x20260f(0x1a7)+_0x43e6dc(_0x5e6049)[_0x20260f(0x2b5)](',\x20')));_0x5e6049[_0x20260f(0x3d3)]?.['safety']?.[_0x20260f(0x246)]&&_0x3371db[_0x20260f(0x218)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x441717(_0x41f5b5[_0x20260f(0x20a)],_0x20260f(0x1f2)+_0x5e6049[_0x20260f(0x3d3)][_0x20260f(0x1ef)]['access']));_0x5e6049[_0x20260f(0x3d3)]?.['http']?.[_0x20260f(0x409)]&&_0x5e6049['operation'][_0x20260f(0x36a)][_0x20260f(0x409)]!==_0x20260f(0x2e6)&&_0x3371db['push'](_0x20260f(0x2a3)+_0x441717(_0x41f5b5[_0x20260f(0x20a)],_0x20260f(0x42f)+_0x5e6049[_0x20260f(0x3d3)]['http'][_0x20260f(0x409)]));if(_0x5e6049[_0x20260f(0x3d3)]?.['inputSchema']){const _0x364ff9=Object[_0x20260f(0x3b8)](_0x5e6049['operation'][_0x20260f(0x299)][_0x20260f(0x267)]||{});if(_0x364ff9['length'])_0x3371db[_0x20260f(0x218)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x441717(_0x41f5b5['gray'],_0x20260f(0x3c7)+_0x364ff9[_0x20260f(0x2b5)](',\x20')));}return _0x5e6049['meta']?.[_0x20260f(0x3ac)]&&_0x3371db[_0x20260f(0x218)](_0x20260f(0x2a3)+_0x441717(_0x41f5b5['gray'],_0x20260f(0x3da)+JSON[_0x20260f(0x26d)](_0x5e6049[_0x20260f(0x31b)]['body']))),_0x3371db;}async function _0x103eda(_0x15d57a,_0x5992bc,_0x5fb447,_0x23c0c0=null){const _0x1f2d94=_0x20f8bb,_0x2b7874=_0x5fb447[_0x1f2d94(0x175)]('?'),_0x2c6c04=_0x2b7874>=0x0?_0x5fb447[_0x1f2d94(0x42b)](0x0,_0x2b7874):_0x5fb447,_0x14c47d=_0x2b7874>=0x0?_0x5fb447['slice'](_0x2b7874+0x1):'',_0x356894=Object[_0x1f2d94(0x2c4)](new URLSearchParams(_0x14c47d)[_0x1f2d94(0x32a)]());return _0x15d57a['http']['handle'](_0x5992bc,_0x2c6c04,{'body':_0x23c0c0,'query':_0x356894,'headers':{'content-type':_0x1f2d94(0x389)}},{'internal':!![]});}function _0x1285a0(_0x5728a1){const _0x9ddb66=_0x20f8bb;if(!_0x5728a1)return null;const _0x3b57ea=_0x5728a1['trim']();if(!_0x3b57ea)return null;try{return JSON[_0x9ddb66(0x313)](_0x3b57ea);}catch{}try{return JSON['parse'](_0x70cc2c(_0x3b57ea));}catch(_0x3be629){throw new SyntaxError(_0x3be629[_0x9ddb66(0x31a)],{'cause':_0x3be629});}}function _0x70cc2c(_0x335c67){const _0x46fd6b=_0x20f8bb;let _0x4bef49='',_0x246d81=0x0;while(_0x246d81<_0x335c67[_0x46fd6b(0x462)]){const _0x2edca3=_0x335c67[_0x246d81];if(_0x2edca3==='\x22'){_0x4bef49+='\x22',_0x246d81++;while(_0x246d81<_0x335c67[_0x46fd6b(0x462)]&&_0x335c67[_0x246d81]!=='\x22'){if(_0x335c67[_0x246d81]==='\x5c'){_0x4bef49+=_0x335c67[_0x246d81++];if(_0x246d81<_0x335c67[_0x46fd6b(0x462)])_0x4bef49+=_0x335c67[_0x246d81++];}else _0x4bef49+=_0x335c67[_0x246d81++];}_0x4bef49+='\x22';if(_0x246d81<_0x335c67[_0x46fd6b(0x462)])_0x246d81++;continue;}if(_0x2edca3==='\x27'){_0x4bef49+='\x22',_0x246d81++;while(_0x246d81<_0x335c67['length']&&_0x335c67[_0x246d81]!=='\x27'){if(_0x335c67[_0x246d81]==='\x5c'&&_0x335c67[_0x246d81+0x1]==='\x27')_0x4bef49+='\x27',_0x246d81+=0x2;else _0x335c67[_0x246d81]==='\x22'?(_0x4bef49+='\x5c\x22',_0x246d81++):_0x4bef49+=_0x335c67[_0x246d81++];}_0x4bef49+='\x22';if(_0x246d81<_0x335c67[_0x46fd6b(0x462)])_0x246d81++;continue;}if(_0x46fd6b(0x1b2)[_0x46fd6b(0x1bf)](_0x2edca3)){_0x4bef49+=_0x2edca3,_0x246d81++;continue;}let _0x4bd4c1='';while(_0x246d81<_0x335c67[_0x46fd6b(0x462)]&&!_0x46fd6b(0x1e4)[_0x46fd6b(0x1bf)](_0x335c67[_0x246d81])&&_0x335c67[_0x246d81]!=='\x20'&&_0x335c67[_0x246d81]!=='\x09'&&_0x335c67[_0x246d81]!=='\x0a'&&_0x335c67[_0x246d81]!=='\x0d'){_0x4bd4c1+=_0x335c67[_0x246d81++];}let _0x54d4a2=_0x246d81;while(_0x54d4a2<_0x335c67['length']&&(_0x335c67[_0x54d4a2]==='\x20'||_0x335c67[_0x54d4a2]==='\x09'))_0x54d4a2++;if(_0x335c67[_0x54d4a2]===':')_0x4bef49+='\x22'+_0x4bd4c1+'\x22';else _0x4bd4c1===_0x46fd6b(0x1f3)||_0x4bd4c1===_0x46fd6b(0x194)||_0x4bd4c1===_0x46fd6b(0x39a)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/['test'](_0x4bd4c1)?_0x4bef49+=_0x4bd4c1:_0x4bef49+='\x22'+_0x4bd4c1+'\x22';}return _0x4bef49['replace'](/,(\s*[}\]])/g,'$1');}function _0x97d01f(_0x2d7311){const _0xfdfe12=_0x20f8bb,_0x239961=[];let _0x2b5c13=0x0;while(_0x2b5c13<_0x2d7311['length']){while(_0x2b5c13<_0x2d7311['length']&&(_0x2d7311[_0x2b5c13]==='\x20'||_0x2d7311[_0x2b5c13]==='\x09'))_0x2b5c13++;if(_0x2b5c13>=_0x2d7311[_0xfdfe12(0x462)])break;const _0x264977=_0x2d7311[_0x2b5c13];if(_0x264977==='{'||_0x264977==='['){const _0x5dd52e=_0x264977==='{'?'}':']',_0x1e8c32=_0x2b5c13++;let _0x51d655=0x1,_0x15afa0=![],_0x10cbad='';while(_0x2b5c13<_0x2d7311[_0xfdfe12(0x462)]&&_0x51d655>0x0){const _0x3e504c=_0x2d7311[_0x2b5c13];if(_0x15afa0){if(_0x3e504c==='\x5c')_0x2b5c13++;else{if(_0x3e504c===_0x10cbad)_0x15afa0=![];}}else{if(_0x3e504c==='\x22'||_0x3e504c==='\x27')_0x15afa0=!![],_0x10cbad=_0x3e504c;else{if(_0x3e504c===_0x264977)_0x51d655++;else{if(_0x3e504c===_0x5dd52e)_0x51d655--;}}}_0x2b5c13++;}_0x239961[_0xfdfe12(0x218)](_0x2d7311['slice'](_0x1e8c32,_0x2b5c13));continue;}if(_0x264977==='\x22'||_0x264977==='\x27'){const _0x23caa8=_0x264977;_0x2b5c13++;let _0x4bc369='';while(_0x2b5c13<_0x2d7311[_0xfdfe12(0x462)]&&_0x2d7311[_0x2b5c13]!==_0x23caa8){if(_0x2d7311[_0x2b5c13]==='\x5c'&&_0x2b5c13+0x1<_0x2d7311[_0xfdfe12(0x462)])_0x2b5c13++,_0x4bc369+=_0x2d7311[_0x2b5c13++];else _0x4bc369+=_0x2d7311[_0x2b5c13++];}if(_0x2b5c13<_0x2d7311[_0xfdfe12(0x462)])_0x2b5c13++;_0x239961[_0xfdfe12(0x218)](_0x4bc369);continue;}let _0x4cb982='';while(_0x2b5c13<_0x2d7311[_0xfdfe12(0x462)]&&_0x2d7311[_0x2b5c13]!=='\x20'&&_0x2d7311[_0x2b5c13]!=='\x09'&&_0x2d7311[_0x2b5c13]!=='{'&&_0x2d7311[_0x2b5c13]!=='['){_0x4cb982+=_0x2d7311[_0x2b5c13++];}if(_0x4cb982)_0x239961[_0xfdfe12(0x218)](_0x4cb982);}return _0x239961;}function _0x46f038(_0x300a05,_0x566db0){const _0xaa4ea2=_0x20f8bb,_0x4dcdf8=[..._0x300a05[_0xaa4ea2(0x332)]['keys']()][_0xaa4ea2(0x200)](_0x23e06d=>!_0x23e06d['startsWith']('~'));console[_0xaa4ea2(0x416)](['',_0x441717(_0x41f5b5[_0xaa4ea2(0x2b6)]+_0x41f5b5[_0xaa4ea2(0x232)],_0xaa4ea2(0x191)),_0x441717(_0x41f5b5[_0xaa4ea2(0x2b6)]+_0x41f5b5[_0xaa4ea2(0x232)],'\x20\x20║')+_0x441717(_0x41f5b5[_0xaa4ea2(0x2b6)],'\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20')+_0x441717(_0x41f5b5['bold']+_0x41f5b5[_0xaa4ea2(0x232)],'║'),_0x441717(_0x41f5b5['bold']+_0x41f5b5[_0xaa4ea2(0x232)],'\x20\x20╚═══════════════════════════╝'),'','\x20\x20'+_0x441717(_0x41f5b5[_0xaa4ea2(0x1b7)],'✓')+'\x20'+_0x441717(_0x41f5b5[_0xaa4ea2(0x2b6)],_0xaa4ea2(0x438))+'\x20\x20http://localhost:'+_0x566db0[_0xaa4ea2(0x36f)],'\x20\x20'+_0x441717(_0x41f5b5[_0xaa4ea2(0x1b7)],'✓')+'\x20'+_0x441717(_0x41f5b5[_0xaa4ea2(0x2b6)],_0xaa4ea2(0x3e8))+_0xaa4ea2(0x2bb)+_0x566db0[_0xaa4ea2(0x36f)]+'/api','\x20\x20'+_0x441717(_0x41f5b5['green'],'✓')+'\x20'+_0x441717(_0x41f5b5['bold'],_0xaa4ea2(0x2ba))+_0xaa4ea2(0x3a6)+_0x566db0[_0xaa4ea2(0x3f5)],'\x20\x20'+_0x441717(_0x41f5b5[_0xaa4ea2(0x1b7)],'✓')+'\x20'+_0x441717(_0x41f5b5[_0xaa4ea2(0x2b6)],'id')+_0xaa4ea2(0x2f6)+_0x441717(_0x41f5b5['gray'],_0x300a05['id']),'\x20\x20'+_0x441717(_0x41f5b5['green'],'✓')+'\x20'+_0x441717(_0x41f5b5[_0xaa4ea2(0x2b6)],_0xaa4ea2(0x346))+_0xaa4ea2(0x3a6)+_0x4dcdf8['map'](_0x54407b=>_0x441717(_0x41f5b5[_0xaa4ea2(0x232)],_0x54407b))['join']('\x20\x20'),..._0x566db0['noAdmin']?[]:['\x20\x20'+_0x441717(_0x41f5b5[_0xaa4ea2(0x1b7)],'✓')+'\x20'+_0x441717(_0x41f5b5[_0xaa4ea2(0x2b6)],_0xaa4ea2(0x259))+_0xaa4ea2(0x3a5)+_0x566db0['port']+_0xaa4ea2(0x327)],'',_0x441717(_0x41f5b5['dim'],'\x20\x20Type\x20'+_0x441717(_0x41f5b5[_0xaa4ea2(0x2b6)],'help')+_0xaa4ea2(0x244)+_0x441717(_0x41f5b5[_0xaa4ea2(0x2b6)],'routes')+_0xaa4ea2(0x3cb)+_0x441717(_0x41f5b5[_0xaa4ea2(0x2b6)],_0xaa4ea2(0x404))+_0xaa4ea2(0x31e)),''][_0xaa4ea2(0x2b5)]('\x0a'));}function _0x20f2d9(_0x20d1d4){const _0xce6a1b=_0x20f8bb;console[_0xce6a1b(0x416)]('\x0a'+_0x441717(_0x41f5b5[_0xce6a1b(0x2b6)],_0xce6a1b(0x213))+'\x20\x20'+_0x441717(_0x41f5b5['dim'],_0xce6a1b(0x181))+_0xce6a1b(0x422)+_0x441717(_0x41f5b5[_0xce6a1b(0x232)],_0xce6a1b(0x2ae))+_0xce6a1b(0x227)+_0x441717(_0x41f5b5[_0xce6a1b(0x232)],'<path>')+'\x20'+_0x441717(_0x41f5b5[_0xce6a1b(0x450)],_0xce6a1b(0x29b))+_0xce6a1b(0x34d)+_0x441717(_0x41f5b5[_0xce6a1b(0x232)],_0xce6a1b(0x3a4))+'\x20'+_0x441717(_0x41f5b5[_0xce6a1b(0x232)],_0xce6a1b(0x2ae))+'\x20'+_0x441717(_0x41f5b5[_0xce6a1b(0x450)],'[body]')+_0xce6a1b(0x400)+_0x441717(_0x41f5b5['dim'],'Examples')+'\x0a\x20\x20\x20\x20'+_0x441717(_0x41f5b5[_0xce6a1b(0x20a)],_0xce6a1b(0x358))+_0xce6a1b(0x1e5)+_0x441717(_0x41f5b5[_0xce6a1b(0x20a)],_0xce6a1b(0x346))+_0xce6a1b(0x39b)+_0x441717(_0x41f5b5['gray'],'types')+_0xce6a1b(0x1da)+_0x20d1d4[_0xce6a1b(0x414)]+'/types\x0a\x20\x20\x20\x20'+_0x441717(_0x41f5b5[_0xce6a1b(0x20a)],_0xce6a1b(0x2cc))+_0xce6a1b(0x30e)+_0x20d1d4[_0xce6a1b(0x414)]+'/type/users\x0a\x20\x20\x20\x20'+_0x441717(_0x41f5b5[_0xce6a1b(0x20a)],'type/users/item/alice')+_0xce6a1b(0x3bb)+_0x20d1d4[_0xce6a1b(0x414)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x441717(_0x41f5b5[_0xce6a1b(0x20a)],_0xce6a1b(0x3b3))+_0xce6a1b(0x342)+_0x20d1d4[_0xce6a1b(0x414)]+_0xce6a1b(0x290)+_0x441717(_0x41f5b5['gray'],_0xce6a1b(0x238))+'\x0a\x20\x20\x20\x20'+_0x441717(_0x41f5b5['gray'],_0xce6a1b(0x1d7))+'\x0a\x20\x20\x20\x20'+_0x441717(_0x41f5b5[_0xce6a1b(0x20a)],'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'+_0x441717(_0x41f5b5[_0xce6a1b(0x2b6)],_0xce6a1b(0x449))+'\x20\x20'+_0x441717(_0x41f5b5[_0xce6a1b(0x276)],'(on\x20any\x20path\x20command)')+'\x0a\x0a\x20\x20'+_0x441717(_0x41f5b5[_0xce6a1b(0x232)],'--env\x20<name>')+_0xce6a1b(0x40b)+_0x441717(_0x41f5b5[_0xce6a1b(0x232)],_0xce6a1b(0x2cb))+_0xce6a1b(0x274)+_0x441717(_0x41f5b5['dim'],_0xce6a1b(0x243))+_0xce6a1b(0x1c4)+_0x441717(_0x41f5b5[_0xce6a1b(0x20a)],_0xce6a1b(0x202))+_0xce6a1b(0x1c4)+_0x441717(_0x41f5b5[_0xce6a1b(0x20a)],_0xce6a1b(0x1d5))+_0xce6a1b(0x1c4)+_0x441717(_0x41f5b5[_0xce6a1b(0x20a)],'type/users\x20--help')+'\x0a\x0a'+_0x441717(_0x41f5b5['bold'],_0xce6a1b(0x1fd))+'\x0a\x0a\x20\x20'+_0x441717(_0x41f5b5['cyan'],_0xce6a1b(0x2c5))+_0xce6a1b(0x217)+_0x441717(_0x41f5b5['cyan'],_0xce6a1b(0x414))+_0xce6a1b(0x2d5)+_0x441717(_0x41f5b5[_0xce6a1b(0x232)],'routes')+'\x20'+_0x441717(_0x41f5b5['dim'],_0xce6a1b(0x34c))+_0xce6a1b(0x3d9)+_0x441717(_0x41f5b5[_0xce6a1b(0x232)],_0xce6a1b(0x1b1))+'\x20'+_0x441717(_0x41f5b5[_0xce6a1b(0x276)],_0xce6a1b(0x397))+_0xce6a1b(0x335)+_0x441717(_0x41f5b5[_0xce6a1b(0x232)],_0xce6a1b(0x185))+_0xce6a1b(0x43d)+_0x441717(_0x41f5b5[_0xce6a1b(0x232)],_0xce6a1b(0x1bd))+_0xce6a1b(0x456)+_0x441717(_0x41f5b5['cyan'],_0xce6a1b(0x404))+'\x20'+_0x441717(_0x41f5b5[_0xce6a1b(0x276)],'/\x20quit\x20/\x20Ctrl+C')+_0xce6a1b(0x398));}async function _0x3b3953(_0xed5224,_0x2ceaec=0x0){const _0x2f9390=_0x20f8bb;process['stdout'][_0x2f9390(0x270)]('\x0a'),console['log'](_0x441717(_0x41f5b5[_0x2f9390(0x450)],_0x2f9390(0x322)));try{await _0xed5224['close']();}catch(_0x5d1bd0){console[_0x2f9390(0x3b0)](_0x441717(_0x41f5b5[_0x2f9390(0x23e)],'\x20\x20'+_0x5d1bd0['message']));}process['exit'](_0x2ceaec);}function _0x5efdb9(_0x1aecfc){const _0x1d2543=_0x20f8bb,_0x426aa2=_0x1aecfc[_0x1d2543(0x414)]!==_0x1d2543(0x29f)?_0x441717(_0x41f5b5[_0x1d2543(0x450)],'['+_0x1aecfc[_0x1d2543(0x414)]+']'):'';return _0x441717(_0x41f5b5[_0x1d2543(0x2b6)]+_0x41f5b5[_0x1d2543(0x232)],_0x1d2543(0x24f))+_0x426aa2+_0x441717(_0x41f5b5[_0x1d2543(0x20a)],'>\x20');}const _0x47ddd1=new Set([_0x20f8bb(0x3a7),_0x20f8bb(0x237),_0x20f8bb(0x277),'PATCH',_0x20f8bb(0x2d4)]);async function _0x292346(_0x70891,_0x3c4d77,_0xb77605,_0x438de3,_0x718fec,_0x35417d){const _0x5af2f0=_0x20f8bb;_0x70891=_0x70891[_0x5af2f0(0x457)]();if(!_0x70891||_0x70891[_0x5af2f0(0x2ee)]('#'))return;const _0x49d5bf=_0x97d01f(_0x70891),{flags:_0x43cf6f,rest:_0x22f2c6}=_0x594d4d(_0x49d5bf);if(!_0x22f2c6[_0x5af2f0(0x462)])return;const _0x3721db=_0x22f2c6[0x0],_0x4dfbbe=_0x3721db[_0x5af2f0(0x1ff)]();if(_0x4dfbbe===_0x5af2f0(0x381)){if(_0x22f2c6[0x1])_0x5ab844(_0x3c4d77,_0x325ee4(_0x22f2c6[0x1],_0x43cf6f[_0x5af2f0(0x414)]??_0x718fec['env']));else _0x20f2d9(_0x718fec);return;}if(_0x4dfbbe===_0x5af2f0(0x2b0)){const _0x5afdab=_0x22f2c6[0x1];if(!_0x5afdab){console[_0x5af2f0(0x416)](_0x441717(_0x41f5b5[_0x5af2f0(0x23e)],_0x5af2f0(0x2b1)));return;}try{_0x3c4d77['env'](_0x5afdab),_0x718fec['env']=_0x5afdab,_0x35417d?.[_0x5af2f0(0x25f)](_0x5efdb9(_0x718fec)),console['log'](_0x5af2f0(0x2d9)+_0x441717(_0x41f5b5[_0x5af2f0(0x1b7)],'✓')+_0x5af2f0(0x45b)+_0x441717(_0x41f5b5[_0x5af2f0(0x2b6)]+_0x41f5b5['cyan'],_0x5afdab)+'\x0a');}catch{console[_0x5af2f0(0x416)](_0x5af2f0(0x2d9)+_0x441717(_0x41f5b5['red'],'✗')+_0x5af2f0(0x1d4)+_0x441717(_0x41f5b5[_0x5af2f0(0x2b6)],_0x5afdab)+'\x20not\x20found'+_0x441717(_0x41f5b5[_0x5af2f0(0x276)],_0x5af2f0(0x20c)));}return;}if(_0x4dfbbe===_0x5af2f0(0x2a1)){const _0x429c7c=[..._0x3c4d77[_0x5af2f0(0x332)]['keys']()][_0x5af2f0(0x200)](_0x271769=>!_0x271769['startsWith']('~'));console[_0x5af2f0(0x416)]('');for(const _0x3db9f6 of _0x429c7c){const _0x4a46f0=_0x3db9f6===_0x718fec[_0x5af2f0(0x414)];console[_0x5af2f0(0x416)]('\x20\x20'+(_0x4a46f0?_0x441717(_0x41f5b5['green'],'●'):_0x441717(_0x41f5b5['dim'],'○'))+'\x20\x20'+(_0x4a46f0?_0x441717(_0x41f5b5['bold']+_0x41f5b5['cyan'],_0x3db9f6):_0x441717(_0x41f5b5[_0x5af2f0(0x276)],_0x3db9f6)));}console[_0x5af2f0(0x416)](_0x5af2f0(0x2d9)+_0x441717(_0x41f5b5[_0x5af2f0(0x276)],_0x5af2f0(0x1f1))+'\x20'+_0x441717(_0x41f5b5[_0x5af2f0(0x232)],_0x718fec[_0x5af2f0(0x414)])),console[_0x5af2f0(0x416)]('');return;}if(_0x4dfbbe==='ENVS'){const _0x511a0=[..._0x3c4d77[_0x5af2f0(0x332)][_0x5af2f0(0x44c)]()][_0x5af2f0(0x200)](_0x248514=>!_0x248514[_0x5af2f0(0x43e)]['startsWith']('~'));console['log']('');const _0x1e2bd9=Math['max'](..._0x511a0['map'](_0x176960=>_0x176960[_0x5af2f0(0x43e)][_0x5af2f0(0x462)]));for(const _0x19bfe5 of _0x511a0){const _0x8e596c=_0x19bfe5[_0x5af2f0(0x43e)]===_0x718fec[_0x5af2f0(0x414)],_0x43b0f6=_0x8e596c?_0x441717(_0x41f5b5[_0x5af2f0(0x1b7)],'●'):_0x441717(_0x41f5b5[_0x5af2f0(0x276)],'○'),_0xb97546=_0x8e596c?_0x441717(_0x41f5b5['bold']+_0x41f5b5[_0x5af2f0(0x232)],_0x19bfe5[_0x5af2f0(0x43e)][_0x5af2f0(0x35e)](_0x1e2bd9)):_0x441717(_0x41f5b5['dim'],_0x19bfe5[_0x5af2f0(0x43e)]['padEnd'](_0x1e2bd9)),_0x2c8a5d=[..._0x19bfe5['typeSubDbs'][_0x5af2f0(0x3b8)]()][_0x5af2f0(0x200)](_0x22590a=>!_0x22590a[_0x5af2f0(0x2ee)]('~')),_0x21a184=_0x2c8a5d['length']?_0x441717(_0x41f5b5[_0x5af2f0(0x276)],_0x2c8a5d[_0x5af2f0(0x42b)](0x0,0x5)[_0x5af2f0(0x2b5)](',\x20')+(_0x2c8a5d['length']>0x5?_0x5af2f0(0x16d)+(_0x2c8a5d['length']-0x5)+'\x20more':'')):_0x441717(_0x41f5b5[_0x5af2f0(0x276)],_0x5af2f0(0x2e0));console[_0x5af2f0(0x416)]('\x20\x20'+_0x43b0f6+'\x20\x20'+_0xb97546+'\x20\x20'+_0x21a184);}console['log']('');return;}if(_0x4dfbbe===_0x5af2f0(0x32d)){const _0x20ce9a=_0x43cf6f[_0x5af2f0(0x414)]??_0x22f2c6[0x1]??_0x718fec[_0x5af2f0(0x414)];try{const _0x6ea72c=_0x3c4d77[_0x5af2f0(0x414)](_0x20ce9a),_0x20a43c=[..._0x6ea72c['typeSubDbs'][_0x5af2f0(0x3b8)]()][_0x5af2f0(0x200)](_0x1652ef=>!_0x1652ef[_0x5af2f0(0x2ee)]('~'))['sort']();console[_0x5af2f0(0x416)]('\x0a\x20\x20'+_0x441717(_0x41f5b5['dim'],_0x20a43c[_0x5af2f0(0x462)]+'\x20type'+(_0x20a43c[_0x5af2f0(0x462)]!==0x1?'s':'')+_0x5af2f0(0x2c8)+_0x20ce9a));for(const _0x38e99e of _0x20a43c){const _0x36c67c=_0x6ea72c[_0x5af2f0(0x300)]['get'](_0x38e99e),_0x35b4c4=_0x36c67c?.[_0x5af2f0(0x2f8)]?.['getCount']?.()??0x0,_0x44233a=_0x441717(_0x41f5b5[_0x5af2f0(0x2b6)]+_0x41f5b5[_0x5af2f0(0x232)],_0x38e99e[_0x5af2f0(0x35e)](0x1c));console['log'](_0x5af2f0(0x3a6)+_0x44233a+'\x20\x20'+_0x441717(_0x41f5b5[_0x5af2f0(0x3eb)],String(_0x35b4c4)[_0x5af2f0(0x1a1)](0x6))+'\x20'+_0x441717(_0x41f5b5[_0x5af2f0(0x276)],_0x5af2f0(0x2bd)));}console[_0x5af2f0(0x416)]('');}catch(_0x1e5878){console[_0x5af2f0(0x3b0)](_0x441717(_0x41f5b5[_0x5af2f0(0x23e)],'\x0a\x20\x20'+_0x1e5878['message']+'\x0a'));}return;}if(_0x4dfbbe==='ROUTES'){_0x33c89a(_0x3c4d77,_0x22f2c6['slice'](0x1)[_0x5af2f0(0x2b5)]('\x20'));return;}if(_0x4dfbbe==='LOGS'){const _0x2a7511=(_0x22f2c6[0x1]??'')['toLowerCase']();if(!_0x2a7511||_0x2a7511==='on')_0x438de3[_0x5af2f0(0x356)]=!![],_0x438de3['level']=_0x5af2f0(0x358),console['log'](_0x5af2f0(0x2d9)+_0x441717(_0x41f5b5[_0x5af2f0(0x1b7)],'✓')+_0x5af2f0(0x2d8)+_0x441717(_0x41f5b5[_0x5af2f0(0x276)],'level:\x20info')+'\x0a');else{if(_0x2a7511===_0x5af2f0(0x305))_0x438de3[_0x5af2f0(0x356)]=![],console[_0x5af2f0(0x416)](_0x5af2f0(0x2d9)+_0x441717(_0x41f5b5[_0x5af2f0(0x450)],'○')+'\x20logs\x20off\x0a');else _0x57bb57[_0x2a7511]!==undefined?(_0x438de3['enabled']=!![],_0x438de3['level']=_0x2a7511,console[_0x5af2f0(0x416)](_0x5af2f0(0x2d9)+_0x441717(_0x41f5b5[_0x5af2f0(0x1b7)],'✓')+_0x5af2f0(0x17b)+_0x441717(_0x41f5b5[_0x5af2f0(0x2b6)],_0x2a7511)+'\x0a')):console[_0x5af2f0(0x3b0)](_0x441717(_0x41f5b5[_0x5af2f0(0x23e)],_0x5af2f0(0x348)));}return;}if(_0x4dfbbe==='EXIT'||_0x4dfbbe===_0x5af2f0(0x2fb)){await _0x3b3953(_0x3c4d77,0x0);return;}if(_0x4dfbbe==='OPEN'){const _0x206ae4=_0x5af2f0(0x2e3)+_0xb77605[_0x5af2f0(0x36f)]+_0x5af2f0(0x327),_0x2e4949=process[_0x5af2f0(0x375)]==='win32'?_0x5af2f0(0x258)+_0x206ae4:process[_0x5af2f0(0x375)]===_0x5af2f0(0x21b)?_0x5af2f0(0x2af)+_0x206ae4:_0x5af2f0(0x24b)+_0x206ae4;require$$4[_0x5af2f0(0x28d)](_0x2e4949),console[_0x5af2f0(0x416)](_0x5af2f0(0x2d9)+_0x441717(_0x41f5b5['green'],'✓')+_0x5af2f0(0x1e9)+_0x441717(_0x41f5b5[_0x5af2f0(0x232)],_0x206ae4)+'\x0a');return;}let _0x4474d6,_0x1e55b9,_0x6050f8;if(_0x47ddd1['has'](_0x4dfbbe)){_0x4474d6=_0x4dfbbe,_0x1e55b9=_0x22f2c6[0x1],_0x6050f8=_0x22f2c6[_0x5af2f0(0x42b)](0x2);if(!_0x1e55b9){console[_0x5af2f0(0x3b0)](_0x441717(_0x41f5b5[_0x5af2f0(0x23e)],_0x5af2f0(0x236)+_0x3721db+_0x5af2f0(0x2fc)));return;}}else _0x4474d6=null,_0x1e55b9=_0x22f2c6[0x0],_0x6050f8=_0x22f2c6[_0x5af2f0(0x42b)](0x1);const _0x344c6c=_0x43cf6f[_0x5af2f0(0x414)]??_0x718fec[_0x5af2f0(0x414)],_0x45abab=_0x325ee4(_0x1e55b9,_0x344c6c);if(_0x43cf6f[_0x5af2f0(0x1bd)]){_0x5ab844(_0x3c4d77,_0x45abab);return;}let _0x550182=null;if(_0x6050f8[_0x5af2f0(0x462)]){const _0xcbcb87=_0x6050f8[_0x5af2f0(0x2b5)]('\x20');try{_0x550182=_0x1285a0(_0xcbcb87);}catch(_0x5bda75){console['error'](_0x441717(_0x41f5b5[_0x5af2f0(0x23e)],_0x5af2f0(0x1ea)+_0xcbcb87+'\x0a\x20\x20'+_0x441717(_0x41f5b5[_0x5af2f0(0x276)],_0x5bda75[_0x5af2f0(0x31a)])+'\x0a'));return;}}if(!_0x4474d6)_0x4474d6=_0x550182!==null?_0x5af2f0(0x237):_0x5af2f0(0x3a7);try{const _0x1373dd=await _0x103eda(_0x3c4d77,_0x4474d6,_0x45abab,_0x550182);_0x1270d0(_0x1373dd[_0x5af2f0(0x18d)],_0x1373dd[_0x5af2f0(0x3ac)]);}catch(_0x45aacb){console[_0x5af2f0(0x3b0)](_0x5af2f0(0x2d9)+_0x441717(_0x41f5b5[_0x5af2f0(0x23e)],'✗')+'\x20'+_0x45aacb[_0x5af2f0(0x31a)]+'\x0a');}}class _0x568c4d{constructor(){const _0x494a31=_0x20f8bb;this[_0x494a31(0x412)]=new Map(),this[_0x494a31(0x2de)]=null,this[_0x494a31(0x25d)]=![];}}function _0x1a0887(_0x496930){const _0x414df5=_0x20f8bb,_0x5ca9e4=new _0x568c4d();for(const _0x5a26ae of _0x496930){if(_0x5a26ae[_0x414df5(0x31b)]?.[_0x414df5(0x255)])continue;const _0x202942=_0x5a26ae[_0x414df5(0x2ba)][_0x414df5(0x1fc)](/^\/api/,'')[_0x414df5(0x1fc)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x414df5(0x1fc)](/^\//,'');if(!_0x202942)continue;let _0x369b4e=_0x5ca9e4;for(const _0x22046f of _0x202942[_0x414df5(0x30f)]('/')[_0x414df5(0x200)](Boolean)){if(_0x22046f[_0x414df5(0x2ee)](':')){const _0x4252c1=_0x22046f['slice'](0x1);if(!_0x369b4e[_0x414df5(0x2de)])_0x369b4e['dynamic']={'param':_0x4252c1,'node':new _0x568c4d()};_0x369b4e=_0x369b4e[_0x414df5(0x2de)][_0x414df5(0x421)];}else{if(!_0x369b4e['children'][_0x414df5(0x260)](_0x22046f))_0x369b4e[_0x414df5(0x412)]['set'](_0x22046f,new _0x568c4d());_0x369b4e=_0x369b4e[_0x414df5(0x412)][_0x414df5(0x219)](_0x22046f);}}_0x369b4e[_0x414df5(0x25d)]=!![];}return _0x5ca9e4;}const _0x486dd3=new Map();function _0x5df7c3(_0x4b79e6,_0x5c625d,_0x579da1){const _0x2bff07=_0x20f8bb,_0x7ced0a=_0x486dd3[_0x2bff07(0x219)](_0x4b79e6);if(_0x7ced0a&&_0x7ced0a[_0x2bff07(0x2e4)]>Date[_0x2bff07(0x3e6)]())return _0x7ced0a[_0x2bff07(0x3a0)];const _0x23e561=_0x579da1();return _0x486dd3[_0x2bff07(0x463)](_0x4b79e6,{'val':_0x23e561,'exp':Date[_0x2bff07(0x3e6)]()+_0x5c625d}),_0x23e561;}function _0xcc2b99(_0x5efee8,_0x3c91e0,_0x958be7,_0xe52e18){const _0x2dd91d=_0x20f8bb,_0x259758=_0x3c91e0[_0x2dd91d(0x414)]??_0xe52e18[_0x2dd91d(0x414)];switch(_0x5efee8){case _0x2dd91d(0x414):return[..._0x958be7[_0x2dd91d(0x332)]['keys']()]['filter'](_0x4bfde6=>!_0x4bfde6[_0x2dd91d(0x2ee)]('~'));case _0x2dd91d(0x240):return _0x5df7c3(_0x2dd91d(0x3e1)+_0x259758,0x7d0,()=>{const _0xff1718=_0x2dd91d;try{return[..._0x958be7[_0xff1718(0x414)](_0x259758)['typeSubDbs']['keys']()][_0xff1718(0x200)](_0x3c2b9f=>!_0x3c2b9f[_0xff1718(0x2ee)]('~'));}catch{return[];}});case _0x2dd91d(0x445):if(!_0x3c91e0[_0x2dd91d(0x240)])return[];return _0x5df7c3(_0x2dd91d(0x26e)+_0x259758+':'+_0x3c91e0[_0x2dd91d(0x240)],0x5dc,()=>{const _0x2e587f=_0x2dd91d;try{const _0x3b3132=_0x958be7[_0x2e587f(0x414)](_0x259758)[_0x2e587f(0x300)][_0x2e587f(0x219)](_0x3c91e0[_0x2e587f(0x240)]);if(!_0x3b3132?.['data'])return[];const _0x5c6710=[];for(const {key:_0x122fb6}of _0x3b3132[_0x2e587f(0x2f8)][_0x2e587f(0x295)]({'limit':0x32})){_0x5c6710['push'](String(_0x122fb6));if(_0x5c6710[_0x2e587f(0x462)]>=0x32)break;}return _0x5c6710;}catch{return[];}});case _0x2dd91d(0x186):if(!_0x3c91e0[_0x2dd91d(0x240)])return[];return _0x5df7c3('idx:'+_0x259758+':'+_0x3c91e0[_0x2dd91d(0x240)],0x7d0,()=>{const _0x440240=_0x2dd91d;try{const _0x39b4dd=_0x958be7['env'](_0x259758)['typeSubDbs']['get'](_0x3c91e0[_0x440240(0x240)]);return _0x39b4dd?[..._0x39b4dd[_0x440240(0x162)]?.[_0x440240(0x3b8)]()??[]]:[];}catch{return[];}});case _0x2dd91d(0x2bc):if(!_0x3c91e0[_0x2dd91d(0x240)])return[];return _0x5df7c3('fts:'+_0x259758+':'+_0x3c91e0['type'],0x7d0,()=>{const _0x3697c8=_0x2dd91d;try{return _0x958be7[_0x3697c8(0x407)]?.[_0x3697c8(0x32f)]?.(_0x3c91e0[_0x3697c8(0x240)],_0x958be7[_0x3697c8(0x414)](_0x259758))?.[_0x3697c8(0x353)](_0x9c89f7=>_0x9c89f7[_0x3697c8(0x43e)])??[];}catch{return[];}});default:return[];}}function _0x406f28(_0x5088d7,_0x241b44,_0x5c7a97,_0x2c0c40){const _0x3a9118=_0x20f8bb,_0x2450e7=_0x5088d7[_0x3a9118(0x40e)]('/'),_0x599ab8=_0x5088d7[_0x3a9118(0x30f)]('/'),_0x5174ee=_0x2450e7?_0x599ab8[_0x3a9118(0x42b)](0x0,-0x1):_0x599ab8[_0x3a9118(0x42b)](0x0,-0x1),_0x184b70=_0x2450e7?'':_0x599ab8[_0x599ab8[_0x3a9118(0x462)]-0x1];let _0x405321=_0x241b44;const _0x39ec94={};for(const _0xc17498 of _0x5174ee){if(!_0xc17498)continue;if(_0x405321['children'][_0x3a9118(0x260)](_0xc17498))_0x405321=_0x405321['children']['get'](_0xc17498);else{if(_0x405321[_0x3a9118(0x2de)])_0x39ec94[_0x405321[_0x3a9118(0x2de)][_0x3a9118(0x2e7)]]=_0xc17498,_0x405321=_0x405321['dynamic'][_0x3a9118(0x421)];else return[];}}const _0x38ffcf=_0x5174ee[_0x3a9118(0x200)](Boolean),_0x5c3fe5=_0x38ffcf[_0x3a9118(0x462)]?_0x38ffcf[_0x3a9118(0x2b5)]('/')+'/':'',_0x5c3ab6=[];for(const [_0x13deba]of _0x405321[_0x3a9118(0x412)]){if(_0x13deba[_0x3a9118(0x2ee)](_0x184b70))_0x5c3ab6[_0x3a9118(0x218)](_0x5c3fe5+_0x13deba);}if(_0x405321[_0x3a9118(0x2de)])for(const _0x5c7e0f of _0xcc2b99(_0x405321[_0x3a9118(0x2de)][_0x3a9118(0x2e7)],_0x39ec94,_0x5c7a97,_0x2c0c40)){if(String(_0x5c7e0f)[_0x3a9118(0x2ee)](_0x184b70))_0x5c3ab6[_0x3a9118(0x218)](_0x5c3fe5+_0x5c7e0f);}return _0x5c3ab6['slice'](0x0,0x64);}const _0x3ff5ff=[_0x20f8bb(0x1bd),'use',_0x20f8bb(0x414),_0x20f8bb(0x346),'types',_0x20f8bb(0x355),_0x20f8bb(0x1b1),_0x20f8bb(0x185),_0x20f8bb(0x404),_0x20f8bb(0x38c)];function _0x2268cb(_0x3fe20a,_0x52e7a0,_0x56b039){return function _0x5ae9c2(_0x5e0b4e){const _0x4feb87=_0x2d34;try{const _0x574159=_0x5e0b4e['search'](/\s[{[]/),_0x1f423a=_0x574159>=0x0?_0x5e0b4e[_0x4feb87(0x42b)](0x0,_0x574159):_0x5e0b4e,_0x4456dd=_0x1f423a[_0x4feb87(0x207)]();if(!_0x4456dd){const _0x453f35=[..._0x3ff5ff,...[..._0x3fe20a[_0x4feb87(0x412)][_0x4feb87(0x3b8)]()]][_0x4feb87(0x42b)](0x0,0x64);return[_0x453f35,''];}const _0x46b6c6=_0x4456dd[_0x4feb87(0x30f)](/\s+/),_0x2d643c=_0x46b6c6[0x0],_0x5934c2=_0x2d643c['toUpperCase']();if(_0x46b6c6[_0x4feb87(0x462)]===0x1){const _0x2e3252=_0x2d643c[_0x4feb87(0x451)](),_0x2413ac=_0x3ff5ff['filter'](_0x5a97a8=>_0x5a97a8[_0x4feb87(0x2ee)](_0x2e3252)),_0x36bdd7=_0x406f28(_0x2d643c,_0x3fe20a,_0x52e7a0,_0x56b039),_0x2a29d4=[...new Set([..._0x2413ac,..._0x36bdd7])][_0x4feb87(0x42b)](0x0,0x64);return[_0x2a29d4,_0x2d643c];}if(_0x47ddd1[_0x4feb87(0x260)](_0x5934c2)&&_0x46b6c6[_0x4feb87(0x462)]===0x2){const _0x2366dd=_0x46b6c6[0x1],_0x5ced7d=_0x406f28(_0x2366dd,_0x3fe20a,_0x52e7a0,_0x56b039);return[_0x5ced7d[_0x4feb87(0x353)](_0x383aa3=>_0x2d643c+'\x20'+_0x383aa3),_0x2d643c+'\x20'+_0x2366dd];}if(!_0x47ddd1[_0x4feb87(0x260)](_0x5934c2)&&_0x46b6c6[_0x4feb87(0x462)]>0x1){const _0x1b3332=_0x406f28(_0x2d643c,_0x3fe20a,_0x52e7a0,_0x56b039),_0x431a45='\x20'+_0x46b6c6['slice'](0x1)[_0x4feb87(0x2b5)]('\x20');return[_0x1b3332[_0x4feb87(0x353)](_0x48960a=>_0x48960a+_0x431a45),_0x2d643c+_0x431a45];}return[[],_0x5e0b4e];}catch{return[[],_0x5e0b4e];}};}async function _0xccbb53(_0x493714,_0xab5f18){const _0x2ba99e=_0x20f8bb,_0x10ca3b={'enabled':!![],'level':_0xab5f18['logLevel']??_0x2ba99e(0x358)},_0x48c8e0={'env':_0x2ba99e(0x29f)},_0x16d332={'current':null},_0x4d87ce=_0x1a0887(_0x493714[_0x2ba99e(0x36a)][_0x2ba99e(0x2fd)]()),_0x565c83=_0x2268cb(_0x4d87ce,_0x493714,_0x48c8e0);_0x493714[_0x2ba99e(0x416)]['attach'](_0x50b30e=>{const _0xc04311=_0x2ba99e;if(!_0x10ca3b[_0xc04311(0x356)])return;_0x25e233(_0x50b30e,_0x10ca3b['level']),_0x16d332[_0xc04311(0x453)]?.[_0xc04311(0x3ef)](!![]);}),_0x46f038(_0x493714,_0xab5f18);const _0x437b9f=_0x5a7e09['createInterface']({'input':process['stdin'],'output':process[_0x2ba99e(0x35a)],'terminal':!![],'completer':_0x565c83,'prompt':_0x5efdb9(_0x48c8e0),'historySize':_0x2f465f});try{const _0x245bbf=_0x147197[_0x2ba99e(0x28b)](_0x4658d1,_0x2ba99e(0x208))[_0x2ba99e(0x30f)]('\x0a')[_0x2ba99e(0x200)](Boolean);_0x437b9f[_0x2ba99e(0x169)]=_0x245bbf[_0x2ba99e(0x38e)]()[_0x2ba99e(0x42b)](0x0,_0x2f465f);}catch{}return _0x16d332[_0x2ba99e(0x453)]=_0x437b9f,_0x437b9f['on'](_0x2ba99e(0x37d),async _0x1b021f=>{const _0x2cb011=_0x2ba99e;_0x437b9f['pause']();try{await _0x292346(_0x1b021f,_0x493714,_0xab5f18,_0x10ca3b,_0x48c8e0,_0x437b9f);}catch(_0x463210){console[_0x2cb011(0x3b0)](_0x441717(_0x41f5b5[_0x2cb011(0x23e)],_0x2cb011(0x3c4)+_0x463210['message']));}finally{_0x437b9f[_0x2cb011(0x28c)](),_0x437b9f[_0x2cb011(0x3ef)]();}}),_0x437b9f['on'](_0x2ba99e(0x275),()=>{const _0x1ede36=_0x2ba99e;try{const _0x16b31e=[..._0x437b9f[_0x1ede36(0x169)]]['reverse']()['filter'](Boolean)[_0x1ede36(0x42b)](0x0,_0x2f465f);_0x147197['writeFileSync'](_0x4658d1,_0x16b31e['join']('\x0a')+'\x0a');}catch{}_0x3b3953(_0x493714,0x0);}),process['on'](_0x2ba99e(0x3e5),()=>{const _0xdbbc8f=_0x2ba99e;if(_0x437b9f[_0xdbbc8f(0x37d)]==='')_0x3b3953(_0x493714,0x0);else process[_0xdbbc8f(0x35a)][_0xdbbc8f(0x270)]('\x0a'),_0x437b9f[_0xdbbc8f(0x3c8)](0x0),_0x437b9f[_0xdbbc8f(0x3ef)]();}),process['on']('SIGTERM',()=>_0x3b3953(_0x493714,0x0)),_0x437b9f['prompt'](),_0x437b9f;}return okdbShell={'start':_0xccbb53,'colorLog':_0x25e233,'lenientParse':_0x1285a0,'_splitLine':_0x97d01f,'_formatRouteHelpLines':_0x299103,'_routeSummary':_0x21ec21,'_routeTags':_0x43e6dc},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x4d40df=_0x2d33c9;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x4d40df(0x266)]();}catch{}const _0x5c3118=require$$1$1,_0x3a25fe=require$$1;function _0x93700f(_0x1f992d){const _0x14cd49=_0x4d40df,_0x45b953=_0x1f992d[_0x14cd49(0x42b)](0x2),_0x398da1={};let _0x8378d7=0x0;while(_0x8378d7<_0x45b953[_0x14cd49(0x462)]){const _0x2f2b8=_0x45b953[_0x8378d7];if(_0x2f2b8==='--port'||_0x2f2b8==='-p')_0x398da1[_0x14cd49(0x36f)]=Number(_0x45b953[++_0x8378d7]);else{if(_0x2f2b8===_0x14cd49(0x3f1)||_0x2f2b8==='-d')_0x398da1[_0x14cd49(0x2ba)]=_0x45b953[++_0x8378d7];else{if(_0x2f2b8===_0x14cd49(0x2d1)||_0x2f2b8==='-k')_0x398da1[_0x14cd49(0x445)]=_0x45b953[++_0x8378d7];else{if(_0x2f2b8==='--config'||_0x2f2b8==='-c')_0x398da1[_0x14cd49(0x21a)]=_0x45b953[++_0x8378d7];else{if(_0x2f2b8===_0x14cd49(0x42c))_0x398da1[_0x14cd49(0x39e)]=_0x45b953[++_0x8378d7];else{if(_0x2f2b8===_0x14cd49(0x376))_0x398da1[_0x14cd49(0x38d)]=!![];else{if(_0x2f2b8===_0x14cd49(0x341))_0x398da1[_0x14cd49(0x24e)]=!![];else{if(_0x2f2b8===_0x14cd49(0x198)||_0x2f2b8==='-e')_0x398da1['env']=_0x45b953[++_0x8378d7];else{if(_0x2f2b8===_0x14cd49(0x323))_0x398da1[_0x14cd49(0x315)]=_0x45b953[++_0x8378d7];else{if(_0x2f2b8===_0x14cd49(0x17c))_0x398da1['changes']=!![];else{if(_0x2f2b8===_0x14cd49(0x338))_0x398da1['blobs']=!![];else{if(_0x2f2b8===_0x14cd49(0x249))_0x398da1[_0x14cd49(0x1a2)]=!![];else{if(_0x2f2b8===_0x14cd49(0x179)){const _0x29cf2b=[];while(_0x8378d7+0x1<_0x45b953[_0x14cd49(0x462)]&&!_0x45b953[_0x8378d7+0x1][_0x14cd49(0x2ee)]('--')){_0x29cf2b[_0x14cd49(0x218)](_0x45b953[++_0x8378d7]);}_0x398da1[_0x14cd49(0x185)]=_0x29cf2b['length']>0x0?_0x29cf2b:!![];}else{if(_0x2f2b8===_0x14cd49(0x22e))_0x398da1[_0x14cd49(0x22f)]=!![];else{if(_0x2f2b8===_0x14cd49(0x368))_0x398da1[_0x14cd49(0x43e)]=_0x45b953[++_0x8378d7];else{if(_0x2f2b8==='--password')_0x398da1[_0x14cd49(0x32e)]=_0x45b953[++_0x8378d7];else{if(_0x2f2b8===_0x14cd49(0x424))_0x398da1[_0x14cd49(0x347)]=_0x45b953[++_0x8378d7];else{if(_0x2f2b8===_0x14cd49(0x41d))_0x398da1[_0x14cd49(0x324)]=_0x45b953[++_0x8378d7];else{if(_0x2f2b8===_0x14cd49(0x248))_0x398da1[_0x14cd49(0x3bc)]=_0x45b953[++_0x8378d7];else{if(_0x2f2b8===_0x14cd49(0x284))_0x398da1[_0x14cd49(0x3e0)]=_0x45b953[++_0x8378d7];else{if(_0x2f2b8===_0x14cd49(0x26f))_0x398da1[_0x14cd49(0x2ca)]=_0x45b953[++_0x8378d7];else{if(_0x2f2b8===_0x14cd49(0x281)||_0x2f2b8==='-u')_0x398da1['username']=_0x45b953[++_0x8378d7];else{if(_0x2f2b8===_0x14cd49(0x2f0))_0x398da1['selfAddress']=_0x45b953[++_0x8378d7];else{if(_0x2f2b8==='--version'||_0x2f2b8==='-v'){const _0x4eb1ae=require$$2;console[_0x14cd49(0x416)](_0x4eb1ae[_0x14cd49(0x22b)]),process['exit'](0x0);}else(_0x2f2b8==='--help'||_0x2f2b8==='-h')&&(_0x9b5a96(),process[_0x14cd49(0x404)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x8378d7++;}return _0x398da1;}function _0x9b5a96(){const _0x4fd977=_0x4d40df;console['log'](_0x4fd977(0x161));}const _0x1ec80c=new Set(['debug',_0x4d40df(0x358),'warn',_0x4d40df(0x3b0)]);function _0x129265(_0x1b176d){const _0x361d31=_0x4d40df,_0x346906=_0x1b176d[_0x361d31(0x21a)]?_0x5c3118[_0x361d31(0x19c)](_0x1b176d[_0x361d31(0x21a)]):_0x5c3118[_0x361d31(0x19c)](_0x361d31(0x419));let _0x354a3c={};if(_0x3a25fe['existsSync'](_0x346906))try{const _0x1da75e=_0x3a25fe['readFileSync'](_0x346906,_0x361d31(0x208))[_0x361d31(0x1fc)](/^\uFEFF/,'');_0x354a3c=JSON[_0x361d31(0x313)](_0x1da75e),console['log'](_0x361d31(0x426)+_0x346906);}catch(_0x386add){console[_0x361d31(0x3b0)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x346906+':\x20'+_0x386add[_0x361d31(0x31a)]),process['exit'](0x1);}const _0x4abd1f={'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},_0x3dfc6a={'port':_0x1b176d['port']??_0x354a3c[_0x361d31(0x36f)]??_0x4abd1f[_0x361d31(0x36f)]??0x2124,'dbPath':_0x1b176d[_0x361d31(0x2ba)]??_0x354a3c[_0x361d31(0x2ba)]??_0x4abd1f[_0x361d31(0x2ba)]??_0x361d31(0x467),'key':_0x1b176d[_0x361d31(0x445)]??_0x354a3c[_0x361d31(0x445)]??_0x4abd1f[_0x361d31(0x445)]??undefined,'logLevel':_0x1b176d[_0x361d31(0x39e)]??_0x354a3c[_0x361d31(0x39e)]??_0x4abd1f[_0x361d31(0x39e)]??_0x361d31(0x358),'noRepl':_0x1b176d['noRepl']??_0x354a3c[_0x361d31(0x38d)]??_0x4abd1f[_0x361d31(0x38d)]??![],'noAdmin':_0x1b176d[_0x361d31(0x24e)]??_0x354a3c['noAdmin']??_0x4abd1f[_0x361d31(0x24e)]??![],'admin':_0x354a3c[_0x361d31(0x259)]??{},'api':_0x354a3c[_0x361d31(0x3e8)]??undefined,'auth':_0x354a3c[_0x361d31(0x210)]??undefined,'mcp':_0x354a3c['mcp']??undefined,'timeMachine':_0x354a3c[_0x361d31(0x430)]!==![]?_0x354a3c[_0x361d31(0x430)]??{}:![]};return _0x1b176d[_0x361d31(0x185)]!==undefined&&(_0x3dfc6a[_0x361d31(0x210)]=_0x3dfc6a[_0x361d31(0x210)]||{},_0x3dfc6a[_0x361d31(0x210)][_0x361d31(0x185)]=_0x1b176d[_0x361d31(0x185)]),_0x1b176d[_0x361d31(0x22f)]&&(_0x3dfc6a[_0x361d31(0x373)]=_0x3dfc6a[_0x361d31(0x373)]||{},_0x3dfc6a[_0x361d31(0x373)][_0x361d31(0x22f)]=!![]),(!Number[_0x361d31(0x288)](_0x3dfc6a[_0x361d31(0x36f)])||_0x3dfc6a['port']<0x1||_0x3dfc6a[_0x361d31(0x36f)]>0xffff)&&(console[_0x361d31(0x3b0)](_0x361d31(0x42d)+_0x3dfc6a[_0x361d31(0x36f)]+'\x20(must\x20be\x201–65535)'),process[_0x361d31(0x404)](0x1)),!_0x1ec80c[_0x361d31(0x260)](_0x3dfc6a[_0x361d31(0x39e)])&&(console['error'](_0x361d31(0x3db)+_0x3dfc6a[_0x361d31(0x39e)]+_0x361d31(0x18f)),process[_0x361d31(0x404)](0x1)),_0x3dfc6a;}function _0x59c85a(_0x4d5875){const _0x435e8e=_0x4d40df;return!!(_0x4d5875&&typeof _0x4d5875===_0x435e8e(0x1d0)&&!Array[_0x435e8e(0x310)](_0x4d5875)&&Object[_0x435e8e(0x3b8)](_0x4d5875)[_0x435e8e(0x462)]>0x0);}const _0x32fe41=!process[_0x4d40df(0x35a)][_0x4d40df(0x201)]||!!process.env.NO_COLOR;function _0x41f8a1(_0x27bcc8,_0x268df){const _0x4728b5=_0x4d40df;return _0x32fe41?_0x268df:'\x1b['+_0x27bcc8+'m'+_0x268df+_0x4728b5(0x291);}function _0x39787d(_0x13a2c5){const _0x414d95=_0x4d40df;if(!_0x13a2c5||_0x13a2c5[_0x414d95(0x462)]===0x0)return;const _0x3c2766='─'[_0x414d95(0x1f6)](0x38);process[_0x414d95(0x41f)][_0x414d95(0x270)]('\x0a'),process[_0x414d95(0x41f)][_0x414d95(0x270)](_0x41f8a1('33','\x20\x20⚠\x20\x20'+_0x13a2c5['length']+_0x414d95(0x2c9)+(_0x13a2c5[_0x414d95(0x462)]>0x1?'S':'')+'\x0a')),process[_0x414d95(0x41f)][_0x414d95(0x270)]('\x20\x20'+_0x3c2766+'\x0a');for(const _0xb79c8b of _0x13a2c5){const _0x41eb5c=_0xb79c8b[_0x414d95(0x286)]===_0x414d95(0x3b0)?_0x41f8a1('31',_0x414d95(0x29e)):_0x41f8a1('33',_0x414d95(0x37e));process[_0x414d95(0x41f)][_0x414d95(0x270)](_0x41eb5c+'\x20\x20'+_0x41f8a1('1',_0xb79c8b[_0x414d95(0x1fb)])+'\x0a'),process[_0x414d95(0x41f)][_0x414d95(0x270)](_0x414d95(0x2d7)+_0xb79c8b[_0x414d95(0x31a)]+'\x0a');if(_0xb79c8b['hint'])process['stderr']['write'](_0x414d95(0x2d7)+_0x41f8a1('2',_0x414d95(0x461)+_0xb79c8b['hint'])+'\x0a');process['stderr']['write']('\x0a');}process['stderr'][_0x414d95(0x270)]('\x20\x20'+_0x3c2766+'\x0a\x0a');}function _0x329fdd(_0x29dee4,_0x568783){const _0x123ee0=_0x4d40df,_0x26c4e5=_0x29dee4['http'][_0x123ee0(0x37a)](_0x568783);return new Promise((_0x3fe0e4,_0x27abc8)=>{const _0x39942b=_0x123ee0;_0x26c4e5[_0x39942b(0x30c)](_0x39942b(0x336),_0x3fe0e4),_0x26c4e5[_0x39942b(0x30c)](_0x39942b(0x3b0),_0x27abc8);});}async function _0x4e2b04(_0xbabc02){const _0x15b9e3=_0x4d40df,_0x49bbbe=require$$3;console[_0x15b9e3(0x416)](_0x15b9e3(0x1a6));let _0x50bea3=!![];const _0x456319=(_0x2b9541,_0x4aa41f)=>{const _0x5a2883=_0x15b9e3;console[_0x5a2883(0x416)]('\x20\x20'+(_0x2b9541?'✓':'✗')+'\x20'+_0x4aa41f);if(!_0x2b9541)_0x50bea3=![];},_0x2a210e=Number(process[_0x15b9e3(0x22b)][_0x15b9e3(0x1fc)]('v','')[_0x15b9e3(0x30f)]('.')[0x0]);_0x456319(_0x2a210e>=0x12,_0x15b9e3(0x1c7)+process[_0x15b9e3(0x22b)]+(_0x2a210e<0x12?_0x15b9e3(0x167):''));const _0x6d119f=_0x5c3118[_0x15b9e3(0x19c)](_0xbabc02[_0x15b9e3(0x3f5)]);try{_0x3a25fe['mkdirSync'](_0x6d119f,{'recursive':!![]});const _0x3381e3=_0x5c3118['join'](_0x6d119f,_0x15b9e3(0x25e));_0x3a25fe[_0x15b9e3(0x164)](_0x3381e3,''),_0x3a25fe[_0x15b9e3(0x273)](_0x3381e3),_0x456319(!![],_0x15b9e3(0x3d1)+_0x6d119f);}catch(_0x9d4ff2){_0x456319(![],_0x15b9e3(0x296)+_0x6d119f+_0x15b9e3(0x3fb)+_0x9d4ff2['message']+')');}const _0x4c1611=await new Promise(_0x43cfca=>{const _0x439383=_0x15b9e3,_0x1c0ebf=_0x49bbbe[_0x439383(0x458)]();_0x1c0ebf[_0x439383(0x30c)](_0x439383(0x3b0),()=>_0x43cfca(![])),_0x1c0ebf[_0x439383(0x30c)](_0x439383(0x336),()=>{const _0x1e6e63=_0x439383;_0x1c0ebf[_0x1e6e63(0x275)](),_0x43cfca(!![]);}),_0x1c0ebf[_0x439383(0x37a)](_0xbabc02[_0x439383(0x36f)],_0x439383(0x27d));});_0x456319(_0x4c1611,_0x15b9e3(0x2d0)+_0xbabc02[_0x15b9e3(0x36f)]+'\x20'+(_0x4c1611?_0x15b9e3(0x29a):'already\x20in\x20use'));const _0x140b9b=_0x5c3118[_0x15b9e3(0x19c)](_0x15b9e3(0x419));if(_0x3a25fe['existsSync'](_0x140b9b))try{JSON[_0x15b9e3(0x313)](_0x3a25fe['readFileSync'](_0x140b9b,'utf8')['replace'](/^\uFEFF/,'')),_0x456319(!![],_0x15b9e3(0x261)+_0x140b9b);}catch(_0x40fb94){_0x456319(![],_0x15b9e3(0x3ae)+_0x40fb94[_0x15b9e3(0x31a)]);}else _0x456319(!![],_0x15b9e3(0x34f));console[_0x15b9e3(0x416)](''),_0x50bea3?console[_0x15b9e3(0x416)](_0x15b9e3(0x22d)):(console[_0x15b9e3(0x416)](_0x15b9e3(0x24d)),process[_0x15b9e3(0x404)](0x1));}async function _0xeed92c(){const _0x111c00=_0x4d40df,_0x491100=_0x5c3118['resolve'](_0x111c00(0x419));!_0x3a25fe[_0x111c00(0x42e)](_0x491100)?(_0x3a25fe[_0x111c00(0x164)](_0x491100,JSON[_0x111c00(0x26d)]({'port':0x2124,'path':_0x111c00(0x467),'logLevel':_0x111c00(0x358),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x111c00(0x416)](_0x111c00(0x465))):console[_0x111c00(0x416)](_0x111c00(0x3e3));const _0x362311=_0x5c3118[_0x111c00(0x19c)](_0x111c00(0x467));!_0x3a25fe['existsSync'](_0x362311)?(_0x3a25fe['mkdirSync'](_0x362311,{'recursive':!![]}),console[_0x111c00(0x416)](_0x111c00(0x242))):console[_0x111c00(0x416)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x111c00(0x416)](_0x111c00(0x1b5));}async function _0x279b12(_0x10847e){const _0x3edbd2=_0x4d40df,_0x525c9a=_0x5c3118[_0x3edbd2(0x19c)](_0x10847e[_0x3edbd2(0x3f5)]);if(!_0x3a25fe[_0x3edbd2(0x42e)](_0x525c9a)){console[_0x3edbd2(0x416)](_0x3edbd2(0x3dd)+_0x525c9a+_0x3edbd2(0x41e));return;}const _0x57a757=require$$0$2,_0x1e2499=_0x57a757[_0x3edbd2(0x2f3)]({'input':process[_0x3edbd2(0x3d6)],'output':process[_0x3edbd2(0x35a)]}),_0x11dae5=await new Promise(_0x40914c=>_0x1e2499[_0x3edbd2(0x197)](_0x3edbd2(0x1d2)+_0x525c9a+_0x3edbd2(0x28e),_0x40914c));_0x1e2499[_0x3edbd2(0x275)](),console[_0x3edbd2(0x416)]('');if(_0x11dae5['trim']()[_0x3edbd2(0x451)]()!=='yes'){console['log'](_0x3edbd2(0x307));return;}_0x3a25fe['rmSync'](_0x525c9a,{'recursive':!![],'force':!![]}),console['log'](_0x3edbd2(0x2c0)+_0x525c9a+_0x3edbd2(0x2b2));}async function _0x5870c7(_0x4b063e,_0x8e9919){const _0x40a7b7=_0x4d40df,_0x8c463d=require$$5,_0x405469=_0x5c3118['resolve'](_0x8e9919[_0x40a7b7(0x3f5)]);console[_0x40a7b7(0x416)](_0x40a7b7(0x285)+_0x405469+'…');const _0x50b819=new _0x8c463d(_0x405469,_0x8e9919[_0x40a7b7(0x445)]?{'encryptionKey':_0x8e9919['key']}:{});await _0x50b819[_0x40a7b7(0x185)](),console['log'](_0x40a7b7(0x32c)+_0x4b063e+'…');const {envs:_0x2b8f58}=await _0x50b819[_0x40a7b7(0x1cd)][_0x40a7b7(0x1be)](_0x4b063e);for(const _0x633fe0 of _0x2b8f58){const _0x1aaa26=_0x633fe0[_0x40a7b7(0x43b)]>0x0?'\x20\x20('+(_0x633fe0[_0x40a7b7(0x43b)]/0x400/0x400)['toFixed'](0x2)+_0x40a7b7(0x283)+(_0x633fe0['sizeAfter']/0x400/0x400)['toFixed'](0x2)+_0x40a7b7(0x328):'';console['log'](_0x40a7b7(0x190)+_0x633fe0[_0x40a7b7(0x43e)]+'\x20\x20→\x20\x20'+_0x633fe0[_0x40a7b7(0x405)]+_0x1aaa26);}await _0x50b819['close'](),console['log'](_0x40a7b7(0x434));}async function _0x50213f(_0x40ad2c,_0x50b5e7,_0x13709e){const _0x1f0043=_0x4d40df,_0x2f0e95=require$$5,_0x473dd0=_0x5c3118[_0x1f0043(0x19c)](_0x50b5e7[_0x1f0043(0x3f5)]),_0x169465=_0x13709e[_0x1f0043(0x414)]??_0x1f0043(0x29f),_0x1c6044=_0x13709e[_0x1f0043(0x315)]?_0x13709e[_0x1f0043(0x315)][_0x1f0043(0x30f)](',')[_0x1f0043(0x353)](_0x13d215=>_0x13d215[_0x1f0043(0x457)]()):null;console[_0x1f0043(0x416)]('[okdb]\x20opening\x20'+_0x473dd0+'…');const _0x5e1bb7=new _0x2f0e95(_0x473dd0,_0x50b5e7[_0x1f0043(0x445)]?{'encryptionKey':_0x50b5e7[_0x1f0043(0x445)]}:{});await _0x5e1bb7[_0x1f0043(0x185)](),console[_0x1f0043(0x416)](_0x1f0043(0x318)+_0x169465+_0x1f0043(0x188)+_0x40ad2c+'…');const _0x11b8d5=await _0x5e1bb7[_0x1f0043(0x1cd)][_0x1f0043(0x1a4)](_0x40ad2c,{'envName':_0x169465,'types':_0x1c6044,'includeChanges':!!_0x13709e[_0x1f0043(0x460)]});console['log'](_0x1f0043(0x2f7)+_0x11b8d5[_0x1f0043(0x315)]+_0x1f0043(0x1d8)+_0x11b8d5['records']+_0x1f0043(0x1fe)+_0x11b8d5['changes']);if(_0x13709e[_0x1f0043(0x362)]){const _0x19628b=_0x5c3118[_0x1f0043(0x2b5)](_0x5c3118[_0x1f0043(0x192)](_0x40ad2c),_0x1f0043(0x362));process['stdout'][_0x1f0043(0x270)](_0x1f0043(0x1a0));const {count:_0x5a8e09,bytes:_0x49aa29}=await _0x5e1bb7[_0x1f0043(0x1cd)][_0x1f0043(0x20f)](_0x19628b);console[_0x1f0043(0x416)]('\x0d[okdb]\x20blobs:\x20'+_0x19628b+_0x1f0043(0x3fb)+_0x5a8e09+_0x1f0043(0x32b)+(_0x5a8e09!==0x1?'s':'')+',\x20'+(_0x49aa29/0x400/0x400)[_0x1f0043(0x2dd)](0x2)+_0x1f0043(0x328));}await _0x5e1bb7[_0x1f0043(0x275)](),console['log'](_0x1f0043(0x1a3));}async function _0x199d62(_0x528015,_0x2db040,_0x22c116){const _0x160b2f=_0x4d40df,_0x2677d9=require$$5,_0x3abead=_0x5c3118[_0x160b2f(0x19c)](_0x2db040[_0x160b2f(0x3f5)]),_0x14f8d4=_0x22c116[_0x160b2f(0x414)]??null,_0x6b6795=_0x22c116[_0x160b2f(0x315)]?_0x22c116['types'][_0x160b2f(0x30f)](',')[_0x160b2f(0x353)](_0x242628=>_0x242628['trim']()):null,_0x584cdc=!!_0x22c116[_0x160b2f(0x1a2)];console[_0x160b2f(0x416)](_0x160b2f(0x285)+_0x3abead+'…');const _0x11ce1a=new _0x2677d9(_0x3abead,_0x2db040['key']?{'encryptionKey':_0x2db040[_0x160b2f(0x445)]}:{});await _0x11ce1a[_0x160b2f(0x185)](),console[_0x160b2f(0x416)](_0x160b2f(0x21d)+_0x528015+'…');const _0x3366f5=await _0x11ce1a[_0x160b2f(0x1cd)][_0x160b2f(0x379)](_0x528015,{'envName':_0x14f8d4,'types':_0x6b6795,'dropExisting':_0x584cdc,'includeChanges':!!_0x22c116[_0x160b2f(0x460)],'onProgress':({type:_0x265533,count:_0x35c9ee})=>{const _0x343206=_0x160b2f;process[_0x343206(0x35a)][_0x343206(0x270)]('\x0d[okdb]\x20'+_0x265533+':\x20'+_0x35c9ee+'\x20records…');}});process['stdout'][_0x160b2f(0x270)]('\x0a'),console['log'](_0x160b2f(0x3aa)+_0x3366f5[_0x160b2f(0x315)]+_0x160b2f(0x1d8)+_0x3366f5[_0x160b2f(0x2bd)]+_0x160b2f(0x1fe)+_0x3366f5[_0x160b2f(0x460)]);if(_0x22c116[_0x160b2f(0x362)]){const _0x3f03ea=_0x5c3118[_0x160b2f(0x2b5)](_0x5c3118['dirname'](_0x528015),_0x160b2f(0x362));if(_0x3a25fe['existsSync'](_0x3f03ea)){const {imported:_0x5900dc,skipped:_0x16ab19}=await _0x11ce1a['migrate'][_0x160b2f(0x417)](_0x3f03ea);console[_0x160b2f(0x416)](_0x160b2f(0x316)+_0x5900dc+_0x160b2f(0x3a8)+_0x16ab19);}}await _0x11ce1a[_0x160b2f(0x275)](),console['log'](_0x160b2f(0x367));}async function _0x11ddde(_0x59b9c1,_0x50f9d9){const _0x557de7=_0x4d40df;_0x50f9d9['password']&&!_0x50f9d9[_0x557de7(0x43e)]&&(console[_0x557de7(0x3b0)](_0x557de7(0x380)),process[_0x557de7(0x404)](0x1));const _0x658b73=_0x50f9d9[_0x557de7(0x324)]?_0x50f9d9['permissions'][_0x557de7(0x30f)](',')['map'](_0x5edbc0=>_0x5edbc0[_0x557de7(0x457)]())[_0x557de7(0x200)](Boolean):[];let _0x3da36b={};if(_0x50f9d9[_0x557de7(0x3bc)])try{_0x3da36b=JSON[_0x557de7(0x313)](_0x50f9d9[_0x557de7(0x3bc)]);if(typeof _0x3da36b!=='object'||Array['isArray'](_0x3da36b)||_0x3da36b===null)throw new Error();}catch{console[_0x557de7(0x3b0)]('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process['exit'](0x1);}const _0x21bce2=require$$5,{randomToken:_0x41c588,hashToken:_0x359856,hashPassword:_0x1282ec}=requireOkdbAuthTokens(),_0x592338=require$$0,_0x43534a=_0x5c3118['resolve'](_0x59b9c1[_0x557de7(0x3f5)]),_0x468d70=new _0x21bce2(_0x43534a,_0x59b9c1[_0x557de7(0x445)]?{'encryptionKey':_0x59b9c1[_0x557de7(0x445)]}:{});await _0x468d70[_0x557de7(0x185)]();try{await _0x468d70[_0x557de7(0x210)][_0x557de7(0x306)]();if(_0x50f9d9['name']){const _0x40196b=await _0x468d70[_0x557de7(0x210)][_0x557de7(0x18a)](_0x50f9d9['name']);_0x40196b&&(console['error'](_0x557de7(0x1ca)+_0x50f9d9['name']+_0x557de7(0x37f)),process[_0x557de7(0x404)](0x1));}const _0x5d735c=_0x41c588(0x20),_0x1597ed=_0x359856(_0x5d735c),_0x2aa626=_0x50f9d9['password']?await _0x1282ec(_0x50f9d9[_0x557de7(0x32e)]):null,_0x1681ae=_0x592338[_0x557de7(0x35d)](),_0x5eb766={'tokenHash':_0x1597ed,'name':_0x50f9d9[_0x557de7(0x43e)]||null,'passwordHash':_0x2aa626,'label':_0x50f9d9['label']||null,'permissions':_0x658b73,'grants':_0x3da36b,'createdAt':Date[_0x557de7(0x3e6)](),'lastUsedAt':null},_0x1fb55d=_0x50f9d9[_0x557de7(0x3e0)]?{'ttl':Number(_0x50f9d9[_0x557de7(0x3e0)])}:undefined;await _0x468d70[_0x557de7(0x3fc)][_0x557de7(0x374)](_0x557de7(0x2a5),_0x1681ae,_0x5eb766,_0x1fb55d),console[_0x557de7(0x416)](_0x557de7(0x17f)),console[_0x557de7(0x416)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1681ae),console[_0x557de7(0x416)](_0x557de7(0x433)+(_0x50f9d9[_0x557de7(0x43e)]||_0x557de7(0x2d3))),console[_0x557de7(0x416)](_0x557de7(0x354)+(_0x50f9d9[_0x557de7(0x347)]||'(unset)')),console[_0x557de7(0x416)]('\x20\x20\x20\x20permissions:\x20'+(_0x658b73[_0x557de7(0x2b5)](',\x20')||_0x557de7(0x209))),console['log'](_0x557de7(0x27f)),console[_0x557de7(0x416)](_0x557de7(0x3a6)+_0x5d735c+'\x0a');}finally{await _0x468d70['close']();}}async function _0x3a3431(_0x320c8b){const _0x514a5b=_0x4d40df,_0x5cfb8b=require$$5,_0x234a41=_0x5c3118[_0x514a5b(0x19c)](_0x320c8b['dbPath']),_0x1942e2=new _0x5cfb8b(_0x234a41,_0x320c8b[_0x514a5b(0x445)]?{'encryptionKey':_0x320c8b[_0x514a5b(0x445)]}:{});await _0x1942e2[_0x514a5b(0x185)]();try{const _0x1d610f=_0x1942e2[_0x514a5b(0x3fc)];if(!_0x1d610f||!_0x1d610f['hasType'](_0x514a5b(0x2a5))){console['log']('No\x20tokens.');return;}const _0x109bbb=[];for(const {key:_0x216a10,value:_0x402046}of _0x1d610f[_0x514a5b(0x295)]('~tokens')){_0x109bbb[_0x514a5b(0x218)]({'id':_0x216a10,'name':_0x402046['name']||'(unset)','label':_0x402046[_0x514a5b(0x347)]||_0x514a5b(0x2d3),'permissions':Array[_0x514a5b(0x310)](_0x402046[_0x514a5b(0x324)])?_0x402046[_0x514a5b(0x324)][_0x514a5b(0x2b5)](','):'','created':_0x402046['createdAt']?new Date(_0x402046[_0x514a5b(0x3b5)])[_0x514a5b(0x298)]()[_0x514a5b(0x42b)](0x0,0xa):''});}if(_0x109bbb[_0x514a5b(0x462)]===0x0){console[_0x514a5b(0x416)](_0x514a5b(0x18c));return;}const _0x5d97c8=!process[_0x514a5b(0x35a)][_0x514a5b(0x1c2)]||process[_0x514a5b(0x35a)]['columns']>=0x64,_0x358288=_0x5d97c8?0x24:0xa,_0x19fed1=['ID'['padEnd'](_0x358288),_0x514a5b(0x3ad)[_0x514a5b(0x35e)](0x10),'LABEL'[_0x514a5b(0x35e)](0x14),'PERMISSIONS'[_0x514a5b(0x35e)](0x14),_0x514a5b(0x33c)][_0x514a5b(0x2b5)]('\x20\x20');console[_0x514a5b(0x416)]('\x0a'+_0x19fed1),console[_0x514a5b(0x416)]('-'[_0x514a5b(0x1f6)](_0x19fed1[_0x514a5b(0x462)]));for(const _0x42bf94 of _0x109bbb){const _0x1a87fa=_0x5d97c8?_0x42bf94['id']:_0x42bf94['id'][_0x514a5b(0x42b)](0x0,0x8)+'…';console['log']([_0x1a87fa[_0x514a5b(0x35e)](_0x358288),_0x42bf94['name'][_0x514a5b(0x42b)](0x0,0x10)[_0x514a5b(0x35e)](0x10),_0x42bf94['label']['slice'](0x0,0x14)[_0x514a5b(0x35e)](0x14),_0x42bf94[_0x514a5b(0x324)][_0x514a5b(0x42b)](0x0,0x14)['padEnd'](0x14),_0x42bf94[_0x514a5b(0x239)]][_0x514a5b(0x2b5)]('\x20\x20'));}console[_0x514a5b(0x416)]('');}finally{await _0x1942e2[_0x514a5b(0x275)]();}}async function _0x908b4e(_0x58b757,_0xbb8017){const _0x45d98c=_0x4d40df;!_0x58b757&&(console[_0x45d98c(0x3b0)](_0x45d98c(0x1bc)),process['exit'](0x1));const _0x5e5f64=require$$5,_0x1a6ca0=_0x5c3118['resolve'](_0xbb8017[_0x45d98c(0x3f5)]),_0x38fd12=new _0x5e5f64(_0x1a6ca0,_0xbb8017[_0x45d98c(0x445)]?{'encryptionKey':_0xbb8017[_0x45d98c(0x445)]}:{});await _0x38fd12['open']();try{const _0x24445a=_0x38fd12[_0x45d98c(0x3fc)];(!_0x24445a||!_0x24445a['hasType']('~tokens'))&&(console[_0x45d98c(0x3b0)](_0x45d98c(0x268)+_0x58b757+'\x22'),process[_0x45d98c(0x404)](0x1));let _0x113a4b=null,_0x10fabe=null;const _0x4ee7ca=_0x24445a[_0x45d98c(0x219)]('~tokens',_0x58b757);if(_0x4ee7ca)_0x113a4b=_0x58b757,_0x10fabe=_0x4ee7ca;else{const _0x6e0cc3=[];for(const {key:_0xc1ed3e,value:_0x28609a}of _0x24445a[_0x45d98c(0x295)](_0x45d98c(0x2a5))){if(_0xc1ed3e['startsWith'](_0x58b757))_0x6e0cc3['push']({'key':_0xc1ed3e,'value':_0x28609a});}_0x6e0cc3['length']===0x0&&(console[_0x45d98c(0x3b0)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x58b757+'\x22'),process[_0x45d98c(0x404)](0x1));if(_0x6e0cc3[_0x45d98c(0x462)]>0x1){console[_0x45d98c(0x3b0)](_0x45d98c(0x3f9)+_0x58b757+_0x45d98c(0x26c)+_0x6e0cc3['length']+'\x20tokens:');for(const _0xd99a43 of _0x6e0cc3){console[_0x45d98c(0x3b0)]('\x20\x20'+_0xd99a43[_0x45d98c(0x445)]+'\x20\x20(name:\x20'+(_0xd99a43[_0x45d98c(0x31f)][_0x45d98c(0x43e)]||_0x45d98c(0x2d3))+')');}process[_0x45d98c(0x404)](0x1);}_0x113a4b=_0x6e0cc3[0x0][_0x45d98c(0x445)],_0x10fabe=_0x6e0cc3[0x0]['value'];}await _0x24445a[_0x45d98c(0x2ac)](_0x45d98c(0x2a5),_0x113a4b),console[_0x45d98c(0x416)](_0x45d98c(0x1e1)+_0x113a4b+'\x20\x20(name:\x20'+(_0x10fabe[_0x45d98c(0x43e)]||'(unset)')+',\x20label:\x20'+(_0x10fabe[_0x45d98c(0x347)]||_0x45d98c(0x2d3))+')');}finally{await _0x38fd12[_0x45d98c(0x275)]();}}function _0xc532be(_0x1902ba,_0xb2ee4f){const _0x28b32d=_0x4d40df;if(!_0x1902ba[_0x28b32d(0x292)])return _0x28b32d(0x320);const _0x1d131f=_0x1902ba[_0x28b32d(0x247)];if(!_0x1d131f)return _0x28b32d(0x349);if(_0xb2ee4f>_0x1d131f)return _0x28b32d(0x23f);return'active';}function _0x23af9a(_0x1e31d1){const _0x200ecb=_0x4d40df;if(!_0x1e31d1||typeof _0x1e31d1!==_0x200ecb(0x1d0))return'';const _0x2823ed=Object[_0x200ecb(0x32a)](_0x1e31d1)[_0x200ecb(0x200)](([,_0x443f78])=>_0x443f78)['map'](([_0x26658a])=>_0x26658a);if(_0x2823ed[_0x200ecb(0x462)]===0x0)return'(none)';if(_0x2823ed[_0x200ecb(0x462)]<=0x3)return _0x2823ed[_0x200ecb(0x2b5)]('\x20');return _0x2823ed[_0x200ecb(0x42b)](0x0,0x3)[_0x200ecb(0x2b5)]('\x20')+('\x20+'+(_0x2823ed[_0x200ecb(0x462)]-0x3));}async function _0x50295f(_0x3ac04a){const _0x4f9cf1=_0x4d40df,_0x5c4265=require$$5,_0x2569e9=requireOkdbLicenseCodec(),{_C:_0x3bc2b3}=requireOkdbLicense(),_0x3f8cf9=_0x5c3118[_0x4f9cf1(0x19c)](_0x3ac04a['dbPath']),_0xab3d1c=new _0x5c4265(_0x3f8cf9,_0x3ac04a[_0x4f9cf1(0x445)]?{'encryptionKey':_0x3ac04a['key']}:{});await _0xab3d1c['open']();try{const _0x192fa6=_0xab3d1c[_0x4f9cf1(0x3fc)],_0x43a8b6=_0x192fa6?.['db']?.[_0x4f9cf1(0x219)]?.(_0x4f9cf1(0x222))??0x0,_0x5ae89d=[..._0xab3d1c['_envs'][_0x4f9cf1(0x3b8)]()][_0x4f9cf1(0x200)](_0x297962=>!_0x297962[_0x4f9cf1(0x2ee)]('~'))['length'],_0x12cbdf=_0xab3d1c[_0x4f9cf1(0x351)]?.['effective'];if(_0x12cbdf){const _0x11a99a=_0x12cbdf['_isFree']===!![],_0xd9ffa=_0x11a99a?_0x4f9cf1(0x1ce):_0xab3d1c[_0x4f9cf1(0x351)][_0x4f9cf1(0x349)]?.['licensee']||_0x4f9cf1(0x2f2);console['log'](''),console[_0x4f9cf1(0x416)]('\x20\x20Tier:\x20\x20\x20\x20'+_0xd9ffa);const _0x5e382d=_0x12cbdf['limits']||{};if(_0x5e382d[_0x4f9cf1(0x34b)]){const _0x228ad8=Math['round'](_0x43a8b6/_0x5e382d['maxWrites']*0x64);console[_0x4f9cf1(0x416)]('\x20\x20Writes:\x20\x20'+_0x43a8b6[_0x4f9cf1(0x385)]()+_0x4f9cf1(0x26b)+_0x5e382d[_0x4f9cf1(0x34b)][_0x4f9cf1(0x385)]()+_0x4f9cf1(0x3fb)+_0x228ad8+'%)');}else console[_0x4f9cf1(0x416)](_0x4f9cf1(0x446)+_0x43a8b6[_0x4f9cf1(0x385)]());_0x5e382d['envs']?console[_0x4f9cf1(0x416)](_0x4f9cf1(0x1f8)+_0x5ae89d+_0x4f9cf1(0x26b)+_0x5e382d[_0x4f9cf1(0x346)]):console['log']('\x20\x20Envs:\x20\x20\x20\x20'+_0x5ae89d),_0x3bc2b3?.[_0x4f9cf1(0x439)]&&console[_0x4f9cf1(0x416)](_0x4f9cf1(0x3d2)+_0x3bc2b3['PUB_FINGERPRINT']+_0x4f9cf1(0x2b3));}if(!_0x192fa6||!_0x192fa6['hasType']('~licenses')){console['log'](''),console[_0x4f9cf1(0x416)](_0x4f9cf1(0x1cc)),console[_0x4f9cf1(0x416)]('');return;}const _0x37455a=[],_0x190c69=Date[_0x4f9cf1(0x3e6)](),_0xeeecc1=_0xab3d1c['id'],_0x278380=_0x4f9cf1(0x166);for(const {key:_0x38646e,value:_0x4968db}of _0x192fa6['getRange'](_0x4f9cf1(0x256))){const _0x1246b5=_0x4968db[_0x4f9cf1(0x36e)]?Buffer[_0x4f9cf1(0x293)](_0x4968db[_0x4f9cf1(0x36e)],_0x4f9cf1(0x429)):Buffer[_0x4f9cf1(0x3ec)](0x8);let _0x3b4e29='';try{_0x3b4e29=_0x2569e9[_0x4f9cf1(0x40f)](_0xeeecc1,_0x1246b5,_0x278380)[_0x4f9cf1(0x3b7)];}catch{}_0x37455a['push']({'id':_0x38646e,'licensee':_0x4968db['licensee']||'','expires':_0x4968db[_0x4f9cf1(0x247)]?new Date(_0x4968db[_0x4f9cf1(0x247)])[_0x4f9cf1(0x298)]()[_0x4f9cf1(0x42b)](0x0,0xa):'','features':_0x23af9a(_0x4968db[_0x4f9cf1(0x44a)]),'pin':_0x3b4e29,'status':_0xc532be(_0x4968db,_0x190c69)});}if(_0x37455a[_0x4f9cf1(0x462)]===0x0){console['log'](''),console['log'](_0x4f9cf1(0x1cc)),console['log']('');return;}const _0x2d19bd=['\x20\x20'+'ID'[_0x4f9cf1(0x35e)](0xe),_0x4f9cf1(0x311)[_0x4f9cf1(0x35e)](0xe),_0x4f9cf1(0x2e9)[_0x4f9cf1(0x35e)](0xc),_0x4f9cf1(0x2b7)[_0x4f9cf1(0x35e)](0x1e),_0x4f9cf1(0x3ca)[_0x4f9cf1(0x35e)](0xa),_0x4f9cf1(0x250)][_0x4f9cf1(0x2b5)]('\x20');console[_0x4f9cf1(0x416)]('\x0a'+_0x2d19bd);for(const _0x494d08 of _0x37455a){const _0x2c2dcd=_0x494d08['id']['slice'](0x0,0x8)+'…';console[_0x4f9cf1(0x416)](['\x20\x20'+_0x2c2dcd[_0x4f9cf1(0x35e)](0xe),_0x494d08[_0x4f9cf1(0x2a2)]['slice'](0x0,0xe)['padEnd'](0xe),_0x494d08['expires'][_0x4f9cf1(0x35e)](0xc),_0x494d08['features'][_0x4f9cf1(0x42b)](0x0,0x1e)[_0x4f9cf1(0x35e)](0x1e),_0x494d08[_0x4f9cf1(0x3b7)][_0x4f9cf1(0x35e)](0xa),_0x494d08[_0x4f9cf1(0x18d)]][_0x4f9cf1(0x2b5)]('\x20'));}console[_0x4f9cf1(0x416)]('');}finally{await _0xab3d1c[_0x4f9cf1(0x275)]();}}async function _0x38a1e4(_0x519f5e,_0x908b1f){const _0x3cc77b=_0x4d40df,_0x372a47=require$$5,_0x21d123=requireOkdbLicenseCodec();let _0xe757cf=_0x519f5e;(_0x21d123['detectInputType'](_0x519f5e)===_0x3cc77b(0x2ba)||_0x3a25fe[_0x3cc77b(0x42e)](_0x519f5e)&&_0x3a25fe['statSync'](_0x519f5e)[_0x3cc77b(0x425)]())&&(_0xe757cf=_0x3a25fe[_0x3cc77b(0x28b)](_0x519f5e,'utf8')['trim']());const _0x3439b8=_0x5c3118[_0x3cc77b(0x19c)](_0x908b1f[_0x3cc77b(0x3f5)]),_0x16c886=new _0x372a47(_0x3439b8,_0x908b1f[_0x3cc77b(0x445)]?{'encryptionKey':_0x908b1f['key']}:{});await _0x16c886[_0x3cc77b(0x185)]();try{!_0x16c886[_0x3cc77b(0x351)]&&(console['error'](_0x3cc77b(0x364)),process[_0x3cc77b(0x404)](0x1));let _0x464f48;try{_0x464f48=await _0x16c886[_0x3cc77b(0x351)][_0x3cc77b(0x173)](_0xe757cf);}catch(_0x414e76){console[_0x3cc77b(0x3b0)]('[okdb]\x20error:\x20'+_0x414e76[_0x3cc77b(0x31a)]),process['exit'](0x1);}const _0x4c4274=_0x16c886[_0x3cc77b(0x351)][_0x3cc77b(0x2c3)](),_0xba8d9a=_0x4c4274[_0x3cc77b(0x3d4)](_0xd4fb03=>_0xd4fb03[_0x3cc77b(0x443)]===_0x464f48['id'])?.[_0x3cc77b(0x3b7)]||'',_0x20fdb8=Object[_0x3cc77b(0x32a)](_0x464f48['features']||{})['filter'](([,_0x37efcb])=>_0x37efcb)[_0x3cc77b(0x353)](([_0x3fe2ac])=>_0x3fe2ac),_0x5f6570=_0x464f48[_0x3cc77b(0x3be)]||{},_0x5b27d4=[_0x5f6570[_0x3cc77b(0x346)]?'envs='+_0x5f6570['envs']:null,_0x5f6570[_0x3cc77b(0x1f9)]?_0x3cc77b(0x38f)+_0x5f6570[_0x3cc77b(0x1f9)]:null,_0x5f6570[_0x3cc77b(0x44f)]?_0x3cc77b(0x39c)+_0x5f6570['syncPeers']:null,_0x5f6570['maxWrites']?_0x3cc77b(0x16e)+_0x5f6570['maxWrites'][_0x3cc77b(0x385)]():null][_0x3cc77b(0x200)](Boolean)['join']('\x20\x20'),_0x1f3e5f=_0x464f48['licenseType']===_0x21d123[_0x3cc77b(0x1ee)];console[_0x3cc77b(0x416)]('\x0a\x20\x20✓\x20License\x20added'),console['log'](_0x3cc77b(0x1f0)+_0x464f48['id']),console[_0x3cc77b(0x416)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x464f48[_0x3cc77b(0x2a2)]),console[_0x3cc77b(0x416)](_0x3cc77b(0x415)+new Date(_0x464f48[_0x3cc77b(0x247)])[_0x3cc77b(0x298)]()[_0x3cc77b(0x42b)](0x0,0xa)),console[_0x3cc77b(0x416)](_0x3cc77b(0x455)+(_0x20fdb8[_0x3cc77b(0x2b5)](',\x20')||_0x3cc77b(0x209)));if(_0x5b27d4)console[_0x3cc77b(0x416)]('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x5b27d4);_0x1f3e5f?(console[_0x3cc77b(0x416)](_0x3cc77b(0x2df)),console[_0x3cc77b(0x416)]('')):(console[_0x3cc77b(0x416)](_0x3cc77b(0x38b)+_0xba8d9a),console[_0x3cc77b(0x416)](_0x3cc77b(0x33a)),console[_0x3cc77b(0x416)](''),console[_0x3cc77b(0x416)]('\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:'),console[_0x3cc77b(0x416)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0xba8d9a+_0x3cc77b(0x271)),console[_0x3cc77b(0x416)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x3cc77b(0x416)](_0x3cc77b(0x406)),console[_0x3cc77b(0x416)](''));}finally{await _0x16c886[_0x3cc77b(0x275)]();}}async function _0x41af2b(_0xeb8f38,_0x20e9fa){const _0x553d9c=_0x4d40df,_0x311ebe=require$$5,_0xbdee66=_0x5c3118[_0x553d9c(0x19c)](_0x20e9fa[_0x553d9c(0x3f5)]),_0x3ac405=new _0x311ebe(_0xbdee66,_0x20e9fa[_0x553d9c(0x445)]?{'encryptionKey':_0x20e9fa[_0x553d9c(0x445)]}:{});await _0x3ac405[_0x553d9c(0x185)]();try{!_0x3ac405[_0x553d9c(0x351)]&&(console[_0x553d9c(0x3b0)](_0x553d9c(0x364)),process[_0x553d9c(0x404)](0x1));let _0x4e9b13;try{_0x4e9b13=await _0x3ac405['_license']['activateLicense'](_0xeb8f38['trim']());}catch(_0x513ac4){console[_0x553d9c(0x3b0)](_0x553d9c(0x189)+_0x513ac4[_0x553d9c(0x31a)]),console['error'](''),console[_0x553d9c(0x3b0)]('\x20\x20Common\x20causes:'),console[_0x553d9c(0x3b0)](_0x553d9c(0x447)),console['error'](_0x553d9c(0x42a)),console[_0x553d9c(0x3b0)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.'),console[_0x553d9c(0x3b0)](''),process['exit'](0x1);}console['log'](_0x553d9c(0x17a)),console[_0x553d9c(0x416)](_0x553d9c(0x1f0)+_0x4e9b13['id']),console[_0x553d9c(0x416)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x4e9b13[_0x553d9c(0x2a2)]),console[_0x553d9c(0x416)](_0x553d9c(0x415)+new Date(_0x4e9b13['expiresAt'])[_0x553d9c(0x298)]()[_0x553d9c(0x42b)](0x0,0xa)),console[_0x553d9c(0x416)](_0x553d9c(0x27b)),console[_0x553d9c(0x416)]('');}finally{await _0x3ac405[_0x553d9c(0x275)]();}}async function _0x5ae003(_0x43fb02,_0x5a1f0c){const _0x5932f1=_0x4d40df;!_0x43fb02&&(console[_0x5932f1(0x3b0)]('[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument'),process[_0x5932f1(0x404)](0x1));const _0xeafe5d=require$$5,_0x1872f7=requireOkdbLicenseCodec(),_0x25a46b=_0x5c3118[_0x5932f1(0x19c)](_0x5a1f0c[_0x5932f1(0x3f5)]),_0x35730c=new _0xeafe5d(_0x25a46b,_0x5a1f0c[_0x5932f1(0x445)]?{'encryptionKey':_0x5a1f0c['key']}:{});await _0x35730c[_0x5932f1(0x185)]();try{const _0x2dea23=_0x35730c[_0x5932f1(0x3fc)];(!_0x2dea23||!_0x2dea23[_0x5932f1(0x19b)](_0x5932f1(0x256)))&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x43fb02+'\x22'),process['exit'](0x1));let _0x715589=null,_0x13da09=null;const _0x56978b=_0x2dea23[_0x5932f1(0x219)](_0x5932f1(0x256),_0x43fb02);if(_0x56978b)_0x715589=_0x43fb02,_0x13da09=_0x56978b;else{const _0x3fb60a=[];for(const {key:_0x49cbd6,value:_0x3f1bad}of _0x2dea23[_0x5932f1(0x295)]('~licenses')){if(_0x49cbd6[_0x5932f1(0x2ee)](_0x43fb02))_0x3fb60a[_0x5932f1(0x218)]({'key':_0x49cbd6,'value':_0x3f1bad});}_0x3fb60a[_0x5932f1(0x462)]===0x0&&(console['error'](_0x5932f1(0x1df)+_0x43fb02+'\x22'),process[_0x5932f1(0x404)](0x1)),_0x3fb60a['length']>0x1&&(console[_0x5932f1(0x3b0)](_0x5932f1(0x3f9)+_0x43fb02+_0x5932f1(0x26c)+_0x3fb60a[_0x5932f1(0x462)]+_0x5932f1(0x3ff)),process[_0x5932f1(0x404)](0x1)),_0x715589=_0x3fb60a[0x0][_0x5932f1(0x445)],_0x13da09=_0x3fb60a[0x0][_0x5932f1(0x31f)];}const _0x10168c=Date['now'](),_0x455667=_0xc532be(_0x13da09,_0x10168c),_0x84767e=_0x35730c['id'],_0x185000='__OKDB_PUB_FINGERPRINT__';let _0x25a4aa='';try{const _0x57fce1=Buffer[_0x5932f1(0x293)](_0x13da09[_0x5932f1(0x36e)],_0x5932f1(0x429));_0x25a4aa=_0x1872f7['derivePin'](_0x84767e,_0x57fce1,_0x185000)[_0x5932f1(0x3b7)];}catch{}const _0x14a1aa=_0x13da09['features']?Object['entries'](_0x13da09[_0x5932f1(0x44a)])[_0x5932f1(0x200)](([,_0x2d8fe5])=>_0x2d8fe5)[_0x5932f1(0x353)](([_0x1405fd])=>_0x1405fd):[],_0x571dc2=_0x13da09[_0x5932f1(0x3be)]||{},_0x3e6665=_0x2dea23?.['db']?.[_0x5932f1(0x219)]?.(_0x5932f1(0x222))??0x0,_0x453cb3=[..._0x35730c[_0x5932f1(0x332)][_0x5932f1(0x3b8)]()][_0x5932f1(0x200)](_0x2cf002=>!_0x2cf002[_0x5932f1(0x2ee)]('~'))[_0x5932f1(0x462)];console['log'](_0x5932f1(0x31c)),console[_0x5932f1(0x416)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x715589),console[_0x5932f1(0x416)](_0x5932f1(0x312)+(_0x13da09['licensee']||'')),console[_0x5932f1(0x416)](_0x5932f1(0x415)+(_0x13da09['expiresAt']?new Date(_0x13da09[_0x5932f1(0x247)])[_0x5932f1(0x298)]()['slice'](0x0,0xa):'')),console[_0x5932f1(0x416)]('\x20\x20\x20\x20features:\x20\x20'+(_0x14a1aa[_0x5932f1(0x2b5)](',\x20')||'(none)')),console[_0x5932f1(0x416)](_0x5932f1(0x38b)+_0x25a4aa),console[_0x5932f1(0x416)](_0x5932f1(0x23d)+_0x455667),console[_0x5932f1(0x416)]('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x13da09[_0x5932f1(0x15f)])['toISOString']());if(_0x455667===_0x5932f1(0x349)){console[_0x5932f1(0x416)](''),console[_0x5932f1(0x416)](_0x5932f1(0x411));if(_0x571dc2['maxWrites']){const _0x1fe4f8=Math[_0x5932f1(0x241)](_0x3e6665/_0x571dc2[_0x5932f1(0x34b)]*0x64);console[_0x5932f1(0x416)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x3e6665[_0x5932f1(0x385)]()+_0x5932f1(0x26b)+_0x571dc2[_0x5932f1(0x34b)]['toLocaleString']()+_0x5932f1(0x3fb)+_0x1fe4f8+'%)');}else console[_0x5932f1(0x416)](_0x5932f1(0x1e6)+_0x3e6665[_0x5932f1(0x385)]()+_0x5932f1(0x183));_0x571dc2[_0x5932f1(0x346)]?console['log'](_0x5932f1(0x377)+_0x453cb3+_0x5932f1(0x26b)+_0x571dc2[_0x5932f1(0x346)]):console[_0x5932f1(0x416)](_0x5932f1(0x377)+_0x453cb3+_0x5932f1(0x183));}console[_0x5932f1(0x416)]('');}finally{await _0x35730c[_0x5932f1(0x275)]();}}async function _0x428df7(_0x497f12,_0x2817f4){const _0x943e67=_0x4d40df;!_0x497f12&&(console[_0x943e67(0x3b0)]('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x943e67(0x404)](0x1));const _0x3a4b6f=require$$5,_0x46d746=_0x5c3118[_0x943e67(0x19c)](_0x2817f4[_0x943e67(0x3f5)]),_0x2fe41f=new _0x3a4b6f(_0x46d746,_0x2817f4[_0x943e67(0x445)]?{'encryptionKey':_0x2817f4[_0x943e67(0x445)]}:{});await _0x2fe41f[_0x943e67(0x185)]();try{const _0x240ef9=_0x2fe41f[_0x943e67(0x3fc)];(!_0x240ef9||!_0x240ef9['hasType'](_0x943e67(0x256)))&&(console[_0x943e67(0x3b0)](_0x943e67(0x1df)+_0x497f12+'\x22'),process[_0x943e67(0x404)](0x1));let _0x3cd1c9=null,_0x3f11c2=null;const _0x2331eb=_0x240ef9[_0x943e67(0x219)](_0x943e67(0x256),_0x497f12);if(_0x2331eb)_0x3cd1c9=_0x497f12,_0x3f11c2=_0x2331eb;else{const _0x55b6fc=[];for(const {key:_0x3a72fd,value:_0x585e45}of _0x240ef9[_0x943e67(0x295)](_0x943e67(0x256))){if(_0x3a72fd[_0x943e67(0x2ee)](_0x497f12))_0x55b6fc[_0x943e67(0x218)]({'key':_0x3a72fd,'value':_0x585e45});}_0x55b6fc['length']===0x0&&(console[_0x943e67(0x3b0)](_0x943e67(0x1df)+_0x497f12+'\x22'),process['exit'](0x1)),_0x55b6fc['length']>0x1&&(console[_0x943e67(0x3b0)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x497f12+_0x943e67(0x26c)+_0x55b6fc[_0x943e67(0x462)]+_0x943e67(0x3ff)),process[_0x943e67(0x404)](0x1)),_0x3cd1c9=_0x55b6fc[0x0][_0x943e67(0x445)],_0x3f11c2=_0x55b6fc[0x0][_0x943e67(0x31f)];}await _0x240ef9[_0x943e67(0x2ac)](_0x943e67(0x256),_0x3cd1c9),console[_0x943e67(0x416)](_0x943e67(0x215)+_0x3cd1c9+_0x943e67(0x28a)+(_0x3f11c2[_0x943e67(0x2a2)]||_0x943e67(0x2d3))+')');}finally{await _0x2fe41f[_0x943e67(0x275)]();}}async function _0x2c5f61(_0x1d68c4,_0xcdc466,_0x4e57a1){const _0x1a1d87=_0x4d40df;!_0x1d68c4&&(console[_0x1a1d87(0x3b0)](_0x1a1d87(0x333)),process[_0x1a1d87(0x404)](0x1));!_0x4e57a1[_0x1a1d87(0x2ca)]&&!(_0x4e57a1[_0x1a1d87(0x1a9)]&&_0x4e57a1['password'])&&(console[_0x1a1d87(0x3b0)]('[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>'),process[_0x1a1d87(0x404)](0x1));const _0x429d12=_0x4e57a1[_0x1a1d87(0x343)]||_0xcdc466[_0x1a1d87(0x329)]?.[_0x1a1d87(0x3f6)];!_0x429d12&&(console[_0x1a1d87(0x3b0)]('[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a'+_0x1a1d87(0x352)+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process[_0x1a1d87(0x404)](0x1));const _0x5a2c40=require$$5,_0xc938a4=new _0x5a2c40(_0xcdc466['dbPath'],{'sync':{'address':_0x429d12,'auto_reconcile':![]}});await _0xc938a4[_0x1a1d87(0x185)]();try{const _0x230e5e=_0xc938a4[_0x1a1d87(0x3fc)];if(_0x230e5e&&_0x230e5e[_0x1a1d87(0x19b)](_0x1a1d87(0x2a5))){let _0x1476f9=![];for(const _0x2e0dd8 of _0x230e5e[_0x1a1d87(0x295)]('~tokens')){_0x1476f9=!![];break;}_0x1476f9&&console[_0x1a1d87(0x416)](_0x1a1d87(0x3a9)+_0x1a1d87(0x216));}console[_0x1a1d87(0x416)](_0x1a1d87(0x16c)+_0x1d68c4+'…'),await _0xc938a4[_0x1a1d87(0x329)][_0x1a1d87(0x2b5)](_0x1d68c4[_0x1a1d87(0x1fc)](/\/+$/,''),{'token':_0x4e57a1[_0x1a1d87(0x2ca)],'username':_0x4e57a1[_0x1a1d87(0x1a9)],'password':_0x4e57a1[_0x1a1d87(0x32e)]}),console[_0x1a1d87(0x416)](_0x1a1d87(0x1dd)),console[_0x1a1d87(0x416)](_0x1a1d87(0x321));}finally{await _0xc938a4[_0x1a1d87(0x275)]();}}async function _0x15e9a7(){const _0x2afaba=_0x4d40df,_0x524fbf=Date[_0x2afaba(0x3e6)](),_0x404828=_0x93700f(process['argv']),_0x2a9a1e=_0x129265(_0x404828),_0x39fda1=_0x5c3118[_0x2afaba(0x19c)](_0x2a9a1e['dbPath']);!_0x2a9a1e[_0x2afaba(0x38d)]&&!process['stdin'][_0x2afaba(0x201)]&&(_0x2a9a1e['noRepl']=!![]);const _0x59610a=require$$5,{start:_0x21066c,colorLog:_0x5610ca}=requireOkdbShell(),_0x451102={..._0x2a9a1e[_0x2afaba(0x445)]?{'encryptionKey':_0x2a9a1e[_0x2afaba(0x445)]}:{},..._0x2a9a1e[_0x2afaba(0x24e)]?{'admin':![]}:_0x59c85a(_0x2a9a1e['admin'])?{'admin':_0x2a9a1e['admin']}:{},..._0x59c85a(_0x2a9a1e[_0x2afaba(0x3e8)])?{'api':_0x2a9a1e[_0x2afaba(0x3e8)]}:{},..._0x59c85a(_0x2a9a1e[_0x2afaba(0x210)])?{'auth':_0x2a9a1e[_0x2afaba(0x210)]}:{},..._0x59c85a(_0x2a9a1e[_0x2afaba(0x2fe)])?{'mcp':_0x2a9a1e['mcp']}:{},..._0x2a9a1e[_0x2afaba(0x430)]!==![]?{'timeMachine':_0x2a9a1e[_0x2afaba(0x430)]}:{}},_0x4d0c72=new _0x59610a(_0x39fda1,_0x451102);_0x4d0c72['log']['detachConsole']?.();const _0x55a466=_0x4d0c72['log'][_0x2afaba(0x229)](_0x1bac71=>_0x5610ca(_0x1bac71,_0x2a9a1e[_0x2afaba(0x39e)]));if(_0x2a9a1e[_0x2afaba(0x38d)])process[_0x2afaba(0x35a)][_0x2afaba(0x270)](_0x2afaba(0x3b1));await _0x4d0c72[_0x2afaba(0x185)]();if(_0x2a9a1e['noRepl'])process[_0x2afaba(0x35a)]['write'](_0x2afaba(0x278));try{await _0x329fdd(_0x4d0c72,_0x2a9a1e[_0x2afaba(0x36f)]);}catch(_0x45c5a0){_0x45c5a0[_0x2afaba(0x182)]===_0x2afaba(0x408)&&(console['error'](_0x2afaba(0x1c6)+_0x2a9a1e[_0x2afaba(0x36f)]+_0x2afaba(0x174)),process['exit'](0x1));throw _0x45c5a0;}if(_0x2a9a1e[_0x2afaba(0x38d)])process[_0x2afaba(0x35a)][_0x2afaba(0x270)](_0x2afaba(0x28f)+_0x2a9a1e[_0x2afaba(0x36f)]+'\x0a');if(!_0x2a9a1e[_0x2afaba(0x38d)])_0x4d0c72[_0x2afaba(0x416)]['detachConsole']?.(),_0x55a466?.(),_0x39787d(_0x4d0c72[_0x2afaba(0x210)]?.[_0x2afaba(0x272)]?.()??[]),await _0x21066c(_0x4d0c72,_0x2a9a1e);else{const _0x2506b5=_0x5c3118[_0x2afaba(0x2b5)](_0x39fda1,_0x2afaba(0x2e1));try{_0x3a25fe[_0x2afaba(0x164)](_0x2506b5,String(process[_0x2afaba(0x383)]));}catch{}const _0x4a0be4=Date['now']()-_0x524fbf;console[_0x2afaba(0x416)](''),console[_0x2afaba(0x416)](_0x2afaba(0x40d)),console[_0x2afaba(0x416)](_0x2afaba(0x3d8)+_0x2a9a1e[_0x2afaba(0x36f)]),console[_0x2afaba(0x416)](_0x2afaba(0x2b8)+_0x39fda1),console[_0x2afaba(0x416)](_0x2afaba(0x466)+_0x4d0c72['id']);{const _0x278ec4=_0x4d0c72[_0x2afaba(0x3fc)]?.['db']?.[_0x2afaba(0x219)]?.(_0x2afaba(0x222))??0x0,_0x3e8f1e=[..._0x4d0c72[_0x2afaba(0x332)][_0x2afaba(0x3b8)]()]['filter'](_0x4b8605=>!_0x4b8605['startsWith']('~'))[_0x2afaba(0x462)];if(_0x4d0c72['_license']?.[_0x2afaba(0x349)]?.[_0x2afaba(0x2c6)]===0x1){const _0x3f9611=Math['ceil']((_0x4d0c72[_0x2afaba(0x351)][_0x2afaba(0x349)][_0x2afaba(0x247)]-Date['now']())/0x5265c00);console[_0x2afaba(0x416)](_0x2afaba(0x1d9)+_0x4d0c72[_0x2afaba(0x351)][_0x2afaba(0x349)][_0x2afaba(0x2a2)]+_0x2afaba(0x1fa)+_0x3f9611+_0x2afaba(0x225));}else{if(_0x4d0c72[_0x2afaba(0x351)]?.[_0x2afaba(0x349)]){const _0x144045=_0x4d0c72[_0x2afaba(0x351)]['active'];console[_0x2afaba(0x416)]('\x20\x20\x20\x20license:\x20'+_0x144045[_0x2afaba(0x2a2)]+_0x2afaba(0x344)+new Date(_0x144045['expiresAt'])['toISOString']()['slice'](0x0,0xa)+')');const _0x17eac9=_0x144045[_0x2afaba(0x3be)]||{};if(_0x17eac9[_0x2afaba(0x34b)]){const _0x32f0f0=Math[_0x2afaba(0x241)](_0x278ec4/_0x17eac9[_0x2afaba(0x34b)]*0x64);console['log']('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x278ec4['toLocaleString']()+'\x20/\x20'+_0x17eac9['maxWrites']['toLocaleString']()+_0x2afaba(0x3ce)+_0x32f0f0+_0x2afaba(0x41b)+_0x3e8f1e+(_0x17eac9[_0x2afaba(0x346)]?'/'+_0x17eac9[_0x2afaba(0x346)]:'')+_0x2afaba(0x3c5)+(_0x3e8f1e===0x1?'':'s'));}}else{if(_0x4d0c72[_0x2afaba(0x351)]){const _0x5aa940=_0x4d0c72[_0x2afaba(0x351)][_0x2afaba(0x2c3)](),_0x43ed0d=_0x5aa940[_0x2afaba(0x462)]?_0x5aa940[_0x2afaba(0x353)](_0x49c5f0=>_0x49c5f0['pin'])[_0x2afaba(0x2b5)](',\x20'):_0x2afaba(0x2fa),_0x302e17=_0x4d0c72['_license'][_0x2afaba(0x228)],_0x463dd0=_0x302e17[_0x2afaba(0x3be)][_0x2afaba(0x34b)]?Math[_0x2afaba(0x241)](_0x278ec4/_0x302e17[_0x2afaba(0x3be)][_0x2afaba(0x34b)]*0x64):0x0;console[_0x2afaba(0x416)](_0x2afaba(0x33f)),console[_0x2afaba(0x416)](_0x2afaba(0x3d0)+_0x278ec4[_0x2afaba(0x385)]()+_0x2afaba(0x26b)+_0x302e17[_0x2afaba(0x3be)][_0x2afaba(0x34b)][_0x2afaba(0x385)]()+_0x2afaba(0x3ce)+_0x463dd0+'%),\x20'+_0x3e8f1e+'\x20/\x20'+_0x302e17[_0x2afaba(0x3be)]['envs']+'\x20envs'),console[_0x2afaba(0x416)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20'+_0x43ed0d);}}}}console[_0x2afaba(0x416)](_0x2afaba(0x21c)+_0x2a9a1e[_0x2afaba(0x36f)]+'/api');!_0x2a9a1e[_0x2afaba(0x24e)]&&console[_0x2afaba(0x416)](_0x2afaba(0x2be)+_0x2a9a1e[_0x2afaba(0x36f)]+_0x2afaba(0x327));console[_0x2afaba(0x416)](''),console[_0x2afaba(0x416)](_0x2afaba(0x1f4)+_0x4a0be4+'ms'),_0x39787d(_0x4d0c72[_0x2afaba(0x210)]?.[_0x2afaba(0x272)]?.()??[]);async function _0x3094be(){const _0x10bb70=_0x2afaba;process[_0x10bb70(0x35a)][_0x10bb70(0x270)](_0x10bb70(0x396));try{_0x3a25fe[_0x10bb70(0x273)](_0x2506b5);}catch{}await _0x4d0c72[_0x10bb70(0x275)](),process['exit'](0x0);}process['on']('SIGINT',_0x3094be),process['on'](_0x2afaba(0x172),_0x3094be);}}const _0x479a10=new Set([_0x4d40df(0x22b),'doctor',_0x4d40df(0x452),_0x4d40df(0x1be),_0x4d40df(0x44e),'import','reset',_0x4d40df(0x2ca),_0x4d40df(0x2b5),_0x4d40df(0x1e3)]),_0x1ae45b=process[_0x4d40df(0x212)][0x2];if(_0x1ae45b===_0x4d40df(0x22b))console[_0x4d40df(0x416)](require$$2[_0x4d40df(0x22b)]),process[_0x4d40df(0x404)](0x0);else{if(_0x1ae45b&&_0x479a10[_0x4d40df(0x260)](_0x1ae45b)){const _0x1f38d6=process[_0x4d40df(0x212)][_0x4d40df(0x42b)](0x3),_0x578cca=_0x93700f([_0x4d40df(0x421),_0x4d40df(0x24f),..._0x1f38d6]),_0x464530=_0x129265(_0x578cca),_0x4fe19e=new Set([_0x4d40df(0x3f1),'-d',_0x4d40df(0x2d1),'-k','--config','-c',_0x4d40df(0x233),'-p',_0x4d40df(0x42c),_0x4d40df(0x198),'-e',_0x4d40df(0x323),_0x4d40df(0x368),'--password',_0x4d40df(0x424),'--permissions',_0x4d40df(0x248),_0x4d40df(0x284),_0x4d40df(0x26f),'--username','-u',_0x4d40df(0x2f0)]);let _0x5be111=null;for(let _0x1cbcbf=0x0;_0x1cbcbf<_0x1f38d6[_0x4d40df(0x462)];_0x1cbcbf++){if(_0x4fe19e[_0x4d40df(0x260)](_0x1f38d6[_0x1cbcbf])){_0x1cbcbf++;continue;}if(!_0x1f38d6[_0x1cbcbf][_0x4d40df(0x2ee)]('-')){_0x5be111=_0x1f38d6[_0x1cbcbf];break;}}(async()=>{const _0x5de872=_0x4d40df;if(_0x1ae45b===_0x5de872(0x2ca)){const _0xdc0e39=process[_0x5de872(0x212)][0x3],_0x165e9d=process[_0x5de872(0x212)][_0x5de872(0x42b)](0x4),_0x308407=_0x93700f([_0x5de872(0x421),_0x5de872(0x24f),..._0x165e9d]),_0x3f66a9=_0x129265(_0x308407),_0x3d6aa9=new Set([_0x5de872(0x3f1),'-d',_0x5de872(0x2d1),'-k','--config','-c',_0x5de872(0x233),'-p',_0x5de872(0x368),'--password',_0x5de872(0x424),_0x5de872(0x41d),_0x5de872(0x248),'--ttl','--log-level','--env','-e','--types']),_0x294a3b=[];for(let _0x296867=0x0;_0x296867<_0x165e9d['length'];_0x296867++){if(_0x3d6aa9[_0x5de872(0x260)](_0x165e9d[_0x296867])){_0x296867++;continue;}if(_0x165e9d[_0x296867]['startsWith']('-'))continue;_0x294a3b[_0x5de872(0x218)](_0x165e9d[_0x296867]);}switch(_0xdc0e39){case _0x5de872(0x19d):await _0x11ddde(_0x3f66a9,_0x308407);break;case _0x5de872(0x32f):await _0x3a3431(_0x3f66a9);break;case'revoke':await _0x908b4e(_0x294a3b[0x0],_0x3f66a9);break;default:console['error'](_0x5de872(0x3a3)+_0xdc0e39+_0x5de872(0x2c7)),process['exit'](0x1);}return;}if(_0x1ae45b==='license'){const _0xd41e61=requireOkdbLicenseCodec(),_0x203d2d=process[_0x5de872(0x212)][_0x5de872(0x42b)](0x3),_0x4cb666=_0x93700f(['node',_0x5de872(0x24f),..._0x203d2d]),_0x2ab6b7=_0x129265(_0x4cb666),_0x121167=new Set([_0x5de872(0x3f1),'-d',_0x5de872(0x2d1),'-k',_0x5de872(0x20d),'-c',_0x5de872(0x233),'-p',_0x5de872(0x42c)]),_0x3482fa=[];for(let _0x35068b=0x0;_0x35068b<_0x203d2d[_0x5de872(0x462)];_0x35068b++){if(_0x121167[_0x5de872(0x260)](_0x203d2d[_0x35068b])){_0x35068b++;continue;}if(_0x203d2d[_0x35068b]['startsWith']('-'))continue;_0x3482fa[_0x5de872(0x218)](_0x203d2d[_0x35068b]);}const _0x41d3e7=_0x3482fa[0x0]??null;if(_0x41d3e7===_0x5de872(0x2ac))await _0x428df7(_0x3482fa[0x1],_0x2ab6b7);else{if(!_0x41d3e7)await _0x50295f(_0x2ab6b7);else{let _0x2f584f=_0xd41e61['detectInputType'](_0x41d3e7);if(_0x2f584f===_0x5de872(0x3fa)&&_0x3a25fe['existsSync'](_0x41d3e7))_0x2f584f=_0x5de872(0x2ba);if(_0x2f584f==='path')try{const _0x478822=_0x3a25fe['readFileSync'](_0x41d3e7,_0x5de872(0x208))[_0x5de872(0x457)](),_0x3b34b6=_0xd41e61[_0x5de872(0x3c1)](_0x478822);if(_0x3b34b6===_0x5de872(0x292)){await _0x41af2b(_0x478822,_0x2ab6b7);return;}await _0x38a1e4(_0x41d3e7,_0x2ab6b7);return;}catch(_0x21c475){console['error']('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x41d3e7+':\x20'+_0x21c475['message']),process[_0x5de872(0x404)](0x1);}switch(_0x2f584f){case'blob':await _0x38a1e4(_0x41d3e7,_0x2ab6b7);break;case'activation':await _0x41af2b(_0x41d3e7,_0x2ab6b7);break;case _0x5de872(0x37c):await _0x5ae003(_0x41d3e7,_0x2ab6b7);break;default:console[_0x5de872(0x3b0)](_0x5de872(0x205)+_0x41d3e7+'\x22'),console[_0x5de872(0x3b0)](''),console['error'](_0x5de872(0x3bf)),console[_0x5de872(0x3b0)]('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console[_0x5de872(0x3b0)](_0x5de872(0x3c6)),console[_0x5de872(0x3b0)]('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x5de872(0x3b0)]('\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file'),console[_0x5de872(0x3b0)](''),console[_0x5de872(0x3b0)](_0x5de872(0x15d)),process[_0x5de872(0x404)](0x1);}}}return;}switch(_0x1ae45b){case'doctor':await _0x4e2b04(_0x464530);break;case'init':await _0xeed92c();break;case'reset':await _0x279b12(_0x464530);break;case _0x5de872(0x1be):await _0x5870c7(_0x5be111??_0x5c3118[_0x5de872(0x19c)](_0x5de872(0x231)),_0x464530);break;case _0x5de872(0x44e):await _0x50213f(_0x5be111??_0x5c3118['resolve'](_0x5de872(0x214)),_0x464530,_0x578cca);break;case'import':await _0x199d62(_0x5be111??_0x5c3118[_0x5de872(0x19c)](_0x5de872(0x214)),_0x464530,_0x578cca);break;case _0x5de872(0x2b5):await _0x2c5f61(_0x5be111,_0x464530,_0x578cca);break;}})()[_0x4d40df(0x3c0)](()=>process['exit'](0x0))[_0x4d40df(0x23c)](_0xcf6106=>{const _0x3ad0aa=_0x4d40df;console[_0x3ad0aa(0x3b0)](_0x3ad0aa(0x20e)+(_0xcf6106[_0x3ad0aa(0x31a)]||_0xcf6106)+'\x0a'),process[_0x3ad0aa(0x404)](0x1);});}else _0x15e9a7()[_0x4d40df(0x23c)](_0x3b32bd=>{const _0xd4a01=_0x4d40df;console['error'](_0xd4a01(0x401)),console[_0xd4a01(0x3b0)](_0x3b32bd['stack']||_0x3b32bd),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module['exports']=okdb;
2
+ 'use strict';const _0x3f2430=_0x6e57;(function(_0x871478,_0xeddd56){const _0x3341a1=_0x6e57,_0x57ee75=_0x871478();while(!![]){try{const _0x355cbd=parseInt(_0x3341a1(0x3a3))/0x1+parseInt(_0x3341a1(0x26e))/0x2*(parseInt(_0x3341a1(0x31e))/0x3)+parseInt(_0x3341a1(0x3be))/0x4+-parseInt(_0x3341a1(0x2ad))/0x5+-parseInt(_0x3341a1(0x3ca))/0x6*(-parseInt(_0x3341a1(0x370))/0x7)+-parseInt(_0x3341a1(0x3da))/0x8*(-parseInt(_0x3341a1(0x10e))/0x9)+parseInt(_0x3341a1(0x1ce))/0xa*(-parseInt(_0x3341a1(0x3c2))/0xb);if(_0x355cbd===_0xeddd56)break;else _0x57ee75['push'](_0x57ee75['shift']());}catch(_0x500842){_0x57ee75['push'](_0x57ee75['shift']());}}}(_0xa73d,0x5e94d));var require$$1$1=require(_0x3f2430(0x217)),require$$1=require('fs'),require$$3=require(_0x3f2430(0x3bb)),require$$0$2=require(_0x3f2430(0x102)),require$$5=require('../okdb'),require$$0=require(_0x3f2430(0x247)),require$$0$1=require('node:crypto'),require$$2$1=require('os'),require$$4=require('child_process');function getDefaultExportFromCjs(_0x51d44a){const _0x330bb8=_0x3f2430;return _0x51d44a&&_0x51d44a[_0x330bb8(0x111)]&&Object[_0x330bb8(0x309)]['hasOwnProperty'][_0x330bb8(0x17c)](_0x51d44a,_0x330bb8(0x3eb))?_0x51d44a['default']:_0x51d44a;}var okdb$1={},version='1.6.1',require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function _0xa73d(){const _0x1db676=['body:\x20','OKDBSchemaCollectionError','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','[okdb]\x20port\x20','info','der','\x20\x20Error:\x20','started','--address','free\x20tier','length','issuedAt','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','/api/','open','allocUnsafe','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','4711oZAxuB','hint','STATUS','Invalid\x20license\x20blob:\x20','\x20\x20score:','mkdirSync','_license','exit','fill','[okdb]\x20starting…\x0a','\x20more','\x20\x20\x20\x20port:\x20\x20','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','system:bus_state_change','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','indexes','NAME','--key','_lookupByName','finally','/types\x0a\x20\x20\x20\x20','index:registered','fts:reset','\x20\x20http://localhost:','equals','FOREIGN_KEY_VIOLATION','create','env:opened','types:','Activation\x20invalid:\x20','auth','TYPE_NOT_REGISTERED','ACTIVATION_EXPIRED','every','trimStart','start\x20','GET','bold','token','description','/type/users/query\x0a\x20\x20\x20\x20','code','\x20\x20\x20\x20license:\x20','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','[okdb]\x20unknown\x20token\x20action:\x20\x22','gray','txn:end','\x20\x20⚠\x20\x20','handle','type/users/query\x20{\x22active\x22:true}','properties','195904FpMzJq','listen','logs','config','copy','system:poke','\x20\x20✗','\x20\x20Writes:\x20\x20','database\x20path\x20writable:\x20','--token','\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','system:ready','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','param','endsWith','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','exportToFile','sig','EXIT','\x22\x20to\x20enable\x20it.','operation','stringify','Unique\x20constraint\x20violated\x20on\x20','\x27:\x20','net','decodeActivationToken','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','1120972KFpwNf','\x20\x20\x20\x20features:\x20\x20','OKDBInvalidValueError','PUBLIC_KEY_PEM','860233xQayYX','sync','ref:violation_resolved','roles','help','[okdb]\x20exporting\x20blobs…','push','method','3906plFNSn','\x20\x20\x20\x20\x20\x20\x20','standard','\x20\x20(need\x20≥\x2018)','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','randomBytes','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','./okdb-data','Bearer\x20','OKDBIndexNotRegisteredError','Events','addLicense','\x0a[okdb]\x20fatal\x20error:','_isFree','%),\x20','1497712lbrmdE','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','body','stdin','selfAddress','level','warn','use\x20<env>','http','\x20MB)','address','prompt',')\x20to\x20your\x20license\x20vendor.','isFile','onLicenseExpired','\x0a\x20\x20✓\x20License\x20activated','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','default','exp','\x20\x20·\x20\x20','pending','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','readUInt8','listening','\x20documents\x20fail\x20validation','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','ttl:clear','PUT\x20type/users/item/x\x20{\x22n\x22:1}','--drop','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','tags','result','--env','\x20for\x20commands,\x20','\x20\x20\x20\x20path:\x20\x20','\x20\x20\x20\x20\x20http://localhost:','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','transport:\x20','env','\x27\x20doesn\x27t\x20exist','readline','dim','registerType','readUInt32BE','effective',',\x20got\x20','\x0a\x0a\x20\x20','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','message','unlinkSync','{}[]:,\x27\x22','\x20\x20\x20\x20limits:\x20\x20\x20\x20','9oTkFFv','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','bind','__esModule','_active','scrypt','concat','OKDBUniqueConstraintError','setTtl','status','\x1b[34m','wrong_node','.kdbconfig','parse','OKDBIndexHasConsumersError','\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','toLowerCase','freeze','licenseHash','exports','floor','[okdb]\x20opening\x20','\x20(expires\x20','toString','log','~tokens','\x20log\x20level:\x20','_systemEnv','use','\x1b[33m','license:activated','SCHEMA_VALIDATION_FAILED','payload','type/users/item/alice\x20--env\x20staging','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','0123456789ABCDEFGHJKMNPQRSTVWXYZ','resolve','init','\x0a\x20\x20\x20\x20','ref:violation','node\x20','username','SCHEMA_COLLECTION_INVALID','hex','\x0a[okdb]\x20error:\x20','startsWith','readUInt16BE','[okdb]\x20reset:\x20','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','127.0.0.1','details','randomUUID','\x20active\x20env:\x20','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','recheck','LICENSE_TYPE_OPEN','DELETE','includes','\x20\x20\x20\x20\x20\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','Index\x20\x27','assertFeature','\x20\x20⚠','HELP','\x20\x20✓\x20','PIN','SIG_INVALID','Foreign\x20key\x20violation:\x20','--path','label','shutdown','~licenses','clearLine','licenseType','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','__OKDB_PUB_FINGERPRINT__','license:removed','createInterface','envs=','--name','\x0a\x20\x20No\x20routes\x20matching\x20\x22','data','[okdb]\x20import\x20complete','routes','--permissions','system:stopped','summary','Engines','embeddings','\x20\x20Flags','\x20to\x20browse\x20the\x20API,\x20','OKDBVersionMismatchError','createdAt','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','\x1b[0m','typeSubDbs','\x20tokens:','--no-admin','fieldPath','verifyActivation','INDEX_NOT_REGISTERED','System','ready','INDEX_ALREADY_REGISTERED','\x20records…','permissions','database\x20path\x20not\x20writable:\x20','hidden','\x27\x20on\x20type\x20\x27','targetType','value','call','OKDBInvalidIndexKeyError','verify','export','http://localhost:','Token\x20secret\x20not\x20configured','argv','types','tags:\x20','index:ready','types\x20--env\x20staging','\x20deleted','backup','level:\x20info','_ensureTokensType','--password','isArray','unknown','\x0a\x20\x20Invalid\x20JSON:\x20','padEnd','once','\x1b[1m','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','--log-level','active:','\x22\x20→\x20','already\x20in\x20use','Type\x20\x27','exec','close','queue','win32','digest','DELETE\x20type/users/item/x','emit','activateLicense','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','removeLicense','(add\x20a\x20license\x20first)','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x20\x20→\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','\x20references\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','port','\x20already\x20exists','fts:','\x20\x20Common\x20causes:','existsSync','quit','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','padStart','migrate','index:progress','map','--label','line','sha256','Queue','type:drop','byteLength','access:\x20','\x20\x20records=','some','_licenseHash','importFromFile','forEach','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','--blobs','No\x20license\x20found\x20matching\x20this\x20activation\x20token','--changes','now','targetKey','files/','catch','\x20logs\x20off\x0a','\x1b[36m','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','access','\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','stack','min','70wzEUxx','__writeCounter','columns','failures','isTTY','type','version','env/:env','\x20\x20╚═══════════════════════════╝','reset','other','\x20writes\x20(','platform','\x0a\x20\x20okdb\x20doctor\x0a','writeUInt8','--help','fts','dropFts','toFixed','../','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','join','[body]','max','then','ftsName','homedir','\x20\x20\x20\x20graceful\x20shutdown\x0a','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','\x20/\x20','key','ENV','UNIQUE_CONSTRAINT','val','License\x20limit\x20exceeded:\x20','item:create','importBlobs','INVALID_PRIMARY_KEY','yellow','\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','round','\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','env/staging/info','\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','type/users\x20--help','licenseId','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','cyan','[okdb]\x20loaded\x20config:\x20','getRange','\x0a\x20\x20','trim','true','OPEN','okdb','writes=','type/','valid','dynamic','stdout','grants','LICENSE_ACTIVATION_INVALID','./okdb-export.ndjson','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','\x20\x20All\x20checks\x20passed.\x0a','[okdb]\x20error:\x20','\x1b[35m','\x20\x20✓\x20OKDB\x20server\x20running','addedAt','PATCH','\x20\x20(unlimited)','ttl','createHmac','path','filter','getPins','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','red','[env]','sizeBefore','timeMachine','\x20bytes,\x20need\x20>=\x2065)','Invalid\x20activation\x20token:\x20','ttl:expired','off','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','[okdb]\x20reset\x20aborted','stopped','hasType','LICENSE_HASH_MISMATCH','reverse','find','fromEntries','isInteger','Environments','\x20\x20[','expiresAt','TYPES','ceil','PUB_FINGERPRINT','safety','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','[on|off|level]','[filter]','\x20\x20Usage:\x20','peers=','setSchema','toISOString','\x20\x20Envs:\x20\x20\x20\x20','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','yes','options','(no\x20types)','children','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','\x22\x20matches\x20','LICENSE_LIMIT_EXCEEDED','./okdb-backup','\x20opening\x20','crypto','drop','magenta','\x0a\x20\x20✓\x20License\x20added','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','getSecurityNotices','current','debug','schema:drop','ENVS','sort','\x20not\x20found','config\x20file\x20valid:\x20','null','\x22\x20(must\x20be\x20debug|info|warn|error)','(empty)','engines','bus:drain','update','registerIndex','<path>','\x1b[31m','utf8','--types','[okdb]\x20created\x20.kdbconfig','INVALID_INDEX_KEY','doctor','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','enabled','\x20licenses','reason','\x20\x20║','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','getCount','terminal','toLocaleString','\x22\x20is\x20used\x20by:\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','1170116lmRnPC','CREATED','created','blob','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','transaction','meta','[okdb]\x20backing\x20up\x20to\x20','import','readFileSync','env/','writeUInt16BE','index:reset','\x20does\x20not\x20exist','\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','test','--open','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','waiting','syncPeers','time','files','dirname','\x20\x20(','expiry','writeUInt32BE','get','resetting','\x0d[okdb]\x20','derivePin','license','cause','pause','Cannot\x20delete\x20','item:remove','set','search','schema:set','OKDBForeignKeyError','captureStackTrace','LABEL','\x20env','charCodeAt','detachConsole','question','noAdmin','type/users/item/alice','\x20months\x20from\x20issuance)','--env\x20<name>','dbPath','Examples','(unset)','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','\x1b[37m','idx:','pin','keys:','system:drain','open\x20','_envs','active','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22',']\x20already\x20maps\x20to\x20\x27','3758580xGYazX','split','\x20\x20\x20\x20expires:\x20\x20\x20','unique:violation_resolved','--port','expired','white','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','ttl:set','\x20\x20(name:\x20','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','config\x20file\x20invalid:\x20','OKDBTypeNotRegisteredError','Embeddings','processors/','ALREADY_EXISTS','\x20\x20\x20\x20\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/','\x22\x20on\x20\x22','\x20\x20·\x20','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','application/json','xdg-open\x20','Build\x20expects\x20public\x20key\x20fingerprint\x20','password','--ttl','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','mcp','\x27,\x20cannot\x20map\x20to\x20\x27','--config','keys','fts:registered','\x20\x20\x20\x20usage:\x20\x20\x20','\x20type','[okdb]\x20started\x20in\x20','transport','\x20(expires\x20in\x20','sub','--username','envs','sync:apply','sizeAfter','Feature\x20not\x20licensed:\x20','activation','write','\x20\x20\x20\x20','\x20in\x20','Types','\x20\x20Expected\x20one\x20of:','License\x20already\x20stored','\x20<path>\x20[json-body]','\x20\x20✓\x20Removed\x20license\x20','LICENSEE','base64url','attach','licensed','loadEnvFile','\x22\x20already\x20exists','decoded','SIGTERM','[okdb]\x20invalid\x20port:\x20','\x0d[okdb]\x20blobs:\x20','createHash','\x20\x20Type\x20','INVALID_VALUE','LICENSE_INVALID','string','decodeLicenseBlob','LICENSED_BUILD','rawBuf','creating','/type/users/item/alice\x0a\x20\x20\x20\x20','Hint:\x20','limits','\x1b[2m','noRepl','Invalid\x20primary\x20key\x20type:\x20','history','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','\x20\x20(licensee:\x20','OKDBAlreadyExistsError','txn:start','\x20day(s).','remove','{}[]:,\x0a\x0d\x09\x20','indexOf','count','\x20\x20skipped=','_computeStatus','inputSchema','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','listRoutes','prototype','toUpperCase','\x20\x20Shell\x20commands','index','detectInputType','/admin/index.html','logRequests','licensee','PERMISSIONS','OKDBNotFoundError','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','setPrompt','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','entries','stderr','blobs','type:registered','Admin','createPublicKey','node','No\x20tokens.','3HQWFSs','green','replace','LICENSE_FEATURE_DISABLED','rmSync','index:drop','fts:drop','repeat','sourceType','kind','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','(none)','has','--version','\x20\x20✓\x20Revoked\x20token\x20','object','\x20\x20Usage:','\x20\x20changes=','changes','EXPIRES','errors','maxWrites','POST','\x0a[okdb]\x20shutting\x20down…\x0a','\x20\x20\x20\x20licensee:\x20\x20','Full-text\x20search','hasOwnProperty','typesPerEnv','from','expires','error','system','name','--grants','license:invalid','records','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','slice','\x20MB\x20→\x20','timingSafeEqual','[okdb]\x20exported\x20\x20types=','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','api','assertLimit','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','\x20\x20\x20\x20permissions:\x20','features','writeFileSync','\x20already\x20in\x20use','\x20\x20✓\x20database\x20opened\x0a','(on\x20any\x20path\x20command)','invalid','put','admin','logLevel','SIGINT','\x20\x20\x20\x20\x20\x20','number','[okdb]\x20importing\x20','--no-repl','Sync','OKDBError','\x20environment\x20','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','EADDRINUSE'];_0xa73d=function(){return _0x1db676;};return _0xa73d();}function _0x6e57(_0x3b80a0,_0xaefe7b){_0x3b80a0=_0x3b80a0-0xf9;const _0xa73d48=_0xa73d();let _0x6e5788=_0xa73d48[_0x3b80a0];return _0x6e5788;}function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x382795=require$$0;function _0x43e4cc(_0x2f03b7,_0x1f354b){const _0x59d01c=_0x6e57;return _0x382795[_0x59d01c(0x216)](_0x59d01c(0x1b5),_0x1f354b)[_0x59d01c(0x259)](_0x2f03b7)[_0x59d01c(0x19c)](_0x59d01c(0x2e2));}function _0x279b72(_0x43bd01,_0x1fe01a){const _0x28db9f=_0x6e57;if(typeof _0x43bd01!=='string'||typeof _0x1fe01a!==_0x28db9f(0x2ef))return![];if(Buffer[_0x28db9f(0x1b8)](_0x43bd01)!==Buffer[_0x28db9f(0x1b8)](_0x1fe01a))return![];return _0x382795[_0x28db9f(0x345)](Buffer[_0x28db9f(0x33a)](_0x43bd01),Buffer[_0x28db9f(0x33a)](_0x1fe01a));}function _0x560f5b(_0x467c10){const _0x52a587=_0x6e57;if(!_0x467c10?.[_0x52a587(0x13b)](_0x52a587(0x3d3)))return null;return _0x467c10[_0x52a587(0x343)](0x7);}function _0x40ab01(_0xea7d77=0x20){const _0xd43095=_0x6e57;return _0x382795['randomBytes'](_0xea7d77)['toString'](_0xd43095(0x2e2));}function _0x39c508(_0x1b668c){const _0x2a70b2=_0x6e57;return _0x382795[_0x2a70b2(0x2eb)](_0x2a70b2(0x1b5))['update'](_0x1b668c)[_0x2a70b2(0x19c)](_0x2a70b2(0x139));}function _0x3b9118(_0x2b99a7,_0x1a11d0,_0x1c252a=0x36ee80){const _0x352667=_0x6e57;if(!_0x1a11d0)throw new Error(_0x352667(0x181));const _0x140666=Date['now'](),_0x3e9796=Buffer[_0x352667(0x33a)](JSON[_0x352667(0x3b8)]({'iat':_0x140666,'exp':_0x140666+_0x1c252a,'sub':_0x2b99a7?.['id']??_0x2b99a7?.[_0x352667(0x2d2)]??null,'username':_0x2b99a7?.[_0x352667(0x137)]??_0x2b99a7?.[_0x352667(0x33e)]??null,'roles':Array[_0x352667(0x18c)](_0x2b99a7?.[_0x352667(0x3c5)])?_0x2b99a7[_0x352667(0x3c5)]:[]}))[_0x352667(0x125)](_0x352667(0x2e2)),_0x110314=_0x43e4cc(_0x3e9796,_0x1a11d0);return _0x3e9796+'.'+_0x110314;}function _0x33cd07(_0x3ce705,_0x4e817b){const _0x16202e=_0x6e57;if(!_0x4e817b||typeof _0x3ce705!=='string')return null;const [_0x518f08,_0x590ec6]=_0x3ce705[_0x16202e(0x2ae)]('.');if(!_0x518f08||!_0x590ec6)return null;const _0x2b2fe3=_0x43e4cc(_0x518f08,_0x4e817b);if(!_0x279b72(_0x590ec6,_0x2b2fe3))return null;try{const _0x592ccf=JSON[_0x16202e(0x11b)](Buffer[_0x16202e(0x33a)](_0x518f08,_0x16202e(0x2e2))['toString']()),_0x139a9d=0x7530;if(Date[_0x16202e(0x1c3)]()>Number(_0x592ccf?.['exp']??0x0)+_0x139a9d)return null;return _0x592ccf;}catch{return null;}}async function _0x1a534d(_0x591f8d){return new Promise((_0x3dd9e5,_0x44b897)=>{const _0x3a7798=_0x6e57,_0x5f0d1e=_0x382795[_0x3a7798(0x3cf)](0x10);_0x382795['scrypt'](_0x591f8d,_0x5f0d1e,0x40,(_0x47336e,_0x58c1ca)=>{const _0x1c0d81=_0x3a7798;if(_0x47336e)_0x44b897(_0x47336e);_0x3dd9e5(_0x5f0d1e[_0x1c0d81(0x125)](_0x1c0d81(0x139))+':'+_0x58c1ca[_0x1c0d81(0x125)]('hex'));});});}async function _0x111e7b(_0x47e4b7,_0x4de176){const _0x3c8d11=_0x6e57,[_0x83db04,_0x1eefe2]=_0x4de176[_0x3c8d11(0x2ae)](':');if(!_0x83db04||!_0x1eefe2)return![];const _0xd4e126=Buffer[_0x3c8d11(0x33a)](_0x83db04,_0x3c8d11(0x139));return new Promise((_0xa7b1ed,_0x12c9c5)=>{const _0x4b6b24=_0x3c8d11;_0x382795[_0x4b6b24(0x113)](_0x47e4b7,_0xd4e126,0x40,(_0x174449,_0x1be0ba)=>{const _0x1233c0=_0x4b6b24;if(_0x174449)_0x12c9c5(_0x174449);_0xa7b1ed(_0x382795[_0x1233c0(0x345)](_0x1be0ba,Buffer['from'](_0x1eefe2,_0x1233c0(0x139))));});});}return okdbAuthTokens={'hmac':_0x43e4cc,'timingSafeEqual':_0x279b72,'parseBearer':_0x560f5b,'randomToken':_0x40ab01,'hashToken':_0x39c508,'issueToken':_0x3b9118,'authenticateToken':_0x33cd07,'hashPassword':_0x1a534d,'verifyPassword':_0x111e7b},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x4150dd=_0x3f2430;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x1d8bf3=require$$0$1,_0x53442a=_0x4150dd(0x131),_0x5adac6=new Uint8Array(0x100)[_0x4150dd(0x378)](0xff);for(let _0x349354=0x0;_0x349354<_0x53442a[_0x4150dd(0x369)];_0x349354++){_0x5adac6[_0x53442a[_0x4150dd(0x298)](_0x349354)]=_0x349354,_0x5adac6[_0x53442a['charCodeAt'](_0x349354)+0x20]=_0x349354;}_0x5adac6['O'[_0x4150dd(0x298)](0x0)]=0x0,_0x5adac6['o'['charCodeAt'](0x0)]=0x0,_0x5adac6['I'['charCodeAt'](0x0)]=0x1,_0x5adac6['i'['charCodeAt'](0x0)]=0x1,_0x5adac6['L'[_0x4150dd(0x298)](0x0)]=0x1,_0x5adac6['l'[_0x4150dd(0x298)](0x0)]=0x1;function _0x3c03f6(_0x5a588b){const _0x1fbc10=_0x4150dd;let _0x55a8fe=0x0,_0x2bea84=0x0,_0x4ec844='';for(let _0x14ef7b=0x0;_0x14ef7b<_0x5a588b[_0x1fbc10(0x369)];_0x14ef7b++){_0x2bea84=_0x2bea84<<0x8|_0x5a588b[_0x14ef7b],_0x55a8fe+=0x8;while(_0x55a8fe>=0x5){_0x55a8fe-=0x5,_0x4ec844+=_0x53442a[_0x2bea84>>>_0x55a8fe&0x1f];}}return _0x55a8fe>0x0&&(_0x4ec844+=_0x53442a[_0x2bea84<<0x5-_0x55a8fe&0x1f]),_0x4ec844;}function _0xd14a7c(_0x3509d1){const _0x3902d7=_0x4150dd;_0x3509d1=_0x3509d1[_0x3902d7(0x320)](/-/g,'')[_0x3902d7(0x30a)]();let _0x24238b=0x0,_0xa42359=0x0;const _0x42d0eb=[];for(let _0x253896=0x0;_0x253896<_0x3509d1['length'];_0x253896++){const _0x2ebd73=_0x5adac6[_0x3509d1['charCodeAt'](_0x253896)];if(_0x2ebd73===0xff)continue;_0xa42359=_0xa42359<<0x5|_0x2ebd73,_0x24238b+=0x5,_0x24238b>=0x8&&(_0x24238b-=0x8,_0x42d0eb[_0x3902d7(0x3c8)](_0xa42359>>>_0x24238b&0xff));}return Buffer[_0x3902d7(0x33a)](_0x42d0eb);}const _0x391f53=[_0x4150dd(0x3c3),_0x4150dd(0x165),_0x4150dd(0x257),_0x4150dd(0x1de),_0x4150dd(0x21e),'views',_0x4150dd(0x2c8),_0x4150dd(0x283)],_0x4ff0ae=0x0,_0x3da6d1=0x1,_0x25f0fe=0x2,_0x168067=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0xe92de2({issuedAt:_0x222602,expiresAt:_0x249f90,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x4ff0ae}){const _0x2a1c34=_0x4150dd,_0x113f20=Buffer[_0x2a1c34(0x33a)](licensee,_0x2a1c34(0x25d))['slice'](0x0,0x40),_0x4d4ee7=0x1+0x1+0x4+0x4+0x1+_0x113f20[_0x2a1c34(0x369)]+0x2+0x10,_0x27f27c=Buffer[_0x2a1c34(0x36e)](_0x4d4ee7);let _0x15f121=0x0;_0x27f27c[_0x2a1c34(0x1dc)](0x1,_0x15f121++),_0x27f27c[_0x2a1c34(0x1dc)](licenseType,_0x15f121++),_0x27f27c[_0x2a1c34(0x287)](Math[_0x2a1c34(0x122)](_0x222602/0x3e8),_0x15f121),_0x15f121+=0x4,_0x27f27c[_0x2a1c34(0x287)](Math[_0x2a1c34(0x122)](_0x249f90/0x3e8),_0x15f121),_0x15f121+=0x4,_0x27f27c[_0x2a1c34(0x1dc)](_0x113f20[_0x2a1c34(0x369)],_0x15f121++),_0x113f20[_0x2a1c34(0x3a7)](_0x27f27c,_0x15f121),_0x15f121+=_0x113f20['length'];let _0x2b7bcf=0x0;for(let _0x9bc362=0x0;_0x9bc362<_0x391f53['length'];_0x9bc362++){if(features[_0x391f53[_0x9bc362]])_0x2b7bcf|=0x1<<_0x9bc362;}_0x27f27c[_0x2a1c34(0x279)](_0x2b7bcf,_0x15f121),_0x15f121+=0x2;const _0x32fe95=[_0x2a1c34(0x2d4),'typesPerEnv',_0x2a1c34(0x281),_0x2a1c34(0x333)];for(const _0x1e6a91 of _0x32fe95){_0x27f27c['writeUInt32BE'](limits[_0x1e6a91]||0x0,_0x15f121),_0x15f121+=0x4;}return _0x27f27c;}function _0x396aa2(_0x29d215){const _0x466091=_0x4150dd;let _0x824cbc=0x0;const _0x17f3b4=_0x29d215[_0x466091(0x3f0)](_0x824cbc++),_0x5ee4dd=_0x29d215['readUInt8'](_0x824cbc++),_0x3c28b9=_0x29d215['readUInt32BE'](_0x824cbc);_0x824cbc+=0x4;const _0x2cd320=_0x29d215[_0x466091(0x105)](_0x824cbc);_0x824cbc+=0x4;const _0x2e7c39=_0x29d215[_0x466091(0x3f0)](_0x824cbc++),_0x241067=_0x29d215['slice'](_0x824cbc,_0x824cbc+_0x2e7c39)[_0x466091(0x125)]('utf8');_0x824cbc+=_0x2e7c39;const _0x4ad3d6=_0x29d215[_0x466091(0x13c)](_0x824cbc);_0x824cbc+=0x2;const _0x8c6a30={};for(let _0x2ac1b1=0x0;_0x2ac1b1<_0x391f53[_0x466091(0x369)];_0x2ac1b1++){_0x8c6a30[_0x391f53[_0x2ac1b1]]=Boolean(_0x4ad3d6&0x1<<_0x2ac1b1);}const _0xb60f4c=['envs',_0x466091(0x339),_0x466091(0x281),'maxWrites'],_0xfa0462={};for(const _0x4e9390 of _0xb60f4c){const _0x403daf=_0x29d215[_0x466091(0x105)](_0x824cbc);_0x824cbc+=0x4,_0xfa0462[_0x4e9390]=_0x403daf===0x0?null:_0x403daf;}return{'v':_0x17f3b4,'licenseType':_0x5ee4dd,'issuedAt':_0x3c28b9*0x3e8,'expiresAt':_0x2cd320*0x3e8,'licensee':_0x241067,'features':_0x8c6a30,'limits':_0xfa0462};}function _0x2710ac(_0x5aabae,_0x691fa){const _0x6389ef=_0x4150dd,_0x49dcbc=Buffer[_0x6389ef(0x114)]([_0x5aabae,_0x691fa]),_0x567ca6=_0x3c03f6(_0x49dcbc),_0x294e90=[];for(let _0x629464=0x0;_0x629464<_0x567ca6[_0x6389ef(0x369)];_0x629464+=0x8){_0x294e90['push'](_0x567ca6['slice'](_0x629464,_0x629464+0x8));}return _0x294e90['join']('-');}function _0x2e9875(_0x445c99){const _0xa55e06=_0x4150dd;if(typeof _0x445c99!==_0xa55e06(0x2ef))throw new Error(_0xa55e06(0x1e2));const _0x5971e5=_0xd14a7c(_0x445c99['replace'](/-/g,''));if(_0x5971e5[_0xa55e06(0x369)]<0x41)throw new Error(_0xa55e06(0x3af)+_0x5971e5['length']+_0xa55e06(0x21f));const _0x5d97df=_0x5971e5['slice'](0x0,_0x5971e5['length']-0x40),_0x2436db=_0x5971e5[_0xa55e06(0x343)](_0x5971e5[_0xa55e06(0x369)]-0x40);let _0x141e39;try{_0x141e39=_0x396aa2(_0x5d97df);}catch(_0x429a71){throw new Error(_0xa55e06(0x2fb)+_0x429a71[_0xa55e06(0x10a)]);}return{'rawBuf':_0x5971e5,'payload':_0x5d97df,'sig':_0x2436db,'decoded':_0x141e39};}function _0x1cac95(_0x3d296c){const _0xd52bb=_0x4150dd;return _0x1d8bf3[_0xd52bb(0x2eb)](_0xd52bb(0x1b5))['update'](_0x3d296c)[_0xd52bb(0x19c)]()[_0xd52bb(0x343)](0x0,0x8);}function _0x2b5d27(_0x1b7c66,_0x2426b4,_0x3f7932){const _0x2f8acd=_0x4150dd,_0x73f55='OKDB-PIN-V1:'+_0x3f7932,_0x2eeb41=Buffer[_0x2f8acd(0x114)]([Buffer[_0x2f8acd(0x33a)](_0x1b7c66,_0x2f8acd(0x25d)),_0x2426b4]),_0x3cef23=_0x1d8bf3[_0x2f8acd(0x216)](_0x2f8acd(0x1b5),_0x73f55)[_0x2f8acd(0x259)](_0x2eeb41)[_0x2f8acd(0x19c)](),_0x5f3298=_0x3c03f6(_0x3cef23[_0x2f8acd(0x343)](0x0,0x5));return{'pin':_0x5f3298,'pinHmac':_0x3cef23};}function _0xfb7163(_0x5d4739,_0x204eea,_0x1a6843){const _0x30fb16=_0x4150dd,_0x67c3fe=Buffer[_0x30fb16(0x36e)](0x4d);let _0x139061=0x0;_0x67c3fe[_0x30fb16(0x1dc)](0x1,_0x139061++),_0x5d4739[_0x30fb16(0x3a7)](_0x67c3fe,_0x139061),_0x139061+=0x8,_0x67c3fe['writeUInt32BE'](_0x204eea,_0x139061),_0x139061+=0x4,_0x1a6843['copy'](_0x67c3fe,_0x139061);const _0x9f8955=_0x3c03f6(_0x67c3fe),_0x2b3bec=[];for(let _0x12cf2d=0x0;_0x12cf2d<_0x9f8955[_0x30fb16(0x369)];_0x12cf2d+=0x6){_0x2b3bec['push'](_0x9f8955[_0x30fb16(0x343)](_0x12cf2d,_0x12cf2d+0x6));}return _0x2b3bec['join']('-');}function _0x45a046(_0x5d90b0){const _0x1652fc=_0x4150dd;if(typeof _0x5d90b0!==_0x1652fc(0x2ef))throw new Error(_0x1652fc(0x223));const _0x5d827e=_0xd14a7c(_0x5d90b0[_0x1652fc(0x320)](/-/g,''));if(_0x5d827e[_0x1652fc(0x369)]!==0x4d)throw new Error(_0x1652fc(0x10f)+_0x5d827e[_0x1652fc(0x369)]);let _0x4e3cbd=0x0;const _0x454138=_0x5d827e[_0x1652fc(0x3f0)](_0x4e3cbd++),_0x23a5a0=_0x5d827e[_0x1652fc(0x343)](_0x4e3cbd,_0x4e3cbd+0x8);_0x4e3cbd+=0x8;const _0x575c73=_0x5d827e[_0x1652fc(0x105)](_0x4e3cbd);_0x4e3cbd+=0x4;const _0x373c43=_0x5d827e[_0x1652fc(0x343)](_0x4e3cbd);return{'v':_0x454138,'licenseHash':_0x23a5a0,'expiry':_0x575c73,'sig':_0x373c43};}function _0x3c2e3a({tokenString:_0x54a4a7,nodeId:_0x316cc1,rawBlobBuf:_0x3ebe22,pubKeyPem:_0x15f223,pubFingerprint:_0x2f98e7}){const _0x1abc41=_0x4150dd;let _0x2f81dc;try{_0x2f81dc=_0x45a046(_0x54a4a7);}catch(_0x90d230){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x54126c=_0x1cac95(_0x3ebe22);if(!_0x54126c[_0x1abc41(0x388)](_0x2f81dc['licenseHash']))return{'valid':![],'reason':_0x1abc41(0x229)};const {pinHmac:_0x15b96}=_0x2b5d27(_0x316cc1,_0x54126c,_0x2f98e7),_0x51bf72=Buffer['allocUnsafe'](0x4);_0x51bf72[_0x1abc41(0x287)](_0x2f81dc[_0x1abc41(0x286)],0x0);const _0x19cf9f=Buffer['concat']([Buffer[_0x1abc41(0x33a)]([_0x2f81dc['v']]),_0x15b96['slice'](0x0,0x5),_0x2f81dc[_0x1abc41(0x120)],_0x51bf72]);try{const _0x3e799a=_0x1d8bf3[_0x1abc41(0x17e)](null,_0x19cf9f,_0x15f223,_0x2f81dc[_0x1abc41(0x3b4)]);if(!_0x3e799a)return{'valid':![],'reason':_0x1abc41(0x14f)};}catch(_0x47a27d){return{'valid':![],'reason':_0x1abc41(0x14f)};}if(_0x2f81dc[_0x1abc41(0x286)]<Date[_0x1abc41(0x1c3)]()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x43a182(_0x5882f3){const _0x5e787a=_0x4150dd;if(typeof _0x5882f3!==_0x5e787a(0x2ef))return'unknown';const _0x53e61b=_0x5882f3[_0x5e787a(0x201)]();if(_0x53e61b[_0x5e787a(0x13b)]('/')||_0x53e61b[_0x5e787a(0x13b)]('./')||_0x53e61b[_0x5e787a(0x13b)](_0x5e787a(0x1e1))||/^[A-Za-z]:[\\/]/[_0x5e787a(0x27d)](_0x53e61b))return _0x5e787a(0x217);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x53e61b))return'uuid';const _0x246273=_0x53e61b[_0x5e787a(0x320)](/[\s-]+/g,'')[_0x5e787a(0x369)];if(_0x246273===0x7c)return _0x5e787a(0x2d8);if(_0x246273>=0x95&&_0x246273<=0xfc)return _0x5e787a(0x271);return _0x5e787a(0x18d);}return okdbLicenseCodec={'toBase32':_0x3c03f6,'fromBase32':_0xd14a7c,'encodeLicensePayload':_0xe92de2,'decodeLicensePayload':_0x396aa2,'encodeLicenseBlob':_0x2710ac,'decodeLicenseBlob':_0x2e9875,'licenseHash':_0x1cac95,'derivePin':_0x2b5d27,'encodeActivationToken':_0xfb7163,'decodeActivationToken':_0x45a046,'verifyActivation':_0x3c2e3a,'detectInputType':_0x43a182,'FEATURE_NAMES':_0x391f53,'LICENSE_TYPE_STANDARD':_0x4ff0ae,'LICENSE_TYPE_OPEN':_0x3da6d1,'LICENSE_TYPE_INTERNAL':_0x25f0fe,'OPEN_LICENSE_MAX_DURATION_MS':_0x168067},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x149c18 extends Error{constructor(_0x16be90,_0x19dbc1,_0xadb7cf={}){const _0x4f9564=_0x6e57;super(_0x16be90),this[_0x4f9564(0x33e)]=_0x4f9564(0x35b),this['code']=_0x19dbc1,this[_0x4f9564(0x140)]=_0xadb7cf,_0xadb7cf[_0x4f9564(0x28d)]&&(this[_0x4f9564(0x28d)]=_0xadb7cf[_0x4f9564(0x28d)]),Error[_0x4f9564(0x295)](this,this['constructor']);}}class _0xecfd1b extends _0x149c18{constructor(_0x35a64f,_0x47187d,_0x398d2a,_0xfbebd){const _0x24b29c=_0x6e57;super('Version\x20mismatch\x20for\x20'+_0x35a64f+'@'+_0x47187d+':\x20expected\x20'+_0x398d2a+_0x24b29c(0x107)+_0xfbebd,'VERSION_MISMATCH',{'type':_0x35a64f,'key':_0x47187d,'expectedVersion':_0x398d2a,'actualVersion':_0xfbebd}),this[_0x24b29c(0x33e)]=_0x24b29c(0x168);}}class _0x3ff1fa extends _0x149c18{constructor(_0xfb5886,_0x1cb82b){const _0x574378=_0x6e57;super(_0xfb5886+'@'+_0x1cb82b+_0x574378(0x27b),'NOT_FOUND',{'type':_0xfb5886,'key':_0x1cb82b}),this[_0x574378(0x33e)]=_0x574378(0x312);}}class _0x5f3082 extends _0x149c18{constructor(_0x118fb6,_0x4a3066){const _0x4d991b=_0x6e57;super(_0x118fb6+'@'+_0x4a3066+_0x4d991b(0x1a9),_0x4d991b(0x2bc),{'type':_0x118fb6,'key':_0x4a3066}),this['name']=_0x4d991b(0x2fd);}}class _0x1336ba extends _0x149c18{constructor(_0x20ec00,_0x3fd25d){const _0xf2a87e=_0x6e57,_0x4aebff=typeof _0x3fd25d;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x20ec00+_0xf2a87e(0x3ba)+_0x4aebff+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x3fd25d,_0xf2a87e(0x260),{'index':_0x20ec00,'key':_0x3fd25d,'keyType':_0x4aebff}),this[_0xf2a87e(0x33e)]=_0xf2a87e(0x17d);}}class _0x4ce904 extends _0x149c18{constructor(_0x47b8ad){const _0x21d7cb=_0x6e57,_0x3379be=typeof _0x47b8ad;super(_0x21d7cb(0x2f9)+_0x3379be+_0x21d7cb(0x130)+_0x47b8ad,_0x21d7cb(0x1f3),{'key':_0x47b8ad,'keyType':_0x3379be}),this[_0x21d7cb(0x33e)]='OKDBInvalidPrimaryKeyError';}}class _0x35ebb2 extends _0x149c18{constructor(_0x51cd5a){const _0x1cac13=_0x6e57;super(_0x1cac13(0x197)+_0x51cd5a+_0x1cac13(0x101),_0x1cac13(0x38f),{'type':_0x51cd5a}),this[_0x1cac13(0x33e)]=_0x1cac13(0x2b9);}}class _0x246227 extends _0x149c18{constructor(_0x5710be){const _0x5b18d6=_0x6e57;super(_0x5b18d6(0x197)+_0x5710be+'\x27\x20already\x20registered','TYPE_ALREADY_REGISTERED',{'type':_0x5710be}),this['name']='OKDBTypeAlreadyRegisteredError';}}class _0x291d02 extends _0x149c18{constructor(_0x3ac58d,_0x4f4f4d){const _0x3d8805=_0x6e57;super(_0x3d8805(0x149)+_0x4f4f4d+'\x27\x20on\x20type\x20\x27'+_0x3ac58d+_0x3d8805(0x101),_0x3d8805(0x171),{'type':_0x3ac58d,'index':_0x4f4f4d}),this[_0x3d8805(0x33e)]=_0x3d8805(0x3d4);}}class _0x41c816 extends _0x149c18{constructor(_0x5200f9,_0x31aae1){const _0x45781e=_0x6e57;super(_0x45781e(0x149)+_0x31aae1+_0x45781e(0x179)+_0x5200f9+'\x27\x20is\x20already\x20registered',_0x45781e(0x174),{'type':_0x5200f9,'index':_0x31aae1}),this[_0x45781e(0x33e)]='OKDBIndexAlreadyRegisteredError';}}class _0x5c2a62 extends _0x149c18{constructor(_0x2ed430,_0x20aa50={}){const _0x4d834a=_0x6e57;super(_0x2ed430,_0x4d834a(0x2ed),_0x20aa50),this[_0x4d834a(0x33e)]=_0x4d834a(0x3c0);}}class _0x50b3dc extends _0x149c18{constructor(_0x32b00e,_0x1c986f,_0xb39035,_0xa58c98,_0x2d9948){const _0x3c9984=_0x6e57;super(_0x3c9984(0x3b9)+_0x32b00e+'@'+_0x1c986f+':\x20key\x20['+_0xb39035+_0x3c9984(0x2ac)+_0xa58c98+_0x3c9984(0x2c9)+_0x2d9948+'\x27',_0x3c9984(0x1ee),{'type':_0x32b00e,'index':_0x1c986f,'indexKey':_0xb39035,'existingKey':_0xa58c98,'conflictingKey':_0x2d9948}),this[_0x3c9984(0x33e)]=_0x3c9984(0x115);}}class _0x490b6a extends _0x149c18{constructor(_0x1e041d,_0x53be06,_0x286f17){const _0x440509=_0x6e57;super('Schema\x20validation\x20failed\x20for\x20'+_0x1e041d+'@'+_0x53be06,_0x440509(0x12d),{'type':_0x1e041d,'key':_0x53be06,'errors':_0x286f17}),this['name']='OKDBSchemaValidationError',this[_0x440509(0x1d3)]=_0x1e041d,this[_0x440509(0x1ec)]=_0x53be06,this[_0x440509(0x332)]=_0x286f17;}}class _0x497c31 extends _0x149c18{constructor(_0x407686,_0x2fa695){const _0x3ca817=_0x6e57;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x407686+':\x20'+_0x2fa695['length']+_0x3ca817(0x3f2),_0x3ca817(0x138),{'type':_0x407686,'failures':_0x2fa695}),this['name']=_0x3ca817(0x360),this[_0x3ca817(0x1d3)]=_0x407686,this[_0x3ca817(0x1d1)]=_0x2fa695;}}class _0x173287 extends _0x149c18{constructor(_0x49ad66,_0xd8d136,_0x3bb1ad,_0x44b024,_0x4bb0a2){const _0x8f0462=_0x6e57;super(_0x8f0462(0x150)+_0x49ad66+'@'+_0xd8d136+'.'+_0x3bb1ad+_0x8f0462(0x1a6)+_0x44b024+'@'+_0x4bb0a2+'\x20which\x20does\x20not\x20exist',_0x8f0462(0x389),{'sourceType':_0x49ad66,'sourceKey':_0xd8d136,'fieldPath':_0x3bb1ad,'targetType':_0x44b024,'targetKey':_0x4bb0a2}),this[_0x8f0462(0x33e)]=_0x8f0462(0x294),this[_0x8f0462(0x326)]=_0x49ad66,this['sourceKey']=_0xd8d136,this[_0x8f0462(0x16f)]=_0x3bb1ad,this[_0x8f0462(0x17a)]=_0x44b024,this[_0x8f0462(0x1c4)]=_0x4bb0a2;}}class _0x19e621 extends _0x149c18{constructor(_0x575520,_0x6d06f9,_0x1bb9da){const _0x6a047a=_0x6e57;super(_0x6a047a(0x28f)+_0x575520+'@'+_0x6d06f9+':\x20'+_0x1bb9da['length']+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x575520,'targetKey':_0x6d06f9,'references':_0x1bb9da}),this[_0x6a047a(0x33e)]='OKDBForeignKeyDeleteError',this[_0x6a047a(0x17a)]=_0x575520,this[_0x6a047a(0x1c4)]=_0x6d06f9,this['references']=_0x1bb9da;}}class _0x56a09a extends _0x149c18{constructor(_0x2ba3a1,_0x356ac5,_0x451057){const _0x452d01=_0x6e57;super('Index\x20\x22'+_0x356ac5+_0x452d01(0x2be)+_0x2ba3a1+_0x452d01(0x26b)+_0x451057[_0x452d01(0x1b2)](_0x49896c=>_0x49896c[_0x452d01(0x327)]+':'+_0x49896c[_0x452d01(0x33e)])[_0x452d01(0x1e3)](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0x2ba3a1,'index':_0x356ac5,'usedBy':_0x451057}),this[_0x452d01(0x33e)]=_0x452d01(0x11c);}}return okdbError={'OKDBError':_0x149c18,'OKDBVersionMismatchError':_0xecfd1b,'OKDBNotFoundError':_0x3ff1fa,'OKDBAlreadyExistsError':_0x5f3082,'OKDBInvalidIndexKeyError':_0x1336ba,'OKDBInvalidPrimaryKeyError':_0x4ce904,'OKDBTypeNotRegisteredError':_0x35ebb2,'OKDBTypeAlreadyRegisteredError':_0x246227,'OKDBIndexNotRegisteredError':_0x291d02,'OKDBIndexAlreadyRegisteredError':_0x41c816,'OKDBInvalidValueError':_0x5c2a62,'OKDBUniqueConstraintError':_0x50b3dc,'OKDBSchemaValidationError':_0x490b6a,'OKDBSchemaCollectionError':_0x497c31,'OKDBForeignKeyError':_0x173287,'OKDBForeignKeyDeleteError':_0x19e621,'OKDBIndexHasConsumersError':_0x56a09a},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x61af14=_0x3f2430;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x1135f0={'PUT':'put','REMOVE':_0x61af14(0x300),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x61af14(0x25a),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':'dropType','FTS_REGISTER':'registerFts','FTS_DROP':_0x61af14(0x1df),'FTS_RESET':'resetFts','SCHEMA_SET':_0x61af14(0x23a),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x61af14(0x116),'TTL_CLEAR':'clearTtl'},_0x13efad={'SYSTEM_READY':_0x61af14(0x3ae),'SYSTEM_STOPPED':_0x61af14(0x162),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x61af14(0x3a8),'SYSTEM_DRAIN':_0x61af14(0x2a7),'SYSTEM_BUS_STATE_CHANGE':_0x61af14(0x37d),'ITEM_CREATE':_0x61af14(0x1f1),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x61af14(0x290),'INDEX_RESET':_0x61af14(0x27a),'INDEX_READY':_0x61af14(0x185),'INDEX_PROGRESS':_0x61af14(0x1b1),'INDEX_DROP':_0x61af14(0x323),'INDEX_REGISTERED':_0x61af14(0x385),'FTS_REGISTERED':_0x61af14(0x2cc),'FTS_DROP':_0x61af14(0x324),'FTS_RESET':_0x61af14(0x386),'SCHEMA_SET':_0x61af14(0x293),'SCHEMA_DROP':_0x61af14(0x24f),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x61af14(0x2b0),'REF_VIOLATION':_0x61af14(0x135),'REF_VIOLATION_RESOLVED':_0x61af14(0x3c4),'SYNC_APPLY':_0x61af14(0x2d5),'TXN_START':_0x61af14(0x2fe),'TXN_END':_0x61af14(0x39e),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x61af14(0x319),'TYPE_DROP':_0x61af14(0x1b7),'ENV_OPENED':_0x61af14(0x38b),'ENV_REMOVED':'env:removed','TTL_EXPIRED':_0x61af14(0x221),'TTL_SET':_0x61af14(0x2b5),'TTL_CLEAR':_0x61af14(0x3f4),'LICENSE_INVALID':_0x61af14(0x340),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x61af14(0x12c),'LICENSE_REMOVED':_0x61af14(0x159)},_0xe373b={'CREATING':_0x61af14(0x2f3),'RESETTING':_0x61af14(0x289),'READY':_0x61af14(0x173),'DROPPING':'dropping','WAITING':_0x61af14(0x280)},_0x51d934={'CREATED':_0x61af14(0x270),'STARTING':'starting','STARTED':_0x61af14(0x366),'STOPPING':'stopping','STOPPED':_0x61af14(0x227)},_0x3750e5={'CREATING':_0x61af14(0x2f3),'READY':_0x61af14(0x173),'HALTED':'halted','STOPPED':_0x61af14(0x227),'RESETTING':'resetting'},_0x47745b=Object[_0x61af14(0x11f)]({'POKE':'bus:poke','DRAIN':_0x61af14(0x258)});return okdbEnums={'BUS_EVENTS':_0x47745b,'CHANGE_ACTIONS':_0x1135f0,'EVENTS':_0x13efad,'INDEX_STATE':_0xe373b,'OKDB_STATE':_0x51d934,'VIEW_STATE':_0x3750e5},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x594e0d=_0x3f2430;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x35eaa1=require$$1,_0x466c94=require$$1$1,_0x49dd16=require$$0,_0xcaea86=_0x35eaa1[_0x594e0d(0x277)](_0x466c94[_0x594e0d(0x1e3)](__dirname,'keys/public.pem'),_0x594e0d(0x25d))['trim'](),_0x3db2e9=_0x49dd16[_0x594e0d(0x31b)](_0xcaea86)[_0x594e0d(0x17f)]({'type':'spki','format':_0x594e0d(0x364)}),_0x22d16e=_0x49dd16[_0x594e0d(0x2eb)](_0x594e0d(0x1b5))[_0x594e0d(0x259)](_0x3db2e9)['digest']('hex')['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0xcaea86,'PUB_FINGERPRINT':_0x22d16e},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x5b89ba=_0x3f2430;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x5b0f93=require$$0,{OKDBError:_0x2be7b6}=requireOkdbError(),{EVENTS:_0x330adb}=requireOkdbEnums(),_0x4f1d2a=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x456e0d,LICENSE_TYPE_INTERNAL:_0xa662e4,OPEN_LICENSE_MAX_DURATION_MS:_0xa5ee56}=_0x4f1d2a,_0x5af5df=requireOkdbPubkey(),_0x1e2ff9={'LICENSED_BUILD':_0x5b89ba(0x202),'PUBLIC_KEY_PEM':_0x5af5df[_0x5b89ba(0x3c1)],'PUB_FINGERPRINT':_0x5af5df[_0x5b89ba(0x233)],'LICENSE_EXPIRED_ACTION':_0x5b89ba(0x126)},_0x38a7a1=_0x5b89ba(0x154),_0x540eeb={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x26fc37(_0x4c8950){const _0x147d11=_0x5b89ba;!_0x4c8950[_0x147d11(0x228)](_0x38a7a1)&&await _0x4c8950[_0x147d11(0x104)](_0x38a7a1);}class _0x553e46{constructor(_0x298a03){const _0xff8492=_0x5b89ba;this['okdb']=_0x298a03,this[_0xff8492(0x112)]=null;}async['reload'](){const _0x2ebb55=_0x5b89ba,_0x3201f2=this[_0x2ebb55(0x204)][_0x2ebb55(0x129)];if(!_0x3201f2||!_0x3201f2[_0x2ebb55(0x228)](_0x38a7a1)){this[_0x2ebb55(0x112)]=null;return;}const _0x22630c=this['okdb']['id'];let _0x9ec17=null;for(const {key:_0x379ef3,value:_0x252fea}of _0x3201f2['getRange'](_0x38a7a1)){const _0xbf256d=this['_computeStatus'](_0x252fea,_0x22630c);_0xbf256d===_0x2ebb55(0x2aa)&&!_0x9ec17&&(_0x9ec17={..._0x252fea,'id':_0x379ef3,'status':_0xbf256d});}this[_0x2ebb55(0x112)]=_0x9ec17;if(this[_0x2ebb55(0x112)]&&this['_active'][_0x2ebb55(0x156)]===_0x456e0d){const _0x133a2a=Math['ceil']((this['_active'][_0x2ebb55(0x230)]-Date[_0x2ebb55(0x1c3)]())/0x5265c00);this[_0x2ebb55(0x204)][_0x2ebb55(0x126)]?.['warn'](_0x2ebb55(0x2c0)+_0x133a2a+_0x2ebb55(0x2ff),{'feature':_0x2ebb55(0x28c),'licensee':this[_0x2ebb55(0x112)][_0x2ebb55(0x310)],'expiresAt':new Date(this['_active'][_0x2ebb55(0x230)])['toISOString']()});}this[_0x2ebb55(0x112)]&&this[_0x2ebb55(0x112)][_0x2ebb55(0x156)]===_0xa662e4&&this['okdb'][_0x2ebb55(0x126)]?.['warn'](_0x2ebb55(0x313),{'feature':_0x2ebb55(0x28c),'licensee':this[_0x2ebb55(0x112)][_0x2ebb55(0x310)]});}[_0x5b89ba(0x305)](_0x174663,_0x5cd26c){const _0x472315=_0x5b89ba;if(!_0x174663[_0x472315(0x271)])return'invalid';let _0x7f810a;try{_0x7f810a=_0x4f1d2a[_0x472315(0x2f0)](_0x174663[_0x472315(0x271)]);}catch(_0x2b345b){return'invalid';}try{const _0x7dfb89=_0x5b0f93['verify'](null,_0x7f810a[_0x472315(0x12e)],_0x1e2ff9[_0x472315(0x3c1)],_0x7f810a[_0x472315(0x3b4)]);if(!_0x7dfb89)return _0x472315(0x351);}catch(_0x42d5e4){return _0x472315(0x351);}if(_0x7f810a[_0x472315(0x2e7)][_0x472315(0x156)]===_0xa662e4)return _0x472315(0x2aa);if(_0x7f810a[_0x472315(0x2e7)][_0x472315(0x230)]<=Date['now']())return _0x472315(0x2b2);if(_0x7f810a[_0x472315(0x2e7)][_0x472315(0x156)]===_0x456e0d)return'active';if(!_0x174663[_0x472315(0x2d8)])return'pending';const _0x29e7b1=_0x4f1d2a[_0x472315(0x170)]({'tokenString':_0x174663[_0x472315(0x2d8)],'nodeId':_0x5cd26c,'rawBlobBuf':_0x7f810a['rawBuf'],'pubKeyPem':_0x1e2ff9[_0x472315(0x3c1)],'pubFingerprint':_0x1e2ff9[_0x472315(0x233)]});if(_0x29e7b1[_0x472315(0x265)]===_0x472315(0x229)||_0x29e7b1[_0x472315(0x265)]==='SIG_INVALID')return _0x472315(0x119);if(_0x29e7b1[_0x472315(0x265)]===_0x472315(0x390))return _0x472315(0x2b2);if(!_0x29e7b1[_0x472315(0x207)])return _0x472315(0x119);return'active';}get[_0x5b89ba(0x2aa)](){const _0x2067a8=_0x5b89ba;return this[_0x2067a8(0x112)];}get[_0x5b89ba(0x106)](){return this['_active']??_0x540eeb;}[_0x5b89ba(0x14a)](_0x1f368a){const _0x3b699a=_0x5b89ba;if(_0x1e2ff9[_0x3b699a(0x2f1)]!==_0x3b699a(0x202))return;const _0x437b5c=this[_0x3b699a(0x106)];if(!_0x437b5c[_0x3b699a(0x34c)]?.[_0x1f368a]){const _0x257691=_0x437b5c[_0x3b699a(0x3d8)]?'Feature\x20not\x20available\x20on\x20free\x20tier:\x20'+_0x1f368a+_0x3b699a(0x109)+_0x1f368a+_0x3b699a(0x3b6):_0x3b699a(0x2d7)+_0x1f368a+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x1f368a+'\x22.';throw new _0x2be7b6(_0x257691,_0x3b699a(0x321),{'feature':_0x1f368a});}}['isFeatureEnabled'](_0x6e6765){const _0x303ed8=_0x5b89ba;if(_0x1e2ff9['LICENSED_BUILD']!=='true')return!![];return!!this[_0x303ed8(0x106)][_0x303ed8(0x34c)]?.[_0x6e6765];}[_0x5b89ba(0x349)](_0x13b1cd,_0x263565){const _0xc075ce=_0x5b89ba;if(_0x1e2ff9[_0xc075ce(0x2f1)]!==_0xc075ce(0x202))return;const _0x2f2514=this[_0xc075ce(0x106)],_0x50f788=_0x2f2514['limits']?.[_0x13b1cd];if(_0x50f788===null||_0x50f788===undefined||_0x50f788===0x0)return;if(_0x263565>=_0x50f788)throw new _0x2be7b6(_0xc075ce(0x1f0)+_0x13b1cd+'\x20('+_0x263565+'/'+_0x50f788+')',_0xc075ce(0x244),{'limit':_0x13b1cd,'current':_0x263565,'max':_0x50f788});}async[_0x5b89ba(0x3d6)](_0xae305a){const _0x3432b2=_0x5b89ba;let _0x714545;try{_0x714545=_0x4f1d2a[_0x3432b2(0x2f0)](_0xae305a);}catch(_0x4f2768){throw new _0x2be7b6(_0x3432b2(0x373)+_0x4f2768[_0x3432b2(0x10a)],_0x3432b2(0x2ee));}let _0x1e979a;try{_0x1e979a=_0x5b0f93[_0x3432b2(0x17e)](null,_0x714545[_0x3432b2(0x12e)],_0x1e2ff9[_0x3432b2(0x3c1)],_0x714545[_0x3432b2(0x3b4)]);}catch(_0x4c3617){throw new _0x2be7b6('License\x20signature\x20invalid:\x20'+_0x4c3617[_0x3432b2(0x10a)],_0x3432b2(0x2ee));}if(!_0x1e979a)throw new _0x2be7b6(_0x3432b2(0x262)+(_0x3432b2(0x2c3)+_0x1e2ff9['PUB_FINGERPRINT']+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x3432b2(0x2ee),{'expectedFingerprint':_0x1e2ff9[_0x3432b2(0x233)]});if(_0x714545[_0x3432b2(0x2e7)][_0x3432b2(0x156)]===_0x456e0d){const _0xe4af49=_0x714545[_0x3432b2(0x2e7)][_0x3432b2(0x230)]-_0x714545[_0x3432b2(0x2e7)][_0x3432b2(0x36a)];if(_0xe4af49>_0xa5ee56)throw new _0x2be7b6(_0x3432b2(0x235)+Math['ceil'](_0xe4af49/(0x1e*0x5265c00))+_0x3432b2(0x29d),_0x3432b2(0x2ee));}const _0x3e56d7=this[_0x3432b2(0x204)][_0x3432b2(0x129)];await _0x26fc37(_0x3e56d7);const _0xf4ed6e=_0x4f1d2a[_0x3432b2(0x120)](_0x714545[_0x3432b2(0x2f2)])[_0x3432b2(0x125)]('hex');for(const {value:_0x3ef04b}of _0x3e56d7['getRange'](_0x38a7a1)){if(_0x3ef04b[_0x3432b2(0x1bc)]===_0xf4ed6e)throw new _0x2be7b6(_0x3432b2(0x2de),_0x3432b2(0x2ee));}const _0xdb5589=_0x5b0f93[_0x3432b2(0x141)](),_0x28e5ea={'blob':_0xae305a,'activation':null,'addedAt':Date[_0x3432b2(0x1c3)](),'_licenseHash':_0xf4ed6e,'licensee':_0x714545[_0x3432b2(0x2e7)][_0x3432b2(0x310)],'expiresAt':_0x714545[_0x3432b2(0x2e7)]['expiresAt'],'features':_0x714545[_0x3432b2(0x2e7)][_0x3432b2(0x34c)],'limits':_0x714545[_0x3432b2(0x2e7)][_0x3432b2(0x2f6)],'licenseType':_0x714545['decoded'][_0x3432b2(0x156)]};return await _0x3e56d7[_0x3432b2(0x352)](_0x38a7a1,_0xdb5589,_0x28e5ea),{'id':_0xdb5589,..._0x28e5ea};}async[_0x5b89ba(0x19f)](_0x33503b){const _0x5a9d3d=_0x5b89ba;let _0x2e4c5f;try{_0x2e4c5f=_0x4f1d2a[_0x5a9d3d(0x3bc)](_0x33503b);}catch(_0x4015e6){throw new _0x2be7b6(_0x5a9d3d(0x220)+_0x4015e6['message'],'LICENSE_ACTIVATION_INVALID');}const _0x4a9cbc=_0x2e4c5f[_0x5a9d3d(0x120)]['toString'](_0x5a9d3d(0x139)),_0x6a9a24=this[_0x5a9d3d(0x204)][_0x5a9d3d(0x129)];if(!_0x6a9a24||!_0x6a9a24['hasType'](_0x38a7a1))throw new _0x2be7b6('No\x20license\x20found\x20matching\x20this\x20activation\x20token','LICENSE_ACTIVATION_INVALID');let _0x271167=null,_0x1dd5cd=null;for(const {key:_0x4156c3,value:_0x4935a8}of _0x6a9a24['getRange'](_0x38a7a1)){if(_0x4935a8[_0x5a9d3d(0x1bc)]===_0x4a9cbc){_0x271167=_0x4156c3,_0x1dd5cd=_0x4935a8;break;}}if(!_0x271167)throw new _0x2be7b6(_0x5a9d3d(0x1c1),_0x5a9d3d(0x20b));const {rawBuf:_0x4fd12e}=_0x4f1d2a[_0x5a9d3d(0x2f0)](_0x1dd5cd[_0x5a9d3d(0x271)]),_0x3d15a5=_0x4f1d2a['verifyActivation']({'tokenString':_0x33503b,'nodeId':this[_0x5a9d3d(0x204)]['id'],'rawBlobBuf':_0x4fd12e,'pubKeyPem':_0x1e2ff9['PUBLIC_KEY_PEM'],'pubFingerprint':_0x1e2ff9['PUB_FINGERPRINT']});if(!_0x3d15a5[_0x5a9d3d(0x207)])throw new _0x2be7b6(_0x5a9d3d(0x38d)+_0x3d15a5[_0x5a9d3d(0x265)],_0x5a9d3d(0x20b),{'reason':_0x3d15a5[_0x5a9d3d(0x265)]});const _0xb77dff={..._0x1dd5cd,'activation':_0x33503b};return await _0x6a9a24[_0x5a9d3d(0x259)](_0x38a7a1,_0x271167,_0xb77dff),{'id':_0x271167,..._0xb77dff};}async[_0x5b89ba(0x1a1)](_0x47b49f){const _0x182ffe=_0x5b89ba,_0x32f66c=this[_0x182ffe(0x204)][_0x182ffe(0x129)];if(!_0x32f66c||!_0x32f66c[_0x182ffe(0x228)](_0x38a7a1))return;await _0x32f66c['remove'](_0x38a7a1,_0x47b49f);}async['listLicenses'](){const _0x158cfa=_0x5b89ba,_0x8daed7=this['okdb'][_0x158cfa(0x129)];if(!_0x8daed7||!_0x8daed7['hasType'](_0x38a7a1))return[];const _0x5d6a23=this[_0x158cfa(0x204)]['id'],_0x4bdea5=[];for(const {key:_0x37cf66,value:_0x577dc0}of _0x8daed7[_0x158cfa(0x1ff)](_0x38a7a1)){const _0x33717b=this[_0x158cfa(0x305)](_0x577dc0,_0x5d6a23);_0x4bdea5['push']({..._0x577dc0,'id':_0x37cf66,'status':_0x33717b});}return _0x4bdea5;}[_0x5b89ba(0x219)](){const _0x1b2dc2=_0x5b89ba,_0x70aba8=this[_0x1b2dc2(0x204)][_0x1b2dc2(0x129)];if(!_0x70aba8||!_0x70aba8[_0x1b2dc2(0x228)](_0x38a7a1))return[];const _0x240483=this['okdb']['id'],_0x3bf97d=[];for(const {key:_0xcd4864,value:_0x177e45}of _0x70aba8[_0x1b2dc2(0x1ff)](_0x38a7a1)){if(_0x177e45[_0x1b2dc2(0x1bc)]){if(_0x177e45[_0x1b2dc2(0x156)]===_0x456e0d)_0x3bf97d[_0x1b2dc2(0x3c8)]({'licenseId':_0xcd4864,'pin':null});else{const _0x3022db=Buffer[_0x1b2dc2(0x33a)](_0x177e45[_0x1b2dc2(0x1bc)],_0x1b2dc2(0x139)),{pin:_0x1b6429}=_0x4f1d2a[_0x1b2dc2(0x28b)](_0x240483,_0x3022db,_0x1e2ff9[_0x1b2dc2(0x233)]);_0x3bf97d[_0x1b2dc2(0x3c8)]({'licenseId':_0xcd4864,'pin':_0x1b6429});}}}return _0x3bf97d;}async[_0x5b89ba(0x144)](){const _0x130985=_0x5b89ba,_0x3e2d5f=this[_0x130985(0x112)];await this['reload']();if(this[_0x130985(0x112)]&&this[_0x130985(0x112)][_0x130985(0x156)]===_0x456e0d){const _0x254c46=Math[_0x130985(0x232)]((this['_active'][_0x130985(0x230)]-Date[_0x130985(0x1c3)]())/0x5265c00);this[_0x130985(0x204)][_0x130985(0x126)]?.[_0x130985(0x3e0)](_0x130985(0x2c0)+_0x254c46+_0x130985(0x2ff),{'feature':_0x130985(0x28c),'licensee':this[_0x130985(0x112)][_0x130985(0x310)],'expiresAt':new Date(this[_0x130985(0x112)][_0x130985(0x230)])['toISOString']()});}this[_0x130985(0x112)]&&this['_active'][_0x130985(0x156)]===_0xa662e4&&this[_0x130985(0x204)][_0x130985(0x126)]?.[_0x130985(0x3e0)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x130985(0x28c),'licensee':this['_active']['licensee']});if(_0x3e2d5f&&!this[_0x130985(0x112)]){this[_0x130985(0x204)][_0x130985(0x126)]?.[_0x130985(0x3e0)]('License\x20expired\x20or\x20invalidated',{'feature':_0x130985(0x28c)}),this[_0x130985(0x204)]['events']?.[_0x130985(0x19e)](_0x330adb['LICENSE_INVALID'],{'previous':_0x3e2d5f});const _0x1190ee=this[_0x130985(0x204)][_0x130985(0x23f)]?.[_0x130985(0x3e8)]??_0x1e2ff9['LICENSE_EXPIRED_ACTION'];_0x1190ee===_0x130985(0x153)&&(this['okdb']['log']?.[_0x130985(0x33c)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':'license'}),this[_0x130985(0x204)][_0x130985(0x199)]()[_0x130985(0x1c6)](()=>{})[_0x130985(0x383)](()=>process[_0x130985(0x377)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x553e46,'_C':_0x1e2ff9},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x18ab97=_0x3f2430;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x1ab16c=require$$0$2,_0x22b295=require$$1,_0x123acf=require$$2$1,_0x29e34b=require$$1$1,_0x5ddc9e=_0x29e34b['join'](_0x123acf[_0x18ab97(0x1e8)](),'.kdb_history'),_0x3966e7=0x3e8,_0x23104a={'reset':_0x18ab97(0x16b),'bold':_0x18ab97(0x191),'dim':_0x18ab97(0x2f7),'red':_0x18ab97(0x25c),'green':'\x1b[32m','yellow':_0x18ab97(0x12b),'blue':_0x18ab97(0x118),'magenta':_0x18ab97(0x210),'cyan':_0x18ab97(0x1c8),'white':_0x18ab97(0x2a3),'gray':'\x1b[90m'},_0x48ce0c=!process['stdout'][_0x18ab97(0x1d2)]||!!process.env.NO_COLOR,_0x1cdc15=(_0x229d86,_0x1ae1e6)=>_0x48ce0c?_0x1ae1e6:''+_0x229d86+_0x1ae1e6+_0x23104a[_0x18ab97(0x1d7)],_0x1fff08={'error':_0x23104a[_0x18ab97(0x21b)],'warn':_0x23104a[_0x18ab97(0x1f4)],'info':_0x23104a[_0x18ab97(0x1fd)],'debug':_0x23104a[_0x18ab97(0x39d)]},_0x596a76={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x2d3514(_0x42b9a6,_0x384852=_0x18ab97(0x363)){const _0x2f236c=_0x18ab97,{level:_0x293ad2,msg:_0x5e977c,meta:_0x35e4c3,context:_0x5ccd3f,ts:_0x2b274f}=_0x42b9a6;if((_0x596a76[_0x293ad2]??0x1)<(_0x596a76[_0x384852]??0x1))return;const _0x2d0cfa=_0x1cdc15(_0x23104a['gray'],new Date(_0x2b274f)['toISOString']()),_0x3a95f8=_0x1cdc15(_0x1fff08[_0x293ad2]??_0x23104a['white'],_0x293ad2[_0x2f236c(0x18f)](0x5));let _0x11c091='\x20\x20'+_0x2d0cfa+'\x20'+_0x1cdc15(_0x23104a[_0x2f236c(0x395)],_0x3a95f8)+'\x20'+_0x5e977c;if(_0x35e4c3&&Object['keys'](_0x35e4c3)['length']>0x0){const _0x2c6f9a=Object[_0x2f236c(0x316)](_0x35e4c3)['map'](([_0x40d334,_0x23a5a3])=>_0x40d334+'='+_0x23a5a3)[_0x2f236c(0x1e3)]('\x20');_0x11c091+=_0x1cdc15(_0x23104a[_0x2f236c(0x103)],'\x20\x20['+_0x2c6f9a+']');}if(_0x5ccd3f!==undefined){const _0x512b70=typeof _0x5ccd3f==='object'?JSON['stringify'](_0x5ccd3f):String(_0x5ccd3f);_0x11c091+=_0x1cdc15(_0x23104a[_0x2f236c(0x103)],'\x20\x20'+_0x512b70);}const _0x42ce9c=_0x293ad2===_0x2f236c(0x33c)||_0x293ad2===_0x2f236c(0x3e0)?process[_0x2f236c(0x317)][_0x2f236c(0x2d9)][_0x2f236c(0x110)](process[_0x2f236c(0x317)]):process['stdout']['write'][_0x2f236c(0x110)](process['stdout']);_0x42ce9c(_0x11c091+'\x0a');}function _0x1f3cbe(_0x41a03f,_0x514c30){const _0x5068c1=_0x18ab97;if(_0x41a03f===0xcc||_0x41a03f>=0xc8&&_0x41a03f<0x12c&&!_0x514c30){console[_0x5068c1(0x126)](_0x5068c1(0x200)+_0x1cdc15(_0x23104a[_0x5068c1(0x31f)],'✓')+'\x0a');return;}if(_0x41a03f>=0x190||_0x514c30?.[_0x5068c1(0x33c)]){const _0x3ed12b=_0x514c30?.['error']??_0x514c30?.[_0x5068c1(0x10a)]??'HTTP\x20'+_0x41a03f;console[_0x5068c1(0x126)](_0x5068c1(0x200)+_0x1cdc15(_0x23104a['red'],'✗')+'\x20'+_0x1cdc15(_0x23104a[_0x5068c1(0x395)]+_0x23104a[_0x5068c1(0x21b)],String(_0x41a03f))+'\x20\x20'+_0x3ed12b+'\x0a');return;}const _0x24afd8=Object['prototype'][_0x5068c1(0x338)]['call'](_0x514c30??{},_0x5068c1(0xf9))?_0x514c30[_0x5068c1(0xf9)]:_0x514c30,_0x52241f=_0x514c30?.[_0x5068c1(0x274)];console['log'](''),_0x4cf735(_0x24afd8,'\x20\x20');if(_0x52241f?.[_0x5068c1(0x303)]!=null||_0x52241f?.['time']!=null){const _0x14ba9e=[];if(_0x52241f[_0x5068c1(0x303)]!=null)_0x14ba9e[_0x5068c1(0x3c8)](_0x52241f['count']+'\x20result'+(_0x52241f['count']!==0x1?'s':''));if(_0x52241f[_0x5068c1(0x282)]!=null)_0x14ba9e[_0x5068c1(0x3c8)](_0x52241f[_0x5068c1(0x282)]+'ms');console[_0x5068c1(0x126)](_0x5068c1(0x200)+_0x1cdc15(_0x23104a['dim'],_0x14ba9e[_0x5068c1(0x1e3)](_0x5068c1(0x3ed))));}console[_0x5068c1(0x126)]('');}function _0x4cf735(_0x117f07,_0xf43857=''){const _0xed8572=_0x18ab97;if(_0x117f07===null||_0x117f07===undefined){console[_0xed8572(0x126)](_0xf43857+_0x1cdc15(_0x23104a['dim'],'(null)'));return;}if(Array['isArray'](_0x117f07)){if(_0x117f07['length']===0x0){console[_0xed8572(0x126)](_0xf43857+_0x1cdc15(_0x23104a['dim'],_0xed8572(0x256)));return;}if(_0x117f07['every'](_0x27ce2b=>_0x27ce2b&&typeof _0x27ce2b==='object'&&_0xed8572(0x1ec)in _0x27ce2b&&_0xed8572(0x17b)in _0x27ce2b)){_0x433c82(_0x117f07,_0xf43857);return;}if(_0x117f07[_0xed8572(0x391)](_0x1c3c86=>_0x1c3c86&&typeof _0x1c3c86===_0xed8572(0x32d)&&_0xed8572(0x1d3)in _0x1c3c86&&'count'in _0x1c3c86)){_0x39807f(_0x117f07,_0xf43857);return;}if(_0x117f07[_0xed8572(0x391)](_0x53393c=>typeof _0x53393c!==_0xed8572(0x32d)||_0x53393c===null)){_0x117f07[_0xed8572(0x1be)]((_0x95a851,_0x494797)=>console['log'](_0xf43857+_0x1cdc15(_0x23104a['gray'],_0x494797+0x1+'.')+'\x20'+_0x1cdc15(_0x23104a['white'],String(_0x95a851))));return;}_0x117f07[_0xed8572(0x1be)]((_0x13e163,_0x34a804)=>{const _0x5afc8e=_0xed8572;console['log'](_0xf43857+_0x1cdc15(_0x23104a[_0x5afc8e(0x103)],'['+_0x34a804+']'));if(typeof _0x13e163===_0x5afc8e(0x32d)&&_0x13e163!==null)_0x2ea36b(_0x13e163,_0xf43857+'\x20\x20');else console['log'](_0xf43857+'\x20\x20'+String(_0x13e163));});return;}if(typeof _0x117f07===_0xed8572(0x32d)){if('key'in _0x117f07&&_0xed8572(0x17b)in _0x117f07&&Object[_0xed8572(0x2cb)](_0x117f07)['length']<=0x3){console[_0xed8572(0x126)](_0xf43857+_0x1cdc15(_0x23104a[_0xed8572(0x395)]+_0x23104a[_0xed8572(0x1fd)],String(_0x117f07[_0xed8572(0x1ec)])));const _0x38c877=_0x117f07['value'];if(_0x38c877&&typeof _0x38c877==='object')_0x2ea36b(_0x38c877,_0xf43857);else console[_0xed8572(0x126)](_0xf43857+_0x1cdc15(_0x23104a[_0xed8572(0x2b3)],String(_0x38c877)));return;}_0x2ea36b(_0x117f07,_0xf43857);return;}console[_0xed8572(0x126)](_0xf43857+_0x1cdc15(_0x23104a['white'],String(_0x117f07)));}function _0x2ea36b(_0x50514b,_0x5c2035=''){const _0x5ae718=_0x18ab97,_0x242a8f=Object[_0x5ae718(0x316)](_0x50514b);if(_0x242a8f[_0x5ae718(0x369)]===0x0){console['log'](_0x5c2035+_0x1cdc15(_0x23104a['dim'],'{}'));return;}const _0x2dfaa8=Math[_0x5ae718(0x1cd)](0x1c,Math['max'](..._0x242a8f[_0x5ae718(0x1b2)](([_0x37cf4b])=>_0x37cf4b[_0x5ae718(0x369)])));for(const [_0x5ec558,_0x62ae33]of _0x242a8f){const _0x492c03=_0x1cdc15(_0x23104a[_0x5ae718(0x1fd)],_0x5ec558[_0x5ae718(0x18f)](_0x2dfaa8));if(_0x62ae33===null||_0x62ae33===undefined)console[_0x5ae718(0x126)](_0x5c2035+_0x492c03+'\x20\x20'+_0x1cdc15(_0x23104a['dim'],'null'));else{if(typeof _0x62ae33===_0x5ae718(0x32d)){const _0x4ca3aa=JSON['stringify'](_0x62ae33);_0x4ca3aa[_0x5ae718(0x369)]<=0x50?console['log'](_0x5c2035+_0x492c03+'\x20\x20'+_0x1cdc15(_0x23104a[_0x5ae718(0x103)],_0x4ca3aa)):(console[_0x5ae718(0x126)](_0x5c2035+_0x492c03),_0x4cf735(_0x62ae33,_0x5c2035+'\x20\x20'));}else{const _0x12fc9c=typeof _0x62ae33==='boolean'?_0x1cdc15(_0x62ae33?_0x23104a[_0x5ae718(0x31f)]:_0x23104a[_0x5ae718(0x1f4)],String(_0x62ae33)):typeof _0x62ae33===_0x5ae718(0x357)?_0x1cdc15(_0x23104a[_0x5ae718(0x249)],String(_0x62ae33)):_0x1cdc15(_0x23104a[_0x5ae718(0x2b3)],String(_0x62ae33));console[_0x5ae718(0x126)](_0x5c2035+_0x492c03+'\x20\x20'+_0x12fc9c);}}}}function _0x433c82(_0x4ffedd,_0x4ee09f=''){const _0x14f78e=_0x18ab97,_0x1b1491=Math['min'](0x20,Math[_0x14f78e(0x1e5)](..._0x4ffedd[_0x14f78e(0x1b2)](_0x1df76b=>String(_0x1df76b[_0x14f78e(0x1ec)])[_0x14f78e(0x369)])));for(const {key:_0xe973d5,value:_0x5dcf46,score:_0x14d7d1,clock:_0x546238}of _0x4ffedd){const _0x531862=_0x1cdc15(_0x23104a[_0x14f78e(0x395)]+_0x23104a['cyan'],String(_0xe973d5)[_0x14f78e(0x18f)](_0x1b1491)),_0x43bc7d=_0x5dcf46==null?_0x1cdc15(_0x23104a['dim'],_0x14f78e(0x254)):typeof _0x5dcf46==='object'?_0x1cdc15(_0x23104a[_0x14f78e(0x103)],JSON[_0x14f78e(0x3b8)](_0x5dcf46)):_0x1cdc15(_0x23104a['white'],String(_0x5dcf46)),_0x58bdbe=_0x14d7d1!=null?_0x1cdc15(_0x23104a[_0x14f78e(0x39d)],_0x14f78e(0x374)+_0x14d7d1['toFixed'](0x4)):'',_0xb49166=_0x546238!=null?_0x1cdc15(_0x23104a[_0x14f78e(0x39d)],'\x20\x20@'+_0x546238):'';console[_0x14f78e(0x126)](_0x4ee09f+_0x531862+'\x20\x20'+_0x43bc7d+_0x58bdbe+_0xb49166);}}function _0x39807f(_0x4e89ed,_0x138839=''){const _0x5037c2=_0x18ab97,_0x10c0ea=Math[_0x5037c2(0x1cd)](0x20,Math['max'](..._0x4e89ed[_0x5037c2(0x1b2)](_0x220ef5=>_0x220ef5[_0x5037c2(0x1d3)][_0x5037c2(0x369)])));for(const {type:_0x504e1a,count:_0x277a5f,fields:_0x34ba63}of _0x4e89ed){if(_0x504e1a[_0x5037c2(0x13b)]('~'))continue;const _0x151099=_0x1cdc15(_0x23104a[_0x5037c2(0x395)]+_0x23104a[_0x5037c2(0x1fd)],_0x504e1a[_0x5037c2(0x18f)](_0x10c0ea)),_0x3e3ad4=_0x1cdc15(_0x23104a[_0x5037c2(0x249)],String(_0x277a5f)['padStart'](0x6))+_0x1cdc15(_0x23104a[_0x5037c2(0x103)],'\x20records'),_0x4b97f5=_0x34ba63&&Object['keys'](_0x34ba63)[_0x5037c2(0x369)]?_0x1cdc15(_0x23104a[_0x5037c2(0x103)],_0x5037c2(0x2bf)+Object['keys'](_0x34ba63)[_0x5037c2(0x343)](0x0,0x6)[_0x5037c2(0x1e3)](',\x20')+(Object['keys'](_0x34ba63)[_0x5037c2(0x369)]>0x6?'…':'')):'';console[_0x5037c2(0x126)](_0x138839+_0x151099+'\x20\x20'+_0x3e3ad4+_0x4b97f5);}}const _0x24bbeb=[_0x18ab97(0x183),_0x18ab97(0x206),'queue/',_0x18ab97(0x1c5),_0x18ab97(0x273),_0x18ab97(0x2bb)];function _0x2b2bd2(_0x2e076f,_0x24085e){const _0xaf75e7=_0x18ab97;if(_0x2e076f[_0xaf75e7(0x13b)](_0xaf75e7(0x36c)))return _0x2e076f;if(_0x2e076f[_0xaf75e7(0x13b)]('/'))return'/api'+_0x2e076f;if(_0x2e076f[_0xaf75e7(0x13b)](_0xaf75e7(0x278)))return _0xaf75e7(0x36c)+_0x2e076f;const _0xdf4898=_0x24bbeb[_0xaf75e7(0x1bb)](_0x478e51=>_0x2e076f===_0x478e51[_0xaf75e7(0x320)](/\/$/,'')||_0x2e076f['startsWith'](_0x478e51));return _0xdf4898?'/api/env/'+_0x24085e+'/'+_0x2e076f:_0xaf75e7(0x36c)+_0x2e076f;}function _0x3a34e7(_0x3f90c9){const _0x4ab87c=_0x18ab97,_0x3aa175={},_0xb0b30a=[];let _0x52cf9d=0x0;while(_0x52cf9d<_0x3f90c9[_0x4ab87c(0x369)]){if((_0x3f90c9[_0x52cf9d]===_0x4ab87c(0xfa)||_0x3f90c9[_0x52cf9d]==='-e')&&_0x3f90c9[_0x52cf9d+0x1]&&!_0x3f90c9[_0x52cf9d+0x1]['startsWith']('-'))_0x3aa175[_0x4ab87c(0x100)]=_0x3f90c9[++_0x52cf9d];else _0x3f90c9[_0x52cf9d]===_0x4ab87c(0x1dd)||_0x3f90c9[_0x52cf9d]==='-h'?_0x3aa175['help']=!![]:_0xb0b30a[_0x4ab87c(0x3c8)](_0x3f90c9[_0x52cf9d]);_0x52cf9d++;}return{'flags':_0x3aa175,'rest':_0xb0b30a};}const _0x4f021e={'system':_0x18ab97(0x172),'envs':_0x18ab97(0x22e),'types':_0x18ab97(0x2dc),'data':'Records','indexes':'Indexes','fts':_0x18ab97(0x337),'sync':_0x18ab97(0x35a),'queue':_0x18ab97(0x1b6),'files':'Files','embeddings':_0x18ab97(0x2ba),'engines':_0x18ab97(0x164),'admin':_0x18ab97(0x31a),'event':_0x18ab97(0x3d5),'processor':'Processors'},_0xd45f0=[_0x18ab97(0x33d),'envs',_0x18ab97(0x183),'data',_0x18ab97(0x37f),'fts',_0x18ab97(0x3c3),_0x18ab97(0x19a),_0x18ab97(0x283),'embeddings','engines','admin'];function _0x3785d2(_0x17c3bf){const _0x4de69c=_0x18ab97;return _0x17c3bf[_0x4de69c(0x320)](/^\/api/,'')[_0x4de69c(0x320)](/^\[\/env\/:env=[^\]]*\]/,_0x4de69c(0x21c))[_0x4de69c(0x320)](/^\/env\/:env/,_0x4de69c(0x1d5))[_0x4de69c(0x320)](/^\//,'');}function _0x4a8792(_0xd0098e,_0x22c974=''){const _0x3e2808=_0x18ab97,_0x4ccd7b=_0xd0098e[_0x3e2808(0x3e2)][_0x3e2808(0x308)]()[_0x3e2808(0x218)](_0x550bdf=>!_0x550bdf['meta']?.['hidden']),_0xdfc92=_0x22c974?_0x4ccd7b[_0x3e2808(0x218)](_0x345666=>_0x345666['path'][_0x3e2808(0x11e)]()['includes'](_0x22c974[_0x3e2808(0x11e)]())||(_0x210a22(_0x345666)??'')[_0x3e2808(0x11e)]()[_0x3e2808(0x147)](_0x22c974['toLowerCase']())||_0x270c7c(_0x345666)[_0x3e2808(0x1bb)](_0x242df9=>_0x242df9[_0x3e2808(0x11e)]()['includes'](_0x22c974['toLowerCase']()))):_0x4ccd7b;if(!_0xdfc92[_0x3e2808(0x369)]){console[_0x3e2808(0x126)](_0x1cdc15(_0x23104a['yellow'],_0x3e2808(0x15d)+_0x22c974+'\x22\x0a'));return;}const _0x26e677=new Map();for(const _0x5b79c7 of _0xdfc92){const _0x47d4dc=_0x270c7c(_0x5b79c7)[0x0]??_0x3e2808(0x1d8);if(!_0x26e677[_0x3e2808(0x32a)](_0x47d4dc))_0x26e677[_0x3e2808(0x291)](_0x47d4dc,[]);_0x26e677['get'](_0x47d4dc)[_0x3e2808(0x3c8)](_0x5b79c7);}const _0x58a213=[..._0xd45f0[_0x3e2808(0x218)](_0x42bd4d=>_0x26e677[_0x3e2808(0x32a)](_0x42bd4d)),...[..._0x26e677[_0x3e2808(0x2cb)]()][_0x3e2808(0x218)](_0x3584e7=>!_0xd45f0['includes'](_0x3584e7))];console[_0x3e2808(0x126)]('');for(const _0x593bbb of _0x58a213){const _0x3751d1=_0x26e677[_0x3e2808(0x288)](_0x593bbb);if(!_0x3751d1?.[_0x3e2808(0x369)])continue;console[_0x3e2808(0x126)](_0x1cdc15(_0x23104a[_0x3e2808(0x395)],'\x20\x20'+(_0x4f021e[_0x593bbb]??_0x593bbb)));for(const _0x12809b of _0x3751d1){const _0x1accf0=_0x1cdc15(_0x23104a[_0x3e2808(0x249)],_0x12809b[_0x3e2808(0x3c9)]['padEnd'](0x7)),_0x23ea0e=_0x1cdc15(_0x23104a[_0x3e2808(0x1fd)],_0x3785d2(_0x12809b['path'])),_0x33b7d2=_0x210a22(_0x12809b)?_0x1cdc15(_0x23104a[_0x3e2808(0x103)],'\x20\x20'+_0x210a22(_0x12809b)):'',_0x33e145=_0x12809b[_0x3e2808(0x3b7)]?.['id']?_0x1cdc15(_0x23104a[_0x3e2808(0x39d)],_0x3e2808(0x22f)+_0x12809b[_0x3e2808(0x3b7)]['id']+']'):'';console[_0x3e2808(0x126)]('\x20\x20\x20\x20'+_0x1accf0+'\x20'+_0x23ea0e+_0x33b7d2+_0x33e145);}console['log']('');}}function _0x1f2307(_0xb922fa,_0x280241){const _0x4feafa=_0x18ab97,_0x550e91=_0x280241[_0x4feafa(0x320)](/^\/api(\/env\/[^/]+)?\//,'')[_0x4feafa(0x2ae)]('/')[0x0],_0x6ff072=_0xb922fa[_0x4feafa(0x3e2)]['listRoutes']()[_0x4feafa(0x218)](_0x20bc72=>_0x20bc72[_0x4feafa(0x217)]['toLowerCase']()[_0x4feafa(0x147)](_0x550e91[_0x4feafa(0x11e)]()));if(!_0x6ff072['length']){console[_0x4feafa(0x126)](_0x1cdc15(_0x23104a[_0x4feafa(0x1f4)],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x280241+'\x0a'));return;}console[_0x4feafa(0x126)]('');for(const _0x465be7 of _0x6ff072[_0x4feafa(0x343)](0x0,0xc)){for(const _0x21faac of _0x14fc66(_0x465be7)){console['log'](_0x21faac);}console[_0x4feafa(0x126)]('');}}function _0x210a22(_0x234379){const _0x28f4d1=_0x18ab97;return _0x234379[_0x28f4d1(0x3b7)]?.[_0x28f4d1(0x163)]??_0x234379[_0x28f4d1(0x274)]?.['summary']??'';}function _0x53f627(_0x1e73a3){const _0x1b2648=_0x18ab97;return _0x1e73a3[_0x1b2648(0x3b7)]?.[_0x1b2648(0x397)]??_0x1e73a3['meta']?.[_0x1b2648(0x397)]??'';}function _0x270c7c(_0x2a8e85){const _0x5a2ad7=_0x18ab97;return _0x2a8e85['operation']?.[_0x5a2ad7(0x3f8)]?.[_0x5a2ad7(0x369)]?_0x2a8e85['operation'][_0x5a2ad7(0x3f8)]:_0x2a8e85[_0x5a2ad7(0x274)]?.[_0x5a2ad7(0x3f8)]??[];}function _0x14fc66(_0x15287b){const _0x416674=_0x18ab97,_0x2dd02f=[];_0x2dd02f['push']('\x20\x20'+_0x1cdc15(_0x23104a[_0x416674(0x395)]+_0x23104a[_0x416674(0x249)],_0x15287b[_0x416674(0x3c9)][_0x416674(0x18f)](0x7))+'\x20'+_0x1cdc15(_0x23104a[_0x416674(0x395)]+_0x23104a[_0x416674(0x1fd)],_0x15287b[_0x416674(0x217)]));_0x15287b[_0x416674(0x3b7)]?.['id']&&_0x2dd02f[_0x416674(0x3c8)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1cdc15(_0x23104a[_0x416674(0x39d)],'id:\x20'+_0x15287b[_0x416674(0x3b7)]['id']));_0x210a22(_0x15287b)&&_0x2dd02f[_0x416674(0x3c8)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1cdc15(_0x23104a[_0x416674(0x2b3)],_0x210a22(_0x15287b)));_0x53f627(_0x15287b)&&_0x2dd02f[_0x416674(0x3c8)](_0x416674(0x21a)+_0x1cdc15(_0x23104a[_0x416674(0x103)],_0x53f627(_0x15287b)));_0x270c7c(_0x15287b)[_0x416674(0x369)]&&_0x2dd02f[_0x416674(0x3c8)](_0x416674(0x21a)+_0x1cdc15(_0x23104a[_0x416674(0x39d)],_0x416674(0x184)+_0x270c7c(_0x15287b)[_0x416674(0x1e3)](',\x20')));_0x15287b['operation']?.['safety']?.['access']&&_0x2dd02f[_0x416674(0x3c8)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1cdc15(_0x23104a[_0x416674(0x39d)],_0x416674(0x1b9)+_0x15287b[_0x416674(0x3b7)][_0x416674(0x234)][_0x416674(0x1ca)]));_0x15287b[_0x416674(0x3b7)]?.[_0x416674(0x3e2)]?.['transport']&&_0x15287b[_0x416674(0x3b7)][_0x416674(0x3e2)][_0x416674(0x2d0)]!==_0x416674(0x3cc)&&_0x2dd02f['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1cdc15(_0x23104a['gray'],_0x416674(0xff)+_0x15287b[_0x416674(0x3b7)][_0x416674(0x3e2)][_0x416674(0x2d0)]));if(_0x15287b[_0x416674(0x3b7)]?.[_0x416674(0x306)]){const _0x251cbe=Object[_0x416674(0x2cb)](_0x15287b[_0x416674(0x3b7)][_0x416674(0x306)][_0x416674(0x3a2)]||{});if(_0x251cbe['length'])_0x2dd02f[_0x416674(0x3c8)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1cdc15(_0x23104a[_0x416674(0x39d)],'input:\x20'+_0x251cbe[_0x416674(0x1e3)](',\x20')));}return _0x15287b[_0x416674(0x274)]?.[_0x416674(0x3dc)]&&_0x2dd02f[_0x416674(0x3c8)](_0x416674(0x21a)+_0x1cdc15(_0x23104a[_0x416674(0x39d)],_0x416674(0x35f)+JSON['stringify'](_0x15287b['meta']['body']))),_0x2dd02f;}async function _0x3e3ca1(_0x658f4,_0x1bdff0,_0x5662dc,_0x203f19=null){const _0x4576c6=_0x18ab97,_0x2f86d1=_0x5662dc[_0x4576c6(0x302)]('?'),_0xa8a1d0=_0x2f86d1>=0x0?_0x5662dc['slice'](0x0,_0x2f86d1):_0x5662dc,_0x353bcf=_0x2f86d1>=0x0?_0x5662dc[_0x4576c6(0x343)](_0x2f86d1+0x1):'',_0x1eed77=Object[_0x4576c6(0x22c)](new URLSearchParams(_0x353bcf)[_0x4576c6(0x316)]());return _0x658f4[_0x4576c6(0x3e2)][_0x4576c6(0x3a0)](_0x1bdff0,_0xa8a1d0,{'body':_0x203f19,'query':_0x1eed77,'headers':{'content-type':_0x4576c6(0x2c1)}},{'internal':!![]});}function _0x4bdb26(_0x3fc2dc){const _0x5b6c62=_0x18ab97;if(!_0x3fc2dc)return null;const _0x14c2bb=_0x3fc2dc[_0x5b6c62(0x201)]();if(!_0x14c2bb)return null;try{return JSON[_0x5b6c62(0x11b)](_0x14c2bb);}catch{}try{return JSON['parse'](_0x22d128(_0x14c2bb));}catch(_0x40ba42){throw new SyntaxError(_0x40ba42[_0x5b6c62(0x10a)],{'cause':_0x40ba42});}}function _0x22d128(_0x7d6a84){const _0x272f9c=_0x18ab97;let _0x1629d1='',_0x5e8c4d=0x0;while(_0x5e8c4d<_0x7d6a84[_0x272f9c(0x369)]){const _0x1c7cf1=_0x7d6a84[_0x5e8c4d];if(_0x1c7cf1==='\x22'){_0x1629d1+='\x22',_0x5e8c4d++;while(_0x5e8c4d<_0x7d6a84[_0x272f9c(0x369)]&&_0x7d6a84[_0x5e8c4d]!=='\x22'){if(_0x7d6a84[_0x5e8c4d]==='\x5c'){_0x1629d1+=_0x7d6a84[_0x5e8c4d++];if(_0x5e8c4d<_0x7d6a84[_0x272f9c(0x369)])_0x1629d1+=_0x7d6a84[_0x5e8c4d++];}else _0x1629d1+=_0x7d6a84[_0x5e8c4d++];}_0x1629d1+='\x22';if(_0x5e8c4d<_0x7d6a84[_0x272f9c(0x369)])_0x5e8c4d++;continue;}if(_0x1c7cf1==='\x27'){_0x1629d1+='\x22',_0x5e8c4d++;while(_0x5e8c4d<_0x7d6a84['length']&&_0x7d6a84[_0x5e8c4d]!=='\x27'){if(_0x7d6a84[_0x5e8c4d]==='\x5c'&&_0x7d6a84[_0x5e8c4d+0x1]==='\x27')_0x1629d1+='\x27',_0x5e8c4d+=0x2;else _0x7d6a84[_0x5e8c4d]==='\x22'?(_0x1629d1+='\x5c\x22',_0x5e8c4d++):_0x1629d1+=_0x7d6a84[_0x5e8c4d++];}_0x1629d1+='\x22';if(_0x5e8c4d<_0x7d6a84[_0x272f9c(0x369)])_0x5e8c4d++;continue;}if(_0x272f9c(0x301)[_0x272f9c(0x147)](_0x1c7cf1)){_0x1629d1+=_0x1c7cf1,_0x5e8c4d++;continue;}let _0x2fffea='';while(_0x5e8c4d<_0x7d6a84['length']&&!_0x272f9c(0x10c)['includes'](_0x7d6a84[_0x5e8c4d])&&_0x7d6a84[_0x5e8c4d]!=='\x20'&&_0x7d6a84[_0x5e8c4d]!=='\x09'&&_0x7d6a84[_0x5e8c4d]!=='\x0a'&&_0x7d6a84[_0x5e8c4d]!=='\x0d'){_0x2fffea+=_0x7d6a84[_0x5e8c4d++];}let _0x3e5e2a=_0x5e8c4d;while(_0x3e5e2a<_0x7d6a84['length']&&(_0x7d6a84[_0x3e5e2a]==='\x20'||_0x7d6a84[_0x3e5e2a]==='\x09'))_0x3e5e2a++;if(_0x7d6a84[_0x3e5e2a]===':')_0x1629d1+='\x22'+_0x2fffea+'\x22';else _0x2fffea===_0x272f9c(0x202)||_0x2fffea==='false'||_0x2fffea==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x272f9c(0x27d)](_0x2fffea)?_0x1629d1+=_0x2fffea:_0x1629d1+='\x22'+_0x2fffea+'\x22';}return _0x1629d1[_0x272f9c(0x320)](/,(\s*[}\]])/g,'$1');}function _0x43484a(_0x42d291){const _0x570607=_0x18ab97,_0x371d93=[];let _0x4f1cbc=0x0;while(_0x4f1cbc<_0x42d291['length']){while(_0x4f1cbc<_0x42d291[_0x570607(0x369)]&&(_0x42d291[_0x4f1cbc]==='\x20'||_0x42d291[_0x4f1cbc]==='\x09'))_0x4f1cbc++;if(_0x4f1cbc>=_0x42d291[_0x570607(0x369)])break;const _0x273148=_0x42d291[_0x4f1cbc];if(_0x273148==='{'||_0x273148==='['){const _0x4eb868=_0x273148==='{'?'}':']',_0xd19189=_0x4f1cbc++;let _0x4d3666=0x1,_0x5275ad=![],_0x324c3d='';while(_0x4f1cbc<_0x42d291[_0x570607(0x369)]&&_0x4d3666>0x0){const _0x242456=_0x42d291[_0x4f1cbc];if(_0x5275ad){if(_0x242456==='\x5c')_0x4f1cbc++;else{if(_0x242456===_0x324c3d)_0x5275ad=![];}}else{if(_0x242456==='\x22'||_0x242456==='\x27')_0x5275ad=!![],_0x324c3d=_0x242456;else{if(_0x242456===_0x273148)_0x4d3666++;else{if(_0x242456===_0x4eb868)_0x4d3666--;}}}_0x4f1cbc++;}_0x371d93[_0x570607(0x3c8)](_0x42d291[_0x570607(0x343)](_0xd19189,_0x4f1cbc));continue;}if(_0x273148==='\x22'||_0x273148==='\x27'){const _0x5030da=_0x273148;_0x4f1cbc++;let _0x5de568='';while(_0x4f1cbc<_0x42d291['length']&&_0x42d291[_0x4f1cbc]!==_0x5030da){if(_0x42d291[_0x4f1cbc]==='\x5c'&&_0x4f1cbc+0x1<_0x42d291[_0x570607(0x369)])_0x4f1cbc++,_0x5de568+=_0x42d291[_0x4f1cbc++];else _0x5de568+=_0x42d291[_0x4f1cbc++];}if(_0x4f1cbc<_0x42d291[_0x570607(0x369)])_0x4f1cbc++;_0x371d93[_0x570607(0x3c8)](_0x5de568);continue;}let _0x47968c='';while(_0x4f1cbc<_0x42d291['length']&&_0x42d291[_0x4f1cbc]!=='\x20'&&_0x42d291[_0x4f1cbc]!=='\x09'&&_0x42d291[_0x4f1cbc]!=='{'&&_0x42d291[_0x4f1cbc]!=='['){_0x47968c+=_0x42d291[_0x4f1cbc++];}if(_0x47968c)_0x371d93['push'](_0x47968c);}return _0x371d93;}function _0x1ec145(_0x469c99,_0x4733c3){const _0x2b57c5=_0x18ab97,_0x14f293=[..._0x469c99[_0x2b57c5(0x2a9)][_0x2b57c5(0x2cb)]()][_0x2b57c5(0x218)](_0x4c0e8a=>!_0x4c0e8a[_0x2b57c5(0x13b)]('~'));console[_0x2b57c5(0x126)](['',_0x1cdc15(_0x23104a[_0x2b57c5(0x395)]+_0x23104a[_0x2b57c5(0x1fd)],'\x20\x20╔═══════════════════════════╗'),_0x1cdc15(_0x23104a[_0x2b57c5(0x395)]+_0x23104a['cyan'],_0x2b57c5(0x266))+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],_0x2b57c5(0x307))+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)]+_0x23104a[_0x2b57c5(0x1fd)],'║'),_0x1cdc15(_0x23104a[_0x2b57c5(0x395)]+_0x23104a[_0x2b57c5(0x1fd)],_0x2b57c5(0x1d6)),'','\x20\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x31f)],'✓')+'\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],'server')+_0x2b57c5(0x387)+_0x4733c3[_0x2b57c5(0x1a8)],'\x20\x20'+_0x1cdc15(_0x23104a['green'],'✓')+'\x20'+_0x1cdc15(_0x23104a['bold'],_0x2b57c5(0x348))+_0x2b57c5(0xfd)+_0x4733c3[_0x2b57c5(0x1a8)]+'/api','\x20\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x31f)],'✓')+'\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],_0x2b57c5(0x217))+_0x2b57c5(0x2da)+_0x4733c3[_0x2b57c5(0x29f)],'\x20\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x31f)],'✓')+'\x20'+_0x1cdc15(_0x23104a['bold'],'id')+_0x2b57c5(0x356)+_0x1cdc15(_0x23104a['gray'],_0x469c99['id']),'\x20\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x31f)],'✓')+'\x20'+_0x1cdc15(_0x23104a['bold'],_0x2b57c5(0x2d4))+_0x2b57c5(0x2da)+_0x14f293[_0x2b57c5(0x1b2)](_0x22a4b9=>_0x1cdc15(_0x23104a['cyan'],_0x22a4b9))[_0x2b57c5(0x1e3)]('\x20\x20'),..._0x4733c3[_0x2b57c5(0x29b)]?[]:['\x20\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x31f)],'✓')+'\x20'+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],_0x2b57c5(0x353))+'\x20\x20\x20http://localhost:'+_0x4733c3['port']+_0x2b57c5(0x30e)],'',_0x1cdc15(_0x23104a[_0x2b57c5(0x103)],_0x2b57c5(0x2ec)+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],_0x2b57c5(0x3c6))+_0x2b57c5(0xfb)+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],_0x2b57c5(0x160))+_0x2b57c5(0x167)+_0x1cdc15(_0x23104a[_0x2b57c5(0x395)],'exit')+'\x20to\x20quit.'),''][_0x2b57c5(0x1e3)]('\x0a'));}function _0x2fa813(_0x19b9aa){const _0x49b02e=_0x18ab97;console[_0x49b02e(0x126)]('\x0a'+_0x1cdc15(_0x23104a[_0x49b02e(0x395)],'\x20\x20Path\x20access')+'\x20\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x103)],_0x49b02e(0x157))+_0x49b02e(0x108)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],'<path>')+_0x49b02e(0x1a7)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],'<path>')+'\x20'+_0x1cdc15(_0x23104a['yellow'],'<json-body>')+_0x49b02e(0x37e)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],'VERB')+'\x20'+_0x1cdc15(_0x23104a['cyan'],_0x49b02e(0x25b))+'\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x1f4)],_0x49b02e(0x1e4))+_0x49b02e(0x2b7)+_0x1cdc15(_0x23104a[_0x49b02e(0x103)],_0x49b02e(0x2a0))+_0x49b02e(0x134)+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],_0x49b02e(0x363))+_0x49b02e(0x361)+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],_0x49b02e(0x2d4))+_0x49b02e(0x148)+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],_0x49b02e(0x183))+_0x49b02e(0x2bd)+_0x19b9aa[_0x49b02e(0x100)]+_0x49b02e(0x384)+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],'type/users')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x19b9aa[_0x49b02e(0x100)]+'/type/users\x0a\x20\x20\x20\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],_0x49b02e(0x29c))+_0x49b02e(0x24b)+_0x19b9aa['env']+_0x49b02e(0x2f4)+_0x1cdc15(_0x23104a['gray'],_0x49b02e(0x3a1))+'\x20→\x20POST\x20/api/env/'+_0x19b9aa[_0x49b02e(0x100)]+_0x49b02e(0x398)+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],_0x49b02e(0x3f5))+_0x49b02e(0x134)+_0x1cdc15(_0x23104a['gray'],_0x49b02e(0x19d))+_0x49b02e(0x134)+_0x1cdc15(_0x23104a['gray'],_0x49b02e(0x1f8))+_0x49b02e(0x1f5)+_0x1cdc15(_0x23104a[_0x49b02e(0x395)],_0x49b02e(0x166))+'\x20\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x103)],_0x49b02e(0x350))+_0x49b02e(0x108)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],_0x49b02e(0x29e))+_0x49b02e(0x2a2)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],_0x49b02e(0x1dd))+_0x49b02e(0x1cb)+_0x1cdc15(_0x23104a['dim'],_0x49b02e(0x2a0))+_0x49b02e(0x134)+_0x1cdc15(_0x23104a['gray'],_0x49b02e(0x186))+_0x49b02e(0x134)+_0x1cdc15(_0x23104a['gray'],_0x49b02e(0x12f))+_0x49b02e(0x134)+_0x1cdc15(_0x23104a[_0x49b02e(0x39d)],_0x49b02e(0x1fa))+'\x0a\x0a'+_0x1cdc15(_0x23104a['bold'],_0x49b02e(0x30b))+'\x0a\x0a\x20\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],_0x49b02e(0x3e1))+_0x49b02e(0x27c)+_0x1cdc15(_0x23104a['cyan'],_0x49b02e(0x100))+_0x49b02e(0x3ad)+_0x1cdc15(_0x23104a['cyan'],_0x49b02e(0x160))+'\x20'+_0x1cdc15(_0x23104a['dim'],_0x49b02e(0x237))+_0x49b02e(0x1a5)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],_0x49b02e(0x3a5))+'\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x103)],_0x49b02e(0x236))+_0x49b02e(0x20d)+_0x1cdc15(_0x23104a['cyan'],_0x49b02e(0x36d))+_0x49b02e(0x1f9)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],'help')+_0x49b02e(0x1f7)+_0x1cdc15(_0x23104a[_0x49b02e(0x1fd)],_0x49b02e(0x377))+'\x20'+_0x1cdc15(_0x23104a[_0x49b02e(0x103)],'/\x20quit\x20/\x20Ctrl+C')+_0x49b02e(0x1e9));}async function _0x13fed7(_0x5445fb,_0x11528b=0x0){const _0x1d3121=_0x18ab97;process[_0x1d3121(0x209)][_0x1d3121(0x2d9)]('\x0a'),console[_0x1d3121(0x126)](_0x1cdc15(_0x23104a[_0x1d3121(0x1f4)],'\x20\x20[okdb]\x20shutting\x20down…'));try{await _0x5445fb[_0x1d3121(0x199)]();}catch(_0x564b6a){console['error'](_0x1cdc15(_0x23104a[_0x1d3121(0x21b)],'\x20\x20'+_0x564b6a[_0x1d3121(0x10a)]));}process['exit'](_0x11528b);}function _0x2bb8ec(_0x5ac863){const _0x44a21c=_0x18ab97,_0xc20be1=_0x5ac863[_0x44a21c(0x100)]!==_0x44a21c(0x3eb)?_0x1cdc15(_0x23104a[_0x44a21c(0x1f4)],'['+_0x5ac863[_0x44a21c(0x100)]+']'):'';return _0x1cdc15(_0x23104a['bold']+_0x23104a['cyan'],_0x44a21c(0x204))+_0xc20be1+_0x1cdc15(_0x23104a['gray'],'>\x20');}const _0x3df2c4=new Set([_0x18ab97(0x394),_0x18ab97(0x334),'PUT',_0x18ab97(0x213),_0x18ab97(0x146)]);async function _0x189d2b(_0x48e86e,_0x383e55,_0x511d74,_0x4265de,_0x34f038,_0x46501c){const _0x233a1b=_0x18ab97;_0x48e86e=_0x48e86e['trim']();if(!_0x48e86e||_0x48e86e[_0x233a1b(0x13b)]('#'))return;const _0x3bc50a=_0x43484a(_0x48e86e),{flags:_0x2c61e1,rest:_0x15565f}=_0x3a34e7(_0x3bc50a);if(!_0x15565f['length'])return;const _0x1d7d81=_0x15565f[0x0],_0x138f8b=_0x1d7d81[_0x233a1b(0x30a)]();if(_0x138f8b===_0x233a1b(0x14c)){if(_0x15565f[0x1])_0x1f2307(_0x383e55,_0x2b2bd2(_0x15565f[0x1],_0x2c61e1[_0x233a1b(0x100)]??_0x34f038[_0x233a1b(0x100)]));else _0x2fa813(_0x34f038);return;}if(_0x138f8b==='USE'){const _0x31851a=_0x15565f[0x1];if(!_0x31851a){console[_0x233a1b(0x126)](_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],_0x233a1b(0x1ae)));return;}try{_0x383e55[_0x233a1b(0x100)](_0x31851a),_0x34f038[_0x233a1b(0x100)]=_0x31851a,_0x46501c?.[_0x233a1b(0x314)](_0x2bb8ec(_0x34f038)),console[_0x233a1b(0x126)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x31f)],'✓')+_0x233a1b(0x142)+_0x1cdc15(_0x23104a['bold']+_0x23104a[_0x233a1b(0x1fd)],_0x31851a)+'\x0a');}catch{console['log'](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],'✗')+_0x233a1b(0x35c)+_0x1cdc15(_0x23104a[_0x233a1b(0x395)],_0x31851a)+_0x233a1b(0x252)+_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x233a1b(0x34a)));}return;}if(_0x138f8b===_0x233a1b(0x1ed)){const _0x891d92=[..._0x383e55[_0x233a1b(0x2a9)][_0x233a1b(0x2cb)]()][_0x233a1b(0x218)](_0x496be0=>!_0x496be0[_0x233a1b(0x13b)]('~'));console[_0x233a1b(0x126)]('');for(const _0x2ff72d of _0x891d92){const _0x2a0934=_0x2ff72d===_0x34f038[_0x233a1b(0x100)];console[_0x233a1b(0x126)]('\x20\x20'+(_0x2a0934?_0x1cdc15(_0x23104a['green'],'●'):_0x1cdc15(_0x23104a[_0x233a1b(0x103)],'○'))+'\x20\x20'+(_0x2a0934?_0x1cdc15(_0x23104a['bold']+_0x23104a['cyan'],_0x2ff72d):_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x2ff72d)));}console['log'](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x233a1b(0x194))+'\x20'+_0x1cdc15(_0x23104a[_0x233a1b(0x1fd)],_0x34f038[_0x233a1b(0x100)])),console['log']('');return;}if(_0x138f8b===_0x233a1b(0x250)){const _0x2b73ca=[..._0x383e55['_envs']['values']()][_0x233a1b(0x218)](_0x2a9b9c=>!_0x2a9b9c[_0x233a1b(0x33e)]['startsWith']('~'));console[_0x233a1b(0x126)]('');const _0x5d841e=Math[_0x233a1b(0x1e5)](..._0x2b73ca[_0x233a1b(0x1b2)](_0x2eeaf2=>_0x2eeaf2[_0x233a1b(0x33e)][_0x233a1b(0x369)]));for(const _0x542404 of _0x2b73ca){const _0x1f697b=_0x542404[_0x233a1b(0x33e)]===_0x34f038[_0x233a1b(0x100)],_0xc91f39=_0x1f697b?_0x1cdc15(_0x23104a['green'],'●'):_0x1cdc15(_0x23104a[_0x233a1b(0x103)],'○'),_0x3d5d68=_0x1f697b?_0x1cdc15(_0x23104a[_0x233a1b(0x395)]+_0x23104a[_0x233a1b(0x1fd)],_0x542404[_0x233a1b(0x33e)]['padEnd'](_0x5d841e)):_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x542404[_0x233a1b(0x33e)][_0x233a1b(0x18f)](_0x5d841e)),_0x2a8213=[..._0x542404['typeSubDbs'][_0x233a1b(0x2cb)]()][_0x233a1b(0x218)](_0x56a9f5=>!_0x56a9f5[_0x233a1b(0x13b)]('~')),_0x5d5d8e=_0x2a8213[_0x233a1b(0x369)]?_0x1cdc15(_0x23104a['dim'],_0x2a8213[_0x233a1b(0x343)](0x0,0x5)[_0x233a1b(0x1e3)](',\x20')+(_0x2a8213[_0x233a1b(0x369)]>0x5?'\x20\x20+'+(_0x2a8213[_0x233a1b(0x369)]-0x5)+_0x233a1b(0x37a):'')):_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x233a1b(0x240));console[_0x233a1b(0x126)]('\x20\x20'+_0xc91f39+'\x20\x20'+_0x3d5d68+'\x20\x20'+_0x5d5d8e);}console[_0x233a1b(0x126)]('');return;}if(_0x138f8b===_0x233a1b(0x231)){const _0x531c4d=_0x2c61e1[_0x233a1b(0x100)]??_0x15565f[0x1]??_0x34f038[_0x233a1b(0x100)];try{const _0x27f423=_0x383e55['env'](_0x531c4d),_0x24fc2e=[..._0x27f423['typeSubDbs'][_0x233a1b(0x2cb)]()][_0x233a1b(0x218)](_0x375213=>!_0x375213['startsWith']('~'))[_0x233a1b(0x251)]();console[_0x233a1b(0x126)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x24fc2e[_0x233a1b(0x369)]+_0x233a1b(0x2ce)+(_0x24fc2e['length']!==0x1?'s':'')+_0x233a1b(0x2db)+_0x531c4d));for(const _0x2e6ef1 of _0x24fc2e){const _0x558b87=_0x27f423[_0x233a1b(0x16c)][_0x233a1b(0x288)](_0x2e6ef1),_0x26501e=_0x558b87?.[_0x233a1b(0x15e)]?.[_0x233a1b(0x268)]?.()??0x0,_0x14c834=_0x1cdc15(_0x23104a[_0x233a1b(0x395)]+_0x23104a['cyan'],_0x2e6ef1[_0x233a1b(0x18f)](0x1c));console[_0x233a1b(0x126)](_0x233a1b(0x2da)+_0x14c834+'\x20\x20'+_0x1cdc15(_0x23104a[_0x233a1b(0x249)],String(_0x26501e)[_0x233a1b(0x1af)](0x6))+'\x20'+_0x1cdc15(_0x23104a['dim'],_0x233a1b(0x341)));}console[_0x233a1b(0x126)]('');}catch(_0x4bbbfb){console[_0x233a1b(0x33c)](_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],_0x233a1b(0x200)+_0x4bbbfb[_0x233a1b(0x10a)]+'\x0a'));}return;}if(_0x138f8b==='ROUTES'){_0x4a8792(_0x383e55,_0x15565f[_0x233a1b(0x343)](0x1)[_0x233a1b(0x1e3)]('\x20'));return;}if(_0x138f8b==='LOGS'){const _0x30493a=(_0x15565f[0x1]??'')[_0x233a1b(0x11e)]();if(!_0x30493a||_0x30493a==='on')_0x4265de[_0x233a1b(0x263)]=!![],_0x4265de['level']=_0x233a1b(0x363),console[_0x233a1b(0x126)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x31f)],'✓')+'\x20logs\x20on\x20\x20'+_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x233a1b(0x189))+'\x0a');else{if(_0x30493a===_0x233a1b(0x222))_0x4265de[_0x233a1b(0x263)]=![],console[_0x233a1b(0x126)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x1f4)],'○')+_0x233a1b(0x1c7));else _0x596a76[_0x30493a]!==undefined?(_0x4265de[_0x233a1b(0x263)]=!![],_0x4265de[_0x233a1b(0x3df)]=_0x30493a,console[_0x233a1b(0x126)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a['green'],'✓')+_0x233a1b(0x128)+_0x1cdc15(_0x23104a[_0x233a1b(0x395)],_0x30493a)+'\x0a')):console[_0x233a1b(0x33c)](_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],_0x233a1b(0x1fc)));}return;}if(_0x138f8b===_0x233a1b(0x3b5)||_0x138f8b==='QUIT'){await _0x13fed7(_0x383e55,0x0);return;}if(_0x138f8b===_0x233a1b(0x203)){const _0x27be06=_0x233a1b(0x180)+_0x511d74[_0x233a1b(0x1a8)]+_0x233a1b(0x30e),_0x3e8297=process[_0x233a1b(0x1da)]===_0x233a1b(0x19b)?_0x233a1b(0x393)+_0x27be06:process[_0x233a1b(0x1da)]==='darwin'?_0x233a1b(0x2a8)+_0x27be06:_0x233a1b(0x2c2)+_0x27be06;require$$4[_0x233a1b(0x198)](_0x3e8297),console[_0x233a1b(0x126)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x31f)],'✓')+_0x233a1b(0x246)+_0x1cdc15(_0x23104a['cyan'],_0x27be06)+'\x0a');return;}let _0x5ee650,_0x1858f4,_0x397f63;if(_0x3df2c4[_0x233a1b(0x32a)](_0x138f8b)){_0x5ee650=_0x138f8b,_0x1858f4=_0x15565f[0x1],_0x397f63=_0x15565f['slice'](0x2);if(!_0x1858f4){console['error'](_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],_0x233a1b(0x238)+_0x1d7d81+_0x233a1b(0x2df)));return;}}else _0x5ee650=null,_0x1858f4=_0x15565f[0x0],_0x397f63=_0x15565f[_0x233a1b(0x343)](0x1);const _0x4af0cc=_0x2c61e1['env']??_0x34f038[_0x233a1b(0x100)],_0x17eab2=_0x2b2bd2(_0x1858f4,_0x4af0cc);if(_0x2c61e1[_0x233a1b(0x3c6)]){_0x1f2307(_0x383e55,_0x17eab2);return;}let _0x17fa45=null;if(_0x397f63[_0x233a1b(0x369)]){const _0x2abeed=_0x397f63[_0x233a1b(0x1e3)]('\x20');try{_0x17fa45=_0x4bdb26(_0x2abeed);}catch(_0x384a63){console['error'](_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],_0x233a1b(0x18e)+_0x2abeed+'\x0a\x20\x20'+_0x1cdc15(_0x23104a[_0x233a1b(0x103)],_0x384a63[_0x233a1b(0x10a)])+'\x0a'));return;}}if(!_0x5ee650)_0x5ee650=_0x17fa45!==null?_0x233a1b(0x334):_0x233a1b(0x394);try{const _0x5c689a=await _0x3e3ca1(_0x383e55,_0x5ee650,_0x17eab2,_0x17fa45);_0x1f3cbe(_0x5c689a[_0x233a1b(0x117)],_0x5c689a[_0x233a1b(0x3dc)]);}catch(_0x47f1f5){console[_0x233a1b(0x33c)](_0x233a1b(0x200)+_0x1cdc15(_0x23104a[_0x233a1b(0x21b)],'✗')+'\x20'+_0x47f1f5['message']+'\x0a');}}class _0x21b169{constructor(){const _0x5b056b=_0x18ab97;this[_0x5b056b(0x241)]=new Map(),this['dynamic']=null,this[_0x5b056b(0x269)]=![];}}function _0x38867e(_0x4605d5){const _0x3d9531=_0x18ab97,_0x1a2f77=new _0x21b169();for(const _0x4163b3 of _0x4605d5){if(_0x4163b3[_0x3d9531(0x274)]?.[_0x3d9531(0x178)])continue;const _0x53e9da=_0x4163b3[_0x3d9531(0x217)][_0x3d9531(0x320)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x53e9da)continue;let _0x11977a=_0x1a2f77;for(const _0x61edfa of _0x53e9da['split']('/')[_0x3d9531(0x218)](Boolean)){if(_0x61edfa['startsWith'](':')){const _0x1b625a=_0x61edfa['slice'](0x1);if(!_0x11977a['dynamic'])_0x11977a[_0x3d9531(0x208)]={'param':_0x1b625a,'node':new _0x21b169()};_0x11977a=_0x11977a[_0x3d9531(0x208)][_0x3d9531(0x31c)];}else{if(!_0x11977a[_0x3d9531(0x241)][_0x3d9531(0x32a)](_0x61edfa))_0x11977a['children']['set'](_0x61edfa,new _0x21b169());_0x11977a=_0x11977a[_0x3d9531(0x241)][_0x3d9531(0x288)](_0x61edfa);}}_0x11977a[_0x3d9531(0x269)]=!![];}return _0x1a2f77;}const _0x19cd41=new Map();function _0xbd958(_0x38019e,_0x105e18,_0x55d8d8){const _0x4443e8=_0x18ab97,_0x3096a0=_0x19cd41[_0x4443e8(0x288)](_0x38019e);if(_0x3096a0&&_0x3096a0[_0x4443e8(0x3ec)]>Date['now']())return _0x3096a0[_0x4443e8(0x1ef)];const _0x1f75be=_0x55d8d8();return _0x19cd41[_0x4443e8(0x291)](_0x38019e,{'val':_0x1f75be,'exp':Date['now']()+_0x105e18}),_0x1f75be;}function _0x11f08e(_0x15aee9,_0x418367,_0x51e3be,_0x687e33){const _0x3f9099=_0x18ab97,_0x525b35=_0x418367[_0x3f9099(0x100)]??_0x687e33[_0x3f9099(0x100)];switch(_0x15aee9){case _0x3f9099(0x100):return[..._0x51e3be[_0x3f9099(0x2a9)][_0x3f9099(0x2cb)]()]['filter'](_0x5a5b69=>!_0x5a5b69['startsWith']('~'));case _0x3f9099(0x1d3):return _0xbd958(_0x3f9099(0x38c)+_0x525b35,0x7d0,()=>{const _0x12d494=_0x3f9099;try{return[..._0x51e3be['env'](_0x525b35)[_0x12d494(0x16c)][_0x12d494(0x2cb)]()][_0x12d494(0x218)](_0x26e917=>!_0x26e917[_0x12d494(0x13b)]('~'));}catch{return[];}});case _0x3f9099(0x1ec):if(!_0x418367[_0x3f9099(0x1d3)])return[];return _0xbd958(_0x3f9099(0x2a6)+_0x525b35+':'+_0x418367['type'],0x5dc,()=>{const _0x48f995=_0x3f9099;try{const _0x31eb61=_0x51e3be[_0x48f995(0x100)](_0x525b35)[_0x48f995(0x16c)][_0x48f995(0x288)](_0x418367[_0x48f995(0x1d3)]);if(!_0x31eb61?.[_0x48f995(0x15e)])return[];const _0x295dec=[];for(const {key:_0x273214}of _0x31eb61[_0x48f995(0x15e)][_0x48f995(0x1ff)]({'limit':0x32})){_0x295dec[_0x48f995(0x3c8)](String(_0x273214));if(_0x295dec['length']>=0x32)break;}return _0x295dec;}catch{return[];}});case _0x3f9099(0x30c):if(!_0x418367[_0x3f9099(0x1d3)])return[];return _0xbd958(_0x3f9099(0x2a4)+_0x525b35+':'+_0x418367[_0x3f9099(0x1d3)],0x7d0,()=>{const _0x26dbbc=_0x3f9099;try{const _0x453936=_0x51e3be['env'](_0x525b35)[_0x26dbbc(0x16c)][_0x26dbbc(0x288)](_0x418367[_0x26dbbc(0x1d3)]);return _0x453936?[..._0x453936['indexToDb']?.[_0x26dbbc(0x2cb)]()??[]]:[];}catch{return[];}});case _0x3f9099(0x1e7):if(!_0x418367['type'])return[];return _0xbd958(_0x3f9099(0x1aa)+_0x525b35+':'+_0x418367['type'],0x7d0,()=>{const _0x48b076=_0x3f9099;try{return _0x51e3be[_0x48b076(0x1de)]?.['list']?.(_0x418367[_0x48b076(0x1d3)],_0x51e3be[_0x48b076(0x100)](_0x525b35))?.[_0x48b076(0x1b2)](_0x1d81cb=>_0x1d81cb[_0x48b076(0x33e)])??[];}catch{return[];}});default:return[];}}function _0x17a20c(_0x1b19bc,_0x581afe,_0x1ad547,_0x346dd9){const _0x20a61a=_0x18ab97,_0x5bb0ed=_0x1b19bc[_0x20a61a(0x3b1)]('/'),_0x445e7b=_0x1b19bc[_0x20a61a(0x2ae)]('/'),_0x21643b=_0x5bb0ed?_0x445e7b[_0x20a61a(0x343)](0x0,-0x1):_0x445e7b[_0x20a61a(0x343)](0x0,-0x1),_0x4b3312=_0x5bb0ed?'':_0x445e7b[_0x445e7b[_0x20a61a(0x369)]-0x1];let _0x90854d=_0x581afe;const _0x1b64ec={};for(const _0x8d294a of _0x21643b){if(!_0x8d294a)continue;if(_0x90854d[_0x20a61a(0x241)][_0x20a61a(0x32a)](_0x8d294a))_0x90854d=_0x90854d[_0x20a61a(0x241)][_0x20a61a(0x288)](_0x8d294a);else{if(_0x90854d[_0x20a61a(0x208)])_0x1b64ec[_0x90854d[_0x20a61a(0x208)][_0x20a61a(0x3b0)]]=_0x8d294a,_0x90854d=_0x90854d[_0x20a61a(0x208)][_0x20a61a(0x31c)];else return[];}}const _0x100942=_0x21643b[_0x20a61a(0x218)](Boolean),_0x53e688=_0x100942[_0x20a61a(0x369)]?_0x100942[_0x20a61a(0x1e3)]('/')+'/':'',_0x269098=[];for(const [_0x5eff40]of _0x90854d['children']){if(_0x5eff40[_0x20a61a(0x13b)](_0x4b3312))_0x269098['push'](_0x53e688+_0x5eff40);}if(_0x90854d[_0x20a61a(0x208)])for(const _0x3f22b9 of _0x11f08e(_0x90854d[_0x20a61a(0x208)][_0x20a61a(0x3b0)],_0x1b64ec,_0x1ad547,_0x346dd9)){if(String(_0x3f22b9)[_0x20a61a(0x13b)](_0x4b3312))_0x269098[_0x20a61a(0x3c8)](_0x53e688+_0x3f22b9);}return _0x269098[_0x20a61a(0x343)](0x0,0x64);}const _0xf07045=['help',_0x18ab97(0x12a),_0x18ab97(0x100),_0x18ab97(0x2d4),_0x18ab97(0x183),_0x18ab97(0x160),_0x18ab97(0x3a5),'open',_0x18ab97(0x377),_0x18ab97(0x1ad)];function _0x326a3e(_0x14026a,_0x1261f7,_0x36ca29){return function _0x27f7e2(_0x1d427d){const _0x53bab4=_0x6e57;try{const _0x65a5ec=_0x1d427d[_0x53bab4(0x292)](/\s[{[]/),_0x3785f6=_0x65a5ec>=0x0?_0x1d427d[_0x53bab4(0x343)](0x0,_0x65a5ec):_0x1d427d,_0x351778=_0x3785f6[_0x53bab4(0x392)]();if(!_0x351778){const _0x54a3dd=[..._0xf07045,...[..._0x14026a[_0x53bab4(0x241)][_0x53bab4(0x2cb)]()]][_0x53bab4(0x343)](0x0,0x64);return[_0x54a3dd,''];}const _0x2d50ab=_0x351778[_0x53bab4(0x2ae)](/\s+/),_0x42d88d=_0x2d50ab[0x0],_0x2c67c4=_0x42d88d[_0x53bab4(0x30a)]();if(_0x2d50ab[_0x53bab4(0x369)]===0x1){const _0x17048a=_0x42d88d[_0x53bab4(0x11e)](),_0x23552c=_0xf07045[_0x53bab4(0x218)](_0x487cac=>_0x487cac[_0x53bab4(0x13b)](_0x17048a)),_0x5a0d6d=_0x17a20c(_0x42d88d,_0x14026a,_0x1261f7,_0x36ca29),_0x3bae3c=[...new Set([..._0x23552c,..._0x5a0d6d])]['slice'](0x0,0x64);return[_0x3bae3c,_0x42d88d];}if(_0x3df2c4[_0x53bab4(0x32a)](_0x2c67c4)&&_0x2d50ab[_0x53bab4(0x369)]===0x2){const _0x159b3e=_0x2d50ab[0x1],_0x21f159=_0x17a20c(_0x159b3e,_0x14026a,_0x1261f7,_0x36ca29);return[_0x21f159[_0x53bab4(0x1b2)](_0x44a535=>_0x42d88d+'\x20'+_0x44a535),_0x42d88d+'\x20'+_0x159b3e];}if(!_0x3df2c4[_0x53bab4(0x32a)](_0x2c67c4)&&_0x2d50ab['length']>0x1){const _0x2d7c03=_0x17a20c(_0x42d88d,_0x14026a,_0x1261f7,_0x36ca29),_0xe37042='\x20'+_0x2d50ab[_0x53bab4(0x343)](0x1)[_0x53bab4(0x1e3)]('\x20');return[_0x2d7c03[_0x53bab4(0x1b2)](_0x39f4a0=>_0x39f4a0+_0xe37042),_0x42d88d+_0xe37042];}return[[],_0x1d427d];}catch{return[[],_0x1d427d];}};}async function _0x1c1228(_0x44789c,_0x3038df){const _0x1631fd=_0x18ab97,_0x28b2a0={'enabled':!![],'level':_0x3038df[_0x1631fd(0x354)]??_0x1631fd(0x363)},_0x30c06f={'env':'default'},_0x1b3755={'current':null},_0x4ea907=_0x38867e(_0x44789c[_0x1631fd(0x3e2)]['listRoutes']()),_0x18ed32=_0x326a3e(_0x4ea907,_0x44789c,_0x30c06f);_0x44789c[_0x1631fd(0x126)]['attach'](_0x3c81c7=>{const _0xc7aef1=_0x1631fd;if(!_0x28b2a0[_0xc7aef1(0x263)])return;_0x2d3514(_0x3c81c7,_0x28b2a0['level']),_0x1b3755[_0xc7aef1(0x24d)]?.[_0xc7aef1(0x3e5)](!![]);}),_0x1ec145(_0x44789c,_0x3038df);const _0x581089=_0x1ab16c[_0x1631fd(0x15a)]({'input':process['stdin'],'output':process['stdout'],'terminal':!![],'completer':_0x18ed32,'prompt':_0x2bb8ec(_0x30c06f),'historySize':_0x3966e7});try{const _0x589026=_0x22b295[_0x1631fd(0x277)](_0x5ddc9e,'utf8')[_0x1631fd(0x2ae)]('\x0a')[_0x1631fd(0x218)](Boolean);_0x581089[_0x1631fd(0x2fa)]=_0x589026[_0x1631fd(0x22a)]()[_0x1631fd(0x343)](0x0,_0x3966e7);}catch{}return _0x1b3755[_0x1631fd(0x24d)]=_0x581089,_0x581089['on'](_0x1631fd(0x1b4),async _0x1bb07b=>{const _0x37a10f=_0x1631fd;_0x581089[_0x37a10f(0x28e)]();try{await _0x189d2b(_0x1bb07b,_0x44789c,_0x3038df,_0x28b2a0,_0x30c06f,_0x581089);}catch(_0x486cc2){console['error'](_0x1cdc15(_0x23104a[_0x37a10f(0x21b)],_0x37a10f(0x365)+_0x486cc2[_0x37a10f(0x10a)]));}finally{_0x581089['resume'](),_0x581089[_0x37a10f(0x3e5)]();}}),_0x581089['on'](_0x1631fd(0x199),()=>{const _0x17a76f=_0x1631fd;try{const _0x17630e=[..._0x581089[_0x17a76f(0x2fa)]][_0x17a76f(0x22a)]()[_0x17a76f(0x218)](Boolean)[_0x17a76f(0x343)](0x0,_0x3966e7);_0x22b295[_0x17a76f(0x34d)](_0x5ddc9e,_0x17630e['join']('\x0a')+'\x0a');}catch{}_0x13fed7(_0x44789c,0x0);}),process['on'](_0x1631fd(0x355),()=>{const _0x4430e9=_0x1631fd;if(_0x581089['line']==='')_0x13fed7(_0x44789c,0x0);else process[_0x4430e9(0x209)][_0x4430e9(0x2d9)]('\x0a'),_0x581089[_0x4430e9(0x155)](0x0),_0x581089['prompt']();}),process['on'](_0x1631fd(0x2e8),()=>_0x13fed7(_0x44789c,0x0)),_0x581089[_0x1631fd(0x3e5)](),_0x581089;}return okdbShell={'start':_0x1c1228,'colorLog':_0x2d3514,'lenientParse':_0x4bdb26,'_splitLine':_0x43484a,'_formatRouteHelpLines':_0x14fc66,'_routeSummary':_0x210a22,'_routeTags':_0x270c7c},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x45586a=_0x3f2430;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x45586a(0x2e5)]();}catch{}const _0x170f48=require$$1$1,_0x465e48=require$$1;function _0x2f33be(_0x3ce0b3){const _0x35430e=_0x45586a,_0xce32=_0x3ce0b3['slice'](0x2),_0x2ffa13={};let _0x6834a2=0x0;while(_0x6834a2<_0xce32['length']){const _0xc6c0f7=_0xce32[_0x6834a2];if(_0xc6c0f7===_0x35430e(0x2b1)||_0xc6c0f7==='-p')_0x2ffa13[_0x35430e(0x1a8)]=Number(_0xce32[++_0x6834a2]);else{if(_0xc6c0f7===_0x35430e(0x151)||_0xc6c0f7==='-d')_0x2ffa13['path']=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x381)||_0xc6c0f7==='-k')_0x2ffa13['key']=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x2ca)||_0xc6c0f7==='-c')_0x2ffa13[_0x35430e(0x3a6)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x193))_0x2ffa13[_0x35430e(0x354)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x359))_0x2ffa13[_0x35430e(0x2f8)]=!![];else{if(_0xc6c0f7===_0x35430e(0x16e))_0x2ffa13[_0x35430e(0x29b)]=!![];else{if(_0xc6c0f7==='--env'||_0xc6c0f7==='-e')_0x2ffa13[_0x35430e(0x100)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x25e))_0x2ffa13[_0x35430e(0x183)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x1c2))_0x2ffa13[_0x35430e(0x330)]=!![];else{if(_0xc6c0f7===_0x35430e(0x1c0))_0x2ffa13['blobs']=!![];else{if(_0xc6c0f7===_0x35430e(0x3f6))_0x2ffa13[_0x35430e(0x248)]=!![];else{if(_0xc6c0f7===_0x35430e(0x27e)){const _0x200f06=[];while(_0x6834a2+0x1<_0xce32[_0x35430e(0x369)]&&!_0xce32[_0x6834a2+0x1][_0x35430e(0x13b)]('--')){_0x200f06[_0x35430e(0x3c8)](_0xce32[++_0x6834a2]);}_0x2ffa13[_0x35430e(0x36d)]=_0x200f06[_0x35430e(0x369)]>0x0?_0x200f06:!![];}else{if(_0xc6c0f7==='--log-requests')_0x2ffa13[_0x35430e(0x30f)]=!![];else{if(_0xc6c0f7===_0x35430e(0x15c))_0x2ffa13['name']=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x18b))_0x2ffa13[_0x35430e(0x2c4)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x1b3))_0x2ffa13[_0x35430e(0x152)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x161))_0x2ffa13[_0x35430e(0x176)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x33f))_0x2ffa13[_0x35430e(0x20a)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x2c5))_0x2ffa13[_0x35430e(0x215)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7==='--token')_0x2ffa13[_0x35430e(0x396)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x2d3)||_0xc6c0f7==='-u')_0x2ffa13[_0x35430e(0x137)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x367))_0x2ffa13[_0x35430e(0x3de)]=_0xce32[++_0x6834a2];else{if(_0xc6c0f7===_0x35430e(0x32b)||_0xc6c0f7==='-v'){const _0x45b322=require$$2;console[_0x35430e(0x126)](_0x45b322['version']),process[_0x35430e(0x377)](0x0);}else(_0xc6c0f7===_0x35430e(0x1dd)||_0xc6c0f7==='-h')&&(_0xc29876(),process[_0x35430e(0x377)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x6834a2++;}return _0x2ffa13;}function _0xc29876(){const _0x10541d=_0x45586a;console[_0x10541d(0x126)](_0x10541d(0x11d));}const _0x5561cc=new Set([_0x45586a(0x24e),_0x45586a(0x363),_0x45586a(0x3e0),_0x45586a(0x33c)]);function _0x2bdfc3(_0x3dd0d0){const _0x542852=_0x45586a,_0x396143=_0x3dd0d0[_0x542852(0x3a6)]?_0x170f48[_0x542852(0x132)](_0x3dd0d0['config']):_0x170f48[_0x542852(0x132)](_0x542852(0x11a));let _0x5befe6={};if(_0x465e48[_0x542852(0x1ac)](_0x396143))try{const _0x6f89a7=_0x465e48[_0x542852(0x277)](_0x396143,_0x542852(0x25d))[_0x542852(0x320)](/^\uFEFF/,'');_0x5befe6=JSON['parse'](_0x6f89a7),console[_0x542852(0x126)](_0x542852(0x1fe)+_0x396143);}catch(_0x37dadd){console[_0x542852(0x33c)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x396143+':\x20'+_0x37dadd[_0x542852(0x10a)]),process[_0x542852(0x377)](0x1);}const _0x3f3126={'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},_0x57b0db={'port':_0x3dd0d0[_0x542852(0x1a8)]??_0x5befe6['port']??_0x3f3126['port']??0x2124,'dbPath':_0x3dd0d0[_0x542852(0x217)]??_0x5befe6[_0x542852(0x217)]??_0x3f3126[_0x542852(0x217)]??'./okdb-data','key':_0x3dd0d0[_0x542852(0x1ec)]??_0x5befe6[_0x542852(0x1ec)]??_0x3f3126[_0x542852(0x1ec)]??undefined,'logLevel':_0x3dd0d0['logLevel']??_0x5befe6[_0x542852(0x354)]??_0x3f3126['logLevel']??'info','noRepl':_0x3dd0d0['noRepl']??_0x5befe6[_0x542852(0x2f8)]??_0x3f3126[_0x542852(0x2f8)]??![],'noAdmin':_0x3dd0d0['noAdmin']??_0x5befe6[_0x542852(0x29b)]??_0x3f3126[_0x542852(0x29b)]??![],'admin':_0x5befe6[_0x542852(0x353)]??{},'api':_0x5befe6[_0x542852(0x348)]??undefined,'auth':_0x5befe6[_0x542852(0x38e)]??undefined,'mcp':_0x5befe6[_0x542852(0x2c8)]??undefined,'timeMachine':_0x5befe6[_0x542852(0x21e)]!==![]?_0x5befe6['timeMachine']??{}:![]};return _0x3dd0d0['open']!==undefined&&(_0x57b0db['auth']=_0x57b0db[_0x542852(0x38e)]||{},_0x57b0db[_0x542852(0x38e)][_0x542852(0x36d)]=_0x3dd0d0[_0x542852(0x36d)]),_0x3dd0d0[_0x542852(0x30f)]&&(_0x57b0db[_0x542852(0x24e)]=_0x57b0db[_0x542852(0x24e)]||{},_0x57b0db[_0x542852(0x24e)][_0x542852(0x30f)]=!![]),(!Number[_0x542852(0x22d)](_0x57b0db['port'])||_0x57b0db[_0x542852(0x1a8)]<0x1||_0x57b0db[_0x542852(0x1a8)]>0xffff)&&(console['error'](_0x542852(0x2e9)+_0x57b0db[_0x542852(0x1a8)]+'\x20(must\x20be\x201–65535)'),process[_0x542852(0x377)](0x1)),!_0x5561cc[_0x542852(0x32a)](_0x57b0db[_0x542852(0x354)])&&(console['error']('[okdb]\x20invalid\x20log\x20level:\x20\x22'+_0x57b0db[_0x542852(0x354)]+_0x542852(0x255)),process[_0x542852(0x377)](0x1)),_0x57b0db;}function _0x3b22c0(_0x6f6c15){const _0x26c31a=_0x45586a;return!!(_0x6f6c15&&typeof _0x6f6c15===_0x26c31a(0x32d)&&!Array[_0x26c31a(0x18c)](_0x6f6c15)&&Object[_0x26c31a(0x2cb)](_0x6f6c15)[_0x26c31a(0x369)]>0x0);}const _0x16fd10=!process[_0x45586a(0x209)]['isTTY']||!!process.env.NO_COLOR;function _0x78fc88(_0x441c7b,_0xbb1b97){return _0x16fd10?_0xbb1b97:'\x1b['+_0x441c7b+'m'+_0xbb1b97+'\x1b[0m';}function _0x30eb13(_0x2ee51a){const _0x41a7c9=_0x45586a;if(!_0x2ee51a||_0x2ee51a[_0x41a7c9(0x369)]===0x0)return;const _0x2b32b9='─'[_0x41a7c9(0x325)](0x38);process[_0x41a7c9(0x317)][_0x41a7c9(0x2d9)]('\x0a'),process['stderr'][_0x41a7c9(0x2d9)](_0x78fc88('33',_0x41a7c9(0x39f)+_0x2ee51a[_0x41a7c9(0x369)]+'\x20SECURITY\x20NOTICE'+(_0x2ee51a[_0x41a7c9(0x369)]>0x1?'S':'')+'\x0a')),process[_0x41a7c9(0x317)][_0x41a7c9(0x2d9)]('\x20\x20'+_0x2b32b9+'\x0a');for(const _0x41802a of _0x2ee51a){const _0x1cdc36=_0x41802a[_0x41a7c9(0x3df)]===_0x41a7c9(0x33c)?_0x78fc88('31',_0x41a7c9(0x3a9)):_0x78fc88('33',_0x41a7c9(0x14b));process[_0x41a7c9(0x317)][_0x41a7c9(0x2d9)](_0x1cdc36+'\x20\x20'+_0x78fc88('1',_0x41802a['title'])+'\x0a'),process['stderr']['write'](_0x41a7c9(0x3cb)+_0x41802a[_0x41a7c9(0x10a)]+'\x0a');if(_0x41802a['hint'])process['stderr']['write']('\x20\x20\x20\x20\x20\x20\x20'+_0x78fc88('2',_0x41a7c9(0x2f5)+_0x41802a[_0x41a7c9(0x371)])+'\x0a');process['stderr'][_0x41a7c9(0x2d9)]('\x0a');}process[_0x41a7c9(0x317)][_0x41a7c9(0x2d9)]('\x20\x20'+_0x2b32b9+'\x0a\x0a');}function _0x2e8ce7(_0xb25959,_0x594b04){const _0x56cf08=_0xb25959['http']['listen'](_0x594b04);return new Promise((_0x2d8f87,_0x471fd3)=>{const _0x37c599=_0x6e57;_0x56cf08[_0x37c599(0x190)](_0x37c599(0x3f1),_0x2d8f87),_0x56cf08[_0x37c599(0x190)](_0x37c599(0x33c),_0x471fd3);});}async function _0x4d4079(_0x2e3c15){const _0x43ce09=_0x45586a,_0x196de9=require$$3;console[_0x43ce09(0x126)](_0x43ce09(0x1db));let _0x586676=!![];const _0x423afe=(_0x459991,_0x2d8dfe)=>{const _0x23055e=_0x43ce09;console[_0x23055e(0x126)]('\x20\x20'+(_0x459991?'✓':'✗')+'\x20'+_0x2d8dfe);if(!_0x459991)_0x586676=![];},_0x4ee5e6=Number(process[_0x43ce09(0x1d4)][_0x43ce09(0x320)]('v','')['split']('.')[0x0]);_0x423afe(_0x4ee5e6>=0x12,_0x43ce09(0x136)+process['version']+(_0x4ee5e6<0x12?_0x43ce09(0x3cd):''));const _0x421e51=_0x170f48['resolve'](_0x2e3c15[_0x43ce09(0x29f)]);try{_0x465e48[_0x43ce09(0x375)](_0x421e51,{'recursive':!![]});const _0xbf2234=_0x170f48[_0x43ce09(0x1e3)](_0x421e51,'.okdb-write-test');_0x465e48[_0x43ce09(0x34d)](_0xbf2234,''),_0x465e48[_0x43ce09(0x10b)](_0xbf2234),_0x423afe(!![],_0x43ce09(0x3ab)+_0x421e51);}catch(_0x51884a){_0x423afe(![],_0x43ce09(0x177)+_0x421e51+'\x20\x20('+_0x51884a['message']+')');}const _0x4f4e3d=await new Promise(_0xf38399=>{const _0x23fe24=_0x43ce09,_0x5b10d4=_0x196de9['createServer']();_0x5b10d4[_0x23fe24(0x190)](_0x23fe24(0x33c),()=>_0xf38399(![])),_0x5b10d4[_0x23fe24(0x190)](_0x23fe24(0x3f1),()=>{const _0x3b6d4d=_0x23fe24;_0x5b10d4[_0x3b6d4d(0x199)](),_0xf38399(!![]);}),_0x5b10d4[_0x23fe24(0x3a4)](_0x2e3c15[_0x23fe24(0x1a8)],_0x23fe24(0x13f));});_0x423afe(_0x4f4e3d,'port\x20'+_0x2e3c15['port']+'\x20'+(_0x4f4e3d?'available':_0x43ce09(0x196)));const _0x26fd67=_0x170f48[_0x43ce09(0x132)](_0x43ce09(0x11a));if(_0x465e48['existsSync'](_0x26fd67))try{JSON['parse'](_0x465e48['readFileSync'](_0x26fd67,_0x43ce09(0x25d))[_0x43ce09(0x320)](/^\uFEFF/,'')),_0x423afe(!![],_0x43ce09(0x253)+_0x26fd67);}catch(_0x36e462){_0x423afe(![],_0x43ce09(0x2b8)+_0x36e462[_0x43ce09(0x10a)]);}else _0x423afe(!![],'no\x20.kdbconfig\x20(using\x20defaults)');console['log'](''),_0x586676?console[_0x43ce09(0x126)](_0x43ce09(0x20e)):(console['log']('\x20\x20Some\x20checks\x20failed.\x0a'),process[_0x43ce09(0x377)](0x1));}async function _0x321815(){const _0x25dfec=_0x45586a,_0x3ad6f9=_0x170f48['resolve']('.kdbconfig');!_0x465e48[_0x25dfec(0x1ac)](_0x3ad6f9)?(_0x465e48[_0x25dfec(0x34d)](_0x3ad6f9,JSON['stringify']({'port':0x2124,'path':_0x25dfec(0x3d2),'logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x25dfec(0x126)](_0x25dfec(0x25f))):console[_0x25dfec(0x126)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x39432d=_0x170f48['resolve'](_0x25dfec(0x3d2));!_0x465e48[_0x25dfec(0x1ac)](_0x39432d)?(_0x465e48[_0x25dfec(0x375)](_0x39432d,{'recursive':!![]}),console[_0x25dfec(0x126)]('[okdb]\x20created\x20./okdb-data')):console['log']('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x25dfec(0x126)](_0x25dfec(0x36b));}async function _0xca7103(_0x4cb8f1){const _0x142f63=_0x45586a,_0x68a54d=_0x170f48[_0x142f63(0x132)](_0x4cb8f1['dbPath']);if(!_0x465e48[_0x142f63(0x1ac)](_0x68a54d)){console['log']('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x68a54d+'\x20does\x20not\x20exist');return;}const _0x48b9a5=require$$0$2,_0x1d8a4b=_0x48b9a5['createInterface']({'input':process[_0x142f63(0x3dd)],'output':process['stdout']}),_0x1367a4=await new Promise(_0x2a55cd=>_0x1d8a4b[_0x142f63(0x29a)](_0x142f63(0x342)+_0x68a54d+_0x142f63(0x3ce),_0x2a55cd));_0x1d8a4b[_0x142f63(0x199)](),console['log']('');if(_0x1367a4[_0x142f63(0x201)]()[_0x142f63(0x11e)]()!==_0x142f63(0x23e)){console[_0x142f63(0x126)](_0x142f63(0x226));return;}_0x465e48[_0x142f63(0x322)](_0x68a54d,{'recursive':!![],'force':!![]}),console['log'](_0x142f63(0x13d)+_0x68a54d+_0x142f63(0x187));}async function _0x51a49e(_0x5b65e8,_0x1ce396){const _0x15a26a=_0x45586a,_0x33207d=require$$5,_0x3e02c4=_0x170f48[_0x15a26a(0x132)](_0x1ce396['dbPath']);console[_0x15a26a(0x126)](_0x15a26a(0x123)+_0x3e02c4+'…');const _0x59b3da=new _0x33207d(_0x3e02c4,_0x1ce396[_0x15a26a(0x1ec)]?{'encryptionKey':_0x1ce396['key']}:{});await _0x59b3da[_0x15a26a(0x36d)](),console[_0x15a26a(0x126)](_0x15a26a(0x275)+_0x5b65e8+'…');const {envs:_0x71a13d}=await _0x59b3da[_0x15a26a(0x1b0)][_0x15a26a(0x188)](_0x5b65e8);for(const _0xf8991b of _0x71a13d){const _0x138c0b=_0xf8991b['sizeBefore']>0x0?'\x20\x20('+(_0xf8991b[_0x15a26a(0x21d)]/0x400/0x400)[_0x15a26a(0x1e0)](0x2)+_0x15a26a(0x344)+(_0xf8991b[_0x15a26a(0x2d6)]/0x400/0x400)[_0x15a26a(0x1e0)](0x2)+_0x15a26a(0x3e3):'';console[_0x15a26a(0x126)](_0x15a26a(0x14d)+_0xf8991b[_0x15a26a(0x33e)]+_0x15a26a(0x1a4)+_0xf8991b['dest']+_0x138c0b);}await _0x59b3da[_0x15a26a(0x199)](),console[_0x15a26a(0x126)]('[okdb]\x20backup\x20complete');}async function _0xd44625(_0x12d847,_0x118c89,_0x1f12f8){const _0x430178=_0x45586a,_0x35a4dd=require$$5,_0x288e0f=_0x170f48[_0x430178(0x132)](_0x118c89[_0x430178(0x29f)]),_0x3d4f08=_0x1f12f8[_0x430178(0x100)]??'default',_0x9e5783=_0x1f12f8[_0x430178(0x183)]?_0x1f12f8[_0x430178(0x183)][_0x430178(0x2ae)](',')[_0x430178(0x1b2)](_0x32bb42=>_0x32bb42[_0x430178(0x201)]()):null;console[_0x430178(0x126)](_0x430178(0x123)+_0x288e0f+'…');const _0x3bb4c3=new _0x35a4dd(_0x288e0f,_0x118c89[_0x430178(0x1ec)]?{'encryptionKey':_0x118c89[_0x430178(0x1ec)]}:{});await _0x3bb4c3[_0x430178(0x36d)](),console[_0x430178(0x126)]('[okdb]\x20exporting\x20env\x20\x22'+_0x3d4f08+_0x430178(0x195)+_0x12d847+'…');const _0x35d641=await _0x3bb4c3[_0x430178(0x1b0)][_0x430178(0x3b3)](_0x12d847,{'envName':_0x3d4f08,'types':_0x9e5783,'includeChanges':!!_0x1f12f8['changes']});console[_0x430178(0x126)](_0x430178(0x346)+_0x35d641[_0x430178(0x183)]+'\x20\x20records='+_0x35d641['records']+_0x430178(0x32f)+_0x35d641['changes']);if(_0x1f12f8[_0x430178(0x318)]){const _0x77041d=_0x170f48[_0x430178(0x1e3)](_0x170f48[_0x430178(0x284)](_0x12d847),'blobs');process[_0x430178(0x209)]['write'](_0x430178(0x3c7));const {count:_0x23ef3d,bytes:_0x46938c}=await _0x3bb4c3[_0x430178(0x1b0)]['exportBlobs'](_0x77041d);console[_0x430178(0x126)](_0x430178(0x2ea)+_0x77041d+_0x430178(0x285)+_0x23ef3d+'\x20file'+(_0x23ef3d!==0x1?'s':'')+',\x20'+(_0x46938c/0x400/0x400)[_0x430178(0x1e0)](0x2)+'\x20MB)');}await _0x3bb4c3[_0x430178(0x199)](),console['log']('[okdb]\x20export\x20complete');}async function _0x14dd19(_0x5a25d5,_0x5e2bdf,_0x55538b){const _0x282399=_0x45586a,_0x349230=require$$5,_0x272a87=_0x170f48['resolve'](_0x5e2bdf['dbPath']),_0x21c6e8=_0x55538b[_0x282399(0x100)]??null,_0x1f4031=_0x55538b['types']?_0x55538b[_0x282399(0x183)][_0x282399(0x2ae)](',')[_0x282399(0x1b2)](_0x52ef2b=>_0x52ef2b[_0x282399(0x201)]()):null,_0xa23dd2=!!_0x55538b[_0x282399(0x248)];console[_0x282399(0x126)](_0x282399(0x123)+_0x272a87+'…');const _0x558c37=new _0x349230(_0x272a87,_0x5e2bdf['key']?{'encryptionKey':_0x5e2bdf['key']}:{});await _0x558c37[_0x282399(0x36d)](),console[_0x282399(0x126)](_0x282399(0x358)+_0x5a25d5+'…');const _0x217740=await _0x558c37[_0x282399(0x1b0)][_0x282399(0x1bd)](_0x5a25d5,{'envName':_0x21c6e8,'types':_0x1f4031,'dropExisting':_0xa23dd2,'includeChanges':!!_0x55538b[_0x282399(0x330)],'onProgress':({type:_0x3768b8,count:_0x17e567})=>{const _0xb9d21e=_0x282399;process['stdout'][_0xb9d21e(0x2d9)](_0xb9d21e(0x28a)+_0x3768b8+':\x20'+_0x17e567+_0xb9d21e(0x175));}});process['stdout'][_0x282399(0x2d9)]('\x0a'),console['log']('[okdb]\x20imported\x20\x20types='+_0x217740[_0x282399(0x183)]+_0x282399(0x1ba)+_0x217740[_0x282399(0x341)]+_0x282399(0x32f)+_0x217740[_0x282399(0x330)]);if(_0x55538b[_0x282399(0x318)]){const _0x5ed52f=_0x170f48[_0x282399(0x1e3)](_0x170f48[_0x282399(0x284)](_0x5a25d5),_0x282399(0x318));if(_0x465e48['existsSync'](_0x5ed52f)){const {imported:_0xe07339,skipped:_0xfdcd25}=await _0x558c37['migrate'][_0x282399(0x1f2)](_0x5ed52f);console[_0x282399(0x126)]('[okdb]\x20blobs:\x20imported='+_0xe07339+_0x282399(0x304)+_0xfdcd25);}}await _0x558c37[_0x282399(0x199)](),console[_0x282399(0x126)](_0x282399(0x15f));}async function _0x5a8a9e(_0x2651f8,_0x39328f){const _0x183ec6=_0x45586a;_0x39328f[_0x183ec6(0x2c4)]&&!_0x39328f[_0x183ec6(0x33e)]&&(console[_0x183ec6(0x33c)]('[okdb]\x20error:\x20--password\x20requires\x20--name'),process[_0x183ec6(0x377)](0x1));const _0x24569f=_0x39328f[_0x183ec6(0x176)]?_0x39328f[_0x183ec6(0x176)][_0x183ec6(0x2ae)](',')[_0x183ec6(0x1b2)](_0x11422e=>_0x11422e['trim']())['filter'](Boolean):[];let _0x47126e={};if(_0x39328f[_0x183ec6(0x20a)])try{_0x47126e=JSON[_0x183ec6(0x11b)](_0x39328f['grants']);if(typeof _0x47126e!==_0x183ec6(0x32d)||Array[_0x183ec6(0x18c)](_0x47126e)||_0x47126e===null)throw new Error();}catch{console['error'](_0x183ec6(0x16a)),process[_0x183ec6(0x377)](0x1);}const _0x5c23af=require$$5,{randomToken:_0x4b487d,hashToken:_0x141d6e,hashPassword:_0x2e6885}=requireOkdbAuthTokens(),_0x5138a6=require$$0,_0x1a9156=_0x170f48[_0x183ec6(0x132)](_0x2651f8[_0x183ec6(0x29f)]),_0x4fbb5f=new _0x5c23af(_0x1a9156,_0x2651f8[_0x183ec6(0x1ec)]?{'encryptionKey':_0x2651f8[_0x183ec6(0x1ec)]}:{});await _0x4fbb5f[_0x183ec6(0x36d)]();try{await _0x4fbb5f[_0x183ec6(0x38e)][_0x183ec6(0x18a)]();if(_0x39328f[_0x183ec6(0x33e)]){const _0x117039=await _0x4fbb5f[_0x183ec6(0x38e)][_0x183ec6(0x382)](_0x39328f['name']);_0x117039&&(console[_0x183ec6(0x33c)]('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x39328f[_0x183ec6(0x33e)]+_0x183ec6(0x2e6)),process['exit'](0x1));}const _0x2704af=_0x4b487d(0x20),_0x8e5fba=_0x141d6e(_0x2704af),_0x238bdc=_0x39328f[_0x183ec6(0x2c4)]?await _0x2e6885(_0x39328f[_0x183ec6(0x2c4)]):null,_0x42d311=_0x5138a6['randomUUID'](),_0x19c204={'tokenHash':_0x8e5fba,'name':_0x39328f[_0x183ec6(0x33e)]||null,'passwordHash':_0x238bdc,'label':_0x39328f[_0x183ec6(0x152)]||null,'permissions':_0x24569f,'grants':_0x47126e,'createdAt':Date[_0x183ec6(0x1c3)](),'lastUsedAt':null},_0x1a9907=_0x39328f[_0x183ec6(0x215)]?{'ttl':Number(_0x39328f[_0x183ec6(0x215)])}:undefined;await _0x4fbb5f[_0x183ec6(0x129)][_0x183ec6(0x352)](_0x183ec6(0x127),_0x42d311,_0x19c204,_0x1a9907),console['log']('\x0a\x20\x20✓\x20Token\x20created'),console[_0x183ec6(0x126)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x42d311),console[_0x183ec6(0x126)](_0x183ec6(0x267)+(_0x39328f[_0x183ec6(0x33e)]||_0x183ec6(0x2a1))),console[_0x183ec6(0x126)](_0x183ec6(0x272)+(_0x39328f[_0x183ec6(0x152)]||'(unset)')),console[_0x183ec6(0x126)](_0x183ec6(0x34b)+(_0x24569f[_0x183ec6(0x1e3)](',\x20')||_0x183ec6(0x329))),console[_0x183ec6(0x126)](_0x183ec6(0x1bf)),console[_0x183ec6(0x126)](_0x183ec6(0x2da)+_0x2704af+'\x0a');}finally{await _0x4fbb5f[_0x183ec6(0x199)]();}}async function _0x516630(_0x1b2f75){const _0x484b71=_0x45586a,_0x12fc25=require$$5,_0x31d324=_0x170f48[_0x484b71(0x132)](_0x1b2f75[_0x484b71(0x29f)]),_0x36bfb9=new _0x12fc25(_0x31d324,_0x1b2f75[_0x484b71(0x1ec)]?{'encryptionKey':_0x1b2f75[_0x484b71(0x1ec)]}:{});await _0x36bfb9['open']();try{const _0x1a0359=_0x36bfb9['_systemEnv'];if(!_0x1a0359||!_0x1a0359[_0x484b71(0x228)]('~tokens')){console['log'](_0x484b71(0x31d));return;}const _0x4401cb=[];for(const {key:_0x3b928c,value:_0xce3a18}of _0x1a0359[_0x484b71(0x1ff)]('~tokens')){_0x4401cb[_0x484b71(0x3c8)]({'id':_0x3b928c,'name':_0xce3a18[_0x484b71(0x33e)]||_0x484b71(0x2a1),'label':_0xce3a18[_0x484b71(0x152)]||_0x484b71(0x2a1),'permissions':Array[_0x484b71(0x18c)](_0xce3a18[_0x484b71(0x176)])?_0xce3a18[_0x484b71(0x176)]['join'](','):'','created':_0xce3a18[_0x484b71(0x169)]?new Date(_0xce3a18[_0x484b71(0x169)])[_0x484b71(0x23b)]()[_0x484b71(0x343)](0x0,0xa):''});}if(_0x4401cb[_0x484b71(0x369)]===0x0){console['log'](_0x484b71(0x31d));return;}const _0x110d05=!process[_0x484b71(0x209)]['columns']||process[_0x484b71(0x209)][_0x484b71(0x1d0)]>=0x64,_0x531b8c=_0x110d05?0x24:0xa,_0x15cfcf=['ID'['padEnd'](_0x531b8c),_0x484b71(0x380)['padEnd'](0x10),_0x484b71(0x296)['padEnd'](0x14),_0x484b71(0x311)[_0x484b71(0x18f)](0x14),_0x484b71(0x26f)][_0x484b71(0x1e3)]('\x20\x20');console['log']('\x0a'+_0x15cfcf),console[_0x484b71(0x126)]('-'[_0x484b71(0x325)](_0x15cfcf[_0x484b71(0x369)]));for(const _0x1c3e3a of _0x4401cb){const _0x32eaa9=_0x110d05?_0x1c3e3a['id']:_0x1c3e3a['id'][_0x484b71(0x343)](0x0,0x8)+'…';console[_0x484b71(0x126)]([_0x32eaa9[_0x484b71(0x18f)](_0x531b8c),_0x1c3e3a['name'][_0x484b71(0x343)](0x0,0x10)[_0x484b71(0x18f)](0x10),_0x1c3e3a[_0x484b71(0x152)][_0x484b71(0x343)](0x0,0x14)['padEnd'](0x14),_0x1c3e3a[_0x484b71(0x176)][_0x484b71(0x343)](0x0,0x14)[_0x484b71(0x18f)](0x14),_0x1c3e3a[_0x484b71(0x270)]][_0x484b71(0x1e3)]('\x20\x20'));}console['log']('');}finally{await _0x36bfb9[_0x484b71(0x199)]();}}async function _0xef998c(_0x24716e,_0x193af5){const _0x1d4a25=_0x45586a;!_0x24716e&&(console[_0x1d4a25(0x33c)](_0x1d4a25(0x13e)),process[_0x1d4a25(0x377)](0x1));const _0x293c61=require$$5,_0x5f5b41=_0x170f48['resolve'](_0x193af5[_0x1d4a25(0x29f)]),_0x470475=new _0x293c61(_0x5f5b41,_0x193af5[_0x1d4a25(0x1ec)]?{'encryptionKey':_0x193af5[_0x1d4a25(0x1ec)]}:{});await _0x470475[_0x1d4a25(0x36d)]();try{const _0x32b8e4=_0x470475['_systemEnv'];(!_0x32b8e4||!_0x32b8e4[_0x1d4a25(0x228)](_0x1d4a25(0x127)))&&(console['error'](_0x1d4a25(0x2b4)+_0x24716e+'\x22'),process[_0x1d4a25(0x377)](0x1));let _0x2102b9=null,_0x3f0168=null;const _0x9073f3=_0x32b8e4['get']('~tokens',_0x24716e);if(_0x9073f3)_0x2102b9=_0x24716e,_0x3f0168=_0x9073f3;else{const _0x30d712=[];for(const {key:_0x5d5ca3,value:_0x32cdda}of _0x32b8e4['getRange'](_0x1d4a25(0x127))){if(_0x5d5ca3[_0x1d4a25(0x13b)](_0x24716e))_0x30d712[_0x1d4a25(0x3c8)]({'key':_0x5d5ca3,'value':_0x32cdda});}_0x30d712['length']===0x0&&(console[_0x1d4a25(0x33c)](_0x1d4a25(0x2b4)+_0x24716e+'\x22'),process[_0x1d4a25(0x377)](0x1));if(_0x30d712['length']>0x1){console[_0x1d4a25(0x33c)](_0x1d4a25(0x2ab)+_0x24716e+_0x1d4a25(0x243)+_0x30d712[_0x1d4a25(0x369)]+_0x1d4a25(0x16d));for(const _0x14eab of _0x30d712){console[_0x1d4a25(0x33c)]('\x20\x20'+_0x14eab['key']+_0x1d4a25(0x2b6)+(_0x14eab['value'][_0x1d4a25(0x33e)]||_0x1d4a25(0x2a1))+')');}process[_0x1d4a25(0x377)](0x1);}_0x2102b9=_0x30d712[0x0][_0x1d4a25(0x1ec)],_0x3f0168=_0x30d712[0x0][_0x1d4a25(0x17b)];}await _0x32b8e4[_0x1d4a25(0x300)]('~tokens',_0x2102b9),console['log'](_0x1d4a25(0x32c)+_0x2102b9+'\x20\x20(name:\x20'+(_0x3f0168['name']||_0x1d4a25(0x2a1))+',\x20label:\x20'+(_0x3f0168['label']||_0x1d4a25(0x2a1))+')');}finally{await _0x470475[_0x1d4a25(0x199)]();}}function _0x4fcf48(_0xe1dc03,_0x16d694){const _0x4778c8=_0x45586a;if(!_0xe1dc03[_0x4778c8(0x2d8)])return _0x4778c8(0x3ee);const _0x313525=_0xe1dc03[_0x4778c8(0x230)];if(!_0x313525)return _0x4778c8(0x2aa);if(_0x16d694>_0x313525)return _0x4778c8(0x2b2);return'active';}function _0x28984f(_0x3cdc71){const _0x5a6e80=_0x45586a;if(!_0x3cdc71||typeof _0x3cdc71!=='object')return'';const _0x341e29=Object[_0x5a6e80(0x316)](_0x3cdc71)['filter'](([,_0x5a9a9b])=>_0x5a9a9b)[_0x5a6e80(0x1b2)](([_0x538511])=>_0x538511);if(_0x341e29[_0x5a6e80(0x369)]===0x0)return'(none)';if(_0x341e29[_0x5a6e80(0x369)]<=0x3)return _0x341e29['join']('\x20');return _0x341e29['slice'](0x0,0x3)[_0x5a6e80(0x1e3)]('\x20')+('\x20+'+(_0x341e29['length']-0x3));}async function _0xf4c92f(_0x1a9f58){const _0x470061=_0x45586a,_0x46fc21=require$$5,_0x27c437=requireOkdbLicenseCodec(),{_C:_0x50b477}=requireOkdbLicense(),_0x502458=_0x170f48[_0x470061(0x132)](_0x1a9f58[_0x470061(0x29f)]),_0x1b7d3b=new _0x46fc21(_0x502458,_0x1a9f58['key']?{'encryptionKey':_0x1a9f58[_0x470061(0x1ec)]}:{});await _0x1b7d3b[_0x470061(0x36d)]();try{const _0xc3c6=_0x1b7d3b[_0x470061(0x129)],_0x3ed25a=_0xc3c6?.['db']?.[_0x470061(0x288)]?.('__writeCounter')??0x0,_0xaa0ee7=[..._0x1b7d3b['_envs']['keys']()][_0x470061(0x218)](_0x524703=>!_0x524703[_0x470061(0x13b)]('~'))[_0x470061(0x369)],_0x5118fc=_0x1b7d3b[_0x470061(0x376)]?.[_0x470061(0x106)];if(_0x5118fc){const _0x31c70e=_0x5118fc[_0x470061(0x3d8)]===!![],_0x3f85e8=_0x31c70e?_0x470061(0x368):_0x1b7d3b[_0x470061(0x376)][_0x470061(0x2aa)]?.[_0x470061(0x310)]||_0x470061(0x2e4);console[_0x470061(0x126)](''),console[_0x470061(0x126)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x3f85e8);const _0x302cf8=_0x5118fc[_0x470061(0x2f6)]||{};if(_0x302cf8[_0x470061(0x333)]){const _0x49167a=Math[_0x470061(0x1f6)](_0x3ed25a/_0x302cf8[_0x470061(0x333)]*0x64);console['log'](_0x470061(0x3aa)+_0x3ed25a[_0x470061(0x26a)]()+_0x470061(0x1eb)+_0x302cf8[_0x470061(0x333)]['toLocaleString']()+_0x470061(0x285)+_0x49167a+'%)');}else console[_0x470061(0x126)](_0x470061(0x3aa)+_0x3ed25a[_0x470061(0x26a)]());_0x302cf8['envs']?console[_0x470061(0x126)](_0x470061(0x23c)+_0xaa0ee7+_0x470061(0x1eb)+_0x302cf8['envs']):console[_0x470061(0x126)](_0x470061(0x23c)+_0xaa0ee7),_0x50b477?.[_0x470061(0x233)]&&console[_0x470061(0x126)](_0x470061(0x3bd)+_0x50b477[_0x470061(0x233)]+'\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)');}if(!_0xc3c6||!_0xc3c6[_0x470061(0x228)](_0x470061(0x154))){console[_0x470061(0x126)](''),console[_0x470061(0x126)](_0x470061(0x26d)),console[_0x470061(0x126)]('');return;}const _0x4ad6a9=[],_0xdada1e=Date[_0x470061(0x1c3)](),_0x1195f0=_0x1b7d3b['id'],_0x10e591='__OKDB_PUB_FINGERPRINT__';for(const {key:_0x3238ec,value:_0x11d7db}of _0xc3c6['getRange'](_0x470061(0x154))){const _0x332c0e=_0x11d7db[_0x470061(0x1bc)]?Buffer['from'](_0x11d7db[_0x470061(0x1bc)],'hex'):Buffer['alloc'](0x8);let _0x4b08c5='';try{_0x4b08c5=_0x27c437[_0x470061(0x28b)](_0x1195f0,_0x332c0e,_0x10e591)[_0x470061(0x2a5)];}catch{}_0x4ad6a9[_0x470061(0x3c8)]({'id':_0x3238ec,'licensee':_0x11d7db['licensee']||'','expires':_0x11d7db['expiresAt']?new Date(_0x11d7db[_0x470061(0x230)])[_0x470061(0x23b)]()[_0x470061(0x343)](0x0,0xa):'','features':_0x28984f(_0x11d7db[_0x470061(0x34c)]),'pin':_0x4b08c5,'status':_0x4fcf48(_0x11d7db,_0xdada1e)});}if(_0x4ad6a9[_0x470061(0x369)]===0x0){console['log'](''),console[_0x470061(0x126)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x470061(0x126)]('');return;}const _0x2371e6=['\x20\x20'+'ID'[_0x470061(0x18f)](0xe),_0x470061(0x2e1)[_0x470061(0x18f)](0xe),_0x470061(0x331)[_0x470061(0x18f)](0xc),'FEATURES'[_0x470061(0x18f)](0x1e),_0x470061(0x14e)[_0x470061(0x18f)](0xa),_0x470061(0x372)][_0x470061(0x1e3)]('\x20');console[_0x470061(0x126)]('\x0a'+_0x2371e6);for(const _0x1139a2 of _0x4ad6a9){const _0x37cf75=_0x1139a2['id']['slice'](0x0,0x8)+'…';console[_0x470061(0x126)](['\x20\x20'+_0x37cf75['padEnd'](0xe),_0x1139a2['licensee'][_0x470061(0x343)](0x0,0xe)[_0x470061(0x18f)](0xe),_0x1139a2[_0x470061(0x33b)][_0x470061(0x18f)](0xc),_0x1139a2[_0x470061(0x34c)]['slice'](0x0,0x1e)['padEnd'](0x1e),_0x1139a2['pin'][_0x470061(0x18f)](0xa),_0x1139a2['status']][_0x470061(0x1e3)]('\x20'));}console[_0x470061(0x126)]('');}finally{await _0x1b7d3b[_0x470061(0x199)]();}}async function _0x4b0bea(_0x550257,_0x38b3fa){const _0xcbc10=_0x45586a,_0x2a59d1=require$$5,_0x18dcc9=requireOkdbLicenseCodec();let _0x173e6e=_0x550257;(_0x18dcc9[_0xcbc10(0x30d)](_0x550257)==='path'||_0x465e48[_0xcbc10(0x1ac)](_0x550257)&&_0x465e48['statSync'](_0x550257)[_0xcbc10(0x3e7)]())&&(_0x173e6e=_0x465e48[_0xcbc10(0x277)](_0x550257,_0xcbc10(0x25d))['trim']());const _0x44354f=_0x170f48[_0xcbc10(0x132)](_0x38b3fa[_0xcbc10(0x29f)]),_0x48712b=new _0x2a59d1(_0x44354f,_0x38b3fa[_0xcbc10(0x1ec)]?{'encryptionKey':_0x38b3fa['key']}:{});await _0x48712b[_0xcbc10(0x36d)]();try{!_0x48712b[_0xcbc10(0x376)]&&(console['error'](_0xcbc10(0x39b)),process[_0xcbc10(0x377)](0x1));let _0x1e5123;try{_0x1e5123=await _0x48712b[_0xcbc10(0x376)][_0xcbc10(0x3d6)](_0x173e6e);}catch(_0x1b8b50){console[_0xcbc10(0x33c)](_0xcbc10(0x20f)+_0x1b8b50[_0xcbc10(0x10a)]),process[_0xcbc10(0x377)](0x1);}const _0x26902b=_0x48712b['_license'][_0xcbc10(0x219)](),_0x9ab0d8=_0x26902b[_0xcbc10(0x22b)](_0x14854b=>_0x14854b[_0xcbc10(0x1fb)]===_0x1e5123['id'])?.['pin']||'',_0x33d2aa=Object[_0xcbc10(0x316)](_0x1e5123[_0xcbc10(0x34c)]||{})[_0xcbc10(0x218)](([,_0x303f6b])=>_0x303f6b)[_0xcbc10(0x1b2)](([_0x5d4147])=>_0x5d4147),_0x471719=_0x1e5123[_0xcbc10(0x2f6)]||{},_0x1e40f2=[_0x471719[_0xcbc10(0x2d4)]?_0xcbc10(0x15b)+_0x471719[_0xcbc10(0x2d4)]:null,_0x471719[_0xcbc10(0x339)]?'types/env='+_0x471719[_0xcbc10(0x339)]:null,_0x471719[_0xcbc10(0x281)]?_0xcbc10(0x239)+_0x471719[_0xcbc10(0x281)]:null,_0x471719['maxWrites']?_0xcbc10(0x205)+_0x471719[_0xcbc10(0x333)][_0xcbc10(0x26a)]():null]['filter'](Boolean)[_0xcbc10(0x1e3)]('\x20\x20'),_0x4d0fb6=_0x1e5123[_0xcbc10(0x156)]===_0x18dcc9[_0xcbc10(0x145)];console[_0xcbc10(0x126)](_0xcbc10(0x24a)),console[_0xcbc10(0x126)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1e5123['id']),console[_0xcbc10(0x126)](_0xcbc10(0x336)+_0x1e5123['licensee']),console[_0xcbc10(0x126)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x1e5123[_0xcbc10(0x230)])[_0xcbc10(0x23b)]()[_0xcbc10(0x343)](0x0,0xa)),console[_0xcbc10(0x126)](_0xcbc10(0x3bf)+(_0x33d2aa[_0xcbc10(0x1e3)](',\x20')||_0xcbc10(0x329)));if(_0x1e40f2)console['log'](_0xcbc10(0x10d)+_0x1e40f2);_0x4d0fb6?(console[_0xcbc10(0x126)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console['log']('')):(console[_0xcbc10(0x126)](_0xcbc10(0x315)+_0x9ab0d8),console[_0xcbc10(0x126)](_0xcbc10(0x3f7)),console['log'](''),console['log'](_0xcbc10(0x224)),console[_0xcbc10(0x126)](_0xcbc10(0x242)+_0x9ab0d8+_0xcbc10(0x3e6)),console[_0xcbc10(0x126)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0xcbc10(0x126)](_0xcbc10(0x2c6)),console[_0xcbc10(0x126)](''));}finally{await _0x48712b[_0xcbc10(0x199)]();}}async function _0x2f88d0(_0x5e23a0,_0x161145){const _0x500a6d=_0x45586a,_0x95f374=require$$5,_0x515f8f=_0x170f48[_0x500a6d(0x132)](_0x161145[_0x500a6d(0x29f)]),_0x46ef36=new _0x95f374(_0x515f8f,_0x161145[_0x500a6d(0x1ec)]?{'encryptionKey':_0x161145[_0x500a6d(0x1ec)]}:{});await _0x46ef36['open']();try{!_0x46ef36['_license']&&(console[_0x500a6d(0x33c)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x500a6d(0x377)](0x1));let _0x2ae327;try{_0x2ae327=await _0x46ef36[_0x500a6d(0x376)]['activateLicense'](_0x5e23a0[_0x500a6d(0x201)]());}catch(_0x13a070){console[_0x500a6d(0x33c)]('[okdb]\x20error:\x20'+_0x13a070[_0x500a6d(0x10a)]),console[_0x500a6d(0x33c)](''),console['error'](_0x500a6d(0x1ab)),console[_0x500a6d(0x33c)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console['error'](_0x500a6d(0x1ea)),console[_0x500a6d(0x33c)](_0x500a6d(0x1a0)),console[_0x500a6d(0x33c)](''),process[_0x500a6d(0x377)](0x1);}console['log'](_0x500a6d(0x3e9)),console[_0x500a6d(0x126)](_0x500a6d(0x3d0)+_0x2ae327['id']),console[_0x500a6d(0x126)](_0x500a6d(0x336)+_0x2ae327['licensee']),console[_0x500a6d(0x126)](_0x500a6d(0x2af)+new Date(_0x2ae327[_0x500a6d(0x230)])[_0x500a6d(0x23b)]()[_0x500a6d(0x343)](0x0,0xa)),console[_0x500a6d(0x126)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x500a6d(0x126)]('');}finally{await _0x46ef36[_0x500a6d(0x199)]();}}async function _0x50929f(_0xcb5c34,_0xed665){const _0x41968f=_0x45586a;!_0xcb5c34&&(console['error'](_0x41968f(0x143)),process[_0x41968f(0x377)](0x1));const _0x33190b=require$$5,_0x510321=requireOkdbLicenseCodec(),_0x3cecc5=_0x170f48['resolve'](_0xed665['dbPath']),_0x3831fa=new _0x33190b(_0x3cecc5,_0xed665[_0x41968f(0x1ec)]?{'encryptionKey':_0xed665['key']}:{});await _0x3831fa[_0x41968f(0x36d)]();try{const _0x540a62=_0x3831fa[_0x41968f(0x129)];(!_0x540a62||!_0x540a62[_0x41968f(0x228)](_0x41968f(0x154)))&&(console[_0x41968f(0x33c)](_0x41968f(0x1c9)+_0xcb5c34+'\x22'),process[_0x41968f(0x377)](0x1));let _0x2f9bc6=null,_0x42a72e=null;const _0xcf89b1=_0x540a62[_0x41968f(0x288)](_0x41968f(0x154),_0xcb5c34);if(_0xcf89b1)_0x2f9bc6=_0xcb5c34,_0x42a72e=_0xcf89b1;else{const _0x36290b=[];for(const {key:_0x3bd37d,value:_0x600c98}of _0x540a62['getRange'](_0x41968f(0x154))){if(_0x3bd37d['startsWith'](_0xcb5c34))_0x36290b[_0x41968f(0x3c8)]({'key':_0x3bd37d,'value':_0x600c98});}_0x36290b[_0x41968f(0x369)]===0x0&&(console['error'](_0x41968f(0x1c9)+_0xcb5c34+'\x22'),process[_0x41968f(0x377)](0x1)),_0x36290b['length']>0x1&&(console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0xcb5c34+_0x41968f(0x243)+_0x36290b[_0x41968f(0x369)]+_0x41968f(0x264)),process[_0x41968f(0x377)](0x1)),_0x2f9bc6=_0x36290b[0x0]['key'],_0x42a72e=_0x36290b[0x0][_0x41968f(0x17b)];}const _0x252d5e=Date[_0x41968f(0x1c3)](),_0x3f61f8=_0x4fcf48(_0x42a72e,_0x252d5e),_0x45633a=_0x3831fa['id'],_0x5beff2=_0x41968f(0x158);let _0x795064='';try{const _0x3e3e56=Buffer['from'](_0x42a72e[_0x41968f(0x1bc)],_0x41968f(0x139));_0x795064=_0x510321[_0x41968f(0x28b)](_0x45633a,_0x3e3e56,_0x5beff2)['pin'];}catch{}const _0x3c9ae0=_0x42a72e['features']?Object[_0x41968f(0x316)](_0x42a72e[_0x41968f(0x34c)])[_0x41968f(0x218)](([,_0x21b230])=>_0x21b230)[_0x41968f(0x1b2)](([_0x55c0a8])=>_0x55c0a8):[],_0x39cca3=_0x42a72e[_0x41968f(0x2f6)]||{},_0x4bd557=_0x540a62?.['db']?.[_0x41968f(0x288)]?.(_0x41968f(0x1cf))??0x0,_0x47c940=[..._0x3831fa[_0x41968f(0x2a9)][_0x41968f(0x2cb)]()][_0x41968f(0x218)](_0x11dc01=>!_0x11dc01[_0x41968f(0x13b)]('~'))[_0x41968f(0x369)];console[_0x41968f(0x126)]('\x0a\x20\x20License\x20details:'),console[_0x41968f(0x126)](_0x41968f(0x3d0)+_0x2f9bc6),console[_0x41968f(0x126)]('\x20\x20\x20\x20licensee:\x20\x20'+(_0x42a72e[_0x41968f(0x310)]||'')),console[_0x41968f(0x126)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x42a72e['expiresAt']?new Date(_0x42a72e[_0x41968f(0x230)])[_0x41968f(0x23b)]()[_0x41968f(0x343)](0x0,0xa):'')),console[_0x41968f(0x126)]('\x20\x20\x20\x20features:\x20\x20'+(_0x3c9ae0[_0x41968f(0x1e3)](',\x20')||_0x41968f(0x329))),console['log'](_0x41968f(0x315)+_0x795064),console[_0x41968f(0x126)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x3f61f8),console[_0x41968f(0x126)]('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x42a72e[_0x41968f(0x212)])[_0x41968f(0x23b)]());if(_0x3f61f8===_0x41968f(0x2aa)){console[_0x41968f(0x126)](''),console[_0x41968f(0x126)](_0x41968f(0x32e));if(_0x39cca3['maxWrites']){const _0xc685b=Math[_0x41968f(0x1f6)](_0x4bd557/_0x39cca3[_0x41968f(0x333)]*0x64);console[_0x41968f(0x126)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x4bd557['toLocaleString']()+_0x41968f(0x1eb)+_0x39cca3[_0x41968f(0x333)][_0x41968f(0x26a)]()+'\x20\x20('+_0xc685b+'%)');}else console['log']('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x4bd557[_0x41968f(0x26a)]()+_0x41968f(0x214));_0x39cca3[_0x41968f(0x2d4)]?console[_0x41968f(0x126)](_0x41968f(0x2c7)+_0x47c940+_0x41968f(0x1eb)+_0x39cca3[_0x41968f(0x2d4)]):console[_0x41968f(0x126)](_0x41968f(0x2c7)+_0x47c940+_0x41968f(0x214));}console[_0x41968f(0x126)]('');}finally{await _0x3831fa[_0x41968f(0x199)]();}}async function _0x5a171d(_0x6e0e18,_0x35ced8){const _0x34a628=_0x45586a;!_0x6e0e18&&(console[_0x34a628(0x33c)](_0x34a628(0x1a3)),process[_0x34a628(0x377)](0x1));const _0x287db0=require$$5,_0x2c3871=_0x170f48[_0x34a628(0x132)](_0x35ced8[_0x34a628(0x29f)]),_0x2af399=new _0x287db0(_0x2c3871,_0x35ced8[_0x34a628(0x1ec)]?{'encryptionKey':_0x35ced8[_0x34a628(0x1ec)]}:{});await _0x2af399[_0x34a628(0x36d)]();try{const _0x5b5571=_0x2af399[_0x34a628(0x129)];(!_0x5b5571||!_0x5b5571[_0x34a628(0x228)](_0x34a628(0x154)))&&(console[_0x34a628(0x33c)](_0x34a628(0x1c9)+_0x6e0e18+'\x22'),process[_0x34a628(0x377)](0x1));let _0x2db695=null,_0x3723b2=null;const _0x31a5c4=_0x5b5571['get'](_0x34a628(0x154),_0x6e0e18);if(_0x31a5c4)_0x2db695=_0x6e0e18,_0x3723b2=_0x31a5c4;else{const _0x34f587=[];for(const {key:_0x228ec8,value:_0x121fad}of _0x5b5571[_0x34a628(0x1ff)](_0x34a628(0x154))){if(_0x228ec8['startsWith'](_0x6e0e18))_0x34f587[_0x34a628(0x3c8)]({'key':_0x228ec8,'value':_0x121fad});}_0x34f587[_0x34a628(0x369)]===0x0&&(console[_0x34a628(0x33c)](_0x34a628(0x1c9)+_0x6e0e18+'\x22'),process['exit'](0x1)),_0x34f587['length']>0x1&&(console[_0x34a628(0x33c)](_0x34a628(0x2ab)+_0x6e0e18+_0x34a628(0x243)+_0x34f587[_0x34a628(0x369)]+_0x34a628(0x264)),process[_0x34a628(0x377)](0x1)),_0x2db695=_0x34f587[0x0][_0x34a628(0x1ec)],_0x3723b2=_0x34f587[0x0][_0x34a628(0x17b)];}await _0x5b5571[_0x34a628(0x300)](_0x34a628(0x154),_0x2db695),console[_0x34a628(0x126)](_0x34a628(0x2e0)+_0x2db695+_0x34a628(0x2fc)+(_0x3723b2[_0x34a628(0x310)]||_0x34a628(0x2a1))+')');}finally{await _0x2af399[_0x34a628(0x199)]();}}async function _0x3a1a26(_0x2d190f,_0x17f3c2,_0x540144){const _0x3764c8=_0x45586a;!_0x2d190f&&(console[_0x3764c8(0x33c)](_0x3764c8(0x3ef)),process['exit'](0x1));!_0x540144[_0x3764c8(0x396)]&&!(_0x540144[_0x3764c8(0x137)]&&_0x540144[_0x3764c8(0x2c4)])&&(console[_0x3764c8(0x33c)](_0x3764c8(0x35d)),process[_0x3764c8(0x377)](0x1));const _0x44e60b=_0x540144[_0x3764c8(0x3de)]||_0x17f3c2[_0x3764c8(0x3c3)]?.[_0x3764c8(0x3e4)];!_0x44e60b&&(console[_0x3764c8(0x33c)](_0x3764c8(0x37c)+_0x3764c8(0x3d1)+_0x3764c8(0x192)),process[_0x3764c8(0x377)](0x1));const _0x15f3aa=require$$5,_0x97b54=new _0x15f3aa(_0x17f3c2[_0x3764c8(0x29f)],{'sync':{'address':_0x44e60b,'auto_reconcile':![]}});await _0x97b54[_0x3764c8(0x36d)]();try{const _0xf6d304=_0x97b54[_0x3764c8(0x129)];if(_0xf6d304&&_0xf6d304[_0x3764c8(0x228)](_0x3764c8(0x127))){let _0xc4dff7=![];for(const _0x5c53a0 of _0xf6d304[_0x3764c8(0x1ff)](_0x3764c8(0x127))){_0xc4dff7=!![];break;}_0xc4dff7&&console[_0x3764c8(0x126)](_0x3764c8(0x3ea)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console[_0x3764c8(0x126)]('\x0a\x20\x20Joining\x20cluster\x20at\x20'+_0x2d190f+'…'),await _0x97b54['sync'][_0x3764c8(0x1e3)](_0x2d190f[_0x3764c8(0x320)](/\/+$/,''),{'token':_0x540144[_0x3764c8(0x396)],'username':_0x540144['username'],'password':_0x540144[_0x3764c8(0x2c4)]}),console['log'](_0x3764c8(0x225)),console[_0x3764c8(0x126)](_0x3764c8(0x3f3));}finally{await _0x97b54[_0x3764c8(0x199)]();}}async function _0x632ee1(){const _0x309dc5=_0x45586a,_0x366a36=Date['now'](),_0x529a4d=_0x2f33be(process[_0x309dc5(0x182)]),_0x3db002=_0x2bdfc3(_0x529a4d),_0x541011=_0x170f48[_0x309dc5(0x132)](_0x3db002[_0x309dc5(0x29f)]);!_0x3db002[_0x309dc5(0x2f8)]&&!process[_0x309dc5(0x3dd)][_0x309dc5(0x1d2)]&&(_0x3db002['noRepl']=!![]);const _0x3d726d=require$$5,{start:_0x59f7bb,colorLog:_0x36fffe}=requireOkdbShell(),_0x4cc28d={..._0x3db002['key']?{'encryptionKey':_0x3db002['key']}:{},..._0x3db002[_0x309dc5(0x29b)]?{'admin':![]}:_0x3b22c0(_0x3db002[_0x309dc5(0x353)])?{'admin':_0x3db002[_0x309dc5(0x353)]}:{},..._0x3b22c0(_0x3db002[_0x309dc5(0x348)])?{'api':_0x3db002['api']}:{},..._0x3b22c0(_0x3db002[_0x309dc5(0x38e)])?{'auth':_0x3db002[_0x309dc5(0x38e)]}:{},..._0x3b22c0(_0x3db002['mcp'])?{'mcp':_0x3db002[_0x309dc5(0x2c8)]}:{},..._0x3db002[_0x309dc5(0x21e)]!==![]?{'timeMachine':_0x3db002[_0x309dc5(0x21e)]}:{}},_0x44fcdc=new _0x3d726d(_0x541011,_0x4cc28d);_0x44fcdc[_0x309dc5(0x126)][_0x309dc5(0x299)]?.();const _0x3b1369=_0x44fcdc[_0x309dc5(0x126)][_0x309dc5(0x2e3)](_0x491981=>_0x36fffe(_0x491981,_0x3db002[_0x309dc5(0x354)]));if(_0x3db002[_0x309dc5(0x2f8)])process[_0x309dc5(0x209)]['write'](_0x309dc5(0x379));await _0x44fcdc[_0x309dc5(0x36d)]();if(_0x3db002[_0x309dc5(0x2f8)])process[_0x309dc5(0x209)]['write'](_0x309dc5(0x34f));try{await _0x2e8ce7(_0x44fcdc,_0x3db002[_0x309dc5(0x1a8)]);}catch(_0x25b70a){_0x25b70a[_0x309dc5(0x399)]===_0x309dc5(0x35e)&&(console[_0x309dc5(0x33c)](_0x309dc5(0x362)+_0x3db002[_0x309dc5(0x1a8)]+_0x309dc5(0x34e)),process[_0x309dc5(0x377)](0x1));throw _0x25b70a;}if(_0x3db002[_0x309dc5(0x2f8)])process['stdout'][_0x309dc5(0x2d9)]('\x20\x20✓\x20http\x20listening\x20on\x20:'+_0x3db002[_0x309dc5(0x1a8)]+'\x0a');if(!_0x3db002[_0x309dc5(0x2f8)])_0x44fcdc[_0x309dc5(0x126)][_0x309dc5(0x299)]?.(),_0x3b1369?.(),_0x30eb13(_0x44fcdc[_0x309dc5(0x38e)]?.[_0x309dc5(0x24c)]?.()??[]),await _0x59f7bb(_0x44fcdc,_0x3db002);else{const _0x4556da=_0x170f48[_0x309dc5(0x1e3)](_0x541011,'okdb.pid');try{_0x465e48[_0x309dc5(0x34d)](_0x4556da,String(process['pid']));}catch{}const _0x37a043=Date[_0x309dc5(0x1c3)]()-_0x366a36;console['log'](''),console[_0x309dc5(0x126)](_0x309dc5(0x211)),console['log'](_0x309dc5(0x37b)+_0x3db002[_0x309dc5(0x1a8)]),console['log'](_0x309dc5(0xfc)+_0x541011),console['log'](_0x309dc5(0x26c)+_0x44fcdc['id']);{const _0x2a245b=_0x44fcdc[_0x309dc5(0x129)]?.['db']?.[_0x309dc5(0x288)]?.(_0x309dc5(0x1cf))??0x0,_0x24628f=[..._0x44fcdc[_0x309dc5(0x2a9)]['keys']()]['filter'](_0x5c19c0=>!_0x5c19c0[_0x309dc5(0x13b)]('~'))[_0x309dc5(0x369)];if(_0x44fcdc[_0x309dc5(0x376)]?.[_0x309dc5(0x2aa)]?.[_0x309dc5(0x156)]===0x1){const _0x52751a=Math[_0x309dc5(0x232)]((_0x44fcdc[_0x309dc5(0x376)]['active'][_0x309dc5(0x230)]-Date[_0x309dc5(0x1c3)]())/0x5265c00);console[_0x309dc5(0x126)](_0x309dc5(0x3db)+_0x44fcdc['_license'][_0x309dc5(0x2aa)][_0x309dc5(0x310)]+_0x309dc5(0x2d1)+_0x52751a+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x44fcdc[_0x309dc5(0x376)]?.[_0x309dc5(0x2aa)]){const _0x46701f=_0x44fcdc[_0x309dc5(0x376)][_0x309dc5(0x2aa)];console[_0x309dc5(0x126)](_0x309dc5(0x39a)+_0x46701f[_0x309dc5(0x310)]+_0x309dc5(0x124)+new Date(_0x46701f[_0x309dc5(0x230)])[_0x309dc5(0x23b)]()['slice'](0x0,0xa)+')');const _0x32e944=_0x46701f[_0x309dc5(0x2f6)]||{};if(_0x32e944[_0x309dc5(0x333)]){const _0x30edff=Math[_0x309dc5(0x1f6)](_0x2a245b/_0x32e944[_0x309dc5(0x333)]*0x64);console['log'](_0x309dc5(0x2cd)+_0x2a245b[_0x309dc5(0x26a)]()+_0x309dc5(0x1eb)+_0x32e944['maxWrites'][_0x309dc5(0x26a)]()+_0x309dc5(0x1d9)+_0x30edff+_0x309dc5(0x3d9)+_0x24628f+(_0x32e944['envs']?'/'+_0x32e944[_0x309dc5(0x2d4)]:'')+_0x309dc5(0x297)+(_0x24628f===0x1?'':'s'));}}else{if(_0x44fcdc[_0x309dc5(0x376)]){const _0x20c8c9=_0x44fcdc['_license'][_0x309dc5(0x219)](),_0x2f591a=_0x20c8c9['length']?_0x20c8c9['map'](_0x3bcb6f=>_0x3bcb6f['pin'])['join'](',\x20'):_0x309dc5(0x1a2),_0x5db02c=_0x44fcdc[_0x309dc5(0x376)][_0x309dc5(0x106)],_0xce2e0f=_0x5db02c[_0x309dc5(0x2f6)]['maxWrites']?Math['round'](_0x2a245b/_0x5db02c[_0x309dc5(0x2f6)]['maxWrites']*0x64):0x0;console['log'](_0x309dc5(0x27f)),console[_0x309dc5(0x126)](_0x309dc5(0x2cd)+_0x2a245b[_0x309dc5(0x26a)]()+'\x20/\x20'+_0x5db02c[_0x309dc5(0x2f6)][_0x309dc5(0x333)][_0x309dc5(0x26a)]()+_0x309dc5(0x1d9)+_0xce2e0f+_0x309dc5(0x3d9)+_0x24628f+'\x20/\x20'+_0x5db02c[_0x309dc5(0x2f6)][_0x309dc5(0x2d4)]+'\x20envs'),console[_0x309dc5(0x126)](_0x309dc5(0x347)+_0x2f591a);}}}}console[_0x309dc5(0x126)](_0x309dc5(0x328)+_0x3db002[_0x309dc5(0x1a8)]+'/api');!_0x3db002[_0x309dc5(0x29b)]&&console[_0x309dc5(0x126)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x3db002[_0x309dc5(0x1a8)]+'/admin/index.html');console['log'](''),console[_0x309dc5(0x126)](_0x309dc5(0x2cf)+_0x37a043+'ms'),_0x30eb13(_0x44fcdc['auth']?.[_0x309dc5(0x24c)]?.()??[]);async function _0x2674c7(){const _0x361789=_0x309dc5;process[_0x361789(0x209)][_0x361789(0x2d9)](_0x361789(0x335));try{_0x465e48[_0x361789(0x10b)](_0x4556da);}catch{}await _0x44fcdc[_0x361789(0x199)](),process[_0x361789(0x377)](0x0);}process['on']('SIGINT',_0x2674c7),process['on'](_0x309dc5(0x2e8),_0x2674c7);}}const _0x35aefb=new Set([_0x45586a(0x1d4),_0x45586a(0x261),_0x45586a(0x133),_0x45586a(0x188),_0x45586a(0x17f),_0x45586a(0x276),'reset','token',_0x45586a(0x1e3),_0x45586a(0x28c)]),_0x413071=process[_0x45586a(0x182)][0x2];if(_0x413071==='version')console[_0x45586a(0x126)](require$$2['version']),process[_0x45586a(0x377)](0x0);else{if(_0x413071&&_0x35aefb[_0x45586a(0x32a)](_0x413071)){const _0x30c534=process[_0x45586a(0x182)][_0x45586a(0x343)](0x3),_0x1e900b=_0x2f33be([_0x45586a(0x31c),_0x45586a(0x204),..._0x30c534]),_0x9d16f8=_0x2bdfc3(_0x1e900b),_0x520570=new Set([_0x45586a(0x151),'-d',_0x45586a(0x381),'-k',_0x45586a(0x2ca),'-c','--port','-p',_0x45586a(0x193),_0x45586a(0xfa),'-e',_0x45586a(0x25e),_0x45586a(0x15c),_0x45586a(0x18b),_0x45586a(0x1b3),_0x45586a(0x161),_0x45586a(0x33f),_0x45586a(0x2c5),_0x45586a(0x3ac),_0x45586a(0x2d3),'-u',_0x45586a(0x367)]);let _0x2b3e39=null;for(let _0x2e9a7d=0x0;_0x2e9a7d<_0x30c534[_0x45586a(0x369)];_0x2e9a7d++){if(_0x520570[_0x45586a(0x32a)](_0x30c534[_0x2e9a7d])){_0x2e9a7d++;continue;}if(!_0x30c534[_0x2e9a7d][_0x45586a(0x13b)]('-')){_0x2b3e39=_0x30c534[_0x2e9a7d];break;}}(async()=>{const _0x5012b2=_0x45586a;if(_0x413071==='token'){const _0x5d2974=process[_0x5012b2(0x182)][0x3],_0x5a6f53=process[_0x5012b2(0x182)][_0x5012b2(0x343)](0x4),_0x59c135=_0x2f33be([_0x5012b2(0x31c),_0x5012b2(0x204),..._0x5a6f53]),_0x35d297=_0x2bdfc3(_0x59c135),_0x1360a4=new Set([_0x5012b2(0x151),'-d',_0x5012b2(0x381),'-k',_0x5012b2(0x2ca),'-c','--port','-p',_0x5012b2(0x15c),'--password',_0x5012b2(0x1b3),'--permissions',_0x5012b2(0x33f),_0x5012b2(0x2c5),_0x5012b2(0x193),_0x5012b2(0xfa),'-e',_0x5012b2(0x25e)]),_0x1200bf=[];for(let _0x5ae763=0x0;_0x5ae763<_0x5a6f53['length'];_0x5ae763++){if(_0x1360a4[_0x5012b2(0x32a)](_0x5a6f53[_0x5ae763])){_0x5ae763++;continue;}if(_0x5a6f53[_0x5ae763][_0x5012b2(0x13b)]('-'))continue;_0x1200bf[_0x5012b2(0x3c8)](_0x5a6f53[_0x5ae763]);}switch(_0x5d2974){case _0x5012b2(0x38a):await _0x5a8a9e(_0x35d297,_0x59c135);break;case'list':await _0x516630(_0x35d297);break;case'revoke':await _0xef998c(_0x1200bf[0x0],_0x35d297);break;default:console[_0x5012b2(0x33c)](_0x5012b2(0x39c)+_0x5d2974+'\x22.\x20Use:\x20create,\x20list,\x20revoke'),process[_0x5012b2(0x377)](0x1);}return;}if(_0x413071===_0x5012b2(0x28c)){const _0x3746cf=requireOkdbLicenseCodec(),_0x180e11=process['argv']['slice'](0x3),_0x20ef7e=_0x2f33be([_0x5012b2(0x31c),_0x5012b2(0x204),..._0x180e11]),_0x8e784a=_0x2bdfc3(_0x20ef7e),_0x389cea=new Set([_0x5012b2(0x151),'-d',_0x5012b2(0x381),'-k',_0x5012b2(0x2ca),'-c','--port','-p',_0x5012b2(0x193)]),_0x147037=[];for(let _0x4a6757=0x0;_0x4a6757<_0x180e11[_0x5012b2(0x369)];_0x4a6757++){if(_0x389cea[_0x5012b2(0x32a)](_0x180e11[_0x4a6757])){_0x4a6757++;continue;}if(_0x180e11[_0x4a6757][_0x5012b2(0x13b)]('-'))continue;_0x147037[_0x5012b2(0x3c8)](_0x180e11[_0x4a6757]);}const _0x116425=_0x147037[0x0]??null;if(_0x116425===_0x5012b2(0x300))await _0x5a171d(_0x147037[0x1],_0x8e784a);else{if(!_0x116425)await _0xf4c92f(_0x8e784a);else{let _0x49be49=_0x3746cf[_0x5012b2(0x30d)](_0x116425);if(_0x49be49===_0x5012b2(0x18d)&&_0x465e48['existsSync'](_0x116425))_0x49be49=_0x5012b2(0x217);if(_0x49be49===_0x5012b2(0x217))try{const _0x1b3c77=_0x465e48[_0x5012b2(0x277)](_0x116425,_0x5012b2(0x25d))['trim'](),_0x35e25e=_0x3746cf['detectInputType'](_0x1b3c77);if(_0x35e25e===_0x5012b2(0x2d8)){await _0x2f88d0(_0x1b3c77,_0x8e784a);return;}await _0x4b0bea(_0x116425,_0x8e784a);return;}catch(_0x29972b){console[_0x5012b2(0x33c)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x116425+':\x20'+_0x29972b[_0x5012b2(0x10a)]),process[_0x5012b2(0x377)](0x1);}switch(_0x49be49){case _0x5012b2(0x271):await _0x4b0bea(_0x116425,_0x8e784a);break;case'activation':await _0x2f88d0(_0x116425,_0x8e784a);break;case'uuid':await _0x50929f(_0x116425,_0x8e784a);break;default:console['error']('[okdb]\x20error:\x20unrecognized\x20input:\x20\x22'+_0x116425+'\x22'),console[_0x5012b2(0x33c)](''),console[_0x5012b2(0x33c)](_0x5012b2(0x2dd)),console[_0x5012b2(0x33c)](_0x5012b2(0xfe)),console[_0x5012b2(0x33c)](_0x5012b2(0x3b2)),console[_0x5012b2(0x33c)]('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x5012b2(0x33c)](_0x5012b2(0x23d)),console['error'](''),console['error'](_0x5012b2(0x36f)),process[_0x5012b2(0x377)](0x1);}}}return;}switch(_0x413071){case _0x5012b2(0x261):await _0x4d4079(_0x9d16f8);break;case _0x5012b2(0x133):await _0x321815();break;case _0x5012b2(0x1d7):await _0xca7103(_0x9d16f8);break;case _0x5012b2(0x188):await _0x51a49e(_0x2b3e39??_0x170f48['resolve'](_0x5012b2(0x245)),_0x9d16f8);break;case _0x5012b2(0x17f):await _0xd44625(_0x2b3e39??_0x170f48[_0x5012b2(0x132)]('./okdb-export.ndjson'),_0x9d16f8,_0x1e900b);break;case _0x5012b2(0x276):await _0x14dd19(_0x2b3e39??_0x170f48['resolve'](_0x5012b2(0x20c)),_0x9d16f8,_0x1e900b);break;case'join':await _0x3a1a26(_0x2b3e39,_0x9d16f8,_0x1e900b);break;}})()[_0x45586a(0x1e6)](()=>process[_0x45586a(0x377)](0x0))[_0x45586a(0x1c6)](_0x41d3e0=>{const _0xdb6f44=_0x45586a;console[_0xdb6f44(0x33c)](_0xdb6f44(0x13a)+(_0x41d3e0[_0xdb6f44(0x10a)]||_0x41d3e0)+'\x0a'),process[_0xdb6f44(0x377)](0x1);});}else _0x632ee1()['catch'](_0x3eb245=>{const _0x52d60d=_0x45586a;console['error'](_0x52d60d(0x3d7)),console['error'](_0x3eb245[_0x52d60d(0x1cc)]||_0x3eb245),process[_0x52d60d(0x377)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x3f2430(0x121)]=okdb;