@kedem/okdb 2.1.0 → 2.1.2

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.
@@ -1 +1 @@
1
- 'use strict';const _0x22d7b4=_0x23ad;(function(_0x4a2553,_0x53ed29){const _0x5ec238=_0x23ad,_0x5f29fa=_0x4a2553();while(!![]){try{const _0x62a821=-parseInt(_0x5ec238(0x1f1))/0x1*(parseInt(_0x5ec238(0x28c))/0x2)+parseInt(_0x5ec238(0xd3))/0x3*(parseInt(_0x5ec238(0x2ab))/0x4)+parseInt(_0x5ec238(0x14d))/0x5*(parseInt(_0x5ec238(0x191))/0x6)+parseInt(_0x5ec238(0xf0))/0x7+parseInt(_0x5ec238(0x1b3))/0x8*(parseInt(_0x5ec238(0x283))/0x9)+parseInt(_0x5ec238(0x230))/0xa+-parseInt(_0x5ec238(0x202))/0xb;if(_0x62a821===_0x53ed29)break;else _0x5f29fa['push'](_0x5f29fa['shift']());}catch(_0x3deb00){_0x5f29fa['push'](_0x5f29fa['shift']());}}}(_0xd49b,0x85b59));var require$$0$5=require(_0x22d7b4(0x1c2)),require$$1$1=require(_0x22d7b4(0xf1)),require$$1=require(_0x22d7b4(0x2d0)),require$$0$3=require('os'),require$$2=require('crypto'),require$$0=require(_0x22d7b4(0xcb)),require$$0$2=require(_0x22d7b4(0x1c7)),require$$0$1=require('fs'),require$$0$4=require(_0x22d7b4(0x1ed));function getDefaultExportFromCjs(_0x44aed7){const _0x77c688=_0x22d7b4;return _0x44aed7&&_0x44aed7['__esModule']&&Object[_0x77c688(0x103)]['hasOwnProperty'][_0x77c688(0x115)](_0x44aed7,_0x77c688(0x2b0))?_0x44aed7[_0x77c688(0x2b0)]:_0x44aed7;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2d4452=_0x22d7b4;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x593b09={'PUT':'put','REMOVE':_0x2d4452(0x17d),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x2d4452(0x27c),'INDEX_RESET':_0x2d4452(0x159),'TYPE_REGISTER':_0x2d4452(0x29d),'TYPE_DROP':_0x2d4452(0x2d4),'FTS_REGISTER':_0x2d4452(0xee),'FTS_DROP':_0x2d4452(0x1b9),'FTS_RESET':_0x2d4452(0x112),'SCHEMA_SET':_0x2d4452(0x10e),'SCHEMA_DROP':_0x2d4452(0xcc),'TTL_SET':_0x2d4452(0x233),'TTL_CLEAR':_0x2d4452(0xd8)},_0x37dfcc={'SYSTEM_READY':_0x2d4452(0x130),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x2d4452(0x186),'SYSTEM_POKE':_0x2d4452(0x101),'SYSTEM_DRAIN':_0x2d4452(0x16b),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x2d4452(0x258),'ITEM_CREATE':_0x2d4452(0x15d),'ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':_0x2d4452(0x28d),'INDEX_READY':_0x2d4452(0x140),'INDEX_PROGRESS':_0x2d4452(0x14c),'VIEW_PROGRESS':_0x2d4452(0x21c),'INDEX_DROP':_0x2d4452(0x2db),'INDEX_REGISTERED':_0x2d4452(0x175),'FTS_REGISTERED':_0x2d4452(0xf6),'FTS_DROP':'fts:drop','FTS_RESET':'fts:reset','SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x2d4452(0x10d),'UNIQUE_VIOLATION':_0x2d4452(0xe7),'UNIQUE_VIOLATION_RESOLVED':_0x2d4452(0x28e),'REF_VIOLATION':_0x2d4452(0x2a5),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x2d4452(0xfe),'TXN_START':_0x2d4452(0x177),'TXN_END':'txn:end','TXN_ROLLBACK':_0x2d4452(0x267),'TYPE_REGISTERED':_0x2d4452(0x1f7),'TYPE_DROP':'type:drop','ENV_OPENED':'env:opened','ENV_REMOVED':_0x2d4452(0x155),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':'ttl:expired','TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x2d4452(0x20a),'LICENSE_ADDED':_0x2d4452(0x252),'LICENSE_ACTIVATED':_0x2d4452(0x263),'LICENSE_REMOVED':_0x2d4452(0x25b)},_0x458a2b={'CREATING':'creating','RESETTING':'resetting','READY':_0x2d4452(0x1c5),'DROPPING':_0x2d4452(0x270),'WAITING':_0x2d4452(0x28f)},_0x173534={'CREATED':_0x2d4452(0x20d),'STARTING':'starting','STARTED':_0x2d4452(0x25e),'STOPPING':'stopping','STOPPED':'stopped'},_0x40233b={'CREATING':'creating','READY':'ready','HALTED':'halted','STOPPED':_0x2d4452(0x1cf),'RESETTING':_0x2d4452(0xda)},_0x1cdb25=Object[_0x2d4452(0x1b4)]({'POKE':_0x2d4452(0x193),'DRAIN':_0x2d4452(0x19a),'TYPE_DROP':_0x2d4452(0x2d1),'PROC':_0x2d4452(0x19b),'ENV_RELEASE':_0x2d4452(0xe1)});return okdbEnums={'BUS_EVENTS':_0x1cdb25,'CHANGE_ACTIONS':_0x593b09,'EVENTS':_0x37dfcc,'INDEX_STATE':_0x458a2b,'OKDB_STATE':_0x173534,'VIEW_STATE':_0x40233b},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function _0xd49b(){const _0x4fab52=['resetFts','next','_heartbeatTimer','call','_timer','\x20pid=','isPrimary','ms\x20(attempt\x20','INDEX_PROGRESS','_closed','addSupervisedChild','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','_committed','emit','sync','_startedAt','_drain','FTS_REGISTERED','publishChildRow','lifecycle','put','migrations','_versionSkewWarned','_maybePublish','_publishNow','cli','workersConfigured','ms\x20activeWriters=','~processes:cmd','_admissionTimer','system:ready','maxMs','killable','INDEX_READY','processingStatusView','_handlePoke','cpuUsage','write','processorsView','events','http-server','instanceId','copy','okdb','_role','_heartbeatInFlight','index:ready','\x20worker(s)\x20still\x20serving','ITEM_UPDATE',')\x20exited\x20','bumpCmd','add','raw-put','reset','startedAt','_admissionStarted','consecutiveFailures','stats','index:progress','860InjNCy','meta','randomUUID','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','user','mkdirSync','registry\x20heartbeat\x20skipped\x20(writer=','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','env:removed','function','clear','http','resetIndex','extend','kill','_children','item:create','change','updateSupervisedChildStats','some','_envs','cluster-wide','isDead','cursorKey','startsWith','http\x20worker\x20child\x20failed:\x20','async','reduce','uptime','isWanted','system:drain','busy','_flushDebounce','rss','entry','standalone','_draining','_started','dumpedAt','slotKey','index:registered','note','txn:start','claims','dedupeMax','processorId','onWindow','_supervisorKey','remove','_ensureDesired','_threadStats','unclaimed','split','\x20times\x20in\x20','SYNC_COMMITS','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','release','system:clock_change','SYSTEM_STOPPED','map','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','kind','_lock','acquiredAt','cpus','find','\x20===','info','2232pUdULI','markClosed','bus:poke','once','_isReader','setDesired','ms\x20env=','_isStale','_processStartedAt','bus:drain','bus:proc','listen','stderr','\x20phase=','seq','_flushTimer','ms\x20busy=','_collectWriterFacet','_cursors','_lastCpuWindowMs','_lastCpuAt','_startHeartbeat','embedded','_migrateVocab','toISOString','_nodeDb','SYSTEM_POKE','_outstanding','_groupByProcess','~processes:desired','processor:progress','disable','disconnect','\x20statusEnv=','7871200NePliZ','freeze','listening','compaction','round','unref','dropFts','_activateProcesses','processing','_onStop','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','repeat','get','online','processor:error','./okdb','_inflight','processor:paused','ready','filter','perf_hooks','data','caps','_durs','_ownMeta','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','instances','warn','stopped','putNode','_enableChangelog','_desired','_dedupeKey','_singletonLocks','host','rows=','recordWrite','transactionSync','code','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','_rawDb','send','values','heapTotal','transaction','slice','epoch','selfKey','_onItem','supervisorKey','ms\x20p99=','_nodeDbCache','inflightAgesMs','VIEW_PROGRESS','listNodes','flushDebounce','(code=','_startAdmission','node:events','reap','removeSync','_cmd','1bUAuRH','signalWant','_key','[okdb-cluster]\x20worker\x20pid=','CHANGEFEED_QUANTUM','_highWater','type:registered','inspect','size','includes','running','_drainOne','test','options','_pending','rowKey','processor:ready','11340681RrLoxe','register','ms/','clearThreadStats','none','_report','race','_seen','license:invalid','indexOf','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','created','processes','_sampleOwnStats','version','state','_markSeen','max','sandbox','list','keys','hostname','trim','listDesired','committed','decommissioning','view:progress','getClock','liveThreadStats','_listenAddr','_bpParkedTotal','shift','_hbTimer','stopHeartbeat','children','_removeRowAsync','_writer','listAll','_acquiredAt','_refreshDesiredSnapshot','_clusterOnMessage','processKey','system','functions','SWAP',':want','1720880VmxZpz','error','off','setTtl','inst:','replace','_onPoke','primary','string','external','_nodeDbFor','_wantDbHandle','mode','_baselines','startHeartbeat','reportThreadStats','fast','ms\x20max=','push','type','_clusterOrphanWatch','flushed','_coordinator','resolve','listenAddr','min','depth','_buildProcessingFacet','ms\x20mean=','getDesired','allSettled','ephemeral','_db','percentile','license:added','number','has','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','(worst\x20','abs','system:bus_state_change','floor','exit','license:removed','_onTick','node','started','_kind','isActive','process\x20','getCmd','license:activated','ppid','join','uncaughtException','txn:rollback','_collectSingletonClaims','oldestPendingMs','getRange','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','firstTs','setLogger','respawnTimer','load','dropping','single','detachConsole','length','_holderDead','prependListener','[okdb-cluster]\x20','raw-remove','building',');\x20','env','toFixed','registerIndex','createEnvironment','registry-publish','tierList','parkedNow','now','threads','9mkpQQB','\x20(durable\x20desired-state)','status','_windowCbs','resetReadTxn','view','ttlMs','commit','_systemEnv','271756sBjCGM','index:reset','unique:violation_resolved','waiting','_singletonLock','_sandbox','maxExtra','_done','pushEphemeral','memoryUsage','set','mean','stop','isEnabled','all','decommission','unhandledRejection','registerType','object','okdb-writer:\x20env\x20closing\x20—\x20retry','win32','then','\x20worker(s)\x20remaining','ITEM_REMOVE','hasDesired','ref:violation','holder','_lastCpuUsage','singletonClaims','hasType','name','4Bafnof','level','fanout','open','[okdb-cluster]\x20respawning\x20worker\x20slot=','default','_quantum','_clusterWorkerAttached','enable','\x20parkedNow=','_nodeDead','\x20\x20#','start','role','_onProcEvent','ORPHAN\x20(env-closed\x20write)','treeView','writerStatus','_openEnvLazy','beforeWrite','_lastPublishAt','loop-lag','event','cluster:','_dedupeMax','fromEntries','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','ENV_CLOSING_RETRY','log','loop-lag\x20','claimGated','openDB','\x20died\x20','_buildChildRow','catch','stack','tryAcquire','path','bus:type_drop','_changefeed','process','dropType','_buildOwnRow','setupPrimary','splice','_isWriter','_scheduleFlush','_enqueuedAt','index:drop','label','\x20forked\x20','pid','enabled','heartbeatMs','count','expiresAt','setOwnMeta','_servingEngines','entries','removeNode','flushLmdb','\x20sync','\x20@\x20','ingest','sort','isConnected','nodeKey','noteListenAddr','attach','ITEM_CREATE','_lockDb','offWindow','INDEX_RESET','\x20ipc\x20error:\x20','\x20HTTP\x20server(s)\x20on\x20port\x20','draining','processor:resumed','connected','SYSTEM_PROC','2.1.0','from','queue-worker','_wantDb','node:perf_hooks','dropSchema','INDEX_REGISTERED','_putRowSync','_rowKey','_handleInProcess','_selfKey','updatedAt','450339FYtHSY','heapUsed','_desiredOverlay','deaths','_adminRelay','clearTtl','\x20worker\x20slot=','resetting','\x20(slot=','_released','\x20writer{depth=','error:\x20','_bpWaiters','afterWrite','bus:env_release','putSync','attachFeed','parse','REMOVE','procmodeack/','unique:violation','\x20\x20env=','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','ms\x20on\x20env=','ESRCH','hard-killed','processors','registerFts','slot','2411059QJygxf','cluster','~lock','_statusEnv','~processes','\x0a===\x20OKDB_DIAG\x20','fts:registered','namespace','engines','message','worker','exports','envsOpen','_rootDb','sync:apply','__vocab/version','platform','system:poke','delete','prototype','\x20│\x20','dead','_log','_lastCpuPct','_buckets','--test','--print','commitsPerSec','value','schema:drop','setSchema','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_publishFailWarned','\x20oldestPendingMs='];_0xd49b=function(){return _0x4fab52;};return _0xd49b();}function requireOkdbLoopMonitor(){const _0x2931ab=_0x22d7b4;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x361d87,performance:_0x2077cc}=require$$0,_0x38140b=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0xf3582c=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x512947=process.env.OKDB_LOOP_LAG_ALL==='1',_0x903509=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x5d06b5{constructor(){const _0x1a6ce9=_0x23ad;this[_0x1a6ce9(0x2df)]=_0x38140b,this[_0x1a6ce9(0x108)]=new Map(),this['_h']=null,this[_0x1a6ce9(0x116)]=null,this[_0x1a6ce9(0x172)]=![],this[_0x1a6ce9(0x106)]=(_0x19abd5,_0x15ccbc)=>process[_0x1a6ce9(0x19d)][_0x1a6ce9(0x137)](_0x19abd5+(_0x15ccbc?'\x20'+JSON['stringify'](_0x15ccbc):'')+'\x0a');}[_0x2931ab(0x281)](){const _0x211367=_0x2931ab;return _0x2077cc[_0x211367(0x281)]();}[_0x2931ab(0x26d)](_0x356f5d){const _0x566022=_0x2931ab;if(typeof _0x356f5d===_0x566022(0x156))this[_0x566022(0x106)]=_0x356f5d;}[_0x2931ab(0x176)](_0x3a8c4f,_0x1b3c06,_0x1908b8){const _0x2ce2a0=_0x2931ab;if(!this[_0x2ce2a0(0x2df)])return;let _0x592113=this[_0x2ce2a0(0x108)]['get'](_0x3a8c4f);!_0x592113&&(_0x592113={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x2ce2a0(0x108)][_0x2ce2a0(0x296)](_0x3a8c4f,_0x592113)),_0x592113['ms']+=_0x1b3c06,_0x592113[_0x2ce2a0(0x2e1)]+=0x1,_0x1b3c06>_0x592113[_0x2ce2a0(0x131)]&&(_0x592113['maxMs']=_0x1b3c06,_0x592113[_0x2ce2a0(0x292)]=_0x1908b8||'');}['start'](_0x36bf63){const _0x5a9f47=_0x2931ab;if(!this[_0x5a9f47(0x2df)]||this[_0x5a9f47(0x172)])return;this[_0x5a9f47(0x172)]=!![];if(_0x36bf63)this[_0x5a9f47(0x106)]=_0x36bf63;this['_h']=_0x361d87({'resolution':0xa}),this['_h'][_0x5a9f47(0x2b3)](),this['_timer']=setInterval(()=>this[_0x5a9f47(0x207)](),_0xf3582c);if(this['_timer'][_0x5a9f47(0x1b8)])this['_timer'][_0x5a9f47(0x1b8)]();}[_0x2931ab(0x17b)](_0x5a859d){const _0x1653c2=_0x2931ab;if(!this['_windowCbs'])this[_0x1653c2(0x286)]=new Set();this['_windowCbs'][_0x1653c2(0x145)](_0x5a859d);if(!this[_0x1653c2(0x172)])this[_0x1653c2(0x1ec)]();}[_0x2931ab(0x2f2)](_0x49c1e6){this['_windowCbs']?.['delete'](_0x49c1e6);}[_0x2931ab(0x1ec)](){const _0x59e2ab=_0x2931ab;if(this[_0x59e2ab(0x149)])return;this[_0x59e2ab(0x149)]=!![];!this['_h']&&(this['_h']=_0x361d87({'resolution':0xa}),this['_h'][_0x59e2ab(0x2b3)]());const _0x522ff3=_0xf3582c;this['_admissionTimer']=setInterval(()=>{const _0x16d369=_0x59e2ab,_0x54fa2e=this['_h'];if(!_0x54fa2e)return;const _0x5ce422=_0x54fa2e[_0x16d369(0x251)](0x63)/0xf4240,_0x524424=_0x54fa2e[_0x16d369(0x213)]/0xf4240,_0x579b87=_0x54fa2e[_0x16d369(0x297)]/0xf4240;_0x54fa2e['reset']();if(this[_0x16d369(0x286)])for(const _0x5de96d of this[_0x16d369(0x286)]){try{_0x5de96d({'p99Ms':_0x5ce422,'maxMs':_0x524424,'meanMs':_0x579b87,'reportMs':_0x522ff3});}catch{}}},_0x522ff3);if(this['_admissionTimer']['unref'])this[_0x59e2ab(0x12f)]['unref']();}[_0x2931ab(0x207)](){const _0x3fb4d6=_0x2931ab,_0x105619=this['_h'],_0x29db70=_0x105619['max']/0xf4240,_0xab13a0=_0x105619[_0x3fb4d6(0x251)](0x63)/0xf4240,_0x26500f=_0x105619[_0x3fb4d6(0x297)]/0xf4240;_0x105619[_0x3fb4d6(0x147)]();const _0x5eb30e=[...this[_0x3fb4d6(0x108)][_0x3fb4d6(0x2e5)]()]['map'](([_0x5c8045,_0x1b6bbd])=>({'label':_0x5c8045,..._0x1b6bbd}))[_0x3fb4d6(0x2eb)]((_0x510f4b,_0x497e1c)=>_0x497e1c['ms']-_0x510f4b['ms'])['slice'](0x0,0x8);this[_0x3fb4d6(0x108)][_0x3fb4d6(0x157)]();const _0x1e4e0d=_0x5eb30e[_0x3fb4d6(0x168)]((_0x5538a2,_0x404837)=>_0x5538a2+_0x404837['ms'],0x0),_0x4cd05f=_0x5eb30e[_0x3fb4d6(0x188)](_0x36d748=>_0x36d748[_0x3fb4d6(0x2dc)]+'='+_0x36d748['ms']['toFixed'](0x0)+_0x3fb4d6(0x204)+_0x36d748[_0x3fb4d6(0x2e1)]+(_0x36d748[_0x3fb4d6(0x131)]>0x5?_0x3fb4d6(0x256)+_0x36d748[_0x3fb4d6(0x131)][_0x3fb4d6(0x27b)](0x0)+'ms'+(_0x36d748[_0x3fb4d6(0x292)]?'\x20'+_0x36d748[_0x3fb4d6(0x292)]:'')+')':''));(_0x512947||_0x29db70>=_0x903509)&&this[_0x3fb4d6(0x106)](_0x3fb4d6(0x2c8)+_0xf3582c+_0x3fb4d6(0x241)+_0x29db70[_0x3fb4d6(0x27b)](0x0)+_0x3fb4d6(0x1e5)+_0xab13a0[_0x3fb4d6(0x27b)](0x0)+_0x3fb4d6(0x24c)+_0x26500f[_0x3fb4d6(0x27b)](0x0)+_0x3fb4d6(0x1a1)+_0x1e4e0d['toFixed'](0x0)+'ms'+(_0x4cd05f['length']?_0x3fb4d6(0x104)+_0x4cd05f[_0x3fb4d6(0x265)]('\x20\x20'):''),{'feature':_0x3fb4d6(0x2c0)});if(this['_windowCbs'])for(const _0xe0d7c0 of this['_windowCbs']){try{_0xe0d7c0({'p99Ms':_0xab13a0,'maxMs':_0x29db70,'meanMs':_0x26500f,'reportMs':_0xf3582c});}catch{}}}[_0x2931ab(0x298)](){const _0x1e3000=_0x2931ab;if(this[_0x1e3000(0x116)])clearInterval(this[_0x1e3000(0x116)]);if(this['_h'])this['_h'][_0x1e3000(0x1b0)]();this[_0x1e3000(0x116)]=null,this['_h']=null,this[_0x1e3000(0x172)]=![];}}const _0xf56b53=new _0x5d06b5();if(_0xf56b53[_0x2931ab(0x2df)])_0xf56b53[_0x2931ab(0x2b7)]();return okdbLoopMonitor={'LOOP':_0xf56b53},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x45cf1a=require$$0$1,_0x646d19=require$$1;let _0x2aaa2d,_0xf0d1bd,_0x512264,_0x4dfa34,_0xcd6621,_0x8fbdf2,_0xd03a81,_0x3a19da=![];const _0x3578a2=new Set();let _0x2acfc2=null;const _0x513d7c=new Map();function _0xbd344b(){const _0x17215f=_0x23ad;if(_0x2aaa2d!==undefined)return _0x2aaa2d;_0x2aaa2d=process.env.OKDB_DIAG==='1';if(!_0x2aaa2d)return![];_0xf0d1bd=process.env.OKDB_DIAG_STACK==='1',_0x4dfa34=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x512264=new Array(_0x4dfa34),_0xcd6621=0x0,_0x8fbdf2=0x0,_0xd03a81=process.env.OKDB_DIAG_DIR||null;if(_0xd03a81)try{_0x45cf1a[_0x17215f(0x152)](_0xd03a81,{'recursive':!![]});}catch{}return!![];}function _0x450031(){return _0x2aaa2d===undefined?_0xbd344b():_0x2aaa2d;}function _0x4eba4a(_0x56066a,_0xa0b8e8){const _0x20768b=_0x23ad;if(_0x2aaa2d===undefined?!_0xbd344b():!_0x2aaa2d)return;let _0x48d353;if(_0xf0d1bd){const _0x5ec2be=new Error()['stack']||'';_0x48d353=_0x5ec2be[_0x20768b(0x181)]('\x0a')[_0x20768b(0x1e0)](0x3)['map'](_0x56bc48=>_0x56bc48[_0x20768b(0x218)]())[_0x20768b(0x1c6)](Boolean)[_0x20768b(0x1e0)](0x0,0x8);}_0x512264[_0xcd6621]={'seq':_0x8fbdf2++,'t':Date[_0x20768b(0x281)](),'env':_0x56066a,'kind':_0xa0b8e8||_0x20768b(0x28a),'stack':_0x48d353},_0xcd6621=(_0xcd6621+0x1)%_0x4dfa34;}function _0x57c9bf(_0x1add2f){const _0x304777=_0x23ad,_0xd222de=[];for(let _0xec3719=0x0;_0xec3719<_0x4dfa34;_0xec3719++){const _0x414d43=_0x512264[(_0xcd6621-0x1-_0xec3719+_0x4dfa34*0x2)%_0x4dfa34];if(!_0x414d43)continue;_0xd222de[_0x304777(0x242)](_0x414d43);if(_0xd222de[_0x304777(0x273)]>=_0x1add2f)break;}return _0xd222de;}function _0x480794(_0x373343){const _0x157306=_0x23ad;try{process[_0x157306(0x19d)][_0x157306(0x137)](_0x373343+'\x0a');}catch{}if(_0xd03a81)try{_0x45cf1a['appendFileSync'](_0x646d19['join'](_0xd03a81,'okdb-diag.'+process['pid']+'.log'),_0x373343+'\x0a');}catch{}}function _0x3839e1(_0x2c87f1){const _0x3bbca6=_0x23ad,_0x4658b8=_0x57c9bf(_0x2c87f1);if(!_0x4658b8[_0x3bbca6(0x273)])return _0x3bbca6(0x26b);const _0x3f67d0=Date[_0x3bbca6(0x281)]();return _0x4658b8[_0x3bbca6(0x188)](_0x3bc0ce=>{const _0x209dfc=_0x3bbca6,_0x44161c=_0x209dfc(0x2b6)+_0x3bc0ce[_0x209dfc(0x19f)]+'\x20-'+(_0x3f67d0-_0x3bc0ce['t'])+_0x209dfc(0x197)+_0x3bc0ce[_0x209dfc(0x27a)]+'\x20'+_0x3bc0ce[_0x209dfc(0x18a)];return _0x3bc0ce[_0x209dfc(0x2ce)]&&_0x3bc0ce[_0x209dfc(0x2ce)]['length']?_0x44161c+'\x0a\x20\x20\x20\x20\x20\x20'+_0x3bc0ce[_0x209dfc(0x2ce)][_0x209dfc(0x265)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x44161c;})[_0x3bbca6(0x265)]('\x0a');}function _0x5bc995(_0x26391f,_0x43c436){const _0x1cde3e=_0x23ad,_0x330416=_0x1cde3e(0xf5)+_0x26391f+_0x1cde3e(0x2e9)+new Date()[_0x1cde3e(0x1a9)]()+_0x1cde3e(0x117)+process[_0x1cde3e(0x2de)]+_0x1cde3e(0x18f),_0x5daf05=[_0x330416,_0x1cde3e(0xde)+(_0x43c436&&_0x43c436['stack']?_0x43c436[_0x1cde3e(0x2ce)][_0x1cde3e(0x181)]('\x0a')[0x0]:_0x43c436),'recent\x20writes\x20(newest\x20first)'+(_0xf0d1bd?'':_0x1cde3e(0x154))+':',_0x3839e1(0x18),_0x25db0b(),'='[_0x1cde3e(0x1be)](_0x330416[_0x1cde3e(0x273)]-0x1)];_0x480794(_0x5daf05['join']('\x0a'));}function _0x6c56ec(_0x502feb){const _0x2f9db7=_0x23ad;if(!_0x450031())return;const _0x2796c9=String(_0x502feb&&_0x502feb[_0x2f9db7(0xf9)]||_0x502feb||''),_0x584ea9=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x2f9db7(0x1fd)](_0x2796c9);_0x5bc995(_0x584ea9?_0x2f9db7(0x2ba):_0x2f9db7(0x266),_0x502feb);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x584ea9)return;try{console[_0x2f9db7(0x231)](_0x502feb&&_0x502feb[_0x2f9db7(0x2ce)]?_0x502feb[_0x2f9db7(0x2ce)]:_0x502feb);}catch{}process['exit'](0x1);}function _0x48eff7(_0x110bd4){const _0x41f3ec=_0x23ad;if(!_0x450031())return;const _0xdaae40=String(_0x110bd4&&_0x110bd4['message']||_0x110bd4||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0xdaae40)&&_0x5bc995(_0x41f3ec(0x189),_0x110bd4);}function _0x25db0b(){const _0x1c15e3=_0x23ad,_0x1848d0=[_0x1c15e3(0x10f)];let _0x80a65f=![];for(const _0x3ce420 of _0x3578a2){const _0x1ee3fe=_0x3ce420&&_0x3ce420['_envs'];if(!_0x1ee3fe)continue;for(const [_0x529ff8,_0x533716]of _0x1ee3fe){const _0xe99e30=_0x533716&&_0x533716[_0x1c15e3(0x246)]&&_0x533716[_0x1c15e3(0x246)]['view'];if(!_0xe99e30)continue;let _0x599e3c,_0x2f2509;try{_0x599e3c=Atomics[_0x1c15e3(0x26f)](_0xe99e30,0x0),_0x2f2509=Atomics[_0x1c15e3(0x26f)](_0xe99e30,0x1);}catch{continue;}if(_0x599e3c===0x0)continue;_0x80a65f=!![];const _0x2364b3=_0x599e3c>0x0?_0x1c15e3(0x22e):_0x1c15e3(0x13c),_0x3af1d9=Date[_0x1c15e3(0x281)]()-Math[_0x1c15e3(0x257)](_0x599e3c)*0x3e8,_0x1eb5a9=((()=>{const _0x30637f=_0x1c15e3;try{return _0x533716[_0x30637f(0x226)]&&_0x533716[_0x30637f(0x226)][_0x30637f(0x285)]?_0x533716['_writer'][_0x30637f(0x285)]():null;}catch{return null;}})());_0x1848d0['push'](_0x1c15e3(0xe8)+_0x529ff8+_0x1c15e3(0x19e)+_0x2364b3+'\x20drainAge='+_0x3af1d9+_0x1c15e3(0x12d)+_0x2f2509+(_0x1eb5a9?_0x1c15e3(0xdd)+_0x1eb5a9[_0x1c15e3(0x24a)]+_0x1c15e3(0x111)+_0x1eb5a9[_0x1c15e3(0x269)]+_0x1c15e3(0x2b4)+_0x1eb5a9[_0x1c15e3(0x280)]+'}':''));}}if(!_0x80a65f)_0x1848d0[_0x1c15e3(0x242)]('\x20\x20(no\x20env\x20draining)');return _0x1848d0[_0x1c15e3(0x265)]('\x0a');}function _0x5ea369(){const _0x3c3c02=_0x23ad;if(!_0x450031())return;const _0x2cd034=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x59154c=Date[_0x3c3c02(0x281)]();for(const _0x4e2db8 of _0x3578a2){const _0x1cc5d6=_0x4e2db8&&_0x4e2db8[_0x3c3c02(0x161)];if(!_0x1cc5d6)continue;for(const [_0x120305,_0x3d8d2b]of _0x1cc5d6){const _0x50d19d=_0x3d8d2b&&_0x3d8d2b[_0x3c3c02(0x246)]&&_0x3d8d2b[_0x3c3c02(0x246)][_0x3c3c02(0x288)];if(!_0x50d19d)continue;let _0x48f654;try{_0x48f654=Atomics[_0x3c3c02(0x26f)](_0x50d19d,0x0);}catch{continue;}const _0x33fb37=_0x4e2db8[_0x3c3c02(0x2d0)]+'|'+_0x120305;if(_0x48f654<=0x0){_0x513d7c[_0x3c3c02(0x102)](_0x33fb37);continue;}const _0x1ccbb0=_0x59154c-_0x48f654*0x3e8,_0x1817a2=_0x513d7c[_0x3c3c02(0x1bf)](_0x33fb37);if(_0x1ccbb0<_0x2cd034)continue;if(_0x1817a2&&_0x59154c-_0x1817a2[_0x3c3c02(0x173)]<_0x2cd034)continue;_0x513d7c[_0x3c3c02(0x296)](_0x33fb37,{'firstTs':_0x1817a2?_0x1817a2[_0x3c3c02(0x26c)]:_0x48f654,'dumpedAt':_0x59154c});const _0x1153ea=_0x3c3c02(0x1da)+_0x1ccbb0+_0x3c3c02(0xea)+_0x120305+_0x3c3c02(0x2e9)+new Date()[_0x3c3c02(0x1a9)]()+_0x3c3c02(0x117)+process[_0x3c3c02(0x2de)]+_0x3c3c02(0x18f);_0x480794([_0x1153ea,_0x25db0b(),'='[_0x3c3c02(0x1be)](_0x1153ea[_0x3c3c02(0x273)]-0x1)][_0x3c3c02(0x265)]('\x0a'));}}}function _0x9283b2(){const _0x60606f=_0x23ad;if(!_0x450031()||_0x3a19da)return;_0x3a19da=!![],process[_0x60606f(0x275)](_0x60606f(0x266),_0x6c56ec),process[_0x60606f(0x275)](_0x60606f(0x29c),_0x48eff7);const _0x204875=Math[_0x60606f(0x213)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x2acfc2=setInterval(_0x5ea369,_0x204875);if(_0x2acfc2[_0x60606f(0x1b8)])_0x2acfc2[_0x60606f(0x1b8)]();}function _0xe41b32(_0x510ed2){if(!_0x450031()||!_0x510ed2)return;_0x3578a2['add'](_0x510ed2),_0x9283b2();}function _0x50c9ff(_0x40c067){const _0x248d70=_0x23ad;_0x3578a2[_0x248d70(0x102)](_0x40c067);}function _0x1ad34e(){const _0x4508ed=_0x23ad;if(!_0x450031())return{'enabled':![],'hint':_0x4508ed(0x150)};return{'enabled':!![],'stackCapture':!!_0xf0d1bd,'recentWrites':_0x57c9bf(0x10),'drain':_0x25db0b()};}return okdbDiag={'isEnabled':_0x450031,'recordWrite':_0x4eba4a,'installDiag':_0x9283b2,'registerOkdb':_0xe41b32,'unregisterOkdb':_0x50c9ff,'snapshot':_0x1ad34e},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x5297ff=_0x22d7b4;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x5186b6}=require$$0$2,_0x34f69c=requireOkdbDiag(),_0x191309=process.env.OKDB_COMMIT_MODE===_0x5297ff(0x120);class _0x1d28fa{constructor(_0x414e53){const _0x5663ad=_0x5297ff;this[_0x5663ad(0x27a)]=_0x414e53,this[_0x5663ad(0x1c3)]=new Set(),this[_0x5663ad(0x2da)]=new Map(),this[_0x5663ad(0x11e)]=0x0,this[_0x5663ad(0x1ca)]=[],this['_done']=[],this[_0x5663ad(0x1f6)]=Math[_0x5663ad(0x213)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x5663ad(0x1ac)]=0x0,this[_0x5663ad(0xdf)]=[],this[_0x5663ad(0x220)]=0x0;}async[_0x5297ff(0x1df)](_0x5b0f08,_0xc0820f){const _0x16c168=_0x5297ff;if(_0x34f69c[_0x16c168(0x299)]())_0x34f69c[_0x16c168(0x1d7)](this[_0x16c168(0x27a)]?.[_0x16c168(0x2aa)],_0xc0820f);if(this[_0x16c168(0x11b)]){const _0x18a250=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x18a250['code']=_0x16c168(0x2c6);throw _0x18a250;}if(this[_0x16c168(0x1f6)]>0x0){let _0x324669=![];while(this[_0x16c168(0x1ac)]>=this['_highWater']&&!this['_closed']){!_0x324669&&(_0x324669=!![],this[_0x16c168(0x220)]++),await new Promise(_0x23c88b=>this[_0x16c168(0xdf)]['push'](_0x23c88b));}if(this[_0x16c168(0x11b)]){const _0x4de2db=new Error(_0x16c168(0x29f));_0x4de2db[_0x16c168(0x1d9)]=_0x16c168(0x2c6);throw _0x4de2db;}}this['_outstanding']++;const _0x257ac5=this[_0x16c168(0x27a)]['_coordinator'];if(_0x257ac5)await _0x257ac5[_0x16c168(0x2be)]();if(this[_0x16c168(0x11b)]){if(_0x257ac5)_0x257ac5[_0x16c168(0xe0)]();this[_0x16c168(0x1ac)]--;if(this[_0x16c168(0xdf)][_0x16c168(0x273)]&&this[_0x16c168(0x1ac)]<this[_0x16c168(0x1f6)])this[_0x16c168(0xdf)]['shift']()();const _0x2c8967=new Error(_0x16c168(0x29f));_0x2c8967['code']=_0x16c168(0x2c6);throw _0x2c8967;}const _0x3a5696=_0x5186b6[_0x16c168(0x281)]();if(_0x191309)try{const _0x36939d=this['env']['db'][_0x16c168(0x1d8)](_0x5b0f08);this[_0x16c168(0x11e)]++;if(this[_0x16c168(0x1ca)][_0x16c168(0x242)](_0x5186b6['now']()-_0x3a5696)>0x100)this[_0x16c168(0x1ca)][_0x16c168(0x221)]();if(this[_0x16c168(0x293)][_0x16c168(0x242)](_0x5186b6['now']())>0x800)this[_0x16c168(0x293)][_0x16c168(0x221)]();return _0x36939d;}finally{this[_0x16c168(0x1ac)]--;if(this['_bpWaiters']['length']&&this[_0x16c168(0x1ac)]<this[_0x16c168(0x1f6)])this[_0x16c168(0xdf)][_0x16c168(0x221)]()();if(_0x257ac5)_0x257ac5[_0x16c168(0xe0)]();}const _0x1bc5aa=this[_0x16c168(0x27a)]['db']['childTransaction'](_0x5b0f08);this[_0x16c168(0x1c3)]['add'](_0x1bc5aa),this['_enqueuedAt'][_0x16c168(0x296)](_0x1bc5aa,_0x3a5696);const _0x498f6b=()=>{const _0x1f10ba=_0x16c168;this[_0x1f10ba(0x1c3)]['delete'](_0x1bc5aa),this[_0x1f10ba(0x2da)]['delete'](_0x1bc5aa),this[_0x1f10ba(0x11e)]++,this[_0x1f10ba(0x1ac)]--;this['_bpWaiters'][_0x1f10ba(0x273)]&&this[_0x1f10ba(0x1ac)]<this[_0x1f10ba(0x1f6)]&&this[_0x1f10ba(0xdf)]['shift']()();if(this['_durs'][_0x1f10ba(0x242)](_0x5186b6['now']()-_0x3a5696)>0x100)this[_0x1f10ba(0x1ca)]['shift']();if(this[_0x1f10ba(0x293)][_0x1f10ba(0x242)](_0x5186b6[_0x1f10ba(0x281)]())>0x800)this[_0x1f10ba(0x293)][_0x1f10ba(0x221)]();};_0x1bc5aa['then'](_0x498f6b,_0x498f6b);try{return await _0x1bc5aa;}finally{if(_0x257ac5)_0x257ac5['afterWrite']();}}[_0x5297ff(0x285)](){const _0x3412ea=_0x5297ff,_0x4fcdcc=_0x5186b6[_0x3412ea(0x281)]();let _0x23da00=0x0;for(const _0x10f6d4 of this[_0x3412ea(0x2da)][_0x3412ea(0x1dd)]()){const _0x55a789=_0x4fcdcc-_0x10f6d4;if(_0x55a789>_0x23da00)_0x23da00=_0x55a789;}let _0x4365b2=0x0;for(let _0x26636f=this[_0x3412ea(0x293)][_0x3412ea(0x273)]-0x1;_0x26636f>=0x0;_0x26636f--){if(_0x4fcdcc-this[_0x3412ea(0x293)][_0x26636f]>0x3e8)break;_0x4365b2++;}let _0x5de5b2=0x0;if(this[_0x3412ea(0x1ca)]['length']){const _0x37940b=[...this[_0x3412ea(0x1ca)]][_0x3412ea(0x2eb)]((_0x8acf3,_0x4c8515)=>_0x8acf3-_0x4c8515);_0x5de5b2=_0x37940b[Math['min'](_0x37940b[_0x3412ea(0x273)]-0x1,Math[_0x3412ea(0x259)](_0x37940b[_0x3412ea(0x273)]*0.99))];}return{'depth':this[_0x3412ea(0x1c3)][_0x3412ea(0x1f9)],'oldestPendingMs':Math['round'](_0x23da00),'committed':this[_0x3412ea(0x11e)],'commitsPerSec':_0x4365b2,'commitP99Ms':Math[_0x3412ea(0x1b7)](_0x5de5b2),'parkedNow':this[_0x3412ea(0xdf)][_0x3412ea(0x273)],'parkedTotal':this[_0x3412ea(0x220)],'highWater':this[_0x3412ea(0x1f6)]};}[_0x5297ff(0x1e7)](){const _0x4a6450=_0x5297ff,_0x48e9b8=_0x5186b6['now']();return[...this[_0x4a6450(0x2da)]['values']()]['map'](_0x117b77=>Math['round'](_0x48e9b8-_0x117b77))['sort']((_0x1af56c,_0x4ccc18)=>_0x4ccc18-_0x1af56c);}[_0x5297ff(0x192)](){const _0x2cc576=_0x5297ff;this[_0x2cc576(0x11b)]=!![];for(const _0x2328a6 of this[_0x2cc576(0xdf)][_0x2cc576(0x2d7)](0x0))_0x2328a6();}async['drain'](){const _0x55c0e2=_0x5297ff;let _0x1128e0=0x0;while(this['_inflight'][_0x55c0e2(0x1f9)]&&_0x1128e0++<0x3e8){await Promise['allSettled']([...this['_inflight']]);}}async[_0x5297ff(0x126)](_0x178a8f,_0x157c08,_0x38215c,_0x5a92d4){const _0x1deb9a=_0x5297ff;return this[_0x1deb9a(0x1df)](()=>{const _0x26297b=_0x1deb9a;if(_0x5a92d4===undefined)_0x178a8f[_0x26297b(0xe2)](_0x157c08,_0x38215c);else _0x178a8f[_0x26297b(0xe2)](_0x157c08,_0x38215c,_0x5a92d4);},_0x1deb9a(0x146));}async[_0x5297ff(0x17d)](_0x4cf5fe,_0x571efc){const _0x39b9a1=_0x5297ff;return this[_0x39b9a1(0x1df)](()=>_0x4cf5fe[_0x39b9a1(0x1ef)](_0x571efc),_0x39b9a1(0x277));}}async function _0xd0e818(_0x8bec01,_0x4a60b5){const _0x3ee11b=_0x5297ff;if(_0x4a60b5==null)_0x4a60b5=Math[_0x3ee11b(0x213)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x519a48=_0x8bec01?.[_0x3ee11b(0x245)];if(!_0x519a48||typeof _0x519a48[_0x3ee11b(0x2a1)]!==_0x3ee11b(0x156))return;await Promise[_0x3ee11b(0x208)]([Promise[_0x3ee11b(0x247)](_0x519a48)[_0x3ee11b(0x2cd)](()=>{}),new Promise(_0x5f1c3c=>{const _0x26c60c=_0x3ee11b,_0x37ab55=setTimeout(_0x5f1c3c,_0x4a60b5);if(_0x37ab55[_0x26c60c(0x1b8)])_0x37ab55[_0x26c60c(0x1b8)]();})]);}catch{}}function _0x38cf86(_0x5b8ec6){const _0x16c700=_0x5297ff;if(_0x191309)return Promise['resolve']();const _0x229dbe=_0x5b8ec6?.[_0x16c700(0x21a)];return _0x229dbe&&typeof _0x229dbe[_0x16c700(0x2a1)]==='function'?_0x229dbe:Promise[_0x16c700(0x247)]();}return okdbWriter[_0x5297ff(0xfb)]=_0x1d28fa,okdbWriter[_0x5297ff(0xfb)][_0x5297ff(0x2e7)]=_0xd0e818,okdbWriter['exports'][_0x5297ff(0x21a)]=_0x38cf86,okdbWriter[_0x5297ff(0xfb)][_0x5297ff(0x183)]=_0x191309,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x2f564a=_0x22d7b4;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x39dcdf=require$$0$3,{SYNC_COMMITS:_0x519f42}=requireOkdbWriter(),_0x3d6189=_0x2f564a(0xf2);class _0x4d80e0{constructor(_0x3b32ce,_0xaec81f,_0x2d5180){const _0x3ec9e5=_0x2f564a;this['_lock']=_0x3b32ce,this[_0x3ec9e5(0x1f3)]=_0xaec81f,this[_0x3ec9e5(0x228)]=_0x2d5180,this['_released']=![],this['_heartbeatTimer']=null,this[_0x3ec9e5(0x13f)]=null;}['isHeld'](){const _0x49762e=_0x2f564a;if(this[_0x49762e(0xdc)])return![];try{const _0x30b2e9=this[_0x49762e(0x18b)][_0x49762e(0x250)]()[_0x49762e(0x1bf)](this[_0x49762e(0x1f3)]);if(!_0x30b2e9||_0x30b2e9['acquiredAt']!==this[_0x49762e(0x228)])return![];const _0x35fd6c=_0x30b2e9[_0x49762e(0xd2)]??_0x30b2e9[_0x49762e(0x18c)];if(_0x35fd6c+_0x30b2e9[_0x49762e(0x289)]<Date[_0x49762e(0x281)]())return![];return!![];}catch{return!this[_0x49762e(0xdc)];}}[_0x2f564a(0x2a6)](){const _0x2cf02a=_0x2f564a;if(this[_0x2cf02a(0xdc)])return null;try{return this[_0x2cf02a(0x18b)][_0x2cf02a(0x250)]()['get'](this[_0x2cf02a(0x1f3)])??null;}catch{return null;}}async[_0x2f564a(0x15a)](_0x265a57){const _0x4bb390=_0x2f564a;if(this[_0x4bb390(0xdc)])return;try{const _0x35356b=this[_0x4bb390(0x18b)][_0x4bb390(0x250)]()[_0x4bb390(0x1bf)](this[_0x4bb390(0x1f3)]);if(!_0x35356b||_0x35356b['acquiredAt']!==this['_acquiredAt'])return;if(_0x519f42)this['_lock'][_0x4bb390(0x250)]()[_0x4bb390(0xe2)](this[_0x4bb390(0x1f3)],{..._0x35356b,'ttlMs':_0x35356b[_0x4bb390(0x289)]+_0x265a57});else await this['_lock'][_0x4bb390(0x250)]()[_0x4bb390(0x126)](this[_0x4bb390(0x1f3)],{..._0x35356b,'ttlMs':_0x35356b['ttlMs']+_0x265a57});}catch{}}async[_0x2f564a(0x185)](){const _0x1c63ee=_0x2f564a;if(this['_released'])return;if(this[_0x1c63ee(0x13f)])try{await this[_0x1c63ee(0x13f)];}catch{}clearInterval(this['_heartbeatTimer']),this[_0x1c63ee(0x114)]=null,this[_0x1c63ee(0xdc)]=!![];try{const _0x5f5b48=this[_0x1c63ee(0x18b)][_0x1c63ee(0x250)]()[_0x1c63ee(0x1bf)](this['_key']);if(_0x5f5b48&&_0x5f5b48[_0x1c63ee(0x18c)]===this[_0x1c63ee(0x228)]){if(_0x519f42)this[_0x1c63ee(0x18b)]['_db']()[_0x1c63ee(0x1ef)](this[_0x1c63ee(0x1f3)]);else await this['_lock']['_db']()[_0x1c63ee(0x17d)](this[_0x1c63ee(0x1f3)]);}}catch{}}['_startHeartbeat'](_0xde546f,_0x10b21d){const _0x97700f=_0x2f564a,_0x4ccd20=_0x10b21d??Math[_0x97700f(0x259)](_0xde546f/0x3);this[_0x97700f(0x114)]=setInterval(()=>{const _0x2cea5f=_0x97700f;if(this[_0x2cea5f(0xdc)])return;this['_heartbeatInFlight']=((async()=>{const _0x1f6973=_0x2cea5f;try{const _0x368001=this[_0x1f6973(0x18b)][_0x1f6973(0x250)]()[_0x1f6973(0x1bf)](this[_0x1f6973(0x1f3)]);if(!_0x368001||_0x368001[_0x1f6973(0x18c)]!==this['_acquiredAt']){this['_released']=!![],clearInterval(this[_0x1f6973(0x114)]),this[_0x1f6973(0x114)]=null;return;}if(_0x519f42)this[_0x1f6973(0x18b)]['_db']()[_0x1f6973(0xe2)](this[_0x1f6973(0x1f3)],{..._0x368001,'updatedAt':Date[_0x1f6973(0x281)]()});else await this['_lock'][_0x1f6973(0x250)]()['put'](this[_0x1f6973(0x1f3)],{..._0x368001,'updatedAt':Date[_0x1f6973(0x281)]()});}catch{}this[_0x1f6973(0x13f)]=null;})());},_0x4ccd20);if(this[_0x97700f(0x114)][_0x97700f(0x1b8)])this['_heartbeatTimer'][_0x97700f(0x1b8)]();}}class _0x996d2a{constructor(_0x1ed1b0,{namespace:_0x37543b,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x4d9dea=_0x2f564a;this[_0x4d9dea(0x1db)]=_0x1ed1b0,this[_0x4d9dea(0xf7)]=_0x37543b,this['ttlMs']=ttlMs,this[_0x4d9dea(0x2e0)]=heartbeatMs,this['_lockDb']=null;}[_0x2f564a(0x250)](){const _0x43c48e=_0x2f564a;return!this[_0x43c48e(0x2f1)]&&(this[_0x43c48e(0x2f1)]=this[_0x43c48e(0x1db)][_0x43c48e(0x2ca)](_0x3d6189,{'dupSort':![]})),this[_0x43c48e(0x2f1)];}['_wantDb'](){const _0x490696=_0x2f564a;return!this[_0x490696(0x23b)]&&(this[_0x490696(0x23b)]=this[_0x490696(0x1db)][_0x490696(0x2ca)](_0x3d6189+_0x490696(0x22f),{'dupSort':![]})),this[_0x490696(0x23b)];}[_0x2f564a(0x1f3)](_0x1cc92c){const _0x2f24ac=_0x2f564a;return this[_0x2f24ac(0xf7)]+':'+_0x1cc92c;}[_0x2f564a(0x1f2)](_0x1c14ee){const _0x4ab296=_0x2f564a;try{_0x519f42?this['_wantDb']()[_0x4ab296(0xe2)](this[_0x4ab296(0x1f3)](_0x1c14ee),Date[_0x4ab296(0x281)]()):this[_0x4ab296(0xca)]()['put'](this['_key'](_0x1c14ee),Date[_0x4ab296(0x281)]())?.[_0x4ab296(0x2cd)]?.(()=>{});}catch{}}[_0x2f564a(0x16a)](_0x4e49dc,_0x3eb9c1=0x3e8){const _0x5a82cd=_0x2f564a;try{const _0x5cb38b=this[_0x5a82cd(0xca)]()[_0x5a82cd(0x1bf)](this[_0x5a82cd(0x1f3)](_0x4e49dc));return typeof _0x5cb38b===_0x5a82cd(0x253)&&Date[_0x5a82cd(0x281)]()-_0x5cb38b<_0x3eb9c1;}catch{return![];}}[_0x2f564a(0x198)](_0x1f83c4){const _0x3094b8=_0x2f564a,_0x1e419e=_0x1f83c4[_0x3094b8(0xd2)]??_0x1f83c4[_0x3094b8(0x18c)];return _0x1e419e+_0x1f83c4['ttlMs']<Date[_0x3094b8(0x281)]();}static['_holderDead'](_0x47cf66){const _0x4b93b7=_0x2f564a,_0x7a5997=_0x47cf66?.['holder'];if(!_0x7a5997||typeof _0x7a5997[_0x4b93b7(0x2de)]!==_0x4b93b7(0x253))return![];if(_0x7a5997['hostname']!==_0x39dcdf[_0x4b93b7(0x217)]())return![];if(_0x7a5997[_0x4b93b7(0x2de)]===process[_0x4b93b7(0x2de)])return![];try{return process[_0x4b93b7(0x15b)](_0x7a5997['pid'],0x0),![];}catch(_0x1fec5b){return _0x1fec5b[_0x4b93b7(0x1d9)]===_0x4b93b7(0xeb);}}async[_0x2f564a(0x2cf)](_0x2e2efe,_0x443647={},_0x1e4d8a={}){const _0x26e0bd=_0x2f564a,_0x5ab990=this[_0x26e0bd(0x1f3)](_0x2e2efe),_0x7e942e=_0x1e4d8a[_0x26e0bd(0x289)]??this[_0x26e0bd(0x289)],_0x381ae0=Date['now'](),_0x154535={'holder':{'pid':process[_0x26e0bd(0x2de)],'hostname':_0x39dcdf[_0x26e0bd(0x217)](),..._0x443647},'acquiredAt':_0x381ae0,'updatedAt':_0x381ae0,'ttlMs':_0x7e942e};let _0x5dda0d=![],_0x56b06b=null;try{const _0x115e1b=()=>{const _0x295fbe=_0x26e0bd,_0x26590b=this[_0x295fbe(0x250)]()[_0x295fbe(0x1bf)](_0x5ab990);if(_0x26590b&&!this['_isStale'](_0x26590b)&&!_0x996d2a[_0x295fbe(0x274)](_0x26590b)){const _0x392b04=_0x443647['processorId']!=null&&_0x26590b[_0x295fbe(0x2a6)][_0x295fbe(0x2de)]===process[_0x295fbe(0x2de)]&&_0x26590b[_0x295fbe(0x2a6)][_0x295fbe(0x17a)]===_0x443647[_0x295fbe(0x17a)];if(!_0x392b04){_0x5dda0d=![],_0x56b06b=_0x26590b;return;}_0x154535[_0x295fbe(0x18c)]<=_0x26590b[_0x295fbe(0x18c)]&&(_0x154535[_0x295fbe(0x18c)]=_0x26590b['acquiredAt']+0x1,_0x154535[_0x295fbe(0xd2)]=_0x154535[_0x295fbe(0x18c)]);}this['_db']()['put'](_0x5ab990,_0x154535),_0x5dda0d=!![],_0x56b06b=_0x154535;};if(_0x519f42)this['_db']()[_0x26e0bd(0x1d8)](_0x115e1b);else await this[_0x26e0bd(0x250)]()['childTransaction'](_0x115e1b);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x5dda0d)return{'acquired':![],'handle':null,'current':_0x56b06b};const _0x4b8fd0=new _0x4d80e0(this,_0x5ab990,_0x154535[_0x26e0bd(0x18c)]);return _0x4b8fd0[_0x26e0bd(0x1a6)](_0x7e942e,this[_0x26e0bd(0x2e0)]),{'acquired':!![],'handle':_0x4b8fd0,'current':_0x56b06b};}[_0x2f564a(0x1f8)](_0x30e2fe){const _0x159fb0=_0x2f564a;try{return this[_0x159fb0(0x250)]()['get'](this[_0x159fb0(0x1f3)](_0x30e2fe))??null;}catch{return null;}}[_0x2f564a(0x215)](){const _0x22c0f3=_0x2f564a,_0x27318c=this[_0x22c0f3(0xf7)]+':',_0x1cb248=[];try{for(const {key:_0x4a3ef7,value:_0x41b487}of this[_0x22c0f3(0x250)]()[_0x22c0f3(0x26a)]({'start':_0x27318c,'end':_0x27318c+'ÿ'})){typeof _0x4a3ef7==='string'&&_0x4a3ef7[_0x22c0f3(0x165)](_0x27318c)&&_0x1cb248[_0x22c0f3(0x242)]({'id':_0x4a3ef7['slice'](_0x27318c[_0x22c0f3(0x273)]),'entry':_0x41b487});}}catch{}return _0x1cb248;}static[_0x2f564a(0x227)](_0x23f9de){const _0x3f1695=_0x2f564a,_0x24e7ac=[];try{const _0x5564fb=_0x23f9de[_0x3f1695(0x2ca)](_0x3d6189,{'dupSort':![]});for(const {key:_0x516bbb,value:_0x2b3c85}of _0x5564fb[_0x3f1695(0x26a)]({})){if(typeof _0x516bbb!==_0x3f1695(0x238))continue;const _0x174d1c=_0x516bbb[_0x3f1695(0x20b)](':');if(_0x174d1c<0x1)continue;_0x24e7ac[_0x3f1695(0x242)]({'namespace':_0x516bbb['slice'](0x0,_0x174d1c),'id':_0x516bbb[_0x3f1695(0x1e0)](_0x174d1c+0x1),'entry':_0x2b3c85});}}catch{}return _0x24e7ac;}}return okdbLock={'OKDBLock':_0x996d2a},okdbLock;}function _0x23ad(_0x36b5ef,_0x1223cf){_0x36b5ef=_0x36b5ef-0xc1;const _0xd49bb5=_0xd49b();let _0x23ad8a=_0xd49bb5[_0x36b5ef];return _0x23ad8a;}var version=_0x22d7b4(0xc7),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x7e59cb=_0x22d7b4;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x35c0b3=require$$0$3,_0x2dce24=require$$1$1,_0xc06fd=require$$2,{LOOP:_0x3c3950}=requireOkdbLoopMonitor(),{OKDBLock:_0x1c02f9}=requireOkdbLock(),{SYNC_COMMITS:_0x491529}=requireOkdbWriter(),_0x532f67=_0x7e59cb(0xf4),_0x1a2a79=_0x7e59cb(0x25d),_0x5cc13b=_0x7e59cb(0x1ae),_0x6ff6ec=_0x7e59cb(0x12e),_0x467e6e=(_0xa14041,_0x34afd1)=>_0xa14041+':'+_0x34afd1,_0x3a0ecf=(_0x4d2ad2,_0x3b422c)=>_0x4d2ad2+'::'+_0x3b422c,_0x300894=(_0x23a7b3,_0x1c9ae6)=>_0x23a7b3+'/'+_0x1c9ae6,_0x1f463e=(_0x2c6a5a,_0x30dbb9)=>_0x2c6a5a+'#'+_0x30dbb9,_0x346692=_0x450c90=>{const _0x5fbd52=_0x7e59cb;if(_0x450c90?.['processKey'])return _0x450c90['processKey'];const _0x19fff7=_0x450c90?.[_0x5fbd52(0x2ed)];return typeof _0x19fff7==='string'&&_0x19fff7[_0x5fbd52(0x1fa)]('#')?_0x19fff7[_0x5fbd52(0x1e0)](0x0,_0x19fff7['indexOf']('#')):_0x19fff7;},_0x4960b3=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1c3d4a=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x394c48=_0x4960b3*0x3,_0x412fba=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x7e59cb(0x213)](0x927c0,_0x394c48*0x14),_0x4383ca=[_0x7e59cb(0x1af),_0x7e59cb(0x201),'processor:retry',_0x7e59cb(0x1c1),_0x7e59cb(0x1c4),_0x7e59cb(0xc4)];let _0x3525aa=null;function _0x1ca0cd(){const _0x53be32=_0x7e59cb;if(_0x3525aa==null)_0x3525aa=Math['round']((Date[_0x53be32(0x281)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x3525aa;}function _0xcc725e(_0xe45bd7){const _0x135205=_0x7e59cb;if(process.env.OKDB_PROCESS_KILL===_0x135205(0x232))return![];if(_0xe45bd7?.[_0x135205(0x1fe)]?.[_0x135205(0x20e)]&&typeof _0xe45bd7[_0x135205(0x1fe)][_0x135205(0x20e)]===_0x135205(0x29e)&&_0xe45bd7[_0x135205(0x1fe)][_0x135205(0x20e)][_0x135205(0x15b)]===![])return![];return!![];}function _0x22c756(_0x3076d8,_0x35fa31){const _0x39eecd=_0x7e59cb,_0x412685=!!_0x35fa31?.[_0x39eecd(0xed)];switch(_0x3076d8){case _0x39eecd(0x237):return{'controllable':_0x412685,'decommissionable':![],'killable':!![],'killConfirm':_0x39eecd(0x162)};case'cli':case _0x39eecd(0x170):return{'controllable':_0x412685,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x39eecd(0x1a7):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x39eecd(0xc9):case'fn-runner':case _0x39eecd(0xfa):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x573e35{constructor(_0x23e531){const _0x594abb=_0x7e59cb;this[_0x594abb(0x13d)]=_0x23e531,this[_0x594abb(0xf3)]=null,this['_desired']=null,this[_0x594abb(0xd5)]=new Map(),this['_cmd']=null,this[_0x594abb(0x2d8)]=![],this[_0x594abb(0x195)]=![],this[_0x594abb(0x199)]=_0x1ca0cd(),this['_selfKey']=_0x467e6e(process['pid'],this[_0x594abb(0x199)]),this['_instanceId']=_0xc06fd[_0x594abb(0x14f)]()[_0x594abb(0x1e0)](0x0,0x8),this['_rowKey']=_0x1f463e(this[_0x594abb(0xd1)],this['_instanceId']),this[_0x594abb(0x121)]=Date[_0x594abb(0x281)](),this[_0x594abb(0x25f)]=null,this[_0x594abb(0x17c)]=null,this[_0x594abb(0x21f)]=null,this[_0x594abb(0x222)]=null,this[_0x594abb(0x2b9)]=null,this[_0x594abb(0x25c)]=null,this[_0x594abb(0x2bf)]=0x0,this[_0x594abb(0x1cb)]={},this[_0x594abb(0x15c)]=new Map(),this[_0x594abb(0x2a7)]=process['cpuUsage'](),this[_0x594abb(0x1a5)]=Date[_0x594abb(0x281)](),this[_0x594abb(0x107)]=0x0,this[_0x594abb(0x17f)]=new Map();}get[_0x7e59cb(0x1e2)](){const _0x4f7d95=_0x7e59cb;return this[_0x4f7d95(0xd1)];}get[_0x7e59cb(0x200)](){const _0x2939b1=_0x7e59cb;return this[_0x2939b1(0xcf)];}['_caps'](_0x14d461,_0x362606){const _0x28fd0f=_0x7e59cb,_0x388bc2=_0x22c756(_0x14d461,_0x362606);if(_0x388bc2[_0x28fd0f(0x132)]&&!_0xcc725e(this[_0x28fd0f(0x13d)]))return{..._0x388bc2,'killable':![],'killConfirm':undefined};return _0x388bc2;}[_0x7e59cb(0x260)](){const _0x5bbd6a=_0x7e59cb;return!!this[_0x5bbd6a(0xf3)];}[_0x7e59cb(0x2e3)](_0x163918){Object['assign'](this['_ownMeta'],_0x163918||{});}[_0x7e59cb(0x2ee)](_0x2a3c88){if(_0x2a3c88)this['_listenAddr']=_0x2a3c88;}[_0x7e59cb(0x203)](_0x212118={}){const _0x322718=_0x7e59cb;return this[_0x322718(0x13d)][_0x322718(0x1ba)](_0x212118);}[_0x7e59cb(0x134)](){const _0x5d8532=_0x7e59cb,_0x4b39c9={};let _0x597762=0x0,_0x2debc7=0x0;const _0x1a5b19=new Set();for(const _0x460e99 of this[_0x5d8532(0x1e9)]()){_0x2debc7++;const _0x3faa7d=_0x460e99['processing'];if(!_0x3faa7d)continue;if(_0x3faa7d['participate'])_0x597762++;for(const _0xf603b6 of _0x3faa7d['processors']||[]){if(![_0x5d8532(0x271),_0x5d8532(0x2ad)][_0x5d8532(0x1fa)](_0xf603b6[_0x5d8532(0x23c)]))continue;(_0xf603b6[_0x5d8532(0x211)]==='online'||_0xf603b6['state']==='building')&&_0xf603b6[_0x5d8532(0x164)]&&_0x1a5b19[_0x5d8532(0x145)]((_0xf603b6[_0x5d8532(0x27a)]||_0x5d8532(0x2b0))+':'+_0xf603b6[_0x5d8532(0x164)]);const _0x355efb=_0xf603b6[_0x5d8532(0x27a)]||'default';(_0x4b39c9[_0x355efb]||=[])[_0x5d8532(0x242)]({..._0xf603b6,'env':_0x355efb,'owner':{'pid':_0x460e99[_0x5d8532(0x2de)]??null,'kind':_0x460e99[_0x5d8532(0x18a)]??null}});}}for(const [_0x1f9cae,_0x18dd4c]of Object[_0x5d8532(0x2e5)](_0x4b39c9)){for(const _0x5036b9 of _0x18dd4c){if(_0x5036b9[_0x5d8532(0x23c)]==='single'&&!_0x5036b9[_0x5d8532(0x2c9)]){const _0x1f2f85=_0x1f9cae+':'+(_0x5036b9['cursorKey']??'');if(!_0x1a5b19[_0x5d8532(0x254)](_0x1f2f85))_0x5036b9[_0x5d8532(0x180)]=!![];}}}return{'envs':_0x4b39c9,'policy':null,'participation':{'participating':_0x597762,'total':_0x2debc7},'source':'workers'};}[_0x7e59cb(0x138)](){const _0x4008dc=_0x7e59cb,_0x12cd5a=_0xca3e8f=>{const _0x46f18a=_0x23ad;if(_0xca3e8f[_0x46f18a(0x211)]===_0x46f18a(0x1c0)||_0xca3e8f[_0x46f18a(0x211)]===_0x46f18a(0x278)||_0xca3e8f[_0x46f18a(0x211)]===_0x46f18a(0x231))return 0x3;if(_0xca3e8f[_0x46f18a(0x2c9)])return 0x1;return 0x2;},_0x5586bd=new Map();for(const _0xa3b91e of this['listNodes']()){for(const _0x571139 of _0xa3b91e[_0x4008dc(0x1bb)]?.[_0x4008dc(0xed)]||[]){const _0x39ba3d={..._0x571139,'owner':{'pid':_0xa3b91e[_0x4008dc(0x2de)]??null,'kind':_0xa3b91e[_0x4008dc(0x18a)]??null,'host':_0xa3b91e[_0x4008dc(0x1d5)]??null}},_0x4722a8=_0x571139[_0x4008dc(0x23c)]===_0x4008dc(0x271)?'1ofN:'+(_0x571139[_0x4008dc(0x27a)]??'')+'::'+(_0x571139[_0x4008dc(0x164)]??_0x571139['type']??_0x571139['id']):_0x4008dc(0x234)+(_0xa3b91e[_0x4008dc(0x2ed)]??_0xa3b91e[_0x4008dc(0x22b)]??'')+'::'+(_0x571139['env']??'')+'::'+_0x571139['id'],_0x5a6d7a=_0x5586bd['get'](_0x4722a8);if(!_0x5a6d7a||_0x12cd5a(_0x39ba3d)>_0x12cd5a(_0x5a6d7a))_0x5586bd['set'](_0x4722a8,_0x39ba3d);}}return[..._0x5586bd[_0x4008dc(0x1dd)]()];}['clusterStatusView'](){const _0x3fd594=_0x7e59cb,_0x3f0dc7=Date[_0x3fd594(0x281)](),_0x2958bf=this[_0x3fd594(0x1e9)](),_0x43687a=_0xf8f0fb=>Math[_0x3fd594(0x213)](0x0,Math['round']((_0x3f0dc7-(_0xf8f0fb[_0x3fd594(0x148)]||_0x3f0dc7))/0x3e8)),_0x67cae2=_0x2958bf[_0x3fd594(0x18e)](_0x4c35d6=>_0x4c35d6['kind']===_0x3fd594(0x237)),_0x56b2ea=_0x2958bf[_0x3fd594(0x1c6)](_0x3fe88f=>_0x3fe88f[_0x3fd594(0x18a)]===_0x3fd594(0x13a));if(_0x67cae2||_0x56b2ea[_0x3fd594(0x273)])return{'primary':_0x67cae2?{'pid':_0x67cae2[_0x3fd594(0x2de)],'uptime':_0x43687a(_0x67cae2)}:null,'workers':_0x56b2ea[_0x3fd594(0x188)](_0x5c6c2d=>({'pid':_0x5c6c2d[_0x3fd594(0x2de)],'uptime':_0x43687a(_0x5c6c2d)})),'workersConfigured':_0x67cae2?.[_0x3fd594(0x14e)]?.[_0x3fd594(0x12c)]??_0x56b2ea[_0x3fd594(0x273)],'mode':'cluster'};const _0x5ef8bb=_0x2958bf[_0x3fd594(0x18e)](_0x5bb6f1=>_0x5bb6f1[_0x3fd594(0x18a)]===_0x3fd594(0x12b)||_0x5bb6f1['kind']===_0x3fd594(0x170)||_0x5bb6f1['kind']==='embedded'),_0x2b4d01=_0x5ef8bb?{'pid':_0x5ef8bb[_0x3fd594(0x2de)],'uptime':_0x43687a(_0x5ef8bb)}:{'pid':process[_0x3fd594(0x2de)],'uptime':Math[_0x3fd594(0x213)](0x0,Math['round'](process[_0x3fd594(0x169)]()))};return{'primary':_0x2b4d01,'workers':[_0x2b4d01],'workersConfigured':0x1,'mode':_0x3fd594(0x271)};}['nodesView'](){const _0x552323=_0x7e59cb;return this[_0x552323(0x1ad)]();}[_0x7e59cb(0x2bb)](){const _0x7442d4=_0x7e59cb,_0x40463e=new Map();for(const _0x2bb7b8 of this[_0x7442d4(0x1ad)]())_0x40463e[_0x7442d4(0x296)](_0x2bb7b8[_0x7442d4(0x22b)],{..._0x2bb7b8,'children':[]});const _0x422663=[];for(const _0x134932 of _0x40463e['values']()){const _0x1bd64e=_0x134932['supervisorKey']?_0x40463e[_0x7442d4(0x1bf)](_0x134932[_0x7442d4(0x1e4)]):null;if(_0x1bd64e&&_0x1bd64e!==_0x134932)_0x1bd64e[_0x7442d4(0x224)][_0x7442d4(0x242)](_0x134932);else _0x422663[_0x7442d4(0x242)](_0x134932);}const _0x4eab2e=(_0x2b7830,_0x12e2f1)=>_0x2b7830[_0x7442d4(0x18a)]===_0x12e2f1['kind']?(_0x2b7830[_0x7442d4(0x2de)]||0x0)-(_0x12e2f1[_0x7442d4(0x2de)]||0x0):(_0x2b7830[_0x7442d4(0x18a)]??'')<(_0x12e2f1['kind']??'')?-0x1:0x1,_0x142c4d=_0x4f81ed=>{const _0x35d379=_0x7442d4;_0x4f81ed['sort'](_0x4eab2e);for(const _0x545ff1 of _0x4f81ed)if(_0x545ff1[_0x35d379(0x224)]['length'])_0x142c4d(_0x545ff1[_0x35d379(0x224)]);};return _0x142c4d(_0x422663),_0x422663;}['getProcess'](_0x34582f){const _0x34ed96=_0x7e59cb;return this[_0x34ed96(0x1ad)]()[_0x34ed96(0x18e)](_0x2a0fc9=>_0x2a0fc9[_0x34ed96(0x22b)]===_0x34582f)??null;}[_0x7e59cb(0x1ad)](_0x3d7764=Date['now']()){const _0x352921=_0x7e59cb,_0x271c73=new Map();for(const _0x4c7aff of this[_0x352921(0x1e9)]()){const _0x1e9d9a=_0x346692(_0x4c7aff);let _0x58a22d=_0x271c73[_0x352921(0x1bf)](_0x1e9d9a);!_0x58a22d&&(_0x58a22d={'processKey':_0x1e9d9a,'nodeKey':_0x1e9d9a,'pid':_0x4c7aff[_0x352921(0x2de)],'ppid':_0x4c7aff['ppid']??null,'host':_0x4c7aff[_0x352921(0x1d5)]??null,'kind':_0x4c7aff[_0x352921(0x18a)],'role':null,'supervisorKey':_0x4c7aff[_0x352921(0x1e4)]??null,'slot':_0x4c7aff[_0x352921(0xef)]??null,'slotKey':_0x4c7aff[_0x352921(0x174)]??null,'caps':_0x4c7aff[_0x352921(0x1c9)]??null,'lifecycle':_0x4c7aff[_0x352921(0x125)]??null,'uptime':Math[_0x352921(0x213)](0x0,Math[_0x352921(0x1b7)]((_0x3d7764-(_0x4c7aff[_0x352921(0x148)]||_0x3d7764))/0x3e8)),'startedAt':_0x4c7aff[_0x352921(0x148)]??null,'meta':_0x4c7aff['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x271c73[_0x352921(0x296)](_0x1e9d9a,_0x58a22d));_0x58a22d[_0x352921(0x1cd)][_0x352921(0x242)]({'instanceId':_0x4c7aff[_0x352921(0x13b)]??null,'role':_0x4c7aff['role']??null,'listenAddr':_0x4c7aff[_0x352921(0x248)]??null,'lifecycle':_0x4c7aff[_0x352921(0x125)]??null,'processing':_0x4c7aff['processing']??null});if(!_0x58a22d['role']&&_0x4c7aff['role'])_0x58a22d['role']=_0x4c7aff[_0x352921(0x2b8)];if(!_0x58a22d[_0x352921(0x248)]&&_0x4c7aff[_0x352921(0x248)])_0x58a22d[_0x352921(0x248)]=_0x4c7aff[_0x352921(0x248)];if(!_0x58a22d[_0x352921(0x1bb)]&&_0x4c7aff['processing'])_0x58a22d['processing']=_0x4c7aff[_0x352921(0x1bb)];if(!_0x58a22d[_0x352921(0xf8)]&&_0x4c7aff['engines'])_0x58a22d['engines']=_0x4c7aff[_0x352921(0xf8)];if(!_0x58a22d[_0x352921(0x2a8)]&&_0x4c7aff['singletonClaims'])_0x58a22d[_0x352921(0x2a8)]=_0x4c7aff[_0x352921(0x2a8)];if(_0x58a22d[_0x352921(0x1c9)]==null&&_0x4c7aff[_0x352921(0x1c9)])_0x58a22d['caps']=_0x4c7aff['caps'];if(_0x4c7aff['stats']&&(!_0x58a22d[_0x352921(0x14b)]||(_0x4c7aff[_0x352921(0x14b)]['at']??0x0)>(_0x58a22d['stats']['at']??0x0)))_0x58a22d[_0x352921(0x14b)]=_0x4c7aff['stats'];}return[..._0x271c73[_0x352921(0x1dd)]()];}['runtimeProcessesView'](){const _0x28c9ea=_0x7e59cb,_0x2c4901=[],_0x5b6448={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x4fe2f5 of this[_0x28c9ea(0x1ad)]()){_0x2c4901['push']({'processKey':_0x4fe2f5[_0x28c9ea(0x22b)],'kind':_0x4fe2f5[_0x28c9ea(0x18a)],'pid':_0x4fe2f5[_0x28c9ea(0x2de)],'supervisorKey':_0x4fe2f5[_0x28c9ea(0x1e4)],'meta':_0x4fe2f5[_0x28c9ea(0x14e)]??null,'uptime':_0x4fe2f5['uptime'],'stats':_0x4fe2f5[_0x28c9ea(0x14b)]??null}),_0x5b6448[_0x28c9ea(0x20e)]++;if(_0x4fe2f5[_0x28c9ea(0x14b)]){_0x5b6448[_0x28c9ea(0x16e)]+=_0x4fe2f5[_0x28c9ea(0x14b)][_0x28c9ea(0x16e)]||0x0,_0x5b6448[_0x28c9ea(0xd4)]+=(_0x4fe2f5[_0x28c9ea(0x14b)]['heapUsed']||0x0)+(_0x4fe2f5[_0x28c9ea(0x14b)][_0x28c9ea(0x282)]?.[_0x28c9ea(0xd4)]||0x0);const _0x211176=_0x4fe2f5[_0x28c9ea(0x14b)]['threads'];_0x211176&&(_0x5b6448['threads'][_0x28c9ea(0x2e1)]+=_0x211176[_0x28c9ea(0x2e1)]||0x0,_0x5b6448['threads'][_0x28c9ea(0x214)]+=_0x211176[_0x28c9ea(0x214)]||0x0,_0x5b6448[_0x28c9ea(0x282)][_0x28c9ea(0x16c)]+=_0x211176['busy']||0x0);}}return{'totals':_0x5b6448,'nodes':_0x2c4901};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x7ee9be=_0x7e59cb;this['_isWriter']=this[_0x7ee9be(0x2d8)]||!!writer,this['_isReader']=this[_0x7ee9be(0x195)]||!!reader,this['_kind']=kind||this[_0x7ee9be(0x25f)]||(_0x2dce24['isWorker']?_0x7ee9be(0x13a):'cli'),this[_0x7ee9be(0x17c)]=supervisorKey??this[_0x7ee9be(0x17c)],this[_0x7ee9be(0x21f)]=listenAddr??this[_0x7ee9be(0x21f)],this['_ensureDesired'](),await this[_0x7ee9be(0x1a8)]();if(!writer&&!reader)return null;if(!this[_0x7ee9be(0xf3)]){const _0x50b216=await this[_0x7ee9be(0x13d)][_0x7ee9be(0x27d)](_0x532f67,{'sync':![],'durability':_0x7ee9be(0x240)});if(!_0x50b216[_0x7ee9be(0x2a9)](_0x1a2a79))await _0x50b216[_0x7ee9be(0x29d)](_0x1a2a79);this[_0x7ee9be(0xf3)]=_0x50b216;}return this[_0x7ee9be(0xf3)];}[_0x7e59cb(0x1aa)](){const _0x496037=_0x7e59cb;return this[_0x496037(0x23a)]!==this[_0x496037(0xf3)]&&(this[_0x496037(0x23a)]=this[_0x496037(0xf3)],this[_0x496037(0x1e6)]=this['_statusEnv']['_getType'](_0x1a2a79)['data']),this[_0x496037(0x1e6)];}['_putRowAsync'](_0x3f575c){const _0x10c091=_0x7e59cb;if(_0x491529)return this[_0x10c091(0x1aa)]()[_0x10c091(0xe2)](_0x3f575c[_0x10c091(0x2ed)],_0x3f575c,0x1);const _0x488c24=this[_0x10c091(0x1aa)]()[_0x10c091(0x126)](_0x3f575c['nodeKey'],_0x3f575c,0x1);if(_0x488c24&&typeof _0x488c24[_0x10c091(0x2a1)]==='function')_0x488c24['then'](undefined,()=>{});return _0x488c24;}[_0x7e59cb(0xce)](_0x5dddd2){const _0xc2772d=_0x7e59cb;return this[_0xc2772d(0x1aa)]()[_0xc2772d(0xe2)](_0x5dddd2['nodeKey'],_0x5dddd2,0x1);}['_removeRowAsync'](_0x3fa943){const _0x29d730=_0x7e59cb;if(_0x491529)try{return this[_0x29d730(0x1aa)]()[_0x29d730(0x1ef)](_0x3fa943);}catch{return![];}const _0x2164c1=this['_nodeDb']()[_0x29d730(0x17d)](_0x3fa943);if(_0x2164c1&&typeof _0x2164c1[_0x29d730(0x2a1)]===_0x29d730(0x156))_0x2164c1['then'](undefined,()=>{});return _0x2164c1;}async[_0x7e59cb(0x1d0)](_0x2b7561){const _0x16f8aa=_0x7e59cb;if(!this[_0x16f8aa(0xf3)]||!this[_0x16f8aa(0x2d8)]||!_0x2b7561?.['nodeKey'])return;return this['_putRowAsync'](_0x2b7561);}async[_0x7e59cb(0x2e6)](_0xfa1e9a){const _0x6503b1=_0x7e59cb;if(!this[_0x6503b1(0xf3)]||!this['_isWriter']||!_0xfa1e9a)return;const _0x2abce8=_0xfa1e9a[_0x6503b1(0x1fa)]('#'),_0x28b6c0=[];for(const {key:_0x79e0ce}of this[_0x6503b1(0xf3)][_0x6503b1(0x26a)](_0x1a2a79)){if(_0x79e0ce===_0xfa1e9a||!_0x2abce8&&typeof _0x79e0ce===_0x6503b1(0x238)&&_0x79e0ce[_0x6503b1(0x165)](_0xfa1e9a+'#'))_0x28b6c0[_0x6503b1(0x242)](_0x79e0ce);}for(const _0x15e848 of _0x28b6c0){try{this['_nodeDb']()['removeSync'](_0x15e848);}catch{}}}['_nodeDead'](_0x3ec149){const _0x5443ea=_0x7e59cb;if(typeof _0x3ec149?.['pid']!==_0x5443ea(0x253))return![];if(_0x3ec149[_0x5443ea(0x1d5)]!==_0x35c0b3[_0x5443ea(0x217)]())return![];if(_0x3ec149[_0x5443ea(0x2de)]===process[_0x5443ea(0x2de)])return![];if(_0x3ec149[_0x5443ea(0x2e2)]!=null&&_0x3ec149[_0x5443ea(0x2e2)]<Date[_0x5443ea(0x281)]()-_0x412fba)return!![];try{return process[_0x5443ea(0x15b)](_0x3ec149['pid'],0x0),![];}catch(_0x5010d2){return _0x5010d2['code']==='ESRCH';}}[_0x7e59cb(0x1e9)](){const _0x4e7e11=_0x7e59cb;if(!this[_0x4e7e11(0xf3)])return[];try{this[_0x4e7e11(0xf3)]['db']?.['resetReadTxn']?.();}catch{}const _0x2792e1=Date[_0x4e7e11(0x281)](),_0x33ed42=_0x35c0b3[_0x4e7e11(0x217)](),_0x4383ed=[];for(const {value:_0x597bb7}of this[_0x4e7e11(0xf3)]['getRange'](_0x1a2a79)){if(!_0x597bb7)continue;let _0x212776=null;_0x597bb7[_0x4e7e11(0x1d5)]===_0x33ed42&&typeof _0x597bb7[_0x4e7e11(0x2de)]===_0x4e7e11(0x253)&&(_0x212776=!this[_0x4e7e11(0x2b5)](_0x597bb7));if(_0x212776===![])continue;const _0x24ea08=_0x597bb7[_0x4e7e11(0x2e2)]==null||_0x597bb7[_0x4e7e11(0x2e2)]>=_0x2792e1;if(_0x212776===!![]||_0x24ea08)_0x4383ed[_0x4e7e11(0x242)](_0x597bb7);}return _0x4383ed;}async[_0x7e59cb(0x1ee)](_0x368340=0x0){const _0x3f8546=_0x7e59cb;if(!this[_0x3f8546(0xf3)]||!this['_isWriter'])return;const _0x16cecf=Date['now']()-_0x368340,_0x2b3fc6=new Set(),_0x487172=[],_0xe794d4=_0x35c0b3[_0x3f8546(0x217)](),_0x253aa2=require$$6[_0x3f8546(0x210)];for(const {key:_0x46ceb4,value:_0x4d9740}of this[_0x3f8546(0xf3)][_0x3f8546(0x26a)](_0x1a2a79)){if(!_0x4d9740)continue;const _0xc9b26d=_0x4d9740[_0x3f8546(0x1d5)]===_0xe794d4&&typeof _0x4d9740[_0x3f8546(0x2de)]===_0x3f8546(0x253),_0x5c0e69=_0xc9b26d?this[_0x3f8546(0x2b5)](_0x4d9740):_0x4d9740[_0x3f8546(0x2e2)]!=null&&_0x4d9740[_0x3f8546(0x2e2)]<_0x16cecf;if(_0x5c0e69)_0x487172['push'](_0x46ceb4);else{_0x2b3fc6[_0x3f8546(0x145)](_0x346692(_0x4d9740)??_0x46ceb4);if(_0x4d9740[_0x3f8546(0x210)]&&_0x4d9740[_0x3f8546(0x210)]!==_0x253aa2){if(!this[_0x3f8546(0x128)])this[_0x3f8546(0x128)]=new Set();!this[_0x3f8546(0x128)][_0x3f8546(0x254)](_0x4d9740[_0x3f8546(0x210)])&&(this[_0x3f8546(0x128)]['add'](_0x4d9740['version']),this[_0x3f8546(0x13d)]['log']?.['warn']?.(_0x3f8546(0x261)+(_0x4d9740[_0x3f8546(0x2de)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x4d9740['version']+'\x20while\x20this\x20process\x20runs\x20'+_0x253aa2+'\x20—\x20'+_0x3f8546(0x20c),{'feature':_0x3f8546(0x127)}));}}}for(const _0x2b70ec of _0x487172)this[_0x3f8546(0x225)](_0x2b70ec);if(this[_0x3f8546(0x17e)]()){const _0x394432=[];for(const {key:_0x5a18fc}of this['listDesired'](_0x3f8546(0x25d))){if(!_0x2b3fc6[_0x3f8546(0x254)](_0x5a18fc)){if(_0x491529)try{this['_desired'][_0x3f8546(0x1ef)]('node/'+_0x5a18fc);}catch{}else _0x394432['push'](this['_desired'][_0x3f8546(0x17d)]('node/'+_0x5a18fc));}}if(_0x394432[_0x3f8546(0x273)])await Promise[_0x3f8546(0x24e)](_0x394432);}}[_0x7e59cb(0x23e)](_0x3c61e6=null){const _0x5ee033=_0x7e59cb;if(this[_0x5ee033(0x222)])return;if(!this[_0x5ee033(0x2d8)]||!this['_statusEnv']){this[_0x5ee033(0x13d)]?.[_0x5ee033(0x2c7)]?.[_0x5ee033(0x1ce)]?.(_0x5ee033(0x153)+this[_0x5ee033(0x2d8)]+_0x5ee033(0x1b2)+!!this[_0x5ee033(0xf3)]+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':'processes'});return;}this[_0x5ee033(0x25c)]=_0x3c61e6,this['_onProcEvent']=()=>this['_maybePublish']();for(const _0x41eaff of _0x4383ca)this[_0x5ee033(0x13d)]['events']['on'](_0x41eaff,this[_0x5ee033(0x2b9)]);this[_0x5ee033(0x12a)]();const _0x2fee57=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x4960b3;this[_0x5ee033(0x222)]=setInterval(()=>{const _0x209990=_0x5ee033;if(this[_0x209990(0x25c)])try{this[_0x209990(0x25c)]();}catch{}this['_publishNow'](),this[_0x209990(0x1ee)]()[_0x209990(0x2cd)](()=>{});},_0x2fee57);if(this[_0x5ee033(0x222)][_0x5ee033(0x1b8)])this[_0x5ee033(0x222)][_0x5ee033(0x1b8)]();}[_0x7e59cb(0x129)](){const _0x567009=_0x7e59cb;if(!this[_0x567009(0x2d8)]||!this['_statusEnv'])return;if(Date[_0x567009(0x281)]()-this['_lastPublishAt']<_0x1c3d4a)return;this[_0x567009(0x12a)]();}['_publishNow'](){const _0x5520e6=_0x7e59cb;if(!this[_0x5520e6(0x2d8)]||!this[_0x5520e6(0xf3)])return;this['_lastPublishAt']=Date[_0x5520e6(0x281)]();try{const _0x3bb801=[this[_0x5520e6(0x2d5)]()];for(const _0xe529b9 of this[_0x5520e6(0x15c)]['values']())_0x3bb801[_0x5520e6(0x242)](this[_0x5520e6(0x2cc)](_0xe529b9));const _0x2c4b90=_0x3c3950['enabled']?_0x3c3950[_0x5520e6(0x281)]():0x0;for(const _0x41c358 of _0x3bb801){try{this['_putRowSync'](_0x41c358),this[_0x5520e6(0x110)]=![];}catch(_0x504303){!this[_0x5520e6(0x110)]&&(this[_0x5520e6(0x110)]=!![],this[_0x5520e6(0x13d)]?.[_0x5520e6(0x2c7)]?.['warn']?.('registry\x20publish\x20failing:\x20'+_0x504303['message'],{'feature':_0x5520e6(0x20e)}));}}if(_0x3c3950[_0x5520e6(0x2df)])_0x3c3950['note'](_0x5520e6(0x27e),_0x3c3950[_0x5520e6(0x281)]()-_0x2c4b90,_0x5520e6(0x1d6)+_0x3bb801[_0x5520e6(0x273)]+_0x5520e6(0x2e8));}catch(_0x37cdbc){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this['okdb']?.[_0x5520e6(0x2c7)]?.[_0x5520e6(0x1ce)]?.('registry\x20publish\x20failing:\x20'+_0x37cdbc[_0x5520e6(0xf9)],{'feature':_0x5520e6(0x20e)}));}}async[_0x7e59cb(0x223)](){const _0x104f59=_0x7e59cb;if(this['_onProcEvent']){for(const _0x7a537f of _0x4383ca){try{this[_0x104f59(0x13d)]['events'][_0x104f59(0x232)](_0x7a537f,this[_0x104f59(0x2b9)]);}catch{}}this[_0x104f59(0x2b9)]=null;}this[_0x104f59(0x222)]&&(clearInterval(this[_0x104f59(0x222)]),this[_0x104f59(0x222)]=null);try{if(this[_0x104f59(0xf3)]&&this[_0x104f59(0x2d8)])await this[_0x104f59(0x2e6)](this['_rowKey']);}catch{}}async['deregisterSelf'](){const _0xbf1a35=_0x7e59cb;if(!this[_0xbf1a35(0xf3)]||!this[_0xbf1a35(0x2d8)])return;try{await this['removeNode'](this[_0xbf1a35(0xcf)]);}catch{}try{const _0x536f30=[];for(const {value:_0x109b81}of this[_0xbf1a35(0xf3)][_0xbf1a35(0x26a)](_0x1a2a79)){if(_0x109b81?.[_0xbf1a35(0x264)]===process['pid']&&_0x109b81[_0xbf1a35(0x2ed)])_0x536f30['push'](_0x109b81[_0xbf1a35(0x2ed)]);}for(const _0x2850ef of _0x536f30){try{await this[_0xbf1a35(0x2e6)](_0x2850ef);}catch{}}}catch{}}async['publishOwnRow'](){const _0x3a66bf=_0x7e59cb;return this['putNode'](this[_0x3a66bf(0x2d5)]());}async['publishChildRow'](_0x19ad63){const _0x473961=_0x7e59cb;if(!this[_0x473961(0xf3)]||!this[_0x473961(0x2d8)])return;return this[_0x473961(0x1d0)](this[_0x473961(0x2cc)](_0x19ad63));}[_0x7e59cb(0x2cc)]({pid:_0x38b542,startedAt:_0x356957,kind:_0x53dafa,supervisorKey:_0x357970,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x7e59cb(0x1fb),meta:meta=null,stats:stats=null}){const _0x50299c=_0x7e59cb,_0x515d0e=Date[_0x50299c(0x281)](),_0x34d54b=_0x467e6e(_0x38b542,_0x356957);return{'nodeKey':_0x1f463e(_0x34d54b,'0'),'processKey':_0x34d54b,'instanceId':'0','pid':_0x38b542,'startedAt':_0x356957,'ppid':process[_0x50299c(0x2de)],'host':_0x35c0b3[_0x50299c(0x217)](),'supervisorKey':_0x357970,'slot':slot,'slotKey':slotKey,'kind':_0x53dafa,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x515d0e,'expiresAt':_0x515d0e+_0x394c48,'caps':this['_caps'](_0x53dafa,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x7e59cb(0x11c)](_0x5cfd18){const _0x15a5a5=_0x7e59cb;if(!_0x5cfd18?.[_0x15a5a5(0x2de)])return null;const _0x135231=_0x467e6e(_0x5cfd18[_0x15a5a5(0x2de)],_0x5cfd18[_0x15a5a5(0x148)]);this[_0x15a5a5(0x15c)][_0x15a5a5(0x296)](_0x135231,{..._0x5cfd18,'supervisorKey':_0x5cfd18[_0x15a5a5(0x1e4)]??this[_0x15a5a5(0xd1)]});if(this[_0x15a5a5(0x2d8)])await this[_0x15a5a5(0x124)](this[_0x15a5a5(0x15c)][_0x15a5a5(0x1bf)](_0x135231))['catch']?.(()=>{});return _0x135231;}['removeSupervisedChild'](_0x1ea405){const _0x112241=_0x7e59cb;if(!_0x1ea405)return;return this['_children']['delete'](_0x1ea405),this[_0x112241(0x2e6)](_0x1ea405);}[_0x7e59cb(0x20f)](){const _0x2ff36c=_0x7e59cb,_0x5d5be6=Date[_0x2ff36c(0x281)](),_0x2b0d0a=process[_0x2ff36c(0x136)](),_0xe11e99=(_0x5d5be6-this['_lastCpuAt'])*0x3e8;if(_0xe11e99>=0x3d090){const _0x1ab081=_0x2b0d0a[_0x2ff36c(0x151)]-this[_0x2ff36c(0x2a7)][_0x2ff36c(0x151)]+(_0x2b0d0a[_0x2ff36c(0x22c)]-this['_lastCpuUsage']['system']),_0x1d9283=_0x35c0b3[_0x2ff36c(0x18d)]()[_0x2ff36c(0x273)]||0x1;this[_0x2ff36c(0x107)]=Math['min'](0x64,Math[_0x2ff36c(0x1b7)](_0x1ab081/(_0xe11e99*_0x1d9283)*0x64)),this[_0x2ff36c(0x1a4)]=Math['round'](_0xe11e99/0x3e8),this['_lastCpuUsage']=_0x2b0d0a,this[_0x2ff36c(0x1a5)]=_0x5d5be6;}const _0xca5921=process[_0x2ff36c(0x295)](),_0x4c3968=this[_0x2ff36c(0x17f)][_0x2ff36c(0x1f9)];let _0x3ebc83=0x0;if(_0x4c3968>0x0){const _0x243f37=[this[_0x2ff36c(0x13d)],...this['okdb'][_0x2ff36c(0x161)]?.[_0x2ff36c(0x1dd)]?.()??[]];for(const _0x360121 of _0x243f37){const _0x2b45f8=_0x360121[_0x2ff36c(0x22d)]?.[_0x2ff36c(0x291)];if(_0x2b45f8)_0x3ebc83+=_0x2b45f8[_0x2ff36c(0x21e)][_0x2ff36c(0x16c)];}}let _0x5059d5=null;const _0x59f473=_0x4c3968;if(_0x59f473>0x0){let _0x56da43=0x0;for(const _0x3b4016 of this[_0x2ff36c(0x17f)][_0x2ff36c(0x1dd)]())_0x56da43+=_0x3b4016[_0x2ff36c(0xd4)]||0x0;_0x5059d5={'count':_0x59f473,'heapUsed':_0x56da43,'sandbox':_0x4c3968,'busy':_0x3ebc83};}return{'rss':_0xca5921[_0x2ff36c(0x16e)],'heapUsed':_0xca5921['heapUsed'],'heapTotal':_0xca5921[_0x2ff36c(0x1de)],'external':_0xca5921[_0x2ff36c(0x239)],'cpuPct':this[_0x2ff36c(0x107)],'cpuWindowMs':this[_0x2ff36c(0x1a4)]??null,'threads':_0x5059d5,'at':_0x5d5be6};}[_0x7e59cb(0x23f)](_0x3297b3,_0x469501){const _0x25d800=_0x7e59cb;if(!_0x3297b3||!_0x469501)return;this[_0x25d800(0x17f)][_0x25d800(0x296)](_0x3297b3,_0x469501);}[_0x7e59cb(0x205)](_0x49495d){const _0x17577c=_0x7e59cb;this[_0x17577c(0x17f)][_0x17577c(0x102)](_0x49495d);}[_0x7e59cb(0x15f)](_0x3ff4f3,_0x51148b,_0x21b39f=undefined){const _0x1dfb47=_0x7e59cb,_0x4ed629=this[_0x1dfb47(0x15c)][_0x1dfb47(0x1bf)](_0x3ff4f3);if(!_0x4ed629||!_0x51148b)return;if(_0x21b39f!==undefined)_0x4ed629['processing']=_0x21b39f;_0x4ed629[_0x1dfb47(0x14b)]={'rss':_0x51148b[_0x1dfb47(0x16e)]??null,'heapUsed':_0x51148b[_0x1dfb47(0xd4)]??null,'heapTotal':_0x51148b[_0x1dfb47(0x1de)]??null,'external':_0x51148b[_0x1dfb47(0x239)]??null,'cpuPct':_0x51148b['cpuPct']??null,'cpuWindowMs':_0x51148b['cpuWindowMs']??null,'threads':_0x51148b[_0x1dfb47(0x282)]??null,'claims':_0x51148b[_0x1dfb47(0x178)]??null,'envsOpen':_0x51148b[_0x1dfb47(0xfc)]??null,'at':Date['now']()};}[_0x7e59cb(0x2d5)](){const _0x51de43=_0x7e59cb,_0x52bf9d=Date[_0x51de43(0x281)](),_0x49cc9a=this['okdb'][_0x51de43(0x13e)]||{},_0x7e8ac5=this[_0x51de43(0x25f)]||_0x51de43(0x12b);return{'nodeKey':this[_0x51de43(0xcf)],'processKey':this[_0x51de43(0xd1)],'instanceId':this['_instanceId'],'pid':process[_0x51de43(0x2de)],'startedAt':this[_0x51de43(0x199)],'instanceStartedAt':this[_0x51de43(0x121)],'ppid':typeof process['ppid']===_0x51de43(0x253)?process[_0x51de43(0x264)]:null,'host':_0x35c0b3['hostname'](),'supervisorKey':this['_supervisorKey']??null,'version':require$$6['version'],'kind':_0x7e8ac5,'role':{'engines':!!_0x49cc9a[_0x51de43(0xf8)],'processors':!!_0x49cc9a['processors'],'compaction':_0x49cc9a[_0x51de43(0x1b6)],'http':_0x49cc9a[_0x51de43(0x158)]},'listenAddr':this[_0x51de43(0x21f)]??null,'heartbeatAt':_0x52bf9d,'expiresAt':_0x52bf9d+_0x394c48,'caps':this['_caps'](_0x7e8ac5,_0x49cc9a),'lifecycle':{'state':_0x51de43(0x1fb),'desiredVersionApplied':null},'meta':{...this[_0x51de43(0x1cb)]},'processing':_0x49cc9a[_0x51de43(0xed)]?this[_0x51de43(0x24b)]():null,'engines':_0x49cc9a['engines']?[...this[_0x51de43(0x13d)][_0x51de43(0x2e4)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x51de43(0x20f)](),'writers':this[_0x51de43(0x1a2)]()};}['_collectWriterFacet'](){const _0x449a59=_0x7e59cb,_0x19a1c7={};try{for(const [_0x4f2ca3,_0x45bc35]of this[_0x449a59(0x13d)]['_envs']){try{const _0x4ef7a7=_0x45bc35[_0x449a59(0x2bc)]?.();if(!_0x4ef7a7)continue;if(!_0x4ef7a7[_0x449a59(0x24a)]&&!_0x4ef7a7[_0x449a59(0x21a)]&&!(_0x4ef7a7[_0x449a59(0x280)]??0x0)&&!_0x4ef7a7[_0x449a59(0xc3)])continue;_0x19a1c7[_0x4f2ca3]={'depth':_0x4ef7a7['depth'],'oldestPendingMs':_0x4ef7a7[_0x449a59(0x269)],'committed':_0x4ef7a7[_0x449a59(0x21a)],'commitsPerSec':_0x4ef7a7[_0x449a59(0x10b)],'commitP99Ms':_0x4ef7a7['commitP99Ms'],'parkedNow':_0x4ef7a7[_0x449a59(0x280)]??0x0,'draining':!!_0x4ef7a7['draining']};}catch{}}}catch{}return Object['keys'](_0x19a1c7)['length']?_0x19a1c7:null;}[_0x7e59cb(0x268)](){const _0x1d7833=_0x7e59cb,_0x81fdb7=process['pid'],_0x2b6666=Date[_0x1d7833(0x281)](),_0x24eaf9=_0x3a25da=>{const _0xa18a32=_0x1d7833;if(!_0x3a25da)return[];const _0x233253=[];try{for(const {id:_0x140d9b,entry:_0x474296}of _0x3a25da['list']()){if(_0x474296?.[_0xa18a32(0x2a6)]?.[_0xa18a32(0x2de)]!==_0x81fdb7)continue;const _0x3fe93c=_0x474296['updatedAt']??_0x474296[_0xa18a32(0x18c)]??0x0;if(_0x3fe93c+(_0x474296[_0xa18a32(0x289)]??0x0)<_0x2b6666)continue;_0x233253[_0xa18a32(0x242)](_0x140d9b);}}catch{}return _0x233253;},_0x907d44=_0x24eaf9(this[_0x1d7833(0x290)]('compact')),_0x4bfc23=_0x24eaf9(this[_0x1d7833(0x290)](_0x1d7833(0x120)));if(!_0x907d44['length']&&!_0x4bfc23[_0x1d7833(0x273)])return null;return{'compact':_0x907d44,'replicate':_0x4bfc23};}[_0x7e59cb(0x290)](_0x5141ce){const _0x17dd12=_0x7e59cb;if(!this[_0x17dd12(0x13d)]?.[_0x17dd12(0xfd)])return null;if(!this[_0x17dd12(0x1d4)])this['_singletonLocks']=new Map();let _0x8db4f7=this['_singletonLocks'][_0x17dd12(0x1bf)](_0x5141ce);if(!_0x8db4f7)try{_0x8db4f7=new _0x1c02f9(this['okdb'][_0x17dd12(0xfd)],{'namespace':_0x5141ce}),this[_0x17dd12(0x1d4)]['set'](_0x5141ce,_0x8db4f7);}catch{return null;}return _0x8db4f7;}['_buildProcessingFacet'](){const _0x1e5707=_0x7e59cb,_0x1b13f4=[];try{for(const [_0x11dd59,_0xa5ecd1]of this[_0x1e5707(0x13d)]['_envs']){if(_0x11dd59[_0x1e5707(0x165)]('~'))continue;for(const _0x4b7779 of _0xa5ecd1['processor'][_0x1e5707(0x27f)]())_0x1b13f4[_0x1e5707(0x242)]({..._0x4b7779,'env':_0x11dd59});}}catch{}return{'participate':this[_0x1e5707(0x13d)][_0x1e5707(0xed)]?.['_participate']??![],'processors':_0x1b13f4};}[_0x7e59cb(0x17e)](){const _0x518b49=_0x7e59cb;if(this['_desired'])return!![];const _0x14f847=this[_0x518b49(0x13d)][_0x518b49(0xfd)];if(!_0x14f847)return![];return this[_0x518b49(0x1d2)]=_0x14f847['openDB'](_0x5cc13b,{'dupSort':![]}),this[_0x518b49(0x1f0)]=_0x14f847['openDB'](_0x6ff6ec,{'dupSort':![]}),!![];}async[_0x7e59cb(0x1a8)](){const _0x27d5bd=_0x7e59cb;if(!this[_0x27d5bd(0x17e)]())return;const _0x349655=_0x27d5bd(0xff),_0x5025de=0x1,_0x2d8955=this[_0x27d5bd(0x1d2)][_0x27d5bd(0x1bf)](_0x349655)??0x0;if(_0x2d8955>=_0x5025de)return;const _0x6f575b=_0x5ab2b0=>{const _0x393496=_0x27d5bd;if(_0x5ab2b0===_0x393496(0xfa))return _0x393496(0x271);if(_0x5ab2b0===_0x393496(0x167))return'fanout';return _0x5ab2b0;};await this[_0x27d5bd(0x13d)][_0x27d5bd(0x28b)][_0x27d5bd(0x226)][_0x27d5bd(0x1df)](()=>{const _0x1934b7=_0x27d5bd;for(const _0xec656 of['procmode/',_0x1934b7(0xe6)]){for(const {key:_0x2f13f6,value:_0x853af}of this[_0x1934b7(0x1d2)][_0x1934b7(0x26a)]({'start':_0xec656,'end':_0xec656+'ÿ'})){if(typeof _0x2f13f6!==_0x1934b7(0x238)||!_0x2f13f6[_0x1934b7(0x165)](_0xec656))break;const _0xe2e3af=_0x6f575b(_0x853af[_0x1934b7(0x23c)]);if(_0xe2e3af!==_0x853af[_0x1934b7(0x23c)])this[_0x1934b7(0x1d2)][_0x1934b7(0x126)](_0x2f13f6,{..._0x853af,'mode':_0xe2e3af});}}this[_0x1934b7(0x1d2)][_0x1934b7(0x126)](_0x349655,_0x5025de);});}[_0x7e59cb(0x2a4)](){const _0x29160b=_0x7e59cb;return!!this[_0x29160b(0x1d2)];}[_0x7e59cb(0x24d)](_0x3b6676,_0xb2d767){const _0x54e065=_0x7e59cb;if(!this[_0x54e065(0x17e)]())return null;const _0x431016=_0x3b6676+'/'+_0xb2d767;return this['_refreshDesiredSnapshot'](),this[_0x54e065(0xd5)][_0x54e065(0x1bf)](_0x431016)??this['_desired']['get'](_0x431016)??null;}[_0x7e59cb(0x229)](){const _0x5cc0b8=_0x7e59cb;if(!_0x491529)return;try{this['okdb']['_systemEnv']?.['db']?.[_0x5cc0b8(0x287)]?.();}catch{}}async[_0x7e59cb(0x196)](_0x1a8bbd,_0x3bfcc7,_0x41d344){const _0x10d683=_0x7e59cb;if(!this[_0x10d683(0x17e)]())return null;const _0x292eda=_0x1a8bbd+'/'+_0x3bfcc7;this['_refreshDesiredSnapshot']();const _0x1a1c74=this['_desiredOverlay'][_0x10d683(0x1bf)](_0x292eda)??this[_0x10d683(0x1d2)][_0x10d683(0x1bf)](_0x292eda)??{'version':0x0},_0x50f3de=(_0x1a1c74[_0x10d683(0x210)]||0x0)+0x1,_0x561a39={..._0x1a1c74,..._0x41d344,'version':_0x50f3de,'updatedAt':Date['now']()};this[_0x10d683(0xd5)][_0x10d683(0x296)](_0x292eda,_0x561a39);try{await this['okdb'][_0x10d683(0x28b)]['_writer'][_0x10d683(0x1df)](()=>{const _0x2294c7=_0x10d683;this[_0x2294c7(0x1d2)][_0x2294c7(0x126)](_0x292eda,_0x561a39);});}finally{if(this[_0x10d683(0xd5)][_0x10d683(0x1bf)](_0x292eda)===_0x561a39)this[_0x10d683(0xd5)]['delete'](_0x292eda);}return _0x50f3de;}[_0x7e59cb(0x219)](_0x29f231){const _0x411172=_0x7e59cb;if(!this[_0x411172(0x17e)]())return[];this[_0x411172(0x229)]();const _0x3009a9=_0x29f231+'/',_0x44f02e=[];for(const {key:_0x43fd19,value:_0x401c7f}of this[_0x411172(0x1d2)]['getRange']({'start':_0x3009a9,'end':_0x3009a9+'ÿ'})){if(typeof _0x43fd19!=='string'||!_0x43fd19[_0x411172(0x165)](_0x3009a9))break;_0x44f02e[_0x411172(0x242)]({'key':_0x43fd19[_0x411172(0x1e0)](_0x3009a9['length']),'value':_0x401c7f});}return _0x44f02e;}[_0x7e59cb(0x262)](_0x109f6a){const _0x1d5139=_0x7e59cb;if(!this[_0x1d5139(0x17e)]())return null;return this[_0x1d5139(0x1f0)]['get'](_0x109f6a)??null;}async[_0x7e59cb(0x144)](_0x31df6d,_0x803b8a,_0x18dd22={}){const _0x4b3a5e=_0x7e59cb;if(!this['_ensureDesired']())return null;let _0x595dc5;return await this[_0x4b3a5e(0x13d)][_0x4b3a5e(0x28b)][_0x4b3a5e(0x226)][_0x4b3a5e(0x1df)](()=>{const _0x1f58bc=_0x4b3a5e,_0x329a7f=this[_0x1f58bc(0x1f0)][_0x1f58bc(0x1bf)](_0x31df6d)||{'epoch':0x0};_0x595dc5=(_0x329a7f[_0x1f58bc(0x1e1)]||0x0)+0x1,this[_0x1f58bc(0x1f0)][_0x1f58bc(0x126)](_0x31df6d,{..._0x329a7f,..._0x18dd22,'cmd':_0x803b8a,'epoch':_0x595dc5,'updatedAt':Date[_0x1f58bc(0x281)]()});}),_0x595dc5;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x573e35,'nodeKey':_0x467e6e,'logicalKey':_0x3a0ecf,'slotKey':_0x300894,'PROCESS_ENV':_0x532f67,'NODE_TYPE':_0x1a2a79},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x2237e1=_0x22d7b4;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x46878c=require$$0$4,{EVENTS:_0x3c1f43,CHANGE_ACTIONS:_0xe917bb}=requireOkdbEnums(),{LOOP:_0x547220}=requireOkdbLoopMonitor(),_0x589d40=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x38eed1=0x5,_0x267883=0x2710;class _0x4c07d9 extends _0x46878c{constructor(_0x513e7c,_0x4d44e2={}){const _0x51eb9f=_0x23ad;super(),this[_0x51eb9f(0x13d)]=_0x513e7c,this[_0x51eb9f(0x2b1)]=_0x4d44e2['quantum']??_0x589d40,this[_0x51eb9f(0x16d)]=_0x4d44e2[_0x51eb9f(0x1ea)]??_0x38eed1,this[_0x51eb9f(0x2c3)]=_0x4d44e2[_0x51eb9f(0x179)]??_0x267883,this['_started']=![],this[_0x51eb9f(0x1a3)]=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x51eb9f(0x1a0)]=null,this[_0x51eb9f(0x171)]=![],this[_0x51eb9f(0x209)]=new Set(),this['_onItem']=_0x59af0d=>this[_0x51eb9f(0xd0)](_0x59af0d),this['_onPoke']=_0x14d5af=>this[_0x51eb9f(0x135)](_0x14d5af),this[_0x51eb9f(0x1bc)]=()=>this[_0x51eb9f(0x298)]();}['start'](){const _0x42b110=_0x23ad;if(this['_started'])return;this[_0x42b110(0x172)]=!![];for(const [_0x4391fb,_0x1e5946]of this[_0x42b110(0x13d)][_0x42b110(0x161)]){if(_0x4391fb[_0x42b110(0x165)]('~'))continue;try{_0x1e5946[_0x42b110(0x1d1)]();}catch{}}for(const [_0xadff12,_0x1b199c]of this[_0x42b110(0x13d)]['_envs']){if(_0xadff12[_0x42b110(0x165)]('~'))continue;try{this[_0x42b110(0x23d)][_0x42b110(0x296)](_0xadff12,_0x1b199c[_0x42b110(0x21d)]()||0x0);}catch{}}const {events:_0x40d243}=this[_0x42b110(0x13d)];_0x40d243['on'](_0x3c1f43[_0x42b110(0x2f0)],this[_0x42b110(0x1e3)]),_0x40d243['on'](_0x3c1f43[_0x42b110(0x142)],this[_0x42b110(0x1e3)]),_0x40d243['on'](_0x3c1f43[_0x42b110(0x2a3)],this[_0x42b110(0x1e3)]),_0x40d243['on'](_0x3c1f43[_0x42b110(0x1ab)],this[_0x42b110(0x236)]),_0x40d243[_0x42b110(0x194)](_0x3c1f43[_0x42b110(0x187)],this[_0x42b110(0x1bc)]);}['stop'](){const _0x594938=_0x23ad;if(!this['_started'])return;this[_0x594938(0x172)]=![];const {events:_0x5efc6c}=this['okdb'];_0x5efc6c[_0x594938(0x232)](_0x3c1f43['ITEM_CREATE'],this['_onItem']),_0x5efc6c[_0x594938(0x232)](_0x3c1f43[_0x594938(0x142)],this[_0x594938(0x1e3)]),_0x5efc6c['off'](_0x3c1f43[_0x594938(0x2a3)],this[_0x594938(0x1e3)]),_0x5efc6c[_0x594938(0x232)](_0x3c1f43[_0x594938(0x1ab)],this['_onPoke']);try{_0x5efc6c['off'](_0x3c1f43[_0x594938(0x187)],this[_0x594938(0x1bc)]);}catch{}this[_0x594938(0x1a0)]&&(clearTimeout(this[_0x594938(0x1a0)]),this[_0x594938(0x1a0)]=null),this[_0x594938(0x1ff)][_0x594938(0x157)](),this[_0x594938(0x1a3)]['clear'](),this['_baselines'][_0x594938(0x157)](),this[_0x594938(0x209)][_0x594938(0x157)]();}[_0x2237e1(0x1d3)](_0x5ee511,_0x45e978,_0x1bbad9,_0x45c163){return _0x5ee511+'\x00'+_0x45e978+'\x00'+_0x1bbad9+'\x00'+_0x45c163;}[_0x2237e1(0x212)](_0x30e4bc,_0xd30508,_0x33ed93,_0x4e82b1){const _0x4de95f=_0x2237e1,_0x15b285=this['_dedupeKey'](_0x30e4bc,_0xd30508,_0x33ed93,_0x4e82b1);if(this[_0x4de95f(0x209)][_0x4de95f(0x254)](_0x15b285))return![];this[_0x4de95f(0x209)][_0x4de95f(0x145)](_0x15b285);if(this[_0x4de95f(0x209)][_0x4de95f(0x1f9)]>this['_dedupeMax']){const _0x402263=this[_0x4de95f(0x209)]['values']()[_0x4de95f(0x113)]()[_0x4de95f(0x10c)];this[_0x4de95f(0x209)]['delete'](_0x402263);}return!![];}[_0x2237e1(0xd0)](_0x553fee){const _0x2e2eff=_0x2237e1;if(!this[_0x2e2eff(0x172)]||!_0x553fee)return;const {env:_0xca1fee,type:_0x4cdb89,key:_0x1b0693,clock:_0x14243e,origin:_0xf2c78e,action:_0x5af85a,newValue:_0x308da8,oldValue:_0x3df825}=_0x553fee;if(_0xca1fee==null||_0x4cdb89==null||_0x1b0693==null)return;if(typeof _0xca1fee===_0x2e2eff(0x238)&&_0xca1fee[_0x2e2eff(0x165)]('~'))return;if(typeof _0x4cdb89==='string'&&_0x4cdb89[_0x2e2eff(0x165)]('~'))return;if(!this[_0x2e2eff(0x212)](_0xca1fee,_0x4cdb89,_0x1b0693,_0x14243e))return;const _0x5c1c15=_0x5af85a===_0xe917bb[_0x2e2eff(0xe5)]?_0x2e2eff(0x17d):_0x2e2eff(0x126);this[_0x2e2eff(0x11f)]('change',{'env':_0xca1fee,'type':_0x4cdb89,'key':_0x1b0693,'op':_0x5c1c15,'clock':_0x14243e,'origin':_0xf2c78e,'value':_0x5c1c15===_0x2e2eff(0x17d)?null:_0x308da8,'prevValue':_0x3df825});}[_0x2237e1(0x135)](_0xa65a2f){const _0x5bd67f=_0x2237e1;if(!this[_0x5bd67f(0x172)])return;if(!_0xa65a2f||typeof _0xa65a2f[_0x5bd67f(0x27a)]!==_0x5bd67f(0x238)||typeof _0xa65a2f[_0x5bd67f(0x243)]!=='string')return;const {env:_0x22fe64,type:_0x34c1a1}=_0xa65a2f;if(_0x22fe64[_0x5bd67f(0x165)]('~')||_0x34c1a1['startsWith']('~'))return;this[_0x5bd67f(0x1ff)]['set'](_0x22fe64+'\x00'+_0x34c1a1,{'env':_0x22fe64,'type':_0x34c1a1}),this[_0x5bd67f(0x2d9)]();}['_scheduleFlush'](){const _0x32aa3a=_0x2237e1;if(this[_0x32aa3a(0x1a0)])return;const _0x41aa4e=()=>{const _0x1e0bf8=_0x32aa3a;this['_flushTimer']=null,this[_0x1e0bf8(0x122)]()[_0x1e0bf8(0x2cd)](()=>{});};this[_0x32aa3a(0x1a0)]=setTimeout(_0x41aa4e,this['_flushDebounce']>0x0?this['_flushDebounce']:0x0);}async['_drain'](){const _0x3f7775=_0x2237e1;if(this[_0x3f7775(0x171)]){this['_scheduleFlush']();return;}this['_draining']=!![];try{const _0x8212ae=[...this['_pending']['values']()];this['_pending'][_0x3f7775(0x157)]();let _0x492705=![];for(const {env:_0xd009f0,type:_0x23a2f8}of _0x8212ae){try{const _0x4c688a=await this[_0x3f7775(0x1fc)](_0xd009f0,_0x23a2f8);if(_0x4c688a)_0x492705=!![];}catch{this[_0x3f7775(0x1ff)]['set'](_0xd009f0+'\x00'+_0x23a2f8,{'env':_0xd009f0,'type':_0x23a2f8}),_0x492705=!![];}}if(_0x492705||this[_0x3f7775(0x1ff)][_0x3f7775(0x1f9)]>0x0)this[_0x3f7775(0x2d9)]();}finally{this[_0x3f7775(0x171)]=![];}}async[_0x2237e1(0x1fc)](_0x5d46ca,_0x8b19dc){const _0x3ea0b2=_0x2237e1,_0x164be8=await this[_0x3ea0b2(0x13d)][_0x3ea0b2(0x2bd)](_0x5d46ca),_0x5dd470=_0x5d46ca+'\x00'+_0x8b19dc;!this['_cursors']['has'](_0x5dd470)&&(!this['_baselines'][_0x3ea0b2(0x254)](_0x5d46ca)&&(_0x164be8[_0x3ea0b2(0x1d1)](),this[_0x3ea0b2(0x23d)]['set'](_0x5d46ca,_0x164be8[_0x3ea0b2(0x21d)]()||0x0)),this['_cursors'][_0x3ea0b2(0x296)](_0x5dd470,this[_0x3ea0b2(0x23d)][_0x3ea0b2(0x1bf)](_0x5d46ca)));const _0x5679b0=this[_0x3ea0b2(0x1a3)][_0x3ea0b2(0x1bf)](_0x5dd470),_0x24b1fa=_0x164be8[_0x3ea0b2(0x21d)](_0x8b19dc)||0x0;if(_0x24b1fa<=_0x5679b0)return![];const _0x28c18c=_0x5679b0+this[_0x3ea0b2(0x2b1)],_0x169ebf=Math[_0x3ea0b2(0x249)](_0x24b1fa,_0x28c18c),_0x550810=_0x547220[_0x3ea0b2(0x2df)]?_0x547220['now']():0x0,_0x179b52=Array[_0x3ea0b2(0xc8)](_0x164be8['getChanges'](_0x8b19dc,_0x5679b0+0x1,_0x169ebf));let _0x5524b0=_0x5679b0;for(const _0x2deac0 of _0x179b52){const {clock:_0x4a6d9d,key:_0x106c56,action:_0x46298e,origin:_0x45b98e}=_0x2deac0;if(_0x4a6d9d>_0x5524b0)_0x5524b0=_0x4a6d9d;if(_0x106c56==null)continue;if(!this['_markSeen'](_0x5d46ca,_0x8b19dc,_0x106c56,_0x4a6d9d))continue;let _0x461c64,_0xe6519d;if(_0x46298e===_0xe917bb[_0x3ea0b2(0xe5)])_0x461c64=_0x3ea0b2(0x17d),_0xe6519d=null;else{const _0x1fa4dd=_0x164be8[_0x3ea0b2(0x1bf)](_0x8b19dc,_0x106c56);_0x1fa4dd==null?(_0x461c64=_0x3ea0b2(0x17d),_0xe6519d=null):(_0x461c64=_0x3ea0b2(0x126),_0xe6519d=_0x1fa4dd);}this[_0x3ea0b2(0x11f)](_0x3ea0b2(0x15e),{'env':_0x5d46ca,'type':_0x8b19dc,'key':_0x106c56,'op':_0x461c64,'clock':_0x4a6d9d,'origin':_0x45b98e,'value':_0xe6519d});}if(_0x547220[_0x3ea0b2(0x2df)])_0x547220[_0x3ea0b2(0x176)]('feed:'+_0x5d46ca+':'+_0x8b19dc,_0x547220[_0x3ea0b2(0x281)]()-_0x550810,'n='+_0x179b52[_0x3ea0b2(0x273)]);return this[_0x3ea0b2(0x1a3)][_0x3ea0b2(0x296)](_0x5dd470,Math[_0x3ea0b2(0x213)](_0x5524b0,_0x169ebf)),_0x164be8['getClock'](_0x8b19dc)>_0x169ebf;}[_0x2237e1(0x285)](){const _0x282225=_0x2237e1;return{'started':this[_0x282225(0x172)],'quantum':this[_0x282225(0x2b1)],'flushDebounce':this[_0x282225(0x16d)],'cursors':Object[_0x282225(0x2c4)]([...this['_cursors'][_0x282225(0x2e5)]()]['map'](([_0x427512,_0x110658])=>[_0x427512[_0x282225(0x235)]('\x00',':'),_0x110658])),'pending':this[_0x282225(0x1ff)]['size'],'seen':this[_0x282225(0x209)]['size']};}}return _0x4c07d9[_0x2237e1(0x1f5)]=_0x589d40,okdbChangefeed={'OKDBChangefeed':_0x4c07d9},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2ee492=_0x22d7b4;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x50b153=require$$1$1,_0x17a294=require$$1,{EVENTS:_0x202811}=requireOkdbEnums(),_0x543808=require$$0$3,{slotKey:_0xbe14c2}=requireOkdbProcessRegistry(),_0x38877c=0xfa,_0x4320c9=0xfa0,_0x26ff64=0x5,_0x5cfb6e=0x2710,_0x5d24e5=0xbb8,_0x2f0390=0x7d0,_0x563ecb='__okdbCluster',_0x4362bb=_0x2ee492(0x24f),_0x2b1558=_0x2ee492(0x2c7),_0x50a606=_0x2ee492(0x14b),_0x2624cb=[_0x202811[_0x2ee492(0x1e8)],_0x202811[_0x2ee492(0x123)],_0x202811['FTS_DROP'],_0x202811['FTS_RESET'],_0x202811[_0x2ee492(0x11a)],_0x202811[_0x2ee492(0x133)],_0x202811[_0x2ee492(0x2f3)],_0x202811[_0x2ee492(0xcd)],_0x2ee492(0x201),_0x2ee492(0x1af),_0x2ee492(0x1c1),'processor:paused',_0x2ee492(0xc4),'processor:retry'],_0x48cbbd=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x1f51a0({workers:_0x534e7e,makeOkdb:_0x56bbe7,port:_0x35cb1e,primaryOkdb:_0x21d591,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0xa1b305=_0x2ee492;if(_0x50b153[_0xa1b305(0x118)])return childEntry&&_0x50b153[_0xa1b305(0x2d6)]({'exec':_0x17a294[_0xa1b305(0x265)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x4824e4=_0xa1b305,_0x338e91=[];for(let _0x2c09f8=0x0;_0x2c09f8<process['execArgv'][_0x4824e4(0x273)];_0x2c09f8++){const _0x1bed64=process['execArgv'][_0x2c09f8];if(_0x1bed64[_0x4824e4(0x165)](_0x4824e4(0x109))||_0x1bed64[_0x4824e4(0x165)]('--watch')||_0x1bed64[_0x4824e4(0x165)]('--inspect'))continue;if(_0x1bed64==='-e'||_0x1bed64==='--eval'||_0x1bed64==='-p'||_0x1bed64===_0x4824e4(0x10a)){_0x2c09f8++;continue;}_0x338e91[_0x4824e4(0x242)](_0x1bed64);}return _0x338e91;})())}),_0x23b690({'workers':_0x534e7e,'port':_0x35cb1e,'primaryOkdb':_0x21d591,'workerEnv':workerEnv});return _0x1bd1dd({'makeOkdb':_0x56bbe7,'port':_0x35cb1e});}function _0x23b690({workers:_0x3eed5c,port:_0x489e36,primaryOkdb:_0x36f1b3,workerEnv:_0x112e99}){const _0x491653=_0x2ee492,_0x30ef9f=new Map(),_0x1852ab=new Map();let _0x2e926e=![];const _0x364111=_0x384346=>_0x384346?.['__okdbSlot'],_0x46acfd=_0x30db62=>{const _0x3f5695=_0x23ad,_0xed62e3=_0x50b153['fork']({...process.env,..._0x112e99||{},'OKDB_CLUSTER_SLOT':String(_0x30db62)});return _0xed62e3['__okdbSlot']=_0x30db62,_0x30ef9f[_0x3f5695(0x296)](_0xed62e3[_0x3f5695(0x2d3)][_0x3f5695(0x2de)],{'worker':_0xed62e3,'startedAt':Date[_0x3f5695(0x281)](),'slot':_0x30db62}),_0xed62e3['on'](_0x3f5695(0x231),_0x5cf2c7=>{const _0x15e09a=_0x3f5695;console[_0x15e09a(0x2c7)]('[okdb-cluster]\x20worker\x20pid='+_0xed62e3['process'][_0x15e09a(0x2de)]+_0x15e09a(0xc1)+(_0x5cf2c7?.[_0x15e09a(0xf9)]??_0x5cf2c7));}),_0xed62e3['on'](_0x3f5695(0x1c0),()=>_0x37d404()),_0xed62e3;},_0x3017ce=_0x5d6b5e=>{const _0x5eb18e=_0x23ad;for(const {worker:_0x539718}of _0x30ef9f['values']()){if(_0x539718[_0x5eb18e(0x163)]()||!_0x539718[_0x5eb18e(0x2ec)]())continue;try{_0x539718[_0x5eb18e(0x1dc)](_0x5d6b5e);}catch{}}};_0x36f1b3?.['_activateProcesses']?.({'kind':_0x491653(0x237),'listenAddr':':'+_0x489e36})[_0x491653(0x2cd)](()=>{}),_0x36f1b3?.['processes']?.[_0x491653(0x2e3)]?.({'workersConfigured':_0x3eed5c});const _0xa9dd90={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x37d404=()=>{const _0x24cc38=_0x491653,_0x490b96=_0x36f1b3?.[_0x24cc38(0x20e)];if(!_0x490b96||!_0x490b96['_isWriter'])return;const _0x131e40=_0x490b96[_0x24cc38(0x1e2)];for(const {worker:_0x313211,startedAt:_0x4a7723,slot:_0xab1e06,stats:_0x1e2dca,processing:_0x62a7cb}of _0x30ef9f['values']()){if(_0x313211[_0x24cc38(0x163)]())continue;const _0x4c0f90=_0x490b96[_0x24cc38(0x2a4)]?.()&&_0x490b96['getDesired'](_0x24cc38(0xef),_0x4d5c87(_0xab1e06))?.['decommission']===!![];_0x490b96[_0x24cc38(0x124)]({'pid':_0x313211[_0x24cc38(0x2d3)]['pid'],'startedAt':_0x4a7723,'kind':_0x24cc38(0x13a),'supervisorKey':_0x131e40,'slot':_0xab1e06,'slotKey':_0x4d5c87(_0xab1e06),'role':_0xa9dd90,'listenAddr':':'+_0x489e36,'lifecycle':_0x4c0f90?_0x24cc38(0x21b):_0x24cc38(0x1fb),'processing':_0x62a7cb??null,'stats':_0x1e2dca??null})['catch'](()=>{});}},_0x4d5c87=_0x40f449=>_0xbe14c2(_0x491653(0x2c2)+_0x489e36,_0x40f449),_0x4453c2=_0x360a79=>{const _0x38d75a=_0x491653,_0x3314ce=_0x36f1b3?.[_0x38d75a(0x20e)];if(!_0x3314ce?.[_0x38d75a(0x2a4)]?.())return![];return _0x3314ce[_0x38d75a(0x24d)]('slot',_0x4d5c87(_0x360a79))?.[_0x38d75a(0x29b)]===!![];};for(let _0x12adf8=0x0;_0x12adf8<_0x3eed5c;_0x12adf8++){const _0x321926=_0x4453c2(_0x12adf8);_0x1852ab[_0x491653(0x296)](_0x12adf8,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x321926,'respawnTimer':null}),_0x321926?console['log']('[okdb-cluster]\x20slot='+_0x12adf8+_0x491653(0x1bd)):_0x46acfd(_0x12adf8);}const _0x2ba3ba=()=>{const _0x1b4c15=_0x491653,_0x445889=_0x36f1b3?.[_0x1b4c15(0x20e)];if(!_0x445889?.[_0x1b4c15(0x2d8)]||!_0x445889[_0x1b4c15(0x2a4)]?.())return;for(const [_0x1acd05,_0x3d1089]of _0x1852ab[_0x1b4c15(0x2e5)]()){const _0x45c2c4=_0x445889[_0x1b4c15(0x24d)]('slot',_0x4d5c87(_0x1acd05)),_0x522f20=_0x45c2c4?.['decommission']===!![],_0x2983c8=_0x45c2c4?.[_0x1b4c15(0x15b)]===!![];if(_0x522f20&&!_0x3d1089[_0x1b4c15(0x105)]){_0x3d1089[_0x1b4c15(0x105)]=!![];_0x3d1089[_0x1b4c15(0x26e)]&&(clearTimeout(_0x3d1089[_0x1b4c15(0x26e)]),_0x3d1089[_0x1b4c15(0x26e)]=null);for(const {worker:_0x4b7bf0}of _0x30ef9f['values']()){if(_0x364111(_0x4b7bf0)!==_0x1acd05||_0x4b7bf0['isDead']())continue;try{if(_0x2983c8)_0x4b7bf0[_0x1b4c15(0x2d3)]['kill']('SIGKILL');else _0x4b7bf0['isConnected']()&&_0x4b7bf0[_0x1b4c15(0x1b1)]();}catch{}}console['log'](_0x1b4c15(0x276)+(_0x2983c8?_0x1b4c15(0xec):'decommissioned')+_0x1b4c15(0xd9)+_0x1acd05+_0x1b4c15(0x284));}else{if(!_0x522f20&&_0x3d1089[_0x1b4c15(0x105)]&&_0x45c2c4){_0x3d1089[_0x1b4c15(0x105)]=![],_0x3d1089[_0x1b4c15(0xd6)]=[],_0x3d1089[_0x1b4c15(0x14a)]=0x0;const _0x448050=[..._0x30ef9f[_0x1b4c15(0x1dd)]()][_0x1b4c15(0x160)](({worker:_0x1f42ef})=>_0x364111(_0x1f42ef)===_0x1acd05&&!_0x1f42ef[_0x1b4c15(0x163)]());!_0x448050&&!_0x2e926e&&(_0x46acfd(_0x1acd05),console['log'](_0x1b4c15(0x11d)+_0x1acd05));}}}},_0x2805d7=()=>{try{_0x2ba3ba();}catch{}};_0x36f1b3?.[_0x491653(0x139)]?.['on']?.(_0x202811[_0x491653(0xc6)],_0x2805d7);const _0x6c7c39=[];if(_0x36f1b3?.[_0x491653(0x139)]?.['on'])for(const _0x22f1b3 of _0x2624cb){const _0x338b7e=_0xeed357=>{_0x3017ce({[_0x563ecb]:_0x4362bb,'event':_0x22f1b3,'data':_0xeed357??{}});};_0x36f1b3[_0x491653(0x139)]['on'](_0x22f1b3,_0x338b7e),_0x6c7c39[_0x491653(0x242)]({'event':_0x22f1b3,'handler':_0x338b7e});}const _0x34b625=setInterval(()=>{_0x2ba3ba(),_0x37d404();},_0x48cbbd);_0x34b625[_0x491653(0x1b8)]?.();const _0x325bd8=(_0x55ca48,_0xbb7c1a)=>{const _0x4df44b=_0x491653;if(!_0xbb7c1a||typeof _0xbb7c1a!=='object'||_0xbb7c1a[_0x563ecb]!==_0x2b1558)return;if(!_0x36f1b3?.[_0x4df44b(0x2c7)]?.[_0x4df44b(0x2ea)])return;const _0x8f67f8=_0xbb7c1a[_0x4df44b(0x16f)]||{};_0x36f1b3['log'][_0x4df44b(0x2ea)]({..._0x8f67f8,'msg':'[w'+_0xbb7c1a[_0x4df44b(0xef)]+']\x20'+(_0x8f67f8['msg']??''),'meta':{..._0x8f67f8[_0x4df44b(0x14e)]||{},'worker':_0xbb7c1a[_0x4df44b(0xef)],'workerPid':_0xbb7c1a[_0x4df44b(0x2de)]}});};_0x50b153['on'](_0x491653(0xf9),_0x325bd8);const _0x93e07b=(_0x21dc4a,_0xc592de)=>{const _0x42dd4f=_0x491653;if(!_0xc592de||typeof _0xc592de!==_0x42dd4f(0x29e)||_0xc592de[_0x563ecb]!==_0x50a606)return;const _0xb269d8=_0x30ef9f[_0x42dd4f(0x1bf)](_0x21dc4a['process'][_0x42dd4f(0x2de)]);if(_0xb269d8){_0xb269d8[_0x42dd4f(0x14b)]={..._0xc592de['stats'],'at':Date[_0x42dd4f(0x281)]()};if(_0xc592de[_0x42dd4f(0x1bb)]!==undefined)_0xb269d8[_0x42dd4f(0x1bb)]=_0xc592de[_0x42dd4f(0x1bb)];}};_0x50b153['on'](_0x491653(0xf9),_0x93e07b),_0x50b153['on'](_0x491653(0x25a),(_0x5223f1,_0x4cf79a,_0x454545)=>{const _0x477e58=_0x491653,_0x2b2b7b=_0x5223f1[_0x477e58(0x2d3)][_0x477e58(0x2de)],_0x4b1f22=_0x364111(_0x5223f1),_0x1705e1=_0x30ef9f['get'](_0x2b2b7b);if(_0x1705e1&&_0x36f1b3?.['processes'])_0x36f1b3[_0x477e58(0x20e)][_0x477e58(0x2e6)](_0x2b2b7b+':'+_0x1705e1[_0x477e58(0x148)])[_0x477e58(0x2cd)](()=>{});_0x30ef9f[_0x477e58(0x102)](_0x2b2b7b),console[_0x477e58(0x2c7)](_0x477e58(0x1f4)+_0x2b2b7b+_0x477e58(0xdb)+(_0x4b1f22??'?')+_0x477e58(0x143)+(_0x477e58(0x1eb)+_0x4cf79a+',\x20signal='+(_0x454545??_0x477e58(0x206))+_0x477e58(0x279)+_0x30ef9f[_0x477e58(0x1f9)]+_0x477e58(0x2a2))),_0x37d404();if(_0x2e926e||_0x4b1f22==null)return;const _0x3f56a0=_0x1852ab[_0x477e58(0x1bf)](_0x4b1f22);if(!_0x3f56a0||_0x3f56a0[_0x477e58(0x105)])return;const _0x7b6bf8=Date['now']();_0x3f56a0[_0x477e58(0xd6)]['push'](_0x7b6bf8),_0x3f56a0[_0x477e58(0xd6)]=_0x3f56a0[_0x477e58(0xd6)]['filter'](_0x11ee84=>_0x7b6bf8-_0x11ee84<=_0x5cfb6e);if(_0x3f56a0['deaths'][_0x477e58(0x273)]>=_0x26ff64){_0x3f56a0[_0x477e58(0x105)]=!![],console[_0x477e58(0x231)](_0x477e58(0xe9)+_0x4b1f22+_0x477e58(0x2cb)+_0x3f56a0[_0x477e58(0xd6)][_0x477e58(0x273)]+_0x477e58(0x182)+(_0x5cfb6e+_0x477e58(0x2c5)+_0x30ef9f[_0x477e58(0x1f9)]+_0x477e58(0x141)));return;}_0x3f56a0[_0x477e58(0x14a)]++;const _0xe250db=Math[_0x477e58(0x249)](_0x4320c9,_0x38877c*0x2**(_0x3f56a0[_0x477e58(0x14a)]-0x1));console[_0x477e58(0x2c7)](_0x477e58(0x2af)+_0x4b1f22+'\x20in\x20'+_0xe250db+_0x477e58(0x119)+_0x3f56a0[_0x477e58(0x14a)]+')'),_0x3f56a0[_0x477e58(0x26e)]=setTimeout(()=>{const _0x5bf880=_0x477e58;_0x3f56a0[_0x5bf880(0x26e)]=null;if(_0x2e926e||_0x3f56a0[_0x5bf880(0x105)])return;const _0x141b2c=_0x46acfd(_0x4b1f22);_0x141b2c[_0x5bf880(0x194)](_0x5bf880(0x1b5),()=>{const _0x408ce7=_0x5bf880;if(_0x1852ab[_0x408ce7(0x1bf)](_0x4b1f22)===_0x3f56a0)_0x3f56a0[_0x408ce7(0x14a)]=0x0;});},_0xe250db),_0x3f56a0[_0x477e58(0x26e)][_0x477e58(0x1b8)]?.();});const _0x2cadae=[..._0x30ef9f[_0x491653(0x216)]()];console[_0x491653(0x2c7)]('[okdb-cluster]\x20primary\x20pid='+process[_0x491653(0x2de)]+_0x491653(0x2dd)+_0x3eed5c+_0x491653(0xc2)+_0x489e36+':\x20'+('['+_0x2cadae['join'](',\x20')+']'));const _0x3d7efc={'_isClusterController':!![],'port':_0x489e36,'primaryOkdb':_0x36f1b3??null,'status'(){const _0x87350c=_0x491653;return{'clustered':!![],'primaryPid':process[_0x87350c(0x2de)],'port':_0x489e36,'primaryRole':_0x36f1b3?.['role']??null,'processorPid':null,'supervisorPid':process[_0x87350c(0x2de)],'workers':[..._0x30ef9f[_0x87350c(0x1dd)]()][_0x87350c(0x188)](({worker:_0x41ab3c})=>({'pid':_0x41ab3c[_0x87350c(0x2d3)][_0x87350c(0x2de)],'id':_0x41ab3c['id'],'dead':_0x41ab3c[_0x87350c(0x163)]()}))};},async 'close'(){const _0x2eced8=_0x491653;_0x2e926e=!![];for(const _0x8063dc of _0x1852ab[_0x2eced8(0x1dd)]()){_0x8063dc[_0x2eced8(0x105)]=!![],_0x8063dc[_0x2eced8(0x26e)]&&(clearTimeout(_0x8063dc[_0x2eced8(0x26e)]),_0x8063dc[_0x2eced8(0x26e)]=null);}clearInterval(_0x34b625),_0x50b153['off'](_0x2eced8(0xf9),_0x325bd8),_0x50b153[_0x2eced8(0x232)]('message',_0x93e07b),_0x36f1b3?.[_0x2eced8(0x139)]?.[_0x2eced8(0x232)]?.(_0x202811[_0x2eced8(0xc6)],_0x2805d7);if(_0x36f1b3?.[_0x2eced8(0x139)]?.[_0x2eced8(0x232)])for(const {event:_0x430a41,handler:_0x4f86c0}of _0x6c7c39){try{_0x36f1b3[_0x2eced8(0x139)][_0x2eced8(0x232)](_0x430a41,_0x4f86c0);}catch{}}_0x6c7c39[_0x2eced8(0x273)]=0x0;const _0x18ebe0=[..._0x30ef9f['values']()][_0x2eced8(0x188)](({worker:_0x214a1c})=>_0x214a1c);if(_0x18ebe0['length']===0x0)return;await Promise[_0x2eced8(0x29a)](_0x18ebe0[_0x2eced8(0x188)](_0x4b1a65=>new Promise(_0x47f0e8=>{const _0x1921ad=_0x2eced8;if(_0x4b1a65['isDead']()){_0x47f0e8();return;}let _0xdba262=![];const _0x10c8fc=()=>{if(_0xdba262)return;_0xdba262=!![];if(_0x127826)clearTimeout(_0x127826);_0x47f0e8();};_0x4b1a65[_0x1921ad(0x194)](_0x1921ad(0x25a),_0x10c8fc);const _0x127826=setTimeout(()=>{const _0x127cd5=_0x1921ad;try{_0x4b1a65[_0x127cd5(0x2d3)][_0x127cd5(0x15b)]();}catch{}},_0x5d24e5+0x1f4);_0x127826[_0x1921ad(0x1b8)]?.();try{_0x4b1a65[_0x1921ad(0x1b1)]();}catch{try{_0x4b1a65[_0x1921ad(0x2d3)][_0x1921ad(0x15b)]();}catch{}}})));}};return _0x3d7efc;}async function _0x1bd1dd({makeOkdb:_0x16ea72,port:_0x937de7}){const _0x5d1e9c=_0x2ee492,_0x25df7e=await _0x16ea72();return _0x36d0ab(_0x25df7e),_0x25df7e[_0x5d1e9c(0x158)][_0x5d1e9c(0x19c)](_0x937de7);}function _0x36d0ab(_0x3c68d4){const _0x3303d3=_0x2ee492;if(!_0x3c68d4||_0x3c68d4[_0x3303d3(0x2b2)])return;_0x3c68d4['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x3103ff}=requireOkdbChangefeed(),_0x231bb3=_0x3c68d4['_adminRelay'];if(_0x231bb3&&typeof _0x231bb3[_0x3303d3(0xe3)]===_0x3303d3(0x156)){const _0x1b5e8f=new _0x3103ff(_0x3c68d4);_0x1b5e8f[_0x3303d3(0x2b7)](),_0x231bb3[_0x3303d3(0xe3)](_0x1b5e8f),_0x3c68d4[_0x3303d3(0x2d2)]=_0x1b5e8f;}}catch(_0x3fd195){_0x3c68d4[_0x3303d3(0x2c7)]?.[_0x3303d3(0x1ce)]?.(_0x3303d3(0x1cc)+(_0x3fd195?.[_0x3303d3(0xf9)]??_0x3fd195),{'feature':_0x3303d3(0xf1)});}const _0xbd5b7d=_0x428851=>{const _0x403a62=_0x3303d3;if(!_0x428851||typeof _0x428851!==_0x403a62(0x29e)||_0x428851[_0x563ecb]==null)return;if(_0x428851[_0x563ecb]===_0x4362bb)try{_0x3c68d4[_0x403a62(0xd7)]?.[_0x403a62(0x294)]?.(_0x428851[_0x403a62(0x2c1)],_0x428851[_0x403a62(0x1c8)]);}catch{}};process['on']('message',_0xbd5b7d),_0x3c68d4[_0x3303d3(0x22a)]=_0xbd5b7d;{let _0x34336f=process[_0x3303d3(0x136)](),_0x5b46d8=Date[_0x3303d3(0x281)]();const _0x1bf3fe=()=>{const _0xa4b108=_0x3303d3;if(typeof process[_0xa4b108(0x1dc)]!==_0xa4b108(0x156)||!process[_0xa4b108(0xc5)])return;const _0x1b07d0=Date[_0xa4b108(0x281)](),_0x473b41=process['cpuUsage'](),_0x10f65b=(_0x1b07d0-_0x5b46d8)*0x3e8,_0x4ac6e1=_0x473b41['user']-_0x34336f[_0xa4b108(0x151)]+(_0x473b41[_0xa4b108(0x22c)]-_0x34336f['system']),_0x4e7215=_0x10f65b>0x0?Math[_0xa4b108(0x249)](0x64,Math[_0xa4b108(0x1b7)](_0x4ac6e1/(_0x10f65b*(_0x543808[_0xa4b108(0x18d)]()[_0xa4b108(0x273)]||0x1))*0x64)):0x0;_0x34336f=_0x473b41,_0x5b46d8=_0x1b07d0;const _0x27c962=process[_0xa4b108(0x295)]();let _0x4f2bd9=null;try{_0x4f2bd9=_0x3c68d4[_0xa4b108(0x2b8)]?.[_0xa4b108(0xed)]?_0x3c68d4['processes']?.[_0xa4b108(0x24b)]?.()??null:null;}catch{}try{process['send']({[_0x563ecb]:_0x50a606,'stats':{'rss':_0x27c962[_0xa4b108(0x16e)],'heapUsed':_0x27c962[_0xa4b108(0xd4)],'heapTotal':_0x27c962['heapTotal'],'external':_0x27c962[_0xa4b108(0x239)],'cpuPct':_0x4e7215,'cpuWindowMs':Math[_0xa4b108(0x1b7)](_0x10f65b/0x3e8)||null},'processing':_0x4f2bd9});}catch{}},_0x2c7229=Math[_0x3303d3(0x213)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x416cf6=setInterval(_0x1bf3fe,_0x2c7229);_0x416cf6[_0x3303d3(0x1b8)]?.(),_0x1bf3fe();for(const _0x5a8596 of[_0x3303d3(0x1c4),_0x3303d3(0xc4)]){_0x3c68d4[_0x3303d3(0x139)]?.['on']?.(_0x5a8596,()=>{try{_0x1bf3fe();}catch{}});}}let _0x535bfb=![];const _0x4feb23=async _0x5e4563=>{const _0x275b91=_0x3303d3;if(_0x535bfb)return;_0x535bfb=!![];const _0x2c943f=setTimeout(()=>process[_0x275b91(0x25a)](_0x5e4563),_0x5d24e5);_0x2c943f[_0x275b91(0x1b8)]?.();try{await _0x3c68d4['close']?.();}catch{}process[_0x275b91(0x25a)](_0x5e4563);};process['on']('disconnect',()=>_0x4feb23(0x0));if(process[_0x3303d3(0x100)]!==_0x3303d3(0x2a0)){const _0x2ee181=setInterval(()=>{if(process['ppid']===0x1)_0x4feb23(0x0);},_0x2f0390);_0x2ee181[_0x3303d3(0x1b8)]?.(),_0x3c68d4[_0x3303d3(0x244)]=_0x2ee181;}}return okdbCluster={'runClustered':_0x1f51a0,'attachWorkerCluster':_0x36d0ab},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x1d56e9=_0x22d7b4;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x38071a=require$$0$5,{attachWorkerCluster:_0x2b4ebf}=requireOkdbCluster();async function _0x48edc9(){const _0x2814d9=_0x23ad,_0x5c12e1=process.env.OKDB_HTTP_CHILD;if(!_0x5c12e1)throw new Error(_0x2814d9(0x184));const {rootPath:_0x468d23,port:_0x59f28c,options:options={},logLevel:logLevel=_0x2814d9(0x190)}=JSON[_0x2814d9(0xe4)](_0x5c12e1);if(!_0x468d23||!_0x59f28c)throw new Error(_0x2814d9(0x255));const _0x402880=new _0x38071a(_0x468d23,{...options,'engines':![],'processors':![],'compaction':![]});_0x402880[_0x2814d9(0x2c7)][_0x2814d9(0x272)]?.();const _0xdfb2b=process.env.OKDB_CLUSTER_SLOT??'?',_0xe98e9e={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x4554ee=_0xe98e9e[logLevel]??_0xe98e9e[_0x2814d9(0x190)];_0x402880[_0x2814d9(0x2c7)][_0x2814d9(0x2ef)](_0x445dd1=>{const _0x392d26=_0x2814d9;if((_0xe98e9e[_0x445dd1[_0x392d26(0x2ac)]]??0x1)<_0x4554ee)return;try{process[_0x392d26(0x1dc)]?.({'__okdbCluster':_0x392d26(0x2c7),'slot':_0xdfb2b,'pid':process[_0x392d26(0x2de)],'entry':_0x445dd1});}catch{}}),await _0x402880[_0x2814d9(0x2ae)](),_0x2b4ebf(_0x402880),await _0x402880['http'][_0x2814d9(0x19c)](_0x59f28c);}return _0x48edc9()[_0x1d56e9(0x2cd)](_0x242a2d=>{const _0x146184=_0x1d56e9;try{process[_0x146184(0x1dc)]?.({'__okdbCluster':_0x146184(0x2c7),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x146184(0x2de)],'entry':{'level':_0x146184(0x231),'msg':_0x146184(0x166)+(_0x242a2d?.[_0x146184(0xf9)]??_0x242a2d)}});}catch{}process[_0x146184(0x25a)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x22d7b4(0xfb)]=okdbHttpWorkerChild;
1
+ 'use strict';const _0x24af3f=_0x5df3;(function(_0x4cb39a,_0x1ecc8c){const _0x4f5260=_0x5df3,_0x4e03e8=_0x4cb39a();while(!![]){try{const _0x5429ad=parseInt(_0x4f5260(0x1a8))/0x1*(-parseInt(_0x4f5260(0x289))/0x2)+-parseInt(_0x4f5260(0x1a2))/0x3+parseInt(_0x4f5260(0x1f5))/0x4*(-parseInt(_0x4f5260(0x305))/0x5)+-parseInt(_0x4f5260(0x32e))/0x6+-parseInt(_0x4f5260(0x1e2))/0x7*(-parseInt(_0x4f5260(0x1c2))/0x8)+parseInt(_0x4f5260(0x373))/0x9*(-parseInt(_0x4f5260(0x1cd))/0xa)+parseInt(_0x4f5260(0x36f))/0xb;if(_0x5429ad===_0x1ecc8c)break;else _0x4e03e8['push'](_0x4e03e8['shift']());}catch(_0x3b2e45){_0x4e03e8['push'](_0x4e03e8['shift']());}}}(_0x17bb,0x530cb));var require$$0$5=require(_0x24af3f(0x320)),require$$1$1=require(_0x24af3f(0x311)),require$$1=require(_0x24af3f(0x2bb)),require$$0$3=require('os'),require$$2=require(_0x24af3f(0x369)),require$$0=require(_0x24af3f(0x244)),require$$0$2=require(_0x24af3f(0x2c5)),require$$0$1=require('fs'),require$$0$4=require(_0x24af3f(0x1ee));function getDefaultExportFromCjs(_0x7264c){const _0x32c753=_0x24af3f;return _0x7264c&&_0x7264c['__esModule']&&Object['prototype'][_0x32c753(0x36d)]['call'](_0x7264c,_0x32c753(0x279))?_0x7264c[_0x32c753(0x279)]:_0x7264c;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4dc4d4=_0x24af3f;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3c517b={'PUT':_0x4dc4d4(0x1dc),'REMOVE':_0x4dc4d4(0x39b),'INDEX_DROP':_0x4dc4d4(0x371),'INDEX_REGISTER':_0x4dc4d4(0x187),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':_0x4dc4d4(0x189),'FTS_REGISTER':_0x4dc4d4(0x2fa),'FTS_DROP':_0x4dc4d4(0x381),'FTS_RESET':'resetFts','SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x4dc4d4(0x190),'TTL_SET':_0x4dc4d4(0x345),'TTL_CLEAR':'clearTtl'},_0x52ffd8={'SYSTEM_READY':_0x4dc4d4(0x1b1),'SYSTEM_STOPPED':_0x4dc4d4(0x29d),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x4dc4d4(0x227),'SYSTEM_DRAIN':_0x4dc4d4(0x284),'SYSTEM_TYPE_DROP':_0x4dc4d4(0x380),'SYSTEM_PROC':_0x4dc4d4(0x1d7),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x4dc4d4(0x19d),'ITEM_UPDATE':_0x4dc4d4(0x30e),'ITEM_REMOVE':_0x4dc4d4(0x3b2),'INDEX_RESET':_0x4dc4d4(0x297),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x4dc4d4(0x2b1),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x4dc4d4(0x390),'INDEX_REGISTERED':_0x4dc4d4(0x27c),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x4dc4d4(0x2a2),'FTS_RESET':_0x4dc4d4(0x192),'SCHEMA_SET':_0x4dc4d4(0x2ea),'SCHEMA_DROP':_0x4dc4d4(0x1f2),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x4dc4d4(0x376),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x4dc4d4(0x20e),'SYNC_APPLY':_0x4dc4d4(0x257),'TXN_START':'txn:start','TXN_END':'txn:end','TXN_ROLLBACK':_0x4dc4d4(0x2ce),'TYPE_REGISTERED':_0x4dc4d4(0x341),'TYPE_DROP':_0x4dc4d4(0x1a0),'ENV_OPENED':_0x4dc4d4(0x37d),'ENV_REMOVED':_0x4dc4d4(0x383),'SYSTEM_ENV_RELEASE':_0x4dc4d4(0x1a3),'TTL_EXPIRED':_0x4dc4d4(0x348),'TTL_SET':_0x4dc4d4(0x334),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x4dc4d4(0x1f3),'LICENSE_ACTIVATED':_0x4dc4d4(0x31e),'LICENSE_REMOVED':_0x4dc4d4(0x24e)},_0xef4c05={'CREATING':'creating','RESETTING':_0x4dc4d4(0x2b0),'READY':_0x4dc4d4(0x38a),'DROPPING':_0x4dc4d4(0x34b),'WAITING':_0x4dc4d4(0x3ac)},_0x31b495={'CREATED':_0x4dc4d4(0x208),'STARTING':'starting','STARTED':_0x4dc4d4(0x393),'STOPPING':_0x4dc4d4(0x223),'STOPPED':_0x4dc4d4(0x1ae)},_0x35388c={'CREATING':_0x4dc4d4(0x2aa),'READY':_0x4dc4d4(0x38a),'HALTED':_0x4dc4d4(0x207),'STOPPED':_0x4dc4d4(0x1ae),'RESETTING':_0x4dc4d4(0x2b0)},_0x1b9bae=Object[_0x4dc4d4(0x307)]({'POKE':'bus:poke','DRAIN':_0x4dc4d4(0x247),'TYPE_DROP':_0x4dc4d4(0x204),'PROC':_0x4dc4d4(0x382),'ENV_RELEASE':_0x4dc4d4(0x33f)});return okdbEnums={'BUS_EVENTS':_0x1b9bae,'CHANGE_ACTIONS':_0x3c517b,'EVENTS':_0x52ffd8,'INDEX_STATE':_0xef4c05,'OKDB_STATE':_0x31b495,'VIEW_STATE':_0x35388c},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x111874=_0x24af3f;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x149321,performance:_0x2692d3}=require$$0,_0x3d63a7=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x200265=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2b3600=process.env.OKDB_LOOP_LAG_ALL==='1',_0x5b7475=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x2385d0{constructor(){const _0x2718ff=_0x5df3;this[_0x2718ff(0x2c6)]=_0x3d63a7,this[_0x2718ff(0x20d)]=new Map(),this['_h']=null,this[_0x2718ff(0x386)]=null,this[_0x2718ff(0x2a9)]=![],this[_0x2718ff(0x28b)]=(_0x1fc0de,_0x315245)=>process[_0x2718ff(0x1b3)][_0x2718ff(0x368)](_0x1fc0de+(_0x315245?'\x20'+JSON[_0x2718ff(0x27a)](_0x315245):'')+'\x0a');}['now'](){const _0x2bbc75=_0x5df3;return _0x2692d3[_0x2bbc75(0x353)]();}['setLogger'](_0xa9e8f0){const _0x21035e=_0x5df3;if(typeof _0xa9e8f0===_0x21035e(0x22c))this[_0x21035e(0x28b)]=_0xa9e8f0;}[_0x111874(0x209)](_0x1aa285,_0x30ac3a,_0x41f3b4){const _0x4db4be=_0x111874;if(!this[_0x4db4be(0x2c6)])return;let _0x53539a=this[_0x4db4be(0x20d)]['get'](_0x1aa285);!_0x53539a&&(_0x53539a={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x4db4be(0x2b3)](_0x1aa285,_0x53539a)),_0x53539a['ms']+=_0x30ac3a,_0x53539a[_0x4db4be(0x309)]+=0x1,_0x30ac3a>_0x53539a[_0x4db4be(0x275)]&&(_0x53539a[_0x4db4be(0x275)]=_0x30ac3a,_0x53539a['maxExtra']=_0x41f3b4||'');}[_0x111874(0x2b4)](_0x55b330){const _0x3cb63a=_0x111874;if(!this['enabled']||this[_0x3cb63a(0x2a9)])return;this[_0x3cb63a(0x2a9)]=!![];if(_0x55b330)this[_0x3cb63a(0x28b)]=_0x55b330;this['_h']=_0x149321({'resolution':0xa}),this['_h'][_0x3cb63a(0x3aa)](),this[_0x3cb63a(0x386)]=setInterval(()=>this[_0x3cb63a(0x2d6)](),_0x200265);if(this['_timer'][_0x3cb63a(0x36e)])this[_0x3cb63a(0x386)][_0x3cb63a(0x36e)]();}[_0x111874(0x22a)](_0x1fd3bf){const _0xce976f=_0x111874;if(!this[_0xce976f(0x1f9)])this[_0xce976f(0x1f9)]=new Set();this[_0xce976f(0x1f9)][_0xce976f(0x281)](_0x1fd3bf);if(!this[_0xce976f(0x2a9)])this[_0xce976f(0x260)]();}['offWindow'](_0x34a0c0){const _0x5c64fe=_0x111874;this[_0x5c64fe(0x1f9)]?.['delete'](_0x34a0c0);}['_startAdmission'](){const _0x1f2a85=_0x111874;if(this['_admissionStarted'])return;this[_0x1f2a85(0x354)]=!![];!this['_h']&&(this['_h']=_0x149321({'resolution':0xa}),this['_h'][_0x1f2a85(0x3aa)]());const _0x40b979=_0x200265;this[_0x1f2a85(0x38c)]=setInterval(()=>{const _0x2ea680=_0x1f2a85,_0x5c96b5=this['_h'];if(!_0x5c96b5)return;const _0x85abe=_0x5c96b5[_0x2ea680(0x37f)](0x63)/0xf4240,_0x482505=_0x5c96b5[_0x2ea680(0x1fd)]/0xf4240,_0x335e7a=_0x5c96b5[_0x2ea680(0x346)]/0xf4240;_0x5c96b5[_0x2ea680(0x2ee)]();if(this[_0x2ea680(0x1f9)])for(const _0x1eec19 of this[_0x2ea680(0x1f9)]){try{_0x1eec19({'p99Ms':_0x85abe,'maxMs':_0x482505,'meanMs':_0x335e7a,'reportMs':_0x40b979});}catch{}}},_0x40b979);if(this[_0x1f2a85(0x38c)][_0x1f2a85(0x36e)])this['_admissionTimer']['unref']();}[_0x111874(0x2d6)](){const _0x22f5f6=_0x111874,_0x11b683=this['_h'],_0x566fd5=_0x11b683['max']/0xf4240,_0x5991de=_0x11b683[_0x22f5f6(0x37f)](0x63)/0xf4240,_0x45c70d=_0x11b683['mean']/0xf4240;_0x11b683['reset']();const _0xc94d94=[...this[_0x22f5f6(0x20d)][_0x22f5f6(0x3a6)]()][_0x22f5f6(0x28d)](([_0x523c8c,_0x69d9d0])=>({'label':_0x523c8c,..._0x69d9d0}))['sort']((_0x1d619d,_0xe7b0ea)=>_0xe7b0ea['ms']-_0x1d619d['ms'])['slice'](0x0,0x8);this['_buckets'][_0x22f5f6(0x1bc)]();const _0x557585=_0xc94d94[_0x22f5f6(0x2f5)]((_0x27937e,_0x1ff1b1)=>_0x27937e+_0x1ff1b1['ms'],0x0),_0x2de35d=_0xc94d94[_0x22f5f6(0x28d)](_0x4fc215=>_0x4fc215[_0x22f5f6(0x231)]+'='+_0x4fc215['ms'][_0x22f5f6(0x38b)](0x0)+_0x22f5f6(0x211)+_0x4fc215['count']+(_0x4fc215[_0x22f5f6(0x275)]>0x5?'(worst\x20'+_0x4fc215[_0x22f5f6(0x275)][_0x22f5f6(0x38b)](0x0)+'ms'+(_0x4fc215['maxExtra']?'\x20'+_0x4fc215[_0x22f5f6(0x28a)]:'')+')':''));(_0x2b3600||_0x566fd5>=_0x5b7475)&&this[_0x22f5f6(0x28b)](_0x22f5f6(0x1a5)+_0x200265+_0x22f5f6(0x28f)+_0x566fd5[_0x22f5f6(0x38b)](0x0)+'ms\x20p99='+_0x5991de[_0x22f5f6(0x38b)](0x0)+_0x22f5f6(0x32a)+_0x45c70d[_0x22f5f6(0x38b)](0x0)+_0x22f5f6(0x337)+_0x557585['toFixed'](0x0)+'ms'+(_0x2de35d[_0x22f5f6(0x2d8)]?_0x22f5f6(0x310)+_0x2de35d[_0x22f5f6(0x258)]('\x20\x20'):''),{'feature':_0x22f5f6(0x2ff)});if(this[_0x22f5f6(0x1f9)])for(const _0x3184aa of this[_0x22f5f6(0x1f9)]){try{_0x3184aa({'p99Ms':_0x5991de,'maxMs':_0x566fd5,'meanMs':_0x45c70d,'reportMs':_0x200265});}catch{}}}[_0x111874(0x224)](){const _0x3e7887=_0x111874;if(this['_timer'])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x3e7887(0x1f0)]();this[_0x3e7887(0x386)]=null,this['_h']=null,this[_0x3e7887(0x2a9)]=![];}}const _0x154c79=new _0x2385d0();if(_0x154c79['enabled'])_0x154c79[_0x111874(0x2b4)]();return okdbLoopMonitor={'LOOP':_0x154c79},okdbLoopMonitor;}function _0x17bb(){const _0x50a005=['processor:progress','lifecycle','cluster:','isPrimary','openDB','INDEX_READY','_clusterOrphanWatch','ms\x20mean=','draining','_heartbeatTimer','cpuUsage','2836554kHaVOg','[okdb-cluster]\x20worker\x20pid=','processor:resumed','_inflight','filter','INDEX_RESET','ttl:set','_coordinator','~processes:desired','ms\x20busy=','_committed','disconnect','info','_removeRowAsync','emit','isWanted','find','bus:env_release','parkedNow','type:registered','has','_collectWriterFacet','\x20pid=','setTtl','mean','processors','ttl:expired','_kind','connected','dropping','okdb-http-worker-child.js','workers','pid','_migrateVocab','process','view','nodeKey','now','_admissionStarted','ttlMs','deregisterSelf','_onItem','.log','stopHeartbeat','uncaughtException','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','ingest','_drain','_adminRelay','delete','_bpWaiters','compact','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','prependListener','_holderDead','supervisorKey','user','_nodeDbFor','write','crypto','cpuPct','removeNode','meta','hasOwnProperty','unref','23016620UyBwIx','resetReadTxn','dropIndex','_processStartedAt','36198zykWRH','get','_baselines','unique:violation_resolved','attach','inst:','http','_isWriter','once','indexOf','env:opened','_changefeed','percentile','system:type_drop','dropFts','bus:proc','env:removed','embedded','attachFeed','_timer','_selfKey','flushLmdb','writerStatus','ready','toFixed','_admissionTimer','_maybePublish','exit','\x20@\x20','index:drop','_activateProcesses','noteListenAddr','started','flushDebounce','ms\x20env=','_cursors','registry\x20heartbeat\x20skipped\x20(writer=','startedAt','_dedupeMax','split','remove','_lastCpuUsage','getRange','selfKey',':want','error','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','ENV_CLOSING_RETRY','slot','memoryUsage','1ofN:','entries','_desired','_clusterWorkerAttached','caps','enable','fast','waiting','hostname','holder','inspect','_wantDb','_outstanding','item:remove','respawnTimer','2.1.2','_onTick','listNodes','ITEM_UPDATE','http\x20worker\x20child\x20failed:\x20','off','clearThreadStats','registerIndex','_key','dropType','_flushTimer','standalone','setDesired','isEnabled','REMOVE','_draining','dropSchema','heartbeatMs','fts:reset','assign','node/','_rowKey','cursorKey','heapTotal','_acquiredAt','expiresAt','allSettled','execArgv','dedupeMax','item:create','_children','transaction','type:drop','message','1368105VjifpG','system:env_release','_singletonLock','loop-lag\x20','randomUUID','listDesired','13kYZPzg','listening','_bpParkedTotal','copy','procmode/','_groupByProcess','stopped','cpus','fn-runner','system:ready','_onPoke','stderr','sandbox','_caps','_dedupeKey','catch','_nodeDb','\x20worker(s)\x20still\x20serving','resolve','repeat','clear','uptime','fanout','FTS_REGISTERED','ESRCH','processing','270680WHPogo','SWAP','inflightAgesMs','parse','[okdb-cluster]\x20slot=','_publishFailWarned','open','cli','rowKey','_putRowAsync','__okdbSlot','760gMtDoP','_onStop','level','okdb-diag.','_hbTimer','includes','_lock','_drainOne','okdb-writer:\x20env\x20closing\x20—\x20retry','deaths','system:proc','\x20statusEnv=','win32','__okdbCluster','_collectSingletonClaims','put','busy','singletonClaims',',\x20signal=','_heartbeatInFlight',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','49WHQhjl','VIEW_PROGRESS','values','registerType','external','_wantDbHandle','\x20worker\x20slot=','_rootDb','queue-worker','functions','tierList','_statusEnv','node:events','_nodeDead','disable','raw-put','schema:drop','license:added','splice','938356VrYISf','slice','getProcess','isConnected','_windowCbs','INDEX_REGISTERED','code','_markSeen','max','updatedAt','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','mode','single','push','\x20oldestPendingMs=','bus:type_drop','isDead','consecutiveFailures','halted','created','note','\x20phase=','warn','\x20===','_buckets','ref:violation_resolved','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','mkdirSync','ms/','isHeld','_putRowSync','value','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','isActive','_lastCpuPct','_cmd','slotKey','status','\x20\x20#','processor','flushed','number','processorId','getCmd','_threadStats','removeSync','stopping','stop','processor:paused','host','system:poke','abs','_versionSkewWarned','onWindow','_isStale','function','error:\x20',');\x20','send','_supervisorKey','label','_lockDb','_startHeartbeat','feed:','engines','_buildChildRow','removeSupervisedChild','size','all','processorsView','_flushDebounce','load','_handleInProcess','INDEX_PROGRESS','startsWith','ms\x20(attempt\x20','_highWater','oldestPendingMs','ITEM_REMOVE','node:perf_hooks','_getType','decommissioned','bus:drain','childTransaction','unclaimed','system','toISOString','_systemEnv','recordWrite','license:removed','_lastCpuWindowMs','next','putSync','round','extend','--test','\x0a\x20\x20\x20\x20\x20\x20','events','sync:apply','join','_enqueuedAt','running','stats','kill','[okdb-cluster]\x20primary\x20pid=','\x20HTTP\x20server(s)\x20on\x20port\x20','_quantum','_startAdmission','_isReader','name','markClosed','_handlePoke','decommissioning','_servingEngines','release','SYSTEM_PROC','rss','_seen','\x0a===\x20OKDB_DIAG\x20','~processes:cmd','\x20parkedNow=','_pending','close','role','[okdb-cluster]\x20','\x20\x20env=','publishOwnRow','list','maxMs','sync','SYNC_COMMITS','log','default','stringify','ppid','index:registered','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','envsOpen','quantum','putNode','add','bumpCmd','kind','system:drain','depth','_scheduleFlush','recent\x20writes\x20(newest\x20first)','committed','80006rLwAMX','maxExtra','_log','namespace','map','_role','ms\x20max=','getDesired','\x20(durable\x20desired-state)','keys','beforeWrite','dumpedAt','\x20died\x20','\x20times\x20in\x20','index:reset','decommission','data','instances','listenAddr','exports','system:stopped','processes','registry\x20publish\x20failing:\x20','processor:error','confirm','fts:drop','commitP99Ms','threads','building','publishChildRow','change','children','_started','creating','_desiredOverlay','acquiredAt','_envs','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','floor','resetting','index:progress','seq','set','start','online','options','processor:retry','ms\x20on\x20env=','setOwnMeta','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','path','SIGKILL','claims','state','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','createEnvironment','async','sort','_participate','version','perf_hooks','enabled','min','--inspect','appendFileSync','ORPHAN\x20(env-closed\x20write)','epoch','_refreshDesiredSnapshot','_buildOwnRow','txn:rollback','http-server','type','dead','shift','ITEM_CREATE','primary','_closed','_report','_buildProcessingFacet','length','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','processor:ready','stack','reap','_lastCpuAt','env','process\x20','\x20ipc\x20error:\x20','from','_instanceId','_sandbox','processKey','then','\x20in\x20','_publishNow','claimGated','_onProcEvent','schema:set','object','_durs','_startedAt','reset','startHeartbeat',')\x20exited\x20','_done','addSupervisedChild','node','runtimeProcessesView','reduce','listen','participate','getChanges','~lock','registerFts','--print','event','_lastPublishAt','afterWrite','loop-lag','_writer','\x20worker(s)\x20remaining','okdb','_ownMeta','_db','5RRhotu','string','freeze','commit','count','SYSTEM_POKE','\x20forked\x20','getClock','tryAcquire','item:update','transactionSync','\x20│\x20','cluster','_listenAddr','_singletonLocks','_enableChangelog','SYSTEM_STOPPED','worker','updateSupervisedChildStats','hasDesired','_ensureDesired','heapUsed','_released','--watch','_nodeDbCache','license:activated','cpuWindowMs','./okdb','FTS_DROP','fork'];_0x17bb=function(){return _0x50a005;};return _0x17bb();}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2daff2=require$$0$1,_0x3c31e2=require$$1;let _0x5d48db,_0x44522a,_0x4bf118,_0x133cb5,_0x5c28b4,_0x416290,_0x2f4cd8,_0x47f1c9=![];const _0x216139=new Set();let _0x260ead=null;const _0x552eba=new Map();function _0x5a8162(){const _0x34204b=_0x5df3;if(_0x5d48db!==undefined)return _0x5d48db;_0x5d48db=process.env.OKDB_DIAG==='1';if(!_0x5d48db)return![];_0x44522a=process.env.OKDB_DIAG_STACK==='1',_0x133cb5=Math[_0x34204b(0x1fd)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x4bf118=new Array(_0x133cb5),_0x5c28b4=0x0,_0x416290=0x0,_0x2f4cd8=process.env.OKDB_DIAG_DIR||null;if(_0x2f4cd8)try{_0x2daff2[_0x34204b(0x210)](_0x2f4cd8,{'recursive':!![]});}catch{}return!![];}function _0xedb912(){return _0x5d48db===undefined?_0x5a8162():_0x5d48db;}function _0x29471e(_0x52d47c,_0x2c9188){const _0x1d0cd2=_0x5df3;if(_0x5d48db===undefined?!_0x5a8162():!_0x5d48db)return;let _0x546946;if(_0x44522a){const _0xe93842=new Error()[_0x1d0cd2(0x2db)]||'';_0x546946=_0xe93842[_0x1d0cd2(0x39a)]('\x0a')[_0x1d0cd2(0x1f6)](0x3)[_0x1d0cd2(0x28d)](_0x5bcdd7=>_0x5bcdd7['trim']())[_0x1d0cd2(0x332)](Boolean)[_0x1d0cd2(0x1f6)](0x0,0x8);}_0x4bf118[_0x5c28b4]={'seq':_0x416290++,'t':Date[_0x1d0cd2(0x353)](),'env':_0x52d47c,'kind':_0x2c9188||_0x1d0cd2(0x308),'stack':_0x546946},_0x5c28b4=(_0x5c28b4+0x1)%_0x133cb5;}function _0x926dad(_0x5f58dc){const _0xcee69b=_0x5df3,_0x2e1c12=[];for(let _0xb4299c=0x0;_0xb4299c<_0x133cb5;_0xb4299c++){const _0x1027d8=_0x4bf118[(_0x5c28b4-0x1-_0xb4299c+_0x133cb5*0x2)%_0x133cb5];if(!_0x1027d8)continue;_0x2e1c12[_0xcee69b(0x202)](_0x1027d8);if(_0x2e1c12['length']>=_0x5f58dc)break;}return _0x2e1c12;}function _0x4d89a2(_0x4df45f){const _0x566966=_0x5df3;try{process['stderr'][_0x566966(0x368)](_0x4df45f+'\x0a');}catch{}if(_0x2f4cd8)try{_0x2daff2[_0x566966(0x2c9)](_0x3c31e2[_0x566966(0x258)](_0x2f4cd8,_0x566966(0x1d0)+process[_0x566966(0x34e)]+_0x566966(0x358)),_0x4df45f+'\x0a');}catch{}}function _0x244490(_0x9e9315){const _0x29e0f6=_0x5df3,_0x594fdf=_0x926dad(_0x9e9315);if(!_0x594fdf[_0x29e0f6(0x2d8)])return _0x29e0f6(0x362);const _0x3a1bae=Date[_0x29e0f6(0x353)]();return _0x594fdf[_0x29e0f6(0x28d)](_0x4c5e3d=>{const _0x23cc28=_0x29e0f6,_0x208e8a=_0x23cc28(0x21b)+_0x4c5e3d[_0x23cc28(0x2b2)]+'\x20-'+(_0x3a1bae-_0x4c5e3d['t'])+_0x23cc28(0x395)+_0x4c5e3d[_0x23cc28(0x2de)]+'\x20'+_0x4c5e3d[_0x23cc28(0x283)];return _0x4c5e3d[_0x23cc28(0x2db)]&&_0x4c5e3d[_0x23cc28(0x2db)]['length']?_0x208e8a+_0x23cc28(0x255)+_0x4c5e3d[_0x23cc28(0x2db)][_0x23cc28(0x258)](_0x23cc28(0x255)):_0x208e8a;})['join']('\x0a');}function _0x570d5f(_0x355c8b,_0x183355){const _0x375da3=_0x5df3,_0x309279=_0x375da3(0x26b)+_0x355c8b+_0x375da3(0x38f)+new Date()[_0x375da3(0x24b)]()+_0x375da3(0x344)+process[_0x375da3(0x34e)]+'\x20===',_0xbacde=[_0x309279,_0x375da3(0x22d)+(_0x183355&&_0x183355[_0x375da3(0x2db)]?_0x183355[_0x375da3(0x2db)]['split']('\x0a')[0x0]:_0x183355),_0x375da3(0x287)+(_0x44522a?'':_0x375da3(0x27d))+':',_0x244490(0x18),_0x4fac0c(),'='[_0x375da3(0x1bb)](_0x309279[_0x375da3(0x2d8)]-0x1)];_0x4d89a2(_0xbacde[_0x375da3(0x258)]('\x0a'));}function _0x1d557c(_0x362b4c){const _0x360ac8=_0x5df3;if(!_0xedb912())return;const _0x75803b=String(_0x362b4c&&_0x362b4c[_0x360ac8(0x1a1)]||_0x362b4c||''),_0x5174b9=/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x75803b);_0x570d5f(_0x5174b9?_0x360ac8(0x2ca):_0x360ac8(0x35a),_0x362b4c);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x5174b9)return;try{console[_0x360ac8(0x3a0)](_0x362b4c&&_0x362b4c[_0x360ac8(0x2db)]?_0x362b4c['stack']:_0x362b4c);}catch{}process[_0x360ac8(0x38e)](0x1);}function _0x4c7ea7(_0x433f14){const _0x3e7f18=_0x5df3;if(!_0xedb912())return;const _0x39a5fb=String(_0x433f14&&_0x433f14[_0x3e7f18(0x1a1)]||_0x433f14||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x39a5fb)&&_0x570d5f(_0x3e7f18(0x215),_0x433f14);}function _0x4fac0c(){const _0x3079d8=_0x5df3,_0x48f95e=[_0x3079d8(0x20f)];let _0x7f8093=![];for(const _0x129b52 of _0x216139){const _0xf3a7d6=_0x129b52&&_0x129b52[_0x3079d8(0x2ad)];if(!_0xf3a7d6)continue;for(const [_0x5b710a,_0x4f0e5f]of _0xf3a7d6){const _0x5aa492=_0x4f0e5f&&_0x4f0e5f[_0x3079d8(0x335)]&&_0x4f0e5f[_0x3079d8(0x335)]['view'];if(!_0x5aa492)continue;let _0x2111e5,_0x18c63c;try{_0x2111e5=Atomics[_0x3079d8(0x23c)](_0x5aa492,0x0),_0x18c63c=Atomics[_0x3079d8(0x23c)](_0x5aa492,0x1);}catch{continue;}if(_0x2111e5===0x0)continue;_0x7f8093=!![];const _0x17067e=_0x2111e5>0x0?_0x3079d8(0x1c3):_0x3079d8(0x1ab),_0x32a4a2=Date[_0x3079d8(0x353)]()-Math[_0x3079d8(0x228)](_0x2111e5)*0x3e8,_0x11d194=((()=>{const _0xced5e9=_0x3079d8;try{return _0x4f0e5f['_writer']&&_0x4f0e5f[_0xced5e9(0x300)][_0xced5e9(0x21a)]?_0x4f0e5f[_0xced5e9(0x300)][_0xced5e9(0x21a)]():null;}catch{return null;}})());_0x48f95e[_0x3079d8(0x202)](_0x3079d8(0x272)+_0x5b710a+_0x3079d8(0x20a)+_0x17067e+'\x20drainAge='+_0x32a4a2+'ms\x20activeWriters='+_0x18c63c+(_0x11d194?'\x20writer{depth='+_0x11d194[_0x3079d8(0x285)]+_0x3079d8(0x203)+_0x11d194['oldestPendingMs']+_0x3079d8(0x26d)+_0x11d194[_0x3079d8(0x340)]+'}':''));}}if(!_0x7f8093)_0x48f95e[_0x3079d8(0x202)]('\x20\x20(no\x20env\x20draining)');return _0x48f95e[_0x3079d8(0x258)]('\x0a');}function _0x351391(){const _0x3fb0a8=_0x5df3;if(!_0xedb912())return;const _0x2a0a42=Math[_0x3fb0a8(0x1fd)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x279e91=Date[_0x3fb0a8(0x353)]();for(const _0x17f4c2 of _0x216139){const _0x45f884=_0x17f4c2&&_0x17f4c2[_0x3fb0a8(0x2ad)];if(!_0x45f884)continue;for(const [_0x274e92,_0x22ecfe]of _0x45f884){const _0x4c9f1c=_0x22ecfe&&_0x22ecfe[_0x3fb0a8(0x335)]&&_0x22ecfe['_coordinator'][_0x3fb0a8(0x351)];if(!_0x4c9f1c)continue;let _0x563f96;try{_0x563f96=Atomics['load'](_0x4c9f1c,0x0);}catch{continue;}const _0x1592ad=_0x17f4c2[_0x3fb0a8(0x2bb)]+'|'+_0x274e92;if(_0x563f96<=0x0){_0x552eba[_0x3fb0a8(0x35f)](_0x1592ad);continue;}const _0xa2da14=_0x279e91-_0x563f96*0x3e8,_0xd4cf5f=_0x552eba[_0x3fb0a8(0x374)](_0x1592ad);if(_0xa2da14<_0x2a0a42)continue;if(_0xd4cf5f&&_0x279e91-_0xd4cf5f[_0x3fb0a8(0x294)]<_0x2a0a42)continue;_0x552eba[_0x3fb0a8(0x2b3)](_0x1592ad,{'firstTs':_0xd4cf5f?_0xd4cf5f['firstTs']:_0x563f96,'dumpedAt':_0x279e91});const _0x440074=_0x3fb0a8(0x35b)+_0xa2da14+_0x3fb0a8(0x2b8)+_0x274e92+'\x20@\x20'+new Date()['toISOString']()+_0x3fb0a8(0x344)+process[_0x3fb0a8(0x34e)]+_0x3fb0a8(0x20c);_0x4d89a2([_0x440074,_0x4fac0c(),'='['repeat'](_0x440074[_0x3fb0a8(0x2d8)]-0x1)]['join']('\x0a'));}}}function _0x1f282a(){const _0x43d4a7=_0x5df3;if(!_0xedb912()||_0x47f1c9)return;_0x47f1c9=!![],process['prependListener'](_0x43d4a7(0x35a),_0x1d557c),process[_0x43d4a7(0x363)]('unhandledRejection',_0x4c7ea7);const _0x11acd3=Math[_0x43d4a7(0x1fd)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x260ead=setInterval(_0x351391,_0x11acd3);if(_0x260ead['unref'])_0x260ead['unref']();}function _0x1d34a0(_0xd7df14){const _0x3dc037=_0x5df3;if(!_0xedb912()||!_0xd7df14)return;_0x216139[_0x3dc037(0x281)](_0xd7df14),_0x1f282a();}function _0x1a75a6(_0x4e49aa){const _0x5c623f=_0x5df3;_0x216139[_0x5c623f(0x35f)](_0x4e49aa);}function _0x3ceb19(){const _0x2afab4=_0x5df3;if(!_0xedb912())return{'enabled':![],'hint':_0x2afab4(0x2ae)};return{'enabled':!![],'stackCapture':!!_0x44522a,'recentWrites':_0x926dad(0x10),'drain':_0x4fac0c()};}return okdbDiag={'isEnabled':_0xedb912,'recordWrite':_0x29471e,'installDiag':_0x1f282a,'registerOkdb':_0x1d34a0,'unregisterOkdb':_0x1a75a6,'snapshot':_0x3ceb19},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x18cfbe=_0x24af3f;if(hasRequiredOkdbWriter)return okdbWriter[_0x18cfbe(0x29c)];hasRequiredOkdbWriter=0x1;const {performance:_0x5c6726}=require$$0$2,_0x434b6a=requireOkdbDiag(),_0x5a99c=process.env.OKDB_COMMIT_MODE===_0x18cfbe(0x276);class _0x500f45{constructor(_0x90e9c){const _0x2c8950=_0x18cfbe;this['env']=_0x90e9c,this[_0x2c8950(0x331)]=new Set(),this[_0x2c8950(0x259)]=new Map(),this[_0x2c8950(0x338)]=0x0,this['_durs']=[],this[_0x2c8950(0x2f1)]=[],this[_0x2c8950(0x241)]=Math[_0x2c8950(0x1fd)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x2c8950(0x3b1)]=0x0,this[_0x2c8950(0x360)]=[],this[_0x2c8950(0x1aa)]=0x0;}async[_0x18cfbe(0x19f)](_0x30b9b2,_0x2da728){const _0x49542b=_0x18cfbe;if(_0x434b6a[_0x49542b(0x18d)]())_0x434b6a[_0x49542b(0x24d)](this[_0x49542b(0x2de)]?.[_0x49542b(0x262)],_0x2da728);if(this[_0x49542b(0x2d5)]){const _0x56dc65=new Error(_0x49542b(0x1d5));_0x56dc65[_0x49542b(0x1fb)]=_0x49542b(0x3a2);throw _0x56dc65;}if(this[_0x49542b(0x241)]>0x0){let _0x49bb35=![];while(this[_0x49542b(0x3b1)]>=this[_0x49542b(0x241)]&&!this[_0x49542b(0x2d5)]){!_0x49bb35&&(_0x49bb35=!![],this[_0x49542b(0x1aa)]++),await new Promise(_0x569a98=>this['_bpWaiters'][_0x49542b(0x202)](_0x569a98));}if(this[_0x49542b(0x2d5)]){const _0x424f08=new Error(_0x49542b(0x1d5));_0x424f08['code']=_0x49542b(0x3a2);throw _0x424f08;}}this[_0x49542b(0x3b1)]++;const _0x12a279=this[_0x49542b(0x2de)][_0x49542b(0x335)];if(_0x12a279)await _0x12a279[_0x49542b(0x293)]();if(this[_0x49542b(0x2d5)]){if(_0x12a279)_0x12a279['afterWrite']();this[_0x49542b(0x3b1)]--;if(this[_0x49542b(0x360)][_0x49542b(0x2d8)]&&this['_outstanding']<this['_highWater'])this[_0x49542b(0x360)]['shift']()();const _0x14d9d9=new Error(_0x49542b(0x1d5));_0x14d9d9[_0x49542b(0x1fb)]='ENV_CLOSING_RETRY';throw _0x14d9d9;}const _0x337354=_0x5c6726['now']();if(_0x5a99c)try{const _0x2ae5fb=this[_0x49542b(0x2de)]['db'][_0x49542b(0x30f)](_0x30b9b2);this[_0x49542b(0x338)]++;if(this[_0x49542b(0x2ec)][_0x49542b(0x202)](_0x5c6726['now']()-_0x337354)>0x100)this[_0x49542b(0x2ec)][_0x49542b(0x2d2)]();if(this[_0x49542b(0x2f1)][_0x49542b(0x202)](_0x5c6726[_0x49542b(0x353)]())>0x800)this['_done'][_0x49542b(0x2d2)]();return _0x2ae5fb;}finally{this['_outstanding']--;if(this[_0x49542b(0x360)]['length']&&this[_0x49542b(0x3b1)]<this['_highWater'])this[_0x49542b(0x360)][_0x49542b(0x2d2)]()();if(_0x12a279)_0x12a279[_0x49542b(0x2fe)]();}const _0xc30d6c=this['env']['db'][_0x49542b(0x248)](_0x30b9b2);this['_inflight'][_0x49542b(0x281)](_0xc30d6c),this[_0x49542b(0x259)][_0x49542b(0x2b3)](_0xc30d6c,_0x337354);const _0x257f3a=()=>{const _0x41633a=_0x49542b;this[_0x41633a(0x331)][_0x41633a(0x35f)](_0xc30d6c),this[_0x41633a(0x259)][_0x41633a(0x35f)](_0xc30d6c),this['_committed']++,this['_outstanding']--;this['_bpWaiters'][_0x41633a(0x2d8)]&&this[_0x41633a(0x3b1)]<this[_0x41633a(0x241)]&&this['_bpWaiters']['shift']()();if(this[_0x41633a(0x2ec)][_0x41633a(0x202)](_0x5c6726['now']()-_0x337354)>0x100)this[_0x41633a(0x2ec)][_0x41633a(0x2d2)]();if(this['_done'][_0x41633a(0x202)](_0x5c6726[_0x41633a(0x353)]())>0x800)this['_done'][_0x41633a(0x2d2)]();};_0xc30d6c[_0x49542b(0x2e5)](_0x257f3a,_0x257f3a);try{return await _0xc30d6c;}finally{if(_0x12a279)_0x12a279[_0x49542b(0x2fe)]();}}[_0x18cfbe(0x21a)](){const _0x2dcb18=_0x18cfbe,_0x2e44a0=_0x5c6726['now']();let _0x33597b=0x0;for(const _0x122968 of this['_enqueuedAt'][_0x2dcb18(0x1e4)]()){const _0x1bb259=_0x2e44a0-_0x122968;if(_0x1bb259>_0x33597b)_0x33597b=_0x1bb259;}let _0xd633cb=0x0;for(let _0x533bc1=this['_done']['length']-0x1;_0x533bc1>=0x0;_0x533bc1--){if(_0x2e44a0-this[_0x2dcb18(0x2f1)][_0x533bc1]>0x3e8)break;_0xd633cb++;}let _0x11fd92=0x0;if(this[_0x2dcb18(0x2ec)]['length']){const _0x4be68b=[...this[_0x2dcb18(0x2ec)]][_0x2dcb18(0x2c2)]((_0x6f199f,_0xa7cd7d)=>_0x6f199f-_0xa7cd7d);_0x11fd92=_0x4be68b[Math['min'](_0x4be68b[_0x2dcb18(0x2d8)]-0x1,Math[_0x2dcb18(0x2af)](_0x4be68b['length']*0.99))];}return{'depth':this[_0x2dcb18(0x331)][_0x2dcb18(0x238)],'oldestPendingMs':Math['round'](_0x33597b),'committed':this[_0x2dcb18(0x338)],'commitsPerSec':_0xd633cb,'commitP99Ms':Math[_0x2dcb18(0x252)](_0x11fd92),'parkedNow':this['_bpWaiters'][_0x2dcb18(0x2d8)],'parkedTotal':this[_0x2dcb18(0x1aa)],'highWater':this[_0x2dcb18(0x241)]};}[_0x18cfbe(0x1c4)](){const _0x249476=_0x18cfbe,_0x4f98c5=_0x5c6726[_0x249476(0x353)]();return[...this['_enqueuedAt'][_0x249476(0x1e4)]()][_0x249476(0x28d)](_0x24242e=>Math[_0x249476(0x252)](_0x4f98c5-_0x24242e))['sort']((_0x2961e4,_0x3d4046)=>_0x3d4046-_0x2961e4);}[_0x18cfbe(0x263)](){const _0x7d22de=_0x18cfbe;this[_0x7d22de(0x2d5)]=!![];for(const _0x29d1ed of this[_0x7d22de(0x360)][_0x7d22de(0x1f4)](0x0))_0x29d1ed();}async['drain'](){const _0x3adf92=_0x18cfbe;let _0x29ac37=0x0;while(this[_0x3adf92(0x331)][_0x3adf92(0x238)]&&_0x29ac37++<0x3e8){await Promise[_0x3adf92(0x19a)]([...this[_0x3adf92(0x331)]]);}}async['put'](_0x14b031,_0x37ff82,_0x408793,_0xf8a836){const _0x1232c9=_0x18cfbe;return this[_0x1232c9(0x19f)](()=>{const _0x5350ad=_0x1232c9;if(_0xf8a836===undefined)_0x14b031['putSync'](_0x37ff82,_0x408793);else _0x14b031[_0x5350ad(0x251)](_0x37ff82,_0x408793,_0xf8a836);},_0x1232c9(0x1f1));}async[_0x18cfbe(0x39b)](_0x2048d7,_0x2064a9){const _0x46d06e=_0x18cfbe;return this[_0x46d06e(0x19f)](()=>_0x2048d7['removeSync'](_0x2064a9),'raw-remove');}}async function _0xcfd164(_0x1653d5,_0x1ee94d){const _0x153d14=_0x18cfbe;if(_0x1ee94d==null)_0x1ee94d=Math[_0x153d14(0x1fd)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x436132=_0x1653d5?.[_0x153d14(0x21d)];if(!_0x436132||typeof _0x436132[_0x153d14(0x2e5)]!==_0x153d14(0x22c))return;await Promise['race']([Promise[_0x153d14(0x1ba)](_0x436132)[_0x153d14(0x1b7)](()=>{}),new Promise(_0x286cdc=>{const _0x5af94d=_0x153d14,_0x525151=setTimeout(_0x286cdc,_0x1ee94d);if(_0x525151[_0x5af94d(0x36e)])_0x525151[_0x5af94d(0x36e)]();})]);}catch{}}function _0x449c83(_0xf7b397){const _0x35e1cf=_0x18cfbe;if(_0x5a99c)return Promise['resolve']();const _0x3ab2de=_0xf7b397?.[_0x35e1cf(0x288)];return _0x3ab2de&&typeof _0x3ab2de[_0x35e1cf(0x2e5)]===_0x35e1cf(0x22c)?_0x3ab2de:Promise[_0x35e1cf(0x1ba)]();}return okdbWriter[_0x18cfbe(0x29c)]=_0x500f45,okdbWriter['exports'][_0x18cfbe(0x388)]=_0xcfd164,okdbWriter[_0x18cfbe(0x29c)][_0x18cfbe(0x288)]=_0x449c83,okdbWriter[_0x18cfbe(0x29c)][_0x18cfbe(0x277)]=_0x5a99c,okdbWriter[_0x18cfbe(0x29c)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x4bf4de=_0x24af3f;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x42cc65=require$$0$3,{SYNC_COMMITS:_0x365f91}=requireOkdbWriter(),_0x35c186=_0x4bf4de(0x2f9);class _0x19e39a{constructor(_0x20924e,_0x3c5f4a,_0xd490a0){const _0x440271=_0x4bf4de;this[_0x440271(0x1d3)]=_0x20924e,this[_0x440271(0x188)]=_0x3c5f4a,this['_acquiredAt']=_0xd490a0,this[_0x440271(0x31b)]=![],this['_heartbeatTimer']=null,this[_0x440271(0x1e0)]=null;}[_0x4bf4de(0x212)](){const _0x2d1e37=_0x4bf4de;if(this[_0x2d1e37(0x31b)])return![];try{const _0x35ed91=this['_lock']['_db']()[_0x2d1e37(0x374)](this[_0x2d1e37(0x188)]);if(!_0x35ed91||_0x35ed91[_0x2d1e37(0x2ac)]!==this[_0x2d1e37(0x198)])return![];const _0x4c127e=_0x35ed91[_0x2d1e37(0x1fe)]??_0x35ed91['acquiredAt'];if(_0x4c127e+_0x35ed91[_0x2d1e37(0x355)]<Date[_0x2d1e37(0x353)]())return![];return!![];}catch{return!this['_released'];}}[_0x4bf4de(0x3ae)](){const _0x33000f=_0x4bf4de;if(this[_0x33000f(0x31b)])return null;try{return this[_0x33000f(0x1d3)][_0x33000f(0x304)]()[_0x33000f(0x374)](this[_0x33000f(0x188)])??null;}catch{return null;}}async[_0x4bf4de(0x253)](_0x4a2337){const _0x19f507=_0x4bf4de;if(this[_0x19f507(0x31b)])return;try{const _0x26649c=this[_0x19f507(0x1d3)]['_db']()[_0x19f507(0x374)](this[_0x19f507(0x188)]);if(!_0x26649c||_0x26649c[_0x19f507(0x2ac)]!==this[_0x19f507(0x198)])return;if(_0x365f91)this[_0x19f507(0x1d3)][_0x19f507(0x304)]()[_0x19f507(0x251)](this[_0x19f507(0x188)],{..._0x26649c,'ttlMs':_0x26649c[_0x19f507(0x355)]+_0x4a2337});else await this[_0x19f507(0x1d3)][_0x19f507(0x304)]()['put'](this[_0x19f507(0x188)],{..._0x26649c,'ttlMs':_0x26649c[_0x19f507(0x355)]+_0x4a2337});}catch{}}async[_0x4bf4de(0x267)](){const _0x2c2342=_0x4bf4de;if(this[_0x2c2342(0x31b)])return;if(this[_0x2c2342(0x1e0)])try{await this[_0x2c2342(0x1e0)];}catch{}clearInterval(this[_0x2c2342(0x32c)]),this[_0x2c2342(0x32c)]=null,this[_0x2c2342(0x31b)]=!![];try{const _0x9550c5=this['_lock'][_0x2c2342(0x304)]()[_0x2c2342(0x374)](this[_0x2c2342(0x188)]);if(_0x9550c5&&_0x9550c5[_0x2c2342(0x2ac)]===this[_0x2c2342(0x198)]){if(_0x365f91)this[_0x2c2342(0x1d3)]['_db']()['removeSync'](this[_0x2c2342(0x188)]);else await this[_0x2c2342(0x1d3)][_0x2c2342(0x304)]()[_0x2c2342(0x39b)](this['_key']);}}catch{}}['_startHeartbeat'](_0x3751ae,_0x56ac25){const _0x2acb91=_0x4bf4de,_0x5e66ba=_0x56ac25??Math[_0x2acb91(0x2af)](_0x3751ae/0x3);this[_0x2acb91(0x32c)]=setInterval(()=>{const _0x308372=_0x2acb91;if(this[_0x308372(0x31b)])return;this[_0x308372(0x1e0)]=((async()=>{const _0xe8fbc0=_0x308372;try{const _0x4e89f3=this[_0xe8fbc0(0x1d3)]['_db']()[_0xe8fbc0(0x374)](this[_0xe8fbc0(0x188)]);if(!_0x4e89f3||_0x4e89f3['acquiredAt']!==this[_0xe8fbc0(0x198)]){this[_0xe8fbc0(0x31b)]=!![],clearInterval(this[_0xe8fbc0(0x32c)]),this[_0xe8fbc0(0x32c)]=null;return;}if(_0x365f91)this[_0xe8fbc0(0x1d3)]['_db']()[_0xe8fbc0(0x251)](this[_0xe8fbc0(0x188)],{..._0x4e89f3,'updatedAt':Date['now']()});else await this[_0xe8fbc0(0x1d3)][_0xe8fbc0(0x304)]()[_0xe8fbc0(0x1dc)](this['_key'],{..._0x4e89f3,'updatedAt':Date[_0xe8fbc0(0x353)]()});}catch{}this[_0xe8fbc0(0x1e0)]=null;})());},_0x5e66ba);if(this[_0x2acb91(0x32c)]['unref'])this[_0x2acb91(0x32c)][_0x2acb91(0x36e)]();}}class _0x55192f{constructor(_0x4ad7d1,{namespace:_0x8a8ac6,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x1cbfda=_0x4bf4de;this['_rawDb']=_0x4ad7d1,this['namespace']=_0x8a8ac6,this[_0x1cbfda(0x355)]=ttlMs,this[_0x1cbfda(0x191)]=heartbeatMs,this[_0x1cbfda(0x232)]=null;}[_0x4bf4de(0x304)](){const _0x3a11e4=_0x4bf4de;return!this[_0x3a11e4(0x232)]&&(this['_lockDb']=this['_rawDb'][_0x3a11e4(0x327)](_0x35c186,{'dupSort':![]})),this[_0x3a11e4(0x232)];}[_0x4bf4de(0x3b0)](){const _0xab8d52=_0x4bf4de;return!this[_0xab8d52(0x1e7)]&&(this[_0xab8d52(0x1e7)]=this['_rawDb']['openDB'](_0x35c186+_0xab8d52(0x39f),{'dupSort':![]})),this[_0xab8d52(0x1e7)];}[_0x4bf4de(0x188)](_0x56f5c3){const _0x13f8a2=_0x4bf4de;return this[_0x13f8a2(0x28c)]+':'+_0x56f5c3;}['signalWant'](_0x130008){const _0x147a95=_0x4bf4de;try{_0x365f91?this[_0x147a95(0x3b0)]()['putSync'](this[_0x147a95(0x188)](_0x130008),Date[_0x147a95(0x353)]()):this[_0x147a95(0x3b0)]()[_0x147a95(0x1dc)](this[_0x147a95(0x188)](_0x130008),Date['now']())?.['catch']?.(()=>{});}catch{}}[_0x4bf4de(0x33d)](_0x1d3b47,_0x581a24=0x3e8){const _0x449bca=_0x4bf4de;try{const _0x313292=this[_0x449bca(0x3b0)]()['get'](this[_0x449bca(0x188)](_0x1d3b47));return typeof _0x313292===_0x449bca(0x21e)&&Date['now']()-_0x313292<_0x581a24;}catch{return![];}}[_0x4bf4de(0x22b)](_0x19d9de){const _0x1eab43=_0x4bf4de,_0x497dbf=_0x19d9de[_0x1eab43(0x1fe)]??_0x19d9de[_0x1eab43(0x2ac)];return _0x497dbf+_0x19d9de[_0x1eab43(0x355)]<Date[_0x1eab43(0x353)]();}static[_0x4bf4de(0x364)](_0x11070e){const _0x1d4215=_0x4bf4de,_0x3c880a=_0x11070e?.[_0x1d4215(0x3ae)];if(!_0x3c880a||typeof _0x3c880a[_0x1d4215(0x34e)]!=='number')return![];if(_0x3c880a[_0x1d4215(0x3ad)]!==_0x42cc65[_0x1d4215(0x3ad)]())return![];if(_0x3c880a['pid']===process['pid'])return![];try{return process[_0x1d4215(0x25c)](_0x3c880a['pid'],0x0),![];}catch(_0x4567b7){return _0x4567b7[_0x1d4215(0x1fb)]==='ESRCH';}}async[_0x4bf4de(0x30d)](_0xd9e609,_0x1819fa={},_0x3328b0={}){const _0x3d914f=_0x4bf4de,_0x262f0a=this[_0x3d914f(0x188)](_0xd9e609),_0x535200=_0x3328b0[_0x3d914f(0x355)]??this['ttlMs'],_0x50c442=Date[_0x3d914f(0x353)](),_0x4ab55c={'holder':{'pid':process[_0x3d914f(0x34e)],'hostname':_0x42cc65[_0x3d914f(0x3ad)](),..._0x1819fa},'acquiredAt':_0x50c442,'updatedAt':_0x50c442,'ttlMs':_0x535200};let _0x4c312f=![],_0x25b3b1=null;try{const _0x4cd1fa=()=>{const _0x3a6e97=_0x3d914f,_0x4ec53d=this[_0x3a6e97(0x304)]()['get'](_0x262f0a);if(_0x4ec53d&&!this[_0x3a6e97(0x22b)](_0x4ec53d)&&!_0x55192f[_0x3a6e97(0x364)](_0x4ec53d)){const _0x59645b=_0x1819fa[_0x3a6e97(0x21f)]!=null&&_0x4ec53d[_0x3a6e97(0x3ae)][_0x3a6e97(0x34e)]===process[_0x3a6e97(0x34e)]&&_0x4ec53d[_0x3a6e97(0x3ae)][_0x3a6e97(0x21f)]===_0x1819fa['processorId'];if(!_0x59645b){_0x4c312f=![],_0x25b3b1=_0x4ec53d;return;}_0x4ab55c[_0x3a6e97(0x2ac)]<=_0x4ec53d[_0x3a6e97(0x2ac)]&&(_0x4ab55c['acquiredAt']=_0x4ec53d['acquiredAt']+0x1,_0x4ab55c[_0x3a6e97(0x1fe)]=_0x4ab55c[_0x3a6e97(0x2ac)]);}this[_0x3a6e97(0x304)]()[_0x3a6e97(0x1dc)](_0x262f0a,_0x4ab55c),_0x4c312f=!![],_0x25b3b1=_0x4ab55c;};if(_0x365f91)this[_0x3d914f(0x304)]()[_0x3d914f(0x30f)](_0x4cd1fa);else await this[_0x3d914f(0x304)]()[_0x3d914f(0x248)](_0x4cd1fa);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x4c312f)return{'acquired':![],'handle':null,'current':_0x25b3b1};const _0x5948c8=new _0x19e39a(this,_0x262f0a,_0x4ab55c[_0x3d914f(0x2ac)]);return _0x5948c8[_0x3d914f(0x233)](_0x535200,this[_0x3d914f(0x191)]),{'acquired':!![],'handle':_0x5948c8,'current':_0x25b3b1};}[_0x4bf4de(0x3af)](_0x5ea255){const _0x4dc96d=_0x4bf4de;try{return this[_0x4dc96d(0x304)]()[_0x4dc96d(0x374)](this[_0x4dc96d(0x188)](_0x5ea255))??null;}catch{return null;}}[_0x4bf4de(0x274)](){const _0xf26ee=_0x4bf4de,_0x1f2f53=this[_0xf26ee(0x28c)]+':',_0x59bbd8=[];try{for(const {key:_0xdd0e3f,value:_0x10f266}of this[_0xf26ee(0x304)]()['getRange']({'start':_0x1f2f53,'end':_0x1f2f53+'\xff'})){typeof _0xdd0e3f===_0xf26ee(0x306)&&_0xdd0e3f[_0xf26ee(0x23f)](_0x1f2f53)&&_0x59bbd8['push']({'id':_0xdd0e3f[_0xf26ee(0x1f6)](_0x1f2f53['length']),'entry':_0x10f266});}}catch{}return _0x59bbd8;}static['listAll'](_0x9e0108){const _0x215dc2=_0x4bf4de,_0x578445=[];try{const _0x2da8c1=_0x9e0108[_0x215dc2(0x327)](_0x35c186,{'dupSort':![]});for(const {key:_0x26f155,value:_0x391bf8}of _0x2da8c1[_0x215dc2(0x39d)]({})){if(typeof _0x26f155!==_0x215dc2(0x306))continue;const _0x24c46a=_0x26f155[_0x215dc2(0x37c)](':');if(_0x24c46a<0x1)continue;_0x578445['push']({'namespace':_0x26f155[_0x215dc2(0x1f6)](0x0,_0x24c46a),'id':_0x26f155[_0x215dc2(0x1f6)](_0x24c46a+0x1),'entry':_0x391bf8});}}catch{}return _0x578445;}}return okdbLock={'OKDBLock':_0x55192f},okdbLock;}function _0x5df3(_0x34a4ae,_0x52de06){_0x34a4ae=_0x34a4ae-0x180;const _0x17bb45=_0x17bb();let _0x5df359=_0x17bb45[_0x34a4ae];return _0x5df359;}var version=_0x24af3f(0x180),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x4451d0=_0x24af3f;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x49589f=require$$0$3,_0x4d9f44=require$$1$1,_0x28971e=require$$2,{LOOP:_0x3ae377}=requireOkdbLoopMonitor(),{OKDBLock:_0x3b7fe6}=requireOkdbLock(),{SYNC_COMMITS:_0xc823f8}=requireOkdbWriter(),_0x5af0dc='~processes',_0x213036=_0x4451d0(0x2f3),_0x565ece=_0x4451d0(0x336),_0x440793=_0x4451d0(0x26c),_0x3440c9=(_0x4731ef,_0x336c8f)=>_0x4731ef+':'+_0x336c8f,_0x4da6de=(_0x4ce4d7,_0x181e3b)=>_0x4ce4d7+'::'+_0x181e3b,_0x5dfe88=(_0x5ea556,_0x3df399)=>_0x5ea556+'/'+_0x3df399,_0x33f46c=(_0x5ae875,_0x13e287)=>_0x5ae875+'#'+_0x13e287,_0x9f1bb3=_0x498a93=>{const _0xdc8044=_0x4451d0;if(_0x498a93?.['processKey'])return _0x498a93[_0xdc8044(0x2e4)];const _0x26cfb4=_0x498a93?.[_0xdc8044(0x352)];return typeof _0x26cfb4===_0xdc8044(0x306)&&_0x26cfb4[_0xdc8044(0x1d2)]('#')?_0x26cfb4['slice'](0x0,_0x26cfb4['indexOf']('#')):_0x26cfb4;},_0x555a3e=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x55e38e=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0xd26b41=_0x555a3e*0x3,_0x11a1f1=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x4451d0(0x1fd)](0x927c0,_0xd26b41*0x14),_0x6a5762=[_0x4451d0(0x323),_0x4451d0(0x2da),_0x4451d0(0x2b7),_0x4451d0(0x2a0),_0x4451d0(0x225),_0x4451d0(0x330)];let _0x18f260=null;function _0x18ffde(){const _0x23ac5d=_0x4451d0;if(_0x18f260==null)_0x18f260=Math[_0x23ac5d(0x252)]((Date[_0x23ac5d(0x353)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x18f260;}function _0x5c2c0b(_0x437179){const _0x35a85e=_0x4451d0;if(process.env.OKDB_PROCESS_KILL===_0x35a85e(0x185))return![];if(_0x437179?.[_0x35a85e(0x2b6)]?.[_0x35a85e(0x29e)]&&typeof _0x437179['options'][_0x35a85e(0x29e)]==='object'&&_0x437179[_0x35a85e(0x2b6)][_0x35a85e(0x29e)][_0x35a85e(0x25c)]===![])return![];return!![];}function _0x501db6(_0x32756f,_0x56f2b4){const _0x2a6806=_0x4451d0,_0x276129=!!_0x56f2b4?.['processors'];switch(_0x32756f){case _0x2a6806(0x2d4):return{'controllable':_0x276129,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x2a6806(0x1c9):case _0x2a6806(0x18b):return{'controllable':_0x276129,'decommissionable':![],'killable':!![],'killConfirm':_0x2a6806(0x2a1)};case _0x2a6806(0x384):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x2a6806(0x2cf):case _0x2a6806(0x1ea):case _0x2a6806(0x1b0):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1dc7cd{constructor(_0x5ba7a2){const _0x47c726=_0x4451d0;this['okdb']=_0x5ba7a2,this['_statusEnv']=null,this[_0x47c726(0x3a7)]=null,this['_desiredOverlay']=new Map(),this[_0x47c726(0x218)]=null,this['_isWriter']=![],this[_0x47c726(0x261)]=![],this[_0x47c726(0x372)]=_0x18ffde(),this[_0x47c726(0x387)]=_0x3440c9(process[_0x47c726(0x34e)],this['_processStartedAt']),this['_instanceId']=_0x28971e[_0x47c726(0x1a6)]()[_0x47c726(0x1f6)](0x0,0x8),this[_0x47c726(0x195)]=_0x33f46c(this[_0x47c726(0x387)],this[_0x47c726(0x2e2)]),this[_0x47c726(0x2ed)]=Date[_0x47c726(0x353)](),this[_0x47c726(0x349)]=null,this[_0x47c726(0x230)]=null,this[_0x47c726(0x312)]=null,this[_0x47c726(0x1d1)]=null,this[_0x47c726(0x2e9)]=null,this[_0x47c726(0x181)]=null,this[_0x47c726(0x2fd)]=0x0,this[_0x47c726(0x303)]={},this[_0x47c726(0x19e)]=new Map(),this[_0x47c726(0x39c)]=process['cpuUsage'](),this[_0x47c726(0x2dd)]=Date[_0x47c726(0x353)](),this[_0x47c726(0x217)]=0x0,this[_0x47c726(0x221)]=new Map();}get[_0x4451d0(0x39e)](){const _0x11b457=_0x4451d0;return this[_0x11b457(0x387)];}get[_0x4451d0(0x1ca)](){const _0x25e34e=_0x4451d0;return this[_0x25e34e(0x195)];}[_0x4451d0(0x1b5)](_0x51944b,_0x278aca){const _0x20ce1e=_0x4451d0,_0x549330=_0x501db6(_0x51944b,_0x278aca);if(_0x549330['killable']&&!_0x5c2c0b(this[_0x20ce1e(0x302)]))return{..._0x549330,'killable':![],'killConfirm':undefined};return _0x549330;}[_0x4451d0(0x216)](){const _0x27067f=_0x4451d0;return!!this[_0x27067f(0x1ed)];}[_0x4451d0(0x2b9)](_0x11745b){const _0x575e27=_0x4451d0;Object[_0x575e27(0x193)](this['_ownMeta'],_0x11745b||{});}[_0x4451d0(0x392)](_0x1a4ce1){const _0x4cf6f2=_0x4451d0;if(_0x1a4ce1)this[_0x4cf6f2(0x312)]=_0x1a4ce1;}['register'](_0x4eb221={}){const _0x4ad818=_0x4451d0;return this['okdb'][_0x4ad818(0x391)](_0x4eb221);}['processingStatusView'](){const _0x1ff6d3=_0x4451d0,_0x1e6cb8={};let _0x4dcfed=0x0,_0x52fb6b=0x0;const _0x28a88c=new Set();for(const _0x260205 of this['listNodes']()){_0x52fb6b++;const _0x5aeeb4=_0x260205[_0x1ff6d3(0x1c1)];if(!_0x5aeeb4)continue;if(_0x5aeeb4[_0x1ff6d3(0x2f7)])_0x4dcfed++;for(const _0x2d9344 of _0x5aeeb4[_0x1ff6d3(0x347)]||[]){if(![_0x1ff6d3(0x201),_0x1ff6d3(0x1be)][_0x1ff6d3(0x1d2)](_0x2d9344[_0x1ff6d3(0x200)]))continue;(_0x2d9344[_0x1ff6d3(0x2be)]===_0x1ff6d3(0x2b5)||_0x2d9344['state']===_0x1ff6d3(0x2a5))&&_0x2d9344[_0x1ff6d3(0x196)]&&_0x28a88c['add']((_0x2d9344[_0x1ff6d3(0x2de)]||_0x1ff6d3(0x279))+':'+_0x2d9344[_0x1ff6d3(0x196)]);const _0x51f108=_0x2d9344[_0x1ff6d3(0x2de)]||'default';(_0x1e6cb8[_0x51f108]||=[])[_0x1ff6d3(0x202)]({..._0x2d9344,'env':_0x51f108,'owner':{'pid':_0x260205[_0x1ff6d3(0x34e)]??null,'kind':_0x260205[_0x1ff6d3(0x283)]??null}});}}for(const [_0x2ac182,_0x496845]of Object['entries'](_0x1e6cb8)){for(const _0x252f1e of _0x496845){if(_0x252f1e[_0x1ff6d3(0x200)]===_0x1ff6d3(0x201)&&!_0x252f1e[_0x1ff6d3(0x2e8)]){const _0x78821e=_0x2ac182+':'+(_0x252f1e['cursorKey']??'');if(!_0x28a88c['has'](_0x78821e))_0x252f1e[_0x1ff6d3(0x249)]=!![];}}}return{'envs':_0x1e6cb8,'policy':null,'participation':{'participating':_0x4dcfed,'total':_0x52fb6b},'source':_0x1ff6d3(0x34d)};}[_0x4451d0(0x23a)](){const _0x5dc945=_0x4451d0,_0x1e3784=_0xb2e71d=>{const _0x4ac2d5=_0x5df3;if(_0xb2e71d[_0x4ac2d5(0x2be)]===_0x4ac2d5(0x2b5)||_0xb2e71d[_0x4ac2d5(0x2be)]===_0x4ac2d5(0x2a5)||_0xb2e71d['state']===_0x4ac2d5(0x3a0))return 0x3;if(_0xb2e71d['claimGated'])return 0x1;return 0x2;},_0x299701=new Map();for(const _0x4b231b of this[_0x5dc945(0x182)]()){for(const _0x1eab8a of _0x4b231b[_0x5dc945(0x1c1)]?.[_0x5dc945(0x347)]||[]){const _0x4aef61={..._0x1eab8a,'owner':{'pid':_0x4b231b[_0x5dc945(0x34e)]??null,'kind':_0x4b231b[_0x5dc945(0x283)]??null,'host':_0x4b231b[_0x5dc945(0x226)]??null}},_0x39f9f1=_0x1eab8a[_0x5dc945(0x200)]===_0x5dc945(0x201)?_0x5dc945(0x3a5)+(_0x1eab8a[_0x5dc945(0x2de)]??'')+'::'+(_0x1eab8a[_0x5dc945(0x196)]??_0x1eab8a['type']??_0x1eab8a['id']):_0x5dc945(0x378)+(_0x4b231b['nodeKey']??_0x4b231b[_0x5dc945(0x2e4)]??'')+'::'+(_0x1eab8a[_0x5dc945(0x2de)]??'')+'::'+_0x1eab8a['id'],_0x1a2e00=_0x299701['get'](_0x39f9f1);if(!_0x1a2e00||_0x1e3784(_0x4aef61)>_0x1e3784(_0x1a2e00))_0x299701['set'](_0x39f9f1,_0x4aef61);}}return[..._0x299701['values']()];}['clusterStatusView'](){const _0x173be6=_0x4451d0,_0x186f7b=Date[_0x173be6(0x353)](),_0x4ba328=this[_0x173be6(0x182)](),_0x3a95b7=_0x55a032=>Math[_0x173be6(0x1fd)](0x0,Math[_0x173be6(0x252)]((_0x186f7b-(_0x55a032[_0x173be6(0x398)]||_0x186f7b))/0x3e8)),_0x20a1ec=_0x4ba328['find'](_0x4f1566=>_0x4f1566['kind']===_0x173be6(0x2d4)),_0x3f70a3=_0x4ba328['filter'](_0x5b10a0=>_0x5b10a0[_0x173be6(0x283)]==='http-server');if(_0x20a1ec||_0x3f70a3['length'])return{'primary':_0x20a1ec?{'pid':_0x20a1ec['pid'],'uptime':_0x3a95b7(_0x20a1ec)}:null,'workers':_0x3f70a3[_0x173be6(0x28d)](_0x364f0d=>({'pid':_0x364f0d[_0x173be6(0x34e)],'uptime':_0x3a95b7(_0x364f0d)})),'workersConfigured':_0x20a1ec?.['meta']?.['workersConfigured']??_0x3f70a3['length'],'mode':'cluster'};const _0x561e54=_0x4ba328[_0x173be6(0x33e)](_0x35c593=>_0x35c593[_0x173be6(0x283)]===_0x173be6(0x1c9)||_0x35c593['kind']==='standalone'||_0x35c593['kind']===_0x173be6(0x384)),_0x319ce5=_0x561e54?{'pid':_0x561e54[_0x173be6(0x34e)],'uptime':_0x3a95b7(_0x561e54)}:{'pid':process['pid'],'uptime':Math[_0x173be6(0x1fd)](0x0,Math[_0x173be6(0x252)](process['uptime']()))};return{'primary':_0x319ce5,'workers':[_0x319ce5],'workersConfigured':0x1,'mode':_0x173be6(0x201)};}['nodesView'](){const _0x2a35c1=_0x4451d0;return this[_0x2a35c1(0x1ad)]();}['treeView'](){const _0x426dc0=_0x4451d0,_0x5e1a38=new Map();for(const _0x251918 of this['_groupByProcess']())_0x5e1a38['set'](_0x251918['processKey'],{..._0x251918,'children':[]});const _0x66ff59=[];for(const _0x1b9f90 of _0x5e1a38['values']()){const _0x49a685=_0x1b9f90[_0x426dc0(0x365)]?_0x5e1a38[_0x426dc0(0x374)](_0x1b9f90[_0x426dc0(0x365)]):null;if(_0x49a685&&_0x49a685!==_0x1b9f90)_0x49a685[_0x426dc0(0x2a8)][_0x426dc0(0x202)](_0x1b9f90);else _0x66ff59[_0x426dc0(0x202)](_0x1b9f90);}const _0x59506b=(_0x5c6d15,_0x457ba9)=>_0x5c6d15['kind']===_0x457ba9[_0x426dc0(0x283)]?(_0x5c6d15[_0x426dc0(0x34e)]||0x0)-(_0x457ba9['pid']||0x0):(_0x5c6d15[_0x426dc0(0x283)]??'')<(_0x457ba9[_0x426dc0(0x283)]??'')?-0x1:0x1,_0x4fee0a=_0x1c8878=>{const _0x28b18d=_0x426dc0;_0x1c8878['sort'](_0x59506b);for(const _0x2c2afa of _0x1c8878)if(_0x2c2afa[_0x28b18d(0x2a8)][_0x28b18d(0x2d8)])_0x4fee0a(_0x2c2afa[_0x28b18d(0x2a8)]);};return _0x4fee0a(_0x66ff59),_0x66ff59;}[_0x4451d0(0x1f7)](_0x57e93d){const _0x1e4296=_0x4451d0;return this[_0x1e4296(0x1ad)]()['find'](_0xf8e9b0=>_0xf8e9b0['processKey']===_0x57e93d)??null;}['_groupByProcess'](_0x2fcaed=Date[_0x4451d0(0x353)]()){const _0x2d3b04=_0x4451d0,_0x674cd1=new Map();for(const _0x33eb92 of this[_0x2d3b04(0x182)]()){const _0x38573f=_0x9f1bb3(_0x33eb92);let _0x1726a5=_0x674cd1[_0x2d3b04(0x374)](_0x38573f);!_0x1726a5&&(_0x1726a5={'processKey':_0x38573f,'nodeKey':_0x38573f,'pid':_0x33eb92[_0x2d3b04(0x34e)],'ppid':_0x33eb92['ppid']??null,'host':_0x33eb92['host']??null,'kind':_0x33eb92['kind'],'role':null,'supervisorKey':_0x33eb92[_0x2d3b04(0x365)]??null,'slot':_0x33eb92[_0x2d3b04(0x3a3)]??null,'slotKey':_0x33eb92[_0x2d3b04(0x219)]??null,'caps':_0x33eb92[_0x2d3b04(0x3a9)]??null,'lifecycle':_0x33eb92[_0x2d3b04(0x324)]??null,'uptime':Math[_0x2d3b04(0x1fd)](0x0,Math[_0x2d3b04(0x252)]((_0x2fcaed-(_0x33eb92[_0x2d3b04(0x398)]||_0x2fcaed))/0x3e8)),'startedAt':_0x33eb92['startedAt']??null,'meta':_0x33eb92[_0x2d3b04(0x36c)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x674cd1['set'](_0x38573f,_0x1726a5));_0x1726a5[_0x2d3b04(0x29a)][_0x2d3b04(0x202)]({'instanceId':_0x33eb92['instanceId']??null,'role':_0x33eb92[_0x2d3b04(0x270)]??null,'listenAddr':_0x33eb92[_0x2d3b04(0x29b)]??null,'lifecycle':_0x33eb92[_0x2d3b04(0x324)]??null,'processing':_0x33eb92[_0x2d3b04(0x1c1)]??null});if(!_0x1726a5[_0x2d3b04(0x270)]&&_0x33eb92[_0x2d3b04(0x270)])_0x1726a5[_0x2d3b04(0x270)]=_0x33eb92[_0x2d3b04(0x270)];if(!_0x1726a5[_0x2d3b04(0x29b)]&&_0x33eb92[_0x2d3b04(0x29b)])_0x1726a5[_0x2d3b04(0x29b)]=_0x33eb92[_0x2d3b04(0x29b)];if(!_0x1726a5[_0x2d3b04(0x1c1)]&&_0x33eb92[_0x2d3b04(0x1c1)])_0x1726a5[_0x2d3b04(0x1c1)]=_0x33eb92[_0x2d3b04(0x1c1)];if(!_0x1726a5['engines']&&_0x33eb92[_0x2d3b04(0x235)])_0x1726a5['engines']=_0x33eb92['engines'];if(!_0x1726a5[_0x2d3b04(0x1de)]&&_0x33eb92[_0x2d3b04(0x1de)])_0x1726a5[_0x2d3b04(0x1de)]=_0x33eb92[_0x2d3b04(0x1de)];if(_0x1726a5[_0x2d3b04(0x3a9)]==null&&_0x33eb92['caps'])_0x1726a5[_0x2d3b04(0x3a9)]=_0x33eb92[_0x2d3b04(0x3a9)];if(_0x33eb92[_0x2d3b04(0x25b)]&&(!_0x1726a5[_0x2d3b04(0x25b)]||(_0x33eb92[_0x2d3b04(0x25b)]['at']??0x0)>(_0x1726a5['stats']['at']??0x0)))_0x1726a5[_0x2d3b04(0x25b)]=_0x33eb92[_0x2d3b04(0x25b)];}return[..._0x674cd1['values']()];}[_0x4451d0(0x2f4)](){const _0x3e2839=_0x4451d0,_0x1501db=[],_0x146ca9={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x5cdda8 of this[_0x3e2839(0x1ad)]()){_0x1501db[_0x3e2839(0x202)]({'processKey':_0x5cdda8[_0x3e2839(0x2e4)],'kind':_0x5cdda8['kind'],'pid':_0x5cdda8['pid'],'supervisorKey':_0x5cdda8[_0x3e2839(0x365)],'meta':_0x5cdda8['meta']??null,'uptime':_0x5cdda8[_0x3e2839(0x1bd)],'stats':_0x5cdda8['stats']??null}),_0x146ca9[_0x3e2839(0x29e)]++;if(_0x5cdda8[_0x3e2839(0x25b)]){_0x146ca9['rss']+=_0x5cdda8[_0x3e2839(0x25b)]['rss']||0x0,_0x146ca9[_0x3e2839(0x31a)]+=(_0x5cdda8['stats'][_0x3e2839(0x31a)]||0x0)+(_0x5cdda8[_0x3e2839(0x25b)][_0x3e2839(0x2a4)]?.['heapUsed']||0x0);const _0x5d6979=_0x5cdda8['stats']['threads'];_0x5d6979&&(_0x146ca9[_0x3e2839(0x2a4)][_0x3e2839(0x309)]+=_0x5d6979[_0x3e2839(0x309)]||0x0,_0x146ca9[_0x3e2839(0x2a4)][_0x3e2839(0x1b4)]+=_0x5d6979[_0x3e2839(0x1b4)]||0x0,_0x146ca9['threads'][_0x3e2839(0x1dd)]+=_0x5d6979[_0x3e2839(0x1dd)]||0x0);}}return{'totals':_0x146ca9,'nodes':_0x1501db};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x4e15b1=_0x4451d0;this[_0x4e15b1(0x37a)]=this[_0x4e15b1(0x37a)]||!!writer,this[_0x4e15b1(0x261)]=this[_0x4e15b1(0x261)]||!!reader,this[_0x4e15b1(0x349)]=kind||this[_0x4e15b1(0x349)]||(_0x4d9f44['isWorker']?'http-server':_0x4e15b1(0x1c9)),this[_0x4e15b1(0x230)]=supervisorKey??this['_supervisorKey'],this[_0x4e15b1(0x312)]=listenAddr??this[_0x4e15b1(0x312)],this['_ensureDesired'](),await this[_0x4e15b1(0x34f)]();if(!writer&&!reader)return null;if(!this[_0x4e15b1(0x1ed)]){const _0x425c16=await this[_0x4e15b1(0x302)][_0x4e15b1(0x2c0)](_0x5af0dc,{'sync':![],'durability':_0x4e15b1(0x3ab)});if(!_0x425c16['hasType'](_0x213036))await _0x425c16[_0x4e15b1(0x1e5)](_0x213036);this['_statusEnv']=_0x425c16;}return this[_0x4e15b1(0x1ed)];}[_0x4451d0(0x1b8)](){const _0x58f332=_0x4451d0;return this['_nodeDbFor']!==this[_0x58f332(0x1ed)]&&(this[_0x58f332(0x367)]=this[_0x58f332(0x1ed)],this[_0x58f332(0x31d)]=this['_statusEnv'][_0x58f332(0x245)](_0x213036)[_0x58f332(0x299)]),this[_0x58f332(0x31d)];}[_0x4451d0(0x1cb)](_0x174f2c){const _0x37ef78=_0x4451d0;if(_0xc823f8)return this[_0x37ef78(0x1b8)]()[_0x37ef78(0x251)](_0x174f2c[_0x37ef78(0x352)],_0x174f2c,0x1);const _0x380ebb=this['_nodeDb']()[_0x37ef78(0x1dc)](_0x174f2c['nodeKey'],_0x174f2c,0x1);if(_0x380ebb&&typeof _0x380ebb[_0x37ef78(0x2e5)]===_0x37ef78(0x22c))_0x380ebb[_0x37ef78(0x2e5)](undefined,()=>{});return _0x380ebb;}[_0x4451d0(0x213)](_0x5a5060){const _0x47276f=_0x4451d0;return this['_nodeDb']()[_0x47276f(0x251)](_0x5a5060[_0x47276f(0x352)],_0x5a5060,0x1);}[_0x4451d0(0x33b)](_0x113290){const _0x568250=_0x4451d0;if(_0xc823f8)try{return this[_0x568250(0x1b8)]()['removeSync'](_0x113290);}catch{return![];}const _0x4ce189=this[_0x568250(0x1b8)]()[_0x568250(0x39b)](_0x113290);if(_0x4ce189&&typeof _0x4ce189['then']===_0x568250(0x22c))_0x4ce189[_0x568250(0x2e5)](undefined,()=>{});return _0x4ce189;}async[_0x4451d0(0x280)](_0x2e5e1b){const _0x133c87=_0x4451d0;if(!this[_0x133c87(0x1ed)]||!this[_0x133c87(0x37a)]||!_0x2e5e1b?.['nodeKey'])return;return this[_0x133c87(0x1cb)](_0x2e5e1b);}async[_0x4451d0(0x36b)](_0x609ee8){const _0x148892=_0x4451d0;if(!this['_statusEnv']||!this[_0x148892(0x37a)]||!_0x609ee8)return;const _0x5c36ac=_0x609ee8[_0x148892(0x1d2)]('#'),_0x286333=[];for(const {key:_0x49fd69}of this[_0x148892(0x1ed)][_0x148892(0x39d)](_0x213036)){if(_0x49fd69===_0x609ee8||!_0x5c36ac&&typeof _0x49fd69===_0x148892(0x306)&&_0x49fd69[_0x148892(0x23f)](_0x609ee8+'#'))_0x286333[_0x148892(0x202)](_0x49fd69);}for(const _0xf3921f of _0x286333){try{this[_0x148892(0x1b8)]()[_0x148892(0x222)](_0xf3921f);}catch{}}}['_nodeDead'](_0xdc5f63){const _0x25007a=_0x4451d0;if(typeof _0xdc5f63?.['pid']!==_0x25007a(0x21e))return![];if(_0xdc5f63[_0x25007a(0x226)]!==_0x49589f[_0x25007a(0x3ad)]())return![];if(_0xdc5f63[_0x25007a(0x34e)]===process[_0x25007a(0x34e)])return![];if(_0xdc5f63['expiresAt']!=null&&_0xdc5f63[_0x25007a(0x199)]<Date[_0x25007a(0x353)]()-_0x11a1f1)return!![];try{return process[_0x25007a(0x25c)](_0xdc5f63['pid'],0x0),![];}catch(_0x32b50e){return _0x32b50e[_0x25007a(0x1fb)]===_0x25007a(0x1c0);}}[_0x4451d0(0x182)](){const _0x39fad9=_0x4451d0;if(!this[_0x39fad9(0x1ed)])return[];try{this[_0x39fad9(0x1ed)]['db']?.[_0x39fad9(0x370)]?.();}catch{}const _0x174b7e=Date['now'](),_0x582989=_0x49589f[_0x39fad9(0x3ad)](),_0x4402c4=[];for(const {value:_0x15e981}of this[_0x39fad9(0x1ed)][_0x39fad9(0x39d)](_0x213036)){if(!_0x15e981)continue;let _0x16c0d3=null;_0x15e981[_0x39fad9(0x226)]===_0x582989&&typeof _0x15e981['pid']===_0x39fad9(0x21e)&&(_0x16c0d3=!this['_nodeDead'](_0x15e981));if(_0x16c0d3===![])continue;const _0x3464cd=_0x15e981[_0x39fad9(0x199)]==null||_0x15e981[_0x39fad9(0x199)]>=_0x174b7e;if(_0x16c0d3===!![]||_0x3464cd)_0x4402c4['push'](_0x15e981);}return _0x4402c4;}async[_0x4451d0(0x2dc)](_0x2c2066=0x0){const _0x52e4bf=_0x4451d0;if(!this['_statusEnv']||!this['_isWriter'])return;const _0x592a2a=Date[_0x52e4bf(0x353)]()-_0x2c2066,_0x58efdd=new Set(),_0x46e5c0=[],_0x54b628=_0x49589f[_0x52e4bf(0x3ad)](),_0x15c482=require$$6[_0x52e4bf(0x2c4)];for(const {key:_0x545e2b,value:_0x89e9c5}of this[_0x52e4bf(0x1ed)][_0x52e4bf(0x39d)](_0x213036)){if(!_0x89e9c5)continue;const _0x3bf8cd=_0x89e9c5[_0x52e4bf(0x226)]===_0x54b628&&typeof _0x89e9c5[_0x52e4bf(0x34e)]===_0x52e4bf(0x21e),_0xd0ad9a=_0x3bf8cd?this[_0x52e4bf(0x1ef)](_0x89e9c5):_0x89e9c5['expiresAt']!=null&&_0x89e9c5['expiresAt']<_0x592a2a;if(_0xd0ad9a)_0x46e5c0[_0x52e4bf(0x202)](_0x545e2b);else{_0x58efdd[_0x52e4bf(0x281)](_0x9f1bb3(_0x89e9c5)??_0x545e2b);if(_0x89e9c5['version']&&_0x89e9c5[_0x52e4bf(0x2c4)]!==_0x15c482){if(!this[_0x52e4bf(0x229)])this[_0x52e4bf(0x229)]=new Set();!this[_0x52e4bf(0x229)]['has'](_0x89e9c5['version'])&&(this[_0x52e4bf(0x229)]['add'](_0x89e9c5[_0x52e4bf(0x2c4)]),this[_0x52e4bf(0x302)][_0x52e4bf(0x278)]?.['warn']?.(_0x52e4bf(0x2df)+(_0x89e9c5[_0x52e4bf(0x34e)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x89e9c5[_0x52e4bf(0x2c4)]+'\x20while\x20this\x20process\x20runs\x20'+_0x15c482+'\x20—\x20'+_0x52e4bf(0x2d9),{'feature':'migrations'}));}}}for(const _0x4adce3 of _0x46e5c0)this[_0x52e4bf(0x33b)](_0x4adce3);if(this[_0x52e4bf(0x319)]()){const _0x1eeb87=[];for(const {key:_0x320a6e}of this['listDesired'](_0x52e4bf(0x2f3))){if(!_0x58efdd[_0x52e4bf(0x342)](_0x320a6e)){if(_0xc823f8)try{this['_desired'][_0x52e4bf(0x222)]('node/'+_0x320a6e);}catch{}else _0x1eeb87[_0x52e4bf(0x202)](this[_0x52e4bf(0x3a7)][_0x52e4bf(0x39b)](_0x52e4bf(0x194)+_0x320a6e));}}if(_0x1eeb87[_0x52e4bf(0x2d8)])await Promise[_0x52e4bf(0x19a)](_0x1eeb87);}}[_0x4451d0(0x2ef)](_0x4c038c=null){const _0xf9d9b6=_0x4451d0;if(this[_0xf9d9b6(0x1d1)])return;if(!this['_isWriter']||!this[_0xf9d9b6(0x1ed)]){this[_0xf9d9b6(0x302)]?.[_0xf9d9b6(0x278)]?.[_0xf9d9b6(0x20b)]?.(_0xf9d9b6(0x397)+this[_0xf9d9b6(0x37a)]+_0xf9d9b6(0x1d8)+!!this[_0xf9d9b6(0x1ed)]+_0xf9d9b6(0x1e1),{'feature':'processes'});return;}this[_0xf9d9b6(0x181)]=_0x4c038c,this[_0xf9d9b6(0x2e9)]=()=>this[_0xf9d9b6(0x38d)]();for(const _0x489753 of _0x6a5762)this[_0xf9d9b6(0x302)][_0xf9d9b6(0x256)]['on'](_0x489753,this['_onProcEvent']);this['_publishNow']();const _0x5545bb=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x555a3e;this[_0xf9d9b6(0x1d1)]=setInterval(()=>{const _0x280564=_0xf9d9b6;if(this[_0x280564(0x181)])try{this['_onTick']();}catch{}this['_publishNow'](),this['reap']()[_0x280564(0x1b7)](()=>{});},_0x5545bb);if(this[_0xf9d9b6(0x1d1)]['unref'])this[_0xf9d9b6(0x1d1)]['unref']();}['_maybePublish'](){const _0x562f90=_0x4451d0;if(!this[_0x562f90(0x37a)]||!this['_statusEnv'])return;if(Date[_0x562f90(0x353)]()-this[_0x562f90(0x2fd)]<_0x55e38e)return;this[_0x562f90(0x2e7)]();}[_0x4451d0(0x2e7)](){const _0x2dfc21=_0x4451d0;if(!this['_isWriter']||!this[_0x2dfc21(0x1ed)])return;this[_0x2dfc21(0x2fd)]=Date['now']();try{const _0x5b7880=[this[_0x2dfc21(0x2cd)]()];for(const _0x38a587 of this['_children']['values']())_0x5b7880[_0x2dfc21(0x202)](this['_buildChildRow'](_0x38a587));const _0x2d9223=_0x3ae377[_0x2dfc21(0x2c6)]?_0x3ae377['now']():0x0;for(const _0x4ecad5 of _0x5b7880){try{this['_putRowSync'](_0x4ecad5),this[_0x2dfc21(0x1c7)]=![];}catch(_0x440e1e){!this['_publishFailWarned']&&(this[_0x2dfc21(0x1c7)]=!![],this[_0x2dfc21(0x302)]?.[_0x2dfc21(0x278)]?.[_0x2dfc21(0x20b)]?.(_0x2dfc21(0x29f)+_0x440e1e['message'],{'feature':_0x2dfc21(0x29e)}));}}if(_0x3ae377['enabled'])_0x3ae377[_0x2dfc21(0x209)]('registry-publish',_0x3ae377[_0x2dfc21(0x353)]()-_0x2d9223,'rows='+_0x5b7880[_0x2dfc21(0x2d8)]+'\x20sync');}catch(_0x3544d2){!this[_0x2dfc21(0x1c7)]&&(this[_0x2dfc21(0x1c7)]=!![],this[_0x2dfc21(0x302)]?.['log']?.[_0x2dfc21(0x20b)]?.(_0x2dfc21(0x29f)+_0x3544d2[_0x2dfc21(0x1a1)],{'feature':_0x2dfc21(0x29e)}));}}async[_0x4451d0(0x359)](){const _0x4309e0=_0x4451d0;if(this['_onProcEvent']){for(const _0x2ec607 of _0x6a5762){try{this[_0x4309e0(0x302)][_0x4309e0(0x256)][_0x4309e0(0x185)](_0x2ec607,this[_0x4309e0(0x2e9)]);}catch{}}this['_onProcEvent']=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x4309e0(0x1d1)]=null);try{if(this[_0x4309e0(0x1ed)]&&this[_0x4309e0(0x37a)])await this[_0x4309e0(0x36b)](this[_0x4309e0(0x195)]);}catch{}}async[_0x4451d0(0x356)](){const _0x19b6f9=_0x4451d0;if(!this[_0x19b6f9(0x1ed)]||!this['_isWriter'])return;try{await this[_0x19b6f9(0x36b)](this[_0x19b6f9(0x195)]);}catch{}try{const _0x58ee8c=[];for(const {value:_0x38e0a2}of this[_0x19b6f9(0x1ed)][_0x19b6f9(0x39d)](_0x213036)){if(_0x38e0a2?.[_0x19b6f9(0x27b)]===process[_0x19b6f9(0x34e)]&&_0x38e0a2[_0x19b6f9(0x352)])_0x58ee8c[_0x19b6f9(0x202)](_0x38e0a2[_0x19b6f9(0x352)]);}for(const _0x385fb9 of _0x58ee8c){try{await this[_0x19b6f9(0x36b)](_0x385fb9);}catch{}}}catch{}}async[_0x4451d0(0x273)](){const _0x2c124c=_0x4451d0;return this[_0x2c124c(0x280)](this[_0x2c124c(0x2cd)]());}async[_0x4451d0(0x2a6)](_0x221716){const _0x3338a7=_0x4451d0;if(!this[_0x3338a7(0x1ed)]||!this[_0x3338a7(0x37a)])return;return this[_0x3338a7(0x280)](this['_buildChildRow'](_0x221716));}[_0x4451d0(0x236)]({pid:_0x4e6428,startedAt:_0x5daa2a,kind:_0x531609,supervisorKey:_0x118cc1,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x4451d0(0x25a),meta:meta=null,stats:stats=null}){const _0x380970=_0x4451d0,_0x506d2c=Date['now'](),_0x272867=_0x3440c9(_0x4e6428,_0x5daa2a);return{'nodeKey':_0x33f46c(_0x272867,'0'),'processKey':_0x272867,'instanceId':'0','pid':_0x4e6428,'startedAt':_0x5daa2a,'ppid':process[_0x380970(0x34e)],'host':_0x49589f[_0x380970(0x3ad)](),'supervisorKey':_0x118cc1,'slot':slot,'slotKey':slotKey,'kind':_0x531609,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x506d2c,'expiresAt':_0x506d2c+_0xd26b41,'caps':this[_0x380970(0x1b5)](_0x531609,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x4451d0(0x2f2)](_0x2ce191){const _0x5c3517=_0x4451d0;if(!_0x2ce191?.[_0x5c3517(0x34e)])return null;const _0x1bda21=_0x3440c9(_0x2ce191[_0x5c3517(0x34e)],_0x2ce191[_0x5c3517(0x398)]);this[_0x5c3517(0x19e)]['set'](_0x1bda21,{..._0x2ce191,'supervisorKey':_0x2ce191['supervisorKey']??this[_0x5c3517(0x387)]});if(this[_0x5c3517(0x37a)])await this[_0x5c3517(0x2a6)](this[_0x5c3517(0x19e)][_0x5c3517(0x374)](_0x1bda21))[_0x5c3517(0x1b7)]?.(()=>{});return _0x1bda21;}[_0x4451d0(0x237)](_0x4f5197){const _0x4c1d4=_0x4451d0;if(!_0x4f5197)return;return this[_0x4c1d4(0x19e)][_0x4c1d4(0x35f)](_0x4f5197),this[_0x4c1d4(0x36b)](_0x4f5197);}['_sampleOwnStats'](){const _0x1b5f6f=_0x4451d0,_0x396db4=Date[_0x1b5f6f(0x353)](),_0x132f3b=process[_0x1b5f6f(0x32d)](),_0x33d993=(_0x396db4-this[_0x1b5f6f(0x2dd)])*0x3e8;if(_0x33d993>=0x3d090){const _0x2eb0b3=_0x132f3b[_0x1b5f6f(0x366)]-this['_lastCpuUsage'][_0x1b5f6f(0x366)]+(_0x132f3b[_0x1b5f6f(0x24a)]-this['_lastCpuUsage'][_0x1b5f6f(0x24a)]),_0xc1bad8=_0x49589f[_0x1b5f6f(0x1af)]()[_0x1b5f6f(0x2d8)]||0x1;this['_lastCpuPct']=Math[_0x1b5f6f(0x2c7)](0x64,Math[_0x1b5f6f(0x252)](_0x2eb0b3/(_0x33d993*_0xc1bad8)*0x64)),this[_0x1b5f6f(0x24f)]=Math[_0x1b5f6f(0x252)](_0x33d993/0x3e8),this['_lastCpuUsage']=_0x132f3b,this[_0x1b5f6f(0x2dd)]=_0x396db4;}const _0x4db5ec=process[_0x1b5f6f(0x3a4)](),_0x286a5a=this['_threadStats']['size'];let _0x3909df=0x0;if(_0x286a5a>0x0){const _0x3fdd91=[this['okdb'],...this[_0x1b5f6f(0x302)][_0x1b5f6f(0x2ad)]?.[_0x1b5f6f(0x1e4)]?.()??[]];for(const _0x3f54dc of _0x3fdd91){const _0x33dfac=_0x3f54dc[_0x1b5f6f(0x1eb)]?.[_0x1b5f6f(0x2e3)];if(_0x33dfac)_0x3909df+=_0x33dfac['liveThreadStats'][_0x1b5f6f(0x1dd)];}}let _0x55206f=null;const _0x38ac96=_0x286a5a;if(_0x38ac96>0x0){let _0x3d04e6=0x0;for(const _0x12118e of this[_0x1b5f6f(0x221)]['values']())_0x3d04e6+=_0x12118e['heapUsed']||0x0;_0x55206f={'count':_0x38ac96,'heapUsed':_0x3d04e6,'sandbox':_0x286a5a,'busy':_0x3909df};}return{'rss':_0x4db5ec['rss'],'heapUsed':_0x4db5ec['heapUsed'],'heapTotal':_0x4db5ec[_0x1b5f6f(0x197)],'external':_0x4db5ec[_0x1b5f6f(0x1e6)],'cpuPct':this[_0x1b5f6f(0x217)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x55206f,'at':_0x396db4};}['reportThreadStats'](_0x30aed5,_0x1725b5){const _0x280a03=_0x4451d0;if(!_0x30aed5||!_0x1725b5)return;this['_threadStats'][_0x280a03(0x2b3)](_0x30aed5,_0x1725b5);}[_0x4451d0(0x186)](_0x415788){const _0x380d74=_0x4451d0;this[_0x380d74(0x221)][_0x380d74(0x35f)](_0x415788);}[_0x4451d0(0x317)](_0x2665ac,_0x7e09bb,_0xfb68c6=undefined){const _0x3f787a=_0x4451d0,_0x4d161f=this[_0x3f787a(0x19e)][_0x3f787a(0x374)](_0x2665ac);if(!_0x4d161f||!_0x7e09bb)return;if(_0xfb68c6!==undefined)_0x4d161f['processing']=_0xfb68c6;_0x4d161f[_0x3f787a(0x25b)]={'rss':_0x7e09bb[_0x3f787a(0x269)]??null,'heapUsed':_0x7e09bb[_0x3f787a(0x31a)]??null,'heapTotal':_0x7e09bb['heapTotal']??null,'external':_0x7e09bb[_0x3f787a(0x1e6)]??null,'cpuPct':_0x7e09bb[_0x3f787a(0x36a)]??null,'cpuWindowMs':_0x7e09bb[_0x3f787a(0x31f)]??null,'threads':_0x7e09bb[_0x3f787a(0x2a4)]??null,'claims':_0x7e09bb[_0x3f787a(0x2bd)]??null,'envsOpen':_0x7e09bb[_0x3f787a(0x27e)]??null,'at':Date[_0x3f787a(0x353)]()};}['_buildOwnRow'](){const _0x3f1f63=_0x4451d0,_0x2ab0ae=Date[_0x3f1f63(0x353)](),_0x42fafb=this[_0x3f1f63(0x302)][_0x3f1f63(0x28e)]||{},_0x46384b=this[_0x3f1f63(0x349)]||_0x3f1f63(0x1c9);return{'nodeKey':this[_0x3f1f63(0x195)],'processKey':this[_0x3f1f63(0x387)],'instanceId':this[_0x3f1f63(0x2e2)],'pid':process[_0x3f1f63(0x34e)],'startedAt':this['_processStartedAt'],'instanceStartedAt':this[_0x3f1f63(0x2ed)],'ppid':typeof process[_0x3f1f63(0x27b)]===_0x3f1f63(0x21e)?process[_0x3f1f63(0x27b)]:null,'host':_0x49589f['hostname'](),'supervisorKey':this[_0x3f1f63(0x230)]??null,'version':require$$6['version'],'kind':_0x46384b,'role':{'engines':!!_0x42fafb[_0x3f1f63(0x235)],'processors':!!_0x42fafb[_0x3f1f63(0x347)],'compaction':_0x42fafb['compaction'],'http':_0x42fafb[_0x3f1f63(0x379)]},'listenAddr':this[_0x3f1f63(0x312)]??null,'heartbeatAt':_0x2ab0ae,'expiresAt':_0x2ab0ae+_0xd26b41,'caps':this[_0x3f1f63(0x1b5)](_0x46384b,_0x42fafb),'lifecycle':{'state':_0x3f1f63(0x25a),'desiredVersionApplied':null},'meta':{...this[_0x3f1f63(0x303)]},'processing':_0x42fafb[_0x3f1f63(0x347)]?this['_buildProcessingFacet']():null,'engines':_0x42fafb['engines']?[...this[_0x3f1f63(0x302)][_0x3f1f63(0x266)]??[]]:null,'singletonClaims':this[_0x3f1f63(0x1db)](),'stats':this['_sampleOwnStats'](),'writers':this[_0x3f1f63(0x343)]()};}[_0x4451d0(0x343)](){const _0x296b42=_0x4451d0,_0x13778e={};try{for(const [_0x57fa9c,_0x2727af]of this['okdb'][_0x296b42(0x2ad)]){try{const _0x4180a1=_0x2727af[_0x296b42(0x389)]?.();if(!_0x4180a1)continue;if(!_0x4180a1['depth']&&!_0x4180a1[_0x296b42(0x288)]&&!(_0x4180a1[_0x296b42(0x340)]??0x0)&&!_0x4180a1[_0x296b42(0x32b)])continue;_0x13778e[_0x57fa9c]={'depth':_0x4180a1[_0x296b42(0x285)],'oldestPendingMs':_0x4180a1[_0x296b42(0x242)],'committed':_0x4180a1[_0x296b42(0x288)],'commitsPerSec':_0x4180a1['commitsPerSec'],'commitP99Ms':_0x4180a1[_0x296b42(0x2a3)],'parkedNow':_0x4180a1[_0x296b42(0x340)]??0x0,'draining':!!_0x4180a1[_0x296b42(0x32b)]};}catch{}}}catch{}return Object[_0x296b42(0x292)](_0x13778e)[_0x296b42(0x2d8)]?_0x13778e:null;}[_0x4451d0(0x1db)](){const _0x2d3566=_0x4451d0,_0x28c618=process[_0x2d3566(0x34e)],_0x190a3d=Date[_0x2d3566(0x353)](),_0x4ea4f3=_0x47aca9=>{const _0x2b543c=_0x2d3566;if(!_0x47aca9)return[];const _0x1e5c16=[];try{for(const {id:_0x3d0def,entry:_0x42bcc4}of _0x47aca9['list']()){if(_0x42bcc4?.['holder']?.[_0x2b543c(0x34e)]!==_0x28c618)continue;const _0x38ebb3=_0x42bcc4['updatedAt']??_0x42bcc4[_0x2b543c(0x2ac)]??0x0;if(_0x38ebb3+(_0x42bcc4[_0x2b543c(0x355)]??0x0)<_0x190a3d)continue;_0x1e5c16[_0x2b543c(0x202)](_0x3d0def);}}catch{}return _0x1e5c16;},_0x4cac2e=_0x4ea4f3(this[_0x2d3566(0x1a4)](_0x2d3566(0x361))),_0x1cb29c=_0x4ea4f3(this['_singletonLock'](_0x2d3566(0x276)));if(!_0x4cac2e[_0x2d3566(0x2d8)]&&!_0x1cb29c[_0x2d3566(0x2d8)])return null;return{'compact':_0x4cac2e,'replicate':_0x1cb29c};}[_0x4451d0(0x1a4)](_0x5b1c10){const _0x54374c=_0x4451d0;if(!this[_0x54374c(0x302)]?.['_rootDb'])return null;if(!this[_0x54374c(0x313)])this['_singletonLocks']=new Map();let _0x52f67d=this[_0x54374c(0x313)]['get'](_0x5b1c10);if(!_0x52f67d)try{_0x52f67d=new _0x3b7fe6(this['okdb'][_0x54374c(0x1e9)],{'namespace':_0x5b1c10}),this[_0x54374c(0x313)][_0x54374c(0x2b3)](_0x5b1c10,_0x52f67d);}catch{return null;}return _0x52f67d;}[_0x4451d0(0x2d7)](){const _0x51a964=_0x4451d0,_0x29d2de=[];try{for(const [_0x53cbb2,_0x5417fe]of this['okdb'][_0x51a964(0x2ad)]){if(_0x53cbb2[_0x51a964(0x23f)]('~'))continue;for(const _0x4d3b34 of _0x5417fe[_0x51a964(0x21c)][_0x51a964(0x1ec)]())_0x29d2de[_0x51a964(0x202)]({..._0x4d3b34,'env':_0x53cbb2});}}catch{}return{'participate':this[_0x51a964(0x302)][_0x51a964(0x347)]?.[_0x51a964(0x2c3)]??![],'processors':_0x29d2de};}['_ensureDesired'](){const _0x1486ba=_0x4451d0;if(this[_0x1486ba(0x3a7)])return!![];const _0x3392cd=this[_0x1486ba(0x302)][_0x1486ba(0x1e9)];if(!_0x3392cd)return![];return this[_0x1486ba(0x3a7)]=_0x3392cd[_0x1486ba(0x327)](_0x565ece,{'dupSort':![]}),this[_0x1486ba(0x218)]=_0x3392cd[_0x1486ba(0x327)](_0x440793,{'dupSort':![]}),!![];}async[_0x4451d0(0x34f)](){const _0x597eaf=_0x4451d0;if(!this[_0x597eaf(0x319)]())return;const _0x58a433='__vocab/version',_0xdd67d3=0x1,_0x27c6c5=this[_0x597eaf(0x3a7)]['get'](_0x58a433)??0x0;if(_0x27c6c5>=_0xdd67d3)return;const _0x372925=_0x38c196=>{const _0xbd9410=_0x597eaf;if(_0x38c196===_0xbd9410(0x316))return _0xbd9410(0x201);if(_0x38c196===_0xbd9410(0x2c1))return _0xbd9410(0x1be);return _0x38c196;};await this[_0x597eaf(0x302)]['_systemEnv'][_0x597eaf(0x300)]['transaction'](()=>{const _0x2af6cb=_0x597eaf;for(const _0x457f87 of[_0x2af6cb(0x1ac),'procmodeack/']){for(const {key:_0x54cae5,value:_0x16e38c}of this[_0x2af6cb(0x3a7)][_0x2af6cb(0x39d)]({'start':_0x457f87,'end':_0x457f87+'\xff'})){if(typeof _0x54cae5!==_0x2af6cb(0x306)||!_0x54cae5['startsWith'](_0x457f87))break;const _0x5b2bb6=_0x372925(_0x16e38c[_0x2af6cb(0x200)]);if(_0x5b2bb6!==_0x16e38c[_0x2af6cb(0x200)])this['_desired'][_0x2af6cb(0x1dc)](_0x54cae5,{..._0x16e38c,'mode':_0x5b2bb6});}}this[_0x2af6cb(0x3a7)][_0x2af6cb(0x1dc)](_0x58a433,_0xdd67d3);});}[_0x4451d0(0x318)](){const _0x13f362=_0x4451d0;return!!this[_0x13f362(0x3a7)];}[_0x4451d0(0x290)](_0x2cd75f,_0x3c9408){const _0x52d003=_0x4451d0;if(!this['_ensureDesired']())return null;const _0x1769d9=_0x2cd75f+'/'+_0x3c9408;return this[_0x52d003(0x2cc)](),this['_desiredOverlay'][_0x52d003(0x374)](_0x1769d9)??this['_desired']['get'](_0x1769d9)??null;}[_0x4451d0(0x2cc)](){const _0x11e962=_0x4451d0;if(!_0xc823f8)return;try{this[_0x11e962(0x302)]['_systemEnv']?.['db']?.[_0x11e962(0x370)]?.();}catch{}}async[_0x4451d0(0x18c)](_0x3c61e7,_0x560457,_0x47b4cc){const _0x4f25a2=_0x4451d0;if(!this[_0x4f25a2(0x319)]())return null;const _0x50d091=_0x3c61e7+'/'+_0x560457;this['_refreshDesiredSnapshot']();const _0x35e830=this[_0x4f25a2(0x2ab)][_0x4f25a2(0x374)](_0x50d091)??this[_0x4f25a2(0x3a7)][_0x4f25a2(0x374)](_0x50d091)??{'version':0x0},_0x51a965=(_0x35e830[_0x4f25a2(0x2c4)]||0x0)+0x1,_0x595882={..._0x35e830,..._0x47b4cc,'version':_0x51a965,'updatedAt':Date[_0x4f25a2(0x353)]()};this[_0x4f25a2(0x2ab)][_0x4f25a2(0x2b3)](_0x50d091,_0x595882);try{await this[_0x4f25a2(0x302)][_0x4f25a2(0x24c)]['_writer']['transaction'](()=>{const _0x3441f5=_0x4f25a2;this['_desired'][_0x3441f5(0x1dc)](_0x50d091,_0x595882);});}finally{if(this['_desiredOverlay']['get'](_0x50d091)===_0x595882)this[_0x4f25a2(0x2ab)][_0x4f25a2(0x35f)](_0x50d091);}return _0x51a965;}[_0x4451d0(0x1a7)](_0x9ab071){const _0x199aa6=_0x4451d0;if(!this[_0x199aa6(0x319)]())return[];this['_refreshDesiredSnapshot']();const _0x8f4ef1=_0x9ab071+'/',_0x18466b=[];for(const {key:_0x267963,value:_0x44a5d8}of this[_0x199aa6(0x3a7)][_0x199aa6(0x39d)]({'start':_0x8f4ef1,'end':_0x8f4ef1+'\xff'})){if(typeof _0x267963!==_0x199aa6(0x306)||!_0x267963[_0x199aa6(0x23f)](_0x8f4ef1))break;_0x18466b['push']({'key':_0x267963[_0x199aa6(0x1f6)](_0x8f4ef1[_0x199aa6(0x2d8)]),'value':_0x44a5d8});}return _0x18466b;}[_0x4451d0(0x220)](_0x4285bb){const _0x2825f0=_0x4451d0;if(!this[_0x2825f0(0x319)]())return null;return this[_0x2825f0(0x218)][_0x2825f0(0x374)](_0x4285bb)??null;}async[_0x4451d0(0x282)](_0x5602ad,_0x275829,_0x4736da={}){const _0x5d2077=_0x4451d0;if(!this[_0x5d2077(0x319)]())return null;let _0x31dd25;return await this[_0x5d2077(0x302)][_0x5d2077(0x24c)][_0x5d2077(0x300)]['transaction'](()=>{const _0x45bf92=_0x5d2077,_0x537991=this[_0x45bf92(0x218)][_0x45bf92(0x374)](_0x5602ad)||{'epoch':0x0};_0x31dd25=(_0x537991[_0x45bf92(0x2cb)]||0x0)+0x1,this[_0x45bf92(0x218)][_0x45bf92(0x1dc)](_0x5602ad,{..._0x537991,..._0x4736da,'cmd':_0x275829,'epoch':_0x31dd25,'updatedAt':Date[_0x45bf92(0x353)]()});}),_0x31dd25;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1dc7cd,'nodeKey':_0x3440c9,'logicalKey':_0x4da6de,'slotKey':_0x5dfe88,'PROCESS_ENV':_0x5af0dc,'NODE_TYPE':_0x213036},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x171fd7=_0x24af3f;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x2ff0e9=require$$0$4,{EVENTS:_0x1ebd9c,CHANGE_ACTIONS:_0x380a0f}=requireOkdbEnums(),{LOOP:_0x11db2c}=requireOkdbLoopMonitor(),_0x21dc78=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x29f725=0x5,_0x17c427=0x2710;class _0x444ac3 extends _0x2ff0e9{constructor(_0x2f20df,_0x39556a={}){const _0x4f2c85=_0x5df3;super(),this[_0x4f2c85(0x302)]=_0x2f20df,this['_quantum']=_0x39556a[_0x4f2c85(0x27f)]??_0x21dc78,this[_0x4f2c85(0x23b)]=_0x39556a[_0x4f2c85(0x394)]??_0x29f725,this['_dedupeMax']=_0x39556a[_0x4f2c85(0x19c)]??_0x17c427,this[_0x4f2c85(0x2a9)]=![],this['_cursors']=new Map(),this[_0x4f2c85(0x375)]=new Map(),this['_pending']=new Map(),this[_0x4f2c85(0x18a)]=null,this[_0x4f2c85(0x18f)]=![],this[_0x4f2c85(0x26a)]=new Set(),this[_0x4f2c85(0x357)]=_0x37b65d=>this[_0x4f2c85(0x23d)](_0x37b65d),this[_0x4f2c85(0x1b2)]=_0x510202=>this[_0x4f2c85(0x264)](_0x510202),this['_onStop']=()=>this['stop']();}[_0x171fd7(0x2b4)](){const _0x54ddf3=_0x171fd7;if(this[_0x54ddf3(0x2a9)])return;this[_0x54ddf3(0x2a9)]=!![];for(const [_0x5b0208,_0x36bcb3]of this['okdb'][_0x54ddf3(0x2ad)]){if(_0x5b0208[_0x54ddf3(0x23f)]('~'))continue;try{_0x36bcb3['_enableChangelog']();}catch{}}for(const [_0x12dc98,_0x241c6b]of this[_0x54ddf3(0x302)]['_envs']){if(_0x12dc98[_0x54ddf3(0x23f)]('~'))continue;try{this['_baselines']['set'](_0x12dc98,_0x241c6b[_0x54ddf3(0x30c)]()||0x0);}catch{}}const {events:_0x34ec85}=this[_0x54ddf3(0x302)];_0x34ec85['on'](_0x1ebd9c['ITEM_CREATE'],this[_0x54ddf3(0x357)]),_0x34ec85['on'](_0x1ebd9c[_0x54ddf3(0x183)],this[_0x54ddf3(0x357)]),_0x34ec85['on'](_0x1ebd9c[_0x54ddf3(0x243)],this[_0x54ddf3(0x357)]),_0x34ec85['on'](_0x1ebd9c['SYSTEM_POKE'],this[_0x54ddf3(0x1b2)]),_0x34ec85[_0x54ddf3(0x37b)](_0x1ebd9c[_0x54ddf3(0x315)],this[_0x54ddf3(0x1ce)]);}['stop'](){const _0x2cf671=_0x171fd7;if(!this[_0x2cf671(0x2a9)])return;this[_0x2cf671(0x2a9)]=![];const {events:_0x60412b}=this[_0x2cf671(0x302)];_0x60412b[_0x2cf671(0x185)](_0x1ebd9c[_0x2cf671(0x2d3)],this[_0x2cf671(0x357)]),_0x60412b['off'](_0x1ebd9c[_0x2cf671(0x183)],this[_0x2cf671(0x357)]),_0x60412b[_0x2cf671(0x185)](_0x1ebd9c[_0x2cf671(0x243)],this[_0x2cf671(0x357)]),_0x60412b[_0x2cf671(0x185)](_0x1ebd9c[_0x2cf671(0x30a)],this[_0x2cf671(0x1b2)]);try{_0x60412b[_0x2cf671(0x185)](_0x1ebd9c[_0x2cf671(0x315)],this[_0x2cf671(0x1ce)]);}catch{}this[_0x2cf671(0x18a)]&&(clearTimeout(this['_flushTimer']),this[_0x2cf671(0x18a)]=null),this[_0x2cf671(0x26e)][_0x2cf671(0x1bc)](),this[_0x2cf671(0x396)]['clear'](),this[_0x2cf671(0x375)]['clear'](),this[_0x2cf671(0x26a)][_0x2cf671(0x1bc)]();}[_0x171fd7(0x1b6)](_0x442948,_0x13d5eb,_0x12a922,_0x154c1b){return _0x442948+'\x00'+_0x13d5eb+'\x00'+_0x12a922+'\x00'+_0x154c1b;}['_markSeen'](_0x20daa0,_0x2662f4,_0x4ccc47,_0x35509a){const _0x265f8a=_0x171fd7,_0x5a5441=this[_0x265f8a(0x1b6)](_0x20daa0,_0x2662f4,_0x4ccc47,_0x35509a);if(this[_0x265f8a(0x26a)][_0x265f8a(0x342)](_0x5a5441))return![];this[_0x265f8a(0x26a)][_0x265f8a(0x281)](_0x5a5441);if(this[_0x265f8a(0x26a)][_0x265f8a(0x238)]>this[_0x265f8a(0x399)]){const _0x2e8163=this[_0x265f8a(0x26a)][_0x265f8a(0x1e4)]()[_0x265f8a(0x250)]()[_0x265f8a(0x214)];this[_0x265f8a(0x26a)][_0x265f8a(0x35f)](_0x2e8163);}return!![];}[_0x171fd7(0x23d)](_0x233a1f){const _0x543379=_0x171fd7;if(!this['_started']||!_0x233a1f)return;const {env:_0x4ad50a,type:_0x527eee,key:_0x2b882e,clock:_0x3f4cc3,origin:_0x4f1075,action:_0x37c43d,newValue:_0x31bcfd,oldValue:_0x3d4909}=_0x233a1f;if(_0x4ad50a==null||_0x527eee==null||_0x2b882e==null)return;if(typeof _0x4ad50a===_0x543379(0x306)&&_0x4ad50a[_0x543379(0x23f)]('~'))return;if(typeof _0x527eee===_0x543379(0x306)&&_0x527eee[_0x543379(0x23f)]('~'))return;if(!this['_markSeen'](_0x4ad50a,_0x527eee,_0x2b882e,_0x3f4cc3))return;const _0x797081=_0x37c43d===_0x380a0f[_0x543379(0x18e)]?_0x543379(0x39b):_0x543379(0x1dc);this[_0x543379(0x33c)](_0x543379(0x2a7),{'env':_0x4ad50a,'type':_0x527eee,'key':_0x2b882e,'op':_0x797081,'clock':_0x3f4cc3,'origin':_0x4f1075,'value':_0x797081===_0x543379(0x39b)?null:_0x31bcfd,'prevValue':_0x3d4909});}[_0x171fd7(0x264)](_0x308ff9){const _0x3b3ec1=_0x171fd7;if(!this[_0x3b3ec1(0x2a9)])return;if(!_0x308ff9||typeof _0x308ff9[_0x3b3ec1(0x2de)]!==_0x3b3ec1(0x306)||typeof _0x308ff9[_0x3b3ec1(0x2d0)]!==_0x3b3ec1(0x306))return;const {env:_0x2f649f,type:_0x315219}=_0x308ff9;if(_0x2f649f[_0x3b3ec1(0x23f)]('~')||_0x315219[_0x3b3ec1(0x23f)]('~'))return;this[_0x3b3ec1(0x26e)][_0x3b3ec1(0x2b3)](_0x2f649f+'\x00'+_0x315219,{'env':_0x2f649f,'type':_0x315219}),this['_scheduleFlush']();}['_scheduleFlush'](){const _0x3cd710=_0x171fd7;if(this['_flushTimer'])return;const _0x44c472=()=>{const _0x2f88d3=_0x5df3;this[_0x2f88d3(0x18a)]=null,this[_0x2f88d3(0x35d)]()[_0x2f88d3(0x1b7)](()=>{});};this['_flushTimer']=setTimeout(_0x44c472,this[_0x3cd710(0x23b)]>0x0?this['_flushDebounce']:0x0);}async[_0x171fd7(0x35d)](){const _0x163f5d=_0x171fd7;if(this[_0x163f5d(0x18f)]){this[_0x163f5d(0x286)]();return;}this['_draining']=!![];try{const _0x3b9256=[...this['_pending']['values']()];this['_pending'][_0x163f5d(0x1bc)]();let _0x4bcf20=![];for(const {env:_0x8b722,type:_0x120d5a}of _0x3b9256){try{const _0x308a27=await this[_0x163f5d(0x1d4)](_0x8b722,_0x120d5a);if(_0x308a27)_0x4bcf20=!![];}catch{this[_0x163f5d(0x26e)][_0x163f5d(0x2b3)](_0x8b722+'\x00'+_0x120d5a,{'env':_0x8b722,'type':_0x120d5a}),_0x4bcf20=!![];}}if(_0x4bcf20||this[_0x163f5d(0x26e)][_0x163f5d(0x238)]>0x0)this[_0x163f5d(0x286)]();}finally{this[_0x163f5d(0x18f)]=![];}}async[_0x171fd7(0x1d4)](_0x1011b0,_0x39b7ee){const _0x33b0f8=_0x171fd7,_0x1a1c9f=await this[_0x33b0f8(0x302)]['_openEnvLazy'](_0x1011b0),_0x21087b=_0x1011b0+'\x00'+_0x39b7ee;!this[_0x33b0f8(0x396)][_0x33b0f8(0x342)](_0x21087b)&&(!this[_0x33b0f8(0x375)]['has'](_0x1011b0)&&(_0x1a1c9f[_0x33b0f8(0x314)](),this[_0x33b0f8(0x375)]['set'](_0x1011b0,_0x1a1c9f['getClock']()||0x0)),this['_cursors'][_0x33b0f8(0x2b3)](_0x21087b,this[_0x33b0f8(0x375)][_0x33b0f8(0x374)](_0x1011b0)));const _0x1949ff=this[_0x33b0f8(0x396)]['get'](_0x21087b),_0x374562=_0x1a1c9f[_0x33b0f8(0x30c)](_0x39b7ee)||0x0;if(_0x374562<=_0x1949ff)return![];const _0x26f37c=_0x1949ff+this['_quantum'],_0x1c591b=Math[_0x33b0f8(0x2c7)](_0x374562,_0x26f37c),_0x212c3a=_0x11db2c[_0x33b0f8(0x2c6)]?_0x11db2c[_0x33b0f8(0x353)]():0x0,_0x4f9973=Array[_0x33b0f8(0x2e1)](_0x1a1c9f[_0x33b0f8(0x2f8)](_0x39b7ee,_0x1949ff+0x1,_0x1c591b));let _0x4c4e03=_0x1949ff;for(const _0x4d481b of _0x4f9973){const {clock:_0x2e57cf,key:_0x206e45,action:_0x37ea75,origin:_0x111f04}=_0x4d481b;if(_0x2e57cf>_0x4c4e03)_0x4c4e03=_0x2e57cf;if(_0x206e45==null)continue;if(!this[_0x33b0f8(0x1fc)](_0x1011b0,_0x39b7ee,_0x206e45,_0x2e57cf))continue;let _0x163421,_0x2df0b7;if(_0x37ea75===_0x380a0f['REMOVE'])_0x163421='remove',_0x2df0b7=null;else{const _0x23fc28=_0x1a1c9f[_0x33b0f8(0x374)](_0x39b7ee,_0x206e45);_0x23fc28==null?(_0x163421=_0x33b0f8(0x39b),_0x2df0b7=null):(_0x163421=_0x33b0f8(0x1dc),_0x2df0b7=_0x23fc28);}this[_0x33b0f8(0x33c)]('change',{'env':_0x1011b0,'type':_0x39b7ee,'key':_0x206e45,'op':_0x163421,'clock':_0x2e57cf,'origin':_0x111f04,'value':_0x2df0b7});}if(_0x11db2c[_0x33b0f8(0x2c6)])_0x11db2c[_0x33b0f8(0x209)](_0x33b0f8(0x234)+_0x1011b0+':'+_0x39b7ee,_0x11db2c[_0x33b0f8(0x353)]()-_0x212c3a,'n='+_0x4f9973[_0x33b0f8(0x2d8)]);return this[_0x33b0f8(0x396)][_0x33b0f8(0x2b3)](_0x21087b,Math[_0x33b0f8(0x1fd)](_0x4c4e03,_0x1c591b)),_0x1a1c9f['getClock'](_0x39b7ee)>_0x1c591b;}['status'](){const _0x2ea574=_0x171fd7;return{'started':this['_started'],'quantum':this[_0x2ea574(0x25f)],'flushDebounce':this['_flushDebounce'],'cursors':Object['fromEntries']([...this[_0x2ea574(0x396)]['entries']()][_0x2ea574(0x28d)](([_0x279a1d,_0x4562b7])=>[_0x279a1d['replace']('\x00',':'),_0x4562b7])),'pending':this[_0x2ea574(0x26e)]['size'],'seen':this[_0x2ea574(0x26a)]['size']};}}return _0x444ac3['CHANGEFEED_QUANTUM']=_0x21dc78,okdbChangefeed={'OKDBChangefeed':_0x444ac3},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x40d8a0=_0x24af3f;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x5e96ec=require$$1$1,_0x4e7019=require$$1,{EVENTS:_0x2aa535}=requireOkdbEnums(),_0x347e78=require$$0$3,{slotKey:_0x54d73c}=requireOkdbProcessRegistry(),_0x21cc89=0xfa,_0x424dbe=0xfa0,_0x1ceab0=0x5,_0x160d59=0x2710,_0x51dba2=0xbb8,_0x478057=0x7d0,_0x186481=_0x40d8a0(0x1da),_0x3b21e0='ephemeral',_0x5be760=_0x40d8a0(0x278),_0x27e42a=_0x40d8a0(0x25b),_0x6b2cee=[_0x2aa535[_0x40d8a0(0x1e3)],_0x2aa535[_0x40d8a0(0x1bf)],_0x2aa535[_0x40d8a0(0x321)],_0x2aa535['FTS_RESET'],_0x2aa535[_0x40d8a0(0x23e)],_0x2aa535[_0x40d8a0(0x328)],_0x2aa535[_0x40d8a0(0x333)],_0x2aa535[_0x40d8a0(0x1fa)],_0x40d8a0(0x2da),'processor:progress','processor:error',_0x40d8a0(0x225),_0x40d8a0(0x330),_0x40d8a0(0x2b7)],_0x2b2c5a=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x3a08ca({workers:_0x5630e6,makeOkdb:_0x218d16,port:_0x4e81cb,primaryOkdb:_0x151a51,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x533439=_0x40d8a0;if(_0x5e96ec[_0x533439(0x326)])return childEntry&&_0x5e96ec['setupPrimary']({'exec':_0x4e7019[_0x533439(0x258)](__dirname,_0x533439(0x34c)),'args':[],'execArgv':((()=>{const _0x42309e=_0x533439,_0x252ae3=[];for(let _0xbce29=0x0;_0xbce29<process[_0x42309e(0x19b)][_0x42309e(0x2d8)];_0xbce29++){const _0x5c0f37=process['execArgv'][_0xbce29];if(_0x5c0f37[_0x42309e(0x23f)](_0x42309e(0x254))||_0x5c0f37['startsWith'](_0x42309e(0x31c))||_0x5c0f37[_0x42309e(0x23f)](_0x42309e(0x2c8)))continue;if(_0x5c0f37==='-e'||_0x5c0f37==='--eval'||_0x5c0f37==='-p'||_0x5c0f37===_0x42309e(0x2fb)){_0xbce29++;continue;}_0x252ae3[_0x42309e(0x202)](_0x5c0f37);}return _0x252ae3;})())}),_0x3cc145({'workers':_0x5630e6,'port':_0x4e81cb,'primaryOkdb':_0x151a51,'workerEnv':workerEnv});return _0x2731f6({'makeOkdb':_0x218d16,'port':_0x4e81cb});}function _0x3cc145({workers:_0x3fe9f5,port:_0x284077,primaryOkdb:_0x2d7c62,workerEnv:_0x599f49}){const _0x58a705=_0x40d8a0,_0x5152e7=new Map(),_0x18376e=new Map();let _0x5b1f86=![];const _0x16153f=_0x262482=>_0x262482?.[_0x58a705(0x1cc)],_0x5e2d76=_0x524b02=>{const _0x21e22a=_0x58a705,_0x32b66c=_0x5e96ec[_0x21e22a(0x322)]({...process.env,..._0x599f49||{},'OKDB_CLUSTER_SLOT':String(_0x524b02)});return _0x32b66c[_0x21e22a(0x1cc)]=_0x524b02,_0x5152e7[_0x21e22a(0x2b3)](_0x32b66c[_0x21e22a(0x350)][_0x21e22a(0x34e)],{'worker':_0x32b66c,'startedAt':Date['now'](),'slot':_0x524b02}),_0x32b66c['on']('error',_0x4b2cc4=>{const _0x4355c6=_0x21e22a;console['log']('[okdb-cluster]\x20worker\x20pid='+_0x32b66c['process']['pid']+_0x4355c6(0x2e0)+(_0x4b2cc4?.['message']??_0x4b2cc4));}),_0x32b66c['on'](_0x21e22a(0x2b5),()=>_0x1470f8()),_0x32b66c;},_0x1d0fd4=_0x1f22f9=>{const _0x35c09a=_0x58a705;for(const {worker:_0x28ee91}of _0x5152e7[_0x35c09a(0x1e4)]()){if(_0x28ee91[_0x35c09a(0x205)]()||!_0x28ee91[_0x35c09a(0x1f8)]())continue;try{_0x28ee91['send'](_0x1f22f9);}catch{}}};_0x2d7c62?.[_0x58a705(0x391)]?.({'kind':_0x58a705(0x2d4),'listenAddr':':'+_0x284077})[_0x58a705(0x1b7)](()=>{}),_0x2d7c62?.[_0x58a705(0x29e)]?.['setOwnMeta']?.({'workersConfigured':_0x3fe9f5});const _0x2c0584={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x1470f8=()=>{const _0xa635cf=_0x58a705,_0x395e05=_0x2d7c62?.[_0xa635cf(0x29e)];if(!_0x395e05||!_0x395e05[_0xa635cf(0x37a)])return;const _0x30ef40=_0x395e05[_0xa635cf(0x39e)];for(const {worker:_0x15c30a,startedAt:_0x1f88f5,slot:_0x3ddd1b,stats:_0x50dfc1,processing:_0x24a097}of _0x5152e7[_0xa635cf(0x1e4)]()){if(_0x15c30a[_0xa635cf(0x205)]())continue;const _0x3395f4=_0x395e05[_0xa635cf(0x318)]?.()&&_0x395e05['getDesired']('slot',_0xc6df5a(_0x3ddd1b))?.[_0xa635cf(0x298)]===!![];_0x395e05[_0xa635cf(0x2a6)]({'pid':_0x15c30a[_0xa635cf(0x350)][_0xa635cf(0x34e)],'startedAt':_0x1f88f5,'kind':_0xa635cf(0x2cf),'supervisorKey':_0x30ef40,'slot':_0x3ddd1b,'slotKey':_0xc6df5a(_0x3ddd1b),'role':_0x2c0584,'listenAddr':':'+_0x284077,'lifecycle':_0x3395f4?_0xa635cf(0x265):_0xa635cf(0x25a),'processing':_0x24a097??null,'stats':_0x50dfc1??null})['catch'](()=>{});}},_0xc6df5a=_0x283799=>_0x54d73c(_0x58a705(0x325)+_0x284077,_0x283799),_0x45f4ff=_0x4b28e6=>{const _0x434827=_0x58a705,_0x4bede0=_0x2d7c62?.[_0x434827(0x29e)];if(!_0x4bede0?.[_0x434827(0x318)]?.())return![];return _0x4bede0['getDesired'](_0x434827(0x3a3),_0xc6df5a(_0x4b28e6))?.[_0x434827(0x298)]===!![];};for(let _0x419991=0x0;_0x419991<_0x3fe9f5;_0x419991++){const _0x56148d=_0x45f4ff(_0x419991);_0x18376e[_0x58a705(0x2b3)](_0x419991,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x56148d,'respawnTimer':null}),_0x56148d?console[_0x58a705(0x278)](_0x58a705(0x1c6)+_0x419991+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x5e2d76(_0x419991);}const _0x3d0bfd=()=>{const _0x29b01e=_0x58a705,_0x23e3e6=_0x2d7c62?.[_0x29b01e(0x29e)];if(!_0x23e3e6?.[_0x29b01e(0x37a)]||!_0x23e3e6[_0x29b01e(0x318)]?.())return;for(const [_0x3acae2,_0x5629b6]of _0x18376e[_0x29b01e(0x3a6)]()){const _0x3f618d=_0x23e3e6[_0x29b01e(0x290)](_0x29b01e(0x3a3),_0xc6df5a(_0x3acae2)),_0x394328=_0x3f618d?.['decommission']===!![],_0x254011=_0x3f618d?.[_0x29b01e(0x25c)]===!![];if(_0x394328&&!_0x5629b6[_0x29b01e(0x2d1)]){_0x5629b6[_0x29b01e(0x2d1)]=!![];_0x5629b6['respawnTimer']&&(clearTimeout(_0x5629b6[_0x29b01e(0x3b3)]),_0x5629b6['respawnTimer']=null);for(const {worker:_0x15f8a7}of _0x5152e7[_0x29b01e(0x1e4)]()){if(_0x16153f(_0x15f8a7)!==_0x3acae2||_0x15f8a7[_0x29b01e(0x205)]())continue;try{if(_0x254011)_0x15f8a7[_0x29b01e(0x350)][_0x29b01e(0x25c)](_0x29b01e(0x2bc));else _0x15f8a7[_0x29b01e(0x1f8)]()&&_0x15f8a7[_0x29b01e(0x339)]();}catch{}}console['log'](_0x29b01e(0x271)+(_0x254011?'hard-killed':_0x29b01e(0x246))+_0x29b01e(0x1e8)+_0x3acae2+_0x29b01e(0x291));}else{if(!_0x394328&&_0x5629b6[_0x29b01e(0x2d1)]&&_0x3f618d){_0x5629b6[_0x29b01e(0x2d1)]=![],_0x5629b6[_0x29b01e(0x1d6)]=[],_0x5629b6[_0x29b01e(0x206)]=0x0;const _0x29e143=[..._0x5152e7[_0x29b01e(0x1e4)]()]['some'](({worker:_0x363c5d})=>_0x16153f(_0x363c5d)===_0x3acae2&&!_0x363c5d[_0x29b01e(0x205)]());!_0x29e143&&!_0x5b1f86&&(_0x5e2d76(_0x3acae2),console[_0x29b01e(0x278)](_0x29b01e(0x1ff)+_0x3acae2));}}}},_0x2207cf=()=>{try{_0x3d0bfd();}catch{}};_0x2d7c62?.[_0x58a705(0x256)]?.['on']?.(_0x2aa535['SYSTEM_PROC'],_0x2207cf);const _0x3de86d=[];if(_0x2d7c62?.['events']?.['on'])for(const _0x3fe6b1 of _0x6b2cee){const _0x247d6c=_0x58b1a9=>{_0x1d0fd4({[_0x186481]:_0x3b21e0,'event':_0x3fe6b1,'data':_0x58b1a9??{}});};_0x2d7c62[_0x58a705(0x256)]['on'](_0x3fe6b1,_0x247d6c),_0x3de86d[_0x58a705(0x202)]({'event':_0x3fe6b1,'handler':_0x247d6c});}const _0x3691d0=setInterval(()=>{_0x3d0bfd(),_0x1470f8();},_0x2b2c5a);_0x3691d0[_0x58a705(0x36e)]?.();const _0x53b3d1=(_0x4dc78d,_0x1d55b5)=>{const _0x467e3d=_0x58a705;if(!_0x1d55b5||typeof _0x1d55b5!==_0x467e3d(0x2eb)||_0x1d55b5[_0x186481]!==_0x5be760)return;if(!_0x2d7c62?.['log']?.[_0x467e3d(0x35c)])return;const _0x422290=_0x1d55b5['entry']||{};_0x2d7c62[_0x467e3d(0x278)][_0x467e3d(0x35c)]({..._0x422290,'msg':'[w'+_0x1d55b5[_0x467e3d(0x3a3)]+']\x20'+(_0x422290['msg']??''),'meta':{..._0x422290[_0x467e3d(0x36c)]||{},'worker':_0x1d55b5[_0x467e3d(0x3a3)],'workerPid':_0x1d55b5[_0x467e3d(0x34e)]}});};_0x5e96ec['on'](_0x58a705(0x1a1),_0x53b3d1);const _0x31d417=(_0x79c87a,_0x39f4f6)=>{const _0x139cac=_0x58a705;if(!_0x39f4f6||typeof _0x39f4f6!==_0x139cac(0x2eb)||_0x39f4f6[_0x186481]!==_0x27e42a)return;const _0x40957f=_0x5152e7[_0x139cac(0x374)](_0x79c87a[_0x139cac(0x350)]['pid']);if(_0x40957f){_0x40957f[_0x139cac(0x25b)]={..._0x39f4f6['stats'],'at':Date[_0x139cac(0x353)]()};if(_0x39f4f6['processing']!==undefined)_0x40957f['processing']=_0x39f4f6['processing'];}};_0x5e96ec['on'](_0x58a705(0x1a1),_0x31d417),_0x5e96ec['on'](_0x58a705(0x38e),(_0x231138,_0x4c920e,_0x25ddf3)=>{const _0x50bb7a=_0x58a705,_0xee0714=_0x231138[_0x50bb7a(0x350)][_0x50bb7a(0x34e)],_0x5a0020=_0x16153f(_0x231138),_0x371179=_0x5152e7[_0x50bb7a(0x374)](_0xee0714);if(_0x371179&&_0x2d7c62?.['processes'])_0x2d7c62['processes'][_0x50bb7a(0x36b)](_0xee0714+':'+_0x371179[_0x50bb7a(0x398)])['catch'](()=>{});_0x5152e7[_0x50bb7a(0x35f)](_0xee0714),console[_0x50bb7a(0x278)](_0x50bb7a(0x32f)+_0xee0714+'\x20(slot='+(_0x5a0020??'?')+_0x50bb7a(0x2f0)+('(code='+_0x4c920e+_0x50bb7a(0x1df)+(_0x25ddf3??'none')+_0x50bb7a(0x22e)+_0x5152e7[_0x50bb7a(0x238)]+_0x50bb7a(0x301))),_0x1470f8();if(_0x5b1f86||_0x5a0020==null)return;const _0x4051e2=_0x18376e['get'](_0x5a0020);if(!_0x4051e2||_0x4051e2[_0x50bb7a(0x2d1)])return;const _0x19deb7=Date[_0x50bb7a(0x353)]();_0x4051e2[_0x50bb7a(0x1d6)][_0x50bb7a(0x202)](_0x19deb7),_0x4051e2[_0x50bb7a(0x1d6)]=_0x4051e2[_0x50bb7a(0x1d6)][_0x50bb7a(0x332)](_0x3c7d23=>_0x19deb7-_0x3c7d23<=_0x160d59);if(_0x4051e2[_0x50bb7a(0x1d6)]['length']>=_0x1ceab0){_0x4051e2[_0x50bb7a(0x2d1)]=!![],console[_0x50bb7a(0x3a0)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x5a0020+_0x50bb7a(0x295)+_0x4051e2[_0x50bb7a(0x1d6)][_0x50bb7a(0x2d8)]+_0x50bb7a(0x296)+(_0x160d59+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x5152e7[_0x50bb7a(0x238)]+_0x50bb7a(0x1b9)));return;}_0x4051e2['consecutiveFailures']++;const _0x19ffc0=Math[_0x50bb7a(0x2c7)](_0x424dbe,_0x21cc89*0x2**(_0x4051e2[_0x50bb7a(0x206)]-0x1));console[_0x50bb7a(0x278)]('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x5a0020+_0x50bb7a(0x2e6)+_0x19ffc0+_0x50bb7a(0x240)+_0x4051e2[_0x50bb7a(0x206)]+')'),_0x4051e2[_0x50bb7a(0x3b3)]=setTimeout(()=>{const _0x302dbc=_0x50bb7a;_0x4051e2['respawnTimer']=null;if(_0x5b1f86||_0x4051e2[_0x302dbc(0x2d1)])return;const _0x526a22=_0x5e2d76(_0x5a0020);_0x526a22[_0x302dbc(0x37b)](_0x302dbc(0x1a9),()=>{const _0x2e54aa=_0x302dbc;if(_0x18376e[_0x2e54aa(0x374)](_0x5a0020)===_0x4051e2)_0x4051e2[_0x2e54aa(0x206)]=0x0;});},_0x19ffc0),_0x4051e2[_0x50bb7a(0x3b3)][_0x50bb7a(0x36e)]?.();});const _0x81661a=[..._0x5152e7[_0x58a705(0x292)]()];console[_0x58a705(0x278)](_0x58a705(0x25d)+process['pid']+_0x58a705(0x30b)+_0x3fe9f5+_0x58a705(0x25e)+_0x284077+':\x20'+('['+_0x81661a['join'](',\x20')+']'));const _0x2751c7={'_isClusterController':!![],'port':_0x284077,'primaryOkdb':_0x2d7c62??null,'status'(){const _0x6e5573=_0x58a705;return{'clustered':!![],'primaryPid':process[_0x6e5573(0x34e)],'port':_0x284077,'primaryRole':_0x2d7c62?.[_0x6e5573(0x270)]??null,'processorPid':null,'supervisorPid':process[_0x6e5573(0x34e)],'workers':[..._0x5152e7[_0x6e5573(0x1e4)]()][_0x6e5573(0x28d)](({worker:_0x2d4b64})=>({'pid':_0x2d4b64[_0x6e5573(0x350)][_0x6e5573(0x34e)],'id':_0x2d4b64['id'],'dead':_0x2d4b64[_0x6e5573(0x205)]()}))};},async 'close'(){const _0x59aa3e=_0x58a705;_0x5b1f86=!![];for(const _0x841a44 of _0x18376e[_0x59aa3e(0x1e4)]()){_0x841a44[_0x59aa3e(0x2d1)]=!![],_0x841a44[_0x59aa3e(0x3b3)]&&(clearTimeout(_0x841a44[_0x59aa3e(0x3b3)]),_0x841a44[_0x59aa3e(0x3b3)]=null);}clearInterval(_0x3691d0),_0x5e96ec['off']('message',_0x53b3d1),_0x5e96ec[_0x59aa3e(0x185)](_0x59aa3e(0x1a1),_0x31d417),_0x2d7c62?.[_0x59aa3e(0x256)]?.['off']?.(_0x2aa535[_0x59aa3e(0x268)],_0x2207cf);if(_0x2d7c62?.[_0x59aa3e(0x256)]?.[_0x59aa3e(0x185)])for(const {event:_0x5318c0,handler:_0x1b89c6}of _0x3de86d){try{_0x2d7c62[_0x59aa3e(0x256)][_0x59aa3e(0x185)](_0x5318c0,_0x1b89c6);}catch{}}_0x3de86d['length']=0x0;const _0x480870=[..._0x5152e7[_0x59aa3e(0x1e4)]()]['map'](({worker:_0x1c8c1f})=>_0x1c8c1f);if(_0x480870[_0x59aa3e(0x2d8)]===0x0)return;await Promise[_0x59aa3e(0x239)](_0x480870['map'](_0x3c8b39=>new Promise(_0x400caf=>{const _0x19e772=_0x59aa3e;if(_0x3c8b39[_0x19e772(0x205)]()){_0x400caf();return;}let _0xafd9fa=![];const _0x26ca6f=()=>{if(_0xafd9fa)return;_0xafd9fa=!![];if(_0x44b922)clearTimeout(_0x44b922);_0x400caf();};_0x3c8b39[_0x19e772(0x37b)]('exit',_0x26ca6f);const _0x44b922=setTimeout(()=>{const _0x1abae3=_0x19e772;try{_0x3c8b39[_0x1abae3(0x350)][_0x1abae3(0x25c)]();}catch{}},_0x51dba2+0x1f4);_0x44b922[_0x19e772(0x36e)]?.();try{_0x3c8b39[_0x19e772(0x339)]();}catch{try{_0x3c8b39['process'][_0x19e772(0x25c)]();}catch{}}})));}};return _0x2751c7;}async function _0x2731f6({makeOkdb:_0x43996a,port:_0x4abf5f}){const _0x405c59=_0x40d8a0,_0x7cf0bb=await _0x43996a();return _0x5effc1(_0x7cf0bb),_0x7cf0bb['http'][_0x405c59(0x2f6)](_0x4abf5f);}function _0x5effc1(_0x18bdc8){const _0x4cde23=_0x40d8a0;if(!_0x18bdc8||_0x18bdc8['_clusterWorkerAttached'])return;_0x18bdc8[_0x4cde23(0x3a8)]=!![];try{const {OKDBChangefeed:_0x1a3ba4}=requireOkdbChangefeed(),_0x1ad6ac=_0x18bdc8[_0x4cde23(0x35e)];if(_0x1ad6ac&&typeof _0x1ad6ac['attachFeed']===_0x4cde23(0x22c)){const _0x288f69=new _0x1a3ba4(_0x18bdc8);_0x288f69[_0x4cde23(0x2b4)](),_0x1ad6ac[_0x4cde23(0x385)](_0x288f69),_0x18bdc8[_0x4cde23(0x37e)]=_0x288f69;}}catch(_0x73ac34){_0x18bdc8[_0x4cde23(0x278)]?.[_0x4cde23(0x20b)]?.(_0x4cde23(0x3a1)+(_0x73ac34?.[_0x4cde23(0x1a1)]??_0x73ac34),{'feature':'cluster'});}const _0x437e5f=_0x5f302b=>{const _0x260fe2=_0x4cde23;if(!_0x5f302b||typeof _0x5f302b!==_0x260fe2(0x2eb)||_0x5f302b[_0x186481]==null)return;if(_0x5f302b[_0x186481]===_0x3b21e0)try{_0x18bdc8[_0x260fe2(0x35e)]?.['pushEphemeral']?.(_0x5f302b[_0x260fe2(0x2fc)],_0x5f302b['data']);}catch{}};process['on']('message',_0x437e5f),_0x18bdc8['_clusterOnMessage']=_0x437e5f;{let _0x5130b5=process['cpuUsage'](),_0x49c73d=Date[_0x4cde23(0x353)]();const _0x48473c=()=>{const _0x1b36b9=_0x4cde23;if(typeof process[_0x1b36b9(0x22f)]!=='function'||!process[_0x1b36b9(0x34a)])return;const _0x23cef1=Date['now'](),_0x4e2833=process[_0x1b36b9(0x32d)](),_0x5827bb=(_0x23cef1-_0x49c73d)*0x3e8,_0xb537d=_0x4e2833[_0x1b36b9(0x366)]-_0x5130b5[_0x1b36b9(0x366)]+(_0x4e2833[_0x1b36b9(0x24a)]-_0x5130b5[_0x1b36b9(0x24a)]),_0x55803d=_0x5827bb>0x0?Math[_0x1b36b9(0x2c7)](0x64,Math[_0x1b36b9(0x252)](_0xb537d/(_0x5827bb*(_0x347e78[_0x1b36b9(0x1af)]()[_0x1b36b9(0x2d8)]||0x1))*0x64)):0x0;_0x5130b5=_0x4e2833,_0x49c73d=_0x23cef1;const _0x171d2f=process[_0x1b36b9(0x3a4)]();let _0x587e7b=null;try{_0x587e7b=_0x18bdc8[_0x1b36b9(0x270)]?.[_0x1b36b9(0x347)]?_0x18bdc8[_0x1b36b9(0x29e)]?.[_0x1b36b9(0x2d7)]?.()??null:null;}catch{}try{process[_0x1b36b9(0x22f)]({[_0x186481]:_0x27e42a,'stats':{'rss':_0x171d2f[_0x1b36b9(0x269)],'heapUsed':_0x171d2f[_0x1b36b9(0x31a)],'heapTotal':_0x171d2f['heapTotal'],'external':_0x171d2f['external'],'cpuPct':_0x55803d,'cpuWindowMs':Math[_0x1b36b9(0x252)](_0x5827bb/0x3e8)||null},'processing':_0x587e7b});}catch{}},_0x5c1f63=Math[_0x4cde23(0x1fd)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3a6fd2=setInterval(_0x48473c,_0x5c1f63);_0x3a6fd2[_0x4cde23(0x36e)]?.(),_0x48473c();for(const _0x36e74b of[_0x4cde23(0x225),_0x4cde23(0x330)]){_0x18bdc8[_0x4cde23(0x256)]?.['on']?.(_0x36e74b,()=>{try{_0x48473c();}catch{}});}}let _0x354bb2=![];const _0x2762c0=async _0x4ba329=>{const _0x46a913=_0x4cde23;if(_0x354bb2)return;_0x354bb2=!![];const _0x1345a3=setTimeout(()=>process['exit'](_0x4ba329),_0x51dba2);_0x1345a3[_0x46a913(0x36e)]?.();try{await _0x18bdc8[_0x46a913(0x26f)]?.();}catch{}process[_0x46a913(0x38e)](_0x4ba329);};process['on'](_0x4cde23(0x339),()=>_0x2762c0(0x0));if(process['platform']!==_0x4cde23(0x1d9)){const _0x23078c=setInterval(()=>{const _0x420136=_0x4cde23;if(process[_0x420136(0x27b)]===0x1)_0x2762c0(0x0);},_0x478057);_0x23078c['unref']?.(),_0x18bdc8[_0x4cde23(0x329)]=_0x23078c;}}return okdbCluster={'runClustered':_0x3a08ca,'attachWorkerCluster':_0x5effc1},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x7b58f6=_0x24af3f;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x409104=require$$0$5,{attachWorkerCluster:_0x3164fb}=requireOkdbCluster();async function _0x3d53d3(){const _0x3cd68a=_0x5df3,_0x5f52ff=process.env.OKDB_HTTP_CHILD;if(!_0x5f52ff)throw new Error(_0x3cd68a(0x2ba));const {rootPath:_0x4c35b2,port:_0x2a7c18,options:options={},logLevel:logLevel=_0x3cd68a(0x33a)}=JSON[_0x3cd68a(0x1c5)](_0x5f52ff);if(!_0x4c35b2||!_0x2a7c18)throw new Error(_0x3cd68a(0x2bf));const _0x4111d7=new _0x409104(_0x4c35b2,{...options,'engines':![],'processors':![],'compaction':![]});_0x4111d7[_0x3cd68a(0x278)]['detachConsole']?.();const _0x462f5e=process.env.OKDB_CLUSTER_SLOT??'?',_0x2e8c72={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x36e441=_0x2e8c72[logLevel]??_0x2e8c72[_0x3cd68a(0x33a)];_0x4111d7['log'][_0x3cd68a(0x377)](_0x12030f=>{const _0xb7edb0=_0x3cd68a;if((_0x2e8c72[_0x12030f[_0xb7edb0(0x1cf)]]??0x1)<_0x36e441)return;try{process[_0xb7edb0(0x22f)]?.({'__okdbCluster':_0xb7edb0(0x278),'slot':_0x462f5e,'pid':process[_0xb7edb0(0x34e)],'entry':_0x12030f});}catch{}}),await _0x4111d7[_0x3cd68a(0x1c8)](),_0x3164fb(_0x4111d7),await _0x4111d7[_0x3cd68a(0x379)][_0x3cd68a(0x2f6)](_0x2a7c18);}return _0x3d53d3()[_0x7b58f6(0x1b7)](_0x9b7db3=>{const _0x26c2a0=_0x7b58f6;try{process[_0x26c2a0(0x22f)]?.({'__okdbCluster':_0x26c2a0(0x278),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x26c2a0(0x34e)],'entry':{'level':'error','msg':_0x26c2a0(0x184)+(_0x9b7db3?.[_0x26c2a0(0x1a1)]??_0x9b7db3)}});}catch{}process[_0x26c2a0(0x38e)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x24af3f(0x29c)]=okdbHttpWorkerChild;