@kedem/okdb 1.6.4 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/okdb.js +1 -1
- package/docs/change-log.md +23 -0
- package/docs/pipelines.md +6 -1
- package/docs/time-machine.md +177 -0
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/public/sections/db/parts/db-overview.ok.js +1 -1
- package/public/sections/db/parts/type-viewer.ok.js +1 -1
- package/public/sections/system/index.ok.html +1 -1
- package/public/sections/system/parts/system-locks-panel.ok.js +1 -0
- package/public/sections/views/parts/view-detail.ok.js +1 -1
package/bin/okdb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const _0x19ca31=_0x30ec;(function(_0x5b9890,_0x1bb767){const _0x46bd80=_0x30ec,_0x2f6483=_0x5b9890();while(!![]){try{const _0x76b3ca=parseInt(_0x46bd80(0x18f))/0x1+-parseInt(_0x46bd80(0x1dd))/0x2+parseInt(_0x46bd80(0x13a))/0x3+-parseInt(_0x46bd80(0x329))/0x4*(parseInt(_0x46bd80(0x102))/0x5)+parseInt(_0x46bd80(0x1f1))/0x6*(parseInt(_0x46bd80(0x2ec))/0x7)+parseInt(_0x46bd80(0x33f))/0x8+-parseInt(_0x46bd80(0x101))/0x9;if(_0x76b3ca===_0x1bb767)break;else _0x2f6483['push'](_0x2f6483['shift']());}catch(_0x4a4363){_0x2f6483['push'](_0x2f6483['shift']());}}}(_0x3cd6,0x98171));var require$$1$1=require(_0x19ca31(0x1e3)),require$$1=require('fs'),require$$3=require('net'),require$$0$2=require(_0x19ca31(0x2d7)),require$$5=require(_0x19ca31(0x286)),require$$0=require('crypto'),require$$0$1=require('node:crypto'),require$$2$1=require('os'),require$$4=require(_0x19ca31(0x174));function getDefaultExportFromCjs(_0x1fd77a){const _0x4ff0f0=_0x19ca31;return _0x1fd77a&&_0x1fd77a[_0x4ff0f0(0x219)]&&Object[_0x4ff0f0(0x1e6)][_0x4ff0f0(0x1d6)][_0x4ff0f0(0xdb)](_0x1fd77a,_0x4ff0f0(0x33e))?_0x1fd77a[_0x4ff0f0(0x33e)]:_0x1fd77a;}function _0x3cd6(){const _0x525ec6=['../okdb','admin','set','string','/api','[okdb]\x20exporting\x20blobs…','\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','TYPE_ALREADY_REGISTERED','trimStart','index:registered','detachConsole','label','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','ALREADY_EXISTS','transport','createPublicKey','\x20\x20\x20\x20expires:\x20\x20\x20','valid','sig','error','<json-body>','licenseHash','padStart','allocUnsafe','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','env/','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','type/','exp',')\x20to\x20your\x20license\x20vendor.','types/env=','[okdb]\x20invalid\x20port:\x20','update','then','floor','exportBlobs','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','license:activated','\x20licenses','details','sub','creating','--log-requests','fromEntries','\x27:\x20','input:\x20','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','--key','Indexes','[okdb]\x20exported\x20\x20types=','magenta','\x20\x20All\x20checks\x20passed.\x0a','1.6.4','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','{}[]:,\x27\x22','\x20references\x20','--drop','[okdb]\x20opening\x20','\x20\x20+','--blobs','\x20\x20✗','bind','open','LICENSED_BUILD','\x20\x20Some\x20checks\x20failed.\x0a','\x20\x20·\x20','_systemEnv','Activation\x20invalid:\x20','val','\x20in\x20','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','put','stdout','\x20(must\x20be\x201–65535)','processors/','\x22.\x20Use:\x20create,\x20list,\x20revoke','version','body','no\x20.kdbconfig\x20(using\x20defaults)','effective','mcp','readline','type/users/query\x20{\x22active\x22:true}','revoke','writeFileSync',':\x20expected\x20','reverse','logRequests','noRepl','emit','assertFeature','<path>',',\x20label:\x20','\x20\x20\x20\x20permissions:\x20','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x20documents\x20fail\x20validation','PUBLIC_KEY_PEM','timingSafeEqual','[okdb]\x20imported\x20\x20types=','getRange','dbPath','\x0a\x20\x20✓\x20License\x20activated','196PiMMbL','dim','database\x20path\x20writable:\x20','Processors','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','sync','\x27\x20already\x20registered','type/users/item/alice\x20--env\x20staging','\x20records…','--label','LICENSE_ACTIVATION_INVALID','(add\x20a\x20license\x20first)','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','OKDB-PIN-V1:','resume','createServer','LICENSE_TYPE_OPEN','STATUS','code','terminal','import','halted','PATCH','white','platform','--permissions','exports','OPEN','TYPE_NOT_REGISTERED','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','addedAt','LABEL','pid','api','auth','unlinkSync','SCHEMA_COLLECTION_INVALID','standard','onLicenseExpired','\x20env','.okdb-write-test','types\x20--env\x20staging','\x20not\x20found','FEATURES','OKDBNotFoundError','number','\x0a\x20\x20Joining\x20cluster\x20at\x20','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','./okdb-backup','mkdirSync','POST','.kdbconfig','freeze','limits','\x20already\x20in\x20use','setTtl','config','null','\x20\x20\x20\x20path:\x20\x20','dropType','base64url','52AaqvEx','sourceType','item:remove','FOREIGN_KEY_VIOLATION','env/:env','sizeBefore','\x20log\x20level:\x20','okdb.pid','derivePin','LICENSE_FEATURE_DISABLED','\x20\x20@','catch','Feature\x20not\x20licensed:\x20','routes','\x20type','round','\x20\x20(name:\x20','tags','\x0a\x20\x20✓\x20Token\x20created','remove','alloc','default','4517768hkwUKu','existsSync','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','indexOf','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','blobs','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','use\x20<env>','readUInt8','__OKDB_PUB_FINGERPRINT__','\x20\x20\x20\x20admin:\x20http://localhost:','createHash','payload','node','\x20does\x20not\x20exist','sync:apply','logLevel','Files','createHmac','listRoutes','System','queue','boolean','question','_lookupByName','\x22\x20on\x20\x22','SIGTERM','[okdb]\x20blobs:\x20imported=','registerIndex','log','(unset)','safety','NAME','xdg-open\x20','active','name','_computeStatus','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','exit','LICENSEE','\x20\x20⚠','--changes','node\x20','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','__writeCounter','OKDBUniqueConstraintError','\x20logs\x20off\x0a','INDEX_NOT_REGISTERED','system:ready','DELETE\x20type/users/item/x','--ttl','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','peers=','prompt','targetKey','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','_isFree','[on|off|level]','resetting','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','\x1b[36m','ttl:clear','embeddings','\x20/\x20','finally','--token','export','username','sha256','backup','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','blob','(null)','red','list','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','concat','importBlobs','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','Hint:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','Records','dynamic','--no-repl','toUpperCase','\x20\x20\x20\x20\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/','some','http','LICENSE_INVALID','selfAddress','now','PUT\x20type/users/item/x\x20{\x22n\x22:1}','\x20records','[okdb]\x20reset\x20aborted','init','application/json','[okdb]\x20unknown\x20token\x20action:\x20\x22','\x20\x20Envs:\x20\x20\x20\x20','records','off','address','message','constructor','description','level','values','\x20\x20\x20http://localhost:','summary','sourceKey','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','permissions','addLicense','columns','from','\x20\x20╚═══════════════════════════╝','sort','[okdb]\x20error:\x20failed\x20to\x20read\x20','split','[okdb]\x20port\x20','INVALID_INDEX_KEY','invalid','TYPES','getPins','\x20→\x20POST\x20/api/env/','starting','createInterface','fts:registered','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','\x20\x20Error:\x20','object','listLicenses','Shutting\x20down\x20due\x20to\x20license\x20expiry','\x1b[37m','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','detectInputType','min','\x27\x20is\x20already\x20registered','win32','resetIndex','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','logs','\x20\x20Type\x20','cyan','readUInt32BE','parse','current','licenseId','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','Cannot\x20set\x20enforce\x20schema\x20on\x20','digest','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','_licenseHash','randomBytes','green','type:registered','toFixed','[okdb]\x20importing\x20','every','ttl','Examples','expired','\x22\x20to\x20enable\x20it.','\x20months\x20from\x20issuance)','call','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','OKDBIndexAlreadyRegisteredError','listen','errors','type','hint','unknown','trim','reset','\x20SECURITY\x20NOTICE','meta','\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','[okdb]\x20reset:\x20','toISOString','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','dirname','OKDBIndexHasConsumersError','\x20\x20Writes:\x20\x20','writeUInt8','--env','registerType','stopping','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','loadEnvFile','key','OKDBInvalidPrimaryKeyError','resetFts','License\x20expired\x20or\x20invalidated','\x0a[okdb]\x20shutting\x20down…\x0a','isFeatureEnabled','Foreign\x20key\x20violation:\x20','writeUInt32BE','writeUInt16BE','Environments','/type/users/item/alice\x0a\x20\x20\x20\x20','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','2634732EbAovU','377050uFIFzh','License\x20signature\x20invalid:\x20','start\x20','der','Build\x20expects\x20public\x20key\x20fingerprint\x20','write','MALFORMED_TOKEN','\x22\x20(must\x20be\x20debug|info|warn|error)','resolve','EXPIRES','\x20\x20✓\x20','verify','\x27\x20doesn\x27t\x20exist','/admin/index.html','\x0a\x20\x20\x20\x20','events','expiresAt','clearLine','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','length','timeMachine','type/users\x20--help','CREATED','isArray','[env]','hasType','engines','waiting','quit','_envs','index:drop','unique:violation','rmSync','toString','Sync','\x20\x20(','UNIQUE_CONSTRAINT','utf8','VERSION_MISMATCH','index:reset','shutdown','line','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','files','\x20to\x20browse\x20the\x20API,\x20','type/users/item/alice','\x20\x20✓\x20OKDB\x20server\x20running','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','value','open\x20','toLocaleString','other','(empty)','\x20bytes,\x20need\x20>=\x2065)','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','envs=','324108vqQsDH','\x20\x20(unlimited)','\x20\x20Path\x20access','\x20\x20changes=','ACTIVATION_EXPIRED','~tokens','\x20\x20✓\x20Revoked\x20token\x20','--config','isTTY','fts:drop','started','--grants','types','data','expiry','ROUTES','\x20\x20Usage:','env','--username','--password','--path','importFromFile','system:stopped','handle','exportToFile','time','transaction','\x1b[90m','\x22\x20is\x20used\x20by:\x20','\x20\x20\x20\x20writes:\x20\x20\x20\x20','index:ready','envs','\x22\x20→\x20','license:added','yellow','roles','INDEX_HAS_CONSUMERS','children','keys/public.pem','decodeActivationToken','[okdb]\x20starting…\x0a','[okdb]\x20created\x20./okdb-data','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','dest','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','warn','true','Types','system','\x0a\x20\x20','(none)','ttl:set','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','listening','readFileSync','views','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','assertLimit','child_process','--port','decoded','bus:poke','enabled','info','uuid','once','SIGINT','gray','map','failures','OKDBInvalidIndexKeyError','\x20\x20[okdb]\x20shutting\x20down…','USE','[okdb]\x20export\x20complete','reload','\x0a\x20\x20okdb\x20doctor\x0a','count','\x20<path>\x20[json-body]','search','[body]','\x20\x20✓\x20Removed\x20license\x20','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','stringify','\x0a\x0a\x20\x20','\x20\x20Common\x20causes:','1094929aFreLq','Embeddings','--help','title','charCodeAt','grants','push','system:drain','License\x20already\x20stored','padEnd','\x20\x20(need\x20≥\x2018)','ENVS','\x20\x20Flags','_ensureTokensType','\x20\x20╔═══════════════════════════╗','\x20\x20records=','\x20(expires\x20','access:\x20','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','(no\x20types)','filter','LICENSE_HASH_MISMATCH','LOGS','server','typesPerEnv','ready','system:poke','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','\x0a[okdb]\x20fatal\x20error:','/types\x0a\x20\x20\x20\x20','access','verifyActivation','syncPeers','\x20\x20\x20\x20limits:\x20\x20\x20\x20','license:invalid','PERMISSIONS','readUInt16BE','item:create','recheck','VERB','Schema\x20validation\x20failed\x20for\x20','[okdb]\x20started\x20in\x20','Events','license','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','activation','NOT_FOUND','token','already\x20in\x20use','PUB_FINGERPRINT','\x20\x20\x20\x20id:\x20\x20\x20\x20','use','\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','randomUUID','fill','maxWrites','--version','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','\x20\x20\x20\x20\x20\x20','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','INVALID_PRIMARY_KEY','No\x20tokens.','features','\x20\x20\x20\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','result','body:\x20','ceil','pause','hasOwnProperty','\x20day(s).','_active','item:update','free\x20tier','hidden','\x20\x20\x20\x20addedAt:\x20\x20\x20','1845590yLooTV','isInteger','stopped','LICENSE_LIMIT_EXCEEDED','licenseType','properties','path','darwin','cause','prototype','fts','index','bus:drain','argv','fieldPath','\x22\x20matches\x20','captureStackTrace','--env\x20<name>','getSecurityNotices','\x20\x20\x20\x20\x20\x20\x20','225246QPzzhs','--name','history','toLowerCase','pending','close','[okdb]\x20created\x20.kdbconfig','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','--no-admin','test','activateLicense','hex','\x20which\x20does\x20not\x20exist','port','types:','\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','Invalid\x20index\x20key\x20type\x20for\x20\x27','changes','\x20\x20║','/type/users/query\x0a\x20\x20\x20\x20','rawBuf','setSchema','\x20deleted','dropIndex','attach','createdAt','txn:rollback','[okdb]\x20backup\x20complete','config\x20file\x20invalid:\x20','ENV','ftsName','\x27\x20on\x20type\x20\x27','\x20\x20\x20\x20licensee:\x20\x20','targetType','type/users','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','method','created','__esModule','\x20writes\x20(','queue/','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','drop','\x20\x20Tier:\x20\x20\x20\x20','Admin','dropFts','idx:','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','entries','Index\x20\x27','startsWith','decodeLicenseBlob','typeSubDbs','reason','\x20opening\x20','debug','\x20tokens:','repeat','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','\x20\x20→\x20\x20','wrong_node','okdb','bold','forEach','OKDBTypeNotRegisteredError','\x20\x20[','keys','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','pin','includes','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','\x20\x20\x20\x20\x20http://localhost:','migrate','schema:drop','issuedAt','/api/env/','~licenses','EXIT','max','ref:violation_resolved','has','replace','writes=','password','\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/','create','txn:start','transport:\x20','indexToDb','stderr','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','./okdb-data','\x20\x20\x20\x20graceful\x20shutdown\x0a','get','noAdmin','join','OKDBVersionMismatchError','help','ref:violation','\x20\x20score:','\x27,\x20cannot\x20map\x20to\x20\x27','SCHEMA_VALIDATION_FAILED','.kdb_history','status','\x1b[32m','[okdb]\x20loaded\x20config:\x20','endsWith','equals','dropSchema','Invalid\x20primary\x20key\x20type:\x20','operation','param','\x1b[35m','licensed','/api/','SIG_INVALID','Queue','sizeAfter','\x0d[okdb]\x20','/\x20quit\x20/\x20Ctrl+C','\x20\x20\x20\x20features:\x20\x20',',\x20got\x20','[okdb]\x20error:\x20','\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','--types','licensee','scrypt','\x1b[31m','\x20\x20http://localhost:','--address','GET','\x1b[2m','../','index:progress','_license','--log-level','DELETE','byteLength','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','env:opened','Type\x20\x27','./okdb-export.ndjson','slice','HELP','\x20\x20\x20\x20\x20\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','isFile','stdin'];_0x3cd6=function(){return _0x525ec6;};return _0x3cd6();}var okdb$1={},version=_0x19ca31(0x2ba),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x23e73c=require$$0;function _0xd5089c(_0xd65d4d,_0x59f3f3){const _0x129104=_0x30ec;return _0x23e73c['createHmac'](_0x129104(0x7c),_0x59f3f3)['update'](_0xd65d4d)[_0x129104(0xcd)](_0x129104(0x328));}function _0x1c1260(_0x2e3519,_0x2f8925){const _0x27b1aa=_0x30ec;if(typeof _0x2e3519!==_0x27b1aa(0x289)||typeof _0x2f8925!=='string')return![];if(Buffer[_0x27b1aa(0x27c)](_0x2e3519)!==Buffer[_0x27b1aa(0x27c)](_0x2f8925))return![];return _0x23e73c[_0x27b1aa(0x2e7)](Buffer[_0x27b1aa(0xa9)](_0x2e3519),Buffer[_0x27b1aa(0xa9)](_0x2f8925));}function _0x47a509(_0x5360a1){const _0x3a78e4=_0x30ec;if(!_0x5360a1?.[_0x3a78e4(0x225)]('Bearer\x20'))return null;return _0x5360a1[_0x3a78e4(0x281)](0x7);}function _0x2637e3(_0x223ec9=0x20){const _0x358276=_0x30ec;return _0x23e73c[_0x358276(0xd0)](_0x223ec9)[_0x358276(0x123)](_0x358276(0x328));}function _0x3cd21c(_0x4a7c9f){const _0x58bb85=_0x30ec;return _0x23e73c[_0x58bb85(0x34a)](_0x58bb85(0x7c))[_0x58bb85(0x2a6)](_0x4a7c9f)[_0x58bb85(0xcd)]('hex');}function _0x41a196(_0x4c3940,_0x6a4138,_0x408d0e=0x36ee80){const _0x5f1e4d=_0x30ec;if(!_0x6a4138)throw new Error('Token\x20secret\x20not\x20configured');const _0x5973be=Date[_0x5f1e4d(0x92)](),_0x15d153=Buffer[_0x5f1e4d(0xa9)](JSON['stringify']({'iat':_0x5973be,'exp':_0x5973be+_0x408d0e,'sub':_0x4c3940?.['id']??_0x4c3940?.[_0x5f1e4d(0x2ae)]??null,'username':_0x4c3940?.['username']??_0x4c3940?.[_0x5f1e4d(0x362)]??null,'roles':Array['isArray'](_0x4c3940?.[_0x5f1e4d(0x15d)])?_0x4c3940[_0x5f1e4d(0x15d)]:[]}))['toString']('base64url'),_0xbf7fd3=_0xd5089c(_0x15d153,_0x6a4138);return _0x15d153+'.'+_0xbf7fd3;}function _0x4fd069(_0x110769,_0x136bcc){const _0x57aabe=_0x30ec;if(!_0x136bcc||typeof _0x110769!=='string')return null;const [_0x29f695,_0x1a1b30]=_0x110769[_0x57aabe(0xad)]('.');if(!_0x29f695||!_0x1a1b30)return null;const _0x5c4b89=_0xd5089c(_0x29f695,_0x136bcc);if(!_0x1c1260(_0x1a1b30,_0x5c4b89))return null;try{const _0x2aa637=JSON[_0x57aabe(0xc8)](Buffer['from'](_0x29f695,_0x57aabe(0x328))[_0x57aabe(0x123)]()),_0x168328=0x7530;if(Date['now']()>Number(_0x2aa637?.[_0x57aabe(0x2a2)]??0x0)+_0x168328)return null;return _0x2aa637;}catch{return null;}}async function _0x3a90ca(_0x2465d1){return new Promise((_0x503d92,_0x4f19f6)=>{const _0x32af22=_0x30ec,_0x46f0d9=_0x23e73c[_0x32af22(0xd0)](0x10);_0x23e73c[_0x32af22(0x271)](_0x2465d1,_0x46f0d9,0x40,(_0x5f2405,_0x3f9f45)=>{const _0x13ef05=_0x32af22;if(_0x5f2405)_0x4f19f6(_0x5f2405);_0x503d92(_0x46f0d9[_0x13ef05(0x123)]('hex')+':'+_0x3f9f45[_0x13ef05(0x123)](_0x13ef05(0x1fc)));});});}async function _0x1fba65(_0x8c638a,_0x12be93){const _0x453fd7=_0x30ec,[_0x3d515c,_0x13e832]=_0x12be93[_0x453fd7(0xad)](':');if(!_0x3d515c||!_0x13e832)return![];const _0x1f8ace=Buffer['from'](_0x3d515c,_0x453fd7(0x1fc));return new Promise((_0x210418,_0x1c420f)=>{const _0x3223a5=_0x453fd7;_0x23e73c[_0x3223a5(0x271)](_0x8c638a,_0x1f8ace,0x40,(_0x51e837,_0x2ae0d0)=>{const _0x17dc87=_0x3223a5;if(_0x51e837)_0x1c420f(_0x51e837);_0x210418(_0x23e73c[_0x17dc87(0x2e7)](_0x2ae0d0,Buffer[_0x17dc87(0xa9)](_0x13e832,_0x17dc87(0x1fc))));});});}return okdbAuthTokens={'hmac':_0xd5089c,'timingSafeEqual':_0x1c1260,'parseBearer':_0x47a509,'randomToken':_0x2637e3,'hashToken':_0x3cd21c,'issueToken':_0x41a196,'authenticateToken':_0x4fd069,'hashPassword':_0x3a90ca,'verifyPassword':_0x1fba65},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x141fff=_0x19ca31;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x23991f=require$$0$1,_0x1a30c5='0123456789ABCDEFGHJKMNPQRSTVWXYZ',_0x306ef2=new Uint8Array(0x100)[_0x141fff(0x1c6)](0xff);for(let _0x117e1d=0x0;_0x117e1d<_0x1a30c5[_0x141fff(0x115)];_0x117e1d++){_0x306ef2[_0x1a30c5[_0x141fff(0x193)](_0x117e1d)]=_0x117e1d,_0x306ef2[_0x1a30c5[_0x141fff(0x193)](_0x117e1d)+0x20]=_0x117e1d;}_0x306ef2['O'[_0x141fff(0x193)](0x0)]=0x0,_0x306ef2['o'[_0x141fff(0x193)](0x0)]=0x0,_0x306ef2['I'[_0x141fff(0x193)](0x0)]=0x1,_0x306ef2['i'[_0x141fff(0x193)](0x0)]=0x1,_0x306ef2['L'['charCodeAt'](0x0)]=0x1,_0x306ef2['l'[_0x141fff(0x193)](0x0)]=0x1;function _0x4af465(_0x2ad52c){let _0x5d3a49=0x0,_0x4578dd=0x0,_0x538691='';for(let _0x3a3574=0x0;_0x3a3574<_0x2ad52c['length'];_0x3a3574++){_0x4578dd=_0x4578dd<<0x8|_0x2ad52c[_0x3a3574],_0x5d3a49+=0x8;while(_0x5d3a49>=0x5){_0x5d3a49-=0x5,_0x538691+=_0x1a30c5[_0x4578dd>>>_0x5d3a49&0x1f];}}return _0x5d3a49>0x0&&(_0x538691+=_0x1a30c5[_0x4578dd<<0x5-_0x5d3a49&0x1f]),_0x538691;}function _0x208fa7(_0x410532){const _0x3a1baf=_0x141fff;_0x410532=_0x410532[_0x3a1baf(0x244)](/-/g,'')[_0x3a1baf(0x8c)]();let _0x342e59=0x0,_0x387544=0x0;const _0x5216f3=[];for(let _0x5d644b=0x0;_0x5d644b<_0x410532[_0x3a1baf(0x115)];_0x5d644b++){const _0x56ae5e=_0x306ef2[_0x410532[_0x3a1baf(0x193)](_0x5d644b)];if(_0x56ae5e===0xff)continue;_0x387544=_0x387544<<0x5|_0x56ae5e,_0x342e59+=0x5,_0x342e59>=0x8&&(_0x342e59-=0x8,_0x5216f3['push'](_0x387544>>>_0x342e59&0xff));}return Buffer[_0x3a1baf(0xa9)](_0x5216f3);}const _0x3aa404=[_0x141fff(0x2f1),'embeddings',_0x141fff(0x11c),_0x141fff(0x1e7),'timeMachine',_0x141fff(0x171),_0x141fff(0x2d6),_0x141fff(0x12d)],_0x28a5f5=0x0,_0x216d55=0x1,_0x445094=0x2,_0x5a76a6=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x5f5eac({issuedAt:_0x489f4c,expiresAt:_0x526410,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x28a5f5}){const _0x477740=_0x141fff,_0x2bbc63=Buffer['from'](licensee,_0x477740(0x127))['slice'](0x0,0x40),_0x38a982=0x1+0x1+0x4+0x4+0x1+_0x2bbc63[_0x477740(0x115)]+0x2+0x10,_0x462d62=Buffer[_0x477740(0x29d)](_0x38a982);let _0x50c440=0x0;_0x462d62[_0x477740(0xef)](0x1,_0x50c440++),_0x462d62['writeUInt8'](licenseType,_0x50c440++),_0x462d62[_0x477740(0xfc)](Math[_0x477740(0x2a8)](_0x489f4c/0x3e8),_0x50c440),_0x50c440+=0x4,_0x462d62[_0x477740(0xfc)](Math[_0x477740(0x2a8)](_0x526410/0x3e8),_0x50c440),_0x50c440+=0x4,_0x462d62[_0x477740(0xef)](_0x2bbc63['length'],_0x50c440++),_0x2bbc63['copy'](_0x462d62,_0x50c440),_0x50c440+=_0x2bbc63[_0x477740(0x115)];let _0x8c0598=0x0;for(let _0x190177=0x0;_0x190177<_0x3aa404[_0x477740(0x115)];_0x190177++){if(features[_0x3aa404[_0x190177]])_0x8c0598|=0x1<<_0x190177;}_0x462d62[_0x477740(0xfd)](_0x8c0598,_0x50c440),_0x50c440+=0x2;const _0x6426fa=[_0x477740(0x159),_0x477740(0x1a7),_0x477740(0x1b0),'maxWrites'];for(const _0x59a6d3 of _0x6426fa){_0x462d62['writeUInt32BE'](limits[_0x59a6d3]||0x0,_0x50c440),_0x50c440+=0x4;}return _0x462d62;}function _0xde26f4(_0x4c8ce3){const _0x12feb7=_0x141fff;let _0x38b57a=0x0;const _0x1f0930=_0x4c8ce3['readUInt8'](_0x38b57a++),_0x143b31=_0x4c8ce3[_0x12feb7(0x347)](_0x38b57a++),_0x296cde=_0x4c8ce3[_0x12feb7(0xc7)](_0x38b57a);_0x38b57a+=0x4;const _0x33e909=_0x4c8ce3['readUInt32BE'](_0x38b57a);_0x38b57a+=0x4;const _0x458efe=_0x4c8ce3[_0x12feb7(0x347)](_0x38b57a++),_0x103389=_0x4c8ce3[_0x12feb7(0x281)](_0x38b57a,_0x38b57a+_0x458efe)[_0x12feb7(0x123)](_0x12feb7(0x127));_0x38b57a+=_0x458efe;const _0x303be1=_0x4c8ce3[_0x12feb7(0x1b4)](_0x38b57a);_0x38b57a+=0x2;const _0x2ca456={};for(let _0x817cc9=0x0;_0x817cc9<_0x3aa404[_0x12feb7(0x115)];_0x817cc9++){_0x2ca456[_0x3aa404[_0x817cc9]]=Boolean(_0x303be1&0x1<<_0x817cc9);}const _0x48bd1b=['envs',_0x12feb7(0x1a7),'syncPeers',_0x12feb7(0x1c7)],_0x5642b1={};for(const _0x8062dd of _0x48bd1b){const _0x4469fb=_0x4c8ce3[_0x12feb7(0xc7)](_0x38b57a);_0x38b57a+=0x4,_0x5642b1[_0x8062dd]=_0x4469fb===0x0?null:_0x4469fb;}return{'v':_0x1f0930,'licenseType':_0x143b31,'issuedAt':_0x296cde*0x3e8,'expiresAt':_0x33e909*0x3e8,'licensee':_0x103389,'features':_0x2ca456,'limits':_0x5642b1};}function _0x799800(_0x13a954,_0x1774ed){const _0x3240af=_0x141fff,_0x2b261a=Buffer[_0x3240af(0x84)]([_0x13a954,_0x1774ed]),_0x580038=_0x4af465(_0x2b261a),_0x555db4=[];for(let _0x6b3c76=0x0;_0x6b3c76<_0x580038['length'];_0x6b3c76+=0x8){_0x555db4['push'](_0x580038[_0x3240af(0x281)](_0x6b3c76,_0x6b3c76+0x8));}return _0x555db4['join']('-');}function _0x3e03f1(_0x4b10f1){const _0x585af7=_0x141fff;if(typeof _0x4b10f1!==_0x585af7(0x289))throw new Error(_0x585af7(0xa5));const _0x3b2c6a=_0x208fa7(_0x4b10f1[_0x585af7(0x244)](/-/g,''));if(_0x3b2c6a['length']<0x41)throw new Error(_0x585af7(0x12c)+_0x3b2c6a[_0x585af7(0x115)]+_0x585af7(0x137));const _0x2b1f6f=_0x3b2c6a[_0x585af7(0x281)](0x0,_0x3b2c6a[_0x585af7(0x115)]-0x40),_0x5477f7=_0x3b2c6a['slice'](_0x3b2c6a[_0x585af7(0x115)]-0x40);let _0x16c106;try{_0x16c106=_0xde26f4(_0x2b1f6f);}catch(_0x31b08b){throw new Error(_0x585af7(0x31b)+_0x31b08b[_0x585af7(0x9d)]);}return{'rawBuf':_0x3b2c6a,'payload':_0x2b1f6f,'sig':_0x5477f7,'decoded':_0x16c106};}function _0x1b7b32(_0x1eafcd){const _0x189722=_0x141fff;return _0x23991f[_0x189722(0x34a)](_0x189722(0x7c))[_0x189722(0x2a6)](_0x1eafcd)['digest']()[_0x189722(0x281)](0x0,0x8);}function _0x27ef0f(_0x19c99d,_0x47b2bf,_0x5ea083){const _0x2c3f52=_0x141fff,_0x5d69b3=_0x2c3f52(0x2f9)+_0x5ea083,_0x119d91=Buffer[_0x2c3f52(0x84)]([Buffer[_0x2c3f52(0xa9)](_0x19c99d,_0x2c3f52(0x127)),_0x47b2bf]),_0x506ba8=_0x23991f[_0x2c3f52(0x351)](_0x2c3f52(0x7c),_0x5d69b3)['update'](_0x119d91)[_0x2c3f52(0xcd)](),_0x161a27=_0x4af465(_0x506ba8['slice'](0x0,0x5));return{'pin':_0x161a27,'pinHmac':_0x506ba8};}function _0x554b03(_0x84cca0,_0x2222a6,_0x4e1287){const _0x19c1fd=_0x141fff,_0x17deef=Buffer[_0x19c1fd(0x29d)](0x4d);let _0xb32e0a=0x0;_0x17deef[_0x19c1fd(0xef)](0x1,_0xb32e0a++),_0x84cca0['copy'](_0x17deef,_0xb32e0a),_0xb32e0a+=0x8,_0x17deef['writeUInt32BE'](_0x2222a6,_0xb32e0a),_0xb32e0a+=0x4,_0x4e1287['copy'](_0x17deef,_0xb32e0a);const _0x9a9aab=_0x4af465(_0x17deef),_0x51ac44=[];for(let _0x313d4a=0x0;_0x313d4a<_0x9a9aab[_0x19c1fd(0x115)];_0x313d4a+=0x6){_0x51ac44[_0x19c1fd(0x195)](_0x9a9aab['slice'](_0x313d4a,_0x313d4a+0x6));}return _0x51ac44['join']('-');}function _0x36c847(_0x2e4f69){const _0x27db53=_0x141fff;if(typeof _0x2e4f69!=='string')throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x586315=_0x208fa7(_0x2e4f69[_0x27db53(0x244)](/-/g,''));if(_0x586315[_0x27db53(0x115)]!==0x4d)throw new Error(_0x27db53(0x1ab)+_0x586315[_0x27db53(0x115)]);let _0x50c7c1=0x0;const _0x375d1d=_0x586315['readUInt8'](_0x50c7c1++),_0x66d67a=_0x586315[_0x27db53(0x281)](_0x50c7c1,_0x50c7c1+0x8);_0x50c7c1+=0x8;const _0x22d2c0=_0x586315[_0x27db53(0xc7)](_0x50c7c1);_0x50c7c1+=0x4;const _0x2e9e7a=_0x586315[_0x27db53(0x281)](_0x50c7c1);return{'v':_0x375d1d,'licenseHash':_0x66d67a,'expiry':_0x22d2c0,'sig':_0x2e9e7a};}function _0x16365a({tokenString:_0x4887be,nodeId:_0x1f32c0,rawBlobBuf:_0x109638,pubKeyPem:_0xe3d284,pubFingerprint:_0x222b9e}){const _0x2b349b=_0x141fff;let _0x5075c4;try{_0x5075c4=_0x36c847(_0x4887be);}catch(_0x1434c2){return{'valid':![],'reason':_0x2b349b(0x108)};}const _0x514bed=_0x1b7b32(_0x109638);if(!_0x514bed[_0x2b349b(0x25e)](_0x5075c4[_0x2b349b(0x29b)]))return{'valid':![],'reason':_0x2b349b(0x1a4)};const {pinHmac:_0x5b6103}=_0x27ef0f(_0x1f32c0,_0x514bed,_0x222b9e),_0x1338fc=Buffer['allocUnsafe'](0x4);_0x1338fc['writeUInt32BE'](_0x5075c4[_0x2b349b(0x148)],0x0);const _0x1fa00a=Buffer[_0x2b349b(0x84)]([Buffer[_0x2b349b(0xa9)]([_0x5075c4['v']]),_0x5b6103['slice'](0x0,0x5),_0x5075c4[_0x2b349b(0x29b)],_0x1338fc]);try{const _0x43716a=_0x23991f['verify'](null,_0x1fa00a,_0xe3d284,_0x5075c4[_0x2b349b(0x298)]);if(!_0x43716a)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x4b15b5){return{'valid':![],'reason':_0x2b349b(0x266)};}if(_0x5075c4['expiry']<Date[_0x2b349b(0x92)]()/0x3e8)return{'valid':![],'reason':_0x2b349b(0x13e)};return{'valid':!![],'reason':'ok'};}function _0x37f5e4(_0xa9054f){const _0x4e0fec=_0x141fff;if(typeof _0xa9054f!==_0x4e0fec(0x289))return _0x4e0fec(0xe2);const _0x317606=_0xa9054f[_0x4e0fec(0xe3)]();if(_0x317606['startsWith']('/')||_0x317606[_0x4e0fec(0x225)]('./')||_0x317606[_0x4e0fec(0x225)](_0x4e0fec(0x277))||/^[A-Za-z]:[\\/]/[_0x4e0fec(0x1fa)](_0x317606))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x4e0fec(0x1fa)](_0x317606))return _0x4e0fec(0x17a);const _0x5873ef=_0x317606[_0x4e0fec(0x244)](/[\s-]+/g,'')[_0x4e0fec(0x115)];if(_0x5873ef===0x7c)return'activation';if(_0x5873ef>=0x95&&_0x5873ef<=0xfc)return _0x4e0fec(0x7f);return _0x4e0fec(0xe2);}return okdbLicenseCodec={'toBase32':_0x4af465,'fromBase32':_0x208fa7,'encodeLicensePayload':_0x5f5eac,'decodeLicensePayload':_0xde26f4,'encodeLicenseBlob':_0x799800,'decodeLicenseBlob':_0x3e03f1,'licenseHash':_0x1b7b32,'derivePin':_0x27ef0f,'encodeActivationToken':_0x554b03,'decodeActivationToken':_0x36c847,'verifyActivation':_0x16365a,'detectInputType':_0x37f5e4,'FEATURE_NAMES':_0x3aa404,'LICENSE_TYPE_STANDARD':_0x28a5f5,'LICENSE_TYPE_OPEN':_0x216d55,'LICENSE_TYPE_INTERNAL':_0x445094,'OPEN_LICENSE_MAX_DURATION_MS':_0x5a76a6},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x39fd8e extends Error{constructor(_0x17b3e5,_0x53e70e,_0x17b478={}){const _0x567210=_0x30ec;super(_0x17b3e5),this[_0x567210(0x362)]='OKDBError',this['code']=_0x53e70e,this[_0x567210(0x2ad)]=_0x17b478,_0x17b478[_0x567210(0x1e5)]&&(this['cause']=_0x17b478[_0x567210(0x1e5)]),Error[_0x567210(0x1ed)](this,this[_0x567210(0x9e)]);}}class _0x18259e extends _0x39fd8e{constructor(_0xea6e94,_0x10acd7,_0x3e19a3,_0x4ef640){const _0x1b7cfa=_0x30ec;super('Version\x20mismatch\x20for\x20'+_0xea6e94+'@'+_0x10acd7+_0x1b7cfa(0x2db)+_0x3e19a3+_0x1b7cfa(0x26c)+_0x4ef640,_0x1b7cfa(0x128),{'type':_0xea6e94,'key':_0x10acd7,'expectedVersion':_0x3e19a3,'actualVersion':_0x4ef640}),this[_0x1b7cfa(0x362)]=_0x1b7cfa(0x253);}}class _0x248974 extends _0x39fd8e{constructor(_0x2a2d5b,_0x50e069){const _0x54998e=_0x30ec;super(_0x2a2d5b+'@'+_0x50e069+'\x20does\x20not\x20exist',_0x54998e(0x1be),{'type':_0x2a2d5b,'key':_0x50e069}),this[_0x54998e(0x362)]=_0x54998e(0x318);}}class _0x110faf extends _0x39fd8e{constructor(_0x37e34d,_0x5af3b6){const _0x29388=_0x30ec;super(_0x37e34d+'@'+_0x5af3b6+'\x20already\x20exists',_0x29388(0x293),{'type':_0x37e34d,'key':_0x5af3b6}),this['name']='OKDBAlreadyExistsError';}}class _0xcd0228 extends _0x39fd8e{constructor(_0x207e46,_0x12a9ec){const _0x430195=_0x30ec,_0x54730b=typeof _0x12a9ec;super(_0x430195(0x201)+_0x207e46+_0x430195(0x2b2)+_0x54730b+_0x430195(0x100)+_0x12a9ec,_0x430195(0xaf),{'index':_0x207e46,'key':_0x12a9ec,'keyType':_0x54730b}),this[_0x430195(0x362)]=_0x430195(0x180);}}class _0x4e46c extends _0x39fd8e{constructor(_0x1e3315){const _0x279de5=_0x30ec,_0x4aefb2=typeof _0x1e3315;super(_0x279de5(0x260)+_0x4aefb2+_0x279de5(0x1ca)+_0x1e3315,_0x279de5(0x1cd),{'key':_0x1e3315,'keyType':_0x4aefb2}),this[_0x279de5(0x362)]=_0x279de5(0xf6);}}class _0x2ecc0b extends _0x39fd8e{constructor(_0x354cfc){const _0x6c805e=_0x30ec;super(_0x6c805e(0x27f)+_0x354cfc+'\x27\x20doesn\x27t\x20exist',_0x6c805e(0x308),{'type':_0x354cfc}),this['name']=_0x6c805e(0x233);}}class _0x10e6c0 extends _0x39fd8e{constructor(_0x949971){const _0x328d7d=_0x30ec;super(_0x328d7d(0x27f)+_0x949971+_0x328d7d(0x2f2),_0x328d7d(0x28d),{'type':_0x949971}),this['name']='OKDBTypeAlreadyRegisteredError';}}class _0x362e0a extends _0x39fd8e{constructor(_0x4038bb,_0x1cf497){const _0x1f2adf=_0x30ec;super(_0x1f2adf(0x224)+_0x1cf497+_0x1f2adf(0x210)+_0x4038bb+_0x1f2adf(0x10e),_0x1f2adf(0x36e),{'type':_0x4038bb,'index':_0x1cf497}),this[_0x1f2adf(0x362)]='OKDBIndexNotRegisteredError';}}class _0x36ee06 extends _0x39fd8e{constructor(_0x4353a9,_0x4b33a5){const _0x357093=_0x30ec;super(_0x357093(0x224)+_0x4b33a5+_0x357093(0x210)+_0x4353a9+_0x357093(0xc0),'INDEX_ALREADY_REGISTERED',{'type':_0x4353a9,'index':_0x4b33a5}),this[_0x357093(0x362)]=_0x357093(0xdd);}}class _0x439d7f extends _0x39fd8e{constructor(_0x49b4cb,_0x2d077d={}){const _0x28eae8=_0x30ec;super(_0x49b4cb,'INVALID_VALUE',_0x2d077d),this[_0x28eae8(0x362)]='OKDBInvalidValueError';}}class _0x236f39 extends _0x39fd8e{constructor(_0x138061,_0x176d66,_0x4ebf99,_0x4518ea,_0x5691dd){const _0x261045=_0x30ec;super('Unique\x20constraint\x20violated\x20on\x20'+_0x138061+'@'+_0x176d66+':\x20key\x20['+_0x4ebf99+']\x20already\x20maps\x20to\x20\x27'+_0x4518ea+_0x261045(0x257)+_0x5691dd+'\x27',_0x261045(0x126),{'type':_0x138061,'index':_0x176d66,'indexKey':_0x4ebf99,'existingKey':_0x4518ea,'conflictingKey':_0x5691dd}),this[_0x261045(0x362)]=_0x261045(0x36c);}}class _0x16f6a1 extends _0x39fd8e{constructor(_0x5a3215,_0x27317f,_0x1c63c2){const _0x441a3e=_0x30ec;super(_0x441a3e(0x1b8)+_0x5a3215+'@'+_0x27317f,_0x441a3e(0x258),{'type':_0x5a3215,'key':_0x27317f,'errors':_0x1c63c2}),this[_0x441a3e(0x362)]='OKDBSchemaValidationError',this['type']=_0x5a3215,this[_0x441a3e(0xf5)]=_0x27317f,this[_0x441a3e(0xdf)]=_0x1c63c2;}}class _0x32249d extends _0x39fd8e{constructor(_0x4b25d5,_0x3d62f){const _0x58de9e=_0x30ec;super(_0x58de9e(0xcc)+_0x4b25d5+':\x20'+_0x3d62f['length']+_0x58de9e(0x2e5),_0x58de9e(0x310),{'type':_0x4b25d5,'failures':_0x3d62f}),this['name']='OKDBSchemaCollectionError',this[_0x58de9e(0xe0)]=_0x4b25d5,this[_0x58de9e(0x17f)]=_0x3d62f;}}class _0x53977f extends _0x39fd8e{constructor(_0x5f07b9,_0x22555b,_0x39e23d,_0x46f597,_0x50e709){const _0x23378d=_0x30ec;super(_0x23378d(0xfb)+_0x5f07b9+'@'+_0x22555b+'.'+_0x39e23d+_0x23378d(0x2bd)+_0x46f597+'@'+_0x50e709+_0x23378d(0x1fd),_0x23378d(0x32c),{'sourceType':_0x5f07b9,'sourceKey':_0x22555b,'fieldPath':_0x39e23d,'targetType':_0x46f597,'targetKey':_0x50e709}),this['name']='OKDBForeignKeyError',this[_0x23378d(0x32a)]=_0x5f07b9,this[_0x23378d(0xa4)]=_0x22555b,this[_0x23378d(0x1eb)]=_0x39e23d,this[_0x23378d(0x212)]=_0x46f597,this[_0x23378d(0x6e)]=_0x50e709;}}class _0x434e83 extends _0x39fd8e{constructor(_0x24be48,_0x4598c6,_0x1b55be){const _0x45016c=_0x30ec;super('Cannot\x20delete\x20'+_0x24be48+'@'+_0x4598c6+':\x20'+_0x1b55be[_0x45016c(0x115)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x24be48,'targetKey':_0x4598c6,'references':_0x1b55be}),this[_0x45016c(0x362)]='OKDBForeignKeyDeleteError',this[_0x45016c(0x212)]=_0x24be48,this[_0x45016c(0x6e)]=_0x4598c6,this['references']=_0x1b55be;}}class _0x5d63eb extends _0x39fd8e{constructor(_0x2ad95,_0x2a2d2d,_0x38f4fb){const _0x346b2a=_0x30ec;super('Index\x20\x22'+_0x2a2d2d+_0x346b2a(0x358)+_0x2ad95+_0x346b2a(0x156)+_0x38f4fb[_0x346b2a(0x17e)](_0x2c7ebe=>_0x2c7ebe['kind']+':'+_0x2c7ebe[_0x346b2a(0x362)])['join'](',\x20'),_0x346b2a(0x15e),{'type':_0x2ad95,'index':_0x2a2d2d,'usedBy':_0x38f4fb}),this['name']=_0x346b2a(0xed);}}return okdbError={'OKDBError':_0x39fd8e,'OKDBVersionMismatchError':_0x18259e,'OKDBNotFoundError':_0x248974,'OKDBAlreadyExistsError':_0x110faf,'OKDBInvalidIndexKeyError':_0xcd0228,'OKDBInvalidPrimaryKeyError':_0x4e46c,'OKDBTypeNotRegisteredError':_0x2ecc0b,'OKDBTypeAlreadyRegisteredError':_0x10e6c0,'OKDBIndexNotRegisteredError':_0x362e0a,'OKDBIndexAlreadyRegisteredError':_0x36ee06,'OKDBInvalidValueError':_0x439d7f,'OKDBUniqueConstraintError':_0x236f39,'OKDBSchemaValidationError':_0x16f6a1,'OKDBSchemaCollectionError':_0x32249d,'OKDBForeignKeyError':_0x53977f,'OKDBForeignKeyDeleteError':_0x434e83,'OKDBIndexHasConsumersError':_0x5d63eb},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2fac44=_0x19ca31;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x394a1a={'PUT':_0x2fac44(0x2cd),'REMOVE':_0x2fac44(0x33c),'INDEX_DROP':_0x2fac44(0x208),'INDEX_REGISTER':_0x2fac44(0x35b),'INDEX_RESET':_0x2fac44(0xc2),'TYPE_REGISTER':_0x2fac44(0xf1),'TYPE_DROP':_0x2fac44(0x327),'FTS_REGISTER':'registerFts','FTS_DROP':_0x2fac44(0x220),'FTS_RESET':_0x2fac44(0xf7),'SCHEMA_SET':_0x2fac44(0x206),'SCHEMA_DROP':_0x2fac44(0x25f),'TTL_SET':_0x2fac44(0x323),'TTL_CLEAR':'clearTtl'},_0x105d58={'SYSTEM_READY':_0x2fac44(0x36f),'SYSTEM_STOPPED':_0x2fac44(0x150),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x2fac44(0x1a9),'SYSTEM_DRAIN':_0x2fac44(0x196),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x2fac44(0x1b5),'ITEM_UPDATE':_0x2fac44(0x1d9),'ITEM_REMOVE':_0x2fac44(0x32b),'INDEX_RESET':_0x2fac44(0x129),'INDEX_READY':_0x2fac44(0x158),'INDEX_PROGRESS':_0x2fac44(0x278),'INDEX_DROP':_0x2fac44(0x120),'INDEX_REGISTERED':_0x2fac44(0x28f),'FTS_REGISTERED':_0x2fac44(0xb6),'FTS_DROP':_0x2fac44(0x143),'FTS_RESET':'fts:reset','SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x2fac44(0x23c),'UNIQUE_VIOLATION':_0x2fac44(0x121),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x2fac44(0x255),'REF_VIOLATION_RESOLVED':_0x2fac44(0x242),'SYNC_APPLY':_0x2fac44(0x34e),'TXN_START':_0x2fac44(0x249),'TXN_END':'txn:end','TXN_ROLLBACK':_0x2fac44(0x20b),'TYPE_REGISTERED':_0x2fac44(0xd2),'TYPE_DROP':'type:drop','ENV_OPENED':_0x2fac44(0x27e),'ENV_REMOVED':'env:removed','TTL_EXPIRED':'ttl:expired','TTL_SET':_0x2fac44(0x16d),'TTL_CLEAR':_0x2fac44(0x75),'LICENSE_INVALID':_0x2fac44(0x1b2),'LICENSE_ADDED':_0x2fac44(0x15b),'LICENSE_ACTIVATED':_0x2fac44(0x2ab),'LICENSE_REMOVED':'license:removed'},_0x1db8fc={'CREATING':'creating','RESETTING':'resetting','READY':_0x2fac44(0x1a8),'DROPPING':'dropping','WAITING':_0x2fac44(0x11d)},_0x9ddfa7={'CREATED':_0x2fac44(0x218),'STARTING':_0x2fac44(0xb4),'STARTED':_0x2fac44(0x144),'STOPPING':_0x2fac44(0xf2),'STOPPED':_0x2fac44(0x1df)},_0x258d42={'CREATING':_0x2fac44(0x2af),'READY':_0x2fac44(0x1a8),'HALTED':_0x2fac44(0x301),'STOPPED':_0x2fac44(0x1df),'RESETTING':_0x2fac44(0x72)},_0x400e77=Object[_0x2fac44(0x320)]({'POKE':_0x2fac44(0x177),'DRAIN':_0x2fac44(0x1e9)});return okdbEnums={'BUS_EVENTS':_0x400e77,'CHANGE_ACTIONS':_0x394a1a,'EVENTS':_0x105d58,'INDEX_STATE':_0x1db8fc,'OKDB_STATE':_0x9ddfa7,'VIEW_STATE':_0x258d42},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x51ca3c=_0x19ca31;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x4c74a0=require$$1,_0x563421=require$$1$1,_0x33e306=require$$0,_0x25938b=_0x4c74a0[_0x51ca3c(0x170)](_0x563421[_0x51ca3c(0x252)](__dirname,_0x51ca3c(0x160)),'utf8')[_0x51ca3c(0xe3)](),_0xc5615b=_0x33e306[_0x51ca3c(0x295)](_0x25938b)[_0x51ca3c(0x7a)]({'type':'spki','format':_0x51ca3c(0x105)}),_0x4ba06d=_0x33e306['createHash']('sha256')['update'](_0xc5615b)[_0x51ca3c(0xcd)]('hex')[_0x51ca3c(0x281)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x25938b,'PUB_FINGERPRINT':_0x4ba06d},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x5a8d31=_0x19ca31;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x33c6ce=require$$0,{OKDBError:_0x2a8168}=requireOkdbError(),{EVENTS:_0xdf7b30}=requireOkdbEnums(),_0x29b3f6=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x16ed3f,LICENSE_TYPE_INTERNAL:_0x59843a,OPEN_LICENSE_MAX_DURATION_MS:_0x130daa}=_0x29b3f6,_0x4c4653=requireOkdbPubkey(),_0x4be419={'LICENSED_BUILD':_0x5a8d31(0x168),'PUBLIC_KEY_PEM':_0x4c4653[_0x5a8d31(0x2e6)],'PUB_FINGERPRINT':_0x4c4653['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':_0x5a8d31(0x35c)},_0x550afd=_0x5a8d31(0x23f),_0x596d9f={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x8c5bf0(_0x389aed){const _0x1b85e1=_0x5a8d31;!_0x389aed[_0x1b85e1(0x11b)](_0x550afd)&&await _0x389aed[_0x1b85e1(0xf1)](_0x550afd);}class _0x4e1493{constructor(_0x439c5d){const _0x460ec3=_0x5a8d31;this[_0x460ec3(0x230)]=_0x439c5d,this['_active']=null;}async[_0x5a8d31(0x184)](){const _0x58f005=_0x5a8d31,_0x2b7156=this[_0x58f005(0x230)][_0x58f005(0x2c8)];if(!_0x2b7156||!_0x2b7156[_0x58f005(0x11b)](_0x550afd)){this[_0x58f005(0x1d8)]=null;return;}const _0x228c60=this[_0x58f005(0x230)]['id'];let _0x1a3f17=null;for(const {key:_0xf4ea16,value:_0x5212fe}of _0x2b7156[_0x58f005(0x2e9)](_0x550afd)){const _0x28b173=this['_computeStatus'](_0x5212fe,_0x228c60);_0x28b173===_0x58f005(0x361)&&!_0x1a3f17&&(_0x1a3f17={..._0x5212fe,'id':_0xf4ea16,'status':_0x28b173});}this[_0x58f005(0x1d8)]=_0x1a3f17;if(this[_0x58f005(0x1d8)]&&this[_0x58f005(0x1d8)][_0x58f005(0x1e1)]===_0x16ed3f){const _0x51656e=Math['ceil']((this[_0x58f005(0x1d8)][_0x58f005(0x112)]-Date['now']())/0x5265c00);this[_0x58f005(0x230)]['log']?.[_0x58f005(0x167)](_0x58f005(0x2f0)+_0x51656e+_0x58f005(0x1d7),{'feature':_0x58f005(0x1bb),'licensee':this[_0x58f005(0x1d8)][_0x58f005(0x270)],'expiresAt':new Date(this[_0x58f005(0x1d8)]['expiresAt'])[_0x58f005(0xe9)]()});}this['_active']&&this[_0x58f005(0x1d8)]['licenseType']===_0x59843a&&this[_0x58f005(0x230)][_0x58f005(0x35c)]?.[_0x58f005(0x167)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x58f005(0x1bb),'licensee':this[_0x58f005(0x1d8)]['licensee']});}[_0x5a8d31(0x363)](_0x3408ff,_0x22f611){const _0x5d637c=_0x5a8d31;if(!_0x3408ff[_0x5d637c(0x7f)])return _0x5d637c(0xb0);let _0x8a9b69;try{_0x8a9b69=_0x29b3f6[_0x5d637c(0x226)](_0x3408ff['blob']);}catch(_0x42e44e){return _0x5d637c(0xb0);}try{const _0x2657a3=_0x33c6ce['verify'](null,_0x8a9b69[_0x5d637c(0x34b)],_0x4be419['PUBLIC_KEY_PEM'],_0x8a9b69['sig']);if(!_0x2657a3)return _0x5d637c(0xb0);}catch(_0x1eae97){return _0x5d637c(0xb0);}if(_0x8a9b69[_0x5d637c(0x176)][_0x5d637c(0x1e1)]===_0x59843a)return _0x5d637c(0x361);if(_0x8a9b69[_0x5d637c(0x176)][_0x5d637c(0x112)]<=Date['now']())return _0x5d637c(0xd8);if(_0x8a9b69['decoded'][_0x5d637c(0x1e1)]===_0x16ed3f)return'active';if(!_0x3408ff['activation'])return _0x5d637c(0x1f5);const _0x598009=_0x29b3f6['verifyActivation']({'tokenString':_0x3408ff['activation'],'nodeId':_0x22f611,'rawBlobBuf':_0x8a9b69[_0x5d637c(0x205)],'pubKeyPem':_0x4be419[_0x5d637c(0x2e6)],'pubFingerprint':_0x4be419[_0x5d637c(0x1c1)]});if(_0x598009[_0x5d637c(0x228)]===_0x5d637c(0x1a4)||_0x598009['reason']===_0x5d637c(0x266))return'wrong_node';if(_0x598009[_0x5d637c(0x228)]===_0x5d637c(0x13e))return _0x5d637c(0xd8);if(!_0x598009[_0x5d637c(0x297)])return _0x5d637c(0x22f);return _0x5d637c(0x361);}get[_0x5a8d31(0x361)](){const _0x496205=_0x5a8d31;return this[_0x496205(0x1d8)];}get[_0x5a8d31(0x2d5)](){const _0x14dc4d=_0x5a8d31;return this[_0x14dc4d(0x1d8)]??_0x596d9f;}[_0x5a8d31(0x2e0)](_0x4839ab){const _0x115dd5=_0x5a8d31;if(_0x4be419[_0x115dd5(0x2c5)]!==_0x115dd5(0x168))return;const _0xa1b433=this['effective'];if(!_0xa1b433[_0x115dd5(0x1cf)]?.[_0x4839ab]){const _0x3185d4=_0xa1b433[_0x115dd5(0x70)]?_0x115dd5(0x16e)+_0x4839ab+_0x115dd5(0xbd)+_0x4839ab+_0x115dd5(0xd9):_0x115dd5(0x335)+_0x4839ab+_0x115dd5(0xeb)+_0x4839ab+'\x22.';throw new _0x2a8168(_0x3185d4,_0x115dd5(0x332),{'feature':_0x4839ab});}}[_0x5a8d31(0xfa)](_0x5ca02f){const _0x155e84=_0x5a8d31;if(_0x4be419[_0x155e84(0x2c5)]!==_0x155e84(0x168))return!![];return!!this[_0x155e84(0x2d5)]['features']?.[_0x5ca02f];}[_0x5a8d31(0x173)](_0xc46b54,_0x58c5e5){const _0x3e7872=_0x5a8d31;if(_0x4be419[_0x3e7872(0x2c5)]!==_0x3e7872(0x168))return;const _0x1a0dfd=this[_0x3e7872(0x2d5)],_0x3760d2=_0x1a0dfd[_0x3e7872(0x321)]?.[_0xc46b54];if(_0x3760d2===null||_0x3760d2===undefined||_0x3760d2===0x0)return;if(_0x58c5e5>=_0x3760d2)throw new _0x2a8168('License\x20limit\x20exceeded:\x20'+_0xc46b54+'\x20('+_0x58c5e5+'/'+_0x3760d2+')',_0x3e7872(0x1e0),{'limit':_0xc46b54,'current':_0x58c5e5,'max':_0x3760d2});}async['addLicense'](_0x44f940){const _0x9aa4e=_0x5a8d31;let _0x20633c;try{_0x20633c=_0x29b3f6[_0x9aa4e(0x226)](_0x44f940);}catch(_0x4e9c9d){throw new _0x2a8168('Invalid\x20license\x20blob:\x20'+_0x4e9c9d[_0x9aa4e(0x9d)],_0x9aa4e(0x90));}let _0x59f7ce;try{_0x59f7ce=_0x33c6ce[_0x9aa4e(0x10d)](null,_0x20633c[_0x9aa4e(0x34b)],_0x4be419[_0x9aa4e(0x2e6)],_0x20633c['sig']);}catch(_0x371adf){throw new _0x2a8168(_0x9aa4e(0x103)+_0x371adf['message'],_0x9aa4e(0x90));}if(!_0x59f7ce)throw new _0x2a8168(_0x9aa4e(0x239)+(_0x9aa4e(0x106)+_0x4be419[_0x9aa4e(0x1c1)]+'.\x20')+_0x9aa4e(0x36a),_0x9aa4e(0x90),{'expectedFingerprint':_0x4be419[_0x9aa4e(0x1c1)]});if(_0x20633c['decoded'][_0x9aa4e(0x1e1)]===_0x16ed3f){const _0x5723e2=_0x20633c[_0x9aa4e(0x176)]['expiresAt']-_0x20633c[_0x9aa4e(0x176)][_0x9aa4e(0x23d)];if(_0x5723e2>_0x130daa)throw new _0x2a8168(_0x9aa4e(0x222)+Math['ceil'](_0x5723e2/(0x1e*0x5265c00))+_0x9aa4e(0xda),_0x9aa4e(0x90));}const _0x299aa5=this[_0x9aa4e(0x230)][_0x9aa4e(0x2c8)];await _0x8c5bf0(_0x299aa5);const _0x1893f0=_0x29b3f6['licenseHash'](_0x20633c[_0x9aa4e(0x205)])['toString'](_0x9aa4e(0x1fc));for(const {value:_0x36721a}of _0x299aa5['getRange'](_0x550afd)){if(_0x36721a[_0x9aa4e(0xcf)]===_0x1893f0)throw new _0x2a8168(_0x9aa4e(0x197),_0x9aa4e(0x90));}const _0x4471c8=_0x33c6ce['randomUUID'](),_0x4d0d94={'blob':_0x44f940,'activation':null,'addedAt':Date[_0x9aa4e(0x92)](),'_licenseHash':_0x1893f0,'licensee':_0x20633c[_0x9aa4e(0x176)][_0x9aa4e(0x270)],'expiresAt':_0x20633c['decoded'][_0x9aa4e(0x112)],'features':_0x20633c['decoded']['features'],'limits':_0x20633c[_0x9aa4e(0x176)][_0x9aa4e(0x321)],'licenseType':_0x20633c[_0x9aa4e(0x176)][_0x9aa4e(0x1e1)]};return await _0x299aa5['put'](_0x550afd,_0x4471c8,_0x4d0d94),{'id':_0x4471c8,..._0x4d0d94};}async['activateLicense'](_0x24ca55){const _0x448627=_0x5a8d31;let _0x4b7db3;try{_0x4b7db3=_0x29b3f6[_0x448627(0x161)](_0x24ca55);}catch(_0x42be36){throw new _0x2a8168('Invalid\x20activation\x20token:\x20'+_0x42be36[_0x448627(0x9d)],_0x448627(0x2f6));}const _0x58edad=_0x4b7db3['licenseHash']['toString'](_0x448627(0x1fc)),_0x468564=this[_0x448627(0x230)][_0x448627(0x2c8)];if(!_0x468564||!_0x468564['hasType'](_0x550afd))throw new _0x2a8168('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x448627(0x2f6));let _0x166cd3=null,_0x11c9fc=null;for(const {key:_0x9ff691,value:_0x144bc5}of _0x468564[_0x448627(0x2e9)](_0x550afd)){if(_0x144bc5[_0x448627(0xcf)]===_0x58edad){_0x166cd3=_0x9ff691,_0x11c9fc=_0x144bc5;break;}}if(!_0x166cd3)throw new _0x2a8168('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x448627(0x2f6));const {rawBuf:_0x4215b2}=_0x29b3f6[_0x448627(0x226)](_0x11c9fc[_0x448627(0x7f)]),_0x30c50a=_0x29b3f6[_0x448627(0x1af)]({'tokenString':_0x24ca55,'nodeId':this[_0x448627(0x230)]['id'],'rawBlobBuf':_0x4215b2,'pubKeyPem':_0x4be419[_0x448627(0x2e6)],'pubFingerprint':_0x4be419[_0x448627(0x1c1)]});if(!_0x30c50a['valid'])throw new _0x2a8168(_0x448627(0x2c9)+_0x30c50a[_0x448627(0x228)],_0x448627(0x2f6),{'reason':_0x30c50a[_0x448627(0x228)]});const _0x3aada0={..._0x11c9fc,'activation':_0x24ca55};return await _0x468564[_0x448627(0x2a6)](_0x550afd,_0x166cd3,_0x3aada0),{'id':_0x166cd3,..._0x3aada0};}async['removeLicense'](_0x430175){const _0x1bce7f=_0x5a8d31,_0x1958b7=this[_0x1bce7f(0x230)][_0x1bce7f(0x2c8)];if(!_0x1958b7||!_0x1958b7[_0x1bce7f(0x11b)](_0x550afd))return;await _0x1958b7[_0x1bce7f(0x33c)](_0x550afd,_0x430175);}async[_0x5a8d31(0xba)](){const _0x1e24fc=_0x5a8d31,_0x48eb3=this['okdb'][_0x1e24fc(0x2c8)];if(!_0x48eb3||!_0x48eb3['hasType'](_0x550afd))return[];const _0x20825a=this[_0x1e24fc(0x230)]['id'],_0x1c7b11=[];for(const {key:_0x3e6180,value:_0x4f7e28}of _0x48eb3[_0x1e24fc(0x2e9)](_0x550afd)){const _0x5c7b1a=this[_0x1e24fc(0x363)](_0x4f7e28,_0x20825a);_0x1c7b11[_0x1e24fc(0x195)]({..._0x4f7e28,'id':_0x3e6180,'status':_0x5c7b1a});}return _0x1c7b11;}[_0x5a8d31(0xb2)](){const _0x5ca3af=_0x5a8d31,_0xf131c2=this[_0x5ca3af(0x230)][_0x5ca3af(0x2c8)];if(!_0xf131c2||!_0xf131c2['hasType'](_0x550afd))return[];const _0xe212fd=this[_0x5ca3af(0x230)]['id'],_0x4594be=[];for(const {key:_0x2bdffb,value:_0x5ab365}of _0xf131c2[_0x5ca3af(0x2e9)](_0x550afd)){if(_0x5ab365[_0x5ca3af(0xcf)]){if(_0x5ab365[_0x5ca3af(0x1e1)]===_0x16ed3f)_0x4594be[_0x5ca3af(0x195)]({'licenseId':_0x2bdffb,'pin':null});else{const _0x481b14=Buffer[_0x5ca3af(0xa9)](_0x5ab365[_0x5ca3af(0xcf)],_0x5ca3af(0x1fc)),{pin:_0x43876e}=_0x29b3f6['derivePin'](_0xe212fd,_0x481b14,_0x4be419['PUB_FINGERPRINT']);_0x4594be[_0x5ca3af(0x195)]({'licenseId':_0x2bdffb,'pin':_0x43876e});}}}return _0x4594be;}async[_0x5a8d31(0x1b6)](){const _0x12d9a5=_0x5a8d31,_0x171b7f=this[_0x12d9a5(0x1d8)];await this['reload']();if(this[_0x12d9a5(0x1d8)]&&this[_0x12d9a5(0x1d8)][_0x12d9a5(0x1e1)]===_0x16ed3f){const _0x44b12b=Math[_0x12d9a5(0x1d4)]((this[_0x12d9a5(0x1d8)][_0x12d9a5(0x112)]-Date[_0x12d9a5(0x92)]())/0x5265c00);this[_0x12d9a5(0x230)][_0x12d9a5(0x35c)]?.[_0x12d9a5(0x167)](_0x12d9a5(0x2f0)+_0x44b12b+'\x20day(s).',{'feature':_0x12d9a5(0x1bb),'licensee':this[_0x12d9a5(0x1d8)]['licensee'],'expiresAt':new Date(this[_0x12d9a5(0x1d8)][_0x12d9a5(0x112)])['toISOString']()});}this[_0x12d9a5(0x1d8)]&&this[_0x12d9a5(0x1d8)][_0x12d9a5(0x1e1)]===_0x59843a&&this['okdb']['log']?.[_0x12d9a5(0x167)](_0x12d9a5(0x236),{'feature':_0x12d9a5(0x1bb),'licensee':this[_0x12d9a5(0x1d8)]['licensee']});if(_0x171b7f&&!this[_0x12d9a5(0x1d8)]){this[_0x12d9a5(0x230)][_0x12d9a5(0x35c)]?.[_0x12d9a5(0x167)](_0x12d9a5(0xf8),{'feature':'license'}),this['okdb'][_0x12d9a5(0x111)]?.[_0x12d9a5(0x2df)](_0xdf7b30[_0x12d9a5(0x90)],{'previous':_0x171b7f});const _0x4f7fea=this['okdb']['options']?.[_0x12d9a5(0x312)]??_0x4be419['LICENSE_EXPIRED_ACTION'];_0x4f7fea===_0x12d9a5(0x12a)&&(this[_0x12d9a5(0x230)][_0x12d9a5(0x35c)]?.[_0x12d9a5(0x299)](_0x12d9a5(0xbb),{'feature':_0x12d9a5(0x1bb)}),this[_0x12d9a5(0x230)][_0x12d9a5(0x1f6)]()[_0x12d9a5(0x334)](()=>{})[_0x12d9a5(0x78)](()=>process[_0x12d9a5(0x365)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x4e1493,'_C':_0x4be419},okdbLicense;}function _0x30ec(_0x5c1a3f,_0x310a43){_0x5c1a3f=_0x5c1a3f-0x69;const _0x3cd676=_0x3cd6();let _0x30ec08=_0x3cd676[_0x5c1a3f];return _0x30ec08;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x15349e=_0x19ca31;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x56a6d3=require$$0$2,_0x73c339=require$$1,_0x22f4da=require$$2$1,_0x35b058=require$$1$1,_0x206645=_0x35b058[_0x15349e(0x252)](_0x22f4da['homedir'](),_0x15349e(0x259)),_0x3d1a96=0x3e8,_0x2afbc5={'reset':'\x1b[0m','bold':'\x1b[1m','dim':_0x15349e(0x276),'red':_0x15349e(0x272),'green':_0x15349e(0x25b),'yellow':'\x1b[33m','blue':'\x1b[34m','magenta':_0x15349e(0x263),'cyan':_0x15349e(0x74),'white':_0x15349e(0xbc),'gray':_0x15349e(0x155)},_0x337e14=!process[_0x15349e(0x2ce)][_0x15349e(0x142)]||!!process.env.NO_COLOR,_0x278e29=(_0x5b3104,_0x5a977b)=>_0x337e14?_0x5a977b:''+_0x5b3104+_0x5a977b+_0x2afbc5[_0x15349e(0xe4)],_0x1b82f4={'error':_0x2afbc5[_0x15349e(0x81)],'warn':_0x2afbc5[_0x15349e(0x15c)],'info':_0x2afbc5['cyan'],'debug':_0x2afbc5[_0x15349e(0x17d)]},_0x487bc1={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x144494(_0x403a5e,_0xd5e053='info'){const _0x4e39ca=_0x15349e,{level:_0x1084c4,msg:_0x5797b2,meta:_0x2fec74,context:_0x2e544c,ts:_0x46a012}=_0x403a5e;if((_0x487bc1[_0x1084c4]??0x1)<(_0x487bc1[_0xd5e053]??0x1))return;const _0x5d2b52=_0x278e29(_0x2afbc5[_0x4e39ca(0x17d)],new Date(_0x46a012)[_0x4e39ca(0xe9)]()),_0x310e83=_0x278e29(_0x1b82f4[_0x1084c4]??_0x2afbc5[_0x4e39ca(0x303)],_0x1084c4[_0x4e39ca(0x198)](0x5));let _0x3f4e0d='\x20\x20'+_0x5d2b52+'\x20'+_0x278e29(_0x2afbc5[_0x4e39ca(0x231)],_0x310e83)+'\x20'+_0x5797b2;if(_0x2fec74&&Object['keys'](_0x2fec74)[_0x4e39ca(0x115)]>0x0){const _0x2b1765=Object[_0x4e39ca(0x223)](_0x2fec74)[_0x4e39ca(0x17e)](([_0x311104,_0x5344d6])=>_0x311104+'='+_0x5344d6)[_0x4e39ca(0x252)]('\x20');_0x3f4e0d+=_0x278e29(_0x2afbc5[_0x4e39ca(0x2ed)],_0x4e39ca(0x234)+_0x2b1765+']');}if(_0x2e544c!==undefined){const _0x5787f0=typeof _0x2e544c===_0x4e39ca(0xb9)?JSON['stringify'](_0x2e544c):String(_0x2e544c);_0x3f4e0d+=_0x278e29(_0x2afbc5[_0x4e39ca(0x2ed)],'\x20\x20'+_0x5787f0);}const _0x4ceb31=_0x1084c4===_0x4e39ca(0x299)||_0x1084c4===_0x4e39ca(0x167)?process[_0x4e39ca(0x24c)]['write'][_0x4e39ca(0x2c3)](process[_0x4e39ca(0x24c)]):process[_0x4e39ca(0x2ce)][_0x4e39ca(0x107)][_0x4e39ca(0x2c3)](process[_0x4e39ca(0x2ce)]);_0x4ceb31(_0x3f4e0d+'\x0a');}function _0xfe30ef(_0x2468d9,_0x12dc42){const _0x1043fe=_0x15349e;if(_0x2468d9===0xcc||_0x2468d9>=0xc8&&_0x2468d9<0x12c&&!_0x12dc42){console['log'](_0x1043fe(0x16b)+_0x278e29(_0x2afbc5['green'],'✓')+'\x0a');return;}if(_0x2468d9>=0x190||_0x12dc42?.['error']){const _0x4c56a7=_0x12dc42?.[_0x1043fe(0x299)]??_0x12dc42?.[_0x1043fe(0x9d)]??'HTTP\x20'+_0x2468d9;console[_0x1043fe(0x35c)](_0x1043fe(0x16b)+_0x278e29(_0x2afbc5[_0x1043fe(0x81)],'✗')+'\x20'+_0x278e29(_0x2afbc5[_0x1043fe(0x231)]+_0x2afbc5[_0x1043fe(0x81)],String(_0x2468d9))+'\x20\x20'+_0x4c56a7+'\x0a');return;}const _0xaba5b4=Object[_0x1043fe(0x1e6)][_0x1043fe(0x1d6)][_0x1043fe(0xdb)](_0x12dc42??{},_0x1043fe(0x1d2))?_0x12dc42[_0x1043fe(0x1d2)]:_0x12dc42,_0x5383bd=_0x12dc42?.[_0x1043fe(0xe6)];console[_0x1043fe(0x35c)](''),_0x5c3f3c(_0xaba5b4,'\x20\x20');if(_0x5383bd?.['count']!=null||_0x5383bd?.['time']!=null){const _0x24ec03=[];if(_0x5383bd[_0x1043fe(0x186)]!=null)_0x24ec03[_0x1043fe(0x195)](_0x5383bd[_0x1043fe(0x186)]+'\x20result'+(_0x5383bd[_0x1043fe(0x186)]!==0x1?'s':''));if(_0x5383bd[_0x1043fe(0x153)]!=null)_0x24ec03[_0x1043fe(0x195)](_0x5383bd[_0x1043fe(0x153)]+'ms');console[_0x1043fe(0x35c)](_0x1043fe(0x16b)+_0x278e29(_0x2afbc5['dim'],_0x24ec03[_0x1043fe(0x252)]('\x20\x20·\x20\x20')));}console[_0x1043fe(0x35c)]('');}function _0x5c3f3c(_0x501ed1,_0x5a2b94=''){const _0x53f65b=_0x15349e;if(_0x501ed1===null||_0x501ed1===undefined){console[_0x53f65b(0x35c)](_0x5a2b94+_0x278e29(_0x2afbc5['dim'],_0x53f65b(0x80)));return;}if(Array[_0x53f65b(0x119)](_0x501ed1)){if(_0x501ed1[_0x53f65b(0x115)]===0x0){console[_0x53f65b(0x35c)](_0x5a2b94+_0x278e29(_0x2afbc5[_0x53f65b(0x2ed)],_0x53f65b(0x136)));return;}if(_0x501ed1['every'](_0x39c4a2=>_0x39c4a2&&typeof _0x39c4a2==='object'&&_0x53f65b(0xf5)in _0x39c4a2&&_0x53f65b(0x132)in _0x39c4a2)){_0x2a0b3e(_0x501ed1,_0x5a2b94);return;}if(_0x501ed1[_0x53f65b(0xd5)](_0x4b51f0=>_0x4b51f0&&typeof _0x4b51f0===_0x53f65b(0xb9)&&_0x53f65b(0xe0)in _0x4b51f0&&_0x53f65b(0x186)in _0x4b51f0)){_0x47566d(_0x501ed1,_0x5a2b94);return;}if(_0x501ed1[_0x53f65b(0xd5)](_0x154622=>typeof _0x154622!=='object'||_0x154622===null)){_0x501ed1['forEach']((_0x36e858,_0x52f2a9)=>console['log'](_0x5a2b94+_0x278e29(_0x2afbc5[_0x53f65b(0x17d)],_0x52f2a9+0x1+'.')+'\x20'+_0x278e29(_0x2afbc5[_0x53f65b(0x303)],String(_0x36e858))));return;}_0x501ed1[_0x53f65b(0x232)]((_0x316b48,_0x1dd268)=>{const _0x415c07=_0x53f65b;console[_0x415c07(0x35c)](_0x5a2b94+_0x278e29(_0x2afbc5['dim'],'['+_0x1dd268+']'));if(typeof _0x316b48==='object'&&_0x316b48!==null)_0x1ccb28(_0x316b48,_0x5a2b94+'\x20\x20');else console['log'](_0x5a2b94+'\x20\x20'+String(_0x316b48));});return;}if(typeof _0x501ed1===_0x53f65b(0xb9)){if(_0x53f65b(0xf5)in _0x501ed1&&_0x53f65b(0x132)in _0x501ed1&&Object[_0x53f65b(0x235)](_0x501ed1)[_0x53f65b(0x115)]<=0x3){console[_0x53f65b(0x35c)](_0x5a2b94+_0x278e29(_0x2afbc5['bold']+_0x2afbc5[_0x53f65b(0xc6)],String(_0x501ed1[_0x53f65b(0xf5)])));const _0x2770fd=_0x501ed1['value'];if(_0x2770fd&&typeof _0x2770fd===_0x53f65b(0xb9))_0x1ccb28(_0x2770fd,_0x5a2b94);else console[_0x53f65b(0x35c)](_0x5a2b94+_0x278e29(_0x2afbc5[_0x53f65b(0x303)],String(_0x2770fd)));return;}_0x1ccb28(_0x501ed1,_0x5a2b94);return;}console[_0x53f65b(0x35c)](_0x5a2b94+_0x278e29(_0x2afbc5['white'],String(_0x501ed1)));}function _0x1ccb28(_0x4adbea,_0x42ef32=''){const _0x2ad8f6=_0x15349e,_0x28ea59=Object[_0x2ad8f6(0x223)](_0x4adbea);if(_0x28ea59[_0x2ad8f6(0x115)]===0x0){console['log'](_0x42ef32+_0x278e29(_0x2afbc5[_0x2ad8f6(0x2ed)],'{}'));return;}const _0x47b9b3=Math[_0x2ad8f6(0xbf)](0x1c,Math[_0x2ad8f6(0x241)](..._0x28ea59[_0x2ad8f6(0x17e)](([_0xbef844])=>_0xbef844[_0x2ad8f6(0x115)])));for(const [_0x45d98a,_0x2ef4bb]of _0x28ea59){const _0x34c043=_0x278e29(_0x2afbc5['cyan'],_0x45d98a[_0x2ad8f6(0x198)](_0x47b9b3));if(_0x2ef4bb===null||_0x2ef4bb===undefined)console['log'](_0x42ef32+_0x34c043+'\x20\x20'+_0x278e29(_0x2afbc5[_0x2ad8f6(0x2ed)],_0x2ad8f6(0x325)));else{if(typeof _0x2ef4bb===_0x2ad8f6(0xb9)){const _0x195bb3=JSON[_0x2ad8f6(0x18c)](_0x2ef4bb);_0x195bb3['length']<=0x50?console['log'](_0x42ef32+_0x34c043+'\x20\x20'+_0x278e29(_0x2afbc5['dim'],_0x195bb3)):(console[_0x2ad8f6(0x35c)](_0x42ef32+_0x34c043),_0x5c3f3c(_0x2ef4bb,_0x42ef32+'\x20\x20'));}else{const _0x491d02=typeof _0x2ef4bb===_0x2ad8f6(0x355)?_0x278e29(_0x2ef4bb?_0x2afbc5[_0x2ad8f6(0xd1)]:_0x2afbc5[_0x2ad8f6(0x15c)],String(_0x2ef4bb)):typeof _0x2ef4bb===_0x2ad8f6(0x319)?_0x278e29(_0x2afbc5[_0x2ad8f6(0x2b8)],String(_0x2ef4bb)):_0x278e29(_0x2afbc5['white'],String(_0x2ef4bb));console['log'](_0x42ef32+_0x34c043+'\x20\x20'+_0x491d02);}}}}function _0x2a0b3e(_0x2701b9,_0x494b98=''){const _0x169b96=_0x15349e,_0x4cfff9=Math[_0x169b96(0xbf)](0x20,Math[_0x169b96(0x241)](..._0x2701b9['map'](_0x240e9f=>String(_0x240e9f[_0x169b96(0xf5)])[_0x169b96(0x115)])));for(const {key:_0x459982,value:_0x4a33e6,score:_0x72bf1d,clock:_0x585a9e}of _0x2701b9){const _0x1f432f=_0x278e29(_0x2afbc5[_0x169b96(0x231)]+_0x2afbc5[_0x169b96(0xc6)],String(_0x459982)[_0x169b96(0x198)](_0x4cfff9)),_0x14d0a4=_0x4a33e6==null?_0x278e29(_0x2afbc5[_0x169b96(0x2ed)],_0x169b96(0x325)):typeof _0x4a33e6===_0x169b96(0xb9)?_0x278e29(_0x2afbc5[_0x169b96(0x2ed)],JSON[_0x169b96(0x18c)](_0x4a33e6)):_0x278e29(_0x2afbc5[_0x169b96(0x303)],String(_0x4a33e6)),_0x1d2373=_0x72bf1d!=null?_0x278e29(_0x2afbc5[_0x169b96(0x17d)],_0x169b96(0x256)+_0x72bf1d[_0x169b96(0xd3)](0x4)):'',_0x3fe6c9=_0x585a9e!=null?_0x278e29(_0x2afbc5[_0x169b96(0x17d)],_0x169b96(0x333)+_0x585a9e):'';console['log'](_0x494b98+_0x1f432f+'\x20\x20'+_0x14d0a4+_0x1d2373+_0x3fe6c9);}}function _0x47566d(_0x1b3e6e,_0x486c15=''){const _0x3f2771=_0x15349e,_0x2fc873=Math['min'](0x20,Math['max'](..._0x1b3e6e[_0x3f2771(0x17e)](_0x481f77=>_0x481f77[_0x3f2771(0xe0)][_0x3f2771(0x115)])));for(const {type:_0x399e65,count:_0x4aa681,fields:_0x1454eb}of _0x1b3e6e){if(_0x399e65['startsWith']('~'))continue;const _0x197ae0=_0x278e29(_0x2afbc5[_0x3f2771(0x231)]+_0x2afbc5[_0x3f2771(0xc6)],_0x399e65['padEnd'](_0x2fc873)),_0xad18ed=_0x278e29(_0x2afbc5['magenta'],String(_0x4aa681)[_0x3f2771(0x29c)](0x6))+_0x278e29(_0x2afbc5[_0x3f2771(0x2ed)],_0x3f2771(0x94)),_0x3ddb55=_0x1454eb&&Object[_0x3f2771(0x235)](_0x1454eb)[_0x3f2771(0x115)]?_0x278e29(_0x2afbc5[_0x3f2771(0x2ed)],_0x3f2771(0x2c7)+Object[_0x3f2771(0x235)](_0x1454eb)['slice'](0x0,0x6)[_0x3f2771(0x252)](',\x20')+(Object[_0x3f2771(0x235)](_0x1454eb)['length']>0x6?'…':'')):'';console[_0x3f2771(0x35c)](_0x486c15+_0x197ae0+'\x20\x20'+_0xad18ed+_0x3ddb55);}}const _0x3bdabc=[_0x15349e(0x146),_0x15349e(0x2a1),_0x15349e(0x21b),'files/',_0x15349e(0x154),_0x15349e(0x2d0)];function _0x5da42a(_0x37ea93,_0x1d273c){const _0xc710c3=_0x15349e;if(_0x37ea93[_0xc710c3(0x225)](_0xc710c3(0x265)))return _0x37ea93;if(_0x37ea93[_0xc710c3(0x225)]('/'))return _0xc710c3(0x28a)+_0x37ea93;if(_0x37ea93[_0xc710c3(0x225)](_0xc710c3(0x29f)))return _0xc710c3(0x265)+_0x37ea93;const _0x1ac24c=_0x3bdabc[_0xc710c3(0x8e)](_0x265378=>_0x37ea93===_0x265378[_0xc710c3(0x244)](/\/$/,'')||_0x37ea93[_0xc710c3(0x225)](_0x265378));return _0x1ac24c?_0xc710c3(0x23e)+_0x1d273c+'/'+_0x37ea93:_0xc710c3(0x265)+_0x37ea93;}function _0x116641(_0x385283){const _0x288bf9=_0x15349e,_0x23c6e6={},_0xe3e3f3=[];let _0x42e526=0x0;while(_0x42e526<_0x385283[_0x288bf9(0x115)]){if((_0x385283[_0x42e526]==='--env'||_0x385283[_0x42e526]==='-e')&&_0x385283[_0x42e526+0x1]&&!_0x385283[_0x42e526+0x1][_0x288bf9(0x225)]('-'))_0x23c6e6['env']=_0x385283[++_0x42e526];else _0x385283[_0x42e526]==='--help'||_0x385283[_0x42e526]==='-h'?_0x23c6e6[_0x288bf9(0x254)]=!![]:_0xe3e3f3['push'](_0x385283[_0x42e526]);_0x42e526++;}return{'flags':_0x23c6e6,'rest':_0xe3e3f3};}const _0x3a729c={'system':_0x15349e(0x353),'envs':_0x15349e(0xfe),'types':_0x15349e(0x169),'data':_0x15349e(0x89),'indexes':_0x15349e(0x2b6),'fts':'Full-text\x20search','sync':_0x15349e(0x124),'queue':_0x15349e(0x267),'files':_0x15349e(0x350),'embeddings':_0x15349e(0x190),'engines':'Engines','admin':_0x15349e(0x21f),'event':_0x15349e(0x1ba),'processor':_0x15349e(0x2ef)},_0x1b04ac=[_0x15349e(0x16a),_0x15349e(0x159),_0x15349e(0x146),_0x15349e(0x147),'indexes','fts',_0x15349e(0x2f1),_0x15349e(0x354),'files',_0x15349e(0x76),_0x15349e(0x11c),_0x15349e(0x287)];function _0x387520(_0x388444){const _0x155654=_0x15349e;return _0x388444['replace'](/^\/api/,'')[_0x155654(0x244)](/^\[\/env\/:env=[^\]]*\]/,_0x155654(0x11a))[_0x155654(0x244)](/^\/env\/:env/,_0x155654(0x32d))['replace'](/^\//,'');}function _0x4b44be(_0x31562f,_0xb27dc7=''){const _0x4fca4e=_0x15349e,_0x2731c4=_0x31562f[_0x4fca4e(0x8f)]['listRoutes']()[_0x4fca4e(0x1a3)](_0x11e359=>!_0x11e359['meta']?.[_0x4fca4e(0x1db)]),_0x42bdf7=_0xb27dc7?_0x2731c4['filter'](_0x38d349=>_0x38d349[_0x4fca4e(0x1e3)][_0x4fca4e(0x1f4)]()['includes'](_0xb27dc7[_0x4fca4e(0x1f4)]())||(_0x61a047(_0x38d349)??'')[_0x4fca4e(0x1f4)]()[_0x4fca4e(0x238)](_0xb27dc7[_0x4fca4e(0x1f4)]())||_0x3bfe92(_0x38d349)[_0x4fca4e(0x8e)](_0x57feef=>_0x57feef[_0x4fca4e(0x1f4)]()[_0x4fca4e(0x238)](_0xb27dc7['toLowerCase']()))):_0x2731c4;if(!_0x42bdf7[_0x4fca4e(0x115)]){console[_0x4fca4e(0x35c)](_0x278e29(_0x2afbc5[_0x4fca4e(0x15c)],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0xb27dc7+'\x22\x0a'));return;}const _0x44abfa=new Map();for(const _0x5b0b13 of _0x42bdf7){const _0xcb4283=_0x3bfe92(_0x5b0b13)[0x0]??_0x4fca4e(0x135);if(!_0x44abfa[_0x4fca4e(0x243)](_0xcb4283))_0x44abfa[_0x4fca4e(0x288)](_0xcb4283,[]);_0x44abfa[_0x4fca4e(0x250)](_0xcb4283)['push'](_0x5b0b13);}const _0x2ddd1c=[..._0x1b04ac[_0x4fca4e(0x1a3)](_0x1f2a59=>_0x44abfa[_0x4fca4e(0x243)](_0x1f2a59)),...[..._0x44abfa['keys']()][_0x4fca4e(0x1a3)](_0xeff4a2=>!_0x1b04ac[_0x4fca4e(0x238)](_0xeff4a2))];console[_0x4fca4e(0x35c)]('');for(const _0x27d2e9 of _0x2ddd1c){const _0x5cb72f=_0x44abfa[_0x4fca4e(0x250)](_0x27d2e9);if(!_0x5cb72f?.[_0x4fca4e(0x115)])continue;console['log'](_0x278e29(_0x2afbc5['bold'],'\x20\x20'+(_0x3a729c[_0x27d2e9]??_0x27d2e9)));for(const _0x19f33d of _0x5cb72f){const _0x27c85d=_0x278e29(_0x2afbc5[_0x4fca4e(0x2b8)],_0x19f33d['method'][_0x4fca4e(0x198)](0x7)),_0x4dd438=_0x278e29(_0x2afbc5[_0x4fca4e(0xc6)],_0x387520(_0x19f33d[_0x4fca4e(0x1e3)])),_0x1782a1=_0x61a047(_0x19f33d)?_0x278e29(_0x2afbc5[_0x4fca4e(0x2ed)],'\x20\x20'+_0x61a047(_0x19f33d)):'',_0x5dafb5=_0x19f33d['operation']?.['id']?_0x278e29(_0x2afbc5[_0x4fca4e(0x17d)],_0x4fca4e(0x234)+_0x19f33d['operation']['id']+']'):'';console['log'](_0x4fca4e(0x1d0)+_0x27c85d+'\x20'+_0x4dd438+_0x1782a1+_0x5dafb5);}console[_0x4fca4e(0x35c)]('');}}function _0x287ed4(_0x466c2c,_0x2d9542){const _0x27de2c=_0x15349e,_0x5f2856=_0x2d9542[_0x27de2c(0x244)](/^\/api(\/env\/[^/]+)?\//,'')[_0x27de2c(0xad)]('/')[0x0],_0x1e2f9a=_0x466c2c[_0x27de2c(0x8f)][_0x27de2c(0x352)]()[_0x27de2c(0x1a3)](_0x2d68fd=>_0x2d68fd[_0x27de2c(0x1e3)][_0x27de2c(0x1f4)]()[_0x27de2c(0x238)](_0x5f2856[_0x27de2c(0x1f4)]()));if(!_0x1e2f9a[_0x27de2c(0x115)]){console[_0x27de2c(0x35c)](_0x278e29(_0x2afbc5['yellow'],_0x27de2c(0x2a0)+_0x2d9542+'\x0a'));return;}console[_0x27de2c(0x35c)]('');for(const _0xa43ad0 of _0x1e2f9a['slice'](0x0,0xc)){for(const _0x3a8abe of _0x2fdaa8(_0xa43ad0)){console[_0x27de2c(0x35c)](_0x3a8abe);}console[_0x27de2c(0x35c)]('');}}function _0x61a047(_0x1ef10b){const _0x5f35fe=_0x15349e;return _0x1ef10b[_0x5f35fe(0x261)]?.[_0x5f35fe(0xa3)]??_0x1ef10b[_0x5f35fe(0xe6)]?.[_0x5f35fe(0xa3)]??'';}function _0x6968c8(_0x1c731e){const _0x31e870=_0x15349e;return _0x1c731e['operation']?.['description']??_0x1c731e[_0x31e870(0xe6)]?.[_0x31e870(0x9f)]??'';}function _0x3bfe92(_0x16e19a){const _0x323868=_0x15349e;return _0x16e19a[_0x323868(0x261)]?.[_0x323868(0x33a)]?.[_0x323868(0x115)]?_0x16e19a[_0x323868(0x261)][_0x323868(0x33a)]:_0x16e19a[_0x323868(0xe6)]?.[_0x323868(0x33a)]??[];}function _0x2fdaa8(_0x1ed5af){const _0x4ebac2=_0x15349e,_0x1ea892=[];_0x1ea892[_0x4ebac2(0x195)]('\x20\x20'+_0x278e29(_0x2afbc5[_0x4ebac2(0x231)]+_0x2afbc5[_0x4ebac2(0x2b8)],_0x1ed5af[_0x4ebac2(0x217)][_0x4ebac2(0x198)](0x7))+'\x20'+_0x278e29(_0x2afbc5['bold']+_0x2afbc5[_0x4ebac2(0xc6)],_0x1ed5af[_0x4ebac2(0x1e3)]));_0x1ed5af[_0x4ebac2(0x261)]?.['id']&&_0x1ea892[_0x4ebac2(0x195)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x278e29(_0x2afbc5['gray'],'id:\x20'+_0x1ed5af[_0x4ebac2(0x261)]['id']));_0x61a047(_0x1ed5af)&&_0x1ea892['push'](_0x4ebac2(0x172)+_0x278e29(_0x2afbc5[_0x4ebac2(0x303)],_0x61a047(_0x1ed5af)));_0x6968c8(_0x1ed5af)&&_0x1ea892[_0x4ebac2(0x195)](_0x4ebac2(0x172)+_0x278e29(_0x2afbc5[_0x4ebac2(0x2ed)],_0x6968c8(_0x1ed5af)));_0x3bfe92(_0x1ed5af)[_0x4ebac2(0x115)]&&_0x1ea892[_0x4ebac2(0x195)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x278e29(_0x2afbc5[_0x4ebac2(0x17d)],'tags:\x20'+_0x3bfe92(_0x1ed5af)[_0x4ebac2(0x252)](',\x20')));_0x1ed5af[_0x4ebac2(0x261)]?.[_0x4ebac2(0x35e)]?.[_0x4ebac2(0x1ae)]&&_0x1ea892[_0x4ebac2(0x195)](_0x4ebac2(0x172)+_0x278e29(_0x2afbc5['gray'],_0x4ebac2(0x1a0)+_0x1ed5af[_0x4ebac2(0x261)]['safety'][_0x4ebac2(0x1ae)]));_0x1ed5af[_0x4ebac2(0x261)]?.[_0x4ebac2(0x8f)]?.[_0x4ebac2(0x294)]&&_0x1ed5af[_0x4ebac2(0x261)]['http'][_0x4ebac2(0x294)]!==_0x4ebac2(0x311)&&_0x1ea892[_0x4ebac2(0x195)](_0x4ebac2(0x172)+_0x278e29(_0x2afbc5[_0x4ebac2(0x17d)],_0x4ebac2(0x24a)+_0x1ed5af[_0x4ebac2(0x261)]['http'][_0x4ebac2(0x294)]));if(_0x1ed5af[_0x4ebac2(0x261)]?.['inputSchema']){const _0x5caad3=Object[_0x4ebac2(0x235)](_0x1ed5af[_0x4ebac2(0x261)]['inputSchema'][_0x4ebac2(0x1e2)]||{});if(_0x5caad3[_0x4ebac2(0x115)])_0x1ea892[_0x4ebac2(0x195)](_0x4ebac2(0x172)+_0x278e29(_0x2afbc5[_0x4ebac2(0x17d)],_0x4ebac2(0x2b3)+_0x5caad3[_0x4ebac2(0x252)](',\x20')));}return _0x1ed5af[_0x4ebac2(0xe6)]?.['body']&&_0x1ea892[_0x4ebac2(0x195)](_0x4ebac2(0x172)+_0x278e29(_0x2afbc5[_0x4ebac2(0x17d)],_0x4ebac2(0x1d3)+JSON['stringify'](_0x1ed5af['meta']['body']))),_0x1ea892;}async function _0xae59cd(_0x42f79d,_0x197828,_0x55722a,_0x4869b5=null){const _0x561224=_0x15349e,_0x21e142=_0x55722a[_0x561224(0x342)]('?'),_0x304dba=_0x21e142>=0x0?_0x55722a[_0x561224(0x281)](0x0,_0x21e142):_0x55722a,_0x16927d=_0x21e142>=0x0?_0x55722a['slice'](_0x21e142+0x1):'',_0x52f452=Object[_0x561224(0x2b1)](new URLSearchParams(_0x16927d)[_0x561224(0x223)]());return _0x42f79d[_0x561224(0x8f)][_0x561224(0x151)](_0x197828,_0x304dba,{'body':_0x4869b5,'query':_0x52f452,'headers':{'content-type':_0x561224(0x97)}},{'internal':!![]});}function _0x115573(_0x40262f){const _0x50743d=_0x15349e;if(!_0x40262f)return null;const _0x405a1d=_0x40262f['trim']();if(!_0x405a1d)return null;try{return JSON[_0x50743d(0xc8)](_0x405a1d);}catch{}try{return JSON[_0x50743d(0xc8)](_0x54d507(_0x405a1d));}catch(_0x2c43b8){throw new SyntaxError(_0x2c43b8[_0x50743d(0x9d)],{'cause':_0x2c43b8});}}function _0x54d507(_0x30d7c8){const _0x56c355=_0x15349e;let _0x4465e1='',_0x1954ef=0x0;while(_0x1954ef<_0x30d7c8['length']){const _0x41e870=_0x30d7c8[_0x1954ef];if(_0x41e870==='\x22'){_0x4465e1+='\x22',_0x1954ef++;while(_0x1954ef<_0x30d7c8['length']&&_0x30d7c8[_0x1954ef]!=='\x22'){if(_0x30d7c8[_0x1954ef]==='\x5c'){_0x4465e1+=_0x30d7c8[_0x1954ef++];if(_0x1954ef<_0x30d7c8['length'])_0x4465e1+=_0x30d7c8[_0x1954ef++];}else _0x4465e1+=_0x30d7c8[_0x1954ef++];}_0x4465e1+='\x22';if(_0x1954ef<_0x30d7c8[_0x56c355(0x115)])_0x1954ef++;continue;}if(_0x41e870==='\x27'){_0x4465e1+='\x22',_0x1954ef++;while(_0x1954ef<_0x30d7c8[_0x56c355(0x115)]&&_0x30d7c8[_0x1954ef]!=='\x27'){if(_0x30d7c8[_0x1954ef]==='\x5c'&&_0x30d7c8[_0x1954ef+0x1]==='\x27')_0x4465e1+='\x27',_0x1954ef+=0x2;else _0x30d7c8[_0x1954ef]==='\x22'?(_0x4465e1+='\x5c\x22',_0x1954ef++):_0x4465e1+=_0x30d7c8[_0x1954ef++];}_0x4465e1+='\x22';if(_0x1954ef<_0x30d7c8[_0x56c355(0x115)])_0x1954ef++;continue;}if('{}[]:,\x0a\x0d\x09\x20'[_0x56c355(0x238)](_0x41e870)){_0x4465e1+=_0x41e870,_0x1954ef++;continue;}let _0x145002='';while(_0x1954ef<_0x30d7c8['length']&&!_0x56c355(0x2bc)[_0x56c355(0x238)](_0x30d7c8[_0x1954ef])&&_0x30d7c8[_0x1954ef]!=='\x20'&&_0x30d7c8[_0x1954ef]!=='\x09'&&_0x30d7c8[_0x1954ef]!=='\x0a'&&_0x30d7c8[_0x1954ef]!=='\x0d'){_0x145002+=_0x30d7c8[_0x1954ef++];}let _0x48a1d6=_0x1954ef;while(_0x48a1d6<_0x30d7c8[_0x56c355(0x115)]&&(_0x30d7c8[_0x48a1d6]==='\x20'||_0x30d7c8[_0x48a1d6]==='\x09'))_0x48a1d6++;if(_0x30d7c8[_0x48a1d6]===':')_0x4465e1+='\x22'+_0x145002+'\x22';else _0x145002===_0x56c355(0x168)||_0x145002==='false'||_0x145002===_0x56c355(0x325)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/['test'](_0x145002)?_0x4465e1+=_0x145002:_0x4465e1+='\x22'+_0x145002+'\x22';}return _0x4465e1[_0x56c355(0x244)](/,(\s*[}\]])/g,'$1');}function _0x120877(_0x2d0f41){const _0x301472=_0x15349e,_0x217a4e=[];let _0x1a810d=0x0;while(_0x1a810d<_0x2d0f41[_0x301472(0x115)]){while(_0x1a810d<_0x2d0f41[_0x301472(0x115)]&&(_0x2d0f41[_0x1a810d]==='\x20'||_0x2d0f41[_0x1a810d]==='\x09'))_0x1a810d++;if(_0x1a810d>=_0x2d0f41[_0x301472(0x115)])break;const _0x3279b4=_0x2d0f41[_0x1a810d];if(_0x3279b4==='{'||_0x3279b4==='['){const _0xdb1276=_0x3279b4==='{'?'}':']',_0x1c60b7=_0x1a810d++;let _0x2f571d=0x1,_0x1edf9c=![],_0x2f6eee='';while(_0x1a810d<_0x2d0f41[_0x301472(0x115)]&&_0x2f571d>0x0){const _0x4bc1a2=_0x2d0f41[_0x1a810d];if(_0x1edf9c){if(_0x4bc1a2==='\x5c')_0x1a810d++;else{if(_0x4bc1a2===_0x2f6eee)_0x1edf9c=![];}}else{if(_0x4bc1a2==='\x22'||_0x4bc1a2==='\x27')_0x1edf9c=!![],_0x2f6eee=_0x4bc1a2;else{if(_0x4bc1a2===_0x3279b4)_0x2f571d++;else{if(_0x4bc1a2===_0xdb1276)_0x2f571d--;}}}_0x1a810d++;}_0x217a4e['push'](_0x2d0f41[_0x301472(0x281)](_0x1c60b7,_0x1a810d));continue;}if(_0x3279b4==='\x22'||_0x3279b4==='\x27'){const _0x390ad6=_0x3279b4;_0x1a810d++;let _0x773b52='';while(_0x1a810d<_0x2d0f41[_0x301472(0x115)]&&_0x2d0f41[_0x1a810d]!==_0x390ad6){if(_0x2d0f41[_0x1a810d]==='\x5c'&&_0x1a810d+0x1<_0x2d0f41[_0x301472(0x115)])_0x1a810d++,_0x773b52+=_0x2d0f41[_0x1a810d++];else _0x773b52+=_0x2d0f41[_0x1a810d++];}if(_0x1a810d<_0x2d0f41['length'])_0x1a810d++;_0x217a4e[_0x301472(0x195)](_0x773b52);continue;}let _0x86f52f='';while(_0x1a810d<_0x2d0f41['length']&&_0x2d0f41[_0x1a810d]!=='\x20'&&_0x2d0f41[_0x1a810d]!=='\x09'&&_0x2d0f41[_0x1a810d]!=='{'&&_0x2d0f41[_0x1a810d]!=='['){_0x86f52f+=_0x2d0f41[_0x1a810d++];}if(_0x86f52f)_0x217a4e[_0x301472(0x195)](_0x86f52f);}return _0x217a4e;}function _0x174cb9(_0x1106c0,_0x128904){const _0x48be22=_0x15349e,_0x47425e=[..._0x1106c0[_0x48be22(0x11f)][_0x48be22(0x235)]()]['filter'](_0x261188=>!_0x261188['startsWith']('~'));console['log'](['',_0x278e29(_0x2afbc5[_0x48be22(0x231)]+_0x2afbc5[_0x48be22(0xc6)],_0x48be22(0x19d)),_0x278e29(_0x2afbc5[_0x48be22(0x231)]+_0x2afbc5[_0x48be22(0xc6)],_0x48be22(0x203))+_0x278e29(_0x2afbc5[_0x48be22(0x231)],_0x48be22(0xdc))+_0x278e29(_0x2afbc5[_0x48be22(0x231)]+_0x2afbc5[_0x48be22(0xc6)],'║'),_0x278e29(_0x2afbc5[_0x48be22(0x231)]+_0x2afbc5[_0x48be22(0xc6)],_0x48be22(0xaa)),'','\x20\x20'+_0x278e29(_0x2afbc5[_0x48be22(0xd1)],'✓')+'\x20'+_0x278e29(_0x2afbc5['bold'],_0x48be22(0x1a6))+_0x48be22(0x273)+_0x128904[_0x48be22(0x1fe)],'\x20\x20'+_0x278e29(_0x2afbc5[_0x48be22(0xd1)],'✓')+'\x20'+_0x278e29(_0x2afbc5[_0x48be22(0x231)],_0x48be22(0x30d))+_0x48be22(0x23a)+_0x128904[_0x48be22(0x1fe)]+_0x48be22(0x28a),'\x20\x20'+_0x278e29(_0x2afbc5['green'],'✓')+'\x20'+_0x278e29(_0x2afbc5['bold'],_0x48be22(0x1e3))+'\x20\x20\x20\x20'+_0x128904[_0x48be22(0x2ea)],'\x20\x20'+_0x278e29(_0x2afbc5['green'],'✓')+'\x20'+_0x278e29(_0x2afbc5[_0x48be22(0x231)],'id')+_0x48be22(0x1cb)+_0x278e29(_0x2afbc5[_0x48be22(0x17d)],_0x1106c0['id']),'\x20\x20'+_0x278e29(_0x2afbc5[_0x48be22(0xd1)],'✓')+'\x20'+_0x278e29(_0x2afbc5['bold'],'envs')+_0x48be22(0x1d0)+_0x47425e[_0x48be22(0x17e)](_0x2ffc98=>_0x278e29(_0x2afbc5[_0x48be22(0xc6)],_0x2ffc98))[_0x48be22(0x252)]('\x20\x20'),..._0x128904[_0x48be22(0x251)]?[]:['\x20\x20'+_0x278e29(_0x2afbc5[_0x48be22(0xd1)],'✓')+'\x20'+_0x278e29(_0x2afbc5[_0x48be22(0x231)],_0x48be22(0x287))+_0x48be22(0xa2)+_0x128904[_0x48be22(0x1fe)]+_0x48be22(0x10f)],'',_0x278e29(_0x2afbc5[_0x48be22(0x2ed)],_0x48be22(0xc5)+_0x278e29(_0x2afbc5['bold'],'help')+'\x20for\x20commands,\x20'+_0x278e29(_0x2afbc5[_0x48be22(0x231)],_0x48be22(0x336))+_0x48be22(0x12e)+_0x278e29(_0x2afbc5[_0x48be22(0x231)],_0x48be22(0x365))+'\x20to\x20quit.'),''][_0x48be22(0x252)]('\x0a'));}function _0x57b031(_0xeec504){const _0x445f4f=_0x15349e;console[_0x445f4f(0x35c)]('\x0a'+_0x278e29(_0x2afbc5[_0x445f4f(0x231)],_0x445f4f(0x13c))+'\x20\x20'+_0x278e29(_0x2afbc5[_0x445f4f(0x2ed)],_0x445f4f(0x29e))+'\x0a\x0a\x20\x20'+_0x278e29(_0x2afbc5[_0x445f4f(0xc6)],'<path>')+_0x445f4f(0x1d1)+_0x278e29(_0x2afbc5['cyan'],_0x445f4f(0x2e1))+'\x20'+_0x278e29(_0x2afbc5['yellow'],_0x445f4f(0x29a))+_0x445f4f(0x24d)+_0x278e29(_0x2afbc5[_0x445f4f(0xc6)],_0x445f4f(0x1b7))+'\x20'+_0x278e29(_0x2afbc5['cyan'],_0x445f4f(0x2e1))+'\x20'+_0x278e29(_0x2afbc5['yellow'],_0x445f4f(0x189))+_0x445f4f(0x6f)+_0x278e29(_0x2afbc5[_0x445f4f(0x2ed)],_0x445f4f(0xd7))+_0x445f4f(0x110)+_0x278e29(_0x2afbc5['gray'],_0x445f4f(0x179))+'\x20\x20\x20\x20\x20\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'+_0x278e29(_0x2afbc5[_0x445f4f(0x17d)],_0x445f4f(0x159))+_0x445f4f(0x283)+_0x278e29(_0x2afbc5[_0x445f4f(0x17d)],'types')+_0x445f4f(0x8d)+_0xeec504[_0x445f4f(0x14b)]+_0x445f4f(0x1ad)+_0x278e29(_0x2afbc5[_0x445f4f(0x17d)],_0x445f4f(0x213))+_0x445f4f(0x247)+_0xeec504['env']+'/type/users\x0a\x20\x20\x20\x20'+_0x278e29(_0x2afbc5[_0x445f4f(0x17d)],_0x445f4f(0x12f))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0xeec504[_0x445f4f(0x14b)]+_0x445f4f(0xff)+_0x278e29(_0x2afbc5[_0x445f4f(0x17d)],_0x445f4f(0x2d8))+_0x445f4f(0xb3)+_0xeec504['env']+_0x445f4f(0x204)+_0x278e29(_0x2afbc5[_0x445f4f(0x17d)],_0x445f4f(0x93))+_0x445f4f(0x110)+_0x278e29(_0x2afbc5[_0x445f4f(0x17d)],_0x445f4f(0x69))+_0x445f4f(0x110)+_0x278e29(_0x2afbc5[_0x445f4f(0x17d)],'env/staging/info')+_0x445f4f(0x200)+_0x278e29(_0x2afbc5['bold'],_0x445f4f(0x19b))+'\x20\x20'+_0x278e29(_0x2afbc5[_0x445f4f(0x2ed)],'(on\x20any\x20path\x20command)')+_0x445f4f(0x18d)+_0x278e29(_0x2afbc5[_0x445f4f(0xc6)],_0x445f4f(0x1ee))+_0x445f4f(0x21c)+_0x278e29(_0x2afbc5[_0x445f4f(0xc6)],_0x445f4f(0x191))+_0x445f4f(0x26e)+_0x278e29(_0x2afbc5[_0x445f4f(0x2ed)],_0x445f4f(0xd7))+'\x0a\x20\x20\x20\x20'+_0x278e29(_0x2afbc5['gray'],_0x445f4f(0x315))+_0x445f4f(0x110)+_0x278e29(_0x2afbc5[_0x445f4f(0x17d)],_0x445f4f(0x2f3))+'\x0a\x20\x20\x20\x20'+_0x278e29(_0x2afbc5[_0x445f4f(0x17d)],_0x445f4f(0x117))+'\x0a\x0a'+_0x278e29(_0x2afbc5[_0x445f4f(0x231)],'\x20\x20Shell\x20commands')+'\x0a\x0a\x20\x20'+_0x278e29(_0x2afbc5[_0x445f4f(0xc6)],_0x445f4f(0x346))+'\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'+_0x278e29(_0x2afbc5[_0x445f4f(0xc6)],'env')+_0x445f4f(0x88)+_0x278e29(_0x2afbc5[_0x445f4f(0xc6)],_0x445f4f(0x336))+'\x20'+_0x278e29(_0x2afbc5['dim'],'[filter]')+_0x445f4f(0x214)+_0x278e29(_0x2afbc5['cyan'],_0x445f4f(0xc4))+'\x20'+_0x278e29(_0x2afbc5[_0x445f4f(0x2ed)],_0x445f4f(0x71))+_0x445f4f(0xce)+_0x278e29(_0x2afbc5['cyan'],_0x445f4f(0x2c4))+_0x445f4f(0x1c4)+_0x278e29(_0x2afbc5[_0x445f4f(0xc6)],'help')+_0x445f4f(0x28c)+_0x278e29(_0x2afbc5[_0x445f4f(0xc6)],_0x445f4f(0x365))+'\x20'+_0x278e29(_0x2afbc5[_0x445f4f(0x2ed)],_0x445f4f(0x26a))+_0x445f4f(0x24f));}async function _0x3a18fc(_0x129933,_0x4cb23b=0x0){const _0x1a514e=_0x15349e;process[_0x1a514e(0x2ce)][_0x1a514e(0x107)]('\x0a'),console[_0x1a514e(0x35c)](_0x278e29(_0x2afbc5[_0x1a514e(0x15c)],_0x1a514e(0x181)));try{await _0x129933[_0x1a514e(0x1f6)]();}catch(_0x4dcef1){console[_0x1a514e(0x299)](_0x278e29(_0x2afbc5[_0x1a514e(0x81)],'\x20\x20'+_0x4dcef1[_0x1a514e(0x9d)]));}process[_0x1a514e(0x365)](_0x4cb23b);}function _0x179f9c(_0x44217f){const _0x4836d1=_0x15349e,_0x46bcef=_0x44217f[_0x4836d1(0x14b)]!=='default'?_0x278e29(_0x2afbc5[_0x4836d1(0x15c)],'['+_0x44217f[_0x4836d1(0x14b)]+']'):'';return _0x278e29(_0x2afbc5['bold']+_0x2afbc5['cyan'],'okdb')+_0x46bcef+_0x278e29(_0x2afbc5[_0x4836d1(0x17d)],'>\x20');}const _0x5dc0d4=new Set([_0x15349e(0x275),_0x15349e(0x31e),'PUT',_0x15349e(0x302),_0x15349e(0x27b)]);async function _0x5eed84(_0x3ac55f,_0x58dedb,_0x3fb840,_0x6b6efc,_0xca918,_0x319894){const _0x4ad3d0=_0x15349e;_0x3ac55f=_0x3ac55f[_0x4ad3d0(0xe3)]();if(!_0x3ac55f||_0x3ac55f[_0x4ad3d0(0x225)]('#'))return;const _0x1d0884=_0x120877(_0x3ac55f),{flags:_0x32a5ad,rest:_0x513829}=_0x116641(_0x1d0884);if(!_0x513829['length'])return;const _0x3b9813=_0x513829[0x0],_0x5fb9dc=_0x3b9813[_0x4ad3d0(0x8c)]();if(_0x5fb9dc===_0x4ad3d0(0x282)){if(_0x513829[0x1])_0x287ed4(_0x58dedb,_0x5da42a(_0x513829[0x1],_0x32a5ad['env']??_0xca918[_0x4ad3d0(0x14b)]));else _0x57b031(_0xca918);return;}if(_0x5fb9dc===_0x4ad3d0(0x182)){const _0xb15045=_0x513829[0x1];if(!_0xb15045){console[_0x4ad3d0(0x35c)](_0x278e29(_0x2afbc5[_0x4ad3d0(0x81)],_0x4ad3d0(0xb7)));return;}try{_0x58dedb[_0x4ad3d0(0x14b)](_0xb15045),_0xca918[_0x4ad3d0(0x14b)]=_0xb15045,_0x319894?.['setPrompt'](_0x179f9c(_0xca918)),console[_0x4ad3d0(0x35c)](_0x4ad3d0(0x16b)+_0x278e29(_0x2afbc5['green'],'✓')+'\x20active\x20env:\x20'+_0x278e29(_0x2afbc5[_0x4ad3d0(0x231)]+_0x2afbc5[_0x4ad3d0(0xc6)],_0xb15045)+'\x0a');}catch{console[_0x4ad3d0(0x35c)](_0x4ad3d0(0x16b)+_0x278e29(_0x2afbc5['red'],'✗')+'\x20environment\x20'+_0x278e29(_0x2afbc5['bold'],_0xb15045)+_0x4ad3d0(0x316)+_0x278e29(_0x2afbc5[_0x4ad3d0(0x2ed)],_0x4ad3d0(0x73)));}return;}if(_0x5fb9dc===_0x4ad3d0(0x20e)){const _0x50711f=[..._0x58dedb[_0x4ad3d0(0x11f)][_0x4ad3d0(0x235)]()][_0x4ad3d0(0x1a3)](_0x8dbe98=>!_0x8dbe98[_0x4ad3d0(0x225)]('~'));console[_0x4ad3d0(0x35c)]('');for(const _0x4544d9 of _0x50711f){const _0x2d3c34=_0x4544d9===_0xca918[_0x4ad3d0(0x14b)];console['log']('\x20\x20'+(_0x2d3c34?_0x278e29(_0x2afbc5[_0x4ad3d0(0xd1)],'●'):_0x278e29(_0x2afbc5[_0x4ad3d0(0x2ed)],'○'))+'\x20\x20'+(_0x2d3c34?_0x278e29(_0x2afbc5[_0x4ad3d0(0x231)]+_0x2afbc5[_0x4ad3d0(0xc6)],_0x4544d9):_0x278e29(_0x2afbc5['dim'],_0x4544d9)));}console[_0x4ad3d0(0x35c)](_0x4ad3d0(0x16b)+_0x278e29(_0x2afbc5['dim'],'active:')+'\x20'+_0x278e29(_0x2afbc5['cyan'],_0xca918[_0x4ad3d0(0x14b)])),console[_0x4ad3d0(0x35c)]('');return;}if(_0x5fb9dc===_0x4ad3d0(0x19a)){const _0x4623f2=[..._0x58dedb[_0x4ad3d0(0x11f)][_0x4ad3d0(0xa1)]()]['filter'](_0x8ef898=>!_0x8ef898['name']['startsWith']('~'));console[_0x4ad3d0(0x35c)]('');const _0x266d70=Math[_0x4ad3d0(0x241)](..._0x4623f2['map'](_0x133d45=>_0x133d45[_0x4ad3d0(0x362)][_0x4ad3d0(0x115)]));for(const _0x367555 of _0x4623f2){const _0x27ae3b=_0x367555['name']===_0xca918[_0x4ad3d0(0x14b)],_0x30de6b=_0x27ae3b?_0x278e29(_0x2afbc5[_0x4ad3d0(0xd1)],'●'):_0x278e29(_0x2afbc5[_0x4ad3d0(0x2ed)],'○'),_0x57ccc1=_0x27ae3b?_0x278e29(_0x2afbc5['bold']+_0x2afbc5[_0x4ad3d0(0xc6)],_0x367555[_0x4ad3d0(0x362)][_0x4ad3d0(0x198)](_0x266d70)):_0x278e29(_0x2afbc5[_0x4ad3d0(0x2ed)],_0x367555[_0x4ad3d0(0x362)][_0x4ad3d0(0x198)](_0x266d70)),_0x1c78b9=[..._0x367555[_0x4ad3d0(0x227)][_0x4ad3d0(0x235)]()][_0x4ad3d0(0x1a3)](_0x7423be=>!_0x7423be['startsWith']('~')),_0x34c6f4=_0x1c78b9[_0x4ad3d0(0x115)]?_0x278e29(_0x2afbc5[_0x4ad3d0(0x2ed)],_0x1c78b9['slice'](0x0,0x5)[_0x4ad3d0(0x252)](',\x20')+(_0x1c78b9[_0x4ad3d0(0x115)]>0x5?_0x4ad3d0(0x2c0)+(_0x1c78b9[_0x4ad3d0(0x115)]-0x5)+'\x20more':'')):_0x278e29(_0x2afbc5[_0x4ad3d0(0x2ed)],_0x4ad3d0(0x1a2));console['log']('\x20\x20'+_0x30de6b+'\x20\x20'+_0x57ccc1+'\x20\x20'+_0x34c6f4);}console[_0x4ad3d0(0x35c)]('');return;}if(_0x5fb9dc===_0x4ad3d0(0xb1)){const _0x97678=_0x32a5ad[_0x4ad3d0(0x14b)]??_0x513829[0x1]??_0xca918[_0x4ad3d0(0x14b)];try{const _0x22ef0e=_0x58dedb[_0x4ad3d0(0x14b)](_0x97678),_0xc5cd05=[..._0x22ef0e['typeSubDbs'][_0x4ad3d0(0x235)]()]['filter'](_0x31ea97=>!_0x31ea97[_0x4ad3d0(0x225)]('~'))[_0x4ad3d0(0xab)]();console[_0x4ad3d0(0x35c)]('\x0a\x20\x20'+_0x278e29(_0x2afbc5[_0x4ad3d0(0x2ed)],_0xc5cd05[_0x4ad3d0(0x115)]+_0x4ad3d0(0x337)+(_0xc5cd05[_0x4ad3d0(0x115)]!==0x1?'s':'')+_0x4ad3d0(0x2cb)+_0x97678));for(const _0x552769 of _0xc5cd05){const _0x4dcd95=_0x22ef0e[_0x4ad3d0(0x227)][_0x4ad3d0(0x250)](_0x552769),_0xa49e4=_0x4dcd95?.[_0x4ad3d0(0x147)]?.['getCount']?.()??0x0,_0x3465a7=_0x278e29(_0x2afbc5[_0x4ad3d0(0x231)]+_0x2afbc5[_0x4ad3d0(0xc6)],_0x552769['padEnd'](0x1c));console['log'](_0x4ad3d0(0x1d0)+_0x3465a7+'\x20\x20'+_0x278e29(_0x2afbc5[_0x4ad3d0(0x2b8)],String(_0xa49e4)[_0x4ad3d0(0x29c)](0x6))+'\x20'+_0x278e29(_0x2afbc5[_0x4ad3d0(0x2ed)],_0x4ad3d0(0x9a)));}console[_0x4ad3d0(0x35c)]('');}catch(_0x3f0e1d){console['error'](_0x278e29(_0x2afbc5[_0x4ad3d0(0x81)],'\x0a\x20\x20'+_0x3f0e1d[_0x4ad3d0(0x9d)]+'\x0a'));}return;}if(_0x5fb9dc===_0x4ad3d0(0x149)){_0x4b44be(_0x58dedb,_0x513829['slice'](0x1)[_0x4ad3d0(0x252)]('\x20'));return;}if(_0x5fb9dc===_0x4ad3d0(0x1a5)){const _0xfaeaa4=(_0x513829[0x1]??'')[_0x4ad3d0(0x1f4)]();if(!_0xfaeaa4||_0xfaeaa4==='on')_0x6b6efc[_0x4ad3d0(0x178)]=!![],_0x6b6efc[_0x4ad3d0(0xa0)]='info',console[_0x4ad3d0(0x35c)](_0x4ad3d0(0x16b)+_0x278e29(_0x2afbc5[_0x4ad3d0(0xd1)],'✓')+'\x20logs\x20on\x20\x20'+_0x278e29(_0x2afbc5['dim'],'level:\x20info')+'\x0a');else{if(_0xfaeaa4===_0x4ad3d0(0x9b))_0x6b6efc[_0x4ad3d0(0x178)]=![],console[_0x4ad3d0(0x35c)](_0x4ad3d0(0x16b)+_0x278e29(_0x2afbc5[_0x4ad3d0(0x15c)],'○')+_0x4ad3d0(0x36d));else _0x487bc1[_0xfaeaa4]!==undefined?(_0x6b6efc['enabled']=!![],_0x6b6efc[_0x4ad3d0(0xa0)]=_0xfaeaa4,console[_0x4ad3d0(0x35c)]('\x0a\x20\x20'+_0x278e29(_0x2afbc5['green'],'✓')+_0x4ad3d0(0x32f)+_0x278e29(_0x2afbc5['bold'],_0xfaeaa4)+'\x0a')):console[_0x4ad3d0(0x299)](_0x278e29(_0x2afbc5['red'],_0x4ad3d0(0x114)));}return;}if(_0x5fb9dc===_0x4ad3d0(0x240)||_0x5fb9dc==='QUIT'){await _0x3a18fc(_0x58dedb,0x0);return;}if(_0x5fb9dc===_0x4ad3d0(0x307)){const _0x579583='http://localhost:'+_0x3fb840[_0x4ad3d0(0x1fe)]+_0x4ad3d0(0x10f),_0x5a5964=process[_0x4ad3d0(0x304)]===_0x4ad3d0(0xc1)?_0x4ad3d0(0x104)+_0x579583:process[_0x4ad3d0(0x304)]===_0x4ad3d0(0x1e4)?_0x4ad3d0(0x133)+_0x579583:_0x4ad3d0(0x360)+_0x579583;require$$4['exec'](_0x5a5964),console['log'](_0x4ad3d0(0x16b)+_0x278e29(_0x2afbc5['green'],'✓')+_0x4ad3d0(0x229)+_0x278e29(_0x2afbc5[_0x4ad3d0(0xc6)],_0x579583)+'\x0a');return;}let _0x43cb47,_0x4855c1,_0x1028e8;if(_0x5dc0d4[_0x4ad3d0(0x243)](_0x5fb9dc)){_0x43cb47=_0x5fb9dc,_0x4855c1=_0x513829[0x1],_0x1028e8=_0x513829[_0x4ad3d0(0x281)](0x2);if(!_0x4855c1){console[_0x4ad3d0(0x299)](_0x278e29(_0x2afbc5['red'],'\x20\x20Usage:\x20'+_0x3b9813+_0x4ad3d0(0x187)));return;}}else _0x43cb47=null,_0x4855c1=_0x513829[0x0],_0x1028e8=_0x513829[_0x4ad3d0(0x281)](0x1);const _0x2af169=_0x32a5ad[_0x4ad3d0(0x14b)]??_0xca918[_0x4ad3d0(0x14b)],_0x3657c8=_0x5da42a(_0x4855c1,_0x2af169);if(_0x32a5ad[_0x4ad3d0(0x254)]){_0x287ed4(_0x58dedb,_0x3657c8);return;}let _0x5a706b=null;if(_0x1028e8[_0x4ad3d0(0x115)]){const _0x5bc053=_0x1028e8[_0x4ad3d0(0x252)]('\x20');try{_0x5a706b=_0x115573(_0x5bc053);}catch(_0x308026){console[_0x4ad3d0(0x299)](_0x278e29(_0x2afbc5[_0x4ad3d0(0x81)],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x5bc053+_0x4ad3d0(0x16b)+_0x278e29(_0x2afbc5['dim'],_0x308026['message'])+'\x0a'));return;}}if(!_0x43cb47)_0x43cb47=_0x5a706b!==null?_0x4ad3d0(0x31e):_0x4ad3d0(0x275);try{const _0x2924e0=await _0xae59cd(_0x58dedb,_0x43cb47,_0x3657c8,_0x5a706b);_0xfe30ef(_0x2924e0[_0x4ad3d0(0x25a)],_0x2924e0[_0x4ad3d0(0x2d3)]);}catch(_0x526df2){console[_0x4ad3d0(0x299)](_0x4ad3d0(0x16b)+_0x278e29(_0x2afbc5['red'],'✗')+'\x20'+_0x526df2[_0x4ad3d0(0x9d)]+'\x0a');}}class _0x31408e{constructor(){const _0x284323=_0x15349e;this[_0x284323(0x15f)]=new Map(),this[_0x284323(0x8a)]=null,this[_0x284323(0x2ff)]=![];}}function _0x4ce02e(_0x3d19bc){const _0x25c2d4=_0x15349e,_0x4a6052=new _0x31408e();for(const _0x3049e4 of _0x3d19bc){if(_0x3049e4[_0x25c2d4(0xe6)]?.['hidden'])continue;const _0x4f0d2d=_0x3049e4['path'][_0x25c2d4(0x244)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')[_0x25c2d4(0x244)](/^\//,'');if(!_0x4f0d2d)continue;let _0x1595e9=_0x4a6052;for(const _0x58ecc8 of _0x4f0d2d['split']('/')['filter'](Boolean)){if(_0x58ecc8[_0x25c2d4(0x225)](':')){const _0x224e90=_0x58ecc8['slice'](0x1);if(!_0x1595e9['dynamic'])_0x1595e9['dynamic']={'param':_0x224e90,'node':new _0x31408e()};_0x1595e9=_0x1595e9[_0x25c2d4(0x8a)]['node'];}else{if(!_0x1595e9['children'][_0x25c2d4(0x243)](_0x58ecc8))_0x1595e9[_0x25c2d4(0x15f)][_0x25c2d4(0x288)](_0x58ecc8,new _0x31408e());_0x1595e9=_0x1595e9[_0x25c2d4(0x15f)]['get'](_0x58ecc8);}}_0x1595e9[_0x25c2d4(0x2ff)]=!![];}return _0x4a6052;}const _0x8b5df=new Map();function _0x4681ed(_0x5659a0,_0x41c82d,_0x336756){const _0x2f9844=_0x15349e,_0x1aa9d=_0x8b5df[_0x2f9844(0x250)](_0x5659a0);if(_0x1aa9d&&_0x1aa9d['exp']>Date[_0x2f9844(0x92)]())return _0x1aa9d[_0x2f9844(0x2ca)];const _0x56d477=_0x336756();return _0x8b5df[_0x2f9844(0x288)](_0x5659a0,{'val':_0x56d477,'exp':Date['now']()+_0x41c82d}),_0x56d477;}function _0x1b31bc(_0x9b14ed,_0x34433a,_0x1d887a,_0x16c96b){const _0x4746be=_0x15349e,_0x3d06fa=_0x34433a[_0x4746be(0x14b)]??_0x16c96b['env'];switch(_0x9b14ed){case _0x4746be(0x14b):return[..._0x1d887a[_0x4746be(0x11f)][_0x4746be(0x235)]()][_0x4746be(0x1a3)](_0x168716=>!_0x168716[_0x4746be(0x225)]('~'));case _0x4746be(0xe0):return _0x4681ed(_0x4746be(0x1ff)+_0x3d06fa,0x7d0,()=>{const _0x4e2603=_0x4746be;try{return[..._0x1d887a['env'](_0x3d06fa)[_0x4e2603(0x227)][_0x4e2603(0x235)]()]['filter'](_0x1543c8=>!_0x1543c8[_0x4e2603(0x225)]('~'));}catch{return[];}});case _0x4746be(0xf5):if(!_0x34433a[_0x4746be(0xe0)])return[];return _0x4681ed('keys:'+_0x3d06fa+':'+_0x34433a['type'],0x5dc,()=>{const _0x3bde4e=_0x4746be;try{const _0x1f6913=_0x1d887a[_0x3bde4e(0x14b)](_0x3d06fa)[_0x3bde4e(0x227)][_0x3bde4e(0x250)](_0x34433a[_0x3bde4e(0xe0)]);if(!_0x1f6913?.[_0x3bde4e(0x147)])return[];const _0x214c66=[];for(const {key:_0x389a4e}of _0x1f6913[_0x3bde4e(0x147)][_0x3bde4e(0x2e9)]({'limit':0x32})){_0x214c66[_0x3bde4e(0x195)](String(_0x389a4e));if(_0x214c66[_0x3bde4e(0x115)]>=0x32)break;}return _0x214c66;}catch{return[];}});case _0x4746be(0x1e8):if(!_0x34433a[_0x4746be(0xe0)])return[];return _0x4681ed(_0x4746be(0x221)+_0x3d06fa+':'+_0x34433a[_0x4746be(0xe0)],0x7d0,()=>{const _0xcce5b6=_0x4746be;try{const _0x3a23bb=_0x1d887a[_0xcce5b6(0x14b)](_0x3d06fa)[_0xcce5b6(0x227)]['get'](_0x34433a[_0xcce5b6(0xe0)]);return _0x3a23bb?[..._0x3a23bb[_0xcce5b6(0x24b)]?.[_0xcce5b6(0x235)]()??[]]:[];}catch{return[];}});case _0x4746be(0x20f):if(!_0x34433a[_0x4746be(0xe0)])return[];return _0x4681ed('fts:'+_0x3d06fa+':'+_0x34433a[_0x4746be(0xe0)],0x7d0,()=>{const _0x529ab6=_0x4746be;try{return _0x1d887a[_0x529ab6(0x1e7)]?.['list']?.(_0x34433a[_0x529ab6(0xe0)],_0x1d887a[_0x529ab6(0x14b)](_0x3d06fa))?.[_0x529ab6(0x17e)](_0x253ab7=>_0x253ab7[_0x529ab6(0x362)])??[];}catch{return[];}});default:return[];}}function _0x1acf47(_0x2b6472,_0x8e55c5,_0x1d7450,_0x290b0d){const _0x414fd9=_0x15349e,_0x49e6b4=_0x2b6472[_0x414fd9(0x25d)]('/'),_0x5c3bc7=_0x2b6472[_0x414fd9(0xad)]('/'),_0x48cc82=_0x49e6b4?_0x5c3bc7[_0x414fd9(0x281)](0x0,-0x1):_0x5c3bc7[_0x414fd9(0x281)](0x0,-0x1),_0x12b31b=_0x49e6b4?'':_0x5c3bc7[_0x5c3bc7[_0x414fd9(0x115)]-0x1];let _0x55a5ef=_0x8e55c5;const _0x9071a4={};for(const _0x37ca71 of _0x48cc82){if(!_0x37ca71)continue;if(_0x55a5ef[_0x414fd9(0x15f)][_0x414fd9(0x243)](_0x37ca71))_0x55a5ef=_0x55a5ef[_0x414fd9(0x15f)][_0x414fd9(0x250)](_0x37ca71);else{if(_0x55a5ef[_0x414fd9(0x8a)])_0x9071a4[_0x55a5ef['dynamic'][_0x414fd9(0x262)]]=_0x37ca71,_0x55a5ef=_0x55a5ef['dynamic'][_0x414fd9(0x34c)];else return[];}}const _0x2498ab=_0x48cc82[_0x414fd9(0x1a3)](Boolean),_0x5dc940=_0x2498ab['length']?_0x2498ab[_0x414fd9(0x252)]('/')+'/':'',_0x110835=[];for(const [_0x413cb1]of _0x55a5ef[_0x414fd9(0x15f)]){if(_0x413cb1[_0x414fd9(0x225)](_0x12b31b))_0x110835['push'](_0x5dc940+_0x413cb1);}if(_0x55a5ef['dynamic'])for(const _0x43675d of _0x1b31bc(_0x55a5ef[_0x414fd9(0x8a)][_0x414fd9(0x262)],_0x9071a4,_0x1d7450,_0x290b0d)){if(String(_0x43675d)[_0x414fd9(0x225)](_0x12b31b))_0x110835[_0x414fd9(0x195)](_0x5dc940+_0x43675d);}return _0x110835['slice'](0x0,0x64);}const _0x1a4c96=[_0x15349e(0x254),_0x15349e(0x1c3),_0x15349e(0x14b),_0x15349e(0x159),'types',_0x15349e(0x336),_0x15349e(0xc4),_0x15349e(0x2c4),_0x15349e(0x365),_0x15349e(0x11e)];function _0x5e8710(_0x15518e,_0x4c12ef,_0x5ca40b){return function _0x5e611e(_0x549e78){const _0x4f609d=_0x30ec;try{const _0x1de259=_0x549e78[_0x4f609d(0x188)](/\s[{[]/),_0x439108=_0x1de259>=0x0?_0x549e78[_0x4f609d(0x281)](0x0,_0x1de259):_0x549e78,_0x4a0869=_0x439108[_0x4f609d(0x28e)]();if(!_0x4a0869){const _0x47923c=[..._0x1a4c96,...[..._0x15518e[_0x4f609d(0x15f)]['keys']()]][_0x4f609d(0x281)](0x0,0x64);return[_0x47923c,''];}const _0xa5e569=_0x4a0869[_0x4f609d(0xad)](/\s+/),_0x2f5291=_0xa5e569[0x0],_0x390d84=_0x2f5291['toUpperCase']();if(_0xa5e569[_0x4f609d(0x115)]===0x1){const _0x70e1b4=_0x2f5291[_0x4f609d(0x1f4)](),_0x4ea95e=_0x1a4c96[_0x4f609d(0x1a3)](_0x2750e5=>_0x2750e5[_0x4f609d(0x225)](_0x70e1b4)),_0x3e36ee=_0x1acf47(_0x2f5291,_0x15518e,_0x4c12ef,_0x5ca40b),_0x450648=[...new Set([..._0x4ea95e,..._0x3e36ee])][_0x4f609d(0x281)](0x0,0x64);return[_0x450648,_0x2f5291];}if(_0x5dc0d4[_0x4f609d(0x243)](_0x390d84)&&_0xa5e569[_0x4f609d(0x115)]===0x2){const _0xe0fe1b=_0xa5e569[0x1],_0x307b1d=_0x1acf47(_0xe0fe1b,_0x15518e,_0x4c12ef,_0x5ca40b);return[_0x307b1d['map'](_0x52cda1=>_0x2f5291+'\x20'+_0x52cda1),_0x2f5291+'\x20'+_0xe0fe1b];}if(!_0x5dc0d4[_0x4f609d(0x243)](_0x390d84)&&_0xa5e569[_0x4f609d(0x115)]>0x1){const _0x4be43e=_0x1acf47(_0x2f5291,_0x15518e,_0x4c12ef,_0x5ca40b),_0x360439='\x20'+_0xa5e569[_0x4f609d(0x281)](0x1)[_0x4f609d(0x252)]('\x20');return[_0x4be43e['map'](_0x490867=>_0x490867+_0x360439),_0x2f5291+_0x360439];}return[[],_0x549e78];}catch{return[[],_0x549e78];}};}async function _0x179bb8(_0x42681a,_0x3c24a1){const _0x22f8e0=_0x15349e,_0x1927aa={'enabled':!![],'level':_0x3c24a1[_0x22f8e0(0x34f)]??_0x22f8e0(0x179)},_0x43d3f1={'env':_0x22f8e0(0x33e)},_0x57c94a={'current':null},_0x7e78ea=_0x4ce02e(_0x42681a['http'][_0x22f8e0(0x352)]()),_0x25fb9c=_0x5e8710(_0x7e78ea,_0x42681a,_0x43d3f1);_0x42681a[_0x22f8e0(0x35c)][_0x22f8e0(0x209)](_0x4ce685=>{const _0x2512aa=_0x22f8e0;if(!_0x1927aa[_0x2512aa(0x178)])return;_0x144494(_0x4ce685,_0x1927aa['level']),_0x57c94a[_0x2512aa(0xc9)]?.[_0x2512aa(0x6d)](!![]);}),_0x174cb9(_0x42681a,_0x3c24a1);const _0x235bb6=_0x56a6d3[_0x22f8e0(0xb5)]({'input':process['stdin'],'output':process[_0x22f8e0(0x2ce)],'terminal':!![],'completer':_0x25fb9c,'prompt':_0x179f9c(_0x43d3f1),'historySize':_0x3d1a96});try{const _0x3068d4=_0x73c339['readFileSync'](_0x206645,'utf8')[_0x22f8e0(0xad)]('\x0a')[_0x22f8e0(0x1a3)](Boolean);_0x235bb6[_0x22f8e0(0x1f3)]=_0x3068d4[_0x22f8e0(0x2dc)]()[_0x22f8e0(0x281)](0x0,_0x3d1a96);}catch{}return _0x57c94a[_0x22f8e0(0xc9)]=_0x235bb6,_0x235bb6['on'](_0x22f8e0(0x12b),async _0x38d9b4=>{const _0x25bb52=_0x22f8e0;_0x235bb6[_0x25bb52(0x1d5)]();try{await _0x5eed84(_0x38d9b4,_0x42681a,_0x3c24a1,_0x1927aa,_0x43d3f1,_0x235bb6);}catch(_0x3eaf1d){console[_0x25bb52(0x299)](_0x278e29(_0x2afbc5[_0x25bb52(0x81)],_0x25bb52(0xb8)+_0x3eaf1d[_0x25bb52(0x9d)]));}finally{_0x235bb6[_0x25bb52(0x2fa)](),_0x235bb6[_0x25bb52(0x6d)]();}}),_0x235bb6['on'](_0x22f8e0(0x1f6),()=>{const _0x52233c=_0x22f8e0;try{const _0x34a401=[..._0x235bb6[_0x52233c(0x1f3)]]['reverse']()[_0x52233c(0x1a3)](Boolean)['slice'](0x0,_0x3d1a96);_0x73c339[_0x52233c(0x2da)](_0x206645,_0x34a401[_0x52233c(0x252)]('\x0a')+'\x0a');}catch{}_0x3a18fc(_0x42681a,0x0);}),process['on'](_0x22f8e0(0x17c),()=>{const _0x1985e6=_0x22f8e0;if(_0x235bb6[_0x1985e6(0x12b)]==='')_0x3a18fc(_0x42681a,0x0);else process[_0x1985e6(0x2ce)][_0x1985e6(0x107)]('\x0a'),_0x235bb6[_0x1985e6(0x113)](0x0),_0x235bb6[_0x1985e6(0x6d)]();}),process['on'](_0x22f8e0(0x359),()=>_0x3a18fc(_0x42681a,0x0)),_0x235bb6[_0x22f8e0(0x6d)](),_0x235bb6;}return okdbShell={'start':_0x179bb8,'colorLog':_0x144494,'lenientParse':_0x115573,'_splitLine':_0x120877,'_formatRouteHelpLines':_0x2fdaa8,'_routeSummary':_0x61a047,'_routeTags':_0x3bfe92},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x2cbeba=_0x19ca31;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x2cbeba(0xf4)]();}catch{}const _0x542d5c=require$$1$1,_0x541df1=require$$1;function _0x9d60e3(_0x49950b){const _0x2b85cf=_0x2cbeba,_0x2daeb3=_0x49950b['slice'](0x2),_0xefd0fb={};let _0x32ccc9=0x0;while(_0x32ccc9<_0x2daeb3[_0x2b85cf(0x115)]){const _0x4370cc=_0x2daeb3[_0x32ccc9];if(_0x4370cc===_0x2b85cf(0x175)||_0x4370cc==='-p')_0xefd0fb[_0x2b85cf(0x1fe)]=Number(_0x2daeb3[++_0x32ccc9]);else{if(_0x4370cc==='--path'||_0x4370cc==='-d')_0xefd0fb[_0x2b85cf(0x1e3)]=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc==='--key'||_0x4370cc==='-k')_0xefd0fb[_0x2b85cf(0xf5)]=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc===_0x2b85cf(0x141)||_0x4370cc==='-c')_0xefd0fb['config']=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc===_0x2b85cf(0x27a))_0xefd0fb[_0x2b85cf(0x34f)]=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc===_0x2b85cf(0x8b))_0xefd0fb[_0x2b85cf(0x2de)]=!![];else{if(_0x4370cc===_0x2b85cf(0x1f9))_0xefd0fb[_0x2b85cf(0x251)]=!![];else{if(_0x4370cc===_0x2b85cf(0xf0)||_0x4370cc==='-e')_0xefd0fb[_0x2b85cf(0x14b)]=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc===_0x2b85cf(0x26f))_0xefd0fb['types']=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc===_0x2b85cf(0x368))_0xefd0fb['changes']=!![];else{if(_0x4370cc===_0x2b85cf(0x2c1))_0xefd0fb[_0x2b85cf(0x344)]=!![];else{if(_0x4370cc===_0x2b85cf(0x2be))_0xefd0fb[_0x2b85cf(0x21d)]=!![];else{if(_0x4370cc==='--open'){const _0x11b194=[];while(_0x32ccc9+0x1<_0x2daeb3['length']&&!_0x2daeb3[_0x32ccc9+0x1][_0x2b85cf(0x225)]('--')){_0x11b194[_0x2b85cf(0x195)](_0x2daeb3[++_0x32ccc9]);}_0xefd0fb['open']=_0x11b194[_0x2b85cf(0x115)]>0x0?_0x11b194:!![];}else{if(_0x4370cc===_0x2b85cf(0x2b0))_0xefd0fb['logRequests']=!![];else{if(_0x4370cc===_0x2b85cf(0x1f2))_0xefd0fb[_0x2b85cf(0x362)]=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc===_0x2b85cf(0x14d))_0xefd0fb['password']=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc==='--label')_0xefd0fb[_0x2b85cf(0x291)]=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc===_0x2b85cf(0x305))_0xefd0fb[_0x2b85cf(0xa6)]=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc===_0x2b85cf(0x145))_0xefd0fb[_0x2b85cf(0x194)]=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc===_0x2b85cf(0x6a))_0xefd0fb[_0x2b85cf(0xd6)]=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc==='--token')_0xefd0fb[_0x2b85cf(0x1bf)]=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc===_0x2b85cf(0x14c)||_0x4370cc==='-u')_0xefd0fb[_0x2b85cf(0x7b)]=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc===_0x2b85cf(0x274))_0xefd0fb[_0x2b85cf(0x91)]=_0x2daeb3[++_0x32ccc9];else{if(_0x4370cc===_0x2b85cf(0x1c8)||_0x4370cc==='-v'){const _0x17c4d9=require$$2;console['log'](_0x17c4d9[_0x2b85cf(0x2d2)]),process[_0x2b85cf(0x365)](0x0);}else(_0x4370cc===_0x2b85cf(0x191)||_0x4370cc==='-h')&&(_0x61a60d(),process[_0x2b85cf(0x365)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x32ccc9++;}return _0xefd0fb;}function _0x61a60d(){const _0xe99eda=_0x2cbeba;console[_0xe99eda(0x35c)](_0xe99eda(0xe7));}const _0x3375a2=new Set([_0x2cbeba(0x22a),'info',_0x2cbeba(0x167),_0x2cbeba(0x299)]);function _0x4a5658(_0x4983c7){const _0x375caa=_0x2cbeba,_0x18b9d9=_0x4983c7[_0x375caa(0x324)]?_0x542d5c[_0x375caa(0x10a)](_0x4983c7[_0x375caa(0x324)]):_0x542d5c[_0x375caa(0x10a)](_0x375caa(0x31f));let _0x5853f8={};if(_0x541df1[_0x375caa(0x340)](_0x18b9d9))try{const _0x57f5bd=_0x541df1[_0x375caa(0x170)](_0x18b9d9,'utf8')[_0x375caa(0x244)](/^\uFEFF/,'');_0x5853f8=JSON[_0x375caa(0xc8)](_0x57f5bd),console[_0x375caa(0x35c)](_0x375caa(0x25c)+_0x18b9d9);}catch(_0x1a9cf7){console['error']('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x18b9d9+':\x20'+_0x1a9cf7[_0x375caa(0x9d)]),process[_0x375caa(0x365)](0x1);}const _0x499b57={'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},_0x33d595={'port':_0x4983c7['port']??_0x5853f8[_0x375caa(0x1fe)]??_0x499b57['port']??0x2124,'dbPath':_0x4983c7[_0x375caa(0x1e3)]??_0x5853f8[_0x375caa(0x1e3)]??_0x499b57['path']??'./okdb-data','key':_0x4983c7[_0x375caa(0xf5)]??_0x5853f8[_0x375caa(0xf5)]??_0x499b57[_0x375caa(0xf5)]??undefined,'logLevel':_0x4983c7['logLevel']??_0x5853f8['logLevel']??_0x499b57[_0x375caa(0x34f)]??_0x375caa(0x179),'noRepl':_0x4983c7[_0x375caa(0x2de)]??_0x5853f8['noRepl']??_0x499b57['noRepl']??![],'noAdmin':_0x4983c7[_0x375caa(0x251)]??_0x5853f8[_0x375caa(0x251)]??_0x499b57[_0x375caa(0x251)]??![],'admin':_0x5853f8[_0x375caa(0x287)]??{},'api':_0x5853f8[_0x375caa(0x30d)]??undefined,'auth':_0x5853f8[_0x375caa(0x30e)]??undefined,'mcp':_0x5853f8[_0x375caa(0x2d6)]??undefined,'timeMachine':_0x5853f8[_0x375caa(0x116)]!==![]?_0x5853f8['timeMachine']??{}:![]};return _0x4983c7[_0x375caa(0x2c4)]!==undefined&&(_0x33d595[_0x375caa(0x30e)]=_0x33d595[_0x375caa(0x30e)]||{},_0x33d595['auth'][_0x375caa(0x2c4)]=_0x4983c7[_0x375caa(0x2c4)]),_0x4983c7['logRequests']&&(_0x33d595[_0x375caa(0x22a)]=_0x33d595[_0x375caa(0x22a)]||{},_0x33d595['debug'][_0x375caa(0x2dd)]=!![]),(!Number[_0x375caa(0x1de)](_0x33d595['port'])||_0x33d595[_0x375caa(0x1fe)]<0x1||_0x33d595[_0x375caa(0x1fe)]>0xffff)&&(console[_0x375caa(0x299)](_0x375caa(0x2a5)+_0x33d595[_0x375caa(0x1fe)]+_0x375caa(0x2cf)),process[_0x375caa(0x365)](0x1)),!_0x3375a2[_0x375caa(0x243)](_0x33d595['logLevel'])&&(console[_0x375caa(0x299)]('[okdb]\x20invalid\x20log\x20level:\x20\x22'+_0x33d595['logLevel']+_0x375caa(0x109)),process[_0x375caa(0x365)](0x1)),_0x33d595;}function _0x181347(_0x4383d9){const _0x243b3a=_0x2cbeba;return!!(_0x4383d9&&typeof _0x4383d9===_0x243b3a(0xb9)&&!Array[_0x243b3a(0x119)](_0x4383d9)&&Object[_0x243b3a(0x235)](_0x4383d9)[_0x243b3a(0x115)]>0x0);}const _0x29d1af=!process[_0x2cbeba(0x2ce)][_0x2cbeba(0x142)]||!!process.env.NO_COLOR;function _0x46cc35(_0xb4cf0c,_0x275279){return _0x29d1af?_0x275279:'\x1b['+_0xb4cf0c+'m'+_0x275279+'\x1b[0m';}function _0x177a91(_0x407563){const _0x31a768=_0x2cbeba;if(!_0x407563||_0x407563[_0x31a768(0x115)]===0x0)return;const _0x525f3b='─'['repeat'](0x38);process[_0x31a768(0x24c)][_0x31a768(0x107)]('\x0a'),process['stderr']['write'](_0x46cc35('33','\x20\x20⚠\x20\x20'+_0x407563[_0x31a768(0x115)]+_0x31a768(0xe5)+(_0x407563['length']>0x1?'S':'')+'\x0a')),process[_0x31a768(0x24c)]['write']('\x20\x20'+_0x525f3b+'\x0a');for(const _0xb3ee0f of _0x407563){const _0x11fa63=_0xb3ee0f[_0x31a768(0xa0)]===_0x31a768(0x299)?_0x46cc35('31',_0x31a768(0x2c2)):_0x46cc35('33',_0x31a768(0x367));process['stderr'][_0x31a768(0x107)](_0x11fa63+'\x20\x20'+_0x46cc35('1',_0xb3ee0f[_0x31a768(0x192)])+'\x0a'),process[_0x31a768(0x24c)][_0x31a768(0x107)](_0x31a768(0x1f0)+_0xb3ee0f[_0x31a768(0x9d)]+'\x0a');if(_0xb3ee0f[_0x31a768(0xe1)])process[_0x31a768(0x24c)][_0x31a768(0x107)](_0x31a768(0x1f0)+_0x46cc35('2',_0x31a768(0x87)+_0xb3ee0f[_0x31a768(0xe1)])+'\x0a');process[_0x31a768(0x24c)][_0x31a768(0x107)]('\x0a');}process['stderr']['write']('\x20\x20'+_0x525f3b+'\x0a\x0a');}function _0x13aadb(_0x175161,_0x1ed362){const _0x878764=_0x2cbeba,_0x216dda=_0x175161[_0x878764(0x8f)][_0x878764(0xde)](_0x1ed362);return new Promise((_0x3eab00,_0x5cb4cb)=>{const _0xffc1b8=_0x878764;_0x216dda[_0xffc1b8(0x17b)](_0xffc1b8(0x16f),_0x3eab00),_0x216dda['once'](_0xffc1b8(0x299),_0x5cb4cb);});}async function _0x332ee5(_0x33ce0b){const _0x3bdf7d=_0x2cbeba,_0x29201a=require$$3;console[_0x3bdf7d(0x35c)](_0x3bdf7d(0x185));let _0x55b286=!![];const _0x207e57=(_0x5c1d02,_0x3be7b8)=>{const _0x243571=_0x3bdf7d;console[_0x243571(0x35c)]('\x20\x20'+(_0x5c1d02?'✓':'✗')+'\x20'+_0x3be7b8);if(!_0x5c1d02)_0x55b286=![];},_0x38ff6a=Number(process[_0x3bdf7d(0x2d2)][_0x3bdf7d(0x244)]('v','')[_0x3bdf7d(0xad)]('.')[0x0]);_0x207e57(_0x38ff6a>=0x12,_0x3bdf7d(0x369)+process[_0x3bdf7d(0x2d2)]+(_0x38ff6a<0x12?_0x3bdf7d(0x199):''));const _0x2c2763=_0x542d5c[_0x3bdf7d(0x10a)](_0x33ce0b[_0x3bdf7d(0x2ea)]);try{_0x541df1['mkdirSync'](_0x2c2763,{'recursive':!![]});const _0x19e601=_0x542d5c[_0x3bdf7d(0x252)](_0x2c2763,_0x3bdf7d(0x314));_0x541df1[_0x3bdf7d(0x2da)](_0x19e601,''),_0x541df1['unlinkSync'](_0x19e601),_0x207e57(!![],_0x3bdf7d(0x2ee)+_0x2c2763);}catch(_0x179723){_0x207e57(![],'database\x20path\x20not\x20writable:\x20'+_0x2c2763+_0x3bdf7d(0x125)+_0x179723[_0x3bdf7d(0x9d)]+')');}const _0x4384c8=await new Promise(_0x58f893=>{const _0x375a73=_0x3bdf7d,_0x5ed591=_0x29201a[_0x375a73(0x2fb)]();_0x5ed591[_0x375a73(0x17b)](_0x375a73(0x299),()=>_0x58f893(![])),_0x5ed591[_0x375a73(0x17b)](_0x375a73(0x16f),()=>{_0x5ed591['close'](),_0x58f893(!![]);}),_0x5ed591[_0x375a73(0xde)](_0x33ce0b[_0x375a73(0x1fe)],'127.0.0.1');});_0x207e57(_0x4384c8,'port\x20'+_0x33ce0b[_0x3bdf7d(0x1fe)]+'\x20'+(_0x4384c8?'available':_0x3bdf7d(0x1c0)));const _0x3577fe=_0x542d5c['resolve'](_0x3bdf7d(0x31f));if(_0x541df1[_0x3bdf7d(0x340)](_0x3577fe))try{JSON[_0x3bdf7d(0xc8)](_0x541df1[_0x3bdf7d(0x170)](_0x3577fe,_0x3bdf7d(0x127))['replace'](/^\uFEFF/,'')),_0x207e57(!![],'config\x20file\x20valid:\x20'+_0x3577fe);}catch(_0x13f13e){_0x207e57(![],_0x3bdf7d(0x20d)+_0x13f13e['message']);}else _0x207e57(!![],_0x3bdf7d(0x2d4));console[_0x3bdf7d(0x35c)](''),_0x55b286?console[_0x3bdf7d(0x35c)](_0x3bdf7d(0x2b9)):(console['log'](_0x3bdf7d(0x2c6)),process['exit'](0x1));}async function _0x204dce(){const _0x101109=_0x2cbeba,_0x1bc38c=_0x542d5c[_0x101109(0x10a)]('.kdbconfig');!_0x541df1['existsSync'](_0x1bc38c)?(_0x541df1[_0x101109(0x2da)](_0x1bc38c,JSON[_0x101109(0x18c)]({'port':0x2124,'path':_0x101109(0x24e),'logLevel':_0x101109(0x179),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x101109(0x35c)](_0x101109(0x1f7))):console[_0x101109(0x35c)](_0x101109(0x1cc));const _0x5f235=_0x542d5c[_0x101109(0x10a)]('./okdb-data');!_0x541df1[_0x101109(0x340)](_0x5f235)?(_0x541df1[_0x101109(0x31d)](_0x5f235,{'recursive':!![]}),console[_0x101109(0x35c)](_0x101109(0x163))):console[_0x101109(0x35c)](_0x101109(0xf3)),console[_0x101109(0x35c)](_0x101109(0xcb));}async function _0x2e0dc6(_0x3c76b2){const _0x4bc797=_0x2cbeba,_0x241617=_0x542d5c['resolve'](_0x3c76b2[_0x4bc797(0x2ea)]);if(!_0x541df1[_0x4bc797(0x340)](_0x241617)){console[_0x4bc797(0x35c)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x241617+_0x4bc797(0x34d));return;}const _0x28a39e=require$$0$2,_0x14faf8=_0x28a39e[_0x4bc797(0xb5)]({'input':process[_0x4bc797(0x285)],'output':process[_0x4bc797(0x2ce)]}),_0x16f4d4=await new Promise(_0x3bf690=>_0x14faf8[_0x4bc797(0x356)]('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x241617+'?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0x3bf690));_0x14faf8['close'](),console['log']('');if(_0x16f4d4[_0x4bc797(0xe3)]()['toLowerCase']()!=='yes'){console[_0x4bc797(0x35c)](_0x4bc797(0x95));return;}_0x541df1[_0x4bc797(0x122)](_0x241617,{'recursive':!![],'force':!![]}),console[_0x4bc797(0x35c)](_0x4bc797(0xe8)+_0x241617+_0x4bc797(0x207));}async function _0x29da7f(_0x1944aa,_0x1640ed){const _0x2b1330=_0x2cbeba,_0xa5d947=require$$5,_0x567f7b=_0x542d5c[_0x2b1330(0x10a)](_0x1640ed[_0x2b1330(0x2ea)]);console[_0x2b1330(0x35c)](_0x2b1330(0x2bf)+_0x567f7b+'…');const _0xdddafe=new _0xa5d947(_0x567f7b,_0x1640ed[_0x2b1330(0xf5)]?{'encryptionKey':_0x1640ed[_0x2b1330(0xf5)]}:{});await _0xdddafe[_0x2b1330(0x2c4)](),console[_0x2b1330(0x35c)]('[okdb]\x20backing\x20up\x20to\x20'+_0x1944aa+'…');const {envs:_0x517761}=await _0xdddafe[_0x2b1330(0x23b)][_0x2b1330(0x7d)](_0x1944aa);for(const _0xeea868 of _0x517761){const _0x181018=_0xeea868['sizeBefore']>0x0?_0x2b1330(0x125)+(_0xeea868[_0x2b1330(0x32e)]/0x400/0x400)['toFixed'](0x2)+'\x20MB\x20→\x20'+(_0xeea868[_0x2b1330(0x268)]/0x400/0x400)[_0x2b1330(0xd3)](0x2)+'\x20MB)':'';console[_0x2b1330(0x35c)](_0x2b1330(0x10c)+_0xeea868[_0x2b1330(0x362)]+_0x2b1330(0x22e)+_0xeea868[_0x2b1330(0x165)]+_0x181018);}await _0xdddafe[_0x2b1330(0x1f6)](),console[_0x2b1330(0x35c)](_0x2b1330(0x20c));}async function _0x5048e1(_0x3dc4c3,_0x101094,_0x441995){const _0xc3a1e2=_0x2cbeba,_0x16a632=require$$5,_0x211484=_0x542d5c[_0xc3a1e2(0x10a)](_0x101094[_0xc3a1e2(0x2ea)]),_0x37f09f=_0x441995['env']??_0xc3a1e2(0x33e),_0x3a1a2d=_0x441995[_0xc3a1e2(0x146)]?_0x441995[_0xc3a1e2(0x146)]['split'](',')['map'](_0x419235=>_0x419235['trim']()):null;console[_0xc3a1e2(0x35c)](_0xc3a1e2(0x2bf)+_0x211484+'…');const _0x4863a8=new _0x16a632(_0x211484,_0x101094[_0xc3a1e2(0xf5)]?{'encryptionKey':_0x101094[_0xc3a1e2(0xf5)]}:{});await _0x4863a8['open'](),console[_0xc3a1e2(0x35c)]('[okdb]\x20exporting\x20env\x20\x22'+_0x37f09f+_0xc3a1e2(0x15a)+_0x3dc4c3+'…');const _0x1b06c6=await _0x4863a8[_0xc3a1e2(0x23b)][_0xc3a1e2(0x152)](_0x3dc4c3,{'envName':_0x37f09f,'types':_0x3a1a2d,'includeChanges':!!_0x441995[_0xc3a1e2(0x202)]});console[_0xc3a1e2(0x35c)](_0xc3a1e2(0x2b7)+_0x1b06c6[_0xc3a1e2(0x146)]+_0xc3a1e2(0x19e)+_0x1b06c6[_0xc3a1e2(0x9a)]+_0xc3a1e2(0x13d)+_0x1b06c6[_0xc3a1e2(0x202)]);if(_0x441995['blobs']){const _0x8ea932=_0x542d5c['join'](_0x542d5c[_0xc3a1e2(0xec)](_0x3dc4c3),_0xc3a1e2(0x344));process[_0xc3a1e2(0x2ce)]['write'](_0xc3a1e2(0x28b));const {count:_0x3821c7,bytes:_0x274ee9}=await _0x4863a8[_0xc3a1e2(0x23b)][_0xc3a1e2(0x2a9)](_0x8ea932);console[_0xc3a1e2(0x35c)]('\x0d[okdb]\x20blobs:\x20'+_0x8ea932+_0xc3a1e2(0x125)+_0x3821c7+'\x20file'+(_0x3821c7!==0x1?'s':'')+',\x20'+(_0x274ee9/0x400/0x400)[_0xc3a1e2(0xd3)](0x2)+'\x20MB)');}await _0x4863a8[_0xc3a1e2(0x1f6)](),console[_0xc3a1e2(0x35c)](_0xc3a1e2(0x183));}async function _0x51aa0a(_0x324ad8,_0x43f878,_0x5e7850){const _0x47a990=_0x2cbeba,_0x335437=require$$5,_0xb6b892=_0x542d5c[_0x47a990(0x10a)](_0x43f878[_0x47a990(0x2ea)]),_0x376114=_0x5e7850[_0x47a990(0x14b)]??null,_0x51c069=_0x5e7850[_0x47a990(0x146)]?_0x5e7850['types']['split'](',')[_0x47a990(0x17e)](_0x368b8b=>_0x368b8b[_0x47a990(0xe3)]()):null,_0x3756ed=!!_0x5e7850['drop'];console[_0x47a990(0x35c)](_0x47a990(0x2bf)+_0xb6b892+'…');const _0x56f5db=new _0x335437(_0xb6b892,_0x43f878[_0x47a990(0xf5)]?{'encryptionKey':_0x43f878[_0x47a990(0xf5)]}:{});await _0x56f5db[_0x47a990(0x2c4)](),console[_0x47a990(0x35c)](_0x47a990(0xd4)+_0x324ad8+'…');const _0x5746e0=await _0x56f5db[_0x47a990(0x23b)][_0x47a990(0x14f)](_0x324ad8,{'envName':_0x376114,'types':_0x51c069,'dropExisting':_0x3756ed,'includeChanges':!!_0x5e7850[_0x47a990(0x202)],'onProgress':({type:_0x506dc3,count:_0x40be74})=>{const _0x5967da=_0x47a990;process[_0x5967da(0x2ce)][_0x5967da(0x107)](_0x5967da(0x269)+_0x506dc3+':\x20'+_0x40be74+_0x5967da(0x2f4));}});process[_0x47a990(0x2ce)][_0x47a990(0x107)]('\x0a'),console[_0x47a990(0x35c)](_0x47a990(0x2e8)+_0x5746e0[_0x47a990(0x146)]+'\x20\x20records='+_0x5746e0[_0x47a990(0x9a)]+_0x47a990(0x13d)+_0x5746e0[_0x47a990(0x202)]);if(_0x5e7850[_0x47a990(0x344)]){const _0xb14c69=_0x542d5c[_0x47a990(0x252)](_0x542d5c['dirname'](_0x324ad8),'blobs');if(_0x541df1['existsSync'](_0xb14c69)){const {imported:_0xebcda8,skipped:_0x5bb2b4}=await _0x56f5db[_0x47a990(0x23b)][_0x47a990(0x85)](_0xb14c69);console['log'](_0x47a990(0x35a)+_0xebcda8+'\x20\x20skipped='+_0x5bb2b4);}}await _0x56f5db[_0x47a990(0x1f6)](),console[_0x47a990(0x35c)]('[okdb]\x20import\x20complete');}async function _0x356f94(_0x4d3636,_0x204fea){const _0x2c5038=_0x2cbeba;_0x204fea[_0x2c5038(0x246)]&&!_0x204fea[_0x2c5038(0x362)]&&(console['error']('[okdb]\x20error:\x20--password\x20requires\x20--name'),process[_0x2c5038(0x365)](0x1));const _0x4a7476=_0x204fea[_0x2c5038(0xa6)]?_0x204fea[_0x2c5038(0xa6)]['split'](',')['map'](_0x2a6dff=>_0x2a6dff[_0x2c5038(0xe3)]())['filter'](Boolean):[];let _0x15a484={};if(_0x204fea['grants'])try{_0x15a484=JSON[_0x2c5038(0xc8)](_0x204fea[_0x2c5038(0x194)]);if(typeof _0x15a484!=='object'||Array[_0x2c5038(0x119)](_0x15a484)||_0x15a484===null)throw new Error();}catch{console['error'](_0x2c5038(0x83)),process[_0x2c5038(0x365)](0x1);}const _0x3a93ee=require$$5,{randomToken:_0x37c332,hashToken:_0x3a59e1,hashPassword:_0x3e459d}=requireOkdbAuthTokens(),_0x28ab4f=require$$0,_0x28ff44=_0x542d5c[_0x2c5038(0x10a)](_0x4d3636['dbPath']),_0x51561e=new _0x3a93ee(_0x28ff44,_0x4d3636[_0x2c5038(0xf5)]?{'encryptionKey':_0x4d3636[_0x2c5038(0xf5)]}:{});await _0x51561e[_0x2c5038(0x2c4)]();try{await _0x51561e[_0x2c5038(0x30e)][_0x2c5038(0x19c)]();if(_0x204fea['name']){const _0x534320=await _0x51561e[_0x2c5038(0x30e)][_0x2c5038(0x357)](_0x204fea[_0x2c5038(0x362)]);_0x534320&&(console[_0x2c5038(0x299)]('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x204fea[_0x2c5038(0x362)]+'\x22\x20already\x20exists'),process[_0x2c5038(0x365)](0x1));}const _0x51bee4=_0x37c332(0x20),_0x59623d=_0x3a59e1(_0x51bee4),_0x188f83=_0x204fea[_0x2c5038(0x246)]?await _0x3e459d(_0x204fea[_0x2c5038(0x246)]):null,_0x513889=_0x28ab4f[_0x2c5038(0x1c5)](),_0xc5140b={'tokenHash':_0x59623d,'name':_0x204fea[_0x2c5038(0x362)]||null,'passwordHash':_0x188f83,'label':_0x204fea[_0x2c5038(0x291)]||null,'permissions':_0x4a7476,'grants':_0x15a484,'createdAt':Date['now'](),'lastUsedAt':null},_0x49c65b=_0x204fea[_0x2c5038(0xd6)]?{'ttl':Number(_0x204fea[_0x2c5038(0xd6)])}:undefined;await _0x51561e[_0x2c5038(0x2c8)][_0x2c5038(0x2cd)](_0x2c5038(0x13f),_0x513889,_0xc5140b,_0x49c65b),console[_0x2c5038(0x35c)](_0x2c5038(0x33b)),console[_0x2c5038(0x35c)](_0x2c5038(0x343)+_0x513889),console[_0x2c5038(0x35c)](_0x2c5038(0x86)+(_0x204fea['name']||_0x2c5038(0x35d))),console[_0x2c5038(0x35c)]('\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20'+(_0x204fea[_0x2c5038(0x291)]||'(unset)')),console['log'](_0x2c5038(0x2e3)+(_0x4a7476[_0x2c5038(0x252)](',\x20')||_0x2c5038(0x16c))),console['log'](_0x2c5038(0x1bc)),console[_0x2c5038(0x35c)](_0x2c5038(0x1d0)+_0x51bee4+'\x0a');}finally{await _0x51561e[_0x2c5038(0x1f6)]();}}async function _0x2aadb8(_0xe7bb80){const _0x5b062a=_0x2cbeba,_0x1285c5=require$$5,_0x43158d=_0x542d5c[_0x5b062a(0x10a)](_0xe7bb80[_0x5b062a(0x2ea)]),_0x2a3dd2=new _0x1285c5(_0x43158d,_0xe7bb80['key']?{'encryptionKey':_0xe7bb80[_0x5b062a(0xf5)]}:{});await _0x2a3dd2[_0x5b062a(0x2c4)]();try{const _0x219282=_0x2a3dd2['_systemEnv'];if(!_0x219282||!_0x219282[_0x5b062a(0x11b)](_0x5b062a(0x13f))){console['log'](_0x5b062a(0x1ce));return;}const _0x22c5cf=[];for(const {key:_0x2da3dd,value:_0xe99f26}of _0x219282[_0x5b062a(0x2e9)](_0x5b062a(0x13f))){_0x22c5cf['push']({'id':_0x2da3dd,'name':_0xe99f26[_0x5b062a(0x362)]||_0x5b062a(0x35d),'label':_0xe99f26['label']||_0x5b062a(0x35d),'permissions':Array[_0x5b062a(0x119)](_0xe99f26[_0x5b062a(0xa6)])?_0xe99f26[_0x5b062a(0xa6)][_0x5b062a(0x252)](','):'','created':_0xe99f26[_0x5b062a(0x20a)]?new Date(_0xe99f26['createdAt'])[_0x5b062a(0xe9)]()[_0x5b062a(0x281)](0x0,0xa):''});}if(_0x22c5cf[_0x5b062a(0x115)]===0x0){console[_0x5b062a(0x35c)](_0x5b062a(0x1ce));return;}const _0x4d01c4=!process['stdout']['columns']||process['stdout'][_0x5b062a(0xa8)]>=0x64,_0x42393a=_0x4d01c4?0x24:0xa,_0x128378=['ID'[_0x5b062a(0x198)](_0x42393a),_0x5b062a(0x35f)[_0x5b062a(0x198)](0x10),_0x5b062a(0x30b)[_0x5b062a(0x198)](0x14),_0x5b062a(0x1b3)[_0x5b062a(0x198)](0x14),_0x5b062a(0x118)][_0x5b062a(0x252)]('\x20\x20');console[_0x5b062a(0x35c)]('\x0a'+_0x128378),console['log']('-'[_0x5b062a(0x22c)](_0x128378[_0x5b062a(0x115)]));for(const _0x267e20 of _0x22c5cf){const _0xa5f67f=_0x4d01c4?_0x267e20['id']:_0x267e20['id'][_0x5b062a(0x281)](0x0,0x8)+'…';console[_0x5b062a(0x35c)]([_0xa5f67f[_0x5b062a(0x198)](_0x42393a),_0x267e20['name'][_0x5b062a(0x281)](0x0,0x10)['padEnd'](0x10),_0x267e20[_0x5b062a(0x291)][_0x5b062a(0x281)](0x0,0x14)['padEnd'](0x14),_0x267e20[_0x5b062a(0xa6)][_0x5b062a(0x281)](0x0,0x14)['padEnd'](0x14),_0x267e20[_0x5b062a(0x218)]][_0x5b062a(0x252)]('\x20\x20'));}console[_0x5b062a(0x35c)]('');}finally{await _0x2a3dd2[_0x5b062a(0x1f6)]();}}async function _0x4c2f80(_0x48e161,_0x501123){const _0x4f2afc=_0x2cbeba;!_0x48e161&&(console[_0x4f2afc(0x299)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x4f2afc(0x365)](0x1));const _0x5dca53=require$$5,_0x18d2f0=_0x542d5c[_0x4f2afc(0x10a)](_0x501123['dbPath']),_0x38f168=new _0x5dca53(_0x18d2f0,_0x501123[_0x4f2afc(0xf5)]?{'encryptionKey':_0x501123[_0x4f2afc(0xf5)]}:{});await _0x38f168[_0x4f2afc(0x2c4)]();try{const _0x4ee52d=_0x38f168['_systemEnv'];(!_0x4ee52d||!_0x4ee52d['hasType']('~tokens'))&&(console['error'](_0x4f2afc(0x215)+_0x48e161+'\x22'),process['exit'](0x1));let _0x1e3a1f=null,_0x221f26=null;const _0x5801ad=_0x4ee52d[_0x4f2afc(0x250)]('~tokens',_0x48e161);if(_0x5801ad)_0x1e3a1f=_0x48e161,_0x221f26=_0x5801ad;else{const _0x41dc73=[];for(const {key:_0x563484,value:_0x1ee618}of _0x4ee52d[_0x4f2afc(0x2e9)](_0x4f2afc(0x13f))){if(_0x563484[_0x4f2afc(0x225)](_0x48e161))_0x41dc73[_0x4f2afc(0x195)]({'key':_0x563484,'value':_0x1ee618});}_0x41dc73[_0x4f2afc(0x115)]===0x0&&(console[_0x4f2afc(0x299)](_0x4f2afc(0x215)+_0x48e161+'\x22'),process['exit'](0x1));if(_0x41dc73['length']>0x1){console[_0x4f2afc(0x299)](_0x4f2afc(0x216)+_0x48e161+_0x4f2afc(0x1ec)+_0x41dc73[_0x4f2afc(0x115)]+_0x4f2afc(0x22b));for(const _0x231d72 of _0x41dc73){console[_0x4f2afc(0x299)]('\x20\x20'+_0x231d72[_0x4f2afc(0xf5)]+_0x4f2afc(0x339)+(_0x231d72[_0x4f2afc(0x132)][_0x4f2afc(0x362)]||_0x4f2afc(0x35d))+')');}process[_0x4f2afc(0x365)](0x1);}_0x1e3a1f=_0x41dc73[0x0]['key'],_0x221f26=_0x41dc73[0x0]['value'];}await _0x4ee52d[_0x4f2afc(0x33c)](_0x4f2afc(0x13f),_0x1e3a1f),console[_0x4f2afc(0x35c)](_0x4f2afc(0x140)+_0x1e3a1f+'\x20\x20(name:\x20'+(_0x221f26[_0x4f2afc(0x362)]||'(unset)')+_0x4f2afc(0x2e2)+(_0x221f26[_0x4f2afc(0x291)]||_0x4f2afc(0x35d))+')');}finally{await _0x38f168[_0x4f2afc(0x1f6)]();}}function _0x49dea1(_0x16db8c,_0x57185c){const _0x54c365=_0x2cbeba;if(!_0x16db8c[_0x54c365(0x1bd)])return _0x54c365(0x1f5);const _0x273e01=_0x16db8c[_0x54c365(0x112)];if(!_0x273e01)return'active';if(_0x57185c>_0x273e01)return'expired';return _0x54c365(0x361);}function _0x11477b(_0x246e14){const _0x5ddcb0=_0x2cbeba;if(!_0x246e14||typeof _0x246e14!==_0x5ddcb0(0xb9))return'';const _0x14d880=Object[_0x5ddcb0(0x223)](_0x246e14)[_0x5ddcb0(0x1a3)](([,_0x1a9559])=>_0x1a9559)['map'](([_0x3e985d])=>_0x3e985d);if(_0x14d880['length']===0x0)return'(none)';if(_0x14d880[_0x5ddcb0(0x115)]<=0x3)return _0x14d880[_0x5ddcb0(0x252)]('\x20');return _0x14d880[_0x5ddcb0(0x281)](0x0,0x3)[_0x5ddcb0(0x252)]('\x20')+('\x20+'+(_0x14d880['length']-0x3));}async function _0x2a167f(_0xbbb43c){const _0xe7b2e4=_0x2cbeba,_0x3ded76=require$$5,_0x4d46a1=requireOkdbLicenseCodec(),{_C:_0x209312}=requireOkdbLicense(),_0x502a0f=_0x542d5c['resolve'](_0xbbb43c[_0xe7b2e4(0x2ea)]),_0x552092=new _0x3ded76(_0x502a0f,_0xbbb43c[_0xe7b2e4(0xf5)]?{'encryptionKey':_0xbbb43c['key']}:{});await _0x552092[_0xe7b2e4(0x2c4)]();try{const _0x45ae37=_0x552092['_systemEnv'],_0x3505db=_0x45ae37?.['db']?.[_0xe7b2e4(0x250)]?.(_0xe7b2e4(0x36b))??0x0,_0x26e51a=[..._0x552092['_envs'][_0xe7b2e4(0x235)]()][_0xe7b2e4(0x1a3)](_0x225120=>!_0x225120[_0xe7b2e4(0x225)]('~'))[_0xe7b2e4(0x115)],_0x1d3e63=_0x552092[_0xe7b2e4(0x279)]?.[_0xe7b2e4(0x2d5)];if(_0x1d3e63){const _0x51fb7f=_0x1d3e63[_0xe7b2e4(0x70)]===!![],_0x4d3719=_0x51fb7f?_0xe7b2e4(0x1da):_0x552092['_license']['active']?.[_0xe7b2e4(0x270)]||_0xe7b2e4(0x264);console[_0xe7b2e4(0x35c)](''),console[_0xe7b2e4(0x35c)](_0xe7b2e4(0x21e)+_0x4d3719);const _0x1f8ca6=_0x1d3e63['limits']||{};if(_0x1f8ca6['maxWrites']){const _0x130319=Math[_0xe7b2e4(0x338)](_0x3505db/_0x1f8ca6['maxWrites']*0x64);console['log'](_0xe7b2e4(0xee)+_0x3505db[_0xe7b2e4(0x134)]()+_0xe7b2e4(0x77)+_0x1f8ca6[_0xe7b2e4(0x1c7)]['toLocaleString']()+_0xe7b2e4(0x125)+_0x130319+'%)');}else console[_0xe7b2e4(0x35c)](_0xe7b2e4(0xee)+_0x3505db[_0xe7b2e4(0x134)]());_0x1f8ca6[_0xe7b2e4(0x159)]?console[_0xe7b2e4(0x35c)](_0xe7b2e4(0x99)+_0x26e51a+_0xe7b2e4(0x77)+_0x1f8ca6['envs']):console[_0xe7b2e4(0x35c)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x26e51a),_0x209312?.[_0xe7b2e4(0x1c1)]&&console[_0xe7b2e4(0x35c)]('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x209312[_0xe7b2e4(0x1c1)]+_0xe7b2e4(0x1a1));}if(!_0x45ae37||!_0x45ae37[_0xe7b2e4(0x11b)](_0xe7b2e4(0x23f))){console[_0xe7b2e4(0x35c)](''),console['log'](_0xe7b2e4(0x2b4)),console[_0xe7b2e4(0x35c)]('');return;}const _0x3d2345=[],_0x34e600=Date[_0xe7b2e4(0x92)](),_0x1c6ebf=_0x552092['id'],_0xf10b40=_0xe7b2e4(0x348);for(const {key:_0x428ac5,value:_0x53cd06}of _0x45ae37[_0xe7b2e4(0x2e9)](_0xe7b2e4(0x23f))){const _0x31f626=_0x53cd06[_0xe7b2e4(0xcf)]?Buffer[_0xe7b2e4(0xa9)](_0x53cd06[_0xe7b2e4(0xcf)],_0xe7b2e4(0x1fc)):Buffer[_0xe7b2e4(0x33d)](0x8);let _0x3c3d50='';try{_0x3c3d50=_0x4d46a1['derivePin'](_0x1c6ebf,_0x31f626,_0xf10b40)[_0xe7b2e4(0x237)];}catch{}_0x3d2345[_0xe7b2e4(0x195)]({'id':_0x428ac5,'licensee':_0x53cd06['licensee']||'','expires':_0x53cd06['expiresAt']?new Date(_0x53cd06['expiresAt'])[_0xe7b2e4(0xe9)]()[_0xe7b2e4(0x281)](0x0,0xa):'','features':_0x11477b(_0x53cd06['features']),'pin':_0x3c3d50,'status':_0x49dea1(_0x53cd06,_0x34e600)});}if(_0x3d2345[_0xe7b2e4(0x115)]===0x0){console[_0xe7b2e4(0x35c)](''),console['log'](_0xe7b2e4(0x2b4)),console[_0xe7b2e4(0x35c)]('');return;}const _0x49b34b=['\x20\x20'+'ID'[_0xe7b2e4(0x198)](0xe),_0xe7b2e4(0x366)[_0xe7b2e4(0x198)](0xe),_0xe7b2e4(0x10b)[_0xe7b2e4(0x198)](0xc),_0xe7b2e4(0x317)[_0xe7b2e4(0x198)](0x1e),'PIN'[_0xe7b2e4(0x198)](0xa),_0xe7b2e4(0x2fd)][_0xe7b2e4(0x252)]('\x20');console[_0xe7b2e4(0x35c)]('\x0a'+_0x49b34b);for(const _0x31ea38 of _0x3d2345){const _0x249520=_0x31ea38['id'][_0xe7b2e4(0x281)](0x0,0x8)+'…';console[_0xe7b2e4(0x35c)](['\x20\x20'+_0x249520[_0xe7b2e4(0x198)](0xe),_0x31ea38['licensee'][_0xe7b2e4(0x281)](0x0,0xe)[_0xe7b2e4(0x198)](0xe),_0x31ea38['expires'][_0xe7b2e4(0x198)](0xc),_0x31ea38[_0xe7b2e4(0x1cf)][_0xe7b2e4(0x281)](0x0,0x1e)[_0xe7b2e4(0x198)](0x1e),_0x31ea38[_0xe7b2e4(0x237)][_0xe7b2e4(0x198)](0xa),_0x31ea38[_0xe7b2e4(0x25a)]][_0xe7b2e4(0x252)]('\x20'));}console[_0xe7b2e4(0x35c)]('');}finally{await _0x552092['close']();}}async function _0x1c2240(_0x2b5427,_0x218963){const _0x3d9a0f=_0x2cbeba,_0x2d9b58=require$$5,_0x52ad47=requireOkdbLicenseCodec();let _0x5a8592=_0x2b5427;(_0x52ad47[_0x3d9a0f(0xbe)](_0x2b5427)===_0x3d9a0f(0x1e3)||_0x541df1[_0x3d9a0f(0x340)](_0x2b5427)&&_0x541df1['statSync'](_0x2b5427)[_0x3d9a0f(0x284)]())&&(_0x5a8592=_0x541df1[_0x3d9a0f(0x170)](_0x2b5427,_0x3d9a0f(0x127))[_0x3d9a0f(0xe3)]());const _0xc1b34c=_0x542d5c[_0x3d9a0f(0x10a)](_0x218963[_0x3d9a0f(0x2ea)]),_0x3fe666=new _0x2d9b58(_0xc1b34c,_0x218963[_0x3d9a0f(0xf5)]?{'encryptionKey':_0x218963[_0x3d9a0f(0xf5)]}:{});await _0x3fe666[_0x3d9a0f(0x2c4)]();try{!_0x3fe666[_0x3d9a0f(0x279)]&&(console[_0x3d9a0f(0x299)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process['exit'](0x1));let _0x585438;try{_0x585438=await _0x3fe666['_license'][_0x3d9a0f(0xa7)](_0x5a8592);}catch(_0x377e2e){console[_0x3d9a0f(0x299)]('[okdb]\x20error:\x20'+_0x377e2e[_0x3d9a0f(0x9d)]),process[_0x3d9a0f(0x365)](0x1);}const _0x1a73fb=_0x3fe666[_0x3d9a0f(0x279)][_0x3d9a0f(0xb2)](),_0x18d586=_0x1a73fb['find'](_0x10fbf9=>_0x10fbf9[_0x3d9a0f(0xca)]===_0x585438['id'])?.[_0x3d9a0f(0x237)]||'',_0x20ad24=Object[_0x3d9a0f(0x223)](_0x585438[_0x3d9a0f(0x1cf)]||{})[_0x3d9a0f(0x1a3)](([,_0x5bbcdf])=>_0x5bbcdf)[_0x3d9a0f(0x17e)](([_0x3810f5])=>_0x3810f5),_0x1f9b65=_0x585438['limits']||{},_0x4f39a0=[_0x1f9b65['envs']?_0x3d9a0f(0x139)+_0x1f9b65[_0x3d9a0f(0x159)]:null,_0x1f9b65[_0x3d9a0f(0x1a7)]?_0x3d9a0f(0x2a4)+_0x1f9b65[_0x3d9a0f(0x1a7)]:null,_0x1f9b65[_0x3d9a0f(0x1b0)]?_0x3d9a0f(0x6c)+_0x1f9b65[_0x3d9a0f(0x1b0)]:null,_0x1f9b65[_0x3d9a0f(0x1c7)]?_0x3d9a0f(0x245)+_0x1f9b65['maxWrites'][_0x3d9a0f(0x134)]():null][_0x3d9a0f(0x1a3)](Boolean)['join']('\x20\x20'),_0x2e1738=_0x585438[_0x3d9a0f(0x1e1)]===_0x52ad47[_0x3d9a0f(0x2fc)];console['log']('\x0a\x20\x20✓\x20License\x20added'),console[_0x3d9a0f(0x35c)](_0x3d9a0f(0x2aa)+_0x585438['id']),console[_0x3d9a0f(0x35c)](_0x3d9a0f(0x211)+_0x585438['licensee']),console[_0x3d9a0f(0x35c)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x585438[_0x3d9a0f(0x112)])[_0x3d9a0f(0xe9)]()[_0x3d9a0f(0x281)](0x0,0xa)),console[_0x3d9a0f(0x35c)](_0x3d9a0f(0x26b)+(_0x20ad24[_0x3d9a0f(0x252)](',\x20')||_0x3d9a0f(0x16c)));if(_0x4f39a0)console[_0x3d9a0f(0x35c)](_0x3d9a0f(0x1b1)+_0x4f39a0);_0x2e1738?(console[_0x3d9a0f(0x35c)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x3d9a0f(0x35c)]('')):(console['log']('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x18d586),console[_0x3d9a0f(0x35c)]('\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation'),console['log'](''),console[_0x3d9a0f(0x35c)](_0x3d9a0f(0x166)),console[_0x3d9a0f(0x35c)](_0x3d9a0f(0x341)+_0x18d586+_0x3d9a0f(0x2a3)),console[_0x3d9a0f(0x35c)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x3d9a0f(0x35c)](_0x3d9a0f(0xc3)),console[_0x3d9a0f(0x35c)](''));}finally{await _0x3fe666[_0x3d9a0f(0x1f6)]();}}async function _0x4c775b(_0x507d93,_0x1dc90f){const _0x35403e=_0x2cbeba,_0x45a6f3=require$$5,_0x575eeb=_0x542d5c[_0x35403e(0x10a)](_0x1dc90f['dbPath']),_0x9ab63c=new _0x45a6f3(_0x575eeb,_0x1dc90f[_0x35403e(0xf5)]?{'encryptionKey':_0x1dc90f[_0x35403e(0xf5)]}:{});await _0x9ab63c[_0x35403e(0x2c4)]();try{!_0x9ab63c[_0x35403e(0x279)]&&(console[_0x35403e(0x299)](_0x35403e(0x2cc)),process['exit'](0x1));let _0x377ede;try{_0x377ede=await _0x9ab63c[_0x35403e(0x279)][_0x35403e(0x1fb)](_0x507d93[_0x35403e(0xe3)]());}catch(_0x6537cb){console[_0x35403e(0x299)](_0x35403e(0x26d)+_0x6537cb[_0x35403e(0x9d)]),console[_0x35403e(0x299)](''),console[_0x35403e(0x299)](_0x35403e(0x18e)),console[_0x35403e(0x299)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0x35403e(0x299)](_0x35403e(0x22d)),console['error']('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.'),console[_0x35403e(0x299)](''),process[_0x35403e(0x365)](0x1);}console['log'](_0x35403e(0x2eb)),console[_0x35403e(0x35c)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x377ede['id']),console[_0x35403e(0x35c)](_0x35403e(0x211)+_0x377ede[_0x35403e(0x270)]),console[_0x35403e(0x35c)](_0x35403e(0x296)+new Date(_0x377ede[_0x35403e(0x112)])['toISOString']()[_0x35403e(0x281)](0x0,0xa)),console[_0x35403e(0x35c)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x35403e(0x35c)]('');}finally{await _0x9ab63c[_0x35403e(0x1f6)]();}}async function _0x333d51(_0x34898d,_0x16c745){const _0x2f32c7=_0x2cbeba;!_0x34898d&&(console[_0x2f32c7(0x299)](_0x2f32c7(0x164)),process[_0x2f32c7(0x365)](0x1));const _0x2b35dc=require$$5,_0x54fea6=requireOkdbLicenseCodec(),_0x58701a=_0x542d5c['resolve'](_0x16c745[_0x2f32c7(0x2ea)]),_0x9ac61c=new _0x2b35dc(_0x58701a,_0x16c745[_0x2f32c7(0xf5)]?{'encryptionKey':_0x16c745[_0x2f32c7(0xf5)]}:{});await _0x9ac61c['open']();try{const _0x4d4ec2=_0x9ac61c[_0x2f32c7(0x2c8)];(!_0x4d4ec2||!_0x4d4ec2[_0x2f32c7(0x11b)](_0x2f32c7(0x23f)))&&(console['error'](_0x2f32c7(0x345)+_0x34898d+'\x22'),process['exit'](0x1));let _0x72b10c=null,_0x123fcc=null;const _0x12f390=_0x4d4ec2['get'](_0x2f32c7(0x23f),_0x34898d);if(_0x12f390)_0x72b10c=_0x34898d,_0x123fcc=_0x12f390;else{const _0x4de513=[];for(const {key:_0x547f48,value:_0x2fa947}of _0x4d4ec2['getRange'](_0x2f32c7(0x23f))){if(_0x547f48[_0x2f32c7(0x225)](_0x34898d))_0x4de513[_0x2f32c7(0x195)]({'key':_0x547f48,'value':_0x2fa947});}_0x4de513[_0x2f32c7(0x115)]===0x0&&(console[_0x2f32c7(0x299)](_0x2f32c7(0x345)+_0x34898d+'\x22'),process[_0x2f32c7(0x365)](0x1)),_0x4de513['length']>0x1&&(console[_0x2f32c7(0x299)](_0x2f32c7(0x216)+_0x34898d+_0x2f32c7(0x1ec)+_0x4de513[_0x2f32c7(0x115)]+_0x2f32c7(0x2ac)),process['exit'](0x1)),_0x72b10c=_0x4de513[0x0]['key'],_0x123fcc=_0x4de513[0x0][_0x2f32c7(0x132)];}const _0x499b63=Date[_0x2f32c7(0x92)](),_0x5006d1=_0x49dea1(_0x123fcc,_0x499b63),_0x5063a5=_0x9ac61c['id'],_0x878cc8=_0x2f32c7(0x348);let _0x3871f5='';try{const _0x69c180=Buffer[_0x2f32c7(0xa9)](_0x123fcc[_0x2f32c7(0xcf)],_0x2f32c7(0x1fc));_0x3871f5=_0x54fea6[_0x2f32c7(0x331)](_0x5063a5,_0x69c180,_0x878cc8)['pin'];}catch{}const _0x5123d5=_0x123fcc[_0x2f32c7(0x1cf)]?Object[_0x2f32c7(0x223)](_0x123fcc[_0x2f32c7(0x1cf)])[_0x2f32c7(0x1a3)](([,_0x4e65b4])=>_0x4e65b4)[_0x2f32c7(0x17e)](([_0x92b1d7])=>_0x92b1d7):[],_0x34faab=_0x123fcc[_0x2f32c7(0x321)]||{},_0xf94f91=_0x4d4ec2?.['db']?.[_0x2f32c7(0x250)]?.(_0x2f32c7(0x36b))??0x0,_0xc2d2f5=[..._0x9ac61c[_0x2f32c7(0x11f)][_0x2f32c7(0x235)]()][_0x2f32c7(0x1a3)](_0x2e9173=>!_0x2e9173[_0x2f32c7(0x225)]('~'))[_0x2f32c7(0x115)];console[_0x2f32c7(0x35c)]('\x0a\x20\x20License\x20details:'),console[_0x2f32c7(0x35c)](_0x2f32c7(0x2aa)+_0x72b10c),console[_0x2f32c7(0x35c)](_0x2f32c7(0x211)+(_0x123fcc[_0x2f32c7(0x270)]||'')),console[_0x2f32c7(0x35c)](_0x2f32c7(0x296)+(_0x123fcc['expiresAt']?new Date(_0x123fcc['expiresAt'])['toISOString']()[_0x2f32c7(0x281)](0x0,0xa):'')),console[_0x2f32c7(0x35c)](_0x2f32c7(0x26b)+(_0x5123d5[_0x2f32c7(0x252)](',\x20')||_0x2f32c7(0x16c))),console[_0x2f32c7(0x35c)](_0x2f32c7(0x309)+_0x3871f5),console[_0x2f32c7(0x35c)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x5006d1),console[_0x2f32c7(0x35c)](_0x2f32c7(0x1dc)+new Date(_0x123fcc[_0x2f32c7(0x30a)])[_0x2f32c7(0xe9)]());if(_0x5006d1===_0x2f32c7(0x361)){console[_0x2f32c7(0x35c)](''),console[_0x2f32c7(0x35c)](_0x2f32c7(0x14a));if(_0x34faab[_0x2f32c7(0x1c7)]){const _0x3974b2=Math[_0x2f32c7(0x338)](_0xf94f91/_0x34faab[_0x2f32c7(0x1c7)]*0x64);console[_0x2f32c7(0x35c)](_0x2f32c7(0x157)+_0xf94f91[_0x2f32c7(0x134)]()+_0x2f32c7(0x77)+_0x34faab[_0x2f32c7(0x1c7)][_0x2f32c7(0x134)]()+'\x20\x20('+_0x3974b2+'%)');}else console['log']('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0xf94f91[_0x2f32c7(0x134)]()+_0x2f32c7(0x13b));_0x34faab[_0x2f32c7(0x159)]?console[_0x2f32c7(0x35c)](_0x2f32c7(0x18b)+_0xc2d2f5+_0x2f32c7(0x77)+_0x34faab[_0x2f32c7(0x159)]):console[_0x2f32c7(0x35c)](_0x2f32c7(0x18b)+_0xc2d2f5+_0x2f32c7(0x13b));}console[_0x2f32c7(0x35c)]('');}finally{await _0x9ac61c[_0x2f32c7(0x1f6)]();}}async function _0x51fac8(_0x20b06d,_0x24a235){const _0x16ff5c=_0x2cbeba;!_0x20b06d&&(console[_0x16ff5c(0x299)](_0x16ff5c(0x1f8)),process[_0x16ff5c(0x365)](0x1));const _0x5868f2=require$$5,_0x5d18e9=_0x542d5c[_0x16ff5c(0x10a)](_0x24a235['dbPath']),_0x182e08=new _0x5868f2(_0x5d18e9,_0x24a235[_0x16ff5c(0xf5)]?{'encryptionKey':_0x24a235[_0x16ff5c(0xf5)]}:{});await _0x182e08['open']();try{const _0xce5c7d=_0x182e08['_systemEnv'];(!_0xce5c7d||!_0xce5c7d['hasType']('~licenses'))&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x20b06d+'\x22'),process['exit'](0x1));let _0x38980d=null,_0x308d0d=null;const _0x515d80=_0xce5c7d[_0x16ff5c(0x250)]('~licenses',_0x20b06d);if(_0x515d80)_0x38980d=_0x20b06d,_0x308d0d=_0x515d80;else{const _0x18f8d9=[];for(const {key:_0xcb0625,value:_0x30f5f0}of _0xce5c7d[_0x16ff5c(0x2e9)](_0x16ff5c(0x23f))){if(_0xcb0625['startsWith'](_0x20b06d))_0x18f8d9['push']({'key':_0xcb0625,'value':_0x30f5f0});}_0x18f8d9[_0x16ff5c(0x115)]===0x0&&(console[_0x16ff5c(0x299)](_0x16ff5c(0x345)+_0x20b06d+'\x22'),process[_0x16ff5c(0x365)](0x1)),_0x18f8d9[_0x16ff5c(0x115)]>0x1&&(console['error'](_0x16ff5c(0x216)+_0x20b06d+_0x16ff5c(0x1ec)+_0x18f8d9[_0x16ff5c(0x115)]+_0x16ff5c(0x2ac)),process[_0x16ff5c(0x365)](0x1)),_0x38980d=_0x18f8d9[0x0][_0x16ff5c(0xf5)],_0x308d0d=_0x18f8d9[0x0][_0x16ff5c(0x132)];}await _0xce5c7d[_0x16ff5c(0x33c)](_0x16ff5c(0x23f),_0x38980d),console[_0x16ff5c(0x35c)](_0x16ff5c(0x18a)+_0x38980d+'\x20\x20(licensee:\x20'+(_0x308d0d['licensee']||_0x16ff5c(0x35d))+')');}finally{await _0x182e08[_0x16ff5c(0x1f6)]();}}async function _0x585b1b(_0x3c7cd4,_0x9910f7,_0x361062){const _0x2de4c6=_0x2cbeba;!_0x3c7cd4&&(console[_0x2de4c6(0x299)]('[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>'),process['exit'](0x1));!_0x361062[_0x2de4c6(0x1bf)]&&!(_0x361062[_0x2de4c6(0x7b)]&&_0x361062[_0x2de4c6(0x246)])&&(console[_0x2de4c6(0x299)]('[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>'),process[_0x2de4c6(0x365)](0x1));const _0x57842e=_0x361062[_0x2de4c6(0x91)]||_0x9910f7[_0x2de4c6(0x2f1)]?.[_0x2de4c6(0x9c)];!_0x57842e&&(console[_0x2de4c6(0x299)](_0x2de4c6(0x1c9)+'\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a'+_0x2de4c6(0x2bb)),process['exit'](0x1));const _0x316531=require$$5,_0x25bd9a=new _0x316531(_0x9910f7['dbPath'],{'sync':{'address':_0x57842e,'auto_reconcile':![]}});await _0x25bd9a['open']();try{const _0x4ab148=_0x25bd9a['_systemEnv'];if(_0x4ab148&&_0x4ab148[_0x2de4c6(0x11b)](_0x2de4c6(0x13f))){let _0x1b6f85=![];for(const _0x45953e of _0x4ab148[_0x2de4c6(0x2e9)]('~tokens')){_0x1b6f85=!![];break;}_0x1b6f85&&console['log'](_0x2de4c6(0x364)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console[_0x2de4c6(0x35c)](_0x2de4c6(0x31a)+_0x3c7cd4+'…'),await _0x25bd9a['sync'][_0x2de4c6(0x252)](_0x3c7cd4[_0x2de4c6(0x244)](/\/+$/,''),{'token':_0x361062[_0x2de4c6(0x1bf)],'username':_0x361062['username'],'password':_0x361062[_0x2de4c6(0x246)]}),console[_0x2de4c6(0x35c)](_0x2de4c6(0x1aa)),console[_0x2de4c6(0x35c)](_0x2de4c6(0x6b));}finally{await _0x25bd9a[_0x2de4c6(0x1f6)]();}}async function _0x5153c4(){const _0x435b7b=_0x2cbeba,_0x3dfcf4=Date['now'](),_0x433f27=_0x9d60e3(process[_0x435b7b(0x1ea)]),_0x498cb4=_0x4a5658(_0x433f27),_0x1715e3=_0x542d5c[_0x435b7b(0x10a)](_0x498cb4['dbPath']);!_0x498cb4[_0x435b7b(0x2de)]&&!process[_0x435b7b(0x285)][_0x435b7b(0x142)]&&(_0x498cb4[_0x435b7b(0x2de)]=!![]);const _0x55117a=require$$5,{start:_0x14e276,colorLog:_0x16efaf}=requireOkdbShell(),_0x3fb8a9={..._0x498cb4[_0x435b7b(0xf5)]?{'encryptionKey':_0x498cb4[_0x435b7b(0xf5)]}:{},..._0x498cb4['noAdmin']?{'admin':![]}:_0x181347(_0x498cb4[_0x435b7b(0x287)])?{'admin':_0x498cb4[_0x435b7b(0x287)]}:{},..._0x181347(_0x498cb4['api'])?{'api':_0x498cb4[_0x435b7b(0x30d)]}:{},..._0x181347(_0x498cb4[_0x435b7b(0x30e)])?{'auth':_0x498cb4[_0x435b7b(0x30e)]}:{},..._0x181347(_0x498cb4[_0x435b7b(0x2d6)])?{'mcp':_0x498cb4[_0x435b7b(0x2d6)]}:{},..._0x498cb4[_0x435b7b(0x116)]!==![]?{'timeMachine':_0x498cb4[_0x435b7b(0x116)]}:{}},_0x58b5b0=new _0x55117a(_0x1715e3,_0x3fb8a9);_0x58b5b0[_0x435b7b(0x35c)][_0x435b7b(0x290)]?.();const _0x5b88b2=_0x58b5b0[_0x435b7b(0x35c)][_0x435b7b(0x209)](_0x7b62f9=>_0x16efaf(_0x7b62f9,_0x498cb4[_0x435b7b(0x34f)]));if(_0x498cb4[_0x435b7b(0x2de)])process[_0x435b7b(0x2ce)][_0x435b7b(0x107)](_0x435b7b(0x162));await _0x58b5b0[_0x435b7b(0x2c4)]();if(_0x498cb4['noRepl'])process[_0x435b7b(0x2ce)][_0x435b7b(0x107)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x13aadb(_0x58b5b0,_0x498cb4[_0x435b7b(0x1fe)]);}catch(_0x2770ee){_0x2770ee[_0x435b7b(0x2fe)]==='EADDRINUSE'&&(console[_0x435b7b(0x299)](_0x435b7b(0xae)+_0x498cb4['port']+_0x435b7b(0x322)),process[_0x435b7b(0x365)](0x1));throw _0x2770ee;}if(_0x498cb4['noRepl'])process['stdout'][_0x435b7b(0x107)]('\x20\x20✓\x20http\x20listening\x20on\x20:'+_0x498cb4[_0x435b7b(0x1fe)]+'\x0a');if(!_0x498cb4[_0x435b7b(0x2de)])_0x58b5b0[_0x435b7b(0x35c)]['detachConsole']?.(),_0x5b88b2?.(),_0x177a91(_0x58b5b0[_0x435b7b(0x30e)]?.[_0x435b7b(0x1ef)]?.()??[]),await _0x14e276(_0x58b5b0,_0x498cb4);else{const _0x5a1781=_0x542d5c[_0x435b7b(0x252)](_0x1715e3,_0x435b7b(0x330));try{_0x541df1[_0x435b7b(0x2da)](_0x5a1781,String(process[_0x435b7b(0x30c)]));}catch{}const _0x10dc62=Date[_0x435b7b(0x92)]()-_0x3dfcf4;console[_0x435b7b(0x35c)](''),console[_0x435b7b(0x35c)](_0x435b7b(0x130)),console[_0x435b7b(0x35c)]('\x20\x20\x20\x20port:\x20\x20'+_0x498cb4[_0x435b7b(0x1fe)]),console[_0x435b7b(0x35c)](_0x435b7b(0x326)+_0x1715e3),console[_0x435b7b(0x35c)](_0x435b7b(0x1c2)+_0x58b5b0['id']);{const _0xab846c=_0x58b5b0[_0x435b7b(0x2c8)]?.['db']?.[_0x435b7b(0x250)]?.('__writeCounter')??0x0,_0x2fb19e=[..._0x58b5b0['_envs'][_0x435b7b(0x235)]()][_0x435b7b(0x1a3)](_0x18e016=>!_0x18e016[_0x435b7b(0x225)]('~'))['length'];if(_0x58b5b0[_0x435b7b(0x279)]?.[_0x435b7b(0x361)]?.[_0x435b7b(0x1e1)]===0x1){const _0x318cd1=Math[_0x435b7b(0x1d4)]((_0x58b5b0['_license'][_0x435b7b(0x361)]['expiresAt']-Date['now']())/0x5265c00);console['log'](_0x435b7b(0x2f8)+_0x58b5b0['_license'][_0x435b7b(0x361)][_0x435b7b(0x270)]+'\x20(expires\x20in\x20'+_0x318cd1+_0x435b7b(0xea));}else{if(_0x58b5b0[_0x435b7b(0x279)]?.[_0x435b7b(0x361)]){const _0x20dfc7=_0x58b5b0['_license'][_0x435b7b(0x361)];console['log']('\x20\x20\x20\x20license:\x20'+_0x20dfc7[_0x435b7b(0x270)]+_0x435b7b(0x19f)+new Date(_0x20dfc7['expiresAt'])[_0x435b7b(0xe9)]()['slice'](0x0,0xa)+')');const _0x2cf02d=_0x20dfc7['limits']||{};if(_0x2cf02d[_0x435b7b(0x1c7)]){const _0x1c84fc=Math['round'](_0xab846c/_0x2cf02d[_0x435b7b(0x1c7)]*0x64);console[_0x435b7b(0x35c)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0xab846c[_0x435b7b(0x134)]()+_0x435b7b(0x77)+_0x2cf02d[_0x435b7b(0x1c7)]['toLocaleString']()+_0x435b7b(0x21a)+_0x1c84fc+'%),\x20'+_0x2fb19e+(_0x2cf02d['envs']?'/'+_0x2cf02d['envs']:'')+_0x435b7b(0x313)+(_0x2fb19e===0x1?'':'s'));}}else{if(_0x58b5b0[_0x435b7b(0x279)]){const _0x48b29f=_0x58b5b0[_0x435b7b(0x279)][_0x435b7b(0xb2)](),_0x26de42=_0x48b29f[_0x435b7b(0x115)]?_0x48b29f[_0x435b7b(0x17e)](_0x5d36a8=>_0x5d36a8[_0x435b7b(0x237)])[_0x435b7b(0x252)](',\x20'):_0x435b7b(0x2f7),_0x36e539=_0x58b5b0[_0x435b7b(0x279)][_0x435b7b(0x2d5)],_0x4d8004=_0x36e539['limits'][_0x435b7b(0x1c7)]?Math[_0x435b7b(0x338)](_0xab846c/_0x36e539['limits'][_0x435b7b(0x1c7)]*0x64):0x0;console['log']('\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine'),console[_0x435b7b(0x35c)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0xab846c[_0x435b7b(0x134)]()+_0x435b7b(0x77)+_0x36e539['limits'][_0x435b7b(0x1c7)][_0x435b7b(0x134)]()+_0x435b7b(0x21a)+_0x4d8004+'%),\x20'+_0x2fb19e+'\x20/\x20'+_0x36e539[_0x435b7b(0x321)][_0x435b7b(0x159)]+'\x20envs'),console['log'](_0x435b7b(0x2e4)+_0x26de42);}}}}console['log'](_0x435b7b(0x131)+_0x498cb4['port']+_0x435b7b(0x28a));!_0x498cb4[_0x435b7b(0x251)]&&console[_0x435b7b(0x35c)](_0x435b7b(0x349)+_0x498cb4['port']+_0x435b7b(0x10f));console['log'](''),console[_0x435b7b(0x35c)](_0x435b7b(0x1b9)+_0x10dc62+'ms'),_0x177a91(_0x58b5b0[_0x435b7b(0x30e)]?.[_0x435b7b(0x1ef)]?.()??[]);async function _0x40cafd(){const _0xb74e2f=_0x435b7b;process['stdout'][_0xb74e2f(0x107)](_0xb74e2f(0xf9));try{_0x541df1[_0xb74e2f(0x30f)](_0x5a1781);}catch{}await _0x58b5b0[_0xb74e2f(0x1f6)](),process['exit'](0x0);}process['on'](_0x435b7b(0x17c),_0x40cafd),process['on'](_0x435b7b(0x359),_0x40cafd);}}const _0x1cdf8a=new Set([_0x2cbeba(0x2d2),'doctor',_0x2cbeba(0x96),_0x2cbeba(0x7d),_0x2cbeba(0x7a),_0x2cbeba(0x300),_0x2cbeba(0xe4),_0x2cbeba(0x1bf),_0x2cbeba(0x252),_0x2cbeba(0x1bb)]),_0x28779f=process[_0x2cbeba(0x1ea)][0x2];if(_0x28779f===_0x2cbeba(0x2d2))console[_0x2cbeba(0x35c)](require$$2[_0x2cbeba(0x2d2)]),process[_0x2cbeba(0x365)](0x0);else{if(_0x28779f&&_0x1cdf8a[_0x2cbeba(0x243)](_0x28779f)){const _0xb779e1=process['argv'][_0x2cbeba(0x281)](0x3),_0xd3a96=_0x9d60e3(['node',_0x2cbeba(0x230),..._0xb779e1]),_0x2c107c=_0x4a5658(_0xd3a96),_0x19b30a=new Set([_0x2cbeba(0x14e),'-d',_0x2cbeba(0x2b5),'-k',_0x2cbeba(0x141),'-c','--port','-p',_0x2cbeba(0x27a),'--env','-e',_0x2cbeba(0x26f),_0x2cbeba(0x1f2),_0x2cbeba(0x14d),_0x2cbeba(0x2f5),_0x2cbeba(0x305),_0x2cbeba(0x145),'--ttl',_0x2cbeba(0x79),'--username','-u','--address']);let _0x51a55a=null;for(let _0x27d3ea=0x0;_0x27d3ea<_0xb779e1[_0x2cbeba(0x115)];_0x27d3ea++){if(_0x19b30a[_0x2cbeba(0x243)](_0xb779e1[_0x27d3ea])){_0x27d3ea++;continue;}if(!_0xb779e1[_0x27d3ea][_0x2cbeba(0x225)]('-')){_0x51a55a=_0xb779e1[_0x27d3ea];break;}}(async()=>{const _0xdbb128=_0x2cbeba;if(_0x28779f===_0xdbb128(0x1bf)){const _0x255882=process[_0xdbb128(0x1ea)][0x3],_0x1bcf90=process['argv'][_0xdbb128(0x281)](0x4),_0xa33d17=_0x9d60e3([_0xdbb128(0x34c),_0xdbb128(0x230),..._0x1bcf90]),_0x54423d=_0x4a5658(_0xa33d17),_0xa89219=new Set([_0xdbb128(0x14e),'-d','--key','-k',_0xdbb128(0x141),'-c','--port','-p','--name',_0xdbb128(0x14d),_0xdbb128(0x2f5),_0xdbb128(0x305),_0xdbb128(0x145),'--ttl','--log-level',_0xdbb128(0xf0),'-e','--types']),_0x57072b=[];for(let _0x4ff744=0x0;_0x4ff744<_0x1bcf90[_0xdbb128(0x115)];_0x4ff744++){if(_0xa89219[_0xdbb128(0x243)](_0x1bcf90[_0x4ff744])){_0x4ff744++;continue;}if(_0x1bcf90[_0x4ff744][_0xdbb128(0x225)]('-'))continue;_0x57072b['push'](_0x1bcf90[_0x4ff744]);}switch(_0x255882){case _0xdbb128(0x248):await _0x356f94(_0x54423d,_0xa33d17);break;case _0xdbb128(0x82):await _0x2aadb8(_0x54423d);break;case _0xdbb128(0x2d9):await _0x4c2f80(_0x57072b[0x0],_0x54423d);break;default:console[_0xdbb128(0x299)](_0xdbb128(0x98)+_0x255882+_0xdbb128(0x2d1)),process[_0xdbb128(0x365)](0x1);}return;}if(_0x28779f==='license'){const _0x151ed=requireOkdbLicenseCodec(),_0x2c819e=process['argv'][_0xdbb128(0x281)](0x3),_0x2dc678=_0x9d60e3([_0xdbb128(0x34c),_0xdbb128(0x230),..._0x2c819e]),_0x3c3f93=_0x4a5658(_0x2dc678),_0x214361=new Set([_0xdbb128(0x14e),'-d','--key','-k',_0xdbb128(0x141),'-c',_0xdbb128(0x175),'-p','--log-level']),_0xfaa99a=[];for(let _0x18a7fe=0x0;_0x18a7fe<_0x2c819e[_0xdbb128(0x115)];_0x18a7fe++){if(_0x214361['has'](_0x2c819e[_0x18a7fe])){_0x18a7fe++;continue;}if(_0x2c819e[_0x18a7fe]['startsWith']('-'))continue;_0xfaa99a[_0xdbb128(0x195)](_0x2c819e[_0x18a7fe]);}const _0x5d807b=_0xfaa99a[0x0]??null;if(_0x5d807b===_0xdbb128(0x33c))await _0x51fac8(_0xfaa99a[0x1],_0x3c3f93);else{if(!_0x5d807b)await _0x2a167f(_0x3c3f93);else{let _0x233bf3=_0x151ed[_0xdbb128(0xbe)](_0x5d807b);if(_0x233bf3==='unknown'&&_0x541df1[_0xdbb128(0x340)](_0x5d807b))_0x233bf3=_0xdbb128(0x1e3);if(_0x233bf3===_0xdbb128(0x1e3))try{const _0x4d1fbf=_0x541df1[_0xdbb128(0x170)](_0x5d807b,'utf8')[_0xdbb128(0xe3)](),_0xeea8e2=_0x151ed['detectInputType'](_0x4d1fbf);if(_0xeea8e2===_0xdbb128(0x1bd)){await _0x4c775b(_0x4d1fbf,_0x3c3f93);return;}await _0x1c2240(_0x5d807b,_0x3c3f93);return;}catch(_0xbff5a3){console[_0xdbb128(0x299)](_0xdbb128(0xac)+_0x5d807b+':\x20'+_0xbff5a3['message']),process[_0xdbb128(0x365)](0x1);}switch(_0x233bf3){case _0xdbb128(0x7f):await _0x1c2240(_0x5d807b,_0x3c3f93);break;case _0xdbb128(0x1bd):await _0x4c775b(_0x5d807b,_0x3c3f93);break;case _0xdbb128(0x17a):await _0x333d51(_0x5d807b,_0x3c3f93);break;default:console['error']('[okdb]\x20error:\x20unrecognized\x20input:\x20\x22'+_0x5d807b+'\x22'),console[_0xdbb128(0x299)](''),console['error']('\x20\x20Expected\x20one\x20of:'),console[_0xdbb128(0x299)](_0xdbb128(0x138)),console['error'](_0xdbb128(0x7e)),console[_0xdbb128(0x299)](_0xdbb128(0x27d)),console[_0xdbb128(0x299)]('\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file'),console[_0xdbb128(0x299)](''),console[_0xdbb128(0x299)](_0xdbb128(0x292)),process[_0xdbb128(0x365)](0x1);}}}return;}switch(_0x28779f){case'doctor':await _0x332ee5(_0x2c107c);break;case _0xdbb128(0x96):await _0x204dce();break;case'reset':await _0x2e0dc6(_0x2c107c);break;case _0xdbb128(0x7d):await _0x29da7f(_0x51a55a??_0x542d5c[_0xdbb128(0x10a)](_0xdbb128(0x31c)),_0x2c107c);break;case _0xdbb128(0x7a):await _0x5048e1(_0x51a55a??_0x542d5c['resolve'](_0xdbb128(0x280)),_0x2c107c,_0xd3a96);break;case _0xdbb128(0x300):await _0x51aa0a(_0x51a55a??_0x542d5c[_0xdbb128(0x10a)]('./okdb-export.ndjson'),_0x2c107c,_0xd3a96);break;case _0xdbb128(0x252):await _0x585b1b(_0x51a55a,_0x2c107c,_0xd3a96);break;}})()[_0x2cbeba(0x2a7)](()=>process[_0x2cbeba(0x365)](0x0))['catch'](_0x1055d8=>{const _0x207cdc=_0x2cbeba;console['error']('\x0a[okdb]\x20error:\x20'+(_0x1055d8[_0x207cdc(0x9d)]||_0x1055d8)+'\x0a'),process[_0x207cdc(0x365)](0x1);});}else _0x5153c4()['catch'](_0x5f22c9=>{const _0x46fb5d=_0x2cbeba;console[_0x46fb5d(0x299)](_0x46fb5d(0x1ac)),console['error'](_0x5f22c9['stack']||_0x5f22c9),process[_0x46fb5d(0x365)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x19ca31(0x306)]=okdb;
|
|
2
|
+
'use strict';const _0x22e4e2=_0x5045;(function(_0x371e9b,_0x250dbc){const _0x129425=_0x5045,_0xff398d=_0x371e9b();while(!![]){try{const _0x435741=parseInt(_0x129425(0x452))/0x1+parseInt(_0x129425(0x318))/0x2+-parseInt(_0x129425(0x4a9))/0x3+parseInt(_0x129425(0x35d))/0x4*(parseInt(_0x129425(0x421))/0x5)+-parseInt(_0x129425(0x1ae))/0x6*(parseInt(_0x129425(0x33e))/0x7)+-parseInt(_0x129425(0x21e))/0x8+-parseInt(_0x129425(0x38c))/0x9;if(_0x435741===_0x250dbc)break;else _0xff398d['push'](_0xff398d['shift']());}catch(_0x4609bf){_0xff398d['push'](_0xff398d['shift']());}}}(_0x5d65,0x90c21));var require$$1$1=require(_0x22e4e2(0x41b)),require$$1=require('fs'),require$$3=require(_0x22e4e2(0x311)),require$$0$2=require(_0x22e4e2(0x200)),require$$5=require(_0x22e4e2(0x3c9)),require$$0=require('crypto'),require$$0$1=require(_0x22e4e2(0x467)),require$$2$1=require('os'),require$$4=require(_0x22e4e2(0x2c0));function getDefaultExportFromCjs(_0x2f71b6){const _0x12611e=_0x22e4e2;return _0x2f71b6&&_0x2f71b6[_0x12611e(0x446)]&&Object[_0x12611e(0x1eb)][_0x12611e(0x48c)][_0x12611e(0x2fa)](_0x2f71b6,'default')?_0x2f71b6[_0x12611e(0x4bb)]:_0x2f71b6;}var okdb$1={},version='1.8.0',require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x3c9c13=require$$0;function _0x56d19c(_0x51baaf,_0x49bea0){const _0x31bef6=_0x5045;return _0x3c9c13['createHmac']('sha256',_0x49bea0)[_0x31bef6(0x3d4)](_0x51baaf)[_0x31bef6(0x22e)]('base64url');}function _0x56abe7(_0x2ac2fb,_0x4f3e3c){const _0x59cad2=_0x5045;if(typeof _0x2ac2fb!=='string'||typeof _0x4f3e3c!==_0x59cad2(0x1c2))return![];if(Buffer[_0x59cad2(0x20b)](_0x2ac2fb)!==Buffer[_0x59cad2(0x20b)](_0x4f3e3c))return![];return _0x3c9c13[_0x59cad2(0x301)](Buffer[_0x59cad2(0x36e)](_0x2ac2fb),Buffer[_0x59cad2(0x36e)](_0x4f3e3c));}function _0x4e46fa(_0x2661f5){const _0x43da37=_0x5045;if(!_0x2661f5?.['startsWith'](_0x43da37(0x2c9)))return null;return _0x2661f5[_0x43da37(0x345)](0x7);}function _0x17d0e0(_0x1f76c6=0x20){const _0x2bbe65=_0x5045;return _0x3c9c13['randomBytes'](_0x1f76c6)[_0x2bbe65(0x2dd)](_0x2bbe65(0x442));}function _0x1148d4(_0x38d137){const _0xfaa4d1=_0x5045;return _0x3c9c13[_0xfaa4d1(0x266)](_0xfaa4d1(0x251))['update'](_0x38d137)[_0xfaa4d1(0x22e)]('hex');}function _0x45be0c(_0x514454,_0x130caa,_0x35ebce=0x36ee80){const _0x173a50=_0x5045;if(!_0x130caa)throw new Error(_0x173a50(0x333));const _0xcc98cc=Date[_0x173a50(0x379)](),_0x4a45a1=Buffer[_0x173a50(0x36e)](JSON[_0x173a50(0x1d0)]({'iat':_0xcc98cc,'exp':_0xcc98cc+_0x35ebce,'sub':_0x514454?.['id']??_0x514454?.[_0x173a50(0x20e)]??null,'username':_0x514454?.[_0x173a50(0x262)]??_0x514454?.[_0x173a50(0x348)]??null,'roles':Array[_0x173a50(0x495)](_0x514454?.[_0x173a50(0x3b9)])?_0x514454['roles']:[]}))[_0x173a50(0x2dd)](_0x173a50(0x442)),_0x1e067a=_0x56d19c(_0x4a45a1,_0x130caa);return _0x4a45a1+'.'+_0x1e067a;}function _0x11b8d7(_0x275d10,_0x4cc6de){const _0x185885=_0x5045;if(!_0x4cc6de||typeof _0x275d10!==_0x185885(0x1c2))return null;const [_0x165247,_0x29f90e]=_0x275d10[_0x185885(0x4a4)]('.');if(!_0x165247||!_0x29f90e)return null;const _0xad633f=_0x56d19c(_0x165247,_0x4cc6de);if(!_0x56abe7(_0x29f90e,_0xad633f))return null;try{const _0x3b7b4e=JSON[_0x185885(0x3ec)](Buffer[_0x185885(0x36e)](_0x165247,_0x185885(0x442))[_0x185885(0x2dd)]()),_0x5af1b1=0x7530;if(Date[_0x185885(0x379)]()>Number(_0x3b7b4e?.[_0x185885(0x3a5)]??0x0)+_0x5af1b1)return null;return _0x3b7b4e;}catch{return null;}}async function _0x170e8a(_0x596dbd){return new Promise((_0x14c6a0,_0x8b83fd)=>{const _0x5c2217=_0x5045,_0x452cba=_0x3c9c13[_0x5c2217(0x24c)](0x10);_0x3c9c13['scrypt'](_0x596dbd,_0x452cba,0x40,(_0x3c19b0,_0x459d57)=>{const _0x5e5b93=_0x5c2217;if(_0x3c19b0)_0x8b83fd(_0x3c19b0);_0x14c6a0(_0x452cba[_0x5e5b93(0x2dd)](_0x5e5b93(0x326))+':'+_0x459d57[_0x5e5b93(0x2dd)](_0x5e5b93(0x326)));});});}async function _0x2c13c4(_0x36d966,_0x284852){const _0x11c838=_0x5045,[_0x30aaf9,_0xc3d5c2]=_0x284852[_0x11c838(0x4a4)](':');if(!_0x30aaf9||!_0xc3d5c2)return![];const _0x11e720=Buffer[_0x11c838(0x36e)](_0x30aaf9,'hex');return new Promise((_0x48a4c4,_0x2d3bfc)=>{_0x3c9c13['scrypt'](_0x36d966,_0x11e720,0x40,(_0x2abff4,_0x233274)=>{const _0x3c723b=_0x5045;if(_0x2abff4)_0x2d3bfc(_0x2abff4);_0x48a4c4(_0x3c9c13[_0x3c723b(0x301)](_0x233274,Buffer[_0x3c723b(0x36e)](_0xc3d5c2,'hex')));});});}return okdbAuthTokens={'hmac':_0x56d19c,'timingSafeEqual':_0x56abe7,'parseBearer':_0x4e46fa,'randomToken':_0x17d0e0,'hashToken':_0x1148d4,'issueToken':_0x45be0c,'authenticateToken':_0x11b8d7,'hashPassword':_0x170e8a,'verifyPassword':_0x2c13c4},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x293c9e=_0x22e4e2;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x435a64=require$$0$1,_0x3be707=_0x293c9e(0x31b),_0x4bfd51=new Uint8Array(0x100)['fill'](0xff);for(let _0x4a3471=0x0;_0x4a3471<_0x3be707[_0x293c9e(0x2e0)];_0x4a3471++){_0x4bfd51[_0x3be707['charCodeAt'](_0x4a3471)]=_0x4a3471,_0x4bfd51[_0x3be707[_0x293c9e(0x37d)](_0x4a3471)+0x20]=_0x4a3471;}_0x4bfd51['O'[_0x293c9e(0x37d)](0x0)]=0x0,_0x4bfd51['o'[_0x293c9e(0x37d)](0x0)]=0x0,_0x4bfd51['I'[_0x293c9e(0x37d)](0x0)]=0x1,_0x4bfd51['i'[_0x293c9e(0x37d)](0x0)]=0x1,_0x4bfd51['L'[_0x293c9e(0x37d)](0x0)]=0x1,_0x4bfd51['l'[_0x293c9e(0x37d)](0x0)]=0x1;function _0x200cec(_0x2ce36f){const _0x1a2976=_0x293c9e;let _0x4f7817=0x0,_0x256e31=0x0,_0x4078fb='';for(let _0x478269=0x0;_0x478269<_0x2ce36f[_0x1a2976(0x2e0)];_0x478269++){_0x256e31=_0x256e31<<0x8|_0x2ce36f[_0x478269],_0x4f7817+=0x8;while(_0x4f7817>=0x5){_0x4f7817-=0x5,_0x4078fb+=_0x3be707[_0x256e31>>>_0x4f7817&0x1f];}}return _0x4f7817>0x0&&(_0x4078fb+=_0x3be707[_0x256e31<<0x5-_0x4f7817&0x1f]),_0x4078fb;}function _0x479a2b(_0x4e90f5){const _0x1a63fa=_0x293c9e;_0x4e90f5=_0x4e90f5[_0x1a63fa(0x1d5)](/-/g,'')[_0x1a63fa(0x271)]();let _0x5dab3f=0x0,_0x2fe281=0x0;const _0x480836=[];for(let _0x4c5f8b=0x0;_0x4c5f8b<_0x4e90f5[_0x1a63fa(0x2e0)];_0x4c5f8b++){const _0x50c977=_0x4bfd51[_0x4e90f5[_0x1a63fa(0x37d)](_0x4c5f8b)];if(_0x50c977===0xff)continue;_0x2fe281=_0x2fe281<<0x5|_0x50c977,_0x5dab3f+=0x5,_0x5dab3f>=0x8&&(_0x5dab3f-=0x8,_0x480836[_0x1a63fa(0x225)](_0x2fe281>>>_0x5dab3f&0xff));}return Buffer['from'](_0x480836);}const _0x34017e=['sync',_0x293c9e(0x4b7),'engines','fts',_0x293c9e(0x331),_0x293c9e(0x395),'mcp','files'],_0x1a6dd6=0x0,_0x2d39e7=0x1,_0x1ee3cb=0x2,_0x2ce26b=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x110fb0({issuedAt:_0x1c1562,expiresAt:_0x5c1b64,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x1a6dd6}){const _0x3159e9=_0x293c9e,_0x31dd59=Buffer['from'](licensee,_0x3159e9(0x227))[_0x3159e9(0x345)](0x0,0x40),_0xe8fdce=0x1+0x1+0x4+0x4+0x1+_0x31dd59[_0x3159e9(0x2e0)]+0x2+0x10,_0x244127=Buffer[_0x3159e9(0x1e3)](_0xe8fdce);let _0x520932=0x0;_0x244127[_0x3159e9(0x2d4)](0x1,_0x520932++),_0x244127[_0x3159e9(0x2d4)](licenseType,_0x520932++),_0x244127[_0x3159e9(0x3cc)](Math[_0x3159e9(0x37a)](_0x1c1562/0x3e8),_0x520932),_0x520932+=0x4,_0x244127['writeUInt32BE'](Math[_0x3159e9(0x37a)](_0x5c1b64/0x3e8),_0x520932),_0x520932+=0x4,_0x244127[_0x3159e9(0x2d4)](_0x31dd59[_0x3159e9(0x2e0)],_0x520932++),_0x31dd59[_0x3159e9(0x2a4)](_0x244127,_0x520932),_0x520932+=_0x31dd59[_0x3159e9(0x2e0)];let _0x1c98ee=0x0;for(let _0x156c50=0x0;_0x156c50<_0x34017e[_0x3159e9(0x2e0)];_0x156c50++){if(features[_0x34017e[_0x156c50]])_0x1c98ee|=0x1<<_0x156c50;}_0x244127[_0x3159e9(0x286)](_0x1c98ee,_0x520932),_0x520932+=0x2;const _0x983b1d=['envs',_0x3159e9(0x284),'syncPeers',_0x3159e9(0x2b6)];for(const _0x3f97ee of _0x983b1d){_0x244127[_0x3159e9(0x3cc)](limits[_0x3f97ee]||0x0,_0x520932),_0x520932+=0x4;}return _0x244127;}function _0x57409f(_0x58cb19){const _0x22d140=_0x293c9e;let _0x5cae39=0x0;const _0x15aaa1=_0x58cb19[_0x22d140(0x3a2)](_0x5cae39++),_0x10c641=_0x58cb19[_0x22d140(0x3a2)](_0x5cae39++),_0x4fe0c3=_0x58cb19[_0x22d140(0x2dc)](_0x5cae39);_0x5cae39+=0x4;const _0x58cb1f=_0x58cb19[_0x22d140(0x2dc)](_0x5cae39);_0x5cae39+=0x4;const _0x405608=_0x58cb19[_0x22d140(0x3a2)](_0x5cae39++),_0x458410=_0x58cb19['slice'](_0x5cae39,_0x5cae39+_0x405608)[_0x22d140(0x2dd)]('utf8');_0x5cae39+=_0x405608;const _0x5330fe=_0x58cb19[_0x22d140(0x337)](_0x5cae39);_0x5cae39+=0x2;const _0x188dbe={};for(let _0x176ee8=0x0;_0x176ee8<_0x34017e['length'];_0x176ee8++){_0x188dbe[_0x34017e[_0x176ee8]]=Boolean(_0x5330fe&0x1<<_0x176ee8);}const _0x2a2f00=[_0x22d140(0x2c2),'typesPerEnv','syncPeers',_0x22d140(0x2b6)],_0x3c768d={};for(const _0x5a8188 of _0x2a2f00){const _0x47a3b4=_0x58cb19[_0x22d140(0x2dc)](_0x5cae39);_0x5cae39+=0x4,_0x3c768d[_0x5a8188]=_0x47a3b4===0x0?null:_0x47a3b4;}return{'v':_0x15aaa1,'licenseType':_0x10c641,'issuedAt':_0x4fe0c3*0x3e8,'expiresAt':_0x58cb1f*0x3e8,'licensee':_0x458410,'features':_0x188dbe,'limits':_0x3c768d};}function _0x44f908(_0x6295d,_0x16d7f6){const _0x50d09a=_0x293c9e,_0x176174=Buffer[_0x50d09a(0x1b9)]([_0x6295d,_0x16d7f6]),_0x5e2f8b=_0x200cec(_0x176174),_0x527d69=[];for(let _0x5a8cf2=0x0;_0x5a8cf2<_0x5e2f8b['length'];_0x5a8cf2+=0x8){_0x527d69['push'](_0x5e2f8b[_0x50d09a(0x345)](_0x5a8cf2,_0x5a8cf2+0x8));}return _0x527d69[_0x50d09a(0x335)]('-');}function _0x142466(_0x33fc3b){const _0xa6723e=_0x293c9e;if(typeof _0x33fc3b!=='string')throw new Error(_0xa6723e(0x315));const _0x243e75=_0x479a2b(_0x33fc3b[_0xa6723e(0x1d5)](/-/g,''));if(_0x243e75[_0xa6723e(0x2e0)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x243e75['length']+_0xa6723e(0x213));const _0x433adc=_0x243e75[_0xa6723e(0x345)](0x0,_0x243e75[_0xa6723e(0x2e0)]-0x40),_0x417daa=_0x243e75[_0xa6723e(0x345)](_0x243e75[_0xa6723e(0x2e0)]-0x40);let _0xda3ec4;try{_0xda3ec4=_0x57409f(_0x433adc);}catch(_0x2d3884){throw new Error('decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20'+_0x2d3884['message']);}return{'rawBuf':_0x243e75,'payload':_0x433adc,'sig':_0x417daa,'decoded':_0xda3ec4};}function _0x2c5fda(_0x390d0b){const _0x56bc74=_0x293c9e;return _0x435a64[_0x56bc74(0x266)](_0x56bc74(0x251))[_0x56bc74(0x3d4)](_0x390d0b)[_0x56bc74(0x22e)]()[_0x56bc74(0x345)](0x0,0x8);}function _0x2ef8f8(_0x136843,_0x3a3ff0,_0x24d04c){const _0x5ee1eb=_0x293c9e,_0x1e8757=_0x5ee1eb(0x433)+_0x24d04c,_0x1513c7=Buffer[_0x5ee1eb(0x1b9)]([Buffer['from'](_0x136843,'utf8'),_0x3a3ff0]),_0x14a79b=_0x435a64[_0x5ee1eb(0x399)](_0x5ee1eb(0x251),_0x1e8757)[_0x5ee1eb(0x3d4)](_0x1513c7)[_0x5ee1eb(0x22e)](),_0x184d49=_0x200cec(_0x14a79b['slice'](0x0,0x5));return{'pin':_0x184d49,'pinHmac':_0x14a79b};}function _0x3f2c05(_0x3a70a9,_0xfd4b89,_0x7b8610){const _0x25f2bc=_0x293c9e,_0x215e7e=Buffer[_0x25f2bc(0x1e3)](0x4d);let _0x553f3a=0x0;_0x215e7e[_0x25f2bc(0x2d4)](0x1,_0x553f3a++),_0x3a70a9[_0x25f2bc(0x2a4)](_0x215e7e,_0x553f3a),_0x553f3a+=0x8,_0x215e7e[_0x25f2bc(0x3cc)](_0xfd4b89,_0x553f3a),_0x553f3a+=0x4,_0x7b8610['copy'](_0x215e7e,_0x553f3a);const _0x535497=_0x200cec(_0x215e7e),_0x1a5103=[];for(let _0xd9a8ad=0x0;_0xd9a8ad<_0x535497[_0x25f2bc(0x2e0)];_0xd9a8ad+=0x6){_0x1a5103[_0x25f2bc(0x225)](_0x535497['slice'](_0xd9a8ad,_0xd9a8ad+0x6));}return _0x1a5103[_0x25f2bc(0x335)]('-');}function _0x44abf0(_0x281d40){const _0x2ab668=_0x293c9e;if(typeof _0x281d40!==_0x2ab668(0x1c2))throw new Error(_0x2ab668(0x299));const _0x20b445=_0x479a2b(_0x281d40[_0x2ab668(0x1d5)](/-/g,''));if(_0x20b445[_0x2ab668(0x2e0)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x20b445[_0x2ab668(0x2e0)]);let _0x339154=0x0;const _0x52c583=_0x20b445[_0x2ab668(0x3a2)](_0x339154++),_0x541ed4=_0x20b445['slice'](_0x339154,_0x339154+0x8);_0x339154+=0x8;const _0x31b4e7=_0x20b445['readUInt32BE'](_0x339154);_0x339154+=0x4;const _0x3779aa=_0x20b445[_0x2ab668(0x345)](_0x339154);return{'v':_0x52c583,'licenseHash':_0x541ed4,'expiry':_0x31b4e7,'sig':_0x3779aa};}function _0x1bb82f({tokenString:_0x496e5e,nodeId:_0x4e8311,rawBlobBuf:_0x4a8e58,pubKeyPem:_0x5dbcc7,pubFingerprint:_0xb349a4}){const _0x420500=_0x293c9e;let _0xd184a1;try{_0xd184a1=_0x44abf0(_0x496e5e);}catch(_0xd5667c){return{'valid':![],'reason':_0x420500(0x4bc)};}const _0x4cc268=_0x2c5fda(_0x4a8e58);if(!_0x4cc268[_0x420500(0x2eb)](_0xd184a1[_0x420500(0x28d)]))return{'valid':![],'reason':_0x420500(0x1bc)};const {pinHmac:_0x1f9f0c}=_0x2ef8f8(_0x4e8311,_0x4cc268,_0xb349a4),_0x289e72=Buffer[_0x420500(0x1e3)](0x4);_0x289e72['writeUInt32BE'](_0xd184a1['expiry'],0x0);const _0x291a62=Buffer[_0x420500(0x1b9)]([Buffer['from']([_0xd184a1['v']]),_0x1f9f0c[_0x420500(0x345)](0x0,0x5),_0xd184a1[_0x420500(0x28d)],_0x289e72]);try{const _0x4cf9ae=_0x435a64[_0x420500(0x48a)](null,_0x291a62,_0x5dbcc7,_0xd184a1[_0x420500(0x3d6)]);if(!_0x4cf9ae)return{'valid':![],'reason':_0x420500(0x47c)};}catch(_0x393b4d){return{'valid':![],'reason':_0x420500(0x47c)};}if(_0xd184a1['expiry']<Date[_0x420500(0x379)]()/0x3e8)return{'valid':![],'reason':_0x420500(0x268)};return{'valid':!![],'reason':'ok'};}function _0x4df8dd(_0x561619){const _0x3499ce=_0x293c9e;if(typeof _0x561619!==_0x3499ce(0x1c2))return _0x3499ce(0x4a8);const _0x5e876d=_0x561619[_0x3499ce(0x397)]();if(_0x5e876d[_0x3499ce(0x32d)]('/')||_0x5e876d[_0x3499ce(0x32d)]('./')||_0x5e876d[_0x3499ce(0x32d)](_0x3499ce(0x3fe))||/^[A-Za-z]:[\\/]/[_0x3499ce(0x2c7)](_0x5e876d))return _0x3499ce(0x41b);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x3499ce(0x2c7)](_0x5e876d))return _0x3499ce(0x298);const _0x10b493=_0x5e876d['replace'](/[\s-]+/g,'')[_0x3499ce(0x2e0)];if(_0x10b493===0x7c)return _0x3499ce(0x49d);if(_0x10b493>=0x95&&_0x10b493<=0xfc)return _0x3499ce(0x4a6);return _0x3499ce(0x4a8);}return okdbLicenseCodec={'toBase32':_0x200cec,'fromBase32':_0x479a2b,'encodeLicensePayload':_0x110fb0,'decodeLicensePayload':_0x57409f,'encodeLicenseBlob':_0x44f908,'decodeLicenseBlob':_0x142466,'licenseHash':_0x2c5fda,'derivePin':_0x2ef8f8,'encodeActivationToken':_0x3f2c05,'decodeActivationToken':_0x44abf0,'verifyActivation':_0x1bb82f,'detectInputType':_0x4df8dd,'FEATURE_NAMES':_0x34017e,'LICENSE_TYPE_STANDARD':_0x1a6dd6,'LICENSE_TYPE_OPEN':_0x2d39e7,'LICENSE_TYPE_INTERNAL':_0x1ee3cb,'OPEN_LICENSE_MAX_DURATION_MS':_0x2ce26b},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x82159f extends Error{constructor(_0x2e8e76,_0x335823,_0x83ee11={}){const _0x689a9=_0x5045;super(_0x2e8e76),this[_0x689a9(0x348)]=_0x689a9(0x27c),this[_0x689a9(0x23b)]=_0x335823,this[_0x689a9(0x25c)]=_0x83ee11,_0x83ee11[_0x689a9(0x273)]&&(this['cause']=_0x83ee11[_0x689a9(0x273)]),Error[_0x689a9(0x39d)](this,this[_0x689a9(0x2cd)]);}}class _0x1f3c33 extends _0x82159f{constructor(_0x5bca21,_0x3d63e5,_0x39d243,_0x104f12){const _0x37021f=_0x5045;super('Version\x20mismatch\x20for\x20'+_0x5bca21+'@'+_0x3d63e5+_0x37021f(0x3a9)+_0x39d243+_0x37021f(0x246)+_0x104f12,'VERSION_MISMATCH',{'type':_0x5bca21,'key':_0x3d63e5,'expectedVersion':_0x39d243,'actualVersion':_0x104f12}),this['name']=_0x37021f(0x2ed);}}class _0x3ffa62 extends _0x82159f{constructor(_0xd578c3,_0xd94b63){const _0x4d60ad=_0x5045;super(_0xd578c3+'@'+_0xd94b63+'\x20does\x20not\x20exist','NOT_FOUND',{'type':_0xd578c3,'key':_0xd94b63}),this[_0x4d60ad(0x348)]=_0x4d60ad(0x418);}}class _0x4925d9 extends _0x82159f{constructor(_0x10bc11,_0x314380){const _0x162f61=_0x5045;super(_0x10bc11+'@'+_0x314380+_0x162f61(0x252),_0x162f61(0x1df),{'type':_0x10bc11,'key':_0x314380}),this[_0x162f61(0x348)]=_0x162f61(0x403);}}class _0x212e60 extends _0x82159f{constructor(_0x475150,_0x550b52){const _0x49d2f2=_0x5045,_0x4ce93b=typeof _0x550b52;super(_0x49d2f2(0x23e)+_0x475150+'\x27:\x20'+_0x4ce93b+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x550b52,_0x49d2f2(0x387),{'index':_0x475150,'key':_0x550b52,'keyType':_0x4ce93b}),this[_0x49d2f2(0x348)]=_0x49d2f2(0x35c);}}class _0x49b33c extends _0x82159f{constructor(_0x4972a7){const _0x542414=_0x5045,_0x149469=typeof _0x4972a7;super(_0x542414(0x444)+_0x149469+_0x542414(0x396)+_0x4972a7,_0x542414(0x1fb),{'key':_0x4972a7,'keyType':_0x149469}),this['name']='OKDBInvalidPrimaryKeyError';}}class _0x21179b extends _0x82159f{constructor(_0x467dca){const _0x375c53=_0x5045;super(_0x375c53(0x43b)+_0x467dca+_0x375c53(0x338),'TYPE_NOT_REGISTERED',{'type':_0x467dca}),this['name']=_0x375c53(0x222);}}class _0x46164d extends _0x82159f{constructor(_0x5565c0){const _0x258ba6=_0x5045;super(_0x258ba6(0x43b)+_0x5565c0+'\x27\x20already\x20registered',_0x258ba6(0x3a4),{'type':_0x5565c0}),this[_0x258ba6(0x348)]=_0x258ba6(0x3be);}}class _0x548f5e extends _0x82159f{constructor(_0x218392,_0x1c5593){const _0x1da92b=_0x5045;super(_0x1da92b(0x440)+_0x1c5593+_0x1da92b(0x41f)+_0x218392+'\x27\x20doesn\x27t\x20exist',_0x1da92b(0x3b7),{'type':_0x218392,'index':_0x1c5593}),this[_0x1da92b(0x348)]='OKDBIndexNotRegisteredError';}}class _0x390bdd extends _0x82159f{constructor(_0x28e042,_0x5ecd20){const _0x4925ed=_0x5045;super('Index\x20\x27'+_0x5ecd20+_0x4925ed(0x41f)+_0x28e042+'\x27\x20is\x20already\x20registered','INDEX_ALREADY_REGISTERED',{'type':_0x28e042,'index':_0x5ecd20}),this[_0x4925ed(0x348)]='OKDBIndexAlreadyRegisteredError';}}class _0x56ad22 extends _0x82159f{constructor(_0x54baa0,_0x2d4fdf={}){const _0x2c9534=_0x5045;super(_0x54baa0,_0x2c9534(0x243),_0x2d4fdf),this['name']='OKDBInvalidValueError';}}class _0x57475b extends _0x82159f{constructor(_0x1745be,_0x5810d3,_0x246fff,_0x4a7a10,_0x4b56c4){const _0x325545=_0x5045;super(_0x325545(0x438)+_0x1745be+'@'+_0x5810d3+_0x325545(0x2d2)+_0x246fff+_0x325545(0x4b5)+_0x4a7a10+'\x27,\x20cannot\x20map\x20to\x20\x27'+_0x4b56c4+'\x27',_0x325545(0x32b),{'type':_0x1745be,'index':_0x5810d3,'indexKey':_0x246fff,'existingKey':_0x4a7a10,'conflictingKey':_0x4b56c4}),this[_0x325545(0x348)]=_0x325545(0x428);}}class _0x12b856 extends _0x82159f{constructor(_0x2c30bd,_0x5315fd,_0x1cc13e){const _0x10292a=_0x5045;super('Schema\x20validation\x20failed\x20for\x20'+_0x2c30bd+'@'+_0x5315fd,'SCHEMA_VALIDATION_FAILED',{'type':_0x2c30bd,'key':_0x5315fd,'errors':_0x1cc13e}),this[_0x10292a(0x348)]='OKDBSchemaValidationError',this[_0x10292a(0x1cd)]=_0x2c30bd,this['key']=_0x5315fd,this[_0x10292a(0x260)]=_0x1cc13e;}}class _0x1163ae extends _0x82159f{constructor(_0x1f9b10,_0xc51d98){const _0x5b1655=_0x5045;super(_0x5b1655(0x455)+_0x1f9b10+':\x20'+_0xc51d98[_0x5b1655(0x2e0)]+_0x5b1655(0x352),_0x5b1655(0x26f),{'type':_0x1f9b10,'failures':_0xc51d98}),this[_0x5b1655(0x348)]=_0x5b1655(0x1e4),this[_0x5b1655(0x1cd)]=_0x1f9b10,this['failures']=_0xc51d98;}}class _0x262806 extends _0x82159f{constructor(_0x515764,_0x5f515e,_0x500b32,_0x2f58e6,_0x2d5915){const _0x4b3eb8=_0x5045;super(_0x4b3eb8(0x386)+_0x515764+'@'+_0x5f515e+'.'+_0x500b32+_0x4b3eb8(0x43f)+_0x2f58e6+'@'+_0x2d5915+'\x20which\x20does\x20not\x20exist','FOREIGN_KEY_VIOLATION',{'sourceType':_0x515764,'sourceKey':_0x5f515e,'fieldPath':_0x500b32,'targetType':_0x2f58e6,'targetKey':_0x2d5915}),this['name']='OKDBForeignKeyError',this[_0x4b3eb8(0x2d6)]=_0x515764,this[_0x4b3eb8(0x27d)]=_0x5f515e,this[_0x4b3eb8(0x2fc)]=_0x500b32,this['targetType']=_0x2f58e6,this[_0x4b3eb8(0x419)]=_0x2d5915;}}class _0x120d73 extends _0x82159f{constructor(_0xe4538f,_0x8fe30a,_0x278741){const _0x2af5ed=_0x5045;super(_0x2af5ed(0x47b)+_0xe4538f+'@'+_0x8fe30a+':\x20'+_0x278741['length']+_0x2af5ed(0x45d),_0x2af5ed(0x30c),{'targetType':_0xe4538f,'targetKey':_0x8fe30a,'references':_0x278741}),this[_0x2af5ed(0x348)]='OKDBForeignKeyDeleteError',this[_0x2af5ed(0x202)]=_0xe4538f,this[_0x2af5ed(0x419)]=_0x8fe30a,this['references']=_0x278741;}}class _0x586894 extends _0x82159f{constructor(_0x56bc32,_0x538b90,_0x45bfdd){const _0x5acc50=_0x5045;super(_0x5acc50(0x2f7)+_0x538b90+_0x5acc50(0x362)+_0x56bc32+_0x5acc50(0x2d7)+_0x45bfdd[_0x5acc50(0x2f5)](_0x74e2a3=>_0x74e2a3['kind']+':'+_0x74e2a3['name'])[_0x5acc50(0x335)](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0x56bc32,'index':_0x538b90,'usedBy':_0x45bfdd}),this['name']='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x82159f,'OKDBVersionMismatchError':_0x1f3c33,'OKDBNotFoundError':_0x3ffa62,'OKDBAlreadyExistsError':_0x4925d9,'OKDBInvalidIndexKeyError':_0x212e60,'OKDBInvalidPrimaryKeyError':_0x49b33c,'OKDBTypeNotRegisteredError':_0x21179b,'OKDBTypeAlreadyRegisteredError':_0x46164d,'OKDBIndexNotRegisteredError':_0x548f5e,'OKDBIndexAlreadyRegisteredError':_0x390bdd,'OKDBInvalidValueError':_0x56ad22,'OKDBUniqueConstraintError':_0x57475b,'OKDBSchemaValidationError':_0x12b856,'OKDBSchemaCollectionError':_0x1163ae,'OKDBForeignKeyError':_0x262806,'OKDBForeignKeyDeleteError':_0x120d73,'OKDBIndexHasConsumersError':_0x586894},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x59469d=_0x22e4e2;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x156b06={'PUT':_0x59469d(0x3bf),'REMOVE':_0x59469d(0x416),'INDEX_DROP':'dropIndex','INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x59469d(0x1da),'TYPE_REGISTER':_0x59469d(0x289),'TYPE_DROP':_0x59469d(0x248),'FTS_REGISTER':_0x59469d(0x3c6),'FTS_DROP':_0x59469d(0x1f3),'FTS_RESET':_0x59469d(0x2df),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x59469d(0x43d),'TTL_SET':_0x59469d(0x2f6),'TTL_CLEAR':_0x59469d(0x3dd)},_0x485d89={'SYSTEM_READY':_0x59469d(0x3bc),'SYSTEM_STOPPED':_0x59469d(0x26e),'SYSTEM_CLOCK_CHANGE':_0x59469d(0x426),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x59469d(0x393),'SYSTEM_BUS_STATE_CHANGE':_0x59469d(0x29e),'ITEM_CREATE':_0x59469d(0x407),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x59469d(0x2b4),'INDEX_RESET':'index:reset','INDEX_READY':_0x59469d(0x267),'INDEX_PROGRESS':_0x59469d(0x245),'VIEW_PROGRESS':_0x59469d(0x436),'INDEX_DROP':_0x59469d(0x1d9),'INDEX_REGISTERED':_0x59469d(0x4ac),'FTS_REGISTERED':_0x59469d(0x340),'FTS_DROP':_0x59469d(0x37b),'FTS_RESET':_0x59469d(0x448),'SCHEMA_SET':_0x59469d(0x1db),'SCHEMA_DROP':_0x59469d(0x3c4),'UNIQUE_VIOLATION':_0x59469d(0x3ad),'UNIQUE_VIOLATION_RESOLVED':_0x59469d(0x232),'REF_VIOLATION':_0x59469d(0x256),'REF_VIOLATION_RESOLVED':_0x59469d(0x1ca),'SYNC_APPLY':'sync:apply','TXN_START':_0x59469d(0x2f8),'TXN_END':_0x59469d(0x2be),'TXN_ROLLBACK':_0x59469d(0x2f2),'TYPE_REGISTERED':_0x59469d(0x274),'TYPE_DROP':_0x59469d(0x231),'ENV_OPENED':_0x59469d(0x28a),'ENV_REMOVED':_0x59469d(0x1cf),'TTL_EXPIRED':_0x59469d(0x308),'TTL_SET':_0x59469d(0x233),'TTL_CLEAR':_0x59469d(0x1b4),'LICENSE_INVALID':_0x59469d(0x445),'LICENSE_ADDED':_0x59469d(0x228),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x59469d(0x350)},_0x325188={'CREATING':_0x59469d(0x447),'RESETTING':_0x59469d(0x292),'READY':_0x59469d(0x332),'DROPPING':_0x59469d(0x2bc),'WAITING':_0x59469d(0x304)},_0x2ba926={'CREATED':_0x59469d(0x1ef),'STARTING':_0x59469d(0x478),'STARTED':_0x59469d(0x431),'STOPPING':_0x59469d(0x3da),'STOPPED':'stopped'},_0x183cfa={'CREATING':_0x59469d(0x447),'READY':_0x59469d(0x332),'HALTED':_0x59469d(0x1c7),'STOPPED':_0x59469d(0x2ab),'RESETTING':_0x59469d(0x292)},_0x202269=Object[_0x59469d(0x224)]({'POKE':_0x59469d(0x265),'DRAIN':_0x59469d(0x3b3)});return okdbEnums={'BUS_EVENTS':_0x202269,'CHANGE_ACTIONS':_0x156b06,'EVENTS':_0x485d89,'INDEX_STATE':_0x325188,'OKDB_STATE':_0x2ba926,'VIEW_STATE':_0x183cfa},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x26a265=_0x22e4e2;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x2fc409=require$$1,_0x537415=require$$1$1,_0x5b3f60=require$$0,_0x1b95ab=_0x2fc409[_0x26a265(0x2b3)](_0x537415['join'](__dirname,_0x26a265(0x257)),_0x26a265(0x227))[_0x26a265(0x397)](),_0xcb35bd=_0x5b3f60[_0x26a265(0x409)](_0x1b95ab)[_0x26a265(0x1e0)]({'type':_0x26a265(0x26c),'format':_0x26a265(0x38d)}),_0x4064f8=_0x5b3f60['createHash'](_0x26a265(0x251))['update'](_0xcb35bd)[_0x26a265(0x22e)]('hex')[_0x26a265(0x345)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x1b95ab,'PUB_FINGERPRINT':_0x4064f8},okdbPubkey;}function _0x5d65(){const _0x3229d5=['.okdb-write-test','key',':\x20key\x20[','label','writeUInt8','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','sourceType','\x22\x20is\x20used\x20by:\x20','[okdb]\x20created\x20./okdb-data','assertFeature','input:\x20','debug','readUInt32BE','toString','level:\x20info','resetFts','length','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','\x20tokens:','tags','--drop','\x0a\x20\x20✓\x20License\x20added','exportBlobs','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','PUB_FINGERPRINT','count','equals','./okdb-data','OKDBVersionMismatchError','okdb','LICENSE_TYPE_OPEN','init','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','txn:rollback','No\x20tokens.','dirname','map','setTtl','Index\x20\x22','txn:start','statSync','call','--password','fieldPath','--env\x20<name>','\x20\x20⚠\x20\x20','assertLimit','\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','timingSafeEqual','\x20\x20Tier:\x20\x20\x20\x20','enabled','waiting','yes','envs=','repeat','ttl:expired','idx:','\x20\x20(unlimited)','free\x20tier','FOREIGN_KEY_DELETE_RESTRICTED','write','open\x20','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','\x20\x20@','net','http://localhost:','\x20\x20·\x20','\x20active\x20env:\x20','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','GET','./okdb-backup','1121600MHPPXe','Records','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','0123456789ABCDEFGHJKMNPQRSTVWXYZ','noRepl','\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\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','listLicenses','--help','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','status','\x1b[90m','[okdb]\x20reset\x20aborted','hex','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','PUT','LICENSE_FEATURE_DISABLED','UNIQUE_CONSTRAINT','[okdb]\x20imported\x20\x20types=','startsWith','config','config\x20file\x20valid:\x20','setPrompt','timeMachine','ready','Token\x20secret\x20not\x20configured','--open','join','port\x20','readUInt16BE','\x27\x20doesn\x27t\x20exist','verifyActivation','database\x20path\x20not\x20writable:\x20','LICENSED_BUILD','licensed','dest','189NNJWjb','\x1b[32m','fts:registered','\x20(expires\x20','grants','data','logs','slice','logRequests','\x20opening\x20','name','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','safety','transaction','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','types','\x0a\x20\x20No\x20routes\x20matching\x20\x22','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','license:removed','ceil','\x20documents\x20fail\x20validation','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','licensee','pause','level','round','method','toFixed','transport:\x20','--label','OKDBInvalidIndexKeyError','24xEvysF','token','close','features','Events','\x22\x20on\x20\x22','has','dbPath','active','\x22\x20to\x20enable\x20it.','indexes','password','[okdb]\x20error:\x20--password\x20requires\x20--name','alloc','\x20\x20⚠','--name','reset','from','argv','\x20records','[okdb]\x20port\x20','detachConsole','\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','help','\x1b[34m','list','noAdmin','[okdb]\x20started\x20in\x20','now','floor','fts:drop','drop','charCodeAt','application/json','\x1b[2m','engines','fts','(empty)','true','_isFree','body','Foreign\x20key\x20violation:\x20','INVALID_INDEX_KEY','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','\x20\x20(name:\x20','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','FEATURES','4213233jLMekg','der','boolean','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','\x20day(s).','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','system:drain','detectInputType','views','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','trim','\x20\x20Usage:\x20','createHmac','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','~licenses','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','captureStackTrace','once','--version','records','dynamic','readUInt8','\x20\x20\x20\x20\x20\x20','TYPE_ALREADY_REGISTERED','exp','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x22\x20matches\x20','\x20\x20skipped=',':\x20expected\x20','LICENSEE','addedAt','(none)','unique:violation','env','migrate','\x20\x20http://localhost:','Sync','line','bus:drain','\x0a\x20\x20\x20\x20','/api/','getCount','INDEX_NOT_REGISTERED','LICENSE_EXPIRED_ACTION','roles','log','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','system:ready','\x1b[1m','OKDBTypeAlreadyRegisteredError','put','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','fromEntries','PATCH','gray','schema:drop','http','registerFts','indexOf','decoded','../okdb','access','import','writeUInt32BE','existsSync','meta','revoke','\x20\x20(','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','Build\x20expects\x20public\x20key\x20fingerprint\x20','forEach','update','peers=','sig','\x20\x20→\x20\x20','typeSubDbs','processors/','stopping','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','endsWith','clearTtl','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','--changes','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','\x20\x20╚═══════════════════════════╝','object','--permissions','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','--env','--key','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','keys:','keys','\x20(must\x20be\x201–65535)','syncPeers','parse','Invalid\x20activation\x20token:\x20','toISOString','\x20licenses','\x20<path>\x20[json-body]','active:','already\x20in\x20use','\x20in\x20','\x20\x20Path\x20access','get','columns','System','env/:env','inputSchema','off','\x20file','port','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','../','\x20already\x20in\x20use','catch','POST','pending','OKDBAlreadyExistsError','description','exportToFile','{}[]:,\x0a\x0d\x09\x20','item:create','[okdb]\x20opening\x20','createPublicKey','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','backup','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','<json-body>','search','\x20MB)','terminal','%),\x20','\x1b[36m','getRange','licenseId','(no\x20types)','remove','--log-level','OKDBNotFoundError','targetKey','resume','path','(unset)','{}[]:,\x27\x22','summary','\x27\x20on\x20type\x20\x27','./okdb-export.ndjson','804845mMSmaw','expired','param','children','decodeActivationToken','system:clock_change','\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','OKDBUniqueConstraintError','_computeStatus','Environments','\x20records…','PUT\x20type/users/item/x\x20{\x22n\x22:1}','Types','\x1b[33m','~tokens','--address','started','darwin','OKDB-PIN-V1:','derivePin','\x20env','view:progress','\x20SECURITY\x20NOTICE','Unique\x20constraint\x20violated\x20on\x20','node','isFeatureEnabled','Type\x20\x27','types/env=','dropSchema','exports','\x20references\x20','Index\x20\x27','\x20\x20\x20\x20limits:\x20\x20\x20\x20','base64url','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','Invalid\x20primary\x20key\x20type:\x20','license:invalid','__esModule','creating','fts:reset','mcp','\x20\x20[','type/users/query\x20{\x22active\x22:true}','\x20\x20\x20\x20license:\x20','\x20log\x20level:\x20','payload','--username','number','expiresAt','1081928PdOQpk','Feature\x20not\x20licensed:\x20','files/','Cannot\x20set\x20enforce\x20schema\x20on\x20','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','127.0.0.1','stdin','win32','warn','index','\x20to\x20browse\x20the\x20API,\x20','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x20\x20✓\x20Revoked\x20token\x20','[okdb]\x20backup\x20complete','queue','\x20\x20\x20\x20id:\x20\x20\x20\x20','\x20does\x20not\x20exist','clearLine','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','\x20\x20[okdb]\x20shutting\x20down…','node:crypto','dim','unlinkSync','getSecurityNotices','USE','\x0a\x0a\x20\x20','toLocaleString','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','set','[okdb]\x20reset:\x20','\x20\x20\x20\x20admin:\x20http://localhost:','[okdb]\x20import\x20complete','[okdb]\x20invalid\x20port:\x20','use\x20<env>','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','\x0a\x20\x20','starting','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>',')\x20to\x20your\x20license\x20vendor.','Cannot\x20delete\x20','SIG_INVALID','\x20\x20\x20\x20\x20\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','platform','SIGINT','\x0d[okdb]\x20blobs:\x20','importFromFile','_active','License\x20limit\x20exceeded:\x20','HTTP\x20','[okdb]\x20backing\x20up\x20to\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','queue/','id:\x20','max','verify','body:\x20','hasOwnProperty','tags:\x20','fts:','Indexes','info','\x20writes\x20(','\x20\x20+','admin','operation','isArray','Full-text\x20search','[okdb]\x20exported\x20\x20types=','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','wrong_node','importBlobs','.kdb_history','reason','activation','\x0a\x20\x20✓\x20License\x20activated','\x20\x20records=','_lookupByName','magenta','yellow','\x22\x20already\x20exists','split','logLevel','blob','SIGTERM','unknown','2896254CApZHA','PUBLIC_KEY_PEM','\x20not\x20found','index:registered','changes','--ttl','--types','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','xdg-open\x20','ENV','blobs','--token',']\x20already\x20maps\x20to\x20\x27','current','embeddings','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','\x20\x20\x20\x20expires:\x20\x20\x20','mkdirSync','default','MALFORMED_TOKEN','time','\x20\x20\x20\x20status:\x20\x20\x20\x20active','LABEL','13296gLFTBr','isFile','DELETE\x20type/users/item/x','[okdb]\x20invalid\x20log\x20level:\x20\x22','\x20\x20score:','exit','ttl:clear','\x0a[okdb]\x20shutting\x20down…\x0a','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','red','pin','concat','--no-admin','sync','LICENSE_HASH_MISMATCH','\x20\x20Envs:\x20\x20\x20\x20','EXIT','_license','Shutting\x20down\x20due\x20to\x20license\x20expiry','EXPIRES','string','randomUUID',',\x20label:\x20','DELETE','routes','halted','\x20\x20\x20\x20status:\x20\x20\x20\x20','/\x20quit\x20/\x20Ctrl+C','ref:violation_resolved','(add\x20a\x20license\x20first)','access:\x20','type','[body]','env:removed','stringify','includes','\x0a[okdb]\x20fatal\x20error:','Examples','\x20\x20\x20\x20\x20\x20\x20','replace','attach','\x20\x20·\x20\x20','invalid','index:drop','resetIndex','schema:set','resolve','licenseType','--blobs','ALREADY_EXISTS','export','[on|off|level]','\x20\x20✓\x20Removed\x20license\x20','allocUnsafe','OKDBSchemaCollectionError','/types\x0a\x20\x20\x20\x20','options','auth','finally','[okdb]\x20export\x20complete','padEnd','prototype','no\x20.kdbconfig\x20(using\x20defaults)','available','then','created','\x20\x20\x20\x20addedAt:\x20\x20\x20','rawBuf','listening','dropFts','version','decodeLicenseBlob','\x20\x20Error:\x20','LICENSE_INVALID','--grants','--port','[okdb]\x20nothing\x20to\x20reset\x20—\x20','INVALID_PRIMARY_KEY','node\x20','\x20for\x20commands,\x20','type/users\x20--help','/api/env/','readline','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','targetType','api','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','start\x20','valid','_licenseHash','[filter]','createServer','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','byteLength','error','\x20\x20\x20\x20\x20http://localhost:','sub','hasType','min','_systemEnv','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x20bytes,\x20need\x20>=\x2065)','[env]','sizeAfter','transport','onLicenseExpired','title','address','use','\x0a\x20\x20Invalid\x20JSON:\x20','types\x20--env\x20staging','pid','4177808CDkQGC','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','license','(null)','OKDBTypeNotRegisteredError','LICENSE_ACTIVATION_INVALID','freeze','push','\x20MB\x20→\x20','utf8','license:added','License\x20signature\x20invalid:\x20','[okdb]\x20loaded\x20config:\x20','\x20\x20\x20\x20usage:\x20\x20\x20','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','createInterface','digest','\x20logs\x20off\x0a','values','type:drop','unique:violation_resolved','ttl:set','\x20/\x20','message','null','some','--no-repl','\x20\x20\x20\x20licensee:\x20\x20','\x22.\x20Use:\x20create,\x20list,\x20revoke','code','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','Invalid\x20index\x20key\x20type\x20for\x20\x27','\x0d[okdb]\x20','expires','white','ttl','INVALID_VALUE','[okdb]\x20error:\x20','index:progress',',\x20got\x20','\x20\x20(licensee:\x20','dropType','\x20\x20✗','Admin','stdout','randomBytes','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','loadEnvFile','stderr','\x20more','sha256','\x20already\x20exists','rmSync','/type/users\x0a\x20\x20\x20\x20','\x20\x20Writes:\x20\x20','ref:violation','keys/public.pem','\x20\x20Shell\x20commands','toLowerCase','\x22\x20→\x20','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','details','VERB','QUIT','\x1b[0m','errors','hint','username','limits','_envs','bus:poke','createHash','index:ready','ACTIVATION_EXPIRED','\x20to\x20quit.','Processors','type/users/item/alice','spki','properties','system:stopped','SCHEMA_COLLECTION_INVALID','__OKDB_PUB_FINGERPRINT__','toUpperCase','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','cause','type:registered','LICENSE_LIMIT_EXCEEDED','permissions','open','Invalid\x20license\x20blob:\x20','--path','server','indexToDb','OKDBError','sourceKey','isTTY','/admin/index.html','prompt','\x1b[31m','/api','green','typesPerEnv','.kdbconfig','writeUInt16BE','emit','bold','registerType','env:opened','result','env/staging/info','licenseHash','\x20\x20✓\x20','<path>','selfAddress','effective','resetting','value','License\x20already\x20stored','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','CREATED','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','uuid','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','listen','[okdb]\x20error:\x20failed\x20to\x20read\x20','system','No\x20license\x20found\x20matching\x20this\x20activation\x20token','system:bus_state_change','issuedAt','padStart','listRoutes','--config','bind','copy','\x20\x20changes=','\x20\x20Expected\x20one\x20of:','getPins','cyan','HELP','hidden','stopped','addLicense','false','Files','okdb.pid','ROUTES','\x20environment\x20','\x0a\x20\x20License\x20details:','readFileSync','item:remove','NAME','maxWrites','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x20\x20\x20\x20\x20\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','history','entries','handle','dropping','\x20\x20All\x20checks\x20passed.\x0a','txn:end','\x20\x20\x20\x20writes:\x20\x20\x20\x20','child_process','files','envs','\x20\x20\x20\x20permissions:\x20','ENVS','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','activateLicense','test','filter','Bearer\x20','\x20\x20\x20\x20','other','find','constructor','\x0a\x20\x20Joining\x20cluster\x20at\x20','createdAt'];_0x5d65=function(){return _0x3229d5;};return _0x5d65();}var okdbLicense,hasRequiredOkdbLicense;function _0x5045(_0x50e602,_0x4ab956){_0x50e602=_0x50e602-0x1ab;const _0x5d65c8=_0x5d65();let _0x5045b6=_0x5d65c8[_0x50e602];return _0x5045b6;}function requireOkdbLicense(){const _0x40d901=_0x22e4e2;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x4a8121=require$$0,{OKDBError:_0x5a2560}=requireOkdbError(),{EVENTS:_0x3f05b5}=requireOkdbEnums(),_0xb96ab8=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x6981f5,LICENSE_TYPE_INTERNAL:_0x132af4,OPEN_LICENSE_MAX_DURATION_MS:_0x21ca9a}=_0xb96ab8,_0x58f03f=requireOkdbPubkey(),_0x3787f6={'LICENSED_BUILD':_0x40d901(0x383),'PUBLIC_KEY_PEM':_0x58f03f[_0x40d901(0x4aa)],'PUB_FINGERPRINT':_0x58f03f[_0x40d901(0x2e9)],'LICENSE_EXPIRED_ACTION':_0x40d901(0x3ba)},_0x4657ce=_0x40d901(0x39b),_0x1b77b3={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x373b45(_0x3e779f){const _0x42dae8=_0x40d901;!_0x3e779f[_0x42dae8(0x20f)](_0x4657ce)&&await _0x3e779f[_0x42dae8(0x289)](_0x4657ce);}class _0x2ace73{constructor(_0x5e17ee){const _0x57fb9f=_0x40d901;this['okdb']=_0x5e17ee,this[_0x57fb9f(0x482)]=null;}async['reload'](){const _0x15b930=_0x40d901,_0x293567=this[_0x15b930(0x2ee)][_0x15b930(0x211)];if(!_0x293567||!_0x293567[_0x15b930(0x20f)](_0x4657ce)){this[_0x15b930(0x482)]=null;return;}const _0x54748b=this['okdb']['id'];let _0x4f4d31=null;for(const {key:_0x44664c,value:_0x68a85b}of _0x293567[_0x15b930(0x413)](_0x4657ce)){const _0x5a0c8f=this[_0x15b930(0x429)](_0x68a85b,_0x54748b);_0x5a0c8f==='active'&&!_0x4f4d31&&(_0x4f4d31={..._0x68a85b,'id':_0x44664c,'status':_0x5a0c8f});}this[_0x15b930(0x482)]=_0x4f4d31;if(this[_0x15b930(0x482)]&&this[_0x15b930(0x482)][_0x15b930(0x1dd)]===_0x6981f5){const _0x95fd68=Math[_0x15b930(0x351)]((this[_0x15b930(0x482)]['expiresAt']-Date[_0x15b930(0x379)]())/0x5265c00);this[_0x15b930(0x2ee)][_0x15b930(0x3ba)]?.[_0x15b930(0x45a)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x95fd68+_0x15b930(0x390),{'feature':'license','licensee':this[_0x15b930(0x482)]['licensee'],'expiresAt':new Date(this[_0x15b930(0x482)][_0x15b930(0x451)])['toISOString']()});}this[_0x15b930(0x482)]&&this[_0x15b930(0x482)][_0x15b930(0x1dd)]===_0x132af4&&this[_0x15b930(0x2ee)]['log']?.['warn'](_0x15b930(0x465),{'feature':_0x15b930(0x220),'licensee':this['_active'][_0x15b930(0x354)]});}[_0x40d901(0x429)](_0x622911,_0x5f1e72){const _0x3cbafd=_0x40d901;if(!_0x622911[_0x3cbafd(0x4a6)])return'invalid';let _0x43fc0c;try{_0x43fc0c=_0xb96ab8[_0x3cbafd(0x1f5)](_0x622911['blob']);}catch(_0x5c73cd){return _0x3cbafd(0x1d8);}try{const _0x59f3ee=_0x4a8121[_0x3cbafd(0x48a)](null,_0x43fc0c[_0x3cbafd(0x44e)],_0x3787f6[_0x3cbafd(0x4aa)],_0x43fc0c[_0x3cbafd(0x3d6)]);if(!_0x59f3ee)return _0x3cbafd(0x1d8);}catch(_0x57a63c){return _0x3cbafd(0x1d8);}if(_0x43fc0c[_0x3cbafd(0x3c8)][_0x3cbafd(0x1dd)]===_0x132af4)return _0x3cbafd(0x365);if(_0x43fc0c['decoded']['expiresAt']<=Date[_0x3cbafd(0x379)]())return _0x3cbafd(0x422);if(_0x43fc0c[_0x3cbafd(0x3c8)]['licenseType']===_0x6981f5)return _0x3cbafd(0x365);if(!_0x622911[_0x3cbafd(0x49d)])return _0x3cbafd(0x402);const _0x5de95e=_0xb96ab8['verifyActivation']({'tokenString':_0x622911[_0x3cbafd(0x49d)],'nodeId':_0x5f1e72,'rawBlobBuf':_0x43fc0c[_0x3cbafd(0x1f1)],'pubKeyPem':_0x3787f6[_0x3cbafd(0x4aa)],'pubFingerprint':_0x3787f6[_0x3cbafd(0x2e9)]});if(_0x5de95e[_0x3cbafd(0x49c)]===_0x3cbafd(0x1bc)||_0x5de95e['reason']===_0x3cbafd(0x47c))return _0x3cbafd(0x499);if(_0x5de95e[_0x3cbafd(0x49c)]===_0x3cbafd(0x268))return _0x3cbafd(0x422);if(!_0x5de95e[_0x3cbafd(0x206)])return'wrong_node';return _0x3cbafd(0x365);}get[_0x40d901(0x365)](){return this['_active'];}get[_0x40d901(0x291)](){const _0x3ebd50=_0x40d901;return this[_0x3ebd50(0x482)]??_0x1b77b3;}[_0x40d901(0x2d9)](_0x144d58){const _0x2f67fe=_0x40d901;if(_0x3787f6[_0x2f67fe(0x33b)]!==_0x2f67fe(0x383))return;const _0x56b6ab=this[_0x2f67fe(0x291)];if(!_0x56b6ab[_0x2f67fe(0x360)]?.[_0x144d58]){const _0x1e986c=_0x56b6ab[_0x2f67fe(0x384)]?_0x2f67fe(0x321)+_0x144d58+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x144d58+_0x2f67fe(0x366):_0x2f67fe(0x453)+_0x144d58+_0x2f67fe(0x31a)+_0x144d58+'\x22.';throw new _0x5a2560(_0x1e986c,_0x2f67fe(0x32a),{'feature':_0x144d58});}}[_0x40d901(0x43a)](_0x1141bb){const _0x18ade6=_0x40d901;if(_0x3787f6['LICENSED_BUILD']!==_0x18ade6(0x383))return!![];return!!this['effective'][_0x18ade6(0x360)]?.[_0x1141bb];}[_0x40d901(0x2ff)](_0x13d015,_0x5fcb96){const _0x55daae=_0x40d901;if(_0x3787f6[_0x55daae(0x33b)]!==_0x55daae(0x383))return;const _0x2f83fd=this[_0x55daae(0x291)],_0x214cef=_0x2f83fd['limits']?.[_0x13d015];if(_0x214cef===null||_0x214cef===undefined||_0x214cef===0x0)return;if(_0x5fcb96>=_0x214cef)throw new _0x5a2560(_0x55daae(0x483)+_0x13d015+'\x20('+_0x5fcb96+'/'+_0x214cef+')',_0x55daae(0x275),{'limit':_0x13d015,'current':_0x5fcb96,'max':_0x214cef});}async[_0x40d901(0x2ac)](_0x9ffd71){const _0x4bfdbd=_0x40d901;let _0x2b0015;try{_0x2b0015=_0xb96ab8[_0x4bfdbd(0x1f5)](_0x9ffd71);}catch(_0x5ee079){throw new _0x5a2560(_0x4bfdbd(0x278)+_0x5ee079[_0x4bfdbd(0x235)],_0x4bfdbd(0x1f7));}let _0x362354;try{_0x362354=_0x4a8121['verify'](null,_0x2b0015[_0x4bfdbd(0x44e)],_0x3787f6[_0x4bfdbd(0x4aa)],_0x2b0015[_0x4bfdbd(0x3d6)]);}catch(_0x2b7a49){throw new _0x5a2560(_0x4bfdbd(0x229)+_0x2b7a49[_0x4bfdbd(0x235)],_0x4bfdbd(0x1f7));}if(!_0x362354)throw new _0x5a2560(_0x4bfdbd(0x34f)+(_0x4bfdbd(0x3d2)+_0x3787f6[_0x4bfdbd(0x2e9)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x4bfdbd(0x1f7),{'expectedFingerprint':_0x3787f6[_0x4bfdbd(0x2e9)]});if(_0x2b0015['decoded'][_0x4bfdbd(0x1dd)]===_0x6981f5){const _0x7b8e43=_0x2b0015['decoded']['expiresAt']-_0x2b0015[_0x4bfdbd(0x3c8)][_0x4bfdbd(0x29f)];if(_0x7b8e43>_0x21ca9a)throw new _0x5a2560(_0x4bfdbd(0x3d1)+Math[_0x4bfdbd(0x351)](_0x7b8e43/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)','LICENSE_INVALID');}const _0x432833=this['okdb'][_0x4bfdbd(0x211)];await _0x373b45(_0x432833);const _0x127f95=_0xb96ab8[_0x4bfdbd(0x28d)](_0x2b0015[_0x4bfdbd(0x1f1)])['toString']('hex');for(const {value:_0xd1f1db}of _0x432833[_0x4bfdbd(0x413)](_0x4657ce)){if(_0xd1f1db['_licenseHash']===_0x127f95)throw new _0x5a2560(_0x4bfdbd(0x294),_0x4bfdbd(0x1f7));}const _0x58fcd4=_0x4a8121[_0x4bfdbd(0x1c3)](),_0xf6a5a={'blob':_0x9ffd71,'activation':null,'addedAt':Date['now'](),'_licenseHash':_0x127f95,'licensee':_0x2b0015[_0x4bfdbd(0x3c8)][_0x4bfdbd(0x354)],'expiresAt':_0x2b0015[_0x4bfdbd(0x3c8)]['expiresAt'],'features':_0x2b0015[_0x4bfdbd(0x3c8)][_0x4bfdbd(0x360)],'limits':_0x2b0015[_0x4bfdbd(0x3c8)]['limits'],'licenseType':_0x2b0015['decoded']['licenseType']};return await _0x432833[_0x4bfdbd(0x3bf)](_0x4657ce,_0x58fcd4,_0xf6a5a),{'id':_0x58fcd4,..._0xf6a5a};}async[_0x40d901(0x2c6)](_0xf0db40){const _0x21c304=_0x40d901;let _0x296eb7;try{_0x296eb7=_0xb96ab8[_0x21c304(0x425)](_0xf0db40);}catch(_0x1401cb){throw new _0x5a2560(_0x21c304(0x3ed)+_0x1401cb[_0x21c304(0x235)],_0x21c304(0x223));}const _0x234b5c=_0x296eb7['licenseHash']['toString'](_0x21c304(0x326)),_0xcfd750=this[_0x21c304(0x2ee)][_0x21c304(0x211)];if(!_0xcfd750||!_0xcfd750['hasType'](_0x4657ce))throw new _0x5a2560(_0x21c304(0x29d),'LICENSE_ACTIVATION_INVALID');let _0x5eef14=null,_0x1164f5=null;for(const {key:_0x153474,value:_0x1094a6}of _0xcfd750[_0x21c304(0x413)](_0x4657ce)){if(_0x1094a6['_licenseHash']===_0x234b5c){_0x5eef14=_0x153474,_0x1164f5=_0x1094a6;break;}}if(!_0x5eef14)throw new _0x5a2560('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x21c304(0x223));const {rawBuf:_0xcbb497}=_0xb96ab8[_0x21c304(0x1f5)](_0x1164f5[_0x21c304(0x4a6)]),_0x23ee75=_0xb96ab8[_0x21c304(0x339)]({'tokenString':_0xf0db40,'nodeId':this['okdb']['id'],'rawBlobBuf':_0xcbb497,'pubKeyPem':_0x3787f6[_0x21c304(0x4aa)],'pubFingerprint':_0x3787f6[_0x21c304(0x2e9)]});if(!_0x23ee75['valid'])throw new _0x5a2560('Activation\x20invalid:\x20'+_0x23ee75[_0x21c304(0x49c)],'LICENSE_ACTIVATION_INVALID',{'reason':_0x23ee75[_0x21c304(0x49c)]});const _0x3a1741={..._0x1164f5,'activation':_0xf0db40};return await _0xcfd750[_0x21c304(0x3d4)](_0x4657ce,_0x5eef14,_0x3a1741),{'id':_0x5eef14,..._0x3a1741};}async['removeLicense'](_0x56e847){const _0x24c25c=_0x40d901,_0xc1b4d5=this[_0x24c25c(0x2ee)][_0x24c25c(0x211)];if(!_0xc1b4d5||!_0xc1b4d5[_0x24c25c(0x20f)](_0x4657ce))return;await _0xc1b4d5[_0x24c25c(0x416)](_0x4657ce,_0x56e847);}async[_0x40d901(0x31f)](){const _0x57239d=_0x40d901,_0x2c7ec8=this[_0x57239d(0x2ee)][_0x57239d(0x211)];if(!_0x2c7ec8||!_0x2c7ec8['hasType'](_0x4657ce))return[];const _0x30c08b=this[_0x57239d(0x2ee)]['id'],_0x1c255f=[];for(const {key:_0x9618b7,value:_0x372e67}of _0x2c7ec8[_0x57239d(0x413)](_0x4657ce)){const _0x5e7d81=this['_computeStatus'](_0x372e67,_0x30c08b);_0x1c255f[_0x57239d(0x225)]({..._0x372e67,'id':_0x9618b7,'status':_0x5e7d81});}return _0x1c255f;}[_0x40d901(0x2a7)](){const _0x2059d2=_0x40d901,_0x42aa04=this[_0x2059d2(0x2ee)]['_systemEnv'];if(!_0x42aa04||!_0x42aa04[_0x2059d2(0x20f)](_0x4657ce))return[];const _0x41d431=this['okdb']['id'],_0x23503f=[];for(const {key:_0x1be659,value:_0x2d8dac}of _0x42aa04[_0x2059d2(0x413)](_0x4657ce)){if(_0x2d8dac['_licenseHash']){if(_0x2d8dac['licenseType']===_0x6981f5)_0x23503f[_0x2059d2(0x225)]({'licenseId':_0x1be659,'pin':null});else{const _0x27cadb=Buffer[_0x2059d2(0x36e)](_0x2d8dac[_0x2059d2(0x207)],'hex'),{pin:_0x3fd71a}=_0xb96ab8[_0x2059d2(0x434)](_0x41d431,_0x27cadb,_0x3787f6['PUB_FINGERPRINT']);_0x23503f[_0x2059d2(0x225)]({'licenseId':_0x1be659,'pin':_0x3fd71a});}}}return _0x23503f;}async['recheck'](){const _0x260e4c=_0x40d901,_0x49f4b7=this[_0x260e4c(0x482)];await this['reload']();if(this[_0x260e4c(0x482)]&&this['_active'][_0x260e4c(0x1dd)]===_0x6981f5){const _0x374ef2=Math[_0x260e4c(0x351)]((this[_0x260e4c(0x482)]['expiresAt']-Date['now']())/0x5265c00);this[_0x260e4c(0x2ee)][_0x260e4c(0x3ba)]?.[_0x260e4c(0x45a)](_0x260e4c(0x3a6)+_0x374ef2+'\x20day(s).',{'feature':_0x260e4c(0x220),'licensee':this[_0x260e4c(0x482)][_0x260e4c(0x354)],'expiresAt':new Date(this[_0x260e4c(0x482)]['expiresAt'])[_0x260e4c(0x3ee)]()});}this[_0x260e4c(0x482)]&&this['_active'][_0x260e4c(0x1dd)]===_0x132af4&&this['okdb'][_0x260e4c(0x3ba)]?.['warn'](_0x260e4c(0x465),{'feature':_0x260e4c(0x220),'licensee':this['_active'][_0x260e4c(0x354)]});if(_0x49f4b7&&!this[_0x260e4c(0x482)]){this[_0x260e4c(0x2ee)]['log']?.['warn']('License\x20expired\x20or\x20invalidated',{'feature':_0x260e4c(0x220)}),this[_0x260e4c(0x2ee)]['events']?.[_0x260e4c(0x287)](_0x3f05b5['LICENSE_INVALID'],{'previous':_0x49f4b7});const _0x4999af=this[_0x260e4c(0x2ee)][_0x260e4c(0x1e6)]?.[_0x260e4c(0x217)]??_0x3787f6[_0x260e4c(0x3b8)];_0x4999af==='shutdown'&&(this['okdb'][_0x260e4c(0x3ba)]?.['error'](_0x260e4c(0x1c0),{'feature':_0x260e4c(0x220)}),this['okdb'][_0x260e4c(0x35f)]()[_0x260e4c(0x400)](()=>{})[_0x260e4c(0x1e8)](()=>process[_0x260e4c(0x1b3)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x2ace73,'_C':_0x3787f6},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x334571=_0x22e4e2;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x3f5403=require$$0$2,_0x3cd45f=require$$1,_0x1d4d00=require$$2$1,_0x298fb8=require$$1$1,_0x529dca=_0x298fb8['join'](_0x1d4d00['homedir'](),_0x334571(0x49b)),_0x22d916=0x3e8,_0x1b25f8={'reset':_0x334571(0x25f),'bold':_0x334571(0x3bd),'dim':_0x334571(0x37f),'red':_0x334571(0x281),'green':_0x334571(0x33f),'yellow':_0x334571(0x42e),'blue':_0x334571(0x375),'magenta':'\x1b[35m','cyan':_0x334571(0x412),'white':'\x1b[37m','gray':_0x334571(0x324)},_0x9a69b=!process[_0x334571(0x24b)][_0x334571(0x27e)]||!!process.env.NO_COLOR,_0x3e99bc=(_0x237861,_0x1881e5)=>_0x9a69b?_0x1881e5:''+_0x237861+_0x1881e5+_0x1b25f8[_0x334571(0x36d)],_0x3439cd={'error':_0x1b25f8[_0x334571(0x1b7)],'warn':_0x1b25f8[_0x334571(0x4a2)],'info':_0x1b25f8[_0x334571(0x2a8)],'debug':_0x1b25f8['gray']},_0x3aeb1b={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x3867b6(_0x4bd5d9,_0x105eff=_0x334571(0x490)){const _0x2e8a56=_0x334571,{level:_0x4c8b30,msg:_0x42a137,meta:_0x2c1ef3,context:_0xb9127d,ts:_0x3aee48}=_0x4bd5d9;if((_0x3aeb1b[_0x4c8b30]??0x1)<(_0x3aeb1b[_0x105eff]??0x1))return;const _0x5d1d62=_0x3e99bc(_0x1b25f8[_0x2e8a56(0x3c3)],new Date(_0x3aee48)[_0x2e8a56(0x3ee)]()),_0x59f4a4=_0x3e99bc(_0x3439cd[_0x4c8b30]??_0x1b25f8[_0x2e8a56(0x241)],_0x4c8b30[_0x2e8a56(0x1ea)](0x5));let _0x5f27ce='\x20\x20'+_0x5d1d62+'\x20'+_0x3e99bc(_0x1b25f8[_0x2e8a56(0x288)],_0x59f4a4)+'\x20'+_0x42a137;if(_0x2c1ef3&&Object[_0x2e8a56(0x3e9)](_0x2c1ef3)[_0x2e8a56(0x2e0)]>0x0){const _0xd56292=Object[_0x2e8a56(0x2ba)](_0x2c1ef3)[_0x2e8a56(0x2f5)](([_0x9e340e,_0x26c0f8])=>_0x9e340e+'='+_0x26c0f8)[_0x2e8a56(0x335)]('\x20');_0x5f27ce+=_0x3e99bc(_0x1b25f8[_0x2e8a56(0x468)],_0x2e8a56(0x44a)+_0xd56292+']');}if(_0xb9127d!==undefined){const _0x342503=typeof _0xb9127d===_0x2e8a56(0x3e2)?JSON[_0x2e8a56(0x1d0)](_0xb9127d):String(_0xb9127d);_0x5f27ce+=_0x3e99bc(_0x1b25f8[_0x2e8a56(0x468)],'\x20\x20'+_0x342503);}const _0x8a6dcb=_0x4c8b30===_0x2e8a56(0x20c)||_0x4c8b30==='warn'?process[_0x2e8a56(0x24f)]['write'][_0x2e8a56(0x2a3)](process['stderr']):process[_0x2e8a56(0x24b)][_0x2e8a56(0x30d)][_0x2e8a56(0x2a3)](process[_0x2e8a56(0x24b)]);_0x8a6dcb(_0x5f27ce+'\x0a');}function _0x33b221(_0x41b156,_0x9f84fc){const _0x2ce8ee=_0x334571;if(_0x41b156===0xcc||_0x41b156>=0xc8&&_0x41b156<0x12c&&!_0x9f84fc){console[_0x2ce8ee(0x3ba)](_0x2ce8ee(0x477)+_0x3e99bc(_0x1b25f8['green'],'✓')+'\x0a');return;}if(_0x41b156>=0x190||_0x9f84fc?.[_0x2ce8ee(0x20c)]){const _0x1d066e=_0x9f84fc?.[_0x2ce8ee(0x20c)]??_0x9f84fc?.[_0x2ce8ee(0x235)]??_0x2ce8ee(0x484)+_0x41b156;console[_0x2ce8ee(0x3ba)](_0x2ce8ee(0x477)+_0x3e99bc(_0x1b25f8[_0x2ce8ee(0x1b7)],'✗')+'\x20'+_0x3e99bc(_0x1b25f8[_0x2ce8ee(0x288)]+_0x1b25f8[_0x2ce8ee(0x1b7)],String(_0x41b156))+'\x20\x20'+_0x1d066e+'\x0a');return;}const _0x2f43bd=Object[_0x2ce8ee(0x1eb)][_0x2ce8ee(0x48c)][_0x2ce8ee(0x2fa)](_0x9f84fc??{},_0x2ce8ee(0x28b))?_0x9f84fc[_0x2ce8ee(0x28b)]:_0x9f84fc,_0x7b09bd=_0x9f84fc?.[_0x2ce8ee(0x3ce)];console[_0x2ce8ee(0x3ba)](''),_0x139133(_0x2f43bd,'\x20\x20');if(_0x7b09bd?.[_0x2ce8ee(0x2ea)]!=null||_0x7b09bd?.[_0x2ce8ee(0x1ab)]!=null){const _0x17f6d6=[];if(_0x7b09bd[_0x2ce8ee(0x2ea)]!=null)_0x17f6d6[_0x2ce8ee(0x225)](_0x7b09bd['count']+'\x20result'+(_0x7b09bd[_0x2ce8ee(0x2ea)]!==0x1?'s':''));if(_0x7b09bd[_0x2ce8ee(0x1ab)]!=null)_0x17f6d6[_0x2ce8ee(0x225)](_0x7b09bd['time']+'ms');console['log']('\x0a\x20\x20'+_0x3e99bc(_0x1b25f8['dim'],_0x17f6d6['join'](_0x2ce8ee(0x1d7))));}console[_0x2ce8ee(0x3ba)]('');}function _0x139133(_0x21258e,_0x10c293=''){const _0x35f80d=_0x334571;if(_0x21258e===null||_0x21258e===undefined){console[_0x35f80d(0x3ba)](_0x10c293+_0x3e99bc(_0x1b25f8[_0x35f80d(0x468)],_0x35f80d(0x221)));return;}if(Array['isArray'](_0x21258e)){if(_0x21258e[_0x35f80d(0x2e0)]===0x0){console['log'](_0x10c293+_0x3e99bc(_0x1b25f8['dim'],_0x35f80d(0x382)));return;}if(_0x21258e['every'](_0x495a87=>_0x495a87&&typeof _0x495a87==='object'&&_0x35f80d(0x2d1)in _0x495a87&&_0x35f80d(0x293)in _0x495a87)){_0x541774(_0x21258e,_0x10c293);return;}if(_0x21258e['every'](_0x3cc361=>_0x3cc361&&typeof _0x3cc361==='object'&&_0x35f80d(0x1cd)in _0x3cc361&&_0x35f80d(0x2ea)in _0x3cc361)){_0x2cee97(_0x21258e,_0x10c293);return;}if(_0x21258e['every'](_0x233a4d=>typeof _0x233a4d!==_0x35f80d(0x3e2)||_0x233a4d===null)){_0x21258e[_0x35f80d(0x3d3)]((_0x1a24cf,_0x1dbe96)=>console[_0x35f80d(0x3ba)](_0x10c293+_0x3e99bc(_0x1b25f8[_0x35f80d(0x3c3)],_0x1dbe96+0x1+'.')+'\x20'+_0x3e99bc(_0x1b25f8[_0x35f80d(0x241)],String(_0x1a24cf))));return;}_0x21258e[_0x35f80d(0x3d3)]((_0x131e2f,_0x547a60)=>{const _0x1c83aa=_0x35f80d;console[_0x1c83aa(0x3ba)](_0x10c293+_0x3e99bc(_0x1b25f8[_0x1c83aa(0x468)],'['+_0x547a60+']'));if(typeof _0x131e2f===_0x1c83aa(0x3e2)&&_0x131e2f!==null)_0x12368b(_0x131e2f,_0x10c293+'\x20\x20');else console[_0x1c83aa(0x3ba)](_0x10c293+'\x20\x20'+String(_0x131e2f));});return;}if(typeof _0x21258e===_0x35f80d(0x3e2)){if(_0x35f80d(0x2d1)in _0x21258e&&'value'in _0x21258e&&Object[_0x35f80d(0x3e9)](_0x21258e)[_0x35f80d(0x2e0)]<=0x3){console[_0x35f80d(0x3ba)](_0x10c293+_0x3e99bc(_0x1b25f8['bold']+_0x1b25f8[_0x35f80d(0x2a8)],String(_0x21258e[_0x35f80d(0x2d1)])));const _0x358765=_0x21258e['value'];if(_0x358765&&typeof _0x358765===_0x35f80d(0x3e2))_0x12368b(_0x358765,_0x10c293);else console[_0x35f80d(0x3ba)](_0x10c293+_0x3e99bc(_0x1b25f8['white'],String(_0x358765)));return;}_0x12368b(_0x21258e,_0x10c293);return;}console[_0x35f80d(0x3ba)](_0x10c293+_0x3e99bc(_0x1b25f8[_0x35f80d(0x241)],String(_0x21258e)));}function _0x12368b(_0x34b079,_0x32084d=''){const _0x3ee51b=_0x334571,_0x44b131=Object['entries'](_0x34b079);if(_0x44b131[_0x3ee51b(0x2e0)]===0x0){console[_0x3ee51b(0x3ba)](_0x32084d+_0x3e99bc(_0x1b25f8['dim'],'{}'));return;}const _0x154990=Math[_0x3ee51b(0x210)](0x1c,Math['max'](..._0x44b131['map'](([_0x34e448])=>_0x34e448[_0x3ee51b(0x2e0)])));for(const [_0xcd75b1,_0x3f2a0c]of _0x44b131){const _0x1c9244=_0x3e99bc(_0x1b25f8[_0x3ee51b(0x2a8)],_0xcd75b1[_0x3ee51b(0x1ea)](_0x154990));if(_0x3f2a0c===null||_0x3f2a0c===undefined)console[_0x3ee51b(0x3ba)](_0x32084d+_0x1c9244+'\x20\x20'+_0x3e99bc(_0x1b25f8[_0x3ee51b(0x468)],_0x3ee51b(0x236)));else{if(typeof _0x3f2a0c===_0x3ee51b(0x3e2)){const _0x4c0ba9=JSON[_0x3ee51b(0x1d0)](_0x3f2a0c);_0x4c0ba9[_0x3ee51b(0x2e0)]<=0x50?console[_0x3ee51b(0x3ba)](_0x32084d+_0x1c9244+'\x20\x20'+_0x3e99bc(_0x1b25f8['dim'],_0x4c0ba9)):(console['log'](_0x32084d+_0x1c9244),_0x139133(_0x3f2a0c,_0x32084d+'\x20\x20'));}else{const _0x2c425c=typeof _0x3f2a0c===_0x3ee51b(0x38e)?_0x3e99bc(_0x3f2a0c?_0x1b25f8['green']:_0x1b25f8['yellow'],String(_0x3f2a0c)):typeof _0x3f2a0c===_0x3ee51b(0x450)?_0x3e99bc(_0x1b25f8['magenta'],String(_0x3f2a0c)):_0x3e99bc(_0x1b25f8[_0x3ee51b(0x241)],String(_0x3f2a0c));console[_0x3ee51b(0x3ba)](_0x32084d+_0x1c9244+'\x20\x20'+_0x2c425c);}}}}function _0x541774(_0x5d9a50,_0x3e5666=''){const _0x539dd5=_0x334571,_0x5c3613=Math['min'](0x20,Math['max'](..._0x5d9a50['map'](_0x241490=>String(_0x241490[_0x539dd5(0x2d1)])[_0x539dd5(0x2e0)])));for(const {key:_0x7d649f,value:_0x2d0159,score:_0x198025,clock:_0x20143b}of _0x5d9a50){const _0x2be7c5=_0x3e99bc(_0x1b25f8['bold']+_0x1b25f8['cyan'],String(_0x7d649f)[_0x539dd5(0x1ea)](_0x5c3613)),_0x2d55b6=_0x2d0159==null?_0x3e99bc(_0x1b25f8[_0x539dd5(0x468)],_0x539dd5(0x236)):typeof _0x2d0159===_0x539dd5(0x3e2)?_0x3e99bc(_0x1b25f8[_0x539dd5(0x468)],JSON['stringify'](_0x2d0159)):_0x3e99bc(_0x1b25f8[_0x539dd5(0x241)],String(_0x2d0159)),_0x539cfe=_0x198025!=null?_0x3e99bc(_0x1b25f8[_0x539dd5(0x3c3)],_0x539dd5(0x1b2)+_0x198025[_0x539dd5(0x359)](0x4)):'',_0x186d42=_0x20143b!=null?_0x3e99bc(_0x1b25f8[_0x539dd5(0x3c3)],_0x539dd5(0x310)+_0x20143b):'';console['log'](_0x3e5666+_0x2be7c5+'\x20\x20'+_0x2d55b6+_0x539cfe+_0x186d42);}}function _0x2cee97(_0x22fb9c,_0x34a3a7=''){const _0x2d2d26=_0x334571,_0x2617bc=Math['min'](0x20,Math[_0x2d2d26(0x489)](..._0x22fb9c[_0x2d2d26(0x2f5)](_0x262490=>_0x262490[_0x2d2d26(0x1cd)][_0x2d2d26(0x2e0)])));for(const {type:_0x41158f,count:_0x3ed879,fields:_0x11dc1a}of _0x22fb9c){if(_0x41158f[_0x2d2d26(0x32d)]('~'))continue;const _0x4d4996=_0x3e99bc(_0x1b25f8[_0x2d2d26(0x288)]+_0x1b25f8[_0x2d2d26(0x2a8)],_0x41158f[_0x2d2d26(0x1ea)](_0x2617bc)),_0x4d9d92=_0x3e99bc(_0x1b25f8['magenta'],String(_0x3ed879)[_0x2d2d26(0x2a0)](0x6))+_0x3e99bc(_0x1b25f8['dim'],_0x2d2d26(0x370)),_0x4cd865=_0x11dc1a&&Object[_0x2d2d26(0x3e9)](_0x11dc1a)['length']?_0x3e99bc(_0x1b25f8[_0x2d2d26(0x468)],_0x2d2d26(0x313)+Object[_0x2d2d26(0x3e9)](_0x11dc1a)['slice'](0x0,0x6)['join'](',\x20')+(Object[_0x2d2d26(0x3e9)](_0x11dc1a)[_0x2d2d26(0x2e0)]>0x6?'…':'')):'';console[_0x2d2d26(0x3ba)](_0x34a3a7+_0x4d4996+'\x20\x20'+_0x4d9d92+_0x4cd865);}}const _0xf50b4b=['types','type/',_0x334571(0x487),_0x334571(0x454),_0x334571(0x34b),_0x334571(0x3d9)];function _0x251dd0(_0x3ca6b5,_0x49f67a){const _0x2d0699=_0x334571;if(_0x3ca6b5[_0x2d0699(0x32d)](_0x2d0699(0x3b5)))return _0x3ca6b5;if(_0x3ca6b5[_0x2d0699(0x32d)]('/'))return _0x2d0699(0x282)+_0x3ca6b5;if(_0x3ca6b5[_0x2d0699(0x32d)]('env/'))return _0x2d0699(0x3b5)+_0x3ca6b5;const _0x2ccc38=_0xf50b4b['some'](_0xa49328=>_0x3ca6b5===_0xa49328['replace'](/\/$/,'')||_0x3ca6b5[_0x2d0699(0x32d)](_0xa49328));return _0x2ccc38?_0x2d0699(0x1ff)+_0x49f67a+'/'+_0x3ca6b5:_0x2d0699(0x3b5)+_0x3ca6b5;}function _0x264abc(_0x5a7064){const _0x285df4=_0x334571,_0x70911c={},_0x1db7ee=[];let _0x4071de=0x0;while(_0x4071de<_0x5a7064[_0x285df4(0x2e0)]){if((_0x5a7064[_0x4071de]===_0x285df4(0x3e5)||_0x5a7064[_0x4071de]==='-e')&&_0x5a7064[_0x4071de+0x1]&&!_0x5a7064[_0x4071de+0x1][_0x285df4(0x32d)]('-'))_0x70911c[_0x285df4(0x3ae)]=_0x5a7064[++_0x4071de];else _0x5a7064[_0x4071de]===_0x285df4(0x320)||_0x5a7064[_0x4071de]==='-h'?_0x70911c[_0x285df4(0x374)]=!![]:_0x1db7ee[_0x285df4(0x225)](_0x5a7064[_0x4071de]);_0x4071de++;}return{'flags':_0x70911c,'rest':_0x1db7ee};}const _0x2bfa8d={'system':_0x334571(0x3f7),'envs':_0x334571(0x42a),'types':_0x334571(0x42d),'data':_0x334571(0x319),'indexes':_0x334571(0x48f),'fts':_0x334571(0x496),'sync':_0x334571(0x3b1),'queue':'Queue','files':_0x334571(0x2ae),'embeddings':'Embeddings','engines':'Engines','admin':_0x334571(0x24a),'event':_0x334571(0x361),'processor':_0x334571(0x26a)},_0x4f5f9f=[_0x334571(0x29c),_0x334571(0x2c2),'types',_0x334571(0x343),_0x334571(0x367),_0x334571(0x381),'sync',_0x334571(0x461),_0x334571(0x2c1),'embeddings',_0x334571(0x380),_0x334571(0x493)];function _0x2b4eea(_0x258e72){const _0x9d98d7=_0x334571;return _0x258e72[_0x9d98d7(0x1d5)](/^\/api/,'')[_0x9d98d7(0x1d5)](/^\[\/env\/:env=[^\]]*\]/,_0x9d98d7(0x214))[_0x9d98d7(0x1d5)](/^\/env\/:env/,_0x9d98d7(0x3f8))[_0x9d98d7(0x1d5)](/^\//,'');}function _0x4ff991(_0x238d13,_0x152fff=''){const _0x36e4f6=_0x334571,_0xdbd904=_0x238d13[_0x36e4f6(0x3c5)]['listRoutes']()[_0x36e4f6(0x2c8)](_0x285b68=>!_0x285b68[_0x36e4f6(0x3ce)]?.[_0x36e4f6(0x2aa)]),_0x560cf2=_0x152fff?_0xdbd904[_0x36e4f6(0x2c8)](_0x983c8e=>_0x983c8e[_0x36e4f6(0x41b)]['toLowerCase']()[_0x36e4f6(0x1d1)](_0x152fff['toLowerCase']())||(_0x306eaa(_0x983c8e)??'')[_0x36e4f6(0x259)]()['includes'](_0x152fff['toLowerCase']())||_0x4b2eec(_0x983c8e)[_0x36e4f6(0x237)](_0x5637ea=>_0x5637ea['toLowerCase']()['includes'](_0x152fff[_0x36e4f6(0x259)]()))):_0xdbd904;if(!_0x560cf2[_0x36e4f6(0x2e0)]){console[_0x36e4f6(0x3ba)](_0x3e99bc(_0x1b25f8[_0x36e4f6(0x4a2)],_0x36e4f6(0x34e)+_0x152fff+'\x22\x0a'));return;}const _0x686f4f=new Map();for(const _0x50898d of _0x560cf2){const _0x198b2c=_0x4b2eec(_0x50898d)[0x0]??_0x36e4f6(0x2cb);if(!_0x686f4f[_0x36e4f6(0x363)](_0x198b2c))_0x686f4f[_0x36e4f6(0x46f)](_0x198b2c,[]);_0x686f4f[_0x36e4f6(0x3f5)](_0x198b2c)['push'](_0x50898d);}const _0xfe232f=[..._0x4f5f9f['filter'](_0x37efd0=>_0x686f4f['has'](_0x37efd0)),...[..._0x686f4f['keys']()]['filter'](_0x39fd55=>!_0x4f5f9f[_0x36e4f6(0x1d1)](_0x39fd55))];console['log']('');for(const _0x2c2488 of _0xfe232f){const _0x3a1631=_0x686f4f[_0x36e4f6(0x3f5)](_0x2c2488);if(!_0x3a1631?.['length'])continue;console[_0x36e4f6(0x3ba)](_0x3e99bc(_0x1b25f8[_0x36e4f6(0x288)],'\x20\x20'+(_0x2bfa8d[_0x2c2488]??_0x2c2488)));for(const _0x3f219a of _0x3a1631){const _0x206b16=_0x3e99bc(_0x1b25f8['magenta'],_0x3f219a[_0x36e4f6(0x358)][_0x36e4f6(0x1ea)](0x7)),_0x4df3c5=_0x3e99bc(_0x1b25f8[_0x36e4f6(0x2a8)],_0x2b4eea(_0x3f219a['path'])),_0x39465b=_0x306eaa(_0x3f219a)?_0x3e99bc(_0x1b25f8[_0x36e4f6(0x468)],'\x20\x20'+_0x306eaa(_0x3f219a)):'',_0xb3aec=_0x3f219a[_0x36e4f6(0x494)]?.['id']?_0x3e99bc(_0x1b25f8['gray'],_0x36e4f6(0x44a)+_0x3f219a[_0x36e4f6(0x494)]['id']+']'):'';console[_0x36e4f6(0x3ba)](_0x36e4f6(0x2ca)+_0x206b16+'\x20'+_0x4df3c5+_0x39465b+_0xb3aec);}console[_0x36e4f6(0x3ba)]('');}}function _0x1b0af3(_0x3eb585,_0x146d72){const _0x4fb4a6=_0x334571,_0x509fc7=_0x146d72['replace'](/^\/api(\/env\/[^/]+)?\//,'')[_0x4fb4a6(0x4a4)]('/')[0x0],_0x10e282=_0x3eb585['http'][_0x4fb4a6(0x2a1)]()['filter'](_0x3dc1f9=>_0x3dc1f9[_0x4fb4a6(0x41b)][_0x4fb4a6(0x259)]()[_0x4fb4a6(0x1d1)](_0x509fc7[_0x4fb4a6(0x259)]()));if(!_0x10e282['length']){console[_0x4fb4a6(0x3ba)](_0x3e99bc(_0x1b25f8['yellow'],_0x4fb4a6(0x388)+_0x146d72+'\x0a'));return;}console[_0x4fb4a6(0x3ba)]('');for(const _0x601724 of _0x10e282[_0x4fb4a6(0x345)](0x0,0xc)){for(const _0x53a9b0 of _0x16fd7d(_0x601724)){console[_0x4fb4a6(0x3ba)](_0x53a9b0);}console['log']('');}}function _0x306eaa(_0x511b10){const _0x3b6a5f=_0x334571;return _0x511b10['operation']?.[_0x3b6a5f(0x41e)]??_0x511b10[_0x3b6a5f(0x3ce)]?.[_0x3b6a5f(0x41e)]??'';}function _0x270f92(_0x41c47d){const _0x569b50=_0x334571;return _0x41c47d['operation']?.['description']??_0x41c47d[_0x569b50(0x3ce)]?.[_0x569b50(0x404)]??'';}function _0x4b2eec(_0x4a145e){const _0xaa90d6=_0x334571;return _0x4a145e['operation']?.[_0xaa90d6(0x2e4)]?.[_0xaa90d6(0x2e0)]?_0x4a145e[_0xaa90d6(0x494)][_0xaa90d6(0x2e4)]:_0x4a145e[_0xaa90d6(0x3ce)]?.[_0xaa90d6(0x2e4)]??[];}function _0x16fd7d(_0x242178){const _0x4a2516=_0x334571,_0x15552e=[];_0x15552e[_0x4a2516(0x225)]('\x20\x20'+_0x3e99bc(_0x1b25f8[_0x4a2516(0x288)]+_0x1b25f8[_0x4a2516(0x4a1)],_0x242178['method']['padEnd'](0x7))+'\x20'+_0x3e99bc(_0x1b25f8['bold']+_0x1b25f8['cyan'],_0x242178[_0x4a2516(0x41b)]));_0x242178[_0x4a2516(0x494)]?.['id']&&_0x15552e[_0x4a2516(0x225)](_0x4a2516(0x39c)+_0x3e99bc(_0x1b25f8[_0x4a2516(0x3c3)],_0x4a2516(0x488)+_0x242178[_0x4a2516(0x494)]['id']));_0x306eaa(_0x242178)&&_0x15552e[_0x4a2516(0x225)](_0x4a2516(0x39c)+_0x3e99bc(_0x1b25f8['white'],_0x306eaa(_0x242178)));_0x270f92(_0x242178)&&_0x15552e['push'](_0x4a2516(0x39c)+_0x3e99bc(_0x1b25f8[_0x4a2516(0x468)],_0x270f92(_0x242178)));_0x4b2eec(_0x242178)[_0x4a2516(0x2e0)]&&_0x15552e[_0x4a2516(0x225)](_0x4a2516(0x39c)+_0x3e99bc(_0x1b25f8[_0x4a2516(0x3c3)],_0x4a2516(0x48d)+_0x4b2eec(_0x242178)['join'](',\x20')));_0x242178[_0x4a2516(0x494)]?.[_0x4a2516(0x34a)]?.['access']&&_0x15552e[_0x4a2516(0x225)](_0x4a2516(0x39c)+_0x3e99bc(_0x1b25f8['gray'],_0x4a2516(0x1cc)+_0x242178[_0x4a2516(0x494)][_0x4a2516(0x34a)][_0x4a2516(0x3ca)]));_0x242178['operation']?.[_0x4a2516(0x3c5)]?.[_0x4a2516(0x216)]&&_0x242178['operation'][_0x4a2516(0x3c5)][_0x4a2516(0x216)]!=='standard'&&_0x15552e[_0x4a2516(0x225)](_0x4a2516(0x39c)+_0x3e99bc(_0x1b25f8[_0x4a2516(0x3c3)],_0x4a2516(0x35a)+_0x242178['operation']['http'][_0x4a2516(0x216)]));if(_0x242178[_0x4a2516(0x494)]?.[_0x4a2516(0x3f9)]){const _0x295685=Object[_0x4a2516(0x3e9)](_0x242178['operation'][_0x4a2516(0x3f9)][_0x4a2516(0x26d)]||{});if(_0x295685[_0x4a2516(0x2e0)])_0x15552e[_0x4a2516(0x225)](_0x4a2516(0x39c)+_0x3e99bc(_0x1b25f8['gray'],_0x4a2516(0x2da)+_0x295685[_0x4a2516(0x335)](',\x20')));}return _0x242178[_0x4a2516(0x3ce)]?.[_0x4a2516(0x385)]&&_0x15552e[_0x4a2516(0x225)](_0x4a2516(0x39c)+_0x3e99bc(_0x1b25f8['gray'],_0x4a2516(0x48b)+JSON[_0x4a2516(0x1d0)](_0x242178[_0x4a2516(0x3ce)]['body']))),_0x15552e;}async function _0x111de1(_0x15b69c,_0x1b40a6,_0x11611b,_0x5f5878=null){const _0x378005=_0x334571,_0x2bf440=_0x11611b[_0x378005(0x3c7)]('?'),_0x14d0b8=_0x2bf440>=0x0?_0x11611b[_0x378005(0x345)](0x0,_0x2bf440):_0x11611b,_0x5d9da4=_0x2bf440>=0x0?_0x11611b['slice'](_0x2bf440+0x1):'',_0x489859=Object[_0x378005(0x3c1)](new URLSearchParams(_0x5d9da4)[_0x378005(0x2ba)]());return _0x15b69c[_0x378005(0x3c5)][_0x378005(0x2bb)](_0x1b40a6,_0x14d0b8,{'body':_0x5f5878,'query':_0x489859,'headers':{'content-type':_0x378005(0x37e)}},{'internal':!![]});}function _0x1e199b(_0xb0fcf8){const _0x4b6654=_0x334571;if(!_0xb0fcf8)return null;const _0x594d74=_0xb0fcf8['trim']();if(!_0x594d74)return null;try{return JSON[_0x4b6654(0x3ec)](_0x594d74);}catch{}try{return JSON[_0x4b6654(0x3ec)](_0x34e01c(_0x594d74));}catch(_0x4a036c){throw new SyntaxError(_0x4a036c['message'],{'cause':_0x4a036c});}}function _0x34e01c(_0x154faf){const _0x291705=_0x334571;let _0x35b66e='',_0x23e3a5=0x0;while(_0x23e3a5<_0x154faf['length']){const _0x42bfb2=_0x154faf[_0x23e3a5];if(_0x42bfb2==='\x22'){_0x35b66e+='\x22',_0x23e3a5++;while(_0x23e3a5<_0x154faf[_0x291705(0x2e0)]&&_0x154faf[_0x23e3a5]!=='\x22'){if(_0x154faf[_0x23e3a5]==='\x5c'){_0x35b66e+=_0x154faf[_0x23e3a5++];if(_0x23e3a5<_0x154faf[_0x291705(0x2e0)])_0x35b66e+=_0x154faf[_0x23e3a5++];}else _0x35b66e+=_0x154faf[_0x23e3a5++];}_0x35b66e+='\x22';if(_0x23e3a5<_0x154faf[_0x291705(0x2e0)])_0x23e3a5++;continue;}if(_0x42bfb2==='\x27'){_0x35b66e+='\x22',_0x23e3a5++;while(_0x23e3a5<_0x154faf['length']&&_0x154faf[_0x23e3a5]!=='\x27'){if(_0x154faf[_0x23e3a5]==='\x5c'&&_0x154faf[_0x23e3a5+0x1]==='\x27')_0x35b66e+='\x27',_0x23e3a5+=0x2;else _0x154faf[_0x23e3a5]==='\x22'?(_0x35b66e+='\x5c\x22',_0x23e3a5++):_0x35b66e+=_0x154faf[_0x23e3a5++];}_0x35b66e+='\x22';if(_0x23e3a5<_0x154faf[_0x291705(0x2e0)])_0x23e3a5++;continue;}if(_0x291705(0x406)[_0x291705(0x1d1)](_0x42bfb2)){_0x35b66e+=_0x42bfb2,_0x23e3a5++;continue;}let _0xf09747='';while(_0x23e3a5<_0x154faf[_0x291705(0x2e0)]&&!_0x291705(0x41d)[_0x291705(0x1d1)](_0x154faf[_0x23e3a5])&&_0x154faf[_0x23e3a5]!=='\x20'&&_0x154faf[_0x23e3a5]!=='\x09'&&_0x154faf[_0x23e3a5]!=='\x0a'&&_0x154faf[_0x23e3a5]!=='\x0d'){_0xf09747+=_0x154faf[_0x23e3a5++];}let _0x5d7698=_0x23e3a5;while(_0x5d7698<_0x154faf[_0x291705(0x2e0)]&&(_0x154faf[_0x5d7698]==='\x20'||_0x154faf[_0x5d7698]==='\x09'))_0x5d7698++;if(_0x154faf[_0x5d7698]===':')_0x35b66e+='\x22'+_0xf09747+'\x22';else _0xf09747==='true'||_0xf09747===_0x291705(0x2ad)||_0xf09747===_0x291705(0x236)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x291705(0x2c7)](_0xf09747)?_0x35b66e+=_0xf09747:_0x35b66e+='\x22'+_0xf09747+'\x22';}return _0x35b66e[_0x291705(0x1d5)](/,(\s*[}\]])/g,'$1');}function _0x5655a3(_0x52bd8e){const _0x54c7a9=_0x334571,_0x17fba8=[];let _0x3aa93f=0x0;while(_0x3aa93f<_0x52bd8e[_0x54c7a9(0x2e0)]){while(_0x3aa93f<_0x52bd8e[_0x54c7a9(0x2e0)]&&(_0x52bd8e[_0x3aa93f]==='\x20'||_0x52bd8e[_0x3aa93f]==='\x09'))_0x3aa93f++;if(_0x3aa93f>=_0x52bd8e[_0x54c7a9(0x2e0)])break;const _0x3d82ad=_0x52bd8e[_0x3aa93f];if(_0x3d82ad==='{'||_0x3d82ad==='['){const _0x25a440=_0x3d82ad==='{'?'}':']',_0x1392e4=_0x3aa93f++;let _0xbd5935=0x1,_0x165a42=![],_0x1f3100='';while(_0x3aa93f<_0x52bd8e[_0x54c7a9(0x2e0)]&&_0xbd5935>0x0){const _0x428343=_0x52bd8e[_0x3aa93f];if(_0x165a42){if(_0x428343==='\x5c')_0x3aa93f++;else{if(_0x428343===_0x1f3100)_0x165a42=![];}}else{if(_0x428343==='\x22'||_0x428343==='\x27')_0x165a42=!![],_0x1f3100=_0x428343;else{if(_0x428343===_0x3d82ad)_0xbd5935++;else{if(_0x428343===_0x25a440)_0xbd5935--;}}}_0x3aa93f++;}_0x17fba8[_0x54c7a9(0x225)](_0x52bd8e[_0x54c7a9(0x345)](_0x1392e4,_0x3aa93f));continue;}if(_0x3d82ad==='\x22'||_0x3d82ad==='\x27'){const _0x178023=_0x3d82ad;_0x3aa93f++;let _0x3bb5d2='';while(_0x3aa93f<_0x52bd8e[_0x54c7a9(0x2e0)]&&_0x52bd8e[_0x3aa93f]!==_0x178023){if(_0x52bd8e[_0x3aa93f]==='\x5c'&&_0x3aa93f+0x1<_0x52bd8e['length'])_0x3aa93f++,_0x3bb5d2+=_0x52bd8e[_0x3aa93f++];else _0x3bb5d2+=_0x52bd8e[_0x3aa93f++];}if(_0x3aa93f<_0x52bd8e[_0x54c7a9(0x2e0)])_0x3aa93f++;_0x17fba8[_0x54c7a9(0x225)](_0x3bb5d2);continue;}let _0x23d698='';while(_0x3aa93f<_0x52bd8e[_0x54c7a9(0x2e0)]&&_0x52bd8e[_0x3aa93f]!=='\x20'&&_0x52bd8e[_0x3aa93f]!=='\x09'&&_0x52bd8e[_0x3aa93f]!=='{'&&_0x52bd8e[_0x3aa93f]!=='['){_0x23d698+=_0x52bd8e[_0x3aa93f++];}if(_0x23d698)_0x17fba8[_0x54c7a9(0x225)](_0x23d698);}return _0x17fba8;}function _0x33b16f(_0xaf9903,_0x51b61b){const _0x2a00d7=_0x334571,_0x4f2639=[..._0xaf9903['_envs'][_0x2a00d7(0x3e9)]()]['filter'](_0x56b6c3=>!_0x56b6c3[_0x2a00d7(0x32d)]('~'));console['log'](['',_0x3e99bc(_0x1b25f8[_0x2a00d7(0x288)]+_0x1b25f8['cyan'],'\x20\x20╔═══════════════════════════╗'),_0x3e99bc(_0x1b25f8['bold']+_0x1b25f8[_0x2a00d7(0x2a8)],'\x20\x20║')+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x288)],_0x2a00d7(0x3de))+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x288)]+_0x1b25f8[_0x2a00d7(0x2a8)],'║'),_0x3e99bc(_0x1b25f8[_0x2a00d7(0x288)]+_0x1b25f8['cyan'],_0x2a00d7(0x3e1)),'','\x20\x20'+_0x3e99bc(_0x1b25f8['green'],'✓')+'\x20'+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x288)],_0x2a00d7(0x27a))+_0x2a00d7(0x3b0)+_0x51b61b[_0x2a00d7(0x3fc)],'\x20\x20'+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x283)],'✓')+'\x20'+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x288)],'api')+_0x2a00d7(0x20d)+_0x51b61b[_0x2a00d7(0x3fc)]+_0x2a00d7(0x282),'\x20\x20'+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x283)],'✓')+'\x20'+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x288)],_0x2a00d7(0x41b))+'\x20\x20\x20\x20'+_0x51b61b[_0x2a00d7(0x364)],'\x20\x20'+_0x3e99bc(_0x1b25f8['green'],'✓')+'\x20'+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x288)],'id')+_0x2a00d7(0x3a3)+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x3c3)],_0xaf9903['id']),'\x20\x20'+_0x3e99bc(_0x1b25f8['green'],'✓')+'\x20'+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x288)],_0x2a00d7(0x2c2))+_0x2a00d7(0x2ca)+_0x4f2639[_0x2a00d7(0x2f5)](_0x42ee91=>_0x3e99bc(_0x1b25f8[_0x2a00d7(0x2a8)],_0x42ee91))[_0x2a00d7(0x335)]('\x20\x20'),..._0x51b61b[_0x2a00d7(0x377)]?[]:['\x20\x20'+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x283)],'✓')+'\x20'+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x288)],'admin')+'\x20\x20\x20http://localhost:'+_0x51b61b[_0x2a00d7(0x3fc)]+_0x2a00d7(0x27f)],'',_0x3e99bc(_0x1b25f8[_0x2a00d7(0x468)],'\x20\x20Type\x20'+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x288)],_0x2a00d7(0x374))+_0x2a00d7(0x1fd)+_0x3e99bc(_0x1b25f8['bold'],_0x2a00d7(0x1c6))+_0x2a00d7(0x45c)+_0x3e99bc(_0x1b25f8[_0x2a00d7(0x288)],_0x2a00d7(0x1b3))+_0x2a00d7(0x269)),'']['join']('\x0a'));}function _0xe26912(_0x477ae0){const _0x351a84=_0x334571;console['log']('\x0a'+_0x3e99bc(_0x1b25f8[_0x351a84(0x288)],_0x351a84(0x3f4))+'\x20\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x468)],_0x351a84(0x4b0))+'\x0a\x0a\x20\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x2a8)],_0x351a84(0x28f))+_0x351a84(0x2e2)+_0x3e99bc(_0x1b25f8[_0x351a84(0x2a8)],_0x351a84(0x28f))+'\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x4a2)],_0x351a84(0x40d))+_0x351a84(0x3e4)+_0x3e99bc(_0x1b25f8[_0x351a84(0x2a8)],_0x351a84(0x25d))+'\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x2a8)],_0x351a84(0x28f))+'\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x4a2)],_0x351a84(0x1ce))+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0x3e99bc(_0x1b25f8['dim'],_0x351a84(0x1d3))+_0x351a84(0x3b4)+_0x3e99bc(_0x1b25f8[_0x351a84(0x3c3)],_0x351a84(0x490))+_0x351a84(0x47d)+_0x3e99bc(_0x1b25f8['gray'],'envs')+_0x351a84(0x2b8)+_0x3e99bc(_0x1b25f8[_0x351a84(0x3c3)],_0x351a84(0x34d))+_0x351a84(0x31e)+_0x477ae0['env']+_0x351a84(0x1e5)+_0x3e99bc(_0x1b25f8[_0x351a84(0x3c3)],'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/'+_0x477ae0['env']+_0x351a84(0x254)+_0x3e99bc(_0x1b25f8[_0x351a84(0x3c3)],_0x351a84(0x26b))+_0x351a84(0x327)+_0x477ae0[_0x351a84(0x3ae)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x3c3)],_0x351a84(0x44b))+'\x20→\x20POST\x20/api/env/'+_0x477ae0[_0x351a84(0x3ae)]+'/type/users/query\x0a\x20\x20\x20\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x3c3)],_0x351a84(0x42c))+_0x351a84(0x3b4)+_0x3e99bc(_0x1b25f8[_0x351a84(0x3c3)],_0x351a84(0x1b0))+_0x351a84(0x3b4)+_0x3e99bc(_0x1b25f8[_0x351a84(0x3c3)],_0x351a84(0x28c))+_0x351a84(0x300)+_0x3e99bc(_0x1b25f8['bold'],'\x20\x20Flags')+'\x20\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x468)],'(on\x20any\x20path\x20command)')+_0x351a84(0x46c)+_0x3e99bc(_0x1b25f8[_0x351a84(0x2a8)],_0x351a84(0x2fd))+_0x351a84(0x349)+_0x3e99bc(_0x1b25f8['cyan'],_0x351a84(0x320))+'\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'+_0x3e99bc(_0x1b25f8[_0x351a84(0x468)],_0x351a84(0x1d3))+'\x0a\x20\x20\x20\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x3c3)],_0x351a84(0x21c))+_0x351a84(0x3b4)+_0x3e99bc(_0x1b25f8[_0x351a84(0x3c3)],'type/users/item/alice\x20--env\x20staging')+'\x0a\x20\x20\x20\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x3c3)],_0x351a84(0x1fe))+'\x0a\x0a'+_0x3e99bc(_0x1b25f8[_0x351a84(0x288)],_0x351a84(0x258))+_0x351a84(0x46c)+_0x3e99bc(_0x1b25f8[_0x351a84(0x2a8)],_0x351a84(0x474))+_0x351a84(0x373)+_0x3e99bc(_0x1b25f8['cyan'],_0x351a84(0x3ae))+_0x351a84(0x322)+_0x3e99bc(_0x1b25f8[_0x351a84(0x2a8)],_0x351a84(0x1c6))+'\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x468)],_0x351a84(0x208))+_0x351a84(0x486)+_0x3e99bc(_0x1b25f8[_0x351a84(0x2a8)],'logs')+'\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x468)],_0x351a84(0x1e1))+_0x351a84(0x23c)+_0x3e99bc(_0x1b25f8[_0x351a84(0x2a8)],'open')+_0x351a84(0x427)+_0x3e99bc(_0x1b25f8['cyan'],_0x351a84(0x374))+'\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'+_0x3e99bc(_0x1b25f8[_0x351a84(0x2a8)],'exit')+'\x20'+_0x3e99bc(_0x1b25f8[_0x351a84(0x468)],_0x351a84(0x1c9))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}async function _0x699114(_0x11ea00,_0x5d29dd=0x0){const _0x427476=_0x334571;process[_0x427476(0x24b)]['write']('\x0a'),console[_0x427476(0x3ba)](_0x3e99bc(_0x1b25f8[_0x427476(0x4a2)],_0x427476(0x466)));try{await _0x11ea00['close']();}catch(_0x4d37bc){console[_0x427476(0x20c)](_0x3e99bc(_0x1b25f8[_0x427476(0x1b7)],'\x20\x20'+_0x4d37bc[_0x427476(0x235)]));}process['exit'](_0x5d29dd);}function _0x4b6361(_0x594a6a){const _0x55dee1=_0x334571,_0x12bd1b=_0x594a6a[_0x55dee1(0x3ae)]!==_0x55dee1(0x4bb)?_0x3e99bc(_0x1b25f8[_0x55dee1(0x4a2)],'['+_0x594a6a[_0x55dee1(0x3ae)]+']'):'';return _0x3e99bc(_0x1b25f8[_0x55dee1(0x288)]+_0x1b25f8['cyan'],_0x55dee1(0x2ee))+_0x12bd1b+_0x3e99bc(_0x1b25f8[_0x55dee1(0x3c3)],'>\x20');}const _0x5ed666=new Set([_0x334571(0x316),_0x334571(0x401),_0x334571(0x329),_0x334571(0x3c2),_0x334571(0x1c5)]);async function _0x7a0199(_0x77623,_0x5b4b5a,_0x23c863,_0x34d4d2,_0x1de472,_0x512b71){const _0x594ee9=_0x334571;_0x77623=_0x77623[_0x594ee9(0x397)]();if(!_0x77623||_0x77623[_0x594ee9(0x32d)]('#'))return;const _0x5516bd=_0x5655a3(_0x77623),{flags:_0x249e02,rest:_0x433506}=_0x264abc(_0x5516bd);if(!_0x433506[_0x594ee9(0x2e0)])return;const _0x41b1ce=_0x433506[0x0],_0x19efba=_0x41b1ce[_0x594ee9(0x271)]();if(_0x19efba===_0x594ee9(0x2a9)){if(_0x433506[0x1])_0x1b0af3(_0x5b4b5a,_0x251dd0(_0x433506[0x1],_0x249e02[_0x594ee9(0x3ae)]??_0x1de472['env']));else _0xe26912(_0x1de472);return;}if(_0x19efba===_0x594ee9(0x46b)){const _0x23e34f=_0x433506[0x1];if(!_0x23e34f){console[_0x594ee9(0x3ba)](_0x3e99bc(_0x1b25f8[_0x594ee9(0x1b7)],_0x594ee9(0x21f)));return;}try{_0x5b4b5a[_0x594ee9(0x3ae)](_0x23e34f),_0x1de472[_0x594ee9(0x3ae)]=_0x23e34f,_0x512b71?.[_0x594ee9(0x330)](_0x4b6361(_0x1de472)),console[_0x594ee9(0x3ba)]('\x0a\x20\x20'+_0x3e99bc(_0x1b25f8[_0x594ee9(0x283)],'✓')+_0x594ee9(0x314)+_0x3e99bc(_0x1b25f8[_0x594ee9(0x288)]+_0x1b25f8[_0x594ee9(0x2a8)],_0x23e34f)+'\x0a');}catch{console[_0x594ee9(0x3ba)](_0x594ee9(0x477)+_0x3e99bc(_0x1b25f8[_0x594ee9(0x1b7)],'✗')+_0x594ee9(0x2b1)+_0x3e99bc(_0x1b25f8[_0x594ee9(0x288)],_0x23e34f)+_0x594ee9(0x4ab)+_0x3e99bc(_0x1b25f8[_0x594ee9(0x468)],_0x594ee9(0x2e8)));}return;}if(_0x19efba===_0x594ee9(0x4b2)){const _0x4360d2=[..._0x5b4b5a['_envs']['keys']()][_0x594ee9(0x2c8)](_0x260bab=>!_0x260bab[_0x594ee9(0x32d)]('~'));console[_0x594ee9(0x3ba)]('');for(const _0x1c0627 of _0x4360d2){const _0x3aac4e=_0x1c0627===_0x1de472[_0x594ee9(0x3ae)];console[_0x594ee9(0x3ba)]('\x20\x20'+(_0x3aac4e?_0x3e99bc(_0x1b25f8[_0x594ee9(0x283)],'●'):_0x3e99bc(_0x1b25f8[_0x594ee9(0x468)],'○'))+'\x20\x20'+(_0x3aac4e?_0x3e99bc(_0x1b25f8[_0x594ee9(0x288)]+_0x1b25f8[_0x594ee9(0x2a8)],_0x1c0627):_0x3e99bc(_0x1b25f8[_0x594ee9(0x468)],_0x1c0627)));}console['log'](_0x594ee9(0x477)+_0x3e99bc(_0x1b25f8[_0x594ee9(0x468)],_0x594ee9(0x3f1))+'\x20'+_0x3e99bc(_0x1b25f8[_0x594ee9(0x2a8)],_0x1de472[_0x594ee9(0x3ae)])),console[_0x594ee9(0x3ba)]('');return;}if(_0x19efba===_0x594ee9(0x2c4)){const _0x1955f0=[..._0x5b4b5a[_0x594ee9(0x264)][_0x594ee9(0x230)]()][_0x594ee9(0x2c8)](_0x48100c=>!_0x48100c[_0x594ee9(0x348)]['startsWith']('~'));console[_0x594ee9(0x3ba)]('');const _0x59eaa0=Math[_0x594ee9(0x489)](..._0x1955f0[_0x594ee9(0x2f5)](_0x4da712=>_0x4da712[_0x594ee9(0x348)]['length']));for(const _0x24eb32 of _0x1955f0){const _0x3abe91=_0x24eb32[_0x594ee9(0x348)]===_0x1de472['env'],_0x5a74ab=_0x3abe91?_0x3e99bc(_0x1b25f8['green'],'●'):_0x3e99bc(_0x1b25f8[_0x594ee9(0x468)],'○'),_0x5ac14f=_0x3abe91?_0x3e99bc(_0x1b25f8[_0x594ee9(0x288)]+_0x1b25f8[_0x594ee9(0x2a8)],_0x24eb32[_0x594ee9(0x348)][_0x594ee9(0x1ea)](_0x59eaa0)):_0x3e99bc(_0x1b25f8[_0x594ee9(0x468)],_0x24eb32[_0x594ee9(0x348)][_0x594ee9(0x1ea)](_0x59eaa0)),_0x26d400=[..._0x24eb32['typeSubDbs'][_0x594ee9(0x3e9)]()][_0x594ee9(0x2c8)](_0x3584c2=>!_0x3584c2[_0x594ee9(0x32d)]('~')),_0x4d4c2d=_0x26d400[_0x594ee9(0x2e0)]?_0x3e99bc(_0x1b25f8[_0x594ee9(0x468)],_0x26d400[_0x594ee9(0x345)](0x0,0x5)[_0x594ee9(0x335)](',\x20')+(_0x26d400['length']>0x5?_0x594ee9(0x492)+(_0x26d400[_0x594ee9(0x2e0)]-0x5)+_0x594ee9(0x250):'')):_0x3e99bc(_0x1b25f8[_0x594ee9(0x468)],_0x594ee9(0x415));console[_0x594ee9(0x3ba)]('\x20\x20'+_0x5a74ab+'\x20\x20'+_0x5ac14f+'\x20\x20'+_0x4d4c2d);}console[_0x594ee9(0x3ba)]('');return;}if(_0x19efba==='TYPES'){const _0x29428c=_0x249e02[_0x594ee9(0x3ae)]??_0x433506[0x1]??_0x1de472[_0x594ee9(0x3ae)];try{const _0x3283aa=_0x5b4b5a['env'](_0x29428c),_0x52a9b7=[..._0x3283aa[_0x594ee9(0x3d8)][_0x594ee9(0x3e9)]()][_0x594ee9(0x2c8)](_0x309b0d=>!_0x309b0d['startsWith']('~'))['sort']();console['log'](_0x594ee9(0x477)+_0x3e99bc(_0x1b25f8['dim'],_0x52a9b7['length']+'\x20type'+(_0x52a9b7[_0x594ee9(0x2e0)]!==0x1?'s':'')+_0x594ee9(0x3f3)+_0x29428c));for(const _0x578032 of _0x52a9b7){const _0x2f7f51=_0x3283aa[_0x594ee9(0x3d8)][_0x594ee9(0x3f5)](_0x578032),_0x121016=_0x2f7f51?.['data']?.[_0x594ee9(0x3b6)]?.()??0x0,_0x8793b8=_0x3e99bc(_0x1b25f8[_0x594ee9(0x288)]+_0x1b25f8[_0x594ee9(0x2a8)],_0x578032[_0x594ee9(0x1ea)](0x1c));console[_0x594ee9(0x3ba)](_0x594ee9(0x2ca)+_0x8793b8+'\x20\x20'+_0x3e99bc(_0x1b25f8[_0x594ee9(0x4a1)],String(_0x121016)['padStart'](0x6))+'\x20'+_0x3e99bc(_0x1b25f8[_0x594ee9(0x468)],_0x594ee9(0x3a0)));}console[_0x594ee9(0x3ba)]('');}catch(_0x32acaa){console[_0x594ee9(0x20c)](_0x3e99bc(_0x1b25f8[_0x594ee9(0x1b7)],_0x594ee9(0x477)+_0x32acaa[_0x594ee9(0x235)]+'\x0a'));}return;}if(_0x19efba===_0x594ee9(0x2b0)){_0x4ff991(_0x5b4b5a,_0x433506['slice'](0x1)[_0x594ee9(0x335)]('\x20'));return;}if(_0x19efba==='LOGS'){const _0x57b7f2=(_0x433506[0x1]??'')[_0x594ee9(0x259)]();if(!_0x57b7f2||_0x57b7f2==='on')_0x34d4d2['enabled']=!![],_0x34d4d2['level']=_0x594ee9(0x490),console[_0x594ee9(0x3ba)](_0x594ee9(0x477)+_0x3e99bc(_0x1b25f8[_0x594ee9(0x283)],'✓')+'\x20logs\x20on\x20\x20'+_0x3e99bc(_0x1b25f8['dim'],_0x594ee9(0x2de))+'\x0a');else{if(_0x57b7f2===_0x594ee9(0x3fa))_0x34d4d2['enabled']=![],console[_0x594ee9(0x3ba)]('\x0a\x20\x20'+_0x3e99bc(_0x1b25f8[_0x594ee9(0x4a2)],'○')+_0x594ee9(0x22f));else _0x3aeb1b[_0x57b7f2]!==undefined?(_0x34d4d2[_0x594ee9(0x303)]=!![],_0x34d4d2[_0x594ee9(0x356)]=_0x57b7f2,console[_0x594ee9(0x3ba)](_0x594ee9(0x477)+_0x3e99bc(_0x1b25f8[_0x594ee9(0x283)],'✓')+_0x594ee9(0x44d)+_0x3e99bc(_0x1b25f8['bold'],_0x57b7f2)+'\x0a')):console[_0x594ee9(0x20c)](_0x3e99bc(_0x1b25f8[_0x594ee9(0x1b7)],_0x594ee9(0x204)));}return;}if(_0x19efba===_0x594ee9(0x1be)||_0x19efba===_0x594ee9(0x25e)){await _0x699114(_0x5b4b5a,0x0);return;}if(_0x19efba==='OPEN'){const _0x26a82d=_0x594ee9(0x312)+_0x23c863[_0x594ee9(0x3fc)]+'/admin/index.html',_0x10dc03=process['platform']===_0x594ee9(0x459)?_0x594ee9(0x205)+_0x26a82d:process[_0x594ee9(0x47e)]===_0x594ee9(0x432)?_0x594ee9(0x30e)+_0x26a82d:_0x594ee9(0x4b1)+_0x26a82d;require$$4['exec'](_0x10dc03),console[_0x594ee9(0x3ba)]('\x0a\x20\x20'+_0x3e99bc(_0x1b25f8[_0x594ee9(0x283)],'✓')+_0x594ee9(0x347)+_0x3e99bc(_0x1b25f8[_0x594ee9(0x2a8)],_0x26a82d)+'\x0a');return;}let _0x5e01c1,_0x5c8526,_0x505163;if(_0x5ed666[_0x594ee9(0x363)](_0x19efba)){_0x5e01c1=_0x19efba,_0x5c8526=_0x433506[0x1],_0x505163=_0x433506[_0x594ee9(0x345)](0x2);if(!_0x5c8526){console[_0x594ee9(0x20c)](_0x3e99bc(_0x1b25f8['red'],_0x594ee9(0x398)+_0x41b1ce+_0x594ee9(0x3f0)));return;}}else _0x5e01c1=null,_0x5c8526=_0x433506[0x0],_0x505163=_0x433506[_0x594ee9(0x345)](0x1);const _0x24e7b5=_0x249e02[_0x594ee9(0x3ae)]??_0x1de472[_0x594ee9(0x3ae)],_0x4c6848=_0x251dd0(_0x5c8526,_0x24e7b5);if(_0x249e02[_0x594ee9(0x374)]){_0x1b0af3(_0x5b4b5a,_0x4c6848);return;}let _0x1b2dbd=null;if(_0x505163[_0x594ee9(0x2e0)]){const _0x2895c2=_0x505163[_0x594ee9(0x335)]('\x20');try{_0x1b2dbd=_0x1e199b(_0x2895c2);}catch(_0x5abb25){console[_0x594ee9(0x20c)](_0x3e99bc(_0x1b25f8['red'],_0x594ee9(0x21b)+_0x2895c2+_0x594ee9(0x477)+_0x3e99bc(_0x1b25f8[_0x594ee9(0x468)],_0x5abb25['message'])+'\x0a'));return;}}if(!_0x5e01c1)_0x5e01c1=_0x1b2dbd!==null?'POST':'GET';try{const _0x30e694=await _0x111de1(_0x5b4b5a,_0x5e01c1,_0x4c6848,_0x1b2dbd);_0x33b221(_0x30e694[_0x594ee9(0x323)],_0x30e694['body']);}catch(_0x226f77){console[_0x594ee9(0x20c)](_0x594ee9(0x477)+_0x3e99bc(_0x1b25f8[_0x594ee9(0x1b7)],'✗')+'\x20'+_0x226f77[_0x594ee9(0x235)]+'\x0a');}}class _0x1669a6{constructor(){const _0x112f99=_0x334571;this[_0x112f99(0x424)]=new Map(),this[_0x112f99(0x3a1)]=null,this[_0x112f99(0x410)]=![];}}function _0x5013e4(_0x50b8bd){const _0x26acaf=_0x334571,_0x42b2ae=new _0x1669a6();for(const _0x3f038d of _0x50b8bd){if(_0x3f038d[_0x26acaf(0x3ce)]?.[_0x26acaf(0x2aa)])continue;const _0x492cb5=_0x3f038d['path']['replace'](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')[_0x26acaf(0x1d5)](/^\//,'');if(!_0x492cb5)continue;let _0x311226=_0x42b2ae;for(const _0x4dc38a of _0x492cb5['split']('/')['filter'](Boolean)){if(_0x4dc38a[_0x26acaf(0x32d)](':')){const _0x49b8f5=_0x4dc38a[_0x26acaf(0x345)](0x1);if(!_0x311226[_0x26acaf(0x3a1)])_0x311226[_0x26acaf(0x3a1)]={'param':_0x49b8f5,'node':new _0x1669a6()};_0x311226=_0x311226[_0x26acaf(0x3a1)][_0x26acaf(0x439)];}else{if(!_0x311226[_0x26acaf(0x424)][_0x26acaf(0x363)](_0x4dc38a))_0x311226[_0x26acaf(0x424)][_0x26acaf(0x46f)](_0x4dc38a,new _0x1669a6());_0x311226=_0x311226['children'][_0x26acaf(0x3f5)](_0x4dc38a);}}_0x311226[_0x26acaf(0x410)]=!![];}return _0x42b2ae;}const _0x10a7f5=new Map();function _0x187d93(_0x507b70,_0x245693,_0x315337){const _0x4f3d06=_0x334571,_0x201db7=_0x10a7f5['get'](_0x507b70);if(_0x201db7&&_0x201db7[_0x4f3d06(0x3a5)]>Date['now']())return _0x201db7['val'];const _0x33b845=_0x315337();return _0x10a7f5[_0x4f3d06(0x46f)](_0x507b70,{'val':_0x33b845,'exp':Date[_0x4f3d06(0x379)]()+_0x245693}),_0x33b845;}function _0x55bff0(_0x326432,_0x5b31d7,_0x18ec4a,_0x496086){const _0x324887=_0x334571,_0x3234ab=_0x5b31d7[_0x324887(0x3ae)]??_0x496086[_0x324887(0x3ae)];switch(_0x326432){case'env':return[..._0x18ec4a[_0x324887(0x264)][_0x324887(0x3e9)]()][_0x324887(0x2c8)](_0x4f7158=>!_0x4f7158[_0x324887(0x32d)]('~'));case _0x324887(0x1cd):return _0x187d93('types:'+_0x3234ab,0x7d0,()=>{const _0x4bcba7=_0x324887;try{return[..._0x18ec4a[_0x4bcba7(0x3ae)](_0x3234ab)[_0x4bcba7(0x3d8)]['keys']()][_0x4bcba7(0x2c8)](_0xfeb246=>!_0xfeb246[_0x4bcba7(0x32d)]('~'));}catch{return[];}});case _0x324887(0x2d1):if(!_0x5b31d7[_0x324887(0x1cd)])return[];return _0x187d93(_0x324887(0x3e8)+_0x3234ab+':'+_0x5b31d7['type'],0x5dc,()=>{const _0x1fe971=_0x324887;try{const _0x130155=_0x18ec4a[_0x1fe971(0x3ae)](_0x3234ab)[_0x1fe971(0x3d8)][_0x1fe971(0x3f5)](_0x5b31d7['type']);if(!_0x130155?.[_0x1fe971(0x343)])return[];const _0x274d1e=[];for(const {key:_0xcd7617}of _0x130155[_0x1fe971(0x343)][_0x1fe971(0x413)]({'limit':0x32})){_0x274d1e[_0x1fe971(0x225)](String(_0xcd7617));if(_0x274d1e[_0x1fe971(0x2e0)]>=0x32)break;}return _0x274d1e;}catch{return[];}});case _0x324887(0x45b):if(!_0x5b31d7['type'])return[];return _0x187d93(_0x324887(0x309)+_0x3234ab+':'+_0x5b31d7[_0x324887(0x1cd)],0x7d0,()=>{const _0x313c54=_0x324887;try{const _0x568020=_0x18ec4a[_0x313c54(0x3ae)](_0x3234ab)[_0x313c54(0x3d8)][_0x313c54(0x3f5)](_0x5b31d7[_0x313c54(0x1cd)]);return _0x568020?[..._0x568020[_0x313c54(0x27b)]?.['keys']()??[]]:[];}catch{return[];}});case'ftsName':if(!_0x5b31d7[_0x324887(0x1cd)])return[];return _0x187d93(_0x324887(0x48e)+_0x3234ab+':'+_0x5b31d7[_0x324887(0x1cd)],0x7d0,()=>{const _0x41385c=_0x324887;try{return _0x18ec4a[_0x41385c(0x381)]?.[_0x41385c(0x376)]?.(_0x5b31d7[_0x41385c(0x1cd)],_0x18ec4a[_0x41385c(0x3ae)](_0x3234ab))?.['map'](_0x394aa9=>_0x394aa9[_0x41385c(0x348)])??[];}catch{return[];}});default:return[];}}function _0x119a42(_0x11ff41,_0x1935bd,_0x3208a2,_0x1ac132){const _0x4c6516=_0x334571,_0x1cd1c7=_0x11ff41[_0x4c6516(0x3dc)]('/'),_0x23cfde=_0x11ff41['split']('/'),_0x1ad1fd=_0x1cd1c7?_0x23cfde['slice'](0x0,-0x1):_0x23cfde[_0x4c6516(0x345)](0x0,-0x1),_0xb18d94=_0x1cd1c7?'':_0x23cfde[_0x23cfde['length']-0x1];let _0x5b826f=_0x1935bd;const _0x5c1cd5={};for(const _0x986c14 of _0x1ad1fd){if(!_0x986c14)continue;if(_0x5b826f['children'][_0x4c6516(0x363)](_0x986c14))_0x5b826f=_0x5b826f[_0x4c6516(0x424)]['get'](_0x986c14);else{if(_0x5b826f['dynamic'])_0x5c1cd5[_0x5b826f[_0x4c6516(0x3a1)][_0x4c6516(0x423)]]=_0x986c14,_0x5b826f=_0x5b826f[_0x4c6516(0x3a1)][_0x4c6516(0x439)];else return[];}}const _0x43a252=_0x1ad1fd[_0x4c6516(0x2c8)](Boolean),_0x4b63b8=_0x43a252[_0x4c6516(0x2e0)]?_0x43a252['join']('/')+'/':'',_0x22e9b1=[];for(const [_0x272492]of _0x5b826f[_0x4c6516(0x424)]){if(_0x272492[_0x4c6516(0x32d)](_0xb18d94))_0x22e9b1['push'](_0x4b63b8+_0x272492);}if(_0x5b826f[_0x4c6516(0x3a1)])for(const _0x636ea1 of _0x55bff0(_0x5b826f[_0x4c6516(0x3a1)]['param'],_0x5c1cd5,_0x3208a2,_0x1ac132)){if(String(_0x636ea1)[_0x4c6516(0x32d)](_0xb18d94))_0x22e9b1[_0x4c6516(0x225)](_0x4b63b8+_0x636ea1);}return _0x22e9b1[_0x4c6516(0x345)](0x0,0x64);}const _0x26b611=[_0x334571(0x374),_0x334571(0x21a),_0x334571(0x3ae),_0x334571(0x2c2),_0x334571(0x34d),_0x334571(0x1c6),_0x334571(0x344),_0x334571(0x277),_0x334571(0x1b3),'quit'];function _0x16e61a(_0x4dfadf,_0x48bc08,_0x4c7f63){return function _0x3f0a6d(_0x4428a1){const _0x52c9fb=_0x5045;try{const _0x3262c1=_0x4428a1[_0x52c9fb(0x40e)](/\s[{[]/),_0x59626c=_0x3262c1>=0x0?_0x4428a1['slice'](0x0,_0x3262c1):_0x4428a1,_0x585dfd=_0x59626c['trimStart']();if(!_0x585dfd){const _0x4e6676=[..._0x26b611,...[..._0x4dfadf[_0x52c9fb(0x424)][_0x52c9fb(0x3e9)]()]][_0x52c9fb(0x345)](0x0,0x64);return[_0x4e6676,''];}const _0x132d76=_0x585dfd[_0x52c9fb(0x4a4)](/\s+/),_0x15e6f9=_0x132d76[0x0],_0x1934da=_0x15e6f9[_0x52c9fb(0x271)]();if(_0x132d76[_0x52c9fb(0x2e0)]===0x1){const _0x4ae975=_0x15e6f9['toLowerCase'](),_0x3be604=_0x26b611[_0x52c9fb(0x2c8)](_0x2ba245=>_0x2ba245['startsWith'](_0x4ae975)),_0x158910=_0x119a42(_0x15e6f9,_0x4dfadf,_0x48bc08,_0x4c7f63),_0x3eb543=[...new Set([..._0x3be604,..._0x158910])][_0x52c9fb(0x345)](0x0,0x64);return[_0x3eb543,_0x15e6f9];}if(_0x5ed666['has'](_0x1934da)&&_0x132d76['length']===0x2){const _0xba815a=_0x132d76[0x1],_0xbdca9c=_0x119a42(_0xba815a,_0x4dfadf,_0x48bc08,_0x4c7f63);return[_0xbdca9c[_0x52c9fb(0x2f5)](_0x40c543=>_0x15e6f9+'\x20'+_0x40c543),_0x15e6f9+'\x20'+_0xba815a];}if(!_0x5ed666[_0x52c9fb(0x363)](_0x1934da)&&_0x132d76[_0x52c9fb(0x2e0)]>0x1){const _0x46c893=_0x119a42(_0x15e6f9,_0x4dfadf,_0x48bc08,_0x4c7f63),_0x164cf1='\x20'+_0x132d76[_0x52c9fb(0x345)](0x1)['join']('\x20');return[_0x46c893[_0x52c9fb(0x2f5)](_0x2e1185=>_0x2e1185+_0x164cf1),_0x15e6f9+_0x164cf1];}return[[],_0x4428a1];}catch{return[[],_0x4428a1];}};}async function _0x48773f(_0x1355d6,_0x4e8c93){const _0x49d7b9=_0x334571,_0x21aeca={'enabled':!![],'level':_0x4e8c93['logLevel']??_0x49d7b9(0x490)},_0x2ec3e0={'env':_0x49d7b9(0x4bb)},_0x2b6d16={'current':null},_0x3f4a48=_0x5013e4(_0x1355d6['http']['listRoutes']()),_0x170376=_0x16e61a(_0x3f4a48,_0x1355d6,_0x2ec3e0);_0x1355d6[_0x49d7b9(0x3ba)]['attach'](_0x49173a=>{const _0xba7d7d=_0x49d7b9;if(!_0x21aeca[_0xba7d7d(0x303)])return;_0x3867b6(_0x49173a,_0x21aeca[_0xba7d7d(0x356)]),_0x2b6d16[_0xba7d7d(0x4b6)]?.[_0xba7d7d(0x280)](!![]);}),_0x33b16f(_0x1355d6,_0x4e8c93);const _0x56b45d=_0x3f5403[_0x49d7b9(0x22d)]({'input':process[_0x49d7b9(0x458)],'output':process[_0x49d7b9(0x24b)],'terminal':!![],'completer':_0x170376,'prompt':_0x4b6361(_0x2ec3e0),'historySize':_0x22d916});try{const _0xcce523=_0x3cd45f['readFileSync'](_0x529dca,'utf8')[_0x49d7b9(0x4a4)]('\x0a')['filter'](Boolean);_0x56b45d[_0x49d7b9(0x2b9)]=_0xcce523['reverse']()[_0x49d7b9(0x345)](0x0,_0x22d916);}catch{}return _0x2b6d16[_0x49d7b9(0x4b6)]=_0x56b45d,_0x56b45d['on'](_0x49d7b9(0x3b2),async _0x5d01f3=>{const _0xa0bbd8=_0x49d7b9;_0x56b45d[_0xa0bbd8(0x355)]();try{await _0x7a0199(_0x5d01f3,_0x1355d6,_0x4e8c93,_0x21aeca,_0x2ec3e0,_0x56b45d);}catch(_0x67375a){console[_0xa0bbd8(0x20c)](_0x3e99bc(_0x1b25f8['red'],_0xa0bbd8(0x1f6)+_0x67375a['message']));}finally{_0x56b45d[_0xa0bbd8(0x41a)](),_0x56b45d['prompt']();}}),_0x56b45d['on'](_0x49d7b9(0x35f),()=>{const _0x191efa=_0x49d7b9;try{const _0x2ccd29=[..._0x56b45d[_0x191efa(0x2b9)]]['reverse']()['filter'](Boolean)['slice'](0x0,_0x22d916);_0x3cd45f['writeFileSync'](_0x529dca,_0x2ccd29[_0x191efa(0x335)]('\x0a')+'\x0a');}catch{}_0x699114(_0x1355d6,0x0);}),process['on']('SIGINT',()=>{const _0xa428e=_0x49d7b9;if(_0x56b45d[_0xa428e(0x3b2)]==='')_0x699114(_0x1355d6,0x0);else process[_0xa428e(0x24b)]['write']('\x0a'),_0x56b45d[_0xa428e(0x464)](0x0),_0x56b45d[_0xa428e(0x280)]();}),process['on']('SIGTERM',()=>_0x699114(_0x1355d6,0x0)),_0x56b45d[_0x49d7b9(0x280)](),_0x56b45d;}return okdbShell={'start':_0x48773f,'colorLog':_0x3867b6,'lenientParse':_0x1e199b,'_splitLine':_0x5655a3,'_formatRouteHelpLines':_0x16fd7d,'_routeSummary':_0x306eaa,'_routeTags':_0x4b2eec},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x13f85c=_0x22e4e2;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x13f85c(0x24e)]();}catch{}const _0x346e57=require$$1$1,_0x55fc02=require$$1;function _0x4070d0(_0x94f778){const _0x106d32=_0x13f85c,_0x194caa=_0x94f778['slice'](0x2),_0x32f53e={};let _0xa3bc7c=0x0;while(_0xa3bc7c<_0x194caa[_0x106d32(0x2e0)]){const _0x2c09fb=_0x194caa[_0xa3bc7c];if(_0x2c09fb===_0x106d32(0x1f9)||_0x2c09fb==='-p')_0x32f53e['port']=Number(_0x194caa[++_0xa3bc7c]);else{if(_0x2c09fb===_0x106d32(0x279)||_0x2c09fb==='-d')_0x32f53e[_0x106d32(0x41b)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb==='--key'||_0x2c09fb==='-k')_0x32f53e[_0x106d32(0x2d1)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb===_0x106d32(0x2a2)||_0x2c09fb==='-c')_0x32f53e[_0x106d32(0x32e)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb===_0x106d32(0x417))_0x32f53e[_0x106d32(0x4a5)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb===_0x106d32(0x238))_0x32f53e[_0x106d32(0x31c)]=!![];else{if(_0x2c09fb===_0x106d32(0x1ba))_0x32f53e[_0x106d32(0x377)]=!![];else{if(_0x2c09fb==='--env'||_0x2c09fb==='-e')_0x32f53e[_0x106d32(0x3ae)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb===_0x106d32(0x4af))_0x32f53e[_0x106d32(0x34d)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb===_0x106d32(0x3df))_0x32f53e[_0x106d32(0x4ad)]=!![];else{if(_0x2c09fb===_0x106d32(0x1de))_0x32f53e['blobs']=!![];else{if(_0x2c09fb===_0x106d32(0x2e5))_0x32f53e[_0x106d32(0x37c)]=!![];else{if(_0x2c09fb===_0x106d32(0x334)){const _0x4bd40c=[];while(_0xa3bc7c+0x1<_0x194caa[_0x106d32(0x2e0)]&&!_0x194caa[_0xa3bc7c+0x1][_0x106d32(0x32d)]('--')){_0x4bd40c[_0x106d32(0x225)](_0x194caa[++_0xa3bc7c]);}_0x32f53e['open']=_0x4bd40c['length']>0x0?_0x4bd40c:!![];}else{if(_0x2c09fb==='--log-requests')_0x32f53e['logRequests']=!![];else{if(_0x2c09fb===_0x106d32(0x36c))_0x32f53e[_0x106d32(0x348)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb==='--password')_0x32f53e[_0x106d32(0x368)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb===_0x106d32(0x35b))_0x32f53e[_0x106d32(0x2d3)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb===_0x106d32(0x3e3))_0x32f53e[_0x106d32(0x276)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb===_0x106d32(0x1f8))_0x32f53e[_0x106d32(0x342)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb===_0x106d32(0x4ae))_0x32f53e[_0x106d32(0x242)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb==='--token')_0x32f53e[_0x106d32(0x35e)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb==='--username'||_0x2c09fb==='-u')_0x32f53e[_0x106d32(0x262)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb===_0x106d32(0x430))_0x32f53e[_0x106d32(0x290)]=_0x194caa[++_0xa3bc7c];else{if(_0x2c09fb===_0x106d32(0x39f)||_0x2c09fb==='-v'){const _0x397fc1=require$$2;console[_0x106d32(0x3ba)](_0x397fc1[_0x106d32(0x1f4)]),process[_0x106d32(0x1b3)](0x0);}else(_0x2c09fb===_0x106d32(0x320)||_0x2c09fb==='-h')&&(_0x54ba8e(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0xa3bc7c++;}return _0x32f53e;}function _0x54ba8e(){const _0x283355=_0x13f85c;console[_0x283355(0x3ba)]('\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');}const _0x355817=new Set([_0x13f85c(0x2db),_0x13f85c(0x490),_0x13f85c(0x45a),_0x13f85c(0x20c)]);function _0x34a48f(_0x4a87c3){const _0x42604b=_0x13f85c,_0x40ca29=_0x4a87c3[_0x42604b(0x32e)]?_0x346e57[_0x42604b(0x1dc)](_0x4a87c3[_0x42604b(0x32e)]):_0x346e57[_0x42604b(0x1dc)](_0x42604b(0x285));let _0x977bb4={};if(_0x55fc02[_0x42604b(0x3cd)](_0x40ca29))try{const _0xae05c8=_0x55fc02['readFileSync'](_0x40ca29,_0x42604b(0x227))[_0x42604b(0x1d5)](/^\uFEFF/,'');_0x977bb4=JSON[_0x42604b(0x3ec)](_0xae05c8),console[_0x42604b(0x3ba)](_0x42604b(0x22a)+_0x40ca29);}catch(_0xc08620){console[_0x42604b(0x20c)](_0x42604b(0x295)+_0x40ca29+':\x20'+_0xc08620[_0x42604b(0x235)]),process['exit'](0x1);}const _0x225799={'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},_0x1a849c={'port':_0x4a87c3[_0x42604b(0x3fc)]??_0x977bb4[_0x42604b(0x3fc)]??_0x225799[_0x42604b(0x3fc)]??0x2124,'dbPath':_0x4a87c3[_0x42604b(0x41b)]??_0x977bb4[_0x42604b(0x41b)]??_0x225799[_0x42604b(0x41b)]??_0x42604b(0x2ec),'key':_0x4a87c3[_0x42604b(0x2d1)]??_0x977bb4[_0x42604b(0x2d1)]??_0x225799[_0x42604b(0x2d1)]??undefined,'logLevel':_0x4a87c3['logLevel']??_0x977bb4[_0x42604b(0x4a5)]??_0x225799[_0x42604b(0x4a5)]??_0x42604b(0x490),'noRepl':_0x4a87c3['noRepl']??_0x977bb4[_0x42604b(0x31c)]??_0x225799['noRepl']??![],'noAdmin':_0x4a87c3[_0x42604b(0x377)]??_0x977bb4[_0x42604b(0x377)]??_0x225799['noAdmin']??![],'admin':_0x977bb4[_0x42604b(0x493)]??{},'api':_0x977bb4['api']??undefined,'auth':_0x977bb4['auth']??undefined,'mcp':_0x977bb4['mcp']??undefined,'timeMachine':_0x977bb4[_0x42604b(0x331)]!==![]?_0x977bb4[_0x42604b(0x331)]??{}:![]};return _0x4a87c3[_0x42604b(0x277)]!==undefined&&(_0x1a849c['auth']=_0x1a849c['auth']||{},_0x1a849c[_0x42604b(0x1e7)][_0x42604b(0x277)]=_0x4a87c3['open']),_0x4a87c3[_0x42604b(0x346)]&&(_0x1a849c['debug']=_0x1a849c[_0x42604b(0x2db)]||{},_0x1a849c[_0x42604b(0x2db)][_0x42604b(0x346)]=!![]),(!Number['isInteger'](_0x1a849c[_0x42604b(0x3fc)])||_0x1a849c[_0x42604b(0x3fc)]<0x1||_0x1a849c[_0x42604b(0x3fc)]>0xffff)&&(console[_0x42604b(0x20c)](_0x42604b(0x473)+_0x1a849c['port']+_0x42604b(0x3ea)),process[_0x42604b(0x1b3)](0x1)),!_0x355817[_0x42604b(0x363)](_0x1a849c[_0x42604b(0x4a5)])&&(console[_0x42604b(0x20c)](_0x42604b(0x1b1)+_0x1a849c[_0x42604b(0x4a5)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process['exit'](0x1)),_0x1a849c;}function _0x303997(_0x32176b){const _0x11cfc3=_0x13f85c;return!!(_0x32176b&&typeof _0x32176b===_0x11cfc3(0x3e2)&&!Array[_0x11cfc3(0x495)](_0x32176b)&&Object['keys'](_0x32176b)[_0x11cfc3(0x2e0)]>0x0);}const _0x484952=!process[_0x13f85c(0x24b)][_0x13f85c(0x27e)]||!!process.env.NO_COLOR;function _0x3ddf1d(_0x10776a,_0x157a49){return _0x484952?_0x157a49:'\x1b['+_0x10776a+'m'+_0x157a49+'\x1b[0m';}function _0x3cc78a(_0x101ac6){const _0x1c0d14=_0x13f85c;if(!_0x101ac6||_0x101ac6[_0x1c0d14(0x2e0)]===0x0)return;const _0x531459='─'[_0x1c0d14(0x307)](0x38);process[_0x1c0d14(0x24f)]['write']('\x0a'),process[_0x1c0d14(0x24f)]['write'](_0x3ddf1d('33',_0x1c0d14(0x2fe)+_0x101ac6[_0x1c0d14(0x2e0)]+_0x1c0d14(0x437)+(_0x101ac6[_0x1c0d14(0x2e0)]>0x1?'S':'')+'\x0a')),process[_0x1c0d14(0x24f)][_0x1c0d14(0x30d)]('\x20\x20'+_0x531459+'\x0a');for(const _0x5254a3 of _0x101ac6){const _0x39221c=_0x5254a3[_0x1c0d14(0x356)]===_0x1c0d14(0x20c)?_0x3ddf1d('31',_0x1c0d14(0x249)):_0x3ddf1d('33',_0x1c0d14(0x36b));process['stderr'][_0x1c0d14(0x30d)](_0x39221c+'\x20\x20'+_0x3ddf1d('1',_0x5254a3[_0x1c0d14(0x218)])+'\x0a'),process['stderr'][_0x1c0d14(0x30d)]('\x20\x20\x20\x20\x20\x20\x20'+_0x5254a3[_0x1c0d14(0x235)]+'\x0a');if(_0x5254a3['hint'])process[_0x1c0d14(0x24f)][_0x1c0d14(0x30d)](_0x1c0d14(0x1d4)+_0x3ddf1d('2','Hint:\x20'+_0x5254a3[_0x1c0d14(0x261)])+'\x0a');process[_0x1c0d14(0x24f)][_0x1c0d14(0x30d)]('\x0a');}process['stderr']['write']('\x20\x20'+_0x531459+'\x0a\x0a');}function _0x174809(_0x18bcfc,_0x1254f9){const _0xfc1d0e=_0x13f85c,_0xb4b2b7=_0x18bcfc[_0xfc1d0e(0x3c5)]['listen'](_0x1254f9);return new Promise((_0x1dbb07,_0x4fea84)=>{const _0x1c33c0=_0xfc1d0e;_0xb4b2b7[_0x1c33c0(0x39e)]('listening',_0x1dbb07),_0xb4b2b7[_0x1c33c0(0x39e)]('error',_0x4fea84);});}async function _0x297d5d(_0x3515e4){const _0x1d93a5=_0x13f85c,_0x5578d1=require$$3;console[_0x1d93a5(0x3ba)]('\x0a\x20\x20okdb\x20doctor\x0a');let _0x1e06ff=!![];const _0x536bb4=(_0x5e568d,_0x7098ff)=>{const _0x50e47b=_0x1d93a5;console[_0x50e47b(0x3ba)]('\x20\x20'+(_0x5e568d?'✓':'✗')+'\x20'+_0x7098ff);if(!_0x5e568d)_0x1e06ff=![];},_0x1346e6=Number(process[_0x1d93a5(0x1f4)]['replace']('v','')[_0x1d93a5(0x4a4)]('.')[0x0]);_0x536bb4(_0x1346e6>=0x12,_0x1d93a5(0x1fc)+process['version']+(_0x1346e6<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0x5f259a=_0x346e57[_0x1d93a5(0x1dc)](_0x3515e4[_0x1d93a5(0x364)]);try{_0x55fc02['mkdirSync'](_0x5f259a,{'recursive':!![]});const _0x59e5d4=_0x346e57['join'](_0x5f259a,_0x1d93a5(0x2d0));_0x55fc02['writeFileSync'](_0x59e5d4,''),_0x55fc02[_0x1d93a5(0x469)](_0x59e5d4),_0x536bb4(!![],'database\x20path\x20writable:\x20'+_0x5f259a);}catch(_0x56e8d2){_0x536bb4(![],_0x1d93a5(0x33a)+_0x5f259a+_0x1d93a5(0x3d0)+_0x56e8d2[_0x1d93a5(0x235)]+')');}const _0x32e774=await new Promise(_0x22561b=>{const _0x35a91a=_0x1d93a5,_0x1d4056=_0x5578d1[_0x35a91a(0x209)]();_0x1d4056[_0x35a91a(0x39e)](_0x35a91a(0x20c),()=>_0x22561b(![])),_0x1d4056['once'](_0x35a91a(0x1f2),()=>{const _0x238bbf=_0x35a91a;_0x1d4056[_0x238bbf(0x35f)](),_0x22561b(!![]);}),_0x1d4056[_0x35a91a(0x29a)](_0x3515e4[_0x35a91a(0x3fc)],_0x35a91a(0x457));});_0x536bb4(_0x32e774,_0x1d93a5(0x336)+_0x3515e4[_0x1d93a5(0x3fc)]+'\x20'+(_0x32e774?_0x1d93a5(0x1ed):_0x1d93a5(0x3f2)));const _0xc5ae1a=_0x346e57['resolve'](_0x1d93a5(0x285));if(_0x55fc02[_0x1d93a5(0x3cd)](_0xc5ae1a))try{JSON[_0x1d93a5(0x3ec)](_0x55fc02[_0x1d93a5(0x2b3)](_0xc5ae1a,_0x1d93a5(0x227))[_0x1d93a5(0x1d5)](/^\uFEFF/,'')),_0x536bb4(!![],_0x1d93a5(0x32f)+_0xc5ae1a);}catch(_0x20cfbc){_0x536bb4(![],'config\x20file\x20invalid:\x20'+_0x20cfbc['message']);}else _0x536bb4(!![],_0x1d93a5(0x1ec));console['log'](''),_0x1e06ff?console[_0x1d93a5(0x3ba)](_0x1d93a5(0x2bd)):(console[_0x1d93a5(0x3ba)]('\x20\x20Some\x20checks\x20failed.\x0a'),process[_0x1d93a5(0x1b3)](0x1));}async function _0x12f443(){const _0x65bdfa=_0x13f85c,_0x23e154=_0x346e57[_0x65bdfa(0x1dc)](_0x65bdfa(0x285));!_0x55fc02[_0x65bdfa(0x3cd)](_0x23e154)?(_0x55fc02['writeFileSync'](_0x23e154,JSON['stringify']({'port':0x2124,'path':_0x65bdfa(0x2ec),'logLevel':_0x65bdfa(0x490),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x65bdfa(0x3ba)]('[okdb]\x20created\x20.kdbconfig')):console['log']('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x142d92=_0x346e57['resolve'](_0x65bdfa(0x2ec));!_0x55fc02[_0x65bdfa(0x3cd)](_0x142d92)?(_0x55fc02[_0x65bdfa(0x4ba)](_0x142d92,{'recursive':!![]}),console[_0x65bdfa(0x3ba)](_0x65bdfa(0x2d8))):console[_0x65bdfa(0x3ba)](_0x65bdfa(0x25b)),console[_0x65bdfa(0x3ba)](_0x65bdfa(0x2d5));}async function _0x4c5a47(_0x206f2d){const _0x21c2f1=_0x13f85c,_0x3727dd=_0x346e57[_0x21c2f1(0x1dc)](_0x206f2d[_0x21c2f1(0x364)]);if(!_0x55fc02[_0x21c2f1(0x3cd)](_0x3727dd)){console[_0x21c2f1(0x3ba)](_0x21c2f1(0x1fa)+_0x3727dd+_0x21c2f1(0x463));return;}const _0x59171f=require$$0$2,_0xcf0e08=_0x59171f[_0x21c2f1(0x22d)]({'input':process['stdin'],'output':process[_0x21c2f1(0x24b)]}),_0x59de71=await new Promise(_0x4f0e3a=>_0xcf0e08['question']('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x3727dd+_0x21c2f1(0x20a),_0x4f0e3a));_0xcf0e08[_0x21c2f1(0x35f)](),console['log']('');if(_0x59de71[_0x21c2f1(0x397)]()[_0x21c2f1(0x259)]()!==_0x21c2f1(0x305)){console[_0x21c2f1(0x3ba)](_0x21c2f1(0x325));return;}_0x55fc02[_0x21c2f1(0x253)](_0x3727dd,{'recursive':!![],'force':!![]}),console[_0x21c2f1(0x3ba)](_0x21c2f1(0x470)+_0x3727dd+'\x20deleted');}async function _0x20d95d(_0x1db5d0,_0x31719e){const _0x3b1e09=_0x13f85c,_0x5523a4=require$$5,_0x11b5ce=_0x346e57[_0x3b1e09(0x1dc)](_0x31719e[_0x3b1e09(0x364)]);console['log'](_0x3b1e09(0x408)+_0x11b5ce+'…');const _0x339027=new _0x5523a4(_0x11b5ce,_0x31719e[_0x3b1e09(0x2d1)]?{'encryptionKey':_0x31719e['key']}:{});await _0x339027[_0x3b1e09(0x277)](),console[_0x3b1e09(0x3ba)](_0x3b1e09(0x485)+_0x1db5d0+'…');const {envs:_0x7e3871}=await _0x339027[_0x3b1e09(0x3af)]['backup'](_0x1db5d0);for(const _0x3227d7 of _0x7e3871){const _0x1676eb=_0x3227d7['sizeBefore']>0x0?'\x20\x20('+(_0x3227d7['sizeBefore']/0x400/0x400)[_0x3b1e09(0x359)](0x2)+_0x3b1e09(0x226)+(_0x3227d7[_0x3b1e09(0x215)]/0x400/0x400)[_0x3b1e09(0x359)](0x2)+_0x3b1e09(0x40f):'';console[_0x3b1e09(0x3ba)](_0x3b1e09(0x28e)+_0x3227d7[_0x3b1e09(0x348)]+_0x3b1e09(0x3d7)+_0x3227d7[_0x3b1e09(0x33d)]+_0x1676eb);}await _0x339027[_0x3b1e09(0x35f)](),console['log'](_0x3b1e09(0x460));}async function _0x2edd5d(_0x456bd7,_0x5dd4f0,_0x71ced2){const _0x2e1374=_0x13f85c,_0x537344=require$$5,_0x1b6f83=_0x346e57[_0x2e1374(0x1dc)](_0x5dd4f0['dbPath']),_0x57fcd5=_0x71ced2[_0x2e1374(0x3ae)]??_0x2e1374(0x4bb),_0x44bdba=_0x71ced2['types']?_0x71ced2[_0x2e1374(0x34d)][_0x2e1374(0x4a4)](',')[_0x2e1374(0x2f5)](_0x5b1788=>_0x5b1788[_0x2e1374(0x397)]()):null;console[_0x2e1374(0x3ba)](_0x2e1374(0x408)+_0x1b6f83+'…');const _0x53eab3=new _0x537344(_0x1b6f83,_0x5dd4f0[_0x2e1374(0x2d1)]?{'encryptionKey':_0x5dd4f0[_0x2e1374(0x2d1)]}:{});await _0x53eab3[_0x2e1374(0x277)](),console[_0x2e1374(0x3ba)]('[okdb]\x20exporting\x20env\x20\x22'+_0x57fcd5+_0x2e1374(0x25a)+_0x456bd7+'…');const _0xa96a2d=await _0x53eab3['migrate'][_0x2e1374(0x405)](_0x456bd7,{'envName':_0x57fcd5,'types':_0x44bdba,'includeChanges':!!_0x71ced2[_0x2e1374(0x4ad)]});console[_0x2e1374(0x3ba)](_0x2e1374(0x497)+_0xa96a2d['types']+_0x2e1374(0x49f)+_0xa96a2d[_0x2e1374(0x3a0)]+_0x2e1374(0x2a5)+_0xa96a2d[_0x2e1374(0x4ad)]);if(_0x71ced2[_0x2e1374(0x4b3)]){const _0x5b4605=_0x346e57['join'](_0x346e57[_0x2e1374(0x2f4)](_0x456bd7),_0x2e1374(0x4b3));process['stdout'][_0x2e1374(0x30d)]('[okdb]\x20exporting\x20blobs…');const {count:_0x27f8ed,bytes:_0xd27ccf}=await _0x53eab3[_0x2e1374(0x3af)][_0x2e1374(0x2e7)](_0x5b4605);console[_0x2e1374(0x3ba)](_0x2e1374(0x480)+_0x5b4605+'\x20\x20('+_0x27f8ed+_0x2e1374(0x3fb)+(_0x27f8ed!==0x1?'s':'')+',\x20'+(_0xd27ccf/0x400/0x400)[_0x2e1374(0x359)](0x2)+_0x2e1374(0x40f));}await _0x53eab3[_0x2e1374(0x35f)](),console[_0x2e1374(0x3ba)](_0x2e1374(0x1e9));}async function _0x53553b(_0x567d08,_0x3227f8,_0x1f48d0){const _0xc6161a=_0x13f85c,_0x21efd2=require$$5,_0x12495c=_0x346e57[_0xc6161a(0x1dc)](_0x3227f8[_0xc6161a(0x364)]),_0x5c2dc8=_0x1f48d0[_0xc6161a(0x3ae)]??null,_0x525d27=_0x1f48d0[_0xc6161a(0x34d)]?_0x1f48d0[_0xc6161a(0x34d)][_0xc6161a(0x4a4)](',')[_0xc6161a(0x2f5)](_0x9187b5=>_0x9187b5['trim']()):null,_0x269535=!!_0x1f48d0[_0xc6161a(0x37c)];console['log']('[okdb]\x20opening\x20'+_0x12495c+'…');const _0x5cb0c7=new _0x21efd2(_0x12495c,_0x3227f8[_0xc6161a(0x2d1)]?{'encryptionKey':_0x3227f8[_0xc6161a(0x2d1)]}:{});await _0x5cb0c7['open'](),console[_0xc6161a(0x3ba)]('[okdb]\x20importing\x20'+_0x567d08+'…');const _0x54bbf3=await _0x5cb0c7[_0xc6161a(0x3af)][_0xc6161a(0x481)](_0x567d08,{'envName':_0x5c2dc8,'types':_0x525d27,'dropExisting':_0x269535,'includeChanges':!!_0x1f48d0[_0xc6161a(0x4ad)],'onProgress':({type:_0x11ec7f,count:_0x416cd4})=>{const _0x5ccf9a=_0xc6161a;process['stdout']['write'](_0x5ccf9a(0x23f)+_0x11ec7f+':\x20'+_0x416cd4+_0x5ccf9a(0x42b));}});process[_0xc6161a(0x24b)]['write']('\x0a'),console[_0xc6161a(0x3ba)](_0xc6161a(0x32c)+_0x54bbf3[_0xc6161a(0x34d)]+'\x20\x20records='+_0x54bbf3[_0xc6161a(0x3a0)]+_0xc6161a(0x2a5)+_0x54bbf3[_0xc6161a(0x4ad)]);if(_0x1f48d0[_0xc6161a(0x4b3)]){const _0x1f61e4=_0x346e57[_0xc6161a(0x335)](_0x346e57['dirname'](_0x567d08),_0xc6161a(0x4b3));if(_0x55fc02[_0xc6161a(0x3cd)](_0x1f61e4)){const {imported:_0x3a51b8,skipped:_0x2d778c}=await _0x5cb0c7['migrate'][_0xc6161a(0x49a)](_0x1f61e4);console['log']('[okdb]\x20blobs:\x20imported='+_0x3a51b8+_0xc6161a(0x3a8)+_0x2d778c);}}await _0x5cb0c7['close'](),console[_0xc6161a(0x3ba)](_0xc6161a(0x472));}async function _0x2ac302(_0x5a6d9f,_0x1edb96){const _0x6a722=_0x13f85c;_0x1edb96[_0x6a722(0x368)]&&!_0x1edb96[_0x6a722(0x348)]&&(console['error'](_0x6a722(0x369)),process['exit'](0x1));const _0x2da4d5=_0x1edb96[_0x6a722(0x276)]?_0x1edb96[_0x6a722(0x276)][_0x6a722(0x4a4)](',')[_0x6a722(0x2f5)](_0x137a59=>_0x137a59['trim']())[_0x6a722(0x2c8)](Boolean):[];let _0x51c7c4={};if(_0x1edb96[_0x6a722(0x342)])try{_0x51c7c4=JSON['parse'](_0x1edb96[_0x6a722(0x342)]);if(typeof _0x51c7c4!==_0x6a722(0x3e2)||Array['isArray'](_0x51c7c4)||_0x51c7c4===null)throw new Error();}catch{console['error'](_0x6a722(0x38f)),process[_0x6a722(0x1b3)](0x1);}const _0x1dff27=require$$5,{randomToken:_0x3f43bc,hashToken:_0x3a72e9,hashPassword:_0x13609a}=requireOkdbAuthTokens(),_0x120537=require$$0,_0x2a583f=_0x346e57['resolve'](_0x5a6d9f[_0x6a722(0x364)]),_0x322491=new _0x1dff27(_0x2a583f,_0x5a6d9f[_0x6a722(0x2d1)]?{'encryptionKey':_0x5a6d9f['key']}:{});await _0x322491[_0x6a722(0x277)]();try{await _0x322491[_0x6a722(0x1e7)]['_ensureTokensType']();if(_0x1edb96['name']){const _0x438c13=await _0x322491[_0x6a722(0x1e7)][_0x6a722(0x4a0)](_0x1edb96['name']);_0x438c13&&(console['error'](_0x6a722(0x476)+_0x1edb96[_0x6a722(0x348)]+_0x6a722(0x4a3)),process[_0x6a722(0x1b3)](0x1));}const _0x2a77da=_0x3f43bc(0x20),_0x53b96f=_0x3a72e9(_0x2a77da),_0x2bc29b=_0x1edb96[_0x6a722(0x368)]?await _0x13609a(_0x1edb96[_0x6a722(0x368)]):null,_0x20ec04=_0x120537[_0x6a722(0x1c3)](),_0x4a5bab={'tokenHash':_0x53b96f,'name':_0x1edb96[_0x6a722(0x348)]||null,'passwordHash':_0x2bc29b,'label':_0x1edb96[_0x6a722(0x2d3)]||null,'permissions':_0x2da4d5,'grants':_0x51c7c4,'createdAt':Date[_0x6a722(0x379)](),'lastUsedAt':null},_0x34b2d7=_0x1edb96['ttl']?{'ttl':Number(_0x1edb96[_0x6a722(0x242)])}:undefined;await _0x322491[_0x6a722(0x211)][_0x6a722(0x3bf)]('~tokens',_0x20ec04,_0x4a5bab,_0x34b2d7),console[_0x6a722(0x3ba)]('\x0a\x20\x20✓\x20Token\x20created'),console[_0x6a722(0x3ba)](_0x6a722(0x3bb)+_0x20ec04),console['log'](_0x6a722(0x498)+(_0x1edb96[_0x6a722(0x348)]||_0x6a722(0x41c))),console['log'](_0x6a722(0x297)+(_0x1edb96[_0x6a722(0x2d3)]||_0x6a722(0x41c))),console[_0x6a722(0x3ba)](_0x6a722(0x2c3)+(_0x2da4d5['join'](',\x20')||'(none)')),console['log'](_0x6a722(0x475)),console[_0x6a722(0x3ba)](_0x6a722(0x2ca)+_0x2a77da+'\x0a');}finally{await _0x322491[_0x6a722(0x35f)]();}}async function _0x3398e0(_0x4fb81f){const _0xdb915f=_0x13f85c,_0x22ae89=require$$5,_0x481df9=_0x346e57['resolve'](_0x4fb81f[_0xdb915f(0x364)]),_0x363086=new _0x22ae89(_0x481df9,_0x4fb81f[_0xdb915f(0x2d1)]?{'encryptionKey':_0x4fb81f[_0xdb915f(0x2d1)]}:{});await _0x363086[_0xdb915f(0x277)]();try{const _0x22e9b7=_0x363086[_0xdb915f(0x211)];if(!_0x22e9b7||!_0x22e9b7[_0xdb915f(0x20f)](_0xdb915f(0x42f))){console[_0xdb915f(0x3ba)]('No\x20tokens.');return;}const _0x2daff6=[];for(const {key:_0x50b238,value:_0x5ad89b}of _0x22e9b7[_0xdb915f(0x413)]('~tokens')){_0x2daff6[_0xdb915f(0x225)]({'id':_0x50b238,'name':_0x5ad89b[_0xdb915f(0x348)]||_0xdb915f(0x41c),'label':_0x5ad89b[_0xdb915f(0x2d3)]||_0xdb915f(0x41c),'permissions':Array[_0xdb915f(0x495)](_0x5ad89b[_0xdb915f(0x276)])?_0x5ad89b['permissions'][_0xdb915f(0x335)](','):'','created':_0x5ad89b[_0xdb915f(0x2cf)]?new Date(_0x5ad89b[_0xdb915f(0x2cf)])['toISOString']()['slice'](0x0,0xa):''});}if(_0x2daff6['length']===0x0){console[_0xdb915f(0x3ba)](_0xdb915f(0x2f3));return;}const _0x5b278d=!process[_0xdb915f(0x24b)][_0xdb915f(0x3f6)]||process[_0xdb915f(0x24b)][_0xdb915f(0x3f6)]>=0x64,_0x1d8254=_0x5b278d?0x24:0xa,_0x418794=['ID'[_0xdb915f(0x1ea)](_0x1d8254),_0xdb915f(0x2b5)[_0xdb915f(0x1ea)](0x10),_0xdb915f(0x1ad)[_0xdb915f(0x1ea)](0x14),'PERMISSIONS'[_0xdb915f(0x1ea)](0x14),_0xdb915f(0x296)][_0xdb915f(0x335)]('\x20\x20');console['log']('\x0a'+_0x418794),console[_0xdb915f(0x3ba)]('-'[_0xdb915f(0x307)](_0x418794[_0xdb915f(0x2e0)]));for(const _0x3554ed of _0x2daff6){const _0x22b0b1=_0x5b278d?_0x3554ed['id']:_0x3554ed['id']['slice'](0x0,0x8)+'…';console[_0xdb915f(0x3ba)]([_0x22b0b1[_0xdb915f(0x1ea)](_0x1d8254),_0x3554ed[_0xdb915f(0x348)][_0xdb915f(0x345)](0x0,0x10)[_0xdb915f(0x1ea)](0x10),_0x3554ed[_0xdb915f(0x2d3)]['slice'](0x0,0x14)[_0xdb915f(0x1ea)](0x14),_0x3554ed['permissions'][_0xdb915f(0x345)](0x0,0x14)[_0xdb915f(0x1ea)](0x14),_0x3554ed[_0xdb915f(0x1ef)]]['join']('\x20\x20'));}console[_0xdb915f(0x3ba)]('');}finally{await _0x363086['close']();}}async function _0x5a27ea(_0x385fa9,_0x48ef44){const _0x38d902=_0x13f85c;!_0x385fa9&&(console[_0x38d902(0x20c)](_0x38d902(0x2c5)),process[_0x38d902(0x1b3)](0x1));const _0x121b28=require$$5,_0x3d17ef=_0x346e57[_0x38d902(0x1dc)](_0x48ef44[_0x38d902(0x364)]),_0x4f3843=new _0x121b28(_0x3d17ef,_0x48ef44[_0x38d902(0x2d1)]?{'encryptionKey':_0x48ef44[_0x38d902(0x2d1)]}:{});await _0x4f3843['open']();try{const _0x20e0a9=_0x4f3843[_0x38d902(0x211)];(!_0x20e0a9||!_0x20e0a9[_0x38d902(0x20f)]('~tokens'))&&(console[_0x38d902(0x20c)](_0x38d902(0x3db)+_0x385fa9+'\x22'),process['exit'](0x1));let _0x204973=null,_0x566db3=null;const _0x3e9796=_0x20e0a9[_0x38d902(0x3f5)]('~tokens',_0x385fa9);if(_0x3e9796)_0x204973=_0x385fa9,_0x566db3=_0x3e9796;else{const _0x221304=[];for(const {key:_0x3824fc,value:_0x11a482}of _0x20e0a9['getRange'](_0x38d902(0x42f))){if(_0x3824fc[_0x38d902(0x32d)](_0x385fa9))_0x221304[_0x38d902(0x225)]({'key':_0x3824fc,'value':_0x11a482});}_0x221304[_0x38d902(0x2e0)]===0x0&&(console[_0x38d902(0x20c)](_0x38d902(0x3db)+_0x385fa9+'\x22'),process['exit'](0x1));if(_0x221304[_0x38d902(0x2e0)]>0x1){console[_0x38d902(0x20c)](_0x38d902(0x353)+_0x385fa9+'\x22\x20matches\x20'+_0x221304[_0x38d902(0x2e0)]+_0x38d902(0x2e3));for(const _0x152d35 of _0x221304){console[_0x38d902(0x20c)]('\x20\x20'+_0x152d35[_0x38d902(0x2d1)]+'\x20\x20(name:\x20'+(_0x152d35[_0x38d902(0x293)][_0x38d902(0x348)]||'(unset)')+')');}process[_0x38d902(0x1b3)](0x1);}_0x204973=_0x221304[0x0][_0x38d902(0x2d1)],_0x566db3=_0x221304[0x0]['value'];}await _0x20e0a9[_0x38d902(0x416)](_0x38d902(0x42f),_0x204973),console[_0x38d902(0x3ba)](_0x38d902(0x45f)+_0x204973+_0x38d902(0x389)+(_0x566db3[_0x38d902(0x348)]||_0x38d902(0x41c))+_0x38d902(0x1c4)+(_0x566db3[_0x38d902(0x2d3)]||_0x38d902(0x41c))+')');}finally{await _0x4f3843[_0x38d902(0x35f)]();}}function _0x1dd124(_0x4b1570,_0x3b43ff){const _0x26cd0c=_0x13f85c;if(!_0x4b1570[_0x26cd0c(0x49d)])return _0x26cd0c(0x402);const _0x286062=_0x4b1570[_0x26cd0c(0x451)];if(!_0x286062)return _0x26cd0c(0x365);if(_0x3b43ff>_0x286062)return'expired';return'active';}function _0x17e5a6(_0x47492d){const _0x1a0222=_0x13f85c;if(!_0x47492d||typeof _0x47492d!==_0x1a0222(0x3e2))return'';const _0x4849cc=Object[_0x1a0222(0x2ba)](_0x47492d)['filter'](([,_0x263bb1])=>_0x263bb1)[_0x1a0222(0x2f5)](([_0x438e8d])=>_0x438e8d);if(_0x4849cc[_0x1a0222(0x2e0)]===0x0)return _0x1a0222(0x3ac);if(_0x4849cc['length']<=0x3)return _0x4849cc[_0x1a0222(0x335)]('\x20');return _0x4849cc[_0x1a0222(0x345)](0x0,0x3)[_0x1a0222(0x335)]('\x20')+('\x20+'+(_0x4849cc[_0x1a0222(0x2e0)]-0x3));}async function _0x2cdeda(_0x200f89){const _0x56c730=_0x13f85c,_0x206625=require$$5,_0x5d05e0=requireOkdbLicenseCodec(),{_C:_0x30dfd0}=requireOkdbLicense(),_0x18526a=_0x346e57[_0x56c730(0x1dc)](_0x200f89[_0x56c730(0x364)]),_0x259997=new _0x206625(_0x18526a,_0x200f89[_0x56c730(0x2d1)]?{'encryptionKey':_0x200f89['key']}:{});await _0x259997[_0x56c730(0x277)]();try{const _0x576ea0=_0x259997[_0x56c730(0x211)],_0x5c9c22=_0x576ea0?.['db']?.[_0x56c730(0x3f5)]?.('__writeCounter')??0x0,_0x45f6ec=[..._0x259997[_0x56c730(0x264)][_0x56c730(0x3e9)]()][_0x56c730(0x2c8)](_0x1f35a6=>!_0x1f35a6['startsWith']('~'))[_0x56c730(0x2e0)],_0x52085c=_0x259997[_0x56c730(0x1bf)]?.['effective'];if(_0x52085c){const _0x2f403a=_0x52085c['_isFree']===!![],_0xe387d1=_0x2f403a?_0x56c730(0x30b):_0x259997[_0x56c730(0x1bf)]['active']?.['licensee']||_0x56c730(0x33c);console[_0x56c730(0x3ba)](''),console['log'](_0x56c730(0x302)+_0xe387d1);const _0xd1e1dc=_0x52085c[_0x56c730(0x263)]||{};if(_0xd1e1dc[_0x56c730(0x2b6)]){const _0x47281d=Math[_0x56c730(0x357)](_0x5c9c22/_0xd1e1dc[_0x56c730(0x2b6)]*0x64);console[_0x56c730(0x3ba)](_0x56c730(0x255)+_0x5c9c22['toLocaleString']()+_0x56c730(0x234)+_0xd1e1dc[_0x56c730(0x2b6)][_0x56c730(0x46d)]()+_0x56c730(0x3d0)+_0x47281d+'%)');}else console[_0x56c730(0x3ba)](_0x56c730(0x255)+_0x5c9c22[_0x56c730(0x46d)]());_0xd1e1dc[_0x56c730(0x2c2)]?console[_0x56c730(0x3ba)](_0x56c730(0x1bd)+_0x45f6ec+_0x56c730(0x234)+_0xd1e1dc['envs']):console[_0x56c730(0x3ba)](_0x56c730(0x1bd)+_0x45f6ec),_0x30dfd0?.[_0x56c730(0x2e9)]&&console[_0x56c730(0x3ba)](_0x56c730(0x3e0)+_0x30dfd0['PUB_FINGERPRINT']+_0x56c730(0x3c0));}if(!_0x576ea0||!_0x576ea0['hasType'](_0x56c730(0x39b))){console['log'](''),console[_0x56c730(0x3ba)](_0x56c730(0x456)),console['log']('');return;}const _0x189cfd=[],_0x450894=Date[_0x56c730(0x379)](),_0x270569=_0x259997['id'],_0x4940e1=_0x56c730(0x270);for(const {key:_0x25f93d,value:_0x1ab4a0}of _0x576ea0[_0x56c730(0x413)](_0x56c730(0x39b))){const _0xb7881=_0x1ab4a0[_0x56c730(0x207)]?Buffer['from'](_0x1ab4a0[_0x56c730(0x207)],_0x56c730(0x326)):Buffer[_0x56c730(0x36a)](0x8);let _0x4acf2f='';try{_0x4acf2f=_0x5d05e0[_0x56c730(0x434)](_0x270569,_0xb7881,_0x4940e1)[_0x56c730(0x1b8)];}catch{}_0x189cfd['push']({'id':_0x25f93d,'licensee':_0x1ab4a0[_0x56c730(0x354)]||'','expires':_0x1ab4a0[_0x56c730(0x451)]?new Date(_0x1ab4a0[_0x56c730(0x451)])[_0x56c730(0x3ee)]()['slice'](0x0,0xa):'','features':_0x17e5a6(_0x1ab4a0[_0x56c730(0x360)]),'pin':_0x4acf2f,'status':_0x1dd124(_0x1ab4a0,_0x450894)});}if(_0x189cfd[_0x56c730(0x2e0)]===0x0){console[_0x56c730(0x3ba)](''),console[_0x56c730(0x3ba)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console['log']('');return;}const _0x452b1d=['\x20\x20'+'ID'[_0x56c730(0x1ea)](0xe),_0x56c730(0x3aa)[_0x56c730(0x1ea)](0xe),_0x56c730(0x1c1)[_0x56c730(0x1ea)](0xc),_0x56c730(0x38b)['padEnd'](0x1e),'PIN'[_0x56c730(0x1ea)](0xa),'STATUS']['join']('\x20');console['log']('\x0a'+_0x452b1d);for(const _0x521558 of _0x189cfd){const _0x25f915=_0x521558['id'][_0x56c730(0x345)](0x0,0x8)+'…';console[_0x56c730(0x3ba)](['\x20\x20'+_0x25f915[_0x56c730(0x1ea)](0xe),_0x521558[_0x56c730(0x354)][_0x56c730(0x345)](0x0,0xe)['padEnd'](0xe),_0x521558[_0x56c730(0x240)][_0x56c730(0x1ea)](0xc),_0x521558[_0x56c730(0x360)][_0x56c730(0x345)](0x0,0x1e)['padEnd'](0x1e),_0x521558['pin'][_0x56c730(0x1ea)](0xa),_0x521558[_0x56c730(0x323)]]['join']('\x20'));}console['log']('');}finally{await _0x259997[_0x56c730(0x35f)]();}}async function _0x33e419(_0x4f60a4,_0x591259){const _0x4b6569=_0x13f85c,_0x4abd89=require$$5,_0x161430=requireOkdbLicenseCodec();let _0x15becf=_0x4f60a4;(_0x161430[_0x4b6569(0x394)](_0x4f60a4)==='path'||_0x55fc02['existsSync'](_0x4f60a4)&&_0x55fc02[_0x4b6569(0x2f9)](_0x4f60a4)[_0x4b6569(0x1af)]())&&(_0x15becf=_0x55fc02[_0x4b6569(0x2b3)](_0x4f60a4,'utf8')[_0x4b6569(0x397)]());const _0x24bc61=_0x346e57[_0x4b6569(0x1dc)](_0x591259[_0x4b6569(0x364)]),_0xddf797=new _0x4abd89(_0x24bc61,_0x591259[_0x4b6569(0x2d1)]?{'encryptionKey':_0x591259[_0x4b6569(0x2d1)]}:{});await _0xddf797[_0x4b6569(0x277)]();try{!_0xddf797[_0x4b6569(0x1bf)]&&(console['error']('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x4b6569(0x1b3)](0x1));let _0x385486;try{_0x385486=await _0xddf797['_license'][_0x4b6569(0x2ac)](_0x15becf);}catch(_0x50a682){console[_0x4b6569(0x20c)]('[okdb]\x20error:\x20'+_0x50a682[_0x4b6569(0x235)]),process[_0x4b6569(0x1b3)](0x1);}const _0x47ab46=_0xddf797[_0x4b6569(0x1bf)][_0x4b6569(0x2a7)](),_0x222be0=_0x47ab46[_0x4b6569(0x2cc)](_0x1cd3ca=>_0x1cd3ca[_0x4b6569(0x414)]===_0x385486['id'])?.['pin']||'',_0x5de643=Object[_0x4b6569(0x2ba)](_0x385486[_0x4b6569(0x360)]||{})[_0x4b6569(0x2c8)](([,_0x54a071])=>_0x54a071)[_0x4b6569(0x2f5)](([_0x292545])=>_0x292545),_0x57c7f3=_0x385486[_0x4b6569(0x263)]||{},_0x535688=[_0x57c7f3['envs']?_0x4b6569(0x306)+_0x57c7f3['envs']:null,_0x57c7f3[_0x4b6569(0x284)]?_0x4b6569(0x43c)+_0x57c7f3[_0x4b6569(0x284)]:null,_0x57c7f3[_0x4b6569(0x3eb)]?_0x4b6569(0x3d5)+_0x57c7f3['syncPeers']:null,_0x57c7f3[_0x4b6569(0x2b6)]?'writes='+_0x57c7f3['maxWrites'][_0x4b6569(0x46d)]():null][_0x4b6569(0x2c8)](Boolean)[_0x4b6569(0x335)]('\x20\x20'),_0x485dee=_0x385486[_0x4b6569(0x1dd)]===_0x161430[_0x4b6569(0x2ef)];console[_0x4b6569(0x3ba)](_0x4b6569(0x2e6)),console[_0x4b6569(0x3ba)](_0x4b6569(0x391)+_0x385486['id']),console[_0x4b6569(0x3ba)](_0x4b6569(0x239)+_0x385486[_0x4b6569(0x354)]),console[_0x4b6569(0x3ba)](_0x4b6569(0x4b9)+new Date(_0x385486[_0x4b6569(0x451)])[_0x4b6569(0x3ee)]()[_0x4b6569(0x345)](0x0,0xa)),console[_0x4b6569(0x3ba)](_0x4b6569(0x31d)+(_0x5de643[_0x4b6569(0x335)](',\x20')||_0x4b6569(0x3ac)));if(_0x535688)console[_0x4b6569(0x3ba)](_0x4b6569(0x441)+_0x535688);_0x485dee?(console['log'](_0x4b6569(0x328)),console[_0x4b6569(0x3ba)]('')):(console['log']('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x222be0),console[_0x4b6569(0x3ba)](_0x4b6569(0x23d)),console[_0x4b6569(0x3ba)](''),console[_0x4b6569(0x3ba)]('\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:'),console[_0x4b6569(0x3ba)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x222be0+_0x4b6569(0x47a)),console[_0x4b6569(0x3ba)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x4b6569(0x3ba)](_0x4b6569(0x30f)),console['log'](''));}finally{await _0xddf797[_0x4b6569(0x35f)]();}}async function _0x5be2a7(_0x367d6a,_0x20b5fc){const _0x328ec1=_0x13f85c,_0x1d815e=require$$5,_0x2865a6=_0x346e57[_0x328ec1(0x1dc)](_0x20b5fc[_0x328ec1(0x364)]),_0x290088=new _0x1d815e(_0x2865a6,_0x20b5fc['key']?{'encryptionKey':_0x20b5fc['key']}:{});await _0x290088[_0x328ec1(0x277)]();try{!_0x290088[_0x328ec1(0x1bf)]&&(console['error']('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x328ec1(0x1b3)](0x1));let _0x342083;try{_0x342083=await _0x290088[_0x328ec1(0x1bf)][_0x328ec1(0x2c6)](_0x367d6a['trim']());}catch(_0x47720a){console[_0x328ec1(0x20c)](_0x328ec1(0x244)+_0x47720a['message']),console['error'](''),console[_0x328ec1(0x20c)]('\x20\x20Common\x20causes:'),console['error']('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console['error'](_0x328ec1(0x4b8)),console[_0x328ec1(0x20c)](_0x328ec1(0x22c)),console[_0x328ec1(0x20c)](''),process[_0x328ec1(0x1b3)](0x1);}console[_0x328ec1(0x3ba)](_0x328ec1(0x49e)),console[_0x328ec1(0x3ba)](_0x328ec1(0x391)+_0x342083['id']),console[_0x328ec1(0x3ba)](_0x328ec1(0x239)+_0x342083['licensee']),console[_0x328ec1(0x3ba)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x342083[_0x328ec1(0x451)])[_0x328ec1(0x3ee)]()[_0x328ec1(0x345)](0x0,0xa)),console['log'](_0x328ec1(0x1ac)),console[_0x328ec1(0x3ba)]('');}finally{await _0x290088[_0x328ec1(0x35f)]();}}async function _0x202f03(_0x574a7a,_0xfb3454){const _0x3d5b03=_0x13f85c;!_0x574a7a&&(console[_0x3d5b03(0x20c)]('[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument'),process[_0x3d5b03(0x1b3)](0x1));const _0x1dc15d=require$$5,_0x42e388=requireOkdbLicenseCodec(),_0x15e3ab=_0x346e57[_0x3d5b03(0x1dc)](_0xfb3454[_0x3d5b03(0x364)]),_0x55febb=new _0x1dc15d(_0x15e3ab,_0xfb3454[_0x3d5b03(0x2d1)]?{'encryptionKey':_0xfb3454[_0x3d5b03(0x2d1)]}:{});await _0x55febb[_0x3d5b03(0x277)]();try{const _0x1bfdb7=_0x55febb['_systemEnv'];(!_0x1bfdb7||!_0x1bfdb7[_0x3d5b03(0x20f)](_0x3d5b03(0x39b)))&&(console[_0x3d5b03(0x20c)](_0x3d5b03(0x3fd)+_0x574a7a+'\x22'),process[_0x3d5b03(0x1b3)](0x1));let _0x1fa11c=null,_0xc28886=null;const _0x24524c=_0x1bfdb7['get'](_0x3d5b03(0x39b),_0x574a7a);if(_0x24524c)_0x1fa11c=_0x574a7a,_0xc28886=_0x24524c;else{const _0x42acb4=[];for(const {key:_0x19c39c,value:_0x1edba7}of _0x1bfdb7[_0x3d5b03(0x413)](_0x3d5b03(0x39b))){if(_0x19c39c['startsWith'](_0x574a7a))_0x42acb4[_0x3d5b03(0x225)]({'key':_0x19c39c,'value':_0x1edba7});}_0x42acb4['length']===0x0&&(console['error'](_0x3d5b03(0x3fd)+_0x574a7a+'\x22'),process['exit'](0x1)),_0x42acb4['length']>0x1&&(console[_0x3d5b03(0x20c)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x574a7a+_0x3d5b03(0x3a7)+_0x42acb4[_0x3d5b03(0x2e0)]+_0x3d5b03(0x3ef)),process[_0x3d5b03(0x1b3)](0x1)),_0x1fa11c=_0x42acb4[0x0][_0x3d5b03(0x2d1)],_0xc28886=_0x42acb4[0x0][_0x3d5b03(0x293)];}const _0x26ddc4=Date[_0x3d5b03(0x379)](),_0xb1dcf=_0x1dd124(_0xc28886,_0x26ddc4),_0x311cee=_0x55febb['id'],_0x22bf17='__OKDB_PUB_FINGERPRINT__';let _0x274160='';try{const _0x2d03ce=Buffer['from'](_0xc28886[_0x3d5b03(0x207)],_0x3d5b03(0x326));_0x274160=_0x42e388[_0x3d5b03(0x434)](_0x311cee,_0x2d03ce,_0x22bf17)[_0x3d5b03(0x1b8)];}catch{}const _0x53042a=_0xc28886['features']?Object[_0x3d5b03(0x2ba)](_0xc28886[_0x3d5b03(0x360)])[_0x3d5b03(0x2c8)](([,_0x18b714])=>_0x18b714)[_0x3d5b03(0x2f5)](([_0x35bc7a])=>_0x35bc7a):[],_0x1852ab=_0xc28886[_0x3d5b03(0x263)]||{},_0x6ff08f=_0x1bfdb7?.['db']?.[_0x3d5b03(0x3f5)]?.('__writeCounter')??0x0,_0x162915=[..._0x55febb[_0x3d5b03(0x264)][_0x3d5b03(0x3e9)]()][_0x3d5b03(0x2c8)](_0x588cfe=>!_0x588cfe[_0x3d5b03(0x32d)]('~'))['length'];console[_0x3d5b03(0x3ba)](_0x3d5b03(0x2b2)),console[_0x3d5b03(0x3ba)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1fa11c),console[_0x3d5b03(0x3ba)](_0x3d5b03(0x239)+(_0xc28886['licensee']||'')),console['log'](_0x3d5b03(0x4b9)+(_0xc28886[_0x3d5b03(0x451)]?new Date(_0xc28886[_0x3d5b03(0x451)])[_0x3d5b03(0x3ee)]()['slice'](0x0,0xa):'')),console[_0x3d5b03(0x3ba)](_0x3d5b03(0x31d)+(_0x53042a[_0x3d5b03(0x335)](',\x20')||_0x3d5b03(0x3ac))),console[_0x3d5b03(0x3ba)](_0x3d5b03(0x272)+_0x274160),console[_0x3d5b03(0x3ba)](_0x3d5b03(0x1c8)+_0xb1dcf),console[_0x3d5b03(0x3ba)](_0x3d5b03(0x1f0)+new Date(_0xc28886[_0x3d5b03(0x3ab)])['toISOString']());if(_0xb1dcf===_0x3d5b03(0x365)){console[_0x3d5b03(0x3ba)](''),console['log']('\x20\x20Usage:');if(_0x1852ab['maxWrites']){const _0x3802d7=Math[_0x3d5b03(0x357)](_0x6ff08f/_0x1852ab[_0x3d5b03(0x2b6)]*0x64);console[_0x3d5b03(0x3ba)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x6ff08f['toLocaleString']()+'\x20/\x20'+_0x1852ab['maxWrites'][_0x3d5b03(0x46d)]()+_0x3d5b03(0x3d0)+_0x3802d7+'%)');}else console[_0x3d5b03(0x3ba)](_0x3d5b03(0x2bf)+_0x6ff08f[_0x3d5b03(0x46d)]()+_0x3d5b03(0x30a));_0x1852ab[_0x3d5b03(0x2c2)]?console['log'](_0x3d5b03(0x24d)+_0x162915+_0x3d5b03(0x234)+_0x1852ab[_0x3d5b03(0x2c2)]):console[_0x3d5b03(0x3ba)](_0x3d5b03(0x24d)+_0x162915+_0x3d5b03(0x30a));}console[_0x3d5b03(0x3ba)]('');}finally{await _0x55febb[_0x3d5b03(0x35f)]();}}async function _0x4ab31b(_0x5c445a,_0x1250cf){const _0x34e1ce=_0x13f85c;!_0x5c445a&&(console[_0x34e1ce(0x20c)](_0x34e1ce(0x2b7)),process[_0x34e1ce(0x1b3)](0x1));const _0x223cd8=require$$5,_0x121757=_0x346e57['resolve'](_0x1250cf[_0x34e1ce(0x364)]),_0x60593f=new _0x223cd8(_0x121757,_0x1250cf[_0x34e1ce(0x2d1)]?{'encryptionKey':_0x1250cf[_0x34e1ce(0x2d1)]}:{});await _0x60593f[_0x34e1ce(0x277)]();try{const _0x27bf56=_0x60593f[_0x34e1ce(0x211)];(!_0x27bf56||!_0x27bf56[_0x34e1ce(0x20f)]('~licenses'))&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x5c445a+'\x22'),process[_0x34e1ce(0x1b3)](0x1));let _0x2a6e1d=null,_0x2c6bf8=null;const _0x89657e=_0x27bf56['get'](_0x34e1ce(0x39b),_0x5c445a);if(_0x89657e)_0x2a6e1d=_0x5c445a,_0x2c6bf8=_0x89657e;else{const _0x4d1009=[];for(const {key:_0x1c4066,value:_0x5b98bf}of _0x27bf56[_0x34e1ce(0x413)](_0x34e1ce(0x39b))){if(_0x1c4066['startsWith'](_0x5c445a))_0x4d1009['push']({'key':_0x1c4066,'value':_0x5b98bf});}_0x4d1009['length']===0x0&&(console[_0x34e1ce(0x20c)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x5c445a+'\x22'),process[_0x34e1ce(0x1b3)](0x1)),_0x4d1009[_0x34e1ce(0x2e0)]>0x1&&(console[_0x34e1ce(0x20c)](_0x34e1ce(0x353)+_0x5c445a+_0x34e1ce(0x3a7)+_0x4d1009[_0x34e1ce(0x2e0)]+'\x20licenses'),process['exit'](0x1)),_0x2a6e1d=_0x4d1009[0x0][_0x34e1ce(0x2d1)],_0x2c6bf8=_0x4d1009[0x0][_0x34e1ce(0x293)];}await _0x27bf56[_0x34e1ce(0x416)](_0x34e1ce(0x39b),_0x2a6e1d),console['log'](_0x34e1ce(0x1e2)+_0x2a6e1d+_0x34e1ce(0x247)+(_0x2c6bf8[_0x34e1ce(0x354)]||'(unset)')+')');}finally{await _0x60593f[_0x34e1ce(0x35f)]();}}async function _0x10a7dc(_0x341d92,_0x295352,_0x5f5564){const _0x2468ce=_0x13f85c;!_0x341d92&&(console[_0x2468ce(0x20c)](_0x2468ce(0x3e7)),process[_0x2468ce(0x1b3)](0x1));!_0x5f5564[_0x2468ce(0x35e)]&&!(_0x5f5564[_0x2468ce(0x262)]&&_0x5f5564[_0x2468ce(0x368)])&&(console['error'](_0x2468ce(0x479)),process[_0x2468ce(0x1b3)](0x1));const _0x4768a0=_0x5f5564[_0x2468ce(0x290)]||_0x295352[_0x2468ce(0x1bb)]?.[_0x2468ce(0x219)];!_0x4768a0&&(console['error'](_0x2468ce(0x2e1)+'\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a'+_0x2468ce(0x39a)),process['exit'](0x1));const _0x126622=require$$5,_0x463f8d=new _0x126622(_0x295352[_0x2468ce(0x364)],{'sync':{'address':_0x4768a0,'auto_reconcile':![]}});await _0x463f8d[_0x2468ce(0x277)]();try{const _0x5912f8=_0x463f8d[_0x2468ce(0x211)];if(_0x5912f8&&_0x5912f8[_0x2468ce(0x20f)](_0x2468ce(0x42f))){let _0x1725b7=![];for(const _0x5cfcfb of _0x5912f8[_0x2468ce(0x413)]('~tokens')){_0x1725b7=!![];break;}_0x1725b7&&console[_0x2468ce(0x3ba)](_0x2468ce(0x1b6)+_0x2468ce(0x40a));}console[_0x2468ce(0x3ba)](_0x2468ce(0x2ce)+_0x341d92+'…'),await _0x463f8d[_0x2468ce(0x1bb)][_0x2468ce(0x335)](_0x341d92[_0x2468ce(0x1d5)](/\/+$/,''),{'token':_0x5f5564[_0x2468ce(0x35e)],'username':_0x5f5564[_0x2468ce(0x262)],'password':_0x5f5564[_0x2468ce(0x368)]}),console[_0x2468ce(0x3ba)](_0x2468ce(0x392)),console[_0x2468ce(0x3ba)]('\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a');}finally{await _0x463f8d['close']();}}async function _0xe91b83(){const _0x36f374=_0x13f85c,_0x573012=Date[_0x36f374(0x379)](),_0x4df8c4=_0x4070d0(process[_0x36f374(0x36f)]),_0x111354=_0x34a48f(_0x4df8c4),_0x1351dc=_0x346e57['resolve'](_0x111354[_0x36f374(0x364)]);!_0x111354[_0x36f374(0x31c)]&&!process[_0x36f374(0x458)][_0x36f374(0x27e)]&&(_0x111354[_0x36f374(0x31c)]=!![]);const _0x2db88c=require$$5,{start:_0x27d249,colorLog:_0x5527e6}=requireOkdbShell(),_0x4e644b={..._0x111354['key']?{'encryptionKey':_0x111354[_0x36f374(0x2d1)]}:{},..._0x111354[_0x36f374(0x377)]?{'admin':![]}:_0x303997(_0x111354[_0x36f374(0x493)])?{'admin':_0x111354[_0x36f374(0x493)]}:{},..._0x303997(_0x111354['api'])?{'api':_0x111354[_0x36f374(0x203)]}:{},..._0x303997(_0x111354[_0x36f374(0x1e7)])?{'auth':_0x111354[_0x36f374(0x1e7)]}:{},..._0x303997(_0x111354[_0x36f374(0x449)])?{'mcp':_0x111354[_0x36f374(0x449)]}:{},..._0x111354[_0x36f374(0x331)]!==![]?{'timeMachine':_0x111354[_0x36f374(0x331)]}:{}},_0xc00a15=new _0x2db88c(_0x1351dc,_0x4e644b);_0xc00a15['log']['detachConsole']?.();const _0x171a9f=_0xc00a15[_0x36f374(0x3ba)][_0x36f374(0x1d6)](_0x53af9c=>_0x5527e6(_0x53af9c,_0x111354['logLevel']));if(_0x111354[_0x36f374(0x31c)])process['stdout']['write']('[okdb]\x20starting…\x0a');await _0xc00a15[_0x36f374(0x277)]();if(_0x111354['noRepl'])process[_0x36f374(0x24b)][_0x36f374(0x30d)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x174809(_0xc00a15,_0x111354['port']);}catch(_0x44cad0){_0x44cad0[_0x36f374(0x23b)]==='EADDRINUSE'&&(console[_0x36f374(0x20c)](_0x36f374(0x371)+_0x111354[_0x36f374(0x3fc)]+_0x36f374(0x3ff)),process[_0x36f374(0x1b3)](0x1));throw _0x44cad0;}if(_0x111354[_0x36f374(0x31c)])process[_0x36f374(0x24b)]['write']('\x20\x20✓\x20http\x20listening\x20on\x20:'+_0x111354[_0x36f374(0x3fc)]+'\x0a');if(!_0x111354[_0x36f374(0x31c)])_0xc00a15[_0x36f374(0x3ba)][_0x36f374(0x372)]?.(),_0x171a9f?.(),_0x3cc78a(_0xc00a15['auth']?.[_0x36f374(0x46a)]?.()??[]),await _0x27d249(_0xc00a15,_0x111354);else{const _0x587f1f=_0x346e57[_0x36f374(0x335)](_0x1351dc,_0x36f374(0x2af));try{_0x55fc02['writeFileSync'](_0x587f1f,String(process[_0x36f374(0x21d)]));}catch{}const _0x2eec56=Date[_0x36f374(0x379)]()-_0x573012;console[_0x36f374(0x3ba)](''),console[_0x36f374(0x3ba)]('\x20\x20✓\x20OKDB\x20server\x20running'),console['log']('\x20\x20\x20\x20port:\x20\x20'+_0x111354[_0x36f374(0x3fc)]),console[_0x36f374(0x3ba)]('\x20\x20\x20\x20path:\x20\x20'+_0x1351dc),console[_0x36f374(0x3ba)](_0x36f374(0x462)+_0xc00a15['id']);{const _0x322d73=_0xc00a15[_0x36f374(0x211)]?.['db']?.[_0x36f374(0x3f5)]?.('__writeCounter')??0x0,_0x4e7712=[..._0xc00a15[_0x36f374(0x264)][_0x36f374(0x3e9)]()][_0x36f374(0x2c8)](_0x7fdd04=>!_0x7fdd04[_0x36f374(0x32d)]('~'))[_0x36f374(0x2e0)];if(_0xc00a15['_license']?.['active']?.[_0x36f374(0x1dd)]===0x1){const _0x36de0a=Math[_0x36f374(0x351)]((_0xc00a15[_0x36f374(0x1bf)][_0x36f374(0x365)]['expiresAt']-Date['now']())/0x5265c00);console[_0x36f374(0x3ba)](_0x36f374(0x201)+_0xc00a15['_license'][_0x36f374(0x365)]['licensee']+'\x20(expires\x20in\x20'+_0x36de0a+_0x36f374(0x46e));}else{if(_0xc00a15[_0x36f374(0x1bf)]?.['active']){const _0x328fb8=_0xc00a15['_license'][_0x36f374(0x365)];console[_0x36f374(0x3ba)](_0x36f374(0x44c)+_0x328fb8[_0x36f374(0x354)]+_0x36f374(0x341)+new Date(_0x328fb8['expiresAt'])[_0x36f374(0x3ee)]()[_0x36f374(0x345)](0x0,0xa)+')');const _0x47581f=_0x328fb8[_0x36f374(0x263)]||{};if(_0x47581f['maxWrites']){const _0x2dc31a=Math[_0x36f374(0x357)](_0x322d73/_0x47581f[_0x36f374(0x2b6)]*0x64);console[_0x36f374(0x3ba)](_0x36f374(0x22b)+_0x322d73['toLocaleString']()+_0x36f374(0x234)+_0x47581f['maxWrites'][_0x36f374(0x46d)]()+_0x36f374(0x491)+_0x2dc31a+_0x36f374(0x411)+_0x4e7712+(_0x47581f['envs']?'/'+_0x47581f['envs']:'')+_0x36f374(0x435)+(_0x4e7712===0x1?'':'s'));}}else{if(_0xc00a15[_0x36f374(0x1bf)]){const _0x4b719e=_0xc00a15[_0x36f374(0x1bf)][_0x36f374(0x2a7)](),_0x45abd9=_0x4b719e['length']?_0x4b719e[_0x36f374(0x2f5)](_0x15c84f=>_0x15c84f['pin'])[_0x36f374(0x335)](',\x20'):_0x36f374(0x1cb),_0x2e0b36=_0xc00a15[_0x36f374(0x1bf)][_0x36f374(0x291)],_0x356011=_0x2e0b36[_0x36f374(0x263)][_0x36f374(0x2b6)]?Math[_0x36f374(0x357)](_0x322d73/_0x2e0b36[_0x36f374(0x263)][_0x36f374(0x2b6)]*0x64):0x0;console['log'](_0x36f374(0x38a)),console['log'](_0x36f374(0x22b)+_0x322d73[_0x36f374(0x46d)]()+_0x36f374(0x234)+_0x2e0b36['limits'][_0x36f374(0x2b6)][_0x36f374(0x46d)]()+_0x36f374(0x491)+_0x356011+_0x36f374(0x411)+_0x4e7712+_0x36f374(0x234)+_0x2e0b36[_0x36f374(0x263)][_0x36f374(0x2c2)]+'\x20envs'),console[_0x36f374(0x3ba)](_0x36f374(0x45e)+_0x45abd9);}}}}console[_0x36f374(0x3ba)](_0x36f374(0x2f1)+_0x111354[_0x36f374(0x3fc)]+_0x36f374(0x282));!_0x111354[_0x36f374(0x377)]&&console['log'](_0x36f374(0x471)+_0x111354[_0x36f374(0x3fc)]+_0x36f374(0x27f));console['log'](''),console[_0x36f374(0x3ba)](_0x36f374(0x378)+_0x2eec56+'ms'),_0x3cc78a(_0xc00a15['auth']?.['getSecurityNotices']?.()??[]);async function _0x3feba4(){const _0x303f95=_0x36f374;process[_0x303f95(0x24b)][_0x303f95(0x30d)](_0x303f95(0x1b5));try{_0x55fc02[_0x303f95(0x469)](_0x587f1f);}catch{}await _0xc00a15[_0x303f95(0x35f)](),process[_0x303f95(0x1b3)](0x0);}process['on'](_0x36f374(0x47f),_0x3feba4),process['on'](_0x36f374(0x4a7),_0x3feba4);}}const _0x448e60=new Set([_0x13f85c(0x1f4),'doctor',_0x13f85c(0x2f0),_0x13f85c(0x40b),'export',_0x13f85c(0x3cb),_0x13f85c(0x36d),_0x13f85c(0x35e),_0x13f85c(0x335),'license']),_0xb7f7b7=process[_0x13f85c(0x36f)][0x2];if(_0xb7f7b7==='version')console[_0x13f85c(0x3ba)](require$$2[_0x13f85c(0x1f4)]),process['exit'](0x0);else{if(_0xb7f7b7&&_0x448e60['has'](_0xb7f7b7)){const _0x34f766=process[_0x13f85c(0x36f)][_0x13f85c(0x345)](0x3),_0x5e897c=_0x4070d0([_0x13f85c(0x439),_0x13f85c(0x2ee),..._0x34f766]),_0x4dfb0a=_0x34a48f(_0x5e897c),_0x421494=new Set(['--path','-d',_0x13f85c(0x3e6),'-k',_0x13f85c(0x2a2),'-c',_0x13f85c(0x1f9),'-p','--log-level',_0x13f85c(0x3e5),'-e',_0x13f85c(0x4af),_0x13f85c(0x36c),'--password',_0x13f85c(0x35b),_0x13f85c(0x3e3),_0x13f85c(0x1f8),'--ttl',_0x13f85c(0x4b4),_0x13f85c(0x44f),'-u','--address']);let _0x3ec031=null;for(let _0x13f961=0x0;_0x13f961<_0x34f766[_0x13f85c(0x2e0)];_0x13f961++){if(_0x421494[_0x13f85c(0x363)](_0x34f766[_0x13f961])){_0x13f961++;continue;}if(!_0x34f766[_0x13f961][_0x13f85c(0x32d)]('-')){_0x3ec031=_0x34f766[_0x13f961];break;}}(async()=>{const _0x4d0032=_0x13f85c;if(_0xb7f7b7===_0x4d0032(0x35e)){const _0x5e6354=process[_0x4d0032(0x36f)][0x3],_0x60d7ab=process['argv'][_0x4d0032(0x345)](0x4),_0xb7624a=_0x4070d0([_0x4d0032(0x439),'okdb',..._0x60d7ab]),_0x43e88a=_0x34a48f(_0xb7624a),_0x252045=new Set([_0x4d0032(0x279),'-d',_0x4d0032(0x3e6),'-k',_0x4d0032(0x2a2),'-c',_0x4d0032(0x1f9),'-p',_0x4d0032(0x36c),_0x4d0032(0x2fb),_0x4d0032(0x35b),_0x4d0032(0x3e3),_0x4d0032(0x1f8),_0x4d0032(0x4ae),_0x4d0032(0x417),_0x4d0032(0x3e5),'-e',_0x4d0032(0x4af)]),_0x46f319=[];for(let _0x56ef88=0x0;_0x56ef88<_0x60d7ab[_0x4d0032(0x2e0)];_0x56ef88++){if(_0x252045[_0x4d0032(0x363)](_0x60d7ab[_0x56ef88])){_0x56ef88++;continue;}if(_0x60d7ab[_0x56ef88][_0x4d0032(0x32d)]('-'))continue;_0x46f319[_0x4d0032(0x225)](_0x60d7ab[_0x56ef88]);}switch(_0x5e6354){case'create':await _0x2ac302(_0x43e88a,_0xb7624a);break;case _0x4d0032(0x376):await _0x3398e0(_0x43e88a);break;case _0x4d0032(0x3cf):await _0x5a27ea(_0x46f319[0x0],_0x43e88a);break;default:console[_0x4d0032(0x20c)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x5e6354+_0x4d0032(0x23a)),process[_0x4d0032(0x1b3)](0x1);}return;}if(_0xb7f7b7===_0x4d0032(0x220)){const _0x24dad0=requireOkdbLicenseCodec(),_0x21e9b7=process['argv']['slice'](0x3),_0x5efb1a=_0x4070d0(['node',_0x4d0032(0x2ee),..._0x21e9b7]),_0x32b0cf=_0x34a48f(_0x5efb1a),_0x5da717=new Set([_0x4d0032(0x279),'-d',_0x4d0032(0x3e6),'-k',_0x4d0032(0x2a2),'-c',_0x4d0032(0x1f9),'-p',_0x4d0032(0x417)]),_0x500e03=[];for(let _0x3cf269=0x0;_0x3cf269<_0x21e9b7[_0x4d0032(0x2e0)];_0x3cf269++){if(_0x5da717['has'](_0x21e9b7[_0x3cf269])){_0x3cf269++;continue;}if(_0x21e9b7[_0x3cf269][_0x4d0032(0x32d)]('-'))continue;_0x500e03[_0x4d0032(0x225)](_0x21e9b7[_0x3cf269]);}const _0x27985f=_0x500e03[0x0]??null;if(_0x27985f===_0x4d0032(0x416))await _0x4ab31b(_0x500e03[0x1],_0x32b0cf);else{if(!_0x27985f)await _0x2cdeda(_0x32b0cf);else{let _0x3183c8=_0x24dad0[_0x4d0032(0x394)](_0x27985f);if(_0x3183c8===_0x4d0032(0x4a8)&&_0x55fc02[_0x4d0032(0x3cd)](_0x27985f))_0x3183c8=_0x4d0032(0x41b);if(_0x3183c8===_0x4d0032(0x41b))try{const _0x54dd79=_0x55fc02[_0x4d0032(0x2b3)](_0x27985f,_0x4d0032(0x227))['trim'](),_0x14b6f6=_0x24dad0['detectInputType'](_0x54dd79);if(_0x14b6f6===_0x4d0032(0x49d)){await _0x5be2a7(_0x54dd79,_0x32b0cf);return;}await _0x33e419(_0x27985f,_0x32b0cf);return;}catch(_0x203c22){console['error'](_0x4d0032(0x29b)+_0x27985f+':\x20'+_0x203c22[_0x4d0032(0x235)]),process['exit'](0x1);}switch(_0x3183c8){case _0x4d0032(0x4a6):await _0x33e419(_0x27985f,_0x32b0cf);break;case _0x4d0032(0x49d):await _0x5be2a7(_0x27985f,_0x32b0cf);break;case _0x4d0032(0x298):await _0x202f03(_0x27985f,_0x32b0cf);break;default:console[_0x4d0032(0x20c)](_0x4d0032(0x212)+_0x27985f+'\x22'),console['error'](''),console['error'](_0x4d0032(0x2a6)),console[_0x4d0032(0x20c)](_0x4d0032(0x40c)),console[_0x4d0032(0x20c)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console['error']('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x4d0032(0x20c)](_0x4d0032(0x443)),console[_0x4d0032(0x20c)](''),console[_0x4d0032(0x20c)](_0x4d0032(0x34c)),process[_0x4d0032(0x1b3)](0x1);}}}return;}switch(_0xb7f7b7){case'doctor':await _0x297d5d(_0x4dfb0a);break;case'init':await _0x12f443();break;case'reset':await _0x4c5a47(_0x4dfb0a);break;case _0x4d0032(0x40b):await _0x20d95d(_0x3ec031??_0x346e57[_0x4d0032(0x1dc)](_0x4d0032(0x317)),_0x4dfb0a);break;case _0x4d0032(0x1e0):await _0x2edd5d(_0x3ec031??_0x346e57[_0x4d0032(0x1dc)](_0x4d0032(0x420)),_0x4dfb0a,_0x5e897c);break;case _0x4d0032(0x3cb):await _0x53553b(_0x3ec031??_0x346e57[_0x4d0032(0x1dc)](_0x4d0032(0x420)),_0x4dfb0a,_0x5e897c);break;case'join':await _0x10a7dc(_0x3ec031,_0x4dfb0a,_0x5e897c);break;}})()[_0x13f85c(0x1ee)](()=>process['exit'](0x0))[_0x13f85c(0x400)](_0x2880db=>{const _0x1d6b55=_0x13f85c;console[_0x1d6b55(0x20c)]('\x0a[okdb]\x20error:\x20'+(_0x2880db[_0x1d6b55(0x235)]||_0x2880db)+'\x0a'),process[_0x1d6b55(0x1b3)](0x1);});}else _0xe91b83()[_0x13f85c(0x400)](_0xc310ca=>{const _0x3f19b7=_0x13f85c;console[_0x3f19b7(0x20c)](_0x3f19b7(0x1d2)),console[_0x3f19b7(0x20c)](_0xc310ca['stack']||_0xc310ca),process[_0x3f19b7(0x1b3)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x22e4e2(0x43e)]=okdb;
|