@kedem/okdb 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +191 -0
- package/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/docs/embeddings.md +83 -5
- package/docs/fts.md +1 -1
- package/docs/licensing.md +75 -14
- package/docs/manifest.json +1 -0
- package/docs/resolved-fields.md +79 -0
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/public/modules/ok.js +1 -1
- package/public/sections/db/modals/create-env-modal.ok.js +1 -1
- package/public/sections/db/modals/remove-env-modal.ok.js +1 -1
- package/public/sections/db/modals/schema-edit-modal.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-create-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-search-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/pipeline-try-search.ok.js +1 -1
- package/public/sections/license/parts/license-panel.ok.js +1 -1
- package/public/sections/queue/modals/create-bucket-modal.ok.js +1 -1
- package/public/sections/queue/modals/edit-bucket-modal.ok.js +1 -1
- package/public/sections/sync/index.ok.html +2 -2
- package/public/sections/sync/modals/connect-peer-modal.ok.js +1 -1
- package/public/sections/system/parts/system-sync-panel.ok.js +1 -1
- package/public/vendor/okjs/ok.esm.min.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/devtools-window.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-console.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-crash-explorer-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-crash-explorer.ok.js +1 -0
- package/public/vendor/okjs/toolkit/elements/ok-icon.ok.js +1 -1
- package/public/vendor/okjs/toolkit/errors/crash-minimal.ok.js +1 -0
- package/public/vendor/okjs/toolkit/errors/ok-crash-boundary.ok.js +1 -1
- package/public/vendor/okjs/toolkit/errors/ok-crash-info.ok.js +1 -1
- package/public/vendor/okjs/toolkit/manifest.js +1 -1
- package/types/environment.d.ts +26 -0
- package/types/features/licenses.d.ts +86 -0
- package/types/index.d.ts +11 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0xa12a27=_0x372a;(function(_0x516e8a,_0x112e93){const _0xc61a4c=_0x372a,_0x5a2942=_0x516e8a();while(!![]){try{const _0x2d7cf1=parseInt(_0xc61a4c(0x15b))/0x1*(parseInt(_0xc61a4c(0x2f1))/0x2)+parseInt(_0xc61a4c(0x267))/0x3*(-parseInt(_0xc61a4c(0x2b3))/0x4)+-parseInt(_0xc61a4c(0x1b8))/0x5+parseInt(_0xc61a4c(0x285))/0x6+-parseInt(_0xc61a4c(0x1df))/0x7*(parseInt(_0xc61a4c(0x1e6))/0x8)+-parseInt(_0xc61a4c(0x27b))/0x9+-parseInt(_0xc61a4c(0x1c0))/0xa*(-parseInt(_0xc61a4c(0x1dd))/0xb);if(_0x2d7cf1===_0x112e93)break;else _0x5a2942['push'](_0x5a2942['shift']());}catch(_0x50d728){_0x5a2942['push'](_0x5a2942['shift']());}}}(_0x1bdc,0x25ada));var require$$0$5=require('./okdb'),require$$1$1=require(_0xa12a27(0x252)),require$$1=require(_0xa12a27(0x2da)),require$$0$3=require('os'),require$$2=require(_0xa12a27(0xee)),require$$0=require(_0xa12a27(0x157)),require$$0$2=require(_0xa12a27(0x1b7)),require$$0$1=require('fs'),require$$0$4=require('node:events');function getDefaultExportFromCjs(_0x3994a6){const _0x4698ad=_0xa12a27;return _0x3994a6&&_0x3994a6[_0x4698ad(0x208)]&&Object[_0x4698ad(0x1a5)][_0x4698ad(0x142)][_0x4698ad(0x258)](_0x3994a6,_0x4698ad(0x2e9))?_0x3994a6[_0x4698ad(0x2e9)]:_0x3994a6;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x406246=_0xa12a27;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x46559c={'PUT':_0x406246(0x1cf),'REMOVE':_0x406246(0x1e9),'INDEX_DROP':_0x406246(0x238),'INDEX_REGISTER':_0x406246(0x146),'INDEX_RESET':_0x406246(0xfd),'TYPE_REGISTER':_0x406246(0x2e6),'TYPE_DROP':_0x406246(0x1f6),'FTS_REGISTER':'registerFts','FTS_DROP':_0x406246(0x144),'FTS_RESET':'resetFts','SCHEMA_SET':_0x406246(0x1c9),'SCHEMA_DROP':_0x406246(0x202),'TTL_SET':_0x406246(0x2ed),'TTL_CLEAR':'clearTtl'},_0xcef309={'SYSTEM_READY':_0x406246(0x129),'SYSTEM_STOPPED':_0x406246(0x2cc),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x406246(0x14f),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x406246(0x1c5),'ITEM_CREATE':_0x406246(0x2cf),'ITEM_UPDATE':_0x406246(0x201),'ITEM_REMOVE':_0x406246(0x19f),'INDEX_RESET':'index:reset','INDEX_READY':_0x406246(0x130),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x406246(0x162),'INDEX_DROP':_0x406246(0x21f),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x406246(0x2d3),'FTS_DROP':'fts:drop','FTS_RESET':_0x406246(0x219),'SCHEMA_SET':_0x406246(0x15d),'SCHEMA_DROP':_0x406246(0x21d),'UNIQUE_VIOLATION':_0x406246(0x131),'UNIQUE_VIOLATION_RESOLVED':_0x406246(0xf9),'REF_VIOLATION':_0x406246(0x179),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x406246(0x15c),'TXN_START':_0x406246(0x1d6),'TXN_END':_0x406246(0x260),'TXN_ROLLBACK':_0x406246(0x16f),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x406246(0x1c6),'ENV_OPENED':_0x406246(0x2e0),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':'ttl:expired','TTL_SET':_0x406246(0x22d),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x406246(0x1c8),'LICENSE_ADDED':_0x406246(0x1d7),'LICENSE_ACTIVATED':_0x406246(0x26f),'LICENSE_REMOVED':_0x406246(0x276)},_0x2536d3={'CREATING':_0x406246(0xcd),'RESETTING':_0x406246(0x10d),'READY':_0x406246(0x2f0),'DROPPING':_0x406246(0x2df),'WAITING':_0x406246(0xf0)},_0x34defe={'CREATED':_0x406246(0x173),'STARTING':_0x406246(0x13a),'STARTED':'started','STOPPING':_0x406246(0x2a3),'STOPPED':'stopped'},_0xbd4da6={'CREATING':_0x406246(0xcd),'READY':_0x406246(0x2f0),'HALTED':_0x406246(0x1a1),'STOPPED':_0x406246(0x225),'RESETTING':_0x406246(0x10d)},_0x31b7de=Object['freeze']({'POKE':_0x406246(0x171),'DRAIN':_0x406246(0xdf),'TYPE_DROP':_0x406246(0x242),'PROC':'bus:proc','ENV_RELEASE':_0x406246(0x184)});return okdbEnums={'BUS_EVENTS':_0x31b7de,'CHANGE_ACTIONS':_0x46559c,'EVENTS':_0xcef309,'INDEX_STATE':_0x2536d3,'OKDB_STATE':_0x34defe,'VIEW_STATE':_0xbd4da6},okdbEnums;}function _0x1bdc(){const _0x372719=['min','heapUsed','--inspect',')\x20exited\x20','_lastCpuPct','slice','updateSupervisedChildStats','\x20drainAge=','_db','reportThreadStats','cli','platform','slot','primary',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','filter','system:ready','bumpCmd','process\x20','treeView','http\x20worker\x20child\x20failed:\x20','registry\x20heartbeat\x20skipped\x20(writer=','workers','index:ready','unique:violation','_envs','\x20while\x20this\x20process\x20runs\x20','flushed','_buildProcessingFacet','tryAcquire','cpus','_lastCpuAt','commit','starting','load','options','type','afterWrite','host','updatedAt','_migrateVocab','hasOwnProperty','claims','dropFts','_closed','registerIndex','slotKey','childTransaction','force',',\x20signal=','cpuWindowMs','processor:paused','message','clear','system:poke','_onPoke','listNodes','fanout','ORPHAN\x20(env-closed\x20write)','procmode/','processes','_nodeDbCache','node:perf_hooks','_baselines','entries','test','386QDvBJR','sync:apply','schema:set','instanceId','_report','close','REMOVE','view:progress','_buildOwnRow','hasType','okdb-http-worker-child.js','includes','worker','heartbeatMs','warn','_wantDb','events','_admissionTimer','namespace','SYNC_COMMITS','txn:rollback','processKey','bus:poke','oldestPendingMs','created','_outstanding','SIGKILL','http','committed','_nodeDbFor','ref:violation','user','env','_durs','_ownMeta','(code=','maxExtra','_admissionStarted','push','_sandbox','error:\x20','bus:env_release','attachFeed','allSettled','_refreshDesiredSnapshot','transaction','\x20worker\x20slot=','_children','max','abs','none','fromEntries','clusterStatusView','quantum','isDead','\x20\x20env=','online','processor','nodesView','then','_clusterOrphanWatch','status','INDEX_REGISTERED','ms\x20mean=','randomUUID','_nodeDb','_scheduleFlush','envsOpen','item:remove','singletonClaims','halted','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','--print','detachConsole','prototype','processor:retry','_participate','listAll','removeSync','deregisterSelf','getProcess','stderr','busy','registry-publish','exports','1ofN:','ppid','listDesired','stats','getClock','_onItem','nodeKey','perf_hooks','58915ZtbTwr','_putRowAsync','building','commitP99Ms','_statusEnv','processing','node','\x20statusEnv=','3530vuZqPn','enable','startsWith','_released','markClosed','system:bus_state_change','type:drop','_onStop','license:invalid','setSchema','object','has','_buildChildRow','_isStale','_threadStats','put','_buckets','level','fast','_rootDb','_desired','\x20phase=','txn:start','license:added','ttlMs','_sampleOwnStats','okdb-diag.','setDesired','\x20died\x20','11429BpGKNo','removeNode','7eoPCIs','memoryUsage','--eval','instances','ms/','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','mean','360776zynnxq','transactionSync','_startHeartbeat','remove','_nodeDead','ms\x20on\x20env=','floor','toFixed','ITEM_UPDATE','_isWriter','raw-remove','dead','find','okdb','count','ms\x20activeWriters=','dropType','_hbTimer','\x20(durable\x20desired-state)','processor:resumed','FTS_REGISTERED','_inflight','commitsPerSec','unref','\x20ipc\x20error:\x20','_enableChangelog','signalWant','item:update','dropSchema','uncaughtException','recent\x20writes\x20(newest\x20first)','standalone','_pending','compaction','__esModule','processorId','meta','draining','async','SYSTEM_PROC','deaths','_started','\x20times\x20in\x20','_coordinator','_onProcEvent','cursorKey','inst:','sandbox','_rawDb','__vocab/version','\x20in\x20','fts:reset','number','function','external','schema:drop','enabled','index:drop','ENV_CLOSING_RETRY','beforeWrite','lifecycle','_processStartedAt','loop-lag','stopped','_role','exit','(worst\x20','_handleInProcess','acquiredAt','getRange','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','ttl:set','putSync','--watch','\x20@\x20','isWanted','heapTotal','list','runtimeProcessesView','_selfKey','label','_wantDbHandle','dropIndex','entry','_committed','ms\x20env=','clearThreadStats','log','release','_heartbeatInFlight','parse','shift','bus:type_drop','removeSupervisedChild','inflightAgesMs','_quantum','\x20sync','start','_instanceId','[okdb-cluster]\x20','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','selfKey','holder','_caps','_seen','\x20—\x20','loop-lag\x20','_dedupeMax','cluster','isHeld','send','data','rows=','addSupervisedChild','call','offWindow','error','tierList','_putRowSync','SWAP','_publishFailWarned','_onTick','txn:end','off','publishChildRow','listenAddr','embedded','_windowCbs','_flushTimer','3LBGCWr','SYSTEM_POKE','single','engines','ms\x20(attempt\x20','cpuPct','catch','_draining','license:activated','INDEX_PROGRESS','migrations','_cmd','.log','_lastCpuUsage','role','license:removed','disable','participate','~processes:desired','_flushDebounce','1358649dHkvAB','_ensureDesired','_rowKey','_markSeen','_writer','state','trim','_removeRowAsync','noteListenAddr','repeat','771624WnfWWs','connected','_collectWriterFacet','execArgv','okdb-writer:\x20env\x20closing\x20—\x20retry','setupPrimary','_listenAddr','_cursors','next','inspect','view','firstTs','uptime','percentile','open','emit','flushLmdb','processor:ready','flushDebounce','size','_heartbeatTimer',':want','createEnvironment','openDB','_dedupeKey','some','reduce','_key','\x20│\x20','isConnected','stopping','ephemeral','_groupByProcess','consecutiveFailures','stop','once','kind','_maybePublish','rss',');\x20','\x20\x20(no\x20env\x20draining)','now','\x20worker(s)\x20remaining','fork','\x20pid=','processors','1117976wUfMtu','_singletonLock','_isReader','cluster-wide','_clusterWorkerAttached','keys','ingest','toISOString','_done','_timer','isActive','maxMs','hostname','_publishNow','values','dumpedAt','listen','FTS_DROP','\x20===','code','~processes','appendFileSync','\x20HTTP\x20server(s)\x20on\x20port\x20','2.2.1','_lockDb','system:stopped','round','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','item:create','\x20parkedNow=','claimGated','kill','fts:registered','procmodeack/','_drain','race','processingStatusView','\x0a===\x20OKDB_DIAG\x20','http-server','path','disconnect','stack','add','map','dropping','env:opened','reap','unclaimed','respawnTimer','depth','indexOf','registerType','change','_log','default','name','caps','\x20\x20#','setTtl','version','raw-put','ready','758aQVJnQ','_lastCpuWindowMs','children','startedAt','_singletonLocks','_drainOne','_openEnvLazy','_bpWaiters','~lock','resolve','creating','processor:progress','set','length','_lock','cpuUsage','string','putNode','_versionSkewWarned','sync','_holderDead','split','_bpParkedTotal','feed:','write','hard-killed','setOwnMeta','getDesired','bus:drain','decommission','compact','register','_acquiredAt','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','threads','supervisorKey','note','ms\x20max=','_adminRelay','_highWater','running','stopHeartbeat','process','crypto','_handlePoke','waiting','ITEM_CREATE','[okdb-cluster]\x20primary\x20pid=','_startedAt','seq','_enqueuedAt','join','\x20worker(s)\x20still\x20serving','get','unique:violation_resolved','delete','_desiredOverlay','_supervisorKey','resetIndex','~processes:cmd','_activateProcesses','node/','expiresAt','decommissioned','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','hasDesired','parkedNow','_systemEnv','prependListener','startHeartbeat','__okdbSlot','_getType','splice','--test','resetting','system','_kind','_collectSingletonClaims','sort','pid','VIEW_PROGRESS','dedupeMax','_lastPublishAt','mode','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','[okdb-cluster]\x20worker\x20pid='];_0x1bdc=function(){return _0x372719;};return _0x1bdc();}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x422bac=_0xa12a27;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x192224,performance:_0x2fd10f}=require$$0,_0xd7fe8=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x21f7a3=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x3adb43=process.env.OKDB_LOOP_LAG_ALL==='1',_0x3ab6b4=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x36c420{constructor(){const _0x5a2c0c=_0x372a;this['enabled']=_0xd7fe8,this[_0x5a2c0c(0x1d0)]=new Map(),this['_h']=null,this[_0x5a2c0c(0x2bc)]=null,this['_started']=![],this[_0x5a2c0c(0x2e8)]=(_0x17a9cb,_0x15898a)=>process[_0x5a2c0c(0x1ac)]['write'](_0x17a9cb+(_0x15898a?'\x20'+JSON['stringify'](_0x15898a):'')+'\x0a');}['now'](){const _0x410eae=_0x372a;return _0x2fd10f[_0x410eae(0x2ae)]();}['setLogger'](_0x43a369){const _0x636b2e=_0x372a;if(typeof _0x43a369===_0x636b2e(0x21b))this[_0x636b2e(0x2e8)]=_0x43a369;}['note'](_0x3b1e37,_0x3e4317,_0x408908){const _0x35eb15=_0x372a;if(!this[_0x35eb15(0x21e)])return;let _0x149543=this['_buckets'][_0x35eb15(0xf8)](_0x3b1e37);!_0x149543&&(_0x149543={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x35eb15(0x1d0)]['set'](_0x3b1e37,_0x149543)),_0x149543['ms']+=_0x3e4317,_0x149543[_0x35eb15(0x1f4)]+=0x1,_0x3e4317>_0x149543[_0x35eb15(0x2be)]&&(_0x149543[_0x35eb15(0x2be)]=_0x3e4317,_0x149543[_0x35eb15(0x17f)]=_0x408908||'');}['start'](_0x1cead8){const _0x1d98b8=_0x372a;if(!this[_0x1d98b8(0x21e)]||this[_0x1d98b8(0x20f)])return;this['_started']=!![];if(_0x1cead8)this[_0x1d98b8(0x2e8)]=_0x1cead8;this['_h']=_0x192224({'resolution':0xa}),this['_h'][_0x1d98b8(0x1c1)](),this['_timer']=setInterval(()=>this[_0x1d98b8(0x15f)](),_0x21f7a3);if(this[_0x1d98b8(0x2bc)]['unref'])this[_0x1d98b8(0x2bc)][_0x1d98b8(0x1fd)]();}['onWindow'](_0x4795f8){const _0x17c2b6=_0x372a;if(!this['_windowCbs'])this[_0x17c2b6(0x265)]=new Set();this[_0x17c2b6(0x265)][_0x17c2b6(0x2dd)](_0x4795f8);if(!this[_0x17c2b6(0x20f)])this['_startAdmission']();}[_0x422bac(0x259)](_0x2c0a22){const _0x4fe5c1=_0x422bac;this[_0x4fe5c1(0x265)]?.[_0x4fe5c1(0xfa)](_0x2c0a22);}['_startAdmission'](){const _0xa1adf1=_0x422bac;if(this['_admissionStarted'])return;this[_0xa1adf1(0x180)]=!![];!this['_h']&&(this['_h']=_0x192224({'resolution':0xa}),this['_h']['enable']());const _0x1caf3e=_0x21f7a3;this[_0xa1adf1(0x16c)]=setInterval(()=>{const _0x43140d=_0xa1adf1,_0x20c5fb=this['_h'];if(!_0x20c5fb)return;const _0x178bd0=_0x20c5fb[_0x43140d(0x292)](0x63)/0xf4240,_0x5f7368=_0x20c5fb['max']/0xf4240,_0x52537f=_0x20c5fb[_0x43140d(0x1e5)]/0xf4240;_0x20c5fb['reset']();if(this[_0x43140d(0x265)])for(const _0x7ff3b3 of this[_0x43140d(0x265)]){try{_0x7ff3b3({'p99Ms':_0x178bd0,'maxMs':_0x5f7368,'meanMs':_0x52537f,'reportMs':_0x1caf3e});}catch{}}},_0x1caf3e);if(this[_0xa1adf1(0x16c)][_0xa1adf1(0x1fd)])this[_0xa1adf1(0x16c)]['unref']();}['_report'](){const _0xfa6dc2=_0x422bac,_0x1e52d2=this['_h'],_0x2f3d45=_0x1e52d2[_0xfa6dc2(0x18b)]/0xf4240,_0x482008=_0x1e52d2[_0xfa6dc2(0x292)](0x63)/0xf4240,_0x54a07d=_0x1e52d2[_0xfa6dc2(0x1e5)]/0xf4240;_0x1e52d2['reset']();const _0x196e3b=[...this[_0xfa6dc2(0x1d0)][_0xfa6dc2(0x159)]()][_0xfa6dc2(0x2de)](([_0x4ebbf8,_0x508720])=>({'label':_0x4ebbf8,..._0x508720}))[_0xfa6dc2(0x111)]((_0xc14666,_0x450d41)=>_0x450d41['ms']-_0xc14666['ms'])['slice'](0x0,0x8);this[_0xfa6dc2(0x1d0)][_0xfa6dc2(0x14e)]();const _0x48bfe2=_0x196e3b[_0xfa6dc2(0x29f)]((_0x53195b,_0x596cc7)=>_0x53195b+_0x596cc7['ms'],0x0),_0x1f4854=_0x196e3b['map'](_0x3bf04d=>_0x3bf04d[_0xfa6dc2(0x236)]+'='+_0x3bf04d['ms'][_0xfa6dc2(0x1ed)](0x0)+_0xfa6dc2(0x1e3)+_0x3bf04d[_0xfa6dc2(0x1f4)]+(_0x3bf04d[_0xfa6dc2(0x2be)]>0x5?_0xfa6dc2(0x228)+_0x3bf04d[_0xfa6dc2(0x2be)][_0xfa6dc2(0x1ed)](0x0)+'ms'+(_0x3bf04d[_0xfa6dc2(0x17f)]?'\x20'+_0x3bf04d[_0xfa6dc2(0x17f)]:'')+')':''));(_0x3adb43||_0x2f3d45>=_0x3ab6b4)&&this[_0xfa6dc2(0x2e8)](_0xfa6dc2(0x250)+_0x21f7a3+_0xfa6dc2(0xe8)+_0x2f3d45[_0xfa6dc2(0x1ed)](0x0)+'ms\x20p99='+_0x482008[_0xfa6dc2(0x1ed)](0x0)+_0xfa6dc2(0x19a)+_0x54a07d[_0xfa6dc2(0x1ed)](0x0)+'ms\x20busy='+_0x48bfe2['toFixed'](0x0)+'ms'+(_0x1f4854[_0xfa6dc2(0xd0)]?_0xfa6dc2(0x2a1)+_0x1f4854[_0xfa6dc2(0xf6)]('\x20\x20'):''),{'feature':_0xfa6dc2(0x224)});if(this[_0xfa6dc2(0x265)])for(const _0x1fd857 of this[_0xfa6dc2(0x265)]){try{_0x1fd857({'p99Ms':_0x482008,'maxMs':_0x2f3d45,'meanMs':_0x54a07d,'reportMs':_0x21f7a3});}catch{}}}[_0x422bac(0x2a7)](){const _0x53bd66=_0x422bac;if(this[_0x53bd66(0x2bc)])clearInterval(this[_0x53bd66(0x2bc)]);if(this['_h'])this['_h'][_0x53bd66(0x277)]();this[_0x53bd66(0x2bc)]=null,this['_h']=null,this[_0x53bd66(0x20f)]=![];}}const _0x3493c9=new _0x36c420();if(_0x3493c9[_0x422bac(0x21e)])_0x3493c9[_0x422bac(0x247)]();return okdbLoopMonitor={'LOOP':_0x3493c9},okdbLoopMonitor;}function _0x372a(_0x2237ed,_0x30e39f){_0x2237ed=_0x2237ed-0xc4;const _0x1bdcaa=_0x1bdc();let _0x372a58=_0x1bdcaa[_0x2237ed];return _0x372a58;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x570675=require$$0$1,_0x4f9e6e=require$$1;let _0x121302,_0x3d9f5e,_0x26e862,_0x4de4f9,_0x564bde,_0x3698e6,_0x19a922,_0x3c0ca3=![];const _0x4e97a4=new Set();let _0x9d407f=null;const _0x28c4fe=new Map();function _0x21ff10(){if(_0x121302!==undefined)return _0x121302;_0x121302=process.env.OKDB_DIAG==='1';if(!_0x121302)return![];_0x3d9f5e=process.env.OKDB_DIAG_STACK==='1',_0x4de4f9=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x26e862=new Array(_0x4de4f9),_0x564bde=0x0,_0x3698e6=0x0,_0x19a922=process.env.OKDB_DIAG_DIR||null;if(_0x19a922)try{_0x570675['mkdirSync'](_0x19a922,{'recursive':!![]});}catch{}return!![];}function _0x1e1de5(){return _0x121302===undefined?_0x21ff10():_0x121302;}function _0x5a425a(_0x49cac7,_0x2f4221){const _0x200936=_0x372a;if(_0x121302===undefined?!_0x21ff10():!_0x121302)return;let _0x2c5381;if(_0x3d9f5e){const _0x5870c0=new Error()['stack']||'';_0x2c5381=_0x5870c0[_0x200936(0xd8)]('\x0a')['slice'](0x3)[_0x200936(0x2de)](_0x37f2f5=>_0x37f2f5[_0x200936(0x281)]())[_0x200936(0x128)](Boolean)[_0x200936(0x11e)](0x0,0x8);}_0x26e862[_0x564bde]={'seq':_0x3698e6++,'t':Date[_0x200936(0x2ae)](),'env':_0x49cac7,'kind':_0x2f4221||_0x200936(0x139),'stack':_0x2c5381},_0x564bde=(_0x564bde+0x1)%_0x4de4f9;}function _0x38d717(_0x467573){const _0x4eb75a=_0x372a,_0x3e2bb1=[];for(let _0x5ca781=0x0;_0x5ca781<_0x4de4f9;_0x5ca781++){const _0x4a1161=_0x26e862[(_0x564bde-0x1-_0x5ca781+_0x4de4f9*0x2)%_0x4de4f9];if(!_0x4a1161)continue;_0x3e2bb1[_0x4eb75a(0x181)](_0x4a1161);if(_0x3e2bb1['length']>=_0x467573)break;}return _0x3e2bb1;}function _0x1305a8(_0x997009){const _0x1253e1=_0x372a;try{process[_0x1253e1(0x1ac)][_0x1253e1(0xdb)](_0x997009+'\x0a');}catch{}if(_0x19a922)try{_0x570675[_0x1253e1(0x2c8)](_0x4f9e6e[_0x1253e1(0xf6)](_0x19a922,_0x1253e1(0x1da)+process['pid']+_0x1253e1(0x273)),_0x997009+'\x0a');}catch{}}function _0x53ae6e(_0x570cb2){const _0x510227=_0x372a,_0x4a1abd=_0x38d717(_0x570cb2);if(!_0x4a1abd[_0x510227(0xd0)])return _0x510227(0x103);const _0x1c601d=Date[_0x510227(0x2ae)]();return _0x4a1abd[_0x510227(0x2de)](_0xac4c2f=>{const _0x11f896=_0x510227,_0x1c3ab5=_0x11f896(0x2ec)+_0xac4c2f[_0x11f896(0xf4)]+'\x20-'+(_0x1c601d-_0xac4c2f['t'])+_0x11f896(0x23b)+_0xac4c2f[_0x11f896(0x17b)]+'\x20'+_0xac4c2f[_0x11f896(0x2a9)];return _0xac4c2f[_0x11f896(0x2dc)]&&_0xac4c2f[_0x11f896(0x2dc)][_0x11f896(0xd0)]?_0x1c3ab5+'\x0a\x20\x20\x20\x20\x20\x20'+_0xac4c2f['stack'][_0x11f896(0xf6)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x1c3ab5;})['join']('\x0a');}function _0x363b23(_0x35e100,_0x15895f){const _0x1751bd=_0x372a,_0x46ad80=_0x1751bd(0x2d8)+_0x35e100+_0x1751bd(0x230)+new Date()[_0x1751bd(0x2ba)]()+_0x1751bd(0x2b1)+process[_0x1751bd(0x112)]+_0x1751bd(0x2c5),_0x76cb3=[_0x46ad80,_0x1751bd(0x183)+(_0x15895f&&_0x15895f[_0x1751bd(0x2dc)]?_0x15895f[_0x1751bd(0x2dc)][_0x1751bd(0xd8)]('\x0a')[0x0]:_0x15895f),_0x1751bd(0x204)+(_0x3d9f5e?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x53ae6e(0x18),_0x2b3531(),'='['repeat'](_0x46ad80[_0x1751bd(0xd0)]-0x1)];_0x1305a8(_0x76cb3['join']('\x0a'));}function _0x3685d4(_0x25061f){const _0x13c6c7=_0x372a;if(!_0x1e1de5())return;const _0x1a02c0=String(_0x25061f&&_0x25061f['message']||_0x25061f||''),_0x22becd=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x13c6c7(0x15a)](_0x1a02c0);_0x363b23(_0x22becd?_0x13c6c7(0x153):_0x13c6c7(0x203),_0x25061f);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x22becd)return;try{console[_0x13c6c7(0x25a)](_0x25061f&&_0x25061f[_0x13c6c7(0x2dc)]?_0x25061f[_0x13c6c7(0x2dc)]:_0x25061f);}catch{}process[_0x13c6c7(0x227)](0x1);}function _0x6b1dec(_0x32202c){const _0x4e5ee8=_0x372a;if(!_0x1e1de5())return;const _0x31d021=String(_0x32202c&&_0x32202c[_0x4e5ee8(0x14d)]||_0x32202c||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4e5ee8(0x15a)](_0x31d021)&&_0x363b23('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x32202c);}function _0x2b3531(){const _0x69fb42=_0x372a,_0x5dd40d=[_0x69fb42(0x117)];let _0x40dc38=![];for(const _0x376432 of _0x4e97a4){const _0x38fd88=_0x376432&&_0x376432['_envs'];if(!_0x38fd88)continue;for(const [_0x652bc6,_0x380ef8]of _0x38fd88){const _0x28bde3=_0x380ef8&&_0x380ef8[_0x69fb42(0x211)]&&_0x380ef8[_0x69fb42(0x211)][_0x69fb42(0x28f)];if(!_0x28bde3)continue;let _0x679014,_0x17f73c;try{_0x679014=Atomics['load'](_0x28bde3,0x0),_0x17f73c=Atomics[_0x69fb42(0x13b)](_0x28bde3,0x1);}catch{continue;}if(_0x679014===0x0)continue;_0x40dc38=!![];const _0x5dfbf4=_0x679014>0x0?_0x69fb42(0x25d):'copy',_0x5c37a6=Date[_0x69fb42(0x2ae)]()-Math[_0x69fb42(0x18c)](_0x679014)*0x3e8,_0x23fbc3=((()=>{const _0x30c0f5=_0x69fb42;try{return _0x380ef8[_0x30c0f5(0x27f)]&&_0x380ef8[_0x30c0f5(0x27f)][_0x30c0f5(0x198)]?_0x380ef8['_writer']['status']():null;}catch{return null;}})());_0x5dd40d[_0x69fb42(0x181)](_0x69fb42(0x192)+_0x652bc6+_0x69fb42(0x1d5)+_0x5dfbf4+_0x69fb42(0x120)+_0x5c37a6+_0x69fb42(0x1f5)+_0x17f73c+(_0x23fbc3?'\x20writer{depth='+_0x23fbc3[_0x69fb42(0x2e4)]+'\x20oldestPendingMs='+_0x23fbc3['oldestPendingMs']+_0x69fb42(0x2d0)+_0x23fbc3['parkedNow']+'}':''));}}if(!_0x40dc38)_0x5dd40d[_0x69fb42(0x181)](_0x69fb42(0x2ad));return _0x5dd40d[_0x69fb42(0xf6)]('\x0a');}function _0x30bd90(){const _0x16b183=_0x372a;if(!_0x1e1de5())return;const _0x1edfd4=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x2b4f09=Date['now']();for(const _0x1a980f of _0x4e97a4){const _0x496897=_0x1a980f&&_0x1a980f['_envs'];if(!_0x496897)continue;for(const [_0x3a9fc2,_0x551621]of _0x496897){const _0x527b35=_0x551621&&_0x551621['_coordinator']&&_0x551621['_coordinator'][_0x16b183(0x28f)];if(!_0x527b35)continue;let _0x2de997;try{_0x2de997=Atomics[_0x16b183(0x13b)](_0x527b35,0x0);}catch{continue;}const _0x55a278=_0x1a980f['path']+'|'+_0x3a9fc2;if(_0x2de997<=0x0){_0x28c4fe['delete'](_0x55a278);continue;}const _0x3343d1=_0x2b4f09-_0x2de997*0x3e8,_0x5410db=_0x28c4fe['get'](_0x55a278);if(_0x3343d1<_0x1edfd4)continue;if(_0x5410db&&_0x2b4f09-_0x5410db[_0x16b183(0x2c2)]<_0x1edfd4)continue;_0x28c4fe[_0x16b183(0xcf)](_0x55a278,{'firstTs':_0x5410db?_0x5410db[_0x16b183(0x290)]:_0x2de997,'dumpedAt':_0x2b4f09});const _0x506cfb='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x3343d1+_0x16b183(0x1eb)+_0x3a9fc2+'\x20@\x20'+new Date()['toISOString']()+'\x20pid='+process['pid']+'\x20===';_0x1305a8([_0x506cfb,_0x2b3531(),'='[_0x16b183(0x284)](_0x506cfb[_0x16b183(0xd0)]-0x1)][_0x16b183(0xf6)]('\x0a'));}}}function _0x58afe6(){const _0xf99fe9=_0x372a;if(!_0x1e1de5()||_0x3c0ca3)return;_0x3c0ca3=!![],process[_0xf99fe9(0x107)](_0xf99fe9(0x203),_0x3685d4),process['prependListener']('unhandledRejection',_0x6b1dec);const _0xfbad8e=Math[_0xf99fe9(0x18b)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x9d407f=setInterval(_0x30bd90,_0xfbad8e);if(_0x9d407f[_0xf99fe9(0x1fd)])_0x9d407f[_0xf99fe9(0x1fd)]();}function _0x986448(_0x5438e1){const _0x4b2b37=_0x372a;if(!_0x1e1de5()||!_0x5438e1)return;_0x4e97a4[_0x4b2b37(0x2dd)](_0x5438e1),_0x58afe6();}function _0x4ff376(_0x3e9b4c){_0x4e97a4['delete'](_0x3e9b4c);}function _0xfc5402(){if(!_0x1e1de5())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x3d9f5e,'recentWrites':_0x38d717(0x10),'drain':_0x2b3531()};}return okdbDiag={'isEnabled':_0x1e1de5,'recordWrite':_0x5a425a,'installDiag':_0x58afe6,'registerOkdb':_0x986448,'unregisterOkdb':_0x4ff376,'snapshot':_0xfc5402},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x3c1e0b=_0xa12a27;if(hasRequiredOkdbWriter)return okdbWriter[_0x3c1e0b(0x1af)];hasRequiredOkdbWriter=0x1;const {performance:_0x455f3a}=require$$0$2,_0x3cc030=requireOkdbDiag(),_0x5424a3=process.env.OKDB_COMMIT_MODE==='sync';class _0x95fcaf{constructor(_0x25440a){const _0x48efa9=_0x3c1e0b;this[_0x48efa9(0x17b)]=_0x25440a,this[_0x48efa9(0x1fb)]=new Set(),this[_0x48efa9(0xf5)]=new Map(),this['_committed']=0x0,this[_0x48efa9(0x17c)]=[],this[_0x48efa9(0x2bb)]=[],this[_0x48efa9(0xea)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this[_0x48efa9(0xca)]=[],this['_bpParkedTotal']=0x0;}async[_0x3c1e0b(0x188)](_0x2947b8,_0x3d83e7){const _0x52f4e8=_0x3c1e0b;if(_0x3cc030['isEnabled']())_0x3cc030['recordWrite'](this[_0x52f4e8(0x17b)]?.[_0x52f4e8(0x2ea)],_0x3d83e7);if(this[_0x52f4e8(0x145)]){const _0x56bce2=new Error(_0x52f4e8(0x289));_0x56bce2['code']=_0x52f4e8(0x220);throw _0x56bce2;}if(this[_0x52f4e8(0xea)]>0x0){let _0x26dd97=![];while(this[_0x52f4e8(0x174)]>=this[_0x52f4e8(0xea)]&&!this[_0x52f4e8(0x145)]){!_0x26dd97&&(_0x26dd97=!![],this['_bpParkedTotal']++),await new Promise(_0x1a335a=>this['_bpWaiters']['push'](_0x1a335a));}if(this[_0x52f4e8(0x145)]){const _0x43346a=new Error(_0x52f4e8(0x289));_0x43346a[_0x52f4e8(0x2c6)]=_0x52f4e8(0x220);throw _0x43346a;}}this[_0x52f4e8(0x174)]++;const _0x4913b9=this['env'][_0x52f4e8(0x211)];if(_0x4913b9)await _0x4913b9[_0x52f4e8(0x221)]();if(this[_0x52f4e8(0x145)]){if(_0x4913b9)_0x4913b9[_0x52f4e8(0x13e)]();this[_0x52f4e8(0x174)]--;if(this[_0x52f4e8(0xca)][_0x52f4e8(0xd0)]&&this[_0x52f4e8(0x174)]<this[_0x52f4e8(0xea)])this[_0x52f4e8(0xca)][_0x52f4e8(0x241)]()();const _0x570c7f=new Error(_0x52f4e8(0x289));_0x570c7f[_0x52f4e8(0x2c6)]=_0x52f4e8(0x220);throw _0x570c7f;}const _0x12805c=_0x455f3a[_0x52f4e8(0x2ae)]();if(_0x5424a3)try{const _0x1738b9=this['env']['db'][_0x52f4e8(0x1e7)](_0x2947b8);this[_0x52f4e8(0x23a)]++;if(this[_0x52f4e8(0x17c)][_0x52f4e8(0x181)](_0x455f3a[_0x52f4e8(0x2ae)]()-_0x12805c)>0x100)this[_0x52f4e8(0x17c)][_0x52f4e8(0x241)]();if(this[_0x52f4e8(0x2bb)]['push'](_0x455f3a[_0x52f4e8(0x2ae)]())>0x800)this[_0x52f4e8(0x2bb)][_0x52f4e8(0x241)]();return _0x1738b9;}finally{this[_0x52f4e8(0x174)]--;if(this[_0x52f4e8(0xca)]['length']&&this['_outstanding']<this[_0x52f4e8(0xea)])this[_0x52f4e8(0xca)][_0x52f4e8(0x241)]()();if(_0x4913b9)_0x4913b9[_0x52f4e8(0x13e)]();}const _0x23a401=this[_0x52f4e8(0x17b)]['db'][_0x52f4e8(0x148)](_0x2947b8);this[_0x52f4e8(0x1fb)][_0x52f4e8(0x2dd)](_0x23a401),this[_0x52f4e8(0xf5)]['set'](_0x23a401,_0x12805c);const _0x28dc86=()=>{const _0x4de56c=_0x52f4e8;this[_0x4de56c(0x1fb)][_0x4de56c(0xfa)](_0x23a401),this[_0x4de56c(0xf5)][_0x4de56c(0xfa)](_0x23a401),this[_0x4de56c(0x23a)]++,this[_0x4de56c(0x174)]--;this[_0x4de56c(0xca)][_0x4de56c(0xd0)]&&this[_0x4de56c(0x174)]<this[_0x4de56c(0xea)]&&this['_bpWaiters'][_0x4de56c(0x241)]()();if(this['_durs']['push'](_0x455f3a[_0x4de56c(0x2ae)]()-_0x12805c)>0x100)this[_0x4de56c(0x17c)][_0x4de56c(0x241)]();if(this['_done'][_0x4de56c(0x181)](_0x455f3a[_0x4de56c(0x2ae)]())>0x800)this[_0x4de56c(0x2bb)][_0x4de56c(0x241)]();};_0x23a401[_0x52f4e8(0x196)](_0x28dc86,_0x28dc86);try{return await _0x23a401;}finally{if(_0x4913b9)_0x4913b9['afterWrite']();}}[_0x3c1e0b(0x198)](){const _0x39b03e=_0x3c1e0b,_0x41dae1=_0x455f3a['now']();let _0xc2f4a2=0x0;for(const _0x25bb5d of this[_0x39b03e(0xf5)]['values']()){const _0x1bf272=_0x41dae1-_0x25bb5d;if(_0x1bf272>_0xc2f4a2)_0xc2f4a2=_0x1bf272;}let _0x278a87=0x0;for(let _0x5667f7=this[_0x39b03e(0x2bb)][_0x39b03e(0xd0)]-0x1;_0x5667f7>=0x0;_0x5667f7--){if(_0x41dae1-this[_0x39b03e(0x2bb)][_0x5667f7]>0x3e8)break;_0x278a87++;}let _0x5da7c1=0x0;if(this[_0x39b03e(0x17c)][_0x39b03e(0xd0)]){const _0x2a5356=[...this[_0x39b03e(0x17c)]][_0x39b03e(0x111)]((_0x381e3f,_0x36202e)=>_0x381e3f-_0x36202e);_0x5da7c1=_0x2a5356[Math[_0x39b03e(0x119)](_0x2a5356[_0x39b03e(0xd0)]-0x1,Math[_0x39b03e(0x1ec)](_0x2a5356[_0x39b03e(0xd0)]*0.99))];}return{'depth':this[_0x39b03e(0x1fb)][_0x39b03e(0x298)],'oldestPendingMs':Math[_0x39b03e(0x2cd)](_0xc2f4a2),'committed':this[_0x39b03e(0x23a)],'commitsPerSec':_0x278a87,'commitP99Ms':Math[_0x39b03e(0x2cd)](_0x5da7c1),'parkedNow':this[_0x39b03e(0xca)]['length'],'parkedTotal':this[_0x39b03e(0xd9)],'highWater':this[_0x39b03e(0xea)]};}[_0x3c1e0b(0x244)](){const _0x49da55=_0x3c1e0b,_0x21eb77=_0x455f3a[_0x49da55(0x2ae)]();return[...this['_enqueuedAt']['values']()][_0x49da55(0x2de)](_0x47bd9f=>Math[_0x49da55(0x2cd)](_0x21eb77-_0x47bd9f))['sort']((_0xa2a211,_0x4d1d2a)=>_0x4d1d2a-_0xa2a211);}[_0x3c1e0b(0x1c4)](){const _0x5bdbd8=_0x3c1e0b;this[_0x5bdbd8(0x145)]=!![];for(const _0x177653 of this[_0x5bdbd8(0xca)][_0x5bdbd8(0x10b)](0x0))_0x177653();}async['drain'](){const _0x3b4887=_0x3c1e0b;let _0x5b0754=0x0;while(this['_inflight'][_0x3b4887(0x298)]&&_0x5b0754++<0x3e8){await Promise[_0x3b4887(0x186)]([...this['_inflight']]);}}async[_0x3c1e0b(0x1cf)](_0x53b230,_0x3d5685,_0x1cf8d1,_0xac3de4){const _0x375175=_0x3c1e0b;return this[_0x375175(0x188)](()=>{const _0x1b5b1c=_0x375175;if(_0xac3de4===undefined)_0x53b230[_0x1b5b1c(0x22e)](_0x3d5685,_0x1cf8d1);else _0x53b230[_0x1b5b1c(0x22e)](_0x3d5685,_0x1cf8d1,_0xac3de4);},_0x375175(0x2ef));}async[_0x3c1e0b(0x1e9)](_0x5066c9,_0x4e4794){const _0x45aa56=_0x3c1e0b;return this['transaction'](()=>_0x5066c9['removeSync'](_0x4e4794),_0x45aa56(0x1f0));}}async function _0x20969b(_0x348aa7,_0x27d2f3){const _0x3b3503=_0x3c1e0b;if(_0x27d2f3==null)_0x27d2f3=Math[_0x3b3503(0x18b)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x1a6075=_0x348aa7?.[_0x3b3503(0x134)];if(!_0x1a6075||typeof _0x1a6075['then']!==_0x3b3503(0x21b))return;await Promise[_0x3b3503(0x2d6)]([Promise[_0x3b3503(0xcc)](_0x1a6075)[_0x3b3503(0x26d)](()=>{}),new Promise(_0x231e8e=>{const _0x13cc6b=_0x3b3503,_0x58f73a=setTimeout(_0x231e8e,_0x27d2f3);if(_0x58f73a[_0x13cc6b(0x1fd)])_0x58f73a['unref']();})]);}catch{}}function _0x21b029(_0x18b7d0){const _0x4ab272=_0x3c1e0b;if(_0x5424a3)return Promise[_0x4ab272(0xcc)]();const _0xd13c2e=_0x18b7d0?.[_0x4ab272(0x177)];return _0xd13c2e&&typeof _0xd13c2e[_0x4ab272(0x196)]==='function'?_0xd13c2e:Promise[_0x4ab272(0xcc)]();}return okdbWriter['exports']=_0x95fcaf,okdbWriter['exports'][_0x3c1e0b(0x295)]=_0x20969b,okdbWriter[_0x3c1e0b(0x1af)][_0x3c1e0b(0x177)]=_0x21b029,okdbWriter['exports'][_0x3c1e0b(0x16e)]=_0x5424a3,okdbWriter[_0x3c1e0b(0x1af)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x31ef36=_0xa12a27;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x3476a6=require$$0$3,{SYNC_COMMITS:_0x3501f5}=requireOkdbWriter(),_0x5fc0ce=_0x31ef36(0xcb);class _0x593c83{constructor(_0x2c0e91,_0x3dc720,_0x33cbfd){const _0x2cb575=_0x31ef36;this['_lock']=_0x2c0e91,this[_0x2cb575(0x2a0)]=_0x3dc720,this[_0x2cb575(0xe3)]=_0x33cbfd,this[_0x2cb575(0x1c3)]=![],this[_0x2cb575(0x299)]=null,this[_0x2cb575(0x23f)]=null;}[_0x31ef36(0x253)](){const _0x2fd823=_0x31ef36;if(this[_0x2fd823(0x1c3)])return![];try{const _0x4cf66e=this['_lock']['_db']()[_0x2fd823(0xf8)](this[_0x2fd823(0x2a0)]);if(!_0x4cf66e||_0x4cf66e['acquiredAt']!==this[_0x2fd823(0xe3)])return![];const _0x56c897=_0x4cf66e['updatedAt']??_0x4cf66e[_0x2fd823(0x22a)];if(_0x56c897+_0x4cf66e[_0x2fd823(0x1d8)]<Date[_0x2fd823(0x2ae)]())return![];return!![];}catch{return!this[_0x2fd823(0x1c3)];}}['holder'](){const _0x259119=_0x31ef36;if(this[_0x259119(0x1c3)])return null;try{return this[_0x259119(0xd1)][_0x259119(0x121)]()[_0x259119(0xf8)](this[_0x259119(0x2a0)])??null;}catch{return null;}}async['extend'](_0x14e023){const _0x2ac56b=_0x31ef36;if(this[_0x2ac56b(0x1c3)])return;try{const _0x1b7f04=this['_lock'][_0x2ac56b(0x121)]()[_0x2ac56b(0xf8)](this['_key']);if(!_0x1b7f04||_0x1b7f04[_0x2ac56b(0x22a)]!==this[_0x2ac56b(0xe3)])return;if(_0x3501f5)this['_lock'][_0x2ac56b(0x121)]()['putSync'](this[_0x2ac56b(0x2a0)],{..._0x1b7f04,'ttlMs':_0x1b7f04[_0x2ac56b(0x1d8)]+_0x14e023});else await this[_0x2ac56b(0xd1)][_0x2ac56b(0x121)]()[_0x2ac56b(0x1cf)](this['_key'],{..._0x1b7f04,'ttlMs':_0x1b7f04[_0x2ac56b(0x1d8)]+_0x14e023});}catch{}}async[_0x31ef36(0x23e)](){const _0x2e7a42=_0x31ef36;if(this[_0x2e7a42(0x1c3)])return;if(this[_0x2e7a42(0x23f)])try{await this[_0x2e7a42(0x23f)];}catch{}clearInterval(this[_0x2e7a42(0x299)]),this[_0x2e7a42(0x299)]=null,this[_0x2e7a42(0x1c3)]=!![];try{const _0x194ea7=this[_0x2e7a42(0xd1)]['_db']()[_0x2e7a42(0xf8)](this['_key']);if(_0x194ea7&&_0x194ea7[_0x2e7a42(0x22a)]===this['_acquiredAt']){if(_0x3501f5)this[_0x2e7a42(0xd1)][_0x2e7a42(0x121)]()[_0x2e7a42(0x1a9)](this['_key']);else await this[_0x2e7a42(0xd1)]['_db']()[_0x2e7a42(0x1e9)](this['_key']);}}catch{}}[_0x31ef36(0x1e8)](_0x2d9f65,_0x4a2f01){const _0x1bb078=_0x31ef36,_0x2bb0c5=_0x4a2f01??Math[_0x1bb078(0x1ec)](_0x2d9f65/0x3);this[_0x1bb078(0x299)]=setInterval(()=>{const _0x568850=_0x1bb078;if(this[_0x568850(0x1c3)])return;this[_0x568850(0x23f)]=((async()=>{const _0x4530c4=_0x568850;try{const _0x2508f9=this[_0x4530c4(0xd1)][_0x4530c4(0x121)]()[_0x4530c4(0xf8)](this[_0x4530c4(0x2a0)]);if(!_0x2508f9||_0x2508f9[_0x4530c4(0x22a)]!==this[_0x4530c4(0xe3)]){this[_0x4530c4(0x1c3)]=!![],clearInterval(this['_heartbeatTimer']),this[_0x4530c4(0x299)]=null;return;}if(_0x3501f5)this[_0x4530c4(0xd1)][_0x4530c4(0x121)]()[_0x4530c4(0x22e)](this[_0x4530c4(0x2a0)],{..._0x2508f9,'updatedAt':Date['now']()});else await this[_0x4530c4(0xd1)]['_db']()[_0x4530c4(0x1cf)](this['_key'],{..._0x2508f9,'updatedAt':Date[_0x4530c4(0x2ae)]()});}catch{}this[_0x4530c4(0x23f)]=null;})());},_0x2bb0c5);if(this[_0x1bb078(0x299)][_0x1bb078(0x1fd)])this['_heartbeatTimer']['unref']();}}class _0xc88e4c{constructor(_0x2a7474,{namespace:_0xb51e00,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x51c26b=_0x31ef36;this['_rawDb']=_0x2a7474,this[_0x51c26b(0x16d)]=_0xb51e00,this[_0x51c26b(0x1d8)]=ttlMs,this[_0x51c26b(0x168)]=heartbeatMs,this[_0x51c26b(0x2cb)]=null;}[_0x31ef36(0x121)](){const _0x557e65=_0x31ef36;return!this[_0x557e65(0x2cb)]&&(this[_0x557e65(0x2cb)]=this['_rawDb'][_0x557e65(0x29c)](_0x5fc0ce,{'dupSort':![]})),this['_lockDb'];}[_0x31ef36(0x16a)](){const _0x5a91bc=_0x31ef36;return!this['_wantDbHandle']&&(this[_0x5a91bc(0x237)]=this[_0x5a91bc(0x216)][_0x5a91bc(0x29c)](_0x5fc0ce+_0x5a91bc(0x29a),{'dupSort':![]})),this[_0x5a91bc(0x237)];}[_0x31ef36(0x2a0)](_0x38a616){const _0x58ed94=_0x31ef36;return this[_0x58ed94(0x16d)]+':'+_0x38a616;}[_0x31ef36(0x200)](_0x3d4949){const _0x35e9df=_0x31ef36;try{_0x3501f5?this[_0x35e9df(0x16a)]()[_0x35e9df(0x22e)](this[_0x35e9df(0x2a0)](_0x3d4949),Date[_0x35e9df(0x2ae)]()):this['_wantDb']()[_0x35e9df(0x1cf)](this[_0x35e9df(0x2a0)](_0x3d4949),Date[_0x35e9df(0x2ae)]())?.[_0x35e9df(0x26d)]?.(()=>{});}catch{}}[_0x31ef36(0x231)](_0x3e6486,_0x4f7581=0x3e8){const _0x3cb4e4=_0x31ef36;try{const _0x4084f1=this[_0x3cb4e4(0x16a)]()[_0x3cb4e4(0xf8)](this['_key'](_0x3e6486));return typeof _0x4084f1===_0x3cb4e4(0x21a)&&Date[_0x3cb4e4(0x2ae)]()-_0x4084f1<_0x4f7581;}catch{return![];}}['_isStale'](_0x502cac){const _0x30a045=_0x31ef36,_0x2a1df4=_0x502cac['updatedAt']??_0x502cac[_0x30a045(0x22a)];return _0x2a1df4+_0x502cac[_0x30a045(0x1d8)]<Date[_0x30a045(0x2ae)]();}static[_0x31ef36(0xd7)](_0x257287){const _0x45dd05=_0x31ef36,_0x36f22d=_0x257287?.[_0x45dd05(0x24c)];if(!_0x36f22d||typeof _0x36f22d[_0x45dd05(0x112)]!==_0x45dd05(0x21a))return![];if(_0x36f22d[_0x45dd05(0x2bf)]!==_0x3476a6[_0x45dd05(0x2bf)]())return![];if(_0x36f22d[_0x45dd05(0x112)]===process[_0x45dd05(0x112)])return![];try{return process[_0x45dd05(0x2d2)](_0x36f22d['pid'],0x0),![];}catch(_0x507930){return _0x507930['code']==='ESRCH';}}async[_0x31ef36(0x136)](_0x25bd2a,_0xe42f61={},_0xf269fa={}){const _0x4061bf=_0x31ef36,_0x3884df=this[_0x4061bf(0x2a0)](_0x25bd2a),_0x4e5ed2=_0xf269fa[_0x4061bf(0x1d8)]??this[_0x4061bf(0x1d8)],_0x2d3cac=Date[_0x4061bf(0x2ae)](),_0x41aea1={'holder':{'pid':process[_0x4061bf(0x112)],'hostname':_0x3476a6[_0x4061bf(0x2bf)](),..._0xe42f61},'acquiredAt':_0x2d3cac,'updatedAt':_0x2d3cac,'ttlMs':_0x4e5ed2};let _0x3a1806=![],_0x28b3f0=null;try{const _0x37b6ac=()=>{const _0x1539ae=_0x4061bf,_0xa78466=this[_0x1539ae(0x121)]()[_0x1539ae(0xf8)](_0x3884df);if(_0xa78466&&!this[_0x1539ae(0x1cd)](_0xa78466)&&!_0xc88e4c[_0x1539ae(0xd7)](_0xa78466)){const _0x2ee204=_0xe42f61['processorId']!=null&&_0xa78466[_0x1539ae(0x24c)][_0x1539ae(0x112)]===process['pid']&&_0xa78466[_0x1539ae(0x24c)][_0x1539ae(0x209)]===_0xe42f61[_0x1539ae(0x209)];if(!_0x2ee204){_0x3a1806=![],_0x28b3f0=_0xa78466;return;}_0x41aea1[_0x1539ae(0x22a)]<=_0xa78466[_0x1539ae(0x22a)]&&(_0x41aea1[_0x1539ae(0x22a)]=_0xa78466[_0x1539ae(0x22a)]+0x1,_0x41aea1[_0x1539ae(0x140)]=_0x41aea1['acquiredAt']);}this[_0x1539ae(0x121)]()[_0x1539ae(0x1cf)](_0x3884df,_0x41aea1),_0x3a1806=!![],_0x28b3f0=_0x41aea1;};if(_0x3501f5)this[_0x4061bf(0x121)]()[_0x4061bf(0x1e7)](_0x37b6ac);else await this[_0x4061bf(0x121)]()['childTransaction'](_0x37b6ac);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x3a1806)return{'acquired':![],'handle':null,'current':_0x28b3f0};const _0x5584f8=new _0x593c83(this,_0x3884df,_0x41aea1[_0x4061bf(0x22a)]);return _0x5584f8[_0x4061bf(0x1e8)](_0x4e5ed2,this[_0x4061bf(0x168)]),{'acquired':!![],'handle':_0x5584f8,'current':_0x28b3f0};}[_0x31ef36(0x28e)](_0x342b04){const _0x7b535b=_0x31ef36;try{return this[_0x7b535b(0x121)]()['get'](this[_0x7b535b(0x2a0)](_0x342b04))??null;}catch{return null;}}[_0x31ef36(0x233)](){const _0x5ba656=_0x31ef36,_0x220390=this[_0x5ba656(0x16d)]+':',_0x561d5f=[];try{for(const {key:_0x563ed0,value:_0x3cde62}of this['_db']()['getRange']({'start':_0x220390,'end':_0x220390+'\xff'})){typeof _0x563ed0==='string'&&_0x563ed0[_0x5ba656(0x1c2)](_0x220390)&&_0x561d5f[_0x5ba656(0x181)]({'id':_0x563ed0[_0x5ba656(0x11e)](_0x220390[_0x5ba656(0xd0)]),'entry':_0x3cde62});}}catch{}return _0x561d5f;}static[_0x31ef36(0x1a8)](_0x22502a){const _0x368739=_0x31ef36,_0x11416f=[];try{const _0x943010=_0x22502a[_0x368739(0x29c)](_0x5fc0ce,{'dupSort':![]});for(const {key:_0x27a437,value:_0x393a1b}of _0x943010['getRange']({})){if(typeof _0x27a437!==_0x368739(0xd3))continue;const _0x427c54=_0x27a437[_0x368739(0x2e5)](':');if(_0x427c54<0x1)continue;_0x11416f[_0x368739(0x181)]({'namespace':_0x27a437['slice'](0x0,_0x427c54),'id':_0x27a437[_0x368739(0x11e)](_0x427c54+0x1),'entry':_0x393a1b});}}catch{}return _0x11416f;}}return okdbLock={'OKDBLock':_0xc88e4c},okdbLock;}var version=_0xa12a27(0x2ca),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0xe3ce09=_0xa12a27;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x35acc1=require$$0$3,_0x15c343=require$$1$1,_0x4a6a5d=require$$2,{LOOP:_0x2a406b}=requireOkdbLoopMonitor(),{OKDBLock:_0x583e80}=requireOkdbLock(),{SYNC_COMMITS:_0x9ad6df}=requireOkdbWriter(),_0x1ee557=_0xe3ce09(0x2c7),_0x4ca531='node',_0x2c2f75=_0xe3ce09(0x279),_0x35a3ff=_0xe3ce09(0xfe),_0x137758=(_0x5afc8f,_0x836b69)=>_0x5afc8f+':'+_0x836b69,_0x1a87a0=(_0x1577c7,_0x62c012)=>_0x1577c7+'::'+_0x62c012,_0x5ad37b=(_0x130c36,_0x126de3)=>_0x130c36+'/'+_0x126de3,_0x3257f7=(_0x1840bc,_0x15c2bd)=>_0x1840bc+'#'+_0x15c2bd,_0x102ff0=_0x1d69fa=>{const _0x9dac43=_0xe3ce09;if(_0x1d69fa?.[_0x9dac43(0x170)])return _0x1d69fa[_0x9dac43(0x170)];const _0x344ce9=_0x1d69fa?.[_0x9dac43(0x1b6)];return typeof _0x344ce9===_0x9dac43(0xd3)&&_0x344ce9[_0x9dac43(0x166)]('#')?_0x344ce9[_0x9dac43(0x11e)](0x0,_0x344ce9[_0x9dac43(0x2e5)]('#')):_0x344ce9;},_0x29175a=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1c4ec9=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x1786fe=_0x29175a*0x3,_0x506ad2=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0xe3ce09(0x18b)](0x927c0,_0x1786fe*0x14),_0x3153ef=['processor:progress',_0xe3ce09(0x296),_0xe3ce09(0x1a6),'processor:error',_0xe3ce09(0x14c),'processor:resumed'];let _0x2176a0=null;function _0x480975(){const _0x3f930b=_0xe3ce09;if(_0x2176a0==null)_0x2176a0=Math[_0x3f930b(0x2cd)]((Date['now']()-process[_0x3f930b(0x291)]()*0x3e8)/0x3e8)*0x3e8;return _0x2176a0;}function _0x3dfd82(_0x2d397b){const _0x23f4a5=_0xe3ce09;if(process.env.OKDB_PROCESS_KILL===_0x23f4a5(0x261))return![];if(_0x2d397b?.[_0x23f4a5(0x13c)]?.[_0x23f4a5(0x155)]&&typeof _0x2d397b['options']['processes']===_0x23f4a5(0x1ca)&&_0x2d397b[_0x23f4a5(0x13c)][_0x23f4a5(0x155)][_0x23f4a5(0x2d2)]===![])return![];return!![];}function _0x2f7dab(_0xc02c52,_0x82a77b){const _0x1fe140=_0xe3ce09,_0x4115ed=!!_0x82a77b?.[_0x1fe140(0x2b2)];switch(_0xc02c52){case'primary':return{'controllable':_0x4115ed,'decommissionable':![],'killable':!![],'killConfirm':_0x1fe140(0x2b6)};case'cli':case'standalone':return{'controllable':_0x4115ed,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x1fe140(0x2d9):case'queue-worker':case'fn-runner':case _0x1fe140(0x167):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x1fe140(0x149)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1fa8d6{constructor(_0x27d2d1){const _0x486193=_0xe3ce09;this['okdb']=_0x27d2d1,this['_statusEnv']=null,this[_0x486193(0x1d4)]=null,this[_0x486193(0xfb)]=new Map(),this['_cmd']=null,this['_isWriter']=![],this[_0x486193(0x2b5)]=![],this[_0x486193(0x223)]=_0x480975(),this['_selfKey']=_0x137758(process[_0x486193(0x112)],this['_processStartedAt']),this[_0x486193(0x248)]=_0x4a6a5d[_0x486193(0x19b)]()[_0x486193(0x11e)](0x0,0x8),this[_0x486193(0x27d)]=_0x3257f7(this[_0x486193(0x235)],this['_instanceId']),this[_0x486193(0xf3)]=Date['now'](),this[_0x486193(0x10f)]=null,this[_0x486193(0xfc)]=null,this[_0x486193(0x28b)]=null,this[_0x486193(0x1f7)]=null,this['_onProcEvent']=null,this[_0x486193(0x25f)]=null,this[_0x486193(0x115)]=0x0,this[_0x486193(0x17d)]={},this[_0x486193(0x18a)]=new Map(),this['_lastCpuUsage']=process[_0x486193(0xd2)](),this[_0x486193(0x138)]=Date[_0x486193(0x2ae)](),this[_0x486193(0x11d)]=0x0,this[_0x486193(0x1ce)]=new Map();}get['selfKey'](){return this['_selfKey'];}get['rowKey'](){return this['_rowKey'];}[_0xe3ce09(0x24d)](_0x54071d,_0x8708a2){const _0x22bd09=_0xe3ce09,_0x396e9c=_0x2f7dab(_0x54071d,_0x8708a2);if(_0x396e9c['killable']&&!_0x3dfd82(this[_0x22bd09(0x1f3)]))return{..._0x396e9c,'killable':![],'killConfirm':undefined};return _0x396e9c;}[_0xe3ce09(0x2bd)](){return!!this['_statusEnv'];}[_0xe3ce09(0xdd)](_0x5e421e){const _0xd8478d=_0xe3ce09;Object['assign'](this[_0xd8478d(0x17d)],_0x5e421e||{});}[_0xe3ce09(0x283)](_0x4dda44){const _0x1a798b=_0xe3ce09;if(_0x4dda44)this[_0x1a798b(0x28b)]=_0x4dda44;}[_0xe3ce09(0xe2)](_0x40f4ab={}){const _0x6e772b=_0xe3ce09;return this[_0x6e772b(0x1f3)][_0x6e772b(0xff)](_0x40f4ab);}[_0xe3ce09(0x2d7)](){const _0x48c140=_0xe3ce09,_0x59b13d={};let _0x5bccd9=0x0,_0x2d86ec=0x0;const _0x1eae30=new Set();for(const _0x23a336 of this[_0x48c140(0x151)]()){_0x2d86ec++;const _0x4e6239=_0x23a336[_0x48c140(0x1bd)];if(!_0x4e6239)continue;if(_0x4e6239[_0x48c140(0x278)])_0x5bccd9++;for(const _0xeff8cd of _0x4e6239[_0x48c140(0x2b2)]||[]){if(!['single',_0x48c140(0x152)][_0x48c140(0x166)](_0xeff8cd[_0x48c140(0x116)]))continue;(_0xeff8cd['state']==='online'||_0xeff8cd['state']===_0x48c140(0x1ba))&&_0xeff8cd['cursorKey']&&_0x1eae30[_0x48c140(0x2dd)]((_0xeff8cd[_0x48c140(0x17b)]||_0x48c140(0x2e9))+':'+_0xeff8cd[_0x48c140(0x213)]);const _0x1a4dca=_0xeff8cd[_0x48c140(0x17b)]||_0x48c140(0x2e9);(_0x59b13d[_0x1a4dca]||=[])['push']({..._0xeff8cd,'env':_0x1a4dca,'owner':{'pid':_0x23a336[_0x48c140(0x112)]??null,'kind':_0x23a336[_0x48c140(0x2a9)]??null}});}}for(const [_0x1e2f1c,_0x58af66]of Object[_0x48c140(0x159)](_0x59b13d)){for(const _0x3a39ee of _0x58af66){if(_0x3a39ee['mode']===_0x48c140(0x269)&&!_0x3a39ee['claimGated']){const _0xdad53=_0x1e2f1c+':'+(_0x3a39ee['cursorKey']??'');if(!_0x1eae30[_0x48c140(0x1cb)](_0xdad53))_0x3a39ee[_0x48c140(0x2e2)]=!![];}}}return{'envs':_0x59b13d,'policy':null,'participation':{'participating':_0x5bccd9,'total':_0x2d86ec},'source':_0x48c140(0x12f)};}['processorsView'](){const _0x415808=_0xe3ce09,_0x55af7c=_0x1051cc=>{const _0x3e3f86=_0x372a;if(_0x1051cc[_0x3e3f86(0x280)]==='online'||_0x1051cc['state']===_0x3e3f86(0x1ba)||_0x1051cc[_0x3e3f86(0x280)]===_0x3e3f86(0x25a))return 0x3;if(_0x1051cc[_0x3e3f86(0x2d1)])return 0x1;return 0x2;},_0x78a64d=new Map();for(const _0x311629 of this[_0x415808(0x151)]()){for(const _0xbb1baf of _0x311629[_0x415808(0x1bd)]?.[_0x415808(0x2b2)]||[]){const _0x1cb13f={..._0xbb1baf,'owner':{'pid':_0x311629['pid']??null,'kind':_0x311629[_0x415808(0x2a9)]??null,'host':_0x311629['host']??null}},_0x26e0e1=_0xbb1baf[_0x415808(0x116)]==='single'?_0x415808(0x1b0)+(_0xbb1baf[_0x415808(0x17b)]??'')+'::'+(_0xbb1baf[_0x415808(0x213)]??_0xbb1baf[_0x415808(0x13d)]??_0xbb1baf['id']):_0x415808(0x214)+(_0x311629[_0x415808(0x1b6)]??_0x311629[_0x415808(0x170)]??'')+'::'+(_0xbb1baf[_0x415808(0x17b)]??'')+'::'+_0xbb1baf['id'],_0x58b780=_0x78a64d[_0x415808(0xf8)](_0x26e0e1);if(!_0x58b780||_0x55af7c(_0x1cb13f)>_0x55af7c(_0x58b780))_0x78a64d[_0x415808(0xcf)](_0x26e0e1,_0x1cb13f);}}return[..._0x78a64d[_0x415808(0x2c1)]()];}[_0xe3ce09(0x18f)](){const _0x1d6a06=_0xe3ce09,_0x2a7e7b=Date[_0x1d6a06(0x2ae)](),_0x5f3e1b=this[_0x1d6a06(0x151)](),_0x2e2efa=_0x261dfc=>Math[_0x1d6a06(0x18b)](0x0,Math[_0x1d6a06(0x2cd)]((_0x2a7e7b-(_0x261dfc[_0x1d6a06(0xc6)]||_0x2a7e7b))/0x3e8)),_0x194019=_0x5f3e1b[_0x1d6a06(0x1f2)](_0x474bb2=>_0x474bb2[_0x1d6a06(0x2a9)]===_0x1d6a06(0x126)),_0x2cc3d8=_0x5f3e1b[_0x1d6a06(0x128)](_0x2e31ec=>_0x2e31ec[_0x1d6a06(0x2a9)]==='http-server');if(_0x194019||_0x2cc3d8[_0x1d6a06(0xd0)])return{'primary':_0x194019?{'pid':_0x194019['pid'],'uptime':_0x2e2efa(_0x194019)}:null,'workers':_0x2cc3d8[_0x1d6a06(0x2de)](_0x45d2e5=>({'pid':_0x45d2e5[_0x1d6a06(0x112)],'uptime':_0x2e2efa(_0x45d2e5)})),'workersConfigured':_0x194019?.['meta']?.['workersConfigured']??_0x2cc3d8[_0x1d6a06(0xd0)],'mode':_0x1d6a06(0x252)};const _0x41659c=_0x5f3e1b[_0x1d6a06(0x1f2)](_0x474446=>_0x474446[_0x1d6a06(0x2a9)]==='cli'||_0x474446[_0x1d6a06(0x2a9)]===_0x1d6a06(0x205)||_0x474446['kind']===_0x1d6a06(0x264)),_0x7eb93d=_0x41659c?{'pid':_0x41659c[_0x1d6a06(0x112)],'uptime':_0x2e2efa(_0x41659c)}:{'pid':process[_0x1d6a06(0x112)],'uptime':Math[_0x1d6a06(0x18b)](0x0,Math['round'](process['uptime']()))};return{'primary':_0x7eb93d,'workers':[_0x7eb93d],'workersConfigured':0x1,'mode':_0x1d6a06(0x269)};}[_0xe3ce09(0x195)](){const _0x1f5db1=_0xe3ce09;return this[_0x1f5db1(0x2a5)]();}[_0xe3ce09(0x12c)](){const _0x3a0bf0=_0xe3ce09,_0x528332=new Map();for(const _0x410b8c of this['_groupByProcess']())_0x528332[_0x3a0bf0(0xcf)](_0x410b8c[_0x3a0bf0(0x170)],{..._0x410b8c,'children':[]});const _0xb4ee1a=[];for(const _0x1a2281 of _0x528332['values']()){const _0x1473cc=_0x1a2281[_0x3a0bf0(0xe6)]?_0x528332[_0x3a0bf0(0xf8)](_0x1a2281[_0x3a0bf0(0xe6)]):null;if(_0x1473cc&&_0x1473cc!==_0x1a2281)_0x1473cc[_0x3a0bf0(0xc5)][_0x3a0bf0(0x181)](_0x1a2281);else _0xb4ee1a[_0x3a0bf0(0x181)](_0x1a2281);}const _0x3c6dd0=(_0x16b3cb,_0x120c49)=>_0x16b3cb[_0x3a0bf0(0x2a9)]===_0x120c49[_0x3a0bf0(0x2a9)]?(_0x16b3cb[_0x3a0bf0(0x112)]||0x0)-(_0x120c49['pid']||0x0):(_0x16b3cb['kind']??'')<(_0x120c49[_0x3a0bf0(0x2a9)]??'')?-0x1:0x1,_0x61e2a4=_0x5933c5=>{const _0x11caa8=_0x3a0bf0;_0x5933c5[_0x11caa8(0x111)](_0x3c6dd0);for(const _0x3e56b7 of _0x5933c5)if(_0x3e56b7[_0x11caa8(0xc5)]['length'])_0x61e2a4(_0x3e56b7[_0x11caa8(0xc5)]);};return _0x61e2a4(_0xb4ee1a),_0xb4ee1a;}[_0xe3ce09(0x1ab)](_0x404096){const _0x52b98e=_0xe3ce09;return this[_0x52b98e(0x2a5)]()[_0x52b98e(0x1f2)](_0x1e15a6=>_0x1e15a6[_0x52b98e(0x170)]===_0x404096)??null;}['_groupByProcess'](_0x3d9e8d=Date[_0xe3ce09(0x2ae)]()){const _0x1aae6e=_0xe3ce09,_0x151e8d=new Map();for(const _0x1df9ea of this[_0x1aae6e(0x151)]()){const _0x1c596a=_0x102ff0(_0x1df9ea);let _0x4d0483=_0x151e8d[_0x1aae6e(0xf8)](_0x1c596a);!_0x4d0483&&(_0x4d0483={'processKey':_0x1c596a,'nodeKey':_0x1c596a,'pid':_0x1df9ea[_0x1aae6e(0x112)],'ppid':_0x1df9ea['ppid']??null,'host':_0x1df9ea['host']??null,'kind':_0x1df9ea[_0x1aae6e(0x2a9)],'role':null,'supervisorKey':_0x1df9ea['supervisorKey']??null,'slot':_0x1df9ea[_0x1aae6e(0x125)]??null,'slotKey':_0x1df9ea[_0x1aae6e(0x147)]??null,'caps':_0x1df9ea['caps']??null,'lifecycle':_0x1df9ea[_0x1aae6e(0x222)]??null,'uptime':Math['max'](0x0,Math[_0x1aae6e(0x2cd)]((_0x3d9e8d-(_0x1df9ea['startedAt']||_0x3d9e8d))/0x3e8)),'startedAt':_0x1df9ea[_0x1aae6e(0xc6)]??null,'meta':_0x1df9ea['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x151e8d[_0x1aae6e(0xcf)](_0x1c596a,_0x4d0483));_0x4d0483[_0x1aae6e(0x1e2)][_0x1aae6e(0x181)]({'instanceId':_0x1df9ea[_0x1aae6e(0x15e)]??null,'role':_0x1df9ea['role']??null,'listenAddr':_0x1df9ea[_0x1aae6e(0x263)]??null,'lifecycle':_0x1df9ea[_0x1aae6e(0x222)]??null,'processing':_0x1df9ea[_0x1aae6e(0x1bd)]??null});if(!_0x4d0483['role']&&_0x1df9ea[_0x1aae6e(0x275)])_0x4d0483['role']=_0x1df9ea[_0x1aae6e(0x275)];if(!_0x4d0483[_0x1aae6e(0x263)]&&_0x1df9ea[_0x1aae6e(0x263)])_0x4d0483[_0x1aae6e(0x263)]=_0x1df9ea[_0x1aae6e(0x263)];if(!_0x4d0483['processing']&&_0x1df9ea[_0x1aae6e(0x1bd)])_0x4d0483['processing']=_0x1df9ea[_0x1aae6e(0x1bd)];if(!_0x4d0483['engines']&&_0x1df9ea[_0x1aae6e(0x26a)])_0x4d0483['engines']=_0x1df9ea[_0x1aae6e(0x26a)];if(!_0x4d0483[_0x1aae6e(0x1a0)]&&_0x1df9ea['singletonClaims'])_0x4d0483[_0x1aae6e(0x1a0)]=_0x1df9ea[_0x1aae6e(0x1a0)];if(_0x4d0483[_0x1aae6e(0x2eb)]==null&&_0x1df9ea[_0x1aae6e(0x2eb)])_0x4d0483[_0x1aae6e(0x2eb)]=_0x1df9ea[_0x1aae6e(0x2eb)];if(_0x1df9ea[_0x1aae6e(0x1b3)]&&(!_0x4d0483['stats']||(_0x1df9ea['stats']['at']??0x0)>(_0x4d0483[_0x1aae6e(0x1b3)]['at']??0x0)))_0x4d0483['stats']=_0x1df9ea[_0x1aae6e(0x1b3)];}return[..._0x151e8d['values']()];}[_0xe3ce09(0x234)](){const _0x1c5481=_0xe3ce09,_0x24c8ad=[],_0x1efa68={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x43f5ff of this[_0x1c5481(0x2a5)]()){_0x24c8ad[_0x1c5481(0x181)]({'processKey':_0x43f5ff[_0x1c5481(0x170)],'kind':_0x43f5ff[_0x1c5481(0x2a9)],'pid':_0x43f5ff[_0x1c5481(0x112)],'supervisorKey':_0x43f5ff[_0x1c5481(0xe6)],'meta':_0x43f5ff[_0x1c5481(0x20a)]??null,'uptime':_0x43f5ff[_0x1c5481(0x291)],'stats':_0x43f5ff[_0x1c5481(0x1b3)]??null}),_0x1efa68[_0x1c5481(0x155)]++;if(_0x43f5ff[_0x1c5481(0x1b3)]){_0x1efa68['rss']+=_0x43f5ff[_0x1c5481(0x1b3)][_0x1c5481(0x2ab)]||0x0,_0x1efa68[_0x1c5481(0x11a)]+=(_0x43f5ff[_0x1c5481(0x1b3)][_0x1c5481(0x11a)]||0x0)+(_0x43f5ff[_0x1c5481(0x1b3)][_0x1c5481(0xe5)]?.[_0x1c5481(0x11a)]||0x0);const _0x299442=_0x43f5ff[_0x1c5481(0x1b3)]['threads'];_0x299442&&(_0x1efa68['threads'][_0x1c5481(0x1f4)]+=_0x299442[_0x1c5481(0x1f4)]||0x0,_0x1efa68[_0x1c5481(0xe5)]['sandbox']+=_0x299442[_0x1c5481(0x215)]||0x0,_0x1efa68['threads']['busy']+=_0x299442[_0x1c5481(0x1ad)]||0x0);}}return{'totals':_0x1efa68,'nodes':_0x24c8ad};}async[_0xe3ce09(0x293)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x2698ff=_0xe3ce09;this[_0x2698ff(0x1ef)]=this[_0x2698ff(0x1ef)]||!!writer,this['_isReader']=this[_0x2698ff(0x2b5)]||!!reader,this[_0x2698ff(0x10f)]=kind||this[_0x2698ff(0x10f)]||(_0x15c343['isWorker']?_0x2698ff(0x2d9):_0x2698ff(0x123)),this[_0x2698ff(0xfc)]=supervisorKey??this['_supervisorKey'],this['_listenAddr']=listenAddr??this[_0x2698ff(0x28b)],this['_ensureDesired'](),await this[_0x2698ff(0x141)]();if(!writer&&!reader)return null;if(!this[_0x2698ff(0x1bc)]){const _0x479aaf=await this[_0x2698ff(0x1f3)][_0x2698ff(0x29b)](_0x1ee557,{'sync':![],'durability':_0x2698ff(0x1d2)});if(!_0x479aaf[_0x2698ff(0x164)](_0x4ca531))await _0x479aaf[_0x2698ff(0x2e6)](_0x4ca531);this[_0x2698ff(0x1bc)]=_0x479aaf;}return this[_0x2698ff(0x1bc)];}[_0xe3ce09(0x19c)](){const _0x3a33ef=_0xe3ce09;return this[_0x3a33ef(0x178)]!==this[_0x3a33ef(0x1bc)]&&(this[_0x3a33ef(0x178)]=this[_0x3a33ef(0x1bc)],this[_0x3a33ef(0x156)]=this[_0x3a33ef(0x1bc)][_0x3a33ef(0x10a)](_0x4ca531)[_0x3a33ef(0x255)]),this[_0x3a33ef(0x156)];}[_0xe3ce09(0x1b9)](_0x542b23){const _0xe07b51=_0xe3ce09;if(_0x9ad6df)return this['_nodeDb']()['putSync'](_0x542b23[_0xe07b51(0x1b6)],_0x542b23,0x1);const _0x3bf5b1=this[_0xe07b51(0x19c)]()[_0xe07b51(0x1cf)](_0x542b23[_0xe07b51(0x1b6)],_0x542b23,0x1);if(_0x3bf5b1&&typeof _0x3bf5b1[_0xe07b51(0x196)]===_0xe07b51(0x21b))_0x3bf5b1['then'](undefined,()=>{});return _0x3bf5b1;}[_0xe3ce09(0x25c)](_0x5ee85a){const _0x1ed7b7=_0xe3ce09;return this['_nodeDb']()[_0x1ed7b7(0x22e)](_0x5ee85a[_0x1ed7b7(0x1b6)],_0x5ee85a,0x1);}['_removeRowAsync'](_0x3cf4e0){const _0x1a53f6=_0xe3ce09;if(_0x9ad6df)try{return this[_0x1a53f6(0x19c)]()[_0x1a53f6(0x1a9)](_0x3cf4e0);}catch{return![];}const _0x37785d=this[_0x1a53f6(0x19c)]()[_0x1a53f6(0x1e9)](_0x3cf4e0);if(_0x37785d&&typeof _0x37785d[_0x1a53f6(0x196)]===_0x1a53f6(0x21b))_0x37785d[_0x1a53f6(0x196)](undefined,()=>{});return _0x37785d;}async[_0xe3ce09(0xd4)](_0x13d4a8){const _0x385124=_0xe3ce09;if(!this[_0x385124(0x1bc)]||!this[_0x385124(0x1ef)]||!_0x13d4a8?.[_0x385124(0x1b6)])return;return this[_0x385124(0x1b9)](_0x13d4a8);}async[_0xe3ce09(0x1de)](_0x2fb9dd){const _0x34c6dc=_0xe3ce09;if(!this[_0x34c6dc(0x1bc)]||!this[_0x34c6dc(0x1ef)]||!_0x2fb9dd)return;const _0x5030ac=_0x2fb9dd[_0x34c6dc(0x166)]('#'),_0x3e4ebd=[];for(const {key:_0x27ac80}of this[_0x34c6dc(0x1bc)][_0x34c6dc(0x22b)](_0x4ca531)){if(_0x27ac80===_0x2fb9dd||!_0x5030ac&&typeof _0x27ac80===_0x34c6dc(0xd3)&&_0x27ac80[_0x34c6dc(0x1c2)](_0x2fb9dd+'#'))_0x3e4ebd[_0x34c6dc(0x181)](_0x27ac80);}for(const _0x46d250 of _0x3e4ebd){try{this[_0x34c6dc(0x19c)]()['removeSync'](_0x46d250);}catch{}}}[_0xe3ce09(0x1ea)](_0x4210f3){const _0x1ef9a7=_0xe3ce09;if(typeof _0x4210f3?.[_0x1ef9a7(0x112)]!=='number')return![];if(_0x4210f3['host']!==_0x35acc1[_0x1ef9a7(0x2bf)]())return![];if(_0x4210f3[_0x1ef9a7(0x112)]===process[_0x1ef9a7(0x112)])return![];if(_0x4210f3['expiresAt']!=null&&_0x4210f3[_0x1ef9a7(0x101)]<Date['now']()-_0x506ad2)return!![];try{return process[_0x1ef9a7(0x2d2)](_0x4210f3['pid'],0x0),![];}catch(_0x32ccb0){return _0x32ccb0[_0x1ef9a7(0x2c6)]==='ESRCH';}}[_0xe3ce09(0x151)](){const _0xe0bd61=_0xe3ce09;if(!this[_0xe0bd61(0x1bc)])return[];try{this[_0xe0bd61(0x1bc)]['db']?.['resetReadTxn']?.();}catch{}const _0x6e260c=Date[_0xe0bd61(0x2ae)](),_0x56ff53=_0x35acc1[_0xe0bd61(0x2bf)](),_0x20a918=[];for(const {value:_0x47c182}of this[_0xe0bd61(0x1bc)][_0xe0bd61(0x22b)](_0x4ca531)){if(!_0x47c182)continue;let _0x41a30a=null;_0x47c182[_0xe0bd61(0x13f)]===_0x56ff53&&typeof _0x47c182['pid']===_0xe0bd61(0x21a)&&(_0x41a30a=!this[_0xe0bd61(0x1ea)](_0x47c182));if(_0x41a30a===![])continue;const _0x1de852=_0x47c182[_0xe0bd61(0x101)]==null||_0x47c182[_0xe0bd61(0x101)]>=_0x6e260c;if(_0x41a30a===!![]||_0x1de852)_0x20a918['push'](_0x47c182);}return _0x20a918;}async[_0xe3ce09(0x2e1)](_0x250c8e=0x0){const _0x4b5a9b=_0xe3ce09;if(!this['_statusEnv']||!this[_0x4b5a9b(0x1ef)])return;const _0x667ec1=Date[_0x4b5a9b(0x2ae)]()-_0x250c8e,_0x3dec80=new Set(),_0x215951=[],_0x259256=_0x35acc1['hostname'](),_0xce22b2=require$$6[_0x4b5a9b(0x2ee)];for(const {key:_0x208d33,value:_0x48e4ed}of this[_0x4b5a9b(0x1bc)][_0x4b5a9b(0x22b)](_0x4ca531)){if(!_0x48e4ed)continue;const _0x2e0e11=_0x48e4ed[_0x4b5a9b(0x13f)]===_0x259256&&typeof _0x48e4ed[_0x4b5a9b(0x112)]==='number',_0x2c8ecc=_0x2e0e11?this[_0x4b5a9b(0x1ea)](_0x48e4ed):_0x48e4ed['expiresAt']!=null&&_0x48e4ed[_0x4b5a9b(0x101)]<_0x667ec1;if(_0x2c8ecc)_0x215951[_0x4b5a9b(0x181)](_0x208d33);else{_0x3dec80[_0x4b5a9b(0x2dd)](_0x102ff0(_0x48e4ed)??_0x208d33);if(_0x48e4ed[_0x4b5a9b(0x2ee)]&&_0x48e4ed[_0x4b5a9b(0x2ee)]!==_0xce22b2){if(!this[_0x4b5a9b(0xd5)])this[_0x4b5a9b(0xd5)]=new Set();!this['_versionSkewWarned']['has'](_0x48e4ed[_0x4b5a9b(0x2ee)])&&(this[_0x4b5a9b(0xd5)][_0x4b5a9b(0x2dd)](_0x48e4ed[_0x4b5a9b(0x2ee)]),this['okdb']['log']?.['warn']?.(_0x4b5a9b(0x12b)+(_0x48e4ed[_0x4b5a9b(0x112)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x48e4ed['version']+_0x4b5a9b(0x133)+_0xce22b2+_0x4b5a9b(0x24f)+_0x4b5a9b(0x1a2),{'feature':_0x4b5a9b(0x271)}));}}}for(const _0x75ae52 of _0x215951)this[_0x4b5a9b(0x282)](_0x75ae52);if(this[_0x4b5a9b(0x27c)]()){const _0x49117a=[];for(const {key:_0x4d2c26}of this['listDesired'](_0x4b5a9b(0x1be))){if(!_0x3dec80[_0x4b5a9b(0x1cb)](_0x4d2c26)){if(_0x9ad6df)try{this['_desired'][_0x4b5a9b(0x1a9)](_0x4b5a9b(0x100)+_0x4d2c26);}catch{}else _0x49117a[_0x4b5a9b(0x181)](this[_0x4b5a9b(0x1d4)][_0x4b5a9b(0x1e9)](_0x4b5a9b(0x100)+_0x4d2c26));}}if(_0x49117a[_0x4b5a9b(0xd0)])await Promise[_0x4b5a9b(0x186)](_0x49117a);}}[_0xe3ce09(0x108)](_0x478f40=null){const _0x416d0d=_0xe3ce09;if(this[_0x416d0d(0x1f7)])return;if(!this[_0x416d0d(0x1ef)]||!this[_0x416d0d(0x1bc)]){this[_0x416d0d(0x1f3)]?.['log']?.[_0x416d0d(0x169)]?.(_0x416d0d(0x12e)+this[_0x416d0d(0x1ef)]+_0x416d0d(0x1bf)+!!this[_0x416d0d(0x1bc)]+_0x416d0d(0x127),{'feature':_0x416d0d(0x155)});return;}this['_onTick']=_0x478f40,this[_0x416d0d(0x212)]=()=>this[_0x416d0d(0x2aa)]();for(const _0x18676d of _0x3153ef)this[_0x416d0d(0x1f3)]['events']['on'](_0x18676d,this[_0x416d0d(0x212)]);this[_0x416d0d(0x2c0)]();const _0x3a0ff2=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x29175a;this[_0x416d0d(0x1f7)]=setInterval(()=>{const _0x556c20=_0x416d0d;if(this[_0x556c20(0x25f)])try{this['_onTick']();}catch{}this[_0x556c20(0x2c0)](),this[_0x556c20(0x2e1)]()['catch'](()=>{});},_0x3a0ff2);if(this[_0x416d0d(0x1f7)][_0x416d0d(0x1fd)])this[_0x416d0d(0x1f7)]['unref']();}[_0xe3ce09(0x2aa)](){const _0x129fa2=_0xe3ce09;if(!this['_isWriter']||!this[_0x129fa2(0x1bc)])return;if(Date[_0x129fa2(0x2ae)]()-this[_0x129fa2(0x115)]<_0x1c4ec9)return;this[_0x129fa2(0x2c0)]();}['_publishNow'](){const _0x2a9a8e=_0xe3ce09;if(!this[_0x2a9a8e(0x1ef)]||!this[_0x2a9a8e(0x1bc)])return;this[_0x2a9a8e(0x115)]=Date[_0x2a9a8e(0x2ae)]();try{const _0x383a09=[this[_0x2a9a8e(0x163)]()];for(const _0x27aca8 of this[_0x2a9a8e(0x18a)][_0x2a9a8e(0x2c1)]())_0x383a09[_0x2a9a8e(0x181)](this[_0x2a9a8e(0x1cc)](_0x27aca8));const _0x45e211=_0x2a406b[_0x2a9a8e(0x21e)]?_0x2a406b[_0x2a9a8e(0x2ae)]():0x0;for(const _0xf98319 of _0x383a09){try{this[_0x2a9a8e(0x25c)](_0xf98319),this[_0x2a9a8e(0x25e)]=![];}catch(_0x248fa2){!this[_0x2a9a8e(0x25e)]&&(this[_0x2a9a8e(0x25e)]=!![],this['okdb']?.[_0x2a9a8e(0x23d)]?.[_0x2a9a8e(0x169)]?.('registry\x20publish\x20failing:\x20'+_0x248fa2[_0x2a9a8e(0x14d)],{'feature':'processes'}));}}if(_0x2a406b[_0x2a9a8e(0x21e)])_0x2a406b[_0x2a9a8e(0xe7)](_0x2a9a8e(0x1ae),_0x2a406b[_0x2a9a8e(0x2ae)]()-_0x45e211,_0x2a9a8e(0x256)+_0x383a09['length']+_0x2a9a8e(0x246));}catch(_0x3bdb18){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this['okdb']?.['log']?.['warn']?.('registry\x20publish\x20failing:\x20'+_0x3bdb18[_0x2a9a8e(0x14d)],{'feature':_0x2a9a8e(0x155)}));}}async[_0xe3ce09(0xec)](){const _0x2665df=_0xe3ce09;if(this[_0x2665df(0x212)]){for(const _0x759b67 of _0x3153ef){try{this[_0x2665df(0x1f3)]['events'][_0x2665df(0x261)](_0x759b67,this[_0x2665df(0x212)]);}catch{}}this[_0x2665df(0x212)]=null;}this['_hbTimer']&&(clearInterval(this[_0x2665df(0x1f7)]),this[_0x2665df(0x1f7)]=null);try{if(this[_0x2665df(0x1bc)]&&this[_0x2665df(0x1ef)])await this[_0x2665df(0x1de)](this[_0x2665df(0x27d)]);}catch{}}async[_0xe3ce09(0x1aa)](){const _0x87ce3a=_0xe3ce09;if(!this['_statusEnv']||!this[_0x87ce3a(0x1ef)])return;try{await this[_0x87ce3a(0x1de)](this[_0x87ce3a(0x27d)]);}catch{}try{const _0x10293d=[];for(const {value:_0x2b21bf}of this['_statusEnv']['getRange'](_0x4ca531)){if(_0x2b21bf?.[_0x87ce3a(0x1b1)]===process[_0x87ce3a(0x112)]&&_0x2b21bf[_0x87ce3a(0x1b6)])_0x10293d[_0x87ce3a(0x181)](_0x2b21bf[_0x87ce3a(0x1b6)]);}for(const _0x1a9941 of _0x10293d){try{await this[_0x87ce3a(0x1de)](_0x1a9941);}catch{}}}catch{}}async['publishOwnRow'](){const _0x5c945f=_0xe3ce09;return this[_0x5c945f(0xd4)](this[_0x5c945f(0x163)]());}async['publishChildRow'](_0x30dd54){const _0x31bce8=_0xe3ce09;if(!this['_statusEnv']||!this[_0x31bce8(0x1ef)])return;return this[_0x31bce8(0xd4)](this['_buildChildRow'](_0x30dd54));}[_0xe3ce09(0x1cc)]({pid:_0x11b8a3,startedAt:_0x342c57,kind:_0x19effa,supervisorKey:_0x99cd0e,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0xe3ce09(0xeb),meta:meta=null,stats:stats=null}){const _0x4f24e4=_0xe3ce09,_0x523f36=Date['now'](),_0x5052bb=_0x137758(_0x11b8a3,_0x342c57);return{'nodeKey':_0x3257f7(_0x5052bb,'0'),'processKey':_0x5052bb,'instanceId':'0','pid':_0x11b8a3,'startedAt':_0x342c57,'ppid':process['pid'],'host':_0x35acc1[_0x4f24e4(0x2bf)](),'supervisorKey':_0x99cd0e,'slot':slot,'slotKey':slotKey,'kind':_0x19effa,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x523f36,'expiresAt':_0x523f36+_0x1786fe,'caps':this[_0x4f24e4(0x24d)](_0x19effa,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0xe3ce09(0x257)](_0x127564){const _0x2d48ad=_0xe3ce09;if(!_0x127564?.[_0x2d48ad(0x112)])return null;const _0x57007d=_0x137758(_0x127564[_0x2d48ad(0x112)],_0x127564[_0x2d48ad(0xc6)]);this['_children'][_0x2d48ad(0xcf)](_0x57007d,{..._0x127564,'supervisorKey':_0x127564['supervisorKey']??this['_selfKey']});if(this['_isWriter'])await this[_0x2d48ad(0x262)](this[_0x2d48ad(0x18a)][_0x2d48ad(0xf8)](_0x57007d))[_0x2d48ad(0x26d)]?.(()=>{});return _0x57007d;}[_0xe3ce09(0x243)](_0x5ed4a4){const _0x3be5f7=_0xe3ce09;if(!_0x5ed4a4)return;return this['_children'][_0x3be5f7(0xfa)](_0x5ed4a4),this[_0x3be5f7(0x1de)](_0x5ed4a4);}[_0xe3ce09(0x1d9)](){const _0x2daea6=_0xe3ce09,_0x245b2a=Date[_0x2daea6(0x2ae)](),_0x3b489e=process[_0x2daea6(0xd2)](),_0x3ee06b=(_0x245b2a-this[_0x2daea6(0x138)])*0x3e8;if(_0x3ee06b>=0x3d090){const _0x591183=_0x3b489e[_0x2daea6(0x17a)]-this['_lastCpuUsage']['user']+(_0x3b489e[_0x2daea6(0x10e)]-this[_0x2daea6(0x274)]['system']),_0xa50f0=_0x35acc1[_0x2daea6(0x137)]()[_0x2daea6(0xd0)]||0x1;this[_0x2daea6(0x11d)]=Math['min'](0x64,Math[_0x2daea6(0x2cd)](_0x591183/(_0x3ee06b*_0xa50f0)*0x64)),this[_0x2daea6(0xc4)]=Math[_0x2daea6(0x2cd)](_0x3ee06b/0x3e8),this['_lastCpuUsage']=_0x3b489e,this[_0x2daea6(0x138)]=_0x245b2a;}const _0x5e013b=process['memoryUsage'](),_0x2542bc=this['_threadStats'][_0x2daea6(0x298)];let _0x1177e3=0x0;if(_0x2542bc>0x0){const _0x5ddae9=[this['okdb'],...this['okdb'][_0x2daea6(0x132)]?.['values']?.()??[]];for(const _0x4ed8c7 of _0x5ddae9){const _0x142b67=_0x4ed8c7['functions']?.[_0x2daea6(0x182)];if(_0x142b67)_0x1177e3+=_0x142b67['liveThreadStats']['busy'];}}let _0x1cffec=null;const _0x1f04c8=_0x2542bc;if(_0x1f04c8>0x0){let _0x2436c7=0x0;for(const _0x54f569 of this[_0x2daea6(0x1ce)][_0x2daea6(0x2c1)]())_0x2436c7+=_0x54f569[_0x2daea6(0x11a)]||0x0;_0x1cffec={'count':_0x1f04c8,'heapUsed':_0x2436c7,'sandbox':_0x2542bc,'busy':_0x1177e3};}return{'rss':_0x5e013b[_0x2daea6(0x2ab)],'heapUsed':_0x5e013b[_0x2daea6(0x11a)],'heapTotal':_0x5e013b['heapTotal'],'external':_0x5e013b[_0x2daea6(0x21c)],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x2daea6(0xc4)]??null,'threads':_0x1cffec,'at':_0x245b2a};}[_0xe3ce09(0x122)](_0x2ca85b,_0x1195e4){if(!_0x2ca85b||!_0x1195e4)return;this['_threadStats']['set'](_0x2ca85b,_0x1195e4);}[_0xe3ce09(0x23c)](_0x19d6bc){const _0x3f30cf=_0xe3ce09;this[_0x3f30cf(0x1ce)][_0x3f30cf(0xfa)](_0x19d6bc);}[_0xe3ce09(0x11f)](_0x5e5b11,_0x28a4a4,_0x30732a=undefined){const _0x2edf70=_0xe3ce09,_0x567807=this[_0x2edf70(0x18a)][_0x2edf70(0xf8)](_0x5e5b11);if(!_0x567807||!_0x28a4a4)return;if(_0x30732a!==undefined)_0x567807[_0x2edf70(0x1bd)]=_0x30732a;_0x567807[_0x2edf70(0x1b3)]={'rss':_0x28a4a4[_0x2edf70(0x2ab)]??null,'heapUsed':_0x28a4a4[_0x2edf70(0x11a)]??null,'heapTotal':_0x28a4a4[_0x2edf70(0x232)]??null,'external':_0x28a4a4['external']??null,'cpuPct':_0x28a4a4[_0x2edf70(0x26c)]??null,'cpuWindowMs':_0x28a4a4[_0x2edf70(0x14b)]??null,'threads':_0x28a4a4[_0x2edf70(0xe5)]??null,'claims':_0x28a4a4[_0x2edf70(0x143)]??null,'envsOpen':_0x28a4a4[_0x2edf70(0x19e)]??null,'at':Date['now']()};}[_0xe3ce09(0x163)](){const _0x26049b=_0xe3ce09,_0x197583=Date[_0x26049b(0x2ae)](),_0x2c9a49=this[_0x26049b(0x1f3)][_0x26049b(0x226)]||{},_0x48c544=this['_kind']||_0x26049b(0x123);return{'nodeKey':this[_0x26049b(0x27d)],'processKey':this['_selfKey'],'instanceId':this['_instanceId'],'pid':process[_0x26049b(0x112)],'startedAt':this[_0x26049b(0x223)],'instanceStartedAt':this[_0x26049b(0xf3)],'ppid':typeof process[_0x26049b(0x1b1)]===_0x26049b(0x21a)?process[_0x26049b(0x1b1)]:null,'host':_0x35acc1[_0x26049b(0x2bf)](),'supervisorKey':this[_0x26049b(0xfc)]??null,'version':require$$6[_0x26049b(0x2ee)],'kind':_0x48c544,'role':{'engines':!!_0x2c9a49[_0x26049b(0x26a)],'processors':!!_0x2c9a49[_0x26049b(0x2b2)],'compaction':_0x2c9a49[_0x26049b(0x207)],'http':_0x2c9a49[_0x26049b(0x176)]},'listenAddr':this[_0x26049b(0x28b)]??null,'heartbeatAt':_0x197583,'expiresAt':_0x197583+_0x1786fe,'caps':this[_0x26049b(0x24d)](_0x48c544,_0x2c9a49),'lifecycle':{'state':_0x26049b(0xeb),'desiredVersionApplied':null},'meta':{...this[_0x26049b(0x17d)]},'processing':_0x2c9a49[_0x26049b(0x2b2)]?this[_0x26049b(0x135)]():null,'engines':_0x2c9a49[_0x26049b(0x26a)]?[...this[_0x26049b(0x1f3)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x26049b(0x110)](),'stats':this[_0x26049b(0x1d9)](),'writers':this[_0x26049b(0x287)]()};}[_0xe3ce09(0x287)](){const _0x360603=_0xe3ce09,_0x439619={};try{for(const [_0x1dad66,_0x4ea2af]of this[_0x360603(0x1f3)][_0x360603(0x132)]){try{const _0x3915ec=_0x4ea2af['writerStatus']?.();if(!_0x3915ec)continue;if(!_0x3915ec['depth']&&!_0x3915ec[_0x360603(0x177)]&&!(_0x3915ec[_0x360603(0x105)]??0x0)&&!_0x3915ec[_0x360603(0x20b)])continue;_0x439619[_0x1dad66]={'depth':_0x3915ec['depth'],'oldestPendingMs':_0x3915ec[_0x360603(0x172)],'committed':_0x3915ec[_0x360603(0x177)],'commitsPerSec':_0x3915ec[_0x360603(0x1fc)],'commitP99Ms':_0x3915ec[_0x360603(0x1bb)],'parkedNow':_0x3915ec[_0x360603(0x105)]??0x0,'draining':!!_0x3915ec[_0x360603(0x20b)]};}catch{}}}catch{}return Object[_0x360603(0x2b8)](_0x439619)[_0x360603(0xd0)]?_0x439619:null;}[_0xe3ce09(0x110)](){const _0x3d55c5=_0xe3ce09,_0x5e415a=process[_0x3d55c5(0x112)],_0x1c7e9c=Date[_0x3d55c5(0x2ae)](),_0x3099c3=_0x1d7189=>{const _0x58c9f9=_0x3d55c5;if(!_0x1d7189)return[];const _0x445897=[];try{for(const {id:_0x174870,entry:_0x5546c2}of _0x1d7189['list']()){if(_0x5546c2?.['holder']?.['pid']!==_0x5e415a)continue;const _0xe352cc=_0x5546c2['updatedAt']??_0x5546c2[_0x58c9f9(0x22a)]??0x0;if(_0xe352cc+(_0x5546c2['ttlMs']??0x0)<_0x1c7e9c)continue;_0x445897[_0x58c9f9(0x181)](_0x174870);}}catch{}return _0x445897;},_0x49f08b=_0x3099c3(this[_0x3d55c5(0x2b4)](_0x3d55c5(0xe1))),_0x406e19=_0x3099c3(this[_0x3d55c5(0x2b4)](_0x3d55c5(0xd6)));if(!_0x49f08b[_0x3d55c5(0xd0)]&&!_0x406e19[_0x3d55c5(0xd0)])return null;return{'compact':_0x49f08b,'replicate':_0x406e19};}['_singletonLock'](_0x4a66bd){const _0x1f9ab5=_0xe3ce09;if(!this[_0x1f9ab5(0x1f3)]?.[_0x1f9ab5(0x1d3)])return null;if(!this[_0x1f9ab5(0xc7)])this['_singletonLocks']=new Map();let _0x2e00eb=this[_0x1f9ab5(0xc7)][_0x1f9ab5(0xf8)](_0x4a66bd);if(!_0x2e00eb)try{_0x2e00eb=new _0x583e80(this[_0x1f9ab5(0x1f3)][_0x1f9ab5(0x1d3)],{'namespace':_0x4a66bd}),this['_singletonLocks'][_0x1f9ab5(0xcf)](_0x4a66bd,_0x2e00eb);}catch{return null;}return _0x2e00eb;}[_0xe3ce09(0x135)](){const _0x409662=_0xe3ce09,_0x3d2373=[];try{for(const [_0xa9267a,_0xecd047]of this[_0x409662(0x1f3)][_0x409662(0x132)]){if(_0xa9267a[_0x409662(0x1c2)]('~'))continue;for(const _0x41e47f of _0xecd047[_0x409662(0x194)][_0x409662(0x25b)]())_0x3d2373[_0x409662(0x181)]({..._0x41e47f,'env':_0xa9267a});}}catch{}return{'participate':this[_0x409662(0x1f3)]['processors']?.[_0x409662(0x1a7)]??![],'processors':_0x3d2373};}['_ensureDesired'](){const _0x42c357=_0xe3ce09;if(this[_0x42c357(0x1d4)])return!![];const _0x504175=this[_0x42c357(0x1f3)]['_rootDb'];if(!_0x504175)return![];return this['_desired']=_0x504175['openDB'](_0x2c2f75,{'dupSort':![]}),this[_0x42c357(0x272)]=_0x504175[_0x42c357(0x29c)](_0x35a3ff,{'dupSort':![]}),!![];}async[_0xe3ce09(0x141)](){const _0x36fb76=_0xe3ce09;if(!this[_0x36fb76(0x27c)]())return;const _0x540a04=_0x36fb76(0x217),_0x4ead80=0x1,_0x4bbefc=this[_0x36fb76(0x1d4)][_0x36fb76(0xf8)](_0x540a04)??0x0;if(_0x4bbefc>=_0x4ead80)return;const _0x30a708=_0x12e063=>{const _0x40e7bf=_0x36fb76;if(_0x12e063==='worker')return _0x40e7bf(0x269);if(_0x12e063===_0x40e7bf(0x20c))return _0x40e7bf(0x152);return _0x12e063;};await this[_0x36fb76(0x1f3)][_0x36fb76(0x106)][_0x36fb76(0x27f)][_0x36fb76(0x188)](()=>{const _0xa89ac4=_0x36fb76;for(const _0x501924 of[_0xa89ac4(0x154),_0xa89ac4(0x2d4)]){for(const {key:_0x2e4d51,value:_0x1e17ed}of this['_desired'][_0xa89ac4(0x22b)]({'start':_0x501924,'end':_0x501924+'\xff'})){if(typeof _0x2e4d51!==_0xa89ac4(0xd3)||!_0x2e4d51[_0xa89ac4(0x1c2)](_0x501924))break;const _0x5a0d41=_0x30a708(_0x1e17ed['mode']);if(_0x5a0d41!==_0x1e17ed[_0xa89ac4(0x116)])this[_0xa89ac4(0x1d4)]['put'](_0x2e4d51,{..._0x1e17ed,'mode':_0x5a0d41});}}this[_0xa89ac4(0x1d4)]['put'](_0x540a04,_0x4ead80);});}['hasDesired'](){const _0x28d6aa=_0xe3ce09;return!!this[_0x28d6aa(0x1d4)];}[_0xe3ce09(0xde)](_0x2813d0,_0x2c9ba9){const _0x4a2119=_0xe3ce09;if(!this['_ensureDesired']())return null;const _0x228b48=_0x2813d0+'/'+_0x2c9ba9;return this[_0x4a2119(0x187)](),this['_desiredOverlay'][_0x4a2119(0xf8)](_0x228b48)??this[_0x4a2119(0x1d4)][_0x4a2119(0xf8)](_0x228b48)??null;}[_0xe3ce09(0x187)](){const _0x57a454=_0xe3ce09;if(!_0x9ad6df)return;try{this['okdb'][_0x57a454(0x106)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0xe3ce09(0x1db)](_0xdcfc05,_0x61fab5,_0xc0c026){const _0x3fa005=_0xe3ce09;if(!this[_0x3fa005(0x27c)]())return null;const _0x1ab940=_0xdcfc05+'/'+_0x61fab5;this[_0x3fa005(0x187)]();const _0x4a68a7=this['_desiredOverlay'][_0x3fa005(0xf8)](_0x1ab940)??this[_0x3fa005(0x1d4)]['get'](_0x1ab940)??{'version':0x0},_0x274716=(_0x4a68a7[_0x3fa005(0x2ee)]||0x0)+0x1,_0xb7db6b={..._0x4a68a7,..._0xc0c026,'version':_0x274716,'updatedAt':Date[_0x3fa005(0x2ae)]()};this[_0x3fa005(0xfb)]['set'](_0x1ab940,_0xb7db6b);try{await this[_0x3fa005(0x1f3)]['_systemEnv']['_writer'][_0x3fa005(0x188)](()=>{const _0x1e8b12=_0x3fa005;this[_0x1e8b12(0x1d4)][_0x1e8b12(0x1cf)](_0x1ab940,_0xb7db6b);});}finally{if(this['_desiredOverlay'][_0x3fa005(0xf8)](_0x1ab940)===_0xb7db6b)this[_0x3fa005(0xfb)][_0x3fa005(0xfa)](_0x1ab940);}return _0x274716;}[_0xe3ce09(0x1b2)](_0x1cc99d){const _0x3d957f=_0xe3ce09;if(!this[_0x3d957f(0x27c)]())return[];this[_0x3d957f(0x187)]();const _0x180688=_0x1cc99d+'/',_0x28ecdc=[];for(const {key:_0x5bb718,value:_0x211ba5}of this[_0x3d957f(0x1d4)][_0x3d957f(0x22b)]({'start':_0x180688,'end':_0x180688+'\xff'})){if(typeof _0x5bb718!==_0x3d957f(0xd3)||!_0x5bb718['startsWith'](_0x180688))break;_0x28ecdc[_0x3d957f(0x181)]({'key':_0x5bb718['slice'](_0x180688[_0x3d957f(0xd0)]),'value':_0x211ba5});}return _0x28ecdc;}['getCmd'](_0x2ac2a3){const _0x3a4594=_0xe3ce09;if(!this['_ensureDesired']())return null;return this[_0x3a4594(0x272)][_0x3a4594(0xf8)](_0x2ac2a3)??null;}async[_0xe3ce09(0x12a)](_0x29c819,_0x179739,_0x31e7a4={}){const _0xf07ae9=_0xe3ce09;if(!this['_ensureDesired']())return null;let _0x48cd51;return await this[_0xf07ae9(0x1f3)][_0xf07ae9(0x106)]['_writer'][_0xf07ae9(0x188)](()=>{const _0x1f55e9=_0xf07ae9,_0x4d75bd=this[_0x1f55e9(0x272)]['get'](_0x29c819)||{'epoch':0x0};_0x48cd51=(_0x4d75bd['epoch']||0x0)+0x1,this[_0x1f55e9(0x272)][_0x1f55e9(0x1cf)](_0x29c819,{..._0x4d75bd,..._0x31e7a4,'cmd':_0x179739,'epoch':_0x48cd51,'updatedAt':Date[_0x1f55e9(0x2ae)]()});}),_0x48cd51;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1fa8d6,'nodeKey':_0x137758,'logicalKey':_0x1a87a0,'slotKey':_0x5ad37b,'PROCESS_ENV':_0x1ee557,'NODE_TYPE':_0x4ca531},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x23485e=_0xa12a27;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x1ccc8e=require$$0$4,{EVENTS:_0x1b83d0,CHANGE_ACTIONS:_0xfee665}=requireOkdbEnums(),{LOOP:_0x18f3d4}=requireOkdbLoopMonitor(),_0x49da21=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x5f05f9=0x5,_0x256d52=0x2710;class _0x527fe extends _0x1ccc8e{constructor(_0x23e7aa,_0x11d181={}){const _0x204a20=_0x372a;super(),this[_0x204a20(0x1f3)]=_0x23e7aa,this[_0x204a20(0x245)]=_0x11d181[_0x204a20(0x190)]??_0x49da21,this['_flushDebounce']=_0x11d181[_0x204a20(0x297)]??_0x5f05f9,this[_0x204a20(0x251)]=_0x11d181[_0x204a20(0x114)]??_0x256d52,this[_0x204a20(0x20f)]=![],this[_0x204a20(0x28c)]=new Map(),this[_0x204a20(0x158)]=new Map(),this[_0x204a20(0x206)]=new Map(),this[_0x204a20(0x266)]=null,this[_0x204a20(0x26e)]=![],this[_0x204a20(0x24e)]=new Set(),this[_0x204a20(0x1b5)]=_0x173564=>this['_handleInProcess'](_0x173564),this[_0x204a20(0x150)]=_0x4e7209=>this['_handlePoke'](_0x4e7209),this[_0x204a20(0x1c7)]=()=>this[_0x204a20(0x2a7)]();}[_0x23485e(0x247)](){const _0xf199ed=_0x23485e;if(this[_0xf199ed(0x20f)])return;this[_0xf199ed(0x20f)]=!![];for(const [_0x2d2e64,_0x1b4420]of this['okdb']['_envs']){if(_0x2d2e64[_0xf199ed(0x1c2)]('~'))continue;try{_0x1b4420[_0xf199ed(0x1ff)]();}catch{}}for(const [_0xbc3cc,_0xd0b6c0]of this['okdb'][_0xf199ed(0x132)]){if(_0xbc3cc[_0xf199ed(0x1c2)]('~'))continue;try{this['_baselines'][_0xf199ed(0xcf)](_0xbc3cc,_0xd0b6c0['getClock']()||0x0);}catch{}}const {events:_0x3d91bb}=this[_0xf199ed(0x1f3)];_0x3d91bb['on'](_0x1b83d0[_0xf199ed(0xf1)],this[_0xf199ed(0x1b5)]),_0x3d91bb['on'](_0x1b83d0[_0xf199ed(0x1ee)],this[_0xf199ed(0x1b5)]),_0x3d91bb['on'](_0x1b83d0['ITEM_REMOVE'],this['_onItem']),_0x3d91bb['on'](_0x1b83d0[_0xf199ed(0x268)],this['_onPoke']),_0x3d91bb[_0xf199ed(0x2a8)](_0x1b83d0['SYSTEM_STOPPED'],this['_onStop']);}['stop'](){const _0x43067a=_0x23485e;if(!this['_started'])return;this[_0x43067a(0x20f)]=![];const {events:_0x1ebe5f}=this['okdb'];_0x1ebe5f['off'](_0x1b83d0[_0x43067a(0xf1)],this[_0x43067a(0x1b5)]),_0x1ebe5f[_0x43067a(0x261)](_0x1b83d0[_0x43067a(0x1ee)],this[_0x43067a(0x1b5)]),_0x1ebe5f[_0x43067a(0x261)](_0x1b83d0['ITEM_REMOVE'],this[_0x43067a(0x1b5)]),_0x1ebe5f[_0x43067a(0x261)](_0x1b83d0[_0x43067a(0x268)],this['_onPoke']);try{_0x1ebe5f[_0x43067a(0x261)](_0x1b83d0['SYSTEM_STOPPED'],this[_0x43067a(0x1c7)]);}catch{}this[_0x43067a(0x266)]&&(clearTimeout(this[_0x43067a(0x266)]),this['_flushTimer']=null),this[_0x43067a(0x206)][_0x43067a(0x14e)](),this['_cursors'][_0x43067a(0x14e)](),this[_0x43067a(0x158)]['clear'](),this[_0x43067a(0x24e)][_0x43067a(0x14e)]();}[_0x23485e(0x29d)](_0x51d0aa,_0x23579a,_0x2fcb39,_0x1287fc){return _0x51d0aa+'\x00'+_0x23579a+'\x00'+_0x2fcb39+'\x00'+_0x1287fc;}[_0x23485e(0x27e)](_0x2fd331,_0x452146,_0x176d03,_0x2c4dcb){const _0x2898f1=_0x23485e,_0x55fe83=this['_dedupeKey'](_0x2fd331,_0x452146,_0x176d03,_0x2c4dcb);if(this['_seen'][_0x2898f1(0x1cb)](_0x55fe83))return![];this[_0x2898f1(0x24e)][_0x2898f1(0x2dd)](_0x55fe83);if(this[_0x2898f1(0x24e)][_0x2898f1(0x298)]>this[_0x2898f1(0x251)]){const _0xd7b685=this[_0x2898f1(0x24e)][_0x2898f1(0x2c1)]()[_0x2898f1(0x28d)]()['value'];this[_0x2898f1(0x24e)][_0x2898f1(0xfa)](_0xd7b685);}return!![];}[_0x23485e(0x229)](_0x3f9501){const _0x5469ad=_0x23485e;if(!this[_0x5469ad(0x20f)]||!_0x3f9501)return;const {env:_0x21dda3,type:_0x239a0a,key:_0x5b9960,clock:_0x2ed163,origin:_0x4964a6,action:_0x87fc73,newValue:_0x55e093,oldValue:_0x9b4e6f}=_0x3f9501;if(_0x21dda3==null||_0x239a0a==null||_0x5b9960==null)return;if(typeof _0x21dda3==='string'&&_0x21dda3['startsWith']('~'))return;if(typeof _0x239a0a===_0x5469ad(0xd3)&&_0x239a0a[_0x5469ad(0x1c2)]('~'))return;if(!this[_0x5469ad(0x27e)](_0x21dda3,_0x239a0a,_0x5b9960,_0x2ed163))return;const _0x52a8aa=_0x87fc73===_0xfee665[_0x5469ad(0x161)]?_0x5469ad(0x1e9):_0x5469ad(0x1cf);this[_0x5469ad(0x294)](_0x5469ad(0x2e7),{'env':_0x21dda3,'type':_0x239a0a,'key':_0x5b9960,'op':_0x52a8aa,'clock':_0x2ed163,'origin':_0x4964a6,'value':_0x52a8aa===_0x5469ad(0x1e9)?null:_0x55e093,'prevValue':_0x9b4e6f});}[_0x23485e(0xef)](_0x5b13b3){const _0x3773c6=_0x23485e;if(!this[_0x3773c6(0x20f)])return;if(!_0x5b13b3||typeof _0x5b13b3[_0x3773c6(0x17b)]!==_0x3773c6(0xd3)||typeof _0x5b13b3[_0x3773c6(0x13d)]!==_0x3773c6(0xd3))return;const {env:_0x4bb9eb,type:_0x6b727}=_0x5b13b3;if(_0x4bb9eb[_0x3773c6(0x1c2)]('~')||_0x6b727[_0x3773c6(0x1c2)]('~'))return;this[_0x3773c6(0x206)][_0x3773c6(0xcf)](_0x4bb9eb+'\x00'+_0x6b727,{'env':_0x4bb9eb,'type':_0x6b727}),this[_0x3773c6(0x19d)]();}[_0x23485e(0x19d)](){const _0x42ffbe=_0x23485e;if(this['_flushTimer'])return;const _0x5e48a7=()=>{const _0x5127ad=_0x372a;this[_0x5127ad(0x266)]=null,this[_0x5127ad(0x2d5)]()[_0x5127ad(0x26d)](()=>{});};this[_0x42ffbe(0x266)]=setTimeout(_0x5e48a7,this[_0x42ffbe(0x27a)]>0x0?this[_0x42ffbe(0x27a)]:0x0);}async[_0x23485e(0x2d5)](){const _0x2bbc65=_0x23485e;if(this[_0x2bbc65(0x26e)]){this[_0x2bbc65(0x19d)]();return;}this['_draining']=!![];try{const _0xd7a8d1=[...this[_0x2bbc65(0x206)][_0x2bbc65(0x2c1)]()];this['_pending'][_0x2bbc65(0x14e)]();let _0x435a63=![];for(const {env:_0x4acd5c,type:_0x1a66c1}of _0xd7a8d1){try{const _0x2031d2=await this[_0x2bbc65(0xc8)](_0x4acd5c,_0x1a66c1);if(_0x2031d2)_0x435a63=!![];}catch{this['_pending'][_0x2bbc65(0xcf)](_0x4acd5c+'\x00'+_0x1a66c1,{'env':_0x4acd5c,'type':_0x1a66c1}),_0x435a63=!![];}}if(_0x435a63||this[_0x2bbc65(0x206)][_0x2bbc65(0x298)]>0x0)this[_0x2bbc65(0x19d)]();}finally{this[_0x2bbc65(0x26e)]=![];}}async['_drainOne'](_0x2f857b,_0x5683e8){const _0x4035b6=_0x23485e,_0x1505b2=await this[_0x4035b6(0x1f3)][_0x4035b6(0xc9)](_0x2f857b),_0x5723ae=_0x2f857b+'\x00'+_0x5683e8;!this[_0x4035b6(0x28c)][_0x4035b6(0x1cb)](_0x5723ae)&&(!this[_0x4035b6(0x158)][_0x4035b6(0x1cb)](_0x2f857b)&&(_0x1505b2['_enableChangelog'](),this['_baselines'][_0x4035b6(0xcf)](_0x2f857b,_0x1505b2[_0x4035b6(0x1b4)]()||0x0)),this['_cursors'][_0x4035b6(0xcf)](_0x5723ae,this['_baselines']['get'](_0x2f857b)));const _0x88788d=this[_0x4035b6(0x28c)][_0x4035b6(0xf8)](_0x5723ae),_0x238c5c=_0x1505b2[_0x4035b6(0x1b4)](_0x5683e8)||0x0;if(_0x238c5c<=_0x88788d)return![];const _0x41a75b=_0x88788d+this['_quantum'],_0x3c7f47=Math[_0x4035b6(0x119)](_0x238c5c,_0x41a75b),_0x5c81f6=_0x18f3d4['enabled']?_0x18f3d4[_0x4035b6(0x2ae)]():0x0,_0x54f018=Array['from'](_0x1505b2['getChanges'](_0x5683e8,_0x88788d+0x1,_0x3c7f47));let _0x5a1562=_0x88788d;for(const _0x88b3b3 of _0x54f018){const {clock:_0x4345ee,key:_0x26d21d,action:_0x4d2154,origin:_0x126434}=_0x88b3b3;if(_0x4345ee>_0x5a1562)_0x5a1562=_0x4345ee;if(_0x26d21d==null)continue;if(!this[_0x4035b6(0x27e)](_0x2f857b,_0x5683e8,_0x26d21d,_0x4345ee))continue;let _0x16ec9c,_0x135a59;if(_0x4d2154===_0xfee665[_0x4035b6(0x161)])_0x16ec9c=_0x4035b6(0x1e9),_0x135a59=null;else{const _0x38e393=_0x1505b2['get'](_0x5683e8,_0x26d21d);_0x38e393==null?(_0x16ec9c=_0x4035b6(0x1e9),_0x135a59=null):(_0x16ec9c=_0x4035b6(0x1cf),_0x135a59=_0x38e393);}this[_0x4035b6(0x294)](_0x4035b6(0x2e7),{'env':_0x2f857b,'type':_0x5683e8,'key':_0x26d21d,'op':_0x16ec9c,'clock':_0x4345ee,'origin':_0x126434,'value':_0x135a59});}if(_0x18f3d4[_0x4035b6(0x21e)])_0x18f3d4['note'](_0x4035b6(0xda)+_0x2f857b+':'+_0x5683e8,_0x18f3d4['now']()-_0x5c81f6,'n='+_0x54f018[_0x4035b6(0xd0)]);return this['_cursors'][_0x4035b6(0xcf)](_0x5723ae,Math[_0x4035b6(0x18b)](_0x5a1562,_0x3c7f47)),_0x1505b2[_0x4035b6(0x1b4)](_0x5683e8)>_0x3c7f47;}[_0x23485e(0x198)](){const _0x3f2640=_0x23485e;return{'started':this[_0x3f2640(0x20f)],'quantum':this[_0x3f2640(0x245)],'flushDebounce':this[_0x3f2640(0x27a)],'cursors':Object[_0x3f2640(0x18e)]([...this[_0x3f2640(0x28c)][_0x3f2640(0x159)]()][_0x3f2640(0x2de)](([_0x58d353,_0x3f0b89])=>[_0x58d353['replace']('\x00',':'),_0x3f0b89])),'pending':this[_0x3f2640(0x206)][_0x3f2640(0x298)],'seen':this[_0x3f2640(0x24e)][_0x3f2640(0x298)]};}}return _0x527fe['CHANGEFEED_QUANTUM']=_0x49da21,okdbChangefeed={'OKDBChangefeed':_0x527fe},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0xd160f4=_0xa12a27;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x597b20=require$$1$1,_0x31985e=require$$1,{EVENTS:_0x12731e}=requireOkdbEnums(),_0x355667=require$$0$3,{slotKey:_0x1ef8ba}=requireOkdbProcessRegistry(),_0x497c57=0xfa,_0x231d70=0xfa0,_0x10624d=0x5,_0x4d3bc4=0x2710,_0x3afbbc=0xbb8,_0xf1a31a=0x7d0,_0x5bea4c='__okdbCluster',_0x280ec2=_0xd160f4(0x2a4),_0x185be3=_0xd160f4(0x23d),_0x434c9a=_0xd160f4(0x1b3),_0x45a8d3=[_0x12731e[_0xd160f4(0x113)],_0x12731e[_0xd160f4(0x1fa)],_0x12731e[_0xd160f4(0x2c4)],_0x12731e['FTS_RESET'],_0x12731e[_0xd160f4(0x270)],_0x12731e['INDEX_READY'],_0x12731e['INDEX_RESET'],_0x12731e[_0xd160f4(0x199)],_0xd160f4(0x296),_0xd160f4(0xce),'processor:error',_0xd160f4(0x14c),_0xd160f4(0x1f9),'processor:retry'],_0x37b27d=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x4cf1f4({workers:_0x56589a,makeOkdb:_0x4bec7c,port:_0x5ede4b,primaryOkdb:_0x1b6c19,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x5c4eab=_0xd160f4;if(_0x597b20['isPrimary'])return childEntry&&_0x597b20[_0x5c4eab(0x28a)]({'exec':_0x31985e['join'](__dirname,_0x5c4eab(0x165)),'args':[],'execArgv':((()=>{const _0x439bf5=_0x5c4eab,_0x1eb1e6=[];for(let _0x270816=0x0;_0x270816<process[_0x439bf5(0x288)]['length'];_0x270816++){const _0x1f3634=process['execArgv'][_0x270816];if(_0x1f3634[_0x439bf5(0x1c2)](_0x439bf5(0x10c))||_0x1f3634[_0x439bf5(0x1c2)](_0x439bf5(0x22f))||_0x1f3634[_0x439bf5(0x1c2)](_0x439bf5(0x11b)))continue;if(_0x1f3634==='-e'||_0x1f3634===_0x439bf5(0x1e1)||_0x1f3634==='-p'||_0x1f3634===_0x439bf5(0x1a3)){_0x270816++;continue;}_0x1eb1e6[_0x439bf5(0x181)](_0x1f3634);}return _0x1eb1e6;})())}),_0x3dec2e({'workers':_0x56589a,'port':_0x5ede4b,'primaryOkdb':_0x1b6c19,'workerEnv':workerEnv});return _0x56a4a8({'makeOkdb':_0x4bec7c,'port':_0x5ede4b});}function _0x3dec2e({workers:_0x220a6e,port:_0x5725d1,primaryOkdb:_0x3b0b3b,workerEnv:_0x23e73e}){const _0x2ef5a1=_0xd160f4,_0x988b17=new Map(),_0x1da6ce=new Map();let _0x416f8f=![];const _0x58376f=_0x538b6c=>_0x538b6c?.[_0x2ef5a1(0x109)],_0x459191=_0x19ef86=>{const _0x64bca3=_0x2ef5a1,_0x571a68=_0x597b20[_0x64bca3(0x2b0)]({...process.env,..._0x23e73e||{},'OKDB_CLUSTER_SLOT':String(_0x19ef86)});return _0x571a68[_0x64bca3(0x109)]=_0x19ef86,_0x988b17[_0x64bca3(0xcf)](_0x571a68[_0x64bca3(0xed)][_0x64bca3(0x112)],{'worker':_0x571a68,'startedAt':Date['now'](),'slot':_0x19ef86}),_0x571a68['on'](_0x64bca3(0x25a),_0x175bd1=>{const _0x3c3195=_0x64bca3;console[_0x3c3195(0x23d)](_0x3c3195(0x118)+_0x571a68[_0x3c3195(0xed)][_0x3c3195(0x112)]+_0x3c3195(0x1fe)+(_0x175bd1?.['message']??_0x175bd1));}),_0x571a68['on'](_0x64bca3(0x193),()=>_0x3c71fc()),_0x571a68;},_0x585f84=_0x2e8312=>{const _0x30e4b1=_0x2ef5a1;for(const {worker:_0x11d3c}of _0x988b17[_0x30e4b1(0x2c1)]()){if(_0x11d3c[_0x30e4b1(0x191)]()||!_0x11d3c[_0x30e4b1(0x2a2)]())continue;try{_0x11d3c[_0x30e4b1(0x254)](_0x2e8312);}catch{}}};_0x3b0b3b?.[_0x2ef5a1(0xff)]?.({'kind':_0x2ef5a1(0x126),'listenAddr':':'+_0x5725d1})[_0x2ef5a1(0x26d)](()=>{}),_0x3b0b3b?.[_0x2ef5a1(0x155)]?.[_0x2ef5a1(0xdd)]?.({'workersConfigured':_0x220a6e});const _0x1ffc37={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x3c71fc=()=>{const _0x392720=_0x2ef5a1,_0x4c88a3=_0x3b0b3b?.[_0x392720(0x155)];if(!_0x4c88a3||!_0x4c88a3[_0x392720(0x1ef)])return;const _0x5429a7=_0x4c88a3[_0x392720(0x24b)];for(const {worker:_0x3b805c,startedAt:_0x2f5f20,slot:_0xe8e3b9,stats:_0x551779,processing:_0x1dca8c}of _0x988b17['values']()){if(_0x3b805c[_0x392720(0x191)]())continue;const _0x2f3bc3=_0x4c88a3[_0x392720(0x104)]?.()&&_0x4c88a3[_0x392720(0xde)](_0x392720(0x125),_0x237166(_0xe8e3b9))?.[_0x392720(0xe0)]===!![];_0x4c88a3[_0x392720(0x262)]({'pid':_0x3b805c[_0x392720(0xed)][_0x392720(0x112)],'startedAt':_0x2f5f20,'kind':_0x392720(0x2d9),'supervisorKey':_0x5429a7,'slot':_0xe8e3b9,'slotKey':_0x237166(_0xe8e3b9),'role':_0x1ffc37,'listenAddr':':'+_0x5725d1,'lifecycle':_0x2f3bc3?'decommissioning':_0x392720(0xeb),'processing':_0x1dca8c??null,'stats':_0x551779??null})[_0x392720(0x26d)](()=>{});}},_0x237166=_0x1d3dd6=>_0x1ef8ba('cluster:'+_0x5725d1,_0x1d3dd6),_0x312e9a=_0x4bfe15=>{const _0xbeb41a=_0x2ef5a1,_0x52de37=_0x3b0b3b?.['processes'];if(!_0x52de37?.[_0xbeb41a(0x104)]?.())return![];return _0x52de37[_0xbeb41a(0xde)]('slot',_0x237166(_0x4bfe15))?.[_0xbeb41a(0xe0)]===!![];};for(let _0x596e05=0x0;_0x596e05<_0x220a6e;_0x596e05++){const _0x13486d=_0x312e9a(_0x596e05);_0x1da6ce[_0x2ef5a1(0xcf)](_0x596e05,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x13486d,'respawnTimer':null}),_0x13486d?console['log']('[okdb-cluster]\x20slot='+_0x596e05+_0x2ef5a1(0x1e4)):_0x459191(_0x596e05);}const _0x1cc081=()=>{const _0x61cddf=_0x2ef5a1,_0x7c8454=_0x3b0b3b?.[_0x61cddf(0x155)];if(!_0x7c8454?.['_isWriter']||!_0x7c8454['hasDesired']?.())return;for(const [_0x253fd8,_0x37942f]of _0x1da6ce[_0x61cddf(0x159)]()){const _0x2be2f5=_0x7c8454[_0x61cddf(0xde)](_0x61cddf(0x125),_0x237166(_0x253fd8)),_0x5f2077=_0x2be2f5?.[_0x61cddf(0xe0)]===!![],_0x50af62=_0x2be2f5?.[_0x61cddf(0x2d2)]===!![];if(_0x5f2077&&!_0x37942f[_0x61cddf(0x1f1)]){_0x37942f['dead']=!![];_0x37942f[_0x61cddf(0x2e3)]&&(clearTimeout(_0x37942f[_0x61cddf(0x2e3)]),_0x37942f[_0x61cddf(0x2e3)]=null);for(const {worker:_0xd8ae40}of _0x988b17['values']()){if(_0x58376f(_0xd8ae40)!==_0x253fd8||_0xd8ae40[_0x61cddf(0x191)]())continue;try{if(_0x50af62)_0xd8ae40[_0x61cddf(0xed)][_0x61cddf(0x2d2)](_0x61cddf(0x175));else _0xd8ae40[_0x61cddf(0x2a2)]()&&_0xd8ae40[_0x61cddf(0x2db)]();}catch{}}console[_0x61cddf(0x23d)](_0x61cddf(0x249)+(_0x50af62?_0x61cddf(0xdc):_0x61cddf(0x102))+_0x61cddf(0x189)+_0x253fd8+_0x61cddf(0x1f8));}else{if(!_0x5f2077&&_0x37942f['dead']&&_0x2be2f5){_0x37942f[_0x61cddf(0x1f1)]=![],_0x37942f[_0x61cddf(0x20e)]=[],_0x37942f[_0x61cddf(0x2a6)]=0x0;const _0x4bbabc=[..._0x988b17[_0x61cddf(0x2c1)]()][_0x61cddf(0x29e)](({worker:_0x399efe})=>_0x58376f(_0x399efe)===_0x253fd8&&!_0x399efe[_0x61cddf(0x191)]());!_0x4bbabc&&!_0x416f8f&&(_0x459191(_0x253fd8),console[_0x61cddf(0x23d)](_0x61cddf(0x22c)+_0x253fd8));}}}},_0x5025b5=()=>{try{_0x1cc081();}catch{}};_0x3b0b3b?.[_0x2ef5a1(0x16b)]?.['on']?.(_0x12731e['SYSTEM_PROC'],_0x5025b5);const _0x30a6cc=[];if(_0x3b0b3b?.[_0x2ef5a1(0x16b)]?.['on'])for(const _0x4c8dc4 of _0x45a8d3){const _0xbadfb7=_0x25a159=>{_0x585f84({[_0x5bea4c]:_0x280ec2,'event':_0x4c8dc4,'data':_0x25a159??{}});};_0x3b0b3b[_0x2ef5a1(0x16b)]['on'](_0x4c8dc4,_0xbadfb7),_0x30a6cc[_0x2ef5a1(0x181)]({'event':_0x4c8dc4,'handler':_0xbadfb7});}const _0x537e27=setInterval(()=>{_0x1cc081(),_0x3c71fc();},_0x37b27d);_0x537e27['unref']?.();const _0x3fe81a=(_0x44a7f5,_0x2b7c49)=>{const _0x53d28f=_0x2ef5a1;if(!_0x2b7c49||typeof _0x2b7c49!==_0x53d28f(0x1ca)||_0x2b7c49[_0x5bea4c]!==_0x185be3)return;if(!_0x3b0b3b?.[_0x53d28f(0x23d)]?.[_0x53d28f(0x2b9)])return;const _0x2559d9=_0x2b7c49[_0x53d28f(0x239)]||{};_0x3b0b3b[_0x53d28f(0x23d)][_0x53d28f(0x2b9)]({..._0x2559d9,'msg':'[w'+_0x2b7c49[_0x53d28f(0x125)]+']\x20'+(_0x2559d9['msg']??''),'meta':{..._0x2559d9[_0x53d28f(0x20a)]||{},'worker':_0x2b7c49[_0x53d28f(0x125)],'workerPid':_0x2b7c49[_0x53d28f(0x112)]}});};_0x597b20['on'](_0x2ef5a1(0x14d),_0x3fe81a);const _0x3455c1=(_0x47a8b0,_0x1350a4)=>{const _0x46880b=_0x2ef5a1;if(!_0x1350a4||typeof _0x1350a4!=='object'||_0x1350a4[_0x5bea4c]!==_0x434c9a)return;const _0x6bc31b=_0x988b17['get'](_0x47a8b0[_0x46880b(0xed)][_0x46880b(0x112)]);if(_0x6bc31b){_0x6bc31b[_0x46880b(0x1b3)]={..._0x1350a4[_0x46880b(0x1b3)],'at':Date[_0x46880b(0x2ae)]()};if(_0x1350a4[_0x46880b(0x1bd)]!==undefined)_0x6bc31b[_0x46880b(0x1bd)]=_0x1350a4[_0x46880b(0x1bd)];}};_0x597b20['on'](_0x2ef5a1(0x14d),_0x3455c1),_0x597b20['on']('exit',(_0x4ef3cd,_0x1a1373,_0x5c0f49)=>{const _0x559345=_0x2ef5a1,_0x43da90=_0x4ef3cd[_0x559345(0xed)][_0x559345(0x112)],_0x14b55f=_0x58376f(_0x4ef3cd),_0x1ec52e=_0x988b17['get'](_0x43da90);if(_0x1ec52e&&_0x3b0b3b?.[_0x559345(0x155)])_0x3b0b3b[_0x559345(0x155)][_0x559345(0x1de)](_0x43da90+':'+_0x1ec52e['startedAt'])[_0x559345(0x26d)](()=>{});_0x988b17['delete'](_0x43da90),console[_0x559345(0x23d)](_0x559345(0x118)+_0x43da90+'\x20(slot='+(_0x14b55f??'?')+_0x559345(0x11c)+(_0x559345(0x17e)+_0x1a1373+_0x559345(0x14a)+(_0x5c0f49??_0x559345(0x18d))+_0x559345(0x2ac)+_0x988b17['size']+_0x559345(0x2af))),_0x3c71fc();if(_0x416f8f||_0x14b55f==null)return;const _0x2a99ac=_0x1da6ce[_0x559345(0xf8)](_0x14b55f);if(!_0x2a99ac||_0x2a99ac[_0x559345(0x1f1)])return;const _0x424655=Date[_0x559345(0x2ae)]();_0x2a99ac[_0x559345(0x20e)]['push'](_0x424655),_0x2a99ac[_0x559345(0x20e)]=_0x2a99ac[_0x559345(0x20e)][_0x559345(0x128)](_0x2900ed=>_0x424655-_0x2900ed<=_0x4d3bc4);if(_0x2a99ac[_0x559345(0x20e)][_0x559345(0xd0)]>=_0x10624d){_0x2a99ac[_0x559345(0x1f1)]=!![],console[_0x559345(0x25a)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x14b55f+_0x559345(0x1dc)+_0x2a99ac[_0x559345(0x20e)][_0x559345(0xd0)]+_0x559345(0x210)+(_0x4d3bc4+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x988b17[_0x559345(0x298)]+_0x559345(0xf7)));return;}_0x2a99ac[_0x559345(0x2a6)]++;const _0x3a3c77=Math[_0x559345(0x119)](_0x231d70,_0x497c57*0x2**(_0x2a99ac['consecutiveFailures']-0x1));console[_0x559345(0x23d)]('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x14b55f+_0x559345(0x218)+_0x3a3c77+_0x559345(0x26b)+_0x2a99ac['consecutiveFailures']+')'),_0x2a99ac[_0x559345(0x2e3)]=setTimeout(()=>{const _0x8eb750=_0x559345;_0x2a99ac[_0x8eb750(0x2e3)]=null;if(_0x416f8f||_0x2a99ac[_0x8eb750(0x1f1)])return;const _0x4cc476=_0x459191(_0x14b55f);_0x4cc476['once']('listening',()=>{const _0x4257e6=_0x8eb750;if(_0x1da6ce['get'](_0x14b55f)===_0x2a99ac)_0x2a99ac[_0x4257e6(0x2a6)]=0x0;});},_0x3a3c77),_0x2a99ac['respawnTimer']['unref']?.();});const _0x3956ee=[..._0x988b17[_0x2ef5a1(0x2b8)]()];console[_0x2ef5a1(0x23d)](_0x2ef5a1(0xf2)+process[_0x2ef5a1(0x112)]+'\x20forked\x20'+_0x220a6e+_0x2ef5a1(0x2c9)+_0x5725d1+':\x20'+('['+_0x3956ee['join'](',\x20')+']'));const _0x53e5fc={'_isClusterController':!![],'port':_0x5725d1,'primaryOkdb':_0x3b0b3b??null,'status'(){const _0x5cac0f=_0x2ef5a1;return{'clustered':!![],'primaryPid':process[_0x5cac0f(0x112)],'port':_0x5725d1,'primaryRole':_0x3b0b3b?.[_0x5cac0f(0x275)]??null,'processorPid':null,'supervisorPid':process[_0x5cac0f(0x112)],'workers':[..._0x988b17[_0x5cac0f(0x2c1)]()][_0x5cac0f(0x2de)](({worker:_0x9f11c4})=>({'pid':_0x9f11c4['process'][_0x5cac0f(0x112)],'id':_0x9f11c4['id'],'dead':_0x9f11c4[_0x5cac0f(0x191)]()}))};},async 'close'(){const _0x9c7788=_0x2ef5a1;_0x416f8f=!![];for(const _0xeb5926 of _0x1da6ce[_0x9c7788(0x2c1)]()){_0xeb5926[_0x9c7788(0x1f1)]=!![],_0xeb5926['respawnTimer']&&(clearTimeout(_0xeb5926[_0x9c7788(0x2e3)]),_0xeb5926[_0x9c7788(0x2e3)]=null);}clearInterval(_0x537e27),_0x597b20[_0x9c7788(0x261)](_0x9c7788(0x14d),_0x3fe81a),_0x597b20[_0x9c7788(0x261)](_0x9c7788(0x14d),_0x3455c1),_0x3b0b3b?.[_0x9c7788(0x16b)]?.[_0x9c7788(0x261)]?.(_0x12731e[_0x9c7788(0x20d)],_0x5025b5);if(_0x3b0b3b?.[_0x9c7788(0x16b)]?.['off'])for(const {event:_0x642039,handler:_0x166371}of _0x30a6cc){try{_0x3b0b3b['events'][_0x9c7788(0x261)](_0x642039,_0x166371);}catch{}}_0x30a6cc[_0x9c7788(0xd0)]=0x0;const _0x3a92d0=[..._0x988b17[_0x9c7788(0x2c1)]()][_0x9c7788(0x2de)](({worker:_0xc8e66b})=>_0xc8e66b);if(_0x3a92d0['length']===0x0)return;await Promise['all'](_0x3a92d0[_0x9c7788(0x2de)](_0x3f8c53=>new Promise(_0x5f2236=>{const _0x3f2544=_0x9c7788;if(_0x3f8c53[_0x3f2544(0x191)]()){_0x5f2236();return;}let _0x20b394=![];const _0x13bece=()=>{if(_0x20b394)return;_0x20b394=!![];if(_0x383b40)clearTimeout(_0x383b40);_0x5f2236();};_0x3f8c53[_0x3f2544(0x2a8)](_0x3f2544(0x227),_0x13bece);const _0x383b40=setTimeout(()=>{try{_0x3f8c53['process']['kill']();}catch{}},_0x3afbbc+0x1f4);_0x383b40[_0x3f2544(0x1fd)]?.();try{_0x3f8c53[_0x3f2544(0x2db)]();}catch{try{_0x3f8c53[_0x3f2544(0xed)]['kill']();}catch{}}})));}};return _0x53e5fc;}async function _0x56a4a8({makeOkdb:_0x49f997,port:_0x42c076}){const _0x5179a9=_0xd160f4,_0x3e2f7e=await _0x49f997();return _0x2f908e(_0x3e2f7e),_0x3e2f7e['http'][_0x5179a9(0x2c3)](_0x42c076);}function _0x2f908e(_0x33afc7){const _0x3a2281=_0xd160f4;if(!_0x33afc7||_0x33afc7[_0x3a2281(0x2b7)])return;_0x33afc7[_0x3a2281(0x2b7)]=!![];try{const {OKDBChangefeed:_0x429228}=requireOkdbChangefeed(),_0x2d2421=_0x33afc7[_0x3a2281(0xe9)];if(_0x2d2421&&typeof _0x2d2421[_0x3a2281(0x185)]===_0x3a2281(0x21b)){const _0x40ba33=new _0x429228(_0x33afc7);_0x40ba33[_0x3a2281(0x247)](),_0x2d2421[_0x3a2281(0x185)](_0x40ba33),_0x33afc7['_changefeed']=_0x40ba33;}}catch(_0x474722){_0x33afc7[_0x3a2281(0x23d)]?.[_0x3a2281(0x169)]?.(_0x3a2281(0x2ce)+(_0x474722?.[_0x3a2281(0x14d)]??_0x474722),{'feature':'cluster'});}const _0x4a3e31=_0x371c2e=>{const _0x368cef=_0x3a2281;if(!_0x371c2e||typeof _0x371c2e!=='object'||_0x371c2e[_0x5bea4c]==null)return;if(_0x371c2e[_0x5bea4c]===_0x280ec2)try{_0x33afc7[_0x368cef(0xe9)]?.['pushEphemeral']?.(_0x371c2e['event'],_0x371c2e[_0x368cef(0x255)]);}catch{}};process['on'](_0x3a2281(0x14d),_0x4a3e31),_0x33afc7['_clusterOnMessage']=_0x4a3e31;{let _0x2826c7=process['cpuUsage'](),_0x133a4c=Date[_0x3a2281(0x2ae)]();const _0x2089fc=()=>{const _0xdc1670=_0x3a2281;if(typeof process[_0xdc1670(0x254)]!==_0xdc1670(0x21b)||!process[_0xdc1670(0x286)])return;const _0x5e56b1=Date['now'](),_0x1e1eef=process[_0xdc1670(0xd2)](),_0x2382ef=(_0x5e56b1-_0x133a4c)*0x3e8,_0x39f278=_0x1e1eef[_0xdc1670(0x17a)]-_0x2826c7[_0xdc1670(0x17a)]+(_0x1e1eef[_0xdc1670(0x10e)]-_0x2826c7[_0xdc1670(0x10e)]),_0xf9a280=_0x2382ef>0x0?Math[_0xdc1670(0x119)](0x64,Math[_0xdc1670(0x2cd)](_0x39f278/(_0x2382ef*(_0x355667[_0xdc1670(0x137)]()[_0xdc1670(0xd0)]||0x1))*0x64)):0x0;_0x2826c7=_0x1e1eef,_0x133a4c=_0x5e56b1;const _0x5222d0=process[_0xdc1670(0x1e0)]();let _0x55130d=null;try{_0x55130d=_0x33afc7['role']?.[_0xdc1670(0x2b2)]?_0x33afc7[_0xdc1670(0x155)]?.[_0xdc1670(0x135)]?.()??null:null;}catch{}try{process['send']({[_0x5bea4c]:_0x434c9a,'stats':{'rss':_0x5222d0[_0xdc1670(0x2ab)],'heapUsed':_0x5222d0[_0xdc1670(0x11a)],'heapTotal':_0x5222d0['heapTotal'],'external':_0x5222d0[_0xdc1670(0x21c)],'cpuPct':_0xf9a280,'cpuWindowMs':Math[_0xdc1670(0x2cd)](_0x2382ef/0x3e8)||null},'processing':_0x55130d});}catch{}},_0x37a3a2=Math[_0x3a2281(0x18b)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x372162=setInterval(_0x2089fc,_0x37a3a2);_0x372162['unref']?.(),_0x2089fc();for(const _0x6df794 of['processor:paused',_0x3a2281(0x1f9)]){_0x33afc7['events']?.['on']?.(_0x6df794,()=>{try{_0x2089fc();}catch{}});}}let _0x412ddf=![];const _0x56908f=async _0x516872=>{const _0x5ba894=_0x3a2281;if(_0x412ddf)return;_0x412ddf=!![];const _0x1face3=setTimeout(()=>process[_0x5ba894(0x227)](_0x516872),_0x3afbbc);_0x1face3[_0x5ba894(0x1fd)]?.();try{await _0x33afc7[_0x5ba894(0x160)]?.();}catch{}process[_0x5ba894(0x227)](_0x516872);};process['on'](_0x3a2281(0x2db),()=>_0x56908f(0x0));if(process[_0x3a2281(0x124)]!=='win32'){const _0x1137c4=setInterval(()=>{const _0x18fa70=_0x3a2281;if(process[_0x18fa70(0x1b1)]===0x1)_0x56908f(0x0);},_0xf1a31a);_0x1137c4[_0x3a2281(0x1fd)]?.(),_0x33afc7[_0x3a2281(0x197)]=_0x1137c4;}}return okdbCluster={'runClustered':_0x4cf1f4,'attachWorkerCluster':_0x2f908e},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x1b6570=_0xa12a27;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x784994=require$$0$5,{attachWorkerCluster:_0x36dac5}=requireOkdbCluster();async function _0x237fcc(){const _0x973a6a=_0x372a,_0x3c7f80=process.env.OKDB_HTTP_CHILD;if(!_0x3c7f80)throw new Error(_0x973a6a(0x24a));const {rootPath:_0x1786da,port:_0x3d045b,options:options={},logLevel:logLevel='info'}=JSON[_0x973a6a(0x240)](_0x3c7f80);if(!_0x1786da||!_0x3d045b)throw new Error(_0x973a6a(0xe4));const _0x239cb3=new _0x784994(_0x1786da,{...options,'engines':![],'processors':![],'compaction':![]});_0x239cb3[_0x973a6a(0x23d)][_0x973a6a(0x1a4)]?.();const _0x36749c=process.env.OKDB_CLUSTER_SLOT??'?',_0x1d6e22={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x37521b=_0x1d6e22[logLevel]??_0x1d6e22['info'];_0x239cb3[_0x973a6a(0x23d)]['attach'](_0x3b2e99=>{const _0x472f10=_0x973a6a;if((_0x1d6e22[_0x3b2e99[_0x472f10(0x1d1)]]??0x1)<_0x37521b)return;try{process[_0x472f10(0x254)]?.({'__okdbCluster':'log','slot':_0x36749c,'pid':process[_0x472f10(0x112)],'entry':_0x3b2e99});}catch{}}),await _0x239cb3[_0x973a6a(0x293)](),_0x36dac5(_0x239cb3),await _0x239cb3['http'][_0x973a6a(0x2c3)](_0x3d045b);}return _0x237fcc()[_0x1b6570(0x26d)](_0x42147e=>{const _0x37c94b=_0x1b6570;try{process['send']?.({'__okdbCluster':_0x37c94b(0x23d),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x37c94b(0x112)],'entry':{'level':_0x37c94b(0x25a),'msg':_0x37c94b(0x12d)+(_0x42147e?.[_0x37c94b(0x14d)]??_0x42147e)}});}catch{}process[_0x37c94b(0x227)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
|
|
1
|
+
'use strict';const _0x16770f=_0x39f1;(function(_0xd3d173,_0x3cbe23){const _0x29c137=_0x39f1,_0x3af823=_0xd3d173();while(!![]){try{const _0x41c825=-parseInt(_0x29c137(0x153))/0x1+-parseInt(_0x29c137(0x19b))/0x2+-parseInt(_0x29c137(0x21a))/0x3*(parseInt(_0x29c137(0x197))/0x4)+parseInt(_0x29c137(0x1cc))/0x5*(-parseInt(_0x29c137(0xf6))/0x6)+-parseInt(_0x29c137(0x1ad))/0x7*(-parseInt(_0x29c137(0x13c))/0x8)+-parseInt(_0x29c137(0x29e))/0x9*(-parseInt(_0x29c137(0x19f))/0xa)+parseInt(_0x29c137(0x1fb))/0xb*(parseInt(_0x29c137(0x235))/0xc);if(_0x41c825===_0x3cbe23)break;else _0x3af823['push'](_0x3af823['shift']());}catch(_0x124b97){_0x3af823['push'](_0x3af823['shift']());}}}(_0x59e2,0x77777));var require$$0$5=require(_0x16770f(0x2cb)),require$$1$1=require(_0x16770f(0xda)),require$$1=require(_0x16770f(0x22c)),require$$0$3=require('os'),require$$2=require(_0x16770f(0x2b1)),require$$0=require('node:perf_hooks'),require$$0$2=require(_0x16770f(0x268)),require$$0$1=require('fs'),require$$0$4=require(_0x16770f(0x1f4));function getDefaultExportFromCjs(_0x31986b){const _0x1ee8c7=_0x16770f;return _0x31986b&&_0x31986b['__esModule']&&Object[_0x1ee8c7(0x249)][_0x1ee8c7(0x114)]['call'](_0x31986b,_0x1ee8c7(0x1f5))?_0x31986b[_0x1ee8c7(0x1f5)]:_0x31986b;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x578bde=_0x16770f;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3a190e={'PUT':_0x578bde(0x29d),'REMOVE':_0x578bde(0x1a9),'INDEX_DROP':_0x578bde(0x2e1),'INDEX_REGISTER':'registerIndex','INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x578bde(0x267),'TYPE_DROP':'dropType','FTS_REGISTER':'registerFts','FTS_DROP':_0x578bde(0x2ed),'FTS_RESET':'resetFts','SCHEMA_SET':_0x578bde(0x1b7),'SCHEMA_DROP':_0x578bde(0x25f),'TTL_SET':_0x578bde(0x17d),'TTL_CLEAR':_0x578bde(0x2c6)},_0x16b8a3={'SYSTEM_READY':_0x578bde(0x25e),'FIELD_RESOLVER_REGISTERED':_0x578bde(0x1e1),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x578bde(0x1d9),'SYSTEM_POKE':_0x578bde(0x2b5),'SYSTEM_DRAIN':_0x578bde(0x2d3),'SYSTEM_TYPE_DROP':_0x578bde(0x278),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x578bde(0x274),'ITEM_CREATE':_0x578bde(0x100),'ITEM_UPDATE':_0x578bde(0x206),'ITEM_REMOVE':_0x578bde(0xeb),'INDEX_RESET':_0x578bde(0x1e5),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x578bde(0x15d),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x578bde(0x185),'INDEX_REGISTERED':_0x578bde(0xdb),'FTS_REGISTERED':_0x578bde(0x162),'FTS_DROP':_0x578bde(0x2c5),'FTS_RESET':_0x578bde(0x22a),'SCHEMA_SET':'schema:set','SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x578bde(0x2d7),'REF_VIOLATION':_0x578bde(0x248),'REF_VIOLATION_RESOLVED':_0x578bde(0x2c1),'SYNC_APPLY':_0x578bde(0x27b),'TXN_START':_0x578bde(0x283),'TXN_END':'txn:end','TXN_ROLLBACK':_0x578bde(0x2f2),'TYPE_REGISTERED':_0x578bde(0x2af),'TYPE_DROP':_0x578bde(0x2c2),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x578bde(0x2ce),'SYSTEM_ENV_RELEASE':_0x578bde(0x20d),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x578bde(0x182),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x578bde(0xc4),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x578bde(0xd0),'LICENSE_REMOVED':_0x578bde(0x2d9)},_0x2b465e={'CREATING':'creating','RESETTING':_0x578bde(0xec),'READY':_0x578bde(0x2cc),'DROPPING':_0x578bde(0x234),'WAITING':'waiting','ERROR':_0x578bde(0x2c9)},_0x5ec28f={'CREATED':_0x578bde(0x172),'STARTING':'starting','STARTED':_0x578bde(0x2dc),'STOPPING':'stopping','STOPPED':'stopped'},_0x46b430={'CREATING':_0x578bde(0x230),'READY':_0x578bde(0x2cc),'HALTED':'halted','STOPPED':_0x578bde(0x150),'RESETTING':'resetting'},_0x3ac5fe=Object[_0x578bde(0x167)]({'POKE':_0x578bde(0x193),'DRAIN':_0x578bde(0x18f),'TYPE_DROP':_0x578bde(0x105),'PROC':_0x578bde(0x158),'ENV_RELEASE':_0x578bde(0x258)});return okdbEnums={'BUS_EVENTS':_0x3ac5fe,'CHANGE_ACTIONS':_0x3a190e,'EVENTS':_0x16b8a3,'INDEX_STATE':_0x2b465e,'OKDB_STATE':_0x5ec28f,'VIEW_STATE':_0x46b430},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x5c210b=_0x16770f;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x3b2e2f,performance:_0x29b305}=require$$0,_0x464e6f=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x5c210b(0x1b6),_0x588bfb=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2581eb=process.env.OKDB_LOOP_LAG_ALL==='1',_0x2fccdb=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x35586a{constructor(){const _0x3ce0f9=_0x5c210b;this[_0x3ce0f9(0x109)]=_0x464e6f,this[_0x3ce0f9(0x164)]=new Map(),this['_h']=null,this[_0x3ce0f9(0x121)]=null,this[_0x3ce0f9(0x1aa)]=![],this[_0x3ce0f9(0x1ac)]=(_0x340aeb,_0x3533a3)=>process[_0x3ce0f9(0x137)][_0x3ce0f9(0xfb)](_0x340aeb+(_0x3533a3?'\x20'+JSON[_0x3ce0f9(0x12f)](_0x3533a3):'')+'\x0a');}[_0x5c210b(0x2b2)](){const _0x1964a2=_0x5c210b;return _0x29b305[_0x1964a2(0x2b2)]();}[_0x5c210b(0x188)](_0x586b46){const _0x23bbaa=_0x5c210b;if(typeof _0x586b46===_0x23bbaa(0x136))this[_0x23bbaa(0x1ac)]=_0x586b46;}[_0x5c210b(0x218)](_0x2a1b03,_0x38c508,_0x5c5af4){const _0x40e669=_0x5c210b;if(!this[_0x40e669(0x109)])return;let _0x5421e6=this[_0x40e669(0x164)][_0x40e669(0x18a)](_0x2a1b03);!_0x5421e6&&(_0x5421e6={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x40e669(0x2a9)](_0x2a1b03,_0x5421e6)),_0x5421e6['ms']+=_0x38c508,_0x5421e6[_0x40e669(0xb9)]+=0x1,_0x38c508>_0x5421e6[_0x40e669(0x1c7)]&&(_0x5421e6['maxMs']=_0x38c508,_0x5421e6[_0x40e669(0x22b)]=_0x5c5af4||'');}[_0x5c210b(0x2d5)](_0x559f52){const _0x3e04d0=_0x5c210b;if(!this['enabled']||this[_0x3e04d0(0x1aa)])return;this[_0x3e04d0(0x1aa)]=!![];if(_0x559f52)this[_0x3e04d0(0x1ac)]=_0x559f52;this['_h']=_0x3b2e2f({'resolution':0xa}),this['_h']['enable'](),this[_0x3e04d0(0x121)]=setInterval(()=>this['_report'](),_0x588bfb);if(this[_0x3e04d0(0x121)]['unref'])this[_0x3e04d0(0x121)]['unref']();}[_0x5c210b(0x286)](_0x466a78){const _0x5ec7ea=_0x5c210b;if(!this['_windowCbs'])this[_0x5ec7ea(0xfd)]=new Set();this[_0x5ec7ea(0xfd)][_0x5ec7ea(0x216)](_0x466a78);if(!this[_0x5ec7ea(0x1aa)])this[_0x5ec7ea(0x295)]();}[_0x5c210b(0x13b)](_0x2f2a05){const _0x2dd939=_0x5c210b;this[_0x2dd939(0xfd)]?.[_0x2dd939(0x2d4)](_0x2f2a05);}[_0x5c210b(0x295)](){const _0x329932=_0x5c210b;if(this['_admissionStarted'])return;this[_0x329932(0x2e7)]=!![];!this['_h']&&(this['_h']=_0x3b2e2f({'resolution':0xa}),this['_h']['enable']());const _0x2b58a8=_0x588bfb;this[_0x329932(0x2e9)]=setInterval(()=>{const _0x41f973=_0x329932,_0x565483=this['_h'];if(!_0x565483)return;const _0x2a0825=_0x565483[_0x41f973(0xf2)](0x63)/0xf4240,_0x39249c=_0x565483[_0x41f973(0x1ca)]/0xf4240,_0x44f67b=_0x565483[_0x41f973(0x1b8)]/0xf4240;_0x565483[_0x41f973(0x25c)]();if(this[_0x41f973(0xfd)])for(const _0x4b8432 of this[_0x41f973(0xfd)]){try{_0x4b8432({'p99Ms':_0x2a0825,'maxMs':_0x39249c,'meanMs':_0x44f67b,'reportMs':_0x2b58a8});}catch{}}},_0x2b58a8);if(this[_0x329932(0x2e9)][_0x329932(0x205)])this[_0x329932(0x2e9)]['unref']();}[_0x5c210b(0x1b2)](){const _0x208348=_0x5c210b,_0x56bb4d=this['_h'],_0x2ac194=_0x56bb4d[_0x208348(0x1ca)]/0xf4240,_0x3f4639=_0x56bb4d[_0x208348(0xf2)](0x63)/0xf4240,_0x4ee456=_0x56bb4d['mean']/0xf4240;_0x56bb4d[_0x208348(0x25c)]();const _0x4f22ff=[...this[_0x208348(0x164)]['entries']()][_0x208348(0x226)](([_0x2a2efe,_0x5c6f13])=>({'label':_0x2a2efe,..._0x5c6f13}))[_0x208348(0xd1)]((_0xad8c67,_0x236c85)=>_0x236c85['ms']-_0xad8c67['ms'])[_0x208348(0x1cd)](0x0,0x8);this[_0x208348(0x164)][_0x208348(0x156)]();const _0x220fd1=_0x4f22ff['reduce']((_0x4b8596,_0x14517a)=>_0x4b8596+_0x14517a['ms'],0x0),_0x6969ca=_0x4f22ff[_0x208348(0x226)](_0x564056=>_0x564056['label']+'='+_0x564056['ms'][_0x208348(0x1e2)](0x0)+_0x208348(0x1d4)+_0x564056[_0x208348(0xb9)]+(_0x564056[_0x208348(0x1c7)]>0x5?_0x208348(0x2b8)+_0x564056['maxMs'][_0x208348(0x1e2)](0x0)+'ms'+(_0x564056[_0x208348(0x22b)]?'\x20'+_0x564056[_0x208348(0x22b)]:'')+')':''));(_0x2581eb||_0x2ac194>=_0x2fccdb)&&this['_log'](_0x208348(0x189)+_0x588bfb+'ms\x20max='+_0x2ac194[_0x208348(0x1e2)](0x0)+'ms\x20p99='+_0x3f4639[_0x208348(0x1e2)](0x0)+_0x208348(0x17a)+_0x4ee456[_0x208348(0x1e2)](0x0)+_0x208348(0xee)+_0x220fd1[_0x208348(0x1e2)](0x0)+'ms'+(_0x6969ca['length']?_0x208348(0x184)+_0x6969ca[_0x208348(0x1fe)]('\x20\x20'):''),{'feature':_0x208348(0x15b)});if(this[_0x208348(0xfd)])for(const _0x6e2467 of this[_0x208348(0xfd)]){try{_0x6e2467({'p99Ms':_0x3f4639,'maxMs':_0x2ac194,'meanMs':_0x4ee456,'reportMs':_0x588bfb});}catch{}}}[_0x5c210b(0x27a)](){const _0x3cb0e9=_0x5c210b;if(this['_timer'])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x3cb0e9(0x1c5)]();this[_0x3cb0e9(0x121)]=null,this['_h']=null,this['_started']=![];}}const _0x3ae159=new _0x35586a();if(_0x3ae159['enabled'])_0x3ae159[_0x5c210b(0x2d5)]();return okdbLoopMonitor={'LOOP':_0x3ae159},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2f2759=require$$0$1,_0x3786be=require$$1;let _0x4e5f4a,_0xb68fc2,_0x328bf9,_0x2ac7bf,_0x558a9a,_0x1bb745,_0x40819a,_0x4b6ea6=![];const _0x1bc5e2=new Set();let _0x44a86d=null;const _0x100372=new Map();function _0x4242d3(){const _0x500a25=_0x39f1;if(_0x4e5f4a!==undefined)return _0x4e5f4a;_0x4e5f4a=process.env.OKDB_DIAG==='1';if(!_0x4e5f4a)return![];_0xb68fc2=process.env.OKDB_DIAG_STACK==='1',_0x2ac7bf=Math[_0x500a25(0x1ca)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x328bf9=new Array(_0x2ac7bf),_0x558a9a=0x0,_0x1bb745=0x0,_0x40819a=process.env.OKDB_DIAG_DIR||null;if(_0x40819a)try{_0x2f2759['mkdirSync'](_0x40819a,{'recursive':!![]});}catch{}return!![];}function _0x47e8bd(){return _0x4e5f4a===undefined?_0x4242d3():_0x4e5f4a;}function _0x2c1f6e(_0x60dc8b,_0x409fa2){const _0xf6f6e5=_0x39f1;if(_0x4e5f4a===undefined?!_0x4242d3():!_0x4e5f4a)return;let _0x2c3750;if(_0xb68fc2){const _0x57b70a=new Error()[_0xf6f6e5(0x131)]||'';_0x2c3750=_0x57b70a['split']('\x0a')[_0xf6f6e5(0x1cd)](0x3)[_0xf6f6e5(0x226)](_0x5eb740=>_0x5eb740[_0xf6f6e5(0x1d0)]())['filter'](Boolean)['slice'](0x0,0x8);}_0x328bf9[_0x558a9a]={'seq':_0x1bb745++,'t':Date[_0xf6f6e5(0x2b2)](),'env':_0x60dc8b,'kind':_0x409fa2||_0xf6f6e5(0x297),'stack':_0x2c3750},_0x558a9a=(_0x558a9a+0x1)%_0x2ac7bf;}function _0x6337b5(_0x464ee4){const _0x588402=_0x39f1,_0x25b071=[];for(let _0x4466e8=0x0;_0x4466e8<_0x2ac7bf;_0x4466e8++){const _0x3fa5cd=_0x328bf9[(_0x558a9a-0x1-_0x4466e8+_0x2ac7bf*0x2)%_0x2ac7bf];if(!_0x3fa5cd)continue;_0x25b071['push'](_0x3fa5cd);if(_0x25b071[_0x588402(0x1fd)]>=_0x464ee4)break;}return _0x25b071;}function _0x44a6b1(_0x560c21){const _0x4076e6=_0x39f1;try{process[_0x4076e6(0x137)][_0x4076e6(0xfb)](_0x560c21+'\x0a');}catch{}if(_0x40819a)try{_0x2f2759['appendFileSync'](_0x3786be[_0x4076e6(0x1fe)](_0x40819a,_0x4076e6(0x2d0)+process[_0x4076e6(0x1f8)]+_0x4076e6(0x10c)),_0x560c21+'\x0a');}catch{}}function _0x59d0e9(_0x188acb){const _0x33b2c8=_0x39f1,_0x543ccd=_0x6337b5(_0x188acb);if(!_0x543ccd['length'])return _0x33b2c8(0x25b);const _0x1e5774=Date[_0x33b2c8(0x2b2)]();return _0x543ccd[_0x33b2c8(0x226)](_0x33d812=>{const _0x2b2388=_0x33b2c8,_0x1bca6b=_0x2b2388(0x10b)+_0x33d812['seq']+'\x20-'+(_0x1e5774-_0x33d812['t'])+_0x2b2388(0x1ba)+_0x33d812[_0x2b2388(0x1bd)]+'\x20'+_0x33d812[_0x2b2388(0x2e6)];return _0x33d812[_0x2b2388(0x131)]&&_0x33d812[_0x2b2388(0x131)][_0x2b2388(0x1fd)]?_0x1bca6b+_0x2b2388(0x118)+_0x33d812['stack']['join'](_0x2b2388(0x118)):_0x1bca6b;})[_0x33b2c8(0x1fe)]('\x0a');}function _0x595188(_0x5802c5,_0x1a8fee){const _0x37827c=_0x39f1,_0x534e99='\x0a===\x20OKDB_DIAG\x20'+_0x5802c5+_0x37827c(0x12d)+new Date()[_0x37827c(0x10f)]()+_0x37827c(0x11d)+process[_0x37827c(0x1f8)]+_0x37827c(0x1f3),_0x218b45=[_0x534e99,_0x37827c(0x163)+(_0x1a8fee&&_0x1a8fee[_0x37827c(0x131)]?_0x1a8fee[_0x37827c(0x131)][_0x37827c(0x210)]('\x0a')[0x0]:_0x1a8fee),'recent\x20writes\x20(newest\x20first)'+(_0xb68fc2?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x59d0e9(0x18),_0xb7d9b3(),'='['repeat'](_0x534e99[_0x37827c(0x1fd)]-0x1)];_0x44a6b1(_0x218b45[_0x37827c(0x1fe)]('\x0a'));}function _0x2576a4(_0x4baeeb){const _0x2085aa=_0x39f1;if(!_0x47e8bd())return;const _0x9324ed=String(_0x4baeeb&&_0x4baeeb['message']||_0x4baeeb||''),_0x650021=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x2085aa(0x2da)](_0x9324ed);_0x595188(_0x650021?_0x2085aa(0x21e):'uncaughtException',_0x4baeeb);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x650021)return;try{console['error'](_0x4baeeb&&_0x4baeeb[_0x2085aa(0x131)]?_0x4baeeb[_0x2085aa(0x131)]:_0x4baeeb);}catch{}process[_0x2085aa(0xc1)](0x1);}function _0x1bbbbd(_0x2b6f1e){const _0x463d99=_0x39f1;if(!_0x47e8bd())return;const _0x186bc1=String(_0x2b6f1e&&_0x2b6f1e['message']||_0x2b6f1e||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x463d99(0x2da)](_0x186bc1)&&_0x595188(_0x463d99(0x1ed),_0x2b6f1e);}function _0xb7d9b3(){const _0x14271b=_0x39f1,_0x9ce0cb=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x583edf=![];for(const _0x4513c0 of _0x1bc5e2){const _0x4e2ee6=_0x4513c0&&_0x4513c0[_0x14271b(0x198)];if(!_0x4e2ee6)continue;for(const [_0x1fd717,_0x38c035]of _0x4e2ee6){const _0x14e689=_0x38c035&&_0x38c035[_0x14271b(0x14f)]&&_0x38c035[_0x14271b(0x14f)]['view'];if(!_0x14e689)continue;let _0x2acaa2,_0x571d07;try{_0x2acaa2=Atomics['load'](_0x14e689,0x0),_0x571d07=Atomics[_0x14271b(0x227)](_0x14e689,0x1);}catch{continue;}if(_0x2acaa2===0x0)continue;_0x583edf=!![];const _0x59deb5=_0x2acaa2>0x0?_0x14271b(0x1a3):_0x14271b(0x1e7),_0x1c8856=Date['now']()-Math[_0x14271b(0x106)](_0x2acaa2)*0x3e8,_0xf7b4e=((()=>{const _0x4a932a=_0x14271b;try{return _0x38c035[_0x4a932a(0x215)]&&_0x38c035[_0x4a932a(0x215)]['status']?_0x38c035[_0x4a932a(0x215)]['status']():null;}catch{return null;}})());_0x9ce0cb[_0x14271b(0x1d8)](_0x14271b(0x199)+_0x1fd717+'\x20phase='+_0x59deb5+'\x20drainAge='+_0x1c8856+'ms\x20activeWriters='+_0x571d07+(_0xf7b4e?'\x20writer{depth='+_0xf7b4e[_0x14271b(0x20f)]+_0x14271b(0x13e)+_0xf7b4e['oldestPendingMs']+'\x20parkedNow='+_0xf7b4e['parkedNow']+'}':''));}}if(!_0x583edf)_0x9ce0cb[_0x14271b(0x1d8)](_0x14271b(0x194));return _0x9ce0cb['join']('\x0a');}function _0x2c986b(){const _0x53b31f=_0x39f1;if(!_0x47e8bd())return;const _0x39f4f7=Math[_0x53b31f(0x1ca)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x387528=Date[_0x53b31f(0x2b2)]();for(const _0x13dd01 of _0x1bc5e2){const _0x2ebf05=_0x13dd01&&_0x13dd01['_envs'];if(!_0x2ebf05)continue;for(const [_0x57ab98,_0x5e88e3]of _0x2ebf05){const _0x17c925=_0x5e88e3&&_0x5e88e3[_0x53b31f(0x14f)]&&_0x5e88e3[_0x53b31f(0x14f)]['view'];if(!_0x17c925)continue;let _0xb62f35;try{_0xb62f35=Atomics[_0x53b31f(0x227)](_0x17c925,0x0);}catch{continue;}const _0x4654b4=_0x13dd01[_0x53b31f(0x22c)]+'|'+_0x57ab98;if(_0xb62f35<=0x0){_0x100372[_0x53b31f(0x2d4)](_0x4654b4);continue;}const _0x35950f=_0x387528-_0xb62f35*0x3e8,_0x1f995e=_0x100372[_0x53b31f(0x18a)](_0x4654b4);if(_0x35950f<_0x39f4f7)continue;if(_0x1f995e&&_0x387528-_0x1f995e[_0x53b31f(0x277)]<_0x39f4f7)continue;_0x100372[_0x53b31f(0x2a9)](_0x4654b4,{'firstTs':_0x1f995e?_0x1f995e[_0x53b31f(0x209)]:_0xb62f35,'dumpedAt':_0x387528});const _0x2388df=_0x53b31f(0x231)+_0x35950f+_0x53b31f(0x257)+_0x57ab98+_0x53b31f(0x12d)+new Date()['toISOString']()+_0x53b31f(0x11d)+process[_0x53b31f(0x1f8)]+_0x53b31f(0x1f3);_0x44a6b1([_0x2388df,_0xb7d9b3(),'='[_0x53b31f(0x2a8)](_0x2388df[_0x53b31f(0x1fd)]-0x1)][_0x53b31f(0x1fe)]('\x0a'));}}}function _0x5665bd(){const _0x2d35a2=_0x39f1;if(!_0x47e8bd()||_0x4b6ea6)return;_0x4b6ea6=!![],process[_0x2d35a2(0x159)](_0x2d35a2(0x279),_0x2576a4),process[_0x2d35a2(0x159)](_0x2d35a2(0x2d8),_0x1bbbbd);const _0x2008b0=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x44a86d=setInterval(_0x2c986b,_0x2008b0);if(_0x44a86d[_0x2d35a2(0x205)])_0x44a86d[_0x2d35a2(0x205)]();}function _0x307b7b(_0x2bb1a0){const _0x1a1e6a=_0x39f1;if(!_0x47e8bd()||!_0x2bb1a0)return;_0x1bc5e2[_0x1a1e6a(0x216)](_0x2bb1a0),_0x5665bd();}function _0x2aceb1(_0x1bb9e8){_0x1bc5e2['delete'](_0x1bb9e8);}function _0x161cf7(){const _0x59d144=_0x39f1;if(!_0x47e8bd())return{'enabled':![],'hint':_0x59d144(0xd2)};return{'enabled':!![],'stackCapture':!!_0xb68fc2,'recentWrites':_0x6337b5(0x10),'drain':_0xb7d9b3()};}return okdbDiag={'isEnabled':_0x47e8bd,'recordWrite':_0x2c1f6e,'installDiag':_0x5665bd,'registerOkdb':_0x307b7b,'unregisterOkdb':_0x2aceb1,'snapshot':_0x161cf7},okdbDiag;}function _0x59e2(){const _0x3615e4=['_enqueuedAt','force','disable','_role','maxMs','publishChildRow','_isStale','max','epoch','20pIZnKE','slice','reject','processors','trim','system','children','startedAt','ms/','isEnabled','_released','cli','push','system:clock_change','~lock','none','cursorKey','commitP99Ms','acquiredAt','beforeWrite','isDead','field:resolver_registered','toFixed','reap','getDesired','index:reset','holder','copy','_rowKey','keys','instanceId','processes','_lock','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','name','processor:retry','extend','listDesired','status','\x20===','node:events','default','type','find','pid','_cursors','win32','11HgqrLQ','decommissioned','length','join','procmodeack/','primary','__vocab/version','heartbeatMs','stopHeartbeat','ttlMs','unref','item:update','_committed','string','firstTs','respawnTimer','event','_drain','system:env_release','\x20worker(s)\x20remaining','depth','split','_markSeen','childTransaction','then','process','_writer','add','includes','note','hostname','596784YtYYpy','okdb','fromEntries','log','ORPHAN\x20(env-closed\x20write)','~processes:cmd','_enableChangelog','emit','getClock','flushDebounce','_migrateVocab','cpus','map','load','all','_highWater','fts:reset','maxExtra','path','[okdb-cluster]\x20','resolve','list','creating','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','isPrimary','_changefeed','dropping','6793788KuTimn','slot','_handleInProcess','FTS_RESET','commitsPerSec','threads','drain','processor:paused','\x20statusEnv=','randomUUID','processor:ready','_participate','SIGKILL','~processes','removeNode','isConnected','processing','shift','_groupByProcess','ref:violation','prototype','round','treeView','decommission','rss','level','_ownMeta','_seen','min','single','running','assign','queue-worker','_bpWaiters','ms\x20on\x20env=','bus:env_release','parse','_db','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','reset','\x20in\x20','system:ready','dropSchema','isWanted','_nodeDbCache','hard-killed','\x20worker\x20slot=','\x20sync','entries','bumpCmd','registerType','perf_hooks','updateSupervisedChildStats','_openEnvLazy','off','transaction','\x20ipc\x20error:\x20','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','functions','next','_bpParkedTotal','processKey','_instanceId','system:bus_state_change','_buildProcessingFacet','message','dumpedAt','system:type_drop','uncaughtException','stop','sync:apply','startsWith','_servingEngines','tierList','_closed','2.3.0','platform','inspect','txn:start','from','object','onWindow','deaths','listening','SYSTEM_STOPPED','supervisorKey','--eval','_supervisorKey','~processes:desired','_activateProcesses','http','liveThreadStats','addSupervisedChild','recordWrite','_selfKey','_flushDebounce','_startAdmission','value','commit','_isWriter','removeSupervisedChild','raw-remove','ENV_CLOSING_RETRY','send','put','9lCpWxY','_rawDb',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_putRowSync','\x20forked\x20','cpuPct','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','_onTick','_singletonLock','_kind','repeat','set','_caps','events','_listenAddr','1ofN:','runtimeProcessesView','type:registered','parkedNow','crypto','now','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','[okdb-cluster]\x20primary\x20pid=','system:poke','listen','openDB','(worst\x20','ITEM_CREATE','okdb-http-worker-child.js','_done','_lockDb','_nestedTotal','_putRowAsync','role','filter','ref:violation_resolved','type:drop','putNode','worker','fts:drop','clearTtl','host','_collectWriterFacet','error','standalone','./okdb','ready','INDEX_REGISTERED','env:removed','isActive','okdb-diag.','clearThreadStats','_dedupeKey','system:drain','delete','start','processorsView','unique:violation_resolved','unhandledRejection','license:removed','test','user','started','data','listNodes','_flushTimer','async','dropIndex','_pending','register','version','uptime','kind','_admissionStarted',',\x20signal=','_admissionTimer','flushed','race','_baselines','dropFts','_drainOne','node/','entry','_onStop','txn:rollback','_heldTotal','replace','external','_nodeDbFor','--watch','count','building','ITEM_REMOVE','_quantum','_singletonLocks','nodesView','cluster-wide','has','exit','singletonClaims','change','license:invalid','reportThreadStats','FTS_REGISTERED','kill','_processStartedAt','processorId','close','_collectSingletonClaims','floor','setupPrimary','_holderDead','nodeKey','license:activated','sort','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','ESRCH','_lastCpuWindowMs','putSync','setOwnMeta','draining','values','ms\x20(attempt\x20','cluster','index:registered','_adminRelay','flushLmdb','_lastCpuAt','_rootDb','_publishNow','_buildChildRow',':want','procmode/','updatedAt','_dedupeMax','code','consecutiveFailures','hasType','_lastPublishAt','oldestPendingMs','item:remove','resetting','\x20HTTP\x20server(s)\x20on\x20port\x20','ms\x20busy=','removeSync','http\x20worker\x20child\x20failed:\x20','release','percentile','ppid','processor:resumed','memoryUsage','596142YFRMdr','committed','size','_ensureDesired','fast','write','heapUsed','_windowCbs','_startedAt','rows=','item:create','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','_heartbeatTimer','listenAddr','info','bus:type_drop','abs','CHANGEFEED_QUANTUM','options','enabled','_systemEnv','\x20\x20#','.log','registry-publish','noteListenAddr','toISOString','--inspect','_lastCpuPct','okdb-writer:\x20env\x20closing\x20—\x20retry','execArgv','hasOwnProperty','_publishFailWarned','REMOVE','_cmd','\x0a\x20\x20\x20\x20\x20\x20','INDEX_READY','afterWrite','slotKey','_onPoke','\x20pid=','_held',')\x20exited\x20','markClosed','_timer','registry\x20heartbeat\x20skipped\x20(writer=','\x20while\x20this\x20process\x20runs\x20','rowKey','SYSTEM_POKE','_handlePoke','fanout','_statusEnv','_nodeDb','namespace','_maybePublish','_clusterOrphanWatch','\x20@\x20','_sampleOwnStats','stringify','resetReadTxn','stack','writerStatus','fork','__okdbCluster','online','function','stderr','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','(code=','offWindow','5920472ZHdeNi','_buildOwnRow','\x20oldestPendingMs=','splice','lifecycle','selfKey','_sandbox','deregisterSelf','[okdb-cluster]\x20worker\x20pid=','http-server','_getType','connected','registry\x20publish\x20failing:\x20','catch','heapTotal','killable','processor:progress','publishOwnRow','number','_coordinator','stopped','_heartbeatInFlight','FTS_DROP','147889mHXYJE','VIEW_PROGRESS','_onItem','clear','some','bus:proc','prependListener','getProcess','loop-lag','envsOpen','index:progress','_onProcEvent','_wantDb','listAll','cpuUsage','fts:registered','error:\x20','_buckets','open','confirm','freeze','decommissioning','_desired','sandbox','\x20(durable\x20desired-state)','indexOf','process\x20','SYSTEM_PROC','warn',');\x20','caps','created','_inflight','compaction','getChanges','allSettled','_nodeDead','_desiredOverlay','cluster:','ms\x20mean=','claimGated','state','setTtl','expiresAt','stats','createEnvironment','setDesired','ttl:set','_durs','\x20│\x20','index:drop','dead','exports','setLogger','loop-lag\x20','get','disconnect','processor:error','_wantDbHandle','getRange','bus:drain','INDEX_PROGRESS','_versionSkewWarned','_refreshDesiredSnapshot','bus:poke','\x20\x20(no\x20env\x20draining)','engines','_draining','4HnrqCv','_envs','\x20\x20env=','_scheduleFlush','1511350zBPJLH','_isReader','_children','mode','6830470DhnOqG','workers','_removeRowAsync','ingest','SWAP','hasDesired','unclaimed','transactionSync','_threadStats','_hbTimer','remove','_started','meta','_log','7rtPPub','_acquiredAt','_nestedWarned','\x20(slot=','_outstanding','_report','processingStatusView','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','once','true','setSchema','mean','--print','ms\x20env=','busy','_key','env','workersConfigured','sync','_lastCpuUsage','_startHeartbeat','ephemeral'];_0x59e2=function(){return _0x3615e4;};return _0x59e2();}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x28f7cf=_0x16770f;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x2e44d9}=require$$0$2,_0x579fd6=requireOkdbDiag(),_0x5e6762=process.env.OKDB_COMMIT_MODE===_0x28f7cf(0x1bf);class _0x505bf0{constructor(_0x25cbc8){const _0x30d402=_0x28f7cf;this['env']=_0x25cbc8,this[_0x30d402(0x173)]=new Set(),this[_0x30d402(0x1c3)]=new Map(),this[_0x30d402(0x207)]=0x0,this['_durs']=[],this['_done']=[],this['_highWater']=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x30d402(0x1b1)]=0x0,this[_0x30d402(0x256)]=[],this['_bpParkedTotal']=0x0,this[_0x30d402(0x11e)]=null,this[_0x30d402(0x2f3)]=0x0,this[_0x30d402(0x2bd)]=0x0,this[_0x30d402(0x1af)]=![];}async['transaction'](_0x51ea91,_0x112400){const _0x5b547f=_0x28f7cf;if(_0x579fd6[_0x5b547f(0x1d5)]())_0x579fd6[_0x5b547f(0x292)](this[_0x5b547f(0x1bd)]?.['name'],_0x112400);if(this[_0x5b547f(0x27f)]){const _0x1dd19f=new Error(_0x5b547f(0x112));_0x1dd19f[_0x5b547f(0xe6)]='ENV_CLOSING_RETRY';throw _0x1dd19f;}if(this[_0x5b547f(0x229)]>0x0){let _0x174d22=![];while(this['_outstanding']>=this[_0x5b547f(0x229)]&&!this[_0x5b547f(0x27f)]){!_0x174d22&&(_0x174d22=!![],this[_0x5b547f(0x271)]++),await new Promise(_0x23dac2=>this[_0x5b547f(0x256)][_0x5b547f(0x1d8)](_0x23dac2));}if(this['_closed']){const _0x4bfe26=new Error(_0x5b547f(0x112));_0x4bfe26[_0x5b547f(0xe6)]=_0x5b547f(0x29b);throw _0x4bfe26;}}this[_0x5b547f(0x1b1)]++;const _0x9d10e8=this[_0x5b547f(0x1bd)]['_coordinator'];for(;;){while(this[_0x5b547f(0x11e)])await this['_held'];if(_0x9d10e8)await _0x9d10e8[_0x5b547f(0x1df)]();if(!this[_0x5b547f(0x11e)])break;if(_0x9d10e8)_0x9d10e8[_0x5b547f(0x11a)]();}if(this[_0x5b547f(0x27f)]){if(_0x9d10e8)_0x9d10e8[_0x5b547f(0x11a)]();this['_outstanding']--;if(this[_0x5b547f(0x256)][_0x5b547f(0x1fd)]&&this['_outstanding']<this[_0x5b547f(0x229)])this[_0x5b547f(0x256)]['shift']()();const _0x2d547f=new Error(_0x5b547f(0x112));_0x2d547f['code']=_0x5b547f(0x29b);throw _0x2d547f;}const _0xade930=_0x2e44d9['now']();if(_0x5e6762)try{const _0x1ddc54=this[_0x5b547f(0x1bd)]['db'][_0x5b547f(0x1a6)](_0x51ea91);this[_0x5b547f(0x207)]++;if(this['_durs'][_0x5b547f(0x1d8)](_0x2e44d9[_0x5b547f(0x2b2)]()-_0xade930)>0x100)this[_0x5b547f(0x183)]['shift']();if(this['_done']['push'](_0x2e44d9[_0x5b547f(0x2b2)]())>0x800)this[_0x5b547f(0x2bb)][_0x5b547f(0x246)]();return _0x1ddc54;}finally{this[_0x5b547f(0x1b1)]--;if(this['_bpWaiters'][_0x5b547f(0x1fd)]&&this['_outstanding']<this['_highWater'])this[_0x5b547f(0x256)][_0x5b547f(0x246)]()();if(_0x9d10e8)_0x9d10e8['afterWrite']();}let _0x4623a7=null;const _0x11b7b1=()=>{const _0x16cbcf=_0x5b547f,_0x545992=_0x51ea91();if(_0x545992&&typeof _0x545992[_0x16cbcf(0x213)]===_0x16cbcf(0x136)&&!_0x4623a7){this[_0x16cbcf(0x2f3)]++;let _0x5b0ec3;const _0x3bc281=new Promise(_0x4da67d=>_0x5b0ec3=_0x4da67d);this[_0x16cbcf(0x11e)]=_0x3bc281,_0x4623a7=()=>{const _0x5d4391=_0x16cbcf;if(this['_held']===_0x3bc281)this[_0x5d4391(0x11e)]=null;_0x5b0ec3();};}return _0x545992;};let _0x3cd625;try{_0x3cd625=this['env']['db'][_0x5b547f(0x212)](_0x11b7b1);}catch(_0x5ea466){_0x3cd625=Promise[_0x5b547f(0x1ce)](_0x5ea466);}(!_0x3cd625||typeof _0x3cd625[_0x5b547f(0x213)]!==_0x5b547f(0x136))&&(this[_0x5b547f(0x2bd)]++,!this[_0x5b547f(0x1af)]&&(this[_0x5b547f(0x1af)]=!![],console[_0x5b547f(0x16f)]('okdb-writer['+(this['env']?.[_0x5b547f(0x1ee)]??'?')+']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller')),_0x3cd625=Promise[_0x5b547f(0x22e)](_0x3cd625));const _0x225be1=()=>{if(_0x4623a7)_0x4623a7();};_0x3cd625['then'](_0x225be1,_0x225be1),this[_0x5b547f(0x173)][_0x5b547f(0x216)](_0x3cd625),this[_0x5b547f(0x1c3)][_0x5b547f(0x2a9)](_0x3cd625,_0xade930);const _0x38955d=()=>{const _0x540532=_0x5b547f;this[_0x540532(0x173)][_0x540532(0x2d4)](_0x3cd625),this['_enqueuedAt'][_0x540532(0x2d4)](_0x3cd625),this[_0x540532(0x207)]++,this['_outstanding']--;this['_bpWaiters'][_0x540532(0x1fd)]&&this[_0x540532(0x1b1)]<this[_0x540532(0x229)]&&this[_0x540532(0x256)][_0x540532(0x246)]()();if(this[_0x540532(0x183)]['push'](_0x2e44d9[_0x540532(0x2b2)]()-_0xade930)>0x100)this[_0x540532(0x183)]['shift']();if(this['_done'][_0x540532(0x1d8)](_0x2e44d9['now']())>0x800)this[_0x540532(0x2bb)][_0x540532(0x246)]();};_0x3cd625['then'](_0x38955d,_0x38955d);try{return await _0x3cd625;}finally{if(_0x9d10e8)_0x9d10e8[_0x5b547f(0x11a)]();}}[_0x28f7cf(0x1f2)](){const _0x42efde=_0x28f7cf,_0x4f002a=_0x2e44d9[_0x42efde(0x2b2)]();let _0x1bda0e=0x0;for(const _0xcc11ce of this[_0x42efde(0x1c3)]['values']()){const _0x18a2ac=_0x4f002a-_0xcc11ce;if(_0x18a2ac>_0x1bda0e)_0x1bda0e=_0x18a2ac;}let _0x3afdb6=0x0;for(let _0x1f379a=this[_0x42efde(0x2bb)]['length']-0x1;_0x1f379a>=0x0;_0x1f379a--){if(_0x4f002a-this[_0x42efde(0x2bb)][_0x1f379a]>0x3e8)break;_0x3afdb6++;}let _0x5d1061=0x0;if(this[_0x42efde(0x183)][_0x42efde(0x1fd)]){const _0x2b38c3=[...this['_durs']][_0x42efde(0xd1)]((_0x3eb6c7,_0x4ac54f)=>_0x3eb6c7-_0x4ac54f);_0x5d1061=_0x2b38c3[Math[_0x42efde(0x251)](_0x2b38c3[_0x42efde(0x1fd)]-0x1,Math[_0x42efde(0xcc)](_0x2b38c3['length']*0.99))];}return{'depth':this[_0x42efde(0x173)][_0x42efde(0xf8)],'oldestPendingMs':Math[_0x42efde(0x24a)](_0x1bda0e),'committed':this[_0x42efde(0x207)],'commitsPerSec':_0x3afdb6,'commitP99Ms':Math[_0x42efde(0x24a)](_0x5d1061),'parkedNow':this['_bpWaiters'][_0x42efde(0x1fd)],'parkedTotal':this[_0x42efde(0x271)],'highWater':this[_0x42efde(0x229)]};}['inflightAgesMs'](){const _0x6d33c5=_0x28f7cf,_0x1cf565=_0x2e44d9['now']();return[...this['_enqueuedAt'][_0x6d33c5(0xd8)]()][_0x6d33c5(0x226)](_0x57d344=>Math[_0x6d33c5(0x24a)](_0x1cf565-_0x57d344))[_0x6d33c5(0xd1)]((_0x55c8c3,_0x4f73ac)=>_0x4f73ac-_0x55c8c3);}[_0x28f7cf(0x120)](){const _0x4d9bc6=_0x28f7cf;this[_0x4d9bc6(0x27f)]=!![];for(const _0x52e4cd of this[_0x4d9bc6(0x256)][_0x4d9bc6(0x13f)](0x0))_0x52e4cd();}async[_0x28f7cf(0x23b)](){const _0x4942e4=_0x28f7cf;let _0x5e521c=0x0;while(this[_0x4942e4(0x173)][_0x4942e4(0xf8)]&&_0x5e521c++<0x3e8){await Promise['allSettled']([...this[_0x4942e4(0x173)]]);}}async['put'](_0x4e6d03,_0x547aff,_0xa234f4,_0x10599f){const _0x3cefb5=_0x28f7cf;return this[_0x3cefb5(0x26c)](()=>{const _0x54fdda=_0x3cefb5;if(_0x10599f===undefined)_0x4e6d03[_0x54fdda(0xd5)](_0x547aff,_0xa234f4);else _0x4e6d03[_0x54fdda(0xd5)](_0x547aff,_0xa234f4,_0x10599f);},'raw-put');}async[_0x28f7cf(0x1a9)](_0x4d32e1,_0x91a9ea){const _0x1aa68a=_0x28f7cf;return this['transaction'](()=>_0x4d32e1[_0x1aa68a(0xef)](_0x91a9ea),_0x1aa68a(0x29a));}}async function _0x63b9b4(_0x176f67,_0x2c91a5){const _0x49d6f9=_0x28f7cf;if(_0x2c91a5==null)_0x2c91a5=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x3c6e74=_0x176f67?.[_0x49d6f9(0x2ea)];if(!_0x3c6e74||typeof _0x3c6e74[_0x49d6f9(0x213)]!=='function')return;await Promise[_0x49d6f9(0x2eb)]([Promise['resolve'](_0x3c6e74)['catch'](()=>{}),new Promise(_0xddfcb9=>{const _0x4fd7ee=_0x49d6f9,_0x1dba54=setTimeout(_0xddfcb9,_0x2c91a5);if(_0x1dba54['unref'])_0x1dba54[_0x4fd7ee(0x205)]();})]);}catch{}}function _0x2cc900(_0x5b05c0){const _0x1a468c=_0x28f7cf;if(_0x5e6762)return Promise[_0x1a468c(0x22e)]();const _0x17b04b=_0x5b05c0?.[_0x1a468c(0xf7)];return _0x17b04b&&typeof _0x17b04b[_0x1a468c(0x213)]===_0x1a468c(0x136)?_0x17b04b:Promise[_0x1a468c(0x22e)]();}return okdbWriter[_0x28f7cf(0x187)]=_0x505bf0,okdbWriter[_0x28f7cf(0x187)][_0x28f7cf(0xdd)]=_0x63b9b4,okdbWriter[_0x28f7cf(0x187)][_0x28f7cf(0xf7)]=_0x2cc900,okdbWriter[_0x28f7cf(0x187)]['SYNC_COMMITS']=_0x5e6762,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x21428c=_0x16770f;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x162a51=require$$0$3,{SYNC_COMMITS:_0x13d44a}=requireOkdbWriter(),_0x2495cd=_0x21428c(0x1da);class _0x4854c6{constructor(_0x1c157a,_0x433050,_0x55ca9a){const _0x54cf41=_0x21428c;this['_lock']=_0x1c157a,this[_0x54cf41(0x1bc)]=_0x433050,this[_0x54cf41(0x1ae)]=_0x55ca9a,this['_released']=![],this[_0x54cf41(0x102)]=null,this['_heartbeatInFlight']=null;}['isHeld'](){const _0x3ecfd5=_0x21428c;if(this[_0x3ecfd5(0x1d6)])return![];try{const _0x4dc178=this[_0x3ecfd5(0x1ec)][_0x3ecfd5(0x25a)]()['get'](this[_0x3ecfd5(0x1bc)]);if(!_0x4dc178||_0x4dc178['acquiredAt']!==this[_0x3ecfd5(0x1ae)])return![];const _0x2fc742=_0x4dc178[_0x3ecfd5(0xe4)]??_0x4dc178[_0x3ecfd5(0x1de)];if(_0x2fc742+_0x4dc178['ttlMs']<Date[_0x3ecfd5(0x2b2)]())return![];return!![];}catch{return!this[_0x3ecfd5(0x1d6)];}}[_0x21428c(0x1e6)](){const _0x509e7c=_0x21428c;if(this['_released'])return null;try{return this[_0x509e7c(0x1ec)][_0x509e7c(0x25a)]()['get'](this['_key'])??null;}catch{return null;}}async[_0x21428c(0x1f0)](_0x2c2939){const _0x69fc52=_0x21428c;if(this[_0x69fc52(0x1d6)])return;try{const _0x5a0f36=this['_lock'][_0x69fc52(0x25a)]()[_0x69fc52(0x18a)](this[_0x69fc52(0x1bc)]);if(!_0x5a0f36||_0x5a0f36[_0x69fc52(0x1de)]!==this[_0x69fc52(0x1ae)])return;if(_0x13d44a)this[_0x69fc52(0x1ec)]['_db']()[_0x69fc52(0xd5)](this[_0x69fc52(0x1bc)],{..._0x5a0f36,'ttlMs':_0x5a0f36[_0x69fc52(0x204)]+_0x2c2939});else await this[_0x69fc52(0x1ec)][_0x69fc52(0x25a)]()[_0x69fc52(0x29d)](this[_0x69fc52(0x1bc)],{..._0x5a0f36,'ttlMs':_0x5a0f36[_0x69fc52(0x204)]+_0x2c2939});}catch{}}async[_0x21428c(0xf1)](){const _0x169917=_0x21428c;if(this[_0x169917(0x1d6)])return;if(this[_0x169917(0x151)])try{await this[_0x169917(0x151)];}catch{}clearInterval(this[_0x169917(0x102)]),this[_0x169917(0x102)]=null,this['_released']=!![];try{const _0x489f77=this[_0x169917(0x1ec)][_0x169917(0x25a)]()['get'](this['_key']);if(_0x489f77&&_0x489f77[_0x169917(0x1de)]===this[_0x169917(0x1ae)]){if(_0x13d44a)this[_0x169917(0x1ec)][_0x169917(0x25a)]()['removeSync'](this[_0x169917(0x1bc)]);else await this[_0x169917(0x1ec)]['_db']()['remove'](this['_key']);}}catch{}}[_0x21428c(0x1c1)](_0x5df222,_0x1684c0){const _0x249977=_0x21428c,_0x1146be=_0x1684c0??Math[_0x249977(0xcc)](_0x5df222/0x3);this[_0x249977(0x102)]=setInterval(()=>{const _0x1997f6=_0x249977;if(this[_0x1997f6(0x1d6)])return;this[_0x1997f6(0x151)]=((async()=>{const _0x317837=_0x1997f6;try{const _0x1216c2=this[_0x317837(0x1ec)][_0x317837(0x25a)]()[_0x317837(0x18a)](this['_key']);if(!_0x1216c2||_0x1216c2[_0x317837(0x1de)]!==this[_0x317837(0x1ae)]){this['_released']=!![],clearInterval(this[_0x317837(0x102)]),this['_heartbeatTimer']=null;return;}if(_0x13d44a)this['_lock'][_0x317837(0x25a)]()[_0x317837(0xd5)](this[_0x317837(0x1bc)],{..._0x1216c2,'updatedAt':Date['now']()});else await this['_lock'][_0x317837(0x25a)]()['put'](this[_0x317837(0x1bc)],{..._0x1216c2,'updatedAt':Date[_0x317837(0x2b2)]()});}catch{}this[_0x317837(0x151)]=null;})());},_0x1146be);if(this['_heartbeatTimer'][_0x249977(0x205)])this[_0x249977(0x102)][_0x249977(0x205)]();}}class _0x5b7453{constructor(_0x5385f8,{namespace:_0x30e0c6,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x26d9b7=_0x21428c;this['_rawDb']=_0x5385f8,this[_0x26d9b7(0x12a)]=_0x30e0c6,this[_0x26d9b7(0x204)]=ttlMs,this[_0x26d9b7(0x202)]=heartbeatMs,this['_lockDb']=null;}[_0x21428c(0x25a)](){const _0x27ea0d=_0x21428c;return!this['_lockDb']&&(this[_0x27ea0d(0x2bc)]=this[_0x27ea0d(0x29f)]['openDB'](_0x2495cd,{'dupSort':![]})),this[_0x27ea0d(0x2bc)];}[_0x21428c(0x15f)](){const _0x110ef4=_0x21428c;return!this[_0x110ef4(0x18d)]&&(this[_0x110ef4(0x18d)]=this[_0x110ef4(0x29f)][_0x110ef4(0x2b7)](_0x2495cd+_0x110ef4(0xe2),{'dupSort':![]})),this[_0x110ef4(0x18d)];}['_key'](_0x58b5d6){const _0x3d43ec=_0x21428c;return this[_0x3d43ec(0x12a)]+':'+_0x58b5d6;}['signalWant'](_0x26efd8){const _0x420e77=_0x21428c;try{_0x13d44a?this[_0x420e77(0x15f)]()[_0x420e77(0xd5)](this[_0x420e77(0x1bc)](_0x26efd8),Date[_0x420e77(0x2b2)]()):this['_wantDb']()['put'](this[_0x420e77(0x1bc)](_0x26efd8),Date[_0x420e77(0x2b2)]())?.[_0x420e77(0x149)]?.(()=>{});}catch{}}[_0x21428c(0x260)](_0x569b02,_0x8e3782=0x3e8){const _0xb3e634=_0x21428c;try{const _0x178d07=this[_0xb3e634(0x15f)]()[_0xb3e634(0x18a)](this[_0xb3e634(0x1bc)](_0x569b02));return typeof _0x178d07===_0xb3e634(0x14e)&&Date[_0xb3e634(0x2b2)]()-_0x178d07<_0x8e3782;}catch{return![];}}[_0x21428c(0x1c9)](_0x3a6ebe){const _0x164d53=_0x21428c,_0x4dd494=_0x3a6ebe[_0x164d53(0xe4)]??_0x3a6ebe['acquiredAt'];return _0x4dd494+_0x3a6ebe[_0x164d53(0x204)]<Date[_0x164d53(0x2b2)]();}static['_holderDead'](_0x28afbd){const _0x160110=_0x21428c,_0x2f0533=_0x28afbd?.[_0x160110(0x1e6)];if(!_0x2f0533||typeof _0x2f0533[_0x160110(0x1f8)]!==_0x160110(0x14e))return![];if(_0x2f0533['hostname']!==_0x162a51['hostname']())return![];if(_0x2f0533['pid']===process[_0x160110(0x1f8)])return![];try{return process[_0x160110(0xc7)](_0x2f0533[_0x160110(0x1f8)],0x0),![];}catch(_0x39b7fe){return _0x39b7fe[_0x160110(0xe6)]==='ESRCH';}}async['tryAcquire'](_0x50a221,_0xe8254d={},_0x5effdd={}){const _0x3369ad=_0x21428c,_0x119b48=this[_0x3369ad(0x1bc)](_0x50a221),_0x342756=_0x5effdd[_0x3369ad(0x204)]??this[_0x3369ad(0x204)],_0x5d9460=Date[_0x3369ad(0x2b2)](),_0x262fa5={'holder':{'pid':process[_0x3369ad(0x1f8)],'hostname':_0x162a51[_0x3369ad(0x219)](),..._0xe8254d},'acquiredAt':_0x5d9460,'updatedAt':_0x5d9460,'ttlMs':_0x342756};let _0xb34d20=![],_0x4de73a=null;try{const _0x35b6ae=()=>{const _0x26156f=_0x3369ad,_0x102b22=this['_db']()[_0x26156f(0x18a)](_0x119b48);if(_0x102b22&&!this[_0x26156f(0x1c9)](_0x102b22)&&!_0x5b7453[_0x26156f(0xce)](_0x102b22)){const _0x322149=_0xe8254d[_0x26156f(0xc9)]!=null&&_0x102b22['holder'][_0x26156f(0x1f8)]===process[_0x26156f(0x1f8)]&&_0x102b22[_0x26156f(0x1e6)][_0x26156f(0xc9)]===_0xe8254d[_0x26156f(0xc9)];if(!_0x322149){_0xb34d20=![],_0x4de73a=_0x102b22;return;}_0x262fa5[_0x26156f(0x1de)]<=_0x102b22['acquiredAt']&&(_0x262fa5['acquiredAt']=_0x102b22[_0x26156f(0x1de)]+0x1,_0x262fa5['updatedAt']=_0x262fa5['acquiredAt']);}this['_db']()[_0x26156f(0x29d)](_0x119b48,_0x262fa5),_0xb34d20=!![],_0x4de73a=_0x262fa5;};if(_0x13d44a)this['_db']()['transactionSync'](_0x35b6ae);else await this['_db']()['childTransaction'](_0x35b6ae);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0xb34d20)return{'acquired':![],'handle':null,'current':_0x4de73a};const _0x2b1adb=new _0x4854c6(this,_0x119b48,_0x262fa5[_0x3369ad(0x1de)]);return _0x2b1adb['_startHeartbeat'](_0x342756,this[_0x3369ad(0x202)]),{'acquired':!![],'handle':_0x2b1adb,'current':_0x4de73a};}[_0x21428c(0x282)](_0xe72809){const _0x54b37b=_0x21428c;try{return this[_0x54b37b(0x25a)]()[_0x54b37b(0x18a)](this[_0x54b37b(0x1bc)](_0xe72809))??null;}catch{return null;}}[_0x21428c(0x22f)](){const _0x174c2d=_0x21428c,_0x44b325=this[_0x174c2d(0x12a)]+':',_0x3e05d6=[];try{for(const {key:_0x50725f,value:_0x22ff0c}of this[_0x174c2d(0x25a)]()[_0x174c2d(0x18e)]({'start':_0x44b325,'end':_0x44b325+'\xff'})){typeof _0x50725f===_0x174c2d(0x208)&&_0x50725f[_0x174c2d(0x27c)](_0x44b325)&&_0x3e05d6[_0x174c2d(0x1d8)]({'id':_0x50725f['slice'](_0x44b325[_0x174c2d(0x1fd)]),'entry':_0x22ff0c});}}catch{}return _0x3e05d6;}static[_0x21428c(0x160)](_0x4a0c25){const _0x56450b=_0x21428c,_0x52d40f=[];try{const _0x122a6a=_0x4a0c25['openDB'](_0x2495cd,{'dupSort':![]});for(const {key:_0x55cb0d,value:_0xb05940}of _0x122a6a[_0x56450b(0x18e)]({})){if(typeof _0x55cb0d!==_0x56450b(0x208))continue;const _0x2a5f7d=_0x55cb0d[_0x56450b(0x16c)](':');if(_0x2a5f7d<0x1)continue;_0x52d40f['push']({'namespace':_0x55cb0d['slice'](0x0,_0x2a5f7d),'id':_0x55cb0d[_0x56450b(0x1cd)](_0x2a5f7d+0x1),'entry':_0xb05940});}}catch{}return _0x52d40f;}}return okdbLock={'OKDBLock':_0x5b7453},okdbLock;}function _0x39f1(_0x10fe2d,_0x1d2e98){_0x10fe2d=_0x10fe2d-0xb7;const _0x59e2a1=_0x59e2();let _0x39f135=_0x59e2a1[_0x10fe2d];return _0x39f135;}var version=_0x16770f(0x280),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x411a96=_0x16770f;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x202c4a=require$$0$3,_0x1b8036=require$$1$1,_0x494b8f=require$$2,{LOOP:_0x5e4e31}=requireOkdbLoopMonitor(),{OKDBLock:_0x3e05c0}=requireOkdbLock(),{SYNC_COMMITS:_0x513ac4}=requireOkdbWriter(),_0x5c9a2d=_0x411a96(0x242),_0x31be89='node',_0x501355=_0x411a96(0x28d),_0x135f8b=_0x411a96(0x21f),_0x3bbf19=(_0xbad4ce,_0x6a3ace)=>_0xbad4ce+':'+_0x6a3ace,_0x1a3838=(_0x1ae669,_0x5f2dfe)=>_0x1ae669+'::'+_0x5f2dfe,_0x3ff658=(_0x5bf72a,_0x2784b9)=>_0x5bf72a+'/'+_0x2784b9,_0x5e0de5=(_0x1bc70b,_0x1e38de)=>_0x1bc70b+'#'+_0x1e38de,_0x30de6a=_0x4e67f1=>{const _0x27ceb2=_0x411a96;if(_0x4e67f1?.['processKey'])return _0x4e67f1[_0x27ceb2(0x272)];const _0x3f1231=_0x4e67f1?.['nodeKey'];return typeof _0x3f1231===_0x27ceb2(0x208)&&_0x3f1231['includes']('#')?_0x3f1231[_0x27ceb2(0x1cd)](0x0,_0x3f1231['indexOf']('#')):_0x3f1231;},_0x28bd47=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x3ba48e=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4a82ed=_0x28bd47*0x3,_0x5b75d0=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x4a82ed*0x14),_0x5c1a29=[_0x411a96(0x14c),_0x411a96(0x23f),_0x411a96(0x1ef),'processor:error',_0x411a96(0x23c),_0x411a96(0xf4)];let _0x16bd0e=null;function _0x459c89(){const _0x165a12=_0x411a96;if(_0x16bd0e==null)_0x16bd0e=Math[_0x165a12(0x24a)]((Date['now']()-process[_0x165a12(0x2e5)]()*0x3e8)/0x3e8)*0x3e8;return _0x16bd0e;}function _0x2f564a(_0x4a674e){const _0x148cbf=_0x411a96;if(process.env.OKDB_PROCESS_KILL===_0x148cbf(0x26b))return![];if(_0x4a674e?.[_0x148cbf(0x108)]?.[_0x148cbf(0x1eb)]&&typeof _0x4a674e[_0x148cbf(0x108)][_0x148cbf(0x1eb)]===_0x148cbf(0x285)&&_0x4a674e[_0x148cbf(0x108)]['processes']['kill']===![])return![];return!![];}function _0x3fb002(_0x1ec076,_0x14a1ce){const _0x2d4c4d=_0x411a96,_0x4d3bda=!!_0x14a1ce?.[_0x2d4c4d(0x1cf)];switch(_0x1ec076){case'primary':return{'controllable':_0x4d3bda,'decommissionable':![],'killable':!![],'killConfirm':_0x2d4c4d(0xbf)};case _0x2d4c4d(0x1d7):case _0x2d4c4d(0x2ca):return{'controllable':_0x4d3bda,'decommissionable':![],'killable':!![],'killConfirm':_0x2d4c4d(0x166)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x2d4c4d(0x145):case _0x2d4c4d(0x255):case'fn-runner':case _0x2d4c4d(0x2c4):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x2d4c4d(0x1c4)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0xc9f7bb{constructor(_0x325b5a){const _0xf52587=_0x411a96;this[_0xf52587(0x21b)]=_0x325b5a,this[_0xf52587(0x128)]=null,this['_desired']=null,this['_desiredOverlay']=new Map(),this['_cmd']=null,this['_isWriter']=![],this[_0xf52587(0x19c)]=![],this[_0xf52587(0xc8)]=_0x459c89(),this[_0xf52587(0x293)]=_0x3bbf19(process[_0xf52587(0x1f8)],this[_0xf52587(0xc8)]),this[_0xf52587(0x273)]=_0x494b8f[_0xf52587(0x23e)]()[_0xf52587(0x1cd)](0x0,0x8),this[_0xf52587(0x1e8)]=_0x5e0de5(this['_selfKey'],this['_instanceId']),this[_0xf52587(0xfe)]=Date[_0xf52587(0x2b2)](),this[_0xf52587(0x2a7)]=null,this[_0xf52587(0x28c)]=null,this[_0xf52587(0x2ac)]=null,this[_0xf52587(0x1a8)]=null,this[_0xf52587(0x15e)]=null,this[_0xf52587(0x2a5)]=null,this[_0xf52587(0xe9)]=0x0,this[_0xf52587(0x24f)]={},this['_children']=new Map(),this[_0xf52587(0x1c0)]=process[_0xf52587(0x161)](),this[_0xf52587(0xde)]=Date[_0xf52587(0x2b2)](),this[_0xf52587(0x111)]=0x0,this[_0xf52587(0x1a7)]=new Map();}get[_0x411a96(0x141)](){return this['_selfKey'];}get[_0x411a96(0x124)](){const _0x3d6672=_0x411a96;return this[_0x3d6672(0x1e8)];}[_0x411a96(0x2aa)](_0x263f20,_0x3a9260){const _0x347276=_0x411a96,_0x8b6952=_0x3fb002(_0x263f20,_0x3a9260);if(_0x8b6952[_0x347276(0x14b)]&&!_0x2f564a(this['okdb']))return{..._0x8b6952,'killable':![],'killConfirm':undefined};return _0x8b6952;}[_0x411a96(0x2cf)](){const _0x10982a=_0x411a96;return!!this[_0x10982a(0x128)];}[_0x411a96(0xd6)](_0x153e16){const _0x5dc083=_0x411a96;Object[_0x5dc083(0x254)](this[_0x5dc083(0x24f)],_0x153e16||{});}[_0x411a96(0x10e)](_0x16afa5){if(_0x16afa5)this['_listenAddr']=_0x16afa5;}[_0x411a96(0x2e3)](_0x4e6605={}){const _0xe93800=_0x411a96;return this[_0xe93800(0x21b)][_0xe93800(0x28e)](_0x4e6605);}[_0x411a96(0x1b3)](){const _0x5f3320=_0x411a96,_0x39e85c={};let _0x26073e=0x0,_0x129fe2=0x0;const _0x17c2cb=new Set();for(const _0x24b460 of this[_0x5f3320(0x2de)]()){_0x129fe2++;const _0x199db6=_0x24b460[_0x5f3320(0x245)];if(!_0x199db6)continue;if(_0x199db6['participate'])_0x26073e++;for(const _0x4e7344 of _0x199db6[_0x5f3320(0x1cf)]||[]){if(![_0x5f3320(0x252),'fanout']['includes'](_0x4e7344['mode']))continue;(_0x4e7344[_0x5f3320(0x17c)]==='online'||_0x4e7344[_0x5f3320(0x17c)]===_0x5f3320(0xba))&&_0x4e7344[_0x5f3320(0x1dc)]&&_0x17c2cb['add']((_0x4e7344['env']||_0x5f3320(0x1f5))+':'+_0x4e7344[_0x5f3320(0x1dc)]);const _0x4353c5=_0x4e7344[_0x5f3320(0x1bd)]||_0x5f3320(0x1f5);(_0x39e85c[_0x4353c5]||=[])[_0x5f3320(0x1d8)]({..._0x4e7344,'env':_0x4353c5,'owner':{'pid':_0x24b460[_0x5f3320(0x1f8)]??null,'kind':_0x24b460[_0x5f3320(0x2e6)]??null}});}}for(const [_0xf39ccb,_0x342b58]of Object[_0x5f3320(0x265)](_0x39e85c)){for(const _0x20c058 of _0x342b58){if(_0x20c058['mode']===_0x5f3320(0x252)&&!_0x20c058[_0x5f3320(0x17b)]){const _0x3b926f=_0xf39ccb+':'+(_0x20c058[_0x5f3320(0x1dc)]??'');if(!_0x17c2cb[_0x5f3320(0xc0)](_0x3b926f))_0x20c058[_0x5f3320(0x1a5)]=!![];}}}return{'envs':_0x39e85c,'policy':null,'participation':{'participating':_0x26073e,'total':_0x129fe2},'source':_0x5f3320(0x1a0)};}[_0x411a96(0x2d6)](){const _0x33d37e=_0x411a96,_0x291325=_0x5641ff=>{const _0x194054=_0x39f1;if(_0x5641ff[_0x194054(0x17c)]===_0x194054(0x135)||_0x5641ff[_0x194054(0x17c)]===_0x194054(0xba)||_0x5641ff[_0x194054(0x17c)]==='error')return 0x3;if(_0x5641ff[_0x194054(0x17b)])return 0x1;return 0x2;},_0x2ece6a=new Map();for(const _0x4e328d of this[_0x33d37e(0x2de)]()){for(const _0x13499d of _0x4e328d[_0x33d37e(0x245)]?.[_0x33d37e(0x1cf)]||[]){const _0x517739={..._0x13499d,'owner':{'pid':_0x4e328d['pid']??null,'kind':_0x4e328d[_0x33d37e(0x2e6)]??null,'host':_0x4e328d[_0x33d37e(0x2c7)]??null}},_0x53c769=_0x13499d['mode']===_0x33d37e(0x252)?_0x33d37e(0x2ad)+(_0x13499d[_0x33d37e(0x1bd)]??'')+'::'+(_0x13499d[_0x33d37e(0x1dc)]??_0x13499d[_0x33d37e(0x1f6)]??_0x13499d['id']):'inst:'+(_0x4e328d['nodeKey']??_0x4e328d[_0x33d37e(0x272)]??'')+'::'+(_0x13499d[_0x33d37e(0x1bd)]??'')+'::'+_0x13499d['id'],_0x22563a=_0x2ece6a[_0x33d37e(0x18a)](_0x53c769);if(!_0x22563a||_0x291325(_0x517739)>_0x291325(_0x22563a))_0x2ece6a[_0x33d37e(0x2a9)](_0x53c769,_0x517739);}}return[..._0x2ece6a[_0x33d37e(0xd8)]()];}['clusterStatusView'](){const _0x4f778b=_0x411a96,_0x4d4ba2=Date['now'](),_0x3afb57=this[_0x4f778b(0x2de)](),_0x126adc=_0x5e7248=>Math[_0x4f778b(0x1ca)](0x0,Math['round']((_0x4d4ba2-(_0x5e7248['startedAt']||_0x4d4ba2))/0x3e8)),_0xfa1e28=_0x3afb57['find'](_0x3e5d1c=>_0x3e5d1c[_0x4f778b(0x2e6)]===_0x4f778b(0x200)),_0x4913cc=_0x3afb57[_0x4f778b(0x2c0)](_0x249c35=>_0x249c35['kind']===_0x4f778b(0x145));if(_0xfa1e28||_0x4913cc[_0x4f778b(0x1fd)])return{'primary':_0xfa1e28?{'pid':_0xfa1e28[_0x4f778b(0x1f8)],'uptime':_0x126adc(_0xfa1e28)}:null,'workers':_0x4913cc[_0x4f778b(0x226)](_0x5b2a53=>({'pid':_0x5b2a53[_0x4f778b(0x1f8)],'uptime':_0x126adc(_0x5b2a53)})),'workersConfigured':_0xfa1e28?.['meta']?.[_0x4f778b(0x1be)]??_0x4913cc[_0x4f778b(0x1fd)],'mode':'cluster'};const _0xc8fc59=_0x3afb57[_0x4f778b(0x1f7)](_0x151e57=>_0x151e57['kind']==='cli'||_0x151e57[_0x4f778b(0x2e6)]===_0x4f778b(0x2ca)||_0x151e57[_0x4f778b(0x2e6)]==='embedded'),_0x2c7cbf=_0xc8fc59?{'pid':_0xc8fc59[_0x4f778b(0x1f8)],'uptime':_0x126adc(_0xc8fc59)}:{'pid':process[_0x4f778b(0x1f8)],'uptime':Math[_0x4f778b(0x1ca)](0x0,Math[_0x4f778b(0x24a)](process[_0x4f778b(0x2e5)]()))};return{'primary':_0x2c7cbf,'workers':[_0x2c7cbf],'workersConfigured':0x1,'mode':_0x4f778b(0x252)};}[_0x411a96(0xbe)](){return this['_groupByProcess']();}[_0x411a96(0x24b)](){const _0xbcb6ed=_0x411a96,_0x5a992a=new Map();for(const _0x2da6dd of this['_groupByProcess']())_0x5a992a['set'](_0x2da6dd[_0xbcb6ed(0x272)],{..._0x2da6dd,'children':[]});const _0x2cfda9=[];for(const _0x337e22 of _0x5a992a[_0xbcb6ed(0xd8)]()){const _0x59bc1=_0x337e22[_0xbcb6ed(0x28a)]?_0x5a992a[_0xbcb6ed(0x18a)](_0x337e22['supervisorKey']):null;if(_0x59bc1&&_0x59bc1!==_0x337e22)_0x59bc1[_0xbcb6ed(0x1d2)][_0xbcb6ed(0x1d8)](_0x337e22);else _0x2cfda9[_0xbcb6ed(0x1d8)](_0x337e22);}const _0x33c7d8=(_0x49bcd9,_0x3703f8)=>_0x49bcd9[_0xbcb6ed(0x2e6)]===_0x3703f8[_0xbcb6ed(0x2e6)]?(_0x49bcd9[_0xbcb6ed(0x1f8)]||0x0)-(_0x3703f8['pid']||0x0):(_0x49bcd9[_0xbcb6ed(0x2e6)]??'')<(_0x3703f8[_0xbcb6ed(0x2e6)]??'')?-0x1:0x1,_0x3be133=_0x1d01d8=>{const _0x1686fa=_0xbcb6ed;_0x1d01d8['sort'](_0x33c7d8);for(const _0x28b72c of _0x1d01d8)if(_0x28b72c[_0x1686fa(0x1d2)][_0x1686fa(0x1fd)])_0x3be133(_0x28b72c[_0x1686fa(0x1d2)]);};return _0x3be133(_0x2cfda9),_0x2cfda9;}[_0x411a96(0x15a)](_0x168de3){const _0x1f8625=_0x411a96;return this[_0x1f8625(0x247)]()[_0x1f8625(0x1f7)](_0x3d459b=>_0x3d459b['processKey']===_0x168de3)??null;}['_groupByProcess'](_0x5d341b=Date[_0x411a96(0x2b2)]()){const _0x4d8eaa=_0x411a96,_0x16fe4b=new Map();for(const _0x4aa49f of this[_0x4d8eaa(0x2de)]()){const _0x1fb311=_0x30de6a(_0x4aa49f);let _0x18e271=_0x16fe4b[_0x4d8eaa(0x18a)](_0x1fb311);!_0x18e271&&(_0x18e271={'processKey':_0x1fb311,'nodeKey':_0x1fb311,'pid':_0x4aa49f[_0x4d8eaa(0x1f8)],'ppid':_0x4aa49f[_0x4d8eaa(0xf3)]??null,'host':_0x4aa49f[_0x4d8eaa(0x2c7)]??null,'kind':_0x4aa49f[_0x4d8eaa(0x2e6)],'role':null,'supervisorKey':_0x4aa49f[_0x4d8eaa(0x28a)]??null,'slot':_0x4aa49f[_0x4d8eaa(0x236)]??null,'slotKey':_0x4aa49f[_0x4d8eaa(0x11b)]??null,'caps':_0x4aa49f[_0x4d8eaa(0x171)]??null,'lifecycle':_0x4aa49f[_0x4d8eaa(0x140)]??null,'uptime':Math[_0x4d8eaa(0x1ca)](0x0,Math[_0x4d8eaa(0x24a)]((_0x5d341b-(_0x4aa49f[_0x4d8eaa(0x1d3)]||_0x5d341b))/0x3e8)),'startedAt':_0x4aa49f['startedAt']??null,'meta':_0x4aa49f['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x16fe4b['set'](_0x1fb311,_0x18e271));_0x18e271['instances'][_0x4d8eaa(0x1d8)]({'instanceId':_0x4aa49f[_0x4d8eaa(0x1ea)]??null,'role':_0x4aa49f[_0x4d8eaa(0x2bf)]??null,'listenAddr':_0x4aa49f[_0x4d8eaa(0x103)]??null,'lifecycle':_0x4aa49f['lifecycle']??null,'processing':_0x4aa49f['processing']??null});if(!_0x18e271[_0x4d8eaa(0x2bf)]&&_0x4aa49f['role'])_0x18e271[_0x4d8eaa(0x2bf)]=_0x4aa49f[_0x4d8eaa(0x2bf)];if(!_0x18e271[_0x4d8eaa(0x103)]&&_0x4aa49f[_0x4d8eaa(0x103)])_0x18e271[_0x4d8eaa(0x103)]=_0x4aa49f[_0x4d8eaa(0x103)];if(!_0x18e271[_0x4d8eaa(0x245)]&&_0x4aa49f['processing'])_0x18e271[_0x4d8eaa(0x245)]=_0x4aa49f[_0x4d8eaa(0x245)];if(!_0x18e271[_0x4d8eaa(0x195)]&&_0x4aa49f[_0x4d8eaa(0x195)])_0x18e271[_0x4d8eaa(0x195)]=_0x4aa49f['engines'];if(!_0x18e271[_0x4d8eaa(0xc2)]&&_0x4aa49f[_0x4d8eaa(0xc2)])_0x18e271[_0x4d8eaa(0xc2)]=_0x4aa49f[_0x4d8eaa(0xc2)];if(_0x18e271['caps']==null&&_0x4aa49f[_0x4d8eaa(0x171)])_0x18e271['caps']=_0x4aa49f[_0x4d8eaa(0x171)];if(_0x4aa49f[_0x4d8eaa(0x17f)]&&(!_0x18e271['stats']||(_0x4aa49f['stats']['at']??0x0)>(_0x18e271[_0x4d8eaa(0x17f)]['at']??0x0)))_0x18e271['stats']=_0x4aa49f['stats'];}return[..._0x16fe4b[_0x4d8eaa(0xd8)]()];}[_0x411a96(0x2ae)](){const _0x2ddb87=_0x411a96,_0x39826c=[],_0x54be3c={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x295fb5 of this[_0x2ddb87(0x247)]()){_0x39826c['push']({'processKey':_0x295fb5[_0x2ddb87(0x272)],'kind':_0x295fb5[_0x2ddb87(0x2e6)],'pid':_0x295fb5[_0x2ddb87(0x1f8)],'supervisorKey':_0x295fb5[_0x2ddb87(0x28a)],'meta':_0x295fb5[_0x2ddb87(0x1ab)]??null,'uptime':_0x295fb5['uptime'],'stats':_0x295fb5['stats']??null}),_0x54be3c[_0x2ddb87(0x1eb)]++;if(_0x295fb5[_0x2ddb87(0x17f)]){_0x54be3c[_0x2ddb87(0x24d)]+=_0x295fb5[_0x2ddb87(0x17f)][_0x2ddb87(0x24d)]||0x0,_0x54be3c['heapUsed']+=(_0x295fb5[_0x2ddb87(0x17f)][_0x2ddb87(0xfc)]||0x0)+(_0x295fb5[_0x2ddb87(0x17f)]['threads']?.[_0x2ddb87(0xfc)]||0x0);const _0x5ed924=_0x295fb5[_0x2ddb87(0x17f)]['threads'];_0x5ed924&&(_0x54be3c[_0x2ddb87(0x23a)][_0x2ddb87(0xb9)]+=_0x5ed924[_0x2ddb87(0xb9)]||0x0,_0x54be3c[_0x2ddb87(0x23a)]['sandbox']+=_0x5ed924[_0x2ddb87(0x16a)]||0x0,_0x54be3c['threads'][_0x2ddb87(0x1bb)]+=_0x5ed924['busy']||0x0);}}return{'totals':_0x54be3c,'nodes':_0x39826c};}async[_0x411a96(0x165)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x41d467=_0x411a96;this[_0x41d467(0x298)]=this['_isWriter']||!!writer,this[_0x41d467(0x19c)]=this[_0x41d467(0x19c)]||!!reader,this[_0x41d467(0x2a7)]=kind||this[_0x41d467(0x2a7)]||(_0x1b8036['isWorker']?_0x41d467(0x145):_0x41d467(0x1d7)),this['_supervisorKey']=supervisorKey??this[_0x41d467(0x28c)],this[_0x41d467(0x2ac)]=listenAddr??this[_0x41d467(0x2ac)],this['_ensureDesired'](),await this[_0x41d467(0x224)]();if(!writer&&!reader)return null;if(!this[_0x41d467(0x128)]){const _0xcbada2=await this[_0x41d467(0x21b)][_0x41d467(0x180)](_0x5c9a2d,{'sync':![],'durability':_0x41d467(0xfa)});if(!_0xcbada2[_0x41d467(0xe8)](_0x31be89))await _0xcbada2[_0x41d467(0x267)](_0x31be89);this[_0x41d467(0x128)]=_0xcbada2;}return this[_0x41d467(0x128)];}[_0x411a96(0x129)](){const _0x2ceead=_0x411a96;return this['_nodeDbFor']!==this['_statusEnv']&&(this[_0x2ceead(0xb7)]=this['_statusEnv'],this[_0x2ceead(0x261)]=this[_0x2ceead(0x128)][_0x2ceead(0x146)](_0x31be89)[_0x2ceead(0x2dd)]),this[_0x2ceead(0x261)];}['_putRowAsync'](_0x29e1d0){const _0x2e066f=_0x411a96;if(_0x513ac4)return this[_0x2e066f(0x129)]()[_0x2e066f(0xd5)](_0x29e1d0[_0x2e066f(0xcf)],_0x29e1d0,0x1);const _0x88c425=this[_0x2e066f(0x129)]()['put'](_0x29e1d0[_0x2e066f(0xcf)],_0x29e1d0,0x1);if(_0x88c425&&typeof _0x88c425[_0x2e066f(0x213)]===_0x2e066f(0x136))_0x88c425[_0x2e066f(0x213)](undefined,()=>{});return _0x88c425;}[_0x411a96(0x2a1)](_0x5d8268){const _0x3fa13d=_0x411a96;return this[_0x3fa13d(0x129)]()[_0x3fa13d(0xd5)](_0x5d8268[_0x3fa13d(0xcf)],_0x5d8268,0x1);}[_0x411a96(0x1a1)](_0x2e61d3){const _0x3df6be=_0x411a96;if(_0x513ac4)try{return this[_0x3df6be(0x129)]()['removeSync'](_0x2e61d3);}catch{return![];}const _0x2cc8a7=this[_0x3df6be(0x129)]()['remove'](_0x2e61d3);if(_0x2cc8a7&&typeof _0x2cc8a7[_0x3df6be(0x213)]===_0x3df6be(0x136))_0x2cc8a7[_0x3df6be(0x213)](undefined,()=>{});return _0x2cc8a7;}async[_0x411a96(0x2c3)](_0x3dcca5){const _0x3b4ca3=_0x411a96;if(!this[_0x3b4ca3(0x128)]||!this[_0x3b4ca3(0x298)]||!_0x3dcca5?.[_0x3b4ca3(0xcf)])return;return this[_0x3b4ca3(0x2be)](_0x3dcca5);}async[_0x411a96(0x243)](_0x2814bb){const _0x53ba64=_0x411a96;if(!this[_0x53ba64(0x128)]||!this[_0x53ba64(0x298)]||!_0x2814bb)return;const _0x253c53=_0x2814bb[_0x53ba64(0x217)]('#'),_0x557b97=[];for(const {key:_0x589c2d}of this['_statusEnv'][_0x53ba64(0x18e)](_0x31be89)){if(_0x589c2d===_0x2814bb||!_0x253c53&&typeof _0x589c2d===_0x53ba64(0x208)&&_0x589c2d[_0x53ba64(0x27c)](_0x2814bb+'#'))_0x557b97[_0x53ba64(0x1d8)](_0x589c2d);}for(const _0x154620 of _0x557b97){try{this[_0x53ba64(0x129)]()['removeSync'](_0x154620);}catch{}}}[_0x411a96(0x177)](_0x309b7e){const _0x32a6c2=_0x411a96;if(typeof _0x309b7e?.[_0x32a6c2(0x1f8)]!=='number')return![];if(_0x309b7e[_0x32a6c2(0x2c7)]!==_0x202c4a['hostname']())return![];if(_0x309b7e[_0x32a6c2(0x1f8)]===process[_0x32a6c2(0x1f8)])return![];if(_0x309b7e[_0x32a6c2(0x17e)]!=null&&_0x309b7e[_0x32a6c2(0x17e)]<Date[_0x32a6c2(0x2b2)]()-_0x5b75d0)return!![];try{return process['kill'](_0x309b7e[_0x32a6c2(0x1f8)],0x0),![];}catch(_0x3df541){return _0x3df541[_0x32a6c2(0xe6)]===_0x32a6c2(0xd3);}}[_0x411a96(0x2de)](){const _0x594de7=_0x411a96;if(!this[_0x594de7(0x128)])return[];try{this['_statusEnv']['db']?.[_0x594de7(0x130)]?.();}catch{}const _0xc126eb=Date[_0x594de7(0x2b2)](),_0x407c45=_0x202c4a['hostname'](),_0x2f0298=[];for(const {value:_0x5331b5}of this['_statusEnv']['getRange'](_0x31be89)){if(!_0x5331b5)continue;let _0x3022fd=null;_0x5331b5[_0x594de7(0x2c7)]===_0x407c45&&typeof _0x5331b5[_0x594de7(0x1f8)]==='number'&&(_0x3022fd=!this['_nodeDead'](_0x5331b5));if(_0x3022fd===![])continue;const _0x3eec5f=_0x5331b5[_0x594de7(0x17e)]==null||_0x5331b5[_0x594de7(0x17e)]>=_0xc126eb;if(_0x3022fd===!![]||_0x3eec5f)_0x2f0298['push'](_0x5331b5);}return _0x2f0298;}async['reap'](_0xc582d3=0x0){const _0xbb11e0=_0x411a96;if(!this['_statusEnv']||!this[_0xbb11e0(0x298)])return;const _0x58c3f4=Date[_0xbb11e0(0x2b2)]()-_0xc582d3,_0x5c8de7=new Set(),_0x33ba3b=[],_0x1d8810=_0x202c4a[_0xbb11e0(0x219)](),_0x132cf5=require$$6[_0xbb11e0(0x2e4)];for(const {key:_0x32b77d,value:_0x308c21}of this[_0xbb11e0(0x128)][_0xbb11e0(0x18e)](_0x31be89)){if(!_0x308c21)continue;const _0x5e467b=_0x308c21[_0xbb11e0(0x2c7)]===_0x1d8810&&typeof _0x308c21[_0xbb11e0(0x1f8)]===_0xbb11e0(0x14e),_0x3c2a24=_0x5e467b?this[_0xbb11e0(0x177)](_0x308c21):_0x308c21[_0xbb11e0(0x17e)]!=null&&_0x308c21[_0xbb11e0(0x17e)]<_0x58c3f4;if(_0x3c2a24)_0x33ba3b[_0xbb11e0(0x1d8)](_0x32b77d);else{_0x5c8de7[_0xbb11e0(0x216)](_0x30de6a(_0x308c21)??_0x32b77d);if(_0x308c21['version']&&_0x308c21[_0xbb11e0(0x2e4)]!==_0x132cf5){if(!this[_0xbb11e0(0x191)])this[_0xbb11e0(0x191)]=new Set();!this['_versionSkewWarned'][_0xbb11e0(0xc0)](_0x308c21[_0xbb11e0(0x2e4)])&&(this[_0xbb11e0(0x191)][_0xbb11e0(0x216)](_0x308c21['version']),this['okdb']['log']?.[_0xbb11e0(0x16f)]?.(_0xbb11e0(0x16d)+(_0x308c21['pid']??'?')+_0xbb11e0(0x139)+_0x308c21[_0xbb11e0(0x2e4)]+_0xbb11e0(0x123)+_0x132cf5+'\x20—\x20'+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':'migrations'}));}}}for(const _0x307751 of _0x33ba3b)this[_0xbb11e0(0x1a1)](_0x307751);if(this['_ensureDesired']()){const _0xe85b47=[];for(const {key:_0xba1d31}of this[_0xbb11e0(0x1f1)]('node')){if(!_0x5c8de7[_0xbb11e0(0xc0)](_0xba1d31)){if(_0x513ac4)try{this[_0xbb11e0(0x169)][_0xbb11e0(0xef)]('node/'+_0xba1d31);}catch{}else _0xe85b47['push'](this['_desired'][_0xbb11e0(0x1a9)](_0xbb11e0(0x2ef)+_0xba1d31));}}if(_0xe85b47[_0xbb11e0(0x1fd)])await Promise[_0xbb11e0(0x176)](_0xe85b47);}}['startHeartbeat'](_0x3ad849=null){const _0xf70e4=_0x411a96;if(this[_0xf70e4(0x1a8)])return;if(!this[_0xf70e4(0x298)]||!this['_statusEnv']){this[_0xf70e4(0x21b)]?.[_0xf70e4(0x21d)]?.[_0xf70e4(0x16f)]?.(_0xf70e4(0x122)+this[_0xf70e4(0x298)]+_0xf70e4(0x23d)+!!this['_statusEnv']+_0xf70e4(0x2a0),{'feature':_0xf70e4(0x1eb)});return;}this['_onTick']=_0x3ad849,this[_0xf70e4(0x15e)]=()=>this[_0xf70e4(0x12b)]();for(const _0x5e53d8 of _0x5c1a29)this[_0xf70e4(0x21b)][_0xf70e4(0x2ab)]['on'](_0x5e53d8,this[_0xf70e4(0x15e)]);this[_0xf70e4(0xe0)]();const _0x12ae7f=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x28bd47;this[_0xf70e4(0x1a8)]=setInterval(()=>{const _0x3e3d07=_0xf70e4;if(this[_0x3e3d07(0x2a5)])try{this[_0x3e3d07(0x2a5)]();}catch{}this[_0x3e3d07(0xe0)](),this[_0x3e3d07(0x1e3)]()[_0x3e3d07(0x149)](()=>{});},_0x12ae7f);if(this[_0xf70e4(0x1a8)][_0xf70e4(0x205)])this[_0xf70e4(0x1a8)][_0xf70e4(0x205)]();}[_0x411a96(0x12b)](){const _0x3ae8ba=_0x411a96;if(!this[_0x3ae8ba(0x298)]||!this['_statusEnv'])return;if(Date[_0x3ae8ba(0x2b2)]()-this[_0x3ae8ba(0xe9)]<_0x3ba48e)return;this['_publishNow']();}[_0x411a96(0xe0)](){const _0x4c7dd2=_0x411a96;if(!this[_0x4c7dd2(0x298)]||!this[_0x4c7dd2(0x128)])return;this[_0x4c7dd2(0xe9)]=Date[_0x4c7dd2(0x2b2)]();try{const _0x417020=[this[_0x4c7dd2(0x13d)]()];for(const _0x56a10c of this[_0x4c7dd2(0x19d)][_0x4c7dd2(0xd8)]())_0x417020[_0x4c7dd2(0x1d8)](this[_0x4c7dd2(0xe1)](_0x56a10c));const _0x137fb9=_0x5e4e31[_0x4c7dd2(0x109)]?_0x5e4e31[_0x4c7dd2(0x2b2)]():0x0;for(const _0x4a97db of _0x417020){try{this['_putRowSync'](_0x4a97db),this['_publishFailWarned']=![];}catch(_0x32d41e){!this[_0x4c7dd2(0x115)]&&(this[_0x4c7dd2(0x115)]=!![],this[_0x4c7dd2(0x21b)]?.[_0x4c7dd2(0x21d)]?.['warn']?.(_0x4c7dd2(0x148)+_0x32d41e[_0x4c7dd2(0x276)],{'feature':'processes'}));}}if(_0x5e4e31[_0x4c7dd2(0x109)])_0x5e4e31[_0x4c7dd2(0x218)](_0x4c7dd2(0x10d),_0x5e4e31[_0x4c7dd2(0x2b2)]()-_0x137fb9,_0x4c7dd2(0xff)+_0x417020['length']+_0x4c7dd2(0x264));}catch(_0x3c663c){!this[_0x4c7dd2(0x115)]&&(this[_0x4c7dd2(0x115)]=!![],this[_0x4c7dd2(0x21b)]?.[_0x4c7dd2(0x21d)]?.[_0x4c7dd2(0x16f)]?.('registry\x20publish\x20failing:\x20'+_0x3c663c[_0x4c7dd2(0x276)],{'feature':_0x4c7dd2(0x1eb)}));}}async[_0x411a96(0x203)](){const _0x496a1f=_0x411a96;if(this[_0x496a1f(0x15e)]){for(const _0x232d91 of _0x5c1a29){try{this[_0x496a1f(0x21b)][_0x496a1f(0x2ab)][_0x496a1f(0x26b)](_0x232d91,this[_0x496a1f(0x15e)]);}catch{}}this['_onProcEvent']=null;}this[_0x496a1f(0x1a8)]&&(clearInterval(this['_hbTimer']),this[_0x496a1f(0x1a8)]=null);try{if(this[_0x496a1f(0x128)]&&this[_0x496a1f(0x298)])await this[_0x496a1f(0x243)](this[_0x496a1f(0x1e8)]);}catch{}}async[_0x411a96(0x143)](){const _0x241c81=_0x411a96;if(!this[_0x241c81(0x128)]||!this[_0x241c81(0x298)])return;try{await this[_0x241c81(0x243)](this['_rowKey']);}catch{}try{const _0x1d5846=[];for(const {value:_0x135797}of this[_0x241c81(0x128)][_0x241c81(0x18e)](_0x31be89)){if(_0x135797?.[_0x241c81(0xf3)]===process['pid']&&_0x135797[_0x241c81(0xcf)])_0x1d5846[_0x241c81(0x1d8)](_0x135797[_0x241c81(0xcf)]);}for(const _0x2d5f02 of _0x1d5846){try{await this[_0x241c81(0x243)](_0x2d5f02);}catch{}}}catch{}}async[_0x411a96(0x14d)](){const _0x21b31c=_0x411a96;return this[_0x21b31c(0x2c3)](this[_0x21b31c(0x13d)]());}async[_0x411a96(0x1c8)](_0x519096){const _0x40445f=_0x411a96;if(!this[_0x40445f(0x128)]||!this[_0x40445f(0x298)])return;return this[_0x40445f(0x2c3)](this[_0x40445f(0xe1)](_0x519096));}['_buildChildRow']({pid:_0x1c8897,startedAt:_0x187c9c,kind:_0xd4959a,supervisorKey:_0x1a081e,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x411a96(0x253),meta:meta=null,stats:stats=null}){const _0x5479d8=_0x411a96,_0x1e9e6c=Date[_0x5479d8(0x2b2)](),_0x4dac4a=_0x3bbf19(_0x1c8897,_0x187c9c);return{'nodeKey':_0x5e0de5(_0x4dac4a,'0'),'processKey':_0x4dac4a,'instanceId':'0','pid':_0x1c8897,'startedAt':_0x187c9c,'ppid':process[_0x5479d8(0x1f8)],'host':_0x202c4a[_0x5479d8(0x219)](),'supervisorKey':_0x1a081e,'slot':slot,'slotKey':slotKey,'kind':_0xd4959a,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x1e9e6c,'expiresAt':_0x1e9e6c+_0x4a82ed,'caps':this[_0x5479d8(0x2aa)](_0xd4959a,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x411a96(0x291)](_0x5e14fe){const _0x3a325c=_0x411a96;if(!_0x5e14fe?.[_0x3a325c(0x1f8)])return null;const _0x324785=_0x3bbf19(_0x5e14fe['pid'],_0x5e14fe['startedAt']);this['_children'][_0x3a325c(0x2a9)](_0x324785,{..._0x5e14fe,'supervisorKey':_0x5e14fe[_0x3a325c(0x28a)]??this[_0x3a325c(0x293)]});if(this[_0x3a325c(0x298)])await this[_0x3a325c(0x1c8)](this[_0x3a325c(0x19d)]['get'](_0x324785))[_0x3a325c(0x149)]?.(()=>{});return _0x324785;}[_0x411a96(0x299)](_0x50ac0e){const _0x1cd938=_0x411a96;if(!_0x50ac0e)return;return this['_children'][_0x1cd938(0x2d4)](_0x50ac0e),this[_0x1cd938(0x243)](_0x50ac0e);}[_0x411a96(0x12e)](){const _0x34fbbc=_0x411a96,_0x3710da=Date[_0x34fbbc(0x2b2)](),_0x288807=process[_0x34fbbc(0x161)](),_0x372b67=(_0x3710da-this[_0x34fbbc(0xde)])*0x3e8;if(_0x372b67>=0x3d090){const _0x10eec1=_0x288807['user']-this['_lastCpuUsage'][_0x34fbbc(0x2db)]+(_0x288807[_0x34fbbc(0x1d1)]-this['_lastCpuUsage'][_0x34fbbc(0x1d1)]),_0x433713=_0x202c4a[_0x34fbbc(0x225)]()['length']||0x1;this[_0x34fbbc(0x111)]=Math['min'](0x64,Math['round'](_0x10eec1/(_0x372b67*_0x433713)*0x64)),this[_0x34fbbc(0xd4)]=Math[_0x34fbbc(0x24a)](_0x372b67/0x3e8),this[_0x34fbbc(0x1c0)]=_0x288807,this[_0x34fbbc(0xde)]=_0x3710da;}const _0x2173f9=process[_0x34fbbc(0xf5)](),_0x345de4=this[_0x34fbbc(0x1a7)][_0x34fbbc(0xf8)];let _0x1e34e9=0x0;if(_0x345de4>0x0){const _0x290991=[this['okdb'],...this[_0x34fbbc(0x21b)][_0x34fbbc(0x198)]?.['values']?.()??[]];for(const _0x1da05e of _0x290991){const _0x519bbd=_0x1da05e[_0x34fbbc(0x26f)]?.[_0x34fbbc(0x142)];if(_0x519bbd)_0x1e34e9+=_0x519bbd[_0x34fbbc(0x290)][_0x34fbbc(0x1bb)];}}let _0x550f0a=null;const _0x55bad3=_0x345de4;if(_0x55bad3>0x0){let _0x5cd73f=0x0;for(const _0xc02737 of this['_threadStats']['values']())_0x5cd73f+=_0xc02737[_0x34fbbc(0xfc)]||0x0;_0x550f0a={'count':_0x55bad3,'heapUsed':_0x5cd73f,'sandbox':_0x345de4,'busy':_0x1e34e9};}return{'rss':_0x2173f9[_0x34fbbc(0x24d)],'heapUsed':_0x2173f9[_0x34fbbc(0xfc)],'heapTotal':_0x2173f9[_0x34fbbc(0x14a)],'external':_0x2173f9[_0x34fbbc(0x2f5)],'cpuPct':this[_0x34fbbc(0x111)],'cpuWindowMs':this[_0x34fbbc(0xd4)]??null,'threads':_0x550f0a,'at':_0x3710da};}[_0x411a96(0xc5)](_0x5157d9,_0x4267a1){const _0x5caaa0=_0x411a96;if(!_0x5157d9||!_0x4267a1)return;this[_0x5caaa0(0x1a7)][_0x5caaa0(0x2a9)](_0x5157d9,_0x4267a1);}[_0x411a96(0x2d1)](_0x36295b){const _0x1a6985=_0x411a96;this[_0x1a6985(0x1a7)][_0x1a6985(0x2d4)](_0x36295b);}[_0x411a96(0x269)](_0x2789c4,_0x2cf195,_0x1b88d4=undefined){const _0x5e6f24=_0x411a96,_0x374e2e=this[_0x5e6f24(0x19d)][_0x5e6f24(0x18a)](_0x2789c4);if(!_0x374e2e||!_0x2cf195)return;if(_0x1b88d4!==undefined)_0x374e2e['processing']=_0x1b88d4;_0x374e2e[_0x5e6f24(0x17f)]={'rss':_0x2cf195[_0x5e6f24(0x24d)]??null,'heapUsed':_0x2cf195['heapUsed']??null,'heapTotal':_0x2cf195[_0x5e6f24(0x14a)]??null,'external':_0x2cf195['external']??null,'cpuPct':_0x2cf195[_0x5e6f24(0x2a3)]??null,'cpuWindowMs':_0x2cf195['cpuWindowMs']??null,'threads':_0x2cf195[_0x5e6f24(0x23a)]??null,'claims':_0x2cf195['claims']??null,'envsOpen':_0x2cf195[_0x5e6f24(0x15c)]??null,'at':Date[_0x5e6f24(0x2b2)]()};}[_0x411a96(0x13d)](){const _0x2c7b5d=_0x411a96,_0x3c884c=Date[_0x2c7b5d(0x2b2)](),_0x40d01e=this['okdb'][_0x2c7b5d(0x1c6)]||{},_0x235021=this[_0x2c7b5d(0x2a7)]||'cli';return{'nodeKey':this[_0x2c7b5d(0x1e8)],'processKey':this[_0x2c7b5d(0x293)],'instanceId':this['_instanceId'],'pid':process[_0x2c7b5d(0x1f8)],'startedAt':this[_0x2c7b5d(0xc8)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x2c7b5d(0xf3)]===_0x2c7b5d(0x14e)?process[_0x2c7b5d(0xf3)]:null,'host':_0x202c4a[_0x2c7b5d(0x219)](),'supervisorKey':this[_0x2c7b5d(0x28c)]??null,'version':require$$6['version'],'kind':_0x235021,'role':{'engines':!!_0x40d01e[_0x2c7b5d(0x195)],'processors':!!_0x40d01e[_0x2c7b5d(0x1cf)],'compaction':_0x40d01e[_0x2c7b5d(0x174)],'http':_0x40d01e[_0x2c7b5d(0x28f)]},'listenAddr':this[_0x2c7b5d(0x2ac)]??null,'heartbeatAt':_0x3c884c,'expiresAt':_0x3c884c+_0x4a82ed,'caps':this['_caps'](_0x235021,_0x40d01e),'lifecycle':{'state':_0x2c7b5d(0x253),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x40d01e['processors']?this[_0x2c7b5d(0x275)]():null,'engines':_0x40d01e['engines']?[...this['okdb'][_0x2c7b5d(0x27d)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x2c7b5d(0x12e)](),'writers':this[_0x2c7b5d(0x2c8)]()};}[_0x411a96(0x2c8)](){const _0x5db1e5=_0x411a96,_0x1ae1a2={};try{for(const [_0x25162d,_0x59ca1d]of this[_0x5db1e5(0x21b)]['_envs']){try{const _0x28b276=_0x59ca1d[_0x5db1e5(0x132)]?.();if(!_0x28b276)continue;if(!_0x28b276[_0x5db1e5(0x20f)]&&!_0x28b276[_0x5db1e5(0xf7)]&&!(_0x28b276[_0x5db1e5(0x2b0)]??0x0)&&!_0x28b276[_0x5db1e5(0xd7)])continue;_0x1ae1a2[_0x25162d]={'depth':_0x28b276[_0x5db1e5(0x20f)],'oldestPendingMs':_0x28b276[_0x5db1e5(0xea)],'committed':_0x28b276[_0x5db1e5(0xf7)],'commitsPerSec':_0x28b276[_0x5db1e5(0x239)],'commitP99Ms':_0x28b276[_0x5db1e5(0x1dd)],'parkedNow':_0x28b276[_0x5db1e5(0x2b0)]??0x0,'draining':!!_0x28b276[_0x5db1e5(0xd7)]};}catch{}}}catch{}return Object['keys'](_0x1ae1a2)[_0x5db1e5(0x1fd)]?_0x1ae1a2:null;}[_0x411a96(0xcb)](){const _0x432b4c=_0x411a96,_0x69fef3=process[_0x432b4c(0x1f8)],_0x2dfa64=Date[_0x432b4c(0x2b2)](),_0x2697d7=_0x51390c=>{const _0x2045c2=_0x432b4c;if(!_0x51390c)return[];const _0x488ff8=[];try{for(const {id:_0x5a07d7,entry:_0x95a538}of _0x51390c['list']()){if(_0x95a538?.['holder']?.[_0x2045c2(0x1f8)]!==_0x69fef3)continue;const _0x2b17cc=_0x95a538[_0x2045c2(0xe4)]??_0x95a538[_0x2045c2(0x1de)]??0x0;if(_0x2b17cc+(_0x95a538[_0x2045c2(0x204)]??0x0)<_0x2dfa64)continue;_0x488ff8[_0x2045c2(0x1d8)](_0x5a07d7);}}catch{}return _0x488ff8;},_0x20ce70=_0x2697d7(this[_0x432b4c(0x2a6)]('compact')),_0x3a16ce=_0x2697d7(this[_0x432b4c(0x2a6)]('sync'));if(!_0x20ce70[_0x432b4c(0x1fd)]&&!_0x3a16ce[_0x432b4c(0x1fd)])return null;return{'compact':_0x20ce70,'replicate':_0x3a16ce};}[_0x411a96(0x2a6)](_0x58c86a){const _0x193b63=_0x411a96;if(!this[_0x193b63(0x21b)]?.[_0x193b63(0xdf)])return null;if(!this[_0x193b63(0xbd)])this[_0x193b63(0xbd)]=new Map();let _0x10776b=this[_0x193b63(0xbd)][_0x193b63(0x18a)](_0x58c86a);if(!_0x10776b)try{_0x10776b=new _0x3e05c0(this['okdb'][_0x193b63(0xdf)],{'namespace':_0x58c86a}),this['_singletonLocks'][_0x193b63(0x2a9)](_0x58c86a,_0x10776b);}catch{return null;}return _0x10776b;}[_0x411a96(0x275)](){const _0x422d49=_0x411a96,_0x38b516=[];try{for(const [_0x351142,_0x40079b]of this[_0x422d49(0x21b)][_0x422d49(0x198)]){if(_0x351142[_0x422d49(0x27c)]('~'))continue;for(const _0x21c683 of _0x40079b['processor'][_0x422d49(0x27e)]())_0x38b516['push']({..._0x21c683,'env':_0x351142});}}catch{}return{'participate':this[_0x422d49(0x21b)][_0x422d49(0x1cf)]?.[_0x422d49(0x240)]??![],'processors':_0x38b516};}[_0x411a96(0xf9)](){const _0x25f48e=_0x411a96;if(this[_0x25f48e(0x169)])return!![];const _0x1aac2e=this[_0x25f48e(0x21b)][_0x25f48e(0xdf)];if(!_0x1aac2e)return![];return this['_desired']=_0x1aac2e[_0x25f48e(0x2b7)](_0x501355,{'dupSort':![]}),this[_0x25f48e(0x117)]=_0x1aac2e['openDB'](_0x135f8b,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x332ff5=_0x411a96;if(!this[_0x332ff5(0xf9)]())return;const _0x1650fc=_0x332ff5(0x201),_0xa6170=0x1,_0x2f3113=this[_0x332ff5(0x169)][_0x332ff5(0x18a)](_0x1650fc)??0x0;if(_0x2f3113>=_0xa6170)return;const _0x31a05d=_0x53b6eb=>{const _0x2d9187=_0x332ff5;if(_0x53b6eb===_0x2d9187(0x2c4))return'single';if(_0x53b6eb===_0x2d9187(0x2e0))return _0x2d9187(0x127);return _0x53b6eb;};await this[_0x332ff5(0x21b)][_0x332ff5(0x10a)]['_writer']['transaction'](()=>{const _0x1e8063=_0x332ff5;for(const _0xfe2d7a of[_0x1e8063(0xe3),_0x1e8063(0x1ff)]){for(const {key:_0x25bc49,value:_0x281e91}of this[_0x1e8063(0x169)]['getRange']({'start':_0xfe2d7a,'end':_0xfe2d7a+'\xff'})){if(typeof _0x25bc49!=='string'||!_0x25bc49['startsWith'](_0xfe2d7a))break;const _0x169ed6=_0x31a05d(_0x281e91[_0x1e8063(0x19e)]);if(_0x169ed6!==_0x281e91[_0x1e8063(0x19e)])this[_0x1e8063(0x169)][_0x1e8063(0x29d)](_0x25bc49,{..._0x281e91,'mode':_0x169ed6});}}this['_desired'][_0x1e8063(0x29d)](_0x1650fc,_0xa6170);});}[_0x411a96(0x1a4)](){const _0x46605b=_0x411a96;return!!this[_0x46605b(0x169)];}[_0x411a96(0x1e4)](_0x13fd8a,_0x46f09e){const _0x492be1=_0x411a96;if(!this['_ensureDesired']())return null;const _0x319767=_0x13fd8a+'/'+_0x46f09e;return this[_0x492be1(0x192)](),this[_0x492be1(0x178)][_0x492be1(0x18a)](_0x319767)??this[_0x492be1(0x169)]['get'](_0x319767)??null;}[_0x411a96(0x192)](){const _0x409b08=_0x411a96;if(!_0x513ac4)return;try{this[_0x409b08(0x21b)][_0x409b08(0x10a)]?.['db']?.[_0x409b08(0x130)]?.();}catch{}}async[_0x411a96(0x181)](_0x4d2986,_0x450c08,_0x4d5ff0){const _0x4405e9=_0x411a96;if(!this[_0x4405e9(0xf9)]())return null;const _0x58f770=_0x4d2986+'/'+_0x450c08;this[_0x4405e9(0x192)]();const _0x403393=this[_0x4405e9(0x178)]['get'](_0x58f770)??this[_0x4405e9(0x169)][_0x4405e9(0x18a)](_0x58f770)??{'version':0x0},_0x38ce81=(_0x403393[_0x4405e9(0x2e4)]||0x0)+0x1,_0x2fbfd8={..._0x403393,..._0x4d5ff0,'version':_0x38ce81,'updatedAt':Date['now']()};this[_0x4405e9(0x178)]['set'](_0x58f770,_0x2fbfd8);try{await this[_0x4405e9(0x21b)][_0x4405e9(0x10a)][_0x4405e9(0x215)]['transaction'](()=>{const _0x15dc36=_0x4405e9;this[_0x15dc36(0x169)][_0x15dc36(0x29d)](_0x58f770,_0x2fbfd8);});}finally{if(this[_0x4405e9(0x178)][_0x4405e9(0x18a)](_0x58f770)===_0x2fbfd8)this[_0x4405e9(0x178)][_0x4405e9(0x2d4)](_0x58f770);}return _0x38ce81;}['listDesired'](_0x47365e){const _0x2d1af4=_0x411a96;if(!this[_0x2d1af4(0xf9)]())return[];this[_0x2d1af4(0x192)]();const _0x2f34d5=_0x47365e+'/',_0x23b6ef=[];for(const {key:_0x50763e,value:_0x24edb9}of this[_0x2d1af4(0x169)][_0x2d1af4(0x18e)]({'start':_0x2f34d5,'end':_0x2f34d5+'\xff'})){if(typeof _0x50763e!==_0x2d1af4(0x208)||!_0x50763e[_0x2d1af4(0x27c)](_0x2f34d5))break;_0x23b6ef[_0x2d1af4(0x1d8)]({'key':_0x50763e[_0x2d1af4(0x1cd)](_0x2f34d5[_0x2d1af4(0x1fd)]),'value':_0x24edb9});}return _0x23b6ef;}['getCmd'](_0x22c186){const _0x4d2093=_0x411a96;if(!this[_0x4d2093(0xf9)]())return null;return this[_0x4d2093(0x117)]['get'](_0x22c186)??null;}async[_0x411a96(0x266)](_0x1f89ad,_0x5245b7,_0x5db8e2={}){const _0x91f56f=_0x411a96;if(!this[_0x91f56f(0xf9)]())return null;let _0x22ceaf;return await this[_0x91f56f(0x21b)][_0x91f56f(0x10a)][_0x91f56f(0x215)]['transaction'](()=>{const _0x53c133=_0x91f56f,_0x3e44c4=this['_cmd'][_0x53c133(0x18a)](_0x1f89ad)||{'epoch':0x0};_0x22ceaf=(_0x3e44c4[_0x53c133(0x1cb)]||0x0)+0x1,this[_0x53c133(0x117)]['put'](_0x1f89ad,{..._0x3e44c4,..._0x5db8e2,'cmd':_0x5245b7,'epoch':_0x22ceaf,'updatedAt':Date[_0x53c133(0x2b2)]()});}),_0x22ceaf;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0xc9f7bb,'nodeKey':_0x3bbf19,'logicalKey':_0x1a3838,'slotKey':_0x3ff658,'PROCESS_ENV':_0x5c9a2d,'NODE_TYPE':_0x31be89},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x3d0b4c=_0x16770f;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x13e328=require$$0$4,{EVENTS:_0x56621b,CHANGE_ACTIONS:_0x2d2fbb}=requireOkdbEnums(),{LOOP:_0x599681}=requireOkdbLoopMonitor(),_0x569f10=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x2ec4bb=0x5,_0x44f5a4=0x2710;class _0x3d79ad extends _0x13e328{constructor(_0x5dfcc4,_0x10b650={}){const _0x7a04b5=_0x39f1;super(),this[_0x7a04b5(0x21b)]=_0x5dfcc4,this['_quantum']=_0x10b650['quantum']??_0x569f10,this['_flushDebounce']=_0x10b650[_0x7a04b5(0x223)]??_0x2ec4bb,this['_dedupeMax']=_0x10b650['dedupeMax']??_0x44f5a4,this[_0x7a04b5(0x1aa)]=![],this[_0x7a04b5(0x1f9)]=new Map(),this['_baselines']=new Map(),this[_0x7a04b5(0x2e2)]=new Map(),this['_flushTimer']=null,this[_0x7a04b5(0x196)]=![],this[_0x7a04b5(0x250)]=new Set(),this[_0x7a04b5(0x155)]=_0x45e288=>this['_handleInProcess'](_0x45e288),this[_0x7a04b5(0x11c)]=_0x2b7007=>this[_0x7a04b5(0x126)](_0x2b7007),this[_0x7a04b5(0x2f1)]=()=>this[_0x7a04b5(0x27a)]();}[_0x3d0b4c(0x2d5)](){const _0x9e2974=_0x3d0b4c;if(this[_0x9e2974(0x1aa)])return;this[_0x9e2974(0x1aa)]=!![];for(const [_0x517b5e,_0x58e738]of this[_0x9e2974(0x21b)]['_envs']){if(_0x517b5e[_0x9e2974(0x27c)]('~'))continue;try{_0x58e738[_0x9e2974(0x220)]();}catch{}}for(const [_0x562d39,_0x30541f]of this[_0x9e2974(0x21b)][_0x9e2974(0x198)]){if(_0x562d39[_0x9e2974(0x27c)]('~'))continue;try{this['_baselines'][_0x9e2974(0x2a9)](_0x562d39,_0x30541f['getClock']()||0x0);}catch{}}const {events:_0x52011d}=this[_0x9e2974(0x21b)];_0x52011d['on'](_0x56621b['ITEM_CREATE'],this[_0x9e2974(0x155)]),_0x52011d['on'](_0x56621b['ITEM_UPDATE'],this[_0x9e2974(0x155)]),_0x52011d['on'](_0x56621b[_0x9e2974(0xbb)],this['_onItem']),_0x52011d['on'](_0x56621b[_0x9e2974(0x125)],this[_0x9e2974(0x11c)]),_0x52011d['once'](_0x56621b[_0x9e2974(0x289)],this[_0x9e2974(0x2f1)]);}[_0x3d0b4c(0x27a)](){const _0x5ead43=_0x3d0b4c;if(!this[_0x5ead43(0x1aa)])return;this['_started']=![];const {events:_0x304c6e}=this[_0x5ead43(0x21b)];_0x304c6e['off'](_0x56621b[_0x5ead43(0x2b9)],this['_onItem']),_0x304c6e[_0x5ead43(0x26b)](_0x56621b['ITEM_UPDATE'],this[_0x5ead43(0x155)]),_0x304c6e[_0x5ead43(0x26b)](_0x56621b[_0x5ead43(0xbb)],this[_0x5ead43(0x155)]),_0x304c6e[_0x5ead43(0x26b)](_0x56621b['SYSTEM_POKE'],this[_0x5ead43(0x11c)]);try{_0x304c6e[_0x5ead43(0x26b)](_0x56621b['SYSTEM_STOPPED'],this[_0x5ead43(0x2f1)]);}catch{}this[_0x5ead43(0x2df)]&&(clearTimeout(this[_0x5ead43(0x2df)]),this['_flushTimer']=null),this[_0x5ead43(0x2e2)]['clear'](),this[_0x5ead43(0x1f9)][_0x5ead43(0x156)](),this[_0x5ead43(0x2ec)]['clear'](),this[_0x5ead43(0x250)][_0x5ead43(0x156)]();}[_0x3d0b4c(0x2d2)](_0x1754bc,_0x126960,_0x3e8109,_0x32f277){return _0x1754bc+'\x00'+_0x126960+'\x00'+_0x3e8109+'\x00'+_0x32f277;}[_0x3d0b4c(0x211)](_0x271dbf,_0x101aa0,_0xa5df1b,_0x596990){const _0x34a76f=_0x3d0b4c,_0x2d5eb4=this['_dedupeKey'](_0x271dbf,_0x101aa0,_0xa5df1b,_0x596990);if(this[_0x34a76f(0x250)][_0x34a76f(0xc0)](_0x2d5eb4))return![];this[_0x34a76f(0x250)][_0x34a76f(0x216)](_0x2d5eb4);if(this[_0x34a76f(0x250)][_0x34a76f(0xf8)]>this[_0x34a76f(0xe5)]){const _0x41151d=this['_seen'][_0x34a76f(0xd8)]()[_0x34a76f(0x270)]()[_0x34a76f(0x296)];this[_0x34a76f(0x250)]['delete'](_0x41151d);}return!![];}[_0x3d0b4c(0x237)](_0x565420){const _0x1f5b42=_0x3d0b4c;if(!this[_0x1f5b42(0x1aa)]||!_0x565420)return;const {env:_0x54168d,type:_0x2b3724,key:_0x4608a5,clock:_0xd01ac,origin:_0x2918b7,action:_0x489a36,newValue:_0x25bbef,oldValue:_0x3c50b4}=_0x565420;if(_0x54168d==null||_0x2b3724==null||_0x4608a5==null)return;if(typeof _0x54168d===_0x1f5b42(0x208)&&_0x54168d[_0x1f5b42(0x27c)]('~'))return;if(typeof _0x2b3724===_0x1f5b42(0x208)&&_0x2b3724[_0x1f5b42(0x27c)]('~'))return;if(!this[_0x1f5b42(0x211)](_0x54168d,_0x2b3724,_0x4608a5,_0xd01ac))return;const _0x3649c2=_0x489a36===_0x2d2fbb[_0x1f5b42(0x116)]?_0x1f5b42(0x1a9):'put';this[_0x1f5b42(0x221)](_0x1f5b42(0xc3),{'env':_0x54168d,'type':_0x2b3724,'key':_0x4608a5,'op':_0x3649c2,'clock':_0xd01ac,'origin':_0x2918b7,'value':_0x3649c2===_0x1f5b42(0x1a9)?null:_0x25bbef,'prevValue':_0x3c50b4});}[_0x3d0b4c(0x126)](_0x3018e1){const _0x87ab6f=_0x3d0b4c;if(!this[_0x87ab6f(0x1aa)])return;if(!_0x3018e1||typeof _0x3018e1[_0x87ab6f(0x1bd)]!=='string'||typeof _0x3018e1['type']!==_0x87ab6f(0x208))return;const {env:_0x5d8893,type:_0x51695f}=_0x3018e1;if(_0x5d8893[_0x87ab6f(0x27c)]('~')||_0x51695f[_0x87ab6f(0x27c)]('~'))return;this[_0x87ab6f(0x2e2)][_0x87ab6f(0x2a9)](_0x5d8893+'\x00'+_0x51695f,{'env':_0x5d8893,'type':_0x51695f}),this[_0x87ab6f(0x19a)]();}[_0x3d0b4c(0x19a)](){const _0x200c8b=_0x3d0b4c;if(this[_0x200c8b(0x2df)])return;const _0x218188=()=>{const _0x281174=_0x200c8b;this['_flushTimer']=null,this[_0x281174(0x20c)]()[_0x281174(0x149)](()=>{});};this[_0x200c8b(0x2df)]=setTimeout(_0x218188,this[_0x200c8b(0x294)]>0x0?this[_0x200c8b(0x294)]:0x0);}async[_0x3d0b4c(0x20c)](){const _0x2a986e=_0x3d0b4c;if(this[_0x2a986e(0x196)]){this[_0x2a986e(0x19a)]();return;}this[_0x2a986e(0x196)]=!![];try{const _0x24f5b4=[...this['_pending'][_0x2a986e(0xd8)]()];this[_0x2a986e(0x2e2)][_0x2a986e(0x156)]();let _0x46dc4b=![];for(const {env:_0x16e590,type:_0x58f1ad}of _0x24f5b4){try{const _0x419774=await this['_drainOne'](_0x16e590,_0x58f1ad);if(_0x419774)_0x46dc4b=!![];}catch{this[_0x2a986e(0x2e2)][_0x2a986e(0x2a9)](_0x16e590+'\x00'+_0x58f1ad,{'env':_0x16e590,'type':_0x58f1ad}),_0x46dc4b=!![];}}if(_0x46dc4b||this[_0x2a986e(0x2e2)][_0x2a986e(0xf8)]>0x0)this[_0x2a986e(0x19a)]();}finally{this[_0x2a986e(0x196)]=![];}}async[_0x3d0b4c(0x2ee)](_0x124664,_0x214af8){const _0x4751a7=_0x3d0b4c,_0x47ab05=await this['okdb'][_0x4751a7(0x26a)](_0x124664),_0x5a81d5=_0x124664+'\x00'+_0x214af8;!this['_cursors'][_0x4751a7(0xc0)](_0x5a81d5)&&(!this['_baselines'][_0x4751a7(0xc0)](_0x124664)&&(_0x47ab05['_enableChangelog'](),this['_baselines'][_0x4751a7(0x2a9)](_0x124664,_0x47ab05[_0x4751a7(0x222)]()||0x0)),this[_0x4751a7(0x1f9)][_0x4751a7(0x2a9)](_0x5a81d5,this[_0x4751a7(0x2ec)][_0x4751a7(0x18a)](_0x124664)));const _0x384f7c=this['_cursors']['get'](_0x5a81d5),_0xe2aa23=_0x47ab05['getClock'](_0x214af8)||0x0;if(_0xe2aa23<=_0x384f7c)return![];const _0x1de358=_0x384f7c+this['_quantum'],_0x3385dc=Math[_0x4751a7(0x251)](_0xe2aa23,_0x1de358),_0x5b8d7c=_0x599681['enabled']?_0x599681[_0x4751a7(0x2b2)]():0x0,_0x2f9b25=Array[_0x4751a7(0x284)](_0x47ab05[_0x4751a7(0x175)](_0x214af8,_0x384f7c+0x1,_0x3385dc));let _0x4fd375=_0x384f7c;for(const _0x29d8d4 of _0x2f9b25){const {clock:_0x1f39d1,key:_0x2c28fe,action:_0x55b611,origin:_0x3c8450}=_0x29d8d4;if(_0x1f39d1>_0x4fd375)_0x4fd375=_0x1f39d1;if(_0x2c28fe==null)continue;if(!this['_markSeen'](_0x124664,_0x214af8,_0x2c28fe,_0x1f39d1))continue;let _0xbb457b,_0x10250e;if(_0x55b611===_0x2d2fbb[_0x4751a7(0x116)])_0xbb457b=_0x4751a7(0x1a9),_0x10250e=null;else{const _0xedeb44=_0x47ab05[_0x4751a7(0x18a)](_0x214af8,_0x2c28fe);_0xedeb44==null?(_0xbb457b=_0x4751a7(0x1a9),_0x10250e=null):(_0xbb457b=_0x4751a7(0x29d),_0x10250e=_0xedeb44);}this[_0x4751a7(0x221)]('change',{'env':_0x124664,'type':_0x214af8,'key':_0x2c28fe,'op':_0xbb457b,'clock':_0x1f39d1,'origin':_0x3c8450,'value':_0x10250e});}if(_0x599681[_0x4751a7(0x109)])_0x599681[_0x4751a7(0x218)]('feed:'+_0x124664+':'+_0x214af8,_0x599681['now']()-_0x5b8d7c,'n='+_0x2f9b25[_0x4751a7(0x1fd)]);return this[_0x4751a7(0x1f9)][_0x4751a7(0x2a9)](_0x5a81d5,Math[_0x4751a7(0x1ca)](_0x4fd375,_0x3385dc)),_0x47ab05[_0x4751a7(0x222)](_0x214af8)>_0x3385dc;}[_0x3d0b4c(0x1f2)](){const _0x5c1266=_0x3d0b4c;return{'started':this[_0x5c1266(0x1aa)],'quantum':this[_0x5c1266(0xbc)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x5c1266(0x21c)]([...this[_0x5c1266(0x1f9)][_0x5c1266(0x265)]()][_0x5c1266(0x226)](([_0x17b893,_0x13611b])=>[_0x17b893[_0x5c1266(0x2f4)]('\x00',':'),_0x13611b])),'pending':this['_pending'][_0x5c1266(0xf8)],'seen':this[_0x5c1266(0x250)]['size']};}}return _0x3d79ad[_0x3d0b4c(0x107)]=_0x569f10,okdbChangefeed={'OKDBChangefeed':_0x3d79ad},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3e401b=_0x16770f;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x33ca2c=require$$1$1,_0x15a9cd=require$$1,{EVENTS:_0x52061c}=requireOkdbEnums(),_0x45099b=require$$0$3,{slotKey:_0x23c889}=requireOkdbProcessRegistry(),_0x568931=0xfa,_0x4a25aa=0xfa0,_0x1639e8=0x5,_0x460810=0x2710,_0x2b8e2f=0xbb8,_0x446f57=0x7d0,_0x3ba52e=_0x3e401b(0x134),_0x15c17b=_0x3e401b(0x1c2),_0x1b9a5a=_0x3e401b(0x21d),_0x4188f3=_0x3e401b(0x17f),_0x26a1b9=[_0x52061c[_0x3e401b(0x154)],_0x52061c[_0x3e401b(0xc6)],_0x52061c[_0x3e401b(0x152)],_0x52061c[_0x3e401b(0x238)],_0x52061c[_0x3e401b(0x190)],_0x52061c[_0x3e401b(0x119)],_0x52061c['INDEX_RESET'],_0x52061c[_0x3e401b(0x2cd)],_0x3e401b(0x23f),_0x3e401b(0x14c),_0x3e401b(0x18c),_0x3e401b(0x23c),_0x3e401b(0xf4),_0x3e401b(0x1ef)],_0xa7634a=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x22c9af({workers:_0x267b8b,makeOkdb:_0x3cc1e1,port:_0x28c3e3,primaryOkdb:_0x2335ab,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x4ca2a0=_0x3e401b;if(_0x33ca2c[_0x4ca2a0(0x232)])return childEntry&&_0x33ca2c[_0x4ca2a0(0xcd)]({'exec':_0x15a9cd[_0x4ca2a0(0x1fe)](__dirname,_0x4ca2a0(0x2ba)),'args':[],'execArgv':((()=>{const _0x4f52ad=_0x4ca2a0,_0xf53af8=[];for(let _0x2e4a1f=0x0;_0x2e4a1f<process[_0x4f52ad(0x113)][_0x4f52ad(0x1fd)];_0x2e4a1f++){const _0x24702a=process[_0x4f52ad(0x113)][_0x2e4a1f];if(_0x24702a[_0x4f52ad(0x27c)]('--test')||_0x24702a[_0x4f52ad(0x27c)](_0x4f52ad(0xb8))||_0x24702a[_0x4f52ad(0x27c)](_0x4f52ad(0x110)))continue;if(_0x24702a==='-e'||_0x24702a===_0x4f52ad(0x28b)||_0x24702a==='-p'||_0x24702a===_0x4f52ad(0x1b9)){_0x2e4a1f++;continue;}_0xf53af8[_0x4f52ad(0x1d8)](_0x24702a);}return _0xf53af8;})())}),_0x371787({'workers':_0x267b8b,'port':_0x28c3e3,'primaryOkdb':_0x2335ab,'workerEnv':workerEnv});return _0x604336({'makeOkdb':_0x3cc1e1,'port':_0x28c3e3});}function _0x371787({workers:_0x29f797,port:_0x4938ff,primaryOkdb:_0x365ac0,workerEnv:_0x4e5254}){const _0x53a1a7=_0x3e401b,_0x560640=new Map(),_0x147f76=new Map();let _0x5a8bac=![];const _0x4b99ad=_0x6029cc=>_0x6029cc?.['__okdbSlot'],_0x5a8310=_0x5aa871=>{const _0x56400e=_0x39f1,_0x145793=_0x33ca2c[_0x56400e(0x133)]({...process.env,..._0x4e5254||{},'OKDB_CLUSTER_SLOT':String(_0x5aa871)});return _0x145793['__okdbSlot']=_0x5aa871,_0x560640[_0x56400e(0x2a9)](_0x145793[_0x56400e(0x214)][_0x56400e(0x1f8)],{'worker':_0x145793,'startedAt':Date[_0x56400e(0x2b2)](),'slot':_0x5aa871}),_0x145793['on']('error',_0x2dfade=>{const _0x5b019f=_0x56400e;console[_0x5b019f(0x21d)](_0x5b019f(0x144)+_0x145793[_0x5b019f(0x214)][_0x5b019f(0x1f8)]+_0x5b019f(0x26d)+(_0x2dfade?.[_0x5b019f(0x276)]??_0x2dfade));}),_0x145793['on'](_0x56400e(0x135),()=>_0x1ac64c()),_0x145793;},_0x2276a7=_0x27ea01=>{const _0x18603e=_0x39f1;for(const {worker:_0x1c631a}of _0x560640['values']()){if(_0x1c631a[_0x18603e(0x1e0)]()||!_0x1c631a[_0x18603e(0x244)]())continue;try{_0x1c631a[_0x18603e(0x29c)](_0x27ea01);}catch{}}};_0x365ac0?.['_activateProcesses']?.({'kind':_0x53a1a7(0x200),'listenAddr':':'+_0x4938ff})[_0x53a1a7(0x149)](()=>{}),_0x365ac0?.[_0x53a1a7(0x1eb)]?.['setOwnMeta']?.({'workersConfigured':_0x29f797});const _0x482808={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x1ac64c=()=>{const _0x423d58=_0x53a1a7,_0x46e0f1=_0x365ac0?.['processes'];if(!_0x46e0f1||!_0x46e0f1['_isWriter'])return;const _0x56d7d8=_0x46e0f1[_0x423d58(0x141)];for(const {worker:_0x365361,startedAt:_0x48cdaa,slot:_0x2a9244,stats:_0x151b96,processing:_0xfe918f}of _0x560640['values']()){if(_0x365361['isDead']())continue;const _0x39d145=_0x46e0f1[_0x423d58(0x1a4)]?.()&&_0x46e0f1['getDesired']('slot',_0x129062(_0x2a9244))?.[_0x423d58(0x24c)]===!![];_0x46e0f1[_0x423d58(0x1c8)]({'pid':_0x365361[_0x423d58(0x214)][_0x423d58(0x1f8)],'startedAt':_0x48cdaa,'kind':_0x423d58(0x145),'supervisorKey':_0x56d7d8,'slot':_0x2a9244,'slotKey':_0x129062(_0x2a9244),'role':_0x482808,'listenAddr':':'+_0x4938ff,'lifecycle':_0x39d145?_0x423d58(0x168):_0x423d58(0x253),'processing':_0xfe918f??null,'stats':_0x151b96??null})[_0x423d58(0x149)](()=>{});}},_0x129062=_0x53ed27=>_0x23c889(_0x53a1a7(0x179)+_0x4938ff,_0x53ed27),_0x4b9256=_0x49800d=>{const _0x6c8a39=_0x53a1a7,_0x59fde4=_0x365ac0?.[_0x6c8a39(0x1eb)];if(!_0x59fde4?.[_0x6c8a39(0x1a4)]?.())return![];return _0x59fde4['getDesired'](_0x6c8a39(0x236),_0x129062(_0x49800d))?.[_0x6c8a39(0x24c)]===!![];};for(let _0x50092d=0x0;_0x50092d<_0x29f797;_0x50092d++){const _0x5b548c=_0x4b9256(_0x50092d);_0x147f76[_0x53a1a7(0x2a9)](_0x50092d,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x5b548c,'respawnTimer':null}),_0x5b548c?console[_0x53a1a7(0x21d)]('[okdb-cluster]\x20slot='+_0x50092d+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x5a8310(_0x50092d);}const _0x1cc9e3=()=>{const _0x4a9024=_0x53a1a7,_0x456524=_0x365ac0?.['processes'];if(!_0x456524?.[_0x4a9024(0x298)]||!_0x456524[_0x4a9024(0x1a4)]?.())return;for(const [_0x53c8e8,_0x1a1882]of _0x147f76[_0x4a9024(0x265)]()){const _0x5a8975=_0x456524[_0x4a9024(0x1e4)]('slot',_0x129062(_0x53c8e8)),_0x556750=_0x5a8975?.[_0x4a9024(0x24c)]===!![],_0x441b56=_0x5a8975?.[_0x4a9024(0xc7)]===!![];if(_0x556750&&!_0x1a1882[_0x4a9024(0x186)]){_0x1a1882[_0x4a9024(0x186)]=!![];_0x1a1882[_0x4a9024(0x20a)]&&(clearTimeout(_0x1a1882[_0x4a9024(0x20a)]),_0x1a1882[_0x4a9024(0x20a)]=null);for(const {worker:_0x4711bb}of _0x560640[_0x4a9024(0xd8)]()){if(_0x4b99ad(_0x4711bb)!==_0x53c8e8||_0x4711bb[_0x4a9024(0x1e0)]())continue;try{if(_0x441b56)_0x4711bb[_0x4a9024(0x214)][_0x4a9024(0xc7)](_0x4a9024(0x241));else _0x4711bb[_0x4a9024(0x244)]()&&_0x4711bb[_0x4a9024(0x18b)]();}catch{}}console[_0x4a9024(0x21d)](_0x4a9024(0x22d)+(_0x441b56?_0x4a9024(0x262):_0x4a9024(0x1fc))+_0x4a9024(0x263)+_0x53c8e8+_0x4a9024(0x16b));}else{if(!_0x556750&&_0x1a1882[_0x4a9024(0x186)]&&_0x5a8975){_0x1a1882[_0x4a9024(0x186)]=![],_0x1a1882[_0x4a9024(0x287)]=[],_0x1a1882['consecutiveFailures']=0x0;const _0x553c79=[..._0x560640['values']()][_0x4a9024(0x157)](({worker:_0x5b82fd})=>_0x4b99ad(_0x5b82fd)===_0x53c8e8&&!_0x5b82fd[_0x4a9024(0x1e0)]());!_0x553c79&&!_0x5a8bac&&(_0x5a8310(_0x53c8e8),console[_0x4a9024(0x21d)](_0x4a9024(0x138)+_0x53c8e8));}}}},_0xc8168e=()=>{try{_0x1cc9e3();}catch{}};_0x365ac0?.['events']?.['on']?.(_0x52061c[_0x53a1a7(0x16e)],_0xc8168e);const _0x3653e7=[];if(_0x365ac0?.['events']?.['on'])for(const _0x420eea of _0x26a1b9){const _0x58edd4=_0x29339a=>{_0x2276a7({[_0x3ba52e]:_0x15c17b,'event':_0x420eea,'data':_0x29339a??{}});};_0x365ac0[_0x53a1a7(0x2ab)]['on'](_0x420eea,_0x58edd4),_0x3653e7[_0x53a1a7(0x1d8)]({'event':_0x420eea,'handler':_0x58edd4});}const _0x4f2107=setInterval(()=>{_0x1cc9e3(),_0x1ac64c();},_0xa7634a);_0x4f2107['unref']?.();const _0x18d03c=(_0xab0a49,_0x213175)=>{const _0x1009c6=_0x53a1a7;if(!_0x213175||typeof _0x213175!==_0x1009c6(0x285)||_0x213175[_0x3ba52e]!==_0x1b9a5a)return;if(!_0x365ac0?.[_0x1009c6(0x21d)]?.['ingest'])return;const _0x142e27=_0x213175[_0x1009c6(0x2f0)]||{};_0x365ac0[_0x1009c6(0x21d)][_0x1009c6(0x1a2)]({..._0x142e27,'msg':'[w'+_0x213175[_0x1009c6(0x236)]+']\x20'+(_0x142e27['msg']??''),'meta':{..._0x142e27['meta']||{},'worker':_0x213175['slot'],'workerPid':_0x213175[_0x1009c6(0x1f8)]}});};_0x33ca2c['on']('message',_0x18d03c);const _0x32f0f5=(_0x527746,_0x3d30d2)=>{const _0x29fafd=_0x53a1a7;if(!_0x3d30d2||typeof _0x3d30d2!=='object'||_0x3d30d2[_0x3ba52e]!==_0x4188f3)return;const _0x4450ac=_0x560640[_0x29fafd(0x18a)](_0x527746[_0x29fafd(0x214)][_0x29fafd(0x1f8)]);if(_0x4450ac){_0x4450ac[_0x29fafd(0x17f)]={..._0x3d30d2['stats'],'at':Date['now']()};if(_0x3d30d2[_0x29fafd(0x245)]!==undefined)_0x4450ac[_0x29fafd(0x245)]=_0x3d30d2[_0x29fafd(0x245)];}};_0x33ca2c['on']('message',_0x32f0f5),_0x33ca2c['on'](_0x53a1a7(0xc1),(_0x308c32,_0xf8546d,_0x38765b)=>{const _0x5e4955=_0x53a1a7,_0x5011f2=_0x308c32[_0x5e4955(0x214)]['pid'],_0xd4c5b7=_0x4b99ad(_0x308c32),_0x32ba17=_0x560640[_0x5e4955(0x18a)](_0x5011f2);if(_0x32ba17&&_0x365ac0?.[_0x5e4955(0x1eb)])_0x365ac0['processes'][_0x5e4955(0x243)](_0x5011f2+':'+_0x32ba17[_0x5e4955(0x1d3)])[_0x5e4955(0x149)](()=>{});_0x560640[_0x5e4955(0x2d4)](_0x5011f2),console['log'](_0x5e4955(0x144)+_0x5011f2+_0x5e4955(0x1b0)+(_0xd4c5b7??'?')+_0x5e4955(0x11f)+(_0x5e4955(0x13a)+_0xf8546d+_0x5e4955(0x2e8)+(_0x38765b??_0x5e4955(0x1db))+_0x5e4955(0x170)+_0x560640[_0x5e4955(0xf8)]+_0x5e4955(0x20e))),_0x1ac64c();if(_0x5a8bac||_0xd4c5b7==null)return;const _0x253ed4=_0x147f76[_0x5e4955(0x18a)](_0xd4c5b7);if(!_0x253ed4||_0x253ed4[_0x5e4955(0x186)])return;const _0xd25ac7=Date['now']();_0x253ed4['deaths'][_0x5e4955(0x1d8)](_0xd25ac7),_0x253ed4[_0x5e4955(0x287)]=_0x253ed4[_0x5e4955(0x287)][_0x5e4955(0x2c0)](_0x11c14f=>_0xd25ac7-_0x11c14f<=_0x460810);if(_0x253ed4[_0x5e4955(0x287)][_0x5e4955(0x1fd)]>=_0x1639e8){_0x253ed4[_0x5e4955(0x186)]=!![],console['error'](_0x5e4955(0x26e)+_0xd4c5b7+'\x20died\x20'+_0x253ed4[_0x5e4955(0x287)][_0x5e4955(0x1fd)]+'\x20times\x20in\x20'+(_0x460810+_0x5e4955(0x1b4)+_0x560640[_0x5e4955(0xf8)]+'\x20worker(s)\x20still\x20serving'));return;}_0x253ed4[_0x5e4955(0xe7)]++;const _0x5a2a6a=Math[_0x5e4955(0x251)](_0x4a25aa,_0x568931*0x2**(_0x253ed4[_0x5e4955(0xe7)]-0x1));console['log']('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0xd4c5b7+_0x5e4955(0x25d)+_0x5a2a6a+_0x5e4955(0xd9)+_0x253ed4[_0x5e4955(0xe7)]+')'),_0x253ed4[_0x5e4955(0x20a)]=setTimeout(()=>{const _0xbcd11a=_0x5e4955;_0x253ed4[_0xbcd11a(0x20a)]=null;if(_0x5a8bac||_0x253ed4[_0xbcd11a(0x186)])return;const _0x3dcde2=_0x5a8310(_0xd4c5b7);_0x3dcde2[_0xbcd11a(0x1b5)](_0xbcd11a(0x288),()=>{const _0x15413b=_0xbcd11a;if(_0x147f76[_0x15413b(0x18a)](_0xd4c5b7)===_0x253ed4)_0x253ed4[_0x15413b(0xe7)]=0x0;});},_0x5a2a6a),_0x253ed4[_0x5e4955(0x20a)][_0x5e4955(0x205)]?.();});const _0x517c76=[..._0x560640[_0x53a1a7(0x1e9)]()];console[_0x53a1a7(0x21d)](_0x53a1a7(0x2b4)+process['pid']+_0x53a1a7(0x2a2)+_0x29f797+_0x53a1a7(0xed)+_0x4938ff+':\x20'+('['+_0x517c76[_0x53a1a7(0x1fe)](',\x20')+']'));const _0x27a7ff={'_isClusterController':!![],'port':_0x4938ff,'primaryOkdb':_0x365ac0??null,'status'(){const _0x52173e=_0x53a1a7;return{'clustered':!![],'primaryPid':process[_0x52173e(0x1f8)],'port':_0x4938ff,'primaryRole':_0x365ac0?.['role']??null,'processorPid':null,'supervisorPid':process[_0x52173e(0x1f8)],'workers':[..._0x560640[_0x52173e(0xd8)]()]['map'](({worker:_0x2d363a})=>({'pid':_0x2d363a[_0x52173e(0x214)][_0x52173e(0x1f8)],'id':_0x2d363a['id'],'dead':_0x2d363a['isDead']()}))};},async 'close'(){const _0x4854e6=_0x53a1a7;_0x5a8bac=!![];for(const _0x238d53 of _0x147f76[_0x4854e6(0xd8)]()){_0x238d53['dead']=!![],_0x238d53[_0x4854e6(0x20a)]&&(clearTimeout(_0x238d53[_0x4854e6(0x20a)]),_0x238d53[_0x4854e6(0x20a)]=null);}clearInterval(_0x4f2107),_0x33ca2c[_0x4854e6(0x26b)](_0x4854e6(0x276),_0x18d03c),_0x33ca2c[_0x4854e6(0x26b)](_0x4854e6(0x276),_0x32f0f5),_0x365ac0?.[_0x4854e6(0x2ab)]?.['off']?.(_0x52061c[_0x4854e6(0x16e)],_0xc8168e);if(_0x365ac0?.[_0x4854e6(0x2ab)]?.[_0x4854e6(0x26b)])for(const {event:_0x1d115e,handler:_0x5eb78e}of _0x3653e7){try{_0x365ac0[_0x4854e6(0x2ab)][_0x4854e6(0x26b)](_0x1d115e,_0x5eb78e);}catch{}}_0x3653e7[_0x4854e6(0x1fd)]=0x0;const _0x1f4c2b=[..._0x560640[_0x4854e6(0xd8)]()]['map'](({worker:_0x4a757f})=>_0x4a757f);if(_0x1f4c2b['length']===0x0)return;await Promise[_0x4854e6(0x228)](_0x1f4c2b[_0x4854e6(0x226)](_0x56b00d=>new Promise(_0x3236bf=>{const _0x16f37a=_0x4854e6;if(_0x56b00d[_0x16f37a(0x1e0)]()){_0x3236bf();return;}let _0x25cf15=![];const _0x22a760=()=>{if(_0x25cf15)return;_0x25cf15=!![];if(_0x36289f)clearTimeout(_0x36289f);_0x3236bf();};_0x56b00d[_0x16f37a(0x1b5)](_0x16f37a(0xc1),_0x22a760);const _0x36289f=setTimeout(()=>{const _0x1d30fe=_0x16f37a;try{_0x56b00d[_0x1d30fe(0x214)][_0x1d30fe(0xc7)]();}catch{}},_0x2b8e2f+0x1f4);_0x36289f[_0x16f37a(0x205)]?.();try{_0x56b00d[_0x16f37a(0x18b)]();}catch{try{_0x56b00d[_0x16f37a(0x214)][_0x16f37a(0xc7)]();}catch{}}})));}};return _0x27a7ff;}async function _0x604336({makeOkdb:_0xc85569,port:_0x4568a4}){const _0x4359e8=_0x3e401b,_0x25d0e9=await _0xc85569();return _0x3c8115(_0x25d0e9),_0x25d0e9[_0x4359e8(0x28f)][_0x4359e8(0x2b6)](_0x4568a4);}function _0x3c8115(_0x2daf){const _0x562408=_0x3e401b;if(!_0x2daf||_0x2daf['_clusterWorkerAttached'])return;_0x2daf['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x19e3f8}=requireOkdbChangefeed(),_0x492f45=_0x2daf[_0x562408(0xdc)];if(_0x492f45&&typeof _0x492f45['attachFeed']===_0x562408(0x136)){const _0x34b3fc=new _0x19e3f8(_0x2daf);_0x34b3fc[_0x562408(0x2d5)](),_0x492f45['attachFeed'](_0x34b3fc),_0x2daf[_0x562408(0x233)]=_0x34b3fc;}}catch(_0x3ad149){_0x2daf['log']?.[_0x562408(0x16f)]?.(_0x562408(0x101)+(_0x3ad149?.[_0x562408(0x276)]??_0x3ad149),{'feature':'cluster'});}const _0x1054be=_0x5e6489=>{const _0x8db363=_0x562408;if(!_0x5e6489||typeof _0x5e6489!=='object'||_0x5e6489[_0x3ba52e]==null)return;if(_0x5e6489[_0x3ba52e]===_0x15c17b)try{_0x2daf['_adminRelay']?.['pushEphemeral']?.(_0x5e6489[_0x8db363(0x20b)],_0x5e6489[_0x8db363(0x2dd)]);}catch{}};process['on'](_0x562408(0x276),_0x1054be),_0x2daf['_clusterOnMessage']=_0x1054be;{let _0x4a905f=process['cpuUsage'](),_0x68e45=Date[_0x562408(0x2b2)]();const _0x534b0a=()=>{const _0x869a62=_0x562408;if(typeof process[_0x869a62(0x29c)]!=='function'||!process[_0x869a62(0x147)])return;const _0x3e5b0b=Date['now'](),_0x46a264=process[_0x869a62(0x161)](),_0xa0c860=(_0x3e5b0b-_0x68e45)*0x3e8,_0x5906c1=_0x46a264[_0x869a62(0x2db)]-_0x4a905f['user']+(_0x46a264['system']-_0x4a905f[_0x869a62(0x1d1)]),_0x2beab0=_0xa0c860>0x0?Math[_0x869a62(0x251)](0x64,Math[_0x869a62(0x24a)](_0x5906c1/(_0xa0c860*(_0x45099b['cpus']()[_0x869a62(0x1fd)]||0x1))*0x64)):0x0;_0x4a905f=_0x46a264,_0x68e45=_0x3e5b0b;const _0x2cf200=process[_0x869a62(0xf5)]();let _0x2cd61e=null;try{_0x2cd61e=_0x2daf['role']?.[_0x869a62(0x1cf)]?_0x2daf['processes']?.['_buildProcessingFacet']?.()??null:null;}catch{}try{process[_0x869a62(0x29c)]({[_0x3ba52e]:_0x4188f3,'stats':{'rss':_0x2cf200[_0x869a62(0x24d)],'heapUsed':_0x2cf200['heapUsed'],'heapTotal':_0x2cf200[_0x869a62(0x14a)],'external':_0x2cf200[_0x869a62(0x2f5)],'cpuPct':_0x2beab0,'cpuWindowMs':Math['round'](_0xa0c860/0x3e8)||null},'processing':_0x2cd61e});}catch{}},_0xceccdf=Math[_0x562408(0x1ca)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x1c1d06=setInterval(_0x534b0a,_0xceccdf);_0x1c1d06[_0x562408(0x205)]?.(),_0x534b0a();for(const _0x274976 of[_0x562408(0x23c),_0x562408(0xf4)]){_0x2daf[_0x562408(0x2ab)]?.['on']?.(_0x274976,()=>{try{_0x534b0a();}catch{}});}}let _0xc3e6f6=![];const _0x4a322f=async _0x2b4eab=>{const _0xa1681c=_0x562408;if(_0xc3e6f6)return;_0xc3e6f6=!![];const _0xd4e0a9=setTimeout(()=>process['exit'](_0x2b4eab),_0x2b8e2f);_0xd4e0a9[_0xa1681c(0x205)]?.();try{await _0x2daf[_0xa1681c(0xca)]?.();}catch{}process[_0xa1681c(0xc1)](_0x2b4eab);};process['on'](_0x562408(0x18b),()=>_0x4a322f(0x0));if(process[_0x562408(0x281)]!==_0x562408(0x1fa)){const _0x38c2fd=setInterval(()=>{const _0x48fa51=_0x562408;if(process[_0x48fa51(0xf3)]===0x1)_0x4a322f(0x0);},_0x446f57);_0x38c2fd[_0x562408(0x205)]?.(),_0x2daf[_0x562408(0x12c)]=_0x38c2fd;}}return okdbCluster={'runClustered':_0x22c9af,'attachWorkerCluster':_0x3c8115},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x48afc9=require$$0$5,{attachWorkerCluster:_0x2bc94d}=requireOkdbCluster();async function _0x37ac21(){const _0x2d0cf5=_0x39f1,_0xd6c22d=process.env.OKDB_HTTP_CHILD;if(!_0xd6c22d)throw new Error(_0x2d0cf5(0x2a4));const {rootPath:_0x495030,port:_0x92bda3,options:options={},logLevel:logLevel=_0x2d0cf5(0x104)}=JSON[_0x2d0cf5(0x259)](_0xd6c22d);if(!_0x495030||!_0x92bda3)throw new Error(_0x2d0cf5(0x2b3));const _0x14bdc5=new _0x48afc9(_0x495030,{...options,'engines':![],'processors':![],'compaction':![]});_0x14bdc5[_0x2d0cf5(0x21d)]['detachConsole']?.();const _0x3fda55=process.env.OKDB_CLUSTER_SLOT??'?',_0x302e5d={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x2fc7b6=_0x302e5d[logLevel]??_0x302e5d['info'];_0x14bdc5['log']['attach'](_0x4f9f28=>{const _0x40f4a9=_0x2d0cf5;if((_0x302e5d[_0x4f9f28[_0x40f4a9(0x24e)]]??0x1)<_0x2fc7b6)return;try{process[_0x40f4a9(0x29c)]?.({'__okdbCluster':_0x40f4a9(0x21d),'slot':_0x3fda55,'pid':process['pid'],'entry':_0x4f9f28});}catch{}}),await _0x14bdc5[_0x2d0cf5(0x165)](),_0x2bc94d(_0x14bdc5),await _0x14bdc5[_0x2d0cf5(0x28f)][_0x2d0cf5(0x2b6)](_0x92bda3);}return _0x37ac21()['catch'](_0x5904f7=>{const _0x7b184b=_0x39f1;try{process[_0x7b184b(0x29c)]?.({'__okdbCluster':_0x7b184b(0x21d),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process['pid'],'entry':{'level':'error','msg':_0x7b184b(0xf0)+(_0x5904f7?.[_0x7b184b(0x276)]??_0x5904f7)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x420d66=_0x18d9;(function(_0x5774ef,_0x5dd19d){const _0x237a1c=_0x18d9,_0x4be78f=_0x5774ef();while(!![]){try{const _0x32a836=parseInt(_0x237a1c(0x1d0))/0x1*(parseInt(_0x237a1c(0x1ce))/0x2)+-parseInt(_0x237a1c(0x19b))/0x3+-parseInt(_0x237a1c(0x1cd))/0x4*(-parseInt(_0x237a1c(0x1a5))/0x5)+-parseInt(_0x237a1c(0x18e))/0x6*(parseInt(_0x237a1c(0x191))/0x7)+-parseInt(_0x237a1c(0x1aa))/0x8+parseInt(_0x237a1c(0x1c5))/0x9*(parseInt(_0x237a1c(0x1cf))/0xa)+parseInt(_0x237a1c(0x1d5))/0xb;if(_0x32a836===_0x5dd19d)break;else _0x4be78f['push'](_0x4be78f['shift']());}catch(_0x40ef41){_0x4be78f['push'](_0x4be78f['shift']());}}}(_0x364e,0x35f92));var require$$0=require(_0x420d66(0x1bc)),require$$1=require(_0x420d66(0x1a3));function getDefaultExportFromCjs(_0x2853fc){const _0x2f2a9e=_0x420d66;return _0x2853fc&&_0x2853fc[_0x2f2a9e(0x19a)]&&Object['prototype'][_0x2f2a9e(0x1b3)][_0x2f2a9e(0x18c)](_0x2853fc,_0x2f2a9e(0x1da))?_0x2853fc[_0x2f2a9e(0x1da)]:_0x2853fc;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x33d279=_0x420d66;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x35ff59={'PUT':_0x33d279(0x1be),'REMOVE':_0x33d279(0x1d7),'INDEX_DROP':_0x33d279(0x195),'INDEX_REGISTER':_0x33d279(0x188),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':_0x33d279(0x1b8),'FTS_REGISTER':'registerFts','FTS_DROP':_0x33d279(0x1a4),'FTS_RESET':'resetFts','SCHEMA_SET':_0x33d279(0x1a6),'SCHEMA_DROP':_0x33d279(0x1c4),'TTL_SET':_0x33d279(0x1b0),'TTL_CLEAR':_0x33d279(0x19e)},_0x56c581={'SYSTEM_READY':_0x33d279(0x19d),'FIELD_RESOLVER_REGISTERED':_0x33d279(0x1c3),'SYSTEM_STOPPED':_0x33d279(0x19c),'SYSTEM_CLOCK_CHANGE':_0x33d279(0x1c6),'SYSTEM_POKE':_0x33d279(0x1ae),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x33d279(0x1b1),'SYSTEM_PROC':_0x33d279(0x185),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x33d279(0x1bd),'ITEM_UPDATE':_0x33d279(0x1b9),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x33d279(0x190),'INDEX_READY':_0x33d279(0x1c8),'INDEX_PROGRESS':_0x33d279(0x1cc),'VIEW_PROGRESS':_0x33d279(0x198),'INDEX_DROP':_0x33d279(0x1d3),'INDEX_REGISTERED':_0x33d279(0x1d8),'FTS_REGISTERED':_0x33d279(0x1a2),'FTS_DROP':_0x33d279(0x1bf),'FTS_RESET':_0x33d279(0x18f),'SCHEMA_SET':_0x33d279(0x18d),'SCHEMA_DROP':_0x33d279(0x194),'UNIQUE_VIOLATION':_0x33d279(0x1a0),'UNIQUE_VIOLATION_RESOLVED':_0x33d279(0x199),'REF_VIOLATION':_0x33d279(0x1d2),'REF_VIOLATION_RESOLVED':_0x33d279(0x186),'SYNC_APPLY':'sync:apply','TXN_START':_0x33d279(0x196),'TXN_END':'txn:end','TXN_ROLLBACK':_0x33d279(0x19f),'TYPE_REGISTERED':_0x33d279(0x1cb),'TYPE_DROP':_0x33d279(0x1ab),'ENV_OPENED':_0x33d279(0x1c7),'ENV_REMOVED':_0x33d279(0x1bb),'SYSTEM_ENV_RELEASE':_0x33d279(0x1a9),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x33d279(0x1d6),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x33d279(0x1c1),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x33d279(0x1ca),'LICENSE_REMOVED':_0x33d279(0x1ac)},_0x2f66f2={'CREATING':'creating','RESETTING':_0x33d279(0x1c2),'READY':_0x33d279(0x1d9),'DROPPING':_0x33d279(0x1d1),'WAITING':'waiting','ERROR':_0x33d279(0x1dc)},_0x520816={'CREATED':_0x33d279(0x189),'STARTING':_0x33d279(0x1a7),'STARTED':_0x33d279(0x192),'STOPPING':_0x33d279(0x1a1),'STOPPED':_0x33d279(0x1b5)},_0x41da95={'CREATING':'creating','READY':_0x33d279(0x1d9),'HALTED':_0x33d279(0x1af),'STOPPED':_0x33d279(0x1b5),'RESETTING':_0x33d279(0x1c2)},_0xaa9f22=Object['freeze']({'POKE':_0x33d279(0x1b4),'DRAIN':_0x33d279(0x18a),'TYPE_DROP':'bus:type_drop','PROC':_0x33d279(0x1c9),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0xaa9f22,'CHANGE_ACTIONS':_0x35ff59,'EVENTS':_0x56c581,'INDEX_STATE':_0x2f66f2,'OKDB_STATE':_0x520816,'VIEW_STATE':_0x41da95},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function _0x18d9(_0x56902e,_0x3fbe52){_0x56902e=_0x56902e-0x185;const _0x364e90=_0x364e();let _0x18d947=_0x364e90[_0x56902e];return _0x18d947;}function requireOkdbViewsBootstrapWorker(){const _0xb7e479=_0x420d66;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x4af1aa,workerData:_0x4f52eb}=require$$0,_0xa73037=require$$1,{EVENTS:_0x195212}=requireOkdbEnums();async function _0x21f3f8(){const _0xd83ccc=_0x18d9,{rootPath:_0x53be5f,envName:_0x5874d8,viewName:_0x5e2d8c,definition:_0xeb2f93}=_0x4f52eb,_0x40f3ca=new _0xa73037(_0x53be5f,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x40f3ca['open']();const _0x936c45=_0x40f3ca[_0xd83ccc(0x1b2)](_0x5874d8);_0x936c45[_0xd83ccc(0x1ba)]['on'](_0x195212[_0xd83ccc(0x187)],_0x4a2801=>{const _0x52b3a5=_0xd83ccc;if(_0x4a2801?.[_0x52b3a5(0x1a8)]!==_0x5e2d8c)return;try{_0x4af1aa['postMessage']({'type':'progress','event':_0x4a2801});}catch{}}),await _0x936c45[_0xd83ccc(0x1ad)][_0xd83ccc(0x1db)](_0xeb2f93),await _0x936c45[_0xd83ccc(0x1ad)][_0xd83ccc(0x1b6)](_0x5e2d8c,_0xeb2f93),await _0x936c45[_0xd83ccc(0x1ad)]['_runBootstrapScanPhases'](_0x5e2d8c,_0xeb2f93),_0x4af1aa[_0xd83ccc(0x1b7)]({'type':'done'}),await _0x40f3ca['close'](),process['exit'](0x0);}return _0x21f3f8()[_0xb7e479(0x197)](_0x2aeff1=>{const _0x18ea7f=_0xb7e479;try{_0x4af1aa[_0x18ea7f(0x1b7)]({'type':_0x18ea7f(0x1dc),'error':_0x2aeff1[_0x18ea7f(0x18b)]??String(_0x2aeff1),'stack':_0x2aeff1[_0x18ea7f(0x1d4)]});}catch{}process[_0x18ea7f(0x1c0)](0x1);}),okdbViewsBootstrapWorker$1;}function _0x364e(){const _0x4e7182=['exit','license:invalid','resetting','field:resolver_registered','dropSchema','18XVnqcC','system:clock_change','env:opened','index:ready','bus:proc','license:activated','type:registered','index:progress','12184zIFNFs','9498HSQTsp','696530JmLXlz','2CaQcky','dropping','ref:violation','index:drop','stack','7795293scPXpA','ttl:set','remove','index:registered','ready','default','_prepareViewDict','error','system:proc','ref:violation_resolved','VIEW_PROGRESS','registerIndex','created','bus:drain','message','call','schema:set','432204SGGqEi','fts:reset','index:reset','28FXNXXe','started','exports','schema:drop','dropIndex','txn:start','catch','view:progress','unique:violation_resolved','__esModule','639447TnDZcs','system:stopped','system:ready','clearTtl','txn:rollback','unique:violation','stopping','fts:registered','./okdb','dropFts','355FmmPNx','setSchema','starting','name','system:env_release','2810992hdxkeL','type:drop','license:removed','views','system:poke','halted','setTtl','system:type_drop','env','hasOwnProperty','bus:poke','stopped','_activateViewStorage','postMessage','dropType','item:update','events','env:removed','worker_threads','item:create','put','fts:drop'];_0x364e=function(){return _0x4e7182;};return _0x364e();}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x420d66(0x193)]=okdbViewsBootstrapWorker;
|