@kedem/okdb 2.6.2 → 2.6.4

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 _0x1383d2=_0x2fe0;(function(_0x5c2333,_0x5f14c6){const _0x1a5f2e=_0x2fe0,_0x195a68=_0x5c2333();while(!![]){try{const _0x4938e0=parseInt(_0x1a5f2e(0x2ad))/0x1*(-parseInt(_0x1a5f2e(0x11f))/0x2)+-parseInt(_0x1a5f2e(0x16e))/0x3+-parseInt(_0x1a5f2e(0x112))/0x4*(-parseInt(_0x1a5f2e(0x9d))/0x5)+parseInt(_0x1a5f2e(0x2a3))/0x6+parseInt(_0x1a5f2e(0x202))/0x7+-parseInt(_0x1a5f2e(0x22f))/0x8+parseInt(_0x1a5f2e(0x152))/0x9;if(_0x4938e0===_0x5f14c6)break;else _0x195a68['push'](_0x195a68['shift']());}catch(_0x49e39f){_0x195a68['push'](_0x195a68['shift']());}}}(_0x2b1c,0x45fc3));var require$$0$5=require(_0x1383d2(0x27c)),require$$1$1=require(_0x1383d2(0x87)),require$$1=require(_0x1383d2(0x189)),require$$0$3=require('os'),require$$2=require(_0x1383d2(0x133)),require$$0=require(_0x1383d2(0xd0)),require$$0$2=require(_0x1383d2(0x1b5)),require$$0$1=require('fs'),require$$0$4=require(_0x1383d2(0x2b4));function _0x2b1c(){const _0x3886ba=['loop-lag','warn','[okdb-cluster]\x20respawning\x20worker\x20slot=','start','inflightAgesMs','cli','_baselines','all','selfKey','oldestPendingMs','_getType','instanceId','isHeld','closed','disable','reap','getDesired','env','txn:rollback','hard-killed','SYSTEM_STOPPED','parse','_wantDb','nodesView','_admissionTimer','halted','writerStatus','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','close','committed','okdb-diag.','replace','processor','mkdirSync','_participate','indexOf','attachFeed','transaction','commit','fanout','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','dropIndex','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','isEnabled','FTS_RESET','_clusterWorkerAttached','true','FTS_DROP','draining','ttl:set','license:activated','extend','processor:retry','\x20drainAge=','49148UahuFx','2.6.2','list','rowKey','_publishNow','_openEnvLazy','listen','_heartbeatTimer','busy','_enqueuedAt','isConnected','setupPrimary','functions','2jkHriA','fork','_servingEngines','win32','listAll','maxMs','filter','listDesired','type:drop','_isWriter','\x20statusEnv=','_key','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','starting','dedupeMax','unref','msg','keys','external','FTS_REGISTERED','crypto','publishChildRow','addSupervisedChild','SYSTEM_POKE','treeView','code','beforeWrite','force','queue-worker','stringify','\x20died\x20','\x20pid=','raw-remove','processes','async','_lastCpuAt','_log','stderr','slotKey','has','caps','ITEM_UPDATE','openDB','\x20(slot=','hasDesired','compaction','uptime','_db','resetReadTxn','_refreshDesiredSnapshot','--test','4324842vmHtdJ','lifecycle','dropping','license:added','type','_wantDbHandle','_sandbox','view','_startAdmission','_rowKey','call','allSettled','change','--print','system:env_release','getCmd','processKey','SWAP','_durs','INDEX_RESET','http\x20worker\x20child\x20failed:\x20','_processStartedAt','stopHeartbeat','_putRowAsync','_handleInProcess','removeSync','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','_buildProcessingFacet','525708JeWVWM','heartbeatMs','ms\x20busy=','fn-runner','processor:resumed','waiting','send','_removeRowAsync','index:drop','_rootDb','_cmd','trim','_lockDb','engines','_children','sandbox','_inflight','_outstanding','exports','ORPHAN\x20(env-closed\x20write)','registerFts','_done','reportThreadStats','setOwnMeta','_migrateVocab','bus:type_drop','processingSig','path','envsOpen','isDead','events','_onItem','heapUsed','_startHeartbeat','detachConsole','\x20oldestPendingMs=','prependListener','_buildChildRow','dropFts','label','__vocab/version','_released','_nestedTotal','license:invalid','exit','_ownMeta','index:registered','_acquiredAt','system:stopped','listNodes','once','getProcess','_writer','write','getChanges','ephemeral','ttlMs','memoryUsage','size','field:resolver_registered','error:\x20','node','emit','cpuWindowMs','processor:paused','slice','dropType','count','some','message','processors','perf_hooks','withPoolHold','okdb-lock:\x20env\x20closed','_held','mean','okdb-writer:\x20env\x20closing\x20—\x20retry',')\x20exited\x20','_onProcEvent','\x20sync','threads','repeat','_highWater','processor:progress','_seen','getRange','children','options','primary','item:update','ttl:expired','max','claims','_pendingLocal','deaths','isActive','enabled','isWorker','setSchema','INDEX_REGISTERED','cluster:','_selfKey','_startedAt','building','disconnect','bumpCmd','_nodeDb','_quantum','dropSchema','getClock','setTtl','resetIndex','_buckets','removeNode','_systemEnv','_publishFailWarned','system:drain','_timer','standalone','_lastCpuPct','\x20writer{depth=','entry','index:progress','killable','index:reset','_desired',');\x20','freeze','hasOwnProperty','startedAt','--inspect','ITEM_REMOVE','supervisorKey','note','schema:drop','SIGKILL','_onPending','registry\x20publish\x20failing:\x20','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','drain','confirm','add','level','log','_heldTotal','listenAddr','find','.log','2143169gkLOnY','_changefeed','transactionSync','CHANGEFEED_QUANTUM','default','registerType','_closed','process\x20','_draining','ms\x20max=','entries','\x0a\x20\x20\x20\x20\x20\x20','_hbTimer','off','view:progress','_cursors','_lockDbOf','noteListenAddr','unclaimed','host','_clusterOnMessage','stopping','fts:drop','_lastPublishAt','_isStale','_singletonLock','single','system:clock_change','running','state','toISOString','value','_nestedWarned','_drain','user','toFixed','_rawDb','nodeKey','_admissionStarted','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','reduce','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','_windowCbs','\x0a===\x20OKDB_DIAG\x20','randomUUID','3084888GdvEOo','_lastCpuUsage','stopped','online','flushLmdb','kind','_nodeDead','string','liveThreadStats','ensureType','env:opened','holder','_lock','processor:error','_kind','_buildOwnRow','test','creating','next','http-server','length','raw-put','maxExtra','shift','setDesired','_instanceId','SYSTEM_PROC','onWindow','bus:proc','ms\x20p99=','cursorKey','_threadStats','_wantDbOf','error','unhandledRejection','decommission','singletonClaims','_markSeen','_listenAddr','_role','rss','firstTs','\x20ipc\x20error:\x20','stack','consecutiveFailures','ms\x20on\x20env=','_desiredOverlay','none','workers','\x20forked\x20','_started','process','childTransaction','delete','http','commitsPerSec','catch','participate','paused','bus:env_release','system:bus_state_change','\x20\x20(no\x20env\x20draining)','putSync','embedded','now','started','migrations','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','object','~lock','heldBy','clusterStatusView','processor:ready','workersConfigured','version','heapTotal','respawnTimer','./okdb','dead','set','kill','ready','fromEntries','_adminRelay','sort','ITEM_CREATE','_drainOne','updatedAt','_nodeDbFor','stop','_onPoke','decommissioned','race','abs','system:poke','min','_ensureDesired','remove','_holderDead','status','_dedupeMax','_onTick','_statusEnv','_committed','uncaughtException','ESRCH','appendFileSync','data','removeSupervisedChild','MAX_POOL_HOLDS','pid','sync','join','execArgv','REMOVE','resetting','1862454kXvedg','commitP99Ms','role','get','map','enable','_heartbeatInFlight','updateSupervisedChildStats','VIEW_PROGRESS','_scheduleFlush','261895SVnmTq','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','_assertUsable','\x20===','_sampleOwnStats','feed:','processorId','node:events','dumpedAt','ref:violation_resolved','clear','parkedNow','[okdb-cluster]\x20','okdb','startsWith',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','deregisterSelf','expiresAt','[okdb-cluster]\x20worker\x20pid=','_collectWriterFacet','_dedupeKey','startHeartbeat','_handlePoke','claimGated','recordWrite','registerIndex','_isReader','ENV_CLOSING_RETRY','_putRowSync','hostname','cpuPct','\x20\x20env=','\x20@\x20','env:removed','system','register','__esModule','_supervisorKey','cluster','info','seq','null','cpus','item:pending','then','reset','_lastCpuWindowMs','_envs','put','_maybePublish','load','fts:reset','ttl:clear','floor','ms\x20env=','runtimeProcessesView','ms\x20(attempt\x20','__okdbCluster','\x20\x20#','pushEphemeral','5JJJTCm','round','stats','_bpWaiters','name','schema:set','number','type:registered','release','_collectSingletonClaims','decommissioning','_caps','afterWrite','ppid','values','\x20HTTP\x20server(s)\x20on\x20port\x20','\x20│\x20','open','\x20(durable\x20desired-state)','_groupByProcess','push','_coordinator','_report','meta','\x20times\x20in\x20',',\x20signal=','connected','fast','slot','_handlePending','_bpParkedTotal','~processes','namespace','acquiredAt','cpuUsage','ingest','clearThreadStats','quantum','--eval','putNode','processingStatusView','_pending','_flushTimer','includes','\x20in\x20','_versionSkewWarned','split','closing','resolve','percentile','processing','node:perf_hooks','function',':want','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','mode','_onStop','_enableChangelog','_flushDebounce','item:create','depth','node/','_singletonLocks'];_0x2b1c=function(){return _0x3886ba;};return _0x2b1c();}function getDefaultExportFromCjs(_0x74629d){const _0x30cfe9=_0x1383d2;return _0x74629d&&_0x74629d[_0x30cfe9(0x85)]&&Object['prototype'][_0x30cfe9(0x1ee)][_0x30cfe9(0x15c)](_0x74629d,_0x30cfe9(0x206))?_0x74629d[_0x30cfe9(0x206)]:_0x74629d;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5d88c7=_0x1383d2;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2d7f3e={'PUT':_0x5d88c7(0x91),'REMOVE':_0x5d88c7(0x290),'INDEX_DROP':_0x5d88c7(0x105),'INDEX_REGISTER':_0x5d88c7(0x2c6),'INDEX_RESET':_0x5d88c7(0x1dd),'TYPE_REGISTER':_0x5d88c7(0x207),'TYPE_DROP':_0x5d88c7(0x1b0),'FTS_REGISTER':_0x5d88c7(0x182),'FTS_DROP':_0x5d88c7(0x194),'FTS_RESET':'resetFts','SCHEMA_SET':_0x5d88c7(0x1d0),'SCHEMA_DROP':_0x5d88c7(0x1da),'TTL_SET':_0x5d88c7(0x1dc),'TTL_CLEAR':'clearTtl'},_0x347b32={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x5d88c7(0x1a9),'SYSTEM_STOPPED':_0x5d88c7(0x19e),'SYSTEM_CLOCK_CHANGE':_0x5d88c7(0x21d),'SYSTEM_POKE':_0x5d88c7(0x28d),'SYSTEM_DRAIN':_0x5d88c7(0x1e2),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x5d88c7(0x26b),'ITEM_CREATE':_0x5d88c7(0xd8),'ITEM_UPDATE':_0x5d88c7(0x1c7),'ITEM_REMOVE':'item:remove','ITEM_PENDING':_0x5d88c7(0x8c),'INDEX_RESET':_0x5d88c7(0x1ea),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x5d88c7(0x1e8),'VIEW_PROGRESS':_0x5d88c7(0x210),'INDEX_DROP':_0x5d88c7(0x176),'INDEX_REGISTERED':_0x5d88c7(0x19c),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x5d88c7(0x218),'FTS_RESET':_0x5d88c7(0x94),'SCHEMA_SET':_0x5d88c7(0xa2),'SCHEMA_DROP':_0x5d88c7(0x1f4),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x5d88c7(0x2b6),'SYNC_APPLY':'sync:apply','TXN_START':'txn:start','TXN_END':'txn:end','TXN_ROLLBACK':_0x5d88c7(0xee),'TYPE_REGISTERED':_0x5d88c7(0xa4),'TYPE_DROP':_0x5d88c7(0x127),'ENV_OPENED':_0x5d88c7(0x239),'ENV_REMOVED':_0x5d88c7(0x82),'SYSTEM_ENV_RELEASE':_0x5d88c7(0x160),'TTL_EXPIRED':_0x5d88c7(0x1c8),'TTL_SET':_0x5d88c7(0x10d),'TTL_CLEAR':_0x5d88c7(0x95),'LICENSE_INVALID':_0x5d88c7(0x199),'LICENSE_ADDED':_0x5d88c7(0x155),'LICENSE_ACTIVATED':_0x5d88c7(0x10e),'LICENSE_REMOVED':'license:removed'},_0x56a2d1={'CREATING':_0x5d88c7(0x240),'RESETTING':_0x5d88c7(0x2a2),'READY':_0x5d88c7(0x280),'DROPPING':_0x5d88c7(0x154),'WAITING':_0x5d88c7(0x173),'ERROR':_0x5d88c7(0x250)},_0x49596c={'CREATED':'created','STARTING':_0x5d88c7(0x12c),'STARTED':_0x5d88c7(0x270),'STOPPING':_0x5d88c7(0x217),'STOPPED':'stopped'},_0x4b2fad={'CREATING':_0x5d88c7(0x240),'READY':'ready','HALTED':_0x5d88c7(0xf5),'STOPPED':_0x5d88c7(0x231),'RESETTING':_0x5d88c7(0x2a2)},_0x4c6601=Object[_0x5d88c7(0x1ed)]({'POKE':'bus:poke','DRAIN':'bus:drain','TYPE_DROP':_0x5d88c7(0x187),'PROC':_0x5d88c7(0x24b),'ENV_RELEASE':_0x5d88c7(0x26a)});return okdbEnums={'BUS_EVENTS':_0x4c6601,'CHANGE_ACTIONS':_0x2d7f3e,'EVENTS':_0x347b32,'INDEX_STATE':_0x56a2d1,'OKDB_STATE':_0x49596c,'VIEW_STATE':_0x4b2fad},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x4f3b4a=_0x1383d2;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x2a1a5e,performance:_0x308b75}=require$$0,_0x1fe9fa=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x4f3b4a(0x10a),_0x5d2b2c=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2e4b6f=process.env.OKDB_LOOP_LAG_ALL==='1',_0x465edc=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x4a99b0{constructor(){const _0x13a8cf=_0x4f3b4a;this[_0x13a8cf(0x1ce)]=_0x1fe9fa,this[_0x13a8cf(0x1de)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x13a8cf(0x261)]=![],this[_0x13a8cf(0x143)]=(_0x1c7d7b,_0x2b8928)=>process[_0x13a8cf(0x144)][_0x13a8cf(0x1a3)](_0x1c7d7b+(_0x2b8928?'\x20'+JSON[_0x13a8cf(0x13c)](_0x2b8928):'')+'\x0a');}[_0x4f3b4a(0x26f)](){const _0x55a994=_0x4f3b4a;return _0x308b75[_0x55a994(0x26f)]();}['setLogger'](_0x1eae66){const _0x5064b4=_0x4f3b4a;if(typeof _0x1eae66==='function')this[_0x5064b4(0x143)]=_0x1eae66;}['note'](_0x4e9183,_0x38aa14,_0x331b1d){const _0x3b30bb=_0x4f3b4a;if(!this[_0x3b30bb(0x1ce)])return;let _0x1e8e71=this['_buckets'][_0x3b30bb(0x2a6)](_0x4e9183);!_0x1e8e71&&(_0x1e8e71={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x3b30bb(0x27e)](_0x4e9183,_0x1e8e71)),_0x1e8e71['ms']+=_0x38aa14,_0x1e8e71[_0x3b30bb(0x1b1)]+=0x1,_0x38aa14>_0x1e8e71[_0x3b30bb(0x124)]&&(_0x1e8e71[_0x3b30bb(0x124)]=_0x38aa14,_0x1e8e71['maxExtra']=_0x331b1d||'');}[_0x4f3b4a(0xdf)](_0x536abe){const _0x39b458=_0x4f3b4a;if(!this['enabled']||this[_0x39b458(0x261)])return;this[_0x39b458(0x261)]=!![];if(_0x536abe)this['_log']=_0x536abe;this['_h']=_0x2a1a5e({'resolution':0xa}),this['_h'][_0x39b458(0x2a8)](),this[_0x39b458(0x1e3)]=setInterval(()=>this[_0x39b458(0xb3)](),_0x5d2b2c);if(this[_0x39b458(0x1e3)]['unref'])this[_0x39b458(0x1e3)][_0x39b458(0x12e)]();}[_0x4f3b4a(0x24a)](_0x5ce18a){const _0xb86f69=_0x4f3b4a;if(!this['_windowCbs'])this[_0xb86f69(0x22c)]=new Set();this[_0xb86f69(0x22c)][_0xb86f69(0x1fb)](_0x5ce18a);if(!this[_0xb86f69(0x261)])this[_0xb86f69(0x15a)]();}['offWindow'](_0x5340ca){const _0x3099c7=_0x4f3b4a;this['_windowCbs']?.[_0x3099c7(0x264)](_0x5340ca);}[_0x4f3b4a(0x15a)](){const _0xf4cabe=_0x4f3b4a;if(this[_0xf4cabe(0x228)])return;this[_0xf4cabe(0x228)]=!![];!this['_h']&&(this['_h']=_0x2a1a5e({'resolution':0xa}),this['_h'][_0xf4cabe(0x2a8)]());const _0x1b468b=_0x5d2b2c;this[_0xf4cabe(0xf4)]=setInterval(()=>{const _0x2761f2=_0xf4cabe,_0x477886=this['_h'];if(!_0x477886)return;const _0x4bfa40=_0x477886[_0x2761f2(0xce)](0x63)/0xf4240,_0x5d2970=_0x477886[_0x2761f2(0x1c9)]/0xf4240,_0x48f5c4=_0x477886[_0x2761f2(0x1b9)]/0xf4240;_0x477886[_0x2761f2(0x8e)]();if(this[_0x2761f2(0x22c)])for(const _0x5872a2 of this['_windowCbs']){try{_0x5872a2({'p99Ms':_0x4bfa40,'maxMs':_0x5d2970,'meanMs':_0x48f5c4,'reportMs':_0x1b468b});}catch{}}},_0x1b468b);if(this[_0xf4cabe(0xf4)][_0xf4cabe(0x12e)])this['_admissionTimer'][_0xf4cabe(0x12e)]();}[_0x4f3b4a(0xb3)](){const _0x33f508=_0x4f3b4a,_0xd7706e=this['_h'],_0x80922=_0xd7706e['max']/0xf4240,_0x2d7fbc=_0xd7706e[_0x33f508(0xce)](0x63)/0xf4240,_0x3fb118=_0xd7706e[_0x33f508(0x1b9)]/0xf4240;_0xd7706e[_0x33f508(0x8e)]();const _0x5e3ac0=[...this[_0x33f508(0x1de)][_0x33f508(0x20c)]()][_0x33f508(0x2a7)](([_0x46108f,_0x19d38a])=>({'label':_0x46108f,..._0x19d38a}))[_0x33f508(0x283)]((_0x31d0fe,_0x44fc28)=>_0x44fc28['ms']-_0x31d0fe['ms'])[_0x33f508(0x1af)](0x0,0x8);this[_0x33f508(0x1de)][_0x33f508(0x2b7)]();const _0x38cad4=_0x5e3ac0[_0x33f508(0x22a)]((_0x4f4e21,_0xc1c24e)=>_0x4f4e21+_0xc1c24e['ms'],0x0),_0x3ddbd1=_0x5e3ac0[_0x33f508(0x2a7)](_0x5ed4ef=>_0x5ed4ef[_0x33f508(0x195)]+'='+_0x5ed4ef['ms']['toFixed'](0x0)+'ms/'+_0x5ed4ef[_0x33f508(0x1b1)]+(_0x5ed4ef[_0x33f508(0x124)]>0x5?'(worst\x20'+_0x5ed4ef[_0x33f508(0x124)][_0x33f508(0x225)](0x0)+'ms'+(_0x5ed4ef[_0x33f508(0x245)]?'\x20'+_0x5ed4ef[_0x33f508(0x245)]:'')+')':''));(_0x2e4b6f||_0x80922>=_0x465edc)&&this[_0x33f508(0x143)]('loop-lag\x20'+_0x5d2b2c+_0x33f508(0x20b)+_0x80922['toFixed'](0x0)+_0x33f508(0x24c)+_0x2d7fbc[_0x33f508(0x225)](0x0)+'ms\x20mean='+_0x3fb118['toFixed'](0x0)+_0x33f508(0x170)+_0x38cad4[_0x33f508(0x225)](0x0)+'ms'+(_0x3ddbd1[_0x33f508(0x243)]?_0x33f508(0xad)+_0x3ddbd1['join']('\x20\x20'):''),{'feature':_0x33f508(0xdc)});if(this[_0x33f508(0x22c)])for(const _0x168a43 of this[_0x33f508(0x22c)]){try{_0x168a43({'p99Ms':_0x2d7fbc,'maxMs':_0x80922,'meanMs':_0x3fb118,'reportMs':_0x5d2b2c});}catch{}}}[_0x4f3b4a(0x288)](){const _0x23b1af=_0x4f3b4a;if(this['_timer'])clearInterval(this[_0x23b1af(0x1e3)]);if(this['_h'])this['_h'][_0x23b1af(0xea)]();this[_0x23b1af(0x1e3)]=null,this['_h']=null,this['_started']=![];}}const _0x29cf64=new _0x4a99b0();if(_0x29cf64[_0x4f3b4a(0x1ce)])_0x29cf64[_0x4f3b4a(0xdf)]();return okdbLoopMonitor={'LOOP':_0x29cf64},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x5ac596=require$$0$1,_0x3f7c27=require$$1;let _0x423ae4,_0x3192a2,_0x12e525,_0x28d84c,_0x21637f,_0x122150,_0x58cab3,_0x2d7bdb=![];const _0x1bcbb3=new Set();let _0x3fd984=null;const _0x129f96=new Map();function _0xf2004b(){const _0x1f642f=_0x2fe0;if(_0x423ae4!==undefined)return _0x423ae4;_0x423ae4=process.env.OKDB_DIAG==='1';if(!_0x423ae4)return![];_0x3192a2=process.env.OKDB_DIAG_STACK==='1',_0x28d84c=Math[_0x1f642f(0x1c9)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x12e525=new Array(_0x28d84c),_0x21637f=0x0,_0x122150=0x0,_0x58cab3=process.env.OKDB_DIAG_DIR||null;if(_0x58cab3)try{_0x5ac596[_0x1f642f(0xfd)](_0x58cab3,{'recursive':!![]});}catch{}return!![];}function _0x146b36(){return _0x423ae4===undefined?_0xf2004b():_0x423ae4;}function _0x201422(_0xb08516,_0x132eb8){const _0x4f079d=_0x2fe0;if(_0x423ae4===undefined?!_0xf2004b():!_0x423ae4)return;let _0x3b4a83;if(_0x3192a2){const _0xc75c3f=new Error()['stack']||'';_0x3b4a83=_0xc75c3f[_0x4f079d(0xcb)]('\x0a')[_0x4f079d(0x1af)](0x3)['map'](_0x382fa4=>_0x382fa4[_0x4f079d(0x179)]())['filter'](Boolean)[_0x4f079d(0x1af)](0x0,0x8);}_0x12e525[_0x21637f]={'seq':_0x122150++,'t':Date['now'](),'env':_0xb08516,'kind':_0x132eb8||_0x4f079d(0x102),'stack':_0x3b4a83},_0x21637f=(_0x21637f+0x1)%_0x28d84c;}function _0x449182(_0x2ecd98){const _0x4828a4=[];for(let _0x56fc2b=0x0;_0x56fc2b<_0x28d84c;_0x56fc2b++){const _0x33a7c8=_0x12e525[(_0x21637f-0x1-_0x56fc2b+_0x28d84c*0x2)%_0x28d84c];if(!_0x33a7c8)continue;_0x4828a4['push'](_0x33a7c8);if(_0x4828a4['length']>=_0x2ecd98)break;}return _0x4828a4;}function _0x5b9e39(_0x2d153f){const _0x58a04b=_0x2fe0;try{process[_0x58a04b(0x144)]['write'](_0x2d153f+'\x0a');}catch{}if(_0x58cab3)try{_0x5ac596[_0x58a04b(0x299)](_0x3f7c27[_0x58a04b(0x29f)](_0x58cab3,_0x58a04b(0xfa)+process[_0x58a04b(0x29d)]+_0x58a04b(0x201)),_0x2d153f+'\x0a');}catch{}}function _0x13aad0(_0x669a6d){const _0x34b18d=_0x2fe0,_0x27b1b4=_0x449182(_0x669a6d);if(!_0x27b1b4[_0x34b18d(0x243)])return _0x34b18d(0x16c);const _0x674cf0=Date[_0x34b18d(0x26f)]();return _0x27b1b4['map'](_0x119efa=>{const _0x526c1d=_0x34b18d,_0x2ed6eb=_0x526c1d(0x9b)+_0x119efa[_0x526c1d(0x89)]+'\x20-'+(_0x674cf0-_0x119efa['t'])+_0x526c1d(0x97)+_0x119efa[_0x526c1d(0xed)]+'\x20'+_0x119efa[_0x526c1d(0x234)];return _0x119efa[_0x526c1d(0x25a)]&&_0x119efa['stack'][_0x526c1d(0x243)]?_0x2ed6eb+'\x0a\x20\x20\x20\x20\x20\x20'+_0x119efa[_0x526c1d(0x25a)][_0x526c1d(0x29f)](_0x526c1d(0x20d)):_0x2ed6eb;})[_0x34b18d(0x29f)]('\x0a');}function _0x29f1d4(_0x370f55,_0x5b4890){const _0x55b60c=_0x2fe0,_0x2555cb=_0x55b60c(0x22d)+_0x370f55+'\x20@\x20'+new Date()[_0x55b60c(0x220)]()+_0x55b60c(0x13e)+process[_0x55b60c(0x29d)]+_0x55b60c(0x2b0),_0x30df5e=[_0x2555cb,_0x55b60c(0x1aa)+(_0x5b4890&&_0x5b4890[_0x55b60c(0x25a)]?_0x5b4890[_0x55b60c(0x25a)][_0x55b60c(0xcb)]('\x0a')[0x0]:_0x5b4890),'recent\x20writes\x20(newest\x20first)'+(_0x3192a2?'':_0x55b60c(0x12b))+':',_0x13aad0(0x18),_0x3ea26b(),'='[_0x55b60c(0x1bf)](_0x2555cb['length']-0x1)];_0x5b9e39(_0x30df5e[_0x55b60c(0x29f)]('\x0a'));}function _0x2e7a6f(_0x3aa846){const _0x186c72=_0x2fe0;if(!_0x146b36())return;const _0x10a0f4=String(_0x3aa846&&_0x3aa846[_0x186c72(0x1b3)]||_0x3aa846||''),_0x151668=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x186c72(0x23f)](_0x10a0f4);_0x29f1d4(_0x151668?_0x186c72(0x181):_0x186c72(0x297),_0x3aa846);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x151668)return;try{console[_0x186c72(0x250)](_0x3aa846&&_0x3aa846['stack']?_0x3aa846[_0x186c72(0x25a)]:_0x3aa846);}catch{}process[_0x186c72(0x19a)](0x1);}function _0x5ea280(_0x2a01e1){const _0x724238=_0x2fe0;if(!_0x146b36())return;const _0x46384a=String(_0x2a01e1&&_0x2a01e1['message']||_0x2a01e1||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x724238(0x23f)](_0x46384a)&&_0x29f1d4(_0x724238(0xf7),_0x2a01e1);}function _0x3ea26b(){const _0x1492d6=_0x2fe0,_0x219486=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x5960f4=![];for(const _0x3c9e11 of _0x1bcbb3){const _0x29ba69=_0x3c9e11&&_0x3c9e11['_envs'];if(!_0x29ba69)continue;for(const [_0x313402,_0x15bdb7]of _0x29ba69){const _0x2a1829=_0x15bdb7&&_0x15bdb7[_0x1492d6(0xb2)]&&_0x15bdb7[_0x1492d6(0xb2)][_0x1492d6(0x159)];if(!_0x2a1829)continue;let _0x461cc2,_0x1fda55;try{_0x461cc2=Atomics[_0x1492d6(0x93)](_0x2a1829,0x0),_0x1fda55=Atomics[_0x1492d6(0x93)](_0x2a1829,0x1);}catch{continue;}if(_0x461cc2===0x0)continue;_0x5960f4=!![];const _0x5b6f83=_0x461cc2>0x0?_0x1492d6(0x163):'copy',_0x4ab0ce=Date[_0x1492d6(0x26f)]()-Math[_0x1492d6(0x28c)](_0x461cc2)*0x3e8,_0x11751b=((()=>{const _0x320057=_0x1492d6;try{return _0x15bdb7['_writer']&&_0x15bdb7['_writer'][_0x320057(0x292)]?_0x15bdb7[_0x320057(0x1a2)]['status']():null;}catch{return null;}})());_0x219486['push'](_0x1492d6(0x80)+_0x313402+'\x20phase='+_0x5b6f83+_0x1492d6(0x111)+_0x4ab0ce+'ms\x20activeWriters='+_0x1fda55+(_0x11751b?_0x1492d6(0x1e6)+_0x11751b[_0x1492d6(0xd9)]+_0x1492d6(0x191)+_0x11751b['oldestPendingMs']+'\x20parkedNow='+_0x11751b[_0x1492d6(0x2b8)]+'}':''));}}if(!_0x5960f4)_0x219486[_0x1492d6(0xb1)](_0x1492d6(0x26c));return _0x219486[_0x1492d6(0x29f)]('\x0a');}function _0x449e5c(){const _0x5d724f=_0x2fe0;if(!_0x146b36())return;const _0x2957bb=Math[_0x5d724f(0x1c9)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x57c5fd=Date[_0x5d724f(0x26f)]();for(const _0x3550cd of _0x1bcbb3){const _0x23ce32=_0x3550cd&&_0x3550cd['_envs'];if(!_0x23ce32)continue;for(const [_0x2485c2,_0x1688c7]of _0x23ce32){const _0x214ac7=_0x1688c7&&_0x1688c7[_0x5d724f(0xb2)]&&_0x1688c7['_coordinator'][_0x5d724f(0x159)];if(!_0x214ac7)continue;let _0x3c9903;try{_0x3c9903=Atomics[_0x5d724f(0x93)](_0x214ac7,0x0);}catch{continue;}const _0x37d6e7=_0x3550cd[_0x5d724f(0x189)]+'|'+_0x2485c2;if(_0x3c9903<=0x0){_0x129f96[_0x5d724f(0x264)](_0x37d6e7);continue;}const _0x4538be=_0x57c5fd-_0x3c9903*0x3e8,_0x526716=_0x129f96[_0x5d724f(0x2a6)](_0x37d6e7);if(_0x4538be<_0x2957bb)continue;if(_0x526716&&_0x57c5fd-_0x526716[_0x5d724f(0x2b5)]<_0x2957bb)continue;_0x129f96[_0x5d724f(0x27e)](_0x37d6e7,{'firstTs':_0x526716?_0x526716[_0x5d724f(0x258)]:_0x3c9903,'dumpedAt':_0x57c5fd});const _0x3ca92d=_0x5d724f(0x1f8)+_0x4538be+_0x5d724f(0x25c)+_0x2485c2+_0x5d724f(0x81)+new Date()[_0x5d724f(0x220)]()+_0x5d724f(0x13e)+process['pid']+_0x5d724f(0x2b0);_0x5b9e39([_0x3ca92d,_0x3ea26b(),'='[_0x5d724f(0x1bf)](_0x3ca92d['length']-0x1)]['join']('\x0a'));}}}function _0x14b00f(){const _0x47abd7=_0x2fe0;if(!_0x146b36()||_0x2d7bdb)return;_0x2d7bdb=!![],process[_0x47abd7(0x192)](_0x47abd7(0x297),_0x2e7a6f),process[_0x47abd7(0x192)](_0x47abd7(0x251),_0x5ea280);const _0x189803=Math[_0x47abd7(0x1c9)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x3fd984=setInterval(_0x449e5c,_0x189803);if(_0x3fd984[_0x47abd7(0x12e)])_0x3fd984[_0x47abd7(0x12e)]();}function _0x498b39(_0x242fa7){const _0x4a2093=_0x2fe0;if(!_0x146b36()||!_0x242fa7)return;_0x1bcbb3[_0x4a2093(0x1fb)](_0x242fa7),_0x14b00f();}function _0x19d505(_0x2c2b68){_0x1bcbb3['delete'](_0x2c2b68);}function _0x21e1b9(){if(!_0x146b36())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x3192a2,'recentWrites':_0x449182(0x10),'drain':_0x3ea26b()};}return okdbDiag={'isEnabled':_0x146b36,'recordWrite':_0x201422,'installDiag':_0x14b00f,'registerOkdb':_0x498b39,'unregisterOkdb':_0x19d505,'snapshot':_0x21e1b9},okdbDiag;}function _0x2fe0(_0xc0320e,_0x2fce2b){_0xc0320e=_0xc0320e-0x7c;const _0x2b1c79=_0x2b1c();let _0x2fe061=_0x2b1c79[_0xc0320e];return _0x2fe061;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x1cad83=_0x1383d2;if(hasRequiredOkdbWriter)return okdbWriter[_0x1cad83(0x180)];hasRequiredOkdbWriter=0x1;const {performance:_0xd2cf61}=require$$0$2,_0x23f70a=requireOkdbDiag(),_0x1b7eb3=process.env.OKDB_COMMIT_MODE===_0x1cad83(0x29e);class _0x587c12{constructor(_0x479ac1){const _0x21ea1c=_0x1cad83;this['env']=_0x479ac1,this[_0x21ea1c(0x17e)]=new Set(),this[_0x21ea1c(0x11b)]=new Map(),this[_0x21ea1c(0x296)]=0x0,this[_0x21ea1c(0x164)]=[],this['_done']=[],this[_0x21ea1c(0x1c0)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x21ea1c(0x17f)]=0x0,this[_0x21ea1c(0xa0)]=[],this['_bpParkedTotal']=0x0,this['_held']=null,this[_0x21ea1c(0x1fe)]=0x0,this[_0x21ea1c(0x198)]=0x0,this[_0x21ea1c(0x222)]=![];}async[_0x1cad83(0x101)](_0x3477da,_0x1f31e8,{admitted:admitted=![]}={}){const _0x4bbac6=_0x1cad83;if(_0x23f70a[_0x4bbac6(0x107)]())_0x23f70a[_0x4bbac6(0x2c5)](this['env']?.['name'],_0x1f31e8);if(this[_0x4bbac6(0x208)]){const _0x322321=new Error(_0x4bbac6(0x1ba));_0x322321[_0x4bbac6(0x138)]=_0x4bbac6(0x7c);throw _0x322321;}if(this['_highWater']>0x0){let _0x40f3f6=![];while(this[_0x4bbac6(0x17f)]>=this[_0x4bbac6(0x1c0)]&&!this[_0x4bbac6(0x208)]){!_0x40f3f6&&(_0x40f3f6=!![],this['_bpParkedTotal']++),await new Promise(_0x28296c=>this[_0x4bbac6(0xa0)]['push'](_0x28296c));}if(this[_0x4bbac6(0x208)]){const _0x36816e=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x36816e[_0x4bbac6(0x138)]=_0x4bbac6(0x7c);throw _0x36816e;}}this[_0x4bbac6(0x17f)]++;const _0x410451=admitted?null:this['env'][_0x4bbac6(0xb2)];for(;;){while(this[_0x4bbac6(0x1b8)])await this[_0x4bbac6(0x1b8)];if(_0x410451)try{await _0x410451[_0x4bbac6(0x139)]();}catch(_0x4d9346){this[_0x4bbac6(0x17f)]--;if(this[_0x4bbac6(0xa0)][_0x4bbac6(0x243)]&&this[_0x4bbac6(0x17f)]<this[_0x4bbac6(0x1c0)])this['_bpWaiters'][_0x4bbac6(0x246)]()();throw _0x4d9346;}if(!this[_0x4bbac6(0x1b8)])break;if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();}if(this['_closed']){if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();this['_outstanding']--;if(this[_0x4bbac6(0xa0)][_0x4bbac6(0x243)]&&this[_0x4bbac6(0x17f)]<this[_0x4bbac6(0x1c0)])this[_0x4bbac6(0xa0)][_0x4bbac6(0x246)]()();const _0x19a865=new Error(_0x4bbac6(0x1ba));_0x19a865[_0x4bbac6(0x138)]='ENV_CLOSING_RETRY';throw _0x19a865;}const _0x4597fe=_0xd2cf61[_0x4bbac6(0x26f)]();if(_0x1b7eb3)try{const _0x4171e4=this[_0x4bbac6(0xed)]['db'][_0x4bbac6(0x204)](_0x3477da);this[_0x4bbac6(0x296)]++;if(this[_0x4bbac6(0x164)][_0x4bbac6(0xb1)](_0xd2cf61[_0x4bbac6(0x26f)]()-_0x4597fe)>0x100)this[_0x4bbac6(0x164)]['shift']();if(this[_0x4bbac6(0x183)][_0x4bbac6(0xb1)](_0xd2cf61[_0x4bbac6(0x26f)]())>0x800)this[_0x4bbac6(0x183)][_0x4bbac6(0x246)]();return _0x4171e4;}finally{this[_0x4bbac6(0x17f)]--;if(this['_bpWaiters'][_0x4bbac6(0x243)]&&this['_outstanding']<this[_0x4bbac6(0x1c0)])this[_0x4bbac6(0xa0)][_0x4bbac6(0x246)]()();if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();}let _0x3bb020=null;const _0x3b04e8=()=>{const _0x44f4fb=_0x4bbac6,_0x5bc8c7=_0x3477da();if(_0x5bc8c7&&typeof _0x5bc8c7[_0x44f4fb(0x8d)]==='function'&&!_0x3bb020){this['_heldTotal']++;let _0x165da5;const _0x580d36=new Promise(_0x272dde=>_0x165da5=_0x272dde);this['_held']=_0x580d36,_0x3bb020=()=>{if(this['_held']===_0x580d36)this['_held']=null;_0x165da5();};}return _0x5bc8c7;};let _0x12613e;try{_0x12613e=this[_0x4bbac6(0xed)]['db'][_0x4bbac6(0x263)](_0x3b04e8);}catch(_0x1cacde){_0x12613e=Promise['reject'](_0x1cacde);}(!_0x12613e||typeof _0x12613e['then']!=='function')&&(this['_nestedTotal']++,!this[_0x4bbac6(0x222)]&&(this[_0x4bbac6(0x222)]=!![],console[_0x4bbac6(0xdd)]('okdb-writer['+(this['env']?.[_0x4bbac6(0xa1)]??'?')+']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller')),_0x12613e=Promise[_0x4bbac6(0xcd)](_0x12613e));const _0x3f3d06=()=>{if(_0x3bb020)_0x3bb020();};_0x12613e[_0x4bbac6(0x8d)](_0x3f3d06,_0x3f3d06),this[_0x4bbac6(0x17e)][_0x4bbac6(0x1fb)](_0x12613e),this[_0x4bbac6(0x11b)][_0x4bbac6(0x27e)](_0x12613e,_0x4597fe);const _0x782c1d=()=>{const _0x515bcb=_0x4bbac6;this[_0x515bcb(0x17e)]['delete'](_0x12613e),this[_0x515bcb(0x11b)]['delete'](_0x12613e),this[_0x515bcb(0x296)]++,this[_0x515bcb(0x17f)]--;this['_bpWaiters'][_0x515bcb(0x243)]&&this[_0x515bcb(0x17f)]<this[_0x515bcb(0x1c0)]&&this['_bpWaiters'][_0x515bcb(0x246)]()();if(this[_0x515bcb(0x164)]['push'](_0xd2cf61[_0x515bcb(0x26f)]()-_0x4597fe)>0x100)this[_0x515bcb(0x164)][_0x515bcb(0x246)]();if(this['_done'][_0x515bcb(0xb1)](_0xd2cf61['now']())>0x800)this[_0x515bcb(0x183)]['shift']();};_0x12613e[_0x4bbac6(0x8d)](_0x782c1d,_0x782c1d);try{return await _0x12613e;}finally{if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();}}[_0x1cad83(0x292)](){const _0x3eebb2=_0x1cad83,_0x321f6a=_0xd2cf61[_0x3eebb2(0x26f)]();let _0x11d0bc=0x0;for(const _0x48b3a3 of this[_0x3eebb2(0x11b)][_0x3eebb2(0xab)]()){const _0x1db7f9=_0x321f6a-_0x48b3a3;if(_0x1db7f9>_0x11d0bc)_0x11d0bc=_0x1db7f9;}let _0x4dbe5d=0x0;for(let _0x5353a7=this[_0x3eebb2(0x183)]['length']-0x1;_0x5353a7>=0x0;_0x5353a7--){if(_0x321f6a-this[_0x3eebb2(0x183)][_0x5353a7]>0x3e8)break;_0x4dbe5d++;}let _0x3d68f3=0x0;if(this[_0x3eebb2(0x164)]['length']){const _0x440cfa=[...this[_0x3eebb2(0x164)]][_0x3eebb2(0x283)]((_0x3a1c79,_0x268c50)=>_0x3a1c79-_0x268c50);_0x3d68f3=_0x440cfa[Math[_0x3eebb2(0x28e)](_0x440cfa[_0x3eebb2(0x243)]-0x1,Math[_0x3eebb2(0x96)](_0x440cfa['length']*0.99))];}return{'depth':this[_0x3eebb2(0x17e)][_0x3eebb2(0x1a8)],'oldestPendingMs':Math[_0x3eebb2(0x9e)](_0x11d0bc),'committed':this[_0x3eebb2(0x296)],'commitsPerSec':_0x4dbe5d,'commitP99Ms':Math[_0x3eebb2(0x9e)](_0x3d68f3),'parkedNow':this[_0x3eebb2(0xa0)]['length'],'parkedTotal':this[_0x3eebb2(0xbb)],'highWater':this['_highWater']};}[_0x1cad83(0xe0)](){const _0x340bbc=_0x1cad83,_0x443186=_0xd2cf61[_0x340bbc(0x26f)]();return[...this['_enqueuedAt'][_0x340bbc(0xab)]()][_0x340bbc(0x2a7)](_0x3d31c6=>Math[_0x340bbc(0x9e)](_0x443186-_0x3d31c6))[_0x340bbc(0x283)]((_0x3d3dca,_0x1c87ad)=>_0x1c87ad-_0x3d3dca);}['markClosed'](){const _0x56fea1=_0x1cad83;this['_closed']=!![];for(const _0xc5a57b of this[_0x56fea1(0xa0)]['splice'](0x0))_0xc5a57b();}async[_0x1cad83(0x1f9)](){const _0x44a7ad=_0x1cad83;let _0x505298=0x0;while(this['_inflight'][_0x44a7ad(0x1a8)]&&_0x505298++<0x3e8){await Promise[_0x44a7ad(0x15d)]([...this['_inflight']]);}}async['put'](_0x58b2a1,_0x2db002,_0x526f8f,_0x489d45){const _0x28bf2f=_0x1cad83;return this[_0x28bf2f(0x101)](()=>{const _0x38b308=_0x28bf2f;if(_0x489d45===undefined)_0x58b2a1[_0x38b308(0x26d)](_0x2db002,_0x526f8f);else _0x58b2a1[_0x38b308(0x26d)](_0x2db002,_0x526f8f,_0x489d45);},_0x28bf2f(0x244));}async[_0x1cad83(0x290)](_0x264d57,_0x5795ba){const _0x35e248=_0x1cad83;return this[_0x35e248(0x101)](()=>_0x264d57[_0x35e248(0x16b)](_0x5795ba),_0x35e248(0x13f));}}async function _0x2b4714(_0x4d40fa,_0x59a054){const _0x3f4810=_0x1cad83;if(_0x59a054==null)_0x59a054=Math[_0x3f4810(0x1c9)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x20200c=_0x4d40fa?.['flushed'];if(!_0x20200c||typeof _0x20200c[_0x3f4810(0x8d)]!==_0x3f4810(0xd1))return;await Promise[_0x3f4810(0x28b)]([Promise['resolve'](_0x20200c)[_0x3f4810(0x267)](()=>{}),new Promise(_0x4db935=>{const _0x431a55=_0x3f4810,_0x4d8ec7=setTimeout(_0x4db935,_0x59a054);if(_0x4d8ec7['unref'])_0x4d8ec7[_0x431a55(0x12e)]();})]);}catch{}}function _0x5974cc(_0x1b0aca){const _0x4fd484=_0x1cad83;if(_0x1b7eb3)return Promise[_0x4fd484(0xcd)]();const _0x1144c5=_0x1b0aca?.[_0x4fd484(0xf9)];return _0x1144c5&&typeof _0x1144c5[_0x4fd484(0x8d)]==='function'?_0x1144c5:Promise[_0x4fd484(0xcd)]();}const _0x27462c=Math[_0x1cad83(0x1c9)](0x1,Math['floor'](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x187185=Math[_0x1cad83(0x1c9)](0x1,_0x27462c-0x2);let _0x21b5c3=0x0;const _0xdb11df=[];async function _0x3dd99f(_0x5705ff){const _0x54af2b=_0x1cad83;if(_0x21b5c3<_0x187185)_0x21b5c3++;else await new Promise(_0x3e4d4d=>_0xdb11df[_0x54af2b(0xb1)](_0x3e4d4d));try{return await _0x5705ff();}finally{const _0xe7ace9=_0xdb11df[_0x54af2b(0x246)]();if(_0xe7ace9)_0xe7ace9();else _0x21b5c3--;}}return okdbWriter[_0x1cad83(0x180)]=_0x587c12,okdbWriter['exports'][_0x1cad83(0x1b6)]=_0x3dd99f,okdbWriter[_0x1cad83(0x180)][_0x1cad83(0x29c)]=_0x187185,okdbWriter['exports'][_0x1cad83(0x233)]=_0x2b4714,okdbWriter[_0x1cad83(0x180)][_0x1cad83(0xf9)]=_0x5974cc,okdbWriter[_0x1cad83(0x180)]['SYNC_COMMITS']=_0x1b7eb3,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x3202ed=_0x1383d2;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4cbc8c=require$$0$3,{SYNC_COMMITS:_0x5687fd}=requireOkdbWriter(),_0x48ddc8=_0x3202ed(0x274);class _0x3431a6{constructor(_0x408933,_0x5a4957,_0x1f2515){const _0x53c249=_0x3202ed;this[_0x53c249(0x23b)]=_0x408933,this[_0x53c249(0x12a)]=_0x5a4957,this['_acquiredAt']=_0x1f2515,this[_0x53c249(0x197)]=![],this[_0x53c249(0x119)]=null,this['_heartbeatInFlight']=null;}[_0x3202ed(0xe8)](){const _0x37aa26=_0x3202ed;if(this[_0x37aa26(0x197)])return![];try{const _0x22cc76=this[_0x37aa26(0x23b)][_0x37aa26(0x14e)]()[_0x37aa26(0x2a6)](this['_key']);if(!_0x22cc76||_0x22cc76['acquiredAt']!==this[_0x37aa26(0x19d)])return![];const _0x4460c6=_0x22cc76['updatedAt']??_0x22cc76[_0x37aa26(0xbe)];if(_0x4460c6+_0x22cc76[_0x37aa26(0x1a6)]<Date[_0x37aa26(0x26f)]())return![];return!![];}catch{return!this[_0x37aa26(0x197)];}}[_0x3202ed(0x23a)](){const _0x79336f=_0x3202ed;if(this[_0x79336f(0x197)])return null;try{return this['_lock'][_0x79336f(0x14e)]()[_0x79336f(0x2a6)](this[_0x79336f(0x12a)])??null;}catch{return null;}}async[_0x3202ed(0x10f)](_0x4bd86f){const _0x1efb97=_0x3202ed;if(this['_released'])return;try{if(this[_0x1efb97(0x23b)][_0x1efb97(0x208)]())return;const _0x187afa=this['_lock']['_db']()[_0x1efb97(0x2a6)](this[_0x1efb97(0x12a)]);if(!_0x187afa||_0x187afa[_0x1efb97(0xbe)]!==this[_0x1efb97(0x19d)])return;if(_0x5687fd)this[_0x1efb97(0x23b)]['_db']()['putSync'](this[_0x1efb97(0x12a)],{..._0x187afa,'ttlMs':_0x187afa[_0x1efb97(0x1a6)]+_0x4bd86f});else await this[_0x1efb97(0x23b)][_0x1efb97(0x14e)]()[_0x1efb97(0x91)](this['_key'],{..._0x187afa,'ttlMs':_0x187afa[_0x1efb97(0x1a6)]+_0x4bd86f});}catch{}}async[_0x3202ed(0xa5)](){const _0x58df2e=_0x3202ed;if(this['_released'])return;if(this['_heartbeatInFlight'])try{await this[_0x58df2e(0x2a9)];}catch{}clearInterval(this[_0x58df2e(0x119)]),this[_0x58df2e(0x119)]=null,this[_0x58df2e(0x197)]=!![];try{if(this[_0x58df2e(0x23b)][_0x58df2e(0x208)]())return;const _0x534d52=this[_0x58df2e(0x23b)]['_db']()[_0x58df2e(0x2a6)](this['_key']);if(_0x534d52&&_0x534d52[_0x58df2e(0xbe)]===this[_0x58df2e(0x19d)]){if(_0x5687fd)this[_0x58df2e(0x23b)]['_db']()[_0x58df2e(0x16b)](this[_0x58df2e(0x12a)]);else await this[_0x58df2e(0x23b)][_0x58df2e(0x14e)]()[_0x58df2e(0x290)](this[_0x58df2e(0x12a)]);}}catch{}}[_0x3202ed(0x18f)](_0x22351e,_0x3a5623){const _0x563e8d=_0x3202ed,_0x3b2c8a=_0x3a5623??Math[_0x563e8d(0x96)](_0x22351e/0x3);this['_heartbeatTimer']=setInterval(()=>{const _0x51fdb8=_0x563e8d;if(this[_0x51fdb8(0x197)])return;this[_0x51fdb8(0x2a9)]=((async()=>{const _0x415243=_0x51fdb8;try{if(this['_lock'][_0x415243(0x208)]())return;const _0x34c80c=this[_0x415243(0x23b)]['_db']()['get'](this['_key']);if(!_0x34c80c||_0x34c80c[_0x415243(0xbe)]!==this[_0x415243(0x19d)]){this[_0x415243(0x197)]=!![],clearInterval(this[_0x415243(0x119)]),this['_heartbeatTimer']=null;return;}if(_0x5687fd)this['_lock']['_db']()[_0x415243(0x26d)](this[_0x415243(0x12a)],{..._0x34c80c,'updatedAt':Date[_0x415243(0x26f)]()});else await this[_0x415243(0x23b)][_0x415243(0x14e)]()[_0x415243(0x91)](this[_0x415243(0x12a)],{..._0x34c80c,'updatedAt':Date[_0x415243(0x26f)]()});}catch{}this[_0x415243(0x2a9)]=null;})());},_0x3b2c8a);if(this[_0x563e8d(0x119)]['unref'])this[_0x563e8d(0x119)][_0x563e8d(0x12e)]();}}class _0x312597{constructor(_0x4434d8,{namespace:_0x306af2,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x1e5b81=_0x3202ed;this['_rawDb']=_0x4434d8,this['namespace']=_0x306af2,this[_0x1e5b81(0x1a6)]=ttlMs,this[_0x1e5b81(0x16f)]=heartbeatMs,this[_0x1e5b81(0x17a)]=null;}[_0x3202ed(0x14e)](){const _0x3c0763=_0x3202ed;return this[_0x3c0763(0x2af)](),(!this[_0x3c0763(0x17a)]||this[_0x3c0763(0x212)]!==this['_rawDb'])&&(this['_lockDb']=this[_0x3c0763(0x226)]['openDB'](_0x48ddc8,{'dupSort':![]}),this[_0x3c0763(0x212)]=this[_0x3c0763(0x226)]),this[_0x3c0763(0x17a)];}[_0x3202ed(0xf2)](){const _0x19a85e=_0x3202ed;return this['_assertUsable'](),(!this['_wantDbHandle']||this['_wantDbOf']!==this[_0x19a85e(0x226)])&&(this[_0x19a85e(0x157)]=this[_0x19a85e(0x226)]['openDB'](_0x48ddc8+_0x19a85e(0xd2),{'dupSort':![]}),this[_0x19a85e(0x24f)]=this[_0x19a85e(0x226)]),this['_wantDbHandle'];}[_0x3202ed(0x208)](){const _0x59e983=_0x3202ed,_0x2b2c4d=this[_0x59e983(0x226)]?.[_0x59e983(0x292)];return _0x2b2c4d===_0x59e983(0xcc)||_0x2b2c4d===_0x59e983(0xe9);}[_0x3202ed(0x2af)](){const _0xd9709a=_0x3202ed;if(this[_0xd9709a(0x208)]())throw new Error(_0xd9709a(0x1b7));}[_0x3202ed(0x12a)](_0x10493d){const _0x27d9e6=_0x3202ed;return this[_0x27d9e6(0xbd)]+':'+_0x10493d;}['signalWant'](_0x47367d){const _0x1f9127=_0x3202ed;try{if(this[_0x1f9127(0x208)]())return;_0x5687fd?this[_0x1f9127(0xf2)]()[_0x1f9127(0x26d)](this[_0x1f9127(0x12a)](_0x47367d),Date[_0x1f9127(0x26f)]()):this['_wantDb']()[_0x1f9127(0x91)](this[_0x1f9127(0x12a)](_0x47367d),Date['now']())?.[_0x1f9127(0x267)]?.(()=>{});}catch{}}['isWanted'](_0x2ba853,_0x2dd0d2=0x3e8){const _0x5858e2=_0x3202ed;try{const _0x1ab23f=this['_wantDb']()['get'](this[_0x5858e2(0x12a)](_0x2ba853));return typeof _0x1ab23f===_0x5858e2(0xa3)&&Date[_0x5858e2(0x26f)]()-_0x1ab23f<_0x2dd0d2;}catch{return![];}}[_0x3202ed(0x21a)](_0x30ab70){const _0x47158f=_0x3202ed,_0x6f1c4=_0x30ab70['updatedAt']??_0x30ab70[_0x47158f(0xbe)];return _0x6f1c4+_0x30ab70[_0x47158f(0x1a6)]<Date[_0x47158f(0x26f)]();}static[_0x3202ed(0x291)](_0x374c6b){const _0x4e064f=_0x3202ed,_0x5510f3=_0x374c6b?.[_0x4e064f(0x23a)];if(!_0x5510f3||typeof _0x5510f3[_0x4e064f(0x29d)]!=='number')return![];if(_0x5510f3[_0x4e064f(0x7e)]!==_0x4cbc8c['hostname']())return![];if(_0x5510f3[_0x4e064f(0x29d)]===process['pid'])return![];try{return process[_0x4e064f(0x27f)](_0x5510f3[_0x4e064f(0x29d)],0x0),![];}catch(_0x4f5b8){return _0x4f5b8[_0x4e064f(0x138)]===_0x4e064f(0x298);}}async['tryAcquire'](_0x495ffc,_0x2b7d12={},_0x4a35d8={}){const _0x5f25d6=_0x3202ed,_0x33674c=this['_key'](_0x495ffc),_0x1a1914=_0x4a35d8[_0x5f25d6(0x1a6)]??this[_0x5f25d6(0x1a6)],_0x72d2e2=Date[_0x5f25d6(0x26f)](),_0x785956={'holder':{'pid':process[_0x5f25d6(0x29d)],'hostname':_0x4cbc8c[_0x5f25d6(0x7e)](),..._0x2b7d12},'acquiredAt':_0x72d2e2,'updatedAt':_0x72d2e2,'ttlMs':_0x1a1914};let _0x20eb90=![],_0x10ff53=null;if(this[_0x5f25d6(0x208)]())return{'acquired':![],'handle':null,'current':null};try{const _0x35cdcc=()=>{const _0x5a724b=_0x5f25d6,_0x352f3a=this[_0x5a724b(0x14e)]()[_0x5a724b(0x2a6)](_0x33674c);if(_0x352f3a&&!this['_isStale'](_0x352f3a)&&!_0x312597[_0x5a724b(0x291)](_0x352f3a)){const _0x1b396c=_0x2b7d12[_0x5a724b(0x2b3)]!=null&&_0x352f3a[_0x5a724b(0x23a)][_0x5a724b(0x29d)]===process[_0x5a724b(0x29d)]&&_0x352f3a['holder'][_0x5a724b(0x2b3)]===_0x2b7d12[_0x5a724b(0x2b3)];if(!_0x1b396c){_0x20eb90=![],_0x10ff53=_0x352f3a;return;}_0x785956['acquiredAt']<=_0x352f3a[_0x5a724b(0xbe)]&&(_0x785956['acquiredAt']=_0x352f3a[_0x5a724b(0xbe)]+0x1,_0x785956[_0x5a724b(0x286)]=_0x785956[_0x5a724b(0xbe)]);}this[_0x5a724b(0x14e)]()[_0x5a724b(0x91)](_0x33674c,_0x785956),_0x20eb90=!![],_0x10ff53=_0x785956;};if(_0x5687fd)this[_0x5f25d6(0x14e)]()[_0x5f25d6(0x204)](_0x35cdcc);else await this[_0x5f25d6(0x14e)]()[_0x5f25d6(0x263)](_0x35cdcc);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x20eb90)return{'acquired':![],'handle':null,'current':_0x10ff53};const _0x287960=new _0x3431a6(this,_0x33674c,_0x785956[_0x5f25d6(0xbe)]);return _0x287960[_0x5f25d6(0x18f)](_0x1a1914,this[_0x5f25d6(0x16f)]),{'acquired':!![],'handle':_0x287960,'current':_0x10ff53};}['inspect'](_0x12d61e){const _0x5be763=_0x3202ed;try{return this['_db']()['get'](this[_0x5be763(0x12a)](_0x12d61e))??null;}catch{return null;}}['list'](){const _0x452f21=_0x3202ed,_0x48e7ba=this[_0x452f21(0xbd)]+':',_0x14721c=[];try{for(const {key:_0xd2ea04,value:_0x32a989}of this[_0x452f21(0x14e)]()[_0x452f21(0x1c3)]({'start':_0x48e7ba,'end':_0x48e7ba+'\xff'})){typeof _0xd2ea04==='string'&&_0xd2ea04[_0x452f21(0x2bb)](_0x48e7ba)&&_0x14721c[_0x452f21(0xb1)]({'id':_0xd2ea04[_0x452f21(0x1af)](_0x48e7ba[_0x452f21(0x243)]),'entry':_0x32a989});}}catch{}return _0x14721c;}static[_0x3202ed(0x123)](_0x441f8f){const _0x301bf7=_0x3202ed,_0x1e075b=[];try{const _0x5692c9=_0x441f8f[_0x301bf7(0x149)](_0x48ddc8,{'dupSort':![]});for(const {key:_0x2b1af3,value:_0x6f5540}of _0x5692c9[_0x301bf7(0x1c3)]({})){if(typeof _0x2b1af3!==_0x301bf7(0x236))continue;const _0x2192c1=_0x2b1af3[_0x301bf7(0xff)](':');if(_0x2192c1<0x1)continue;_0x1e075b[_0x301bf7(0xb1)]({'namespace':_0x2b1af3[_0x301bf7(0x1af)](0x0,_0x2192c1),'id':_0x2b1af3[_0x301bf7(0x1af)](_0x2192c1+0x1),'entry':_0x6f5540});}}catch{}return _0x1e075b;}}return okdbLock={'OKDBLock':_0x312597},okdbLock;}var version=_0x1383d2(0x113),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x31854b=_0x1383d2;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x38474c=require$$0$3,_0x3c5db5=require$$1$1,_0x12e936=require$$2,{LOOP:_0x212f76}=requireOkdbLoopMonitor(),{OKDBLock:_0x5e0e06}=requireOkdbLock(),{SYNC_COMMITS:_0x4d57ac}=requireOkdbWriter(),_0x4181c5=_0x31854b(0xbc),_0x5f0107=_0x31854b(0x1ab),_0xd36915='~processes:desired',_0x404721='~processes:cmd',_0x5bb0f0=(_0x56bbd3,_0x2d9283)=>_0x56bbd3+':'+_0x2d9283,_0x53f064=(_0x325791,_0x231392)=>_0x325791+'::'+_0x231392,_0x10a4ca=(_0x45768f,_0xe3427e)=>_0x45768f+'/'+_0xe3427e,_0x155c92=(_0x3ec002,_0x38ce6b)=>_0x3ec002+'#'+_0x38ce6b,_0x113fc1=_0x292194=>{const _0x102bbe=_0x31854b;if(_0x292194?.[_0x102bbe(0x162)])return _0x292194[_0x102bbe(0x162)];const _0x142e49=_0x292194?.[_0x102bbe(0x227)];return typeof _0x142e49===_0x102bbe(0x236)&&_0x142e49[_0x102bbe(0xc8)]('#')?_0x142e49[_0x102bbe(0x1af)](0x0,_0x142e49[_0x102bbe(0xff)]('#')):_0x142e49;},_0x1cffbf=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1d6332=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5397d1=_0x1cffbf*0x3,_0x2f75bf=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x31854b(0x1c9)](0x927c0,_0x5397d1*0x14),_0x218a3d=[_0x31854b(0x1c1),_0x31854b(0x277),_0x31854b(0x110),_0x31854b(0x23c),_0x31854b(0x1ae),_0x31854b(0x172)];let _0x371ab4=null;function _0x3b877a(){const _0x14a56f=_0x31854b;if(_0x371ab4==null)_0x371ab4=Math[_0x14a56f(0x9e)]((Date[_0x14a56f(0x26f)]()-process[_0x14a56f(0x14d)]()*0x3e8)/0x3e8)*0x3e8;return _0x371ab4;}function _0x57b2dd(_0x5230df){const _0xb64131=_0x31854b;if(process.env.OKDB_PROCESS_KILL===_0xb64131(0x20f))return![];if(_0x5230df?.[_0xb64131(0x1c5)]?.[_0xb64131(0x140)]&&typeof _0x5230df['options'][_0xb64131(0x140)]===_0xb64131(0x273)&&_0x5230df['options']['processes']['kill']===![])return![];return!![];}function _0x52c120(_0x1469a8,_0x55ad77){const _0x5ecf50=_0x31854b,_0x32ac92=!!_0x55ad77?.[_0x5ecf50(0x1b4)];switch(_0x1469a8){case _0x5ecf50(0x1c6):return{'controllable':_0x32ac92,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x5ecf50(0xe1):case _0x5ecf50(0x1e4):return{'controllable':_0x32ac92,'decommissionable':![],'killable':!![],'killConfirm':_0x5ecf50(0x1fa)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x5ecf50(0x242):case _0x5ecf50(0x13b):case _0x5ecf50(0x171):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x5ecf50(0x13a)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x4b6f2f{constructor(_0x1d334b){const _0x502a1e=_0x31854b;this[_0x502a1e(0x2ba)]=_0x1d334b,this['_statusEnv']=null,this['_desired']=null,this[_0x502a1e(0x25d)]=new Map(),this['_cmd']=null,this[_0x502a1e(0x128)]=![],this[_0x502a1e(0x2c7)]=![],this[_0x502a1e(0x167)]=_0x3b877a(),this['_selfKey']=_0x5bb0f0(process[_0x502a1e(0x29d)],this[_0x502a1e(0x167)]),this['_instanceId']=_0x12e936[_0x502a1e(0x22e)]()[_0x502a1e(0x1af)](0x0,0x8),this['_rowKey']=_0x155c92(this[_0x502a1e(0x1d3)],this[_0x502a1e(0x248)]),this['_startedAt']=Date[_0x502a1e(0x26f)](),this[_0x502a1e(0x23d)]=null,this[_0x502a1e(0x86)]=null,this[_0x502a1e(0x255)]=null,this[_0x502a1e(0x20e)]=null,this[_0x502a1e(0x1bc)]=null,this['_onTick']=null,this[_0x502a1e(0x219)]=0x0,this['_ownMeta']={},this[_0x502a1e(0x17c)]=new Map(),this[_0x502a1e(0x230)]=process['cpuUsage'](),this[_0x502a1e(0x142)]=Date[_0x502a1e(0x26f)](),this[_0x502a1e(0x1e5)]=0x0,this[_0x502a1e(0x24e)]=new Map();}get[_0x31854b(0xe4)](){const _0x5b332c=_0x31854b;return this[_0x5b332c(0x1d3)];}get[_0x31854b(0x115)](){const _0x258c6d=_0x31854b;return this[_0x258c6d(0x15b)];}['_caps'](_0x548435,_0x4d4395){const _0x30718d=_0x31854b,_0x76ee07=_0x52c120(_0x548435,_0x4d4395);if(_0x76ee07[_0x30718d(0x1e9)]&&!_0x57b2dd(this[_0x30718d(0x2ba)]))return{..._0x76ee07,'killable':![],'killConfirm':undefined};return _0x76ee07;}[_0x31854b(0x1cd)](){const _0x5a9ce7=_0x31854b;return!!this[_0x5a9ce7(0x295)];}[_0x31854b(0x185)](_0x2a1cbb){Object['assign'](this['_ownMeta'],_0x2a1cbb||{});}[_0x31854b(0x213)](_0x480160){const _0x4b709e=_0x31854b;if(_0x480160)this[_0x4b709e(0x255)]=_0x480160;}[_0x31854b(0x84)](_0x77dee3={}){const _0x269bb3=_0x31854b;return this[_0x269bb3(0x2ba)]['_activateProcesses'](_0x77dee3);}[_0x31854b(0xc5)](){const _0x17bf96=_0x31854b,_0x49231d={};let _0x48f2d2=0x0,_0x3e5fe4=0x0;const _0x3102f5=new Set();for(const _0x221feb of this[_0x17bf96(0x19f)]()){_0x3e5fe4++;const _0x2dfcef=_0x221feb['processing'];if(!_0x2dfcef)continue;if(_0x2dfcef[_0x17bf96(0x268)])_0x48f2d2++;for(const _0x4f536a of _0x2dfcef[_0x17bf96(0x1b4)]||[]){if(![_0x17bf96(0x21c),_0x17bf96(0x103)][_0x17bf96(0xc8)](_0x4f536a[_0x17bf96(0xd4)]))continue;(_0x4f536a[_0x17bf96(0x21f)]===_0x17bf96(0x232)||_0x4f536a[_0x17bf96(0x21f)]===_0x17bf96(0x1d5))&&_0x4f536a[_0x17bf96(0x24d)]&&_0x3102f5[_0x17bf96(0x1fb)]((_0x4f536a[_0x17bf96(0xed)]||_0x17bf96(0x206))+':'+_0x4f536a[_0x17bf96(0x24d)]);const _0x17e4ed=_0x4f536a['env']||_0x17bf96(0x206);(_0x49231d[_0x17e4ed]||=[])[_0x17bf96(0xb1)]({..._0x4f536a,'env':_0x17e4ed,'owner':{'pid':_0x221feb['pid']??null,'kind':_0x221feb['kind']??null}});}}for(const [_0x1d8475,_0x25e5c2]of Object[_0x17bf96(0x20c)](_0x49231d)){for(const _0x541cf7 of _0x25e5c2){if(_0x541cf7['mode']==='single'&&!_0x541cf7[_0x17bf96(0x2c4)]){const _0x49e553=_0x1d8475+':'+(_0x541cf7[_0x17bf96(0x24d)]??'');if(!_0x3102f5[_0x17bf96(0x146)](_0x49e553))_0x541cf7[_0x17bf96(0x214)]=!![];}}}return{'envs':_0x49231d,'policy':null,'participation':{'participating':_0x48f2d2,'total':_0x3e5fe4},'source':_0x17bf96(0x25f)};}['processorsView'](){const _0xd69f27=_0x31854b,_0x1473e9=_0x24c753=>{const _0x461775=_0x2fe0;if(_0x24c753['state']===_0x461775(0x232)||_0x24c753[_0x461775(0x21f)]==='building'||_0x24c753[_0x461775(0x21f)]===_0x461775(0x250))return 0x3;if(_0x24c753[_0x461775(0x2c4)])return 0x1;return 0x2;},_0x9e4d4f=new Map();for(const _0x1896be of this[_0xd69f27(0x19f)]()){for(const _0x18e307 of _0x1896be[_0xd69f27(0xcf)]?.[_0xd69f27(0x1b4)]||[]){const _0x5145e4={..._0x18e307,'owner':{'pid':_0x1896be[_0xd69f27(0x29d)]??null,'kind':_0x1896be[_0xd69f27(0x234)]??null,'host':_0x1896be[_0xd69f27(0x215)]??null}},_0x2b048e=_0x18e307['mode']===_0xd69f27(0x21c)?'1ofN:'+(_0x18e307[_0xd69f27(0xed)]??'')+'::'+(_0x18e307[_0xd69f27(0x24d)]??_0x18e307[_0xd69f27(0x156)]??_0x18e307['id']):'inst:'+(_0x1896be['nodeKey']??_0x1896be[_0xd69f27(0x162)]??'')+'::'+(_0x18e307['env']??'')+'::'+_0x18e307['id'],_0x3d758f=_0x9e4d4f[_0xd69f27(0x2a6)](_0x2b048e);if(!_0x3d758f||_0x1473e9(_0x5145e4)>_0x1473e9(_0x3d758f))_0x9e4d4f[_0xd69f27(0x27e)](_0x2b048e,_0x5145e4);}}return[..._0x9e4d4f[_0xd69f27(0xab)]()];}[_0x31854b(0x276)](){const _0x30ad85=_0x31854b,_0x16915c=Date[_0x30ad85(0x26f)](),_0x2f505c=this[_0x30ad85(0x19f)](),_0x30cb45=_0x28d25f=>Math[_0x30ad85(0x1c9)](0x0,Math[_0x30ad85(0x9e)]((_0x16915c-(_0x28d25f[_0x30ad85(0x1ef)]||_0x16915c))/0x3e8)),_0x1836db=_0x2f505c[_0x30ad85(0x200)](_0x4c6756=>_0x4c6756[_0x30ad85(0x234)]===_0x30ad85(0x1c6)),_0x23f9a3=_0x2f505c[_0x30ad85(0x125)](_0x5251a1=>_0x5251a1['kind']===_0x30ad85(0x242));if(_0x1836db||_0x23f9a3[_0x30ad85(0x243)])return{'primary':_0x1836db?{'pid':_0x1836db[_0x30ad85(0x29d)],'uptime':_0x30cb45(_0x1836db)}:null,'workers':_0x23f9a3[_0x30ad85(0x2a7)](_0x47789f=>({'pid':_0x47789f[_0x30ad85(0x29d)],'uptime':_0x30cb45(_0x47789f)})),'workersConfigured':_0x1836db?.[_0x30ad85(0xb4)]?.[_0x30ad85(0x278)]??_0x23f9a3[_0x30ad85(0x243)],'mode':_0x30ad85(0x87)};const _0x4e58cc=_0x2f505c[_0x30ad85(0x200)](_0x1e00a1=>_0x1e00a1[_0x30ad85(0x234)]===_0x30ad85(0xe1)||_0x1e00a1[_0x30ad85(0x234)]==='standalone'||_0x1e00a1[_0x30ad85(0x234)]===_0x30ad85(0x26e)),_0x27b636=_0x4e58cc?{'pid':_0x4e58cc[_0x30ad85(0x29d)],'uptime':_0x30cb45(_0x4e58cc)}:{'pid':process[_0x30ad85(0x29d)],'uptime':Math[_0x30ad85(0x1c9)](0x0,Math[_0x30ad85(0x9e)](process['uptime']()))};return{'primary':_0x27b636,'workers':[_0x27b636],'workersConfigured':0x1,'mode':_0x30ad85(0x21c)};}[_0x31854b(0xf3)](){return this['_groupByProcess']();}[_0x31854b(0x137)](){const _0x2211d3=_0x31854b,_0x53e46e=new Map();for(const _0x51d27a of this[_0x2211d3(0xb0)]())_0x53e46e['set'](_0x51d27a['processKey'],{..._0x51d27a,'children':[]});const _0x29c698=[];for(const _0x227d29 of _0x53e46e[_0x2211d3(0xab)]()){const _0x48ff39=_0x227d29['supervisorKey']?_0x53e46e[_0x2211d3(0x2a6)](_0x227d29[_0x2211d3(0x1f2)]):null;if(_0x48ff39&&_0x48ff39!==_0x227d29)_0x48ff39['children']['push'](_0x227d29);else _0x29c698['push'](_0x227d29);}const _0x2ee7a0=(_0x50915f,_0x2bcc7c)=>_0x50915f[_0x2211d3(0x234)]===_0x2bcc7c['kind']?(_0x50915f['pid']||0x0)-(_0x2bcc7c['pid']||0x0):(_0x50915f[_0x2211d3(0x234)]??'')<(_0x2bcc7c[_0x2211d3(0x234)]??'')?-0x1:0x1,_0x4a3e1e=_0x367c1d=>{const _0x5b4eb9=_0x2211d3;_0x367c1d[_0x5b4eb9(0x283)](_0x2ee7a0);for(const _0x2c91da of _0x367c1d)if(_0x2c91da[_0x5b4eb9(0x1c4)]['length'])_0x4a3e1e(_0x2c91da[_0x5b4eb9(0x1c4)]);};return _0x4a3e1e(_0x29c698),_0x29c698;}[_0x31854b(0x1a1)](_0x1ba441){const _0x5ba1fe=_0x31854b;return this['_groupByProcess']()[_0x5ba1fe(0x200)](_0x4f4b9d=>_0x4f4b9d['processKey']===_0x1ba441)??null;}[_0x31854b(0xb0)](_0x253ae1=Date[_0x31854b(0x26f)]()){const _0x52a8d0=_0x31854b,_0x4a537e=new Map();for(const _0x53e4a0 of this[_0x52a8d0(0x19f)]()){const _0x311fd2=_0x113fc1(_0x53e4a0);let _0x377331=_0x4a537e[_0x52a8d0(0x2a6)](_0x311fd2);!_0x377331&&(_0x377331={'processKey':_0x311fd2,'nodeKey':_0x311fd2,'pid':_0x53e4a0[_0x52a8d0(0x29d)],'ppid':_0x53e4a0[_0x52a8d0(0xaa)]??null,'host':_0x53e4a0[_0x52a8d0(0x215)]??null,'kind':_0x53e4a0[_0x52a8d0(0x234)],'role':null,'supervisorKey':_0x53e4a0[_0x52a8d0(0x1f2)]??null,'slot':_0x53e4a0[_0x52a8d0(0xb9)]??null,'slotKey':_0x53e4a0[_0x52a8d0(0x145)]??null,'caps':_0x53e4a0['caps']??null,'lifecycle':_0x53e4a0['lifecycle']??null,'uptime':Math[_0x52a8d0(0x1c9)](0x0,Math[_0x52a8d0(0x9e)]((_0x253ae1-(_0x53e4a0['startedAt']||_0x253ae1))/0x3e8)),'startedAt':_0x53e4a0['startedAt']??null,'meta':_0x53e4a0[_0x52a8d0(0xb4)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x4a537e[_0x52a8d0(0x27e)](_0x311fd2,_0x377331));_0x377331['instances'][_0x52a8d0(0xb1)]({'instanceId':_0x53e4a0[_0x52a8d0(0xe7)]??null,'role':_0x53e4a0[_0x52a8d0(0x2a5)]??null,'listenAddr':_0x53e4a0['listenAddr']??null,'lifecycle':_0x53e4a0[_0x52a8d0(0x153)]??null,'processing':_0x53e4a0[_0x52a8d0(0xcf)]??null});if(!_0x377331[_0x52a8d0(0x2a5)]&&_0x53e4a0[_0x52a8d0(0x2a5)])_0x377331[_0x52a8d0(0x2a5)]=_0x53e4a0['role'];if(!_0x377331[_0x52a8d0(0x1ff)]&&_0x53e4a0[_0x52a8d0(0x1ff)])_0x377331[_0x52a8d0(0x1ff)]=_0x53e4a0[_0x52a8d0(0x1ff)];if(!_0x377331['processing']&&_0x53e4a0[_0x52a8d0(0xcf)])_0x377331['processing']=_0x53e4a0['processing'];if(!_0x377331[_0x52a8d0(0x17b)]&&_0x53e4a0[_0x52a8d0(0x17b)])_0x377331[_0x52a8d0(0x17b)]=_0x53e4a0[_0x52a8d0(0x17b)];if(!_0x377331[_0x52a8d0(0x253)]&&_0x53e4a0[_0x52a8d0(0x253)])_0x377331[_0x52a8d0(0x253)]=_0x53e4a0[_0x52a8d0(0x253)];if(_0x377331[_0x52a8d0(0x147)]==null&&_0x53e4a0[_0x52a8d0(0x147)])_0x377331['caps']=_0x53e4a0['caps'];if(_0x53e4a0[_0x52a8d0(0x9f)]&&(!_0x377331[_0x52a8d0(0x9f)]||(_0x53e4a0[_0x52a8d0(0x9f)]['at']??0x0)>(_0x377331['stats']['at']??0x0)))_0x377331[_0x52a8d0(0x9f)]=_0x53e4a0[_0x52a8d0(0x9f)];}return[..._0x4a537e['values']()];}[_0x31854b(0x98)](){const _0x26965b=_0x31854b,_0x2069e7=[],_0x247dcb={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x5d3945 of this['_groupByProcess']()){_0x2069e7[_0x26965b(0xb1)]({'processKey':_0x5d3945[_0x26965b(0x162)],'kind':_0x5d3945[_0x26965b(0x234)],'pid':_0x5d3945[_0x26965b(0x29d)],'supervisorKey':_0x5d3945[_0x26965b(0x1f2)],'meta':_0x5d3945['meta']??null,'uptime':_0x5d3945[_0x26965b(0x14d)],'stats':_0x5d3945[_0x26965b(0x9f)]??null}),_0x247dcb[_0x26965b(0x140)]++;if(_0x5d3945[_0x26965b(0x9f)]){_0x247dcb[_0x26965b(0x257)]+=_0x5d3945['stats'][_0x26965b(0x257)]||0x0,_0x247dcb[_0x26965b(0x18e)]+=(_0x5d3945[_0x26965b(0x9f)][_0x26965b(0x18e)]||0x0)+(_0x5d3945[_0x26965b(0x9f)][_0x26965b(0x1be)]?.[_0x26965b(0x18e)]||0x0);const _0x4c601c=_0x5d3945[_0x26965b(0x9f)][_0x26965b(0x1be)];_0x4c601c&&(_0x247dcb[_0x26965b(0x1be)][_0x26965b(0x1b1)]+=_0x4c601c[_0x26965b(0x1b1)]||0x0,_0x247dcb['threads'][_0x26965b(0x17d)]+=_0x4c601c[_0x26965b(0x17d)]||0x0,_0x247dcb['threads'][_0x26965b(0x11a)]+=_0x4c601c['busy']||0x0);}}return{'totals':_0x247dcb,'nodes':_0x2069e7};}async[_0x31854b(0xae)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x194036=_0x31854b;this[_0x194036(0x128)]=this[_0x194036(0x128)]||!!writer,this[_0x194036(0x2c7)]=this['_isReader']||!!reader,this['_kind']=kind||this[_0x194036(0x23d)]||(_0x3c5db5[_0x194036(0x1cf)]?_0x194036(0x242):_0x194036(0xe1)),this[_0x194036(0x86)]=supervisorKey??this[_0x194036(0x86)],this['_listenAddr']=listenAddr??this[_0x194036(0x255)],this[_0x194036(0x28f)](),await this[_0x194036(0x186)]();if(!writer&&!reader)return null;if(!this[_0x194036(0x295)]){const _0x1edc90=await this[_0x194036(0x2ba)]['createEnvironment'](_0x4181c5,{'sync':![],'durability':_0x194036(0xb8)});await _0x1edc90[_0x194036(0x238)](_0x5f0107),this[_0x194036(0x295)]=_0x1edc90;}return this['_statusEnv'];}[_0x31854b(0x1d8)](){const _0x365a89=_0x31854b;return this[_0x365a89(0x287)]!==this[_0x365a89(0x295)]&&(this['_nodeDbFor']=this[_0x365a89(0x295)],this['_nodeDbCache']=this[_0x365a89(0x295)][_0x365a89(0xe6)](_0x5f0107)[_0x365a89(0x29a)]),this['_nodeDbCache'];}[_0x31854b(0x169)](_0x41cc93){const _0x2fcbed=_0x31854b;if(_0x4d57ac)return this['_nodeDb']()[_0x2fcbed(0x26d)](_0x41cc93[_0x2fcbed(0x227)],_0x41cc93,0x1);const _0x3a0462=this[_0x2fcbed(0x1d8)]()[_0x2fcbed(0x91)](_0x41cc93['nodeKey'],_0x41cc93,0x1);if(_0x3a0462&&typeof _0x3a0462[_0x2fcbed(0x8d)]===_0x2fcbed(0xd1))_0x3a0462[_0x2fcbed(0x8d)](undefined,()=>{});return _0x3a0462;}[_0x31854b(0x7d)](_0x4c4e72){const _0x2b4d87=_0x31854b;return this['_nodeDb']()[_0x2b4d87(0x26d)](_0x4c4e72[_0x2b4d87(0x227)],_0x4c4e72,0x1);}[_0x31854b(0x175)](_0x97fb74){const _0x449114=_0x31854b;if(_0x4d57ac)try{return this['_nodeDb']()[_0x449114(0x16b)](_0x97fb74);}catch{return![];}const _0x135f18=this[_0x449114(0x1d8)]()[_0x449114(0x290)](_0x97fb74);if(_0x135f18&&typeof _0x135f18[_0x449114(0x8d)]===_0x449114(0xd1))_0x135f18[_0x449114(0x8d)](undefined,()=>{});return _0x135f18;}async[_0x31854b(0xc4)](_0x254c0d){const _0x78cf67=_0x31854b;if(!this[_0x78cf67(0x295)]||!this[_0x78cf67(0x128)]||!_0x254c0d?.[_0x78cf67(0x227)])return;return this['_putRowAsync'](_0x254c0d);}async[_0x31854b(0x1df)](_0x2a53eb){const _0x14ca3b=_0x31854b;if(!this[_0x14ca3b(0x295)]||!this[_0x14ca3b(0x128)]||!_0x2a53eb)return;const _0x107112=_0x2a53eb[_0x14ca3b(0xc8)]('#'),_0x256c5f=[];for(const {key:_0x4f2f1c}of this['_statusEnv']['getRange'](_0x5f0107)){if(_0x4f2f1c===_0x2a53eb||!_0x107112&&typeof _0x4f2f1c===_0x14ca3b(0x236)&&_0x4f2f1c['startsWith'](_0x2a53eb+'#'))_0x256c5f['push'](_0x4f2f1c);}for(const _0x171981 of _0x256c5f){try{this[_0x14ca3b(0x1d8)]()[_0x14ca3b(0x16b)](_0x171981);}catch{}}}[_0x31854b(0x235)](_0x4d6b03){const _0x40d85e=_0x31854b;if(typeof _0x4d6b03?.[_0x40d85e(0x29d)]!=='number')return![];if(_0x4d6b03[_0x40d85e(0x215)]!==_0x38474c[_0x40d85e(0x7e)]())return![];if(_0x4d6b03[_0x40d85e(0x29d)]===process[_0x40d85e(0x29d)])return![];if(_0x4d6b03[_0x40d85e(0x2be)]!=null&&_0x4d6b03[_0x40d85e(0x2be)]<Date[_0x40d85e(0x26f)]()-_0x2f75bf)return!![];try{return process['kill'](_0x4d6b03[_0x40d85e(0x29d)],0x0),![];}catch(_0x435a95){return _0x435a95[_0x40d85e(0x138)]===_0x40d85e(0x298);}}[_0x31854b(0x19f)](){const _0x494322=_0x31854b;if(!this[_0x494322(0x295)])return[];try{this['_statusEnv']['db']?.[_0x494322(0x14f)]?.();}catch{}const _0x450b4e=Date[_0x494322(0x26f)](),_0x5cdfac=_0x38474c[_0x494322(0x7e)](),_0x183078=[];for(const {value:_0x25d682}of this[_0x494322(0x295)][_0x494322(0x1c3)](_0x5f0107)){if(!_0x25d682)continue;let _0x4efeb1=null;_0x25d682['host']===_0x5cdfac&&typeof _0x25d682[_0x494322(0x29d)]===_0x494322(0xa3)&&(_0x4efeb1=!this['_nodeDead'](_0x25d682));if(_0x4efeb1===![])continue;const _0x163d41=_0x25d682[_0x494322(0x2be)]==null||_0x25d682[_0x494322(0x2be)]>=_0x450b4e;if(_0x4efeb1===!![]||_0x163d41)_0x183078[_0x494322(0xb1)](_0x25d682);}return _0x183078;}async[_0x31854b(0xeb)](_0x12ed7a=0x0){const _0x298716=_0x31854b;if(!this['_statusEnv']||!this[_0x298716(0x128)])return;const _0x287c6c=Date[_0x298716(0x26f)]()-_0x12ed7a,_0x387b45=new Set(),_0x43c0c1=[],_0x4a3e4e=_0x38474c[_0x298716(0x7e)](),_0x6daaf5=require$$6[_0x298716(0x279)];for(const {key:_0x1f6e50,value:_0x1d0179}of this[_0x298716(0x295)][_0x298716(0x1c3)](_0x5f0107)){if(!_0x1d0179)continue;const _0xcf5f1d=_0x1d0179[_0x298716(0x215)]===_0x4a3e4e&&typeof _0x1d0179['pid']===_0x298716(0xa3),_0x527a88=_0xcf5f1d?this[_0x298716(0x235)](_0x1d0179):_0x1d0179['expiresAt']!=null&&_0x1d0179[_0x298716(0x2be)]<_0x287c6c;if(_0x527a88)_0x43c0c1[_0x298716(0xb1)](_0x1f6e50);else{_0x387b45[_0x298716(0x1fb)](_0x113fc1(_0x1d0179)??_0x1f6e50);if(_0x1d0179[_0x298716(0x279)]&&_0x1d0179[_0x298716(0x279)]!==_0x6daaf5){if(!this['_versionSkewWarned'])this[_0x298716(0xca)]=new Set();!this['_versionSkewWarned'][_0x298716(0x146)](_0x1d0179['version'])&&(this[_0x298716(0xca)][_0x298716(0x1fb)](_0x1d0179[_0x298716(0x279)]),this[_0x298716(0x2ba)]['log']?.['warn']?.(_0x298716(0x209)+(_0x1d0179[_0x298716(0x29d)]??'?')+_0x298716(0x106)+_0x1d0179[_0x298716(0x279)]+'\x20while\x20this\x20process\x20runs\x20'+_0x6daaf5+'\x20—\x20'+_0x298716(0x2ae),{'feature':_0x298716(0x271)}));}}}for(const _0x26f968 of _0x43c0c1)this[_0x298716(0x175)](_0x26f968);if(this[_0x298716(0x28f)]()){const _0x14a278=[];for(const {key:_0x19c1ef}of this[_0x298716(0x126)]('node')){if(!_0x387b45[_0x298716(0x146)](_0x19c1ef)){if(_0x4d57ac)try{this[_0x298716(0x1eb)][_0x298716(0x16b)]('node/'+_0x19c1ef);}catch{}else _0x14a278[_0x298716(0xb1)](this[_0x298716(0x1eb)][_0x298716(0x290)](_0x298716(0xda)+_0x19c1ef));}}if(_0x14a278[_0x298716(0x243)])await Promise['allSettled'](_0x14a278);}}[_0x31854b(0x2c2)](_0x124452=null){const _0x5bcf4b=_0x31854b;if(this[_0x5bcf4b(0x20e)])return;if(!this[_0x5bcf4b(0x128)]||!this[_0x5bcf4b(0x295)]){this['okdb']?.[_0x5bcf4b(0x1fd)]?.[_0x5bcf4b(0xdd)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this['_isWriter']+_0x5bcf4b(0x129)+!!this['_statusEnv']+_0x5bcf4b(0x2bc),{'feature':_0x5bcf4b(0x140)});return;}this['_onTick']=_0x124452,this[_0x5bcf4b(0x1bc)]=()=>this[_0x5bcf4b(0x92)]();for(const _0x2cf309 of _0x218a3d)this['okdb'][_0x5bcf4b(0x18c)]['on'](_0x2cf309,this[_0x5bcf4b(0x1bc)]);this['_publishNow']();const _0x1ffe2f=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x1cffbf;this['_hbTimer']=setInterval(()=>{const _0x5cb38e=_0x5bcf4b;if(this['_onTick'])try{this[_0x5cb38e(0x294)]();}catch{}this['_publishNow'](),this[_0x5cb38e(0xeb)]()[_0x5cb38e(0x267)](()=>{});},_0x1ffe2f);if(this[_0x5bcf4b(0x20e)]['unref'])this[_0x5bcf4b(0x20e)]['unref']();}['_maybePublish'](){const _0x17fd23=_0x31854b;if(!this[_0x17fd23(0x128)]||!this[_0x17fd23(0x295)])return;if(Date[_0x17fd23(0x26f)]()-this[_0x17fd23(0x219)]<_0x1d6332)return;this[_0x17fd23(0x116)]();}[_0x31854b(0x116)](){const _0x890c81=_0x31854b;if(!this[_0x890c81(0x128)]||!this[_0x890c81(0x295)])return;this[_0x890c81(0x219)]=Date[_0x890c81(0x26f)]();try{const _0x47fed5=[this['_buildOwnRow']()];for(const _0x4ebf6b of this[_0x890c81(0x17c)][_0x890c81(0xab)]())_0x47fed5['push'](this['_buildChildRow'](_0x4ebf6b));const _0x337b73=_0x212f76[_0x890c81(0x1ce)]?_0x212f76[_0x890c81(0x26f)]():0x0;for(const _0x4b672c of _0x47fed5){try{this[_0x890c81(0x7d)](_0x4b672c),this[_0x890c81(0x1e1)]=![];}catch(_0x1a3376){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this[_0x890c81(0x2ba)]?.[_0x890c81(0x1fd)]?.[_0x890c81(0xdd)]?.('registry\x20publish\x20failing:\x20'+_0x1a3376[_0x890c81(0x1b3)],{'feature':_0x890c81(0x140)}));}}if(_0x212f76[_0x890c81(0x1ce)])_0x212f76[_0x890c81(0x1f3)]('registry-publish',_0x212f76[_0x890c81(0x26f)]()-_0x337b73,'rows='+_0x47fed5[_0x890c81(0x243)]+_0x890c81(0x1bd));}catch(_0x4558fb){!this['_publishFailWarned']&&(this[_0x890c81(0x1e1)]=!![],this['okdb']?.['log']?.[_0x890c81(0xdd)]?.(_0x890c81(0x1f7)+_0x4558fb[_0x890c81(0x1b3)],{'feature':_0x890c81(0x140)}));}}async[_0x31854b(0x168)](){const _0x4fb0b0=_0x31854b;if(this['_onProcEvent']){for(const _0x3e1eb8 of _0x218a3d){try{this['okdb'][_0x4fb0b0(0x18c)][_0x4fb0b0(0x20f)](_0x3e1eb8,this['_onProcEvent']);}catch{}}this[_0x4fb0b0(0x1bc)]=null;}this[_0x4fb0b0(0x20e)]&&(clearInterval(this['_hbTimer']),this[_0x4fb0b0(0x20e)]=null);try{if(this['_statusEnv']&&this[_0x4fb0b0(0x128)])await this[_0x4fb0b0(0x1df)](this[_0x4fb0b0(0x15b)]);}catch{}}async[_0x31854b(0x2bd)](){const _0x311966=_0x31854b;if(!this['_statusEnv']||!this['_isWriter'])return;try{await this['removeNode'](this[_0x311966(0x15b)]);}catch{}try{const _0x9f58e8=[];for(const {value:_0x53bbab}of this[_0x311966(0x295)][_0x311966(0x1c3)](_0x5f0107)){if(_0x53bbab?.[_0x311966(0xaa)]===process[_0x311966(0x29d)]&&_0x53bbab[_0x311966(0x227)])_0x9f58e8[_0x311966(0xb1)](_0x53bbab[_0x311966(0x227)]);}for(const _0x29f570 of _0x9f58e8){try{await this[_0x311966(0x1df)](_0x29f570);}catch{}}}catch{}}async['publishOwnRow'](){const _0x38f68c=_0x31854b;return this[_0x38f68c(0xc4)](this[_0x38f68c(0x23e)]());}async[_0x31854b(0x134)](_0x13ded6){const _0x148321=_0x31854b;if(!this[_0x148321(0x295)]||!this[_0x148321(0x128)])return;return this[_0x148321(0xc4)](this[_0x148321(0x193)](_0x13ded6));}[_0x31854b(0x193)]({pid:_0xc3a010,startedAt:_0x5a86e2,kind:_0x4527d4,supervisorKey:_0x3e950e,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x3cce98=_0x31854b,_0x367a18=Date[_0x3cce98(0x26f)](),_0x23534f=_0x5bb0f0(_0xc3a010,_0x5a86e2);return{'nodeKey':_0x155c92(_0x23534f,'0'),'processKey':_0x23534f,'instanceId':'0','pid':_0xc3a010,'startedAt':_0x5a86e2,'ppid':process[_0x3cce98(0x29d)],'host':_0x38474c['hostname'](),'supervisorKey':_0x3e950e,'slot':slot,'slotKey':slotKey,'kind':_0x4527d4,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x367a18,'expiresAt':_0x367a18+_0x5397d1,'caps':this[_0x3cce98(0xa8)](_0x4527d4,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x31854b(0x135)](_0x5b6f73){const _0x3a22c3=_0x31854b;if(!_0x5b6f73?.[_0x3a22c3(0x29d)])return null;const _0x5a5be5=_0x5bb0f0(_0x5b6f73[_0x3a22c3(0x29d)],_0x5b6f73[_0x3a22c3(0x1ef)]);this[_0x3a22c3(0x17c)][_0x3a22c3(0x27e)](_0x5a5be5,{..._0x5b6f73,'supervisorKey':_0x5b6f73[_0x3a22c3(0x1f2)]??this['_selfKey']});if(this[_0x3a22c3(0x128)])await this[_0x3a22c3(0x134)](this[_0x3a22c3(0x17c)][_0x3a22c3(0x2a6)](_0x5a5be5))['catch']?.(()=>{});return _0x5a5be5;}[_0x31854b(0x29b)](_0x513500){const _0xabfbf8=_0x31854b;if(!_0x513500)return;return this[_0xabfbf8(0x17c)][_0xabfbf8(0x264)](_0x513500),this[_0xabfbf8(0x1df)](_0x513500);}['_sampleOwnStats'](){const _0x3314a3=_0x31854b,_0x136783=Date['now'](),_0x2509aa=process['cpuUsage'](),_0x173efc=(_0x136783-this['_lastCpuAt'])*0x3e8;if(_0x173efc>=0x3d090){const _0x507f14=_0x2509aa[_0x3314a3(0x224)]-this['_lastCpuUsage'][_0x3314a3(0x224)]+(_0x2509aa[_0x3314a3(0x83)]-this[_0x3314a3(0x230)][_0x3314a3(0x83)]),_0x43bb6=_0x38474c[_0x3314a3(0x8b)]()[_0x3314a3(0x243)]||0x1;this[_0x3314a3(0x1e5)]=Math[_0x3314a3(0x28e)](0x64,Math['round'](_0x507f14/(_0x173efc*_0x43bb6)*0x64)),this[_0x3314a3(0x8f)]=Math['round'](_0x173efc/0x3e8),this[_0x3314a3(0x230)]=_0x2509aa,this[_0x3314a3(0x142)]=_0x136783;}const _0x32e4e2=process[_0x3314a3(0x1a7)](),_0x492822=this[_0x3314a3(0x24e)][_0x3314a3(0x1a8)];let _0x1c278b=0x0;if(_0x492822>0x0){const _0x5bffb0=[this['okdb'],...this['okdb'][_0x3314a3(0x90)]?.[_0x3314a3(0xab)]?.()??[]];for(const _0x4bb94d of _0x5bffb0){const _0x481507=_0x4bb94d[_0x3314a3(0x11e)]?.[_0x3314a3(0x158)];if(_0x481507)_0x1c278b+=_0x481507[_0x3314a3(0x237)]['busy'];}}let _0x242d2b=null;const _0x1949f6=_0x492822;if(_0x1949f6>0x0){let _0x5c922c=0x0;for(const _0x4b4bdd of this[_0x3314a3(0x24e)][_0x3314a3(0xab)]())_0x5c922c+=_0x4b4bdd[_0x3314a3(0x18e)]||0x0;_0x242d2b={'count':_0x1949f6,'heapUsed':_0x5c922c,'sandbox':_0x492822,'busy':_0x1c278b};}return{'rss':_0x32e4e2[_0x3314a3(0x257)],'heapUsed':_0x32e4e2[_0x3314a3(0x18e)],'heapTotal':_0x32e4e2[_0x3314a3(0x27a)],'external':_0x32e4e2[_0x3314a3(0x131)],'cpuPct':this[_0x3314a3(0x1e5)],'cpuWindowMs':this[_0x3314a3(0x8f)]??null,'threads':_0x242d2b,'at':_0x136783};}[_0x31854b(0x184)](_0x198b25,_0x5562e6){const _0x22db4b=_0x31854b;if(!_0x198b25||!_0x5562e6)return;this[_0x22db4b(0x24e)][_0x22db4b(0x27e)](_0x198b25,_0x5562e6);}[_0x31854b(0xc1)](_0x5c6a75){const _0x2cc844=_0x31854b;this[_0x2cc844(0x24e)][_0x2cc844(0x264)](_0x5c6a75);}[_0x31854b(0x2aa)](_0x346532,_0x11c138,_0x102338=undefined){const _0x2446fc=_0x31854b,_0x5726d2=this[_0x2446fc(0x17c)][_0x2446fc(0x2a6)](_0x346532);if(!_0x5726d2||!_0x11c138)return;if(_0x102338!==undefined)_0x5726d2[_0x2446fc(0xcf)]=_0x102338;_0x5726d2[_0x2446fc(0x9f)]={'rss':_0x11c138[_0x2446fc(0x257)]??null,'heapUsed':_0x11c138[_0x2446fc(0x18e)]??null,'heapTotal':_0x11c138[_0x2446fc(0x27a)]??null,'external':_0x11c138[_0x2446fc(0x131)]??null,'cpuPct':_0x11c138[_0x2446fc(0x7f)]??null,'cpuWindowMs':_0x11c138[_0x2446fc(0x1ad)]??null,'threads':_0x11c138[_0x2446fc(0x1be)]??null,'claims':_0x11c138[_0x2446fc(0x1ca)]??null,'envsOpen':_0x11c138[_0x2446fc(0x18a)]??null,'at':Date[_0x2446fc(0x26f)]()};}[_0x31854b(0x23e)](){const _0x29baa2=_0x31854b,_0x2ab6a1=Date[_0x29baa2(0x26f)](),_0x10661c=this['okdb'][_0x29baa2(0x256)]||{},_0x3c9f45=this[_0x29baa2(0x23d)]||'cli';return{'nodeKey':this[_0x29baa2(0x15b)],'processKey':this['_selfKey'],'instanceId':this[_0x29baa2(0x248)],'pid':process[_0x29baa2(0x29d)],'startedAt':this[_0x29baa2(0x167)],'instanceStartedAt':this[_0x29baa2(0x1d4)],'ppid':typeof process[_0x29baa2(0xaa)]===_0x29baa2(0xa3)?process['ppid']:null,'host':_0x38474c[_0x29baa2(0x7e)](),'supervisorKey':this[_0x29baa2(0x86)]??null,'version':require$$6[_0x29baa2(0x279)],'kind':_0x3c9f45,'role':{'engines':!!_0x10661c['engines'],'processors':!!_0x10661c[_0x29baa2(0x1b4)],'compaction':_0x10661c[_0x29baa2(0x14c)],'http':_0x10661c[_0x29baa2(0x265)]},'listenAddr':this[_0x29baa2(0x255)]??null,'heartbeatAt':_0x2ab6a1,'expiresAt':_0x2ab6a1+_0x5397d1,'caps':this[_0x29baa2(0xa8)](_0x3c9f45,_0x10661c),'lifecycle':{'state':_0x29baa2(0x21e),'desiredVersionApplied':null},'meta':{...this[_0x29baa2(0x19b)]},'processing':_0x10661c[_0x29baa2(0x1b4)]?this[_0x29baa2(0x16d)]():null,'engines':_0x10661c[_0x29baa2(0x17b)]?[...this[_0x29baa2(0x2ba)][_0x29baa2(0x121)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x29baa2(0x2b1)](),'writers':this[_0x29baa2(0x2c0)]()};}['_collectWriterFacet'](){const _0x32279a=_0x31854b,_0x4a120c={};try{for(const [_0x433197,_0x3e3fca]of this[_0x32279a(0x2ba)][_0x32279a(0x90)]){try{const _0x478ab9=_0x3e3fca[_0x32279a(0xf6)]?.();if(!_0x478ab9)continue;if(!_0x478ab9[_0x32279a(0xd9)]&&!_0x478ab9[_0x32279a(0xf9)]&&!(_0x478ab9['parkedNow']??0x0)&&!_0x478ab9[_0x32279a(0x10c)])continue;_0x4a120c[_0x433197]={'depth':_0x478ab9[_0x32279a(0xd9)],'oldestPendingMs':_0x478ab9[_0x32279a(0xe5)],'committed':_0x478ab9[_0x32279a(0xf9)],'commitsPerSec':_0x478ab9[_0x32279a(0x266)],'commitP99Ms':_0x478ab9[_0x32279a(0x2a4)],'parkedNow':_0x478ab9[_0x32279a(0x2b8)]??0x0,'draining':!!_0x478ab9[_0x32279a(0x10c)]};}catch{}}}catch{}return Object[_0x32279a(0x130)](_0x4a120c)[_0x32279a(0x243)]?_0x4a120c:null;}[_0x31854b(0xa6)](){const _0x42acc0=_0x31854b,_0x31524c=process[_0x42acc0(0x29d)],_0x331173=Date[_0x42acc0(0x26f)](),_0x2051b9=_0x1cc6c8=>{const _0x3c4d9a=_0x42acc0;if(!_0x1cc6c8)return[];const _0xcd88c8=[];try{for(const {id:_0x42ddb6,entry:_0x36bd34}of _0x1cc6c8[_0x3c4d9a(0x114)]()){if(_0x36bd34?.[_0x3c4d9a(0x23a)]?.[_0x3c4d9a(0x29d)]!==_0x31524c)continue;const _0xc65a42=_0x36bd34[_0x3c4d9a(0x286)]??_0x36bd34[_0x3c4d9a(0xbe)]??0x0;if(_0xc65a42+(_0x36bd34[_0x3c4d9a(0x1a6)]??0x0)<_0x331173)continue;_0xcd88c8[_0x3c4d9a(0xb1)](_0x42ddb6);}}catch{}return _0xcd88c8;},_0x1861d7=_0x2051b9(this['_singletonLock']('compact')),_0x4005c7=_0x2051b9(this[_0x42acc0(0x21b)](_0x42acc0(0x29e)));if(!_0x1861d7[_0x42acc0(0x243)]&&!_0x4005c7[_0x42acc0(0x243)])return null;return{'compact':_0x1861d7,'replicate':_0x4005c7};}['_singletonLock'](_0x4f9640){const _0x5265fd=_0x31854b;if(!this[_0x5265fd(0x2ba)]?.['_rootDb'])return null;if(!this[_0x5265fd(0xdb)])this[_0x5265fd(0xdb)]=new Map();let _0x54b411=this['_singletonLocks'][_0x5265fd(0x2a6)](_0x4f9640);if(!_0x54b411)try{_0x54b411=new _0x5e0e06(this[_0x5265fd(0x2ba)][_0x5265fd(0x177)],{'namespace':_0x4f9640}),this[_0x5265fd(0xdb)][_0x5265fd(0x27e)](_0x4f9640,_0x54b411);}catch{return null;}return _0x54b411;}[_0x31854b(0x16d)](){const _0x2ab542=_0x31854b,_0x281efb=[];try{for(const [_0x152cd2,_0x29472f]of this['okdb'][_0x2ab542(0x90)]){if(_0x152cd2[_0x2ab542(0x2bb)]('~'))continue;for(const _0x4597d0 of _0x29472f[_0x2ab542(0xfc)]['tierList']())_0x281efb[_0x2ab542(0xb1)]({..._0x4597d0,'env':_0x152cd2});}}catch{}return{'participate':this['okdb'][_0x2ab542(0x1b4)]?.[_0x2ab542(0xfe)]??![],'processors':_0x281efb};}[_0x31854b(0x28f)](){const _0x48d7c8=_0x31854b;if(this['_desired'])return!![];const _0x3aeda3=this[_0x48d7c8(0x2ba)][_0x48d7c8(0x177)];if(!_0x3aeda3)return![];return this[_0x48d7c8(0x1eb)]=_0x3aeda3[_0x48d7c8(0x149)](_0xd36915,{'dupSort':![]}),this[_0x48d7c8(0x178)]=_0x3aeda3['openDB'](_0x404721,{'dupSort':![]}),!![];}async[_0x31854b(0x186)](){const _0x299d32=_0x31854b;if(!this[_0x299d32(0x28f)]())return;const _0x2f0614=_0x299d32(0x196),_0x1996b2=0x1,_0x16105b=this[_0x299d32(0x1eb)]['get'](_0x2f0614)??0x0;if(_0x16105b>=_0x1996b2)return;const _0x228dfd=_0x65824d=>{const _0x2e714a=_0x299d32;if(_0x65824d==='worker')return _0x2e714a(0x21c);if(_0x65824d===_0x2e714a(0x141))return _0x2e714a(0x103);return _0x65824d;};await this['okdb'][_0x299d32(0x1e0)]['_writer'][_0x299d32(0x101)](()=>{const _0xe80766=_0x299d32;for(const _0x26f466 of['procmode/','procmodeack/']){for(const {key:_0x410e4b,value:_0xe5f3bf}of this[_0xe80766(0x1eb)][_0xe80766(0x1c3)]({'start':_0x26f466,'end':_0x26f466+'\xff'})){if(typeof _0x410e4b!=='string'||!_0x410e4b[_0xe80766(0x2bb)](_0x26f466))break;const _0x19586d=_0x228dfd(_0xe5f3bf[_0xe80766(0xd4)]);if(_0x19586d!==_0xe5f3bf['mode'])this[_0xe80766(0x1eb)][_0xe80766(0x91)](_0x410e4b,{..._0xe5f3bf,'mode':_0x19586d});}}this['_desired'][_0xe80766(0x91)](_0x2f0614,_0x1996b2);});}[_0x31854b(0x14b)](){const _0x4d7f20=_0x31854b;return!!this[_0x4d7f20(0x1eb)];}[_0x31854b(0xec)](_0x4c6122,_0x203f83){const _0x545b7b=_0x31854b;if(!this[_0x545b7b(0x28f)]())return null;const _0x373ae4=_0x4c6122+'/'+_0x203f83;return this[_0x545b7b(0x150)](),this['_desiredOverlay']['get'](_0x373ae4)??this[_0x545b7b(0x1eb)][_0x545b7b(0x2a6)](_0x373ae4)??null;}['_refreshDesiredSnapshot'](){const _0x46fe9a=_0x31854b;if(!_0x4d57ac)return;try{this[_0x46fe9a(0x2ba)]['_systemEnv']?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x31854b(0x247)](_0x5d223d,_0x5911ac,_0x246586){const _0x161c47=_0x31854b;if(!this[_0x161c47(0x28f)]())return null;const _0x2d1111=_0x5d223d+'/'+_0x5911ac;this[_0x161c47(0x150)]();const _0x78a0c4=this[_0x161c47(0x25d)][_0x161c47(0x2a6)](_0x2d1111)??this[_0x161c47(0x1eb)][_0x161c47(0x2a6)](_0x2d1111)??{'version':0x0},_0x411d81=(_0x78a0c4[_0x161c47(0x279)]||0x0)+0x1,_0x5814ef={..._0x78a0c4,..._0x246586,'version':_0x411d81,'updatedAt':Date[_0x161c47(0x26f)]()};this[_0x161c47(0x25d)]['set'](_0x2d1111,_0x5814ef);try{await this['okdb'][_0x161c47(0x1e0)]['_writer'][_0x161c47(0x101)](()=>{const _0x52739a=_0x161c47;this[_0x52739a(0x1eb)][_0x52739a(0x91)](_0x2d1111,_0x5814ef);});}finally{if(this[_0x161c47(0x25d)][_0x161c47(0x2a6)](_0x2d1111)===_0x5814ef)this[_0x161c47(0x25d)][_0x161c47(0x264)](_0x2d1111);}return _0x411d81;}[_0x31854b(0x126)](_0x579b91){const _0x7ebcf2=_0x31854b;if(!this[_0x7ebcf2(0x28f)]())return[];this[_0x7ebcf2(0x150)]();const _0x289d46=_0x579b91+'/',_0x5152a0=[];for(const {key:_0x22bd2b,value:_0x1f3077}of this[_0x7ebcf2(0x1eb)][_0x7ebcf2(0x1c3)]({'start':_0x289d46,'end':_0x289d46+'\xff'})){if(typeof _0x22bd2b!==_0x7ebcf2(0x236)||!_0x22bd2b['startsWith'](_0x289d46))break;_0x5152a0[_0x7ebcf2(0xb1)]({'key':_0x22bd2b[_0x7ebcf2(0x1af)](_0x289d46['length']),'value':_0x1f3077});}return _0x5152a0;}[_0x31854b(0x161)](_0x138092){const _0x4ceb6f=_0x31854b;if(!this[_0x4ceb6f(0x28f)]())return null;return this[_0x4ceb6f(0x178)]['get'](_0x138092)??null;}async[_0x31854b(0x1d7)](_0x271c94,_0x39bdd8,_0x5e9162={}){const _0xd98464=_0x31854b;if(!this[_0xd98464(0x28f)]())return null;let _0x2b8f4b;return await this[_0xd98464(0x2ba)][_0xd98464(0x1e0)]['_writer'][_0xd98464(0x101)](()=>{const _0x11e6a3=_0xd98464,_0x1fa739=this[_0x11e6a3(0x178)][_0x11e6a3(0x2a6)](_0x271c94)||{'epoch':0x0};_0x2b8f4b=(_0x1fa739['epoch']||0x0)+0x1,this['_cmd'][_0x11e6a3(0x91)](_0x271c94,{..._0x1fa739,..._0x5e9162,'cmd':_0x39bdd8,'epoch':_0x2b8f4b,'updatedAt':Date['now']()});}),_0x2b8f4b;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x4b6f2f,'nodeKey':_0x5bb0f0,'logicalKey':_0x53f064,'slotKey':_0x10a4ca,'PROCESS_ENV':_0x4181c5,'NODE_TYPE':_0x5f0107},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x5988e7=_0x1383d2;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x5d4835=require$$0$4,{EVENTS:_0x312803,CHANGE_ACTIONS:_0xfb8d4c}=requireOkdbEnums(),{LOOP:_0x2dc572}=requireOkdbLoopMonitor(),_0x3ef022=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x4a19eb=0x5,_0x2a5675=0x2710;class _0x1b64a2 extends _0x5d4835{constructor(_0x287021,_0x51e35a={}){const _0x210495=_0x2fe0;super(),this[_0x210495(0x2ba)]=_0x287021,this['_quantum']=_0x51e35a[_0x210495(0xc2)]??_0x3ef022,this[_0x210495(0xd7)]=_0x51e35a['flushDebounce']??_0x4a19eb,this[_0x210495(0x293)]=_0x51e35a[_0x210495(0x12d)]??_0x2a5675,this['_started']=![],this[_0x210495(0x211)]=new Map(),this[_0x210495(0xe2)]=new Map(),this['_pending']=new Map(),this['_flushTimer']=null,this[_0x210495(0x20a)]=![],this[_0x210495(0x1c2)]=new Set(),this[_0x210495(0x1cb)]=new Set(),this['_onItem']=_0x51695b=>this['_handleInProcess'](_0x51695b),this[_0x210495(0x1f6)]=_0x37f863=>this[_0x210495(0xba)](_0x37f863),this[_0x210495(0x289)]=_0x24493d=>this[_0x210495(0x2c3)](_0x24493d),this[_0x210495(0xd5)]=()=>this[_0x210495(0x288)]();}[_0x5988e7(0xdf)](){const _0x50347d=_0x5988e7;if(this[_0x50347d(0x261)])return;this[_0x50347d(0x261)]=!![];for(const [_0x444f23,_0x6709b9]of this['okdb'][_0x50347d(0x90)]){if(_0x444f23[_0x50347d(0x2bb)]('~'))continue;try{_0x6709b9['_enableChangelog']();}catch{}}for(const [_0x367d24,_0x19e31c]of this[_0x50347d(0x2ba)][_0x50347d(0x90)]){if(_0x367d24[_0x50347d(0x2bb)]('~'))continue;try{this[_0x50347d(0xe2)][_0x50347d(0x27e)](_0x367d24,_0x19e31c[_0x50347d(0x1db)]()||0x0);}catch{}}const {events:_0x2d808f}=this[_0x50347d(0x2ba)];_0x2d808f['on'](_0x312803['ITEM_PENDING'],this['_onPending']),_0x2d808f['on'](_0x312803[_0x50347d(0x284)],this[_0x50347d(0x18d)]),_0x2d808f['on'](_0x312803[_0x50347d(0x148)],this[_0x50347d(0x18d)]),_0x2d808f['on'](_0x312803[_0x50347d(0x1f1)],this[_0x50347d(0x18d)]),_0x2d808f['on'](_0x312803[_0x50347d(0x136)],this['_onPoke']),_0x2d808f[_0x50347d(0x1a0)](_0x312803[_0x50347d(0xf0)],this['_onStop']);}[_0x5988e7(0x288)](){const _0x3bc802=_0x5988e7;if(!this['_started'])return;this[_0x3bc802(0x261)]=![];const {events:_0x58fc1c}=this[_0x3bc802(0x2ba)];_0x58fc1c[_0x3bc802(0x20f)](_0x312803['ITEM_PENDING'],this['_onPending']),_0x58fc1c[_0x3bc802(0x20f)](_0x312803[_0x3bc802(0x284)],this['_onItem']),_0x58fc1c[_0x3bc802(0x20f)](_0x312803[_0x3bc802(0x148)],this[_0x3bc802(0x18d)]),_0x58fc1c['off'](_0x312803[_0x3bc802(0x1f1)],this['_onItem']),_0x58fc1c[_0x3bc802(0x20f)](_0x312803['SYSTEM_POKE'],this['_onPoke']);try{_0x58fc1c[_0x3bc802(0x20f)](_0x312803['SYSTEM_STOPPED'],this['_onStop']);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this['_pending']['clear'](),this[_0x3bc802(0x211)][_0x3bc802(0x2b7)](),this[_0x3bc802(0xe2)][_0x3bc802(0x2b7)](),this[_0x3bc802(0x1c2)][_0x3bc802(0x2b7)](),this['_pendingLocal'][_0x3bc802(0x2b7)]();}[_0x5988e7(0x2c1)](_0x1e77fd,_0x34579d,_0x5ce680,_0x4eb301){return _0x1e77fd+'\x00'+_0x34579d+'\x00'+_0x5ce680+'\x00'+_0x4eb301;}[_0x5988e7(0x254)](_0x11c739,_0x2f340d,_0xa865d6,_0x17cbb1){const _0x547b84=_0x5988e7,_0x594ea3=this[_0x547b84(0x2c1)](_0x11c739,_0x2f340d,_0xa865d6,_0x17cbb1);if(this['_seen']['has'](_0x594ea3))return![];this[_0x547b84(0x1c2)]['add'](_0x594ea3);if(this[_0x547b84(0x1c2)]['size']>this[_0x547b84(0x293)]){const _0x327cc=this[_0x547b84(0x1c2)][_0x547b84(0xab)]()['next']()[_0x547b84(0x221)];this[_0x547b84(0x1c2)][_0x547b84(0x264)](_0x327cc);}return!![];}[_0x5988e7(0xba)](_0x41fc67){const _0x359375=_0x5988e7;if(!this[_0x359375(0x261)]||!_0x41fc67)return;const {env:_0x1541e9,type:_0x4bed29,key:_0x1043d7,clock:_0x34417b}=_0x41fc67;if(_0x1541e9==null||_0x4bed29==null||_0x1043d7==null)return;if(typeof _0x1541e9===_0x359375(0x236)&&_0x1541e9[_0x359375(0x2bb)]('~'))return;if(typeof _0x4bed29===_0x359375(0x236)&&_0x4bed29[_0x359375(0x2bb)]('~'))return;this[_0x359375(0x1cb)][_0x359375(0x1fb)](this[_0x359375(0x2c1)](_0x1541e9,_0x4bed29,_0x1043d7,_0x34417b)),this[_0x359375(0x1cb)][_0x359375(0x1a8)]>this[_0x359375(0x293)]&&this[_0x359375(0x1cb)]['delete'](this[_0x359375(0x1cb)][_0x359375(0xab)]()[_0x359375(0x241)]()[_0x359375(0x221)]);}[_0x5988e7(0x16a)](_0x12f547){const _0x54aa94=_0x5988e7;if(!this[_0x54aa94(0x261)]||!_0x12f547)return;const {env:_0x5eb0a1,type:_0x1740ae,key:_0x52e9e1,clock:_0xd27cb,origin:_0xa309c7,action:_0x320e28,newValue:_0x2a2d69,oldValue:_0x5267d0}=_0x12f547;if(_0x5eb0a1==null||_0x1740ae==null||_0x52e9e1==null)return;if(typeof _0x5eb0a1==='string'&&_0x5eb0a1['startsWith']('~'))return;if(typeof _0x1740ae===_0x54aa94(0x236)&&_0x1740ae['startsWith']('~'))return;this[_0x54aa94(0x1cb)]['delete'](this[_0x54aa94(0x2c1)](_0x5eb0a1,_0x1740ae,_0x52e9e1,_0xd27cb));if(!this[_0x54aa94(0x254)](_0x5eb0a1,_0x1740ae,_0x52e9e1,_0xd27cb))return;const _0x5a1759=_0x320e28===_0xfb8d4c['REMOVE']?_0x54aa94(0x290):_0x54aa94(0x91);this[_0x54aa94(0x1ac)](_0x54aa94(0x15e),{'env':_0x5eb0a1,'type':_0x1740ae,'key':_0x52e9e1,'op':_0x5a1759,'clock':_0xd27cb,'origin':_0xa309c7,'value':_0x5a1759===_0x54aa94(0x290)?null:_0x2a2d69,'prevValue':_0x5267d0});}[_0x5988e7(0x2c3)](_0x5b278f){const _0x5eff9a=_0x5988e7;if(!this[_0x5eff9a(0x261)])return;if(!_0x5b278f||typeof _0x5b278f[_0x5eff9a(0xed)]!==_0x5eff9a(0x236)||typeof _0x5b278f['type']!==_0x5eff9a(0x236))return;const {env:_0x32d9aa,type:_0x526e02}=_0x5b278f;if(_0x32d9aa[_0x5eff9a(0x2bb)]('~')||_0x526e02[_0x5eff9a(0x2bb)]('~'))return;this['_pending'][_0x5eff9a(0x27e)](_0x32d9aa+'\x00'+_0x526e02,{'env':_0x32d9aa,'type':_0x526e02}),this[_0x5eff9a(0x2ac)]();}[_0x5988e7(0x2ac)](){const _0xca1bf3=_0x5988e7;if(this[_0xca1bf3(0xc7)])return;const _0x5ce295=()=>{const _0x26c20b=_0xca1bf3;this[_0x26c20b(0xc7)]=null,this[_0x26c20b(0x223)]()[_0x26c20b(0x267)](()=>{});};this[_0xca1bf3(0xc7)]=setTimeout(_0x5ce295,this[_0xca1bf3(0xd7)]>0x0?this[_0xca1bf3(0xd7)]:0x0);}async[_0x5988e7(0x223)](){const _0xd87ef7=_0x5988e7;if(this[_0xd87ef7(0x20a)]){this[_0xd87ef7(0x2ac)]();return;}this[_0xd87ef7(0x20a)]=!![];try{const _0x4ead8e=[...this[_0xd87ef7(0xc6)][_0xd87ef7(0xab)]()];this['_pending']['clear']();let _0x1391a2=![];for(const {env:_0x1b36aa,type:_0x3bc81b}of _0x4ead8e){try{const _0x4fb8dd=await this[_0xd87ef7(0x285)](_0x1b36aa,_0x3bc81b);if(_0x4fb8dd)_0x1391a2=!![];}catch{this[_0xd87ef7(0xc6)][_0xd87ef7(0x27e)](_0x1b36aa+'\x00'+_0x3bc81b,{'env':_0x1b36aa,'type':_0x3bc81b}),_0x1391a2=!![];}}if(_0x1391a2||this[_0xd87ef7(0xc6)][_0xd87ef7(0x1a8)]>0x0)this[_0xd87ef7(0x2ac)]();}finally{this[_0xd87ef7(0x20a)]=![];}}async[_0x5988e7(0x285)](_0x3d91a0,_0x58bd8e){const _0x491698=_0x5988e7,_0x8b8ef6=await this['okdb'][_0x491698(0x117)](_0x3d91a0),_0x3a2a96=_0x3d91a0+'\x00'+_0x58bd8e;!this['_cursors'][_0x491698(0x146)](_0x3a2a96)&&(!this[_0x491698(0xe2)][_0x491698(0x146)](_0x3d91a0)&&(_0x8b8ef6[_0x491698(0xd6)](),this[_0x491698(0xe2)][_0x491698(0x27e)](_0x3d91a0,_0x8b8ef6[_0x491698(0x1db)]()||0x0)),this[_0x491698(0x211)][_0x491698(0x27e)](_0x3a2a96,this[_0x491698(0xe2)]['get'](_0x3d91a0)));const _0x4b315b=this[_0x491698(0x211)][_0x491698(0x2a6)](_0x3a2a96),_0x554cb6=_0x8b8ef6['getClock'](_0x58bd8e)||0x0;if(_0x554cb6<=_0x4b315b)return![];const _0x372f3d=_0x4b315b+this[_0x491698(0x1d9)],_0x5b5bf3=Math['min'](_0x554cb6,_0x372f3d),_0x1be66d=_0x2dc572[_0x491698(0x1ce)]?_0x2dc572[_0x491698(0x26f)]():0x0,_0x5ada13=Array['from'](_0x8b8ef6[_0x491698(0x1a4)](_0x58bd8e,_0x4b315b+0x1,_0x5b5bf3));let _0x1ac508=_0x4b315b;for(const _0x2c02be of _0x5ada13){const {clock:_0x1d2f36,key:_0x180e85,action:_0x33d8e8,origin:_0x1b6b55}=_0x2c02be;if(_0x1d2f36>_0x1ac508)_0x1ac508=_0x1d2f36;if(_0x180e85==null)continue;if(this[_0x491698(0x1cb)][_0x491698(0x146)](this[_0x491698(0x2c1)](_0x3d91a0,_0x58bd8e,_0x180e85,_0x1d2f36)))continue;if(!this[_0x491698(0x254)](_0x3d91a0,_0x58bd8e,_0x180e85,_0x1d2f36))continue;let _0x5ee792,_0x2a8a36;if(_0x33d8e8===_0xfb8d4c[_0x491698(0x2a1)])_0x5ee792=_0x491698(0x290),_0x2a8a36=null;else{const _0xa10cb6=_0x8b8ef6['get'](_0x58bd8e,_0x180e85);_0xa10cb6==null?(_0x5ee792=_0x491698(0x290),_0x2a8a36=null):(_0x5ee792='put',_0x2a8a36=_0xa10cb6);}this['emit']('change',{'env':_0x3d91a0,'type':_0x58bd8e,'key':_0x180e85,'op':_0x5ee792,'clock':_0x1d2f36,'origin':_0x1b6b55,'value':_0x2a8a36});}if(_0x2dc572['enabled'])_0x2dc572['note'](_0x491698(0x2b2)+_0x3d91a0+':'+_0x58bd8e,_0x2dc572[_0x491698(0x26f)]()-_0x1be66d,'n='+_0x5ada13[_0x491698(0x243)]);return this[_0x491698(0x211)]['set'](_0x3a2a96,Math[_0x491698(0x1c9)](_0x1ac508,_0x5b5bf3)),_0x8b8ef6['getClock'](_0x58bd8e)>_0x5b5bf3;}[_0x5988e7(0x292)](){const _0x3a5643=_0x5988e7;return{'started':this[_0x3a5643(0x261)],'quantum':this[_0x3a5643(0x1d9)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x3a5643(0x281)]([...this[_0x3a5643(0x211)][_0x3a5643(0x20c)]()]['map'](([_0x4a48e6,_0x53eaa5])=>[_0x4a48e6[_0x3a5643(0xfb)]('\x00',':'),_0x53eaa5])),'pending':this['_pending'][_0x3a5643(0x1a8)],'seen':this['_seen'][_0x3a5643(0x1a8)]};}}return _0x1b64a2[_0x5988e7(0x205)]=_0x3ef022,okdbChangefeed={'OKDBChangefeed':_0x1b64a2},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3300c4=_0x1383d2;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x303525=require$$1$1,_0x48d93e=require$$1,{EVENTS:_0x375187}=requireOkdbEnums(),_0x59dbab=require$$0$3,{slotKey:_0x401d35}=requireOkdbProcessRegistry(),_0x544e97=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x51ea7c=0xfa0,_0x3a6900=0x5,_0x486cf4=0x2710,_0x32feb6=0xbb8,_0x3e6003=0x7d0,_0x5646ec=_0x3300c4(0x9a),_0x15a485=_0x3300c4(0x1a5),_0x3ff8cd='log',_0x518df2=_0x3300c4(0x9f),_0x2d6394=[_0x375187[_0x3300c4(0x2ab)],_0x375187[_0x3300c4(0x132)],_0x375187[_0x3300c4(0x10b)],_0x375187[_0x3300c4(0x108)],_0x375187['INDEX_PROGRESS'],_0x375187['INDEX_READY'],_0x375187[_0x3300c4(0x165)],_0x375187[_0x3300c4(0x1d1)],_0x3300c4(0x277),_0x3300c4(0x1c1),_0x3300c4(0x23c),_0x3300c4(0x1ae),_0x3300c4(0x172),_0x3300c4(0x110)],_0x1d46f0=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x292a34=0x64;function _0x4d9dad(_0x36d010){const _0x530efc=_0x3300c4;if(!_0x36d010)return _0x530efc(0x8a);const _0x485f44=(_0x36d010[_0x530efc(0x1b4)]||[])['map'](_0x5a8d53=>[_0x5a8d53['env'],_0x5a8d53['id'],_0x5a8d53[_0x530efc(0xd4)],_0x5a8d53['state'],!!_0x5a8d53[_0x530efc(0x269)],!!_0x5a8d53[_0x530efc(0x214)],!!_0x5a8d53[_0x530efc(0x2c4)],_0x5a8d53[_0x530efc(0x275)]?.[_0x530efc(0x29d)]??null,_0x5a8d53[_0x530efc(0x250)]?String(_0x5a8d53['error']?.[_0x530efc(0x1b3)]??_0x5a8d53[_0x530efc(0x250)]):null]);return JSON['stringify']([!!_0x36d010[_0x530efc(0x268)],_0x485f44]);}function _0x2d53fb({workers:_0x47a331,makeOkdb:_0x54ea77,port:_0x3d60fe,primaryOkdb:_0x4eb198,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x5ee63e=_0x3300c4;if(_0x303525['isPrimary'])return childEntry&&_0x303525[_0x5ee63e(0x11d)]({'exec':_0x48d93e[_0x5ee63e(0x29f)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x54b2af=_0x5ee63e,_0x24d809=[];for(let _0x3d43c6=0x0;_0x3d43c6<process[_0x54b2af(0x2a0)][_0x54b2af(0x243)];_0x3d43c6++){const _0x5810ad=process[_0x54b2af(0x2a0)][_0x3d43c6];if(_0x5810ad[_0x54b2af(0x2bb)](_0x54b2af(0x151))||_0x5810ad['startsWith']('--watch')||_0x5810ad[_0x54b2af(0x2bb)](_0x54b2af(0x1f0)))continue;if(_0x5810ad==='-e'||_0x5810ad===_0x54b2af(0xc3)||_0x5810ad==='-p'||_0x5810ad===_0x54b2af(0x15f)){_0x3d43c6++;continue;}_0x24d809[_0x54b2af(0xb1)](_0x5810ad);}return _0x24d809;})())}),_0x15fc5b({'workers':_0x47a331,'port':_0x3d60fe,'primaryOkdb':_0x4eb198,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x3d60fe});return _0x320482({'makeOkdb':_0x54ea77,'port':_0x3d60fe});}function _0x15fc5b({workers:_0x1d99a3,port:_0x56d99f,primaryOkdb:_0x1374e8,workerEnv:_0x4f800e,workerRole:_0x46bc6f,listenAddr:_0x155d63}){const _0x39ff7b=_0x3300c4,_0x5dbdd3=new Map(),_0x2568d5=new Map();let _0x18f01f=![];const _0x49a6e8=_0x18cec8=>_0x18cec8?.['__okdbSlot'],_0x25980d=_0x2ddfbd=>{const _0x3276cc=_0x2fe0,_0x2098b4=_0x303525[_0x3276cc(0x120)]({...process.env,..._0x4f800e||{},'OKDB_CLUSTER_SLOT':String(_0x2ddfbd)});return _0x2098b4['__okdbSlot']=_0x2ddfbd,_0x5dbdd3[_0x3276cc(0x27e)](_0x2098b4['process'][_0x3276cc(0x29d)],{'worker':_0x2098b4,'startedAt':Date[_0x3276cc(0x26f)](),'slot':_0x2ddfbd}),_0x2098b4['on'](_0x3276cc(0x250),_0x484d57=>{const _0x4c1253=_0x3276cc;console[_0x4c1253(0x1fd)](_0x4c1253(0x2bf)+_0x2098b4[_0x4c1253(0x262)][_0x4c1253(0x29d)]+_0x4c1253(0x259)+(_0x484d57?.[_0x4c1253(0x1b3)]??_0x484d57));}),_0x2098b4['on'](_0x3276cc(0x232),()=>_0x375f82()),_0x2098b4;},_0x556783=_0x15a76f=>{const _0x16bb9b=_0x2fe0;for(const {worker:_0x204497}of _0x5dbdd3[_0x16bb9b(0xab)]()){if(_0x204497[_0x16bb9b(0x18b)]()||!_0x204497[_0x16bb9b(0x11c)]())continue;try{_0x204497[_0x16bb9b(0x174)](_0x15a76f);}catch{}}};_0x1374e8?.['_activateProcesses']?.({'kind':'primary','listenAddr':_0x155d63})['catch'](()=>{}),_0x1374e8?.[_0x39ff7b(0x140)]?.['setOwnMeta']?.({'workersConfigured':_0x1d99a3});const _0x12a7ad={'engines':!![],'processors':!![],'compaction':!![],..._0x46bc6f,'http':!![]},_0x375f82=()=>{const _0x2e8535=_0x39ff7b,_0x3264f6=_0x1374e8?.[_0x2e8535(0x140)];if(!_0x3264f6||!_0x3264f6[_0x2e8535(0x128)])return;const _0x3656dd=_0x3264f6['selfKey'];for(const {worker:_0x351d82,startedAt:_0x27e729,slot:_0x527011,stats:_0x4ad251,processing:_0x4f495a}of _0x5dbdd3[_0x2e8535(0xab)]()){if(_0x351d82[_0x2e8535(0x18b)]())continue;const _0x38b47f=_0x3264f6[_0x2e8535(0x14b)]?.()&&_0x3264f6[_0x2e8535(0xec)](_0x2e8535(0xb9),_0x4532ae(_0x527011))?.[_0x2e8535(0x252)]===!![];_0x3264f6[_0x2e8535(0x134)]({'pid':_0x351d82[_0x2e8535(0x262)][_0x2e8535(0x29d)],'startedAt':_0x27e729,'kind':_0x2e8535(0x242),'supervisorKey':_0x3656dd,'slot':_0x527011,'slotKey':_0x4532ae(_0x527011),'role':_0x12a7ad,'listenAddr':_0x155d63,'lifecycle':_0x38b47f?_0x2e8535(0xa7):_0x2e8535(0x21e),'processing':_0x4f495a??null,'stats':_0x4ad251??null})['catch'](()=>{});}},_0x4532ae=_0x255f68=>_0x401d35(_0x39ff7b(0x1d2)+_0x56d99f,_0x255f68),_0xb176fb=_0x238537=>{const _0x3e7be6=_0x39ff7b,_0x1ab15c=_0x1374e8?.[_0x3e7be6(0x140)];if(!_0x1ab15c?.[_0x3e7be6(0x14b)]?.())return![];return _0x1ab15c[_0x3e7be6(0xec)]('slot',_0x4532ae(_0x238537))?.[_0x3e7be6(0x252)]===!![];};for(let _0x2c1032=0x0;_0x2c1032<_0x1d99a3;_0x2c1032++){const _0x1f94ea=_0xb176fb(_0x2c1032);_0x2568d5[_0x39ff7b(0x27e)](_0x2c1032,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1f94ea,'respawnTimer':null}),_0x1f94ea?console[_0x39ff7b(0x1fd)]('[okdb-cluster]\x20slot='+_0x2c1032+_0x39ff7b(0x104)):_0x25980d(_0x2c1032);}const _0x389db2=()=>{const _0x536851=_0x39ff7b,_0x30bdca=_0x1374e8?.['processes'];if(!_0x30bdca?.['_isWriter']||!_0x30bdca['hasDesired']?.())return;for(const [_0x15bee4,_0x4b9923]of _0x2568d5[_0x536851(0x20c)]()){const _0x23a458=_0x30bdca['getDesired'](_0x536851(0xb9),_0x4532ae(_0x15bee4)),_0x2e357a=_0x23a458?.[_0x536851(0x252)]===!![],_0x58cdd8=_0x23a458?.[_0x536851(0x27f)]===!![];if(_0x2e357a&&!_0x4b9923[_0x536851(0x27d)]){_0x4b9923[_0x536851(0x27d)]=!![];_0x4b9923['respawnTimer']&&(clearTimeout(_0x4b9923[_0x536851(0x27b)]),_0x4b9923[_0x536851(0x27b)]=null);for(const {worker:_0x4c97eb}of _0x5dbdd3[_0x536851(0xab)]()){if(_0x49a6e8(_0x4c97eb)!==_0x15bee4||_0x4c97eb[_0x536851(0x18b)]())continue;try{if(_0x58cdd8)_0x4c97eb['process'][_0x536851(0x27f)](_0x536851(0x1f5));else _0x4c97eb['isConnected']()&&_0x4c97eb[_0x536851(0x1d6)]();}catch{}}console['log'](_0x536851(0x2b9)+(_0x58cdd8?_0x536851(0xef):_0x536851(0x28a))+'\x20worker\x20slot='+_0x15bee4+_0x536851(0xaf));}else{if(!_0x2e357a&&_0x4b9923['dead']&&_0x23a458){_0x4b9923[_0x536851(0x27d)]=![],_0x4b9923[_0x536851(0x1cc)]=[],_0x4b9923['consecutiveFailures']=0x0;const _0x31b770=[..._0x5dbdd3[_0x536851(0xab)]()][_0x536851(0x1b2)](({worker:_0x4cbf31})=>_0x49a6e8(_0x4cbf31)===_0x15bee4&&!_0x4cbf31[_0x536851(0x18b)]());!_0x31b770&&!_0x18f01f&&(_0x25980d(_0x15bee4),console['log']('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x15bee4));}}}},_0x377965=()=>{try{_0x389db2();}catch{}};_0x1374e8?.[_0x39ff7b(0x18c)]?.['on']?.(_0x375187[_0x39ff7b(0x249)],_0x377965);const _0x20fa91=[];if(_0x1374e8?.[_0x39ff7b(0x18c)]?.['on'])for(const _0x5e0bdd of _0x2d6394){const _0x5cb815=_0x4a1dc8=>{_0x556783({[_0x5646ec]:_0x15a485,'event':_0x5e0bdd,'data':_0x4a1dc8??{}});};_0x1374e8[_0x39ff7b(0x18c)]['on'](_0x5e0bdd,_0x5cb815),_0x20fa91[_0x39ff7b(0xb1)]({'event':_0x5e0bdd,'handler':_0x5cb815});}const _0x5e8ae6=setInterval(()=>{_0x389db2(),_0x375f82();},_0x1d46f0);_0x5e8ae6[_0x39ff7b(0x12e)]?.();const _0x42ab4b=(_0x3446e5,_0x372194)=>{const _0x37a7f4=_0x39ff7b;if(!_0x372194||typeof _0x372194!=='object'||_0x372194[_0x5646ec]!==_0x3ff8cd)return;if(!_0x1374e8?.['log']?.[_0x37a7f4(0xc0)])return;const _0x347481=_0x372194[_0x37a7f4(0x1e7)]||{};_0x1374e8[_0x37a7f4(0x1fd)]['ingest']({..._0x347481,'msg':'[w'+_0x372194[_0x37a7f4(0xb9)]+']\x20'+(_0x347481[_0x37a7f4(0x12f)]??''),'meta':{..._0x347481['meta']||{},'worker':_0x372194[_0x37a7f4(0xb9)],'workerPid':_0x372194[_0x37a7f4(0x29d)]}});};_0x303525['on']('message',_0x42ab4b);const _0x5aa13b=(_0x8028f7,_0x344ebc)=>{const _0x1b5438=_0x39ff7b;if(!_0x344ebc||typeof _0x344ebc!==_0x1b5438(0x273)||_0x344ebc[_0x5646ec]!==_0x518df2)return;const _0x1bfd37=_0x5dbdd3[_0x1b5438(0x2a6)](_0x8028f7[_0x1b5438(0x262)][_0x1b5438(0x29d)]);if(_0x1bfd37){_0x1bfd37['stats']={..._0x344ebc[_0x1b5438(0x9f)],'at':Date['now']()};if(_0x344ebc[_0x1b5438(0xcf)]!==undefined){const _0x26d243=_0x4d9dad(_0x344ebc[_0x1b5438(0xcf)]);_0x26d243!==_0x1bfd37[_0x1b5438(0x188)]&&(_0x1bfd37[_0x1b5438(0x188)]=_0x26d243,_0x38b12c()),_0x1bfd37[_0x1b5438(0xcf)]=_0x344ebc[_0x1b5438(0xcf)];}}};let _0x1a76b8=null;const _0x38b12c=()=>{if(_0x1a76b8||_0x18f01f)return;_0x1a76b8=setTimeout(()=>{_0x1a76b8=null;if(!_0x18f01f)_0x375f82();},_0x292a34),_0x1a76b8['unref']?.();};_0x303525['on'](_0x39ff7b(0x1b3),_0x5aa13b),_0x303525['on'](_0x39ff7b(0x19a),(_0x1e8bc2,_0x576e66,_0x4d4077)=>{const _0x2eb6cc=_0x39ff7b,_0x5c28ba=_0x1e8bc2[_0x2eb6cc(0x262)][_0x2eb6cc(0x29d)],_0x3e46db=_0x49a6e8(_0x1e8bc2),_0x39aaab=_0x5dbdd3['get'](_0x5c28ba);if(_0x39aaab&&_0x1374e8?.[_0x2eb6cc(0x140)])_0x1374e8['processes'][_0x2eb6cc(0x1df)](_0x5c28ba+':'+_0x39aaab['startedAt'])[_0x2eb6cc(0x267)](()=>{});_0x5dbdd3[_0x2eb6cc(0x264)](_0x5c28ba),console['log']('[okdb-cluster]\x20worker\x20pid='+_0x5c28ba+_0x2eb6cc(0x14a)+(_0x3e46db??'?')+_0x2eb6cc(0x1bb)+('(code='+_0x576e66+_0x2eb6cc(0xb6)+(_0x4d4077??_0x2eb6cc(0x25e))+_0x2eb6cc(0x1ec)+_0x5dbdd3['size']+'\x20worker(s)\x20remaining')),_0x375f82();if(_0x18f01f||_0x3e46db==null)return;const _0x2deae1=_0x2568d5[_0x2eb6cc(0x2a6)](_0x3e46db);if(!_0x2deae1||_0x2deae1[_0x2eb6cc(0x27d)])return;const _0x350dc4=Date['now']();_0x2deae1[_0x2eb6cc(0x1cc)]['push'](_0x350dc4),_0x2deae1[_0x2eb6cc(0x1cc)]=_0x2deae1['deaths'][_0x2eb6cc(0x125)](_0x1b1ae5=>_0x350dc4-_0x1b1ae5<=_0x486cf4);if(_0x2deae1[_0x2eb6cc(0x1cc)][_0x2eb6cc(0x243)]>=_0x3a6900){_0x2deae1[_0x2eb6cc(0x27d)]=!![],console[_0x2eb6cc(0x250)](_0x2eb6cc(0x272)+_0x3e46db+_0x2eb6cc(0x13d)+_0x2deae1[_0x2eb6cc(0x1cc)]['length']+_0x2eb6cc(0xb5)+(_0x486cf4+_0x2eb6cc(0xd3)+_0x5dbdd3[_0x2eb6cc(0x1a8)]+'\x20worker(s)\x20still\x20serving'));return;}_0x2deae1[_0x2eb6cc(0x25b)]++;const _0x23db14=Math[_0x2eb6cc(0x28e)](_0x51ea7c,_0x544e97*0x2**(_0x2deae1[_0x2eb6cc(0x25b)]-0x1));console[_0x2eb6cc(0x1fd)](_0x2eb6cc(0xde)+_0x3e46db+_0x2eb6cc(0xc9)+_0x23db14+_0x2eb6cc(0x99)+_0x2deae1[_0x2eb6cc(0x25b)]+')'),_0x2deae1[_0x2eb6cc(0x27b)]=setTimeout(()=>{const _0x3ed60f=_0x2eb6cc;_0x2deae1[_0x3ed60f(0x27b)]=null;if(_0x18f01f||_0x2deae1[_0x3ed60f(0x27d)])return;const _0x12443e=_0x25980d(_0x3e46db);_0x12443e[_0x3ed60f(0x1a0)]('listening',()=>{const _0xf4d123=_0x3ed60f;if(_0x2568d5[_0xf4d123(0x2a6)](_0x3e46db)===_0x2deae1)_0x2deae1[_0xf4d123(0x25b)]=0x0;});},_0x23db14),_0x2deae1[_0x2eb6cc(0x27b)][_0x2eb6cc(0x12e)]?.();});const _0x492dc0=[..._0x5dbdd3[_0x39ff7b(0x130)]()];console[_0x39ff7b(0x1fd)]('[okdb-cluster]\x20primary\x20pid='+process[_0x39ff7b(0x29d)]+_0x39ff7b(0x260)+_0x1d99a3+_0x39ff7b(0xac)+_0x56d99f+':\x20'+('['+_0x492dc0[_0x39ff7b(0x29f)](',\x20')+']'));const _0x4d78fe={'_isClusterController':!![],'port':_0x56d99f,'primaryOkdb':_0x1374e8??null,'status'(){const _0x243b74=_0x39ff7b;return{'clustered':!![],'primaryPid':process[_0x243b74(0x29d)],'port':_0x56d99f,'primaryRole':_0x1374e8?.[_0x243b74(0x2a5)]??null,'processorPid':null,'supervisorPid':process[_0x243b74(0x29d)],'workers':[..._0x5dbdd3[_0x243b74(0xab)]()]['map'](({worker:_0x19d70b})=>({'pid':_0x19d70b[_0x243b74(0x262)]['pid'],'id':_0x19d70b['id'],'dead':_0x19d70b[_0x243b74(0x18b)]()}))};},async 'close'(){const _0x13ad33=_0x39ff7b;_0x18f01f=!![];for(const _0x4deb1f of _0x2568d5[_0x13ad33(0xab)]()){_0x4deb1f[_0x13ad33(0x27d)]=!![],_0x4deb1f[_0x13ad33(0x27b)]&&(clearTimeout(_0x4deb1f[_0x13ad33(0x27b)]),_0x4deb1f['respawnTimer']=null);}clearInterval(_0x5e8ae6);_0x1a76b8&&(clearTimeout(_0x1a76b8),_0x1a76b8=null);_0x303525[_0x13ad33(0x20f)]('message',_0x42ab4b),_0x303525['off'](_0x13ad33(0x1b3),_0x5aa13b),_0x1374e8?.[_0x13ad33(0x18c)]?.[_0x13ad33(0x20f)]?.(_0x375187[_0x13ad33(0x249)],_0x377965);if(_0x1374e8?.[_0x13ad33(0x18c)]?.[_0x13ad33(0x20f)])for(const {event:_0x2c40d6,handler:_0x1e3a3a}of _0x20fa91){try{_0x1374e8[_0x13ad33(0x18c)][_0x13ad33(0x20f)](_0x2c40d6,_0x1e3a3a);}catch{}}_0x20fa91[_0x13ad33(0x243)]=0x0;const _0x54d4cf=[..._0x5dbdd3[_0x13ad33(0xab)]()][_0x13ad33(0x2a7)](({worker:_0x352402})=>_0x352402);if(_0x54d4cf[_0x13ad33(0x243)]===0x0)return;await Promise[_0x13ad33(0xe3)](_0x54d4cf[_0x13ad33(0x2a7)](_0x1dc333=>new Promise(_0xc4220e=>{const _0xb61f75=_0x13ad33;if(_0x1dc333[_0xb61f75(0x18b)]()){_0xc4220e();return;}let _0x21b08d=![];const _0x52dc02=()=>{if(_0x21b08d)return;_0x21b08d=!![];if(_0x2e0182)clearTimeout(_0x2e0182);_0xc4220e();};_0x1dc333[_0xb61f75(0x1a0)]('exit',_0x52dc02);const _0x2e0182=setTimeout(()=>{const _0x460ec9=_0xb61f75;try{_0x1dc333[_0x460ec9(0x262)][_0x460ec9(0x27f)]();}catch{}},_0x32feb6+0x1f4);_0x2e0182[_0xb61f75(0x12e)]?.();try{_0x1dc333['disconnect']();}catch{try{_0x1dc333[_0xb61f75(0x262)][_0xb61f75(0x27f)]();}catch{}}})));}};return _0x4d78fe;}async function _0x320482({makeOkdb:_0xe63f9,port:_0x1367bb}){const _0x26d252=_0x3300c4,_0x5989d1=await _0xe63f9();return _0x1beb5b(_0x5989d1),_0x5989d1[_0x26d252(0x265)][_0x26d252(0x118)](_0x1367bb);}function _0x1beb5b(_0x4a940a){const _0x4e0542=_0x3300c4;if(!_0x4a940a||_0x4a940a['_clusterWorkerAttached'])return;_0x4a940a[_0x4e0542(0x109)]=!![];try{const {OKDBChangefeed:_0x2bed63}=requireOkdbChangefeed(),_0x37af58=_0x4a940a['_adminRelay'];if(_0x37af58&&typeof _0x37af58[_0x4e0542(0x100)]===_0x4e0542(0xd1)){const _0x3b22be=new _0x2bed63(_0x4a940a);_0x3b22be[_0x4e0542(0xdf)](),_0x37af58[_0x4e0542(0x100)](_0x3b22be),_0x4a940a[_0x4e0542(0x203)]=_0x3b22be;}}catch(_0x4bf98a){_0x4a940a[_0x4e0542(0x1fd)]?.['warn']?.(_0x4e0542(0x229)+(_0x4bf98a?.[_0x4e0542(0x1b3)]??_0x4bf98a),{'feature':_0x4e0542(0x87)});}const _0x4ad3f2=_0x270629=>{const _0x5482b0=_0x4e0542;if(!_0x270629||typeof _0x270629!==_0x5482b0(0x273)||_0x270629[_0x5646ec]==null)return;if(_0x270629[_0x5646ec]===_0x15a485)try{_0x4a940a[_0x5482b0(0x282)]?.[_0x5482b0(0x9c)]?.(_0x270629['event'],_0x270629[_0x5482b0(0x29a)]);}catch{}};process['on'](_0x4e0542(0x1b3),_0x4ad3f2),_0x4a940a[_0x4e0542(0x216)]=_0x4ad3f2;{let _0x14d2a9=process[_0x4e0542(0xbf)](),_0x75035c=Date['now']();const _0x50f851=()=>{const _0x55655d=_0x4e0542;if(typeof process[_0x55655d(0x174)]!=='function'||!process[_0x55655d(0xb7)])return;const _0x47d054=Date[_0x55655d(0x26f)](),_0x49c70d=process[_0x55655d(0xbf)](),_0x2b1936=(_0x47d054-_0x75035c)*0x3e8,_0x12190e=_0x49c70d[_0x55655d(0x224)]-_0x14d2a9[_0x55655d(0x224)]+(_0x49c70d[_0x55655d(0x83)]-_0x14d2a9['system']),_0x31df54=_0x2b1936>0x0?Math[_0x55655d(0x28e)](0x64,Math[_0x55655d(0x9e)](_0x12190e/(_0x2b1936*(_0x59dbab[_0x55655d(0x8b)]()['length']||0x1))*0x64)):0x0;_0x14d2a9=_0x49c70d,_0x75035c=_0x47d054;const _0x446cfe=process[_0x55655d(0x1a7)]();let _0x25765a=null;try{_0x25765a=_0x4a940a[_0x55655d(0x2a5)]?.[_0x55655d(0x1b4)]?_0x4a940a[_0x55655d(0x140)]?.[_0x55655d(0x16d)]?.()??null:null;}catch{}try{process[_0x55655d(0x174)]({[_0x5646ec]:_0x518df2,'stats':{'rss':_0x446cfe[_0x55655d(0x257)],'heapUsed':_0x446cfe[_0x55655d(0x18e)],'heapTotal':_0x446cfe[_0x55655d(0x27a)],'external':_0x446cfe[_0x55655d(0x131)],'cpuPct':_0x31df54,'cpuWindowMs':Math[_0x55655d(0x9e)](_0x2b1936/0x3e8)||null},'processing':_0x25765a});}catch{}},_0x3e4db9=Math[_0x4e0542(0x1c9)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x246659=setInterval(_0x50f851,_0x3e4db9);_0x246659[_0x4e0542(0x12e)]?.(),_0x50f851();for(const _0x369d6b of[_0x4e0542(0x1ae),_0x4e0542(0x172)]){_0x4a940a[_0x4e0542(0x18c)]?.['on']?.(_0x369d6b,()=>{try{_0x50f851();}catch{}});}}let _0x16dbfc=![];const _0x39ce67=async _0x5c81a0=>{const _0x4f369f=_0x4e0542;if(_0x16dbfc)return;_0x16dbfc=!![];const _0x2893dd=setTimeout(()=>process[_0x4f369f(0x19a)](_0x5c81a0),_0x32feb6);_0x2893dd[_0x4f369f(0x12e)]?.();try{await _0x4a940a[_0x4f369f(0xf8)]?.();}catch{}process[_0x4f369f(0x19a)](_0x5c81a0);};process['on'](_0x4e0542(0x1d6),()=>_0x39ce67(0x0));if(process[_0x4e0542(0x174)]&&!process[_0x4e0542(0xb7)])_0x39ce67(0x0);if(process['platform']!==_0x4e0542(0x122)){const _0x1c4c75=setInterval(()=>{if(process['ppid']===0x1)_0x39ce67(0x0);},_0x3e6003);_0x1c4c75[_0x4e0542(0x12e)]?.(),_0x4a940a['_clusterOrphanWatch']=_0x1c4c75;}}return okdbCluster={'runClustered':_0x2d53fb,'attachWorkerCluster':_0x1beb5b},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x2f2539=require$$0$5,{attachWorkerCluster:_0x46b847}=requireOkdbCluster();async function _0x210b1f(){const _0x2ddb0e=_0x2fe0,_0x429dbb=process.env.OKDB_HTTP_CHILD;if(!_0x429dbb)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0x3d04c6,port:_0x212127,options:options={},logLevel:logLevel=_0x2ddb0e(0x88)}=JSON[_0x2ddb0e(0xf1)](_0x429dbb);if(!_0x3d04c6||!_0x212127)throw new Error(_0x2ddb0e(0x22b));const _0x482ab7=new _0x2f2539(_0x3d04c6,{...options,'engines':![],'processors':![],'compaction':![]});_0x482ab7[_0x2ddb0e(0x1fd)][_0x2ddb0e(0x190)]?.();const _0x56f506=process.env.OKDB_CLUSTER_SLOT??'?',_0x52b646={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3a9689=_0x52b646[logLevel]??_0x52b646[_0x2ddb0e(0x88)];_0x482ab7[_0x2ddb0e(0x1fd)]['attach'](_0x4f283d=>{const _0x4ee181=_0x2ddb0e;if((_0x52b646[_0x4f283d[_0x4ee181(0x1fc)]]??0x1)<_0x3a9689)return;try{process['send']?.({'__okdbCluster':'log','slot':_0x56f506,'pid':process[_0x4ee181(0x29d)],'entry':_0x4f283d});}catch{}}),await _0x482ab7['open'](),_0x46b847(_0x482ab7),await _0x482ab7['http']['listen'](_0x212127);}return _0x210b1f()['catch'](_0x1aa40a=>{const _0x24ec76=_0x2fe0;try{process[_0x24ec76(0x174)]?.({'__okdbCluster':_0x24ec76(0x1fd),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x24ec76(0x29d)],'entry':{'level':_0x24ec76(0x250),'msg':_0x24ec76(0x166)+(_0x1aa40a?.[_0x24ec76(0x1b3)]??_0x1aa40a)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
1
+ 'use strict';const _0x4abb0e=_0x35c1;(function(_0x5649da,_0x4ba8a7){const _0x588597=_0x35c1,_0x4a10a8=_0x5649da();while(!![]){try{const _0x45528f=parseInt(_0x588597(0x129))/0x1*(-parseInt(_0x588597(0x179))/0x2)+parseInt(_0x588597(0x115))/0x3*(-parseInt(_0x588597(0x1e0))/0x4)+-parseInt(_0x588597(0x301))/0x5*(parseInt(_0x588597(0x208))/0x6)+parseInt(_0x588597(0x27a))/0x7*(parseInt(_0x588597(0x253))/0x8)+parseInt(_0x588597(0x30f))/0x9*(-parseInt(_0x588597(0x16a))/0xa)+parseInt(_0x588597(0x303))/0xb+parseInt(_0x588597(0x299))/0xc*(parseInt(_0x588597(0x2a7))/0xd);if(_0x45528f===_0x4ba8a7)break;else _0x4a10a8['push'](_0x4a10a8['shift']());}catch(_0x1f22dc){_0x4a10a8['push'](_0x4a10a8['shift']());}}}(_0xef45,0x2c15f));var require$$0$5=require('./okdb'),require$$1$1=require(_0x4abb0e(0x318)),require$$1=require(_0x4abb0e(0x1ba)),require$$0$3=require('os'),require$$2=require(_0x4abb0e(0xde)),require$$0=require(_0x4abb0e(0x1fa)),require$$0$2=require(_0x4abb0e(0x21e)),require$$0$1=require('fs'),require$$0$4=require(_0x4abb0e(0x2d9));function getDefaultExportFromCjs(_0x5842ce){const _0x12a13c=_0x4abb0e;return _0x5842ce&&_0x5842ce['__esModule']&&Object[_0x12a13c(0x148)][_0x12a13c(0x1c0)][_0x12a13c(0x16d)](_0x5842ce,_0x12a13c(0x1ea))?_0x5842ce[_0x12a13c(0x1ea)]:_0x5842ce;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4743a7=_0x4abb0e;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x39ce37={'PUT':_0x4743a7(0x2f3),'REMOVE':_0x4743a7(0x24f),'INDEX_DROP':_0x4743a7(0x23e),'INDEX_REGISTER':_0x4743a7(0x26c),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x4743a7(0x169),'TYPE_DROP':_0x4743a7(0x142),'FTS_REGISTER':'registerFts','FTS_DROP':_0x4743a7(0x168),'FTS_RESET':_0x4743a7(0x224),'SCHEMA_SET':_0x4743a7(0x22b),'SCHEMA_DROP':_0x4743a7(0x1db),'TTL_SET':_0x4743a7(0x31f),'TTL_CLEAR':_0x4743a7(0x193)},_0x467ffd={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x4743a7(0x26f),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x4743a7(0x17b),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x4743a7(0x18c),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x4743a7(0x291),'ITEM_CREATE':'item:create','ITEM_UPDATE':_0x4743a7(0x245),'ITEM_REMOVE':_0x4743a7(0x265),'ITEM_PENDING':_0x4743a7(0x285),'INDEX_RESET':_0x4743a7(0x1d5),'INDEX_READY':_0x4743a7(0x1f4),'INDEX_PROGRESS':_0x4743a7(0x10b),'VIEW_PROGRESS':_0x4743a7(0x1a9),'INDEX_DROP':_0x4743a7(0x295),'INDEX_REGISTERED':_0x4743a7(0x14c),'FTS_REGISTERED':_0x4743a7(0x240),'FTS_DROP':_0x4743a7(0x233),'FTS_RESET':_0x4743a7(0x161),'SCHEMA_SET':_0x4743a7(0xd3),'SCHEMA_DROP':_0x4743a7(0x2f2),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x4743a7(0x1eb),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x4743a7(0x1e8),'TXN_START':_0x4743a7(0x283),'TXN_END':_0x4743a7(0x147),'TXN_ROLLBACK':_0x4743a7(0x220),'TYPE_REGISTERED':_0x4743a7(0x29b),'TYPE_DROP':_0x4743a7(0x315),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x4743a7(0xf6),'SYSTEM_ENV_RELEASE':_0x4743a7(0x324),'TTL_EXPIRED':_0x4743a7(0x2d6),'TTL_SET':_0x4743a7(0x2c8),'TTL_CLEAR':_0x4743a7(0x122),'LICENSE_INVALID':_0x4743a7(0x198),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x4743a7(0x197),'LICENSE_REMOVED':_0x4743a7(0xeb)},_0xff2100={'CREATING':_0x4743a7(0x131),'RESETTING':_0x4743a7(0xf0),'READY':_0x4743a7(0x20a),'DROPPING':_0x4743a7(0x1cd),'WAITING':_0x4743a7(0x25b),'ERROR':_0x4743a7(0x251)},_0x398344={'CREATED':_0x4743a7(0x2c6),'STARTING':'starting','STARTED':_0x4743a7(0x1be),'STOPPING':_0x4743a7(0x23b),'STOPPED':'stopped'},_0x15f6fa={'CREATING':_0x4743a7(0x131),'READY':_0x4743a7(0x20a),'HALTED':_0x4743a7(0x1ef),'STOPPED':_0x4743a7(0x2b4),'RESETTING':_0x4743a7(0xf0)},_0x5db9c6=Object['freeze']({'POKE':_0x4743a7(0x1a8),'DRAIN':_0x4743a7(0x219),'TYPE_DROP':_0x4743a7(0x109),'PROC':_0x4743a7(0x2d2),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x5db9c6,'CHANGE_ACTIONS':_0x39ce37,'EVENTS':_0x467ffd,'INDEX_STATE':_0xff2100,'OKDB_STATE':_0x398344,'VIEW_STATE':_0x15f6fa},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3d6617=_0x4abb0e;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x3243f4,performance:_0x5cb50c}=require$$0,_0x37dd2a=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3d6617(0xd9),_0x63f981=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x301299=process.env.OKDB_LOOP_LAG_ALL==='1',_0x44a947=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x192f3b{constructor(){const _0x3ad4f1=_0x3d6617;this[_0x3ad4f1(0x12a)]=_0x37dd2a,this[_0x3ad4f1(0x1c3)]=new Map(),this['_h']=null,this[_0x3ad4f1(0x27f)]=null,this[_0x3ad4f1(0x104)]=![],this['_log']=(_0x39841f,_0x46d9ef)=>process[_0x3ad4f1(0x1b0)][_0x3ad4f1(0x2d5)](_0x39841f+(_0x46d9ef?'\x20'+JSON['stringify'](_0x46d9ef):'')+'\x0a');}[_0x3d6617(0x19d)](){const _0xb8d2f8=_0x3d6617;return _0x5cb50c[_0xb8d2f8(0x19d)]();}[_0x3d6617(0x13e)](_0x1e0030){const _0x3c8430=_0x3d6617;if(typeof _0x1e0030===_0x3c8430(0x160))this[_0x3c8430(0xfe)]=_0x1e0030;}[_0x3d6617(0x1f8)](_0x571741,_0x1dab41,_0x3b26c6){const _0x2af603=_0x3d6617;if(!this[_0x2af603(0x12a)])return;let _0x6d1edc=this[_0x2af603(0x1c3)][_0x2af603(0x106)](_0x571741);!_0x6d1edc&&(_0x6d1edc={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x2af603(0x1c3)][_0x2af603(0x30d)](_0x571741,_0x6d1edc)),_0x6d1edc['ms']+=_0x1dab41,_0x6d1edc[_0x2af603(0x2ed)]+=0x1,_0x1dab41>_0x6d1edc[_0x2af603(0xfa)]&&(_0x6d1edc[_0x2af603(0xfa)]=_0x1dab41,_0x6d1edc[_0x2af603(0x20b)]=_0x3b26c6||'');}[_0x3d6617(0x2dc)](_0x3c408d){const _0x2a946d=_0x3d6617;if(!this[_0x2a946d(0x12a)]||this[_0x2a946d(0x104)])return;this['_started']=!![];if(_0x3c408d)this[_0x2a946d(0xfe)]=_0x3c408d;this['_h']=_0x3243f4({'resolution':0xa}),this['_h'][_0x2a946d(0x202)](),this[_0x2a946d(0x27f)]=setInterval(()=>this[_0x2a946d(0x2ef)](),_0x63f981);if(this[_0x2a946d(0x27f)][_0x2a946d(0x2a3)])this[_0x2a946d(0x27f)][_0x2a946d(0x2a3)]();}[_0x3d6617(0x101)](_0x265b69){const _0x5ef881=_0x3d6617;if(!this['_windowCbs'])this[_0x5ef881(0x123)]=new Set();this['_windowCbs']['add'](_0x265b69);if(!this[_0x5ef881(0x104)])this[_0x5ef881(0x1bf)]();}[_0x3d6617(0x2f9)](_0xe816){const _0x17d3b8=_0x3d6617;this[_0x17d3b8(0x123)]?.[_0x17d3b8(0x1a3)](_0xe816);}[_0x3d6617(0x1bf)](){const _0x1d50cc=_0x3d6617;if(this[_0x1d50cc(0x185)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x3243f4({'resolution':0xa}),this['_h'][_0x1d50cc(0x202)]());const _0x12ba31=_0x63f981;this[_0x1d50cc(0x138)]=setInterval(()=>{const _0x442f4e=_0x1d50cc,_0x44bd89=this['_h'];if(!_0x44bd89)return;const _0xaa1257=_0x44bd89[_0x442f4e(0x1ec)](0x63)/0xf4240,_0x5d5ae7=_0x44bd89[_0x442f4e(0xf5)]/0xf4240,_0x308c3a=_0x44bd89['mean']/0xf4240;_0x44bd89[_0x442f4e(0x1d6)]();if(this[_0x442f4e(0x123)])for(const _0x2476e7 of this[_0x442f4e(0x123)]){try{_0x2476e7({'p99Ms':_0xaa1257,'maxMs':_0x5d5ae7,'meanMs':_0x308c3a,'reportMs':_0x12ba31});}catch{}}},_0x12ba31);if(this[_0x1d50cc(0x138)]['unref'])this[_0x1d50cc(0x138)][_0x1d50cc(0x2a3)]();}[_0x3d6617(0x2ef)](){const _0x3b097a=_0x3d6617,_0x593c0d=this['_h'],_0x1c9670=_0x593c0d[_0x3b097a(0xf5)]/0xf4240,_0x4ac3ad=_0x593c0d['percentile'](0x63)/0xf4240,_0x90aff8=_0x593c0d['mean']/0xf4240;_0x593c0d[_0x3b097a(0x1d6)]();const _0x746cf8=[...this[_0x3b097a(0x1c3)][_0x3b097a(0x2e8)]()][_0x3b097a(0x2fe)](([_0x545251,_0x5f1048])=>({'label':_0x545251,..._0x5f1048}))[_0x3b097a(0x2ee)]((_0x525f36,_0x44f663)=>_0x44f663['ms']-_0x525f36['ms'])[_0x3b097a(0x14e)](0x0,0x8);this[_0x3b097a(0x1c3)][_0x3b097a(0x1ee)]();const _0xa89825=_0x746cf8[_0x3b097a(0x272)]((_0x2d0380,_0x1f4163)=>_0x2d0380+_0x1f4163['ms'],0x0),_0x3bbd14=_0x746cf8['map'](_0x34a374=>_0x34a374[_0x3b097a(0x11d)]+'='+_0x34a374['ms'][_0x3b097a(0xf4)](0x0)+'ms/'+_0x34a374[_0x3b097a(0x2ed)]+(_0x34a374[_0x3b097a(0xfa)]>0x5?_0x3b097a(0x27c)+_0x34a374[_0x3b097a(0xfa)]['toFixed'](0x0)+'ms'+(_0x34a374[_0x3b097a(0x20b)]?'\x20'+_0x34a374[_0x3b097a(0x20b)]:'')+')':''));(_0x301299||_0x1c9670>=_0x44a947)&&this['_log'](_0x3b097a(0x2e9)+_0x63f981+_0x3b097a(0xfd)+_0x1c9670['toFixed'](0x0)+_0x3b097a(0x250)+_0x4ac3ad[_0x3b097a(0xf4)](0x0)+'ms\x20mean='+_0x90aff8[_0x3b097a(0xf4)](0x0)+'ms\x20busy='+_0xa89825[_0x3b097a(0xf4)](0x0)+'ms'+(_0x3bbd14[_0x3b097a(0x200)]?_0x3b097a(0x180)+_0x3bbd14[_0x3b097a(0xe8)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x3b097a(0x123)])for(const _0xbfca5e of this[_0x3b097a(0x123)]){try{_0xbfca5e({'p99Ms':_0x4ac3ad,'maxMs':_0x1c9670,'meanMs':_0x90aff8,'reportMs':_0x63f981});}catch{}}}[_0x3d6617(0xfb)](){const _0x53d472=_0x3d6617;if(this['_timer'])clearInterval(this[_0x53d472(0x27f)]);if(this['_h'])this['_h'][_0x53d472(0x273)]();this[_0x53d472(0x27f)]=null,this['_h']=null,this['_started']=![];}}const _0x1868c6=new _0x192f3b();if(_0x1868c6[_0x3d6617(0x12a)])_0x1868c6[_0x3d6617(0x2dc)]();return okdbLoopMonitor={'LOOP':_0x1868c6},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x49dbfe=0x2**0x1f-0x1;function _0x2e600b(_0x5894aa){if(!(_0x5894aa>0x0))return 0x0;return _0x5894aa>_0x49dbfe?_0x49dbfe:_0x5894aa;}function _0x1769c7(_0x3c34c9){return _0x3c34c9===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x49dbfe,'clampTimerDelay':_0x2e600b,'isNeverDelay':_0x1769c7},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2d9f14=require$$0$1,_0x487fc4=require$$1;let _0x28bd2c,_0x17824c,_0x376f72,_0x30d734,_0x27091a,_0x4878f6,_0x2f2066,_0x5493bb=![];const _0x1f9e81=new Set();let _0x2dcf7d=null;const _0x5b637b=new Map();function _0x2745b9(){const _0x332ef2=_0x35c1;if(_0x28bd2c!==undefined)return _0x28bd2c;_0x28bd2c=process.env.OKDB_DIAG==='1';if(!_0x28bd2c)return![];_0x17824c=process.env.OKDB_DIAG_STACK==='1',_0x30d734=Math[_0x332ef2(0xf5)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x376f72=new Array(_0x30d734),_0x27091a=0x0,_0x4878f6=0x0,_0x2f2066=process.env.OKDB_DIAG_DIR||null;if(_0x2f2066)try{_0x2d9f14[_0x332ef2(0x1d1)](_0x2f2066,{'recursive':!![]});}catch{}return!![];}function _0x4a29a8(){return _0x28bd2c===undefined?_0x2745b9():_0x28bd2c;}function _0x49b3de(_0x46af64,_0xdb1143){const _0xd75f74=_0x35c1;if(_0x28bd2c===undefined?!_0x2745b9():!_0x28bd2c)return;let _0x44fb32;if(_0x17824c){const _0x1e786c=new Error()['stack']||'';_0x44fb32=_0x1e786c[_0xd75f74(0x28c)]('\x0a')[_0xd75f74(0x14e)](0x3)[_0xd75f74(0x2fe)](_0x1e7542=>_0x1e7542['trim']())[_0xd75f74(0x2df)](Boolean)['slice'](0x0,0x8);}_0x376f72[_0x27091a]={'seq':_0x4878f6++,'t':Date[_0xd75f74(0x19d)](),'env':_0x46af64,'kind':_0xdb1143||_0xd75f74(0x158),'stack':_0x44fb32},_0x27091a=(_0x27091a+0x1)%_0x30d734;}function _0xaab843(_0x51ecc5){const _0x35143e=_0x35c1,_0x261858=[];for(let _0x4c6e6b=0x0;_0x4c6e6b<_0x30d734;_0x4c6e6b++){const _0x162776=_0x376f72[(_0x27091a-0x1-_0x4c6e6b+_0x30d734*0x2)%_0x30d734];if(!_0x162776)continue;_0x261858[_0x35143e(0x2a4)](_0x162776);if(_0x261858[_0x35143e(0x200)]>=_0x51ecc5)break;}return _0x261858;}function _0x283f2c(_0x34b10d){const _0x414d7=_0x35c1;try{process[_0x414d7(0x1b0)]['write'](_0x34b10d+'\x0a');}catch{}if(_0x2f2066)try{_0x2d9f14[_0x414d7(0x2db)](_0x487fc4[_0x414d7(0xe8)](_0x2f2066,_0x414d7(0x146)+process[_0x414d7(0x268)]+_0x414d7(0x187)),_0x34b10d+'\x0a');}catch{}}function _0xa405f7(_0x46b448){const _0x16a621=_0x35c1,_0x3b2537=_0xaab843(_0x46b448);if(!_0x3b2537[_0x16a621(0x200)])return _0x16a621(0x27b);const _0x525f85=Date['now']();return _0x3b2537['map'](_0x313b4d=>{const _0x5b4b6c=_0x16a621,_0x38d3d8=_0x5b4b6c(0x1f9)+_0x313b4d[_0x5b4b6c(0x2d7)]+'\x20-'+(_0x525f85-_0x313b4d['t'])+_0x5b4b6c(0x192)+_0x313b4d['env']+'\x20'+_0x313b4d[_0x5b4b6c(0x25c)];return _0x313b4d[_0x5b4b6c(0x211)]&&_0x313b4d[_0x5b4b6c(0x211)]['length']?_0x38d3d8+_0x5b4b6c(0x321)+_0x313b4d[_0x5b4b6c(0x211)][_0x5b4b6c(0xe8)](_0x5b4b6c(0x321)):_0x38d3d8;})[_0x16a621(0xe8)]('\x0a');}function _0x467ce6(_0x1e90fd,_0x1c0b89){const _0x370b69=_0x35c1,_0x4b70e0=_0x370b69(0x1c5)+_0x1e90fd+_0x370b69(0x1c4)+new Date()[_0x370b69(0x229)]()+_0x370b69(0x12e)+process['pid']+_0x370b69(0x2e0),_0x1953ff=[_0x4b70e0,_0x370b69(0x2ec)+(_0x1c0b89&&_0x1c0b89[_0x370b69(0x211)]?_0x1c0b89[_0x370b69(0x211)][_0x370b69(0x28c)]('\x0a')[0x0]:_0x1c0b89),_0x370b69(0x205)+(_0x17824c?'':_0x370b69(0x177))+':',_0xa405f7(0x18),_0x48c430(),'='[_0x370b69(0x270)](_0x4b70e0[_0x370b69(0x200)]-0x1)];_0x283f2c(_0x1953ff[_0x370b69(0xe8)]('\x0a'));}function _0x55534b(_0x58be36){const _0x3fffe9=_0x35c1;if(!_0x4a29a8())return;const _0x4b59e2=String(_0x58be36&&_0x58be36[_0x3fffe9(0x110)]||_0x58be36||''),_0x40294b=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x3fffe9(0x1d0)](_0x4b59e2);_0x467ce6(_0x40294b?_0x3fffe9(0x24c):'uncaughtException',_0x58be36);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x40294b)return;try{console['error'](_0x58be36&&_0x58be36[_0x3fffe9(0x211)]?_0x58be36['stack']:_0x58be36);}catch{}process[_0x3fffe9(0xe4)](0x1);}function _0x28d69e(_0x1daa31){const _0x25324c=_0x35c1;if(!_0x4a29a8())return;const _0x460575=String(_0x1daa31&&_0x1daa31[_0x25324c(0x110)]||_0x1daa31||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x25324c(0x1d0)](_0x460575)&&_0x467ce6('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x1daa31);}function _0x48c430(){const _0x42a044=_0x35c1,_0x3edc68=[_0x42a044(0x2c3)];let _0x3523c7=![];for(const _0x38b2b6 of _0x1f9e81){const _0x4efa20=_0x38b2b6&&_0x38b2b6[_0x42a044(0xd4)];if(!_0x4efa20)continue;for(const [_0x515907,_0x5dba1d]of _0x4efa20){const _0x763ec4=_0x5dba1d&&_0x5dba1d[_0x42a044(0x190)]&&_0x5dba1d['_coordinator'][_0x42a044(0x170)];if(!_0x763ec4)continue;let _0x46519b,_0x11f57d;try{_0x46519b=Atomics[_0x42a044(0x145)](_0x763ec4,0x0),_0x11f57d=Atomics[_0x42a044(0x145)](_0x763ec4,0x1);}catch{continue;}if(_0x46519b===0x0)continue;_0x3523c7=!![];const _0x6ba0a1=_0x46519b>0x0?_0x42a044(0x2d0):_0x42a044(0xce),_0x5ee0fa=Date[_0x42a044(0x19d)]()-Math[_0x42a044(0x196)](_0x46519b)*0x3e8,_0x142cee=((()=>{const _0xc4a3df=_0x42a044;try{return _0x5dba1d[_0xc4a3df(0x1d2)]&&_0x5dba1d[_0xc4a3df(0x1d2)][_0xc4a3df(0xdd)]?_0x5dba1d[_0xc4a3df(0x1d2)][_0xc4a3df(0xdd)]():null;}catch{return null;}})());_0x3edc68[_0x42a044(0x2a4)]('\x20\x20env='+_0x515907+_0x42a044(0x247)+_0x6ba0a1+_0x42a044(0x17f)+_0x5ee0fa+_0x42a044(0x1ed)+_0x11f57d+(_0x142cee?_0x42a044(0x244)+_0x142cee[_0x42a044(0x165)]+_0x42a044(0x2e5)+_0x142cee['oldestPendingMs']+_0x42a044(0x2cb)+_0x142cee['parkedNow']+'}':''));}}if(!_0x3523c7)_0x3edc68[_0x42a044(0x2a4)]('\x20\x20(no\x20env\x20draining)');return _0x3edc68[_0x42a044(0xe8)]('\x0a');}function _0x91726c(){const _0x461c32=_0x35c1;if(!_0x4a29a8())return;const _0xd8afe3=Math[_0x461c32(0xf5)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x3992fb=Date[_0x461c32(0x19d)]();for(const _0x20b7c9 of _0x1f9e81){const _0x290272=_0x20b7c9&&_0x20b7c9['_envs'];if(!_0x290272)continue;for(const [_0x23d777,_0x3c46da]of _0x290272){const _0x17c351=_0x3c46da&&_0x3c46da[_0x461c32(0x190)]&&_0x3c46da['_coordinator']['view'];if(!_0x17c351)continue;let _0x107922;try{_0x107922=Atomics['load'](_0x17c351,0x0);}catch{continue;}const _0x3d58aa=_0x20b7c9[_0x461c32(0x1ba)]+'|'+_0x23d777;if(_0x107922<=0x0){_0x5b637b['delete'](_0x3d58aa);continue;}const _0x4b8949=_0x3992fb-_0x107922*0x3e8,_0x2edac5=_0x5b637b['get'](_0x3d58aa);if(_0x4b8949<_0xd8afe3)continue;if(_0x2edac5&&_0x3992fb-_0x2edac5[_0x461c32(0x2f5)]<_0xd8afe3)continue;_0x5b637b[_0x461c32(0x30d)](_0x3d58aa,{'firstTs':_0x2edac5?_0x2edac5[_0x461c32(0x2cd)]:_0x107922,'dumpedAt':_0x3992fb});const _0x1a7d56=_0x461c32(0x199)+_0x4b8949+_0x461c32(0x2de)+_0x23d777+_0x461c32(0x1c4)+new Date()[_0x461c32(0x229)]()+_0x461c32(0x12e)+process['pid']+_0x461c32(0x2e0);_0x283f2c([_0x1a7d56,_0x48c430(),'='[_0x461c32(0x270)](_0x1a7d56[_0x461c32(0x200)]-0x1)]['join']('\x0a'));}}}function _0x4bccd6(){const _0x5c3e2e=_0x35c1;if(!_0x4a29a8()||_0x5493bb)return;_0x5493bb=!![],process[_0x5c3e2e(0x29a)](_0x5c3e2e(0x2dd),_0x55534b),process[_0x5c3e2e(0x29a)](_0x5c3e2e(0x11f),_0x28d69e);const _0x13c4dd=Math[_0x5c3e2e(0xf5)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x2dcf7d=setInterval(_0x91726c,_0x13c4dd);if(_0x2dcf7d['unref'])_0x2dcf7d[_0x5c3e2e(0x2a3)]();}function _0x5344b8(_0x5dac00){if(!_0x4a29a8()||!_0x5dac00)return;_0x1f9e81['add'](_0x5dac00),_0x4bccd6();}function _0x2e0805(_0x2db8e0){_0x1f9e81['delete'](_0x2db8e0);}function _0x244f38(){const _0xd4107d=_0x35c1;if(!_0x4a29a8())return{'enabled':![],'hint':_0xd4107d(0x103)};return{'enabled':!![],'stackCapture':!!_0x17824c,'recentWrites':_0xaab843(0x10),'drain':_0x48c430()};}return okdbDiag={'isEnabled':_0x4a29a8,'recordWrite':_0x49b3de,'installDiag':_0x4bccd6,'registerOkdb':_0x5344b8,'unregisterOkdb':_0x2e0805,'snapshot':_0x244f38},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x4531db=_0x4abb0e;if(hasRequiredOkdbWriter)return okdbWriter[_0x4531db(0x243)];hasRequiredOkdbWriter=0x1;const {performance:_0x1284c0}=require$$0$2,_0x5b3037=requireOkdbDiag(),_0x3ba61e=process.env.OKDB_COMMIT_MODE===_0x4531db(0x25e);class _0x1a1695{constructor(_0x2ef222){const _0x3f8ce4=_0x4531db;this[_0x3f8ce4(0xee)]=_0x2ef222,this['_inflight']=new Set(),this[_0x3f8ce4(0x274)]=new Map(),this[_0x3f8ce4(0x2e6)]=0x0,this['_durs']=[],this[_0x3f8ce4(0xe1)]=[],this[_0x3f8ce4(0x1bd)]=Math[_0x3f8ce4(0xf5)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x3f8ce4(0xf3)]=0x0,this[_0x3f8ce4(0xe6)]=[],this[_0x3f8ce4(0x271)]=0x0,this['_held']=null,this[_0x3f8ce4(0x2a5)]=0x0,this[_0x3f8ce4(0x278)]=0x0,this[_0x3f8ce4(0x316)]=![];}async[_0x4531db(0x1bc)](_0x4db5c0,_0x5ce9c9,{admitted:admitted=![]}={}){const _0x4a18f5=_0x4531db;if(_0x5b3037[_0x4a18f5(0x175)]())_0x5b3037['recordWrite'](this[_0x4a18f5(0xee)]?.[_0x4a18f5(0x19c)],_0x5ce9c9);if(this[_0x4a18f5(0x15c)]){const _0x50b21c=new Error(_0x4a18f5(0x29e));_0x50b21c[_0x4a18f5(0x28b)]=_0x4a18f5(0x1b3);throw _0x50b21c;}if(this['_highWater']>0x0){let _0x286696=![];while(this[_0x4a18f5(0xf3)]>=this[_0x4a18f5(0x1bd)]&&!this[_0x4a18f5(0x15c)]){!_0x286696&&(_0x286696=!![],this['_bpParkedTotal']++),await new Promise(_0x1cb489=>this[_0x4a18f5(0xe6)][_0x4a18f5(0x2a4)](_0x1cb489));}if(this[_0x4a18f5(0x15c)]){const _0x2ba8ed=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x2ba8ed[_0x4a18f5(0x28b)]=_0x4a18f5(0x1b3);throw _0x2ba8ed;}}this[_0x4a18f5(0xf3)]++;const _0x3d2c57=admitted?null:this[_0x4a18f5(0xee)][_0x4a18f5(0x190)];for(;;){while(this['_held'])await this['_held'];if(_0x3d2c57)try{await _0x3d2c57['beforeWrite']();}catch(_0x43d4b4){this[_0x4a18f5(0xf3)]--;if(this[_0x4a18f5(0xe6)][_0x4a18f5(0x200)]&&this['_outstanding']<this['_highWater'])this[_0x4a18f5(0xe6)]['shift']()();throw _0x43d4b4;}if(!this[_0x4a18f5(0x22e)])break;if(_0x3d2c57)_0x3d2c57['afterWrite']();}if(this[_0x4a18f5(0x15c)]){if(_0x3d2c57)_0x3d2c57[_0x4a18f5(0x107)]();this[_0x4a18f5(0xf3)]--;if(this[_0x4a18f5(0xe6)]['length']&&this[_0x4a18f5(0xf3)]<this[_0x4a18f5(0x1bd)])this[_0x4a18f5(0xe6)]['shift']()();const _0x3f4cc4=new Error(_0x4a18f5(0x29e));_0x3f4cc4[_0x4a18f5(0x28b)]=_0x4a18f5(0x1b3);throw _0x3f4cc4;}const _0x1369bb=_0x1284c0[_0x4a18f5(0x19d)]();if(_0x3ba61e)try{const _0x35f62d=this[_0x4a18f5(0xee)]['db']['transactionSync'](_0x4db5c0);this[_0x4a18f5(0x2e6)]++;if(this[_0x4a18f5(0x139)][_0x4a18f5(0x2a4)](_0x1284c0[_0x4a18f5(0x19d)]()-_0x1369bb)>0x100)this[_0x4a18f5(0x139)][_0x4a18f5(0x234)]();if(this[_0x4a18f5(0xe1)][_0x4a18f5(0x2a4)](_0x1284c0[_0x4a18f5(0x19d)]())>0x800)this[_0x4a18f5(0xe1)][_0x4a18f5(0x234)]();return _0x35f62d;}finally{this[_0x4a18f5(0xf3)]--;if(this[_0x4a18f5(0xe6)][_0x4a18f5(0x200)]&&this[_0x4a18f5(0xf3)]<this[_0x4a18f5(0x1bd)])this['_bpWaiters'][_0x4a18f5(0x234)]()();if(_0x3d2c57)_0x3d2c57[_0x4a18f5(0x107)]();}let _0x3a6268=null;const _0x1c28e6=()=>{const _0x5aca28=_0x4a18f5,_0x559a62=_0x4db5c0();if(_0x559a62&&typeof _0x559a62[_0x5aca28(0x2b2)]===_0x5aca28(0x160)&&!_0x3a6268){this[_0x5aca28(0x2a5)]++;let _0x18df42;const _0x380976=new Promise(_0x4b571d=>_0x18df42=_0x4b571d);this[_0x5aca28(0x22e)]=_0x380976,_0x3a6268=()=>{const _0x5780ce=_0x5aca28;if(this[_0x5780ce(0x22e)]===_0x380976)this['_held']=null;_0x18df42();};}return _0x559a62;};let _0x9012ea;try{_0x9012ea=this[_0x4a18f5(0xee)]['db'][_0x4a18f5(0x144)](_0x1c28e6);}catch(_0x352773){_0x9012ea=Promise[_0x4a18f5(0x2d3)](_0x352773);}(!_0x9012ea||typeof _0x9012ea[_0x4a18f5(0x2b2)]!=='function')&&(this[_0x4a18f5(0x278)]++,!this['_nestedWarned']&&(this[_0x4a18f5(0x316)]=!![],console['warn']('okdb-writer['+(this['env']?.[_0x4a18f5(0x19c)]??'?')+_0x4a18f5(0x1fb))),_0x9012ea=Promise[_0x4a18f5(0x184)](_0x9012ea));const _0x293103=()=>{if(_0x3a6268)_0x3a6268();};_0x9012ea[_0x4a18f5(0x2b2)](_0x293103,_0x293103),this[_0x4a18f5(0x2ba)]['add'](_0x9012ea),this['_enqueuedAt'][_0x4a18f5(0x30d)](_0x9012ea,_0x1369bb);const _0x122ab6=()=>{const _0x4a9bc9=_0x4a18f5;this[_0x4a9bc9(0x2ba)][_0x4a9bc9(0x1a3)](_0x9012ea),this[_0x4a9bc9(0x274)][_0x4a9bc9(0x1a3)](_0x9012ea),this[_0x4a9bc9(0x2e6)]++,this['_outstanding']--;this['_bpWaiters']['length']&&this[_0x4a9bc9(0xf3)]<this[_0x4a9bc9(0x1bd)]&&this[_0x4a9bc9(0xe6)][_0x4a9bc9(0x234)]()();if(this['_durs'][_0x4a9bc9(0x2a4)](_0x1284c0[_0x4a9bc9(0x19d)]()-_0x1369bb)>0x100)this['_durs'][_0x4a9bc9(0x234)]();if(this[_0x4a9bc9(0xe1)][_0x4a9bc9(0x2a4)](_0x1284c0['now']())>0x800)this[_0x4a9bc9(0xe1)][_0x4a9bc9(0x234)]();};_0x9012ea[_0x4a18f5(0x2b2)](_0x122ab6,_0x122ab6);try{return await _0x9012ea;}finally{if(_0x3d2c57)_0x3d2c57[_0x4a18f5(0x107)]();}}[_0x4531db(0xdd)](){const _0x419a24=_0x4531db,_0x4ba879=_0x1284c0['now']();let _0x55a63d=0x0;for(const _0x594525 of this[_0x419a24(0x274)][_0x419a24(0x1ae)]()){const _0x1c62ff=_0x4ba879-_0x594525;if(_0x1c62ff>_0x55a63d)_0x55a63d=_0x1c62ff;}let _0x292606=0x0;for(let _0x56ff3a=this[_0x419a24(0xe1)]['length']-0x1;_0x56ff3a>=0x0;_0x56ff3a--){if(_0x4ba879-this[_0x419a24(0xe1)][_0x56ff3a]>0x3e8)break;_0x292606++;}let _0x445912=0x0;if(this[_0x419a24(0x139)][_0x419a24(0x200)]){const _0x168696=[...this[_0x419a24(0x139)]][_0x419a24(0x2ee)]((_0xc11235,_0x1e0a61)=>_0xc11235-_0x1e0a61);_0x445912=_0x168696[Math[_0x419a24(0x2a1)](_0x168696[_0x419a24(0x200)]-0x1,Math['floor'](_0x168696[_0x419a24(0x200)]*0.99))];}return{'depth':this[_0x419a24(0x2ba)][_0x419a24(0x2bd)],'oldestPendingMs':Math[_0x419a24(0x24b)](_0x55a63d),'committed':this[_0x419a24(0x2e6)],'commitsPerSec':_0x292606,'commitP99Ms':Math[_0x419a24(0x24b)](_0x445912),'parkedNow':this['_bpWaiters']['length'],'parkedTotal':this[_0x419a24(0x271)],'highWater':this[_0x419a24(0x1bd)]};}['inflightAgesMs'](){const _0x35b7ac=_0x4531db,_0x3b0747=_0x1284c0[_0x35b7ac(0x19d)]();return[...this[_0x35b7ac(0x274)][_0x35b7ac(0x1ae)]()][_0x35b7ac(0x2fe)](_0x1efd2a=>Math[_0x35b7ac(0x24b)](_0x3b0747-_0x1efd2a))['sort']((_0x1567c1,_0x1ce659)=>_0x1ce659-_0x1567c1);}[_0x4531db(0x15b)](){const _0x5305fa=_0x4531db;this[_0x5305fa(0x15c)]=!![];for(const _0x5a8560 of this[_0x5305fa(0xe6)][_0x5305fa(0x181)](0x0))_0x5a8560();}async['drain'](){const _0x25e83f=_0x4531db;let _0x5b5627=0x0;while(this[_0x25e83f(0x2ba)][_0x25e83f(0x2bd)]&&_0x5b5627++<0x3e8){await Promise[_0x25e83f(0x157)]([...this[_0x25e83f(0x2ba)]]);}}async[_0x4531db(0x2f3)](_0x2df6a0,_0x3f5713,_0xd5e79e,_0x23ede8){const _0x20d7ee=_0x4531db;return this[_0x20d7ee(0x1bc)](()=>{const _0x47e23a=_0x20d7ee;if(_0x23ede8===undefined)_0x2df6a0[_0x47e23a(0x27d)](_0x3f5713,_0xd5e79e);else _0x2df6a0[_0x47e23a(0x27d)](_0x3f5713,_0xd5e79e,_0x23ede8);},_0x20d7ee(0x1bb));}async[_0x4531db(0x24f)](_0x3f53c7,_0x530b5c){const _0x489d91=_0x4531db;return this['transaction'](()=>_0x3f53c7['removeSync'](_0x530b5c),_0x489d91(0x2f0));}}async function _0x35cb52(_0x56d2d6,_0xdb19bd){const _0x486325=_0x4531db;if(_0xdb19bd==null)_0xdb19bd=Math[_0x486325(0xf5)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x5a60d3=_0x56d2d6?.['flushed'];if(!_0x5a60d3||typeof _0x5a60d3[_0x486325(0x2b2)]!==_0x486325(0x160))return;await Promise[_0x486325(0x10d)]([Promise['resolve'](_0x5a60d3)[_0x486325(0x223)](()=>{}),new Promise(_0x24c8e9=>{const _0x57612a=_0x486325,_0x2713bc=setTimeout(_0x24c8e9,_0xdb19bd);if(_0x2713bc[_0x57612a(0x2a3)])_0x2713bc['unref']();})]);}catch{}}function _0x2b4571(_0xda1637){const _0x3b1d87=_0x4531db;if(_0x3ba61e)return Promise['resolve']();const _0x1b48a5=_0xda1637?.[_0x3b1d87(0x30a)];return _0x1b48a5&&typeof _0x1b48a5['then']===_0x3b1d87(0x160)?_0x1b48a5:Promise[_0x3b1d87(0x184)]();}const _0x1727ab=Math[_0x4531db(0xf5)](0x1,Math[_0x4531db(0x1f6)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x13b4c3=Math[_0x4531db(0xf5)](0x1,_0x1727ab-0x2);let _0x4a7d79=0x0;const _0x173719=[];async function _0x1b23d5(_0x4f63f1){const _0x5ee742=_0x4531db;if(_0x4a7d79<_0x13b4c3)_0x4a7d79++;else await new Promise(_0x58b790=>_0x173719['push'](_0x58b790));try{return await _0x4f63f1();}finally{const _0x1d44e9=_0x173719[_0x5ee742(0x234)]();if(_0x1d44e9)_0x1d44e9();else _0x4a7d79--;}}return okdbWriter[_0x4531db(0x243)]=_0x1a1695,okdbWriter['exports'][_0x4531db(0x248)]=_0x1b23d5,okdbWriter['exports'][_0x4531db(0x19b)]=_0x13b4c3,okdbWriter[_0x4531db(0x243)][_0x4531db(0xd7)]=_0x35cb52,okdbWriter[_0x4531db(0x243)][_0x4531db(0x30a)]=_0x2b4571,okdbWriter[_0x4531db(0x243)][_0x4531db(0x176)]=_0x3ba61e,okdbWriter[_0x4531db(0x243)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x25d430=_0x4abb0e;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x57e9e3=require$$0$3,{clampTimerDelay:_0xcb1adf}=requireOkdbTimers(),{SYNC_COMMITS:_0x206da3}=requireOkdbWriter(),_0x4de3c9=_0x25d430(0x249);class _0x277421{constructor(_0x2cda12,_0x379e5d,_0x312a14){const _0x3921fe=_0x25d430;this[_0x3921fe(0x1aa)]=_0x2cda12,this['_key']=_0x379e5d,this[_0x3921fe(0x221)]=_0x312a14,this[_0x3921fe(0x2fc)]=![],this[_0x3921fe(0xd2)]=null,this['_heartbeatInFlight']=null;}[_0x25d430(0x13f)](){const _0x34a5e3=_0x25d430;if(this[_0x34a5e3(0x2fc)])return![];try{const _0x2b5ce1=this[_0x34a5e3(0x1aa)][_0x34a5e3(0x121)]()[_0x34a5e3(0x106)](this[_0x34a5e3(0x2d4)]);if(!_0x2b5ce1||_0x2b5ce1[_0x34a5e3(0x117)]!==this[_0x34a5e3(0x221)])return![];const _0x58c556=_0x2b5ce1[_0x34a5e3(0x1b7)]??_0x2b5ce1[_0x34a5e3(0x117)];if(_0x58c556+_0x2b5ce1['ttlMs']<Date[_0x34a5e3(0x19d)]())return![];return!![];}catch{return!this[_0x34a5e3(0x2fc)];}}['holder'](){const _0x350c56=_0x25d430;if(this[_0x350c56(0x2fc)])return null;try{return this[_0x350c56(0x1aa)][_0x350c56(0x121)]()[_0x350c56(0x106)](this[_0x350c56(0x2d4)])??null;}catch{return null;}}async[_0x25d430(0x28a)](_0x269ca6){const _0x4619b2=_0x25d430;if(this[_0x4619b2(0x2fc)])return;try{if(this[_0x4619b2(0x1aa)][_0x4619b2(0x15c)]())return;const _0x563207=this[_0x4619b2(0x1aa)][_0x4619b2(0x121)]()[_0x4619b2(0x106)](this['_key']);if(!_0x563207||_0x563207[_0x4619b2(0x117)]!==this[_0x4619b2(0x221)])return;if(_0x206da3)this['_lock']['_db']()[_0x4619b2(0x27d)](this[_0x4619b2(0x2d4)],{..._0x563207,'ttlMs':_0x563207[_0x4619b2(0x2d1)]+_0x269ca6});else await this['_lock'][_0x4619b2(0x121)]()[_0x4619b2(0x2f3)](this[_0x4619b2(0x2d4)],{..._0x563207,'ttlMs':_0x563207[_0x4619b2(0x2d1)]+_0x269ca6});}catch{}}async[_0x25d430(0x2af)](){const _0x2a1edd=_0x25d430;if(this[_0x2a1edd(0x2fc)])return;if(this['_heartbeatInFlight'])try{await this[_0x2a1edd(0x287)];}catch{}clearInterval(this[_0x2a1edd(0xd2)]),this[_0x2a1edd(0xd2)]=null,this['_released']=!![];try{if(this[_0x2a1edd(0x1aa)][_0x2a1edd(0x15c)]())return;const _0x3d153b=this[_0x2a1edd(0x1aa)][_0x2a1edd(0x121)]()['get'](this[_0x2a1edd(0x2d4)]);if(_0x3d153b&&_0x3d153b[_0x2a1edd(0x117)]===this[_0x2a1edd(0x221)]){if(_0x206da3)this[_0x2a1edd(0x1aa)][_0x2a1edd(0x121)]()[_0x2a1edd(0x17a)](this['_key']);else await this[_0x2a1edd(0x1aa)]['_db']()[_0x2a1edd(0x24f)](this['_key']);}}catch{}}['_startHeartbeat'](_0x1f658e,_0xa98918){const _0x5edb43=_0x25d430,_0x214e7a=_0xcb1adf(_0xa98918??Math[_0x5edb43(0x1f6)](_0x1f658e/0x3));this[_0x5edb43(0xd2)]=setInterval(()=>{const _0x4fdc19=_0x5edb43;if(this[_0x4fdc19(0x2fc)])return;this[_0x4fdc19(0x287)]=((async()=>{const _0x37c5a4=_0x4fdc19;try{if(this['_lock']['_closed']())return;const _0x393ab8=this[_0x37c5a4(0x1aa)][_0x37c5a4(0x121)]()[_0x37c5a4(0x106)](this[_0x37c5a4(0x2d4)]);if(!_0x393ab8||_0x393ab8[_0x37c5a4(0x117)]!==this[_0x37c5a4(0x221)]){this[_0x37c5a4(0x2fc)]=!![],clearInterval(this[_0x37c5a4(0xd2)]),this['_heartbeatTimer']=null;return;}if(_0x206da3)this[_0x37c5a4(0x1aa)]['_db']()[_0x37c5a4(0x27d)](this[_0x37c5a4(0x2d4)],{..._0x393ab8,'updatedAt':Date[_0x37c5a4(0x19d)]()});else await this[_0x37c5a4(0x1aa)]['_db']()[_0x37c5a4(0x2f3)](this[_0x37c5a4(0x2d4)],{..._0x393ab8,'updatedAt':Date[_0x37c5a4(0x19d)]()});}catch{}this['_heartbeatInFlight']=null;})());},_0x214e7a);if(this[_0x5edb43(0xd2)][_0x5edb43(0x2a3)])this[_0x5edb43(0xd2)]['unref']();}}class _0x38412e{constructor(_0x4353c3,{namespace:_0x3d892a,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x575e47=_0x25d430;this[_0x575e47(0x30c)]=_0x4353c3,this[_0x575e47(0x112)]=_0x3d892a,this['ttlMs']=ttlMs,this[_0x575e47(0xd0)]=heartbeatMs,this['_lockDb']=null;}[_0x25d430(0x121)](){const _0x31d5a6=_0x25d430;return this[_0x31d5a6(0xf8)](),(!this[_0x31d5a6(0xf2)]||this[_0x31d5a6(0xe3)]!==this[_0x31d5a6(0x30c)])&&(this['_lockDb']=this[_0x31d5a6(0x30c)][_0x31d5a6(0xe5)](_0x4de3c9,{'dupSort':![]}),this[_0x31d5a6(0xe3)]=this['_rawDb']),this['_lockDb'];}[_0x25d430(0x29d)](){const _0x4c44a3=_0x25d430;return this[_0x4c44a3(0xf8)](),(!this['_wantDbHandle']||this[_0x4c44a3(0x288)]!==this['_rawDb'])&&(this['_wantDbHandle']=this[_0x4c44a3(0x30c)][_0x4c44a3(0xe5)](_0x4de3c9+_0x4c44a3(0x2ad),{'dupSort':![]}),this['_wantDbOf']=this[_0x4c44a3(0x30c)]),this[_0x4c44a3(0x19a)];}['_closed'](){const _0x10678a=_0x25d430,_0x1833fd=this['_rawDb']?.['status'];return _0x1833fd===_0x10678a(0x2e3)||_0x1833fd===_0x10678a(0x134);}[_0x25d430(0xf8)](){const _0x1e575a=_0x25d430;if(this[_0x1e575a(0x15c)]())throw new Error(_0x1e575a(0x296));}[_0x25d430(0x2d4)](_0x1c2264){const _0xb4c3d4=_0x25d430;return this[_0xb4c3d4(0x112)]+':'+_0x1c2264;}[_0x25d430(0x1c7)](_0x4aac6d){const _0xdd9540=_0x25d430;try{if(this[_0xdd9540(0x15c)]())return;_0x206da3?this[_0xdd9540(0x29d)]()[_0xdd9540(0x27d)](this[_0xdd9540(0x2d4)](_0x4aac6d),Date[_0xdd9540(0x19d)]()):this[_0xdd9540(0x29d)]()[_0xdd9540(0x2f3)](this[_0xdd9540(0x2d4)](_0x4aac6d),Date['now']())?.[_0xdd9540(0x223)]?.(()=>{});}catch{}}['isWanted'](_0x12eae0,_0x4ea224=0x3e8){const _0x327993=_0x25d430;try{const _0x4000ec=this[_0x327993(0x29d)]()[_0x327993(0x106)](this['_key'](_0x12eae0));return typeof _0x4000ec==='number'&&Date[_0x327993(0x19d)]()-_0x4000ec<_0x4ea224;}catch{return![];}}['_isStale'](_0x1bf109){const _0x136ac5=_0x25d430,_0x18fb58=_0x1bf109[_0x136ac5(0x1b7)]??_0x1bf109[_0x136ac5(0x117)];return _0x18fb58+_0x1bf109[_0x136ac5(0x2d1)]<Date[_0x136ac5(0x19d)]();}static[_0x25d430(0x28f)](_0x4fe0f7){const _0x22da8f=_0x25d430,_0x580022=_0x4fe0f7?.[_0x22da8f(0x167)];if(!_0x580022||typeof _0x580022[_0x22da8f(0x268)]!=='number')return![];if(_0x580022[_0x22da8f(0x306)]!==_0x57e9e3['hostname']())return![];if(_0x580022['pid']===process[_0x22da8f(0x268)])return![];try{return process['kill'](_0x580022[_0x22da8f(0x268)],0x0),![];}catch(_0x222411){return _0x222411[_0x22da8f(0x28b)]===_0x22da8f(0x15d);}}async[_0x25d430(0x13d)](_0x5b4afd,_0x38250d={},_0x370962={}){const _0x3350cf=_0x25d430,_0x36a27f=this[_0x3350cf(0x2d4)](_0x5b4afd),_0x2bba43=_0x370962[_0x3350cf(0x2d1)]??this[_0x3350cf(0x2d1)],_0x19fb5f=Date[_0x3350cf(0x19d)](),_0x5788c1={'holder':{'pid':process[_0x3350cf(0x268)],'hostname':_0x57e9e3[_0x3350cf(0x306)](),..._0x38250d},'acquiredAt':_0x19fb5f,'updatedAt':_0x19fb5f,'ttlMs':_0x2bba43};let _0x81350a=![],_0x1b9e54=null;if(this[_0x3350cf(0x15c)]())return{'acquired':![],'handle':null,'current':null};try{const _0x5aa7c3=()=>{const _0x531b1c=_0x3350cf,_0x59f81e=this['_db']()[_0x531b1c(0x106)](_0x36a27f);if(_0x59f81e&&!this[_0x531b1c(0xdf)](_0x59f81e)&&!_0x38412e[_0x531b1c(0x28f)](_0x59f81e)){const _0x4f0bb5=_0x38250d[_0x531b1c(0x2ff)]!=null&&_0x59f81e[_0x531b1c(0x167)][_0x531b1c(0x268)]===process[_0x531b1c(0x268)]&&_0x59f81e[_0x531b1c(0x167)][_0x531b1c(0x2ff)]===_0x38250d[_0x531b1c(0x2ff)];if(!_0x4f0bb5){_0x81350a=![],_0x1b9e54=_0x59f81e;return;}_0x5788c1[_0x531b1c(0x117)]<=_0x59f81e[_0x531b1c(0x117)]&&(_0x5788c1[_0x531b1c(0x117)]=_0x59f81e[_0x531b1c(0x117)]+0x1,_0x5788c1['updatedAt']=_0x5788c1[_0x531b1c(0x117)]);}this[_0x531b1c(0x121)]()['put'](_0x36a27f,_0x5788c1),_0x81350a=!![],_0x1b9e54=_0x5788c1;};if(_0x206da3)this[_0x3350cf(0x121)]()[_0x3350cf(0x1f7)](_0x5aa7c3);else await this['_db']()[_0x3350cf(0x144)](_0x5aa7c3);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x81350a)return{'acquired':![],'handle':null,'current':_0x1b9e54};const _0x2cd05f=new _0x277421(this,_0x36a27f,_0x5788c1['acquiredAt']);return _0x2cd05f['_startHeartbeat'](_0x2bba43,this[_0x3350cf(0xd0)]),{'acquired':!![],'handle':_0x2cd05f,'current':_0x1b9e54};}['inspect'](_0x2769fc){const _0x27a5e8=_0x25d430;try{return this[_0x27a5e8(0x121)]()['get'](this['_key'](_0x2769fc))??null;}catch{return null;}}[_0x25d430(0x2cf)](){const _0x44435e=_0x25d430,_0x37e2d6=this[_0x44435e(0x112)]+':',_0x2dacac=[];try{for(const {key:_0x1e1c12,value:_0x39938d}of this[_0x44435e(0x121)]()[_0x44435e(0xe7)]({'start':_0x37e2d6,'end':_0x37e2d6+'\xff'})){typeof _0x1e1c12===_0x44435e(0x2c5)&&_0x1e1c12['startsWith'](_0x37e2d6)&&_0x2dacac[_0x44435e(0x2a4)]({'id':_0x1e1c12['slice'](_0x37e2d6['length']),'entry':_0x39938d});}}catch{}return _0x2dacac;}static[_0x25d430(0x11a)](_0x5aa4c4){const _0x4631f7=_0x25d430,_0x233884=[];try{const _0x2b117f=_0x5aa4c4['openDB'](_0x4de3c9,{'dupSort':![]});for(const {key:_0x10912e,value:_0x574b26}of _0x2b117f[_0x4631f7(0xe7)]({})){if(typeof _0x10912e!==_0x4631f7(0x2c5))continue;const _0x4e7ebe=_0x10912e[_0x4631f7(0x2f8)](':');if(_0x4e7ebe<0x1)continue;_0x233884[_0x4631f7(0x2a4)]({'namespace':_0x10912e[_0x4631f7(0x14e)](0x0,_0x4e7ebe),'id':_0x10912e['slice'](_0x4e7ebe+0x1),'entry':_0x574b26});}}catch{}return _0x233884;}}return okdbLock={'OKDBLock':_0x38412e},okdbLock;}var version=_0x4abb0e(0x311),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function _0x35c1(_0x50307b,_0x2addc6){_0x50307b=_0x50307b-0xcd;const _0xef4537=_0xef45();let _0x35c1d2=_0xef4537[_0x50307b];return _0x35c1d2;}function requireOkdbProcessRegistry(){const _0x74ed62=_0x4abb0e;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x440a57=require$$0$3,_0x45598d=require$$1$1,_0x4717b4=require$$2,{LOOP:_0x309375}=requireOkdbLoopMonitor(),{OKDBLock:_0x564a3e}=requireOkdbLock(),{SYNC_COMMITS:_0x482b9f}=requireOkdbWriter(),_0x4c0b96=_0x74ed62(0x294),_0x4523cc='node',_0x5794e4=_0x74ed62(0x28d),_0x3d77f9=_0x74ed62(0x31c),_0x4b7a3f=(_0x34c57a,_0x5a4ad2)=>_0x34c57a+':'+_0x5a4ad2,_0x312863=(_0x5078d7,_0x385980)=>_0x5078d7+'::'+_0x385980,_0x1c35bb=(_0x8670f,_0x4cfe6d)=>_0x8670f+'/'+_0x4cfe6d,_0x2c1644=(_0x5b170a,_0xe4036f)=>_0x5b170a+'#'+_0xe4036f,_0x246e60=_0x14ab71=>{const _0x3daa36=_0x74ed62;if(_0x14ab71?.[_0x3daa36(0x1a2)])return _0x14ab71['processKey'];const _0x1db8b7=_0x14ab71?.['nodeKey'];return typeof _0x1db8b7===_0x3daa36(0x2c5)&&_0x1db8b7[_0x3daa36(0x2c1)]('#')?_0x1db8b7[_0x3daa36(0x14e)](0x0,_0x1db8b7['indexOf']('#')):_0x1db8b7;},_0x597476=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x5e39b4=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x1ca7f1=_0x597476*0x3,_0xd3c2ed=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x74ed62(0xf5)](0x927c0,_0x1ca7f1*0x14),_0x30bf17=[_0x74ed62(0x1c8),'processor:ready',_0x74ed62(0x309),_0x74ed62(0x1ab),'processor:paused','processor:resumed'];let _0x210cfa=null;function _0x2b0706(){const _0x167de8=_0x74ed62;if(_0x210cfa==null)_0x210cfa=Math[_0x167de8(0x24b)]((Date[_0x167de8(0x19d)]()-process[_0x167de8(0x215)]()*0x3e8)/0x3e8)*0x3e8;return _0x210cfa;}function _0x166076(_0x174cec){const _0x551640=_0x74ed62;if(process.env.OKDB_PROCESS_KILL===_0x551640(0x267))return![];if(_0x174cec?.[_0x551640(0xe0)]?.['processes']&&typeof _0x174cec[_0x551640(0xe0)][_0x551640(0xff)]===_0x551640(0x292)&&_0x174cec[_0x551640(0xe0)][_0x551640(0xff)][_0x551640(0x162)]===![])return![];return!![];}function _0xaa62dd(_0x449758,_0x37f610){const _0x5d0d44=_0x74ed62,_0x248af0=!!_0x37f610?.[_0x5d0d44(0x277)];switch(_0x449758){case _0x5d0d44(0x289):return{'controllable':_0x248af0,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x5d0d44(0x2ca):case _0x5d0d44(0x323):return{'controllable':_0x248af0,'decommissionable':![],'killable':!![],'killConfirm':_0x5d0d44(0x1fc)};case _0x5d0d44(0x2b0):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x5d0d44(0x15a):case _0x5d0d44(0x27e):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x5d0d44(0x183)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x46fe23{constructor(_0x1aba01){const _0x5aca12=_0x74ed62;this[_0x5aca12(0x137)]=_0x1aba01,this['_statusEnv']=null,this[_0x5aca12(0x2c4)]=null,this[_0x5aca12(0x310)]=new Map(),this[_0x5aca12(0x204)]=null,this[_0x5aca12(0x26b)]=![],this[_0x5aca12(0x29c)]=![],this[_0x5aca12(0x23c)]=_0x2b0706(),this[_0x5aca12(0x13c)]=_0x4b7a3f(process['pid'],this[_0x5aca12(0x23c)]),this[_0x5aca12(0x124)]=_0x4717b4['randomUUID']()['slice'](0x0,0x8),this['_rowKey']=_0x2c1644(this['_selfKey'],this[_0x5aca12(0x124)]),this['_startedAt']=Date[_0x5aca12(0x19d)](),this[_0x5aca12(0x2e7)]=null,this[_0x5aca12(0x1fe)]=null,this[_0x5aca12(0x125)]=null,this[_0x5aca12(0x26e)]=null,this[_0x5aca12(0x312)]=null,this[_0x5aca12(0x222)]=null,this[_0x5aca12(0x12b)]=0x0,this[_0x5aca12(0x264)]={},this[_0x5aca12(0x242)]=new Map(),this['_lastCpuUsage']=process[_0x5aca12(0x1f2)](),this[_0x5aca12(0x159)]=Date[_0x5aca12(0x19d)](),this['_lastCpuPct']=0x0,this['_threadStats']=new Map();}get[_0x74ed62(0x11c)](){return this['_selfKey'];}get[_0x74ed62(0x1a0)](){return this['_rowKey'];}['_caps'](_0x4112f9,_0x3808b6){const _0x5e6fbb=_0x74ed62,_0x56ade8=_0xaa62dd(_0x4112f9,_0x3808b6);if(_0x56ade8[_0x5e6fbb(0x2d8)]&&!_0x166076(this[_0x5e6fbb(0x137)]))return{..._0x56ade8,'killable':![],'killConfirm':undefined};return _0x56ade8;}[_0x74ed62(0x1de)](){const _0xa6b50e=_0x74ed62;return!!this[_0xa6b50e(0x14d)];}[_0x74ed62(0x214)](_0x42d72b){const _0x5f2755=_0x74ed62;Object[_0x5f2755(0x22c)](this['_ownMeta'],_0x42d72b||{});}[_0x74ed62(0x235)](_0x360f39){if(_0x360f39)this['_listenAddr']=_0x360f39;}[_0x74ed62(0x10e)](_0x5a6a3f={}){const _0x1b2d7=_0x74ed62;return this[_0x1b2d7(0x137)][_0x1b2d7(0x15f)](_0x5a6a3f);}[_0x74ed62(0x17d)](){const _0x214f9a=_0x74ed62,_0x5c8b92={};let _0x179881=0x0,_0x6a9acd=0x0;const _0x1fe6fe=new Set();for(const _0x26070e of this[_0x214f9a(0x227)]()){_0x6a9acd++;const _0x140d96=_0x26070e[_0x214f9a(0x307)];if(!_0x140d96)continue;if(_0x140d96[_0x214f9a(0xef)])_0x179881++;for(const _0x56cc0d of _0x140d96[_0x214f9a(0x277)]||[]){if(![_0x214f9a(0x25a),'fanout'][_0x214f9a(0x2c1)](_0x56cc0d[_0x214f9a(0xf1)]))continue;(_0x56cc0d[_0x214f9a(0x2a0)]==='online'||_0x56cc0d[_0x214f9a(0x2a0)]==='building')&&_0x56cc0d[_0x214f9a(0x2be)]&&_0x1fe6fe[_0x214f9a(0x128)]((_0x56cc0d['env']||_0x214f9a(0x1ea))+':'+_0x56cc0d[_0x214f9a(0x2be)]);const _0x15b445=_0x56cc0d['env']||_0x214f9a(0x1ea);(_0x5c8b92[_0x15b445]||=[])[_0x214f9a(0x2a4)]({..._0x56cc0d,'env':_0x15b445,'owner':{'pid':_0x26070e[_0x214f9a(0x268)]??null,'kind':_0x26070e[_0x214f9a(0x25c)]??null}});}}for(const [_0x15b0e9,_0x1d4439]of Object[_0x214f9a(0x2e8)](_0x5c8b92)){for(const _0xce1387 of _0x1d4439){if(_0xce1387['mode']===_0x214f9a(0x25a)&&!_0xce1387[_0x214f9a(0x16f)]){const _0x1419ff=_0x15b0e9+':'+(_0xce1387[_0x214f9a(0x2be)]??'');if(!_0x1fe6fe[_0x214f9a(0x275)](_0x1419ff))_0xce1387[_0x214f9a(0x313)]=!![];}}}return{'envs':_0x5c8b92,'policy':null,'participation':{'participating':_0x179881,'total':_0x6a9acd},'source':_0x214f9a(0x189)};}[_0x74ed62(0x21b)](){const _0x579821=_0x74ed62,_0x4b056f=_0x3814e7=>{const _0x3a3314=_0x35c1;if(_0x3814e7[_0x3a3314(0x2a0)]==='online'||_0x3814e7[_0x3a3314(0x2a0)]===_0x3a3314(0x286)||_0x3814e7[_0x3a3314(0x2a0)]==='error')return 0x3;if(_0x3814e7[_0x3a3314(0x16f)])return 0x1;return 0x2;},_0xae7228=new Map();for(const _0xd90f85 of this[_0x579821(0x227)]()){for(const _0x5ab9ee of _0xd90f85[_0x579821(0x307)]?.[_0x579821(0x277)]||[]){const _0x3c2443={..._0x5ab9ee,'owner':{'pid':_0xd90f85[_0x579821(0x268)]??null,'kind':_0xd90f85[_0x579821(0x25c)]??null,'host':_0xd90f85['host']??null}},_0x12f001=_0x5ab9ee['mode']===_0x579821(0x25a)?_0x579821(0x29f)+(_0x5ab9ee[_0x579821(0xee)]??'')+'::'+(_0x5ab9ee[_0x579821(0x2be)]??_0x5ab9ee[_0x579821(0x16c)]??_0x5ab9ee['id']):_0x579821(0x1df)+(_0xd90f85[_0x579821(0x2a9)]??_0xd90f85[_0x579821(0x1a2)]??'')+'::'+(_0x5ab9ee[_0x579821(0xee)]??'')+'::'+_0x5ab9ee['id'],_0x1daa22=_0xae7228[_0x579821(0x106)](_0x12f001);if(!_0x1daa22||_0x4b056f(_0x3c2443)>_0x4b056f(_0x1daa22))_0xae7228[_0x579821(0x30d)](_0x12f001,_0x3c2443);}}return[..._0xae7228['values']()];}['clusterStatusView'](){const _0x35b51e=_0x74ed62,_0x2f422c=Date[_0x35b51e(0x19d)](),_0x415876=this[_0x35b51e(0x227)](),_0x24557e=_0x242366=>Math[_0x35b51e(0xf5)](0x0,Math[_0x35b51e(0x24b)]((_0x2f422c-(_0x242366[_0x35b51e(0x2e1)]||_0x2f422c))/0x3e8)),_0x5266f3=_0x415876[_0x35b51e(0xf9)](_0x13b6af=>_0x13b6af[_0x35b51e(0x25c)]===_0x35b51e(0x289)),_0x2e8bf8=_0x415876[_0x35b51e(0x2df)](_0x2a823a=>_0x2a823a[_0x35b51e(0x25c)]==='http-server');if(_0x5266f3||_0x2e8bf8[_0x35b51e(0x200)])return{'primary':_0x5266f3?{'pid':_0x5266f3[_0x35b51e(0x268)],'uptime':_0x24557e(_0x5266f3)}:null,'workers':_0x2e8bf8[_0x35b51e(0x2fe)](_0x2e4a22=>({'pid':_0x2e4a22['pid'],'uptime':_0x24557e(_0x2e4a22)})),'workersConfigured':_0x5266f3?.[_0x35b51e(0x241)]?.[_0x35b51e(0x207)]??_0x2e8bf8[_0x35b51e(0x200)],'mode':_0x35b51e(0x318)};const _0x3e7f79=_0x415876[_0x35b51e(0xf9)](_0x12c5a0=>_0x12c5a0[_0x35b51e(0x25c)]===_0x35b51e(0x2ca)||_0x12c5a0[_0x35b51e(0x25c)]===_0x35b51e(0x323)||_0x12c5a0['kind']===_0x35b51e(0x2b0)),_0xe7b03a=_0x3e7f79?{'pid':_0x3e7f79[_0x35b51e(0x268)],'uptime':_0x24557e(_0x3e7f79)}:{'pid':process[_0x35b51e(0x268)],'uptime':Math[_0x35b51e(0xf5)](0x0,Math[_0x35b51e(0x24b)](process[_0x35b51e(0x215)]()))};return{'primary':_0xe7b03a,'workers':[_0xe7b03a],'workersConfigured':0x1,'mode':_0x35b51e(0x25a)};}[_0x74ed62(0xdb)](){const _0x309636=_0x74ed62;return this[_0x309636(0x1f5)]();}[_0x74ed62(0x203)](){const _0x25c70d=_0x74ed62,_0x3e6809=new Map();for(const _0x2f19cd of this[_0x25c70d(0x1f5)]())_0x3e6809[_0x25c70d(0x30d)](_0x2f19cd[_0x25c70d(0x1a2)],{..._0x2f19cd,'children':[]});const _0x552fcb=[];for(const _0x497212 of _0x3e6809[_0x25c70d(0x1ae)]()){const _0x8480f=_0x497212[_0x25c70d(0x1a7)]?_0x3e6809[_0x25c70d(0x106)](_0x497212[_0x25c70d(0x1a7)]):null;if(_0x8480f&&_0x8480f!==_0x497212)_0x8480f[_0x25c70d(0x155)][_0x25c70d(0x2a4)](_0x497212);else _0x552fcb[_0x25c70d(0x2a4)](_0x497212);}const _0x10e54d=(_0xff9b9c,_0x193030)=>_0xff9b9c[_0x25c70d(0x25c)]===_0x193030['kind']?(_0xff9b9c[_0x25c70d(0x268)]||0x0)-(_0x193030[_0x25c70d(0x268)]||0x0):(_0xff9b9c[_0x25c70d(0x25c)]??'')<(_0x193030['kind']??'')?-0x1:0x1,_0x372176=_0x3648f6=>{const _0x5de719=_0x25c70d;_0x3648f6[_0x5de719(0x2ee)](_0x10e54d);for(const _0x2dd295 of _0x3648f6)if(_0x2dd295[_0x5de719(0x155)][_0x5de719(0x200)])_0x372176(_0x2dd295['children']);};return _0x372176(_0x552fcb),_0x552fcb;}[_0x74ed62(0x20e)](_0x4f8c3f){const _0x3d6bcd=_0x74ed62;return this[_0x3d6bcd(0x1f5)]()[_0x3d6bcd(0xf9)](_0x246b67=>_0x246b67[_0x3d6bcd(0x1a2)]===_0x4f8c3f)??null;}['_groupByProcess'](_0x4da618=Date[_0x74ed62(0x19d)]()){const _0x466267=_0x74ed62,_0x20a708=new Map();for(const _0x26b0e4 of this[_0x466267(0x227)]()){const _0x2b8be4=_0x246e60(_0x26b0e4);let _0x4ddb1a=_0x20a708[_0x466267(0x106)](_0x2b8be4);!_0x4ddb1a&&(_0x4ddb1a={'processKey':_0x2b8be4,'nodeKey':_0x2b8be4,'pid':_0x26b0e4[_0x466267(0x268)],'ppid':_0x26b0e4[_0x466267(0x230)]??null,'host':_0x26b0e4['host']??null,'kind':_0x26b0e4['kind'],'role':null,'supervisorKey':_0x26b0e4[_0x466267(0x1a7)]??null,'slot':_0x26b0e4[_0x466267(0x14b)]??null,'slotKey':_0x26b0e4[_0x466267(0x150)]??null,'caps':_0x26b0e4[_0x466267(0x28e)]??null,'lifecycle':_0x26b0e4[_0x466267(0x21f)]??null,'uptime':Math[_0x466267(0xf5)](0x0,Math['round']((_0x4da618-(_0x26b0e4[_0x466267(0x2e1)]||_0x4da618))/0x3e8)),'startedAt':_0x26b0e4[_0x466267(0x2e1)]??null,'meta':_0x26b0e4[_0x466267(0x241)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x20a708['set'](_0x2b8be4,_0x4ddb1a));_0x4ddb1a[_0x466267(0x12f)]['push']({'instanceId':_0x26b0e4['instanceId']??null,'role':_0x26b0e4[_0x466267(0x237)]??null,'listenAddr':_0x26b0e4[_0x466267(0x102)]??null,'lifecycle':_0x26b0e4[_0x466267(0x21f)]??null,'processing':_0x26b0e4[_0x466267(0x307)]??null});if(!_0x4ddb1a['role']&&_0x26b0e4[_0x466267(0x237)])_0x4ddb1a[_0x466267(0x237)]=_0x26b0e4[_0x466267(0x237)];if(!_0x4ddb1a[_0x466267(0x102)]&&_0x26b0e4['listenAddr'])_0x4ddb1a[_0x466267(0x102)]=_0x26b0e4['listenAddr'];if(!_0x4ddb1a[_0x466267(0x307)]&&_0x26b0e4[_0x466267(0x307)])_0x4ddb1a[_0x466267(0x307)]=_0x26b0e4[_0x466267(0x307)];if(!_0x4ddb1a[_0x466267(0x20c)]&&_0x26b0e4['engines'])_0x4ddb1a[_0x466267(0x20c)]=_0x26b0e4['engines'];if(!_0x4ddb1a[_0x466267(0x166)]&&_0x26b0e4[_0x466267(0x166)])_0x4ddb1a['singletonClaims']=_0x26b0e4['singletonClaims'];if(_0x4ddb1a['caps']==null&&_0x26b0e4[_0x466267(0x28e)])_0x4ddb1a[_0x466267(0x28e)]=_0x26b0e4[_0x466267(0x28e)];if(_0x26b0e4[_0x466267(0x1e5)]&&(!_0x4ddb1a[_0x466267(0x1e5)]||(_0x26b0e4['stats']['at']??0x0)>(_0x4ddb1a[_0x466267(0x1e5)]['at']??0x0)))_0x4ddb1a['stats']=_0x26b0e4[_0x466267(0x1e5)];}return[..._0x20a708[_0x466267(0x1ae)]()];}[_0x74ed62(0x2e2)](){const _0x5c55bc=_0x74ed62,_0x1f3e07=[],_0x4472ff={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x2cff10 of this[_0x5c55bc(0x1f5)]()){_0x1f3e07[_0x5c55bc(0x2a4)]({'processKey':_0x2cff10['processKey'],'kind':_0x2cff10[_0x5c55bc(0x25c)],'pid':_0x2cff10[_0x5c55bc(0x268)],'supervisorKey':_0x2cff10['supervisorKey'],'meta':_0x2cff10[_0x5c55bc(0x241)]??null,'uptime':_0x2cff10['uptime'],'stats':_0x2cff10['stats']??null}),_0x4472ff['processes']++;if(_0x2cff10[_0x5c55bc(0x1e5)]){_0x4472ff[_0x5c55bc(0x2b7)]+=_0x2cff10[_0x5c55bc(0x1e5)][_0x5c55bc(0x2b7)]||0x0,_0x4472ff[_0x5c55bc(0x304)]+=(_0x2cff10['stats'][_0x5c55bc(0x304)]||0x0)+(_0x2cff10[_0x5c55bc(0x1e5)][_0x5c55bc(0x108)]?.[_0x5c55bc(0x304)]||0x0);const _0xc7db99=_0x2cff10[_0x5c55bc(0x1e5)][_0x5c55bc(0x108)];_0xc7db99&&(_0x4472ff[_0x5c55bc(0x108)][_0x5c55bc(0x2ed)]+=_0xc7db99[_0x5c55bc(0x2ed)]||0x0,_0x4472ff[_0x5c55bc(0x108)]['sandbox']+=_0xc7db99[_0x5c55bc(0x1da)]||0x0,_0x4472ff[_0x5c55bc(0x108)]['busy']+=_0xc7db99[_0x5c55bc(0x2bf)]||0x0);}}return{'totals':_0x4472ff,'nodes':_0x1f3e07};}async[_0x74ed62(0x100)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x2e30e4=_0x74ed62;this[_0x2e30e4(0x26b)]=this[_0x2e30e4(0x26b)]||!!writer,this[_0x2e30e4(0x29c)]=this[_0x2e30e4(0x29c)]||!!reader,this['_kind']=kind||this[_0x2e30e4(0x2e7)]||(_0x45598d[_0x2e30e4(0x1b8)]?_0x2e30e4(0x259):_0x2e30e4(0x2ca)),this[_0x2e30e4(0x1fe)]=supervisorKey??this[_0x2e30e4(0x1fe)],this[_0x2e30e4(0x125)]=listenAddr??this[_0x2e30e4(0x125)],this['_ensureDesired'](),await this[_0x2e30e4(0x1ce)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x2e96d9=await this[_0x2e30e4(0x137)]['createEnvironment'](_0x4c0b96,{'sync':![],'durability':_0x2e30e4(0x19f)});await _0x2e96d9[_0x2e30e4(0x228)](_0x4523cc),this[_0x2e30e4(0x14d)]=_0x2e96d9;}return this['_statusEnv'];}[_0x74ed62(0x1b9)](){const _0x53d673=_0x74ed62;return this['_nodeDbFor']!==this[_0x53d673(0x14d)]&&(this[_0x53d673(0x143)]=this[_0x53d673(0x14d)],this[_0x53d673(0x20d)]=this[_0x53d673(0x14d)]['_getType'](_0x4523cc)['data']),this[_0x53d673(0x20d)];}[_0x74ed62(0x24d)](_0x54b72e){const _0x544f64=_0x74ed62;if(_0x482b9f)return this[_0x544f64(0x1b9)]()[_0x544f64(0x27d)](_0x54b72e['nodeKey'],_0x54b72e,0x1);const _0x40ef8e=this[_0x544f64(0x1b9)]()[_0x544f64(0x2f3)](_0x54b72e[_0x544f64(0x2a9)],_0x54b72e,0x1);if(_0x40ef8e&&typeof _0x40ef8e['then']==='function')_0x40ef8e[_0x544f64(0x2b2)](undefined,()=>{});return _0x40ef8e;}[_0x74ed62(0x262)](_0x57b534){const _0x4bb715=_0x74ed62;return this['_nodeDb']()['putSync'](_0x57b534[_0x4bb715(0x2a9)],_0x57b534,0x1);}[_0x74ed62(0x25d)](_0x363935){const _0x5cbf1c=_0x74ed62;if(_0x482b9f)try{return this[_0x5cbf1c(0x1b9)]()['removeSync'](_0x363935);}catch{return![];}const _0x4fb643=this[_0x5cbf1c(0x1b9)]()[_0x5cbf1c(0x24f)](_0x363935);if(_0x4fb643&&typeof _0x4fb643[_0x5cbf1c(0x2b2)]===_0x5cbf1c(0x160))_0x4fb643[_0x5cbf1c(0x2b2)](undefined,()=>{});return _0x4fb643;}async[_0x74ed62(0x13a)](_0x36c7d6){const _0x13cb06=_0x74ed62;if(!this[_0x13cb06(0x14d)]||!this[_0x13cb06(0x26b)]||!_0x36c7d6?.['nodeKey'])return;return this[_0x13cb06(0x24d)](_0x36c7d6);}async[_0x74ed62(0x2e4)](_0x57af06){const _0x3865d1=_0x74ed62;if(!this[_0x3865d1(0x14d)]||!this[_0x3865d1(0x26b)]||!_0x57af06)return;const _0xe1c3dc=_0x57af06[_0x3865d1(0x2c1)]('#'),_0x5c0cfe=[];for(const {key:_0x20b277}of this['_statusEnv'][_0x3865d1(0xe7)](_0x4523cc)){if(_0x20b277===_0x57af06||!_0xe1c3dc&&typeof _0x20b277==='string'&&_0x20b277[_0x3865d1(0xda)](_0x57af06+'#'))_0x5c0cfe['push'](_0x20b277);}for(const _0x8f079a of _0x5c0cfe){try{this[_0x3865d1(0x1b9)]()[_0x3865d1(0x17a)](_0x8f079a);}catch{}}}['_nodeDead'](_0x1e0010){const _0x399008=_0x74ed62;if(typeof _0x1e0010?.['pid']!==_0x399008(0x15e))return![];if(_0x1e0010['host']!==_0x440a57[_0x399008(0x306)]())return![];if(_0x1e0010[_0x399008(0x268)]===process[_0x399008(0x268)])return![];if(_0x1e0010[_0x399008(0x149)]!=null&&_0x1e0010[_0x399008(0x149)]<Date[_0x399008(0x19d)]()-_0xd3c2ed)return!![];try{return process['kill'](_0x1e0010['pid'],0x0),![];}catch(_0x24ff19){return _0x24ff19[_0x399008(0x28b)]===_0x399008(0x15d);}}[_0x74ed62(0x227)](){const _0x3d5656=_0x74ed62;if(!this[_0x3d5656(0x14d)])return[];try{this[_0x3d5656(0x14d)]['db']?.[_0x3d5656(0x23a)]?.();}catch{}const _0x5507ee=Date[_0x3d5656(0x19d)](),_0x20ae45=_0x440a57[_0x3d5656(0x306)](),_0x4704e5=[];for(const {value:_0x1ad351}of this[_0x3d5656(0x14d)][_0x3d5656(0xe7)](_0x4523cc)){if(!_0x1ad351)continue;let _0x3c6299=null;_0x1ad351[_0x3d5656(0x302)]===_0x20ae45&&typeof _0x1ad351['pid']===_0x3d5656(0x15e)&&(_0x3c6299=!this[_0x3d5656(0x2fb)](_0x1ad351));if(_0x3c6299===![])continue;const _0x35ce38=_0x1ad351[_0x3d5656(0x149)]==null||_0x1ad351[_0x3d5656(0x149)]>=_0x5507ee;if(_0x3c6299===!![]||_0x35ce38)_0x4704e5[_0x3d5656(0x2a4)](_0x1ad351);}return _0x4704e5;}async[_0x74ed62(0x1e9)](_0x423756=0x0){const _0x569a3a=_0x74ed62;if(!this[_0x569a3a(0x14d)]||!this[_0x569a3a(0x26b)])return;const _0x5b806d=Date[_0x569a3a(0x19d)]()-_0x423756,_0x14af3a=new Set(),_0x5560dd=[],_0x16085e=_0x440a57['hostname'](),_0x22fbeb=require$$6[_0x569a3a(0x209)];for(const {key:_0x9da4bb,value:_0x4c19be}of this[_0x569a3a(0x14d)][_0x569a3a(0xe7)](_0x4523cc)){if(!_0x4c19be)continue;const _0x5f23a4=_0x4c19be['host']===_0x16085e&&typeof _0x4c19be[_0x569a3a(0x268)]===_0x569a3a(0x15e),_0x5a4898=_0x5f23a4?this[_0x569a3a(0x2fb)](_0x4c19be):_0x4c19be[_0x569a3a(0x149)]!=null&&_0x4c19be[_0x569a3a(0x149)]<_0x5b806d;if(_0x5a4898)_0x5560dd['push'](_0x9da4bb);else{_0x14af3a[_0x569a3a(0x128)](_0x246e60(_0x4c19be)??_0x9da4bb);if(_0x4c19be[_0x569a3a(0x209)]&&_0x4c19be[_0x569a3a(0x209)]!==_0x22fbeb){if(!this[_0x569a3a(0x12c)])this[_0x569a3a(0x12c)]=new Set();!this[_0x569a3a(0x12c)]['has'](_0x4c19be['version'])&&(this[_0x569a3a(0x12c)][_0x569a3a(0x128)](_0x4c19be[_0x569a3a(0x209)]),this[_0x569a3a(0x137)][_0x569a3a(0x210)]?.['warn']?.('process\x20'+(_0x4c19be[_0x569a3a(0x268)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x4c19be[_0x569a3a(0x209)]+_0x569a3a(0x2eb)+_0x22fbeb+_0x569a3a(0x30e)+_0x569a3a(0x261),{'feature':_0x569a3a(0x300)}));}}}for(const _0x1b876a of _0x5560dd)this['_removeRowAsync'](_0x1b876a);if(this[_0x569a3a(0x1b5)]()){const _0x51d731=[];for(const {key:_0x17ee71}of this['listDesired'](_0x569a3a(0x127))){if(!_0x14af3a[_0x569a3a(0x275)](_0x17ee71)){if(_0x482b9f)try{this[_0x569a3a(0x2c4)][_0x569a3a(0x17a)]('node/'+_0x17ee71);}catch{}else _0x51d731[_0x569a3a(0x2a4)](this[_0x569a3a(0x2c4)][_0x569a3a(0x24f)]('node/'+_0x17ee71));}}if(_0x51d731[_0x569a3a(0x200)])await Promise[_0x569a3a(0x157)](_0x51d731);}}[_0x74ed62(0x22d)](_0x364176=null){const _0x598bd6=_0x74ed62;if(this[_0x598bd6(0x26e)])return;if(!this[_0x598bd6(0x26b)]||!this[_0x598bd6(0x14d)]){this[_0x598bd6(0x137)]?.[_0x598bd6(0x210)]?.[_0x598bd6(0x1ca)]?.(_0x598bd6(0x2a8)+this[_0x598bd6(0x26b)]+'\x20statusEnv='+!!this[_0x598bd6(0x14d)]+_0x598bd6(0x280),{'feature':_0x598bd6(0xff)});return;}this[_0x598bd6(0x222)]=_0x364176,this[_0x598bd6(0x312)]=()=>this[_0x598bd6(0x1af)]();for(const _0x42f74f of _0x30bf17)this[_0x598bd6(0x137)][_0x598bd6(0x20f)]['on'](_0x42f74f,this[_0x598bd6(0x312)]);this['_publishNow']();const _0x10bf0e=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x597476;this[_0x598bd6(0x26e)]=setInterval(()=>{const _0x16005a=_0x598bd6;if(this['_onTick'])try{this[_0x16005a(0x222)]();}catch{}this[_0x16005a(0x254)](),this[_0x16005a(0x1e9)]()[_0x16005a(0x223)](()=>{});},_0x10bf0e);if(this['_hbTimer'][_0x598bd6(0x2a3)])this[_0x598bd6(0x26e)][_0x598bd6(0x2a3)]();}[_0x74ed62(0x1af)](){const _0x4931f6=_0x74ed62;if(!this['_isWriter']||!this['_statusEnv'])return;if(Date['now']()-this['_lastPublishAt']<_0x5e39b4)return;this[_0x4931f6(0x254)]();}[_0x74ed62(0x254)](){const _0x4d198a=_0x74ed62;if(!this['_isWriter']||!this['_statusEnv'])return;this[_0x4d198a(0x12b)]=Date[_0x4d198a(0x19d)]();try{const _0x89c849=[this['_buildOwnRow']()];for(const _0x210b06 of this[_0x4d198a(0x242)]['values']())_0x89c849[_0x4d198a(0x2a4)](this[_0x4d198a(0x31e)](_0x210b06));const _0x9cba30=_0x309375[_0x4d198a(0x12a)]?_0x309375[_0x4d198a(0x19d)]():0x0;for(const _0x61a96b of _0x89c849){try{this[_0x4d198a(0x262)](_0x61a96b),this[_0x4d198a(0x2cc)]=![];}catch(_0x10e8b0){!this[_0x4d198a(0x2cc)]&&(this[_0x4d198a(0x2cc)]=!![],this['okdb']?.[_0x4d198a(0x210)]?.[_0x4d198a(0x1ca)]?.(_0x4d198a(0x14f)+_0x10e8b0[_0x4d198a(0x110)],{'feature':_0x4d198a(0xff)}));}}if(_0x309375['enabled'])_0x309375[_0x4d198a(0x1f8)](_0x4d198a(0xcf),_0x309375['now']()-_0x9cba30,_0x4d198a(0x218)+_0x89c849[_0x4d198a(0x200)]+'\x20sync');}catch(_0x49ffe5){!this[_0x4d198a(0x2cc)]&&(this[_0x4d198a(0x2cc)]=!![],this[_0x4d198a(0x137)]?.[_0x4d198a(0x210)]?.[_0x4d198a(0x1ca)]?.(_0x4d198a(0x14f)+_0x49ffe5[_0x4d198a(0x110)],{'feature':_0x4d198a(0xff)}));}}async[_0x74ed62(0x1ad)](){const _0x1e3175=_0x74ed62;if(this[_0x1e3175(0x312)]){for(const _0x4e2532 of _0x30bf17){try{this['okdb'][_0x1e3175(0x20f)][_0x1e3175(0x267)](_0x4e2532,this[_0x1e3175(0x312)]);}catch{}}this[_0x1e3175(0x312)]=null;}this[_0x1e3175(0x26e)]&&(clearInterval(this[_0x1e3175(0x26e)]),this['_hbTimer']=null);try{if(this['_statusEnv']&&this['_isWriter'])await this['removeNode'](this[_0x1e3175(0x1e3)]);}catch{}}async[_0x74ed62(0x2b3)](){const _0x1dfb47=_0x74ed62;if(!this[_0x1dfb47(0x14d)]||!this[_0x1dfb47(0x26b)])return;try{await this['removeNode'](this[_0x1dfb47(0x1e3)]);}catch{}try{const _0x34dada=[];for(const {value:_0x3f8ac6}of this[_0x1dfb47(0x14d)]['getRange'](_0x4523cc)){if(_0x3f8ac6?.[_0x1dfb47(0x230)]===process['pid']&&_0x3f8ac6[_0x1dfb47(0x2a9)])_0x34dada[_0x1dfb47(0x2a4)](_0x3f8ac6[_0x1dfb47(0x2a9)]);}for(const _0x4fcfae of _0x34dada){try{await this[_0x1dfb47(0x2e4)](_0x4fcfae);}catch{}}}catch{}}async[_0x74ed62(0x1b6)](){const _0x24ef47=_0x74ed62;return this[_0x24ef47(0x13a)](this[_0x24ef47(0x132)]());}async['publishChildRow'](_0x7d135f){const _0x27502d=_0x74ed62;if(!this[_0x27502d(0x14d)]||!this[_0x27502d(0x26b)])return;return this[_0x27502d(0x13a)](this['_buildChildRow'](_0x7d135f));}[_0x74ed62(0x31e)]({pid:_0x136bb7,startedAt:_0x546634,kind:_0x4bf41b,supervisorKey:_0x3afce9,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x74ed62(0x2c2),meta:meta=null,stats:stats=null}){const _0x5bf19e=_0x74ed62,_0xb19c66=Date[_0x5bf19e(0x19d)](),_0x448e77=_0x4b7a3f(_0x136bb7,_0x546634);return{'nodeKey':_0x2c1644(_0x448e77,'0'),'processKey':_0x448e77,'instanceId':'0','pid':_0x136bb7,'startedAt':_0x546634,'ppid':process[_0x5bf19e(0x268)],'host':_0x440a57[_0x5bf19e(0x306)](),'supervisorKey':_0x3afce9,'slot':slot,'slotKey':slotKey,'kind':_0x4bf41b,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0xb19c66,'expiresAt':_0xb19c66+_0x1ca7f1,'caps':this[_0x5bf19e(0x1cf)](_0x4bf41b,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x74ed62(0x25f)](_0x52105c){const _0x362d37=_0x74ed62;if(!_0x52105c?.['pid'])return null;const _0x1c8800=_0x4b7a3f(_0x52105c[_0x362d37(0x268)],_0x52105c['startedAt']);this['_children'][_0x362d37(0x30d)](_0x1c8800,{..._0x52105c,'supervisorKey':_0x52105c[_0x362d37(0x1a7)]??this['_selfKey']});if(this[_0x362d37(0x26b)])await this[_0x362d37(0x298)](this[_0x362d37(0x242)][_0x362d37(0x106)](_0x1c8800))[_0x362d37(0x223)]?.(()=>{});return _0x1c8800;}[_0x74ed62(0x1a6)](_0xbc1505){const _0x2f2b34=_0x74ed62;if(!_0xbc1505)return;return this[_0x2f2b34(0x242)][_0x2f2b34(0x1a3)](_0xbc1505),this[_0x2f2b34(0x2e4)](_0xbc1505);}[_0x74ed62(0x256)](){const _0x1ff2f0=_0x74ed62,_0x6ee32a=Date[_0x1ff2f0(0x19d)](),_0x4570ea=process['cpuUsage'](),_0x50d897=(_0x6ee32a-this['_lastCpuAt'])*0x3e8;if(_0x50d897>=0x3d090){const _0x4f963c=_0x4570ea['user']-this[_0x1ff2f0(0x260)][_0x1ff2f0(0x297)]+(_0x4570ea[_0x1ff2f0(0x10c)]-this['_lastCpuUsage']['system']),_0x4213dd=_0x440a57['cpus']()['length']||0x1;this[_0x1ff2f0(0x1f0)]=Math[_0x1ff2f0(0x2a1)](0x64,Math[_0x1ff2f0(0x24b)](_0x4f963c/(_0x50d897*_0x4213dd)*0x64)),this[_0x1ff2f0(0x152)]=Math[_0x1ff2f0(0x24b)](_0x50d897/0x3e8),this['_lastCpuUsage']=_0x4570ea,this[_0x1ff2f0(0x159)]=_0x6ee32a;}const _0xbaa34=process[_0x1ff2f0(0x24a)](),_0x3742db=this['_threadStats'][_0x1ff2f0(0x2bd)];let _0x6f157=0x0;if(_0x3742db>0x0){const _0x57c927=[this[_0x1ff2f0(0x137)],...this[_0x1ff2f0(0x137)][_0x1ff2f0(0xd4)]?.[_0x1ff2f0(0x1ae)]?.()??[]];for(const _0x58b23e of _0x57c927){const _0x22de57=_0x58b23e[_0x1ff2f0(0x119)]?.[_0x1ff2f0(0x2a6)];if(_0x22de57)_0x6f157+=_0x22de57[_0x1ff2f0(0x26d)]['busy'];}}let _0x131ce4=null;const _0x2e3f0e=_0x3742db;if(_0x2e3f0e>0x0){let _0x1a55c0=0x0;for(const _0x3b53fc of this['_threadStats']['values']())_0x1a55c0+=_0x3b53fc[_0x1ff2f0(0x304)]||0x0;_0x131ce4={'count':_0x2e3f0e,'heapUsed':_0x1a55c0,'sandbox':_0x3742db,'busy':_0x6f157};}return{'rss':_0xbaa34[_0x1ff2f0(0x2b7)],'heapUsed':_0xbaa34['heapUsed'],'heapTotal':_0xbaa34['heapTotal'],'external':_0xbaa34[_0x1ff2f0(0x269)],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x1ff2f0(0x152)]??null,'threads':_0x131ce4,'at':_0x6ee32a};}['reportThreadStats'](_0x31ef8f,_0x42f73b){const _0x288905=_0x74ed62;if(!_0x31ef8f||!_0x42f73b)return;this['_threadStats'][_0x288905(0x30d)](_0x31ef8f,_0x42f73b);}[_0x74ed62(0xec)](_0xa4c6a5){const _0x4fea1f=_0x74ed62;this[_0x4fea1f(0x308)]['delete'](_0xa4c6a5);}[_0x74ed62(0x238)](_0x42931a,_0x327da7,_0x493082=undefined){const _0x3688c0=_0x74ed62,_0x4afe09=this[_0x3688c0(0x242)][_0x3688c0(0x106)](_0x42931a);if(!_0x4afe09||!_0x327da7)return;if(_0x493082!==undefined)_0x4afe09['processing']=_0x493082;_0x4afe09[_0x3688c0(0x1e5)]={'rss':_0x327da7[_0x3688c0(0x2b7)]??null,'heapUsed':_0x327da7['heapUsed']??null,'heapTotal':_0x327da7[_0x3688c0(0x1e1)]??null,'external':_0x327da7[_0x3688c0(0x269)]??null,'cpuPct':_0x327da7['cpuPct']??null,'cpuWindowMs':_0x327da7[_0x3688c0(0x276)]??null,'threads':_0x327da7[_0x3688c0(0x108)]??null,'claims':_0x327da7['claims']??null,'envsOpen':_0x327da7[_0x3688c0(0x16b)]??null,'at':Date[_0x3688c0(0x19d)]()};}[_0x74ed62(0x132)](){const _0x44edb8=_0x74ed62,_0x23d3c8=Date['now'](),_0x3efbd3=this[_0x44edb8(0x137)][_0x44edb8(0x10a)]||{},_0x38ce73=this['_kind']||_0x44edb8(0x2ca);return{'nodeKey':this[_0x44edb8(0x1e3)],'processKey':this[_0x44edb8(0x13c)],'instanceId':this[_0x44edb8(0x124)],'pid':process['pid'],'startedAt':this['_processStartedAt'],'instanceStartedAt':this[_0x44edb8(0xd5)],'ppid':typeof process['ppid']===_0x44edb8(0x15e)?process[_0x44edb8(0x230)]:null,'host':_0x440a57[_0x44edb8(0x306)](),'supervisorKey':this[_0x44edb8(0x1fe)]??null,'version':require$$6[_0x44edb8(0x209)],'kind':_0x38ce73,'role':{'engines':!!_0x3efbd3[_0x44edb8(0x20c)],'processors':!!_0x3efbd3[_0x44edb8(0x277)],'compaction':_0x3efbd3[_0x44edb8(0x12d)],'http':_0x3efbd3[_0x44edb8(0x226)]},'listenAddr':this[_0x44edb8(0x125)]??null,'heartbeatAt':_0x23d3c8,'expiresAt':_0x23d3c8+_0x1ca7f1,'caps':this[_0x44edb8(0x1cf)](_0x38ce73,_0x3efbd3),'lifecycle':{'state':_0x44edb8(0x2c2),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x3efbd3['processors']?this[_0x44edb8(0x1f1)]():null,'engines':_0x3efbd3['engines']?[...this[_0x44edb8(0x137)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x44edb8(0x1dd)](),'stats':this[_0x44edb8(0x256)](),'writers':this[_0x44edb8(0x1d3)]()};}[_0x74ed62(0x1d3)](){const _0x48e600=_0x74ed62,_0x2aafaa={};try{for(const [_0x2622d4,_0x1cedfe]of this['okdb'][_0x48e600(0xd4)]){try{const _0xf982f7=_0x1cedfe[_0x48e600(0x21c)]?.();if(!_0xf982f7)continue;if(!_0xf982f7[_0x48e600(0x165)]&&!_0xf982f7[_0x48e600(0x30a)]&&!(_0xf982f7[_0x48e600(0x156)]??0x0)&&!_0xf982f7[_0x48e600(0x2fa)])continue;_0x2aafaa[_0x2622d4]={'depth':_0xf982f7[_0x48e600(0x165)],'oldestPendingMs':_0xf982f7[_0x48e600(0x173)],'committed':_0xf982f7['committed'],'commitsPerSec':_0xf982f7[_0x48e600(0x1d8)],'commitP99Ms':_0xf982f7[_0x48e600(0x212)],'parkedNow':_0xf982f7[_0x48e600(0x156)]??0x0,'draining':!!_0xf982f7['draining']};}catch{}}}catch{}return Object[_0x48e600(0x172)](_0x2aafaa)[_0x48e600(0x200)]?_0x2aafaa:null;}[_0x74ed62(0x1dd)](){const _0x82a089=_0x74ed62,_0x435822=process[_0x82a089(0x268)],_0x298f31=Date[_0x82a089(0x19d)](),_0x2276c0=_0x1541a8=>{const _0x4be555=_0x82a089;if(!_0x1541a8)return[];const _0x365549=[];try{for(const {id:_0x524699,entry:_0x3777c1}of _0x1541a8[_0x4be555(0x2cf)]()){if(_0x3777c1?.['holder']?.[_0x4be555(0x268)]!==_0x435822)continue;const _0x12702=_0x3777c1['updatedAt']??_0x3777c1[_0x4be555(0x117)]??0x0;if(_0x12702+(_0x3777c1[_0x4be555(0x2d1)]??0x0)<_0x298f31)continue;_0x365549['push'](_0x524699);}}catch{}return _0x365549;},_0x21ee26=_0x2276c0(this['_singletonLock'](_0x82a089(0x281))),_0x302029=_0x2276c0(this[_0x82a089(0x13b)](_0x82a089(0x25e)));if(!_0x21ee26[_0x82a089(0x200)]&&!_0x302029[_0x82a089(0x200)])return null;return{'compact':_0x21ee26,'replicate':_0x302029};}['_singletonLock'](_0x2331e1){const _0x41878c=_0x74ed62;if(!this[_0x41878c(0x137)]?.['_rootDb'])return null;if(!this['_singletonLocks'])this[_0x41878c(0x1d4)]=new Map();let _0x415cf6=this[_0x41878c(0x1d4)][_0x41878c(0x106)](_0x2331e1);if(!_0x415cf6)try{_0x415cf6=new _0x564a3e(this['okdb'][_0x41878c(0x2ab)],{'namespace':_0x2331e1}),this[_0x41878c(0x1d4)]['set'](_0x2331e1,_0x415cf6);}catch{return null;}return _0x415cf6;}[_0x74ed62(0x1f1)](){const _0x2738a9=_0x74ed62,_0x24c46a=[];try{for(const [_0x29ab36,_0x3c8ffd]of this[_0x2738a9(0x137)]['_envs']){if(_0x29ab36[_0x2738a9(0xda)]('~'))continue;for(const _0x1b8dc5 of _0x3c8ffd['processor'][_0x2738a9(0x151)]())_0x24c46a[_0x2738a9(0x2a4)]({..._0x1b8dc5,'env':_0x29ab36});}}catch{}return{'participate':this[_0x2738a9(0x137)]['processors']?.[_0x2738a9(0xcd)]??![],'processors':_0x24c46a};}[_0x74ed62(0x1b5)](){const _0x419612=_0x74ed62;if(this['_desired'])return!![];const _0x2e44b1=this[_0x419612(0x137)][_0x419612(0x2ab)];if(!_0x2e44b1)return![];return this[_0x419612(0x2c4)]=_0x2e44b1['openDB'](_0x5794e4,{'dupSort':![]}),this[_0x419612(0x204)]=_0x2e44b1[_0x419612(0xe5)](_0x3d77f9,{'dupSort':![]}),!![];}async[_0x74ed62(0x1ce)](){const _0x569bda=_0x74ed62;if(!this[_0x569bda(0x1b5)]())return;const _0x47d2dc=_0x569bda(0x232),_0x182e65=0x1,_0x5cfc2d=this[_0x569bda(0x2c4)][_0x569bda(0x106)](_0x47d2dc)??0x0;if(_0x5cfc2d>=_0x182e65)return;const _0x421d02=_0x3d769e=>{const _0x295d3e=_0x569bda;if(_0x3d769e===_0x295d3e(0x27e))return _0x295d3e(0x25a);if(_0x3d769e===_0x295d3e(0x2b8))return _0x295d3e(0x258);return _0x3d769e;};await this[_0x569bda(0x137)]['_systemEnv'][_0x569bda(0x1d2)][_0x569bda(0x1bc)](()=>{const _0x2141a3=_0x569bda;for(const _0x4841ed of[_0x2141a3(0x116),_0x2141a3(0x314)]){for(const {key:_0x5c0b51,value:_0x5a3592}of this[_0x2141a3(0x2c4)][_0x2141a3(0xe7)]({'start':_0x4841ed,'end':_0x4841ed+'\xff'})){if(typeof _0x5c0b51!==_0x2141a3(0x2c5)||!_0x5c0b51[_0x2141a3(0xda)](_0x4841ed))break;const _0x89d8c9=_0x421d02(_0x5a3592[_0x2141a3(0xf1)]);if(_0x89d8c9!==_0x5a3592[_0x2141a3(0xf1)])this[_0x2141a3(0x2c4)][_0x2141a3(0x2f3)](_0x5c0b51,{..._0x5a3592,'mode':_0x89d8c9});}}this[_0x2141a3(0x2c4)][_0x2141a3(0x2f3)](_0x47d2dc,_0x182e65);});}['hasDesired'](){const _0x3ddb7e=_0x74ed62;return!!this[_0x3ddb7e(0x2c4)];}[_0x74ed62(0x320)](_0x49aa87,_0xd4fd87){const _0x5f26c8=_0x74ed62;if(!this[_0x5f26c8(0x1b5)]())return null;const _0x40d9ab=_0x49aa87+'/'+_0xd4fd87;return this['_refreshDesiredSnapshot'](),this['_desiredOverlay'][_0x5f26c8(0x106)](_0x40d9ab)??this['_desired'][_0x5f26c8(0x106)](_0x40d9ab)??null;}['_refreshDesiredSnapshot'](){const _0x450322=_0x74ed62;if(!_0x482b9f)return;try{this['okdb'][_0x450322(0x1c2)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x74ed62(0x154)](_0x8298a,_0x2da25c,_0x23cd9d){const _0x35eb09=_0x74ed62;if(!this['_ensureDesired']())return null;const _0x5a0df8=_0x8298a+'/'+_0x2da25c;this[_0x35eb09(0x2da)]();const _0x3df7cb=this[_0x35eb09(0x310)][_0x35eb09(0x106)](_0x5a0df8)??this[_0x35eb09(0x2c4)][_0x35eb09(0x106)](_0x5a0df8)??{'version':0x0},_0x34255c=(_0x3df7cb['version']||0x0)+0x1,_0x25893e={..._0x3df7cb,..._0x23cd9d,'version':_0x34255c,'updatedAt':Date[_0x35eb09(0x19d)]()};this[_0x35eb09(0x310)]['set'](_0x5a0df8,_0x25893e);try{await this['okdb'][_0x35eb09(0x1c2)][_0x35eb09(0x1d2)][_0x35eb09(0x1bc)](()=>{const _0x547133=_0x35eb09;this['_desired'][_0x547133(0x2f3)](_0x5a0df8,_0x25893e);});}finally{if(this['_desiredOverlay'][_0x35eb09(0x106)](_0x5a0df8)===_0x25893e)this[_0x35eb09(0x310)][_0x35eb09(0x1a3)](_0x5a0df8);}return _0x34255c;}['listDesired'](_0x4223be){const _0x50a8de=_0x74ed62;if(!this[_0x50a8de(0x1b5)]())return[];this[_0x50a8de(0x2da)]();const _0x20cd38=_0x4223be+'/',_0x4cf9c3=[];for(const {key:_0x3bea73,value:_0x1f77c3}of this['_desired'][_0x50a8de(0xe7)]({'start':_0x20cd38,'end':_0x20cd38+'\xff'})){if(typeof _0x3bea73!=='string'||!_0x3bea73['startsWith'](_0x20cd38))break;_0x4cf9c3[_0x50a8de(0x2a4)]({'key':_0x3bea73['slice'](_0x20cd38[_0x50a8de(0x200)]),'value':_0x1f77c3});}return _0x4cf9c3;}[_0x74ed62(0x153)](_0x4401ab){const _0x1a53c1=_0x74ed62;if(!this[_0x1a53c1(0x1b5)]())return null;return this[_0x1a53c1(0x204)][_0x1a53c1(0x106)](_0x4401ab)??null;}async[_0x74ed62(0x16e)](_0x24aafa,_0x582cda,_0x33b46b={}){const _0x49d760=_0x74ed62;if(!this[_0x49d760(0x1b5)]())return null;let _0x5471b6;return await this[_0x49d760(0x137)][_0x49d760(0x1c2)]['_writer'][_0x49d760(0x1bc)](()=>{const _0x4858c6=_0x49d760,_0x1ab1aa=this[_0x4858c6(0x204)][_0x4858c6(0x106)](_0x24aafa)||{'epoch':0x0};_0x5471b6=(_0x1ab1aa[_0x4858c6(0x18b)]||0x0)+0x1,this['_cmd'][_0x4858c6(0x2f3)](_0x24aafa,{..._0x1ab1aa,..._0x33b46b,'cmd':_0x582cda,'epoch':_0x5471b6,'updatedAt':Date['now']()});}),_0x5471b6;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x46fe23,'nodeKey':_0x4b7a3f,'logicalKey':_0x312863,'slotKey':_0x1c35bb,'PROCESS_ENV':_0x4c0b96,'NODE_TYPE':_0x4523cc},okdbProcessRegistry;}function _0xef45(){const _0x24e50e=['_onTick','catch','resetFts','_handlePoke','http','listNodes','ensureType','toISOString','online','setSchema','assign','startHeartbeat','_held','_adminRelay','ppid','listen','__vocab/version','fts:drop','shift','noteListenAddr','(code=','role','updateSupervisedChildStats','_pendingLocal','resetReadTxn','stopping','_processStartedAt','value','dropIndex','_drainOne','fts:registered','meta','_children','exports','\x20writer{depth=','item:update','replace','\x20phase=','withPoolHold','~lock','memoryUsage','round','ORPHAN\x20(env-closed\x20write)','_putRowAsync','process','remove','ms\x20p99=','error','ITEM_REMOVE','1406232RStjkv','_publishNow','info','_sampleOwnStats','SYSTEM_POKE','fanout','http-server','single','waiting','kind','_removeRowAsync','sync','addSupervisedChild','_lastCpuUsage','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','_putRowSync','--test','_ownMeta','item:remove','SYSTEM_PROC','off','pid','external','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','_isWriter','registerIndex','liveThreadStats','_hbTimer','field:resolver_registered','repeat','_bpParkedTotal','reduce','disable','_enqueuedAt','has','cpuWindowMs','processors','_nestedTotal','\x20in\x20','7YcioEg','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','(worst\x20','putSync','worker','_timer',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','compact','heldBy','txn:start','deaths','item:pending','building','_heartbeatInFlight','_wantDbOf','primary','extend','code','split','~processes:desired','caps','_holderDead','_onItem','system:bus_state_change','object','--watch','~processes','index:drop','okdb-lock:\x20env\x20closed','user','publishChildRow','3708mysbGQ','prependListener','type:registered','_isReader','_wantDb','okdb-writer:\x20env\x20closing\x20—\x20retry','1ofN:','state','min','getClock','unref','push','_heldTotal','_sandbox','29419oSoVzA','registry\x20heartbeat\x20skipped\x20(writer=','nodeKey','event','_rootDb','_changefeed',':want','feed:','release','embedded','dedupeMax','then','deregisterSelf','stopped','dead','\x20worker\x20slot=','rss','async','_flushTimer','_inflight',');\x20','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','size','cursorKey','busy','--inspect','includes','running','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_desired','string','created','[okdb-cluster]\x20','ttl:set','ITEM_PENDING','cli','\x20parkedNow=','_publishFailWarned','firstTs','cpus','list','SWAP','ttlMs','bus:proc','reject','_key','write','ttl:expired','seq','killable','node:events','_refreshDesiredSnapshot','appendFileSync','start','uncaughtException','ms\x20on\x20env=','filter','\x20===','startedAt','runtimeProcessesView','closing','removeNode','\x20oldestPendingMs=','_committed','_kind','entries','loop-lag\x20','processor:resumed','\x20while\x20this\x20process\x20runs\x20','error:\x20','count','sort','_report','raw-remove','respawnTimer','schema:drop','put','emit','dumpedAt','--eval','processingSig','indexOf','offWindow','draining','_nodeDead','_released','all','map','processorId','migrations','4515bcjuas','host','1385351fzqKpz','heapUsed','SIGKILL','hostname','processing','_threadStats','processor:retry','committed','ephemeral','_rawDb','set','\x20—\x20','729054uhOxzS','_desiredOverlay','2.6.4','_onProcEvent','unclaimed','procmodeack/','type:drop','_nestedWarned','_quantum','cluster','send','_enableChangelog','decommission','~processes:cmd','[okdb-cluster]\x20respawning\x20worker\x20slot=','_buildChildRow','setTtl','getDesired','\x0a\x20\x20\x20\x20\x20\x20',')\x20exited\x20','standalone','system:env_release','\x20worker(s)\x20remaining','_participate','copy','registry-publish','heartbeatMs','some','_heartbeatTimer','schema:set','_envs','_startedAt','_draining','flushLmdb','_markSeen','true','startsWith','nodesView','decommissioning','status','crypto','_isStale','options','_done','http\x20worker\x20child\x20failed:\x20','_lockDbOf','exit','openDB','_bpWaiters','getRange','join','\x20times\x20in\x20','FTS_DROP','license:removed','clearThreadStats','\x20HTTP\x20server(s)\x20on\x20port\x20','env','participate','resetting','mode','_lockDb','_outstanding','toFixed','max','env:removed','CHANGEFEED_QUANTUM','_assertUsable','find','maxMs','stop','\x20died\x20','ms\x20max=','_log','processes','open','onWindow','listenAddr','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','_started','INDEX_READY','get','afterWrite','threads','bus:type_drop','_role','index:progress','system','race','register','decommissioned','message','_scheduleFlush','namespace','hasDesired','next','3ATxROk','procmode/','acquiredAt','--print','functions','listAll','execArgv','selfKey','label','quantum','unhandledRejection','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','_db','ttl:clear','_windowCbs','_instanceId','_listenAddr','disconnect','node','add','2598hVvmQe','enabled','_lastPublishAt','_versionSkewWarned','compaction','\x20pid=','instances','flushDebounce','creating','_buildOwnRow','fork','closed','_onPoke','_seen','okdb','_admissionTimer','_durs','putNode','_singletonLock','_selfKey','tryAcquire','setLogger','isHeld','_pending','listening','dropType','_nodeDbFor','childTransaction','load','okdb-diag.','txn:end','prototype','expiresAt','close','slot','index:registered','_statusEnv','slice','registry\x20publish\x20failing:\x20','slotKey','tierList','_lastCpuWindowMs','getCmd','setDesired','children','parkedNow','allSettled','commit','_lastCpuAt','fn-runner','markClosed','_closed','ESRCH','number','_activateProcesses','function','fts:reset','kill','connected','_drain','depth','singletonClaims','holder','dropFts','registerType','40xdmKua','envsOpen','type','call','bumpCmd','claimGated','view','consecutiveFailures','keys','oldestPendingMs','_flushDebounce','isEnabled','SYNC_COMMITS','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','isConnected','160TyfypD','removeSync','system:clock_change','REMOVE','processingStatusView','ITEM_UPDATE','\x20drainAge=','\x20│\x20','splice','fromEntries','force','resolve','_admissionStarted','_baselines','.log','attach','workers','detachConsole','epoch','system:type_drop','once','_dedupeKey','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','_coordinator','processor:paused','ms\x20env=','clearTtl','getChanges','_cursors','abs','license:activated','license:invalid','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','_wantDbHandle','MAX_POOL_HOLDS','name','now','_clusterWorkerAttached','fast','rowKey','_handleInProcess','processKey','delete','pushEphemeral','FTS_REGISTERED','removeSupervisedChild','supervisorKey','bus:poke','view:progress','_lock','processor:error','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','stopHeartbeat','values','_maybePublish','stderr','ingest','\x20(slot=','ENV_CLOSING_RETRY','_onPending','_ensureDesired','publishOwnRow','updatedAt','isWorker','_nodeDb','path','raw-put','transaction','_highWater','started','_startAdmission','hasOwnProperty','ITEM_CREATE','_systemEnv','_buckets','\x20@\x20','\x0a===\x20OKDB_DIAG\x20','VIEW_PROGRESS','signalWant','processor:progress','\x20ipc\x20error:\x20','warn','entry','attachFeed','dropping','_migrateVocab','_caps','test','mkdirSync','_writer','_collectWriterFacet','_singletonLocks','index:reset','reset','[okdb-cluster]\x20slot=','commitsPerSec','processor:ready','sandbox','dropSchema','[okdb-cluster]\x20worker\x20pid=','_collectSingletonClaims','isActive','inst:','616004FJYOlS','heapTotal','_onStop','_rowKey','_handlePending','stats','isDead','__okdbSlot','sync:apply','reap','default','unique:violation_resolved','percentile','ms\x20activeWriters=','clear','halted','_lastCpuPct','_buildProcessingFacet','cpuUsage','win32','index:ready','_groupByProcess','floor','transactionSync','note','\x20\x20#','node:perf_hooks',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','confirm','_dedupeMax','_supervisorKey','parse','length','null','enable','treeView','_cmd','recent\x20writes\x20(newest\x20first)','msg','workersConfigured','894ulpIbj','version','ready','maxExtra','engines','_nodeDbCache','getProcess','events','log','stack','commitP99Ms','\x20worker(s)\x20still\x20serving','setOwnMeta','uptime','FTS_RESET','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','rows=','bus:drain','setupPrimary','processorsView','writerStatus','stringify','perf_hooks','lifecycle','txn:rollback','_acquiredAt'];_0xef45=function(){return _0x24e50e;};return _0xef45();}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x27f9c8=_0x4abb0e;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x4476bf=require$$0$4,{clampTimerDelay:_0x38c169}=requireOkdbTimers(),{EVENTS:_0x5c30fa,CHANGE_ACTIONS:_0x5ba9fb}=requireOkdbEnums(),{LOOP:_0x26bffb}=requireOkdbLoopMonitor(),_0x40b252=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0xaf3231=0x5,_0x5c1e35=0x2710;class _0x41c6e3 extends _0x4476bf{constructor(_0x3c103a,_0x3dfff5={}){const _0x369b18=_0x35c1;super(),this[_0x369b18(0x137)]=_0x3c103a,this[_0x369b18(0x317)]=_0x3dfff5[_0x369b18(0x11e)]??_0x40b252,this[_0x369b18(0x174)]=_0x3dfff5[_0x369b18(0x130)]??_0xaf3231,this[_0x369b18(0x1fd)]=_0x3dfff5[_0x369b18(0x2b1)]??_0x5c1e35,this[_0x369b18(0x104)]=![],this['_cursors']=new Map(),this['_baselines']=new Map(),this[_0x369b18(0x140)]=new Map(),this[_0x369b18(0x2b9)]=null,this[_0x369b18(0xd6)]=![],this[_0x369b18(0x136)]=new Set(),this[_0x369b18(0x239)]=new Set(),this[_0x369b18(0x290)]=_0x42d370=>this[_0x369b18(0x1a1)](_0x42d370),this[_0x369b18(0x1b4)]=_0x47c521=>this['_handlePending'](_0x47c521),this[_0x369b18(0x135)]=_0xb423d1=>this[_0x369b18(0x225)](_0xb423d1),this[_0x369b18(0x1e2)]=()=>this['stop']();}[_0x27f9c8(0x2dc)](){const _0x5c1d05=_0x27f9c8;if(this[_0x5c1d05(0x104)])return;this[_0x5c1d05(0x104)]=!![];for(const [_0xf80502,_0x20d868]of this[_0x5c1d05(0x137)][_0x5c1d05(0xd4)]){if(_0xf80502[_0x5c1d05(0xda)]('~'))continue;try{_0x20d868[_0x5c1d05(0x31a)]();}catch{}}for(const [_0x25b6b4,_0x272fc5]of this[_0x5c1d05(0x137)][_0x5c1d05(0xd4)]){if(_0x25b6b4[_0x5c1d05(0xda)]('~'))continue;try{this[_0x5c1d05(0x186)][_0x5c1d05(0x30d)](_0x25b6b4,_0x272fc5['getClock']()||0x0);}catch{}}const {events:_0x19ef5c}=this[_0x5c1d05(0x137)];_0x19ef5c['on'](_0x5c30fa[_0x5c1d05(0x2c9)],this[_0x5c1d05(0x1b4)]),_0x19ef5c['on'](_0x5c30fa[_0x5c1d05(0x1c1)],this['_onItem']),_0x19ef5c['on'](_0x5c30fa[_0x5c1d05(0x17e)],this[_0x5c1d05(0x290)]),_0x19ef5c['on'](_0x5c30fa[_0x5c1d05(0x252)],this['_onItem']),_0x19ef5c['on'](_0x5c30fa[_0x5c1d05(0x257)],this['_onPoke']),_0x19ef5c[_0x5c1d05(0x18d)](_0x5c30fa['SYSTEM_STOPPED'],this['_onStop']);}[_0x27f9c8(0xfb)](){const _0x4f7363=_0x27f9c8;if(!this[_0x4f7363(0x104)])return;this[_0x4f7363(0x104)]=![];const {events:_0x1b9b65}=this['okdb'];_0x1b9b65[_0x4f7363(0x267)](_0x5c30fa[_0x4f7363(0x2c9)],this['_onPending']),_0x1b9b65[_0x4f7363(0x267)](_0x5c30fa[_0x4f7363(0x1c1)],this[_0x4f7363(0x290)]),_0x1b9b65[_0x4f7363(0x267)](_0x5c30fa[_0x4f7363(0x17e)],this['_onItem']),_0x1b9b65[_0x4f7363(0x267)](_0x5c30fa[_0x4f7363(0x252)],this['_onItem']),_0x1b9b65[_0x4f7363(0x267)](_0x5c30fa['SYSTEM_POKE'],this['_onPoke']);try{_0x1b9b65['off'](_0x5c30fa['SYSTEM_STOPPED'],this[_0x4f7363(0x1e2)]);}catch{}this[_0x4f7363(0x2b9)]&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this[_0x4f7363(0x140)]['clear'](),this[_0x4f7363(0x195)][_0x4f7363(0x1ee)](),this['_baselines']['clear'](),this[_0x4f7363(0x136)][_0x4f7363(0x1ee)](),this[_0x4f7363(0x239)]['clear']();}['_dedupeKey'](_0x5cdc72,_0x35ed12,_0xc447bc,_0x1be245){return _0x5cdc72+'\x00'+_0x35ed12+'\x00'+_0xc447bc+'\x00'+_0x1be245;}['_markSeen'](_0x4ecd77,_0x29bd2b,_0x3cef6c,_0x40656d){const _0x3469cf=_0x27f9c8,_0x2f1116=this['_dedupeKey'](_0x4ecd77,_0x29bd2b,_0x3cef6c,_0x40656d);if(this['_seen'][_0x3469cf(0x275)](_0x2f1116))return![];this[_0x3469cf(0x136)][_0x3469cf(0x128)](_0x2f1116);if(this['_seen'][_0x3469cf(0x2bd)]>this[_0x3469cf(0x1fd)]){const _0x5d7814=this[_0x3469cf(0x136)][_0x3469cf(0x1ae)]()['next']()[_0x3469cf(0x23d)];this[_0x3469cf(0x136)][_0x3469cf(0x1a3)](_0x5d7814);}return!![];}[_0x27f9c8(0x1e4)](_0x238a8a){const _0x1d9c74=_0x27f9c8;if(!this[_0x1d9c74(0x104)]||!_0x238a8a)return;const {env:_0x4305f6,type:_0x953780,key:_0x295c26,clock:_0x118397}=_0x238a8a;if(_0x4305f6==null||_0x953780==null||_0x295c26==null)return;if(typeof _0x4305f6==='string'&&_0x4305f6['startsWith']('~'))return;if(typeof _0x953780===_0x1d9c74(0x2c5)&&_0x953780[_0x1d9c74(0xda)]('~'))return;this[_0x1d9c74(0x239)][_0x1d9c74(0x128)](this[_0x1d9c74(0x18e)](_0x4305f6,_0x953780,_0x295c26,_0x118397)),this[_0x1d9c74(0x239)]['size']>this['_dedupeMax']&&this[_0x1d9c74(0x239)]['delete'](this[_0x1d9c74(0x239)]['values']()[_0x1d9c74(0x114)]()[_0x1d9c74(0x23d)]);}[_0x27f9c8(0x1a1)](_0x553466){const _0x521a1a=_0x27f9c8;if(!this[_0x521a1a(0x104)]||!_0x553466)return;const {env:_0x1c00a4,type:_0x207d08,key:_0x1ce124,clock:_0x21f78e,origin:_0x1cd990,action:_0x53489f,newValue:_0x16922d,oldValue:_0x13f597}=_0x553466;if(_0x1c00a4==null||_0x207d08==null||_0x1ce124==null)return;if(typeof _0x1c00a4===_0x521a1a(0x2c5)&&_0x1c00a4[_0x521a1a(0xda)]('~'))return;if(typeof _0x207d08===_0x521a1a(0x2c5)&&_0x207d08[_0x521a1a(0xda)]('~'))return;this['_pendingLocal'][_0x521a1a(0x1a3)](this['_dedupeKey'](_0x1c00a4,_0x207d08,_0x1ce124,_0x21f78e));if(!this[_0x521a1a(0xd8)](_0x1c00a4,_0x207d08,_0x1ce124,_0x21f78e))return;const _0xd9118c=_0x53489f===_0x5ba9fb[_0x521a1a(0x17c)]?_0x521a1a(0x24f):_0x521a1a(0x2f3);this[_0x521a1a(0x2f4)]('change',{'env':_0x1c00a4,'type':_0x207d08,'key':_0x1ce124,'op':_0xd9118c,'clock':_0x21f78e,'origin':_0x1cd990,'value':_0xd9118c===_0x521a1a(0x24f)?null:_0x16922d,'prevValue':_0x13f597});}[_0x27f9c8(0x225)](_0x38532a){const _0x41f791=_0x27f9c8;if(!this[_0x41f791(0x104)])return;if(!_0x38532a||typeof _0x38532a['env']!=='string'||typeof _0x38532a[_0x41f791(0x16c)]!==_0x41f791(0x2c5))return;const {env:_0x53c400,type:_0x4d53c7}=_0x38532a;if(_0x53c400[_0x41f791(0xda)]('~')||_0x4d53c7[_0x41f791(0xda)]('~'))return;this[_0x41f791(0x140)]['set'](_0x53c400+'\x00'+_0x4d53c7,{'env':_0x53c400,'type':_0x4d53c7}),this[_0x41f791(0x111)]();}['_scheduleFlush'](){const _0x328227=_0x27f9c8;if(this['_flushTimer'])return;const _0x4827c7=()=>{const _0x3a3655=_0x35c1;this[_0x3a3655(0x2b9)]=null,this['_drain']()['catch'](()=>{});};this[_0x328227(0x2b9)]=setTimeout(_0x4827c7,_0x38c169(this[_0x328227(0x174)]));}async[_0x27f9c8(0x164)](){const _0x27b0fd=_0x27f9c8;if(this[_0x27b0fd(0xd6)]){this['_scheduleFlush']();return;}this[_0x27b0fd(0xd6)]=!![];try{const _0x2f58c1=[...this[_0x27b0fd(0x140)][_0x27b0fd(0x1ae)]()];this[_0x27b0fd(0x140)][_0x27b0fd(0x1ee)]();let _0x5ef0dc=![];for(const {env:_0x2b2070,type:_0x3ca274}of _0x2f58c1){try{const _0x5040aa=await this[_0x27b0fd(0x23f)](_0x2b2070,_0x3ca274);if(_0x5040aa)_0x5ef0dc=!![];}catch{this[_0x27b0fd(0x140)][_0x27b0fd(0x30d)](_0x2b2070+'\x00'+_0x3ca274,{'env':_0x2b2070,'type':_0x3ca274}),_0x5ef0dc=!![];}}if(_0x5ef0dc||this['_pending'][_0x27b0fd(0x2bd)]>0x0)this[_0x27b0fd(0x111)]();}finally{this[_0x27b0fd(0xd6)]=![];}}async[_0x27f9c8(0x23f)](_0x27fd0e,_0x240aef){const _0x31172d=_0x27f9c8,_0x579bc8=await this['okdb']['_openEnvLazy'](_0x27fd0e),_0x3fb706=_0x27fd0e+'\x00'+_0x240aef;!this[_0x31172d(0x195)]['has'](_0x3fb706)&&(!this[_0x31172d(0x186)][_0x31172d(0x275)](_0x27fd0e)&&(_0x579bc8[_0x31172d(0x31a)](),this[_0x31172d(0x186)][_0x31172d(0x30d)](_0x27fd0e,_0x579bc8[_0x31172d(0x2a2)]()||0x0)),this[_0x31172d(0x195)]['set'](_0x3fb706,this[_0x31172d(0x186)][_0x31172d(0x106)](_0x27fd0e)));const _0x3b6267=this[_0x31172d(0x195)][_0x31172d(0x106)](_0x3fb706),_0x3e101b=_0x579bc8[_0x31172d(0x2a2)](_0x240aef)||0x0;if(_0x3e101b<=_0x3b6267)return![];const _0x1ec563=_0x3b6267+this[_0x31172d(0x317)],_0x2894bd=Math[_0x31172d(0x2a1)](_0x3e101b,_0x1ec563),_0x42e6e6=_0x26bffb['enabled']?_0x26bffb[_0x31172d(0x19d)]():0x0,_0x108e8f=Array['from'](_0x579bc8[_0x31172d(0x194)](_0x240aef,_0x3b6267+0x1,_0x2894bd));let _0x36f31e=_0x3b6267;for(const _0x10c79a of _0x108e8f){const {clock:_0x1bf790,key:_0x1cb651,action:_0x21ac55,origin:_0x55895e}=_0x10c79a;if(_0x1bf790>_0x36f31e)_0x36f31e=_0x1bf790;if(_0x1cb651==null)continue;if(this['_pendingLocal'][_0x31172d(0x275)](this[_0x31172d(0x18e)](_0x27fd0e,_0x240aef,_0x1cb651,_0x1bf790)))continue;if(!this[_0x31172d(0xd8)](_0x27fd0e,_0x240aef,_0x1cb651,_0x1bf790))continue;let _0x8e1839,_0x4d0ced;if(_0x21ac55===_0x5ba9fb[_0x31172d(0x17c)])_0x8e1839='remove',_0x4d0ced=null;else{const _0x9ea96a=_0x579bc8[_0x31172d(0x106)](_0x240aef,_0x1cb651);_0x9ea96a==null?(_0x8e1839=_0x31172d(0x24f),_0x4d0ced=null):(_0x8e1839=_0x31172d(0x2f3),_0x4d0ced=_0x9ea96a);}this[_0x31172d(0x2f4)]('change',{'env':_0x27fd0e,'type':_0x240aef,'key':_0x1cb651,'op':_0x8e1839,'clock':_0x1bf790,'origin':_0x55895e,'value':_0x4d0ced});}if(_0x26bffb[_0x31172d(0x12a)])_0x26bffb[_0x31172d(0x1f8)](_0x31172d(0x2ae)+_0x27fd0e+':'+_0x240aef,_0x26bffb[_0x31172d(0x19d)]()-_0x42e6e6,'n='+_0x108e8f[_0x31172d(0x200)]);return this[_0x31172d(0x195)][_0x31172d(0x30d)](_0x3fb706,Math['max'](_0x36f31e,_0x2894bd)),_0x579bc8['getClock'](_0x240aef)>_0x2894bd;}[_0x27f9c8(0xdd)](){const _0x5e24d8=_0x27f9c8;return{'started':this[_0x5e24d8(0x104)],'quantum':this[_0x5e24d8(0x317)],'flushDebounce':this[_0x5e24d8(0x174)],'cursors':Object[_0x5e24d8(0x182)]([...this[_0x5e24d8(0x195)][_0x5e24d8(0x2e8)]()]['map'](([_0x159e6d,_0x4b1662])=>[_0x159e6d[_0x5e24d8(0x246)]('\x00',':'),_0x4b1662])),'pending':this[_0x5e24d8(0x140)]['size'],'seen':this[_0x5e24d8(0x136)][_0x5e24d8(0x2bd)]};}}return _0x41c6e3[_0x27f9c8(0xf7)]=_0x40b252,okdbChangefeed={'OKDBChangefeed':_0x41c6e3},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x1de6aa=_0x4abb0e;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x494e9a=require$$1$1,_0x2fc879=require$$1,{EVENTS:_0xf6a2e9}=requireOkdbEnums(),_0xf122ec=require$$0$3,{slotKey:_0x15b762}=requireOkdbProcessRegistry(),_0x261c8e=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x13b2f3=0xfa0,_0x33e8f0=0x5,_0x2d02b0=0x2710,_0x2ff266=0xbb8,_0x3cde3d=0x7d0,_0x42a0fa='__okdbCluster',_0x5f1669=_0x1de6aa(0x30b),_0x4ff7e5='log',_0x86c093='stats',_0x14583d=[_0xf6a2e9[_0x1de6aa(0x1c6)],_0xf6a2e9[_0x1de6aa(0x1a5)],_0xf6a2e9[_0x1de6aa(0xea)],_0xf6a2e9[_0x1de6aa(0x216)],_0xf6a2e9['INDEX_PROGRESS'],_0xf6a2e9[_0x1de6aa(0x105)],_0xf6a2e9['INDEX_RESET'],_0xf6a2e9['INDEX_REGISTERED'],_0x1de6aa(0x1d9),_0x1de6aa(0x1c8),_0x1de6aa(0x1ab),_0x1de6aa(0x191),_0x1de6aa(0x2ea),_0x1de6aa(0x309)],_0x4dff9f=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x3a25e7=0x64;function _0x412949(_0x45942f){const _0x641fd7=_0x1de6aa;if(!_0x45942f)return _0x641fd7(0x201);const _0x54abff=(_0x45942f['processors']||[])['map'](_0x17c071=>[_0x17c071[_0x641fd7(0xee)],_0x17c071['id'],_0x17c071[_0x641fd7(0xf1)],_0x17c071[_0x641fd7(0x2a0)],!!_0x17c071['paused'],!!_0x17c071[_0x641fd7(0x313)],!!_0x17c071[_0x641fd7(0x16f)],_0x17c071[_0x641fd7(0x282)]?.[_0x641fd7(0x268)]??null,_0x17c071[_0x641fd7(0x251)]?String(_0x17c071[_0x641fd7(0x251)]?.[_0x641fd7(0x110)]??_0x17c071[_0x641fd7(0x251)]):null]);return JSON[_0x641fd7(0x21d)]([!!_0x45942f['participate'],_0x54abff]);}function _0x1b6e78({workers:_0x220307,makeOkdb:_0x5b6798,port:_0x51e82e,primaryOkdb:_0x293f5d,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x3bdffc=_0x1de6aa;if(_0x494e9a['isPrimary'])return childEntry&&_0x494e9a[_0x3bdffc(0x21a)]({'exec':_0x2fc879[_0x3bdffc(0xe8)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x17711a=_0x3bdffc,_0x59f1e8=[];for(let _0x44142e=0x0;_0x44142e<process[_0x17711a(0x11b)]['length'];_0x44142e++){const _0x3b3bbd=process['execArgv'][_0x44142e];if(_0x3b3bbd[_0x17711a(0xda)](_0x17711a(0x263))||_0x3b3bbd['startsWith'](_0x17711a(0x293))||_0x3b3bbd[_0x17711a(0xda)](_0x17711a(0x2c0)))continue;if(_0x3b3bbd==='-e'||_0x3b3bbd===_0x17711a(0x2f6)||_0x3b3bbd==='-p'||_0x3b3bbd===_0x17711a(0x118)){_0x44142e++;continue;}_0x59f1e8['push'](_0x3b3bbd);}return _0x59f1e8;})())}),_0x3af157({'workers':_0x220307,'port':_0x51e82e,'primaryOkdb':_0x293f5d,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x51e82e});return _0x1ff1ad({'makeOkdb':_0x5b6798,'port':_0x51e82e});}function _0x3af157({workers:_0x1d8313,port:_0x552855,primaryOkdb:_0x152b91,workerEnv:_0x34ae52,workerRole:_0x397248,listenAddr:_0x5822e1}){const _0x9a011d=_0x1de6aa,_0x2a96ac=new Map(),_0x484601=new Map();let _0x2a4b4d=![];const _0x434724=_0x9a1cb3=>_0x9a1cb3?.[_0x9a011d(0x1e7)],_0x5df398=_0x5bd288=>{const _0x15c518=_0x9a011d,_0x459148=_0x494e9a[_0x15c518(0x133)]({...process.env,..._0x34ae52||{},'OKDB_CLUSTER_SLOT':String(_0x5bd288)});return _0x459148[_0x15c518(0x1e7)]=_0x5bd288,_0x2a96ac['set'](_0x459148['process'][_0x15c518(0x268)],{'worker':_0x459148,'startedAt':Date[_0x15c518(0x19d)](),'slot':_0x5bd288}),_0x459148['on'](_0x15c518(0x251),_0x380cae=>{const _0x194ff4=_0x15c518;console['log'](_0x194ff4(0x1dc)+_0x459148['process'][_0x194ff4(0x268)]+_0x194ff4(0x1c9)+(_0x380cae?.[_0x194ff4(0x110)]??_0x380cae));}),_0x459148['on'](_0x15c518(0x22a),()=>_0x31870b()),_0x459148;},_0x2e2213=_0x492e59=>{const _0x42879e=_0x9a011d;for(const {worker:_0x48c42e}of _0x2a96ac[_0x42879e(0x1ae)]()){if(_0x48c42e[_0x42879e(0x1e6)]()||!_0x48c42e[_0x42879e(0x178)]())continue;try{_0x48c42e[_0x42879e(0x319)](_0x492e59);}catch{}}};_0x152b91?.['_activateProcesses']?.({'kind':_0x9a011d(0x289),'listenAddr':_0x5822e1})[_0x9a011d(0x223)](()=>{}),_0x152b91?.['processes']?.[_0x9a011d(0x214)]?.({'workersConfigured':_0x1d8313});const _0x34f6ca={'engines':!![],'processors':!![],'compaction':!![],..._0x397248,'http':!![]},_0x31870b=()=>{const _0x252268=_0x9a011d,_0x2c5fe8=_0x152b91?.['processes'];if(!_0x2c5fe8||!_0x2c5fe8['_isWriter'])return;const _0x5ca329=_0x2c5fe8['selfKey'];for(const {worker:_0x23b1fa,startedAt:_0x19bb69,slot:_0x42114a,stats:_0x359ba7,processing:_0x51a130}of _0x2a96ac[_0x252268(0x1ae)]()){if(_0x23b1fa[_0x252268(0x1e6)]())continue;const _0x4f8c2c=_0x2c5fe8[_0x252268(0x113)]?.()&&_0x2c5fe8['getDesired'](_0x252268(0x14b),_0x515752(_0x42114a))?.[_0x252268(0x31b)]===!![];_0x2c5fe8[_0x252268(0x298)]({'pid':_0x23b1fa[_0x252268(0x24e)][_0x252268(0x268)],'startedAt':_0x19bb69,'kind':_0x252268(0x259),'supervisorKey':_0x5ca329,'slot':_0x42114a,'slotKey':_0x515752(_0x42114a),'role':_0x34f6ca,'listenAddr':_0x5822e1,'lifecycle':_0x4f8c2c?_0x252268(0xdc):_0x252268(0x2c2),'processing':_0x51a130??null,'stats':_0x359ba7??null})[_0x252268(0x223)](()=>{});}},_0x515752=_0x5ecc41=>_0x15b762('cluster:'+_0x552855,_0x5ecc41),_0x360bfa=_0x59ed01=>{const _0x4f06c1=_0x9a011d,_0x501c5c=_0x152b91?.[_0x4f06c1(0xff)];if(!_0x501c5c?.['hasDesired']?.())return![];return _0x501c5c[_0x4f06c1(0x320)](_0x4f06c1(0x14b),_0x515752(_0x59ed01))?.[_0x4f06c1(0x31b)]===!![];};for(let _0x37ec0d=0x0;_0x37ec0d<_0x1d8313;_0x37ec0d++){const _0x11320d=_0x360bfa(_0x37ec0d);_0x484601[_0x9a011d(0x30d)](_0x37ec0d,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x11320d,'respawnTimer':null}),_0x11320d?console[_0x9a011d(0x210)](_0x9a011d(0x1d7)+_0x37ec0d+_0x9a011d(0x217)):_0x5df398(_0x37ec0d);}const _0xbb97ef=()=>{const _0x205f14=_0x9a011d,_0xd25650=_0x152b91?.[_0x205f14(0xff)];if(!_0xd25650?.['_isWriter']||!_0xd25650[_0x205f14(0x113)]?.())return;for(const [_0x571fed,_0x5724a8]of _0x484601[_0x205f14(0x2e8)]()){const _0x5e7a6b=_0xd25650['getDesired'](_0x205f14(0x14b),_0x515752(_0x571fed)),_0x331252=_0x5e7a6b?.[_0x205f14(0x31b)]===!![],_0x12d995=_0x5e7a6b?.['kill']===!![];if(_0x331252&&!_0x5724a8['dead']){_0x5724a8[_0x205f14(0x2b5)]=!![];_0x5724a8[_0x205f14(0x2f1)]&&(clearTimeout(_0x5724a8[_0x205f14(0x2f1)]),_0x5724a8['respawnTimer']=null);for(const {worker:_0x7ba998}of _0x2a96ac[_0x205f14(0x1ae)]()){if(_0x434724(_0x7ba998)!==_0x571fed||_0x7ba998[_0x205f14(0x1e6)]())continue;try{if(_0x12d995)_0x7ba998['process']['kill'](_0x205f14(0x305));else _0x7ba998['isConnected']()&&_0x7ba998[_0x205f14(0x126)]();}catch{}}console[_0x205f14(0x210)](_0x205f14(0x2c7)+(_0x12d995?'hard-killed':_0x205f14(0x10f))+_0x205f14(0x2b6)+_0x571fed+'\x20(durable\x20desired-state)');}else{if(!_0x331252&&_0x5724a8[_0x205f14(0x2b5)]&&_0x5e7a6b){_0x5724a8[_0x205f14(0x2b5)]=![],_0x5724a8['deaths']=[],_0x5724a8[_0x205f14(0x171)]=0x0;const _0x26761f=[..._0x2a96ac[_0x205f14(0x1ae)]()][_0x205f14(0xd1)](({worker:_0x1c9fb6})=>_0x434724(_0x1c9fb6)===_0x571fed&&!_0x1c9fb6['isDead']());!_0x26761f&&!_0x2a4b4d&&(_0x5df398(_0x571fed),console[_0x205f14(0x210)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x571fed));}}}},_0x5116a7=()=>{try{_0xbb97ef();}catch{}};_0x152b91?.['events']?.['on']?.(_0xf6a2e9[_0x9a011d(0x266)],_0x5116a7);const _0xccc1ff=[];if(_0x152b91?.['events']?.['on'])for(const _0x49793d of _0x14583d){const _0x329fa0=_0x572a72=>{_0x2e2213({[_0x42a0fa]:_0x5f1669,'event':_0x49793d,'data':_0x572a72??{}});};_0x152b91[_0x9a011d(0x20f)]['on'](_0x49793d,_0x329fa0),_0xccc1ff[_0x9a011d(0x2a4)]({'event':_0x49793d,'handler':_0x329fa0});}const _0x2eaf86=setInterval(()=>{_0xbb97ef(),_0x31870b();},_0x4dff9f);_0x2eaf86[_0x9a011d(0x2a3)]?.();const _0x57457e=(_0x5250c9,_0x7df8ae)=>{const _0x104915=_0x9a011d;if(!_0x7df8ae||typeof _0x7df8ae!=='object'||_0x7df8ae[_0x42a0fa]!==_0x4ff7e5)return;if(!_0x152b91?.[_0x104915(0x210)]?.[_0x104915(0x1b1)])return;const _0x5a907a=_0x7df8ae[_0x104915(0x1cb)]||{};_0x152b91['log'][_0x104915(0x1b1)]({..._0x5a907a,'msg':'[w'+_0x7df8ae[_0x104915(0x14b)]+']\x20'+(_0x5a907a[_0x104915(0x206)]??''),'meta':{..._0x5a907a[_0x104915(0x241)]||{},'worker':_0x7df8ae[_0x104915(0x14b)],'workerPid':_0x7df8ae[_0x104915(0x268)]}});};_0x494e9a['on'](_0x9a011d(0x110),_0x57457e);const _0x199479=(_0x64a6f0,_0x44d7e2)=>{const _0x10d686=_0x9a011d;if(!_0x44d7e2||typeof _0x44d7e2!=='object'||_0x44d7e2[_0x42a0fa]!==_0x86c093)return;const _0x397b00=_0x2a96ac[_0x10d686(0x106)](_0x64a6f0[_0x10d686(0x24e)]['pid']);if(_0x397b00){_0x397b00[_0x10d686(0x1e5)]={..._0x44d7e2[_0x10d686(0x1e5)],'at':Date[_0x10d686(0x19d)]()};if(_0x44d7e2[_0x10d686(0x307)]!==undefined){const _0x104b26=_0x412949(_0x44d7e2[_0x10d686(0x307)]);_0x104b26!==_0x397b00['processingSig']&&(_0x397b00[_0x10d686(0x2f7)]=_0x104b26,_0x797227()),_0x397b00['processing']=_0x44d7e2[_0x10d686(0x307)];}}};let _0x360761=null;const _0x797227=()=>{if(_0x360761||_0x2a4b4d)return;_0x360761=setTimeout(()=>{_0x360761=null;if(!_0x2a4b4d)_0x31870b();},_0x3a25e7),_0x360761['unref']?.();};_0x494e9a['on'](_0x9a011d(0x110),_0x199479),_0x494e9a['on'](_0x9a011d(0xe4),(_0x503173,_0x266955,_0x2dc7f8)=>{const _0x48b2ce=_0x9a011d,_0x298903=_0x503173[_0x48b2ce(0x24e)][_0x48b2ce(0x268)],_0x5df91b=_0x434724(_0x503173),_0x513f4d=_0x2a96ac[_0x48b2ce(0x106)](_0x298903);if(_0x513f4d&&_0x152b91?.[_0x48b2ce(0xff)])_0x152b91[_0x48b2ce(0xff)][_0x48b2ce(0x2e4)](_0x298903+':'+_0x513f4d['startedAt'])['catch'](()=>{});_0x2a96ac['delete'](_0x298903),console['log']('[okdb-cluster]\x20worker\x20pid='+_0x298903+_0x48b2ce(0x1b2)+(_0x5df91b??'?')+_0x48b2ce(0x322)+(_0x48b2ce(0x236)+_0x266955+',\x20signal='+(_0x2dc7f8??'none')+_0x48b2ce(0x2bb)+_0x2a96ac['size']+_0x48b2ce(0x325))),_0x31870b();if(_0x2a4b4d||_0x5df91b==null)return;const _0x59a77a=_0x484601[_0x48b2ce(0x106)](_0x5df91b);if(!_0x59a77a||_0x59a77a['dead'])return;const _0x2c3a75=Date['now']();_0x59a77a[_0x48b2ce(0x284)][_0x48b2ce(0x2a4)](_0x2c3a75),_0x59a77a['deaths']=_0x59a77a[_0x48b2ce(0x284)][_0x48b2ce(0x2df)](_0x48d4df=>_0x2c3a75-_0x48d4df<=_0x2d02b0);if(_0x59a77a[_0x48b2ce(0x284)][_0x48b2ce(0x200)]>=_0x33e8f0){_0x59a77a[_0x48b2ce(0x2b5)]=!![],console[_0x48b2ce(0x251)](_0x48b2ce(0x26a)+_0x5df91b+_0x48b2ce(0xfc)+_0x59a77a[_0x48b2ce(0x284)][_0x48b2ce(0x200)]+_0x48b2ce(0xe9)+(_0x2d02b0+_0x48b2ce(0x2bc)+_0x2a96ac['size']+_0x48b2ce(0x213)));return;}_0x59a77a[_0x48b2ce(0x171)]++;const _0x22c458=Math[_0x48b2ce(0x2a1)](_0x13b2f3,_0x261c8e*0x2**(_0x59a77a['consecutiveFailures']-0x1));console[_0x48b2ce(0x210)](_0x48b2ce(0x31d)+_0x5df91b+_0x48b2ce(0x279)+_0x22c458+'ms\x20(attempt\x20'+_0x59a77a['consecutiveFailures']+')'),_0x59a77a['respawnTimer']=setTimeout(()=>{const _0x4c07f8=_0x48b2ce;_0x59a77a[_0x4c07f8(0x2f1)]=null;if(_0x2a4b4d||_0x59a77a[_0x4c07f8(0x2b5)])return;const _0x55b9d1=_0x5df398(_0x5df91b);_0x55b9d1[_0x4c07f8(0x18d)](_0x4c07f8(0x141),()=>{const _0x215359=_0x4c07f8;if(_0x484601[_0x215359(0x106)](_0x5df91b)===_0x59a77a)_0x59a77a[_0x215359(0x171)]=0x0;});},_0x22c458),_0x59a77a[_0x48b2ce(0x2f1)][_0x48b2ce(0x2a3)]?.();});const _0x51d4d6=[..._0x2a96ac[_0x9a011d(0x172)]()];console[_0x9a011d(0x210)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+'\x20forked\x20'+_0x1d8313+_0x9a011d(0xed)+_0x552855+':\x20'+('['+_0x51d4d6['join'](',\x20')+']'));const _0x59531a={'_isClusterController':!![],'port':_0x552855,'primaryOkdb':_0x152b91??null,'status'(){const _0x349df6=_0x9a011d;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x552855,'primaryRole':_0x152b91?.[_0x349df6(0x237)]??null,'processorPid':null,'supervisorPid':process[_0x349df6(0x268)],'workers':[..._0x2a96ac[_0x349df6(0x1ae)]()]['map'](({worker:_0x3db2a8})=>({'pid':_0x3db2a8[_0x349df6(0x24e)][_0x349df6(0x268)],'id':_0x3db2a8['id'],'dead':_0x3db2a8[_0x349df6(0x1e6)]()}))};},async 'close'(){const _0x378492=_0x9a011d;_0x2a4b4d=!![];for(const _0x572c59 of _0x484601['values']()){_0x572c59['dead']=!![],_0x572c59[_0x378492(0x2f1)]&&(clearTimeout(_0x572c59[_0x378492(0x2f1)]),_0x572c59[_0x378492(0x2f1)]=null);}clearInterval(_0x2eaf86);_0x360761&&(clearTimeout(_0x360761),_0x360761=null);_0x494e9a[_0x378492(0x267)](_0x378492(0x110),_0x57457e),_0x494e9a[_0x378492(0x267)](_0x378492(0x110),_0x199479),_0x152b91?.[_0x378492(0x20f)]?.[_0x378492(0x267)]?.(_0xf6a2e9[_0x378492(0x266)],_0x5116a7);if(_0x152b91?.[_0x378492(0x20f)]?.['off'])for(const {event:_0x2d777a,handler:_0x1d0857}of _0xccc1ff){try{_0x152b91[_0x378492(0x20f)][_0x378492(0x267)](_0x2d777a,_0x1d0857);}catch{}}_0xccc1ff[_0x378492(0x200)]=0x0;const _0x38a5b2=[..._0x2a96ac['values']()][_0x378492(0x2fe)](({worker:_0x25f1a0})=>_0x25f1a0);if(_0x38a5b2[_0x378492(0x200)]===0x0)return;await Promise[_0x378492(0x2fd)](_0x38a5b2[_0x378492(0x2fe)](_0x1882f4=>new Promise(_0x2d8567=>{const _0x169f3a=_0x378492;if(_0x1882f4[_0x169f3a(0x1e6)]()){_0x2d8567();return;}let _0x1f98b2=![];const _0x4a7033=()=>{if(_0x1f98b2)return;_0x1f98b2=!![];if(_0xfbde6f)clearTimeout(_0xfbde6f);_0x2d8567();};_0x1882f4[_0x169f3a(0x18d)](_0x169f3a(0xe4),_0x4a7033);const _0xfbde6f=setTimeout(()=>{const _0x89a2b3=_0x169f3a;try{_0x1882f4[_0x89a2b3(0x24e)]['kill']();}catch{}},_0x2ff266+0x1f4);_0xfbde6f[_0x169f3a(0x2a3)]?.();try{_0x1882f4['disconnect']();}catch{try{_0x1882f4['process'][_0x169f3a(0x162)]();}catch{}}})));}};return _0x59531a;}async function _0x1ff1ad({makeOkdb:_0x15b447,port:_0x11d9ad}){const _0x271f62=_0x1de6aa,_0x3a598a=await _0x15b447();return _0x37bf53(_0x3a598a),_0x3a598a[_0x271f62(0x226)][_0x271f62(0x231)](_0x11d9ad);}function _0x37bf53(_0x585d50){const _0x6d188c=_0x1de6aa;if(!_0x585d50||_0x585d50[_0x6d188c(0x19e)])return;_0x585d50[_0x6d188c(0x19e)]=!![];try{const {OKDBChangefeed:_0x49058}=requireOkdbChangefeed(),_0x5bc8f7=_0x585d50[_0x6d188c(0x22f)];if(_0x5bc8f7&&typeof _0x5bc8f7[_0x6d188c(0x1cc)]==='function'){const _0x3d52ff=new _0x49058(_0x585d50);_0x3d52ff['start'](),_0x5bc8f7[_0x6d188c(0x1cc)](_0x3d52ff),_0x585d50[_0x6d188c(0x2ac)]=_0x3d52ff;}}catch(_0x5113a0){_0x585d50[_0x6d188c(0x210)]?.['warn']?.(_0x6d188c(0x1ac)+(_0x5113a0?.[_0x6d188c(0x110)]??_0x5113a0),{'feature':_0x6d188c(0x318)});}const _0x2bdb7a=_0xbd40c=>{const _0x5965de=_0x6d188c;if(!_0xbd40c||typeof _0xbd40c!==_0x5965de(0x292)||_0xbd40c[_0x42a0fa]==null)return;if(_0xbd40c[_0x42a0fa]===_0x5f1669)try{_0x585d50[_0x5965de(0x22f)]?.[_0x5965de(0x1a4)]?.(_0xbd40c[_0x5965de(0x2aa)],_0xbd40c['data']);}catch{}};process['on'](_0x6d188c(0x110),_0x2bdb7a),_0x585d50['_clusterOnMessage']=_0x2bdb7a;{let _0x53a823=process[_0x6d188c(0x1f2)](),_0x22a50c=Date[_0x6d188c(0x19d)]();const _0x1d8c07=()=>{const _0x56e6ec=_0x6d188c;if(typeof process[_0x56e6ec(0x319)]!==_0x56e6ec(0x160)||!process[_0x56e6ec(0x163)])return;const _0x97551c=Date['now'](),_0x2d950d=process[_0x56e6ec(0x1f2)](),_0x4c441a=(_0x97551c-_0x22a50c)*0x3e8,_0x5df831=_0x2d950d[_0x56e6ec(0x297)]-_0x53a823[_0x56e6ec(0x297)]+(_0x2d950d[_0x56e6ec(0x10c)]-_0x53a823['system']),_0x29b539=_0x4c441a>0x0?Math['min'](0x64,Math[_0x56e6ec(0x24b)](_0x5df831/(_0x4c441a*(_0xf122ec[_0x56e6ec(0x2ce)]()[_0x56e6ec(0x200)]||0x1))*0x64)):0x0;_0x53a823=_0x2d950d,_0x22a50c=_0x97551c;const _0x4f5b0a=process[_0x56e6ec(0x24a)]();let _0x46d999=null;try{_0x46d999=_0x585d50[_0x56e6ec(0x237)]?.[_0x56e6ec(0x277)]?_0x585d50['processes']?.['_buildProcessingFacet']?.()??null:null;}catch{}try{process[_0x56e6ec(0x319)]({[_0x42a0fa]:_0x86c093,'stats':{'rss':_0x4f5b0a[_0x56e6ec(0x2b7)],'heapUsed':_0x4f5b0a['heapUsed'],'heapTotal':_0x4f5b0a[_0x56e6ec(0x1e1)],'external':_0x4f5b0a[_0x56e6ec(0x269)],'cpuPct':_0x29b539,'cpuWindowMs':Math[_0x56e6ec(0x24b)](_0x4c441a/0x3e8)||null},'processing':_0x46d999});}catch{}},_0x4b0aed=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x203029=setInterval(_0x1d8c07,_0x4b0aed);_0x203029[_0x6d188c(0x2a3)]?.(),_0x1d8c07();for(const _0x3f8dd6 of[_0x6d188c(0x191),'processor:resumed']){_0x585d50[_0x6d188c(0x20f)]?.['on']?.(_0x3f8dd6,()=>{try{_0x1d8c07();}catch{}});}}let _0x3582a1=![];const _0x12666e=async _0x595958=>{const _0x438584=_0x6d188c;if(_0x3582a1)return;_0x3582a1=!![];const _0x4a9dea=setTimeout(()=>process[_0x438584(0xe4)](_0x595958),_0x2ff266);_0x4a9dea['unref']?.();try{await _0x585d50[_0x438584(0x14a)]?.();}catch{}process['exit'](_0x595958);};process['on']('disconnect',()=>_0x12666e(0x0));if(process['send']&&!process[_0x6d188c(0x163)])_0x12666e(0x0);if(process['platform']!==_0x6d188c(0x1f3)){const _0x598819=setInterval(()=>{const _0x70a5c1=_0x6d188c;if(process[_0x70a5c1(0x230)]===0x1)_0x12666e(0x0);},_0x3cde3d);_0x598819[_0x6d188c(0x2a3)]?.(),_0x585d50['_clusterOrphanWatch']=_0x598819;}}return okdbCluster={'runClustered':_0x1b6e78,'attachWorkerCluster':_0x37bf53},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x37ec00=_0x4abb0e;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x51c57c=require$$0$5,{attachWorkerCluster:_0x4a0d93}=requireOkdbCluster();async function _0x3c2500(){const _0x10ea25=_0x35c1,_0x34eb84=process.env.OKDB_HTTP_CHILD;if(!_0x34eb84)throw new Error(_0x10ea25(0x120));const {rootPath:_0x597fdb,port:_0x4784f7,options:options={},logLevel:logLevel=_0x10ea25(0x255)}=JSON[_0x10ea25(0x1ff)](_0x34eb84);if(!_0x597fdb||!_0x4784f7)throw new Error(_0x10ea25(0x18f));const _0x54168e=new _0x51c57c(_0x597fdb,{...options,'engines':![],'processors':![],'compaction':![]});_0x54168e[_0x10ea25(0x210)][_0x10ea25(0x18a)]?.();const _0x48542c=process.env.OKDB_CLUSTER_SLOT??'?',_0x3a3d80={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x53f718=_0x3a3d80[logLevel]??_0x3a3d80[_0x10ea25(0x255)];_0x54168e['log'][_0x10ea25(0x188)](_0x3c7763=>{const _0x172cc0=_0x10ea25;if((_0x3a3d80[_0x3c7763['level']]??0x1)<_0x53f718)return;try{process[_0x172cc0(0x319)]?.({'__okdbCluster':'log','slot':_0x48542c,'pid':process[_0x172cc0(0x268)],'entry':_0x3c7763});}catch{}}),await _0x54168e[_0x10ea25(0x100)](),_0x4a0d93(_0x54168e),await _0x54168e['http'][_0x10ea25(0x231)](_0x4784f7);}return _0x3c2500()[_0x37ec00(0x223)](_0x31f4d3=>{const _0x1ad35e=_0x37ec00;try{process[_0x1ad35e(0x319)]?.({'__okdbCluster':_0x1ad35e(0x210),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x1ad35e(0x268)],'entry':{'level':_0x1ad35e(0x251),'msg':_0x1ad35e(0xe2)+(_0x31f4d3?.[_0x1ad35e(0x110)]??_0x31f4d3)}});}catch{}process[_0x1ad35e(0xe4)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;