@kedem/okdb 1.8.18 → 1.9.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.
Files changed (39) hide show
  1. package/bin/okdb.js +1 -1
  2. package/docs/change-log.md +16 -16
  3. package/docs/embeddings.md +1 -1
  4. package/docs/functions.md +26 -25
  5. package/docs/http-cluster.md +157 -0
  6. package/docs/index.md +1 -0
  7. package/docs/manifest.json +5 -1
  8. package/docs/process-registry.md +185 -0
  9. package/docs/processors.md +61 -65
  10. package/docs/queue.md +23 -13
  11. package/docs/subscriptions.md +230 -0
  12. package/docs/worker-fleet.md +139 -0
  13. package/okdb-functions-runner-child.js +1 -1
  14. package/okdb-functions-sandbox-worker.js +1 -0
  15. package/okdb-http-worker-child.js +1 -0
  16. package/okdb-queue-load-handler.js +1 -0
  17. package/okdb-queue-spawn-child.js +1 -1
  18. package/okdb-views-bootstrap-worker.js +1 -1
  19. package/okdb-worker-child.js +1 -0
  20. package/okdb.js +1 -1
  21. package/package.json +1 -1
  22. package/public/sections/db/parts/db-overview.ok.js +1 -1
  23. package/public/sections/embeddings/parts/pipeline-create-panel.ok.js +1 -1
  24. package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
  25. package/public/sections/system/index.ok.html +1 -1
  26. package/public/sections/system/modals/data-ops-modal.ok.js +1 -1
  27. package/public/sections/system/parts/system-process-panel.ok.js +1 -0
  28. package/public/sections/system/parts/system-processing-panel.ok.js +1 -0
  29. package/public/sections/system/parts/system-runtime-overview.ok.js +1 -0
  30. package/public/sections/system/parts/system-workers-panel.ok.js +1 -0
  31. package/types/environment.d.ts +21 -4
  32. package/types/features/embeddings.d.ts +11 -2
  33. package/types/features/queue.d.ts +27 -5
  34. package/types/features/views.d.ts +10 -10
  35. package/types/index.d.ts +54 -6
  36. package/types/options.d.ts +12 -0
  37. package/okdb-fts-handler.js +0 -1
  38. package/okdb-processor-worker.js +0 -1
  39. package/public/sections/processors/index.ok.html +0 -1
