@kedem/okdb 2.6.4 → 2.7.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 CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x1a2e0d=_0x4c4a;(function(_0x507a91,_0x189e2d){const _0x465a37=_0x4c4a,_0x38925d=_0x507a91();while(!![]){try{const _0x3db35b=parseInt(_0x465a37(0x5e1))/0x1+-parseInt(_0x465a37(0x4c5))/0x2+parseInt(_0x465a37(0x5ae))/0x3*(-parseInt(_0x465a37(0x5a4))/0x4)+parseInt(_0x465a37(0x55d))/0x5+parseInt(_0x465a37(0x889))/0x6+parseInt(_0x465a37(0x269))/0x7+-parseInt(_0x465a37(0x897))/0x8;if(_0x3db35b===_0x189e2d)break;else _0x38925d['push'](_0x38925d['shift']());}catch(_0x53164f){_0x38925d['push'](_0x38925d['shift']());}}}(_0x3812,0x6b88c));var require$$1=require(_0x1a2e0d(0x5be)),require$$0$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x1a2e0d(0x781)),require$$5$1=require(_0x1a2e0d(0x7b8)),require$$0$3=require(_0x1a2e0d(0x3be)),require$$2=require(_0x1a2e0d(0x753)),require$$5=require(_0x1a2e0d(0x481)),require$$2$1=require('crypto'),require$$0$2=require('node:crypto'),require$$4=require(_0x1a2e0d(0x247)),require$$1$1=require(_0x1a2e0d(0x60a)),require$$0$4=require('node:perf_hooks'),require$$0$5=require(_0x1a2e0d(0x306)),require$$0$6=require('node:events'),require$$0$7=require(_0x1a2e0d(0x5fb)),require$$1$2=require(_0x1a2e0d(0x5a1)),require$$3$1=require('url'),require$$2$2=require(_0x1a2e0d(0x28d)),require$$3$2=require('shmbuf'),commonjsGlobal=typeof globalThis!==_0x1a2e0d(0x625)?globalThis:typeof window!==_0x1a2e0d(0x625)?window:typeof global!==_0x1a2e0d(0x625)?global:typeof self!==_0x1a2e0d(0x625)?self:{};function getDefaultExportFromCjs(_0x7afe39){const _0x11eabc=_0x1a2e0d;return _0x7afe39&&_0x7afe39[_0x11eabc(0x1d5)]&&Object[_0x11eabc(0x404)][_0x11eabc(0x3e0)][_0x11eabc(0x8c3)](_0x7afe39,_0x11eabc(0x7eb))?_0x7afe39[_0x11eabc(0x7eb)]:_0x7afe39;}function _0x3812(){const _0x132257=['listen','--prefix=','~system','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','invalid','--no-repl','claims','items','exports','shm-gc:\x20/proc\x20is\x20not\x20readable\x20—\x20cannot\x20tell\x20which\x20segments\x20are\x20in\x20use','payload-or-self','import','ttl','signCookie','\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','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','backup','padStart','\x20worker\x20slot=','listLicenses','../okdb','GiB','\x20missing\x20path\x20field\x20in\x20inputSchema:\x20','\x20named\x20by\x20okdb\x20≤\x202.4.0)','read','queue-worker','bind','access-control-request-headers','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','_refreshDesiredSnapshot','_sockets','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','true','heldBy','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','registry-publish','\x20(id:\x20','Schema\x20&\x20Indexes','function','--token','\x0a\x20\x20✓\x20License\x20activated','\x20\x20scanned\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','none','sizeBefore','--version','size','\x20(expires\x20in\x20','parse','readlinkSync','geoConfig','\x20\x20Flags','\x20\x20\x20\x20port:\x20\x20','License\x20limit\x20exceeded:\x20','--label','OKDBIndexNotRegisteredError','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','default:\x20cores−1\x20=\x20','licensed','jwksUri','_matchRoute','SIGINT','Views','deleted','exportToFile','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','changed','--env','consecutiveFailures','slot','ftruncateSync',':\x20mapped\x20','default','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','cookie','\x20\x20Writes:\x20\x20','\x20HTTP\x20server(s)\x20on\x20port\x20','system','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','\x20writes\x20(','envs','\x20\x20\x20\x20path:\x20\x20\x20\x20','finish','\x20\x20\x20\x20\x20http://localhost:','\x20(other\x20users;\x20cannot\x20map\x200600\x20segments)','NAME','\x20to\x20browse\x20the\x20API,\x20','Examples','-tmp-','segmentNameFor:\x20canonicalPath\x20must\x20be\x20a\x20non-empty\x20string','extend','concat','\x20\x20\x20\x20\x20\x20\x20','config\x20http.workers','_resolveEnv','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a',',\x20got\x20','off','\x20\x20(unlimited)','_blobsDir','LOGS','\x20\x20(+\x20time-machine)','_lastPublishAt','cli','ms\x20(pid\x20','[okdb-cluster]\x20','POST','\x20\x20\x20\x20status:\x20\x20\x20\x20active','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','draining','\x20\x20\x20\x20expires:\x20\x20\x20','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','replace','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','_lastCpuAt','candidateAllocated','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','keys','hard-killed','blob','__vocab/version','getPins','message','flushed','--force','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x0a\x20\x20\x20\x20\x20\x20','\x0a\x20\x20','okdb-writer:\x20env\x20closing\x20—\x20retry','fstatSync','assertLimit','transaction','logs','geo','fts:drop','\x20\x20\x20\x20graceful\x20shutdown\x0a','write','rows=','application/json','HTTP\x20server\x20already\x20running','acquiredAt','valid','_desired','--workers','zero_refs','isDirectory','wrong_node','dirname','FOREIGN_KEY_DELETE_RESTRICTED','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','force','captureStackTrace','scanned','body.','constructor','headers.','finally','derived;\x20rebuilt\x20from\x20source\x20docs\x20on\x20first\x20open\x20of\x20the\x20restored\x20store','_isOpen','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','ENOENT','details','\x20\x20env=','decommission','stats','\x20cf-ip=','openSync','paused','\x1b[1m','FOREIGN_KEY_VIOLATION','mcp-session-id','split','/([^/]+)','\x1b[0m',';\x20Secure','\x20\x20kept\x20(attached/retiring\x20when\x20retired)\x20','consumeLoginState','Lax','BAD_GATEWAY','QUIT','okdb.pid','\x20logs\x20on\x20\x20','readdirSync','loop-lag','resume','start\x20','\x20\x20→\x20\x20','ver','\x20which\x20does\x20not\x20exist','outputSchema','mcp','Invalid\x20primary\x20key\x20type:\x20','_writer','process','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','prependListener','importJSON','setPrompt',').\x20If\x20none\x20of\x20them\x20runs\x20okdb,\x20pass\x20--force;\x20','\x0a\x20\x20Invalid\x20JSON:\x20','EXIT','_putRowAsync','Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).','\x20\x20Some\x20checks\x20failed.\x0a','\x20\x20\x20\x20','help','[okdb]\x20exporting\x20blobs…','licenseHash','readUInt32BE','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','View\x20peer\x20status\x20and\x20replication\x20stats.','\x20\x20#','\x20\x20+','_done','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','OKDBForeignKeyError','text/event-stream;\x20charset=utf-8','Sync','authMode','origin','entries','[okdb]\x20reset\x20aborted','forEach','readSync','statSync','{}[]:,\x0a\x0d\x09\x20','\x20of\x20them\x20run\x20as\x20this\x20user\x20and\x20could\x20map\x20these\x20segments:\x20','Content-Type','\x0a[okdb]\x20error:\x20','OKDBIndexHasConsumersError','1502166jcHdqt','utf8','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','unique','allowHeaders','_readNDJSON','handle','Forbidden\x20—\x20requires\x20','--permissions','/type/users/item/alice\x0a\x20\x20\x20\x20','ttlMs','candidatesLegacyNamed','unref','0123456789ABCDEFGHJKMNPQRSTVWXYZ','3789040HSYdcB','once','signature','dead','_isWriter','\x0a\x20\x20okdb\x20doctor\x0a','params.env','ROUTES','removeNode','_admissionStarted','\x20(passive),\x20','system:type_drop','unreadablePids','Unique\x20constraint\x20violated\x20on\x20','_jwksNegativeCache','removeSync','_validateOperationRequest','cyan','\x20\x20\x20\x20port:\x20\x20\x20\x20','[okdb]\x20started\x20in\x20','_drainOne','heartbeatMs','_processStartedAt','\x20license(s)','\x20(deleted)','removeSupervisedChild','shm-gc:\x20Linux\x20only\x20(POSIX\x20shared\x20memory\x20under\x20/dev/shm)','seq','operation','matched','_totalErrors','HEAD','HTTP\x20','\x0a\x20\x20✓\x20Token\x20created','abs','build','memoryUsage','SIGTERM',';\x20Expires=','BACKUP_MANIFEST','\x20worker','logLevel','response','resolve','call','fanout','_report','hidden','ftsName','\x20\x20(','ES256','run','ms/','\x20times\x20in\x20','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','halted','indexOf','[okdb]\x20importing\x20','\x20\x20\x20\x20\x20\x20','fill','lifecycle','getChanges','\x20is\x20not\x20a\x20complete\x20okdb\x20backup\x20(no\x20','Not\x20Found','isWanted','OKDB-PIN-V1:','isBuffer','includes','BAD_HOST','TYPES','CREATED','~processes:desired','\x22\x20(must\x20be\x20debug|info|warn|error)','\x20\x20\x20\x20\x20\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','shmbuf.node','~licenses','category','type/users\x20--help','effective','Validation\x20failed','claimGated','fts:registered','route','missing_blob','processor:ready','writes','~blobs','files\x20feature\x20not\x20available','License\x20signature\x20invalid:\x20','param','_heartbeatInFlight','PUBLIC_KEY_PEM','description','admin','_instanceId','--any-size','trimStart','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','disconnect','Create,\x20delete,\x20and\x20compact\x20environments.','REMOVE','raw','\x27,\x20cannot\x20map\x20to\x20\x27','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','_publishNow','\x20in\x20','syncPeers','join','\x20SECURITY\x20NOTICE','execArgv','_supervisorKey','lstatSync','OKDBTypeNotRegisteredError','single','deregisterSelf','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','string','_resolveOrCreateEnv','/type/users\x0a\x20\x20\x20\x20','__esModule','_flushDebounce','updateSupervisedChildStats','bumpCmd','makeOkdb','participate',':want','columns','licenseType','\x20\x20✓\x20marked\x20for\x20a\x20new\x20identity\x20—\x20the\x20first\x20open\x20gives\x20this\x20copy\x20its\x20own\x20node\x20id','connection','maxWrites','onRetiring','OKDBInvalidIndexKeyError','\x20\x20✓\x20OKDB\x20server\x20running','\x20lived\x20outside\x20the\x20store\x20at\x20','_seen','MAX_POOL_HOLDS','shm-gc:\x20unknown\x20argument\x20','exportToStream','scope','sha256','_drain','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','expires','library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20','percentile','port\x20','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20backup:\x20LMDB\x20snapshot\x20copy\x20of\x20every\x20env\x20+\x20time-machine\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20history\x20+\x20file\x20blobs\x20into\x20a\x20NEW\x20dir\x20(default:\x20./okdb-backup);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20full-text\x20indexes\x20are\x20rebuilt\x20on\x20first\x20open,\x20not\x20copied\x0a\x20\x20\x20\x20restore\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Restore\x20a\x20backup\x20dir\x20into\x20--path\x20(must\x20not\x20exist\x20or\x20be\x20empty)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--new-identity\x20\x20\x20\x20bring\x20the\x20copy\x20up\x20as\x20a\x20NEW\x20node\x20(fresh\x20id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20no\x20sync\x20membership)\x20instead\x20of\x20replacing\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20the\x20original\x20—\x20see\x20docs/migration.md\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x20\x20\x20\x20shm-gc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20leaked\x20okdb\x20shared-memory\x20segments\x20no\x20process\x20uses\x20(Linux)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20report\x20only\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--prefix\x20<p>\x20\x20\x20\x20\x20\x20\x20only\x20names\x20starting\x20with\x20<p>\x20(default\x20\x22-tmp-\x22)\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a\x20\x20\x20\x20okdb\x20restore\x20./my-backup\x20--path\x20./okdb-data\x0a','uptime','notOkdbShaped','closeAllConnections','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','withPoolHold','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','_lastCpuUsage',':\x20key\x20[','allSettled','cursorKey',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','level:\x20info','Blob\x20on\x20disk\x20has\x20no\x20~files\x20record\x20in\x20any\x20env\x20(hash:\x20','_versionSkewWarned','_validateOidcAccessToken','fts:','platform','\x20@\x20','jwk','additionalProperties','Files','_lockDb','\x20(deleting\x20requires\x20--force\x20if\x20none\x20of\x20them\x20is\x20okdb)','outOfTree','okdb-license-id:','\x20/\x20','processorId','\x20process(es)\x20that\x20could\x20map\x20these\x20','LENGTH_REQUIRED','is\x20not\x20allowed','INDEX_ALREADY_REGISTERED','\x20\x20Shell\x20commands','Execute\x20functions\x20over\x20HTTP/MCP/shell.','Processors','token_endpoint','from','hostname','OKDBInvalidValueError','pipe','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','clock','SIGBREAK','allowMethods','[okdb]\x20export\x20complete','TYPE_ALREADY_REGISTERED','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x0d[okdb]\x20','\x20deleted','ENVS','debug','method','No\x20license\x20found\x20matching\x20this\x20activation\x20token','exp','_authOptions','not\x20open','[okdb]\x20exporting\x20env\x20\x22','\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','\x22\x20already\x20exists','\x20supervised)','recent\x20writes\x20(newest\x20first)','\x20MB)','usage:\x20okdb\x20restore\x20<backup-dir>\x20--path\x20<target-data-dir>','\x27\x20doesn\x27t\x20exist','json','ref:violation_resolved','transactionSync','anySize','stopHeartbeat','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','schema:set','LICENSED_BUILD','_blobPath','online','LABEL','GATEWAY_TIMEOUT','password','\x20\x20score:','_adminRelay','search:query','pending','stopped','_totalReadMs','authorizationUrl','body','child_process','stdin','License\x20already\x20stored','flatMap','race','_jwksCache','node','searchParams','byteLength','uid','copyFileSync','(on\x20any\x20path\x20command)','closeIdleConnections','setLogger','candidates','heapUsed','features','ingest','set','note','--ttl','processingSig','SCHEMA_VALIDATION_FAILED','exportBlobs','put','dest','indexes','targetKey','[okdb]\x20error:\x20failed\x20to\x20read\x20','JWT\x20issuer\x20mismatch','_rotateBucket','processors/','ITEM_CREATE','importBlobs','2787526WVNCYR','comm','host','\x1b[36m','\x20\x20✓\x20Revoked\x20token\x20','time','ieee-p1363','List\x20functions\x20and\x20inspect\x20their\x20source.',')\x20→\x20','index:registered','shm-gc:\x20cannot\x20read\x20the\x20memory\x20maps\x20of\x20','_singletonLocks','CHANGEFEED_QUANTUM','_started','is\x20required','\x20\x20matching\x20prefix\x20\x20\x20\x20','min','_released','\x20process','address','audiences','_boot','slice','routes','Engines','expiresAt','ttl:expired','Write','enforce','[okdb]\x20invalid\x20log\x20level:\x20\x22','parts','[okdb]\x20exported\x20\x20types=','type/users/item/alice','updatedAt','segmentNameFor:\x20suffix\x20must\x20look\x20like\x20\x22_name\x22\x20(got\x20','_maybePublish','worker_threads','context','_nodeDb','queue/','unlinkSync','type/','readUInt16BE','cors','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','cluster:','_putRowSync','UNIQUE_CONSTRAINT','_rawDb','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','ref:violation','\x20sync','boolean','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','handler','env:opened','files','copy','data','supervisorKey','next','OKDBIndexAlreadyRegisteredError','scopes','_totalWriteMs','Functions','types:','--env\x20<name>','/\x20quit\x20/\x20Ctrl+C','has','\x20\x20@','ppid','headers','api','readUInt8','indexToDb','sourceType','assertFeature','schema','\x22\x20is\x20used\x20by:\x20','\x20env','reduce','registerType','license','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','processor','_onPending','issuedAt','Version\x20mismatch\x20for\x20','matcher','\x0a[okdb]\x20received\x20','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','status','importFromStream','System','alg','.okdb-write-test','_nodeDead','\x27\x20is\x20already\x20registered','opendirSync','_lastCpuWindowMs','_log','http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them','Unknown\x20error','ms\x20(attempt\x20','stringify','createEnvironment','input:\x20','sse','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','last-event-id','floor','okdbVersion','__fts:','INVALID_PRIMARY_KEY','getuid','code','logRequests','access-control-max-age','schema:drop','[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20','\x20\x20\x20\x20path:\x20\x20','cluster-wide','--verbose','_startAdmission','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','toUpperCase','writes=','endsWith','ms\x20p99=','\x20more)','Schema\x20validation\x20failed\x20for\x20','.kdb_history','_okdb','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','system:clock_change','afterWrite',',\x20signal=','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','x5c','_handleInProcess','repeat','drop','\x20while\x20this\x20process\x20runs\x20','UNSUPPORTED_MEDIA_TYPE','include','get','timingSafeEqual','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','./okdb-backup','alloc','--log-requests','_holderDead','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','gate','ENV','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','Validation\x20failed:\x20','perf_hooks','workers','readFileSync','.kdbconfig','Bearer\x20$1…','/admin/index.html','okdb.http.listen(port)\x20in\x20each\x20worker.','ACTIVATION_EXPIRED','runInNewContext','\x20\x20\x20\x20licensee:\x20\x20','safety','enable','setDesired','\x0a\x20\x20✓\x20License\x20added','embeddings','params','regex','\x20(okdb\x20','GET','\x20for\x20system\x20env','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','[okdb]\x20restoring\x20','[okdb]\x20invalid\x20port:\x20','deaths','LICENSE_INVALID','send','[okdb]\x20error:\x20','typeSubDbs','_activateProcesses','getHeader','fromEntries','shmbuf','\x20died\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','\x0a-----END\x20CERTIFICATE-----\x0a','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','_highWater','orphan','\x20environment\x20','inst:','DELETE','\x20\x20\x20\x20addedAt:\x20\x20\x20','changes','Token\x20must\x20be\x20a\x20JWT','processor:paused','records','reverse','\x20\x20!\x20','dbPath','needsActivation','commit','defaults','_userRouteCount','\x20forked\x20','tags','\x20\x20✓\x20~blobs\x20\x20(','system:poke','unlink','typesPerEnv','index:drop','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','repairBlobRefs','--path','der','_listTypes','ceil','gray','respawnTimer','_shouldWrapResponse','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','getCount','store','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','node/','bus:type_drop','clearLine','value','procmode/','stop','\x20\x20(licensee:\x20','threads','SYSTEM_STOPPED','transport','hashed','[okdb]\x20imported\x20\x20types=','req','async','maps','is\x20invalid','dataBytes','delete','SIGINT\x20(double-tap)','[okdb]\x20preserved:\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','header','isAuthenticated','listAll','singletonClaims','toLowerCase','reads','x-okdb-raw-response','KiB','root','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','compareExchange','spki','\x20references\x20','msg','shared-memory\x20segment\x20\x22','Records','sandbox','\x20\x20\x20\x20permissions:\x20','_openEnvLazy','\x20licenses','_closed','createServer','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','_wantDb','\x20(+','label','\x20\x20skipped:\x20','\x0a[okdb]\x20fatal\x20error:','\x20has\x20illegal\x20binding\x20target\x20for\x20','standard','sizeAfter','charCodeAt','pin','childTransaction','_getJwkKey','\x20log\x20level:\x20','\x20more','\x20\x20\x20\x20status:\x20\x20\x20\x20','config','engines','dropType','magenta','preferred_username','\x20type','\x20\x20\x20\x20usage:\x20\x20\x20','closed','reject','expiry','fast','env/staging/info','port','start','red','resetting','toFixed','\x20already\x20exists','Payload\x20too\x20large','catch','servers','compaction','(unset)','markClosed','unlinked','cpSync','BAD_REQUEST','ms\x20env=','blindPids','\x20\x20Tier:\x20\x20\x20\x20',',\x20stopping\x20workers…\x0a','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','field','ensureType','[okdb]\x20unknown\x20token\x20action:\x20\x22','primary','--prefix','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','TiB','\x22\x20to\x20enable\x20it.','ALREADY_EXISTS','use\x20<env>','getAuthOptions','setOwnMeta','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','\x20origin=','createHash','system:stopped','detectInputType','_coordinator','decommissioning','readline','pushEphemeral','idx:','registry\x20publish\x20failing:\x20','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','_ensureDesired','_windowCbs','_children','2.6.4','\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','getRange',';\x20SameSite=','getClock','keys/public.pem','_ensure','clockToChangeDb','data:read','sourceKey','verifyCookie','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','\x20result','http-server','\x20\x20·\x20','item:update','license:removed','runtimeProcessesView','Work','toUTCString','set-cookie','SYSTEM_PROC','reload','registerIndex','scrypt','hasOwnProperty','verifySignature','groups','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','FTS_RESET','cause','[okdb]\x20backing\x20up\x20to\x20','okdb_session_','rawBuf','options','OPEN','hint','result','reportThreadStats','live\x20process\x20registry;\x20disposable','\x20fetching\x20','RS256','\x20documents\x20fail\x20validation','remaining-fields','Invalid\x20license\x20blob:\x20','id:\x20','listDesired','test','getDesired','list','_startedAt','type/users/item/alice\x20--env\x20staging','./okdb-data','ready','formatCookie','\x22\x20resolves\x20outside\x20the\x20backup\x20root\x20\x22','uuid','equals','LICENSE_HASH_MISMATCH','user','holder','prototype','\x20(slot=','_bucketIdx','_hbTimer','detachConsole','argv','Hint:\x20','createReadStream','maxAge','aud','\x20writer{depth=','cpuUsage','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','\x20<path>\x20[json-body]','writeMs','max','\x20is\x20inside\x20the\x20backup\x20','\x20\x20Type\x20','oldestPendingMs','remove','HTTP_','INDEX_HAS_CONSUMERS','randomBytes','[env]','queue','heapTotal','_envs','disable','clearCookie','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','putSync','_lockDbOf','Protected\x20(gate)','\x20cf-ray=','type/users/query\x20{\x22active\x22:true}','types','\x20(expires\x20','null','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','Blob\x20file\x20missing\x20for\x20~files\x20record\x20\x22','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','./okdb-export.ndjson','allocUnsafe','attachFeed','count','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','[okdb-cluster]\x20primary\x20pid=','\x20ipc\x20error:\x20','\x20has\x20ambiguous\x20query/path\x20field:\x20','dropSchema','readInt32LE','socket','recheck','available','FEATURES','createLoginState','clear','\x20binding\x20references\x20missing\x20input\x20field:\x20','workersFlag','application/x-www-form-urlencoded','signalWant','_servingEngines','[on|off|level]','\x20→\x20POST\x20/api/env/','protected:read','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','_blobStatusDb','\x20===','Route\x20','_publishFailWarned','__okdbCluster','bus:proc','_buildProcessingFacet',')\x20exited\x20','role','warn','dynamic','bodyMode','green','parseInt','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','resetReadTxn','never','blobs','standalone','/api','\x1b[33m','Cannot\x20delete\x20','integer','[okdb]\x20created\x20.kdbconfig','/proc','\x20\x20\x20\x20id:\x20\x20\x20\x20','okdb-backup.json','system:ready','tryAcquire','data.mdb','caps','_getType','release','_getOidcDiscovery','exit','listNodes','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','_rowKey','maxMs','isPrimary','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','nbf','_ownMeta','decommissioned','stop\x20every\x20okdb\x20process\x20on\x20this\x20path\x20and\x20run\x20`okdb\x20shm-gc`.','JWT\x20expired','[okdb]\x20restore\x20complete\x20—\x20full-text\x20indexes\x20rebuild\x20on\x20first\x20open','PUB_FINGERPRINT','responseStatuses','_store','username','_nodeDbFor','%),\x20','primaryOkdb','rawResponse','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','key','--changes','stream','OKDBInvalidPrimaryKeyError','_lookupByName','Origin','_kind','kill','enabled','PUT','\x22\x20matches\x20','refs','trim','line','MALFORMED_TOKEN','beforeWrite','liveThreadStats','iss','Embeddings','match','isWorker','_onProcEvent','jwks_uri','permissions','writeFileSync','stdout','\x0a\x20\x20\x20\x20','\x20\x20\x20http://localhost:','bold','--test','BACKUP_DEST_INSIDE_STORE','Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.','addedAt','\x1b[35m','_buildChildRow','slotKey','_enableChangelog','_wrapApiResponse','_assertUsable','Environments','_desiredOverlay','dir','\x20\x20in\x20use\x20(mapped/fd)\x20','listRoutes','retiring','keys:','started','_buckets','noteListenAddr','Unauthorized','~tokens','processor:error','question','work','authenticateToken','newIdentity',')\x20to\x20your\x20license\x20vendor.','\x22:\x20','toString','licenses','clearThreadStats','cpuWindowMs','_runMiddlewares','blocks','_isFree','blob\x20status\x20db\x20not\x20available','(null)','fieldPath','_selfKey','writeUInt32BE','1088372QIthwW','txn:end','loadEnvFile','\x20oldestPendingMs=','configureAuth','okdb-lock:\x20env\x20closed',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','UNPROCESSABLE_ENTITY','Forbidden\x20—\x20no\x20permissions\x20available','_bpWaiters','identity','processingStatusView','Shutting\x20down\x20due\x20to\x20license\x20expiry','JWT\x20is\x20missing\x20kid','_durs','[okdb]\x20closed\x20cleanly\x0a','Internal\x20error','NOT_FOUND','METHOD_NOT_ALLOWED','\x20process(es)\x20had\x20unreadable\x20maps','Build\x20expects\x20public\x20key\x20fingerprint\x20','add','_userPhase','INDEX_NOT_REGISTERED','_changefeed','okdb-writer[','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','subject','target\x20','Bearer\x20','_lastTick','\x20statusEnv=','isFeatureEnabled','\x20\x20records=','/types\x0a\x20\x20\x20\x20','_nestedWarned','selfAddress','system:bus_state_change','\x20records','now','then','title','attach','Forbidden','--no-cluster','origins','reason','cookies','unique:violation','\x20\x20⚠','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','Run','name','type','\x20\x20(need\x20≥\x2018)','discoveryTtlMs','_sandbox','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','_baselines','use','pause','_license','tags:\x20','processor:retry','_typeSchema','/api/','hash','--types','inspect','cpuPct','internalOnly','committed','[okdb]\x20starting…\x0a','processing','\x20records…','timeMachine','errors','isInteger','_pending','cluster:\x20ready\x20(','verbose','created','\x20\x20[','resolveBackupDest','\x20does\x20not\x20exist','mkdirSync','\x20\x20http://localhost:','config\x20file\x20valid:\x20','body:\x20','false','setupPrimary','127.0.0.1','OIDC\x20discovery\x20missing\x20jwks_uri','getSecurityNotices','_sampleOwnStats','\x20\x20✓\x20','env:removed','VALIDATION_ERROR','token','_acquiredAt','shm-gc','content-type','FTS_REGISTERED','commitP99Ms','find','_held','publishChildRow','inflightAgesMs','Full-text\x20search','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','export:\x20stream\x20closed\x20before\x20drain','url','permission','--no-admin','expired','LICENSEE','putNode','ttl:clear','INVALID_INDEX_KEY','\x20\x20╔═══════════════════════════╗','licensee','env/','fields','inputSchema','_buildOwnRow','filter','LICENSE_ACTIVATION_INVALID','_dispatch','requests','attached','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','_loginStates','--blobs','okdb_session','OKDB_CODE_TO_HTTP_STATUS','[okdb]\x20import\x20complete','external','bindings','uncaughtException','\x20\x20\x20\x20\x20\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','segments\x20(','mean','foreignOwner','instances','failed\x20to\x20open','Token\x20secret\x20not\x20configured','push','internal','setHeader','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','ESRCH','2174970vdZsuC','verifyActivation','_licenseHash','\x22\x20on\x20\x22','types/env=','sort','\x20\x20✓\x20OKDB\x20cluster\x20running','shmbufNative','ttl:set','load','sab','addSupervisedChild','\x20\x20unused\x20(deletable)\x20','txn:rollback','type:drop','info','listenAddr','update','functions','index:progress','_onTick','known\x20field','every','processor:progress','\x20drainAge=','node\x20identity','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','round','startsWith','\x20\x20✓\x20Removed\x20license\x20','Indexes','parkedNow','closeSync','No\x20tokens.','\x20\x20║','OKDBSchemaCollectionError','fetch','token_use','\x1b[2m','BACKUP_PATH_OUTSIDE_ROOT','--config','_ensureTokensType','hasDesired','OKDBNotFoundError','activation','okdb','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','sig','SIG_INVALID','exposeHeaders','_role','/dev/shm','Read','precision','dryRun','shmbuf/package.json','map','index:reset','PATCH','version','http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20','backupRoot','isArray',');\x20','_quarantinedEnvs','view','views','userAdded','https','starting','received\x20','28740zjRqZG','kid','addRaw','email','List\x20environments\x20and\x20read\x20environment\x20info.','[okdb]\x20reset:\x20','examples','setEncoding','_fetchJwks','NOT_IMPLEMENTED','207YSQier','[okdb]\x20invalid\x20','envs=','\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','resetIndex','limits','worker','white','existsSync',':\x20prefix\x20','[okdb]\x20port\x20','\x0d[okdb]\x20blobs:\x20','stack','free\x20tier','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','{}[]:,\x27\x22','path','LICENSE_FEATURE_DISABLED','credentials','shell','\x1b[90m','pid','current','~processes:cmd','reap','_caps','blindCommands','bus:drain','x-requested-with','statuses','yellow','\x20\x20(no\x20env\x20draining)','splice','--watch','okdb-diag.','ms\x20on\x20env=','operations','Unknown\x20JWKS\x20kid:\x20','clusterStatusView','JWT\x20audience\x20mismatch','\x20worker(s)\x20still\x20serving','INDEX_READY','ms\x20mean=','shutting\x20down…\x0a','\x20\x20Envs:\x20\x20\x20\x20','_lock','tokenSecret','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','database\x20path\x20writable:\x20','writeUInt8','870468IayVFp','\x20\x20skipped=','txn:start','\x20pid=','ITEM_PENDING','item:create','waiting','isFile','_onStop','no\x20.kdbconfig\x20(using\x20defaults)','children','allowedAlgs','issueToken','_enqueuedAt','remoteAddress','open','onThreadExit','[okdb]\x20http\x20workers:\x20','PIN','_nodeDbCache','(code=','Events','no-cache,\x20no-transform','ITEM_UPDATE','reset','Invalid\x20index\x20key\x20type\x20for\x20\x27','http','INVALID_VALUE','EADDRINUSE','\x20\x20\x20\x20license:\x20','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema','object','\x22\x20is\x20inside\x20the\x20store\x20\x22','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','_groupByProcess','List\x20tokens\x20and\x20users.','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','exec','createWriteStream','\x20\x20\x20\x20admin:\x20http://localhost:','cluster','index','migrate','--eval','_isReader','[okdb]\x20close\x20error:\x20','payload','toISOString','Query','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','unclaimed','roles','_safeEnvDirName','\x22\x20—\x20pass\x20a\x20path\x20relative\x20to\x20it\x20(configure\x20with\x20the\x20`backup.root`\x20option)','OPTIONS','_put','/api/env/','\x22\x20→\x20','[okdb]\x20invalid\x20config\x20\x22','index:ready','orphan_blob','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','\x0a\x0a\x20\x20','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','\x20\x20(name:\x20','_statusEnv','other','undefined','setSchema','system:drain','_clusterWorkerAttached','MiB','\x20opening\x20','INTERNAL_ERROR','authorization','\x20\x20Path\x20access','--help','\x20bytes,\x20need\x20>=\x2065)','--name','<json-body>','/dev/shm/','_singletonLock','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','_totalReads','createInterface','-backups','creating','record','flushLmdb','\x20(durable\x20desired-state)','\x20phase=','end','Invalid\x20token','\x20\x20\x20\x20features:\x20\x20','_flushTimer','_bestMatch','yes','Foreign\x20key\x20violation:\x20','skip\x20','[res]\x20','threadId','\x20day(s).','system:env_release','doctor','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20',':\x20connected\x0a\x0a','procmodeack/',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','references','pathname','kind','backup\x20destination\x20\x22','\x20\x20All\x20checks\x20passed.\x0a','getCmd','Data','writeUInt16BE','digest','pathParams','license:added','fts','ORPHAN\x20(env-closed\x20write)','processes','terminal','<path>','_onItem','[okdb]\x20cluster\x20supervisor\x20pid=','[okdb]\x20blobs:\x20imported=','register','cpus','emit','\x20<\x20','\x22.\x20Use:\x20create,\x20list,\x20revoke','_quantum','jwksTtlMs','properties','namespace','SERVICE_UNAVAILABLE','open\x20','_oidcDiscoveryCache','parseBearer','drain','May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.','isTTY','Cannot\x20set\x20enforce\x20schema\x20on\x20','JWT\x20not\x20yet\x20valid','relative','linux','SIGKILL','active','validateBlobIntegrity','export','decodeActivationToken','\x20HTTP\x20workers\x20','array','offWindow','_copyDir','_listenAddr','onWindow','middlewares','_cursors','level','_runGuards','toLocaleString','dedupeMax','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','VIEW_PROGRESS','resetFts','log','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','\x20—\x20','LICENSE_ALREADY_STORED','(add\x20a\x20license\x20first)','base64','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','_markSeen','_active','\x20size,\x20','\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20','state','_onPoke','maxExtra','listening','event','restore','noCluster','noAdmin','guards','_totalWrites','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','isConnected','_allEnvsWithFiles','time-machine','targetType','\x20envs','inUse','~files','https:','createHmac','decodeLicenseBlob','USE','BACKUP_DEST_NOT_EMPTY','_startHeartbeat','authenticateRequest','length','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','change','\x20(must\x20be\x20true\x20or\x20false)','hex','1ofN:','\x22\x20(hash:\x20','TYPE_NOT_REGISTERED','nodeKey','shutdown','isHeld','--address','\x20\x20deleted\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','--username','entry','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','PERMISSIONS','item:pending',';\x20Path=','ms\x20activeWriters=','_timer','xdg-open\x20','_admissionTimer','processor:resumed','Search','_pendingLocal','rmSync','prompt','_db','[okdb]\x20backup\x20complete','unique:violation_resolved','access','error','cf-connecting-ip','\x20\x20⚠\x20\x20','query','_committed','commitsPerSec','stderr','createdAt','(none)','_cmd','__okdbSlot','metrics','sync','[okdb-cluster]\x20slot=','issuer','\x22\x20—\x20choose\x20a\x20directory\x20outside\x20it','_dedupeKey','database\x20path\x20not\x20writable:\x20','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','close','--drop','darwin','Queue','must\x20be\x20','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','destroy','_rootDb','running','flushDebounce','view:progress','tmp','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','ms\x20max=','kdb_admin_oauth_state','freeze','_collectWriterFacet','hasType','ID\x20token\x20is\x20not\x20accepted','sub','isAbsolute','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','_sync','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\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','\x20tokens:','homedir','[okdb]\x20error:\x20--password\x20requires\x20--name','registry\x20heartbeat\x20skipped\x20(writer=','grants','../','--port','verify','recordWrite','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','--grants','revoke','processorsView','\x20logs\x20off\x0a','\x1b[34m','padEnd','processKey','~processes','_heartbeatTimer','assign','ftsIndexes','decoded','cookieName','confirm','publishOwnRow','selfKey','Index\x20\x27','params.','_migrateVocab','auth','killable','OKDBForeignKeyDeleteError','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','Activation\x20invalid:\x20','isDead','forceAfterMs','unhandledRejection','create','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','__OKDB_PUB_FINGERPRINT__','some','values','win32','_handlePending','oauth','hasIndex','openDB','--inspect','DELETE\x20type/users/item/x','envName','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','number','server','isFinite','active:','transport:\x20','[okdb]\x20opening\x20','shift','destroyed','ms\x20busy=','content-length','_systemEnv','activate','search','\x20bytes','randomUUID','statusCode','_threadStats','sourcePath','SYSTEM_POKE','_totalRequests','isBusy','derivePin','\x0a\x20\x20Joining\x20cluster\x20at\x20','_inflight','migrations','--dry-run','setNoDelay','mode','_handlePoke','system:proc','events','noRepl','meta','setTtl','addLicense','_computeStatus','realpathSync','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','_wantDbOf','lmdb','_outstanding','_scheduleFlush','unknown','_lastCpuPct','createPublicKey','readMs','[okdb]\x20created\x20./okdb-data','(?:/(.*))?$','summary','ephemeral','lost','HELP','busy','[okdb-cluster]\x20worker\x20pid=','skippedByProtocol','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','\x20\x20changes=','raw-put','maxBodyBytes','http://','__writeCounter','quantum','process\x20','--print','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','base64url','_key','startedAt','INDEX_REGISTERED','API\x20tokens,\x20users,\x20and\x20credentials.','--log-level','authRequired','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','connected','--key','_isClusterController','basename','VERB','\x20\x20Usage:\x20','RSA-SHA256','--password','prefix','feed:','\x20allocated','hdr','net','main','clusterWorkers',';\x20Max-Age=','Type\x20\x27','_bpParkedTotal','env','typesDb','legacy','processors','_draining','_dedupeMax','\x20(dry\x20run)','hasCanonical','dim','otherwise\x20rerun\x20as\x20root.','PAYLOAD_TOO_LARGE','att','[filter]','\x20HTTP\x20workers,\x20each\x20serves\x20+\x20processes)','STATUS','rss','PUT\x20type/users/item/x\x20{\x22n\x22:1}','\x1b[37m','depth','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','instanceId','error\x20','_normalizeOAuthAuthResult','wait','shm\x20segment\x20','Invalid\x20activation\x20token:\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/','ITEM_REMOVE','appendFileSync'];_0x3812=function(){return _0x132257;};return _0x3812();}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x5a3ba6=require$$0,_0x306423=require$$0$1,_0x2b85eb=require$$1;let _0x39f2a8;function _0x1a8ebf(){const _0x43fe41=_0x4c4a;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x39f2a8!==undefined)return _0x39f2a8;try{const _0x585303=_0x2b85eb[_0x43fe41(0x836)](require[_0x43fe41(0x8c2)](_0x43fe41(0x594)));_0x39f2a8=_0x306423['existsSync'](_0x2b85eb[_0x43fe41(0x1c9)](_0x585303,_0x43fe41(0x8ba),'Release',_0x43fe41(0x1a8)));}catch{_0x39f2a8=![];}return _0x39f2a8;}function _0x2a09e8(){const _0xa606a6=_0x4c4a,_0x5011ce=_0x5a3ba6[_0xa606a6(0x662)]()[_0xa606a6(0x6ad)];return Math['max'](0x1,_0x5011ce-0x1);}function _0x56a7ca(_0x478cd2,_0x4911d1={}){const _0x59f09b=_0x4c4a,_0x355262=_0x4911d1[_0x59f09b(0x564)]!==undefined?_0x4911d1[_0x59f09b(0x564)]:_0x1a8ebf();let _0xbec9bd;if(_0x478cd2?.[_0x59f09b(0x69a)])_0xbec9bd=0x1;else{let _0x50931f,_0xea9455;if(_0x478cd2?.[_0x59f09b(0x43e)]!==undefined&&_0x478cd2['workersFlag']!==null&&_0x478cd2[_0x59f09b(0x43e)]!=='')_0x50931f=_0x478cd2[_0x59f09b(0x43e)],_0xea9455=_0x59f09b(0x832);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x50931f=process.env.OKDB_HTTP_WORKERS,_0xea9455='OKDB_HTTP_WORKERS';else _0x478cd2?.['http']?.[_0x59f09b(0x307)]!==undefined&&_0x478cd2[_0x59f09b(0x5fb)]['workers']!==null&&_0x478cd2[_0x59f09b(0x5fb)][_0x59f09b(0x307)]!==''&&(_0x50931f=_0x478cd2[_0x59f09b(0x5fb)][_0x59f09b(0x307)],_0xea9455='http.workers');}if(_0x50931f===undefined)_0xbec9bd=_0x2a09e8();else{const _0x50d003=Number(_0x50931f);!Number[_0x59f09b(0x512)](_0x50d003)||_0x50d003<0x1?(console[_0x59f09b(0x44f)](_0x59f09b(0x5af)+_0xea9455+'='+JSON[_0x59f09b(0x2d1)](_0x50931f)+_0x59f09b(0x36e)),_0xbec9bd=0x1):_0xbec9bd=_0x50d003;}}return!_0x355262&&_0xbec9bd>0x1&&(console[_0x59f09b(0x44f)]('[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20'+(_0x59f09b(0x838)+_0xbec9bd+').')),_0xbec9bd=0x1),_0xbec9bd;}return okdbWorkers={'isShmbufNative':_0x1a8ebf,'defaultWorkers':_0x2a09e8,'resolveWorkers':_0x56a7ca},okdbWorkers;}var version=_0x1a2e0d(0x3c6),require$$3={'version':version},okdbMigrate={'exports':{}},okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0xfc62a2 extends Error{constructor(_0x1016ab,_0x513aa8,_0x4e0799={}){const _0x3d734a=_0x4c4a;super(_0x1016ab),this['name']='OKDBError',this[_0x3d734a(0x2dc)]=_0x513aa8,this[_0x3d734a(0x844)]=_0x4e0799,_0x4e0799['cause']&&(this['cause']=_0x4e0799[_0x3d734a(0x3e5)]),Error[_0x3d734a(0x83a)](this,this[_0x3d734a(0x83d)]);}}class _0x575ebc extends _0xfc62a2{constructor(_0x26a1df,_0x376705,_0x29e09a,_0x2ab1de){const _0x6c8344=_0x4c4a;super(_0x6c8344(0x2c0)+_0x26a1df+'@'+_0x376705+':\x20expected\x20'+_0x29e09a+_0x6c8344(0x803)+_0x2ab1de,'VERSION_MISMATCH',{'type':_0x26a1df,'key':_0x376705,'expectedVersion':_0x29e09a,'actualVersion':_0x2ab1de}),this['name']='OKDBVersionMismatchError';}}class _0x5ecc3c extends _0xfc62a2{constructor(_0x1c1d80,_0x567ece){const _0x117782=_0x4c4a;super(_0x1c1d80+'@'+_0x567ece+_0x117782(0x519),_0x117782(0x4d6),{'type':_0x1c1d80,'key':_0x567ece}),this[_0x117782(0x4f9)]=_0x117782(0x588);}}class _0x35a792 extends _0xfc62a2{constructor(_0x1e2e22,_0x69949d){const _0x51cc0a=_0x4c4a;super(_0x1e2e22+'@'+_0x69949d+_0x51cc0a(0x39c),_0x51cc0a(0x3b3),{'type':_0x1e2e22,'key':_0x69949d}),this[_0x51cc0a(0x4f9)]='OKDBAlreadyExistsError';}}class _0x7cd4d7 extends _0xfc62a2{constructor(_0x29ad88,_0x3bde4a){const _0x588aef=_0x4c4a,_0x40443b=typeof _0x3bde4a;super(_0x588aef(0x5fa)+_0x29ad88+'\x27:\x20'+_0x40443b+_0x588aef(0x6e5)+_0x3bde4a,_0x588aef(0x53b),{'index':_0x29ad88,'key':_0x3bde4a,'keyType':_0x40443b}),this[_0x588aef(0x4f9)]=_0x588aef(0x1e2);}}class _0x526f38 extends _0xfc62a2{constructor(_0x45059f){const _0x44d292=_0x4c4a,_0x34d30e=typeof _0x45059f;super(_0x44d292(0x862)+_0x34d30e+_0x44d292(0x4fe)+_0x45059f,_0x44d292(0x2da),{'key':_0x45059f,'keyType':_0x34d30e}),this[_0x44d292(0x4f9)]=_0x44d292(0x482);}}class _0x2708c5 extends _0xfc62a2{constructor(_0x474d83){const _0x5be217=_0x4c4a;super(_0x5be217(0x785)+_0x474d83+_0x5be217(0x231),_0x5be217(0x6b4),{'type':_0x474d83}),this[_0x5be217(0x4f9)]=_0x5be217(0x1ce);}}class _0x46fe48 extends _0xfc62a2{constructor(_0x21bcfb){const _0x10a45e=_0x4c4a;super(_0x10a45e(0x785)+_0x21bcfb+'\x27\x20already\x20registered',_0x10a45e(0x21f),{'type':_0x21bcfb}),this[_0x10a45e(0x4f9)]='OKDBTypeAlreadyRegisteredError';}}class _0x54043b extends _0xfc62a2{constructor(_0x3f14d5,_0x2e24d7){const _0xb3a9a6=_0x4c4a;super('Index\x20\x27'+_0x2e24d7+'\x27\x20on\x20type\x20\x27'+_0x3f14d5+_0xb3a9a6(0x231),_0xb3a9a6(0x4dc),{'type':_0x3f14d5,'index':_0x2e24d7}),this[_0xb3a9a6(0x4f9)]=_0xb3a9a6(0x7da);}}class _0x1beaa7 extends _0xfc62a2{constructor(_0x1d9846,_0x52ec39){const _0xe45a92=_0x4c4a;super(_0xe45a92(0x713)+_0x52ec39+'\x27\x20on\x20type\x20\x27'+_0x1d9846+_0xe45a92(0x2ca),_0xe45a92(0x210),{'type':_0x1d9846,'index':_0x52ec39}),this[_0xe45a92(0x4f9)]=_0xe45a92(0x2a6);}}class _0x18590c extends _0xfc62a2{constructor(_0x5d5d7a,_0x3a6bab={}){const _0x9ba5cd=_0x4c4a;super(_0x5d5d7a,_0x9ba5cd(0x5fc),_0x3a6bab),this[_0x9ba5cd(0x4f9)]=_0x9ba5cd(0x217);}}class _0x40145c extends _0xfc62a2{constructor(_0xaf98b4,_0x36a8c8,_0x1c59df,_0x45c351,_0x47ce05){const _0x59f694=_0x4c4a;super(_0x59f694(0x8a4)+_0xaf98b4+'@'+_0x36a8c8+_0x59f694(0x1f9)+_0x1c59df+']\x20already\x20maps\x20to\x20\x27'+_0x45c351+_0x59f694(0x1c4)+_0x47ce05+'\x27',_0x59f694(0x298),{'type':_0xaf98b4,'index':_0x36a8c8,'indexKey':_0x1c59df,'existingKey':_0x45c351,'conflictingKey':_0x47ce05}),this['name']='OKDBUniqueConstraintError';}}class _0x4b2d7f extends _0xfc62a2{constructor(_0x290a88,_0x50e7f8,_0x4fc8ae){const _0x4b7ebf=_0x4c4a;super(_0x4b7ebf(0x2eb)+_0x290a88+'@'+_0x50e7f8,_0x4b7ebf(0x25d),{'type':_0x290a88,'key':_0x50e7f8,'errors':_0x4fc8ae}),this[_0x4b7ebf(0x4f9)]='OKDBSchemaValidationError',this['type']=_0x290a88,this[_0x4b7ebf(0x47f)]=_0x50e7f8,this[_0x4b7ebf(0x511)]=_0x4fc8ae;}}class _0x5bd637 extends _0xfc62a2{constructor(_0x10ce46,_0xb764c5){const _0x381a97=_0x4c4a;super(_0x381a97(0x671)+_0x10ce46+':\x20'+_0xb764c5[_0x381a97(0x6ad)]+_0x381a97(0x3f1),'SCHEMA_COLLECTION_INVALID',{'type':_0x10ce46,'failures':_0xb764c5}),this[_0x381a97(0x4f9)]=_0x381a97(0x580),this[_0x381a97(0x4fa)]=_0x10ce46,this['failures']=_0xb764c5;}}class _0x5a38ad extends _0xfc62a2{constructor(_0x12a71d,_0xe6d4a0,_0x2d3cc5,_0x1345d3,_0x4fcdcc){const _0x399087=_0x4c4a;super(_0x399087(0x643)+_0x12a71d+'@'+_0xe6d4a0+'.'+_0x2d3cc5+_0x399087(0x371)+_0x1345d3+'@'+_0x4fcdcc+_0x399087(0x85f),_0x399087(0x84c),{'sourceType':_0x12a71d,'sourceKey':_0xe6d4a0,'fieldPath':_0x2d3cc5,'targetType':_0x1345d3,'targetKey':_0x4fcdcc}),this[_0x399087(0x4f9)]=_0x399087(0x87a),this[_0x399087(0x2b4)]=_0x12a71d,this[_0x399087(0x3d0)]=_0xe6d4a0,this[_0x399087(0x4c2)]=_0x2d3cc5,this[_0x399087(0x6a2)]=_0x1345d3,this[_0x399087(0x262)]=_0x4fcdcc;}}class _0x303f47 extends _0xfc62a2{constructor(_0x10d46a,_0x7ad9a4,_0x1beecb){const _0x1656f6=_0x4c4a;super(_0x1656f6(0x45b)+_0x10d46a+'@'+_0x7ad9a4+':\x20'+_0x1beecb[_0x1656f6(0x6ad)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x1656f6(0x837),{'targetType':_0x10d46a,'targetKey':_0x7ad9a4,'references':_0x1beecb}),this[_0x1656f6(0x4f9)]=_0x1656f6(0x718),this[_0x1656f6(0x6a2)]=_0x10d46a,this[_0x1656f6(0x262)]=_0x7ad9a4,this[_0x1656f6(0x64e)]=_0x1beecb;}}class _0x5da0f5 extends _0xfc62a2{constructor(_0x223f36,_0x488fda,_0x376185){const _0x48fd82=_0x4c4a;super('Index\x20\x22'+_0x488fda+_0x48fd82(0x560)+_0x223f36+_0x48fd82(0x2b7)+_0x376185['map'](_0x555a35=>_0x555a35['kind']+':'+_0x555a35[_0x48fd82(0x4f9)])[_0x48fd82(0x1c9)](',\x20'),_0x48fd82(0x419),{'type':_0x223f36,'index':_0x488fda,'usedBy':_0x376185}),this[_0x48fd82(0x4f9)]=_0x48fd82(0x888);}}return okdbError={'OKDBError':_0xfc62a2,'OKDBVersionMismatchError':_0x575ebc,'OKDBNotFoundError':_0x5ecc3c,'OKDBAlreadyExistsError':_0x35a792,'OKDBInvalidIndexKeyError':_0x7cd4d7,'OKDBInvalidPrimaryKeyError':_0x526f38,'OKDBTypeNotRegisteredError':_0x2708c5,'OKDBTypeAlreadyRegisteredError':_0x46fe48,'OKDBIndexNotRegisteredError':_0x54043b,'OKDBIndexAlreadyRegisteredError':_0x1beaa7,'OKDBInvalidValueError':_0x18590c,'OKDBUniqueConstraintError':_0x40145c,'OKDBSchemaValidationError':_0x4b2d7f,'OKDBSchemaCollectionError':_0x5bd637,'OKDBForeignKeyError':_0x5a38ad,'OKDBForeignKeyDeleteError':_0x303f47,'OKDBIndexHasConsumersError':_0x5da0f5},okdbError;}var hasRequiredOkdbMigrate;function requireOkdbMigrate(){const _0x3060a9=_0x1a2e0d;if(hasRequiredOkdbMigrate)return okdbMigrate['exports'];hasRequiredOkdbMigrate=0x1;const _0x4258d2=require$$0$1,_0xcfd171=require$$1,_0x2d389b=require$$2,{OKDBError:_0x3b8dd4}=requireOkdbError(),_0x396603='header',_0x3e42bd='env',_0x33355c=_0x3060a9(0x2b6),_0x596a51=_0x3060a9(0x2a3),_0x2c7ce0=_0x3060a9(0x6af),_0x1201a6=0x1f4,_0x3916ec=0x3e8,_0x39d426=_0x3060a9(0x460);async function _0x23bb79(_0x4b7bd3,_0xa0f27a,_0x3567bb,_0x31d0a7){const _0x388bd3=_0x3060a9;if(_0x4b7bd3){await _0x4b7bd3[_0x388bd3(0x7b4)](_0x3567bb,Boolean(_0x31d0a7));return;}const _0x5200d4=_0x2d389b[_0x388bd3(0x5f0)](_0xa0f27a,{'readOnly':!![],'maxDbs':0x8});try{await _0x5200d4[_0x388bd3(0x7b4)](_0x3567bb,Boolean(_0x31d0a7));}finally{await _0x5200d4[_0x388bd3(0x6e0)]();}}const _0xf599fc=()=>new Promise(_0x108642=>setImmediate(_0x108642));function _0x252baa(_0x3975b1,_0x4d3b71){if(_0x3975b1['write'](_0x4d3b71))return Promise['resolve']();return new Promise((_0x2b41e5,_0x4ca65e)=>{const _0x792aeb=_0x4c4a,_0x76a10f=_0x2944d9=>{const _0x4e31bd=_0x4c4a;_0x3975b1[_0x4e31bd(0x804)]?.(_0x4e31bd(0x66e),_0x422410),_0x3975b1[_0x4e31bd(0x804)]?.(_0x4e31bd(0x6cd),_0x29d7fd),_0x3975b1[_0x4e31bd(0x804)]?.(_0x4e31bd(0x6e0),_0x2717f8);if(_0x2944d9)_0x4ca65e(_0x2944d9);else _0x2b41e5();},_0x422410=()=>_0x76a10f(),_0x29d7fd=_0x3fecb0=>_0x76a10f(_0x3fecb0),_0x2717f8=()=>_0x76a10f(new Error(_0x792aeb(0x533)));_0x3975b1[_0x792aeb(0x898)](_0x792aeb(0x66e),_0x422410),_0x3975b1['once']('error',_0x29d7fd),_0x3975b1[_0x792aeb(0x898)](_0x792aeb(0x6e0),_0x2717f8);});}async function _0x5902dd(_0x1893b5,_0x2242fa,_0x3bb590){const _0x1a313b=_0x3060a9;let _0x279864=0x0,_0x2a6444,_0x4e2273=!![];for(;;){const _0x31dc43={'snapshot':!![],'limit':_0x3916ec};!_0x4e2273&&(_0x31dc43[_0x1a313b(0x398)]=_0x2a6444,_0x31dc43['exclusiveStart']=!![]);_0x4e2273=![];const _0x3b096d=Array[_0x1a313b(0x215)](_0x2242fa['getRange'](_0x31dc43));if(_0x3b096d[_0x1a313b(0x6ad)]===0x0)break;let _0x2d1750='';for(const _0x184c1b of _0x3b096d)_0x2d1750+=_0x3bb590(_0x184c1b)+'\x0a';_0x2a6444=_0x3b096d[_0x3b096d['length']-0x1][_0x1a313b(0x47f)],_0x279864+=_0x3b096d['length'],await _0x252baa(_0x1893b5,_0x2d1750);if(_0x3b096d['length']<_0x3916ec)break;await _0xf599fc();}return _0x279864;}class _0x1dfedf{constructor(_0x39a82a){this['okdb']=_0x39a82a;}['_resolveEnv'](_0x1f39f4=_0x3060a9(0x7eb)){const _0x189ff3=_0x3060a9;return this['okdb'][_0x189ff3(0x787)](_0x1f39f4);}async[_0x3060a9(0x1d3)](_0x42c1a0=_0x3060a9(0x7eb)){const _0x139587=_0x3060a9;return!this[_0x139587(0x58a)][_0x139587(0x41e)][_0x139587(0x2ad)](_0x42c1a0)&&await this['okdb'][_0x139587(0x2d2)](_0x42c1a0,{'sync':!![]}),this[_0x139587(0x58a)][_0x139587(0x787)](_0x42c1a0);}[_0x3060a9(0x346)](_0x4a704b,_0x50d466){const _0x243f96=_0x3060a9,_0x19aaaa=[..._0x4a704b[_0x243f96(0x788)]['getKeys']()][_0x243f96(0x542)](_0xe01d29=>!_0xe01d29[_0x243f96(0x579)]('~')&&!_0xe01d29[_0x243f96(0x579)](_0x243f96(0x2d9)));if(!_0x50d466)return _0x19aaaa;return _0x19aaaa[_0x243f96(0x542)](_0x53e8c5=>_0x50d466['includes'](_0x53e8c5));}[_0x3060a9(0x505)](_0x4a5899,_0x425468){const _0x4949f5=_0x3060a9,_0x456ebb=_0x4a5899[_0x4949f5(0x321)][_0x4949f5(0x2fa)](_0x425468),_0xafce54=_0x4a5899[_0x4949f5(0x788)]['get'](_0x425468)||{},_0x1279d9=[];for(const [,_0x48ea2f]of _0x456ebb?.[_0x4949f5(0x2b3)]??new Map()){const _0x214ebe={'fields':_0x48ea2f[_0x4949f5(0x287)]};if(_0x48ea2f[_0x4949f5(0x7d5)])_0x214ebe['geo']=_0x48ea2f[_0x4949f5(0x7d5)];if(_0x48ea2f[_0x4949f5(0x88c)])_0x214ebe[_0x4949f5(0x88c)]=!![];_0x1279d9['push'](_0x214ebe);}const _0x3dc11a={};for(const [_0x1ef879,_0x4da2af]of Object[_0x4949f5(0x87f)](_0xafce54[_0x4949f5(0x70d)]||{})){_0x3dc11a[_0x1ef879]={'fields':_0x4da2af[_0x4949f5(0x38b)]?.[_0x4949f5(0x53f)],'tokenizer':_0x4da2af['config']?.['tokenizer']};}const _0x3514d3={'indexes':_0x1279d9,'ftsIndexes':_0x3dc11a};return _0xafce54[_0x4949f5(0x2b6)]&&(_0x3514d3[_0x4949f5(0x2b6)]=_0xafce54[_0x4949f5(0x2b6)]),_0x3514d3;}async['exportToStream'](_0x489431,_0x17b7c5={}){const _0x13ae8e=_0x3060a9,{envName:envName='default',types:types=null,includeChanges:includeChanges=![],_noHeader:_noHeader=![]}=_0x17b7c5,_0x1a177a=this[_0x13ae8e(0x801)](envName),_0x1959cf=this[_0x13ae8e(0x346)](_0x1a177a,types);let _0x3bfa75=0x0,_0x5a805c=0x0;!_noHeader&&await _0x252baa(_0x489431,JSON['stringify']({'r':_0x396603,'kdbVersion':require$$3[_0x13ae8e(0x598)],'exportedAt':Date['now'](),'envName':envName})+'\x0a');for(const _0x213b29 of _0x1959cf){const _0x1416b5=_0x1a177a[_0x13ae8e(0x321)][_0x13ae8e(0x2fa)](_0x213b29);if(!_0x1416b5)continue;const _0x3bcc68=this['_typeSchema'](_0x1a177a,_0x213b29);await _0x252baa(_0x489431,JSON[_0x13ae8e(0x2d1)]({'r':_0x33355c,'type':_0x213b29,..._0x3bcc68})+'\x0a'),_0x3bfa75+=await _0x5902dd(_0x489431,_0x1416b5['data'],({key:_0x4ebd38,value:_0x57dadc,version:_0x2e4972})=>JSON[_0x13ae8e(0x2d1)]({'r':_0x596a51,'t':_0x213b29,'k':_0x4ebd38,'v':_0x57dadc,'ver':_0x2e4972}));}return includeChanges&&_0x1a177a[_0x13ae8e(0x6f6)]&&(_0x5a805c=await _0x5902dd(_0x489431,_0x1a177a[_0x13ae8e(0x3ce)],({key:_0x1ec2ce,value:_0x439127})=>JSON[_0x13ae8e(0x2d1)]({'r':_0x2c7ce0,'clock':_0x1ec2ce,'event':_0x439127}))),{'types':_0x1959cf['length'],'records':_0x3bfa75,'changes':_0x5a805c};}async[_0x3060a9(0x7e3)](_0x45d108,_0x34ae38={}){const _0x210532=_0x3060a9;_0x4258d2[_0x210532(0x51a)](_0xcfd171[_0x210532(0x836)](_0x45d108),{'recursive':!![]});const _0x717737=_0x4258d2[_0x210532(0x608)](_0x45d108),_0x118c12=await this['exportToStream'](_0x717737,_0x34ae38);return await new Promise((_0x301c6d,_0x3d2103)=>{const _0x1a5afe=_0x210532;_0x717737[_0x1a5afe(0x63d)](),_0x717737['once'](_0x1a5afe(0x7f5),_0x301c6d),_0x717737['once'](_0x1a5afe(0x6cd),_0x3d2103);}),{..._0x118c12,'filePath':_0x45d108};}async['exportEnvsToStream'](_0x12a4dc,_0x1072ef={}){const _0x32b081=_0x3060a9,{envNames:envNames=null,types:types=null,includeChanges:includeChanges=![]}=_0x1072ef,_0x49987e=[...this[_0x32b081(0x58a)][_0x32b081(0x41e)][_0x32b081(0x818)]()]['filter'](_0x59031e=>!_0x59031e[_0x32b081(0x579)]('~')),_0x16893c=envNames?_0x49987e[_0x32b081(0x542)](_0x83e418=>envNames[_0x32b081(0x1a1)](_0x83e418)):_0x49987e;await _0x252baa(_0x12a4dc,JSON[_0x32b081(0x2d1)]({'r':_0x396603,'kdbVersion':require$$3['version'],'exportedAt':Date[_0x32b081(0x4ec)](),'envNames':_0x16893c})+'\x0a');let _0xf02a28=0x0,_0x385cdc=0x0,_0x4d1d65=0x0;for(const _0x5c030e of _0x16893c){await _0x252baa(_0x12a4dc,JSON[_0x32b081(0x2d1)]({'r':_0x3e42bd,'name':_0x5c030e})+'\x0a');const _0x3c3422=await this[_0x32b081(0x1e8)](_0x12a4dc,{'envName':_0x5c030e,'types':types,'includeChanges':includeChanges,'_noHeader':!![]});_0xf02a28+=_0x3c3422['types'],_0x385cdc+=_0x3c3422[_0x32b081(0x333)],_0x4d1d65+=_0x3c3422[_0x32b081(0x330)];}return{'envs':_0x16893c[_0x32b081(0x6ad)],'types':_0xf02a28,'records':_0x385cdc,'changes':_0x4d1d65};}async[_0x3060a9(0x2c5)](_0x534354,_0x3c3f51={}){const _0x457f02=_0x3060a9,{envName:_0xf6e73b=null,types:_0x250812=null,dropExisting:dropExisting=![],batchSize:batchSize=_0x1201a6,includeChanges:includeChanges=![],onProgress:onProgress=null}=_0x3c3f51;let _0x1507e7=_0xf6e73b??_0x457f02(0x7eb),_0x3f7d55=null,_0x4b05e5=0x0,_0x130387=0x0,_0x19e7d0=0x0,_0x36da0e=null,_0x4a5ee1=[];const _0x21918a=[],_0x5813ad=async()=>{const _0x49b454=_0x457f02;if(!_0x4a5ee1[_0x49b454(0x6ad)]||!_0x36da0e||!_0x3f7d55)return;await _0x3f7d55[_0x49b454(0x863)][_0x49b454(0x826)](()=>{const _0x2e644d=_0x49b454;for(const {k:_0x234289,v:_0x49dcfc,ver:_0x287693}of _0x4a5ee1){_0x3f7d55[_0x2e644d(0x619)](null,_0x36da0e,_0x234289,_0x49dcfc,{'version':_0x287693,'origin':_0x2e644d(0x7af)});}}),_0x130387+=_0x4a5ee1[_0x49b454(0x6ad)],onProgress?.({'type':_0x36da0e,'count':_0x130387}),_0x4a5ee1=[];};await this[_0x457f02(0x88e)](_0x534354,async _0x195b86=>{const _0x4f1148=_0x457f02,_0x206c44=_0x195b86['r'];if(_0x206c44===_0x396603){if(!_0xf6e73b&&_0x195b86[_0x4f1148(0x72a)])_0x1507e7=_0x195b86[_0x4f1148(0x72a)];_0x3f7d55=await this[_0x4f1148(0x1d3)](_0x1507e7);return;}if(!_0x3f7d55)_0x3f7d55=await this[_0x4f1148(0x1d3)](_0x1507e7);if(_0x206c44===_0x3e42bd){await _0x5813ad(),_0x36da0e=null,_0x1507e7=_0xf6e73b??_0x195b86['name'],_0x3f7d55=await this[_0x4f1148(0x1d3)](_0x1507e7);return;}if(_0x206c44===_0x33355c){const {type:_0x284afe,indexes:indexes=[],ftsIndexes:ftsIndexes={},schema:_0x48cea7}=_0x195b86;if(_0x250812&&!_0x250812['includes'](_0x284afe))return;await _0x5813ad(),_0x36da0e=_0x284afe;dropExisting&&_0x3f7d55[_0x4f1148(0x6f1)](_0x284afe)&&await _0x3f7d55[_0x4f1148(0x38d)](_0x284afe);!_0x3f7d55[_0x4f1148(0x6f1)](_0x284afe)&&(await _0x3f7d55[_0x4f1148(0x2ba)](_0x284afe),_0x4b05e5++);for(const _0xa67b77 of indexes){if(!_0x3f7d55[_0x4f1148(0x726)](_0x284afe,_0xa67b77['fields'])){const _0x11dec0={};_0xa67b77[_0x4f1148(0x828)]&&(_0x11dec0['type']=_0x4f1148(0x828),_0x11dec0['precision']=_0xa67b77[_0x4f1148(0x828)][_0x4f1148(0x592)]);if(_0xa67b77[_0x4f1148(0x88c)])_0x11dec0[_0x4f1148(0x88c)]=!![];await _0x3f7d55[_0x4f1148(0x3de)](_0x284afe,_0xa67b77[_0x4f1148(0x53f)],_0x11dec0);}}for(const [_0x2aea31,_0x38276b]of Object[_0x4f1148(0x87f)](ftsIndexes)){!this[_0x4f1148(0x58a)][_0x4f1148(0x659)][_0x4f1148(0x2ad)](_0x284afe,_0x2aea31,_0x3f7d55)&&await this[_0x4f1148(0x58a)][_0x4f1148(0x659)][_0x4f1148(0x661)](_0x284afe,_0x2aea31,{'fields':_0x38276b[_0x4f1148(0x53f)],'tokenizer':_0x38276b['tokenizer']},undefined,_0x3f7d55);}_0x48cea7?.['definition']&&_0x21918a['push']({'env':_0x3f7d55,'type':_0x284afe,'schema':_0x48cea7});return;}if(_0x206c44===_0x596a51){if(_0x250812&&!_0x250812['includes'](_0x195b86['t']))return;_0x195b86['t']!==_0x36da0e&&(await _0x5813ad(),_0x36da0e=_0x195b86['t']);_0x4a5ee1[_0x4f1148(0x557)]({'k':_0x195b86['k'],'v':_0x195b86['v'],'ver':_0x195b86[_0x4f1148(0x85e)]});if(_0x4a5ee1[_0x4f1148(0x6ad)]>=batchSize)await _0x5813ad();return;}_0x206c44===_0x2c7ce0&&includeChanges&&_0x3f7d55['_sync']&&(_0x3f7d55['clockToChangeDb'][_0x4f1148(0x422)](_0x195b86[_0x4f1148(0x21b)],_0x195b86[_0x4f1148(0x698)]),_0x19e7d0++);}),await _0x5813ad();for(const {env:_0x1499b4,type:_0x555b34,schema:_0x34091c}of _0x21918a){try{await _0x1499b4[_0x457f02(0x626)](_0x555b34,_0x34091c);}catch{if(_0x34091c[_0x457f02(0x285)])try{await _0x1499b4['setSchema'](_0x555b34,{..._0x34091c,'enforce':![]});}catch{}}}return{'types':_0x4b05e5,'records':_0x130387,'changes':_0x19e7d0};}async['importFromFile'](_0x3f68e4,_0x53f931={}){const _0x18ce1d=_0x3060a9,_0xc80c71=_0x4258d2[_0x18ce1d(0x40b)](_0x3f68e4,{'encoding':_0x18ce1d(0x88a)});return this[_0x18ce1d(0x2c5)](_0xc80c71,_0x53f931);}[_0x3060a9(0x88e)](_0x566035,_0x4ecbcc){return new Promise((_0x5d8565,_0x3d9438)=>{const _0x46b835=_0x4c4a;let _0x310cca='',_0x32a479=Promise[_0x46b835(0x8c2)]();const _0x47a7ad=async _0x522190=>{const _0x2aaf4c=_0x46b835;_0x310cca+=_0x522190;const _0x5057ca=_0x310cca[_0x2aaf4c(0x84e)]('\x0a');_0x310cca=_0x5057ca['pop']();for(const _0x4242ab of _0x5057ca){const _0x41de41=_0x4242ab[_0x2aaf4c(0x48b)]();if(!_0x41de41)continue;let _0x4a94c0;try{_0x4a94c0=JSON[_0x2aaf4c(0x7d3)](_0x41de41);}catch{continue;}await _0x4ecbcc(_0x4a94c0);}};_0x566035['on'](_0x46b835(0x2a3),_0x216e86=>{_0x32a479=_0x32a479['then'](()=>_0x47a7ad(String(_0x216e86)));}),_0x566035['on']('end',()=>{const _0x4114ff=_0x46b835;_0x32a479[_0x4114ff(0x4ed)](async()=>{const _0x1429a2=_0x4114ff,_0xaddc13=_0x310cca[_0x1429a2(0x48b)]();if(_0xaddc13)try{await _0x4ecbcc(JSON[_0x1429a2(0x7d3)](_0xaddc13));}catch{}_0x5d8565();})[_0x4114ff(0x39e)](_0x3d9438);}),_0x566035['on'](_0x46b835(0x6cd),_0x3d9438);});}async[_0x3060a9(0x7b4)](_0x5a1dd1,_0x4ae229={}){const _0x173125=_0x3060a9,{envNames:envNames=null,compact:compact=!![]}=_0x4ae229,_0x3fbe3e=this[_0x173125(0x58a)],_0x2982f6=_0xcfd171['resolve'](_0x3fbe3e[_0x173125(0x5be)]),_0x3817aa=_0xcfd171[_0x173125(0x8c2)](_0x5a1dd1),_0x3168e1=_0xcfd171[_0x173125(0x673)](_0x2982f6,_0x3817aa);if(_0x3168e1===''||!(_0x3168e1[_0x173125(0x579)]('..')||_0xcfd171[_0x173125(0x6f4)](_0x3168e1)))throw new _0x3b8dd4('backup\x20destination\x20\x22'+_0x3817aa+_0x173125(0x602)+_0x2982f6+_0x173125(0x6dc),_0x173125(0x49d));if(_0x4258d2['existsSync'](_0x3817aa)&&_0x4258d2[_0x173125(0x859)](_0x3817aa)[_0x173125(0x6ad)]>0x0)throw new _0x3b8dd4(_0x173125(0x651)+_0x3817aa+'\x22\x20is\x20not\x20empty\x20—\x20backups\x20never\x20overwrite;\x20choose\x20a\x20new\x20directory',_0x173125(0x6aa));_0x4258d2[_0x173125(0x51a)](_0x3817aa,{'recursive':!![]});const _0x420420=envNames?new Set([...envNames,_0x173125(0x7a6)]):null,_0x5c74e6=[],_0x1b24e1=[],_0x4fbdf9=[];for(const [_0x4a10f9,_0x533b51]of[..._0x3fbe3e['_envs'][_0x173125(0x87f)]()]){if(_0x420420&&!_0x420420[_0x173125(0x2ad)](_0x4a10f9))continue;if(_0x4a10f9==='~processes')continue;if(!_0x533b51[_0x173125(0x841)]||!_0x533b51['db']){_0x1b24e1['push']({'name':_0x4a10f9,'reason':_0x173125(0x229)});continue;}const _0x1bf5a3=_0xcfd171[_0x173125(0x8c2)](_0x533b51['path']),_0x296378=_0xcfd171[_0x173125(0x673)](_0x2982f6,_0x1bf5a3),_0x395fa3=_0x296378===''||_0x296378['startsWith']('..')||_0xcfd171[_0x173125(0x6f4)](_0x296378),_0x5b1731=_0x395fa3?_0x3fbe3e[_0x173125(0x616)](_0x4a10f9):_0x296378,_0x455dcf=_0xcfd171['join'](_0x3817aa,_0x5b1731);_0x4258d2[_0x173125(0x51a)](_0x455dcf,{'recursive':!![]});const _0x537459=_0xcfd171[_0x173125(0x1c9)](_0x1bf5a3,_0x173125(0x6a1));let _0x12536d=![];if(_0x4258d2[_0x173125(0x5b6)](_0xcfd171[_0x173125(0x1c9)](_0x537459,_0x173125(0x463)))){const _0x5bddf5=_0xcfd171[_0x173125(0x1c9)](_0x455dcf,'time-machine');_0x4258d2[_0x173125(0x51a)](_0x5bddf5,{'recursive':!![]}),await _0x23bb79(_0x533b51[_0x173125(0x510)]?.[_0x173125(0x478)]?.['db'],_0x537459,_0x5bddf5,compact),_0x12536d=!![];}let _0x4ce284=0x0;try{_0x4ce284=_0x4258d2[_0x173125(0x883)](_0xcfd171['join'](_0x1bf5a3,'data.mdb'))[_0x173125(0x7d1)];}catch{}await _0x533b51['db'][_0x173125(0x7b4)](_0x455dcf,Boolean(compact));let _0x2141be=0x0;try{_0x2141be=_0x4258d2['statSync'](_0xcfd171[_0x173125(0x1c9)](_0x455dcf,_0x173125(0x463)))[_0x173125(0x7d1)];}catch{}_0x5c74e6[_0x173125(0x557)]({'name':_0x4a10f9,'dest':_0x455dcf,'sizeBefore':_0x4ce284,'sizeAfter':_0x2141be,'timeMachine':_0x12536d}),_0x4fbdf9['push']({'name':_0x4a10f9,'dir':_0x5b1731,'timeMachine':_0x12536d,..._0x395fa3?{'outOfTree':_0x395fa3,'sourcePath':_0x1bf5a3}:{}});}for(const [_0x567ff5,_0x4c705b]of _0x3fbe3e[_0x173125(0x59d)]??[]){if(_0x420420&&!_0x420420[_0x173125(0x2ad)](_0x567ff5))continue;_0x1b24e1[_0x173125(0x557)]({'name':_0x567ff5,'reason':'quarantined:\x20'+(_0x4c705b?.[_0x173125(0x6cd)]??_0x173125(0x555))});}const _0x5032a1={'count':0x0,'bytes':0x0},_0x419e26=_0x3fbe3e[_0x173125(0x2a1)]?.[_0x173125(0x806)];_0x419e26&&_0x4258d2[_0x173125(0x5b6)](_0x419e26)&&await this['_copyDir'](_0x419e26,_0xcfd171[_0x173125(0x1c9)](_0x3817aa,_0x173125(0x1b4)),_0x5032a1,(_0x15638a,_0x39ec19)=>_0x39ec19===0x0&&_0x15638a==='tmp');const _0x17d804=_0xcfd171[_0x173125(0x1c9)](_0x3817aa,_0x39d426),_0x174ecc={'format':0x1,'okdbVersion':require$$3['version'],'createdAt':new Date()['toISOString'](),'source':_0x2982f6,'compact':Boolean(compact),'envs':_0x4fbdf9,'blobs':_0x5032a1,'skipped':_0x1b24e1,'excluded':{'~fts':_0x173125(0x840),'~processes':_0x173125(0x3ee)}};return _0x4258d2[_0x173125(0x497)](_0x17d804,JSON[_0x173125(0x2d1)](_0x174ecc,null,0x2)+'\x0a'),{'ok':!![],'dest':_0x3817aa,'envs':_0x5c74e6,'blobs':_0x5032a1,'skipped':_0x1b24e1,'manifest':_0x17d804};}[_0x3060a9(0x59a)](){const _0x1cc96a=_0x3060a9,_0x1ec5ec=this['okdb']['options']?.[_0x1cc96a(0x7b4)]?.[_0x1cc96a(0x36c)];if(_0x1ec5ec)return _0xcfd171[_0x1cc96a(0x8c2)](_0x1ec5ec);const _0x466c3d=_0xcfd171[_0x1cc96a(0x8c2)](this[_0x1cc96a(0x58a)][_0x1cc96a(0x5be)]);return _0xcfd171[_0x1cc96a(0x1c9)](_0xcfd171[_0x1cc96a(0x836)](_0x466c3d),_0xcfd171[_0x1cc96a(0x778)](_0x466c3d)+_0x1cc96a(0x637));}[_0x3060a9(0x518)](_0x6a5d5d){const _0x46b445=_0x3060a9,_0x557afa=this[_0x46b445(0x59a)]();_0x4258d2[_0x46b445(0x51a)](_0x557afa,{'recursive':!![]});const _0x4b4347=_0x4258d2[_0x46b445(0x750)](_0x557afa),_0x50ee3e=_0x6a5d5d==null||String(_0x6a5d5d)[_0x46b445(0x48b)]()===''?'okdb-backup-'+new Date()[_0x46b445(0x611)]()[_0x46b445(0x813)](/[:.]/g,'-'):String(_0x6a5d5d)[_0x46b445(0x48b)](),_0x517981=_0xcfd171[_0x46b445(0x8c2)](_0x557afa,_0x50ee3e);let _0x2bf72f=_0x517981;const _0x174094=[];while(!_0x4258d2[_0x46b445(0x5b6)](_0x2bf72f)){_0x174094['unshift'](_0xcfd171[_0x46b445(0x778)](_0x2bf72f));const _0x149d0f=_0xcfd171[_0x46b445(0x836)](_0x2bf72f);if(_0x149d0f===_0x2bf72f)break;_0x2bf72f=_0x149d0f;}const _0xa26883=_0xcfd171[_0x46b445(0x1c9)](_0x4258d2[_0x46b445(0x750)](_0x2bf72f),..._0x174094),_0x10ffe5=_0xcfd171[_0x46b445(0x673)](_0x4b4347,_0xa26883);if(_0x10ffe5===''||_0x10ffe5[_0x46b445(0x579)]('..')||_0xcfd171[_0x46b445(0x6f4)](_0x10ffe5))throw new _0x3b8dd4(_0x46b445(0x651)+_0x50ee3e+_0x46b445(0x3fe)+_0x557afa+_0x46b445(0x617),_0x46b445(0x584),{'root':_0x557afa,'destDir':_0x50ee3e});return{'root':_0x557afa,'dest':_0xa26883};}async['_copyDir'](_0x554158,_0x1fefe7,_0x27a0a5={'count':0x0,'bytes':0x0},_0x2886b5=null,_0x2cffc3=0x0){const _0x1d833f=_0x3060a9;_0x4258d2[_0x1d833f(0x51a)](_0x1fefe7,{'recursive':!![]});for(const _0x31af24 of _0x4258d2[_0x1d833f(0x859)](_0x554158,{'withFileTypes':!![]})){if(_0x2886b5?.(_0x31af24[_0x1d833f(0x4f9)],_0x2cffc3))continue;const _0x51264e=_0xcfd171[_0x1d833f(0x1c9)](_0x554158,_0x31af24[_0x1d833f(0x4f9)]),_0x2f87f5=_0xcfd171[_0x1d833f(0x1c9)](_0x1fefe7,_0x31af24['name']);if(_0x31af24[_0x1d833f(0x834)]())await this[_0x1d833f(0x67d)](_0x51264e,_0x2f87f5,_0x27a0a5,_0x2886b5,_0x2cffc3+0x1);else{try{await _0x4258d2['promises']['copyFile'](_0x51264e,_0x2f87f5);}catch(_0x2690a1){if(_0x2690a1?.[_0x1d833f(0x2dc)]==='ENOENT')continue;throw _0x2690a1;}_0x27a0a5[_0x1d833f(0x430)]++;try{_0x27a0a5['bytes']+=_0x4258d2[_0x1d833f(0x883)](_0x2f87f5)[_0x1d833f(0x7d1)];}catch{}}}return _0x27a0a5;}async[_0x3060a9(0x678)](_0x5082e8={}){const _0x3f1490=_0x3060a9,{envName:envName=_0x3f1490(0x7eb),types:types=null,includeChanges:includeChanges=![]}=_0x5082e8,_0x3cec73={'types':{},'changes':[]},_0x354ded=[],_0x534580=new require$$5['Writable']({'write'(_0x4475c4,_0x5a1d31,_0x498e21){const _0x1f3380=_0x3f1490;_0x354ded[_0x1f3380(0x557)](String(_0x4475c4)),_0x498e21();}});await this['exportToStream'](_0x534580,{'envName':envName,'types':types,'includeChanges':includeChanges});for(const _0x1a289f of _0x354ded[_0x3f1490(0x1c9)]('')[_0x3f1490(0x84e)]('\x0a')){const _0x5e4d20=_0x1a289f[_0x3f1490(0x48b)]();if(!_0x5e4d20)continue;let _0x184858;try{_0x184858=JSON[_0x3f1490(0x7d3)](_0x5e4d20);}catch{continue;}if(_0x184858['r']===_0x33355c){if(!_0x3cec73[_0x3f1490(0x427)][_0x184858[_0x3f1490(0x4fa)]])_0x3cec73[_0x3f1490(0x427)][_0x184858[_0x3f1490(0x4fa)]]={'entries':[]};if(_0x184858[_0x3f1490(0x261)])_0x3cec73[_0x3f1490(0x427)][_0x184858[_0x3f1490(0x4fa)]][_0x3f1490(0x261)]=_0x184858[_0x3f1490(0x261)];if(_0x184858[_0x3f1490(0x70d)])_0x3cec73['types'][_0x184858[_0x3f1490(0x4fa)]][_0x3f1490(0x70d)]=_0x184858[_0x3f1490(0x70d)];if(_0x184858[_0x3f1490(0x2b6)])_0x3cec73['types'][_0x184858[_0x3f1490(0x4fa)]]['schema']=_0x184858[_0x3f1490(0x2b6)];}else{if(_0x184858['r']===_0x596a51){if(!_0x3cec73[_0x3f1490(0x427)][_0x184858['t']])_0x3cec73[_0x3f1490(0x427)][_0x184858['t']]={'entries':[]};_0x3cec73[_0x3f1490(0x427)][_0x184858['t']]['entries'][_0x3f1490(0x557)]({'key':_0x184858['k'],'value':_0x184858['v'],'version':_0x184858['ver']});}else _0x184858['r']===_0x2c7ce0&&_0x3cec73[_0x3f1490(0x330)][_0x3f1490(0x557)]({'clock':_0x184858[_0x3f1490(0x21b)],'event':_0x184858['event']});}}return _0x3cec73;}async[_0x3060a9(0x7af)](_0x826cd6,_0x53fa74={}){const _0x50d22d=_0x3060a9,_0x248afc=[];for(const [_0x4da8f3,_0x2e258e]of Object[_0x50d22d(0x87f)](_0x826cd6['types']||{})){const _0x27271a={'r':_0x33355c,'type':_0x4da8f3,'indexes':_0x2e258e['indexes']||[],'ftsIndexes':_0x2e258e[_0x50d22d(0x70d)]||{}};if(_0x2e258e[_0x50d22d(0x2b6)])_0x27271a['schema']=_0x2e258e['schema'];_0x248afc[_0x50d22d(0x557)](JSON['stringify'](_0x27271a));for(const {key:_0x30f5ed,value:_0x497f89,version:_0x43beda}of _0x2e258e[_0x50d22d(0x87f)]||[]){_0x248afc['push'](JSON[_0x50d22d(0x2d1)]({'r':_0x596a51,'t':_0x4da8f3,'k':_0x30f5ed,'v':_0x497f89,'ver':_0x43beda}));}}for(const {clock:_0x5dc071,event:_0x16814a}of _0x826cd6[_0x50d22d(0x330)]||[]){_0x248afc[_0x50d22d(0x557)](JSON[_0x50d22d(0x2d1)]({'r':_0x2c7ce0,'clock':_0x5dc071,'event':_0x16814a}));}const {Readable:_0x5a28ef}=require$$5,_0x398be5=_0x5a28ef[_0x50d22d(0x215)](_0x248afc[_0x50d22d(0x1c9)]('\x0a')+'\x0a');return this['importFromStream'](_0x398be5,{..._0x53fa74,'dropExisting':_0x53fa74['dropExisting']??!![]});}async['exportJSON']({pretty:pretty=![]}={}){const _0x3700aa=_0x3060a9,_0x510c6e=await this[_0x3700aa(0x678)]();return JSON[_0x3700aa(0x2d1)](_0x510c6e,null,pretty?0x2:0x0);}async[_0x3060a9(0x867)](_0x48c65b){const _0x2b4087=_0x3060a9,_0x52cd64=JSON[_0x2b4087(0x7d3)](_0x48c65b);return this[_0x2b4087(0x7af)](_0x52cd64);}async[_0x3060a9(0x25e)](_0xf4be53){const _0x2077e4=_0x3060a9;if(!this['okdb'][_0x2077e4(0x2a1)])throw new Error(_0x2077e4(0x1b5));const _0x1780f7=this[_0x2077e4(0x58a)][_0x2077e4(0x2a1)][_0x2077e4(0x806)];let _0x183f0a=0x0,_0x4c92b8=0x0;const _0x1b393d=_0x2c0c2b=>{const _0x466415=_0x2077e4;if(!_0x4258d2[_0x466415(0x5b6)](_0x2c0c2b))return;for(const _0x378bce of _0x4258d2[_0x466415(0x859)](_0x2c0c2b,{'withFileTypes':!![]})){const _0x5a5ba1=_0xcfd171[_0x466415(0x1c9)](_0x2c0c2b,_0x378bce[_0x466415(0x4f9)]);if(_0x378bce[_0x466415(0x834)]()){if(_0x378bce['name']===_0x466415(0x6eb))continue;_0x1b393d(_0x5a5ba1);}else{const _0x2bf84b=_0xcfd171[_0x466415(0x778)](_0xcfd171[_0x466415(0x836)](_0x5a5ba1)),_0x2490ee=_0x2bf84b+_0x378bce[_0x466415(0x4f9)],_0x34dea7=_0xcfd171[_0x466415(0x1c9)](_0xf4be53,_0x2490ee['slice'](0x0,0x2)),_0x2e3373=_0xcfd171['join'](_0x34dea7,_0x2490ee['slice'](0x2));_0x4258d2[_0x466415(0x51a)](_0x34dea7,{'recursive':!![]}),_0x4258d2['copyFileSync'](_0x5a5ba1,_0x2e3373),_0x183f0a++;try{_0x4c92b8+=_0x4258d2['statSync'](_0x5a5ba1)['size'];}catch{}}}};return _0x4258d2[_0x2077e4(0x51a)](_0xf4be53,{'recursive':!![]}),_0x1b393d(_0x1780f7),{'count':_0x183f0a,'bytes':_0x4c92b8};}async[_0x3060a9(0x268)](_0x15d8cd){const _0x517f3c=_0x3060a9;if(!this[_0x517f3c(0x58a)][_0x517f3c(0x2a1)])throw new Error(_0x517f3c(0x1b5));await this[_0x517f3c(0x58a)]['files']['_ensure']();let _0x38a0fb=0x0,_0x38a8ee=0x0;const _0x84d207=_0x5230f4=>{const _0x5e0379=_0x517f3c;if(!_0x4258d2[_0x5e0379(0x5b6)](_0x5230f4))return;for(const _0x5e166d of _0x4258d2[_0x5e0379(0x859)](_0x5230f4,{'withFileTypes':!![]})){const _0x4e6d2b=_0xcfd171[_0x5e0379(0x1c9)](_0x5230f4,_0x5e166d[_0x5e0379(0x4f9)]);if(_0x5e166d[_0x5e0379(0x834)]())_0x84d207(_0x4e6d2b);else{const _0x3beba5=_0xcfd171['basename'](_0xcfd171[_0x5e0379(0x836)](_0x4e6d2b)),_0x3e9b12=_0x3beba5+_0x5e166d[_0x5e0379(0x4f9)],_0xda43ac=this[_0x5e0379(0x58a)]['files'][_0x5e0379(0x23a)](_0x3e9b12);if(_0x4258d2[_0x5e0379(0x5b6)](_0xda43ac)){_0x38a8ee++;continue;}const _0x97fb18=_0xcfd171[_0x5e0379(0x836)](_0xda43ac);_0x4258d2[_0x5e0379(0x51a)](_0x97fb18,{'recursive':!![]}),_0x4258d2[_0x5e0379(0x251)](_0x4e6d2b,_0xda43ac);const _0x3afdb5=this['okdb'][_0x5e0379(0x2a1)]['_countFileRefs'](_0x3e9b12);this[_0x5e0379(0x58a)][_0x5e0379(0x2a1)][_0x5e0379(0x446)]?.[_0x5e0379(0x422)](_0x3e9b12,{'refs':_0x3afdb5}),_0x38a0fb++;}}};return _0x84d207(_0x15d8cd),{'imported':_0x38a0fb,'skipped':_0x38a8ee};}[_0x3060a9(0x6a0)](){const _0x2211fd=_0x3060a9,_0x329025=[];for(const [,_0x43913d]of this[_0x2211fd(0x58a)][_0x2211fd(0x41e)]){if(_0x43913d[_0x2211fd(0x6f6)]&&_0x43913d[_0x2211fd(0x6f1)](_0x2211fd(0x6a5)))_0x329025['push'](_0x43913d);}return _0x329025;}async[_0x3060a9(0x677)](){const _0x46a806=_0x3060a9;if(!this[_0x46a806(0x58a)][_0x46a806(0x2a1)])throw new Error('files\x20feature\x20not\x20available');await this[_0x46a806(0x58a)][_0x46a806(0x2a1)][_0x46a806(0x3cd)]();const _0x466a5c=[],_0x7ccb47=this[_0x46a806(0x58a)][_0x46a806(0x2a1)];for(const _0xac1f51 of this[_0x46a806(0x6a0)]()){for(const {key:_0x100c81,value:_0x53dd2e}of _0xac1f51['getRange'](_0x46a806(0x6a5))){if(!_0x53dd2e[_0x46a806(0x507)])continue;const _0x296b56=_0x7ccb47[_0x46a806(0x23a)](_0x53dd2e[_0x46a806(0x507)]);!_0x4258d2[_0x46a806(0x5b6)](_0x296b56)&&_0x466a5c[_0x46a806(0x557)]({'type':_0x46a806(0x1b1),'env':_0xac1f51[_0x46a806(0x4f9)],'id':String(_0x100c81),'hash':_0x53dd2e[_0x46a806(0x507)],'message':_0x46a806(0x42b)+_0x100c81+'\x22\x20in\x20env\x20\x22'+_0xac1f51[_0x46a806(0x4f9)]+_0x46a806(0x6b3)+_0x53dd2e[_0x46a806(0x507)]['slice'](0x0,0x8)+'…)'});const _0x5cc7d2=_0x7ccb47[_0x46a806(0x446)]?.[_0x46a806(0x2fa)](_0x53dd2e[_0x46a806(0x507)]);(!_0x5cc7d2||_0x5cc7d2['refs']<=0x0)&&_0x466a5c[_0x46a806(0x557)]({'type':_0x46a806(0x833),'env':_0xac1f51['name'],'id':String(_0x100c81),'hash':_0x53dd2e[_0x46a806(0x507)],'message':'Blob\x20ref-count\x20is\x20zero\x20for\x20~files\x20record\x20\x22'+_0x100c81+'\x22\x20in\x20env\x20\x22'+_0xac1f51['name']+_0x46a806(0x6b3)+_0x53dd2e[_0x46a806(0x507)][_0x46a806(0x27f)](0x0,0x8)+'…)'});}}const _0x1efa1d=new Set();for(const _0x22c4b9 of this[_0x46a806(0x6a0)]()){for(const {value:_0x5b0557}of _0x22c4b9[_0x46a806(0x3c9)](_0x46a806(0x6a5))){if(_0x5b0557['hash'])_0x1efa1d[_0x46a806(0x4da)](_0x5b0557[_0x46a806(0x507)]);}}const _0x4381cb=_0x2ba01b=>{const _0x31ea33=_0x46a806;if(!_0x4258d2['existsSync'](_0x2ba01b))return;for(const _0x37b06c of _0x4258d2[_0x31ea33(0x859)](_0x2ba01b,{'withFileTypes':!![]})){const _0x2d2863=_0xcfd171[_0x31ea33(0x1c9)](_0x2ba01b,_0x37b06c[_0x31ea33(0x4f9)]);if(_0x37b06c[_0x31ea33(0x834)]()){if(_0x37b06c[_0x31ea33(0x4f9)]===_0x31ea33(0x6eb))continue;_0x4381cb(_0x2d2863);}else{const _0x5bb85a=_0xcfd171[_0x31ea33(0x778)](_0xcfd171[_0x31ea33(0x836)](_0x2d2863)),_0x59b551=_0x5bb85a+_0x37b06c[_0x31ea33(0x4f9)];!_0x1efa1d[_0x31ea33(0x2ad)](_0x59b551)&&_0x466a5c[_0x31ea33(0x557)]({'type':_0x31ea33(0x61e),'hash':_0x59b551,'message':_0x31ea33(0x1fe)+_0x59b551['slice'](0x0,0x8)+'…)'});}}};return _0x4381cb(_0x7ccb47[_0x46a806(0x806)]),_0x466a5c;}async[_0x3060a9(0x343)](){const _0x3c5259=_0x3060a9;if(!this[_0x3c5259(0x58a)][_0x3c5259(0x2a1)])throw new Error(_0x3c5259(0x1b5));await this[_0x3c5259(0x58a)][_0x3c5259(0x2a1)][_0x3c5259(0x3cd)]();const _0x4f6e17=this[_0x3c5259(0x58a)][_0x3c5259(0x2a1)]['_blobStatusDb'];if(!_0x4f6e17)throw new Error(_0x3c5259(0x4c0));const _0x59d7d9=[];for(const {key:_0x10808d}of _0x4f6e17['getRange']())_0x59d7d9[_0x3c5259(0x557)](_0x10808d);for(const _0x1ce08e of _0x59d7d9)_0x4f6e17[_0x3c5259(0x8a6)](_0x1ce08e);const _0x7a4079=new Map();for(const _0x3b602e of this[_0x3c5259(0x6a0)]()){for(const {value:_0x516bf7}of _0x3b602e['getRange']('~files')){_0x516bf7[_0x3c5259(0x507)]&&_0x7a4079[_0x3c5259(0x259)](_0x516bf7['hash'],(_0x7a4079[_0x3c5259(0x2fa)](_0x516bf7[_0x3c5259(0x507)])??0x0)+0x1);}}for(const [_0x578a67,_0x494fc3]of _0x7a4079){_0x4f6e17[_0x3c5259(0x422)](_0x578a67,{'refs':_0x494fc3});}return{'rebuilt':_0x7a4079[_0x3c5259(0x7d1)]};}}return okdbMigrate[_0x3060a9(0x7ac)]=_0x1dfedf,okdbMigrate['exports'][_0x3060a9(0x8be)]=_0x39d426,okdbMigrate[_0x3060a9(0x7ac)];}var okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x304dcc=require$$2$1;function _0x5e5de7(_0x24d5a9,_0x5567bd){const _0x22acaf=_0x4c4a;return _0x304dcc[_0x22acaf(0x6a7)](_0x22acaf(0x1ea),_0x5567bd)[_0x22acaf(0x56e)](_0x24d5a9)[_0x22acaf(0x656)](_0x22acaf(0x76d));}function _0x1fe561(_0x38ad84,_0x1a2fae){const _0x21075c=_0x4c4a;if(typeof _0x38ad84!=='string'||typeof _0x1a2fae!==_0x21075c(0x1d2))return![];if(Buffer['byteLength'](_0x38ad84)!==Buffer['byteLength'](_0x1a2fae))return![];return _0x304dcc[_0x21075c(0x2fb)](Buffer[_0x21075c(0x215)](_0x38ad84),Buffer['from'](_0x1a2fae));}function _0x35c5e5(_0x45ebe9){const _0x492cfb=_0x4c4a;if(!_0x45ebe9?.[_0x492cfb(0x579)](_0x492cfb(0x4e2)))return null;return _0x45ebe9[_0x492cfb(0x27f)](0x7);}function _0x370e89(_0x259d6e=0x20){const _0x7f24ef=_0x4c4a;return _0x304dcc[_0x7f24ef(0x41a)](_0x259d6e)[_0x7f24ef(0x4b9)](_0x7f24ef(0x76d));}function _0x6ab7c5(_0x572a0b){const _0x4dbc3c=_0x4c4a;return _0x304dcc[_0x4dbc3c(0x3b9)](_0x4dbc3c(0x1ea))[_0x4dbc3c(0x56e)](_0x572a0b)['digest'](_0x4dbc3c(0x6b1));}function _0x5e798e(_0xc36ba7,_0x10a0c8,_0x447d4c=0x36ee80){const _0x2f111c=_0x4c4a;if(!_0x10a0c8)throw new Error(_0x2f111c(0x556));const _0x1243be=Date[_0x2f111c(0x4ec)](),_0x3d469e=Buffer['from'](JSON[_0x2f111c(0x2d1)]({'iat':_0x1243be,'exp':_0x1243be+_0x447d4c,'sub':_0xc36ba7?.['id']??_0xc36ba7?.[_0x2f111c(0x6f3)]??null,'username':_0xc36ba7?.[_0x2f111c(0x479)]??_0xc36ba7?.[_0x2f111c(0x4f9)]??null,'roles':Array[_0x2f111c(0x59b)](_0xc36ba7?.[_0x2f111c(0x615)])?_0xc36ba7[_0x2f111c(0x615)]:[]}))['toString']('base64url'),_0x54db80=_0x5e5de7(_0x3d469e,_0x10a0c8);return _0x3d469e+'.'+_0x54db80;}function _0x2d4fa7(_0x381be8,_0x333835){const _0x455e39=_0x4c4a;if(!_0x333835||typeof _0x381be8!==_0x455e39(0x1d2))return null;const [_0x1eba24,_0x29596d]=_0x381be8[_0x455e39(0x84e)]('.');if(!_0x1eba24||!_0x29596d)return null;const _0x338edb=_0x5e5de7(_0x1eba24,_0x333835);if(!_0x1fe561(_0x29596d,_0x338edb))return null;try{const _0x2d6569=JSON[_0x455e39(0x7d3)](Buffer[_0x455e39(0x215)](_0x1eba24,_0x455e39(0x76d))[_0x455e39(0x4b9)]()),_0x2c57bd=0x7530;if(Date[_0x455e39(0x4ec)]()>Number(_0x2d6569?.['exp']??0x0)+_0x2c57bd)return null;return _0x2d6569;}catch{return null;}}async function _0x49962e(_0x28728d){return new Promise((_0x4dd88b,_0x57d7f3)=>{const _0x4b4449=_0x4c4a,_0x20c29c=_0x304dcc[_0x4b4449(0x41a)](0x10);_0x304dcc[_0x4b4449(0x3df)](_0x28728d,_0x20c29c,0x40,(_0x27a742,_0x351bef)=>{const _0x3e4d5c=_0x4b4449;if(_0x27a742)return _0x57d7f3(_0x27a742);_0x4dd88b(_0x20c29c['toString'](_0x3e4d5c(0x6b1))+':'+_0x351bef[_0x3e4d5c(0x4b9)]('hex'));});});}async function _0x58ea25(_0x15e038,_0x45c52c){const _0x599d9e=_0x4c4a;if(typeof _0x45c52c!==_0x599d9e(0x1d2))return![];const [_0xf2c297,_0x7db435]=_0x45c52c['split'](':');if(!_0xf2c297||!_0x7db435)return![];const _0x924c6e=Buffer[_0x599d9e(0x215)](_0xf2c297,_0x599d9e(0x6b1)),_0x21c9ac=Buffer[_0x599d9e(0x215)](_0x7db435,_0x599d9e(0x6b1));if(_0x21c9ac['length']!==0x40)return![];return new Promise((_0x53076c,_0x2efbe5)=>{const _0x1991be=_0x599d9e;_0x304dcc[_0x1991be(0x3df)](_0x15e038,_0x924c6e,0x40,(_0x45e063,_0x4b6af6)=>{if(_0x45e063)return _0x2efbe5(_0x45e063);_0x53076c(_0x304dcc['timingSafeEqual'](_0x4b6af6,_0x21c9ac));});});}return okdbAuthTokens={'hmac':_0x5e5de7,'timingSafeEqual':_0x1fe561,'parseBearer':_0x35c5e5,'randomToken':_0x370e89,'hashToken':_0x6ab7c5,'issueToken':_0x5e798e,'authenticateToken':_0x2d4fa7,'hashPassword':_0x49962e,'verifyPassword':_0x58ea25},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x33d98f=_0x1a2e0d;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0xb4a118=require$$0$2,_0x47377a=_0x33d98f(0x896),_0x2d0980=new Uint8Array(0x100)[_0x33d98f(0x199)](0xff);for(let _0x224d86=0x0;_0x224d86<_0x47377a[_0x33d98f(0x6ad)];_0x224d86++){_0x2d0980[_0x47377a[_0x33d98f(0x384)](_0x224d86)]=_0x224d86,_0x2d0980[_0x47377a['charCodeAt'](_0x224d86)+0x20]=_0x224d86;}_0x2d0980['O'['charCodeAt'](0x0)]=0x0,_0x2d0980['o'[_0x33d98f(0x384)](0x0)]=0x0,_0x2d0980['I'[_0x33d98f(0x384)](0x0)]=0x1,_0x2d0980['i'['charCodeAt'](0x0)]=0x1,_0x2d0980['L'['charCodeAt'](0x0)]=0x1,_0x2d0980['l'[_0x33d98f(0x384)](0x0)]=0x1;function _0x12b7b4(_0xb41916){let _0x4661a6=0x0,_0x335e85=0x0,_0x3eced6='';for(let _0x37aee7=0x0;_0x37aee7<_0xb41916['length'];_0x37aee7++){_0x335e85=_0x335e85<<0x8|_0xb41916[_0x37aee7],_0x4661a6+=0x8;while(_0x4661a6>=0x5){_0x4661a6-=0x5,_0x3eced6+=_0x47377a[_0x335e85>>>_0x4661a6&0x1f];}}return _0x4661a6>0x0&&(_0x3eced6+=_0x47377a[_0x335e85<<0x5-_0x4661a6&0x1f]),_0x3eced6;}function _0x10301d(_0x3d1b95){const _0x1eb9ea=_0x33d98f;_0x3d1b95=_0x3d1b95[_0x1eb9ea(0x813)](/-/g,'')[_0x1eb9ea(0x2e6)]();let _0x1e9405=0x0,_0x108d78=0x0;const _0x13ad56=[];for(let _0x2377e4=0x0;_0x2377e4<_0x3d1b95['length'];_0x2377e4++){const _0x3ee2a9=_0x2d0980[_0x3d1b95[_0x1eb9ea(0x384)](_0x2377e4)];if(_0x3ee2a9===0xff)continue;_0x108d78=_0x108d78<<0x5|_0x3ee2a9,_0x1e9405+=0x5,_0x1e9405>=0x8&&(_0x1e9405-=0x8,_0x13ad56[_0x1eb9ea(0x557)](_0x108d78>>>_0x1e9405&0xff));}return Buffer[_0x1eb9ea(0x215)](_0x13ad56);}const _0x408615=[_0x33d98f(0x6d9),_0x33d98f(0x314),_0x33d98f(0x38c),_0x33d98f(0x659),_0x33d98f(0x510),_0x33d98f(0x59f),_0x33d98f(0x861),_0x33d98f(0x2a1)],_0x5e8bfc=0x0,_0xf4bd4b=0x1,_0x275456=0x2,_0x50315a=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x135d25({issuedAt:_0x296099,expiresAt:_0x547f6b,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x5e8bfc}){const _0x52b06f=_0x33d98f,_0x4e0176=Buffer[_0x52b06f(0x215)](licensee,'utf8')[_0x52b06f(0x27f)](0x0,0x40),_0x52316c=0x1+0x1+0x4+0x4+0x1+_0x4e0176[_0x52b06f(0x6ad)]+0x2+0x10,_0xbc7528=Buffer[_0x52b06f(0x42e)](_0x52316c);let _0x302368=0x0;_0xbc7528['writeUInt8'](0x1,_0x302368++),_0xbc7528['writeUInt8'](licenseType,_0x302368++),_0xbc7528[_0x52b06f(0x4c4)](Math[_0x52b06f(0x2d7)](_0x296099/0x3e8),_0x302368),_0x302368+=0x4,_0xbc7528[_0x52b06f(0x4c4)](Math['floor'](_0x547f6b/0x3e8),_0x302368),_0x302368+=0x4,_0xbc7528[_0x52b06f(0x5e0)](_0x4e0176[_0x52b06f(0x6ad)],_0x302368++),_0x4e0176[_0x52b06f(0x2a2)](_0xbc7528,_0x302368),_0x302368+=_0x4e0176[_0x52b06f(0x6ad)];let _0x400e2c=0x0;for(let _0x57c402=0x0;_0x57c402<_0x408615[_0x52b06f(0x6ad)];_0x57c402++){if(features[_0x408615[_0x57c402]])_0x400e2c|=0x1<<_0x57c402;}_0xbc7528[_0x52b06f(0x655)](_0x400e2c,_0x302368),_0x302368+=0x2;const _0x3681fe=['envs',_0x52b06f(0x340),_0x52b06f(0x1c8),_0x52b06f(0x1e0)];for(const _0x6627de of _0x3681fe){_0xbc7528[_0x52b06f(0x4c4)](limits[_0x6627de]||0x0,_0x302368),_0x302368+=0x4;}return _0xbc7528;}function _0x38426e(_0x4d9796){const _0x29cd66=_0x33d98f;let _0x53bc65=0x0;const _0x3692dc=_0x4d9796[_0x29cd66(0x2b2)](_0x53bc65++),_0x58aca6=_0x4d9796['readUInt8'](_0x53bc65++),_0x3f25e9=_0x4d9796[_0x29cd66(0x873)](_0x53bc65);_0x53bc65+=0x4;const _0x487c61=_0x4d9796['readUInt32BE'](_0x53bc65);_0x53bc65+=0x4;const _0x3cfc3c=_0x4d9796['readUInt8'](_0x53bc65++),_0x378042=_0x4d9796[_0x29cd66(0x27f)](_0x53bc65,_0x53bc65+_0x3cfc3c)[_0x29cd66(0x4b9)]('utf8');_0x53bc65+=_0x3cfc3c;const _0x4a125e=_0x4d9796[_0x29cd66(0x293)](_0x53bc65);_0x53bc65+=0x2;const _0x35af38={};for(let _0x2a8c06=0x0;_0x2a8c06<_0x408615[_0x29cd66(0x6ad)];_0x2a8c06++){_0x35af38[_0x408615[_0x2a8c06]]=Boolean(_0x4a125e&0x1<<_0x2a8c06);}const _0x5d3ac2=[_0x29cd66(0x7f3),_0x29cd66(0x340),'syncPeers',_0x29cd66(0x1e0)],_0x57e589={};for(const _0x161964 of _0x5d3ac2){const _0x32ca5f=_0x4d9796['readUInt32BE'](_0x53bc65);_0x53bc65+=0x4,_0x57e589[_0x161964]=_0x32ca5f===0x0?null:_0x32ca5f;}return{'v':_0x3692dc,'licenseType':_0x58aca6,'issuedAt':_0x3f25e9*0x3e8,'expiresAt':_0x487c61*0x3e8,'licensee':_0x378042,'features':_0x35af38,'limits':_0x57e589};}function _0x2e20ef(_0x1da443,_0x191f2d){const _0x4d6c5e=_0x33d98f,_0x385c79=Buffer[_0x4d6c5e(0x7fe)]([_0x1da443,_0x191f2d]),_0x445963=_0x12b7b4(_0x385c79),_0x17bf15=[];for(let _0x3581c4=0x0;_0x3581c4<_0x445963[_0x4d6c5e(0x6ad)];_0x3581c4+=0x8){_0x17bf15[_0x4d6c5e(0x557)](_0x445963[_0x4d6c5e(0x27f)](_0x3581c4,_0x3581c4+0x8));}return _0x17bf15[_0x4d6c5e(0x1c9)]('-');}function _0x44e66a(_0x958551){const _0x18c4e6=_0x33d98f;if(typeof _0x958551!==_0x18c4e6(0x1d2))throw new Error(_0x18c4e6(0x55b));const _0x58e58d=_0x10301d(_0x958551[_0x18c4e6(0x813)](/-/g,''));if(_0x58e58d['length']<0x41)throw new Error(_0x18c4e6(0x2fc)+_0x58e58d['length']+_0x18c4e6(0x62f));const _0x5e4450=_0x58e58d[_0x18c4e6(0x27f)](0x0,_0x58e58d['length']-0x40),_0x300ee1=_0x58e58d[_0x18c4e6(0x27f)](_0x58e58d['length']-0x40);let _0x7e3d4;try{_0x7e3d4=_0x38426e(_0x5e4450);}catch(_0x4fdff5){throw new Error(_0x18c4e6(0x64a)+_0x4fdff5['message']);}return{'rawBuf':_0x58e58d,'payload':_0x5e4450,'sig':_0x300ee1,'decoded':_0x7e3d4};}function _0x4e304a(_0x420e66){const _0x141dca=_0x33d98f;return _0xb4a118[_0x141dca(0x3b9)]('sha256')['update'](_0x420e66)[_0x141dca(0x656)]()[_0x141dca(0x27f)](0x0,0x8);}function _0x5bdfac(_0x335c1b,_0x407aad,_0x3115c7){const _0x579b0e=_0x33d98f,_0x4d38af=_0x579b0e(0x19f)+_0x3115c7,_0x2e54ae=Buffer['concat']([Buffer[_0x579b0e(0x215)](_0x335c1b,'utf8'),_0x407aad]),_0x19324b=_0xb4a118['createHmac']('sha256',_0x4d38af)['update'](_0x2e54ae)[_0x579b0e(0x656)](),_0x45405d=_0x12b7b4(_0x19324b[_0x579b0e(0x27f)](0x0,0x5));return{'pin':_0x45405d,'pinHmac':_0x19324b};}function _0x256988(_0x388819,_0x4d432e,_0x510a59){const _0x500830=_0x33d98f,_0x42e81f=Buffer[_0x500830(0x42e)](0x4d);let _0x6c234a=0x0;_0x42e81f['writeUInt8'](0x1,_0x6c234a++),_0x388819[_0x500830(0x2a2)](_0x42e81f,_0x6c234a),_0x6c234a+=0x8,_0x42e81f['writeUInt32BE'](_0x4d432e,_0x6c234a),_0x6c234a+=0x4,_0x510a59[_0x500830(0x2a2)](_0x42e81f,_0x6c234a);const _0x31a6bf=_0x12b7b4(_0x42e81f),_0x5df0a4=[];for(let _0x1ae7f6=0x0;_0x1ae7f6<_0x31a6bf[_0x500830(0x6ad)];_0x1ae7f6+=0x6){_0x5df0a4[_0x500830(0x557)](_0x31a6bf[_0x500830(0x27f)](_0x1ae7f6,_0x1ae7f6+0x6));}return _0x5df0a4['join']('-');}function _0x1b821f(_0x21452f){const _0x20861c=_0x33d98f;if(typeof _0x21452f!==_0x20861c(0x1d2))throw new Error(_0x20861c(0x865));const _0x2a2ddb=_0x10301d(_0x21452f[_0x20861c(0x813)](/-/g,''));if(_0x2a2ddb['length']!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x2a2ddb[_0x20861c(0x6ad)]);let _0x15265c=0x0;const _0x59f2b8=_0x2a2ddb['readUInt8'](_0x15265c++),_0x54fe31=_0x2a2ddb[_0x20861c(0x27f)](_0x15265c,_0x15265c+0x8);_0x15265c+=0x8;const _0x39b4a8=_0x2a2ddb['readUInt32BE'](_0x15265c);_0x15265c+=0x4;const _0x1b9267=_0x2a2ddb[_0x20861c(0x27f)](_0x15265c);return{'v':_0x59f2b8,'licenseHash':_0x54fe31,'expiry':_0x39b4a8,'sig':_0x1b9267};}const _0x271ebd=0x100,_0x106f1c=new Set(),_0x5ea14e=new Map();function _0xe09447(_0x48fc94,_0x414e59,_0x4b9672){const _0x2cfc83=_0x33d98f;if(typeof _0x4b9672!==_0x2cfc83(0x1d2)||!Buffer[_0x2cfc83(0x1a0)](_0x48fc94)||!Buffer[_0x2cfc83(0x1a0)](_0x414e59))return _0xb4a118[_0x2cfc83(0x700)](null,_0x48fc94,_0x4b9672,_0x414e59);const _0x33a422=_0x4b9672+'\x0a'+_0x48fc94[_0x2cfc83(0x4b9)]('base64')+'\x0a'+_0x414e59[_0x2cfc83(0x4b9)](_0x2cfc83(0x68e));if(_0x106f1c[_0x2cfc83(0x2ad)](_0x33a422))return!![];let _0x10c373=_0x5ea14e['get'](_0x4b9672);if(!_0x10c373){_0x10c373=_0xb4a118[_0x2cfc83(0x758)](_0x4b9672);if(_0x5ea14e[_0x2cfc83(0x7d1)]>=0x10)_0x5ea14e[_0x2cfc83(0x43c)]();_0x5ea14e['set'](_0x4b9672,_0x10c373);}const _0x5c08d2=_0xb4a118[_0x2cfc83(0x700)](null,_0x48fc94,_0x10c373,_0x414e59)===!![];if(_0x5c08d2){if(_0x106f1c['size']>=_0x271ebd)_0x106f1c[_0x2cfc83(0x43c)]();_0x106f1c['add'](_0x33a422);}return _0x5c08d2;}function _0x7bb603({tokenString:_0x5e1690,nodeId:_0x4a3285,rawBlobBuf:_0x3f29d9,pubKeyPem:_0x233262,pubFingerprint:_0x45000f}){const _0x5a78c4=_0x33d98f;let _0x55538f;try{_0x55538f=_0x1b821f(_0x5e1690);}catch(_0x32aff1){return{'valid':![],'reason':_0x5a78c4(0x48d)};}const _0x4bdfb8=_0x4e304a(_0x3f29d9);if(!_0x4bdfb8[_0x5a78c4(0x400)](_0x55538f[_0x5a78c4(0x872)]))return{'valid':![],'reason':_0x5a78c4(0x401)};const {pinHmac:_0x56b348}=_0x5bdfac(_0x4a3285,_0x4bdfb8,_0x45000f),_0x4fb54f=Buffer['allocUnsafe'](0x4);_0x4fb54f[_0x5a78c4(0x4c4)](_0x55538f[_0x5a78c4(0x394)],0x0);const _0x55f507=Buffer[_0x5a78c4(0x7fe)]([Buffer[_0x5a78c4(0x215)]([_0x55538f['v']]),_0x56b348[_0x5a78c4(0x27f)](0x0,0x5),_0x55538f[_0x5a78c4(0x872)],_0x4fb54f]);try{const _0x4e7d18=_0xe09447(_0x55f507,_0x55538f[_0x5a78c4(0x58c)],_0x233262);if(!_0x4e7d18)return{'valid':![],'reason':_0x5a78c4(0x58d)};}catch(_0x6f3d13){return{'valid':![],'reason':_0x5a78c4(0x58d)};}if(_0x55538f[_0x5a78c4(0x394)]<Date[_0x5a78c4(0x4ec)]()/0x3e8)return{'valid':![],'reason':_0x5a78c4(0x30d)};return{'valid':!![],'reason':'ok'};}function _0x243a70(_0x644921){const _0x292298=_0x33d98f;if(typeof _0x644921!==_0x292298(0x1d2))return _0x292298(0x756);const _0x558807=_0x644921[_0x292298(0x48b)]();if(_0x558807[_0x292298(0x579)]('/')||_0x558807[_0x292298(0x579)]('./')||_0x558807[_0x292298(0x579)](_0x292298(0x6fe))||/^[A-Za-z]:[\\/]/['test'](_0x558807))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x292298(0x3f6)](_0x558807))return _0x292298(0x3ff);const _0xbfc493=_0x558807[_0x292298(0x813)](/[\s-]+/g,'')[_0x292298(0x6ad)];if(_0xbfc493===0x7c)return _0x292298(0x589);if(_0xbfc493>=0x95&&_0xbfc493<=0xfc)return _0x292298(0x81a);return'unknown';}return okdbLicenseCodec={'toBase32':_0x12b7b4,'fromBase32':_0x10301d,'encodeLicensePayload':_0x135d25,'decodeLicensePayload':_0x38426e,'encodeLicenseBlob':_0x2e20ef,'decodeLicenseBlob':_0x44e66a,'licenseHash':_0x4e304a,'derivePin':_0x5bdfac,'encodeActivationToken':_0x256988,'decodeActivationToken':_0x1b821f,'verifyActivation':_0x7bb603,'verifySignature':_0xe09447,'detectInputType':_0x243a70,'FEATURE_NAMES':_0x408615,'LICENSE_TYPE_STANDARD':_0x5e8bfc,'LICENSE_TYPE_OPEN':_0xf4bd4b,'LICENSE_TYPE_INTERNAL':_0x275456,'OPEN_LICENSE_MAX_DURATION_MS':_0x50315a},okdbLicenseCodec;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x1c5ef2=_0x1a2e0d;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5c098a={'PUT':'put','REMOVE':_0x1c5ef2(0x417),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x1c5ef2(0x3de),'INDEX_RESET':_0x1c5ef2(0x5b2),'TYPE_REGISTER':'registerType','TYPE_DROP':'dropType','FTS_REGISTER':'registerFts','FTS_DROP':'dropFts','FTS_RESET':_0x1c5ef2(0x688),'SCHEMA_SET':_0x1c5ef2(0x626),'SCHEMA_DROP':_0x1c5ef2(0x435),'TTL_SET':_0x1c5ef2(0x74d),'TTL_CLEAR':'clearTtl'},_0x39e3bc={'SYSTEM_READY':_0x1c5ef2(0x461),'FIELD_RESOLVER_REGISTERED':'field:resolver_registered','SYSTEM_STOPPED':_0x1c5ef2(0x3ba),'SYSTEM_CLOCK_CHANGE':_0x1c5ef2(0x2ef),'SYSTEM_POKE':_0x1c5ef2(0x33e),'SYSTEM_DRAIN':_0x1c5ef2(0x627),'SYSTEM_TYPE_DROP':_0x1c5ef2(0x8a2),'SYSTEM_PROC':_0x1c5ef2(0x749),'SYSTEM_BUS_STATE_CHANGE':_0x1c5ef2(0x4ea),'ITEM_CREATE':_0x1c5ef2(0x5e6),'ITEM_UPDATE':_0x1c5ef2(0x3d6),'ITEM_REMOVE':'item:remove','ITEM_PENDING':_0x1c5ef2(0x6be),'INDEX_RESET':_0x1c5ef2(0x596),'INDEX_READY':_0x1c5ef2(0x61d),'INDEX_PROGRESS':_0x1c5ef2(0x570),'VIEW_PROGRESS':_0x1c5ef2(0x6ea),'INDEX_DROP':_0x1c5ef2(0x341),'INDEX_REGISTERED':_0x1c5ef2(0x272),'FTS_REGISTERED':_0x1c5ef2(0x1af),'FTS_DROP':_0x1c5ef2(0x829),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x1c5ef2(0x238),'SCHEMA_DROP':_0x1c5ef2(0x2df),'UNIQUE_VIOLATION':_0x1c5ef2(0x4f5),'UNIQUE_VIOLATION_RESOLVED':_0x1c5ef2(0x6cb),'REF_VIOLATION':_0x1c5ef2(0x29b),'REF_VIOLATION_RESOLVED':_0x1c5ef2(0x233),'SYNC_APPLY':'sync:apply','TXN_START':_0x1c5ef2(0x5e3),'TXN_END':_0x1c5ef2(0x4c6),'TXN_ROLLBACK':_0x1c5ef2(0x56a),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x1c5ef2(0x56b),'ENV_OPENED':_0x1c5ef2(0x2a0),'ENV_REMOVED':_0x1c5ef2(0x525),'SYSTEM_ENV_RELEASE':_0x1c5ef2(0x648),'TTL_EXPIRED':_0x1c5ef2(0x283),'TTL_SET':_0x1c5ef2(0x565),'TTL_CLEAR':_0x1c5ef2(0x53a),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x1c5ef2(0x658),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x1c5ef2(0x3d7)},_0x368de0={'CREATING':_0x1c5ef2(0x638),'RESETTING':_0x1c5ef2(0x39a),'READY':'ready','DROPPING':'dropping','WAITING':_0x1c5ef2(0x5e7),'ERROR':'error'},_0x1a2ccb={'CREATED':_0x1c5ef2(0x516),'STARTING':_0x1c5ef2(0x5a2),'STARTED':_0x1c5ef2(0x4ad),'STOPPING':'stopping','STOPPED':_0x1c5ef2(0x243)},_0x58165f={'CREATING':'creating','READY':_0x1c5ef2(0x3fc),'HALTED':_0x1c5ef2(0x195),'STOPPED':_0x1c5ef2(0x243),'RESETTING':_0x1c5ef2(0x39a)},_0x4ec9d=Object[_0x1c5ef2(0x6ef)]({'POKE':'bus:poke','DRAIN':_0x1c5ef2(0x5c9),'TYPE_DROP':_0x1c5ef2(0x350),'PROC':_0x1c5ef2(0x44b),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x4ec9d,'CHANGE_ACTIONS':_0x5c098a,'EVENTS':_0x39e3bc,'INDEX_STATE':_0x368de0,'OKDB_STATE':_0x1a2ccb,'VIEW_STATE':_0x58165f},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x503391=_0x1a2e0d;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x5accd3=require$$0$1,_0x4154cd=require$$1,_0x47e9cf=require$$2$1,_0x20a4b2=_0x5accd3[_0x503391(0x308)](_0x4154cd['join'](__dirname,_0x503391(0x3cc)),_0x503391(0x88a))[_0x503391(0x48b)](),_0x17a87d=_0x47e9cf[_0x503391(0x758)](_0x20a4b2)[_0x503391(0x678)]({'type':_0x503391(0x370),'format':_0x503391(0x345)}),_0x160659=_0x47e9cf['createHash'](_0x503391(0x1ea))[_0x503391(0x56e)](_0x17a87d)[_0x503391(0x656)](_0x503391(0x6b1))[_0x503391(0x27f)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x20a4b2,'PUB_FINGERPRINT':_0x160659},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x4a8e10=_0x1a2e0d;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x4cceea=require$$2$1,{OKDBError:_0xa87ed5}=requireOkdbError(),{EVENTS:_0x4eab4a}=requireOkdbEnums(),_0x3c1618=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x25a01f,LICENSE_TYPE_INTERNAL:_0x1ade42,OPEN_LICENSE_MAX_DURATION_MS:_0x5f0c78}=_0x3c1618,_0x267a92=requireOkdbPubkey(),_0x252199={'LICENSED_BUILD':'true','PUBLIC_KEY_PEM':_0x267a92['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x267a92['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':'log'},_0x1d47f1=_0x4a8e10(0x1a9),_0x3f289b={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x495af9(_0x3a256f){const _0x813661=_0x4a8e10;await _0x3a256f[_0x813661(0x3ac)](_0x1d47f1);}class _0xdc17c1{constructor(_0x523eec){const _0x1f1c1e=_0x4a8e10;this[_0x1f1c1e(0x58a)]=_0x523eec,this[_0x1f1c1e(0x691)]=null;}async[_0x4a8e10(0x3dd)](){const _0xfda64a=_0x4a8e10,_0x2f0d67=this['okdb'][_0xfda64a(0x736)];if(!_0x2f0d67||!_0x2f0d67[_0xfda64a(0x6f1)](_0x1d47f1)){this[_0xfda64a(0x691)]=null;return;}const _0x501164=this[_0xfda64a(0x58a)]['id'];let _0x336deb=null;for(const {key:_0x206a4b,value:_0x38aba8}of _0x2f0d67[_0xfda64a(0x3c9)](_0x1d47f1)){const _0x2e2da9=this[_0xfda64a(0x74f)](_0x38aba8,_0x501164);_0x2e2da9===_0xfda64a(0x676)&&!_0x336deb&&(_0x336deb={..._0x38aba8,'id':_0x206a4b,'status':_0x2e2da9});}this[_0xfda64a(0x691)]=_0x336deb;if(this['_active']&&this[_0xfda64a(0x691)][_0xfda64a(0x1dd)]===_0x25a01f){const _0x2043fb=Math[_0xfda64a(0x347)]((this[_0xfda64a(0x691)][_0xfda64a(0x282)]-Date[_0xfda64a(0x4ec)]())/0x5265c00);this['okdb']['log']?.[_0xfda64a(0x44f)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x2043fb+_0xfda64a(0x647),{'feature':_0xfda64a(0x2bb),'licensee':this[_0xfda64a(0x691)][_0xfda64a(0x53d)],'expiresAt':new Date(this[_0xfda64a(0x691)][_0xfda64a(0x282)])[_0xfda64a(0x611)]()});}this['_active']&&this[_0xfda64a(0x691)][_0xfda64a(0x1dd)]===_0x1ade42&&this[_0xfda64a(0x58a)]['log']?.[_0xfda64a(0x44f)](_0xfda64a(0x577),{'feature':_0xfda64a(0x2bb),'licensee':this[_0xfda64a(0x691)]['licensee']});}['_computeStatus'](_0x428eb9,_0x1eb978){const _0x5310bf=_0x4a8e10;if(!_0x428eb9[_0x5310bf(0x81a)])return'invalid';let _0x56b2bc;try{_0x56b2bc=_0x3c1618[_0x5310bf(0x6a8)](_0x428eb9[_0x5310bf(0x81a)]);}catch(_0x96e3d6){return'invalid';}try{const _0x5d169d=_0x3c1618['verifySignature'](_0x56b2bc[_0x5310bf(0x610)],_0x56b2bc['sig'],_0x252199[_0x5310bf(0x1b9)]);if(!_0x5d169d)return _0x5310bf(0x7a8);}catch(_0x563c69){return _0x5310bf(0x7a8);}if(_0x56b2bc[_0x5310bf(0x70e)][_0x5310bf(0x1dd)]===_0x1ade42)return _0x5310bf(0x676);if(_0x56b2bc[_0x5310bf(0x70e)]['expiresAt']<=Date[_0x5310bf(0x4ec)]())return _0x5310bf(0x537);if(_0x56b2bc['decoded'][_0x5310bf(0x1dd)]===_0x25a01f)return'active';if(!_0x428eb9[_0x5310bf(0x589)])return _0x5310bf(0x242);const _0x102187=_0x3c1618['verifyActivation']({'tokenString':_0x428eb9[_0x5310bf(0x589)],'nodeId':_0x1eb978,'rawBlobBuf':_0x56b2bc['rawBuf'],'pubKeyPem':_0x252199[_0x5310bf(0x1b9)],'pubFingerprint':_0x252199[_0x5310bf(0x476)]});if(_0x102187[_0x5310bf(0x4f3)]==='LICENSE_HASH_MISMATCH'||_0x102187['reason']==='SIG_INVALID')return _0x5310bf(0x835);if(_0x102187[_0x5310bf(0x4f3)]==='ACTIVATION_EXPIRED')return _0x5310bf(0x537);if(!_0x102187['valid'])return _0x5310bf(0x835);return _0x5310bf(0x676);}get[_0x4a8e10(0x676)](){const _0x1cd7b6=_0x4a8e10;return this[_0x1cd7b6(0x691)];}get['effective'](){const _0x2aac68=_0x4a8e10;return this[_0x2aac68(0x691)]??_0x3f289b;}[_0x4a8e10(0x2b5)](_0x2d1296){const _0x273dca=_0x4a8e10;if(_0x252199['LICENSED_BUILD']!==_0x273dca(0x7c4))return;const _0x45fc67=this['effective'];if(!_0x45fc67['features']?.[_0x2d1296]){const _0x5680df=_0x45fc67[_0x273dca(0x4bf)]?_0x273dca(0x7ec)+_0x2d1296+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x2d1296+_0x273dca(0x3b2):'Feature\x20not\x20licensed:\x20'+_0x2d1296+_0x273dca(0x842)+_0x2d1296+'\x22.';throw new _0xa87ed5(_0x5680df,_0x273dca(0x5bf),{'feature':_0x2d1296});}}[_0x4a8e10(0x4e5)](_0x3e1d29){const _0x4cc459=_0x4a8e10;if(_0x252199[_0x4cc459(0x239)]!==_0x4cc459(0x7c4))return!![];return!!this[_0x4cc459(0x1ac)][_0x4cc459(0x257)]?.[_0x3e1d29];}['hasLimit'](_0x304a78){const _0x32fa25=_0x4a8e10;if(_0x252199['LICENSED_BUILD']!==_0x32fa25(0x7c4))return![];const _0x3e0380=this[_0x32fa25(0x1ac)]['limits']?.[_0x304a78];return!(_0x3e0380===null||_0x3e0380===undefined||_0x3e0380===0x0);}[_0x4a8e10(0x825)](_0x4cb4b5,_0x1a37c5){const _0x4f0145=_0x4a8e10;if(_0x252199[_0x4f0145(0x239)]!=='true')return;const _0x171b87=this[_0x4f0145(0x1ac)],_0x3105d8=_0x171b87[_0x4f0145(0x5b3)]?.[_0x4cb4b5];if(_0x3105d8===null||_0x3105d8===undefined||_0x3105d8===0x0)return;if(_0x1a37c5>=_0x3105d8)throw new _0xa87ed5(_0x4f0145(0x7d8)+_0x4cb4b5+'\x20('+_0x1a37c5+'/'+_0x3105d8+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x4cb4b5,'current':_0x1a37c5,'max':_0x3105d8});}async[_0x4a8e10(0x74e)](_0x31637b){const _0x521261=_0x4a8e10;let _0x59c826;try{_0x59c826=_0x3c1618[_0x521261(0x6a8)](_0x31637b);}catch(_0x42818f){throw new _0xa87ed5(_0x521261(0x3f3)+_0x42818f[_0x521261(0x81d)],'LICENSE_INVALID');}let _0x3b84be;try{_0x3b84be=_0x3c1618[_0x521261(0x3e1)](_0x59c826[_0x521261(0x610)],_0x59c826[_0x521261(0x58c)],_0x252199[_0x521261(0x1b9)]);}catch(_0x96df55){throw new _0xa87ed5(_0x521261(0x1b6)+_0x96df55[_0x521261(0x81d)],_0x521261(0x31e));}if(!_0x3b84be)throw new _0xa87ed5(_0x521261(0x2e5)+(_0x521261(0x4d9)+_0x252199[_0x521261(0x476)]+'.\x20')+_0x521261(0x68a),_0x521261(0x31e),{'expectedFingerprint':_0x252199[_0x521261(0x476)]});if(_0x59c826['decoded'][_0x521261(0x1dd)]===_0x25a01f){const _0x468c50=_0x59c826[_0x521261(0x70e)][_0x521261(0x282)]-_0x59c826[_0x521261(0x70e)][_0x521261(0x2bf)];if(_0x468c50>_0x5f0c78)throw new _0xa87ed5(_0x521261(0x237)+Math[_0x521261(0x347)](_0x468c50/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x521261(0x31e));}const _0x2d692f=this['okdb'][_0x521261(0x736)];await _0x495af9(_0x2d692f);const _0x42624a=_0x3c1618['licenseHash'](_0x59c826[_0x521261(0x3e8)])[_0x521261(0x4b9)](_0x521261(0x6b1));for(const {key:_0x5c7453,value:_0x261d21}of _0x2d692f[_0x521261(0x3c9)](_0x1d47f1)){if(_0x261d21[_0x521261(0x55f)]===_0x42624a)throw new _0xa87ed5(_0x521261(0x249),_0x521261(0x68c),{'id':_0x5c7453});}const _0x5f68b5=_0x4cceea[_0x521261(0x3b9)](_0x521261(0x1ea))[_0x521261(0x56e)](_0x521261(0x20a))['update'](_0x59c826['rawBuf'])['digest']('hex'),_0x52e672=_0x5f68b5['slice'](0x0,0x8)+'-'+_0x5f68b5['slice'](0x8,0xc)+'-5'+_0x5f68b5[_0x521261(0x27f)](0xd,0x10)+'-'+(parseInt(_0x5f68b5[0x10],0x10)&0x3|0x8)[_0x521261(0x4b9)](0x10)+_0x5f68b5[_0x521261(0x27f)](0x11,0x14)+'-'+_0x5f68b5[_0x521261(0x27f)](0x14,0x20),_0x18da4d={'blob':_0x31637b,'activation':null,'addedAt':Date[_0x521261(0x4ec)](),'_licenseHash':_0x42624a,'licensee':_0x59c826['decoded'][_0x521261(0x53d)],'expiresAt':_0x59c826[_0x521261(0x70e)][_0x521261(0x282)],'features':_0x59c826[_0x521261(0x70e)][_0x521261(0x257)],'limits':_0x59c826[_0x521261(0x70e)][_0x521261(0x5b3)],'licenseType':_0x59c826[_0x521261(0x70e)][_0x521261(0x1dd)]};return await _0x2d692f[_0x521261(0x25f)](_0x1d47f1,_0x52e672,_0x18da4d),{'id':_0x52e672,..._0x18da4d};}async['activateLicense'](_0x432579){const _0x2a050d=_0x4a8e10;let _0x397489;try{_0x397489=_0x3c1618[_0x2a050d(0x679)](_0x432579);}catch(_0x383c77){throw new _0xa87ed5(_0x2a050d(0x7a0)+_0x383c77[_0x2a050d(0x81d)],'LICENSE_ACTIVATION_INVALID');}const _0x18209c=_0x397489[_0x2a050d(0x872)][_0x2a050d(0x4b9)]('hex'),_0x24dd22=this[_0x2a050d(0x58a)][_0x2a050d(0x736)];if(!_0x24dd22||!_0x24dd22[_0x2a050d(0x6f1)](_0x1d47f1))throw new _0xa87ed5(_0x2a050d(0x226),_0x2a050d(0x543));let _0x904ad=null,_0x1d23de=null;for(const {key:_0x2ee066,value:_0x391a10}of _0x24dd22['getRange'](_0x1d47f1)){if(_0x391a10[_0x2a050d(0x55f)]===_0x18209c){_0x904ad=_0x2ee066,_0x1d23de=_0x391a10;break;}}if(!_0x904ad)throw new _0xa87ed5(_0x2a050d(0x226),_0x2a050d(0x543));const {rawBuf:_0x23d631}=_0x3c1618['decodeLicenseBlob'](_0x1d23de[_0x2a050d(0x81a)]),_0x1d3230=_0x3c1618[_0x2a050d(0x55e)]({'tokenString':_0x432579,'nodeId':this[_0x2a050d(0x58a)]['id'],'rawBlobBuf':_0x23d631,'pubKeyPem':_0x252199[_0x2a050d(0x1b9)],'pubFingerprint':_0x252199[_0x2a050d(0x476)]});if(!_0x1d3230[_0x2a050d(0x830)])throw new _0xa87ed5(_0x2a050d(0x71a)+_0x1d3230[_0x2a050d(0x4f3)],_0x2a050d(0x543),{'reason':_0x1d3230[_0x2a050d(0x4f3)]});const _0x26c75b={..._0x1d23de,'activation':_0x432579};return await _0x24dd22[_0x2a050d(0x56e)](_0x1d47f1,_0x904ad,_0x26c75b),{'id':_0x904ad,..._0x26c75b};}async['removeLicense'](_0x47db21){const _0x4d5455=_0x4a8e10,_0x21db16=this['okdb'][_0x4d5455(0x736)];if(!_0x21db16||!_0x21db16[_0x4d5455(0x6f1)](_0x1d47f1))return;await _0x21db16[_0x4d5455(0x417)](_0x1d47f1,_0x47db21);}async[_0x4a8e10(0x7b7)](){const _0x5a0743=_0x4a8e10,_0x27cf0e=this[_0x5a0743(0x58a)][_0x5a0743(0x736)];if(!_0x27cf0e||!_0x27cf0e[_0x5a0743(0x6f1)](_0x1d47f1))return[];const _0x43d482=this['okdb']['id'],_0x5670ad=[];for(const {key:_0xf03a31,value:_0x1f5440}of _0x27cf0e[_0x5a0743(0x3c9)](_0x1d47f1)){const _0x1e26cd=this['_computeStatus'](_0x1f5440,_0x43d482);_0x5670ad[_0x5a0743(0x557)]({..._0x1f5440,'id':_0xf03a31,'status':_0x1e26cd});}return _0x5670ad;}[_0x4a8e10(0x81c)](){const _0x289f1c=_0x4a8e10,_0x1a76f6=this[_0x289f1c(0x58a)][_0x289f1c(0x736)];if(!_0x1a76f6||!_0x1a76f6[_0x289f1c(0x6f1)](_0x1d47f1))return[];const _0x2f358d=this[_0x289f1c(0x58a)]['id'],_0x3ad347=[];for(const {key:_0x2cb366,value:_0x25a655}of _0x1a76f6[_0x289f1c(0x3c9)](_0x1d47f1)){if(_0x25a655[_0x289f1c(0x55f)]){if(_0x25a655['licenseType']===_0x25a01f)_0x3ad347[_0x289f1c(0x557)]({'licenseId':_0x2cb366,'pin':null});else{const _0x278007=Buffer['from'](_0x25a655[_0x289f1c(0x55f)],'hex'),{pin:_0x341964}=_0x3c1618[_0x289f1c(0x741)](_0x2f358d,_0x278007,_0x252199[_0x289f1c(0x476)]);_0x3ad347[_0x289f1c(0x557)]({'licenseId':_0x2cb366,'pin':_0x341964});}}}return _0x3ad347;}async[_0x4a8e10(0x438)](){const _0x149baa=_0x4a8e10,_0x24ca17=this['_active'];await this[_0x149baa(0x3dd)]();if(this[_0x149baa(0x691)]&&this[_0x149baa(0x691)][_0x149baa(0x1dd)]===_0x25a01f){const _0x589a3d=Math[_0x149baa(0x347)]((this['_active'][_0x149baa(0x282)]-Date['now']())/0x5265c00);this['okdb'][_0x149baa(0x689)]?.[_0x149baa(0x44f)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x589a3d+_0x149baa(0x647),{'feature':_0x149baa(0x2bb),'licensee':this[_0x149baa(0x691)][_0x149baa(0x53d)],'expiresAt':new Date(this[_0x149baa(0x691)]['expiresAt'])[_0x149baa(0x611)]()});}this[_0x149baa(0x691)]&&this[_0x149baa(0x691)][_0x149baa(0x1dd)]===_0x1ade42&&this[_0x149baa(0x58a)][_0x149baa(0x689)]?.[_0x149baa(0x44f)](_0x149baa(0x577),{'feature':'license','licensee':this[_0x149baa(0x691)][_0x149baa(0x53d)]});if(_0x24ca17&&!this['_active']){this[_0x149baa(0x58a)][_0x149baa(0x689)]?.[_0x149baa(0x44f)]('License\x20expired\x20or\x20invalidated',{'feature':_0x149baa(0x2bb)}),this[_0x149baa(0x58a)][_0x149baa(0x74a)]?.[_0x149baa(0x663)](_0x4eab4a[_0x149baa(0x31e)],{'previous':_0x24ca17});const _0x3245c9=this[_0x149baa(0x58a)][_0x149baa(0x3e9)]?.['onLicenseExpired']??_0x252199['LICENSE_EXPIRED_ACTION'];_0x3245c9===_0x149baa(0x6b6)&&(this[_0x149baa(0x58a)][_0x149baa(0x689)]?.[_0x149baa(0x6cd)](_0x149baa(0x4d1),{'feature':'license'}),this[_0x149baa(0x58a)][_0x149baa(0x6e0)]()[_0x149baa(0x39e)](()=>{})[_0x149baa(0x83f)](()=>process[_0x149baa(0x468)](0x1)));}}}return okdbLicense={'LicenseChecker':_0xdc17c1,'_C':_0x252199,'FREE_TIER':_0x3f289b},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x5eea53=_0x1a2e0d;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x16e03c=require$$0$3,_0x22f7c4=require$$0$1,_0x2b8154=require$$0,_0x133afb=require$$1,_0x4f4a35=_0x133afb[_0x5eea53(0x1c9)](_0x2b8154[_0x5eea53(0x6fa)](),_0x5eea53(0x2ec)),_0x3e6880=0x3e8,_0x3523a5={'reset':_0x5eea53(0x850),'bold':_0x5eea53(0x84b),'dim':_0x5eea53(0x583),'red':'\x1b[31m','green':'\x1b[32m','yellow':_0x5eea53(0x45a),'blue':_0x5eea53(0x707),'magenta':_0x5eea53(0x4a0),'cyan':_0x5eea53(0x26c),'white':_0x5eea53(0x798),'gray':_0x5eea53(0x5c2)},_0x2cb3d1=!process[_0x5eea53(0x498)][_0x5eea53(0x670)]||!!process.env.NO_COLOR,_0x22840b=(_0x4790b9,_0x337df9)=>_0x2cb3d1?_0x337df9:''+_0x4790b9+_0x337df9+_0x3523a5['reset'],_0x24dabd={'error':_0x3523a5[_0x5eea53(0x399)],'warn':_0x3523a5[_0x5eea53(0x5cc)],'info':_0x3523a5[_0x5eea53(0x8a8)],'debug':_0x3523a5[_0x5eea53(0x348)]},_0xdaf3d0={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x24d976(_0x279215,_0xcfebc5='info'){const _0x21b4ca=_0x5eea53,{level:_0xd4ce21,msg:_0x432c05,meta:_0x3181e7,context:_0x382082,ts:_0x3543f5}=_0x279215;if((_0xdaf3d0[_0xd4ce21]??0x1)<(_0xdaf3d0[_0xcfebc5]??0x1))return;const _0x3eb4cc=_0x22840b(_0x3523a5[_0x21b4ca(0x348)],new Date(_0x3543f5)['toISOString']()),_0x423331=_0x22840b(_0x24dabd[_0xd4ce21]??_0x3523a5[_0x21b4ca(0x5b5)],_0xd4ce21[_0x21b4ca(0x708)](0x5));let _0x174da8='\x20\x20'+_0x3eb4cc+'\x20'+_0x22840b(_0x3523a5['bold'],_0x423331)+'\x20'+_0x432c05;if(_0x3181e7&&Object[_0x21b4ca(0x818)](_0x3181e7)[_0x21b4ca(0x6ad)]>0x0){const _0x3bb4b8=Object[_0x21b4ca(0x87f)](_0x3181e7)[_0x21b4ca(0x595)](([_0x303dac,_0x54e7f2])=>_0x303dac+'='+_0x54e7f2)[_0x21b4ca(0x1c9)]('\x20');_0x174da8+=_0x22840b(_0x3523a5[_0x21b4ca(0x78f)],_0x21b4ca(0x517)+_0x3bb4b8+']');}if(_0x382082!==undefined){const _0x2db7c6=typeof _0x382082===_0x21b4ca(0x601)?JSON[_0x21b4ca(0x2d1)](_0x382082):String(_0x382082);_0x174da8+=_0x22840b(_0x3523a5['dim'],'\x20\x20'+_0x2db7c6);}const _0x3eb110=_0xd4ce21===_0x21b4ca(0x6cd)||_0xd4ce21===_0x21b4ca(0x44f)?process[_0x21b4ca(0x6d3)][_0x21b4ca(0x82b)][_0x21b4ca(0x7be)](process['stderr']):process['stdout'][_0x21b4ca(0x82b)]['bind'](process[_0x21b4ca(0x498)]);_0x3eb110(_0x174da8+'\x0a');}function _0x12839f(_0x38e1e9,_0x49c4df){const _0x3beb7a=_0x5eea53;if(_0x38e1e9===0xcc||_0x38e1e9>=0xc8&&_0x38e1e9<0x12c&&!_0x49c4df){console['log'](_0x3beb7a(0x822)+_0x22840b(_0x3523a5[_0x3beb7a(0x452)],'✓')+'\x0a');return;}if(_0x38e1e9>=0x190||_0x49c4df?.['error']){const _0xfd5830=_0x49c4df?.[_0x3beb7a(0x6cd)]??_0x49c4df?.[_0x3beb7a(0x81d)]??_0x3beb7a(0x8b7)+_0x38e1e9;console[_0x3beb7a(0x689)](_0x3beb7a(0x822)+_0x22840b(_0x3523a5[_0x3beb7a(0x399)],'✗')+'\x20'+_0x22840b(_0x3523a5[_0x3beb7a(0x49b)]+_0x3523a5[_0x3beb7a(0x399)],String(_0x38e1e9))+'\x20\x20'+_0xfd5830+'\x0a');return;}const _0x1b9cd=Object[_0x3beb7a(0x404)][_0x3beb7a(0x3e0)]['call'](_0x49c4df??{},_0x3beb7a(0x3ec))?_0x49c4df[_0x3beb7a(0x3ec)]:_0x49c4df,_0x588cbb=_0x49c4df?.[_0x3beb7a(0x74c)];console[_0x3beb7a(0x689)](''),_0x12ef18(_0x1b9cd,'\x20\x20');if(_0x588cbb?.[_0x3beb7a(0x430)]!=null||_0x588cbb?.[_0x3beb7a(0x26e)]!=null){const _0x410ed0=[];if(_0x588cbb[_0x3beb7a(0x430)]!=null)_0x410ed0['push'](_0x588cbb[_0x3beb7a(0x430)]+_0x3beb7a(0x3d3)+(_0x588cbb[_0x3beb7a(0x430)]!==0x1?'s':''));if(_0x588cbb[_0x3beb7a(0x26e)]!=null)_0x410ed0[_0x3beb7a(0x557)](_0x588cbb[_0x3beb7a(0x26e)]+'ms');console[_0x3beb7a(0x689)](_0x3beb7a(0x822)+_0x22840b(_0x3523a5[_0x3beb7a(0x78f)],_0x410ed0[_0x3beb7a(0x1c9)]('\x20\x20·\x20\x20')));}console[_0x3beb7a(0x689)]('');}function _0x12ef18(_0x2511e9,_0x1f175a=''){const _0x179baf=_0x5eea53;if(_0x2511e9===null||_0x2511e9===undefined){console[_0x179baf(0x689)](_0x1f175a+_0x22840b(_0x3523a5[_0x179baf(0x78f)],_0x179baf(0x4c1)));return;}if(Array[_0x179baf(0x59b)](_0x2511e9)){if(_0x2511e9[_0x179baf(0x6ad)]===0x0){console[_0x179baf(0x689)](_0x1f175a+_0x22840b(_0x3523a5[_0x179baf(0x78f)],'(empty)'));return;}if(_0x2511e9[_0x179baf(0x573)](_0x4d8f02=>_0x4d8f02&&typeof _0x4d8f02===_0x179baf(0x601)&&'key'in _0x4d8f02&&_0x179baf(0x352)in _0x4d8f02)){_0x12072e(_0x2511e9,_0x1f175a);return;}if(_0x2511e9['every'](_0x2c940c=>_0x2c940c&&typeof _0x2c940c===_0x179baf(0x601)&&_0x179baf(0x4fa)in _0x2c940c&&_0x179baf(0x430)in _0x2c940c)){_0x1b7411(_0x2511e9,_0x1f175a);return;}if(_0x2511e9[_0x179baf(0x573)](_0x23d283=>typeof _0x23d283!==_0x179baf(0x601)||_0x23d283===null)){_0x2511e9[_0x179baf(0x881)]((_0x523d32,_0x187477)=>console[_0x179baf(0x689)](_0x1f175a+_0x22840b(_0x3523a5[_0x179baf(0x348)],_0x187477+0x1+'.')+'\x20'+_0x22840b(_0x3523a5['white'],String(_0x523d32))));return;}_0x2511e9[_0x179baf(0x881)]((_0x2a6fa4,_0x584d4f)=>{const _0x677af0=_0x179baf;console['log'](_0x1f175a+_0x22840b(_0x3523a5[_0x677af0(0x78f)],'['+_0x584d4f+']'));if(typeof _0x2a6fa4===_0x677af0(0x601)&&_0x2a6fa4!==null)_0x5b50ae(_0x2a6fa4,_0x1f175a+'\x20\x20');else console[_0x677af0(0x689)](_0x1f175a+'\x20\x20'+String(_0x2a6fa4));});return;}if(typeof _0x2511e9===_0x179baf(0x601)){if(_0x179baf(0x47f)in _0x2511e9&&'value'in _0x2511e9&&Object[_0x179baf(0x818)](_0x2511e9)[_0x179baf(0x6ad)]<=0x3){console[_0x179baf(0x689)](_0x1f175a+_0x22840b(_0x3523a5[_0x179baf(0x49b)]+_0x3523a5['cyan'],String(_0x2511e9[_0x179baf(0x47f)])));const _0x1c7448=_0x2511e9[_0x179baf(0x352)];if(_0x1c7448&&typeof _0x1c7448===_0x179baf(0x601))_0x5b50ae(_0x1c7448,_0x1f175a);else console[_0x179baf(0x689)](_0x1f175a+_0x22840b(_0x3523a5[_0x179baf(0x5b5)],String(_0x1c7448)));return;}_0x5b50ae(_0x2511e9,_0x1f175a);return;}console[_0x179baf(0x689)](_0x1f175a+_0x22840b(_0x3523a5['white'],String(_0x2511e9)));}function _0x5b50ae(_0x289e18,_0x282826=''){const _0x140ac5=_0x5eea53,_0x2a9529=Object[_0x140ac5(0x87f)](_0x289e18);if(_0x2a9529['length']===0x0){console[_0x140ac5(0x689)](_0x282826+_0x22840b(_0x3523a5['dim'],'{}'));return;}const _0x36b9fc=Math['min'](0x1c,Math[_0x140ac5(0x413)](..._0x2a9529['map'](([_0x20ba08])=>_0x20ba08[_0x140ac5(0x6ad)])));for(const [_0x3f50f3,_0x3dfa77]of _0x2a9529){const _0x434f01=_0x22840b(_0x3523a5[_0x140ac5(0x8a8)],_0x3f50f3['padEnd'](_0x36b9fc));if(_0x3dfa77===null||_0x3dfa77===undefined)console[_0x140ac5(0x689)](_0x282826+_0x434f01+'\x20\x20'+_0x22840b(_0x3523a5['dim'],_0x140ac5(0x429)));else{if(typeof _0x3dfa77===_0x140ac5(0x601)){const _0x4840ef=JSON[_0x140ac5(0x2d1)](_0x3dfa77);_0x4840ef[_0x140ac5(0x6ad)]<=0x50?console[_0x140ac5(0x689)](_0x282826+_0x434f01+'\x20\x20'+_0x22840b(_0x3523a5[_0x140ac5(0x78f)],_0x4840ef)):(console[_0x140ac5(0x689)](_0x282826+_0x434f01),_0x12ef18(_0x3dfa77,_0x282826+'\x20\x20'));}else{const _0x42f1c3=typeof _0x3dfa77===_0x140ac5(0x29d)?_0x22840b(_0x3dfa77?_0x3523a5['green']:_0x3523a5[_0x140ac5(0x5cc)],String(_0x3dfa77)):typeof _0x3dfa77===_0x140ac5(0x72c)?_0x22840b(_0x3523a5[_0x140ac5(0x38e)],String(_0x3dfa77)):_0x22840b(_0x3523a5[_0x140ac5(0x5b5)],String(_0x3dfa77));console['log'](_0x282826+_0x434f01+'\x20\x20'+_0x42f1c3);}}}}function _0x12072e(_0x186b24,_0x51ce59=''){const _0x3acf7f=_0x5eea53,_0x21f214=Math[_0x3acf7f(0x279)](0x20,Math[_0x3acf7f(0x413)](..._0x186b24[_0x3acf7f(0x595)](_0x501869=>String(_0x501869['key'])['length'])));for(const {key:_0x420910,value:_0x426d91,score:_0x1cb14b,clock:_0xd27fe1}of _0x186b24){const _0x54e936=_0x22840b(_0x3523a5[_0x3acf7f(0x49b)]+_0x3523a5[_0x3acf7f(0x8a8)],String(_0x420910)[_0x3acf7f(0x708)](_0x21f214)),_0x49b5bf=_0x426d91==null?_0x22840b(_0x3523a5[_0x3acf7f(0x78f)],_0x3acf7f(0x429)):typeof _0x426d91==='object'?_0x22840b(_0x3523a5['dim'],JSON[_0x3acf7f(0x2d1)](_0x426d91)):_0x22840b(_0x3523a5[_0x3acf7f(0x5b5)],String(_0x426d91)),_0x546434=_0x1cb14b!=null?_0x22840b(_0x3523a5[_0x3acf7f(0x348)],_0x3acf7f(0x23f)+_0x1cb14b[_0x3acf7f(0x39b)](0x4)):'',_0x40060c=_0xd27fe1!=null?_0x22840b(_0x3523a5[_0x3acf7f(0x348)],_0x3acf7f(0x2ae)+_0xd27fe1):'';console[_0x3acf7f(0x689)](_0x51ce59+_0x54e936+'\x20\x20'+_0x49b5bf+_0x546434+_0x40060c);}}function _0x1b7411(_0x435e0c,_0x4fbf42=''){const _0x25bcf5=_0x5eea53,_0x168eb3=Math['min'](0x20,Math[_0x25bcf5(0x413)](..._0x435e0c[_0x25bcf5(0x595)](_0x352914=>_0x352914['type']['length'])));for(const {type:_0x9c8fdd,count:_0x187be3,fields:_0x3ec74e}of _0x435e0c){if(_0x9c8fdd[_0x25bcf5(0x579)]('~'))continue;const _0x12638b=_0x22840b(_0x3523a5['bold']+_0x3523a5['cyan'],_0x9c8fdd['padEnd'](_0x168eb3)),_0x4d4009=_0x22840b(_0x3523a5[_0x25bcf5(0x38e)],String(_0x187be3)[_0x25bcf5(0x7b5)](0x6))+_0x22840b(_0x3523a5['dim'],_0x25bcf5(0x4eb)),_0x49715b=_0x3ec74e&&Object[_0x25bcf5(0x818)](_0x3ec74e)[_0x25bcf5(0x6ad)]?_0x22840b(_0x3523a5['dim'],_0x25bcf5(0x3d5)+Object['keys'](_0x3ec74e)[_0x25bcf5(0x27f)](0x0,0x6)['join'](',\x20')+(Object[_0x25bcf5(0x818)](_0x3ec74e)[_0x25bcf5(0x6ad)]>0x6?'…':'')):'';console['log'](_0x4fbf42+_0x12638b+'\x20\x20'+_0x4d4009+_0x49715b);}}const _0x34aaf0=[_0x5eea53(0x427),_0x5eea53(0x292),_0x5eea53(0x290),'files/',_0x5eea53(0x826),_0x5eea53(0x266)];function _0x5931a3(_0x4c9492,_0x2977b4){const _0xc149ba=_0x5eea53;if(_0x4c9492[_0xc149ba(0x579)]('/api/'))return _0x4c9492;if(_0x4c9492[_0xc149ba(0x579)]('/'))return _0xc149ba(0x459)+_0x4c9492;if(_0x4c9492[_0xc149ba(0x579)](_0xc149ba(0x53e)))return _0xc149ba(0x506)+_0x4c9492;const _0x139c8a=_0x34aaf0['some'](_0x7505b0=>_0x4c9492===_0x7505b0[_0xc149ba(0x813)](/\/$/,'')||_0x4c9492[_0xc149ba(0x579)](_0x7505b0));return _0x139c8a?_0xc149ba(0x61a)+_0x2977b4+'/'+_0x4c9492:_0xc149ba(0x506)+_0x4c9492;}function _0x131c6c(_0x398c66){const _0x252f9d=_0x5eea53,_0x48bfd3={},_0x4031c7=[];let _0x4c43bb=0x0;while(_0x4c43bb<_0x398c66[_0x252f9d(0x6ad)]){if((_0x398c66[_0x4c43bb]===_0x252f9d(0x7e6)||_0x398c66[_0x4c43bb]==='-e')&&_0x398c66[_0x4c43bb+0x1]&&!_0x398c66[_0x4c43bb+0x1]['startsWith']('-'))_0x48bfd3[_0x252f9d(0x787)]=_0x398c66[++_0x4c43bb];else _0x398c66[_0x4c43bb]===_0x252f9d(0x62e)||_0x398c66[_0x4c43bb]==='-h'?_0x48bfd3[_0x252f9d(0x870)]=!![]:_0x4031c7['push'](_0x398c66[_0x4c43bb]);_0x4c43bb++;}return{'flags':_0x48bfd3,'rest':_0x4031c7};}const _0x4df1df={'system':_0x5eea53(0x2c6),'envs':_0x5eea53(0x4a6),'types':'Types','data':_0x5eea53(0x374),'indexes':_0x5eea53(0x57b),'fts':_0x5eea53(0x531),'sync':_0x5eea53(0x87c),'queue':_0x5eea53(0x6e3),'files':_0x5eea53(0x206),'embeddings':_0x5eea53(0x491),'engines':_0x5eea53(0x281),'admin':'Admin','event':_0x5eea53(0x5f6),'processor':_0x5eea53(0x213)},_0x1069ce=[_0x5eea53(0x7f0),'envs',_0x5eea53(0x427),_0x5eea53(0x2a3),_0x5eea53(0x261),'fts',_0x5eea53(0x6d9),_0x5eea53(0x41c),_0x5eea53(0x2a1),_0x5eea53(0x314),_0x5eea53(0x38c),'admin'];function _0x2d8572(_0x1494f4){const _0x2ec303=_0x5eea53;return _0x1494f4[_0x2ec303(0x813)](/^\/api/,'')[_0x2ec303(0x813)](/^\[\/env\/:env=[^\]]*\]/,_0x2ec303(0x41b))['replace'](/^\/env\/:env/,'env/:env')[_0x2ec303(0x813)](/^\//,'');}function _0x5b26e1(_0x334efe,_0x407e9f=''){const _0x2a2ec0=_0x5eea53,_0x9dfa74=_0x334efe[_0x2a2ec0(0x5fb)]['listRoutes']()[_0x2a2ec0(0x542)](_0xc28f37=>!_0xc28f37[_0x2a2ec0(0x74c)]?.[_0x2a2ec0(0x8c6)]),_0xff698f=_0x407e9f?_0x9dfa74[_0x2a2ec0(0x542)](_0xeda72a=>_0xeda72a[_0x2a2ec0(0x5be)][_0x2a2ec0(0x368)]()[_0x2a2ec0(0x1a1)](_0x407e9f[_0x2a2ec0(0x368)]())||(_0x22211d(_0xeda72a)??'')[_0x2a2ec0(0x368)]()['includes'](_0x407e9f[_0x2a2ec0(0x368)]())||_0x237475(_0xeda72a)[_0x2a2ec0(0x721)](_0x18a3d0=>_0x18a3d0[_0x2a2ec0(0x368)]()[_0x2a2ec0(0x1a1)](_0x407e9f['toLowerCase']()))):_0x9dfa74;if(!_0xff698f[_0x2a2ec0(0x6ad)]){console['log'](_0x22840b(_0x3523a5[_0x2a2ec0(0x5cc)],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x407e9f+'\x22\x0a'));return;}const _0x5b42ef=new Map();for(const _0x53a10f of _0xff698f){const _0x1c7de9=_0x237475(_0x53a10f)[0x0]??_0x2a2ec0(0x624);if(!_0x5b42ef[_0x2a2ec0(0x2ad)](_0x1c7de9))_0x5b42ef[_0x2a2ec0(0x259)](_0x1c7de9,[]);_0x5b42ef[_0x2a2ec0(0x2fa)](_0x1c7de9)[_0x2a2ec0(0x557)](_0x53a10f);}const _0x271ea1=[..._0x1069ce[_0x2a2ec0(0x542)](_0x2bdbcf=>_0x5b42ef[_0x2a2ec0(0x2ad)](_0x2bdbcf)),...[..._0x5b42ef[_0x2a2ec0(0x818)]()][_0x2a2ec0(0x542)](_0x3325aa=>!_0x1069ce[_0x2a2ec0(0x1a1)](_0x3325aa))];console[_0x2a2ec0(0x689)]('');for(const _0x2199df of _0x271ea1){const _0x1deffa=_0x5b42ef[_0x2a2ec0(0x2fa)](_0x2199df);if(!_0x1deffa?.['length'])continue;console[_0x2a2ec0(0x689)](_0x22840b(_0x3523a5[_0x2a2ec0(0x49b)],'\x20\x20'+(_0x4df1df[_0x2199df]??_0x2199df)));for(const _0x1925e2 of _0x1deffa){const _0x476ee8=_0x22840b(_0x3523a5[_0x2a2ec0(0x38e)],_0x1925e2[_0x2a2ec0(0x225)][_0x2a2ec0(0x708)](0x7)),_0xa02e7e=_0x22840b(_0x3523a5[_0x2a2ec0(0x8a8)],_0x2d8572(_0x1925e2['path'])),_0x2fa878=_0x22211d(_0x1925e2)?_0x22840b(_0x3523a5['dim'],'\x20\x20'+_0x22211d(_0x1925e2)):'',_0x549d66=_0x1925e2['operation']?.['id']?_0x22840b(_0x3523a5[_0x2a2ec0(0x348)],_0x2a2ec0(0x517)+_0x1925e2['operation']['id']+']'):'';console[_0x2a2ec0(0x689)]('\x20\x20\x20\x20'+_0x476ee8+'\x20'+_0xa02e7e+_0x2fa878+_0x549d66);}console['log']('');}}function _0x3f3ed1(_0x2b6ff6,_0x44cd60){const _0x3a2632=_0x5eea53,_0x3f58ce=_0x44cd60['replace'](/^\/api(\/env\/[^/]+)?\//,'')[_0x3a2632(0x84e)]('/')[0x0],_0x362b54=_0x2b6ff6[_0x3a2632(0x5fb)][_0x3a2632(0x4aa)]()[_0x3a2632(0x542)](_0x52b3b4=>_0x52b3b4[_0x3a2632(0x5be)][_0x3a2632(0x368)]()[_0x3a2632(0x1a1)](_0x3f58ce[_0x3a2632(0x368)]()));if(!_0x362b54['length']){console['log'](_0x22840b(_0x3523a5['yellow'],_0x3a2632(0x634)+_0x44cd60+'\x0a'));return;}console['log']('');for(const _0x340916 of _0x362b54[_0x3a2632(0x27f)](0x0,0xc)){for(const _0x47c3dd of _0x583be1(_0x340916)){console['log'](_0x47c3dd);}console[_0x3a2632(0x689)]('');}}function _0x22211d(_0x7c9848){const _0x4a0eb2=_0x5eea53;return _0x7c9848[_0x4a0eb2(0x8b3)]?.['summary']??_0x7c9848[_0x4a0eb2(0x74c)]?.['summary']??'';}function _0x2253f5(_0x3f4182){const _0x18612e=_0x5eea53;return _0x3f4182[_0x18612e(0x8b3)]?.[_0x18612e(0x1ba)]??_0x3f4182['meta']?.[_0x18612e(0x1ba)]??'';}function _0x237475(_0x2f145d){const _0x5cb944=_0x5eea53;return _0x2f145d[_0x5cb944(0x8b3)]?.[_0x5cb944(0x33c)]?.[_0x5cb944(0x6ad)]?_0x2f145d['operation'][_0x5cb944(0x33c)]:_0x2f145d[_0x5cb944(0x74c)]?.[_0x5cb944(0x33c)]??[];}function _0x583be1(_0x434542){const _0x4b3919=_0x5eea53,_0x381be2=[];_0x381be2[_0x4b3919(0x557)]('\x20\x20'+_0x22840b(_0x3523a5['bold']+_0x3523a5[_0x4b3919(0x38e)],_0x434542[_0x4b3919(0x225)][_0x4b3919(0x708)](0x7))+'\x20'+_0x22840b(_0x3523a5[_0x4b3919(0x49b)]+_0x3523a5['cyan'],_0x434542[_0x4b3919(0x5be)]));_0x434542[_0x4b3919(0x8b3)]?.['id']&&_0x381be2[_0x4b3919(0x557)](_0x4b3919(0x421)+_0x22840b(_0x3523a5[_0x4b3919(0x348)],_0x4b3919(0x3f4)+_0x434542['operation']['id']));_0x22211d(_0x434542)&&_0x381be2[_0x4b3919(0x557)](_0x4b3919(0x421)+_0x22840b(_0x3523a5[_0x4b3919(0x5b5)],_0x22211d(_0x434542)));_0x2253f5(_0x434542)&&_0x381be2[_0x4b3919(0x557)](_0x4b3919(0x421)+_0x22840b(_0x3523a5[_0x4b3919(0x78f)],_0x2253f5(_0x434542)));_0x237475(_0x434542)['length']&&_0x381be2[_0x4b3919(0x557)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x22840b(_0x3523a5['gray'],_0x4b3919(0x503)+_0x237475(_0x434542)[_0x4b3919(0x1c9)](',\x20')));_0x434542['operation']?.[_0x4b3919(0x310)]?.['access']&&_0x381be2[_0x4b3919(0x557)](_0x4b3919(0x421)+_0x22840b(_0x3523a5[_0x4b3919(0x348)],'access:\x20'+_0x434542['operation'][_0x4b3919(0x310)]['access']));_0x434542[_0x4b3919(0x8b3)]?.['http']?.[_0x4b3919(0x358)]&&_0x434542[_0x4b3919(0x8b3)][_0x4b3919(0x5fb)][_0x4b3919(0x358)]!==_0x4b3919(0x382)&&_0x381be2[_0x4b3919(0x557)](_0x4b3919(0x421)+_0x22840b(_0x3523a5[_0x4b3919(0x348)],_0x4b3919(0x730)+_0x434542[_0x4b3919(0x8b3)][_0x4b3919(0x5fb)][_0x4b3919(0x358)]));if(_0x434542[_0x4b3919(0x8b3)]?.['inputSchema']){const _0x551f00=Object[_0x4b3919(0x818)](_0x434542[_0x4b3919(0x8b3)]['inputSchema']['properties']||{});if(_0x551f00[_0x4b3919(0x6ad)])_0x381be2[_0x4b3919(0x557)](_0x4b3919(0x421)+_0x22840b(_0x3523a5[_0x4b3919(0x348)],_0x4b3919(0x2d3)+_0x551f00[_0x4b3919(0x1c9)](',\x20')));}return _0x434542[_0x4b3919(0x74c)]?.['body']&&_0x381be2[_0x4b3919(0x557)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x22840b(_0x3523a5[_0x4b3919(0x348)],_0x4b3919(0x51d)+JSON['stringify'](_0x434542[_0x4b3919(0x74c)][_0x4b3919(0x246)]))),_0x381be2;}async function _0x5023ee(_0x22fb81,_0x1d0d9f,_0x1515e2,_0x2b7343=null){const _0x56917e=_0x5eea53,_0x2ea71c=_0x1515e2[_0x56917e(0x196)]('?'),_0x37cd95=_0x2ea71c>=0x0?_0x1515e2[_0x56917e(0x27f)](0x0,_0x2ea71c):_0x1515e2,_0x597937=_0x2ea71c>=0x0?_0x1515e2[_0x56917e(0x27f)](_0x2ea71c+0x1):'',_0x160732=Object['fromEntries'](new URLSearchParams(_0x597937)['entries']());return _0x22fb81['http'][_0x56917e(0x88f)](_0x1d0d9f,_0x37cd95,{'body':_0x2b7343,'query':_0x160732,'headers':{'content-type':'application/json'}},{'internal':!![]});}function _0x31ba4a(_0x4d02ec){const _0x16f888=_0x5eea53;if(!_0x4d02ec)return null;const _0x36c0b8=_0x4d02ec[_0x16f888(0x48b)]();if(!_0x36c0b8)return null;try{return JSON[_0x16f888(0x7d3)](_0x36c0b8);}catch{}try{return JSON[_0x16f888(0x7d3)](_0x1923b5(_0x36c0b8));}catch(_0xa6b930){throw new SyntaxError(_0xa6b930[_0x16f888(0x81d)],{'cause':_0xa6b930});}}function _0x1923b5(_0x7c939b){const _0xa8601d=_0x5eea53;let _0x35a1ad='',_0x133b3c=0x0;while(_0x133b3c<_0x7c939b[_0xa8601d(0x6ad)]){const _0x281e8a=_0x7c939b[_0x133b3c];if(_0x281e8a==='\x22'){_0x35a1ad+='\x22',_0x133b3c++;while(_0x133b3c<_0x7c939b[_0xa8601d(0x6ad)]&&_0x7c939b[_0x133b3c]!=='\x22'){if(_0x7c939b[_0x133b3c]==='\x5c'){_0x35a1ad+=_0x7c939b[_0x133b3c++];if(_0x133b3c<_0x7c939b[_0xa8601d(0x6ad)])_0x35a1ad+=_0x7c939b[_0x133b3c++];}else _0x35a1ad+=_0x7c939b[_0x133b3c++];}_0x35a1ad+='\x22';if(_0x133b3c<_0x7c939b[_0xa8601d(0x6ad)])_0x133b3c++;continue;}if(_0x281e8a==='\x27'){_0x35a1ad+='\x22',_0x133b3c++;while(_0x133b3c<_0x7c939b[_0xa8601d(0x6ad)]&&_0x7c939b[_0x133b3c]!=='\x27'){if(_0x7c939b[_0x133b3c]==='\x5c'&&_0x7c939b[_0x133b3c+0x1]==='\x27')_0x35a1ad+='\x27',_0x133b3c+=0x2;else _0x7c939b[_0x133b3c]==='\x22'?(_0x35a1ad+='\x5c\x22',_0x133b3c++):_0x35a1ad+=_0x7c939b[_0x133b3c++];}_0x35a1ad+='\x22';if(_0x133b3c<_0x7c939b[_0xa8601d(0x6ad)])_0x133b3c++;continue;}if(_0xa8601d(0x884)[_0xa8601d(0x1a1)](_0x281e8a)){_0x35a1ad+=_0x281e8a,_0x133b3c++;continue;}let _0x4143fa='';while(_0x133b3c<_0x7c939b['length']&&!_0xa8601d(0x5bd)['includes'](_0x7c939b[_0x133b3c])&&_0x7c939b[_0x133b3c]!=='\x20'&&_0x7c939b[_0x133b3c]!=='\x09'&&_0x7c939b[_0x133b3c]!=='\x0a'&&_0x7c939b[_0x133b3c]!=='\x0d'){_0x4143fa+=_0x7c939b[_0x133b3c++];}let _0x23f491=_0x133b3c;while(_0x23f491<_0x7c939b[_0xa8601d(0x6ad)]&&(_0x7c939b[_0x23f491]==='\x20'||_0x7c939b[_0x23f491]==='\x09'))_0x23f491++;if(_0x7c939b[_0x23f491]===':')_0x35a1ad+='\x22'+_0x4143fa+'\x22';else _0x4143fa===_0xa8601d(0x7c4)||_0x4143fa===_0xa8601d(0x51e)||_0x4143fa===_0xa8601d(0x429)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/['test'](_0x4143fa)?_0x35a1ad+=_0x4143fa:_0x35a1ad+='\x22'+_0x4143fa+'\x22';}return _0x35a1ad[_0xa8601d(0x813)](/,(\s*[}\]])/g,'$1');}function _0x1b9b51(_0x756e28){const _0x225c75=_0x5eea53,_0x1de8ce=[];let _0x120c95=0x0;while(_0x120c95<_0x756e28[_0x225c75(0x6ad)]){while(_0x120c95<_0x756e28[_0x225c75(0x6ad)]&&(_0x756e28[_0x120c95]==='\x20'||_0x756e28[_0x120c95]==='\x09'))_0x120c95++;if(_0x120c95>=_0x756e28['length'])break;const _0x30ac7c=_0x756e28[_0x120c95];if(_0x30ac7c==='{'||_0x30ac7c==='['){const _0x5a03fe=_0x30ac7c==='{'?'}':']',_0x557382=_0x120c95++;let _0xd82ea2=0x1,_0x290cec=![],_0x48c957='';while(_0x120c95<_0x756e28[_0x225c75(0x6ad)]&&_0xd82ea2>0x0){const _0x3b4322=_0x756e28[_0x120c95];if(_0x290cec){if(_0x3b4322==='\x5c')_0x120c95++;else{if(_0x3b4322===_0x48c957)_0x290cec=![];}}else{if(_0x3b4322==='\x22'||_0x3b4322==='\x27')_0x290cec=!![],_0x48c957=_0x3b4322;else{if(_0x3b4322===_0x30ac7c)_0xd82ea2++;else{if(_0x3b4322===_0x5a03fe)_0xd82ea2--;}}}_0x120c95++;}_0x1de8ce['push'](_0x756e28[_0x225c75(0x27f)](_0x557382,_0x120c95));continue;}if(_0x30ac7c==='\x22'||_0x30ac7c==='\x27'){const _0x3eb875=_0x30ac7c;_0x120c95++;let _0xc989ce='';while(_0x120c95<_0x756e28[_0x225c75(0x6ad)]&&_0x756e28[_0x120c95]!==_0x3eb875){if(_0x756e28[_0x120c95]==='\x5c'&&_0x120c95+0x1<_0x756e28['length'])_0x120c95++,_0xc989ce+=_0x756e28[_0x120c95++];else _0xc989ce+=_0x756e28[_0x120c95++];}if(_0x120c95<_0x756e28[_0x225c75(0x6ad)])_0x120c95++;_0x1de8ce['push'](_0xc989ce);continue;}let _0x23e2ee='';while(_0x120c95<_0x756e28[_0x225c75(0x6ad)]&&_0x756e28[_0x120c95]!=='\x20'&&_0x756e28[_0x120c95]!=='\x09'&&_0x756e28[_0x120c95]!=='{'&&_0x756e28[_0x120c95]!=='['){_0x23e2ee+=_0x756e28[_0x120c95++];}if(_0x23e2ee)_0x1de8ce[_0x225c75(0x557)](_0x23e2ee);}return _0x1de8ce;}function _0x3e8fd6(_0x149369,_0x53323d){const _0x238831=_0x5eea53,_0x9c6ef5=[..._0x149369['_envs'][_0x238831(0x818)]()][_0x238831(0x542)](_0xb45512=>!_0xb45512['startsWith']('~'));console['log'](['',_0x22840b(_0x3523a5[_0x238831(0x49b)]+_0x3523a5[_0x238831(0x8a8)],_0x238831(0x53c)),_0x22840b(_0x3523a5['bold']+_0x3523a5[_0x238831(0x8a8)],_0x238831(0x57f))+_0x22840b(_0x3523a5['bold'],'\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20')+_0x22840b(_0x3523a5[_0x238831(0x49b)]+_0x3523a5[_0x238831(0x8a8)],'║'),_0x22840b(_0x3523a5['bold']+_0x3523a5[_0x238831(0x8a8)],'\x20\x20╚═══════════════════════════╝'),'','\x20\x20'+_0x22840b(_0x3523a5[_0x238831(0x452)],'✓')+'\x20'+_0x22840b(_0x3523a5[_0x238831(0x49b)],_0x238831(0x72d))+_0x238831(0x51b)+_0x53323d['port'],..._0x53323d[_0x238831(0x783)]>0x1?['\x20\x20'+_0x22840b(_0x3523a5['green'],'✓')+'\x20'+_0x22840b(_0x3523a5[_0x238831(0x49b)],_0x238831(0x60a))+'\x20'+_0x53323d[_0x238831(0x783)]+_0x238831(0x67a)+_0x22840b(_0x3523a5['gray'],'(primary\x20=\x20processor)')]:[],'\x20\x20'+_0x22840b(_0x3523a5[_0x238831(0x452)],'✓')+'\x20'+_0x22840b(_0x3523a5[_0x238831(0x49b)],'api')+_0x238831(0x7f6)+_0x53323d[_0x238831(0x397)]+'/api','\x20\x20'+_0x22840b(_0x3523a5[_0x238831(0x452)],'✓')+'\x20'+_0x22840b(_0x3523a5['bold'],_0x238831(0x5be))+_0x238831(0x86f)+_0x53323d[_0x238831(0x336)],'\x20\x20'+_0x22840b(_0x3523a5[_0x238831(0x452)],'✓')+'\x20'+_0x22840b(_0x3523a5['bold'],'id')+_0x238831(0x198)+_0x22840b(_0x3523a5[_0x238831(0x348)],_0x149369['id']),'\x20\x20'+_0x22840b(_0x3523a5[_0x238831(0x452)],'✓')+'\x20'+_0x22840b(_0x3523a5[_0x238831(0x49b)],'envs')+_0x238831(0x86f)+_0x9c6ef5[_0x238831(0x595)](_0x38109c=>_0x22840b(_0x3523a5[_0x238831(0x8a8)],_0x38109c))[_0x238831(0x1c9)]('\x20\x20'),..._0x53323d[_0x238831(0x69b)]?[]:['\x20\x20'+_0x22840b(_0x3523a5[_0x238831(0x452)],'✓')+'\x20'+_0x22840b(_0x3523a5[_0x238831(0x49b)],'admin')+_0x238831(0x49a)+_0x53323d[_0x238831(0x397)]+'/admin/index.html'],'',_0x22840b(_0x3523a5['dim'],_0x238831(0x415)+_0x22840b(_0x3523a5['bold'],'help')+'\x20for\x20commands,\x20'+_0x22840b(_0x3523a5[_0x238831(0x49b)],_0x238831(0x280))+_0x238831(0x7f9)+_0x22840b(_0x3523a5['bold'],_0x238831(0x468))+'\x20to\x20quit.'),''][_0x238831(0x1c9)]('\x0a'));}function _0x1ce3a6(_0x4c9dbe){const _0x55dda0=_0x5eea53;console[_0x55dda0(0x689)]('\x0a'+_0x22840b(_0x3523a5[_0x55dda0(0x49b)],_0x55dda0(0x62d))+'\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x78f)],_0x55dda0(0x702))+'\x0a\x0a\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],'<path>')+_0x55dda0(0x603)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x65d))+'\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x5cc)],_0x55dda0(0x631))+_0x55dda0(0x7c3)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x779))+'\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x65d))+'\x20'+_0x22840b(_0x3523a5['yellow'],'[body]')+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x78f)],_0x55dda0(0x7fa))+'\x0a\x20\x20\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x56c))+_0x55dda0(0x550)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x7f3))+_0x55dda0(0x1a7)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x427))+'\x20\x20\x20\x20\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/'+_0x4c9dbe[_0x55dda0(0x787)]+_0x55dda0(0x4e7)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],'type/users')+_0x55dda0(0x7a1)+_0x4c9dbe[_0x55dda0(0x787)]+_0x55dda0(0x1d4)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x289))+_0x55dda0(0x2ee)+_0x4c9dbe[_0x55dda0(0x787)]+_0x55dda0(0x892)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x426))+_0x55dda0(0x443)+_0x4c9dbe[_0x55dda0(0x787)]+'/type/users/query\x0a\x20\x20\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x797))+'\x0a\x20\x20\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x729))+_0x55dda0(0x499)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x396))+'\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'+_0x22840b(_0x3523a5[_0x55dda0(0x49b)],_0x55dda0(0x7d6))+'\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x78f)],_0x55dda0(0x252))+_0x55dda0(0x620)+_0x22840b(_0x3523a5['cyan'],_0x55dda0(0x2ab))+_0x55dda0(0x6bc)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x62e))+_0x55dda0(0x5b1)+_0x22840b(_0x3523a5['dim'],'Examples')+'\x0a\x20\x20\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x348)],'types\x20--env\x20staging')+_0x55dda0(0x499)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x3fa))+_0x55dda0(0x499)+_0x22840b(_0x3523a5['gray'],_0x55dda0(0x1ab))+'\x0a\x0a'+_0x22840b(_0x3523a5[_0x55dda0(0x49b)],_0x55dda0(0x211))+'\x0a\x0a\x20\x20'+_0x22840b(_0x3523a5['cyan'],_0x55dda0(0x3b4))+_0x55dda0(0x22b)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x787))+_0x55dda0(0x7b2)+_0x22840b(_0x3523a5['cyan'],_0x55dda0(0x280))+'\x20'+_0x22840b(_0x3523a5['dim'],_0x55dda0(0x793))+_0x55dda0(0x6f5)+_0x22840b(_0x3523a5['cyan'],_0x55dda0(0x827))+'\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x78f)],_0x55dda0(0x442))+_0x55dda0(0x1d1)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x5f0))+_0x55dda0(0x6f8)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x870))+_0x55dda0(0x327)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x468))+'\x20'+_0x22840b(_0x3523a5['dim'],_0x55dda0(0x2ac))+_0x55dda0(0x82a));}let _0x1b9073=![];async function _0x21fd38(_0xc65779,_0x7cc77=0x0,_0x324f38=null){const _0x72dd4d=_0x5eea53;_0x1b9073&&(process['stderr'][_0x72dd4d(0x82b)](_0x22840b(_0x3523a5[_0x72dd4d(0x399)],_0x72dd4d(0x6ec))),process[_0x72dd4d(0x468)](0x82));_0x1b9073=!![],process[_0x72dd4d(0x498)][_0x72dd4d(0x82b)]('\x0a'),process[_0x72dd4d(0x6d3)][_0x72dd4d(0x82b)](_0x22840b(_0x3523a5['yellow'],'\x20\x20[okdb]\x20'+(_0x324f38?_0x72dd4d(0x5a3)+_0x324f38+',\x20':'')+_0x72dd4d(0x5d9)));const _0xe62be0=setTimeout(()=>{const _0x36700e=_0x72dd4d;process['stderr'][_0x36700e(0x82b)](_0x22840b(_0x3523a5[_0x36700e(0x399)],'\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a')),process['exit'](0x1);},0x1388);try{await _0xc65779[_0x72dd4d(0x6e0)]();}catch(_0x481411){console[_0x72dd4d(0x6cd)](_0x22840b(_0x3523a5[_0x72dd4d(0x399)],'\x20\x20'+_0x481411['message']));}clearTimeout(_0xe62be0),process[_0x72dd4d(0x6d3)][_0x72dd4d(0x82b)](_0x22840b(_0x3523a5[_0x72dd4d(0x78f)],'\x20\x20[okdb]\x20closed\x20cleanly\x0a')),process[_0x72dd4d(0x468)](_0x7cc77);}function _0x14a4d4(_0x41729b){const _0x1b9820=_0x5eea53,_0x1614e5=_0x41729b[_0x1b9820(0x787)]!==_0x1b9820(0x7eb)?_0x22840b(_0x3523a5[_0x1b9820(0x5cc)],'['+_0x41729b[_0x1b9820(0x787)]+']'):'';return _0x22840b(_0x3523a5['bold']+_0x3523a5[_0x1b9820(0x8a8)],_0x1b9820(0x58a))+_0x1614e5+_0x22840b(_0x3523a5['gray'],'>\x20');}const _0x241da1=new Set([_0x5eea53(0x318),'POST',_0x5eea53(0x488),_0x5eea53(0x597),_0x5eea53(0x32e)]);async function _0x137ced(_0x401f85,_0xffb647,_0x454830,_0x58b851,_0xf1d529,_0x208d96){const _0x1418d3=_0x5eea53;_0x401f85=_0x401f85[_0x1418d3(0x48b)]();if(!_0x401f85||_0x401f85[_0x1418d3(0x579)]('#'))return;const _0x3c3da6=_0x1b9b51(_0x401f85),{flags:_0x381ea4,rest:_0x322e1e}=_0x131c6c(_0x3c3da6);if(!_0x322e1e[_0x1418d3(0x6ad)])return;const _0x1fdf4c=_0x322e1e[0x0],_0x2793c1=_0x1fdf4c[_0x1418d3(0x2e6)]();if(_0x2793c1===_0x1418d3(0x75f)){if(_0x322e1e[0x1])_0x3f3ed1(_0xffb647,_0x5931a3(_0x322e1e[0x1],_0x381ea4['env']??_0xf1d529[_0x1418d3(0x787)]));else _0x1ce3a6(_0xf1d529);return;}if(_0x2793c1===_0x1418d3(0x6a9)){const _0x2eae4b=_0x322e1e[0x1];if(!_0x2eae4b){console['log'](_0x22840b(_0x3523a5['red'],_0x1418d3(0x1c5)));return;}try{_0xffb647['env'](_0x2eae4b),_0xf1d529['env']=_0x2eae4b,_0x208d96?.[_0x1418d3(0x868)](_0x14a4d4(_0xf1d529)),console['log']('\x0a\x20\x20'+_0x22840b(_0x3523a5[_0x1418d3(0x452)],'✓')+'\x20active\x20env:\x20'+_0x22840b(_0x3523a5['bold']+_0x3523a5[_0x1418d3(0x8a8)],_0x2eae4b)+'\x0a');}catch{console[_0x1418d3(0x689)]('\x0a\x20\x20'+_0x22840b(_0x3523a5[_0x1418d3(0x399)],'✗')+_0x1418d3(0x32c)+_0x22840b(_0x3523a5['bold'],_0x2eae4b)+'\x20not\x20found'+_0x22840b(_0x3523a5[_0x1418d3(0x78f)],_0x1418d3(0x686)));}return;}if(_0x2793c1===_0x1418d3(0x303)){const _0x504d2c=[..._0xffb647[_0x1418d3(0x41e)][_0x1418d3(0x818)]()][_0x1418d3(0x542)](_0x159ee0=>!_0x159ee0['startsWith']('~'));console['log']('');for(const _0x402e07 of _0x504d2c){const _0x57418d=_0x402e07===_0xf1d529['env'];console['log']('\x20\x20'+(_0x57418d?_0x22840b(_0x3523a5[_0x1418d3(0x452)],'●'):_0x22840b(_0x3523a5[_0x1418d3(0x78f)],'○'))+'\x20\x20'+(_0x57418d?_0x22840b(_0x3523a5[_0x1418d3(0x49b)]+_0x3523a5['cyan'],_0x402e07):_0x22840b(_0x3523a5[_0x1418d3(0x78f)],_0x402e07)));}console[_0x1418d3(0x689)](_0x1418d3(0x822)+_0x22840b(_0x3523a5[_0x1418d3(0x78f)],_0x1418d3(0x72f))+'\x20'+_0x22840b(_0x3523a5[_0x1418d3(0x8a8)],_0xf1d529['env'])),console[_0x1418d3(0x689)]('');return;}if(_0x2793c1===_0x1418d3(0x223)){const _0x37059d=[..._0xffb647[_0x1418d3(0x41e)][_0x1418d3(0x722)]()][_0x1418d3(0x542)](_0x443cc0=>!_0x443cc0[_0x1418d3(0x4f9)][_0x1418d3(0x579)]('~'));console[_0x1418d3(0x689)]('');const _0x3bd803=Math['max'](..._0x37059d[_0x1418d3(0x595)](_0x5085a9=>_0x5085a9['name'][_0x1418d3(0x6ad)]));for(const _0x47e906 of _0x37059d){const _0x24640e=_0x47e906[_0x1418d3(0x4f9)]===_0xf1d529['env'],_0x3c29e7=_0x24640e?_0x22840b(_0x3523a5[_0x1418d3(0x452)],'●'):_0x22840b(_0x3523a5[_0x1418d3(0x78f)],'○'),_0x2caee4=_0x24640e?_0x22840b(_0x3523a5[_0x1418d3(0x49b)]+_0x3523a5['cyan'],_0x47e906[_0x1418d3(0x4f9)][_0x1418d3(0x708)](_0x3bd803)):_0x22840b(_0x3523a5['dim'],_0x47e906[_0x1418d3(0x4f9)][_0x1418d3(0x708)](_0x3bd803)),_0x51123f=[..._0x47e906[_0x1418d3(0x321)][_0x1418d3(0x818)]()]['filter'](_0x50eba7=>!_0x50eba7[_0x1418d3(0x579)]('~')),_0xf0c88f=_0x51123f['length']?_0x22840b(_0x3523a5['dim'],_0x51123f[_0x1418d3(0x27f)](0x0,0x5)[_0x1418d3(0x1c9)](',\x20')+(_0x51123f[_0x1418d3(0x6ad)]>0x5?_0x1418d3(0x877)+(_0x51123f[_0x1418d3(0x6ad)]-0x5)+_0x1418d3(0x389):'')):_0x22840b(_0x3523a5['dim'],'(no\x20types)');console[_0x1418d3(0x689)]('\x20\x20'+_0x3c29e7+'\x20\x20'+_0x2caee4+'\x20\x20'+_0xf0c88f);}console[_0x1418d3(0x689)]('');return;}if(_0x2793c1===_0x1418d3(0x1a3)){const _0x3ab63c=_0x381ea4[_0x1418d3(0x787)]??_0x322e1e[0x1]??_0xf1d529[_0x1418d3(0x787)];try{const _0xebf642=_0xffb647[_0x1418d3(0x787)](_0x3ab63c),_0x1afa25=[..._0xebf642[_0x1418d3(0x321)][_0x1418d3(0x818)]()][_0x1418d3(0x542)](_0x358db9=>!_0x358db9[_0x1418d3(0x579)]('~'))['sort']();console[_0x1418d3(0x689)](_0x1418d3(0x822)+_0x22840b(_0x3523a5[_0x1418d3(0x78f)],_0x1afa25['length']+_0x1418d3(0x390)+(_0x1afa25[_0x1418d3(0x6ad)]!==0x1?'s':'')+_0x1418d3(0x1c7)+_0x3ab63c));for(const _0x4cde7c of _0x1afa25){const _0x29094a=_0xebf642[_0x1418d3(0x321)][_0x1418d3(0x2fa)](_0x4cde7c),_0x208043=_0x29094a?.[_0x1418d3(0x2a3)]?.[_0x1418d3(0x34c)]?.()??0x0,_0x5add25=_0x22840b(_0x3523a5['bold']+_0x3523a5[_0x1418d3(0x8a8)],_0x4cde7c[_0x1418d3(0x708)](0x1c));console['log'](_0x1418d3(0x86f)+_0x5add25+'\x20\x20'+_0x22840b(_0x3523a5[_0x1418d3(0x38e)],String(_0x208043)[_0x1418d3(0x7b5)](0x6))+'\x20'+_0x22840b(_0x3523a5['dim'],'records'));}console[_0x1418d3(0x689)]('');}catch(_0x4c4bf2){console[_0x1418d3(0x6cd)](_0x22840b(_0x3523a5['red'],'\x0a\x20\x20'+_0x4c4bf2[_0x1418d3(0x81d)]+'\x0a'));}return;}if(_0x2793c1===_0x1418d3(0x89e)){_0x5b26e1(_0xffb647,_0x322e1e[_0x1418d3(0x27f)](0x1)[_0x1418d3(0x1c9)]('\x20'));return;}if(_0x2793c1===_0x1418d3(0x807)){const _0x3b3c5e=(_0x322e1e[0x1]??'')[_0x1418d3(0x368)]();if(!_0x3b3c5e||_0x3b3c5e==='on')_0x58b851[_0x1418d3(0x487)]=!![],_0x58b851[_0x1418d3(0x682)]='info',console[_0x1418d3(0x689)](_0x1418d3(0x822)+_0x22840b(_0x3523a5[_0x1418d3(0x452)],'✓')+_0x1418d3(0x858)+_0x22840b(_0x3523a5[_0x1418d3(0x78f)],_0x1418d3(0x1fd))+'\x0a');else{if(_0x3b3c5e===_0x1418d3(0x804))_0x58b851[_0x1418d3(0x487)]=![],console[_0x1418d3(0x689)](_0x1418d3(0x822)+_0x22840b(_0x3523a5[_0x1418d3(0x5cc)],'○')+_0x1418d3(0x706));else _0xdaf3d0[_0x3b3c5e]!==undefined?(_0x58b851['enabled']=!![],_0x58b851[_0x1418d3(0x682)]=_0x3b3c5e,console['log'](_0x1418d3(0x822)+_0x22840b(_0x3523a5['green'],'✓')+_0x1418d3(0x388)+_0x22840b(_0x3523a5['bold'],_0x3b3c5e)+'\x0a')):console[_0x1418d3(0x6cd)](_0x22840b(_0x3523a5['red'],_0x1418d3(0x3aa)));}return;}if(_0x2793c1===_0x1418d3(0x86b)||_0x2793c1===_0x1418d3(0x856)){await _0x21fd38(_0xffb647,0x0);return;}if(_0x2793c1===_0x1418d3(0x3ea)){const _0x56758f='http://localhost:'+_0x454830[_0x1418d3(0x397)]+'/admin/index.html',_0x2ef25e=process[_0x1418d3(0x202)]===_0x1418d3(0x723)?_0x1418d3(0x85c)+_0x56758f:process[_0x1418d3(0x202)]===_0x1418d3(0x6e2)?_0x1418d3(0x66b)+_0x56758f:_0x1418d3(0x6c2)+_0x56758f;require$$4[_0x1418d3(0x607)](_0x2ef25e),console[_0x1418d3(0x689)](_0x1418d3(0x822)+_0x22840b(_0x3523a5[_0x1418d3(0x452)],'✓')+_0x1418d3(0x62a)+_0x22840b(_0x3523a5[_0x1418d3(0x8a8)],_0x56758f)+'\x0a');return;}let _0x5ad06d,_0x28029a,_0x566b4c;if(_0x241da1[_0x1418d3(0x2ad)](_0x2793c1)){_0x5ad06d=_0x2793c1,_0x28029a=_0x322e1e[0x1],_0x566b4c=_0x322e1e[_0x1418d3(0x27f)](0x2);if(!_0x28029a){console[_0x1418d3(0x6cd)](_0x22840b(_0x3523a5[_0x1418d3(0x399)],_0x1418d3(0x77a)+_0x1fdf4c+_0x1418d3(0x411)));return;}}else _0x5ad06d=null,_0x28029a=_0x322e1e[0x0],_0x566b4c=_0x322e1e[_0x1418d3(0x27f)](0x1);const _0x1d5000=_0x381ea4[_0x1418d3(0x787)]??_0xf1d529[_0x1418d3(0x787)],_0x204db7=_0x5931a3(_0x28029a,_0x1d5000);if(_0x381ea4[_0x1418d3(0x870)]){_0x3f3ed1(_0xffb647,_0x204db7);return;}let _0x20774b=null;if(_0x566b4c[_0x1418d3(0x6ad)]){const _0x4c9869=_0x566b4c[_0x1418d3(0x1c9)]('\x20');try{_0x20774b=_0x31ba4a(_0x4c9869);}catch(_0x594d65){console[_0x1418d3(0x6cd)](_0x22840b(_0x3523a5[_0x1418d3(0x399)],_0x1418d3(0x86a)+_0x4c9869+'\x0a\x20\x20'+_0x22840b(_0x3523a5['dim'],_0x594d65['message'])+'\x0a'));return;}}if(!_0x5ad06d)_0x5ad06d=_0x20774b!==null?'POST':'GET';try{const _0x50c6b1=await _0x5023ee(_0xffb647,_0x5ad06d,_0x204db7,_0x20774b);_0x12839f(_0x50c6b1[_0x1418d3(0x2c4)],_0x50c6b1[_0x1418d3(0x246)]);}catch(_0x519d67){console['error'](_0x1418d3(0x822)+_0x22840b(_0x3523a5[_0x1418d3(0x399)],'✗')+'\x20'+_0x519d67['message']+'\x0a');}}class _0x52f450{constructor(){const _0x4eff61=_0x5eea53;this[_0x4eff61(0x5eb)]=new Map(),this[_0x4eff61(0x450)]=null,this[_0x4eff61(0x65c)]=![];}}function _0x3adfd8(_0x24f3fd){const _0x1dd0b5=_0x5eea53,_0x2f5c84=new _0x52f450();for(const _0x3931f7 of _0x24f3fd){if(_0x3931f7[_0x1dd0b5(0x74c)]?.[_0x1dd0b5(0x8c6)])continue;const _0x1d1967=_0x3931f7[_0x1dd0b5(0x5be)][_0x1dd0b5(0x813)](/^\/api/,'')[_0x1dd0b5(0x813)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x1dd0b5(0x813)](/^\//,'');if(!_0x1d1967)continue;let _0x14cf95=_0x2f5c84;for(const _0x107bf2 of _0x1d1967['split']('/')[_0x1dd0b5(0x542)](Boolean)){if(_0x107bf2[_0x1dd0b5(0x579)](':')){const _0xe4c1ca=_0x107bf2['slice'](0x1);if(!_0x14cf95[_0x1dd0b5(0x450)])_0x14cf95[_0x1dd0b5(0x450)]={'param':_0xe4c1ca,'node':new _0x52f450()};_0x14cf95=_0x14cf95['dynamic'][_0x1dd0b5(0x24d)];}else{if(!_0x14cf95[_0x1dd0b5(0x5eb)][_0x1dd0b5(0x2ad)](_0x107bf2))_0x14cf95[_0x1dd0b5(0x5eb)][_0x1dd0b5(0x259)](_0x107bf2,new _0x52f450());_0x14cf95=_0x14cf95['children']['get'](_0x107bf2);}}_0x14cf95[_0x1dd0b5(0x65c)]=!![];}return _0x2f5c84;}const _0x41d969=new Map();function _0x36c5bb(_0x48cb2e,_0x3ad7de,_0x31adc8){const _0x415f47=_0x5eea53,_0x517c4d=_0x41d969[_0x415f47(0x2fa)](_0x48cb2e);if(_0x517c4d&&_0x517c4d[_0x415f47(0x227)]>Date[_0x415f47(0x4ec)]())return _0x517c4d['val'];const _0x3d6892=_0x31adc8();return _0x41d969[_0x415f47(0x259)](_0x48cb2e,{'val':_0x3d6892,'exp':Date['now']()+_0x3ad7de}),_0x3d6892;}function _0x358bbf(_0x147659,_0x24c923,_0x2263be,_0x50b288){const _0x222351=_0x5eea53,_0x483e11=_0x24c923[_0x222351(0x787)]??_0x50b288['env'];switch(_0x147659){case _0x222351(0x787):return[..._0x2263be['_envs'][_0x222351(0x818)]()][_0x222351(0x542)](_0x2668d5=>!_0x2668d5[_0x222351(0x579)]('~'));case _0x222351(0x4fa):return _0x36c5bb(_0x222351(0x2aa)+_0x483e11,0x7d0,()=>{const _0x56555e=_0x222351;try{return[..._0x2263be[_0x56555e(0x787)](_0x483e11)[_0x56555e(0x321)]['keys']()][_0x56555e(0x542)](_0xac8d04=>!_0xac8d04['startsWith']('~'));}catch{return[];}});case _0x222351(0x47f):if(!_0x24c923[_0x222351(0x4fa)])return[];return _0x36c5bb(_0x222351(0x4ac)+_0x483e11+':'+_0x24c923[_0x222351(0x4fa)],0x5dc,()=>{const _0xdd1be0=_0x222351;try{const _0x2c9510=_0x2263be[_0xdd1be0(0x787)](_0x483e11)[_0xdd1be0(0x321)][_0xdd1be0(0x2fa)](_0x24c923[_0xdd1be0(0x4fa)]);if(!_0x2c9510?.[_0xdd1be0(0x2a3)])return[];const _0x341cf4=[];for(const {key:_0x316ea6}of _0x2c9510['data'][_0xdd1be0(0x3c9)]({'limit':0x32})){_0x341cf4[_0xdd1be0(0x557)](String(_0x316ea6));if(_0x341cf4['length']>=0x32)break;}return _0x341cf4;}catch{return[];}});case _0x222351(0x60b):if(!_0x24c923[_0x222351(0x4fa)])return[];return _0x36c5bb(_0x222351(0x3c0)+_0x483e11+':'+_0x24c923[_0x222351(0x4fa)],0x7d0,()=>{const _0x419e80=_0x222351;try{const _0x5d0585=_0x2263be['env'](_0x483e11)[_0x419e80(0x321)][_0x419e80(0x2fa)](_0x24c923[_0x419e80(0x4fa)]);return _0x5d0585?[..._0x5d0585[_0x419e80(0x2b3)]?.['keys']()??[]]:[];}catch{return[];}});case _0x222351(0x8c7):if(!_0x24c923[_0x222351(0x4fa)])return[];return _0x36c5bb(_0x222351(0x201)+_0x483e11+':'+_0x24c923[_0x222351(0x4fa)],0x7d0,()=>{const _0xd264c2=_0x222351;try{return _0x2263be[_0xd264c2(0x659)]?.['list']?.(_0x24c923[_0xd264c2(0x4fa)],_0x2263be[_0xd264c2(0x787)](_0x483e11))?.['map'](_0x523425=>_0x523425[_0xd264c2(0x4f9)])??[];}catch{return[];}});default:return[];}}function _0x205f6e(_0x36a34a,_0x2092a2,_0x69b21f,_0x3adc71){const _0x37b584=_0x5eea53,_0x39f33d=_0x36a34a[_0x37b584(0x2e8)]('/'),_0x59fd0b=_0x36a34a[_0x37b584(0x84e)]('/'),_0x44b6eb=_0x39f33d?_0x59fd0b[_0x37b584(0x27f)](0x0,-0x1):_0x59fd0b[_0x37b584(0x27f)](0x0,-0x1),_0x515f9f=_0x39f33d?'':_0x59fd0b[_0x59fd0b[_0x37b584(0x6ad)]-0x1];let _0x3c6831=_0x2092a2;const _0x472af3={};for(const _0x477313 of _0x44b6eb){if(!_0x477313)continue;if(_0x3c6831[_0x37b584(0x5eb)][_0x37b584(0x2ad)](_0x477313))_0x3c6831=_0x3c6831[_0x37b584(0x5eb)][_0x37b584(0x2fa)](_0x477313);else{if(_0x3c6831[_0x37b584(0x450)])_0x472af3[_0x3c6831[_0x37b584(0x450)][_0x37b584(0x1b7)]]=_0x477313,_0x3c6831=_0x3c6831[_0x37b584(0x450)][_0x37b584(0x24d)];else return[];}}const _0x47de83=_0x44b6eb[_0x37b584(0x542)](Boolean),_0x2ea5cb=_0x47de83[_0x37b584(0x6ad)]?_0x47de83['join']('/')+'/':'',_0x35953d=[];for(const [_0x50690c]of _0x3c6831[_0x37b584(0x5eb)]){if(_0x50690c[_0x37b584(0x579)](_0x515f9f))_0x35953d[_0x37b584(0x557)](_0x2ea5cb+_0x50690c);}if(_0x3c6831[_0x37b584(0x450)])for(const _0x1b410b of _0x358bbf(_0x3c6831[_0x37b584(0x450)][_0x37b584(0x1b7)],_0x472af3,_0x69b21f,_0x3adc71)){if(String(_0x1b410b)[_0x37b584(0x579)](_0x515f9f))_0x35953d['push'](_0x2ea5cb+_0x1b410b);}return _0x35953d[_0x37b584(0x27f)](0x0,0x64);}const _0x59e690=[_0x5eea53(0x870),_0x5eea53(0x500),_0x5eea53(0x787),'envs',_0x5eea53(0x427),'routes',_0x5eea53(0x827),_0x5eea53(0x5f0),_0x5eea53(0x468),'quit'];function _0x71709b(_0x4c81c0,_0x4cdac2,_0x120dfe){return function _0x24a3e6(_0x13bcdc){const _0x2ae485=_0x4c4a;try{const _0x3aedc3=_0x13bcdc[_0x2ae485(0x738)](/\s[{[]/),_0x14dc73=_0x3aedc3>=0x0?_0x13bcdc['slice'](0x0,_0x3aedc3):_0x13bcdc,_0x3e9f55=_0x14dc73[_0x2ae485(0x1be)]();if(!_0x3e9f55){const _0xd8501b=[..._0x59e690,...[..._0x4c81c0['children'][_0x2ae485(0x818)]()]][_0x2ae485(0x27f)](0x0,0x64);return[_0xd8501b,''];}const _0x57cbdc=_0x3e9f55['split'](/\s+/),_0x50fc48=_0x57cbdc[0x0],_0x4d446f=_0x50fc48[_0x2ae485(0x2e6)]();if(_0x57cbdc['length']===0x1){const _0x1b0a7b=_0x50fc48[_0x2ae485(0x368)](),_0x5f4252=_0x59e690[_0x2ae485(0x542)](_0x256c73=>_0x256c73['startsWith'](_0x1b0a7b)),_0x51fd32=_0x205f6e(_0x50fc48,_0x4c81c0,_0x4cdac2,_0x120dfe),_0x3c8da9=[...new Set([..._0x5f4252,..._0x51fd32])][_0x2ae485(0x27f)](0x0,0x64);return[_0x3c8da9,_0x50fc48];}if(_0x241da1[_0x2ae485(0x2ad)](_0x4d446f)&&_0x57cbdc[_0x2ae485(0x6ad)]===0x2){const _0x42122f=_0x57cbdc[0x1],_0x54b1bd=_0x205f6e(_0x42122f,_0x4c81c0,_0x4cdac2,_0x120dfe);return[_0x54b1bd[_0x2ae485(0x595)](_0x4d1b87=>_0x50fc48+'\x20'+_0x4d1b87),_0x50fc48+'\x20'+_0x42122f];}if(!_0x241da1[_0x2ae485(0x2ad)](_0x4d446f)&&_0x57cbdc[_0x2ae485(0x6ad)]>0x1){const _0x2dd09b=_0x205f6e(_0x50fc48,_0x4c81c0,_0x4cdac2,_0x120dfe),_0x5e3825='\x20'+_0x57cbdc[_0x2ae485(0x27f)](0x1)['join']('\x20');return[_0x2dd09b[_0x2ae485(0x595)](_0x2bf723=>_0x2bf723+_0x5e3825),_0x50fc48+_0x5e3825];}return[[],_0x13bcdc];}catch{return[[],_0x13bcdc];}};}async function _0x57cf64(_0x59d2ec,_0x18a272){const _0xd9e460=_0x5eea53,_0x507e44={'enabled':!![],'level':_0x18a272[_0xd9e460(0x8c0)]??_0xd9e460(0x56c)},_0x48f26d={'env':_0xd9e460(0x7eb)},_0x551290={'current':null},_0x278416=_0x3adfd8(_0x59d2ec[_0xd9e460(0x5fb)][_0xd9e460(0x4aa)]()),_0x43c7ae=_0x71709b(_0x278416,_0x59d2ec,_0x48f26d);_0x59d2ec[_0xd9e460(0x689)][_0xd9e460(0x4ef)](_0x3c1743=>{const _0x3d56de=_0xd9e460;if(!_0x507e44[_0x3d56de(0x487)])return;_0x24d976(_0x3c1743,_0x507e44[_0x3d56de(0x682)]),_0x551290[_0x3d56de(0x5c4)]?.['prompt'](!![]);}),_0x3e8fd6(_0x59d2ec,_0x18a272);const _0x38de71=_0x16e03c[_0xd9e460(0x636)]({'input':process[_0xd9e460(0x248)],'output':process['stdout'],'terminal':!![],'completer':_0x43c7ae,'prompt':_0x14a4d4(_0x48f26d),'historySize':_0x3e6880});try{const _0xf4c17a=_0x22f7c4[_0xd9e460(0x308)](_0x4f4a35,_0xd9e460(0x88a))['split']('\x0a')[_0xd9e460(0x542)](Boolean);_0x38de71['history']=_0xf4c17a[_0xd9e460(0x334)]()[_0xd9e460(0x27f)](0x0,_0x3e6880);}catch{}_0x551290[_0xd9e460(0x5c4)]=_0x38de71,_0x38de71['on'](_0xd9e460(0x48c),async _0x5159a1=>{const _0x4d7e7=_0xd9e460;_0x38de71['pause']();try{await _0x137ced(_0x5159a1,_0x59d2ec,_0x18a272,_0x507e44,_0x48f26d,_0x38de71);}catch(_0xd040dd){console['error'](_0x22840b(_0x3523a5[_0x4d7e7(0x399)],'\x20\x20Error:\x20'+_0xd040dd[_0x4d7e7(0x81d)]));}finally{_0x38de71['resume'](),_0x38de71[_0x4d7e7(0x6c8)]();}}),_0x38de71['on'](_0xd9e460(0x6e0),()=>{const _0x23afe7=_0xd9e460;try{const _0x2d4364=[..._0x38de71['history']][_0x23afe7(0x334)]()[_0x23afe7(0x542)](Boolean)[_0x23afe7(0x27f)](0x0,_0x3e6880);_0x22f7c4[_0x23afe7(0x497)](_0x4f4a35,_0x2d4364['join']('\x0a')+'\x0a');}catch{}_0x21fd38(_0x59d2ec,0x0);});let _0x3eefee=0x0;return process['on'](_0xd9e460(0x7e0),()=>{const _0x495515=_0xd9e460;if(_0x1b9073)return _0x21fd38(_0x59d2ec,0x82,'SIGINT');if(_0x38de71['line']==='')return _0x21fd38(_0x59d2ec,0x0,_0x495515(0x7e0));const _0x2a0b8e=Date[_0x495515(0x4ec)]();if(_0x2a0b8e-_0x3eefee<0x5dc)return _0x21fd38(_0x59d2ec,0x0,_0x495515(0x361));_0x3eefee=_0x2a0b8e,process[_0x495515(0x498)]['write']('\x0a'),_0x38de71[_0x495515(0x351)](0x0),_0x38de71['prompt'](),process[_0x495515(0x6d3)][_0x495515(0x82b)](_0x22840b(_0x3523a5[_0x495515(0x78f)],_0x495515(0x774)));}),process['on']('SIGTERM',()=>_0x21fd38(_0x59d2ec,0x0,_0xd9e460(0x8bc))),process['on'](_0xd9e460(0x21c),()=>_0x21fd38(_0x59d2ec,0x0,_0xd9e460(0x21c))),_0x38de71['prompt'](),_0x38de71;}return okdbShell={'start':_0x57cf64,'colorLog':_0x24d976,'lenientParse':_0x31ba4a,'_splitLine':_0x1b9b51,'_formatRouteHelpLines':_0x583be1,'_routeSummary':_0x22211d,'_routeTags':_0x237475},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x1afbc8=_0x1a2e0d;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x27c8be,performance:_0x1ce06a}=require$$0$4,_0x52fabb=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x1afbc8(0x7c4),_0x5b39ba=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x5f0f9f=process.env.OKDB_LOOP_LAG_ALL==='1',_0x533943=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x23f0c1{constructor(){const _0x41bf70=_0x1afbc8;this[_0x41bf70(0x487)]=_0x52fabb,this[_0x41bf70(0x4ae)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x41bf70(0x276)]=![],this[_0x41bf70(0x2cd)]=(_0x5a892f,_0x2e98ad)=>process[_0x41bf70(0x6d3)][_0x41bf70(0x82b)](_0x5a892f+(_0x2e98ad?'\x20'+JSON[_0x41bf70(0x2d1)](_0x2e98ad):'')+'\x0a');}[_0x1afbc8(0x4ec)](){return _0x1ce06a['now']();}[_0x1afbc8(0x254)](_0x22bc36){const _0x56d32d=_0x1afbc8;if(typeof _0x22bc36===_0x56d32d(0x7ca))this[_0x56d32d(0x2cd)]=_0x22bc36;}['note'](_0x254247,_0x504693,_0x444c93){const _0x29ae33=_0x1afbc8;if(!this[_0x29ae33(0x487)])return;let _0x4a8070=this['_buckets'][_0x29ae33(0x2fa)](_0x254247);!_0x4a8070&&(_0x4a8070={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x29ae33(0x4ae)][_0x29ae33(0x259)](_0x254247,_0x4a8070)),_0x4a8070['ms']+=_0x504693,_0x4a8070['count']+=0x1,_0x504693>_0x4a8070[_0x29ae33(0x46d)]&&(_0x4a8070[_0x29ae33(0x46d)]=_0x504693,_0x4a8070[_0x29ae33(0x696)]=_0x444c93||'');}[_0x1afbc8(0x398)](_0x3d0f32){const _0x4beeed=_0x1afbc8;if(!this[_0x4beeed(0x487)]||this[_0x4beeed(0x276)])return;this[_0x4beeed(0x276)]=!![];if(_0x3d0f32)this['_log']=_0x3d0f32;this['_h']=_0x27c8be({'resolution':0xa}),this['_h']['enable'](),this['_timer']=setInterval(()=>this['_report'](),_0x5b39ba);if(this[_0x4beeed(0x6c1)][_0x4beeed(0x895)])this[_0x4beeed(0x6c1)][_0x4beeed(0x895)]();}[_0x1afbc8(0x67f)](_0x9fe9ac){const _0x3768b1=_0x1afbc8;if(!this[_0x3768b1(0x3c4)])this['_windowCbs']=new Set();this['_windowCbs'][_0x3768b1(0x4da)](_0x9fe9ac);if(!this[_0x3768b1(0x276)])this[_0x3768b1(0x2e4)]();}[_0x1afbc8(0x67c)](_0x5be3fb){const _0x5305ed=_0x1afbc8;this[_0x5305ed(0x3c4)]?.[_0x5305ed(0x360)](_0x5be3fb);}['_startAdmission'](){const _0x26cc2f=_0x1afbc8;if(this[_0x26cc2f(0x8a0)])return;this[_0x26cc2f(0x8a0)]=!![];!this['_h']&&(this['_h']=_0x27c8be({'resolution':0xa}),this['_h'][_0x26cc2f(0x311)]());const _0x1da30d=_0x5b39ba;this[_0x26cc2f(0x6c3)]=setInterval(()=>{const _0x20b5c6=_0x26cc2f,_0x408697=this['_h'];if(!_0x408697)return;const _0x2f490d=_0x408697[_0x20b5c6(0x1ef)](0x63)/0xf4240,_0x5aaf68=_0x408697['max']/0xf4240,_0x266fe8=_0x408697['mean']/0xf4240;_0x408697[_0x20b5c6(0x5f9)]();if(this[_0x20b5c6(0x3c4)])for(const _0x5c7a4b of this[_0x20b5c6(0x3c4)]){try{_0x5c7a4b({'p99Ms':_0x2f490d,'maxMs':_0x5aaf68,'meanMs':_0x266fe8,'reportMs':_0x1da30d});}catch{}}},_0x1da30d);if(this[_0x26cc2f(0x6c3)][_0x26cc2f(0x895)])this[_0x26cc2f(0x6c3)][_0x26cc2f(0x895)]();}[_0x1afbc8(0x8c5)](){const _0x50e805=_0x1afbc8,_0x15b68c=this['_h'],_0x42de56=_0x15b68c[_0x50e805(0x413)]/0xf4240,_0x4b935f=_0x15b68c[_0x50e805(0x1ef)](0x63)/0xf4240,_0x264155=_0x15b68c[_0x50e805(0x552)]/0xf4240;_0x15b68c['reset']();const _0x3d1162=[...this[_0x50e805(0x4ae)]['entries']()][_0x50e805(0x595)](([_0x128511,_0x2a776c])=>({'label':_0x128511,..._0x2a776c}))['sort']((_0x76b6a1,_0x26374e)=>_0x26374e['ms']-_0x76b6a1['ms'])[_0x50e805(0x27f)](0x0,0x8);this[_0x50e805(0x4ae)][_0x50e805(0x43c)]();const _0x1d5d83=_0x3d1162[_0x50e805(0x2b9)]((_0x392cc8,_0x3db523)=>_0x392cc8+_0x3db523['ms'],0x0),_0x19323a=_0x3d1162['map'](_0x5bc2c4=>_0x5bc2c4[_0x50e805(0x37e)]+'='+_0x5bc2c4['ms'][_0x50e805(0x39b)](0x0)+_0x50e805(0x192)+_0x5bc2c4[_0x50e805(0x430)]+(_0x5bc2c4[_0x50e805(0x46d)]>0x5?'(worst\x20'+_0x5bc2c4[_0x50e805(0x46d)][_0x50e805(0x39b)](0x0)+'ms'+(_0x5bc2c4[_0x50e805(0x696)]?'\x20'+_0x5bc2c4[_0x50e805(0x696)]:'')+')':''));(_0x5f0f9f||_0x42de56>=_0x533943)&&this['_log']('loop-lag\x20'+_0x5b39ba+_0x50e805(0x6ed)+_0x42de56[_0x50e805(0x39b)](0x0)+_0x50e805(0x2e9)+_0x4b935f[_0x50e805(0x39b)](0x0)+_0x50e805(0x5d8)+_0x264155[_0x50e805(0x39b)](0x0)+_0x50e805(0x734)+_0x1d5d83[_0x50e805(0x39b)](0x0)+'ms'+(_0x19323a['length']?'\x20│\x20'+_0x19323a[_0x50e805(0x1c9)]('\x20\x20'):''),{'feature':_0x50e805(0x85a)});if(this[_0x50e805(0x3c4)])for(const _0x3bb12d of this[_0x50e805(0x3c4)]){try{_0x3bb12d({'p99Ms':_0x4b935f,'maxMs':_0x42de56,'meanMs':_0x264155,'reportMs':_0x5b39ba});}catch{}}}[_0x1afbc8(0x354)](){const _0x3884c5=_0x1afbc8;if(this[_0x3884c5(0x6c1)])clearInterval(this[_0x3884c5(0x6c1)]);if(this['_h'])this['_h'][_0x3884c5(0x41f)]();this[_0x3884c5(0x6c1)]=null,this['_h']=null,this[_0x3884c5(0x276)]=![];}}const _0x83e855=new _0x23f0c1();if(_0x83e855[_0x1afbc8(0x487)])_0x83e855[_0x1afbc8(0x398)]();return okdbLoopMonitor={'LOOP':_0x83e855},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x20adce=0x2**0x1f-0x1;function _0x3cbd52(_0x352ae8){if(!(_0x352ae8>0x0))return 0x0;return _0x352ae8>_0x20adce?_0x20adce:_0x352ae8;}function _0x38a0a9(_0x34adcc){return _0x34adcc===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x20adce,'clampTimerDelay':_0x3cbd52,'isNeverDelay':_0x38a0a9},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x4fe917=require$$0$1,_0xc16328=require$$1;let _0x3cf0cd,_0x4c3e45,_0x55b413,_0x502c82,_0x14e915,_0x112cba,_0xf7e227,_0x26b650=![];const _0x15bcbe=new Set();let _0x4fd725=null;const _0x202f6f=new Map();function _0x216aee(){const _0x5b1fcc=_0x4c4a;if(_0x3cf0cd!==undefined)return _0x3cf0cd;_0x3cf0cd=process.env.OKDB_DIAG==='1';if(!_0x3cf0cd)return![];_0x4c3e45=process.env.OKDB_DIAG_STACK==='1',_0x502c82=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x55b413=new Array(_0x502c82),_0x14e915=0x0,_0x112cba=0x0,_0xf7e227=process.env.OKDB_DIAG_DIR||null;if(_0xf7e227)try{_0x4fe917[_0x5b1fcc(0x51a)](_0xf7e227,{'recursive':!![]});}catch{}return!![];}function _0x295bd1(){return _0x3cf0cd===undefined?_0x216aee():_0x3cf0cd;}function _0x15f6d7(_0x3ec8f5,_0x207946){const _0x4add73=_0x4c4a;if(_0x3cf0cd===undefined?!_0x216aee():!_0x3cf0cd)return;let _0x4892ca;if(_0x4c3e45){const _0x5d1b10=new Error()[_0x4add73(0x5ba)]||'';_0x4892ca=_0x5d1b10['split']('\x0a')[_0x4add73(0x27f)](0x3)[_0x4add73(0x595)](_0x3b9a26=>_0x3b9a26['trim']())[_0x4add73(0x542)](Boolean)[_0x4add73(0x27f)](0x0,0x8);}_0x55b413[_0x14e915]={'seq':_0x112cba++,'t':Date[_0x4add73(0x4ec)](),'env':_0x3ec8f5,'kind':_0x207946||_0x4add73(0x338),'stack':_0x4892ca},_0x14e915=(_0x14e915+0x1)%_0x502c82;}function _0x50a437(_0x2808d0){const _0x2e7148=_0x4c4a,_0x53ab12=[];for(let _0x3eda08=0x0;_0x3eda08<_0x502c82;_0x3eda08++){const _0xc5e864=_0x55b413[(_0x14e915-0x1-_0x3eda08+_0x502c82*0x2)%_0x502c82];if(!_0xc5e864)continue;_0x53ab12['push'](_0xc5e864);if(_0x53ab12[_0x2e7148(0x6ad)]>=_0x2808d0)break;}return _0x53ab12;}function _0x3b990b(_0x5ea2c3){const _0x5946ae=_0x4c4a;try{process['stderr']['write'](_0x5ea2c3+'\x0a');}catch{}if(_0xf7e227)try{_0x4fe917[_0x5946ae(0x7a3)](_0xc16328[_0x5946ae(0x1c9)](_0xf7e227,_0x5946ae(0x5d0)+process[_0x5946ae(0x5c3)]+'.log'),_0x5ea2c3+'\x0a');}catch{}}function _0x1347fa(_0x5a05a6){const _0x4c363a=_0x4c4a,_0x4bf1cb=_0x50a437(_0x5a05a6);if(!_0x4bf1cb[_0x4c363a(0x6ad)])return _0x4c363a(0x1f5);const _0x26c7ba=Date[_0x4c363a(0x4ec)]();return _0x4bf1cb[_0x4c363a(0x595)](_0xbb5276=>{const _0xc062d8=_0x4c363a,_0x27e586=_0xc062d8(0x876)+_0xbb5276[_0xc062d8(0x8b2)]+'\x20-'+(_0x26c7ba-_0xbb5276['t'])+_0xc062d8(0x3a6)+_0xbb5276[_0xc062d8(0x787)]+'\x20'+_0xbb5276['kind'];return _0xbb5276[_0xc062d8(0x5ba)]&&_0xbb5276[_0xc062d8(0x5ba)]['length']?_0x27e586+'\x0a\x20\x20\x20\x20\x20\x20'+_0xbb5276['stack'][_0xc062d8(0x1c9)](_0xc062d8(0x821)):_0x27e586;})[_0x4c363a(0x1c9)]('\x0a');}function _0x5d8e5e(_0x59831b,_0x517c8d){const _0x21b41a=_0x4c4a,_0xf5ec2c='\x0a===\x20OKDB_DIAG\x20'+_0x59831b+_0x21b41a(0x203)+new Date()[_0x21b41a(0x611)]()+_0x21b41a(0x5e4)+process[_0x21b41a(0x5c3)]+'\x20===',_0x483b6b=[_0xf5ec2c,'error:\x20'+(_0x517c8d&&_0x517c8d[_0x21b41a(0x5ba)]?_0x517c8d['stack'][_0x21b41a(0x84e)]('\x0a')[0x0]:_0x517c8d),_0x21b41a(0x22e)+(_0x4c3e45?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x1347fa(0x18),_0x44e4c1(),'='['repeat'](_0xf5ec2c[_0x21b41a(0x6ad)]-0x1)];_0x3b990b(_0x483b6b[_0x21b41a(0x1c9)]('\x0a'));}function _0xee82ad(_0x3433c9){const _0x5728bc=_0x4c4a;if(!_0x295bd1())return;const _0x5f1a41=String(_0x3433c9&&_0x3433c9[_0x5728bc(0x81d)]||_0x3433c9||''),_0x352234=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x5728bc(0x3f6)](_0x5f1a41);_0x5d8e5e(_0x352234?_0x5728bc(0x65a):_0x5728bc(0x54f),_0x3433c9);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x352234)return;try{console[_0x5728bc(0x6cd)](_0x3433c9&&_0x3433c9[_0x5728bc(0x5ba)]?_0x3433c9[_0x5728bc(0x5ba)]:_0x3433c9);}catch{}process[_0x5728bc(0x468)](0x1);}function _0x43060b(_0x328f93){const _0x5e24f1=_0x4c4a;if(!_0x295bd1())return;const _0x4b7994=String(_0x328f93&&_0x328f93[_0x5e24f1(0x81d)]||_0x328f93||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x5e24f1(0x3f6)](_0x4b7994)&&_0x5d8e5e('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x328f93);}function _0x44e4c1(){const _0x480e9a=_0x4c4a,_0x283205=[_0x480e9a(0x7c6)];let _0x1a5eb1=![];for(const _0x4f152f of _0x15bcbe){const _0x228696=_0x4f152f&&_0x4f152f[_0x480e9a(0x41e)];if(!_0x228696)continue;for(const [_0x740065,_0xcf4142]of _0x228696){const _0x232546=_0xcf4142&&_0xcf4142[_0x480e9a(0x3bc)]&&_0xcf4142[_0x480e9a(0x3bc)][_0x480e9a(0x59e)];if(!_0x232546)continue;let _0x8f73bf,_0x237f56;try{_0x8f73bf=Atomics[_0x480e9a(0x566)](_0x232546,0x0),_0x237f56=Atomics[_0x480e9a(0x566)](_0x232546,0x1);}catch{continue;}if(_0x8f73bf===0x0)continue;_0x1a5eb1=!![];const _0x2813c1=_0x8f73bf>0x0?'SWAP':_0x480e9a(0x2a2),_0x112e85=Date[_0x480e9a(0x4ec)]()-Math[_0x480e9a(0x8b9)](_0x8f73bf)*0x3e8,_0x4255f0=((()=>{const _0x4ebde4=_0x480e9a;try{return _0xcf4142[_0x4ebde4(0x863)]&&_0xcf4142[_0x4ebde4(0x863)][_0x4ebde4(0x2c4)]?_0xcf4142['_writer'][_0x4ebde4(0x2c4)]():null;}catch{return null;}})());_0x283205[_0x480e9a(0x557)](_0x480e9a(0x845)+_0x740065+_0x480e9a(0x63c)+_0x2813c1+_0x480e9a(0x575)+_0x112e85+_0x480e9a(0x6c0)+_0x237f56+(_0x4255f0?_0x480e9a(0x40e)+_0x4255f0['depth']+_0x480e9a(0x4c8)+_0x4255f0[_0x480e9a(0x416)]+'\x20parkedNow='+_0x4255f0[_0x480e9a(0x57c)]+'}':''));}}if(!_0x1a5eb1)_0x283205['push'](_0x480e9a(0x5cd));return _0x283205[_0x480e9a(0x1c9)]('\x0a');}function _0x293ada(){const _0x545d15=_0x4c4a;if(!_0x295bd1())return;const _0x3dc576=Math[_0x545d15(0x413)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x1cbd30=Date[_0x545d15(0x4ec)]();for(const _0x157302 of _0x15bcbe){const _0xc16e67=_0x157302&&_0x157302[_0x545d15(0x41e)];if(!_0xc16e67)continue;for(const [_0x37b896,_0x252056]of _0xc16e67){const _0x39c311=_0x252056&&_0x252056[_0x545d15(0x3bc)]&&_0x252056[_0x545d15(0x3bc)][_0x545d15(0x59e)];if(!_0x39c311)continue;let _0x34894f;try{_0x34894f=Atomics[_0x545d15(0x566)](_0x39c311,0x0);}catch{continue;}const _0x37e1f2=_0x157302[_0x545d15(0x5be)]+'|'+_0x37b896;if(_0x34894f<=0x0){_0x202f6f[_0x545d15(0x360)](_0x37e1f2);continue;}const _0x4bae25=_0x1cbd30-_0x34894f*0x3e8,_0x51b123=_0x202f6f['get'](_0x37e1f2);if(_0x4bae25<_0x3dc576)continue;if(_0x51b123&&_0x1cbd30-_0x51b123['dumpedAt']<_0x3dc576)continue;_0x202f6f[_0x545d15(0x259)](_0x37e1f2,{'firstTs':_0x51b123?_0x51b123['firstTs']:_0x34894f,'dumpedAt':_0x1cbd30});const _0x58efa1=_0x545d15(0x5de)+_0x4bae25+_0x545d15(0x5d1)+_0x37b896+_0x545d15(0x203)+new Date()[_0x545d15(0x611)]()+'\x20pid='+process['pid']+_0x545d15(0x447);_0x3b990b([_0x58efa1,_0x44e4c1(),'='['repeat'](_0x58efa1[_0x545d15(0x6ad)]-0x1)][_0x545d15(0x1c9)]('\x0a'));}}}function _0x26fced(){const _0x3bf45c=_0x4c4a;if(!_0x295bd1()||_0x26b650)return;_0x26b650=!![],process[_0x3bf45c(0x866)](_0x3bf45c(0x54f),_0xee82ad),process[_0x3bf45c(0x866)](_0x3bf45c(0x71d),_0x43060b);const _0x347c5b=Math[_0x3bf45c(0x413)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x4fd725=setInterval(_0x293ada,_0x347c5b);if(_0x4fd725[_0x3bf45c(0x895)])_0x4fd725[_0x3bf45c(0x895)]();}function _0xf6297(_0x59e485){const _0x18c5b3=_0x4c4a;if(!_0x295bd1()||!_0x59e485)return;_0x15bcbe[_0x18c5b3(0x4da)](_0x59e485),_0x26fced();}function _0x7b89d2(_0x55fec7){const _0x1619dc=_0x4c4a;_0x15bcbe[_0x1619dc(0x360)](_0x55fec7);}function _0x2b8788(){const _0x380afd=_0x4c4a;if(!_0x295bd1())return{'enabled':![],'hint':_0x380afd(0x445)};return{'enabled':!![],'stackCapture':!!_0x4c3e45,'recentWrites':_0x50a437(0x10),'drain':_0x44e4c1()};}return okdbDiag={'isEnabled':_0x295bd1,'recordWrite':_0x15f6d7,'installDiag':_0x26fced,'registerOkdb':_0xf6297,'unregisterOkdb':_0x7b89d2,'snapshot':_0x2b8788},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x41720a=_0x1a2e0d;if(hasRequiredOkdbWriter)return okdbWriter[_0x41720a(0x7ac)];hasRequiredOkdbWriter=0x1;const {performance:_0x1a1612}=require$$0$5,_0x2a6175=requireOkdbDiag(),_0x388f7a=process.env.OKDB_COMMIT_MODE===_0x41720a(0x6d9);class _0x30fdd4{constructor(_0x6ffd4b){const _0x5716d1=_0x41720a;this[_0x5716d1(0x787)]=_0x6ffd4b,this[_0x5716d1(0x743)]=new Set(),this[_0x5716d1(0x5ee)]=new Map(),this[_0x5716d1(0x6d1)]=0x0,this[_0x5716d1(0x4d3)]=[],this[_0x5716d1(0x878)]=[],this[_0x5716d1(0x32a)]=Math[_0x5716d1(0x413)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x5716d1(0x754)]=0x0,this['_bpWaiters']=[],this[_0x5716d1(0x786)]=0x0,this[_0x5716d1(0x52e)]=null,this['_heldTotal']=0x0,this['_nestedTotal']=0x0,this['_nestedWarned']=![];}async[_0x41720a(0x826)](_0x322fa3,_0x3b86e9,{admitted:admitted=![]}={}){const _0x1c23fd=_0x41720a;if(_0x2a6175['isEnabled']())_0x2a6175[_0x1c23fd(0x701)](this[_0x1c23fd(0x787)]?.[_0x1c23fd(0x4f9)],_0x3b86e9);if(this['_closed']){const _0x22b7f6=new Error(_0x1c23fd(0x823));_0x22b7f6['code']='ENV_CLOSING_RETRY';throw _0x22b7f6;}if(this[_0x1c23fd(0x32a)]>0x0){let _0x30cfe8=![];while(this['_outstanding']>=this['_highWater']&&!this[_0x1c23fd(0x379)]){!_0x30cfe8&&(_0x30cfe8=!![],this[_0x1c23fd(0x786)]++),await new Promise(_0x425ab9=>this[_0x1c23fd(0x4ce)]['push'](_0x425ab9));}if(this[_0x1c23fd(0x379)]){const _0x27edd4=new Error(_0x1c23fd(0x823));_0x27edd4[_0x1c23fd(0x2dc)]='ENV_CLOSING_RETRY';throw _0x27edd4;}}this[_0x1c23fd(0x754)]++;const _0x1c97d3=admitted?null:this[_0x1c23fd(0x787)][_0x1c23fd(0x3bc)];for(;;){while(this['_held'])await this[_0x1c23fd(0x52e)];if(_0x1c97d3)try{await _0x1c97d3[_0x1c23fd(0x48e)]();}catch(_0x42f46d){this[_0x1c23fd(0x754)]--;if(this[_0x1c23fd(0x4ce)][_0x1c23fd(0x6ad)]&&this[_0x1c23fd(0x754)]<this[_0x1c23fd(0x32a)])this[_0x1c23fd(0x4ce)][_0x1c23fd(0x732)]()();throw _0x42f46d;}if(!this[_0x1c23fd(0x52e)])break;if(_0x1c97d3)_0x1c97d3[_0x1c23fd(0x2f0)]();}if(this['_closed']){if(_0x1c97d3)_0x1c97d3[_0x1c23fd(0x2f0)]();this[_0x1c23fd(0x754)]--;if(this[_0x1c23fd(0x4ce)]['length']&&this[_0x1c23fd(0x754)]<this['_highWater'])this['_bpWaiters'][_0x1c23fd(0x732)]()();const _0x3d9cce=new Error(_0x1c23fd(0x823));_0x3d9cce['code']='ENV_CLOSING_RETRY';throw _0x3d9cce;}const _0x37174c=_0x1a1612[_0x1c23fd(0x4ec)]();if(_0x388f7a)try{const _0x14a8e4=this[_0x1c23fd(0x787)]['db'][_0x1c23fd(0x234)](_0x322fa3);this[_0x1c23fd(0x6d1)]++;if(this[_0x1c23fd(0x4d3)]['push'](_0x1a1612[_0x1c23fd(0x4ec)]()-_0x37174c)>0x100)this[_0x1c23fd(0x4d3)][_0x1c23fd(0x732)]();if(this[_0x1c23fd(0x878)][_0x1c23fd(0x557)](_0x1a1612['now']())>0x800)this[_0x1c23fd(0x878)][_0x1c23fd(0x732)]();return _0x14a8e4;}finally{this[_0x1c23fd(0x754)]--;if(this[_0x1c23fd(0x4ce)][_0x1c23fd(0x6ad)]&&this[_0x1c23fd(0x754)]<this[_0x1c23fd(0x32a)])this[_0x1c23fd(0x4ce)][_0x1c23fd(0x732)]()();if(_0x1c97d3)_0x1c97d3[_0x1c23fd(0x2f0)]();}let _0x11782e=null;const _0x2d144b=()=>{const _0x5c7d71=_0x1c23fd,_0x51bbf8=_0x322fa3();if(_0x51bbf8&&typeof _0x51bbf8[_0x5c7d71(0x4ed)]==='function'&&!_0x11782e){this['_heldTotal']++;let _0x32c444;const _0x30739b=new Promise(_0x29fc34=>_0x32c444=_0x29fc34);this[_0x5c7d71(0x52e)]=_0x30739b,_0x11782e=()=>{const _0x4ad443=_0x5c7d71;if(this[_0x4ad443(0x52e)]===_0x30739b)this[_0x4ad443(0x52e)]=null;_0x32c444();};}return _0x51bbf8;};let _0x93c5cd;try{_0x93c5cd=this['env']['db']['childTransaction'](_0x2d144b);}catch(_0x42b2d6){_0x93c5cd=Promise[_0x1c23fd(0x393)](_0x42b2d6);}(!_0x93c5cd||typeof _0x93c5cd['then']!==_0x1c23fd(0x7ca))&&(this['_nestedTotal']++,!this[_0x1c23fd(0x4e8)]&&(this[_0x1c23fd(0x4e8)]=!![],console['warn'](_0x1c23fd(0x4de)+(this['env']?.[_0x1c23fd(0x4f9)]??'?')+_0x1c23fd(0x1fc))),_0x93c5cd=Promise['resolve'](_0x93c5cd));const _0x393849=()=>{if(_0x11782e)_0x11782e();};_0x93c5cd['then'](_0x393849,_0x393849),this[_0x1c23fd(0x743)][_0x1c23fd(0x4da)](_0x93c5cd),this[_0x1c23fd(0x5ee)][_0x1c23fd(0x259)](_0x93c5cd,_0x37174c);const _0x27cd04=()=>{const _0x2d061f=_0x1c23fd;this[_0x2d061f(0x743)][_0x2d061f(0x360)](_0x93c5cd),this[_0x2d061f(0x5ee)][_0x2d061f(0x360)](_0x93c5cd),this[_0x2d061f(0x6d1)]++,this[_0x2d061f(0x754)]--;this[_0x2d061f(0x4ce)][_0x2d061f(0x6ad)]&&this[_0x2d061f(0x754)]<this[_0x2d061f(0x32a)]&&this[_0x2d061f(0x4ce)][_0x2d061f(0x732)]()();if(this[_0x2d061f(0x4d3)][_0x2d061f(0x557)](_0x1a1612[_0x2d061f(0x4ec)]()-_0x37174c)>0x100)this[_0x2d061f(0x4d3)][_0x2d061f(0x732)]();if(this[_0x2d061f(0x878)][_0x2d061f(0x557)](_0x1a1612[_0x2d061f(0x4ec)]())>0x800)this[_0x2d061f(0x878)][_0x2d061f(0x732)]();};_0x93c5cd[_0x1c23fd(0x4ed)](_0x27cd04,_0x27cd04);try{return await _0x93c5cd;}finally{if(_0x1c97d3)_0x1c97d3[_0x1c23fd(0x2f0)]();}}['status'](){const _0x1e6530=_0x41720a,_0x1d231d=_0x1a1612[_0x1e6530(0x4ec)]();let _0x51b181=0x0;for(const _0x7e7247 of this[_0x1e6530(0x5ee)][_0x1e6530(0x722)]()){const _0x415758=_0x1d231d-_0x7e7247;if(_0x415758>_0x51b181)_0x51b181=_0x415758;}let _0x5c3e3b=0x0;for(let _0x3a365a=this[_0x1e6530(0x878)]['length']-0x1;_0x3a365a>=0x0;_0x3a365a--){if(_0x1d231d-this[_0x1e6530(0x878)][_0x3a365a]>0x3e8)break;_0x5c3e3b++;}let _0x46e8dd=0x0;if(this[_0x1e6530(0x4d3)][_0x1e6530(0x6ad)]){const _0xefc77b=[...this[_0x1e6530(0x4d3)]][_0x1e6530(0x562)]((_0x2662af,_0x3567d7)=>_0x2662af-_0x3567d7);_0x46e8dd=_0xefc77b[Math[_0x1e6530(0x279)](_0xefc77b['length']-0x1,Math[_0x1e6530(0x2d7)](_0xefc77b[_0x1e6530(0x6ad)]*0.99))];}return{'depth':this[_0x1e6530(0x743)]['size'],'oldestPendingMs':Math[_0x1e6530(0x578)](_0x51b181),'committed':this['_committed'],'commitsPerSec':_0x5c3e3b,'commitP99Ms':Math[_0x1e6530(0x578)](_0x46e8dd),'parkedNow':this[_0x1e6530(0x4ce)]['length'],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x1e6530(0x32a)]};}[_0x41720a(0x530)](){const _0xa7657c=_0x41720a,_0x13879d=_0x1a1612[_0xa7657c(0x4ec)]();return[...this[_0xa7657c(0x5ee)]['values']()][_0xa7657c(0x595)](_0x2c29c7=>Math[_0xa7657c(0x578)](_0x13879d-_0x2c29c7))[_0xa7657c(0x562)]((_0x11e55f,_0x315aff)=>_0x315aff-_0x11e55f);}[_0x41720a(0x3a2)](){const _0x1debc7=_0x41720a;this[_0x1debc7(0x379)]=!![];for(const _0x1fe408 of this['_bpWaiters'][_0x1debc7(0x5ce)](0x0))_0x1fe408();}async[_0x41720a(0x66e)](){const _0x197bc8=_0x41720a;let _0x509bee=0x0;while(this[_0x197bc8(0x743)][_0x197bc8(0x7d1)]&&_0x509bee++<0x3e8){await Promise['allSettled']([...this[_0x197bc8(0x743)]]);}}async['put'](_0xc81044,_0x593a65,_0x93c1ef,_0xe6900e){const _0x49a7ec=_0x41720a;return this[_0x49a7ec(0x826)](()=>{const _0x397b15=_0x49a7ec;if(_0xe6900e===undefined)_0xc81044['putSync'](_0x593a65,_0x93c1ef);else _0xc81044[_0x397b15(0x422)](_0x593a65,_0x93c1ef,_0xe6900e);},_0x49a7ec(0x765));}async['remove'](_0x59d760,_0x141059){const _0x1a48c3=_0x41720a;return this[_0x1a48c3(0x826)](()=>_0x59d760[_0x1a48c3(0x8a6)](_0x141059),'raw-remove');}}async function _0x302417(_0x57523f,_0x2c92d7){const _0x87c46a=_0x41720a;if(_0x2c92d7==null)_0x2c92d7=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x5ec0f4=_0x57523f?.[_0x87c46a(0x81e)];if(!_0x5ec0f4||typeof _0x5ec0f4[_0x87c46a(0x4ed)]!=='function')return;await Promise[_0x87c46a(0x24b)]([Promise['resolve'](_0x5ec0f4)['catch'](()=>{}),new Promise(_0xbd9cc5=>{const _0x2a6a1a=_0x87c46a,_0x2fca48=setTimeout(_0xbd9cc5,_0x2c92d7);if(_0x2fca48[_0x2a6a1a(0x895)])_0x2fca48[_0x2a6a1a(0x895)]();})]);}catch{}}function _0x515a05(_0x18af7d){const _0x295ed6=_0x41720a;if(_0x388f7a)return Promise[_0x295ed6(0x8c2)]();const _0x5beb0e=_0x18af7d?.[_0x295ed6(0x50c)];return _0x5beb0e&&typeof _0x5beb0e[_0x295ed6(0x4ed)]==='function'?_0x5beb0e:Promise[_0x295ed6(0x8c2)]();}const _0x487348=Math['max'](0x1,Math[_0x41720a(0x2d7)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x287b33=Math['max'](0x1,_0x487348-0x2);let _0x4d7e21=0x0;const _0x49820f=[];async function _0x1cd885(_0x4154e5){const _0x5aa45e=_0x41720a;if(_0x4d7e21<_0x287b33)_0x4d7e21++;else await new Promise(_0x5c62ed=>_0x49820f[_0x5aa45e(0x557)](_0x5c62ed));try{return await _0x4154e5();}finally{const _0x5f52db=_0x49820f[_0x5aa45e(0x732)]();if(_0x5f52db)_0x5f52db();else _0x4d7e21--;}}return okdbWriter[_0x41720a(0x7ac)]=_0x30fdd4,okdbWriter[_0x41720a(0x7ac)][_0x41720a(0x1f6)]=_0x1cd885,okdbWriter[_0x41720a(0x7ac)][_0x41720a(0x1e6)]=_0x287b33,okdbWriter[_0x41720a(0x7ac)][_0x41720a(0x63a)]=_0x302417,okdbWriter[_0x41720a(0x7ac)][_0x41720a(0x50c)]=_0x515a05,okdbWriter[_0x41720a(0x7ac)]['SYNC_COMMITS']=_0x388f7a,okdbWriter[_0x41720a(0x7ac)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x593b82=_0x1a2e0d;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x1bd8c6=require$$0,{clampTimerDelay:_0x1bfaff}=requireOkdbTimers(),{SYNC_COMMITS:_0x1c9df1}=requireOkdbWriter(),_0x48db4f='~lock';class _0x20684b{constructor(_0x414395,_0x391f29,_0x2e2580){const _0x1f7666=_0x4c4a;this['_lock']=_0x414395,this['_key']=_0x391f29,this['_acquiredAt']=_0x2e2580,this[_0x1f7666(0x27a)]=![],this['_heartbeatTimer']=null,this[_0x1f7666(0x1b8)]=null;}[_0x593b82(0x6b7)](){const _0x56aafb=_0x593b82;if(this[_0x56aafb(0x27a)])return![];try{const _0x432440=this[_0x56aafb(0x5db)][_0x56aafb(0x6c9)]()[_0x56aafb(0x2fa)](this[_0x56aafb(0x76e)]);if(!_0x432440||_0x432440[_0x56aafb(0x82f)]!==this[_0x56aafb(0x528)])return![];const _0x24aa1d=_0x432440[_0x56aafb(0x28a)]??_0x432440['acquiredAt'];if(_0x24aa1d+_0x432440[_0x56aafb(0x893)]<Date[_0x56aafb(0x4ec)]())return![];return!![];}catch{return!this[_0x56aafb(0x27a)];}}[_0x593b82(0x403)](){const _0x1ab5e7=_0x593b82;if(this[_0x1ab5e7(0x27a)])return null;try{return this[_0x1ab5e7(0x5db)][_0x1ab5e7(0x6c9)]()[_0x1ab5e7(0x2fa)](this[_0x1ab5e7(0x76e)])??null;}catch{return null;}}async[_0x593b82(0x7fd)](_0x3a41b0){const _0x4f44a3=_0x593b82;if(this['_released'])return;try{if(this['_lock'][_0x4f44a3(0x379)]())return;const _0x22da52=this[_0x4f44a3(0x5db)][_0x4f44a3(0x6c9)]()[_0x4f44a3(0x2fa)](this[_0x4f44a3(0x76e)]);if(!_0x22da52||_0x22da52[_0x4f44a3(0x82f)]!==this['_acquiredAt'])return;if(_0x1c9df1)this['_lock'][_0x4f44a3(0x6c9)]()[_0x4f44a3(0x422)](this[_0x4f44a3(0x76e)],{..._0x22da52,'ttlMs':_0x22da52[_0x4f44a3(0x893)]+_0x3a41b0});else await this[_0x4f44a3(0x5db)][_0x4f44a3(0x6c9)]()[_0x4f44a3(0x25f)](this[_0x4f44a3(0x76e)],{..._0x22da52,'ttlMs':_0x22da52['ttlMs']+_0x3a41b0});}catch{}}async[_0x593b82(0x466)](){const _0x18259c=_0x593b82;if(this[_0x18259c(0x27a)])return;if(this[_0x18259c(0x1b8)])try{await this[_0x18259c(0x1b8)];}catch{}clearInterval(this['_heartbeatTimer']),this['_heartbeatTimer']=null,this[_0x18259c(0x27a)]=!![];try{if(this['_lock']['_closed']())return;const _0xf3a582=this[_0x18259c(0x5db)][_0x18259c(0x6c9)]()['get'](this[_0x18259c(0x76e)]);if(_0xf3a582&&_0xf3a582[_0x18259c(0x82f)]===this[_0x18259c(0x528)]){if(_0x1c9df1)this[_0x18259c(0x5db)][_0x18259c(0x6c9)]()[_0x18259c(0x8a6)](this['_key']);else await this[_0x18259c(0x5db)][_0x18259c(0x6c9)]()['remove'](this['_key']);}}catch{}}[_0x593b82(0x6ab)](_0x2ceee7,_0x5ae690){const _0x49b8f4=_0x593b82,_0x3e2252=_0x1bfaff(_0x5ae690??Math[_0x49b8f4(0x2d7)](_0x2ceee7/0x3));this[_0x49b8f4(0x70b)]=setInterval(()=>{const _0xa3b690=_0x49b8f4;if(this[_0xa3b690(0x27a)])return;this[_0xa3b690(0x1b8)]=((async()=>{const _0x35cc38=_0xa3b690;try{if(this['_lock'][_0x35cc38(0x379)]())return;const _0x54cb8b=this[_0x35cc38(0x5db)][_0x35cc38(0x6c9)]()[_0x35cc38(0x2fa)](this[_0x35cc38(0x76e)]);if(!_0x54cb8b||_0x54cb8b['acquiredAt']!==this[_0x35cc38(0x528)]){this[_0x35cc38(0x27a)]=!![],clearInterval(this[_0x35cc38(0x70b)]),this[_0x35cc38(0x70b)]=null;return;}if(_0x1c9df1)this[_0x35cc38(0x5db)][_0x35cc38(0x6c9)]()['putSync'](this[_0x35cc38(0x76e)],{..._0x54cb8b,'updatedAt':Date['now']()});else await this[_0x35cc38(0x5db)]['_db']()[_0x35cc38(0x25f)](this['_key'],{..._0x54cb8b,'updatedAt':Date[_0x35cc38(0x4ec)]()});}catch{}this['_heartbeatInFlight']=null;})());},_0x3e2252);if(this[_0x49b8f4(0x70b)][_0x49b8f4(0x895)])this[_0x49b8f4(0x70b)][_0x49b8f4(0x895)]();}}class _0x3c2697{constructor(_0x305dc3,{namespace:_0x7c15d1,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0xefd867=_0x593b82;this[_0xefd867(0x299)]=_0x305dc3,this[_0xefd867(0x669)]=_0x7c15d1,this[_0xefd867(0x893)]=ttlMs,this['heartbeatMs']=heartbeatMs,this[_0xefd867(0x207)]=null;}['_db'](){const _0x46acba=_0x593b82;return this[_0x46acba(0x4a5)](),(!this[_0x46acba(0x207)]||this[_0x46acba(0x423)]!==this[_0x46acba(0x299)])&&(this[_0x46acba(0x207)]=this[_0x46acba(0x299)][_0x46acba(0x727)](_0x48db4f,{'dupSort':![]}),this[_0x46acba(0x423)]=this[_0x46acba(0x299)]),this[_0x46acba(0x207)];}[_0x593b82(0x37c)](){const _0x89775b=_0x593b82;return this[_0x89775b(0x4a5)](),(!this['_wantDbHandle']||this[_0x89775b(0x752)]!==this[_0x89775b(0x299)])&&(this['_wantDbHandle']=this[_0x89775b(0x299)]['openDB'](_0x48db4f+_0x89775b(0x1db),{'dupSort':![]}),this[_0x89775b(0x752)]=this[_0x89775b(0x299)]),this['_wantDbHandle'];}[_0x593b82(0x379)](){const _0x41421d=_0x593b82,_0x6eccea=this[_0x41421d(0x299)]?.['status'];return _0x6eccea==='closing'||_0x6eccea===_0x41421d(0x392);}[_0x593b82(0x4a5)](){const _0x12cd04=_0x593b82;if(this[_0x12cd04(0x379)]())throw new Error(_0x12cd04(0x4ca));}[_0x593b82(0x76e)](_0x5034b0){const _0x11c0e2=_0x593b82;return this[_0x11c0e2(0x669)]+':'+_0x5034b0;}[_0x593b82(0x440)](_0x124171){const _0x90d4ce=_0x593b82;try{if(this[_0x90d4ce(0x379)]())return;_0x1c9df1?this['_wantDb']()[_0x90d4ce(0x422)](this[_0x90d4ce(0x76e)](_0x124171),Date[_0x90d4ce(0x4ec)]()):this[_0x90d4ce(0x37c)]()[_0x90d4ce(0x25f)](this[_0x90d4ce(0x76e)](_0x124171),Date[_0x90d4ce(0x4ec)]())?.['catch']?.(()=>{});}catch{}}[_0x593b82(0x19e)](_0x3208eb,_0x34ee8d=0x3e8){const _0xad2c20=_0x593b82;try{const _0x4036c4=this[_0xad2c20(0x37c)]()[_0xad2c20(0x2fa)](this[_0xad2c20(0x76e)](_0x3208eb));return typeof _0x4036c4==='number'&&Date[_0xad2c20(0x4ec)]()-_0x4036c4<_0x34ee8d;}catch{return![];}}['_isStale'](_0x11a84e){const _0x37a5b7=_0x593b82,_0x2ab501=_0x11a84e[_0x37a5b7(0x28a)]??_0x11a84e['acquiredAt'];return _0x2ab501+_0x11a84e[_0x37a5b7(0x893)]<Date['now']();}static[_0x593b82(0x300)](_0xbcf300){const _0x52649d=_0x593b82,_0x1d3335=_0xbcf300?.[_0x52649d(0x403)];if(!_0x1d3335||typeof _0x1d3335[_0x52649d(0x5c3)]!==_0x52649d(0x72c))return![];if(_0x1d3335['hostname']!==_0x1bd8c6[_0x52649d(0x216)]())return![];if(_0x1d3335[_0x52649d(0x5c3)]===process['pid'])return![];try{return process[_0x52649d(0x486)](_0x1d3335[_0x52649d(0x5c3)],0x0),![];}catch(_0x211805){return _0x211805[_0x52649d(0x2dc)]===_0x52649d(0x55c);}}async[_0x593b82(0x462)](_0x2ecc72,_0x1ee774={},_0x30ef36={}){const _0x4bba85=_0x593b82,_0x48a642=this[_0x4bba85(0x76e)](_0x2ecc72),_0x19c0ef=_0x30ef36['ttlMs']??this[_0x4bba85(0x893)],_0xb661a4=Date['now'](),_0x25ef12={'holder':{'pid':process[_0x4bba85(0x5c3)],'hostname':_0x1bd8c6[_0x4bba85(0x216)](),..._0x1ee774},'acquiredAt':_0xb661a4,'updatedAt':_0xb661a4,'ttlMs':_0x19c0ef};let _0x204e2f=![],_0x254cbd=null;if(this[_0x4bba85(0x379)]())return{'acquired':![],'handle':null,'current':null};try{const _0x2d165b=()=>{const _0x4f1ec0=_0x4bba85,_0x24fd93=this['_db']()['get'](_0x48a642);if(_0x24fd93&&!this['_isStale'](_0x24fd93)&&!_0x3c2697[_0x4f1ec0(0x300)](_0x24fd93)){const _0x1e7f0a=_0x1ee774[_0x4f1ec0(0x20c)]!=null&&_0x24fd93['holder'][_0x4f1ec0(0x5c3)]===process[_0x4f1ec0(0x5c3)]&&_0x24fd93['holder'][_0x4f1ec0(0x20c)]===_0x1ee774[_0x4f1ec0(0x20c)];if(!_0x1e7f0a){_0x204e2f=![],_0x254cbd=_0x24fd93;return;}_0x25ef12[_0x4f1ec0(0x82f)]<=_0x24fd93[_0x4f1ec0(0x82f)]&&(_0x25ef12['acquiredAt']=_0x24fd93[_0x4f1ec0(0x82f)]+0x1,_0x25ef12[_0x4f1ec0(0x28a)]=_0x25ef12[_0x4f1ec0(0x82f)]);}this['_db']()[_0x4f1ec0(0x25f)](_0x48a642,_0x25ef12),_0x204e2f=!![],_0x254cbd=_0x25ef12;};if(_0x1c9df1)this[_0x4bba85(0x6c9)]()[_0x4bba85(0x234)](_0x2d165b);else await this['_db']()[_0x4bba85(0x386)](_0x2d165b);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x204e2f)return{'acquired':![],'handle':null,'current':_0x254cbd};const _0x2678e7=new _0x20684b(this,_0x48a642,_0x25ef12['acquiredAt']);return _0x2678e7[_0x4bba85(0x6ab)](_0x19c0ef,this[_0x4bba85(0x8ac)]),{'acquired':!![],'handle':_0x2678e7,'current':_0x254cbd};}[_0x593b82(0x509)](_0x50b54e){const _0x157adb=_0x593b82;try{return this[_0x157adb(0x6c9)]()[_0x157adb(0x2fa)](this['_key'](_0x50b54e))??null;}catch{return null;}}[_0x593b82(0x3f8)](){const _0x3fc053=_0x593b82,_0x50fc5c=this[_0x3fc053(0x669)]+':',_0x12de06=[];try{for(const {key:_0x48e7d2,value:_0x4b96b2}of this[_0x3fc053(0x6c9)]()[_0x3fc053(0x3c9)]({'start':_0x50fc5c,'end':_0x50fc5c+'\xff'})){typeof _0x48e7d2===_0x3fc053(0x1d2)&&_0x48e7d2[_0x3fc053(0x579)](_0x50fc5c)&&_0x12de06[_0x3fc053(0x557)]({'id':_0x48e7d2[_0x3fc053(0x27f)](_0x50fc5c['length']),'entry':_0x4b96b2});}}catch{}return _0x12de06;}static[_0x593b82(0x366)](_0x594eb0){const _0x5d6219=_0x593b82,_0x20ec15=[];try{const _0x4d983f=_0x594eb0['openDB'](_0x48db4f,{'dupSort':![]});for(const {key:_0x393c24,value:_0x4f6470}of _0x4d983f[_0x5d6219(0x3c9)]({})){if(typeof _0x393c24!==_0x5d6219(0x1d2))continue;const _0x453977=_0x393c24[_0x5d6219(0x196)](':');if(_0x453977<0x1)continue;_0x20ec15[_0x5d6219(0x557)]({'namespace':_0x393c24['slice'](0x0,_0x453977),'id':_0x393c24['slice'](_0x453977+0x1),'entry':_0x4f6470});}}catch{}return _0x20ec15;}}return okdbLock={'OKDBLock':_0x3c2697},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x13208d=_0x1a2e0d;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x46d00e=require$$0,_0x28d7f3=require$$1$1,_0x1ecfd7=require$$2$1,{LOOP:_0x3c3fc6}=requireOkdbLoopMonitor(),{OKDBLock:_0x200d49}=requireOkdbLock(),{SYNC_COMMITS:_0x16df1a}=requireOkdbWriter(),_0x34295a=_0x13208d(0x70a),_0xb6b155=_0x13208d(0x24d),_0x7217f8=_0x13208d(0x1a5),_0x4c0ca4=_0x13208d(0x5c5),_0x194d70=(_0x211860,_0x30e84f)=>_0x211860+':'+_0x30e84f,_0x2d74a2=(_0x6bbf74,_0x5c8223)=>_0x6bbf74+'::'+_0x5c8223,_0x83cc=(_0x180f24,_0x4d1997)=>_0x180f24+'/'+_0x4d1997,_0x5aeb4a=(_0x2c928e,_0x40de68)=>_0x2c928e+'#'+_0x40de68,_0x2c3d4d=_0x45db8f=>{const _0x179c1c=_0x13208d;if(_0x45db8f?.[_0x179c1c(0x709)])return _0x45db8f['processKey'];const _0x340b13=_0x45db8f?.[_0x179c1c(0x6b5)];return typeof _0x340b13==='string'&&_0x340b13['includes']('#')?_0x340b13[_0x179c1c(0x27f)](0x0,_0x340b13[_0x179c1c(0x196)]('#')):_0x340b13;},_0x5e6904=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0xb7f8a6=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x192c22=_0x5e6904*0x3,_0x2cc14e=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x13208d(0x413)](0x927c0,_0x192c22*0x14),_0x4e6cee=[_0x13208d(0x574),_0x13208d(0x1b2),_0x13208d(0x504),_0x13208d(0x4b2),'processor:paused',_0x13208d(0x6c4)];let _0x32a68a=null;function _0x353639(){const _0x396d3a=_0x13208d;if(_0x32a68a==null)_0x32a68a=Math[_0x396d3a(0x578)]((Date[_0x396d3a(0x4ec)]()-process[_0x396d3a(0x1f2)]()*0x3e8)/0x3e8)*0x3e8;return _0x32a68a;}function _0x2c0e30(_0x3e94f4){const _0x1cbdee=_0x13208d;if(process.env.OKDB_PROCESS_KILL===_0x1cbdee(0x804))return![];if(_0x3e94f4?.[_0x1cbdee(0x3e9)]?.['processes']&&typeof _0x3e94f4[_0x1cbdee(0x3e9)][_0x1cbdee(0x65b)]===_0x1cbdee(0x601)&&_0x3e94f4[_0x1cbdee(0x3e9)]['processes'][_0x1cbdee(0x486)]===![])return![];return!![];}function _0x247a46(_0x2d64d3,_0x54419e){const _0x46795a=_0x13208d,_0x4d5530=!!_0x54419e?.[_0x46795a(0x78a)];switch(_0x2d64d3){case _0x46795a(0x3ae):return{'controllable':_0x4d5530,'decommissionable':![],'killable':!![],'killConfirm':_0x46795a(0x2e2)};case'cli':case'standalone':return{'controllable':_0x4d5530,'decommissionable':![],'killable':!![],'killConfirm':_0x46795a(0x710)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x46795a(0x3d4):case _0x46795a(0x7bd):case'fn-runner':case _0x46795a(0x5b4):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x46795a(0x839)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x93bbc6{constructor(_0x1c1801){const _0x4be761=_0x13208d;this[_0x4be761(0x58a)]=_0x1c1801,this[_0x4be761(0x623)]=null,this['_desired']=null,this[_0x4be761(0x4a7)]=new Map(),this['_cmd']=null,this[_0x4be761(0x89b)]=![],this[_0x4be761(0x60e)]=![],this[_0x4be761(0x8ad)]=_0x353639(),this[_0x4be761(0x4c3)]=_0x194d70(process[_0x4be761(0x5c3)],this[_0x4be761(0x8ad)]),this[_0x4be761(0x1bc)]=_0x1ecfd7[_0x4be761(0x73a)]()['slice'](0x0,0x8),this['_rowKey']=_0x5aeb4a(this[_0x4be761(0x4c3)],this[_0x4be761(0x1bc)]),this[_0x4be761(0x3f9)]=Date['now'](),this[_0x4be761(0x485)]=null,this[_0x4be761(0x1cc)]=null,this[_0x4be761(0x67e)]=null,this[_0x4be761(0x407)]=null,this[_0x4be761(0x494)]=null,this['_onTick']=null,this[_0x4be761(0x809)]=0x0,this[_0x4be761(0x471)]={},this[_0x4be761(0x3c5)]=new Map(),this[_0x4be761(0x1f8)]=process['cpuUsage'](),this[_0x4be761(0x815)]=Date['now'](),this[_0x4be761(0x757)]=0x0,this[_0x4be761(0x73c)]=new Map();}get['selfKey'](){const _0x2b0f72=_0x13208d;return this[_0x2b0f72(0x4c3)];}get['rowKey'](){const _0x3ba158=_0x13208d;return this[_0x3ba158(0x46c)];}['_caps'](_0x584d59,_0xaf90c9){const _0x27b89c=_0x13208d,_0x3c3c4e=_0x247a46(_0x584d59,_0xaf90c9);if(_0x3c3c4e[_0x27b89c(0x717)]&&!_0x2c0e30(this['okdb']))return{..._0x3c3c4e,'killable':![],'killConfirm':undefined};return _0x3c3c4e;}['isActive'](){const _0x2d6dbb=_0x13208d;return!!this[_0x2d6dbb(0x623)];}[_0x13208d(0x3b6)](_0x54bc57){const _0x227641=_0x13208d;Object[_0x227641(0x70c)](this[_0x227641(0x471)],_0x54bc57||{});}[_0x13208d(0x4af)](_0x14c7fe){const _0x3d4788=_0x13208d;if(_0x14c7fe)this[_0x3d4788(0x67e)]=_0x14c7fe;}[_0x13208d(0x661)](_0x54a05a={}){const _0xfa8351=_0x13208d;return this['okdb'][_0xfa8351(0x322)](_0x54a05a);}[_0x13208d(0x4d0)](){const _0xb68f77=_0x13208d,_0x3cfe41={};let _0x432069=0x0,_0x16c346=0x0;const _0x938c9d=new Set();for(const _0x2846e0 of this[_0xb68f77(0x469)]()){_0x16c346++;const _0x3db52c=_0x2846e0[_0xb68f77(0x50e)];if(!_0x3db52c)continue;if(_0x3db52c['participate'])_0x432069++;for(const _0x2cdd92 of _0x3db52c[_0xb68f77(0x78a)]||[]){if(![_0xb68f77(0x1cf),_0xb68f77(0x8c4)]['includes'](_0x2cdd92[_0xb68f77(0x747)]))continue;(_0x2cdd92[_0xb68f77(0x694)]===_0xb68f77(0x23b)||_0x2cdd92[_0xb68f77(0x694)]==='building')&&_0x2cdd92[_0xb68f77(0x1fb)]&&_0x938c9d[_0xb68f77(0x4da)]((_0x2cdd92['env']||'default')+':'+_0x2cdd92[_0xb68f77(0x1fb)]);const _0x4826ac=_0x2cdd92[_0xb68f77(0x787)]||'default';(_0x3cfe41[_0x4826ac]||=[])[_0xb68f77(0x557)]({..._0x2cdd92,'env':_0x4826ac,'owner':{'pid':_0x2846e0[_0xb68f77(0x5c3)]??null,'kind':_0x2846e0[_0xb68f77(0x650)]??null}});}}for(const [_0x5e5571,_0x24272a]of Object[_0xb68f77(0x87f)](_0x3cfe41)){for(const _0x552a38 of _0x24272a){if(_0x552a38[_0xb68f77(0x747)]==='single'&&!_0x552a38['claimGated']){const _0x2de9fd=_0x5e5571+':'+(_0x552a38[_0xb68f77(0x1fb)]??'');if(!_0x938c9d[_0xb68f77(0x2ad)](_0x2de9fd))_0x552a38['unclaimed']=!![];}}}return{'envs':_0x3cfe41,'policy':null,'participation':{'participating':_0x432069,'total':_0x16c346},'source':_0xb68f77(0x307)};}[_0x13208d(0x705)](){const _0x238f8f=_0x13208d,_0x128c8c=_0x4e5384=>{const _0x1ba4f9=_0x4c4a;if(_0x4e5384[_0x1ba4f9(0x694)]===_0x1ba4f9(0x23b)||_0x4e5384[_0x1ba4f9(0x694)]==='building'||_0x4e5384[_0x1ba4f9(0x694)]===_0x1ba4f9(0x6cd))return 0x3;if(_0x4e5384[_0x1ba4f9(0x1ae)])return 0x1;return 0x2;},_0x3bfe44=new Map();for(const _0x1e9c79 of this[_0x238f8f(0x469)]()){for(const _0x5cd8cc of _0x1e9c79[_0x238f8f(0x50e)]?.[_0x238f8f(0x78a)]||[]){const _0x361a41={..._0x5cd8cc,'owner':{'pid':_0x1e9c79[_0x238f8f(0x5c3)]??null,'kind':_0x1e9c79[_0x238f8f(0x650)]??null,'host':_0x1e9c79[_0x238f8f(0x26b)]??null}},_0x184362=_0x5cd8cc[_0x238f8f(0x747)]===_0x238f8f(0x1cf)?_0x238f8f(0x6b2)+(_0x5cd8cc[_0x238f8f(0x787)]??'')+'::'+(_0x5cd8cc['cursorKey']??_0x5cd8cc['type']??_0x5cd8cc['id']):_0x238f8f(0x32d)+(_0x1e9c79[_0x238f8f(0x6b5)]??_0x1e9c79['processKey']??'')+'::'+(_0x5cd8cc[_0x238f8f(0x787)]??'')+'::'+_0x5cd8cc['id'],_0x5431f7=_0x3bfe44[_0x238f8f(0x2fa)](_0x184362);if(!_0x5431f7||_0x128c8c(_0x361a41)>_0x128c8c(_0x5431f7))_0x3bfe44['set'](_0x184362,_0x361a41);}}return[..._0x3bfe44[_0x238f8f(0x722)]()];}[_0x13208d(0x5d4)](){const _0x55a052=_0x13208d,_0x49b8e=Date[_0x55a052(0x4ec)](),_0x568375=this['listNodes'](),_0xf0e7ec=_0xb05048=>Math[_0x55a052(0x413)](0x0,Math[_0x55a052(0x578)]((_0x49b8e-(_0xb05048[_0x55a052(0x76f)]||_0x49b8e))/0x3e8)),_0x4e1cb4=_0x568375[_0x55a052(0x52d)](_0x1672d1=>_0x1672d1['kind']===_0x55a052(0x3ae)),_0x488d7a=_0x568375['filter'](_0x3f114f=>_0x3f114f[_0x55a052(0x650)]==='http-server');if(_0x4e1cb4||_0x488d7a[_0x55a052(0x6ad)])return{'primary':_0x4e1cb4?{'pid':_0x4e1cb4[_0x55a052(0x5c3)],'uptime':_0xf0e7ec(_0x4e1cb4)}:null,'workers':_0x488d7a['map'](_0x28fbb8=>({'pid':_0x28fbb8[_0x55a052(0x5c3)],'uptime':_0xf0e7ec(_0x28fbb8)})),'workersConfigured':_0x4e1cb4?.[_0x55a052(0x74c)]?.['workersConfigured']??_0x488d7a['length'],'mode':'cluster'};const _0x1fc513=_0x568375[_0x55a052(0x52d)](_0x4ffb95=>_0x4ffb95[_0x55a052(0x650)]===_0x55a052(0x80a)||_0x4ffb95[_0x55a052(0x650)]===_0x55a052(0x458)||_0x4ffb95[_0x55a052(0x650)]==='embedded'),_0x5b2c3f=_0x1fc513?{'pid':_0x1fc513[_0x55a052(0x5c3)],'uptime':_0xf0e7ec(_0x1fc513)}:{'pid':process[_0x55a052(0x5c3)],'uptime':Math[_0x55a052(0x413)](0x0,Math[_0x55a052(0x578)](process[_0x55a052(0x1f2)]()))};return{'primary':_0x5b2c3f,'workers':[_0x5b2c3f],'workersConfigured':0x1,'mode':_0x55a052(0x1cf)};}['nodesView'](){const _0x36d1b2=_0x13208d;return this[_0x36d1b2(0x604)]();}['treeView'](){const _0x4f076a=_0x13208d,_0x40ddf4=new Map();for(const _0x229328 of this[_0x4f076a(0x604)]())_0x40ddf4[_0x4f076a(0x259)](_0x229328['processKey'],{..._0x229328,'children':[]});const _0x291176=[];for(const _0x3a23f2 of _0x40ddf4[_0x4f076a(0x722)]()){const _0x4195b3=_0x3a23f2[_0x4f076a(0x2a4)]?_0x40ddf4['get'](_0x3a23f2[_0x4f076a(0x2a4)]):null;if(_0x4195b3&&_0x4195b3!==_0x3a23f2)_0x4195b3[_0x4f076a(0x5eb)][_0x4f076a(0x557)](_0x3a23f2);else _0x291176[_0x4f076a(0x557)](_0x3a23f2);}const _0xdc01db=(_0x32aed7,_0x4d7d42)=>_0x32aed7[_0x4f076a(0x650)]===_0x4d7d42[_0x4f076a(0x650)]?(_0x32aed7[_0x4f076a(0x5c3)]||0x0)-(_0x4d7d42[_0x4f076a(0x5c3)]||0x0):(_0x32aed7[_0x4f076a(0x650)]??'')<(_0x4d7d42[_0x4f076a(0x650)]??'')?-0x1:0x1,_0x365a0d=_0x43edbd=>{const _0x329c41=_0x4f076a;_0x43edbd[_0x329c41(0x562)](_0xdc01db);for(const _0x1c0016 of _0x43edbd)if(_0x1c0016[_0x329c41(0x5eb)]['length'])_0x365a0d(_0x1c0016[_0x329c41(0x5eb)]);};return _0x365a0d(_0x291176),_0x291176;}['getProcess'](_0x2123b5){return this['_groupByProcess']()['find'](_0x4315be=>_0x4315be['processKey']===_0x2123b5)??null;}[_0x13208d(0x604)](_0x1da3fe=Date[_0x13208d(0x4ec)]()){const _0x2b924c=_0x13208d,_0x164b52=new Map();for(const _0x4f61a0 of this[_0x2b924c(0x469)]()){const _0x332682=_0x2c3d4d(_0x4f61a0);let _0x1df58d=_0x164b52[_0x2b924c(0x2fa)](_0x332682);!_0x1df58d&&(_0x1df58d={'processKey':_0x332682,'nodeKey':_0x332682,'pid':_0x4f61a0[_0x2b924c(0x5c3)],'ppid':_0x4f61a0[_0x2b924c(0x2af)]??null,'host':_0x4f61a0[_0x2b924c(0x26b)]??null,'kind':_0x4f61a0['kind'],'role':null,'supervisorKey':_0x4f61a0[_0x2b924c(0x2a4)]??null,'slot':_0x4f61a0['slot']??null,'slotKey':_0x4f61a0[_0x2b924c(0x4a2)]??null,'caps':_0x4f61a0[_0x2b924c(0x464)]??null,'lifecycle':_0x4f61a0[_0x2b924c(0x19a)]??null,'uptime':Math[_0x2b924c(0x413)](0x0,Math[_0x2b924c(0x578)]((_0x1da3fe-(_0x4f61a0[_0x2b924c(0x76f)]||_0x1da3fe))/0x3e8)),'startedAt':_0x4f61a0['startedAt']??null,'meta':_0x4f61a0[_0x2b924c(0x74c)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x164b52[_0x2b924c(0x259)](_0x332682,_0x1df58d));_0x1df58d[_0x2b924c(0x554)]['push']({'instanceId':_0x4f61a0[_0x2b924c(0x79b)]??null,'role':_0x4f61a0[_0x2b924c(0x44e)]??null,'listenAddr':_0x4f61a0['listenAddr']??null,'lifecycle':_0x4f61a0['lifecycle']??null,'processing':_0x4f61a0[_0x2b924c(0x50e)]??null});if(!_0x1df58d[_0x2b924c(0x44e)]&&_0x4f61a0['role'])_0x1df58d[_0x2b924c(0x44e)]=_0x4f61a0[_0x2b924c(0x44e)];if(!_0x1df58d['listenAddr']&&_0x4f61a0[_0x2b924c(0x56d)])_0x1df58d[_0x2b924c(0x56d)]=_0x4f61a0[_0x2b924c(0x56d)];if(!_0x1df58d[_0x2b924c(0x50e)]&&_0x4f61a0[_0x2b924c(0x50e)])_0x1df58d[_0x2b924c(0x50e)]=_0x4f61a0[_0x2b924c(0x50e)];if(!_0x1df58d[_0x2b924c(0x38c)]&&_0x4f61a0[_0x2b924c(0x38c)])_0x1df58d['engines']=_0x4f61a0[_0x2b924c(0x38c)];if(!_0x1df58d[_0x2b924c(0x367)]&&_0x4f61a0[_0x2b924c(0x367)])_0x1df58d[_0x2b924c(0x367)]=_0x4f61a0[_0x2b924c(0x367)];if(_0x1df58d[_0x2b924c(0x464)]==null&&_0x4f61a0[_0x2b924c(0x464)])_0x1df58d['caps']=_0x4f61a0[_0x2b924c(0x464)];if(_0x4f61a0[_0x2b924c(0x847)]&&(!_0x1df58d['stats']||(_0x4f61a0[_0x2b924c(0x847)]['at']??0x0)>(_0x1df58d[_0x2b924c(0x847)]['at']??0x0)))_0x1df58d[_0x2b924c(0x847)]=_0x4f61a0['stats'];}return[..._0x164b52[_0x2b924c(0x722)]()];}[_0x13208d(0x3d8)](){const _0x12892b=_0x13208d,_0x2f5503=[],_0x18fd0c={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x602c83 of this[_0x12892b(0x604)]()){_0x2f5503[_0x12892b(0x557)]({'processKey':_0x602c83[_0x12892b(0x709)],'kind':_0x602c83[_0x12892b(0x650)],'pid':_0x602c83[_0x12892b(0x5c3)],'supervisorKey':_0x602c83[_0x12892b(0x2a4)],'meta':_0x602c83[_0x12892b(0x74c)]??null,'uptime':_0x602c83[_0x12892b(0x1f2)],'stats':_0x602c83[_0x12892b(0x847)]??null}),_0x18fd0c[_0x12892b(0x65b)]++;if(_0x602c83[_0x12892b(0x847)]){_0x18fd0c['rss']+=_0x602c83[_0x12892b(0x847)][_0x12892b(0x796)]||0x0,_0x18fd0c[_0x12892b(0x256)]+=(_0x602c83['stats'][_0x12892b(0x256)]||0x0)+(_0x602c83[_0x12892b(0x847)]['threads']?.[_0x12892b(0x256)]||0x0);const _0x3757c5=_0x602c83['stats'][_0x12892b(0x356)];_0x3757c5&&(_0x18fd0c[_0x12892b(0x356)][_0x12892b(0x430)]+=_0x3757c5[_0x12892b(0x430)]||0x0,_0x18fd0c[_0x12892b(0x356)][_0x12892b(0x375)]+=_0x3757c5[_0x12892b(0x375)]||0x0,_0x18fd0c['threads']['busy']+=_0x3757c5[_0x12892b(0x760)]||0x0);}}return{'totals':_0x18fd0c,'nodes':_0x2f5503};}async[_0x13208d(0x5f0)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x5b2348=_0x13208d;this[_0x5b2348(0x89b)]=this[_0x5b2348(0x89b)]||!!writer,this[_0x5b2348(0x60e)]=this[_0x5b2348(0x60e)]||!!reader,this[_0x5b2348(0x485)]=kind||this[_0x5b2348(0x485)]||(_0x28d7f3[_0x5b2348(0x493)]?_0x5b2348(0x3d4):_0x5b2348(0x80a)),this[_0x5b2348(0x1cc)]=supervisorKey??this[_0x5b2348(0x1cc)],this[_0x5b2348(0x67e)]=listenAddr??this[_0x5b2348(0x67e)],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x5b2348(0x623)]){const _0x5df606=await this['okdb'][_0x5b2348(0x2d2)](_0x34295a,{'sync':![],'durability':_0x5b2348(0x395)});await _0x5df606[_0x5b2348(0x3ac)](_0xb6b155),this[_0x5b2348(0x623)]=_0x5df606;}return this[_0x5b2348(0x623)];}[_0x13208d(0x28f)](){const _0x4cf721=_0x13208d;return this[_0x4cf721(0x47a)]!==this[_0x4cf721(0x623)]&&(this[_0x4cf721(0x47a)]=this[_0x4cf721(0x623)],this[_0x4cf721(0x5f4)]=this[_0x4cf721(0x623)][_0x4cf721(0x465)](_0xb6b155)[_0x4cf721(0x2a3)]),this[_0x4cf721(0x5f4)];}[_0x13208d(0x86c)](_0x2deb98){const _0x4c9df8=_0x13208d;if(_0x16df1a)return this[_0x4c9df8(0x28f)]()['putSync'](_0x2deb98['nodeKey'],_0x2deb98,0x1);const _0x2aabdc=this[_0x4c9df8(0x28f)]()['put'](_0x2deb98[_0x4c9df8(0x6b5)],_0x2deb98,0x1);if(_0x2aabdc&&typeof _0x2aabdc[_0x4c9df8(0x4ed)]==='function')_0x2aabdc[_0x4c9df8(0x4ed)](undefined,()=>{});return _0x2aabdc;}[_0x13208d(0x297)](_0x454d98){const _0x4fbc7f=_0x13208d;return this[_0x4fbc7f(0x28f)]()[_0x4fbc7f(0x422)](_0x454d98[_0x4fbc7f(0x6b5)],_0x454d98,0x1);}['_removeRowAsync'](_0x2df22d){const _0x5ae928=_0x13208d;if(_0x16df1a)try{return this['_nodeDb']()[_0x5ae928(0x8a6)](_0x2df22d);}catch{return![];}const _0x482c5d=this['_nodeDb']()[_0x5ae928(0x417)](_0x2df22d);if(_0x482c5d&&typeof _0x482c5d[_0x5ae928(0x4ed)]===_0x5ae928(0x7ca))_0x482c5d[_0x5ae928(0x4ed)](undefined,()=>{});return _0x482c5d;}async[_0x13208d(0x539)](_0x4ea21b){const _0x5a835a=_0x13208d;if(!this[_0x5a835a(0x623)]||!this[_0x5a835a(0x89b)]||!_0x4ea21b?.['nodeKey'])return;return this[_0x5a835a(0x86c)](_0x4ea21b);}async[_0x13208d(0x89f)](_0xe900ac){const _0x1159e4=_0x13208d;if(!this[_0x1159e4(0x623)]||!this[_0x1159e4(0x89b)]||!_0xe900ac)return;const _0x499b02=_0xe900ac[_0x1159e4(0x1a1)]('#'),_0x5d032f=[];for(const {key:_0x3cdfbf}of this[_0x1159e4(0x623)][_0x1159e4(0x3c9)](_0xb6b155)){if(_0x3cdfbf===_0xe900ac||!_0x499b02&&typeof _0x3cdfbf===_0x1159e4(0x1d2)&&_0x3cdfbf[_0x1159e4(0x579)](_0xe900ac+'#'))_0x5d032f[_0x1159e4(0x557)](_0x3cdfbf);}for(const _0x3d67e5 of _0x5d032f){try{this[_0x1159e4(0x28f)]()[_0x1159e4(0x8a6)](_0x3d67e5);}catch{}}}[_0x13208d(0x2c9)](_0x475c62){const _0x44cbf7=_0x13208d;if(typeof _0x475c62?.[_0x44cbf7(0x5c3)]!==_0x44cbf7(0x72c))return![];if(_0x475c62[_0x44cbf7(0x26b)]!==_0x46d00e['hostname']())return![];if(_0x475c62[_0x44cbf7(0x5c3)]===process['pid'])return![];if(_0x475c62[_0x44cbf7(0x282)]!=null&&_0x475c62[_0x44cbf7(0x282)]<Date[_0x44cbf7(0x4ec)]()-_0x2cc14e)return!![];try{return process['kill'](_0x475c62[_0x44cbf7(0x5c3)],0x0),![];}catch(_0x20caf6){return _0x20caf6[_0x44cbf7(0x2dc)]===_0x44cbf7(0x55c);}}[_0x13208d(0x469)](){const _0x391903=_0x13208d;if(!this[_0x391903(0x623)])return[];try{this['_statusEnv']['db']?.[_0x391903(0x455)]?.();}catch{}const _0x250d23=Date[_0x391903(0x4ec)](),_0x284a81=_0x46d00e[_0x391903(0x216)](),_0x27f86d=[];for(const {value:_0x46ddec}of this[_0x391903(0x623)][_0x391903(0x3c9)](_0xb6b155)){if(!_0x46ddec)continue;let _0x39e4f8=null;_0x46ddec['host']===_0x284a81&&typeof _0x46ddec['pid']===_0x391903(0x72c)&&(_0x39e4f8=!this[_0x391903(0x2c9)](_0x46ddec));if(_0x39e4f8===![])continue;const _0x3aa2fe=_0x46ddec['expiresAt']==null||_0x46ddec[_0x391903(0x282)]>=_0x250d23;if(_0x39e4f8===!![]||_0x3aa2fe)_0x27f86d[_0x391903(0x557)](_0x46ddec);}return _0x27f86d;}async['reap'](_0x5b1efc=0x0){const _0xabcf2e=_0x13208d;if(!this['_statusEnv']||!this[_0xabcf2e(0x89b)])return;const _0x4a2254=Date[_0xabcf2e(0x4ec)]()-_0x5b1efc,_0x7c19e9=new Set(),_0x5848c3=[],_0x5a3e2d=_0x46d00e['hostname'](),_0x3e4235=require$$3[_0xabcf2e(0x598)];for(const {key:_0x195aa3,value:_0x548314}of this[_0xabcf2e(0x623)][_0xabcf2e(0x3c9)](_0xb6b155)){if(!_0x548314)continue;const _0x392371=_0x548314[_0xabcf2e(0x26b)]===_0x5a3e2d&&typeof _0x548314[_0xabcf2e(0x5c3)]===_0xabcf2e(0x72c),_0x25bbc5=_0x392371?this['_nodeDead'](_0x548314):_0x548314[_0xabcf2e(0x282)]!=null&&_0x548314[_0xabcf2e(0x282)]<_0x4a2254;if(_0x25bbc5)_0x5848c3[_0xabcf2e(0x557)](_0x195aa3);else{_0x7c19e9[_0xabcf2e(0x4da)](_0x2c3d4d(_0x548314)??_0x195aa3);if(_0x548314['version']&&_0x548314[_0xabcf2e(0x598)]!==_0x3e4235){if(!this[_0xabcf2e(0x1ff)])this['_versionSkewWarned']=new Set();!this['_versionSkewWarned'][_0xabcf2e(0x2ad)](_0x548314[_0xabcf2e(0x598)])&&(this[_0xabcf2e(0x1ff)][_0xabcf2e(0x4da)](_0x548314[_0xabcf2e(0x598)]),this[_0xabcf2e(0x58a)]['log']?.[_0xabcf2e(0x44f)]?.(_0xabcf2e(0x76a)+(_0x548314['pid']??'?')+_0xabcf2e(0x763)+_0x548314[_0xabcf2e(0x598)]+_0xabcf2e(0x2f7)+_0x3e4235+'\x20—\x20'+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0xabcf2e(0x744)}));}}}for(const _0x4c5551 of _0x5848c3)this['_removeRowAsync'](_0x4c5551);if(this['_ensureDesired']()){const _0x9e9b50=[];for(const {key:_0x32fe69}of this[_0xabcf2e(0x3f5)]('node')){if(!_0x7c19e9[_0xabcf2e(0x2ad)](_0x32fe69)){if(_0x16df1a)try{this[_0xabcf2e(0x831)][_0xabcf2e(0x8a6)](_0xabcf2e(0x34f)+_0x32fe69);}catch{}else _0x9e9b50[_0xabcf2e(0x557)](this[_0xabcf2e(0x831)][_0xabcf2e(0x417)](_0xabcf2e(0x34f)+_0x32fe69));}}if(_0x9e9b50[_0xabcf2e(0x6ad)])await Promise[_0xabcf2e(0x1fa)](_0x9e9b50);}}['startHeartbeat'](_0x20b443=null){const _0x1ca04c=_0x13208d;if(this[_0x1ca04c(0x407)])return;if(!this[_0x1ca04c(0x89b)]||!this[_0x1ca04c(0x623)]){this[_0x1ca04c(0x58a)]?.[_0x1ca04c(0x689)]?.['warn']?.(_0x1ca04c(0x6fc)+this[_0x1ca04c(0x89b)]+_0x1ca04c(0x4e4)+!!this[_0x1ca04c(0x623)]+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':'processes'});return;}this[_0x1ca04c(0x571)]=_0x20b443,this['_onProcEvent']=()=>this['_maybePublish']();for(const _0x5f36bd of _0x4e6cee)this['okdb'][_0x1ca04c(0x74a)]['on'](_0x5f36bd,this[_0x1ca04c(0x494)]);this[_0x1ca04c(0x1c6)]();const _0x4ade69=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x5e6904;this[_0x1ca04c(0x407)]=setInterval(()=>{const _0x33f64e=_0x1ca04c;if(this[_0x33f64e(0x571)])try{this[_0x33f64e(0x571)]();}catch{}this['_publishNow'](),this[_0x33f64e(0x5c6)]()[_0x33f64e(0x39e)](()=>{});},_0x4ade69);if(this['_hbTimer'][_0x1ca04c(0x895)])this['_hbTimer'][_0x1ca04c(0x895)]();}[_0x13208d(0x28c)](){const _0x21d1e6=_0x13208d;if(!this['_isWriter']||!this['_statusEnv'])return;if(Date[_0x21d1e6(0x4ec)]()-this[_0x21d1e6(0x809)]<_0xb7f8a6)return;this[_0x21d1e6(0x1c6)]();}['_publishNow'](){const _0x388f54=_0x13208d;if(!this[_0x388f54(0x89b)]||!this[_0x388f54(0x623)])return;this[_0x388f54(0x809)]=Date[_0x388f54(0x4ec)]();try{const _0x5135b4=[this[_0x388f54(0x541)]()];for(const _0x556103 of this[_0x388f54(0x3c5)][_0x388f54(0x722)]())_0x5135b4[_0x388f54(0x557)](this[_0x388f54(0x4a1)](_0x556103));const _0x408570=_0x3c3fc6[_0x388f54(0x487)]?_0x3c3fc6[_0x388f54(0x4ec)]():0x0;for(const _0x345119 of _0x5135b4){try{this[_0x388f54(0x297)](_0x345119),this['_publishFailWarned']=![];}catch(_0x5d3ce4){!this[_0x388f54(0x449)]&&(this['_publishFailWarned']=!![],this[_0x388f54(0x58a)]?.[_0x388f54(0x689)]?.[_0x388f54(0x44f)]?.(_0x388f54(0x3c1)+_0x5d3ce4[_0x388f54(0x81d)],{'feature':_0x388f54(0x65b)}));}}if(_0x3c3fc6[_0x388f54(0x487)])_0x3c3fc6[_0x388f54(0x25a)](_0x388f54(0x7c7),_0x3c3fc6[_0x388f54(0x4ec)]()-_0x408570,_0x388f54(0x82c)+_0x5135b4[_0x388f54(0x6ad)]+_0x388f54(0x29c));}catch(_0xb5b6e0){!this[_0x388f54(0x449)]&&(this['_publishFailWarned']=!![],this[_0x388f54(0x58a)]?.['log']?.[_0x388f54(0x44f)]?.(_0x388f54(0x3c1)+_0xb5b6e0[_0x388f54(0x81d)],{'feature':_0x388f54(0x65b)}));}}async[_0x13208d(0x236)](){const _0x45042f=_0x13208d;if(this[_0x45042f(0x494)]){for(const _0x3d6910 of _0x4e6cee){try{this[_0x45042f(0x58a)]['events'][_0x45042f(0x804)](_0x3d6910,this[_0x45042f(0x494)]);}catch{}}this[_0x45042f(0x494)]=null;}this[_0x45042f(0x407)]&&(clearInterval(this[_0x45042f(0x407)]),this[_0x45042f(0x407)]=null);try{if(this['_statusEnv']&&this[_0x45042f(0x89b)])await this[_0x45042f(0x89f)](this['_rowKey']);}catch{}}async[_0x13208d(0x1d0)](){const _0x528695=_0x13208d;if(!this[_0x528695(0x623)]||!this[_0x528695(0x89b)])return;try{await this[_0x528695(0x89f)](this[_0x528695(0x46c)]);}catch{}try{const _0xc47e67=[];for(const {value:_0x8eaa56}of this[_0x528695(0x623)][_0x528695(0x3c9)](_0xb6b155)){if(_0x8eaa56?.[_0x528695(0x2af)]===process[_0x528695(0x5c3)]&&_0x8eaa56[_0x528695(0x6b5)])_0xc47e67['push'](_0x8eaa56['nodeKey']);}for(const _0x184df3 of _0xc47e67){try{await this['removeNode'](_0x184df3);}catch{}}}catch{}}async[_0x13208d(0x711)](){const _0x1c2fa5=_0x13208d;return this[_0x1c2fa5(0x539)](this[_0x1c2fa5(0x541)]());}async[_0x13208d(0x52f)](_0x265a88){const _0xbf819=_0x13208d;if(!this[_0xbf819(0x623)]||!this['_isWriter'])return;return this[_0xbf819(0x539)](this[_0xbf819(0x4a1)](_0x265a88));}['_buildChildRow']({pid:_0x5afee4,startedAt:_0x4b9b58,kind:_0x436e7d,supervisorKey:_0x3e963b,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x13208d(0x6e8),meta:meta=null,stats:stats=null}){const _0x16aa6c=_0x13208d,_0xaa054c=Date[_0x16aa6c(0x4ec)](),_0xc08bd1=_0x194d70(_0x5afee4,_0x4b9b58);return{'nodeKey':_0x5aeb4a(_0xc08bd1,'0'),'processKey':_0xc08bd1,'instanceId':'0','pid':_0x5afee4,'startedAt':_0x4b9b58,'ppid':process[_0x16aa6c(0x5c3)],'host':_0x46d00e['hostname'](),'supervisorKey':_0x3e963b,'slot':slot,'slotKey':slotKey,'kind':_0x436e7d,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0xaa054c,'expiresAt':_0xaa054c+_0x192c22,'caps':this[_0x16aa6c(0x5c7)](_0x436e7d,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x13208d(0x568)](_0xda7f57){const _0x4ab9e4=_0x13208d;if(!_0xda7f57?.['pid'])return null;const _0x5017fa=_0x194d70(_0xda7f57[_0x4ab9e4(0x5c3)],_0xda7f57[_0x4ab9e4(0x76f)]);this[_0x4ab9e4(0x3c5)][_0x4ab9e4(0x259)](_0x5017fa,{..._0xda7f57,'supervisorKey':_0xda7f57[_0x4ab9e4(0x2a4)]??this['_selfKey']});if(this[_0x4ab9e4(0x89b)])await this[_0x4ab9e4(0x52f)](this[_0x4ab9e4(0x3c5)]['get'](_0x5017fa))['catch']?.(()=>{});return _0x5017fa;}[_0x13208d(0x8b0)](_0x50b573){const _0x5a223b=_0x13208d;if(!_0x50b573)return;return this[_0x5a223b(0x3c5)][_0x5a223b(0x360)](_0x50b573),this['removeNode'](_0x50b573);}['_sampleOwnStats'](){const _0x55dbc6=_0x13208d,_0x46ea70=Date[_0x55dbc6(0x4ec)](),_0x10dcc4=process[_0x55dbc6(0x40f)](),_0x6dd33f=(_0x46ea70-this[_0x55dbc6(0x815)])*0x3e8;if(_0x6dd33f>=0x3d090){const _0x4873c5=_0x10dcc4[_0x55dbc6(0x402)]-this['_lastCpuUsage']['user']+(_0x10dcc4[_0x55dbc6(0x7f0)]-this[_0x55dbc6(0x1f8)][_0x55dbc6(0x7f0)]),_0x240233=_0x46d00e[_0x55dbc6(0x662)]()[_0x55dbc6(0x6ad)]||0x1;this[_0x55dbc6(0x757)]=Math[_0x55dbc6(0x279)](0x64,Math['round'](_0x4873c5/(_0x6dd33f*_0x240233)*0x64)),this[_0x55dbc6(0x2cc)]=Math[_0x55dbc6(0x578)](_0x6dd33f/0x3e8),this['_lastCpuUsage']=_0x10dcc4,this[_0x55dbc6(0x815)]=_0x46ea70;}const _0xb3a46b=process[_0x55dbc6(0x8bb)](),_0x18f970=this[_0x55dbc6(0x73c)][_0x55dbc6(0x7d1)];let _0x4ef25d=0x0;if(_0x18f970>0x0){const _0x49a6ed=[this[_0x55dbc6(0x58a)],...this[_0x55dbc6(0x58a)][_0x55dbc6(0x41e)]?.[_0x55dbc6(0x722)]?.()??[]];for(const _0x221973 of _0x49a6ed){const _0x5151c2=_0x221973[_0x55dbc6(0x56f)]?.[_0x55dbc6(0x4fd)];if(_0x5151c2)_0x4ef25d+=_0x5151c2[_0x55dbc6(0x48f)][_0x55dbc6(0x760)];}}let _0x5cc868=null;const _0x37dfd4=_0x18f970;if(_0x37dfd4>0x0){let _0x24ac6c=0x0;for(const _0x2f99f8 of this[_0x55dbc6(0x73c)][_0x55dbc6(0x722)]())_0x24ac6c+=_0x2f99f8['heapUsed']||0x0;_0x5cc868={'count':_0x37dfd4,'heapUsed':_0x24ac6c,'sandbox':_0x18f970,'busy':_0x4ef25d};}return{'rss':_0xb3a46b[_0x55dbc6(0x796)],'heapUsed':_0xb3a46b[_0x55dbc6(0x256)],'heapTotal':_0xb3a46b[_0x55dbc6(0x41d)],'external':_0xb3a46b['external'],'cpuPct':this[_0x55dbc6(0x757)],'cpuWindowMs':this[_0x55dbc6(0x2cc)]??null,'threads':_0x5cc868,'at':_0x46ea70};}[_0x13208d(0x3ed)](_0x39e408,_0x58da68){const _0x59abd8=_0x13208d;if(!_0x39e408||!_0x58da68)return;this[_0x59abd8(0x73c)][_0x59abd8(0x259)](_0x39e408,_0x58da68);}[_0x13208d(0x4bb)](_0x2f3450){const _0x41f8f3=_0x13208d;this['_threadStats'][_0x41f8f3(0x360)](_0x2f3450);}[_0x13208d(0x1d7)](_0x20c666,_0x218db5,_0x1302fc=undefined){const _0x37d1be=_0x13208d,_0xda13a1=this[_0x37d1be(0x3c5)][_0x37d1be(0x2fa)](_0x20c666);if(!_0xda13a1||!_0x218db5)return;if(_0x1302fc!==undefined)_0xda13a1[_0x37d1be(0x50e)]=_0x1302fc;_0xda13a1[_0x37d1be(0x847)]={'rss':_0x218db5[_0x37d1be(0x796)]??null,'heapUsed':_0x218db5[_0x37d1be(0x256)]??null,'heapTotal':_0x218db5[_0x37d1be(0x41d)]??null,'external':_0x218db5[_0x37d1be(0x54d)]??null,'cpuPct':_0x218db5[_0x37d1be(0x50a)]??null,'cpuWindowMs':_0x218db5[_0x37d1be(0x4bc)]??null,'threads':_0x218db5[_0x37d1be(0x356)]??null,'claims':_0x218db5[_0x37d1be(0x7aa)]??null,'envsOpen':_0x218db5['envsOpen']??null,'at':Date[_0x37d1be(0x4ec)]()};}['_buildOwnRow'](){const _0x1f1046=_0x13208d,_0x566d82=Date[_0x1f1046(0x4ec)](),_0x2547fb=this[_0x1f1046(0x58a)][_0x1f1046(0x58f)]||{},_0x21780e=this['_kind']||'cli';return{'nodeKey':this[_0x1f1046(0x46c)],'processKey':this['_selfKey'],'instanceId':this['_instanceId'],'pid':process['pid'],'startedAt':this[_0x1f1046(0x8ad)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x1f1046(0x2af)]===_0x1f1046(0x72c)?process[_0x1f1046(0x2af)]:null,'host':_0x46d00e['hostname'](),'supervisorKey':this['_supervisorKey']??null,'version':require$$3[_0x1f1046(0x598)],'kind':_0x21780e,'role':{'engines':!!_0x2547fb[_0x1f1046(0x38c)],'processors':!!_0x2547fb['processors'],'compaction':_0x2547fb['compaction'],'http':_0x2547fb['http']},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0x566d82,'expiresAt':_0x566d82+_0x192c22,'caps':this[_0x1f1046(0x5c7)](_0x21780e,_0x2547fb),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x1f1046(0x471)]},'processing':_0x2547fb[_0x1f1046(0x78a)]?this[_0x1f1046(0x44c)]():null,'engines':_0x2547fb[_0x1f1046(0x38c)]?[...this[_0x1f1046(0x58a)][_0x1f1046(0x441)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x1f1046(0x523)](),'writers':this[_0x1f1046(0x6f0)]()};}[_0x13208d(0x6f0)](){const _0xb8b63a=_0x13208d,_0x5e2d72={};try{for(const [_0x24cc5a,_0x4d2670]of this[_0xb8b63a(0x58a)][_0xb8b63a(0x41e)]){try{const _0x577680=_0x4d2670['writerStatus']?.();if(!_0x577680)continue;if(!_0x577680[_0xb8b63a(0x799)]&&!_0x577680['committed']&&!(_0x577680[_0xb8b63a(0x57c)]??0x0)&&!_0x577680['draining'])continue;_0x5e2d72[_0x24cc5a]={'depth':_0x577680[_0xb8b63a(0x799)],'oldestPendingMs':_0x577680['oldestPendingMs'],'committed':_0x577680[_0xb8b63a(0x50c)],'commitsPerSec':_0x577680[_0xb8b63a(0x6d2)],'commitP99Ms':_0x577680[_0xb8b63a(0x52c)],'parkedNow':_0x577680[_0xb8b63a(0x57c)]??0x0,'draining':!!_0x577680[_0xb8b63a(0x810)]};}catch{}}}catch{}return Object['keys'](_0x5e2d72)[_0xb8b63a(0x6ad)]?_0x5e2d72:null;}['_collectSingletonClaims'](){const _0x387685=_0x13208d,_0x580fff=process[_0x387685(0x5c3)],_0x5e8bb4=Date[_0x387685(0x4ec)](),_0xe6b517=_0x22f9de=>{const _0x571cca=_0x387685;if(!_0x22f9de)return[];const _0x1b539c=[];try{for(const {id:_0x59d5c0,entry:_0x5f4f4b}of _0x22f9de[_0x571cca(0x3f8)]()){if(_0x5f4f4b?.[_0x571cca(0x403)]?.[_0x571cca(0x5c3)]!==_0x580fff)continue;const _0x206a54=_0x5f4f4b['updatedAt']??_0x5f4f4b[_0x571cca(0x82f)]??0x0;if(_0x206a54+(_0x5f4f4b[_0x571cca(0x893)]??0x0)<_0x5e8bb4)continue;_0x1b539c[_0x571cca(0x557)](_0x59d5c0);}}catch{}return _0x1b539c;},_0x2d2bd5=_0xe6b517(this[_0x387685(0x633)]('compact')),_0x318e27=_0xe6b517(this[_0x387685(0x633)]('sync'));if(!_0x2d2bd5[_0x387685(0x6ad)]&&!_0x318e27[_0x387685(0x6ad)])return null;return{'compact':_0x2d2bd5,'replicate':_0x318e27};}[_0x13208d(0x633)](_0x345949){const _0x33ffab=_0x13208d;if(!this[_0x33ffab(0x58a)]?.[_0x33ffab(0x6e7)])return null;if(!this[_0x33ffab(0x274)])this['_singletonLocks']=new Map();let _0x5989bf=this[_0x33ffab(0x274)][_0x33ffab(0x2fa)](_0x345949);if(!_0x5989bf)try{_0x5989bf=new _0x200d49(this[_0x33ffab(0x58a)]['_rootDb'],{'namespace':_0x345949}),this[_0x33ffab(0x274)]['set'](_0x345949,_0x5989bf);}catch{return null;}return _0x5989bf;}[_0x13208d(0x44c)](){const _0x571689=_0x13208d,_0x26e40d=[];try{for(const [_0x1bb5b5,_0x5cbb06]of this[_0x571689(0x58a)][_0x571689(0x41e)]){if(_0x1bb5b5[_0x571689(0x579)]('~'))continue;for(const _0x22a841 of _0x5cbb06[_0x571689(0x2bd)]['tierList']())_0x26e40d[_0x571689(0x557)]({..._0x22a841,'env':_0x1bb5b5});}}catch{}return{'participate':this['okdb'][_0x571689(0x78a)]?.['_participate']??![],'processors':_0x26e40d};}[_0x13208d(0x3c3)](){const _0x9256d=_0x13208d;if(this[_0x9256d(0x831)])return!![];const _0x425a9d=this[_0x9256d(0x58a)][_0x9256d(0x6e7)];if(!_0x425a9d)return![];return this[_0x9256d(0x831)]=_0x425a9d[_0x9256d(0x727)](_0x7217f8,{'dupSort':![]}),this[_0x9256d(0x6d6)]=_0x425a9d[_0x9256d(0x727)](_0x4c0ca4,{'dupSort':![]}),!![];}async[_0x13208d(0x715)](){const _0x1f0e73=_0x13208d;if(!this[_0x1f0e73(0x3c3)]())return;const _0x2abd14=_0x1f0e73(0x81b),_0x26289b=0x1,_0x164e3b=this['_desired'][_0x1f0e73(0x2fa)](_0x2abd14)??0x0;if(_0x164e3b>=_0x26289b)return;const _0x2d1e36=_0x1f7606=>{const _0x7f7beb=_0x1f0e73;if(_0x1f7606==='worker')return _0x7f7beb(0x1cf);if(_0x1f7606===_0x7f7beb(0x35c))return _0x7f7beb(0x8c4);return _0x1f7606;};await this[_0x1f0e73(0x58a)]['_systemEnv'][_0x1f0e73(0x863)][_0x1f0e73(0x826)](()=>{const _0x4cb30d=_0x1f0e73;for(const _0x28f0ff of[_0x4cb30d(0x353),_0x4cb30d(0x64c)]){for(const {key:_0x4ea021,value:_0x396bdc}of this['_desired'][_0x4cb30d(0x3c9)]({'start':_0x28f0ff,'end':_0x28f0ff+'\xff'})){if(typeof _0x4ea021!==_0x4cb30d(0x1d2)||!_0x4ea021[_0x4cb30d(0x579)](_0x28f0ff))break;const _0x782979=_0x2d1e36(_0x396bdc[_0x4cb30d(0x747)]);if(_0x782979!==_0x396bdc[_0x4cb30d(0x747)])this['_desired'][_0x4cb30d(0x25f)](_0x4ea021,{..._0x396bdc,'mode':_0x782979});}}this['_desired']['put'](_0x2abd14,_0x26289b);});}[_0x13208d(0x587)](){const _0x1d29af=_0x13208d;return!!this[_0x1d29af(0x831)];}[_0x13208d(0x3f7)](_0x2a301f,_0x42198b){const _0x5f4293=_0x13208d;if(!this[_0x5f4293(0x3c3)]())return null;const _0x17744e=_0x2a301f+'/'+_0x42198b;return this['_refreshDesiredSnapshot'](),this[_0x5f4293(0x4a7)][_0x5f4293(0x2fa)](_0x17744e)??this[_0x5f4293(0x831)][_0x5f4293(0x2fa)](_0x17744e)??null;}[_0x13208d(0x7c1)](){const _0x2898ea=_0x13208d;if(!_0x16df1a)return;try{this[_0x2898ea(0x58a)][_0x2898ea(0x736)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x13208d(0x312)](_0x199594,_0x50b683,_0x2fe61e){const _0x1bf219=_0x13208d;if(!this[_0x1bf219(0x3c3)]())return null;const _0x3dc127=_0x199594+'/'+_0x50b683;this[_0x1bf219(0x7c1)]();const _0x4e1763=this['_desiredOverlay'][_0x1bf219(0x2fa)](_0x3dc127)??this[_0x1bf219(0x831)][_0x1bf219(0x2fa)](_0x3dc127)??{'version':0x0},_0x18e2de=(_0x4e1763[_0x1bf219(0x598)]||0x0)+0x1,_0x2ff5bf={..._0x4e1763,..._0x2fe61e,'version':_0x18e2de,'updatedAt':Date[_0x1bf219(0x4ec)]()};this[_0x1bf219(0x4a7)][_0x1bf219(0x259)](_0x3dc127,_0x2ff5bf);try{await this[_0x1bf219(0x58a)][_0x1bf219(0x736)][_0x1bf219(0x863)][_0x1bf219(0x826)](()=>{const _0x3ce0eb=_0x1bf219;this[_0x3ce0eb(0x831)][_0x3ce0eb(0x25f)](_0x3dc127,_0x2ff5bf);});}finally{if(this[_0x1bf219(0x4a7)][_0x1bf219(0x2fa)](_0x3dc127)===_0x2ff5bf)this[_0x1bf219(0x4a7)][_0x1bf219(0x360)](_0x3dc127);}return _0x18e2de;}['listDesired'](_0x3278b8){const _0x8a1857=_0x13208d;if(!this[_0x8a1857(0x3c3)]())return[];this[_0x8a1857(0x7c1)]();const _0x13c31c=_0x3278b8+'/',_0x4429db=[];for(const {key:_0x303913,value:_0x104072}of this[_0x8a1857(0x831)][_0x8a1857(0x3c9)]({'start':_0x13c31c,'end':_0x13c31c+'\xff'})){if(typeof _0x303913!==_0x8a1857(0x1d2)||!_0x303913['startsWith'](_0x13c31c))break;_0x4429db['push']({'key':_0x303913[_0x8a1857(0x27f)](_0x13c31c[_0x8a1857(0x6ad)]),'value':_0x104072});}return _0x4429db;}[_0x13208d(0x653)](_0x5a6db0){const _0x5d5617=_0x13208d;if(!this['_ensureDesired']())return null;return this[_0x5d5617(0x6d6)][_0x5d5617(0x2fa)](_0x5a6db0)??null;}async[_0x13208d(0x1d8)](_0x572c60,_0x2ff94f,_0x7e3f1f={}){const _0x53cb84=_0x13208d;if(!this[_0x53cb84(0x3c3)]())return null;let _0x2f61d4;return await this[_0x53cb84(0x58a)][_0x53cb84(0x736)][_0x53cb84(0x863)][_0x53cb84(0x826)](()=>{const _0xa6f062=_0x53cb84,_0x252901=this[_0xa6f062(0x6d6)][_0xa6f062(0x2fa)](_0x572c60)||{'epoch':0x0};_0x2f61d4=(_0x252901['epoch']||0x0)+0x1,this['_cmd'][_0xa6f062(0x25f)](_0x572c60,{..._0x252901,..._0x7e3f1f,'cmd':_0x2ff94f,'epoch':_0x2f61d4,'updatedAt':Date[_0xa6f062(0x4ec)]()});}),_0x2f61d4;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x93bbc6,'nodeKey':_0x194d70,'logicalKey':_0x2d74a2,'slotKey':_0x83cc,'PROCESS_ENV':_0x34295a,'NODE_TYPE':_0xb6b155},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x3b3758=_0x1a2e0d;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x295698=require$$0$6,{clampTimerDelay:_0x2ea3ff}=requireOkdbTimers(),{EVENTS:_0x2e6c6e,CHANGE_ACTIONS:_0x1f21ab}=requireOkdbEnums(),{LOOP:_0x356936}=requireOkdbLoopMonitor(),_0x479157=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x545a8f=0x5,_0x48ab6a=0x2710;class _0x515597 extends _0x295698{constructor(_0x953b47,_0x2f24e1={}){const _0x5d1773=_0x4c4a;super(),this[_0x5d1773(0x58a)]=_0x953b47,this[_0x5d1773(0x666)]=_0x2f24e1[_0x5d1773(0x769)]??_0x479157,this[_0x5d1773(0x1d6)]=_0x2f24e1[_0x5d1773(0x6e9)]??_0x545a8f,this[_0x5d1773(0x78c)]=_0x2f24e1[_0x5d1773(0x685)]??_0x48ab6a,this[_0x5d1773(0x276)]=![],this[_0x5d1773(0x681)]=new Map(),this[_0x5d1773(0x4ff)]=new Map(),this[_0x5d1773(0x513)]=new Map(),this[_0x5d1773(0x640)]=null,this['_draining']=![],this[_0x5d1773(0x1e5)]=new Set(),this['_pendingLocal']=new Set(),this[_0x5d1773(0x65e)]=_0x56081f=>this[_0x5d1773(0x2f4)](_0x56081f),this['_onPending']=_0x319eb2=>this[_0x5d1773(0x724)](_0x319eb2),this[_0x5d1773(0x695)]=_0x20941c=>this[_0x5d1773(0x748)](_0x20941c),this[_0x5d1773(0x5e9)]=()=>this[_0x5d1773(0x354)]();}[_0x3b3758(0x398)](){const _0x1ac0f2=_0x3b3758;if(this[_0x1ac0f2(0x276)])return;this[_0x1ac0f2(0x276)]=!![];for(const [_0x3205f2,_0x5d1ec3]of this[_0x1ac0f2(0x58a)]['_envs']){if(_0x3205f2[_0x1ac0f2(0x579)]('~'))continue;try{_0x5d1ec3['_enableChangelog']();}catch{}}for(const [_0x1d8286,_0xdfc52b]of this['okdb'][_0x1ac0f2(0x41e)]){if(_0x1d8286[_0x1ac0f2(0x579)]('~'))continue;try{this['_baselines'][_0x1ac0f2(0x259)](_0x1d8286,_0xdfc52b[_0x1ac0f2(0x3cb)]()||0x0);}catch{}}const {events:_0xaf6778}=this['okdb'];_0xaf6778['on'](_0x2e6c6e[_0x1ac0f2(0x5e5)],this[_0x1ac0f2(0x2be)]),_0xaf6778['on'](_0x2e6c6e[_0x1ac0f2(0x267)],this[_0x1ac0f2(0x65e)]),_0xaf6778['on'](_0x2e6c6e[_0x1ac0f2(0x5f8)],this['_onItem']),_0xaf6778['on'](_0x2e6c6e['ITEM_REMOVE'],this['_onItem']),_0xaf6778['on'](_0x2e6c6e[_0x1ac0f2(0x73e)],this[_0x1ac0f2(0x695)]),_0xaf6778['once'](_0x2e6c6e[_0x1ac0f2(0x357)],this[_0x1ac0f2(0x5e9)]);}['stop'](){const _0x52c3a3=_0x3b3758;if(!this[_0x52c3a3(0x276)])return;this['_started']=![];const {events:_0x860298}=this['okdb'];_0x860298[_0x52c3a3(0x804)](_0x2e6c6e[_0x52c3a3(0x5e5)],this[_0x52c3a3(0x2be)]),_0x860298[_0x52c3a3(0x804)](_0x2e6c6e[_0x52c3a3(0x267)],this[_0x52c3a3(0x65e)]),_0x860298[_0x52c3a3(0x804)](_0x2e6c6e['ITEM_UPDATE'],this[_0x52c3a3(0x65e)]),_0x860298['off'](_0x2e6c6e[_0x52c3a3(0x7a2)],this['_onItem']),_0x860298[_0x52c3a3(0x804)](_0x2e6c6e[_0x52c3a3(0x73e)],this[_0x52c3a3(0x695)]);try{_0x860298[_0x52c3a3(0x804)](_0x2e6c6e['SYSTEM_STOPPED'],this[_0x52c3a3(0x5e9)]);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this[_0x52c3a3(0x640)]=null),this[_0x52c3a3(0x513)][_0x52c3a3(0x43c)](),this[_0x52c3a3(0x681)]['clear'](),this['_baselines'][_0x52c3a3(0x43c)](),this[_0x52c3a3(0x1e5)][_0x52c3a3(0x43c)](),this[_0x52c3a3(0x6c6)][_0x52c3a3(0x43c)]();}['_dedupeKey'](_0x1ae6d6,_0x166fd5,_0x4c8a68,_0x429bc8){return _0x1ae6d6+'\x00'+_0x166fd5+'\x00'+_0x4c8a68+'\x00'+_0x429bc8;}[_0x3b3758(0x690)](_0x4f67a8,_0x3de9c1,_0xc0211,_0x593cfb){const _0x337670=_0x3b3758,_0x4b7dc4=this[_0x337670(0x6dd)](_0x4f67a8,_0x3de9c1,_0xc0211,_0x593cfb);if(this[_0x337670(0x1e5)][_0x337670(0x2ad)](_0x4b7dc4))return![];this['_seen'][_0x337670(0x4da)](_0x4b7dc4);if(this['_seen'][_0x337670(0x7d1)]>this[_0x337670(0x78c)]){const _0xd3cfb0=this[_0x337670(0x1e5)][_0x337670(0x722)]()[_0x337670(0x2a5)]()[_0x337670(0x352)];this[_0x337670(0x1e5)][_0x337670(0x360)](_0xd3cfb0);}return!![];}[_0x3b3758(0x724)](_0x50673c){const _0x24aec8=_0x3b3758;if(!this[_0x24aec8(0x276)]||!_0x50673c)return;const {env:_0x485437,type:_0x492aea,key:_0x4c792c,clock:_0x2df75f}=_0x50673c;if(_0x485437==null||_0x492aea==null||_0x4c792c==null)return;if(typeof _0x485437==='string'&&_0x485437[_0x24aec8(0x579)]('~'))return;if(typeof _0x492aea===_0x24aec8(0x1d2)&&_0x492aea['startsWith']('~'))return;this[_0x24aec8(0x6c6)][_0x24aec8(0x4da)](this['_dedupeKey'](_0x485437,_0x492aea,_0x4c792c,_0x2df75f)),this[_0x24aec8(0x6c6)][_0x24aec8(0x7d1)]>this[_0x24aec8(0x78c)]&&this[_0x24aec8(0x6c6)][_0x24aec8(0x360)](this[_0x24aec8(0x6c6)][_0x24aec8(0x722)]()[_0x24aec8(0x2a5)]()['value']);}[_0x3b3758(0x2f4)](_0x2db877){const _0xe1d37a=_0x3b3758;if(!this['_started']||!_0x2db877)return;const {env:_0x5b1423,type:_0x2b86a7,key:_0x3b1f4f,clock:_0xa4350b,origin:_0x4a36d4,action:_0x58647c,newValue:_0xb72e6,oldValue:_0x5c3816}=_0x2db877;if(_0x5b1423==null||_0x2b86a7==null||_0x3b1f4f==null)return;if(typeof _0x5b1423===_0xe1d37a(0x1d2)&&_0x5b1423[_0xe1d37a(0x579)]('~'))return;if(typeof _0x2b86a7===_0xe1d37a(0x1d2)&&_0x2b86a7['startsWith']('~'))return;this[_0xe1d37a(0x6c6)][_0xe1d37a(0x360)](this['_dedupeKey'](_0x5b1423,_0x2b86a7,_0x3b1f4f,_0xa4350b));if(!this[_0xe1d37a(0x690)](_0x5b1423,_0x2b86a7,_0x3b1f4f,_0xa4350b))return;const _0x2b2c02=_0x58647c===_0x1f21ab[_0xe1d37a(0x1c2)]?'remove':_0xe1d37a(0x25f);this[_0xe1d37a(0x663)](_0xe1d37a(0x6af),{'env':_0x5b1423,'type':_0x2b86a7,'key':_0x3b1f4f,'op':_0x2b2c02,'clock':_0xa4350b,'origin':_0x4a36d4,'value':_0x2b2c02===_0xe1d37a(0x417)?null:_0xb72e6,'prevValue':_0x5c3816});}[_0x3b3758(0x748)](_0x1850ea){const _0x26a118=_0x3b3758;if(!this[_0x26a118(0x276)])return;if(!_0x1850ea||typeof _0x1850ea[_0x26a118(0x787)]!==_0x26a118(0x1d2)||typeof _0x1850ea[_0x26a118(0x4fa)]!==_0x26a118(0x1d2))return;const {env:_0x4a9497,type:_0x50f936}=_0x1850ea;if(_0x4a9497[_0x26a118(0x579)]('~')||_0x50f936[_0x26a118(0x579)]('~'))return;this[_0x26a118(0x513)][_0x26a118(0x259)](_0x4a9497+'\x00'+_0x50f936,{'env':_0x4a9497,'type':_0x50f936}),this[_0x26a118(0x755)]();}[_0x3b3758(0x755)](){const _0x51e693=_0x3b3758;if(this[_0x51e693(0x640)])return;const _0x306abe=()=>{const _0x33b2a6=_0x51e693;this[_0x33b2a6(0x640)]=null,this[_0x33b2a6(0x1eb)]()['catch'](()=>{});};this['_flushTimer']=setTimeout(_0x306abe,_0x2ea3ff(this[_0x51e693(0x1d6)]));}async[_0x3b3758(0x1eb)](){const _0x590978=_0x3b3758;if(this[_0x590978(0x78b)]){this[_0x590978(0x755)]();return;}this[_0x590978(0x78b)]=!![];try{const _0x54ed95=[...this['_pending']['values']()];this[_0x590978(0x513)][_0x590978(0x43c)]();let _0x4cfe98=![];for(const {env:_0x597a83,type:_0x530fbc}of _0x54ed95){try{const _0x4e60=await this['_drainOne'](_0x597a83,_0x530fbc);if(_0x4e60)_0x4cfe98=!![];}catch{this['_pending']['set'](_0x597a83+'\x00'+_0x530fbc,{'env':_0x597a83,'type':_0x530fbc}),_0x4cfe98=!![];}}if(_0x4cfe98||this['_pending'][_0x590978(0x7d1)]>0x0)this[_0x590978(0x755)]();}finally{this[_0x590978(0x78b)]=![];}}async[_0x3b3758(0x8ab)](_0x3df72f,_0x1dfd57){const _0x3b857f=_0x3b3758,_0x9dbcd3=await this['okdb'][_0x3b857f(0x377)](_0x3df72f),_0xd0b5ab=_0x3df72f+'\x00'+_0x1dfd57;!this[_0x3b857f(0x681)]['has'](_0xd0b5ab)&&(!this[_0x3b857f(0x4ff)][_0x3b857f(0x2ad)](_0x3df72f)&&(_0x9dbcd3[_0x3b857f(0x4a3)](),this[_0x3b857f(0x4ff)][_0x3b857f(0x259)](_0x3df72f,_0x9dbcd3[_0x3b857f(0x3cb)]()||0x0)),this['_cursors'][_0x3b857f(0x259)](_0xd0b5ab,this[_0x3b857f(0x4ff)][_0x3b857f(0x2fa)](_0x3df72f)));const _0xf1451c=this[_0x3b857f(0x681)][_0x3b857f(0x2fa)](_0xd0b5ab),_0x34cff5=_0x9dbcd3[_0x3b857f(0x3cb)](_0x1dfd57)||0x0;if(_0x34cff5<=_0xf1451c)return![];const _0x3ac593=_0xf1451c+this[_0x3b857f(0x666)],_0x59d0aa=Math[_0x3b857f(0x279)](_0x34cff5,_0x3ac593),_0x4c7a9d=_0x356936[_0x3b857f(0x487)]?_0x356936['now']():0x0,_0x2330bc=Array[_0x3b857f(0x215)](_0x9dbcd3[_0x3b857f(0x19b)](_0x1dfd57,_0xf1451c+0x1,_0x59d0aa));let _0x4838b9=_0xf1451c;for(const _0x410497 of _0x2330bc){const {clock:_0x5caade,key:_0x48b4a0,action:_0x36659b,origin:_0x366a5c}=_0x410497;if(_0x5caade>_0x4838b9)_0x4838b9=_0x5caade;if(_0x48b4a0==null)continue;if(this['_pendingLocal'][_0x3b857f(0x2ad)](this[_0x3b857f(0x6dd)](_0x3df72f,_0x1dfd57,_0x48b4a0,_0x5caade)))continue;if(!this[_0x3b857f(0x690)](_0x3df72f,_0x1dfd57,_0x48b4a0,_0x5caade))continue;let _0x15148a,_0xdf2037;if(_0x36659b===_0x1f21ab[_0x3b857f(0x1c2)])_0x15148a=_0x3b857f(0x417),_0xdf2037=null;else{const _0x10af6a=_0x9dbcd3[_0x3b857f(0x2fa)](_0x1dfd57,_0x48b4a0);_0x10af6a==null?(_0x15148a=_0x3b857f(0x417),_0xdf2037=null):(_0x15148a=_0x3b857f(0x25f),_0xdf2037=_0x10af6a);}this[_0x3b857f(0x663)](_0x3b857f(0x6af),{'env':_0x3df72f,'type':_0x1dfd57,'key':_0x48b4a0,'op':_0x15148a,'clock':_0x5caade,'origin':_0x366a5c,'value':_0xdf2037});}if(_0x356936['enabled'])_0x356936[_0x3b857f(0x25a)](_0x3b857f(0x77e)+_0x3df72f+':'+_0x1dfd57,_0x356936[_0x3b857f(0x4ec)]()-_0x4c7a9d,'n='+_0x2330bc[_0x3b857f(0x6ad)]);return this['_cursors'][_0x3b857f(0x259)](_0xd0b5ab,Math['max'](_0x4838b9,_0x59d0aa)),_0x9dbcd3['getClock'](_0x1dfd57)>_0x59d0aa;}[_0x3b3758(0x2c4)](){const _0x12e8b2=_0x3b3758;return{'started':this[_0x12e8b2(0x276)],'quantum':this['_quantum'],'flushDebounce':this[_0x12e8b2(0x1d6)],'cursors':Object['fromEntries']([...this['_cursors'][_0x12e8b2(0x87f)]()][_0x12e8b2(0x595)](([_0x143db4,_0x4096a1])=>[_0x143db4[_0x12e8b2(0x813)]('\x00',':'),_0x4096a1])),'pending':this[_0x12e8b2(0x513)][_0x12e8b2(0x7d1)],'seen':this[_0x12e8b2(0x1e5)][_0x12e8b2(0x7d1)]};}}return _0x515597[_0x3b3758(0x275)]=_0x479157,okdbChangefeed={'OKDBChangefeed':_0x515597},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x1e178b=_0x1a2e0d;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x521294=require$$1$1,_0x14cedb=require$$1,{EVENTS:_0x27a123}=requireOkdbEnums(),_0x2d873b=require$$0,{slotKey:_0x168706}=requireOkdbProcessRegistry(),_0x217899=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x46b2bf=0xfa0,_0x2e5009=0x5,_0x459ef3=0x2710,_0x30bf99=0xbb8,_0x96a7d8=0x7d0,_0x415f41=_0x1e178b(0x44a),_0x190cde=_0x1e178b(0x75d),_0x81b876=_0x1e178b(0x689),_0x406c45='stats',_0x4e7fd1=[_0x27a123[_0x1e178b(0x687)],_0x27a123[_0x1e178b(0x52b)],_0x27a123['FTS_DROP'],_0x27a123[_0x1e178b(0x3e4)],_0x27a123['INDEX_PROGRESS'],_0x27a123[_0x1e178b(0x5d7)],_0x27a123['INDEX_RESET'],_0x27a123[_0x1e178b(0x770)],_0x1e178b(0x1b2),_0x1e178b(0x574),_0x1e178b(0x4b2),_0x1e178b(0x332),_0x1e178b(0x6c4),_0x1e178b(0x504)],_0x1990a1=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x5c4ab6=0x64;function _0x43b45c(_0x12a2da){const _0x27681e=_0x1e178b;if(!_0x12a2da)return'null';const _0x117f73=(_0x12a2da[_0x27681e(0x78a)]||[])[_0x27681e(0x595)](_0x593da8=>[_0x593da8['env'],_0x593da8['id'],_0x593da8['mode'],_0x593da8[_0x27681e(0x694)],!!_0x593da8[_0x27681e(0x84a)],!!_0x593da8[_0x27681e(0x614)],!!_0x593da8[_0x27681e(0x1ae)],_0x593da8[_0x27681e(0x7c5)]?.['pid']??null,_0x593da8[_0x27681e(0x6cd)]?String(_0x593da8[_0x27681e(0x6cd)]?.[_0x27681e(0x81d)]??_0x593da8['error']):null]);return JSON[_0x27681e(0x2d1)]([!!_0x12a2da[_0x27681e(0x1da)],_0x117f73]);}function _0x390e01({workers:_0x21e650,makeOkdb:_0x5e6398,port:_0x6a93d6,primaryOkdb:_0x1fa5b6,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x516b44=_0x1e178b;if(_0x521294[_0x516b44(0x46e)])return childEntry&&_0x521294[_0x516b44(0x51f)]({'exec':_0x14cedb[_0x516b44(0x1c9)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x110fc3=_0x516b44,_0x11ca3a=[];for(let _0x3f26a5=0x0;_0x3f26a5<process[_0x110fc3(0x1cb)]['length'];_0x3f26a5++){const _0x37fd3a=process[_0x110fc3(0x1cb)][_0x3f26a5];if(_0x37fd3a[_0x110fc3(0x579)](_0x110fc3(0x49c))||_0x37fd3a[_0x110fc3(0x579)](_0x110fc3(0x5cf))||_0x37fd3a[_0x110fc3(0x579)](_0x110fc3(0x728)))continue;if(_0x37fd3a==='-e'||_0x37fd3a===_0x110fc3(0x60d)||_0x37fd3a==='-p'||_0x37fd3a===_0x110fc3(0x76b)){_0x3f26a5++;continue;}_0x11ca3a['push'](_0x37fd3a);}return _0x11ca3a;})())}),_0x27edab({'workers':_0x21e650,'port':_0x6a93d6,'primaryOkdb':_0x1fa5b6,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x6a93d6});return _0x51f2a6({'makeOkdb':_0x5e6398,'port':_0x6a93d6});}function _0x27edab({workers:_0x3c0b1c,port:_0x412c8f,primaryOkdb:_0x5e542b,workerEnv:_0x56268d,workerRole:_0x2594dd,listenAddr:_0x4703c5}){const _0x4966fc=_0x1e178b,_0x2b008d=new Map(),_0x2f7ba1=new Map();let _0xf0849c=![];const _0x297fe7=_0xba481a=>_0xba481a?.['__okdbSlot'],_0x47917a=_0x23eccb=>{const _0xb301bd=_0x4c4a,_0x1b2de2=_0x521294['fork']({...process.env,..._0x56268d||{},'OKDB_CLUSTER_SLOT':String(_0x23eccb)});return _0x1b2de2[_0xb301bd(0x6d7)]=_0x23eccb,_0x2b008d[_0xb301bd(0x259)](_0x1b2de2['process'][_0xb301bd(0x5c3)],{'worker':_0x1b2de2,'startedAt':Date[_0xb301bd(0x4ec)](),'slot':_0x23eccb}),_0x1b2de2['on'](_0xb301bd(0x6cd),_0x55f9df=>{const _0x2e1c5a=_0xb301bd;console[_0x2e1c5a(0x689)](_0x2e1c5a(0x761)+_0x1b2de2['process'][_0x2e1c5a(0x5c3)]+_0x2e1c5a(0x433)+(_0x55f9df?.[_0x2e1c5a(0x81d)]??_0x55f9df));}),_0x1b2de2['on'](_0xb301bd(0x23b),()=>_0x2b9326()),_0x1b2de2;},_0x163361=_0x27b6e9=>{const _0x455d9b=_0x4c4a;for(const {worker:_0x586e70}of _0x2b008d[_0x455d9b(0x722)]()){if(_0x586e70[_0x455d9b(0x71b)]()||!_0x586e70[_0x455d9b(0x69f)]())continue;try{_0x586e70['send'](_0x27b6e9);}catch{}}};_0x5e542b?.['_activateProcesses']?.({'kind':_0x4966fc(0x3ae),'listenAddr':_0x4703c5})[_0x4966fc(0x39e)](()=>{}),_0x5e542b?.[_0x4966fc(0x65b)]?.['setOwnMeta']?.({'workersConfigured':_0x3c0b1c});const _0x4ada80={'engines':!![],'processors':!![],'compaction':!![],..._0x2594dd,'http':!![]},_0x2b9326=()=>{const _0x1f882c=_0x4966fc,_0x984c19=_0x5e542b?.[_0x1f882c(0x65b)];if(!_0x984c19||!_0x984c19['_isWriter'])return;const _0x591209=_0x984c19[_0x1f882c(0x712)];for(const {worker:_0x25ea4c,startedAt:_0x5b341b,slot:_0xd3b618,stats:_0x490d94,processing:_0x2403f9}of _0x2b008d[_0x1f882c(0x722)]()){if(_0x25ea4c[_0x1f882c(0x71b)]())continue;const _0x3e95df=_0x984c19[_0x1f882c(0x587)]?.()&&_0x984c19[_0x1f882c(0x3f7)](_0x1f882c(0x7e8),_0x5490ab(_0xd3b618))?.['decommission']===!![];_0x984c19[_0x1f882c(0x52f)]({'pid':_0x25ea4c['process'][_0x1f882c(0x5c3)],'startedAt':_0x5b341b,'kind':_0x1f882c(0x3d4),'supervisorKey':_0x591209,'slot':_0xd3b618,'slotKey':_0x5490ab(_0xd3b618),'role':_0x4ada80,'listenAddr':_0x4703c5,'lifecycle':_0x3e95df?_0x1f882c(0x3bd):_0x1f882c(0x6e8),'processing':_0x2403f9??null,'stats':_0x490d94??null})[_0x1f882c(0x39e)](()=>{});}},_0x5490ab=_0x3622cf=>_0x168706(_0x4966fc(0x296)+_0x412c8f,_0x3622cf),_0x4dc520=_0x1494ac=>{const _0x3b2865=_0x4966fc,_0x113d1e=_0x5e542b?.[_0x3b2865(0x65b)];if(!_0x113d1e?.[_0x3b2865(0x587)]?.())return![];return _0x113d1e[_0x3b2865(0x3f7)](_0x3b2865(0x7e8),_0x5490ab(_0x1494ac))?.[_0x3b2865(0x846)]===!![];};for(let _0x398291=0x0;_0x398291<_0x3c0b1c;_0x398291++){const _0x31a17b=_0x4dc520(_0x398291);_0x2f7ba1[_0x4966fc(0x259)](_0x398291,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x31a17b,'respawnTimer':null}),_0x31a17b?console[_0x4966fc(0x689)](_0x4966fc(0x6da)+_0x398291+_0x4966fc(0x7e4)):_0x47917a(_0x398291);}const _0x10d8e8=()=>{const _0x9dae43=_0x4966fc,_0x34e153=_0x5e542b?.['processes'];if(!_0x34e153?.[_0x9dae43(0x89b)]||!_0x34e153[_0x9dae43(0x587)]?.())return;for(const [_0x812a23,_0xee5f7f]of _0x2f7ba1[_0x9dae43(0x87f)]()){const _0x5ac454=_0x34e153[_0x9dae43(0x3f7)](_0x9dae43(0x7e8),_0x5490ab(_0x812a23)),_0x2ba92e=_0x5ac454?.[_0x9dae43(0x846)]===!![],_0x4de0d6=_0x5ac454?.[_0x9dae43(0x486)]===!![];if(_0x2ba92e&&!_0xee5f7f[_0x9dae43(0x89a)]){_0xee5f7f[_0x9dae43(0x89a)]=!![];_0xee5f7f['respawnTimer']&&(clearTimeout(_0xee5f7f['respawnTimer']),_0xee5f7f[_0x9dae43(0x349)]=null);for(const {worker:_0x392f6d}of _0x2b008d['values']()){if(_0x297fe7(_0x392f6d)!==_0x812a23||_0x392f6d['isDead']())continue;try{if(_0x4de0d6)_0x392f6d[_0x9dae43(0x864)]['kill'](_0x9dae43(0x675));else _0x392f6d['isConnected']()&&_0x392f6d['disconnect']();}catch{}}console[_0x9dae43(0x689)](_0x9dae43(0x80c)+(_0x4de0d6?_0x9dae43(0x819):_0x9dae43(0x472))+_0x9dae43(0x7b6)+_0x812a23+_0x9dae43(0x63b));}else{if(!_0x2ba92e&&_0xee5f7f[_0x9dae43(0x89a)]&&_0x5ac454){_0xee5f7f[_0x9dae43(0x89a)]=![],_0xee5f7f[_0x9dae43(0x31d)]=[],_0xee5f7f[_0x9dae43(0x7e7)]=0x0;const _0x39aebc=[..._0x2b008d[_0x9dae43(0x722)]()][_0x9dae43(0x721)](({worker:_0x396e57})=>_0x297fe7(_0x396e57)===_0x812a23&&!_0x396e57[_0x9dae43(0x71b)]());!_0x39aebc&&!_0xf0849c&&(_0x47917a(_0x812a23),console[_0x9dae43(0x689)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x812a23));}}}},_0x3e910a=()=>{try{_0x10d8e8();}catch{}};_0x5e542b?.['events']?.['on']?.(_0x27a123[_0x4966fc(0x3dc)],_0x3e910a);const _0x4b63d7=[];if(_0x5e542b?.['events']?.['on'])for(const _0x5a2c79 of _0x4e7fd1){const _0x18abfa=_0x2c5aa5=>{_0x163361({[_0x415f41]:_0x190cde,'event':_0x5a2c79,'data':_0x2c5aa5??{}});};_0x5e542b[_0x4966fc(0x74a)]['on'](_0x5a2c79,_0x18abfa),_0x4b63d7['push']({'event':_0x5a2c79,'handler':_0x18abfa});}const _0x301380=setInterval(()=>{_0x10d8e8(),_0x2b9326();},_0x1990a1);_0x301380[_0x4966fc(0x895)]?.();const _0x99829d=(_0x327473,_0x55e839)=>{const _0x5cb841=_0x4966fc;if(!_0x55e839||typeof _0x55e839!=='object'||_0x55e839[_0x415f41]!==_0x81b876)return;if(!_0x5e542b?.[_0x5cb841(0x689)]?.[_0x5cb841(0x258)])return;const _0x413efb=_0x55e839[_0x5cb841(0x6bb)]||{};_0x5e542b['log'][_0x5cb841(0x258)]({..._0x413efb,'msg':'[w'+_0x55e839[_0x5cb841(0x7e8)]+']\x20'+(_0x413efb[_0x5cb841(0x372)]??''),'meta':{..._0x413efb[_0x5cb841(0x74c)]||{},'worker':_0x55e839[_0x5cb841(0x7e8)],'workerPid':_0x55e839[_0x5cb841(0x5c3)]}});};_0x521294['on'](_0x4966fc(0x81d),_0x99829d);const _0x3056f5=(_0x5a8c7c,_0x35f36d)=>{const _0x41434d=_0x4966fc;if(!_0x35f36d||typeof _0x35f36d!==_0x41434d(0x601)||_0x35f36d[_0x415f41]!==_0x406c45)return;const _0xeb21f=_0x2b008d[_0x41434d(0x2fa)](_0x5a8c7c['process'][_0x41434d(0x5c3)]);if(_0xeb21f){_0xeb21f[_0x41434d(0x847)]={..._0x35f36d[_0x41434d(0x847)],'at':Date['now']()};if(_0x35f36d[_0x41434d(0x50e)]!==undefined){const _0x3addaa=_0x43b45c(_0x35f36d[_0x41434d(0x50e)]);_0x3addaa!==_0xeb21f['processingSig']&&(_0xeb21f[_0x41434d(0x25c)]=_0x3addaa,_0x5e26b6()),_0xeb21f['processing']=_0x35f36d[_0x41434d(0x50e)];}}};let _0x2ce48b=null;const _0x5e26b6=()=>{if(_0x2ce48b||_0xf0849c)return;_0x2ce48b=setTimeout(()=>{_0x2ce48b=null;if(!_0xf0849c)_0x2b9326();},_0x5c4ab6),_0x2ce48b['unref']?.();};_0x521294['on'](_0x4966fc(0x81d),_0x3056f5),_0x521294['on'](_0x4966fc(0x468),(_0x240635,_0x7b402d,_0x15d77d)=>{const _0x43df4f=_0x4966fc,_0x4471ef=_0x240635[_0x43df4f(0x864)][_0x43df4f(0x5c3)],_0x1b750a=_0x297fe7(_0x240635),_0x80ee9c=_0x2b008d[_0x43df4f(0x2fa)](_0x4471ef);if(_0x80ee9c&&_0x5e542b?.[_0x43df4f(0x65b)])_0x5e542b['processes']['removeNode'](_0x4471ef+':'+_0x80ee9c[_0x43df4f(0x76f)])[_0x43df4f(0x39e)](()=>{});_0x2b008d['delete'](_0x4471ef),console[_0x43df4f(0x689)](_0x43df4f(0x761)+_0x4471ef+_0x43df4f(0x405)+(_0x1b750a??'?')+_0x43df4f(0x44d)+(_0x43df4f(0x5f5)+_0x7b402d+_0x43df4f(0x2f1)+(_0x15d77d??_0x43df4f(0x7ce))+_0x43df4f(0x59c)+_0x2b008d[_0x43df4f(0x7d1)]+'\x20worker(s)\x20remaining')),_0x2b9326();if(_0xf0849c||_0x1b750a==null)return;const _0x42cccd=_0x2f7ba1[_0x43df4f(0x2fa)](_0x1b750a);if(!_0x42cccd||_0x42cccd[_0x43df4f(0x89a)])return;const _0x308997=Date[_0x43df4f(0x4ec)]();_0x42cccd[_0x43df4f(0x31d)][_0x43df4f(0x557)](_0x308997),_0x42cccd[_0x43df4f(0x31d)]=_0x42cccd[_0x43df4f(0x31d)]['filter'](_0x187a90=>_0x308997-_0x187a90<=_0x459ef3);if(_0x42cccd['deaths'][_0x43df4f(0x6ad)]>=_0x2e5009){_0x42cccd[_0x43df4f(0x89a)]=!![],console['error'](_0x43df4f(0x532)+_0x1b750a+_0x43df4f(0x326)+_0x42cccd[_0x43df4f(0x31d)]['length']+_0x43df4f(0x193)+(_0x459ef3+_0x43df4f(0x6ae)+_0x2b008d['size']+_0x43df4f(0x5d6)));return;}_0x42cccd[_0x43df4f(0x7e7)]++;const _0x1a09d8=Math['min'](_0x46b2bf,_0x217899*0x2**(_0x42cccd['consecutiveFailures']-0x1));console['log']('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x1b750a+_0x43df4f(0x1c7)+_0x1a09d8+_0x43df4f(0x2d0)+_0x42cccd[_0x43df4f(0x7e7)]+')'),_0x42cccd[_0x43df4f(0x349)]=setTimeout(()=>{const _0x20bea4=_0x43df4f;_0x42cccd[_0x20bea4(0x349)]=null;if(_0xf0849c||_0x42cccd[_0x20bea4(0x89a)])return;const _0x5698ba=_0x47917a(_0x1b750a);_0x5698ba[_0x20bea4(0x898)](_0x20bea4(0x697),()=>{const _0x226a78=_0x20bea4;if(_0x2f7ba1[_0x226a78(0x2fa)](_0x1b750a)===_0x42cccd)_0x42cccd[_0x226a78(0x7e7)]=0x0;});},_0x1a09d8),_0x42cccd['respawnTimer'][_0x43df4f(0x895)]?.();});const _0x24bb53=[..._0x2b008d[_0x4966fc(0x818)]()];console[_0x4966fc(0x689)](_0x4966fc(0x432)+process[_0x4966fc(0x5c3)]+_0x4966fc(0x33b)+_0x3c0b1c+_0x4966fc(0x7ef)+_0x412c8f+':\x20'+('['+_0x24bb53['join'](',\x20')+']'));const _0x309282={'_isClusterController':!![],'port':_0x412c8f,'primaryOkdb':_0x5e542b??null,'status'(){const _0x1d7243=_0x4966fc;return{'clustered':!![],'primaryPid':process[_0x1d7243(0x5c3)],'port':_0x412c8f,'primaryRole':_0x5e542b?.[_0x1d7243(0x44e)]??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x2b008d[_0x1d7243(0x722)]()][_0x1d7243(0x595)](({worker:_0x33dc59})=>({'pid':_0x33dc59[_0x1d7243(0x864)]['pid'],'id':_0x33dc59['id'],'dead':_0x33dc59['isDead']()}))};},async 'close'(){const _0x5400d3=_0x4966fc;_0xf0849c=!![];for(const _0x2d2b1a of _0x2f7ba1[_0x5400d3(0x722)]()){_0x2d2b1a[_0x5400d3(0x89a)]=!![],_0x2d2b1a[_0x5400d3(0x349)]&&(clearTimeout(_0x2d2b1a[_0x5400d3(0x349)]),_0x2d2b1a['respawnTimer']=null);}clearInterval(_0x301380);_0x2ce48b&&(clearTimeout(_0x2ce48b),_0x2ce48b=null);_0x521294[_0x5400d3(0x804)]('message',_0x99829d),_0x521294[_0x5400d3(0x804)](_0x5400d3(0x81d),_0x3056f5),_0x5e542b?.[_0x5400d3(0x74a)]?.[_0x5400d3(0x804)]?.(_0x27a123[_0x5400d3(0x3dc)],_0x3e910a);if(_0x5e542b?.['events']?.[_0x5400d3(0x804)])for(const {event:_0x47bc04,handler:_0x2b6708}of _0x4b63d7){try{_0x5e542b[_0x5400d3(0x74a)][_0x5400d3(0x804)](_0x47bc04,_0x2b6708);}catch{}}_0x4b63d7[_0x5400d3(0x6ad)]=0x0;const _0x27c900=[..._0x2b008d[_0x5400d3(0x722)]()][_0x5400d3(0x595)](({worker:_0x10ebbd})=>_0x10ebbd);if(_0x27c900[_0x5400d3(0x6ad)]===0x0)return;await Promise['all'](_0x27c900['map'](_0x4f6fb6=>new Promise(_0x20b758=>{const _0x192b82=_0x5400d3;if(_0x4f6fb6[_0x192b82(0x71b)]()){_0x20b758();return;}let _0x2b15d1=![];const _0x30f279=()=>{if(_0x2b15d1)return;_0x2b15d1=!![];if(_0x3d88e3)clearTimeout(_0x3d88e3);_0x20b758();};_0x4f6fb6['once'](_0x192b82(0x468),_0x30f279);const _0x3d88e3=setTimeout(()=>{const _0x98e30d=_0x192b82;try{_0x4f6fb6[_0x98e30d(0x864)][_0x98e30d(0x486)]();}catch{}},_0x30bf99+0x1f4);_0x3d88e3[_0x192b82(0x895)]?.();try{_0x4f6fb6[_0x192b82(0x1c0)]();}catch{try{_0x4f6fb6['process']['kill']();}catch{}}})));}};return _0x309282;}async function _0x51f2a6({makeOkdb:_0x54017d,port:_0x26bb2b}){const _0x38b182=_0x1e178b,_0x248dc2=await _0x54017d();return _0xa92dea(_0x248dc2),_0x248dc2[_0x38b182(0x5fb)][_0x38b182(0x7a4)](_0x26bb2b);}function _0xa92dea(_0x1d44ea){const _0x3c94ac=_0x1e178b;if(!_0x1d44ea||_0x1d44ea[_0x3c94ac(0x628)])return;_0x1d44ea[_0x3c94ac(0x628)]=!![];try{const {OKDBChangefeed:_0x20cb29}=requireOkdbChangefeed(),_0x3443e8=_0x1d44ea['_adminRelay'];if(_0x3443e8&&typeof _0x3443e8[_0x3c94ac(0x42f)]==='function'){const _0x130a20=new _0x20cb29(_0x1d44ea);_0x130a20[_0x3c94ac(0x398)](),_0x3443e8['attachFeed'](_0x130a20),_0x1d44ea[_0x3c94ac(0x4dd)]=_0x130a20;}}catch(_0x2ea985){_0x1d44ea[_0x3c94ac(0x689)]?.[_0x3c94ac(0x44f)]?.(_0x3c94ac(0x2bc)+(_0x2ea985?.[_0x3c94ac(0x81d)]??_0x2ea985),{'feature':'cluster'});}const _0x10ea32=_0x575aee=>{const _0x211aa3=_0x3c94ac;if(!_0x575aee||typeof _0x575aee!==_0x211aa3(0x601)||_0x575aee[_0x415f41]==null)return;if(_0x575aee[_0x415f41]===_0x190cde)try{_0x1d44ea[_0x211aa3(0x240)]?.[_0x211aa3(0x3bf)]?.(_0x575aee['event'],_0x575aee['data']);}catch{}};process['on']('message',_0x10ea32),_0x1d44ea['_clusterOnMessage']=_0x10ea32;{let _0x33dfe3=process[_0x3c94ac(0x40f)](),_0x50ad5d=Date[_0x3c94ac(0x4ec)]();const _0x1283bc=()=>{const _0x40cfbb=_0x3c94ac;if(typeof process[_0x40cfbb(0x31f)]!==_0x40cfbb(0x7ca)||!process[_0x40cfbb(0x775)])return;const _0x5cb0c=Date[_0x40cfbb(0x4ec)](),_0x20c8f6=process[_0x40cfbb(0x40f)](),_0x141f13=(_0x5cb0c-_0x50ad5d)*0x3e8,_0xddcd4a=_0x20c8f6[_0x40cfbb(0x402)]-_0x33dfe3[_0x40cfbb(0x402)]+(_0x20c8f6[_0x40cfbb(0x7f0)]-_0x33dfe3[_0x40cfbb(0x7f0)]),_0x39a695=_0x141f13>0x0?Math['min'](0x64,Math[_0x40cfbb(0x578)](_0xddcd4a/(_0x141f13*(_0x2d873b[_0x40cfbb(0x662)]()[_0x40cfbb(0x6ad)]||0x1))*0x64)):0x0;_0x33dfe3=_0x20c8f6,_0x50ad5d=_0x5cb0c;const _0x53fe1f=process[_0x40cfbb(0x8bb)]();let _0x5cb78a=null;try{_0x5cb78a=_0x1d44ea['role']?.['processors']?_0x1d44ea[_0x40cfbb(0x65b)]?.[_0x40cfbb(0x44c)]?.()??null:null;}catch{}try{process[_0x40cfbb(0x31f)]({[_0x415f41]:_0x406c45,'stats':{'rss':_0x53fe1f[_0x40cfbb(0x796)],'heapUsed':_0x53fe1f[_0x40cfbb(0x256)],'heapTotal':_0x53fe1f[_0x40cfbb(0x41d)],'external':_0x53fe1f[_0x40cfbb(0x54d)],'cpuPct':_0x39a695,'cpuWindowMs':Math[_0x40cfbb(0x578)](_0x141f13/0x3e8)||null},'processing':_0x5cb78a});}catch{}},_0x56c19d=Math[_0x3c94ac(0x413)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x433e61=setInterval(_0x1283bc,_0x56c19d);_0x433e61[_0x3c94ac(0x895)]?.(),_0x1283bc();for(const _0x35b66a of[_0x3c94ac(0x332),_0x3c94ac(0x6c4)]){_0x1d44ea[_0x3c94ac(0x74a)]?.['on']?.(_0x35b66a,()=>{try{_0x1283bc();}catch{}});}}let _0x276a9e=![];const _0x402366=async _0x3d652d=>{const _0xefa148=_0x3c94ac;if(_0x276a9e)return;_0x276a9e=!![];const _0x28401b=setTimeout(()=>process[_0xefa148(0x468)](_0x3d652d),_0x30bf99);_0x28401b[_0xefa148(0x895)]?.();try{await _0x1d44ea[_0xefa148(0x6e0)]?.();}catch{}process[_0xefa148(0x468)](_0x3d652d);};process['on']('disconnect',()=>_0x402366(0x0));if(process[_0x3c94ac(0x31f)]&&!process[_0x3c94ac(0x775)])_0x402366(0x0);if(process['platform']!==_0x3c94ac(0x723)){const _0x252a34=setInterval(()=>{const _0x5cf96a=_0x3c94ac;if(process[_0x5cf96a(0x2af)]===0x1)_0x402366(0x0);},_0x96a7d8);_0x252a34['unref']?.(),_0x1d44ea['_clusterOrphanWatch']=_0x252a34;}}return okdbCluster={'runClustered':_0x390e01,'attachWorkerCluster':_0xa92dea},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x5ac7c5=_0x1a2e0d;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x1ee3e5=0x3c;function _0x4d5daf(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x39e952{constructor(){const _0x48da24=_0x4c4a;this['_totalRequests']=0x0,this[_0x48da24(0x635)]=0x0,this[_0x48da24(0x69d)]=0x0,this[_0x48da24(0x8b5)]=0x0,this[_0x48da24(0x244)]=0x0,this[_0x48da24(0x2a8)]=0x0,this[_0x48da24(0x4ae)]=Array[_0x48da24(0x215)]({'length':_0x1ee3e5},_0x4d5daf),this[_0x48da24(0x406)]=0x0,this[_0x48da24(0x4e3)]=Date[_0x48da24(0x4ec)](),this[_0x48da24(0x6c1)]=setInterval(()=>this[_0x48da24(0x265)](),0x3e8);if(this['_timer'][_0x48da24(0x895)])this[_0x48da24(0x6c1)][_0x48da24(0x895)]();}[_0x5ac7c5(0x265)](){const _0x439dff=_0x5ac7c5;this[_0x439dff(0x406)]=(this[_0x439dff(0x406)]+0x1)%_0x1ee3e5,this[_0x439dff(0x4ae)][this[_0x439dff(0x406)]]=_0x4d5daf(),this[_0x439dff(0x4e3)]=Date['now']();}[_0x5ac7c5(0x639)](_0xb46e45,_0x37e551,_0x1c7676){const _0x33b061=_0x5ac7c5,_0x57ee92=/^(POST|PUT|PATCH|DELETE)$/i[_0x33b061(0x3f6)](_0xb46e45),_0x255645=this['_buckets'][this[_0x33b061(0x406)]];this[_0x33b061(0x73f)]++,_0x255645[_0x33b061(0x545)]++,_0x1c7676&&(this[_0x33b061(0x8b5)]++,_0x255645[_0x33b061(0x511)]++),_0x57ee92?(this[_0x33b061(0x69d)]++,this['_totalWriteMs']+=_0x37e551,_0x255645[_0x33b061(0x1b3)]++,_0x255645[_0x33b061(0x412)]+=_0x37e551):(this[_0x33b061(0x635)]++,this[_0x33b061(0x244)]+=_0x37e551,_0x255645[_0x33b061(0x369)]++,_0x255645[_0x33b061(0x759)]+=_0x37e551);}[_0x5ac7c5(0x847)](){const _0x5785c5=_0x5ac7c5;let _0x9a4d91=0x0,_0x464de2=0x0,_0x4401bd=0x0,_0x3c56a2=0x0,_0x45f35c=0x0,_0x3017d=0x0;for(const _0x19bc10 of this['_buckets']){_0x9a4d91+=_0x19bc10[_0x5785c5(0x545)],_0x464de2+=_0x19bc10['reads'],_0x4401bd+=_0x19bc10['writes'],_0x3c56a2+=_0x19bc10[_0x5785c5(0x511)],_0x45f35c+=_0x19bc10[_0x5785c5(0x759)],_0x3017d+=_0x19bc10[_0x5785c5(0x412)];}const _0x3be346=_0x1ee3e5;return{'lifetime':{'requests':this[_0x5785c5(0x73f)],'reads':this[_0x5785c5(0x635)],'writes':this[_0x5785c5(0x69d)],'errors':this['_totalErrors'],'avgReadMs':this[_0x5785c5(0x635)]>0x0?+(this[_0x5785c5(0x244)]/this['_totalReads'])[_0x5785c5(0x39b)](0x2):null,'avgWriteMs':this[_0x5785c5(0x69d)]>0x0?+(this[_0x5785c5(0x2a8)]/this[_0x5785c5(0x69d)])['toFixed'](0x2):null},'window':{'seconds':_0x3be346,'requests':_0x9a4d91,'reads':_0x464de2,'writes':_0x4401bd,'errors':_0x3c56a2,'reqPerSec':+(_0x9a4d91/_0x3be346)[_0x5785c5(0x39b)](0x2),'readPerSec':+(_0x464de2/_0x3be346)[_0x5785c5(0x39b)](0x2),'writePerSec':+(_0x4401bd/_0x3be346)[_0x5785c5(0x39b)](0x2),'avgReadMs':_0x464de2>0x0?+(_0x45f35c/_0x464de2)['toFixed'](0x2):null,'avgWriteMs':_0x4401bd>0x0?+(_0x3017d/_0x4401bd)[_0x5785c5(0x39b)](0x2):null}};}[_0x5ac7c5(0x6e0)](){const _0x2cbdf1=_0x5ac7c5;clearInterval(this[_0x2cbdf1(0x6c1)]);}}return okdbMetrics=_0x39e952,okdbMetrics;}function _0x4c4a(_0x2ba922,_0x5d3727){_0x2ba922=_0x2ba922-0x192;const _0x381275=_0x3812();let _0x4c4a3e=_0x381275[_0x2ba922];return _0x4c4a3e;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x2f2708=_0x1a2e0d;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x5e7441={'data':{'label':_0x2f2708(0x654),'scope':_0x2f2708(0x787),'description':_0x2f2708(0x621),'operations':{'read':{'label':'Read','summary':_0x2f2708(0x814)},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x86d)}}},'schema':{'label':_0x2f2708(0x7c9),'scope':'env','description':_0x2f2708(0x34b),'operations':{'read':{'label':_0x2f2708(0x591),'summary':'List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.'},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x29a)}}},'search':{'label':_0x2f2708(0x6c5),'scope':_0x2f2708(0x787),'description':'Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','operations':{'query':{'label':_0x2f2708(0x612),'summary':'Execute\x20full-text\x20and\x20vector\x20searches.'}}},'queue':{'label':_0x2f2708(0x6e3),'scope':'env','description':'Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','operations':{'read':{'label':_0x2f2708(0x591),'summary':'List\x20jobs,\x20view\x20stats,\x20list\x20buckets.'},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x3c2)},'work':{'label':_0x2f2708(0x3d9),'summary':_0x2f2708(0x49e)}}},'files':{'label':'Files','scope':_0x2f2708(0x787),'description':_0x2f2708(0x5ff),'operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x547)},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x194)}}},'functions':{'label':_0x2f2708(0x2a9),'scope':'env','description':_0x2f2708(0x79a),'operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x270)},'write':{'label':_0x2f2708(0x284),'summary':'Register,\x20update,\x20and\x20delete\x20function\x20definitions.'},'run':{'label':_0x2f2708(0x4f8),'summary':_0x2f2708(0x212)}}},'views':{'label':_0x2f2708(0x7e1),'scope':_0x2f2708(0x787),'description':_0x2f2708(0x1bf),'operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x29e)},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x329)}}},'env':{'label':_0x2f2708(0x4a6),'scope':_0x2f2708(0x787),'description':_0x2f2708(0x879),'operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x5a8)},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x1c1)}}},'auth':{'label':'Auth','scope':_0x2f2708(0x7f0),'description':_0x2f2708(0x771),'operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x605)},'write':{'label':'Write','summary':'Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.'}}},'system':{'label':_0x2f2708(0x2c6),'scope':'system','description':_0x2f2708(0x7c0),'operations':{'read':{'label':_0x2f2708(0x591),'summary':'View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.'},'write':{'label':'Write','summary':_0x2f2708(0x61f)}}},'sync':{'label':_0x2f2708(0x87c),'scope':_0x2f2708(0x7f0),'description':'Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x875)},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x3b0)},'peer':{'label':'Peer','summary':_0x2f2708(0x606),'machineOnly':!![]}}},'protected':{'label':_0x2f2708(0x424),'scope':_0x2f2708(0x302),'description':'Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x66f)},'write':{'label':'Write','summary':'May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.'}}}},_0xde8aed={'schema:read':[_0x2f2708(0x3cf),'data:write',_0x2f2708(0x241)]},_0x3d208a=[_0x2f2708(0x7bc),_0x2f2708(0x6d0),_0x2f2708(0x8ca),'write',_0x2f2708(0x4b4),'peer'];function _0x2a7f95(){const _0x9a24b1=_0x2f2708,_0x4a5147=[];for(const [_0x3492f6,_0x361371]of Object[_0x9a24b1(0x87f)](_0x5e7441)){for(const _0xef0ecd of Object[_0x9a24b1(0x818)](_0x361371[_0x9a24b1(0x5d2)])){_0x4a5147['push'](_0x3492f6+':'+_0xef0ecd);}}return _0x4a5147;}function _0x223cf2(_0x49eb45){return _0x5e7441[_0x49eb45]||null;}function _0x493de3(_0x56499e,_0x548590){return _0x5e7441[_0x56499e]?.['operations'][_0x548590]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x5e7441,'IMPLIED_BY':_0xde8aed,'OP_ORDER':_0x3d208a,'listAllPermissions':_0x2a7f95,'getNamespaceMeta':_0x223cf2,'getOperationMeta':_0x493de3},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x179cc4=_0x1a2e0d;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x62a861}=requireOkdbAuthNamespaces(),_0x5c1390=new Set([_0x179cc4(0x7bc),'query']);function _0x489ae6(_0x47bfbd,_0x482561){const _0x166271=_0x179cc4;if(!Array[_0x166271(0x59b)](_0x47bfbd)||_0x47bfbd['length']===0x0)return![];for(const _0x207559 of _0x47bfbd){if(typeof _0x207559!=='string'||!_0x207559[_0x166271(0x1a1)](':')){if(_0x207559==='*')return!![];continue;}const [_0x3d55eb,_0x1be419]=_0x207559['split'](':'),[_0x1d3c87,_0x226dbe]=_0x482561[_0x166271(0x84e)](':'),_0x4878c5=_0x3d55eb==='*'||_0x3d55eb===_0x1d3c87,_0x13fd03=_0x1be419==='*'||_0x1be419===_0x226dbe;if(_0x4878c5&&_0x13fd03)return!![];}const _0x3e13b3=_0x62a861[_0x482561];if(_0x3e13b3)for(const _0x7f486c of _0x3e13b3){if(_0x489ae6(_0x47bfbd,_0x7f486c))return!![];}return![];}function _0x455afd(_0xe31fe6,_0x1ea87c){const _0x7ebd0=_0x179cc4,_0x480028=new Set();if(Array[_0x7ebd0(0x59b)](_0xe31fe6)){for(const _0x20ebbf of _0xe31fe6)_0x480028[_0x7ebd0(0x4da)](_0x20ebbf);}if(Array['isArray'](_0x1ea87c)){for(const _0xcca6f4 of _0x1ea87c)_0x480028[_0x7ebd0(0x4da)](_0xcca6f4);}return Array['from'](_0x480028);}function _0xfcec19(_0x56acab){const _0x41e03c=_0x179cc4;if(typeof _0x56acab!==_0x41e03c(0x1d2))return![];const [,_0x5678e3]=_0x56acab[_0x41e03c(0x84e)](':');return _0x5c1390[_0x41e03c(0x2ad)](_0x5678e3);}function _0x5f19a7(_0x174b1c){const _0x2ae334=_0x179cc4;return _0xfcec19(_0x174b1c)?_0x2ae334(0x444):'protected:write';}function _0xccf3b0(_0x177e8d,_0x379cff){const _0x50166e=_0x179cc4;return _0x455afd(_0x177e8d[_0x50166e(0x496)]||[],_0x379cff?(_0x177e8d[_0x50166e(0x6fd)]||{})[_0x379cff]||[]:[]);}function _0x43cfa4(_0x293161){const _0x367b53=_0x179cc4,_0x132a4f=[];for(const _0x2c796d of _0x293161[_0x367b53(0x4aa)]()){const _0x2560c7=_0x2c796d[_0x367b53(0x8b3)]?.[_0x367b53(0x6cc)];if(!_0x2560c7)continue;_0x2560c7[_0x367b53(0x773)]&&!_0x2560c7[_0x367b53(0x535)]&&_0x132a4f['push'](_0x2c796d[_0x367b53(0x225)]+'\x20'+_0x2c796d['path']+_0x367b53(0x7c8)+(_0x2c796d['operation']['id']??'?')+')');}if(_0x132a4f[_0x367b53(0x6ad)])throw new Error(_0x367b53(0x58b)+_0x132a4f[_0x367b53(0x1c9)](_0x367b53(0x822)));}return okdbAuthPermissions={'hasPermission':_0x489ae6,'unionPermissions':_0x455afd,'isReadOperation':_0xfcec19,'resolveProtectedGate':_0x5f19a7,'getEffectivePermissions':_0xccf3b0,'assertEveryRouteHasPermission':_0x43cfa4},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x4c1165=require$$0$7,_0x2ca14f=require$$1$2,_0xcaa3e5=require$$2$1;function _0xe5160e(_0x3173f1){const _0x456077=_0x4c4a,_0x2e0989=String(_0x3173f1||'')['replace'](/-/g,'+')[_0x456077(0x813)](/_/g,'/'),_0x3cc769=_0x2e0989+'='['repeat']((0x4-(_0x2e0989[_0x456077(0x6ad)]%0x4||0x4))%0x4);return Buffer[_0x456077(0x215)](_0x3cc769,_0x456077(0x68e));}function _0x53b910(_0x4e961c){const _0x5e9da3=_0x4c4a;if(typeof _0x4e961c!==_0x5e9da3(0x1d2))throw new Error(_0x5e9da3(0x63e));const _0x38d591=_0x4e961c[_0x5e9da3(0x84e)]('.');if(_0x38d591[_0x5e9da3(0x6ad)]!==0x3)throw new Error(_0x5e9da3(0x331));const [_0x422c9a,_0x223cad,_0x250b1d]=_0x38d591,_0x2844ab=JSON['parse'](_0xe5160e(_0x422c9a)[_0x5e9da3(0x4b9)](_0x5e9da3(0x88a))),_0x423d97=JSON[_0x5e9da3(0x7d3)](_0xe5160e(_0x223cad)['toString'](_0x5e9da3(0x88a)));return{'header':_0x2844ab,'payload':_0x423d97,'signature':_0xe5160e(_0x250b1d),'signingInput':Buffer['from'](_0x422c9a+'.'+_0x223cad),'encodedHeader':_0x422c9a,'encodedPayload':_0x223cad};}function _0x435c6e(_0x2c77f8){if(Array['isArray'](_0x2c77f8))return _0x2c77f8;if(_0x2c77f8==null)return[];return[_0x2c77f8];}function _0x38422d(_0x31ebf6){const _0x167070=_0x4c4a,_0x4114bd=String(_0x31ebf6||'')['match'](/.{1,64}/g)||[];return'-----BEGIN\x20CERTIFICATE-----\x0a'+_0x4114bd[_0x167070(0x1c9)]('\x0a')+_0x167070(0x328);}function _0x4e5689(_0x4c102c={}){const _0x530d57=_0x4c4a;if(_0x4c102c[_0x530d57(0x2f3)]?.[0x0])return _0xcaa3e5[_0x530d57(0x758)](_0x38422d(_0x4c102c[_0x530d57(0x2f3)][0x0]));return _0xcaa3e5['createPublicKey']({'key':_0x4c102c,'format':_0x530d57(0x204)});}function _0x33099e(_0x4fc3b7,_0x4ec910,_0x47e2cb,_0x22e628){const _0x446041=_0x4c4a;if(_0x4fc3b7===_0x446041(0x3f0))return _0xcaa3e5[_0x446041(0x700)](_0x446041(0x77b),_0x47e2cb,_0x4ec910,_0x22e628);if(_0x4fc3b7===_0x446041(0x8c9))return _0xcaa3e5[_0x446041(0x700)](_0x446041(0x1ea),_0x47e2cb,{'key':_0x4ec910,'dsaEncoding':_0x446041(0x26f)},_0x22e628);return![];}function _0x115a5c(_0x4ee72f){const _0x36faab=_0x4c4a;if(typeof commonjsGlobal[_0x36faab(0x581)]===_0x36faab(0x7ca))return commonjsGlobal[_0x36faab(0x581)](_0x4ee72f,{'headers':{'accept':_0x36faab(0x82d)}})[_0x36faab(0x4ed)](async _0x1f3526=>{const _0x3fbfb8=_0x36faab;if(!_0x1f3526['ok']){const _0x474c0d=new Error(_0x3fbfb8(0x8b7)+_0x1f3526[_0x3fbfb8(0x2c4)]+'\x20fetching\x20'+_0x4ee72f);_0x474c0d[_0x3fbfb8(0x2c4)]=_0x1f3526[_0x3fbfb8(0x2c4)];throw _0x474c0d;}return _0x1f3526[_0x3fbfb8(0x232)]();});return new Promise((_0x2a44bb,_0x509e3d)=>{const _0x5055ac=_0x36faab,_0xc25ce9=String(_0x4ee72f)['startsWith'](_0x5055ac(0x6a6))?_0x2ca14f:_0x4c1165,_0x1ca203=_0xc25ce9['get'](_0x4ee72f,{'headers':{'accept':_0x5055ac(0x82d)}},_0x122d03=>{const _0x15de8f=_0x5055ac;let _0x446ddb='';_0x122d03[_0x15de8f(0x5ab)]('utf8'),_0x122d03['on']('data',_0x47bb53=>{_0x446ddb+=_0x47bb53;}),_0x122d03['on'](_0x15de8f(0x63d),()=>{const _0x339335=_0x15de8f;if(_0x122d03[_0x339335(0x73b)]<0xc8||_0x122d03[_0x339335(0x73b)]>=0x12c){const _0x341596=new Error(_0x339335(0x8b7)+_0x122d03[_0x339335(0x73b)]+_0x339335(0x3ef)+_0x4ee72f);return _0x341596[_0x339335(0x2c4)]=_0x122d03[_0x339335(0x73b)],_0x509e3d(_0x341596);}try{_0x2a44bb(JSON['parse'](_0x446ddb||'{}'));}catch(_0x27e134){_0x509e3d(_0x27e134);}});});_0x1ca203['on'](_0x5055ac(0x6cd),_0x509e3d),_0x1ca203[_0x5055ac(0x63d)]();});}return okdbJwtUtils={'base64UrlDecode':_0xe5160e,'parseJwt':_0x53b910,'normalizeAudience':_0x435c6e,'normalizePemCertificate':_0x38422d,'jwkToKeyObject':_0x4e5689,'verifyJwtSignature':_0x33099e,'fetchJson':_0x115a5c},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x404acb=_0x1a2e0d;if(hasRequiredOkdbHttp)return okdbHttp[_0x404acb(0x7ac)];hasRequiredOkdbHttp=0x1;const _0x5e3a3d=require$$0$7,{clampTimerDelay:_0x428b58,isNeverDelay:_0x1e985f}=requireOkdbTimers(),{URL:_0x3ad444}=require$$3$1,_0x30fcce=requireOkdbMetrics(),_0x46442c=requireOkdbAuthTokens(),{hasPermission:_0x4cfc49,unionPermissions:_0x2fb0f3,resolveProtectedGate:_0x370c93}=requireOkdbAuthPermissions(),_0x11e6bb={0x190:_0x404acb(0x3a5),0x191:'UNAUTHORIZED',0x193:'FORBIDDEN',0x194:'NOT_FOUND',0x195:_0x404acb(0x4d7),0x198:'REQUEST_TIMEOUT',0x199:'CONFLICT',0x19a:'GONE',0x19b:_0x404acb(0x20e),0x19d:_0x404acb(0x791),0x19f:_0x404acb(0x2f8),0x1a6:_0x404acb(0x4cc),0x1ad:'TOO_MANY_REQUESTS',0x1f4:_0x404acb(0x62b),0x1f5:_0x404acb(0x5ad),0x1f6:_0x404acb(0x855),0x1f7:_0x404acb(0x66a),0x1f8:_0x404acb(0x23d)},_0x460813={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'QUERY_OPERATOR_FORBIDDEN':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'BUCKET_PROJECT_NOT_PERSISTABLE':0x190,'BUCKET_PROJECT_UNKNOWN':0x190,'VIEW_UNKNOWN_REDUCER':0x190,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x554977,timingSafeEqual:_0x43084e,parseBearer:_0x10be7f,randomToken:_0x52e40e,issueToken:_0x21d830,authenticateToken:_0x401c61}=_0x46442c,{base64UrlDecode:_0x3977c7,parseJwt:_0x512421,normalizeAudience:_0xce76c9,normalizePemCertificate:_0x3ba467,jwkToKeyObject:_0x3b1d97,verifyJwtSignature:_0x855de5,fetchJson:_0x1bd512}=requireOkdbJwtUtils();function _0x38b448(_0x55dae2){const _0x1645c9=_0x404acb;return(_0x55dae2||_0x1645c9(0x318))[_0x1645c9(0x2e6)]();}function _0x3be6b6(_0x497fc6){const _0x4b5b00=_0x404acb;if(Array[_0x4b5b00(0x59b)](_0x497fc6))return _0x497fc6[_0x4b5b00(0x24a)](_0x3be6b6);return String(_0x497fc6||'')['split'](',')['map'](_0xd8ee81=>_0xd8ee81[_0x4b5b00(0x48b)]())[_0x4b5b00(0x542)](Boolean);}function _0x5cba3f(..._0x275309){return[...new Set(_0x275309['flatMap'](_0x3be6b6))]['join'](',\x20');}function _0x2c6c51(_0x5d7bf0,_0x4ae4e4){const _0x2fd316=_0x404acb;if(!_0x5d7bf0)return![];if(_0x4ae4e4==='*')return!![];if(_0x4ae4e4 instanceof RegExp)return _0x4ae4e4['test'](_0x5d7bf0);if(typeof _0x4ae4e4===_0x2fd316(0x7ca))return!!_0x4ae4e4(_0x5d7bf0);if(Array['isArray'](_0x4ae4e4))return _0x4ae4e4[_0x2fd316(0x1a1)](_0x5d7bf0);return _0x4ae4e4===_0x5d7bf0;}function _0x137d18(_0x552219={},_0x2283e7={},_0x54051d=null){const _0x3ac33b=_0x404acb;if(!_0x2283e7)return null;const _0x51702a=_0x552219[_0x3ac33b(0x87e)],_0x356fd8=_0x2283e7[_0x3ac33b(0x4f2)]??_0x2283e7[_0x3ac33b(0x87e)]??'*',_0x22caab=_0x356fd8==='*'?'*':_0x2c6c51(_0x51702a,_0x356fd8)?_0x51702a:null;if(!_0x22caab)return null;const _0x47ecd2=_0x552219[_0x3ac33b(0x7bf)],_0x20b486=_0x2283e7[_0x3ac33b(0x2b0)]??_0x2283e7[_0x3ac33b(0x88d)]??[_0x3ac33b(0x52a),_0x3ac33b(0x62c),_0x3ac33b(0x84d),_0x3ac33b(0x2d6),_0x3ac33b(0x5ca)],_0x54b99f=_0x2283e7['methods']??_0x2283e7[_0x3ac33b(0x21d)]??(_0x54051d?[_0x54051d,'OPTIONS']:[_0x3ac33b(0x318),_0x3ac33b(0x80d),_0x3ac33b(0x618)]),_0x5a621a=_0x2283e7[_0x3ac33b(0x58e)]??['mcp-session-id'],_0x464dbe={'access-control-allow-origin':_0x22caab,'access-control-allow-methods':Array['isArray'](_0x54b99f)?_0x54b99f['join'](',\x20'):String(_0x54b99f),'access-control-allow-headers':_0x47ecd2?_0x5cba3f(_0x20b486,_0x47ecd2):Array['isArray'](_0x20b486)?_0x20b486[_0x3ac33b(0x1c9)](',\x20'):String(_0x20b486),'access-control-expose-headers':Array[_0x3ac33b(0x59b)](_0x5a621a)?_0x5a621a[_0x3ac33b(0x1c9)](',\x20'):String(_0x5a621a),'vary':_0x5cba3f(_0x3ac33b(0x484),_0x22caab==='*'?'':_0x3ac33b(0x484),_0x47ecd2?'Access-Control-Request-Headers':'')};if(_0x2283e7[_0x3ac33b(0x5c0)])_0x464dbe['access-control-allow-credentials']=_0x3ac33b(0x7c4);if(Number[_0x3ac33b(0x72e)](_0x2283e7['maxAge']))_0x464dbe[_0x3ac33b(0x2de)]=String(_0x2283e7[_0x3ac33b(0x40c)]);return _0x464dbe;}function _0x5215ab(_0x1d174f){const _0x45e9e5=_0x404acb,_0x5c4436=[],_0x4ed78a={};let _0x580d21=![];_0x1d174f[_0x45e9e5(0x2e8)]('/*')&&(_0x580d21=!![],_0x1d174f=_0x1d174f['slice'](0x0,-0x2),_0x5c4436[_0x45e9e5(0x557)]('*'));let _0x129d66=_0x1d174f['replace'](/\/+$/,'')[_0x45e9e5(0x813)](/\[([^\]]*)\]/g,(_0x143fea,_0x215d60)=>{const _0x2b4f10=_0x215d60['replace'](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x3280fd,_0x480520,_0x270587)=>{const _0x2625fa=_0x4c4a;_0x5c4436[_0x2625fa(0x557)](_0x480520);if(_0x270587!==undefined)_0x4ed78a[_0x480520]=_0x270587;return'/([^/]+)';});return'(?:'+_0x2b4f10+')?';})['replace'](/\/:(\w+)/g,(_0x585acf,_0x330f00)=>{const _0x2f812e=_0x45e9e5;return _0x5c4436['push'](_0x330f00),_0x2f812e(0x84f);});if(_0x129d66==='')_0x129d66='/';return{'keys':_0x5c4436,'defaults':_0x4ed78a,'wildcard':_0x580d21,'regex':new RegExp(_0x580d21?'^'+_0x129d66+_0x45e9e5(0x75b):'^'+_0x129d66+'$')};}function _0x27940d(_0x220271){const _0x38a807=_0x404acb;if(_0x220271==null)return _0x220271;return JSON[_0x38a807(0x7d3)](JSON[_0x38a807(0x2d1)](_0x220271));}function _0x5c4e38(_0x530a46){const _0xb9afb7=_0x404acb;if(_0x530a46==null)return null;if(_0x530a46[_0xb9afb7(0x4fa)]==='object'&&_0x530a46['properties']&&!Array[_0xb9afb7(0x59b)](_0x530a46['properties']))return _0x27940d(_0x530a46);const _0x514779=Object['values'](_0x530a46),_0x34942e=_0x514779[_0xb9afb7(0x6ad)]>0x0&&_0x514779[_0xb9afb7(0x573)](_0x5b6cbf=>{const _0x39ce35=_0xb9afb7;return _0x5b6cbf&&typeof _0x5b6cbf===_0x39ce35(0x601)&&!Array['isArray'](_0x5b6cbf)&&(Object['prototype'][_0x39ce35(0x3e0)]['call'](_0x5b6cbf,_0x39ce35(0x4fa))||Object[_0x39ce35(0x404)][_0x39ce35(0x3e0)][_0x39ce35(0x8c3)](_0x5b6cbf,'properties')||Object[_0x39ce35(0x404)][_0x39ce35(0x3e0)][_0x39ce35(0x8c3)](_0x5b6cbf,_0x39ce35(0x7ab))||Object['prototype'][_0x39ce35(0x3e0)][_0x39ce35(0x8c3)](_0x5b6cbf,_0x39ce35(0x7eb)));});if(_0x34942e)return{'type':'object','properties':_0x27940d(_0x530a46),'required':[],'additionalProperties':![]};const _0x47a393={},_0x3a8243=[];for(const [_0xc4737d,_0x3c0465]of Object['entries'](_0x530a46)){_0x47a393[_0xc4737d]=_0x168f87(_0x3c0465);if(_0x3c0465!==null&&_0x3c0465!==undefined)_0x3a8243[_0xb9afb7(0x557)](_0xc4737d);}return{'type':'object','properties':_0x47a393,'required':_0x3a8243,'additionalProperties':![]};}function _0x168f87(_0x525144){const _0x1c1d17=_0x404acb;if(_0x525144===null)return{'type':[_0x1c1d17(0x429),_0x1c1d17(0x1d2),_0x1c1d17(0x72c),_0x1c1d17(0x29d),_0x1c1d17(0x601),_0x1c1d17(0x67b)]};if(Array[_0x1c1d17(0x59b)](_0x525144))return{'type':_0x1c1d17(0x67b),'items':_0x525144['length']>0x0?_0x168f87(_0x525144[0x0]):{}};switch(typeof _0x525144){case _0x1c1d17(0x1d2):return{'type':_0x1c1d17(0x1d2),'default':_0x525144};case'number':return{'type':Number[_0x1c1d17(0x512)](_0x525144)?_0x1c1d17(0x45c):_0x1c1d17(0x72c),'default':_0x525144};case _0x1c1d17(0x29d):return{'type':'boolean','default':_0x525144};case _0x1c1d17(0x601):{const _0x24398d={};for(const [_0x47e6e7,_0x1e0d05]of Object[_0x1c1d17(0x87f)](_0x525144))_0x24398d[_0x47e6e7]=_0x168f87(_0x1e0d05);return{'type':'object','properties':_0x24398d,'additionalProperties':!![],'default':_0x27940d(_0x525144)};}default:return{};}}function _0x532e59(_0x5bca95,_0x29052f){const _0x3099b2=_0x404acb,_0x145432=[];for(const _0x70259 of _0x29052f[_0x3099b2(0x818)]){if(_0x70259==='*')continue;_0x145432[_0x3099b2(0x557)]({'name':_0x70259,'required':!Object[_0x3099b2(0x404)][_0x3099b2(0x3e0)][_0x3099b2(0x8c3)](_0x29052f[_0x3099b2(0x339)],_0x70259),'default':_0x29052f['defaults'][_0x70259]});}return _0x145432;}function _0x437d8d(_0x2bebd0={},_0x33a6db){const _0x4e5bfb=_0x404acb,_0x1339c6=_0x5c4e38(_0x2bebd0[_0x4e5bfb(0x5fb)]?.['querySchema']??_0x2bebd0[_0x4e5bfb(0x6d0)]??null),_0x98cbc7=_0x2bebd0[_0x4e5bfb(0x5fb)]?.[_0x4e5bfb(0x451)]??(_0x2bebd0['raw']?_0x4e5bfb(0x1c3):_0x33a6db['method']==='GET'||_0x33a6db['method']===_0x4e5bfb(0x8b6)?_0x4e5bfb(0x7ce):_0x4e5bfb(0x3f2));return{'querySchema':_0x1339c6,'bodyMode':_0x98cbc7,'bindings':_0x27940d(_0x2bebd0[_0x4e5bfb(0x5fb)]?.[_0x4e5bfb(0x54e)]??{}),'statuses':_0x27940d(_0x2bebd0['http']?.[_0x4e5bfb(0x5cb)]??(_0x2bebd0[_0x4e5bfb(0x477)]||[])),'transport':_0x2bebd0['http']?.[_0x4e5bfb(0x358)]??(_0x2bebd0[_0x4e5bfb(0x2d4)]?_0x4e5bfb(0x2d4):_0x2bebd0[_0x4e5bfb(0x1c3)]?_0x4e5bfb(0x1c3):_0x4e5bfb(0x382)),'rawResponse':_0x2bebd0['http']?.[_0x4e5bfb(0x47d)]??!!_0x2bebd0[_0x4e5bfb(0x47d)],'cors':_0x27940d(_0x2bebd0['http']?.[_0x4e5bfb(0x294)]??_0x2bebd0[_0x4e5bfb(0x294)]??null)};}function _0xef0bef(_0x198931){const _0x1ccc5b=_0x404acb,_0x5952ed=_0x198931[_0x1ccc5b(0x74c)]||{},_0x21669c=_0x532e59(_0x198931[_0x1ccc5b(0x5be)],_0x198931[_0x1ccc5b(0x2c1)]),_0x2679d5=!!(_0x5952ed['id']||_0x5952ed[_0x1ccc5b(0x540)]||_0x5952ed[_0x1ccc5b(0x860)]||_0x5952ed[_0x1ccc5b(0x5fb)]||_0x5952ed[_0x1ccc5b(0x861)]||_0x5952ed[_0x1ccc5b(0x80a)]||_0x5952ed[_0x1ccc5b(0x6cc)]||_0x5952ed['safety']),_0x50fdce=_0x437d8d(_0x5952ed,_0x198931),_0x11d645=_0x5952ed[_0x1ccc5b(0x540)]?_0x27940d(_0x5952ed[_0x1ccc5b(0x540)]):null;return{'id':_0x5952ed['id']??null,'summary':_0x5952ed[_0x1ccc5b(0x75c)]??null,'description':_0x5952ed[_0x1ccc5b(0x1ba)]??null,'tags':_0x27940d(_0x5952ed[_0x1ccc5b(0x33c)]??[]),'category':_0x5952ed[_0x1ccc5b(0x1aa)]??null,'safety':_0x27940d(_0x5952ed[_0x1ccc5b(0x310)]??null),'access':_0x27940d(_0x5952ed[_0x1ccc5b(0x6cc)]??null),'inputSchema':_0x11d645,'outputSchema':_0x27940d(_0x5952ed[_0x1ccc5b(0x860)]??null),'examples':_0x27940d(_0x5952ed[_0x1ccc5b(0x5aa)]??[]),'pathParams':_0x21669c,'http':_0x50fdce,'cli':_0x27940d(_0x5952ed[_0x1ccc5b(0x80a)]??null),'mcp':_0x27940d(_0x5952ed['mcp']??null),'legacy':{'params':_0x27940d(_0x5952ed['params']??null),'query':_0x27940d(_0x5952ed['query']??null),'body':_0x27940d(_0x5952ed['body']??null),'response':_0x27940d(_0x5952ed[_0x1ccc5b(0x8c1)]??null)},'transport':{'raw':!!_0x5952ed[_0x1ccc5b(0x1c3)],'sse':!!_0x5952ed[_0x1ccc5b(0x2d4)],'rawResponse':!!_0x5952ed[_0x1ccc5b(0x47d)],'cors':_0x27940d(_0x5952ed[_0x1ccc5b(0x294)]??null)},'hasCanonical':_0x2679d5};}function _0xd10169(_0x11a6a3,_0x432065){const _0x15e8bc=_0x404acb;if(!_0x432065?.[_0x15e8bc(0x78e)])return;if(!_0x432065[_0x15e8bc(0x540)]||_0x432065[_0x15e8bc(0x540)][_0x15e8bc(0x4fa)]!==_0x15e8bc(0x601)||!_0x432065[_0x15e8bc(0x540)]['properties'])throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+_0x15e8bc(0x600));const _0x2caf20=_0x432065[_0x15e8bc(0x540)][_0x15e8bc(0x668)]||{},_0x2424fb=new Set(_0x432065[_0x15e8bc(0x657)][_0x15e8bc(0x595)](_0x338f3c=>_0x338f3c[_0x15e8bc(0x4f9)])),_0x5d04da=new Set(Object['keys'](_0x432065[_0x15e8bc(0x5fb)]?.['querySchema']?.['properties']||{})),_0xf368cc=new Set(Object[_0x15e8bc(0x818)](_0x432065[_0x15e8bc(0x5fb)]?.[_0x15e8bc(0x54e)]||{}));for(const _0x103d06 of _0x432065[_0x15e8bc(0x657)]){if(!_0x2caf20[_0x103d06[_0x15e8bc(0x4f9)]])throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+_0x15e8bc(0x7ba)+_0x103d06[_0x15e8bc(0x4f9)]);}for(const _0x43f311 of _0x5d04da){if(!_0x2caf20[_0x43f311])throw new Error(_0x15e8bc(0x448)+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3['path']+_0x15e8bc(0x47e)+_0x43f311);}for(const _0x4763b7 of _0xf368cc){if(!_0x2caf20[_0x4763b7])throw new Error(_0x15e8bc(0x448)+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3['path']+_0x15e8bc(0x43d)+_0x4763b7);}for(const _0x5e137c of _0xf368cc){if(_0x2424fb[_0x15e8bc(0x2ad)](_0x5e137c))throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3['path']+_0x15e8bc(0x2d5)+_0x5e137c);if(_0x5d04da[_0x15e8bc(0x2ad)](_0x5e137c))throw new Error(_0x15e8bc(0x448)+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3['path']+'\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20'+_0x5e137c);const _0x293f2e=_0x432065[_0x15e8bc(0x5fb)]['bindings'][_0x5e137c];if(!/^params\.[A-Za-z0-9_*.-]+$/[_0x15e8bc(0x3f6)](_0x293f2e)&&!/^query\.[A-Za-z0-9_*.-]+$/[_0x15e8bc(0x3f6)](_0x293f2e)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/['test'](_0x293f2e)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x15e8bc(0x3f6)](_0x293f2e))throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+_0x15e8bc(0x381)+_0x5e137c+':\x20'+_0x293f2e);}for(const _0x5a3086 of _0x5d04da){if(_0x2424fb[_0x15e8bc(0x2ad)](_0x5a3086))throw new Error(_0x15e8bc(0x448)+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+_0x15e8bc(0x434)+_0x5a3086);}const _0x340a9d=_0x432065['http']?.[_0x15e8bc(0x451)],_0x416a26=new Set([_0x15e8bc(0x7ce),'remaining-fields',_0x15e8bc(0x601),_0x15e8bc(0x7ae),'array',_0x15e8bc(0x1c3)]);if(!_0x416a26[_0x15e8bc(0x2ad)](_0x340a9d))throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+'\x20has\x20invalid\x20http.bodyMode:\x20'+_0x340a9d);if(_0x340a9d===_0x15e8bc(0x1c3)&&!_0x11a6a3[_0x15e8bc(0x74c)]?.[_0x15e8bc(0x1c3)])throw new Error(_0x15e8bc(0x448)+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+'\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata');if(_0x432065[_0x15e8bc(0x861)]?.[_0x15e8bc(0x2f9)]!==![]&&(_0x11a6a3['meta']?.['raw']||_0x11a6a3['meta']?.[_0x15e8bc(0x2d4)]||_0x432065['http']?.[_0x15e8bc(0x358)]===_0x15e8bc(0x481)))throw new Error(_0x15e8bc(0x448)+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+_0x15e8bc(0x693)+_0x432065[_0x15e8bc(0x5fb)]?.[_0x15e8bc(0x358)]);const _0x4a2416=Object[_0x15e8bc(0x818)](_0x2caf20)[_0x15e8bc(0x542)](_0x10a712=>{const _0x1c677d=_0x15e8bc;if(_0x2424fb['has'](_0x10a712))return![];if(_0x5d04da[_0x1c677d(0x2ad)](_0x10a712))return![];if(_0xf368cc[_0x1c677d(0x2ad)](_0x10a712))return![];return!![];});if(_0x340a9d===_0x15e8bc(0x7ce)&&_0x4a2416['length']>0x0)throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+'\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20'+_0x4a2416[_0x15e8bc(0x1c9)](',\x20'));if(_0x340a9d===_0x15e8bc(0x67b)&&_0x4a2416['filter'](_0x35c441=>_0x491aa5(_0x2caf20[_0x35c441],_0x15e8bc(0x67b)))['length']!==0x1)throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3['path']+'\x20uses\x20bodyMode:array\x20but\x20does\x20not\x20have\x20exactly\x20one\x20unbound\x20array\x20input\x20field');}function _0x13e494(_0xac3848,_0x571795,_0x248e93,_0x1fbd6f){const _0x512b12=_0x404acb;for(const [_0x1efea8,_0x2119b2]of Object[_0x512b12(0x87f)](_0xac3848)){if(_0x571795[_0x512b12(0x2ad)](_0x1efea8)||_0x248e93[_0x512b12(0x2ad)](_0x1efea8)||Object['prototype'][_0x512b12(0x3e0)][_0x512b12(0x8c3)](_0x1fbd6f,_0x1efea8))continue;if(_0x491aa5(_0x2119b2,'array'))return _0x1efea8;}return null;}function _0x3cfb28(_0x3bdd3a){const _0x451aa0=_0x404acb;if(Array[_0x451aa0(0x59b)](_0x3bdd3a))return _0x3bdd3a;if(_0x3bdd3a==null)return[];return[_0x3bdd3a];}function _0x491aa5(_0x3e01da,_0x3861e4){const _0x38cc08=_0x404acb;return _0x3cfb28(_0x3e01da?.[_0x38cc08(0x4fa)])[_0x38cc08(0x1a1)](_0x3861e4);}function _0x20a5d5(_0x2dd1a8,_0x43e3b7){const _0x19faba=_0x404acb;if(_0x2dd1a8==null||typeof _0x2dd1a8!==_0x19faba(0x1d2))return _0x2dd1a8;const _0x11f39c=_0x3cfb28(_0x43e3b7?.[_0x19faba(0x4fa)]);if(_0x11f39c[_0x19faba(0x6ad)]===0x0)return _0x2dd1a8;if(_0x11f39c[_0x19faba(0x1a1)](_0x19faba(0x429))&&_0x2dd1a8===_0x19faba(0x429))return null;if(_0x11f39c[_0x19faba(0x1a1)]('boolean')){if(_0x2dd1a8===_0x19faba(0x7c4))return!![];if(_0x2dd1a8==='false')return![];}if(_0x11f39c[_0x19faba(0x1a1)](_0x19faba(0x45c))&&/^-?\d+$/[_0x19faba(0x3f6)](_0x2dd1a8))return Number[_0x19faba(0x453)](_0x2dd1a8,0xa);if(_0x11f39c[_0x19faba(0x1a1)](_0x19faba(0x72c))&&/^-?(?:\d+|\d*\.\d+)$/[_0x19faba(0x3f6)](_0x2dd1a8))return Number(_0x2dd1a8);return _0x2dd1a8;}function _0x3774cb(_0x305126){return _0x27940d(_0x305126);}function _0x15607c(_0x21cd68,_0x551fa8={},_0x125dc1={},_0x1c99c6=null,_0x398dbc={}){const _0x2ae683=_0x404acb,_0x5850a=_0x21cd68?.[_0x2ae683(0x8b3)];if(!_0x5850a?.[_0x2ae683(0x78e)]||!_0x5850a['inputSchema'])return null;const _0x3517ed=_0x5850a['inputSchema'][_0x2ae683(0x668)]||{},_0x45f599=_0x5850a[_0x2ae683(0x5fb)]?.['querySchema']?.[_0x2ae683(0x668)]||{},_0x38ade8=_0x5850a[_0x2ae683(0x5fb)]?.[_0x2ae683(0x54e)]||{},_0x5446bc=new Set((_0x5850a[_0x2ae683(0x657)]||[])[_0x2ae683(0x595)](_0x8dc99b=>_0x8dc99b['name'])),_0x50547b=new Set(Object['keys'](_0x45f599)),_0x421304={};for(const [_0x4784e9,_0x364153]of Object[_0x2ae683(0x87f)](_0x3517ed)){Object[_0x2ae683(0x404)][_0x2ae683(0x3e0)][_0x2ae683(0x8c3)](_0x364153||{},_0x2ae683(0x7eb))&&(_0x421304[_0x4784e9]=_0x3774cb(_0x364153[_0x2ae683(0x7eb)]));}for(const _0x18429d of _0x5850a['pathParams']||[]){if(!Object[_0x2ae683(0x404)][_0x2ae683(0x3e0)][_0x2ae683(0x8c3)](_0x551fa8,_0x18429d[_0x2ae683(0x4f9)]))continue;const _0x50eca2=_0x3517ed[_0x18429d['name']]||{};_0x421304[_0x18429d[_0x2ae683(0x4f9)]]=_0x20a5d5(_0x551fa8[_0x18429d['name']],_0x50eca2);}for(const [_0x5dfe01,_0x3103a0]of Object['entries'](_0x45f599)){if(!Object['prototype'][_0x2ae683(0x3e0)][_0x2ae683(0x8c3)](_0x125dc1,_0x5dfe01))continue;_0x421304[_0x5dfe01]=_0x20a5d5(_0x125dc1[_0x5dfe01],_0x3103a0||_0x3517ed[_0x5dfe01]||{});}for(const [_0x22afb7,_0x3cb251]of Object['entries'](_0x38ade8)){if(typeof _0x3cb251!==_0x2ae683(0x1d2))continue;let _0x53ffff;if(_0x3cb251[_0x2ae683(0x579)](_0x2ae683(0x714)))_0x53ffff=_0x551fa8[_0x3cb251[_0x2ae683(0x27f)](0x7)];else{if(_0x3cb251[_0x2ae683(0x579)]('query.'))_0x53ffff=_0x125dc1[_0x3cb251[_0x2ae683(0x27f)](0x6)];else{if(_0x3cb251===_0x2ae683(0x246))_0x53ffff=_0x1c99c6;else{if(_0x3cb251['startsWith'](_0x2ae683(0x83c)))_0x53ffff=_0x1c99c6?.[_0x3cb251[_0x2ae683(0x27f)](0x5)];else{if(_0x3cb251[_0x2ae683(0x579)](_0x2ae683(0x83e)))_0x53ffff=_0x398dbc?.[_0x3cb251[_0x2ae683(0x27f)](0x8)[_0x2ae683(0x368)]()]??_0x398dbc?.[_0x3cb251['slice'](0x8)];}}}}if(_0x53ffff!==undefined)_0x421304[_0x22afb7]=_0x53ffff;}const _0x5ed978=_0x5850a['http']?.[_0x2ae683(0x451)];if(_0x5ed978!==_0x2ae683(0x7ce)&&_0x5ed978!==_0x2ae683(0x1c3)&&_0x1c99c6!=null){if(_0x5ed978===_0x2ae683(0x67b)&&Array[_0x2ae683(0x59b)](_0x1c99c6)){const _0x382867=_0x13e494(_0x3517ed,_0x5446bc,_0x50547b,_0x38ade8);if(_0x382867)_0x421304[_0x382867]=_0x1c99c6;}else{if(_0x5ed978==='object')for(const [_0xa992fc,_0x371262]of Object[_0x2ae683(0x87f)](_0x3517ed)){if(_0x5446bc['has'](_0xa992fc)||_0x50547b['has'](_0xa992fc)||Object['prototype'][_0x2ae683(0x3e0)][_0x2ae683(0x8c3)](_0x38ade8,_0xa992fc))continue;if(Object['prototype'][_0x2ae683(0x3e0)]['call'](_0x1c99c6,_0xa992fc))_0x421304[_0xa992fc]=_0x1c99c6[_0xa992fc];else{if(_0x491aa5(_0x371262,_0x2ae683(0x601)))_0x421304[_0xa992fc]=_0x1c99c6;}}else for(const [_0x47b9e9,_0x207cf2]of Object[_0x2ae683(0x87f)](_0x1c99c6)){if(_0x5446bc[_0x2ae683(0x2ad)](_0x47b9e9)||_0x50547b[_0x2ae683(0x2ad)](_0x47b9e9)||Object[_0x2ae683(0x404)][_0x2ae683(0x3e0)][_0x2ae683(0x8c3)](_0x38ade8,_0x47b9e9))continue;_0x421304[_0x47b9e9]=_0x207cf2;}}}return _0x421304;}function _0x49565f(_0x293e8f,_0xf4753e,_0x3baeb6,_0x418be8){const _0xde9807=_0x404acb;if(!_0xf4753e)return;const _0x508313=_0x3cfb28(_0xf4753e[_0xde9807(0x4fa)]);if(_0x293e8f===undefined)return;if(_0x293e8f===null){_0x508313['length']>0x0&&!_0x508313[_0xde9807(0x1a1)]('null')&&_0x418be8['push']({'field':_0x3baeb6,'message':'must\x20not\x20be\x20null','expected':_0x508313[_0xde9807(0x1c9)]('|'),'actual':null});return;}if(_0x508313['length']===0x0)return;const _0x30e6b5=_0x508313[_0xde9807(0x721)](_0x21395f=>{const _0x3f0cee=_0xde9807;switch(_0x21395f){case _0x3f0cee(0x1d2):return typeof _0x293e8f==='string';case _0x3f0cee(0x45c):return Number['isInteger'](_0x293e8f);case _0x3f0cee(0x72c):return typeof _0x293e8f===_0x3f0cee(0x72c)&&Number[_0x3f0cee(0x72e)](_0x293e8f);case _0x3f0cee(0x29d):return typeof _0x293e8f===_0x3f0cee(0x29d);case _0x3f0cee(0x601):return _0x293e8f&&typeof _0x293e8f==='object'&&!Array[_0x3f0cee(0x59b)](_0x293e8f);case _0x3f0cee(0x67b):return Array['isArray'](_0x293e8f);case'null':return _0x293e8f===null;default:return!![];}});if(!_0x30e6b5){_0x418be8[_0xde9807(0x557)]({'field':_0x3baeb6,'message':_0xde9807(0x6e4)+_0x508313[_0xde9807(0x1c9)]('|'),'expected':_0x508313[_0xde9807(0x1c9)]('|'),'actual':_0x293e8f});return;}Array[_0xde9807(0x59b)](_0x293e8f)&&_0xf4753e[_0xde9807(0x7ab)]&&_0x293e8f[_0xde9807(0x881)]((_0x2afa6b,_0x5dd476)=>_0x49565f(_0x2afa6b,_0xf4753e[_0xde9807(0x7ab)],_0x3baeb6+'['+_0x5dd476+']',_0x418be8));}function _0x565cf0(_0x7cb3a9,_0x2d415a){const _0x10fd5b=_0x404acb,_0x505e10=_0x7cb3a9?.[_0x10fd5b(0x8b3)];if(!_0x505e10?.['hasCanonical']||!_0x505e10[_0x10fd5b(0x540)])return null;const _0x514a91=_0x505e10[_0x10fd5b(0x540)],_0x39cc6b=_0x514a91[_0x10fd5b(0x668)]||{},_0x4de956=new Set(_0x514a91['required']||[]),_0x3aeeea=[];for(const _0x12df2f of _0x4de956){_0x2d415a[_0x12df2f]===undefined&&_0x3aeeea[_0x10fd5b(0x557)]({'field':_0x12df2f,'message':_0x10fd5b(0x277),'expected':'present','actual':undefined});}if(_0x514a91[_0x10fd5b(0x205)]===![])for(const _0x519764 of Object[_0x10fd5b(0x818)](_0x2d415a||{})){!Object[_0x10fd5b(0x404)][_0x10fd5b(0x3e0)][_0x10fd5b(0x8c3)](_0x39cc6b,_0x519764)&&_0x3aeeea[_0x10fd5b(0x557)]({'field':_0x519764,'message':_0x10fd5b(0x20f),'expected':_0x10fd5b(0x572),'actual':_0x2d415a[_0x519764]});}for(const [_0x4c62f8,_0x1eba60]of Object[_0x10fd5b(0x87f)](_0x39cc6b)){_0x49565f(_0x2d415a[_0x4c62f8],_0x1eba60,_0x4c62f8,_0x3aeeea);}if(_0x3aeeea['length']===0x0)return null;return{'code':'VALIDATION_ERROR','errors':_0x3aeeea};}function _0x11c3b9(_0x2821bc=[]){const _0x4197fb=_0x404acb;if(!Array[_0x4197fb(0x59b)](_0x2821bc)||_0x2821bc[_0x4197fb(0x6ad)]===0x0)return null;const _0x2e0fd5=_0x2821bc['slice'](0x0,0x3)['map']((_0x406650={})=>{const _0x1ba6ac=_0x4197fb,_0x4131dd=_0x406650[_0x1ba6ac(0x3ab)]?_0x406650[_0x1ba6ac(0x3ab)]+'\x20':'';return(''+_0x4131dd+(_0x406650[_0x1ba6ac(0x81d)]||_0x1ba6ac(0x35e)))[_0x1ba6ac(0x48b)]();})[_0x4197fb(0x1c9)](';\x20');return _0x2821bc[_0x4197fb(0x6ad)]>0x3?_0x2e0fd5+_0x4197fb(0x37d)+(_0x2821bc[_0x4197fb(0x6ad)]-0x3)+_0x4197fb(0x2ea):_0x2e0fd5;}function _0x2d7394(_0x4cb31b,_0x51d1ac={}){const _0x1bf6a1=_0x404acb,_0x1dc29a=_0x51d1ac?.[_0x1bf6a1(0x3ec)]?.[_0x1bf6a1(0x6cd)]??_0x51d1ac?.[_0x1bf6a1(0x6cd)]??_0x1bf6a1(0x2cf),_0x3f9b92=_0x51d1ac?.['result']?.[_0x1bf6a1(0x844)]??_0x51d1ac?.[_0x1bf6a1(0x844)]??_0x1dc29a?.['details']??null,_0x86eabc=_0x51d1ac?.[_0x1bf6a1(0x3ec)]?.[_0x1bf6a1(0x2dc)]??_0x51d1ac?.['code']??_0x1dc29a?.[_0x1bf6a1(0x2dc)]??null,_0x107d57=_0x51d1ac?.['result']?.[_0x1bf6a1(0x81d)]??_0x51d1ac?.['message']??_0x1dc29a?.['message']??null,_0x308fde=typeof _0x1dc29a===_0x1bf6a1(0x1d2)?_0x1dc29a:null,_0x4f8d85=typeof _0x308fde===_0x1bf6a1(0x1d2)&&/^[A-Z0-9_]+$/[_0x1bf6a1(0x3f6)](_0x308fde),_0x25bfb0=_0x86eabc??(_0x4f8d85?_0x308fde:null)??(_0x11e6bb[_0x4cb31b]||_0x1bf6a1(0x418)+_0x4cb31b);let _0x436b6a=_0x107d57;!_0x436b6a&&typeof _0x308fde===_0x1bf6a1(0x1d2)&&!_0x4f8d85&&(_0x436b6a=_0x308fde);if(!_0x436b6a&&_0x25bfb0===_0x1bf6a1(0x526)){const _0x5e5879=_0x11c3b9(_0x3f9b92);_0x436b6a=_0x5e5879?_0x1bf6a1(0x305)+_0x5e5879:'Validation\x20failed';}if(!_0x436b6a&&Array['isArray'](_0x3f9b92)&&_0x3f9b92[_0x1bf6a1(0x6ad)]>0x0){const _0x5f2ba5=_0x11c3b9(_0x3f9b92);if(_0x5f2ba5)_0x436b6a=_0x5f2ba5;}if(!_0x436b6a)_0x436b6a=_0x11e6bb[_0x4cb31b]||_0x1bf6a1(0x2cf);const _0x11e5b5={'code':_0x25bfb0,'message':_0x436b6a};if(_0x3f9b92!=null)_0x11e5b5[_0x1bf6a1(0x844)]=_0x3f9b92;return _0x11e5b5;}function _0x352492(_0x166ced){const _0x1ac57a=_0x404acb,_0x217f1f={};if(!_0x166ced)return _0x217f1f;for(const _0x2bf140 of _0x166ced[_0x1ac57a(0x84e)](';')){const _0x1fa257=_0x2bf140[_0x1ac57a(0x196)]('=');if(_0x1fa257===-0x1)continue;const _0x4f7385=_0x2bf140[_0x1ac57a(0x27f)](0x0,_0x1fa257)[_0x1ac57a(0x48b)](),_0x24109c=_0x2bf140[_0x1ac57a(0x27f)](_0x1fa257+0x1)['trim']();_0x217f1f[_0x4f7385]=decodeURIComponent(_0x24109c);}return _0x217f1f;}function _0x1c28ac(_0x24bc01,_0x21ffb0){const _0xa7d575=_0x404acb;return _0x21ffb0=_0x446926(_0x21ffb0),{'status':_0x21ffb0['status']??_0x24bc01[_0xa7d575(0x2c4)],'headers':{..._0x24bc01[_0xa7d575(0x2b0)]||{},..._0x21ffb0[_0xa7d575(0x2b0)]||{}},'body':_0x21ffb0['body']??_0x24bc01[_0xa7d575(0x246)]};}function _0x161fd2(_0x1accc0={}){const _0x4d381e=_0x404acb;return _0x1accc0[_0x4d381e(0x358)]||(_0x1accc0[_0x4d381e(0x558)]?'internal':_0x4d381e(0x5fb));}function _0x1acef1(_0x195e8c){const _0x3ca8bb=_0x404acb;if(_0x195e8c[_0x3ca8bb(0x28e)]?.[_0x3ca8bb(0x558)]===!![])return!![];if(_0x195e8c[_0x3ca8bb(0x28e)]?.[_0x3ca8bb(0x716)]?.[_0x3ca8bb(0x365)]===!![])return!![];if(_0x195e8c[_0x3ca8bb(0x28e)]?.['auth']?.['ok']===!![])return!![];return![];}function _0x399f68(_0x21e3a9,_0x173bbc){const _0x29e310=_0x404acb,_0x3755ff=_0x173bbc[_0x29e310(0x84e)]('.');let _0x33651f=_0x21e3a9;for(const _0x17a9db of _0x3755ff){_0x33651f=_0x33651f?.[_0x17a9db];}return _0x33651f||null;}class _0x1d4309{constructor(){const _0x2c43eb=_0x404acb;this['middlewares']=[],this['guards']=[],this[_0x2c43eb(0x280)]=[],this['maxBodyBytes']=0x5*0x400*0x400,this['server']=null,this[_0x2c43eb(0x39f)]=[],this['_sockets']=new Set(),this[_0x2c43eb(0x716)]={'cookieName':_0x2c43eb(0x54a),'stateCookieName':_0x2c43eb(0x6ee),'csrfCookieName':'kdb_admin_csrf'},this['_authOptions']={},this[_0x2c43eb(0x548)]=new Map(),this['_oidcDiscoveryCache']=null,this[_0x2c43eb(0x24c)]=null,this[_0x2c43eb(0x8a5)]=new Map(),this[_0x2c43eb(0x6d8)]=new _0x30fcce(),this[_0x2c43eb(0x4db)]=![],this[_0x2c43eb(0x33a)]=0x0;}[_0x404acb(0x4c9)](_0x307397={}){const _0x4dd910=_0x404acb;return this['_authOptions']=_0x307397||{},this[_0x4dd910(0x87d)]=_0x307397['mode']??_0x4dd910(0x5f0),this[_0x4dd910(0x228)];}get['isSetupMode'](){const _0xb3d61=_0x404acb;if(this[_0xb3d61(0x2ed)]?.[_0xb3d61(0x716)])return this['_okdb']['auth']['isSetupMode'];return![];}[_0x404acb(0x3b5)](){const _0x6c71be=_0x404acb;if(this['_okdb']?.['auth'])return this[_0x6c71be(0x2ed)]['auth'][_0x6c71be(0x3b5)]();return this[_0x6c71be(0x228)]||{};}['use'](_0x5c1311){const _0x21cf81=_0x404acb;this[_0x21cf81(0x680)]['push'](_0x5c1311);}['guard'](_0x97b67f,_0x410f85){const _0x39cbf6=_0x404acb;this[_0x39cbf6(0x69c)]['push']({'match':_0x97b67f,'handler':_0x410f85});}[_0x404acb(0x4da)](_0x3bc5f1,_0xc34780,_0x510cdd,_0x22c9bf={}){const _0x137e06=_0x404acb,_0x30f438={'method':_0x38b448(_0x3bc5f1),'path':_0xc34780,'matcher':_0x5215ab(_0xc34780),'handler':_0x510cdd,'meta':_0x22c9bf||{}},_0x5baab7=_0xef0bef(_0x30f438);_0xd10169(_0x30f438,_0x5baab7),_0x30f438['operation']=_0x5baab7,_0x30f438[_0x137e06(0x5a0)]=this['_userPhase']===!![];if(_0x30f438[_0x137e06(0x5a0)])this['_userRouteCount']++;this[_0x137e06(0x280)][_0x137e06(0x557)](_0x30f438);}[_0x404acb(0x5a6)](_0xa9c4ca,_0x10cfa2,_0xfc5759,_0x38412a={}){this['add'](_0xa9c4ca,_0x10cfa2,_0xfc5759,{..._0x38412a,'raw':!![]});}[_0x404acb(0x641)](_0x1c60ab,_0x9db493,{corsOnly:corsOnly=![]}={}){const _0x51cb1b=_0x404acb;let _0x3e17ad=null,_0x3d75d5=Infinity;for(const _0x4fd61f of this[_0x51cb1b(0x280)]){if(corsOnly){if(!_0x4fd61f[_0x51cb1b(0x74c)]?.[_0x51cb1b(0x294)])continue;}else{if(_0x4fd61f[_0x51cb1b(0x225)]!==_0x1c60ab)continue;}if(!_0x4fd61f[_0x51cb1b(0x2c1)][_0x51cb1b(0x316)][_0x51cb1b(0x3f6)](_0x9db493))continue;const _0x14f448=_0x4fd61f[_0x51cb1b(0x2c1)]['keys']?.[_0x51cb1b(0x6ad)]??0x0;if(_0x14f448<_0x3d75d5){_0x3e17ad=_0x4fd61f,_0x3d75d5=_0x14f448;if(_0x14f448===0x0)break;}}return _0x3e17ad;}[_0x404acb(0x7df)](_0x14c887,_0x387ce5){const _0x2cdd54=_0x404acb,_0x5da506=_0x38b448(_0x14c887),_0x111895=this[_0x2cdd54(0x641)](_0x5da506,_0x387ce5);if(_0x111895)return _0x111895;if(_0x5da506===_0x2cdd54(0x618))return this[_0x2cdd54(0x641)](_0x5da506,_0x387ce5,{'corsOnly':!![]});return null;}[_0x404acb(0x34a)](_0x57afc7,_0x135869){const _0x52233c=_0x404acb;if(_0x57afc7?.[_0x52233c(0x74c)]?.['rawResponse'])return![];if(_0x135869?.['headers']?.[_0x52233c(0x36a)])return![];return!![];}['listRoutes'](){const _0x551886=_0x404acb;return this[_0x551886(0x280)][_0x551886(0x542)](_0x52769a=>!_0x52769a[_0x551886(0x74c)]?.[_0x551886(0x8c6)])[_0x551886(0x595)](_0x3a5744=>({'method':_0x3a5744['method'],'path':_0x3a5744['path'],'defaults':_0x3a5744['matcher'][_0x551886(0x339)],'meta':_0x3a5744[_0x551886(0x74c)],'operation':_0x3a5744[_0x551886(0x8b3)]}));}['addSSE'](_0x55e143,_0x133e0e,_0x318d65={}){const _0x13fbc3=_0x404acb,{PassThrough:_0x5621f0}=require$$5;this[_0x13fbc3(0x4da)](_0x13fbc3(0x318),_0x55e143,({params:_0x16af83,query:_0x230c5e,headers:_0x1358f8,context:_0x233ebd})=>{const _0x364ced=_0x13fbc3,_0x4a6810=new _0x5621f0();let _0x10af59=null;const _0x1a808d={};try{_0x233ebd?.[_0x364ced(0x35b)]?.[_0x364ced(0x437)]?.[_0x364ced(0x746)](!![]);}catch{}_0x4a6810[_0x364ced(0x82b)](_0x364ced(0x64b)),_0x10af59=setInterval(()=>{const _0x279948=_0x364ced;try{_0x4a6810[_0x279948(0x82b)](':\x20ping\x0a\x0a');}catch{}},0x3a98);const _0x23deb4=(_0x309411,_0x568638,_0x209abd={})=>{const _0x46d304=_0x364ced;try{const _0x47c796=_0x209abd[_0x46d304(0x1c3)]?String(_0x568638??''):JSON[_0x46d304(0x2d1)](_0x568638);_0x209abd['id']!=null&&_0x4a6810[_0x46d304(0x82b)](_0x46d304(0x3f4)+_0x209abd['id']+'\x0a');_0x4a6810['write']('event:\x20'+_0x309411+'\x0a');for(const _0x2c614d of _0x47c796[_0x46d304(0x84e)]('\x0a')){_0x4a6810[_0x46d304(0x82b)]('data:\x20'+_0x2c614d+'\x0a');}_0x4a6810[_0x46d304(0x82b)]('\x0a');}catch{}},_0x27b484=()=>{const _0x3dcd7a=_0x364ced;_0x10af59&&(clearInterval(_0x10af59),_0x10af59=null);try{_0x4a6810[_0x3dcd7a(0x6e6)]();}catch{}},_0x16482c=(_0x149dce,_0x4866ae)=>{_0x1a808d[_0x149dce]=_0x4866ae;};_0x233ebd?.[_0x364ced(0x35b)]?.['on'](_0x364ced(0x6e0),_0x27b484),_0x4a6810['on'](_0x364ced(0x6e0),_0x27b484);if(_0x233ebd?.['auth']&&_0x233ebd[_0x364ced(0x716)][_0x364ced(0x5f0)]!==!![]&&_0x233ebd['auth'][_0x364ced(0x365)]){const _0x2358f1={'headers':_0x1358f8??{},'cookies':_0x352492(_0x1358f8?.[_0x364ced(0x7ed)]),'context':{},'socket':_0x233ebd?.[_0x364ced(0x35b)]?.['socket']??{'remoteAddress':null}},_0xa0086c=setInterval(async()=>{const _0x14ba44=_0x364ced;try{const _0x2507f4=await this['authenticateRequest'](_0x2358f1);if(_0x2507f4?.[_0x14ba44(0x5f0)]===!![]||_0x2507f4?.[_0x14ba44(0x365)])return;_0x23deb4(_0x14ba44(0x716),{'expired':!![]}),_0x27b484();}catch{_0x27b484();}},0xea60);_0xa0086c['unref']?.(),_0x4a6810['on'](_0x364ced(0x6e0),()=>clearInterval(_0xa0086c));}const _0x92730a=_0x133e0e({'send':_0x23deb4,'close':_0x27b484,'params':_0x16af83??{},'query':_0x230c5e??{},'headers':_0x1358f8??{},'context':_0x233ebd,'setHeader':_0x16482c});return typeof _0x92730a==='function'&&_0x4a6810['on'](_0x364ced(0x6e0),_0x92730a),{'status':0xc8,'headers':{'content-type':_0x364ced(0x87b),'cache-control':_0x364ced(0x5f7),'connection':'keep-alive','x-accel-buffering':'no',..._0x1a808d},'body':_0x4a6810};},{..._0x318d65,'sse':!![]});}async['_runGuards'](_0x1c0bb5,_0x43bd7a){const _0x160048=_0x404acb;for(const _0x399ffa of this[_0x160048(0x69c)]){if(!_0x399ffa[_0x160048(0x492)](_0x1c0bb5))continue;const _0x50d735=await _0x399ffa[_0x160048(0x29f)](_0x1c0bb5,_0x43bd7a);if(_0x50d735===![])return![];}return!![];}async[_0x404acb(0x4bd)](_0x3f3e17,_0xe99fd0,_0x264e14){let _0x544abb=0x0;const _0x4ca583=async()=>{const _0xb93a8=this['middlewares'][_0x544abb++];if(!_0xb93a8)return _0x264e14();return _0xb93a8(_0x3f3e17,_0xe99fd0,_0x4ca583);};return _0x4ca583();}[_0x404acb(0x4a4)](_0x49c3fc,_0x58fff3){const _0x4ba48e=_0x404acb,{status:status=0xc8,headers:headers={},body:_0x3895de}=_0x49c3fc;if(status>=0x12c&&status<0x190)return _0x49c3fc;if(_0x4efe79(_0x3895de))return _0x49c3fc;if(Buffer['isBuffer'](_0x3895de))return _0x49c3fc;if(typeof _0x3895de===_0x4ba48e(0x1d2))return _0x49c3fc;const _0x101aca={'time':+_0x58fff3['toFixed'](0x2)};if(_0x3895de?.[_0x4ba48e(0x74c)]&&typeof _0x3895de[_0x4ba48e(0x74c)]===_0x4ba48e(0x601)){const {time:_0x2183f1,..._0x338dab}=_0x3895de['meta'];Object['assign'](_0x101aca,_0x338dab);}let _0x34c330;if(status>=0x190){const _0x1b8450=_0x2d7394(status,_0x3895de);_0x34c330={'data':null,'error':_0x1b8450,'meta':_0x101aca};}else{if(status===0xcc||_0x3895de==null)_0x34c330={'data':null,'error':null,'meta':_0x101aca};else{let _0x65637a;if('result'in _0x3895de)_0x65637a=_0x3895de[_0x4ba48e(0x3ec)];else{const {meta:_0x2dd2d1,..._0x24143f}=_0x3895de;_0x65637a=Object['keys'](_0x24143f)['length']>0x0?_0x24143f:null;}_0x34c330={'data':_0x65637a,'error':null,'meta':_0x101aca};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x34c330};}async[_0x404acb(0x88f)](_0x18c534,_0x422094,_0xc1e0a={},_0x16281e={}){const _0x1ba4a8=_0x404acb;_0x18c534=_0x38b448(_0x18c534);const _0x44d399=this[_0x1ba4a8(0x7df)](_0x18c534,_0x422094),_0x3611e7={'method':_0x18c534,'path':_0x422094,'headers':_0xc1e0a[_0x1ba4a8(0x2b0)]??{},'body':_0xc1e0a[_0x1ba4a8(0x246)]??null,'query':_0xc1e0a[_0x1ba4a8(0x6d0)]??{},'context':_0x16281e,'cookies':_0x352492(_0xc1e0a[_0x1ba4a8(0x2b0)]?.[_0x1ba4a8(0x7ed)]),'route':_0x44d399,'socket':{'remoteAddress':_0xc1e0a[_0x1ba4a8(0x5ef)]??_0x1ba4a8(0x520)}};_0x3611e7[_0x1ba4a8(0x28e)]=_0x3611e7[_0x1ba4a8(0x28e)]||{};!_0x3611e7['context']['auth']&&(_0x3611e7[_0x1ba4a8(0x28e)][_0x1ba4a8(0x716)]=await this[_0x1ba4a8(0x6ac)](_0x3611e7));if(_0x3611e7[_0x1ba4a8(0x28e)][_0x1ba4a8(0x716)]?.['bootstrapBlocked'])return _0x446926({'status':0x193,'body':{'error':{'code':'BOOTSTRAP_LOCALHOST_ONLY','message':'Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.'}}});_0x3611e7[_0x1ba4a8(0x28e)]['auth']?.[_0x1ba4a8(0x402)]&&!_0x3611e7[_0x1ba4a8(0x28e)]['user']&&(_0x3611e7[_0x1ba4a8(0x28e)][_0x1ba4a8(0x402)]=_0x3611e7['context'][_0x1ba4a8(0x716)][_0x1ba4a8(0x402)]);let _0x5410ba=null;const _0x2cec4f={'status'(_0x27df6d){_0x5410ba=_0x5410ba||{},_0x5410ba['status']=_0x27df6d;},'setHeader'(_0x509364,_0x4f512c){const _0x384406=_0x1ba4a8;_0x5410ba=_0x5410ba||{},_0x5410ba['headers']=_0x5410ba[_0x384406(0x2b0)]||{};const _0x822b90=String(_0x509364)[_0x384406(0x368)]();if(_0x822b90===_0x384406(0x3db)){const _0x22189a=_0x5410ba[_0x384406(0x2b0)][_0x509364];if(!_0x22189a)_0x5410ba['headers'][_0x509364]=_0x4f512c;else{if(Array[_0x384406(0x59b)](_0x22189a))_0x22189a[_0x384406(0x557)](_0x4f512c);else _0x5410ba[_0x384406(0x2b0)][_0x509364]=[_0x22189a,_0x4f512c];}return;}_0x5410ba[_0x384406(0x2b0)][_0x509364]=_0x4f512c;},'send'(_0x47961b){const _0x2b2e0c=_0x1ba4a8;_0x5410ba=_0x5410ba||{},_0x5410ba[_0x2b2e0c(0x246)]=_0x47961b;}},_0x3b725a=await this[_0x1ba4a8(0x683)](_0x3611e7,_0x2cec4f);if(!_0x3b725a)return _0x446926(_0x5410ba??{'status':0x193});const _0x3e494e=this['_enforceOperationAccess'](_0x3611e7);if(_0x3e494e)return _0x446926(_0x3e494e);const _0xca59cb=this['_validateOperationRequest'](_0x3611e7);if(_0xca59cb)return _0x446926(_0xca59cb);return await this['_runMiddlewares'](_0x3611e7,_0x2cec4f,async()=>{const _0x218fcc=_0x1ba4a8,_0x34d91a=await this[_0x218fcc(0x544)](_0x3611e7);if(_0x5410ba==null){_0x5410ba=_0x34d91a;return;}_0x5410ba=_0x1c28ac(_0x5410ba,_0x34d91a);}),_0x446926(_0x5410ba);}['_enforceOperationAccess'](_0x298437){const _0x100eb2=_0x404acb,_0x31a13c=_0x298437[_0x100eb2(0x1b0)]?.[_0x100eb2(0x8b3)],_0x23ff2c=_0x31a13c?.[_0x100eb2(0x6cc)];if(!_0x31a13c?.[_0x100eb2(0x78e)]||!_0x23ff2c)return null;if(_0x298437[_0x100eb2(0x28e)]?.[_0x100eb2(0x716)]?.[_0x100eb2(0x5f0)]===!![]||_0x298437[_0x100eb2(0x28e)]?.[_0x100eb2(0x716)]?.['isSystem']===!![])return null;const _0x976943=_0x161fd2(_0x298437[_0x100eb2(0x28e)]),_0x499731=Array[_0x100eb2(0x59b)](_0x23ff2c[_0x100eb2(0x27d)])?_0x23ff2c[_0x100eb2(0x27d)]:null;if(_0x23ff2c[_0x100eb2(0x50b)]&&_0x298437[_0x100eb2(0x28e)]?.[_0x100eb2(0x558)]!==!![])return{'status':0x193,'body':{'error':_0x100eb2(0x4f0)}};if(_0x499731&&_0x499731[_0x100eb2(0x6ad)]>0x0&&!_0x499731[_0x100eb2(0x1a1)](_0x976943)&&!(_0x976943===_0x100eb2(0x558)&&_0x499731[_0x100eb2(0x1a1)](_0x100eb2(0x5c1))))return{'status':0x193,'body':{'error':_0x100eb2(0x4f0)}};if(_0x23ff2c['authRequired']&&!_0x1acef1(_0x298437))return{'status':0x191,'body':{'error':_0x100eb2(0x4b0)}};const _0x2cd157=_0x23ff2c[_0x100eb2(0x535)];if(!_0x2cd157)return null;if(_0x298437[_0x100eb2(0x28e)]?.[_0x100eb2(0x716)]?.[_0x100eb2(0x4fa)]==='sync-node')return null;const _0x33f5e5=_0x298437[_0x100eb2(0x28e)]?.[_0x100eb2(0x716)]?.[_0x100eb2(0x527)];if(!_0x33f5e5){if(_0x298437[_0x100eb2(0x28e)]?.[_0x100eb2(0x716)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x100eb2(0x4cd)}};}if(!_0x298437['params']&&_0x298437[_0x100eb2(0x1b0)]?.[_0x100eb2(0x2c1)]){const _0x12dc9f=_0x298437[_0x100eb2(0x1b0)]['matcher'][_0x100eb2(0x316)][_0x100eb2(0x607)](_0x298437[_0x100eb2(0x5be)]);_0x12dc9f&&(_0x298437[_0x100eb2(0x315)]={},_0x298437[_0x100eb2(0x1b0)]['matcher']['keys'][_0x100eb2(0x881)]((_0x446ca4,_0x37472d)=>{const _0x3f4bdc=_0x100eb2,_0x461bfc=_0x12dc9f[_0x37472d+0x1];_0x298437[_0x3f4bdc(0x315)][_0x446ca4]=_0x461bfc?decodeURIComponent(_0x461bfc):_0x298437[_0x3f4bdc(0x1b0)][_0x3f4bdc(0x2c1)][_0x3f4bdc(0x339)][_0x446ca4]??undefined;}));}let _0x3eb36d=null;const _0xcf062b=_0x23ff2c[_0x100eb2(0x1e9)]===_0x100eb2(0x787)?_0x100eb2(0x89d):_0x23ff2c[_0x100eb2(0x1e9)]?.[_0x100eb2(0x787)];_0xcf062b&&(_0x3eb36d=_0x399f68(_0x298437,_0xcf062b));if(_0x3eb36d&&_0x3eb36d[_0x100eb2(0x579)]('~')){const _0x2b20c6=_0x370c93(_0x2cd157),_0x536450=_0x2fb0f3(_0x33f5e5[_0x100eb2(0x496)]||[],(_0x33f5e5['grants']||{})[_0x3eb36d]||[]);if(!_0x4cfc49(_0x536450,_0x2b20c6))return{'status':0x193,'body':{'error':_0x100eb2(0x890)+_0x2b20c6+_0x100eb2(0x319)}};}const _0x160e22=_0x2fb0f3(_0x33f5e5['permissions']||[],_0x3eb36d?(_0x33f5e5[_0x100eb2(0x6fd)]||{})[_0x3eb36d]||[]:[]);if(!_0x4cfc49(_0x160e22,_0x2cd157))return{'status':0x193,'body':{'error':_0x100eb2(0x890)+_0x2cd157}};return null;}[_0x404acb(0x8a7)](_0x1ac1cb){const _0x4cd1a6=_0x404acb,_0x1cc6cb=_0x1ac1cb[_0x4cd1a6(0x1b0)],_0x49cf6d=_0x1cc6cb?.['operation'];if(!_0x49cf6d?.[_0x4cd1a6(0x78e)]||!_0x49cf6d['inputSchema'])return null;let _0x46c1be=_0x1ac1cb[_0x4cd1a6(0x315)]??null;if(!_0x46c1be&&_0x1cc6cb?.[_0x4cd1a6(0x2c1)]){const _0x344864=_0x1cc6cb[_0x4cd1a6(0x2c1)][_0x4cd1a6(0x316)][_0x4cd1a6(0x607)](_0x1ac1cb[_0x4cd1a6(0x5be)]);_0x344864&&(_0x46c1be={},_0x1cc6cb[_0x4cd1a6(0x2c1)][_0x4cd1a6(0x818)][_0x4cd1a6(0x881)]((_0x327f1d,_0x2119c9)=>{const _0x146284=_0x4cd1a6,_0x31d48a=_0x344864[_0x2119c9+0x1];_0x46c1be[_0x327f1d]=_0x31d48a?decodeURIComponent(_0x31d48a):_0x1cc6cb[_0x146284(0x2c1)][_0x146284(0x339)][_0x327f1d]??undefined;}));}const _0x720a4=_0x15607c(_0x1cc6cb,_0x46c1be??{},_0x1ac1cb[_0x4cd1a6(0x6d0)]??{},_0x1ac1cb[_0x4cd1a6(0x246)],_0x1ac1cb['headers']??{}),_0x5aa177=_0x565cf0(_0x1cc6cb,_0x720a4||{});if(!_0x5aa177)return null;const _0x3b578e=_0x11c3b9(_0x5aa177[_0x4cd1a6(0x511)]);return{'status':0x190,'body':{'error':_0x5aa177[_0x4cd1a6(0x2dc)],'code':_0x5aa177['code'],'message':_0x3b578e?'Validation\x20failed:\x20'+_0x3b578e:_0x4cd1a6(0x1ad),'details':_0x5aa177[_0x4cd1a6(0x511)]}};}['validateRouteInput'](_0x2162b5,_0x2bcad4){const _0x4d8690=_0x404acb,_0x20ad23=_0x565cf0(_0x2162b5,_0x2bcad4||{});if(!_0x20ad23)return null;return{'code':_0x20ad23[_0x4d8690(0x2dc)],'message':_0x11c3b9(_0x20ad23[_0x4d8690(0x511)])?_0x4d8690(0x305)+_0x11c3b9(_0x20ad23[_0x4d8690(0x511)]):_0x4d8690(0x1ad),'details':_0x20ad23[_0x4d8690(0x511)]};}async['_dispatch'](_0x2165e1){const _0x37458d=_0x404acb;if(_0x2165e1[_0x37458d(0x225)]===_0x37458d(0x618)){const _0x1085a9=this[_0x37458d(0x641)]('OPTIONS',_0x2165e1[_0x37458d(0x5be)],{'corsOnly':!![]});if(_0x1085a9)return{'status':0xcc,'headers':_0x137d18(_0x2165e1[_0x37458d(0x2b0)],_0x1085a9[_0x37458d(0x74c)][_0x37458d(0x294)],_0x1085a9[_0x37458d(0x225)])||{}};}const _0x1b6a7b=this[_0x37458d(0x641)](_0x2165e1[_0x37458d(0x225)],_0x2165e1[_0x37458d(0x5be)]);if(_0x1b6a7b){const _0x3ef6ad=_0x1b6a7b[_0x37458d(0x2c1)][_0x37458d(0x316)][_0x37458d(0x607)](_0x2165e1[_0x37458d(0x5be)]),_0x553e50={};_0x1b6a7b[_0x37458d(0x2c1)][_0x37458d(0x818)][_0x37458d(0x881)]((_0x2f7f65,_0x4d6104)=>{const _0x428df4=_0x37458d,_0x4b69b9=_0x3ef6ad[_0x4d6104+0x1];_0x553e50[_0x2f7f65]=_0x4b69b9?decodeURIComponent(_0x4b69b9):_0x1b6a7b[_0x428df4(0x2c1)]['defaults'][_0x2f7f65]??undefined;}),_0x2165e1['params']=_0x553e50;try{const _0x2c1eae=await _0x1b6a7b[_0x37458d(0x29f)]({'params':_0x553e50,'body':_0x2165e1[_0x37458d(0x246)],'query':_0x2165e1[_0x37458d(0x6d0)],'headers':_0x2165e1['headers'],'context':_0x2165e1[_0x37458d(0x28e)]}),_0x521a1c=_0x446926(_0x2c1eae),_0x44e65a=_0x137d18(_0x2165e1[_0x37458d(0x2b0)],_0x1b6a7b['meta']?.['cors'],_0x1b6a7b[_0x37458d(0x225)]);if(!_0x44e65a)return _0x521a1c;return{..._0x521a1c,'headers':{..._0x521a1c['headers']||{},..._0x44e65a}};}catch(_0x2a9d68){const _0x5d8058=_0x2a9d68?.[_0x37458d(0x2c4)]||_0x460813[_0x2a9d68?.[_0x37458d(0x2dc)]]||0x1f4;return{'status':_0x5d8058,'body':{'error':_0x2a9d68[_0x37458d(0x81d)]||_0x37458d(0x4d5),'code':_0x2a9d68?.[_0x37458d(0x2dc)]||_0x11e6bb[_0x5d8058]||'HTTP_'+_0x5d8058,'message':_0x2a9d68?.[_0x37458d(0x81d)]||_0x37458d(0x4d5),..._0x2a9d68?.[_0x37458d(0x844)]!=null?{'details':_0x2a9d68['details']}:{}}};}}return{'status':0x194,'body':{'error':_0x37458d(0x19d)}};}[_0x404acb(0x7a4)](_0x2d582c,_0x3ee527={}){const _0x26949b=_0x404acb;if(typeof _0x3ee527===_0x26949b(0x1d2)||Array[_0x26949b(0x59b)](_0x3ee527))_0x3ee527={'host':_0x3ee527};_0x3ee527=_0x3ee527??{};const _0x147314=Number(_0x3ee527['workers'])||0x0;if(_0x147314>=0x1||_0x3ee527[_0x26949b(0x1d9)]!=null||_0x3ee527[_0x26949b(0x47c)]!=null){const _0x833a19=new Error(_0x26949b(0x599)+_0x26949b(0x1ee)+'CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20'+_0x26949b(0x30c));_0x833a19[_0x26949b(0x2dc)]='HTTP_CLUSTER_REMOVED';throw _0x833a19;}if(this[_0x26949b(0x72d)])throw new Error(_0x26949b(0x82e));const _0x3991c0=_0x3ee527[_0x26949b(0x26b)]==null?[undefined]:[][_0x26949b(0x7fe)](_0x3ee527[_0x26949b(0x26b)]);if(!_0x3991c0['length']||_0x3991c0[_0x26949b(0x721)](_0x17e077=>_0x17e077!==undefined&&(typeof _0x17e077!=='string'||!_0x17e077))){const _0x213948=new Error(_0x26949b(0x2ce));_0x213948['code']=_0x26949b(0x1a2);throw _0x213948;}_0x2d582c&&this[_0x26949b(0x716)][_0x26949b(0x70f)]===_0x26949b(0x54a)&&(this[_0x26949b(0x716)][_0x26949b(0x70f)]=_0x26949b(0x3e7)+_0x2d582c,this[_0x26949b(0x2ed)]?.[_0x26949b(0x716)]&&(this['_okdb'][_0x26949b(0x716)]['_cookieName']=this[_0x26949b(0x716)][_0x26949b(0x70f)]));const _0x2a87dd=this[_0x26949b(0x2ed)]?.[_0x26949b(0x3e9)]?.['debug']?.['logRequests']??![],_0x4b460e=async(_0x287439,_0x574908)=>{const _0x6c9eab=_0x26949b,_0x48d6b5=Date[_0x6c9eab(0x4ec)]();if(_0x2a87dd){const _0xc0ad67=_0x287439[_0x6c9eab(0x534)]||'/',_0x335edf=_0x287439['headers']?.[_0x6c9eab(0x62c)]?_0x287439[_0x6c9eab(0x2b0)][_0x6c9eab(0x62c)][_0x6c9eab(0x813)](/^Bearer\s+(\S{0,8})\S*/i,_0x6c9eab(0x30a)):'-',_0x4af072=_0x287439[_0x6c9eab(0x2b0)]?.['cf-ray']||'-',_0x4756da=_0x287439[_0x6c9eab(0x2b0)]?.[_0x6c9eab(0x6ce)]||_0x287439[_0x6c9eab(0x2b0)]?.['x-forwarded-for']||'-',_0x32ea8f=_0x287439[_0x6c9eab(0x2b0)]?.['origin']||'-';process[_0x6c9eab(0x498)][_0x6c9eab(0x82b)]('[req]\x20'+_0x287439[_0x6c9eab(0x225)][_0x6c9eab(0x708)](0x7)+'\x20'+_0xc0ad67[_0x6c9eab(0x708)](0x2d)+'\x20'+('auth='+_0x335edf+_0x6c9eab(0x3b8)+_0x32ea8f+_0x6c9eab(0x425)+_0x4af072+_0x6c9eab(0x848)+_0x4756da+'\x0a'));}try{const _0x158cec=new _0x3ad444(_0x287439[_0x6c9eab(0x534)],_0x6c9eab(0x767)+_0x287439['headers'][_0x6c9eab(0x26b)]),_0x5ba5ba=this[_0x6c9eab(0x7df)](_0x287439[_0x6c9eab(0x225)],_0x158cec['pathname']),_0x2ed254=_0x5ba5ba?.[_0x6c9eab(0x74c)]?.[_0x6c9eab(0x1c3)]===!![];if(_0x2ed254){const _0x5c0d27=_0x287439[_0x6c9eab(0x2b0)]?.[_0x6c9eab(0x735)];if(_0x5c0d27!=null){const _0x37ce9b=Number(_0x5c0d27);if(Number[_0x6c9eab(0x72e)](_0x37ce9b)&&_0x37ce9b>this[_0x6c9eab(0x766)]){_0x574908[_0x6c9eab(0x73b)]=0x19d,_0x574908[_0x6c9eab(0x63d)]('Payload\x20too\x20large');return;}}}const _0x2c20a8=_0x2ed254?null:await _0x1ebf77(_0x287439,this['maxBodyBytes']),_0x1b1ca6=_0x2ed254?_0x4af4e1(_0x287439,this['maxBodyBytes']):undefined,_0x36b6c7=await this[_0x6c9eab(0x88f)](_0x287439[_0x6c9eab(0x225)],_0x158cec['pathname'],{'body':_0x2c20a8,'query':Object[_0x6c9eab(0x324)](_0x158cec[_0x6c9eab(0x24e)][_0x6c9eab(0x87f)]()),'headers':_0x287439[_0x6c9eab(0x2b0)]},{'req':_0x287439,'res':_0x574908,'rawStream':_0x1b1ca6}),_0x130a66=this['_matchRoute'](_0x287439[_0x6c9eab(0x225)],_0x158cec[_0x6c9eab(0x64f)]),_0x4b9777=Date['now']()-_0x48d6b5,_0x17bddf=this['_shouldWrapResponse'](_0x130a66,_0x36b6c7)?this[_0x6c9eab(0x4a4)](_0x36b6c7,_0x4b9777):_0x446926(_0x36b6c7),_0x4cfebc=(_0x17bddf[_0x6c9eab(0x2c4)]||0xc8)>=0x190;this['metrics']['record'](_0x287439[_0x6c9eab(0x225)],_0x4b9777,_0x4cfebc),_0x12011f(_0x574908,_0x17bddf);if(_0x2a87dd){const _0x108800=_0x17bddf[_0x6c9eab(0x2c4)]||0xc8,_0x2dc525=Date[_0x6c9eab(0x4ec)]()-_0x48d6b5;process['stdout']['write'](_0x6c9eab(0x645)+_0x287439['method']['padEnd'](0x7)+'\x20'+_0x158cec['pathname'][_0x6c9eab(0x708)](0x2d)+'\x20'+_0x108800+'\x20\x20'+_0x2dc525+'ms\x0a');}}catch(_0x7d2f66){const _0x470cd7=Date['now']()-_0x48d6b5;this[_0x6c9eab(0x6d8)][_0x6c9eab(0x639)](_0x287439[_0x6c9eab(0x225)],_0x470cd7,!![]);const _0x27b33d=_0x7d2f66?.[_0x6c9eab(0x2c4)]||0x1f4;_0x574908['statusCode']=_0x27b33d,_0x27b33d===0x19d?_0x574908[_0x6c9eab(0x63d)](_0x6c9eab(0x39d)):_0x574908[_0x6c9eab(0x63d)](_0x7d2f66[_0x6c9eab(0x81d)]||_0x6c9eab(0x4d5));}};this[_0x26949b(0x39f)]=_0x3991c0['map'](_0x3e5c64=>{const _0x1e2e23=_0x26949b,_0x1cecff=_0x5e3a3d[_0x1e2e23(0x37a)](_0x4b460e);_0x1cecff['on'](_0x1e2e23(0x1df),_0x16d73d=>{const _0x369d78=_0x1e2e23;this[_0x369d78(0x7c2)][_0x369d78(0x4da)](_0x16d73d),_0x16d73d['on']('close',()=>this['_sockets'][_0x369d78(0x360)](_0x16d73d));});if(_0x3e5c64===undefined)_0x1cecff[_0x1e2e23(0x7a4)](_0x2d582c);else _0x1cecff[_0x1e2e23(0x7a4)](_0x2d582c,_0x3e5c64);return _0x1cecff;}),this[_0x26949b(0x72d)]=this[_0x26949b(0x39f)][0x0];for(const _0x5effac of this[_0x26949b(0x39f)][_0x26949b(0x27f)](0x1))_0x5effac['on'](_0x26949b(0x6cd),_0x1dcc84=>this[_0x26949b(0x72d)]?.[_0x26949b(0x663)](_0x26949b(0x6cd),_0x1dcc84));const _0x1f7dec=_0x14fb60(_0x2d582c,_0x3ee527['host']),_0x48bf7d=this[_0x26949b(0x2ed)];return _0x48bf7d?.['processes']&&(_0x48bf7d['processes'][_0x26949b(0x4af)](_0x1f7dec),require$$1$1['isWorker']?_0x48bf7d['_activateProcessesReader']?.({'kind':_0x26949b(0x3d4)})[_0x26949b(0x39e)](()=>{}):_0x48bf7d[_0x26949b(0x322)]?.({'kind':_0x26949b(0x458),'listenAddr':_0x1f7dec})[_0x26949b(0x39e)](()=>{})),this[_0x26949b(0x72d)];}async[_0x404acb(0x6e0)](_0x5be0d7={}){const _0x90b845=_0x404acb,_0x3a8dbb=this[_0x90b845(0x72d)];this[_0x90b845(0x72d)]=null;const _0x42e8a4=this[_0x90b845(0x39f)][_0x90b845(0x1a1)](_0x3a8dbb)?this[_0x90b845(0x39f)]:_0x3a8dbb?[_0x3a8dbb]:[];this[_0x90b845(0x39f)]=[];if(_0x3a8dbb&&_0x3a8dbb['_isClusterController']){try{await _0x3a8dbb[_0x90b845(0x6e0)]();}catch{}this['metrics']&&this[_0x90b845(0x6d8)][_0x90b845(0x6e0)]();return;}if(_0x42e8a4[_0x90b845(0x6ad)]){const _0x264641=_0x5be0d7['forceAfterMs']===Infinity?Infinity:Number[_0x90b845(0x72e)](_0x5be0d7[_0x90b845(0x71c)])?Math[_0x90b845(0x413)](0x0,_0x5be0d7[_0x90b845(0x71c)]):0x3e8,_0x30fd9d=_0x3907c2=>new Promise(_0x1c308f=>{const _0x21ecc9=_0x90b845;let _0x547f75=![],_0x1222dd=null,_0x21341b=null;const _0x1b256c=()=>{if(_0x547f75)return;_0x547f75=!![];if(_0x1222dd)clearTimeout(_0x1222dd);if(_0x21341b)clearTimeout(_0x21341b);_0x1c308f();};try{_0x3907c2[_0x21ecc9(0x6e0)](_0x1b256c);}catch{_0x1b256c();return;}try{_0x3907c2[_0x21ecc9(0x253)]?.();}catch{}if(_0x1e985f(_0x264641))return;_0x1222dd=setTimeout(()=>{const _0x222486=_0x21ecc9;try{_0x3907c2[_0x222486(0x1f4)]?.();}catch{}for(const _0x311f44 of this[_0x222486(0x7c2)]){try{_0x311f44[_0x222486(0x6e6)]();}catch{}}_0x21341b=setTimeout(_0x1b256c,0x64),_0x21341b[_0x222486(0x895)]?.();},_0x428b58(_0x264641)),_0x1222dd['unref']?.();});await Promise['all'](_0x42e8a4[_0x90b845(0x595)](_0x30fd9d));}this[_0x90b845(0x6d8)]&&this[_0x90b845(0x6d8)][_0x90b845(0x6e0)]();}[_0x404acb(0x7b1)](_0x1443f2,_0x21f5de,_0x30e0cc=0x36ee80){const _0x37cc46=_0x404acb,_0x7ae0ec=Date[_0x37cc46(0x4ec)](),_0x457f45=Buffer['from'](JSON[_0x37cc46(0x2d1)]({'iat':_0x7ae0ec,'exp':_0x7ae0ec+_0x30e0cc,..._0x1443f2}))[_0x37cc46(0x4b9)](_0x37cc46(0x76d)),_0x73b816=_0x554977(_0x457f45,_0x21f5de);return _0x457f45+'.'+_0x73b816;}[_0x404acb(0x3fd)](_0x23d01e,_0x464c87={}){const _0x5cd42a=_0x404acb,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x5cd42a(0x854),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x464c87;let _0x3156f7=this[_0x5cd42a(0x716)][_0x5cd42a(0x70f)]+'='+_0x23d01e;if(httpOnly)_0x3156f7+=';\x20HttpOnly';if(sameSite)_0x3156f7+=_0x5cd42a(0x3ca)+sameSite;if(path)_0x3156f7+=_0x5cd42a(0x6bf)+path;if(secure)_0x3156f7+=_0x5cd42a(0x851);if(Number[_0x5cd42a(0x72e)](maxAge))_0x3156f7+=_0x5cd42a(0x784)+Math['max'](0x0,Math[_0x5cd42a(0x2d7)](maxAge));if(expires instanceof Date)_0x3156f7+=_0x5cd42a(0x8bd)+expires[_0x5cd42a(0x3da)]();return _0x3156f7;}[_0x404acb(0x420)](_0x589b18=this['auth'][_0x404acb(0x70f)],_0x4af202={}){const _0x3aa103=_0x404acb,{path:path='/',sameSite:sameSite='Lax',secure:secure=![],httpOnly:httpOnly=!![]}=_0x4af202;let _0xf9090d=_0x589b18+'=';if(httpOnly)_0xf9090d+=';\x20HttpOnly';if(sameSite)_0xf9090d+=_0x3aa103(0x3ca)+sameSite;if(path)_0xf9090d+=';\x20Path='+path;if(secure)_0xf9090d+=_0x3aa103(0x851);return _0xf9090d+=_0x3aa103(0x64d),_0xf9090d;}[_0x404acb(0x3d1)](_0x2998b2,_0xebc858){const _0x15455a=_0x404acb;if(!_0x2998b2)return null;const [_0x42cfb8,_0x1c0814]=String(_0x2998b2)['split']('.');if(!_0x42cfb8||!_0x1c0814)return null;const _0x2003b1=_0x554977(_0x42cfb8,_0xebc858);if(!_0x43084e(_0x1c0814,_0x2003b1))return null;try{const _0x189943=JSON['parse'](Buffer[_0x15455a(0x215)](_0x42cfb8,'base64url')[_0x15455a(0x4b9)]());if(_0x189943[_0x15455a(0x227)]<=Date[_0x15455a(0x4ec)]())return null;return _0x189943;}catch{return null;}}[_0x404acb(0x66d)](_0x144fab){const _0x13c368=_0x404acb;if(this[_0x13c368(0x2ed)]?.['auth'])return this[_0x13c368(0x2ed)][_0x13c368(0x716)][_0x13c368(0x66d)](_0x144fab);return _0x10be7f(_0x144fab);}[_0x404acb(0x5ed)](_0x3f0765){const _0x34ac4a=_0x404acb;if(this[_0x34ac4a(0x2ed)]?.['auth'])return this[_0x34ac4a(0x2ed)][_0x34ac4a(0x716)][_0x34ac4a(0x5ed)](_0x3f0765);const _0x12a337=this[_0x34ac4a(0x228)]?.['tokenTtl']??0x36ee80,_0x150ac7=this['_authOptions']?.[_0x34ac4a(0x5dc)];return _0x21d830(_0x3f0765,_0x150ac7,_0x12a337);}[_0x404acb(0x4b5)](_0x5d21b9){const _0x31359f=_0x404acb;if(this[_0x31359f(0x2ed)]?.[_0x31359f(0x716)])return this[_0x31359f(0x2ed)][_0x31359f(0x716)][_0x31359f(0x4b5)](_0x5d21b9);const _0x30d6b0=this[_0x31359f(0x228)]?.[_0x31359f(0x5dc)];return _0x401c61(_0x5d21b9,_0x30d6b0);}async['authenticateRequest'](_0x51503d){const _0x3d4f=_0x404acb;if(this[_0x3d4f(0x2ed)]?.['auth'])return this[_0x3d4f(0x2ed)][_0x3d4f(0x716)][_0x3d4f(0x6ac)](_0x51503d);if(_0x51503d[_0x3d4f(0x28e)]?.[_0x3d4f(0x558)]===!![]||this[_0x3d4f(0x87d)]===_0x3d4f(0x5f0))return{'id':_0x3d4f(0x7f0),'username':_0x3d4f(0x7f0),'roles':[_0x3d4f(0x1bb)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':'system','username':_0x3d4f(0x7f0),'roles':['admin'],'isAuthenticated':!![],'isSystem':!![]}};const _0x3d7c5e=this[_0x3d4f(0x66d)](_0x51503d[_0x3d4f(0x2b0)]?.[_0x3d4f(0x62c)]),_0x2c2817=_0x51503d[_0x3d4f(0x4f4)]?.[this[_0x3d4f(0x716)]['cookieName']],_0x355de4=_0x3d7c5e||_0x2c2817;if(!_0x355de4)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x298c50=this[_0x3d4f(0x4b5)](_0x355de4);if(!_0x298c50)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x5ec1d4={'id':_0x298c50[_0x3d4f(0x6f3)]??null,'username':_0x298c50['username']??null,'roles':Array[_0x3d4f(0x59b)](_0x298c50['roles'])?_0x298c50[_0x3d4f(0x615)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x5ec1d4['id'],'username':_0x5ec1d4[_0x3d4f(0x479)],'roles':_0x5ec1d4[_0x3d4f(0x615)],'isAuthenticated':!![],'isSystem':![],'user':_0x5ec1d4,'claims':_0x298c50,'subject':_0x5ec1d4['id']};}async[_0x404acb(0x200)](_0x2be2d0,_0x54d0bc={}){const _0x132fe3=_0x404acb,_0x178b99=_0x512421(_0x2be2d0),_0x28b0f4=Array[_0x132fe3(0x59b)](_0x54d0bc['allowedAlgs'])&&_0x54d0bc[_0x132fe3(0x5ec)][_0x132fe3(0x6ad)]>0x0?_0x54d0bc['allowedAlgs']:[_0x132fe3(0x3f0),_0x132fe3(0x8c9)],_0xa8c6e8=_0x178b99['header']?.[_0x132fe3(0x2c7)];if(!_0x28b0f4['includes'](_0xa8c6e8))throw new Error('Unsupported\x20JWT\x20alg:\x20'+_0xa8c6e8);if(!_0x178b99[_0x132fe3(0x364)]?.[_0x132fe3(0x5a5)])throw new Error(_0x132fe3(0x4d2));const _0x9abea2=await this[_0x132fe3(0x467)](_0x54d0bc);if(!_0x9abea2?.['jwks_uri'])throw new Error(_0x132fe3(0x521));const _0x383a85=await this[_0x132fe3(0x387)](_0x9abea2[_0x132fe3(0x495)],_0x178b99[_0x132fe3(0x364)][_0x132fe3(0x5a5)],_0x54d0bc);if(!_0x855de5(_0xa8c6e8,_0x383a85,_0x178b99['signingInput'],_0x178b99[_0x132fe3(0x899)]))throw new Error('JWT\x20signature\x20verification\x20failed');const _0x58aa4c=Math[_0x132fe3(0x2d7)](Date[_0x132fe3(0x4ec)]()/0x3e8),_0x41b4d1=_0x178b99[_0x132fe3(0x610)]||{};if(_0x41b4d1[_0x132fe3(0x490)]!==_0x9abea2['issuer'])throw new Error(_0x132fe3(0x264));const _0x245a81=_0x54d0bc['audience'];if(_0x245a81){const _0x31196f=_0xce76c9(_0x41b4d1[_0x132fe3(0x40d)]);if(!_0x31196f[_0x132fe3(0x1a1)](_0x245a81))throw new Error(_0x132fe3(0x5d5));}if(typeof _0x41b4d1[_0x132fe3(0x227)]!==_0x132fe3(0x72c)||_0x41b4d1[_0x132fe3(0x227)]<=_0x58aa4c)throw new Error(_0x132fe3(0x474));if(_0x41b4d1[_0x132fe3(0x470)]!=null&&_0x41b4d1[_0x132fe3(0x470)]>_0x58aa4c)throw new Error(_0x132fe3(0x672));if(_0x41b4d1[_0x132fe3(0x582)]==='id')throw new Error(_0x132fe3(0x6f2));return{'subject':_0x41b4d1[_0x132fe3(0x6f3)]??null,'email':_0x41b4d1['email']??null,'scopes':typeof _0x41b4d1[_0x132fe3(0x1e9)]===_0x132fe3(0x1d2)?_0x41b4d1[_0x132fe3(0x1e9)][_0x132fe3(0x84e)](/\s+/)[_0x132fe3(0x542)](Boolean):[],'claims':_0x41b4d1,'tokenType':_0x132fe3(0x6cc)};}async[_0x404acb(0x467)](_0x266baf={}){const _0x16cf98=_0x404acb,_0x1e6245=String(_0x266baf['issuer']||'')[_0x16cf98(0x813)](/\/+$/,'');if(!_0x1e6245)return null;const _0x135138=Number[_0x16cf98(0x72e)](_0x266baf[_0x16cf98(0x4fc)])?_0x266baf[_0x16cf98(0x4fc)]:0xa*0x3c*0x3e8;if(this[_0x16cf98(0x66c)]?.['issuer']===_0x1e6245&&this[_0x16cf98(0x66c)][_0x16cf98(0x282)]>Date[_0x16cf98(0x4ec)]())return this['_oidcDiscoveryCache'][_0x16cf98(0x352)];const _0x5b3762=await _0x1bd512(_0x1e6245+'/.well-known/openid-configuration'),_0x205014={'issuer':_0x5b3762[_0x16cf98(0x6db)]||_0x1e6245,'authorization_endpoint':_0x266baf[_0x16cf98(0x245)]||_0x5b3762['authorization_endpoint'],'token_endpoint':_0x266baf['tokenUrl']||_0x5b3762[_0x16cf98(0x214)],'jwks_uri':_0x266baf[_0x16cf98(0x7de)]||_0x5b3762[_0x16cf98(0x495)]};return this[_0x16cf98(0x66c)]={'issuer':_0x1e6245,'value':_0x205014,'expiresAt':Date[_0x16cf98(0x4ec)]()+_0x135138},_0x205014;}async['_fetchJwks'](_0xfd0db,_0x590197=0x5*0x3c*0x3e8){const _0x59428b=_0x404acb,_0x274c1f=await _0x1bd512(_0xfd0db),_0x2d2728=new Map();for(const _0x46a7fb of _0x274c1f[_0x59428b(0x818)]||[]){if(!_0x46a7fb?.[_0x59428b(0x5a5)])continue;_0x2d2728[_0x59428b(0x259)](_0x46a7fb['kid'],_0x3b1d97(_0x46a7fb));}return this[_0x59428b(0x24c)]={'uri':_0xfd0db,'keys':_0x2d2728,'expiresAt':Date[_0x59428b(0x4ec)]()+_0x590197},this['_jwksCache'];}async['_getJwkKey'](_0x4c7f73,_0x1335c6,_0x8e1cdc={}){const _0x544a88=_0x404acb,_0x2a3afd=Number[_0x544a88(0x72e)](_0x8e1cdc[_0x544a88(0x667)])?_0x8e1cdc['jwksTtlMs']:0x5*0x3c*0x3e8,_0x5615a4=0x1e*0x3e8,_0xd804f7=this[_0x544a88(0x8a5)][_0x544a88(0x2fa)](_0x1335c6);if(_0xd804f7!==undefined&&_0xd804f7>Date['now']())throw new Error(_0x544a88(0x5d3)+_0x1335c6);(!this[_0x544a88(0x24c)]||this['_jwksCache']['uri']!==_0x4c7f73||this[_0x544a88(0x24c)]['expiresAt']<=Date[_0x544a88(0x4ec)]())&&await this[_0x544a88(0x5ac)](_0x4c7f73,_0x2a3afd);let _0xc2f158=this[_0x544a88(0x24c)]?.[_0x544a88(0x818)]?.[_0x544a88(0x2fa)](_0x1335c6);if(_0xc2f158)return _0xc2f158;await this[_0x544a88(0x5ac)](_0x4c7f73,_0x2a3afd),_0xc2f158=this['_jwksCache']?.[_0x544a88(0x818)]?.[_0x544a88(0x2fa)](_0x1335c6);if(!_0xc2f158){this[_0x544a88(0x8a5)][_0x544a88(0x259)](_0x1335c6,Date[_0x544a88(0x4ec)]()+_0x5615a4);throw new Error(_0x544a88(0x5d3)+_0x1335c6);}return _0xc2f158;}[_0x404acb(0x79d)](_0xfa6e7d){const _0x5d8b53=_0x404acb;if(this[_0x5d8b53(0x2ed)]?.[_0x5d8b53(0x716)])return this[_0x5d8b53(0x2ed)][_0x5d8b53(0x716)][_0x5d8b53(0x79d)](_0xfa6e7d);const _0x4ffef6=_0xfa6e7d?.['claims']||{},_0x25324c={'sub':_0xfa6e7d?.[_0x5d8b53(0x4e0)]??_0x4ffef6[_0x5d8b53(0x6f3)]??null,'email':_0xfa6e7d?.['email']??_0x4ffef6[_0x5d8b53(0x5a7)]??null,'name':_0xfa6e7d?.[_0x5d8b53(0x4f9)]??_0x4ffef6[_0x5d8b53(0x4f9)]??_0x4ffef6[_0x5d8b53(0x38f)]??null,'groups':_0xfa6e7d?.[_0x5d8b53(0x3e2)]??_0x4ffef6[_0x5d8b53(0x3e2)]??[],'roles':_0xfa6e7d?.['roles']??_0x4ffef6['roles']??[]};return{'type':_0x5d8b53(0x725),'tokenType':_0xfa6e7d?.['tokenType']??_0x5d8b53(0x6cc),'subject':_0x25324c[_0x5d8b53(0x6f3)],'email':_0x25324c[_0x5d8b53(0x5a7)],'scopes':_0xfa6e7d?.[_0x5d8b53(0x2a7)]??_0x4ffef6[_0x5d8b53(0x1e9)]?.['split']?.('\x20')?.[_0x5d8b53(0x542)](Boolean)??[],'claims':_0x4ffef6,'user':_0x25324c,'isAuthenticated':!![]};}[_0x404acb(0x43b)](_0x5150a0={},_0x2676f7=0x927c0){const _0x157d0a=_0x404acb;if(this[_0x157d0a(0x2ed)]?.['auth'])return this[_0x157d0a(0x2ed)][_0x157d0a(0x716)]['createLoginState'](_0x5150a0,_0x2676f7);const _0x19cd72=_0x52e40e(0x18);this['_loginStates'][_0x157d0a(0x259)](_0x19cd72,{..._0x5150a0,'exp':Date[_0x157d0a(0x4ec)]()+_0x2676f7});if(this[_0x157d0a(0x548)]['size']%0x32===0x0){const _0x1bf8b3=Date[_0x157d0a(0x4ec)]();for(const [_0x53a1a3,_0x360de7]of this['_loginStates']){if(_0x360de7[_0x157d0a(0x227)]<=_0x1bf8b3)this[_0x157d0a(0x548)]['delete'](_0x53a1a3);}}return _0x19cd72;}[_0x404acb(0x853)](_0x5dc212){const _0x919b0=_0x404acb;if(this[_0x919b0(0x2ed)]?.[_0x919b0(0x716)])return this[_0x919b0(0x2ed)]['auth'][_0x919b0(0x853)](_0x5dc212);if(!_0x5dc212)return null;const _0x1e3f4d=this[_0x919b0(0x548)][_0x919b0(0x2fa)](_0x5dc212);this[_0x919b0(0x548)][_0x919b0(0x360)](_0x5dc212);if(!_0x1e3f4d)return null;if(_0x1e3f4d[_0x919b0(0x227)]<=Date[_0x919b0(0x4ec)]())return null;return _0x1e3f4d;}}function _0x446926(_0x1bb50a){const _0x1d8145=_0x404acb;if(_0x1bb50a==null)return{'status':0xcc};if(Buffer[_0x1d8145(0x1a0)](_0x1bb50a)||_0x4efe79(_0x1bb50a))return{'status':0xc8,'body':_0x1bb50a};if(typeof _0x1bb50a===_0x1d8145(0x601)&&'status'in _0x1bb50a){if(!(_0x1d8145(0x246)in _0x1bb50a)&&!_0x4efe79(_0x1bb50a[_0x1d8145(0x246)])){const {status:_0x5515de,headers:_0x5527d3,..._0x2ed8a8}=_0x1bb50a;if(Object['keys'](_0x2ed8a8)[_0x1d8145(0x6ad)]>0x0)return{'status':_0x5515de,'headers':_0x5527d3,'body':_0x2ed8a8};}return _0x1bb50a;}return{'status':0xc8,'body':_0x1bb50a};}function _0x4efe79(_0x21cd7c){const _0x249970=_0x404acb;return _0x21cd7c&&typeof _0x21cd7c[_0x249970(0x218)]===_0x249970(0x7ca);}function _0x4af4e1(_0x3c8fbc,_0x46cd6d){const _0x22bfe1=_0x404acb,{PassThrough:_0x4d1520}=require$$5;let _0x54e213=0x0,_0x5ebdcc=![];const _0x5b966b=new _0x4d1520();return _0x3c8fbc['on'](_0x22bfe1(0x2a3),_0x58c6ac=>{const _0x52734f=_0x22bfe1;if(_0x5ebdcc)return;_0x54e213+=_0x58c6ac[_0x52734f(0x6ad)];if(_0x54e213>_0x46cd6d){_0x5ebdcc=!![];const _0x110afb=new Error(_0x52734f(0x39d));_0x110afb[_0x52734f(0x2c4)]=0x19d,_0x5b966b[_0x52734f(0x6e6)](_0x110afb);return;}if(!_0x5b966b['destroyed'])_0x5b966b[_0x52734f(0x557)](_0x58c6ac);}),_0x3c8fbc['on'](_0x22bfe1(0x63d),()=>{const _0x4d311b=_0x22bfe1;!_0x5ebdcc&&!_0x5b966b[_0x4d311b(0x733)]&&(_0x5ebdcc=!![],_0x5b966b['end']());}),_0x3c8fbc['on'](_0x22bfe1(0x6cd),_0x2661c2=>{const _0x17b16f=_0x22bfe1;if(!_0x5b966b[_0x17b16f(0x733)])_0x5b966b[_0x17b16f(0x6e6)](_0x2661c2);}),_0x3c8fbc[_0x22bfe1(0x501)](),_0x5b966b['on'](_0x22bfe1(0x85b),()=>{const _0x49ef29=_0x22bfe1;if(!_0x5b966b[_0x49ef29(0x733)])_0x3c8fbc[_0x49ef29(0x85b)]();}),_0x5b966b;}function _0x1ebf77(_0x566506,_0x30393f){const _0x1cf530=_0x404acb;if(_0x566506[_0x1cf530(0x225)]===_0x1cf530(0x318)||_0x566506['method']===_0x1cf530(0x8b6))return null;const _0x2fa783=_0x566506['headers']?.[_0x1cf530(0x735)];if(_0x2fa783!=null){const _0x25ca4f=Number(_0x2fa783);if(Number['isFinite'](_0x25ca4f)&&_0x25ca4f>_0x30393f){const _0x79beb8=new Error(_0x1cf530(0x39d));_0x79beb8['status']=0x19d;throw _0x79beb8;}}return new Promise((_0x400622,_0x204ab3)=>{let _0x238132='',_0xe5b3ab=0x0;_0x566506['on']('data',_0x3a21b9=>{const _0x5691f2=_0x4c4a;_0xe5b3ab+=_0x3a21b9[_0x5691f2(0x6ad)];if(_0xe5b3ab>_0x30393f){try{_0x566506[_0x5691f2(0x6e6)]();}catch{}const _0x595fe3=new Error(_0x5691f2(0x39d));_0x595fe3[_0x5691f2(0x2c4)]=0x19d,_0x204ab3(_0x595fe3);return;}_0x238132+=_0x3a21b9;}),_0x566506['on']('end',()=>{const _0xf7b885=_0x4c4a;if(!_0x238132)return _0x400622(null);const _0x2bb9b2=_0x566506['headers']?.[_0xf7b885(0x52a)]||'';if(_0x2bb9b2['includes'](_0xf7b885(0x43f))){const _0x690e8={};for(const [_0x37ab0b,_0x2708fc]of new URLSearchParams(_0x238132))_0x690e8[_0x37ab0b]=_0x2708fc;return _0x400622(_0x690e8);}try{_0x400622(JSON[_0xf7b885(0x7d3)](_0x238132));}catch(_0x4b9602){_0x204ab3(_0x4b9602);}}),_0x566506['on']('error',_0x204ab3);});}function _0x12011f(_0x5234ee,_0x12cec5){const _0x5cc11b=_0x404acb,{status:status=0xc8,headers:headers={},body:_0x4d2b37}=_0x12cec5;_0x5234ee[_0x5cc11b(0x73b)]=status;for(const [_0x1ce74b,_0x49ae9c]of Object[_0x5cc11b(0x87f)](headers)){_0x5234ee[_0x5cc11b(0x559)](_0x1ce74b,_0x49ae9c);}if(_0x4d2b37==null){_0x5234ee[_0x5cc11b(0x63d)]();return;}if(_0x4efe79(_0x4d2b37)){_0x4d2b37[_0x5cc11b(0x218)](_0x5234ee);return;}if(Buffer[_0x5cc11b(0x1a0)](_0x4d2b37)){_0x5234ee[_0x5cc11b(0x63d)](_0x4d2b37);return;}if(typeof _0x4d2b37==='object'){!_0x5234ee[_0x5cc11b(0x323)](_0x5cc11b(0x886))&&_0x5234ee['setHeader']('Content-Type','application/json');_0x5234ee['end'](JSON['stringify'](_0x4d2b37));return;}_0x5234ee[_0x5cc11b(0x63d)](String(_0x4d2b37));}function _0x14fb60(_0x3f97ef,_0x18377e){const _0x14cdb2=_0x404acb;if(_0x18377e==null)return':'+_0x3f97ef;return[][_0x14cdb2(0x7fe)](_0x18377e)['map'](_0x3ea151=>(_0x3ea151[_0x14cdb2(0x1a1)](':')?'['+_0x3ea151+']':_0x3ea151)+':'+_0x3f97ef)[_0x14cdb2(0x1c9)](',\x20');}return okdbHttp[_0x404acb(0x7ac)]=_0x1d4309,okdbHttp[_0x404acb(0x7ac)]['formatListenAddr']=_0x14fb60,okdbHttp[_0x404acb(0x7ac)][_0x404acb(0x54b)]=_0x460813,okdbHttp[_0x404acb(0x7ac)];}var okdbShmSegment,hasRequiredOkdbShmSegment;function requireOkdbShmSegment(){const _0xe0eedf=_0x1a2e0d;if(hasRequiredOkdbShmSegment)return okdbShmSegment;hasRequiredOkdbShmSegment=0x1;const _0x345cfd=require$$0$1,_0x168686=require$$2$1,_0x4696f4=0x80,_0x289c8f=0x0,_0x1ba207=0x1,_0x1dec8c=0x2,_0xca2d4f=0x3,_0x23bdda=0x4,_0x2cee61=_0x23bdda+_0x4696f4,_0x34c6cc=_0x2cee61+_0x4696f4,_0x3d2219=require$$2$2[_0xe0eedf(0x646)],_0x230655=_0x34c6cc*0x4,_0x346b0b=process[_0xe0eedf(0x202)]!==_0xe0eedf(0x723),_0x1a899b=0xc,_0x17066c=process[_0xe0eedf(0x202)]==='darwin'?0x1f:0xa0,_0x2e598e=/^[A-Za-z0-9-]+(?:_boot)?$/,_0x48980f=/^[A-Za-z0-9-]*-[0-9a-f]{12}(?:_boot)?$/,_0x3c77d4=_0x3c7a5c=>_0x3c7a5c[_0xe0eedf(0x813)](/[^a-zA-Z0-9]/g,'-');function _0x2ae123(_0x476b71,_0x2e9148=''){const _0x2acac7=_0xe0eedf;if(typeof _0x476b71!==_0x2acac7(0x1d2)||_0x476b71==='')throw new TypeError(_0x2acac7(0x7fc));if(_0x2e9148!==''&&!/^_[A-Za-z0-9]+$/[_0x2acac7(0x3f6)](_0x2e9148))throw new TypeError(_0x2acac7(0x28b)+JSON[_0x2acac7(0x2d1)](_0x2e9148)+')');const _0x2b46fd=_0x168686[_0x2acac7(0x3b9)]('sha256')[_0x2acac7(0x56e)](_0x476b71)[_0x2acac7(0x656)](_0x2acac7(0x6b1))[_0x2acac7(0x27f)](0x0,_0x1a899b),_0x829a15=Math[_0x2acac7(0x413)](0x0,_0x17066c-0x1-_0x1a899b-_0x2e9148[_0x2acac7(0x6ad)]);return _0x3c77d4(_0x476b71)['slice'](0x0,_0x829a15)+'-'+_0x2b46fd+_0x2e9148;}function _0x1b6c64(_0x5b3d0a,_0x437d0f=''){return''+_0x3c77d4(_0x5b3d0a)+_0x437d0f;}function _0x347ea7(_0x48a8e0){const _0xaf5613=_0xe0eedf;if(_0x48980f['test'](_0x48a8e0))return _0xaf5613(0x359);if(_0x2e598e['test'](_0x48a8e0))return _0xaf5613(0x789);return null;}const _0x586405={'onMapped':null,'onClaimed':null,'onRetiring':null},_0xf9e57d=_0xef1733=>Math['ceil'](_0xef1733/0x8)*0x8,_0x6321ff=_0x58e9ee=>_0xf9e57d(_0x58e9ee)+_0x230655;function _0x4814f2(_0x1dca0f){const _0x49301f=_0xe0eedf;try{return process[_0x49301f(0x486)](_0x1dca0f,0x0),![];}catch(_0x1cac17){return _0x1cac17[_0x49301f(0x2dc)]===_0x49301f(0x55c);}}const _0x2264ac=new Int32Array(new SharedArrayBuffer(0x4));function _0xb4e2c4(_0x560a6d){const _0xe19991=_0xe0eedf;if(_0x560a6d>0x0)Atomics[_0xe19991(0x79e)](_0x2264ac,0x0,0x0,_0x560a6d);}function _0x47bafa(_0x4e13aa,_0x2df505){const _0x1a2bbe=_0xe0eedf;if(process[_0x1a2bbe(0x202)]!==_0x1a2bbe(0x674))return;let _0x432034;try{_0x432034=_0x345cfd[_0x1a2bbe(0x849)](_0x1a2bbe(0x632)+_0x4e13aa,'r+');if(_0x345cfd[_0x1a2bbe(0x824)](_0x432034)['size']<_0x2df505)_0x345cfd[_0x1a2bbe(0x7e9)](_0x432034,_0x2df505);}catch{}finally{if(_0x432034!==undefined)try{_0x345cfd[_0x1a2bbe(0x57d)](_0x432034);}catch{}}}function _0x51e289(_0x1213c4,_0x47d735){const _0x265277=_0xe0eedf,_0x270363=require$$3$2;for(let _0x1bee36=0x0;;_0x1bee36++){try{return _0x270363[_0x265277(0x5f0)](_0x1213c4,_0x47d735);}catch(_0x707249){if(_0x1bee36>=0x3e8||!/No such file or directory/['test'](_0x707249?.[_0x265277(0x81d)]??''))throw _0x707249;}}}function _0x351b29(_0x51fdf3,_0x65e467){const _0x4c464c=_0xe0eedf,_0x5a46e6=_0x6321ff(_0x65e467),_0x4ba1ab=_0x51e289(_0x51fdf3,_0x5a46e6);_0x47bafa(_0x51fdf3,_0x5a46e6);if(_0x4ba1ab[_0x4c464c(0x24f)]<_0x5a46e6)throw new Error(_0x4c464c(0x79f)+_0x51fdf3+_0x4c464c(0x7ea)+_0x4ba1ab[_0x4c464c(0x24f)]+_0x4c464c(0x664)+_0x5a46e6+_0x4c464c(0x739));return{'sab':_0x4ba1ab,'hdr':new Int32Array(_0x4ba1ab,_0xf9e57d(_0x65e467),_0x34c6cc)};}function _0xda8861(_0x38c428){const _0x552d81=_0xe0eedf;try{require('shmbuf')[_0x552d81(0x6e0)](_0x38c428);}catch{}}function _0x523a9c(_0x12fa52){const _0x233510=_0xe0eedf;try{require(_0x233510(0x325))[_0x233510(0x33f)](_0x12fa52);}catch{}}function _0x5d6424(_0x4e6150){const _0x114c29=_0xe0eedf;if(Atomics[_0x114c29(0x566)](_0x4e6150,_0x1dec8c)!==0x0&&Atomics[_0x114c29(0x566)](_0x4e6150,_0xca2d4f)!==0x0)return;const _0x2fea7c=_0x168686[_0x114c29(0x41a)](0x8),_0x28bf72=_0x2fea7c[_0x114c29(0x436)](0x0)||0x1,_0x1ea33d=_0x2fea7c[_0x114c29(0x436)](0x4)||0x1;Atomics['compareExchange'](_0x4e6150,_0x1dec8c,0x0,_0x28bf72),Atomics['compareExchange'](_0x4e6150,_0xca2d4f,0x0,_0x1ea33d);}function _0x5ab210(_0x4d74f9){const _0x2c1854=_0xe0eedf,_0x22180e=process['pid'];for(let _0x39a272=0x0;_0x39a272<_0x4696f4;_0x39a272++){const _0x5c303f=Atomics[_0x2c1854(0x566)](_0x4d74f9,_0x23bdda+_0x39a272);if(_0x5c303f===0x0||_0x5c303f===_0x22180e)continue;if(!_0x4814f2(_0x5c303f))continue;Atomics['store'](_0x4d74f9,_0x2cee61+_0x39a272,0x0),Atomics['compareExchange'](_0x4d74f9,_0x23bdda+_0x39a272,_0x5c303f,0x0);}}function _0x5a15f5(_0x3414af){const _0x595bcc=_0xe0eedf;if(Atomics['load'](_0x3414af,_0x1ba207)!==0x0)return!![];for(let _0x22f6cf=0x0;_0x22f6cf<_0x4696f4;_0x22f6cf++)if(Atomics[_0x595bcc(0x566)](_0x3414af,_0x23bdda+_0x22f6cf)!==0x0)return!![];return![];}function _0x500fe7(_0x3c244e){const _0x17be5f=_0xe0eedf,_0x53cd70=process['pid'];for(let _0x540f81=0x0;_0x540f81<0x2;_0x540f81++){for(let _0x332b83=0x0;_0x332b83<_0x4696f4;_0x332b83++){if(Atomics[_0x17be5f(0x36f)](_0x3c244e,_0x23bdda+_0x332b83,0x0,_0x53cd70)===0x0)return Atomics[_0x17be5f(0x34d)](_0x3c244e,_0x2cee61+_0x332b83,_0x3d2219),_0x332b83;}_0x5ab210(_0x3c244e);}return Atomics['add'](_0x3c244e,_0x1ba207,0x1),-0x1;}function _0x45373d(_0x3732cd,_0x109083){const _0x481aee=_0xe0eedf;if(_0x109083>=0x0)Atomics[_0x481aee(0x34d)](_0x3732cd,_0x2cee61+_0x109083,0x0),Atomics['compareExchange'](_0x3732cd,_0x23bdda+_0x109083,process[_0x481aee(0x5c3)],0x0);else Atomics[_0x481aee(0x6f3)](_0x3732cd,_0x1ba207,0x1);}function _0x49289e(_0x564844,_0x57ee1a,_0x5bc475,_0x34034b){const _0x380ac0=_0xe0eedf,_0xbe3f1b=process[_0x380ac0(0x5c3)];if(Atomics[_0x380ac0(0x36f)](_0x5bc475,_0x289c8f,_0x34034b,_0xbe3f1b)!==_0x34034b)return _0x380ac0(0x75e);const _0x27842a=Atomics[_0x380ac0(0x566)](_0x5bc475,_0x1dec8c),_0x35a5a7=Atomics[_0x380ac0(0x566)](_0x5bc475,_0xca2d4f);let _0x49c8cf;try{_0x49c8cf=_0x351b29(_0x564844,_0x57ee1a)[_0x380ac0(0x780)];}catch{return'orphan';}if(Atomics['load'](_0x49c8cf,_0x1dec8c)!==_0x27842a||Atomics[_0x380ac0(0x566)](_0x49c8cf,_0xca2d4f)!==_0x35a5a7)return _0x380ac0(0x32b);_0x5ab210(_0x5bc475);if(_0x5a15f5(_0x5bc475))return Atomics[_0x380ac0(0x36f)](_0x5bc475,_0x289c8f,_0xbe3f1b,0x0),'revived';return _0x523a9c(_0x564844),_0x380ac0(0x3a3);}function _0x233a13(_0x23e5eb,_0x1dc2d6,{timeoutMs:_0x240fe5}={}){const _0x43f8f0=_0xe0eedf;_0x240fe5=_0x240fe5??(Number(process.env.OKDB_SHM_ATTACH_TIMEOUT_MS)||0x7530);const _0x5336fe=process[_0x43f8f0(0x5c3)],_0x5dae6c=Date['now']()+_0x240fe5;for(let _0x4f6a2f=0x0;;_0x4f6a2f++){const {sab:_0x13931f,hdr:_0x47e1b3}=_0x351b29(_0x23e5eb,_0x1dc2d6);_0x586405['onMapped']?.(_0x23e5eb,_0x4f6a2f),_0x5d6424(_0x47e1b3);const _0x5334d7=_0x500fe7(_0x47e1b3);_0x586405['onClaimed']?.(_0x23e5eb,_0x4f6a2f);const _0x21df55=Atomics[_0x43f8f0(0x566)](_0x47e1b3,_0x289c8f);if(_0x21df55===0x0||!_0x346b0b){if(_0x4f6a2f===0x0)_0x5ab210(_0x47e1b3);return{'sab':_0x13931f,'hdr':_0x47e1b3,'slot':_0x5334d7};}_0x45373d(_0x47e1b3,_0x5334d7);if(_0x21df55!==_0x5336fe&&_0x4814f2(_0x21df55))_0x49289e(_0x23e5eb,_0x1dc2d6,_0x47e1b3,_0x21df55);_0xda8861(_0x23e5eb);if(Date[_0x43f8f0(0x4ec)]()>_0x5dae6c){const {OKDBError:_0x4c2ee1}=requireOkdbError();throw new _0x4c2ee1(_0x43f8f0(0x373)+_0x23e5eb+'\x22\x20has\x20been\x20retiring\x20for\x20'+_0x240fe5+_0x43f8f0(0x80b)+_0x21df55+_0x43f8f0(0x59c)+_0x43f8f0(0x473),'SHM_SEGMENT_RETIRING');}_0xb4e2c4(_0x4f6a2f<0x14?0x0:0x1);}}function _0x371f59(_0x17874e,_0x53382b,_0x5a2a55,_0x773b4e){const _0x36a818=_0xe0eedf,{hdr:_0x317c23,slot:_0x22d417}=_0x5a2a55;if(_0x22d417!==null)_0x45373d(_0x317c23,_0x22d417);let _0x4cea74=![];try{if(!_0x346b0b)return![];const _0x38165e=process[_0x36a818(0x5c3)];_0x5ab210(_0x317c23);if(_0x5a15f5(_0x317c23)||_0x773b4e?.(_0x5a2a55[_0x36a818(0x567)]))return![];if(Atomics[_0x36a818(0x36f)](_0x317c23,_0x289c8f,0x0,_0x38165e)!==0x0)return![];let _0x4023af=!![];try{_0x586405[_0x36a818(0x1e1)]?.(_0x17874e),!_0x5a15f5(_0x317c23)&&!_0x773b4e?.(_0x5a2a55[_0x36a818(0x567)])&&(_0x4023af=![],_0x523a9c(_0x17874e),_0x4cea74=!![]);}finally{if(_0x4023af)Atomics[_0x36a818(0x36f)](_0x317c23,_0x289c8f,_0x38165e,0x0);}return _0x4cea74;}finally{_0xda8861(_0x17874e);}}function _0x2e52f6(_0x36de6d,_0x2a59ba,{isBusy:_0x63daa2}={}){const _0x322f9e=_0xe0eedf,_0x528831=process[_0x322f9e(0x5c3)],{sab:_0x1884ba,hdr:_0x1937e1}=_0x351b29(_0x36de6d,_0x2a59ba);try{_0x5ab210(_0x1937e1);const _0x51657b=Atomics[_0x322f9e(0x566)](_0x1937e1,_0x289c8f);if(_0x51657b!==0x0){if(_0x51657b===_0x528831||!_0x4814f2(_0x51657b))return _0x322f9e(0x4ab);return _0x49289e(_0x36de6d,_0x2a59ba,_0x1937e1,_0x51657b);}if(_0x5a15f5(_0x1937e1))return _0x322f9e(0x546);if(_0x63daa2?.(_0x1884ba))return'busy';if(Atomics['compareExchange'](_0x1937e1,_0x289c8f,0x0,_0x528831)!==0x0)return _0x322f9e(0x4ab);if(_0x5a15f5(_0x1937e1)||_0x63daa2?.(_0x1884ba))return Atomics[_0x322f9e(0x36f)](_0x1937e1,_0x289c8f,_0x528831,0x0),'attached';return _0x523a9c(_0x36de6d),_0x322f9e(0x3a3);}finally{_0xda8861(_0x36de6d);}}const _0x4e0e52=new Map(),_0x38d03c=new Set();function _0x390309(_0x4bc057){const _0x4b3d08=_0xe0eedf,_0x5de605=process[_0x4b3d08(0x5c3)];for(let _0x5148d2=0x0;_0x5148d2<_0x4696f4;_0x5148d2++){if(Atomics[_0x4b3d08(0x566)](_0x4bc057,_0x23bdda+_0x5148d2)===_0x5de605&&Atomics[_0x4b3d08(0x566)](_0x4bc057,_0x2cee61+_0x5148d2)!==_0x3d2219)return!![];}return![];}function _0x523f8c(_0x18f5ab,_0x4e05e3,_0x5ec6ad={}){const _0xdb37d=_0xe0eedf;let _0x2c6c6d=_0x4e0e52[_0xdb37d(0x2fa)](_0x18f5ab);if(!_0x2c6c6d){const _0x5972b2=_0x233a13(_0x18f5ab,_0x4e05e3,_0x5ec6ad);_0x2c6c6d={'att':_0x5972b2,'dataBytes':_0x4e05e3,'refs':0x0,'isBusy':_0x5ec6ad[_0xdb37d(0x740)]??null,'onThreadExit':_0x5ec6ad[_0xdb37d(0x5f1)]??null},_0x4e0e52[_0xdb37d(0x259)](_0x18f5ab,_0x2c6c6d);}if(_0x5ec6ad['isBusy'])_0x2c6c6d[_0xdb37d(0x740)]=_0x5ec6ad['isBusy'];if(_0x5ec6ad[_0xdb37d(0x5f1)])_0x2c6c6d[_0xdb37d(0x5f1)]=_0x5ec6ad[_0xdb37d(0x5f1)];_0x2c6c6d['refs']++;let _0x3c3ec3=![];return{'sab':_0x2c6c6d[_0xdb37d(0x792)][_0xdb37d(0x567)],'name':_0x18f5ab,'release'(){const _0x3dc180=_0xdb37d;if(_0x3c3ec3)return![];_0x3c3ec3=!![];if(--_0x2c6c6d[_0x3dc180(0x48a)]>0x0)return![];if(_0x4e0e52['get'](_0x18f5ab)===_0x2c6c6d)_0x4e0e52[_0x3dc180(0x360)](_0x18f5ab);const _0x4c93cb=_0x371f59(_0x18f5ab,_0x2c6c6d[_0x3dc180(0x35f)],_0x2c6c6d[_0x3dc180(0x792)],_0x2c6c6d[_0x3dc180(0x740)]);!_0x4c93cb&&_0x346b0b&&_0x390309(_0x2c6c6d[_0x3dc180(0x792)][_0x3dc180(0x780)])&&_0x38d03c[_0x3dc180(0x4da)]({'name':_0x18f5ab,'dataBytes':_0x2c6c6d[_0x3dc180(0x35f)],'att':{..._0x2c6c6d[_0x3dc180(0x792)],'slot':null},'isBusy':_0x2c6c6d[_0x3dc180(0x740)],'onThreadExit':_0x2c6c6d[_0x3dc180(0x5f1)]});if(_0x38d03c['size'])_0x56cb9a();return _0x4c93cb;}};}function _0x175e33(_0x4f97a6){const _0x3d603a=_0xe0eedf;if(!(_0x4f97a6>0x0))return 0x0;const _0x42512c=process[_0x3d603a(0x5c3)];let _0x1131ce=0x0;const _0x8709c0=({att:_0xc925d,onThreadExit:_0x5b379c})=>{const _0x53c9dc=_0x3d603a;try{_0x5b379c?.(_0xc925d[_0x53c9dc(0x567)],_0x4f97a6);}catch{}const {hdr:_0x3a7e07}=_0xc925d;for(let _0x1339c4=0x0;_0x1339c4<_0x4696f4;_0x1339c4++){if(Atomics[_0x53c9dc(0x566)](_0x3a7e07,_0x23bdda+_0x1339c4)!==_0x42512c||Atomics['load'](_0x3a7e07,_0x2cee61+_0x1339c4)!==_0x4f97a6)continue;Atomics['store'](_0x3a7e07,_0x2cee61+_0x1339c4,0x0);if(Atomics[_0x53c9dc(0x36f)](_0x3a7e07,_0x23bdda+_0x1339c4,_0x42512c,0x0)===_0x42512c)_0x1131ce++;}};for(const _0x2c1552 of _0x4e0e52['values']())_0x8709c0(_0x2c1552);for(const _0x2b4fc8 of _0x38d03c)_0x8709c0(_0x2b4fc8);return _0x56cb9a(),_0x1131ce;}function _0x56cb9a(){const _0x30d5d7=_0xe0eedf;for(const _0x2e0658 of[..._0x38d03c]){if(_0x390309(_0x2e0658[_0x30d5d7(0x792)]['hdr']))continue;_0x38d03c[_0x30d5d7(0x360)](_0x2e0658),_0x371f59(_0x2e0658['name'],_0x2e0658[_0x30d5d7(0x35f)],_0x2e0658[_0x30d5d7(0x792)],_0x2e0658[_0x30d5d7(0x740)]);}}return okdbShmSegment={'attachSegment':_0x523f8c,'releaseThreadSlots':_0x175e33,'segmentNameFor':_0x2ae123,'legacySegmentNameFor':_0x1b6c64,'segmentNameStyle':_0x347ea7,'SEG_NAME_MAX':_0x17066c,'retireIfUnused':_0x2e52f6,'totalBytes':_0x6321ff,'headerOffset':_0xf9e57d,'MAX_SLOTS':_0x4696f4,'_attachRaw':_0x233a13,'_detachRaw':_0x371f59,'_takeover':_0x49289e,'_mapByName':_0x351b29,'_hooks':_0x586405,'_registry':_0x4e0e52,'_lingering':_0x38d03c,'_H':{'STATE':_0x289c8f,'OVERFLOW':_0x1ba207,'NONCE_A':_0x1dec8c,'NONCE_B':_0xca2d4f,'SLOTS':_0x23bdda,'TIDS':_0x2cee61}},okdbShmSegment;}var okdbShmGc,hasRequiredOkdbShmGc;function requireOkdbShmGc(){const _0x1de220=_0x1a2e0d;if(hasRequiredOkdbShmGc)return okdbShmGc;hasRequiredOkdbShmGc=0x1;const _0x4e0193=require$$0$1,_0x42f9e5=require$$1,_0x28b38b=_0x1de220(0x590),_0x3c3e70=0x18+0x3*0x100*0x4,_0x582025=0x18+0x2*0x100*0x4,_0x2b4ca1=0xc;function _0xc23715(){const {totalBytes:_0x40553a}=requireOkdbShmSegment();return new Set([0x0,0x8,0x18,_0x582025,_0x2b4ca1,_0x40553a(_0x582025),_0x40553a(_0x3c3e70),_0x40553a(_0x2b4ca1)]);}function _0x1a7b53(_0x48427d,_0x20d283,_0x25ef6e){const _0xf8638d=_0x1de220,{totalBytes:_0x3e5549}=requireOkdbShmSegment();if(_0x48427d[_0xf8638d(0x2e8)](_0xf8638d(0x27e))||_0x20d283===_0x2b4ca1||_0x20d283===_0x3e5549(_0x2b4ca1))return _0x2b4ca1;if(_0x20d283===_0x3e5549(_0x3c3e70))return _0x3c3e70;if(_0x20d283===_0x3e5549(_0x582025))return _0x582025;return _0x25ef6e===_0xf8638d(0x359)?_0x3c3e70:_0x582025;}function _0x41da9e(){const _0x4ed731=_0x1de220,_0x474ac1=new Set(),_0x5ecac0=[],_0x5cad8f=_0x28b38b+'/';let _0x1e82ad;try{_0x1e82ad=_0x4e0193['readdirSync'](_0x4ed731(0x45e))['filter'](_0xb2b4a9=>/^\d+$/[_0x4ed731(0x3f6)](_0xb2b4a9));}catch{throw new Error(_0x4ed731(0x7ad));}for(const _0x49d95b of _0x1e82ad){const _0x406987=_0x42f9e5['join'](_0x4ed731(0x45e),_0x49d95b);let _0x727d01=!![];try{const _0x9541ff=_0x4e0193['readFileSync'](_0x42f9e5[_0x4ed731(0x1c9)](_0x406987,_0x4ed731(0x35d)),'utf8');let _0x243535=_0x9541ff[_0x4ed731(0x196)](_0x5cad8f);while(_0x243535!==-0x1){const _0x8bea0c=_0x9541ff['indexOf']('\x0a',_0x243535),_0x8e9ceb=_0x9541ff[_0x4ed731(0x27f)](_0x243535+_0x5cad8f[_0x4ed731(0x6ad)],_0x8bea0c===-0x1?undefined:_0x8bea0c);if(!_0x8e9ceb[_0x4ed731(0x2e8)]('\x20(deleted)'))_0x474ac1[_0x4ed731(0x4da)](_0x8e9ceb);_0x243535=_0x9541ff[_0x4ed731(0x196)](_0x5cad8f,_0x243535+0x1);}}catch(_0x2ad8c8){if(_0x2ad8c8[_0x4ed731(0x2dc)]!==_0x4ed731(0x843)&&_0x2ad8c8[_0x4ed731(0x2dc)]!=='ESRCH')_0x727d01=![];}try{for(const _0x256ee3 of _0x4e0193[_0x4ed731(0x859)](_0x42f9e5[_0x4ed731(0x1c9)](_0x406987,'fd'))){let _0x56e910;try{_0x56e910=_0x4e0193[_0x4ed731(0x7d4)](_0x42f9e5[_0x4ed731(0x1c9)](_0x406987,'fd',_0x256ee3));}catch{continue;}if(_0x56e910[_0x4ed731(0x579)](_0x5cad8f)&&!_0x56e910[_0x4ed731(0x2e8)](_0x4ed731(0x8af)))_0x474ac1['add'](_0x56e910['slice'](_0x5cad8f['length']));}}catch(_0x15dbb1){if(_0x15dbb1['code']!=='ENOENT'&&_0x15dbb1[_0x4ed731(0x2dc)]!=='ESRCH')_0x727d01=![];}if(!_0x727d01){let _0x3c55f2=null;try{_0x3c55f2=_0x4e0193['statSync'](_0x406987)['uid'];}catch{}let _0x1f795c='?';try{_0x1f795c=_0x4e0193['readFileSync'](_0x42f9e5[_0x4ed731(0x1c9)](_0x406987,_0x4ed731(0x26a)),_0x4ed731(0x88a))[_0x4ed731(0x48b)]();}catch{}if(_0x3c55f2!==null)_0x5ecac0['push']({'pid':Number(_0x49d95b),'uid':_0x3c55f2,'comm':_0x1f795c});}}return{'inUse':_0x474ac1,'unreadable':_0x5ecac0};}function _0x10d7f7({prefix:prefix=_0x1de220(0x7fb),dryRun:dryRun=![],anySize:anySize=![],force:force=![],log:log=()=>{}}={}){const _0x547806=_0x1de220;if(process[_0x547806(0x202)]!==_0x547806(0x674)||!_0x4e0193[_0x547806(0x5b6)](_0x28b38b))throw new Error(_0x547806(0x8b1));const _0x3affb9=process[_0x547806(0x2db)](),_0x51d08c=_0x3affb9===0x0,_0x2b46b8=_0xc23715(),{inUse:_0x4922fe,unreadable:_0x510171}=_0x41da9e(),_0xba6897=_0x510171[_0x547806(0x542)](_0x3daec8=>_0x51d08c||_0x3daec8[_0x547806(0x250)]===_0x3affb9),_0x46a0c1={'dryRun':dryRun,'prefix':prefix,'scanned':0x0,'matched':0x0,'inUse':0x0,'notOkdbShaped':0x0,'foreignOwner':0x0,'candidates':0x0,'candidatesLegacyNamed':0x0,'candidateBytes':0x0,'candidateAllocated':0x0,'deleted':0x0,'deletedAllocated':0x0,'skippedByProtocol':0x0,'errors':0x0,'unreadablePids':_0x510171['length'],'blindPids':_0xba6897[_0x547806(0x595)](_0x4170d2=>_0x4170d2['pid']),'blindCommands':_0x2c5679(_0xba6897)};if(_0xba6897[_0x547806(0x6ad)]&&!dryRun&&!force)throw new Error(_0x547806(0x273)+_0xba6897[_0x547806(0x6ad)]+_0x547806(0x20d)+(_0x547806(0x551)+_0x46a0c1[_0x547806(0x5c8)]+_0x547806(0x869))+_0x547806(0x790));const {retireIfUnused:_0xaa717b,segmentNameStyle:_0x127775,_registry:_0x5a7c8f}=requireOkdbShmSegment();let _0x306178=null;if(!dryRun)try{require('v8')['setFlagsFromString']('--expose-gc'),_0x306178=require('vm')[_0x547806(0x30e)]('gc');}catch{}const _0x4a04dd=_0x4e0193[_0x547806(0x2cb)](_0x28b38b);try{let _0x2634e2,_0x50a81f=0x0;while(_0x2634e2=_0x4a04dd[_0x547806(0x882)]()){_0x46a0c1['scanned']++;const _0x5e71c4=_0x2634e2[_0x547806(0x4f9)];if(!_0x5e71c4[_0x547806(0x579)](prefix))continue;_0x46a0c1[_0x547806(0x8b4)]++;if(_0x5a7c8f[_0x547806(0x2ad)](_0x5e71c4)){_0x46a0c1[_0x547806(0x6a4)]++;continue;}if(_0x4922fe[_0x547806(0x2ad)](_0x5e71c4)){_0x46a0c1['inUse']++;continue;}let _0x3359bf;try{_0x3359bf=_0x4e0193[_0x547806(0x1cd)](_0x42f9e5[_0x547806(0x1c9)](_0x28b38b,_0x5e71c4));}catch{continue;}if(!_0x3359bf[_0x547806(0x5e8)]())continue;const _0x38e139=_0x127775(_0x5e71c4);if(!_0x38e139||!anySize&&!_0x2b46b8[_0x547806(0x2ad)](_0x3359bf['size'])){_0x46a0c1[_0x547806(0x1f3)]++;continue;}if(!_0x51d08c&&_0x3359bf[_0x547806(0x250)]!==_0x3affb9){_0x46a0c1['foreignOwner']++;continue;}_0x46a0c1[_0x547806(0x255)]++;if(_0x38e139===_0x547806(0x789))_0x46a0c1['candidatesLegacyNamed']++;_0x46a0c1['candidateBytes']+=_0x3359bf['size'],_0x46a0c1[_0x547806(0x816)]+=_0x3359bf[_0x547806(0x4be)]*0x200;if(dryRun)continue;const _0x552da6=_0x1a7b53(_0x5e71c4,_0x3359bf['size'],_0x38e139);try{const _0xd66c87=_0xaa717b(_0x5e71c4,_0x552da6);_0xd66c87===_0x547806(0x3a3)?(_0x46a0c1['deleted']++,_0x46a0c1['deletedAllocated']+=_0x3359bf['blocks']*0x200):(_0x46a0c1[_0x547806(0x762)]++,log(_0x547806(0x644)+_0x5e71c4+':\x20'+_0xd66c87));}catch(_0x2e47cc){_0x46a0c1['errors']++,log(_0x547806(0x79c)+_0x5e71c4+':\x20'+_0x2e47cc['message']);}_0x306178&&++_0x50a81f>=0x200&&(_0x50a81f=0x0,_0x306178());}}finally{_0x4a04dd[_0x547806(0x57d)]();}return _0x46a0c1;}function _0x2c5679(_0x51155b){const _0x4ff067=_0x1de220,_0x2bdd9b=new Map();for(const _0x51502a of _0x51155b)_0x2bdd9b[_0x4ff067(0x259)](_0x51502a[_0x4ff067(0x26a)],(_0x2bdd9b[_0x4ff067(0x2fa)](_0x51502a[_0x4ff067(0x26a)])??0x0)+0x1);return[..._0x2bdd9b][_0x4ff067(0x595)](([_0x46cc00,_0x5a1e8e])=>_0x5a1e8e>0x1?_0x46cc00+'×'+_0x5a1e8e:_0x46cc00)['join'](',\x20');}function _0x39bba7(_0x5adec8){const _0x5f2986=_0x1de220,_0x2e769b=['B',_0x5f2986(0x36b),_0x5f2986(0x629),_0x5f2986(0x7b9),_0x5f2986(0x3b1)];let _0x1e2298=0x0;while(_0x5adec8>=0x400&&_0x1e2298<_0x2e769b[_0x5f2986(0x6ad)]-0x1){_0x5adec8/=0x400,_0x1e2298++;}return _0x5adec8['toFixed'](_0x1e2298?0x1:0x0)+'\x20'+_0x2e769b[_0x1e2298];}function _0x2935f8(_0x518182){const _0x5b3e4c=_0x1de220,_0x109838=[_0x5b3e4c(0x529)+(_0x518182[_0x5b3e4c(0x593)]?_0x5b3e4c(0x78d):'')+_0x5b3e4c(0x5b7)+JSON[_0x5b3e4c(0x2d1)](_0x518182['prefix']),_0x5b3e4c(0x7cd)+_0x518182[_0x5b3e4c(0x83b)]+'\x20entries\x20in\x20'+_0x28b38b,_0x5b3e4c(0x278)+_0x518182[_0x5b3e4c(0x8b4)],_0x5b3e4c(0x4a9)+_0x518182[_0x5b3e4c(0x6a4)],'\x20\x20not\x20okdb-shaped\x20\x20\x20\x20'+_0x518182['notOkdbShaped'],'\x20\x20other\x20owner\x20\x20\x20\x20\x20\x20\x20\x20'+_0x518182[_0x5b3e4c(0x553)],_0x5b3e4c(0x569)+_0x518182['candidates']+_0x5b3e4c(0x68b)+_0x39bba7(_0x518182['candidateBytes'])+_0x5b3e4c(0x692)+_0x39bba7(_0x518182[_0x5b3e4c(0x816)])+_0x5b3e4c(0x77f)+(_0x518182[_0x5b3e4c(0x894)]?'\x20('+_0x518182[_0x5b3e4c(0x894)]+_0x5b3e4c(0x7bb):'')];if(!_0x518182[_0x5b3e4c(0x593)]){_0x109838[_0x5b3e4c(0x557)](_0x5b3e4c(0x6b9)+_0x518182[_0x5b3e4c(0x7e2)]+_0x5b3e4c(0x68b)+_0x39bba7(_0x518182['deletedAllocated'])+'\x20freed');if(_0x518182['skippedByProtocol'])_0x109838['push'](_0x5b3e4c(0x852)+_0x518182[_0x5b3e4c(0x762)]);if(_0x518182[_0x5b3e4c(0x511)])_0x109838['push']('\x20\x20errors\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x518182[_0x5b3e4c(0x511)]);}return _0x518182[_0x5b3e4c(0x8a3)]&&_0x109838[_0x5b3e4c(0x557)]('\x20\x20note:\x20'+_0x518182[_0x5b3e4c(0x8a3)]+_0x5b3e4c(0x4d8)+(_0x518182[_0x5b3e4c(0x3a7)][_0x5b3e4c(0x6ad)]?'\x20—\x20'+_0x518182[_0x5b3e4c(0x3a7)][_0x5b3e4c(0x6ad)]+_0x5b3e4c(0x885)+(_0x518182[_0x5b3e4c(0x5c8)]+_0x5b3e4c(0x208)):_0x5b3e4c(0x7f7))),_0x109838[_0x5b3e4c(0x1c9)]('\x0a');}function _0x73d51c(_0x16d6a4){const _0x1194ce=_0x1de220,_0x59d02c={'prefix':_0x1194ce(0x7fb),'dryRun':![],'anySize':![],'force':![],'verbose':![]};for(let _0x1f721c=0x0;_0x1f721c<_0x16d6a4[_0x1194ce(0x6ad)];_0x1f721c++){const _0x53926c=_0x16d6a4[_0x1f721c];if(_0x53926c===_0x1194ce(0x745)||_0x53926c==='-n')_0x59d02c['dryRun']=!![];else{if(_0x53926c===_0x1194ce(0x1bd))_0x59d02c[_0x1194ce(0x235)]=!![];else{if(_0x53926c===_0x1194ce(0x81f))_0x59d02c[_0x1194ce(0x839)]=!![];else{if(_0x53926c===_0x1194ce(0x2e3)||_0x53926c==='-v')_0x59d02c[_0x1194ce(0x515)]=!![];else{if(_0x53926c===_0x1194ce(0x3af))_0x59d02c[_0x1194ce(0x77d)]=_0x16d6a4[++_0x1f721c]??'';else{if(_0x53926c[_0x1194ce(0x579)](_0x1194ce(0x7a5)))_0x59d02c[_0x1194ce(0x77d)]=_0x53926c['slice'](_0x1194ce(0x7a5)['length']);else{if(_0x53926c===_0x1194ce(0x62e)||_0x53926c==='-h')_0x59d02c['help']=!![];else throw new Error(_0x1194ce(0x1e7)+_0x53926c);}}}}}}}return _0x59d02c;}const _0x1989eb='Usage:\x20okdb\x20shm-gc\x20[--dry-run]\x20[--prefix\x20<p>]\x20[--any-size]\x20[--force]\x20[--verbose]\x0a\x0aDelete\x20okdb\x20shared-memory\x20segments\x20in\x20/dev/shm\x20that\x20no\x20live\x20process\x20maps\x20or\x20holds\x20open\x0a(older\x20okdb\x20versions\x20never\x20unlinked\x20them).\x20Recognises\x20both\x20the\x20current\x20hashed\x20names\x0a(<path>-<hash>)\x20and\x20the\x20bare-path\x20names\x20of\x20okdb\x20<=\x202.4.0.\x20Linux\x20only.\x0a\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20report\x20what\x20would\x20be\x20deleted,\x20delete\x20nothing\x0a\x20\x20--prefix\x20<p>\x20\x20\x20\x20only\x20names\x20starting\x20with\x20<p>\x20(default\x20\x22-tmp-\x22:\x20stores\x20under\x20/tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22\x22\x20=\x20every\x20okdb-shaped\x20name)\x0a\x20\x20--any-size\x20\x20\x20\x20\x20\x20don\x27t\x20require\x20an\x20okdb\x20segment\x20size\x0a\x20\x20--force\x20\x20\x20\x20\x20\x20\x20\x20\x20delete\x20even\x20if\x20some\x20same-user\x20process\x27s\x20maps\x20could\x20not\x20be\x20read\x0a\x20\x20--verbose,\x20-v\x20\x20\x20print\x20every\x20kept\x20segment\x20and\x20why';function _0x532e02(_0x52d7da){const _0x1e22e0=_0x1de220;let _0x1b1568;try{_0x1b1568=_0x73d51c(_0x52d7da);}catch(_0x48a275){return console[_0x1e22e0(0x6cd)](_0x48a275[_0x1e22e0(0x81d)]),console['error'](_0x1989eb),0x2;}if(_0x1b1568[_0x1e22e0(0x870)])return console['log'](_0x1989eb),0x0;const _0x44a7cb=_0x10d7f7({..._0x1b1568,'log':_0x1b1568['verbose']?_0x265205=>console[_0x1e22e0(0x689)](_0x265205):undefined});return console[_0x1e22e0(0x689)](_0x2935f8(_0x44a7cb)),_0x44a7cb['errors']?0x1:0x0;}return okdbShmGc={'shmGc':_0x10d7f7,'formatReport':_0x2935f8,'main':_0x532e02,'scanInUse':_0x41da9e,'ENV_DATA_BYTES':_0x3c3e70,'LEGACY_ENV_DATA_BYTES':_0x582025,'BOOT_DATA_BYTES':_0x2b4ca1},okdbShmGc;}var hasRequiredOkdb;function requireOkdb(){const _0x92a1c9=_0x1a2e0d;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x92a1c9(0x4c7)]();}catch{}const _0x3e45a6=require$$1,_0x372f01=require$$0$1,{resolveWorkers:_0x11fa34,isShmbufNative:_0x1bf56b}=requireOkdbWorkers();function _0x4e5792(_0x2ecd88){const _0xc4b210=_0x92a1c9,_0x4d8deb=_0x2ecd88[_0xc4b210(0x27f)](0x2),_0x586053={};let _0x486753=0x0;while(_0x486753<_0x4d8deb[_0xc4b210(0x6ad)]){const _0x42c5d2=_0x4d8deb[_0x486753];if(_0x42c5d2===_0xc4b210(0x6ff)||_0x42c5d2==='-p')_0x586053['port']=Number(_0x4d8deb[++_0x486753]);else{if(_0x42c5d2===_0xc4b210(0x344)||_0x42c5d2==='-d')_0x586053[_0xc4b210(0x5be)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2==='--key'||_0x42c5d2==='-k')_0x586053[_0xc4b210(0x47f)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x585)||_0x42c5d2==='-c')_0x586053[_0xc4b210(0x38b)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x772))_0x586053[_0xc4b210(0x8c0)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x7a9))_0x586053['noRepl']=!![];else{if(_0x42c5d2===_0xc4b210(0x536))_0x586053[_0xc4b210(0x69b)]=!![];else{if(_0x42c5d2===_0xc4b210(0x832))_0x586053[_0xc4b210(0x307)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x4f1))_0x586053['noCluster']=!![];else{if(_0x42c5d2===_0xc4b210(0x7e6)||_0x42c5d2==='-e')_0x586053['env']=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x508))_0x586053[_0xc4b210(0x427)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x480))_0x586053[_0xc4b210(0x330)]=!![];else{if(_0x42c5d2===_0xc4b210(0x549))_0x586053[_0xc4b210(0x457)]=!![];else{if(_0x42c5d2==='--new-identity')_0x586053[_0xc4b210(0x4b6)]=!![];else{if(_0x42c5d2===_0xc4b210(0x6e1))_0x586053['drop']=!![];else{if(_0x42c5d2==='--open'){const _0x160c22=[];while(_0x486753+0x1<_0x4d8deb[_0xc4b210(0x6ad)]&&!_0x4d8deb[_0x486753+0x1]['startsWith']('--')){_0x160c22[_0xc4b210(0x557)](_0x4d8deb[++_0x486753]);}_0x586053[_0xc4b210(0x5f0)]=_0x160c22[_0xc4b210(0x6ad)]>0x0?_0x160c22:!![];}else{if(_0x42c5d2===_0xc4b210(0x2ff))_0x586053[_0xc4b210(0x2dd)]=!![];else{if(_0x42c5d2===_0xc4b210(0x630))_0x586053[_0xc4b210(0x4f9)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x77c))_0x586053[_0xc4b210(0x23e)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2==='--label')_0x586053[_0xc4b210(0x37e)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2==='--permissions')_0x586053[_0xc4b210(0x496)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x703))_0x586053['grants']=_0x4d8deb[++_0x486753];else{if(_0x42c5d2==='--ttl')_0x586053[_0xc4b210(0x7b0)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x7cb))_0x586053['token']=_0x4d8deb[++_0x486753];else{if(_0x42c5d2==='--username'||_0x42c5d2==='-u')_0x586053[_0xc4b210(0x479)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x6b8))_0x586053[_0xc4b210(0x4e9)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x7d0)||_0x42c5d2==='-v'){const _0x44b53e=require$$3;console['log'](_0x44b53e[_0xc4b210(0x598)]),process[_0xc4b210(0x468)](0x0);}else(_0x42c5d2===_0xc4b210(0x62e)||_0x42c5d2==='-h')&&(_0x245c97(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}}_0x486753++;}return _0x586053;}function _0x245c97(){const _0x213b2b=_0x92a1c9;console[_0x213b2b(0x689)](_0x213b2b(0x1f1));}const _0x9547ff=new Set([_0x92a1c9(0x224),_0x92a1c9(0x56c),_0x92a1c9(0x44f),'error']);function _0xc7735d(_0x1bbf25){const _0x5ac0c6=_0x92a1c9,_0x50a02a=_0x1bbf25['config']?_0x3e45a6[_0x5ac0c6(0x8c2)](_0x1bbf25[_0x5ac0c6(0x38b)]):_0x3e45a6['resolve'](_0x5ac0c6(0x309));let _0x45a1b7={};if(_0x372f01['existsSync'](_0x50a02a))try{const _0x16900d=_0x372f01[_0x5ac0c6(0x308)](_0x50a02a,_0x5ac0c6(0x88a))[_0x5ac0c6(0x813)](/^\uFEFF/,'');_0x45a1b7=JSON[_0x5ac0c6(0x7d3)](_0x16900d),console['log']('[okdb]\x20loaded\x20config:\x20'+_0x50a02a);}catch(_0x59811c){console[_0x5ac0c6(0x6cd)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x50a02a+':\x20'+_0x59811c[_0x5ac0c6(0x81d)]),process[_0x5ac0c6(0x468)](0x1);}const _0xba45c2={'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},_0x311efa={'port':_0x1bbf25[_0x5ac0c6(0x397)]??_0x45a1b7['port']??_0xba45c2[_0x5ac0c6(0x397)]??0x2124,'dbPath':_0x1bbf25['path']??_0x45a1b7[_0x5ac0c6(0x5be)]??_0xba45c2[_0x5ac0c6(0x5be)]??'./okdb-data','key':_0x1bbf25[_0x5ac0c6(0x47f)]??_0x45a1b7[_0x5ac0c6(0x47f)]??_0xba45c2[_0x5ac0c6(0x47f)]??undefined,'logLevel':_0x1bbf25[_0x5ac0c6(0x8c0)]??_0x45a1b7[_0x5ac0c6(0x8c0)]??_0xba45c2[_0x5ac0c6(0x8c0)]??_0x5ac0c6(0x56c),'noRepl':_0x1bbf25['noRepl']??_0x45a1b7['noRepl']??_0xba45c2['noRepl']??![],'noAdmin':_0x1bbf25[_0x5ac0c6(0x69b)]??_0x45a1b7[_0x5ac0c6(0x69b)]??_0xba45c2['noAdmin']??![],'admin':_0x45a1b7[_0x5ac0c6(0x1bb)]??{},'api':_0x45a1b7['api']??undefined,'auth':_0x45a1b7[_0x5ac0c6(0x716)]??undefined,'mcp':_0x45a1b7[_0x5ac0c6(0x861)]??undefined,'http':_0x45a1b7[_0x5ac0c6(0x5fb)]??undefined,'backup':_0x45a1b7[_0x5ac0c6(0x7b4)]??undefined,'timeMachine':_0x45a1b7[_0x5ac0c6(0x510)]!==![]?_0x45a1b7[_0x5ac0c6(0x510)]??{}:![],'processors':_0x45a1b7[_0x5ac0c6(0x78a)],'engines':_0x45a1b7['engines'],'compaction':_0x45a1b7[_0x5ac0c6(0x3a0)]};if(_0x1bbf25[_0x5ac0c6(0x69a)])_0x311efa[_0x5ac0c6(0x69a)]=!![];if(_0x1bbf25[_0x5ac0c6(0x307)]!==undefined)_0x311efa[_0x5ac0c6(0x43e)]=_0x1bbf25[_0x5ac0c6(0x307)];_0x1bbf25[_0x5ac0c6(0x5f0)]!==undefined&&(_0x311efa[_0x5ac0c6(0x716)]=_0x311efa['auth']||{},_0x311efa['auth'][_0x5ac0c6(0x5f0)]=_0x1bbf25[_0x5ac0c6(0x5f0)]);_0x1bbf25[_0x5ac0c6(0x2dd)]&&(_0x311efa[_0x5ac0c6(0x224)]=_0x311efa['debug']||{},_0x311efa[_0x5ac0c6(0x224)]['logRequests']=!![]);(!Number[_0x5ac0c6(0x512)](_0x311efa['port'])||_0x311efa[_0x5ac0c6(0x397)]<0x1||_0x311efa[_0x5ac0c6(0x397)]>0xffff)&&(console[_0x5ac0c6(0x6cd)](_0x5ac0c6(0x31c)+_0x311efa[_0x5ac0c6(0x397)]+'\x20(must\x20be\x201–65535)'),process[_0x5ac0c6(0x468)](0x1));!_0x9547ff[_0x5ac0c6(0x2ad)](_0x311efa['logLevel'])&&(console[_0x5ac0c6(0x6cd)](_0x5ac0c6(0x286)+_0x311efa[_0x5ac0c6(0x8c0)]+_0x5ac0c6(0x1a6)),process[_0x5ac0c6(0x468)](0x1));const _0x5e17e3=_0x311efa[_0x5ac0c6(0x5fb)]?.[_0x5ac0c6(0x26b)];_0x5e17e3!==undefined&&!(typeof _0x5e17e3===_0x5ac0c6(0x1d2)&&_0x5e17e3)&&!(Array[_0x5ac0c6(0x59b)](_0x5e17e3)&&_0x5e17e3[_0x5ac0c6(0x6ad)]&&_0x5e17e3[_0x5ac0c6(0x573)](_0x2105d2=>typeof _0x2105d2===_0x5ac0c6(0x1d2)&&_0x2105d2))&&(console[_0x5ac0c6(0x6cd)](_0x5ac0c6(0x2e0)+JSON[_0x5ac0c6(0x2d1)](_0x5e17e3)+_0x5ac0c6(0x3c7)),process[_0x5ac0c6(0x468)](0x1));for(const _0x867cc8 of _0x260a0d){_0x311efa[_0x867cc8]!==undefined&&typeof _0x311efa[_0x867cc8]!=='boolean'&&(console['error'](_0x5ac0c6(0x61c)+_0x867cc8+_0x5ac0c6(0x4b8)+JSON[_0x5ac0c6(0x2d1)](_0x311efa[_0x867cc8])+_0x5ac0c6(0x6b0)),process[_0x5ac0c6(0x468)](0x1));}return _0x311efa;}const _0x260a0d=['processors',_0x92a1c9(0x38c),_0x92a1c9(0x3a0)];function _0x5aa31d(_0x29af4e){const _0x3e7928=_0x92a1c9;return!!(_0x29af4e&&typeof _0x29af4e===_0x3e7928(0x601)&&!Array['isArray'](_0x29af4e)&&Object[_0x3e7928(0x818)](_0x29af4e)[_0x3e7928(0x6ad)]>0x0);}function _0xef2b40(_0x438cf1){const _0x583ae3=_0x92a1c9;return{..._0x438cf1['key']?{'encryptionKey':_0x438cf1[_0x583ae3(0x47f)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x40b8c6=!process[_0x92a1c9(0x498)][_0x92a1c9(0x670)]||!!process.env.NO_COLOR;function _0x383be3(_0x3b4f95,_0x1160e3){const _0xab9de2=_0x92a1c9;return _0x40b8c6?_0x1160e3:'\x1b['+_0x3b4f95+'m'+_0x1160e3+_0xab9de2(0x850);}function _0x4856fc(_0x232fca){const _0x3037f2=_0x92a1c9;if(!_0x232fca||_0x232fca[_0x3037f2(0x6ad)]===0x0)return;const _0x25030d='─'[_0x3037f2(0x2f5)](0x38);process[_0x3037f2(0x6d3)][_0x3037f2(0x82b)]('\x0a'),process[_0x3037f2(0x6d3)][_0x3037f2(0x82b)](_0x383be3('33',_0x3037f2(0x6cf)+_0x232fca[_0x3037f2(0x6ad)]+_0x3037f2(0x1ca)+(_0x232fca['length']>0x1?'S':'')+'\x0a')),process[_0x3037f2(0x6d3)]['write']('\x20\x20'+_0x25030d+'\x0a');for(const _0x5116c0 of _0x232fca){const _0x452d9c=_0x5116c0[_0x3037f2(0x682)]===_0x3037f2(0x6cd)?_0x383be3('31','\x20\x20✗'):_0x383be3('33',_0x3037f2(0x4f6));process[_0x3037f2(0x6d3)]['write'](_0x452d9c+'\x20\x20'+_0x383be3('1',_0x5116c0[_0x3037f2(0x4ee)])+'\x0a'),process[_0x3037f2(0x6d3)]['write'](_0x3037f2(0x7ff)+_0x5116c0[_0x3037f2(0x81d)]+'\x0a');if(_0x5116c0['hint'])process[_0x3037f2(0x6d3)][_0x3037f2(0x82b)](_0x3037f2(0x7ff)+_0x383be3('2',_0x3037f2(0x40a)+_0x5116c0[_0x3037f2(0x3eb)])+'\x0a');process[_0x3037f2(0x6d3)][_0x3037f2(0x82b)]('\x0a');}process[_0x3037f2(0x6d3)][_0x3037f2(0x82b)]('\x20\x20'+_0x25030d+'\x0a\x0a');}function _0x5a8ed5(_0xcceb05,_0x5a11ea,_0x18b847={}){const _0x2cc0bb=_0x92a1c9,_0x12439a=_0xcceb05[_0x2cc0bb(0x5fb)][_0x2cc0bb(0x7a4)](_0x5a11ea,_0x18b847);if(_0x12439a&&_0x12439a[_0x2cc0bb(0x777)])return Promise[_0x2cc0bb(0x8c2)](_0x12439a);const _0xf05737=_0xcceb05[_0x2cc0bb(0x5fb)][_0x2cc0bb(0x39f)]?.[_0x2cc0bb(0x6ad)]?_0xcceb05['http'][_0x2cc0bb(0x39f)]:[_0x12439a];return new Promise((_0x98c4b0,_0x420c46)=>{const _0x4a2664=_0x2cc0bb;_0x12439a[_0x4a2664(0x898)]('error',_0x420c46),Promise['all'](_0xf05737[_0x4a2664(0x595)](_0x42a1f8=>_0x42a1f8['listening']?null:new Promise(_0x3307ec=>_0x42a1f8[_0x4a2664(0x898)](_0x4a2664(0x697),_0x3307ec))))[_0x4a2664(0x4ed)](()=>_0x98c4b0(_0x12439a));});}function _0x5bbcc0(_0x2ef561){const _0x663b6d=_0x92a1c9;return _0x2ef561['http']?.[_0x663b6d(0x26b)]!==undefined?{'host':_0x2ef561[_0x663b6d(0x5fb)][_0x663b6d(0x26b)]}:{};}async function _0x4f10c0(_0x40357a){const _0xa7b2ab=_0x92a1c9,_0x2c12a7=require$$4$1;console[_0xa7b2ab(0x689)](_0xa7b2ab(0x89c));let _0x234d20=!![];const _0xcda6a9=(_0x1ce704,_0x13e84e)=>{const _0x34744b=_0xa7b2ab;console[_0x34744b(0x689)]('\x20\x20'+(_0x1ce704?'✓':'✗')+'\x20'+_0x13e84e);if(!_0x1ce704)_0x234d20=![];},_0x5dec9f=Number(process['version'][_0xa7b2ab(0x813)]('v','')['split']('.')[0x0]);_0xcda6a9(_0x5dec9f>=0x12,'node\x20'+process[_0xa7b2ab(0x598)]+(_0x5dec9f<0x12?_0xa7b2ab(0x4fb):''));const _0x283413=_0x3e45a6['resolve'](_0x40357a['dbPath']);try{_0x372f01[_0xa7b2ab(0x51a)](_0x283413,{'recursive':!![]});const _0x1f5e41=_0x3e45a6[_0xa7b2ab(0x1c9)](_0x283413,_0xa7b2ab(0x2c8));_0x372f01[_0xa7b2ab(0x497)](_0x1f5e41,''),_0x372f01[_0xa7b2ab(0x291)](_0x1f5e41),_0xcda6a9(!![],_0xa7b2ab(0x5df)+_0x283413);}catch(_0x2a94d7){_0xcda6a9(![],_0xa7b2ab(0x6de)+_0x283413+_0xa7b2ab(0x8c8)+_0x2a94d7[_0xa7b2ab(0x81d)]+')');}const _0x16527c=await new Promise(_0x1a3734=>{const _0x1bc922=_0xa7b2ab,_0x4d7294=_0x2c12a7[_0x1bc922(0x37a)]();_0x4d7294['once']('error',()=>_0x1a3734(![])),_0x4d7294['once']('listening',()=>{_0x4d7294['close'](),_0x1a3734(!![]);}),_0x4d7294[_0x1bc922(0x7a4)](_0x40357a[_0x1bc922(0x397)],'127.0.0.1');});_0xcda6a9(_0x16527c,_0xa7b2ab(0x1f0)+_0x40357a['port']+'\x20'+(_0x16527c?_0xa7b2ab(0x439):'already\x20in\x20use'));const _0x1704d6=_0x3e45a6['resolve'](_0xa7b2ab(0x309));if(_0x372f01[_0xa7b2ab(0x5b6)](_0x1704d6))try{JSON[_0xa7b2ab(0x7d3)](_0x372f01[_0xa7b2ab(0x308)](_0x1704d6,'utf8')[_0xa7b2ab(0x813)](/^\uFEFF/,'')),_0xcda6a9(!![],_0xa7b2ab(0x51c)+_0x1704d6);}catch(_0x280f75){_0xcda6a9(![],'config\x20file\x20invalid:\x20'+_0x280f75[_0xa7b2ab(0x81d)]);}else _0xcda6a9(!![],_0xa7b2ab(0x5ea));if(_0x1bf56b()){const _0x430d09=_0x11fa34(_0x40357a,{'shmbufNative':!![]});_0xcda6a9(!![],_0xa7b2ab(0x514)+_0x430d09+_0xa7b2ab(0x8bf)+(_0x430d09===0x1?'':'s')+')');}else _0xcda6a9(!![],_0xa7b2ab(0x3b7));if(!_0x16527c)try{const _0x3b5177=require('../okdb'),_0x675e48=new _0x3b5177(_0x283413,{'engines':![],'processors':![],'compaction':![],'auth':{'open':!![]}});await _0x675e48[_0xa7b2ab(0x5f0)]();try{await _0x675e48[_0xa7b2ab(0x65b)]['open']({'reader':!![]});const _0x247d98=_0x675e48[_0xa7b2ab(0x65b)][_0xa7b2ab(0x469)](),_0x390ba7=_0x247d98[_0xa7b2ab(0x542)](_0x246fde=>_0x246fde[_0xa7b2ab(0x2a4)]!=null)[_0xa7b2ab(0x6ad)];_0xcda6a9(!![],'processes:\x20'+_0x247d98['length']+_0xa7b2ab(0x27b)+(_0x247d98[_0xa7b2ab(0x6ad)]===0x1?'':'es')+'\x20('+_0x390ba7+_0xa7b2ab(0x22d));}finally{await _0x675e48['close']();}}catch{}console[_0xa7b2ab(0x689)](''),_0x234d20?console['log'](_0xa7b2ab(0x652)):(console[_0xa7b2ab(0x689)](_0xa7b2ab(0x86e)),process[_0xa7b2ab(0x468)](0x1));}async function _0x366f39(){const _0xec1696=_0x92a1c9,_0x167b0b=_0x3e45a6['resolve'](_0xec1696(0x309));!_0x372f01[_0xec1696(0x5b6)](_0x167b0b)?(_0x372f01[_0xec1696(0x497)](_0x167b0b,JSON[_0xec1696(0x2d1)]({'port':0x2124,'path':'./okdb-data','logLevel':_0xec1696(0x56c),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0xec1696(0x689)](_0xec1696(0x45d))):console[_0xec1696(0x689)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x525778=_0x3e45a6[_0xec1696(0x8c2)](_0xec1696(0x3fb));!_0x372f01[_0xec1696(0x5b6)](_0x525778)?(_0x372f01[_0xec1696(0x51a)](_0x525778,{'recursive':!![]}),console['log'](_0xec1696(0x75a))):console[_0xec1696(0x689)](_0xec1696(0x219)),console[_0xec1696(0x689)](_0xec1696(0x7db));}async function _0x234c7c(_0x4b341c){const _0x4c5022=_0x92a1c9,_0xf9843=_0x3e45a6['resolve'](_0x4b341c[_0x4c5022(0x336)]);if(!_0x372f01['existsSync'](_0xf9843)){console['log']('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0xf9843+'\x20does\x20not\x20exist');return;}const _0x3d4ca5=require$$0$3,_0x16fea8=_0x3d4ca5[_0x4c5022(0x636)]({'input':process[_0x4c5022(0x248)],'output':process[_0x4c5022(0x498)]}),_0x350fb0=await new Promise(_0x2ff87c=>_0x16fea8[_0x4c5022(0x4b3)](_0x4c5022(0x817)+_0xf9843+_0x4c5022(0x21a),_0x2ff87c));_0x16fea8[_0x4c5022(0x6e0)](),console[_0x4c5022(0x689)]('');if(_0x350fb0['trim']()['toLowerCase']()!==_0x4c5022(0x642)){console['log'](_0x4c5022(0x880));return;}let _0x197283=null;try{_0x197283=await _0x35ea7b(_0xf9843,_0x4b341c,async _0x3c9752=>{const _0x4786b1=_0x4c5022,_0x548c70=_0x3c9752[_0x4786b1(0x736)],_0x279e47=_0x548c70?.['db']?.[_0x4786b1(0x2fa)]('__identity')??null,_0x38b150=[];if(_0x548c70?.[_0x4786b1(0x6f1)](_0x4786b1(0x1a9)))for(const {key:_0x3c6b74,value:_0x40ffd2}of _0x548c70[_0x4786b1(0x3c9)](_0x4786b1(0x1a9))){_0x38b150[_0x4786b1(0x557)]({'key':_0x3c6b74,'value':_0x40ffd2});}return{'identity':_0x279e47,'licenses':_0x38b150};});}catch(_0x200224){console[_0x4c5022(0x689)](_0x4c5022(0x7b3)+_0x200224[_0x4c5022(0x81d)]+_0x4c5022(0x4cb));}_0x372f01[_0x4c5022(0x6c7)](_0xf9843,{'recursive':!![],'force':!![]}),console['log'](_0x4c5022(0x5a9)+_0xf9843+_0x4c5022(0x222));if(_0x197283&&(_0x197283['identity']||_0x197283[_0x4c5022(0x4ba)][_0x4c5022(0x6ad)]>0x0))try{await _0x35ea7b(_0xf9843,_0x4b341c,async _0x192539=>{const _0x5d9dd4=_0x4c5022,_0x2daa1a=_0x192539[_0x5d9dd4(0x736)];_0x197283[_0x5d9dd4(0x4cf)]&&_0x2daa1a['db'][_0x5d9dd4(0x422)]('__identity',_0x197283['identity']);if(_0x197283[_0x5d9dd4(0x4ba)][_0x5d9dd4(0x6ad)]>0x0){if(!_0x2daa1a[_0x5d9dd4(0x6f1)]('~licenses'))await _0x2daa1a[_0x5d9dd4(0x2ba)]('~licenses');for(const {key:_0x8d5dbc,value:_0x25c25f}of _0x197283['licenses']){await _0x2daa1a[_0x5d9dd4(0x25f)]('~licenses',_0x8d5dbc,_0x25c25f);}}});const _0x3c74d2=[];if(_0x197283['identity'])_0x3c74d2[_0x4c5022(0x557)](_0x4c5022(0x576));if(_0x197283['licenses']['length']>0x0)_0x3c74d2[_0x4c5022(0x557)](_0x197283['licenses']['length']+_0x4c5022(0x8ae));console['log'](_0x4c5022(0x362)+_0x3c74d2[_0x4c5022(0x1c9)]('\x20+\x20'));}catch(_0x482052){console['log'](_0x4c5022(0x80f)+_0x482052[_0x4c5022(0x81d)]);}}async function _0x35ea7b(_0x20c880,_0x3ad3cd,_0x21ead0){const _0x5001ae=_0x92a1c9,_0x2a675b=require$$5$1,_0x7b99e=new _0x2a675b(_0x20c880,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0xef2b40(_0x3ad3cd)});await _0x7b99e['open']();try{return await _0x21ead0(_0x7b99e);}finally{await _0x7b99e[_0x5001ae(0x6e0)]();}}async function _0x3fa566(_0x302001,_0x4994ca){const _0x391ca6=_0x92a1c9,_0x9025c3=require$$5$1,_0x45772d=_0x3e45a6[_0x391ca6(0x8c2)](_0x4994ca[_0x391ca6(0x336)]);console[_0x391ca6(0x689)](_0x391ca6(0x731)+_0x45772d+'…');const _0x3c30eb=new _0x9025c3(_0x45772d,_0xef2b40(_0x4994ca));await _0x3c30eb[_0x391ca6(0x5f0)](),console['log'](_0x391ca6(0x3e6)+_0x302001+'…');const {envs:_0x305323,blobs:_0x2e62ee,skipped:_0x4ed2fb}=await _0x3c30eb[_0x391ca6(0x60c)][_0x391ca6(0x7b4)](_0x302001);for(const _0x55839c of _0x305323){const _0x1f8e2e=_0x55839c['sizeBefore']>0x0?'\x20\x20('+(_0x55839c[_0x391ca6(0x7cf)]/0x400/0x400)[_0x391ca6(0x39b)](0x2)+'\x20MB\x20→\x20'+(_0x55839c[_0x391ca6(0x383)]/0x400/0x400)[_0x391ca6(0x39b)](0x2)+_0x391ca6(0x22f):'';console[_0x391ca6(0x689)]('\x20\x20✓\x20'+_0x55839c[_0x391ca6(0x4f9)]+_0x391ca6(0x85d)+_0x55839c[_0x391ca6(0x260)]+_0x1f8e2e+(_0x55839c['timeMachine']?_0x391ca6(0x808):''));}if(_0x2e62ee['count']>0x0)console['log'](_0x391ca6(0x33d)+_0x2e62ee[_0x391ca6(0x430)]+'\x20files)');for(const _0x2639db of _0x4ed2fb)console[_0x391ca6(0x689)]('\x20\x20✗\x20'+_0x2639db['name']+_0x391ca6(0x37f)+_0x2639db[_0x391ca6(0x4f3)]);await _0x3c30eb[_0x391ca6(0x6e0)](),console[_0x391ca6(0x689)](_0x391ca6(0x6ca));}async function _0x43d6cf(_0x2b014e,_0x2d611a,_0x11a90d={}){const _0x2ef108=_0x92a1c9,{BACKUP_MANIFEST:_0x3afb63}=requireOkdbMigrate(),_0x3cf400=_0x3e45a6['resolve'](_0x2d611a['dbPath']),_0x2cda15=_0x3e45a6[_0x2ef108(0x1c9)](_0x2b014e,_0x3afb63);if(!_0x372f01[_0x2ef108(0x5b6)](_0x2cda15))throw new Error(_0x2b014e+_0x2ef108(0x19c)+_0x3afb63+')');const _0x3a038e=JSON[_0x2ef108(0x7d3)](_0x372f01[_0x2ef108(0x308)](_0x2cda15,'utf8')),_0x201b1b=_0x3e45a6['relative'](_0x2b014e,_0x3cf400);if(_0x201b1b===''||!(_0x201b1b[_0x2ef108(0x579)]('..')||_0x3e45a6['isAbsolute'](_0x201b1b)))throw new Error(_0x2ef108(0x4e1)+_0x3cf400+_0x2ef108(0x414)+_0x2b014e);if(_0x372f01[_0x2ef108(0x5b6)](_0x3cf400)&&_0x372f01[_0x2ef108(0x859)](_0x3cf400)[_0x2ef108(0x6ad)]>0x0)throw new Error(_0x2ef108(0x4e1)+_0x3cf400+'\x20is\x20not\x20empty\x20—\x20restore\x20only\x20into\x20a\x20new\x20or\x20empty\x20directory');console['log'](_0x2ef108(0x31b)+_0x2b014e+_0x2ef108(0x317)+_0x3a038e[_0x2ef108(0x2d8)]+',\x20'+_0x3a038e['createdAt']+_0x2ef108(0x271)+_0x3cf400+'…'),_0x372f01[_0x2ef108(0x3a4)](_0x2b014e,_0x3cf400,{'recursive':!![],'errorOnExist':!![]});for(const _0x18b0f1 of _0x3a038e[_0x2ef108(0x7f3)]??[]){console['log'](_0x2ef108(0x524)+_0x18b0f1[_0x2ef108(0x4f9)]+(_0x18b0f1['timeMachine']?_0x2ef108(0x808):'')),_0x18b0f1[_0x2ef108(0x209)]&&_0x18b0f1['sourcePath']&&_0x372f01['existsSync'](_0x18b0f1[_0x2ef108(0x73d)])&&console['log'](_0x2ef108(0x335)+_0x18b0f1['name']+_0x2ef108(0x1e4)+_0x18b0f1['sourcePath']+',\x20which\x20still\x20exists\x20—\x20the\x20restored\x20'+('store\x20will\x20open\x20THAT\x20directory,\x20not\x20the\x20copy\x20in\x20'+_0x18b0f1[_0x2ef108(0x4a8)]+'.\x20Move\x20it\x20away\x20first\x20to\x20use\x20the\x20copy.'));}_0x11a90d['newIdentity']&&(require$$5$1['reidentify'](_0x3cf400),console[_0x2ef108(0x689)](_0x2ef108(0x1de))),console['log'](_0x2ef108(0x475));}async function _0x48f8f9(_0x2622d2,_0x99cced,_0xa5ee01){const _0x4f5bf=_0x92a1c9,_0x3c2aff=require$$5$1,_0x32da99=_0x3e45a6[_0x4f5bf(0x8c2)](_0x99cced[_0x4f5bf(0x336)]),_0x241b94=_0xa5ee01[_0x4f5bf(0x787)]??'default',_0xe10aec=_0xa5ee01[_0x4f5bf(0x427)]?_0xa5ee01[_0x4f5bf(0x427)][_0x4f5bf(0x84e)](',')[_0x4f5bf(0x595)](_0x20940a=>_0x20940a['trim']()):null;console['log']('[okdb]\x20opening\x20'+_0x32da99+'…');const _0x4b958b=new _0x3c2aff(_0x32da99,_0xef2b40(_0x99cced));await _0x4b958b[_0x4f5bf(0x5f0)](),console[_0x4f5bf(0x689)](_0x4f5bf(0x22a)+_0x241b94+_0x4f5bf(0x61b)+_0x2622d2+'…');const _0x2e5270=await _0x4b958b[_0x4f5bf(0x60c)][_0x4f5bf(0x7e3)](_0x2622d2,{'envName':_0x241b94,'types':_0xe10aec,'includeChanges':!!_0xa5ee01[_0x4f5bf(0x330)]});console[_0x4f5bf(0x689)](_0x4f5bf(0x288)+_0x2e5270[_0x4f5bf(0x427)]+_0x4f5bf(0x4e6)+_0x2e5270['records']+_0x4f5bf(0x764)+_0x2e5270[_0x4f5bf(0x330)]);if(_0xa5ee01[_0x4f5bf(0x457)]){const _0x5293f9=_0x3e45a6[_0x4f5bf(0x1c9)](_0x3e45a6[_0x4f5bf(0x836)](_0x2622d2),_0x4f5bf(0x457));process[_0x4f5bf(0x498)][_0x4f5bf(0x82b)](_0x4f5bf(0x871));const {count:_0x5b2f7d,bytes:_0x1770dc}=await _0x4b958b[_0x4f5bf(0x60c)]['exportBlobs'](_0x5293f9);console[_0x4f5bf(0x689)](_0x4f5bf(0x5b9)+_0x5293f9+_0x4f5bf(0x8c8)+_0x5b2f7d+'\x20file'+(_0x5b2f7d!==0x1?'s':'')+',\x20'+(_0x1770dc/0x400/0x400)[_0x4f5bf(0x39b)](0x2)+'\x20MB)');}await _0x4b958b[_0x4f5bf(0x6e0)](),console[_0x4f5bf(0x689)](_0x4f5bf(0x21e));}async function _0x3a1cbd(_0x56555c,_0x14b08a,_0x583870){const _0xcc23c1=_0x92a1c9,_0x38ac39=require$$5$1,_0x28fcce=_0x3e45a6[_0xcc23c1(0x8c2)](_0x14b08a[_0xcc23c1(0x336)]),_0x39aa55=_0x583870[_0xcc23c1(0x787)]??null,_0x257e5e=_0x583870[_0xcc23c1(0x427)]?_0x583870[_0xcc23c1(0x427)][_0xcc23c1(0x84e)](',')[_0xcc23c1(0x595)](_0x469dff=>_0x469dff[_0xcc23c1(0x48b)]()):null,_0x2e580d=!!_0x583870[_0xcc23c1(0x2f6)];console[_0xcc23c1(0x689)](_0xcc23c1(0x731)+_0x28fcce+'…');const _0x2914aa=new _0x38ac39(_0x28fcce,_0xef2b40(_0x14b08a));await _0x2914aa[_0xcc23c1(0x5f0)](),console['log'](_0xcc23c1(0x197)+_0x56555c+'…');const _0x55baff=await _0x2914aa[_0xcc23c1(0x60c)]['importFromFile'](_0x56555c,{'envName':_0x39aa55,'types':_0x257e5e,'dropExisting':_0x2e580d,'includeChanges':!!_0x583870[_0xcc23c1(0x330)],'onProgress':({type:_0x1776ff,count:_0x4c017b})=>{const _0x3ca679=_0xcc23c1;process[_0x3ca679(0x498)][_0x3ca679(0x82b)](_0x3ca679(0x221)+_0x1776ff+':\x20'+_0x4c017b+_0x3ca679(0x50f));}});process[_0xcc23c1(0x498)][_0xcc23c1(0x82b)]('\x0a'),console[_0xcc23c1(0x689)](_0xcc23c1(0x35a)+_0x55baff[_0xcc23c1(0x427)]+_0xcc23c1(0x4e6)+_0x55baff[_0xcc23c1(0x333)]+_0xcc23c1(0x764)+_0x55baff[_0xcc23c1(0x330)]);if(_0x583870[_0xcc23c1(0x457)]){const _0x1dbf25=_0x3e45a6[_0xcc23c1(0x1c9)](_0x3e45a6[_0xcc23c1(0x836)](_0x56555c),_0xcc23c1(0x457));if(_0x372f01[_0xcc23c1(0x5b6)](_0x1dbf25)){const {imported:_0x43f298,skipped:_0x29873e}=await _0x2914aa[_0xcc23c1(0x60c)][_0xcc23c1(0x268)](_0x1dbf25);console[_0xcc23c1(0x689)](_0xcc23c1(0x660)+_0x43f298+_0xcc23c1(0x5e2)+_0x29873e);}}await _0x2914aa[_0xcc23c1(0x6e0)](),console[_0xcc23c1(0x689)](_0xcc23c1(0x54c));}async function _0x80db64(_0x4b37b9,_0x598e71){const _0x35eac1=_0x92a1c9;_0x598e71['password']&&!_0x598e71[_0x35eac1(0x4f9)]&&(console[_0x35eac1(0x6cd)](_0x35eac1(0x6fb)),process[_0x35eac1(0x468)](0x1));const _0x1895b4=_0x598e71[_0x35eac1(0x496)]?_0x598e71[_0x35eac1(0x496)][_0x35eac1(0x84e)](',')['map'](_0x26a748=>_0x26a748['trim']())[_0x35eac1(0x542)](Boolean):[];let _0x253eed={};if(_0x598e71[_0x35eac1(0x6fd)])try{_0x253eed=JSON[_0x35eac1(0x7d3)](_0x598e71['grants']);if(typeof _0x253eed!=='object'||Array[_0x35eac1(0x59b)](_0x253eed)||_0x253eed===null)throw new Error();}catch{console[_0x35eac1(0x6cd)](_0x35eac1(0x4df)),process[_0x35eac1(0x468)](0x1);}const _0x3b98a9=require$$5$1,{randomToken:_0x511f1b,hashToken:_0x54505d,hashPassword:_0x4b078d}=requireOkdbAuthTokens(),_0x4f9314=require$$2$1,_0x20328c=_0x3e45a6[_0x35eac1(0x8c2)](_0x4b37b9[_0x35eac1(0x336)]),_0x51f5ae=new _0x3b98a9(_0x20328c,_0xef2b40(_0x4b37b9));await _0x51f5ae['open']();try{await _0x51f5ae[_0x35eac1(0x716)][_0x35eac1(0x586)]();if(_0x598e71['name']){const _0x231cde=await _0x51f5ae[_0x35eac1(0x716)][_0x35eac1(0x483)](_0x598e71[_0x35eac1(0x4f9)]);_0x231cde&&(console['error'](_0x35eac1(0x4f7)+_0x598e71[_0x35eac1(0x4f9)]+_0x35eac1(0x22c)),process['exit'](0x1));}const _0x2b161e=_0x511f1b(0x20),_0xe17521=_0x54505d(_0x2b161e),_0x476d86=_0x598e71['password']?await _0x4b078d(_0x598e71[_0x35eac1(0x23e)]):null,_0x2a29e9=_0x4f9314['randomUUID'](),_0x60c3ac={'tokenHash':_0xe17521,'name':_0x598e71[_0x35eac1(0x4f9)]||null,'passwordHash':_0x476d86,'label':_0x598e71[_0x35eac1(0x37e)]||null,'permissions':_0x1895b4,'grants':_0x253eed,'createdAt':Date[_0x35eac1(0x4ec)](),'lastUsedAt':null},_0x15f165=_0x598e71[_0x35eac1(0x7b0)]?{'ttl':Number(_0x598e71[_0x35eac1(0x7b0)])}:undefined;await _0x51f5ae[_0x35eac1(0x736)][_0x35eac1(0x25f)](_0x35eac1(0x4b1),_0x2a29e9,_0x60c3ac,_0x15f165),console[_0x35eac1(0x689)](_0x35eac1(0x8b8)),console[_0x35eac1(0x689)](_0x35eac1(0x34e)+_0x2a29e9),console[_0x35eac1(0x689)](_0x35eac1(0x46f)+(_0x598e71['name']||_0x35eac1(0x3a1))),console[_0x35eac1(0x689)](_0x35eac1(0x71f)+(_0x598e71[_0x35eac1(0x37e)]||_0x35eac1(0x3a1))),console[_0x35eac1(0x689)](_0x35eac1(0x376)+(_0x1895b4['join'](',\x20')||_0x35eac1(0x6d5))),console[_0x35eac1(0x689)](_0x35eac1(0x1f7)),console[_0x35eac1(0x689)](_0x35eac1(0x86f)+_0x2b161e+'\x0a');}finally{await _0x51f5ae[_0x35eac1(0x6e0)]();}}async function _0x496bc3(_0x1d6119){const _0x285be5=_0x92a1c9,_0x345d94=require$$5$1,_0x29ae2e=_0x3e45a6['resolve'](_0x1d6119['dbPath']),_0xf550b9=new _0x345d94(_0x29ae2e,_0xef2b40(_0x1d6119));await _0xf550b9[_0x285be5(0x5f0)]();try{const _0x45e868=_0xf550b9[_0x285be5(0x736)];if(!_0x45e868||!_0x45e868[_0x285be5(0x6f1)]('~tokens')){console['log'](_0x285be5(0x57e));return;}const _0x97c847=[];for(const {key:_0x159dbe,value:_0x4c858d}of _0x45e868['getRange'](_0x285be5(0x4b1))){_0x97c847['push']({'id':_0x159dbe,'name':_0x4c858d['name']||_0x285be5(0x3a1),'label':_0x4c858d[_0x285be5(0x37e)]||_0x285be5(0x3a1),'permissions':Array[_0x285be5(0x59b)](_0x4c858d['permissions'])?_0x4c858d[_0x285be5(0x496)][_0x285be5(0x1c9)](','):'','created':_0x4c858d[_0x285be5(0x6d4)]?new Date(_0x4c858d[_0x285be5(0x6d4)])[_0x285be5(0x611)]()[_0x285be5(0x27f)](0x0,0xa):''});}if(_0x97c847[_0x285be5(0x6ad)]===0x0){console[_0x285be5(0x689)](_0x285be5(0x57e));return;}const _0x42329d=!process[_0x285be5(0x498)][_0x285be5(0x1dc)]||process[_0x285be5(0x498)][_0x285be5(0x1dc)]>=0x64,_0x960533=_0x42329d?0x24:0xa,_0x465cf0=['ID'[_0x285be5(0x708)](_0x960533),_0x285be5(0x7f8)[_0x285be5(0x708)](0x10),_0x285be5(0x23c)['padEnd'](0x14),_0x285be5(0x6bd)[_0x285be5(0x708)](0x14),_0x285be5(0x1a4)][_0x285be5(0x1c9)]('\x20\x20');console[_0x285be5(0x689)]('\x0a'+_0x465cf0),console['log']('-'[_0x285be5(0x2f5)](_0x465cf0['length']));for(const _0x5cb9e9 of _0x97c847){const _0x5e81aa=_0x42329d?_0x5cb9e9['id']:_0x5cb9e9['id'][_0x285be5(0x27f)](0x0,0x8)+'…';console[_0x285be5(0x689)]([_0x5e81aa[_0x285be5(0x708)](_0x960533),_0x5cb9e9[_0x285be5(0x4f9)][_0x285be5(0x27f)](0x0,0x10)['padEnd'](0x10),_0x5cb9e9[_0x285be5(0x37e)][_0x285be5(0x27f)](0x0,0x14)['padEnd'](0x14),_0x5cb9e9['permissions']['slice'](0x0,0x14)[_0x285be5(0x708)](0x14),_0x5cb9e9[_0x285be5(0x516)]]['join']('\x20\x20'));}console['log']('');}finally{await _0xf550b9['close']();}}async function _0x2a5f71(_0x31f9cd,_0x44698e){const _0x4d4392=_0x92a1c9;!_0x31f9cd&&(console[_0x4d4392(0x6cd)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x4d4392(0x468)](0x1));const _0x2c3eef=require$$5$1,_0x148f11=_0x3e45a6['resolve'](_0x44698e[_0x4d4392(0x336)]),_0x35166f=new _0x2c3eef(_0x148f11,_0xef2b40(_0x44698e));await _0x35166f[_0x4d4392(0x5f0)]();try{const _0x2ec7c9=_0x35166f[_0x4d4392(0x736)];(!_0x2ec7c9||!_0x2ec7c9[_0x4d4392(0x6f1)](_0x4d4392(0x4b1)))&&(console[_0x4d4392(0x6cd)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x31f9cd+'\x22'),process['exit'](0x1));let _0x32f361=null,_0x377605=null;const _0x33732c=_0x2ec7c9[_0x4d4392(0x2fa)](_0x4d4392(0x4b1),_0x31f9cd);if(_0x33732c)_0x32f361=_0x31f9cd,_0x377605=_0x33732c;else{const _0x3301a9=[];for(const {key:_0x1de98d,value:_0x1dc89a}of _0x2ec7c9[_0x4d4392(0x3c9)](_0x4d4392(0x4b1))){if(_0x1de98d[_0x4d4392(0x579)](_0x31f9cd))_0x3301a9[_0x4d4392(0x557)]({'key':_0x1de98d,'value':_0x1dc89a});}_0x3301a9[_0x4d4392(0x6ad)]===0x0&&(console[_0x4d4392(0x6cd)](_0x4d4392(0x7f1)+_0x31f9cd+'\x22'),process[_0x4d4392(0x468)](0x1));if(_0x3301a9[_0x4d4392(0x6ad)]>0x1){console[_0x4d4392(0x6cd)](_0x4d4392(0x820)+_0x31f9cd+_0x4d4392(0x489)+_0x3301a9['length']+_0x4d4392(0x6f9));for(const _0x137462 of _0x3301a9){console[_0x4d4392(0x6cd)]('\x20\x20'+_0x137462[_0x4d4392(0x47f)]+'\x20\x20(name:\x20'+(_0x137462[_0x4d4392(0x352)][_0x4d4392(0x4f9)]||_0x4d4392(0x3a1))+')');}process['exit'](0x1);}_0x32f361=_0x3301a9[0x0][_0x4d4392(0x47f)],_0x377605=_0x3301a9[0x0][_0x4d4392(0x352)];}await _0x2ec7c9[_0x4d4392(0x417)]('~tokens',_0x32f361),console['log'](_0x4d4392(0x26d)+_0x32f361+_0x4d4392(0x622)+(_0x377605['name']||_0x4d4392(0x3a1))+',\x20label:\x20'+(_0x377605[_0x4d4392(0x37e)]||'(unset)')+')');}finally{await _0x35166f[_0x4d4392(0x6e0)]();}}function _0x46ace7(_0x12136e,_0x20d421){const _0x4b785e=_0x92a1c9;if(!_0x12136e[_0x4b785e(0x589)])return _0x4b785e(0x242);const _0xc076c4=_0x12136e[_0x4b785e(0x282)];if(!_0xc076c4)return'active';if(_0x20d421>_0xc076c4)return _0x4b785e(0x537);return _0x4b785e(0x676);}function _0x313f80(_0x485d40){const _0x503816=_0x92a1c9;if(!_0x485d40||typeof _0x485d40!==_0x503816(0x601))return'';const _0x3e70cd=Object[_0x503816(0x87f)](_0x485d40)[_0x503816(0x542)](([,_0x44b057])=>_0x44b057)[_0x503816(0x595)](([_0x1e8688])=>_0x1e8688);if(_0x3e70cd[_0x503816(0x6ad)]===0x0)return _0x503816(0x6d5);if(_0x3e70cd[_0x503816(0x6ad)]<=0x3)return _0x3e70cd[_0x503816(0x1c9)]('\x20');return _0x3e70cd[_0x503816(0x27f)](0x0,0x3)[_0x503816(0x1c9)]('\x20')+('\x20+'+(_0x3e70cd['length']-0x3));}async function _0x3abaf8(_0x15a47d){const _0x2fd173=_0x92a1c9,_0x53a115=require$$5$1,_0x2ae5b8=requireOkdbLicenseCodec(),{_C:_0x447ed4}=requireOkdbLicense(),_0x347d72=_0x3e45a6[_0x2fd173(0x8c2)](_0x15a47d[_0x2fd173(0x336)]),_0x4e3478=new _0x53a115(_0x347d72,_0xef2b40(_0x15a47d));await _0x4e3478[_0x2fd173(0x5f0)]();try{const _0x431530=_0x4e3478[_0x2fd173(0x736)],_0x2616ec=_0x431530?.['db']?.[_0x2fd173(0x2fa)]?.(_0x2fd173(0x768))??0x0,_0x55421c=[..._0x4e3478[_0x2fd173(0x41e)][_0x2fd173(0x818)]()]['filter'](_0xa3adb8=>!_0xa3adb8[_0x2fd173(0x579)]('~'))[_0x2fd173(0x6ad)],_0x3d81e5=_0x4e3478[_0x2fd173(0x502)]?.[_0x2fd173(0x1ac)];if(_0x3d81e5){const _0x4ff578=_0x3d81e5['_isFree']===!![],_0xf499ad=_0x4ff578?_0x2fd173(0x5bb):_0x4e3478['_license'][_0x2fd173(0x676)]?.[_0x2fd173(0x53d)]||_0x2fd173(0x7dd);console[_0x2fd173(0x689)](''),console[_0x2fd173(0x689)](_0x2fd173(0x3a8)+_0xf499ad);const _0x114548=_0x3d81e5['limits']||{};if(_0x114548[_0x2fd173(0x1e0)]){const _0x1425d3=Math['round'](_0x2616ec/_0x114548[_0x2fd173(0x1e0)]*0x64);console[_0x2fd173(0x689)]('\x20\x20Writes:\x20\x20'+_0x2616ec[_0x2fd173(0x684)]()+'\x20/\x20'+_0x114548[_0x2fd173(0x1e0)][_0x2fd173(0x684)]()+_0x2fd173(0x8c8)+_0x1425d3+'%)');}else console[_0x2fd173(0x689)](_0x2fd173(0x7ee)+_0x2616ec[_0x2fd173(0x684)]());_0x114548[_0x2fd173(0x7f3)]?console['log'](_0x2fd173(0x5da)+_0x55421c+_0x2fd173(0x20b)+_0x114548[_0x2fd173(0x7f3)]):console[_0x2fd173(0x689)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x55421c),_0x447ed4?.['PUB_FINGERPRINT']&&console[_0x2fd173(0x689)](_0x2fd173(0x751)+_0x447ed4[_0x2fd173(0x476)]+_0x2fd173(0x31a));}if(!_0x431530||!_0x431530['hasType'](_0x2fd173(0x1a9))){console['log'](''),console['log'](_0x2fd173(0x72b)),console[_0x2fd173(0x689)]('');return;}const _0x2be9f4=[],_0x5a184d=Date[_0x2fd173(0x4ec)](),_0x15cb26=_0x4e3478['id'],_0x50c076=_0x2fd173(0x720);for(const {key:_0x2719ff,value:_0xe72de4}of _0x431530[_0x2fd173(0x3c9)](_0x2fd173(0x1a9))){const _0x4efc47=_0xe72de4[_0x2fd173(0x55f)]?Buffer['from'](_0xe72de4[_0x2fd173(0x55f)],'hex'):Buffer[_0x2fd173(0x2fe)](0x8);let _0x1c48d0='';try{_0x1c48d0=_0x2ae5b8[_0x2fd173(0x741)](_0x15cb26,_0x4efc47,_0x50c076)[_0x2fd173(0x385)];}catch{}_0x2be9f4[_0x2fd173(0x557)]({'id':_0x2719ff,'licensee':_0xe72de4[_0x2fd173(0x53d)]||'','expires':_0xe72de4[_0x2fd173(0x282)]?new Date(_0xe72de4[_0x2fd173(0x282)])[_0x2fd173(0x611)]()['slice'](0x0,0xa):'','features':_0x313f80(_0xe72de4['features']),'pin':_0x1c48d0,'status':_0x46ace7(_0xe72de4,_0x5a184d)});}if(_0x2be9f4[_0x2fd173(0x6ad)]===0x0){console[_0x2fd173(0x689)](''),console[_0x2fd173(0x689)](_0x2fd173(0x72b)),console[_0x2fd173(0x689)]('');return;}const _0x5fadab=['\x20\x20'+'ID'[_0x2fd173(0x708)](0xe),_0x2fd173(0x538)[_0x2fd173(0x708)](0xe),'EXPIRES'[_0x2fd173(0x708)](0xc),_0x2fd173(0x43a)[_0x2fd173(0x708)](0x1e),_0x2fd173(0x5f3)[_0x2fd173(0x708)](0xa),_0x2fd173(0x795)][_0x2fd173(0x1c9)]('\x20');console[_0x2fd173(0x689)]('\x0a'+_0x5fadab);for(const _0x5adbf4 of _0x2be9f4){const _0x4801ed=_0x5adbf4['id'][_0x2fd173(0x27f)](0x0,0x8)+'\u2026';console[_0x2fd173(0x689)](['\x20\x20'+_0x4801ed[_0x2fd173(0x708)](0xe),_0x5adbf4[_0x2fd173(0x53d)][_0x2fd173(0x27f)](0x0,0xe)[_0x2fd173(0x708)](0xe),_0x5adbf4[_0x2fd173(0x1ed)][_0x2fd173(0x708)](0xc),_0x5adbf4[_0x2fd173(0x257)][_0x2fd173(0x27f)](0x0,0x1e)['padEnd'](0x1e),_0x5adbf4['pin']['padEnd'](0xa),_0x5adbf4[_0x2fd173(0x2c4)]][_0x2fd173(0x1c9)]('\x20'));}console[_0x2fd173(0x689)]('');}finally{await _0x4e3478[_0x2fd173(0x6e0)]();}}async function _0x4ccb98(_0x177919,_0x5684d2){const _0x4ccd2c=_0x92a1c9,_0x11b02b=require$$5$1,_0x466813=requireOkdbLicenseCodec();let _0x17a891=_0x177919;(_0x466813[_0x4ccd2c(0x3bb)](_0x177919)===_0x4ccd2c(0x5be)||_0x372f01['existsSync'](_0x177919)&&_0x372f01['statSync'](_0x177919)['isFile']())&&(_0x17a891=_0x372f01[_0x4ccd2c(0x308)](_0x177919,_0x4ccd2c(0x88a))[_0x4ccd2c(0x48b)]());const _0x7bf2eb=_0x3e45a6[_0x4ccd2c(0x8c2)](_0x5684d2[_0x4ccd2c(0x336)]),_0x892e38=new _0x11b02b(_0x7bf2eb,_0xef2b40(_0x5684d2));await _0x892e38['open']();try{let _0x2f9ba5;try{_0x2f9ba5=await _0x892e38[_0x4ccd2c(0x4ba)]['add']({'blob':_0x17a891});}catch(_0x79a294){console[_0x4ccd2c(0x6cd)](_0x4ccd2c(0x320)+_0x79a294[_0x4ccd2c(0x81d)]),process['exit'](0x1);}const _0x322a29=_0x2f9ba5[_0x4ccd2c(0x385)]||'',_0x1fb697=Object['entries'](_0x2f9ba5[_0x4ccd2c(0x257)]||{})[_0x4ccd2c(0x542)](([,_0x19003d])=>_0x19003d)[_0x4ccd2c(0x595)](([_0x17bccd])=>_0x17bccd),_0x2851a3=_0x2f9ba5[_0x4ccd2c(0x5b3)]||{},_0x43cea4=[_0x2851a3[_0x4ccd2c(0x7f3)]?_0x4ccd2c(0x5b0)+_0x2851a3[_0x4ccd2c(0x7f3)]:null,_0x2851a3[_0x4ccd2c(0x340)]?_0x4ccd2c(0x561)+_0x2851a3['typesPerEnv']:null,_0x2851a3['syncPeers']?'peers='+_0x2851a3[_0x4ccd2c(0x1c8)]:null,_0x2851a3[_0x4ccd2c(0x1e0)]?_0x4ccd2c(0x2e7)+_0x2851a3[_0x4ccd2c(0x1e0)][_0x4ccd2c(0x684)]():null]['filter'](Boolean)[_0x4ccd2c(0x1c9)]('\x20\x20'),_0x143c83=_0x2f9ba5[_0x4ccd2c(0x4fa)]!==_0x4ccd2c(0x382);console[_0x4ccd2c(0x689)](_0x2f9ba5[_0x4ccd2c(0x7e5)]?_0x4ccd2c(0x313):_0x4ccd2c(0x301)),console[_0x4ccd2c(0x689)](_0x4ccd2c(0x363)+_0x2f9ba5['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0x2f9ba5[_0x4ccd2c(0x53d)]),console[_0x4ccd2c(0x689)](_0x4ccd2c(0x811)+(_0x2f9ba5[_0x4ccd2c(0x282)]?new Date(_0x2f9ba5[_0x4ccd2c(0x282)])[_0x4ccd2c(0x611)]()[_0x4ccd2c(0x27f)](0x0,0xa):_0x4ccd2c(0x456))),console['log'](_0x4ccd2c(0x63f)+(_0x1fb697[_0x4ccd2c(0x1c9)](',\x20')||_0x4ccd2c(0x6d5)));if(_0x43cea4)console[_0x4ccd2c(0x689)]('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x43cea4);if(_0x143c83)console[_0x4ccd2c(0x689)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20('+_0x2f9ba5[_0x4ccd2c(0x4fa)]+'\x20license\x20—\x20no\x20activation\x20needed)'),console['log']('');else!_0x2f9ba5[_0x4ccd2c(0x337)]?(console[_0x4ccd2c(0x689)](_0x4ccd2c(0x38a)+_0x2f9ba5[_0x4ccd2c(0x2c4)]),console[_0x4ccd2c(0x689)]('')):(console[_0x4ccd2c(0x689)](_0x4ccd2c(0x874)+_0x322a29),console['log'](_0x4ccd2c(0x410)),console[_0x4ccd2c(0x689)](''),console[_0x4ccd2c(0x689)]('\x20\x20Next\x20step\x20\u2014\x20activate\x20the\x20license:'),console[_0x4ccd2c(0x689)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x322a29+_0x4ccd2c(0x4b7)),console[_0x4ccd2c(0x689)](_0x4ccd2c(0x2f2)),console[_0x4ccd2c(0x689)]('\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>'),console['log'](''));}finally{await _0x892e38[_0x4ccd2c(0x6e0)]();}}async function _0x58e7e9(_0xb80d9b,_0x5828cb){const _0x2aa5b2=_0x92a1c9,_0x5600ca=require$$5$1,_0x5ddc9e=_0x3e45a6[_0x2aa5b2(0x8c2)](_0x5828cb[_0x2aa5b2(0x336)]),_0x22f47d=new _0x5600ca(_0x5ddc9e,_0xef2b40(_0x5828cb));await _0x22f47d[_0x2aa5b2(0x5f0)]();try{let _0x51c191;try{_0x51c191=await _0x22f47d['licenses'][_0x2aa5b2(0x737)](_0xb80d9b);}catch(_0x2f6e88){console[_0x2aa5b2(0x6cd)](_0x2aa5b2(0x320)+_0x2f6e88[_0x2aa5b2(0x81d)]),console[_0x2aa5b2(0x6cd)](''),console[_0x2aa5b2(0x6cd)]('\x20\x20Common\x20causes:'),console['error'](_0x2aa5b2(0x719)),console[_0x2aa5b2(0x6cd)](_0x2aa5b2(0x431)),console[_0x2aa5b2(0x6cd)](_0x2aa5b2(0x304)),console['error'](''),process['exit'](0x1);}console['log'](_0x2aa5b2(0x7cc)),console[_0x2aa5b2(0x689)](_0x2aa5b2(0x363)+_0x51c191['id']),console[_0x2aa5b2(0x689)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x51c191['licensee']),console[_0x2aa5b2(0x689)](_0x2aa5b2(0x811)+(_0x51c191['expiresAt']?new Date(_0x51c191[_0x2aa5b2(0x282)])[_0x2aa5b2(0x611)]()[_0x2aa5b2(0x27f)](0x0,0xa):_0x2aa5b2(0x456))),console['log'](_0x2aa5b2(0x80e)),console['log']('');}finally{await _0x22f47d[_0x2aa5b2(0x6e0)]();}}async function _0x1bc1a4(_0x3a7ae7,_0x2b303a){const _0x2004a2=_0x92a1c9;!_0x3a7ae7&&(console[_0x2004a2(0x6cd)](_0x2004a2(0x295)),process[_0x2004a2(0x468)](0x1));const _0x58993c=require$$5$1,_0x523d76=requireOkdbLicenseCodec(),_0x2c8542=_0x3e45a6[_0x2004a2(0x8c2)](_0x2b303a[_0x2004a2(0x336)]),_0x358e13=new _0x58993c(_0x2c8542,_0xef2b40(_0x2b303a));await _0x358e13[_0x2004a2(0x5f0)]();try{const _0x5ce951=_0x358e13[_0x2004a2(0x736)];(!_0x5ce951||!_0x5ce951[_0x2004a2(0x6f1)]('~licenses'))&&(console['error'](_0x2004a2(0x68f)+_0x3a7ae7+'\x22'),process[_0x2004a2(0x468)](0x1));let _0x1683ba=null,_0xe1e2d5=null;const _0x34f423=_0x5ce951['get'](_0x2004a2(0x1a9),_0x3a7ae7);if(_0x34f423)_0x1683ba=_0x3a7ae7,_0xe1e2d5=_0x34f423;else{const _0x23d479=[];for(const {key:_0x1069bf,value:_0x5009b1}of _0x5ce951[_0x2004a2(0x3c9)](_0x2004a2(0x1a9))){if(_0x1069bf[_0x2004a2(0x579)](_0x3a7ae7))_0x23d479[_0x2004a2(0x557)]({'key':_0x1069bf,'value':_0x5009b1});}_0x23d479[_0x2004a2(0x6ad)]===0x0&&(console[_0x2004a2(0x6cd)](_0x2004a2(0x68f)+_0x3a7ae7+'\x22'),process[_0x2004a2(0x468)](0x1)),_0x23d479['length']>0x1&&(console[_0x2004a2(0x6cd)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x3a7ae7+_0x2004a2(0x489)+_0x23d479[_0x2004a2(0x6ad)]+_0x2004a2(0x378)),process[_0x2004a2(0x468)](0x1)),_0x1683ba=_0x23d479[0x0]['key'],_0xe1e2d5=_0x23d479[0x0][_0x2004a2(0x352)];}const _0xbcda0=Date[_0x2004a2(0x4ec)](),_0x50e4be=_0x46ace7(_0xe1e2d5,_0xbcda0),_0x399ddc=_0x358e13['id'],_0x36c890=_0x2004a2(0x720);let _0x2467c8='';try{const _0xf27e43=Buffer['from'](_0xe1e2d5[_0x2004a2(0x55f)],_0x2004a2(0x6b1));_0x2467c8=_0x523d76[_0x2004a2(0x741)](_0x399ddc,_0xf27e43,_0x36c890)[_0x2004a2(0x385)];}catch{}const _0x34f8da=_0xe1e2d5[_0x2004a2(0x257)]?Object[_0x2004a2(0x87f)](_0xe1e2d5[_0x2004a2(0x257)])[_0x2004a2(0x542)](([,_0x1f53f3])=>_0x1f53f3)[_0x2004a2(0x595)](([_0x30a9af])=>_0x30a9af):[],_0x2df3b6=_0xe1e2d5[_0x2004a2(0x5b3)]||{},_0x455168=_0x5ce951?.['db']?.[_0x2004a2(0x2fa)]?.(_0x2004a2(0x768))??0x0,_0x1a9566=[..._0x358e13[_0x2004a2(0x41e)][_0x2004a2(0x818)]()]['filter'](_0x5bba0f=>!_0x5bba0f[_0x2004a2(0x579)]('~'))[_0x2004a2(0x6ad)];console[_0x2004a2(0x689)]('\x0a\x20\x20License\x20details:'),console['log'](_0x2004a2(0x363)+_0x1683ba),console[_0x2004a2(0x689)](_0x2004a2(0x30f)+(_0xe1e2d5[_0x2004a2(0x53d)]||'')),console[_0x2004a2(0x689)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0xe1e2d5['expiresAt']?new Date(_0xe1e2d5['expiresAt'])['toISOString']()['slice'](0x0,0xa):'')),console[_0x2004a2(0x689)](_0x2004a2(0x63f)+(_0x34f8da[_0x2004a2(0x1c9)](',\x20')||_0x2004a2(0x6d5))),console[_0x2004a2(0x689)](_0x2004a2(0x874)+_0x2467c8),console[_0x2004a2(0x689)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x50e4be),console[_0x2004a2(0x689)](_0x2004a2(0x32f)+new Date(_0xe1e2d5[_0x2004a2(0x49f)])[_0x2004a2(0x611)]());if(_0x50e4be===_0x2004a2(0x676)){console['log'](''),console[_0x2004a2(0x689)]('\x20\x20Usage:');if(_0x2df3b6[_0x2004a2(0x1e0)]){const _0x55785b=Math[_0x2004a2(0x578)](_0x455168/_0x2df3b6['maxWrites']*0x64);console[_0x2004a2(0x689)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x455168[_0x2004a2(0x684)]()+'\x20/\x20'+_0x2df3b6['maxWrites'][_0x2004a2(0x684)]()+_0x2004a2(0x8c8)+_0x55785b+'%)');}else console[_0x2004a2(0x689)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x455168[_0x2004a2(0x684)]()+_0x2004a2(0x805));_0x2df3b6[_0x2004a2(0x7f3)]?console[_0x2004a2(0x689)](_0x2004a2(0x42c)+_0x1a9566+_0x2004a2(0x20b)+_0x2df3b6[_0x2004a2(0x7f3)]):console[_0x2004a2(0x689)](_0x2004a2(0x42c)+_0x1a9566+'\x20\x20(unlimited)');}console[_0x2004a2(0x689)]('');}finally{await _0x358e13[_0x2004a2(0x6e0)]();}}async function _0x1a746f(_0xe6d293,_0x63d1cb){const _0x76075d=_0x92a1c9;!_0xe6d293&&(console[_0x76075d(0x6cd)](_0x76075d(0x220)),process['exit'](0x1));const _0x358d20=require$$5$1,_0x4c4d2a=_0x3e45a6[_0x76075d(0x8c2)](_0x63d1cb[_0x76075d(0x336)]),_0x656440=new _0x358d20(_0x4c4d2a,_0xef2b40(_0x63d1cb));await _0x656440['open']();try{const _0xb3a405=_0x656440[_0x76075d(0x736)];(!_0xb3a405||!_0xb3a405[_0x76075d(0x6f1)](_0x76075d(0x1a9)))&&(console[_0x76075d(0x6cd)](_0x76075d(0x68f)+_0xe6d293+'\x22'),process[_0x76075d(0x468)](0x1));let _0x5d16fd=null,_0x9d670f=null;const _0x14aacf=_0xb3a405['get']('~licenses',_0xe6d293);if(_0x14aacf)_0x5d16fd=_0xe6d293,_0x9d670f=_0x14aacf;else{const _0x1b8377=[];for(const {key:_0x21c6ca,value:_0x595916}of _0xb3a405['getRange'](_0x76075d(0x1a9))){if(_0x21c6ca[_0x76075d(0x579)](_0xe6d293))_0x1b8377['push']({'key':_0x21c6ca,'value':_0x595916});}_0x1b8377[_0x76075d(0x6ad)]===0x0&&(console[_0x76075d(0x6cd)](_0x76075d(0x68f)+_0xe6d293+'\x22'),process['exit'](0x1)),_0x1b8377['length']>0x1&&(console['error'](_0x76075d(0x820)+_0xe6d293+_0x76075d(0x489)+_0x1b8377[_0x76075d(0x6ad)]+_0x76075d(0x378)),process[_0x76075d(0x468)](0x1)),_0x5d16fd=_0x1b8377[0x0][_0x76075d(0x47f)],_0x9d670f=_0x1b8377[0x0][_0x76075d(0x352)];}await _0xb3a405[_0x76075d(0x417)](_0x76075d(0x1a9),_0x5d16fd),console[_0x76075d(0x689)](_0x76075d(0x57a)+_0x5d16fd+_0x76075d(0x355)+(_0x9d670f[_0x76075d(0x53d)]||_0x76075d(0x3a1))+')');}finally{await _0x656440['close']();}}async function _0x4b5e60(_0x5eed63,_0x304961,_0x4eff57){const _0x1530a1=_0x92a1c9;!_0x5eed63&&(console[_0x1530a1(0x6cd)](_0x1530a1(0x36d)),process[_0x1530a1(0x468)](0x1));!_0x4eff57['token']&&!(_0x4eff57[_0x1530a1(0x479)]&&_0x4eff57['password'])&&(console['error']('[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>'),process['exit'](0x1));const _0x455d03=_0x4eff57['selfAddress']||_0x304961['sync']?.[_0x1530a1(0x27c)];!_0x455d03&&(console[_0x1530a1(0x6cd)](_0x1530a1(0x3c8)+_0x1530a1(0x2c3)+_0x1530a1(0x3d2)),process[_0x1530a1(0x468)](0x1));const _0x4d4665=require$$5$1,_0x59cf0a=new _0x4d4665(_0x304961[_0x1530a1(0x336)],{'sync':{'address':_0x455d03,'auto_reconcile':![]}});await _0x59cf0a[_0x1530a1(0x5f0)]();try{const _0x1c3d98=_0x59cf0a['_systemEnv'];if(_0x1c3d98&&_0x1c3d98[_0x1530a1(0x6f1)](_0x1530a1(0x4b1))){let _0x283a75=![];for(const _0x53694a of _0x1c3d98[_0x1530a1(0x3c9)](_0x1530a1(0x4b1))){_0x283a75=!![];break;}_0x283a75&&console['log']('\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a'+_0x1530a1(0x3e3));}console[_0x1530a1(0x689)](_0x1530a1(0x742)+_0x5eed63+'…'),await _0x59cf0a[_0x1530a1(0x6d9)][_0x1530a1(0x1c9)](_0x5eed63[_0x1530a1(0x813)](/\/+$/,''),{'token':_0x4eff57[_0x1530a1(0x527)],'username':_0x4eff57[_0x1530a1(0x479)],'password':_0x4eff57[_0x1530a1(0x23e)]}),console[_0x1530a1(0x689)](_0x1530a1(0x812)),console[_0x1530a1(0x689)](_0x1530a1(0x802));}finally{await _0x59cf0a[_0x1530a1(0x6e0)]();}}async function _0x2fb5ae(){const _0x4d1048=_0x92a1c9,_0x4ed9ab=Date[_0x4d1048(0x4ec)](),_0x3fbe6e=_0x4e5792(process[_0x4d1048(0x409)]),_0x1b208f=_0xc7735d(_0x3fbe6e),_0x4c4267=_0x3e45a6[_0x4d1048(0x8c2)](_0x1b208f[_0x4d1048(0x336)]);!_0x1b208f[_0x4d1048(0x74b)]&&!process[_0x4d1048(0x248)][_0x4d1048(0x670)]&&(_0x1b208f[_0x4d1048(0x74b)]=!![]);const _0x591d2d=require$$5$1,{start:_0x3220de,colorLog:_0x1e553c}=requireOkdbShell(),_0x66e75a=require$$1$1,_0xebee84={..._0x1b208f[_0x4d1048(0x47f)]?{'encryptionKey':_0x1b208f[_0x4d1048(0x47f)]}:{},..._0x1b208f[_0x4d1048(0x69b)]?{'admin':![]}:_0x5aa31d(_0x1b208f[_0x4d1048(0x1bb)])?{'admin':_0x1b208f[_0x4d1048(0x1bb)]}:{},..._0x5aa31d(_0x1b208f[_0x4d1048(0x2b1)])?{'api':_0x1b208f[_0x4d1048(0x2b1)]}:{},..._0x5aa31d(_0x1b208f[_0x4d1048(0x716)])?{'auth':_0x1b208f[_0x4d1048(0x716)]}:{},..._0x5aa31d(_0x1b208f[_0x4d1048(0x861)])?{'mcp':_0x1b208f['mcp']}:{},..._0x5aa31d(_0x1b208f['backup'])?{'backup':_0x1b208f[_0x4d1048(0x7b4)]}:{},..._0x1b208f[_0x4d1048(0x510)]!==![]?{'timeMachine':_0x1b208f[_0x4d1048(0x510)]}:{},...Object[_0x4d1048(0x324)](_0x260a0d[_0x4d1048(0x542)](_0x35f32b=>_0x1b208f[_0x35f32b]!==undefined)[_0x4d1048(0x595)](_0x1701d6=>[_0x1701d6,_0x1b208f[_0x1701d6]]))},_0x468f26=_0x11fa34(_0x1b208f);if(!_0x66e75a['isWorker']){const _0x30eee9=_0x1bf56b(),_0x7124bd=_0x1b208f['noCluster']?_0x4d1048(0x4f1):_0x1b208f[_0x4d1048(0x43e)]!=null&&_0x1b208f['workersFlag']!==''?_0x4d1048(0x832):process.env.OKDB_HTTP_WORKERS?'OKDB_HTTP_WORKERS\x20env':_0x1b208f['http']?.[_0x4d1048(0x307)]!=null?_0x4d1048(0x800):_0x4d1048(0x7dc)+Math['max'](0x1,require$$0[_0x4d1048(0x662)]()[_0x4d1048(0x6ad)]-0x1);process[_0x4d1048(0x498)][_0x4d1048(0x82b)](_0x4d1048(0x5f2)+_0x468f26+'\x20('+_0x7124bd+(!_0x30eee9?';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process':'')+')\x0a');}if(_0x66e75a[_0x4d1048(0x493)]){const _0x4fdb0e={..._0xebee84},_0x2306ee=new _0x591d2d(_0x4c4267,_0x4fdb0e);_0x2306ee['log'][_0x4d1048(0x408)]?.();const _0x56baa2=process.env.OKDB_CLUSTER_SLOT??'?',_0x53ba40={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1f0f88=_0x53ba40[_0x1b208f['logLevel']]??_0x53ba40['info'];_0x2306ee[_0x4d1048(0x689)][_0x4d1048(0x4ef)](_0x1d597c=>{const _0x5e681d=_0x4d1048;if((_0x53ba40[_0x1d597c[_0x5e681d(0x682)]]??0x1)<_0x1f0f88)return;try{process['send']?.({'__okdbCluster':_0x5e681d(0x689),'slot':_0x56baa2,'pid':process[_0x5e681d(0x5c3)],'entry':_0x1d597c});}catch{}}),await _0x2306ee[_0x4d1048(0x5f0)]();const {attachWorkerCluster:_0x1da99f}=requireOkdbCluster();_0x1da99f(_0x2306ee),await _0x5a8ed5(_0x2306ee,_0x1b208f['port'],_0x5bbcc0(_0x1b208f));return;}if(_0x468f26>0x1){const {runClustered:_0x1d7993}=requireOkdbCluster(),_0x3eb96f=new _0x591d2d(_0x4c4267,{..._0xebee84,'engines':![],'processors':![],'compaction':![]});await _0x3eb96f[_0x4d1048(0x5f0)]();const _0x499247=async()=>{const _0x3aa063=_0x4d1048,_0x2a0022=new _0x591d2d(_0x4c4267,{..._0xebee84});return await _0x2a0022[_0x3aa063(0x5f0)](),_0x2a0022;},_0x54d544=Object[_0x4d1048(0x324)](_0x260a0d[_0x4d1048(0x595)](_0xe4e6f9=>[_0xe4e6f9,_0xebee84[_0xe4e6f9]??!![]])),{formatListenAddr:_0x37121b}=requireOkdbHttp(),_0x3524ac=_0x37121b(_0x1b208f[_0x4d1048(0x397)],_0x1b208f[_0x4d1048(0x5fb)]?.[_0x4d1048(0x26b)]),_0x4ebc83=_0x1d7993({'workers':_0x468f26,'makeOkdb':_0x499247,'port':_0x1b208f[_0x4d1048(0x397)],'primaryOkdb':_0x3eb96f,'workerRole':_0x54d544,'listenAddr':_0x3524ac});let _0x2d911d=![];async function _0x195fdb(_0x2294fa){const _0x29898f=_0x4d1048;_0x2d911d&&(process['stderr'][_0x29898f(0x82b)](_0x29898f(0x1ec)),process['exit'](0x82));_0x2d911d=!![],process['stderr']['write'](_0x29898f(0x2c2)+(_0x2294fa||_0x29898f(0x6b6))+_0x29898f(0x3a9));const _0x4b56f5=setTimeout(()=>{const _0x4cedcc=_0x29898f;process['stderr']['write'](_0x4cedcc(0x342)),process['exit'](0x0);},0xbb8);_0x4b56f5[_0x29898f(0x895)]?.();try{await _0x4ebc83[_0x29898f(0x6e0)]();}catch(_0x58617e){process[_0x29898f(0x6d3)][_0x29898f(0x82b)]('[okdb]\x20cluster\x20close\x20error:\x20'+(_0x58617e?.[_0x29898f(0x81d)]??_0x58617e)+'\x0a');}try{await _0x3eb96f[_0x29898f(0x6e0)]();}catch(_0x54d997){process[_0x29898f(0x6d3)]['write'](_0x29898f(0x46b)+(_0x54d997?.[_0x29898f(0x81d)]??_0x54d997)+'\x0a');}process[_0x29898f(0x468)](0x0);}_0x1b208f['clusterWorkers']=_0x468f26;if(!_0x1b208f['noRepl']){_0x3eb96f[_0x4d1048(0x689)][_0x4d1048(0x408)]?.(),_0x4856fc(_0x3eb96f[_0x4d1048(0x716)]?.['getSecurityNotices']?.()??[]),await _0x3220de(_0x3eb96f,_0x1b208f);return;}process[_0x4d1048(0x498)]['write'](_0x4d1048(0x65f)+process[_0x4d1048(0x5c3)]+_0x4d1048(0x8a1)+_0x468f26+'\x20'+('capable\x20HTTP\x20worker(s)\x20serving\x20:'+_0x1b208f[_0x4d1048(0x397)]+'\x0a')),console[_0x4d1048(0x689)](''),console[_0x4d1048(0x689)](_0x4d1048(0x563)),console[_0x4d1048(0x689)](_0x4d1048(0x8a9)+_0x1b208f[_0x4d1048(0x397)]+_0x4d1048(0x8c8)+_0x468f26+_0x4d1048(0x794)),console['log'](_0x4d1048(0x7f4)+_0x4c4267),console[_0x4d1048(0x689)](_0x4d1048(0x5dd)+_0x3eb96f['id']),console['log'](_0x4d1048(0x46a)+_0x1b208f[_0x4d1048(0x397)]+_0x4d1048(0x459));!_0x1b208f['noAdmin']&&console['log'](_0x4d1048(0x37b)+_0x1b208f[_0x4d1048(0x397)]+_0x4d1048(0x30b));console[_0x4d1048(0x689)](''),_0x4856fc(_0x3eb96f[_0x4d1048(0x716)]?.[_0x4d1048(0x522)]?.()??[]),process['on'](_0x4d1048(0x7e0),()=>_0x195fdb(_0x4d1048(0x7e0))),process['on'](_0x4d1048(0x8bc),()=>_0x195fdb(_0x4d1048(0x8bc))),process['on']('SIGBREAK',()=>_0x195fdb(_0x4d1048(0x21c)));return;}const _0x54bd85=new _0x591d2d(_0x4c4267,_0xebee84);_0x54bd85[_0x4d1048(0x689)][_0x4d1048(0x408)]?.();const _0x84295a=_0x54bd85['log'][_0x4d1048(0x4ef)](_0x57181e=>_0x1e553c(_0x57181e,_0x1b208f[_0x4d1048(0x8c0)]));if(_0x1b208f[_0x4d1048(0x74b)])process[_0x4d1048(0x498)][_0x4d1048(0x82b)](_0x4d1048(0x50d));await _0x54bd85['open']();if(_0x1b208f[_0x4d1048(0x74b)])process[_0x4d1048(0x498)][_0x4d1048(0x82b)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x5a8ed5(_0x54bd85,_0x1b208f[_0x4d1048(0x397)],_0x5bbcc0(_0x1b208f));}catch(_0x2d75f7){_0x2d75f7[_0x4d1048(0x2dc)]===_0x4d1048(0x5fd)&&(console[_0x4d1048(0x6cd)](_0x4d1048(0x5b8)+_0x1b208f[_0x4d1048(0x397)]+'\x20already\x20in\x20use'),process['exit'](0x1));throw _0x2d75f7;}if(_0x1b208f[_0x4d1048(0x74b)]){const _0x3fe340=_0x1b208f[_0x4d1048(0x5fb)]?.[_0x4d1048(0x26b)]!==undefined?[][_0x4d1048(0x7fe)](_0x1b208f[_0x4d1048(0x5fb)][_0x4d1048(0x26b)])[_0x4d1048(0x1c9)](',\x20')+'\x20':'';process[_0x4d1048(0x498)][_0x4d1048(0x82b)]('\x20\x20✓\x20http\x20listening\x20on\x20'+_0x3fe340+':'+_0x1b208f[_0x4d1048(0x397)]+'\x0a');}if(!_0x1b208f[_0x4d1048(0x74b)])_0x54bd85[_0x4d1048(0x689)][_0x4d1048(0x408)]?.(),_0x84295a?.(),_0x4856fc(_0x54bd85[_0x4d1048(0x716)]?.[_0x4d1048(0x522)]?.()??[]),await _0x3220de(_0x54bd85,_0x1b208f);else{const _0x3e7539=_0x3e45a6[_0x4d1048(0x1c9)](_0x4c4267,_0x4d1048(0x857));try{_0x372f01[_0x4d1048(0x497)](_0x3e7539,String(process[_0x4d1048(0x5c3)]));}catch{}const _0x34c889=Date[_0x4d1048(0x4ec)]()-_0x4ed9ab;console[_0x4d1048(0x689)](''),console[_0x4d1048(0x689)](_0x4d1048(0x1e3)),console[_0x4d1048(0x689)](_0x4d1048(0x7d7)+_0x1b208f[_0x4d1048(0x397)]),console[_0x4d1048(0x689)](_0x4d1048(0x2e1)+_0x4c4267),console['log'](_0x4d1048(0x45f)+_0x54bd85['id']);{const _0xa4986f=_0x54bd85[_0x4d1048(0x736)]?.['db']?.[_0x4d1048(0x2fa)]?.(_0x4d1048(0x768))??0x0,_0x210c33=[..._0x54bd85['_envs'][_0x4d1048(0x818)]()][_0x4d1048(0x542)](_0x1a4318=>!_0x1a4318[_0x4d1048(0x579)]('~'))[_0x4d1048(0x6ad)];if(_0x54bd85['_license']?.['active']?.[_0x4d1048(0x1dd)]===0x1){const _0x419d9e=Math[_0x4d1048(0x347)]((_0x54bd85[_0x4d1048(0x502)][_0x4d1048(0x676)][_0x4d1048(0x282)]-Date['now']())/0x5265c00);console[_0x4d1048(0x689)](_0x4d1048(0x7a7)+_0x54bd85[_0x4d1048(0x502)][_0x4d1048(0x676)][_0x4d1048(0x53d)]+_0x4d1048(0x7d2)+_0x419d9e+_0x4d1048(0x6df));}else{if(_0x54bd85['_license']?.[_0x4d1048(0x676)]){const _0x3fa903=_0x54bd85[_0x4d1048(0x502)][_0x4d1048(0x676)];console[_0x4d1048(0x689)](_0x4d1048(0x5fe)+_0x3fa903[_0x4d1048(0x53d)]+_0x4d1048(0x428)+new Date(_0x3fa903[_0x4d1048(0x282)])['toISOString']()[_0x4d1048(0x27f)](0x0,0xa)+')');const _0x2a5e6b=_0x3fa903['limits']||{};if(_0x2a5e6b[_0x4d1048(0x1e0)]){const _0x523c7d=Math[_0x4d1048(0x578)](_0xa4986f/_0x2a5e6b[_0x4d1048(0x1e0)]*0x64);console[_0x4d1048(0x689)](_0x4d1048(0x391)+_0xa4986f['toLocaleString']()+_0x4d1048(0x20b)+_0x2a5e6b[_0x4d1048(0x1e0)][_0x4d1048(0x684)]()+_0x4d1048(0x7f2)+_0x523c7d+_0x4d1048(0x47b)+_0x210c33+(_0x2a5e6b[_0x4d1048(0x7f3)]?'/'+_0x2a5e6b[_0x4d1048(0x7f3)]:'')+_0x4d1048(0x2b8)+(_0x210c33===0x1?'':'s'));}}else{if(_0x54bd85[_0x4d1048(0x502)]){const _0x5b9bbd=_0x54bd85[_0x4d1048(0x502)][_0x4d1048(0x81c)](),_0x1f73d=_0x5b9bbd[_0x4d1048(0x6ad)]?_0x5b9bbd[_0x4d1048(0x595)](_0x5de509=>_0x5de509[_0x4d1048(0x385)])[_0x4d1048(0x1c9)](',\x20'):_0x4d1048(0x68d),_0x33da81=_0x54bd85[_0x4d1048(0x502)]['effective'],_0x2665bd=_0x33da81['limits'][_0x4d1048(0x1e0)]?Math[_0x4d1048(0x578)](_0xa4986f/_0x33da81[_0x4d1048(0x5b3)][_0x4d1048(0x1e0)]*0x64):0x0;console[_0x4d1048(0x689)](_0x4d1048(0x76c)),console['log'](_0x4d1048(0x391)+_0xa4986f['toLocaleString']()+_0x4d1048(0x20b)+_0x33da81[_0x4d1048(0x5b3)][_0x4d1048(0x1e0)][_0x4d1048(0x684)]()+_0x4d1048(0x7f2)+_0x2665bd+_0x4d1048(0x47b)+_0x210c33+_0x4d1048(0x20b)+_0x33da81['limits']['envs']+_0x4d1048(0x6a3)),console[_0x4d1048(0x689)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20'+_0x1f73d);}}}}console['log'](_0x4d1048(0x55a)+_0x1b208f[_0x4d1048(0x397)]+_0x4d1048(0x459));!_0x1b208f[_0x4d1048(0x69b)]&&console['log'](_0x4d1048(0x609)+_0x1b208f[_0x4d1048(0x397)]+_0x4d1048(0x30b));console[_0x4d1048(0x689)](''),console[_0x4d1048(0x689)](_0x4d1048(0x8aa)+_0x34c889+'ms'),_0x4856fc(_0x54bd85['auth']?.['getSecurityNotices']?.()??[]);let _0xce3c3a=![];async function _0x5c01ef(_0x4db60e){const _0x49cf98=_0x4d1048;_0xce3c3a&&(process[_0x49cf98(0x6d3)][_0x49cf98(0x82b)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x49cf98(0x468)](0x82));_0xce3c3a=!![],process['stderr'][_0x49cf98(0x82b)](_0x49cf98(0x2c2)+(_0x4db60e||'shutdown')+',\x20closing…\x0a');const _0x2f970a=setTimeout(()=>{const _0x3b2b12=_0x49cf98;process[_0x3b2b12(0x6d3)][_0x3b2b12(0x82b)](_0x3b2b12(0x6f7)),process[_0x3b2b12(0x468)](0x1);},0x1388);try{_0x372f01[_0x49cf98(0x291)](_0x3e7539);}catch{}try{await _0x54bd85[_0x49cf98(0x6e0)]();}catch(_0x1f7915){process['stderr']['write'](_0x49cf98(0x60f)+(_0x1f7915?.[_0x49cf98(0x81d)]??_0x1f7915)+'\x0a');}clearTimeout(_0x2f970a),process[_0x49cf98(0x6d3)][_0x49cf98(0x82b)](_0x49cf98(0x4d4)),process[_0x49cf98(0x468)](0x0);}process['on'](_0x4d1048(0x7e0),()=>_0x5c01ef(_0x4d1048(0x7e0))),process['on'](_0x4d1048(0x8bc),()=>_0x5c01ef('SIGTERM')),process['on'](_0x4d1048(0x21c),()=>_0x5c01ef('SIGBREAK'));}}const _0x46f215=new Set([_0x92a1c9(0x598),'doctor','init',_0x92a1c9(0x7b4),_0x92a1c9(0x699),_0x92a1c9(0x678),_0x92a1c9(0x7af),_0x92a1c9(0x5f9),_0x92a1c9(0x527),_0x92a1c9(0x1c9),_0x92a1c9(0x2bb)]),_0x282d72=process[_0x92a1c9(0x409)][0x2];if(_0x282d72===_0x92a1c9(0x598))console[_0x92a1c9(0x689)](require$$3[_0x92a1c9(0x598)]),process[_0x92a1c9(0x468)](0x0);else{if(_0x282d72===_0x92a1c9(0x529))process[_0x92a1c9(0x468)](requireOkdbShmGc()[_0x92a1c9(0x782)](process['argv'][_0x92a1c9(0x27f)](0x3)));else{if(_0x282d72&&_0x46f215['has'](_0x282d72)){const _0x1a96b1=process[_0x92a1c9(0x409)][_0x92a1c9(0x27f)](0x3),_0x502dd0=_0x4e5792([_0x92a1c9(0x24d),_0x92a1c9(0x58a),..._0x1a96b1]),_0x236c60=_0xc7735d(_0x502dd0),_0x384a5f=new Set([_0x92a1c9(0x344),'-d',_0x92a1c9(0x776),'-k',_0x92a1c9(0x585),'-c',_0x92a1c9(0x6ff),'-p',_0x92a1c9(0x772),'--env','-e',_0x92a1c9(0x508),'--name',_0x92a1c9(0x77c),_0x92a1c9(0x7d9),_0x92a1c9(0x891),'--grants',_0x92a1c9(0x25b),_0x92a1c9(0x7cb),_0x92a1c9(0x6ba),'-u','--address']);let _0x233543=null;for(let _0x530328=0x0;_0x530328<_0x1a96b1[_0x92a1c9(0x6ad)];_0x530328++){if(_0x384a5f[_0x92a1c9(0x2ad)](_0x1a96b1[_0x530328])){_0x530328++;continue;}if(!_0x1a96b1[_0x530328][_0x92a1c9(0x579)]('-')){_0x233543=_0x1a96b1[_0x530328];break;}}(async()=>{const _0x36f99f=_0x92a1c9;if(_0x282d72===_0x36f99f(0x527)){const _0x458979=process['argv'][0x3],_0x3ad47b=process[_0x36f99f(0x409)][_0x36f99f(0x27f)](0x4),_0x2b3d1f=_0x4e5792([_0x36f99f(0x24d),_0x36f99f(0x58a),..._0x3ad47b]),_0x471488=_0xc7735d(_0x2b3d1f),_0x7904ba=new Set([_0x36f99f(0x344),'-d',_0x36f99f(0x776),'-k',_0x36f99f(0x585),'-c',_0x36f99f(0x6ff),'-p','--name','--password','--label','--permissions',_0x36f99f(0x703),'--ttl',_0x36f99f(0x772),_0x36f99f(0x7e6),'-e',_0x36f99f(0x508)]),_0x4e8e50=[];for(let _0x5aeaa9=0x0;_0x5aeaa9<_0x3ad47b[_0x36f99f(0x6ad)];_0x5aeaa9++){if(_0x7904ba[_0x36f99f(0x2ad)](_0x3ad47b[_0x5aeaa9])){_0x5aeaa9++;continue;}if(_0x3ad47b[_0x5aeaa9]['startsWith']('-'))continue;_0x4e8e50[_0x36f99f(0x557)](_0x3ad47b[_0x5aeaa9]);}switch(_0x458979){case _0x36f99f(0x71e):await _0x80db64(_0x471488,_0x2b3d1f);break;case'list':await _0x496bc3(_0x471488);break;case _0x36f99f(0x704):await _0x2a5f71(_0x4e8e50[0x0],_0x471488);break;default:console[_0x36f99f(0x6cd)](_0x36f99f(0x3ad)+_0x458979+_0x36f99f(0x665)),process[_0x36f99f(0x468)](0x1);}return;}if(_0x282d72===_0x36f99f(0x2bb)){const _0x4ba0e8=requireOkdbLicenseCodec(),_0x4e4bd2=process[_0x36f99f(0x409)]['slice'](0x3),_0xedba6f=_0x4e5792([_0x36f99f(0x24d),_0x36f99f(0x58a),..._0x4e4bd2]),_0x3418c0=_0xc7735d(_0xedba6f),_0xe20f34=new Set(['--path','-d',_0x36f99f(0x776),'-k',_0x36f99f(0x585),'-c',_0x36f99f(0x6ff),'-p',_0x36f99f(0x772)]),_0x277805=[];for(let _0x42ed72=0x0;_0x42ed72<_0x4e4bd2[_0x36f99f(0x6ad)];_0x42ed72++){if(_0xe20f34[_0x36f99f(0x2ad)](_0x4e4bd2[_0x42ed72])){_0x42ed72++;continue;}if(_0x4e4bd2[_0x42ed72][_0x36f99f(0x579)]('-'))continue;_0x277805['push'](_0x4e4bd2[_0x42ed72]);}const _0x246daa=_0x277805[0x0]??null;if(_0x246daa===_0x36f99f(0x417))await _0x1a746f(_0x277805[0x1],_0x3418c0);else{if(!_0x246daa)await _0x3abaf8(_0x3418c0);else{let _0x3881c4=_0x4ba0e8[_0x36f99f(0x3bb)](_0x246daa);if(_0x3881c4===_0x36f99f(0x756)&&_0x372f01[_0x36f99f(0x5b6)](_0x246daa))_0x3881c4=_0x36f99f(0x5be);if(_0x3881c4===_0x36f99f(0x5be))try{const _0x4c4158=_0x372f01[_0x36f99f(0x308)](_0x246daa,_0x36f99f(0x88a))[_0x36f99f(0x48b)](),_0x3b98ba=_0x4ba0e8[_0x36f99f(0x3bb)](_0x4c4158);if(_0x3b98ba==='activation'){await _0x58e7e9(_0x4c4158,_0x3418c0);return;}await _0x4ccb98(_0x246daa,_0x3418c0);return;}catch(_0x536e78){console[_0x36f99f(0x6cd)](_0x36f99f(0x263)+_0x246daa+':\x20'+_0x536e78[_0x36f99f(0x81d)]),process['exit'](0x1);}switch(_0x3881c4){case _0x36f99f(0x81a):await _0x4ccb98(_0x246daa,_0x3418c0);break;case _0x36f99f(0x589):await _0x58e7e9(_0x246daa,_0x3418c0);break;case'uuid':await _0x1bc1a4(_0x246daa,_0x3418c0);break;default:console[_0x36f99f(0x6cd)](_0x36f99f(0x454)+_0x246daa+'\x22'),console['error'](''),console['error']('\x20\x20Expected\x20one\x20of:'),console[_0x36f99f(0x6cd)](_0x36f99f(0x69e)),console[_0x36f99f(0x6cd)](_0x36f99f(0x42a)),console[_0x36f99f(0x6cd)](_0x36f99f(0x613)),console[_0x36f99f(0x6cd)](_0x36f99f(0x88b)),console[_0x36f99f(0x6cd)](''),console[_0x36f99f(0x6cd)](_0x36f99f(0x5bc)),process[_0x36f99f(0x468)](0x1);}}}return;}switch(_0x282d72){case _0x36f99f(0x649):await _0x4f10c0(_0x236c60);break;case'init':await _0x366f39();break;case _0x36f99f(0x5f9):await _0x234c7c(_0x236c60);break;case _0x36f99f(0x7b4):await _0x3fa566(_0x233543??_0x3e45a6['resolve'](_0x36f99f(0x2fd)),_0x236c60);break;case _0x36f99f(0x699):if(!_0x233543)throw new Error(_0x36f99f(0x230));await _0x43d6cf(_0x3e45a6[_0x36f99f(0x8c2)](_0x233543),_0x236c60,_0x502dd0);break;case _0x36f99f(0x678):await _0x48f8f9(_0x233543??_0x3e45a6[_0x36f99f(0x8c2)]('./okdb-export.ndjson'),_0x236c60,_0x502dd0);break;case'import':await _0x3a1cbd(_0x233543??_0x3e45a6['resolve'](_0x36f99f(0x42d)),_0x236c60,_0x502dd0);break;case _0x36f99f(0x1c9):await _0x4b5e60(_0x233543,_0x236c60,_0x502dd0);break;}})()[_0x92a1c9(0x4ed)](()=>process[_0x92a1c9(0x468)](0x0))[_0x92a1c9(0x39e)](_0x2d7610=>{const _0xecf3de=_0x92a1c9;console[_0xecf3de(0x6cd)](_0xecf3de(0x887)+(_0x2d7610[_0xecf3de(0x81d)]||_0x2d7610)+'\x0a'),process[_0xecf3de(0x468)](0x1);});}else _0x2fb5ae()[_0x92a1c9(0x39e)](_0x486c5a=>{const _0x3dd05c=_0x92a1c9;console[_0x3dd05c(0x6cd)](_0x3dd05c(0x380)),console['error'](_0x486c5a['stack']||_0x486c5a),process['exit'](0x1);});}}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x1a2e0d(0x7ac)]=okdb;
2
+ 'use strict';const _0x1d45b1=_0x438e;(function(_0x189a62,_0x1802cf){const _0x244fcd=_0x438e,_0x1d3b23=_0x189a62();while(!![]){try{const _0x4afe61=parseInt(_0x244fcd(0x16d))/0x1+parseInt(_0x244fcd(0x20e))/0x2+-parseInt(_0x244fcd(0x481))/0x3+-parseInt(_0x244fcd(0x39b))/0x4+parseInt(_0x244fcd(0x208))/0x5*(parseInt(_0x244fcd(0x249))/0x6)+parseInt(_0x244fcd(0x38d))/0x7+parseInt(_0x244fcd(0x7d9))/0x8*(-parseInt(_0x244fcd(0x7aa))/0x9);if(_0x4afe61===_0x1802cf)break;else _0x1d3b23['push'](_0x1d3b23['shift']());}catch(_0x536aa7){_0x1d3b23['push'](_0x1d3b23['shift']());}}}(_0x5343,0x3aed9));var require$$1=require('path'),require$$0$1=require('fs'),require$$0=require('os'),require$$4$1=require('net'),require$$5$1=require('../okdb'),require$$0$3=require(_0x1d45b1(0x441)),require$$2=require(_0x1d45b1(0x6f3)),require$$5=require('stream'),require$$2$1=require('crypto'),require$$0$2=require('node:crypto'),require$$4=require(_0x1d45b1(0x1e0)),require$$1$1=require(_0x1d45b1(0x2a7)),require$$0$4=require(_0x1d45b1(0x1e3)),require$$0$5=require(_0x1d45b1(0x6da)),require$$0$6=require('node:events'),require$$0$7=require(_0x1d45b1(0x2b8)),require$$1$2=require(_0x1d45b1(0x660)),require$$3$1=require(_0x1d45b1(0x4b2)),require$$2$2=require('worker_threads'),require$$3$2=require(_0x1d45b1(0x1e9)),commonjsGlobal=typeof globalThis!==_0x1d45b1(0x75f)?globalThis:typeof window!=='undefined'?window:typeof global!==_0x1d45b1(0x75f)?global:typeof self!==_0x1d45b1(0x75f)?self:{};function getDefaultExportFromCjs(_0x345bec){const _0x803d31=_0x1d45b1;return _0x345bec&&_0x345bec[_0x803d31(0x56c)]&&Object[_0x803d31(0x4ea)]['hasOwnProperty'][_0x803d31(0x341)](_0x345bec,'default')?_0x345bec['default']:_0x345bec;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x7d02d2=require$$0,_0x7328f8=require$$0$1,_0x2c91a5=require$$1;let _0x4c06ed;function _0xf647ea(){const _0x246ef2=_0x438e;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x4c06ed!==undefined)return _0x4c06ed;try{const _0x1bf8e8=_0x2c91a5[_0x246ef2(0x410)](require[_0x246ef2(0x377)](_0x246ef2(0x4df)));_0x4c06ed=_0x7328f8[_0x246ef2(0x1aa)](_0x2c91a5['join'](_0x1bf8e8,'build',_0x246ef2(0x7b2),_0x246ef2(0x5c0)));}catch{_0x4c06ed=![];}return _0x4c06ed;}function _0x458941(){const _0x9fbf00=_0x438e,_0x20bc67=_0x7d02d2[_0x9fbf00(0x58b)]()[_0x9fbf00(0x320)];return Math['max'](0x1,_0x20bc67-0x1);}function _0x46b338(_0x42d836,_0x52a145={}){const _0x315e70=_0x438e,_0x579110=_0x52a145[_0x315e70(0x319)]!==undefined?_0x52a145['shmbufNative']:_0xf647ea();let _0x5b9538;if(_0x42d836?.[_0x315e70(0x275)])_0x5b9538=0x1;else{let _0x5ebefc,_0x8bbb;if(_0x42d836?.[_0x315e70(0x760)]!==undefined&&_0x42d836[_0x315e70(0x760)]!==null&&_0x42d836[_0x315e70(0x760)]!=='')_0x5ebefc=_0x42d836['workersFlag'],_0x8bbb=_0x315e70(0x3da);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x5ebefc=process.env.OKDB_HTTP_WORKERS,_0x8bbb='OKDB_HTTP_WORKERS';else _0x42d836?.[_0x315e70(0x2b8)]?.[_0x315e70(0x633)]!==undefined&&_0x42d836[_0x315e70(0x2b8)][_0x315e70(0x633)]!==null&&_0x42d836['http'][_0x315e70(0x633)]!==''&&(_0x5ebefc=_0x42d836[_0x315e70(0x2b8)][_0x315e70(0x633)],_0x8bbb='http.workers');}if(_0x5ebefc===undefined)_0x5b9538=_0x458941();else{const _0x161499=Number(_0x5ebefc);!Number[_0x315e70(0x5f8)](_0x161499)||_0x161499<0x1?(console[_0x315e70(0x4fb)](_0x315e70(0x87f)+_0x8bbb+'='+JSON[_0x315e70(0x729)](_0x5ebefc)+_0x315e70(0x166)),_0x5b9538=0x1):_0x5b9538=_0x161499;}}return!_0x579110&&_0x5b9538>0x1&&(console['warn']('[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20'+('(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20'+_0x5b9538+').')),_0x5b9538=0x1),_0x5b9538;}return okdbWorkers={'isShmbufNative':_0xf647ea,'defaultWorkers':_0x458941,'resolveWorkers':_0x46b338},okdbWorkers;}var version='2.7.0',require$$3={'version':version},okdbMigrate={'exports':{}},okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x229b44 extends Error{constructor(_0x45db5e,_0x345ece,_0x46c50a={}){const _0x5c3116=_0x438e;super(_0x45db5e),this[_0x5c3116(0x1b6)]=_0x5c3116(0x3f0),this[_0x5c3116(0x779)]=_0x345ece,this[_0x5c3116(0x310)]=_0x46c50a,_0x46c50a[_0x5c3116(0x70b)]&&(this[_0x5c3116(0x70b)]=_0x46c50a[_0x5c3116(0x70b)]),Error[_0x5c3116(0x744)](this,this[_0x5c3116(0x6c4)]);}}class _0x5cb506 extends _0x229b44{constructor(_0x4f4a61,_0x348f4,_0x51c00a,_0xe00b4b){const _0x57e5f9=_0x438e;super(_0x57e5f9(0x417)+_0x4f4a61+'@'+_0x348f4+_0x57e5f9(0x605)+_0x51c00a+_0x57e5f9(0x37c)+_0xe00b4b,_0x57e5f9(0x4e0),{'type':_0x4f4a61,'key':_0x348f4,'expectedVersion':_0x51c00a,'actualVersion':_0xe00b4b}),this[_0x57e5f9(0x1b6)]='OKDBVersionMismatchError';}}class _0xcc8e2e extends _0x229b44{constructor(_0x56831f,_0x4cb99e){const _0x3843e6=_0x438e;super(_0x56831f+'@'+_0x4cb99e+_0x3843e6(0x2cf),'NOT_FOUND',{'type':_0x56831f,'key':_0x4cb99e}),this['name']=_0x3843e6(0x6cb);}}class _0xfdb9db extends _0x229b44{constructor(_0x3cfcab,_0xf0a7f5){const _0x53927a=_0x438e;super(_0x3cfcab+'@'+_0xf0a7f5+_0x53927a(0x6a9),'ALREADY_EXISTS',{'type':_0x3cfcab,'key':_0xf0a7f5}),this[_0x53927a(0x1b6)]=_0x53927a(0x82b);}}class _0x4c6093 extends _0x229b44{constructor(_0x57d16c,_0x710823){const _0x169ef4=_0x438e,_0x437357=typeof _0x710823;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x57d16c+_0x169ef4(0x42a)+_0x437357+_0x169ef4(0x7a9)+_0x710823,_0x169ef4(0x20f),{'index':_0x57d16c,'key':_0x710823,'keyType':_0x437357}),this[_0x169ef4(0x1b6)]=_0x169ef4(0x635);}}class _0x2ea7ee extends _0x229b44{constructor(_0xa2728c){const _0x2fdf49=_0x438e,_0x39e99c=typeof _0xa2728c;super(_0x2fdf49(0x522)+_0x39e99c+_0x2fdf49(0x84c)+_0xa2728c,'INVALID_PRIMARY_KEY',{'key':_0xa2728c,'keyType':_0x39e99c}),this['name']='OKDBInvalidPrimaryKeyError';}}class _0x223068 extends _0x229b44{constructor(_0x2c20bd){const _0x3c8bda=_0x438e;super(_0x3c8bda(0x6e6)+_0x2c20bd+_0x3c8bda(0x2b0),_0x3c8bda(0x566),{'type':_0x2c20bd}),this[_0x3c8bda(0x1b6)]=_0x3c8bda(0x62e);}}class _0x34ecba extends _0x229b44{constructor(_0x3627c6){const _0x5ab33c=_0x438e;super(_0x5ab33c(0x6e6)+_0x3627c6+_0x5ab33c(0x6fe),_0x5ab33c(0x2dc),{'type':_0x3627c6}),this[_0x5ab33c(0x1b6)]=_0x5ab33c(0x6cd);}}class _0x73092e extends _0x229b44{constructor(_0x395c83,_0x4ebeba){const _0x3c0c63=_0x438e;super('Index\x20\x27'+_0x4ebeba+'\x27\x20on\x20type\x20\x27'+_0x395c83+_0x3c0c63(0x2b0),_0x3c0c63(0x1a9),{'type':_0x395c83,'index':_0x4ebeba}),this[_0x3c0c63(0x1b6)]=_0x3c0c63(0x4c7);}}class _0x5da61d extends _0x229b44{constructor(_0x5762b3,_0x5b5a7a){const _0x21d4bf=_0x438e;super(_0x21d4bf(0x415)+_0x5b5a7a+_0x21d4bf(0x616)+_0x5762b3+_0x21d4bf(0x6b8),_0x21d4bf(0x69a),{'type':_0x5762b3,'index':_0x5b5a7a}),this[_0x21d4bf(0x1b6)]='OKDBIndexAlreadyRegisteredError';}}class _0x576d7f extends _0x229b44{constructor(_0x792dd1,_0x586df7={}){const _0x3f7445=_0x438e;super(_0x792dd1,_0x3f7445(0x32d),_0x586df7),this[_0x3f7445(0x1b6)]=_0x3f7445(0x36d);}}class _0x58ab26 extends _0x229b44{constructor(_0x2878c2,_0x4bd915,_0x143810,_0x88cfd7,_0x2ae804){const _0x55862c=_0x438e;super(_0x55862c(0x576)+_0x2878c2+'@'+_0x4bd915+_0x55862c(0x43d)+_0x143810+']\x20already\x20maps\x20to\x20\x27'+_0x88cfd7+_0x55862c(0x439)+_0x2ae804+'\x27',_0x55862c(0x7d8),{'type':_0x2878c2,'index':_0x4bd915,'indexKey':_0x143810,'existingKey':_0x88cfd7,'conflictingKey':_0x2ae804}),this[_0x55862c(0x1b6)]=_0x55862c(0x1d4);}}class _0x288d17 extends _0x229b44{constructor(_0x1aa238,_0x9770df,_0x4dd963){const _0x51fff9=_0x438e;super(_0x51fff9(0x498)+_0x1aa238+'@'+_0x9770df,'SCHEMA_VALIDATION_FAILED',{'type':_0x1aa238,'key':_0x9770df,'errors':_0x4dd963}),this[_0x51fff9(0x1b6)]=_0x51fff9(0x6c8),this[_0x51fff9(0x51d)]=_0x1aa238,this[_0x51fff9(0x4e2)]=_0x9770df,this[_0x51fff9(0x697)]=_0x4dd963;}}class _0x283d43 extends _0x229b44{constructor(_0x4cf4f4,_0x4cea8c){const _0x1f1285=_0x438e;super(_0x1f1285(0x265)+_0x4cf4f4+':\x20'+_0x4cea8c[_0x1f1285(0x320)]+_0x1f1285(0x657),_0x1f1285(0x665),{'type':_0x4cf4f4,'failures':_0x4cea8c}),this[_0x1f1285(0x1b6)]=_0x1f1285(0x21e),this[_0x1f1285(0x51d)]=_0x4cf4f4,this[_0x1f1285(0x672)]=_0x4cea8c;}}class _0x58bc1e extends _0x229b44{constructor(_0x524469,_0xf46def,_0x2d1d5a,_0x5bb59a,_0xcd2fec){const _0x49e4e4=_0x438e;super(_0x49e4e4(0x175)+_0x524469+'@'+_0xf46def+'.'+_0x2d1d5a+'\x20references\x20'+_0x5bb59a+'@'+_0xcd2fec+'\x20which\x20does\x20not\x20exist',_0x49e4e4(0x2ef),{'sourceType':_0x524469,'sourceKey':_0xf46def,'fieldPath':_0x2d1d5a,'targetType':_0x5bb59a,'targetKey':_0xcd2fec}),this['name']=_0x49e4e4(0x185),this[_0x49e4e4(0x701)]=_0x524469,this[_0x49e4e4(0x24e)]=_0xf46def,this[_0x49e4e4(0x597)]=_0x2d1d5a,this[_0x49e4e4(0x7d6)]=_0x5bb59a,this[_0x49e4e4(0x5ea)]=_0xcd2fec;}}class _0x575243 extends _0x229b44{constructor(_0x55be9f,_0x24051f,_0x24fbfb){const _0x2516e5=_0x438e;super(_0x2516e5(0x726)+_0x55be9f+'@'+_0x24051f+':\x20'+_0x24fbfb[_0x2516e5(0x320)]+_0x2516e5(0x42c),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x55be9f,'targetKey':_0x24051f,'references':_0x24fbfb}),this[_0x2516e5(0x1b6)]=_0x2516e5(0x591),this[_0x2516e5(0x7d6)]=_0x55be9f,this['targetKey']=_0x24051f,this[_0x2516e5(0x822)]=_0x24fbfb;}}class _0x39e2e2 extends _0x229b44{constructor(_0x251cbd,_0x3f7826,_0x3b0e8c){const _0x30e8f5=_0x438e;super(_0x30e8f5(0x177)+_0x3f7826+_0x30e8f5(0x59e)+_0x251cbd+'\x22\x20is\x20used\x20by:\x20'+_0x3b0e8c[_0x30e8f5(0x800)](_0x299293=>_0x299293[_0x30e8f5(0x5be)]+':'+_0x299293[_0x30e8f5(0x1b6)])[_0x30e8f5(0x3c7)](',\x20'),_0x30e8f5(0x6ae),{'type':_0x251cbd,'index':_0x3f7826,'usedBy':_0x3b0e8c}),this[_0x30e8f5(0x1b6)]=_0x30e8f5(0x47a);}}return okdbError={'OKDBError':_0x229b44,'OKDBVersionMismatchError':_0x5cb506,'OKDBNotFoundError':_0xcc8e2e,'OKDBAlreadyExistsError':_0xfdb9db,'OKDBInvalidIndexKeyError':_0x4c6093,'OKDBInvalidPrimaryKeyError':_0x2ea7ee,'OKDBTypeNotRegisteredError':_0x223068,'OKDBTypeAlreadyRegisteredError':_0x34ecba,'OKDBIndexNotRegisteredError':_0x73092e,'OKDBIndexAlreadyRegisteredError':_0x5da61d,'OKDBInvalidValueError':_0x576d7f,'OKDBUniqueConstraintError':_0x58ab26,'OKDBSchemaValidationError':_0x288d17,'OKDBSchemaCollectionError':_0x283d43,'OKDBForeignKeyError':_0x58bc1e,'OKDBForeignKeyDeleteError':_0x575243,'OKDBIndexHasConsumersError':_0x39e2e2},okdbError;}var hasRequiredOkdbMigrate;function requireOkdbMigrate(){const _0x28f69f=_0x1d45b1;if(hasRequiredOkdbMigrate)return okdbMigrate['exports'];hasRequiredOkdbMigrate=0x1;const _0x245b37=require$$0$1,_0x2a54e7=require$$1,_0x499251=require$$2,{OKDBError:_0x433702}=requireOkdbError(),_0x483860=_0x28f69f(0x815),_0x55e5f2=_0x28f69f(0x684),_0x27d5b9='schema',_0xb987cf=_0x28f69f(0x524),_0x139f84=_0x28f69f(0x5b7),_0x297e61=0x1f4,_0x1fd9c5=0x3e8,_0x261957='okdb-backup.json';async function _0xa934c2(_0x279bf4,_0x2b73bb,_0x344b37,_0x4e5366){const _0x5defc1=_0x28f69f;if(_0x279bf4){await _0x279bf4[_0x5defc1(0x421)](_0x344b37,Boolean(_0x4e5366));return;}const _0x4519f1=_0x499251['open'](_0x2b73bb,{'readOnly':!![],'maxDbs':0x8});try{await _0x4519f1[_0x5defc1(0x421)](_0x344b37,Boolean(_0x4e5366));}finally{await _0x4519f1[_0x5defc1(0x419)]();}}const _0x1a98cb=()=>new Promise(_0x5e0979=>setImmediate(_0x5e0979));function _0x5e3a98(_0x30297d,_0x406e50){const _0x570211=_0x28f69f;if(_0x30297d['write'](_0x406e50))return Promise[_0x570211(0x377)]();return new Promise((_0x1ffc2f,_0x39adc5)=>{const _0x3e5a4c=_0x570211,_0x1c6c26=_0x3088cf=>{const _0x4b4930=_0x438e;_0x30297d['off']?.('drain',_0x47113d),_0x30297d[_0x4b4930(0x209)]?.(_0x4b4930(0x4dd),_0x47d5c7),_0x30297d[_0x4b4930(0x209)]?.(_0x4b4930(0x419),_0x3b8989);if(_0x3088cf)_0x39adc5(_0x3088cf);else _0x1ffc2f();},_0x47113d=()=>_0x1c6c26(),_0x47d5c7=_0x3804fb=>_0x1c6c26(_0x3804fb),_0x3b8989=()=>_0x1c6c26(new Error(_0x3e5a4c(0x833)));_0x30297d[_0x3e5a4c(0x3ec)](_0x3e5a4c(0x17b),_0x47113d),_0x30297d[_0x3e5a4c(0x3ec)](_0x3e5a4c(0x4dd),_0x47d5c7),_0x30297d[_0x3e5a4c(0x3ec)](_0x3e5a4c(0x419),_0x3b8989);});}async function _0x31f8cc(_0x1fcbec,_0x39f18e,_0x14ca1b,{versions:versions=![]}={}){const _0x3e007e=_0x28f69f;let _0x364a46=0x0,_0x32ec4b,_0x553b30=!![];for(;;){const _0x48ba21={'snapshot':!![],'limit':_0x1fd9c5};if(versions)_0x48ba21[_0x3e007e(0x186)]=!![];!_0x553b30&&(_0x48ba21[_0x3e007e(0x6d4)]=_0x32ec4b,_0x48ba21[_0x3e007e(0x723)]=!![]);_0x553b30=![];const _0x108d27=Array[_0x3e007e(0x1c3)](_0x39f18e[_0x3e007e(0x482)](_0x48ba21));if(_0x108d27[_0x3e007e(0x320)]===0x0)break;let _0x126f38='';for(const _0x782da of _0x108d27)_0x126f38+=_0x14ca1b(_0x782da)+'\x0a';_0x32ec4b=_0x108d27[_0x108d27[_0x3e007e(0x320)]-0x1][_0x3e007e(0x4e2)],_0x364a46+=_0x108d27[_0x3e007e(0x320)],await _0x5e3a98(_0x1fcbec,_0x126f38);if(_0x108d27['length']<_0x1fd9c5)break;await _0x1a98cb();}return _0x364a46;}class _0x40f423{constructor(_0x31832a){const _0x122166=_0x28f69f;this[_0x122166(0x525)]=_0x31832a;}[_0x28f69f(0x6b9)](_0x1f1d54=_0x28f69f(0x3a1)){const _0x1b3b07=_0x28f69f;return this[_0x1b3b07(0x525)]['env'](_0x1f1d54);}async[_0x28f69f(0x7e8)](_0x53f475=_0x28f69f(0x3a1)){const _0x19b0fc=_0x28f69f;return!this[_0x19b0fc(0x525)][_0x19b0fc(0x789)]['has'](_0x53f475)&&await this[_0x19b0fc(0x525)][_0x19b0fc(0x43e)](_0x53f475,{'sync':!![]}),this[_0x19b0fc(0x525)][_0x19b0fc(0x684)](_0x53f475);}[_0x28f69f(0x469)](_0x1f2817,_0x3d0b03){const _0x594293=_0x28f69f,_0x3211b3=[..._0x1f2817['typesDb'][_0x594293(0x6ab)]()][_0x594293(0x626)](_0x4b52a8=>!_0x4b52a8[_0x594293(0x32e)]('~')&&!_0x4b52a8[_0x594293(0x32e)](_0x594293(0x5d1)));if(!_0x3d0b03)return _0x3211b3;return _0x3211b3[_0x594293(0x626)](_0x34c561=>_0x3d0b03[_0x594293(0x5ca)](_0x34c561));}['_typeSchema'](_0x4f1c5a,_0x300962){const _0x4e3b7b=_0x28f69f,_0x279496=_0x4f1c5a[_0x4e3b7b(0x1ac)][_0x4e3b7b(0x5f1)](_0x300962),_0xf93ce7=_0x4f1c5a[_0x4e3b7b(0x821)][_0x4e3b7b(0x5f1)](_0x300962)||{},_0x370468=[];for(const [,_0x173598]of _0x279496?.[_0x4e3b7b(0x5dd)]??new Map()){const _0x3e2686={'fields':_0x173598[_0x4e3b7b(0x53d)]};if(_0x173598['geoConfig'])_0x3e2686[_0x4e3b7b(0x2fc)]=_0x173598['geoConfig'];if(_0x173598[_0x4e3b7b(0x5b6)])_0x3e2686[_0x4e3b7b(0x5b6)]=!![];_0x370468[_0x4e3b7b(0x677)](_0x3e2686);}const _0x1c7fcc={};for(const [_0xbec15c,_0x3a250f]of Object[_0x4e3b7b(0x5bd)](_0xf93ce7[_0x4e3b7b(0x1ef)]||{})){_0x1c7fcc[_0xbec15c]={'fields':_0x3a250f[_0x4e3b7b(0x874)]?.['fields'],'tokenizer':_0x3a250f[_0x4e3b7b(0x874)]?.[_0x4e3b7b(0x29b)]};}const _0x35273c={'indexes':_0x370468,'ftsIndexes':_0x1c7fcc};return _0xf93ce7[_0x4e3b7b(0x3b3)]&&(_0x35273c[_0x4e3b7b(0x3b3)]=_0xf93ce7['schema']),_0x35273c;}async['exportToStream'](_0x3ef911,_0x1613ae={}){const _0x49fcce=_0x28f69f,{envName:envName=_0x49fcce(0x3a1),types:types=null,includeChanges:includeChanges=![],_noHeader:_noHeader=![]}=_0x1613ae,_0x1f7daf=this[_0x49fcce(0x6b9)](envName),_0x55f398=this[_0x49fcce(0x469)](_0x1f7daf,types);let _0x2b708b=0x0,_0x5d57a1=0x0;!_noHeader&&await _0x5e3a98(_0x3ef911,JSON[_0x49fcce(0x729)]({'r':_0x483860,'kdbVersion':require$$3[_0x49fcce(0x881)],'exportedAt':Date['now'](),'envName':envName})+'\x0a');for(const _0x486770 of _0x55f398){const _0x3756e1=_0x1f7daf[_0x49fcce(0x1ac)][_0x49fcce(0x5f1)](_0x486770);if(!_0x3756e1)continue;const _0x2a7a2f=this['_typeSchema'](_0x1f7daf,_0x486770);await _0x5e3a98(_0x3ef911,JSON['stringify']({'r':_0x27d5b9,'type':_0x486770,..._0x2a7a2f})+'\x0a'),_0x2b708b+=await _0x31f8cc(_0x3ef911,_0x3756e1[_0x49fcce(0x524)],({key:_0x4fa8d0,value:_0xba25d2,version:_0x4e3bf3})=>JSON[_0x49fcce(0x729)]({'r':_0xb987cf,'t':_0x486770,'k':_0x4fa8d0,'v':_0xba25d2,'ver':_0x4e3bf3}),{'versions':!![]});}return includeChanges&&_0x1f7daf[_0x49fcce(0x37f)]&&(_0x5d57a1=await _0x31f8cc(_0x3ef911,_0x1f7daf['clockToChangeDb'],({key:_0x40de57,value:_0x221015})=>JSON[_0x49fcce(0x729)]({'r':_0x139f84,'clock':_0x40de57,'event':_0x221015}))),{'types':_0x55f398[_0x49fcce(0x320)],'records':_0x2b708b,'changes':_0x5d57a1};}async['exportToFile'](_0x202308,_0x2b2f07={}){const _0x39bb11=_0x28f69f;_0x245b37['mkdirSync'](_0x2a54e7['dirname'](_0x202308),{'recursive':!![]});const _0x3dbf77=_0x245b37[_0x39bb11(0x467)](_0x202308),_0xd1472b=await this['exportToStream'](_0x3dbf77,_0x2b2f07);return await new Promise((_0x41482c,_0xdd62a2)=>{const _0x581399=_0x39bb11;_0x3dbf77[_0x581399(0x470)](),_0x3dbf77[_0x581399(0x3ec)]('finish',_0x41482c),_0x3dbf77[_0x581399(0x3ec)](_0x581399(0x4dd),_0xdd62a2);}),{..._0xd1472b,'filePath':_0x202308};}async[_0x28f69f(0x72f)](_0x2e86f4,_0x5e47ea={}){const _0x40fbcb=_0x28f69f,{envNames:envNames=null,types:types=null,includeChanges:includeChanges=![]}=_0x5e47ea,_0x1e3c60=[...this[_0x40fbcb(0x525)][_0x40fbcb(0x789)][_0x40fbcb(0x367)]()][_0x40fbcb(0x626)](_0x325c33=>!_0x325c33[_0x40fbcb(0x32e)]('~')),_0x35f046=envNames?_0x1e3c60[_0x40fbcb(0x626)](_0x4f7708=>envNames['includes'](_0x4f7708)):_0x1e3c60;await _0x5e3a98(_0x2e86f4,JSON[_0x40fbcb(0x729)]({'r':_0x483860,'kdbVersion':require$$3['version'],'exportedAt':Date[_0x40fbcb(0x562)](),'envNames':_0x35f046})+'\x0a');let _0x16b57f=0x0,_0x3db7c2=0x0,_0x5dcf7a=0x0;for(const _0x29f8f8 of _0x35f046){await _0x5e3a98(_0x2e86f4,JSON[_0x40fbcb(0x729)]({'r':_0x55e5f2,'name':_0x29f8f8})+'\x0a');const _0x1f82d4=await this['exportToStream'](_0x2e86f4,{'envName':_0x29f8f8,'types':types,'includeChanges':includeChanges,'_noHeader':!![]});_0x16b57f+=_0x1f82d4[_0x40fbcb(0x303)],_0x3db7c2+=_0x1f82d4[_0x40fbcb(0x39d)],_0x5dcf7a+=_0x1f82d4['changes'];}return{'envs':_0x35f046[_0x40fbcb(0x320)],'types':_0x16b57f,'records':_0x3db7c2,'changes':_0x5dcf7a};}async['importFromStream'](_0xc26a01,_0x5cf4b7={}){const _0x4f7c64=_0x28f69f,{envName:_0x230249=null,types:_0x2be3a1=null,dropExisting:dropExisting=![],batchSize:batchSize=_0x297e61,includeChanges:includeChanges=![],onProgress:onProgress=null}=_0x5cf4b7;let _0x486032=_0x230249??_0x4f7c64(0x3a1),_0x21e787=null,_0x1ca158=0x0,_0x5c94eb=0x0,_0x2c9ffe=0x0,_0x5cc318=null,_0x399ca7=[];const _0x4b6fa2=[],_0x3677a9=async()=>{const _0x497665=_0x4f7c64;if(!_0x399ca7[_0x497665(0x320)]||!_0x5cc318||!_0x21e787)return;await _0x21e787['_writer'][_0x497665(0x7c9)](()=>{const _0x326798=_0x497665;for(const {k:_0x4877f3,v:_0x36e303,ver:_0x1ff9c5}of _0x399ca7){_0x21e787[_0x326798(0x371)](null,_0x5cc318,_0x4877f3,_0x36e303,{'version':_0x1ff9c5,'origin':'import'});}}),_0x5c94eb+=_0x399ca7[_0x497665(0x320)],onProgress?.({'type':_0x5cc318,'count':_0x5c94eb}),_0x399ca7=[];};await this['_readNDJSON'](_0xc26a01,async _0x115a97=>{const _0x462c43=_0x4f7c64,_0x18165a=_0x115a97['r'];if(_0x18165a===_0x483860){if(!_0x230249&&_0x115a97[_0x462c43(0x4cd)])_0x486032=_0x115a97[_0x462c43(0x4cd)];_0x21e787=await this[_0x462c43(0x7e8)](_0x486032);return;}if(!_0x21e787)_0x21e787=await this[_0x462c43(0x7e8)](_0x486032);if(_0x18165a===_0x55e5f2){await _0x3677a9(),_0x5cc318=null,_0x486032=_0x230249??_0x115a97[_0x462c43(0x1b6)],_0x21e787=await this[_0x462c43(0x7e8)](_0x486032);return;}if(_0x18165a===_0x27d5b9){const {type:_0x3ad2a0,indexes:indexes=[],ftsIndexes:ftsIndexes={},schema:_0x224414}=_0x115a97;if(_0x2be3a1&&!_0x2be3a1[_0x462c43(0x5ca)](_0x3ad2a0))return;await _0x3677a9(),_0x5cc318=_0x3ad2a0;dropExisting&&_0x21e787['hasType'](_0x3ad2a0)&&await _0x21e787['dropType'](_0x3ad2a0);!_0x21e787[_0x462c43(0x7e3)](_0x3ad2a0)&&(await _0x21e787[_0x462c43(0x3cd)](_0x3ad2a0),_0x1ca158++);for(const _0x52b1bd of indexes){if(!_0x21e787[_0x462c43(0x6aa)](_0x3ad2a0,_0x52b1bd['fields'])){const _0x599817={};_0x52b1bd[_0x462c43(0x2fc)]&&(_0x599817[_0x462c43(0x51d)]=_0x462c43(0x2fc),_0x599817[_0x462c43(0x1da)]=_0x52b1bd[_0x462c43(0x2fc)][_0x462c43(0x1da)]);if(_0x52b1bd[_0x462c43(0x5b6)])_0x599817[_0x462c43(0x5b6)]=!![];await _0x21e787['registerIndex'](_0x3ad2a0,_0x52b1bd[_0x462c43(0x3fc)],_0x599817);}}for(const [_0x1220b7,_0x2a376c]of Object[_0x462c43(0x5bd)](ftsIndexes)){!this['okdb']['fts'][_0x462c43(0x514)](_0x3ad2a0,_0x1220b7,_0x21e787)&&await this[_0x462c43(0x525)]['fts'][_0x462c43(0x5ae)](_0x3ad2a0,_0x1220b7,{'fields':_0x2a376c[_0x462c43(0x3fc)],'tokenizer':_0x2a376c['tokenizer']},undefined,_0x21e787);}_0x224414?.['definition']&&_0x4b6fa2[_0x462c43(0x677)]({'env':_0x21e787,'type':_0x3ad2a0,'schema':_0x224414});return;}if(_0x18165a===_0xb987cf){if(_0x2be3a1&&!_0x2be3a1[_0x462c43(0x5ca)](_0x115a97['t']))return;_0x115a97['t']!==_0x5cc318&&(await _0x3677a9(),_0x5cc318=_0x115a97['t']);_0x399ca7['push']({'k':_0x115a97['k'],'v':_0x115a97['v'],'ver':_0x115a97['ver']});if(_0x399ca7[_0x462c43(0x320)]>=batchSize)await _0x3677a9();return;}_0x18165a===_0x139f84&&includeChanges&&_0x21e787[_0x462c43(0x37f)]&&(_0x21e787[_0x462c43(0x435)][_0x462c43(0x34d)](_0x115a97[_0x462c43(0x3a2)],_0x115a97[_0x462c43(0x630)]),_0x2c9ffe++);}),await _0x3677a9();for(const {env:_0x48bc61,type:_0x5a1a98,schema:_0x499094}of _0x4b6fa2){try{await _0x48bc61['setSchema'](_0x5a1a98,_0x499094);}catch{if(_0x499094[_0x4f7c64(0x526)])try{await _0x48bc61[_0x4f7c64(0x5b9)](_0x5a1a98,{..._0x499094,'enforce':![]});}catch{}}}return{'types':_0x1ca158,'records':_0x5c94eb,'changes':_0x2c9ffe};}async['importFromFile'](_0x2f23c6,_0x5f0670={}){const _0x32da11=_0x28f69f,_0xf10b1f=_0x245b37[_0x32da11(0x3a0)](_0x2f23c6,{'encoding':_0x32da11(0x3cc)});return this['importFromStream'](_0xf10b1f,_0x5f0670);}[_0x28f69f(0x4e7)](_0x450b41,_0x36bdea){return new Promise((_0x1e730d,_0x19f9a1)=>{const _0x393942=_0x438e;let _0x2b7a6e='',_0x2ab299=Promise[_0x393942(0x377)]();const _0x1980e0=async _0x110a3b=>{const _0x2f1279=_0x393942;_0x2b7a6e+=_0x110a3b;const _0x249005=_0x2b7a6e[_0x2f1279(0x5fa)]('\x0a');_0x2b7a6e=_0x249005[_0x2f1279(0x376)]();for(const _0x449bd3 of _0x249005){const _0xc077a3=_0x449bd3['trim']();if(!_0xc077a3)continue;let _0x2645be;try{_0x2645be=JSON[_0x2f1279(0x40d)](_0xc077a3);}catch{continue;}await _0x36bdea(_0x2645be);}};_0x450b41['on']('data',_0x5ad5bc=>{const _0x313541=_0x393942;_0x2ab299=_0x2ab299[_0x313541(0x19c)](()=>_0x1980e0(String(_0x5ad5bc)));}),_0x450b41['on'](_0x393942(0x470),()=>{_0x2ab299['then'](async()=>{const _0x8ce840=_0x438e,_0x4735da=_0x2b7a6e['trim']();if(_0x4735da)try{await _0x36bdea(JSON[_0x8ce840(0x40d)](_0x4735da));}catch{}_0x1e730d();})['catch'](_0x19f9a1);}),_0x450b41['on'](_0x393942(0x4dd),_0x19f9a1);});}async['backup'](_0x4afab1,_0x229ae6={}){const _0x43a547=_0x28f69f,{envNames:envNames=null,compact:compact=!![]}=_0x229ae6,_0x270eef=this[_0x43a547(0x525)],_0x1ca2eb=_0x2a54e7[_0x43a547(0x377)](_0x270eef[_0x43a547(0x73c)]),_0xc907d5=_0x2a54e7[_0x43a547(0x377)](_0x4afab1),_0x242c64=_0x2a54e7['relative'](_0x1ca2eb,_0xc907d5);if(_0x242c64===''||!(_0x242c64['startsWith']('..')||_0x2a54e7[_0x43a547(0x716)](_0x242c64)))throw new _0x433702('backup\x20destination\x20\x22'+_0xc907d5+_0x43a547(0x3bb)+_0x1ca2eb+_0x43a547(0x76d),_0x43a547(0x2fb));if(_0x245b37[_0x43a547(0x1aa)](_0xc907d5)&&_0x245b37['readdirSync'](_0xc907d5)[_0x43a547(0x320)]>0x0)throw new _0x433702('backup\x20destination\x20\x22'+_0xc907d5+_0x43a547(0x715),_0x43a547(0x2c4));_0x245b37[_0x43a547(0x3d1)](_0xc907d5,{'recursive':!![]});const _0x5bde61=envNames?new Set([...envNames,_0x43a547(0x394)]):null,_0x302ecf=[],_0x302cc9=[],_0xf96029=[];for(const [_0x1b01a8,_0x910df]of[..._0x270eef['_envs'][_0x43a547(0x5bd)]()]){if(_0x5bde61&&!_0x5bde61[_0x43a547(0x514)](_0x1b01a8))continue;if(_0x1b01a8===_0x43a547(0x85c))continue;if(!_0x910df[_0x43a547(0x7b8)]||!_0x910df['db']){_0x302cc9['push']({'name':_0x1b01a8,'reason':_0x43a547(0x40b)});continue;}const _0x55d3c7=_0x2a54e7[_0x43a547(0x377)](_0x910df[_0x43a547(0x73c)]),_0x2e717e=_0x2a54e7[_0x43a547(0x519)](_0x1ca2eb,_0x55d3c7),_0x2bf331=_0x2e717e===''||_0x2e717e['startsWith']('..')||_0x2a54e7[_0x43a547(0x716)](_0x2e717e),_0x432d29=_0x2bf331?_0x270eef[_0x43a547(0x5f4)](_0x1b01a8):_0x2e717e,_0x3cf800=_0x2a54e7[_0x43a547(0x3c7)](_0xc907d5,_0x432d29);_0x245b37[_0x43a547(0x3d1)](_0x3cf800,{'recursive':!![]});const _0x180faf=_0x2a54e7[_0x43a547(0x3c7)](_0x55d3c7,_0x43a547(0x7a3));let _0x57d10c=![];if(_0x245b37[_0x43a547(0x1aa)](_0x2a54e7[_0x43a547(0x3c7)](_0x180faf,_0x43a547(0x5d5)))){const _0x26d9c0=_0x2a54e7['join'](_0x3cf800,_0x43a547(0x7a3));_0x245b37[_0x43a547(0x3d1)](_0x26d9c0,{'recursive':!![]}),await _0xa934c2(_0x910df[_0x43a547(0x1e5)]?.[_0x43a547(0x694)]?.['db'],_0x180faf,_0x26d9c0,compact),_0x57d10c=!![];}let _0x3473c2=0x0;try{_0x3473c2=_0x245b37[_0x43a547(0x1dd)](_0x2a54e7['join'](_0x55d3c7,_0x43a547(0x5d5)))[_0x43a547(0x569)];}catch{}await _0x910df['db'][_0x43a547(0x421)](_0x3cf800,Boolean(compact));let _0x565e54=0x0;try{_0x565e54=_0x245b37[_0x43a547(0x1dd)](_0x2a54e7[_0x43a547(0x3c7)](_0x3cf800,_0x43a547(0x5d5)))[_0x43a547(0x569)];}catch{}_0x302ecf['push']({'name':_0x1b01a8,'dest':_0x3cf800,'sizeBefore':_0x3473c2,'sizeAfter':_0x565e54,'timeMachine':_0x57d10c}),_0xf96029[_0x43a547(0x677)]({'name':_0x1b01a8,'dir':_0x432d29,'timeMachine':_0x57d10c,..._0x2bf331?{'outOfTree':_0x2bf331,'sourcePath':_0x55d3c7}:{}});}for(const [_0x27fa62,_0x5ef6b1]of _0x270eef[_0x43a547(0x764)]??[]){if(_0x5bde61&&!_0x5bde61[_0x43a547(0x514)](_0x27fa62))continue;_0x302cc9[_0x43a547(0x677)]({'name':_0x27fa62,'reason':_0x43a547(0x188)+(_0x5ef6b1?.[_0x43a547(0x4dd)]??_0x43a547(0x1e7))});}const _0x11f396={'count':0x0,'bytes':0x0},_0x224474=_0x270eef['files']?.[_0x43a547(0x7cf)];_0x224474&&_0x245b37[_0x43a547(0x1aa)](_0x224474)&&await this['_copyDir'](_0x224474,_0x2a54e7[_0x43a547(0x3c7)](_0xc907d5,_0x43a547(0x20c)),_0x11f396,(_0x19335b,_0x140353)=>_0x140353===0x0&&_0x19335b===_0x43a547(0x59c));const _0x47fb38=_0x2a54e7[_0x43a547(0x3c7)](_0xc907d5,_0x261957),_0x52efb7={'format':0x1,'okdbVersion':require$$3[_0x43a547(0x881)],'createdAt':new Date()[_0x43a547(0x804)](),'source':_0x1ca2eb,'compact':Boolean(compact),'envs':_0xf96029,'blobs':_0x11f396,'skipped':_0x302cc9,'excluded':{'~fts':_0x43a547(0x743),'~processes':_0x43a547(0x717)}};return _0x245b37[_0x43a547(0x4d1)](_0x47fb38,JSON[_0x43a547(0x729)](_0x52efb7,null,0x2)+'\x0a'),{'ok':!![],'dest':_0xc907d5,'envs':_0x302ecf,'blobs':_0x11f396,'skipped':_0x302cc9,'manifest':_0x47fb38};}[_0x28f69f(0x848)](){const _0x59027a=_0x28f69f,_0x354d35=this[_0x59027a(0x525)][_0x59027a(0x33b)]?.[_0x59027a(0x421)]?.[_0x59027a(0x598)];if(_0x354d35)return _0x2a54e7[_0x59027a(0x377)](_0x354d35);const _0xf425ac=_0x2a54e7[_0x59027a(0x377)](this[_0x59027a(0x525)][_0x59027a(0x73c)]);return _0x2a54e7['join'](_0x2a54e7[_0x59027a(0x410)](_0xf425ac),_0x2a54e7[_0x59027a(0x256)](_0xf425ac)+_0x59027a(0x38f));}[_0x28f69f(0x41a)](_0x922f25){const _0xa555a3=_0x28f69f,_0x59f03c=this['backupRoot']();_0x245b37[_0xa555a3(0x3d1)](_0x59f03c,{'recursive':!![]});const _0x5c8f20=_0x245b37['realpathSync'](_0x59f03c),_0x320b2c=_0x922f25==null||String(_0x922f25)[_0xa555a3(0x724)]()===''?_0xa555a3(0x438)+new Date()[_0xa555a3(0x804)]()[_0xa555a3(0x4c2)](/[:.]/g,'-'):String(_0x922f25)['trim'](),_0x17a97e=_0x2a54e7['resolve'](_0x59f03c,_0x320b2c);let _0x346ee4=_0x17a97e;const _0x32eb7a=[];while(!_0x245b37[_0xa555a3(0x1aa)](_0x346ee4)){_0x32eb7a[_0xa555a3(0x67b)](_0x2a54e7[_0xa555a3(0x256)](_0x346ee4));const _0x15b1de=_0x2a54e7['dirname'](_0x346ee4);if(_0x15b1de===_0x346ee4)break;_0x346ee4=_0x15b1de;}const _0xcafd09=_0x2a54e7[_0xa555a3(0x3c7)](_0x245b37['realpathSync'](_0x346ee4),..._0x32eb7a),_0x5f453e=_0x2a54e7[_0xa555a3(0x519)](_0x5c8f20,_0xcafd09);if(_0x5f453e===''||_0x5f453e[_0xa555a3(0x32e)]('..')||_0x2a54e7[_0xa555a3(0x716)](_0x5f453e))throw new _0x433702(_0xa555a3(0x7f3)+_0x320b2c+_0xa555a3(0x187)+_0x59f03c+'\x22\x20—\x20pass\x20a\x20path\x20relative\x20to\x20it\x20(configure\x20with\x20the\x20`backup.root`\x20option)',_0xa555a3(0x39e),{'root':_0x59f03c,'destDir':_0x320b2c});return{'root':_0x59f03c,'dest':_0xcafd09};}async['_copyDir'](_0x5a6503,_0x57f09a,_0x3ec22c={'count':0x0,'bytes':0x0},_0x19a714=null,_0x39fd7e=0x0){const _0x1d7b28=_0x28f69f;_0x245b37['mkdirSync'](_0x57f09a,{'recursive':!![]});for(const _0x57fa89 of _0x245b37[_0x1d7b28(0x570)](_0x5a6503,{'withFileTypes':!![]})){if(_0x19a714?.(_0x57fa89['name'],_0x39fd7e))continue;const _0x245ec0=_0x2a54e7[_0x1d7b28(0x3c7)](_0x5a6503,_0x57fa89[_0x1d7b28(0x1b6)]),_0xb52c78=_0x2a54e7['join'](_0x57f09a,_0x57fa89[_0x1d7b28(0x1b6)]);if(_0x57fa89['isDirectory']())await this[_0x1d7b28(0x78c)](_0x245ec0,_0xb52c78,_0x3ec22c,_0x19a714,_0x39fd7e+0x1);else{try{await _0x245b37['promises']['copyFile'](_0x245ec0,_0xb52c78);}catch(_0x2227eb){if(_0x2227eb?.[_0x1d7b28(0x779)]===_0x1d7b28(0x1b7))continue;throw _0x2227eb;}_0x3ec22c['count']++;try{_0x3ec22c[_0x1d7b28(0x2a2)]+=_0x245b37[_0x1d7b28(0x1dd)](_0xb52c78)[_0x1d7b28(0x569)];}catch{}}}return _0x3ec22c;}async[_0x28f69f(0x875)](_0x1e96be={}){const _0x1b1400=_0x28f69f,{envName:envName='default',types:types=null,includeChanges:includeChanges=![]}=_0x1e96be,_0x14da75={'types':{},'changes':[]},_0x9a7c97=[],_0x279247=new require$$5[(_0x1b1400(0x75d))]({'write'(_0xec21a,_0x4b71b8,_0x2227b9){const _0x59950a=_0x1b1400;_0x9a7c97[_0x59950a(0x677)](String(_0xec21a)),_0x2227b9();}});await this[_0x1b1400(0x202)](_0x279247,{'envName':envName,'types':types,'includeChanges':includeChanges});for(const _0x2db4ae of _0x9a7c97[_0x1b1400(0x3c7)]('')[_0x1b1400(0x5fa)]('\x0a')){const _0xa44649=_0x2db4ae[_0x1b1400(0x724)]();if(!_0xa44649)continue;let _0x276293;try{_0x276293=JSON[_0x1b1400(0x40d)](_0xa44649);}catch{continue;}if(_0x276293['r']===_0x27d5b9){if(!_0x14da75[_0x1b1400(0x303)][_0x276293[_0x1b1400(0x51d)]])_0x14da75[_0x1b1400(0x303)][_0x276293[_0x1b1400(0x51d)]]={'entries':[]};if(_0x276293[_0x1b1400(0x77a)])_0x14da75[_0x1b1400(0x303)][_0x276293[_0x1b1400(0x51d)]][_0x1b1400(0x77a)]=_0x276293['indexes'];if(_0x276293[_0x1b1400(0x1ef)])_0x14da75[_0x1b1400(0x303)][_0x276293[_0x1b1400(0x51d)]]['ftsIndexes']=_0x276293[_0x1b1400(0x1ef)];if(_0x276293['schema'])_0x14da75[_0x1b1400(0x303)][_0x276293[_0x1b1400(0x51d)]]['schema']=_0x276293[_0x1b1400(0x3b3)];}else{if(_0x276293['r']===_0xb987cf){if(!_0x14da75[_0x1b1400(0x303)][_0x276293['t']])_0x14da75['types'][_0x276293['t']]={'entries':[]};_0x14da75[_0x1b1400(0x303)][_0x276293['t']][_0x1b1400(0x5bd)][_0x1b1400(0x677)]({'key':_0x276293['k'],'value':_0x276293['v'],'version':_0x276293[_0x1b1400(0x1f9)]});}else _0x276293['r']===_0x139f84&&_0x14da75[_0x1b1400(0x227)]['push']({'clock':_0x276293[_0x1b1400(0x3a2)],'event':_0x276293[_0x1b1400(0x630)]});}}return _0x14da75;}async[_0x28f69f(0x2e7)](_0x40a8de,_0x49605f={}){const _0x47ddf7=_0x28f69f,_0x515a44=[];for(const [_0x37a7a3,_0x2bc489]of Object[_0x47ddf7(0x5bd)](_0x40a8de[_0x47ddf7(0x303)]||{})){const _0x1195ed={'r':_0x27d5b9,'type':_0x37a7a3,'indexes':_0x2bc489[_0x47ddf7(0x77a)]||[],'ftsIndexes':_0x2bc489['ftsIndexes']||{}};if(_0x2bc489['schema'])_0x1195ed[_0x47ddf7(0x3b3)]=_0x2bc489[_0x47ddf7(0x3b3)];_0x515a44[_0x47ddf7(0x677)](JSON[_0x47ddf7(0x729)](_0x1195ed));for(const {key:_0x2d9094,value:_0x3da3bb,version:_0x2e5d2e}of _0x2bc489[_0x47ddf7(0x5bd)]||[]){_0x515a44[_0x47ddf7(0x677)](JSON[_0x47ddf7(0x729)]({'r':_0xb987cf,'t':_0x37a7a3,'k':_0x2d9094,'v':_0x3da3bb,'ver':_0x2e5d2e}));}}for(const {clock:_0x13e7b4,event:_0x533dc1}of _0x40a8de[_0x47ddf7(0x227)]||[]){_0x515a44[_0x47ddf7(0x677)](JSON[_0x47ddf7(0x729)]({'r':_0x139f84,'clock':_0x13e7b4,'event':_0x533dc1}));}const {Readable:_0x24fa93}=require$$5,_0x68a7e1=_0x24fa93[_0x47ddf7(0x1c3)](_0x515a44[_0x47ddf7(0x3c7)]('\x0a')+'\x0a');return this[_0x47ddf7(0x172)](_0x68a7e1,{..._0x49605f,'dropExisting':_0x49605f[_0x47ddf7(0x60c)]??!![]});}async[_0x28f69f(0x1a3)]({pretty:pretty=![]}={}){const _0x4d5285=_0x28f69f,_0xdb5ec4=await this[_0x4d5285(0x875)]();return JSON['stringify'](_0xdb5ec4,null,pretty?0x2:0x0);}async[_0x28f69f(0x254)](_0x2e3c1c){const _0x34ada9=_0x28f69f,_0x2317f2=JSON['parse'](_0x2e3c1c);return this[_0x34ada9(0x2e7)](_0x2317f2);}async[_0x28f69f(0x6b0)](_0xb41990){const _0x2c6a1c=_0x28f69f;if(!this['okdb'][_0x2c6a1c(0x4cc)])throw new Error(_0x2c6a1c(0x161));const _0x27d04f=this['okdb'][_0x2c6a1c(0x4cc)][_0x2c6a1c(0x7cf)];let _0x4ec546=0x0,_0xc2c1b5=0x0;const _0x5b5ed9=_0x44ded0=>{const _0x3089e4=_0x2c6a1c;if(!_0x245b37[_0x3089e4(0x1aa)](_0x44ded0))return;for(const _0x4eb806 of _0x245b37[_0x3089e4(0x570)](_0x44ded0,{'withFileTypes':!![]})){const _0x8d1e72=_0x2a54e7[_0x3089e4(0x3c7)](_0x44ded0,_0x4eb806[_0x3089e4(0x1b6)]);if(_0x4eb806[_0x3089e4(0x216)]()){if(_0x4eb806[_0x3089e4(0x1b6)]===_0x3089e4(0x59c))continue;_0x5b5ed9(_0x8d1e72);}else{const _0xa1edb7=_0x2a54e7[_0x3089e4(0x256)](_0x2a54e7[_0x3089e4(0x410)](_0x8d1e72)),_0x3587c1=_0xa1edb7+_0x4eb806[_0x3089e4(0x1b6)],_0x211f1e=_0x2a54e7['join'](_0xb41990,_0x3587c1[_0x3089e4(0x747)](0x0,0x2)),_0x4df4ef=_0x2a54e7[_0x3089e4(0x3c7)](_0x211f1e,_0x3587c1['slice'](0x2));_0x245b37[_0x3089e4(0x3d1)](_0x211f1e,{'recursive':!![]}),_0x245b37['copyFileSync'](_0x8d1e72,_0x4df4ef),_0x4ec546++;try{_0xc2c1b5+=_0x245b37[_0x3089e4(0x1dd)](_0x8d1e72)[_0x3089e4(0x569)];}catch{}}}};return _0x245b37[_0x2c6a1c(0x3d1)](_0xb41990,{'recursive':!![]}),_0x5b5ed9(_0x27d04f),{'count':_0x4ec546,'bytes':_0xc2c1b5};}async[_0x28f69f(0x6f5)](_0x203d9a){const _0x166bf0=_0x28f69f;if(!this[_0x166bf0(0x525)][_0x166bf0(0x4cc)])throw new Error('files\x20feature\x20not\x20available');await this[_0x166bf0(0x525)][_0x166bf0(0x4cc)][_0x166bf0(0x836)]();let _0x54b9dd=0x0,_0x33c718=0x0;const _0xd57833=_0x50bc50=>{const _0x36ff6f=_0x166bf0;if(!_0x245b37[_0x36ff6f(0x1aa)](_0x50bc50))return;for(const _0x3efa5f of _0x245b37[_0x36ff6f(0x570)](_0x50bc50,{'withFileTypes':!![]})){const _0x476b08=_0x2a54e7[_0x36ff6f(0x3c7)](_0x50bc50,_0x3efa5f[_0x36ff6f(0x1b6)]);if(_0x3efa5f[_0x36ff6f(0x216)]())_0xd57833(_0x476b08);else{const _0xb8ed30=_0x2a54e7['basename'](_0x2a54e7[_0x36ff6f(0x410)](_0x476b08)),_0x2830a9=_0xb8ed30+_0x3efa5f[_0x36ff6f(0x1b6)],_0x3b1813=this[_0x36ff6f(0x525)][_0x36ff6f(0x4cc)][_0x36ff6f(0x369)](_0x2830a9);if(_0x245b37[_0x36ff6f(0x1aa)](_0x3b1813)){_0x33c718++;continue;}const _0x54c02f=_0x2a54e7[_0x36ff6f(0x410)](_0x3b1813);_0x245b37[_0x36ff6f(0x3d1)](_0x54c02f,{'recursive':!![]}),_0x245b37[_0x36ff6f(0x517)](_0x476b08,_0x3b1813);const _0x42215a=this[_0x36ff6f(0x525)][_0x36ff6f(0x4cc)][_0x36ff6f(0x387)](_0x2830a9);this[_0x36ff6f(0x525)][_0x36ff6f(0x4cc)][_0x36ff6f(0x6eb)]?.[_0x36ff6f(0x34d)](_0x2830a9,{'refs':_0x42215a}),_0x54b9dd++;}}};return _0xd57833(_0x203d9a),{'imported':_0x54b9dd,'skipped':_0x33c718};}[_0x28f69f(0x460)](){const _0x207b66=_0x28f69f,_0x12ad05=[];for(const [,_0x4dd138]of this[_0x207b66(0x525)][_0x207b66(0x789)]){if(_0x4dd138[_0x207b66(0x37f)]&&_0x4dd138[_0x207b66(0x7e3)](_0x207b66(0x3ba)))_0x12ad05[_0x207b66(0x677)](_0x4dd138);}return _0x12ad05;}async['validateBlobIntegrity'](){const _0x2fb081=_0x28f69f;if(!this[_0x2fb081(0x525)]['files'])throw new Error(_0x2fb081(0x161));await this['okdb'][_0x2fb081(0x4cc)]['_ensure']();const _0x5735d3=[],_0xe18ae6=this['okdb'][_0x2fb081(0x4cc)];for(const _0x46af1f of this[_0x2fb081(0x460)]()){for(const {key:_0x1ea99c,value:_0x2ab270}of _0x46af1f['getRange'](_0x2fb081(0x3ba))){if(!_0x2ab270[_0x2fb081(0x814)])continue;const _0x57093c=_0xe18ae6['_blobPath'](_0x2ab270[_0x2fb081(0x814)]);!_0x245b37[_0x2fb081(0x1aa)](_0x57093c)&&_0x5735d3[_0x2fb081(0x677)]({'type':_0x2fb081(0x67d),'env':_0x46af1f[_0x2fb081(0x1b6)],'id':String(_0x1ea99c),'hash':_0x2ab270[_0x2fb081(0x814)],'message':_0x2fb081(0x796)+_0x1ea99c+_0x2fb081(0x494)+_0x46af1f[_0x2fb081(0x1b6)]+_0x2fb081(0x7a5)+_0x2ab270['hash'][_0x2fb081(0x747)](0x0,0x8)+'…)'});const _0x333419=_0xe18ae6[_0x2fb081(0x6eb)]?.[_0x2fb081(0x5f1)](_0x2ab270['hash']);(!_0x333419||_0x333419[_0x2fb081(0x6a0)]<=0x0)&&_0x5735d3[_0x2fb081(0x677)]({'type':'zero_refs','env':_0x46af1f[_0x2fb081(0x1b6)],'id':String(_0x1ea99c),'hash':_0x2ab270[_0x2fb081(0x814)],'message':'Blob\x20ref-count\x20is\x20zero\x20for\x20~files\x20record\x20\x22'+_0x1ea99c+_0x2fb081(0x494)+_0x46af1f[_0x2fb081(0x1b6)]+_0x2fb081(0x7a5)+_0x2ab270[_0x2fb081(0x814)][_0x2fb081(0x747)](0x0,0x8)+'…)'});}}const _0x181f94=new Set();for(const _0x5fe11e of this[_0x2fb081(0x460)]()){for(const {value:_0x18ef76}of _0x5fe11e[_0x2fb081(0x482)](_0x2fb081(0x3ba))){if(_0x18ef76[_0x2fb081(0x814)])_0x181f94[_0x2fb081(0x5e5)](_0x18ef76[_0x2fb081(0x814)]);}}const _0x25d138=_0x5bf2b9=>{const _0x4b0237=_0x2fb081;if(!_0x245b37[_0x4b0237(0x1aa)](_0x5bf2b9))return;for(const _0x2d3474 of _0x245b37[_0x4b0237(0x570)](_0x5bf2b9,{'withFileTypes':!![]})){const _0x459c28=_0x2a54e7[_0x4b0237(0x3c7)](_0x5bf2b9,_0x2d3474[_0x4b0237(0x1b6)]);if(_0x2d3474[_0x4b0237(0x216)]()){if(_0x2d3474[_0x4b0237(0x1b6)]===_0x4b0237(0x59c))continue;_0x25d138(_0x459c28);}else{const _0x283ab7=_0x2a54e7[_0x4b0237(0x256)](_0x2a54e7['dirname'](_0x459c28)),_0x4d045e=_0x283ab7+_0x2d3474[_0x4b0237(0x1b6)];!_0x181f94[_0x4b0237(0x514)](_0x4d045e)&&_0x5735d3['push']({'type':_0x4b0237(0x644),'hash':_0x4d045e,'message':_0x4b0237(0x631)+_0x4d045e[_0x4b0237(0x747)](0x0,0x8)+'…)'});}}};return _0x25d138(_0xe18ae6[_0x2fb081(0x7cf)]),_0x5735d3;}async['repairBlobRefs'](){const _0x465ff4=_0x28f69f;if(!this[_0x465ff4(0x525)][_0x465ff4(0x4cc)])throw new Error(_0x465ff4(0x161));await this[_0x465ff4(0x525)][_0x465ff4(0x4cc)][_0x465ff4(0x836)]();const _0x4244fa=this[_0x465ff4(0x525)]['files'][_0x465ff4(0x6eb)];if(!_0x4244fa)throw new Error(_0x465ff4(0x405));const _0x255925=[];for(const {key:_0xf6b4eb}of _0x4244fa[_0x465ff4(0x482)]())_0x255925[_0x465ff4(0x677)](_0xf6b4eb);for(const _0x592e89 of _0x255925)_0x4244fa[_0x465ff4(0x3c2)](_0x592e89);const _0x57c2f8=new Map();for(const _0x815112 of this['_allEnvsWithFiles']()){for(const {value:_0x1c03e2}of _0x815112[_0x465ff4(0x482)]('~files')){_0x1c03e2[_0x465ff4(0x814)]&&_0x57c2f8[_0x465ff4(0x4a3)](_0x1c03e2[_0x465ff4(0x814)],(_0x57c2f8[_0x465ff4(0x5f1)](_0x1c03e2['hash'])??0x0)+0x1);}}for(const [_0x55cc1d,_0x41a746]of _0x57c2f8){_0x4244fa['putSync'](_0x55cc1d,{'refs':_0x41a746});}return{'rebuilt':_0x57c2f8['size']};}}return okdbMigrate[_0x28f69f(0x818)]=_0x40f423,okdbMigrate[_0x28f69f(0x818)][_0x28f69f(0x7fa)]=_0x261957,okdbMigrate['exports'];}var okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0xaff78b=require$$2$1;function _0x21ca20(_0x28b7cd,_0x291ecf){const _0x11761e=_0x438e;return _0xaff78b['createHmac'](_0x11761e(0x6f8),_0x291ecf)[_0x11761e(0x837)](_0x28b7cd)[_0x11761e(0x81b)]('base64url');}function _0x41125f(_0x27eaa3,_0x26ac5d){const _0x5c9ab5=_0x438e;if(typeof _0x27eaa3!==_0x5c9ab5(0x695)||typeof _0x26ac5d!==_0x5c9ab5(0x695))return![];if(Buffer[_0x5c9ab5(0x62c)](_0x27eaa3)!==Buffer['byteLength'](_0x26ac5d))return![];return _0xaff78b['timingSafeEqual'](Buffer[_0x5c9ab5(0x1c3)](_0x27eaa3),Buffer['from'](_0x26ac5d));}function _0x2d80be(_0x1fdedc){const _0x5dc8ba=_0x438e;if(!_0x1fdedc?.[_0x5dc8ba(0x32e)](_0x5dc8ba(0x27d)))return null;return _0x1fdedc[_0x5dc8ba(0x747)](0x7);}function _0x56059e(_0x3861e2=0x20){const _0xb1690d=_0x438e;return _0xaff78b[_0xb1690d(0x247)](_0x3861e2)[_0xb1690d(0x2be)](_0xb1690d(0x50b));}function _0x61405d(_0x46fe95){const _0xa38c5=_0x438e;return _0xaff78b['createHash'](_0xa38c5(0x6f8))[_0xa38c5(0x837)](_0x46fe95)['digest'](_0xa38c5(0x6df));}function _0x28012e(_0x31b76a,_0x19977f,_0x54dd58=0x36ee80){const _0x4801b3=_0x438e;if(!_0x19977f)throw new Error(_0x4801b3(0x425));const _0x4639e5=Date[_0x4801b3(0x562)](),_0x2b9b8e=Buffer['from'](JSON[_0x4801b3(0x729)]({'iat':_0x4639e5,'exp':_0x4639e5+_0x54dd58,'sub':_0x31b76a?.['id']??_0x31b76a?.[_0x4801b3(0x2f9)]??null,'username':_0x31b76a?.[_0x4801b3(0x1bd)]??_0x31b76a?.['name']??null,'roles':Array[_0x4801b3(0x22a)](_0x31b76a?.['roles'])?_0x31b76a[_0x4801b3(0x735)]:[]}))['toString'](_0x4801b3(0x50b)),_0xecf35c=_0x21ca20(_0x2b9b8e,_0x19977f);return _0x2b9b8e+'.'+_0xecf35c;}function _0x2a75c0(_0x63cd96,_0x938187){const _0x4f98e0=_0x438e;if(!_0x938187||typeof _0x63cd96!==_0x4f98e0(0x695))return null;const [_0x1b81e9,_0x137081]=_0x63cd96[_0x4f98e0(0x5fa)]('.');if(!_0x1b81e9||!_0x137081)return null;const _0xf014ac=_0x21ca20(_0x1b81e9,_0x938187);if(!_0x41125f(_0x137081,_0xf014ac))return null;try{const _0x24fdf4=JSON[_0x4f98e0(0x40d)](Buffer[_0x4f98e0(0x1c3)](_0x1b81e9,_0x4f98e0(0x50b))['toString']()),_0x1a6722=0x7530;if(Date[_0x4f98e0(0x562)]()>Number(_0x24fdf4?.[_0x4f98e0(0x7fe)]??0x0)+_0x1a6722)return null;return _0x24fdf4;}catch{return null;}}async function _0x3819f1(_0xc47bd9){return new Promise((_0x5cde1e,_0x40be41)=>{const _0x17a915=_0x438e,_0x53b652=_0xaff78b[_0x17a915(0x247)](0x10);_0xaff78b['scrypt'](_0xc47bd9,_0x53b652,0x40,(_0x11017a,_0x1f9402)=>{const _0x4ecda1=_0x17a915;if(_0x11017a)return _0x40be41(_0x11017a);_0x5cde1e(_0x53b652[_0x4ecda1(0x2be)](_0x4ecda1(0x6df))+':'+_0x1f9402[_0x4ecda1(0x2be)]('hex'));});});}async function _0x17de84(_0x19b55f,_0x5787ee){const _0x211f17=_0x438e;if(typeof _0x5787ee!==_0x211f17(0x695))return![];const [_0x244c26,_0x27aa38]=_0x5787ee[_0x211f17(0x5fa)](':');if(!_0x244c26||!_0x27aa38)return![];const _0x3d130d=Buffer[_0x211f17(0x1c3)](_0x244c26,'hex'),_0x189f88=Buffer[_0x211f17(0x1c3)](_0x27aa38,'hex');if(_0x189f88[_0x211f17(0x320)]!==0x40)return![];return new Promise((_0x41844f,_0x4568d9)=>{const _0x345e70=_0x211f17;_0xaff78b[_0x345e70(0x7b4)](_0x19b55f,_0x3d130d,0x40,(_0x530ab7,_0x3519e9)=>{const _0x3ce6a2=_0x345e70;if(_0x530ab7)return _0x4568d9(_0x530ab7);_0x41844f(_0xaff78b[_0x3ce6a2(0x47e)](_0x3519e9,_0x189f88));});});}return okdbAuthTokens={'hmac':_0x21ca20,'timingSafeEqual':_0x41125f,'parseBearer':_0x2d80be,'randomToken':_0x56059e,'hashToken':_0x61405d,'issueToken':_0x28012e,'authenticateToken':_0x2a75c0,'hashPassword':_0x3819f1,'verifyPassword':_0x17de84},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x1ffbe3=_0x1d45b1;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x42a3df=require$$0$2,_0x508d97='0123456789ABCDEFGHJKMNPQRSTVWXYZ',_0x4975f8=new Uint8Array(0x100)['fill'](0xff);for(let _0x34f7d5=0x0;_0x34f7d5<_0x508d97[_0x1ffbe3(0x320)];_0x34f7d5++){_0x4975f8[_0x508d97[_0x1ffbe3(0x40e)](_0x34f7d5)]=_0x34f7d5,_0x4975f8[_0x508d97[_0x1ffbe3(0x40e)](_0x34f7d5)+0x20]=_0x34f7d5;}_0x4975f8['O'[_0x1ffbe3(0x40e)](0x0)]=0x0,_0x4975f8['o'[_0x1ffbe3(0x40e)](0x0)]=0x0,_0x4975f8['I'['charCodeAt'](0x0)]=0x1,_0x4975f8['i'['charCodeAt'](0x0)]=0x1,_0x4975f8['L'[_0x1ffbe3(0x40e)](0x0)]=0x1,_0x4975f8['l'[_0x1ffbe3(0x40e)](0x0)]=0x1;function _0x155dea(_0x3be131){const _0x1fedb3=_0x1ffbe3;let _0x9cb490=0x0,_0x37aefd=0x0,_0x2603fb='';for(let _0x3312bb=0x0;_0x3312bb<_0x3be131[_0x1fedb3(0x320)];_0x3312bb++){_0x37aefd=_0x37aefd<<0x8|_0x3be131[_0x3312bb],_0x9cb490+=0x8;while(_0x9cb490>=0x5){_0x9cb490-=0x5,_0x2603fb+=_0x508d97[_0x37aefd>>>_0x9cb490&0x1f];}}return _0x9cb490>0x0&&(_0x2603fb+=_0x508d97[_0x37aefd<<0x5-_0x9cb490&0x1f]),_0x2603fb;}function _0x3a978f(_0x4e92fd){const _0x3ca9e8=_0x1ffbe3;_0x4e92fd=_0x4e92fd[_0x3ca9e8(0x4c2)](/-/g,'')[_0x3ca9e8(0x19b)]();let _0x7234ec=0x0,_0x4a008f=0x0;const _0x5d4e8f=[];for(let _0x3558f5=0x0;_0x3558f5<_0x4e92fd['length'];_0x3558f5++){const _0x2a2c76=_0x4975f8[_0x4e92fd[_0x3ca9e8(0x40e)](_0x3558f5)];if(_0x2a2c76===0xff)continue;_0x4a008f=_0x4a008f<<0x5|_0x2a2c76,_0x7234ec+=0x5,_0x7234ec>=0x8&&(_0x7234ec-=0x8,_0x5d4e8f['push'](_0x4a008f>>>_0x7234ec&0xff));}return Buffer['from'](_0x5d4e8f);}const _0x4da9ef=[_0x1ffbe3(0x84e),'embeddings',_0x1ffbe3(0x667),_0x1ffbe3(0x1fd),_0x1ffbe3(0x1e5),_0x1ffbe3(0x29a),_0x1ffbe3(0x61b),'files'],_0x41eccc=0x0,_0x49cd14=0x1,_0x58c1a1=0x2,_0x1105c4=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x404a08({issuedAt:_0x2d9311,expiresAt:_0x12b60c,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x41eccc}){const _0x2d439c=_0x1ffbe3,_0x42300c=Buffer[_0x2d439c(0x1c3)](licensee,'utf8')[_0x2d439c(0x747)](0x0,0x40),_0x2066a2=0x1+0x1+0x4+0x4+0x1+_0x42300c[_0x2d439c(0x320)]+0x2+0x10,_0x1acf40=Buffer[_0x2d439c(0x841)](_0x2066a2);let _0x4bd119=0x0;_0x1acf40[_0x2d439c(0x4a0)](0x1,_0x4bd119++),_0x1acf40['writeUInt8'](licenseType,_0x4bd119++),_0x1acf40[_0x2d439c(0x6fa)](Math[_0x2d439c(0x349)](_0x2d9311/0x3e8),_0x4bd119),_0x4bd119+=0x4,_0x1acf40[_0x2d439c(0x6fa)](Math[_0x2d439c(0x349)](_0x12b60c/0x3e8),_0x4bd119),_0x4bd119+=0x4,_0x1acf40[_0x2d439c(0x4a0)](_0x42300c['length'],_0x4bd119++),_0x42300c[_0x2d439c(0x590)](_0x1acf40,_0x4bd119),_0x4bd119+=_0x42300c['length'];let _0xc5146f=0x0;for(let _0x381115=0x0;_0x381115<_0x4da9ef[_0x2d439c(0x320)];_0x381115++){if(features[_0x4da9ef[_0x381115]])_0xc5146f|=0x1<<_0x381115;}_0x1acf40[_0x2d439c(0x408)](_0xc5146f,_0x4bd119),_0x4bd119+=0x2;const _0x31e1ac=['envs',_0x2d439c(0x550),'syncPeers',_0x2d439c(0x5a3)];for(const _0x32ddb6 of _0x31e1ac){_0x1acf40['writeUInt32BE'](limits[_0x32ddb6]||0x0,_0x4bd119),_0x4bd119+=0x4;}return _0x1acf40;}function _0xd9cf30(_0x2cff44){const _0x2e6a62=_0x1ffbe3;let _0x52d659=0x0;const _0x21c604=_0x2cff44[_0x2e6a62(0x160)](_0x52d659++),_0x3efdd3=_0x2cff44[_0x2e6a62(0x160)](_0x52d659++),_0x4c0d64=_0x2cff44[_0x2e6a62(0x87b)](_0x52d659);_0x52d659+=0x4;const _0x33bf6e=_0x2cff44['readUInt32BE'](_0x52d659);_0x52d659+=0x4;const _0x55bc18=_0x2cff44['readUInt8'](_0x52d659++),_0x30aabe=_0x2cff44[_0x2e6a62(0x747)](_0x52d659,_0x52d659+_0x55bc18)[_0x2e6a62(0x2be)](_0x2e6a62(0x3cc));_0x52d659+=_0x55bc18;const _0x499e8b=_0x2cff44[_0x2e6a62(0x76f)](_0x52d659);_0x52d659+=0x2;const _0xcbdcb2={};for(let _0x4b0894=0x0;_0x4b0894<_0x4da9ef[_0x2e6a62(0x320)];_0x4b0894++){_0xcbdcb2[_0x4da9ef[_0x4b0894]]=Boolean(_0x499e8b&0x1<<_0x4b0894);}const _0x1d0897=[_0x2e6a62(0x66e),_0x2e6a62(0x550),'syncPeers',_0x2e6a62(0x5a3)],_0x5d5a5c={};for(const _0xc4d2ac of _0x1d0897){const _0x29a988=_0x2cff44[_0x2e6a62(0x87b)](_0x52d659);_0x52d659+=0x4,_0x5d5a5c[_0xc4d2ac]=_0x29a988===0x0?null:_0x29a988;}return{'v':_0x21c604,'licenseType':_0x3efdd3,'issuedAt':_0x4c0d64*0x3e8,'expiresAt':_0x33bf6e*0x3e8,'licensee':_0x30aabe,'features':_0xcbdcb2,'limits':_0x5d5a5c};}function _0x137c39(_0x541d13,_0x38ff9c){const _0xb836f2=_0x1ffbe3,_0x3a720e=Buffer[_0xb836f2(0x539)]([_0x541d13,_0x38ff9c]),_0xb2ac4f=_0x155dea(_0x3a720e),_0x1ee397=[];for(let _0x2bd2c2=0x0;_0x2bd2c2<_0xb2ac4f[_0xb836f2(0x320)];_0x2bd2c2+=0x8){_0x1ee397[_0xb836f2(0x677)](_0xb2ac4f[_0xb836f2(0x747)](_0x2bd2c2,_0x2bd2c2+0x8));}return _0x1ee397[_0xb836f2(0x3c7)]('-');}function _0x39a18a(_0x1d8ea7){const _0x3dd993=_0x1ffbe3;if(typeof _0x1d8ea7!==_0x3dd993(0x695))throw new Error(_0x3dd993(0x7c6));const _0x4cb5c6=_0x3a978f(_0x1d8ea7[_0x3dd993(0x4c2)](/-/g,''));if(_0x4cb5c6[_0x3dd993(0x320)]<0x41)throw new Error(_0x3dd993(0x805)+_0x4cb5c6[_0x3dd993(0x320)]+_0x3dd993(0x203));const _0x475bd2=_0x4cb5c6[_0x3dd993(0x747)](0x0,_0x4cb5c6[_0x3dd993(0x320)]-0x40),_0xd33bfb=_0x4cb5c6['slice'](_0x4cb5c6['length']-0x40);let _0x596e5c;try{_0x596e5c=_0xd9cf30(_0x475bd2);}catch(_0x336ea6){throw new Error(_0x3dd993(0x877)+_0x336ea6['message']);}return{'rawBuf':_0x4cb5c6,'payload':_0x475bd2,'sig':_0xd33bfb,'decoded':_0x596e5c};}function _0x4c1b5e(_0x4bdabc){const _0x11a71c=_0x1ffbe3;return _0x42a3df['createHash'](_0x11a71c(0x6f8))[_0x11a71c(0x837)](_0x4bdabc)['digest']()[_0x11a71c(0x747)](0x0,0x8);}function _0x374e2d(_0x143397,_0x1602f4,_0x9d0620){const _0x5b2890=_0x1ffbe3,_0x511b05=_0x5b2890(0x66a)+_0x9d0620,_0x22437d=Buffer[_0x5b2890(0x539)]([Buffer[_0x5b2890(0x1c3)](_0x143397,_0x5b2890(0x3cc)),_0x1602f4]),_0x2c6816=_0x42a3df[_0x5b2890(0x852)](_0x5b2890(0x6f8),_0x511b05)['update'](_0x22437d)[_0x5b2890(0x81b)](),_0x5e0b39=_0x155dea(_0x2c6816[_0x5b2890(0x747)](0x0,0x5));return{'pin':_0x5e0b39,'pinHmac':_0x2c6816};}function _0x58ca75(_0xfe2308,_0x37d655,_0x1dc7a0){const _0xa9d2d4=_0x1ffbe3,_0x36e592=Buffer['allocUnsafe'](0x4d);let _0x19f87c=0x0;_0x36e592[_0xa9d2d4(0x4a0)](0x1,_0x19f87c++),_0xfe2308[_0xa9d2d4(0x590)](_0x36e592,_0x19f87c),_0x19f87c+=0x8,_0x36e592['writeUInt32BE'](_0x37d655,_0x19f87c),_0x19f87c+=0x4,_0x1dc7a0[_0xa9d2d4(0x590)](_0x36e592,_0x19f87c);const _0x5d2454=_0x155dea(_0x36e592),_0x4e6867=[];for(let _0x243332=0x0;_0x243332<_0x5d2454['length'];_0x243332+=0x6){_0x4e6867[_0xa9d2d4(0x677)](_0x5d2454[_0xa9d2d4(0x747)](_0x243332,_0x243332+0x6));}return _0x4e6867[_0xa9d2d4(0x3c7)]('-');}function _0x2a9a6d(_0xc445a0){const _0x2ab350=_0x1ffbe3;if(typeof _0xc445a0!==_0x2ab350(0x695))throw new Error(_0x2ab350(0x81f));const _0x26c848=_0x3a978f(_0xc445a0[_0x2ab350(0x4c2)](/-/g,''));if(_0x26c848['length']!==0x4d)throw new Error(_0x2ab350(0x433)+_0x26c848[_0x2ab350(0x320)]);let _0x3997d2=0x0;const _0x4eeac9=_0x26c848[_0x2ab350(0x160)](_0x3997d2++),_0x34631a=_0x26c848[_0x2ab350(0x747)](_0x3997d2,_0x3997d2+0x8);_0x3997d2+=0x8;const _0x4ed06c=_0x26c848['readUInt32BE'](_0x3997d2);_0x3997d2+=0x4;const _0x5c4ca2=_0x26c848[_0x2ab350(0x747)](_0x3997d2);return{'v':_0x4eeac9,'licenseHash':_0x34631a,'expiry':_0x4ed06c,'sig':_0x5c4ca2};}const _0x2a27bc=0x100,_0x5f2eea=new Set(),_0x321c0b=new Map();function _0x203ae6(_0x5ea340,_0x4b7419,_0xf1b526){const _0x587272=_0x1ffbe3;if(typeof _0xf1b526!==_0x587272(0x695)||!Buffer[_0x587272(0x31e)](_0x5ea340)||!Buffer['isBuffer'](_0x4b7419))return _0x42a3df['verify'](null,_0x5ea340,_0xf1b526,_0x4b7419);const _0x117c8f=_0xf1b526+'\x0a'+_0x5ea340[_0x587272(0x2be)](_0x587272(0x3f8))+'\x0a'+_0x4b7419[_0x587272(0x2be)]('base64');if(_0x5f2eea[_0x587272(0x514)](_0x117c8f))return!![];let _0x584eee=_0x321c0b[_0x587272(0x5f1)](_0xf1b526);if(!_0x584eee){_0x584eee=_0x42a3df[_0x587272(0x66f)](_0xf1b526);if(_0x321c0b[_0x587272(0x569)]>=0x10)_0x321c0b[_0x587272(0x2e8)]();_0x321c0b[_0x587272(0x4a3)](_0xf1b526,_0x584eee);}const _0x5dbd51=_0x42a3df['verify'](null,_0x5ea340,_0x584eee,_0x4b7419)===!![];if(_0x5dbd51){if(_0x5f2eea[_0x587272(0x569)]>=_0x2a27bc)_0x5f2eea[_0x587272(0x2e8)]();_0x5f2eea[_0x587272(0x5e5)](_0x117c8f);}return _0x5dbd51;}function _0x5c0bd0({tokenString:_0x2f8dc7,nodeId:_0x57a501,rawBlobBuf:_0x3b78f1,pubKeyPem:_0x42aa00,pubFingerprint:_0xeaa494}){const _0x52bc3e=_0x1ffbe3;let _0x3c318d;try{_0x3c318d=_0x2a9a6d(_0x2f8dc7);}catch(_0x534dd2){return{'valid':![],'reason':_0x52bc3e(0x84b)};}const _0x298b59=_0x4c1b5e(_0x3b78f1);if(!_0x298b59[_0x52bc3e(0x842)](_0x3c318d[_0x52bc3e(0x79b)]))return{'valid':![],'reason':_0x52bc3e(0x1db)};const {pinHmac:_0x3604dd}=_0x374e2d(_0x57a501,_0x298b59,_0xeaa494),_0x20f7da=Buffer[_0x52bc3e(0x841)](0x4);_0x20f7da[_0x52bc3e(0x6fa)](_0x3c318d['expiry'],0x0);const _0x5e6a9a=Buffer[_0x52bc3e(0x539)]([Buffer['from']([_0x3c318d['v']]),_0x3604dd['slice'](0x0,0x5),_0x3c318d[_0x52bc3e(0x79b)],_0x20f7da]);try{const _0x54a74a=_0x203ae6(_0x5e6a9a,_0x3c318d['sig'],_0x42aa00);if(!_0x54a74a)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x5ef2c3){return{'valid':![],'reason':_0x52bc3e(0x86a)};}if(_0x3c318d[_0x52bc3e(0x87e)]<Date[_0x52bc3e(0x562)]()/0x3e8)return{'valid':![],'reason':_0x52bc3e(0x7fb)};return{'valid':!![],'reason':'ok'};}function _0x15563a(_0x32019a){const _0x35cc9e=_0x1ffbe3;if(typeof _0x32019a!==_0x35cc9e(0x695))return _0x35cc9e(0x7c0);const _0x4c4b50=_0x32019a[_0x35cc9e(0x724)]();if(_0x4c4b50['startsWith']('/')||_0x4c4b50[_0x35cc9e(0x32e)]('./')||_0x4c4b50[_0x35cc9e(0x32e)](_0x35cc9e(0x586))||/^[A-Za-z]:[\\/]/[_0x35cc9e(0x219)](_0x4c4b50))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x35cc9e(0x219)](_0x4c4b50))return _0x35cc9e(0x846);const _0xd8f404=_0x4c4b50['replace'](/[\s-]+/g,'')[_0x35cc9e(0x320)];if(_0xd8f404===0x7c)return _0x35cc9e(0x33a);if(_0xd8f404>=0x95&&_0xd8f404<=0xfc)return _0x35cc9e(0x472);return _0x35cc9e(0x7c0);}return okdbLicenseCodec={'toBase32':_0x155dea,'fromBase32':_0x3a978f,'encodeLicensePayload':_0x404a08,'decodeLicensePayload':_0xd9cf30,'encodeLicenseBlob':_0x137c39,'decodeLicenseBlob':_0x39a18a,'licenseHash':_0x4c1b5e,'derivePin':_0x374e2d,'encodeActivationToken':_0x58ca75,'decodeActivationToken':_0x2a9a6d,'verifyActivation':_0x5c0bd0,'verifySignature':_0x203ae6,'detectInputType':_0x15563a,'FEATURE_NAMES':_0x4da9ef,'LICENSE_TYPE_STANDARD':_0x41eccc,'LICENSE_TYPE_OPEN':_0x49cd14,'LICENSE_TYPE_INTERNAL':_0x58c1a1,'OPEN_LICENSE_MAX_DURATION_MS':_0x1105c4},okdbLicenseCodec;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x171978=_0x1d45b1;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x514399={'PUT':_0x171978(0x250),'REMOVE':_0x171978(0x323),'INDEX_DROP':_0x171978(0x163),'INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x171978(0x196),'TYPE_REGISTER':_0x171978(0x3cd),'TYPE_DROP':'dropType','FTS_REGISTER':_0x171978(0x7a1),'FTS_DROP':_0x171978(0x6e7),'FTS_RESET':'resetFts','SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x171978(0x783),'TTL_SET':_0x171978(0x720),'TTL_CLEAR':_0x171978(0x578)},_0x3bfa29={'SYSTEM_READY':_0x171978(0x2ab),'FIELD_RESOLVER_REGISTERED':_0x171978(0x54f),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x171978(0x38e),'SYSTEM_POKE':_0x171978(0x869),'SYSTEM_DRAIN':_0x171978(0x507),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x171978(0x600),'SYSTEM_BUS_STATE_CHANGE':_0x171978(0x710),'ITEM_CREATE':_0x171978(0x2e0),'ITEM_UPDATE':_0x171978(0x5bb),'ITEM_REMOVE':'item:remove','ITEM_PENDING':_0x171978(0x294),'INDEX_RESET':_0x171978(0x3a5),'INDEX_READY':_0x171978(0x170),'INDEX_PROGRESS':_0x171978(0x2b4),'VIEW_PROGRESS':_0x171978(0x2bd),'INDEX_DROP':_0x171978(0x3b2),'INDEX_REGISTERED':_0x171978(0x7fc),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x171978(0x6c9),'FTS_RESET':_0x171978(0x637),'SCHEMA_SET':_0x171978(0x3aa),'SCHEMA_DROP':_0x171978(0x5c5),'UNIQUE_VIOLATION':_0x171978(0x5a4),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x171978(0x855),'SYNC_APPLY':'sync:apply','TXN_START':_0x171978(0x1f0),'TXN_END':_0x171978(0x6ce),'TXN_ROLLBACK':_0x171978(0x615),'TYPE_REGISTERED':_0x171978(0x1ad),'TYPE_DROP':_0x171978(0x7ae),'ENV_OPENED':_0x171978(0x334),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x171978(0x588),'TTL_EXPIRED':_0x171978(0x3de),'TTL_SET':_0x171978(0x2e2),'TTL_CLEAR':_0x171978(0x636),'LICENSE_INVALID':_0x171978(0x5dc),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x171978(0x6fc),'LICENSE_REMOVED':_0x171978(0x78d)},_0x54e848={'CREATING':_0x171978(0x72a),'RESETTING':_0x171978(0x267),'READY':_0x171978(0x80a),'DROPPING':_0x171978(0x7eb),'WAITING':_0x171978(0x270),'ERROR':_0x171978(0x4dd)},_0x3c79ad={'CREATED':_0x171978(0x861),'STARTING':_0x171978(0x34e),'STARTED':_0x171978(0x556),'STOPPING':_0x171978(0x7ed),'STOPPED':_0x171978(0x7f5)},_0x3ca123={'CREATING':_0x171978(0x72a),'READY':_0x171978(0x80a),'HALTED':_0x171978(0x31a),'STOPPED':_0x171978(0x7f5),'RESETTING':_0x171978(0x267)},_0x56600f=Object['freeze']({'POKE':_0x171978(0x212),'DRAIN':_0x171978(0x70c),'TYPE_DROP':_0x171978(0x2cd),'PROC':_0x171978(0x831),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x56600f,'CHANGE_ACTIONS':_0x514399,'EVENTS':_0x3bfa29,'INDEX_STATE':_0x54e848,'OKDB_STATE':_0x3c79ad,'VIEW_STATE':_0x3ca123},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x52d561=_0x1d45b1;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x44dd1d=require$$0$1,_0x40324d=require$$1,_0x19c929=require$$2$1,_0x4c5758=_0x44dd1d['readFileSync'](_0x40324d[_0x52d561(0x3c7)](__dirname,_0x52d561(0x607)),'utf8')[_0x52d561(0x724)](),_0x425837=_0x19c929[_0x52d561(0x66f)](_0x4c5758)['export']({'type':_0x52d561(0x80d),'format':_0x52d561(0x71f)}),_0x2d7b61=_0x19c929[_0x52d561(0x5e2)]('sha256')['update'](_0x425837)[_0x52d561(0x81b)](_0x52d561(0x6df))[_0x52d561(0x747)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x4c5758,'PUB_FINGERPRINT':_0x2d7b61},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x44ce00=_0x1d45b1;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x3acb24=require$$2$1,{OKDBError:_0x4bea84}=requireOkdbError(),{EVENTS:_0x227523}=requireOkdbEnums(),_0x4ae22a=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x58e790,LICENSE_TYPE_INTERNAL:_0x27a015,OPEN_LICENSE_MAX_DURATION_MS:_0x284c64}=_0x4ae22a,_0x3c5c75=requireOkdbPubkey(),_0x2499db={'LICENSED_BUILD':'true','PUBLIC_KEY_PEM':_0x3c5c75['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x3c5c75['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':'log'},_0x332738=_0x44ce00(0x34a),_0x2c0ff3={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x5ace76(_0x21ea3f){await _0x21ea3f['ensureType'](_0x332738);}class _0x18fbf7{constructor(_0x1bd97c){const _0x17d651=_0x44ce00;this[_0x17d651(0x525)]=_0x1bd97c,this['_active']=null;}async[_0x44ce00(0x1b1)](){const _0x5b8af=_0x44ce00,_0x588c73=this[_0x5b8af(0x525)][_0x5b8af(0x485)];if(!_0x588c73||!_0x588c73[_0x5b8af(0x7e3)](_0x332738)){this['_active']=null;return;}const _0x1f13e8=this['okdb']['id'];let _0x35a3dd=null;for(const {key:_0x373939,value:_0x337a6e}of _0x588c73[_0x5b8af(0x482)](_0x332738)){const _0x56320d=this[_0x5b8af(0x624)](_0x337a6e,_0x1f13e8);_0x56320d===_0x5b8af(0x4fd)&&!_0x35a3dd&&(_0x35a3dd={..._0x337a6e,'id':_0x373939,'status':_0x56320d});}this[_0x5b8af(0x646)]=_0x35a3dd;if(this['_active']&&this[_0x5b8af(0x646)][_0x5b8af(0x235)]===_0x58e790){const _0x3bb6e8=Math[_0x5b8af(0x26a)]((this[_0x5b8af(0x646)][_0x5b8af(0x1f8)]-Date[_0x5b8af(0x562)]())/0x5265c00);this['okdb'][_0x5b8af(0x808)]?.[_0x5b8af(0x4fb)](_0x5b8af(0x2d2)+_0x3bb6e8+'\x20day(s).',{'feature':_0x5b8af(0x65f),'licensee':this['_active'][_0x5b8af(0x3f3)],'expiresAt':new Date(this['_active'][_0x5b8af(0x1f8)])[_0x5b8af(0x804)]()});}this[_0x5b8af(0x646)]&&this['_active'][_0x5b8af(0x235)]===_0x27a015&&this[_0x5b8af(0x525)][_0x5b8af(0x808)]?.[_0x5b8af(0x4fb)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x5b8af(0x65f),'licensee':this['_active']['licensee']});}[_0x44ce00(0x624)](_0x4c2198,_0x4559a2){const _0x5e83a0=_0x44ce00;if(!_0x4c2198[_0x5e83a0(0x472)])return _0x5e83a0(0x297);let _0x3d65fc;try{_0x3d65fc=_0x4ae22a[_0x5e83a0(0x7f1)](_0x4c2198[_0x5e83a0(0x472)]);}catch(_0x5b0d3b){return _0x5e83a0(0x297);}try{const _0x5d46d5=_0x4ae22a[_0x5e83a0(0x302)](_0x3d65fc[_0x5e83a0(0x737)],_0x3d65fc['sig'],_0x2499db[_0x5e83a0(0x448)]);if(!_0x5d46d5)return _0x5e83a0(0x297);}catch(_0x120692){return'invalid';}if(_0x3d65fc[_0x5e83a0(0x838)]['licenseType']===_0x27a015)return'active';if(_0x3d65fc[_0x5e83a0(0x838)]['expiresAt']<=Date['now']())return _0x5e83a0(0x885);if(_0x3d65fc['decoded'][_0x5e83a0(0x235)]===_0x58e790)return _0x5e83a0(0x4fd);if(!_0x4c2198[_0x5e83a0(0x33a)])return _0x5e83a0(0x65a);const _0xe4e8a7=_0x4ae22a['verifyActivation']({'tokenString':_0x4c2198[_0x5e83a0(0x33a)],'nodeId':_0x4559a2,'rawBlobBuf':_0x3d65fc[_0x5e83a0(0x6b6)],'pubKeyPem':_0x2499db[_0x5e83a0(0x448)],'pubFingerprint':_0x2499db['PUB_FINGERPRINT']});if(_0xe4e8a7[_0x5e83a0(0x2ca)]==='LICENSE_HASH_MISMATCH'||_0xe4e8a7[_0x5e83a0(0x2ca)]===_0x5e83a0(0x86a))return _0x5e83a0(0x6c6);if(_0xe4e8a7[_0x5e83a0(0x2ca)]===_0x5e83a0(0x7fb))return _0x5e83a0(0x885);if(!_0xe4e8a7[_0x5e83a0(0x714)])return _0x5e83a0(0x6c6);return'active';}get[_0x44ce00(0x4fd)](){return this['_active'];}get['effective'](){const _0x4db81e=_0x44ce00;return this[_0x4db81e(0x646)]??_0x2c0ff3;}[_0x44ce00(0x41f)](_0x18e01a){const _0x27540e=_0x44ce00;if(_0x2499db[_0x27540e(0x7ac)]!==_0x27540e(0x687))return;const _0x5f2c84=this['effective'];if(!_0x5f2c84['features']?.[_0x18e01a]){const _0x958123=_0x5f2c84[_0x27540e(0x5f9)]?'Feature\x20not\x20available\x20on\x20free\x20tier:\x20'+_0x18e01a+_0x27540e(0x1dc)+_0x18e01a+'\x22\x20to\x20enable\x20it.':_0x27540e(0x2d7)+_0x18e01a+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x18e01a+'\x22.';throw new _0x4bea84(_0x958123,_0x27540e(0x4a2),{'feature':_0x18e01a});}}['isFeatureEnabled'](_0x2597f5){const _0x56ac52=_0x44ce00;if(_0x2499db[_0x56ac52(0x7ac)]!==_0x56ac52(0x687))return!![];return!!this[_0x56ac52(0x2e1)][_0x56ac52(0x858)]?.[_0x2597f5];}['hasLimit'](_0x3da382){const _0x56a40f=_0x44ce00;if(_0x2499db[_0x56a40f(0x7ac)]!==_0x56a40f(0x687))return![];const _0x574757=this[_0x56a40f(0x2e1)][_0x56a40f(0x452)]?.[_0x3da382];return!(_0x574757===null||_0x574757===undefined||_0x574757===0x0);}[_0x44ce00(0x33d)](_0x290757,_0x5ae16e){const _0x224fa2=_0x44ce00;if(_0x2499db[_0x224fa2(0x7ac)]!==_0x224fa2(0x687))return;const _0x6616f8=this[_0x224fa2(0x2e1)],_0x2a261f=_0x6616f8[_0x224fa2(0x452)]?.[_0x290757];if(_0x2a261f===null||_0x2a261f===undefined||_0x2a261f===0x0)return;if(_0x5ae16e>=_0x2a261f)throw new _0x4bea84(_0x224fa2(0x645)+_0x290757+'\x20('+_0x5ae16e+'/'+_0x2a261f+')',_0x224fa2(0x356),{'limit':_0x290757,'current':_0x5ae16e,'max':_0x2a261f});}async[_0x44ce00(0x1ed)](_0xf204c5){const _0x8dfb37=_0x44ce00;let _0x2139a4;try{_0x2139a4=_0x4ae22a[_0x8dfb37(0x7f1)](_0xf204c5);}catch(_0x3eac51){throw new _0x4bea84(_0x8dfb37(0x77d)+_0x3eac51['message'],'LICENSE_INVALID');}let _0x225303;try{_0x225303=_0x4ae22a['verifySignature'](_0x2139a4[_0x8dfb37(0x737)],_0x2139a4[_0x8dfb37(0x659)],_0x2499db[_0x8dfb37(0x448)]);}catch(_0x4eaccf){throw new _0x4bea84(_0x8dfb37(0x4d8)+_0x4eaccf[_0x8dfb37(0x258)],_0x8dfb37(0x639));}if(!_0x225303)throw new _0x4bea84(_0x8dfb37(0x385)+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x2499db['PUB_FINGERPRINT']+'.\x20')+_0x8dfb37(0x884),'LICENSE_INVALID',{'expectedFingerprint':_0x2499db[_0x8dfb37(0x2b5)]});if(_0x2139a4[_0x8dfb37(0x838)][_0x8dfb37(0x235)]===_0x58e790){const _0xe029f2=_0x2139a4['decoded'][_0x8dfb37(0x1f8)]-_0x2139a4['decoded'][_0x8dfb37(0x4fa)];if(_0xe029f2>_0x284c64)throw new _0x4bea84(_0x8dfb37(0x2a3)+Math[_0x8dfb37(0x26a)](_0xe029f2/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x8dfb37(0x639));}const _0x5b91c1=this[_0x8dfb37(0x525)]['_systemEnv'];await _0x5ace76(_0x5b91c1);const _0x370de4=_0x4ae22a[_0x8dfb37(0x79b)](_0x2139a4[_0x8dfb37(0x6b6)])[_0x8dfb37(0x2be)](_0x8dfb37(0x6df));for(const {key:_0x5e9b95,value:_0x22304f}of _0x5b91c1[_0x8dfb37(0x482)](_0x332738)){if(_0x22304f[_0x8dfb37(0x49a)]===_0x370de4)throw new _0x4bea84('License\x20already\x20stored','LICENSE_ALREADY_STORED',{'id':_0x5e9b95});}const _0x1e27b4=_0x3acb24['createHash'](_0x8dfb37(0x6f8))[_0x8dfb37(0x837)](_0x8dfb37(0x7a7))[_0x8dfb37(0x837)](_0x2139a4[_0x8dfb37(0x6b6)])[_0x8dfb37(0x81b)](_0x8dfb37(0x6df)),_0x490bc4=_0x1e27b4[_0x8dfb37(0x747)](0x0,0x8)+'-'+_0x1e27b4['slice'](0x8,0xc)+'-5'+_0x1e27b4[_0x8dfb37(0x747)](0xd,0x10)+'-'+(parseInt(_0x1e27b4[0x10],0x10)&0x3|0x8)[_0x8dfb37(0x2be)](0x10)+_0x1e27b4['slice'](0x11,0x14)+'-'+_0x1e27b4[_0x8dfb37(0x747)](0x14,0x20),_0x48f097={'blob':_0xf204c5,'activation':null,'addedAt':Date[_0x8dfb37(0x562)](),'_licenseHash':_0x370de4,'licensee':_0x2139a4[_0x8dfb37(0x838)]['licensee'],'expiresAt':_0x2139a4[_0x8dfb37(0x838)][_0x8dfb37(0x1f8)],'features':_0x2139a4[_0x8dfb37(0x838)][_0x8dfb37(0x858)],'limits':_0x2139a4['decoded'][_0x8dfb37(0x452)],'licenseType':_0x2139a4['decoded'][_0x8dfb37(0x235)]};return await _0x5b91c1[_0x8dfb37(0x250)](_0x332738,_0x490bc4,_0x48f097),{'id':_0x490bc4,..._0x48f097};}async['activateLicense'](_0xe9fa13){const _0x37f97e=_0x44ce00;let _0x3e0fc2;try{_0x3e0fc2=_0x4ae22a[_0x37f97e(0x4ba)](_0xe9fa13);}catch(_0x873339){throw new _0x4bea84(_0x37f97e(0x75b)+_0x873339[_0x37f97e(0x258)],'LICENSE_ACTIVATION_INVALID');}const _0x4a8dcc=_0x3e0fc2['licenseHash'][_0x37f97e(0x2be)](_0x37f97e(0x6df)),_0x4960e3=this['okdb']['_systemEnv'];if(!_0x4960e3||!_0x4960e3[_0x37f97e(0x7e3)](_0x332738))throw new _0x4bea84(_0x37f97e(0x493),_0x37f97e(0x17e));let _0x3b9553=null,_0x2742e0=null;for(const {key:_0x5a0678,value:_0x3d64ca}of _0x4960e3[_0x37f97e(0x482)](_0x332738)){if(_0x3d64ca['_licenseHash']===_0x4a8dcc){_0x3b9553=_0x5a0678,_0x2742e0=_0x3d64ca;break;}}if(!_0x3b9553)throw new _0x4bea84(_0x37f97e(0x493),_0x37f97e(0x17e));const {rawBuf:_0x30dae5}=_0x4ae22a[_0x37f97e(0x7f1)](_0x2742e0['blob']),_0x2f95cf=_0x4ae22a['verifyActivation']({'tokenString':_0xe9fa13,'nodeId':this[_0x37f97e(0x525)]['id'],'rawBlobBuf':_0x30dae5,'pubKeyPem':_0x2499db['PUBLIC_KEY_PEM'],'pubFingerprint':_0x2499db[_0x37f97e(0x2b5)]});if(!_0x2f95cf['valid'])throw new _0x4bea84(_0x37f97e(0x312)+_0x2f95cf['reason'],_0x37f97e(0x17e),{'reason':_0x2f95cf[_0x37f97e(0x2ca)]});const _0x485d42={..._0x2742e0,'activation':_0xe9fa13};return await _0x4960e3[_0x37f97e(0x837)](_0x332738,_0x3b9553,_0x485d42),{'id':_0x3b9553,..._0x485d42};}async[_0x44ce00(0x72c)](_0x466220){const _0x326e03=_0x44ce00,_0x3212f7=this[_0x326e03(0x525)][_0x326e03(0x485)];if(!_0x3212f7||!_0x3212f7[_0x326e03(0x7e3)](_0x332738))return;await _0x3212f7['remove'](_0x332738,_0x466220);}async[_0x44ce00(0x1cc)](){const _0x265167=_0x44ce00,_0x5d933d=this[_0x265167(0x525)][_0x265167(0x485)];if(!_0x5d933d||!_0x5d933d[_0x265167(0x7e3)](_0x332738))return[];const _0x3cef7d=this[_0x265167(0x525)]['id'],_0x398448=[];for(const {key:_0x3cc08b,value:_0x328888}of _0x5d933d['getRange'](_0x332738)){const _0x46bfdd=this[_0x265167(0x624)](_0x328888,_0x3cef7d);_0x398448[_0x265167(0x677)]({..._0x328888,'id':_0x3cc08b,'status':_0x46bfdd});}return _0x398448;}[_0x44ce00(0x865)](){const _0x1260fa=_0x44ce00,_0x5d47a5=this[_0x1260fa(0x525)][_0x1260fa(0x485)];if(!_0x5d47a5||!_0x5d47a5[_0x1260fa(0x7e3)](_0x332738))return[];const _0x1e0d68=this[_0x1260fa(0x525)]['id'],_0x1bfecd=[];for(const {key:_0x2544f3,value:_0x436375}of _0x5d47a5['getRange'](_0x332738)){if(_0x436375[_0x1260fa(0x49a)]){if(_0x436375[_0x1260fa(0x235)]===_0x58e790)_0x1bfecd['push']({'licenseId':_0x2544f3,'pin':null});else{const _0x71042f=Buffer[_0x1260fa(0x1c3)](_0x436375[_0x1260fa(0x49a)],_0x1260fa(0x6df)),{pin:_0x29d37e}=_0x4ae22a[_0x1260fa(0x17c)](_0x1e0d68,_0x71042f,_0x2499db[_0x1260fa(0x2b5)]);_0x1bfecd['push']({'licenseId':_0x2544f3,'pin':_0x29d37e});}}}return _0x1bfecd;}async[_0x44ce00(0x782)](){const _0x528a73=_0x44ce00,_0x3c6b79=this[_0x528a73(0x646)];await this[_0x528a73(0x1b1)]();if(this[_0x528a73(0x646)]&&this[_0x528a73(0x646)][_0x528a73(0x235)]===_0x58e790){const _0x234a70=Math[_0x528a73(0x26a)]((this[_0x528a73(0x646)][_0x528a73(0x1f8)]-Date[_0x528a73(0x562)]())/0x5265c00);this[_0x528a73(0x525)]['log']?.[_0x528a73(0x4fb)](_0x528a73(0x2d2)+_0x234a70+_0x528a73(0x535),{'feature':_0x528a73(0x65f),'licensee':this['_active'][_0x528a73(0x3f3)],'expiresAt':new Date(this[_0x528a73(0x646)][_0x528a73(0x1f8)])[_0x528a73(0x804)]()});}this['_active']&&this[_0x528a73(0x646)][_0x528a73(0x235)]===_0x27a015&&this['okdb'][_0x528a73(0x808)]?.[_0x528a73(0x4fb)](_0x528a73(0x41b),{'feature':_0x528a73(0x65f),'licensee':this[_0x528a73(0x646)]['licensee']});if(_0x3c6b79&&!this[_0x528a73(0x646)]){this['okdb'][_0x528a73(0x808)]?.[_0x528a73(0x4fb)]('License\x20expired\x20or\x20invalidated',{'feature':'license'}),this[_0x528a73(0x525)][_0x528a73(0x20a)]?.[_0x528a73(0x3bc)](_0x227523[_0x528a73(0x639)],{'previous':_0x3c6b79});const _0x5ed542=this['okdb'][_0x528a73(0x33b)]?.[_0x528a73(0x5c4)]??_0x2499db['LICENSE_EXPIRED_ACTION'];_0x5ed542==='shutdown'&&(this['okdb'][_0x528a73(0x808)]?.['error']('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':_0x528a73(0x65f)}),this[_0x528a73(0x525)][_0x528a73(0x419)]()[_0x528a73(0x613)](()=>{})[_0x528a73(0x56d)](()=>process['exit'](0x1)));}}}return okdbLicense={'LicenseChecker':_0x18fbf7,'_C':_0x2499db,'FREE_TIER':_0x2c0ff3},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x8a80b6=_0x1d45b1;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x256559=require$$0$3,_0x19536c=require$$0$1,_0x4a8509=require$$0,_0xc0632c=require$$1,_0x1bdee1=_0xc0632c['join'](_0x4a8509[_0x8a80b6(0x7c1)](),_0x8a80b6(0x5e9)),_0x515fa9=0x3e8,_0x1d9782={'reset':_0x8a80b6(0x1d8),'bold':_0x8a80b6(0x26e),'dim':_0x8a80b6(0x73b),'red':'\x1b[31m','green':'\x1b[32m','yellow':_0x8a80b6(0x55b),'blue':_0x8a80b6(0x39c),'magenta':_0x8a80b6(0x567),'cyan':_0x8a80b6(0x257),'white':_0x8a80b6(0x702),'gray':_0x8a80b6(0x2c3)},_0x31d25a=!process[_0x8a80b6(0x4a1)]['isTTY']||!!process.env.NO_COLOR,_0x5a1525=(_0x1d3809,_0x55b788)=>_0x31d25a?_0x55b788:''+_0x1d3809+_0x55b788+_0x1d9782[_0x8a80b6(0x4c6)],_0xb59fe0={'error':_0x1d9782['red'],'warn':_0x1d9782[_0x8a80b6(0x495)],'info':_0x1d9782[_0x8a80b6(0x246)],'debug':_0x1d9782[_0x8a80b6(0x767)]},_0x119cdc={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x18d1e4(_0x54ba3e,_0x3c5d16=_0x8a80b6(0x510)){const _0x1cc8c7=_0x8a80b6,{level:_0x17cfbb,msg:_0xb4dc13,meta:_0x515251,context:_0x160f36,ts:_0x22028c}=_0x54ba3e;if((_0x119cdc[_0x17cfbb]??0x1)<(_0x119cdc[_0x3c5d16]??0x1))return;const _0x33ec4d=_0x5a1525(_0x1d9782[_0x1cc8c7(0x767)],new Date(_0x22028c)[_0x1cc8c7(0x804)]()),_0x2ea6b8=_0x5a1525(_0xb59fe0[_0x17cfbb]??_0x1d9782['white'],_0x17cfbb[_0x1cc8c7(0x466)](0x5));let _0x19c883='\x20\x20'+_0x33ec4d+'\x20'+_0x5a1525(_0x1d9782[_0x1cc8c7(0x691)],_0x2ea6b8)+'\x20'+_0xb4dc13;if(_0x515251&&Object[_0x1cc8c7(0x367)](_0x515251)[_0x1cc8c7(0x320)]>0x0){const _0x219019=Object[_0x1cc8c7(0x5bd)](_0x515251)[_0x1cc8c7(0x800)](([_0x1fae0d,_0x507f65])=>_0x1fae0d+'='+_0x507f65)['join']('\x20');_0x19c883+=_0x5a1525(_0x1d9782[_0x1cc8c7(0x721)],_0x1cc8c7(0x766)+_0x219019+']');}if(_0x160f36!==undefined){const _0x33fc66=typeof _0x160f36===_0x1cc8c7(0x76b)?JSON['stringify'](_0x160f36):String(_0x160f36);_0x19c883+=_0x5a1525(_0x1d9782[_0x1cc8c7(0x721)],'\x20\x20'+_0x33fc66);}const _0x3a457b=_0x17cfbb===_0x1cc8c7(0x4dd)||_0x17cfbb===_0x1cc8c7(0x4fb)?process[_0x1cc8c7(0x7d4)][_0x1cc8c7(0x753)][_0x1cc8c7(0x6f0)](process[_0x1cc8c7(0x7d4)]):process[_0x1cc8c7(0x4a1)][_0x1cc8c7(0x753)][_0x1cc8c7(0x6f0)](process['stdout']);_0x3a457b(_0x19c883+'\x0a');}function _0x125bb2(_0x30bee1,_0x29907f){const _0x180d6d=_0x8a80b6;if(_0x30bee1===0xcc||_0x30bee1>=0xc8&&_0x30bee1<0x12c&&!_0x29907f){console[_0x180d6d(0x808)]('\x0a\x20\x20'+_0x5a1525(_0x1d9782[_0x180d6d(0x277)],'✓')+'\x0a');return;}if(_0x30bee1>=0x190||_0x29907f?.[_0x180d6d(0x4dd)]){const _0x1f004c=_0x29907f?.['error']??_0x29907f?.['message']??_0x180d6d(0x2ac)+_0x30bee1;console['log'](_0x180d6d(0x2b7)+_0x5a1525(_0x1d9782['red'],'✗')+'\x20'+_0x5a1525(_0x1d9782[_0x180d6d(0x691)]+_0x1d9782[_0x180d6d(0x1e4)],String(_0x30bee1))+'\x20\x20'+_0x1f004c+'\x0a');return;}const _0x1d7b08=Object[_0x180d6d(0x4ea)]['hasOwnProperty'][_0x180d6d(0x341)](_0x29907f??{},_0x180d6d(0x1c2))?_0x29907f['result']:_0x29907f,_0x14a393=_0x29907f?.['meta'];console['log'](''),_0xb875a(_0x1d7b08,'\x20\x20');if(_0x14a393?.[_0x180d6d(0x3e3)]!=null||_0x14a393?.[_0x180d6d(0x4ff)]!=null){const _0x358511=[];if(_0x14a393[_0x180d6d(0x3e3)]!=null)_0x358511['push'](_0x14a393[_0x180d6d(0x3e3)]+_0x180d6d(0x7b3)+(_0x14a393[_0x180d6d(0x3e3)]!==0x1?'s':''));if(_0x14a393[_0x180d6d(0x4ff)]!=null)_0x358511[_0x180d6d(0x677)](_0x14a393[_0x180d6d(0x4ff)]+'ms');console[_0x180d6d(0x808)](_0x180d6d(0x2b7)+_0x5a1525(_0x1d9782[_0x180d6d(0x721)],_0x358511[_0x180d6d(0x3c7)](_0x180d6d(0x6b2))));}console[_0x180d6d(0x808)]('');}function _0xb875a(_0x340649,_0x5e3b2f=''){const _0x42c030=_0x8a80b6;if(_0x340649===null||_0x340649===undefined){console[_0x42c030(0x808)](_0x5e3b2f+_0x5a1525(_0x1d9782[_0x42c030(0x721)],'(null)'));return;}if(Array[_0x42c030(0x22a)](_0x340649)){if(_0x340649[_0x42c030(0x320)]===0x0){console['log'](_0x5e3b2f+_0x5a1525(_0x1d9782['dim'],_0x42c030(0x7c3)));return;}if(_0x340649['every'](_0x4a317f=>_0x4a317f&&typeof _0x4a317f===_0x42c030(0x76b)&&'key'in _0x4a317f&&_0x42c030(0x1a4)in _0x4a317f)){_0x26fbb2(_0x340649,_0x5e3b2f);return;}if(_0x340649[_0x42c030(0x4bd)](_0xc37bb7=>_0xc37bb7&&typeof _0xc37bb7==='object'&&_0x42c030(0x51d)in _0xc37bb7&&_0x42c030(0x3e3)in _0xc37bb7)){_0x1e448b(_0x340649,_0x5e3b2f);return;}if(_0x340649[_0x42c030(0x4bd)](_0x4fc171=>typeof _0x4fc171!==_0x42c030(0x76b)||_0x4fc171===null)){_0x340649['forEach']((_0x3f3c35,_0xe94c22)=>console[_0x42c030(0x808)](_0x5e3b2f+_0x5a1525(_0x1d9782[_0x42c030(0x767)],_0xe94c22+0x1+'.')+'\x20'+_0x5a1525(_0x1d9782[_0x42c030(0x86b)],String(_0x3f3c35))));return;}_0x340649[_0x42c030(0x248)]((_0x47f214,_0x2d4ce1)=>{const _0x2426d6=_0x42c030;console[_0x2426d6(0x808)](_0x5e3b2f+_0x5a1525(_0x1d9782['dim'],'['+_0x2d4ce1+']'));if(typeof _0x47f214===_0x2426d6(0x76b)&&_0x47f214!==null)_0x229d0e(_0x47f214,_0x5e3b2f+'\x20\x20');else console[_0x2426d6(0x808)](_0x5e3b2f+'\x20\x20'+String(_0x47f214));});return;}if(typeof _0x340649===_0x42c030(0x76b)){if(_0x42c030(0x4e2)in _0x340649&&_0x42c030(0x1a4)in _0x340649&&Object[_0x42c030(0x367)](_0x340649)[_0x42c030(0x320)]<=0x3){console[_0x42c030(0x808)](_0x5e3b2f+_0x5a1525(_0x1d9782[_0x42c030(0x691)]+_0x1d9782['cyan'],String(_0x340649[_0x42c030(0x4e2)])));const _0x3042c7=_0x340649[_0x42c030(0x1a4)];if(_0x3042c7&&typeof _0x3042c7==='object')_0x229d0e(_0x3042c7,_0x5e3b2f);else console[_0x42c030(0x808)](_0x5e3b2f+_0x5a1525(_0x1d9782[_0x42c030(0x86b)],String(_0x3042c7)));return;}_0x229d0e(_0x340649,_0x5e3b2f);return;}console[_0x42c030(0x808)](_0x5e3b2f+_0x5a1525(_0x1d9782[_0x42c030(0x86b)],String(_0x340649)));}function _0x229d0e(_0x404749,_0x3e45f3=''){const _0x31f83b=_0x8a80b6,_0x581157=Object[_0x31f83b(0x5bd)](_0x404749);if(_0x581157[_0x31f83b(0x320)]===0x0){console['log'](_0x3e45f3+_0x5a1525(_0x1d9782[_0x31f83b(0x721)],'{}'));return;}const _0x2c28f7=Math[_0x31f83b(0x754)](0x1c,Math[_0x31f83b(0x456)](..._0x581157[_0x31f83b(0x800)](([_0x36197a])=>_0x36197a[_0x31f83b(0x320)])));for(const [_0x3ad64c,_0x3029ae]of _0x581157){const _0xd8d579=_0x5a1525(_0x1d9782[_0x31f83b(0x246)],_0x3ad64c[_0x31f83b(0x466)](_0x2c28f7));if(_0x3029ae===null||_0x3029ae===undefined)console[_0x31f83b(0x808)](_0x3e45f3+_0xd8d579+'\x20\x20'+_0x5a1525(_0x1d9782[_0x31f83b(0x721)],'null'));else{if(typeof _0x3029ae==='object'){const _0x54d5c5=JSON[_0x31f83b(0x729)](_0x3029ae);_0x54d5c5[_0x31f83b(0x320)]<=0x50?console[_0x31f83b(0x808)](_0x3e45f3+_0xd8d579+'\x20\x20'+_0x5a1525(_0x1d9782[_0x31f83b(0x721)],_0x54d5c5)):(console['log'](_0x3e45f3+_0xd8d579),_0xb875a(_0x3029ae,_0x3e45f3+'\x20\x20'));}else{const _0x14a45e=typeof _0x3029ae===_0x31f83b(0x71a)?_0x5a1525(_0x3029ae?_0x1d9782['green']:_0x1d9782[_0x31f83b(0x495)],String(_0x3029ae)):typeof _0x3029ae===_0x31f83b(0x656)?_0x5a1525(_0x1d9782['magenta'],String(_0x3029ae)):_0x5a1525(_0x1d9782[_0x31f83b(0x86b)],String(_0x3029ae));console[_0x31f83b(0x808)](_0x3e45f3+_0xd8d579+'\x20\x20'+_0x14a45e);}}}}function _0x26fbb2(_0x404d5f,_0x358912=''){const _0x3da4a6=_0x8a80b6,_0x3313df=Math[_0x3da4a6(0x754)](0x20,Math['max'](..._0x404d5f[_0x3da4a6(0x800)](_0x74a332=>String(_0x74a332[_0x3da4a6(0x4e2)])[_0x3da4a6(0x320)])));for(const {key:_0x532deb,value:_0x595dd9,score:_0x1db482,clock:_0xf47932}of _0x404d5f){const _0x5d8d01=_0x5a1525(_0x1d9782[_0x3da4a6(0x691)]+_0x1d9782[_0x3da4a6(0x246)],String(_0x532deb)['padEnd'](_0x3313df)),_0x5dfca2=_0x595dd9==null?_0x5a1525(_0x1d9782[_0x3da4a6(0x721)],_0x3da4a6(0x198)):typeof _0x595dd9===_0x3da4a6(0x76b)?_0x5a1525(_0x1d9782[_0x3da4a6(0x721)],JSON['stringify'](_0x595dd9)):_0x5a1525(_0x1d9782[_0x3da4a6(0x86b)],String(_0x595dd9)),_0x324ab9=_0x1db482!=null?_0x5a1525(_0x1d9782[_0x3da4a6(0x767)],_0x3da4a6(0x3b1)+_0x1db482['toFixed'](0x4)):'',_0x30a4e8=_0xf47932!=null?_0x5a1525(_0x1d9782['gray'],'\x20\x20@'+_0xf47932):'';console[_0x3da4a6(0x808)](_0x358912+_0x5d8d01+'\x20\x20'+_0x5dfca2+_0x324ab9+_0x30a4e8);}}function _0x1e448b(_0x199603,_0x31c40b=''){const _0xde298=_0x8a80b6,_0x3e825b=Math[_0xde298(0x754)](0x20,Math[_0xde298(0x456)](..._0x199603[_0xde298(0x800)](_0x557b51=>_0x557b51[_0xde298(0x51d)]['length'])));for(const {type:_0x433a49,count:_0x2845d3,fields:_0xad94df}of _0x199603){if(_0x433a49[_0xde298(0x32e)]('~'))continue;const _0x1e93a7=_0x5a1525(_0x1d9782['bold']+_0x1d9782[_0xde298(0x246)],_0x433a49[_0xde298(0x466)](_0x3e825b)),_0x417658=_0x5a1525(_0x1d9782[_0xde298(0x1fa)],String(_0x2845d3)['padStart'](0x6))+_0x5a1525(_0x1d9782[_0xde298(0x721)],'\x20records'),_0x315629=_0xad94df&&Object['keys'](_0xad94df)[_0xde298(0x320)]?_0x5a1525(_0x1d9782[_0xde298(0x721)],_0xde298(0x4b5)+Object[_0xde298(0x367)](_0xad94df)[_0xde298(0x747)](0x0,0x6)[_0xde298(0x3c7)](',\x20')+(Object[_0xde298(0x367)](_0xad94df)['length']>0x6?'…':'')):'';console[_0xde298(0x808)](_0x31c40b+_0x1e93a7+'\x20\x20'+_0x417658+_0x315629);}}const _0x4ea58e=[_0x8a80b6(0x303),_0x8a80b6(0x4ad),_0x8a80b6(0x50e),_0x8a80b6(0x69b),'transaction',_0x8a80b6(0x4d0)];function _0x5df2ef(_0xbbc676,_0x298836){const _0xc960e4=_0x8a80b6;if(_0xbbc676[_0xc960e4(0x32e)](_0xc960e4(0x343)))return _0xbbc676;if(_0xbbc676[_0xc960e4(0x32e)]('/'))return _0xc960e4(0x65b)+_0xbbc676;if(_0xbbc676[_0xc960e4(0x32e)](_0xc960e4(0x7bf)))return'/api/'+_0xbbc676;const _0x4bb44d=_0x4ea58e[_0xc960e4(0x19e)](_0x21b845=>_0xbbc676===_0x21b845[_0xc960e4(0x4c2)](/\/$/,'')||_0xbbc676[_0xc960e4(0x32e)](_0x21b845));return _0x4bb44d?_0xc960e4(0x240)+_0x298836+'/'+_0xbbc676:'/api/'+_0xbbc676;}function _0x3ec02d(_0x3732d5){const _0x7ba5e0=_0x8a80b6,_0xbe9dc9={},_0x5788a0=[];let _0x12add1=0x0;while(_0x12add1<_0x3732d5[_0x7ba5e0(0x320)]){if((_0x3732d5[_0x12add1]===_0x7ba5e0(0x1fb)||_0x3732d5[_0x12add1]==='-e')&&_0x3732d5[_0x12add1+0x1]&&!_0x3732d5[_0x12add1+0x1]['startsWith']('-'))_0xbe9dc9[_0x7ba5e0(0x684)]=_0x3732d5[++_0x12add1];else _0x3732d5[_0x12add1]===_0x7ba5e0(0x1f5)||_0x3732d5[_0x12add1]==='-h'?_0xbe9dc9[_0x7ba5e0(0x225)]=!![]:_0x5788a0[_0x7ba5e0(0x677)](_0x3732d5[_0x12add1]);_0x12add1++;}return{'flags':_0xbe9dc9,'rest':_0x5788a0};}const _0x2253c2={'system':_0x8a80b6(0x350),'envs':_0x8a80b6(0x26b),'types':'Types','data':'Records','indexes':_0x8a80b6(0x698),'fts':_0x8a80b6(0x5b1),'sync':_0x8a80b6(0x792),'queue':_0x8a80b6(0x73e),'files':_0x8a80b6(0x5a6),'embeddings':_0x8a80b6(0x6b4),'engines':_0x8a80b6(0x791),'admin':_0x8a80b6(0x750),'event':_0x8a80b6(0x80f),'processor':_0x8a80b6(0x262)},_0x34e836=['system',_0x8a80b6(0x66e),_0x8a80b6(0x303),_0x8a80b6(0x524),_0x8a80b6(0x77a),'fts',_0x8a80b6(0x84e),_0x8a80b6(0x398),_0x8a80b6(0x4cc),'embeddings',_0x8a80b6(0x667),_0x8a80b6(0x560)];function _0xa4cc4d(_0x34fdb){const _0x1299ed=_0x8a80b6;return _0x34fdb[_0x1299ed(0x4c2)](/^\/api/,'')[_0x1299ed(0x4c2)](/^\[\/env\/:env=[^\]]*\]/,_0x1299ed(0x243))['replace'](/^\/env\/:env/,_0x1299ed(0x609))['replace'](/^\//,'');}function _0x5b7c57(_0x498ddf,_0x9f29d6=''){const _0x3cac96=_0x8a80b6,_0xffa3f4=_0x498ddf[_0x3cac96(0x2b8)][_0x3cac96(0x4a5)]()['filter'](_0x13bfa=>!_0x13bfa[_0x3cac96(0x338)]?.['hidden']),_0x1caac8=_0x9f29d6?_0xffa3f4[_0x3cac96(0x626)](_0x159a19=>_0x159a19[_0x3cac96(0x73c)][_0x3cac96(0x564)]()[_0x3cac96(0x5ca)](_0x9f29d6[_0x3cac96(0x564)]())||(_0x24986d(_0x159a19)??'')[_0x3cac96(0x564)]()[_0x3cac96(0x5ca)](_0x9f29d6[_0x3cac96(0x564)]())||_0x322dd4(_0x159a19)['some'](_0x542c9b=>_0x542c9b['toLowerCase']()['includes'](_0x9f29d6[_0x3cac96(0x564)]()))):_0xffa3f4;if(!_0x1caac8[_0x3cac96(0x320)]){console['log'](_0x5a1525(_0x1d9782['yellow'],_0x3cac96(0x5ec)+_0x9f29d6+'\x22\x0a'));return;}const _0x59ac81=new Map();for(const _0x4c5bf7 of _0x1caac8){const _0xe270ba=_0x322dd4(_0x4c5bf7)[0x0]??_0x3cac96(0x5c3);if(!_0x59ac81[_0x3cac96(0x514)](_0xe270ba))_0x59ac81[_0x3cac96(0x4a3)](_0xe270ba,[]);_0x59ac81[_0x3cac96(0x5f1)](_0xe270ba)[_0x3cac96(0x677)](_0x4c5bf7);}const _0xd4bbd2=[..._0x34e836[_0x3cac96(0x626)](_0x412194=>_0x59ac81[_0x3cac96(0x514)](_0x412194)),...[..._0x59ac81[_0x3cac96(0x367)]()]['filter'](_0x5f56a0=>!_0x34e836[_0x3cac96(0x5ca)](_0x5f56a0))];console['log']('');for(const _0x26a90e of _0xd4bbd2){const _0x258bfd=_0x59ac81[_0x3cac96(0x5f1)](_0x26a90e);if(!_0x258bfd?.[_0x3cac96(0x320)])continue;console[_0x3cac96(0x808)](_0x5a1525(_0x1d9782[_0x3cac96(0x691)],'\x20\x20'+(_0x2253c2[_0x26a90e]??_0x26a90e)));for(const _0x2695c1 of _0x258bfd){const _0x20d3f2=_0x5a1525(_0x1d9782[_0x3cac96(0x1fa)],_0x2695c1['method'][_0x3cac96(0x466)](0x7)),_0x311149=_0x5a1525(_0x1d9782['cyan'],_0xa4cc4d(_0x2695c1[_0x3cac96(0x73c)])),_0x47e264=_0x24986d(_0x2695c1)?_0x5a1525(_0x1d9782['dim'],'\x20\x20'+_0x24986d(_0x2695c1)):'',_0x17be37=_0x2695c1['operation']?.['id']?_0x5a1525(_0x1d9782['gray'],_0x3cac96(0x766)+_0x2695c1[_0x3cac96(0x5fc)]['id']+']'):'';console['log']('\x20\x20\x20\x20'+_0x20d3f2+'\x20'+_0x311149+_0x47e264+_0x17be37);}console[_0x3cac96(0x808)]('');}}function _0x41c3c0(_0x5dec75,_0x3fc90b){const _0x2f9ab5=_0x8a80b6,_0x53e1cb=_0x3fc90b[_0x2f9ab5(0x4c2)](/^\/api(\/env\/[^/]+)?\//,'')[_0x2f9ab5(0x5fa)]('/')[0x0],_0x12183d=_0x5dec75['http']['listRoutes']()['filter'](_0x589bdc=>_0x589bdc[_0x2f9ab5(0x73c)][_0x2f9ab5(0x564)]()[_0x2f9ab5(0x5ca)](_0x53e1cb['toLowerCase']()));if(!_0x12183d[_0x2f9ab5(0x320)]){console[_0x2f9ab5(0x808)](_0x5a1525(_0x1d9782[_0x2f9ab5(0x495)],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x3fc90b+'\x0a'));return;}console[_0x2f9ab5(0x808)]('');for(const _0x4195e8 of _0x12183d['slice'](0x0,0xc)){for(const _0x220301 of _0x227d75(_0x4195e8)){console[_0x2f9ab5(0x808)](_0x220301);}console[_0x2f9ab5(0x808)]('');}}function _0x24986d(_0xfbc7bc){const _0x434040=_0x8a80b6;return _0xfbc7bc[_0x434040(0x5fc)]?.[_0x434040(0x6d6)]??_0xfbc7bc['meta']?.[_0x434040(0x6d6)]??'';}function _0x5cbca5(_0x46a299){const _0x2afbd0=_0x8a80b6;return _0x46a299[_0x2afbd0(0x5fc)]?.[_0x2afbd0(0x1bf)]??_0x46a299['meta']?.[_0x2afbd0(0x1bf)]??'';}function _0x322dd4(_0x2f1629){const _0x52746e=_0x8a80b6;return _0x2f1629[_0x52746e(0x5fc)]?.[_0x52746e(0x6c2)]?.['length']?_0x2f1629[_0x52746e(0x5fc)]['tags']:_0x2f1629['meta']?.[_0x52746e(0x6c2)]??[];}function _0x227d75(_0x4a9d18){const _0x4ec587=_0x8a80b6,_0x1cfb92=[];_0x1cfb92[_0x4ec587(0x677)]('\x20\x20'+_0x5a1525(_0x1d9782[_0x4ec587(0x691)]+_0x1d9782[_0x4ec587(0x1fa)],_0x4a9d18[_0x4ec587(0x43f)]['padEnd'](0x7))+'\x20'+_0x5a1525(_0x1d9782['bold']+_0x1d9782[_0x4ec587(0x246)],_0x4a9d18[_0x4ec587(0x73c)]));_0x4a9d18[_0x4ec587(0x5fc)]?.['id']&&_0x1cfb92['push'](_0x4ec587(0x253)+_0x5a1525(_0x1d9782[_0x4ec587(0x767)],_0x4ec587(0x440)+_0x4a9d18[_0x4ec587(0x5fc)]['id']));_0x24986d(_0x4a9d18)&&_0x1cfb92[_0x4ec587(0x677)](_0x4ec587(0x253)+_0x5a1525(_0x1d9782[_0x4ec587(0x86b)],_0x24986d(_0x4a9d18)));_0x5cbca5(_0x4a9d18)&&_0x1cfb92[_0x4ec587(0x677)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5a1525(_0x1d9782[_0x4ec587(0x721)],_0x5cbca5(_0x4a9d18)));_0x322dd4(_0x4a9d18)['length']&&_0x1cfb92['push'](_0x4ec587(0x253)+_0x5a1525(_0x1d9782['gray'],'tags:\x20'+_0x322dd4(_0x4a9d18)[_0x4ec587(0x3c7)](',\x20')));_0x4a9d18['operation']?.[_0x4ec587(0x7a8)]?.['access']&&_0x1cfb92[_0x4ec587(0x677)](_0x4ec587(0x253)+_0x5a1525(_0x1d9782['gray'],_0x4ec587(0x48c)+_0x4a9d18['operation'][_0x4ec587(0x7a8)][_0x4ec587(0x490)]));_0x4a9d18['operation']?.[_0x4ec587(0x2b8)]?.[_0x4ec587(0x746)]&&_0x4a9d18[_0x4ec587(0x5fc)]['http'][_0x4ec587(0x746)]!==_0x4ec587(0x46c)&&_0x1cfb92['push'](_0x4ec587(0x253)+_0x5a1525(_0x1d9782[_0x4ec587(0x767)],'transport:\x20'+_0x4a9d18[_0x4ec587(0x5fc)]['http'][_0x4ec587(0x746)]));if(_0x4a9d18['operation']?.[_0x4ec587(0x26f)]){const _0x5dc964=Object['keys'](_0x4a9d18[_0x4ec587(0x5fc)][_0x4ec587(0x26f)][_0x4ec587(0x1c4)]||{});if(_0x5dc964[_0x4ec587(0x320)])_0x1cfb92[_0x4ec587(0x677)](_0x4ec587(0x253)+_0x5a1525(_0x1d9782[_0x4ec587(0x767)],_0x4ec587(0x7c4)+_0x5dc964['join'](',\x20')));}return _0x4a9d18[_0x4ec587(0x338)]?.['body']&&_0x1cfb92[_0x4ec587(0x677)](_0x4ec587(0x253)+_0x5a1525(_0x1d9782['gray'],_0x4ec587(0x640)+JSON[_0x4ec587(0x729)](_0x4a9d18[_0x4ec587(0x338)][_0x4ec587(0x427)]))),_0x1cfb92;}async function _0x51d6ed(_0x471dea,_0x234ea2,_0xc83f1a,_0x26249a=null){const _0x13aa6e=_0x8a80b6,_0x9ec65a=_0xc83f1a['indexOf']('?'),_0x27565b=_0x9ec65a>=0x0?_0xc83f1a[_0x13aa6e(0x747)](0x0,_0x9ec65a):_0xc83f1a,_0xf33844=_0x9ec65a>=0x0?_0xc83f1a[_0x13aa6e(0x747)](_0x9ec65a+0x1):'',_0x4c12b7=Object[_0x13aa6e(0x3c5)](new URLSearchParams(_0xf33844)[_0x13aa6e(0x5bd)]());return _0x471dea[_0x13aa6e(0x2b8)]['handle'](_0x234ea2,_0x27565b,{'body':_0x26249a,'query':_0x4c12b7,'headers':{'content-type':_0x13aa6e(0x43a)}},{'internal':!![]});}function _0x192aa1(_0x290a99){const _0x57e2ca=_0x8a80b6;if(!_0x290a99)return null;const _0x342219=_0x290a99[_0x57e2ca(0x724)]();if(!_0x342219)return null;try{return JSON[_0x57e2ca(0x40d)](_0x342219);}catch{}try{return JSON[_0x57e2ca(0x40d)](_0x17dd20(_0x342219));}catch(_0xbb775d){throw new SyntaxError(_0xbb775d[_0x57e2ca(0x258)],{'cause':_0xbb775d});}}function _0x17dd20(_0x39007d){const _0x427123=_0x8a80b6;let _0x3d3e46='',_0x555706=0x0;while(_0x555706<_0x39007d['length']){const _0x2b5fef=_0x39007d[_0x555706];if(_0x2b5fef==='\x22'){_0x3d3e46+='\x22',_0x555706++;while(_0x555706<_0x39007d[_0x427123(0x320)]&&_0x39007d[_0x555706]!=='\x22'){if(_0x39007d[_0x555706]==='\x5c'){_0x3d3e46+=_0x39007d[_0x555706++];if(_0x555706<_0x39007d[_0x427123(0x320)])_0x3d3e46+=_0x39007d[_0x555706++];}else _0x3d3e46+=_0x39007d[_0x555706++];}_0x3d3e46+='\x22';if(_0x555706<_0x39007d[_0x427123(0x320)])_0x555706++;continue;}if(_0x2b5fef==='\x27'){_0x3d3e46+='\x22',_0x555706++;while(_0x555706<_0x39007d[_0x427123(0x320)]&&_0x39007d[_0x555706]!=='\x27'){if(_0x39007d[_0x555706]==='\x5c'&&_0x39007d[_0x555706+0x1]==='\x27')_0x3d3e46+='\x27',_0x555706+=0x2;else _0x39007d[_0x555706]==='\x22'?(_0x3d3e46+='\x5c\x22',_0x555706++):_0x3d3e46+=_0x39007d[_0x555706++];}_0x3d3e46+='\x22';if(_0x555706<_0x39007d[_0x427123(0x320)])_0x555706++;continue;}if(_0x427123(0x823)[_0x427123(0x5ca)](_0x2b5fef)){_0x3d3e46+=_0x2b5fef,_0x555706++;continue;}let _0x341f90='';while(_0x555706<_0x39007d[_0x427123(0x320)]&&!'{}[]:,\x27\x22'[_0x427123(0x5ca)](_0x39007d[_0x555706])&&_0x39007d[_0x555706]!=='\x20'&&_0x39007d[_0x555706]!=='\x09'&&_0x39007d[_0x555706]!=='\x0a'&&_0x39007d[_0x555706]!=='\x0d'){_0x341f90+=_0x39007d[_0x555706++];}let _0xdf2f59=_0x555706;while(_0xdf2f59<_0x39007d[_0x427123(0x320)]&&(_0x39007d[_0xdf2f59]==='\x20'||_0x39007d[_0xdf2f59]==='\x09'))_0xdf2f59++;if(_0x39007d[_0xdf2f59]===':')_0x3d3e46+='\x22'+_0x341f90+'\x22';else _0x341f90===_0x427123(0x687)||_0x341f90===_0x427123(0x543)||_0x341f90==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x427123(0x219)](_0x341f90)?_0x3d3e46+=_0x341f90:_0x3d3e46+='\x22'+_0x341f90+'\x22';}return _0x3d3e46[_0x427123(0x4c2)](/,(\s*[}\]])/g,'$1');}function _0x3dcee1(_0xbfa88d){const _0x13592f=_0x8a80b6,_0x40c48f=[];let _0x410a91=0x0;while(_0x410a91<_0xbfa88d[_0x13592f(0x320)]){while(_0x410a91<_0xbfa88d[_0x13592f(0x320)]&&(_0xbfa88d[_0x410a91]==='\x20'||_0xbfa88d[_0x410a91]==='\x09'))_0x410a91++;if(_0x410a91>=_0xbfa88d['length'])break;const _0x1257e7=_0xbfa88d[_0x410a91];if(_0x1257e7==='{'||_0x1257e7==='['){const _0x28e4fb=_0x1257e7==='{'?'}':']',_0x37de3=_0x410a91++;let _0x3eefee=0x1,_0x335015=![],_0x5867d4='';while(_0x410a91<_0xbfa88d[_0x13592f(0x320)]&&_0x3eefee>0x0){const _0x579bcb=_0xbfa88d[_0x410a91];if(_0x335015){if(_0x579bcb==='\x5c')_0x410a91++;else{if(_0x579bcb===_0x5867d4)_0x335015=![];}}else{if(_0x579bcb==='\x22'||_0x579bcb==='\x27')_0x335015=!![],_0x5867d4=_0x579bcb;else{if(_0x579bcb===_0x1257e7)_0x3eefee++;else{if(_0x579bcb===_0x28e4fb)_0x3eefee--;}}}_0x410a91++;}_0x40c48f['push'](_0xbfa88d[_0x13592f(0x747)](_0x37de3,_0x410a91));continue;}if(_0x1257e7==='\x22'||_0x1257e7==='\x27'){const _0x1fa299=_0x1257e7;_0x410a91++;let _0x5f13c0='';while(_0x410a91<_0xbfa88d[_0x13592f(0x320)]&&_0xbfa88d[_0x410a91]!==_0x1fa299){if(_0xbfa88d[_0x410a91]==='\x5c'&&_0x410a91+0x1<_0xbfa88d['length'])_0x410a91++,_0x5f13c0+=_0xbfa88d[_0x410a91++];else _0x5f13c0+=_0xbfa88d[_0x410a91++];}if(_0x410a91<_0xbfa88d[_0x13592f(0x320)])_0x410a91++;_0x40c48f[_0x13592f(0x677)](_0x5f13c0);continue;}let _0x3c3b8f='';while(_0x410a91<_0xbfa88d[_0x13592f(0x320)]&&_0xbfa88d[_0x410a91]!=='\x20'&&_0xbfa88d[_0x410a91]!=='\x09'&&_0xbfa88d[_0x410a91]!=='{'&&_0xbfa88d[_0x410a91]!=='['){_0x3c3b8f+=_0xbfa88d[_0x410a91++];}if(_0x3c3b8f)_0x40c48f[_0x13592f(0x677)](_0x3c3b8f);}return _0x40c48f;}function _0x3adeb0(_0x3c2df1,_0x1e5eaa){const _0x47c7b1=_0x8a80b6,_0x19b56b=[..._0x3c2df1[_0x47c7b1(0x789)][_0x47c7b1(0x367)]()][_0x47c7b1(0x626)](_0x37f806=>!_0x37f806[_0x47c7b1(0x32e)]('~'));console[_0x47c7b1(0x808)](['',_0x5a1525(_0x1d9782[_0x47c7b1(0x691)]+_0x1d9782[_0x47c7b1(0x246)],'\x20\x20╔═══════════════════════════╗'),_0x5a1525(_0x1d9782[_0x47c7b1(0x691)]+_0x1d9782[_0x47c7b1(0x246)],_0x47c7b1(0x547))+_0x5a1525(_0x1d9782[_0x47c7b1(0x691)],_0x47c7b1(0x451))+_0x5a1525(_0x1d9782[_0x47c7b1(0x691)]+_0x1d9782[_0x47c7b1(0x246)],'║'),_0x5a1525(_0x1d9782[_0x47c7b1(0x691)]+_0x1d9782[_0x47c7b1(0x246)],_0x47c7b1(0x611)),'','\x20\x20'+_0x5a1525(_0x1d9782['green'],'✓')+'\x20'+_0x5a1525(_0x1d9782['bold'],_0x47c7b1(0x662))+'\x20\x20http://localhost:'+_0x1e5eaa['port'],..._0x1e5eaa[_0x47c7b1(0x16b)]>0x1?['\x20\x20'+_0x5a1525(_0x1d9782['green'],'✓')+'\x20'+_0x5a1525(_0x1d9782[_0x47c7b1(0x691)],_0x47c7b1(0x2a7))+'\x20'+_0x1e5eaa[_0x47c7b1(0x16b)]+'\x20HTTP\x20workers\x20'+_0x5a1525(_0x1d9782['gray'],_0x47c7b1(0x589))]:[],'\x20\x20'+_0x5a1525(_0x1d9782[_0x47c7b1(0x277)],'✓')+'\x20'+_0x5a1525(_0x1d9782['bold'],_0x47c7b1(0x237))+'\x20\x20\x20\x20\x20http://localhost:'+_0x1e5eaa[_0x47c7b1(0x61f)]+'/api','\x20\x20'+_0x5a1525(_0x1d9782[_0x47c7b1(0x277)],'✓')+'\x20'+_0x5a1525(_0x1d9782['bold'],_0x47c7b1(0x73c))+_0x47c7b1(0x870)+_0x1e5eaa[_0x47c7b1(0x52b)],'\x20\x20'+_0x5a1525(_0x1d9782[_0x47c7b1(0x277)],'✓')+'\x20'+_0x5a1525(_0x1d9782[_0x47c7b1(0x691)],'id')+_0x47c7b1(0x3ef)+_0x5a1525(_0x1d9782['gray'],_0x3c2df1['id']),'\x20\x20'+_0x5a1525(_0x1d9782[_0x47c7b1(0x277)],'✓')+'\x20'+_0x5a1525(_0x1d9782[_0x47c7b1(0x691)],'envs')+'\x20\x20\x20\x20'+_0x19b56b[_0x47c7b1(0x800)](_0x4ff43f=>_0x5a1525(_0x1d9782[_0x47c7b1(0x246)],_0x4ff43f))['join']('\x20\x20'),..._0x1e5eaa[_0x47c7b1(0x35b)]?[]:['\x20\x20'+_0x5a1525(_0x1d9782[_0x47c7b1(0x277)],'✓')+'\x20'+_0x5a1525(_0x1d9782[_0x47c7b1(0x691)],_0x47c7b1(0x560))+_0x47c7b1(0x2d4)+_0x1e5eaa[_0x47c7b1(0x61f)]+'/admin/index.html'],'',_0x5a1525(_0x1d9782[_0x47c7b1(0x721)],_0x47c7b1(0x4f1)+_0x5a1525(_0x1d9782[_0x47c7b1(0x691)],_0x47c7b1(0x225))+'\x20for\x20commands,\x20'+_0x5a1525(_0x1d9782['bold'],_0x47c7b1(0x871))+'\x20to\x20browse\x20the\x20API,\x20'+_0x5a1525(_0x1d9782['bold'],_0x47c7b1(0x532))+_0x47c7b1(0x765)),''][_0x47c7b1(0x3c7)]('\x0a'));}function _0x15a729(_0x37b70b){const _0x93b4c=_0x8a80b6;console[_0x93b4c(0x808)]('\x0a'+_0x5a1525(_0x1d9782[_0x93b4c(0x691)],_0x93b4c(0x76a))+'\x20\x20'+_0x5a1525(_0x1d9782[_0x93b4c(0x721)],_0x93b4c(0x7b5))+_0x93b4c(0x326)+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],_0x93b4c(0x381))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20'+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],'<path>')+'\x20'+_0x5a1525(_0x1d9782[_0x93b4c(0x495)],_0x93b4c(0x45f))+_0x93b4c(0x79d)+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],_0x93b4c(0x21d))+'\x20'+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],_0x93b4c(0x381))+'\x20'+_0x5a1525(_0x1d9782[_0x93b4c(0x495)],_0x93b4c(0x85a))+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0x5a1525(_0x1d9782[_0x93b4c(0x721)],_0x93b4c(0x431))+_0x93b4c(0x1e2)+_0x5a1525(_0x1d9782[_0x93b4c(0x767)],_0x93b4c(0x510))+_0x93b4c(0x30d)+_0x5a1525(_0x1d9782[_0x93b4c(0x767)],_0x93b4c(0x66e))+_0x93b4c(0x785)+_0x5a1525(_0x1d9782[_0x93b4c(0x767)],_0x93b4c(0x303))+_0x93b4c(0x165)+_0x37b70b['env']+'/types\x0a\x20\x20\x20\x20'+_0x5a1525(_0x1d9782['gray'],_0x93b4c(0x5a2))+_0x93b4c(0x748)+_0x37b70b[_0x93b4c(0x684)]+_0x93b4c(0x51e)+_0x5a1525(_0x1d9782[_0x93b4c(0x767)],_0x93b4c(0x863))+_0x93b4c(0x23d)+_0x37b70b[_0x93b4c(0x684)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x5a1525(_0x1d9782['gray'],_0x93b4c(0x5f7))+_0x93b4c(0x5db)+_0x37b70b[_0x93b4c(0x684)]+_0x93b4c(0x67f)+_0x5a1525(_0x1d9782[_0x93b4c(0x767)],_0x93b4c(0x4c0))+'\x0a\x20\x20\x20\x20'+_0x5a1525(_0x1d9782[_0x93b4c(0x767)],_0x93b4c(0x72d))+_0x93b4c(0x1e2)+_0x5a1525(_0x1d9782['gray'],_0x93b4c(0x305))+'\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'+_0x5a1525(_0x1d9782[_0x93b4c(0x691)],_0x93b4c(0x74e))+'\x20\x20'+_0x5a1525(_0x1d9782['dim'],_0x93b4c(0x83f))+'\x0a\x0a\x20\x20'+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],_0x93b4c(0x1e8))+_0x93b4c(0x53c)+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],_0x93b4c(0x1f5))+_0x93b4c(0x4b7)+_0x5a1525(_0x1d9782[_0x93b4c(0x721)],_0x93b4c(0x431))+_0x93b4c(0x1e2)+_0x5a1525(_0x1d9782[_0x93b4c(0x767)],_0x93b4c(0x77f))+_0x93b4c(0x1e2)+_0x5a1525(_0x1d9782[_0x93b4c(0x767)],_0x93b4c(0x632))+_0x93b4c(0x1e2)+_0x5a1525(_0x1d9782[_0x93b4c(0x767)],_0x93b4c(0x321))+'\x0a\x0a'+_0x5a1525(_0x1d9782['bold'],_0x93b4c(0x649))+'\x0a\x0a\x20\x20'+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],_0x93b4c(0x719))+_0x93b4c(0x6b3)+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],_0x93b4c(0x684))+_0x93b4c(0x663)+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],_0x93b4c(0x871))+'\x20'+_0x5a1525(_0x1d9782[_0x93b4c(0x721)],_0x93b4c(0x689))+_0x93b4c(0x653)+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],_0x93b4c(0x6a4))+'\x20'+_0x5a1525(_0x1d9782[_0x93b4c(0x721)],_0x93b4c(0x722))+_0x93b4c(0x883)+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],'open')+_0x93b4c(0x3ff)+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],_0x93b4c(0x225))+_0x93b4c(0x6ef)+_0x5a1525(_0x1d9782[_0x93b4c(0x246)],'exit')+'\x20'+_0x5a1525(_0x1d9782[_0x93b4c(0x721)],'/\x20quit\x20/\x20Ctrl+C')+_0x93b4c(0x51f));}let _0x251310=![];async function _0x1952f4(_0x5386b5,_0x3e611e=0x0,_0x226409=null){const _0x19e379=_0x8a80b6;_0x251310&&(process[_0x19e379(0x7d4)]['write'](_0x5a1525(_0x1d9782[_0x19e379(0x1e4)],_0x19e379(0x540))),process[_0x19e379(0x532)](0x82));_0x251310=!![],process['stdout'][_0x19e379(0x753)]('\x0a'),process[_0x19e379(0x7d4)][_0x19e379(0x753)](_0x5a1525(_0x1d9782['yellow'],_0x19e379(0x5e1)+(_0x226409?_0x19e379(0x183)+_0x226409+',\x20':'')+'shutting\x20down…\x0a'));const _0x4f8541=setTimeout(()=>{const _0x3a93e2=_0x19e379;process['stderr'][_0x3a93e2(0x753)](_0x5a1525(_0x1d9782[_0x3a93e2(0x1e4)],_0x3a93e2(0x673))),process['exit'](0x1);},0x1388);try{await _0x5386b5[_0x19e379(0x419)]();}catch(_0x4598d9){console[_0x19e379(0x4dd)](_0x5a1525(_0x1d9782[_0x19e379(0x1e4)],'\x20\x20'+_0x4598d9['message']));}clearTimeout(_0x4f8541),process['stderr'][_0x19e379(0x753)](_0x5a1525(_0x1d9782['dim'],'\x20\x20[okdb]\x20closed\x20cleanly\x0a')),process['exit'](_0x3e611e);}function _0x2a7bb3(_0x1545b3){const _0x56a5ee=_0x8a80b6,_0x320347=_0x1545b3[_0x56a5ee(0x684)]!=='default'?_0x5a1525(_0x1d9782['yellow'],'['+_0x1545b3['env']+']'):'';return _0x5a1525(_0x1d9782[_0x56a5ee(0x691)]+_0x1d9782['cyan'],_0x56a5ee(0x525))+_0x320347+_0x5a1525(_0x1d9782[_0x56a5ee(0x767)],'>\x20');}const _0x5cb406=new Set([_0x8a80b6(0x1fc),_0x8a80b6(0x16e),_0x8a80b6(0x37e),_0x8a80b6(0x3ab),'DELETE']);async function _0x270a72(_0x9e626c,_0x2462df,_0x20138c,_0x58ff8d,_0x442712,_0x6ac5cb){const _0x44582c=_0x8a80b6;_0x9e626c=_0x9e626c[_0x44582c(0x724)]();if(!_0x9e626c||_0x9e626c['startsWith']('#'))return;const _0x3fd1de=_0x3dcee1(_0x9e626c),{flags:_0x151df4,rest:_0x1da048}=_0x3ec02d(_0x3fd1de);if(!_0x1da048[_0x44582c(0x320)])return;const _0xd0629b=_0x1da048[0x0],_0x548d52=_0xd0629b[_0x44582c(0x19b)]();if(_0x548d52===_0x44582c(0x4e6)){if(_0x1da048[0x1])_0x41c3c0(_0x2462df,_0x5df2ef(_0x1da048[0x1],_0x151df4[_0x44582c(0x684)]??_0x442712[_0x44582c(0x684)]));else _0x15a729(_0x442712);return;}if(_0x548d52===_0x44582c(0x22d)){const _0x7ca480=_0x1da048[0x1];if(!_0x7ca480){console[_0x44582c(0x808)](_0x5a1525(_0x1d9782[_0x44582c(0x1e4)],_0x44582c(0x7ff)));return;}try{_0x2462df[_0x44582c(0x684)](_0x7ca480),_0x442712[_0x44582c(0x684)]=_0x7ca480,_0x6ac5cb?.[_0x44582c(0x287)](_0x2a7bb3(_0x442712)),console['log'](_0x44582c(0x2b7)+_0x5a1525(_0x1d9782[_0x44582c(0x277)],'✓')+'\x20active\x20env:\x20'+_0x5a1525(_0x1d9782[_0x44582c(0x691)]+_0x1d9782[_0x44582c(0x246)],_0x7ca480)+'\x0a');}catch{console[_0x44582c(0x808)](_0x44582c(0x2b7)+_0x5a1525(_0x1d9782['red'],'✗')+_0x44582c(0x7ca)+_0x5a1525(_0x1d9782[_0x44582c(0x691)],_0x7ca480)+'\x20not\x20found'+_0x5a1525(_0x1d9782[_0x44582c(0x721)],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x548d52===_0x44582c(0x2cc)){const _0x51aa68=[..._0x2462df[_0x44582c(0x789)][_0x44582c(0x367)]()][_0x44582c(0x626)](_0x2379b5=>!_0x2379b5[_0x44582c(0x32e)]('~'));console[_0x44582c(0x808)]('');for(const _0x363b40 of _0x51aa68){const _0x11f804=_0x363b40===_0x442712[_0x44582c(0x684)];console[_0x44582c(0x808)]('\x20\x20'+(_0x11f804?_0x5a1525(_0x1d9782[_0x44582c(0x277)],'●'):_0x5a1525(_0x1d9782[_0x44582c(0x721)],'○'))+'\x20\x20'+(_0x11f804?_0x5a1525(_0x1d9782[_0x44582c(0x691)]+_0x1d9782[_0x44582c(0x246)],_0x363b40):_0x5a1525(_0x1d9782[_0x44582c(0x721)],_0x363b40)));}console['log'](_0x44582c(0x2b7)+_0x5a1525(_0x1d9782['dim'],'active:')+'\x20'+_0x5a1525(_0x1d9782['cyan'],_0x442712[_0x44582c(0x684)])),console[_0x44582c(0x808)]('');return;}if(_0x548d52===_0x44582c(0x587)){const _0x4acd3c=[..._0x2462df['_envs'][_0x44582c(0x678)]()][_0x44582c(0x626)](_0x10399f=>!_0x10399f['name']['startsWith']('~'));console[_0x44582c(0x808)]('');const _0x3e497c=Math[_0x44582c(0x456)](..._0x4acd3c[_0x44582c(0x800)](_0x55278c=>_0x55278c[_0x44582c(0x1b6)][_0x44582c(0x320)]));for(const _0x227171 of _0x4acd3c){const _0x51eaf8=_0x227171[_0x44582c(0x1b6)]===_0x442712['env'],_0xcd15e5=_0x51eaf8?_0x5a1525(_0x1d9782['green'],'●'):_0x5a1525(_0x1d9782[_0x44582c(0x721)],'○'),_0x2fbd40=_0x51eaf8?_0x5a1525(_0x1d9782[_0x44582c(0x691)]+_0x1d9782['cyan'],_0x227171[_0x44582c(0x1b6)][_0x44582c(0x466)](_0x3e497c)):_0x5a1525(_0x1d9782[_0x44582c(0x721)],_0x227171[_0x44582c(0x1b6)][_0x44582c(0x466)](_0x3e497c)),_0x445154=[..._0x227171[_0x44582c(0x1ac)][_0x44582c(0x367)]()][_0x44582c(0x626)](_0x3a7071=>!_0x3a7071[_0x44582c(0x32e)]('~')),_0x30036f=_0x445154[_0x44582c(0x320)]?_0x5a1525(_0x1d9782['dim'],_0x445154[_0x44582c(0x747)](0x0,0x5)[_0x44582c(0x3c7)](',\x20')+(_0x445154[_0x44582c(0x320)]>0x5?_0x44582c(0x57e)+(_0x445154[_0x44582c(0x320)]-0x5)+_0x44582c(0x706):'')):_0x5a1525(_0x1d9782[_0x44582c(0x721)],_0x44582c(0x559));console['log']('\x20\x20'+_0xcd15e5+'\x20\x20'+_0x2fbd40+'\x20\x20'+_0x30036f);}console[_0x44582c(0x808)]('');return;}if(_0x548d52===_0x44582c(0x6c1)){const _0x22ca99=_0x151df4['env']??_0x1da048[0x1]??_0x442712[_0x44582c(0x684)];try{const _0x1ae6bd=_0x2462df[_0x44582c(0x684)](_0x22ca99),_0x3edb9e=[..._0x1ae6bd[_0x44582c(0x1ac)][_0x44582c(0x367)]()][_0x44582c(0x626)](_0x2f1e30=>!_0x2f1e30['startsWith']('~'))['sort']();console[_0x44582c(0x808)](_0x44582c(0x2b7)+_0x5a1525(_0x1d9782[_0x44582c(0x721)],_0x3edb9e[_0x44582c(0x320)]+'\x20type'+(_0x3edb9e[_0x44582c(0x320)]!==0x1?'s':'')+_0x44582c(0x463)+_0x22ca99));for(const _0x415bc3 of _0x3edb9e){const _0x4b7df6=_0x1ae6bd['typeSubDbs']['get'](_0x415bc3),_0xe1ef9b=_0x4b7df6?.[_0x44582c(0x524)]?.[_0x44582c(0x46e)]?.()??0x0,_0x21dad2=_0x5a1525(_0x1d9782[_0x44582c(0x691)]+_0x1d9782[_0x44582c(0x246)],_0x415bc3[_0x44582c(0x466)](0x1c));console[_0x44582c(0x808)](_0x44582c(0x870)+_0x21dad2+'\x20\x20'+_0x5a1525(_0x1d9782[_0x44582c(0x1fa)],String(_0xe1ef9b)[_0x44582c(0x70f)](0x6))+'\x20'+_0x5a1525(_0x1d9782['dim'],'records'));}console[_0x44582c(0x808)]('');}catch(_0x1e88c2){console['error'](_0x5a1525(_0x1d9782[_0x44582c(0x1e4)],'\x0a\x20\x20'+_0x1e88c2['message']+'\x0a'));}return;}if(_0x548d52==='ROUTES'){_0x5b7c57(_0x2462df,_0x1da048['slice'](0x1)[_0x44582c(0x3c7)]('\x20'));return;}if(_0x548d52==='LOGS'){const _0x1e0201=(_0x1da048[0x1]??'')[_0x44582c(0x564)]();if(!_0x1e0201||_0x1e0201==='on')_0x58ff8d['enabled']=!![],_0x58ff8d[_0x44582c(0x395)]=_0x44582c(0x510),console['log'](_0x44582c(0x2b7)+_0x5a1525(_0x1d9782[_0x44582c(0x277)],'✓')+_0x44582c(0x1de)+_0x5a1525(_0x1d9782[_0x44582c(0x721)],_0x44582c(0x7c2))+'\x0a');else{if(_0x1e0201==='off')_0x58ff8d['enabled']=![],console[_0x44582c(0x808)](_0x44582c(0x2b7)+_0x5a1525(_0x1d9782['yellow'],'○')+_0x44582c(0x6e3));else _0x119cdc[_0x1e0201]!==undefined?(_0x58ff8d[_0x44582c(0x195)]=!![],_0x58ff8d[_0x44582c(0x395)]=_0x1e0201,console[_0x44582c(0x808)](_0x44582c(0x2b7)+_0x5a1525(_0x1d9782[_0x44582c(0x277)],'✓')+_0x44582c(0x30e)+_0x5a1525(_0x1d9782[_0x44582c(0x691)],_0x1e0201)+'\x0a')):console[_0x44582c(0x4dd)](_0x5a1525(_0x1d9782['red'],_0x44582c(0x3f4)));}return;}if(_0x548d52===_0x44582c(0x563)||_0x548d52===_0x44582c(0x816)){await _0x1952f4(_0x2462df,0x0);return;}if(_0x548d52===_0x44582c(0x382)){const _0x658179=_0x44582c(0x669)+_0x20138c[_0x44582c(0x61f)]+_0x44582c(0x44d),_0x553bf5=process[_0x44582c(0x520)]===_0x44582c(0x5bf)?_0x44582c(0x478)+_0x658179:process[_0x44582c(0x520)]===_0x44582c(0x817)?_0x44582c(0x6d8)+_0x658179:_0x44582c(0x430)+_0x658179;require$$4[_0x44582c(0x363)](_0x553bf5),console[_0x44582c(0x808)]('\x0a\x20\x20'+_0x5a1525(_0x1d9782[_0x44582c(0x277)],'✓')+_0x44582c(0x370)+_0x5a1525(_0x1d9782['cyan'],_0x658179)+'\x0a');return;}let _0x403344,_0x361082,_0x1bc743;if(_0x5cb406[_0x44582c(0x514)](_0x548d52)){_0x403344=_0x548d52,_0x361082=_0x1da048[0x1],_0x1bc743=_0x1da048[_0x44582c(0x747)](0x2);if(!_0x361082){console[_0x44582c(0x4dd)](_0x5a1525(_0x1d9782[_0x44582c(0x1e4)],_0x44582c(0x39a)+_0xd0629b+_0x44582c(0x345)));return;}}else _0x403344=null,_0x361082=_0x1da048[0x0],_0x1bc743=_0x1da048[_0x44582c(0x747)](0x1);const _0x70539c=_0x151df4['env']??_0x442712['env'],_0x22fe1d=_0x5df2ef(_0x361082,_0x70539c);if(_0x151df4[_0x44582c(0x225)]){_0x41c3c0(_0x2462df,_0x22fe1d);return;}let _0x344ceb=null;if(_0x1bc743[_0x44582c(0x320)]){const _0x4a8872=_0x1bc743['join']('\x20');try{_0x344ceb=_0x192aa1(_0x4a8872);}catch(_0x263b50){console[_0x44582c(0x4dd)](_0x5a1525(_0x1d9782[_0x44582c(0x1e4)],_0x44582c(0x572)+_0x4a8872+_0x44582c(0x2b7)+_0x5a1525(_0x1d9782[_0x44582c(0x721)],_0x263b50[_0x44582c(0x258)])+'\x0a'));return;}}if(!_0x403344)_0x403344=_0x344ceb!==null?'POST':_0x44582c(0x1fc);try{const _0x40c19e=await _0x51d6ed(_0x2462df,_0x403344,_0x22fe1d,_0x344ceb);_0x125bb2(_0x40c19e[_0x44582c(0x269)],_0x40c19e[_0x44582c(0x427)]);}catch(_0x2cdd8f){console[_0x44582c(0x4dd)]('\x0a\x20\x20'+_0x5a1525(_0x1d9782[_0x44582c(0x1e4)],'✗')+'\x20'+_0x2cdd8f['message']+'\x0a');}}class _0x494067{constructor(){const _0x1a5cdf=_0x8a80b6;this[_0x1a5cdf(0x84a)]=new Map(),this[_0x1a5cdf(0x529)]=null,this[_0x1a5cdf(0x761)]=![];}}function _0x281713(_0x1b47c9){const _0x39f8fb=_0x8a80b6,_0x5364af=new _0x494067();for(const _0x134473 of _0x1b47c9){if(_0x134473[_0x39f8fb(0x338)]?.['hidden'])continue;const _0x57196b=_0x134473[_0x39f8fb(0x73c)]['replace'](/^\/api/,'')[_0x39f8fb(0x4c2)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x39f8fb(0x4c2)](/^\//,'');if(!_0x57196b)continue;let _0x34d652=_0x5364af;for(const _0x132fd8 of _0x57196b[_0x39f8fb(0x5fa)]('/')['filter'](Boolean)){if(_0x132fd8[_0x39f8fb(0x32e)](':')){const _0x227db4=_0x132fd8[_0x39f8fb(0x747)](0x1);if(!_0x34d652['dynamic'])_0x34d652['dynamic']={'param':_0x227db4,'node':new _0x494067()};_0x34d652=_0x34d652[_0x39f8fb(0x529)]['node'];}else{if(!_0x34d652[_0x39f8fb(0x84a)][_0x39f8fb(0x514)](_0x132fd8))_0x34d652['children']['set'](_0x132fd8,new _0x494067());_0x34d652=_0x34d652[_0x39f8fb(0x84a)][_0x39f8fb(0x5f1)](_0x132fd8);}}_0x34d652['terminal']=!![];}return _0x5364af;}const _0x50016b=new Map();function _0x53e99b(_0x3fbcc8,_0xef5982,_0x459bdd){const _0x4de202=_0x8a80b6,_0x4e719f=_0x50016b[_0x4de202(0x5f1)](_0x3fbcc8);if(_0x4e719f&&_0x4e719f[_0x4de202(0x7fe)]>Date[_0x4de202(0x562)]())return _0x4e719f[_0x4de202(0x787)];const _0x4aeb88=_0x459bdd();return _0x50016b[_0x4de202(0x4a3)](_0x3fbcc8,{'val':_0x4aeb88,'exp':Date[_0x4de202(0x562)]()+_0xef5982}),_0x4aeb88;}function _0x6ebf52(_0x14feed,_0x2e8975,_0x351358,_0x49e031){const _0x5ebe9b=_0x8a80b6,_0x49cc41=_0x2e8975[_0x5ebe9b(0x684)]??_0x49e031[_0x5ebe9b(0x684)];switch(_0x14feed){case _0x5ebe9b(0x684):return[..._0x351358['_envs'][_0x5ebe9b(0x367)]()][_0x5ebe9b(0x626)](_0x480d21=>!_0x480d21[_0x5ebe9b(0x32e)]('~'));case _0x5ebe9b(0x51d):return _0x53e99b(_0x5ebe9b(0x426)+_0x49cc41,0x7d0,()=>{const _0x1e01b9=_0x5ebe9b;try{return[..._0x351358[_0x1e01b9(0x684)](_0x49cc41)[_0x1e01b9(0x1ac)][_0x1e01b9(0x367)]()][_0x1e01b9(0x626)](_0xb7021c=>!_0xb7021c['startsWith']('~'));}catch{return[];}});case _0x5ebe9b(0x4e2):if(!_0x2e8975['type'])return[];return _0x53e99b('keys:'+_0x49cc41+':'+_0x2e8975[_0x5ebe9b(0x51d)],0x5dc,()=>{const _0x3c1452=_0x5ebe9b;try{const _0x414bce=_0x351358[_0x3c1452(0x684)](_0x49cc41)['typeSubDbs']['get'](_0x2e8975['type']);if(!_0x414bce?.[_0x3c1452(0x524)])return[];const _0x5bacb1=[];for(const {key:_0x32dc9e}of _0x414bce[_0x3c1452(0x524)][_0x3c1452(0x482)]({'limit':0x32})){_0x5bacb1[_0x3c1452(0x677)](String(_0x32dc9e));if(_0x5bacb1['length']>=0x32)break;}return _0x5bacb1;}catch{return[];}});case _0x5ebe9b(0x3cb):if(!_0x2e8975[_0x5ebe9b(0x51d)])return[];return _0x53e99b(_0x5ebe9b(0x3b0)+_0x49cc41+':'+_0x2e8975[_0x5ebe9b(0x51d)],0x7d0,()=>{const _0x480f79=_0x5ebe9b;try{const _0x52f28e=_0x351358[_0x480f79(0x684)](_0x49cc41)[_0x480f79(0x1ac)][_0x480f79(0x5f1)](_0x2e8975[_0x480f79(0x51d)]);return _0x52f28e?[..._0x52f28e['indexToDb']?.[_0x480f79(0x367)]()??[]]:[];}catch{return[];}});case _0x5ebe9b(0x457):if(!_0x2e8975[_0x5ebe9b(0x51d)])return[];return _0x53e99b(_0x5ebe9b(0x1f4)+_0x49cc41+':'+_0x2e8975[_0x5ebe9b(0x51d)],0x7d0,()=>{const _0x112cc1=_0x5ebe9b;try{return _0x351358[_0x112cc1(0x1fd)]?.[_0x112cc1(0x3ce)]?.(_0x2e8975[_0x112cc1(0x51d)],_0x351358[_0x112cc1(0x684)](_0x49cc41))?.['map'](_0x771789=>_0x771789['name'])??[];}catch{return[];}});default:return[];}}function _0x13f9a1(_0x11f7b5,_0x1ea74c,_0x1fc75e,_0x1b80b4){const _0x4c6fd1=_0x8a80b6,_0x5090ad=_0x11f7b5[_0x4c6fd1(0x84d)]('/'),_0x309b1f=_0x11f7b5['split']('/'),_0x3b6121=_0x5090ad?_0x309b1f['slice'](0x0,-0x1):_0x309b1f[_0x4c6fd1(0x747)](0x0,-0x1),_0x2a939d=_0x5090ad?'':_0x309b1f[_0x309b1f[_0x4c6fd1(0x320)]-0x1];let _0x3313ad=_0x1ea74c;const _0x4202a4={};for(const _0x5462f4 of _0x3b6121){if(!_0x5462f4)continue;if(_0x3313ad['children'][_0x4c6fd1(0x514)](_0x5462f4))_0x3313ad=_0x3313ad[_0x4c6fd1(0x84a)][_0x4c6fd1(0x5f1)](_0x5462f4);else{if(_0x3313ad[_0x4c6fd1(0x529)])_0x4202a4[_0x3313ad[_0x4c6fd1(0x529)]['param']]=_0x5462f4,_0x3313ad=_0x3313ad[_0x4c6fd1(0x529)]['node'];else return[];}}const _0x4bb77b=_0x3b6121[_0x4c6fd1(0x626)](Boolean),_0x192c68=_0x4bb77b['length']?_0x4bb77b[_0x4c6fd1(0x3c7)]('/')+'/':'',_0x4d2889=[];for(const [_0x17f558]of _0x3313ad[_0x4c6fd1(0x84a)]){if(_0x17f558[_0x4c6fd1(0x32e)](_0x2a939d))_0x4d2889[_0x4c6fd1(0x677)](_0x192c68+_0x17f558);}if(_0x3313ad[_0x4c6fd1(0x529)])for(const _0x4ad7d4 of _0x6ebf52(_0x3313ad[_0x4c6fd1(0x529)][_0x4c6fd1(0x5fe)],_0x4202a4,_0x1fc75e,_0x1b80b4)){if(String(_0x4ad7d4)['startsWith'](_0x2a939d))_0x4d2889[_0x4c6fd1(0x677)](_0x192c68+_0x4ad7d4);}return _0x4d2889[_0x4c6fd1(0x747)](0x0,0x64);}const _0x25b301=['help',_0x8a80b6(0x43c),_0x8a80b6(0x684),'envs',_0x8a80b6(0x303),_0x8a80b6(0x871),_0x8a80b6(0x6a4),_0x8a80b6(0x241),_0x8a80b6(0x532),_0x8a80b6(0x32f)];function _0xfbe83c(_0x49a619,_0x591526,_0x4c1505){return function _0x58c218(_0x4483c7){const _0x3144c8=_0x438e;try{const _0x47307d=_0x4483c7['search'](/\s[{[]/),_0x1d1e95=_0x47307d>=0x0?_0x4483c7[_0x3144c8(0x747)](0x0,_0x47307d):_0x4483c7,_0x418153=_0x1d1e95[_0x3144c8(0x210)]();if(!_0x418153){const _0x522e89=[..._0x25b301,...[..._0x49a619[_0x3144c8(0x84a)]['keys']()]][_0x3144c8(0x747)](0x0,0x64);return[_0x522e89,''];}const _0x5dcd50=_0x418153[_0x3144c8(0x5fa)](/\s+/),_0x230cde=_0x5dcd50[0x0],_0x3e7640=_0x230cde[_0x3144c8(0x19b)]();if(_0x5dcd50[_0x3144c8(0x320)]===0x1){const _0x1136bc=_0x230cde[_0x3144c8(0x564)](),_0x2db051=_0x25b301['filter'](_0x3db2f0=>_0x3db2f0['startsWith'](_0x1136bc)),_0x34ee0a=_0x13f9a1(_0x230cde,_0x49a619,_0x591526,_0x4c1505),_0x4e41e4=[...new Set([..._0x2db051,..._0x34ee0a])][_0x3144c8(0x747)](0x0,0x64);return[_0x4e41e4,_0x230cde];}if(_0x5cb406[_0x3144c8(0x514)](_0x3e7640)&&_0x5dcd50[_0x3144c8(0x320)]===0x2){const _0x51c02c=_0x5dcd50[0x1],_0x3599a7=_0x13f9a1(_0x51c02c,_0x49a619,_0x591526,_0x4c1505);return[_0x3599a7[_0x3144c8(0x800)](_0x50e591=>_0x230cde+'\x20'+_0x50e591),_0x230cde+'\x20'+_0x51c02c];}if(!_0x5cb406[_0x3144c8(0x514)](_0x3e7640)&&_0x5dcd50[_0x3144c8(0x320)]>0x1){const _0x47d087=_0x13f9a1(_0x230cde,_0x49a619,_0x591526,_0x4c1505),_0x42c646='\x20'+_0x5dcd50['slice'](0x1)['join']('\x20');return[_0x47d087['map'](_0x59afa5=>_0x59afa5+_0x42c646),_0x230cde+_0x42c646];}return[[],_0x4483c7];}catch{return[[],_0x4483c7];}};}async function _0x10586c(_0x540d16,_0x1195ab){const _0x1421da=_0x8a80b6,_0x377eed={'enabled':!![],'level':_0x1195ab[_0x1421da(0x44f)]??'info'},_0xb54e26={'env':_0x1421da(0x3a1)},_0x157104={'current':null},_0x41b962=_0x281713(_0x540d16[_0x1421da(0x2b8)][_0x1421da(0x4a5)]()),_0x536307=_0xfbe83c(_0x41b962,_0x540d16,_0xb54e26);_0x540d16[_0x1421da(0x808)][_0x1421da(0x391)](_0x405a1d=>{const _0x5bad25=_0x1421da;if(!_0x377eed[_0x5bad25(0x195)])return;_0x18d1e4(_0x405a1d,_0x377eed[_0x5bad25(0x395)]),_0x157104['current']?.['prompt'](!![]);}),_0x3adeb0(_0x540d16,_0x1195ab);const _0x49c585=_0x256559['createInterface']({'input':process[_0x1421da(0x497)],'output':process['stdout'],'terminal':!![],'completer':_0x536307,'prompt':_0x2a7bb3(_0xb54e26),'historySize':_0x515fa9});try{const _0x33bf22=_0x19536c[_0x1421da(0x295)](_0x1bdee1,_0x1421da(0x3cc))['split']('\x0a')[_0x1421da(0x626)](Boolean);_0x49c585[_0x1421da(0x1a5)]=_0x33bf22['reverse']()[_0x1421da(0x747)](0x0,_0x515fa9);}catch{}_0x157104[_0x1421da(0x5f6)]=_0x49c585,_0x49c585['on'](_0x1421da(0x81a),async _0x27aadb=>{const _0x3db84b=_0x1421da;_0x49c585[_0x3db84b(0x5b5)]();try{await _0x270a72(_0x27aadb,_0x540d16,_0x1195ab,_0x377eed,_0xb54e26,_0x49c585);}catch(_0x5e837c){console['error'](_0x5a1525(_0x1d9782[_0x3db84b(0x1e4)],_0x3db84b(0x853)+_0x5e837c[_0x3db84b(0x258)]));}finally{_0x49c585[_0x3db84b(0x28e)](),_0x49c585[_0x3db84b(0x3d4)]();}}),_0x49c585['on'](_0x1421da(0x419),()=>{const _0x3669e5=_0x1421da;try{const _0x4e3467=[..._0x49c585[_0x3669e5(0x1a5)]]['reverse']()[_0x3669e5(0x626)](Boolean)[_0x3669e5(0x747)](0x0,_0x515fa9);_0x19536c[_0x3669e5(0x4d1)](_0x1bdee1,_0x4e3467[_0x3669e5(0x3c7)]('\x0a')+'\x0a');}catch{}_0x1952f4(_0x540d16,0x0);});let _0x4ab54c=0x0;return process['on'](_0x1421da(0x486),()=>{const _0x3f590d=_0x1421da;if(_0x251310)return _0x1952f4(_0x540d16,0x82,_0x3f590d(0x486));if(_0x49c585['line']==='')return _0x1952f4(_0x540d16,0x0,_0x3f590d(0x486));const _0x20a91b=Date[_0x3f590d(0x562)]();if(_0x20a91b-_0x4ab54c<0x5dc)return _0x1952f4(_0x540d16,0x0,_0x3f590d(0x29f));_0x4ab54c=_0x20a91b,process[_0x3f590d(0x4a1)]['write']('\x0a'),_0x49c585[_0x3f590d(0x228)](0x0),_0x49c585[_0x3f590d(0x3d4)](),process['stderr']['write'](_0x5a1525(_0x1d9782[_0x3f590d(0x721)],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on'](_0x1421da(0x244),()=>_0x1952f4(_0x540d16,0x0,_0x1421da(0x244))),process['on'](_0x1421da(0x5c7),()=>_0x1952f4(_0x540d16,0x0,_0x1421da(0x5c7))),_0x49c585['prompt'](),_0x49c585;}return okdbShell={'start':_0x10586c,'colorLog':_0x18d1e4,'lenientParse':_0x192aa1,'_splitLine':_0x3dcee1,'_formatRouteHelpLines':_0x227d75,'_routeSummary':_0x24986d,'_routeTags':_0x322dd4},okdbShell;}function _0x5343(){const _0x1652a3=['\x22\x20—\x20choose\x20a\x20directory\x20outside\x20it','LENGTH_REQUIRED','readUInt16BE','[okdb]\x20close\x20error:\x20','\x20\x20(licensee:\x20','_lastTick','ESRCH','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','(unset)','heldBy','Execute\x20functions\x20over\x20HTTP/MCP/shell.','SERVICE_UNAVAILABLE','code','indexes','migrate','\x20\x20(','Invalid\x20license\x20blob:\x20','\x20\x20✓\x20~blobs\x20\x20(','types\x20--env\x20staging','readlinkSync','_normalizeOAuthAuthResult','recheck','dropSchema','_onPoke','\x20\x20\x20\x20\x20\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','rawResponse','val','event:\x20','_envs','attached','SWAP','_copyDir','license:removed','[okdb]\x20imported\x20\x20types=','methods','\x22:\x20','Engines','Sync','CREATED','--log-level','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','Blob\x20file\x20missing\x20for\x20~files\x20record\x20\x22','\x20/\x20','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','att','[okdb]\x20cluster\x20close\x20error:\x20','licenseHash','round','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','\x20\x20\x20\x20addedAt:\x20\x20\x20','cpSync','ingest','registerFts','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','time-machine','cf-connecting-ip','\x22\x20(hash:\x20','shm-gc:\x20unknown\x20argument\x20','okdb-license-id:','safety','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','9Nqpxmm','[okdb]\x20error:\x20failed\x20to\x20read\x20','LICENSED_BUILD','_heartbeatInFlight','type:drop','authenticateToken','--ttl','\x0a===\x20OKDB_DIAG\x20','Release','\x20result','scrypt','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','List\x20environments\x20and\x20read\x20environment\x20info.','_isOpen','_buildOwnRow','\x0d[okdb]\x20','withPoolHold','_adoptPeerIndexes','\x22\x20matches\x20','sync-node','env/','unknown','homedir','level:\x20info','(empty)','input:\x20','__okdbSlot','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','grants','treeView','transaction','\x20environment\x20','remaining-fields','\x22\x20has\x20been\x20retiring\x20for\x20','tokenUrl','host','_blobsDir','[okdb-cluster]\x20','array','busy','_onProcEvent','stderr','http-server','targetType','inst:','UNIQUE_CONSTRAINT','3660176fsHVyo','_publishNow','_enqueuedAt','parseInt','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','holder','disconnect','access-control-allow-credentials','isWanted','CONFLICT','hasType','servers','\x0a\x20\x20\x20\x20\x20\x20','okdb.pid','\x20\x20\x20\x20expires:\x20\x20\x20','_resolveOrCreateEnv','dryRun','\x20MB)','dropping','oldestPendingMs','stopping','_desired','requests',':\x20mapped\x20','decodeLicenseBlob','rss','backup\x20destination\x20\x22','Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.','stopped','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20writes:\x20\x20\x20\x20','STATUS','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','BACKUP_MANIFEST','ACTIVATION_EXPIRED','index:registered','ITEM_REMOVE','exp','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','map','setOwnMeta','\x20has\x20ambiguous\x20query/path\x20field:\x20','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','toISOString','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','blocks','function','log','payload-or-self','ready','listNodes','--port','spki','Token\x20must\x20be\x20a\x20JWT','Events','\x20phase=','matcher','groups','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','hash','header','QUIT','darwin','exports','_userRouteCount','line','digest','\x20writes\x20(','\x20\x20(+\x20time-machine)','_admissionTimer','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','\x20process','typesDb','references','{}[]:,\x0a\x0d\x09\x20','last-event-id','\x20===','race','ttl','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','fanout','_maybePublish','OKDBAlreadyExistsError','JWT\x20expired','decommission','_cursors','selfKey','importFromFile','bus:proc','isWorker','export:\x20stream\x20closed\x20before\x20drain','\x20\x20\x20\x20path:\x20\x20',';\x20HttpOnly','_ensure','update','decoded','is\x20not\x20allowed','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','Origin','uptime','startHeartbeat','participate','(on\x20any\x20path\x20command)','okdb-http-worker-child.js','allocUnsafe','equals','FEATURES','examples','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','uuid','indexType','backupRoot','responseStatuses','children','MALFORMED_TOKEN','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','endsWith','sync','_rawDb','processor:error','embedded','createHmac','\x20\x20Error:\x20','\x20\x20\x20\x20licensee:\x20\x20','ref:violation_resolved','updatedAt','Lax','features','origin','[body]','\x20ipc\x20error:\x20','~processes','http://','toUTCString','NOT_FOUND','additionalProperties','created','querySchema','type/users/item/alice','maps','getPins','listening','(?:/(.*))?$','find','system:poke','SIG_INVALID','white','ttlMs','LICENSEE','transactionSync','\x20(deleted)','\x20\x20\x20\x20','routes','FTS_DROP','ppid','config','export','never','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','(worst\x20','_draining','/dev/shm','readUInt32BE','[okdb]\x20exporting\x20blobs…','isActive','expiry','[okdb]\x20invalid\x20','subject','version','createLoginState','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','expired','readUInt8','files\x20feature\x20not\x20available','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','dropIndex','_hbTimer','\x20\x20\x20\x20\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/','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','_jwksNegativeCache','Read','HEAD','clusterWorkers','label','392193XwsrfC','POST','_totalErrors','index:ready','\x20\x20scanned\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','importFromStream','List\x20functions\x20and\x20inspect\x20their\x20source.','\x20\x20not\x20okdb-shaped\x20\x20\x20\x20','Foreign\x20key\x20violation:\x20','bindings','Index\x20\x22','hdr','[okdb]\x20import\x20complete','\x20cf-ray=','drain','derivePin','EADDRINUSE','LICENSE_ACTIVATION_INVALID','must\x20not\x20be\x20null','_kind','cookie','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','received\x20','items','OKDBForeignKeyError','versions','\x22\x20resolves\x20outside\x20the\x20backup\x20root\x20\x22','quarantined:\x20','Create,\x20delete,\x20and\x20compact\x20environments.','segmentNameFor:\x20canonicalPath\x20must\x20be\x20a\x20non-empty\x20string','_seen','shm-gc','\x20while\x20this\x20process\x20runs\x20','licensed','maxMs','processors','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','setHeader','UNPROCESSABLE_ENTITY','free\x20tier','enabled','resetIndex','VALIDATION_ERROR','null','_versionSkewWarned','CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20','toUpperCase','then','doctor','some','deregisterSelf','rows=','__writeCounter','SYNC_COMMITS','exportJSON','value','history','\x20has\x20illegal\x20binding\x20target\x20for\x20','FTS_RESET','\x0a\x20\x20✓\x20Token\x20created','INDEX_NOT_REGISTERED','existsSync','_dispatch','typeSubDbs','type:registered','system','_bucketIdx','\x20files)','reload','hasOwnProperty','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','available','\x20\x20✓\x20Revoked\x20token\x20','name','ENOENT','[okdb]\x20created\x20./okdb-data','_ownMeta','matched','(none)','./okdb-data','username','authorization_endpoint','description','uncaughtException','closing','result','from','properties','_flushDebounce','~processes:desired','getDesired','getProcess','singletonClaims','JWT\x20signature\x20verification\x20failed','UNSUPPORTED_MEDIA_TYPE','listLicenses','Forbidden\x20—\x20no\x20permissions\x20available','[okdb-cluster]\x20worker\x20pid=','confirm','sse','appendFileSync','instanceId','_matchRoute','OKDBUniqueConstraintError','internalOnly','BAD_GATEWAY','_nestedTotal','\x1b[0m','params','precision','LICENSE_HASH_MISMATCH','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','statSync','\x20logs\x20on\x20\x20','hashed','child_process','authenticateRequest','\x0a\x20\x20\x20\x20','node:perf_hooks','red','timeMachine','uid','failed\x20to\x20open','--env\x20<name>','shmbuf','tokenSecret','_pendingLocal','cpuWindowMs','addLicense','drop','ftsIndexes','txn:start','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','extend','database\x20path\x20not\x20writable:\x20','fts:','--help','shm-gc:\x20cannot\x20read\x20the\x20memory\x20maps\x20of\x20','processor:resumed','expiresAt','ver','magenta','--env','GET','fts','raw','EXPIRES','NOT_IMPLEMENTED','decommissioning','exportToStream','\x20bytes,\x20need\x20>=\x2065)','--force','_getOidcDiscovery','\x20is\x20inside\x20the\x20backup\x20','_pending','3245mnMBZv','off','events','process\x20','~blobs','_heldTotal','898176ceoFff','INVALID_INDEX_KEY','trimStart','clearThreadStats','bus:poke','addedAt','okdb-writer:\x20env\x20closing\x20—\x20retry','\x22.\x20Use:\x20create,\x20list,\x20revoke','isDirectory','allowedAlgs','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','test','sort','[okdb]\x20http\x20workers:\x20','audience','VERB','OKDBSchemaCollectionError','statusCode','\x20deleted','standalone','toLocaleString','handler','signingInput','help','permissions','changes','clearLine','_held','isArray','View\x20peer\x20status\x20and\x20replication\x20stats.','HTTP_CLUSTER_REMOVED','USE','readInt32LE','PERMISSIONS','entry','compact','response','\x20worker\x20slot=','.okdb-write-test','licenseType','\x20\x20\x20\x20port:\x20\x20','api','\x20is\x20not\x20a\x20complete\x20okdb\x20backup\x20(no\x20','markClosed','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','issueToken','flatMap','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','[okdb]\x20started\x20in\x20','MiB','/api/env/','open','pid','[env]','SIGTERM','_supervisorKey','cyan','randomBytes','forEach','3678fWyhFN','\x20\x20\x20\x20status:\x20\x20\x20\x20','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','shell','sourceKey','readMs','put','authorizationUrl','argv','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','importJSON','--inspect','basename','\x1b[36m','message','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','hidden','Write','[okdb]\x20created\x20.kdbconfig','_rootDb',';\x20SameSite=','types/env=','all','onWindow','Processors','operations','--name','Cannot\x20set\x20enforce\x20schema\x20on\x20','_scheduleFlush','resetting','repeat','status','ceil','Environments','sandbox','openDB','\x1b[1m','inputSchema','waiting','\x20\x20✓\x20Removed\x20license\x20','regex','\x20allocated','tryAcquire','noCluster','_wantDb','green','Usage:\x20okdb\x20shm-gc\x20[--dry-run]\x20[--prefix\x20<p>]\x20[--any-size]\x20[--force]\x20[--verbose]\x0a\x0aDelete\x20okdb\x20shared-memory\x20segments\x20in\x20/dev/shm\x20that\x20no\x20live\x20process\x20maps\x20or\x20holds\x20open\x0a(older\x20okdb\x20versions\x20never\x20unlinked\x20them).\x20Recognises\x20both\x20the\x20current\x20hashed\x20names\x0a(<path>-<hash>)\x20and\x20the\x20bare-path\x20names\x20of\x20okdb\x20<=\x202.4.0.\x20Linux\x20only.\x0a\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20report\x20what\x20would\x20be\x20deleted,\x20delete\x20nothing\x0a\x20\x20--prefix\x20<p>\x20\x20\x20\x20only\x20names\x20starting\x20with\x20<p>\x20(default\x20\x22-tmp-\x22:\x20stores\x20under\x20/tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22\x22\x20=\x20every\x20okdb-shaped\x20name)\x0a\x20\x20--any-size\x20\x20\x20\x20\x20\x20don\x27t\x20require\x20an\x20okdb\x20segment\x20size\x0a\x20\x20--force\x20\x20\x20\x20\x20\x20\x20\x20\x20delete\x20even\x20if\x20some\x20same-user\x20process\x27s\x20maps\x20could\x20not\x20be\x20read\x0a\x20\x20--verbose,\x20-v\x20\x20\x20print\x20every\x20kept\x20segment\x20and\x20why','consumeLoginState','unref','liveThreadStats','\x20\x20✓\x20','Bearer\x20','Payload\x20too\x20large','lstatSync','\x20worker','__vocab/version','auth','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','noRepl','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','firstTs','setPrompt','claimGated','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','lost','ftruncateSync','library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20',')\x20exited\x20','resume','fetch','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','_startHeartbeat','debug','x-forwarded-for','item:pending','readFileSync','_shouldWrapResponse','invalid','PAYLOAD_TOO_LARGE','removeSupervisedChild','views','tokenizer','deleted','--no-repl','ensureType','SIGINT\x20(double-tap)','\x20(must\x20be\x20true\x20or\x20false)','_isClusterController','bytes','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','scopes','\x20file','discoveryTtlMs','cluster','writes','compareExchange','NAME','system:ready','HTTP\x20','jwk','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','\x20\x20(no\x20env\x20draining)','\x27\x20doesn\x27t\x20exist','forceAfterMs','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','--blobs','index:progress','PUB_FINGERPRINT','Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.','\x0a\x20\x20','http','\x20\x20records=','--eval','putNode','allSettled','view:progress','toString','_markSeen','parkedNow','primaryOkdb','raw-remove','\x1b[90m','BACKUP_DEST_NOT_EMPTY','credentials','connection','http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them','mcp-session-id','main','reason','-tmp-','ENV','bus:type_drop','[okdb]\x20preserved:\x20','\x20does\x20not\x20exist','_coordinator','tokenTtl','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20http://localhost:','_lastCpuPct','unclaimed','Feature\x20not\x20licensed:\x20','_statusEnv','Validation\x20failed:\x20','_fetchJwks','Validation\x20failed','TYPE_ALREADY_REGISTERED','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','candidatesLegacyNamed','item:create','effective','ttl:set','keep-alive','pathname','\x20is\x20not\x20empty\x20—\x20restore\x20only\x20into\x20a\x20new\x20or\x20empty\x20directory','none','import','clear','decommissioned','HTTP_',';\x20Path=','registry\x20heartbeat\x20skipped\x20(writer=','procmode/','_assertUsable','FOREIGN_KEY_VIOLATION','licenses','middlewares','publishChildRow',');\x20','socket','config\x20file\x20valid:\x20','syncPeers','\x20(slot=','password','sub','[okdb]\x20closed\x20cleanly\x0a','BACKUP_DEST_INSIDE_STORE','geo','beforeWrite','_oidcDiscoveryCache','cpuUsage','attachFeed','runtimeProcessesView','verifySignature','types','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','env/staging/info','tokenType','worker','readSync','slotKey','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x0a[okdb]\x20fatal\x20error:','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20\x20\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','\x20log\x20level:\x20','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','details','Forbidden\x20—\x20requires\x20','Activation\x20invalid:\x20','--expose-gc','\x20\x20unused\x20(deletable)\x20','_rotateBucket','disable','prefix','\x20\x20All\x20checks\x20passed.\x0a','shmbufNative','halted','Views','writeMs','_windowCbs','isBuffer','outputSchema','length','type/users\x20--help','segmentNameFor:\x20suffix\x20must\x20look\x20like\x20\x22_name\x22\x20(got\x20','remove','unlinked','_lastCpuUsage','\x0a\x0a\x20\x20','\x20\x20note:\x20','fstatSync','loop-lag\x20','_validateOperationRequest',',\x20stopping\x20workers…\x0a','_bpWaiters','INVALID_VALUE','startsWith','quit','unlinkSync','title','\x20\x20env=','unreadablePids','env:opened','OKDB_CODE_TO_HTTP_STATUS','_timer','May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.','meta','\x20size,\x20','activation','options','\x20\x20#','assertLimit','_quantum','_onPending','--token','call','_lockDbOf','/api/','acquiredAt','\x20<path>\x20[json-body]','Bearer\x20$1…','\x20died\x20','[okdb]\x20error:\x20','floor','~licenses','is\x20invalid','email','putSync','starting','\x20\x20\x20\x20features:\x20\x20','System','dest','ms\x0a','json','destroy','\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema','LICENSE_LIMIT_EXCEEDED','_cmd','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','error\x20','respawnTimer','noAdmin','CHANGEFEED_QUANTUM','store','reap','_activateProcesses','_drain','processor:progress','_committed','exec','req','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','namespace','keys','no-cache,\x20no-transform','_blobPath','slot','parseBearer','cookieName','OKDBInvalidValueError','state','TOO_MANY_REQUESTS','\x20opening\x20','_put','_flushTimer','skippedByProtocol','\x0a\x20\x20✓\x20License\x20activated','search:query','pop','resolve','threads','[okdb]\x20port\x20','\x20(+','http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20',',\x20got\x20','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','PUT','_sync','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','<path>','OPEN','__identity','SHM_SEGMENT_RETIRING','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','_totalWrites','_countFileRefs','_outstanding','--new-identity','_isWriter','candidateAllocated','SYSTEM_POKE','1867355nJrlzE','system:clock_change','-backups','must\x20be\x20','attach','_putRowAsync','node\x20','~system','level','--any-size','kill','queue','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','\x20\x20Usage:\x20','1620216uErfox','\x1b[34m','records','BACKUP_PATH_OUTSIDE_ROOT','isFinite','createReadStream','default','clock','integer','clusterStatusView','index:reset','[req]\x20','ITEM_PENDING','_started','quantum','schema:set','PATCH','hint','paused','\x20worker(s)\x20remaining','opendirSync','idx:','\x20\x20score:','index:drop','schema','--path','cookies','user','candidates','\x0a[okdb]\x20error:\x20','getChanges','~files','\x22\x20is\x20inside\x20the\x20store\x20\x22','emit','startedAt','_lastCpuAt','x-okdb-raw-response','--changes','--test','removeSync','127.0.0.1','token_endpoint','fromEntries','--verbose','join','Peer','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','restore','index','utf8','registerType','list','[okdb]\x20reset:\x20','_buckets','mkdirSync','BAD_REQUEST','stopHeartbeat','prompt','outOfTree','[okdb]\x20opening\x20','[okdb]\x20loaded\x20config:\x20','ms\x20p99=','detectInputType','--workers','abs','notOkdbShaped','GONE','ttl:expired','_loginStates','ms\x20mean=','node','gate','count','authRequired','_dedupeKey','_highWater','_ensureDesired','\x20supervised)','\x20writer{depth=','Run','newIdentity','once','--password','/proc','\x20\x20\x20\x20\x20\x20','OKDBError','pathParams','next','licensee','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','_removeRowAsync','--grants','_dedupeMax','base64','\x20(must\x20be\x201–65535)','ENV_CLOSING_RETRY','indexOf','fields','cli','\x20license\x20—\x20no\x20activation\x20needed)','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','processingStatusView','load','config\x20http.workers','OPTIONS','blob\x20status\x20db\x20not\x20available','Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).','consecutiveFailures','writeUInt16BE','GiB','bootstrapBlocked','not\x20open','shift','parse','charCodeAt','_holderDead','dirname','FORBIDDEN','orphan','oauth','getCmd','Index\x20\x27','Query','Version\x20mismatch\x20for\x20','_role','close','resolveBackupDest','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','-----BEGIN\x20CERTIFICATE-----\x0a','hasCanonical','assertFeature','internal','backup','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','_totalWriteMs','Content-Type','Token\x20secret\x20not\x20configured','types:','body','_buildProcessingFacet','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','\x27:\x20','ms\x20max=','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','_instanceId','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','../okdb','xdg-open\x20','Examples','x-requested-with','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','threadId','clockToChangeDb','Forbidden','_bpParkedTotal','okdb-backup-','\x27,\x20cannot\x20map\x20to\x20\x27','application/json','_nodeDbCache','use',':\x20key\x20[','createEnvironment','method','id:\x20','readline','dir','nodeKey','metrics','_writer','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','sourcePath','PUBLIC_KEY_PEM','allowMethods','_license',':want','_clusterOnMessage','/admin/index.html','--version','logLevel','_wantDbOf','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','limits','[okdb]\x20export\x20complete','_startedAt','\x20\x20Envs:\x20\x20\x20\x20','max','ftsName','_singletonLock','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','\x20\x20✗\x20','_done','cpuPct','_isStale','flushDebounce','<json-body>','_allEnvsWithFiles','Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.','\x20\x20Expected\x20one\x20of:','\x20in\x20','_collectSingletonClaims','[okdb]\x20restoring\x20','padEnd','createWriteStream','statuses','_listTypes','rmSync','_runGuards','standard','\x20cf-ip=','getCount','getAuthOptions','end','query','blob','processes:\x20','force','_db','no\x20.kdbconfig\x20(using\x20defaults)','preferred_username','start\x20','stats','OKDBIndexHasConsumersError','setEncoding','default:\x20cores−1\x20=\x20','isAuthenticated','timingSafeEqual','_sockets','envsOpen','1205814gnJeoH','getRange','context','MAX_POOL_HOLDS','_systemEnv','SIGINT','peer','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','\x20\x20\x20\x20\x20\x20\x20','_refreshDesiredSnapshot','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','access:\x20','_rowKey','_log','--permissions','access','_getJwkKey','envs=','No\x20license\x20found\x20matching\x20this\x20activation\x20token','\x22\x20in\x20env\x20\x22','yellow','store\x20will\x20open\x20THAT\x20directory,\x20not\x20the\x20copy\x20in\x20','stdin','Schema\x20validation\x20failed\x20for\x20','_getType','_licenseHash','JWT\x20issuer\x20mismatch','access-control-request-headers','TiB','isDead','mode','writeUInt8','stdout','LICENSE_FEATURE_DISABLED','set','process','listRoutes','data:write','match','_putRowSync','_acquiredAt','inUse','Execute\x20full-text\x20and\x20vector\x20searches.','execArgv','type/','retiring','kid','delete','fn-runner','url','FTS_REGISTERED','INDEX_RESET','\x20\x20·\x20','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','\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','release','depth','decodeActivationToken','\x20\x20skipped:\x20','loadEnvFile','every','[okdb]\x20reset\x20aborted','unhandledRejection','PUT\x20type/users/item/x\x20{\x22n\x22:1}','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','replace','JWT\x20not\x20yet\x20valid','\x22\x20→\x20','BOOTSTRAP_LOCALHOST_ONLY','reset','OKDBIndexNotRegisteredError',',\x20closing…\x0a','okdb-writer[','_onStop','commit','files','envName','_caps','_adminRelay','processors/','writeFileSync','_processStartedAt','reads','online','\x20\x20(name:\x20','columns','\x20(expires\x20','License\x20signature\x20invalid:\x20','RS256','enable','primary','usage:\x20okdb\x20restore\x20<backup-dir>\x20--path\x20<target-data-dir>','error','writes=','shmbuf/package.json','VERSION_MISMATCH','\x20\x20\x20\x20limits:\x20\x20\x20\x20','key','reidentify','blindCommands','verbose','HELP','_readNDJSON','ITEM_CREATE','./okdb-export.ndjson','prototype','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','stop','ID\x20token\x20is\x20not\x20accepted','okdb.http.listen(port)\x20in\x20each\x20worker.','init','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Type\x20','_drainOne','\x20pid=','role','\x20worker(s)\x20still\x20serving','makeOkdb','closeIdleConnections','createServer','UNAUTHORIZED','issuedAt','warn','isHeld','active','x5c','time','external','closed','lifecycle','bodyMode','_lockDb','_clusterWorkerAttached','hostname','system:drain','.kdbconfig','nbf','revived','base64url','auth=','maxAge','queue/','\x20\x20skipped=','info','ms\x20env=','\x20\x20\x20\x20usage:\x20\x20\x20','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','has','read','_sampleOwnStats','copyFileSync','1ofN:','relative','foreignOwner',').\x20If\x20none\x20of\x20them\x20runs\x20okdb,\x20pass\x20--force;\x20','--print','type','/type/users\x0a\x20\x20\x20\x20','\x20\x20\x20\x20graceful\x20shutdown\x0a','platform','[okdb]\x20invalid\x20port:\x20','Invalid\x20primary\x20key\x20type:\x20','destroyed','data','okdb','enforce','headers','port\x20','dynamic','maxExtra','dbPath','.log','_startAdmission','Unknown\x20error','killable','INDEX_READY','runInNewContext','exit','--config','procmodeack/','\x20day(s).','_ensureTokensType','\x20@\x20','Schema\x20&\x20Indexes','concat','needsActivation','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','parts','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','blindPids','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','__OKDB_PUB_FINGERPRINT__','REMOVE','false','guard','maxBodyBytes','getClock','\x20\x20║','[okdb]\x20exporting\x20env\x20\x22','_migrateVocab','Functions','headers.','memoryUsage','noteListenAddr',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','field:resolver_registered','typesPerEnv','[okdb]\x20invalid\x20log\x20level:\x20\x22','[okdb]\x20backup\x20complete','reduce','sizeBefore','[okdb]\x20invalid\x20config\x20\x22','started','processor:ready','alloc','(no\x20types)','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','\x1b[33m','Not\x20Found','_inflight','inflightAgesMs','\x20\x20changes=','admin','\x20\x20other\x20owner\x20\x20\x20\x20\x20\x20\x20\x20','now','EXIT','toLowerCase','_bestMatch','TYPE_NOT_REGISTERED','\x1b[35m','_authOptions','size','JWT\x20is\x20missing\x20kid','--watch','__esModule','finally','revoke','[okdb]\x20cluster\x20supervisor\x20pid=','readdirSync','\x20\x20Writes:\x20\x20','\x0a\x20\x20Invalid\x20JSON:\x20','Protected\x20(gate)','processing',':\x20ping\x0a\x0a','Unique\x20constraint\x20violated\x20on\x20','tierList','clearTtl','_wantDbHandle','\x0a\x20\x20✓\x20License\x20added','clearCookie','randomUUID','pushEphemeral','\x20\x20+','processorsView','_heartbeatTimer','\x20\x20✓\x20marked\x20for\x20a\x20new\x20identity\x20—\x20the\x20first\x20open\x20gives\x20this\x20copy\x20its\x20own\x20node\x20id','\x20origin=','single','node\x20identity','--prefix','../','ENVS','system:env_release','(primary\x20=\x20processor)','segments\x20(','cpus','_onItem','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','dead','_lastPublishAt','copy','OKDBForeignKeyDeleteError','RSA-SHA256','token_use','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20backup:\x20LMDB\x20snapshot\x20copy\x20of\x20every\x20env\x20+\x20time-machine\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20history\x20+\x20file\x20blobs\x20into\x20a\x20NEW\x20dir\x20(default:\x20./okdb-backup);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20full-text\x20indexes\x20are\x20rebuilt\x20on\x20first\x20open,\x20not\x20copied\x0a\x20\x20\x20\x20restore\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Restore\x20a\x20backup\x20dir\x20into\x20--path\x20(must\x20not\x20exist\x20or\x20be\x20empty)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--new-identity\x20\x20\x20\x20bring\x20the\x20copy\x20up\x20as\x20a\x20NEW\x20node\x20(fresh\x20id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20no\x20sync\x20membership)\x20instead\x20of\x20replacing\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20the\x20original\x20—\x20see\x20docs/migration.md\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x20\x20\x20\x20shm-gc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20leaked\x20okdb\x20shared-memory\x20segments\x20no\x20process\x20uses\x20(Linux)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20report\x20only\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--prefix\x20<p>\x20\x20\x20\x20\x20\x20\x20only\x20names\x20starting\x20with\x20<p>\x20(default\x20\x22-tmp-\x22)\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a\x20\x20\x20\x20okdb\x20restore\x20./my-backup\x20--path\x20./okdb-data\x0a',')\x20→\x20','\x20\x20\x20\x20path:\x20\x20\x20\x20','fieldPath','root','\x22\x20(must\x20be\x20debug|info|warn|error)','INDEX_SET_CHANGED','required','tmp','processKey','\x22\x20on\x20\x22','access-control-max-age','signature','_totalRequests','type/users','maxWrites','unique:violation','shm-gc:\x20Linux\x20only\x20(POSIX\x20shared\x20memory\x20under\x20/dev/shm)','Files','(code=','_isReader','okdb_session','bumpCmd','identity','mean','seq','register','_listenAddr','\x20\x20errors\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Full-text\x20search','\x20named\x20by\x20okdb\x20≤\x202.4.0)','[okdb]\x20starting…\x0a','work','pause','unique','change','blobs','setSchema','cluster:','item:update','--label','entries','kind','win32','shmbuf.node','\x20for\x20system\x20env','_handlePoke','other','onLicenseExpired','schema:drop','hard-killed','SIGBREAK','kdb_admin_oauth_state','set-cookie','includes','No\x20tokens.','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','_publishFailWarned','/dev/shm/','toFixed','_groupByProcess','__fts:','node/','content-length','connected','data.mdb','\x20licenses','_enableChangelog','\x20sync','caps','\x20\x20\x20\x20id:\x20\x20\x20\x20','\x20→\x20POST\x20/api/env/','license:invalid','indexToDb','comm','listAll',';\x20Secure','\x20\x20[okdb]\x20','createHash','_runMiddlewares','_jwksCache','add','token','\x20\x20(need\x20≥\x2018)','formatListenAddr','.kdb_history','targetKey','_transactionOnce','\x0a\x20\x20No\x20routes\x20matching\x20\x22','\x20—\x20','_lastCpuWindowMs','otherwise\x20rerun\x20as\x20root.','heapUsed','get','\x20(dry\x20run)','__okdbCluster','_safeEnvDirName','\x20(other\x20users;\x20cannot\x20map\x200600\x20segments)','current','type/users/query\x20{\x22active\x22:true}','isInteger','_isFree','split','_desiredOverlay','operation','recent\x20writes\x20(newest\x20first)','param','compaction','system:proc','prependListener','\x20\x20(unlimited)','[okdb]\x20backing\x20up\x20to\x20','processor:retry',':\x20expected\x20','~tokens','keys/public.pem','candidateBytes','env/:env','shm-gc:\x20/proc\x20is\x20not\x20readable\x20—\x20cannot\x20tell\x20which\x20segments\x20are\x20in\x20use','kdb_admin_csrf','dropExisting','logRequests','guards','\x20parkedNow=','ITEM_UPDATE','\x20\x20╚═══════════════════════════╝','jwks_uri','catch','claims','txn:rollback','\x27\x20on\x20type\x20\x27','Route\x20','Hint:\x20','_boot','isConnected','mcp','/.well-known/openid-configuration','running','send','port','registry\x20publish\x20failing:\x20','_children',':\x20prefix\x20','text/event-stream;\x20charset=utf-8','_computeStatus','\x20\x20\x20\x20admin:\x20http://localhost:','filter','\x20more)','_userPhase','\x20\x20✓\x20database\x20opened\x0a','shutdown','run','byteLength','isSetupMode','OKDBTypeNotRegisteredError','view','event','Blob\x20on\x20disk\x20has\x20no\x20~files\x20record\x20in\x20any\x20env\x20(hash:\x20','type/users/item/alice\x20--env\x20staging','workers','skip\x20','OKDBInvalidIndexKeyError','ttl:clear','fts:reset','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','LICENSE_INVALID','Unauthorized','configureAuth','anySize','childTransaction','offWindow','permission','body:\x20','listenAddr','jwksTtlMs','Internal\x20error','orphan_blob','License\x20limit\x20exceeded:\x20','_active','sab','isBusy','\x20\x20Shell\x20commands','listen','afterWrite','--no-cluster','_totalReads','inspect','\x20(passive),\x20','shm\x20segment\x20','/([^/]+)','stack','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','getSecurityNotices','cors','number','\x20documents\x20fail\x20validation',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','sig','pending','/api',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','\x20\x20!\x20','\x20envs','license','https','\x20(durable\x20desired-state)','server','\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','_baselines','SCHEMA_COLLECTION_INVALID','processes','engines','heapTotal','http://localhost:','OKDB-PIN-V1:','handle','deaths','\x20\x20deleted\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','envs','createPublicKey','_lock','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','failures','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','data:read','KiB','registry-publish','push','values','.\x20Move\x20it\x20away\x20first\x20to\x20use\x20the\x20copy.','_enforceOperationAccess','unshift','ms\x20on\x20env=','missing_blob','--address','/type/users/query\x0a\x20\x20\x20\x20','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','peers=','_closed','\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)','env','\x20\x20matching\x20prefix\x20\x20\x20\x20','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','true','\x20process(es)\x20had\x20unreadable\x20maps','[filter]','_okdb','_buildChildRow','Unknown\x20JWKS\x20kid:\x20','_admissionStarted','verify','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','_released','bold','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','openSync','_store','string','processorId','errors','Indexes','linux','INDEX_ALREADY_REGISTERED','files/',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:',':\x20connected\x0a\x0a','hasDesired','refs','Invalid\x20token','_nodeDbFor','ephemeral','logs','stop\x20every\x20okdb\x20process\x20on\x20this\x20path\x20and\x20run\x20`okdb\x20shm-gc`.','dedupeMax','field','\x20\x20→\x20\x20','\x20already\x20exists','hasIndex','getKeys','isTTY','msg','INDEX_HAS_CONSUMERS','--key','exportBlobs','note','\x20\x20·\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','Embeddings','assign','rawBuf','_singletonLocks','\x27\x20is\x20already\x20registered','_resolveEnv','SYSTEM_PROC','_onTick','--log-requests','_key','\x20license(s)','_threadStats','_nodeDead','TYPES','tags','removeNode','constructor','authMode','wrong_node','activate','OKDBSchemaValidationError','fts:drop','flushLmdb','OKDBNotFoundError','userAdded','OKDBTypeAlreadyRegisteredError','txn:end','\x0a[okdb]\x20received\x20','\x20\x20Some\x20checks\x20failed.\x0a','_nodeDb','category','percentile','start','ms/','summary','params.','open\x20','ES256','perf_hooks','database\x20path\x20writable:\x20','--username','ms\x20(pid\x20','data:\x20','hex','OIDC\x20discovery\x20missing\x20jwks_uri','dataBytes','~processes:cmd','\x20logs\x20off\x0a','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','pin','Type\x20\x27','dropFts','error:\x20','detachConsole','selfAddress','_blobStatusDb','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','authorization','INDEX_PROGRESS','\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','bind','_report','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','lmdb','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','importBlobs','\x20HTTP\x20server(s)\x20on\x20port\x20','_durs','sha256','OKDB_HTTP_WORKERS\x20env','writeUInt32BE','onRetiring','license:activated','params.env','\x27\x20already\x20registered','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','_handleInProcess','sourceType','\x1b[37m','onThreadExit','--types','validateRouteInput','\x20more','_validateOidcAccessToken','listDesired',',\x20label:\x20','\x20times\x20in\x20','cause','bus:drain','_handlePending','LABEL','padStart','system:bus_state_change','building','_lookupByName','ms\x20(attempt\x20','valid','\x22\x20is\x20not\x20empty\x20—\x20backups\x20never\x20overwrite;\x20choose\x20a\x20new\x20directory','isAbsolute','live\x20process\x20registry;\x20disposable','_selfKey','use\x20<env>','boolean','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','_totalReadMs','pipe','BAD_HOST','der','setTtl','dim','[on|off|level]','exclusiveStart','trim','Data','Cannot\x20delete\x20','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','_collectWriterFacet','stringify','creating','cluster:\x20ready\x20(','removeLicense','DELETE\x20type/users/item/x','formatCookie','exportEnvsToStream','route','\x20env','signalWant','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','createdAt','roles','content-type','payload','audiences','dumpedAt','ms\x20busy=','\x1b[2m','path','closeSync','Queue','PIN','committed','--dry-run','issuer','derived;\x20rebuilt\x20from\x20source\x20docs\x20on\x20first\x20open\x20of\x20the\x20restored\x20store','captureStackTrace','heartbeatMs','transport','slice','\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/','\x20\x20\x20\x20status:\x20\x20\x20\x20active','\x20\x20⚠\x20\x20','supervisorKey','\x20fetching\x20','API\x20tokens,\x20users,\x20and\x20credentials.','\x20\x20Flags','SIGKILL','Admin','isFile','fast','write','min','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','\x20uses\x20bodyMode:array\x20but\x20does\x20not\x20have\x20exactly\x20one\x20unbound\x20array\x20input\x20field','unlink','\x20process(es)\x20that\x20could\x20map\x20these\x20','queue-worker','processingSig','Invalid\x20activation\x20token:\x20','fork','Writable','stream','undefined','workersFlag','terminal','draining','epoch','_quarantinedEnvs','\x20to\x20quit.','\x20\x20[','gray','scope','cursorKey','\x20\x20Path\x20access','object','defaults'];_0x5343=function(){return _0x1652a3;};return _0x5343();}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x664f6b=_0x1d45b1;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0xf87c23,performance:_0x29d9f5}=require$$0$4,_0x721611=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x664f6b(0x687),_0x3b46b1=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x1f89d6=process.env.OKDB_LOOP_LAG_ALL==='1',_0x166117=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x40106e{constructor(){const _0x344f86=_0x664f6b;this[_0x344f86(0x195)]=_0x721611,this['_buckets']=new Map(),this['_h']=null,this[_0x344f86(0x336)]=null,this[_0x344f86(0x3a8)]=![],this[_0x344f86(0x48e)]=(_0x337a09,_0x5ad31f)=>process[_0x344f86(0x7d4)]['write'](_0x337a09+(_0x5ad31f?'\x20'+JSON['stringify'](_0x5ad31f):'')+'\x0a');}['now'](){const _0x46d1a6=_0x664f6b;return _0x29d9f5[_0x46d1a6(0x562)]();}['setLogger'](_0x4e6cd2){if(typeof _0x4e6cd2==='function')this['_log']=_0x4e6cd2;}[_0x664f6b(0x6b1)](_0x188974,_0x145c40,_0x1bb42f){const _0x32fa26=_0x664f6b;if(!this[_0x32fa26(0x195)])return;let _0x5ccfbf=this[_0x32fa26(0x3d0)][_0x32fa26(0x5f1)](_0x188974);!_0x5ccfbf&&(_0x5ccfbf={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets']['set'](_0x188974,_0x5ccfbf)),_0x5ccfbf['ms']+=_0x145c40,_0x5ccfbf[_0x32fa26(0x3e3)]+=0x1,_0x145c40>_0x5ccfbf[_0x32fa26(0x18f)]&&(_0x5ccfbf[_0x32fa26(0x18f)]=_0x145c40,_0x5ccfbf[_0x32fa26(0x52a)]=_0x1bb42f||'');}['start'](_0x41abff){const _0x573a39=_0x664f6b;if(!this[_0x573a39(0x195)]||this['_started'])return;this['_started']=!![];if(_0x41abff)this['_log']=_0x41abff;this['_h']=_0xf87c23({'resolution':0xa}),this['_h'][_0x573a39(0x4da)](),this[_0x573a39(0x336)]=setInterval(()=>this[_0x573a39(0x6f1)](),_0x3b46b1);if(this[_0x573a39(0x336)]['unref'])this['_timer'][_0x573a39(0x27a)]();}[_0x664f6b(0x261)](_0x4a655e){const _0x2d3d63=_0x664f6b;if(!this['_windowCbs'])this['_windowCbs']=new Set();this[_0x2d3d63(0x31d)]['add'](_0x4a655e);if(!this[_0x2d3d63(0x3a8)])this[_0x2d3d63(0x52d)]();}[_0x664f6b(0x63e)](_0x418d1f){const _0x7ac177=_0x664f6b;this[_0x7ac177(0x31d)]?.[_0x7ac177(0x4b0)](_0x418d1f);}[_0x664f6b(0x52d)](){const _0x5a9b17=_0x664f6b;if(this['_admissionStarted'])return;this[_0x5a9b17(0x68d)]=!![];!this['_h']&&(this['_h']=_0xf87c23({'resolution':0xa}),this['_h'][_0x5a9b17(0x4da)]());const _0x38f25c=_0x3b46b1;this[_0x5a9b17(0x81e)]=setInterval(()=>{const _0x5aaba1=_0x5a9b17,_0x1010b6=this['_h'];if(!_0x1010b6)return;const _0x493ad3=_0x1010b6[_0x5aaba1(0x6d3)](0x63)/0xf4240,_0x1c76c3=_0x1010b6[_0x5aaba1(0x456)]/0xf4240,_0x4a3ce5=_0x1010b6[_0x5aaba1(0x5ac)]/0xf4240;_0x1010b6['reset']();if(this[_0x5aaba1(0x31d)])for(const _0x275c50 of this['_windowCbs']){try{_0x275c50({'p99Ms':_0x493ad3,'maxMs':_0x1c76c3,'meanMs':_0x4a3ce5,'reportMs':_0x38f25c});}catch{}}},_0x38f25c);if(this['_admissionTimer']['unref'])this[_0x5a9b17(0x81e)][_0x5a9b17(0x27a)]();}['_report'](){const _0x4bc7e5=_0x664f6b,_0x19b0aa=this['_h'],_0x3d2bd1=_0x19b0aa[_0x4bc7e5(0x456)]/0xf4240,_0x5071d6=_0x19b0aa[_0x4bc7e5(0x6d3)](0x63)/0xf4240,_0x404943=_0x19b0aa[_0x4bc7e5(0x5ac)]/0xf4240;_0x19b0aa['reset']();const _0x5052f8=[...this[_0x4bc7e5(0x3d0)][_0x4bc7e5(0x5bd)]()][_0x4bc7e5(0x800)](([_0x37c896,_0x2c88ac])=>({'label':_0x37c896,..._0x2c88ac}))[_0x4bc7e5(0x21a)]((_0x37d41b,_0x3b7679)=>_0x3b7679['ms']-_0x37d41b['ms'])[_0x4bc7e5(0x747)](0x0,0x8);this[_0x4bc7e5(0x3d0)][_0x4bc7e5(0x2e8)]();const _0xff3ee8=_0x5052f8[_0x4bc7e5(0x553)]((_0x544113,_0x3daa00)=>_0x544113+_0x3daa00['ms'],0x0),_0x121a31=_0x5052f8[_0x4bc7e5(0x800)](_0x3060b5=>_0x3060b5[_0x4bc7e5(0x16c)]+'='+_0x3060b5['ms'][_0x4bc7e5(0x5cf)](0x0)+_0x4bc7e5(0x6d5)+_0x3060b5[_0x4bc7e5(0x3e3)]+(_0x3060b5[_0x4bc7e5(0x18f)]>0x5?_0x4bc7e5(0x878)+_0x3060b5['maxMs'][_0x4bc7e5(0x5cf)](0x0)+'ms'+(_0x3060b5['maxExtra']?'\x20'+_0x3060b5[_0x4bc7e5(0x52a)]:'')+')':''));(_0x1f89d6||_0x3d2bd1>=_0x166117)&&this[_0x4bc7e5(0x48e)](_0x4bc7e5(0x329)+_0x3b46b1+_0x4bc7e5(0x42b)+_0x3d2bd1[_0x4bc7e5(0x5cf)](0x0)+_0x4bc7e5(0x3d8)+_0x5071d6[_0x4bc7e5(0x5cf)](0x0)+_0x4bc7e5(0x3e0)+_0x404943[_0x4bc7e5(0x5cf)](0x0)+_0x4bc7e5(0x73a)+_0xff3ee8[_0x4bc7e5(0x5cf)](0x0)+'ms'+(_0x121a31[_0x4bc7e5(0x320)]?'\x20│\x20'+_0x121a31[_0x4bc7e5(0x3c7)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x4bc7e5(0x31d)])for(const _0xf29e03 of this['_windowCbs']){try{_0xf29e03({'p99Ms':_0x5071d6,'maxMs':_0x3d2bd1,'meanMs':_0x404943,'reportMs':_0x3b46b1});}catch{}}}[_0x664f6b(0x4ec)](){const _0x13f2b8=_0x664f6b;if(this[_0x13f2b8(0x336)])clearInterval(this[_0x13f2b8(0x336)]);if(this['_h'])this['_h'][_0x13f2b8(0x316)]();this[_0x13f2b8(0x336)]=null,this['_h']=null,this[_0x13f2b8(0x3a8)]=![];}}const _0x5dd125=new _0x40106e();if(_0x5dd125[_0x664f6b(0x195)])_0x5dd125[_0x664f6b(0x6d4)]();return okdbLoopMonitor={'LOOP':_0x5dd125},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x377af1=0x2**0x1f-0x1;function _0x299f9b(_0x557a81){if(!(_0x557a81>0x0))return 0x0;return _0x557a81>_0x377af1?_0x377af1:_0x557a81;}function _0x58ad42(_0x5610de){return _0x5610de===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x377af1,'clampTimerDelay':_0x299f9b,'isNeverDelay':_0x58ad42},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x333608=require$$0$1,_0x6a72c2=require$$1;let _0x1e399f,_0x199024,_0x5c57e6,_0x568813,_0x129ecd,_0x577b7b,_0x2ab398,_0x1ff159=![];const _0x3a552d=new Set();let _0x43099f=null;const _0x509a6c=new Map();function _0x2fbc97(){const _0x2a78c1=_0x438e;if(_0x1e399f!==undefined)return _0x1e399f;_0x1e399f=process.env.OKDB_DIAG==='1';if(!_0x1e399f)return![];_0x199024=process.env.OKDB_DIAG_STACK==='1',_0x568813=Math[_0x2a78c1(0x456)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x5c57e6=new Array(_0x568813),_0x129ecd=0x0,_0x577b7b=0x0,_0x2ab398=process.env.OKDB_DIAG_DIR||null;if(_0x2ab398)try{_0x333608['mkdirSync'](_0x2ab398,{'recursive':!![]});}catch{}return!![];}function _0x4a09b4(){return _0x1e399f===undefined?_0x2fbc97():_0x1e399f;}function _0x42b67d(_0x5bc279,_0x823beb){const _0x2be267=_0x438e;if(_0x1e399f===undefined?!_0x2fbc97():!_0x1e399f)return;let _0x25de66;if(_0x199024){const _0x367f4f=new Error()['stack']||'';_0x25de66=_0x367f4f['split']('\x0a')[_0x2be267(0x747)](0x3)['map'](_0x16a67c=>_0x16a67c[_0x2be267(0x724)]())['filter'](Boolean)['slice'](0x0,0x8);}_0x5c57e6[_0x129ecd]={'seq':_0x577b7b++,'t':Date[_0x2be267(0x562)](),'env':_0x5bc279,'kind':_0x823beb||_0x2be267(0x4cb),'stack':_0x25de66},_0x129ecd=(_0x129ecd+0x1)%_0x568813;}function _0x145677(_0x4788de){const _0x10988c=_0x438e,_0x5e559b=[];for(let _0x5aa91f=0x0;_0x5aa91f<_0x568813;_0x5aa91f++){const _0x9f5f1f=_0x5c57e6[(_0x129ecd-0x1-_0x5aa91f+_0x568813*0x2)%_0x568813];if(!_0x9f5f1f)continue;_0x5e559b[_0x10988c(0x677)](_0x9f5f1f);if(_0x5e559b[_0x10988c(0x320)]>=_0x4788de)break;}return _0x5e559b;}function _0x3c598e(_0x183456){const _0x586808=_0x438e;try{process['stderr'][_0x586808(0x753)](_0x183456+'\x0a');}catch{}if(_0x2ab398)try{_0x333608[_0x586808(0x1d1)](_0x6a72c2[_0x586808(0x3c7)](_0x2ab398,'okdb-diag.'+process[_0x586808(0x242)]+_0x586808(0x52c)),_0x183456+'\x0a');}catch{}}function _0x3c7d5f(_0x246e8c){const _0x8e0f55=_0x438e,_0x241a1e=_0x145677(_0x246e8c);if(!_0x241a1e[_0x8e0f55(0x320)])return _0x8e0f55(0x2ae);const _0x32a2f5=Date[_0x8e0f55(0x562)]();return _0x241a1e[_0x8e0f55(0x800)](_0x3cd469=>{const _0x1ff498=_0x8e0f55,_0x35a597=_0x1ff498(0x33c)+_0x3cd469[_0x1ff498(0x5ad)]+'\x20-'+(_0x32a2f5-_0x3cd469['t'])+_0x1ff498(0x511)+_0x3cd469[_0x1ff498(0x684)]+'\x20'+_0x3cd469[_0x1ff498(0x5be)];return _0x3cd469[_0x1ff498(0x652)]&&_0x3cd469[_0x1ff498(0x652)][_0x1ff498(0x320)]?_0x35a597+_0x1ff498(0x7e5)+_0x3cd469[_0x1ff498(0x652)][_0x1ff498(0x3c7)](_0x1ff498(0x7e5)):_0x35a597;})['join']('\x0a');}function _0x1d5332(_0x2b794b,_0x364acd){const _0x5428ff=_0x438e,_0xa48602=_0x5428ff(0x7b1)+_0x2b794b+_0x5428ff(0x537)+new Date()[_0x5428ff(0x804)]()+_0x5428ff(0x4f3)+process[_0x5428ff(0x242)]+_0x5428ff(0x825),_0x57819=[_0xa48602,_0x5428ff(0x6e8)+(_0x364acd&&_0x364acd[_0x5428ff(0x652)]?_0x364acd[_0x5428ff(0x652)][_0x5428ff(0x5fa)]('\x0a')[0x0]:_0x364acd),_0x5428ff(0x5fd)+(_0x199024?'':_0x5428ff(0x845))+':',_0x3c7d5f(0x18),_0x3a8149(),'='[_0x5428ff(0x268)](_0xa48602['length']-0x1)];_0x3c598e(_0x57819['join']('\x0a'));}function _0x401fcc(_0x58a120){const _0x10ce37=_0x438e;if(!_0x4a09b4())return;const _0x3941f3=String(_0x58a120&&_0x58a120[_0x10ce37(0x258)]||_0x58a120||''),_0x2acfb2=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x10ce37(0x219)](_0x3941f3);_0x1d5332(_0x2acfb2?'ORPHAN\x20(env-closed\x20write)':_0x10ce37(0x1c0),_0x58a120);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x2acfb2)return;try{console[_0x10ce37(0x4dd)](_0x58a120&&_0x58a120[_0x10ce37(0x652)]?_0x58a120[_0x10ce37(0x652)]:_0x58a120);}catch{}process[_0x10ce37(0x532)](0x1);}function _0x59692b(_0x1ebb05){const _0xfbb1f8=_0x438e;if(!_0x4a09b4())return;const _0x374bc7=String(_0x1ebb05&&_0x1ebb05['message']||_0x1ebb05||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0xfbb1f8(0x219)](_0x374bc7)&&_0x1d5332(_0xfbb1f8(0x53e),_0x1ebb05);}function _0x3a8149(){const _0x15356e=_0x438e,_0x18862f=[_0x15356e(0x1f1)];let _0x382054=![];for(const _0x5cdc88 of _0x3a552d){const _0x332cac=_0x5cdc88&&_0x5cdc88[_0x15356e(0x789)];if(!_0x332cac)continue;for(const [_0x5a31b6,_0x3ee70d]of _0x332cac){const _0x438370=_0x3ee70d&&_0x3ee70d[_0x15356e(0x2d0)]&&_0x3ee70d[_0x15356e(0x2d0)][_0x15356e(0x62f)];if(!_0x438370)continue;let _0x114631,_0x1b36de;try{_0x114631=Atomics[_0x15356e(0x402)](_0x438370,0x0),_0x1b36de=Atomics['load'](_0x438370,0x1);}catch{continue;}if(_0x114631===0x0)continue;_0x382054=!![];const _0x1b88af=_0x114631>0x0?_0x15356e(0x78b):_0x15356e(0x590),_0xa13d61=Date['now']()-Math[_0x15356e(0x3db)](_0x114631)*0x3e8,_0xc4176=((()=>{const _0x28e6e5=_0x15356e;try{return _0x3ee70d['_writer']&&_0x3ee70d[_0x28e6e5(0x445)][_0x28e6e5(0x269)]?_0x3ee70d[_0x28e6e5(0x445)][_0x28e6e5(0x269)]():null;}catch{return null;}})());_0x18862f['push'](_0x15356e(0x332)+_0x5a31b6+_0x15356e(0x810)+_0x1b88af+'\x20drainAge='+_0xa13d61+'ms\x20activeWriters='+_0x1b36de+(_0xc4176?_0x15356e(0x3e9)+_0xc4176['depth']+'\x20oldestPendingMs='+_0xc4176[_0x15356e(0x7ec)]+_0x15356e(0x60f)+_0xc4176['parkedNow']+'}':''));}}if(!_0x382054)_0x18862f[_0x15356e(0x677)](_0x15356e(0x2af));return _0x18862f[_0x15356e(0x3c7)]('\x0a');}function _0xe17fd4(){const _0x6e351b=_0x438e;if(!_0x4a09b4())return;const _0x1d72af=Math[_0x6e351b(0x456)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0xac579f=Date[_0x6e351b(0x562)]();for(const _0x56acae of _0x3a552d){const _0x56bc7a=_0x56acae&&_0x56acae[_0x6e351b(0x789)];if(!_0x56bc7a)continue;for(const [_0x33866a,_0x2da24d]of _0x56bc7a){const _0x74baf8=_0x2da24d&&_0x2da24d[_0x6e351b(0x2d0)]&&_0x2da24d[_0x6e351b(0x2d0)][_0x6e351b(0x62f)];if(!_0x74baf8)continue;let _0x3c9263;try{_0x3c9263=Atomics[_0x6e351b(0x402)](_0x74baf8,0x0);}catch{continue;}const _0x224f36=_0x56acae[_0x6e351b(0x73c)]+'|'+_0x33866a;if(_0x3c9263<=0x0){_0x509a6c[_0x6e351b(0x4b0)](_0x224f36);continue;}const _0x1217f3=_0xac579f-_0x3c9263*0x3e8,_0x1081c6=_0x509a6c[_0x6e351b(0x5f1)](_0x224f36);if(_0x1217f3<_0x1d72af)continue;if(_0x1081c6&&_0xac579f-_0x1081c6[_0x6e351b(0x739)]<_0x1d72af)continue;_0x509a6c[_0x6e351b(0x4a3)](_0x224f36,{'firstTs':_0x1081c6?_0x1081c6[_0x6e351b(0x286)]:_0x3c9263,'dumpedAt':_0xac579f});const _0x16a289=_0x6e351b(0x755)+_0x1217f3+_0x6e351b(0x67c)+_0x33866a+_0x6e351b(0x537)+new Date()[_0x6e351b(0x804)]()+_0x6e351b(0x4f3)+process[_0x6e351b(0x242)]+'\x20===';_0x3c598e([_0x16a289,_0x3a8149(),'='[_0x6e351b(0x268)](_0x16a289[_0x6e351b(0x320)]-0x1)][_0x6e351b(0x3c7)]('\x0a'));}}}function _0x39451e(){const _0x5ce157=_0x438e;if(!_0x4a09b4()||_0x1ff159)return;_0x1ff159=!![],process['prependListener'](_0x5ce157(0x1c0),_0x401fcc),process[_0x5ce157(0x601)](_0x5ce157(0x4bf),_0x59692b);const _0x295d80=Math[_0x5ce157(0x456)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x43099f=setInterval(_0xe17fd4,_0x295d80);if(_0x43099f[_0x5ce157(0x27a)])_0x43099f[_0x5ce157(0x27a)]();}function _0x2682f2(_0x113053){if(!_0x4a09b4()||!_0x113053)return;_0x3a552d['add'](_0x113053),_0x39451e();}function _0x37ba43(_0x2f020d){const _0xac161f=_0x438e;_0x3a552d[_0xac161f(0x4b0)](_0x2f020d);}function _0x51aaec(){if(!_0x4a09b4())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x199024,'recentWrites':_0x145677(0x10),'drain':_0x3a8149()};}return okdbDiag={'isEnabled':_0x4a09b4,'recordWrite':_0x42b67d,'installDiag':_0x39451e,'registerOkdb':_0x2682f2,'unregisterOkdb':_0x37ba43,'snapshot':_0x51aaec},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x29b88e=_0x1d45b1;if(hasRequiredOkdbWriter)return okdbWriter[_0x29b88e(0x818)];hasRequiredOkdbWriter=0x1;const {performance:_0x3e849c}=require$$0$5,_0x9e4bea=requireOkdbDiag(),_0x424151=process.env.OKDB_COMMIT_MODE===_0x29b88e(0x84e);class _0x530e67{constructor(_0x2908d6){const _0x4d2247=_0x29b88e;this['env']=_0x2908d6,this[_0x4d2247(0x55d)]=new Set(),this[_0x4d2247(0x7db)]=new Map(),this[_0x4d2247(0x362)]=0x0,this[_0x4d2247(0x6f7)]=[],this['_done']=[],this[_0x4d2247(0x3e6)]=Math[_0x4d2247(0x456)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this['_bpWaiters']=[],this[_0x4d2247(0x437)]=0x0,this['_held']=null,this[_0x4d2247(0x20d)]=0x0,this[_0x4d2247(0x1d7)]=0x0,this['_nestedWarned']=![];}async['transaction'](_0x51fa88,_0x1f6418,_0x2dd543={}){const _0x271628=_0x29b88e;for(let _0x47854f=0x1;;_0x47854f++){try{return await this[_0x271628(0x5eb)](_0x51fa88,_0x1f6418,_0x2dd543);}catch(_0xdc57a3){if(_0xdc57a3?.[_0x271628(0x779)]!==_0x271628(0x59a)||_0x2dd543['admitted']||_0x47854f>=0x5)throw _0xdc57a3;this[_0x271628(0x684)][_0x271628(0x7bc)](_0xdc57a3[_0x271628(0x847)]);}}}async['_transactionOnce'](_0x2846c6,_0x4895d7,{admitted:admitted=![]}={}){const _0x255595=_0x29b88e;if(_0x9e4bea['isEnabled']())_0x9e4bea['recordWrite'](this[_0x255595(0x684)]?.[_0x255595(0x1b6)],_0x4895d7);if(this['_closed']){const _0x2ba6d4=new Error(_0x255595(0x214));_0x2ba6d4[_0x255595(0x779)]=_0x255595(0x3fa);throw _0x2ba6d4;}if(this[_0x255595(0x3e6)]>0x0){let _0x545022=![];while(this[_0x255595(0x388)]>=this[_0x255595(0x3e6)]&&!this[_0x255595(0x682)]){!_0x545022&&(_0x545022=!![],this[_0x255595(0x437)]++),await new Promise(_0x1d1cca=>this[_0x255595(0x32c)]['push'](_0x1d1cca));}if(this[_0x255595(0x682)]){const _0x323513=new Error(_0x255595(0x214));_0x323513[_0x255595(0x779)]='ENV_CLOSING_RETRY';throw _0x323513;}}this[_0x255595(0x388)]++;const _0x1f8cea=admitted?null:this[_0x255595(0x684)]['_coordinator'];for(;;){while(this['_held'])await this['_held'];if(_0x1f8cea)try{await _0x1f8cea[_0x255595(0x2fd)]();}catch(_0x586f2a){this[_0x255595(0x388)]--;if(this[_0x255595(0x32c)][_0x255595(0x320)]&&this[_0x255595(0x388)]<this['_highWater'])this['_bpWaiters'][_0x255595(0x40c)]()();throw _0x586f2a;}if(!this['_held'])break;if(_0x1f8cea)_0x1f8cea['afterWrite']();}if(this[_0x255595(0x682)]){if(_0x1f8cea)_0x1f8cea[_0x255595(0x64b)]();this[_0x255595(0x388)]--;if(this[_0x255595(0x32c)][_0x255595(0x320)]&&this[_0x255595(0x388)]<this['_highWater'])this[_0x255595(0x32c)]['shift']()();const _0x16f5f5=new Error(_0x255595(0x214));_0x16f5f5[_0x255595(0x779)]='ENV_CLOSING_RETRY';throw _0x16f5f5;}const _0x2a43e1=_0x3e849c[_0x255595(0x562)]();if(_0x424151)try{const _0x3f072a=this['env']['db'][_0x255595(0x86e)](_0x2846c6);this[_0x255595(0x362)]++;if(this[_0x255595(0x6f7)][_0x255595(0x677)](_0x3e849c['now']()-_0x2a43e1)>0x100)this['_durs'][_0x255595(0x40c)]();if(this[_0x255595(0x45b)][_0x255595(0x677)](_0x3e849c[_0x255595(0x562)]())>0x800)this['_done'][_0x255595(0x40c)]();return _0x3f072a;}finally{this[_0x255595(0x388)]--;if(this[_0x255595(0x32c)][_0x255595(0x320)]&&this[_0x255595(0x388)]<this[_0x255595(0x3e6)])this[_0x255595(0x32c)][_0x255595(0x40c)]()();if(_0x1f8cea)_0x1f8cea[_0x255595(0x64b)]();}let _0x45884e=null;const _0x4bd850=()=>{const _0x340131=_0x255595,_0x3b214e=_0x2846c6();if(_0x3b214e&&typeof _0x3b214e[_0x340131(0x19c)]===_0x340131(0x807)&&!_0x45884e){this[_0x340131(0x20d)]++;let _0x57774f;const _0x183385=new Promise(_0x461389=>_0x57774f=_0x461389);this[_0x340131(0x229)]=_0x183385,_0x45884e=()=>{const _0x4a80ea=_0x340131;if(this['_held']===_0x183385)this[_0x4a80ea(0x229)]=null;_0x57774f();};}return _0x3b214e;};let _0x1d6a0a;try{_0x1d6a0a=this['env']['db'][_0x255595(0x63d)](_0x4bd850);}catch(_0x4fe461){_0x1d6a0a=Promise['reject'](_0x4fe461);}(!_0x1d6a0a||typeof _0x1d6a0a['then']!==_0x255595(0x807))&&(this['_nestedTotal']++,!this['_nestedWarned']&&(this['_nestedWarned']=!![],console['warn'](_0x255595(0x4c9)+(this['env']?.['name']??'?')+_0x255595(0x69c))),_0x1d6a0a=Promise[_0x255595(0x377)](_0x1d6a0a));const _0x818bda=()=>{if(_0x45884e)_0x45884e();};_0x1d6a0a['then'](_0x818bda,_0x818bda),this[_0x255595(0x55d)][_0x255595(0x5e5)](_0x1d6a0a),this['_enqueuedAt'][_0x255595(0x4a3)](_0x1d6a0a,_0x2a43e1);const _0x457cfe=()=>{const _0x505cb6=_0x255595;this['_inflight'][_0x505cb6(0x4b0)](_0x1d6a0a),this[_0x505cb6(0x7db)]['delete'](_0x1d6a0a),this[_0x505cb6(0x362)]++,this[_0x505cb6(0x388)]--;this[_0x505cb6(0x32c)][_0x505cb6(0x320)]&&this[_0x505cb6(0x388)]<this[_0x505cb6(0x3e6)]&&this[_0x505cb6(0x32c)][_0x505cb6(0x40c)]()();if(this[_0x505cb6(0x6f7)][_0x505cb6(0x677)](_0x3e849c[_0x505cb6(0x562)]()-_0x2a43e1)>0x100)this[_0x505cb6(0x6f7)][_0x505cb6(0x40c)]();if(this[_0x505cb6(0x45b)][_0x505cb6(0x677)](_0x3e849c[_0x505cb6(0x562)]())>0x800)this[_0x505cb6(0x45b)][_0x505cb6(0x40c)]();};_0x1d6a0a[_0x255595(0x19c)](_0x457cfe,_0x457cfe);try{return await _0x1d6a0a;}finally{if(_0x1f8cea)_0x1f8cea[_0x255595(0x64b)]();}}[_0x29b88e(0x269)](){const _0x18b354=_0x29b88e,_0x528f2f=_0x3e849c[_0x18b354(0x562)]();let _0x4e2816=0x0;for(const _0x379f08 of this['_enqueuedAt'][_0x18b354(0x678)]()){const _0x11eac8=_0x528f2f-_0x379f08;if(_0x11eac8>_0x4e2816)_0x4e2816=_0x11eac8;}let _0x1196f3=0x0;for(let _0x4acd19=this[_0x18b354(0x45b)][_0x18b354(0x320)]-0x1;_0x4acd19>=0x0;_0x4acd19--){if(_0x528f2f-this['_done'][_0x4acd19]>0x3e8)break;_0x1196f3++;}let _0x2a5c63=0x0;if(this[_0x18b354(0x6f7)][_0x18b354(0x320)]){const _0x1478e8=[...this['_durs']][_0x18b354(0x21a)]((_0x23984e,_0xc6255e)=>_0x23984e-_0xc6255e);_0x2a5c63=_0x1478e8[Math[_0x18b354(0x754)](_0x1478e8['length']-0x1,Math[_0x18b354(0x349)](_0x1478e8['length']*0.99))];}return{'depth':this['_inflight'][_0x18b354(0x569)],'oldestPendingMs':Math[_0x18b354(0x79c)](_0x4e2816),'committed':this['_committed'],'commitsPerSec':_0x1196f3,'commitP99Ms':Math[_0x18b354(0x79c)](_0x2a5c63),'parkedNow':this['_bpWaiters'][_0x18b354(0x320)],'parkedTotal':this[_0x18b354(0x437)],'highWater':this['_highWater']};}[_0x29b88e(0x55e)](){const _0x436ed5=_0x29b88e,_0x139743=_0x3e849c[_0x436ed5(0x562)]();return[...this['_enqueuedAt']['values']()]['map'](_0x3e3dab=>Math['round'](_0x139743-_0x3e3dab))['sort']((_0x26e61d,_0x11f10d)=>_0x11f10d-_0x26e61d);}[_0x29b88e(0x239)](){const _0x1b3d21=_0x29b88e;this[_0x1b3d21(0x682)]=!![];for(const _0x5d656e of this[_0x1b3d21(0x32c)]['splice'](0x0))_0x5d656e();}async[_0x29b88e(0x17b)](){const _0x8a9519=_0x29b88e;let _0x22f612=0x0;while(this[_0x8a9519(0x55d)][_0x8a9519(0x569)]&&_0x22f612++<0x3e8){await Promise['allSettled']([...this['_inflight']]);}}async[_0x29b88e(0x250)](_0x42d69d,_0x31644e,_0x158ca,_0x2b18ee){const _0x895715=_0x29b88e;return this[_0x895715(0x7c9)](()=>{const _0x34f7ca=_0x895715;if(_0x2b18ee===undefined)_0x42d69d[_0x34f7ca(0x34d)](_0x31644e,_0x158ca);else _0x42d69d['putSync'](_0x31644e,_0x158ca,_0x2b18ee);},'raw-put');}async[_0x29b88e(0x323)](_0x1f40ea,_0x4aa094){const _0x5cf7a9=_0x29b88e;return this[_0x5cf7a9(0x7c9)](()=>_0x1f40ea[_0x5cf7a9(0x3c2)](_0x4aa094),_0x5cf7a9(0x2c2));}}async function _0x39af39(_0x143ba8,_0x20b4d0){const _0x53a098=_0x29b88e;if(_0x20b4d0==null)_0x20b4d0=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0xf3bcba=_0x143ba8?.['flushed'];if(!_0xf3bcba||typeof _0xf3bcba['then']!==_0x53a098(0x807))return;await Promise[_0x53a098(0x826)]([Promise['resolve'](_0xf3bcba)[_0x53a098(0x613)](()=>{}),new Promise(_0x1f455c=>{const _0x2bfb4a=_0x53a098,_0x5e0c08=setTimeout(_0x1f455c,_0x20b4d0);if(_0x5e0c08[_0x2bfb4a(0x27a)])_0x5e0c08['unref']();})]);}catch{}}function _0x3c7efa(_0x23f583){const _0x1e94a8=_0x29b88e;if(_0x424151)return Promise[_0x1e94a8(0x377)]();const _0xc776a9=_0x23f583?.[_0x1e94a8(0x740)];return _0xc776a9&&typeof _0xc776a9[_0x1e94a8(0x19c)]===_0x1e94a8(0x807)?_0xc776a9:Promise[_0x1e94a8(0x377)]();}const _0x45bb8c=Math['max'](0x1,Math['floor'](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x5a814c=Math[_0x29b88e(0x456)](0x1,_0x45bb8c-0x2);let _0x382eaf=0x0;const _0x54c3f4=[];async function _0x44f718(_0x246290){const _0x59ecbb=_0x29b88e;if(_0x382eaf<_0x5a814c)_0x382eaf++;else await new Promise(_0x3dd39e=>_0x54c3f4[_0x59ecbb(0x677)](_0x3dd39e));try{return await _0x246290();}finally{const _0x5d02dd=_0x54c3f4[_0x59ecbb(0x40c)]();if(_0x5d02dd)_0x5d02dd();else _0x382eaf--;}}return okdbWriter['exports']=_0x530e67,okdbWriter[_0x29b88e(0x818)][_0x29b88e(0x7bb)]=_0x44f718,okdbWriter[_0x29b88e(0x818)][_0x29b88e(0x484)]=_0x5a814c,okdbWriter[_0x29b88e(0x818)][_0x29b88e(0x6ca)]=_0x39af39,okdbWriter['exports']['committed']=_0x3c7efa,okdbWriter[_0x29b88e(0x818)][_0x29b88e(0x1a2)]=_0x424151,okdbWriter[_0x29b88e(0x818)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x4cc224=_0x1d45b1;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4be56e=require$$0,{clampTimerDelay:_0x4c3477}=requireOkdbTimers(),{SYNC_COMMITS:_0x43d575}=requireOkdbWriter(),_0x5eb526='~lock';class _0x10f115{constructor(_0x52a7c3,_0x241a6c,_0x4fbe77){const _0x55bdec=_0x438e;this[_0x55bdec(0x670)]=_0x52a7c3,this[_0x55bdec(0x6bd)]=_0x241a6c,this[_0x55bdec(0x4a9)]=_0x4fbe77,this[_0x55bdec(0x690)]=![],this[_0x55bdec(0x580)]=null,this[_0x55bdec(0x7ad)]=null;}[_0x4cc224(0x4fc)](){const _0x5bf0f1=_0x4cc224;if(this[_0x5bf0f1(0x690)])return![];try{const _0x3472a7=this['_lock'][_0x5bf0f1(0x475)]()[_0x5bf0f1(0x5f1)](this[_0x5bf0f1(0x6bd)]);if(!_0x3472a7||_0x3472a7[_0x5bf0f1(0x344)]!==this[_0x5bf0f1(0x4a9)])return![];const _0x183550=_0x3472a7[_0x5bf0f1(0x856)]??_0x3472a7[_0x5bf0f1(0x344)];if(_0x183550+_0x3472a7['ttlMs']<Date[_0x5bf0f1(0x562)]())return![];return!![];}catch{return!this[_0x5bf0f1(0x690)];}}[_0x4cc224(0x7de)](){const _0x5d34d1=_0x4cc224;if(this[_0x5d34d1(0x690)])return null;try{return this[_0x5d34d1(0x670)][_0x5d34d1(0x475)]()[_0x5d34d1(0x5f1)](this[_0x5d34d1(0x6bd)])??null;}catch{return null;}}async[_0x4cc224(0x1f2)](_0x20e645){const _0x93bea4=_0x4cc224;if(this[_0x93bea4(0x690)])return;try{if(this[_0x93bea4(0x670)]['_closed']())return;const _0x112db2=this['_lock'][_0x93bea4(0x475)]()[_0x93bea4(0x5f1)](this['_key']);if(!_0x112db2||_0x112db2[_0x93bea4(0x344)]!==this['_acquiredAt'])return;if(_0x43d575)this[_0x93bea4(0x670)][_0x93bea4(0x475)]()[_0x93bea4(0x34d)](this[_0x93bea4(0x6bd)],{..._0x112db2,'ttlMs':_0x112db2[_0x93bea4(0x86c)]+_0x20e645});else await this[_0x93bea4(0x670)][_0x93bea4(0x475)]()['put'](this[_0x93bea4(0x6bd)],{..._0x112db2,'ttlMs':_0x112db2[_0x93bea4(0x86c)]+_0x20e645});}catch{}}async[_0x4cc224(0x4b8)](){const _0xd07481=_0x4cc224;if(this[_0xd07481(0x690)])return;if(this['_heartbeatInFlight'])try{await this[_0xd07481(0x7ad)];}catch{}clearInterval(this[_0xd07481(0x580)]),this[_0xd07481(0x580)]=null,this[_0xd07481(0x690)]=!![];try{if(this[_0xd07481(0x670)][_0xd07481(0x682)]())return;const _0x37ad8c=this[_0xd07481(0x670)][_0xd07481(0x475)]()['get'](this[_0xd07481(0x6bd)]);if(_0x37ad8c&&_0x37ad8c[_0xd07481(0x344)]===this[_0xd07481(0x4a9)]){if(_0x43d575)this[_0xd07481(0x670)]['_db']()['removeSync'](this[_0xd07481(0x6bd)]);else await this['_lock'][_0xd07481(0x475)]()['remove'](this[_0xd07481(0x6bd)]);}}catch{}}[_0x4cc224(0x291)](_0x49c231,_0x3ea4bb){const _0x3e0a87=_0x4cc224,_0x18fcb0=_0x4c3477(_0x3ea4bb??Math[_0x3e0a87(0x349)](_0x49c231/0x3));this[_0x3e0a87(0x580)]=setInterval(()=>{if(this['_released'])return;this['_heartbeatInFlight']=((async()=>{const _0x2fb7cf=_0x438e;try{if(this[_0x2fb7cf(0x670)][_0x2fb7cf(0x682)]())return;const _0x3d808e=this[_0x2fb7cf(0x670)][_0x2fb7cf(0x475)]()['get'](this[_0x2fb7cf(0x6bd)]);if(!_0x3d808e||_0x3d808e[_0x2fb7cf(0x344)]!==this[_0x2fb7cf(0x4a9)]){this[_0x2fb7cf(0x690)]=!![],clearInterval(this[_0x2fb7cf(0x580)]),this[_0x2fb7cf(0x580)]=null;return;}if(_0x43d575)this['_lock'][_0x2fb7cf(0x475)]()[_0x2fb7cf(0x34d)](this['_key'],{..._0x3d808e,'updatedAt':Date[_0x2fb7cf(0x562)]()});else await this[_0x2fb7cf(0x670)][_0x2fb7cf(0x475)]()[_0x2fb7cf(0x250)](this[_0x2fb7cf(0x6bd)],{..._0x3d808e,'updatedAt':Date[_0x2fb7cf(0x562)]()});}catch{}this[_0x2fb7cf(0x7ad)]=null;})());},_0x18fcb0);if(this[_0x3e0a87(0x580)][_0x3e0a87(0x27a)])this[_0x3e0a87(0x580)][_0x3e0a87(0x27a)]();}}class _0x29f2df{constructor(_0x555b58,{namespace:_0x2a0548,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x564f26=_0x4cc224;this[_0x564f26(0x84f)]=_0x555b58,this['namespace']=_0x2a0548,this[_0x564f26(0x86c)]=ttlMs,this[_0x564f26(0x745)]=heartbeatMs,this[_0x564f26(0x504)]=null;}['_db'](){const _0x20b9f5=_0x4cc224;return this[_0x20b9f5(0x2ee)](),(!this[_0x20b9f5(0x504)]||this[_0x20b9f5(0x342)]!==this[_0x20b9f5(0x84f)])&&(this[_0x20b9f5(0x504)]=this['_rawDb'][_0x20b9f5(0x26d)](_0x5eb526,{'dupSort':![]}),this[_0x20b9f5(0x342)]=this[_0x20b9f5(0x84f)]),this[_0x20b9f5(0x504)];}[_0x4cc224(0x276)](){const _0x676cb3=_0x4cc224;return this['_assertUsable'](),(!this[_0x676cb3(0x579)]||this[_0x676cb3(0x450)]!==this['_rawDb'])&&(this[_0x676cb3(0x579)]=this[_0x676cb3(0x84f)]['openDB'](_0x5eb526+_0x676cb3(0x44b),{'dupSort':![]}),this['_wantDbOf']=this[_0x676cb3(0x84f)]),this['_wantDbHandle'];}[_0x4cc224(0x682)](){const _0x515e3b=_0x4cc224,_0x5cc48b=this[_0x515e3b(0x84f)]?.['status'];return _0x5cc48b===_0x515e3b(0x1c1)||_0x5cc48b===_0x515e3b(0x501);}[_0x4cc224(0x2ee)](){if(this['_closed']())throw new Error('okdb-lock:\x20env\x20closed');}[_0x4cc224(0x6bd)](_0x5984d0){const _0x4de587=_0x4cc224;return this[_0x4de587(0x366)]+':'+_0x5984d0;}[_0x4cc224(0x732)](_0x5681e6){const _0x4376f5=_0x4cc224;try{if(this['_closed']())return;_0x43d575?this[_0x4376f5(0x276)]()[_0x4376f5(0x34d)](this[_0x4376f5(0x6bd)](_0x5681e6),Date[_0x4376f5(0x562)]()):this[_0x4376f5(0x276)]()[_0x4376f5(0x250)](this[_0x4376f5(0x6bd)](_0x5681e6),Date[_0x4376f5(0x562)]())?.[_0x4376f5(0x613)]?.(()=>{});}catch{}}[_0x4cc224(0x7e1)](_0x1f24d9,_0x7b4349=0x3e8){const _0x34e478=_0x4cc224;try{const _0x4e3f38=this[_0x34e478(0x276)]()[_0x34e478(0x5f1)](this[_0x34e478(0x6bd)](_0x1f24d9));return typeof _0x4e3f38===_0x34e478(0x656)&&Date[_0x34e478(0x562)]()-_0x4e3f38<_0x7b4349;}catch{return![];}}[_0x4cc224(0x45d)](_0x465e36){const _0x163589=_0x4cc224,_0x12eb08=_0x465e36['updatedAt']??_0x465e36[_0x163589(0x344)];return _0x12eb08+_0x465e36['ttlMs']<Date['now']();}static[_0x4cc224(0x40f)](_0x44903d){const _0x5653af=_0x4cc224,_0x508e24=_0x44903d?.[_0x5653af(0x7de)];if(!_0x508e24||typeof _0x508e24['pid']!==_0x5653af(0x656))return![];if(_0x508e24[_0x5653af(0x506)]!==_0x4be56e['hostname']())return![];if(_0x508e24[_0x5653af(0x242)]===process['pid'])return![];try{return process[_0x5653af(0x397)](_0x508e24[_0x5653af(0x242)],0x0),![];}catch(_0x17c114){return _0x17c114[_0x5653af(0x779)]===_0x5653af(0x773);}}async[_0x4cc224(0x274)](_0x394e86,_0x561baf={},_0x2297aa={}){const _0x876525=_0x4cc224,_0x19fe92=this[_0x876525(0x6bd)](_0x394e86),_0x36048e=_0x2297aa[_0x876525(0x86c)]??this[_0x876525(0x86c)],_0x456ee4=Date[_0x876525(0x562)](),_0x2dc497={'holder':{'pid':process[_0x876525(0x242)],'hostname':_0x4be56e[_0x876525(0x506)](),..._0x561baf},'acquiredAt':_0x456ee4,'updatedAt':_0x456ee4,'ttlMs':_0x36048e};let _0x516dbb=![],_0x4719cd=null;if(this['_closed']())return{'acquired':![],'handle':null,'current':null};try{const _0x3b3dc9=()=>{const _0x248f1a=_0x876525,_0x19b61c=this['_db']()[_0x248f1a(0x5f1)](_0x19fe92);if(_0x19b61c&&!this[_0x248f1a(0x45d)](_0x19b61c)&&!_0x29f2df[_0x248f1a(0x40f)](_0x19b61c)){const _0x92ee74=_0x561baf[_0x248f1a(0x696)]!=null&&_0x19b61c[_0x248f1a(0x7de)][_0x248f1a(0x242)]===process[_0x248f1a(0x242)]&&_0x19b61c[_0x248f1a(0x7de)][_0x248f1a(0x696)]===_0x561baf[_0x248f1a(0x696)];if(!_0x92ee74){_0x516dbb=![],_0x4719cd=_0x19b61c;return;}_0x2dc497[_0x248f1a(0x344)]<=_0x19b61c[_0x248f1a(0x344)]&&(_0x2dc497[_0x248f1a(0x344)]=_0x19b61c[_0x248f1a(0x344)]+0x1,_0x2dc497[_0x248f1a(0x856)]=_0x2dc497[_0x248f1a(0x344)]);}this[_0x248f1a(0x475)]()['put'](_0x19fe92,_0x2dc497),_0x516dbb=!![],_0x4719cd=_0x2dc497;};if(_0x43d575)this[_0x876525(0x475)]()[_0x876525(0x86e)](_0x3b3dc9);else await this[_0x876525(0x475)]()[_0x876525(0x63d)](_0x3b3dc9);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x516dbb)return{'acquired':![],'handle':null,'current':_0x4719cd};const _0x520107=new _0x10f115(this,_0x19fe92,_0x2dc497[_0x876525(0x344)]);return _0x520107['_startHeartbeat'](_0x36048e,this['heartbeatMs']),{'acquired':!![],'handle':_0x520107,'current':_0x4719cd};}[_0x4cc224(0x64e)](_0x535dc6){const _0x28d54f=_0x4cc224;try{return this[_0x28d54f(0x475)]()[_0x28d54f(0x5f1)](this['_key'](_0x535dc6))??null;}catch{return null;}}['list'](){const _0x284464=_0x4cc224,_0x316c5a=this['namespace']+':',_0x369410=[];try{for(const {key:_0x48794c,value:_0x531672}of this['_db']()[_0x284464(0x482)]({'start':_0x316c5a,'end':_0x316c5a+'\xff'})){typeof _0x48794c===_0x284464(0x695)&&_0x48794c[_0x284464(0x32e)](_0x316c5a)&&_0x369410[_0x284464(0x677)]({'id':_0x48794c[_0x284464(0x747)](_0x316c5a[_0x284464(0x320)]),'entry':_0x531672});}}catch{}return _0x369410;}static[_0x4cc224(0x5df)](_0x15fffc){const _0x4f0376=_0x4cc224,_0x43c48a=[];try{const _0x70fe46=_0x15fffc[_0x4f0376(0x26d)](_0x5eb526,{'dupSort':![]});for(const {key:_0x4b127a,value:_0x5834e8}of _0x70fe46[_0x4f0376(0x482)]({})){if(typeof _0x4b127a!==_0x4f0376(0x695))continue;const _0x49febf=_0x4b127a[_0x4f0376(0x3fb)](':');if(_0x49febf<0x1)continue;_0x43c48a[_0x4f0376(0x677)]({'namespace':_0x4b127a[_0x4f0376(0x747)](0x0,_0x49febf),'id':_0x4b127a['slice'](_0x49febf+0x1),'entry':_0x5834e8});}}catch{}return _0x43c48a;}}return okdbLock={'OKDBLock':_0x29f2df},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function _0x438e(_0x3ff2af,_0x3f9cb8){_0x3ff2af=_0x3ff2af-0x160;const _0x5343be=_0x5343();let _0x438ea8=_0x5343be[_0x3ff2af];return _0x438ea8;}function requireOkdbProcessRegistry(){const _0x557709=_0x1d45b1;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x3105f8=require$$0,_0x113a32=require$$1$1,_0x2da71b=require$$2$1,{LOOP:_0xb4fe28}=requireOkdbLoopMonitor(),{OKDBLock:_0x2cc2fb}=requireOkdbLock(),{SYNC_COMMITS:_0x2d7e11}=requireOkdbWriter(),_0x6a3e36='~processes',_0x592786=_0x557709(0x3e1),_0x3b36f1=_0x557709(0x1c6),_0x5ebcef=_0x557709(0x6e2),_0x5ba42f=(_0x495733,_0x4ce62c)=>_0x495733+':'+_0x4ce62c,_0x908d74=(_0x5941d5,_0x599034)=>_0x5941d5+'::'+_0x599034,_0x43f74a=(_0x369e9a,_0x2f52e1)=>_0x369e9a+'/'+_0x2f52e1,_0x58256d=(_0x5c101c,_0xeae4e6)=>_0x5c101c+'#'+_0xeae4e6,_0x582fef=_0x20c13d=>{const _0x498c7b=_0x557709;if(_0x20c13d?.[_0x498c7b(0x59d)])return _0x20c13d[_0x498c7b(0x59d)];const _0x2e981c=_0x20c13d?.['nodeKey'];return typeof _0x2e981c===_0x498c7b(0x695)&&_0x2e981c['includes']('#')?_0x2e981c['slice'](0x0,_0x2e981c[_0x498c7b(0x3fb)]('#')):_0x2e981c;},_0x3a0ec2=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x2f8c6e=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x11f075=_0x3a0ec2*0x3,_0x327044=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x557709(0x456)](0x927c0,_0x11f075*0x14),_0x374c6a=[_0x557709(0x361),_0x557709(0x557),_0x557709(0x604),_0x557709(0x850),'processor:paused',_0x557709(0x1f7)];let _0xf2d9a5=null;function _0x20c3c5(){const _0x2afaaa=_0x557709;if(_0xf2d9a5==null)_0xf2d9a5=Math[_0x2afaaa(0x79c)]((Date[_0x2afaaa(0x562)]()-process[_0x2afaaa(0x83c)]()*0x3e8)/0x3e8)*0x3e8;return _0xf2d9a5;}function _0x2a7c51(_0x147581){const _0x5353e9=_0x557709;if(process.env.OKDB_PROCESS_KILL==='off')return![];if(_0x147581?.[_0x5353e9(0x33b)]?.[_0x5353e9(0x666)]&&typeof _0x147581['options'][_0x5353e9(0x666)]==='object'&&_0x147581[_0x5353e9(0x33b)][_0x5353e9(0x666)]['kill']===![])return![];return!![];}function _0x246ce2(_0x573b2,_0x54f81f){const _0x20d0db=_0x557709,_0x30dac9=!!_0x54f81f?.[_0x20d0db(0x190)];switch(_0x573b2){case _0x20d0db(0x4db):return{'controllable':_0x30dac9,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x20d0db(0x3fd):case _0x20d0db(0x221):return{'controllable':_0x30dac9,'decommissionable':![],'killable':!![],'killConfirm':_0x20d0db(0x1cf)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x20d0db(0x7d5):case _0x20d0db(0x759):case _0x20d0db(0x4b1):case _0x20d0db(0x307):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x2733de{constructor(_0x14c825){const _0x3c7d88=_0x557709;this[_0x3c7d88(0x525)]=_0x14c825,this[_0x3c7d88(0x2d8)]=null,this[_0x3c7d88(0x7ee)]=null,this[_0x3c7d88(0x5fb)]=new Map(),this['_cmd']=null,this[_0x3c7d88(0x38a)]=![],this[_0x3c7d88(0x5a8)]=![],this[_0x3c7d88(0x4d2)]=_0x20c3c5(),this[_0x3c7d88(0x718)]=_0x5ba42f(process[_0x3c7d88(0x242)],this[_0x3c7d88(0x4d2)]),this['_instanceId']=_0x2da71b[_0x3c7d88(0x57c)]()[_0x3c7d88(0x747)](0x0,0x8),this['_rowKey']=_0x58256d(this[_0x3c7d88(0x718)],this['_instanceId']),this[_0x3c7d88(0x454)]=Date['now'](),this['_kind']=null,this['_supervisorKey']=null,this[_0x3c7d88(0x5af)]=null,this[_0x3c7d88(0x164)]=null,this[_0x3c7d88(0x7d3)]=null,this['_onTick']=null,this[_0x3c7d88(0x58f)]=0x0,this['_ownMeta']={},this[_0x3c7d88(0x621)]=new Map(),this[_0x3c7d88(0x325)]=process['cpuUsage'](),this[_0x3c7d88(0x3be)]=Date[_0x3c7d88(0x562)](),this[_0x3c7d88(0x2d5)]=0x0,this[_0x3c7d88(0x6bf)]=new Map();}get[_0x557709(0x82f)](){const _0x5d8da=_0x557709;return this[_0x5d8da(0x718)];}get['rowKey'](){const _0x5339c3=_0x557709;return this[_0x5339c3(0x48d)];}[_0x557709(0x4ce)](_0x5c4eca,_0x13d2a3){const _0x221d0c=_0x557709,_0x1d1c80=_0x246ce2(_0x5c4eca,_0x13d2a3);if(_0x1d1c80[_0x221d0c(0x52f)]&&!_0x2a7c51(this[_0x221d0c(0x525)]))return{..._0x1d1c80,'killable':![],'killConfirm':undefined};return _0x1d1c80;}[_0x557709(0x87d)](){return!!this['_statusEnv'];}[_0x557709(0x801)](_0x5bd056){const _0x21a023=_0x557709;Object[_0x21a023(0x6b5)](this['_ownMeta'],_0x5bd056||{});}[_0x557709(0x54d)](_0x554b42){const _0x17fbc5=_0x557709;if(_0x554b42)this[_0x17fbc5(0x5af)]=_0x554b42;}[_0x557709(0x5ae)](_0x12a5a1={}){const _0x3a18cb=_0x557709;return this['okdb'][_0x3a18cb(0x35f)](_0x12a5a1);}[_0x557709(0x401)](){const _0x13c984=_0x557709,_0x473830={};let _0x3f1c9d=0x0,_0x2528cb=0x0;const _0x339ac7=new Set();for(const _0x2ecd83 of this[_0x13c984(0x80b)]()){_0x2528cb++;const _0x2455d8=_0x2ecd83[_0x13c984(0x574)];if(!_0x2455d8)continue;if(_0x2455d8[_0x13c984(0x83e)])_0x3f1c9d++;for(const _0x5a0787 of _0x2455d8[_0x13c984(0x190)]||[]){if(![_0x13c984(0x583),_0x13c984(0x829)]['includes'](_0x5a0787[_0x13c984(0x49f)]))continue;(_0x5a0787[_0x13c984(0x36e)]==='online'||_0x5a0787[_0x13c984(0x36e)]===_0x13c984(0x711))&&_0x5a0787[_0x13c984(0x769)]&&_0x339ac7['add']((_0x5a0787[_0x13c984(0x684)]||_0x13c984(0x3a1))+':'+_0x5a0787[_0x13c984(0x769)]);const _0x349d55=_0x5a0787['env']||_0x13c984(0x3a1);(_0x473830[_0x349d55]||=[])[_0x13c984(0x677)]({..._0x5a0787,'env':_0x349d55,'owner':{'pid':_0x2ecd83[_0x13c984(0x242)]??null,'kind':_0x2ecd83[_0x13c984(0x5be)]??null}});}}for(const [_0x34031b,_0xf8e392]of Object[_0x13c984(0x5bd)](_0x473830)){for(const _0x1e5a45 of _0xf8e392){if(_0x1e5a45[_0x13c984(0x49f)]===_0x13c984(0x583)&&!_0x1e5a45['claimGated']){const _0x11b018=_0x34031b+':'+(_0x1e5a45['cursorKey']??'');if(!_0x339ac7['has'](_0x11b018))_0x1e5a45[_0x13c984(0x2d6)]=!![];}}}return{'envs':_0x473830,'policy':null,'participation':{'participating':_0x3f1c9d,'total':_0x2528cb},'source':_0x13c984(0x633)};}[_0x557709(0x57f)](){const _0x1c609f=_0x557709,_0x282522=_0x34881c=>{const _0x18aaea=_0x438e;if(_0x34881c[_0x18aaea(0x36e)]==='online'||_0x34881c[_0x18aaea(0x36e)]===_0x18aaea(0x711)||_0x34881c[_0x18aaea(0x36e)]===_0x18aaea(0x4dd))return 0x3;if(_0x34881c[_0x18aaea(0x288)])return 0x1;return 0x2;},_0x10e22c=new Map();for(const _0x18008d of this['listNodes']()){for(const _0x295f81 of _0x18008d[_0x1c609f(0x574)]?.[_0x1c609f(0x190)]||[]){const _0x523772={..._0x295f81,'owner':{'pid':_0x18008d[_0x1c609f(0x242)]??null,'kind':_0x18008d[_0x1c609f(0x5be)]??null,'host':_0x18008d[_0x1c609f(0x7ce)]??null}},_0x404370=_0x295f81[_0x1c609f(0x49f)]===_0x1c609f(0x583)?_0x1c609f(0x518)+(_0x295f81[_0x1c609f(0x684)]??'')+'::'+(_0x295f81['cursorKey']??_0x295f81[_0x1c609f(0x51d)]??_0x295f81['id']):_0x1c609f(0x7d7)+(_0x18008d[_0x1c609f(0x443)]??_0x18008d['processKey']??'')+'::'+(_0x295f81[_0x1c609f(0x684)]??'')+'::'+_0x295f81['id'],_0x1ea877=_0x10e22c[_0x1c609f(0x5f1)](_0x404370);if(!_0x1ea877||_0x282522(_0x523772)>_0x282522(_0x1ea877))_0x10e22c[_0x1c609f(0x4a3)](_0x404370,_0x523772);}}return[..._0x10e22c[_0x1c609f(0x678)]()];}[_0x557709(0x3a4)](){const _0x49cd46=_0x557709,_0x1a092d=Date[_0x49cd46(0x562)](),_0x46f311=this['listNodes'](),_0x135ad9=_0x277f94=>Math['max'](0x0,Math['round']((_0x1a092d-(_0x277f94['startedAt']||_0x1a092d))/0x3e8)),_0x585b82=_0x46f311[_0x49cd46(0x868)](_0x1a02bd=>_0x1a02bd[_0x49cd46(0x5be)]===_0x49cd46(0x4db)),_0x324ae6=_0x46f311[_0x49cd46(0x626)](_0x1430c9=>_0x1430c9[_0x49cd46(0x5be)]===_0x49cd46(0x7d5));if(_0x585b82||_0x324ae6['length'])return{'primary':_0x585b82?{'pid':_0x585b82[_0x49cd46(0x242)],'uptime':_0x135ad9(_0x585b82)}:null,'workers':_0x324ae6[_0x49cd46(0x800)](_0x1eeb1b=>({'pid':_0x1eeb1b['pid'],'uptime':_0x135ad9(_0x1eeb1b)})),'workersConfigured':_0x585b82?.[_0x49cd46(0x338)]?.['workersConfigured']??_0x324ae6[_0x49cd46(0x320)],'mode':_0x49cd46(0x2a7)};const _0x943915=_0x46f311[_0x49cd46(0x868)](_0x2eb5b6=>_0x2eb5b6[_0x49cd46(0x5be)]===_0x49cd46(0x3fd)||_0x2eb5b6[_0x49cd46(0x5be)]===_0x49cd46(0x221)||_0x2eb5b6[_0x49cd46(0x5be)]===_0x49cd46(0x851)),_0xcd4388=_0x943915?{'pid':_0x943915['pid'],'uptime':_0x135ad9(_0x943915)}:{'pid':process[_0x49cd46(0x242)],'uptime':Math[_0x49cd46(0x456)](0x0,Math[_0x49cd46(0x79c)](process['uptime']()))};return{'primary':_0xcd4388,'workers':[_0xcd4388],'workersConfigured':0x1,'mode':_0x49cd46(0x583)};}['nodesView'](){return this['_groupByProcess']();}[_0x557709(0x7c8)](){const _0x534ba6=_0x557709,_0x414b38=new Map();for(const _0x505089 of this[_0x534ba6(0x5d0)]())_0x414b38[_0x534ba6(0x4a3)](_0x505089['processKey'],{..._0x505089,'children':[]});const _0xbd562d=[];for(const _0x4ecc02 of _0x414b38[_0x534ba6(0x678)]()){const _0xa92e73=_0x4ecc02['supervisorKey']?_0x414b38[_0x534ba6(0x5f1)](_0x4ecc02[_0x534ba6(0x74b)]):null;if(_0xa92e73&&_0xa92e73!==_0x4ecc02)_0xa92e73[_0x534ba6(0x84a)]['push'](_0x4ecc02);else _0xbd562d[_0x534ba6(0x677)](_0x4ecc02);}const _0x3acf7a=(_0x20d1ea,_0x1c3c03)=>_0x20d1ea[_0x534ba6(0x5be)]===_0x1c3c03[_0x534ba6(0x5be)]?(_0x20d1ea[_0x534ba6(0x242)]||0x0)-(_0x1c3c03[_0x534ba6(0x242)]||0x0):(_0x20d1ea['kind']??'')<(_0x1c3c03[_0x534ba6(0x5be)]??'')?-0x1:0x1,_0x360828=_0x5b3ac7=>{const _0x36095a=_0x534ba6;_0x5b3ac7['sort'](_0x3acf7a);for(const _0x117f89 of _0x5b3ac7)if(_0x117f89['children'][_0x36095a(0x320)])_0x360828(_0x117f89['children']);};return _0x360828(_0xbd562d),_0xbd562d;}[_0x557709(0x1c8)](_0x45f843){const _0x14b90a=_0x557709;return this[_0x14b90a(0x5d0)]()[_0x14b90a(0x868)](_0x5e02bd=>_0x5e02bd[_0x14b90a(0x59d)]===_0x45f843)??null;}[_0x557709(0x5d0)](_0x3005ec=Date['now']()){const _0x433182=_0x557709,_0x1184f4=new Map();for(const _0x3eb0b0 of this[_0x433182(0x80b)]()){const _0x191b24=_0x582fef(_0x3eb0b0);let _0x2e5a07=_0x1184f4[_0x433182(0x5f1)](_0x191b24);!_0x2e5a07&&(_0x2e5a07={'processKey':_0x191b24,'nodeKey':_0x191b24,'pid':_0x3eb0b0['pid'],'ppid':_0x3eb0b0['ppid']??null,'host':_0x3eb0b0[_0x433182(0x7ce)]??null,'kind':_0x3eb0b0['kind'],'role':null,'supervisorKey':_0x3eb0b0[_0x433182(0x74b)]??null,'slot':_0x3eb0b0['slot']??null,'slotKey':_0x3eb0b0[_0x433182(0x309)]??null,'caps':_0x3eb0b0[_0x433182(0x5d9)]??null,'lifecycle':_0x3eb0b0[_0x433182(0x502)]??null,'uptime':Math[_0x433182(0x456)](0x0,Math[_0x433182(0x79c)]((_0x3005ec-(_0x3eb0b0[_0x433182(0x3bd)]||_0x3005ec))/0x3e8)),'startedAt':_0x3eb0b0[_0x433182(0x3bd)]??null,'meta':_0x3eb0b0[_0x433182(0x338)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x1184f4['set'](_0x191b24,_0x2e5a07));_0x2e5a07['instances'][_0x433182(0x677)]({'instanceId':_0x3eb0b0[_0x433182(0x1d2)]??null,'role':_0x3eb0b0[_0x433182(0x4f4)]??null,'listenAddr':_0x3eb0b0[_0x433182(0x641)]??null,'lifecycle':_0x3eb0b0[_0x433182(0x502)]??null,'processing':_0x3eb0b0['processing']??null});if(!_0x2e5a07[_0x433182(0x4f4)]&&_0x3eb0b0[_0x433182(0x4f4)])_0x2e5a07[_0x433182(0x4f4)]=_0x3eb0b0['role'];if(!_0x2e5a07[_0x433182(0x641)]&&_0x3eb0b0[_0x433182(0x641)])_0x2e5a07[_0x433182(0x641)]=_0x3eb0b0[_0x433182(0x641)];if(!_0x2e5a07[_0x433182(0x574)]&&_0x3eb0b0[_0x433182(0x574)])_0x2e5a07[_0x433182(0x574)]=_0x3eb0b0['processing'];if(!_0x2e5a07[_0x433182(0x667)]&&_0x3eb0b0[_0x433182(0x667)])_0x2e5a07[_0x433182(0x667)]=_0x3eb0b0[_0x433182(0x667)];if(!_0x2e5a07[_0x433182(0x1c9)]&&_0x3eb0b0[_0x433182(0x1c9)])_0x2e5a07[_0x433182(0x1c9)]=_0x3eb0b0[_0x433182(0x1c9)];if(_0x2e5a07[_0x433182(0x5d9)]==null&&_0x3eb0b0['caps'])_0x2e5a07[_0x433182(0x5d9)]=_0x3eb0b0[_0x433182(0x5d9)];if(_0x3eb0b0[_0x433182(0x479)]&&(!_0x2e5a07['stats']||(_0x3eb0b0[_0x433182(0x479)]['at']??0x0)>(_0x2e5a07['stats']['at']??0x0)))_0x2e5a07[_0x433182(0x479)]=_0x3eb0b0[_0x433182(0x479)];}return[..._0x1184f4['values']()];}[_0x557709(0x301)](){const _0x477957=_0x557709,_0x3b7a86=[],_0x71f28e={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x7d4ae4 of this[_0x477957(0x5d0)]()){_0x3b7a86['push']({'processKey':_0x7d4ae4[_0x477957(0x59d)],'kind':_0x7d4ae4[_0x477957(0x5be)],'pid':_0x7d4ae4[_0x477957(0x242)],'supervisorKey':_0x7d4ae4[_0x477957(0x74b)],'meta':_0x7d4ae4[_0x477957(0x338)]??null,'uptime':_0x7d4ae4['uptime'],'stats':_0x7d4ae4[_0x477957(0x479)]??null}),_0x71f28e['processes']++;if(_0x7d4ae4[_0x477957(0x479)]){_0x71f28e[_0x477957(0x7f2)]+=_0x7d4ae4[_0x477957(0x479)][_0x477957(0x7f2)]||0x0,_0x71f28e[_0x477957(0x5f0)]+=(_0x7d4ae4[_0x477957(0x479)][_0x477957(0x5f0)]||0x0)+(_0x7d4ae4[_0x477957(0x479)]['threads']?.[_0x477957(0x5f0)]||0x0);const _0x5ac739=_0x7d4ae4[_0x477957(0x479)]['threads'];_0x5ac739&&(_0x71f28e[_0x477957(0x378)][_0x477957(0x3e3)]+=_0x5ac739['count']||0x0,_0x71f28e[_0x477957(0x378)][_0x477957(0x26c)]+=_0x5ac739[_0x477957(0x26c)]||0x0,_0x71f28e['threads'][_0x477957(0x7d2)]+=_0x5ac739[_0x477957(0x7d2)]||0x0);}}return{'totals':_0x71f28e,'nodes':_0x3b7a86};}async[_0x557709(0x241)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1a9a3f=_0x557709;this[_0x1a9a3f(0x38a)]=this['_isWriter']||!!writer,this[_0x1a9a3f(0x5a8)]=this['_isReader']||!!reader,this['_kind']=kind||this['_kind']||(_0x113a32['isWorker']?_0x1a9a3f(0x7d5):_0x1a9a3f(0x3fd)),this[_0x1a9a3f(0x245)]=supervisorKey??this[_0x1a9a3f(0x245)],this[_0x1a9a3f(0x5af)]=listenAddr??this[_0x1a9a3f(0x5af)],this[_0x1a9a3f(0x3e7)](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x1a9a3f(0x2d8)]){const _0x2c06bd=await this['okdb']['createEnvironment'](_0x6a3e36,{'sync':![],'durability':_0x1a9a3f(0x752)});await _0x2c06bd[_0x1a9a3f(0x29e)](_0x592786),this['_statusEnv']=_0x2c06bd;}return this[_0x1a9a3f(0x2d8)];}[_0x557709(0x6d1)](){const _0x3b00e7=_0x557709;return this[_0x3b00e7(0x6a2)]!==this[_0x3b00e7(0x2d8)]&&(this[_0x3b00e7(0x6a2)]=this[_0x3b00e7(0x2d8)],this[_0x3b00e7(0x43b)]=this[_0x3b00e7(0x2d8)][_0x3b00e7(0x499)](_0x592786)[_0x3b00e7(0x524)]),this[_0x3b00e7(0x43b)];}[_0x557709(0x392)](_0x552e36){const _0x332f1f=_0x557709;if(_0x2d7e11)return this['_nodeDb']()['putSync'](_0x552e36[_0x332f1f(0x443)],_0x552e36,0x1);const _0x201e9c=this[_0x332f1f(0x6d1)]()[_0x332f1f(0x250)](_0x552e36[_0x332f1f(0x443)],_0x552e36,0x1);if(_0x201e9c&&typeof _0x201e9c['then']===_0x332f1f(0x807))_0x201e9c[_0x332f1f(0x19c)](undefined,()=>{});return _0x201e9c;}['_putRowSync'](_0x1bc9d4){const _0x495bba=_0x557709;return this[_0x495bba(0x6d1)]()[_0x495bba(0x34d)](_0x1bc9d4[_0x495bba(0x443)],_0x1bc9d4,0x1);}[_0x557709(0x3f5)](_0x593be4){const _0xfff3bf=_0x557709;if(_0x2d7e11)try{return this[_0xfff3bf(0x6d1)]()[_0xfff3bf(0x3c2)](_0x593be4);}catch{return![];}const _0x59f29d=this[_0xfff3bf(0x6d1)]()[_0xfff3bf(0x323)](_0x593be4);if(_0x59f29d&&typeof _0x59f29d[_0xfff3bf(0x19c)]==='function')_0x59f29d[_0xfff3bf(0x19c)](undefined,()=>{});return _0x59f29d;}async['putNode'](_0x1e68f5){const _0x7f6e4a=_0x557709;if(!this['_statusEnv']||!this[_0x7f6e4a(0x38a)]||!_0x1e68f5?.[_0x7f6e4a(0x443)])return;return this[_0x7f6e4a(0x392)](_0x1e68f5);}async[_0x557709(0x6c3)](_0x3e3bbf){const _0x11ff8d=_0x557709;if(!this[_0x11ff8d(0x2d8)]||!this[_0x11ff8d(0x38a)]||!_0x3e3bbf)return;const _0x23f7f8=_0x3e3bbf['includes']('#'),_0x2439f2=[];for(const {key:_0x4109f2}of this['_statusEnv'][_0x11ff8d(0x482)](_0x592786)){if(_0x4109f2===_0x3e3bbf||!_0x23f7f8&&typeof _0x4109f2==='string'&&_0x4109f2[_0x11ff8d(0x32e)](_0x3e3bbf+'#'))_0x2439f2[_0x11ff8d(0x677)](_0x4109f2);}for(const _0x4da30e of _0x2439f2){try{this[_0x11ff8d(0x6d1)]()[_0x11ff8d(0x3c2)](_0x4da30e);}catch{}}}['_nodeDead'](_0x22d512){const _0x289311=_0x557709;if(typeof _0x22d512?.['pid']!==_0x289311(0x656))return![];if(_0x22d512[_0x289311(0x7ce)]!==_0x3105f8[_0x289311(0x506)]())return![];if(_0x22d512[_0x289311(0x242)]===process[_0x289311(0x242)])return![];if(_0x22d512['expiresAt']!=null&&_0x22d512[_0x289311(0x1f8)]<Date[_0x289311(0x562)]()-_0x327044)return!![];try{return process[_0x289311(0x397)](_0x22d512['pid'],0x0),![];}catch(_0x3cdba5){return _0x3cdba5[_0x289311(0x779)]===_0x289311(0x773);}}[_0x557709(0x80b)](){const _0x534ecc=_0x557709;if(!this[_0x534ecc(0x2d8)])return[];try{this[_0x534ecc(0x2d8)]['db']?.['resetReadTxn']?.();}catch{}const _0x35326e=Date[_0x534ecc(0x562)](),_0x227dc5=_0x3105f8[_0x534ecc(0x506)](),_0x440075=[];for(const {value:_0x3445ce}of this['_statusEnv'][_0x534ecc(0x482)](_0x592786)){if(!_0x3445ce)continue;let _0x59981f=null;_0x3445ce[_0x534ecc(0x7ce)]===_0x227dc5&&typeof _0x3445ce[_0x534ecc(0x242)]===_0x534ecc(0x656)&&(_0x59981f=!this['_nodeDead'](_0x3445ce));if(_0x59981f===![])continue;const _0x5de5d8=_0x3445ce[_0x534ecc(0x1f8)]==null||_0x3445ce[_0x534ecc(0x1f8)]>=_0x35326e;if(_0x59981f===!![]||_0x5de5d8)_0x440075[_0x534ecc(0x677)](_0x3445ce);}return _0x440075;}async['reap'](_0x44fa08=0x0){const _0x348668=_0x557709;if(!this[_0x348668(0x2d8)]||!this['_isWriter'])return;const _0x1db168=Date[_0x348668(0x562)]()-_0x44fa08,_0x102a8d=new Set(),_0x49f363=[],_0x337909=_0x3105f8[_0x348668(0x506)](),_0x3631a9=require$$3['version'];for(const {key:_0x3347fe,value:_0x291c6a}of this['_statusEnv']['getRange'](_0x592786)){if(!_0x291c6a)continue;const _0x4c4554=_0x291c6a['host']===_0x337909&&typeof _0x291c6a[_0x348668(0x242)]==='number',_0x291924=_0x4c4554?this[_0x348668(0x6c0)](_0x291c6a):_0x291c6a[_0x348668(0x1f8)]!=null&&_0x291c6a['expiresAt']<_0x1db168;if(_0x291924)_0x49f363[_0x348668(0x677)](_0x3347fe);else{_0x102a8d[_0x348668(0x5e5)](_0x582fef(_0x291c6a)??_0x3347fe);if(_0x291c6a[_0x348668(0x881)]&&_0x291c6a[_0x348668(0x881)]!==_0x3631a9){if(!this['_versionSkewWarned'])this[_0x348668(0x199)]=new Set();!this[_0x348668(0x199)][_0x348668(0x514)](_0x291c6a[_0x348668(0x881)])&&(this[_0x348668(0x199)][_0x348668(0x5e5)](_0x291c6a['version']),this[_0x348668(0x525)][_0x348668(0x808)]?.[_0x348668(0x4fb)]?.(_0x348668(0x20b)+(_0x291c6a['pid']??'?')+_0x348668(0x41c)+_0x291c6a[_0x348668(0x881)]+_0x348668(0x18d)+_0x3631a9+_0x348668(0x5ed)+_0x348668(0x167),{'feature':'migrations'}));}}}for(const _0x2cf673 of _0x49f363)this['_removeRowAsync'](_0x2cf673);if(this[_0x348668(0x3e7)]()){const _0x7b5aaf=[];for(const {key:_0xe3bdd8}of this[_0x348668(0x708)]('node')){if(!_0x102a8d[_0x348668(0x514)](_0xe3bdd8)){if(_0x2d7e11)try{this[_0x348668(0x7ee)][_0x348668(0x3c2)](_0x348668(0x5d2)+_0xe3bdd8);}catch{}else _0x7b5aaf[_0x348668(0x677)](this[_0x348668(0x7ee)]['remove'](_0x348668(0x5d2)+_0xe3bdd8));}}if(_0x7b5aaf[_0x348668(0x320)])await Promise[_0x348668(0x2bc)](_0x7b5aaf);}}[_0x557709(0x83d)](_0x201de7=null){const _0x5b676f=_0x557709;if(this['_hbTimer'])return;if(!this['_isWriter']||!this[_0x5b676f(0x2d8)]){this[_0x5b676f(0x525)]?.[_0x5b676f(0x808)]?.[_0x5b676f(0x4fb)]?.(_0x5b676f(0x2ec)+this['_isWriter']+'\x20statusEnv='+!!this[_0x5b676f(0x2d8)]+_0x5b676f(0x658),{'feature':'processes'});return;}this[_0x5b676f(0x6bb)]=_0x201de7,this[_0x5b676f(0x7d3)]=()=>this['_maybePublish']();for(const _0x5a8bdb of _0x374c6a)this['okdb']['events']['on'](_0x5a8bdb,this[_0x5b676f(0x7d3)]);this[_0x5b676f(0x7da)]();const _0x10b61e=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x3a0ec2;this[_0x5b676f(0x164)]=setInterval(()=>{const _0x1f72fe=_0x5b676f;if(this[_0x1f72fe(0x6bb)])try{this[_0x1f72fe(0x6bb)]();}catch{}this['_publishNow'](),this[_0x1f72fe(0x35e)]()['catch'](()=>{});},_0x10b61e);if(this[_0x5b676f(0x164)]['unref'])this[_0x5b676f(0x164)][_0x5b676f(0x27a)]();}[_0x557709(0x82a)](){const _0x527cf3=_0x557709;if(!this['_isWriter']||!this[_0x527cf3(0x2d8)])return;if(Date['now']()-this[_0x527cf3(0x58f)]<_0x2f8c6e)return;this[_0x527cf3(0x7da)]();}[_0x557709(0x7da)](){const _0x27130b=_0x557709;if(!this['_isWriter']||!this['_statusEnv'])return;this[_0x27130b(0x58f)]=Date[_0x27130b(0x562)]();try{const _0x49782b=[this[_0x27130b(0x7b9)]()];for(const _0x494072 of this[_0x27130b(0x621)][_0x27130b(0x678)]())_0x49782b['push'](this[_0x27130b(0x68b)](_0x494072));const _0x3297e5=_0xb4fe28[_0x27130b(0x195)]?_0xb4fe28[_0x27130b(0x562)]():0x0;for(const _0x3d0aeb of _0x49782b){try{this[_0x27130b(0x4a8)](_0x3d0aeb),this[_0x27130b(0x5cd)]=![];}catch(_0x58b7e1){!this[_0x27130b(0x5cd)]&&(this['_publishFailWarned']=!![],this[_0x27130b(0x525)]?.[_0x27130b(0x808)]?.[_0x27130b(0x4fb)]?.('registry\x20publish\x20failing:\x20'+_0x58b7e1['message'],{'feature':_0x27130b(0x666)}));}}if(_0xb4fe28[_0x27130b(0x195)])_0xb4fe28['note'](_0x27130b(0x676),_0xb4fe28[_0x27130b(0x562)]()-_0x3297e5,_0x27130b(0x1a0)+_0x49782b[_0x27130b(0x320)]+_0x27130b(0x5d8));}catch(_0x2ebc91){!this[_0x27130b(0x5cd)]&&(this[_0x27130b(0x5cd)]=!![],this[_0x27130b(0x525)]?.[_0x27130b(0x808)]?.['warn']?.(_0x27130b(0x620)+_0x2ebc91['message'],{'feature':'processes'}));}}async[_0x557709(0x3d3)](){const _0x5a6d58=_0x557709;if(this[_0x5a6d58(0x7d3)]){for(const _0x61648e of _0x374c6a){try{this[_0x5a6d58(0x525)][_0x5a6d58(0x20a)][_0x5a6d58(0x209)](_0x61648e,this[_0x5a6d58(0x7d3)]);}catch{}}this[_0x5a6d58(0x7d3)]=null;}this['_hbTimer']&&(clearInterval(this[_0x5a6d58(0x164)]),this[_0x5a6d58(0x164)]=null);try{if(this[_0x5a6d58(0x2d8)]&&this[_0x5a6d58(0x38a)])await this[_0x5a6d58(0x6c3)](this['_rowKey']);}catch{}}async[_0x557709(0x19f)](){const _0x446fd0=_0x557709;if(!this[_0x446fd0(0x2d8)]||!this['_isWriter'])return;try{await this['removeNode'](this[_0x446fd0(0x48d)]);}catch{}try{const _0x281da7=[];for(const {value:_0x102b17}of this[_0x446fd0(0x2d8)][_0x446fd0(0x482)](_0x592786)){if(_0x102b17?.[_0x446fd0(0x873)]===process[_0x446fd0(0x242)]&&_0x102b17[_0x446fd0(0x443)])_0x281da7[_0x446fd0(0x677)](_0x102b17[_0x446fd0(0x443)]);}for(const _0x240b3e of _0x281da7){try{await this['removeNode'](_0x240b3e);}catch{}}}catch{}}async['publishOwnRow'](){const _0x2e1212=_0x557709;return this[_0x2e1212(0x2bb)](this[_0x2e1212(0x7b9)]());}async[_0x557709(0x2f2)](_0x907b46){const _0x2c9f81=_0x557709;if(!this['_statusEnv']||!this['_isWriter'])return;return this[_0x2c9f81(0x2bb)](this['_buildChildRow'](_0x907b46));}[_0x557709(0x68b)]({pid:_0x329cc7,startedAt:_0x2b7573,kind:_0x19292c,supervisorKey:_0x53b0c9,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x557709(0x61d),meta:meta=null,stats:stats=null}){const _0x434082=_0x557709,_0x554e49=Date['now'](),_0x2b8e4c=_0x5ba42f(_0x329cc7,_0x2b7573);return{'nodeKey':_0x58256d(_0x2b8e4c,'0'),'processKey':_0x2b8e4c,'instanceId':'0','pid':_0x329cc7,'startedAt':_0x2b7573,'ppid':process[_0x434082(0x242)],'host':_0x3105f8[_0x434082(0x506)](),'supervisorKey':_0x53b0c9,'slot':slot,'slotKey':slotKey,'kind':_0x19292c,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x554e49,'expiresAt':_0x554e49+_0x11f075,'caps':this[_0x434082(0x4ce)](_0x19292c,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x1f3763){const _0x49d504=_0x557709;if(!_0x1f3763?.[_0x49d504(0x242)])return null;const _0x1dc8a6=_0x5ba42f(_0x1f3763['pid'],_0x1f3763[_0x49d504(0x3bd)]);this['_children'][_0x49d504(0x4a3)](_0x1dc8a6,{..._0x1f3763,'supervisorKey':_0x1f3763[_0x49d504(0x74b)]??this[_0x49d504(0x718)]});if(this[_0x49d504(0x38a)])await this[_0x49d504(0x2f2)](this['_children'][_0x49d504(0x5f1)](_0x1dc8a6))[_0x49d504(0x613)]?.(()=>{});return _0x1dc8a6;}[_0x557709(0x299)](_0x430837){const _0x590ab5=_0x557709;if(!_0x430837)return;return this[_0x590ab5(0x621)]['delete'](_0x430837),this[_0x590ab5(0x6c3)](_0x430837);}[_0x557709(0x516)](){const _0x3c1216=_0x557709,_0x12cfc4=Date[_0x3c1216(0x562)](),_0x481920=process[_0x3c1216(0x2ff)](),_0x5dbb5e=(_0x12cfc4-this[_0x3c1216(0x3be)])*0x3e8;if(_0x5dbb5e>=0x3d090){const _0x4e1842=_0x481920[_0x3c1216(0x3b6)]-this[_0x3c1216(0x325)][_0x3c1216(0x3b6)]+(_0x481920[_0x3c1216(0x1ae)]-this[_0x3c1216(0x325)][_0x3c1216(0x1ae)]),_0x55776f=_0x3105f8[_0x3c1216(0x58b)]()['length']||0x1;this['_lastCpuPct']=Math[_0x3c1216(0x754)](0x64,Math[_0x3c1216(0x79c)](_0x4e1842/(_0x5dbb5e*_0x55776f)*0x64)),this['_lastCpuWindowMs']=Math[_0x3c1216(0x79c)](_0x5dbb5e/0x3e8),this[_0x3c1216(0x325)]=_0x481920,this['_lastCpuAt']=_0x12cfc4;}const _0x1d225e=process[_0x3c1216(0x54c)](),_0x421bac=this[_0x3c1216(0x6bf)][_0x3c1216(0x569)];let _0x4b87e4=0x0;if(_0x421bac>0x0){const _0x45a111=[this[_0x3c1216(0x525)],...this['okdb'][_0x3c1216(0x789)]?.[_0x3c1216(0x678)]?.()??[]];for(const _0x3091d8 of _0x45a111){const _0x234df1=_0x3091d8['functions']?.['_sandbox'];if(_0x234df1)_0x4b87e4+=_0x234df1[_0x3c1216(0x27b)][_0x3c1216(0x7d2)];}}let _0x440b0e=null;const _0xaa19d8=_0x421bac;if(_0xaa19d8>0x0){let _0x530d25=0x0;for(const _0x626f51 of this[_0x3c1216(0x6bf)][_0x3c1216(0x678)]())_0x530d25+=_0x626f51[_0x3c1216(0x5f0)]||0x0;_0x440b0e={'count':_0xaa19d8,'heapUsed':_0x530d25,'sandbox':_0x421bac,'busy':_0x4b87e4};}return{'rss':_0x1d225e[_0x3c1216(0x7f2)],'heapUsed':_0x1d225e[_0x3c1216(0x5f0)],'heapTotal':_0x1d225e[_0x3c1216(0x668)],'external':_0x1d225e['external'],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x3c1216(0x5ee)]??null,'threads':_0x440b0e,'at':_0x12cfc4};}['reportThreadStats'](_0x10d552,_0x67fc4b){const _0x4fc577=_0x557709;if(!_0x10d552||!_0x67fc4b)return;this['_threadStats'][_0x4fc577(0x4a3)](_0x10d552,_0x67fc4b);}[_0x557709(0x211)](_0x106c39){const _0x1b9f82=_0x557709;this[_0x1b9f82(0x6bf)][_0x1b9f82(0x4b0)](_0x106c39);}['updateSupervisedChildStats'](_0x3d2dd1,_0x3cbdd4,_0x360104=undefined){const _0x2cf6cd=_0x557709,_0x49571c=this[_0x2cf6cd(0x621)][_0x2cf6cd(0x5f1)](_0x3d2dd1);if(!_0x49571c||!_0x3cbdd4)return;if(_0x360104!==undefined)_0x49571c['processing']=_0x360104;_0x49571c[_0x2cf6cd(0x479)]={'rss':_0x3cbdd4[_0x2cf6cd(0x7f2)]??null,'heapUsed':_0x3cbdd4['heapUsed']??null,'heapTotal':_0x3cbdd4[_0x2cf6cd(0x668)]??null,'external':_0x3cbdd4[_0x2cf6cd(0x500)]??null,'cpuPct':_0x3cbdd4[_0x2cf6cd(0x45c)]??null,'cpuWindowMs':_0x3cbdd4[_0x2cf6cd(0x1ec)]??null,'threads':_0x3cbdd4['threads']??null,'claims':_0x3cbdd4['claims']??null,'envsOpen':_0x3cbdd4[_0x2cf6cd(0x480)]??null,'at':Date[_0x2cf6cd(0x562)]()};}[_0x557709(0x7b9)](){const _0x408f3d=_0x557709,_0x277e32=Date[_0x408f3d(0x562)](),_0x5b556b=this[_0x408f3d(0x525)][_0x408f3d(0x418)]||{},_0xef4b4c=this[_0x408f3d(0x180)]||_0x408f3d(0x3fd);return{'nodeKey':this[_0x408f3d(0x48d)],'processKey':this['_selfKey'],'instanceId':this[_0x408f3d(0x42d)],'pid':process['pid'],'startedAt':this[_0x408f3d(0x4d2)],'instanceStartedAt':this[_0x408f3d(0x454)],'ppid':typeof process['ppid']===_0x408f3d(0x656)?process[_0x408f3d(0x873)]:null,'host':_0x3105f8[_0x408f3d(0x506)](),'supervisorKey':this[_0x408f3d(0x245)]??null,'version':require$$3[_0x408f3d(0x881)],'kind':_0xef4b4c,'role':{'engines':!!_0x5b556b[_0x408f3d(0x667)],'processors':!!_0x5b556b[_0x408f3d(0x190)],'compaction':_0x5b556b[_0x408f3d(0x5ff)],'http':_0x5b556b[_0x408f3d(0x2b8)]},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0x277e32,'expiresAt':_0x277e32+_0x11f075,'caps':this['_caps'](_0xef4b4c,_0x5b556b),'lifecycle':{'state':_0x408f3d(0x61d),'desiredVersionApplied':null},'meta':{...this[_0x408f3d(0x1b9)]},'processing':_0x5b556b['processors']?this[_0x408f3d(0x428)]():null,'engines':_0x5b556b['engines']?[...this[_0x408f3d(0x525)]['_servingEngines']??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x408f3d(0x516)](),'writers':this[_0x408f3d(0x728)]()};}['_collectWriterFacet'](){const _0x4ccab0=_0x557709,_0x451230={};try{for(const [_0x583dc3,_0x330456]of this['okdb'][_0x4ccab0(0x789)]){try{const _0x4a8d45=_0x330456['writerStatus']?.();if(!_0x4a8d45)continue;if(!_0x4a8d45[_0x4ccab0(0x4b9)]&&!_0x4a8d45[_0x4ccab0(0x740)]&&!(_0x4a8d45[_0x4ccab0(0x2c0)]??0x0)&&!_0x4a8d45[_0x4ccab0(0x762)])continue;_0x451230[_0x583dc3]={'depth':_0x4a8d45[_0x4ccab0(0x4b9)],'oldestPendingMs':_0x4a8d45['oldestPendingMs'],'committed':_0x4a8d45[_0x4ccab0(0x740)],'commitsPerSec':_0x4a8d45['commitsPerSec'],'commitP99Ms':_0x4a8d45['commitP99Ms'],'parkedNow':_0x4a8d45[_0x4ccab0(0x2c0)]??0x0,'draining':!!_0x4a8d45[_0x4ccab0(0x762)]};}catch{}}}catch{}return Object['keys'](_0x451230)[_0x4ccab0(0x320)]?_0x451230:null;}[_0x557709(0x464)](){const _0x33538e=_0x557709,_0x346bd7=process[_0x33538e(0x242)],_0x5df2ec=Date[_0x33538e(0x562)](),_0x461480=_0x4edaf4=>{const _0x3598bd=_0x33538e;if(!_0x4edaf4)return[];const _0x2cc719=[];try{for(const {id:_0x34bbca,entry:_0x16d61c}of _0x4edaf4['list']()){if(_0x16d61c?.[_0x3598bd(0x7de)]?.['pid']!==_0x346bd7)continue;const _0x432c0f=_0x16d61c[_0x3598bd(0x856)]??_0x16d61c[_0x3598bd(0x344)]??0x0;if(_0x432c0f+(_0x16d61c[_0x3598bd(0x86c)]??0x0)<_0x5df2ec)continue;_0x2cc719[_0x3598bd(0x677)](_0x34bbca);}}catch{}return _0x2cc719;},_0x3f2f79=_0x461480(this[_0x33538e(0x458)](_0x33538e(0x231))),_0x3efc63=_0x461480(this[_0x33538e(0x458)](_0x33538e(0x84e)));if(!_0x3f2f79[_0x33538e(0x320)]&&!_0x3efc63[_0x33538e(0x320)])return null;return{'compact':_0x3f2f79,'replicate':_0x3efc63};}[_0x557709(0x458)](_0x382fa9){const _0x357741=_0x557709;if(!this[_0x357741(0x525)]?.[_0x357741(0x25d)])return null;if(!this[_0x357741(0x6b7)])this[_0x357741(0x6b7)]=new Map();let _0x4512c3=this[_0x357741(0x6b7)]['get'](_0x382fa9);if(!_0x4512c3)try{_0x4512c3=new _0x2cc2fb(this[_0x357741(0x525)][_0x357741(0x25d)],{'namespace':_0x382fa9}),this[_0x357741(0x6b7)][_0x357741(0x4a3)](_0x382fa9,_0x4512c3);}catch{return null;}return _0x4512c3;}['_buildProcessingFacet'](){const _0x5719c9=_0x557709,_0x319a3f=[];try{for(const [_0x254681,_0x562e68]of this[_0x5719c9(0x525)]['_envs']){if(_0x254681[_0x5719c9(0x32e)]('~'))continue;for(const _0x44f2f9 of _0x562e68['processor'][_0x5719c9(0x577)]())_0x319a3f[_0x5719c9(0x677)]({..._0x44f2f9,'env':_0x254681});}}catch{}return{'participate':this[_0x5719c9(0x525)][_0x5719c9(0x190)]?.['_participate']??![],'processors':_0x319a3f};}[_0x557709(0x3e7)](){const _0x4f27b9=_0x557709;if(this[_0x4f27b9(0x7ee)])return!![];const _0x3c6c80=this['okdb']['_rootDb'];if(!_0x3c6c80)return![];return this[_0x4f27b9(0x7ee)]=_0x3c6c80[_0x4f27b9(0x26d)](_0x3b36f1,{'dupSort':![]}),this['_cmd']=_0x3c6c80[_0x4f27b9(0x26d)](_0x5ebcef,{'dupSort':![]}),!![];}async[_0x557709(0x549)](){const _0x2d4119=_0x557709;if(!this[_0x2d4119(0x3e7)]())return;const _0x2c8c5a=_0x2d4119(0x281),_0xf583b3=0x1,_0x16965f=this[_0x2d4119(0x7ee)][_0x2d4119(0x5f1)](_0x2c8c5a)??0x0;if(_0x16965f>=_0xf583b3)return;const _0x4c1978=_0x14f00e=>{const _0x307c43=_0x2d4119;if(_0x14f00e===_0x307c43(0x307))return'single';if(_0x14f00e==='async')return _0x307c43(0x829);return _0x14f00e;};await this[_0x2d4119(0x525)][_0x2d4119(0x485)]['_writer'][_0x2d4119(0x7c9)](()=>{const _0x18878d=_0x2d4119;for(const _0x2211ca of[_0x18878d(0x2ed),_0x18878d(0x534)]){for(const {key:_0x337c1c,value:_0x14748f}of this['_desired'][_0x18878d(0x482)]({'start':_0x2211ca,'end':_0x2211ca+'\xff'})){if(typeof _0x337c1c!==_0x18878d(0x695)||!_0x337c1c['startsWith'](_0x2211ca))break;const _0x9ad15b=_0x4c1978(_0x14748f[_0x18878d(0x49f)]);if(_0x9ad15b!==_0x14748f['mode'])this[_0x18878d(0x7ee)][_0x18878d(0x250)](_0x337c1c,{..._0x14748f,'mode':_0x9ad15b});}}this[_0x18878d(0x7ee)][_0x18878d(0x250)](_0x2c8c5a,_0xf583b3);});}[_0x557709(0x69f)](){const _0x38f1d0=_0x557709;return!!this[_0x38f1d0(0x7ee)];}[_0x557709(0x1c7)](_0x17a80e,_0xd08d18){const _0x3b781a=_0x557709;if(!this[_0x3b781a(0x3e7)]())return null;const _0x24030b=_0x17a80e+'/'+_0xd08d18;return this['_refreshDesiredSnapshot'](),this[_0x3b781a(0x5fb)]['get'](_0x24030b)??this[_0x3b781a(0x7ee)][_0x3b781a(0x5f1)](_0x24030b)??null;}[_0x557709(0x48a)](){const _0x3d9374=_0x557709;if(!_0x2d7e11)return;try{this[_0x3d9374(0x525)][_0x3d9374(0x485)]?.['db']?.['resetReadTxn']?.();}catch{}}async['setDesired'](_0x34be27,_0x3f9352,_0x116ca5){const _0x3c6da5=_0x557709;if(!this['_ensureDesired']())return null;const _0x20c7e9=_0x34be27+'/'+_0x3f9352;this['_refreshDesiredSnapshot']();const _0x49f679=this[_0x3c6da5(0x5fb)][_0x3c6da5(0x5f1)](_0x20c7e9)??this[_0x3c6da5(0x7ee)][_0x3c6da5(0x5f1)](_0x20c7e9)??{'version':0x0},_0x4d1751=(_0x49f679['version']||0x0)+0x1,_0x49b698={..._0x49f679,..._0x116ca5,'version':_0x4d1751,'updatedAt':Date[_0x3c6da5(0x562)]()};this['_desiredOverlay'][_0x3c6da5(0x4a3)](_0x20c7e9,_0x49b698);try{await this[_0x3c6da5(0x525)][_0x3c6da5(0x485)]['_writer']['transaction'](()=>{const _0x4484e1=_0x3c6da5;this[_0x4484e1(0x7ee)][_0x4484e1(0x250)](_0x20c7e9,_0x49b698);});}finally{if(this[_0x3c6da5(0x5fb)]['get'](_0x20c7e9)===_0x49b698)this['_desiredOverlay'][_0x3c6da5(0x4b0)](_0x20c7e9);}return _0x4d1751;}['listDesired'](_0xb8d984){const _0x2bca01=_0x557709;if(!this[_0x2bca01(0x3e7)]())return[];this[_0x2bca01(0x48a)]();const _0x26c4d1=_0xb8d984+'/',_0x95f295=[];for(const {key:_0x492122,value:_0x3a7c3c}of this[_0x2bca01(0x7ee)][_0x2bca01(0x482)]({'start':_0x26c4d1,'end':_0x26c4d1+'\xff'})){if(typeof _0x492122!==_0x2bca01(0x695)||!_0x492122[_0x2bca01(0x32e)](_0x26c4d1))break;_0x95f295['push']({'key':_0x492122[_0x2bca01(0x747)](_0x26c4d1[_0x2bca01(0x320)]),'value':_0x3a7c3c});}return _0x95f295;}[_0x557709(0x414)](_0x39a158){const _0x5123cd=_0x557709;if(!this[_0x5123cd(0x3e7)]())return null;return this['_cmd']['get'](_0x39a158)??null;}async[_0x557709(0x5aa)](_0x4c5148,_0x2a18a3,_0xe8c4f0={}){const _0x2514ff=_0x557709;if(!this[_0x2514ff(0x3e7)]())return null;let _0xcfc133;return await this[_0x2514ff(0x525)][_0x2514ff(0x485)][_0x2514ff(0x445)][_0x2514ff(0x7c9)](()=>{const _0x2407bf=_0x2514ff,_0x4ade28=this['_cmd'][_0x2407bf(0x5f1)](_0x4c5148)||{'epoch':0x0};_0xcfc133=(_0x4ade28[_0x2407bf(0x763)]||0x0)+0x1,this[_0x2407bf(0x357)]['put'](_0x4c5148,{..._0x4ade28,..._0xe8c4f0,'cmd':_0x2a18a3,'epoch':_0xcfc133,'updatedAt':Date[_0x2407bf(0x562)]()});}),_0xcfc133;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x2733de,'nodeKey':_0x5ba42f,'logicalKey':_0x908d74,'slotKey':_0x43f74a,'PROCESS_ENV':_0x6a3e36,'NODE_TYPE':_0x592786},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x5e7678=_0x1d45b1;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x4dd2a0=require$$0$6,{clampTimerDelay:_0xb872df}=requireOkdbTimers(),{EVENTS:_0x2ce6cf,CHANGE_ACTIONS:_0x48238b}=requireOkdbEnums(),{LOOP:_0x658713}=requireOkdbLoopMonitor(),_0x37d878=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x2a7a10=0x5,_0x5e3880=0x2710;class _0x4b50e9 extends _0x4dd2a0{constructor(_0x84d4c1,_0x11b4fe={}){const _0x2ad440=_0x438e;super(),this[_0x2ad440(0x525)]=_0x84d4c1,this[_0x2ad440(0x33e)]=_0x11b4fe[_0x2ad440(0x3a9)]??_0x37d878,this[_0x2ad440(0x1c5)]=_0x11b4fe[_0x2ad440(0x45e)]??_0x2a7a10,this[_0x2ad440(0x3f7)]=_0x11b4fe[_0x2ad440(0x6a6)]??_0x5e3880,this['_started']=![],this[_0x2ad440(0x82e)]=new Map(),this[_0x2ad440(0x664)]=new Map(),this[_0x2ad440(0x207)]=new Map(),this['_flushTimer']=null,this[_0x2ad440(0x879)]=![],this[_0x2ad440(0x18b)]=new Set(),this[_0x2ad440(0x1eb)]=new Set(),this[_0x2ad440(0x58c)]=_0x5cd9c0=>this[_0x2ad440(0x700)](_0x5cd9c0),this[_0x2ad440(0x33f)]=_0x5c0d86=>this[_0x2ad440(0x70d)](_0x5c0d86),this[_0x2ad440(0x784)]=_0x278409=>this[_0x2ad440(0x5c2)](_0x278409),this[_0x2ad440(0x4ca)]=()=>this[_0x2ad440(0x4ec)]();}[_0x5e7678(0x6d4)](){const _0xc2de6c=_0x5e7678;if(this[_0xc2de6c(0x3a8)])return;this[_0xc2de6c(0x3a8)]=!![];for(const [_0x5dd955,_0x49cb52]of this[_0xc2de6c(0x525)][_0xc2de6c(0x789)]){if(_0x5dd955[_0xc2de6c(0x32e)]('~'))continue;try{_0x49cb52['_enableChangelog']();}catch{}}for(const [_0x580839,_0x1c3a63]of this[_0xc2de6c(0x525)][_0xc2de6c(0x789)]){if(_0x580839[_0xc2de6c(0x32e)]('~'))continue;try{this[_0xc2de6c(0x664)]['set'](_0x580839,_0x1c3a63['getClock']()||0x0);}catch{}}const {events:_0xb1a96b}=this[_0xc2de6c(0x525)];_0xb1a96b['on'](_0x2ce6cf[_0xc2de6c(0x3a7)],this[_0xc2de6c(0x33f)]),_0xb1a96b['on'](_0x2ce6cf[_0xc2de6c(0x4e8)],this[_0xc2de6c(0x58c)]),_0xb1a96b['on'](_0x2ce6cf['ITEM_UPDATE'],this[_0xc2de6c(0x58c)]),_0xb1a96b['on'](_0x2ce6cf[_0xc2de6c(0x7fd)],this[_0xc2de6c(0x58c)]),_0xb1a96b['on'](_0x2ce6cf[_0xc2de6c(0x38c)],this[_0xc2de6c(0x784)]),_0xb1a96b['once'](_0x2ce6cf['SYSTEM_STOPPED'],this[_0xc2de6c(0x4ca)]);}[_0x5e7678(0x4ec)](){const _0x20d84d=_0x5e7678;if(!this[_0x20d84d(0x3a8)])return;this[_0x20d84d(0x3a8)]=![];const {events:_0x3d1caa}=this[_0x20d84d(0x525)];_0x3d1caa[_0x20d84d(0x209)](_0x2ce6cf['ITEM_PENDING'],this['_onPending']),_0x3d1caa[_0x20d84d(0x209)](_0x2ce6cf['ITEM_CREATE'],this['_onItem']),_0x3d1caa['off'](_0x2ce6cf[_0x20d84d(0x610)],this[_0x20d84d(0x58c)]),_0x3d1caa[_0x20d84d(0x209)](_0x2ce6cf[_0x20d84d(0x7fd)],this[_0x20d84d(0x58c)]),_0x3d1caa[_0x20d84d(0x209)](_0x2ce6cf[_0x20d84d(0x38c)],this[_0x20d84d(0x784)]);try{_0x3d1caa[_0x20d84d(0x209)](_0x2ce6cf['SYSTEM_STOPPED'],this['_onStop']);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this['_pending'][_0x20d84d(0x2e8)](),this[_0x20d84d(0x82e)]['clear'](),this[_0x20d84d(0x664)][_0x20d84d(0x2e8)](),this[_0x20d84d(0x18b)][_0x20d84d(0x2e8)](),this[_0x20d84d(0x1eb)][_0x20d84d(0x2e8)]();}[_0x5e7678(0x3e5)](_0x311ec2,_0x5727cc,_0x4801a2,_0x18c5d4){return _0x311ec2+'\x00'+_0x5727cc+'\x00'+_0x4801a2+'\x00'+_0x18c5d4;}[_0x5e7678(0x2bf)](_0x59189e,_0x23bfd8,_0x57f2dc,_0x2b7bb7){const _0x203cec=_0x5e7678,_0x3288cd=this[_0x203cec(0x3e5)](_0x59189e,_0x23bfd8,_0x57f2dc,_0x2b7bb7);if(this[_0x203cec(0x18b)][_0x203cec(0x514)](_0x3288cd))return![];this['_seen']['add'](_0x3288cd);if(this[_0x203cec(0x18b)][_0x203cec(0x569)]>this[_0x203cec(0x3f7)]){const _0x287c83=this[_0x203cec(0x18b)][_0x203cec(0x678)]()[_0x203cec(0x3f2)]()[_0x203cec(0x1a4)];this[_0x203cec(0x18b)][_0x203cec(0x4b0)](_0x287c83);}return!![];}[_0x5e7678(0x70d)](_0x1f4d64){const _0x4c6536=_0x5e7678;if(!this['_started']||!_0x1f4d64)return;const {env:_0x1dd8c7,type:_0x3520e4,key:_0x337ff0,clock:_0x22033a}=_0x1f4d64;if(_0x1dd8c7==null||_0x3520e4==null||_0x337ff0==null)return;if(typeof _0x1dd8c7===_0x4c6536(0x695)&&_0x1dd8c7['startsWith']('~'))return;if(typeof _0x3520e4==='string'&&_0x3520e4[_0x4c6536(0x32e)]('~'))return;this[_0x4c6536(0x1eb)][_0x4c6536(0x5e5)](this[_0x4c6536(0x3e5)](_0x1dd8c7,_0x3520e4,_0x337ff0,_0x22033a)),this[_0x4c6536(0x1eb)][_0x4c6536(0x569)]>this[_0x4c6536(0x3f7)]&&this[_0x4c6536(0x1eb)][_0x4c6536(0x4b0)](this[_0x4c6536(0x1eb)]['values']()['next']()[_0x4c6536(0x1a4)]);}['_handleInProcess'](_0x338180){const _0x41b1ba=_0x5e7678;if(!this[_0x41b1ba(0x3a8)]||!_0x338180)return;const {env:_0x21f70f,type:_0x2bf5c6,key:_0x414c31,clock:_0x2b6de2,origin:_0x585599,action:_0x51557d,newValue:_0x579ed8,oldValue:_0xe8f942}=_0x338180;if(_0x21f70f==null||_0x2bf5c6==null||_0x414c31==null)return;if(typeof _0x21f70f==='string'&&_0x21f70f[_0x41b1ba(0x32e)]('~'))return;if(typeof _0x2bf5c6===_0x41b1ba(0x695)&&_0x2bf5c6[_0x41b1ba(0x32e)]('~'))return;this[_0x41b1ba(0x1eb)]['delete'](this[_0x41b1ba(0x3e5)](_0x21f70f,_0x2bf5c6,_0x414c31,_0x2b6de2));if(!this['_markSeen'](_0x21f70f,_0x2bf5c6,_0x414c31,_0x2b6de2))return;const _0x1d8862=_0x51557d===_0x48238b[_0x41b1ba(0x542)]?'remove':_0x41b1ba(0x250);this[_0x41b1ba(0x3bc)]('change',{'env':_0x21f70f,'type':_0x2bf5c6,'key':_0x414c31,'op':_0x1d8862,'clock':_0x2b6de2,'origin':_0x585599,'value':_0x1d8862===_0x41b1ba(0x323)?null:_0x579ed8,'prevValue':_0xe8f942});}['_handlePoke'](_0x4005bf){const _0x1cb43d=_0x5e7678;if(!this[_0x1cb43d(0x3a8)])return;if(!_0x4005bf||typeof _0x4005bf[_0x1cb43d(0x684)]!==_0x1cb43d(0x695)||typeof _0x4005bf[_0x1cb43d(0x51d)]!==_0x1cb43d(0x695))return;const {env:_0x8a8223,type:_0x26347a}=_0x4005bf;if(_0x8a8223[_0x1cb43d(0x32e)]('~')||_0x26347a[_0x1cb43d(0x32e)]('~'))return;this[_0x1cb43d(0x207)][_0x1cb43d(0x4a3)](_0x8a8223+'\x00'+_0x26347a,{'env':_0x8a8223,'type':_0x26347a}),this[_0x1cb43d(0x266)]();}[_0x5e7678(0x266)](){const _0x20ff2d=_0x5e7678;if(this['_flushTimer'])return;const _0x2b810b=()=>{const _0x5cee82=_0x438e;this[_0x5cee82(0x372)]=null,this[_0x5cee82(0x360)]()[_0x5cee82(0x613)](()=>{});};this[_0x20ff2d(0x372)]=setTimeout(_0x2b810b,_0xb872df(this[_0x20ff2d(0x1c5)]));}async[_0x5e7678(0x360)](){const _0x4ea996=_0x5e7678;if(this[_0x4ea996(0x879)]){this[_0x4ea996(0x266)]();return;}this[_0x4ea996(0x879)]=!![];try{const _0x18049d=[...this[_0x4ea996(0x207)][_0x4ea996(0x678)]()];this[_0x4ea996(0x207)]['clear']();let _0x26f99a=![];for(const {env:_0x27183e,type:_0x5ae2de}of _0x18049d){try{const _0x325909=await this[_0x4ea996(0x4f2)](_0x27183e,_0x5ae2de);if(_0x325909)_0x26f99a=!![];}catch{this[_0x4ea996(0x207)][_0x4ea996(0x4a3)](_0x27183e+'\x00'+_0x5ae2de,{'env':_0x27183e,'type':_0x5ae2de}),_0x26f99a=!![];}}if(_0x26f99a||this[_0x4ea996(0x207)][_0x4ea996(0x569)]>0x0)this[_0x4ea996(0x266)]();}finally{this[_0x4ea996(0x879)]=![];}}async[_0x5e7678(0x4f2)](_0x589bd7,_0x37b939){const _0x267787=_0x5e7678,_0x53cca7=await this['okdb']['_openEnvLazy'](_0x589bd7),_0xc16e30=_0x589bd7+'\x00'+_0x37b939;!this['_cursors'][_0x267787(0x514)](_0xc16e30)&&(!this['_baselines'][_0x267787(0x514)](_0x589bd7)&&(_0x53cca7[_0x267787(0x5d7)](),this[_0x267787(0x664)][_0x267787(0x4a3)](_0x589bd7,_0x53cca7[_0x267787(0x546)]()||0x0)),this[_0x267787(0x82e)]['set'](_0xc16e30,this[_0x267787(0x664)][_0x267787(0x5f1)](_0x589bd7)));const _0x1ad9e8=this[_0x267787(0x82e)][_0x267787(0x5f1)](_0xc16e30),_0x304829=_0x53cca7[_0x267787(0x546)](_0x37b939)||0x0;if(_0x304829<=_0x1ad9e8)return![];const _0x28c204=_0x1ad9e8+this['_quantum'],_0x3df4d0=Math[_0x267787(0x754)](_0x304829,_0x28c204),_0x3f3240=_0x658713[_0x267787(0x195)]?_0x658713['now']():0x0,_0x4db7bc=Array[_0x267787(0x1c3)](_0x53cca7[_0x267787(0x3b9)](_0x37b939,_0x1ad9e8+0x1,_0x3df4d0));let _0x7f7adc=_0x1ad9e8;for(const _0x5f3deb of _0x4db7bc){const {clock:_0x4bcb94,key:_0x11f1bb,action:_0x1aa3f1,origin:_0x5cfa55}=_0x5f3deb;if(_0x4bcb94>_0x7f7adc)_0x7f7adc=_0x4bcb94;if(_0x11f1bb==null)continue;if(this[_0x267787(0x1eb)][_0x267787(0x514)](this[_0x267787(0x3e5)](_0x589bd7,_0x37b939,_0x11f1bb,_0x4bcb94)))continue;if(!this[_0x267787(0x2bf)](_0x589bd7,_0x37b939,_0x11f1bb,_0x4bcb94))continue;let _0x366761,_0x177720;if(_0x1aa3f1===_0x48238b[_0x267787(0x542)])_0x366761=_0x267787(0x323),_0x177720=null;else{const _0x1ef062=_0x53cca7[_0x267787(0x5f1)](_0x37b939,_0x11f1bb);_0x1ef062==null?(_0x366761='remove',_0x177720=null):(_0x366761=_0x267787(0x250),_0x177720=_0x1ef062);}this[_0x267787(0x3bc)]('change',{'env':_0x589bd7,'type':_0x37b939,'key':_0x11f1bb,'op':_0x366761,'clock':_0x4bcb94,'origin':_0x5cfa55,'value':_0x177720});}if(_0x658713['enabled'])_0x658713['note']('feed:'+_0x589bd7+':'+_0x37b939,_0x658713[_0x267787(0x562)]()-_0x3f3240,'n='+_0x4db7bc[_0x267787(0x320)]);return this['_cursors'][_0x267787(0x4a3)](_0xc16e30,Math[_0x267787(0x456)](_0x7f7adc,_0x3df4d0)),_0x53cca7[_0x267787(0x546)](_0x37b939)>_0x3df4d0;}[_0x5e7678(0x269)](){const _0x34da11=_0x5e7678;return{'started':this[_0x34da11(0x3a8)],'quantum':this[_0x34da11(0x33e)],'flushDebounce':this['_flushDebounce'],'cursors':Object['fromEntries']([...this['_cursors'][_0x34da11(0x5bd)]()]['map'](([_0x5b05f2,_0x284e01])=>[_0x5b05f2[_0x34da11(0x4c2)]('\x00',':'),_0x284e01])),'pending':this[_0x34da11(0x207)]['size'],'seen':this['_seen'][_0x34da11(0x569)]};}}return _0x4b50e9[_0x5e7678(0x35c)]=_0x37d878,okdbChangefeed={'OKDBChangefeed':_0x4b50e9},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2d02a7=_0x1d45b1;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x4fcae0=require$$1$1,_0x577154=require$$1,{EVENTS:_0x4f3992}=requireOkdbEnums(),_0x295880=require$$0,{slotKey:_0x2f37f3}=requireOkdbProcessRegistry(),_0x254ee1=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x16fa8f=0xfa0,_0x2ff3a1=0x5,_0x2cf0f0=0x2710,_0x35dce0=0xbb8,_0x4a38ba=0x7d0,_0x256cf3=_0x2d02a7(0x5f3),_0x9d872f=_0x2d02a7(0x6a3),_0x416421='log',_0x1bced7=_0x2d02a7(0x479),_0x793f48=[_0x4f3992['VIEW_PROGRESS'],_0x4f3992[_0x2d02a7(0x4b3)],_0x4f3992[_0x2d02a7(0x872)],_0x4f3992[_0x2d02a7(0x1a7)],_0x4f3992[_0x2d02a7(0x6ee)],_0x4f3992[_0x2d02a7(0x530)],_0x4f3992[_0x2d02a7(0x4b4)],_0x4f3992['INDEX_REGISTERED'],_0x2d02a7(0x557),_0x2d02a7(0x361),_0x2d02a7(0x850),'processor:paused',_0x2d02a7(0x1f7),'processor:retry'],_0x2e0a09=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x4c49cd=0x64;function _0x2de44d(_0x1d8eb4){const _0x36743e=_0x2d02a7;if(!_0x1d8eb4)return _0x36743e(0x198);const _0xd3979f=(_0x1d8eb4[_0x36743e(0x190)]||[])[_0x36743e(0x800)](_0x63514a=>[_0x63514a[_0x36743e(0x684)],_0x63514a['id'],_0x63514a[_0x36743e(0x49f)],_0x63514a[_0x36743e(0x36e)],!!_0x63514a[_0x36743e(0x3ad)],!!_0x63514a[_0x36743e(0x2d6)],!!_0x63514a[_0x36743e(0x288)],_0x63514a[_0x36743e(0x776)]?.[_0x36743e(0x242)]??null,_0x63514a[_0x36743e(0x4dd)]?String(_0x63514a[_0x36743e(0x4dd)]?.[_0x36743e(0x258)]??_0x63514a[_0x36743e(0x4dd)]):null]);return JSON[_0x36743e(0x729)]([!!_0x1d8eb4['participate'],_0xd3979f]);}function _0x473101({workers:_0x2c4750,makeOkdb:_0x2ef21c,port:_0x1bd087,primaryOkdb:_0x37ffff,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x223b4b=_0x2d02a7;if(_0x4fcae0['isPrimary'])return childEntry&&_0x4fcae0['setupPrimary']({'exec':_0x577154[_0x223b4b(0x3c7)](__dirname,_0x223b4b(0x840)),'args':[],'execArgv':((()=>{const _0x14ce7e=_0x223b4b,_0x19db9e=[];for(let _0x4f3fc8=0x0;_0x4f3fc8<process['execArgv'][_0x14ce7e(0x320)];_0x4f3fc8++){const _0x1766a6=process[_0x14ce7e(0x4ac)][_0x4f3fc8];if(_0x1766a6[_0x14ce7e(0x32e)](_0x14ce7e(0x3c1))||_0x1766a6[_0x14ce7e(0x32e)](_0x14ce7e(0x56b))||_0x1766a6['startsWith'](_0x14ce7e(0x255)))continue;if(_0x1766a6==='-e'||_0x1766a6===_0x14ce7e(0x2ba)||_0x1766a6==='-p'||_0x1766a6===_0x14ce7e(0x51c)){_0x4f3fc8++;continue;}_0x19db9e[_0x14ce7e(0x677)](_0x1766a6);}return _0x19db9e;})())}),_0x3cdb6a({'workers':_0x2c4750,'port':_0x1bd087,'primaryOkdb':_0x37ffff,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x1bd087});return _0x1eb63e({'makeOkdb':_0x2ef21c,'port':_0x1bd087});}function _0x3cdb6a({workers:_0xf438a6,port:_0x6c0b66,primaryOkdb:_0x35d13a,workerEnv:_0x31683e,workerRole:_0x3a23b0,listenAddr:_0x2e599e}){const _0x3d64c1=_0x2d02a7,_0x4e4feb=new Map(),_0x2824f3=new Map();let _0xb590ff=![];const _0x320cbd=_0x466fdd=>_0x466fdd?.[_0x3d64c1(0x7c5)],_0x84d00e=_0x1a9eca=>{const _0x37c714=_0x3d64c1,_0x399ce6=_0x4fcae0[_0x37c714(0x75c)]({...process.env,..._0x31683e||{},'OKDB_CLUSTER_SLOT':String(_0x1a9eca)});return _0x399ce6[_0x37c714(0x7c5)]=_0x1a9eca,_0x4e4feb[_0x37c714(0x4a3)](_0x399ce6[_0x37c714(0x4a4)][_0x37c714(0x242)],{'worker':_0x399ce6,'startedAt':Date[_0x37c714(0x562)](),'slot':_0x1a9eca}),_0x399ce6['on'](_0x37c714(0x4dd),_0xc2b0fd=>{const _0x57e5ec=_0x37c714;console[_0x57e5ec(0x808)](_0x57e5ec(0x1ce)+_0x399ce6[_0x57e5ec(0x4a4)][_0x57e5ec(0x242)]+_0x57e5ec(0x85b)+(_0xc2b0fd?.['message']??_0xc2b0fd));}),_0x399ce6['on'](_0x37c714(0x4d4),()=>_0x3e9012()),_0x399ce6;},_0x134c6f=_0x527e40=>{const _0x427929=_0x3d64c1;for(const {worker:_0x491259}of _0x4e4feb[_0x427929(0x678)]()){if(_0x491259[_0x427929(0x49e)]()||!_0x491259['isConnected']())continue;try{_0x491259[_0x427929(0x61e)](_0x527e40);}catch{}}};_0x35d13a?.[_0x3d64c1(0x35f)]?.({'kind':_0x3d64c1(0x4db),'listenAddr':_0x2e599e})[_0x3d64c1(0x613)](()=>{}),_0x35d13a?.['processes']?.[_0x3d64c1(0x801)]?.({'workersConfigured':_0xf438a6});const _0x2a8aa7={'engines':!![],'processors':!![],'compaction':!![],..._0x3a23b0,'http':!![]},_0x3e9012=()=>{const _0x5484bd=_0x3d64c1,_0x4420d3=_0x35d13a?.[_0x5484bd(0x666)];if(!_0x4420d3||!_0x4420d3[_0x5484bd(0x38a)])return;const _0x502ff1=_0x4420d3['selfKey'];for(const {worker:_0x2086b7,startedAt:_0x2de543,slot:_0x58e2d3,stats:_0x1b9890,processing:_0x2e01a9}of _0x4e4feb['values']()){if(_0x2086b7['isDead']())continue;const _0x27d2e6=_0x4420d3[_0x5484bd(0x69f)]?.()&&_0x4420d3['getDesired'](_0x5484bd(0x36a),_0xf4ea71(_0x58e2d3))?.[_0x5484bd(0x82d)]===!![];_0x4420d3['publishChildRow']({'pid':_0x2086b7[_0x5484bd(0x4a4)][_0x5484bd(0x242)],'startedAt':_0x2de543,'kind':'http-server','supervisorKey':_0x502ff1,'slot':_0x58e2d3,'slotKey':_0xf4ea71(_0x58e2d3),'role':_0x2a8aa7,'listenAddr':_0x2e599e,'lifecycle':_0x27d2e6?_0x5484bd(0x201):_0x5484bd(0x61d),'processing':_0x2e01a9??null,'stats':_0x1b9890??null})[_0x5484bd(0x613)](()=>{});}},_0xf4ea71=_0x3e1b5a=>_0x2f37f3(_0x3d64c1(0x5ba)+_0x6c0b66,_0x3e1b5a),_0x4f8ee8=_0x1373bc=>{const _0x19af2d=_0x3d64c1,_0x503488=_0x35d13a?.[_0x19af2d(0x666)];if(!_0x503488?.['hasDesired']?.())return![];return _0x503488['getDesired']('slot',_0xf4ea71(_0x1373bc))?.['decommission']===!![];};for(let _0x393058=0x0;_0x393058<_0xf438a6;_0x393058++){const _0x256cc6=_0x4f8ee8(_0x393058);_0x2824f3[_0x3d64c1(0x4a3)](_0x393058,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x256cc6,'respawnTimer':null}),_0x256cc6?console['log']('[okdb-cluster]\x20slot='+_0x393058+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x84d00e(_0x393058);}const _0x124f1a=()=>{const _0x8e32e1=_0x3d64c1,_0x367ffc=_0x35d13a?.['processes'];if(!_0x367ffc?.[_0x8e32e1(0x38a)]||!_0x367ffc['hasDesired']?.())return;for(const [_0x3d7f6e,_0x28cf26]of _0x2824f3[_0x8e32e1(0x5bd)]()){const _0xc73ac4=_0x367ffc[_0x8e32e1(0x1c7)](_0x8e32e1(0x36a),_0xf4ea71(_0x3d7f6e)),_0x54a06e=_0xc73ac4?.[_0x8e32e1(0x82d)]===!![],_0x47fb27=_0xc73ac4?.[_0x8e32e1(0x397)]===!![];if(_0x54a06e&&!_0x28cf26[_0x8e32e1(0x58e)]){_0x28cf26[_0x8e32e1(0x58e)]=!![];_0x28cf26['respawnTimer']&&(clearTimeout(_0x28cf26['respawnTimer']),_0x28cf26['respawnTimer']=null);for(const {worker:_0x216e25}of _0x4e4feb['values']()){if(_0x320cbd(_0x216e25)!==_0x3d7f6e||_0x216e25[_0x8e32e1(0x49e)]())continue;try{if(_0x47fb27)_0x216e25['process'][_0x8e32e1(0x397)](_0x8e32e1(0x74f));else _0x216e25[_0x8e32e1(0x61a)]()&&_0x216e25[_0x8e32e1(0x7df)]();}catch{}}console['log'](_0x8e32e1(0x7d0)+(_0x47fb27?_0x8e32e1(0x5c6):_0x8e32e1(0x2e9))+_0x8e32e1(0x233)+_0x3d7f6e+_0x8e32e1(0x661));}else{if(!_0x54a06e&&_0x28cf26[_0x8e32e1(0x58e)]&&_0xc73ac4){_0x28cf26[_0x8e32e1(0x58e)]=![],_0x28cf26[_0x8e32e1(0x66c)]=[],_0x28cf26[_0x8e32e1(0x407)]=0x0;const _0x301b59=[..._0x4e4feb[_0x8e32e1(0x678)]()]['some'](({worker:_0x8e3fe3})=>_0x320cbd(_0x8e3fe3)===_0x3d7f6e&&!_0x8e3fe3[_0x8e32e1(0x49e)]());!_0x301b59&&!_0xb590ff&&(_0x84d00e(_0x3d7f6e),console[_0x8e32e1(0x808)](_0x8e32e1(0x7b6)+_0x3d7f6e));}}}},_0x177976=()=>{try{_0x124f1a();}catch{}};_0x35d13a?.['events']?.['on']?.(_0x4f3992[_0x3d64c1(0x6ba)],_0x177976);const _0x2d556f=[];if(_0x35d13a?.[_0x3d64c1(0x20a)]?.['on'])for(const _0x1d8e97 of _0x793f48){const _0x4bf351=_0x499f6b=>{_0x134c6f({[_0x256cf3]:_0x9d872f,'event':_0x1d8e97,'data':_0x499f6b??{}});};_0x35d13a[_0x3d64c1(0x20a)]['on'](_0x1d8e97,_0x4bf351),_0x2d556f[_0x3d64c1(0x677)]({'event':_0x1d8e97,'handler':_0x4bf351});}const _0x307895=setInterval(()=>{_0x124f1a(),_0x3e9012();},_0x2e0a09);_0x307895[_0x3d64c1(0x27a)]?.();const _0x978c69=(_0x278c6c,_0x2aa8e8)=>{const _0x37db9f=_0x3d64c1;if(!_0x2aa8e8||typeof _0x2aa8e8!==_0x37db9f(0x76b)||_0x2aa8e8[_0x256cf3]!==_0x416421)return;if(!_0x35d13a?.['log']?.[_0x37db9f(0x7a0)])return;const _0x1879de=_0x2aa8e8[_0x37db9f(0x230)]||{};_0x35d13a['log'][_0x37db9f(0x7a0)]({..._0x1879de,'msg':'[w'+_0x2aa8e8[_0x37db9f(0x36a)]+']\x20'+(_0x1879de[_0x37db9f(0x6ad)]??''),'meta':{..._0x1879de['meta']||{},'worker':_0x2aa8e8['slot'],'workerPid':_0x2aa8e8['pid']}});};_0x4fcae0['on'](_0x3d64c1(0x258),_0x978c69);const _0x31d649=(_0x38b783,_0x1b8f6b)=>{const _0x565742=_0x3d64c1;if(!_0x1b8f6b||typeof _0x1b8f6b!==_0x565742(0x76b)||_0x1b8f6b[_0x256cf3]!==_0x1bced7)return;const _0x48c5d1=_0x4e4feb[_0x565742(0x5f1)](_0x38b783[_0x565742(0x4a4)][_0x565742(0x242)]);if(_0x48c5d1){_0x48c5d1['stats']={..._0x1b8f6b['stats'],'at':Date[_0x565742(0x562)]()};if(_0x1b8f6b[_0x565742(0x574)]!==undefined){const _0x2db2d0=_0x2de44d(_0x1b8f6b[_0x565742(0x574)]);_0x2db2d0!==_0x48c5d1[_0x565742(0x75a)]&&(_0x48c5d1['processingSig']=_0x2db2d0,_0x39faae()),_0x48c5d1[_0x565742(0x574)]=_0x1b8f6b[_0x565742(0x574)];}}};let _0x5ecb6b=null;const _0x39faae=()=>{const _0x3f87f8=_0x3d64c1;if(_0x5ecb6b||_0xb590ff)return;_0x5ecb6b=setTimeout(()=>{_0x5ecb6b=null;if(!_0xb590ff)_0x3e9012();},_0x4c49cd),_0x5ecb6b[_0x3f87f8(0x27a)]?.();};_0x4fcae0['on'](_0x3d64c1(0x258),_0x31d649),_0x4fcae0['on'](_0x3d64c1(0x532),(_0x10f72f,_0x286f20,_0x17ba9f)=>{const _0x545e73=_0x3d64c1,_0x4bbb46=_0x10f72f['process'][_0x545e73(0x242)],_0x4c98d1=_0x320cbd(_0x10f72f),_0x542a9d=_0x4e4feb['get'](_0x4bbb46);if(_0x542a9d&&_0x35d13a?.[_0x545e73(0x666)])_0x35d13a[_0x545e73(0x666)][_0x545e73(0x6c3)](_0x4bbb46+':'+_0x542a9d[_0x545e73(0x3bd)])['catch'](()=>{});_0x4e4feb[_0x545e73(0x4b0)](_0x4bbb46),console[_0x545e73(0x808)](_0x545e73(0x1ce)+_0x4bbb46+_0x545e73(0x2f7)+(_0x4c98d1??'?')+_0x545e73(0x28d)+(_0x545e73(0x5a7)+_0x286f20+',\x20signal='+(_0x17ba9f??_0x545e73(0x2e6))+_0x545e73(0x2f3)+_0x4e4feb[_0x545e73(0x569)]+_0x545e73(0x3ae))),_0x3e9012();if(_0xb590ff||_0x4c98d1==null)return;const _0x50f484=_0x2824f3[_0x545e73(0x5f1)](_0x4c98d1);if(!_0x50f484||_0x50f484[_0x545e73(0x58e)])return;const _0x536501=Date[_0x545e73(0x562)]();_0x50f484[_0x545e73(0x66c)]['push'](_0x536501),_0x50f484['deaths']=_0x50f484[_0x545e73(0x66c)][_0x545e73(0x626)](_0x599203=>_0x536501-_0x599203<=_0x2cf0f0);if(_0x50f484[_0x545e73(0x66c)][_0x545e73(0x320)]>=_0x2ff3a1){_0x50f484[_0x545e73(0x58e)]=!![],console[_0x545e73(0x4dd)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x4c98d1+_0x545e73(0x347)+_0x50f484['deaths'][_0x545e73(0x320)]+_0x545e73(0x70a)+(_0x2cf0f0+_0x545e73(0x813)+_0x4e4feb[_0x545e73(0x569)]+_0x545e73(0x4f5)));return;}_0x50f484[_0x545e73(0x407)]++;const _0xb7cb5=Math[_0x545e73(0x754)](_0x16fa8f,_0x254ee1*0x2**(_0x50f484[_0x545e73(0x407)]-0x1));console['log']('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x4c98d1+_0x545e73(0x463)+_0xb7cb5+_0x545e73(0x713)+_0x50f484['consecutiveFailures']+')'),_0x50f484[_0x545e73(0x35a)]=setTimeout(()=>{const _0x280bc8=_0x545e73;_0x50f484['respawnTimer']=null;if(_0xb590ff||_0x50f484[_0x280bc8(0x58e)])return;const _0x4eae7f=_0x84d00e(_0x4c98d1);_0x4eae7f[_0x280bc8(0x3ec)](_0x280bc8(0x866),()=>{const _0x27134a=_0x280bc8;if(_0x2824f3[_0x27134a(0x5f1)](_0x4c98d1)===_0x50f484)_0x50f484[_0x27134a(0x407)]=0x0;});},_0xb7cb5),_0x50f484[_0x545e73(0x35a)][_0x545e73(0x27a)]?.();});const _0x3a6644=[..._0x4e4feb[_0x3d64c1(0x367)]()];console[_0x3d64c1(0x808)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+'\x20forked\x20'+_0xf438a6+_0x3d64c1(0x6f6)+_0x6c0b66+':\x20'+('['+_0x3a6644[_0x3d64c1(0x3c7)](',\x20')+']'));const _0x47d0cb={'_isClusterController':!![],'port':_0x6c0b66,'primaryOkdb':_0x35d13a??null,'status'(){const _0x9e5d13=_0x3d64c1;return{'clustered':!![],'primaryPid':process[_0x9e5d13(0x242)],'port':_0x6c0b66,'primaryRole':_0x35d13a?.[_0x9e5d13(0x4f4)]??null,'processorPid':null,'supervisorPid':process[_0x9e5d13(0x242)],'workers':[..._0x4e4feb[_0x9e5d13(0x678)]()][_0x9e5d13(0x800)](({worker:_0x234b8f})=>({'pid':_0x234b8f[_0x9e5d13(0x4a4)][_0x9e5d13(0x242)],'id':_0x234b8f['id'],'dead':_0x234b8f['isDead']()}))};},async 'close'(){const _0x1c84d7=_0x3d64c1;_0xb590ff=!![];for(const _0x270c66 of _0x2824f3[_0x1c84d7(0x678)]()){_0x270c66['dead']=!![],_0x270c66['respawnTimer']&&(clearTimeout(_0x270c66[_0x1c84d7(0x35a)]),_0x270c66['respawnTimer']=null);}clearInterval(_0x307895);_0x5ecb6b&&(clearTimeout(_0x5ecb6b),_0x5ecb6b=null);_0x4fcae0[_0x1c84d7(0x209)]('message',_0x978c69),_0x4fcae0['off'](_0x1c84d7(0x258),_0x31d649),_0x35d13a?.[_0x1c84d7(0x20a)]?.[_0x1c84d7(0x209)]?.(_0x4f3992['SYSTEM_PROC'],_0x177976);if(_0x35d13a?.[_0x1c84d7(0x20a)]?.[_0x1c84d7(0x209)])for(const {event:_0x7d4780,handler:_0x1a4e66}of _0x2d556f){try{_0x35d13a['events'][_0x1c84d7(0x209)](_0x7d4780,_0x1a4e66);}catch{}}_0x2d556f[_0x1c84d7(0x320)]=0x0;const _0x3b481e=[..._0x4e4feb[_0x1c84d7(0x678)]()][_0x1c84d7(0x800)](({worker:_0x355ffb})=>_0x355ffb);if(_0x3b481e[_0x1c84d7(0x320)]===0x0)return;await Promise[_0x1c84d7(0x260)](_0x3b481e['map'](_0x1b7b77=>new Promise(_0x213812=>{const _0x45463c=_0x1c84d7;if(_0x1b7b77[_0x45463c(0x49e)]()){_0x213812();return;}let _0x19c477=![];const _0x348ba2=()=>{if(_0x19c477)return;_0x19c477=!![];if(_0x229880)clearTimeout(_0x229880);_0x213812();};_0x1b7b77[_0x45463c(0x3ec)](_0x45463c(0x532),_0x348ba2);const _0x229880=setTimeout(()=>{const _0x117764=_0x45463c;try{_0x1b7b77[_0x117764(0x4a4)][_0x117764(0x397)]();}catch{}},_0x35dce0+0x1f4);_0x229880[_0x45463c(0x27a)]?.();try{_0x1b7b77[_0x45463c(0x7df)]();}catch{try{_0x1b7b77['process'][_0x45463c(0x397)]();}catch{}}})));}};return _0x47d0cb;}async function _0x1eb63e({makeOkdb:_0x48ba73,port:_0x2a3499}){const _0x4aa7d1=_0x2d02a7,_0x45f7da=await _0x48ba73();return _0x2b6308(_0x45f7da),_0x45f7da[_0x4aa7d1(0x2b8)][_0x4aa7d1(0x64a)](_0x2a3499);}function _0x2b6308(_0x372f5e){const _0x5d261=_0x2d02a7;if(!_0x372f5e||_0x372f5e[_0x5d261(0x505)])return;_0x372f5e[_0x5d261(0x505)]=!![];try{const {OKDBChangefeed:_0x252979}=requireOkdbChangefeed(),_0x23bf29=_0x372f5e[_0x5d261(0x4cf)];if(_0x23bf29&&typeof _0x23bf29[_0x5d261(0x300)]===_0x5d261(0x807)){const _0x3e5f47=new _0x252979(_0x372f5e);_0x3e5f47['start'](),_0x23bf29[_0x5d261(0x300)](_0x3e5f47),_0x372f5e['_changefeed']=_0x3e5f47;}}catch(_0x14ed83){_0x372f5e[_0x5d261(0x808)]?.['warn']?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x14ed83?.[_0x5d261(0x258)]??_0x14ed83),{'feature':_0x5d261(0x2a7)});}const _0x2499f0=_0x3815c5=>{const _0x3c9734=_0x5d261;if(!_0x3815c5||typeof _0x3815c5!=='object'||_0x3815c5[_0x256cf3]==null)return;if(_0x3815c5[_0x256cf3]===_0x9d872f)try{_0x372f5e[_0x3c9734(0x4cf)]?.[_0x3c9734(0x57d)]?.(_0x3815c5[_0x3c9734(0x630)],_0x3815c5[_0x3c9734(0x524)]);}catch{}};process['on']('message',_0x2499f0),_0x372f5e[_0x5d261(0x44c)]=_0x2499f0;{let _0x589193=process[_0x5d261(0x2ff)](),_0x2d9678=Date[_0x5d261(0x562)]();const _0x300860=()=>{const _0x32f7c7=_0x5d261;if(typeof process[_0x32f7c7(0x61e)]!=='function'||!process[_0x32f7c7(0x5d4)])return;const _0x597c24=Date[_0x32f7c7(0x562)](),_0x179d6b=process['cpuUsage'](),_0x19a25f=(_0x597c24-_0x2d9678)*0x3e8,_0x344737=_0x179d6b[_0x32f7c7(0x3b6)]-_0x589193[_0x32f7c7(0x3b6)]+(_0x179d6b[_0x32f7c7(0x1ae)]-_0x589193[_0x32f7c7(0x1ae)]),_0x40f667=_0x19a25f>0x0?Math[_0x32f7c7(0x754)](0x64,Math[_0x32f7c7(0x79c)](_0x344737/(_0x19a25f*(_0x295880[_0x32f7c7(0x58b)]()[_0x32f7c7(0x320)]||0x1))*0x64)):0x0;_0x589193=_0x179d6b,_0x2d9678=_0x597c24;const _0x3eea58=process[_0x32f7c7(0x54c)]();let _0x3b8d1a=null;try{_0x3b8d1a=_0x372f5e[_0x32f7c7(0x4f4)]?.[_0x32f7c7(0x190)]?_0x372f5e[_0x32f7c7(0x666)]?.[_0x32f7c7(0x428)]?.()??null:null;}catch{}try{process[_0x32f7c7(0x61e)]({[_0x256cf3]:_0x1bced7,'stats':{'rss':_0x3eea58[_0x32f7c7(0x7f2)],'heapUsed':_0x3eea58['heapUsed'],'heapTotal':_0x3eea58['heapTotal'],'external':_0x3eea58[_0x32f7c7(0x500)],'cpuPct':_0x40f667,'cpuWindowMs':Math['round'](_0x19a25f/0x3e8)||null},'processing':_0x3b8d1a});}catch{}},_0x2a4f5f=Math[_0x5d261(0x456)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x418e9c=setInterval(_0x300860,_0x2a4f5f);_0x418e9c['unref']?.(),_0x300860();for(const _0x15cc5c of['processor:paused',_0x5d261(0x1f7)]){_0x372f5e[_0x5d261(0x20a)]?.['on']?.(_0x15cc5c,()=>{try{_0x300860();}catch{}});}}let _0x1b91fe=![];const _0x1ff8df=async _0x53baa3=>{const _0x5c2b6c=_0x5d261;if(_0x1b91fe)return;_0x1b91fe=!![];const _0x55ea6b=setTimeout(()=>process[_0x5c2b6c(0x532)](_0x53baa3),_0x35dce0);_0x55ea6b['unref']?.();try{await _0x372f5e[_0x5c2b6c(0x419)]?.();}catch{}process['exit'](_0x53baa3);};process['on']('disconnect',()=>_0x1ff8df(0x0));if(process[_0x5d261(0x61e)]&&!process[_0x5d261(0x5d4)])_0x1ff8df(0x0);if(process['platform']!==_0x5d261(0x5bf)){const _0x30e773=setInterval(()=>{if(process['ppid']===0x1)_0x1ff8df(0x0);},_0x4a38ba);_0x30e773[_0x5d261(0x27a)]?.(),_0x372f5e['_clusterOrphanWatch']=_0x30e773;}}return okdbCluster={'runClustered':_0x473101,'attachWorkerCluster':_0x2b6308},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x5abd17=_0x1d45b1;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x3135d8=0x3c;function _0x5374e3(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x24f4f6{constructor(){const _0x385589=_0x438e;this[_0x385589(0x5a1)]=0x0,this[_0x385589(0x64d)]=0x0,this[_0x385589(0x386)]=0x0,this[_0x385589(0x16f)]=0x0,this[_0x385589(0x71c)]=0x0,this[_0x385589(0x423)]=0x0,this[_0x385589(0x3d0)]=Array['from']({'length':_0x3135d8},_0x5374e3),this[_0x385589(0x1af)]=0x0,this[_0x385589(0x772)]=Date[_0x385589(0x562)](),this[_0x385589(0x336)]=setInterval(()=>this[_0x385589(0x315)](),0x3e8);if(this['_timer'][_0x385589(0x27a)])this[_0x385589(0x336)][_0x385589(0x27a)]();}[_0x5abd17(0x315)](){const _0x2c1f34=_0x5abd17;this['_bucketIdx']=(this[_0x2c1f34(0x1af)]+0x1)%_0x3135d8,this[_0x2c1f34(0x3d0)][this[_0x2c1f34(0x1af)]]=_0x5374e3(),this['_lastTick']=Date[_0x2c1f34(0x562)]();}['record'](_0x5b8be0,_0x1e9964,_0x55db67){const _0x47b89e=_0x5abd17,_0x3918c8=/^(POST|PUT|PATCH|DELETE)$/i[_0x47b89e(0x219)](_0x5b8be0),_0x14f080=this[_0x47b89e(0x3d0)][this[_0x47b89e(0x1af)]];this[_0x47b89e(0x5a1)]++,_0x14f080['requests']++,_0x55db67&&(this['_totalErrors']++,_0x14f080[_0x47b89e(0x697)]++),_0x3918c8?(this[_0x47b89e(0x386)]++,this['_totalWriteMs']+=_0x1e9964,_0x14f080['writes']++,_0x14f080['writeMs']+=_0x1e9964):(this['_totalReads']++,this[_0x47b89e(0x71c)]+=_0x1e9964,_0x14f080[_0x47b89e(0x4d3)]++,_0x14f080['readMs']+=_0x1e9964);}[_0x5abd17(0x479)](){const _0x1e9203=_0x5abd17;let _0x52d1de=0x0,_0x5eefae=0x0,_0x3008a4=0x0,_0x2aae0a=0x0,_0x6620fe=0x0,_0x332106=0x0;for(const _0xc6cce2 of this['_buckets']){_0x52d1de+=_0xc6cce2[_0x1e9203(0x7ef)],_0x5eefae+=_0xc6cce2[_0x1e9203(0x4d3)],_0x3008a4+=_0xc6cce2[_0x1e9203(0x2a8)],_0x2aae0a+=_0xc6cce2[_0x1e9203(0x697)],_0x6620fe+=_0xc6cce2[_0x1e9203(0x24f)],_0x332106+=_0xc6cce2[_0x1e9203(0x31c)];}const _0x3442be=_0x3135d8;return{'lifetime':{'requests':this[_0x1e9203(0x5a1)],'reads':this[_0x1e9203(0x64d)],'writes':this[_0x1e9203(0x386)],'errors':this[_0x1e9203(0x16f)],'avgReadMs':this[_0x1e9203(0x64d)]>0x0?+(this[_0x1e9203(0x71c)]/this['_totalReads'])[_0x1e9203(0x5cf)](0x2):null,'avgWriteMs':this[_0x1e9203(0x386)]>0x0?+(this[_0x1e9203(0x423)]/this['_totalWrites'])[_0x1e9203(0x5cf)](0x2):null},'window':{'seconds':_0x3442be,'requests':_0x52d1de,'reads':_0x5eefae,'writes':_0x3008a4,'errors':_0x2aae0a,'reqPerSec':+(_0x52d1de/_0x3442be)[_0x1e9203(0x5cf)](0x2),'readPerSec':+(_0x5eefae/_0x3442be)['toFixed'](0x2),'writePerSec':+(_0x3008a4/_0x3442be)[_0x1e9203(0x5cf)](0x2),'avgReadMs':_0x5eefae>0x0?+(_0x6620fe/_0x5eefae)['toFixed'](0x2):null,'avgWriteMs':_0x3008a4>0x0?+(_0x332106/_0x3008a4)[_0x1e9203(0x5cf)](0x2):null}};}[_0x5abd17(0x419)](){clearInterval(this['_timer']);}}return okdbMetrics=_0x24f4f6,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0xa8a086=_0x1d45b1;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x5970af={'data':{'label':_0xa8a086(0x725),'scope':_0xa8a086(0x684),'description':'Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','operations':{'read':{'label':'Read','summary':_0xa8a086(0x289)},'write':{'label':_0xa8a086(0x25b),'summary':_0xa8a086(0x406)}}},'schema':{'label':_0xa8a086(0x538),'scope':_0xa8a086(0x684),'description':_0xa8a086(0x6e4),'operations':{'read':{'label':_0xa8a086(0x169),'summary':_0xa8a086(0x4eb)},'write':{'label':'Write','summary':_0xa8a086(0x4b6)}}},'search':{'label':'Search','scope':_0xa8a086(0x684),'description':'Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','operations':{'query':{'label':_0xa8a086(0x416),'summary':_0xa8a086(0x4ab)}}},'queue':{'label':_0xa8a086(0x73e),'scope':_0xa8a086(0x684),'description':_0xa8a086(0x42e),'operations':{'read':{'label':_0xa8a086(0x169),'summary':'List\x20jobs,\x20view\x20stats,\x20list\x20buckets.'},'write':{'label':_0xa8a086(0x25b),'summary':_0xa8a086(0x446)},'work':{'label':'Work','summary':_0xa8a086(0x2b6)}}},'files':{'label':'Files','scope':_0xa8a086(0x684),'description':_0xa8a086(0x1b3),'operations':{'read':{'label':_0xa8a086(0x169),'summary':_0xa8a086(0x774)},'write':{'label':_0xa8a086(0x25b),'summary':'Upload,\x20update\x20metadata,\x20and\x20delete\x20files.'}}},'functions':{'label':_0xa8a086(0x54a),'scope':_0xa8a086(0x684),'description':_0xa8a086(0x671),'operations':{'read':{'label':'Read','summary':_0xa8a086(0x173)},'write':{'label':'Write','summary':_0xa8a086(0x727)},'run':{'label':_0xa8a086(0x3ea),'summary':_0xa8a086(0x777)}}},'views':{'label':_0xa8a086(0x31b),'scope':_0xa8a086(0x684),'description':_0xa8a086(0x68f),'operations':{'read':{'label':'Read','summary':_0xa8a086(0x182)},'write':{'label':_0xa8a086(0x25b),'summary':_0xa8a086(0x513)}}},'env':{'label':_0xa8a086(0x26b),'scope':_0xa8a086(0x684),'description':_0xa8a086(0x30f),'operations':{'read':{'label':'Read','summary':_0xa8a086(0x7b7)},'write':{'label':_0xa8a086(0x25b),'summary':_0xa8a086(0x189)}}},'auth':{'label':'Auth','scope':_0xa8a086(0x1ae),'description':_0xa8a086(0x74d),'operations':{'read':{'label':_0xa8a086(0x169),'summary':'List\x20tokens\x20and\x20users.'},'write':{'label':'Write','summary':_0xa8a086(0x7f4)}}},'system':{'label':'System','scope':_0xa8a086(0x1ae),'description':'Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','operations':{'read':{'label':'Read','summary':'View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.'},'write':{'label':_0xa8a086(0x25b),'summary':'Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.'}}},'sync':{'label':_0xa8a086(0x792),'scope':_0xa8a086(0x1ae),'description':_0xa8a086(0x686),'operations':{'read':{'label':_0xa8a086(0x169),'summary':_0xa8a086(0x22b)},'write':{'label':_0xa8a086(0x25b),'summary':_0xa8a086(0x422)},'peer':{'label':_0xa8a086(0x3c8),'summary':_0xa8a086(0x83a),'machineOnly':!![]}}},'protected':{'label':_0xa8a086(0x573),'scope':_0xa8a086(0x3e2),'description':_0xa8a086(0x58d),'operations':{'read':{'label':_0xa8a086(0x169),'summary':_0xa8a086(0x337)},'write':{'label':_0xa8a086(0x25b),'summary':_0xa8a086(0x191)}}}},_0x1f785a={'schema:read':[_0xa8a086(0x674),_0xa8a086(0x4a6),_0xa8a086(0x375)]},_0x5d6d3f=[_0xa8a086(0x515),_0xa8a086(0x471),_0xa8a086(0x62b),'write',_0xa8a086(0x5b4),_0xa8a086(0x487)];function _0x45a7ae(){const _0x1ef993=_0xa8a086,_0x48bcc0=[];for(const [_0x2cb15f,_0x32ead5]of Object[_0x1ef993(0x5bd)](_0x5970af)){for(const _0x3ab721 of Object[_0x1ef993(0x367)](_0x32ead5[_0x1ef993(0x263)])){_0x48bcc0[_0x1ef993(0x677)](_0x2cb15f+':'+_0x3ab721);}}return _0x48bcc0;}function _0x1fb01f(_0x5617cc){return _0x5970af[_0x5617cc]||null;}function _0x94564c(_0x587528,_0xab86d4){const _0x1caa48=_0xa8a086;return _0x5970af[_0x587528]?.[_0x1caa48(0x263)][_0xab86d4]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x5970af,'IMPLIED_BY':_0x1f785a,'OP_ORDER':_0x5d6d3f,'listAllPermissions':_0x45a7ae,'getNamespaceMeta':_0x1fb01f,'getOperationMeta':_0x94564c},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x407c08=_0x1d45b1;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x3e47c8}=requireOkdbAuthNamespaces(),_0x4c0fe7=new Set([_0x407c08(0x515),'query']);function _0x5ca279(_0x4098d9,_0x13dba3){const _0x61a697=_0x407c08;if(!Array[_0x61a697(0x22a)](_0x4098d9)||_0x4098d9[_0x61a697(0x320)]===0x0)return![];for(const _0xa939dc of _0x4098d9){if(typeof _0xa939dc!=='string'||!_0xa939dc[_0x61a697(0x5ca)](':')){if(_0xa939dc==='*')return!![];continue;}const [_0x382f19,_0x231a65]=_0xa939dc['split'](':'),[_0x56d589,_0xefae40]=_0x13dba3[_0x61a697(0x5fa)](':'),_0x1d77a2=_0x382f19==='*'||_0x382f19===_0x56d589,_0x1e7203=_0x231a65==='*'||_0x231a65===_0xefae40;if(_0x1d77a2&&_0x1e7203)return!![];}const _0x1229d0=_0x3e47c8[_0x13dba3];if(_0x1229d0)for(const _0x14b56e of _0x1229d0){if(_0x5ca279(_0x4098d9,_0x14b56e))return!![];}return![];}function _0x4e4a99(_0x2f0442,_0x19d95a){const _0x495676=_0x407c08,_0x2318d3=new Set();if(Array[_0x495676(0x22a)](_0x2f0442)){for(const _0x4bf0cf of _0x2f0442)_0x2318d3[_0x495676(0x5e5)](_0x4bf0cf);}if(Array[_0x495676(0x22a)](_0x19d95a)){for(const _0x237604 of _0x19d95a)_0x2318d3[_0x495676(0x5e5)](_0x237604);}return Array[_0x495676(0x1c3)](_0x2318d3);}function _0x12f9cc(_0x3a79ab){const _0x2bde2e=_0x407c08;if(typeof _0x3a79ab!==_0x2bde2e(0x695))return![];const [,_0xed339b]=_0x3a79ab['split'](':');return _0x4c0fe7['has'](_0xed339b);}function _0x213472(_0x31a1cf){return _0x12f9cc(_0x31a1cf)?'protected:read':'protected:write';}function _0x36edaf(_0x5f2f29,_0x1054c7){const _0x2d07bf=_0x407c08;return _0x4e4a99(_0x5f2f29[_0x2d07bf(0x226)]||[],_0x1054c7?(_0x5f2f29[_0x2d07bf(0x7c7)]||{})[_0x1054c7]||[]:[]);}function _0x2f433e(_0x50cdad){const _0x964ac3=_0x407c08,_0x4ff496=[];for(const _0x4714e2 of _0x50cdad['listRoutes']()){const _0x507bd1=_0x4714e2[_0x964ac3(0x5fc)]?.[_0x964ac3(0x490)];if(!_0x507bd1)continue;_0x507bd1[_0x964ac3(0x3e4)]&&!_0x507bd1[_0x964ac3(0x63f)]&&_0x4ff496[_0x964ac3(0x677)](_0x4714e2['method']+'\x20'+_0x4714e2[_0x964ac3(0x73c)]+'\x20(id:\x20'+(_0x4714e2[_0x964ac3(0x5fc)]['id']??'?')+')');}if(_0x4ff496[_0x964ac3(0x320)])throw new Error(_0x964ac3(0x399)+_0x4ff496['join'](_0x964ac3(0x2b7)));}return okdbAuthPermissions={'hasPermission':_0x5ca279,'unionPermissions':_0x4e4a99,'isReadOperation':_0x12f9cc,'resolveProtectedGate':_0x213472,'getEffectivePermissions':_0x36edaf,'assertEveryRouteHasPermission':_0x2f433e},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x154523=require$$0$7,_0x2bcf11=require$$1$2,_0x394e2e=require$$2$1;function _0x6bfc07(_0x5d61d1){const _0x3d66b5=_0x438e,_0x18360d=String(_0x5d61d1||'')[_0x3d66b5(0x4c2)](/-/g,'+')['replace'](/_/g,'/'),_0x2a338b=_0x18360d+'='[_0x3d66b5(0x268)]((0x4-(_0x18360d[_0x3d66b5(0x320)]%0x4||0x4))%0x4);return Buffer[_0x3d66b5(0x1c3)](_0x2a338b,_0x3d66b5(0x3f8));}function _0x407885(_0x3361a0){const _0x3aafef=_0x438e;if(typeof _0x3361a0!=='string')throw new Error(_0x3aafef(0x6a1));const _0x58fb4a=_0x3361a0[_0x3aafef(0x5fa)]('.');if(_0x58fb4a[_0x3aafef(0x320)]!==0x3)throw new Error(_0x3aafef(0x80e));const [_0x179301,_0xf1bce3,_0x2e7710]=_0x58fb4a,_0x1c8616=JSON[_0x3aafef(0x40d)](_0x6bfc07(_0x179301)[_0x3aafef(0x2be)](_0x3aafef(0x3cc))),_0x5d6367=JSON[_0x3aafef(0x40d)](_0x6bfc07(_0xf1bce3)['toString']('utf8'));return{'header':_0x1c8616,'payload':_0x5d6367,'signature':_0x6bfc07(_0x2e7710),'signingInput':Buffer[_0x3aafef(0x1c3)](_0x179301+'.'+_0xf1bce3),'encodedHeader':_0x179301,'encodedPayload':_0xf1bce3};}function _0x37f69e(_0x50f916){const _0x124c28=_0x438e;if(Array[_0x124c28(0x22a)](_0x50f916))return _0x50f916;if(_0x50f916==null)return[];return[_0x50f916];}function _0x5b85a5(_0x1641f6){const _0x4568ca=_0x438e,_0x687b07=String(_0x1641f6||'')[_0x4568ca(0x4a7)](/.{1,64}/g)||[];return _0x4568ca(0x41d)+_0x687b07[_0x4568ca(0x3c7)]('\x0a')+'\x0a-----END\x20CERTIFICATE-----\x0a';}function _0xab0ee5(_0x29da2a={}){const _0x1b628f=_0x438e;if(_0x29da2a[_0x1b628f(0x4fe)]?.[0x0])return _0x394e2e[_0x1b628f(0x66f)](_0x5b85a5(_0x29da2a[_0x1b628f(0x4fe)][0x0]));return _0x394e2e['createPublicKey']({'key':_0x29da2a,'format':_0x1b628f(0x2ad)});}function _0x58436f(_0x36a53d,_0x4e8ef7,_0x31d6d3,_0xc829bf){const _0x130081=_0x438e;if(_0x36a53d===_0x130081(0x4d9))return _0x394e2e[_0x130081(0x68e)](_0x130081(0x592),_0x31d6d3,_0x4e8ef7,_0xc829bf);if(_0x36a53d===_0x130081(0x6d9))return _0x394e2e[_0x130081(0x68e)]('sha256',_0x31d6d3,{'key':_0x4e8ef7,'dsaEncoding':'ieee-p1363'},_0xc829bf);return![];}function _0x50a5f7(_0x2a7f1d){const _0x31e324=_0x438e;if(typeof commonjsGlobal[_0x31e324(0x28f)]==='function')return commonjsGlobal[_0x31e324(0x28f)](_0x2a7f1d,{'headers':{'accept':_0x31e324(0x43a)}})[_0x31e324(0x19c)](async _0x183d32=>{const _0x1a9efe=_0x31e324;if(!_0x183d32['ok']){const _0x2b24e6=new Error('HTTP\x20'+_0x183d32['status']+_0x1a9efe(0x74c)+_0x2a7f1d);_0x2b24e6[_0x1a9efe(0x269)]=_0x183d32['status'];throw _0x2b24e6;}return _0x183d32[_0x1a9efe(0x353)]();});return new Promise((_0x2470b6,_0x195c0e)=>{const _0x1d0262=_0x31e324,_0x31239a=String(_0x2a7f1d)[_0x1d0262(0x32e)]('https:')?_0x2bcf11:_0x154523,_0x2b687f=_0x31239a[_0x1d0262(0x5f1)](_0x2a7f1d,{'headers':{'accept':'application/json'}},_0x42e676=>{const _0x45595b=_0x1d0262;let _0xd72508='';_0x42e676[_0x45595b(0x47b)]('utf8'),_0x42e676['on'](_0x45595b(0x524),_0x5d6845=>{_0xd72508+=_0x5d6845;}),_0x42e676['on'](_0x45595b(0x470),()=>{const _0x545b4e=_0x45595b;if(_0x42e676[_0x545b4e(0x21f)]<0xc8||_0x42e676[_0x545b4e(0x21f)]>=0x12c){const _0x1e1794=new Error(_0x545b4e(0x2ac)+_0x42e676['statusCode']+_0x545b4e(0x74c)+_0x2a7f1d);return _0x1e1794[_0x545b4e(0x269)]=_0x42e676[_0x545b4e(0x21f)],_0x195c0e(_0x1e1794);}try{_0x2470b6(JSON[_0x545b4e(0x40d)](_0xd72508||'{}'));}catch(_0x3b567d){_0x195c0e(_0x3b567d);}});});_0x2b687f['on'](_0x1d0262(0x4dd),_0x195c0e),_0x2b687f['end']();});}return okdbJwtUtils={'base64UrlDecode':_0x6bfc07,'parseJwt':_0x407885,'normalizeAudience':_0x37f69e,'normalizePemCertificate':_0x5b85a5,'jwkToKeyObject':_0xab0ee5,'verifyJwtSignature':_0x58436f,'fetchJson':_0x50a5f7},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x174be9=_0x1d45b1;if(hasRequiredOkdbHttp)return okdbHttp['exports'];hasRequiredOkdbHttp=0x1;const _0x431244=require$$0$7,{clampTimerDelay:_0x913b99,isNeverDelay:_0x355056}=requireOkdbTimers(),{URL:_0x5f12b5}=require$$3$1,_0x4e2d43=requireOkdbMetrics(),_0x265baa=requireOkdbAuthTokens(),{hasPermission:_0x3c62e1,unionPermissions:_0x49ec87,resolveProtectedGate:_0x45ca5b}=requireOkdbAuthPermissions(),_0x51d1c0={0x190:_0x174be9(0x3d2),0x191:_0x174be9(0x4f9),0x193:_0x174be9(0x411),0x194:_0x174be9(0x85f),0x195:'METHOD_NOT_ALLOWED',0x198:'REQUEST_TIMEOUT',0x199:_0x174be9(0x7e2),0x19a:_0x174be9(0x3dd),0x19b:_0x174be9(0x76e),0x19d:_0x174be9(0x298),0x19f:_0x174be9(0x1cb),0x1a6:_0x174be9(0x193),0x1ad:_0x174be9(0x36f),0x1f4:'INTERNAL_ERROR',0x1f5:_0x174be9(0x200),0x1f6:_0x174be9(0x1d6),0x1f7:_0x174be9(0x778),0x1f8:'GATEWAY_TIMEOUT'},_0x24d217={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'QUERY_OPERATOR_FORBIDDEN':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'BUCKET_PROJECT_NOT_PERSISTABLE':0x190,'BUCKET_PROJECT_UNKNOWN':0x190,'VIEW_UNKNOWN_REDUCER':0x190,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x161e47,timingSafeEqual:_0x5b62ae,parseBearer:_0x1a8ee5,randomToken:_0x5dacf6,issueToken:_0x5187db,authenticateToken:_0x2032f8}=_0x265baa,{base64UrlDecode:_0xb3751c,parseJwt:_0x376007,normalizeAudience:_0x483a43,normalizePemCertificate:_0x1f1e3f,jwkToKeyObject:_0x189a90,verifyJwtSignature:_0xc61fa8,fetchJson:_0x277cb1}=requireOkdbJwtUtils();function _0x180cf1(_0x414c24){const _0xc3a757=_0x174be9;return(_0x414c24||'GET')[_0xc3a757(0x19b)]();}function _0x143730(_0x17332a){const _0x1b5f53=_0x174be9;if(Array[_0x1b5f53(0x22a)](_0x17332a))return _0x17332a[_0x1b5f53(0x23c)](_0x143730);return String(_0x17332a||'')[_0x1b5f53(0x5fa)](',')[_0x1b5f53(0x800)](_0x328030=>_0x328030['trim']())[_0x1b5f53(0x626)](Boolean);}function _0x395977(..._0x42f6c3){const _0x1d0ba7=_0x174be9;return[...new Set(_0x42f6c3[_0x1d0ba7(0x23c)](_0x143730))][_0x1d0ba7(0x3c7)](',\x20');}function _0xc6d7e(_0x244c04,_0x41dcd5){const _0x376ef1=_0x174be9;if(!_0x244c04)return![];if(_0x41dcd5==='*')return!![];if(_0x41dcd5 instanceof RegExp)return _0x41dcd5[_0x376ef1(0x219)](_0x244c04);if(typeof _0x41dcd5===_0x376ef1(0x807))return!!_0x41dcd5(_0x244c04);if(Array['isArray'](_0x41dcd5))return _0x41dcd5[_0x376ef1(0x5ca)](_0x244c04);return _0x41dcd5===_0x244c04;}function _0x1ce9d1(_0x180280={},_0x247572={},_0x4f8b6b=null){const _0x45609e=_0x174be9;if(!_0x247572)return null;const _0x514bd2=_0x180280[_0x45609e(0x859)],_0x55be59=_0x247572['origins']??_0x247572[_0x45609e(0x859)]??'*',_0x2f138f=_0x55be59==='*'?'*':_0xc6d7e(_0x514bd2,_0x55be59)?_0x514bd2:null;if(!_0x2f138f)return null;const _0xf0c6ce=_0x180280[_0x45609e(0x49c)],_0x26f911=_0x247572[_0x45609e(0x527)]??_0x247572['allowHeaders']??[_0x45609e(0x736),'authorization',_0x45609e(0x2c8),_0x45609e(0x824),_0x45609e(0x432)],_0x5bf4a8=_0x247572[_0x45609e(0x78f)]??_0x247572[_0x45609e(0x449)]??(_0x4f8b6b?[_0x4f8b6b,_0x45609e(0x404)]:[_0x45609e(0x1fc),_0x45609e(0x16e),_0x45609e(0x404)]),_0x1bae7b=_0x247572['exposeHeaders']??[_0x45609e(0x2c8)],_0x111b96={'access-control-allow-origin':_0x2f138f,'access-control-allow-methods':Array['isArray'](_0x5bf4a8)?_0x5bf4a8[_0x45609e(0x3c7)](',\x20'):String(_0x5bf4a8),'access-control-allow-headers':_0xf0c6ce?_0x395977(_0x26f911,_0xf0c6ce):Array[_0x45609e(0x22a)](_0x26f911)?_0x26f911['join'](',\x20'):String(_0x26f911),'access-control-expose-headers':Array['isArray'](_0x1bae7b)?_0x1bae7b[_0x45609e(0x3c7)](',\x20'):String(_0x1bae7b),'vary':_0x395977(_0x45609e(0x83b),_0x2f138f==='*'?'':_0x45609e(0x83b),_0xf0c6ce?'Access-Control-Request-Headers':'')};if(_0x247572[_0x45609e(0x2c5)])_0x111b96[_0x45609e(0x7e0)]=_0x45609e(0x687);if(Number[_0x45609e(0x39f)](_0x247572[_0x45609e(0x50d)]))_0x111b96[_0x45609e(0x59f)]=String(_0x247572[_0x45609e(0x50d)]);return _0x111b96;}function _0x4f90a4(_0x188d6f){const _0x5e5bcc=_0x174be9,_0x57879a=[],_0x56c669={};let _0x525809=![];_0x188d6f[_0x5e5bcc(0x84d)]('/*')&&(_0x525809=!![],_0x188d6f=_0x188d6f[_0x5e5bcc(0x747)](0x0,-0x2),_0x57879a[_0x5e5bcc(0x677)]('*'));let _0x20c3b8=_0x188d6f[_0x5e5bcc(0x4c2)](/\/+$/,'')['replace'](/\[([^\]]*)\]/g,(_0x3b8055,_0x5a7ba4)=>{const _0x15378c=_0x5a7ba4['replace'](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x290bae,_0xa0522f,_0x33da83)=>{const _0x14e5c6=_0x438e;_0x57879a[_0x14e5c6(0x677)](_0xa0522f);if(_0x33da83!==undefined)_0x56c669[_0xa0522f]=_0x33da83;return _0x14e5c6(0x651);});return'(?:'+_0x15378c+')?';})[_0x5e5bcc(0x4c2)](/\/:(\w+)/g,(_0x15c5b0,_0x5f3989)=>{const _0x47dda6=_0x5e5bcc;return _0x57879a[_0x47dda6(0x677)](_0x5f3989),_0x47dda6(0x651);});if(_0x20c3b8==='')_0x20c3b8='/';return{'keys':_0x57879a,'defaults':_0x56c669,'wildcard':_0x525809,'regex':new RegExp(_0x525809?'^'+_0x20c3b8+_0x5e5bcc(0x867):'^'+_0x20c3b8+'$')};}function _0x4000ad(_0x32820d){const _0x3a71aa=_0x174be9;if(_0x32820d==null)return _0x32820d;return JSON[_0x3a71aa(0x40d)](JSON[_0x3a71aa(0x729)](_0x32820d));}function _0x35cb1f(_0x33264a){const _0x3af515=_0x174be9;if(_0x33264a==null)return null;if(_0x33264a[_0x3af515(0x51d)]===_0x3af515(0x76b)&&_0x33264a['properties']&&!Array[_0x3af515(0x22a)](_0x33264a['properties']))return _0x4000ad(_0x33264a);const _0x2a1b52=Object['values'](_0x33264a),_0x10fd69=_0x2a1b52[_0x3af515(0x320)]>0x0&&_0x2a1b52[_0x3af515(0x4bd)](_0x254250=>{const _0x1e37a0=_0x3af515;return _0x254250&&typeof _0x254250==='object'&&!Array[_0x1e37a0(0x22a)](_0x254250)&&(Object[_0x1e37a0(0x4ea)][_0x1e37a0(0x1b2)][_0x1e37a0(0x341)](_0x254250,_0x1e37a0(0x51d))||Object[_0x1e37a0(0x4ea)][_0x1e37a0(0x1b2)]['call'](_0x254250,_0x1e37a0(0x1c4))||Object[_0x1e37a0(0x4ea)][_0x1e37a0(0x1b2)][_0x1e37a0(0x341)](_0x254250,_0x1e37a0(0x184))||Object[_0x1e37a0(0x4ea)][_0x1e37a0(0x1b2)]['call'](_0x254250,_0x1e37a0(0x3a1)));});if(_0x10fd69)return{'type':_0x3af515(0x76b),'properties':_0x4000ad(_0x33264a),'required':[],'additionalProperties':![]};const _0x18c03b={},_0xe55415=[];for(const [_0x4e4fe2,_0x534dcd]of Object['entries'](_0x33264a)){_0x18c03b[_0x4e4fe2]=_0x56ad01(_0x534dcd);if(_0x534dcd!==null&&_0x534dcd!==undefined)_0xe55415[_0x3af515(0x677)](_0x4e4fe2);}return{'type':_0x3af515(0x76b),'properties':_0x18c03b,'required':_0xe55415,'additionalProperties':![]};}function _0x56ad01(_0x2447f9){const _0xb9be74=_0x174be9;if(_0x2447f9===null)return{'type':[_0xb9be74(0x198),_0xb9be74(0x695),_0xb9be74(0x656),_0xb9be74(0x71a),_0xb9be74(0x76b),_0xb9be74(0x7d1)]};if(Array['isArray'](_0x2447f9))return{'type':_0xb9be74(0x7d1),'items':_0x2447f9[_0xb9be74(0x320)]>0x0?_0x56ad01(_0x2447f9[0x0]):{}};switch(typeof _0x2447f9){case _0xb9be74(0x695):return{'type':'string','default':_0x2447f9};case _0xb9be74(0x656):return{'type':Number[_0xb9be74(0x5f8)](_0x2447f9)?_0xb9be74(0x3a3):_0xb9be74(0x656),'default':_0x2447f9};case'boolean':return{'type':'boolean','default':_0x2447f9};case _0xb9be74(0x76b):{const _0x2983cb={};for(const [_0x51a786,_0x2fcb12]of Object[_0xb9be74(0x5bd)](_0x2447f9))_0x2983cb[_0x51a786]=_0x56ad01(_0x2fcb12);return{'type':_0xb9be74(0x76b),'properties':_0x2983cb,'additionalProperties':!![],'default':_0x4000ad(_0x2447f9)};}default:return{};}}function _0x8e4434(_0x5eca40,_0x56c478){const _0xb10425=_0x174be9,_0x51ca1a=[];for(const _0x1e893c of _0x56c478[_0xb10425(0x367)]){if(_0x1e893c==='*')continue;_0x51ca1a[_0xb10425(0x677)]({'name':_0x1e893c,'required':!Object[_0xb10425(0x4ea)]['hasOwnProperty'][_0xb10425(0x341)](_0x56c478[_0xb10425(0x76c)],_0x1e893c),'default':_0x56c478['defaults'][_0x1e893c]});}return _0x51ca1a;}function _0x4dc2da(_0x45e86b={},_0x29c860){const _0x3929ca=_0x174be9,_0xb5aacb=_0x35cb1f(_0x45e86b['http']?.[_0x3929ca(0x862)]??_0x45e86b[_0x3929ca(0x471)]??null),_0x6f8e3c=_0x45e86b[_0x3929ca(0x2b8)]?.[_0x3929ca(0x503)]??(_0x45e86b[_0x3929ca(0x1fe)]?_0x3929ca(0x1fe):_0x29c860['method']===_0x3929ca(0x1fc)||_0x29c860['method']===_0x3929ca(0x16a)?_0x3929ca(0x2e6):_0x3929ca(0x7cb));return{'querySchema':_0xb5aacb,'bodyMode':_0x6f8e3c,'bindings':_0x4000ad(_0x45e86b['http']?.[_0x3929ca(0x176)]??{}),'statuses':_0x4000ad(_0x45e86b[_0x3929ca(0x2b8)]?.[_0x3929ca(0x468)]??(_0x45e86b[_0x3929ca(0x849)]||[])),'transport':_0x45e86b['http']?.[_0x3929ca(0x746)]??(_0x45e86b['sse']?_0x3929ca(0x1d0):_0x45e86b['raw']?_0x3929ca(0x1fe):_0x3929ca(0x46c)),'rawResponse':_0x45e86b[_0x3929ca(0x2b8)]?.['rawResponse']??!!_0x45e86b[_0x3929ca(0x786)],'cors':_0x4000ad(_0x45e86b[_0x3929ca(0x2b8)]?.[_0x3929ca(0x655)]??_0x45e86b[_0x3929ca(0x655)]??null)};}function _0x5e18e2(_0x52b15d){const _0x585bc3=_0x174be9,_0x3d276b=_0x52b15d[_0x585bc3(0x338)]||{},_0xbe3aad=_0x8e4434(_0x52b15d[_0x585bc3(0x73c)],_0x52b15d['matcher']),_0x3a2585=!!(_0x3d276b['id']||_0x3d276b[_0x585bc3(0x26f)]||_0x3d276b[_0x585bc3(0x31f)]||_0x3d276b[_0x585bc3(0x2b8)]||_0x3d276b[_0x585bc3(0x61b)]||_0x3d276b[_0x585bc3(0x3fd)]||_0x3d276b[_0x585bc3(0x490)]||_0x3d276b['safety']),_0x3edfae=_0x4dc2da(_0x3d276b,_0x52b15d),_0x4bcd17=_0x3d276b[_0x585bc3(0x26f)]?_0x4000ad(_0x3d276b[_0x585bc3(0x26f)]):null;return{'id':_0x3d276b['id']??null,'summary':_0x3d276b[_0x585bc3(0x6d6)]??null,'description':_0x3d276b[_0x585bc3(0x1bf)]??null,'tags':_0x4000ad(_0x3d276b[_0x585bc3(0x6c2)]??[]),'category':_0x3d276b[_0x585bc3(0x6d2)]??null,'safety':_0x4000ad(_0x3d276b['safety']??null),'access':_0x4000ad(_0x3d276b[_0x585bc3(0x490)]??null),'inputSchema':_0x4bcd17,'outputSchema':_0x4000ad(_0x3d276b[_0x585bc3(0x31f)]??null),'examples':_0x4000ad(_0x3d276b[_0x585bc3(0x844)]??[]),'pathParams':_0xbe3aad,'http':_0x3edfae,'cli':_0x4000ad(_0x3d276b[_0x585bc3(0x3fd)]??null),'mcp':_0x4000ad(_0x3d276b[_0x585bc3(0x61b)]??null),'legacy':{'params':_0x4000ad(_0x3d276b[_0x585bc3(0x1d9)]??null),'query':_0x4000ad(_0x3d276b[_0x585bc3(0x471)]??null),'body':_0x4000ad(_0x3d276b[_0x585bc3(0x427)]??null),'response':_0x4000ad(_0x3d276b[_0x585bc3(0x232)]??null)},'transport':{'raw':!!_0x3d276b['raw'],'sse':!!_0x3d276b['sse'],'rawResponse':!!_0x3d276b[_0x585bc3(0x786)],'cors':_0x4000ad(_0x3d276b['cors']??null)},'hasCanonical':_0x3a2585};}function _0x32da13(_0x32b8a8,_0x3768f0){const _0x56ac75=_0x174be9;if(!_0x3768f0?.[_0x56ac75(0x41e)])return;if(!_0x3768f0[_0x56ac75(0x26f)]||_0x3768f0[_0x56ac75(0x26f)][_0x56ac75(0x51d)]!==_0x56ac75(0x76b)||!_0x3768f0[_0x56ac75(0x26f)][_0x56ac75(0x1c4)])throw new Error('Route\x20'+_0x32b8a8[_0x56ac75(0x43f)]+'\x20'+_0x32b8a8[_0x56ac75(0x73c)]+_0x56ac75(0x355));const _0x502cf4=_0x3768f0[_0x56ac75(0x26f)][_0x56ac75(0x1c4)]||{},_0x1d65cc=new Set(_0x3768f0[_0x56ac75(0x3f1)][_0x56ac75(0x800)](_0x25f54c=>_0x25f54c[_0x56ac75(0x1b6)])),_0x5052b3=new Set(Object[_0x56ac75(0x367)](_0x3768f0['http']?.['querySchema']?.['properties']||{})),_0x2e9745=new Set(Object[_0x56ac75(0x367)](_0x3768f0[_0x56ac75(0x2b8)]?.[_0x56ac75(0x176)]||{}));for(const _0x7612bd of _0x3768f0[_0x56ac75(0x3f1)]){if(!_0x502cf4[_0x7612bd[_0x56ac75(0x1b6)]])throw new Error(_0x56ac75(0x617)+_0x32b8a8[_0x56ac75(0x43f)]+'\x20'+_0x32b8a8[_0x56ac75(0x73c)]+'\x20missing\x20path\x20field\x20in\x20inputSchema:\x20'+_0x7612bd[_0x56ac75(0x1b6)]);}for(const _0x325ab6 of _0x5052b3){if(!_0x502cf4[_0x325ab6])throw new Error(_0x56ac75(0x617)+_0x32b8a8[_0x56ac75(0x43f)]+'\x20'+_0x32b8a8[_0x56ac75(0x73c)]+'\x20querySchema\x20references\x20missing\x20input\x20field:\x20'+_0x325ab6);}for(const _0x3287e5 of _0x2e9745){if(!_0x502cf4[_0x3287e5])throw new Error(_0x56ac75(0x617)+_0x32b8a8[_0x56ac75(0x43f)]+'\x20'+_0x32b8a8['path']+'\x20binding\x20references\x20missing\x20input\x20field:\x20'+_0x3287e5);}for(const _0xb8b4aa of _0x2e9745){if(_0x1d65cc[_0x56ac75(0x514)](_0xb8b4aa))throw new Error(_0x56ac75(0x617)+_0x32b8a8['method']+'\x20'+_0x32b8a8['path']+_0x56ac75(0x6ff)+_0xb8b4aa);if(_0x5052b3[_0x56ac75(0x514)](_0xb8b4aa))throw new Error(_0x56ac75(0x617)+_0x32b8a8[_0x56ac75(0x43f)]+'\x20'+_0x32b8a8['path']+'\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20'+_0xb8b4aa);const _0x4ed90b=_0x3768f0[_0x56ac75(0x2b8)][_0x56ac75(0x176)][_0xb8b4aa];if(!/^params\.[A-Za-z0-9_*.-]+$/['test'](_0x4ed90b)&&!/^query\.[A-Za-z0-9_*.-]+$/[_0x56ac75(0x219)](_0x4ed90b)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/[_0x56ac75(0x219)](_0x4ed90b)&&!/^headers\.[A-Za-z0-9_*.-]+$/['test'](_0x4ed90b))throw new Error(_0x56ac75(0x617)+_0x32b8a8[_0x56ac75(0x43f)]+'\x20'+_0x32b8a8[_0x56ac75(0x73c)]+_0x56ac75(0x1a6)+_0xb8b4aa+':\x20'+_0x4ed90b);}for(const _0x1c7393 of _0x5052b3){if(_0x1d65cc[_0x56ac75(0x514)](_0x1c7393))throw new Error('Route\x20'+_0x32b8a8[_0x56ac75(0x43f)]+'\x20'+_0x32b8a8[_0x56ac75(0x73c)]+_0x56ac75(0x802)+_0x1c7393);}const _0x505671=_0x3768f0[_0x56ac75(0x2b8)]?.['bodyMode'],_0x544bfc=new Set([_0x56ac75(0x2e6),'remaining-fields','object',_0x56ac75(0x809),_0x56ac75(0x7d1),_0x56ac75(0x1fe)]);if(!_0x544bfc[_0x56ac75(0x514)](_0x505671))throw new Error(_0x56ac75(0x617)+_0x32b8a8[_0x56ac75(0x43f)]+'\x20'+_0x32b8a8[_0x56ac75(0x73c)]+'\x20has\x20invalid\x20http.bodyMode:\x20'+_0x505671);if(_0x505671==='raw'&&!_0x32b8a8['meta']?.[_0x56ac75(0x1fe)])throw new Error(_0x56ac75(0x617)+_0x32b8a8[_0x56ac75(0x43f)]+'\x20'+_0x32b8a8[_0x56ac75(0x73c)]+_0x56ac75(0x218));if(_0x3768f0['mcp']?.['include']!==![]&&(_0x32b8a8[_0x56ac75(0x338)]?.[_0x56ac75(0x1fe)]||_0x32b8a8[_0x56ac75(0x338)]?.[_0x56ac75(0x1d0)]||_0x3768f0[_0x56ac75(0x2b8)]?.[_0x56ac75(0x746)]===_0x56ac75(0x75e)))throw new Error('Route\x20'+_0x32b8a8[_0x56ac75(0x43f)]+'\x20'+_0x32b8a8[_0x56ac75(0x73c)]+'\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20'+_0x3768f0[_0x56ac75(0x2b8)]?.[_0x56ac75(0x746)]);const _0x2306dd=Object[_0x56ac75(0x367)](_0x502cf4)[_0x56ac75(0x626)](_0x510c97=>{const _0x5cb04a=_0x56ac75;if(_0x1d65cc[_0x5cb04a(0x514)](_0x510c97))return![];if(_0x5052b3[_0x5cb04a(0x514)](_0x510c97))return![];if(_0x2e9745[_0x5cb04a(0x514)](_0x510c97))return![];return!![];});if(_0x505671==='none'&&_0x2306dd[_0x56ac75(0x320)]>0x0)throw new Error('Route\x20'+_0x32b8a8[_0x56ac75(0x43f)]+'\x20'+_0x32b8a8['path']+'\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20'+_0x2306dd[_0x56ac75(0x3c7)](',\x20'));if(_0x505671===_0x56ac75(0x7d1)&&_0x2306dd[_0x56ac75(0x626)](_0x50e0f5=>_0x2a1557(_0x502cf4[_0x50e0f5],'array'))[_0x56ac75(0x320)]!==0x1)throw new Error(_0x56ac75(0x617)+_0x32b8a8['method']+'\x20'+_0x32b8a8[_0x56ac75(0x73c)]+_0x56ac75(0x756));}function _0x16a81e(_0x320075,_0x4406ea,_0x269232,_0x48691c){const _0x373744=_0x174be9;for(const [_0x21a40d,_0x28d0fe]of Object[_0x373744(0x5bd)](_0x320075)){if(_0x4406ea[_0x373744(0x514)](_0x21a40d)||_0x269232[_0x373744(0x514)](_0x21a40d)||Object[_0x373744(0x4ea)][_0x373744(0x1b2)][_0x373744(0x341)](_0x48691c,_0x21a40d))continue;if(_0x2a1557(_0x28d0fe,_0x373744(0x7d1)))return _0x21a40d;}return null;}function _0x1ca219(_0x178d46){if(Array['isArray'](_0x178d46))return _0x178d46;if(_0x178d46==null)return[];return[_0x178d46];}function _0x2a1557(_0x3745b7,_0x17deb3){const _0x20e15e=_0x174be9;return _0x1ca219(_0x3745b7?.[_0x20e15e(0x51d)])[_0x20e15e(0x5ca)](_0x17deb3);}function _0x51ea40(_0x2d4797,_0x403bb6){const _0x17a57e=_0x174be9;if(_0x2d4797==null||typeof _0x2d4797!=='string')return _0x2d4797;const _0x171c79=_0x1ca219(_0x403bb6?.[_0x17a57e(0x51d)]);if(_0x171c79[_0x17a57e(0x320)]===0x0)return _0x2d4797;if(_0x171c79[_0x17a57e(0x5ca)](_0x17a57e(0x198))&&_0x2d4797==='null')return null;if(_0x171c79[_0x17a57e(0x5ca)](_0x17a57e(0x71a))){if(_0x2d4797===_0x17a57e(0x687))return!![];if(_0x2d4797===_0x17a57e(0x543))return![];}if(_0x171c79[_0x17a57e(0x5ca)](_0x17a57e(0x3a3))&&/^-?\d+$/['test'](_0x2d4797))return Number[_0x17a57e(0x7dc)](_0x2d4797,0xa);if(_0x171c79['includes'](_0x17a57e(0x656))&&/^-?(?:\d+|\d*\.\d+)$/[_0x17a57e(0x219)](_0x2d4797))return Number(_0x2d4797);return _0x2d4797;}function _0x5c4d67(_0x4bba05){return _0x4000ad(_0x4bba05);}function _0x363350(_0xf4bf5a,_0x2080ee={},_0x5d09a4={},_0x334666=null,_0x2d67bf={}){const _0x4733c7=_0x174be9,_0x2f65af=_0xf4bf5a?.['operation'];if(!_0x2f65af?.[_0x4733c7(0x41e)]||!_0x2f65af[_0x4733c7(0x26f)])return null;const _0x12bb3f=_0x2f65af['inputSchema'][_0x4733c7(0x1c4)]||{},_0x3c77da=_0x2f65af[_0x4733c7(0x2b8)]?.[_0x4733c7(0x862)]?.[_0x4733c7(0x1c4)]||{},_0x1b380a=_0x2f65af['http']?.['bindings']||{},_0x1d3d71=new Set((_0x2f65af[_0x4733c7(0x3f1)]||[])[_0x4733c7(0x800)](_0x1c115b=>_0x1c115b[_0x4733c7(0x1b6)])),_0x11e51d=new Set(Object[_0x4733c7(0x367)](_0x3c77da)),_0xc12390={};for(const [_0x508d65,_0x50f18d]of Object['entries'](_0x12bb3f)){Object[_0x4733c7(0x4ea)]['hasOwnProperty'][_0x4733c7(0x341)](_0x50f18d||{},_0x4733c7(0x3a1))&&(_0xc12390[_0x508d65]=_0x5c4d67(_0x50f18d['default']));}for(const _0x30e222 of _0x2f65af[_0x4733c7(0x3f1)]||[]){if(!Object[_0x4733c7(0x4ea)][_0x4733c7(0x1b2)]['call'](_0x2080ee,_0x30e222[_0x4733c7(0x1b6)]))continue;const _0x371d68=_0x12bb3f[_0x30e222[_0x4733c7(0x1b6)]]||{};_0xc12390[_0x30e222['name']]=_0x51ea40(_0x2080ee[_0x30e222[_0x4733c7(0x1b6)]],_0x371d68);}for(const [_0x12214e,_0x53c8fc]of Object[_0x4733c7(0x5bd)](_0x3c77da)){if(!Object[_0x4733c7(0x4ea)][_0x4733c7(0x1b2)]['call'](_0x5d09a4,_0x12214e))continue;_0xc12390[_0x12214e]=_0x51ea40(_0x5d09a4[_0x12214e],_0x53c8fc||_0x12bb3f[_0x12214e]||{});}for(const [_0xfa1930,_0x2d3f94]of Object['entries'](_0x1b380a)){if(typeof _0x2d3f94!=='string')continue;let _0x50e04c;if(_0x2d3f94['startsWith'](_0x4733c7(0x6d7)))_0x50e04c=_0x2080ee[_0x2d3f94[_0x4733c7(0x747)](0x7)];else{if(_0x2d3f94[_0x4733c7(0x32e)]('query.'))_0x50e04c=_0x5d09a4[_0x2d3f94[_0x4733c7(0x747)](0x6)];else{if(_0x2d3f94===_0x4733c7(0x427))_0x50e04c=_0x334666;else{if(_0x2d3f94[_0x4733c7(0x32e)]('body.'))_0x50e04c=_0x334666?.[_0x2d3f94[_0x4733c7(0x747)](0x5)];else{if(_0x2d3f94[_0x4733c7(0x32e)](_0x4733c7(0x54b)))_0x50e04c=_0x2d67bf?.[_0x2d3f94[_0x4733c7(0x747)](0x8)[_0x4733c7(0x564)]()]??_0x2d67bf?.[_0x2d3f94[_0x4733c7(0x747)](0x8)];}}}}if(_0x50e04c!==undefined)_0xc12390[_0xfa1930]=_0x50e04c;}const _0x59a591=_0x2f65af[_0x4733c7(0x2b8)]?.[_0x4733c7(0x503)];if(_0x59a591!==_0x4733c7(0x2e6)&&_0x59a591!==_0x4733c7(0x1fe)&&_0x334666!=null){if(_0x59a591===_0x4733c7(0x7d1)&&Array['isArray'](_0x334666)){const _0xcc72aa=_0x16a81e(_0x12bb3f,_0x1d3d71,_0x11e51d,_0x1b380a);if(_0xcc72aa)_0xc12390[_0xcc72aa]=_0x334666;}else{if(_0x59a591==='object')for(const [_0x4bff14,_0x192d34]of Object['entries'](_0x12bb3f)){if(_0x1d3d71[_0x4733c7(0x514)](_0x4bff14)||_0x11e51d['has'](_0x4bff14)||Object['prototype'][_0x4733c7(0x1b2)][_0x4733c7(0x341)](_0x1b380a,_0x4bff14))continue;if(Object[_0x4733c7(0x4ea)][_0x4733c7(0x1b2)][_0x4733c7(0x341)](_0x334666,_0x4bff14))_0xc12390[_0x4bff14]=_0x334666[_0x4bff14];else{if(_0x2a1557(_0x192d34,_0x4733c7(0x76b)))_0xc12390[_0x4bff14]=_0x334666;}}else for(const [_0x3b592e,_0x18fe2c]of Object[_0x4733c7(0x5bd)](_0x334666)){if(_0x1d3d71[_0x4733c7(0x514)](_0x3b592e)||_0x11e51d[_0x4733c7(0x514)](_0x3b592e)||Object['prototype'][_0x4733c7(0x1b2)][_0x4733c7(0x341)](_0x1b380a,_0x3b592e))continue;_0xc12390[_0x3b592e]=_0x18fe2c;}}}return _0xc12390;}function _0x4f418d(_0x2e1b7e,_0x2a155f,_0x279ed2,_0x1c060e){const _0x1782c9=_0x174be9;if(!_0x2a155f)return;const _0x58cea5=_0x1ca219(_0x2a155f[_0x1782c9(0x51d)]);if(_0x2e1b7e===undefined)return;if(_0x2e1b7e===null){_0x58cea5[_0x1782c9(0x320)]>0x0&&!_0x58cea5['includes'](_0x1782c9(0x198))&&_0x1c060e[_0x1782c9(0x677)]({'field':_0x279ed2,'message':_0x1782c9(0x17f),'expected':_0x58cea5[_0x1782c9(0x3c7)]('|'),'actual':null});return;}if(_0x58cea5['length']===0x0)return;const _0x2ccb54=_0x58cea5['some'](_0x19b536=>{const _0x15a5f4=_0x1782c9;switch(_0x19b536){case _0x15a5f4(0x695):return typeof _0x2e1b7e==='string';case'integer':return Number[_0x15a5f4(0x5f8)](_0x2e1b7e);case _0x15a5f4(0x656):return typeof _0x2e1b7e===_0x15a5f4(0x656)&&Number['isFinite'](_0x2e1b7e);case _0x15a5f4(0x71a):return typeof _0x2e1b7e===_0x15a5f4(0x71a);case _0x15a5f4(0x76b):return _0x2e1b7e&&typeof _0x2e1b7e===_0x15a5f4(0x76b)&&!Array[_0x15a5f4(0x22a)](_0x2e1b7e);case _0x15a5f4(0x7d1):return Array[_0x15a5f4(0x22a)](_0x2e1b7e);case _0x15a5f4(0x198):return _0x2e1b7e===null;default:return!![];}});if(!_0x2ccb54){_0x1c060e[_0x1782c9(0x677)]({'field':_0x279ed2,'message':_0x1782c9(0x390)+_0x58cea5[_0x1782c9(0x3c7)]('|'),'expected':_0x58cea5['join']('|'),'actual':_0x2e1b7e});return;}Array[_0x1782c9(0x22a)](_0x2e1b7e)&&_0x2a155f[_0x1782c9(0x184)]&&_0x2e1b7e['forEach']((_0x573168,_0x5bc4fa)=>_0x4f418d(_0x573168,_0x2a155f['items'],_0x279ed2+'['+_0x5bc4fa+']',_0x1c060e));}function _0x3e71b4(_0xa01270,_0x5e0a5b){const _0x31a81e=_0x174be9,_0x268a1e=_0xa01270?.['operation'];if(!_0x268a1e?.[_0x31a81e(0x41e)]||!_0x268a1e[_0x31a81e(0x26f)])return null;const _0x152e3a=_0x268a1e[_0x31a81e(0x26f)],_0x341faa=_0x152e3a[_0x31a81e(0x1c4)]||{},_0xdf0d56=new Set(_0x152e3a[_0x31a81e(0x59b)]||[]),_0x2bb54b=[];for(const _0xf9e3e1 of _0xdf0d56){_0x5e0a5b[_0xf9e3e1]===undefined&&_0x2bb54b[_0x31a81e(0x677)]({'field':_0xf9e3e1,'message':'is\x20required','expected':'present','actual':undefined});}if(_0x152e3a[_0x31a81e(0x860)]===![])for(const _0x42e73a of Object['keys'](_0x5e0a5b||{})){!Object['prototype']['hasOwnProperty'][_0x31a81e(0x341)](_0x341faa,_0x42e73a)&&_0x2bb54b['push']({'field':_0x42e73a,'message':_0x31a81e(0x839),'expected':'known\x20field','actual':_0x5e0a5b[_0x42e73a]});}for(const [_0x542817,_0x35673f]of Object[_0x31a81e(0x5bd)](_0x341faa)){_0x4f418d(_0x5e0a5b[_0x542817],_0x35673f,_0x542817,_0x2bb54b);}if(_0x2bb54b[_0x31a81e(0x320)]===0x0)return null;return{'code':_0x31a81e(0x197),'errors':_0x2bb54b};}function _0x5e84ff(_0x3a6804=[]){const _0x7483fa=_0x174be9;if(!Array[_0x7483fa(0x22a)](_0x3a6804)||_0x3a6804[_0x7483fa(0x320)]===0x0)return null;const _0x40e368=_0x3a6804[_0x7483fa(0x747)](0x0,0x3)[_0x7483fa(0x800)]((_0x337014={})=>{const _0x31be65=_0x7483fa,_0x43081c=_0x337014[_0x31be65(0x6a7)]?_0x337014['field']+'\x20':'';return(''+_0x43081c+(_0x337014[_0x31be65(0x258)]||_0x31be65(0x34b)))[_0x31be65(0x724)]();})[_0x7483fa(0x3c7)](';\x20');return _0x3a6804['length']>0x3?_0x40e368+_0x7483fa(0x37a)+(_0x3a6804[_0x7483fa(0x320)]-0x3)+_0x7483fa(0x627):_0x40e368;}function _0x250c11(_0x1cd87a,_0x3b3553={}){const _0x14e875=_0x174be9,_0x1ffd01=_0x3b3553?.[_0x14e875(0x1c2)]?.[_0x14e875(0x4dd)]??_0x3b3553?.[_0x14e875(0x4dd)]??_0x14e875(0x52e),_0x41f2aa=_0x3b3553?.[_0x14e875(0x1c2)]?.[_0x14e875(0x310)]??_0x3b3553?.[_0x14e875(0x310)]??_0x1ffd01?.[_0x14e875(0x310)]??null,_0x4d02c9=_0x3b3553?.[_0x14e875(0x1c2)]?.['code']??_0x3b3553?.['code']??_0x1ffd01?.['code']??null,_0x54e0a2=_0x3b3553?.[_0x14e875(0x1c2)]?.[_0x14e875(0x258)]??_0x3b3553?.[_0x14e875(0x258)]??_0x1ffd01?.[_0x14e875(0x258)]??null,_0x3bdddf=typeof _0x1ffd01===_0x14e875(0x695)?_0x1ffd01:null,_0x204f5f=typeof _0x3bdddf==='string'&&/^[A-Z0-9_]+$/[_0x14e875(0x219)](_0x3bdddf),_0x2aed49=_0x4d02c9??(_0x204f5f?_0x3bdddf:null)??(_0x51d1c0[_0x1cd87a]||_0x14e875(0x2ea)+_0x1cd87a);let _0x55e271=_0x54e0a2;!_0x55e271&&typeof _0x3bdddf===_0x14e875(0x695)&&!_0x204f5f&&(_0x55e271=_0x3bdddf);if(!_0x55e271&&_0x2aed49===_0x14e875(0x197)){const _0x4bd653=_0x5e84ff(_0x41f2aa);_0x55e271=_0x4bd653?_0x14e875(0x2d9)+_0x4bd653:'Validation\x20failed';}if(!_0x55e271&&Array[_0x14e875(0x22a)](_0x41f2aa)&&_0x41f2aa['length']>0x0){const _0x11d83c=_0x5e84ff(_0x41f2aa);if(_0x11d83c)_0x55e271=_0x11d83c;}if(!_0x55e271)_0x55e271=_0x51d1c0[_0x1cd87a]||_0x14e875(0x52e);const _0x3e9eba={'code':_0x2aed49,'message':_0x55e271};if(_0x41f2aa!=null)_0x3e9eba[_0x14e875(0x310)]=_0x41f2aa;return _0x3e9eba;}function _0x27599a(_0x94b5cb){const _0x45dcda=_0x174be9,_0x309c52={};if(!_0x94b5cb)return _0x309c52;for(const _0x2a736f of _0x94b5cb[_0x45dcda(0x5fa)](';')){const _0x37aa5a=_0x2a736f[_0x45dcda(0x3fb)]('=');if(_0x37aa5a===-0x1)continue;const _0x4920eb=_0x2a736f[_0x45dcda(0x747)](0x0,_0x37aa5a)[_0x45dcda(0x724)](),_0x2c67e4=_0x2a736f['slice'](_0x37aa5a+0x1)['trim']();_0x309c52[_0x4920eb]=decodeURIComponent(_0x2c67e4);}return _0x309c52;}function _0x1afecd(_0x14c382,_0x5b1bb7){const _0x4f6f61=_0x174be9;return _0x5b1bb7=_0x206e18(_0x5b1bb7),{'status':_0x5b1bb7[_0x4f6f61(0x269)]??_0x14c382['status'],'headers':{..._0x14c382[_0x4f6f61(0x527)]||{},..._0x5b1bb7[_0x4f6f61(0x527)]||{}},'body':_0x5b1bb7['body']??_0x14c382[_0x4f6f61(0x427)]};}function _0x2f710d(_0x58da39={}){const _0x60154e=_0x174be9;return _0x58da39[_0x60154e(0x746)]||(_0x58da39[_0x60154e(0x420)]?_0x60154e(0x420):_0x60154e(0x2b8));}function _0x4b1c38(_0x456264){const _0x451881=_0x174be9;if(_0x456264['context']?.[_0x451881(0x420)]===!![])return!![];if(_0x456264[_0x451881(0x483)]?.[_0x451881(0x282)]?.['isAuthenticated']===!![])return!![];if(_0x456264[_0x451881(0x483)]?.[_0x451881(0x282)]?.['ok']===!![])return!![];return![];}function _0x5a4dc9(_0x21e25c,_0x228ed1){const _0x2bb5d2=_0x174be9,_0x3a9d85=_0x228ed1[_0x2bb5d2(0x5fa)]('.');let _0x5984dd=_0x21e25c;for(const _0x16d027 of _0x3a9d85){_0x5984dd=_0x5984dd?.[_0x16d027];}return _0x5984dd||null;}class _0x53cb2c{constructor(){const _0x2cb81=_0x174be9;this[_0x2cb81(0x2f1)]=[],this['guards']=[],this[_0x2cb81(0x871)]=[],this[_0x2cb81(0x545)]=0x5*0x400*0x400,this[_0x2cb81(0x662)]=null,this[_0x2cb81(0x7e4)]=[],this[_0x2cb81(0x47f)]=new Set(),this['auth']={'cookieName':_0x2cb81(0x5a9),'stateCookieName':_0x2cb81(0x5c8),'csrfCookieName':_0x2cb81(0x60b)},this[_0x2cb81(0x568)]={},this['_loginStates']=new Map(),this[_0x2cb81(0x2fe)]=null,this[_0x2cb81(0x5e4)]=null,this[_0x2cb81(0x168)]=new Map(),this[_0x2cb81(0x444)]=new _0x4e2d43(),this[_0x2cb81(0x628)]=![],this[_0x2cb81(0x819)]=0x0;}[_0x174be9(0x63b)](_0x26690f={}){const _0x40f821=_0x174be9;return this['_authOptions']=_0x26690f||{},this[_0x40f821(0x6c5)]=_0x26690f['mode']??_0x40f821(0x241),this[_0x40f821(0x568)];}get[_0x174be9(0x62d)](){const _0x2a9b20=_0x174be9;if(this[_0x2a9b20(0x68a)]?.[_0x2a9b20(0x282)])return this[_0x2a9b20(0x68a)][_0x2a9b20(0x282)][_0x2a9b20(0x62d)];return![];}[_0x174be9(0x46f)](){const _0x1cb4c7=_0x174be9;if(this[_0x1cb4c7(0x68a)]?.[_0x1cb4c7(0x282)])return this[_0x1cb4c7(0x68a)][_0x1cb4c7(0x282)][_0x1cb4c7(0x46f)]();return this['_authOptions']||{};}['use'](_0x4378d1){const _0x1e2844=_0x174be9;this[_0x1e2844(0x2f1)][_0x1e2844(0x677)](_0x4378d1);}[_0x174be9(0x544)](_0x4b16ba,_0x4f7465){const _0x27a563=_0x174be9;this['guards'][_0x27a563(0x677)]({'match':_0x4b16ba,'handler':_0x4f7465});}['add'](_0x1fc533,_0x5db23c,_0x4ec5c6,_0x10f835={}){const _0x139c2a=_0x174be9,_0x37fb48={'method':_0x180cf1(_0x1fc533),'path':_0x5db23c,'matcher':_0x4f90a4(_0x5db23c),'handler':_0x4ec5c6,'meta':_0x10f835||{}},_0x5e4783=_0x5e18e2(_0x37fb48);_0x32da13(_0x37fb48,_0x5e4783),_0x37fb48[_0x139c2a(0x5fc)]=_0x5e4783,_0x37fb48[_0x139c2a(0x6cc)]=this[_0x139c2a(0x628)]===!![];if(_0x37fb48[_0x139c2a(0x6cc)])this[_0x139c2a(0x819)]++;this[_0x139c2a(0x871)][_0x139c2a(0x677)](_0x37fb48);}['addRaw'](_0x3e76ef,_0x224309,_0x2aa51b,_0x1300aa={}){const _0x29b5c8=_0x174be9;this[_0x29b5c8(0x5e5)](_0x3e76ef,_0x224309,_0x2aa51b,{..._0x1300aa,'raw':!![]});}['_bestMatch'](_0x53581e,_0x2abe0c,{corsOnly:corsOnly=![]}={}){const _0x1e29f6=_0x174be9;let _0x12fac9=null,_0x23b8d6=Infinity;for(const _0x38a8da of this[_0x1e29f6(0x871)]){if(corsOnly){if(!_0x38a8da[_0x1e29f6(0x338)]?.[_0x1e29f6(0x655)])continue;}else{if(_0x38a8da[_0x1e29f6(0x43f)]!==_0x53581e)continue;}if(!_0x38a8da[_0x1e29f6(0x811)][_0x1e29f6(0x272)][_0x1e29f6(0x219)](_0x2abe0c))continue;const _0xe1e34=_0x38a8da[_0x1e29f6(0x811)]['keys']?.[_0x1e29f6(0x320)]??0x0;if(_0xe1e34<_0x23b8d6){_0x12fac9=_0x38a8da,_0x23b8d6=_0xe1e34;if(_0xe1e34===0x0)break;}}return _0x12fac9;}[_0x174be9(0x1d3)](_0x94cca,_0x373380){const _0x2f5e22=_0x174be9,_0x4ac313=_0x180cf1(_0x94cca),_0x3305bb=this[_0x2f5e22(0x565)](_0x4ac313,_0x373380);if(_0x3305bb)return _0x3305bb;if(_0x4ac313==='OPTIONS')return this[_0x2f5e22(0x565)](_0x4ac313,_0x373380,{'corsOnly':!![]});return null;}[_0x174be9(0x296)](_0x5e89c4,_0x25d0bb){const _0x430ecd=_0x174be9;if(_0x5e89c4?.[_0x430ecd(0x338)]?.[_0x430ecd(0x786)])return![];if(_0x25d0bb?.[_0x430ecd(0x527)]?.[_0x430ecd(0x3bf)])return![];return!![];}[_0x174be9(0x4a5)](){const _0x4fd472=_0x174be9;return this[_0x4fd472(0x871)]['filter'](_0x56507f=>!_0x56507f[_0x4fd472(0x338)]?.[_0x4fd472(0x25a)])[_0x4fd472(0x800)](_0xe19964=>({'method':_0xe19964[_0x4fd472(0x43f)],'path':_0xe19964['path'],'defaults':_0xe19964[_0x4fd472(0x811)][_0x4fd472(0x76c)],'meta':_0xe19964[_0x4fd472(0x338)],'operation':_0xe19964['operation']}));}['addSSE'](_0x3838bb,_0x3ebd19,_0x380c79={}){const _0x1f2d09=_0x174be9,{PassThrough:_0x4c9559}=require$$5;this[_0x1f2d09(0x5e5)](_0x1f2d09(0x1fc),_0x3838bb,({params:_0x145bd1,query:_0x2d455c,headers:_0x44e78c,context:_0x4788ee})=>{const _0x49eb9b=_0x1f2d09,_0x4622d2=new _0x4c9559();let _0x38be41=null;const _0x437538={};try{_0x4788ee?.[_0x49eb9b(0x364)]?.[_0x49eb9b(0x2f4)]?.['setNoDelay'](!![]);}catch{}_0x4622d2[_0x49eb9b(0x753)](_0x49eb9b(0x69e)),_0x38be41=setInterval(()=>{const _0x2cc2c2=_0x49eb9b;try{_0x4622d2['write'](_0x2cc2c2(0x575));}catch{}},0x3a98);const _0x2e8ec6=(_0x21226d,_0x22f920,_0x9e7a={})=>{const _0x2d0c17=_0x49eb9b;try{const _0x1f0f00=_0x9e7a[_0x2d0c17(0x1fe)]?String(_0x22f920??''):JSON[_0x2d0c17(0x729)](_0x22f920);_0x9e7a['id']!=null&&_0x4622d2[_0x2d0c17(0x753)](_0x2d0c17(0x440)+_0x9e7a['id']+'\x0a');_0x4622d2[_0x2d0c17(0x753)](_0x2d0c17(0x788)+_0x21226d+'\x0a');for(const _0x16cb4e of _0x1f0f00[_0x2d0c17(0x5fa)]('\x0a')){_0x4622d2[_0x2d0c17(0x753)](_0x2d0c17(0x6de)+_0x16cb4e+'\x0a');}_0x4622d2['write']('\x0a');}catch{}},_0x55e760=()=>{const _0x57b4db=_0x49eb9b;_0x38be41&&(clearInterval(_0x38be41),_0x38be41=null);try{_0x4622d2[_0x57b4db(0x354)]();}catch{}},_0x40ccd8=(_0x442288,_0x1a5344)=>{_0x437538[_0x442288]=_0x1a5344;};_0x4788ee?.['req']?.['on'](_0x49eb9b(0x419),_0x55e760),_0x4622d2['on'](_0x49eb9b(0x419),_0x55e760);if(_0x4788ee?.[_0x49eb9b(0x282)]&&_0x4788ee[_0x49eb9b(0x282)][_0x49eb9b(0x241)]!==!![]&&_0x4788ee['auth'][_0x49eb9b(0x47d)]){const _0x3171f7={'headers':_0x44e78c??{},'cookies':_0x27599a(_0x44e78c?.[_0x49eb9b(0x181)]),'context':{},'socket':_0x4788ee?.[_0x49eb9b(0x364)]?.[_0x49eb9b(0x2f4)]??{'remoteAddress':null}},_0x127639=setInterval(async()=>{const _0x24c82c=_0x49eb9b;try{const _0x569df4=await this[_0x24c82c(0x1e1)](_0x3171f7);if(_0x569df4?.['open']===!![]||_0x569df4?.['isAuthenticated'])return;_0x2e8ec6(_0x24c82c(0x282),{'expired':!![]}),_0x55e760();}catch{_0x55e760();}},0xea60);_0x127639[_0x49eb9b(0x27a)]?.(),_0x4622d2['on'](_0x49eb9b(0x419),()=>clearInterval(_0x127639));}const _0x39ad60=_0x3ebd19({'send':_0x2e8ec6,'close':_0x55e760,'params':_0x145bd1??{},'query':_0x2d455c??{},'headers':_0x44e78c??{},'context':_0x4788ee,'setHeader':_0x40ccd8});return typeof _0x39ad60==='function'&&_0x4622d2['on'](_0x49eb9b(0x419),_0x39ad60),{'status':0xc8,'headers':{'content-type':_0x49eb9b(0x623),'cache-control':_0x49eb9b(0x368),'connection':_0x49eb9b(0x2e3),'x-accel-buffering':'no',..._0x437538},'body':_0x4622d2};},{..._0x380c79,'sse':!![]});}async[_0x174be9(0x46b)](_0x54bd90,_0x3a173f){const _0x13937d=_0x174be9;for(const _0x222775 of this[_0x13937d(0x60e)]){if(!_0x222775[_0x13937d(0x4a7)](_0x54bd90))continue;const _0xf73e88=await _0x222775[_0x13937d(0x223)](_0x54bd90,_0x3a173f);if(_0xf73e88===![])return![];}return!![];}async[_0x174be9(0x5e3)](_0xec5055,_0x4d4b04,_0x1f6334){let _0xcede73=0x0;const _0x35ef29=async()=>{const _0x3fb5e0=this['middlewares'][_0xcede73++];if(!_0x3fb5e0)return _0x1f6334();return _0x3fb5e0(_0xec5055,_0x4d4b04,_0x35ef29);};return _0x35ef29();}['_wrapApiResponse'](_0x4ade4f,_0x22b0fb){const _0x253d45=_0x174be9,{status:status=0xc8,headers:headers={},body:_0x5bb661}=_0x4ade4f;if(status>=0x12c&&status<0x190)return _0x4ade4f;if(_0x3665f(_0x5bb661))return _0x4ade4f;if(Buffer['isBuffer'](_0x5bb661))return _0x4ade4f;if(typeof _0x5bb661===_0x253d45(0x695))return _0x4ade4f;const _0x6a862a={'time':+_0x22b0fb[_0x253d45(0x5cf)](0x2)};if(_0x5bb661?.[_0x253d45(0x338)]&&typeof _0x5bb661['meta']==='object'){const {time:_0x318a57,..._0x3e9dbc}=_0x5bb661[_0x253d45(0x338)];Object[_0x253d45(0x6b5)](_0x6a862a,_0x3e9dbc);}let _0x23dde8;if(status>=0x190){const _0x44212f=_0x250c11(status,_0x5bb661);_0x23dde8={'data':null,'error':_0x44212f,'meta':_0x6a862a};}else{if(status===0xcc||_0x5bb661==null)_0x23dde8={'data':null,'error':null,'meta':_0x6a862a};else{let _0x145819;if(_0x253d45(0x1c2)in _0x5bb661)_0x145819=_0x5bb661[_0x253d45(0x1c2)];else{const {meta:_0x5ab03e,..._0x5afc32}=_0x5bb661;_0x145819=Object[_0x253d45(0x367)](_0x5afc32)['length']>0x0?_0x5afc32:null;}_0x23dde8={'data':_0x145819,'error':null,'meta':_0x6a862a};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x23dde8};}async[_0x174be9(0x66b)](_0x3f4dea,_0x178d8a,_0x251b20={},_0x12071c={}){const _0x9d0fc1=_0x174be9;_0x3f4dea=_0x180cf1(_0x3f4dea);const _0x32a669=this[_0x9d0fc1(0x1d3)](_0x3f4dea,_0x178d8a),_0xe5c37a={'method':_0x3f4dea,'path':_0x178d8a,'headers':_0x251b20[_0x9d0fc1(0x527)]??{},'body':_0x251b20[_0x9d0fc1(0x427)]??null,'query':_0x251b20['query']??{},'context':_0x12071c,'cookies':_0x27599a(_0x251b20['headers']?.[_0x9d0fc1(0x181)]),'route':_0x32a669,'socket':{'remoteAddress':_0x251b20['remoteAddress']??_0x9d0fc1(0x3c3)}};_0xe5c37a[_0x9d0fc1(0x483)]=_0xe5c37a['context']||{};!_0xe5c37a[_0x9d0fc1(0x483)][_0x9d0fc1(0x282)]&&(_0xe5c37a[_0x9d0fc1(0x483)][_0x9d0fc1(0x282)]=await this['authenticateRequest'](_0xe5c37a));if(_0xe5c37a['context'][_0x9d0fc1(0x282)]?.[_0x9d0fc1(0x40a)])return _0x206e18({'status':0x193,'body':{'error':{'code':_0x9d0fc1(0x4c5),'message':_0x9d0fc1(0x461)}}});_0xe5c37a[_0x9d0fc1(0x483)][_0x9d0fc1(0x282)]?.[_0x9d0fc1(0x3b6)]&&!_0xe5c37a[_0x9d0fc1(0x483)]['user']&&(_0xe5c37a[_0x9d0fc1(0x483)]['user']=_0xe5c37a[_0x9d0fc1(0x483)]['auth'][_0x9d0fc1(0x3b6)]);let _0x1aeb23=null;const _0x253887={'status'(_0x374cc3){const _0x59675e=_0x9d0fc1;_0x1aeb23=_0x1aeb23||{},_0x1aeb23[_0x59675e(0x269)]=_0x374cc3;},'setHeader'(_0x5ea088,_0x3a6126){const _0x65ecea=_0x9d0fc1;_0x1aeb23=_0x1aeb23||{},_0x1aeb23[_0x65ecea(0x527)]=_0x1aeb23['headers']||{};const _0x20db1d=String(_0x5ea088)[_0x65ecea(0x564)]();if(_0x20db1d===_0x65ecea(0x5c9)){const _0x2ccc58=_0x1aeb23[_0x65ecea(0x527)][_0x5ea088];if(!_0x2ccc58)_0x1aeb23[_0x65ecea(0x527)][_0x5ea088]=_0x3a6126;else{if(Array[_0x65ecea(0x22a)](_0x2ccc58))_0x2ccc58[_0x65ecea(0x677)](_0x3a6126);else _0x1aeb23[_0x65ecea(0x527)][_0x5ea088]=[_0x2ccc58,_0x3a6126];}return;}_0x1aeb23[_0x65ecea(0x527)][_0x5ea088]=_0x3a6126;},'send'(_0x1e56bf){const _0x249f06=_0x9d0fc1;_0x1aeb23=_0x1aeb23||{},_0x1aeb23[_0x249f06(0x427)]=_0x1e56bf;}},_0x34c6e6=await this[_0x9d0fc1(0x46b)](_0xe5c37a,_0x253887);if(!_0x34c6e6)return _0x206e18(_0x1aeb23??{'status':0x193});const _0x213282=this[_0x9d0fc1(0x67a)](_0xe5c37a);if(_0x213282)return _0x206e18(_0x213282);const _0x3f170e=this[_0x9d0fc1(0x32a)](_0xe5c37a);if(_0x3f170e)return _0x206e18(_0x3f170e);return await this[_0x9d0fc1(0x5e3)](_0xe5c37a,_0x253887,async()=>{const _0x2adfbd=_0x9d0fc1,_0x3595dc=await this[_0x2adfbd(0x1ab)](_0xe5c37a);if(_0x1aeb23==null){_0x1aeb23=_0x3595dc;return;}_0x1aeb23=_0x1afecd(_0x1aeb23,_0x3595dc);}),_0x206e18(_0x1aeb23);}[_0x174be9(0x67a)](_0x889b99){const _0x39e69c=_0x174be9,_0x19a833=_0x889b99[_0x39e69c(0x730)]?.[_0x39e69c(0x5fc)],_0x56ab52=_0x19a833?.['access'];if(!_0x19a833?.[_0x39e69c(0x41e)]||!_0x56ab52)return null;if(_0x889b99[_0x39e69c(0x483)]?.[_0x39e69c(0x282)]?.[_0x39e69c(0x241)]===!![]||_0x889b99[_0x39e69c(0x483)]?.['auth']?.['isSystem']===!![])return null;const _0x3681a8=_0x2f710d(_0x889b99[_0x39e69c(0x483)]),_0x213d21=Array[_0x39e69c(0x22a)](_0x56ab52['audiences'])?_0x56ab52[_0x39e69c(0x738)]:null;if(_0x56ab52[_0x39e69c(0x1d5)]&&_0x889b99[_0x39e69c(0x483)]?.['internal']!==!![])return{'status':0x193,'body':{'error':_0x39e69c(0x436)}};if(_0x213d21&&_0x213d21[_0x39e69c(0x320)]>0x0&&!_0x213d21[_0x39e69c(0x5ca)](_0x3681a8)&&!(_0x3681a8===_0x39e69c(0x420)&&_0x213d21[_0x39e69c(0x5ca)](_0x39e69c(0x24d))))return{'status':0x193,'body':{'error':_0x39e69c(0x436)}};if(_0x56ab52['authRequired']&&!_0x4b1c38(_0x889b99))return{'status':0x191,'body':{'error':_0x39e69c(0x63a)}};const _0x4100e5=_0x56ab52[_0x39e69c(0x63f)];if(!_0x4100e5)return null;if(_0x889b99['context']?.[_0x39e69c(0x282)]?.[_0x39e69c(0x51d)]===_0x39e69c(0x7be))return null;const _0x11eb02=_0x889b99['context']?.[_0x39e69c(0x282)]?.['token'];if(!_0x11eb02){if(_0x889b99[_0x39e69c(0x483)]?.[_0x39e69c(0x282)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x39e69c(0x1cd)}};}if(!_0x889b99[_0x39e69c(0x1d9)]&&_0x889b99[_0x39e69c(0x730)]?.[_0x39e69c(0x811)]){const _0x30c330=_0x889b99[_0x39e69c(0x730)][_0x39e69c(0x811)]['regex'][_0x39e69c(0x363)](_0x889b99[_0x39e69c(0x73c)]);_0x30c330&&(_0x889b99['params']={},_0x889b99[_0x39e69c(0x730)]['matcher'][_0x39e69c(0x367)][_0x39e69c(0x248)]((_0x22c57b,_0x5e6857)=>{const _0x520818=_0x39e69c,_0x5396cd=_0x30c330[_0x5e6857+0x1];_0x889b99[_0x520818(0x1d9)][_0x22c57b]=_0x5396cd?decodeURIComponent(_0x5396cd):_0x889b99[_0x520818(0x730)][_0x520818(0x811)][_0x520818(0x76c)][_0x22c57b]??undefined;}));}let _0x4d7479=null;const _0x3d7aca=_0x56ab52[_0x39e69c(0x768)]===_0x39e69c(0x684)?_0x39e69c(0x6fd):_0x56ab52[_0x39e69c(0x768)]?.[_0x39e69c(0x684)];_0x3d7aca&&(_0x4d7479=_0x5a4dc9(_0x889b99,_0x3d7aca));if(_0x4d7479&&_0x4d7479['startsWith']('~')){const _0x5245de=_0x45ca5b(_0x4100e5),_0x412a21=_0x49ec87(_0x11eb02[_0x39e69c(0x226)]||[],(_0x11eb02[_0x39e69c(0x7c7)]||{})[_0x4d7479]||[]);if(!_0x3c62e1(_0x412a21,_0x5245de))return{'status':0x193,'body':{'error':_0x39e69c(0x311)+_0x5245de+_0x39e69c(0x5c1)}};}const _0x5b415e=_0x49ec87(_0x11eb02[_0x39e69c(0x226)]||[],_0x4d7479?(_0x11eb02[_0x39e69c(0x7c7)]||{})[_0x4d7479]||[]:[]);if(!_0x3c62e1(_0x5b415e,_0x4100e5))return{'status':0x193,'body':{'error':_0x39e69c(0x311)+_0x4100e5}};return null;}[_0x174be9(0x32a)](_0x2296f4){const _0x540505=_0x174be9,_0x4cd930=_0x2296f4[_0x540505(0x730)],_0x26a144=_0x4cd930?.['operation'];if(!_0x26a144?.['hasCanonical']||!_0x26a144[_0x540505(0x26f)])return null;let _0x26c1ad=_0x2296f4[_0x540505(0x1d9)]??null;if(!_0x26c1ad&&_0x4cd930?.[_0x540505(0x811)]){const _0x13a47f=_0x4cd930[_0x540505(0x811)][_0x540505(0x272)]['exec'](_0x2296f4['path']);_0x13a47f&&(_0x26c1ad={},_0x4cd930[_0x540505(0x811)][_0x540505(0x367)][_0x540505(0x248)]((_0x58db7f,_0x5da48d)=>{const _0x10d50f=_0x540505,_0x2edecf=_0x13a47f[_0x5da48d+0x1];_0x26c1ad[_0x58db7f]=_0x2edecf?decodeURIComponent(_0x2edecf):_0x4cd930[_0x10d50f(0x811)]['defaults'][_0x58db7f]??undefined;}));}const _0xbe246a=_0x363350(_0x4cd930,_0x26c1ad??{},_0x2296f4[_0x540505(0x471)]??{},_0x2296f4[_0x540505(0x427)],_0x2296f4['headers']??{}),_0x581170=_0x3e71b4(_0x4cd930,_0xbe246a||{});if(!_0x581170)return null;const _0x86f70a=_0x5e84ff(_0x581170[_0x540505(0x697)]);return{'status':0x190,'body':{'error':_0x581170['code'],'code':_0x581170[_0x540505(0x779)],'message':_0x86f70a?_0x540505(0x2d9)+_0x86f70a:_0x540505(0x2db),'details':_0x581170[_0x540505(0x697)]}};}[_0x174be9(0x705)](_0x99011f,_0x396670){const _0x50faf4=_0x174be9,_0x5c0552=_0x3e71b4(_0x99011f,_0x396670||{});if(!_0x5c0552)return null;return{'code':_0x5c0552[_0x50faf4(0x779)],'message':_0x5e84ff(_0x5c0552['errors'])?_0x50faf4(0x2d9)+_0x5e84ff(_0x5c0552['errors']):'Validation\x20failed','details':_0x5c0552['errors']};}async[_0x174be9(0x1ab)](_0x13f4d7){const _0x8f4557=_0x174be9;if(_0x13f4d7['method']===_0x8f4557(0x404)){const _0x56ff20=this[_0x8f4557(0x565)](_0x8f4557(0x404),_0x13f4d7[_0x8f4557(0x73c)],{'corsOnly':!![]});if(_0x56ff20)return{'status':0xcc,'headers':_0x1ce9d1(_0x13f4d7[_0x8f4557(0x527)],_0x56ff20['meta'][_0x8f4557(0x655)],_0x56ff20['method'])||{}};}const _0xc872cb=this[_0x8f4557(0x565)](_0x13f4d7[_0x8f4557(0x43f)],_0x13f4d7[_0x8f4557(0x73c)]);if(_0xc872cb){const _0x277120=_0xc872cb[_0x8f4557(0x811)][_0x8f4557(0x272)][_0x8f4557(0x363)](_0x13f4d7[_0x8f4557(0x73c)]),_0x54d92c={};_0xc872cb[_0x8f4557(0x811)][_0x8f4557(0x367)][_0x8f4557(0x248)]((_0x1de6ea,_0x168c35)=>{const _0xe4cf65=_0x8f4557,_0x20d963=_0x277120[_0x168c35+0x1];_0x54d92c[_0x1de6ea]=_0x20d963?decodeURIComponent(_0x20d963):_0xc872cb['matcher'][_0xe4cf65(0x76c)][_0x1de6ea]??undefined;}),_0x13f4d7[_0x8f4557(0x1d9)]=_0x54d92c;try{const _0x470738=await _0xc872cb[_0x8f4557(0x223)]({'params':_0x54d92c,'body':_0x13f4d7[_0x8f4557(0x427)],'query':_0x13f4d7[_0x8f4557(0x471)],'headers':_0x13f4d7[_0x8f4557(0x527)],'context':_0x13f4d7[_0x8f4557(0x483)]}),_0x215ead=_0x206e18(_0x470738),_0x1f77f3=_0x1ce9d1(_0x13f4d7[_0x8f4557(0x527)],_0xc872cb[_0x8f4557(0x338)]?.[_0x8f4557(0x655)],_0xc872cb[_0x8f4557(0x43f)]);if(!_0x1f77f3)return _0x215ead;return{..._0x215ead,'headers':{..._0x215ead[_0x8f4557(0x527)]||{},..._0x1f77f3}};}catch(_0x2ff0c3){const _0x581fef=_0x2ff0c3?.['status']||_0x24d217[_0x2ff0c3?.['code']]||0x1f4;return{'status':_0x581fef,'body':{'error':_0x2ff0c3['message']||_0x8f4557(0x643),'code':_0x2ff0c3?.[_0x8f4557(0x779)]||_0x51d1c0[_0x581fef]||_0x8f4557(0x2ea)+_0x581fef,'message':_0x2ff0c3?.[_0x8f4557(0x258)]||_0x8f4557(0x643),..._0x2ff0c3?.[_0x8f4557(0x310)]!=null?{'details':_0x2ff0c3['details']}:{}}};}}return{'status':0x194,'body':{'error':_0x8f4557(0x55c)}};}['listen'](_0xf7fada,_0x31aba8={}){const _0x379c3a=_0x174be9;if(typeof _0x31aba8===_0x379c3a(0x695)||Array[_0x379c3a(0x22a)](_0x31aba8))_0x31aba8={'host':_0x31aba8};_0x31aba8=_0x31aba8??{};const _0x3beb35=Number(_0x31aba8[_0x379c3a(0x633)])||0x0;if(_0x3beb35>=0x1||_0x31aba8[_0x379c3a(0x4f6)]!=null||_0x31aba8[_0x379c3a(0x2c1)]!=null){const _0x453778=new Error(_0x379c3a(0x37b)+_0x379c3a(0x28c)+_0x379c3a(0x19a)+_0x379c3a(0x4ee));_0x453778[_0x379c3a(0x779)]=_0x379c3a(0x22c);throw _0x453778;}if(this['server'])throw new Error('HTTP\x20server\x20already\x20running');const _0x951802=_0x31aba8[_0x379c3a(0x7ce)]==null?[undefined]:[][_0x379c3a(0x539)](_0x31aba8['host']);if(!_0x951802[_0x379c3a(0x320)]||_0x951802[_0x379c3a(0x19e)](_0x3929e5=>_0x3929e5!==undefined&&(typeof _0x3929e5!==_0x379c3a(0x695)||!_0x3929e5))){const _0x1b1367=new Error(_0x379c3a(0x2c7));_0x1b1367[_0x379c3a(0x779)]=_0x379c3a(0x71e);throw _0x1b1367;}_0xf7fada&&this[_0x379c3a(0x282)][_0x379c3a(0x36c)]===_0x379c3a(0x5a9)&&(this['auth'][_0x379c3a(0x36c)]='okdb_session_'+_0xf7fada,this[_0x379c3a(0x68a)]?.['auth']&&(this[_0x379c3a(0x68a)][_0x379c3a(0x282)]['_cookieName']=this[_0x379c3a(0x282)]['cookieName']));const _0x1ccfa1=this[_0x379c3a(0x68a)]?.[_0x379c3a(0x33b)]?.[_0x379c3a(0x292)]?.[_0x379c3a(0x60d)]??![],_0x29aa2b=async(_0x25ef76,_0xec3121)=>{const _0x1a7621=_0x379c3a,_0x475d2e=Date[_0x1a7621(0x562)]();if(_0x1ccfa1){const _0x3ae509=_0x25ef76[_0x1a7621(0x4b2)]||'/',_0x253cd5=_0x25ef76['headers']?.[_0x1a7621(0x6ed)]?_0x25ef76[_0x1a7621(0x527)][_0x1a7621(0x6ed)]['replace'](/^Bearer\s+(\S{0,8})\S*/i,_0x1a7621(0x346)):'-',_0x15c3e7=_0x25ef76['headers']?.['cf-ray']||'-',_0x3e20cc=_0x25ef76[_0x1a7621(0x527)]?.[_0x1a7621(0x7a4)]||_0x25ef76[_0x1a7621(0x527)]?.[_0x1a7621(0x293)]||'-',_0x1ac6f3=_0x25ef76[_0x1a7621(0x527)]?.[_0x1a7621(0x859)]||'-';process[_0x1a7621(0x4a1)][_0x1a7621(0x753)](_0x1a7621(0x3a6)+_0x25ef76[_0x1a7621(0x43f)][_0x1a7621(0x466)](0x7)+'\x20'+_0x3ae509[_0x1a7621(0x466)](0x2d)+'\x20'+(_0x1a7621(0x50c)+_0x253cd5+_0x1a7621(0x582)+_0x1ac6f3+_0x1a7621(0x17a)+_0x15c3e7+_0x1a7621(0x46d)+_0x3e20cc+'\x0a'));}try{const _0x5a1223=new _0x5f12b5(_0x25ef76[_0x1a7621(0x4b2)],_0x1a7621(0x85d)+_0x25ef76[_0x1a7621(0x527)][_0x1a7621(0x7ce)]),_0x2667db=this[_0x1a7621(0x1d3)](_0x25ef76[_0x1a7621(0x43f)],_0x5a1223[_0x1a7621(0x2e4)]),_0x76b6dd=_0x2667db?.[_0x1a7621(0x338)]?.[_0x1a7621(0x1fe)]===!![];if(_0x76b6dd){const _0x335428=_0x25ef76[_0x1a7621(0x527)]?.[_0x1a7621(0x5d3)];if(_0x335428!=null){const _0x4fd2c5=Number(_0x335428);if(Number['isFinite'](_0x4fd2c5)&&_0x4fd2c5>this[_0x1a7621(0x545)]){_0xec3121[_0x1a7621(0x21f)]=0x19d,_0xec3121[_0x1a7621(0x470)]('Payload\x20too\x20large');return;}}}const _0x27eabd=_0x76b6dd?null:await _0x31f8e3(_0x25ef76,this[_0x1a7621(0x545)]),_0x125123=_0x76b6dd?_0x10ce94(_0x25ef76,this[_0x1a7621(0x545)]):undefined,_0x33f07b=await this[_0x1a7621(0x66b)](_0x25ef76[_0x1a7621(0x43f)],_0x5a1223[_0x1a7621(0x2e4)],{'body':_0x27eabd,'query':Object['fromEntries'](_0x5a1223['searchParams'][_0x1a7621(0x5bd)]()),'headers':_0x25ef76[_0x1a7621(0x527)]},{'req':_0x25ef76,'res':_0xec3121,'rawStream':_0x125123}),_0x4521ed=this[_0x1a7621(0x1d3)](_0x25ef76['method'],_0x5a1223['pathname']),_0x62a4c3=Date['now']()-_0x475d2e,_0x59f51b=this[_0x1a7621(0x296)](_0x4521ed,_0x33f07b)?this['_wrapApiResponse'](_0x33f07b,_0x62a4c3):_0x206e18(_0x33f07b),_0x122d4=(_0x59f51b[_0x1a7621(0x269)]||0xc8)>=0x190;this['metrics']['record'](_0x25ef76['method'],_0x62a4c3,_0x122d4),_0x5f0195(_0xec3121,_0x59f51b);if(_0x1ccfa1){const _0x472f76=_0x59f51b['status']||0xc8,_0x51ec7b=Date[_0x1a7621(0x562)]()-_0x475d2e;process[_0x1a7621(0x4a1)][_0x1a7621(0x753)]('[res]\x20'+_0x25ef76[_0x1a7621(0x43f)][_0x1a7621(0x466)](0x7)+'\x20'+_0x5a1223[_0x1a7621(0x2e4)][_0x1a7621(0x466)](0x2d)+'\x20'+_0x472f76+'\x20\x20'+_0x51ec7b+_0x1a7621(0x352));}}catch(_0x587a18){const _0x1e0161=Date[_0x1a7621(0x562)]()-_0x475d2e;this[_0x1a7621(0x444)]['record'](_0x25ef76[_0x1a7621(0x43f)],_0x1e0161,!![]);const _0x1df9e6=_0x587a18?.[_0x1a7621(0x269)]||0x1f4;_0xec3121[_0x1a7621(0x21f)]=_0x1df9e6,_0x1df9e6===0x19d?_0xec3121[_0x1a7621(0x470)]('Payload\x20too\x20large'):_0xec3121['end'](_0x587a18[_0x1a7621(0x258)]||_0x1a7621(0x643));}};this[_0x379c3a(0x7e4)]=_0x951802[_0x379c3a(0x800)](_0x1201d1=>{const _0x8c3ec5=_0x379c3a,_0x3a75e5=_0x431244[_0x8c3ec5(0x4f8)](_0x29aa2b);_0x3a75e5['on'](_0x8c3ec5(0x2c6),_0x2695ed=>{const _0x38f3e2=_0x8c3ec5;this[_0x38f3e2(0x47f)]['add'](_0x2695ed),_0x2695ed['on'](_0x38f3e2(0x419),()=>this[_0x38f3e2(0x47f)][_0x38f3e2(0x4b0)](_0x2695ed));});if(_0x1201d1===undefined)_0x3a75e5[_0x8c3ec5(0x64a)](_0xf7fada);else _0x3a75e5[_0x8c3ec5(0x64a)](_0xf7fada,_0x1201d1);return _0x3a75e5;}),this['server']=this[_0x379c3a(0x7e4)][0x0];for(const _0x5c3d01 of this[_0x379c3a(0x7e4)][_0x379c3a(0x747)](0x1))_0x5c3d01['on'](_0x379c3a(0x4dd),_0x43d105=>this[_0x379c3a(0x662)]?.[_0x379c3a(0x3bc)](_0x379c3a(0x4dd),_0x43d105));const _0x20bc6e=_0x2e4548(_0xf7fada,_0x31aba8[_0x379c3a(0x7ce)]),_0x7366b=this[_0x379c3a(0x68a)];return _0x7366b?.[_0x379c3a(0x666)]&&(_0x7366b[_0x379c3a(0x666)]['noteListenAddr'](_0x20bc6e),require$$1$1[_0x379c3a(0x832)]?_0x7366b['_activateProcessesReader']?.({'kind':'http-server'})[_0x379c3a(0x613)](()=>{}):_0x7366b[_0x379c3a(0x35f)]?.({'kind':_0x379c3a(0x221),'listenAddr':_0x20bc6e})[_0x379c3a(0x613)](()=>{})),this[_0x379c3a(0x662)];}async[_0x174be9(0x419)](_0x365cbd={}){const _0x35e1cb=_0x174be9,_0x5a54be=this[_0x35e1cb(0x662)];this[_0x35e1cb(0x662)]=null;const _0x4107af=this[_0x35e1cb(0x7e4)][_0x35e1cb(0x5ca)](_0x5a54be)?this[_0x35e1cb(0x7e4)]:_0x5a54be?[_0x5a54be]:[];this['servers']=[];if(_0x5a54be&&_0x5a54be[_0x35e1cb(0x2a1)]){try{await _0x5a54be['close']();}catch{}this[_0x35e1cb(0x444)]&&this[_0x35e1cb(0x444)][_0x35e1cb(0x419)]();return;}if(_0x4107af[_0x35e1cb(0x320)]){const _0x445499=_0x365cbd['forceAfterMs']===Infinity?Infinity:Number[_0x35e1cb(0x39f)](_0x365cbd[_0x35e1cb(0x2b1)])?Math['max'](0x0,_0x365cbd[_0x35e1cb(0x2b1)]):0x3e8,_0x141f09=_0x266284=>new Promise(_0x559131=>{const _0x556cd6=_0x35e1cb;let _0xd7f444=![],_0x1ad74b=null,_0x5caaa8=null;const _0x4de7b0=()=>{if(_0xd7f444)return;_0xd7f444=!![];if(_0x1ad74b)clearTimeout(_0x1ad74b);if(_0x5caaa8)clearTimeout(_0x5caaa8);_0x559131();};try{_0x266284[_0x556cd6(0x419)](_0x4de7b0);}catch{_0x4de7b0();return;}try{_0x266284[_0x556cd6(0x4f7)]?.();}catch{}if(_0x355056(_0x445499))return;_0x1ad74b=setTimeout(()=>{const _0x159e01=_0x556cd6;try{_0x266284['closeAllConnections']?.();}catch{}for(const _0x3193ee of this[_0x159e01(0x47f)]){try{_0x3193ee[_0x159e01(0x354)]();}catch{}}_0x5caaa8=setTimeout(_0x4de7b0,0x64),_0x5caaa8[_0x159e01(0x27a)]?.();},_0x913b99(_0x445499)),_0x1ad74b[_0x556cd6(0x27a)]?.();});await Promise[_0x35e1cb(0x260)](_0x4107af['map'](_0x141f09));}this[_0x35e1cb(0x444)]&&this['metrics'][_0x35e1cb(0x419)]();}['signCookie'](_0x388497,_0x354934,_0x4664b9=0x36ee80){const _0x163976=_0x174be9,_0x278d75=Date[_0x163976(0x562)](),_0x151a7e=Buffer[_0x163976(0x1c3)](JSON['stringify']({'iat':_0x278d75,'exp':_0x278d75+_0x4664b9,..._0x388497}))['toString'](_0x163976(0x50b)),_0x444218=_0x161e47(_0x151a7e,_0x354934);return _0x151a7e+'.'+_0x444218;}[_0x174be9(0x72e)](_0x5ba3c4,_0x27398e={}){const _0xaa4027=_0x174be9,{httpOnly:httpOnly=!![],sameSite:sameSite='Lax',path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x27398e;let _0x27e4d1=this['auth'][_0xaa4027(0x36c)]+'='+_0x5ba3c4;if(httpOnly)_0x27e4d1+=_0xaa4027(0x835);if(sameSite)_0x27e4d1+=_0xaa4027(0x25e)+sameSite;if(path)_0x27e4d1+=_0xaa4027(0x2eb)+path;if(secure)_0x27e4d1+=_0xaa4027(0x5e0);if(Number[_0xaa4027(0x39f)](maxAge))_0x27e4d1+=';\x20Max-Age='+Math[_0xaa4027(0x456)](0x0,Math[_0xaa4027(0x349)](maxAge));if(expires instanceof Date)_0x27e4d1+=';\x20Expires='+expires[_0xaa4027(0x85e)]();return _0x27e4d1;}[_0x174be9(0x57b)](_0x1075f9=this[_0x174be9(0x282)]['cookieName'],_0x293f95={}){const _0x41eed5=_0x174be9,{path:path='/',sameSite:sameSite=_0x41eed5(0x857),secure:secure=![],httpOnly:httpOnly=!![]}=_0x293f95;let _0x5e5a33=_0x1075f9+'=';if(httpOnly)_0x5e5a33+=';\x20HttpOnly';if(sameSite)_0x5e5a33+=';\x20SameSite='+sameSite;if(path)_0x5e5a33+=';\x20Path='+path;if(secure)_0x5e5a33+=';\x20Secure';return _0x5e5a33+=_0x41eed5(0x65c),_0x5e5a33;}['verifyCookie'](_0x5c35c4,_0x1b1030){const _0x4fa015=_0x174be9;if(!_0x5c35c4)return null;const [_0x93d888,_0x258657]=String(_0x5c35c4)[_0x4fa015(0x5fa)]('.');if(!_0x93d888||!_0x258657)return null;const _0x1ea363=_0x161e47(_0x93d888,_0x1b1030);if(!_0x5b62ae(_0x258657,_0x1ea363))return null;try{const _0x2d1225=JSON[_0x4fa015(0x40d)](Buffer[_0x4fa015(0x1c3)](_0x93d888,'base64url')['toString']());if(_0x2d1225[_0x4fa015(0x7fe)]<=Date[_0x4fa015(0x562)]())return null;return _0x2d1225;}catch{return null;}}[_0x174be9(0x36b)](_0x51a479){const _0x548a78=_0x174be9;if(this[_0x548a78(0x68a)]?.[_0x548a78(0x282)])return this[_0x548a78(0x68a)][_0x548a78(0x282)][_0x548a78(0x36b)](_0x51a479);return _0x1a8ee5(_0x51a479);}['issueToken'](_0x4bfc0d){const _0x2059bf=_0x174be9;if(this[_0x2059bf(0x68a)]?.[_0x2059bf(0x282)])return this[_0x2059bf(0x68a)][_0x2059bf(0x282)][_0x2059bf(0x23b)](_0x4bfc0d);const _0x418f9c=this[_0x2059bf(0x568)]?.[_0x2059bf(0x2d1)]??0x36ee80,_0x493c84=this[_0x2059bf(0x568)]?.[_0x2059bf(0x1ea)];return _0x5187db(_0x4bfc0d,_0x493c84,_0x418f9c);}[_0x174be9(0x7af)](_0xd38431){const _0x4bc4a7=_0x174be9;if(this[_0x4bc4a7(0x68a)]?.[_0x4bc4a7(0x282)])return this[_0x4bc4a7(0x68a)][_0x4bc4a7(0x282)][_0x4bc4a7(0x7af)](_0xd38431);const _0x457449=this[_0x4bc4a7(0x568)]?.[_0x4bc4a7(0x1ea)];return _0x2032f8(_0xd38431,_0x457449);}async[_0x174be9(0x1e1)](_0x2c648d){const _0x11f929=_0x174be9;if(this[_0x11f929(0x68a)]?.[_0x11f929(0x282)])return this[_0x11f929(0x68a)][_0x11f929(0x282)][_0x11f929(0x1e1)](_0x2c648d);if(_0x2c648d[_0x11f929(0x483)]?.[_0x11f929(0x420)]===!![]||this[_0x11f929(0x6c5)]===_0x11f929(0x241))return{'id':_0x11f929(0x1ae),'username':_0x11f929(0x1ae),'roles':[_0x11f929(0x560)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':'system','username':_0x11f929(0x1ae),'roles':['admin'],'isAuthenticated':!![],'isSystem':!![]}};const _0x5de83e=this['parseBearer'](_0x2c648d[_0x11f929(0x527)]?.[_0x11f929(0x6ed)]),_0x5c906a=_0x2c648d[_0x11f929(0x3b5)]?.[this[_0x11f929(0x282)]['cookieName']],_0x5dd9f7=_0x5de83e||_0x5c906a;if(!_0x5dd9f7)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x17e1bc=this[_0x11f929(0x7af)](_0x5dd9f7);if(!_0x17e1bc)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x245891={'id':_0x17e1bc['sub']??null,'username':_0x17e1bc[_0x11f929(0x1bd)]??null,'roles':Array[_0x11f929(0x22a)](_0x17e1bc[_0x11f929(0x735)])?_0x17e1bc[_0x11f929(0x735)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x245891['id'],'username':_0x245891[_0x11f929(0x1bd)],'roles':_0x245891[_0x11f929(0x735)],'isAuthenticated':!![],'isSystem':![],'user':_0x245891,'claims':_0x17e1bc,'subject':_0x245891['id']};}async[_0x174be9(0x707)](_0x5258e0,_0x403466={}){const _0x25dcce=_0x174be9,_0x208a4e=_0x376007(_0x5258e0),_0x332442=Array[_0x25dcce(0x22a)](_0x403466['allowedAlgs'])&&_0x403466[_0x25dcce(0x217)][_0x25dcce(0x320)]>0x0?_0x403466['allowedAlgs']:[_0x25dcce(0x4d9),_0x25dcce(0x6d9)],_0x520bd2=_0x208a4e[_0x25dcce(0x815)]?.['alg'];if(!_0x332442[_0x25dcce(0x5ca)](_0x520bd2))throw new Error('Unsupported\x20JWT\x20alg:\x20'+_0x520bd2);if(!_0x208a4e[_0x25dcce(0x815)]?.[_0x25dcce(0x4af)])throw new Error(_0x25dcce(0x56a));const _0x3902ed=await this[_0x25dcce(0x205)](_0x403466);if(!_0x3902ed?.[_0x25dcce(0x612)])throw new Error(_0x25dcce(0x6e0));const _0xe3ef44=await this['_getJwkKey'](_0x3902ed[_0x25dcce(0x612)],_0x208a4e[_0x25dcce(0x815)][_0x25dcce(0x4af)],_0x403466);if(!_0xc61fa8(_0x520bd2,_0xe3ef44,_0x208a4e[_0x25dcce(0x224)],_0x208a4e[_0x25dcce(0x5a0)]))throw new Error(_0x25dcce(0x1ca));const _0x441643=Math[_0x25dcce(0x349)](Date['now']()/0x3e8),_0xe700fd=_0x208a4e[_0x25dcce(0x737)]||{};if(_0xe700fd['iss']!==_0x3902ed[_0x25dcce(0x742)])throw new Error(_0x25dcce(0x49b));const _0x306cfd=_0x403466[_0x25dcce(0x21c)];if(_0x306cfd){const _0x9abfc1=_0x483a43(_0xe700fd['aud']);if(!_0x9abfc1['includes'](_0x306cfd))throw new Error('JWT\x20audience\x20mismatch');}if(typeof _0xe700fd[_0x25dcce(0x7fe)]!==_0x25dcce(0x656)||_0xe700fd[_0x25dcce(0x7fe)]<=_0x441643)throw new Error(_0x25dcce(0x82c));if(_0xe700fd[_0x25dcce(0x509)]!=null&&_0xe700fd[_0x25dcce(0x509)]>_0x441643)throw new Error(_0x25dcce(0x4c3));if(_0xe700fd[_0x25dcce(0x593)]==='id')throw new Error(_0x25dcce(0x4ed));return{'subject':_0xe700fd[_0x25dcce(0x2f9)]??null,'email':_0xe700fd[_0x25dcce(0x34c)]??null,'scopes':typeof _0xe700fd[_0x25dcce(0x768)]===_0x25dcce(0x695)?_0xe700fd['scope'][_0x25dcce(0x5fa)](/\s+/)[_0x25dcce(0x626)](Boolean):[],'claims':_0xe700fd,'tokenType':_0x25dcce(0x490)};}async[_0x174be9(0x205)](_0x78124d={}){const _0x915788=_0x174be9,_0x54fa2f=String(_0x78124d[_0x915788(0x742)]||'')[_0x915788(0x4c2)](/\/+$/,'');if(!_0x54fa2f)return null;const _0x514d05=Number[_0x915788(0x39f)](_0x78124d['discoveryTtlMs'])?_0x78124d[_0x915788(0x2a6)]:0xa*0x3c*0x3e8;if(this[_0x915788(0x2fe)]?.[_0x915788(0x742)]===_0x54fa2f&&this[_0x915788(0x2fe)]['expiresAt']>Date['now']())return this['_oidcDiscoveryCache'][_0x915788(0x1a4)];const _0x4ff853=await _0x277cb1(_0x54fa2f+_0x915788(0x61c)),_0x9574a5={'issuer':_0x4ff853[_0x915788(0x742)]||_0x54fa2f,'authorization_endpoint':_0x78124d[_0x915788(0x251)]||_0x4ff853[_0x915788(0x1be)],'token_endpoint':_0x78124d[_0x915788(0x7cd)]||_0x4ff853[_0x915788(0x3c4)],'jwks_uri':_0x78124d['jwksUri']||_0x4ff853[_0x915788(0x612)]};return this[_0x915788(0x2fe)]={'issuer':_0x54fa2f,'value':_0x9574a5,'expiresAt':Date[_0x915788(0x562)]()+_0x514d05},_0x9574a5;}async[_0x174be9(0x2da)](_0x403a8f,_0x340cea=0x5*0x3c*0x3e8){const _0x598e28=_0x174be9,_0x5205df=await _0x277cb1(_0x403a8f),_0x1b3837=new Map();for(const _0x1b1d5d of _0x5205df[_0x598e28(0x367)]||[]){if(!_0x1b1d5d?.[_0x598e28(0x4af)])continue;_0x1b3837[_0x598e28(0x4a3)](_0x1b1d5d['kid'],_0x189a90(_0x1b1d5d));}return this[_0x598e28(0x5e4)]={'uri':_0x403a8f,'keys':_0x1b3837,'expiresAt':Date[_0x598e28(0x562)]()+_0x340cea},this[_0x598e28(0x5e4)];}async[_0x174be9(0x491)](_0x3acca7,_0x2fa65b,_0x50c81f={}){const _0x27db09=_0x174be9,_0x1570ff=Number[_0x27db09(0x39f)](_0x50c81f[_0x27db09(0x642)])?_0x50c81f['jwksTtlMs']:0x5*0x3c*0x3e8,_0x3c096c=0x1e*0x3e8,_0x2a5f01=this['_jwksNegativeCache'][_0x27db09(0x5f1)](_0x2fa65b);if(_0x2a5f01!==undefined&&_0x2a5f01>Date[_0x27db09(0x562)]())throw new Error(_0x27db09(0x68c)+_0x2fa65b);(!this[_0x27db09(0x5e4)]||this[_0x27db09(0x5e4)]['uri']!==_0x3acca7||this[_0x27db09(0x5e4)][_0x27db09(0x1f8)]<=Date[_0x27db09(0x562)]())&&await this[_0x27db09(0x2da)](_0x3acca7,_0x1570ff);let _0x377191=this[_0x27db09(0x5e4)]?.[_0x27db09(0x367)]?.[_0x27db09(0x5f1)](_0x2fa65b);if(_0x377191)return _0x377191;await this['_fetchJwks'](_0x3acca7,_0x1570ff),_0x377191=this[_0x27db09(0x5e4)]?.[_0x27db09(0x367)]?.[_0x27db09(0x5f1)](_0x2fa65b);if(!_0x377191){this[_0x27db09(0x168)][_0x27db09(0x4a3)](_0x2fa65b,Date[_0x27db09(0x562)]()+_0x3c096c);throw new Error(_0x27db09(0x68c)+_0x2fa65b);}return _0x377191;}[_0x174be9(0x781)](_0x2e76c1){const _0x453b54=_0x174be9;if(this['_okdb']?.[_0x453b54(0x282)])return this[_0x453b54(0x68a)][_0x453b54(0x282)][_0x453b54(0x781)](_0x2e76c1);const _0x59b8d4=_0x2e76c1?.[_0x453b54(0x614)]||{},_0x214938={'sub':_0x2e76c1?.[_0x453b54(0x880)]??_0x59b8d4['sub']??null,'email':_0x2e76c1?.[_0x453b54(0x34c)]??_0x59b8d4[_0x453b54(0x34c)]??null,'name':_0x2e76c1?.['name']??_0x59b8d4[_0x453b54(0x1b6)]??_0x59b8d4[_0x453b54(0x477)]??null,'groups':_0x2e76c1?.['groups']??_0x59b8d4[_0x453b54(0x812)]??[],'roles':_0x2e76c1?.[_0x453b54(0x735)]??_0x59b8d4[_0x453b54(0x735)]??[]};return{'type':_0x453b54(0x413),'tokenType':_0x2e76c1?.[_0x453b54(0x306)]??_0x453b54(0x490),'subject':_0x214938[_0x453b54(0x2f9)],'email':_0x214938[_0x453b54(0x34c)],'scopes':_0x2e76c1?.[_0x453b54(0x2a4)]??_0x59b8d4[_0x453b54(0x768)]?.[_0x453b54(0x5fa)]?.('\x20')?.[_0x453b54(0x626)](Boolean)??[],'claims':_0x59b8d4,'user':_0x214938,'isAuthenticated':!![]};}[_0x174be9(0x882)](_0x1f28a6={},_0x145871=0x927c0){const _0x1e1f98=_0x174be9;if(this[_0x1e1f98(0x68a)]?.['auth'])return this[_0x1e1f98(0x68a)][_0x1e1f98(0x282)]['createLoginState'](_0x1f28a6,_0x145871);const _0x19f5f=_0x5dacf6(0x18);this[_0x1e1f98(0x3df)][_0x1e1f98(0x4a3)](_0x19f5f,{..._0x1f28a6,'exp':Date[_0x1e1f98(0x562)]()+_0x145871});if(this[_0x1e1f98(0x3df)][_0x1e1f98(0x569)]%0x32===0x0){const _0x2b36f8=Date[_0x1e1f98(0x562)]();for(const [_0x4d3f5f,_0xa79c56]of this[_0x1e1f98(0x3df)]){if(_0xa79c56[_0x1e1f98(0x7fe)]<=_0x2b36f8)this['_loginStates'][_0x1e1f98(0x4b0)](_0x4d3f5f);}}return _0x19f5f;}[_0x174be9(0x279)](_0x191f69){const _0x3115e1=_0x174be9;if(this[_0x3115e1(0x68a)]?.[_0x3115e1(0x282)])return this[_0x3115e1(0x68a)]['auth'][_0x3115e1(0x279)](_0x191f69);if(!_0x191f69)return null;const _0x346aa3=this[_0x3115e1(0x3df)][_0x3115e1(0x5f1)](_0x191f69);this[_0x3115e1(0x3df)]['delete'](_0x191f69);if(!_0x346aa3)return null;if(_0x346aa3[_0x3115e1(0x7fe)]<=Date[_0x3115e1(0x562)]())return null;return _0x346aa3;}}function _0x206e18(_0x479153){const _0xa0ac80=_0x174be9;if(_0x479153==null)return{'status':0xcc};if(Buffer[_0xa0ac80(0x31e)](_0x479153)||_0x3665f(_0x479153))return{'status':0xc8,'body':_0x479153};if(typeof _0x479153==='object'&&'status'in _0x479153){if(!(_0xa0ac80(0x427)in _0x479153)&&!_0x3665f(_0x479153['body'])){const {status:_0x1d5ecf,headers:_0x32172c,..._0x1a2c33}=_0x479153;if(Object[_0xa0ac80(0x367)](_0x1a2c33)['length']>0x0)return{'status':_0x1d5ecf,'headers':_0x32172c,'body':_0x1a2c33};}return _0x479153;}return{'status':0xc8,'body':_0x479153};}function _0x3665f(_0x1b9311){const _0x2b1c12=_0x174be9;return _0x1b9311&&typeof _0x1b9311[_0x2b1c12(0x71d)]===_0x2b1c12(0x807);}function _0x10ce94(_0x5b3ea5,_0x368fb7){const _0x4fcb25=_0x174be9,{PassThrough:_0x2b38ee}=require$$5;let _0x112775=0x0,_0xf69f75=![];const _0xeaeb7b=new _0x2b38ee();return _0x5b3ea5['on'](_0x4fcb25(0x524),_0x17b2d9=>{const _0x44bf7a=_0x4fcb25;if(_0xf69f75)return;_0x112775+=_0x17b2d9[_0x44bf7a(0x320)];if(_0x112775>_0x368fb7){_0xf69f75=!![];const _0x1a1d74=new Error(_0x44bf7a(0x27e));_0x1a1d74[_0x44bf7a(0x269)]=0x19d,_0xeaeb7b[_0x44bf7a(0x354)](_0x1a1d74);return;}if(!_0xeaeb7b[_0x44bf7a(0x523)])_0xeaeb7b[_0x44bf7a(0x677)](_0x17b2d9);}),_0x5b3ea5['on']('end',()=>{const _0x5d5139=_0x4fcb25;!_0xf69f75&&!_0xeaeb7b[_0x5d5139(0x523)]&&(_0xf69f75=!![],_0xeaeb7b[_0x5d5139(0x470)]());}),_0x5b3ea5['on'](_0x4fcb25(0x4dd),_0xd494da=>{const _0x50782c=_0x4fcb25;if(!_0xeaeb7b['destroyed'])_0xeaeb7b[_0x50782c(0x354)](_0xd494da);}),_0x5b3ea5[_0x4fcb25(0x5b5)](),_0xeaeb7b['on'](_0x4fcb25(0x28e),()=>{const _0x7443b8=_0x4fcb25;if(!_0xeaeb7b[_0x7443b8(0x523)])_0x5b3ea5[_0x7443b8(0x28e)]();}),_0xeaeb7b;}function _0x31f8e3(_0x554a91,_0x3fed2b){const _0x435195=_0x174be9;if(_0x554a91[_0x435195(0x43f)]===_0x435195(0x1fc)||_0x554a91['method']===_0x435195(0x16a))return null;const _0x329f51=_0x554a91['headers']?.[_0x435195(0x5d3)];if(_0x329f51!=null){const _0x359023=Number(_0x329f51);if(Number[_0x435195(0x39f)](_0x359023)&&_0x359023>_0x3fed2b){const _0x20093a=new Error('Payload\x20too\x20large');_0x20093a[_0x435195(0x269)]=0x19d;throw _0x20093a;}}return new Promise((_0x2cfea9,_0x862346)=>{const _0x5733df=_0x435195;let _0x44dec1='',_0xf179c9=0x0;_0x554a91['on'](_0x5733df(0x524),_0x19d835=>{const _0x1dad4e=_0x5733df;_0xf179c9+=_0x19d835[_0x1dad4e(0x320)];if(_0xf179c9>_0x3fed2b){try{_0x554a91[_0x1dad4e(0x354)]();}catch{}const _0xc97a9d=new Error('Payload\x20too\x20large');_0xc97a9d[_0x1dad4e(0x269)]=0x19d,_0x862346(_0xc97a9d);return;}_0x44dec1+=_0x19d835;}),_0x554a91['on'](_0x5733df(0x470),()=>{const _0x226916=_0x5733df;if(!_0x44dec1)return _0x2cfea9(null);const _0x146d81=_0x554a91[_0x226916(0x527)]?.['content-type']||'';if(_0x146d81[_0x226916(0x5ca)]('application/x-www-form-urlencoded')){const _0x3bdc14={};for(const [_0x4025f0,_0x1516da]of new URLSearchParams(_0x44dec1))_0x3bdc14[_0x4025f0]=_0x1516da;return _0x2cfea9(_0x3bdc14);}try{_0x2cfea9(JSON['parse'](_0x44dec1));}catch(_0x23c4f5){_0x862346(_0x23c4f5);}}),_0x554a91['on'](_0x5733df(0x4dd),_0x862346);});}function _0x5f0195(_0x5adaa0,_0x511d35){const _0x4a62bd=_0x174be9,{status:status=0xc8,headers:headers={},body:_0x27f27c}=_0x511d35;_0x5adaa0['statusCode']=status;for(const [_0x3b4500,_0x7e03c3]of Object[_0x4a62bd(0x5bd)](headers)){_0x5adaa0['setHeader'](_0x3b4500,_0x7e03c3);}if(_0x27f27c==null){_0x5adaa0[_0x4a62bd(0x470)]();return;}if(_0x3665f(_0x27f27c)){_0x27f27c['pipe'](_0x5adaa0);return;}if(Buffer['isBuffer'](_0x27f27c)){_0x5adaa0[_0x4a62bd(0x470)](_0x27f27c);return;}if(typeof _0x27f27c==='object'){!_0x5adaa0['getHeader'](_0x4a62bd(0x424))&&_0x5adaa0[_0x4a62bd(0x192)](_0x4a62bd(0x424),_0x4a62bd(0x43a));_0x5adaa0[_0x4a62bd(0x470)](JSON[_0x4a62bd(0x729)](_0x27f27c));return;}_0x5adaa0[_0x4a62bd(0x470)](String(_0x27f27c));}function _0x2e4548(_0x20c0d0,_0x2987ad){const _0xb9cc3a=_0x174be9;if(_0x2987ad==null)return':'+_0x20c0d0;return[]['concat'](_0x2987ad)[_0xb9cc3a(0x800)](_0x53c798=>(_0x53c798[_0xb9cc3a(0x5ca)](':')?'['+_0x53c798+']':_0x53c798)+':'+_0x20c0d0)['join'](',\x20');}return okdbHttp[_0x174be9(0x818)]=_0x53cb2c,okdbHttp[_0x174be9(0x818)][_0x174be9(0x5e8)]=_0x2e4548,okdbHttp[_0x174be9(0x818)][_0x174be9(0x335)]=_0x24d217,okdbHttp['exports'];}var okdbShmSegment,hasRequiredOkdbShmSegment;function requireOkdbShmSegment(){const _0x96d336=_0x1d45b1;if(hasRequiredOkdbShmSegment)return okdbShmSegment;hasRequiredOkdbShmSegment=0x1;const _0x520cd8=require$$0$1,_0xb29c28=require$$2$1,_0x48c81d=0x80,_0x5c00ac=0x0,_0x241f39=0x1,_0x2603fa=0x2,_0xba053d=0x3,_0x3afae1=0x4,_0x1f131f=_0x3afae1+_0x48c81d,_0x599c61=_0x1f131f+_0x48c81d,_0x42e9d1=require$$2$2[_0x96d336(0x434)],_0xd9fde8=_0x599c61*0x4,_0x58925e=process[_0x96d336(0x520)]!==_0x96d336(0x5bf),_0x2d3997=0xc,_0x23ebfc=process['platform']==='darwin'?0x1f:0xa0,_0x1000b8=/^[A-Za-z0-9-]+(?:_boot)?$/,_0x519941=/^[A-Za-z0-9-]*-[0-9a-f]{12}(?:_boot)?$/,_0x170cdb=_0x4d4a97=>_0x4d4a97['replace'](/[^a-zA-Z0-9]/g,'-');function _0x57af19(_0x1252c8,_0x3393a3=''){const _0x4a1d1d=_0x96d336;if(typeof _0x1252c8!=='string'||_0x1252c8==='')throw new TypeError(_0x4a1d1d(0x18a));if(_0x3393a3!==''&&!/^_[A-Za-z0-9]+$/['test'](_0x3393a3))throw new TypeError(_0x4a1d1d(0x322)+JSON[_0x4a1d1d(0x729)](_0x3393a3)+')');const _0x52c801=_0xb29c28[_0x4a1d1d(0x5e2)](_0x4a1d1d(0x6f8))['update'](_0x1252c8)['digest'](_0x4a1d1d(0x6df))[_0x4a1d1d(0x747)](0x0,_0x2d3997),_0x420f3b=Math[_0x4a1d1d(0x456)](0x0,_0x23ebfc-0x1-_0x2d3997-_0x3393a3[_0x4a1d1d(0x320)]);return _0x170cdb(_0x1252c8)[_0x4a1d1d(0x747)](0x0,_0x420f3b)+'-'+_0x52c801+_0x3393a3;}function _0x410b5a(_0x516c45,_0x456fdf=''){return''+_0x170cdb(_0x516c45)+_0x456fdf;}function _0x1a2774(_0x16c769){const _0x12042a=_0x96d336;if(_0x519941[_0x12042a(0x219)](_0x16c769))return'hashed';if(_0x1000b8['test'](_0x16c769))return'legacy';return null;}const _0x3df4a2={'onMapped':null,'onClaimed':null,'onRetiring':null},_0x1b16aa=_0x1ab0b3=>Math[_0x96d336(0x26a)](_0x1ab0b3/0x8)*0x8,_0x37bc02=_0x2560a1=>_0x1b16aa(_0x2560a1)+_0xd9fde8;function _0x3cf92c(_0x4fda9c){try{return process['kill'](_0x4fda9c,0x0),![];}catch(_0x199968){return _0x199968['code']==='ESRCH';}}const _0x21e820=new Int32Array(new SharedArrayBuffer(0x4));function _0xe549a4(_0x31950c){if(_0x31950c>0x0)Atomics['wait'](_0x21e820,0x0,0x0,_0x31950c);}function _0x58d4e8(_0x474398,_0x5c42ee){const _0x305f04=_0x96d336;if(process[_0x305f04(0x520)]!=='linux')return;let _0x2426d7;try{_0x2426d7=_0x520cd8[_0x305f04(0x693)](_0x305f04(0x5ce)+_0x474398,'r+');if(_0x520cd8[_0x305f04(0x328)](_0x2426d7)['size']<_0x5c42ee)_0x520cd8[_0x305f04(0x28b)](_0x2426d7,_0x5c42ee);}catch{}finally{if(_0x2426d7!==undefined)try{_0x520cd8[_0x305f04(0x73d)](_0x2426d7);}catch{}}}function _0x4e7e08(_0x4f6f38,_0x450ef0){const _0x164025=_0x96d336,_0x11a7e6=require$$3$2;for(let _0x4db6b2=0x0;;_0x4db6b2++){try{return _0x11a7e6[_0x164025(0x241)](_0x4f6f38,_0x450ef0);}catch(_0x69d3b1){if(_0x4db6b2>=0x3e8||!/No such file or directory/[_0x164025(0x219)](_0x69d3b1?.[_0x164025(0x258)]??''))throw _0x69d3b1;}}}function _0x22e8c1(_0x1c3327,_0x16c1b4){const _0x45e24f=_0x96d336,_0x3a78b3=_0x37bc02(_0x16c1b4),_0x177d7a=_0x4e7e08(_0x1c3327,_0x3a78b3);_0x58d4e8(_0x1c3327,_0x3a78b3);if(_0x177d7a[_0x45e24f(0x62c)]<_0x3a78b3)throw new Error(_0x45e24f(0x650)+_0x1c3327+_0x45e24f(0x7f0)+_0x177d7a['byteLength']+'\x20<\x20'+_0x3a78b3+'\x20bytes');return{'sab':_0x177d7a,'hdr':new Int32Array(_0x177d7a,_0x1b16aa(_0x16c1b4),_0x599c61)};}function _0x3fd64d(_0x128316){const _0x38999e=_0x96d336;try{require(_0x38999e(0x1e9))[_0x38999e(0x419)](_0x128316);}catch{}}function _0x5ba590(_0x140997){const _0x319dcb=_0x96d336;try{require('shmbuf')[_0x319dcb(0x757)](_0x140997);}catch{}}function _0x4f4a72(_0xf62b17){const _0x39fccb=_0x96d336;if(Atomics[_0x39fccb(0x402)](_0xf62b17,_0x2603fa)!==0x0&&Atomics[_0x39fccb(0x402)](_0xf62b17,_0xba053d)!==0x0)return;const _0x46ce8e=_0xb29c28[_0x39fccb(0x247)](0x8),_0x2a2220=_0x46ce8e[_0x39fccb(0x22e)](0x0)||0x1,_0x1dd363=_0x46ce8e[_0x39fccb(0x22e)](0x4)||0x1;Atomics[_0x39fccb(0x2a9)](_0xf62b17,_0x2603fa,0x0,_0x2a2220),Atomics[_0x39fccb(0x2a9)](_0xf62b17,_0xba053d,0x0,_0x1dd363);}function _0x9e4fdd(_0x133011){const _0x2952e6=_0x96d336,_0x40c36a=process[_0x2952e6(0x242)];for(let _0x4133ef=0x0;_0x4133ef<_0x48c81d;_0x4133ef++){const _0x161f9f=Atomics['load'](_0x133011,_0x3afae1+_0x4133ef);if(_0x161f9f===0x0||_0x161f9f===_0x40c36a)continue;if(!_0x3cf92c(_0x161f9f))continue;Atomics[_0x2952e6(0x35d)](_0x133011,_0x1f131f+_0x4133ef,0x0),Atomics['compareExchange'](_0x133011,_0x3afae1+_0x4133ef,_0x161f9f,0x0);}}function _0xa9f887(_0x30641f){const _0x3a472f=_0x96d336;if(Atomics[_0x3a472f(0x402)](_0x30641f,_0x241f39)!==0x0)return!![];for(let _0x132b57=0x0;_0x132b57<_0x48c81d;_0x132b57++)if(Atomics['load'](_0x30641f,_0x3afae1+_0x132b57)!==0x0)return!![];return![];}function _0x508d47(_0x293ab9){const _0x235002=_0x96d336,_0xbc7198=process[_0x235002(0x242)];for(let _0x59ad29=0x0;_0x59ad29<0x2;_0x59ad29++){for(let _0x3442a4=0x0;_0x3442a4<_0x48c81d;_0x3442a4++){if(Atomics[_0x235002(0x2a9)](_0x293ab9,_0x3afae1+_0x3442a4,0x0,_0xbc7198)===0x0)return Atomics[_0x235002(0x35d)](_0x293ab9,_0x1f131f+_0x3442a4,_0x42e9d1),_0x3442a4;}_0x9e4fdd(_0x293ab9);}return Atomics[_0x235002(0x5e5)](_0x293ab9,_0x241f39,0x1),-0x1;}function _0x20af43(_0x10de0f,_0x1f44bc){const _0x44f7a1=_0x96d336;if(_0x1f44bc>=0x0)Atomics[_0x44f7a1(0x35d)](_0x10de0f,_0x1f131f+_0x1f44bc,0x0),Atomics[_0x44f7a1(0x2a9)](_0x10de0f,_0x3afae1+_0x1f44bc,process[_0x44f7a1(0x242)],0x0);else Atomics[_0x44f7a1(0x2f9)](_0x10de0f,_0x241f39,0x1);}function _0x1bc257(_0x3bd234,_0x5dce3b,_0x631371,_0x75278){const _0x3c7fab=_0x96d336,_0x346354=process[_0x3c7fab(0x242)];if(Atomics[_0x3c7fab(0x2a9)](_0x631371,_0x5c00ac,_0x75278,_0x346354)!==_0x75278)return _0x3c7fab(0x28a);const _0x5f3703=Atomics['load'](_0x631371,_0x2603fa),_0x325d88=Atomics[_0x3c7fab(0x402)](_0x631371,_0xba053d);let _0x9310bf;try{_0x9310bf=_0x22e8c1(_0x3bd234,_0x5dce3b)[_0x3c7fab(0x178)];}catch{return _0x3c7fab(0x412);}if(Atomics[_0x3c7fab(0x402)](_0x9310bf,_0x2603fa)!==_0x5f3703||Atomics[_0x3c7fab(0x402)](_0x9310bf,_0xba053d)!==_0x325d88)return _0x3c7fab(0x412);_0x9e4fdd(_0x631371);if(_0xa9f887(_0x631371))return Atomics[_0x3c7fab(0x2a9)](_0x631371,_0x5c00ac,_0x346354,0x0),_0x3c7fab(0x50a);return _0x5ba590(_0x3bd234),_0x3c7fab(0x324);}function _0x14691b(_0x320908,_0x41b290,{timeoutMs:_0x2dafd6}={}){const _0x3a95b1=_0x96d336;_0x2dafd6=_0x2dafd6??(Number(process.env.OKDB_SHM_ATTACH_TIMEOUT_MS)||0x7530);const _0x40c421=process[_0x3a95b1(0x242)],_0x509374=Date['now']()+_0x2dafd6;for(let _0x109ead=0x0;;_0x109ead++){const {sab:_0x3f1049,hdr:_0x354d8c}=_0x22e8c1(_0x320908,_0x41b290);_0x3df4a2['onMapped']?.(_0x320908,_0x109ead),_0x4f4a72(_0x354d8c);const _0x2652a7=_0x508d47(_0x354d8c);_0x3df4a2['onClaimed']?.(_0x320908,_0x109ead);const _0x5e1b3f=Atomics[_0x3a95b1(0x402)](_0x354d8c,_0x5c00ac);if(_0x5e1b3f===0x0||!_0x58925e){if(_0x109ead===0x0)_0x9e4fdd(_0x354d8c);return{'sab':_0x3f1049,'hdr':_0x354d8c,'slot':_0x2652a7};}_0x20af43(_0x354d8c,_0x2652a7);if(_0x5e1b3f!==_0x40c421&&_0x3cf92c(_0x5e1b3f))_0x1bc257(_0x320908,_0x41b290,_0x354d8c,_0x5e1b3f);_0x3fd64d(_0x320908);if(Date[_0x3a95b1(0x562)]()>_0x509374){const {OKDBError:_0x10f4cd}=requireOkdbError();throw new _0x10f4cd('shared-memory\x20segment\x20\x22'+_0x320908+_0x3a95b1(0x7cc)+_0x2dafd6+_0x3a95b1(0x6dd)+_0x5e1b3f+_0x3a95b1(0x2f3)+_0x3a95b1(0x6a5),_0x3a95b1(0x384));}_0xe549a4(_0x109ead<0x14?0x0:0x1);}}function _0x24e242(_0x4a9b97,_0x119ce8,_0x2e6d1b,_0x1f338f){const _0x315161=_0x96d336,{hdr:_0x2dbd56,slot:_0x2d8f5e}=_0x2e6d1b;if(_0x2d8f5e!==null)_0x20af43(_0x2dbd56,_0x2d8f5e);let _0x37ce18=![];try{if(!_0x58925e)return![];const _0x421be7=process['pid'];_0x9e4fdd(_0x2dbd56);if(_0xa9f887(_0x2dbd56)||_0x1f338f?.(_0x2e6d1b[_0x315161(0x647)]))return![];if(Atomics[_0x315161(0x2a9)](_0x2dbd56,_0x5c00ac,0x0,_0x421be7)!==0x0)return![];let _0x443870=!![];try{_0x3df4a2[_0x315161(0x6fb)]?.(_0x4a9b97),!_0xa9f887(_0x2dbd56)&&!_0x1f338f?.(_0x2e6d1b[_0x315161(0x647)])&&(_0x443870=![],_0x5ba590(_0x4a9b97),_0x37ce18=!![]);}finally{if(_0x443870)Atomics[_0x315161(0x2a9)](_0x2dbd56,_0x5c00ac,_0x421be7,0x0);}return _0x37ce18;}finally{_0x3fd64d(_0x4a9b97);}}function _0x342a02(_0x39c8be,_0x2281e8,{isBusy:_0x475091}={}){const _0x515892=_0x96d336,_0x38db4c=process['pid'],{sab:_0x365f03,hdr:_0xfb5738}=_0x22e8c1(_0x39c8be,_0x2281e8);try{_0x9e4fdd(_0xfb5738);const _0x25ce15=Atomics[_0x515892(0x402)](_0xfb5738,_0x5c00ac);if(_0x25ce15!==0x0){if(_0x25ce15===_0x38db4c||!_0x3cf92c(_0x25ce15))return _0x515892(0x4ae);return _0x1bc257(_0x39c8be,_0x2281e8,_0xfb5738,_0x25ce15);}if(_0xa9f887(_0xfb5738))return _0x515892(0x78a);if(_0x475091?.(_0x365f03))return _0x515892(0x7d2);if(Atomics['compareExchange'](_0xfb5738,_0x5c00ac,0x0,_0x38db4c)!==0x0)return'retiring';if(_0xa9f887(_0xfb5738)||_0x475091?.(_0x365f03))return Atomics['compareExchange'](_0xfb5738,_0x5c00ac,_0x38db4c,0x0),_0x515892(0x78a);return _0x5ba590(_0x39c8be),_0x515892(0x324);}finally{_0x3fd64d(_0x39c8be);}}const _0x703777=new Map(),_0x36fa0c=new Set();function _0x4a1fac(_0x490232){const _0x30ede8=_0x96d336,_0x26a9f8=process[_0x30ede8(0x242)];for(let _0x108d9c=0x0;_0x108d9c<_0x48c81d;_0x108d9c++){if(Atomics[_0x30ede8(0x402)](_0x490232,_0x3afae1+_0x108d9c)===_0x26a9f8&&Atomics[_0x30ede8(0x402)](_0x490232,_0x1f131f+_0x108d9c)!==_0x42e9d1)return!![];}return![];}function _0x19fc8(_0x4ee7a1,_0x34796c,_0x505ed2={}){const _0x4ba94d=_0x96d336;let _0x42ca8e=_0x703777[_0x4ba94d(0x5f1)](_0x4ee7a1);if(!_0x42ca8e){const _0x204a65=_0x14691b(_0x4ee7a1,_0x34796c,_0x505ed2);_0x42ca8e={'att':_0x204a65,'dataBytes':_0x34796c,'refs':0x0,'isBusy':_0x505ed2[_0x4ba94d(0x648)]??null,'onThreadExit':_0x505ed2[_0x4ba94d(0x703)]??null},_0x703777[_0x4ba94d(0x4a3)](_0x4ee7a1,_0x42ca8e);}if(_0x505ed2[_0x4ba94d(0x648)])_0x42ca8e[_0x4ba94d(0x648)]=_0x505ed2[_0x4ba94d(0x648)];if(_0x505ed2['onThreadExit'])_0x42ca8e[_0x4ba94d(0x703)]=_0x505ed2[_0x4ba94d(0x703)];_0x42ca8e[_0x4ba94d(0x6a0)]++;let _0x32f1ee=![];return{'sab':_0x42ca8e[_0x4ba94d(0x799)][_0x4ba94d(0x647)],'name':_0x4ee7a1,'release'(){const _0x5e39b5=_0x4ba94d;if(_0x32f1ee)return![];_0x32f1ee=!![];if(--_0x42ca8e['refs']>0x0)return![];if(_0x703777[_0x5e39b5(0x5f1)](_0x4ee7a1)===_0x42ca8e)_0x703777['delete'](_0x4ee7a1);const _0xb6688f=_0x24e242(_0x4ee7a1,_0x42ca8e[_0x5e39b5(0x6e1)],_0x42ca8e[_0x5e39b5(0x799)],_0x42ca8e['isBusy']);!_0xb6688f&&_0x58925e&&_0x4a1fac(_0x42ca8e[_0x5e39b5(0x799)][_0x5e39b5(0x178)])&&_0x36fa0c[_0x5e39b5(0x5e5)]({'name':_0x4ee7a1,'dataBytes':_0x42ca8e[_0x5e39b5(0x6e1)],'att':{..._0x42ca8e[_0x5e39b5(0x799)],'slot':null},'isBusy':_0x42ca8e['isBusy'],'onThreadExit':_0x42ca8e[_0x5e39b5(0x703)]});if(_0x36fa0c[_0x5e39b5(0x569)])_0x34a402();return _0xb6688f;}};}function _0x4f552f(_0x3f9dd8){const _0xe7cae2=_0x96d336;if(!(_0x3f9dd8>0x0))return 0x0;const _0x3e9c13=process['pid'];let _0x2c44c0=0x0;const _0x50fef8=({att:_0x3d01e3,onThreadExit:_0x209a5a})=>{const _0x1b10de=_0x438e;try{_0x209a5a?.(_0x3d01e3['sab'],_0x3f9dd8);}catch{}const {hdr:_0x231656}=_0x3d01e3;for(let _0x2cecfb=0x0;_0x2cecfb<_0x48c81d;_0x2cecfb++){if(Atomics['load'](_0x231656,_0x3afae1+_0x2cecfb)!==_0x3e9c13||Atomics[_0x1b10de(0x402)](_0x231656,_0x1f131f+_0x2cecfb)!==_0x3f9dd8)continue;Atomics['store'](_0x231656,_0x1f131f+_0x2cecfb,0x0);if(Atomics['compareExchange'](_0x231656,_0x3afae1+_0x2cecfb,_0x3e9c13,0x0)===_0x3e9c13)_0x2c44c0++;}};for(const _0x598053 of _0x703777[_0xe7cae2(0x678)]())_0x50fef8(_0x598053);for(const _0x1d211c of _0x36fa0c)_0x50fef8(_0x1d211c);return _0x34a402(),_0x2c44c0;}function _0x34a402(){const _0x200581=_0x96d336;for(const _0x585e22 of[..._0x36fa0c]){if(_0x4a1fac(_0x585e22[_0x200581(0x799)]['hdr']))continue;_0x36fa0c['delete'](_0x585e22),_0x24e242(_0x585e22[_0x200581(0x1b6)],_0x585e22[_0x200581(0x6e1)],_0x585e22[_0x200581(0x799)],_0x585e22[_0x200581(0x648)]);}}return okdbShmSegment={'attachSegment':_0x19fc8,'releaseThreadSlots':_0x4f552f,'segmentNameFor':_0x57af19,'legacySegmentNameFor':_0x410b5a,'segmentNameStyle':_0x1a2774,'SEG_NAME_MAX':_0x23ebfc,'retireIfUnused':_0x342a02,'totalBytes':_0x37bc02,'headerOffset':_0x1b16aa,'MAX_SLOTS':_0x48c81d,'_attachRaw':_0x14691b,'_detachRaw':_0x24e242,'_takeover':_0x1bc257,'_mapByName':_0x22e8c1,'_hooks':_0x3df4a2,'_registry':_0x703777,'_lingering':_0x36fa0c,'_H':{'STATE':_0x5c00ac,'OVERFLOW':_0x241f39,'NONCE_A':_0x2603fa,'NONCE_B':_0xba053d,'SLOTS':_0x3afae1,'TIDS':_0x1f131f}},okdbShmSegment;}var okdbShmGc,hasRequiredOkdbShmGc;function requireOkdbShmGc(){const _0x56f0ad=_0x1d45b1;if(hasRequiredOkdbShmGc)return okdbShmGc;hasRequiredOkdbShmGc=0x1;const _0xa08145=require$$0$1,_0xb8cd44=require$$1,_0x1be325=_0x56f0ad(0x87a),_0x163853=0x18+0x3*0x100*0x4,_0x9398a1=0x18+0x2*0x100*0x4,_0x268c3c=0xc;function _0x1e8f53(){const {totalBytes:_0x4a44b1}=requireOkdbShmSegment();return new Set([0x0,0x8,0x18,_0x9398a1,_0x268c3c,_0x4a44b1(_0x9398a1),_0x4a44b1(_0x163853),_0x4a44b1(_0x268c3c)]);}function _0x35c154(_0xcab7ca,_0x1e9efd,_0x271815){const _0x3d5fed=_0x56f0ad,{totalBytes:_0x89837b}=requireOkdbShmSegment();if(_0xcab7ca['endsWith'](_0x3d5fed(0x619))||_0x1e9efd===_0x268c3c||_0x1e9efd===_0x89837b(_0x268c3c))return _0x268c3c;if(_0x1e9efd===_0x89837b(_0x163853))return _0x163853;if(_0x1e9efd===_0x89837b(_0x9398a1))return _0x9398a1;return _0x271815===_0x3d5fed(0x1df)?_0x163853:_0x9398a1;}function _0x183a13(){const _0x55b8f0=_0x56f0ad,_0x54c3b2=new Set(),_0x1108fe=[],_0x3bb1fb=_0x1be325+'/';let _0x68a76e;try{_0x68a76e=_0xa08145[_0x55b8f0(0x570)](_0x55b8f0(0x3ee))[_0x55b8f0(0x626)](_0x1ae2b4=>/^\d+$/['test'](_0x1ae2b4));}catch{throw new Error(_0x55b8f0(0x60a));}for(const _0x470ac5 of _0x68a76e){const _0x4c22a9=_0xb8cd44[_0x55b8f0(0x3c7)](_0x55b8f0(0x3ee),_0x470ac5);let _0x23bc7a=!![];try{const _0x37205a=_0xa08145['readFileSync'](_0xb8cd44[_0x55b8f0(0x3c7)](_0x4c22a9,_0x55b8f0(0x864)),_0x55b8f0(0x3cc));let _0x1a1a09=_0x37205a[_0x55b8f0(0x3fb)](_0x3bb1fb);while(_0x1a1a09!==-0x1){const _0x3c26f5=_0x37205a[_0x55b8f0(0x3fb)]('\x0a',_0x1a1a09),_0x24bbbd=_0x37205a[_0x55b8f0(0x747)](_0x1a1a09+_0x3bb1fb[_0x55b8f0(0x320)],_0x3c26f5===-0x1?undefined:_0x3c26f5);if(!_0x24bbbd[_0x55b8f0(0x84d)](_0x55b8f0(0x86f)))_0x54c3b2[_0x55b8f0(0x5e5)](_0x24bbbd);_0x1a1a09=_0x37205a[_0x55b8f0(0x3fb)](_0x3bb1fb,_0x1a1a09+0x1);}}catch(_0x2de6d6){if(_0x2de6d6[_0x55b8f0(0x779)]!==_0x55b8f0(0x1b7)&&_0x2de6d6[_0x55b8f0(0x779)]!==_0x55b8f0(0x773))_0x23bc7a=![];}try{for(const _0x2ef464 of _0xa08145[_0x55b8f0(0x570)](_0xb8cd44['join'](_0x4c22a9,'fd'))){let _0x55016b;try{_0x55016b=_0xa08145[_0x55b8f0(0x780)](_0xb8cd44[_0x55b8f0(0x3c7)](_0x4c22a9,'fd',_0x2ef464));}catch{continue;}if(_0x55016b['startsWith'](_0x3bb1fb)&&!_0x55016b[_0x55b8f0(0x84d)](_0x55b8f0(0x86f)))_0x54c3b2[_0x55b8f0(0x5e5)](_0x55016b[_0x55b8f0(0x747)](_0x3bb1fb[_0x55b8f0(0x320)]));}}catch(_0x347549){if(_0x347549['code']!==_0x55b8f0(0x1b7)&&_0x347549[_0x55b8f0(0x779)]!=='ESRCH')_0x23bc7a=![];}if(!_0x23bc7a){let _0x4d50de=null;try{_0x4d50de=_0xa08145[_0x55b8f0(0x1dd)](_0x4c22a9)['uid'];}catch{}let _0x4d4b92='?';try{_0x4d4b92=_0xa08145[_0x55b8f0(0x295)](_0xb8cd44[_0x55b8f0(0x3c7)](_0x4c22a9,_0x55b8f0(0x5de)),'utf8')['trim']();}catch{}if(_0x4d50de!==null)_0x1108fe[_0x55b8f0(0x677)]({'pid':Number(_0x470ac5),'uid':_0x4d50de,'comm':_0x4d4b92});}}return{'inUse':_0x54c3b2,'unreadable':_0x1108fe};}function _0x18c877({prefix:prefix='-tmp-',dryRun:dryRun=![],anySize:anySize=![],force:force=![],log:log=()=>{}}={}){const _0x45c7e4=_0x56f0ad;if(process[_0x45c7e4(0x520)]!==_0x45c7e4(0x699)||!_0xa08145[_0x45c7e4(0x1aa)](_0x1be325))throw new Error(_0x45c7e4(0x5a5));const _0x44481f=process['getuid'](),_0x50c255=_0x44481f===0x0,_0x288492=_0x1e8f53(),{inUse:_0x1e3e59,unreadable:_0x55cffd}=_0x183a13(),_0x3f499a=_0x55cffd[_0x45c7e4(0x626)](_0x295dd1=>_0x50c255||_0x295dd1[_0x45c7e4(0x1e6)]===_0x44481f),_0x25605d={'dryRun':dryRun,'prefix':prefix,'scanned':0x0,'matched':0x0,'inUse':0x0,'notOkdbShaped':0x0,'foreignOwner':0x0,'candidates':0x0,'candidatesLegacyNamed':0x0,'candidateBytes':0x0,'candidateAllocated':0x0,'deleted':0x0,'deletedAllocated':0x0,'skippedByProtocol':0x0,'errors':0x0,'unreadablePids':_0x55cffd[_0x45c7e4(0x320)],'blindPids':_0x3f499a[_0x45c7e4(0x800)](_0x256cec=>_0x256cec[_0x45c7e4(0x242)]),'blindCommands':_0x421e18(_0x3f499a)};if(_0x3f499a['length']&&!dryRun&&!force)throw new Error(_0x45c7e4(0x1f6)+_0x3f499a[_0x45c7e4(0x320)]+_0x45c7e4(0x758)+(_0x45c7e4(0x58a)+_0x25605d[_0x45c7e4(0x4e4)]+_0x45c7e4(0x51b))+_0x45c7e4(0x5ef));const {retireIfUnused:_0x322aea,segmentNameStyle:_0x5cee3b,_registry:_0x27c37f}=requireOkdbShmSegment();let _0x33321d=null;if(!dryRun)try{require('v8')['setFlagsFromString'](_0x45c7e4(0x313)),_0x33321d=require('vm')[_0x45c7e4(0x531)]('gc');}catch{}const _0x1fd50c=_0xa08145[_0x45c7e4(0x3af)](_0x1be325);try{let _0x4f365d,_0x3948b7=0x0;while(_0x4f365d=_0x1fd50c[_0x45c7e4(0x308)]()){_0x25605d['scanned']++;const _0x3e809e=_0x4f365d[_0x45c7e4(0x1b6)];if(!_0x3e809e['startsWith'](prefix))continue;_0x25605d[_0x45c7e4(0x1ba)]++;if(_0x27c37f[_0x45c7e4(0x514)](_0x3e809e)){_0x25605d[_0x45c7e4(0x4aa)]++;continue;}if(_0x1e3e59['has'](_0x3e809e)){_0x25605d[_0x45c7e4(0x4aa)]++;continue;}let _0x3ee51b;try{_0x3ee51b=_0xa08145[_0x45c7e4(0x27f)](_0xb8cd44[_0x45c7e4(0x3c7)](_0x1be325,_0x3e809e));}catch{continue;}if(!_0x3ee51b[_0x45c7e4(0x751)]())continue;const _0x2be6d3=_0x5cee3b(_0x3e809e);if(!_0x2be6d3||!anySize&&!_0x288492[_0x45c7e4(0x514)](_0x3ee51b[_0x45c7e4(0x569)])){_0x25605d[_0x45c7e4(0x3dc)]++;continue;}if(!_0x50c255&&_0x3ee51b[_0x45c7e4(0x1e6)]!==_0x44481f){_0x25605d['foreignOwner']++;continue;}_0x25605d[_0x45c7e4(0x3b7)]++;if(_0x2be6d3==='legacy')_0x25605d[_0x45c7e4(0x2df)]++;_0x25605d[_0x45c7e4(0x608)]+=_0x3ee51b[_0x45c7e4(0x569)],_0x25605d['candidateAllocated']+=_0x3ee51b[_0x45c7e4(0x806)]*0x200;if(dryRun)continue;const _0x4990d9=_0x35c154(_0x3e809e,_0x3ee51b['size'],_0x2be6d3);try{const _0xce99e6=_0x322aea(_0x3e809e,_0x4990d9);_0xce99e6===_0x45c7e4(0x324)?(_0x25605d['deleted']++,_0x25605d['deletedAllocated']+=_0x3ee51b[_0x45c7e4(0x806)]*0x200):(_0x25605d[_0x45c7e4(0x373)]++,log(_0x45c7e4(0x634)+_0x3e809e+':\x20'+_0xce99e6));}catch(_0x71e90f){_0x25605d[_0x45c7e4(0x697)]++,log(_0x45c7e4(0x359)+_0x3e809e+':\x20'+_0x71e90f['message']);}_0x33321d&&++_0x3948b7>=0x200&&(_0x3948b7=0x0,_0x33321d());}}finally{_0x1fd50c[_0x45c7e4(0x73d)]();}return _0x25605d;}function _0x421e18(_0x4d9f4a){const _0x18b504=_0x56f0ad,_0x1fb38a=new Map();for(const _0xdbfb77 of _0x4d9f4a)_0x1fb38a[_0x18b504(0x4a3)](_0xdbfb77['comm'],(_0x1fb38a[_0x18b504(0x5f1)](_0xdbfb77[_0x18b504(0x5de)])??0x0)+0x1);return[..._0x1fb38a][_0x18b504(0x800)](([_0x25a3fe,_0x4ade7e])=>_0x4ade7e>0x1?_0x25a3fe+'×'+_0x4ade7e:_0x25a3fe)[_0x18b504(0x3c7)](',\x20');}function _0x45cd22(_0x317ae5){const _0x1e31cc=_0x56f0ad,_0x1c894e=['B',_0x1e31cc(0x675),_0x1e31cc(0x23f),_0x1e31cc(0x409),_0x1e31cc(0x49d)];let _0x31ca0e=0x0;while(_0x317ae5>=0x400&&_0x31ca0e<_0x1c894e['length']-0x1){_0x317ae5/=0x400,_0x31ca0e++;}return _0x317ae5[_0x1e31cc(0x5cf)](_0x31ca0e?0x1:0x0)+'\x20'+_0x1c894e[_0x31ca0e];}function _0x457754(_0x22f120){const _0x59a6d0=_0x56f0ad,_0x48e7a3=[_0x59a6d0(0x18c)+(_0x22f120['dryRun']?_0x59a6d0(0x5f2):'')+_0x59a6d0(0x622)+JSON['stringify'](_0x22f120[_0x59a6d0(0x317)]),_0x59a6d0(0x171)+_0x22f120['scanned']+'\x20entries\x20in\x20'+_0x1be325,_0x59a6d0(0x685)+_0x22f120[_0x59a6d0(0x1ba)],'\x20\x20in\x20use\x20(mapped/fd)\x20'+_0x22f120[_0x59a6d0(0x4aa)],_0x59a6d0(0x174)+_0x22f120['notOkdbShaped'],_0x59a6d0(0x561)+_0x22f120[_0x59a6d0(0x51a)],_0x59a6d0(0x314)+_0x22f120[_0x59a6d0(0x3b7)]+'\x20—\x20'+_0x45cd22(_0x22f120[_0x59a6d0(0x608)])+_0x59a6d0(0x339)+_0x45cd22(_0x22f120[_0x59a6d0(0x38b)])+_0x59a6d0(0x273)+(_0x22f120[_0x59a6d0(0x2df)]?'\x20('+_0x22f120[_0x59a6d0(0x2df)]+_0x59a6d0(0x5b2):'')];if(!_0x22f120['dryRun']){_0x48e7a3[_0x59a6d0(0x677)](_0x59a6d0(0x66d)+_0x22f120[_0x59a6d0(0x29c)]+_0x59a6d0(0x5ed)+_0x45cd22(_0x22f120['deletedAllocated'])+'\x20freed');if(_0x22f120[_0x59a6d0(0x373)])_0x48e7a3[_0x59a6d0(0x677)]('\x20\x20kept\x20(attached/retiring\x20when\x20retired)\x20'+_0x22f120[_0x59a6d0(0x373)]);if(_0x22f120[_0x59a6d0(0x697)])_0x48e7a3[_0x59a6d0(0x677)](_0x59a6d0(0x5b0)+_0x22f120[_0x59a6d0(0x697)]);}return _0x22f120[_0x59a6d0(0x333)]&&_0x48e7a3[_0x59a6d0(0x677)](_0x59a6d0(0x327)+_0x22f120[_0x59a6d0(0x333)]+_0x59a6d0(0x688)+(_0x22f120['blindPids'][_0x59a6d0(0x320)]?_0x59a6d0(0x5ed)+_0x22f120[_0x59a6d0(0x53f)][_0x59a6d0(0x320)]+'\x20of\x20them\x20run\x20as\x20this\x20user\x20and\x20could\x20map\x20these\x20segments:\x20'+(_0x22f120[_0x59a6d0(0x4e4)]+'\x20(deleting\x20requires\x20--force\x20if\x20none\x20of\x20them\x20is\x20okdb)'):_0x59a6d0(0x5f5))),_0x48e7a3[_0x59a6d0(0x3c7)]('\x0a');}function _0xf40692(_0x2b8fa1){const _0x41666e=_0x56f0ad,_0x209efc={'prefix':_0x41666e(0x2cb),'dryRun':![],'anySize':![],'force':![],'verbose':![]};for(let _0x8575e5=0x0;_0x8575e5<_0x2b8fa1[_0x41666e(0x320)];_0x8575e5++){const _0x2116fe=_0x2b8fa1[_0x8575e5];if(_0x2116fe===_0x41666e(0x741)||_0x2116fe==='-n')_0x209efc[_0x41666e(0x7e9)]=!![];else{if(_0x2116fe===_0x41666e(0x396))_0x209efc[_0x41666e(0x63c)]=!![];else{if(_0x2116fe===_0x41666e(0x204))_0x209efc[_0x41666e(0x474)]=!![];else{if(_0x2116fe===_0x41666e(0x3c6)||_0x2116fe==='-v')_0x209efc[_0x41666e(0x4e5)]=!![];else{if(_0x2116fe===_0x41666e(0x585))_0x209efc[_0x41666e(0x317)]=_0x2b8fa1[++_0x8575e5]??'';else{if(_0x2116fe[_0x41666e(0x32e)]('--prefix='))_0x209efc[_0x41666e(0x317)]=_0x2116fe['slice']('--prefix='['length']);else{if(_0x2116fe===_0x41666e(0x1f5)||_0x2116fe==='-h')_0x209efc[_0x41666e(0x225)]=!![];else throw new Error(_0x41666e(0x7a6)+_0x2116fe);}}}}}}}return _0x209efc;}const _0xe7ca23=_0x56f0ad(0x278);function _0x12561e(_0x212341){const _0x549337=_0x56f0ad;let _0x1b9cb1;try{_0x1b9cb1=_0xf40692(_0x212341);}catch(_0x4734fa){return console[_0x549337(0x4dd)](_0x4734fa['message']),console[_0x549337(0x4dd)](_0xe7ca23),0x2;}if(_0x1b9cb1[_0x549337(0x225)])return console[_0x549337(0x808)](_0xe7ca23),0x0;const _0x28a151=_0x18c877({..._0x1b9cb1,'log':_0x1b9cb1[_0x549337(0x4e5)]?_0x5b0bfd=>console[_0x549337(0x808)](_0x5b0bfd):undefined});return console[_0x549337(0x808)](_0x457754(_0x28a151)),_0x28a151['errors']?0x1:0x0;}return okdbShmGc={'shmGc':_0x18c877,'formatReport':_0x457754,'main':_0x12561e,'scanInUse':_0x183a13,'ENV_DATA_BYTES':_0x163853,'LEGACY_ENV_DATA_BYTES':_0x9398a1,'BOOT_DATA_BYTES':_0x268c3c},okdbShmGc;}var hasRequiredOkdb;function requireOkdb(){const _0x5da53e=_0x1d45b1;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x5da53e(0x4bc)]();}catch{}const _0x56b5fe=require$$1,_0x2eb10c=require$$0$1,{resolveWorkers:_0x4450b5,isShmbufNative:_0x18e05d}=requireOkdbWorkers();function _0x146471(_0x344ce3){const _0x448e96=_0x5da53e,_0x569063=_0x344ce3[_0x448e96(0x747)](0x2),_0x9e393a={};let _0x4d38b2=0x0;while(_0x4d38b2<_0x569063[_0x448e96(0x320)]){const _0x36eb02=_0x569063[_0x4d38b2];if(_0x36eb02===_0x448e96(0x80c)||_0x36eb02==='-p')_0x9e393a[_0x448e96(0x61f)]=Number(_0x569063[++_0x4d38b2]);else{if(_0x36eb02===_0x448e96(0x3b4)||_0x36eb02==='-d')_0x9e393a['path']=_0x569063[++_0x4d38b2];else{if(_0x36eb02==='--key'||_0x36eb02==='-k')_0x9e393a['key']=_0x569063[++_0x4d38b2];else{if(_0x36eb02==='--config'||_0x36eb02==='-c')_0x9e393a[_0x448e96(0x874)]=_0x569063[++_0x4d38b2];else{if(_0x36eb02===_0x448e96(0x794))_0x9e393a[_0x448e96(0x44f)]=_0x569063[++_0x4d38b2];else{if(_0x36eb02===_0x448e96(0x29d))_0x9e393a[_0x448e96(0x284)]=!![];else{if(_0x36eb02==='--no-admin')_0x9e393a['noAdmin']=!![];else{if(_0x36eb02===_0x448e96(0x3da))_0x9e393a['workers']=_0x569063[++_0x4d38b2];else{if(_0x36eb02===_0x448e96(0x64c))_0x9e393a['noCluster']=!![];else{if(_0x36eb02==='--env'||_0x36eb02==='-e')_0x9e393a[_0x448e96(0x684)]=_0x569063[++_0x4d38b2];else{if(_0x36eb02==='--types')_0x9e393a['types']=_0x569063[++_0x4d38b2];else{if(_0x36eb02===_0x448e96(0x3c0))_0x9e393a[_0x448e96(0x227)]=!![];else{if(_0x36eb02===_0x448e96(0x2b3))_0x9e393a['blobs']=!![];else{if(_0x36eb02===_0x448e96(0x389))_0x9e393a['newIdentity']=!![];else{if(_0x36eb02==='--drop')_0x9e393a['drop']=!![];else{if(_0x36eb02==='--open'){const _0x17ce07=[];while(_0x4d38b2+0x1<_0x569063[_0x448e96(0x320)]&&!_0x569063[_0x4d38b2+0x1]['startsWith']('--')){_0x17ce07[_0x448e96(0x677)](_0x569063[++_0x4d38b2]);}_0x9e393a[_0x448e96(0x241)]=_0x17ce07[_0x448e96(0x320)]>0x0?_0x17ce07:!![];}else{if(_0x36eb02===_0x448e96(0x6bc))_0x9e393a[_0x448e96(0x60d)]=!![];else{if(_0x36eb02==='--name')_0x9e393a[_0x448e96(0x1b6)]=_0x569063[++_0x4d38b2];else{if(_0x36eb02===_0x448e96(0x3ed))_0x9e393a[_0x448e96(0x2f8)]=_0x569063[++_0x4d38b2];else{if(_0x36eb02===_0x448e96(0x5bc))_0x9e393a[_0x448e96(0x16c)]=_0x569063[++_0x4d38b2];else{if(_0x36eb02===_0x448e96(0x48f))_0x9e393a[_0x448e96(0x226)]=_0x569063[++_0x4d38b2];else{if(_0x36eb02===_0x448e96(0x3f6))_0x9e393a[_0x448e96(0x7c7)]=_0x569063[++_0x4d38b2];else{if(_0x36eb02===_0x448e96(0x7b0))_0x9e393a['ttl']=_0x569063[++_0x4d38b2];else{if(_0x36eb02===_0x448e96(0x340))_0x9e393a[_0x448e96(0x5e6)]=_0x569063[++_0x4d38b2];else{if(_0x36eb02==='--username'||_0x36eb02==='-u')_0x9e393a[_0x448e96(0x1bd)]=_0x569063[++_0x4d38b2];else{if(_0x36eb02===_0x448e96(0x67e))_0x9e393a[_0x448e96(0x6ea)]=_0x569063[++_0x4d38b2];else{if(_0x36eb02===_0x448e96(0x44e)||_0x36eb02==='-v'){const _0x1cb2d7=require$$3;console['log'](_0x1cb2d7[_0x448e96(0x881)]),process[_0x448e96(0x532)](0x0);}else(_0x36eb02===_0x448e96(0x1f5)||_0x36eb02==='-h')&&(_0x175a40(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}}_0x4d38b2++;}return _0x9e393a;}function _0x175a40(){const _0x4be98c=_0x5da53e;console[_0x4be98c(0x808)](_0x4be98c(0x594));}const _0x426cff=new Set([_0x5da53e(0x292),_0x5da53e(0x510),_0x5da53e(0x4fb),'error']);function _0x5a2fa8(_0x1fd658){const _0x7c4689=_0x5da53e,_0x5195ba=_0x1fd658[_0x7c4689(0x874)]?_0x56b5fe[_0x7c4689(0x377)](_0x1fd658[_0x7c4689(0x874)]):_0x56b5fe['resolve'](_0x7c4689(0x508));let _0x4c1994={};if(_0x2eb10c['existsSync'](_0x5195ba))try{const _0x344b8b=_0x2eb10c[_0x7c4689(0x295)](_0x5195ba,_0x7c4689(0x3cc))[_0x7c4689(0x4c2)](/^\uFEFF/,'');_0x4c1994=JSON[_0x7c4689(0x40d)](_0x344b8b),console[_0x7c4689(0x808)](_0x7c4689(0x3d7)+_0x5195ba);}catch(_0x3c7e89){console[_0x7c4689(0x4dd)](_0x7c4689(0x803)+_0x5195ba+':\x20'+_0x3c7e89['message']),process[_0x7c4689(0x532)](0x1);}const _0x5e5fd9={'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},_0x762e26={'port':_0x1fd658[_0x7c4689(0x61f)]??_0x4c1994['port']??_0x5e5fd9[_0x7c4689(0x61f)]??0x2124,'dbPath':_0x1fd658[_0x7c4689(0x73c)]??_0x4c1994[_0x7c4689(0x73c)]??_0x5e5fd9[_0x7c4689(0x73c)]??_0x7c4689(0x1bc),'key':_0x1fd658[_0x7c4689(0x4e2)]??_0x4c1994[_0x7c4689(0x4e2)]??_0x5e5fd9[_0x7c4689(0x4e2)]??undefined,'logLevel':_0x1fd658[_0x7c4689(0x44f)]??_0x4c1994[_0x7c4689(0x44f)]??_0x5e5fd9[_0x7c4689(0x44f)]??'info','noRepl':_0x1fd658[_0x7c4689(0x284)]??_0x4c1994[_0x7c4689(0x284)]??_0x5e5fd9[_0x7c4689(0x284)]??![],'noAdmin':_0x1fd658[_0x7c4689(0x35b)]??_0x4c1994['noAdmin']??_0x5e5fd9[_0x7c4689(0x35b)]??![],'admin':_0x4c1994['admin']??{},'api':_0x4c1994[_0x7c4689(0x237)]??undefined,'auth':_0x4c1994[_0x7c4689(0x282)]??undefined,'mcp':_0x4c1994[_0x7c4689(0x61b)]??undefined,'http':_0x4c1994[_0x7c4689(0x2b8)]??undefined,'backup':_0x4c1994[_0x7c4689(0x421)]??undefined,'timeMachine':_0x4c1994[_0x7c4689(0x1e5)]!==![]?_0x4c1994[_0x7c4689(0x1e5)]??{}:![],'processors':_0x4c1994['processors'],'engines':_0x4c1994[_0x7c4689(0x667)],'compaction':_0x4c1994['compaction']};if(_0x1fd658['noCluster'])_0x762e26[_0x7c4689(0x275)]=!![];if(_0x1fd658[_0x7c4689(0x633)]!==undefined)_0x762e26['workersFlag']=_0x1fd658['workers'];_0x1fd658[_0x7c4689(0x241)]!==undefined&&(_0x762e26['auth']=_0x762e26[_0x7c4689(0x282)]||{},_0x762e26[_0x7c4689(0x282)][_0x7c4689(0x241)]=_0x1fd658[_0x7c4689(0x241)]);_0x1fd658[_0x7c4689(0x60d)]&&(_0x762e26['debug']=_0x762e26[_0x7c4689(0x292)]||{},_0x762e26['debug']['logRequests']=!![]);(!Number[_0x7c4689(0x5f8)](_0x762e26[_0x7c4689(0x61f)])||_0x762e26[_0x7c4689(0x61f)]<0x1||_0x762e26[_0x7c4689(0x61f)]>0xffff)&&(console[_0x7c4689(0x4dd)](_0x7c4689(0x521)+_0x762e26['port']+_0x7c4689(0x3f9)),process[_0x7c4689(0x532)](0x1));!_0x426cff[_0x7c4689(0x514)](_0x762e26[_0x7c4689(0x44f)])&&(console[_0x7c4689(0x4dd)](_0x7c4689(0x551)+_0x762e26[_0x7c4689(0x44f)]+_0x7c4689(0x599)),process[_0x7c4689(0x532)](0x1));const _0x35dc57=_0x762e26[_0x7c4689(0x2b8)]?.[_0x7c4689(0x7ce)];_0x35dc57!==undefined&&!(typeof _0x35dc57===_0x7c4689(0x695)&&_0x35dc57)&&!(Array[_0x7c4689(0x22a)](_0x35dc57)&&_0x35dc57[_0x7c4689(0x320)]&&_0x35dc57[_0x7c4689(0x4bd)](_0x538294=>typeof _0x538294===_0x7c4689(0x695)&&_0x538294))&&(console[_0x7c4689(0x4dd)]('[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20'+JSON[_0x7c4689(0x729)](_0x35dc57)+_0x7c4689(0x683)),process[_0x7c4689(0x532)](0x1));for(const _0x23d509 of _0x362988){_0x762e26[_0x23d509]!==undefined&&typeof _0x762e26[_0x23d509]!==_0x7c4689(0x71a)&&(console[_0x7c4689(0x4dd)](_0x7c4689(0x555)+_0x23d509+_0x7c4689(0x790)+JSON[_0x7c4689(0x729)](_0x762e26[_0x23d509])+_0x7c4689(0x2a0)),process[_0x7c4689(0x532)](0x1));}return _0x762e26;}const _0x362988=[_0x5da53e(0x190),_0x5da53e(0x667),_0x5da53e(0x5ff)];function _0x3edc94(_0x208114){const _0x3fb21c=_0x5da53e;return!!(_0x208114&&typeof _0x208114===_0x3fb21c(0x76b)&&!Array[_0x3fb21c(0x22a)](_0x208114)&&Object[_0x3fb21c(0x367)](_0x208114)['length']>0x0);}function _0x28c85b(_0x3ebf18){const _0x4da43f=_0x5da53e;return{..._0x3ebf18[_0x4da43f(0x4e2)]?{'encryptionKey':_0x3ebf18[_0x4da43f(0x4e2)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x135319=!process['stdout'][_0x5da53e(0x6ac)]||!!process.env.NO_COLOR;function _0x4e409f(_0xb191b3,_0x236b1f){const _0x386656=_0x5da53e;return _0x135319?_0x236b1f:'\x1b['+_0xb191b3+'m'+_0x236b1f+_0x386656(0x1d8);}function _0x58cc89(_0xf697f3){const _0x4c19a6=_0x5da53e;if(!_0xf697f3||_0xf697f3['length']===0x0)return;const _0x503177='─'[_0x4c19a6(0x268)](0x38);process[_0x4c19a6(0x7d4)][_0x4c19a6(0x753)]('\x0a'),process['stderr'][_0x4c19a6(0x753)](_0x4e409f('33',_0x4c19a6(0x74a)+_0xf697f3['length']+'\x20SECURITY\x20NOTICE'+(_0xf697f3[_0x4c19a6(0x320)]>0x1?'S':'')+'\x0a')),process[_0x4c19a6(0x7d4)]['write']('\x20\x20'+_0x503177+'\x0a');for(const _0x185258 of _0xf697f3){const _0x10a09d=_0x185258[_0x4c19a6(0x395)]==='error'?_0x4e409f('31','\x20\x20✗'):_0x4e409f('33','\x20\x20⚠');process['stderr'][_0x4c19a6(0x753)](_0x10a09d+'\x20\x20'+_0x4e409f('1',_0x185258[_0x4c19a6(0x331)])+'\x0a'),process[_0x4c19a6(0x7d4)]['write'](_0x4c19a6(0x489)+_0x185258['message']+'\x0a');if(_0x185258[_0x4c19a6(0x3ac)])process[_0x4c19a6(0x7d4)][_0x4c19a6(0x753)]('\x20\x20\x20\x20\x20\x20\x20'+_0x4e409f('2',_0x4c19a6(0x618)+_0x185258[_0x4c19a6(0x3ac)])+'\x0a');process[_0x4c19a6(0x7d4)][_0x4c19a6(0x753)]('\x0a');}process[_0x4c19a6(0x7d4)][_0x4c19a6(0x753)]('\x20\x20'+_0x503177+'\x0a\x0a');}function _0x15d1ca(_0xf9f00,_0x47e7f1,_0x2ff451={}){const _0x1b97e0=_0x5da53e,_0x5119b7=_0xf9f00[_0x1b97e0(0x2b8)][_0x1b97e0(0x64a)](_0x47e7f1,_0x2ff451);if(_0x5119b7&&_0x5119b7[_0x1b97e0(0x2a1)])return Promise[_0x1b97e0(0x377)](_0x5119b7);const _0x47b610=_0xf9f00[_0x1b97e0(0x2b8)][_0x1b97e0(0x7e4)]?.[_0x1b97e0(0x320)]?_0xf9f00['http'][_0x1b97e0(0x7e4)]:[_0x5119b7];return new Promise((_0x423b1b,_0x2cd6fa)=>{const _0x153fcc=_0x1b97e0;_0x5119b7['once']('error',_0x2cd6fa),Promise[_0x153fcc(0x260)](_0x47b610[_0x153fcc(0x800)](_0x5d3d4b=>_0x5d3d4b[_0x153fcc(0x866)]?null:new Promise(_0x433971=>_0x5d3d4b[_0x153fcc(0x3ec)](_0x153fcc(0x866),_0x433971))))[_0x153fcc(0x19c)](()=>_0x423b1b(_0x5119b7));});}function _0x516480(_0x5a69a1){const _0x85ecf1=_0x5da53e;return _0x5a69a1['http']?.[_0x85ecf1(0x7ce)]!==undefined?{'host':_0x5a69a1[_0x85ecf1(0x2b8)]['host']}:{};}async function _0x423b2c(_0xe3ac33){const _0x3e7783=_0x5da53e,_0x431471=require$$4$1;console['log']('\x0a\x20\x20okdb\x20doctor\x0a');let _0x2c8b07=!![];const _0xd9050=(_0xe39126,_0x51f5d9)=>{console['log']('\x20\x20'+(_0xe39126?'✓':'✗')+'\x20'+_0x51f5d9);if(!_0xe39126)_0x2c8b07=![];},_0x4c963c=Number(process[_0x3e7783(0x881)][_0x3e7783(0x4c2)]('v','')[_0x3e7783(0x5fa)]('.')[0x0]);_0xd9050(_0x4c963c>=0x12,_0x3e7783(0x393)+process[_0x3e7783(0x881)]+(_0x4c963c<0x12?_0x3e7783(0x5e7):''));const _0x14c29a=_0x56b5fe[_0x3e7783(0x377)](_0xe3ac33[_0x3e7783(0x52b)]);try{_0x2eb10c['mkdirSync'](_0x14c29a,{'recursive':!![]});const _0x307168=_0x56b5fe[_0x3e7783(0x3c7)](_0x14c29a,_0x3e7783(0x234));_0x2eb10c[_0x3e7783(0x4d1)](_0x307168,''),_0x2eb10c[_0x3e7783(0x330)](_0x307168),_0xd9050(!![],_0x3e7783(0x6db)+_0x14c29a);}catch(_0x22f9c5){_0xd9050(![],_0x3e7783(0x1f3)+_0x14c29a+_0x3e7783(0x77c)+_0x22f9c5[_0x3e7783(0x258)]+')');}const _0x1f4932=await new Promise(_0x52fe42=>{const _0x1de754=_0x3e7783,_0x1e8d5d=_0x431471['createServer']();_0x1e8d5d[_0x1de754(0x3ec)](_0x1de754(0x4dd),()=>_0x52fe42(![])),_0x1e8d5d[_0x1de754(0x3ec)]('listening',()=>{_0x1e8d5d['close'](),_0x52fe42(!![]);}),_0x1e8d5d[_0x1de754(0x64a)](_0xe3ac33['port'],_0x1de754(0x3c3));});_0xd9050(_0x1f4932,_0x3e7783(0x528)+_0xe3ac33[_0x3e7783(0x61f)]+'\x20'+(_0x1f4932?_0x3e7783(0x1b4):'already\x20in\x20use'));const _0x430d66=_0x56b5fe[_0x3e7783(0x377)](_0x3e7783(0x508));if(_0x2eb10c[_0x3e7783(0x1aa)](_0x430d66))try{JSON[_0x3e7783(0x40d)](_0x2eb10c[_0x3e7783(0x295)](_0x430d66,_0x3e7783(0x3cc))['replace'](/^\uFEFF/,'')),_0xd9050(!![],_0x3e7783(0x2f5)+_0x430d66);}catch(_0x3216af){_0xd9050(![],'config\x20file\x20invalid:\x20'+_0x3216af[_0x3e7783(0x258)]);}else _0xd9050(!![],_0x3e7783(0x476));if(_0x18e05d()){const _0x3692d3=_0x4450b5(_0xe3ac33,{'shmbufNative':!![]});_0xd9050(!![],_0x3e7783(0x72b)+_0x3692d3+_0x3e7783(0x280)+(_0x3692d3===0x1?'':'s')+')');}else _0xd9050(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x1f4932)try{const _0x39bb2c=require(_0x3e7783(0x42f)),_0x2839e5=new _0x39bb2c(_0x14c29a,{'engines':![],'processors':![],'compaction':![],'auth':{'open':!![]}});await _0x2839e5['open']();try{await _0x2839e5['processes'][_0x3e7783(0x241)]({'reader':!![]});const _0x335aae=_0x2839e5[_0x3e7783(0x666)]['listNodes'](),_0x1ab5ea=_0x335aae['filter'](_0x1d8fec=>_0x1d8fec['supervisorKey']!=null)[_0x3e7783(0x320)];_0xd9050(!![],_0x3e7783(0x473)+_0x335aae[_0x3e7783(0x320)]+_0x3e7783(0x820)+(_0x335aae[_0x3e7783(0x320)]===0x1?'':'es')+'\x20('+_0x1ab5ea+_0x3e7783(0x3e8));}finally{await _0x2839e5[_0x3e7783(0x419)]();}}catch{}console[_0x3e7783(0x808)](''),_0x2c8b07?console[_0x3e7783(0x808)](_0x3e7783(0x318)):(console['log'](_0x3e7783(0x6d0)),process[_0x3e7783(0x532)](0x1));}async function _0x43b3ec(){const _0x4c7366=_0x5da53e,_0x478eeb=_0x56b5fe[_0x4c7366(0x377)](_0x4c7366(0x508));!_0x2eb10c['existsSync'](_0x478eeb)?(_0x2eb10c[_0x4c7366(0x4d1)](_0x478eeb,JSON[_0x4c7366(0x729)]({'port':0x2124,'path':_0x4c7366(0x1bc),'logLevel':_0x4c7366(0x510),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x4c7366(0x808)](_0x4c7366(0x25c))):console[_0x4c7366(0x808)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x2e43e6=_0x56b5fe['resolve'](_0x4c7366(0x1bc));!_0x2eb10c[_0x4c7366(0x1aa)](_0x2e43e6)?(_0x2eb10c[_0x4c7366(0x3d1)](_0x2e43e6,{'recursive':!![]}),console['log'](_0x4c7366(0x1b8))):console[_0x4c7366(0x808)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x4c7366(0x808)](_0x4c7366(0x283));}async function _0x5b99f2(_0x42d5ae){const _0x58bb14=_0x5da53e,_0xf38471=_0x56b5fe[_0x58bb14(0x377)](_0x42d5ae[_0x58bb14(0x52b)]);if(!_0x2eb10c[_0x58bb14(0x1aa)](_0xf38471)){console[_0x58bb14(0x808)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0xf38471+'\x20does\x20not\x20exist');return;}const _0x1069bb=require$$0$3,_0x33d4e4=_0x1069bb['createInterface']({'input':process[_0x58bb14(0x497)],'output':process[_0x58bb14(0x4a1)]}),_0x279cc1=await new Promise(_0x2fa76a=>_0x33d4e4['question'](_0x58bb14(0x48b)+_0xf38471+_0x58bb14(0x55a),_0x2fa76a));_0x33d4e4[_0x58bb14(0x419)](),console['log']('');if(_0x279cc1[_0x58bb14(0x724)]()['toLowerCase']()!=='yes'){console['log'](_0x58bb14(0x4be));return;}let _0x5b4e9e=null;try{_0x5b4e9e=await _0x2268d4(_0xf38471,_0x42d5ae,async _0x3386ff=>{const _0x18e077=_0x58bb14,_0x48765b=_0x3386ff[_0x18e077(0x485)],_0x51afea=_0x48765b?.['db']?.[_0x18e077(0x5f1)](_0x18e077(0x383))??null,_0x561dc6=[];if(_0x48765b?.['hasType'](_0x18e077(0x34a)))for(const {key:_0x28ed80,value:_0x2de0cb}of _0x48765b['getRange']('~licenses')){_0x561dc6['push']({'key':_0x28ed80,'value':_0x2de0cb});}return{'identity':_0x51afea,'licenses':_0x561dc6};});}catch(_0x5a1d4d){console[_0x58bb14(0x808)](_0x58bb14(0x259)+_0x5a1d4d[_0x58bb14(0x258)]+_0x58bb14(0x54e));}_0x2eb10c[_0x58bb14(0x46a)](_0xf38471,{'recursive':!![],'force':!![]}),console[_0x58bb14(0x808)](_0x58bb14(0x3cf)+_0xf38471+_0x58bb14(0x220));if(_0x5b4e9e&&(_0x5b4e9e['identity']||_0x5b4e9e[_0x58bb14(0x2f0)][_0x58bb14(0x320)]>0x0))try{await _0x2268d4(_0xf38471,_0x42d5ae,async _0x549872=>{const _0x5466b7=_0x58bb14,_0x3ae471=_0x549872[_0x5466b7(0x485)];_0x5b4e9e[_0x5466b7(0x5ab)]&&_0x3ae471['db'][_0x5466b7(0x34d)](_0x5466b7(0x383),_0x5b4e9e[_0x5466b7(0x5ab)]);if(_0x5b4e9e['licenses']['length']>0x0){if(!_0x3ae471['hasType'](_0x5466b7(0x34a)))await _0x3ae471[_0x5466b7(0x3cd)](_0x5466b7(0x34a));for(const {key:_0x26f63e,value:_0x182109}of _0x5b4e9e[_0x5466b7(0x2f0)]){await _0x3ae471['put'](_0x5466b7(0x34a),_0x26f63e,_0x182109);}}});const _0x4a9ea6=[];if(_0x5b4e9e[_0x58bb14(0x5ab)])_0x4a9ea6[_0x58bb14(0x677)](_0x58bb14(0x584));if(_0x5b4e9e[_0x58bb14(0x2f0)]['length']>0x0)_0x4a9ea6[_0x58bb14(0x677)](_0x5b4e9e[_0x58bb14(0x2f0)][_0x58bb14(0x320)]+_0x58bb14(0x6be));console[_0x58bb14(0x808)](_0x58bb14(0x2ce)+_0x4a9ea6[_0x58bb14(0x3c7)]('\x20+\x20'));}catch(_0x18563c){console['log']('[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20'+_0x18563c['message']);}}async function _0x2268d4(_0x26386b,_0x5428cd,_0x11aee2){const _0x4f64b2=_0x5da53e,_0x2bdb8f=require$$5$1,_0x452e89=new _0x2bdb8f(_0x26386b,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x28c85b(_0x5428cd)});await _0x452e89[_0x4f64b2(0x241)]();try{return await _0x11aee2(_0x452e89);}finally{await _0x452e89[_0x4f64b2(0x419)]();}}async function _0x175a6e(_0x175c75,_0x238611){const _0x3e2877=_0x5da53e,_0x2e208a=require$$5$1,_0x2269ce=_0x56b5fe[_0x3e2877(0x377)](_0x238611[_0x3e2877(0x52b)]);console['log']('[okdb]\x20opening\x20'+_0x2269ce+'…');const _0x1b6734=new _0x2e208a(_0x2269ce,_0x28c85b(_0x238611));await _0x1b6734[_0x3e2877(0x241)](),console[_0x3e2877(0x808)](_0x3e2877(0x603)+_0x175c75+'…');const {envs:_0x5ac82a,blobs:_0x4a1402,skipped:_0x1254b9}=await _0x1b6734[_0x3e2877(0x77b)][_0x3e2877(0x421)](_0x175c75);for(const _0xc019b8 of _0x5ac82a){const _0x5d107f=_0xc019b8['sizeBefore']>0x0?_0x3e2877(0x77c)+(_0xc019b8[_0x3e2877(0x554)]/0x400/0x400)['toFixed'](0x2)+'\x20MB\x20→\x20'+(_0xc019b8['sizeAfter']/0x400/0x400)[_0x3e2877(0x5cf)](0x2)+_0x3e2877(0x7ea):'';console['log'](_0x3e2877(0x27c)+_0xc019b8[_0x3e2877(0x1b6)]+_0x3e2877(0x6a8)+_0xc019b8[_0x3e2877(0x351)]+_0x5d107f+(_0xc019b8['timeMachine']?_0x3e2877(0x81d):''));}if(_0x4a1402[_0x3e2877(0x3e3)]>0x0)console[_0x3e2877(0x808)](_0x3e2877(0x77e)+_0x4a1402[_0x3e2877(0x3e3)]+_0x3e2877(0x1b0));for(const _0x31e78f of _0x1254b9)console[_0x3e2877(0x808)](_0x3e2877(0x45a)+_0x31e78f[_0x3e2877(0x1b6)]+_0x3e2877(0x4bb)+_0x31e78f[_0x3e2877(0x2ca)]);await _0x1b6734[_0x3e2877(0x419)](),console['log'](_0x3e2877(0x552));}async function _0x3db047(_0x22109d,_0x414671,_0x46d68d={}){const _0x58a7c5=_0x5da53e,{BACKUP_MANIFEST:_0x37f2f9}=requireOkdbMigrate(),_0x86a47d=_0x56b5fe[_0x58a7c5(0x377)](_0x414671['dbPath']),_0x23e49a=_0x56b5fe['join'](_0x22109d,_0x37f2f9);if(!_0x2eb10c[_0x58a7c5(0x1aa)](_0x23e49a))throw new Error(_0x22109d+_0x58a7c5(0x238)+_0x37f2f9+')');const _0x2f482a=JSON[_0x58a7c5(0x40d)](_0x2eb10c[_0x58a7c5(0x295)](_0x23e49a,'utf8')),_0x176f9f=_0x56b5fe['relative'](_0x22109d,_0x86a47d);if(_0x176f9f===''||!(_0x176f9f['startsWith']('..')||_0x56b5fe[_0x58a7c5(0x716)](_0x176f9f)))throw new Error('target\x20'+_0x86a47d+_0x58a7c5(0x206)+_0x22109d);if(_0x2eb10c[_0x58a7c5(0x1aa)](_0x86a47d)&&_0x2eb10c[_0x58a7c5(0x570)](_0x86a47d)[_0x58a7c5(0x320)]>0x0)throw new Error('target\x20'+_0x86a47d+_0x58a7c5(0x2e5));console['log'](_0x58a7c5(0x465)+_0x22109d+'\x20(okdb\x20'+_0x2f482a['okdbVersion']+',\x20'+_0x2f482a['createdAt']+_0x58a7c5(0x595)+_0x86a47d+'…'),_0x2eb10c[_0x58a7c5(0x79f)](_0x22109d,_0x86a47d,{'recursive':!![],'errorOnExist':!![]});for(const _0x3c89f4 of _0x2f482a[_0x58a7c5(0x66e)]??[]){console[_0x58a7c5(0x808)]('\x20\x20✓\x20'+_0x3c89f4[_0x58a7c5(0x1b6)]+(_0x3c89f4[_0x58a7c5(0x1e5)]?_0x58a7c5(0x81d):'')),_0x3c89f4[_0x58a7c5(0x3d5)]&&_0x3c89f4['sourcePath']&&_0x2eb10c[_0x58a7c5(0x1aa)](_0x3c89f4[_0x58a7c5(0x447)])&&console[_0x58a7c5(0x808)](_0x58a7c5(0x65d)+_0x3c89f4['name']+'\x20lived\x20outside\x20the\x20store\x20at\x20'+_0x3c89f4[_0x58a7c5(0x447)]+',\x20which\x20still\x20exists\x20—\x20the\x20restored\x20'+(_0x58a7c5(0x496)+_0x3c89f4[_0x58a7c5(0x442)]+_0x58a7c5(0x679)));}_0x46d68d[_0x58a7c5(0x3eb)]&&(require$$5$1[_0x58a7c5(0x4e3)](_0x86a47d),console['log'](_0x58a7c5(0x581))),console['log']('[okdb]\x20restore\x20complete\x20—\x20full-text\x20indexes\x20rebuild\x20on\x20first\x20open');}async function _0x387346(_0x30f1db,_0x56bc16,_0x520c15){const _0x5cc0de=_0x5da53e,_0x10595d=require$$5$1,_0x309038=_0x56b5fe['resolve'](_0x56bc16[_0x5cc0de(0x52b)]),_0x283d27=_0x520c15['env']??_0x5cc0de(0x3a1),_0x1c0626=_0x520c15[_0x5cc0de(0x303)]?_0x520c15[_0x5cc0de(0x303)][_0x5cc0de(0x5fa)](',')[_0x5cc0de(0x800)](_0x45829d=>_0x45829d[_0x5cc0de(0x724)]()):null;console[_0x5cc0de(0x808)](_0x5cc0de(0x3d6)+_0x309038+'…');const _0x2d6f54=new _0x10595d(_0x309038,_0x28c85b(_0x56bc16));await _0x2d6f54[_0x5cc0de(0x241)](),console[_0x5cc0de(0x808)](_0x5cc0de(0x548)+_0x283d27+_0x5cc0de(0x4c4)+_0x30f1db+'…');const _0x40c9a8=await _0x2d6f54[_0x5cc0de(0x77b)]['exportToFile'](_0x30f1db,{'envName':_0x283d27,'types':_0x1c0626,'includeChanges':!!_0x520c15['changes']});console[_0x5cc0de(0x808)]('[okdb]\x20exported\x20\x20types='+_0x40c9a8[_0x5cc0de(0x303)]+_0x5cc0de(0x2b9)+_0x40c9a8['records']+_0x5cc0de(0x55f)+_0x40c9a8[_0x5cc0de(0x227)]);if(_0x520c15['blobs']){const _0x4725c5=_0x56b5fe['join'](_0x56b5fe[_0x5cc0de(0x410)](_0x30f1db),_0x5cc0de(0x5b8));process[_0x5cc0de(0x4a1)][_0x5cc0de(0x753)](_0x5cc0de(0x87c));const {count:_0x37293e,bytes:_0x2f07ea}=await _0x2d6f54[_0x5cc0de(0x77b)][_0x5cc0de(0x6b0)](_0x4725c5);console['log']('\x0d[okdb]\x20blobs:\x20'+_0x4725c5+_0x5cc0de(0x77c)+_0x37293e+_0x5cc0de(0x2a5)+(_0x37293e!==0x1?'s':'')+',\x20'+(_0x2f07ea/0x400/0x400)['toFixed'](0x2)+'\x20MB)');}await _0x2d6f54[_0x5cc0de(0x419)](),console[_0x5cc0de(0x808)](_0x5cc0de(0x453));}async function _0x5e407c(_0x5f5a71,_0x4e9607,_0x586646){const _0x35a666=_0x5da53e,_0x228e8a=require$$5$1,_0x21d200=_0x56b5fe['resolve'](_0x4e9607[_0x35a666(0x52b)]),_0x417043=_0x586646[_0x35a666(0x684)]??null,_0x531fe1=_0x586646[_0x35a666(0x303)]?_0x586646['types'][_0x35a666(0x5fa)](',')[_0x35a666(0x800)](_0x29d18b=>_0x29d18b['trim']()):null,_0x158358=!!_0x586646[_0x35a666(0x1ee)];console[_0x35a666(0x808)](_0x35a666(0x3d6)+_0x21d200+'…');const _0x1f4842=new _0x228e8a(_0x21d200,_0x28c85b(_0x4e9607));await _0x1f4842[_0x35a666(0x241)](),console['log']('[okdb]\x20importing\x20'+_0x5f5a71+'…');const _0x3f571a=await _0x1f4842[_0x35a666(0x77b)][_0x35a666(0x830)](_0x5f5a71,{'envName':_0x417043,'types':_0x531fe1,'dropExisting':_0x158358,'includeChanges':!!_0x586646[_0x35a666(0x227)],'onProgress':({type:_0x4389c7,count:_0x3dc8f1})=>{const _0x5431df=_0x35a666;process[_0x5431df(0x4a1)][_0x5431df(0x753)](_0x5431df(0x7ba)+_0x4389c7+':\x20'+_0x3dc8f1+'\x20records…');}});process[_0x35a666(0x4a1)][_0x35a666(0x753)]('\x0a'),console[_0x35a666(0x808)](_0x35a666(0x78e)+_0x3f571a[_0x35a666(0x303)]+_0x35a666(0x2b9)+_0x3f571a[_0x35a666(0x39d)]+_0x35a666(0x55f)+_0x3f571a[_0x35a666(0x227)]);if(_0x586646[_0x35a666(0x5b8)]){const _0x386b4e=_0x56b5fe[_0x35a666(0x3c7)](_0x56b5fe['dirname'](_0x5f5a71),_0x35a666(0x5b8));if(_0x2eb10c[_0x35a666(0x1aa)](_0x386b4e)){const {imported:_0x539479,skipped:_0xa5132b}=await _0x1f4842[_0x35a666(0x77b)][_0x35a666(0x6f5)](_0x386b4e);console[_0x35a666(0x808)]('[okdb]\x20blobs:\x20imported='+_0x539479+_0x35a666(0x50f)+_0xa5132b);}}await _0x1f4842['close'](),console[_0x35a666(0x808)](_0x35a666(0x179));}async function _0x19fddc(_0x2589c6,_0x13cfb2){const _0xc3bbc8=_0x5da53e;_0x13cfb2['password']&&!_0x13cfb2[_0xc3bbc8(0x1b6)]&&(console[_0xc3bbc8(0x4dd)]('[okdb]\x20error:\x20--password\x20requires\x20--name'),process[_0xc3bbc8(0x532)](0x1));const _0x236740=_0x13cfb2[_0xc3bbc8(0x226)]?_0x13cfb2[_0xc3bbc8(0x226)][_0xc3bbc8(0x5fa)](',')[_0xc3bbc8(0x800)](_0x7ae0a8=>_0x7ae0a8['trim']())[_0xc3bbc8(0x626)](Boolean):[];let _0x59e5af={};if(_0x13cfb2[_0xc3bbc8(0x7c7)])try{_0x59e5af=JSON[_0xc3bbc8(0x40d)](_0x13cfb2['grants']);if(typeof _0x59e5af!==_0xc3bbc8(0x76b)||Array[_0xc3bbc8(0x22a)](_0x59e5af)||_0x59e5af===null)throw new Error();}catch{console['error']('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process['exit'](0x1);}const _0x9d3c99=require$$5$1,{randomToken:_0x23af24,hashToken:_0x4b8866,hashPassword:_0x2db0f3}=requireOkdbAuthTokens(),_0x570e3b=require$$2$1,_0x5f525f=_0x56b5fe[_0xc3bbc8(0x377)](_0x2589c6['dbPath']),_0x390c11=new _0x9d3c99(_0x5f525f,_0x28c85b(_0x2589c6));await _0x390c11[_0xc3bbc8(0x241)]();try{await _0x390c11[_0xc3bbc8(0x282)][_0xc3bbc8(0x536)]();if(_0x13cfb2[_0xc3bbc8(0x1b6)]){const _0x233531=await _0x390c11['auth'][_0xc3bbc8(0x712)](_0x13cfb2[_0xc3bbc8(0x1b6)]);_0x233531&&(console[_0xc3bbc8(0x4dd)]('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x13cfb2[_0xc3bbc8(0x1b6)]+'\x22\x20already\x20exists'),process[_0xc3bbc8(0x532)](0x1));}const _0x1125b3=_0x23af24(0x20),_0x40bfd3=_0x4b8866(_0x1125b3),_0x2c7c6b=_0x13cfb2[_0xc3bbc8(0x2f8)]?await _0x2db0f3(_0x13cfb2['password']):null,_0x371997=_0x570e3b[_0xc3bbc8(0x57c)](),_0x10a029={'tokenHash':_0x40bfd3,'name':_0x13cfb2[_0xc3bbc8(0x1b6)]||null,'passwordHash':_0x2c7c6b,'label':_0x13cfb2[_0xc3bbc8(0x16c)]||null,'permissions':_0x236740,'grants':_0x59e5af,'createdAt':Date[_0xc3bbc8(0x562)](),'lastUsedAt':null},_0x236849=_0x13cfb2[_0xc3bbc8(0x827)]?{'ttl':Number(_0x13cfb2[_0xc3bbc8(0x827)])}:undefined;await _0x390c11[_0xc3bbc8(0x485)][_0xc3bbc8(0x250)](_0xc3bbc8(0x606),_0x371997,_0x10a029,_0x236849),console['log'](_0xc3bbc8(0x1a8)),console[_0xc3bbc8(0x808)](_0xc3bbc8(0x290)+_0x371997),console[_0xc3bbc8(0x808)](_0xc3bbc8(0x2d3)+(_0x13cfb2['name']||'(unset)')),console['log'](_0xc3bbc8(0x7f6)+(_0x13cfb2['label']||_0xc3bbc8(0x775))),console[_0xc3bbc8(0x808)]('\x20\x20\x20\x20permissions:\x20'+(_0x236740['join'](',\x20')||_0xc3bbc8(0x1bb))),console[_0xc3bbc8(0x808)](_0xc3bbc8(0x6ec)),console[_0xc3bbc8(0x808)](_0xc3bbc8(0x870)+_0x1125b3+'\x0a');}finally{await _0x390c11[_0xc3bbc8(0x419)]();}}async function _0x3d6302(_0x20fb9b){const _0x63e67d=_0x5da53e,_0x4b37dd=require$$5$1,_0x23b197=_0x56b5fe[_0x63e67d(0x377)](_0x20fb9b['dbPath']),_0x3a5087=new _0x4b37dd(_0x23b197,_0x28c85b(_0x20fb9b));await _0x3a5087[_0x63e67d(0x241)]();try{const _0x37a77e=_0x3a5087[_0x63e67d(0x485)];if(!_0x37a77e||!_0x37a77e[_0x63e67d(0x7e3)](_0x63e67d(0x606))){console['log'](_0x63e67d(0x5cb));return;}const _0x545ebe=[];for(const {key:_0x203b2c,value:_0x3704ec}of _0x37a77e[_0x63e67d(0x482)]('~tokens')){_0x545ebe[_0x63e67d(0x677)]({'id':_0x203b2c,'name':_0x3704ec[_0x63e67d(0x1b6)]||_0x63e67d(0x775),'label':_0x3704ec[_0x63e67d(0x16c)]||_0x63e67d(0x775),'permissions':Array['isArray'](_0x3704ec[_0x63e67d(0x226)])?_0x3704ec[_0x63e67d(0x226)][_0x63e67d(0x3c7)](','):'','created':_0x3704ec[_0x63e67d(0x734)]?new Date(_0x3704ec[_0x63e67d(0x734)])[_0x63e67d(0x804)]()[_0x63e67d(0x747)](0x0,0xa):''});}if(_0x545ebe['length']===0x0){console[_0x63e67d(0x808)](_0x63e67d(0x5cb));return;}const _0x31872e=!process['stdout'][_0x63e67d(0x4d6)]||process[_0x63e67d(0x4a1)][_0x63e67d(0x4d6)]>=0x64,_0x4de4a2=_0x31872e?0x24:0xa,_0x59b423=['ID'['padEnd'](_0x4de4a2),_0x63e67d(0x2aa)['padEnd'](0x10),_0x63e67d(0x70e)[_0x63e67d(0x466)](0x14),_0x63e67d(0x22f)[_0x63e67d(0x466)](0x14),_0x63e67d(0x793)]['join']('\x20\x20');console[_0x63e67d(0x808)]('\x0a'+_0x59b423),console['log']('-'[_0x63e67d(0x268)](_0x59b423[_0x63e67d(0x320)]));for(const _0x2cf588 of _0x545ebe){const _0x16edbf=_0x31872e?_0x2cf588['id']:_0x2cf588['id'][_0x63e67d(0x747)](0x0,0x8)+'…';console['log']([_0x16edbf[_0x63e67d(0x466)](_0x4de4a2),_0x2cf588[_0x63e67d(0x1b6)][_0x63e67d(0x747)](0x0,0x10)['padEnd'](0x10),_0x2cf588['label']['slice'](0x0,0x14)[_0x63e67d(0x466)](0x14),_0x2cf588[_0x63e67d(0x226)][_0x63e67d(0x747)](0x0,0x14)[_0x63e67d(0x466)](0x14),_0x2cf588[_0x63e67d(0x861)]][_0x63e67d(0x3c7)]('\x20\x20'));}console['log']('');}finally{await _0x3a5087['close']();}}async function _0x21f95a(_0x40b190,_0x5f31df){const _0x44bff6=_0x5da53e;!_0x40b190&&(console['error']('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process['exit'](0x1));const _0x1c007d=require$$5$1,_0x1f9657=_0x56b5fe[_0x44bff6(0x377)](_0x5f31df[_0x44bff6(0x52b)]),_0x14d476=new _0x1c007d(_0x1f9657,_0x28c85b(_0x5f31df));await _0x14d476[_0x44bff6(0x241)]();try{const _0x256597=_0x14d476[_0x44bff6(0x485)];(!_0x256597||!_0x256597['hasType'](_0x44bff6(0x606)))&&(console[_0x44bff6(0x4dd)](_0x44bff6(0x7a2)+_0x40b190+'\x22'),process[_0x44bff6(0x532)](0x1));let _0x3d8236=null,_0x4db3d0=null;const _0x526cb3=_0x256597['get'](_0x44bff6(0x606),_0x40b190);if(_0x526cb3)_0x3d8236=_0x40b190,_0x4db3d0=_0x526cb3;else{const _0xf0cae5=[];for(const {key:_0x31977a,value:_0x3f8ea1}of _0x256597[_0x44bff6(0x482)](_0x44bff6(0x606))){if(_0x31977a[_0x44bff6(0x32e)](_0x40b190))_0xf0cae5[_0x44bff6(0x677)]({'key':_0x31977a,'value':_0x3f8ea1});}_0xf0cae5[_0x44bff6(0x320)]===0x0&&(console['error']('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x40b190+'\x22'),process[_0x44bff6(0x532)](0x1));if(_0xf0cae5[_0x44bff6(0x320)]>0x1){console['error'](_0x44bff6(0x2de)+_0x40b190+_0x44bff6(0x7bd)+_0xf0cae5[_0x44bff6(0x320)]+'\x20tokens:');for(const _0x201de3 of _0xf0cae5){console[_0x44bff6(0x4dd)]('\x20\x20'+_0x201de3[_0x44bff6(0x4e2)]+_0x44bff6(0x4d5)+(_0x201de3['value']['name']||_0x44bff6(0x775))+')');}process[_0x44bff6(0x532)](0x1);}_0x3d8236=_0xf0cae5[0x0][_0x44bff6(0x4e2)],_0x4db3d0=_0xf0cae5[0x0][_0x44bff6(0x1a4)];}await _0x256597[_0x44bff6(0x323)](_0x44bff6(0x606),_0x3d8236),console[_0x44bff6(0x808)](_0x44bff6(0x1b5)+_0x3d8236+_0x44bff6(0x4d5)+(_0x4db3d0[_0x44bff6(0x1b6)]||_0x44bff6(0x775))+_0x44bff6(0x709)+(_0x4db3d0[_0x44bff6(0x16c)]||'(unset)')+')');}finally{await _0x14d476['close']();}}function _0x110446(_0x17cdc8,_0x23e868){const _0x3e9fc1=_0x5da53e;if(!_0x17cdc8[_0x3e9fc1(0x33a)])return _0x3e9fc1(0x65a);const _0x49d63b=_0x17cdc8['expiresAt'];if(!_0x49d63b)return _0x3e9fc1(0x4fd);if(_0x23e868>_0x49d63b)return _0x3e9fc1(0x885);return _0x3e9fc1(0x4fd);}function _0x12bf4e(_0x74bb6d){const _0x43cb98=_0x5da53e;if(!_0x74bb6d||typeof _0x74bb6d!==_0x43cb98(0x76b))return'';const _0x1ceec=Object[_0x43cb98(0x5bd)](_0x74bb6d)[_0x43cb98(0x626)](([,_0x312ffa])=>_0x312ffa)[_0x43cb98(0x800)](([_0x43821c])=>_0x43821c);if(_0x1ceec[_0x43cb98(0x320)]===0x0)return _0x43cb98(0x1bb);if(_0x1ceec['length']<=0x3)return _0x1ceec[_0x43cb98(0x3c7)]('\x20');return _0x1ceec[_0x43cb98(0x747)](0x0,0x3)[_0x43cb98(0x3c7)]('\x20')+('\x20+'+(_0x1ceec['length']-0x3));}async function _0x1eec27(_0x51180d){const _0x3d5fe2=_0x5da53e,_0xce022=require$$5$1,_0x189d8b=requireOkdbLicenseCodec(),{_C:_0x3c1af0}=requireOkdbLicense(),_0x49b381=_0x56b5fe[_0x3d5fe2(0x377)](_0x51180d['dbPath']),_0x599c35=new _0xce022(_0x49b381,_0x28c85b(_0x51180d));await _0x599c35[_0x3d5fe2(0x241)]();try{const _0x290d4f=_0x599c35[_0x3d5fe2(0x485)],_0x522da4=_0x290d4f?.['db']?.[_0x3d5fe2(0x5f1)]?.(_0x3d5fe2(0x1a1))??0x0,_0x56820b=[..._0x599c35[_0x3d5fe2(0x789)]['keys']()]['filter'](_0x404f03=>!_0x404f03[_0x3d5fe2(0x32e)]('~'))[_0x3d5fe2(0x320)],_0x47f695=_0x599c35[_0x3d5fe2(0x44a)]?.[_0x3d5fe2(0x2e1)];if(_0x47f695){const _0x5d52e6=_0x47f695[_0x3d5fe2(0x5f9)]===!![],_0x1e9419=_0x5d52e6?_0x3d5fe2(0x194):_0x599c35[_0x3d5fe2(0x44a)][_0x3d5fe2(0x4fd)]?.[_0x3d5fe2(0x3f3)]||_0x3d5fe2(0x18e);console[_0x3d5fe2(0x808)](''),console['log']('\x20\x20Tier:\x20\x20\x20\x20'+_0x1e9419);const _0x47f5dc=_0x47f695[_0x3d5fe2(0x452)]||{};if(_0x47f5dc[_0x3d5fe2(0x5a3)]){const _0x201bd3=Math[_0x3d5fe2(0x79c)](_0x522da4/_0x47f5dc[_0x3d5fe2(0x5a3)]*0x64);console[_0x3d5fe2(0x808)](_0x3d5fe2(0x571)+_0x522da4[_0x3d5fe2(0x222)]()+_0x3d5fe2(0x797)+_0x47f5dc[_0x3d5fe2(0x5a3)]['toLocaleString']()+'\x20\x20('+_0x201bd3+'%)');}else console[_0x3d5fe2(0x808)](_0x3d5fe2(0x571)+_0x522da4[_0x3d5fe2(0x222)]());_0x47f5dc[_0x3d5fe2(0x66e)]?console[_0x3d5fe2(0x808)](_0x3d5fe2(0x455)+_0x56820b+_0x3d5fe2(0x797)+_0x47f5dc['envs']):console[_0x3d5fe2(0x808)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x56820b),_0x3c1af0?.[_0x3d5fe2(0x2b5)]&&console['log']('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x3c1af0[_0x3d5fe2(0x2b5)]+_0x3d5fe2(0x6f4));}if(!_0x290d4f||!_0x290d4f[_0x3d5fe2(0x7e3)](_0x3d5fe2(0x34a))){console[_0x3d5fe2(0x808)](''),console[_0x3d5fe2(0x808)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x3d5fe2(0x808)]('');return;}const _0x2db994=[],_0x3acb4a=Date[_0x3d5fe2(0x562)](),_0x2f2b8c=_0x599c35['id'],_0x4eae36=_0x3d5fe2(0x541);for(const {key:_0x5dd48d,value:_0x2bb08a}of _0x290d4f[_0x3d5fe2(0x482)]('~licenses')){const _0x2fc1f2=_0x2bb08a[_0x3d5fe2(0x49a)]?Buffer[_0x3d5fe2(0x1c3)](_0x2bb08a[_0x3d5fe2(0x49a)],_0x3d5fe2(0x6df)):Buffer[_0x3d5fe2(0x558)](0x8);let _0x31a22c='';try{_0x31a22c=_0x189d8b[_0x3d5fe2(0x17c)](_0x2f2b8c,_0x2fc1f2,_0x4eae36)['pin'];}catch{}_0x2db994['push']({'id':_0x5dd48d,'licensee':_0x2bb08a[_0x3d5fe2(0x3f3)]||'','expires':_0x2bb08a['expiresAt']?new Date(_0x2bb08a[_0x3d5fe2(0x1f8)])['toISOString']()[_0x3d5fe2(0x747)](0x0,0xa):'','features':_0x12bf4e(_0x2bb08a[_0x3d5fe2(0x858)]),'pin':_0x31a22c,'status':_0x110446(_0x2bb08a,_0x3acb4a)});}if(_0x2db994['length']===0x0){console[_0x3d5fe2(0x808)](''),console[_0x3d5fe2(0x808)](_0x3d5fe2(0x24c)),console[_0x3d5fe2(0x808)]('');return;}const _0x28e51a=['\x20\x20'+'ID'[_0x3d5fe2(0x466)](0xe),_0x3d5fe2(0x86d)['padEnd'](0xe),_0x3d5fe2(0x1ff)['padEnd'](0xc),_0x3d5fe2(0x843)[_0x3d5fe2(0x466)](0x1e),_0x3d5fe2(0x73f)['padEnd'](0xa),_0x3d5fe2(0x7f8)][_0x3d5fe2(0x3c7)]('\x20');console[_0x3d5fe2(0x808)]('\x0a'+_0x28e51a);for(const _0x5397ac of _0x2db994){const _0x4902f6=_0x5397ac['id'][_0x3d5fe2(0x747)](0x0,0x8)+'\u2026';console[_0x3d5fe2(0x808)](['\x20\x20'+_0x4902f6[_0x3d5fe2(0x466)](0xe),_0x5397ac[_0x3d5fe2(0x3f3)][_0x3d5fe2(0x747)](0x0,0xe)[_0x3d5fe2(0x466)](0xe),_0x5397ac['expires'][_0x3d5fe2(0x466)](0xc),_0x5397ac[_0x3d5fe2(0x858)][_0x3d5fe2(0x747)](0x0,0x1e)['padEnd'](0x1e),_0x5397ac[_0x3d5fe2(0x6e5)][_0x3d5fe2(0x466)](0xa),_0x5397ac[_0x3d5fe2(0x269)]][_0x3d5fe2(0x3c7)]('\x20'));}console[_0x3d5fe2(0x808)]('');}finally{await _0x599c35[_0x3d5fe2(0x419)]();}}async function _0x1e5acd(_0x349402,_0x4fd8f){const _0x1e1d80=_0x5da53e,_0x3da649=require$$5$1,_0x42431c=requireOkdbLicenseCodec();let _0x3c062d=_0x349402;(_0x42431c['detectInputType'](_0x349402)===_0x1e1d80(0x73c)||_0x2eb10c[_0x1e1d80(0x1aa)](_0x349402)&&_0x2eb10c[_0x1e1d80(0x1dd)](_0x349402)[_0x1e1d80(0x751)]())&&(_0x3c062d=_0x2eb10c[_0x1e1d80(0x295)](_0x349402,_0x1e1d80(0x3cc))[_0x1e1d80(0x724)]());const _0x1255dd=_0x56b5fe[_0x1e1d80(0x377)](_0x4fd8f[_0x1e1d80(0x52b)]),_0x1d69ee=new _0x3da649(_0x1255dd,_0x28c85b(_0x4fd8f));await _0x1d69ee[_0x1e1d80(0x241)]();try{let _0x2697b4;try{_0x2697b4=await _0x1d69ee[_0x1e1d80(0x2f0)][_0x1e1d80(0x5e5)]({'blob':_0x3c062d});}catch(_0x499eb8){console[_0x1e1d80(0x4dd)]('[okdb]\x20error:\x20'+_0x499eb8[_0x1e1d80(0x258)]),process[_0x1e1d80(0x532)](0x1);}const _0x381db5=_0x2697b4[_0x1e1d80(0x6e5)]||'',_0x18af26=Object[_0x1e1d80(0x5bd)](_0x2697b4[_0x1e1d80(0x858)]||{})['filter'](([,_0x2526ae])=>_0x2526ae)[_0x1e1d80(0x800)](([_0x414793])=>_0x414793),_0x1a1708=_0x2697b4[_0x1e1d80(0x452)]||{},_0x5e6357=[_0x1a1708[_0x1e1d80(0x66e)]?_0x1e1d80(0x492)+_0x1a1708[_0x1e1d80(0x66e)]:null,_0x1a1708['typesPerEnv']?_0x1e1d80(0x25f)+_0x1a1708[_0x1e1d80(0x550)]:null,_0x1a1708[_0x1e1d80(0x2f6)]?_0x1e1d80(0x681)+_0x1a1708[_0x1e1d80(0x2f6)]:null,_0x1a1708[_0x1e1d80(0x5a3)]?_0x1e1d80(0x4de)+_0x1a1708[_0x1e1d80(0x5a3)]['toLocaleString']():null][_0x1e1d80(0x626)](Boolean)[_0x1e1d80(0x3c7)]('\x20\x20'),_0x12e18a=_0x2697b4[_0x1e1d80(0x51d)]!==_0x1e1d80(0x46c);console[_0x1e1d80(0x808)](_0x2697b4['changed']?_0x1e1d80(0x57a):_0x1e1d80(0x162)),console[_0x1e1d80(0x808)](_0x1e1d80(0x4f0)+_0x2697b4['id']),console[_0x1e1d80(0x808)](_0x1e1d80(0x854)+_0x2697b4[_0x1e1d80(0x3f3)]),console[_0x1e1d80(0x808)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x2697b4[_0x1e1d80(0x1f8)]?new Date(_0x2697b4[_0x1e1d80(0x1f8)])['toISOString']()['slice'](0x0,0xa):_0x1e1d80(0x876))),console['log']('\x20\x20\x20\x20features:\x20\x20'+(_0x18af26[_0x1e1d80(0x3c7)](',\x20')||_0x1e1d80(0x1bb)));if(_0x5e6357)console[_0x1e1d80(0x808)](_0x1e1d80(0x4e1)+_0x5e6357);if(_0x12e18a)console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20('+_0x2697b4[_0x1e1d80(0x51d)]+_0x1e1d80(0x3fe)),console[_0x1e1d80(0x808)]('');else!_0x2697b4[_0x1e1d80(0x53a)]?(console[_0x1e1d80(0x808)](_0x1e1d80(0x24a)+_0x2697b4[_0x1e1d80(0x269)]),console[_0x1e1d80(0x808)]('')):(console[_0x1e1d80(0x808)](_0x1e1d80(0x4c1)+_0x381db5),console[_0x1e1d80(0x808)](_0x1e1d80(0x7f9)),console['log'](''),console[_0x1e1d80(0x808)]('\x20\x20Next\x20step\x20\u2014\x20activate\x20the\x20license:'),console[_0x1e1d80(0x808)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x381db5+')\x20to\x20your\x20license\x20vendor.'),console[_0x1e1d80(0x808)](_0x1e1d80(0x488)),console[_0x1e1d80(0x808)](_0x1e1d80(0x459)),console['log'](''));}finally{await _0x1d69ee['close']();}}async function _0x30c822(_0x505c04,_0x2a7715){const _0x417381=_0x5da53e,_0x23c11e=require$$5$1,_0x13f38b=_0x56b5fe[_0x417381(0x377)](_0x2a7715[_0x417381(0x52b)]),_0x351d21=new _0x23c11e(_0x13f38b,_0x28c85b(_0x2a7715));await _0x351d21[_0x417381(0x241)]();try{let _0x518de1;try{_0x518de1=await _0x351d21[_0x417381(0x2f0)][_0x417381(0x6c7)](_0x505c04);}catch(_0x37f731){console[_0x417381(0x4dd)](_0x417381(0x348)+_0x37f731[_0x417381(0x258)]),console[_0x417381(0x4dd)](''),console['error']('\x20\x20Common\x20causes:'),console[_0x417381(0x4dd)](_0x417381(0x365)),console[_0x417381(0x4dd)](_0x417381(0x5cc)),console['error'](_0x417381(0x733)),console['error'](''),process[_0x417381(0x532)](0x1);}console[_0x417381(0x808)](_0x417381(0x374)),console[_0x417381(0x808)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x518de1['id']),console['log'](_0x417381(0x854)+_0x518de1[_0x417381(0x3f3)]),console[_0x417381(0x808)](_0x417381(0x7e7)+(_0x518de1[_0x417381(0x1f8)]?new Date(_0x518de1['expiresAt'])[_0x417381(0x804)]()['slice'](0x0,0xa):_0x417381(0x876))),console['log'](_0x417381(0x749)),console['log']('');}finally{await _0x351d21[_0x417381(0x419)]();}}async function _0x32ceba(_0x40e607,_0xce73c7){const _0x11a905=_0x5da53e;!_0x40e607&&(console[_0x11a905(0x4dd)](_0x11a905(0x37d)),process['exit'](0x1));const _0x1c73da=require$$5$1,_0xad36da=requireOkdbLicenseCodec(),_0x6a7885=_0x56b5fe['resolve'](_0xce73c7[_0x11a905(0x52b)]),_0x5df9c3=new _0x1c73da(_0x6a7885,_0x28c85b(_0xce73c7));await _0x5df9c3[_0x11a905(0x241)]();try{const _0x1b222a=_0x5df9c3[_0x11a905(0x485)];(!_0x1b222a||!_0x1b222a['hasType'](_0x11a905(0x34a)))&&(console['error'](_0x11a905(0x304)+_0x40e607+'\x22'),process[_0x11a905(0x532)](0x1));let _0x589c02=null,_0x105f7a=null;const _0x40fe15=_0x1b222a[_0x11a905(0x5f1)]('~licenses',_0x40e607);if(_0x40fe15)_0x589c02=_0x40e607,_0x105f7a=_0x40fe15;else{const _0x5db842=[];for(const {key:_0x18a316,value:_0x1e77a7}of _0x1b222a[_0x11a905(0x482)]('~licenses')){if(_0x18a316[_0x11a905(0x32e)](_0x40e607))_0x5db842[_0x11a905(0x677)]({'key':_0x18a316,'value':_0x1e77a7});}_0x5db842['length']===0x0&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x40e607+'\x22'),process['exit'](0x1)),_0x5db842[_0x11a905(0x320)]>0x1&&(console[_0x11a905(0x4dd)](_0x11a905(0x2de)+_0x40e607+_0x11a905(0x7bd)+_0x5db842[_0x11a905(0x320)]+'\x20licenses'),process[_0x11a905(0x532)](0x1)),_0x589c02=_0x5db842[0x0]['key'],_0x105f7a=_0x5db842[0x0][_0x11a905(0x1a4)];}const _0x15a478=Date['now'](),_0x9384b3=_0x110446(_0x105f7a,_0x15a478),_0x3c8c17=_0x5df9c3['id'],_0x5f1afd=_0x11a905(0x541);let _0x2c152b='';try{const _0x424fc2=Buffer[_0x11a905(0x1c3)](_0x105f7a['_licenseHash'],_0x11a905(0x6df));_0x2c152b=_0xad36da[_0x11a905(0x17c)](_0x3c8c17,_0x424fc2,_0x5f1afd)[_0x11a905(0x6e5)];}catch{}const _0xbe2c29=_0x105f7a['features']?Object[_0x11a905(0x5bd)](_0x105f7a[_0x11a905(0x858)])[_0x11a905(0x626)](([,_0xe687fd])=>_0xe687fd)[_0x11a905(0x800)](([_0xbf3cc8])=>_0xbf3cc8):[],_0x2364ec=_0x105f7a['limits']||{},_0x43f125=_0x1b222a?.['db']?.[_0x11a905(0x5f1)]?.('__writeCounter')??0x0,_0x30188e=[..._0x5df9c3[_0x11a905(0x789)]['keys']()]['filter'](_0x564b88=>!_0x564b88['startsWith']('~'))['length'];console[_0x11a905(0x808)]('\x0a\x20\x20License\x20details:'),console['log'](_0x11a905(0x4f0)+_0x589c02),console[_0x11a905(0x808)](_0x11a905(0x854)+(_0x105f7a['licensee']||'')),console[_0x11a905(0x808)](_0x11a905(0x7e7)+(_0x105f7a[_0x11a905(0x1f8)]?new Date(_0x105f7a[_0x11a905(0x1f8)])[_0x11a905(0x804)]()[_0x11a905(0x747)](0x0,0xa):'')),console['log'](_0x11a905(0x34f)+(_0xbe2c29[_0x11a905(0x3c7)](',\x20')||'(none)')),console[_0x11a905(0x808)](_0x11a905(0x4c1)+_0x2c152b),console['log'](_0x11a905(0x24a)+_0x9384b3),console[_0x11a905(0x808)](_0x11a905(0x79e)+new Date(_0x105f7a[_0x11a905(0x213)])['toISOString']());if(_0x9384b3===_0x11a905(0x4fd)){console[_0x11a905(0x808)](''),console[_0x11a905(0x808)]('\x20\x20Usage:');if(_0x2364ec[_0x11a905(0x5a3)]){const _0x596428=Math[_0x11a905(0x79c)](_0x43f125/_0x2364ec[_0x11a905(0x5a3)]*0x64);console[_0x11a905(0x808)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x43f125[_0x11a905(0x222)]()+_0x11a905(0x797)+_0x2364ec[_0x11a905(0x5a3)][_0x11a905(0x222)]()+_0x11a905(0x77c)+_0x596428+'%)');}else console[_0x11a905(0x808)](_0x11a905(0x7f7)+_0x43f125['toLocaleString']()+'\x20\x20(unlimited)');_0x2364ec[_0x11a905(0x66e)]?console[_0x11a905(0x808)](_0x11a905(0x23a)+_0x30188e+'\x20/\x20'+_0x2364ec[_0x11a905(0x66e)]):console[_0x11a905(0x808)](_0x11a905(0x23a)+_0x30188e+_0x11a905(0x602));}console[_0x11a905(0x808)]('');}finally{await _0x5df9c3[_0x11a905(0x419)]();}}async function _0x4a3cd8(_0x57b16f,_0xf538bc){const _0x5a6220=_0x5da53e;!_0x57b16f&&(console[_0x5a6220(0x4dd)](_0x5a6220(0x53b)),process[_0x5a6220(0x532)](0x1));const _0x49e59b=require$$5$1,_0x14842c=_0x56b5fe[_0x5a6220(0x377)](_0xf538bc[_0x5a6220(0x52b)]),_0x3bf840=new _0x49e59b(_0x14842c,_0x28c85b(_0xf538bc));await _0x3bf840[_0x5a6220(0x241)]();try{const _0x4bfd55=_0x3bf840[_0x5a6220(0x485)];(!_0x4bfd55||!_0x4bfd55[_0x5a6220(0x7e3)](_0x5a6220(0x34a)))&&(console[_0x5a6220(0x4dd)](_0x5a6220(0x304)+_0x57b16f+'\x22'),process[_0x5a6220(0x532)](0x1));let _0x42c9fe=null,_0x39206a=null;const _0x46869f=_0x4bfd55['get'](_0x5a6220(0x34a),_0x57b16f);if(_0x46869f)_0x42c9fe=_0x57b16f,_0x39206a=_0x46869f;else{const _0x247d2c=[];for(const {key:_0x342f3e,value:_0x432a4a}of _0x4bfd55[_0x5a6220(0x482)](_0x5a6220(0x34a))){if(_0x342f3e[_0x5a6220(0x32e)](_0x57b16f))_0x247d2c[_0x5a6220(0x677)]({'key':_0x342f3e,'value':_0x432a4a});}_0x247d2c['length']===0x0&&(console[_0x5a6220(0x4dd)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x57b16f+'\x22'),process[_0x5a6220(0x532)](0x1)),_0x247d2c['length']>0x1&&(console[_0x5a6220(0x4dd)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x57b16f+'\x22\x20matches\x20'+_0x247d2c['length']+_0x5a6220(0x5d6)),process[_0x5a6220(0x532)](0x1)),_0x42c9fe=_0x247d2c[0x0][_0x5a6220(0x4e2)],_0x39206a=_0x247d2c[0x0][_0x5a6220(0x1a4)];}await _0x4bfd55[_0x5a6220(0x323)]('~licenses',_0x42c9fe),console[_0x5a6220(0x808)](_0x5a6220(0x271)+_0x42c9fe+_0x5a6220(0x771)+(_0x39206a[_0x5a6220(0x3f3)]||_0x5a6220(0x775))+')');}finally{await _0x3bf840['close']();}}async function _0x5daf21(_0x423125,_0x5b5c37,_0x3cf422){const _0x257a41=_0x5da53e;!_0x423125&&(console['error'](_0x257a41(0x638)),process[_0x257a41(0x532)](0x1));!_0x3cf422[_0x257a41(0x5e6)]&&!(_0x3cf422['username']&&_0x3cf422[_0x257a41(0x2f8)])&&(console[_0x257a41(0x4dd)](_0x257a41(0x6f2)),process[_0x257a41(0x532)](0x1));const _0x4120b6=_0x3cf422['selfAddress']||_0x5b5c37[_0x257a41(0x84e)]?.['address'];!_0x4120b6&&(console[_0x257a41(0x4dd)](_0x257a41(0x358)+_0x257a41(0x400)+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process[_0x257a41(0x532)](0x1));const _0x5d6f83=require$$5$1,_0x2b0842=new _0x5d6f83(_0x5b5c37['dbPath'],{'sync':{'address':_0x4120b6,'auto_reconcile':![]}});await _0x2b0842[_0x257a41(0x241)]();try{const _0x48363d=_0x2b0842[_0x257a41(0x485)];if(_0x48363d&&_0x48363d[_0x257a41(0x7e3)](_0x257a41(0x606))){let _0x304a46=![];for(const _0x3b2421 of _0x48363d['getRange'](_0x257a41(0x606))){_0x304a46=!![];break;}_0x304a46&&console[_0x257a41(0x808)](_0x257a41(0x7dd)+_0x257a41(0x71b));}console['log']('\x0a\x20\x20Joining\x20cluster\x20at\x20'+_0x423125+'…'),await _0x2b0842[_0x257a41(0x84e)]['join'](_0x423125[_0x257a41(0x4c2)](/\/+$/,''),{'token':_0x3cf422[_0x257a41(0x5e6)],'username':_0x3cf422[_0x257a41(0x1bd)],'password':_0x3cf422[_0x257a41(0x2f8)]}),console[_0x257a41(0x808)](_0x257a41(0x795)),console[_0x257a41(0x808)](_0x257a41(0x828));}finally{await _0x2b0842[_0x257a41(0x419)]();}}async function _0x2801d3(){const _0x5c95b6=_0x5da53e,_0x154f03=Date[_0x5c95b6(0x562)](),_0x3d616a=_0x146471(process[_0x5c95b6(0x252)]),_0x2ccc34=_0x5a2fa8(_0x3d616a),_0x379d83=_0x56b5fe['resolve'](_0x2ccc34[_0x5c95b6(0x52b)]);!_0x2ccc34[_0x5c95b6(0x284)]&&!process[_0x5c95b6(0x497)]['isTTY']&&(_0x2ccc34['noRepl']=!![]);const _0x2d0a44=require$$5$1,{start:_0x7ca9ed,colorLog:_0x49f13d}=requireOkdbShell(),_0x596eae=require$$1$1,_0x5ecc43={..._0x2ccc34[_0x5c95b6(0x4e2)]?{'encryptionKey':_0x2ccc34[_0x5c95b6(0x4e2)]}:{},..._0x2ccc34[_0x5c95b6(0x35b)]?{'admin':![]}:_0x3edc94(_0x2ccc34[_0x5c95b6(0x560)])?{'admin':_0x2ccc34[_0x5c95b6(0x560)]}:{},..._0x3edc94(_0x2ccc34[_0x5c95b6(0x237)])?{'api':_0x2ccc34[_0x5c95b6(0x237)]}:{},..._0x3edc94(_0x2ccc34[_0x5c95b6(0x282)])?{'auth':_0x2ccc34[_0x5c95b6(0x282)]}:{},..._0x3edc94(_0x2ccc34[_0x5c95b6(0x61b)])?{'mcp':_0x2ccc34['mcp']}:{},..._0x3edc94(_0x2ccc34[_0x5c95b6(0x421)])?{'backup':_0x2ccc34[_0x5c95b6(0x421)]}:{},..._0x2ccc34[_0x5c95b6(0x1e5)]!==![]?{'timeMachine':_0x2ccc34[_0x5c95b6(0x1e5)]}:{},...Object[_0x5c95b6(0x3c5)](_0x362988['filter'](_0x1c3017=>_0x2ccc34[_0x1c3017]!==undefined)[_0x5c95b6(0x800)](_0x234325=>[_0x234325,_0x2ccc34[_0x234325]]))},_0x511d6c=_0x4450b5(_0x2ccc34);if(!_0x596eae[_0x5c95b6(0x832)]){const _0x49222f=_0x18e05d(),_0x51967d=_0x2ccc34[_0x5c95b6(0x275)]?'--no-cluster':_0x2ccc34[_0x5c95b6(0x760)]!=null&&_0x2ccc34[_0x5c95b6(0x760)]!==''?'--workers':process.env.OKDB_HTTP_WORKERS?_0x5c95b6(0x6f9):_0x2ccc34[_0x5c95b6(0x2b8)]?.[_0x5c95b6(0x633)]!=null?_0x5c95b6(0x403):_0x5c95b6(0x47c)+Math[_0x5c95b6(0x456)](0x1,require$$0[_0x5c95b6(0x58b)]()[_0x5c95b6(0x320)]-0x1);process['stdout']['write'](_0x5c95b6(0x21b)+_0x511d6c+'\x20('+_0x51967d+(!_0x49222f?';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process':'')+')\x0a');}if(_0x596eae[_0x5c95b6(0x832)]){const _0xb39d0d={..._0x5ecc43},_0x1b565a=new _0x2d0a44(_0x379d83,_0xb39d0d);_0x1b565a['log']['detachConsole']?.();const _0x2db38c=process.env.OKDB_CLUSTER_SLOT??'?',_0xe93672={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x30faa2=_0xe93672[_0x2ccc34[_0x5c95b6(0x44f)]]??_0xe93672[_0x5c95b6(0x510)];_0x1b565a[_0x5c95b6(0x808)]['attach'](_0x3dd3fa=>{const _0x1202af=_0x5c95b6;if((_0xe93672[_0x3dd3fa['level']]??0x1)<_0x30faa2)return;try{process[_0x1202af(0x61e)]?.({'__okdbCluster':_0x1202af(0x808),'slot':_0x2db38c,'pid':process[_0x1202af(0x242)],'entry':_0x3dd3fa});}catch{}}),await _0x1b565a['open']();const {attachWorkerCluster:_0x461f72}=requireOkdbCluster();_0x461f72(_0x1b565a),await _0x15d1ca(_0x1b565a,_0x2ccc34[_0x5c95b6(0x61f)],_0x516480(_0x2ccc34));return;}if(_0x511d6c>0x1){const {runClustered:_0x3e87d9}=requireOkdbCluster(),_0x1f9621=new _0x2d0a44(_0x379d83,{..._0x5ecc43,'engines':![],'processors':![],'compaction':![]});await _0x1f9621[_0x5c95b6(0x241)]();const _0x5dd6aa=async()=>{const _0x2b0c76=new _0x2d0a44(_0x379d83,{..._0x5ecc43});return await _0x2b0c76['open'](),_0x2b0c76;},_0x3e2063=Object['fromEntries'](_0x362988[_0x5c95b6(0x800)](_0x265f7a=>[_0x265f7a,_0x5ecc43[_0x265f7a]??!![]])),{formatListenAddr:_0x740479}=requireOkdbHttp(),_0xce5013=_0x740479(_0x2ccc34[_0x5c95b6(0x61f)],_0x2ccc34['http']?.['host']),_0x48000d=_0x3e87d9({'workers':_0x511d6c,'makeOkdb':_0x5dd6aa,'port':_0x2ccc34[_0x5c95b6(0x61f)],'primaryOkdb':_0x1f9621,'workerRole':_0x3e2063,'listenAddr':_0xce5013});let _0x5e9134=![];async function _0x5b2147(_0x17a186){const _0x7263c9=_0x5c95b6;_0x5e9134&&(process[_0x7263c9(0x7d4)][_0x7263c9(0x753)](_0x7263c9(0x24b)),process[_0x7263c9(0x532)](0x82));_0x5e9134=!![],process[_0x7263c9(0x7d4)]['write'](_0x7263c9(0x6cf)+(_0x17a186||_0x7263c9(0x62a))+_0x7263c9(0x32b));const _0x23360d=setTimeout(()=>{const _0x5ce2d9=_0x7263c9;process[_0x5ce2d9(0x7d4)]['write']('[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a'),process[_0x5ce2d9(0x532)](0x0);},0xbb8);_0x23360d[_0x7263c9(0x27a)]?.();try{await _0x48000d['close']();}catch(_0x45fd16){process['stderr'][_0x7263c9(0x753)](_0x7263c9(0x79a)+(_0x45fd16?.['message']??_0x45fd16)+'\x0a');}try{await _0x1f9621[_0x7263c9(0x419)]();}catch(_0x2df3c4){process[_0x7263c9(0x7d4)]['write']('[okdb]\x20primary\x20okdb\x20close\x20error:\x20'+(_0x2df3c4?.[_0x7263c9(0x258)]??_0x2df3c4)+'\x0a');}process['exit'](0x0);}_0x2ccc34[_0x5c95b6(0x16b)]=_0x511d6c;if(!_0x2ccc34[_0x5c95b6(0x284)]){_0x1f9621['log'][_0x5c95b6(0x6e9)]?.(),_0x58cc89(_0x1f9621[_0x5c95b6(0x282)]?.[_0x5c95b6(0x654)]?.()??[]),await _0x7ca9ed(_0x1f9621,_0x2ccc34);return;}process[_0x5c95b6(0x4a1)][_0x5c95b6(0x753)](_0x5c95b6(0x56f)+process['pid']+_0x5c95b6(0x64f)+_0x511d6c+'\x20'+('capable\x20HTTP\x20worker(s)\x20serving\x20:'+_0x2ccc34[_0x5c95b6(0x61f)]+'\x0a')),console['log'](''),console[_0x5c95b6(0x808)]('\x20\x20✓\x20OKDB\x20cluster\x20running'),console[_0x5c95b6(0x808)]('\x20\x20\x20\x20port:\x20\x20\x20\x20'+_0x2ccc34['port']+_0x5c95b6(0x77c)+_0x511d6c+'\x20HTTP\x20workers,\x20each\x20serves\x20+\x20processes)'),console['log'](_0x5c95b6(0x596)+_0x379d83),console[_0x5c95b6(0x808)](_0x5c95b6(0x30c)+_0x1f9621['id']),console[_0x5c95b6(0x808)](_0x5c95b6(0x429)+_0x2ccc34[_0x5c95b6(0x61f)]+_0x5c95b6(0x65b));!_0x2ccc34[_0x5c95b6(0x35b)]&&console[_0x5c95b6(0x808)](_0x5c95b6(0x692)+_0x2ccc34['port']+_0x5c95b6(0x44d));console[_0x5c95b6(0x808)](''),_0x58cc89(_0x1f9621[_0x5c95b6(0x282)]?.['getSecurityNotices']?.()??[]),process['on'](_0x5c95b6(0x486),()=>_0x5b2147(_0x5c95b6(0x486))),process['on'](_0x5c95b6(0x244),()=>_0x5b2147(_0x5c95b6(0x244))),process['on']('SIGBREAK',()=>_0x5b2147('SIGBREAK'));return;}const _0xffafd8=new _0x2d0a44(_0x379d83,_0x5ecc43);_0xffafd8[_0x5c95b6(0x808)]['detachConsole']?.();const _0xea83e1=_0xffafd8[_0x5c95b6(0x808)][_0x5c95b6(0x391)](_0x39dd28=>_0x49f13d(_0x39dd28,_0x2ccc34['logLevel']));if(_0x2ccc34[_0x5c95b6(0x284)])process['stdout'][_0x5c95b6(0x753)](_0x5c95b6(0x5b3));await _0xffafd8[_0x5c95b6(0x241)]();if(_0x2ccc34[_0x5c95b6(0x284)])process[_0x5c95b6(0x4a1)][_0x5c95b6(0x753)](_0x5c95b6(0x629));try{await _0x15d1ca(_0xffafd8,_0x2ccc34['port'],_0x516480(_0x2ccc34));}catch(_0x2923c7){_0x2923c7['code']===_0x5c95b6(0x17d)&&(console[_0x5c95b6(0x4dd)](_0x5c95b6(0x379)+_0x2ccc34[_0x5c95b6(0x61f)]+'\x20already\x20in\x20use'),process[_0x5c95b6(0x532)](0x1));throw _0x2923c7;}if(_0x2ccc34[_0x5c95b6(0x284)]){const _0x3d4091=_0x2ccc34[_0x5c95b6(0x2b8)]?.[_0x5c95b6(0x7ce)]!==undefined?[]['concat'](_0x2ccc34[_0x5c95b6(0x2b8)]['host'])['join'](',\x20')+'\x20':'';process[_0x5c95b6(0x4a1)][_0x5c95b6(0x753)]('\x20\x20✓\x20http\x20listening\x20on\x20'+_0x3d4091+':'+_0x2ccc34[_0x5c95b6(0x61f)]+'\x0a');}if(!_0x2ccc34[_0x5c95b6(0x284)])_0xffafd8[_0x5c95b6(0x808)]['detachConsole']?.(),_0xea83e1?.(),_0x58cc89(_0xffafd8['auth']?.['getSecurityNotices']?.()??[]),await _0x7ca9ed(_0xffafd8,_0x2ccc34);else{const _0x3381be=_0x56b5fe[_0x5c95b6(0x3c7)](_0x379d83,_0x5c95b6(0x7e6));try{_0x2eb10c[_0x5c95b6(0x4d1)](_0x3381be,String(process['pid']));}catch{}const _0x5c8228=Date['now']()-_0x154f03;console[_0x5c95b6(0x808)](''),console[_0x5c95b6(0x808)]('\x20\x20✓\x20OKDB\x20server\x20running'),console[_0x5c95b6(0x808)](_0x5c95b6(0x236)+_0x2ccc34[_0x5c95b6(0x61f)]),console[_0x5c95b6(0x808)](_0x5c95b6(0x834)+_0x379d83),console[_0x5c95b6(0x808)](_0x5c95b6(0x5da)+_0xffafd8['id']);{const _0x198086=_0xffafd8[_0x5c95b6(0x485)]?.['db']?.[_0x5c95b6(0x5f1)]?.(_0x5c95b6(0x1a1))??0x0,_0x5c92da=[..._0xffafd8['_envs'][_0x5c95b6(0x367)]()][_0x5c95b6(0x626)](_0x58ae77=>!_0x58ae77[_0x5c95b6(0x32e)]('~'))[_0x5c95b6(0x320)];if(_0xffafd8[_0x5c95b6(0x44a)]?.[_0x5c95b6(0x4fd)]?.[_0x5c95b6(0x235)]===0x1){const _0x2fe093=Math[_0x5c95b6(0x26a)]((_0xffafd8[_0x5c95b6(0x44a)]['active'][_0x5c95b6(0x1f8)]-Date[_0x5c95b6(0x562)]())/0x5265c00);console['log'](_0x5c95b6(0x798)+_0xffafd8[_0x5c95b6(0x44a)][_0x5c95b6(0x4fd)][_0x5c95b6(0x3f3)]+'\x20(expires\x20in\x20'+_0x2fe093+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0xffafd8['_license']?.[_0x5c95b6(0x4fd)]){const _0x19dcf4=_0xffafd8[_0x5c95b6(0x44a)][_0x5c95b6(0x4fd)];console['log']('\x20\x20\x20\x20license:\x20'+_0x19dcf4[_0x5c95b6(0x3f3)]+_0x5c95b6(0x4d7)+new Date(_0x19dcf4[_0x5c95b6(0x1f8)])[_0x5c95b6(0x804)]()['slice'](0x0,0xa)+')');const _0xf7657d=_0x19dcf4['limits']||{};if(_0xf7657d[_0x5c95b6(0x5a3)]){const _0xac9910=Math['round'](_0x198086/_0xf7657d[_0x5c95b6(0x5a3)]*0x64);console['log'](_0x5c95b6(0x512)+_0x198086[_0x5c95b6(0x222)]()+_0x5c95b6(0x797)+_0xf7657d[_0x5c95b6(0x5a3)][_0x5c95b6(0x222)]()+'\x20writes\x20('+_0xac9910+'%),\x20'+_0x5c92da+(_0xf7657d['envs']?'/'+_0xf7657d[_0x5c95b6(0x66e)]:'')+_0x5c95b6(0x731)+(_0x5c92da===0x1?'':'s'));}}else{if(_0xffafd8['_license']){const _0x399548=_0xffafd8['_license'][_0x5c95b6(0x865)](),_0x5b9de9=_0x399548['length']?_0x399548[_0x5c95b6(0x800)](_0x357b82=>_0x357b82[_0x5c95b6(0x6e5)])['join'](',\x20'):'(add\x20a\x20license\x20first)',_0x35a3f6=_0xffafd8['_license'][_0x5c95b6(0x2e1)],_0x4420c8=_0x35a3f6[_0x5c95b6(0x452)][_0x5c95b6(0x5a3)]?Math['round'](_0x198086/_0x35a3f6[_0x5c95b6(0x452)][_0x5c95b6(0x5a3)]*0x64):0x0;console[_0x5c95b6(0x808)](_0x5c95b6(0x3c9)),console[_0x5c95b6(0x808)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x198086['toLocaleString']()+'\x20/\x20'+_0x35a3f6[_0x5c95b6(0x452)][_0x5c95b6(0x5a3)][_0x5c95b6(0x222)]()+_0x5c95b6(0x81c)+_0x4420c8+'%),\x20'+_0x5c92da+_0x5c95b6(0x797)+_0x35a3f6[_0x5c95b6(0x452)][_0x5c95b6(0x66e)]+_0x5c95b6(0x65e)),console[_0x5c95b6(0x808)](_0x5c95b6(0x30a)+_0x5b9de9);}}}}console[_0x5c95b6(0x808)](_0x5c95b6(0x69d)+_0x2ccc34['port']+_0x5c95b6(0x65b));!_0x2ccc34[_0x5c95b6(0x35b)]&&console['log'](_0x5c95b6(0x625)+_0x2ccc34[_0x5c95b6(0x61f)]+'/admin/index.html');console['log'](''),console[_0x5c95b6(0x808)](_0x5c95b6(0x23e)+_0x5c8228+'ms'),_0x58cc89(_0xffafd8['auth']?.['getSecurityNotices']?.()??[]);let _0x19ad63=![];async function _0x2f522a(_0x2f08ae){const _0x57b032=_0x5c95b6;_0x19ad63&&(process[_0x57b032(0x7d4)][_0x57b032(0x753)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x57b032(0x532)](0x82));_0x19ad63=!![],process[_0x57b032(0x7d4)]['write']('\x0a[okdb]\x20received\x20'+(_0x2f08ae||'shutdown')+_0x57b032(0x4c8));const _0xb8d132=setTimeout(()=>{const _0x5a2ba7=_0x57b032;process[_0x5a2ba7(0x7d4)][_0x5a2ba7(0x753)](_0x5a2ba7(0x285)),process[_0x5a2ba7(0x532)](0x1);},0x1388);try{_0x2eb10c['unlinkSync'](_0x3381be);}catch{}try{await _0xffafd8['close']();}catch(_0x420ea2){process[_0x57b032(0x7d4)][_0x57b032(0x753)](_0x57b032(0x770)+(_0x420ea2?.[_0x57b032(0x258)]??_0x420ea2)+'\x0a');}clearTimeout(_0xb8d132),process['stderr']['write'](_0x57b032(0x2fa)),process[_0x57b032(0x532)](0x0);}process['on'](_0x5c95b6(0x486),()=>_0x2f522a(_0x5c95b6(0x486))),process['on'](_0x5c95b6(0x244),()=>_0x2f522a('SIGTERM')),process['on'](_0x5c95b6(0x5c7),()=>_0x2f522a(_0x5c95b6(0x5c7)));}}const _0x1d3d21=new Set([_0x5da53e(0x881),_0x5da53e(0x19d),_0x5da53e(0x4ef),'backup',_0x5da53e(0x3ca),_0x5da53e(0x875),_0x5da53e(0x2e7),'reset',_0x5da53e(0x5e6),'join',_0x5da53e(0x65f)]),_0x65af29=process[_0x5da53e(0x252)][0x2];if(_0x65af29===_0x5da53e(0x881))console[_0x5da53e(0x808)](require$$3['version']),process[_0x5da53e(0x532)](0x0);else{if(_0x65af29===_0x5da53e(0x18c))process[_0x5da53e(0x532)](requireOkdbShmGc()[_0x5da53e(0x2c9)](process['argv'][_0x5da53e(0x747)](0x3)));else{if(_0x65af29&&_0x1d3d21[_0x5da53e(0x514)](_0x65af29)){const _0x1bac7b=process[_0x5da53e(0x252)]['slice'](0x3),_0x1c4b6b=_0x146471(['node','okdb',..._0x1bac7b]),_0x455abf=_0x5a2fa8(_0x1c4b6b),_0x1e16f8=new Set([_0x5da53e(0x3b4),'-d',_0x5da53e(0x6af),'-k',_0x5da53e(0x533),'-c','--port','-p',_0x5da53e(0x794),_0x5da53e(0x1fb),'-e',_0x5da53e(0x704),_0x5da53e(0x264),_0x5da53e(0x3ed),_0x5da53e(0x5bc),_0x5da53e(0x48f),'--grants',_0x5da53e(0x7b0),'--token',_0x5da53e(0x6dc),'-u',_0x5da53e(0x67e)]);let _0x305ea7=null;for(let _0x23a8f6=0x0;_0x23a8f6<_0x1bac7b[_0x5da53e(0x320)];_0x23a8f6++){if(_0x1e16f8[_0x5da53e(0x514)](_0x1bac7b[_0x23a8f6])){_0x23a8f6++;continue;}if(!_0x1bac7b[_0x23a8f6][_0x5da53e(0x32e)]('-')){_0x305ea7=_0x1bac7b[_0x23a8f6];break;}}(async()=>{const _0xea3035=_0x5da53e;if(_0x65af29==='token'){const _0x304a48=process[_0xea3035(0x252)][0x3],_0x18d206=process[_0xea3035(0x252)][_0xea3035(0x747)](0x4),_0x953774=_0x146471([_0xea3035(0x3e1),'okdb',..._0x18d206]),_0x3a5306=_0x5a2fa8(_0x953774),_0x4b3766=new Set([_0xea3035(0x3b4),'-d',_0xea3035(0x6af),'-k',_0xea3035(0x533),'-c',_0xea3035(0x80c),'-p',_0xea3035(0x264),_0xea3035(0x3ed),_0xea3035(0x5bc),'--permissions',_0xea3035(0x3f6),_0xea3035(0x7b0),_0xea3035(0x794),_0xea3035(0x1fb),'-e','--types']),_0x167ea3=[];for(let _0x41cca6=0x0;_0x41cca6<_0x18d206[_0xea3035(0x320)];_0x41cca6++){if(_0x4b3766[_0xea3035(0x514)](_0x18d206[_0x41cca6])){_0x41cca6++;continue;}if(_0x18d206[_0x41cca6]['startsWith']('-'))continue;_0x167ea3['push'](_0x18d206[_0x41cca6]);}switch(_0x304a48){case'create':await _0x19fddc(_0x3a5306,_0x953774);break;case'list':await _0x3d6302(_0x3a5306);break;case _0xea3035(0x56e):await _0x21f95a(_0x167ea3[0x0],_0x3a5306);break;default:console['error']('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x304a48+_0xea3035(0x215)),process['exit'](0x1);}return;}if(_0x65af29===_0xea3035(0x65f)){const _0x542387=requireOkdbLicenseCodec(),_0x43a18c=process[_0xea3035(0x252)][_0xea3035(0x747)](0x3),_0x36605a=_0x146471([_0xea3035(0x3e1),_0xea3035(0x525),..._0x43a18c]),_0x1e188d=_0x5a2fa8(_0x36605a),_0x3fd7e1=new Set([_0xea3035(0x3b4),'-d','--key','-k','--config','-c','--port','-p',_0xea3035(0x794)]),_0x5c1bdf=[];for(let _0x3b81b0=0x0;_0x3b81b0<_0x43a18c[_0xea3035(0x320)];_0x3b81b0++){if(_0x3fd7e1[_0xea3035(0x514)](_0x43a18c[_0x3b81b0])){_0x3b81b0++;continue;}if(_0x43a18c[_0x3b81b0]['startsWith']('-'))continue;_0x5c1bdf['push'](_0x43a18c[_0x3b81b0]);}const _0x25c20e=_0x5c1bdf[0x0]??null;if(_0x25c20e===_0xea3035(0x323))await _0x4a3cd8(_0x5c1bdf[0x1],_0x1e188d);else{if(!_0x25c20e)await _0x1eec27(_0x1e188d);else{let _0x21d206=_0x542387[_0xea3035(0x3d9)](_0x25c20e);if(_0x21d206==='unknown'&&_0x2eb10c['existsSync'](_0x25c20e))_0x21d206='path';if(_0x21d206===_0xea3035(0x73c))try{const _0x2c9c73=_0x2eb10c['readFileSync'](_0x25c20e,_0xea3035(0x3cc))['trim'](),_0x63b1a4=_0x542387[_0xea3035(0x3d9)](_0x2c9c73);if(_0x63b1a4===_0xea3035(0x33a)){await _0x30c822(_0x2c9c73,_0x1e188d);return;}await _0x1e5acd(_0x25c20e,_0x1e188d);return;}catch(_0x95d7c){console[_0xea3035(0x4dd)](_0xea3035(0x7ab)+_0x25c20e+':\x20'+_0x95d7c[_0xea3035(0x258)]),process[_0xea3035(0x532)](0x1);}switch(_0x21d206){case _0xea3035(0x472):await _0x1e5acd(_0x25c20e,_0x1e188d);break;case _0xea3035(0x33a):await _0x30c822(_0x25c20e,_0x1e188d);break;case _0xea3035(0x846):await _0x32ceba(_0x25c20e,_0x1e188d);break;default:console['error']('[okdb]\x20error:\x20unrecognized\x20input:\x20\x22'+_0x25c20e+'\x22'),console['error'](''),console[_0xea3035(0x4dd)](_0xea3035(0x462)),console[_0xea3035(0x4dd)](_0xea3035(0x2b2)),console[_0xea3035(0x4dd)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console[_0xea3035(0x4dd)](_0xea3035(0x680)),console[_0xea3035(0x4dd)](_0xea3035(0x2dd)),console[_0xea3035(0x4dd)](''),console[_0xea3035(0x4dd)](_0xea3035(0x380)),process[_0xea3035(0x532)](0x1);}}}return;}switch(_0x65af29){case _0xea3035(0x19d):await _0x423b2c(_0x455abf);break;case _0xea3035(0x4ef):await _0x43b3ec();break;case _0xea3035(0x4c6):await _0x5b99f2(_0x455abf);break;case _0xea3035(0x421):await _0x175a6e(_0x305ea7??_0x56b5fe[_0xea3035(0x377)]('./okdb-backup'),_0x455abf);break;case _0xea3035(0x3ca):if(!_0x305ea7)throw new Error(_0xea3035(0x4dc));await _0x3db047(_0x56b5fe['resolve'](_0x305ea7),_0x455abf,_0x1c4b6b);break;case'export':await _0x387346(_0x305ea7??_0x56b5fe[_0xea3035(0x377)](_0xea3035(0x4e9)),_0x455abf,_0x1c4b6b);break;case'import':await _0x5e407c(_0x305ea7??_0x56b5fe[_0xea3035(0x377)](_0xea3035(0x4e9)),_0x455abf,_0x1c4b6b);break;case _0xea3035(0x3c7):await _0x5daf21(_0x305ea7,_0x455abf,_0x1c4b6b);break;}})()[_0x5da53e(0x19c)](()=>process['exit'](0x0))[_0x5da53e(0x613)](_0x23c58a=>{const _0x177116=_0x5da53e;console[_0x177116(0x4dd)](_0x177116(0x3b8)+(_0x23c58a[_0x177116(0x258)]||_0x23c58a)+'\x0a'),process['exit'](0x1);});}else _0x2801d3()[_0x5da53e(0x613)](_0xacc6b0=>{const _0x15ae86=_0x5da53e;console['error'](_0x15ae86(0x30b)),console[_0x15ae86(0x4dd)](_0xacc6b0[_0x15ae86(0x652)]||_0xacc6b0),process[_0x15ae86(0x532)](0x1);});}}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x1d45b1(0x818)]=okdb;