@kedem/okdb 2.7.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +82 -3
- package/bin/okdb +2 -0
- package/index.js +1 -0
- package/native/linux-x64-gnu/okdb +0 -0
- package/native/linux-x64-gnu/okdb-node.linux-x64-gnu.node +0 -0
- package/native-loader.d.ts +20 -0
- package/native-loader.js +1 -0
- package/okdb-native.js +1 -0
- package/package.json +27 -14
- package/algorithm-worker-thread.js +0 -1
- package/bin/okdb.js +0 -2
- package/okdb-functions-sandbox-worker.js +0 -1
- package/okdb-http-worker-child.js +0 -1
- package/okdb-views-bootstrap-worker.js +0 -1
- package/okdb.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';const _0x551940=_0x2b4f;(function(_0x546132,_0x5b7a40){const _0x26345e=_0x2b4f,_0x257be7=_0x546132();while(!![]){try{const _0x31ba0d=-parseInt(_0x26345e(0x338))/0x1*(-parseInt(_0x26345e(0x22e))/0x2)+-parseInt(_0x26345e(0x1dc))/0x3*(parseInt(_0x26345e(0x35c))/0x4)+parseInt(_0x26345e(0x2c4))/0x5*(-parseInt(_0x26345e(0x291))/0x6)+-parseInt(_0x26345e(0x373))/0x7*(parseInt(_0x26345e(0x235))/0x8)+-parseInt(_0x26345e(0x295))/0x9+parseInt(_0x26345e(0x36d))/0xa*(parseInt(_0x26345e(0x20e))/0xb)+-parseInt(_0x26345e(0x285))/0xc*(-parseInt(_0x26345e(0x20a))/0xd);if(_0x31ba0d===_0x5b7a40)break;else _0x257be7['push'](_0x257be7['shift']());}catch(_0x3208dc){_0x257be7['push'](_0x257be7['shift']());}}}(_0x2e55,0xbb683));var require$$0$4=require(_0x551940(0x332)),require$$2$1=require('v8'),require$$0=require('node:vm'),require$$1=require(_0x551940(0x300)),require$$2=require(_0x551940(0x352)),require$$0$3=require(_0x551940(0x311)),require$$0$1=require('lmdb'),require$$0$2=require(_0x551940(0x27c)),require$$6=require(_0x551940(0x210));function getDefaultExportFromCjs(_0x54519d){const _0x5acf2b=_0x551940;return _0x54519d&&_0x54519d[_0x5acf2b(0x2ce)]&&Object[_0x5acf2b(0x326)]['hasOwnProperty'][_0x5acf2b(0x1d2)](_0x54519d,'default')?_0x54519d[_0x5acf2b(0x2a8)]:_0x54519d;}var okdbFunctionsSandboxWorker$1={},okdbFatalReport,hasRequiredOkdbFatalReport;function requireOkdbFatalReport(){if(hasRequiredOkdbFatalReport)return okdbFatalReport;hasRequiredOkdbFatalReport=0x1;function _0x1f0080(_0x56cdfa){const _0x59b858=_0x2b4f;if(process.env.OKDB_FATAL_REPORT!=='1')return;try{if(!process[_0x59b858(0x364)])return;process[_0x59b858(0x364)]['reportOnFatalError']=!![];try{if('excludeEnv'in process[_0x59b858(0x364)])process[_0x59b858(0x364)][_0x59b858(0x359)]=process.env.OKDB_FATAL_REPORT_ENV!=='1';}catch{}if(process[_0x59b858(0x2bf)]!=='win32')try{process[_0x59b858(0x364)][_0x59b858(0x25f)]=!![];if(typeof process[_0x59b858(0x364)][_0x59b858(0x2c5)]===_0x59b858(0x208))process[_0x59b858(0x364)][_0x59b858(0x2c5)]='SIGSEGV';}catch{}if(process.env.OKDB_REPORT_DIR)try{require('fs')['mkdirSync'](process.env.OKDB_REPORT_DIR,{'recursive':!![]}),process['report'][_0x59b858(0x209)]=process.env.OKDB_REPORT_DIR;}catch{}try{process[_0x59b858(0x364)][_0x59b858(0x26f)]='';}catch{}if(_0x56cdfa)process.env.OKDB_REPORT_TAG=String(_0x56cdfa);}catch{}}return okdbFatalReport={'enableFatalReport':_0x1f0080},okdbFatalReport;}var okdbFunctionsSandbox,hasRequiredOkdbFunctionsSandbox;function _0x2e55(){const _0xc4b93d=['OKDBInvalidPrimaryKeyError','functionName','targetType','forEach','fetch\x20is\x20not\x20allowed\x20in\x20this\x20function\x20sandbox\x20(no\x20allowedFetchDomains\x20configured)','upload','proxy-authorization','\x20which\x20does\x20not\x20exist','item:create','now','GET','maxMs','warn','path','trigger','prototype','cancelled\x20by\x20caller','_undoHooks','cookie','OKDBInvalidValueError','127.0.0.0','engineKey','Type\x20\x27','lastTxnId','pid','::1','stop','worker_threads','OKDBIndexAlreadyRegisteredError','rollback','byIndex','total','198.18.0.0','1srJwOm','_drainHandler','fts:drop','FUNCTION_SCRIPT_COMPILE_FAILED','function','done','entries','commit','details','ms\x20p99=','getTTL','getHeapStatistics','fetch\x20blocked:\x20\x22','return','key','240.0.0.0','system:proc','actions','Unsupported\x20transaction\x20action:\x20','OKDBNotFoundError','license:added','Index\x20\x22','max','options','allowedFetchDomains','BlockList','node:dns','isFinite','FOREIGN_KEY_VIOLATION','\x27\x20doesn\x27t\x20exist','https:','events','TYPE_ALREADY_REGISTERED','excludeEnv','_report','requestedAt','348LAjxRC','toString','keys','ms\x20busy=','redirect\x20count\x20exceeded','_timer','size','Unknown\x20custom\x20function\x20error','report','schema:drop','item:update','code','POST','SCHEMA_COLLECTION_INVALID','fill','2001:db8::','item:pending','5894590BSlQHO','clearTtl','status','TXN_START','field:resolver_registered','location','553RQfNDc','defineProperty','join','\x20does\x20not\x20exist','_closeReadTransaction','system:stopped','then','create','match','INVALID_PRIMARY_KEY','invalid\x20redirect\x20location','object','abort','hasType','bus:drain','maxExtra','name','runInContext','_admissionStarted','ms\x20max=','\x20documents\x20fail\x20validation','system:bus_state_change','tolerant','sort','getEntry','getStats','OKDBUniqueConstraintError','sandbox-','_admissionTimer',':\x20expected\x20','meanwhile\x20—\x20the\x20frozen\x20view\x20cannot\x20be\x20kept.\x20Materialize\x20synchronously\x20(e.g.\x20Array.from)\x20','tags','192.168.0.0','tries','fec0::','env:removed','emit','protocol','sweepExpiredTTL','OKDBVersionMismatchError','ref:violation_resolved','call','_startAdmission','UNIQUE_CONSTRAINT','exports','freeze','OKDBAlreadyExistsError','txn:start','type','add','ipv4','18909mAXWvt','envPath','license:removed','Script','isIP','next','origin','isArray','startsWith','Cannot\x20delete\x20','ttl','listTTL','sdk','error','href','concat','100.64.0.0','length','toLowerCase','creating','getKeys','_started','Function\x20script\x20must\x20evaluate\x20to\x20a\x20callable\x20function','redirect','enableFatalReport','list','SCHEMA_VALIDATION_FAILED','_buckets','args','dryRunActions','references','http:','queue','from','_closed','0.0.0.0','check','OKDBError','FETCH_NOT_ALLOWED','Transaction\x20already\x20closed','before\x20any\x20await\x20—\x20or\x20opt\x20into\x20useReadTransaction:\x27tolerant\x27\x20to\x20keep\x20reading\x20while\x20','system:env_release','TXN_CLOSED','promises','string','directory','221iDAduU','headers','true','_txnIdAtSnapshot','11wCsNnC','getChanges','./okdb','boundary\x20(a\x20pinned\x20read\x20txn\x20blocks\x20LMDB\x20free-page\x20reuse).\x20Do\x20all\x20consistent\x20reads\x20','fetch\x20blocked:\x20scheme\x20\x22','compileTimeoutMs','released\x20at\x20the\x20first\x20await/turn\x20boundary.\x20Consume\x20ranges\x20before\x20any\x20await,\x20or\x20','ms\x20mean=','bus:proc','clearTTL','job','TXN_INVALID_ACTION','Cannot\x20set\x20enforce\x20schema\x20on\x20','resetting','indexReady','TXN_INVALID_OP','TXN_ROLLBACK','asArray','getBucket','count','message','value','hostname','unref','transaction','169.254.0.0','registerIndex','filter','range','unique:violation_resolved','envName','sourceType','2013042CbrRib','version',':useReadTransaction','pinned\x20range\x20iterator\x20parked\x20across\x20an\x20await/turn\x20boundary\x20and\x20the\x20env\x20was\x20written\x20','system:clock_change','10.0.0.0','txn-commit','2272uHTveG','global','has','createContext','stopped','updateJob','ipv6','UND_ERR_REDIRECT','env','SKIP','ready','fieldPath','setTTL','getMany','onWindow','createEnvironment','getJob','used_heap_size','enable','listBuckets','_makeIterator','test','ref:violation','fetch\x20blocked:\x20hostname\x20\x22','result','(worst\x20','listPath','dryRun','\x27\x20on\x20type\x20\x27','applyOps','runId','delete','sync:apply','getValues','iterator','dropType','unique:violation','slice','claimId','offWindow','note','getClock','reportOnSignal','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','ensureType','addSubnet','flatMap','Unknown\x20transaction\x20action:\x20','unexpected\x20redirect','setSchema','query','Invalid\x20primary\x20key\x20type:\x20','any','getIndex','url',']\x20already\x20maps\x20to\x20\x27','ttl:clear','~system','filename','openEnv','bind','loop-lag','fe80::','log','debug','dropIndex','files','errors','txn:rollback','stderr','content-type','node:perf_hooks','manual','toJSON','percentile','OKDBIndexHasConsumersError','run','index:registered','follow','Invalid\x20index\x20key\x20type\x20for\x20\x27','1783248DNVSFx','INDEX_NOT_REGISTERED','created','ff00::','dropping','_log','READER_HELD_ACROSS_AWAIT','ttl:set','cursorKey','setDefaultTTL','bus:env_release','exit','6036AWqPjp','processorContext','stack','fetch\x20blocked:\x20invalid\x20URL','12378888INVJIO','put','reset','jobContext','setTtl','patch','(no\x20unambiguous\x20bookmark)\x20—\x20consume\x20it\x20in\x20one\x20synchronous\x20block:\x20materialize\x20(e.g.\x20','sourceKey','targetEnv','index:drop','TXN_END','before\x20any\x20await,\x20chunk\x20with\x20{limit,\x20start,\x20exclusiveStart},\x20or\x20drop\x20snapshot:true.','Array.from)\x20before\x20any\x20await.','map','get','index:reset','runtime','postMessage','waiting','default','stream','DONE','Foreign\x20key\x20violation:\x20','byLabel','transaction\x20commit\x20failed','fts:registered','push','method','192.0.0.0','txn','Version\x20mismatch\x20for\x20','globalThis',':\x20key\x20[','getCount','TXN_ERROR','addBucket','onDo','Unique\x20constraint\x20violated\x20on\x20','txn:end','createWriteFacade','removeJob','clearDefaultTTL','platform','update','type:drop','useReadTransaction','_envs','7000NgyJJV','signal','system:poke','_windowCbs','read','hasIndex','redirect\x20to\x20a\x20non-http(s)\x20URL','bus:poke','ttlStats','constructor','__esModule','geoQuery','halted','_readViewExpired','remove','dropFts','last','txn\x20op\x20must\x20be\x20an\x20object\x20or\x20tuple','203.0.113.0','Index\x20\x27','getDefaultTTL','content-length','redirected','action','authorization','OKDBInvalidIndexKeyError','enabled','toUpperCase','\x20actions=','started','mode','disable','catch','set','split','allowFetch','registerType','stats','resetIndex','_doHooks','crypto','processor','pinned\x20range\x20iterator\x20held\x20across\x20an\x20await/turn\x20boundary.\x20This\x20surface\x20cannot\x20resume\x20','OKDBSchemaValidationError','cause','getIndexStatus','mapError','setLogger','_range','enqueue','failures','cancel','sourceEnv','INVALID_INDEX_KEY','txn\x20ops\x20must\x20be\x20an\x20array','materialize\x20them\x20(Array.from)\x20while\x20the\x20view\x20is\x20live.','getRange','toFixed','\x22\x20is\x20not\x20http(s)','body','node:net','\x20references\x20','TYPE_NOT_REGISTERED','clear','start','index:ready','\x22\x20on\x20\x22','requestId','removeEnvironment',':txnRange','readTransaction','priority','okdb','224.0.0.0','sandbox\x20worker:\x20rootPath\x20missing\x20from\x20workerData','_assertOpen','info','uuid','\x22\x20is\x20used\x20by:\x20','198.51.100.0','cron','targetKey','job_heartbeat'];_0x2e55=function(){return _0xc4b93d;};return _0x2e55();}function requireOkdbFunctionsSandbox(){const _0x5963fc=_0x551940;if(hasRequiredOkdbFunctionsSandbox)return okdbFunctionsSandbox;hasRequiredOkdbFunctionsSandbox=0x1;const _0x365767=require$$0,_0x4152f=require$$1,_0x4d9e19=require$$2[_0x5963fc(0x207)],_0x359ee7=0x14,_0x507e4d=new Set([0x12d,0x12e,0x12f,0x133,0x134]),_0x291114=[_0x5963fc(0x2dc),_0x5963fc(0x329),_0x5963fc(0x31d)],_0x593ea5=new _0x4152f[(_0x5963fc(0x351))]();for(const [_0x33c037,_0x2ee844]of[[_0x5963fc(0x1ff),0x8],[_0x5963fc(0x233),0x8],[_0x5963fc(0x1ec),0xa],[_0x5963fc(0x32b),0x8],[_0x5963fc(0x227),0x10],['172.16.0.0',0xc],[_0x5963fc(0x2b1),0x18],['192.0.2.0',0x18],[_0x5963fc(0x1c9),0x10],[_0x5963fc(0x337),0xf],[_0x5963fc(0x313),0x18],[_0x5963fc(0x2d6),0x18],[_0x5963fc(0x30d),0x4],[_0x5963fc(0x347),0x4]]){_0x593ea5[_0x5963fc(0x262)](_0x33c037,_0x2ee844,_0x5963fc(0x1db));}const _0x5f4ba8=new _0x4152f[(_0x5963fc(0x351))]();for(const [_0x5ee1d2,_0x13e66d]of[['::',0x80],[_0x5963fc(0x330),0x80],['fc00::',0x7],[_0x5963fc(0x273),0xa],[_0x5963fc(0x1cb),0xa],[_0x5963fc(0x36b),0x20],[_0x5963fc(0x288),0x8]]){_0x5f4ba8[_0x5963fc(0x262)](_0x5ee1d2,_0x13e66d,_0x5963fc(0x23b));}function _0x2a7c76(_0x462656){const _0x301021=_0x5963fc;let _0x4a0232=_0x462656[_0x301021(0x1ee)]();const _0x32042b=_0x4a0232[_0x301021(0x37b)](/^(.*:)(\d+\.\d+\.\d+\.\d+)$/);if(_0x32042b){const [_0x584f0c,_0x53e3d5,_0x4777dd,_0x4e1c04]=_0x32042b[0x2][_0x301021(0x2e6)]('.')[_0x301021(0x2a2)](Number);_0x4a0232=''+_0x32042b[0x1]+(_0x584f0c<<0x8|_0x53e3d5)[_0x301021(0x35d)](0x10)+':'+(_0x4777dd<<0x8|_0x4e1c04)[_0x301021(0x35d)](0x10);}const [_0x127a73,_0x5a0e4c]=_0x4a0232[_0x301021(0x2e6)]('::'),_0x15ca04=_0x127a73?_0x127a73[_0x301021(0x2e6)](':'):[],_0x44e1fd=_0x5a0e4c!==undefined?_0x5a0e4c?_0x5a0e4c[_0x301021(0x2e6)](':'):[]:null,_0xa7d59b=_0x44e1fd===null?_0x15ca04:[..._0x15ca04,...Array(0x8-_0x15ca04[_0x301021(0x1ed)]-_0x44e1fd[_0x301021(0x1ed)])[_0x301021(0x36a)]('0'),..._0x44e1fd];return _0xa7d59b[_0x301021(0x2a2)](_0x1dd25d=>parseInt(_0x1dd25d,0x10));}function _0x235a35(_0x1156df){const _0x3bb083=_0x5963fc,_0x19b0cc=_0x4152f[_0x3bb083(0x1e0)](_0x1156df);if(_0x19b0cc===0x4)return _0x593ea5['check'](_0x1156df,'ipv4');if(_0x19b0cc!==0x6)return![];if(_0x5f4ba8[_0x3bb083(0x200)](_0x1156df,_0x3bb083(0x23b)))return!![];const _0x4a08fe=_0x2a7c76(_0x1156df),_0x4942cc=(_0x1b2ab0,_0xb9b55d)=>(_0x1b2ab0>>0x8)+'.'+(_0x1b2ab0&0xff)+'.'+(_0xb9b55d>>0x8)+'.'+(_0xb9b55d&0xff);if(_0x4a08fe['slice'](0x0,0x5)['every'](_0x2f2ec8=>_0x2f2ec8===0x0)&&_0x4a08fe[0x5]===0xffff)return _0x235a35(_0x4942cc(_0x4a08fe[0x6],_0x4a08fe[0x7]));if(_0x4a08fe[0x0]===0x64&&_0x4a08fe[0x1]===0xff9b&&_0x4a08fe[_0x3bb083(0x25a)](0x2,0x6)['every'](_0xde3c7a=>_0xde3c7a===0x0))return _0x235a35(_0x4942cc(_0x4a08fe[0x6],_0x4a08fe[0x7]));if(_0x4a08fe[0x0]===0x2002)return _0x235a35(_0x4942cc(_0x4a08fe[0x1],_0x4a08fe[0x2]));return![];}function _0xd69b64(_0x466669,_0x7ed222){const _0xd7ec8d=new Error(_0x466669);return _0xd7ec8d['code']=_0x7ed222,_0xd7ec8d;}function _0x41dd35(_0x4ebc42,{lookup:lookup=_0x4d9e19['lookup']}={}){const _0x175ebb=_0x5963fc,_0xf21103=_0x4ebc42==='*',_0x45bfbd=new Set(Array[_0x175ebb(0x1e3)](_0x4ebc42)?_0x4ebc42:[]),_0x43fc3c=/^(1|true)$/i[_0x175ebb(0x24a)](process.env.OKDB_FN_FETCH_ALLOW_PRIVATE??'');async function _0x1180ae(_0x1084d3,_0x30c6b3){const _0x5640cf=_0x175ebb;if(_0x1084d3['protocol']!==_0x5640cf(0x1fb)&&_0x1084d3[_0x5640cf(0x1ce)]!==_0x5640cf(0x356))throw _0x30c6b3?_0xd69b64(_0x5640cf(0x2ca),_0x5640cf(0x23c)):_0xd69b64(_0x5640cf(0x212)+_0x1084d3['protocol']+_0x5640cf(0x2fe),_0x5640cf(0x202));const _0x4a3d72=_0x1084d3[_0x5640cf(0x224)];if(!_0xf21103&&!_0x45bfbd['has'](_0x4a3d72))throw _0xd69b64(_0x45bfbd[_0x5640cf(0x362)]===0x0?_0x5640cf(0x31b):_0x5640cf(0x24c)+_0x4a3d72+'\x22\x20is\x20not\x20in\x20the\x20allowedFetchDomains\x20list',_0x5640cf(0x202));if(_0x43fc3c||_0x45bfbd[_0x5640cf(0x237)](_0x4a3d72))return;const _0x15ec8c=_0x4a3d72[_0x5640cf(0x1e4)]('[')?_0x4a3d72[_0x5640cf(0x25a)](0x1,-0x1):_0x4a3d72;let _0x1a0e25;if(_0x4152f['isIP'](_0x15ec8c))_0x1a0e25=[_0x15ec8c];else try{_0x1a0e25=(await lookup(_0x15ec8c,{'all':!![]}))[_0x5640cf(0x2a2)](_0x1b6dc9=>_0x1b6dc9['address']);}catch{return;}if(_0x1a0e25['some'](_0x235a35))throw _0xd69b64(_0x5640cf(0x344)+_0x4a3d72+'\x22\x20resolves\x20to\x20a\x20private/loopback/link-local\x20address','FETCH_PRIVATE_ADDRESS');}return async function _0x257fec(_0x40e403,_0xdb1fb2={}){const _0x14ffb1=_0x175ebb;let _0x322634;try{_0x322634=new URL(typeof _0x40e403===_0x14ffb1(0x208)?_0x40e403:_0x40e403?.[_0x14ffb1(0x26b)]??String(_0x40e403));}catch{throw _0xd69b64(_0x14ffb1(0x294),_0x14ffb1(0x202));}await _0x1180ae(_0x322634,![]);const _0x4716ed=_0xdb1fb2[_0x14ffb1(0x1f3)]??_0x14ffb1(0x283);let _0xbdc6dd=String(_0xdb1fb2[_0x14ffb1(0x2b0)]??_0x14ffb1(0x321))[_0x14ffb1(0x2df)](),_0x2b6ed5=_0xdb1fb2[_0x14ffb1(0x2ff)];const _0x1df471=new Headers(_0xdb1fb2[_0x14ffb1(0x20b)]);for(let _0x225b82=0x0;;_0x225b82++){const _0x5ea0d7=await fetch(_0x322634[_0x14ffb1(0x1ea)],{..._0xdb1fb2,'method':_0xbdc6dd,'body':_0x2b6ed5,'headers':_0x1df471,'redirect':_0x14ffb1(0x27d)}),_0x73c4df=_0x5ea0d7[_0x14ffb1(0x20b)]['get'](_0x14ffb1(0x372));if(!_0x507e4d[_0x14ffb1(0x237)](_0x5ea0d7[_0x14ffb1(0x36f)])||_0x73c4df==null||_0x4716ed===_0x14ffb1(0x27d))return _0x225b82>0x0&&(Object[_0x14ffb1(0x374)](_0x5ea0d7,_0x14ffb1(0x2da),{'value':!![]}),Object[_0x14ffb1(0x374)](_0x5ea0d7,_0x14ffb1(0x26b),{'value':_0x322634[_0x14ffb1(0x1ea)]})),_0x5ea0d7;_0x5ea0d7[_0x14ffb1(0x2ff)]?.[_0x14ffb1(0x2f7)]()['catch'](()=>{});if(_0x4716ed===_0x14ffb1(0x1e9))throw _0xd69b64(_0x14ffb1(0x265),_0x14ffb1(0x23c));if(_0x225b82+0x1>_0x359ee7)throw _0xd69b64(_0x14ffb1(0x360),_0x14ffb1(0x23c));let _0x243ab3;try{_0x243ab3=new URL(_0x73c4df,_0x322634);}catch{throw _0xd69b64(_0x14ffb1(0x37d),_0x14ffb1(0x23c));}await _0x1180ae(_0x243ab3,!![]);if(_0x243ab3[_0x14ffb1(0x1e2)]!==_0x322634[_0x14ffb1(0x1e2)]){for(const _0x277ee0 of _0x291114)_0x1df471[_0x14ffb1(0x254)](_0x277ee0);}(_0x5ea0d7[_0x14ffb1(0x36f)]===0x12f?_0xbdc6dd!=='HEAD':(_0x5ea0d7[_0x14ffb1(0x36f)]===0x12d||_0x5ea0d7[_0x14ffb1(0x36f)]===0x12e)&&_0xbdc6dd===_0x14ffb1(0x368))&&(_0xbdc6dd=_0x14ffb1(0x321),_0x2b6ed5=undefined,_0x1df471['delete'](_0x14ffb1(0x27b)),_0x1df471[_0x14ffb1(0x254)](_0x14ffb1(0x2d9))),_0x322634=_0x243ab3;}};}function _0x18b1b8(_0x305cbf={}){const _0x194bc1=_0x5963fc,_0x5af9f0=_0x305cbf['allowFetch']!==![],_0x125db0=_0x305cbf[_0x194bc1(0x350)]??[],_0x194330={'Date':Date,'Math':Math,'JSON':JSON,'Array':Array,'Object':Object,'String':String,'Number':Number,'Boolean':Boolean,'Map':Map,'Set':Set,'Promise':Promise,'URL':URL,'URLSearchParams':URLSearchParams,'TextEncoder':TextEncoder,'TextDecoder':TextDecoder,'AbortController':AbortController,'AbortSignal':AbortSignal,'setTimeout':setTimeout,'clearTimeout':clearTimeout,'setInterval':setInterval,'clearInterval':clearInterval,'queueMicrotask':queueMicrotask,'structuredClone':structuredClone,'crypto':globalThis[_0x194bc1(0x2ec)]};return _0x5af9f0&&typeof fetch===_0x194bc1(0x33c)&&(_0x194330['fetch']=_0x41dd35(_0x125db0)),_0x194330[_0x194bc1(0x2b4)]=_0x194330,_0x194330;}const _0x288568=0x3e8;function _0x1b4f4a(_0x499256){const _0x494ff8=_0x5963fc,_0x4a4961=Number(_0x499256[_0x494ff8(0x213)]);if(Number[_0x494ff8(0x353)](_0x4a4961)&&_0x4a4961>0x0)return _0x4a4961;const _0x4cd93f=Number(process.env.OKDB_FN_COMPILE_TIMEOUT_MS);if(Number[_0x494ff8(0x353)](_0x4cd93f)&&_0x4cd93f>0x0)return _0x4cd93f;return _0x288568;}function _0x3cbf9f(_0x453fd0,_0x3107e0={}){const _0x4e6de4=_0x5963fc,_0x4bd09c=_0x18b1b8(_0x3107e0),_0x1027c0=_0x365767[_0x4e6de4(0x238)](_0x4bd09c,{'name':'okdb-function-sandbox','codeGeneration':{'strings':![],'wasm':![]}});let _0x148ccf;try{_0x148ccf=new _0x365767[(_0x4e6de4(0x1df))]('('+_0x453fd0+')',{'filename':_0x3107e0[_0x4e6de4(0x26f)]??'okdb-function.js'});}catch(_0x19b402){const _0x1e8e4a=new Error(_0x19b402?.[_0x4e6de4(0x222)]||'Function\x20script\x20failed\x20to\x20compile');_0x1e8e4a[_0x4e6de4(0x367)]=_0x4e6de4(0x33b),_0x1e8e4a['cause']=_0x19b402;throw _0x1e8e4a;}let _0x3f219e;try{_0x3f219e=_0x148ccf[_0x4e6de4(0x384)](_0x1027c0,{'timeout':_0x1b4f4a(_0x3107e0)});}catch(_0x2e3cd0){const _0x30caf1=new Error(_0x2e3cd0?.['message']||'Function\x20script\x20failed\x20to\x20initialize');_0x30caf1['code']=_0x4e6de4(0x33b),_0x30caf1[_0x4e6de4(0x2f0)]=_0x2e3cd0;throw _0x30caf1;}if(typeof _0x3f219e!==_0x4e6de4(0x33c)){const _0x2a6abf=new Error(_0x4e6de4(0x1f2));_0x2a6abf[_0x4e6de4(0x367)]='FUNCTION_SCRIPT_INVALID_SHAPE';throw _0x2a6abf;}return _0x3f219e;}return okdbFunctionsSandbox={'createSandboxGlobals':_0x18b1b8,'compileFunctionExpression':_0x3cbf9f,'DEFAULT_COMPILE_TIMEOUT_MS':_0x288568,'_buildRestrictedFetch':_0x41dd35,'isPrivateAddress':_0x235a35},okdbFunctionsSandbox;}var okdbFunctionsIpc,hasRequiredOkdbFunctionsIpc;function requireOkdbFunctionsIpc(){if(hasRequiredOkdbFunctionsIpc)return okdbFunctionsIpc;hasRequiredOkdbFunctionsIpc=0x1;function _0x3044a8(_0x37d259){const _0x22e0c7=_0x2b4f;if(!_0x37d259)return null;return{'message':_0x37d259[_0x22e0c7(0x222)]||String(_0x37d259),'stack':_0x37d259[_0x22e0c7(0x293)]||null,'code':_0x37d259[_0x22e0c7(0x367)]||null,'details':_0x37d259[_0x22e0c7(0x340)]||null};}function _0x4b2bdd(_0x521da1){const _0x459c3d=_0x2b4f;if(!_0x521da1)return new Error(_0x459c3d(0x363));const _0x3f339c=new Error(_0x521da1['message']||String(_0x521da1));if(_0x521da1[_0x459c3d(0x293)])_0x3f339c[_0x459c3d(0x293)]=_0x521da1['stack'];if(_0x521da1[_0x459c3d(0x367)])_0x3f339c['code']=_0x521da1[_0x459c3d(0x367)];if(_0x521da1[_0x459c3d(0x340)])_0x3f339c['details']=_0x521da1[_0x459c3d(0x340)];return _0x3f339c;}return okdbFunctionsIpc={'serializeError':_0x3044a8,'deserializeError':_0x4b2bdd},okdbFunctionsIpc;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5967f3=_0x551940;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x433236={'PUT':_0x5967f3(0x296),'REMOVE':_0x5967f3(0x2d2),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x5967f3(0x228),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x5967f3(0x2e8),'TYPE_DROP':'dropType','FTS_REGISTER':'registerFts','FTS_DROP':_0x5967f3(0x2d3),'FTS_RESET':'resetFts','SCHEMA_SET':_0x5967f3(0x266),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x5967f3(0x299),'TTL_CLEAR':_0x5967f3(0x36e)},_0x24c063={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x5967f3(0x371),'SYSTEM_STOPPED':_0x5967f3(0x378),'SYSTEM_CLOCK_CHANGE':_0x5967f3(0x232),'SYSTEM_POKE':_0x5967f3(0x2c6),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x5967f3(0x348),'SYSTEM_BUS_STATE_CHANGE':_0x5967f3(0x1be),'ITEM_CREATE':_0x5967f3(0x31f),'ITEM_UPDATE':_0x5967f3(0x366),'ITEM_REMOVE':'item:remove','ITEM_PENDING':_0x5967f3(0x36c),'INDEX_RESET':_0x5967f3(0x2a4),'INDEX_READY':_0x5967f3(0x305),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x5967f3(0x29e),'INDEX_REGISTERED':_0x5967f3(0x282),'FTS_REGISTERED':_0x5967f3(0x2ae),'FTS_DROP':_0x5967f3(0x33a),'FTS_RESET':'fts:reset','SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x5967f3(0x365),'UNIQUE_VIOLATION':_0x5967f3(0x259),'UNIQUE_VIOLATION_RESOLVED':_0x5967f3(0x22b),'REF_VIOLATION':_0x5967f3(0x24b),'REF_VIOLATION_RESOLVED':_0x5967f3(0x1d1),'SYNC_APPLY':_0x5967f3(0x255),'TXN_START':_0x5967f3(0x1d8),'TXN_END':_0x5967f3(0x2bb),'TXN_ROLLBACK':_0x5967f3(0x279),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x5967f3(0x2c1),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x5967f3(0x1cc),'SYSTEM_ENV_RELEASE':_0x5967f3(0x205),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x5967f3(0x28c),'TTL_CLEAR':_0x5967f3(0x26d),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x5967f3(0x34c),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x5967f3(0x1de)},_0x239d62={'CREATING':_0x5967f3(0x1ef),'RESETTING':_0x5967f3(0x21b),'READY':'ready','DROPPING':_0x5967f3(0x289),'WAITING':_0x5967f3(0x2a7),'ERROR':'error'},_0x2ed7ee={'CREATED':_0x5967f3(0x287),'STARTING':'starting','STARTED':_0x5967f3(0x2e1),'STOPPING':'stopping','STOPPED':_0x5967f3(0x239)},_0x2fbc16={'CREATING':_0x5967f3(0x1ef),'READY':_0x5967f3(0x23f),'HALTED':_0x5967f3(0x2d0),'STOPPED':_0x5967f3(0x239),'RESETTING':_0x5967f3(0x21b)},_0x11fe19=Object[_0x5967f3(0x1d6)]({'POKE':_0x5967f3(0x2cb),'DRAIN':_0x5967f3(0x381),'TYPE_DROP':'bus:type_drop','PROC':_0x5967f3(0x216),'ENV_RELEASE':_0x5967f3(0x28f)});return okdbEnums={'BUS_EVENTS':_0x11fe19,'CHANGE_ACTIONS':_0x433236,'EVENTS':_0x24c063,'INDEX_STATE':_0x239d62,'OKDB_STATE':_0x2ed7ee,'VIEW_STATE':_0x2fbc16},okdbEnums;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x50c59f extends Error{constructor(_0x4f6c04,_0xa7fd51,_0x1b77d5={}){const _0x451cf7=_0x2b4f;super(_0x4f6c04),this[_0x451cf7(0x383)]=_0x451cf7(0x201),this[_0x451cf7(0x367)]=_0xa7fd51,this[_0x451cf7(0x340)]=_0x1b77d5,_0x1b77d5['cause']&&(this[_0x451cf7(0x2f0)]=_0x1b77d5['cause']),Error['captureStackTrace'](this,this[_0x451cf7(0x2cd)]);}}class _0x298215 extends _0x50c59f{constructor(_0x48d38d,_0x1db238,_0x16cd22,_0x200a68){const _0x516e39=_0x2b4f;super(_0x516e39(0x2b3)+_0x48d38d+'@'+_0x1db238+_0x516e39(0x1c6)+_0x16cd22+',\x20got\x20'+_0x200a68,'VERSION_MISMATCH',{'type':_0x48d38d,'key':_0x1db238,'expectedVersion':_0x16cd22,'actualVersion':_0x200a68}),this[_0x516e39(0x383)]=_0x516e39(0x1d0);}}class _0x4e4be6 extends _0x50c59f{constructor(_0x3e243f,_0x4a75ea){const _0x2d1258=_0x2b4f;super(_0x3e243f+'@'+_0x4a75ea+_0x2d1258(0x376),'NOT_FOUND',{'type':_0x3e243f,'key':_0x4a75ea}),this[_0x2d1258(0x383)]=_0x2d1258(0x34b);}}class _0x1cd8aa extends _0x50c59f{constructor(_0x531d84,_0x415457){const _0x442b5d=_0x2b4f;super(_0x531d84+'@'+_0x415457+'\x20already\x20exists','ALREADY_EXISTS',{'type':_0x531d84,'key':_0x415457}),this[_0x442b5d(0x383)]=_0x442b5d(0x1d7);}}class _0x1b2bfc extends _0x50c59f{constructor(_0x1d74f0,_0x40902a){const _0x2399a7=_0x2b4f,_0x274f4c=typeof _0x40902a;super(_0x2399a7(0x284)+_0x1d74f0+'\x27:\x20'+_0x274f4c+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x40902a,_0x2399a7(0x2f9),{'index':_0x1d74f0,'key':_0x40902a,'keyType':_0x274f4c}),this[_0x2399a7(0x383)]=_0x2399a7(0x2dd);}}class _0x1607f1 extends _0x50c59f{constructor(_0x3d00e0){const _0x415414=_0x2b4f,_0x3aaab4=typeof _0x3d00e0;super(_0x415414(0x268)+_0x3aaab4+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x3d00e0,_0x415414(0x37c),{'key':_0x3d00e0,'keyType':_0x3aaab4}),this['name']=_0x415414(0x317);}}class _0x53862e extends _0x50c59f{constructor(_0x57e31d){const _0x205750=_0x2b4f;super(_0x205750(0x32d)+_0x57e31d+_0x205750(0x355),_0x205750(0x302),{'type':_0x57e31d}),this['name']='OKDBTypeNotRegisteredError';}}class _0x5cc336 extends _0x50c59f{constructor(_0x2dd4c9){const _0x628da1=_0x2b4f;super(_0x628da1(0x32d)+_0x2dd4c9+'\x27\x20already\x20registered',_0x628da1(0x358),{'type':_0x2dd4c9}),this['name']='OKDBTypeAlreadyRegisteredError';}}class _0x5cc838 extends _0x50c59f{constructor(_0x90d399,_0xcce689){const _0x58d5e2=_0x2b4f;super(_0x58d5e2(0x2d7)+_0xcce689+_0x58d5e2(0x251)+_0x90d399+_0x58d5e2(0x355),_0x58d5e2(0x286),{'type':_0x90d399,'index':_0xcce689}),this[_0x58d5e2(0x383)]='OKDBIndexNotRegisteredError';}}class _0x3ddbdb extends _0x50c59f{constructor(_0x3f2745,_0x1b719e){const _0x5096ba=_0x2b4f;super(_0x5096ba(0x2d7)+_0x1b719e+'\x27\x20on\x20type\x20\x27'+_0x3f2745+'\x27\x20is\x20already\x20registered','INDEX_ALREADY_REGISTERED',{'type':_0x3f2745,'index':_0x1b719e}),this[_0x5096ba(0x383)]=_0x5096ba(0x333);}}class _0x545396 extends _0x50c59f{constructor(_0x58f90d,_0x2d7d37={}){const _0x5235b6=_0x2b4f;super(_0x58f90d,'INVALID_VALUE',_0x2d7d37),this[_0x5235b6(0x383)]=_0x5235b6(0x32a);}}class _0x3f8c45 extends _0x50c59f{constructor(_0x26d171,_0x41e608,_0x3c8cb6,_0x37bd7e,_0x1b8ed3){const _0xe41f88=_0x2b4f;super(_0xe41f88(0x2ba)+_0x26d171+'@'+_0x41e608+_0xe41f88(0x2b5)+_0x3c8cb6+_0xe41f88(0x26c)+_0x37bd7e+'\x27,\x20cannot\x20map\x20to\x20\x27'+_0x1b8ed3+'\x27',_0xe41f88(0x1d4),{'type':_0x26d171,'index':_0x41e608,'indexKey':_0x3c8cb6,'existingKey':_0x37bd7e,'conflictingKey':_0x1b8ed3}),this[_0xe41f88(0x383)]=_0xe41f88(0x1c3);}}class _0x49a968 extends _0x50c59f{constructor(_0x41c559,_0xe3c896,_0x17955a){const _0x559db1=_0x2b4f;super('Schema\x20validation\x20failed\x20for\x20'+_0x41c559+'@'+_0xe3c896,_0x559db1(0x1f6),{'type':_0x41c559,'key':_0xe3c896,'errors':_0x17955a}),this[_0x559db1(0x383)]=_0x559db1(0x2ef),this[_0x559db1(0x1d9)]=_0x41c559,this[_0x559db1(0x346)]=_0xe3c896,this[_0x559db1(0x278)]=_0x17955a;}}class _0x2ea756 extends _0x50c59f{constructor(_0x4a8e3d,_0x2e6449){const _0x17d7aa=_0x2b4f;super(_0x17d7aa(0x21a)+_0x4a8e3d+':\x20'+_0x2e6449[_0x17d7aa(0x1ed)]+_0x17d7aa(0x1bd),_0x17d7aa(0x369),{'type':_0x4a8e3d,'failures':_0x2e6449}),this[_0x17d7aa(0x383)]='OKDBSchemaCollectionError',this['type']=_0x4a8e3d,this[_0x17d7aa(0x2f6)]=_0x2e6449;}}class _0x2a5835 extends _0x50c59f{constructor(_0x5cd083,_0xf9a7c6,_0x539009,_0x60e436,_0x1e2def){const _0x13815b=_0x2b4f;super(_0x13815b(0x2ab)+_0x5cd083+'@'+_0xf9a7c6+'.'+_0x539009+_0x13815b(0x301)+_0x60e436+'@'+_0x1e2def+_0x13815b(0x31e),_0x13815b(0x354),{'sourceType':_0x5cd083,'sourceKey':_0xf9a7c6,'fieldPath':_0x539009,'targetType':_0x60e436,'targetKey':_0x1e2def}),this[_0x13815b(0x383)]='OKDBForeignKeyError',this[_0x13815b(0x22d)]=_0x5cd083,this[_0x13815b(0x29c)]=_0xf9a7c6,this[_0x13815b(0x240)]=_0x539009,this[_0x13815b(0x319)]=_0x60e436,this['targetKey']=_0x1e2def;}}class _0x5cbd7d extends _0x50c59f{constructor(_0x1d85fe,_0x2a2082,_0x15fc5c){const _0x26a7f2=_0x2b4f;super(_0x26a7f2(0x1e5)+_0x1d85fe+'@'+_0x2a2082+':\x20'+_0x15fc5c[_0x26a7f2(0x1ed)]+_0x26a7f2(0x260),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x1d85fe,'targetKey':_0x2a2082,'references':_0x15fc5c}),this[_0x26a7f2(0x383)]='OKDBForeignKeyDeleteError',this[_0x26a7f2(0x319)]=_0x1d85fe,this[_0x26a7f2(0x315)]=_0x2a2082,this[_0x26a7f2(0x1fa)]=_0x15fc5c;}}class _0x6cd8 extends _0x50c59f{constructor(_0x50ed2c,_0xe74e06,_0x11df60){const _0x5eb790=_0x2b4f;super(_0x5eb790(0x34d)+_0xe74e06+_0x5eb790(0x306)+_0x50ed2c+_0x5eb790(0x312)+_0x11df60['map'](_0x287a2c=>_0x287a2c['kind']+':'+_0x287a2c['name'])[_0x5eb790(0x375)](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0x50ed2c,'index':_0xe74e06,'usedBy':_0x11df60}),this[_0x5eb790(0x383)]=_0x5eb790(0x280);}}return okdbError={'OKDBError':_0x50c59f,'OKDBVersionMismatchError':_0x298215,'OKDBNotFoundError':_0x4e4be6,'OKDBAlreadyExistsError':_0x1cd8aa,'OKDBInvalidIndexKeyError':_0x1b2bfc,'OKDBInvalidPrimaryKeyError':_0x1607f1,'OKDBTypeNotRegisteredError':_0x53862e,'OKDBTypeAlreadyRegisteredError':_0x5cc336,'OKDBIndexNotRegisteredError':_0x5cc838,'OKDBIndexAlreadyRegisteredError':_0x3ddbdb,'OKDBInvalidValueError':_0x545396,'OKDBUniqueConstraintError':_0x3f8c45,'OKDBSchemaValidationError':_0x49a968,'OKDBSchemaCollectionError':_0x2ea756,'OKDBForeignKeyError':_0x2a5835,'OKDBForeignKeyDeleteError':_0x5cbd7d,'OKDBIndexHasConsumersError':_0x6cd8},okdbError;}var okdbGuardedRange,hasRequiredOkdbGuardedRange;function requireOkdbGuardedRange(){const _0x20085d=_0x551940;if(hasRequiredOkdbGuardedRange)return okdbGuardedRange;hasRequiredOkdbGuardedRange=0x1;const _0x5b5ba5=require$$0$1,{OKDBError:_0x1c3f92}=requireOkdbError(),_0x560e07={'value':null,'done':!![]};class _0x481cb3{constructor(_0x3196db){const _0x55d0c2=_0x2b4f;this[_0x55d0c2(0x249)]=_0x3196db;}get[_0x20085d(0x2aa)](){return _0x560e07;}[Symbol[_0x20085d(0x257)]](){const _0x1857a0=_0x20085d;return this[_0x1857a0(0x249)]();}['map'](_0x2476d6){const _0x2ad92e=this;return new _0x481cb3(()=>{const _0x171666=_0x2b4f,_0x2c70b4=_0x2ad92e[Symbol[_0x171666(0x257)]]();return{'next'(){const _0x1f5974=_0x171666;for(;;){const _0x3c7c26=_0x2c70b4[_0x1f5974(0x1e1)]();if(_0x3c7c26[_0x1f5974(0x33d)])return{'done':!![],'value':undefined};const _0x1c16a4=_0x2476d6(_0x3c7c26['value']);if(_0x1c16a4===_0x5b5ba5[_0x1f5974(0x23e)])continue;if(_0x1c16a4===_0x560e07)return _0x2c70b4[_0x1f5974(0x345)]?.(),{'done':!![],'value':undefined};return{'done':![],'value':_0x1c16a4};}},'return'(){const _0x25c92e=_0x171666;return _0x2c70b4[_0x25c92e(0x345)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x171666(0x257)]](){return this;}};});}[_0x20085d(0x229)](_0x33b0a6){const _0x104842=_0x20085d;return this[_0x104842(0x2a2)](_0x5a70c3=>_0x33b0a6(_0x5a70c3)?_0x5a70c3:_0x5b5ba5[_0x104842(0x23e)]);}[_0x20085d(0x31a)](_0x32de9c){for(const _0x5d3b71 of this)_0x32de9c(_0x5d3b71);}['slice'](_0x409cd8=0x0,_0x507cae=Infinity){const _0xed29bb=this;return new _0x481cb3(()=>{const _0xe3ee2d=_0x2b4f,_0x3c3525=_0xed29bb[Symbol['iterator']]();let _0x294347=0x0;return{'next'(){const _0x48b5bf=_0x2b4f;for(;;){const _0x4c2550=_0x3c3525[_0x48b5bf(0x1e1)]();if(_0x4c2550['done'])return{'done':!![],'value':undefined};const _0x46ca73=_0x294347++;if(_0x46ca73<_0x409cd8)continue;if(_0x46ca73>=_0x507cae)return _0x3c3525['return']?.(),{'done':!![],'value':undefined};return _0x4c2550;}},'return'(){const _0x1864d6=_0x2b4f;return _0x3c3525[_0x1864d6(0x345)]?.(),{'done':!![],'value':undefined};},[Symbol[_0xe3ee2d(0x257)]](){return this;}};});}['at'](_0x51635f){let _0x2cdce2=0x0;for(const _0x5206cf of this)if(_0x2cdce2++===_0x51635f)return _0x5206cf;return undefined;}[_0x20085d(0x263)](_0x2c9022){const _0x33d9c6=this;return new _0x481cb3(()=>{const _0x45796a=_0x2b4f,_0x5a188b=_0x33d9c6[Symbol['iterator']]();let _0x2ccf6c=[];return{'next'(){const _0x18f6c5=_0x2b4f;for(;;){if(_0x2ccf6c[_0x18f6c5(0x1ed)])return{'done':![],'value':_0x2ccf6c['shift']()};const _0x278c18=_0x5a188b[_0x18f6c5(0x1e1)]();if(_0x278c18[_0x18f6c5(0x33d)])return{'done':!![],'value':undefined};const _0x3145e1=_0x2c9022(_0x278c18['value']);if(Array[_0x18f6c5(0x1e3)](_0x3145e1))_0x2ccf6c=_0x2ccf6c['concat'](_0x3145e1);else{if(_0x3145e1!=null&&(_0x3145e1 instanceof _0x481cb3||typeof _0x3145e1[Symbol[_0x18f6c5(0x257)]]==='function'&&_0x18f6c5(0x21f)in _0x3145e1))_0x2ccf6c=_0x2ccf6c[_0x18f6c5(0x1eb)](Array['from'](_0x3145e1));else{if(_0x3145e1!==_0x5b5ba5[_0x18f6c5(0x23e)])return{'done':![],'value':_0x3145e1};}}}},'return'(){const _0x57db04=_0x2b4f;return _0x5a188b[_0x57db04(0x345)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x45796a(0x257)]](){return this;}};});}[_0x20085d(0x1eb)](_0x352c20){const _0x4b502e=this;return new _0x481cb3(()=>{const _0x4d3486=_0x2b4f;let _0x2a82f6=_0x4b502e[Symbol[_0x4d3486(0x257)]](),_0x4ba5d9=![];return{'next'(){const _0x2616f6=_0x4d3486;for(;;){const _0xd95812=_0x2a82f6[_0x2616f6(0x1e1)]();if(!_0xd95812[_0x2616f6(0x33d)])return _0xd95812;if(_0x4ba5d9)return{'done':!![],'value':undefined};_0x4ba5d9=!![],_0x2a82f6=_0x352c20[Symbol[_0x2616f6(0x257)]]();}},'return'(){const _0x33301b=_0x4d3486;return _0x2a82f6[_0x33301b(0x345)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x4d3486(0x257)]](){return this;}};});}[_0x20085d(0x2f2)](_0xcf9d28){const _0x1adf5f=this;return new _0x481cb3(()=>{const _0x58076c=_0x2b4f,_0x1e89be=_0x1adf5f[Symbol[_0x58076c(0x257)]]();return{'next'(){const _0x43af9f=_0x58076c;for(;;){try{return _0x1e89be[_0x43af9f(0x1e1)]();}catch(_0x1358a8){const _0x305c5f=_0xcf9d28(_0x1358a8);if(_0x305c5f===_0x5b5ba5['SKIP']||_0x305c5f===undefined)continue;return{'done':![],'value':_0x305c5f};}}},'return'(){return _0x1e89be['return']?.(),{'done':!![],'value':undefined};},[Symbol[_0x58076c(0x257)]](){return this;}};});}[_0x20085d(0x27e)](){return Array['from'](this);}get[_0x20085d(0x21f)](){const _0x11f930=_0x20085d;return Array[_0x11f930(0x1fd)](this);}}const _0x2ee202={'total':0x0,'byLabel':{},'last':null};function _0x47234d(_0x2c087b){const _0x19f645=_0x20085d;_0x2ee202['total']++;if(_0x2c087b)_0x2ee202['byLabel'][_0x2c087b]=(_0x2ee202[_0x19f645(0x2ac)][_0x2c087b]??0x0)+0x1;_0x2ee202[_0x19f645(0x2d4)]={'label':_0x2c087b??null,'at':Date[_0x19f645(0x320)]()};}function _0xcfc119(){const _0x592325=_0x20085d;return{'total':_0x2ee202[_0x592325(0x336)],'byLabel':{..._0x2ee202[_0x592325(0x2ac)]},'last':_0x2ee202[_0x592325(0x2d4)]};}function _0x4fd8f1(_0x1c2523,_0x4af064={}){const {getTxnId:_0x2d6e77,resume:_0x4b8adf,label:_0x2f54a4,baseline:_0x56b716}=_0x4af064;return new _0x481cb3(()=>{const _0x4dd384=_0x2b4f;let _0x445a08=null,_0x53c5a0=![],_0x24c43f=![],_0x40e06f=![],_0x1312bc,_0x324eb6=0x0,_0x292af6;return{'next'(){const _0x35027d=_0x2b4f;if(_0x40e06f)return{'done':!![],'value':undefined};if(_0x24c43f){let _0x10322c=![];if(_0x4b8adf&&_0x2d6e77)try{_0x10322c=_0x2d6e77()===_0x292af6;}catch{}if(!_0x10322c){_0x40e06f=!![],_0x47234d(_0x2f54a4);throw new _0x1c3f92(_0x4b8adf?_0x35027d(0x231)+_0x35027d(0x1c7)+_0x35027d(0x2a0):_0x35027d(0x2ee)+_0x35027d(0x29b)+_0x35027d(0x2a1),_0x35027d(0x28b));}_0x445a08=_0x4b8adf(_0x1312bc,_0x324eb6)[Symbol[_0x35027d(0x257)]](),_0x24c43f=![];}if(!_0x445a08){if(_0x56b716!==undefined)_0x292af6=_0x56b716;else try{_0x292af6=_0x2d6e77?_0x2d6e77():undefined;}catch{_0x292af6=undefined;}try{_0x445a08=_0x1c2523()[Symbol[_0x35027d(0x257)]]();}catch(_0x5d4772){_0x40e06f=!![];throw _0x5d4772;}}!_0x53c5a0&&(_0x53c5a0=!![],queueMicrotask(()=>{const _0x12c03e=_0x35027d;_0x53c5a0=![];if(_0x40e06f||_0x24c43f)return;try{_0x445a08?.[_0x12c03e(0x345)]?.();}catch{}_0x445a08=null,_0x24c43f=!![];}));const _0x45f3df=_0x445a08[_0x35027d(0x1e1)]();if(_0x45f3df[_0x35027d(0x33d)])return _0x40e06f=!![],{'done':!![],'value':undefined};return _0x1312bc=_0x45f3df[_0x35027d(0x223)],_0x324eb6++,_0x45f3df;},'return'(){const _0x87a091=_0x2b4f;_0x40e06f=!![];try{_0x445a08?.[_0x87a091(0x345)]?.();}catch{}return{'done':!![],'value':undefined};},[Symbol[_0x4dd384(0x257)]](){return this;}};});}return okdbGuardedRange={'guardSnapshotIterable':_0x4fd8f1,'OKDBGuardedRange':_0x481cb3,'recordGuardTrip':_0x47234d,'getGuardTripStats':_0xcfc119},okdbGuardedRange;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x4917a8=_0x551940;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x5867d5,performance:_0x34e775}=require$$0$2,_0x5837b4=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x4917a8(0x20c),_0x2f71f0=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x574987=process.env.OKDB_LOOP_LAG_ALL==='1',_0x47d5e3=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x1dc9b9{constructor(){const _0x37b02e=_0x4917a8;this[_0x37b02e(0x2de)]=_0x5837b4,this[_0x37b02e(0x1f7)]=new Map(),this['_h']=null,this[_0x37b02e(0x361)]=null,this[_0x37b02e(0x1f1)]=![],this['_log']=(_0x58e27e,_0x18453f)=>process[_0x37b02e(0x27a)]['write'](_0x58e27e+(_0x18453f?'\x20'+JSON['stringify'](_0x18453f):'')+'\x0a');}[_0x4917a8(0x320)](){return _0x34e775['now']();}[_0x4917a8(0x2f3)](_0x477173){const _0x49eb28=_0x4917a8;if(typeof _0x477173===_0x49eb28(0x33c))this['_log']=_0x477173;}['note'](_0x498c56,_0x415920,_0x43e5d2){const _0x2c622e=_0x4917a8;if(!this[_0x2c622e(0x2de)])return;let _0x305014=this[_0x2c622e(0x1f7)]['get'](_0x498c56);!_0x305014&&(_0x305014={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x2c622e(0x2e5)](_0x498c56,_0x305014)),_0x305014['ms']+=_0x415920,_0x305014[_0x2c622e(0x221)]+=0x1,_0x415920>_0x305014[_0x2c622e(0x322)]&&(_0x305014[_0x2c622e(0x322)]=_0x415920,_0x305014[_0x2c622e(0x382)]=_0x43e5d2||'');}[_0x4917a8(0x304)](_0xb7ea05){const _0x3e511e=_0x4917a8;if(!this[_0x3e511e(0x2de)]||this[_0x3e511e(0x1f1)])return;this['_started']=!![];if(_0xb7ea05)this[_0x3e511e(0x28a)]=_0xb7ea05;this['_h']=_0x5867d5({'resolution':0xa}),this['_h'][_0x3e511e(0x247)](),this[_0x3e511e(0x361)]=setInterval(()=>this[_0x3e511e(0x35a)](),_0x2f71f0);if(this[_0x3e511e(0x361)][_0x3e511e(0x225)])this[_0x3e511e(0x361)][_0x3e511e(0x225)]();}[_0x4917a8(0x243)](_0x526112){const _0x1ddba4=_0x4917a8;if(!this['_windowCbs'])this['_windowCbs']=new Set();this[_0x1ddba4(0x2c7)][_0x1ddba4(0x1da)](_0x526112);if(!this[_0x1ddba4(0x1f1)])this[_0x1ddba4(0x1d3)]();}[_0x4917a8(0x25c)](_0x634738){const _0x3db842=_0x4917a8;this[_0x3db842(0x2c7)]?.[_0x3db842(0x254)](_0x634738);}[_0x4917a8(0x1d3)](){const _0x3063ba=_0x4917a8;if(this['_admissionStarted'])return;this[_0x3063ba(0x385)]=!![];!this['_h']&&(this['_h']=_0x5867d5({'resolution':0xa}),this['_h'][_0x3063ba(0x247)]());const _0x2c2293=_0x2f71f0;this[_0x3063ba(0x1c5)]=setInterval(()=>{const _0x1e119e=_0x3063ba,_0x1bc9fa=this['_h'];if(!_0x1bc9fa)return;const _0x50a671=_0x1bc9fa[_0x1e119e(0x27f)](0x63)/0xf4240,_0x5b2c3f=_0x1bc9fa['max']/0xf4240,_0x45cb4f=_0x1bc9fa['mean']/0xf4240;_0x1bc9fa[_0x1e119e(0x297)]();if(this[_0x1e119e(0x2c7)])for(const _0x16738a of this[_0x1e119e(0x2c7)]){try{_0x16738a({'p99Ms':_0x50a671,'maxMs':_0x5b2c3f,'meanMs':_0x45cb4f,'reportMs':_0x2c2293});}catch{}}},_0x2c2293);if(this[_0x3063ba(0x1c5)][_0x3063ba(0x225)])this[_0x3063ba(0x1c5)][_0x3063ba(0x225)]();}[_0x4917a8(0x35a)](){const _0x69cde0=_0x4917a8,_0x8240b9=this['_h'],_0x5c9ed5=_0x8240b9[_0x69cde0(0x34e)]/0xf4240,_0x411b8a=_0x8240b9[_0x69cde0(0x27f)](0x63)/0xf4240,_0x2e350a=_0x8240b9['mean']/0xf4240;_0x8240b9['reset']();const _0x5e04b2=[...this[_0x69cde0(0x1f7)][_0x69cde0(0x33e)]()]['map'](([_0x1851a4,_0x5e0b06])=>({'label':_0x1851a4,..._0x5e0b06}))[_0x69cde0(0x1c0)]((_0x341238,_0x5e41be)=>_0x5e41be['ms']-_0x341238['ms'])[_0x69cde0(0x25a)](0x0,0x8);this[_0x69cde0(0x1f7)][_0x69cde0(0x303)]();const _0x230af3=_0x5e04b2['reduce']((_0x288337,_0x498a0f)=>_0x288337+_0x498a0f['ms'],0x0),_0x4eaa05=_0x5e04b2[_0x69cde0(0x2a2)](_0x4774fa=>_0x4774fa['label']+'='+_0x4774fa['ms'][_0x69cde0(0x2fd)](0x0)+'ms/'+_0x4774fa[_0x69cde0(0x221)]+(_0x4774fa['maxMs']>0x5?_0x69cde0(0x24e)+_0x4774fa['maxMs'][_0x69cde0(0x2fd)](0x0)+'ms'+(_0x4774fa[_0x69cde0(0x382)]?'\x20'+_0x4774fa[_0x69cde0(0x382)]:'')+')':''));(_0x574987||_0x5c9ed5>=_0x47d5e3)&&this[_0x69cde0(0x28a)]('loop-lag\x20'+_0x2f71f0+_0x69cde0(0x1bc)+_0x5c9ed5['toFixed'](0x0)+_0x69cde0(0x341)+_0x411b8a[_0x69cde0(0x2fd)](0x0)+_0x69cde0(0x215)+_0x2e350a[_0x69cde0(0x2fd)](0x0)+_0x69cde0(0x35f)+_0x230af3[_0x69cde0(0x2fd)](0x0)+'ms'+(_0x4eaa05[_0x69cde0(0x1ed)]?'\x20│\x20'+_0x4eaa05['join']('\x20\x20'):''),{'feature':_0x69cde0(0x272)});if(this[_0x69cde0(0x2c7)])for(const _0x290b74 of this[_0x69cde0(0x2c7)]){try{_0x290b74({'p99Ms':_0x411b8a,'maxMs':_0x5c9ed5,'meanMs':_0x2e350a,'reportMs':_0x2f71f0});}catch{}}}[_0x4917a8(0x331)](){const _0x58812a=_0x4917a8;if(this[_0x58812a(0x361)])clearInterval(this[_0x58812a(0x361)]);if(this['_h'])this['_h'][_0x58812a(0x2e3)]();this[_0x58812a(0x361)]=null,this['_h']=null,this[_0x58812a(0x1f1)]=![];}}const _0x38d7c3=new _0x1dc9b9();if(_0x38d7c3[_0x4917a8(0x2de)])_0x38d7c3[_0x4917a8(0x304)]();return okdbLoopMonitor={'LOOP':_0x38d7c3},okdbLoopMonitor;}var okdbTransaction,hasRequiredOkdbTransaction;function _0x2b4f(_0x2255b7,_0x31ec80){_0x2255b7=_0x2255b7-0x1bc;const _0x2e55eb=_0x2e55();let _0x2b4f8c=_0x2e55eb[_0x2255b7];return _0x2b4f8c;}function requireOkdbTransaction(){const _0x376a87=_0x551940;if(hasRequiredOkdbTransaction)return okdbTransaction;hasRequiredOkdbTransaction=0x1;const _0x3b190f=require$$0$3,{EVENTS:_0x147b07}=requireOkdbEnums(),{OKDBError:_0x38893a}=requireOkdbError(),{recordGuardTrip:_0x23ea5e,guardSnapshotIterable:_0x27080a}=requireOkdbGuardedRange(),{LOOP:_0x422f3a}=requireOkdbLoopMonitor();function _0xbbbd86(_0x434a35){const _0x153ec1=_0x2b4f;return _0x434a35[_0x153ec1(0x2a2)](_0x22b357=>{const _0x1f38cf=_0x153ec1,[_0x16c8eb,_0x541229]=_0x22b357['args']||[];return{'action':_0x22b357[_0x1f38cf(0x2db)],'type':_0x16c8eb,'key':_0x541229};});}class _0x2a5481{[_0x376a87(0x30c)];['actions']=[];[_0x376a87(0x2eb)]=[];[_0x376a87(0x328)]=[];constructor(_0x5b0190,_0x2a1cdd={'useReadTransaction':![]}){const _0x38c881=_0x376a87;this[_0x38c881(0x30c)]=_0x5b0190,this['options']=_0x2a1cdd,this['id']=_0x3b190f['v4']();if(this[_0x38c881(0x34f)][_0x38c881(0x2c2)])try{this[_0x38c881(0x20d)]=this[_0x38c881(0x30c)]['db']['getStats']()[_0x38c881(0x32e)];}catch{this[_0x38c881(0x20d)]=undefined;}this[_0x38c881(0x30a)]=this[_0x38c881(0x34f)][_0x38c881(0x2c2)]?this[_0x38c881(0x30c)]['db'][_0x38c881(0x2c2)]():null,this[_0x38c881(0x1fe)]=![],this[_0x38c881(0x2d1)]=![],this[_0x38c881(0x30a)]&&queueMicrotask(()=>{const _0x84b85e=_0x38c881;this[_0x84b85e(0x30a)]&&(this[_0x84b85e(0x377)](),this[_0x84b85e(0x2d1)]=!![]);});}[_0x376a87(0x2b9)](_0x5af910){const _0x5eb408=_0x376a87;this[_0x5eb408(0x2eb)][_0x5eb408(0x2af)](_0x5af910);}['onUndo'](_0x4eb218){const _0x45e965=_0x376a87;this['_undoHooks'][_0x45e965(0x2af)](_0x4eb218);}[_0x376a87(0x377)](){const _0x5955db=_0x376a87;if(!this[_0x5955db(0x30a)])return;try{this['readTransaction'][_0x5955db(0x33d)]();}catch(_0x3b69b6){}this['readTransaction']=null;}[_0x376a87(0x30f)](){const _0x5bca7d=_0x376a87;if(this[_0x5bca7d(0x1fe)])throw new _0x38893a(_0x5bca7d(0x203),_0x5bca7d(0x206));if(this['_readViewExpired']){let _0x51af72=![];if(this[_0x5bca7d(0x34f)]['useReadTransaction']===_0x5bca7d(0x1bf)&&this[_0x5bca7d(0x20d)]!==undefined)try{_0x51af72=this['okdb']['db'][_0x5bca7d(0x1c2)]()[_0x5bca7d(0x32e)]===this[_0x5bca7d(0x20d)];}catch{}if(!_0x51af72){_0x23ea5e((this[_0x5bca7d(0x30c)]?.[_0x5bca7d(0x383)]??'?')+_0x5bca7d(0x230));throw new _0x38893a('useReadTransaction\x20read\x20view\x20expired:\x20the\x20snapshot\x20was\x20released\x20at\x20the\x20first\x20await/turn\x20'+_0x5bca7d(0x211)+_0x5bca7d(0x204)+'no\x20write\x20has\x20landed.\x20Writes/commit\x20are\x20unaffected.',_0x5bca7d(0x28b));}}}[_0x376a87(0x2a3)](_0x318215,_0x130edf){const _0x16b583=_0x376a87;return this[_0x16b583(0x30f)](),this[_0x16b583(0x30c)]['get'](_0x318215,_0x130edf,{'transaction':this['readTransaction']});}[_0x376a87(0x1c1)](_0x497d52,_0x18f800){const _0x47002c=_0x376a87;return this[_0x47002c(0x30f)](),this[_0x47002c(0x30c)][_0x47002c(0x1c1)](_0x497d52,_0x18f800,{'transaction':this[_0x47002c(0x30a)]});}[_0x376a87(0x242)](_0x12d441,_0x948c64){const _0x35c390=_0x376a87;return this[_0x35c390(0x30f)](),this[_0x35c390(0x30c)]['getMany'](_0x12d441,_0x948c64,{'transaction':this[_0x35c390(0x30a)]});}[_0x376a87(0x2f4)](_0x5ce548){const _0x42749e=_0x376a87;if(!this[_0x42749e(0x34f)][_0x42749e(0x2c2)])return _0x5ce548;if(_0x5ce548&&typeof _0x5ce548[_0x42749e(0x379)]===_0x42749e(0x33c))return _0x5ce548;if(Array[_0x42749e(0x1e3)](_0x5ce548))return _0x5ce548;const _0x3eaf01=this,_0x1ca57d=_0x3eaf01['options'][_0x42749e(0x2c2)]==='tolerant',_0x150b9d=()=>{const _0x3e90b8=_0x42749e;if(!_0x3eaf01[_0x3e90b8(0x2d1)])return![];if(!_0x1ca57d)return!![];if(_0x3eaf01['_txnIdAtSnapshot']===undefined)return!![];try{return _0x3eaf01[_0x3e90b8(0x30c)]['db'][_0x3e90b8(0x1c2)]()['lastTxnId']!==_0x3eaf01[_0x3e90b8(0x20d)];}catch{return!![];}};return _0x27080a(()=>{const _0x2275b0=_0x42749e;if(_0x3eaf01[_0x2275b0(0x1fe)])throw new _0x38893a('Transaction\x20already\x20closed',_0x2275b0(0x206));if(_0x150b9d()){_0x23ea5e((_0x3eaf01[_0x2275b0(0x30c)]?.['name']??'?')+_0x2275b0(0x309));throw new _0x38893a('useReadTransaction\x20range\x20consumed\x20after\x20the\x20creation\x20turn\x20—\x20the\x20consistent\x20view\x20was\x20'+_0x2275b0(0x214)+_0x2275b0(0x2fb),_0x2275b0(0x28b));}return _0x5ce548;},{'label':(_0x3eaf01[_0x42749e(0x30c)]?.[_0x42749e(0x383)]??'?')+':txnRange',..._0x1ca57d?{'baseline':_0x3eaf01[_0x42749e(0x20d)],'getTxnId':()=>_0x3eaf01['okdb']['db']['getStats']()['lastTxnId'],'resume':(_0x55c367,_0x5a1e88)=>_0x5ce548[_0x42749e(0x25a)](_0x5a1e88)}:{}});}[_0x376a87(0x2fc)](_0x30171f,_0x49ba09={}){const _0x4eb3d5=_0x376a87;return this[_0x4eb3d5(0x30f)](),this[_0x4eb3d5(0x2f4)](this[_0x4eb3d5(0x30c)]['getRange'](_0x30171f,{'transaction':this[_0x4eb3d5(0x30a)],..._0x49ba09}));}[_0x376a87(0x256)](_0x15082e,_0x532c80={}){const _0x70055c=_0x376a87;return this[_0x70055c(0x30f)](),this['_range'](this[_0x70055c(0x30c)][_0x70055c(0x256)](_0x15082e,{'transaction':this[_0x70055c(0x30a)],..._0x532c80}));}[_0x376a87(0x1f0)](_0x5a752d,_0xd4ce5={}){const _0x390324=_0x376a87;return this['_assertOpen'](),this[_0x390324(0x2f4)](this[_0x390324(0x30c)][_0x390324(0x1f0)](_0x5a752d,{'transaction':this[_0x390324(0x30a)],..._0xd4ce5}));}[_0x376a87(0x335)](_0x1ec59f,_0x3af2a8,_0x2654e5={}){const _0x47fbf4=_0x376a87;return this['_assertOpen'](),this[_0x47fbf4(0x2f4)](this[_0x47fbf4(0x30c)][_0x47fbf4(0x335)](_0x1ec59f,_0x3af2a8,{'transaction':this['readTransaction'],..._0x2654e5}));}[_0x376a87(0x267)](_0x131f63,_0x5d56c0,_0x42e9bd={}){const _0x5eaa7c=_0x376a87;return this[_0x5eaa7c(0x30f)](),this['_range'](this['okdb'][_0x5eaa7c(0x267)](_0x131f63,_0x5d56c0,{'transaction':this[_0x5eaa7c(0x30a)],..._0x42e9bd}));}[_0x376a87(0x25e)](_0x24ed33=null){const _0x36b6b5=_0x376a87;return this[_0x36b6b5(0x30f)](),this[_0x36b6b5(0x30c)][_0x36b6b5(0x25e)](_0x24ed33,{'transaction':this[_0x36b6b5(0x30a)]});}[_0x376a87(0x2b6)](_0x1a4f73){const _0x40640d=_0x376a87;return this['_assertOpen'](),this[_0x40640d(0x30c)][_0x40640d(0x2b6)](_0x1a4f73,{'transaction':this[_0x40640d(0x30a)]});}[_0x376a87(0x296)](_0x2ef29c,_0x397bd5,_0x340719,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x376a87(0x320)](),origin:origin=null,ttl:ttl=null}={}){const _0x9a5869=_0x376a87;this[_0x9a5869(0x349)][_0x9a5869(0x2af)]({'action':'put','args':[_0x2ef29c,_0x397bd5,_0x340719,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x376a87(0x2c0)](_0x37b6db,_0x4ad296,_0x3d400c,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date['now'](),origin:origin=null,ttl:ttl=null}={}){const _0x25d6db=_0x376a87;this[_0x25d6db(0x349)][_0x25d6db(0x2af)]({'action':_0x25d6db(0x2c0),'args':[_0x37b6db,_0x4ad296,_0x3d400c,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x376a87(0x29a)](_0x41da3c,_0x1634e3,_0x3c63c6,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x376a87(0x320)](),origin:origin=null,ttl:ttl=null}={}){const _0x3e3c1e=_0x376a87;this[_0x3e3c1e(0x349)]['push']({'action':_0x3e3c1e(0x29a),'args':[_0x41da3c,_0x1634e3,_0x3c63c6,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}['create'](_0x52d116,_0x474e75,_0x3725bc,{version:version=null,timestamp:timestamp=Date[_0x376a87(0x320)](),origin:origin=null,ttl:ttl=null}={}){const _0x5a74f7=_0x376a87;this['actions'][_0x5a74f7(0x2af)]({'action':_0x5a74f7(0x37a),'args':[_0x52d116,_0x474e75,_0x3725bc,{'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x376a87(0x2d2)](_0x47485c,_0x271a86,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x376a87(0x320)](),origin:origin=null}={}){const _0x46e22e=_0x376a87;this['actions']['push']({'action':_0x46e22e(0x2d2),'args':[_0x47485c,_0x271a86,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin}]});}[_0x376a87(0x241)](_0x64006f,_0x4c9d50,_0x3d2054){const _0x321849=_0x376a87;this[_0x321849(0x349)]['push']({'action':'setTTL','args':[_0x64006f,_0x4c9d50,_0x3d2054]});}[_0x376a87(0x217)](_0x3aae03,_0x3bb450){const _0x2dec41=_0x376a87;this['actions'][_0x2dec41(0x2af)]({'action':_0x2dec41(0x217),'args':[_0x3aae03,_0x3bb450]});}[_0x376a87(0x334)](){const _0x149144=_0x376a87;if(this[_0x149144(0x1fe)])return;for(const _0x5aca49 of this[_0x149144(0x328)]){try{_0x5aca49();}catch{}}this[_0x149144(0x30c)][_0x149144(0x357)][_0x149144(0x1cd)](_0x147b07[_0x149144(0x21e)],{'id':this['id']}),this[_0x149144(0x349)]=[],this[_0x149144(0x377)](),this[_0x149144(0x1fe)]=!![];}async[_0x376a87(0x33f)](){const _0x3f4152=_0x376a87;if(this[_0x3f4152(0x1fe)])throw new Error(_0x3f4152(0x203));const _0x229b33={'id':this['id'],'timestamp':Date[_0x3f4152(0x320)](),'actions':this[_0x3f4152(0x349)]};this['okdb'][_0x3f4152(0x357)]['emit'](_0x147b07[_0x3f4152(0x370)],_0x229b33);try{const _0x298370=_0x422f3a[_0x3f4152(0x2de)]?_0x422f3a['now']():0x0;await this[_0x3f4152(0x30c)]['_writer'][_0x3f4152(0x226)](()=>{const _0x422de1=_0x3f4152;for(const _0x243204 of this['actions']){const _0x59dc80=this[_0x422de1(0x30c)]['_'+_0x243204['action']];if(typeof _0x59dc80!=='function')throw new Error(_0x422de1(0x264)+_0x243204['action']);_0x59dc80['call'](this[_0x422de1(0x30c)],this,..._0x243204[_0x422de1(0x1f8)]);}}),_0x422f3a[_0x3f4152(0x2de)]&&_0x422f3a[_0x3f4152(0x25d)](_0x3f4152(0x234),_0x422f3a[_0x3f4152(0x320)]()-_0x298370,(this[_0x3f4152(0x30c)]['name']??'?')+_0x3f4152(0x2e0)+this[_0x3f4152(0x349)]['length']);}catch(_0x117620){for(const _0x38379e of this[_0x3f4152(0x328)]){try{_0x38379e();}catch{}}this[_0x3f4152(0x377)](),this['_closed']=!![];if(_0x117620 instanceof _0x38893a)throw _0x117620;const _0x1a0842={'cause':_0x117620,'env':this[_0x3f4152(0x30c)]?.['name'],'envPath':this['okdb']?.[_0x3f4152(0x324)],'pid':process['pid'],'txnId':this['id'],'actionCount':this[_0x3f4152(0x349)][_0x3f4152(0x1ed)],'actions':_0xbbbd86(this[_0x3f4152(0x349)]),'nativeCode':_0x117620?.[_0x3f4152(0x367)],'nativeName':_0x117620?.['name']};try{this[_0x3f4152(0x30c)]?.[_0x3f4152(0x274)]?.['error']?.(_0x3f4152(0x2ad),{'env':_0x1a0842[_0x3f4152(0x23d)],'envPath':_0x1a0842[_0x3f4152(0x1dd)],'pid':_0x1a0842[_0x3f4152(0x32f)],'txnId':_0x1a0842['txnId'],'actionCount':_0x1a0842['actionCount'],'actions':_0x1a0842['actions'],'nativeCode':_0x1a0842['nativeCode'],'error':_0x117620?.['message'],'stack':_0x117620?.[_0x3f4152(0x293)]});}catch{}throw new _0x38893a(_0x117620?.[_0x3f4152(0x222)]||'Unknown\x20OKDB\x20transaction\x20error',_0x3f4152(0x2b7),_0x1a0842);}this[_0x3f4152(0x30c)]['events'][_0x3f4152(0x1cd)](_0x147b07[_0x3f4152(0x29f)],_0x229b33);for(const _0x225d70 of this[_0x3f4152(0x2eb)]){try{await _0x225d70();}catch{}}this[_0x3f4152(0x349)]=[],this['_closeReadTransaction'](),this[_0x3f4152(0x1fe)]=!![];}static[_0x376a87(0x2bc)](_0x39282a){const _0x79c012=_0x376a87;return Object[_0x79c012(0x1d6)]({'id':_0x39282a['id'],'put':_0x39282a['put'][_0x79c012(0x271)](_0x39282a),'update':_0x39282a[_0x79c012(0x2c0)][_0x79c012(0x271)](_0x39282a),'patch':_0x39282a[_0x79c012(0x29a)][_0x79c012(0x271)](_0x39282a),'create':_0x39282a['create'][_0x79c012(0x271)](_0x39282a),'remove':_0x39282a['remove'][_0x79c012(0x271)](_0x39282a),'setTTL':_0x39282a[_0x79c012(0x241)]['bind'](_0x39282a),'clearTTL':_0x39282a['clearTTL'][_0x79c012(0x271)](_0x39282a),'commit':_0x39282a[_0x79c012(0x33f)][_0x79c012(0x271)](_0x39282a),'rollback':_0x39282a[_0x79c012(0x334)][_0x79c012(0x271)](_0x39282a),'get':_0x39282a['get'][_0x79c012(0x271)](_0x39282a),'getEntry':_0x39282a['getEntry'][_0x79c012(0x271)](_0x39282a),'getMany':_0x39282a[_0x79c012(0x242)][_0x79c012(0x271)](_0x39282a),'getRange':_0x39282a[_0x79c012(0x2fc)][_0x79c012(0x271)](_0x39282a),'getValues':_0x39282a[_0x79c012(0x256)]['bind'](_0x39282a),'getKeys':_0x39282a[_0x79c012(0x1f0)]['bind'](_0x39282a),'byIndex':_0x39282a[_0x79c012(0x335)]['bind'](_0x39282a),'query':_0x39282a[_0x79c012(0x267)][_0x79c012(0x271)](_0x39282a),'getClock':_0x39282a[_0x79c012(0x25e)]['bind'](_0x39282a),'getCount':_0x39282a[_0x79c012(0x2b6)][_0x79c012(0x271)](_0x39282a),'read':_0x39282a,'raw':_0x39282a});}static[_0x376a87(0x252)](_0x1aac2c,_0x3472e6=[]){const _0x23378e=_0x376a87;if(!Array[_0x23378e(0x1e3)](_0x3472e6))throw new _0x38893a(_0x23378e(0x2fa),'TXN_INVALID_OPS');for(const _0x322139 of _0x3472e6){if(Array[_0x23378e(0x1e3)](_0x322139)){const [_0x2fa5b8,..._0x5e40c0]=_0x322139;if(typeof _0x1aac2c[_0x2fa5b8]!==_0x23378e(0x33c))throw new _0x38893a(_0x23378e(0x264)+_0x2fa5b8,_0x23378e(0x219),{'action':_0x2fa5b8});_0x1aac2c[_0x2fa5b8](..._0x5e40c0);continue;}if(!_0x322139||typeof _0x322139!==_0x23378e(0x37e))throw new _0x38893a(_0x23378e(0x2d5),_0x23378e(0x21d));const {action:_0x2ae4b3}=_0x322139;if(typeof _0x2ae4b3!=='string'||typeof _0x1aac2c[_0x2ae4b3]!==_0x23378e(0x33c))throw new _0x38893a(_0x23378e(0x264)+_0x2ae4b3,'TXN_INVALID_ACTION',{'action':_0x2ae4b3});switch(_0x2ae4b3){case'put':case _0x23378e(0x2c0):case _0x23378e(0x37a):_0x1aac2c[_0x2ae4b3](_0x322139['type'],_0x322139['key'],_0x322139[_0x23378e(0x223)],{..._0x322139[_0x23378e(0x34f)],'ttl':_0x322139['ttl']??_0x322139[_0x23378e(0x34f)]?.[_0x23378e(0x1e6)]??null});break;case _0x23378e(0x29a):_0x1aac2c[_0x23378e(0x29a)](_0x322139[_0x23378e(0x1d9)],_0x322139[_0x23378e(0x346)],_0x322139['patch'],{..._0x322139['options'],'ttl':_0x322139['ttl']??_0x322139[_0x23378e(0x34f)]?.[_0x23378e(0x1e6)]??null});break;case _0x23378e(0x2d2):_0x1aac2c[_0x23378e(0x2d2)](_0x322139[_0x23378e(0x1d9)],_0x322139[_0x23378e(0x346)],_0x322139[_0x23378e(0x34f)]||{});break;case _0x23378e(0x241):_0x1aac2c[_0x23378e(0x241)](_0x322139[_0x23378e(0x1d9)],_0x322139[_0x23378e(0x346)],_0x322139[_0x23378e(0x1e6)]);break;case _0x23378e(0x217):_0x1aac2c[_0x23378e(0x217)](_0x322139[_0x23378e(0x1d9)],_0x322139[_0x23378e(0x346)]);break;default:throw new _0x38893a(_0x23378e(0x34a)+_0x2ae4b3,_0x23378e(0x219),{'action':_0x2ae4b3});}}}static async[_0x376a87(0x281)](_0x412cd2,_0xedf50f,_0x5ed021={}){const _0x566b96=_0x376a87,_0x54bc4b=new _0x2a5481(_0x412cd2,_0x5ed021),_0x104c1b=_0x2a5481[_0x566b96(0x2bc)](_0x54bc4b);try{typeof _0xedf50f===_0x566b96(0x33c)?await _0xedf50f(_0x104c1b):_0x2a5481['applyOps'](_0x54bc4b,_0xedf50f||[]);const _0x5bbd87=_0x54bc4b[_0x566b96(0x349)][_0x566b96(0x1ed)];return await _0x54bc4b[_0x566b96(0x33f)](),{'id':_0x54bc4b['id'],'actions':_0x5bbd87};}catch(_0x41aac4){try{_0x54bc4b[_0x566b96(0x334)]();}catch(_0x277a9b){}throw _0x41aac4;}}}return okdbTransaction=_0x2a5481,okdbTransaction;}var okdbFunctionsFacades,hasRequiredOkdbFunctionsFacades;function requireOkdbFunctionsFacades(){if(hasRequiredOkdbFunctionsFacades)return okdbFunctionsFacades;hasRequiredOkdbFunctionsFacades=0x1;const _0x6ac1a8=requireOkdbTransaction();function _0x38ed61(_0x562cd9){const _0x2b97c6=_0x2b4f;return{'transaction':typeof _0x562cd9[_0x2b97c6(0x226)]===_0x2b97c6(0x33c)?_0x562cd9[_0x2b97c6(0x226)][_0x2b97c6(0x271)](_0x562cd9):_0x133e86=>new _0x6ac1a8(_0x562cd9,_0x133e86),'txn':typeof _0x562cd9[_0x2b97c6(0x2b2)]===_0x2b97c6(0x33c)?_0x562cd9[_0x2b97c6(0x2b2)][_0x2b97c6(0x271)](_0x562cd9):(_0x2a3d05,_0x2ce3bc)=>_0x6ac1a8[_0x2b97c6(0x281)](_0x562cd9,_0x2a3d05,_0x2ce3bc)};}function _0xaaf8b6(_0x13876b){const _0x54b593=_0x2b4f;return{'name':_0x13876b[_0x54b593(0x383)],..._0x38ed61(_0x13876b),'put':_0x13876b[_0x54b593(0x296)][_0x54b593(0x271)](_0x13876b),'update':_0x13876b[_0x54b593(0x2c0)]['bind'](_0x13876b),'patch':_0x13876b[_0x54b593(0x29a)][_0x54b593(0x271)](_0x13876b),'create':_0x13876b[_0x54b593(0x37a)][_0x54b593(0x271)](_0x13876b),'remove':_0x13876b[_0x54b593(0x2d2)][_0x54b593(0x271)](_0x13876b),'get':_0x13876b[_0x54b593(0x2a3)]['bind'](_0x13876b),'getMany':_0x13876b[_0x54b593(0x242)][_0x54b593(0x271)](_0x13876b),'getEntry':_0x13876b['getEntry'][_0x54b593(0x271)](_0x13876b),'getRange':_0x13876b[_0x54b593(0x2fc)][_0x54b593(0x271)](_0x13876b),'getValues':_0x13876b[_0x54b593(0x256)][_0x54b593(0x271)](_0x13876b),'getKeys':_0x13876b['getKeys'][_0x54b593(0x271)](_0x13876b),'getCount':_0x13876b[_0x54b593(0x2b6)][_0x54b593(0x271)](_0x13876b),'getByPrefix':_0x13876b['getByPrefix'][_0x54b593(0x271)](_0x13876b),'getIndex':_0x13876b['getIndex']['bind'](_0x13876b),'byIndex':_0x13876b[_0x54b593(0x335)][_0x54b593(0x271)](_0x13876b),'query':_0x13876b[_0x54b593(0x267)]['bind'](_0x13876b),'geoQuery':_0x13876b[_0x54b593(0x2cf)][_0x54b593(0x271)](_0x13876b),'ftsQuery':_0x13876b['ftsQuery'][_0x54b593(0x271)](_0x13876b),'setTTL':_0x13876b['setTTL'][_0x54b593(0x271)](_0x13876b),'getTTL':_0x13876b['getTTL'][_0x54b593(0x271)](_0x13876b),'clearTTL':_0x13876b[_0x54b593(0x217)][_0x54b593(0x271)](_0x13876b),'sweepExpiredTTL':_0x13876b[_0x54b593(0x1cf)][_0x54b593(0x271)](_0x13876b),'listTTL':_0x13876b['listTTL']['bind'](_0x13876b),'ttlStats':_0x13876b[_0x54b593(0x2cc)][_0x54b593(0x271)](_0x13876b),'setDefaultTTL':_0x13876b[_0x54b593(0x28e)][_0x54b593(0x271)](_0x13876b),'getDefaultTTL':_0x13876b[_0x54b593(0x2d8)]['bind'](_0x13876b),'clearDefaultTTL':_0x13876b[_0x54b593(0x2be)]['bind'](_0x13876b),'registerType':_0x13876b['registerType']['bind'](_0x13876b),'ensureType':_0x13876b[_0x54b593(0x261)][_0x54b593(0x271)](_0x13876b),'hasType':_0x13876b[_0x54b593(0x380)][_0x54b593(0x271)](_0x13876b),'dropType':_0x13876b[_0x54b593(0x258)][_0x54b593(0x271)](_0x13876b),'registerIndex':_0x13876b[_0x54b593(0x228)][_0x54b593(0x271)](_0x13876b),'hasIndex':_0x13876b[_0x54b593(0x2c9)][_0x54b593(0x271)](_0x13876b),'dropIndex':_0x13876b['dropIndex'][_0x54b593(0x271)](_0x13876b),'resetIndex':_0x13876b[_0x54b593(0x2ea)][_0x54b593(0x271)](_0x13876b),'indexReady':_0x13876b[_0x54b593(0x21c)][_0x54b593(0x271)](_0x13876b),'getIndexStatus':_0x13876b['getIndexStatus']['bind'](_0x13876b),'getClock':_0x13876b[_0x54b593(0x25e)][_0x54b593(0x271)](_0x13876b),'getChanges':_0x13876b['getChanges'][_0x54b593(0x271)](_0x13876b),'count':_0x13876b['count'][_0x54b593(0x271)](_0x13876b),'range':_0x13876b[_0x54b593(0x22a)][_0x54b593(0x271)](_0x13876b),'now':_0x13876b['now'][_0x54b593(0x271)](_0x13876b)};}function _0x44ded9(_0x5f0a8e){const _0x2a86ad=_0x2b4f;if(!_0x5f0a8e)return null;const _0x476bfd={};for(const _0x4410ac of[_0x2a86ad(0x2f5),_0x2a86ad(0x245),'list',_0x2a86ad(0x23a),_0x2a86ad(0x2bd),_0x2a86ad(0x2b8),'getBucket',_0x2a86ad(0x248)]){if(typeof _0x5f0a8e[_0x4410ac]===_0x2a86ad(0x33c))_0x476bfd[_0x4410ac]=_0x5f0a8e[_0x4410ac][_0x2a86ad(0x271)](_0x5f0a8e);}return Object[_0x2a86ad(0x35e)](_0x476bfd)[_0x2a86ad(0x1ed)]?_0x476bfd:null;}function _0x52afca(_0x5b70e0){const _0x438672=_0x2b4f;if(!_0x5b70e0)return null;const _0x1af0f0={};for(const _0x895ea3 of[_0x438672(0x31c),_0x438672(0x2a9),_0x438672(0x2c8),_0x438672(0x2d2),_0x438672(0x2a3),_0x438672(0x24f)]){if(typeof _0x5b70e0[_0x895ea3]==='function')_0x1af0f0[_0x895ea3]=_0x5b70e0[_0x895ea3][_0x438672(0x271)](_0x5b70e0);}return Object[_0x438672(0x35e)](_0x1af0f0)[_0x438672(0x1ed)]?_0x1af0f0:null;}function _0x187682(_0x4fb06c){const _0x1563f8=_0x2b4f;return{'env':_0x4fb06c['env']['bind'](_0x4fb06c),'createEnvironment':_0x4fb06c[_0x1563f8(0x244)]['bind'](_0x4fb06c),'removeEnvironment':_0x4fb06c[_0x1563f8(0x308)]['bind'](_0x4fb06c),'info':_0x4fb06c[_0x1563f8(0x310)],..._0x38ed61(_0x4fb06c),'put':_0x4fb06c[_0x1563f8(0x296)][_0x1563f8(0x271)](_0x4fb06c),'update':_0x4fb06c[_0x1563f8(0x2c0)][_0x1563f8(0x271)](_0x4fb06c),'patch':_0x4fb06c['patch'][_0x1563f8(0x271)](_0x4fb06c),'create':_0x4fb06c[_0x1563f8(0x37a)][_0x1563f8(0x271)](_0x4fb06c),'remove':_0x4fb06c[_0x1563f8(0x2d2)][_0x1563f8(0x271)](_0x4fb06c),'get':_0x4fb06c[_0x1563f8(0x2a3)][_0x1563f8(0x271)](_0x4fb06c),'getMany':_0x4fb06c[_0x1563f8(0x242)][_0x1563f8(0x271)](_0x4fb06c),'getEntry':_0x4fb06c[_0x1563f8(0x1c1)][_0x1563f8(0x271)](_0x4fb06c),'getRange':_0x4fb06c[_0x1563f8(0x2fc)][_0x1563f8(0x271)](_0x4fb06c),'getValues':_0x4fb06c[_0x1563f8(0x256)][_0x1563f8(0x271)](_0x4fb06c),'getKeys':_0x4fb06c['getKeys']['bind'](_0x4fb06c),'getCount':_0x4fb06c[_0x1563f8(0x2b6)][_0x1563f8(0x271)](_0x4fb06c),'getByPrefix':_0x4fb06c['getByPrefix'][_0x1563f8(0x271)](_0x4fb06c),'getIndex':_0x4fb06c[_0x1563f8(0x26a)][_0x1563f8(0x271)](_0x4fb06c),'byIndex':_0x4fb06c['byIndex'][_0x1563f8(0x271)](_0x4fb06c),'query':_0x4fb06c[_0x1563f8(0x267)][_0x1563f8(0x271)](_0x4fb06c),'setTTL':_0x4fb06c[_0x1563f8(0x241)][_0x1563f8(0x271)](_0x4fb06c),'getTTL':_0x4fb06c[_0x1563f8(0x342)][_0x1563f8(0x271)](_0x4fb06c),'clearTTL':_0x4fb06c[_0x1563f8(0x217)][_0x1563f8(0x271)](_0x4fb06c),'sweepExpiredTTL':_0x4fb06c[_0x1563f8(0x1cf)][_0x1563f8(0x271)](_0x4fb06c),'listTTL':_0x4fb06c[_0x1563f8(0x1e7)][_0x1563f8(0x271)](_0x4fb06c),'ttlStats':_0x4fb06c[_0x1563f8(0x2cc)][_0x1563f8(0x271)](_0x4fb06c),'setDefaultTTL':_0x4fb06c['setDefaultTTL']['bind'](_0x4fb06c),'getDefaultTTL':_0x4fb06c[_0x1563f8(0x2d8)][_0x1563f8(0x271)](_0x4fb06c),'clearDefaultTTL':_0x4fb06c[_0x1563f8(0x2be)][_0x1563f8(0x271)](_0x4fb06c),'ensureType':_0x4fb06c['ensureType'][_0x1563f8(0x271)](_0x4fb06c),'registerType':_0x4fb06c[_0x1563f8(0x2e8)][_0x1563f8(0x271)](_0x4fb06c),'hasType':_0x4fb06c[_0x1563f8(0x380)][_0x1563f8(0x271)](_0x4fb06c),'dropType':_0x4fb06c[_0x1563f8(0x258)][_0x1563f8(0x271)](_0x4fb06c),'registerIndex':_0x4fb06c[_0x1563f8(0x228)]['bind'](_0x4fb06c),'hasIndex':_0x4fb06c[_0x1563f8(0x2c9)][_0x1563f8(0x271)](_0x4fb06c),'dropIndex':_0x4fb06c[_0x1563f8(0x276)][_0x1563f8(0x271)](_0x4fb06c),'resetIndex':_0x4fb06c[_0x1563f8(0x2ea)]['bind'](_0x4fb06c),'indexReady':_0x4fb06c['indexReady'][_0x1563f8(0x271)](_0x4fb06c),'getIndexStatus':_0x4fb06c[_0x1563f8(0x2f1)][_0x1563f8(0x271)](_0x4fb06c),'getClock':_0x4fb06c[_0x1563f8(0x25e)][_0x1563f8(0x271)](_0x4fb06c),'getChanges':_0x4fb06c[_0x1563f8(0x20f)]['bind'](_0x4fb06c),'queue':_0x4fb06c['queue'],'files':_0x4fb06c['files']};}return okdbFunctionsFacades={'createEnvFacade':_0xaaf8b6,'createQueueFacade':_0x44ded9,'createFilesFacade':_0x52afca,'createGlobalFacade':_0x187682},okdbFunctionsFacades;}var okdbFunctionsDryrun,hasRequiredOkdbFunctionsDryrun;function requireOkdbFunctionsDryrun(){const _0x3f3a02=_0x551940;if(hasRequiredOkdbFunctionsDryrun)return okdbFunctionsDryrun;hasRequiredOkdbFunctionsDryrun=0x1;const _0x33a9bd=new Set(['put','patch',_0x3f3a02(0x37a),_0x3f3a02(0x2d2),_0x3f3a02(0x2c0),'setTTL',_0x3f3a02(0x217),'sweepExpiredTTL',_0x3f3a02(0x28e),_0x3f3a02(0x2be),_0x3f3a02(0x258),_0x3f3a02(0x276),_0x3f3a02(0x2ea)]),_0x51374d=new Set([_0x3f3a02(0x2f5),'updateJob',_0x3f3a02(0x2bd),'addBucket']),_0x381c3c=new Set([_0x3f3a02(0x31c),_0x3f3a02(0x2d2)]);function _0x47a7f2(_0x4ba472,_0x572989){const _0xc4e132=_0x3f3a02;if(_0x4ba472===_0xc4e132(0x23d)||_0x4ba472===_0xc4e132(0x236))return _0x33a9bd['has'](_0x572989);if(_0x4ba472==='queue')return _0x51374d['has'](_0x572989);if(_0x4ba472==='files')return _0x381c3c[_0xc4e132(0x237)](_0x572989);return![];}function _0x579191(_0x529178,_0x373453,_0x1727e6,_0x4a0c6d){if(!_0x529178)return _0x529178;return new Proxy(_0x529178,{'get'(_0x39a28d,_0x1a19db,_0x1a4bc9){const _0x5833b8=_0x2b4f,_0x35a5c1=Reflect[_0x5833b8(0x2a3)](_0x39a28d,_0x1a19db,_0x1a4bc9);if(typeof _0x35a5c1!==_0x5833b8(0x33c))return _0x35a5c1;if(!_0x47a7f2(_0x373453,_0x1a19db))return _0x35a5c1[_0x5833b8(0x271)](_0x39a28d);return function(..._0x31b0ff){const _0x1b182e=_0x5833b8;return _0x4a0c6d[_0x1b182e(0x2af)]({'scope':_0x373453,'method':_0x1a19db,'envName':_0x1727e6,'args':_0x31b0ff}),null;};}});}function _0x11fa05(_0x49eb75,_0x4eab6f,_0x415574,_0x3b5422){const _0x2a2b94={};for(const _0x1dc81b of _0x415574){_0x2a2b94[_0x1dc81b]=(..._0x2cb1de)=>{const _0x3d0c71=_0x2b4f;return _0x47a7f2(_0x49eb75,_0x1dc81b)&&_0x3b5422[_0x3d0c71(0x2af)]({'scope':_0x49eb75,'method':_0x1dc81b,'envName':_0x4eab6f,'args':_0x2cb1de}),null;};}return _0x2a2b94;}return okdbFunctionsDryrun={'isWriteMethod':_0x47a7f2,'wrapForDryRun':_0x579191,'syntheticDryRunFacade':_0x11fa05,'ENV_WRITE_METHODS':_0x33a9bd,'QUEUE_WRITE_METHODS':_0x51374d,'FILES_WRITE_METHODS':_0x381c3c},okdbFunctionsDryrun;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x431832=0x2**0x1f-0x1;function _0x37a389(_0x48ec33){if(!(_0x48ec33>0x0))return 0x0;return _0x48ec33>_0x431832?_0x431832:_0x48ec33;}function _0x1378f8(_0x114a7c){return _0x114a7c===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x431832,'clampTimerDelay':_0x37a389,'isNeverDelay':_0x1378f8},okdbTimers;}var okdbFunctionsContext,hasRequiredOkdbFunctionsContext;function requireOkdbFunctionsContext(){const _0x376fa3=_0x551940;if(hasRequiredOkdbFunctionsContext)return okdbFunctionsContext;hasRequiredOkdbFunctionsContext=0x1;const {createEnvFacade:_0x3476a6,createQueueFacade:_0x37be71,createFilesFacade:_0x37e885,createGlobalFacade:_0x110fd3}=requireOkdbFunctionsFacades(),{wrapForDryRun:_0x492312,syntheticDryRunFacade:_0x47aaee}=requireOkdbFunctionsDryrun(),{clampTimerDelay:_0x3e68b8}=requireOkdbTimers(),_0x2f8ec2=[_0x376fa3(0x2f5),_0x376fa3(0x245),_0x376fa3(0x1f5),_0x376fa3(0x23a),'removeJob','addBucket',_0x376fa3(0x220),_0x376fa3(0x248)],_0x1a9972=[_0x376fa3(0x31c),_0x376fa3(0x2a9),'read',_0x376fa3(0x2d2),_0x376fa3(0x2a3),_0x376fa3(0x24f)];function _0x24aa9c(_0x4c4be0,_0x186669){const _0x1c2a81=_0x376fa3,_0x940661=(_0x2839c0,_0x6b65b6,_0x33654d)=>_0x186669({'type':_0x1c2a81(0x274),'requestId':_0x4c4be0[_0x1c2a81(0x307)],'runId':_0x4c4be0[_0x1c2a81(0x253)],'entry':{'level':_0x2839c0,'msg':_0x6b65b6,'context':_0x33654d,'ts':Date[_0x1c2a81(0x320)]()}}),_0x1d2c2a=(_0xfb9cdb,_0x1cb1b4)=>_0x940661(_0x1c2a81(0x310),_0xfb9cdb,_0x1cb1b4);return _0x1d2c2a[_0x1c2a81(0x310)]=(_0x203584,_0x4dc520)=>_0x940661(_0x1c2a81(0x310),_0x203584,_0x4dc520),_0x1d2c2a['warn']=(_0x58b130,_0x1563e0)=>_0x940661(_0x1c2a81(0x323),_0x58b130,_0x1563e0),_0x1d2c2a[_0x1c2a81(0x1e9)]=(_0x598459,_0x2e98c6)=>_0x940661('error',_0x598459,_0x2e98c6),_0x1d2c2a[_0x1c2a81(0x275)]=(_0x6253aa,_0x31dbc2)=>_0x940661(_0x1c2a81(0x275),_0x6253aa,_0x31dbc2),_0x1d2c2a;}function _0x1324ec(_0x2fd829,_0x49e0b4,_0x809a99){const _0x5c56b0=_0x376fa3;if(!_0x2fd829)return null;return{'id':_0x2fd829['id']??null,'type':_0x2fd829[_0x5c56b0(0x1d9)]??null,'tries':_0x2fd829[_0x5c56b0(0x1ca)]??null,'created':_0x2fd829[_0x5c56b0(0x287)]??null,'tags':_0x2fd829[_0x5c56b0(0x1c8)]??null,'priority':_0x2fd829[_0x5c56b0(0x30b)]??null,'bucket':_0x2fd829['bucket']??null,'cron':_0x2fd829[_0x5c56b0(0x314)]??null,'heartbeat'(){const _0x4738a9=_0x5c56b0;_0x809a99({'type':_0x4738a9(0x316),'requestId':_0x49e0b4[_0x4738a9(0x307)],'runId':_0x49e0b4[_0x4738a9(0x253)],'jobId':_0x2fd829['id'],'claimId':_0x2fd829[_0x4738a9(0x25b)]});},'markProgress'(_0x18dd1a){const _0x2a41dc=_0x5c56b0;_0x809a99({'type':'job_progress','requestId':_0x49e0b4[_0x2a41dc(0x307)],'runId':_0x49e0b4[_0x2a41dc(0x253)],'jobId':_0x2fd829['id'],'claimId':_0x2fd829[_0x2a41dc(0x25b)],'message':_0x18dd1a});}};}function _0x4fdf74(_0xf94f3a){const _0x36e404=_0x376fa3;if(!_0xf94f3a)return null;return{'mode':_0xf94f3a[_0x36e404(0x2e2)]??null,'sourceType':_0xf94f3a[_0x36e404(0x22d)]??null,'sourceEnv':_0xf94f3a[_0x36e404(0x2f8)]??null,'processor':_0xf94f3a[_0x36e404(0x2ed)]??null,'engineKey':_0xf94f3a[_0x36e404(0x32c)]??null,'cursorKey':_0xf94f3a[_0x36e404(0x28d)]??null};}function _0x23b13d(_0x17049d){const _0x4b33b1=_0x376fa3;if(!_0x17049d)return null;return{'mode':_0x17049d[_0x4b33b1(0x2e2)]??null,'sourceType':_0x17049d[_0x4b33b1(0x22d)]??null,'targetType':_0x17049d['targetType']??null,'sourceEnv':_0x17049d['sourceEnv']??null,'targetEnv':_0x17049d[_0x4b33b1(0x29d)]??null,'engineKey':_0x17049d[_0x4b33b1(0x32c)]??null,'cursorKey':_0x17049d[_0x4b33b1(0x28d)]??null};}function _0x24bb64(_0x36488e,_0x9c1dc6,_0x3bd9c0,_0x4f15ac=null,_0x191203=null){const _0x67c183=_0x376fa3,_0x8c8ac6={'runId':_0x9c1dc6[_0x67c183(0x253)],'scope':'env','env':_0x9c1dc6[_0x67c183(0x22c)]??null,'functionName':_0x9c1dc6[_0x67c183(0x318)],'trigger':_0x9c1dc6['info']?.[_0x67c183(0x325)]??_0x67c183(0x1e8),'requestedAt':_0x9c1dc6['info']?.[_0x67c183(0x35b)]??Date[_0x67c183(0x320)]()},_0x3c5aab=_0x24aa9c(_0x9c1dc6,_0x3bd9c0),_0x2f6046=AbortSignal['timeout'](_0x3e68b8(Math[_0x67c183(0x34e)](0x1,_0x9c1dc6[_0x67c183(0x2a5)]?.['timeoutMs']??0x3e8))),_0x49f3ac=_0x191203?AbortSignal[_0x67c183(0x269)]([_0x2f6046,_0x191203]):_0x2f6046,_0xe517a5=_0x36488e['env'](_0x9c1dc6['envName']),_0x50c911=_0x4f15ac?_0x492312(_0xe517a5,_0x67c183(0x23d),_0x9c1dc6[_0x67c183(0x22c)],_0x4f15ac):_0xe517a5,_0x413512=_0x4f15ac?_0xe517a5[_0x67c183(0x1fc)]?_0x492312(_0xe517a5[_0x67c183(0x1fc)],'queue',_0x9c1dc6[_0x67c183(0x22c)],_0x4f15ac):_0x47aaee(_0x67c183(0x1fc),_0x9c1dc6['envName'],_0x2f8ec2,_0x4f15ac):_0xe517a5[_0x67c183(0x1fc)],_0x2ab1d7=_0x4f15ac?_0xe517a5['files']?_0x492312(_0xe517a5[_0x67c183(0x277)],_0x67c183(0x277),_0x9c1dc6[_0x67c183(0x22c)],_0x4f15ac):_0x47aaee(_0x67c183(0x277),_0x9c1dc6[_0x67c183(0x22c)],_0x1a9972,_0x4f15ac):_0xe517a5[_0x67c183(0x277)],_0x5bdff2=_0x3476a6(_0x50c911),_0x403154=_0x37be71(_0x413512),_0x3f4d66=_0x37e885(_0x2ab1d7);if(_0x403154)_0x5bdff2[_0x67c183(0x1fc)]=_0x403154;if(_0x3f4d66)_0x5bdff2[_0x67c183(0x277)]=_0x3f4d66;const _0x54fed5={'payload':_0x9c1dc6['payload']??null,'info':_0x8c8ac6,'signal':_0x49f3ac,'log':_0x3c5aab,'env':_0x5bdff2},_0x14277e=_0x1324ec(_0x9c1dc6[_0x67c183(0x298)],_0x9c1dc6,_0x3bd9c0);if(_0x14277e)_0x54fed5[_0x67c183(0x218)]=_0x14277e;const _0x4d9c9b=_0x4fdf74(_0x9c1dc6[_0x67c183(0x292)]);if(_0x4d9c9b)_0x54fed5[_0x67c183(0x2ed)]=_0x4d9c9b;const _0x1ea24e=_0x23b13d(_0x9c1dc6['materializerContext']);if(_0x1ea24e)_0x54fed5['materializer']=_0x1ea24e;if(_0x9c1dc6['unsafe']){const _0x1392b9=_0x4f15ac?_0x492312(_0x36488e,'global',null,_0x4f15ac):_0x36488e;_0x54fed5[_0x67c183(0x30c)]=_0x110fd3(_0x1392b9);}return _0x54fed5;}return okdbFunctionsContext={'createExecutionContext':_0x24bb64,'createScriptLogger':_0x24aa9c},okdbFunctionsContext;}var hasRequiredOkdbFunctionsSandboxWorker;function requireOkdbFunctionsSandboxWorker(){const _0xfa4001=_0x551940;if(hasRequiredOkdbFunctionsSandboxWorker)return okdbFunctionsSandboxWorker$1;hasRequiredOkdbFunctionsSandboxWorker=0x1;const {parentPort:_0xf02078,workerData:_0x5c1295}=require$$0$4;requireOkdbFatalReport()[_0xfa4001(0x1f4)]('sandbox');const _0x453d03=require$$2$1,{compileFunctionExpression:_0x55e77d}=requireOkdbFunctionsSandbox(),{serializeError:_0xb6ffa1}=requireOkdbFunctionsIpc(),{createExecutionContext:_0x253051}=requireOkdbFunctionsContext(),_0x5cbc07=require$$6;let _0x43bc00=null,_0x30f94e=![];const _0x381d50=new Map(),_0x4ea910=new Map();function _0x1012d1(_0xe9d9a1){const _0x41c9f9=_0xfa4001;try{_0xf02078[_0x41c9f9(0x2a6)](_0xe9d9a1);}catch{}}function _0x2715ee(_0x234fef){const _0x58dba5=_0xfa4001,_0x237133=(_0x234fef[_0x58dba5(0x22c)]||_0x58dba5(0x26e))+':'+_0x234fef[_0x58dba5(0x318)]+':'+_0x234fef[_0x58dba5(0x22f)]+':'+_0x234fef['hash'];let _0x58db03=_0x381d50[_0x58dba5(0x2a3)](_0x237133);return!_0x58db03&&(_0x58db03=_0x55e77d(_0x234fef['script'],{'allowFetch':_0x234fef['runtime']?.[_0x58dba5(0x2e7)]!==![],'allowedFetchDomains':_0x234fef['runtime']?.[_0x58dba5(0x350)],'filename':_0x234fef[_0x58dba5(0x318)]+'.okdb-function.js'}),_0x381d50[_0x58dba5(0x2e5)](_0x237133,_0x58db03)),_0x58db03;}async function _0x1204f6(_0x21059a){const _0x5a9e08=_0xfa4001,_0x98baae=Date[_0x5a9e08(0x320)](),_0x2a82f8=new AbortController();_0x4ea910[_0x5a9e08(0x2e5)](_0x21059a[_0x5a9e08(0x307)],_0x2a82f8);try{const _0x473e3c=_0x2715ee(_0x21059a);if(_0x21059a[_0x5a9e08(0x22c)])await _0x43bc00[_0x5a9e08(0x270)](_0x21059a[_0x5a9e08(0x22c)]);const _0x2c7e30=_0x21059a[_0x5a9e08(0x250)]?[]:null,_0x4b29b3=_0x253051(_0x43bc00,_0x21059a,_0x1012d1,_0x2c7e30,_0x2a82f8[_0x5a9e08(0x2c5)]),_0x338dca=await _0x473e3c(_0x4b29b3),_0x56300c={'type':_0x5a9e08(0x24d),'requestId':_0x21059a[_0x5a9e08(0x307)],'runId':_0x21059a[_0x5a9e08(0x253)],'result':_0x338dca,'meta':{'runnerId':'sandbox-'+process[_0x5a9e08(0x32f)],'startedAt':_0x98baae,'finishedAt':Date[_0x5a9e08(0x320)](),'durationMs':Date[_0x5a9e08(0x320)]()-_0x98baae}};if(_0x2c7e30)_0x56300c[_0x5a9e08(0x1f9)]=_0x2c7e30;_0x1012d1(_0x56300c);}catch(_0x1ac9fb){_0x1012d1({'type':'error','requestId':_0x21059a['requestId'],'runId':_0x21059a[_0x5a9e08(0x253)],'error':_0xb6ffa1(_0x1ac9fb),'meta':{'runnerId':_0x5a9e08(0x1c4)+process['pid'],'startedAt':_0x98baae,'finishedAt':Date[_0x5a9e08(0x320)](),'durationMs':Date[_0x5a9e08(0x320)]()-_0x98baae}});}finally{_0x4ea910[_0x5a9e08(0x254)](_0x21059a['requestId']);}}async function _0x5ce8d9(){const _0x34ed99=_0xfa4001;if(_0x30f94e)return;_0x30f94e=!![];try{await _0x43bc00?.['close']?.();}catch{}process[_0x34ed99(0x290)](0x0);}async function _0x36c08e(){const _0x2dfb83=_0xfa4001,{rootPath:_0x3c612b}=_0x5c1295??{};if(!_0x3c612b)throw new Error(_0x2dfb83(0x30e));_0x43bc00=new _0x5cbc07(_0x3c612b,{'engines':![],'processors':![],'compaction':![],'auth':{'open':!![]},'processes':![]}),await _0x43bc00['open']();const _0x5a0927=setInterval(()=>{const _0x141c84=_0x2dfb83;if(_0x30f94e)return;for(const [,_0x59aa7]of _0x43bc00[_0x141c84(0x2c3)]){try{_0x59aa7[_0x141c84(0x339)]?.();}catch{}}},0xc8);if(typeof _0x5a0927[_0x2dfb83(0x225)]===_0x2dfb83(0x33c))_0x5a0927[_0x2dfb83(0x225)]();_0xf02078['on'](_0x2dfb83(0x222),_0x5f07aa=>{const _0x5cda20=_0x2dfb83;if(!_0x5f07aa||typeof _0x5f07aa!==_0x5cda20(0x37e))return;if(_0x5f07aa[_0x5cda20(0x1d9)]===_0x5cda20(0x331))return void _0x5ce8d9();if(_0x5f07aa[_0x5cda20(0x1d9)]===_0x5cda20(0x2f7)){_0x4ea910[_0x5cda20(0x2a3)](_0x5f07aa[_0x5cda20(0x307)])?.[_0x5cda20(0x37f)](new Error(_0x5cda20(0x327)));return;}_0x5f07aa[_0x5cda20(0x1d9)]===_0x5cda20(0x281)&&void _0x1204f6(_0x5f07aa['job']);});const _0x27b9be=Math[_0x2dfb83(0x34e)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x27fc4d=setInterval(()=>{const _0x3f7122=_0x2dfb83;try{_0x1012d1({'type':_0x3f7122(0x2e9),'heapUsed':_0x453d03[_0x3f7122(0x343)]()[_0x3f7122(0x246)]});}catch{}},_0x27b9be);if(typeof _0x27fc4d[_0x2dfb83(0x225)]===_0x2dfb83(0x33c))_0x27fc4d[_0x2dfb83(0x225)]();_0x1012d1({'type':_0x2dfb83(0x23f)});}return _0x36c08e()[_0xfa4001(0x2e4)](_0x10e31e=>{const _0x4ba998=_0xfa4001;_0x1012d1({'type':'fatal','error':_0xb6ffa1(_0x10e31e)}),process[_0x4ba998(0x290)](0x1);}),okdbFunctionsSandboxWorker$1;}var okdbFunctionsSandboxWorkerExports=requireOkdbFunctionsSandboxWorker(),okdbFunctionsSandboxWorker=getDefaultExportFromCjs(okdbFunctionsSandboxWorkerExports);module[_0x551940(0x1d5)]=okdbFunctionsSandboxWorker;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';const _0x2ee730=_0x302a;(function(_0x2b2da3,_0x43eeed){const _0x57079b=_0x302a,_0x45b680=_0x2b2da3();while(!![]){try{const _0x4296f3=parseInt(_0x57079b(0x16c))/0x1+-parseInt(_0x57079b(0x1cb))/0x2+-parseInt(_0x57079b(0x1f2))/0x3+parseInt(_0x57079b(0x14f))/0x4*(parseInt(_0x57079b(0x183))/0x5)+parseInt(_0x57079b(0xfc))/0x6+-parseInt(_0x57079b(0x222))/0x7+-parseInt(_0x57079b(0xbb))/0x8;if(_0x4296f3===_0x43eeed)break;else _0x45b680['push'](_0x45b680['shift']());}catch(_0x329e1d){_0x45b680['push'](_0x45b680['shift']());}}}(_0x4900,0x6c5ee));var require$$0$5=require('./okdb'),require$$1$1=require(_0x2ee730(0x265)),require$$1=require(_0x2ee730(0x2e4)),require$$0$3=require('os'),require$$2=require(_0x2ee730(0x107)),require$$0=require(_0x2ee730(0x269)),require$$0$2=require(_0x2ee730(0x271)),require$$0$1=require('fs'),require$$0$4=require(_0x2ee730(0xd4));function _0x302a(_0x4cb4a4,_0x23fc2e){_0x4cb4a4=_0x4cb4a4-0xac;const _0x490062=_0x4900();let _0x302a8b=_0x490062[_0x4cb4a4];return _0x302a8b;}function _0x4900(){const _0xe28a06=['epoch','external','instances','crypto','toISOString','ms\x20p99=','processor:ready','ms\x20busy=','dumpedAt','oldestPendingMs','trim','item:pending','_nodeDbCache','registerFts','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','_changefeed','detachConsole','publishOwnRow','_kind','getCmd','txn:start','_cmd','clearThreadStats','isHeld','mkdirSync','ensureType','_rawDb','_onItem','force','registry\x20heartbeat\x20skipped\x20(writer=','_onPoke','index:progress','null','_nodeDead','beforeWrite','ITEM_CREATE','reportThreadStats','okdb-writer:\x20env\x20closing\x20—\x20retry','isPrimary','drain','randomUUID','rows=','INDEX_REGISTERED','call','_onStop','_singletonLocks','extend','_durs','_instanceId','_supervisorKey','length','_singletonLock','\x20phase=','processingSig','_lastCpuPct','filter','fn-runner','nodesView','_wantDbHandle','_holderDead','_onTick','_ensureDesired','_assertUsable','~lock','object','\x20worker(s)\x20remaining','_outstanding','_lastCpuWindowMs','view','raw-remove','singletonClaims','some','keys','instanceId','allSettled','844ygmImh','execArgv','_buildChildRow','role','round','_writer','commitP99Ms','_processStartedAt','release','INDEX_RESET','_maybePublish','enable','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','\x20===','resetIndex','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','_wantDb','index:ready','_closed','processorId','_bpParkedTotal','closing','type:registered','_nodeDbFor','\x20times\x20in\x20','\x0a===\x20OKDB_DIAG\x20','procmodeack/','cursorKey','change','749119GYcHQu','stats','ESRCH','sort','race','recordWrite','getChanges','SWAP','\x20│\x20','ppid','ENV_CLOSING_RETRY','heartbeatMs','clearTtl','_activateProcesses','[okdb-cluster]\x20respawning\x20worker\x20slot=','from','version','process\x20','enabled','updateSupervisedChildStats','_enqueuedAt','supervisorKey','resetReadTxn','2005GYqUCt','events','ready','find','_key','shift','processor:paused','okdb-diag.','next','_report','ITEM_REMOVE','cpuUsage','ms\x20env=','_rootDb','_startedAt','claims','stopHeartbeat','entries','_quantum','isWorker','~processes','\x20while\x20this\x20process\x20runs\x20','okdb-writer[','system:clock_change','info','putNode','string','stderr','type','rss','putSync','schema:set','[okdb-cluster]\x20slot=','nodeKey','_selfKey','_refreshDesiredSnapshot','default','close','INDEX_READY','ingest','rowKey','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','push','getRange','[okdb-cluster]\x20','remove','options','meta','busy','_scheduleFlush','listenAddr','status','min','treeView','node/','_putRowSync','_buildProcessingFacet','deaths','transactionSync','floor','reject','now','user','online','none','embedded','setDesired','(worst\x20','_acquiredAt','CHANGEFEED_QUANTUM','stringify','_committed','524992QLItIq','_buckets','_participate','creating','hostname','_seen','standalone','processor:error','function','_enableChangelog','_statusEnv','startsWith','platform','ms\x20mean=','_drainOne','_lockDb','_dedupeKey','appendFileSync','memoryUsage','_listenAddr','disconnect','recent\x20writes\x20(newest\x20first)','_nodeDb','then','_putRowAsync','lifecycle','_nestedTotal','VIEW_PROGRESS','\x20\x20(no\x20env\x20draining)','_systemEnv','_hbTimer','_heartbeatTimer','emit','_groupByProcess','_draining','_lastCpuUsage','fromEntries','children','splice','81336EBfttr','processors','error','win32','listen','state','system:drain','index:drop','exports','running','percentile','item:remove','replace','add','closed','bumpCmd','_markSeen','schema:drop','process','SYSTEM_PROC','_desiredOverlay','_threadStats','slice','_db','uptime','startedAt','system:bus_state_change','ITEM_UPDATE','dropping','_isStale','listDesired','decommission','system','mode','setTtl','SIGKILL','resetting','_wantDbOf','_adoptPeerIndexes','getClock','host','building','reset','cli','_handlePending','bus:drain','stopping','updatedAt','3352265MwukRz','register','_flushDebounce','prototype','values','cluster-wide','_pendingLocal','procmode/','FTS_DROP','ttl:expired','registerType','REMOVE','\x20sync','\x20drainAge=','__okdbSlot','processor:retry','_sandbox','ttl:set','_transactionOnce','starting','assign','removeSync','_highWater','_servingEngines','send','writerStatus','abs','resolve','_heartbeatInFlight','sync:apply',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','namespace','stopped','note','log','_children','created','signalWant','ephemeral','_onProcEvent','max','number',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','_started','_collectWriterFacet','isConnected','error:\x20','fork','size','data','maxMs','--watch','\x20died\x20','_admissionTimer','heldBy','indexOf','FTS_REGISTERED','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','split','bus:proc','_role','dropIndex','processor:resumed','join','_lock','_held','inst:','cluster','ref:violation_resolved','registerIndex','childTransaction','node:perf_hooks','_flushTimer','count','entry','loop-lag','kind','license:invalid','afterWrite','perf_hooks','stop','[okdb-cluster]\x20worker\x20pid=','cpuWindowMs','put','listening','_timer','SYSTEM_STOPPED','map','_caps','_inflight','primary','_dedupeMax','fts:drop','http-server','registry\x20publish\x20failing:\x20','system:proc','off','parkedNow','processing','_isWriter','code','async','system:poke','includes','cpuPct','\x20\x20#','holder','sandbox','flushed','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_versionSkewWarned','1ofN:','write','openDB','_clusterWorkerAttached','okdb','expiresAt','_handleInProcess','bus:poke','_released','\x20parkedNow=','_baselines','_rowKey','_pending','_publishNow','compaction','processes','heapUsed','_startHeartbeat','dedupeMax','fanout','attach','paused','system:ready','participate','__okdbCluster','_log','_ownMeta','workers','value','_envs','isActive','_buildOwnRow','catch','attachFeed','exit','unref','clusterStatusView','admitted','_sampleOwnStats','hasDesired','FTS_RESET','transaction','set','noteListenAddr','cpus','\x20ipc\x20error:\x20','--test','_removeRowAsync','__vocab/version','license:added','selfKey','_desired','warn','committed','message','uncaughtException','commitsPerSec','INDEX_SET_CHANGED','env','maxExtra','\x20forked\x20','kill','listNodes','registry-publish','license:activated','ttlMs','_isReader','reap','_nestedWarned','draining',');\x20','env:removed','single','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','fast','list','getDesired','processKey','_publishFailWarned','_windowCbs','respawnTimer','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','once','path','ms\x20activeWriters=','node','system:env_release','field:resolver_registered','_openEnvLazy','isDead','offWindow','http','engines','caps','pushEphemeral','mean','decommissioning','\x20@\x20','event','\x20pid=','_lastPublishAt','--inspect','inspect','connected','consecutiveFailures','stack','_drain','inflightAgesMs','_coordinator','366008DlPEkL','threads','removeNode','dropSchema','fts:registered','dead','setOwnMeta','_clusterOnMessage','repeat','~processes:cmd','has','\x0a\x20\x20\x20\x20\x20\x20','\x20\x20env=','start','envsOpen','worker','\x20writer{depth=','okdb-lock:\x20env\x20closed','loop-lag\x20','\x20(durable\x20desired-state)','_handlePoke','compact','toFixed','hasOwnProperty','delete','node:events','processor','\x20in\x20','sync','\x20worker(s)\x20still\x20serving','ms\x20on\x20env=','level','_admissionStarted','depth','SYSTEM_POKE','load','_heldTotal','pid','heapTotal','workersConfigured','index:registered','all','ms/','_bpWaiters','_startAdmission','started','_onPending','publishChildRow','acquiredAt','\x20—\x20','msg','resetFts','ms\x20(attempt\x20','--print','clear','get','_adminRelay','_collectSingletonClaims','slot','prependListener','claimGated','_done','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','bus:env_release','isEnabled','2546460UxRzIe','unique:violation_resolved','_lastCpuAt','(code=','license:removed',',\x20signal=','.log','_cursors'];_0x4900=function(){return _0xe28a06;};return _0x4900();}function getDefaultExportFromCjs(_0x326220){const _0x5bd55a=_0x2ee730;return _0x326220&&_0x326220['__esModule']&&Object[_0x5bd55a(0x225)][_0x5bd55a(0xd2)][_0x5bd55a(0x12f)](_0x326220,'default')?_0x326220[_0x5bd55a(0x1a7)]:_0x326220;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x36b714=_0x2ee730;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0xc2b2a0={'PUT':_0x36b714(0x275),'REMOVE':_0x36b714(0x1b0),'INDEX_DROP':_0x36b714(0x25f),'INDEX_REGISTER':_0x36b714(0x267),'INDEX_RESET':_0x36b714(0x15d),'TYPE_REGISTER':_0x36b714(0x22c),'TYPE_DROP':'dropType','FTS_REGISTER':_0x36b714(0x111),'FTS_DROP':'dropFts','FTS_RESET':_0x36b714(0xee),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x36b714(0xbe),'TTL_SET':_0x36b714(0x214),'TTL_CLEAR':_0x36b714(0x178)},_0x11ba85={'SYSTEM_READY':_0x36b714(0x2a7),'FIELD_RESOLVER_REGISTERED':_0x36b714(0x2e8),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x36b714(0x19a),'SYSTEM_POKE':_0x36b714(0x288),'SYSTEM_DRAIN':_0x36b714(0x1f8),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x36b714(0x281),'SYSTEM_BUS_STATE_CHANGE':_0x36b714(0x20c),'ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x36b714(0x1fd),'ITEM_PENDING':_0x36b714(0x10f),'INDEX_RESET':'index:reset','INDEX_READY':_0x36b714(0x160),'INDEX_PROGRESS':_0x36b714(0x123),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x36b714(0x1f9),'INDEX_REGISTERED':_0x36b714(0xe3),'FTS_REGISTERED':_0x36b714(0xbf),'FTS_DROP':_0x36b714(0x27e),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x36b714(0x1a2),'SCHEMA_DROP':_0x36b714(0x203),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x36b714(0xfd),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x36b714(0x266),'SYNC_APPLY':_0x36b714(0x23f),'TXN_START':_0x36b714(0x118),'TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x36b714(0x165),'TYPE_DROP':'type:drop','ENV_OPENED':'env:opened','ENV_REMOVED':_0x36b714(0x2d8),'SYSTEM_ENV_RELEASE':_0x36b714(0x2e7),'TTL_EXPIRED':_0x36b714(0x22b),'TTL_SET':_0x36b714(0x233),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x36b714(0x26f),'LICENSE_ADDED':_0x36b714(0x2c2),'LICENSE_ACTIVATED':_0x36b714(0x2d1),'LICENSE_REMOVED':_0x36b714(0x100)},_0x219d99={'CREATING':_0x36b714(0x1ce),'RESETTING':_0x36b714(0x216),'READY':_0x36b714(0x185),'DROPPING':_0x36b714(0x20e),'WAITING':'waiting','ERROR':_0x36b714(0x1f4)},_0x3c0950={'CREATED':_0x36b714(0x246),'STARTING':_0x36b714(0x235),'STARTED':_0x36b714(0xe8),'STOPPING':_0x36b714(0x220),'STOPPED':_0x36b714(0x242)},_0x320b66={'CREATING':_0x36b714(0x1ce),'READY':_0x36b714(0x185),'HALTED':'halted','STOPPED':_0x36b714(0x242),'RESETTING':_0x36b714(0x216)},_0x298f8a=Object['freeze']({'POKE':_0x36b714(0x298),'DRAIN':_0x36b714(0x21f),'TYPE_DROP':'bus:type_drop','PROC':_0x36b714(0x25d),'ENV_RELEASE':_0x36b714(0xfa)});return okdbEnums={'BUS_EVENTS':_0x298f8a,'CHANGE_ACTIONS':_0xc2b2a0,'EVENTS':_0x11ba85,'INDEX_STATE':_0x219d99,'OKDB_STATE':_0x3c0950,'VIEW_STATE':_0x320b66},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x43733e=_0x2ee730;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x2d9164,performance:_0x17e75b}=require$$0,_0x14c706=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x33536a=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x3e1dc5=process.env.OKDB_LOOP_LAG_ALL==='1',_0x4c446e=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x18b744{constructor(){const _0x1a8737=_0x302a;this[_0x1a8737(0x17e)]=_0x14c706,this[_0x1a8737(0x1cc)]=new Map(),this['_h']=null,this[_0x1a8737(0x277)]=null,this[_0x1a8737(0x24d)]=![],this[_0x1a8737(0x2aa)]=(_0x2c915e,_0x4e5ce6)=>process[_0x1a8737(0x19e)][_0x1a8737(0x292)](_0x2c915e+(_0x4e5ce6?'\x20'+JSON[_0x1a8737(0x1c9)](_0x4e5ce6):'')+'\x0a');}['now'](){const _0x2e8090=_0x302a;return _0x17e75b[_0x2e8090(0x1c0)]();}['setLogger'](_0xf56bf8){const _0x171ffa=_0x302a;if(typeof _0xf56bf8==='function')this[_0x171ffa(0x2aa)]=_0xf56bf8;}['note'](_0x2b1337,_0xa7e578,_0x2267a4){const _0x26cbb4=_0x302a;if(!this['enabled'])return;let _0x3b0bef=this[_0x26cbb4(0x1cc)][_0x26cbb4(0xf2)](_0x2b1337);!_0x3b0bef&&(_0x3b0bef={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x26cbb4(0x1cc)][_0x26cbb4(0x2bb)](_0x2b1337,_0x3b0bef)),_0x3b0bef['ms']+=_0xa7e578,_0x3b0bef[_0x26cbb4(0x26b)]+=0x1,_0xa7e578>_0x3b0bef[_0x26cbb4(0x254)]&&(_0x3b0bef[_0x26cbb4(0x254)]=_0xa7e578,_0x3b0bef[_0x26cbb4(0x2cc)]=_0x2267a4||'');}[_0x43733e(0xc8)](_0xbb6e3c){const _0x4fde65=_0x43733e;if(!this[_0x4fde65(0x17e)]||this[_0x4fde65(0x24d)])return;this[_0x4fde65(0x24d)]=!![];if(_0xbb6e3c)this[_0x4fde65(0x2aa)]=_0xbb6e3c;this['_h']=_0x2d9164({'resolution':0xa}),this['_h'][_0x4fde65(0x15a)](),this['_timer']=setInterval(()=>this['_report'](),_0x33536a);if(this['_timer'][_0x4fde65(0x2b4)])this[_0x4fde65(0x277)]['unref']();}['onWindow'](_0x51f249){const _0x4c37b3=_0x43733e;if(!this[_0x4c37b3(0x2e0)])this[_0x4c37b3(0x2e0)]=new Set();this[_0x4c37b3(0x2e0)][_0x4c37b3(0x1ff)](_0x51f249);if(!this[_0x4c37b3(0x24d)])this[_0x4c37b3(0xe7)]();}[_0x43733e(0x2eb)](_0x15e42a){const _0x8e73f9=_0x43733e;this[_0x8e73f9(0x2e0)]?.['delete'](_0x15e42a);}[_0x43733e(0xe7)](){const _0xc39272=_0x43733e;if(this['_admissionStarted'])return;this[_0xc39272(0xdb)]=!![];!this['_h']&&(this['_h']=_0x2d9164({'resolution':0xa}),this['_h']['enable']());const _0x263b57=_0x33536a;this[_0xc39272(0x257)]=setInterval(()=>{const _0x2ba9e1=_0xc39272,_0x4bbffc=this['_h'];if(!_0x4bbffc)return;const _0x10ee84=_0x4bbffc[_0x2ba9e1(0x1fc)](0x63)/0xf4240,_0x1dc667=_0x4bbffc[_0x2ba9e1(0x24a)]/0xf4240,_0x31a79d=_0x4bbffc[_0x2ba9e1(0xad)]/0xf4240;_0x4bbffc[_0x2ba9e1(0x21c)]();if(this[_0x2ba9e1(0x2e0)])for(const _0x506645 of this[_0x2ba9e1(0x2e0)]){try{_0x506645({'p99Ms':_0x10ee84,'maxMs':_0x1dc667,'meanMs':_0x31a79d,'reportMs':_0x263b57});}catch{}}},_0x263b57);if(this[_0xc39272(0x257)][_0xc39272(0x2b4)])this[_0xc39272(0x257)][_0xc39272(0x2b4)]();}[_0x43733e(0x18c)](){const _0x125a03=_0x43733e,_0x1507c1=this['_h'],_0x106fc6=_0x1507c1['max']/0xf4240,_0x128893=_0x1507c1[_0x125a03(0x1fc)](0x63)/0xf4240,_0x25659e=_0x1507c1[_0x125a03(0xad)]/0xf4240;_0x1507c1[_0x125a03(0x21c)]();const _0x569834=[...this[_0x125a03(0x1cc)][_0x125a03(0x194)]()]['map'](([_0x49ba21,_0x548522])=>({'label':_0x49ba21,..._0x548522}))['sort']((_0x4d70e1,_0x24f462)=>_0x24f462['ms']-_0x4d70e1['ms'])['slice'](0x0,0x8);this['_buckets']['clear']();const _0x54a56c=_0x569834['reduce']((_0x31661d,_0x2f2934)=>_0x31661d+_0x2f2934['ms'],0x0),_0x5ec00c=_0x569834[_0x125a03(0x279)](_0x44752f=>_0x44752f['label']+'='+_0x44752f['ms']['toFixed'](0x0)+_0x125a03(0xe5)+_0x44752f[_0x125a03(0x26b)]+(_0x44752f[_0x125a03(0x254)]>0x5?_0x125a03(0x1c6)+_0x44752f[_0x125a03(0x254)][_0x125a03(0xd1)](0x0)+'ms'+(_0x44752f['maxExtra']?'\x20'+_0x44752f['maxExtra']:'')+')':''));(_0x3e1dc5||_0x106fc6>=_0x4c446e)&&this[_0x125a03(0x2aa)](_0x125a03(0xcd)+_0x33536a+'ms\x20max='+_0x106fc6[_0x125a03(0xd1)](0x0)+_0x125a03(0x109)+_0x128893['toFixed'](0x0)+_0x125a03(0x1d8)+_0x25659e['toFixed'](0x0)+_0x125a03(0x10b)+_0x54a56c[_0x125a03(0xd1)](0x0)+'ms'+(_0x5ec00c['length']?_0x125a03(0x174)+_0x5ec00c['join']('\x20\x20'):''),{'feature':_0x125a03(0x26d)});if(this[_0x125a03(0x2e0)])for(const _0x213877 of this[_0x125a03(0x2e0)]){try{_0x213877({'p99Ms':_0x128893,'maxMs':_0x106fc6,'meanMs':_0x25659e,'reportMs':_0x33536a});}catch{}}}[_0x43733e(0x272)](){const _0x10ae48=_0x43733e;if(this[_0x10ae48(0x277)])clearInterval(this['_timer']);if(this['_h'])this['_h']['disable']();this[_0x10ae48(0x277)]=null,this['_h']=null,this['_started']=![];}}const _0x5b3012=new _0x18b744();if(_0x5b3012[_0x43733e(0x17e)])_0x5b3012[_0x43733e(0xc8)]();return okdbLoopMonitor={'LOOP':_0x5b3012},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x39aa87=0x2**0x1f-0x1;function _0x2d33f9(_0x3e9989){if(!(_0x3e9989>0x0))return 0x0;return _0x3e9989>_0x39aa87?_0x39aa87:_0x3e9989;}function _0x38b4a9(_0x49869a){return _0x49869a===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x39aa87,'clampTimerDelay':_0x2d33f9,'isNeverDelay':_0x38b4a9},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x1823e2=require$$0$1,_0x477dfb=require$$1;let _0xab9608,_0x37a234,_0x54a3be,_0x1a7505,_0x27787a,_0x1e87fd,_0x1a0afe,_0x165fbf=![];const _0x188677=new Set();let _0x107dad=null;const _0x59f596=new Map();function _0x2ffb54(){const _0x2dbe47=_0x302a;if(_0xab9608!==undefined)return _0xab9608;_0xab9608=process.env.OKDB_DIAG==='1';if(!_0xab9608)return![];_0x37a234=process.env.OKDB_DIAG_STACK==='1',_0x1a7505=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x54a3be=new Array(_0x1a7505),_0x27787a=0x0,_0x1e87fd=0x0,_0x1a0afe=process.env.OKDB_DIAG_DIR||null;if(_0x1a0afe)try{_0x1823e2[_0x2dbe47(0x11c)](_0x1a0afe,{'recursive':!![]});}catch{}return!![];}function _0xb9d7c0(){return _0xab9608===undefined?_0x2ffb54():_0xab9608;}function _0x1c8c5d(_0x3fe70d,_0x27d16d){const _0x55f919=_0x302a;if(_0xab9608===undefined?!_0x2ffb54():!_0xab9608)return;let _0xca30b0;if(_0x37a234){const _0xe34958=new Error()['stack']||'';_0xca30b0=_0xe34958[_0x55f919(0x25c)]('\x0a')['slice'](0x3)[_0x55f919(0x279)](_0x16ab08=>_0x16ab08[_0x55f919(0x10e)]())['filter'](Boolean)[_0x55f919(0x208)](0x0,0x8);}_0x54a3be[_0x27787a]={'seq':_0x1e87fd++,'t':Date[_0x55f919(0x1c0)](),'env':_0x3fe70d,'kind':_0x27d16d||'commit','stack':_0xca30b0},_0x27787a=(_0x27787a+0x1)%_0x1a7505;}function _0x4a3e8f(_0x45bd65){const _0x270cf7=_0x302a,_0x329df2=[];for(let _0x7e9f0e=0x0;_0x7e9f0e<_0x1a7505;_0x7e9f0e++){const _0x7e053f=_0x54a3be[(_0x27787a-0x1-_0x7e9f0e+_0x1a7505*0x2)%_0x1a7505];if(!_0x7e053f)continue;_0x329df2[_0x270cf7(0x1ad)](_0x7e053f);if(_0x329df2['length']>=_0x45bd65)break;}return _0x329df2;}function _0x50f8b5(_0x1742c5){const _0x2324ec=_0x302a;try{process[_0x2324ec(0x19e)]['write'](_0x1742c5+'\x0a');}catch{}if(_0x1a0afe)try{_0x1823e2[_0x2324ec(0x1dc)](_0x477dfb[_0x2324ec(0x261)](_0x1a0afe,_0x2324ec(0x18a)+process[_0x2324ec(0xe0)]+_0x2324ec(0x102)),_0x1742c5+'\x0a');}catch{}}function _0x26053c(_0x500deb){const _0x594209=_0x302a,_0x5daf25=_0x4a3e8f(_0x500deb);if(!_0x5daf25[_0x594209(0x136)])return _0x594209(0x1ac);const _0x274724=Date[_0x594209(0x1c0)]();return _0x5daf25[_0x594209(0x279)](_0x4c2cb9=>{const _0xe64326=_0x594209,_0x5997e2=_0xe64326(0x28b)+_0x4c2cb9['seq']+'\x20-'+(_0x274724-_0x4c2cb9['t'])+_0xe64326(0x18f)+_0x4c2cb9[_0xe64326(0x2cb)]+'\x20'+_0x4c2cb9[_0xe64326(0x26e)];return _0x4c2cb9['stack']&&_0x4c2cb9[_0xe64326(0xb7)][_0xe64326(0x136)]?_0x5997e2+'\x0a\x20\x20\x20\x20\x20\x20'+_0x4c2cb9[_0xe64326(0xb7)][_0xe64326(0x261)](_0xe64326(0xc6)):_0x5997e2;})['join']('\x0a');}function _0x4838d6(_0x4a9188,_0x1aa2ad){const _0x4e9c22=_0x302a,_0x5e522f=_0x4e9c22(0x168)+_0x4a9188+_0x4e9c22(0xaf)+new Date()[_0x4e9c22(0x108)]()+_0x4e9c22(0xb1)+process[_0x4e9c22(0xe0)]+'\x20===',_0x2b1d44=[_0x5e522f,_0x4e9c22(0x250)+(_0x1aa2ad&&_0x1aa2ad['stack']?_0x1aa2ad[_0x4e9c22(0xb7)]['split']('\x0a')[0x0]:_0x1aa2ad),_0x4e9c22(0x1e0)+(_0x37a234?'':_0x4e9c22(0x15b))+':',_0x26053c(0x18),_0x23c0fc(),'='['repeat'](_0x5e522f[_0x4e9c22(0x136)]-0x1)];_0x50f8b5(_0x2b1d44[_0x4e9c22(0x261)]('\x0a'));}function _0x32ea44(_0x4e7608){const _0x3b3769=_0x302a;if(!_0xb9d7c0())return;const _0x4a6a81=String(_0x4e7608&&_0x4e7608[_0x3b3769(0x2c7)]||_0x4e7608||''),_0x3e3edc=/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x4a6a81);_0x4838d6(_0x3e3edc?'ORPHAN\x20(env-closed\x20write)':_0x3b3769(0x2c8),_0x4e7608);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x3e3edc)return;try{console[_0x3b3769(0x1f4)](_0x4e7608&&_0x4e7608[_0x3b3769(0xb7)]?_0x4e7608[_0x3b3769(0xb7)]:_0x4e7608);}catch{}process[_0x3b3769(0x2b3)](0x1);}function _0x143ade(_0x1ecc1c){const _0x5386ba=_0x302a;if(!_0xb9d7c0())return;const _0x1af2ee=String(_0x1ecc1c&&_0x1ecc1c[_0x5386ba(0x2c7)]||_0x1ecc1c||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x1af2ee)&&_0x4838d6(_0x5386ba(0x28f),_0x1ecc1c);}function _0x23c0fc(){const _0x259ad5=_0x302a,_0x466531=[_0x259ad5(0x2da)];let _0x20da5b=![];for(const _0xb449ab of _0x188677){const _0x254d7c=_0xb449ab&&_0xb449ab[_0x259ad5(0x2ae)];if(!_0x254d7c)continue;for(const [_0x459253,_0xd12d32]of _0x254d7c){const _0x5739dc=_0xd12d32&&_0xd12d32['_coordinator']&&_0xd12d32['_coordinator'][_0x259ad5(0x148)];if(!_0x5739dc)continue;let _0x292bb2,_0x24eb90;try{_0x292bb2=Atomics[_0x259ad5(0xde)](_0x5739dc,0x0),_0x24eb90=Atomics[_0x259ad5(0xde)](_0x5739dc,0x1);}catch{continue;}if(_0x292bb2===0x0)continue;_0x20da5b=!![];const _0x39f638=_0x292bb2>0x0?_0x259ad5(0x173):'copy',_0x52825c=Date[_0x259ad5(0x1c0)]()-Math[_0x259ad5(0x23c)](_0x292bb2)*0x3e8,_0x30cc30=((()=>{const _0x56fe84=_0x259ad5;try{return _0xd12d32[_0x56fe84(0x154)]&&_0xd12d32[_0x56fe84(0x154)][_0x56fe84(0x1b6)]?_0xd12d32[_0x56fe84(0x154)][_0x56fe84(0x1b6)]():null;}catch{return null;}})());_0x466531[_0x259ad5(0x1ad)](_0x259ad5(0xc7)+_0x459253+_0x259ad5(0x138)+_0x39f638+_0x259ad5(0x22f)+_0x52825c+_0x259ad5(0x2e5)+_0x24eb90+(_0x30cc30?_0x259ad5(0xcb)+_0x30cc30[_0x259ad5(0xdc)]+'\x20oldestPendingMs='+_0x30cc30[_0x259ad5(0x10d)]+_0x259ad5(0x29a)+_0x30cc30[_0x259ad5(0x283)]+'}':''));}}if(!_0x20da5b)_0x466531[_0x259ad5(0x1ad)](_0x259ad5(0x1e7));return _0x466531[_0x259ad5(0x261)]('\x0a');}function _0x382ef8(){const _0x43cf1f=_0x302a;if(!_0xb9d7c0())return;const _0x550e47=Math[_0x43cf1f(0x24a)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x23086a=Date['now']();for(const _0x30c023 of _0x188677){const _0x2dc33f=_0x30c023&&_0x30c023['_envs'];if(!_0x2dc33f)continue;for(const [_0x29e63c,_0x2a3027]of _0x2dc33f){const _0x4156a7=_0x2a3027&&_0x2a3027[_0x43cf1f(0xba)]&&_0x2a3027[_0x43cf1f(0xba)][_0x43cf1f(0x148)];if(!_0x4156a7)continue;let _0x33b245;try{_0x33b245=Atomics[_0x43cf1f(0xde)](_0x4156a7,0x0);}catch{continue;}const _0x204366=_0x30c023[_0x43cf1f(0x2e4)]+'|'+_0x29e63c;if(_0x33b245<=0x0){_0x59f596[_0x43cf1f(0xd3)](_0x204366);continue;}const _0xd0b29=_0x23086a-_0x33b245*0x3e8,_0x34fca9=_0x59f596[_0x43cf1f(0xf2)](_0x204366);if(_0xd0b29<_0x550e47)continue;if(_0x34fca9&&_0x23086a-_0x34fca9[_0x43cf1f(0x10c)]<_0x550e47)continue;_0x59f596[_0x43cf1f(0x2bb)](_0x204366,{'firstTs':_0x34fca9?_0x34fca9['firstTs']:_0x33b245,'dumpedAt':_0x23086a});const _0x518afc='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0xd0b29+_0x43cf1f(0xd9)+_0x29e63c+_0x43cf1f(0xaf)+new Date()[_0x43cf1f(0x108)]()+'\x20pid='+process[_0x43cf1f(0xe0)]+_0x43cf1f(0x15c);_0x50f8b5([_0x518afc,_0x23c0fc(),'='[_0x43cf1f(0xc3)](_0x518afc[_0x43cf1f(0x136)]-0x1)][_0x43cf1f(0x261)]('\x0a'));}}}function _0x495d90(){const _0xe7ba1c=_0x302a;if(!_0xb9d7c0()||_0x165fbf)return;_0x165fbf=!![],process[_0xe7ba1c(0xf6)](_0xe7ba1c(0x2c8),_0x32ea44),process[_0xe7ba1c(0xf6)]('unhandledRejection',_0x143ade);const _0x2e876a=Math[_0xe7ba1c(0x24a)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x107dad=setInterval(_0x382ef8,_0x2e876a);if(_0x107dad[_0xe7ba1c(0x2b4)])_0x107dad['unref']();}function _0x7cc3c0(_0x55a122){const _0x11f82c=_0x302a;if(!_0xb9d7c0()||!_0x55a122)return;_0x188677[_0x11f82c(0x1ff)](_0x55a122),_0x495d90();}function _0xa57e6b(_0x2fd108){const _0x539064=_0x302a;_0x188677[_0x539064(0xd3)](_0x2fd108);}function _0x4a005e(){if(!_0xb9d7c0())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x37a234,'recentWrites':_0x4a3e8f(0x10),'drain':_0x23c0fc()};}return okdbDiag={'isEnabled':_0xb9d7c0,'recordWrite':_0x1c8c5d,'installDiag':_0x495d90,'registerOkdb':_0x7cc3c0,'unregisterOkdb':_0xa57e6b,'snapshot':_0x4a005e},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0xc70012=_0x2ee730;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0xeab2d3}=require$$0$2,_0x29b108=requireOkdbDiag(),_0x2b1a30=process.env.OKDB_COMMIT_MODE===_0xc70012(0xd7);class _0x2f64d8{constructor(_0x2302a8){const _0x3d3e53=_0xc70012;this[_0x3d3e53(0x2cb)]=_0x2302a8,this[_0x3d3e53(0x27b)]=new Set(),this[_0x3d3e53(0x180)]=new Map(),this[_0x3d3e53(0x1ca)]=0x0,this[_0x3d3e53(0x133)]=[],this[_0x3d3e53(0xf8)]=[],this['_highWater']=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this['_bpWaiters']=[],this[_0x3d3e53(0x163)]=0x0,this['_held']=null,this[_0x3d3e53(0xdf)]=0x0,this[_0x3d3e53(0x1e5)]=0x0,this[_0x3d3e53(0x2d5)]=![];}async[_0xc70012(0x2ba)](_0x2e5ca0,_0x37a0da,_0x20b977={}){const _0x43c062=_0xc70012;for(let _0x4d2548=0x1;;_0x4d2548++){try{return await this[_0x43c062(0x234)](_0x2e5ca0,_0x37a0da,_0x20b977);}catch(_0x3db6){if(_0x3db6?.[_0x43c062(0x286)]!==_0x43c062(0x2ca)||_0x20b977[_0x43c062(0x2b6)]||_0x4d2548>=0x5)throw _0x3db6;this[_0x43c062(0x2cb)][_0x43c062(0x218)](_0x3db6['indexType']);}}}async[_0xc70012(0x234)](_0x266403,_0x54afd9,{admitted:admitted=![]}={}){const _0x355410=_0xc70012;if(_0x29b108[_0x355410(0xfb)]())_0x29b108[_0x355410(0x171)](this[_0x355410(0x2cb)]?.['name'],_0x54afd9);if(this['_closed']){const _0x21fd32=new Error(_0x355410(0x129));_0x21fd32['code']=_0x355410(0x176);throw _0x21fd32;}if(this[_0x355410(0x238)]>0x0){let _0x45c13b=![];while(this['_outstanding']>=this[_0x355410(0x238)]&&!this[_0x355410(0x161)]){!_0x45c13b&&(_0x45c13b=!![],this[_0x355410(0x163)]++),await new Promise(_0x7c5939=>this['_bpWaiters']['push'](_0x7c5939));}if(this[_0x355410(0x161)]){const _0x250d02=new Error(_0x355410(0x129));_0x250d02[_0x355410(0x286)]='ENV_CLOSING_RETRY';throw _0x250d02;}}this[_0x355410(0x146)]++;const _0x358e8c=admitted?null:this[_0x355410(0x2cb)][_0x355410(0xba)];for(;;){while(this['_held'])await this['_held'];if(_0x358e8c)try{await _0x358e8c[_0x355410(0x126)]();}catch(_0x477326){this['_outstanding']--;if(this[_0x355410(0xe6)]['length']&&this['_outstanding']<this['_highWater'])this[_0x355410(0xe6)][_0x355410(0x188)]()();throw _0x477326;}if(!this[_0x355410(0x263)])break;if(_0x358e8c)_0x358e8c[_0x355410(0x270)]();}if(this[_0x355410(0x161)]){if(_0x358e8c)_0x358e8c['afterWrite']();this['_outstanding']--;if(this[_0x355410(0xe6)]['length']&&this['_outstanding']<this['_highWater'])this[_0x355410(0xe6)][_0x355410(0x188)]()();const _0x5aeadb=new Error(_0x355410(0x129));_0x5aeadb[_0x355410(0x286)]=_0x355410(0x176);throw _0x5aeadb;}const _0x164fab=_0xeab2d3['now']();if(_0x2b1a30)try{const _0x85235d=this['env']['db'][_0x355410(0x1bd)](_0x266403);this[_0x355410(0x1ca)]++;if(this[_0x355410(0x133)][_0x355410(0x1ad)](_0xeab2d3[_0x355410(0x1c0)]()-_0x164fab)>0x100)this[_0x355410(0x133)][_0x355410(0x188)]();if(this['_done'][_0x355410(0x1ad)](_0xeab2d3['now']())>0x800)this['_done'][_0x355410(0x188)]();return _0x85235d;}finally{this[_0x355410(0x146)]--;if(this['_bpWaiters'][_0x355410(0x136)]&&this[_0x355410(0x146)]<this[_0x355410(0x238)])this[_0x355410(0xe6)]['shift']()();if(_0x358e8c)_0x358e8c['afterWrite']();}let _0x35309f=null;const _0x111f63=()=>{const _0x398e87=_0x355410,_0x2d772b=_0x266403();if(_0x2d772b&&typeof _0x2d772b[_0x398e87(0x1e2)]===_0x398e87(0x1d3)&&!_0x35309f){this[_0x398e87(0xdf)]++;let _0x4cf521;const _0x50525f=new Promise(_0x1c8e4e=>_0x4cf521=_0x1c8e4e);this[_0x398e87(0x263)]=_0x50525f,_0x35309f=()=>{const _0x349d77=_0x398e87;if(this[_0x349d77(0x263)]===_0x50525f)this[_0x349d77(0x263)]=null;_0x4cf521();};}return _0x2d772b;};let _0x236e5e;try{_0x236e5e=this[_0x355410(0x2cb)]['db'][_0x355410(0x268)](_0x111f63);}catch(_0x465872){_0x236e5e=Promise[_0x355410(0x1bf)](_0x465872);}(!_0x236e5e||typeof _0x236e5e[_0x355410(0x1e2)]!=='function')&&(this[_0x355410(0x1e5)]++,!this['_nestedWarned']&&(this[_0x355410(0x2d5)]=!![],console[_0x355410(0x2c5)](_0x355410(0x199)+(this['env']?.['name']??'?')+_0x355410(0x24c))),_0x236e5e=Promise[_0x355410(0x23d)](_0x236e5e));const _0x5c375c=()=>{if(_0x35309f)_0x35309f();};_0x236e5e[_0x355410(0x1e2)](_0x5c375c,_0x5c375c),this['_inflight'][_0x355410(0x1ff)](_0x236e5e),this['_enqueuedAt'][_0x355410(0x2bb)](_0x236e5e,_0x164fab);const _0x5bd24c=()=>{const _0x5d4e3e=_0x355410;this[_0x5d4e3e(0x27b)]['delete'](_0x236e5e),this[_0x5d4e3e(0x180)][_0x5d4e3e(0xd3)](_0x236e5e),this[_0x5d4e3e(0x1ca)]++,this[_0x5d4e3e(0x146)]--;this[_0x5d4e3e(0xe6)][_0x5d4e3e(0x136)]&&this[_0x5d4e3e(0x146)]<this['_highWater']&&this['_bpWaiters'][_0x5d4e3e(0x188)]()();if(this['_durs'][_0x5d4e3e(0x1ad)](_0xeab2d3[_0x5d4e3e(0x1c0)]()-_0x164fab)>0x100)this[_0x5d4e3e(0x133)][_0x5d4e3e(0x188)]();if(this[_0x5d4e3e(0xf8)][_0x5d4e3e(0x1ad)](_0xeab2d3[_0x5d4e3e(0x1c0)]())>0x800)this[_0x5d4e3e(0xf8)][_0x5d4e3e(0x188)]();};_0x236e5e[_0x355410(0x1e2)](_0x5bd24c,_0x5bd24c);try{return await _0x236e5e;}finally{if(_0x358e8c)_0x358e8c[_0x355410(0x270)]();}}[_0xc70012(0x1b6)](){const _0x51d022=_0xc70012,_0xcf67cb=_0xeab2d3[_0x51d022(0x1c0)]();let _0x33a118=0x0;for(const _0x5e38f1 of this['_enqueuedAt'][_0x51d022(0x226)]()){const _0x1fdff4=_0xcf67cb-_0x5e38f1;if(_0x1fdff4>_0x33a118)_0x33a118=_0x1fdff4;}let _0x38aa88=0x0;for(let _0x11bc46=this[_0x51d022(0xf8)][_0x51d022(0x136)]-0x1;_0x11bc46>=0x0;_0x11bc46--){if(_0xcf67cb-this[_0x51d022(0xf8)][_0x11bc46]>0x3e8)break;_0x38aa88++;}let _0xfe5ca7=0x0;if(this[_0x51d022(0x133)][_0x51d022(0x136)]){const _0x4eca0d=[...this['_durs']]['sort']((_0x509387,_0x5f5718)=>_0x509387-_0x5f5718);_0xfe5ca7=_0x4eca0d[Math[_0x51d022(0x1b7)](_0x4eca0d[_0x51d022(0x136)]-0x1,Math['floor'](_0x4eca0d[_0x51d022(0x136)]*0.99))];}return{'depth':this['_inflight'][_0x51d022(0x252)],'oldestPendingMs':Math[_0x51d022(0x153)](_0x33a118),'committed':this['_committed'],'commitsPerSec':_0x38aa88,'commitP99Ms':Math[_0x51d022(0x153)](_0xfe5ca7),'parkedNow':this[_0x51d022(0xe6)][_0x51d022(0x136)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x51d022(0x238)]};}[_0xc70012(0xb9)](){const _0x27eb49=_0xc70012,_0xed8b3e=_0xeab2d3[_0x27eb49(0x1c0)]();return[...this[_0x27eb49(0x180)][_0x27eb49(0x226)]()][_0x27eb49(0x279)](_0x2bc187=>Math[_0x27eb49(0x153)](_0xed8b3e-_0x2bc187))[_0x27eb49(0x16f)]((_0x535048,_0x52aed4)=>_0x52aed4-_0x535048);}['markClosed'](){const _0x28ec90=_0xc70012;this[_0x28ec90(0x161)]=!![];for(const _0x3d8eb7 of this[_0x28ec90(0xe6)][_0x28ec90(0x1f1)](0x0))_0x3d8eb7();}async[_0xc70012(0x12b)](){const _0xc1939c=_0xc70012;let _0x47a437=0x0;while(this['_inflight'][_0xc1939c(0x252)]&&_0x47a437++<0x3e8){await Promise[_0xc1939c(0x14e)]([...this[_0xc1939c(0x27b)]]);}}async[_0xc70012(0x275)](_0x31ee7d,_0x3d7f56,_0xcec828,_0x75bc14){const _0x15c3bf=_0xc70012;return this[_0x15c3bf(0x2ba)](()=>{const _0x188d1f=_0x15c3bf;if(_0x75bc14===undefined)_0x31ee7d[_0x188d1f(0x1a1)](_0x3d7f56,_0xcec828);else _0x31ee7d['putSync'](_0x3d7f56,_0xcec828,_0x75bc14);},'raw-put');}async[_0xc70012(0x1b0)](_0x5edc38,_0x27d165){const _0x2e7b1c=_0xc70012;return this[_0x2e7b1c(0x2ba)](()=>_0x5edc38['removeSync'](_0x27d165),_0x2e7b1c(0x149));}}async function _0x1a6f70(_0x44cb1b,_0x3d175b){const _0x26e74d=_0xc70012;if(_0x3d175b==null)_0x3d175b=Math[_0x26e74d(0x24a)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x487cef=_0x44cb1b?.[_0x26e74d(0x28e)];if(!_0x487cef||typeof _0x487cef['then']!==_0x26e74d(0x1d3))return;await Promise[_0x26e74d(0x170)]([Promise[_0x26e74d(0x23d)](_0x487cef)['catch'](()=>{}),new Promise(_0x40bfbf=>{const _0x1d13e3=_0x26e74d,_0x1dbac5=setTimeout(_0x40bfbf,_0x3d175b);if(_0x1dbac5[_0x1d13e3(0x2b4)])_0x1dbac5[_0x1d13e3(0x2b4)]();})]);}catch{}}function _0xa8e2fa(_0x2eba7b){const _0x1699dc=_0xc70012;if(_0x2b1a30)return Promise[_0x1699dc(0x23d)]();const _0x34b858=_0x2eba7b?.[_0x1699dc(0x2c6)];return _0x34b858&&typeof _0x34b858[_0x1699dc(0x1e2)]===_0x1699dc(0x1d3)?_0x34b858:Promise[_0x1699dc(0x23d)]();}const _0x2fab71=Math[_0xc70012(0x24a)](0x1,Math[_0xc70012(0x1be)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0xd62e2=Math[_0xc70012(0x24a)](0x1,_0x2fab71-0x2);let _0x3f0914=0x0;const _0x41ade1=[];async function _0x4a2203(_0x1e3ade){const _0x1b79ff=_0xc70012;if(_0x3f0914<_0xd62e2)_0x3f0914++;else await new Promise(_0x55166e=>_0x41ade1['push'](_0x55166e));try{return await _0x1e3ade();}finally{const _0x545060=_0x41ade1[_0x1b79ff(0x188)]();if(_0x545060)_0x545060();else _0x3f0914--;}}return okdbWriter[_0xc70012(0x1fa)]=_0x2f64d8,okdbWriter[_0xc70012(0x1fa)]['withPoolHold']=_0x4a2203,okdbWriter['exports']['MAX_POOL_HOLDS']=_0xd62e2,okdbWriter['exports']['flushLmdb']=_0x1a6f70,okdbWriter['exports'][_0xc70012(0x2c6)]=_0xa8e2fa,okdbWriter[_0xc70012(0x1fa)]['SYNC_COMMITS']=_0x2b1a30,okdbWriter[_0xc70012(0x1fa)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x3d8dc7=_0x2ee730;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4db2d0=require$$0$3,{clampTimerDelay:_0x39e3b0}=requireOkdbTimers(),{SYNC_COMMITS:_0x57c709}=requireOkdbWriter(),_0x11c8fd=_0x3d8dc7(0x143);class _0x374f4{constructor(_0x84cf0a,_0x2dd55a,_0x546427){const _0x4700bb=_0x3d8dc7;this['_lock']=_0x84cf0a,this['_key']=_0x2dd55a,this[_0x4700bb(0x1c7)]=_0x546427,this[_0x4700bb(0x299)]=![],this[_0x4700bb(0x1ea)]=null,this[_0x4700bb(0x23e)]=null;}[_0x3d8dc7(0x11b)](){const _0x5e1bd4=_0x3d8dc7;if(this[_0x5e1bd4(0x299)])return![];try{const _0x42316c=this['_lock']['_db']()[_0x5e1bd4(0xf2)](this['_key']);if(!_0x42316c||_0x42316c[_0x5e1bd4(0xeb)]!==this['_acquiredAt'])return![];const _0x39ed73=_0x42316c[_0x5e1bd4(0x221)]??_0x42316c['acquiredAt'];if(_0x39ed73+_0x42316c[_0x5e1bd4(0x2d2)]<Date[_0x5e1bd4(0x1c0)]())return![];return!![];}catch{return!this['_released'];}}['holder'](){const _0x30f089=_0x3d8dc7;if(this['_released'])return null;try{return this['_lock'][_0x30f089(0x209)]()[_0x30f089(0xf2)](this[_0x30f089(0x187)])??null;}catch{return null;}}async[_0x3d8dc7(0x132)](_0x38f1e4){const _0x1360e4=_0x3d8dc7;if(this[_0x1360e4(0x299)])return;try{if(this['_lock'][_0x1360e4(0x161)]())return;const _0x3c98bc=this[_0x1360e4(0x262)][_0x1360e4(0x209)]()['get'](this[_0x1360e4(0x187)]);if(!_0x3c98bc||_0x3c98bc[_0x1360e4(0xeb)]!==this[_0x1360e4(0x1c7)])return;if(_0x57c709)this['_lock']['_db']()[_0x1360e4(0x1a1)](this['_key'],{..._0x3c98bc,'ttlMs':_0x3c98bc[_0x1360e4(0x2d2)]+_0x38f1e4});else await this[_0x1360e4(0x262)][_0x1360e4(0x209)]()[_0x1360e4(0x275)](this[_0x1360e4(0x187)],{..._0x3c98bc,'ttlMs':_0x3c98bc[_0x1360e4(0x2d2)]+_0x38f1e4});}catch{}}async[_0x3d8dc7(0x157)](){const _0x27e34f=_0x3d8dc7;if(this[_0x27e34f(0x299)])return;if(this[_0x27e34f(0x23e)])try{await this[_0x27e34f(0x23e)];}catch{}clearInterval(this[_0x27e34f(0x1ea)]),this[_0x27e34f(0x1ea)]=null,this[_0x27e34f(0x299)]=!![];try{if(this[_0x27e34f(0x262)][_0x27e34f(0x161)]())return;const _0x5e503a=this[_0x27e34f(0x262)][_0x27e34f(0x209)]()[_0x27e34f(0xf2)](this['_key']);if(_0x5e503a&&_0x5e503a['acquiredAt']===this[_0x27e34f(0x1c7)]){if(_0x57c709)this['_lock']['_db']()[_0x27e34f(0x237)](this['_key']);else await this[_0x27e34f(0x262)]['_db']()[_0x27e34f(0x1b0)](this[_0x27e34f(0x187)]);}}catch{}}[_0x3d8dc7(0x2a2)](_0x46981c,_0x313b50){const _0x5b848d=_0x3d8dc7,_0x5a519e=_0x39e3b0(_0x313b50??Math[_0x5b848d(0x1be)](_0x46981c/0x3));this['_heartbeatTimer']=setInterval(()=>{const _0x2703ec=_0x5b848d;if(this[_0x2703ec(0x299)])return;this[_0x2703ec(0x23e)]=((async()=>{const _0x4d8b9f=_0x2703ec;try{if(this['_lock'][_0x4d8b9f(0x161)]())return;const _0x449921=this[_0x4d8b9f(0x262)][_0x4d8b9f(0x209)]()[_0x4d8b9f(0xf2)](this[_0x4d8b9f(0x187)]);if(!_0x449921||_0x449921['acquiredAt']!==this[_0x4d8b9f(0x1c7)]){this[_0x4d8b9f(0x299)]=!![],clearInterval(this[_0x4d8b9f(0x1ea)]),this[_0x4d8b9f(0x1ea)]=null;return;}if(_0x57c709)this[_0x4d8b9f(0x262)][_0x4d8b9f(0x209)]()[_0x4d8b9f(0x1a1)](this[_0x4d8b9f(0x187)],{..._0x449921,'updatedAt':Date[_0x4d8b9f(0x1c0)]()});else await this[_0x4d8b9f(0x262)]['_db']()[_0x4d8b9f(0x275)](this['_key'],{..._0x449921,'updatedAt':Date['now']()});}catch{}this[_0x4d8b9f(0x23e)]=null;})());},_0x5a519e);if(this[_0x5b848d(0x1ea)][_0x5b848d(0x2b4)])this[_0x5b848d(0x1ea)]['unref']();}}class _0x55f5ec{constructor(_0x4feee8,{namespace:_0x11d4b6,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x499e58=_0x3d8dc7;this[_0x499e58(0x11e)]=_0x4feee8,this[_0x499e58(0x241)]=_0x11d4b6,this[_0x499e58(0x2d2)]=ttlMs,this[_0x499e58(0x177)]=heartbeatMs,this[_0x499e58(0x1da)]=null;}['_db'](){const _0x1ba020=_0x3d8dc7;return this[_0x1ba020(0x142)](),(!this[_0x1ba020(0x1da)]||this['_lockDbOf']!==this['_rawDb'])&&(this[_0x1ba020(0x1da)]=this[_0x1ba020(0x11e)][_0x1ba020(0x293)](_0x11c8fd,{'dupSort':![]}),this['_lockDbOf']=this[_0x1ba020(0x11e)]),this['_lockDb'];}[_0x3d8dc7(0x15f)](){const _0x390578=_0x3d8dc7;return this[_0x390578(0x142)](),(!this[_0x390578(0x13e)]||this['_wantDbOf']!==this[_0x390578(0x11e)])&&(this[_0x390578(0x13e)]=this[_0x390578(0x11e)][_0x390578(0x293)](_0x11c8fd+':want',{'dupSort':![]}),this[_0x390578(0x217)]=this[_0x390578(0x11e)]),this[_0x390578(0x13e)];}[_0x3d8dc7(0x161)](){const _0x44c1b9=_0x3d8dc7,_0x3f649f=this[_0x44c1b9(0x11e)]?.[_0x44c1b9(0x1b6)];return _0x3f649f===_0x44c1b9(0x164)||_0x3f649f===_0x44c1b9(0x200);}[_0x3d8dc7(0x142)](){const _0x963650=_0x3d8dc7;if(this['_closed']())throw new Error(_0x963650(0xcc));}[_0x3d8dc7(0x187)](_0x5e2f9b){const _0x1ee85a=_0x3d8dc7;return this[_0x1ee85a(0x241)]+':'+_0x5e2f9b;}[_0x3d8dc7(0x247)](_0x438416){const _0x45182e=_0x3d8dc7;try{if(this[_0x45182e(0x161)]())return;_0x57c709?this[_0x45182e(0x15f)]()[_0x45182e(0x1a1)](this[_0x45182e(0x187)](_0x438416),Date['now']()):this[_0x45182e(0x15f)]()[_0x45182e(0x275)](this['_key'](_0x438416),Date[_0x45182e(0x1c0)]())?.[_0x45182e(0x2b1)]?.(()=>{});}catch{}}['isWanted'](_0x35249a,_0xdbdc3d=0x3e8){const _0xb8861e=_0x3d8dc7;try{const _0x959123=this[_0xb8861e(0x15f)]()[_0xb8861e(0xf2)](this[_0xb8861e(0x187)](_0x35249a));return typeof _0x959123==='number'&&Date[_0xb8861e(0x1c0)]()-_0x959123<_0xdbdc3d;}catch{return![];}}[_0x3d8dc7(0x20f)](_0x551b61){const _0x1c54be=_0x3d8dc7,_0x52f1b1=_0x551b61[_0x1c54be(0x221)]??_0x551b61[_0x1c54be(0xeb)];return _0x52f1b1+_0x551b61['ttlMs']<Date[_0x1c54be(0x1c0)]();}static['_holderDead'](_0x908ba5){const _0x4ad916=_0x3d8dc7,_0x1bc741=_0x908ba5?.[_0x4ad916(0x28c)];if(!_0x1bc741||typeof _0x1bc741[_0x4ad916(0xe0)]!==_0x4ad916(0x24b))return![];if(_0x1bc741[_0x4ad916(0x1cf)]!==_0x4db2d0[_0x4ad916(0x1cf)]())return![];if(_0x1bc741[_0x4ad916(0xe0)]===process[_0x4ad916(0xe0)])return![];try{return process[_0x4ad916(0x2ce)](_0x1bc741[_0x4ad916(0xe0)],0x0),![];}catch(_0x40143b){return _0x40143b[_0x4ad916(0x286)]===_0x4ad916(0x16e);}}async['tryAcquire'](_0x10c554,_0x20f641={},_0x3a677b={}){const _0x3c6415=_0x3d8dc7,_0x46d987=this[_0x3c6415(0x187)](_0x10c554),_0x1353d7=_0x3a677b['ttlMs']??this['ttlMs'],_0x48e7b5=Date[_0x3c6415(0x1c0)](),_0x5f273f={'holder':{'pid':process[_0x3c6415(0xe0)],'hostname':_0x4db2d0[_0x3c6415(0x1cf)](),..._0x20f641},'acquiredAt':_0x48e7b5,'updatedAt':_0x48e7b5,'ttlMs':_0x1353d7};let _0x148aec=![],_0xf4162f=null;if(this['_closed']())return{'acquired':![],'handle':null,'current':null};try{const _0x4c5968=()=>{const _0x82b009=_0x3c6415,_0x4782a9=this[_0x82b009(0x209)]()[_0x82b009(0xf2)](_0x46d987);if(_0x4782a9&&!this[_0x82b009(0x20f)](_0x4782a9)&&!_0x55f5ec[_0x82b009(0x13f)](_0x4782a9)){const _0x4688ed=_0x20f641[_0x82b009(0x162)]!=null&&_0x4782a9[_0x82b009(0x28c)][_0x82b009(0xe0)]===process[_0x82b009(0xe0)]&&_0x4782a9[_0x82b009(0x28c)][_0x82b009(0x162)]===_0x20f641[_0x82b009(0x162)];if(!_0x4688ed){_0x148aec=![],_0xf4162f=_0x4782a9;return;}_0x5f273f[_0x82b009(0xeb)]<=_0x4782a9['acquiredAt']&&(_0x5f273f['acquiredAt']=_0x4782a9['acquiredAt']+0x1,_0x5f273f['updatedAt']=_0x5f273f[_0x82b009(0xeb)]);}this['_db']()[_0x82b009(0x275)](_0x46d987,_0x5f273f),_0x148aec=!![],_0xf4162f=_0x5f273f;};if(_0x57c709)this['_db']()[_0x3c6415(0x1bd)](_0x4c5968);else await this[_0x3c6415(0x209)]()[_0x3c6415(0x268)](_0x4c5968);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x148aec)return{'acquired':![],'handle':null,'current':_0xf4162f};const _0x594e8e=new _0x374f4(this,_0x46d987,_0x5f273f[_0x3c6415(0xeb)]);return _0x594e8e[_0x3c6415(0x2a2)](_0x1353d7,this[_0x3c6415(0x177)]),{'acquired':!![],'handle':_0x594e8e,'current':_0xf4162f};}[_0x3d8dc7(0xb4)](_0x40accf){const _0x32c59d=_0x3d8dc7;try{return this[_0x32c59d(0x209)]()[_0x32c59d(0xf2)](this['_key'](_0x40accf))??null;}catch{return null;}}[_0x3d8dc7(0x2dc)](){const _0x331123=_0x3d8dc7,_0x2ed93a=this['namespace']+':',_0x45f04d=[];try{for(const {key:_0x212905,value:_0x39c1ba}of this['_db']()['getRange']({'start':_0x2ed93a,'end':_0x2ed93a+'\xff'})){typeof _0x212905===_0x331123(0x19d)&&_0x212905['startsWith'](_0x2ed93a)&&_0x45f04d[_0x331123(0x1ad)]({'id':_0x212905[_0x331123(0x208)](_0x2ed93a[_0x331123(0x136)]),'entry':_0x39c1ba});}}catch{}return _0x45f04d;}static['listAll'](_0x2542bd){const _0x4c6700=_0x3d8dc7,_0x5ec3a4=[];try{const _0x5bee02=_0x2542bd[_0x4c6700(0x293)](_0x11c8fd,{'dupSort':![]});for(const {key:_0x4db89e,value:_0x3a7444}of _0x5bee02[_0x4c6700(0x1ae)]({})){if(typeof _0x4db89e!==_0x4c6700(0x19d))continue;const _0x40f900=_0x4db89e[_0x4c6700(0x259)](':');if(_0x40f900<0x1)continue;_0x5ec3a4['push']({'namespace':_0x4db89e['slice'](0x0,_0x40f900),'id':_0x4db89e[_0x4c6700(0x208)](_0x40f900+0x1),'entry':_0x3a7444});}}catch{}return _0x5ec3a4;}}return okdbLock={'OKDBLock':_0x55f5ec},okdbLock;}var version='2.7.0',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x4f806b=_0x2ee730;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x259d8d=require$$0$3,_0x330ec8=require$$1$1,_0x3b6071=require$$2,{LOOP:_0x2fe424}=requireOkdbLoopMonitor(),{OKDBLock:_0x29c247}=requireOkdbLock(),{SYNC_COMMITS:_0x5096c4}=requireOkdbWriter(),_0x2ef1f8=_0x4f806b(0x197),_0x5242e4=_0x4f806b(0x2e6),_0x5c3736='~processes:desired',_0x3989e7=_0x4f806b(0xc4),_0x1145fc=(_0x4e2311,_0x586323)=>_0x4e2311+':'+_0x586323,_0x286144=(_0x13e347,_0x286e42)=>_0x13e347+'::'+_0x286e42,_0x23b77e=(_0x39716c,_0x200b43)=>_0x39716c+'/'+_0x200b43,_0x10c28c=(_0x178c1e,_0xc1fccd)=>_0x178c1e+'#'+_0xc1fccd,_0x34c50f=_0x131e2e=>{const _0xc13b05=_0x4f806b;if(_0x131e2e?.[_0xc13b05(0x2de)])return _0x131e2e[_0xc13b05(0x2de)];const _0x40675e=_0x131e2e?.[_0xc13b05(0x1a4)];return typeof _0x40675e===_0xc13b05(0x19d)&&_0x40675e[_0xc13b05(0x289)]('#')?_0x40675e[_0xc13b05(0x208)](0x0,_0x40675e['indexOf']('#')):_0x40675e;},_0x15f37d=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x436944=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x3ccaff=_0x15f37d*0x3,_0x37f977=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x3ccaff*0x14),_0x5b65af=['processor:progress',_0x4f806b(0x10a),'processor:retry','processor:error',_0x4f806b(0x189),'processor:resumed'];let _0x881118=null;function _0x4349fc(){const _0x8dc6d3=_0x4f806b;if(_0x881118==null)_0x881118=Math[_0x8dc6d3(0x153)]((Date[_0x8dc6d3(0x1c0)]()-process[_0x8dc6d3(0x20a)]()*0x3e8)/0x3e8)*0x3e8;return _0x881118;}function _0x58e3ef(_0x16b7da){const _0x408d3d=_0x4f806b;if(process.env.OKDB_PROCESS_KILL===_0x408d3d(0x282))return![];if(_0x16b7da?.[_0x408d3d(0x1b1)]?.['processes']&&typeof _0x16b7da[_0x408d3d(0x1b1)][_0x408d3d(0x2a0)]===_0x408d3d(0x144)&&_0x16b7da['options'][_0x408d3d(0x2a0)][_0x408d3d(0x2ce)]===![])return![];return!![];}function _0x2198aa(_0x1550f7,_0x108b9f){const _0x276f7f=_0x4f806b,_0x83bf5=!!_0x108b9f?.[_0x276f7f(0x1f3)];switch(_0x1550f7){case _0x276f7f(0x27c):return{'controllable':_0x83bf5,'decommissionable':![],'killable':!![],'killConfirm':_0x276f7f(0x227)};case _0x276f7f(0x21d):case _0x276f7f(0x1d1):return{'controllable':_0x83bf5,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x276f7f(0x1c4):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x276f7f(0x13c):case _0x276f7f(0xca):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x276f7f(0x120)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x3b0db9{constructor(_0x473e1e){const _0xfaa1e3=_0x4f806b;this[_0xfaa1e3(0x295)]=_0x473e1e,this['_statusEnv']=null,this['_desired']=null,this[_0xfaa1e3(0x206)]=new Map(),this[_0xfaa1e3(0x119)]=null,this[_0xfaa1e3(0x285)]=![],this['_isReader']=![],this[_0xfaa1e3(0x156)]=_0x4349fc(),this[_0xfaa1e3(0x1a5)]=_0x1145fc(process[_0xfaa1e3(0xe0)],this[_0xfaa1e3(0x156)]),this[_0xfaa1e3(0x134)]=_0x3b6071[_0xfaa1e3(0x12c)]()[_0xfaa1e3(0x208)](0x0,0x8),this['_rowKey']=_0x10c28c(this[_0xfaa1e3(0x1a5)],this[_0xfaa1e3(0x134)]),this[_0xfaa1e3(0x191)]=Date[_0xfaa1e3(0x1c0)](),this[_0xfaa1e3(0x116)]=null,this[_0xfaa1e3(0x135)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0xfaa1e3(0x249)]=null,this['_onTick']=null,this[_0xfaa1e3(0xb2)]=0x0,this[_0xfaa1e3(0x2ab)]={},this['_children']=new Map(),this[_0xfaa1e3(0x1ee)]=process['cpuUsage'](),this[_0xfaa1e3(0xfe)]=Date['now'](),this[_0xfaa1e3(0x13a)]=0x0,this[_0xfaa1e3(0x207)]=new Map();}get[_0x4f806b(0x2c3)](){const _0x4bc3c8=_0x4f806b;return this[_0x4bc3c8(0x1a5)];}get[_0x4f806b(0x1ab)](){const _0x272f96=_0x4f806b;return this[_0x272f96(0x29c)];}[_0x4f806b(0x27a)](_0x46b081,_0x577502){const _0x8a9d8e=_0x2198aa(_0x46b081,_0x577502);if(_0x8a9d8e['killable']&&!_0x58e3ef(this['okdb']))return{..._0x8a9d8e,'killable':![],'killConfirm':undefined};return _0x8a9d8e;}[_0x4f806b(0x2af)](){const _0x1c87cf=_0x4f806b;return!!this[_0x1c87cf(0x1d5)];}[_0x4f806b(0xc1)](_0x486713){const _0x386f6b=_0x4f806b;Object[_0x386f6b(0x236)](this['_ownMeta'],_0x486713||{});}[_0x4f806b(0x2bc)](_0x1b903e){const _0x12d764=_0x4f806b;if(_0x1b903e)this[_0x12d764(0x1de)]=_0x1b903e;}[_0x4f806b(0x223)](_0x1b8391={}){const _0x1c59a1=_0x4f806b;return this[_0x1c59a1(0x295)][_0x1c59a1(0x179)](_0x1b8391);}['processingStatusView'](){const _0x212d32=_0x4f806b,_0x6116a1={};let _0x3e086c=0x0,_0x166582=0x0;const _0x3b9d47=new Set();for(const _0x327555 of this[_0x212d32(0x2cf)]()){_0x166582++;const _0x1b736b=_0x327555[_0x212d32(0x284)];if(!_0x1b736b)continue;if(_0x1b736b[_0x212d32(0x2a8)])_0x3e086c++;for(const _0xd7ce5a of _0x1b736b['processors']||[]){if(![_0x212d32(0x2d9),_0x212d32(0x2a4)]['includes'](_0xd7ce5a[_0x212d32(0x213)]))continue;(_0xd7ce5a[_0x212d32(0x1f7)]===_0x212d32(0x1c2)||_0xd7ce5a[_0x212d32(0x1f7)]===_0x212d32(0x21b))&&_0xd7ce5a['cursorKey']&&_0x3b9d47[_0x212d32(0x1ff)]((_0xd7ce5a[_0x212d32(0x2cb)]||'default')+':'+_0xd7ce5a[_0x212d32(0x16a)]);const _0xa82f40=_0xd7ce5a['env']||_0x212d32(0x1a7);(_0x6116a1[_0xa82f40]||=[])['push']({..._0xd7ce5a,'env':_0xa82f40,'owner':{'pid':_0x327555[_0x212d32(0xe0)]??null,'kind':_0x327555[_0x212d32(0x26e)]??null}});}}for(const [_0x29c943,_0x16ad08]of Object['entries'](_0x6116a1)){for(const _0x6ecd69 of _0x16ad08){if(_0x6ecd69[_0x212d32(0x213)]===_0x212d32(0x2d9)&&!_0x6ecd69['claimGated']){const _0x3c9365=_0x29c943+':'+(_0x6ecd69[_0x212d32(0x16a)]??'');if(!_0x3b9d47[_0x212d32(0xc5)](_0x3c9365))_0x6ecd69['unclaimed']=!![];}}}return{'envs':_0x6116a1,'policy':null,'participation':{'participating':_0x3e086c,'total':_0x166582},'source':_0x212d32(0x2ac)};}['processorsView'](){const _0x2645df=_0x4f806b,_0x3e82f0=_0x1c6523=>{const _0x5d2ac6=_0x302a;if(_0x1c6523['state']===_0x5d2ac6(0x1c2)||_0x1c6523['state']===_0x5d2ac6(0x21b)||_0x1c6523[_0x5d2ac6(0x1f7)]===_0x5d2ac6(0x1f4))return 0x3;if(_0x1c6523['claimGated'])return 0x1;return 0x2;},_0x29e521=new Map();for(const _0x5e3094 of this['listNodes']()){for(const _0x839794 of _0x5e3094[_0x2645df(0x284)]?.[_0x2645df(0x1f3)]||[]){const _0xb07006={..._0x839794,'owner':{'pid':_0x5e3094[_0x2645df(0xe0)]??null,'kind':_0x5e3094[_0x2645df(0x26e)]??null,'host':_0x5e3094['host']??null}},_0xa3d0a7=_0x839794[_0x2645df(0x213)]==='single'?_0x2645df(0x291)+(_0x839794['env']??'')+'::'+(_0x839794[_0x2645df(0x16a)]??_0x839794[_0x2645df(0x19f)]??_0x839794['id']):_0x2645df(0x264)+(_0x5e3094[_0x2645df(0x1a4)]??_0x5e3094['processKey']??'')+'::'+(_0x839794['env']??'')+'::'+_0x839794['id'],_0x112897=_0x29e521[_0x2645df(0xf2)](_0xa3d0a7);if(!_0x112897||_0x3e82f0(_0xb07006)>_0x3e82f0(_0x112897))_0x29e521[_0x2645df(0x2bb)](_0xa3d0a7,_0xb07006);}}return[..._0x29e521[_0x2645df(0x226)]()];}[_0x4f806b(0x2b5)](){const _0x455601=_0x4f806b,_0x32d84e=Date[_0x455601(0x1c0)](),_0x1f7d99=this[_0x455601(0x2cf)](),_0x5d4efe=_0xdf9426=>Math[_0x455601(0x24a)](0x0,Math[_0x455601(0x153)]((_0x32d84e-(_0xdf9426[_0x455601(0x20b)]||_0x32d84e))/0x3e8)),_0x1b8ff4=_0x1f7d99[_0x455601(0x186)](_0x29a7e3=>_0x29a7e3['kind']===_0x455601(0x27c)),_0x7ea23b=_0x1f7d99[_0x455601(0x13b)](_0x5dd643=>_0x5dd643[_0x455601(0x26e)]===_0x455601(0x27f));if(_0x1b8ff4||_0x7ea23b[_0x455601(0x136)])return{'primary':_0x1b8ff4?{'pid':_0x1b8ff4[_0x455601(0xe0)],'uptime':_0x5d4efe(_0x1b8ff4)}:null,'workers':_0x7ea23b[_0x455601(0x279)](_0x3ebdff=>({'pid':_0x3ebdff[_0x455601(0xe0)],'uptime':_0x5d4efe(_0x3ebdff)})),'workersConfigured':_0x1b8ff4?.[_0x455601(0x1b2)]?.[_0x455601(0xe2)]??_0x7ea23b[_0x455601(0x136)],'mode':_0x455601(0x265)};const _0x3a782e=_0x1f7d99['find'](_0x23f0c4=>_0x23f0c4[_0x455601(0x26e)]===_0x455601(0x21d)||_0x23f0c4[_0x455601(0x26e)]===_0x455601(0x1d1)||_0x23f0c4[_0x455601(0x26e)]===_0x455601(0x1c4)),_0x3c9eff=_0x3a782e?{'pid':_0x3a782e['pid'],'uptime':_0x5d4efe(_0x3a782e)}:{'pid':process[_0x455601(0xe0)],'uptime':Math['max'](0x0,Math[_0x455601(0x153)](process[_0x455601(0x20a)]()))};return{'primary':_0x3c9eff,'workers':[_0x3c9eff],'workersConfigured':0x1,'mode':'single'};}[_0x4f806b(0x13d)](){const _0x1f5e0d=_0x4f806b;return this[_0x1f5e0d(0x1ec)]();}[_0x4f806b(0x1b8)](){const _0x190f53=_0x4f806b,_0x1383fc=new Map();for(const _0x2d1d21 of this[_0x190f53(0x1ec)]())_0x1383fc[_0x190f53(0x2bb)](_0x2d1d21[_0x190f53(0x2de)],{..._0x2d1d21,'children':[]});const _0x5716dd=[];for(const _0x59a0fc of _0x1383fc[_0x190f53(0x226)]()){const _0xa56d7e=_0x59a0fc[_0x190f53(0x181)]?_0x1383fc[_0x190f53(0xf2)](_0x59a0fc[_0x190f53(0x181)]):null;if(_0xa56d7e&&_0xa56d7e!==_0x59a0fc)_0xa56d7e[_0x190f53(0x1f0)][_0x190f53(0x1ad)](_0x59a0fc);else _0x5716dd[_0x190f53(0x1ad)](_0x59a0fc);}const _0x5c7816=(_0x148246,_0x1431e8)=>_0x148246[_0x190f53(0x26e)]===_0x1431e8[_0x190f53(0x26e)]?(_0x148246[_0x190f53(0xe0)]||0x0)-(_0x1431e8[_0x190f53(0xe0)]||0x0):(_0x148246[_0x190f53(0x26e)]??'')<(_0x1431e8[_0x190f53(0x26e)]??'')?-0x1:0x1,_0x161d71=_0x542e55=>{const _0x3d6043=_0x190f53;_0x542e55['sort'](_0x5c7816);for(const _0x78cc7c of _0x542e55)if(_0x78cc7c[_0x3d6043(0x1f0)][_0x3d6043(0x136)])_0x161d71(_0x78cc7c[_0x3d6043(0x1f0)]);};return _0x161d71(_0x5716dd),_0x5716dd;}['getProcess'](_0x3d88f3){const _0x2185ae=_0x4f806b;return this[_0x2185ae(0x1ec)]()[_0x2185ae(0x186)](_0x449a28=>_0x449a28['processKey']===_0x3d88f3)??null;}['_groupByProcess'](_0x5139eb=Date['now']()){const _0x2c5b63=_0x4f806b,_0x5eab69=new Map();for(const _0x35707a of this['listNodes']()){const _0x4d0c3c=_0x34c50f(_0x35707a);let _0x5eca99=_0x5eab69['get'](_0x4d0c3c);!_0x5eca99&&(_0x5eca99={'processKey':_0x4d0c3c,'nodeKey':_0x4d0c3c,'pid':_0x35707a[_0x2c5b63(0xe0)],'ppid':_0x35707a[_0x2c5b63(0x175)]??null,'host':_0x35707a[_0x2c5b63(0x21a)]??null,'kind':_0x35707a['kind'],'role':null,'supervisorKey':_0x35707a[_0x2c5b63(0x181)]??null,'slot':_0x35707a[_0x2c5b63(0xf5)]??null,'slotKey':_0x35707a['slotKey']??null,'caps':_0x35707a[_0x2c5b63(0x2ee)]??null,'lifecycle':_0x35707a['lifecycle']??null,'uptime':Math[_0x2c5b63(0x24a)](0x0,Math[_0x2c5b63(0x153)]((_0x5139eb-(_0x35707a[_0x2c5b63(0x20b)]||_0x5139eb))/0x3e8)),'startedAt':_0x35707a['startedAt']??null,'meta':_0x35707a[_0x2c5b63(0x1b2)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x5eab69[_0x2c5b63(0x2bb)](_0x4d0c3c,_0x5eca99));_0x5eca99[_0x2c5b63(0x106)][_0x2c5b63(0x1ad)]({'instanceId':_0x35707a[_0x2c5b63(0x14d)]??null,'role':_0x35707a[_0x2c5b63(0x152)]??null,'listenAddr':_0x35707a[_0x2c5b63(0x1b5)]??null,'lifecycle':_0x35707a[_0x2c5b63(0x1e4)]??null,'processing':_0x35707a[_0x2c5b63(0x284)]??null});if(!_0x5eca99[_0x2c5b63(0x152)]&&_0x35707a[_0x2c5b63(0x152)])_0x5eca99[_0x2c5b63(0x152)]=_0x35707a[_0x2c5b63(0x152)];if(!_0x5eca99[_0x2c5b63(0x1b5)]&&_0x35707a['listenAddr'])_0x5eca99[_0x2c5b63(0x1b5)]=_0x35707a['listenAddr'];if(!_0x5eca99[_0x2c5b63(0x284)]&&_0x35707a[_0x2c5b63(0x284)])_0x5eca99[_0x2c5b63(0x284)]=_0x35707a['processing'];if(!_0x5eca99[_0x2c5b63(0x2ed)]&&_0x35707a[_0x2c5b63(0x2ed)])_0x5eca99[_0x2c5b63(0x2ed)]=_0x35707a[_0x2c5b63(0x2ed)];if(!_0x5eca99['singletonClaims']&&_0x35707a[_0x2c5b63(0x14a)])_0x5eca99[_0x2c5b63(0x14a)]=_0x35707a['singletonClaims'];if(_0x5eca99[_0x2c5b63(0x2ee)]==null&&_0x35707a[_0x2c5b63(0x2ee)])_0x5eca99[_0x2c5b63(0x2ee)]=_0x35707a[_0x2c5b63(0x2ee)];if(_0x35707a[_0x2c5b63(0x16d)]&&(!_0x5eca99[_0x2c5b63(0x16d)]||(_0x35707a['stats']['at']??0x0)>(_0x5eca99['stats']['at']??0x0)))_0x5eca99[_0x2c5b63(0x16d)]=_0x35707a[_0x2c5b63(0x16d)];}return[..._0x5eab69[_0x2c5b63(0x226)]()];}['runtimeProcessesView'](){const _0x143154=_0x4f806b,_0x36f4d3=[],_0x493af5={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0xc46651 of this[_0x143154(0x1ec)]()){_0x36f4d3[_0x143154(0x1ad)]({'processKey':_0xc46651[_0x143154(0x2de)],'kind':_0xc46651['kind'],'pid':_0xc46651[_0x143154(0xe0)],'supervisorKey':_0xc46651['supervisorKey'],'meta':_0xc46651[_0x143154(0x1b2)]??null,'uptime':_0xc46651[_0x143154(0x20a)],'stats':_0xc46651['stats']??null}),_0x493af5['processes']++;if(_0xc46651['stats']){_0x493af5[_0x143154(0x1a0)]+=_0xc46651[_0x143154(0x16d)]['rss']||0x0,_0x493af5['heapUsed']+=(_0xc46651[_0x143154(0x16d)][_0x143154(0x2a1)]||0x0)+(_0xc46651[_0x143154(0x16d)][_0x143154(0xbc)]?.[_0x143154(0x2a1)]||0x0);const _0xc10c08=_0xc46651[_0x143154(0x16d)]['threads'];_0xc10c08&&(_0x493af5[_0x143154(0xbc)][_0x143154(0x26b)]+=_0xc10c08[_0x143154(0x26b)]||0x0,_0x493af5['threads'][_0x143154(0x28d)]+=_0xc10c08['sandbox']||0x0,_0x493af5[_0x143154(0xbc)][_0x143154(0x1b3)]+=_0xc10c08[_0x143154(0x1b3)]||0x0);}}return{'totals':_0x493af5,'nodes':_0x36f4d3};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x2aafc2=_0x4f806b;this[_0x2aafc2(0x285)]=this[_0x2aafc2(0x285)]||!!writer,this[_0x2aafc2(0x2d3)]=this['_isReader']||!!reader,this[_0x2aafc2(0x116)]=kind||this[_0x2aafc2(0x116)]||(_0x330ec8[_0x2aafc2(0x196)]?_0x2aafc2(0x27f):'cli'),this[_0x2aafc2(0x135)]=supervisorKey??this['_supervisorKey'],this[_0x2aafc2(0x1de)]=listenAddr??this['_listenAddr'],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x2aafc2(0x1d5)]){const _0x593a4c=await this['okdb']['createEnvironment'](_0x2ef1f8,{'sync':![],'durability':_0x2aafc2(0x2db)});await _0x593a4c[_0x2aafc2(0x11d)](_0x5242e4),this[_0x2aafc2(0x1d5)]=_0x593a4c;}return this[_0x2aafc2(0x1d5)];}[_0x4f806b(0x1e1)](){const _0x3b6cb5=_0x4f806b;return this[_0x3b6cb5(0x166)]!==this[_0x3b6cb5(0x1d5)]&&(this[_0x3b6cb5(0x166)]=this['_statusEnv'],this[_0x3b6cb5(0x110)]=this[_0x3b6cb5(0x1d5)]['_getType'](_0x5242e4)['data']),this[_0x3b6cb5(0x110)];}[_0x4f806b(0x1e3)](_0x3cbd5e){const _0x33765a=_0x4f806b;if(_0x5096c4)return this['_nodeDb']()[_0x33765a(0x1a1)](_0x3cbd5e[_0x33765a(0x1a4)],_0x3cbd5e,0x1);const _0x269d32=this['_nodeDb']()['put'](_0x3cbd5e[_0x33765a(0x1a4)],_0x3cbd5e,0x1);if(_0x269d32&&typeof _0x269d32[_0x33765a(0x1e2)]==='function')_0x269d32[_0x33765a(0x1e2)](undefined,()=>{});return _0x269d32;}[_0x4f806b(0x1ba)](_0x55a6bd){const _0x5db55a=_0x4f806b;return this[_0x5db55a(0x1e1)]()[_0x5db55a(0x1a1)](_0x55a6bd['nodeKey'],_0x55a6bd,0x1);}[_0x4f806b(0x2c0)](_0x43b40a){const _0x917420=_0x4f806b;if(_0x5096c4)try{return this[_0x917420(0x1e1)]()[_0x917420(0x237)](_0x43b40a);}catch{return![];}const _0x4bd690=this[_0x917420(0x1e1)]()[_0x917420(0x1b0)](_0x43b40a);if(_0x4bd690&&typeof _0x4bd690[_0x917420(0x1e2)]===_0x917420(0x1d3))_0x4bd690[_0x917420(0x1e2)](undefined,()=>{});return _0x4bd690;}async[_0x4f806b(0x19c)](_0x106af8){const _0x2bee1f=_0x4f806b;if(!this[_0x2bee1f(0x1d5)]||!this['_isWriter']||!_0x106af8?.['nodeKey'])return;return this[_0x2bee1f(0x1e3)](_0x106af8);}async[_0x4f806b(0xbd)](_0x28b152){const _0xf07894=_0x4f806b;if(!this['_statusEnv']||!this['_isWriter']||!_0x28b152)return;const _0x191be9=_0x28b152['includes']('#'),_0x4c8008=[];for(const {key:_0x280a7b}of this[_0xf07894(0x1d5)][_0xf07894(0x1ae)](_0x5242e4)){if(_0x280a7b===_0x28b152||!_0x191be9&&typeof _0x280a7b===_0xf07894(0x19d)&&_0x280a7b[_0xf07894(0x1d6)](_0x28b152+'#'))_0x4c8008[_0xf07894(0x1ad)](_0x280a7b);}for(const _0x396550 of _0x4c8008){try{this['_nodeDb']()[_0xf07894(0x237)](_0x396550);}catch{}}}[_0x4f806b(0x125)](_0x327e63){const _0x52c0bb=_0x4f806b;if(typeof _0x327e63?.['pid']!=='number')return![];if(_0x327e63[_0x52c0bb(0x21a)]!==_0x259d8d[_0x52c0bb(0x1cf)]())return![];if(_0x327e63[_0x52c0bb(0xe0)]===process['pid'])return![];if(_0x327e63[_0x52c0bb(0x296)]!=null&&_0x327e63[_0x52c0bb(0x296)]<Date['now']()-_0x37f977)return!![];try{return process[_0x52c0bb(0x2ce)](_0x327e63[_0x52c0bb(0xe0)],0x0),![];}catch(_0x481001){return _0x481001[_0x52c0bb(0x286)]===_0x52c0bb(0x16e);}}[_0x4f806b(0x2cf)](){const _0x5f221b=_0x4f806b;if(!this[_0x5f221b(0x1d5)])return[];try{this[_0x5f221b(0x1d5)]['db']?.[_0x5f221b(0x182)]?.();}catch{}const _0x468b51=Date['now'](),_0x466562=_0x259d8d[_0x5f221b(0x1cf)](),_0xcffc46=[];for(const {value:_0x5b8ab3}of this['_statusEnv']['getRange'](_0x5242e4)){if(!_0x5b8ab3)continue;let _0x5a3481=null;_0x5b8ab3[_0x5f221b(0x21a)]===_0x466562&&typeof _0x5b8ab3[_0x5f221b(0xe0)]===_0x5f221b(0x24b)&&(_0x5a3481=!this['_nodeDead'](_0x5b8ab3));if(_0x5a3481===![])continue;const _0x49da0b=_0x5b8ab3[_0x5f221b(0x296)]==null||_0x5b8ab3[_0x5f221b(0x296)]>=_0x468b51;if(_0x5a3481===!![]||_0x49da0b)_0xcffc46[_0x5f221b(0x1ad)](_0x5b8ab3);}return _0xcffc46;}async[_0x4f806b(0x2d4)](_0x5622cb=0x0){const _0x163d34=_0x4f806b;if(!this['_statusEnv']||!this['_isWriter'])return;const _0x455b20=Date['now']()-_0x5622cb,_0x3fc296=new Set(),_0x577faa=[],_0xf72263=_0x259d8d[_0x163d34(0x1cf)](),_0x42cba8=require$$6['version'];for(const {key:_0x1a3a97,value:_0x269f5a}of this[_0x163d34(0x1d5)][_0x163d34(0x1ae)](_0x5242e4)){if(!_0x269f5a)continue;const _0x4e9dbd=_0x269f5a[_0x163d34(0x21a)]===_0xf72263&&typeof _0x269f5a[_0x163d34(0xe0)]===_0x163d34(0x24b),_0x421275=_0x4e9dbd?this[_0x163d34(0x125)](_0x269f5a):_0x269f5a['expiresAt']!=null&&_0x269f5a['expiresAt']<_0x455b20;if(_0x421275)_0x577faa['push'](_0x1a3a97);else{_0x3fc296[_0x163d34(0x1ff)](_0x34c50f(_0x269f5a)??_0x1a3a97);if(_0x269f5a[_0x163d34(0x17c)]&&_0x269f5a['version']!==_0x42cba8){if(!this['_versionSkewWarned'])this[_0x163d34(0x290)]=new Set();!this[_0x163d34(0x290)][_0x163d34(0xc5)](_0x269f5a[_0x163d34(0x17c)])&&(this[_0x163d34(0x290)][_0x163d34(0x1ff)](_0x269f5a['version']),this[_0x163d34(0x295)][_0x163d34(0x244)]?.[_0x163d34(0x2c5)]?.(_0x163d34(0x17d)+(_0x269f5a[_0x163d34(0xe0)]??'?')+_0x163d34(0x2e2)+_0x269f5a[_0x163d34(0x17c)]+_0x163d34(0x198)+_0x42cba8+_0x163d34(0xec)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':'migrations'}));}}}for(const _0x48383f of _0x577faa)this[_0x163d34(0x2c0)](_0x48383f);if(this['_ensureDesired']()){const _0x5040a2=[];for(const {key:_0xd945f3}of this[_0x163d34(0x210)](_0x163d34(0x2e6))){if(!_0x3fc296[_0x163d34(0xc5)](_0xd945f3)){if(_0x5096c4)try{this[_0x163d34(0x2c4)][_0x163d34(0x237)](_0x163d34(0x1b9)+_0xd945f3);}catch{}else _0x5040a2['push'](this[_0x163d34(0x2c4)]['remove'](_0x163d34(0x1b9)+_0xd945f3));}}if(_0x5040a2['length'])await Promise['allSettled'](_0x5040a2);}}['startHeartbeat'](_0x42bb41=null){const _0x4041ff=_0x4f806b;if(this[_0x4041ff(0x1e9)])return;if(!this[_0x4041ff(0x285)]||!this[_0x4041ff(0x1d5)]){this[_0x4041ff(0x295)]?.[_0x4041ff(0x244)]?.['warn']?.(_0x4041ff(0x121)+this[_0x4041ff(0x285)]+'\x20statusEnv='+!!this[_0x4041ff(0x1d5)]+_0x4041ff(0x240),{'feature':_0x4041ff(0x2a0)});return;}this['_onTick']=_0x42bb41,this[_0x4041ff(0x249)]=()=>this[_0x4041ff(0x159)]();for(const _0x374f13 of _0x5b65af)this[_0x4041ff(0x295)][_0x4041ff(0x184)]['on'](_0x374f13,this[_0x4041ff(0x249)]);this[_0x4041ff(0x29e)]();const _0x398570=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x15f37d;this[_0x4041ff(0x1e9)]=setInterval(()=>{const _0xb0f239=_0x4041ff;if(this['_onTick'])try{this[_0xb0f239(0x140)]();}catch{}this[_0xb0f239(0x29e)](),this['reap']()[_0xb0f239(0x2b1)](()=>{});},_0x398570);if(this[_0x4041ff(0x1e9)]['unref'])this['_hbTimer'][_0x4041ff(0x2b4)]();}['_maybePublish'](){const _0x2f0942=_0x4f806b;if(!this[_0x2f0942(0x285)]||!this['_statusEnv'])return;if(Date['now']()-this['_lastPublishAt']<_0x436944)return;this[_0x2f0942(0x29e)]();}[_0x4f806b(0x29e)](){const _0x450453=_0x4f806b;if(!this[_0x450453(0x285)]||!this[_0x450453(0x1d5)])return;this['_lastPublishAt']=Date[_0x450453(0x1c0)]();try{const _0x50ff32=[this['_buildOwnRow']()];for(const _0xbad18d of this['_children'][_0x450453(0x226)]())_0x50ff32[_0x450453(0x1ad)](this[_0x450453(0x151)](_0xbad18d));const _0x194914=_0x2fe424[_0x450453(0x17e)]?_0x2fe424[_0x450453(0x1c0)]():0x0;for(const _0x36c97e of _0x50ff32){try{this['_putRowSync'](_0x36c97e),this['_publishFailWarned']=![];}catch(_0xd9286d){!this[_0x450453(0x2df)]&&(this[_0x450453(0x2df)]=!![],this['okdb']?.[_0x450453(0x244)]?.[_0x450453(0x2c5)]?.(_0x450453(0x280)+_0xd9286d[_0x450453(0x2c7)],{'feature':_0x450453(0x2a0)}));}}if(_0x2fe424['enabled'])_0x2fe424['note'](_0x450453(0x2d0),_0x2fe424[_0x450453(0x1c0)]()-_0x194914,_0x450453(0x12d)+_0x50ff32[_0x450453(0x136)]+_0x450453(0x22e));}catch(_0x1350b1){!this[_0x450453(0x2df)]&&(this['_publishFailWarned']=!![],this[_0x450453(0x295)]?.['log']?.[_0x450453(0x2c5)]?.('registry\x20publish\x20failing:\x20'+_0x1350b1['message'],{'feature':_0x450453(0x2a0)}));}}async[_0x4f806b(0x193)](){const _0x5f4a1=_0x4f806b;if(this['_onProcEvent']){for(const _0x29cb0c of _0x5b65af){try{this[_0x5f4a1(0x295)][_0x5f4a1(0x184)][_0x5f4a1(0x282)](_0x29cb0c,this[_0x5f4a1(0x249)]);}catch{}}this[_0x5f4a1(0x249)]=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x5f4a1(0x1e9)]=null);try{if(this['_statusEnv']&&this[_0x5f4a1(0x285)])await this['removeNode'](this[_0x5f4a1(0x29c)]);}catch{}}async['deregisterSelf'](){const _0x1343a4=_0x4f806b;if(!this['_statusEnv']||!this[_0x1343a4(0x285)])return;try{await this['removeNode'](this['_rowKey']);}catch{}try{const _0x115c26=[];for(const {value:_0x34a34e}of this[_0x1343a4(0x1d5)]['getRange'](_0x5242e4)){if(_0x34a34e?.[_0x1343a4(0x175)]===process[_0x1343a4(0xe0)]&&_0x34a34e[_0x1343a4(0x1a4)])_0x115c26['push'](_0x34a34e[_0x1343a4(0x1a4)]);}for(const _0x4e0174 of _0x115c26){try{await this[_0x1343a4(0xbd)](_0x4e0174);}catch{}}}catch{}}async[_0x4f806b(0x115)](){const _0x5ed36e=_0x4f806b;return this[_0x5ed36e(0x19c)](this['_buildOwnRow']());}async['publishChildRow'](_0x5980db){const _0x534428=_0x4f806b;if(!this[_0x534428(0x1d5)]||!this[_0x534428(0x285)])return;return this['putNode'](this[_0x534428(0x151)](_0x5980db));}[_0x4f806b(0x151)]({pid:_0xd0afc6,startedAt:_0x483375,kind:_0xfcb33d,supervisorKey:_0x229373,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x4f806b(0x1fb),meta:meta=null,stats:stats=null}){const _0xeadcd2=_0x4f806b,_0x469a3d=Date[_0xeadcd2(0x1c0)](),_0x399c4d=_0x1145fc(_0xd0afc6,_0x483375);return{'nodeKey':_0x10c28c(_0x399c4d,'0'),'processKey':_0x399c4d,'instanceId':'0','pid':_0xd0afc6,'startedAt':_0x483375,'ppid':process[_0xeadcd2(0xe0)],'host':_0x259d8d[_0xeadcd2(0x1cf)](),'supervisorKey':_0x229373,'slot':slot,'slotKey':slotKey,'kind':_0xfcb33d,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x469a3d,'expiresAt':_0x469a3d+_0x3ccaff,'caps':this[_0xeadcd2(0x27a)](_0xfcb33d,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x31a59e){const _0x542cb0=_0x4f806b;if(!_0x31a59e?.['pid'])return null;const _0x56b52d=_0x1145fc(_0x31a59e[_0x542cb0(0xe0)],_0x31a59e[_0x542cb0(0x20b)]);this[_0x542cb0(0x245)][_0x542cb0(0x2bb)](_0x56b52d,{..._0x31a59e,'supervisorKey':_0x31a59e[_0x542cb0(0x181)]??this[_0x542cb0(0x1a5)]});if(this[_0x542cb0(0x285)])await this[_0x542cb0(0xea)](this['_children'][_0x542cb0(0xf2)](_0x56b52d))[_0x542cb0(0x2b1)]?.(()=>{});return _0x56b52d;}['removeSupervisedChild'](_0xe89ee9){const _0x3551d6=_0x4f806b;if(!_0xe89ee9)return;return this[_0x3551d6(0x245)][_0x3551d6(0xd3)](_0xe89ee9),this[_0x3551d6(0xbd)](_0xe89ee9);}[_0x4f806b(0x2b7)](){const _0x515501=_0x4f806b,_0x33e696=Date[_0x515501(0x1c0)](),_0x3287a7=process['cpuUsage'](),_0x28862d=(_0x33e696-this[_0x515501(0xfe)])*0x3e8;if(_0x28862d>=0x3d090){const _0x1b75b0=_0x3287a7[_0x515501(0x1c1)]-this[_0x515501(0x1ee)]['user']+(_0x3287a7[_0x515501(0x212)]-this['_lastCpuUsage']['system']),_0x5ab155=_0x259d8d['cpus']()['length']||0x1;this[_0x515501(0x13a)]=Math[_0x515501(0x1b7)](0x64,Math['round'](_0x1b75b0/(_0x28862d*_0x5ab155)*0x64)),this[_0x515501(0x147)]=Math[_0x515501(0x153)](_0x28862d/0x3e8),this[_0x515501(0x1ee)]=_0x3287a7,this[_0x515501(0xfe)]=_0x33e696;}const _0x4ba41a=process[_0x515501(0x1dd)](),_0x55b3ca=this['_threadStats']['size'];let _0x1e8dbd=0x0;if(_0x55b3ca>0x0){const _0x1c7a30=[this[_0x515501(0x295)],...this['okdb'][_0x515501(0x2ae)]?.['values']?.()??[]];for(const _0x21acb1 of _0x1c7a30){const _0x36a1ec=_0x21acb1['functions']?.[_0x515501(0x232)];if(_0x36a1ec)_0x1e8dbd+=_0x36a1ec['liveThreadStats'][_0x515501(0x1b3)];}}let _0x89072b=null;const _0x3bfac0=_0x55b3ca;if(_0x3bfac0>0x0){let _0x59dad9=0x0;for(const _0x57542f of this['_threadStats'][_0x515501(0x226)]())_0x59dad9+=_0x57542f['heapUsed']||0x0;_0x89072b={'count':_0x3bfac0,'heapUsed':_0x59dad9,'sandbox':_0x55b3ca,'busy':_0x1e8dbd};}return{'rss':_0x4ba41a['rss'],'heapUsed':_0x4ba41a['heapUsed'],'heapTotal':_0x4ba41a[_0x515501(0xe1)],'external':_0x4ba41a[_0x515501(0x105)],'cpuPct':this[_0x515501(0x13a)],'cpuWindowMs':this[_0x515501(0x147)]??null,'threads':_0x89072b,'at':_0x33e696};}[_0x4f806b(0x128)](_0x19243f,_0x1a832b){const _0x4eab99=_0x4f806b;if(!_0x19243f||!_0x1a832b)return;this[_0x4eab99(0x207)][_0x4eab99(0x2bb)](_0x19243f,_0x1a832b);}[_0x4f806b(0x11a)](_0x3edbcb){const _0x3c7cf4=_0x4f806b;this[_0x3c7cf4(0x207)][_0x3c7cf4(0xd3)](_0x3edbcb);}[_0x4f806b(0x17f)](_0x41dac8,_0x258175,_0x40bf4b=undefined){const _0x534c25=_0x4f806b,_0x432272=this[_0x534c25(0x245)][_0x534c25(0xf2)](_0x41dac8);if(!_0x432272||!_0x258175)return;if(_0x40bf4b!==undefined)_0x432272[_0x534c25(0x284)]=_0x40bf4b;_0x432272['stats']={'rss':_0x258175[_0x534c25(0x1a0)]??null,'heapUsed':_0x258175[_0x534c25(0x2a1)]??null,'heapTotal':_0x258175['heapTotal']??null,'external':_0x258175[_0x534c25(0x105)]??null,'cpuPct':_0x258175[_0x534c25(0x28a)]??null,'cpuWindowMs':_0x258175[_0x534c25(0x274)]??null,'threads':_0x258175['threads']??null,'claims':_0x258175[_0x534c25(0x192)]??null,'envsOpen':_0x258175[_0x534c25(0xc9)]??null,'at':Date[_0x534c25(0x1c0)]()};}[_0x4f806b(0x2b0)](){const _0x3218a8=_0x4f806b,_0x5e9697=Date[_0x3218a8(0x1c0)](),_0x1d3f5b=this[_0x3218a8(0x295)][_0x3218a8(0x25e)]||{},_0x20a87d=this['_kind']||_0x3218a8(0x21d);return{'nodeKey':this['_rowKey'],'processKey':this[_0x3218a8(0x1a5)],'instanceId':this[_0x3218a8(0x134)],'pid':process[_0x3218a8(0xe0)],'startedAt':this[_0x3218a8(0x156)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x3218a8(0x175)]==='number'?process[_0x3218a8(0x175)]:null,'host':_0x259d8d[_0x3218a8(0x1cf)](),'supervisorKey':this[_0x3218a8(0x135)]??null,'version':require$$6[_0x3218a8(0x17c)],'kind':_0x20a87d,'role':{'engines':!!_0x1d3f5b['engines'],'processors':!!_0x1d3f5b[_0x3218a8(0x1f3)],'compaction':_0x1d3f5b[_0x3218a8(0x29f)],'http':_0x1d3f5b[_0x3218a8(0x2ec)]},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0x5e9697,'expiresAt':_0x5e9697+_0x3ccaff,'caps':this[_0x3218a8(0x27a)](_0x20a87d,_0x1d3f5b),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x3218a8(0x2ab)]},'processing':_0x1d3f5b[_0x3218a8(0x1f3)]?this[_0x3218a8(0x1bb)]():null,'engines':_0x1d3f5b[_0x3218a8(0x2ed)]?[...this['okdb'][_0x3218a8(0x239)]??[]]:null,'singletonClaims':this[_0x3218a8(0xf4)](),'stats':this[_0x3218a8(0x2b7)](),'writers':this[_0x3218a8(0x24e)]()};}[_0x4f806b(0x24e)](){const _0x48c68f=_0x4f806b,_0x209acd={};try{for(const [_0x11a2e4,_0x3d4a9e]of this[_0x48c68f(0x295)][_0x48c68f(0x2ae)]){try{const _0x1f53be=_0x3d4a9e[_0x48c68f(0x23b)]?.();if(!_0x1f53be)continue;if(!_0x1f53be['depth']&&!_0x1f53be['committed']&&!(_0x1f53be[_0x48c68f(0x283)]??0x0)&&!_0x1f53be[_0x48c68f(0x2d6)])continue;_0x209acd[_0x11a2e4]={'depth':_0x1f53be[_0x48c68f(0xdc)],'oldestPendingMs':_0x1f53be[_0x48c68f(0x10d)],'committed':_0x1f53be[_0x48c68f(0x2c6)],'commitsPerSec':_0x1f53be[_0x48c68f(0x2c9)],'commitP99Ms':_0x1f53be[_0x48c68f(0x155)],'parkedNow':_0x1f53be['parkedNow']??0x0,'draining':!!_0x1f53be[_0x48c68f(0x2d6)]};}catch{}}}catch{}return Object[_0x48c68f(0x14c)](_0x209acd)[_0x48c68f(0x136)]?_0x209acd:null;}[_0x4f806b(0xf4)](){const _0x4cfa75=_0x4f806b,_0x3338a9=process[_0x4cfa75(0xe0)],_0x2d3de1=Date['now'](),_0x50b179=_0x4b6a53=>{const _0x5ba247=_0x4cfa75;if(!_0x4b6a53)return[];const _0x2ba054=[];try{for(const {id:_0x3b9375,entry:_0x4ddade}of _0x4b6a53[_0x5ba247(0x2dc)]()){if(_0x4ddade?.[_0x5ba247(0x28c)]?.[_0x5ba247(0xe0)]!==_0x3338a9)continue;const _0x38a71b=_0x4ddade[_0x5ba247(0x221)]??_0x4ddade[_0x5ba247(0xeb)]??0x0;if(_0x38a71b+(_0x4ddade[_0x5ba247(0x2d2)]??0x0)<_0x2d3de1)continue;_0x2ba054['push'](_0x3b9375);}}catch{}return _0x2ba054;},_0x3ab7f5=_0x50b179(this[_0x4cfa75(0x137)](_0x4cfa75(0xd0))),_0x56b3ad=_0x50b179(this[_0x4cfa75(0x137)](_0x4cfa75(0xd7)));if(!_0x3ab7f5['length']&&!_0x56b3ad[_0x4cfa75(0x136)])return null;return{'compact':_0x3ab7f5,'replicate':_0x56b3ad};}[_0x4f806b(0x137)](_0x1e415a){const _0xd25070=_0x4f806b;if(!this['okdb']?.[_0xd25070(0x190)])return null;if(!this[_0xd25070(0x131)])this[_0xd25070(0x131)]=new Map();let _0x54aa49=this['_singletonLocks'][_0xd25070(0xf2)](_0x1e415a);if(!_0x54aa49)try{_0x54aa49=new _0x29c247(this['okdb']['_rootDb'],{'namespace':_0x1e415a}),this[_0xd25070(0x131)][_0xd25070(0x2bb)](_0x1e415a,_0x54aa49);}catch{return null;}return _0x54aa49;}[_0x4f806b(0x1bb)](){const _0xc7803=_0x4f806b,_0x15f536=[];try{for(const [_0x2df790,_0x18cd16]of this[_0xc7803(0x295)]['_envs']){if(_0x2df790[_0xc7803(0x1d6)]('~'))continue;for(const _0x76dae0 of _0x18cd16[_0xc7803(0xd5)]['tierList']())_0x15f536[_0xc7803(0x1ad)]({..._0x76dae0,'env':_0x2df790});}}catch{}return{'participate':this[_0xc7803(0x295)]['processors']?.[_0xc7803(0x1cd)]??![],'processors':_0x15f536};}['_ensureDesired'](){const _0x325021=_0x4f806b;if(this[_0x325021(0x2c4)])return!![];const _0x1f8ffa=this[_0x325021(0x295)][_0x325021(0x190)];if(!_0x1f8ffa)return![];return this[_0x325021(0x2c4)]=_0x1f8ffa[_0x325021(0x293)](_0x5c3736,{'dupSort':![]}),this['_cmd']=_0x1f8ffa[_0x325021(0x293)](_0x3989e7,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x147e75=_0x4f806b;if(!this[_0x147e75(0x141)]())return;const _0x5c653e=_0x147e75(0x2c1),_0x4a28c0=0x1,_0x2ebdc1=this[_0x147e75(0x2c4)]['get'](_0x5c653e)??0x0;if(_0x2ebdc1>=_0x4a28c0)return;const _0x44ac2b=_0xdc7920=>{const _0x161166=_0x147e75;if(_0xdc7920===_0x161166(0xca))return _0x161166(0x2d9);if(_0xdc7920===_0x161166(0x287))return _0x161166(0x2a4);return _0xdc7920;};await this[_0x147e75(0x295)][_0x147e75(0x1e8)][_0x147e75(0x154)]['transaction'](()=>{const _0x38920d=_0x147e75;for(const _0x5613a3 of[_0x38920d(0x229),_0x38920d(0x169)]){for(const {key:_0x54c63f,value:_0x48f341}of this[_0x38920d(0x2c4)]['getRange']({'start':_0x5613a3,'end':_0x5613a3+'\xff'})){if(typeof _0x54c63f!=='string'||!_0x54c63f[_0x38920d(0x1d6)](_0x5613a3))break;const _0x3ab485=_0x44ac2b(_0x48f341[_0x38920d(0x213)]);if(_0x3ab485!==_0x48f341[_0x38920d(0x213)])this[_0x38920d(0x2c4)]['put'](_0x54c63f,{..._0x48f341,'mode':_0x3ab485});}}this[_0x38920d(0x2c4)][_0x38920d(0x275)](_0x5c653e,_0x4a28c0);});}[_0x4f806b(0x2b8)](){const _0xd6e609=_0x4f806b;return!!this[_0xd6e609(0x2c4)];}[_0x4f806b(0x2dd)](_0xd3e61,_0x1d32db){const _0x2bf0c9=_0x4f806b;if(!this['_ensureDesired']())return null;const _0x27b406=_0xd3e61+'/'+_0x1d32db;return this[_0x2bf0c9(0x1a6)](),this[_0x2bf0c9(0x206)][_0x2bf0c9(0xf2)](_0x27b406)??this['_desired'][_0x2bf0c9(0xf2)](_0x27b406)??null;}[_0x4f806b(0x1a6)](){const _0x43d2ce=_0x4f806b;if(!_0x5096c4)return;try{this[_0x43d2ce(0x295)][_0x43d2ce(0x1e8)]?.['db']?.[_0x43d2ce(0x182)]?.();}catch{}}async[_0x4f806b(0x1c5)](_0x5a05b7,_0x3dbabf,_0x7452fa){const _0x749536=_0x4f806b;if(!this[_0x749536(0x141)]())return null;const _0x1da6fc=_0x5a05b7+'/'+_0x3dbabf;this[_0x749536(0x1a6)]();const _0x5e644d=this[_0x749536(0x206)]['get'](_0x1da6fc)??this[_0x749536(0x2c4)][_0x749536(0xf2)](_0x1da6fc)??{'version':0x0},_0x471f50=(_0x5e644d[_0x749536(0x17c)]||0x0)+0x1,_0x1694b1={..._0x5e644d,..._0x7452fa,'version':_0x471f50,'updatedAt':Date[_0x749536(0x1c0)]()};this[_0x749536(0x206)][_0x749536(0x2bb)](_0x1da6fc,_0x1694b1);try{await this[_0x749536(0x295)][_0x749536(0x1e8)]['_writer']['transaction'](()=>{const _0x4f402d=_0x749536;this[_0x4f402d(0x2c4)][_0x4f402d(0x275)](_0x1da6fc,_0x1694b1);});}finally{if(this['_desiredOverlay'][_0x749536(0xf2)](_0x1da6fc)===_0x1694b1)this[_0x749536(0x206)][_0x749536(0xd3)](_0x1da6fc);}return _0x471f50;}[_0x4f806b(0x210)](_0xd1f7f6){const _0x3150be=_0x4f806b;if(!this[_0x3150be(0x141)]())return[];this[_0x3150be(0x1a6)]();const _0x3c1f0f=_0xd1f7f6+'/',_0x42c7c4=[];for(const {key:_0x5215a2,value:_0x6cd990}of this[_0x3150be(0x2c4)][_0x3150be(0x1ae)]({'start':_0x3c1f0f,'end':_0x3c1f0f+'\xff'})){if(typeof _0x5215a2!==_0x3150be(0x19d)||!_0x5215a2[_0x3150be(0x1d6)](_0x3c1f0f))break;_0x42c7c4['push']({'key':_0x5215a2[_0x3150be(0x208)](_0x3c1f0f['length']),'value':_0x6cd990});}return _0x42c7c4;}[_0x4f806b(0x117)](_0x520357){const _0x18e6f9=_0x4f806b;if(!this['_ensureDesired']())return null;return this[_0x18e6f9(0x119)][_0x18e6f9(0xf2)](_0x520357)??null;}async[_0x4f806b(0x201)](_0x1a7303,_0xa1dc57,_0x4d6a7f={}){const _0x44806b=_0x4f806b;if(!this['_ensureDesired']())return null;let _0x454515;return await this[_0x44806b(0x295)]['_systemEnv'][_0x44806b(0x154)]['transaction'](()=>{const _0x2970fa=_0x44806b,_0x2495ea=this[_0x2970fa(0x119)][_0x2970fa(0xf2)](_0x1a7303)||{'epoch':0x0};_0x454515=(_0x2495ea[_0x2970fa(0x104)]||0x0)+0x1,this[_0x2970fa(0x119)]['put'](_0x1a7303,{..._0x2495ea,..._0x4d6a7f,'cmd':_0xa1dc57,'epoch':_0x454515,'updatedAt':Date['now']()});}),_0x454515;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x3b0db9,'nodeKey':_0x1145fc,'logicalKey':_0x286144,'slotKey':_0x23b77e,'PROCESS_ENV':_0x2ef1f8,'NODE_TYPE':_0x5242e4},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x393910=_0x2ee730;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x369774=require$$0$4,{clampTimerDelay:_0x2b9c88}=requireOkdbTimers(),{EVENTS:_0x765a0e,CHANGE_ACTIONS:_0x328390}=requireOkdbEnums(),{LOOP:_0x1008fb}=requireOkdbLoopMonitor(),_0xf0539c=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x582db5=0x5,_0x142353=0x2710;class _0x18ef68 extends _0x369774{constructor(_0x53192c,_0x22a864={}){const _0x255f53=_0x302a;super(),this['okdb']=_0x53192c,this[_0x255f53(0x195)]=_0x22a864['quantum']??_0xf0539c,this[_0x255f53(0x224)]=_0x22a864['flushDebounce']??_0x582db5,this[_0x255f53(0x27d)]=_0x22a864[_0x255f53(0x2a3)]??_0x142353,this[_0x255f53(0x24d)]=![],this[_0x255f53(0x103)]=new Map(),this['_baselines']=new Map(),this[_0x255f53(0x29d)]=new Map(),this[_0x255f53(0x26a)]=null,this['_draining']=![],this[_0x255f53(0x1d0)]=new Set(),this[_0x255f53(0x228)]=new Set(),this[_0x255f53(0x11f)]=_0x596ca3=>this[_0x255f53(0x297)](_0x596ca3),this[_0x255f53(0xe9)]=_0x56c75d=>this[_0x255f53(0x21e)](_0x56c75d),this[_0x255f53(0x122)]=_0x1809ad=>this[_0x255f53(0xcf)](_0x1809ad),this[_0x255f53(0x130)]=()=>this[_0x255f53(0x272)]();}[_0x393910(0xc8)](){const _0x321caa=_0x393910;if(this[_0x321caa(0x24d)])return;this[_0x321caa(0x24d)]=!![];for(const [_0x4a4272,_0x496373]of this['okdb'][_0x321caa(0x2ae)]){if(_0x4a4272['startsWith']('~'))continue;try{_0x496373[_0x321caa(0x1d4)]();}catch{}}for(const [_0x138ab5,_0x3b89bb]of this['okdb'][_0x321caa(0x2ae)]){if(_0x138ab5['startsWith']('~'))continue;try{this[_0x321caa(0x29b)][_0x321caa(0x2bb)](_0x138ab5,_0x3b89bb[_0x321caa(0x219)]()||0x0);}catch{}}const {events:_0x1aae8e}=this[_0x321caa(0x295)];_0x1aae8e['on'](_0x765a0e['ITEM_PENDING'],this[_0x321caa(0xe9)]),_0x1aae8e['on'](_0x765a0e['ITEM_CREATE'],this[_0x321caa(0x11f)]),_0x1aae8e['on'](_0x765a0e[_0x321caa(0x20d)],this[_0x321caa(0x11f)]),_0x1aae8e['on'](_0x765a0e[_0x321caa(0x18d)],this['_onItem']),_0x1aae8e['on'](_0x765a0e[_0x321caa(0xdd)],this[_0x321caa(0x122)]),_0x1aae8e['once'](_0x765a0e[_0x321caa(0x278)],this[_0x321caa(0x130)]);}[_0x393910(0x272)](){const _0x12cba7=_0x393910;if(!this[_0x12cba7(0x24d)])return;this[_0x12cba7(0x24d)]=![];const {events:_0x585a55}=this[_0x12cba7(0x295)];_0x585a55[_0x12cba7(0x282)](_0x765a0e['ITEM_PENDING'],this[_0x12cba7(0xe9)]),_0x585a55['off'](_0x765a0e[_0x12cba7(0x127)],this['_onItem']),_0x585a55[_0x12cba7(0x282)](_0x765a0e[_0x12cba7(0x20d)],this[_0x12cba7(0x11f)]),_0x585a55[_0x12cba7(0x282)](_0x765a0e[_0x12cba7(0x18d)],this['_onItem']),_0x585a55[_0x12cba7(0x282)](_0x765a0e[_0x12cba7(0xdd)],this['_onPoke']);try{_0x585a55['off'](_0x765a0e[_0x12cba7(0x278)],this['_onStop']);}catch{}this[_0x12cba7(0x26a)]&&(clearTimeout(this['_flushTimer']),this[_0x12cba7(0x26a)]=null),this[_0x12cba7(0x29d)][_0x12cba7(0xf1)](),this[_0x12cba7(0x103)]['clear'](),this[_0x12cba7(0x29b)][_0x12cba7(0xf1)](),this[_0x12cba7(0x1d0)]['clear'](),this[_0x12cba7(0x228)][_0x12cba7(0xf1)]();}['_dedupeKey'](_0x5dfca9,_0x307fbb,_0x1e67d4,_0x4b5fb0){return _0x5dfca9+'\x00'+_0x307fbb+'\x00'+_0x1e67d4+'\x00'+_0x4b5fb0;}[_0x393910(0x202)](_0xbb65c3,_0x250664,_0x1df466,_0x1e0ea4){const _0x4a00fd=_0x393910,_0x2cd684=this[_0x4a00fd(0x1db)](_0xbb65c3,_0x250664,_0x1df466,_0x1e0ea4);if(this['_seen'][_0x4a00fd(0xc5)](_0x2cd684))return![];this[_0x4a00fd(0x1d0)]['add'](_0x2cd684);if(this[_0x4a00fd(0x1d0)][_0x4a00fd(0x252)]>this[_0x4a00fd(0x27d)]){const _0x170917=this[_0x4a00fd(0x1d0)]['values']()[_0x4a00fd(0x18b)]()[_0x4a00fd(0x2ad)];this[_0x4a00fd(0x1d0)][_0x4a00fd(0xd3)](_0x170917);}return!![];}[_0x393910(0x21e)](_0x444177){const _0x1841a0=_0x393910;if(!this['_started']||!_0x444177)return;const {env:_0x32375e,type:_0x5cbb2b,key:_0x5cb844,clock:_0x4cd954}=_0x444177;if(_0x32375e==null||_0x5cbb2b==null||_0x5cb844==null)return;if(typeof _0x32375e==='string'&&_0x32375e[_0x1841a0(0x1d6)]('~'))return;if(typeof _0x5cbb2b===_0x1841a0(0x19d)&&_0x5cbb2b[_0x1841a0(0x1d6)]('~'))return;this[_0x1841a0(0x228)]['add'](this[_0x1841a0(0x1db)](_0x32375e,_0x5cbb2b,_0x5cb844,_0x4cd954)),this[_0x1841a0(0x228)][_0x1841a0(0x252)]>this[_0x1841a0(0x27d)]&&this[_0x1841a0(0x228)][_0x1841a0(0xd3)](this['_pendingLocal']['values']()[_0x1841a0(0x18b)]()[_0x1841a0(0x2ad)]);}[_0x393910(0x297)](_0x5ce488){const _0x468a9c=_0x393910;if(!this[_0x468a9c(0x24d)]||!_0x5ce488)return;const {env:_0x2429b0,type:_0x2a7ce8,key:_0x2eba8c,clock:_0x246bfc,origin:_0x20f50b,action:_0x9d09cc,newValue:_0xb43688,oldValue:_0x3c68cb}=_0x5ce488;if(_0x2429b0==null||_0x2a7ce8==null||_0x2eba8c==null)return;if(typeof _0x2429b0===_0x468a9c(0x19d)&&_0x2429b0[_0x468a9c(0x1d6)]('~'))return;if(typeof _0x2a7ce8===_0x468a9c(0x19d)&&_0x2a7ce8['startsWith']('~'))return;this[_0x468a9c(0x228)]['delete'](this[_0x468a9c(0x1db)](_0x2429b0,_0x2a7ce8,_0x2eba8c,_0x246bfc));if(!this[_0x468a9c(0x202)](_0x2429b0,_0x2a7ce8,_0x2eba8c,_0x246bfc))return;const _0x36e251=_0x9d09cc===_0x328390[_0x468a9c(0x22d)]?_0x468a9c(0x1b0):_0x468a9c(0x275);this[_0x468a9c(0x1eb)](_0x468a9c(0x16b),{'env':_0x2429b0,'type':_0x2a7ce8,'key':_0x2eba8c,'op':_0x36e251,'clock':_0x246bfc,'origin':_0x20f50b,'value':_0x36e251===_0x468a9c(0x1b0)?null:_0xb43688,'prevValue':_0x3c68cb});}[_0x393910(0xcf)](_0x19d8ff){const _0x7db704=_0x393910;if(!this['_started'])return;if(!_0x19d8ff||typeof _0x19d8ff['env']!=='string'||typeof _0x19d8ff[_0x7db704(0x19f)]!==_0x7db704(0x19d))return;const {env:_0xa32a2a,type:_0x5da1fb}=_0x19d8ff;if(_0xa32a2a['startsWith']('~')||_0x5da1fb[_0x7db704(0x1d6)]('~'))return;this[_0x7db704(0x29d)][_0x7db704(0x2bb)](_0xa32a2a+'\x00'+_0x5da1fb,{'env':_0xa32a2a,'type':_0x5da1fb}),this[_0x7db704(0x1b4)]();}[_0x393910(0x1b4)](){const _0x3e6361=_0x393910;if(this[_0x3e6361(0x26a)])return;const _0x291cfd=()=>{const _0x465a69=_0x3e6361;this['_flushTimer']=null,this[_0x465a69(0xb8)]()[_0x465a69(0x2b1)](()=>{});};this[_0x3e6361(0x26a)]=setTimeout(_0x291cfd,_0x2b9c88(this[_0x3e6361(0x224)]));}async['_drain'](){const _0x1c8e93=_0x393910;if(this[_0x1c8e93(0x1ed)]){this[_0x1c8e93(0x1b4)]();return;}this[_0x1c8e93(0x1ed)]=!![];try{const _0x4a28c4=[...this[_0x1c8e93(0x29d)][_0x1c8e93(0x226)]()];this[_0x1c8e93(0x29d)][_0x1c8e93(0xf1)]();let _0x13caf8=![];for(const {env:_0x2da8fd,type:_0x3f9d64}of _0x4a28c4){try{const _0x5cd8db=await this['_drainOne'](_0x2da8fd,_0x3f9d64);if(_0x5cd8db)_0x13caf8=!![];}catch{this[_0x1c8e93(0x29d)][_0x1c8e93(0x2bb)](_0x2da8fd+'\x00'+_0x3f9d64,{'env':_0x2da8fd,'type':_0x3f9d64}),_0x13caf8=!![];}}if(_0x13caf8||this['_pending'][_0x1c8e93(0x252)]>0x0)this[_0x1c8e93(0x1b4)]();}finally{this[_0x1c8e93(0x1ed)]=![];}}async[_0x393910(0x1d9)](_0x25ed13,_0x5a81ee){const _0x2a5531=_0x393910,_0x1d80e=await this[_0x2a5531(0x295)][_0x2a5531(0x2e9)](_0x25ed13),_0x3bc09c=_0x25ed13+'\x00'+_0x5a81ee;!this[_0x2a5531(0x103)]['has'](_0x3bc09c)&&(!this[_0x2a5531(0x29b)][_0x2a5531(0xc5)](_0x25ed13)&&(_0x1d80e[_0x2a5531(0x1d4)](),this[_0x2a5531(0x29b)][_0x2a5531(0x2bb)](_0x25ed13,_0x1d80e['getClock']()||0x0)),this['_cursors'][_0x2a5531(0x2bb)](_0x3bc09c,this[_0x2a5531(0x29b)][_0x2a5531(0xf2)](_0x25ed13)));const _0x3adeb7=this[_0x2a5531(0x103)][_0x2a5531(0xf2)](_0x3bc09c),_0x5926d3=_0x1d80e[_0x2a5531(0x219)](_0x5a81ee)||0x0;if(_0x5926d3<=_0x3adeb7)return![];const _0x43fa7b=_0x3adeb7+this['_quantum'],_0x4fd35d=Math['min'](_0x5926d3,_0x43fa7b),_0x5320e0=_0x1008fb[_0x2a5531(0x17e)]?_0x1008fb[_0x2a5531(0x1c0)]():0x0,_0x3b7d40=Array[_0x2a5531(0x17b)](_0x1d80e[_0x2a5531(0x172)](_0x5a81ee,_0x3adeb7+0x1,_0x4fd35d));let _0x3e55bd=_0x3adeb7;for(const _0x21586a of _0x3b7d40){const {clock:_0x1d4245,key:_0x46c46d,action:_0x282439,origin:_0x155864}=_0x21586a;if(_0x1d4245>_0x3e55bd)_0x3e55bd=_0x1d4245;if(_0x46c46d==null)continue;if(this['_pendingLocal'][_0x2a5531(0xc5)](this['_dedupeKey'](_0x25ed13,_0x5a81ee,_0x46c46d,_0x1d4245)))continue;if(!this['_markSeen'](_0x25ed13,_0x5a81ee,_0x46c46d,_0x1d4245))continue;let _0x5246eb,_0x41a565;if(_0x282439===_0x328390[_0x2a5531(0x22d)])_0x5246eb='remove',_0x41a565=null;else{const _0x87064=_0x1d80e[_0x2a5531(0xf2)](_0x5a81ee,_0x46c46d);_0x87064==null?(_0x5246eb=_0x2a5531(0x1b0),_0x41a565=null):(_0x5246eb=_0x2a5531(0x275),_0x41a565=_0x87064);}this[_0x2a5531(0x1eb)](_0x2a5531(0x16b),{'env':_0x25ed13,'type':_0x5a81ee,'key':_0x46c46d,'op':_0x5246eb,'clock':_0x1d4245,'origin':_0x155864,'value':_0x41a565});}if(_0x1008fb[_0x2a5531(0x17e)])_0x1008fb[_0x2a5531(0x243)]('feed:'+_0x25ed13+':'+_0x5a81ee,_0x1008fb[_0x2a5531(0x1c0)]()-_0x5320e0,'n='+_0x3b7d40[_0x2a5531(0x136)]);return this[_0x2a5531(0x103)][_0x2a5531(0x2bb)](_0x3bc09c,Math[_0x2a5531(0x24a)](_0x3e55bd,_0x4fd35d)),_0x1d80e['getClock'](_0x5a81ee)>_0x4fd35d;}['status'](){const _0x357880=_0x393910;return{'started':this[_0x357880(0x24d)],'quantum':this['_quantum'],'flushDebounce':this[_0x357880(0x224)],'cursors':Object[_0x357880(0x1ef)]([...this[_0x357880(0x103)][_0x357880(0x194)]()][_0x357880(0x279)](([_0x37e6f3,_0x2eb912])=>[_0x37e6f3[_0x357880(0x1fe)]('\x00',':'),_0x2eb912])),'pending':this[_0x357880(0x29d)][_0x357880(0x252)],'seen':this[_0x357880(0x1d0)][_0x357880(0x252)]};}}return _0x18ef68[_0x393910(0x1c8)]=_0xf0539c,okdbChangefeed={'OKDBChangefeed':_0x18ef68},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x17734b=_0x2ee730;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x31a090=require$$1$1,_0x3804be=require$$1,{EVENTS:_0x5dee7e}=requireOkdbEnums(),_0x513786=require$$0$3,{slotKey:_0x3b5bea}=requireOkdbProcessRegistry(),_0x4ec597=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x7375bc=0xfa0,_0x10d4d0=0x5,_0x2cdbd5=0x2710,_0x109a3f=0xbb8,_0x3222bc=0x7d0,_0x3e395e=_0x17734b(0x2a9),_0x5d2aca=_0x17734b(0x248),_0x41c5ff=_0x17734b(0x244),_0x45f01f=_0x17734b(0x16d),_0x40afaa=[_0x5dee7e[_0x17734b(0x1e6)],_0x5dee7e[_0x17734b(0x25a)],_0x5dee7e[_0x17734b(0x22a)],_0x5dee7e[_0x17734b(0x2b9)],_0x5dee7e['INDEX_PROGRESS'],_0x5dee7e[_0x17734b(0x1a9)],_0x5dee7e[_0x17734b(0x158)],_0x5dee7e[_0x17734b(0x12e)],'processor:ready','processor:progress',_0x17734b(0x1d2),'processor:paused',_0x17734b(0x260),_0x17734b(0x231)],_0x4a0aba=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x87335a=0x64;function _0x4ea13c(_0x15fad9){const _0x1c09bd=_0x17734b;if(!_0x15fad9)return _0x1c09bd(0x124);const _0x29ebae=(_0x15fad9[_0x1c09bd(0x1f3)]||[])[_0x1c09bd(0x279)](_0x299cdf=>[_0x299cdf[_0x1c09bd(0x2cb)],_0x299cdf['id'],_0x299cdf[_0x1c09bd(0x213)],_0x299cdf[_0x1c09bd(0x1f7)],!!_0x299cdf[_0x1c09bd(0x2a6)],!!_0x299cdf['unclaimed'],!!_0x299cdf[_0x1c09bd(0xf7)],_0x299cdf[_0x1c09bd(0x258)]?.[_0x1c09bd(0xe0)]??null,_0x299cdf[_0x1c09bd(0x1f4)]?String(_0x299cdf['error']?.[_0x1c09bd(0x2c7)]??_0x299cdf['error']):null]);return JSON[_0x1c09bd(0x1c9)]([!!_0x15fad9['participate'],_0x29ebae]);}function _0x16df4e({workers:_0xa4affb,makeOkdb:_0x2459bb,port:_0x343fa9,primaryOkdb:_0x5ec691,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x3f3a60=_0x17734b;if(_0x31a090[_0x3f3a60(0x12a)])return childEntry&&_0x31a090['setupPrimary']({'exec':_0x3804be[_0x3f3a60(0x261)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x5debee=_0x3f3a60,_0x25b551=[];for(let _0x1bb63e=0x0;_0x1bb63e<process[_0x5debee(0x150)]['length'];_0x1bb63e++){const _0x482d7b=process[_0x5debee(0x150)][_0x1bb63e];if(_0x482d7b['startsWith'](_0x5debee(0x2bf))||_0x482d7b[_0x5debee(0x1d6)](_0x5debee(0x255))||_0x482d7b[_0x5debee(0x1d6)](_0x5debee(0xb3)))continue;if(_0x482d7b==='-e'||_0x482d7b==='--eval'||_0x482d7b==='-p'||_0x482d7b===_0x5debee(0xf0)){_0x1bb63e++;continue;}_0x25b551[_0x5debee(0x1ad)](_0x482d7b);}return _0x25b551;})())}),_0x47822e({'workers':_0xa4affb,'port':_0x343fa9,'primaryOkdb':_0x5ec691,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x343fa9});return _0x986ec({'makeOkdb':_0x2459bb,'port':_0x343fa9});}function _0x47822e({workers:_0x6f30c1,port:_0x531411,primaryOkdb:_0x409b7e,workerEnv:_0x5691fb,workerRole:_0x5cf6eb,listenAddr:_0x5b046e}){const _0x3e2be8=_0x17734b,_0x25513d=new Map(),_0x316bba=new Map();let _0x58b644=![];const _0xbb050d=_0x3a539c=>_0x3a539c?.[_0x3e2be8(0x230)],_0x427c2f=_0x51aaea=>{const _0x4ec6cc=_0x3e2be8,_0x40c038=_0x31a090[_0x4ec6cc(0x251)]({...process.env,..._0x5691fb||{},'OKDB_CLUSTER_SLOT':String(_0x51aaea)});return _0x40c038['__okdbSlot']=_0x51aaea,_0x25513d['set'](_0x40c038[_0x4ec6cc(0x204)][_0x4ec6cc(0xe0)],{'worker':_0x40c038,'startedAt':Date[_0x4ec6cc(0x1c0)](),'slot':_0x51aaea}),_0x40c038['on'](_0x4ec6cc(0x1f4),_0x407733=>{const _0x227464=_0x4ec6cc;console[_0x227464(0x244)](_0x227464(0x273)+_0x40c038['process'][_0x227464(0xe0)]+_0x227464(0x2be)+(_0x407733?.['message']??_0x407733));}),_0x40c038['on'](_0x4ec6cc(0x1c2),()=>_0x52adc1()),_0x40c038;},_0x1578f8=_0xe0ee6d=>{const _0x50d0b0=_0x3e2be8;for(const {worker:_0x2a65eb}of _0x25513d['values']()){if(_0x2a65eb[_0x50d0b0(0x2ea)]()||!_0x2a65eb[_0x50d0b0(0x24f)]())continue;try{_0x2a65eb['send'](_0xe0ee6d);}catch{}}};_0x409b7e?.['_activateProcesses']?.({'kind':_0x3e2be8(0x27c),'listenAddr':_0x5b046e})[_0x3e2be8(0x2b1)](()=>{}),_0x409b7e?.[_0x3e2be8(0x2a0)]?.['setOwnMeta']?.({'workersConfigured':_0x6f30c1});const _0x23d0cf={'engines':!![],'processors':!![],'compaction':!![],..._0x5cf6eb,'http':!![]},_0x52adc1=()=>{const _0x12b245=_0x3e2be8,_0x3bf9fc=_0x409b7e?.[_0x12b245(0x2a0)];if(!_0x3bf9fc||!_0x3bf9fc[_0x12b245(0x285)])return;const _0x1bacd1=_0x3bf9fc['selfKey'];for(const {worker:_0xacd171,startedAt:_0xaf9688,slot:_0x1d9d9c,stats:_0x2c401e,processing:_0x56e6bd}of _0x25513d[_0x12b245(0x226)]()){if(_0xacd171[_0x12b245(0x2ea)]())continue;const _0x2cc5f8=_0x3bf9fc[_0x12b245(0x2b8)]?.()&&_0x3bf9fc[_0x12b245(0x2dd)](_0x12b245(0xf5),_0x173b42(_0x1d9d9c))?.[_0x12b245(0x211)]===!![];_0x3bf9fc[_0x12b245(0xea)]({'pid':_0xacd171['process'][_0x12b245(0xe0)],'startedAt':_0xaf9688,'kind':'http-server','supervisorKey':_0x1bacd1,'slot':_0x1d9d9c,'slotKey':_0x173b42(_0x1d9d9c),'role':_0x23d0cf,'listenAddr':_0x5b046e,'lifecycle':_0x2cc5f8?_0x12b245(0xae):'running','processing':_0x56e6bd??null,'stats':_0x2c401e??null})[_0x12b245(0x2b1)](()=>{});}},_0x173b42=_0x55c8f1=>_0x3b5bea('cluster:'+_0x531411,_0x55c8f1),_0x5ca2ad=_0x1df7d6=>{const _0x3db11e=_0x3e2be8,_0x2c5a84=_0x409b7e?.[_0x3db11e(0x2a0)];if(!_0x2c5a84?.['hasDesired']?.())return![];return _0x2c5a84['getDesired']('slot',_0x173b42(_0x1df7d6))?.[_0x3db11e(0x211)]===!![];};for(let _0xac3c2c=0x0;_0xac3c2c<_0x6f30c1;_0xac3c2c++){const _0x19c2fd=_0x5ca2ad(_0xac3c2c);_0x316bba[_0x3e2be8(0x2bb)](_0xac3c2c,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x19c2fd,'respawnTimer':null}),_0x19c2fd?console[_0x3e2be8(0x244)](_0x3e2be8(0x1a3)+_0xac3c2c+_0x3e2be8(0x15e)):_0x427c2f(_0xac3c2c);}const _0x5dfddd=()=>{const _0x14bad6=_0x3e2be8,_0x479806=_0x409b7e?.[_0x14bad6(0x2a0)];if(!_0x479806?.[_0x14bad6(0x285)]||!_0x479806[_0x14bad6(0x2b8)]?.())return;for(const [_0x5b3fae,_0x16f784]of _0x316bba[_0x14bad6(0x194)]()){const _0x1a3b74=_0x479806['getDesired'](_0x14bad6(0xf5),_0x173b42(_0x5b3fae)),_0x146e33=_0x1a3b74?.[_0x14bad6(0x211)]===!![],_0x99fd60=_0x1a3b74?.[_0x14bad6(0x2ce)]===!![];if(_0x146e33&&!_0x16f784[_0x14bad6(0xc0)]){_0x16f784['dead']=!![];_0x16f784['respawnTimer']&&(clearTimeout(_0x16f784['respawnTimer']),_0x16f784[_0x14bad6(0x2e1)]=null);for(const {worker:_0x44a9f5}of _0x25513d['values']()){if(_0xbb050d(_0x44a9f5)!==_0x5b3fae||_0x44a9f5[_0x14bad6(0x2ea)]())continue;try{if(_0x99fd60)_0x44a9f5[_0x14bad6(0x204)][_0x14bad6(0x2ce)](_0x14bad6(0x215));else _0x44a9f5[_0x14bad6(0x24f)]()&&_0x44a9f5[_0x14bad6(0x1df)]();}catch{}}console[_0x14bad6(0x244)](_0x14bad6(0x1af)+(_0x99fd60?'hard-killed':'decommissioned')+'\x20worker\x20slot='+_0x5b3fae+_0x14bad6(0xce));}else{if(!_0x146e33&&_0x16f784[_0x14bad6(0xc0)]&&_0x1a3b74){_0x16f784[_0x14bad6(0xc0)]=![],_0x16f784[_0x14bad6(0x1bc)]=[],_0x16f784[_0x14bad6(0xb6)]=0x0;const _0x5a900f=[..._0x25513d['values']()][_0x14bad6(0x14b)](({worker:_0x1792dd})=>_0xbb050d(_0x1792dd)===_0x5b3fae&&!_0x1792dd[_0x14bad6(0x2ea)]());!_0x5a900f&&!_0x58b644&&(_0x427c2f(_0x5b3fae),console[_0x14bad6(0x244)](_0x14bad6(0xf9)+_0x5b3fae));}}}},_0x362c6a=()=>{try{_0x5dfddd();}catch{}};_0x409b7e?.['events']?.['on']?.(_0x5dee7e['SYSTEM_PROC'],_0x362c6a);const _0x35a97e=[];if(_0x409b7e?.[_0x3e2be8(0x184)]?.['on'])for(const _0x221949 of _0x40afaa){const _0x33dddf=_0x3d945f=>{_0x1578f8({[_0x3e395e]:_0x5d2aca,'event':_0x221949,'data':_0x3d945f??{}});};_0x409b7e['events']['on'](_0x221949,_0x33dddf),_0x35a97e[_0x3e2be8(0x1ad)]({'event':_0x221949,'handler':_0x33dddf});}const _0x55bab0=setInterval(()=>{_0x5dfddd(),_0x52adc1();},_0x4a0aba);_0x55bab0['unref']?.();const _0x31de33=(_0x2c8b75,_0x2c65d5)=>{const _0x48b2d1=_0x3e2be8;if(!_0x2c65d5||typeof _0x2c65d5!==_0x48b2d1(0x144)||_0x2c65d5[_0x3e395e]!==_0x41c5ff)return;if(!_0x409b7e?.[_0x48b2d1(0x244)]?.[_0x48b2d1(0x1aa)])return;const _0x388d3b=_0x2c65d5[_0x48b2d1(0x26c)]||{};_0x409b7e[_0x48b2d1(0x244)][_0x48b2d1(0x1aa)]({..._0x388d3b,'msg':'[w'+_0x2c65d5[_0x48b2d1(0xf5)]+']\x20'+(_0x388d3b[_0x48b2d1(0xed)]??''),'meta':{..._0x388d3b[_0x48b2d1(0x1b2)]||{},'worker':_0x2c65d5['slot'],'workerPid':_0x2c65d5[_0x48b2d1(0xe0)]}});};_0x31a090['on'](_0x3e2be8(0x2c7),_0x31de33);const _0x4fe95a=(_0xb5bd46,_0x50d3bb)=>{const _0x91776f=_0x3e2be8;if(!_0x50d3bb||typeof _0x50d3bb!==_0x91776f(0x144)||_0x50d3bb[_0x3e395e]!==_0x45f01f)return;const _0x488576=_0x25513d[_0x91776f(0xf2)](_0xb5bd46[_0x91776f(0x204)][_0x91776f(0xe0)]);if(_0x488576){_0x488576['stats']={..._0x50d3bb[_0x91776f(0x16d)],'at':Date[_0x91776f(0x1c0)]()};if(_0x50d3bb['processing']!==undefined){const _0x590ee8=_0x4ea13c(_0x50d3bb[_0x91776f(0x284)]);_0x590ee8!==_0x488576[_0x91776f(0x139)]&&(_0x488576[_0x91776f(0x139)]=_0x590ee8,_0x1cdeff()),_0x488576[_0x91776f(0x284)]=_0x50d3bb[_0x91776f(0x284)];}}};let _0x5a8ab7=null;const _0x1cdeff=()=>{if(_0x5a8ab7||_0x58b644)return;_0x5a8ab7=setTimeout(()=>{_0x5a8ab7=null;if(!_0x58b644)_0x52adc1();},_0x87335a),_0x5a8ab7['unref']?.();};_0x31a090['on']('message',_0x4fe95a),_0x31a090['on'](_0x3e2be8(0x2b3),(_0x712835,_0x2fbea6,_0x375924)=>{const _0x56075e=_0x3e2be8,_0x28faee=_0x712835[_0x56075e(0x204)]['pid'],_0xc69efc=_0xbb050d(_0x712835),_0x16fffb=_0x25513d[_0x56075e(0xf2)](_0x28faee);if(_0x16fffb&&_0x409b7e?.[_0x56075e(0x2a0)])_0x409b7e[_0x56075e(0x2a0)]['removeNode'](_0x28faee+':'+_0x16fffb[_0x56075e(0x20b)])['catch'](()=>{});_0x25513d['delete'](_0x28faee),console[_0x56075e(0x244)](_0x56075e(0x273)+_0x28faee+'\x20(slot='+(_0xc69efc??'?')+')\x20exited\x20'+(_0x56075e(0xff)+_0x2fbea6+_0x56075e(0x101)+(_0x375924??_0x56075e(0x1c3))+_0x56075e(0x2d7)+_0x25513d[_0x56075e(0x252)]+_0x56075e(0x145))),_0x52adc1();if(_0x58b644||_0xc69efc==null)return;const _0x2c92aa=_0x316bba[_0x56075e(0xf2)](_0xc69efc);if(!_0x2c92aa||_0x2c92aa[_0x56075e(0xc0)])return;const _0x38a5eb=Date[_0x56075e(0x1c0)]();_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x1ad)](_0x38a5eb),_0x2c92aa[_0x56075e(0x1bc)]=_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x13b)](_0x1565a8=>_0x38a5eb-_0x1565a8<=_0x2cdbd5);if(_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x136)]>=_0x10d4d0){_0x2c92aa[_0x56075e(0xc0)]=!![],console['error']('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0xc69efc+_0x56075e(0x256)+_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x136)]+_0x56075e(0x167)+(_0x2cdbd5+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x25513d['size']+_0x56075e(0xd8)));return;}_0x2c92aa[_0x56075e(0xb6)]++;const _0x2fd9ba=Math[_0x56075e(0x1b7)](_0x7375bc,_0x4ec597*0x2**(_0x2c92aa['consecutiveFailures']-0x1));console[_0x56075e(0x244)](_0x56075e(0x17a)+_0xc69efc+_0x56075e(0xd6)+_0x2fd9ba+_0x56075e(0xef)+_0x2c92aa[_0x56075e(0xb6)]+')'),_0x2c92aa['respawnTimer']=setTimeout(()=>{const _0x3a3e00=_0x56075e;_0x2c92aa['respawnTimer']=null;if(_0x58b644||_0x2c92aa[_0x3a3e00(0xc0)])return;const _0x178039=_0x427c2f(_0xc69efc);_0x178039[_0x3a3e00(0x2e3)](_0x3a3e00(0x276),()=>{const _0x230329=_0x3a3e00;if(_0x316bba[_0x230329(0xf2)](_0xc69efc)===_0x2c92aa)_0x2c92aa[_0x230329(0xb6)]=0x0;});},_0x2fd9ba),_0x2c92aa['respawnTimer'][_0x56075e(0x2b4)]?.();});const _0x24af15=[..._0x25513d[_0x3e2be8(0x14c)]()];console[_0x3e2be8(0x244)]('[okdb-cluster]\x20primary\x20pid='+process[_0x3e2be8(0xe0)]+_0x3e2be8(0x2cd)+_0x6f30c1+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x531411+':\x20'+('['+_0x24af15[_0x3e2be8(0x261)](',\x20')+']'));const _0x2ccde3={'_isClusterController':!![],'port':_0x531411,'primaryOkdb':_0x409b7e??null,'status'(){const _0x58c843=_0x3e2be8;return{'clustered':!![],'primaryPid':process[_0x58c843(0xe0)],'port':_0x531411,'primaryRole':_0x409b7e?.[_0x58c843(0x152)]??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x25513d[_0x58c843(0x226)]()]['map'](({worker:_0x585117})=>({'pid':_0x585117['process'][_0x58c843(0xe0)],'id':_0x585117['id'],'dead':_0x585117[_0x58c843(0x2ea)]()}))};},async 'close'(){const _0x35b679=_0x3e2be8;_0x58b644=!![];for(const _0xfd5213 of _0x316bba[_0x35b679(0x226)]()){_0xfd5213[_0x35b679(0xc0)]=!![],_0xfd5213['respawnTimer']&&(clearTimeout(_0xfd5213['respawnTimer']),_0xfd5213['respawnTimer']=null);}clearInterval(_0x55bab0);_0x5a8ab7&&(clearTimeout(_0x5a8ab7),_0x5a8ab7=null);_0x31a090[_0x35b679(0x282)](_0x35b679(0x2c7),_0x31de33),_0x31a090[_0x35b679(0x282)](_0x35b679(0x2c7),_0x4fe95a),_0x409b7e?.[_0x35b679(0x184)]?.[_0x35b679(0x282)]?.(_0x5dee7e[_0x35b679(0x205)],_0x362c6a);if(_0x409b7e?.[_0x35b679(0x184)]?.[_0x35b679(0x282)])for(const {event:_0x482d24,handler:_0x2e87b8}of _0x35a97e){try{_0x409b7e[_0x35b679(0x184)]['off'](_0x482d24,_0x2e87b8);}catch{}}_0x35a97e[_0x35b679(0x136)]=0x0;const _0x4656d0=[..._0x25513d[_0x35b679(0x226)]()][_0x35b679(0x279)](({worker:_0x32e0f5})=>_0x32e0f5);if(_0x4656d0[_0x35b679(0x136)]===0x0)return;await Promise[_0x35b679(0xe4)](_0x4656d0[_0x35b679(0x279)](_0x3d2fdb=>new Promise(_0x426b9e=>{const _0x361d9d=_0x35b679;if(_0x3d2fdb[_0x361d9d(0x2ea)]()){_0x426b9e();return;}let _0x16dc30=![];const _0x263787=()=>{if(_0x16dc30)return;_0x16dc30=!![];if(_0x1f1d20)clearTimeout(_0x1f1d20);_0x426b9e();};_0x3d2fdb[_0x361d9d(0x2e3)](_0x361d9d(0x2b3),_0x263787);const _0x1f1d20=setTimeout(()=>{const _0x1a88d1=_0x361d9d;try{_0x3d2fdb[_0x1a88d1(0x204)]['kill']();}catch{}},_0x109a3f+0x1f4);_0x1f1d20['unref']?.();try{_0x3d2fdb[_0x361d9d(0x1df)]();}catch{try{_0x3d2fdb[_0x361d9d(0x204)][_0x361d9d(0x2ce)]();}catch{}}})));}};return _0x2ccde3;}async function _0x986ec({makeOkdb:_0x4f1405,port:_0x2d3108}){const _0x116039=_0x17734b,_0x13b5a8=await _0x4f1405();return _0x20a886(_0x13b5a8),_0x13b5a8[_0x116039(0x2ec)]['listen'](_0x2d3108);}function _0x20a886(_0x4a61ab){const _0x43ec6a=_0x17734b;if(!_0x4a61ab||_0x4a61ab['_clusterWorkerAttached'])return;_0x4a61ab[_0x43ec6a(0x294)]=!![];try{const {OKDBChangefeed:_0x4ace2c}=requireOkdbChangefeed(),_0x1af256=_0x4a61ab[_0x43ec6a(0xf3)];if(_0x1af256&&typeof _0x1af256[_0x43ec6a(0x2b2)]===_0x43ec6a(0x1d3)){const _0x47bb21=new _0x4ace2c(_0x4a61ab);_0x47bb21[_0x43ec6a(0xc8)](),_0x1af256[_0x43ec6a(0x2b2)](_0x47bb21),_0x4a61ab[_0x43ec6a(0x113)]=_0x47bb21;}}catch(_0x193efd){_0x4a61ab['log']?.[_0x43ec6a(0x2c5)]?.(_0x43ec6a(0x112)+(_0x193efd?.[_0x43ec6a(0x2c7)]??_0x193efd),{'feature':_0x43ec6a(0x265)});}const _0x4fdd54=_0x3a9631=>{const _0x3819e7=_0x43ec6a;if(!_0x3a9631||typeof _0x3a9631!==_0x3819e7(0x144)||_0x3a9631[_0x3e395e]==null)return;if(_0x3a9631[_0x3e395e]===_0x5d2aca)try{_0x4a61ab[_0x3819e7(0xf3)]?.[_0x3819e7(0xac)]?.(_0x3a9631[_0x3819e7(0xb0)],_0x3a9631[_0x3819e7(0x253)]);}catch{}};process['on'](_0x43ec6a(0x2c7),_0x4fdd54),_0x4a61ab[_0x43ec6a(0xc2)]=_0x4fdd54;{let _0x9fb025=process[_0x43ec6a(0x18e)](),_0x3a012d=Date['now']();const _0x123089=()=>{const _0x4b7c3c=_0x43ec6a;if(typeof process[_0x4b7c3c(0x23a)]!==_0x4b7c3c(0x1d3)||!process[_0x4b7c3c(0xb5)])return;const _0x22e976=Date['now'](),_0x6a806b=process['cpuUsage'](),_0x4e0303=(_0x22e976-_0x3a012d)*0x3e8,_0x37b7cd=_0x6a806b['user']-_0x9fb025[_0x4b7c3c(0x1c1)]+(_0x6a806b['system']-_0x9fb025[_0x4b7c3c(0x212)]),_0x32ce8f=_0x4e0303>0x0?Math['min'](0x64,Math[_0x4b7c3c(0x153)](_0x37b7cd/(_0x4e0303*(_0x513786[_0x4b7c3c(0x2bd)]()[_0x4b7c3c(0x136)]||0x1))*0x64)):0x0;_0x9fb025=_0x6a806b,_0x3a012d=_0x22e976;const _0x4f3ad6=process[_0x4b7c3c(0x1dd)]();let _0x8f5402=null;try{_0x8f5402=_0x4a61ab[_0x4b7c3c(0x152)]?.[_0x4b7c3c(0x1f3)]?_0x4a61ab[_0x4b7c3c(0x2a0)]?.[_0x4b7c3c(0x1bb)]?.()??null:null;}catch{}try{process[_0x4b7c3c(0x23a)]({[_0x3e395e]:_0x45f01f,'stats':{'rss':_0x4f3ad6[_0x4b7c3c(0x1a0)],'heapUsed':_0x4f3ad6[_0x4b7c3c(0x2a1)],'heapTotal':_0x4f3ad6[_0x4b7c3c(0xe1)],'external':_0x4f3ad6[_0x4b7c3c(0x105)],'cpuPct':_0x32ce8f,'cpuWindowMs':Math[_0x4b7c3c(0x153)](_0x4e0303/0x3e8)||null},'processing':_0x8f5402});}catch{}},_0x2046c3=Math[_0x43ec6a(0x24a)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x4e8565=setInterval(_0x123089,_0x2046c3);_0x4e8565[_0x43ec6a(0x2b4)]?.(),_0x123089();for(const _0x1c8a8e of[_0x43ec6a(0x189),_0x43ec6a(0x260)]){_0x4a61ab[_0x43ec6a(0x184)]?.['on']?.(_0x1c8a8e,()=>{try{_0x123089();}catch{}});}}let _0xc223e7=![];const _0x2daa67=async _0x165046=>{const _0x3d6e50=_0x43ec6a;if(_0xc223e7)return;_0xc223e7=!![];const _0x1774ab=setTimeout(()=>process[_0x3d6e50(0x2b3)](_0x165046),_0x109a3f);_0x1774ab[_0x3d6e50(0x2b4)]?.();try{await _0x4a61ab[_0x3d6e50(0x1a8)]?.();}catch{}process[_0x3d6e50(0x2b3)](_0x165046);};process['on'](_0x43ec6a(0x1df),()=>_0x2daa67(0x0));if(process['send']&&!process['connected'])_0x2daa67(0x0);if(process[_0x43ec6a(0x1d7)]!==_0x43ec6a(0x1f5)){const _0x1b3766=setInterval(()=>{const _0x154079=_0x43ec6a;if(process[_0x154079(0x175)]===0x1)_0x2daa67(0x0);},_0x3222bc);_0x1b3766[_0x43ec6a(0x2b4)]?.(),_0x4a61ab['_clusterOrphanWatch']=_0x1b3766;}}return okdbCluster={'runClustered':_0x16df4e,'attachWorkerCluster':_0x20a886},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x48c546=_0x2ee730;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x496c27=require$$0$5,{attachWorkerCluster:_0x523529}=requireOkdbCluster();async function _0x571855(){const _0x142d85=_0x302a,_0xaa0fe6=process.env.OKDB_HTTP_CHILD;if(!_0xaa0fe6)throw new Error(_0x142d85(0x25b));const {rootPath:_0x904889,port:_0x16d1a9,options:options={},logLevel:logLevel=_0x142d85(0x19b)}=JSON['parse'](_0xaa0fe6);if(!_0x904889||!_0x16d1a9)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0xa04980=new _0x496c27(_0x904889,{...options,'engines':![],'processors':![],'compaction':![]});_0xa04980[_0x142d85(0x244)][_0x142d85(0x114)]?.();const _0x5be3f0=process.env.OKDB_CLUSTER_SLOT??'?',_0x162529={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1a8eb2=_0x162529[logLevel]??_0x162529[_0x142d85(0x19b)];_0xa04980[_0x142d85(0x244)][_0x142d85(0x2a5)](_0x5acf98=>{const _0x133022=_0x142d85;if((_0x162529[_0x5acf98[_0x133022(0xda)]]??0x1)<_0x1a8eb2)return;try{process[_0x133022(0x23a)]?.({'__okdbCluster':'log','slot':_0x5be3f0,'pid':process[_0x133022(0xe0)],'entry':_0x5acf98});}catch{}}),await _0xa04980['open'](),_0x523529(_0xa04980),await _0xa04980[_0x142d85(0x2ec)][_0x142d85(0x1f6)](_0x16d1a9);}return _0x571855()[_0x48c546(0x2b1)](_0x1e5194=>{const _0x258944=_0x48c546;try{process[_0x258944(0x23a)]?.({'__okdbCluster':_0x258944(0x244),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x258944(0xe0)],'entry':{'level':_0x258944(0x1f4),'msg':'http\x20worker\x20child\x20failed:\x20'+(_0x1e5194?.[_0x258944(0x2c7)]??_0x1e5194)}});}catch{}process[_0x258944(0x2b3)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x2ee730(0x1fa)]=okdbHttpWorkerChild;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';const _0x3db36c=_0x36ac;(function(_0x66dcad,_0x54f4a7){const _0x5c9a9d=_0x36ac,_0x219b4e=_0x66dcad();while(!![]){try{const _0x41fd3a=-parseInt(_0x5c9a9d(0x182))/0x1*(parseInt(_0x5c9a9d(0x1c2))/0x2)+parseInt(_0x5c9a9d(0x177))/0x3*(-parseInt(_0x5c9a9d(0x1a0))/0x4)+-parseInt(_0x5c9a9d(0x1c5))/0x5+-parseInt(_0x5c9a9d(0x18c))/0x6*(parseInt(_0x5c9a9d(0x1ba))/0x7)+parseInt(_0x5c9a9d(0x1d1))/0x8*(-parseInt(_0x5c9a9d(0x1bc))/0x9)+parseInt(_0x5c9a9d(0x1cd))/0xa+parseInt(_0x5c9a9d(0x1b8))/0xb*(parseInt(_0x5c9a9d(0x1cf))/0xc);if(_0x41fd3a===_0x54f4a7)break;else _0x219b4e['push'](_0x219b4e['shift']());}catch(_0x1b4916){_0x219b4e['push'](_0x219b4e['shift']());}}}(_0x19ee,0x4dc8a));var require$$0=require('worker_threads'),require$$1=require('./okdb');function getDefaultExportFromCjs(_0x3cf64a){const _0x59bc33=_0x36ac;return _0x3cf64a&&_0x3cf64a['__esModule']&&Object[_0x59bc33(0x1a7)]['hasOwnProperty']['call'](_0x3cf64a,_0x59bc33(0x187))?_0x3cf64a[_0x59bc33(0x187)]:_0x3cf64a;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x545f1f=_0x36ac;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3e56f0={'PUT':_0x545f1f(0x18a),'REMOVE':_0x545f1f(0x192),'INDEX_DROP':_0x545f1f(0x1d0),'INDEX_REGISTER':_0x545f1f(0x19e),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x545f1f(0x1c7),'TYPE_DROP':_0x545f1f(0x17d),'FTS_REGISTER':_0x545f1f(0x185),'FTS_DROP':_0x545f1f(0x18d),'FTS_RESET':'resetFts','SCHEMA_SET':_0x545f1f(0x19f),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x545f1f(0x181),'TTL_CLEAR':_0x545f1f(0x17c)},_0x16edee={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x545f1f(0x193),'SYSTEM_STOPPED':_0x545f1f(0x1b5),'SYSTEM_CLOCK_CHANGE':_0x545f1f(0x1b0),'SYSTEM_POKE':_0x545f1f(0x194),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x545f1f(0x18f),'SYSTEM_PROC':_0x545f1f(0x1af),'SYSTEM_BUS_STATE_CHANGE':_0x545f1f(0x1ae),'ITEM_CREATE':_0x545f1f(0x19a),'ITEM_UPDATE':_0x545f1f(0x1b6),'ITEM_REMOVE':'item:remove','ITEM_PENDING':_0x545f1f(0x17a),'INDEX_RESET':_0x545f1f(0x199),'INDEX_READY':_0x545f1f(0x1d2),'INDEX_PROGRESS':_0x545f1f(0x184),'VIEW_PROGRESS':_0x545f1f(0x1bd),'INDEX_DROP':_0x545f1f(0x1c0),'INDEX_REGISTERED':_0x545f1f(0x18b),'FTS_REGISTERED':_0x545f1f(0x198),'FTS_DROP':'fts:drop','FTS_RESET':'fts:reset','SCHEMA_SET':_0x545f1f(0x180),'SCHEMA_DROP':_0x545f1f(0x1cb),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x545f1f(0x189),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x545f1f(0x197),'SYNC_APPLY':_0x545f1f(0x1ca),'TXN_START':_0x545f1f(0x190),'TXN_END':_0x545f1f(0x1bf),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x545f1f(0x1b9),'TYPE_DROP':'type:drop','ENV_OPENED':_0x545f1f(0x1ab),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x545f1f(0x1a2),'TTL_EXPIRED':_0x545f1f(0x1c6),'TTL_SET':_0x545f1f(0x1ac),'TTL_CLEAR':_0x545f1f(0x18e),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x545f1f(0x1d3),'LICENSE_ACTIVATED':_0x545f1f(0x17f),'LICENSE_REMOVED':_0x545f1f(0x186)},_0x4ee379={'CREATING':_0x545f1f(0x1b3),'RESETTING':_0x545f1f(0x196),'READY':_0x545f1f(0x195),'DROPPING':_0x545f1f(0x1a1),'WAITING':_0x545f1f(0x191),'ERROR':'error'},_0x15f07a={'CREATED':_0x545f1f(0x1d6),'STARTING':_0x545f1f(0x178),'STARTED':_0x545f1f(0x1aa),'STOPPING':_0x545f1f(0x188),'STOPPED':'stopped'},_0x9f7c25={'CREATING':_0x545f1f(0x1b3),'READY':'ready','HALTED':_0x545f1f(0x1c3),'STOPPED':_0x545f1f(0x1a4),'RESETTING':'resetting'},_0x119f51=Object['freeze']({'POKE':_0x545f1f(0x1a6),'DRAIN':_0x545f1f(0x1c8),'TYPE_DROP':_0x545f1f(0x1c1),'PROC':_0x545f1f(0x1a9),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x119f51,'CHANGE_ACTIONS':_0x3e56f0,'EVENTS':_0x16edee,'INDEX_STATE':_0x4ee379,'OKDB_STATE':_0x15f07a,'VIEW_STATE':_0x9f7c25},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function _0x19ee(){const _0x8f0c5c=['item:update','then','2981CMECSC','type:registered','611723NyuJtn','_runBootstrapScanPhases','9TdMooQ','view:progress','open','txn:end','index:drop','bus:type_drop','2vEenOd','halted','exit','1068715vhoztO','ttl:expired','registerType','bus:drain','_activateViewStorage','sync:apply','schema:drop','env','3797840aYQGUL','VIEW_PROGRESS','57660JKiLkV','dropIndex','196240wyatES','index:ready','license:added','events','exports','created','postMessage','error','9bQCNfo','starting','_bootstrapCancelRequested','item:pending','done','clearTtl','dropType','type','license:activated','schema:set','setTtl','449026khWKcn','cancelled','index:progress','registerFts','license:removed','default','stopping','unique:violation_resolved','put','index:registered','18qZJKog','dropFts','ttl:clear','system:type_drop','txn:start','waiting','remove','field:resolver_registered','system:poke','ready','resetting','ref:violation_resolved','fts:registered','index:reset','item:create','stack','cancel','name','registerIndex','setSchema','551828oLkzad','dropping','system:env_release','views','stopped','VIEW_BOOTSTRAP_CANCELLED','bus:poke','prototype','progress','bus:proc','started','env:opened','ttl:set','close','system:bus_state_change','system:proc','system:clock_change','message','code','creating','race','system:stopped'];_0x19ee=function(){return _0x8f0c5c;};return _0x19ee();}function requireOkdbViewsBootstrapWorker(){const _0x2ac57d=_0x36ac;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x500fb8,workerData:_0x3e3181}=require$$0,_0x10c37a=require$$1,{EVENTS:_0x143215}=requireOkdbEnums();let _0xef8d96=![];_0x500fb8['on'](_0x2ac57d(0x1b1),_0xce11d3=>{const _0x2640c4=_0x2ac57d;if(_0xce11d3?.[_0x2640c4(0x17e)]===_0x2640c4(0x19c))_0xef8d96=!![];});let _0x356116=null;async function _0x29ed0a(){const _0x35b945=_0x2ac57d,_0x293381=_0x356116;_0x356116=null;if(!_0x293381)return;try{await Promise[_0x35b945(0x1b4)]([_0x293381[_0x35b945(0x1ad)](),new Promise(_0x4894bf=>setTimeout(_0x4894bf,0x1388)['unref']())]);}catch{}}async function _0x369b9e(){const _0x3ddfe1=_0x2ac57d,{rootPath:_0x3f2a21,envName:_0x186328,viewName:_0x14f76e,definition:_0x1d3d50,startClock:_0x235874}=_0x3e3181;_0x356116=new _0x10c37a(_0x3f2a21,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]}),await _0x356116[_0x3ddfe1(0x1be)]();if(_0xef8d96)return _0x3ddfe1(0x183);const _0x1bf48a=_0x356116[_0x3ddfe1(0x1cc)](_0x186328);return _0x1bf48a['views'][_0x3ddfe1(0x179)]=()=>_0xef8d96,_0x1bf48a[_0x3ddfe1(0x1d4)]['on'](_0x143215[_0x3ddfe1(0x1ce)],_0x4dde50=>{const _0x20f2b1=_0x3ddfe1;if(_0x4dde50?.[_0x20f2b1(0x19d)]!==_0x14f76e)return;try{_0x500fb8[_0x20f2b1(0x175)]({'type':_0x20f2b1(0x1a8),'event':_0x4dde50});}catch{}}),await _0x1bf48a[_0x3ddfe1(0x1a3)]['_prepareViewDict'](_0x1d3d50),await _0x1bf48a[_0x3ddfe1(0x1a3)][_0x3ddfe1(0x1c9)](_0x14f76e,_0x1d3d50),await _0x1bf48a[_0x3ddfe1(0x1a3)][_0x3ddfe1(0x1bb)](_0x14f76e,_0x1d3d50,{'startClock':_0x235874}),_0x3ddfe1(0x17b);}return _0x369b9e()[_0x2ac57d(0x1b7)](async _0x547c48=>{const _0x479d14=_0x2ac57d;await _0x29ed0a();try{_0x500fb8['postMessage']({'type':_0x547c48});}catch{}process[_0x479d14(0x1c4)](0x0);},async _0x3e8789=>{const _0x57add7=_0x2ac57d;await _0x29ed0a();const _0xddbecf=_0x3e8789?.[_0x57add7(0x1b2)]===_0x57add7(0x1a5);try{_0x500fb8[_0x57add7(0x175)](_0xddbecf?{'type':_0x57add7(0x183)}:{'type':_0x57add7(0x176),'error':_0x3e8789?.[_0x57add7(0x1b1)]??String(_0x3e8789),'stack':_0x3e8789?.[_0x57add7(0x19b)]});}catch{}process[_0x57add7(0x1c4)](_0xddbecf?0x0:0x1);}),okdbViewsBootstrapWorker$1;}function _0x36ac(_0x1d1f22,_0x1940db){_0x1d1f22=_0x1d1f22-0x175;const _0x19ee8e=_0x19ee();let _0x36ac63=_0x19ee8e[_0x1d1f22];return _0x36ac63;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x3db36c(0x1d5)]=okdbViewsBootstrapWorker;
|