@@ -0,0 +1 @@
1
+ 'use strict';const _0x25047a=_0x423a;(function(_0x511dd8,_0x24c5b4){const _0x5b6006=_0x423a,_0x3e9f53=_0x511dd8();while(!![]){try{const _0x4c0b95=parseInt(_0x5b6006(0x2af))/0x1+parseInt(_0x5b6006(0x29a))/0x2+parseInt(_0x5b6006(0x2de))/0x3*(-parseInt(_0x5b6006(0x2ba))/0x4)+parseInt(_0x5b6006(0x24f))/0x5*(parseInt(_0x5b6006(0x29d))/0x6)+parseInt(_0x5b6006(0x2c1))/0x7+parseInt(_0x5b6006(0x1f9))/0x8*(-parseInt(_0x5b6006(0x302))/0x9)+-parseInt(_0x5b6006(0x26c))/0xa;if(_0x4c0b95===_0x24c5b4)break;else _0x3e9f53['push'](_0x3e9f53['shift']());}catch(_0x45c663){_0x3e9f53['push'](_0x3e9f53['shift']());}}}(_0x5cb1,0xaac51));var require$$0$3=require(_0x25047a(0x1dc)),require$$1=require(_0x25047a(0x1e5)),require$$1$1=require(_0x25047a(0x21d)),require$$0$1=require('os'),require$$2=require(_0x25047a(0x32b)),require$$0=require(_0x25047a(0x2a0)),require$$0$2=require(_0x25047a(0x363));function getDefaultExportFromCjs(_0xce993b){const _0x323c0e=_0x25047a;return _0xce993b&&_0xce993b[_0x323c0e(0x2df)]&&Object[_0x323c0e(0x2e3)][_0x323c0e(0x2b5)][_0x323c0e(0x227)](_0xce993b,_0x323c0e(0x326))?_0xce993b[_0x323c0e(0x326)]:_0xce993b;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x85acdc=_0x25047a;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3d972f={'PUT':_0x85acdc(0x299),'REMOVE':_0x85acdc(0x1e3),'INDEX_DROP':_0x85acdc(0x340),'INDEX_REGISTER':_0x85acdc(0x2e5),'INDEX_RESET':_0x85acdc(0x304),'TYPE_REGISTER':_0x85acdc(0x2b2),'TYPE_DROP':'dropType','FTS_REGISTER':_0x85acdc(0x2c9),'FTS_DROP':_0x85acdc(0x359),'FTS_RESET':'resetFts','SCHEMA_SET':_0x85acdc(0x208),'SCHEMA_DROP':_0x85acdc(0x1bd),'TTL_SET':_0x85acdc(0x29e),'TTL_CLEAR':_0x85acdc(0x224)},_0x5f1795={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x85acdc(0x277),'SYSTEM_CLOCK_CHANGE':_0x85acdc(0x1c5),'SYSTEM_POKE':_0x85acdc(0x284),'SYSTEM_DRAIN':_0x85acdc(0x249),'SYSTEM_TYPE_DROP':_0x85acdc(0x33f),'SYSTEM_PROC':_0x85acdc(0x2aa),'SYSTEM_BUS_STATE_CHANGE':_0x85acdc(0x27e),'ITEM_CREATE':_0x85acdc(0x255),'ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':'index:reset','INDEX_READY':_0x85acdc(0x334),'INDEX_PROGRESS':_0x85acdc(0x342),'VIEW_PROGRESS':_0x85acdc(0x2a8),'INDEX_DROP':_0x85acdc(0x2c6),'INDEX_REGISTERED':_0x85acdc(0x223),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x85acdc(0x365),'FTS_RESET':_0x85acdc(0x2d8),'SCHEMA_SET':_0x85acdc(0x35a),'SCHEMA_DROP':_0x85acdc(0x356),'UNIQUE_VIOLATION':_0x85acdc(0x2eb),'UNIQUE_VIOLATION_RESOLVED':_0x85acdc(0x24c),'REF_VIOLATION':_0x85acdc(0x28d),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':_0x85acdc(0x260),'TXN_END':_0x85acdc(0x1c3),'TXN_ROLLBACK':_0x85acdc(0x218),'TYPE_REGISTERED':_0x85acdc(0x288),'TYPE_DROP':'type:drop','ENV_OPENED':_0x85acdc(0x1e4),'ENV_REMOVED':'env:removed','TTL_EXPIRED':_0x85acdc(0x1e7),'TTL_SET':_0x85acdc(0x22e),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x85acdc(0x27a),'LICENSE_ADDED':_0x85acdc(0x339),'LICENSE_ACTIVATED':_0x85acdc(0x1ec),'LICENSE_REMOVED':_0x85acdc(0x263)},_0x1f4c93={'CREATING':'creating','RESETTING':_0x85acdc(0x262),'READY':'ready','DROPPING':'dropping','WAITING':_0x85acdc(0x333)},_0x5154ec={'CREATED':'created','STARTING':_0x85acdc(0x1df),'STARTED':_0x85acdc(0x293),'STOPPING':_0x85acdc(0x1c2),'STOPPED':_0x85acdc(0x343)},_0x18ae52={'CREATING':_0x85acdc(0x32c),'READY':_0x85acdc(0x30b),'HALTED':_0x85acdc(0x2a4),'STOPPED':_0x85acdc(0x343),'RESETTING':_0x85acdc(0x262)},_0x5f06a4=Object[_0x85acdc(0x30a)]({'POKE':_0x85acdc(0x32e),'DRAIN':_0x85acdc(0x34f),'TYPE_DROP':'bus:type_drop','PROC':_0x85acdc(0x355)});return okdbEnums={'BUS_EVENTS':_0x5f06a4,'CHANGE_ACTIONS':_0x3d972f,'EVENTS':_0x5f1795,'INDEX_STATE':_0x1f4c93,'OKDB_STATE':_0x5154ec,'VIEW_STATE':_0x18ae52},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3a5058=_0x25047a;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x2f6cd8,performance:_0x2f5493}=require$$0,_0x7a8f2b=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3a5058(0x287),_0x101051=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2e3c46=process.env.OKDB_LOOP_LAG_ALL==='1',_0x1be642=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x230346{constructor(){const _0x589f78=_0x3a5058;this[_0x589f78(0x2dd)]=_0x7a8f2b,this[_0x589f78(0x1e6)]=new Map(),this['_h']=null,this[_0x589f78(0x28f)]=null,this[_0x589f78(0x2c3)]=![],this[_0x589f78(0x243)]=(_0x33b71d,_0xa47a96)=>process[_0x589f78(0x2e9)]['write'](_0x33b71d+(_0xa47a96?'\x20'+JSON[_0x589f78(0x259)](_0xa47a96):'')+'\x0a');}[_0x3a5058(0x360)](){const _0x522a37=_0x3a5058;return _0x2f5493[_0x522a37(0x360)]();}[_0x3a5058(0x1e0)](_0x452ede){const _0xabe668=_0x3a5058;if(typeof _0x452ede===_0xabe668(0x1d3))this['_log']=_0x452ede;}[_0x3a5058(0x2cb)](_0x53d3e3,_0x435458,_0x29e36a){const _0x152648=_0x3a5058;if(!this[_0x152648(0x2dd)])return;let _0xef692e=this[_0x152648(0x1e6)]['get'](_0x53d3e3);!_0xef692e&&(_0xef692e={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x152648(0x1e6)][_0x152648(0x345)](_0x53d3e3,_0xef692e)),_0xef692e['ms']+=_0x435458,_0xef692e[_0x152648(0x2bb)]+=0x1,_0x435458>_0xef692e[_0x152648(0x20f)]&&(_0xef692e[_0x152648(0x20f)]=_0x435458,_0xef692e[_0x152648(0x298)]=_0x29e36a||'');}[_0x3a5058(0x252)](_0x4a8327){const _0x7646ff=_0x3a5058;if(!this[_0x7646ff(0x2dd)]||this[_0x7646ff(0x2c3)])return;this['_started']=!![];if(_0x4a8327)this[_0x7646ff(0x243)]=_0x4a8327;this['_h']=_0x2f6cd8({'resolution':0xa}),this['_h']['enable'](),this['_timer']=setInterval(()=>this[_0x7646ff(0x221)](),_0x101051);if(this[_0x7646ff(0x28f)][_0x7646ff(0x337)])this['_timer'][_0x7646ff(0x337)]();}[_0x3a5058(0x310)](_0x2cbca8){const _0x59bfe4=_0x3a5058;if(!this[_0x59bfe4(0x257)])this['_windowCbs']=new Set();this[_0x59bfe4(0x257)][_0x59bfe4(0x2b0)](_0x2cbca8);if(!this['_started'])this['_startAdmission']();}[_0x3a5058(0x318)](_0x22e990){const _0x4e9394=_0x3a5058;this[_0x4e9394(0x257)]?.['delete'](_0x22e990);}['_startAdmission'](){const _0x2d5213=_0x3a5058;if(this[_0x2d5213(0x2e8)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x2f6cd8({'resolution':0xa}),this['_h'][_0x2d5213(0x1c9)]());const _0x3dfce5=_0x101051;this[_0x2d5213(0x328)]=setInterval(()=>{const _0x503493=_0x2d5213,_0x1e27f3=this['_h'];if(!_0x1e27f3)return;const _0x3898cc=_0x1e27f3[_0x503493(0x33b)](0x63)/0xf4240,_0x519725=_0x1e27f3[_0x503493(0x322)]/0xf4240,_0x8057ab=_0x1e27f3['mean']/0xf4240;_0x1e27f3[_0x503493(0x30f)]();if(this[_0x503493(0x257)])for(const _0x1d4eee of this[_0x503493(0x257)]){try{_0x1d4eee({'p99Ms':_0x3898cc,'maxMs':_0x519725,'meanMs':_0x8057ab,'reportMs':_0x3dfce5});}catch{}}},_0x3dfce5);if(this['_admissionTimer'][_0x2d5213(0x337)])this[_0x2d5213(0x328)][_0x2d5213(0x337)]();}[_0x3a5058(0x221)](){const _0x4814d4=_0x3a5058,_0x349b5b=this['_h'],_0x3b042b=_0x349b5b['max']/0xf4240,_0x3aa825=_0x349b5b[_0x4814d4(0x33b)](0x63)/0xf4240,_0x5e890d=_0x349b5b['mean']/0xf4240;_0x349b5b[_0x4814d4(0x30f)]();const _0x281a6f=[...this[_0x4814d4(0x1e6)][_0x4814d4(0x350)]()][_0x4814d4(0x25c)](([_0xb12fcc,_0x41cdfb])=>({'label':_0xb12fcc,..._0x41cdfb}))[_0x4814d4(0x27f)]((_0x2f249b,_0x58e77c)=>_0x58e77c['ms']-_0x2f249b['ms'])[_0x4814d4(0x33c)](0x0,0x8);this[_0x4814d4(0x1e6)][_0x4814d4(0x210)]();const _0x27847a=_0x281a6f[_0x4814d4(0x273)]((_0x387f82,_0x389211)=>_0x387f82+_0x389211['ms'],0x0),_0x45a184=_0x281a6f[_0x4814d4(0x25c)](_0x4f323c=>_0x4f323c[_0x4814d4(0x327)]+'='+_0x4f323c['ms'][_0x4814d4(0x28a)](0x0)+_0x4814d4(0x357)+_0x4f323c[_0x4814d4(0x2bb)]+(_0x4f323c[_0x4814d4(0x20f)]>0x5?_0x4814d4(0x28b)+_0x4f323c[_0x4814d4(0x20f)]['toFixed'](0x0)+'ms'+(_0x4f323c[_0x4814d4(0x298)]?'\x20'+_0x4f323c[_0x4814d4(0x298)]:'')+')':''));(_0x2e3c46||_0x3b042b>=_0x1be642)&&this['_log'](_0x4814d4(0x366)+_0x101051+_0x4814d4(0x2e1)+_0x3b042b[_0x4814d4(0x28a)](0x0)+_0x4814d4(0x341)+_0x3aa825[_0x4814d4(0x28a)](0x0)+_0x4814d4(0x1f6)+_0x5e890d[_0x4814d4(0x28a)](0x0)+_0x4814d4(0x29b)+_0x27847a[_0x4814d4(0x28a)](0x0)+'ms'+(_0x45a184[_0x4814d4(0x2bd)]?_0x4814d4(0x323)+_0x45a184[_0x4814d4(0x21f)]('\x20\x20'):''),{'feature':_0x4814d4(0x22b)});if(this[_0x4814d4(0x257)])for(const _0x54fdd1 of this[_0x4814d4(0x257)]){try{_0x54fdd1({'p99Ms':_0x3aa825,'maxMs':_0x3b042b,'meanMs':_0x5e890d,'reportMs':_0x101051});}catch{}}}['stop'](){const _0x211da0=_0x3a5058;if(this[_0x211da0(0x28f)])clearInterval(this[_0x211da0(0x28f)]);if(this['_h'])this['_h']['disable']();this[_0x211da0(0x28f)]=null,this['_h']=null,this['_started']=![];}}const _0x44b9cf=new _0x230346();if(_0x44b9cf['enabled'])_0x44b9cf[_0x3a5058(0x252)]();return okdbLoopMonitor={'LOOP':_0x44b9cf},okdbLoopMonitor;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x596ac4=_0x25047a;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x453e18=require$$0$1,_0x2b1529=require$$1,_0x2f0c36=require$$2,{LOOP:_0xcb4ae5}=requireOkdbLoopMonitor(),_0x52e4ca='~processes',_0x500fe7=_0x596ac4(0x26e),_0x391f91=_0x596ac4(0x2ce),_0x12c168=_0x596ac4(0x332),_0x1c89d7=(_0x22fb46,_0x14726f)=>_0x22fb46+':'+_0x14726f,_0x2caf82=(_0x186ace,_0x41617c)=>_0x186ace+'::'+_0x41617c,_0x319f85=(_0x3d3df9,_0x46913f)=>_0x3d3df9+'/'+_0x46913f,_0x42f22d=(_0x3f5032,_0x5180a3)=>_0x3f5032+'#'+_0x5180a3,_0x5f04b9=_0x30c20c=>{const _0x478e6d=_0x596ac4;if(_0x30c20c?.[_0x478e6d(0x2a1)])return _0x30c20c['processKey'];const _0x45d877=_0x30c20c?.[_0x478e6d(0x2e2)];return typeof _0x45d877===_0x478e6d(0x1ce)&&_0x45d877[_0x478e6d(0x31d)]('#')?_0x45d877[_0x478e6d(0x33c)](0x0,_0x45d877['indexOf']('#')):_0x45d877;},_0x2f1319=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x202444=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x59f590=_0x2f1319*0x3,_0x3210c0=[_0x596ac4(0x29c),_0x596ac4(0x25f),_0x596ac4(0x211),'processor:error'];let _0x14b48d=null;function _0x5ca4f7(){const _0xfd79b0=_0x596ac4;if(_0x14b48d==null)_0x14b48d=Math[_0xfd79b0(0x2ae)]((Date[_0xfd79b0(0x360)]()-process[_0xfd79b0(0x308)]()*0x3e8)/0x3e8)*0x3e8;return _0x14b48d;}function _0xf9307b(_0x1787c5){const _0x228683=_0x596ac4;if(process.env.OKDB_PROCESS_KILL===_0x228683(0x2d7))return![];if(_0x1787c5?.[_0x228683(0x28e)]?.[_0x228683(0x311)]&&typeof _0x1787c5['options'][_0x228683(0x311)]===_0x228683(0x1ee)&&_0x1787c5[_0x228683(0x28e)]['processes'][_0x228683(0x1e8)]===![])return![];return!![];}function _0x234c1f(_0x484360,_0x169877){const _0x1d6045=_0x596ac4,_0x4f8b53=!!_0x169877?.[_0x1d6045(0x2a5)];switch(_0x484360){case _0x1d6045(0x324):return{'controllable':_0x4f8b53,'decommissionable':![],'killable':!![],'killConfirm':_0x1d6045(0x250)};case _0x1d6045(0x2ec):case _0x1d6045(0x1e9):return{'controllable':_0x4f8b53,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x1d6045(0x22d):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x1d6045(0x26b):case _0x1d6045(0x215):case _0x1d6045(0x30e):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x1d6045(0x228)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x5a224a{constructor(_0x3702a7){const _0x52e183=_0x596ac4;this[_0x52e183(0x33a)]=_0x3702a7,this['_statusEnv']=null,this['_desired']=null,this[_0x52e183(0x1f0)]=null,this['_isWriter']=![],this['_isReader']=![],this['_processStartedAt']=_0x5ca4f7(),this[_0x52e183(0x1d7)]=_0x1c89d7(process[_0x52e183(0x2e0)],this[_0x52e183(0x2f7)]),this[_0x52e183(0x317)]=_0x2f0c36[_0x52e183(0x1fd)]()[_0x52e183(0x33c)](0x0,0x8),this['_rowKey']=_0x42f22d(this[_0x52e183(0x1d7)],this[_0x52e183(0x317)]),this[_0x52e183(0x315)]=Date[_0x52e183(0x360)](),this['_kind']=null,this[_0x52e183(0x225)]=null,this[_0x52e183(0x20e)]=null,this['_hbTimer']=null,this[_0x52e183(0x1cc)]=null,this[_0x52e183(0x1eb)]=null,this[_0x52e183(0x2be)]=0x0,this[_0x52e183(0x1fa)]={},this[_0x52e183(0x1ea)]=new Map(),this['_lastCpuUsage']=process['cpuUsage'](),this[_0x52e183(0x2d3)]=Date['now'](),this[_0x52e183(0x291)]=0x0,this[_0x52e183(0x254)]=new Map();}get[_0x596ac4(0x336)](){const _0x310bf4=_0x596ac4;return this[_0x310bf4(0x1d7)];}get[_0x596ac4(0x2ff)](){const _0x362f39=_0x596ac4;return this[_0x362f39(0x309)];}[_0x596ac4(0x2ca)](_0x7d9cc3,_0x5f23dd){const _0x2e186a=_0x596ac4,_0x3918d1=_0x234c1f(_0x7d9cc3,_0x5f23dd);if(_0x3918d1[_0x2e186a(0x31e)]&&!_0xf9307b(this[_0x2e186a(0x33a)]))return{..._0x3918d1,'killable':![],'killConfirm':undefined};return _0x3918d1;}['isActive'](){const _0x37b7cc=_0x596ac4;return!!this[_0x37b7cc(0x307)];}[_0x596ac4(0x319)](_0x4137e2){const _0x303f1e=_0x596ac4;Object[_0x303f1e(0x2da)](this[_0x303f1e(0x1fa)],_0x4137e2||{});}[_0x596ac4(0x1ef)](_0x379368){const _0x1573b7=_0x596ac4;if(_0x379368)this[_0x1573b7(0x20e)]=_0x379368;}[_0x596ac4(0x331)](_0x12978d={}){const _0x3da144=_0x596ac4;return this[_0x3da144(0x33a)][_0x3da144(0x2f0)](_0x12978d);}['processingStatusView'](){const _0x576b9e=_0x596ac4;let _0x389eef=null;const _0x3e4142={};for(const _0x325aff of this[_0x576b9e(0x265)]()){const _0x17466d=_0x325aff[_0x576b9e(0x22c)];if(!_0x17466d)continue;if(_0x389eef==null)_0x389eef=_0x17466d[_0x576b9e(0x34e)];for(const _0x3d5a96 of _0x17466d['processors']||[]){if(![_0x576b9e(0x2fc),'fanout',_0x576b9e(0x30e),_0x576b9e(0x2c4)]['includes'](_0x3d5a96['mode']))continue;const _0x570948=_0x3d5a96[_0x576b9e(0x294)]||_0x576b9e(0x326);(_0x3e4142[_0x570948]||=[])['push']({'type':_0x3d5a96['type'],'mode':_0x3d5a96[_0x576b9e(0x25a)],'state':_0x3d5a96[_0x576b9e(0x1d4)],'lastClock':_0x3d5a96[_0x576b9e(0x1be)],'headClock':_0x3d5a96[_0x576b9e(0x27d)],'lag':_0x3d5a96[_0x576b9e(0x2a2)]});}}return{'envs':_0x3e4142,'policy':_0x389eef,'source':_0x576b9e(0x1fe)};}[_0x596ac4(0x2b9)](){const _0x49aea8=_0x596ac4,_0xdfc117=_0x53522a=>{const _0x5f154e=_0x423a;if(_0x53522a[_0x5f154e(0x1d4)]===_0x5f154e(0x226)||_0x53522a[_0x5f154e(0x1d4)]===_0x5f154e(0x2dc)||_0x53522a[_0x5f154e(0x1d4)]==='error')return 0x3;if(_0x53522a[_0x5f154e(0x213)])return 0x1;return 0x2;},_0x1d8d00=new Map();for(const _0x493945 of this[_0x49aea8(0x265)]()){for(const _0x4497cf of _0x493945[_0x49aea8(0x22c)]?.['processors']||[]){const _0x3b54f8={..._0x4497cf,'owner':{'pid':_0x493945[_0x49aea8(0x2e0)]??null,'kind':_0x493945['kind']??null,'host':_0x493945[_0x49aea8(0x248)]??null}},_0x4cf61a=_0x4497cf[_0x49aea8(0x25a)]===_0x49aea8(0x2fc)?_0x49aea8(0x279)+(_0x4497cf['env']??'')+'::'+(_0x4497cf[_0x49aea8(0x20a)]??_0x4497cf[_0x49aea8(0x2cf)]??_0x4497cf['id']):_0x49aea8(0x35f)+(_0x493945[_0x49aea8(0x2e2)]??_0x493945['processKey']??'')+'::'+(_0x4497cf['env']??'')+'::'+_0x4497cf['id'],_0x570e5a=_0x1d8d00['get'](_0x4cf61a);if(!_0x570e5a||_0xdfc117(_0x3b54f8)>_0xdfc117(_0x570e5a))_0x1d8d00[_0x49aea8(0x345)](_0x4cf61a,_0x3b54f8);}}return[..._0x1d8d00['values']()];}['clusterStatusView'](){const _0x8440d6=_0x596ac4,_0x55e0fb=Date[_0x8440d6(0x360)](),_0x175850=this['listNodes'](),_0xcd71d6=_0x40735b=>Math[_0x8440d6(0x322)](0x0,Math['round']((_0x55e0fb-(_0x40735b[_0x8440d6(0x268)]||_0x55e0fb))/0x3e8)),_0x454db2=_0x175850[_0x8440d6(0x2ea)](_0x4f7f9d=>_0x4f7f9d[_0x8440d6(0x27c)]===_0x8440d6(0x324)),_0xc8b164=_0x175850[_0x8440d6(0x2ab)](_0x128055=>_0x128055[_0x8440d6(0x27c)]===_0x8440d6(0x346));if(_0x454db2||_0xc8b164[_0x8440d6(0x2bd)])return{'primary':_0x454db2?{'pid':_0x454db2[_0x8440d6(0x2e0)],'uptime':_0xcd71d6(_0x454db2)}:null,'workers':_0xc8b164[_0x8440d6(0x25c)](_0x392199=>({'pid':_0x392199['pid'],'uptime':_0xcd71d6(_0x392199)})),'workersConfigured':_0x454db2?.[_0x8440d6(0x33d)]?.[_0x8440d6(0x233)]??_0xc8b164[_0x8440d6(0x2bd)],'mode':_0x8440d6(0x1e5)};const _0x5dc22c=_0x175850[_0x8440d6(0x2ea)](_0x3ba608=>_0x3ba608[_0x8440d6(0x27c)]===_0x8440d6(0x2ec)||_0x3ba608[_0x8440d6(0x27c)]===_0x8440d6(0x1e9)||_0x3ba608[_0x8440d6(0x27c)]===_0x8440d6(0x22d)),_0x50ba05=_0x5dc22c?{'pid':_0x5dc22c['pid'],'uptime':_0xcd71d6(_0x5dc22c)}:{'pid':process[_0x8440d6(0x2e0)],'uptime':Math[_0x8440d6(0x322)](0x0,Math[_0x8440d6(0x2ae)](process[_0x8440d6(0x308)]()))};return{'primary':_0x50ba05,'workers':[_0x50ba05],'workersConfigured':0x1,'mode':'single'};}['nodesView'](){const _0x5197a3=_0x596ac4;return this[_0x5197a3(0x2d6)]();}[_0x596ac4(0x1c6)](){const _0x56a377=_0x596ac4,_0x28fd7d=new Map();for(const _0x4b5298 of this[_0x56a377(0x2d6)]())_0x28fd7d['set'](_0x4b5298['processKey'],{..._0x4b5298,'children':[]});const _0x56ea54=[];for(const _0x6e378b of _0x28fd7d[_0x56a377(0x22a)]()){const _0x4e6c1f=_0x6e378b[_0x56a377(0x281)]?_0x28fd7d[_0x56a377(0x2bf)](_0x6e378b[_0x56a377(0x281)]):null;if(_0x4e6c1f&&_0x4e6c1f!==_0x6e378b)_0x4e6c1f[_0x56a377(0x286)]['push'](_0x6e378b);else _0x56ea54['push'](_0x6e378b);}const _0x8b2f3=(_0x298bc1,_0x4c4055)=>_0x298bc1[_0x56a377(0x27c)]===_0x4c4055[_0x56a377(0x27c)]?(_0x298bc1['pid']||0x0)-(_0x4c4055[_0x56a377(0x2e0)]||0x0):(_0x298bc1['kind']??'')<(_0x4c4055[_0x56a377(0x27c)]??'')?-0x1:0x1,_0x3dfc04=_0x272527=>{const _0x1be498=_0x56a377;_0x272527[_0x1be498(0x27f)](_0x8b2f3);for(const _0x557c4e of _0x272527)if(_0x557c4e[_0x1be498(0x286)][_0x1be498(0x2bd)])_0x3dfc04(_0x557c4e['children']);};return _0x3dfc04(_0x56ea54),_0x56ea54;}[_0x596ac4(0x23f)](_0xf8feb4){const _0xe7adaa=_0x596ac4;return this['_groupByProcess']()[_0xe7adaa(0x2ea)](_0x19328d=>_0x19328d[_0xe7adaa(0x2a1)]===_0xf8feb4)??null;}[_0x596ac4(0x2d6)](_0x52eea0=Date[_0x596ac4(0x360)]()){const _0x251bf2=_0x596ac4,_0x564c68=new Map();for(const _0x379341 of this['listNodes']()){const _0x2c1260=_0x5f04b9(_0x379341);let _0x3b4708=_0x564c68[_0x251bf2(0x2bf)](_0x2c1260);!_0x3b4708&&(_0x3b4708={'processKey':_0x2c1260,'nodeKey':_0x2c1260,'pid':_0x379341['pid'],'ppid':_0x379341['ppid']??null,'host':_0x379341[_0x251bf2(0x248)]??null,'kind':_0x379341[_0x251bf2(0x27c)],'role':null,'supervisorKey':_0x379341['supervisorKey']??null,'slot':_0x379341[_0x251bf2(0x1c1)]??null,'slotKey':_0x379341['slotKey']??null,'caps':_0x379341[_0x251bf2(0x209)]??null,'lifecycle':_0x379341['lifecycle']??null,'uptime':Math[_0x251bf2(0x322)](0x0,Math[_0x251bf2(0x2ae)]((_0x52eea0-(_0x379341['startedAt']||_0x52eea0))/0x3e8)),'startedAt':_0x379341['startedAt']??null,'meta':_0x379341['meta']??null,'listenAddr':null,'processing':null,'stats':null,'instances':[]},_0x564c68[_0x251bf2(0x345)](_0x2c1260,_0x3b4708));_0x3b4708['instances'][_0x251bf2(0x276)]({'instanceId':_0x379341[_0x251bf2(0x271)]??null,'role':_0x379341[_0x251bf2(0x2ee)]??null,'listenAddr':_0x379341[_0x251bf2(0x354)]??null,'lifecycle':_0x379341['lifecycle']??null,'processing':_0x379341[_0x251bf2(0x22c)]??null});if(!_0x3b4708['role']&&_0x379341[_0x251bf2(0x2ee)])_0x3b4708[_0x251bf2(0x2ee)]=_0x379341['role'];if(!_0x3b4708[_0x251bf2(0x354)]&&_0x379341[_0x251bf2(0x354)])_0x3b4708[_0x251bf2(0x354)]=_0x379341['listenAddr'];if(!_0x3b4708[_0x251bf2(0x22c)]&&_0x379341[_0x251bf2(0x22c)])_0x3b4708['processing']=_0x379341[_0x251bf2(0x22c)];if(_0x3b4708['caps']==null&&_0x379341[_0x251bf2(0x209)])_0x3b4708['caps']=_0x379341[_0x251bf2(0x209)];if(_0x379341['stats']&&(!_0x3b4708[_0x251bf2(0x247)]||(_0x379341[_0x251bf2(0x247)]['at']??0x0)>(_0x3b4708['stats']['at']??0x0)))_0x3b4708['stats']=_0x379341['stats'];}return[..._0x564c68[_0x251bf2(0x22a)]()];}[_0x596ac4(0x33e)](){const _0x5dbe34=_0x596ac4,_0x2ac7a4=[],_0x1a9434={'rss':0x0,'heapUsed':0x0,'processes':0x0};for(const _0x33884d of this[_0x5dbe34(0x2d6)]()){_0x2ac7a4[_0x5dbe34(0x276)]({'processKey':_0x33884d[_0x5dbe34(0x2a1)],'kind':_0x33884d[_0x5dbe34(0x27c)],'pid':_0x33884d[_0x5dbe34(0x2e0)],'supervisorKey':_0x33884d[_0x5dbe34(0x281)],'meta':_0x33884d[_0x5dbe34(0x33d)]??null,'uptime':_0x33884d[_0x5dbe34(0x308)],'stats':_0x33884d[_0x5dbe34(0x247)]??null}),_0x1a9434[_0x5dbe34(0x311)]++,_0x33884d[_0x5dbe34(0x247)]&&(_0x1a9434['rss']+=_0x33884d[_0x5dbe34(0x247)][_0x5dbe34(0x1d5)]||0x0,_0x1a9434[_0x5dbe34(0x204)]+=(_0x33884d[_0x5dbe34(0x247)][_0x5dbe34(0x204)]||0x0)+(_0x33884d[_0x5dbe34(0x247)][_0x5dbe34(0x2c8)]?.[_0x5dbe34(0x204)]||0x0));}return{'totals':_0x1a9434,'nodes':_0x2ac7a4};}async[_0x596ac4(0x344)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1b21d4=_0x596ac4;this['_isWriter']=this[_0x1b21d4(0x242)]||!!writer,this['_isReader']=this[_0x1b21d4(0x1e2)]||!!reader,this['_kind']=kind||this[_0x1b21d4(0x2f2)]||(_0x2b1529[_0x1b21d4(0x28c)]?_0x1b21d4(0x346):_0x1b21d4(0x2ec)),this[_0x1b21d4(0x225)]=supervisorKey??this[_0x1b21d4(0x225)],this['_listenAddr']=listenAddr??this[_0x1b21d4(0x20e)],this[_0x1b21d4(0x2d1)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x3b9e69=await this[_0x1b21d4(0x33a)][_0x1b21d4(0x256)](_0x52e4ca,{'sync':![],'durability':_0x1b21d4(0x24e)});if(!_0x3b9e69[_0x1b21d4(0x235)](_0x500fe7))await _0x3b9e69['registerType'](_0x500fe7);this[_0x1b21d4(0x307)]=_0x3b9e69;}return this[_0x1b21d4(0x307)];}[_0x596ac4(0x2a9)](){const _0x27a54a=_0x596ac4;return this[_0x27a54a(0x20d)]!==this[_0x27a54a(0x307)]&&(this[_0x27a54a(0x20d)]=this[_0x27a54a(0x307)],this[_0x27a54a(0x283)]=this['_statusEnv'][_0x27a54a(0x338)](_0x500fe7)[_0x27a54a(0x26f)]),this[_0x27a54a(0x283)];}['_putRowAsync'](_0x4d37b3){const _0x57eb30=_0x596ac4,_0x507fe4=this[_0x57eb30(0x2a9)]()['put'](_0x4d37b3[_0x57eb30(0x2e2)],_0x4d37b3,0x1);if(_0x507fe4&&typeof _0x507fe4['then']===_0x57eb30(0x1d3))_0x507fe4[_0x57eb30(0x316)](undefined,()=>{});return _0x507fe4;}[_0x596ac4(0x1c0)](_0x436207){const _0x36b21e=_0x596ac4,_0x583374=this[_0x36b21e(0x2a9)]()[_0x36b21e(0x1e3)](_0x436207);if(_0x583374&&typeof _0x583374[_0x36b21e(0x316)]==='function')_0x583374['then'](undefined,()=>{});return _0x583374;}async['putNode'](_0x9d5069){const _0x3b58fe=_0x596ac4;if(!this[_0x3b58fe(0x307)]||!this[_0x3b58fe(0x242)]||!_0x9d5069?.[_0x3b58fe(0x2e2)])return;return this[_0x3b58fe(0x2d5)](_0x9d5069);}async[_0x596ac4(0x1db)](_0x1c836c){const _0xbadbe9=_0x596ac4;if(!this['_statusEnv']||!this['_isWriter']||!_0x1c836c)return;const _0x598cae=_0x1c836c['includes']('#'),_0x3c474c=[];for(const {key:_0x41d6e3}of this[_0xbadbe9(0x307)][_0xbadbe9(0x30d)](_0x500fe7)){if(_0x41d6e3===_0x1c836c||!_0x598cae&&typeof _0x41d6e3==='string'&&_0x41d6e3[_0xbadbe9(0x301)](_0x1c836c+'#'))_0x3c474c[_0xbadbe9(0x276)](_0x41d6e3);}return Promise[_0xbadbe9(0x296)](_0x3c474c['map'](_0x1af24d=>this[_0xbadbe9(0x1c0)](_0x1af24d)));}[_0x596ac4(0x26a)](_0xa302e4){const _0x3d8145=_0x596ac4;if(typeof _0xa302e4?.[_0x3d8145(0x2e0)]!=='number')return![];if(_0xa302e4[_0x3d8145(0x248)]!==_0x453e18['hostname']())return![];if(_0xa302e4[_0x3d8145(0x2e0)]===process[_0x3d8145(0x2e0)])return![];try{return process[_0x3d8145(0x1e8)](_0xa302e4[_0x3d8145(0x2e0)],0x0),![];}catch(_0x494c68){return _0x494c68[_0x3d8145(0x2e6)]===_0x3d8145(0x205);}}[_0x596ac4(0x265)](){const _0x19315d=_0x596ac4;if(!this[_0x19315d(0x307)])return[];const _0x57afb3=Date[_0x19315d(0x360)](),_0x574534=[];for(const {value:_0x370a18}of this[_0x19315d(0x307)][_0x19315d(0x30d)](_0x500fe7)){if(_0x370a18&&(_0x370a18[_0x19315d(0x31c)]==null||_0x370a18[_0x19315d(0x31c)]>=_0x57afb3)&&!this[_0x19315d(0x26a)](_0x370a18))_0x574534['push'](_0x370a18);}return _0x574534;}[_0x596ac4(0x1f7)](_0x304558=0x0){const _0x30aead=_0x596ac4;if(!this[_0x30aead(0x307)]||!this[_0x30aead(0x242)])return;const _0xf53c5b=Date[_0x30aead(0x360)]()-_0x304558,_0x45f48c=new Set(),_0x4b2da2=[];for(const {key:_0x438742,value:_0x172cee}of this[_0x30aead(0x307)][_0x30aead(0x30d)](_0x500fe7)){if(_0x172cee&&(_0x172cee[_0x30aead(0x31c)]!=null&&_0x172cee[_0x30aead(0x31c)]<_0xf53c5b||this[_0x30aead(0x26a)](_0x172cee)))_0x4b2da2[_0x30aead(0x276)](_0x438742);else _0x45f48c[_0x30aead(0x2b0)](_0x5f04b9(_0x172cee)??_0x438742);}for(const _0x4b62fe of _0x4b2da2)this[_0x30aead(0x1c0)](_0x4b62fe);if(this[_0x30aead(0x2d1)]())for(const {key:_0x171b5b}of this[_0x30aead(0x1d0)](_0x30aead(0x26e))){if(!_0x45f48c['has'](_0x171b5b))this['_desired'][_0x30aead(0x2e4)](_0x30aead(0x2b4)+_0x171b5b);}}[_0x596ac4(0x222)](_0x157995=null){const _0x577d60=_0x596ac4;if(this[_0x577d60(0x274)]||!this[_0x577d60(0x242)]||!this[_0x577d60(0x307)])return;this[_0x577d60(0x1eb)]=_0x157995,this[_0x577d60(0x1cc)]=()=>this[_0x577d60(0x229)]();for(const _0x119a1b of _0x3210c0)this['okdb'][_0x577d60(0x1c7)]['on'](_0x119a1b,this[_0x577d60(0x1cc)]);this[_0x577d60(0x1c4)]();const _0x5a14f0=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x2f1319;this[_0x577d60(0x274)]=setInterval(()=>{const _0x393a03=_0x577d60;if(this['_onTick'])try{this[_0x393a03(0x1eb)]();}catch{}this[_0x393a03(0x1c4)](),this['reap']();},_0x5a14f0);if(this['_hbTimer'][_0x577d60(0x337)])this['_hbTimer'][_0x577d60(0x337)]();}[_0x596ac4(0x229)](){const _0x5ee00b=_0x596ac4;if(!this[_0x5ee00b(0x242)]||!this[_0x5ee00b(0x307)])return;if(Date[_0x5ee00b(0x360)]()-this[_0x5ee00b(0x2be)]<_0x202444)return;this[_0x5ee00b(0x1c4)]();}[_0x596ac4(0x1c4)](){const _0x43ab3b=_0x596ac4;if(!this[_0x43ab3b(0x242)]||!this['_statusEnv'])return;this['_lastPublishAt']=Date['now']();try{const _0x2cfbea=[this[_0x43ab3b(0x2f9)]()];for(const _0x3dd657 of this[_0x43ab3b(0x1ea)][_0x43ab3b(0x22a)]())_0x2cfbea[_0x43ab3b(0x276)](this['_buildChildRow'](_0x3dd657));const _0x12ed4a=_0xcb4ae5[_0x43ab3b(0x2dd)]?_0xcb4ae5[_0x43ab3b(0x360)]():0x0,_0x24dc57=Promise[_0x43ab3b(0x296)](_0x2cfbea['map'](_0x41804c=>this[_0x43ab3b(0x2d5)](_0x41804c)))[_0x43ab3b(0x2fa)](()=>{});if(_0xcb4ae5[_0x43ab3b(0x2dd)])_0xcb4ae5[_0x43ab3b(0x2cb)](_0x43ab3b(0x2ac),_0xcb4ae5[_0x43ab3b(0x360)]()-_0x12ed4a,'rows='+_0x2cfbea[_0x43ab3b(0x2bd)]);return _0x24dc57;}catch{}}async[_0x596ac4(0x35b)](){const _0x160dc4=_0x596ac4;if(this[_0x160dc4(0x1cc)]){for(const _0x2cdc77 of _0x3210c0){try{this[_0x160dc4(0x33a)][_0x160dc4(0x1c7)][_0x160dc4(0x2d7)](_0x2cdc77,this[_0x160dc4(0x1cc)]);}catch{}}this['_onProcEvent']=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x160dc4(0x274)]=null);try{if(this[_0x160dc4(0x307)]&&this[_0x160dc4(0x242)])await this['removeNode'](this['_rowKey']);}catch{}}async[_0x596ac4(0x269)](){const _0xf523e7=_0x596ac4;if(!this[_0xf523e7(0x307)]||!this[_0xf523e7(0x242)])return;try{await this[_0xf523e7(0x1db)](this[_0xf523e7(0x309)]);}catch{}try{const _0x5d470b=[];for(const {value:_0x10a812}of this['_statusEnv']['getRange'](_0x500fe7)){if(_0x10a812?.['ppid']===process['pid']&&_0x10a812['nodeKey'])_0x5d470b[_0xf523e7(0x276)](_0x10a812[_0xf523e7(0x2e2)]);}for(const _0x53ce6a of _0x5d470b){try{await this[_0xf523e7(0x1db)](_0x53ce6a);}catch{}}}catch{}}async['publishOwnRow'](){const _0x468ce8=_0x596ac4;return this['putNode'](this[_0x468ce8(0x2f9)]());}async[_0x596ac4(0x1f8)](_0x25a60e){const _0x2dc5ae=_0x596ac4;if(!this['_statusEnv']||!this[_0x2dc5ae(0x242)])return;return this[_0x2dc5ae(0x305)](this[_0x2dc5ae(0x25e)](_0x25a60e));}[_0x596ac4(0x25e)]({pid:_0x3c8938,startedAt:_0x2395bc,kind:_0x11a4a5,supervisorKey:_0x2196d1,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x596ac4(0x1da),meta:meta=null,stats:stats=null}){const _0x5b5b28=_0x596ac4,_0x1e1cf8=Date[_0x5b5b28(0x360)](),_0x29b133=_0x1c89d7(_0x3c8938,_0x2395bc);return{'nodeKey':_0x42f22d(_0x29b133,'0'),'processKey':_0x29b133,'instanceId':'0','pid':_0x3c8938,'startedAt':_0x2395bc,'ppid':process[_0x5b5b28(0x2e0)],'host':_0x453e18[_0x5b5b28(0x23c)](),'supervisorKey':_0x2196d1,'slot':slot,'slotKey':slotKey,'kind':_0x11a4a5,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x1e1cf8,'expiresAt':_0x1e1cf8+_0x59f590,'caps':this['_caps'](_0x11a4a5,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x596ac4(0x1d2)](_0x579c32){const _0x3475ab=_0x596ac4;if(!_0x579c32?.[_0x3475ab(0x2e0)])return null;const _0xdabb8a=_0x1c89d7(_0x579c32[_0x3475ab(0x2e0)],_0x579c32[_0x3475ab(0x268)]);this[_0x3475ab(0x1ea)][_0x3475ab(0x345)](_0xdabb8a,{..._0x579c32,'supervisorKey':_0x579c32[_0x3475ab(0x281)]??this[_0x3475ab(0x1d7)]});if(this['_isWriter'])await this[_0x3475ab(0x1f8)](this[_0x3475ab(0x1ea)]['get'](_0xdabb8a))['catch']?.(()=>{});return _0xdabb8a;}[_0x596ac4(0x240)](_0x46d941){const _0x507528=_0x596ac4;if(!_0x46d941)return;return this[_0x507528(0x1ea)][_0x507528(0x251)](_0x46d941),this[_0x507528(0x1db)](_0x46d941);}['_sampleOwnStats'](){const _0x2220c3=_0x596ac4,_0x11dbe4=Date['now'](),_0x435e8f=process[_0x2220c3(0x2d2)](),_0x504f78=(_0x11dbe4-this['_lastCpuAt'])*0x3e8;if(_0x504f78>=0x3d090){const _0x559c4b=_0x435e8f[_0x2220c3(0x1fb)]-this[_0x2220c3(0x34b)][_0x2220c3(0x1fb)]+(_0x435e8f[_0x2220c3(0x212)]-this[_0x2220c3(0x34b)][_0x2220c3(0x212)]),_0x5bb629=_0x453e18[_0x2220c3(0x214)]()[_0x2220c3(0x2bd)]||0x1;this[_0x2220c3(0x291)]=Math[_0x2220c3(0x2bc)](0x64,Math['round'](_0x559c4b/(_0x504f78*_0x5bb629)*0x64)),this['_lastCpuWindowMs']=Math[_0x2220c3(0x2ae)](_0x504f78/0x3e8),this[_0x2220c3(0x34b)]=_0x435e8f,this[_0x2220c3(0x2d3)]=_0x11dbe4;}const _0x4f1db9=process['memoryUsage']();let _0x47b7a3=null;if(this[_0x2220c3(0x254)][_0x2220c3(0x24a)]>0x0){let _0x1fc091=0x0;for(const _0x14af86 of this[_0x2220c3(0x254)][_0x2220c3(0x22a)]())_0x1fc091+=_0x14af86[_0x2220c3(0x204)]||0x0;_0x47b7a3={'count':this[_0x2220c3(0x254)][_0x2220c3(0x24a)],'heapUsed':_0x1fc091};}return{'rss':_0x4f1db9[_0x2220c3(0x1d5)],'heapUsed':_0x4f1db9[_0x2220c3(0x204)],'heapTotal':_0x4f1db9['heapTotal'],'external':_0x4f1db9[_0x2220c3(0x266)],'cpuPct':this[_0x2220c3(0x291)],'cpuWindowMs':this[_0x2220c3(0x349)]??null,'threads':_0x47b7a3,'at':_0x11dbe4};}[_0x596ac4(0x24d)](_0x47a11a,_0x39ff80){if(!_0x47a11a||!_0x39ff80)return;this['_threadStats']['set'](_0x47a11a,_0x39ff80);}['clearThreadStats'](_0x47f226){this['_threadStats']['delete'](_0x47f226);}[_0x596ac4(0x234)](_0xce6459,_0x153c7f,_0x1f9443=undefined){const _0x4f7440=_0x596ac4,_0x5bdaf2=this[_0x4f7440(0x1ea)]['get'](_0xce6459);if(!_0x5bdaf2||!_0x153c7f)return;if(_0x1f9443!==undefined)_0x5bdaf2[_0x4f7440(0x22c)]=_0x1f9443;_0x5bdaf2['stats']={'rss':_0x153c7f['rss']??null,'heapUsed':_0x153c7f['heapUsed']??null,'heapTotal':_0x153c7f[_0x4f7440(0x203)]??null,'external':_0x153c7f[_0x4f7440(0x266)]??null,'cpuPct':_0x153c7f[_0x4f7440(0x2db)]??null,'cpuWindowMs':_0x153c7f[_0x4f7440(0x313)]??null,'threads':_0x153c7f[_0x4f7440(0x2c8)]??null,'claims':_0x153c7f[_0x4f7440(0x320)]??null,'envsOpen':_0x153c7f[_0x4f7440(0x31a)]??null,'at':Date['now']()};}[_0x596ac4(0x2f9)](){const _0x403c60=_0x596ac4,_0x2bc253=Date[_0x403c60(0x360)](),_0x2a99fd=this['okdb']['_role']||{},_0x57e22a=this['_kind']||_0x403c60(0x2ec);return{'nodeKey':this[_0x403c60(0x309)],'processKey':this['_selfKey'],'instanceId':this[_0x403c60(0x317)],'pid':process[_0x403c60(0x2e0)],'startedAt':this[_0x403c60(0x2f7)],'instanceStartedAt':this[_0x403c60(0x315)],'ppid':typeof process[_0x403c60(0x2fb)]===_0x403c60(0x238)?process['ppid']:null,'host':_0x453e18[_0x403c60(0x23c)](),'supervisorKey':this[_0x403c60(0x225)]??null,'kind':_0x57e22a,'role':{'engines':!!_0x2a99fd[_0x403c60(0x23d)],'asyncProcessors':!!_0x2a99fd[_0x403c60(0x2a5)],'compaction':_0x2a99fd[_0x403c60(0x202)],'http':_0x2a99fd[_0x403c60(0x1f5)]},'listenAddr':this[_0x403c60(0x20e)]??null,'heartbeatAt':_0x2bc253,'expiresAt':_0x2bc253+_0x59f590,'caps':this[_0x403c60(0x2ca)](_0x57e22a,_0x2a99fd),'lifecycle':{'state':_0x403c60(0x1da),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x2a99fd[_0x403c60(0x2a5)]?this['_buildProcessingFacet']():null,'stats':this[_0x403c60(0x244)]()};}[_0x596ac4(0x2ef)](){const _0x5432e9=_0x596ac4,_0x500beb=[];try{for(const [_0x9e49b1,_0x2ec64d]of this[_0x5432e9(0x33a)]['_envs']){if(_0x9e49b1[_0x5432e9(0x301)]('~'))continue;for(const _0x56c5fe of _0x2ec64d[_0x5432e9(0x34a)][_0x5432e9(0x237)]())_0x500beb['push']({..._0x56c5fe,'env':_0x9e49b1});}}catch{}return{'policy':this[_0x5432e9(0x33a)][_0x5432e9(0x2e7)]??null,'processors':_0x500beb};}['_ensureDesired'](){const _0x5c62b4=_0x596ac4;if(this[_0x5c62b4(0x24b)])return!![];const _0x352bac=this[_0x5c62b4(0x33a)]['_rootDb'];if(!_0x352bac)return![];return this[_0x5c62b4(0x24b)]=_0x352bac[_0x5c62b4(0x35c)](_0x391f91,{'dupSort':![]}),this[_0x5c62b4(0x1f0)]=_0x352bac['openDB'](_0x12c168,{'dupSort':![]}),!![];}[_0x596ac4(0x29f)](){return!!this['_desired'];}[_0x596ac4(0x32a)](_0x5d90b6,_0x4b1c91){const _0x49d74b=_0x596ac4;if(!this[_0x49d74b(0x2d1)]())return null;return this[_0x49d74b(0x24b)][_0x49d74b(0x2bf)](_0x5d90b6+'/'+_0x4b1c91)??null;}[_0x596ac4(0x2cc)](_0x37b3af,_0x35cc32,_0x2a1591){const _0x82a5af=_0x596ac4;if(!this[_0x82a5af(0x2d1)]())return null;const _0x5addbb=_0x37b3af+'/'+_0x35cc32;let _0x68f1b7;return this[_0x82a5af(0x24b)]['transactionSync'](()=>{const _0x1252bb=_0x82a5af,_0x592873=this[_0x1252bb(0x24b)][_0x1252bb(0x2bf)](_0x5addbb)||{'version':0x0};_0x68f1b7=(_0x592873[_0x1252bb(0x300)]||0x0)+0x1,this['_desired'][_0x1252bb(0x299)](_0x5addbb,{..._0x592873,..._0x2a1591,'version':_0x68f1b7,'updatedAt':Date[_0x1252bb(0x360)]()});}),_0x68f1b7;}[_0x596ac4(0x1d0)](_0x29ab2e){const _0x24ff24=_0x596ac4;if(!this['_ensureDesired']())return[];const _0x25833a=_0x29ab2e+'/',_0x308c37=[];for(const {key:_0xfe04ed,value:_0xa954af}of this[_0x24ff24(0x24b)]['getRange']({'start':_0x25833a,'end':_0x25833a+'ÿ'})){if(typeof _0xfe04ed!==_0x24ff24(0x1ce)||!_0xfe04ed[_0x24ff24(0x301)](_0x25833a))break;_0x308c37[_0x24ff24(0x276)]({'key':_0xfe04ed['slice'](_0x25833a['length']),'value':_0xa954af});}return _0x308c37;}['getCmd'](_0x5f1b54){const _0x959de1=_0x596ac4;if(!this[_0x959de1(0x2d1)]())return null;return this[_0x959de1(0x1f0)][_0x959de1(0x2bf)](_0x5f1b54)??null;}[_0x596ac4(0x351)](_0x2d6307,_0x3aaec1,_0x1ceee3={}){const _0x193d8d=_0x596ac4;if(!this[_0x193d8d(0x2d1)]())return null;let _0x397fa5;return this[_0x193d8d(0x1f0)][_0x193d8d(0x34c)](()=>{const _0x3f52da=_0x193d8d,_0x2997d4=this[_0x3f52da(0x1f0)][_0x3f52da(0x2bf)](_0x2d6307)||{'epoch':0x0};_0x397fa5=(_0x2997d4['epoch']||0x0)+0x1,this[_0x3f52da(0x1f0)][_0x3f52da(0x299)](_0x2d6307,{..._0x2997d4,..._0x1ceee3,'cmd':_0x3aaec1,'epoch':_0x397fa5,'updatedAt':Date[_0x3f52da(0x360)]()});}),_0x397fa5;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x5a224a,'nodeKey':_0x1c89d7,'logicalKey':_0x2caf82,'slotKey':_0x319f85,'PROCESS_ENV':_0x52e4ca,'NODE_TYPE':_0x500fe7},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x3bc899=_0x25047a;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x183737=require$$0$2,{EVENTS:_0x26493e,CHANGE_ACTIONS:_0x34caee}=requireOkdbEnums(),{LOOP:_0x801754}=requireOkdbLoopMonitor(),_0x24a446=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x54c468=0x5,_0x60d40e=0x2710;class _0x4be66e extends _0x183737{constructor(_0x4073ae,_0x16de58={}){const _0x513cb4=_0x423a;super(),this[_0x513cb4(0x33a)]=_0x4073ae,this[_0x513cb4(0x272)]=_0x16de58[_0x513cb4(0x2cd)]??_0x24a446,this[_0x513cb4(0x2c2)]=_0x16de58['flushDebounce']??_0x54c468,this['_dedupeMax']=_0x16de58[_0x513cb4(0x1f1)]??_0x60d40e,this[_0x513cb4(0x2c3)]=![],this['_cursors']=new Map(),this[_0x513cb4(0x282)]=new Map(),this['_pending']=new Map(),this[_0x513cb4(0x1d9)]=null,this[_0x513cb4(0x362)]=![],this['_seen']=new Set(),this[_0x513cb4(0x1f4)]=_0x50e7ce=>this[_0x513cb4(0x217)](_0x50e7ce),this[_0x513cb4(0x1ed)]=_0x325efd=>this[_0x513cb4(0x31f)](_0x325efd),this[_0x513cb4(0x270)]=()=>this[_0x513cb4(0x1de)]();}[_0x3bc899(0x252)](){const _0x3f7ab7=_0x3bc899;if(this['_started'])return;this['_started']=!![];for(const [_0x3800bb,_0x236673]of this[_0x3f7ab7(0x33a)][_0x3f7ab7(0x1e1)]){if(_0x3800bb[_0x3f7ab7(0x301)]('~'))continue;try{this[_0x3f7ab7(0x282)][_0x3f7ab7(0x345)](_0x3800bb,_0x236673[_0x3f7ab7(0x236)]()||0x0);}catch{}}const {events:_0x3c347e}=this[_0x3f7ab7(0x33a)];_0x3c347e['on'](_0x26493e[_0x3f7ab7(0x26d)],this['_onItem']),_0x3c347e['on'](_0x26493e[_0x3f7ab7(0x20c)],this[_0x3f7ab7(0x1f4)]),_0x3c347e['on'](_0x26493e[_0x3f7ab7(0x2ad)],this[_0x3f7ab7(0x1f4)]),_0x3c347e['on'](_0x26493e[_0x3f7ab7(0x1cf)],this[_0x3f7ab7(0x1ed)]),_0x3c347e[_0x3f7ab7(0x2c0)](_0x26493e[_0x3f7ab7(0x335)],this[_0x3f7ab7(0x270)]);}[_0x3bc899(0x1de)](){const _0x50debc=_0x3bc899;if(!this[_0x50debc(0x2c3)])return;this[_0x50debc(0x2c3)]=![];const {events:_0x3d64b4}=this[_0x50debc(0x33a)];_0x3d64b4[_0x50debc(0x2d7)](_0x26493e[_0x50debc(0x26d)],this[_0x50debc(0x1f4)]),_0x3d64b4['off'](_0x26493e[_0x50debc(0x20c)],this['_onItem']),_0x3d64b4['off'](_0x26493e['ITEM_REMOVE'],this[_0x50debc(0x1f4)]),_0x3d64b4[_0x50debc(0x2d7)](_0x26493e[_0x50debc(0x1cf)],this[_0x50debc(0x1ed)]);try{_0x3d64b4[_0x50debc(0x2d7)](_0x26493e[_0x50debc(0x335)],this[_0x50debc(0x270)]);}catch{}this[_0x50debc(0x1d9)]&&(clearTimeout(this[_0x50debc(0x1d9)]),this[_0x50debc(0x1d9)]=null),this[_0x50debc(0x207)]['clear'](),this['_cursors'][_0x50debc(0x210)](),this[_0x50debc(0x282)][_0x50debc(0x210)](),this[_0x50debc(0x285)][_0x50debc(0x210)]();}['_dedupeKey'](_0x5c3dfe,_0x378cfc,_0x2e7f87,_0x4ae4fb){return _0x5c3dfe+'\x00'+_0x378cfc+'\x00'+_0x2e7f87+'\x00'+_0x4ae4fb;}[_0x3bc899(0x1d1)](_0xa898e0,_0x3a667d,_0x510323,_0x374a46){const _0x23d36e=_0x3bc899,_0x387acc=this['_dedupeKey'](_0xa898e0,_0x3a667d,_0x510323,_0x374a46);if(this['_seen']['has'](_0x387acc))return![];this[_0x23d36e(0x285)]['add'](_0x387acc);if(this[_0x23d36e(0x285)][_0x23d36e(0x24a)]>this[_0x23d36e(0x347)]){const _0xeeea72=this[_0x23d36e(0x285)][_0x23d36e(0x22a)]()['next']()[_0x23d36e(0x358)];this[_0x23d36e(0x285)]['delete'](_0xeeea72);}return!![];}[_0x3bc899(0x217)](_0x2b910d){const _0x4af434=_0x3bc899;if(!this[_0x4af434(0x2c3)]||!_0x2b910d)return;const {env:_0x12cc2d,type:_0x492211,key:_0x122d01,clock:_0x100b15,origin:_0x5cb308,action:_0x9ca217,newValue:_0x4dac0a,oldValue:_0x4496aa}=_0x2b910d;if(_0x12cc2d==null||_0x492211==null||_0x122d01==null)return;if(typeof _0x12cc2d===_0x4af434(0x1ce)&&_0x12cc2d[_0x4af434(0x301)]('~'))return;if(typeof _0x492211===_0x4af434(0x1ce)&&_0x492211[_0x4af434(0x301)]('~'))return;if(!this[_0x4af434(0x1d1)](_0x12cc2d,_0x492211,_0x122d01,_0x100b15))return;const _0xc83284=_0x9ca217===_0x34caee['REMOVE']?_0x4af434(0x1e3):'put';this[_0x4af434(0x2a6)]('change',{'env':_0x12cc2d,'type':_0x492211,'key':_0x122d01,'op':_0xc83284,'clock':_0x100b15,'origin':_0x5cb308,'value':_0xc83284===_0x4af434(0x1e3)?null:_0x4dac0a,'prevValue':_0x4496aa});}[_0x3bc899(0x31f)](_0x463b85){const _0x1f4105=_0x3bc899;if(!this['_started'])return;if(!_0x463b85||typeof _0x463b85[_0x1f4105(0x294)]!==_0x1f4105(0x1ce)||typeof _0x463b85[_0x1f4105(0x2cf)]!==_0x1f4105(0x1ce))return;const {env:_0x395962,type:_0x3c322a}=_0x463b85;if(_0x395962['startsWith']('~')||_0x3c322a[_0x1f4105(0x301)]('~'))return;this[_0x1f4105(0x207)][_0x1f4105(0x345)](_0x395962+'\x00'+_0x3c322a,{'env':_0x395962,'type':_0x3c322a}),this[_0x1f4105(0x295)]();}[_0x3bc899(0x295)](){const _0x3d01e9=_0x3bc899;if(this['_flushTimer'])return;const _0x59d2fb=()=>{const _0x166b5d=_0x423a;this['_flushTimer']=null,this[_0x166b5d(0x230)]()[_0x166b5d(0x2fa)](()=>{});};this['_flushTimer']=setTimeout(_0x59d2fb,this['_flushDebounce']>0x0?this[_0x3d01e9(0x2c2)]:0x0);}async[_0x3bc899(0x230)](){const _0x51ac33=_0x3bc899;if(this[_0x51ac33(0x362)]){this[_0x51ac33(0x295)]();return;}this[_0x51ac33(0x362)]=!![];try{const _0x1722fd=[...this[_0x51ac33(0x207)]['values']()];this[_0x51ac33(0x207)][_0x51ac33(0x210)]();let _0x3a7364=![];for(const {env:_0x4cfd6d,type:_0x5e28fe}of _0x1722fd){try{const _0x3cd6bf=await this[_0x51ac33(0x21a)](_0x4cfd6d,_0x5e28fe);if(_0x3cd6bf)_0x3a7364=!![];}catch{this['_pending'][_0x51ac33(0x345)](_0x4cfd6d+'\x00'+_0x5e28fe,{'env':_0x4cfd6d,'type':_0x5e28fe}),_0x3a7364=!![];}}if(_0x3a7364||this[_0x51ac33(0x207)][_0x51ac33(0x24a)]>0x0)this[_0x51ac33(0x295)]();}finally{this[_0x51ac33(0x362)]=![];}}async['_drainOne'](_0x2c2f3e,_0x1f54ef){const _0x4db0c8=_0x3bc899,_0x5bc6b1=await this[_0x4db0c8(0x33a)][_0x4db0c8(0x2c5)](_0x2c2f3e),_0x431889=_0x2c2f3e+'\x00'+_0x1f54ef;!this[_0x4db0c8(0x25b)][_0x4db0c8(0x2f4)](_0x431889)&&(!this[_0x4db0c8(0x282)]['has'](_0x2c2f3e)&&this[_0x4db0c8(0x282)][_0x4db0c8(0x345)](_0x2c2f3e,_0x5bc6b1[_0x4db0c8(0x236)]()||0x0),this[_0x4db0c8(0x25b)]['set'](_0x431889,this[_0x4db0c8(0x282)][_0x4db0c8(0x2bf)](_0x2c2f3e)));const _0x4c6e2b=this[_0x4db0c8(0x25b)]['get'](_0x431889),_0x1eecad=_0x5bc6b1['getClock'](_0x1f54ef)||0x0;if(_0x1eecad<=_0x4c6e2b)return![];const _0x469b48=_0x4c6e2b+this[_0x4db0c8(0x272)],_0x480970=Math[_0x4db0c8(0x2bc)](_0x1eecad,_0x469b48),_0x43cb7b=_0x801754['enabled']?_0x801754[_0x4db0c8(0x360)]():0x0,_0x2fc4bf=Array['from'](_0x5bc6b1[_0x4db0c8(0x267)](_0x1f54ef,_0x4c6e2b+0x1,_0x480970));let _0x1dd5df=_0x4c6e2b;for(const _0x59c9a4 of _0x2fc4bf){const {clock:_0x5bf7d9,key:_0x38d050,action:_0x133b98,origin:_0x3810c5}=_0x59c9a4;if(_0x5bf7d9>_0x1dd5df)_0x1dd5df=_0x5bf7d9;if(_0x38d050==null)continue;if(!this[_0x4db0c8(0x1d1)](_0x2c2f3e,_0x1f54ef,_0x38d050,_0x5bf7d9))continue;let _0x293fcd,_0xb61736;if(_0x133b98===_0x34caee['REMOVE'])_0x293fcd=_0x4db0c8(0x1e3),_0xb61736=null;else{const _0x258c19=_0x5bc6b1[_0x4db0c8(0x2bf)](_0x1f54ef,_0x38d050);_0x258c19==null?(_0x293fcd=_0x4db0c8(0x1e3),_0xb61736=null):(_0x293fcd='put',_0xb61736=_0x258c19);}this[_0x4db0c8(0x2a6)](_0x4db0c8(0x21b),{'env':_0x2c2f3e,'type':_0x1f54ef,'key':_0x38d050,'op':_0x293fcd,'clock':_0x5bf7d9,'origin':_0x3810c5,'value':_0xb61736});}if(_0x801754[_0x4db0c8(0x2dd)])_0x801754['note'](_0x4db0c8(0x297)+_0x2c2f3e+':'+_0x1f54ef,_0x801754[_0x4db0c8(0x360)]()-_0x43cb7b,'n='+_0x2fc4bf[_0x4db0c8(0x2bd)]);return this[_0x4db0c8(0x25b)][_0x4db0c8(0x345)](_0x431889,Math[_0x4db0c8(0x322)](_0x1dd5df,_0x480970)),_0x5bc6b1[_0x4db0c8(0x236)](_0x1f54ef)>_0x480970;}[_0x3bc899(0x258)](){const _0xcd021b=_0x3bc899;return{'started':this['_started'],'quantum':this['_quantum'],'flushDebounce':this[_0xcd021b(0x2c2)],'cursors':Object[_0xcd021b(0x352)]([...this[_0xcd021b(0x25b)][_0xcd021b(0x350)]()][_0xcd021b(0x25c)](([_0x40155a,_0x28bdc7])=>[_0x40155a[_0xcd021b(0x239)]('\x00',':'),_0x28bdc7])),'pending':this[_0xcd021b(0x207)][_0xcd021b(0x24a)],'seen':this['_seen'][_0xcd021b(0x24a)]};}}return _0x4be66e[_0x3bc899(0x245)]=_0x24a446,okdbChangefeed={'OKDBChangefeed':_0x4be66e},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x44f8e5=_0x25047a;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x55e73a=require$$1,_0x364d82=require$$1$1,{EVENTS:_0x2c7010}=requireOkdbEnums(),_0x47ad5d=require$$0$1,{slotKey:_0x37f9f9}=requireOkdbProcessRegistry(),_0x39cc17=0xfa,_0x3d0880=0xfa0,_0x59017f=0x5,_0x49b66b=0x2710,_0x47beae=0xbb8,_0x3ab5d8=0x7d0,_0x450b1b=_0x44f8e5(0x2b3),_0x3bf429=_0x44f8e5(0x278),_0x5d6a66='log',_0x44a661=_0x44f8e5(0x247),_0x161577=[_0x2c7010[_0x44f8e5(0x321)],_0x2c7010[_0x44f8e5(0x1bf)],_0x2c7010[_0x44f8e5(0x34d)],_0x2c7010[_0x44f8e5(0x23b)],_0x2c7010[_0x44f8e5(0x2a7)],_0x2c7010['INDEX_READY'],_0x2c7010['INDEX_RESET'],_0x2c7010['INDEX_REGISTERED'],_0x44f8e5(0x25f),_0x44f8e5(0x29c),'processor:error','processor:paused',_0x44f8e5(0x2f3),_0x44f8e5(0x211)],_0x4e0541=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x39a46e({workers:_0x30ffe6,makeOkdb:_0x30888f,port:_0x3a97b4,primaryOkdb:_0x160ee2,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x56ddfd=_0x44f8e5;if(_0x55e73a[_0x56ddfd(0x2b7)])return childEntry&&_0x55e73a[_0x56ddfd(0x2a3)]({'exec':_0x364d82[_0x56ddfd(0x21f)](__dirname,_0x56ddfd(0x32f)),'args':[],'execArgv':((()=>{const _0x401b44=_0x56ddfd,_0x62e4a=[];for(let _0x1a18c0=0x0;_0x1a18c0<process['execArgv']['length'];_0x1a18c0++){const _0x5d9f93=process[_0x401b44(0x353)][_0x1a18c0];if(_0x5d9f93[_0x401b44(0x301)](_0x401b44(0x201))||_0x5d9f93[_0x401b44(0x301)](_0x401b44(0x292))||_0x5d9f93[_0x401b44(0x301)](_0x401b44(0x2d4)))continue;if(_0x5d9f93==='-e'||_0x5d9f93===_0x401b44(0x216)||_0x5d9f93==='-p'||_0x5d9f93===_0x401b44(0x330)){_0x1a18c0++;continue;}_0x62e4a[_0x401b44(0x276)](_0x5d9f93);}return _0x62e4a;})())}),_0x5a7778({'workers':_0x30ffe6,'port':_0x3a97b4,'primaryOkdb':_0x160ee2,'workerEnv':workerEnv});return _0xf0ec91({'makeOkdb':_0x30888f,'port':_0x3a97b4});}function _0x5a7778({workers:_0x27206e,port:_0x47d32b,primaryOkdb:_0x404836,workerEnv:_0x5300e2}){const _0x3f1bf7=_0x44f8e5,_0x496c00=new Map(),_0x406df4=new Map();let _0x23da75=![];const _0x28c478=_0x3ebd76=>_0x3ebd76?.['__okdbSlot'],_0x2df735=_0x3e8aaf=>{const _0x249b9c=_0x423a,_0x2d5719=_0x55e73a[_0x249b9c(0x1c8)]({...process.env,..._0x5300e2||{},'OKDB_CLUSTER_SLOT':String(_0x3e8aaf)});return _0x2d5719['__okdbSlot']=_0x3e8aaf,_0x496c00[_0x249b9c(0x345)](_0x2d5719[_0x249b9c(0x220)]['pid'],{'worker':_0x2d5719,'startedAt':Date[_0x249b9c(0x360)](),'slot':_0x3e8aaf}),_0x2d5719['on'](_0x249b9c(0x2f8),_0x120b1c=>{const _0x4b9272=_0x249b9c;console[_0x4b9272(0x1f2)](_0x4b9272(0x303)+_0x2d5719[_0x4b9272(0x220)]['pid']+_0x4b9272(0x231)+(_0x120b1c?.[_0x4b9272(0x1ff)]??_0x120b1c));}),_0x2d5719['on'](_0x249b9c(0x226),()=>_0x2e7004()),_0x2d5719;},_0xcc9649=_0x3226b6=>{const _0x54c0c0=_0x423a;for(const {worker:_0x566db9}of _0x496c00['values']()){if(_0x566db9['isDead']()||!_0x566db9[_0x54c0c0(0x1f3)]())continue;try{_0x566db9[_0x54c0c0(0x1cb)](_0x3226b6);}catch{}}};_0x404836?.[_0x3f1bf7(0x2f0)]?.({'kind':_0x3f1bf7(0x324),'listenAddr':':'+_0x47d32b})[_0x3f1bf7(0x2fa)](()=>{}),_0x404836?.[_0x3f1bf7(0x311)]?.[_0x3f1bf7(0x319)]?.({'workersConfigured':_0x27206e});const _0xe0d9d3={'engines':![],'asyncProcessors':![],'compaction':_0x3f1bf7(0x32d),'http':!![]},_0x2e7004=()=>{const _0x433e5c=_0x3f1bf7,_0x124572=_0x404836?.[_0x433e5c(0x311)];if(!_0x124572||!_0x124572['_isWriter'])return;const _0x461c68=_0x124572[_0x433e5c(0x336)];for(const {worker:_0x19c8fd,startedAt:_0x3659d7,slot:_0x19c78a,stats:_0x519170}of _0x496c00[_0x433e5c(0x22a)]()){if(_0x19c8fd[_0x433e5c(0x2b1)]())continue;const _0xfd1dc7=_0x124572['hasDesired']?.()&&_0x124572['getDesired'](_0x433e5c(0x1c1),_0x1740d5(_0x19c78a))?.[_0x433e5c(0x275)]===!![];_0x124572[_0x433e5c(0x1f8)]({'pid':_0x19c8fd[_0x433e5c(0x220)][_0x433e5c(0x2e0)],'startedAt':_0x3659d7,'kind':_0x433e5c(0x346),'supervisorKey':_0x461c68,'slot':_0x19c78a,'slotKey':_0x1740d5(_0x19c78a),'role':_0xe0d9d3,'listenAddr':':'+_0x47d32b,'lifecycle':_0xfd1dc7?_0x433e5c(0x1bc):'running','stats':_0x519170??null})[_0x433e5c(0x2fa)](()=>{});}},_0x1740d5=_0x2bb137=>_0x37f9f9(_0x3f1bf7(0x264)+_0x47d32b,_0x2bb137),_0xd702c=_0x47536a=>{const _0x19173b=_0x3f1bf7,_0x2dbb82=_0x404836?.[_0x19173b(0x311)];if(!_0x2dbb82?.[_0x19173b(0x29f)]?.())return![];return _0x2dbb82['getDesired'](_0x19173b(0x1c1),_0x1740d5(_0x47536a))?.['decommission']===!![];};for(let _0xf33742=0x0;_0xf33742<_0x27206e;_0xf33742++){const _0x1a2989=_0xd702c(_0xf33742);_0x406df4[_0x3f1bf7(0x345)](_0xf33742,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1a2989,'respawnTimer':null}),_0x1a2989?console[_0x3f1bf7(0x1f2)](_0x3f1bf7(0x261)+_0xf33742+_0x3f1bf7(0x31b)):_0x2df735(_0xf33742);}const _0x6ad98b=()=>{const _0xfe8163=_0x3f1bf7,_0x484fc7=_0x404836?.['processes'];if(!_0x484fc7?.[_0xfe8163(0x242)]||!_0x484fc7[_0xfe8163(0x29f)]?.())return;for(const [_0x144966,_0x4ae323]of _0x406df4['entries']()){const _0x1e133d=_0x484fc7['getDesired']('slot',_0x1740d5(_0x144966)),_0x3d9033=_0x1e133d?.['decommission']===!![],_0x2725a0=_0x1e133d?.['kill']===!![];if(_0x3d9033&&!_0x4ae323[_0xfe8163(0x314)]){_0x4ae323[_0xfe8163(0x314)]=!![];_0x4ae323[_0xfe8163(0x22f)]&&(clearTimeout(_0x4ae323['respawnTimer']),_0x4ae323[_0xfe8163(0x22f)]=null);for(const {worker:_0x196075}of _0x496c00[_0xfe8163(0x22a)]()){if(_0x28c478(_0x196075)!==_0x144966||_0x196075[_0xfe8163(0x2b1)]())continue;try{if(_0x2725a0)_0x196075[_0xfe8163(0x220)][_0xfe8163(0x1e8)](_0xfe8163(0x2c7));else _0x196075['isConnected']()&&_0x196075['disconnect']();}catch{}}console['log'](_0xfe8163(0x2d0)+(_0x2725a0?'hard-killed':_0xfe8163(0x35d))+_0xfe8163(0x232)+_0x144966+_0xfe8163(0x2d9));}else{if(!_0x3d9033&&_0x4ae323[_0xfe8163(0x314)]&&_0x1e133d){_0x4ae323[_0xfe8163(0x314)]=![],_0x4ae323[_0xfe8163(0x241)]=[],_0x4ae323['consecutiveFailures']=0x0;const _0x4b879b=[..._0x496c00['values']()]['some'](({worker:_0x3cb879})=>_0x28c478(_0x3cb879)===_0x144966&&!_0x3cb879[_0xfe8163(0x2b1)]());!_0x4b879b&&!_0x23da75&&(_0x2df735(_0x144966),console[_0xfe8163(0x1f2)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x144966));}}}},_0x517c9=()=>{try{_0x6ad98b();}catch{}};_0x404836?.[_0x3f1bf7(0x1c7)]?.['on']?.(_0x2c7010[_0x3f1bf7(0x35e)],_0x517c9);const _0x1bd0cc=[];if(_0x404836?.[_0x3f1bf7(0x1c7)]?.['on'])for(const _0x21cb63 of _0x161577){const _0x1cb636=_0x4d1f1e=>{_0xcc9649({[_0x450b1b]:_0x3bf429,'event':_0x21cb63,'data':_0x4d1f1e??{}});};_0x404836[_0x3f1bf7(0x1c7)]['on'](_0x21cb63,_0x1cb636),_0x1bd0cc['push']({'event':_0x21cb63,'handler':_0x1cb636});}const _0x65dc14=setInterval(()=>{_0x6ad98b(),_0x2e7004();},_0x4e0541);_0x65dc14[_0x3f1bf7(0x337)]?.();const _0x1b0041=(_0x5de2bd,_0x1fd03d)=>{const _0x2aae62=_0x3f1bf7;if(!_0x1fd03d||typeof _0x1fd03d!==_0x2aae62(0x1ee)||_0x1fd03d[_0x450b1b]!==_0x5d6a66)return;if(!_0x404836?.['log']?.['ingest'])return;const _0xae4243=_0x1fd03d['entry']||{};_0x404836[_0x2aae62(0x1f2)]['ingest']({..._0xae4243,'msg':'[w'+_0x1fd03d['slot']+']\x20'+(_0xae4243[_0x2aae62(0x280)]??''),'meta':{..._0xae4243['meta']||{},'worker':_0x1fd03d['slot'],'workerPid':_0x1fd03d[_0x2aae62(0x2e0)]}});};_0x55e73a['on']('message',_0x1b0041);const _0x549d0f=(_0x3c9df6,_0x293f3c)=>{const _0x4cef6d=_0x3f1bf7;if(!_0x293f3c||typeof _0x293f3c!=='object'||_0x293f3c[_0x450b1b]!==_0x44a661)return;const _0x1e1e1e=_0x496c00['get'](_0x3c9df6[_0x4cef6d(0x220)]['pid']);if(_0x1e1e1e)_0x1e1e1e[_0x4cef6d(0x247)]={..._0x293f3c[_0x4cef6d(0x247)],'at':Date['now']()};};_0x55e73a['on'](_0x3f1bf7(0x1ff),_0x549d0f),_0x55e73a['on']('exit',(_0x404e13,_0x51edd8,_0xb11205)=>{const _0x2fdc80=_0x3f1bf7,_0x550332=_0x404e13[_0x2fdc80(0x220)]['pid'],_0x53359b=_0x28c478(_0x404e13),_0x5a318d=_0x496c00[_0x2fdc80(0x2bf)](_0x550332);if(_0x5a318d&&_0x404836?.[_0x2fdc80(0x311)])_0x404836['processes'][_0x2fdc80(0x1db)](_0x550332+':'+_0x5a318d['startedAt'])['catch'](()=>{});_0x496c00['delete'](_0x550332),console[_0x2fdc80(0x1f2)]('[okdb-cluster]\x20worker\x20pid='+_0x550332+'\x20(slot='+(_0x53359b??'?')+')\x20exited\x20'+(_0x2fdc80(0x290)+_0x51edd8+_0x2fdc80(0x30c)+(_0xb11205??_0x2fdc80(0x2fe))+_0x2fdc80(0x2b6)+_0x496c00[_0x2fdc80(0x24a)]+'\x20worker(s)\x20remaining')),_0x2e7004();if(_0x23da75||_0x53359b==null)return;const _0x386e77=_0x406df4['get'](_0x53359b);if(!_0x386e77||_0x386e77[_0x2fdc80(0x314)])return;const _0x4e4fc2=Date[_0x2fdc80(0x360)]();_0x386e77['deaths'][_0x2fdc80(0x276)](_0x4e4fc2),_0x386e77[_0x2fdc80(0x241)]=_0x386e77['deaths']['filter'](_0x57bf63=>_0x4e4fc2-_0x57bf63<=_0x49b66b);if(_0x386e77[_0x2fdc80(0x241)][_0x2fdc80(0x2bd)]>=_0x59017f){_0x386e77[_0x2fdc80(0x314)]=!![],console['error'](_0x2fdc80(0x2fd)+_0x53359b+'\x20died\x20'+_0x386e77[_0x2fdc80(0x241)]['length']+_0x2fdc80(0x1d6)+(_0x49b66b+_0x2fdc80(0x20b)+_0x496c00[_0x2fdc80(0x24a)]+'\x20worker(s)\x20still\x20serving'));return;}_0x386e77['consecutiveFailures']++;const _0x4938ad=Math['min'](_0x3d0880,_0x39cc17*0x2**(_0x386e77['consecutiveFailures']-0x1));console[_0x2fdc80(0x1f2)](_0x2fdc80(0x289)+_0x53359b+'\x20in\x20'+_0x4938ad+_0x2fdc80(0x306)+_0x386e77[_0x2fdc80(0x23a)]+')'),_0x386e77['respawnTimer']=setTimeout(()=>{const _0x1ce95b=_0x2fdc80;_0x386e77[_0x1ce95b(0x22f)]=null;if(_0x23da75||_0x386e77[_0x1ce95b(0x314)])return;const _0x5cf3e3=_0x2df735(_0x53359b);_0x5cf3e3[_0x1ce95b(0x2c0)](_0x1ce95b(0x2b8),()=>{const _0x1dbe3b=_0x1ce95b;if(_0x406df4['get'](_0x53359b)===_0x386e77)_0x386e77[_0x1dbe3b(0x23a)]=0x0;});},_0x4938ad),_0x386e77[_0x2fdc80(0x22f)][_0x2fdc80(0x337)]?.();});const _0x4961d4=[..._0x496c00[_0x3f1bf7(0x364)]()];console[_0x3f1bf7(0x1f2)](_0x3f1bf7(0x2f6)+process[_0x3f1bf7(0x2e0)]+_0x3f1bf7(0x361)+_0x27206e+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x47d32b+':\x20'+('['+_0x4961d4[_0x3f1bf7(0x21f)](',\x20')+']'));const _0x3359ff={'_isClusterController':!![],'port':_0x47d32b,'primaryOkdb':_0x404836??null,'status'(){const _0x533fcb=_0x3f1bf7;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x47d32b,'primaryRole':_0x404836?.[_0x533fcb(0x2ee)]??null,'processorPid':_0x404836?process[_0x533fcb(0x2e0)]:null,'workers':[..._0x496c00[_0x533fcb(0x22a)]()]['map'](({worker:_0x2033b8})=>({'pid':_0x2033b8[_0x533fcb(0x220)][_0x533fcb(0x2e0)],'id':_0x2033b8['id'],'dead':_0x2033b8[_0x533fcb(0x2b1)]()}))};},async 'close'(){const _0x3836b9=_0x3f1bf7;_0x23da75=!![];for(const _0x116025 of _0x406df4[_0x3836b9(0x22a)]()){_0x116025[_0x3836b9(0x314)]=!![],_0x116025[_0x3836b9(0x22f)]&&(clearTimeout(_0x116025['respawnTimer']),_0x116025['respawnTimer']=null);}clearInterval(_0x65dc14),_0x55e73a[_0x3836b9(0x2d7)]('message',_0x1b0041),_0x55e73a[_0x3836b9(0x2d7)](_0x3836b9(0x1ff),_0x549d0f),_0x404836?.[_0x3836b9(0x1c7)]?.[_0x3836b9(0x2d7)]?.(_0x2c7010[_0x3836b9(0x35e)],_0x517c9);if(_0x404836?.[_0x3836b9(0x1c7)]?.[_0x3836b9(0x2d7)])for(const {event:_0x2dd3c2,handler:_0x3ff8e5}of _0x1bd0cc){try{_0x404836[_0x3836b9(0x1c7)][_0x3836b9(0x2d7)](_0x2dd3c2,_0x3ff8e5);}catch{}}_0x1bd0cc['length']=0x0;const _0x2d7b63=[..._0x496c00[_0x3836b9(0x22a)]()][_0x3836b9(0x25c)](({worker:_0x1e6259})=>_0x1e6259);if(_0x2d7b63['length']===0x0)return;await Promise[_0x3836b9(0x296)](_0x2d7b63[_0x3836b9(0x25c)](_0x1d6d56=>new Promise(_0x273b36=>{const _0x283d7b=_0x3836b9;if(_0x1d6d56[_0x283d7b(0x2b1)]()){_0x273b36();return;}let _0x3fe0cd=![];const _0x5c602e=()=>{if(_0x3fe0cd)return;_0x3fe0cd=!![];if(_0x3b3b76)clearTimeout(_0x3b3b76);_0x273b36();};_0x1d6d56['once'](_0x283d7b(0x325),_0x5c602e);const _0x3b3b76=setTimeout(()=>{const _0x168dc8=_0x283d7b;try{_0x1d6d56[_0x168dc8(0x220)]['kill']();}catch{}},_0x47beae+0x1f4);_0x3b3b76[_0x283d7b(0x337)]?.();try{_0x1d6d56['disconnect']();}catch{try{_0x1d6d56[_0x283d7b(0x220)][_0x283d7b(0x1e8)]();}catch{}}})));}};return _0x3359ff;}async function _0xf0ec91({makeOkdb:_0x5e51f3,port:_0xcf1592}){const _0x4cf811=_0x44f8e5,_0x47a485=await _0x5e51f3();return _0x1c9900(_0x47a485),_0x47a485[_0x4cf811(0x1f5)]['listen'](_0xcf1592);}function _0x1c9900(_0x285a24){const _0x5815b1=_0x44f8e5;if(!_0x285a24||_0x285a24['_clusterWorkerAttached'])return;_0x285a24[_0x5815b1(0x348)]=!![];try{const {OKDBChangefeed:_0x382010}=requireOkdbChangefeed(),_0xa0c3b9=_0x285a24[_0x5815b1(0x1fc)];if(_0xa0c3b9&&typeof _0xa0c3b9[_0x5815b1(0x21c)]===_0x5815b1(0x1d3)){const _0x5b1b7d=new _0x382010(_0x285a24);_0x5b1b7d[_0x5815b1(0x252)](),_0xa0c3b9['attachFeed'](_0x5b1b7d),_0x285a24[_0x5815b1(0x219)]=_0x5b1b7d;}}catch(_0x39adf1){_0x285a24['log']?.['warn']?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x39adf1?.[_0x5815b1(0x1ff)]??_0x39adf1),{'feature':_0x5815b1(0x1e5)});}const _0x82f5ed=_0x2d188c=>{const _0x821fc1=_0x5815b1;if(!_0x2d188c||typeof _0x2d188c!==_0x821fc1(0x1ee)||_0x2d188c[_0x450b1b]==null)return;if(_0x2d188c[_0x450b1b]===_0x3bf429)try{_0x285a24[_0x821fc1(0x1fc)]?.[_0x821fc1(0x27b)]?.(_0x2d188c[_0x821fc1(0x23e)],_0x2d188c[_0x821fc1(0x26f)]);}catch{}};process['on'](_0x5815b1(0x1ff),_0x82f5ed),_0x285a24[_0x5815b1(0x246)]=_0x82f5ed;{let _0x498b47=process[_0x5815b1(0x2d2)](),_0x5ae0db=Date[_0x5815b1(0x360)]();const _0x47d9a4=()=>{const _0x385b1a=_0x5815b1;if(typeof process['send']!=='function'||!process[_0x385b1a(0x312)])return;const _0x236403=Date[_0x385b1a(0x360)](),_0x31ea64=process['cpuUsage'](),_0x5f5852=(_0x236403-_0x5ae0db)*0x3e8,_0x490ccc=_0x31ea64['user']-_0x498b47[_0x385b1a(0x1fb)]+(_0x31ea64[_0x385b1a(0x212)]-_0x498b47[_0x385b1a(0x212)]),_0x3ee6a7=_0x5f5852>0x0?Math[_0x385b1a(0x2bc)](0x64,Math[_0x385b1a(0x2ae)](_0x490ccc/(_0x5f5852*(_0x47ad5d[_0x385b1a(0x214)]()[_0x385b1a(0x2bd)]||0x1))*0x64)):0x0;_0x498b47=_0x31ea64,_0x5ae0db=_0x236403;const _0x5768d0=process[_0x385b1a(0x206)]();try{process['send']({[_0x450b1b]:_0x44a661,'stats':{'rss':_0x5768d0[_0x385b1a(0x1d5)],'heapUsed':_0x5768d0['heapUsed'],'heapTotal':_0x5768d0['heapTotal'],'external':_0x5768d0[_0x385b1a(0x266)],'cpuPct':_0x3ee6a7,'cpuWindowMs':Math[_0x385b1a(0x2ae)](_0x5f5852/0x3e8)||null}});}catch{}},_0xfb307d=Math[_0x5815b1(0x322)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3fd16a=setInterval(_0x47d9a4,_0xfb307d);_0x3fd16a[_0x5815b1(0x337)]?.(),_0x47d9a4();}let _0x787d2e=![];const _0x3c1391=async _0x2ba56a=>{const _0x241dab=_0x5815b1;if(_0x787d2e)return;_0x787d2e=!![];const _0x18e381=setTimeout(()=>process[_0x241dab(0x325)](_0x2ba56a),_0x47beae);_0x18e381[_0x241dab(0x337)]?.();try{await _0x285a24[_0x241dab(0x21e)]?.();}catch{}process[_0x241dab(0x325)](_0x2ba56a);};process['on'](_0x5815b1(0x1cd),()=>_0x3c1391(0x0));if(process['platform']!=='win32'){const _0x264318=setInterval(()=>{const _0x16998c=_0x5815b1;if(process[_0x16998c(0x2fb)]===0x1)_0x3c1391(0x0);},_0x3ab5d8);_0x264318[_0x5815b1(0x337)]?.(),_0x285a24['_clusterOrphanWatch']=_0x264318;}}return okdbCluster={'runClustered':_0x39a46e,'attachWorkerCluster':_0x1c9900},okdbCluster;}function _0x5cb1(){const _0x99a941=['started','env','_scheduleFlush','all','feed:','maxExtra','put','1269460NNePMD','ms\x20busy=','processor:progress','20178sMeoHt','setTtl','hasDesired','node:perf_hooks','processKey','lag','setupPrimary','halted','asyncProcessors','emit','INDEX_PROGRESS','view:progress','_nodeDb','system:proc','filter','registry-publish','ITEM_REMOVE','round','1086585IfaMKt','add','isDead','registerType','__okdbCluster','node/','hasOwnProperty',');\x20','isPrimary','listening','processorsView','124556Hqcptv','count','min','length','_lastPublishAt','get','once','1756958ZfLEjr','_flushDebounce','_started','async','_openEnvLazy','index:drop','SIGKILL','threads','registerFts','_caps','note','setDesired','quantum','~processes:desired','type','[okdb-cluster]\x20','_ensureDesired','cpuUsage','_lastCpuAt','--inspect','_putRowAsync','_groupByProcess','off','fts:reset','\x20(durable\x20desired-state)','assign','cpuPct','building','enabled','3jZUxsv','__esModule','pid','ms\x20max=','nodeKey','prototype','removeSync','registerIndex','code','_processingPolicy','_admissionStarted','stderr','find','unique:violation','cli','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','role','_buildProcessingFacet','_activateProcesses','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','_kind','processor:resumed','has','attach','[okdb-cluster]\x20primary\x20pid=','_processStartedAt','error','_buildOwnRow','catch','ppid','single','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','none','rowKey','version','startsWith','9MycWIe','[okdb-cluster]\x20worker\x20pid=','resetIndex','putNode','ms\x20(attempt\x20','_statusEnv','uptime','_rowKey','freeze','ready',',\x20signal=','getRange','worker','reset','onWindow','processes','connected','cpuWindowMs','dead','_startedAt','then','_instanceId','offWindow','setOwnMeta','envsOpen','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','expiresAt','includes','killable','_handlePoke','claims','VIEW_PROGRESS','max','\x20│\x20','primary','exit','default','label','_admissionTimer','detachConsole','getDesired','crypto','creating','passive','bus:poke','okdb-http-worker-child.js','--print','register','~processes:cmd','waiting','index:ready','SYSTEM_STOPPED','selfKey','unref','_getType','license:added','okdb','percentile','slice','meta','runtimeProcessesView','system:type_drop','dropIndex','ms\x20p99=','index:progress','stopped','open','set','http-server','_dedupeMax','_clusterWorkerAttached','_lastCpuWindowMs','processor','_lastCpuUsage','transactionSync','FTS_DROP','policy','bus:drain','entries','bumpCmd','fromEntries','execArgv','listenAddr','bus:proc','schema:drop','ms/','value','dropFts','schema:set','stopHeartbeat','openDB','decommissioned','SYSTEM_PROC','inst:','now','\x20forked\x20','_draining','node:events','keys','fts:drop','loop-lag\x20','decommissioning','dropSchema','lastClock','FTS_REGISTERED','_removeRowAsync','slot','stopping','txn:end','_publishNow','system:clock_change','treeView','events','fork','enable','exports','send','_onProcEvent','disconnect','string','SYSTEM_POKE','listDesired','_markSeen','addSupervisedChild','function','state','rss','\x20times\x20in\x20','_selfKey','parse','_flushTimer','running','removeNode','./okdb','http\x20worker\x20child\x20failed:\x20','stop','starting','setLogger','_envs','_isReader','remove','env:opened','cluster','_buckets','ttl:expired','kill','standalone','_children','_onTick','license:activated','_onPoke','object','noteListenAddr','_cmd','dedupeMax','log','isConnected','_onItem','http','ms\x20mean=','reap','publishChildRow','5947208CczHHd','_ownMeta','user','_adminRelay','randomUUID','workers','message','info','--test','compaction','heapTotal','heapUsed','ESRCH','memoryUsage','_pending','setSchema','caps','cursorKey','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','ITEM_UPDATE','_nodeDbFor','_listenAddr','maxMs','clear','processor:retry','system','claimGated','cpus','fn-runner','--eval','_handleInProcess','txn:rollback','_changefeed','_drainOne','change','attachFeed','path','close','join','process','_report','startHeartbeat','index:registered','clearTtl','_supervisorKey','online','call','force','_maybePublish','values','loop-lag','processing','embedded','ttl:set','respawnTimer','_drain','\x20ipc\x20error:\x20','\x20worker\x20slot=','workersConfigured','updateSupervisedChildStats','hasType','getClock','tierList','number','replace','consecutiveFailures','FTS_RESET','hostname','engines','event','getProcess','removeSupervisedChild','deaths','_isWriter','_log','_sampleOwnStats','CHANGEFEED_QUANTUM','_clusterOnMessage','stats','host','system:drain','size','_desired','unique:violation_resolved','reportThreadStats','fast','1035nJHIPp','cluster-wide','delete','start','level','_threadStats','item:create','createEnvironment','_windowCbs','status','stringify','mode','_cursors','map','listen','_buildChildRow','processor:ready','txn:start','[okdb-cluster]\x20slot=','resetting','license:removed','cluster:','listNodes','external','getChanges','startedAt','deregisterSelf','_nodeDead','queue-worker','11944370jFcNRL','ITEM_CREATE','node','data','_onStop','instanceId','_quantum','reduce','_hbTimer','decommission','push','system:stopped','ephemeral','1ofN:','license:invalid','pushEphemeral','kind','headClock','system:bus_state_change','sort','msg','supervisorKey','_baselines','_nodeDbCache','system:poke','_seen','children','true','type:registered','[okdb-cluster]\x20respawning\x20worker\x20slot=','toFixed','(worst\x20','isWorker','ref:violation','options','_timer','(code=','_lastCpuPct','--watch'];_0x5cb1=function(){return _0x99a941;};return _0x5cb1();}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x47ed1d=require$$0$3,{attachWorkerCluster:_0x1db6e1}=requireOkdbCluster();async function _0x5a49db(){const _0x1f2d9d=_0x423a,_0x1bb552=process.env.OKDB_HTTP_CHILD;if(!_0x1bb552)throw new Error(_0x1f2d9d(0x2ed));const {rootPath:_0x59cf87,port:_0x4b5f8b,options:options={},logLevel:logLevel=_0x1f2d9d(0x200)}=JSON[_0x1f2d9d(0x1d8)](_0x1bb552);if(!_0x59cf87||!_0x4b5f8b)throw new Error(_0x1f2d9d(0x2f1));const _0x599654=new _0x47ed1d(_0x59cf87,{...options,'engines':![],'asyncProcessors':![],'compaction':_0x1f2d9d(0x32d),'bus':!![]});_0x599654['log'][_0x1f2d9d(0x329)]?.();const _0x442b4b=process.env.OKDB_CLUSTER_SLOT??'?',_0x3a1841={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x40c991=_0x3a1841[logLevel]??_0x3a1841['info'];_0x599654['log'][_0x1f2d9d(0x2f5)](_0x17b050=>{const _0x285233=_0x1f2d9d;if((_0x3a1841[_0x17b050[_0x285233(0x253)]]??0x1)<_0x40c991)return;try{process['send']?.({'__okdbCluster':_0x285233(0x1f2),'slot':_0x442b4b,'pid':process[_0x285233(0x2e0)],'entry':_0x17b050});}catch{}}),await _0x599654[_0x1f2d9d(0x344)](),_0x1db6e1(_0x599654),await _0x599654[_0x1f2d9d(0x1f5)][_0x1f2d9d(0x25d)](_0x4b5f8b);}return _0x5a49db()['catch'](_0x4c2d02=>{const _0x5b2d29=_0x423a;try{process[_0x5b2d29(0x1cb)]?.({'__okdbCluster':_0x5b2d29(0x1f2),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x5b2d29(0x2e0)],'entry':{'level':_0x5b2d29(0x2f8),'msg':_0x5b2d29(0x1dd)+(_0x4c2d02?.[_0x5b2d29(0x1ff)]??_0x4c2d02)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);function _0x423a(_0x2ff881,_0x21a927){_0x2ff881=_0x2ff881-0x1bc;const _0x5cb1b5=_0x5cb1();let _0x423a90=_0x5cb1b5[_0x2ff881];return _0x423a90;}module[_0x25047a(0x1ca)]=okdbHttpWorkerChild;
@@ -0,0 +1 @@
1
+ "use strict";function loadHandler(e,o){const n=require(e);if(o&&"default"!==o){const e=n?.[o];if("function"!=typeof e)throw new Error(`Spawned queue worker export not found or not a function: ${o}`);return e}if("function"==typeof n)return n;if("function"==typeof n?.default)return n.default;throw new Error("Spawned queue worker module must export a function or default function")}module.exports={loadHandler:loadHandler};
@@ -1 +1 @@
1
- "use strict";const path=require("node:path"),OKDB=require(path.join(__dirname,"okdb.js"));let db=null,worker=null,stopping=!1;function send(e){try{"function"==typeof process.send&&process.send(e)}catch{}}async function gracefulShutdown(e){if(stopping)return;stopping=!0;const n=setTimeout(()=>process.exit(e),3e3);"function"==typeof n.unref&&n.unref();try{await(worker?.stop?.())}catch{}try{await(db?.close?.())}catch{}process.exit(e)}function loadHandler(e,n){const o=require(e);if(n&&"default"!==n){const e=o?.[n];if("function"!=typeof e)throw new Error(`Spawned queue worker export not found or not a function: ${n}`);return e}if("function"==typeof o)return o;if("function"==typeof o?.default)return o.default;throw new Error("Spawned queue worker module must export a function or default function")}async function main(){const e=process.env.OKDB_QUEUE_DB_PATH,n=process.env.OKDB_QUEUE_ENV_NAME||"default",o=process.env.OKDB_QUEUE_TYPE,r=process.env.OKDB_QUEUE_MODULE,t=process.env.OKDB_QUEUE_EXPORT||"default",s=JSON.parse(process.env.OKDB_QUEUE_WORKER_OPTIONS||"{}");if(!e)throw new Error("Missing OKDB_QUEUE_DB_PATH");if(!o)throw new Error("Missing OKDB_QUEUE_TYPE");if(!r)throw new Error("Missing OKDB_QUEUE_MODULE");process.on("disconnect",()=>gracefulShutdown(0));const c=setInterval(()=>{1===process.ppid&&gracefulShutdown(0)},2e3);"function"==typeof c.unref&&c.unref(),db=new OKDB(e,{runtimeDeclarations:!1,compaction:"passive"}),await db.open();const u=db.env(n);if(!u?.queue)throw new Error(`Queue environment not available: ${n}`);const a=loadHandler(r,t);worker=u.queue.worker(o,a,s),process.on("message",e=>{e&&"object"==typeof e&&"stop"===e.type&&gracefulShutdown(0)}),process.on("SIGINT",()=>gracefulShutdown(0)),process.on("SIGTERM",()=>gracefulShutdown(0)),send({type:"ready",pid:process.pid,envName:n,queueType:o})}main().catch(async e=>{send({type:"error",error:{message:e?.message||String(e),stack:e?.stack||null,code:e?.code||null}});try{await(worker?.stop?.())}catch{}try{await(db?.close?.())}catch{}process.exit(1)});
1
+ "use strict";const path=require("node:path"),OKDB=require(path.join(__dirname,"okdb.js"));let db=null,worker=null,stopping=!1;function send(e){try{"function"==typeof process.send&&process.send(e)}catch{}}async function gracefulShutdown(e){if(stopping)return;stopping=!0;const s=setTimeout(()=>process.exit(e),3e3);"function"==typeof s.unref&&s.unref();try{await(worker?.stop?.())}catch{}try{await(db?.close?.())}catch{}process.exit(e)}function startStatsReporter(e){const s=require("node:os");let t=process.cpuUsage(),n=Date.now();const r=()=>{const r=Date.now(),o=process.cpuUsage(),a=1e3*(r-n),c=o.user-t.user+(o.system-t.system),p=a>0?Math.min(100,Math.round(c/(a*(s.cpus().length||1))*100)):0;t=o,n=r;const u=process.memoryUsage();e({type:"stats",stats:{rss:u.rss,heapUsed:u.heapUsed,heapTotal:u.heapTotal,external:u.external,cpuPct:p,cpuWindowMs:Math.round(a/1e3)||null}})},o=Math.max(1e3,Number(process.env.OKDB_STATS_INTERVAL_MS)||5e3),a=setInterval(r,o);a.unref&&a.unref(),r()}const{loadHandler:loadHandler}=require("./okdb-queue-load-handler.js");async function main(){const e=process.env.OKDB_QUEUE_DB_PATH,s=process.env.OKDB_QUEUE_ENV_NAME||"default",t=process.env.OKDB_QUEUE_TYPE,n=process.env.OKDB_QUEUE_MODULE,r=process.env.OKDB_QUEUE_EXPORT||"default",o=JSON.parse(process.env.OKDB_QUEUE_WORKER_OPTIONS||"{}");if(!e)throw new Error("Missing OKDB_QUEUE_DB_PATH");if(!t)throw new Error("Missing OKDB_QUEUE_TYPE");if(!n)throw new Error("Missing OKDB_QUEUE_MODULE");process.on("disconnect",()=>gracefulShutdown(0));const a=setInterval(()=>{1===process.ppid&&gracefulShutdown(0)},2e3);"function"==typeof a.unref&&a.unref(),db=new OKDB(e,{runtimeDeclarations:!1,compaction:"passive",engines:!1,asyncProcessors:!1,http:!1,envs:[s]}),await db.open();const c=db.env(s);if(!c?.queue)throw new Error(`Queue environment not available: ${s}`);const p=loadHandler(n,r);worker=c.queue.process(t,p,o),process.on("message",e=>{e&&"object"==typeof e&&"stop"===e.type&&gracefulShutdown(0)}),process.on("SIGINT",()=>gracefulShutdown(0)),process.on("SIGTERM",()=>gracefulShutdown(0)),send({type:"ready",pid:process.pid,envName:s,queueType:t}),startStatsReporter(send)}main().catch(async e=>{send({type:"error",error:{message:e?.message||String(e),stack:e?.stack||null,code:e?.code||null}});try{await(worker?.stop?.())}catch{}try{await(db?.close?.())}catch{}process.exit(1)});
@@ -1 +1 @@
1
- 'use strict';const _0x3f00ba=_0xdf7d;(function(_0x192dea,_0x3035de){const _0x51838e=_0xdf7d,_0xc2add0=_0x192dea();while(!![]){try{const _0x486458=parseInt(_0x51838e(0x176))/0x1*(parseInt(_0x51838e(0x177))/0x2)+parseInt(_0x51838e(0x157))/0x3+-parseInt(_0x51838e(0x158))/0x4+parseInt(_0x51838e(0x152))/0x5*(-parseInt(_0x51838e(0x14b))/0x6)+parseInt(_0x51838e(0x18b))/0x7+-parseInt(_0x51838e(0x16a))/0x8*(parseInt(_0x51838e(0x15e))/0x9)+parseInt(_0x51838e(0x179))/0xa;if(_0x486458===_0x3035de)break;else _0xc2add0['push'](_0xc2add0['shift']());}catch(_0x36866f){_0xc2add0['push'](_0xc2add0['shift']());}}}(_0x5548,0x1efad));function _0x5548(){const _0x1fa55d=['dropSchema','resetting','1696984xRSfuj','item:create','type:registered','dropFts','_runBootstrapScanPhases','dropIndex','done','postMessage','passive','txn:start','index:ready','ref:violation_resolved','22GOofsX','3226knYIos','fts:drop','3950530rpUKRi','_activateViewStorage','open','error','clearTtl','exit','worker_threads','index:progress','index:reset','unique:violation','default','dropType','ready','close','progress','system:poke','fts:registered','system:ready','995295SbCgKA','starting','ttl:expired','item:remove','./okdb','stopping','ttl:clear','txn:rollback','halted','system:drain','waiting','resetFts','license:invalid','license:added','env','resetIndex','env:removed','view:progress','message','62886uirbjB','stack','call','ref:violation','put','ttl:set','views','35FlSXbh','unique:violation_resolved','exports','item:update','system:type_drop','160704fQLgaE','855636eIfHrk','schema:set','system:bus_state_change','VIEW_PROGRESS','fts:reset','stopped','9OOOvUH','index:registered','created','registerType','hasOwnProperty','registerIndex','events','sync:apply','license:removed','license:activated'];_0x5548=function(){return _0x1fa55d;};return _0x5548();}var require$$0=require(_0x3f00ba(0x17f)),require$$1=require(_0x3f00ba(0x18f));function getDefaultExportFromCjs(_0x2a26d5){const _0x1586fd=_0x3f00ba;return _0x2a26d5&&_0x2a26d5['__esModule']&&Object['prototype'][_0x1586fd(0x162)][_0x1586fd(0x14d)](_0x2a26d5,'default')?_0x2a26d5[_0x1586fd(0x183)]:_0x2a26d5;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x578ab4=_0x3f00ba;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x1fe377={'PUT':_0x578ab4(0x14f),'REMOVE':'remove','INDEX_DROP':_0x578ab4(0x16f),'INDEX_REGISTER':_0x578ab4(0x163),'INDEX_RESET':_0x578ab4(0x19a),'TYPE_REGISTER':_0x578ab4(0x161),'TYPE_DROP':_0x578ab4(0x184),'FTS_REGISTER':'registerFts','FTS_DROP':_0x578ab4(0x16d),'FTS_RESET':_0x578ab4(0x196),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x578ab4(0x168),'TTL_SET':'setTtl','TTL_CLEAR':_0x578ab4(0x17d)},_0x3c6ae1={'SYSTEM_READY':_0x578ab4(0x18a),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x578ab4(0x188),'SYSTEM_DRAIN':_0x578ab4(0x194),'SYSTEM_TYPE_DROP':_0x578ab4(0x156),'SYSTEM_BUS_STATE_CHANGE':_0x578ab4(0x15a),'ITEM_CREATE':_0x578ab4(0x16b),'ITEM_UPDATE':_0x578ab4(0x155),'ITEM_REMOVE':_0x578ab4(0x18e),'INDEX_RESET':_0x578ab4(0x181),'INDEX_READY':_0x578ab4(0x174),'INDEX_PROGRESS':_0x578ab4(0x180),'VIEW_PROGRESS':_0x578ab4(0x19c),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x578ab4(0x15f),'FTS_REGISTERED':_0x578ab4(0x189),'FTS_DROP':_0x578ab4(0x178),'FTS_RESET':_0x578ab4(0x15c),'SCHEMA_SET':_0x578ab4(0x159),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x578ab4(0x182),'UNIQUE_VIOLATION_RESOLVED':_0x578ab4(0x153),'REF_VIOLATION':_0x578ab4(0x14e),'REF_VIOLATION_RESOLVED':_0x578ab4(0x175),'SYNC_APPLY':_0x578ab4(0x165),'TXN_START':_0x578ab4(0x173),'TXN_END':'txn:end','TXN_ROLLBACK':_0x578ab4(0x192),'TYPE_REGISTERED':_0x578ab4(0x16c),'TYPE_DROP':'type:drop','ENV_OPENED':'env:opened','ENV_REMOVED':_0x578ab4(0x19b),'TTL_EXPIRED':_0x578ab4(0x18d),'TTL_SET':_0x578ab4(0x150),'TTL_CLEAR':_0x578ab4(0x191),'LICENSE_INVALID':_0x578ab4(0x197),'LICENSE_ADDED':_0x578ab4(0x198),'LICENSE_ACTIVATED':_0x578ab4(0x167),'LICENSE_REMOVED':_0x578ab4(0x166)},_0x2b2645={'CREATING':'creating','RESETTING':_0x578ab4(0x169),'READY':_0x578ab4(0x185),'DROPPING':'dropping','WAITING':_0x578ab4(0x195)},_0x2c2d6e={'CREATED':_0x578ab4(0x160),'STARTING':_0x578ab4(0x18c),'STARTED':'started','STOPPING':_0x578ab4(0x190),'STOPPED':_0x578ab4(0x15d)},_0x5e2b44={'CREATING':'creating','READY':'ready','HALTED':_0x578ab4(0x193),'STOPPED':_0x578ab4(0x15d),'RESETTING':_0x578ab4(0x169)},_0x4f8e0b=Object['freeze']({'POKE':'bus:poke','DRAIN':'bus:drain','TYPE_DROP':'bus:type_drop'});return okdbEnums={'BUS_EVENTS':_0x4f8e0b,'CHANGE_ACTIONS':_0x1fe377,'EVENTS':_0x3c6ae1,'INDEX_STATE':_0x2b2645,'OKDB_STATE':_0x2c2d6e,'VIEW_STATE':_0x5e2b44},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function _0xdf7d(_0x45d084,_0x1e6e00){_0x45d084=_0x45d084-0x14b;const _0x55484a=_0x5548();let _0xdf7d90=_0x55484a[_0x45d084];return _0xdf7d90;}function requireOkdbViewsBootstrapWorker(){if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x2a3634,workerData:_0x1b6e52}=require$$0,_0x3b8873=require$$1,{EVENTS:_0x26ac25}=requireOkdbEnums();async function _0x1b6e11(){const _0x1efe4c=_0xdf7d,{rootPath:_0xbaaddc,envName:_0x1847f1,viewName:_0x2d18d1,definition:_0x2e8bca}=_0x1b6e52,_0x5dfd51=new _0x3b8873(_0xbaaddc,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'asyncProcessors':![],'compaction':_0x1efe4c(0x172),'_skipBootRuntime':!![]});await _0x5dfd51[_0x1efe4c(0x17b)]();const _0x528d8e=_0x5dfd51[_0x1efe4c(0x199)](_0x1847f1);_0x528d8e[_0x1efe4c(0x164)]['on'](_0x26ac25[_0x1efe4c(0x15b)],_0x4d09a7=>{const _0x33813c=_0x1efe4c;if(_0x4d09a7?.['name']!==_0x2d18d1)return;try{_0x2a3634[_0x33813c(0x171)]({'type':_0x33813c(0x187),'event':_0x4d09a7});}catch{}}),_0x528d8e[_0x1efe4c(0x151)][_0x1efe4c(0x17a)](_0x2d18d1,_0x2e8bca),await _0x528d8e[_0x1efe4c(0x151)][_0x1efe4c(0x16e)](_0x2d18d1,_0x2e8bca),_0x2a3634['postMessage']({'type':_0x1efe4c(0x170)}),await _0x5dfd51[_0x1efe4c(0x186)](),process[_0x1efe4c(0x17e)](0x0);}return _0x1b6e11()['catch'](_0x45cd93=>{const _0xce2795=_0xdf7d;try{_0x2a3634[_0xce2795(0x171)]({'type':_0xce2795(0x17c),'error':_0x45cd93[_0xce2795(0x19d)]??String(_0x45cd93),'stack':_0x45cd93[_0xce2795(0x14c)]});}catch{}process[_0xce2795(0x17e)](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x3f00ba(0x154)]=okdbViewsBootstrapWorker;
1
+ 'use strict';const _0x29503e=_0x1baa;(function(_0x16deeb,_0x2b3657){const _0x29dde3=_0x1baa,_0x475ecb=_0x16deeb();while(!![]){try{const _0x2c3790=parseInt(_0x29dde3(0x111))/0x1*(-parseInt(_0x29dde3(0x103))/0x2)+parseInt(_0x29dde3(0x105))/0x3*(parseInt(_0x29dde3(0x11b))/0x4)+-parseInt(_0x29dde3(0x106))/0x5*(parseInt(_0x29dde3(0x120))/0x6)+parseInt(_0x29dde3(0x10c))/0x7+-parseInt(_0x29dde3(0x115))/0x8*(-parseInt(_0x29dde3(0x12a))/0x9)+-parseInt(_0x29dde3(0xf9))/0xa*(parseInt(_0x29dde3(0x121))/0xb)+parseInt(_0x29dde3(0x127))/0xc*(parseInt(_0x29dde3(0x144))/0xd);if(_0x2c3790===_0x2b3657)break;else _0x475ecb['push'](_0x475ecb['shift']());}catch(_0x3f9586){_0x475ecb['push'](_0x475ecb['shift']());}}}(_0x43a1,0x44cee));function _0x43a1(){const _0x26ccaf=['message','license:added','16ucmDuu','close','bus:drain','unique:violation_resolved','index:ready','dropFts','6872UVopnz','dropType','registerType','env:removed','exports','18kqEBJO','11kQNTbg','license:invalid','stopping','ref:violation','index:progress','registerIndex','53916kjEJhO','item:create','exit','1175985DqATWB','put','system:ready','index:drop','created','events','VIEW_PROGRESS','resetFts','index:registered','passive','type:registered','hasOwnProperty','index:reset','dropSchema','bus:type_drop','waiting','schema:drop','license:activated','sync:apply','progress','done','stopped','fts:registered','setTtl','system:bus_state_change','creating','364FFetnU','catch','__esModule','txn:rollback','ready','schema:set','starting','call','open','fts:drop','3560510YqEKqI','views','bus:poke','default','system:clock_change','./okdb','prototype','stack','name','error','18PxtgEG','clearTtl','300tVBEbs','323130AZdWBt','ttl:clear','dropping','item:update','system:type_drop','ttl:set','2718877whiZKo','resetting','type:drop','resetIndex','unique:violation','12842BqpZPj','postMessage'];_0x43a1=function(){return _0x26ccaf;};return _0x43a1();}var require$$0=require('worker_threads'),require$$1=require(_0x29503e(0xfe));function getDefaultExportFromCjs(_0x3d488e){const _0x1ce497=_0x29503e;return _0x3d488e&&_0x3d488e[_0x1ce497(0x146)]&&Object[_0x1ce497(0xff)][_0x1ce497(0x135)][_0x1ce497(0xf6)](_0x3d488e,_0x1ce497(0xfc))?_0x3d488e[_0x1ce497(0xfc)]:_0x3d488e;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x37a424=_0x29503e;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x37a088={'PUT':_0x37a424(0x12b),'REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x37a424(0x126),'INDEX_RESET':_0x37a424(0x10f),'TYPE_REGISTER':_0x37a424(0x11d),'TYPE_DROP':_0x37a424(0x11c),'FTS_REGISTER':'registerFts','FTS_DROP':_0x37a424(0x11a),'FTS_RESET':_0x37a424(0x131),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x37a424(0x137),'TTL_SET':_0x37a424(0x141),'TTL_CLEAR':_0x37a424(0x104)},_0xe66b6c={'SYSTEM_READY':_0x37a424(0x12c),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x37a424(0xfd),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x37a424(0x10a),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x37a424(0x142),'ITEM_CREATE':_0x37a424(0x128),'ITEM_UPDATE':_0x37a424(0x109),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x37a424(0x136),'INDEX_READY':_0x37a424(0x119),'INDEX_PROGRESS':_0x37a424(0x125),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x37a424(0x12d),'INDEX_REGISTERED':_0x37a424(0x132),'FTS_REGISTERED':_0x37a424(0x140),'FTS_DROP':_0x37a424(0xf8),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x37a424(0xf4),'SCHEMA_DROP':_0x37a424(0x13a),'UNIQUE_VIOLATION':_0x37a424(0x110),'UNIQUE_VIOLATION_RESOLVED':_0x37a424(0x118),'REF_VIOLATION':_0x37a424(0x124),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x37a424(0x13c),'TXN_START':'txn:start','TXN_END':'txn:end','TXN_ROLLBACK':_0x37a424(0xf2),'TYPE_REGISTERED':_0x37a424(0x134),'TYPE_DROP':_0x37a424(0x10e),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x37a424(0x11e),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x37a424(0x10b),'TTL_CLEAR':_0x37a424(0x107),'LICENSE_INVALID':_0x37a424(0x122),'LICENSE_ADDED':_0x37a424(0x114),'LICENSE_ACTIVATED':_0x37a424(0x13b),'LICENSE_REMOVED':'license:removed'},_0x2c07ba={'CREATING':_0x37a424(0x143),'RESETTING':_0x37a424(0x10d),'READY':_0x37a424(0xf3),'DROPPING':_0x37a424(0x108),'WAITING':_0x37a424(0x139)},_0x56acd1={'CREATED':_0x37a424(0x12e),'STARTING':_0x37a424(0xf5),'STARTED':'started','STOPPING':_0x37a424(0x123),'STOPPED':_0x37a424(0x13f)},_0x1c734c={'CREATING':_0x37a424(0x143),'READY':'ready','HALTED':'halted','STOPPED':_0x37a424(0x13f),'RESETTING':'resetting'},_0x149b08=Object['freeze']({'POKE':_0x37a424(0xfb),'DRAIN':_0x37a424(0x117),'TYPE_DROP':_0x37a424(0x138),'PROC':'bus:proc'});return okdbEnums={'BUS_EVENTS':_0x149b08,'CHANGE_ACTIONS':_0x37a088,'EVENTS':_0xe66b6c,'INDEX_STATE':_0x2c07ba,'OKDB_STATE':_0x56acd1,'VIEW_STATE':_0x1c734c},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x3323c9=_0x29503e;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x45f97a,workerData:_0xf5d070}=require$$0,_0x599c48=require$$1,{EVENTS:_0x1e7282}=requireOkdbEnums();async function _0x16020f(){const _0xcb2b9a=_0x1baa,{rootPath:_0x94cbcb,envName:_0x11be6d,viewName:_0x1c9c0e,definition:_0x59bfeb}=_0xf5d070,_0x17a8e5=new _0x599c48(_0x94cbcb,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'asyncProcessors':![],'compaction':_0xcb2b9a(0x133),'_skipBootRuntime':!![]});await _0x17a8e5[_0xcb2b9a(0xf7)]();const _0x295bf3=_0x17a8e5['env'](_0x11be6d);_0x295bf3[_0xcb2b9a(0x12f)]['on'](_0x1e7282[_0xcb2b9a(0x130)],_0x3368b6=>{const _0x5ba97e=_0xcb2b9a;if(_0x3368b6?.[_0x5ba97e(0x101)]!==_0x1c9c0e)return;try{_0x45f97a[_0x5ba97e(0x112)]({'type':_0x5ba97e(0x13d),'event':_0x3368b6});}catch{}}),_0x295bf3['views']['_activateViewStorage'](_0x1c9c0e,_0x59bfeb),await _0x295bf3[_0xcb2b9a(0xfa)]['_runBootstrapScanPhases'](_0x1c9c0e,_0x59bfeb),_0x45f97a[_0xcb2b9a(0x112)]({'type':_0xcb2b9a(0x13e)}),await _0x17a8e5[_0xcb2b9a(0x116)](),process[_0xcb2b9a(0x129)](0x0);}return _0x16020f()[_0x3323c9(0x145)](_0x4f79af=>{const _0x4aee66=_0x3323c9;try{_0x45f97a[_0x4aee66(0x112)]({'type':_0x4aee66(0x102),'error':_0x4f79af[_0x4aee66(0x113)]??String(_0x4f79af),'stack':_0x4f79af[_0x4aee66(0x100)]});}catch{}process['exit'](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);function _0x1baa(_0x354c5d,_0x1ee775){_0x354c5d=_0x354c5d-0xf2;const _0x43a16b=_0x43a1();let _0x1baa6d=_0x43a16b[_0x354c5d];return _0x1baa6d;}module[_0x29503e(0x11f)]=okdbViewsBootstrapWorker;
@@ -0,0 +1 @@
1
+ 'use strict';function _0x4002(_0xa29594,_0x97f351){_0xa29594=_0xa29594-0x7f;const _0x2a3d18=_0x2a3d();let _0x4002a=_0x2a3d18[_0xa29594];return _0x4002a;}const _0x52b696=_0x4002;(function(_0x481912,_0x13796c){const _0x1db266=_0x4002,_0x2fa0e2=_0x481912();while(!![]){try{const _0x66484c=-parseInt(_0x1db266(0x199))/0x1+-parseInt(_0x1db266(0x15e))/0x2*(parseInt(_0x1db266(0x130))/0x3)+-parseInt(_0x1db266(0x128))/0x4+parseInt(_0x1db266(0xa9))/0x5+parseInt(_0x1db266(0x13b))/0x6+parseInt(_0x1db266(0x13e))/0x7*(parseInt(_0x1db266(0x10a))/0x8)+-parseInt(_0x1db266(0x15d))/0x9;if(_0x66484c===_0x13796c)break;else _0x2fa0e2['push'](_0x2fa0e2['shift']());}catch(_0x4d188e){_0x2fa0e2['push'](_0x2fa0e2['shift']());}}}(_0x2a3d,0xa40a4));var require$$0$1=require('path'),require$$1$1=require('os'),require$$0=require(_0x52b696(0x158)),require$$1=require('worker_threads');function getDefaultExportFromCjs(_0x2a93ad){const _0x46812f=_0x52b696;return _0x2a93ad&&_0x2a93ad[_0x46812f(0xf5)]&&Object[_0x46812f(0xed)]['hasOwnProperty'][_0x46812f(0xe7)](_0x2a93ad,'default')?_0x2a93ad[_0x46812f(0xb2)]:_0x2a93ad;}function _0x2a3d(){const _0x5b31f4=['env-removed:\x20','_runBootstrapScanPhases','logs','worker','unique:violation_resolved','object','_activateViewStorage','started','_buckets','queueType','intake','string','_drainHandler','requestedAt','watchdog','763928rBStzy','toFixed','queue','envName','scope','runId','heapTotal','warn','system:clock_change','isHeld','_log','exit','\x20—\x20','pid','detachConsole','\x20(resident=','finally','processes','has','_bareOpen','fts:registered','maxConcurrency','sandbox-','values','_admissionStarted','tick','function\x20sandbox\x20exited\x20(code\x20','setTtl','stopped','onWindow','1514704TqHIck','schema:set','views','\x20evicted','state','freeze','reportThreadStats','main','1011YiGhvi','env:removed','queue.process\x20threw:\x20','inflight','keys','tierList','rootPath','idleTimer','index:reset','openDB','halted','6487284FKeJGu','dropType','requestId','7HIKDyy','size','user','clearTtl','startsWith','platform','_maybeIdle','~fn:responses','recycle','_ensureTier','bus:type_drop','heavy','onThreadStats','sync:apply','FUNCTION_OOM','_rootDb','fn-sandbox:','system','add','catch','listWorkerBootstrapJobs','ms/','system:drain','created','processor','terminate','node:perf_hooks','_envs','defaultMemoryMb','length','system:type_drop','4881222qTrgYx','1790nMOewm','disable','_processorStops','control','(worst\x20','get','item:update','fts:reset','transactionSync','message','timeMachine','maxExtra','map','_stopped','FUNCTION_CANCELLED','inFlightCount','round','set','unhandledRejection:\x20','delete','~proc:bootstrap-index','dropping','sandbox\x20failed\x20to\x20boot','txn:rollback','ttl:set','putSync','_startAdmission','running','listDesired','cost','name','stderr','ttl:clear','stopping','_terminateTier','bootstrap:','wedged','init','fts:drop','ms\x20grace)\x20—\x20sandbox\x20terminated','clear','cancel','okdb-functions-sandbox-worker.js','_viewState','view:progress','system:bus_state_change','setSchema','cursorKey','queue\x20consumer\x20stopped\x20(def\x20deregistered):\x20','blocks','cancelled','worker\x20OKDB\x20open\x20failed:\x20','push','options','type','slice','kind','ttl:expired','ERR_WORKER_OUT_OF_MEMORY','120804kWXCcy','stats','close','ms\x20mean=','_admissionTimer','version','env-removed\x20evict\x20FAILED\x20for\x20','idleMs','key','readySettled','graceMs','openEnv','ms\x20max=','env-removed','postMessage','random','reduce','env','enable','function\x20sandbox\x20error:\x20','item:remove','index:drop','_tierFor','min','run','FUNCTION_TIMEOUT','resetting','active','~views','function','split','stopAll','onEmit','license:activated','lastError','sandbox\x20recycled','system:proc','unref','runtime','function\x20cancelled\x20—\x20did\x20not\x20unwind\x20within\x20grace;\x20sandbox\x20terminated','remove','_tiers','_started','mean','bus:drain','includes','_closeSharedEnvs','loop-lag\x20','max','timeoutMs','reject','unique:violation','queue-worker','function\x20sandbox\x20out\x20of\x20memory\x20(tier\x20','4193280ceWPCJ','detail','events','claimAndRunWorkerBootstrap','code','ready','Spawned\x20queue\x20worker\x20export\x20not\x20found\x20or\x20not\x20a\x20function:\x20','_windowCbs','_timer','default','passive','rejectReady','cpuUsage','listFtsEnvs','off','env:opened','send','percentile','_failTier','system:poke','fts','registerFts','viewName','waiting','label','maxMs','start','external','getRange','system:ready','FUNCTION_FAILED','_lockHandle','Could\x20not\x20dynamically\x20require\x20\x22','_dropTier','type:drop','stringify','starting','process','_onMessage','worker:\x20no\x20init\x20message\x20received','reset','setLogger','entries','enabled','join','result','log','count','index:registered','license:invalid','heapUsed','write','dropSchema','then','unhandledRejection','ms\x20(+','sandbox\x20terminated\x20for\x20a\x20sibling\x20job\x20—\x20retryable','ms\x20p99=','FUNCTION_SANDBOX_EXIT','ref:violation_resolved','_registrations','_report','call','SYSTEM_POKE','put','floor','error','function\x20exceeded\x20','prototype','true','bus:poke','env\x20open\x20failed:\x20','txn:end','now','removeSync','stop','__esModule','okdb.js','note','resume','pending','open'];_0x2a3d=function(){return _0x5b31f4;};return _0x2a3d();}function commonjsRequire(_0x208165){const _0x54d4c0=_0x52b696;throw new Error(_0x54d4c0(0xc9)+_0x208165+'\x22.\x20Please\x20configure\x20the\x20dynamicRequireTargets\x20or/and\x20ignoreDynamicRequires\x20option\x20of\x20@rollup/plugin-commonjs\x20appropriately\x20for\x20this\x20require\x20call\x20to\x20work.');}var okdbWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4b58f7=_0x52b696;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x4f2174={'PUT':_0x4b58f7(0xe9),'REMOVE':_0x4b58f7(0x9b),'INDEX_DROP':'dropIndex','INDEX_REGISTER':'registerIndex','INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':_0x4b58f7(0x13c),'FTS_REGISTER':_0x4b58f7(0xbe),'FTS_DROP':'dropFts','FTS_RESET':'resetFts','SCHEMA_SET':_0x4b58f7(0x18c),'SCHEMA_DROP':_0x4b58f7(0xdd),'TTL_SET':_0x4b58f7(0x125),'TTL_CLEAR':_0x4b58f7(0x141)},_0x1f8cfd={'SYSTEM_READY':_0x4b58f7(0xc6),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x4b58f7(0x112),'SYSTEM_POKE':_0x4b58f7(0xbc),'SYSTEM_DRAIN':_0x4b58f7(0x154),'SYSTEM_TYPE_DROP':_0x4b58f7(0x15c),'SYSTEM_PROC':_0x4b58f7(0x97),'SYSTEM_BUS_STATE_CHANGE':_0x4b58f7(0x18b),'ITEM_CREATE':'item:create','ITEM_UPDATE':_0x4b58f7(0x164),'ITEM_REMOVE':_0x4b58f7(0x87),'INDEX_RESET':_0x4b58f7(0x138),'INDEX_READY':'index:ready','INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x4b58f7(0x18a),'INDEX_DROP':_0x4b58f7(0x88),'INDEX_REGISTERED':_0x4b58f7(0xd9),'FTS_REGISTERED':_0x4b58f7(0x11e),'FTS_DROP':_0x4b58f7(0x184),'FTS_RESET':_0x4b58f7(0x165),'SCHEMA_SET':_0x4b58f7(0x129),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x4b58f7(0xa6),'UNIQUE_VIOLATION_RESOLVED':_0x4b58f7(0xff),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x4b58f7(0xe4),'SYNC_APPLY':_0x4b58f7(0x14b),'TXN_START':'txn:start','TXN_END':_0x4b58f7(0xf1),'TXN_ROLLBACK':_0x4b58f7(0x175),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x4b58f7(0xcb),'ENV_OPENED':_0x4b58f7(0xb8),'ENV_REMOVED':_0x4b58f7(0x131),'TTL_EXPIRED':_0x4b58f7(0x197),'TTL_SET':_0x4b58f7(0x176),'TTL_CLEAR':_0x4b58f7(0x17e),'LICENSE_INVALID':_0x4b58f7(0xda),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x4b58f7(0x94),'LICENSE_REMOVED':'license:removed'},_0x5d4484={'CREATING':'creating','RESETTING':_0x4b58f7(0x8d),'READY':_0x4b58f7(0xae),'DROPPING':_0x4b58f7(0x173),'WAITING':_0x4b58f7(0xc0)},_0x28ec46={'CREATED':_0x4b58f7(0x155),'STARTING':_0x4b58f7(0xcd),'STARTED':_0x4b58f7(0x102),'STOPPING':_0x4b58f7(0x17f),'STOPPED':_0x4b58f7(0x126)},_0x54043c={'CREATING':'creating','READY':'ready','HALTED':_0x4b58f7(0x13a),'STOPPED':_0x4b58f7(0x126),'RESETTING':_0x4b58f7(0x8d)},_0x16c269=Object[_0x4b58f7(0x12d)]({'POKE':_0x4b58f7(0xef),'DRAIN':_0x4b58f7(0x9f),'TYPE_DROP':_0x4b58f7(0x148),'PROC':'bus:proc'});return okdbEnums={'BUS_EVENTS':_0x16c269,'CHANGE_ACTIONS':_0x4f2174,'EVENTS':_0x1f8cfd,'INDEX_STATE':_0x5d4484,'OKDB_STATE':_0x28ec46,'VIEW_STATE':_0x54043c},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x2d886a=_0x52b696;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x3dc00c,performance:_0x4d37fe}=require$$0,_0x5cc0c4=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x2d886a(0xee),_0x2f29a1=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x304b00=process.env.OKDB_LOOP_LAG_ALL==='1',_0x1b1b0c=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x562504{constructor(){const _0x247928=_0x2d886a;this['enabled']=_0x5cc0c4,this[_0x247928(0x103)]=new Map(),this['_h']=null,this[_0x247928(0xb1)]=null,this[_0x247928(0x9d)]=![],this[_0x247928(0x114)]=(_0x1f22d9,_0xb9da2f)=>process[_0x247928(0x17d)][_0x247928(0xdc)](_0x1f22d9+(_0xb9da2f?'\x20'+JSON[_0x247928(0xcc)](_0xb9da2f):'')+'\x0a');}[_0x2d886a(0xf2)](){const _0x425d21=_0x2d886a;return _0x4d37fe[_0x425d21(0xf2)]();}[_0x2d886a(0xd2)](_0x2ae468){const _0x3c3b61=_0x2d886a;if(typeof _0x2ae468==='function')this[_0x3c3b61(0x114)]=_0x2ae468;}[_0x2d886a(0xf7)](_0x580a72,_0x1a40b9,_0x290392){const _0x285419=_0x2d886a;if(!this[_0x285419(0xd4)])return;let _0x2bbe23=this[_0x285419(0x103)][_0x285419(0x163)](_0x580a72);!_0x2bbe23&&(_0x2bbe23={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x285419(0x16f)](_0x580a72,_0x2bbe23)),_0x2bbe23['ms']+=_0x1a40b9,_0x2bbe23['count']+=0x1,_0x1a40b9>_0x2bbe23['maxMs']&&(_0x2bbe23[_0x285419(0xc2)]=_0x1a40b9,_0x2bbe23[_0x285419(0x169)]=_0x290392||'');}[_0x2d886a(0xc3)](_0x5637d9){const _0x59aa73=_0x2d886a;if(!this['enabled']||this[_0x59aa73(0x9d)])return;this['_started']=!![];if(_0x5637d9)this[_0x59aa73(0x114)]=_0x5637d9;this['_h']=_0x3dc00c({'resolution':0xa}),this['_h'][_0x59aa73(0x85)](),this[_0x59aa73(0xb1)]=setInterval(()=>this[_0x59aa73(0xe6)](),_0x2f29a1);if(this['_timer']['unref'])this[_0x59aa73(0xb1)]['unref']();}[_0x2d886a(0x127)](_0x197f86){const _0x487e5d=_0x2d886a;if(!this['_windowCbs'])this[_0x487e5d(0xb0)]=new Set();this[_0x487e5d(0xb0)][_0x487e5d(0x150)](_0x197f86);if(!this[_0x487e5d(0x9d)])this[_0x487e5d(0x178)]();}['offWindow'](_0x25d9c5){const _0x5e784c=_0x2d886a;this[_0x5e784c(0xb0)]?.['delete'](_0x25d9c5);}[_0x2d886a(0x178)](){const _0xceaec9=_0x2d886a;if(this[_0xceaec9(0x122)])return;this[_0xceaec9(0x122)]=!![];!this['_h']&&(this['_h']=_0x3dc00c({'resolution':0xa}),this['_h']['enable']());const _0x323c50=_0x2f29a1;this[_0xceaec9(0x19d)]=setInterval(()=>{const _0x159a38=_0xceaec9,_0x839112=this['_h'];if(!_0x839112)return;const _0x418710=_0x839112[_0x159a38(0xba)](0x63)/0xf4240,_0xca8476=_0x839112['max']/0xf4240,_0x41c913=_0x839112[_0x159a38(0x9e)]/0xf4240;_0x839112[_0x159a38(0xd1)]();if(this[_0x159a38(0xb0)])for(const _0x3495c4 of this['_windowCbs']){try{_0x3495c4({'p99Ms':_0x418710,'maxMs':_0xca8476,'meanMs':_0x41c913,'reportMs':_0x323c50});}catch{}}},_0x323c50);if(this[_0xceaec9(0x19d)]['unref'])this[_0xceaec9(0x19d)][_0xceaec9(0x98)]();}[_0x2d886a(0xe6)](){const _0x4364f5=_0x2d886a,_0x568c9e=this['_h'],_0x5b5bc7=_0x568c9e[_0x4364f5(0xa3)]/0xf4240,_0x39a924=_0x568c9e[_0x4364f5(0xba)](0x63)/0xf4240,_0x393e75=_0x568c9e[_0x4364f5(0x9e)]/0xf4240;_0x568c9e[_0x4364f5(0xd1)]();const _0x257667=[...this['_buckets'][_0x4364f5(0xd3)]()]['map'](([_0x2bd166,_0x3911e2])=>({'label':_0x2bd166,..._0x3911e2}))['sort']((_0x3fc62b,_0x4ae9b6)=>_0x4ae9b6['ms']-_0x3fc62b['ms'])[_0x4364f5(0x195)](0x0,0x8);this['_buckets'][_0x4364f5(0x186)]();const _0x46f55a=_0x257667[_0x4364f5(0x83)]((_0x3737b2,_0x1854d1)=>_0x3737b2+_0x1854d1['ms'],0x0),_0x290ff1=_0x257667['map'](_0xf2b42b=>_0xf2b42b[_0x4364f5(0xc1)]+'='+_0xf2b42b['ms'][_0x4364f5(0x10b)](0x0)+_0x4364f5(0x153)+_0xf2b42b[_0x4364f5(0xd8)]+(_0xf2b42b[_0x4364f5(0xc2)]>0x5?_0x4364f5(0x162)+_0xf2b42b[_0x4364f5(0xc2)][_0x4364f5(0x10b)](0x0)+'ms'+(_0xf2b42b[_0x4364f5(0x169)]?'\x20'+_0xf2b42b['maxExtra']:'')+')':''));(_0x304b00||_0x5b5bc7>=_0x1b1b0c)&&this[_0x4364f5(0x114)](_0x4364f5(0xa2)+_0x2f29a1+_0x4364f5(0x7f)+_0x5b5bc7['toFixed'](0x0)+_0x4364f5(0xe2)+_0x39a924[_0x4364f5(0x10b)](0x0)+_0x4364f5(0x19c)+_0x393e75[_0x4364f5(0x10b)](0x0)+'ms\x20busy='+_0x46f55a['toFixed'](0x0)+'ms'+(_0x290ff1['length']?'\x20│\x20'+_0x290ff1[_0x4364f5(0xd5)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x4364f5(0xb0)])for(const _0x52fe21 of this[_0x4364f5(0xb0)]){try{_0x52fe21({'p99Ms':_0x39a924,'maxMs':_0x5b5bc7,'meanMs':_0x393e75,'reportMs':_0x2f29a1});}catch{}}}['stop'](){const _0x570435=_0x2d886a;if(this[_0x570435(0xb1)])clearInterval(this[_0x570435(0xb1)]);if(this['_h'])this['_h'][_0x570435(0x15f)]();this[_0x570435(0xb1)]=null,this['_h']=null,this[_0x570435(0x9d)]=![];}}const _0x8869c9=new _0x562504();if(_0x8869c9[_0x2d886a(0xd4)])_0x8869c9['start']();return okdbLoopMonitor={'LOOP':_0x8869c9},okdbLoopMonitor;}var okdbIntakeGate,hasRequiredOkdbIntakeGate;function requireOkdbIntakeGate(){if(hasRequiredOkdbIntakeGate)return okdbIntakeGate;hasRequiredOkdbIntakeGate=0x1;const _0x3993f3=0x2,_0x22cdd0=0x2,_0x4fde5f=0x2;function _0x3bd779({gateMs:_0x31e9b1}){let _0x3ed52f=0x0,_0x3230cb=0x0,_0xf57267=0x0;return{'level':()=>_0x3ed52f,'blocks'(_0x545fd9){const _0x178a09=_0x4002;if(_0x545fd9==='control')return![];if(_0x3ed52f>=0x2)return!![];if(_0x3ed52f>=0x1&&_0x545fd9===_0x178a09(0x149))return!![];return![];},'onWindow'(_0x8f2a85){if(_0x8f2a85>_0x31e9b1){_0x3230cb++,_0xf57267=0x0;if(_0x3230cb>=_0x3993f3&&_0x3ed52f<_0x4fde5f)return _0x3ed52f++,_0x3230cb=0x0,{'changed':!![],'level':_0x3ed52f};}else{if(_0x8f2a85<_0x31e9b1/0x2){_0xf57267++,_0x3230cb=0x0;if(_0xf57267>=_0x22cdd0&&_0x3ed52f>0x0)return _0x3ed52f--,_0xf57267=0x0,{'changed':!![],'level':_0x3ed52f};}else _0x3230cb=0x0,_0xf57267=0x0;}return{'changed':![],'level':_0x3ed52f};}};}return okdbIntakeGate={'createIntakeGate':_0x3bd779},okdbIntakeGate;}var okdbQueueLoadHandler,hasRequiredOkdbQueueLoadHandler;function requireOkdbQueueLoadHandler(){if(hasRequiredOkdbQueueLoadHandler)return okdbQueueLoadHandler;hasRequiredOkdbQueueLoadHandler=0x1;function _0x1611dd(_0x1dc46d,_0x339dfb){const _0x44c647=_0x4002,_0x437871=commonjsRequire(_0x1dc46d);if(_0x339dfb&&_0x339dfb!==_0x44c647(0xb2)){const _0x4bb4d9=_0x437871?.[_0x339dfb];if(typeof _0x4bb4d9!=='function')throw new Error(_0x44c647(0xaf)+_0x339dfb);return _0x4bb4d9;}if(typeof _0x437871===_0x44c647(0x90))return _0x437871;if(typeof _0x437871?.[_0x44c647(0xb2)]==='function')return _0x437871['default'];throw new Error('Spawned\x20queue\x20worker\x20module\x20must\x20export\x20a\x20function\x20or\x20default\x20function');}return okdbQueueLoadHandler={'loadHandler':_0x1611dd},okdbQueueLoadHandler;}var okdbFunctionsSandboxHost,hasRequiredOkdbFunctionsSandboxHost;function requireOkdbFunctionsSandboxHost(){const _0x3170bf=_0x52b696;if(hasRequiredOkdbFunctionsSandboxHost)return okdbFunctionsSandboxHost;hasRequiredOkdbFunctionsSandboxHost=0x1;const _0x3378d7=require$$0$1,{Worker:_0x3f1ac7}=require$$1,_0x5c84e1=_0x3378d7[_0x3170bf(0xd5)](__dirname,_0x3170bf(0x188)),_0x8c222e=0x100,_0x28db90=0x3e8;function _0x2a7b6b(_0x10b66f,_0x331d28){const _0x27fb3e=_0x3170bf,_0x5ac1a3=new Error(_0x10b66f);return _0x5ac1a3[_0x27fb3e(0xad)]=_0x331d28,_0x5ac1a3;}class _0x3e07fb{constructor({rootPath:_0x2c7ac5,memoryMb:_0x1ea3d9,maxConcurrency:_0x18b914,idleMs:_0x2993fb,graceMs:_0x4ec610,onThreadStats:_0x21bc95,log:_0x4bf6df}={}){const _0x5416e9=_0x3170bf;if(!_0x2c7ac5)throw new Error('SandboxHost:\x20rootPath\x20required');this[_0x5416e9(0x136)]=_0x2c7ac5,this[_0x5416e9(0x15a)]=Math[_0x5416e9(0xa3)](0x20,Math[_0x5416e9(0xea)](_0x1ea3d9??_0x8c222e)),this[_0x5416e9(0x11f)]=Math['max'](0x1,Number(process.env.OKDB_FN_SANDBOX_CONCURRENCY)||_0x18b914||0x4),this[_0x5416e9(0x1a0)]=Math['max'](0x3e8,Number(process.env.OKDB_FN_SANDBOX_IDLE_MS)||_0x2993fb||0x7530),this[_0x5416e9(0x1a3)]=Math['max'](0x64,Number(process.env.OKDB_FN_SANDBOX_GRACE_MS)||_0x4ec610||0x5dc),this['onThreadStats']=_0x21bc95??null,this[_0x5416e9(0xd7)]=_0x4bf6df??null,this[_0x5416e9(0x9c)]=new Map(),this[_0x5416e9(0x16b)]=![];}[_0x3170bf(0x16d)](){const _0x4f78f9=_0x3170bf;let _0x53c04a=0x0;for(const _0x3349b0 of this['_tiers'][_0x4f78f9(0x121)]())_0x53c04a+=_0x3349b0[_0x4f78f9(0x133)][_0x4f78f9(0x13f)];return _0x53c04a;}[_0x3170bf(0x89)](){const _0x3428a2=_0x3170bf;return this[_0x3428a2(0x15a)];}[_0x3170bf(0x147)](_0xdc7293){const _0xc093d1=_0x3170bf;let _0x1f0c60=this['_tiers'][_0xc093d1(0x163)](_0xdc7293);if(_0x1f0c60)return _0x1f0c60;const _0x548bb8=new _0x3f1ac7(_0x5c84e1,{'workerData':{'rootPath':this[_0xc093d1(0x136)]},'stdout':!![],'stderr':!![]});_0x548bb8['stdout']?.[_0xc093d1(0xf8)](),_0x548bb8['stderr']?.[_0xc093d1(0xf8)](),_0x548bb8[_0xc093d1(0x98)]?.();let _0x1ad06c;const _0x3bb704=new Promise((_0x33a59c,_0x13c92f)=>{const _0x3cb4d1=(_0x2e17cd,_0x3b60d3)=>{const _0x4b3ef3=_0x4002;_0x1f0c60[_0x4b3ef3(0x1a2)]=!![],_0x548bb8[_0x4b3ef3(0xb7)](_0x4b3ef3(0x167),_0x59f7d6),_0x2e17cd(_0x3b60d3);},_0x59f7d6=_0x32ded3=>{const _0x5abefd=_0x4002;if(_0x32ded3?.[_0x5abefd(0x194)]===_0x5abefd(0xae))_0x3cb4d1(_0x33a59c);else{if(_0x32ded3?.[_0x5abefd(0x194)]==='fatal')_0x3cb4d1(_0x13c92f,_0x2a7b6b(_0x32ded3[_0x5abefd(0xeb)]?.[_0x5abefd(0x167)]??_0x5abefd(0x174),_0x5abefd(0xe3)));}};_0x1ad06c=_0x266ecb=>_0x3cb4d1(_0x13c92f,_0x266ecb),_0x548bb8['on']('message',_0x59f7d6);});return _0x1f0c60={'worker':_0x548bb8,'inflight':new Map(),'idleTimer':null,'readySettled':![],'rejectReady':_0x1ad06c,'ready':_0x3bb704},_0x1f0c60[_0xc093d1(0xae)][_0xc093d1(0x151)](()=>{}),this[_0xc093d1(0x9c)]['set'](_0xdc7293,_0x1f0c60),_0x548bb8['on']('message',_0x217e30=>this[_0xc093d1(0xcf)](_0xdc7293,_0x1f0c60,_0x217e30)),_0x548bb8['on']('error',_0x5675ef=>{const _0x429cdc=_0xc093d1,_0x30a632=_0x5675ef?.['code']===_0x429cdc(0x198);this[_0x429cdc(0xbb)](_0xdc7293,_0x1f0c60,_0x30a632?_0x2a7b6b(_0x429cdc(0xa8)+_0xdc7293+'MB\x20heap\x20cap)',_0x429cdc(0x14c)):_0x2a7b6b(_0x429cdc(0x86)+(_0x5675ef?.[_0x429cdc(0x167)]??_0x5675ef),_0x429cdc(0xe3)));}),_0x548bb8['on']('exit',_0x1c3d53=>{const _0x5bbea5=_0xc093d1;this['_failTier'](_0xdc7293,_0x1f0c60,_0x2a7b6b(_0x5bbea5(0x124)+_0x1c3d53+')',_0x5bbea5(0xe3)));}),_0x1f0c60;}['_onMessage'](_0x414bac,_0x1f6028,_0x1c9a61){const _0x23a719=_0x3170bf;if(!_0x1c9a61||typeof _0x1c9a61!==_0x23a719(0x100))return;if(_0x1c9a61['type']==='stats'){this[_0x23a719(0x14a)]?.(_0x23a719(0x14e)+_0x414bac,{'heapUsed':_0x1c9a61[_0x23a719(0xdb)]??0x0});return;}const _0x1fc451=_0x1c9a61[_0x23a719(0x13d)]!=null?_0x1f6028['inflight'][_0x23a719(0x163)](_0x1c9a61['requestId']):null;if(!_0x1fc451)return;if(_0x1c9a61[_0x23a719(0x194)]===_0x23a719(0xd7)){_0x1fc451['logs'][_0x23a719(0x192)](_0x1c9a61['entry']);return;}if(_0x1c9a61[_0x23a719(0x194)]===_0x23a719(0xd6)||_0x1c9a61[_0x23a719(0x194)]===_0x23a719(0xeb))_0x1f6028[_0x23a719(0x133)][_0x23a719(0x171)](_0x1c9a61['requestId']),clearTimeout(_0x1fc451['watchdog']),_0x1fc451['resolve']({'message':_0x1c9a61,'logs':_0x1fc451[_0x23a719(0xfd)]}),this[_0x23a719(0x144)](_0x414bac,_0x1f6028);else _0x1fc451[_0x23a719(0x93)]&&_0x1fc451[_0x23a719(0x93)](_0x1c9a61);}async['run'](_0x5849fb,{onEmit:_0x22fb7d}={}){const _0x1d3e0f=_0x3170bf;if(this['_stopped'])throw _0x2a7b6b('sandbox\x20host\x20stopped',_0x1d3e0f(0xe3));const _0x591a2b=this[_0x1d3e0f(0x89)](_0x5849fb),_0x5a98f0=this[_0x1d3e0f(0x147)](_0x591a2b);return _0x5a98f0[_0x1d3e0f(0x137)]&&(clearTimeout(_0x5a98f0[_0x1d3e0f(0x137)]),_0x5a98f0[_0x1d3e0f(0x137)]=null),await _0x5a98f0[_0x1d3e0f(0xae)],new Promise((_0x4c2eaf,_0x20ba99)=>{const _0x2938fa=_0x1d3e0f,_0x5ce528=Math['max'](0x1,_0x5849fb[_0x2938fa(0x99)]?.[_0x2938fa(0xa4)]??_0x28db90),_0x57070e={'resolve':_0x4c2eaf,'reject':_0x20ba99,'logs':[],'onEmit':_0x22fb7d??null,'cancelled':![],'watchdog':setTimeout(()=>{const _0x4faed4=_0x2938fa;this['_terminateTier'](_0x591a2b,_0x5a98f0,_0x5849fb['requestId'],_0x2a7b6b(_0x4faed4(0xec)+_0x5ce528+_0x4faed4(0xe0)+this[_0x4faed4(0x1a3)]+_0x4faed4(0x185),_0x57070e[_0x4faed4(0x190)]?_0x4faed4(0x16c):_0x4faed4(0x8c)));},_0x5ce528+this[_0x2938fa(0x1a3)])};if(_0x57070e[_0x2938fa(0x109)][_0x2938fa(0x98)])_0x57070e[_0x2938fa(0x109)]['unref']();_0x5a98f0['inflight'][_0x2938fa(0x16f)](_0x5849fb[_0x2938fa(0x13d)],_0x57070e),_0x5a98f0['worker'][_0x2938fa(0x81)]({'type':_0x2938fa(0x8b),'job':_0x5849fb});});}[_0x3170bf(0x187)](_0x4c9a4b){const _0x12db06=_0x3170bf;for(const [_0xd3d97e,_0x2df8b6]of this['_tiers']){const _0x38b985=_0x2df8b6[_0x12db06(0x133)]['get'](_0x4c9a4b);if(!_0x38b985)continue;if(_0x38b985[_0x12db06(0x190)])return!![];_0x38b985[_0x12db06(0x190)]=!![],_0x2df8b6[_0x12db06(0xfe)][_0x12db06(0x81)]({'type':_0x12db06(0x187),'requestId':_0x4c9a4b}),clearTimeout(_0x38b985[_0x12db06(0x109)]),_0x38b985[_0x12db06(0x109)]=setTimeout(()=>{const _0xd71e87=_0x12db06;this[_0xd71e87(0x180)](_0xd3d97e,_0x2df8b6,_0x4c9a4b,_0x2a7b6b(_0xd71e87(0x9a),'FUNCTION_CANCELLED'));},this[_0x12db06(0x1a3)]);if(_0x38b985[_0x12db06(0x109)]['unref'])_0x38b985[_0x12db06(0x109)]['unref']();return!![];}return![];}[_0x3170bf(0x180)](_0x59ecf0,_0x50d709,_0x293196,_0x35c24f){const _0x2a1534=_0x3170bf;for(const [_0x330824,_0x318de2]of _0x50d709['inflight']){clearTimeout(_0x318de2[_0x2a1534(0x109)]),_0x318de2[_0x2a1534(0xa5)](_0x330824===_0x293196?_0x35c24f:_0x2a7b6b(_0x2a1534(0xe1),_0x2a1534(0xe3)));}_0x50d709['inflight'][_0x2a1534(0x186)](),this[_0x2a1534(0xca)](_0x59ecf0,_0x50d709);}['_failTier'](_0x12ed5e,_0x34a7be,_0x4686f6){const _0x366550=_0x3170bf;if(this[_0x366550(0x9c)][_0x366550(0x163)](_0x12ed5e)!==_0x34a7be)return;if(!_0x34a7be[_0x366550(0x1a2)])_0x34a7be[_0x366550(0xb4)]?.(_0x4686f6);for(const [,_0x223b72]of _0x34a7be[_0x366550(0x133)]){clearTimeout(_0x223b72[_0x366550(0x109)]),_0x223b72[_0x366550(0xa5)](_0x4686f6);}_0x34a7be[_0x366550(0x133)][_0x366550(0x186)](),this[_0x366550(0xca)](_0x12ed5e,_0x34a7be);}[_0x3170bf(0xca)](_0x473628,_0x18652d){const _0x42bd64=_0x3170bf;if(this[_0x42bd64(0x9c)][_0x42bd64(0x163)](_0x473628)===_0x18652d)this[_0x42bd64(0x9c)][_0x42bd64(0x171)](_0x473628);if(_0x18652d[_0x42bd64(0x137)])clearTimeout(_0x18652d[_0x42bd64(0x137)]);this[_0x42bd64(0x14a)]?.(_0x42bd64(0x14e)+_0x473628,null),_0x18652d[_0x42bd64(0xfe)][_0x42bd64(0x157)]()[_0x42bd64(0x151)](()=>{});}['_maybeIdle'](_0x380fe2,_0x4b488f){const _0xe8397=_0x3170bf;if(_0x4b488f[_0xe8397(0x133)][_0xe8397(0x13f)]>0x0||_0x4b488f[_0xe8397(0x137)])return;_0x4b488f[_0xe8397(0x137)]=setTimeout(()=>this['_dropTier'](_0x380fe2,_0x4b488f),this[_0xe8397(0x1a0)]);if(_0x4b488f['idleTimer'][_0xe8397(0x98)])_0x4b488f['idleTimer'][_0xe8397(0x98)]();}['recycle'](){const _0x339dc4=_0x3170bf;for(const [_0x173f15,_0x3b08ed]of[...this['_tiers']]){this[_0x339dc4(0xbb)](_0x173f15,_0x3b08ed,_0x2a7b6b(_0x339dc4(0x96),_0x339dc4(0xe3)));}}async[_0x3170bf(0xf4)](){const _0x220157=_0x3170bf;this[_0x220157(0x16b)]=!![],this[_0x220157(0x146)]();}}return okdbFunctionsSandboxHost={'SandboxHost':_0x3e07fb,'SANDBOX_ENTRY':_0x5c84e1},okdbFunctionsSandboxHost;}var hasRequiredOkdbWorkerChild;function requireOkdbWorkerChild(){const _0x9b6073=_0x52b696;if(hasRequiredOkdbWorkerChild)return okdbWorkerChild$1;hasRequiredOkdbWorkerChild=0x1;const _0x136738=require$$0$1;function _0xbea9c6(_0x42b0e3){const _0x238ff7=_0x4002;try{if(typeof process['send']===_0x238ff7(0x90))process[_0x238ff7(0xb9)](_0x42b0e3);}catch{}}let _0x4299bf=![],_0x194e67=null;async function _0x2addde(_0x30a166,_0x30c0ca){const _0x5756c1=_0x4002;if(_0x4299bf)return;_0x4299bf=!![];try{await _0x194e67?.['stop']?.();}catch{}const _0x382b50=setTimeout(()=>process[_0x5756c1(0x115)](_0x30a166),0xbb8);if(typeof _0x382b50[_0x5756c1(0x98)]===_0x5756c1(0x90))_0x382b50[_0x5756c1(0x98)]();try{await _0x30c0ca?.['close']?.();}catch{}process[_0x5756c1(0x115)](_0x30a166);}function _0x2041c9(_0x1ec3c8,_0x4da578,_0xe1e1af=null){const _0x28b2ca=_0x4002,_0xbc2c10=require$$1$1;let _0x469ee1=process[_0x28b2ca(0xb5)](),_0x49860e=Date[_0x28b2ca(0xf2)]();const _0x23f51a=()=>{const _0x40945c=_0x28b2ca;try{const _0x1c7cb8=[];for(const [_0x18e3a2,_0x11e61c]of _0x4da578[_0x40945c(0x159)]){if(_0x18e3a2[_0x40945c(0x142)]('~'))continue;for(const _0x37b479 of _0x11e61c['processor'][_0x40945c(0x135)]())_0x1c7cb8[_0x40945c(0x192)]({..._0x37b479,'env':_0x18e3a2});}return _0x1c7cb8[_0x40945c(0x15b)]>0x0?{'processors':_0x1c7cb8}:null;}catch{return null;}},_0x30cfe8=()=>{const _0x48111f=_0x28b2ca;if(_0x4299bf)return;const _0x3f878d=Date[_0x48111f(0xf2)](),_0x4741e7=process[_0x48111f(0xb5)](),_0x5298d6=(_0x3f878d-_0x49860e)*0x3e8,_0x302bad=_0x4741e7['user']-_0x469ee1[_0x48111f(0x140)]+(_0x4741e7[_0x48111f(0x14f)]-_0x469ee1[_0x48111f(0x14f)]),_0x777b90=_0x5298d6>0x0?Math[_0x48111f(0x8a)](0x64,Math[_0x48111f(0x16e)](_0x302bad/(_0x5298d6*(_0xbc2c10['cpus']()[_0x48111f(0x15b)]||0x1))*0x64)):0x0;_0x469ee1=_0x4741e7,_0x49860e=_0x3f878d;const _0x3507b8=process['memoryUsage']();_0x1ec3c8({'type':_0x48111f(0x19a),'stats':{'rss':_0x3507b8['rss'],'heapUsed':_0x3507b8['heapUsed'],'heapTotal':_0x3507b8[_0x48111f(0x110)],'external':_0x3507b8[_0x48111f(0xc4)],'cpuPct':_0x777b90,'cpuWindowMs':Math[_0x48111f(0x16e)](_0x5298d6/0x3e8)||null,..._0xe1e1af?.()??{}},'processing':_0x23f51a()});},_0x339f8c=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x32a5a5=setInterval(_0x30cfe8,_0x339f8c);if(typeof _0x32a5a5[_0x28b2ca(0x98)]===_0x28b2ca(0x90))_0x32a5a5[_0x28b2ca(0x98)]();}process['on'](_0x9b6073(0xdf),_0x2972fa=>{const _0x2176db=_0x9b6073;_0xbea9c6({'type':_0x2176db(0x111),'msg':_0x2176db(0x170)+(_0x2972fa?.['message']??_0x2972fa)});});async function _0x41a99b(){const _0x269c5b=_0x9b6073,_0x2faf4b=await new Promise((_0x4a4b53,_0x1bdfb1)=>{const _0xc05c56=_0x4002,_0x2d7279=_0x3efb6a=>{const _0x44cf3e=_0x4002;_0x3efb6a?.[_0x44cf3e(0x194)]===_0x44cf3e(0x183)&&(process[_0x44cf3e(0xb7)](_0x44cf3e(0x167),_0x2d7279),_0x4a4b53(_0x3efb6a));};process['on']('message',_0x2d7279);const _0x5cd493=setTimeout(()=>{const _0x470865=_0x4002;process['off'](_0x470865(0x167),_0x2d7279),_0x1bdfb1(new Error(_0x470865(0xd0)));},0x2710);if(typeof _0x5cd493[_0xc05c56(0x98)]==='function')_0x5cd493[_0xc05c56(0x98)]();}),{rootPath:_0x4e075c,slot:_0x324820,supervisorKey:_0x410e8c}=_0x2faf4b,_0x57e020=commonjsRequire(_0x136738[_0x269c5b(0xd5)](__dirname,'..',_0x269c5b(0xf6))),{EVENTS:_0x454d03}=requireOkdbEnums(),_0xa377b9=new _0x57e020(_0x4e075c,{'engines':![],'http':![],'asyncProcessors':!![],'compaction':_0x269c5b(0xb3),'envs':'core','auth':{'open':!![]},'processing':_0x269c5b(0x12f)});{const _0x280d73={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1c5ab2=_0x280d73[process.env.OKDB_WORKERS_LOG_LEVEL]??_0x280d73[_0x269c5b(0x111)];_0xa377b9['log'][_0x269c5b(0x118)]?.(),_0xa377b9[_0x269c5b(0xd7)]['attach'](_0x1a034c=>{const _0x113a85=_0x269c5b;if((_0x280d73[_0x1a034c['level']]??0x1)<_0x1c5ab2)return;_0xbea9c6({'type':_0x113a85(0xd7),'entry':_0x1a034c});});}try{await _0xa377b9[_0x269c5b(0xfa)]();}catch(_0x5b0bab){_0xbea9c6({'type':_0x269c5b(0xeb),'error':_0x269c5b(0x191)+_0x5b0bab[_0x269c5b(0x167)]}),process['exit'](0x1);return;}const _0x2dfd7c=Math[_0x269c5b(0xa3)](0x4,Number(process.env.OKDB_WORKERS_ENV_CACHE)||0x40),_0x4b9dbd=new Map(),_0x4ea160=new Set();function _0xbe0d2(_0x562e4e){const _0x17d2ae=_0x269c5b;try{for(const _0x56bc94 of _0x562e4e['processor']?.[_0x17d2ae(0xe5)]?.[_0x17d2ae(0x121)]()??[]){if(_0x56bc94[_0x17d2ae(0xc8)]?.[_0x17d2ae(0x113)]?.())return!![];}}catch{}return![];}function _0xd45b8a(_0x1f2df3,_0x181173){const _0x282b92=_0x269c5b;if(_0x4ea160[_0x282b92(0x11c)](_0x1f2df3))return!![];if(_0xbe0d2(_0x181173))return!![];for(const [,_0x2fd8cb]of _0x32478c){if(_0x2fd8cb?.[_0x282b92(0x10d)]===_0x1f2df3)return!![];}return![];}async function _0x5eadb2(_0x1db0d7,_0x1b51f4){const _0x29c30d=_0x269c5b;for(const _0x47c6e5 of[..._0xa377b9[_0x29c30d(0xbd)][_0x29c30d(0x160)]?.['keys']?.()??[]]){if(!_0x47c6e5[_0x29c30d(0x142)](_0x1db0d7+':'))continue;const _0xf4df12=_0xa377b9[_0x29c30d(0xbd)]['_processorStops'][_0x29c30d(0x163)](_0x47c6e5);_0xa377b9[_0x29c30d(0xbd)]['_processorStops'][_0x29c30d(0x171)](_0x47c6e5);try{await _0xf4df12?.();}catch{}}try{await _0x1b51f4[_0x29c30d(0x156)]?.[_0x29c30d(0x92)]?.();}catch{}}async function _0x1a0a2f(_0x3b9018){const _0xcd0816=_0x269c5b,_0x550c36=_0x4b9dbd['get'](_0x3b9018);if(!_0x550c36)return;_0x4b9dbd[_0xcd0816(0x171)](_0x3b9018),await _0x5eadb2(_0x3b9018,_0x550c36);try{await _0x550c36[_0xcd0816(0x168)]?.[_0xcd0816(0xf4)]?.();}catch{}try{await _0xa377b9[_0xcd0816(0xbd)][_0xcd0816(0xa1)]?.(_0x3b9018);}catch{}_0xa377b9['_envs']['delete'](_0x3b9018);try{await _0x550c36[_0xcd0816(0x19b)]();}catch{}}async function _0x50c07e(_0x3b4446){const _0x49026c=_0x269c5b;if(_0x4b9dbd[_0x49026c(0x11c)](_0x3b4446)){const _0x5de857=_0x4b9dbd[_0x49026c(0x163)](_0x3b4446);return _0x4b9dbd['delete'](_0x3b4446),_0x4b9dbd[_0x49026c(0x16f)](_0x3b4446,_0x5de857),_0x5de857;}const _0xebaaeb=_0xa377b9[_0x49026c(0x159)]['get'](_0x3b4446);if(_0xebaaeb&&!_0xebaaeb[_0x49026c(0x11d)])return _0xebaaeb;if(_0x4b9dbd[_0x49026c(0x13f)]>=_0x2dfd7c)for(const [_0x367530,_0x5bc5d2]of _0x4b9dbd){if(!_0xd45b8a(_0x367530,_0x5bc5d2)){await _0x1a0a2f(_0x367530);break;}}const _0x3a2a78=await _0xa377b9[_0x49026c(0x1a4)](_0x3b4446);return _0x4b9dbd['set'](_0x3b4446,_0x3a2a78),_0x3a2a78;}_0xa377b9[_0x269c5b(0xab)]['on'](_0x454d03['SYSTEM_DRAIN'],()=>{const _0x242995=_0x269c5b;(async()=>{for(const [_0x2d5532,_0x30c99c]of[..._0x4b9dbd]){if(!_0xd45b8a(_0x2d5532,_0x30c99c))await _0x1a0a2f(_0x2d5532);}})()[_0x242995(0x151)](()=>{});});const _0x510a06=setInterval(()=>{const _0x3c3984=_0x269c5b;if(_0x4299bf)return;for(const [,_0x2857ce]of _0xa377b9[_0x3c3984(0x159)]){try{_0x2857ce[_0x3c3984(0x107)]?.();}catch{}}},0xc8);if(typeof _0x510a06[_0x269c5b(0x98)]==='function')_0x510a06['unref']();process['on']('disconnect',()=>_0x2addde(0x0,_0xa377b9));if(process[_0x269c5b(0x143)]!=='win32'){const _0x928f7d=setInterval(()=>{if(process['ppid']===0x1)_0x2addde(0x0,_0xa377b9);},0x7d0);if(typeof _0x928f7d[_0x269c5b(0x98)]==='function')_0x928f7d[_0x269c5b(0x98)]();}process['on'](_0x269c5b(0x167),_0x5eae95=>{const _0x29194d=_0x269c5b;if(_0x5eae95?.[_0x29194d(0x194)]===_0x29194d(0xf4))_0x2addde(0x0,_0xa377b9);});const {LOOP:_0x1135ee}=requireOkdbLoopMonitor(),{createIntakeGate:_0x59f803}=requireOkdbIntakeGate(),_0x4eb0cc=Number(process.env.OKDB_WORKERS_MAX_LEASES)||0x20,_0x202a52=Number(process.env.OKDB_WORKERS_LAG_GATE_MS)||0xc8,_0x16ab84=Number(process.env.OKDB_WORKERS_WEDGE_MS)||0x7530,_0x40acad=_0x59f803({'gateMs':_0x202a52});_0x1135ee[_0x269c5b(0x127)](({p99Ms:_0x24c775,maxMs:_0x2231d4})=>{const _0x5117b3=_0x269c5b;_0x2231d4>_0x16ab84&&_0xbea9c6({'type':_0x5117b3(0x182),'maxMs':_0x2231d4});const {changed:_0x827956,level:_0x24e7e2}=_0x40acad[_0x5117b3(0x127)](_0x24c775);if(_0x827956)_0xbea9c6({'type':_0x5117b3(0x105),'level':_0x24e7e2,'p99Ms':_0x24c775});});const {loadHandler:_0x44a6f3}=requireOkdbQueueLoadHandler(),_0x32478c=new Map();let _0x52e526=![],_0x596813={'defsSeen':-0x1,'lastError':null,'at':0x0};const _0x18beff=new Set(),_0x4f6acf=(_0x2a789a,_0x56b1af)=>{const _0x19b7a7=_0x269c5b,_0x40964f=_0x2a789a+'::'+_0x56b1af;if(_0x18beff['has'](_0x40964f))return;_0x18beff[_0x19b7a7(0x150)](_0x40964f),_0xbea9c6({'type':'warn','msg':'queue\x20definition\x20SKIPPED:\x20'+_0x2a789a+_0x19b7a7(0x116)+_0x56b1af});},_0x4a5407={'name':_0x269c5b(0x10c),'cost':'control','inFlight':()=>_0x32478c[_0x269c5b(0x13f)],'detail':()=>({'consumers':[..._0x32478c[_0x269c5b(0x134)]()],'tick':_0x596813}),async 'tick'(){const _0x525f8c=_0x269c5b;if(_0x52e526||_0x4299bf)return;_0x52e526=!![];try{const _0x44a288=_0xa377b9[_0x525f8c(0x11b)][_0x525f8c(0x17a)]?.(_0x525f8c(0xa7))??[];_0x596813={'defsSeen':_0x44a288[_0x525f8c(0x15b)],'lastError':null,'at':Date[_0x525f8c(0xf2)]()};const _0x4ff7cb=new Set();for(const {key:_0x15254a,value:_0xbcb1ec}of _0x44a288){if(!_0xbcb1ec||_0xbcb1ec[_0x525f8c(0x8e)]===![])continue;_0x4ff7cb[_0x525f8c(0x150)](_0x15254a);const _0xbbfd00=_0x32478c[_0x525f8c(0x163)](_0x15254a);if(_0xbbfd00){if(_0xbbfd00[_0x525f8c(0x19e)]===_0xbcb1ec[_0x525f8c(0x19e)])continue;_0x32478c['delete'](_0x15254a);try{await _0xbbfd00[_0x525f8c(0xfe)]?.[_0x525f8c(0xf4)]?.();}catch{}}const _0x66ccd1=_0xbcb1ec[_0x525f8c(0x10d)]??_0x15254a['split']('::')[0x0];let _0xaa0892;try{_0xaa0892=await _0x50c07e(_0x66ccd1);}catch(_0x109b61){_0x4f6acf(_0x15254a,_0x525f8c(0xf0)+_0x109b61?.['message']);continue;}if(!_0xaa0892?.[_0x525f8c(0x10c)]){_0x4f6acf(_0x15254a,'env\x20has\x20no\x20queue\x20feature\x20attached');continue;}let _0x4e9b9a;try{_0x4e9b9a=_0x44a6f3(_0xbcb1ec['modulePath'],_0xbcb1ec['exportName']);}catch(_0x4fdf8b){_0x4f6acf(_0x15254a,'handler\x20module\x20failed\x20to\x20load:\x20'+_0x4fdf8b?.[_0x525f8c(0x167)]);continue;}let _0x3c8e51;try{_0x3c8e51=_0xaa0892[_0x525f8c(0x10c)][_0x525f8c(0xce)](_0xbcb1ec[_0x525f8c(0x104)]??_0x15254a[_0x525f8c(0x91)]('::')[0x1],_0x4e9b9a,_0xbcb1ec[_0x525f8c(0x193)]??{});}catch(_0x21631d){_0x4f6acf(_0x15254a,_0x525f8c(0x132)+_0x21631d?.['message']);continue;}_0x32478c[_0x525f8c(0x16f)](_0x15254a,{'worker':_0x3c8e51,'version':_0xbcb1ec[_0x525f8c(0x19e)],'envName':_0x66ccd1});}for(const [_0x3c4c78,_0x2b646a]of[..._0x32478c]){if(!_0x4ff7cb['has'](_0x3c4c78)){_0x32478c[_0x525f8c(0x171)](_0x3c4c78),_0xbea9c6({'type':_0x525f8c(0x111),'msg':_0x525f8c(0x18e)+_0x3c4c78});try{await _0x2b646a[_0x525f8c(0xfe)]?.[_0x525f8c(0xf4)]?.();}catch{}}}}catch(_0x53eeb6){_0x596813[_0x525f8c(0x95)]=_0x53eeb6?.['message']??String(_0x53eeb6);throw _0x53eeb6;}finally{_0x52e526=![];}}};let _0x1cf73b;{const {SandboxHost:_0x1a4685}=requireOkdbFunctionsSandboxHost(),_0x214467=_0xa377b9[_0x269c5b(0x14d)][_0x269c5b(0x139)]('~fn:requests',{'dupSort':![]}),_0x4abf43=_0xa377b9['_rootDb'][_0x269c5b(0x139)](_0x269c5b(0x145),{'dupSort':![]}),_0x4c4683=Number(process.env.OKDB_FN_STALE_MS)||0xea60,_0x10f904=new _0x1a4685({'rootPath':_0x4e075c,'log':_0xa377b9[_0x269c5b(0xd7)],'onThreadStats':(_0x66089c,_0x6cd0ad)=>{const _0x20c015=_0x269c5b;if(_0x6cd0ad)_0xa377b9[_0x20c015(0x11b)]?.[_0x20c015(0x12e)]?.(_0x66089c,_0x6cd0ad);else _0xa377b9['processes']?.['clearThreadStats']?.(_0x66089c);}});_0x194e67=_0x10f904;const _0x563ecd=new Set(),_0x2e0a98=(_0x412195,_0x403828)=>{const _0x3cf1e6=_0x269c5b,_0x1c8ae5=_0x214467[_0x3cf1e6(0x163)](_0x412195);if(!_0x1c8ae5||_0x1c8ae5[_0x3cf1e6(0x12c)]==='cancelled'){try{_0x214467[_0x3cf1e6(0xf3)](_0x412195);}catch{}return;}_0x4abf43[_0x3cf1e6(0x177)](_0x412195,_0x403828);try{_0x214467[_0x3cf1e6(0xf3)](_0x412195);}catch{}},_0x5c4941=(_0x762b39,_0x358402)=>{const _0x4b5aad=_0x269c5b;_0x563ecd['add'](_0x762b39),_0x10f904[_0x4b5aad(0x8b)]({..._0x358402,'requestId':_0x762b39})[_0x4b5aad(0xde)](({message:_0x5ece61,logs:_0x65d100})=>_0x2e0a98(_0x762b39,{'message':_0x5ece61,'logs':_0x65d100}))[_0x4b5aad(0x151)](_0x30c9e9=>{const _0x53cefb=_0x4b5aad;if(_0x30c9e9?.['code']===_0x53cefb(0xe3)){try{const _0x31855c=_0x214467[_0x53cefb(0x163)](_0x762b39);_0x31855c&&_0x31855c[_0x53cefb(0x12c)]==='running'&&_0x31855c['claimedBy']===process[_0x53cefb(0x117)]&&_0x214467[_0x53cefb(0x177)](_0x762b39,{..._0x31855c,'state':'pending','requestedAt':Date[_0x53cefb(0xf2)]()});}catch{}return;}_0x2e0a98(_0x762b39,{'message':{'type':_0x53cefb(0xeb),'requestId':_0x762b39,'runId':_0x358402[_0x53cefb(0x10f)],'error':{'message':_0x30c9e9?.[_0x53cefb(0x167)]??String(_0x30c9e9),'code':_0x30c9e9?.[_0x53cefb(0xad)]??_0x53cefb(0xc7)},'meta':{'runnerId':_0x53cefb(0x120)+process[_0x53cefb(0x117)]}},'logs':[]});})[_0x4b5aad(0x11a)](()=>_0x563ecd[_0x4b5aad(0x171)](_0x762b39));};_0x1cf73b={'name':'fn','cost':_0x269c5b(0x161),'inFlight':()=>_0x10f904[_0x269c5b(0x16d)](),async 'tick'(){const _0x59a778=_0x269c5b;if(_0x4299bf)return;for(const _0x4e651b of[..._0x563ecd]){const _0x5704c9=_0x214467['get'](_0x4e651b);if(!_0x5704c9||_0x5704c9[_0x59a778(0x12c)]===_0x59a778(0x190))_0x10f904[_0x59a778(0x187)](_0x4e651b);}for(const {key:_0x3b2b4a,value:_0x5dcc5d}of _0x214467[_0x59a778(0xc5)]({})){if(_0x4299bf)break;if(_0x10f904[_0x59a778(0x16d)]()>=_0x10f904['maxConcurrency'])break;if(!_0x5dcc5d||_0x5dcc5d[_0x59a778(0x12c)]!==_0x59a778(0xf9))continue;if(_0x5dcc5d[_0x59a778(0x108)]&&Date[_0x59a778(0xf2)]()-_0x5dcc5d['requestedAt']>_0x4c4683){try{_0x214467[_0x59a778(0x166)](()=>{const _0x560b2c=_0x59a778,_0x593b31=_0x214467['get'](_0x3b2b4a);if(_0x593b31?.[_0x560b2c(0x12c)]===_0x560b2c(0xf9)&&_0x593b31[_0x560b2c(0x108)]&&Date[_0x560b2c(0xf2)]()-_0x593b31['requestedAt']>_0x4c4683)_0x214467[_0x560b2c(0x9b)](_0x3b2b4a);});}catch{}continue;}let _0x29a2e5=![];_0x214467['transactionSync'](()=>{const _0x3522e5=_0x59a778,_0x4fbc0c=_0x214467[_0x3522e5(0x163)](_0x3b2b4a);_0x4fbc0c?.['state']===_0x3522e5(0xf9)&&(_0x214467[_0x3522e5(0xe9)](_0x3b2b4a,{..._0x4fbc0c,'state':_0x3522e5(0x179),'claimedBy':process[_0x3522e5(0x117)],'claimedAt':Date[_0x3522e5(0xf2)]()}),_0x29a2e5=!![]);});if(!_0x29a2e5)continue;_0x5c4941(_0x3b2b4a,_0x5dcc5d);}}};}let _0x3546bb=0x0;const _0x5b99e5=_0xa377b9['_rootDb'][_0x269c5b(0x139)](_0x269c5b(0x172),{'dupSort':![]}),_0xd57de2={'name':'bootstrap','cost':_0x269c5b(0x149),'inFlight':()=>_0x3546bb,async 'tick'(){const _0x2d98fc=_0x269c5b;if(_0x4299bf||_0x3546bb>=0x1)return;const _0x1b9226=[];try{for(const {key:_0x5b0752,value:_0x1810e9}of _0x5b99e5['getRange']({})){if(typeof _0x5b0752===_0x2d98fc(0x106)&&_0x1810e9?.[_0x2d98fc(0x84)]&&!_0x1810e9[_0x2d98fc(0x84)]['startsWith']('~'))_0x1b9226[_0x2d98fc(0x192)](_0x1810e9);}}catch{}for(const _0x30fad6 of _0x1b9226){if(_0x4299bf||_0x3546bb>=0x1)return;let _0x2ed6f9;try{_0x2ed6f9=await _0x50c07e(_0x30fad6[_0x2d98fc(0x84)]);}catch{continue;}if(_0x30fad6[_0x2d98fc(0x196)]==='view'&&_0x30fad6[_0x2d98fc(0xbf)]){const _0x466a8d=_0x2ed6f9[_0x2d98fc(0x163)]?.(_0x2d98fc(0x8f),_0x30fad6[_0x2d98fc(0xbf)]);if(!_0x466a8d)continue;let _0x48ed5e=![];_0x4ea160['add'](_0x30fad6['env']);const _0x4e4603=_0x2ed6f9['processor']['claimRoutedBootstrap']({'rowKey':_0x2d98fc(0x181)+_0x30fad6[_0x2d98fc(0x18d)],'cursorKey':_0x30fad6[_0x2d98fc(0x18d)]},async()=>{const _0x2f0e56=_0x2d98fc;!_0x2ed6f9[_0x2f0e56(0x12a)][_0x2f0e56(0x189)]['has'](_0x30fad6[_0x2f0e56(0xbf)])&&_0x2ed6f9[_0x2f0e56(0x12a)][_0x2f0e56(0x101)](_0x30fad6[_0x2f0e56(0xbf)],_0x466a8d),await _0x2ed6f9['views'][_0x2f0e56(0xfc)](_0x30fad6['viewName'],_0x466a8d);},{'onClaimed':()=>{_0x48ed5e=!![],_0x3546bb++;}})[_0x2d98fc(0x151)](()=>{})['finally'](()=>{const _0x42b6fe=_0x2d98fc;if(_0x48ed5e)_0x3546bb--;_0x4ea160[_0x42b6fe(0x171)](_0x30fad6[_0x42b6fe(0x84)]);});if(_0x48ed5e)return;await _0x4e4603;continue;}try{await _0xa377b9['fts'][_0x2d98fc(0xce)]({'envs':[_0x30fad6[_0x2d98fc(0x84)]],'types':_0x30fad6['type']?[_0x30fad6[_0x2d98fc(0x194)]]:'*'});}catch{continue;}let _0x5cb5e4=[];try{_0x5cb5e4=_0x2ed6f9[_0x2d98fc(0x156)][_0x2d98fc(0x152)]();}catch{}for(const _0x12beed of _0x5cb5e4){if(_0x4299bf||_0x3546bb>=0x1)return;let _0x378004=![];_0x4ea160[_0x2d98fc(0x150)](_0x30fad6[_0x2d98fc(0x84)]);const _0x188e04=_0x2ed6f9[_0x2d98fc(0x156)][_0x2d98fc(0xac)](_0x12beed,{'onClaimed':()=>{_0x378004=!![],_0x3546bb++;}})[_0x2d98fc(0x151)](()=>{})[_0x2d98fc(0x11a)](()=>{const _0x16e4b8=_0x2d98fc;if(_0x378004)_0x3546bb--;_0x4ea160['delete'](_0x30fad6[_0x16e4b8(0x84)]);});if(_0x378004)return;await _0x188e04;}}}},_0x277eb7=Math[_0x269c5b(0xa3)](0x1,Number(process.env.OKDB_WORKERS_PROBE_PER_TICK)||0x2),_0x3fc370=Math['max'](0x1,Number(process.env.OKDB_WORKERS_PROBE_GRACE_TICKS)||0x3);let _0x1ac521=Math[_0x269c5b(0xea)](Math[_0x269c5b(0x82)]()*0x1000);const _0x5e710a=new Set(),_0x43060e=new Map(),_0x515bbe=Math[_0x269c5b(0xa3)](0x3e8,Number(process.env.OKDB_WORKERS_PROBE_COOLDOWN_MS)||0x7530),_0x506bc5=new Map(),_0xfe8725={'name':'fts','cost':'light','inFlight':()=>{let _0x12087a=0x0;for(const [,_0x1e5032]of _0x4b9dbd)if(_0xbe0d2(_0x1e5032))_0x12087a++;return _0x12087a;},async 'tick'(){const _0x23c364=_0x269c5b;if(_0x4299bf)return;const _0xab4c17=_0xa377b9[_0x23c364(0xbd)][_0x23c364(0xb6)]();if(_0xab4c17['length']===0x0)return;const _0x4519f0=new Map();for(const _0xf22dc8 of _0xab4c17){if(!_0x4519f0[_0x23c364(0x11c)](_0xf22dc8[_0x23c364(0x84)]))_0x4519f0[_0x23c364(0x16f)](_0xf22dc8['env'],[]);_0x4519f0[_0x23c364(0x163)](_0xf22dc8[_0x23c364(0x84)])['push'](_0xf22dc8['type']);}const _0x4575cd=[..._0x4519f0[_0x23c364(0x134)]()],_0x3d54c8=Date[_0x23c364(0xf2)](),_0x5ae7a1=[];for(const _0x57daac of _0x5e710a){_0x4519f0[_0x23c364(0x11c)](_0x57daac)&&!_0x5ae7a1[_0x23c364(0xa0)](_0x57daac)&&(_0x506bc5['delete'](_0x57daac),_0x5ae7a1[_0x23c364(0x192)](_0x57daac));}_0x5e710a[_0x23c364(0x186)]();for(let _0x156ef7=0x0;_0x5ae7a1[_0x23c364(0x15b)]<_0x277eb7&&_0x156ef7<_0x4575cd[_0x23c364(0x15b)];_0x156ef7++){const _0x44a027=_0x4575cd[(_0x1ac521+_0x156ef7)%_0x4575cd[_0x23c364(0x15b)]];if(_0x5ae7a1[_0x23c364(0xa0)](_0x44a027))continue;if((_0x506bc5[_0x23c364(0x163)](_0x44a027)??0x0)>_0x3d54c8)continue;_0x5ae7a1[_0x23c364(0x192)](_0x44a027);}_0x1ac521=(_0x1ac521+_0x277eb7)%Math['max'](0x1,_0x4575cd['length']);for(const _0x4ca7a9 of _0x5ae7a1){if(_0x4299bf)return;try{await _0x50c07e(_0x4ca7a9),await _0xa377b9[_0x23c364(0xbd)]['process']({'envs':[_0x4ca7a9],'types':_0x4519f0['get'](_0x4ca7a9)});}catch{}}for(const [_0x4e8110,_0x53d06a]of[..._0x4b9dbd]){if(_0xd45b8a(_0x4e8110,_0x53d06a)){_0x43060e[_0x23c364(0x171)](_0x4e8110);continue;}const _0xa48d29=(_0x43060e[_0x23c364(0x163)](_0x4e8110)??0x0)+0x1;_0xa48d29>=_0x3fc370?(_0x43060e[_0x23c364(0x171)](_0x4e8110),_0x506bc5['set'](_0x4e8110,Date[_0x23c364(0xf2)]()+_0x515bbe),await _0x1a0a2f(_0x4e8110)):_0x43060e[_0x23c364(0x16f)](_0x4e8110,_0xa48d29);}}};_0xa377b9[_0x269c5b(0xab)]['on'](_0x454d03[_0x269c5b(0xe8)],_0x1e73f6=>{const _0x1968e6=_0x269c5b,_0x4c0d49=_0x1e73f6?.[_0x1968e6(0x84)];if(typeof _0x4c0d49===_0x1968e6(0x106)&&_0x4c0d49&&!_0x4c0d49['startsWith']('~'))_0x5e710a['add'](_0x4c0d49);});const _0xdd223b=Math[_0x269c5b(0xa3)](0x64,Number(process.env.OKDB_WORKERS_CLAIM_TICK_MS)||0x3e8),_0x153710=[_0x1cf73b,_0x4a5407,_0xd57de2,_0xfe8725],_0x678b45=[_0x4a5407,_0xd57de2,_0xfe8725];let _0x55d075=0x0;const _0x312fba=_0x12fed9=>{const _0x1b33e4=_0x269c5b;if(_0x4299bf||_0x40acad['blocks'](_0x12fed9[_0x1b33e4(0x17b)]))return;_0x12fed9[_0x1b33e4(0x123)]()[_0x1b33e4(0x151)](()=>{});},_0x552fc1=setInterval(()=>{const _0x53da23=_0x269c5b;_0x312fba(_0x1cf73b);for(let _0x1632cb=0x0;_0x1632cb<_0x678b45[_0x53da23(0x15b)];_0x1632cb++){_0x312fba(_0x678b45[(_0x55d075+_0x1632cb)%_0x678b45[_0x53da23(0x15b)]]);}_0x55d075=(_0x55d075+0x1)%_0x678b45['length'];},_0xdd223b);if(typeof _0x552fc1[_0x269c5b(0x98)]===_0x269c5b(0x90))_0x552fc1[_0x269c5b(0x98)]();_0xa377b9[_0x269c5b(0xab)]['on'](_0x454d03['SYSTEM_PROC'],_0x96bf10=>{const _0x19fb17=_0x269c5b;if(_0x96bf10?.[_0x19fb17(0x10e)]==='fn')_0x312fba(_0x1cf73b);else{if(_0x96bf10?.[_0x19fb17(0x10e)]==='bootstrap')_0x312fba(_0xd57de2);else{if(_0x96bf10?.[_0x19fb17(0x10e)]===_0x19fb17(0xa7))_0x312fba(_0x4a5407);else{if(_0x96bf10?.['scope']===_0x19fb17(0x80)&&typeof _0x96bf10[_0x19fb17(0x1a1)]===_0x19fb17(0x106)){const _0x49711a=_0x96bf10[_0x19fb17(0x1a1)];_0xbea9c6({'type':'warn','msg':'env-removed\x20hint:\x20force-evicting\x20'+_0x49711a+_0x19fb17(0x119)+_0x4b9dbd[_0x19fb17(0x11c)](_0x49711a)+')'}),(async()=>{const _0x11e151=_0x19fb17;for(const [_0x25fbdd,_0x119f72]of[..._0x32478c]){if(_0x119f72?.[_0x11e151(0x10d)]!==_0x49711a)continue;_0x32478c[_0x11e151(0x171)](_0x25fbdd);try{await _0x119f72[_0x11e151(0xfe)]?.[_0x11e151(0xf4)]?.();}catch{}}_0x4ea160[_0x11e151(0x171)](_0x49711a),_0x5e710a[_0x11e151(0x171)](_0x49711a),_0x506bc5[_0x11e151(0x16f)](_0x49711a,Date[_0x11e151(0xf2)]()+0x1d4c0),await _0x1a0a2f(_0x49711a),_0xbea9c6({'type':_0x11e151(0x111),'msg':_0x11e151(0xfb)+_0x49711a+_0x11e151(0x12b)});})()[_0x19fb17(0x151)](_0x34e81e=>{const _0x227b1e=_0x19fb17;_0xbea9c6({'type':_0x227b1e(0x111),'msg':_0x227b1e(0x19f)+_0x49711a+':\x20'+_0x34e81e?.['message']});});}}}}});for(const _0x2ea73b of _0x153710)_0x312fba(_0x2ea73b);_0x2041c9(_0xbea9c6,_0xa377b9,()=>({'claims':_0x153710[_0x269c5b(0x16a)](_0x3e0d14=>({'name':_0x3e0d14[_0x269c5b(0x17c)],'inFlight':_0x3e0d14['inFlight'](),'gated':_0x40acad[_0x269c5b(0x18f)](_0x3e0d14[_0x269c5b(0x17b)]),..._0x3e0d14[_0x269c5b(0xaa)]?{'detail':_0x3e0d14[_0x269c5b(0xaa)]()}:{}})),'envsOpen':_0xa377b9['_envs'][_0x269c5b(0x13f)]})),_0xbea9c6({'type':_0x269c5b(0xae),'pid':process['pid'],'slot':_0x324820,'supervisorKey':_0x410e8c,'maxLeases':_0x4eb0cc});}return _0x41a99b()['catch'](_0x2c1979=>{const _0x83d28d=_0x9b6073;_0xbea9c6({'type':_0x83d28d(0xeb),'error':_0x2c1979[_0x83d28d(0x167)]}),process[_0x83d28d(0x115)](0x1);}),okdbWorkerChild$1;}var okdbWorkerChildExports=requireOkdbWorkerChild(),okdbWorkerChild=getDefaultExportFromCjs(okdbWorkerChildExports);module['exports']=okdbWorkerChild;