@kedem/okdb 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/algorithm-worker-thread.js +1 -1
  2. package/bin/okdb.js +1 -1
  3. package/docs/OKDB-ARCHITECTURE.md +16 -2
  4. package/docs/embeddings.md +11 -7
  5. package/docs/pipelines.md +12 -0
  6. package/okdb-functions-sandbox-worker.js +1 -1
  7. package/okdb-http-worker-child.js +1 -1
  8. package/okdb-views-bootstrap-worker.js +1 -1
  9. package/okdb.js +1 -1
  10. package/package.json +1 -1
  11. package/public/layouts/_default.ok.html +3 -1
  12. package/public/sections/embeddings/modals/edit-pipeline-modal.ok.js +1 -0
  13. package/public/sections/embeddings/modals/replace-embedder-modal.ok.js +1 -0
  14. package/public/sections/embeddings/parts/embed-create-panel.ok.js +1 -1
  15. package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +1 -1
  16. package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +1 -1
  17. package/public/sections/embeddings/parts/embed-search-panel.ok.js +1 -1
  18. package/public/sections/embeddings/parts/embed-worker-panel.ok.js +1 -1
  19. package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
  20. package/public/sections/embeddings/parts/pipeline-flow-strip.ok.js +1 -0
  21. package/public/sections/embeddings/parts/pipeline-try-search.ok.js +1 -0
  22. package/public/sections/engines/engine-ui-utils.js +1 -1
  23. package/public/sections/engines/index.ok.html +1 -1
  24. package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -1
  25. package/public/sections/engines/parts/engine-lifecycle-actions.ok.js +1 -1
  26. package/public/sections/engines/parts/engine-panel-shell.ok.js +1 -1
  27. package/public/sections/engines/parts/engine-resource-card.ok.js +1 -1
  28. package/public/sections/functions/index.ok.html +1 -1
  29. package/public/sections/system/index.ok.html +1 -1
  30. package/public/sections/system/parts/system-locks-panel.ok.js +1 -1
  31. package/public/sections/system/parts/system-storage-panel.ok.js +1 -0
  32. package/public/sections/views/index.ok.html +1 -1
  33. package/public/stores/auth-store.js +1 -1
  34. package/public/stores/events-store.js +1 -1
  35. package/public/styles.css +1 -1
  36. package/public/vendor/okjs/ok.esm.min.js +1 -1
  37. package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
  38. package/public/vendor/okjs/toolkit/components/ok-marked.ok.js +1 -1
  39. package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
  40. package/public/vendor/okjs/toolkit/core/ok-layer-service.ok.js +1 -1
  41. package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
  42. package/public/vendor/okjs/toolkit/devtools/ok-console.ok.js +1 -1
  43. package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor-service.ok.js +1 -1
  44. package/public/vendor/okjs/toolkit/errors/ok-crash-info.ok.js +1 -1
  45. package/public/vendor/okjs/toolkit/interaction/ok-contextmenu.ok.js +1 -1
  46. package/public/vendor/okjs/toolkit/interaction/ok-flyover-panel.ok.js +1 -1
  47. package/public/vendor/okjs/toolkit/interaction/ok-hotkeys-service.ok.js +1 -1
  48. package/public/vendor/okjs/toolkit/interaction/ok-popout-service.ok.js +1 -1
  49. package/public/vendor/okjs/toolkit/interaction/ok-submenu.ok.js +1 -1
  50. package/public/vendor/okjs/toolkit/layout/ok-resizer.ok.js +1 -1
  51. package/public/vendor/okjs/toolkit/manifest.js +1 -1
  52. package/public/vendor/okjs/toolkit/modals/ok-modal-service.ok.js +1 -1
  53. package/public/vendor/okjs/toolkit/modals/ok-modal.ok.js +1 -1
  54. package/public/vendor/okjs/toolkit/modals/ok-toast-service.ok.js +1 -1
  55. package/public/vendor/okjs/toolkit/theming/ok-design-style.js +1 -1
  56. package/public/vendor/okjs/toolkit/theming/ok-theme.ok.js +1 -1
  57. package/public/sections/db/parts/db-pipelines-panel.ok.js +0 -1
@@ -690,8 +690,22 @@ methods are called.
690
690
  Lifecycle: `created → online ↔ error → stopped`
691
691
 
692
692
  Used by the embeddings feature internally. Also available as a general extension
693
- point: register a driver, create an engine, its `config` object lives in OKDB and
694
- can be updated at runtime.
693
+ point: register a driver, create an engine, its `config` object lives in OKDB.
694
+ Config is updatable at runtime for drivers that implement `patchConfig`
695
+ (embedder, indexer, vector-search, queue-worker); a config PATCH restarts the
696
+ engine, and identity fields (source, storage key, dims) stay immutable.
697
+
698
+ Storage-format versioning: the data directory records the okdb version its
699
+ layout was last migrated to (`__storageVersion` in `~system`). Migrations are
700
+ keyed by the okdb release that introduces them; on `open()`, pending ones run
701
+ once per store under a cross-process LMDB mutex and are logged durably to the
702
+ `~migrations` type (per-id completion — several migrations may ship in one
703
+ release). Opening a store whose layout is newer than the running build fails
704
+ fast (`STORE_VERSION_NEWER`; `OKDB_ALLOW_NEWER_STORE=1` overrides); a plain
705
+ package downgrade without layout changes only warns. Live peers on the same
706
+ path running a different okdb build are warned about via the process registry
707
+ heartbeat. Inspect via `GET /api/system/storage` or the admin System →
708
+ Storage Format card.
695
709
 
696
710
  ### 8.7 `okdb-search` — Pluggable Search Engine Framework
697
711
 
@@ -306,17 +306,21 @@ const engines = okdb.engines.list();
306
306
  const embedder = okdb.engines.getEngine('embedder', 'articles');
307
307
  ```
308
308
 
309
- ### Shared embedder lifecycle behavior
309
+ ### Embedder scope and lifecycle behavior
310
310
 
311
- Embeddings pipelines usually own the env-scoped indexer/search/worker engines, but the embedder is often shared across pipelines and environments.
311
+ Embedders are **env-local**: each environment owns its embedders (and their provider keys), the same way it owns the indexer/search/worker engines. `createPipeline` names the embedder `<env>:<name>` and stores its record in the pipeline's env — several pipelines _within the same env_ can share one embedder by referencing the same name.
312
312
 
313
- To preserve that behavior when delegating lifecycle operations through generic pipelines, embeddings-backed pipeline records mark the embedder role as lifecycle-skipped.
313
+ Legacy stores that created embedders in `~system` (pre env-local) are migrated automatically on open: a record referenced from one env moves into it as-is; a record shared by several envs is duplicated into each of them under an env-scoped name (with the referencing indexer/search configs and pipeline member refs re-pointed); orphans are homed in `default`. The applied migrations are visible at `GET /api/system/storage` and in the admin System → Storage Format card.
314
314
 
315
- That means specialized or generic pipeline `start` / `stop` operations:
315
+ Because an embedder may be shared by several pipelines in its env, embeddings-backed pipeline records mark the embedder role as lifecycle-skipped. Pipeline `start` / `stop` operations:
316
316
 
317
- - manage env-owned `indexer`, `search`, and optional `worker` members
318
- - do **not** stop or restart the shared embedder just because one pipeline is paused
319
- - still preserve the shared embedder on pipeline delete unless the embedder is explicitly managed elsewhere
317
+ - manage the `indexer`, `search`, and optional `worker` members
318
+ - do **not** stop or restart the embedder just because one pipeline is paused
319
+ - on pipeline delete, remove the embedder together with the pipeline **unless** another pipeline record in the env still references it
320
+
321
+ ### Changing embedder configuration
322
+
323
+ Embedder config (provider `type`, `model`, `api_key`, `url`, …) is editable after creation: `PATCH /api/embeddings/engines/embedder@<name>` with a `config` body (or `engine.patchDeclaration({ config })`) — the engine restarts automatically. Secret values echoed back as `***` keep their stored value; changing the provider `type` replaces the config wholesale. Changing model/dims invalidates existing vectors — rebuild dependent pipelines afterwards (`POST /api/env/:env/pipelines/:name/rebuild`), or swap a pipeline to another embedder with `POST /api/env/:env/pipelines/:name/replace-member` (`{ role: 'embedder', engine: '<name>' }`; dims must match the stored vectors).
320
324
 
321
325
  ---
322
326
 
package/docs/pipelines.md CHANGED
@@ -78,9 +78,17 @@ const all = await analytics.pipelines.list();
78
78
 
79
79
  await analytics.pipelines.stop('articles-ingest');
80
80
  await analytics.pipelines.start('articles-ingest');
81
+ await analytics.pipelines.restart('articles-ingest'); // stop + start
82
+ await analytics.pipelines.update('articles-ingest', { meta: { label: 'Ingest' } }); // meta/status only
83
+ await analytics.pipelines.rebuild('articles-ingest'); // member engines with api.rebuild(), in order
84
+ await analytics.pipelines.replaceMember('articles-ingest', 'embedder', 'other-embedder'); // same-role swap
81
85
  await analytics.pipelines.remove('articles-ingest');
82
86
  ```
83
87
 
88
+ **Pipelines are structurally atomic — the pipeline is the engine.** Member topology (the set/order of roles) is immutable — `update()` refuses `engines` changes — and members cannot be added or removed at runtime; new arrangements of engines are new pipeline _types_ (templates / `createPipeline` families), not record surgery. Public engine lifecycle surfaces enforce this: `DELETE`/`stop`/`start`/`restart` on an engine that is a pipeline member is refused with `ENGINE_MANAGED_BY_PIPELINE` (HTTP 409) pointing at the owning pipeline — operate on the pipeline instead. Per-member config patches and diagnostics (pause/resume/retry, reset-cursor, index reload) remain available.
89
+
90
+ `replaceMember()` is the supported _parameter_ mutation: it swaps one member for another **existing engine of the same type**, re-points sibling members whose `config.<role>` referenced the old name (the indexer's and search engine's `embedder` field), restarts them, and rewrites the record. It does not re-embed — follow with `rebuild()` (UI: "Re-embed all") when the new member produces different output. `remove()` deletes env-owned members unless another pipeline record in the env still references them.
91
+
84
92
  ### HTTP API surface
85
93
 
86
94
  The generic pipeline registry is also exposed over HTTP:
@@ -97,6 +105,10 @@ POST /api/env/:env/pipelines/templates/:template/create
97
105
  POST /api/env/:env/pipelines/scaffold
98
106
  POST /api/env/:env/pipelines/:pipeline/start
99
107
  POST /api/env/:env/pipelines/:pipeline/stop
108
+ POST /api/env/:env/pipelines/:pipeline/restart
109
+ POST /api/env/:env/pipelines/:pipeline/rebuild
110
+ PATCH /api/env/:env/pipelines/:pipeline
111
+ POST /api/env/:env/pipelines/:pipeline/replace-member
100
112
  DELETE /api/env/:env/pipelines/:pipeline
101
113
  ```
102
114
 
@@ -1 +1 @@
1
- 'use strict';const _0x4794cd=_0x5daa;(function(_0x506e62,_0x1fcdfa){const _0x4c1658=_0x5daa,_0x405ec2=_0x506e62();while(!![]){try{const _0x4a43d6=parseInt(_0x4c1658(0x270))/0x1+-parseInt(_0x4c1658(0x24d))/0x2*(parseInt(_0x4c1658(0x1fa))/0x3)+parseInt(_0x4c1658(0x1af))/0x4+parseInt(_0x4c1658(0x283))/0x5+parseInt(_0x4c1658(0x1ab))/0x6*(-parseInt(_0x4c1658(0x200))/0x7)+parseInt(_0x4c1658(0x2a7))/0x8+-parseInt(_0x4c1658(0x29c))/0x9*(parseInt(_0x4c1658(0x2a5))/0xa);if(_0x4a43d6===_0x1fcdfa)break;else _0x405ec2['push'](_0x405ec2['shift']());}catch(_0x6e81a){_0x405ec2['push'](_0x405ec2['shift']());}}}(_0x4194,0x50930));var require$$0$3=require(_0x4794cd(0x2c3)),require$$2=require('v8'),require$$0=require('node:vm'),require$$0$2=require(_0x4794cd(0x1a5)),require$$0$1=require(_0x4794cd(0x2e7)),require$$6=require(_0x4794cd(0x2ba));function getDefaultExportFromCjs(_0x1ac78f){const _0x566ec4=_0x4794cd;return _0x1ac78f&&_0x1ac78f[_0x566ec4(0x291)]&&Object[_0x566ec4(0x25f)][_0x566ec4(0x2b5)][_0x566ec4(0x276)](_0x1ac78f,_0x566ec4(0x293))?_0x1ac78f[_0x566ec4(0x293)]:_0x1ac78f;}var okdbFunctionsSandboxWorker$1={},okdbFatalReport,hasRequiredOkdbFatalReport;function requireOkdbFatalReport(){if(hasRequiredOkdbFatalReport)return okdbFatalReport;hasRequiredOkdbFatalReport=0x1;function _0x574810(_0x58697d){const _0x48e38a=_0x5daa;if(process.env.OKDB_FATAL_REPORT!=='1')return;try{if(!process[_0x48e38a(0x2f6)])return;process[_0x48e38a(0x2f6)][_0x48e38a(0x1d5)]=!![];try{if(_0x48e38a(0x1d6)in process['report'])process[_0x48e38a(0x2f6)][_0x48e38a(0x1d6)]=process.env.OKDB_FATAL_REPORT_ENV!=='1';}catch{}if(process['platform']!==_0x48e38a(0x269))try{process[_0x48e38a(0x2f6)][_0x48e38a(0x1ee)]=!![];if(typeof process['report']['signal']==='string')process[_0x48e38a(0x2f6)][_0x48e38a(0x19d)]=_0x48e38a(0x257);}catch{}if(process.env.OKDB_REPORT_DIR)try{require('fs')[_0x48e38a(0x2db)](process.env.OKDB_REPORT_DIR,{'recursive':!![]}),process[_0x48e38a(0x2f6)][_0x48e38a(0x24a)]=process.env.OKDB_REPORT_DIR;}catch{}try{process[_0x48e38a(0x2f6)][_0x48e38a(0x1c3)]='';}catch{}if(_0x58697d)process.env.OKDB_REPORT_TAG=String(_0x58697d);}catch{}}return okdbFatalReport={'enableFatalReport':_0x574810},okdbFatalReport;}var okdbFunctionsSandbox,hasRequiredOkdbFunctionsSandbox;function requireOkdbFunctionsSandbox(){if(hasRequiredOkdbFunctionsSandbox)return okdbFunctionsSandbox;hasRequiredOkdbFunctionsSandbox=0x1;const _0x36279d=require$$0;function _0x43fbd2(_0x3586b1){const _0x274125=_0x5daa,_0x448c4c=_0x3586b1==='*',_0xbe132a=_0x448c4c?null:new Set(Array[_0x274125(0x2a8)](_0x3586b1)?_0x3586b1:[]);return function _0x56ceef(_0x599662,_0x4b1488){const _0x1fa4d5=_0x274125;if(!_0x448c4c){let _0x3998c4;try{const _0x36f8d7=new URL(typeof _0x599662===_0x1fa4d5(0x225)?_0x599662:_0x599662?.[_0x1fa4d5(0x299)]??String(_0x599662));_0x3998c4=_0x36f8d7[_0x1fa4d5(0x210)];}catch{const _0x319409=new Error(_0x1fa4d5(0x2ab));return _0x319409['code']=_0x1fa4d5(0x25c),Promise[_0x1fa4d5(0x2f7)](_0x319409);}if(!_0xbe132a[_0x1fa4d5(0x309)](_0x3998c4)){const _0x5cc136=new Error(_0xbe132a[_0x1fa4d5(0x1ec)]===0x0?_0x1fa4d5(0x2fa):_0x1fa4d5(0x2a0)+_0x3998c4+_0x1fa4d5(0x2d8));return _0x5cc136[_0x1fa4d5(0x296)]=_0x1fa4d5(0x25c),Promise[_0x1fa4d5(0x2f7)](_0x5cc136);}}return fetch(_0x599662,_0x4b1488);};}function _0x1a9898(_0x537d65={}){const _0xc5d413=_0x5daa,_0x5bed4f=_0x537d65[_0xc5d413(0x201)]!==![],_0x30db24=_0x537d65[_0xc5d413(0x289)]??[],_0x759bff={'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[_0xc5d413(0x255)]};return _0x5bed4f&&typeof fetch===_0xc5d413(0x1e6)&&(_0x759bff[_0xc5d413(0x1a0)]=_0x43fbd2(_0x30db24)),_0x759bff[_0xc5d413(0x29d)]=_0x759bff,_0x759bff;}function _0x2055e9(_0x226766,_0x2a89ab={}){const _0x13eba9=_0x5daa,_0x5a2cba=_0x1a9898(_0x2a89ab),_0x1fae26=_0x36279d['createContext'](_0x5a2cba,{'name':_0x13eba9(0x2e5),'codeGeneration':{'strings':![],'wasm':![]}});let _0x48fb7e;try{_0x48fb7e=new _0x36279d[(_0x13eba9(0x215))]('('+_0x226766+')',{'filename':_0x2a89ab[_0x13eba9(0x1c3)]??_0x13eba9(0x29a)});}catch(_0x2a9dfe){const _0x32ca15=new Error(_0x2a9dfe?.[_0x13eba9(0x1e4)]||_0x13eba9(0x231));_0x32ca15[_0x13eba9(0x296)]=_0x13eba9(0x22c),_0x32ca15[_0x13eba9(0x2c2)]=_0x2a9dfe;throw _0x32ca15;}let _0x5db0a6;try{_0x5db0a6=_0x48fb7e[_0x13eba9(0x27f)](_0x1fae26,{'timeout':_0x2a89ab[_0x13eba9(0x2d1)]??0x64});}catch(_0x17b200){const _0x513043=new Error(_0x17b200?.[_0x13eba9(0x1e4)]||_0x13eba9(0x22a));_0x513043[_0x13eba9(0x296)]=_0x13eba9(0x22c),_0x513043['cause']=_0x17b200;throw _0x513043;}if(typeof _0x5db0a6!==_0x13eba9(0x1e6)){const _0x3a80bf=new Error(_0x13eba9(0x274));_0x3a80bf['code']=_0x13eba9(0x1e8);throw _0x3a80bf;}return _0x5db0a6;}return okdbFunctionsSandbox={'createSandboxGlobals':_0x1a9898,'compileFunctionExpression':_0x2055e9,'_buildRestrictedFetch':_0x43fbd2},okdbFunctionsSandbox;}var okdbFunctionsIpc,hasRequiredOkdbFunctionsIpc;function requireOkdbFunctionsIpc(){if(hasRequiredOkdbFunctionsIpc)return okdbFunctionsIpc;hasRequiredOkdbFunctionsIpc=0x1;function _0x57c379(_0x4244fc){const _0x9ca911=_0x5daa;if(!_0x4244fc)return null;return{'message':_0x4244fc[_0x9ca911(0x1e4)]||String(_0x4244fc),'stack':_0x4244fc[_0x9ca911(0x211)]||null,'code':_0x4244fc[_0x9ca911(0x296)]||null,'details':_0x4244fc[_0x9ca911(0x1f5)]||null};}function _0x5eca81(_0xad0566){const _0x3247d2=_0x5daa;if(!_0xad0566)return new Error(_0x3247d2(0x26e));const _0x4c8448=new Error(_0xad0566['message']||String(_0xad0566));if(_0xad0566['stack'])_0x4c8448[_0x3247d2(0x211)]=_0xad0566[_0x3247d2(0x211)];if(_0xad0566['code'])_0x4c8448['code']=_0xad0566[_0x3247d2(0x296)];if(_0xad0566[_0x3247d2(0x1f5)])_0x4c8448[_0x3247d2(0x1f5)]=_0xad0566[_0x3247d2(0x1f5)];return _0x4c8448;}return okdbFunctionsIpc={'serializeError':_0x57c379,'deserializeError':_0x5eca81},okdbFunctionsIpc;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x241b6d=_0x4794cd;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5e81c6={'PUT':_0x241b6d(0x253),'REMOVE':_0x241b6d(0x2bf),'INDEX_DROP':_0x241b6d(0x1aa),'INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x241b6d(0x29f),'TYPE_REGISTER':_0x241b6d(0x1b3),'TYPE_DROP':'dropType','FTS_REGISTER':_0x241b6d(0x1bd),'FTS_DROP':_0x241b6d(0x214),'FTS_RESET':_0x241b6d(0x27e),'SCHEMA_SET':_0x241b6d(0x24c),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x241b6d(0x2e4),'TTL_CLEAR':'clearTtl'},_0x4967f3={'SYSTEM_READY':_0x241b6d(0x1c8),'SYSTEM_STOPPED':_0x241b6d(0x1c5),'SYSTEM_CLOCK_CHANGE':_0x241b6d(0x275),'SYSTEM_POKE':_0x241b6d(0x1f8),'SYSTEM_DRAIN':_0x241b6d(0x27d),'SYSTEM_TYPE_DROP':_0x241b6d(0x2e3),'SYSTEM_PROC':_0x241b6d(0x281),'SYSTEM_BUS_STATE_CHANGE':_0x241b6d(0x193),'ITEM_CREATE':_0x241b6d(0x1d0),'ITEM_UPDATE':_0x241b6d(0x21f),'ITEM_REMOVE':_0x241b6d(0x2fe),'INDEX_RESET':_0x241b6d(0x2d0),'INDEX_READY':_0x241b6d(0x232),'INDEX_PROGRESS':_0x241b6d(0x25b),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x241b6d(0x1d9),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x241b6d(0x2f5),'FTS_DROP':_0x241b6d(0x24f),'FTS_RESET':_0x241b6d(0x297),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x241b6d(0x2aa),'UNIQUE_VIOLATION':_0x241b6d(0x280),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x241b6d(0x25a),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x241b6d(0x2c5),'TXN_START':_0x241b6d(0x2f2),'TXN_END':_0x241b6d(0x30c),'TXN_ROLLBACK':_0x241b6d(0x216),'TYPE_REGISTERED':_0x241b6d(0x233),'TYPE_DROP':'type:drop','ENV_OPENED':'env:opened','ENV_REMOVED':_0x241b6d(0x277),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x241b6d(0x208),'TTL_SET':_0x241b6d(0x2b2),'TTL_CLEAR':_0x241b6d(0x2a1),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x241b6d(0x2ff),'LICENSE_ACTIVATED':_0x241b6d(0x252),'LICENSE_REMOVED':_0x241b6d(0x1b2)},_0x536d8b={'CREATING':_0x241b6d(0x1ba),'RESETTING':_0x241b6d(0x1db),'READY':_0x241b6d(0x23c),'DROPPING':_0x241b6d(0x22f),'WAITING':'waiting'},_0x106033={'CREATED':_0x241b6d(0x242),'STARTING':_0x241b6d(0x23d),'STARTED':_0x241b6d(0x273),'STOPPING':_0x241b6d(0x1bc),'STOPPED':_0x241b6d(0x282)},_0x55905b={'CREATING':'creating','READY':'ready','HALTED':_0x241b6d(0x191),'STOPPED':'stopped','RESETTING':_0x241b6d(0x1db)},_0x39acdf=Object[_0x241b6d(0x2d3)]({'POKE':_0x241b6d(0x2cb),'DRAIN':_0x241b6d(0x29e),'TYPE_DROP':_0x241b6d(0x1c1),'PROC':_0x241b6d(0x1b5),'ENV_RELEASE':_0x241b6d(0x26a)});return okdbEnums={'BUS_EVENTS':_0x39acdf,'CHANGE_ACTIONS':_0x5e81c6,'EVENTS':_0x4967f3,'INDEX_STATE':_0x536d8b,'OKDB_STATE':_0x106033,'VIEW_STATE':_0x55905b},okdbEnums;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x379d55 extends Error{constructor(_0x10edb2,_0x4f67bc,_0x388a54={}){const _0x5498fe=_0x5daa;super(_0x10edb2),this[_0x5498fe(0x2d2)]=_0x5498fe(0x266),this['code']=_0x4f67bc,this[_0x5498fe(0x1f5)]=_0x388a54,_0x388a54[_0x5498fe(0x2c2)]&&(this['cause']=_0x388a54[_0x5498fe(0x2c2)]),Error[_0x5498fe(0x30a)](this,this[_0x5498fe(0x1f2)]);}}class _0x5c85b9 extends _0x379d55{constructor(_0x275131,_0x5c8156,_0x498172,_0x3bf6d4){const _0x2e5782=_0x5daa;super(_0x2e5782(0x1b9)+_0x275131+'@'+_0x5c8156+_0x2e5782(0x2f0)+_0x498172+_0x2e5782(0x2ad)+_0x3bf6d4,_0x2e5782(0x1b1),{'type':_0x275131,'key':_0x5c8156,'expectedVersion':_0x498172,'actualVersion':_0x3bf6d4}),this['name']='OKDBVersionMismatchError';}}class _0x30e6f7 extends _0x379d55{constructor(_0x189fe1,_0x42d908){const _0x2296aa=_0x5daa;super(_0x189fe1+'@'+_0x42d908+'\x20does\x20not\x20exist',_0x2296aa(0x1ea),{'type':_0x189fe1,'key':_0x42d908}),this[_0x2296aa(0x2d2)]=_0x2296aa(0x19c);}}class _0x2ba170 extends _0x379d55{constructor(_0x5992fa,_0x28d372){const _0x1cdf67=_0x5daa;super(_0x5992fa+'@'+_0x28d372+'\x20already\x20exists',_0x1cdf67(0x1fb),{'type':_0x5992fa,'key':_0x28d372}),this[_0x1cdf67(0x2d2)]=_0x1cdf67(0x194);}}class _0x5c6414 extends _0x379d55{constructor(_0x2b7a4d,_0x449168){const _0x183574=_0x5daa,_0x3ae125=typeof _0x449168;super(_0x183574(0x28f)+_0x2b7a4d+_0x183574(0x248)+_0x3ae125+_0x183574(0x272)+_0x449168,_0x183574(0x20b),{'index':_0x2b7a4d,'key':_0x449168,'keyType':_0x3ae125}),this['name']=_0x183574(0x2fd);}}class _0x1cd60e extends _0x379d55{constructor(_0x5a0506){const _0xe81190=_0x5daa,_0x45b138=typeof _0x5a0506;super(_0xe81190(0x1a2)+_0x45b138+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x5a0506,'INVALID_PRIMARY_KEY',{'key':_0x5a0506,'keyType':_0x45b138}),this[_0xe81190(0x2d2)]=_0xe81190(0x267);}}class _0x5da853 extends _0x379d55{constructor(_0x136d9d){const _0x30b1e7=_0x5daa;super('Type\x20\x27'+_0x136d9d+_0x30b1e7(0x241),_0x30b1e7(0x19b),{'type':_0x136d9d}),this[_0x30b1e7(0x2d2)]=_0x30b1e7(0x2de);}}class _0x2a55d1 extends _0x379d55{constructor(_0x1bacde){const _0x2bb16e=_0x5daa;super(_0x2bb16e(0x22e)+_0x1bacde+_0x2bb16e(0x2e9),_0x2bb16e(0x2b3),{'type':_0x1bacde}),this[_0x2bb16e(0x2d2)]=_0x2bb16e(0x285);}}class _0x434952 extends _0x379d55{constructor(_0x57a7d9,_0x67fbb1){const _0x48cde6=_0x5daa;super('Index\x20\x27'+_0x67fbb1+_0x48cde6(0x1c9)+_0x57a7d9+'\x27\x20doesn\x27t\x20exist','INDEX_NOT_REGISTERED',{'type':_0x57a7d9,'index':_0x67fbb1}),this['name']=_0x48cde6(0x1f3);}}class _0x109bd1 extends _0x379d55{constructor(_0x4ac5a0,_0x44598b){const _0x39c91d=_0x5daa;super(_0x39c91d(0x203)+_0x44598b+'\x27\x20on\x20type\x20\x27'+_0x4ac5a0+'\x27\x20is\x20already\x20registered',_0x39c91d(0x294),{'type':_0x4ac5a0,'index':_0x44598b}),this[_0x39c91d(0x2d2)]='OKDBIndexAlreadyRegisteredError';}}class _0x587959 extends _0x379d55{constructor(_0x4362b9,_0x51d23e={}){const _0xc6a54d=_0x5daa;super(_0x4362b9,_0xc6a54d(0x2bb),_0x51d23e),this[_0xc6a54d(0x2d2)]='OKDBInvalidValueError';}}class _0x3bc693 extends _0x379d55{constructor(_0x47677b,_0x17e390,_0x488e76,_0x4ffa9f,_0x550285){const _0x279b22=_0x5daa;super(_0x279b22(0x2f1)+_0x47677b+'@'+_0x17e390+_0x279b22(0x1d4)+_0x488e76+_0x279b22(0x279)+_0x4ffa9f+_0x279b22(0x288)+_0x550285+'\x27',_0x279b22(0x21c),{'type':_0x47677b,'index':_0x17e390,'indexKey':_0x488e76,'existingKey':_0x4ffa9f,'conflictingKey':_0x550285}),this[_0x279b22(0x2d2)]='OKDBUniqueConstraintError';}}class _0x409458 extends _0x379d55{constructor(_0x53846f,_0x2d82e7,_0x16fd96){const _0x5d61af=_0x5daa;super(_0x5d61af(0x2d4)+_0x53846f+'@'+_0x2d82e7,_0x5d61af(0x306),{'type':_0x53846f,'key':_0x2d82e7,'errors':_0x16fd96}),this[_0x5d61af(0x2d2)]='OKDBSchemaValidationError',this['type']=_0x53846f,this[_0x5d61af(0x258)]=_0x2d82e7,this[_0x5d61af(0x247)]=_0x16fd96;}}class _0x58b4df extends _0x379d55{constructor(_0x23ab94,_0x4aef48){const _0x34e70d=_0x5daa;super(_0x34e70d(0x30b)+_0x23ab94+':\x20'+_0x4aef48[_0x34e70d(0x220)]+'\x20documents\x20fail\x20validation',_0x34e70d(0x197),{'type':_0x23ab94,'failures':_0x4aef48}),this['name']=_0x34e70d(0x239),this[_0x34e70d(0x302)]=_0x23ab94,this['failures']=_0x4aef48;}}class _0x598f53 extends _0x379d55{constructor(_0x5d9483,_0x39b35c,_0x4c0b95,_0x34884f,_0x4272f0){const _0x56e227=_0x5daa;super('Foreign\x20key\x20violation:\x20'+_0x5d9483+'@'+_0x39b35c+'.'+_0x4c0b95+_0x56e227(0x196)+_0x34884f+'@'+_0x4272f0+_0x56e227(0x2b9),'FOREIGN_KEY_VIOLATION',{'sourceType':_0x5d9483,'sourceKey':_0x39b35c,'fieldPath':_0x4c0b95,'targetType':_0x34884f,'targetKey':_0x4272f0}),this[_0x56e227(0x2d2)]=_0x56e227(0x2e2),this[_0x56e227(0x303)]=_0x5d9483,this[_0x56e227(0x1ce)]=_0x39b35c,this[_0x56e227(0x298)]=_0x4c0b95,this[_0x56e227(0x27c)]=_0x34884f,this[_0x56e227(0x1d1)]=_0x4272f0;}}class _0x5b875d extends _0x379d55{constructor(_0x262f64,_0x4c01f6,_0x320e5a){const _0x1afa9e=_0x5daa;super(_0x1afa9e(0x2b4)+_0x262f64+'@'+_0x4c01f6+':\x20'+_0x320e5a[_0x1afa9e(0x220)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x1afa9e(0x1fe),{'targetType':_0x262f64,'targetKey':_0x4c01f6,'references':_0x320e5a}),this[_0x1afa9e(0x2d2)]=_0x1afa9e(0x2a6),this[_0x1afa9e(0x27c)]=_0x262f64,this[_0x1afa9e(0x1d1)]=_0x4c01f6,this[_0x1afa9e(0x1ae)]=_0x320e5a;}}class _0x378025 extends _0x379d55{constructor(_0xc2008e,_0x2ada57,_0x25bd62){const _0x1678b=_0x5daa;super(_0x1678b(0x1dc)+_0x2ada57+_0x1678b(0x27a)+_0xc2008e+_0x1678b(0x2a3)+_0x25bd62[_0x1678b(0x205)](_0x4d64d3=>_0x4d64d3[_0x1678b(0x199)]+':'+_0x4d64d3['name'])['join'](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0xc2008e,'index':_0x2ada57,'usedBy':_0x25bd62}),this[_0x1678b(0x2d2)]=_0x1678b(0x22b);}}return okdbError={'OKDBError':_0x379d55,'OKDBVersionMismatchError':_0x5c85b9,'OKDBNotFoundError':_0x30e6f7,'OKDBAlreadyExistsError':_0x2ba170,'OKDBInvalidIndexKeyError':_0x5c6414,'OKDBInvalidPrimaryKeyError':_0x1cd60e,'OKDBTypeNotRegisteredError':_0x5da853,'OKDBTypeAlreadyRegisteredError':_0x2a55d1,'OKDBIndexNotRegisteredError':_0x434952,'OKDBIndexAlreadyRegisteredError':_0x109bd1,'OKDBInvalidValueError':_0x587959,'OKDBUniqueConstraintError':_0x3bc693,'OKDBSchemaValidationError':_0x409458,'OKDBSchemaCollectionError':_0x58b4df,'OKDBForeignKeyError':_0x598f53,'OKDBForeignKeyDeleteError':_0x5b875d,'OKDBIndexHasConsumersError':_0x378025},okdbError;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x52c097=_0x4794cd;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x36375a,performance:_0x5590b0}=require$$0$1,_0x1303e6=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x52c097(0x1bf),_0x27b244=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2e6b49=process.env.OKDB_LOOP_LAG_ALL==='1',_0x5ba643=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x30584d{constructor(){const _0x3b7a1b=_0x52c097;this['enabled']=_0x1303e6,this[_0x3b7a1b(0x2ae)]=new Map(),this['_h']=null,this[_0x3b7a1b(0x246)]=null,this['_started']=![],this[_0x3b7a1b(0x286)]=(_0x4757e8,_0x41d453)=>process['stderr'][_0x3b7a1b(0x1c4)](_0x4757e8+(_0x41d453?'\x20'+JSON[_0x3b7a1b(0x229)](_0x41d453):'')+'\x0a');}[_0x52c097(0x1b8)](){const _0x1bc78a=_0x52c097;return _0x5590b0[_0x1bc78a(0x1b8)]();}[_0x52c097(0x221)](_0x53c7a3){const _0x4e3018=_0x52c097;if(typeof _0x53c7a3===_0x4e3018(0x1e6))this[_0x4e3018(0x286)]=_0x53c7a3;}[_0x52c097(0x245)](_0x4fe4fd,_0x3ff940,_0x270a42){const _0x214bf5=_0x52c097;if(!this[_0x214bf5(0x264)])return;let _0x5fadaf=this[_0x214bf5(0x2ae)]['get'](_0x4fe4fd);!_0x5fadaf&&(_0x5fadaf={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x214bf5(0x2ae)]['set'](_0x4fe4fd,_0x5fadaf)),_0x5fadaf['ms']+=_0x3ff940,_0x5fadaf[_0x214bf5(0x29b)]+=0x1,_0x3ff940>_0x5fadaf[_0x214bf5(0x1ac)]&&(_0x5fadaf[_0x214bf5(0x1ac)]=_0x3ff940,_0x5fadaf[_0x214bf5(0x1cc)]=_0x270a42||'');}[_0x52c097(0x265)](_0x2ee387){const _0x1db3a9=_0x52c097;if(!this['enabled']||this[_0x1db3a9(0x1bb)])return;this['_started']=!![];if(_0x2ee387)this['_log']=_0x2ee387;this['_h']=_0x36375a({'resolution':0xa}),this['_h'][_0x1db3a9(0x1f0)](),this[_0x1db3a9(0x246)]=setInterval(()=>this['_report'](),_0x27b244);if(this[_0x1db3a9(0x246)][_0x1db3a9(0x192)])this[_0x1db3a9(0x246)][_0x1db3a9(0x192)]();}[_0x52c097(0x2b1)](_0x5c3104){const _0x25ab8b=_0x52c097;if(!this[_0x25ab8b(0x26f)])this[_0x25ab8b(0x26f)]=new Set();this[_0x25ab8b(0x26f)][_0x25ab8b(0x262)](_0x5c3104);if(!this[_0x25ab8b(0x1bb)])this[_0x25ab8b(0x1fd)]();}[_0x52c097(0x2f4)](_0x233284){const _0x124b60=_0x52c097;this[_0x124b60(0x26f)]?.['delete'](_0x233284);}[_0x52c097(0x1fd)](){const _0x30fb72=_0x52c097;if(this[_0x30fb72(0x260)])return;this[_0x30fb72(0x260)]=!![];!this['_h']&&(this['_h']=_0x36375a({'resolution':0xa}),this['_h'][_0x30fb72(0x1f0)]());const _0x45aab8=_0x27b244;this[_0x30fb72(0x26b)]=setInterval(()=>{const _0x380b69=_0x30fb72,_0x2f5630=this['_h'];if(!_0x2f5630)return;const _0x1e62dd=_0x2f5630[_0x380b69(0x2da)](0x63)/0xf4240,_0x2d8f3b=_0x2f5630[_0x380b69(0x244)]/0xf4240,_0x201b3e=_0x2f5630[_0x380b69(0x25d)]/0xf4240;_0x2f5630[_0x380b69(0x2a2)]();if(this[_0x380b69(0x26f)])for(const _0x581304 of this['_windowCbs']){try{_0x581304({'p99Ms':_0x1e62dd,'maxMs':_0x2d8f3b,'meanMs':_0x201b3e,'reportMs':_0x45aab8});}catch{}}},_0x45aab8);if(this[_0x30fb72(0x26b)][_0x30fb72(0x192)])this['_admissionTimer']['unref']();}[_0x52c097(0x24e)](){const _0x2c668b=_0x52c097,_0x14be4c=this['_h'],_0x1a5c0a=_0x14be4c[_0x2c668b(0x244)]/0xf4240,_0x310543=_0x14be4c[_0x2c668b(0x2da)](0x63)/0xf4240,_0x1a5280=_0x14be4c[_0x2c668b(0x25d)]/0xf4240;_0x14be4c[_0x2c668b(0x2a2)]();const _0x2ad6c6=[...this[_0x2c668b(0x2ae)][_0x2c668b(0x218)]()]['map'](([_0x116fec,_0x35730e])=>({'label':_0x116fec,..._0x35730e}))[_0x2c668b(0x2dd)]((_0x50469b,_0x446d59)=>_0x446d59['ms']-_0x50469b['ms'])[_0x2c668b(0x2cc)](0x0,0x8);this['_buckets']['clear']();const _0x232fc0=_0x2ad6c6[_0x2c668b(0x261)]((_0x3c348f,_0x52eba0)=>_0x3c348f+_0x52eba0['ms'],0x0),_0x4e4aaf=_0x2ad6c6['map'](_0x17b21d=>_0x17b21d[_0x2c668b(0x301)]+'='+_0x17b21d['ms'][_0x2c668b(0x1a8)](0x0)+_0x2c668b(0x2c1)+_0x17b21d[_0x2c668b(0x29b)]+(_0x17b21d[_0x2c668b(0x1ac)]>0x5?_0x2c668b(0x290)+_0x17b21d['maxMs']['toFixed'](0x0)+'ms'+(_0x17b21d[_0x2c668b(0x1cc)]?'\x20'+_0x17b21d['maxExtra']:'')+')':''));(_0x2e6b49||_0x1a5c0a>=_0x5ba643)&&this[_0x2c668b(0x286)](_0x2c668b(0x1a9)+_0x27b244+_0x2c668b(0x198)+_0x1a5c0a['toFixed'](0x0)+_0x2c668b(0x263)+_0x310543['toFixed'](0x0)+'ms\x20mean='+_0x1a5280['toFixed'](0x0)+'ms\x20busy='+_0x232fc0[_0x2c668b(0x1a8)](0x0)+'ms'+(_0x4e4aaf[_0x2c668b(0x220)]?_0x2c668b(0x28c)+_0x4e4aaf[_0x2c668b(0x1e1)]('\x20\x20'):''),{'feature':_0x2c668b(0x23e)});if(this[_0x2c668b(0x26f)])for(const _0x13b980 of this[_0x2c668b(0x26f)]){try{_0x13b980({'p99Ms':_0x310543,'maxMs':_0x1a5c0a,'meanMs':_0x1a5280,'reportMs':_0x27b244});}catch{}}}[_0x52c097(0x240)](){const _0x17e5aa=_0x52c097;if(this[_0x17e5aa(0x246)])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x17e5aa(0x1be)]();this[_0x17e5aa(0x246)]=null,this['_h']=null,this[_0x17e5aa(0x1bb)]=![];}}const _0x386a79=new _0x30584d();if(_0x386a79[_0x52c097(0x264)])_0x386a79[_0x52c097(0x265)]();return okdbLoopMonitor={'LOOP':_0x386a79},okdbLoopMonitor;}var okdbTransaction,hasRequiredOkdbTransaction;function requireOkdbTransaction(){const _0x58e204=_0x4794cd;if(hasRequiredOkdbTransaction)return okdbTransaction;hasRequiredOkdbTransaction=0x1;const _0xc32d2f=require$$0$2,{EVENTS:_0x315408}=requireOkdbEnums(),{OKDBError:_0x3627d8}=requireOkdbError(),{LOOP:_0x57867e}=requireOkdbLoopMonitor();function _0x4a0025(_0x1aab28){const _0x1bc277=_0x5daa;return _0x1aab28[_0x1bc277(0x205)](_0x273260=>{const _0x970756=_0x1bc277,[_0x1317f6,_0xc98ac7]=_0x273260[_0x970756(0x1fc)]||[];return{'action':_0x273260[_0x970756(0x2df)],'type':_0x1317f6,'key':_0xc98ac7};});}class _0x5aabf4{[_0x58e204(0x1ca)];[_0x58e204(0x2f3)]=[];[_0x58e204(0x1da)]=[];[_0x58e204(0x1d2)]=[];constructor(_0xb28baf,_0x4a7ea4={'useReadTransaction':![]}){const _0x15de8e=_0x58e204;this[_0x15de8e(0x1ca)]=_0xb28baf,this[_0x15de8e(0x202)]=_0x4a7ea4,this['id']=_0xc32d2f['v4'](),this[_0x15de8e(0x2c7)]=this[_0x15de8e(0x202)][_0x15de8e(0x1f1)]?this['okdb']['db']['useReadTransaction']():null,this['_closed']=![];}[_0x58e204(0x23a)](_0x40c618){const _0x5c61b0=_0x58e204;this[_0x5c61b0(0x1da)][_0x5c61b0(0x305)](_0x40c618);}[_0x58e204(0x278)](_0x396f0f){const _0x4857f0=_0x58e204;this[_0x4857f0(0x1d2)][_0x4857f0(0x305)](_0x396f0f);}[_0x58e204(0x21a)](){const _0x185e64=_0x58e204;if(!this[_0x185e64(0x2c7)])return;try{this[_0x185e64(0x2c7)][_0x185e64(0x20e)]();}catch(_0x270d6c){}this[_0x185e64(0x2c7)]=null;}[_0x58e204(0x1d3)](){const _0x2297b5=_0x58e204;if(this[_0x2297b5(0x19e)])throw new _0x3627d8(_0x2297b5(0x27b),'TXN_CLOSED');}[_0x58e204(0x237)](_0x52d57d,_0x4f7fd1){const _0xe1b670=_0x58e204;return this[_0xe1b670(0x1d3)](),this[_0xe1b670(0x1ca)][_0xe1b670(0x237)](_0x52d57d,_0x4f7fd1,{'transaction':this[_0xe1b670(0x2c7)]});}['getEntry'](_0x53fd27,_0x27e55c){const _0x4acabb=_0x58e204;return this['_assertOpen'](),this[_0x4acabb(0x1ca)][_0x4acabb(0x2f9)](_0x53fd27,_0x27e55c,{'transaction':this[_0x4acabb(0x2c7)]});}[_0x58e204(0x20a)](_0x594fe9,_0xd94d9b){const _0x56510e=_0x58e204;return this[_0x56510e(0x1d3)](),this[_0x56510e(0x1ca)]['getMany'](_0x594fe9,_0xd94d9b,{'transaction':this['readTransaction']});}[_0x58e204(0x1de)](_0x23cff7,_0x3b0d7c={}){const _0x205208=_0x58e204;return this[_0x205208(0x1d3)](),this[_0x205208(0x1ca)][_0x205208(0x1de)](_0x23cff7,{'transaction':this[_0x205208(0x2c7)],..._0x3b0d7c});}['getValues'](_0x2a55fc,_0x4263bc={}){const _0x4fabbb=_0x58e204;return this[_0x4fabbb(0x1d3)](),this[_0x4fabbb(0x1ca)][_0x4fabbb(0x268)](_0x2a55fc,{'transaction':this['readTransaction'],..._0x4263bc});}[_0x58e204(0x2b8)](_0x4de28b,_0x41a9ac={}){const _0x1fff25=_0x58e204;return this[_0x1fff25(0x1d3)](),this[_0x1fff25(0x1ca)][_0x1fff25(0x2b8)](_0x4de28b,{'transaction':this[_0x1fff25(0x2c7)],..._0x41a9ac});}[_0x58e204(0x2cf)](_0x447d96,_0x1b93ba,_0x3fdf2f={}){const _0x52d5a8=_0x58e204;return this[_0x52d5a8(0x1d3)](),this[_0x52d5a8(0x1ca)]['byIndex'](_0x447d96,_0x1b93ba,{'transaction':this[_0x52d5a8(0x2c7)],..._0x3fdf2f});}[_0x58e204(0x25e)](_0xb58623,_0x357b99,_0x517b1d={}){const _0x8d43bf=_0x58e204;return this[_0x8d43bf(0x1d3)](),this[_0x8d43bf(0x1ca)][_0x8d43bf(0x25e)](_0xb58623,_0x357b99,{'transaction':this[_0x8d43bf(0x2c7)],..._0x517b1d});}[_0x58e204(0x2d5)](_0x3afce9=null){const _0xa203d5=_0x58e204;return this[_0xa203d5(0x1d3)](),this[_0xa203d5(0x1ca)]['getClock'](_0x3afce9,{'transaction':this[_0xa203d5(0x2c7)]});}['getCount'](_0x26e529){const _0x263b30=_0x58e204;return this[_0x263b30(0x1d3)](),this['okdb']['getCount'](_0x26e529,{'transaction':this['readTransaction']});}[_0x58e204(0x253)](_0x2d3876,_0x136510,_0x188f90,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x58e204(0x1b8)](),origin:origin=null,ttl:ttl=null}={}){const _0x1940a7=_0x58e204;this[_0x1940a7(0x2f3)][_0x1940a7(0x305)]({'action':_0x1940a7(0x253),'args':[_0x2d3876,_0x136510,_0x188f90,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}['update'](_0x25829b,_0x1f11a6,_0x534e4f,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x58e204(0x1b8)](),origin:origin=null,ttl:ttl=null}={}){const _0x1ccd90=_0x58e204;this[_0x1ccd90(0x2f3)][_0x1ccd90(0x305)]({'action':_0x1ccd90(0x21e),'args':[_0x25829b,_0x1f11a6,_0x534e4f,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}['patch'](_0x26d13f,_0x24acd5,_0x2d7bb3,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x58e204(0x1b8)](),origin:origin=null,ttl:ttl=null}={}){const _0x145ae2=_0x58e204;this[_0x145ae2(0x2f3)][_0x145ae2(0x305)]({'action':_0x145ae2(0x23f),'args':[_0x26d13f,_0x24acd5,_0x2d7bb3,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}['create'](_0x375f80,_0x3185cc,_0x393c6f,{version:version=null,timestamp:timestamp=Date[_0x58e204(0x1b8)](),origin:origin=null,ttl:ttl=null}={}){const _0x3b4ea5=_0x58e204;this['actions'][_0x3b4ea5(0x305)]({'action':_0x3b4ea5(0x2c6),'args':[_0x375f80,_0x3185cc,_0x393c6f,{'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x58e204(0x2bf)](_0x297266,_0x1dcda5,{ifVersion:ifVersion=null,timestamp:timestamp=Date['now'](),origin:origin=null}={}){const _0x3ff244=_0x58e204;this[_0x3ff244(0x2f3)][_0x3ff244(0x305)]({'action':'remove','args':[_0x297266,_0x1dcda5,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin}]});}['setTTL'](_0x529633,_0x37905e,_0x324317){const _0x55c0dc=_0x58e204;this[_0x55c0dc(0x2f3)]['push']({'action':_0x55c0dc(0x1b4),'args':[_0x529633,_0x37905e,_0x324317]});}[_0x58e204(0x2c9)](_0x4107d7,_0x586170){const _0x2f4f6f=_0x58e204;this[_0x2f4f6f(0x2f3)][_0x2f4f6f(0x305)]({'action':_0x2f4f6f(0x2c9),'args':[_0x4107d7,_0x586170]});}['rollback'](){const _0x3affc5=_0x58e204;if(this['_closed'])return;for(const _0x1430bd of this['_undoHooks']){try{_0x1430bd();}catch{}}this[_0x3affc5(0x1ca)][_0x3affc5(0x1e2)][_0x3affc5(0x295)](_0x315408[_0x3affc5(0x236)],{'id':this['id']}),this['actions']=[],this['_closeReadTransaction'](),this[_0x3affc5(0x19e)]=!![];}async[_0x58e204(0x26d)](){const _0x356dcf=_0x58e204;if(this[_0x356dcf(0x19e)])throw new Error(_0x356dcf(0x27b));const _0x31e480={'id':this['id'],'timestamp':Date[_0x356dcf(0x1b8)](),'actions':this[_0x356dcf(0x2f3)]};this[_0x356dcf(0x1ca)][_0x356dcf(0x1e2)][_0x356dcf(0x295)](_0x315408[_0x356dcf(0x207)],_0x31e480);try{const _0x3c70cc=_0x57867e['enabled']?_0x57867e[_0x356dcf(0x1b8)]():0x0;await this[_0x356dcf(0x1ca)]['_writer']['transaction'](()=>{const _0x2cfa7f=_0x356dcf;for(const _0x18b7db of this[_0x2cfa7f(0x2f3)]){const _0x57c3c4=this['okdb']['_'+_0x18b7db[_0x2cfa7f(0x2df)]];if(typeof _0x57c3c4!==_0x2cfa7f(0x1e6))throw new Error('Unknown\x20transaction\x20action:\x20'+_0x18b7db[_0x2cfa7f(0x2df)]);_0x57c3c4[_0x2cfa7f(0x276)](this[_0x2cfa7f(0x1ca)],this,..._0x18b7db[_0x2cfa7f(0x1fc)]);}}),_0x57867e['enabled']&&_0x57867e[_0x356dcf(0x245)](_0x356dcf(0x2bc),_0x57867e[_0x356dcf(0x1b8)]()-_0x3c70cc,(this[_0x356dcf(0x1ca)][_0x356dcf(0x2d2)]??'?')+_0x356dcf(0x292)+this[_0x356dcf(0x2f3)]['length']);}catch(_0x13408c){for(const _0x42f135 of this[_0x356dcf(0x1d2)]){try{_0x42f135();}catch{}}this[_0x356dcf(0x21a)](),this[_0x356dcf(0x19e)]=!![];if(_0x13408c instanceof _0x3627d8)throw _0x13408c;const _0x98d174={'cause':_0x13408c,'env':this[_0x356dcf(0x1ca)]?.['name'],'envPath':this[_0x356dcf(0x1ca)]?.['path'],'pid':process[_0x356dcf(0x2b6)],'txnId':this['id'],'actionCount':this['actions'][_0x356dcf(0x220)],'actions':_0x4a0025(this['actions']),'nativeCode':_0x13408c?.['code'],'nativeName':_0x13408c?.[_0x356dcf(0x2d2)]};try{this[_0x356dcf(0x1ca)]?.[_0x356dcf(0x1ed)]?.[_0x356dcf(0x1a4)]?.(_0x356dcf(0x1dd),{'env':_0x98d174['env'],'envPath':_0x98d174[_0x356dcf(0x22d)],'pid':_0x98d174['pid'],'txnId':_0x98d174[_0x356dcf(0x2c0)],'actionCount':_0x98d174[_0x356dcf(0x1f4)],'actions':_0x98d174[_0x356dcf(0x2f3)],'nativeCode':_0x98d174[_0x356dcf(0x28a)],'error':_0x13408c?.[_0x356dcf(0x1e4)],'stack':_0x13408c?.[_0x356dcf(0x211)]});}catch{}throw new _0x3627d8(_0x13408c?.[_0x356dcf(0x1e4)]||_0x356dcf(0x1eb),_0x356dcf(0x1f7),_0x98d174);}this[_0x356dcf(0x1ca)]['events'][_0x356dcf(0x295)](_0x315408[_0x356dcf(0x1c2)],_0x31e480);for(const _0x4b18ea of this['_doHooks']){try{await _0x4b18ea();}catch{}}this['actions']=[],this[_0x356dcf(0x21a)](),this[_0x356dcf(0x19e)]=!![];}static['createWriteFacade'](_0x157357){const _0x255097=_0x58e204;return Object[_0x255097(0x2d3)]({'id':_0x157357['id'],'put':_0x157357['put'][_0x255097(0x217)](_0x157357),'update':_0x157357[_0x255097(0x21e)]['bind'](_0x157357),'patch':_0x157357[_0x255097(0x23f)]['bind'](_0x157357),'create':_0x157357[_0x255097(0x2c6)][_0x255097(0x217)](_0x157357),'remove':_0x157357[_0x255097(0x2bf)][_0x255097(0x217)](_0x157357),'setTTL':_0x157357[_0x255097(0x1b4)][_0x255097(0x217)](_0x157357),'clearTTL':_0x157357[_0x255097(0x2c9)][_0x255097(0x217)](_0x157357),'commit':_0x157357[_0x255097(0x26d)][_0x255097(0x217)](_0x157357),'rollback':_0x157357[_0x255097(0x1e7)][_0x255097(0x217)](_0x157357),'get':_0x157357['get'][_0x255097(0x217)](_0x157357),'getEntry':_0x157357[_0x255097(0x2f9)][_0x255097(0x217)](_0x157357),'getMany':_0x157357['getMany']['bind'](_0x157357),'getRange':_0x157357[_0x255097(0x1de)]['bind'](_0x157357),'getValues':_0x157357[_0x255097(0x268)][_0x255097(0x217)](_0x157357),'getKeys':_0x157357[_0x255097(0x2b8)][_0x255097(0x217)](_0x157357),'byIndex':_0x157357[_0x255097(0x2cf)][_0x255097(0x217)](_0x157357),'query':_0x157357[_0x255097(0x25e)][_0x255097(0x217)](_0x157357),'getClock':_0x157357[_0x255097(0x2d5)][_0x255097(0x217)](_0x157357),'getCount':_0x157357['getCount'][_0x255097(0x217)](_0x157357),'read':_0x157357,'raw':_0x157357});}static['applyOps'](_0x1574b4,_0x52bdd2=[]){const _0x3e9532=_0x58e204;if(!Array[_0x3e9532(0x2a8)](_0x52bdd2))throw new _0x3627d8(_0x3e9532(0x234),_0x3e9532(0x19f));for(const _0x17f9d3 of _0x52bdd2){if(Array['isArray'](_0x17f9d3)){const [_0x5b8df7,..._0x1cd8f7]=_0x17f9d3;if(typeof _0x1574b4[_0x5b8df7]!==_0x3e9532(0x1e6))throw new _0x3627d8(_0x3e9532(0x2ac)+_0x5b8df7,_0x3e9532(0x251),{'action':_0x5b8df7});_0x1574b4[_0x5b8df7](..._0x1cd8f7);continue;}if(!_0x17f9d3||typeof _0x17f9d3!==_0x3e9532(0x195))throw new _0x3627d8(_0x3e9532(0x235),_0x3e9532(0x250));const {action:_0x149690}=_0x17f9d3;if(typeof _0x149690!==_0x3e9532(0x225)||typeof _0x1574b4[_0x149690]!=='function')throw new _0x3627d8(_0x3e9532(0x2ac)+_0x149690,_0x3e9532(0x251),{'action':_0x149690});switch(_0x149690){case'put':case _0x3e9532(0x21e):case _0x3e9532(0x2c6):_0x1574b4[_0x149690](_0x17f9d3[_0x3e9532(0x302)],_0x17f9d3[_0x3e9532(0x258)],_0x17f9d3[_0x3e9532(0x222)],{..._0x17f9d3[_0x3e9532(0x202)],'ttl':_0x17f9d3[_0x3e9532(0x2cd)]??_0x17f9d3[_0x3e9532(0x202)]?.[_0x3e9532(0x2cd)]??null});break;case _0x3e9532(0x23f):_0x1574b4[_0x3e9532(0x23f)](_0x17f9d3[_0x3e9532(0x302)],_0x17f9d3[_0x3e9532(0x258)],_0x17f9d3[_0x3e9532(0x23f)],{..._0x17f9d3[_0x3e9532(0x202)],'ttl':_0x17f9d3[_0x3e9532(0x2cd)]??_0x17f9d3[_0x3e9532(0x202)]?.[_0x3e9532(0x2cd)]??null});break;case _0x3e9532(0x2bf):_0x1574b4['remove'](_0x17f9d3[_0x3e9532(0x302)],_0x17f9d3[_0x3e9532(0x258)],_0x17f9d3[_0x3e9532(0x202)]||{});break;case _0x3e9532(0x1b4):_0x1574b4[_0x3e9532(0x1b4)](_0x17f9d3['type'],_0x17f9d3[_0x3e9532(0x258)],_0x17f9d3[_0x3e9532(0x2cd)]);break;case _0x3e9532(0x2c9):_0x1574b4['clearTTL'](_0x17f9d3[_0x3e9532(0x302)],_0x17f9d3[_0x3e9532(0x258)]);break;default:throw new _0x3627d8(_0x3e9532(0x190)+_0x149690,_0x3e9532(0x251),{'action':_0x149690});}}}static async['run'](_0x4fb3a0,_0x4f0cdd,_0x29a62d={}){const _0x134b1f=_0x58e204,_0x3a78cf=new _0x5aabf4(_0x4fb3a0,_0x29a62d),_0x3f780e=_0x5aabf4['createWriteFacade'](_0x3a78cf);try{typeof _0x4f0cdd===_0x134b1f(0x1e6)?await _0x4f0cdd(_0x3f780e):_0x5aabf4[_0x134b1f(0x2a9)](_0x3a78cf,_0x4f0cdd||[]);const _0xd0b1d=_0x3a78cf[_0x134b1f(0x2f3)]['length'];return await _0x3a78cf[_0x134b1f(0x26d)](),{'id':_0x3a78cf['id'],'actions':_0xd0b1d};}catch(_0x5b6520){try{_0x3a78cf['rollback']();}catch(_0x440674){}throw _0x5b6520;}}}return okdbTransaction=_0x5aabf4,okdbTransaction;}var okdbFunctionsFacades,hasRequiredOkdbFunctionsFacades;function requireOkdbFunctionsFacades(){if(hasRequiredOkdbFunctionsFacades)return okdbFunctionsFacades;hasRequiredOkdbFunctionsFacades=0x1;const _0x4167c2=requireOkdbTransaction();function _0x8e048c(_0x61e244){const _0x5b6c72=_0x5daa;return{'transaction':typeof _0x61e244[_0x5b6c72(0x28b)]===_0x5b6c72(0x1e6)?_0x61e244['transaction'][_0x5b6c72(0x217)](_0x61e244):_0x394408=>new _0x4167c2(_0x61e244,_0x394408),'txn':typeof _0x61e244[_0x5b6c72(0x2ee)]===_0x5b6c72(0x1e6)?_0x61e244[_0x5b6c72(0x2ee)][_0x5b6c72(0x217)](_0x61e244):(_0x5eea4c,_0xeab1d7)=>_0x4167c2[_0x5b6c72(0x18f)](_0x61e244,_0x5eea4c,_0xeab1d7)};}function _0x2a3ac8(_0x190115){const _0x420a42=_0x5daa;return{'name':_0x190115[_0x420a42(0x2d2)],..._0x8e048c(_0x190115),'put':_0x190115[_0x420a42(0x253)][_0x420a42(0x217)](_0x190115),'update':_0x190115['update'][_0x420a42(0x217)](_0x190115),'patch':_0x190115[_0x420a42(0x23f)][_0x420a42(0x217)](_0x190115),'create':_0x190115[_0x420a42(0x2c6)][_0x420a42(0x217)](_0x190115),'remove':_0x190115[_0x420a42(0x2bf)][_0x420a42(0x217)](_0x190115),'get':_0x190115['get'][_0x420a42(0x217)](_0x190115),'getMany':_0x190115[_0x420a42(0x20a)][_0x420a42(0x217)](_0x190115),'getEntry':_0x190115[_0x420a42(0x2f9)][_0x420a42(0x217)](_0x190115),'getRange':_0x190115['getRange'][_0x420a42(0x217)](_0x190115),'getValues':_0x190115[_0x420a42(0x268)][_0x420a42(0x217)](_0x190115),'getKeys':_0x190115[_0x420a42(0x2b8)][_0x420a42(0x217)](_0x190115),'getCount':_0x190115[_0x420a42(0x2fc)][_0x420a42(0x217)](_0x190115),'getByPrefix':_0x190115[_0x420a42(0x2b0)][_0x420a42(0x217)](_0x190115),'getIndex':_0x190115[_0x420a42(0x1d8)][_0x420a42(0x217)](_0x190115),'byIndex':_0x190115[_0x420a42(0x2cf)]['bind'](_0x190115),'query':_0x190115[_0x420a42(0x25e)][_0x420a42(0x217)](_0x190115),'geoQuery':_0x190115[_0x420a42(0x1b7)][_0x420a42(0x217)](_0x190115),'ftsQuery':_0x190115[_0x420a42(0x284)][_0x420a42(0x217)](_0x190115),'setTTL':_0x190115[_0x420a42(0x1b4)][_0x420a42(0x217)](_0x190115),'getTTL':_0x190115[_0x420a42(0x1ad)]['bind'](_0x190115),'clearTTL':_0x190115['clearTTL'][_0x420a42(0x217)](_0x190115),'sweepExpiredTTL':_0x190115['sweepExpiredTTL']['bind'](_0x190115),'listTTL':_0x190115[_0x420a42(0x1b6)][_0x420a42(0x217)](_0x190115),'ttlStats':_0x190115[_0x420a42(0x219)][_0x420a42(0x217)](_0x190115),'setDefaultTTL':_0x190115[_0x420a42(0x307)][_0x420a42(0x217)](_0x190115),'getDefaultTTL':_0x190115[_0x420a42(0x2c8)]['bind'](_0x190115),'clearDefaultTTL':_0x190115['clearDefaultTTL'][_0x420a42(0x217)](_0x190115),'registerType':_0x190115['registerType'][_0x420a42(0x217)](_0x190115),'ensureType':_0x190115[_0x420a42(0x1a1)]['bind'](_0x190115),'hasType':_0x190115['hasType'][_0x420a42(0x217)](_0x190115),'dropType':_0x190115['dropType'][_0x420a42(0x217)](_0x190115),'registerIndex':_0x190115[_0x420a42(0x212)][_0x420a42(0x217)](_0x190115),'hasIndex':_0x190115[_0x420a42(0x1cd)][_0x420a42(0x217)](_0x190115),'dropIndex':_0x190115[_0x420a42(0x1aa)][_0x420a42(0x217)](_0x190115),'resetIndex':_0x190115[_0x420a42(0x29f)][_0x420a42(0x217)](_0x190115),'indexReady':_0x190115['indexReady'][_0x420a42(0x217)](_0x190115),'getIndexStatus':_0x190115[_0x420a42(0x1e3)][_0x420a42(0x217)](_0x190115),'getClock':_0x190115[_0x420a42(0x2d5)]['bind'](_0x190115),'getChanges':_0x190115[_0x420a42(0x1e5)][_0x420a42(0x217)](_0x190115),'count':_0x190115[_0x420a42(0x29b)][_0x420a42(0x217)](_0x190115),'range':_0x190115[_0x420a42(0x2be)][_0x420a42(0x217)](_0x190115),'now':_0x190115[_0x420a42(0x1b8)]['bind'](_0x190115)};}function _0x3b20b7(_0x6b0dd1){const _0x572db3=_0x5daa;if(!_0x6b0dd1)return null;const _0x592bd4={};for(const _0x2f4f50 of['enqueue',_0x572db3(0x1c7),_0x572db3(0x19a),_0x572db3(0x26c),_0x572db3(0x20f),_0x572db3(0x2ea),_0x572db3(0x271),'listBuckets']){if(typeof _0x6b0dd1[_0x2f4f50]===_0x572db3(0x1e6))_0x592bd4[_0x2f4f50]=_0x6b0dd1[_0x2f4f50]['bind'](_0x6b0dd1);}return Object[_0x572db3(0x1f9)](_0x592bd4)[_0x572db3(0x220)]?_0x592bd4:null;}function _0x10d72e(_0x45f978){const _0x4f4f86=_0x5daa;if(!_0x45f978)return null;const _0x532cb9={};for(const _0x3b87b2 of['upload',_0x4f4f86(0x226),'remove',_0x4f4f86(0x237),_0x4f4f86(0x19a),_0x4f4f86(0x224)]){if(typeof _0x45f978[_0x3b87b2]==='function')_0x532cb9[_0x3b87b2]=_0x45f978[_0x3b87b2][_0x4f4f86(0x217)](_0x45f978);}return Object[_0x4f4f86(0x1f9)](_0x532cb9)[_0x4f4f86(0x220)]?_0x532cb9:null;}function _0x34f1de(_0x484ff2){const _0x31c267=_0x5daa;return{'env':_0x484ff2[_0x31c267(0x256)]['bind'](_0x484ff2),'createEnvironment':_0x484ff2[_0x31c267(0x2ce)]['bind'](_0x484ff2),'removeEnvironment':_0x484ff2[_0x31c267(0x1cb)][_0x31c267(0x217)](_0x484ff2),'info':_0x484ff2[_0x31c267(0x21b)],..._0x8e048c(_0x484ff2),'put':_0x484ff2[_0x31c267(0x253)][_0x31c267(0x217)](_0x484ff2),'update':_0x484ff2['update'][_0x31c267(0x217)](_0x484ff2),'patch':_0x484ff2[_0x31c267(0x23f)][_0x31c267(0x217)](_0x484ff2),'create':_0x484ff2['create']['bind'](_0x484ff2),'remove':_0x484ff2[_0x31c267(0x2bf)][_0x31c267(0x217)](_0x484ff2),'get':_0x484ff2['get'][_0x31c267(0x217)](_0x484ff2),'getMany':_0x484ff2['getMany'][_0x31c267(0x217)](_0x484ff2),'getEntry':_0x484ff2[_0x31c267(0x2f9)][_0x31c267(0x217)](_0x484ff2),'getRange':_0x484ff2[_0x31c267(0x1de)][_0x31c267(0x217)](_0x484ff2),'getValues':_0x484ff2[_0x31c267(0x268)][_0x31c267(0x217)](_0x484ff2),'getKeys':_0x484ff2[_0x31c267(0x2b8)]['bind'](_0x484ff2),'getCount':_0x484ff2[_0x31c267(0x2fc)][_0x31c267(0x217)](_0x484ff2),'getByPrefix':_0x484ff2[_0x31c267(0x2b0)][_0x31c267(0x217)](_0x484ff2),'getIndex':_0x484ff2[_0x31c267(0x1d8)][_0x31c267(0x217)](_0x484ff2),'byIndex':_0x484ff2[_0x31c267(0x2cf)][_0x31c267(0x217)](_0x484ff2),'query':_0x484ff2[_0x31c267(0x25e)]['bind'](_0x484ff2),'setTTL':_0x484ff2[_0x31c267(0x1b4)][_0x31c267(0x217)](_0x484ff2),'getTTL':_0x484ff2[_0x31c267(0x1ad)][_0x31c267(0x217)](_0x484ff2),'clearTTL':_0x484ff2[_0x31c267(0x2c9)]['bind'](_0x484ff2),'sweepExpiredTTL':_0x484ff2[_0x31c267(0x206)]['bind'](_0x484ff2),'listTTL':_0x484ff2[_0x31c267(0x1b6)][_0x31c267(0x217)](_0x484ff2),'ttlStats':_0x484ff2[_0x31c267(0x219)][_0x31c267(0x217)](_0x484ff2),'setDefaultTTL':_0x484ff2[_0x31c267(0x307)][_0x31c267(0x217)](_0x484ff2),'getDefaultTTL':_0x484ff2[_0x31c267(0x2c8)][_0x31c267(0x217)](_0x484ff2),'clearDefaultTTL':_0x484ff2[_0x31c267(0x2ca)][_0x31c267(0x217)](_0x484ff2),'ensureType':_0x484ff2[_0x31c267(0x1a1)]['bind'](_0x484ff2),'registerType':_0x484ff2['registerType'][_0x31c267(0x217)](_0x484ff2),'hasType':_0x484ff2[_0x31c267(0x2af)]['bind'](_0x484ff2),'dropType':_0x484ff2[_0x31c267(0x28d)][_0x31c267(0x217)](_0x484ff2),'registerIndex':_0x484ff2['registerIndex'][_0x31c267(0x217)](_0x484ff2),'hasIndex':_0x484ff2['hasIndex'][_0x31c267(0x217)](_0x484ff2),'dropIndex':_0x484ff2[_0x31c267(0x1aa)][_0x31c267(0x217)](_0x484ff2),'resetIndex':_0x484ff2[_0x31c267(0x29f)][_0x31c267(0x217)](_0x484ff2),'indexReady':_0x484ff2[_0x31c267(0x1c0)]['bind'](_0x484ff2),'getIndexStatus':_0x484ff2[_0x31c267(0x1e3)][_0x31c267(0x217)](_0x484ff2),'getClock':_0x484ff2[_0x31c267(0x2d5)][_0x31c267(0x217)](_0x484ff2),'getChanges':_0x484ff2[_0x31c267(0x1e5)][_0x31c267(0x217)](_0x484ff2),'queue':_0x484ff2[_0x31c267(0x2ed)],'files':_0x484ff2[_0x31c267(0x2fb)]};}return okdbFunctionsFacades={'createEnvFacade':_0x2a3ac8,'createQueueFacade':_0x3b20b7,'createFilesFacade':_0x10d72e,'createGlobalFacade':_0x34f1de},okdbFunctionsFacades;}function _0x5daa(_0x460f9e,_0x50bf05){_0x460f9e=_0x460f9e-0x18e;const _0x419431=_0x4194();let _0x5daa3a=_0x419431[_0x460f9e];return _0x5daa3a;}var okdbFunctionsDryrun,hasRequiredOkdbFunctionsDryrun;function requireOkdbFunctionsDryrun(){const _0x33fddd=_0x4794cd;if(hasRequiredOkdbFunctionsDryrun)return okdbFunctionsDryrun;hasRequiredOkdbFunctionsDryrun=0x1;const _0x582d50=new Set([_0x33fddd(0x253),'patch',_0x33fddd(0x2c6),_0x33fddd(0x2bf),_0x33fddd(0x21e),_0x33fddd(0x1b4),_0x33fddd(0x2c9),_0x33fddd(0x206),_0x33fddd(0x307),_0x33fddd(0x2ca),_0x33fddd(0x28d),'dropIndex',_0x33fddd(0x29f)]),_0x59e98f=new Set([_0x33fddd(0x2e0),'updateJob',_0x33fddd(0x20f),_0x33fddd(0x2ea)]),_0x1422c3=new Set([_0x33fddd(0x21d),_0x33fddd(0x2bf)]);function _0x264549(_0x1d6fd3,_0x14a88f){const _0x23bf95=_0x33fddd;if(_0x1d6fd3===_0x23bf95(0x256)||_0x1d6fd3===_0x23bf95(0x20c))return _0x582d50['has'](_0x14a88f);if(_0x1d6fd3===_0x23bf95(0x2ed))return _0x59e98f[_0x23bf95(0x309)](_0x14a88f);if(_0x1d6fd3===_0x23bf95(0x2fb))return _0x1422c3[_0x23bf95(0x309)](_0x14a88f);return![];}function _0x1cd806(_0x14edaf,_0x5eb9b2,_0x4a1e27,_0x17ff9c){if(!_0x14edaf)return _0x14edaf;return new Proxy(_0x14edaf,{'get'(_0x1d7610,_0x27f353,_0x39014e){const _0x13bd9c=_0x5daa,_0xc52dc4=Reflect[_0x13bd9c(0x237)](_0x1d7610,_0x27f353,_0x39014e);if(typeof _0xc52dc4!==_0x13bd9c(0x1e6))return _0xc52dc4;if(!_0x264549(_0x5eb9b2,_0x27f353))return _0xc52dc4[_0x13bd9c(0x217)](_0x1d7610);return function(..._0x3eb201){const _0x288f81=_0x13bd9c;return _0x17ff9c[_0x288f81(0x305)]({'scope':_0x5eb9b2,'method':_0x27f353,'envName':_0x4a1e27,'args':_0x3eb201}),null;};}});}function _0x37f51c(_0x39928d,_0x7ed2e6,_0x343659,_0x21536e){const _0x4204fd={};for(const _0x2e99b2 of _0x343659){_0x4204fd[_0x2e99b2]=(..._0x388f3d)=>{const _0x171169=_0x5daa;return _0x264549(_0x39928d,_0x2e99b2)&&_0x21536e[_0x171169(0x305)]({'scope':_0x39928d,'method':_0x2e99b2,'envName':_0x7ed2e6,'args':_0x388f3d}),null;};}return _0x4204fd;}return okdbFunctionsDryrun={'isWriteMethod':_0x264549,'wrapForDryRun':_0x1cd806,'syntheticDryRunFacade':_0x37f51c,'ENV_WRITE_METHODS':_0x582d50,'QUEUE_WRITE_METHODS':_0x59e98f,'FILES_WRITE_METHODS':_0x1422c3},okdbFunctionsDryrun;}var okdbFunctionsContext,hasRequiredOkdbFunctionsContext;function requireOkdbFunctionsContext(){const _0x21513a=_0x4794cd;if(hasRequiredOkdbFunctionsContext)return okdbFunctionsContext;hasRequiredOkdbFunctionsContext=0x1;const {createEnvFacade:_0x381715,createQueueFacade:_0x11a225,createFilesFacade:_0x18cb11,createGlobalFacade:_0x517b14}=requireOkdbFunctionsFacades(),{wrapForDryRun:_0x1e9944,syntheticDryRunFacade:_0x1cca4b}=requireOkdbFunctionsDryrun(),_0x5beb1d=['enqueue',_0x21513a(0x1c7),'list','updateJob',_0x21513a(0x20f),_0x21513a(0x2ea),_0x21513a(0x271),'listBuckets'],_0x24bc61=[_0x21513a(0x21d),'stream','remove',_0x21513a(0x237),_0x21513a(0x19a),_0x21513a(0x224)];function _0x5d0a7a(_0x33d940,_0x29ea4f){const _0x43cf67=_0x21513a,_0x156c9e=(_0x30835c,_0x395ce7,_0xd3b610)=>_0x29ea4f({'type':_0x43cf67(0x1ed),'requestId':_0x33d940[_0x43cf67(0x2b7)],'runId':_0x33d940['runId'],'entry':{'level':_0x30835c,'msg':_0x395ce7,'context':_0xd3b610,'ts':Date[_0x43cf67(0x1b8)]()}}),_0x41cc09=(_0x25949e,_0x5eda7e)=>_0x156c9e(_0x43cf67(0x21b),_0x25949e,_0x5eda7e);return _0x41cc09['info']=(_0x56bb91,_0x4b9f20)=>_0x156c9e(_0x43cf67(0x21b),_0x56bb91,_0x4b9f20),_0x41cc09[_0x43cf67(0x2e8)]=(_0x332601,_0x11981a)=>_0x156c9e('warn',_0x332601,_0x11981a),_0x41cc09['error']=(_0x159ada,_0x3aeb7c)=>_0x156c9e(_0x43cf67(0x1a4),_0x159ada,_0x3aeb7c),_0x41cc09[_0x43cf67(0x1c6)]=(_0x7e2522,_0xd1436)=>_0x156c9e(_0x43cf67(0x1c6),_0x7e2522,_0xd1436),_0x41cc09;}function _0x20e881(_0x4cc53a,_0x273b05,_0x129fd0){const _0x440d74=_0x21513a;if(!_0x4cc53a)return null;return{'id':_0x4cc53a['id']??null,'type':_0x4cc53a[_0x440d74(0x302)]??null,'tries':_0x4cc53a[_0x440d74(0x1e9)]??null,'created':_0x4cc53a[_0x440d74(0x242)]??null,'tags':_0x4cc53a['tags']??null,'priority':_0x4cc53a[_0x440d74(0x1e0)]??null,'bucket':_0x4cc53a[_0x440d74(0x2e1)]??null,'cron':_0x4cc53a[_0x440d74(0x213)]??null,'heartbeat'(){const _0x18ba99=_0x440d74;_0x129fd0({'type':_0x18ba99(0x254),'requestId':_0x273b05[_0x18ba99(0x2b7)],'runId':_0x273b05[_0x18ba99(0x1b0)],'jobId':_0x4cc53a['id'],'claimId':_0x4cc53a['claimId']});},'markProgress'(_0x48f3e1){const _0x3462b5=_0x440d74;_0x129fd0({'type':_0x3462b5(0x1f6),'requestId':_0x273b05[_0x3462b5(0x2b7)],'runId':_0x273b05[_0x3462b5(0x1b0)],'jobId':_0x4cc53a['id'],'claimId':_0x4cc53a[_0x3462b5(0x2f8)],'message':_0x48f3e1});}};}function _0x21e05e(_0x4af647){const _0x58bc3d=_0x21513a;if(!_0x4af647)return null;return{'mode':_0x4af647[_0x58bc3d(0x2d7)]??null,'sourceType':_0x4af647[_0x58bc3d(0x303)]??null,'sourceEnv':_0x4af647['sourceEnv']??null,'processor':_0x4af647[_0x58bc3d(0x1a3)]??null,'engineKey':_0x4af647['engineKey']??null,'cursorKey':_0x4af647['cursorKey']??null};}function _0x2cc083(_0xb5fa8a){const _0x451cf1=_0x21513a;if(!_0xb5fa8a)return null;return{'mode':_0xb5fa8a['mode']??null,'sourceType':_0xb5fa8a[_0x451cf1(0x303)]??null,'targetType':_0xb5fa8a[_0x451cf1(0x27c)]??null,'sourceEnv':_0xb5fa8a['sourceEnv']??null,'targetEnv':_0xb5fa8a[_0x451cf1(0x1a7)]??null,'engineKey':_0xb5fa8a[_0x451cf1(0x1ef)]??null,'cursorKey':_0xb5fa8a[_0x451cf1(0x230)]??null};}function _0x44c7fc(_0x6d3a26,_0x44de68,_0x2b2e77,_0x29d6e0=null,_0x58f797=null){const _0x36f907=_0x21513a,_0x9129b7={'runId':_0x44de68['runId'],'scope':'env','env':_0x44de68['envName']??null,'functionName':_0x44de68[_0x36f907(0x1cf)],'trigger':_0x44de68[_0x36f907(0x21b)]?.[_0x36f907(0x1a6)]??_0x36f907(0x2d9),'requestedAt':_0x44de68[_0x36f907(0x21b)]?.['requestedAt']??Date['now']()},_0x4dac7a=_0x5d0a7a(_0x44de68,_0x2b2e77),_0x57261b=AbortSignal['timeout'](Math[_0x36f907(0x244)](0x1,_0x44de68['runtime']?.[_0x36f907(0x1d7)]??0x3e8)),_0x62ad0=_0x58f797?AbortSignal[_0x36f907(0x228)]([_0x57261b,_0x58f797]):_0x57261b,_0x5c4965=_0x6d3a26[_0x36f907(0x256)](_0x44de68['envName']),_0x205eb4=_0x29d6e0?_0x1e9944(_0x5c4965,_0x36f907(0x256),_0x44de68['envName'],_0x29d6e0):_0x5c4965,_0x5b5f12=_0x29d6e0?_0x5c4965[_0x36f907(0x2ed)]?_0x1e9944(_0x5c4965[_0x36f907(0x2ed)],_0x36f907(0x2ed),_0x44de68[_0x36f907(0x2e6)],_0x29d6e0):_0x1cca4b(_0x36f907(0x2ed),_0x44de68[_0x36f907(0x2e6)],_0x5beb1d,_0x29d6e0):_0x5c4965[_0x36f907(0x2ed)],_0x324629=_0x29d6e0?_0x5c4965[_0x36f907(0x2fb)]?_0x1e9944(_0x5c4965[_0x36f907(0x2fb)],'files',_0x44de68[_0x36f907(0x2e6)],_0x29d6e0):_0x1cca4b(_0x36f907(0x2fb),_0x44de68['envName'],_0x24bc61,_0x29d6e0):_0x5c4965[_0x36f907(0x2fb)],_0x79492f=_0x381715(_0x205eb4),_0x29b368=_0x11a225(_0x5b5f12),_0x4894f9=_0x18cb11(_0x324629);if(_0x29b368)_0x79492f[_0x36f907(0x2ed)]=_0x29b368;if(_0x4894f9)_0x79492f['files']=_0x4894f9;const _0x1330bb={'payload':_0x44de68['payload']??null,'info':_0x9129b7,'signal':_0x62ad0,'log':_0x4dac7a,'env':_0x79492f},_0x7903c2=_0x20e881(_0x44de68[_0x36f907(0x28e)],_0x44de68,_0x2b2e77);if(_0x7903c2)_0x1330bb[_0x36f907(0x243)]=_0x7903c2;const _0x48599e=_0x21e05e(_0x44de68[_0x36f907(0x259)]);if(_0x48599e)_0x1330bb[_0x36f907(0x1a3)]=_0x48599e;const _0x14919f=_0x2cc083(_0x44de68['materializerContext']);if(_0x14919f)_0x1330bb[_0x36f907(0x23b)]=_0x14919f;if(_0x44de68[_0x36f907(0x204)]){const _0x517721=_0x29d6e0?_0x1e9944(_0x6d3a26,'global',null,_0x29d6e0):_0x6d3a26;_0x1330bb[_0x36f907(0x1ca)]=_0x517b14(_0x517721);}return _0x1330bb;}return okdbFunctionsContext={'createExecutionContext':_0x44c7fc,'createScriptLogger':_0x5d0a7a},okdbFunctionsContext;}var hasRequiredOkdbFunctionsSandboxWorker;function requireOkdbFunctionsSandboxWorker(){const _0xc85986=_0x4794cd;if(hasRequiredOkdbFunctionsSandboxWorker)return okdbFunctionsSandboxWorker$1;hasRequiredOkdbFunctionsSandboxWorker=0x1;const {parentPort:_0x287a66,workerData:_0x2fb42a}=require$$0$3;requireOkdbFatalReport()[_0xc85986(0x308)]('sandbox');const _0x2fb99e=require$$2,{compileFunctionExpression:_0x3c3623}=requireOkdbFunctionsSandbox(),{serializeError:_0x5638ae}=requireOkdbFunctionsIpc(),{createExecutionContext:_0x217833}=requireOkdbFunctionsContext(),_0x331cf3=require$$6;let _0x33fe2f=null,_0x58c69b=![];const _0x36bfca=new Map(),_0x25ebdb=new Map();function _0x20ed7d(_0x2dc492){try{_0x287a66['postMessage'](_0x2dc492);}catch{}}function _0x2222c9(_0x1a4e4f){const _0x2ff72d=_0xc85986,_0xa7f84e=(_0x1a4e4f[_0x2ff72d(0x2e6)]||_0x2ff72d(0x2a4))+':'+_0x1a4e4f['functionName']+':'+_0x1a4e4f['version']+':'+_0x1a4e4f[_0x2ff72d(0x227)];let _0x460ea9=_0x36bfca[_0x2ff72d(0x237)](_0xa7f84e);return!_0x460ea9&&(_0x460ea9=_0x3c3623(_0x1a4e4f[_0x2ff72d(0x24b)],{'allowFetch':_0x1a4e4f[_0x2ff72d(0x238)]?.['allowFetch']!==![],'allowedFetchDomains':_0x1a4e4f[_0x2ff72d(0x238)]?.[_0x2ff72d(0x289)],'filename':_0x1a4e4f['functionName']+_0x2ff72d(0x2c4)}),_0x36bfca[_0x2ff72d(0x2ef)](_0xa7f84e,_0x460ea9)),_0x460ea9;}async function _0x366dde(_0x92b4a8){const _0x888889=_0xc85986,_0x176959=Date[_0x888889(0x1b8)](),_0x4e0c3a=new AbortController();_0x25ebdb[_0x888889(0x2ef)](_0x92b4a8[_0x888889(0x2b7)],_0x4e0c3a);try{const _0x4270b7=_0x2222c9(_0x92b4a8);if(_0x92b4a8[_0x888889(0x2e6)])await _0x33fe2f[_0x888889(0x304)](_0x92b4a8[_0x888889(0x2e6)]);const _0x2e4736=_0x92b4a8[_0x888889(0x20d)]?[]:null,_0xc5513c=_0x217833(_0x33fe2f,_0x92b4a8,_0x20ed7d,_0x2e4736,_0x4e0c3a[_0x888889(0x19d)]),_0x169433=await _0x4270b7(_0xc5513c),_0x3df26a={'type':_0x888889(0x287),'requestId':_0x92b4a8[_0x888889(0x2b7)],'runId':_0x92b4a8[_0x888889(0x1b0)],'result':_0x169433,'meta':{'runnerId':'sandbox-'+process['pid'],'startedAt':_0x176959,'finishedAt':Date[_0x888889(0x1b8)](),'durationMs':Date['now']()-_0x176959}};if(_0x2e4736)_0x3df26a[_0x888889(0x249)]=_0x2e4736;_0x20ed7d(_0x3df26a);}catch(_0x35d622){_0x20ed7d({'type':'error','requestId':_0x92b4a8[_0x888889(0x2b7)],'runId':_0x92b4a8[_0x888889(0x1b0)],'error':_0x5638ae(_0x35d622),'meta':{'runnerId':'sandbox-'+process['pid'],'startedAt':_0x176959,'finishedAt':Date['now'](),'durationMs':Date[_0x888889(0x1b8)]()-_0x176959}});}finally{_0x25ebdb[_0x888889(0x18e)](_0x92b4a8['requestId']);}}async function _0x59981c(){const _0x2e6ef4=_0xc85986;if(_0x58c69b)return;_0x58c69b=!![];try{await _0x33fe2f?.[_0x2e6ef4(0x2d6)]?.();}catch{}process[_0x2e6ef4(0x1ff)](0x0);}async function _0x462d65(){const _0x536d8e=_0xc85986,{rootPath:_0x9d84f2}=_0x2fb42a??{};if(!_0x9d84f2)throw new Error(_0x536d8e(0x2eb));_0x33fe2f=new _0x331cf3(_0x9d84f2,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]},'processes':![]}),await _0x33fe2f[_0x536d8e(0x2dc)]();const _0x3bf036=setInterval(()=>{const _0x3bc9e5=_0x536d8e;if(_0x58c69b)return;for(const [,_0x4496b7]of _0x33fe2f['_envs']){try{_0x4496b7[_0x3bc9e5(0x1df)]?.();}catch{}}},0xc8);if(typeof _0x3bf036[_0x536d8e(0x192)]===_0x536d8e(0x1e6))_0x3bf036[_0x536d8e(0x192)]();_0x287a66['on'](_0x536d8e(0x1e4),_0x415c1e=>{const _0x1a0a56=_0x536d8e;if(!_0x415c1e||typeof _0x415c1e!==_0x1a0a56(0x195))return;if(_0x415c1e['type']==='stop')return void _0x59981c();if(_0x415c1e[_0x1a0a56(0x302)]===_0x1a0a56(0x300)){_0x25ebdb['get'](_0x415c1e[_0x1a0a56(0x2b7)])?.[_0x1a0a56(0x2ec)](new Error(_0x1a0a56(0x223)));return;}_0x415c1e[_0x1a0a56(0x302)]===_0x1a0a56(0x18f)&&void _0x366dde(_0x415c1e[_0x1a0a56(0x243)]);});const _0x52cf19=Math[_0x536d8e(0x244)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x10bdc3=setInterval(()=>{const _0x4b27bd=_0x536d8e;try{_0x20ed7d({'type':'stats','heapUsed':_0x2fb99e[_0x4b27bd(0x2bd)]()['used_heap_size']});}catch{}},_0x52cf19);if(typeof _0x10bdc3['unref']===_0x536d8e(0x1e6))_0x10bdc3[_0x536d8e(0x192)]();_0x20ed7d({'type':_0x536d8e(0x23c)});}return _0x462d65()['catch'](_0x2252c6=>{const _0x1a3802=_0xc85986;_0x20ed7d({'type':_0x1a3802(0x30d),'error':_0x5638ae(_0x2252c6)}),process[_0x1a3802(0x1ff)](0x1);}),okdbFunctionsSandboxWorker$1;}var okdbFunctionsSandboxWorkerExports=requireOkdbFunctionsSandboxWorker(),okdbFunctionsSandboxWorker=getDefaultExportFromCjs(okdbFunctionsSandboxWorkerExports);function _0x4194(){const _0x1103d3=['bus:poke','slice','ttl','createEnvironment','byIndex','index:reset','compileTimeoutMs','name','freeze','Schema\x20validation\x20failed\x20for\x20','getClock','close','mode','\x22\x20is\x20not\x20in\x20the\x20allowedFetchDomains\x20list','sdk','percentile','mkdirSync','open','sort','OKDBTypeNotRegisteredError','action','enqueue','bucket','OKDBForeignKeyError','system:type_drop','setTtl','okdb-function-sandbox','envName','node:perf_hooks','warn','\x27\x20already\x20registered','addBucket','sandbox\x20worker:\x20rootPath\x20missing\x20from\x20workerData','abort','queue','txn','set',':\x20expected\x20','Unique\x20constraint\x20violated\x20on\x20','txn:start','actions','offWindow','fts:registered','report','reject','claimId','getEntry','fetch\x20is\x20not\x20allowed\x20in\x20this\x20function\x20sandbox\x20(no\x20allowedFetchDomains\x20configured)','files','getCount','OKDBInvalidIndexKeyError','item:remove','license:added','cancel','label','type','sourceType','openEnv','push','SCHEMA_VALIDATION_FAILED','setDefaultTTL','enableFatalReport','has','captureStackTrace','Cannot\x20set\x20enforce\x20schema\x20on\x20','txn:end','fatal','delete','run','Unsupported\x20transaction\x20action:\x20','halted','unref','system:bus_state_change','OKDBAlreadyExistsError','object','\x20references\x20','SCHEMA_COLLECTION_INVALID','ms\x20max=','kind','list','TYPE_NOT_REGISTERED','OKDBNotFoundError','signal','_closed','TXN_INVALID_OPS','fetch','ensureType','Invalid\x20primary\x20key\x20type:\x20','processor','error','uuid','trigger','targetEnv','toFixed','loop-lag\x20','dropIndex','88806UPVMcx','maxMs','getTTL','references','1500220mZKMJB','runId','VERSION_MISMATCH','license:removed','registerType','setTTL','bus:proc','listTTL','geoQuery','now','Version\x20mismatch\x20for\x20','creating','_started','stopping','registerFts','disable','true','indexReady','bus:type_drop','TXN_END','filename','write','system:stopped','debug','getJob','system:ready','\x27\x20on\x20type\x20\x27','okdb','removeEnvironment','maxExtra','hasIndex','sourceKey','functionName','item:create','targetKey','_undoHooks','_assertOpen',':\x20key\x20[','reportOnFatalError','excludeEnv','timeoutMs','getIndex','index:drop','_doHooks','resetting','Index\x20\x22','transaction\x20commit\x20failed','getRange','_drainHandler','priority','join','events','getIndexStatus','message','getChanges','function','rollback','FUNCTION_SCRIPT_INVALID_SHAPE','tries','NOT_FOUND','Unknown\x20OKDB\x20transaction\x20error','size','log','reportOnSignal','engineKey','enable','useReadTransaction','constructor','OKDBIndexNotRegisteredError','actionCount','details','job_progress','TXN_ERROR','system:poke','keys','231261FWYiuS','ALREADY_EXISTS','args','_startAdmission','FOREIGN_KEY_DELETE_RESTRICTED','exit','77bblrLH','allowFetch','options','Index\x20\x27','unsafe','map','sweepExpiredTTL','TXN_START','ttl:expired','exports','getMany','INVALID_INDEX_KEY','global','dryRun','done','removeJob','hostname','stack','registerIndex','cron','dropFts','Script','txn:rollback','bind','entries','ttlStats','_closeReadTransaction','info','UNIQUE_CONSTRAINT','upload','update','item:update','length','setLogger','value','cancelled\x20by\x20caller','getByPath','string','stream','hash','any','stringify','Function\x20script\x20failed\x20to\x20initialize','OKDBIndexHasConsumersError','FUNCTION_SCRIPT_COMPILE_FAILED','envPath','Type\x20\x27','dropping','cursorKey','Function\x20script\x20failed\x20to\x20compile','index:ready','type:registered','txn\x20ops\x20must\x20be\x20an\x20array','txn\x20op\x20must\x20be\x20an\x20object\x20or\x20tuple','TXN_ROLLBACK','get','runtime','OKDBSchemaCollectionError','onDo','materializer','ready','starting','loop-lag','patch','stop','\x27\x20doesn\x27t\x20exist','created','job','max','note','_timer','errors','\x27:\x20','dryRunActions','directory','script','setSchema','6AsnjIp','_report','fts:drop','TXN_INVALID_OP','TXN_INVALID_ACTION','license:activated','put','job_heartbeat','crypto','env','SIGSEGV','key','processorContext','ref:violation','index:progress','FETCH_NOT_ALLOWED','mean','query','prototype','_admissionStarted','reduce','add','ms\x20p99=','enabled','start','OKDBError','OKDBInvalidPrimaryKeyError','getValues','win32','bus:env_release','_admissionTimer','updateJob','commit','Unknown\x20custom\x20function\x20error','_windowCbs','292445MxpEwI','getBucket','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','started','Function\x20script\x20must\x20evaluate\x20to\x20a\x20callable\x20function','system:clock_change','call','env:removed','onUndo',']\x20already\x20maps\x20to\x20\x27','\x22\x20on\x20\x22','Transaction\x20already\x20closed','targetType','system:drain','resetFts','runInContext','unique:violation','system:proc','stopped','2171970NZYVuV','ftsQuery','OKDBTypeAlreadyRegisteredError','_log','result','\x27,\x20cannot\x20map\x20to\x20\x27','allowedFetchDomains','nativeCode','transaction','\x20│\x20','dropType','jobContext','Invalid\x20index\x20key\x20type\x20for\x20\x27','(worst\x20','__esModule','\x20actions=','default','INDEX_ALREADY_REGISTERED','emit','code','fts:reset','fieldPath','url','okdb-function.js','count','9tWuzkD','globalThis','bus:drain','resetIndex','fetch\x20blocked:\x20hostname\x20\x22','ttl:clear','reset','\x22\x20is\x20used\x20by:\x20','~system','4511090JAKVgm','OKDBForeignKeyDeleteError','586552ilEPrd','isArray','applyOps','schema:drop','fetch\x20blocked:\x20invalid\x20URL','Unknown\x20transaction\x20action:\x20',',\x20got\x20','_buckets','hasType','getByPrefix','onWindow','ttl:set','TYPE_ALREADY_REGISTERED','Cannot\x20delete\x20','hasOwnProperty','pid','requestId','getKeys','\x20which\x20does\x20not\x20exist','./okdb','INVALID_VALUE','txn-commit','getHeapStatistics','range','remove','txnId','ms/','cause','worker_threads','.okdb-function.js','sync:apply','create','readTransaction','getDefaultTTL','clearTTL','clearDefaultTTL'];_0x4194=function(){return _0x1103d3;};return _0x4194();}module[_0x4794cd(0x209)]=okdbFunctionsSandboxWorker;
1
+ 'use strict';const _0x25c30f=_0x3a2b;(function(_0x47cf8b,_0x26a35b){const _0x4676cc=_0x3a2b,_0x2a2bda=_0x47cf8b();while(!![]){try{const _0x8e13e0=-parseInt(_0x4676cc(0xcc))/0x1*(parseInt(_0x4676cc(0x95))/0x2)+-parseInt(_0x4676cc(0x1a1))/0x3+parseInt(_0x4676cc(0x80))/0x4+parseInt(_0x4676cc(0xbf))/0x5+parseInt(_0x4676cc(0x16d))/0x6+parseInt(_0x4676cc(0x156))/0x7+-parseInt(_0x4676cc(0x1a2))/0x8;if(_0x8e13e0===_0x26a35b)break;else _0x2a2bda['push'](_0x2a2bda['shift']());}catch(_0x4b09ce){_0x2a2bda['push'](_0x2a2bda['shift']());}}}(_0x3762,0x9652f));function _0x3762(){const _0x20e002=['start','getEntry','\x22\x20on\x20\x22','payload','ftsQuery','entries','create','Index\x20\x22','freeze','stringify','result','set','OKDBInvalidValueError','\x20which\x20does\x20not\x20exist','code','openEnv','byIndex','txn\x20ops\x20must\x20be\x20an\x20array','sandbox','loop-lag\x20','onDo','job_heartbeat','functionName','getCount','OKDBUniqueConstraintError','crypto','loop-lag','.okdb-function.js','item:update','filename','job','runId','stats','worker_threads','envName','exit','dropIndex','item:create','getValues','global','rollback','bus:poke','TXN_INVALID_OPS','reportOnSignal','trigger','object','ttl:expired','_closeReadTransaction','_doHooks','isArray','report','\x27,\x20cannot\x20map\x20to\x20\x27','_assertOpen','\x22\x20is\x20not\x20in\x20the\x20allowedFetchDomains\x20list','emit','references','max',':\x20key\x20[','(worst\x20','events','dropping','unsafe','details','getTTL','getByPath','setSchema','warn','Foreign\x20key\x20violation:\x20','reset','actionCount','sourceEnv','2370389XeKWKW','materializer','processor','created','registerFts','win32','url','ref:violation_resolved','unique:violation_resolved','transaction\x20commit\x20failed','license:removed','createContext','bus:type_drop','system:ready','fts:drop','targetEnv','fetch','enable','tags','now','getMany','_admissionTimer','hash','4695306fQDFRJ','txn\x20op\x20must\x20be\x20an\x20object\x20or\x20tuple','count','globalThis','_envs','okdb-function.js',']\x20already\x20maps\x20to\x20\x27','FOREIGN_KEY_DELETE_RESTRICTED','hostname','postMessage','env','getHeapStatistics','applyOps','SCHEMA_VALIDATION_FAILED','ttlStats','_timer','TXN_ERROR','clear','dropType','upload','note','requestedAt','add','run','getByPrefix','TYPE_ALREADY_REGISTERED','actions','txn-commit','getIndex','\x20references\x20','Function\x20script\x20failed\x20to\x20compile','~system','FOREIGN_KEY_VIOLATION','registerIndex','index:drop','commit','TXN_END','fatal','ensureType','txnId','schema:set','_closed','node:perf_hooks','TXN_INVALID_ACTION','indexReady','ms\x20mean=','node:vm','OKDBVersionMismatchError','targetKey','readTransaction','bus:env_release','dropSchema','2731821qrKDIJ','2780808YjyZUJ','function','engineKey','stopped','OKDBIndexAlreadyRegisteredError','TXN_CLOSED','getJob','getKeys','cursorKey','platform','sweepExpiredTTL','SIGSEGV','patch','listBuckets','allowFetch','get','getChanges','runtime','_undoHooks','ms/','debug','stack','_admissionStarted','priority','files','OKDBTypeAlreadyRegisteredError','system:type_drop','string','system:stopped','sandbox\x20worker:\x20rootPath\x20missing\x20from\x20workerData','update','OKDBForeignKeyError','reduce','default','ALREADY_EXISTS','system:env_release','mode','tries','ref:violation','mean','value','mkdirSync','OKDBNotFoundError','txn','index:reset','\x27:\x20','Index\x20\x27','hasOwnProperty','bind','Type\x20\x27','signal','length','Function\x20script\x20must\x20evaluate\x20to\x20a\x20callable\x20function','updateJob','transaction','cause','ttl','OKDBSchemaCollectionError','type','OKDBTypeNotRegisteredError','join','reject','keys','index:ready','requestId','args','used_heap_size','registerType','close','index:progress','Version\x20mismatch\x20for\x20','has','system:bus_state_change','OKDBIndexNotRegisteredError','materializerContext','2597064mEnktK','getDefaultTTL','_started','map','_drainHandler','push','version','name','ms\x20max=','_log','dryRunActions','SCHEMA_COLLECTION_INVALID','ready','targetType','percentile','maxMs','\x20actions=','type:registered','Unknown\x20OKDB\x20transaction\x20error','sandbox-','OKDBIndexHasConsumersError','2184436UoxdHl','getBucket','getRange','sourceKey','Schema\x20validation\x20failed\x20for\x20','geoQuery','hasType','processorContext','Invalid\x20index\x20key\x20type\x20for\x20\x27','timeoutMs','okdb','_buckets','error','runInContext','txn:end','fts:reset','Transaction\x20already\x20closed','okdb-function-sandbox','cancelled\x20by\x20caller','pid','sdk','Unsupported\x20transaction\x20action:\x20','system:poke','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','list','put','_startAdmission','jobContext','_windowCbs','halted','allowedFetchDomains','FUNCTION_SCRIPT_INVALID_SHAPE','any','remove','clearTTL','\x27\x20doesn\x27t\x20exist','compileTimeoutMs','FETCH_NOT_ALLOWED','delete','Invalid\x20primary\x20key\x20type:\x20','info','_writer','5978545MJvnqC','OKDBSchemaValidationError','range','open','clearTtl','label','write','INDEX_HAS_CONSUMERS','ttl:set','\x27\x20already\x20registered','getIndexStatus','createWriteFacade','errors','1cSfKcV','addBucket','stop','key','fts:registered','\x20already\x20exists','txn:rollback','enabled','options','TXN_INVALID_OP','path','bus:proc',':\x20expected\x20','type:drop','sourceType','queue','job_progress','txn:start','__esModule','FUNCTION_SCRIPT_COMPILE_FAILED','Script','message','nativeCode','resetFts','\x27\x20on\x20type\x20\x27','unref','maxExtra','setTtl','script','creating','fetch\x20blocked:\x20hostname\x20\x22','resetIndex','cancel','stream','catch','offWindow','view:progress','setTTL','useReadTransaction','done','resetting','size','excludeEnv','call','getClock','clearDefaultTTL','Unique\x20constraint\x20violated\x20on\x20','\x27\x20is\x20already\x20registered','dropFts','removeJob','query','TXN_START','sync:apply','Unknown\x20transaction\x20action:\x20','toFixed','INVALID_VALUE','enqueue','listTTL','OKDBError','slice','action','TXN_ROLLBACK','setDefaultTTL','log','UNIQUE_CONSTRAINT','\x22\x20is\x20used\x20by:\x20','INVALID_PRIMARY_KEY'];_0x3762=function(){return _0x20e002;};return _0x3762();}var require$$0$3=require(_0x25c30f(0x130)),require$$2=require('v8'),require$$0=require(_0x25c30f(0x19b)),require$$0$2=require('uuid'),require$$0$1=require(_0x25c30f(0x197)),require$$6=require('./okdb');function getDefaultExportFromCjs(_0x22e8be){const _0x4f6263=_0x25c30f;return _0x22e8be&&_0x22e8be[_0x4f6263(0xde)]&&Object['prototype'][_0x4f6263(0x1d1)][_0x4f6263(0xf7)](_0x22e8be,_0x4f6263(0x1c3))?_0x22e8be['default']:_0x22e8be;}var okdbFunctionsSandboxWorker$1={},okdbFatalReport,hasRequiredOkdbFatalReport;function requireOkdbFatalReport(){if(hasRequiredOkdbFatalReport)return okdbFatalReport;hasRequiredOkdbFatalReport=0x1;function _0x2e11fe(_0xc5f99e){const _0x15211e=_0x3a2b;if(process.env.OKDB_FATAL_REPORT!=='1')return;try{if(!process[_0x15211e(0x141)])return;process[_0x15211e(0x141)]['reportOnFatalError']=!![];try{if(_0x15211e(0xf6)in process[_0x15211e(0x141)])process[_0x15211e(0x141)][_0x15211e(0xf6)]=process.env.OKDB_FATAL_REPORT_ENV!=='1';}catch{}if(process[_0x15211e(0x1ab)]!==_0x15211e(0x15b))try{process['report'][_0x15211e(0x13a)]=!![];if(typeof process['report'][_0x15211e(0x1d4)]===_0x15211e(0x1bd))process[_0x15211e(0x141)][_0x15211e(0x1d4)]=_0x15211e(0x1ad);}catch{}if(process.env.OKDB_REPORT_DIR)try{require('fs')[_0x15211e(0x1cb)](process.env.OKDB_REPORT_DIR,{'recursive':!![]}),process[_0x15211e(0x141)]['directory']=process.env.OKDB_REPORT_DIR;}catch{}try{process['report'][_0x15211e(0x12c)]='';}catch{}if(_0xc5f99e)process.env.OKDB_REPORT_TAG=String(_0xc5f99e);}catch{}}return okdbFatalReport={'enableFatalReport':_0x2e11fe},okdbFatalReport;}var okdbFunctionsSandbox,hasRequiredOkdbFunctionsSandbox;function requireOkdbFunctionsSandbox(){if(hasRequiredOkdbFunctionsSandbox)return okdbFunctionsSandbox;hasRequiredOkdbFunctionsSandbox=0x1;const _0x1e98b2=require$$0;function _0x541965(_0x32e4ff){const _0x3db404=_0x3a2b,_0x38895f=_0x32e4ff==='*',_0x1b1010=_0x38895f?null:new Set(Array[_0x3db404(0x140)](_0x32e4ff)?_0x32e4ff:[]);return function _0x4c0e6e(_0x1fa2c9,_0x12ab23){const _0x44ea7c=_0x3db404;if(!_0x38895f){let _0x3e175c;try{const _0x2b73cc=new URL(typeof _0x1fa2c9==='string'?_0x1fa2c9:_0x1fa2c9?.[_0x44ea7c(0x15c)]??String(_0x1fa2c9));_0x3e175c=_0x2b73cc[_0x44ea7c(0x175)];}catch{const _0x4f65fa=new Error('fetch\x20blocked:\x20invalid\x20URL');return _0x4f65fa[_0x44ea7c(0x11d)]=_0x44ea7c(0xba),Promise['reject'](_0x4f65fa);}if(!_0x1b1010['has'](_0x3e175c)){const _0x575448=new Error(_0x1b1010[_0x44ea7c(0xf5)]===0x0?'fetch\x20is\x20not\x20allowed\x20in\x20this\x20function\x20sandbox\x20(no\x20allowedFetchDomains\x20configured)':_0x44ea7c(0xea)+_0x3e175c+_0x44ea7c(0x144));return _0x575448['code']='FETCH_NOT_ALLOWED',Promise[_0x44ea7c(0x1df)](_0x575448);}}return fetch(_0x1fa2c9,_0x12ab23);};}function _0x173ef2(_0x71fc88={}){const _0x342671=_0x3a2b,_0x730027=_0x71fc88[_0x342671(0x1b0)]!==![],_0x39ea8d=_0x71fc88[_0x342671(0xb3)]??[],_0x11efe6={'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[_0x342671(0x128)]};return _0x730027&&typeof fetch===_0x342671(0x1a3)&&(_0x11efe6[_0x342671(0x166)]=_0x541965(_0x39ea8d)),_0x11efe6[_0x342671(0x170)]=_0x11efe6,_0x11efe6;}function _0x512cb3(_0x40a7d5,_0x4e7030={}){const _0x59ad57=_0x3a2b,_0x2c8396=_0x173ef2(_0x4e7030),_0x5312e0=_0x1e98b2[_0x59ad57(0x161)](_0x2c8396,{'name':_0x59ad57(0xa6),'codeGeneration':{'strings':![],'wasm':![]}});let _0x403696;try{_0x403696=new _0x1e98b2[(_0x59ad57(0xe0))]('('+_0x40a7d5+')',{'filename':_0x4e7030[_0x59ad57(0x12c)]??_0x59ad57(0x172)});}catch(_0x39c275){const _0x452c95=new Error(_0x39c275?.[_0x59ad57(0xe1)]||_0x59ad57(0x18b));_0x452c95[_0x59ad57(0x11d)]=_0x59ad57(0xdf),_0x452c95[_0x59ad57(0x1d9)]=_0x39c275;throw _0x452c95;}let _0x499367;try{_0x499367=_0x403696[_0x59ad57(0xa2)](_0x5312e0,{'timeout':_0x4e7030[_0x59ad57(0xb9)]??0x64});}catch(_0x62a8c3){const _0x1a14a7=new Error(_0x62a8c3?.[_0x59ad57(0xe1)]||'Function\x20script\x20failed\x20to\x20initialize');_0x1a14a7['code']='FUNCTION_SCRIPT_COMPILE_FAILED',_0x1a14a7['cause']=_0x62a8c3;throw _0x1a14a7;}if(typeof _0x499367!==_0x59ad57(0x1a3)){const _0x470774=new Error(_0x59ad57(0x1d6));_0x470774[_0x59ad57(0x11d)]=_0x59ad57(0xb4);throw _0x470774;}return _0x499367;}return okdbFunctionsSandbox={'createSandboxGlobals':_0x173ef2,'compileFunctionExpression':_0x512cb3,'_buildRestrictedFetch':_0x541965},okdbFunctionsSandbox;}var okdbFunctionsIpc,hasRequiredOkdbFunctionsIpc;function requireOkdbFunctionsIpc(){if(hasRequiredOkdbFunctionsIpc)return okdbFunctionsIpc;hasRequiredOkdbFunctionsIpc=0x1;function _0x5b4d92(_0x1dc5b5){const _0xf77859=_0x3a2b;if(!_0x1dc5b5)return null;return{'message':_0x1dc5b5[_0xf77859(0xe1)]||String(_0x1dc5b5),'stack':_0x1dc5b5[_0xf77859(0x1b7)]||null,'code':_0x1dc5b5[_0xf77859(0x11d)]||null,'details':_0x1dc5b5[_0xf77859(0x14d)]||null};}function _0x70c658(_0x3b4c55){const _0x2ce030=_0x3a2b;if(!_0x3b4c55)return new Error('Unknown\x20custom\x20function\x20error');const _0x51b3b3=new Error(_0x3b4c55[_0x2ce030(0xe1)]||String(_0x3b4c55));if(_0x3b4c55[_0x2ce030(0x1b7)])_0x51b3b3[_0x2ce030(0x1b7)]=_0x3b4c55['stack'];if(_0x3b4c55[_0x2ce030(0x11d)])_0x51b3b3[_0x2ce030(0x11d)]=_0x3b4c55['code'];if(_0x3b4c55[_0x2ce030(0x14d)])_0x51b3b3[_0x2ce030(0x14d)]=_0x3b4c55[_0x2ce030(0x14d)];return _0x51b3b3;}return okdbFunctionsIpc={'serializeError':_0x5b4d92,'deserializeError':_0x70c658},okdbFunctionsIpc;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5b3825=_0x25c30f;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x276ba4={'PUT':_0x5b3825(0xae),'REMOVE':_0x5b3825(0xb6),'INDEX_DROP':_0x5b3825(0x133),'INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x5b3825(0xeb),'TYPE_REGISTER':'registerType','TYPE_DROP':'dropType','FTS_REGISTER':_0x5b3825(0x15a),'FTS_DROP':_0x5b3825(0xfc),'FTS_RESET':_0x5b3825(0xe3),'SCHEMA_SET':_0x5b3825(0x150),'SCHEMA_DROP':_0x5b3825(0x1a0),'TTL_SET':_0x5b3825(0xe7),'TTL_CLEAR':_0x5b3825(0xc3)},_0x387f09={'SYSTEM_READY':_0x5b3825(0x163),'SYSTEM_STOPPED':_0x5b3825(0x1be),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x5b3825(0xab),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x5b3825(0x1bc),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x5b3825(0x7d),'ITEM_CREATE':_0x5b3825(0x134),'ITEM_UPDATE':_0x5b3825(0x12b),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x5b3825(0x1ce),'INDEX_READY':_0x5b3825(0x1e1),'INDEX_PROGRESS':_0x5b3825(0x7a),'VIEW_PROGRESS':_0x5b3825(0xf0),'INDEX_DROP':_0x5b3825(0x18f),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x5b3825(0xd0),'FTS_DROP':_0x5b3825(0x164),'FTS_RESET':_0x5b3825(0xa4),'SCHEMA_SET':_0x5b3825(0x195),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x5b3825(0x15e),'REF_VIOLATION':_0x5b3825(0x1c8),'REF_VIOLATION_RESOLVED':_0x5b3825(0x15d),'SYNC_APPLY':_0x5b3825(0x100),'TXN_START':_0x5b3825(0xdd),'TXN_END':_0x5b3825(0xa3),'TXN_ROLLBACK':_0x5b3825(0xd2),'TYPE_REGISTERED':_0x5b3825(0x91),'TYPE_DROP':_0x5b3825(0xd9),'ENV_OPENED':'env:opened','ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x5b3825(0x1c5),'TTL_EXPIRED':_0x5b3825(0x13d),'TTL_SET':_0x5b3825(0xc7),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x5b3825(0x160)},_0x5b3c85={'CREATING':_0x5b3825(0xe9),'RESETTING':_0x5b3825(0xf4),'READY':_0x5b3825(0x8c),'DROPPING':_0x5b3825(0x14b),'WAITING':'waiting'},_0x3e48bf={'CREATED':_0x5b3825(0x159),'STARTING':'starting','STARTED':'started','STOPPING':'stopping','STOPPED':_0x5b3825(0x1a5)},_0x3b7c0f={'CREATING':_0x5b3825(0xe9),'READY':_0x5b3825(0x8c),'HALTED':_0x5b3825(0xb2),'STOPPED':'stopped','RESETTING':_0x5b3825(0xf4)},_0x2e2abd=Object[_0x5b3825(0x117)]({'POKE':_0x5b3825(0x138),'DRAIN':'bus:drain','TYPE_DROP':_0x5b3825(0x162),'PROC':_0x5b3825(0xd7),'ENV_RELEASE':_0x5b3825(0x19f)});return okdbEnums={'BUS_EVENTS':_0x2e2abd,'CHANGE_ACTIONS':_0x276ba4,'EVENTS':_0x387f09,'INDEX_STATE':_0x5b3c85,'OKDB_STATE':_0x3e48bf,'VIEW_STATE':_0x3b7c0f},okdbEnums;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x596ce0 extends Error{constructor(_0xea7d63,_0x4ccff7,_0x3d66f0={}){const _0x4d9115=_0x3a2b;super(_0xea7d63),this['name']=_0x4d9115(0x106),this[_0x4d9115(0x11d)]=_0x4ccff7,this[_0x4d9115(0x14d)]=_0x3d66f0,_0x3d66f0[_0x4d9115(0x1d9)]&&(this[_0x4d9115(0x1d9)]=_0x3d66f0[_0x4d9115(0x1d9)]),Error['captureStackTrace'](this,this['constructor']);}}class _0x1b07f1 extends _0x596ce0{constructor(_0xb61495,_0xfaec1d,_0x2265a7,_0x5cc0f5){const _0x24cdcb=_0x3a2b;super(_0x24cdcb(0x7b)+_0xb61495+'@'+_0xfaec1d+_0x24cdcb(0xd8)+_0x2265a7+',\x20got\x20'+_0x5cc0f5,'VERSION_MISMATCH',{'type':_0xb61495,'key':_0xfaec1d,'expectedVersion':_0x2265a7,'actualVersion':_0x5cc0f5}),this['name']=_0x24cdcb(0x19c);}}class _0x5239b7 extends _0x596ce0{constructor(_0x7e1042,_0x4d3585){const _0xe5422c=_0x3a2b;super(_0x7e1042+'@'+_0x4d3585+'\x20does\x20not\x20exist','NOT_FOUND',{'type':_0x7e1042,'key':_0x4d3585}),this[_0xe5422c(0x87)]=_0xe5422c(0x1cc);}}class _0xf73854 extends _0x596ce0{constructor(_0x19e5d6,_0x516194){const _0x3e4451=_0x3a2b;super(_0x19e5d6+'@'+_0x516194+_0x3e4451(0xd1),_0x3e4451(0x1c4),{'type':_0x19e5d6,'key':_0x516194}),this[_0x3e4451(0x87)]='OKDBAlreadyExistsError';}}class _0x487fda extends _0x596ce0{constructor(_0x50a4f2,_0x3337a1){const _0x3d48b0=_0x3a2b,_0x34c3a0=typeof _0x3337a1;super(_0x3d48b0(0x9d)+_0x50a4f2+_0x3d48b0(0x1cf)+_0x34c3a0+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x3337a1,'INVALID_INDEX_KEY',{'index':_0x50a4f2,'key':_0x3337a1,'keyType':_0x34c3a0}),this[_0x3d48b0(0x87)]='OKDBInvalidIndexKeyError';}}class _0x8eb8e4 extends _0x596ce0{constructor(_0x4a76e5){const _0x31f904=_0x3a2b,_0x4cc890=typeof _0x4a76e5;super(_0x31f904(0xbc)+_0x4cc890+_0x31f904(0xac)+_0x4a76e5,_0x31f904(0x10e),{'key':_0x4a76e5,'keyType':_0x4cc890}),this['name']='OKDBInvalidPrimaryKeyError';}}class _0x11d9e4 extends _0x596ce0{constructor(_0x109469){const _0x47d0d7=_0x3a2b;super('Type\x20\x27'+_0x109469+_0x47d0d7(0xb8),'TYPE_NOT_REGISTERED',{'type':_0x109469}),this[_0x47d0d7(0x87)]=_0x47d0d7(0x1dd);}}class _0x12f5f0 extends _0x596ce0{constructor(_0x5489d7){const _0x5da9c8=_0x3a2b;super(_0x5da9c8(0x1d3)+_0x5489d7+_0x5da9c8(0xc8),_0x5da9c8(0x186),{'type':_0x5489d7}),this[_0x5da9c8(0x87)]=_0x5da9c8(0x1bb);}}class _0x124eb5 extends _0x596ce0{constructor(_0x443b55,_0x3fd2dd){const _0x1f8294=_0x3a2b;super('Index\x20\x27'+_0x3fd2dd+_0x1f8294(0xe4)+_0x443b55+'\x27\x20doesn\x27t\x20exist','INDEX_NOT_REGISTERED',{'type':_0x443b55,'index':_0x3fd2dd}),this[_0x1f8294(0x87)]=_0x1f8294(0x7e);}}class _0x5da625 extends _0x596ce0{constructor(_0x59e74e,_0x50c901){const _0x34870f=_0x3a2b;super(_0x34870f(0x1d0)+_0x50c901+_0x34870f(0xe4)+_0x59e74e+_0x34870f(0xfb),'INDEX_ALREADY_REGISTERED',{'type':_0x59e74e,'index':_0x50c901}),this['name']=_0x34870f(0x1a6);}}class _0x3c2826 extends _0x596ce0{constructor(_0x50cae5,_0x314290={}){const _0x5eee4b=_0x3a2b;super(_0x50cae5,_0x5eee4b(0x103),_0x314290),this[_0x5eee4b(0x87)]=_0x5eee4b(0x11b);}}class _0x53ffdf extends _0x596ce0{constructor(_0x1b4fc9,_0x485119,_0x4a8d47,_0x2a5e5e,_0x31c80a){const _0x2b13a5=_0x3a2b;super(_0x2b13a5(0xfa)+_0x1b4fc9+'@'+_0x485119+_0x2b13a5(0x148)+_0x4a8d47+_0x2b13a5(0x173)+_0x2a5e5e+_0x2b13a5(0x142)+_0x31c80a+'\x27',_0x2b13a5(0x10c),{'type':_0x1b4fc9,'index':_0x485119,'indexKey':_0x4a8d47,'existingKey':_0x2a5e5e,'conflictingKey':_0x31c80a}),this[_0x2b13a5(0x87)]=_0x2b13a5(0x127);}}class _0x73f19d extends _0x596ce0{constructor(_0x4a793b,_0x4f321a,_0x5ed6f1){const _0x49a4f8=_0x3a2b;super(_0x49a4f8(0x99)+_0x4a793b+'@'+_0x4f321a,_0x49a4f8(0x17a),{'type':_0x4a793b,'key':_0x4f321a,'errors':_0x5ed6f1}),this[_0x49a4f8(0x87)]=_0x49a4f8(0xc0),this['type']=_0x4a793b,this[_0x49a4f8(0xcf)]=_0x4f321a,this[_0x49a4f8(0xcb)]=_0x5ed6f1;}}class _0x13170a extends _0x596ce0{constructor(_0x43d0f3,_0x5e0a94){const _0x1d4a6e=_0x3a2b;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x43d0f3+':\x20'+_0x5e0a94[_0x1d4a6e(0x1d5)]+'\x20documents\x20fail\x20validation',_0x1d4a6e(0x8b),{'type':_0x43d0f3,'failures':_0x5e0a94}),this[_0x1d4a6e(0x87)]=_0x1d4a6e(0x1db),this[_0x1d4a6e(0x1dc)]=_0x43d0f3,this['failures']=_0x5e0a94;}}class _0x362fb9 extends _0x596ce0{constructor(_0x3b3242,_0x412c36,_0x24cd18,_0x5a77e2,_0x415bbc){const _0x24e3c8=_0x3a2b;super(_0x24e3c8(0x152)+_0x3b3242+'@'+_0x412c36+'.'+_0x24cd18+_0x24e3c8(0x18a)+_0x5a77e2+'@'+_0x415bbc+_0x24e3c8(0x11c),_0x24e3c8(0x18d),{'sourceType':_0x3b3242,'sourceKey':_0x412c36,'fieldPath':_0x24cd18,'targetType':_0x5a77e2,'targetKey':_0x415bbc}),this['name']=_0x24e3c8(0x1c1),this[_0x24e3c8(0xda)]=_0x3b3242,this[_0x24e3c8(0x98)]=_0x412c36,this['fieldPath']=_0x24cd18,this[_0x24e3c8(0x8d)]=_0x5a77e2,this[_0x24e3c8(0x19d)]=_0x415bbc;}}class _0xac1b98 extends _0x596ce0{constructor(_0x55f493,_0x1d01b8,_0x537532){const _0x59b99c=_0x3a2b;super('Cannot\x20delete\x20'+_0x55f493+'@'+_0x1d01b8+':\x20'+_0x537532[_0x59b99c(0x1d5)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x59b99c(0x174),{'targetType':_0x55f493,'targetKey':_0x1d01b8,'references':_0x537532}),this['name']='OKDBForeignKeyDeleteError',this[_0x59b99c(0x8d)]=_0x55f493,this['targetKey']=_0x1d01b8,this[_0x59b99c(0x146)]=_0x537532;}}class _0x4b0399 extends _0x596ce0{constructor(_0xb5e49e,_0x375652,_0x30fb99){const _0x2b14bf=_0x3a2b;super(_0x2b14bf(0x116)+_0x375652+_0x2b14bf(0x111)+_0xb5e49e+_0x2b14bf(0x10d)+_0x30fb99[_0x2b14bf(0x83)](_0xda8e64=>_0xda8e64['kind']+':'+_0xda8e64[_0x2b14bf(0x87)])[_0x2b14bf(0x1de)](',\x20'),_0x2b14bf(0xc6),{'type':_0xb5e49e,'index':_0x375652,'usedBy':_0x30fb99}),this[_0x2b14bf(0x87)]=_0x2b14bf(0x94);}}return okdbError={'OKDBError':_0x596ce0,'OKDBVersionMismatchError':_0x1b07f1,'OKDBNotFoundError':_0x5239b7,'OKDBAlreadyExistsError':_0xf73854,'OKDBInvalidIndexKeyError':_0x487fda,'OKDBInvalidPrimaryKeyError':_0x8eb8e4,'OKDBTypeNotRegisteredError':_0x11d9e4,'OKDBTypeAlreadyRegisteredError':_0x12f5f0,'OKDBIndexNotRegisteredError':_0x124eb5,'OKDBIndexAlreadyRegisteredError':_0x5da625,'OKDBInvalidValueError':_0x3c2826,'OKDBUniqueConstraintError':_0x53ffdf,'OKDBSchemaValidationError':_0x73f19d,'OKDBSchemaCollectionError':_0x13170a,'OKDBForeignKeyError':_0x362fb9,'OKDBForeignKeyDeleteError':_0xac1b98,'OKDBIndexHasConsumersError':_0x4b0399},okdbError;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x49357e=_0x25c30f;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1d7681,performance:_0x209338}=require$$0$1,_0x7c8fb6=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x4f570e=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4a8504=process.env.OKDB_LOOP_LAG_ALL==='1',_0x384c36=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x12786f{constructor(){const _0x3b558c=_0x3a2b;this[_0x3b558c(0xd3)]=_0x7c8fb6,this[_0x3b558c(0xa0)]=new Map(),this['_h']=null,this[_0x3b558c(0x17c)]=null,this[_0x3b558c(0x82)]=![],this[_0x3b558c(0x89)]=(_0x12a438,_0x45a621)=>process['stderr'][_0x3b558c(0xc5)](_0x12a438+(_0x45a621?'\x20'+JSON[_0x3b558c(0x118)](_0x45a621):'')+'\x0a');}[_0x49357e(0x169)](){const _0x1c0fcb=_0x49357e;return _0x209338[_0x1c0fcb(0x169)]();}['setLogger'](_0x2595cc){const _0x18ddc4=_0x49357e;if(typeof _0x2595cc===_0x18ddc4(0x1a3))this[_0x18ddc4(0x89)]=_0x2595cc;}[_0x49357e(0x181)](_0x3cf9cb,_0x12181a,_0x31aebb){const _0x360104=_0x49357e;if(!this[_0x360104(0xd3)])return;let _0x4bb9c3=this[_0x360104(0xa0)][_0x360104(0x1b1)](_0x3cf9cb);!_0x4bb9c3&&(_0x4bb9c3={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x360104(0xa0)]['set'](_0x3cf9cb,_0x4bb9c3)),_0x4bb9c3['ms']+=_0x12181a,_0x4bb9c3[_0x360104(0x16f)]+=0x1,_0x12181a>_0x4bb9c3[_0x360104(0x8f)]&&(_0x4bb9c3[_0x360104(0x8f)]=_0x12181a,_0x4bb9c3[_0x360104(0xe6)]=_0x31aebb||'');}[_0x49357e(0x10f)](_0x145ba4){const _0x429dd3=_0x49357e;if(!this[_0x429dd3(0xd3)]||this[_0x429dd3(0x82)])return;this['_started']=!![];if(_0x145ba4)this[_0x429dd3(0x89)]=_0x145ba4;this['_h']=_0x1d7681({'resolution':0xa}),this['_h'][_0x429dd3(0x167)](),this[_0x429dd3(0x17c)]=setInterval(()=>this['_report'](),_0x4f570e);if(this[_0x429dd3(0x17c)]['unref'])this[_0x429dd3(0x17c)][_0x429dd3(0xe5)]();}['onWindow'](_0x137487){const _0x5103ea=_0x49357e;if(!this[_0x5103ea(0xb1)])this[_0x5103ea(0xb1)]=new Set();this['_windowCbs'][_0x5103ea(0x183)](_0x137487);if(!this['_started'])this[_0x5103ea(0xaf)]();}[_0x49357e(0xef)](_0x8f11ae){const _0x52426c=_0x49357e;this[_0x52426c(0xb1)]?.[_0x52426c(0xbb)](_0x8f11ae);}['_startAdmission'](){const _0xac4802=_0x49357e;if(this[_0xac4802(0x1b8)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x1d7681({'resolution':0xa}),this['_h'][_0xac4802(0x167)]());const _0x5d29ae=_0x4f570e;this[_0xac4802(0x16b)]=setInterval(()=>{const _0x4ed6ba=_0xac4802,_0x37a588=this['_h'];if(!_0x37a588)return;const _0x595511=_0x37a588[_0x4ed6ba(0x8e)](0x63)/0xf4240,_0x4d8ff6=_0x37a588[_0x4ed6ba(0x147)]/0xf4240,_0x9bfb09=_0x37a588[_0x4ed6ba(0x1c9)]/0xf4240;_0x37a588['reset']();if(this['_windowCbs'])for(const _0x5a371b of this[_0x4ed6ba(0xb1)]){try{_0x5a371b({'p99Ms':_0x595511,'maxMs':_0x4d8ff6,'meanMs':_0x9bfb09,'reportMs':_0x5d29ae});}catch{}}},_0x5d29ae);if(this[_0xac4802(0x16b)][_0xac4802(0xe5)])this['_admissionTimer']['unref']();}['_report'](){const _0x22de71=_0x49357e,_0x5bac12=this['_h'],_0x1082b9=_0x5bac12[_0x22de71(0x147)]/0xf4240,_0x13bf2a=_0x5bac12[_0x22de71(0x8e)](0x63)/0xf4240,_0x3e988e=_0x5bac12[_0x22de71(0x1c9)]/0xf4240;_0x5bac12[_0x22de71(0x153)]();const _0x22c026=[...this[_0x22de71(0xa0)][_0x22de71(0x114)]()][_0x22de71(0x83)](([_0xae7804,_0x493624])=>({'label':_0xae7804,..._0x493624}))['sort']((_0x1f9237,_0xa43ceb)=>_0xa43ceb['ms']-_0x1f9237['ms'])[_0x22de71(0x107)](0x0,0x8);this[_0x22de71(0xa0)][_0x22de71(0x17e)]();const _0x381a2c=_0x22c026[_0x22de71(0x1c2)]((_0x5cac32,_0x1c1ed4)=>_0x5cac32+_0x1c1ed4['ms'],0x0),_0x3c560e=_0x22c026[_0x22de71(0x83)](_0x4429ba=>_0x4429ba[_0x22de71(0xc4)]+'='+_0x4429ba['ms']['toFixed'](0x0)+_0x22de71(0x1b5)+_0x4429ba[_0x22de71(0x16f)]+(_0x4429ba['maxMs']>0x5?_0x22de71(0x149)+_0x4429ba['maxMs'][_0x22de71(0x102)](0x0)+'ms'+(_0x4429ba[_0x22de71(0xe6)]?'\x20'+_0x4429ba['maxExtra']:'')+')':''));(_0x4a8504||_0x1082b9>=_0x384c36)&&this[_0x22de71(0x89)](_0x22de71(0x122)+_0x4f570e+_0x22de71(0x88)+_0x1082b9[_0x22de71(0x102)](0x0)+'ms\x20p99='+_0x13bf2a['toFixed'](0x0)+_0x22de71(0x19a)+_0x3e988e['toFixed'](0x0)+'ms\x20busy='+_0x381a2c[_0x22de71(0x102)](0x0)+'ms'+(_0x3c560e[_0x22de71(0x1d5)]?'\x20│\x20'+_0x3c560e[_0x22de71(0x1de)]('\x20\x20'):''),{'feature':_0x22de71(0x129)});if(this['_windowCbs'])for(const _0x2e0986 of this[_0x22de71(0xb1)]){try{_0x2e0986({'p99Ms':_0x13bf2a,'maxMs':_0x1082b9,'meanMs':_0x3e988e,'reportMs':_0x4f570e});}catch{}}}['stop'](){const _0x4193ae=_0x49357e;if(this[_0x4193ae(0x17c)])clearInterval(this['_timer']);if(this['_h'])this['_h']['disable']();this[_0x4193ae(0x17c)]=null,this['_h']=null,this['_started']=![];}}const _0x659167=new _0x12786f();if(_0x659167[_0x49357e(0xd3)])_0x659167[_0x49357e(0x10f)]();return okdbLoopMonitor={'LOOP':_0x659167},okdbLoopMonitor;}var okdbTransaction,hasRequiredOkdbTransaction;function requireOkdbTransaction(){const _0x34d3a6=_0x25c30f;if(hasRequiredOkdbTransaction)return okdbTransaction;hasRequiredOkdbTransaction=0x1;const _0x7d96ec=require$$0$2,{EVENTS:_0x51da5b}=requireOkdbEnums(),{OKDBError:_0x2d2a29}=requireOkdbError(),{LOOP:_0x276ad2}=requireOkdbLoopMonitor();function _0x1a2072(_0x53a7cf){const _0x2eff00=_0x3a2b;return _0x53a7cf[_0x2eff00(0x83)](_0x548b21=>{const _0x56edb2=_0x2eff00,[_0x3e924e,_0x2093da]=_0x548b21[_0x56edb2(0x1e3)]||[];return{'action':_0x548b21['action'],'type':_0x3e924e,'key':_0x2093da};});}class _0xed50cb{['okdb'];[_0x34d3a6(0x187)]=[];['_doHooks']=[];[_0x34d3a6(0x1b4)]=[];constructor(_0x111890,_0x3ae098={'useReadTransaction':![]}){const _0xeab5b6=_0x34d3a6;this['okdb']=_0x111890,this[_0xeab5b6(0xd4)]=_0x3ae098,this['id']=_0x7d96ec['v4'](),this[_0xeab5b6(0x19e)]=this[_0xeab5b6(0xd4)][_0xeab5b6(0xf2)]?this[_0xeab5b6(0x9f)]['db'][_0xeab5b6(0xf2)]():null,this[_0xeab5b6(0x196)]=![];}[_0x34d3a6(0x123)](_0x2308b3){const _0x182c2e=_0x34d3a6;this[_0x182c2e(0x13f)][_0x182c2e(0x85)](_0x2308b3);}['onUndo'](_0xa2ee33){const _0x3778b0=_0x34d3a6;this[_0x3778b0(0x1b4)]['push'](_0xa2ee33);}[_0x34d3a6(0x13e)](){const _0x6bb1c1=_0x34d3a6;if(!this[_0x6bb1c1(0x19e)])return;try{this['readTransaction'][_0x6bb1c1(0xf3)]();}catch(_0x34440c){}this[_0x6bb1c1(0x19e)]=null;}[_0x34d3a6(0x143)](){const _0x1e3f96=_0x34d3a6;if(this[_0x1e3f96(0x196)])throw new _0x2d2a29(_0x1e3f96(0xa5),_0x1e3f96(0x1a7));}[_0x34d3a6(0x1b1)](_0x112949,_0x333cba){const _0xc56f34=_0x34d3a6;return this[_0xc56f34(0x143)](),this[_0xc56f34(0x9f)][_0xc56f34(0x1b1)](_0x112949,_0x333cba,{'transaction':this[_0xc56f34(0x19e)]});}['getEntry'](_0x2185b8,_0x5716f8){const _0x1f00ed=_0x34d3a6;return this[_0x1f00ed(0x143)](),this['okdb'][_0x1f00ed(0x110)](_0x2185b8,_0x5716f8,{'transaction':this[_0x1f00ed(0x19e)]});}[_0x34d3a6(0x16a)](_0x423664,_0x22b839){const _0xb885e9=_0x34d3a6;return this[_0xb885e9(0x143)](),this[_0xb885e9(0x9f)][_0xb885e9(0x16a)](_0x423664,_0x22b839,{'transaction':this[_0xb885e9(0x19e)]});}[_0x34d3a6(0x97)](_0x27a71d,_0x24ff8f={}){const _0x297f58=_0x34d3a6;return this[_0x297f58(0x143)](),this['okdb'][_0x297f58(0x97)](_0x27a71d,{'transaction':this[_0x297f58(0x19e)],..._0x24ff8f});}['getValues'](_0x1f41e2,_0x1fd426={}){const _0x4e5185=_0x34d3a6;return this[_0x4e5185(0x143)](),this[_0x4e5185(0x9f)]['getValues'](_0x1f41e2,{'transaction':this['readTransaction'],..._0x1fd426});}[_0x34d3a6(0x1a9)](_0x2b06aa,_0x111b44={}){const _0x689dae=_0x34d3a6;return this[_0x689dae(0x143)](),this[_0x689dae(0x9f)][_0x689dae(0x1a9)](_0x2b06aa,{'transaction':this[_0x689dae(0x19e)],..._0x111b44});}[_0x34d3a6(0x11f)](_0x1f7da0,_0x760a0c,_0x4eadd2={}){const _0x360055=_0x34d3a6;return this[_0x360055(0x143)](),this[_0x360055(0x9f)]['byIndex'](_0x1f7da0,_0x760a0c,{'transaction':this[_0x360055(0x19e)],..._0x4eadd2});}['query'](_0x26735e,_0x513767,_0x4d92df={}){const _0x229ff7=_0x34d3a6;return this['_assertOpen'](),this['okdb'][_0x229ff7(0xfe)](_0x26735e,_0x513767,{'transaction':this['readTransaction'],..._0x4d92df});}[_0x34d3a6(0xf8)](_0x499d31=null){const _0x1bd475=_0x34d3a6;return this[_0x1bd475(0x143)](),this[_0x1bd475(0x9f)][_0x1bd475(0xf8)](_0x499d31,{'transaction':this[_0x1bd475(0x19e)]});}[_0x34d3a6(0x126)](_0x194cb8){const _0x20b755=_0x34d3a6;return this[_0x20b755(0x143)](),this[_0x20b755(0x9f)][_0x20b755(0x126)](_0x194cb8,{'transaction':this[_0x20b755(0x19e)]});}[_0x34d3a6(0xae)](_0x343cb4,_0x384c7a,_0x21e5b5,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x34d3a6(0x169)](),origin:origin=null,ttl:ttl=null}={}){const _0x3a66b7=_0x34d3a6;this[_0x3a66b7(0x187)][_0x3a66b7(0x85)]({'action':_0x3a66b7(0xae),'args':[_0x343cb4,_0x384c7a,_0x21e5b5,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x34d3a6(0x1c0)](_0x2d88ea,_0x5c631d,_0x33744c,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x34d3a6(0x169)](),origin:origin=null,ttl:ttl=null}={}){const _0xcf7233=_0x34d3a6;this[_0xcf7233(0x187)][_0xcf7233(0x85)]({'action':_0xcf7233(0x1c0),'args':[_0x2d88ea,_0x5c631d,_0x33744c,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x34d3a6(0x1ae)](_0x455778,_0x2b28a0,_0x518f67,{ifVersion:ifVersion=null,timestamp:timestamp=Date['now'](),origin:origin=null,ttl:ttl=null}={}){const _0x2e6776=_0x34d3a6;this[_0x2e6776(0x187)][_0x2e6776(0x85)]({'action':'patch','args':[_0x455778,_0x2b28a0,_0x518f67,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x34d3a6(0x115)](_0x259383,_0x1ee548,_0x278209,{version:version=null,timestamp:timestamp=Date['now'](),origin:origin=null,ttl:ttl=null}={}){const _0x2c3d04=_0x34d3a6;this[_0x2c3d04(0x187)]['push']({'action':_0x2c3d04(0x115),'args':[_0x259383,_0x1ee548,_0x278209,{'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x34d3a6(0xb6)](_0x2274c3,_0x50050a,{ifVersion:ifVersion=null,timestamp:timestamp=Date['now'](),origin:origin=null}={}){const _0x4b07c0=_0x34d3a6;this[_0x4b07c0(0x187)][_0x4b07c0(0x85)]({'action':_0x4b07c0(0xb6),'args':[_0x2274c3,_0x50050a,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin}]});}[_0x34d3a6(0xf1)](_0x1f48e1,_0x1bcd60,_0x7968c5){const _0x530a09=_0x34d3a6;this['actions'][_0x530a09(0x85)]({'action':_0x530a09(0xf1),'args':[_0x1f48e1,_0x1bcd60,_0x7968c5]});}[_0x34d3a6(0xb7)](_0x3d388b,_0xbf56f4){const _0x51a943=_0x34d3a6;this['actions'][_0x51a943(0x85)]({'action':_0x51a943(0xb7),'args':[_0x3d388b,_0xbf56f4]});}[_0x34d3a6(0x137)](){const _0x5d3234=_0x34d3a6;if(this['_closed'])return;for(const _0x8cc4db of this['_undoHooks']){try{_0x8cc4db();}catch{}}this[_0x5d3234(0x9f)][_0x5d3234(0x14a)][_0x5d3234(0x145)](_0x51da5b[_0x5d3234(0x109)],{'id':this['id']}),this['actions']=[],this[_0x5d3234(0x13e)](),this[_0x5d3234(0x196)]=!![];}async[_0x34d3a6(0x190)](){const _0x20ba74=_0x34d3a6;if(this[_0x20ba74(0x196)])throw new Error(_0x20ba74(0xa5));const _0xfd9ed9={'id':this['id'],'timestamp':Date['now'](),'actions':this[_0x20ba74(0x187)]};this[_0x20ba74(0x9f)]['events'][_0x20ba74(0x145)](_0x51da5b[_0x20ba74(0xff)],_0xfd9ed9);try{const _0x1459d=_0x276ad2[_0x20ba74(0xd3)]?_0x276ad2[_0x20ba74(0x169)]():0x0;await this[_0x20ba74(0x9f)][_0x20ba74(0xbe)][_0x20ba74(0x1d8)](()=>{const _0x1f3e45=_0x20ba74;for(const _0xe34ce4 of this[_0x1f3e45(0x187)]){const _0xcc5b4=this['okdb']['_'+_0xe34ce4[_0x1f3e45(0x108)]];if(typeof _0xcc5b4!==_0x1f3e45(0x1a3))throw new Error('Unknown\x20transaction\x20action:\x20'+_0xe34ce4[_0x1f3e45(0x108)]);_0xcc5b4['call'](this[_0x1f3e45(0x9f)],this,..._0xe34ce4['args']);}}),_0x276ad2['enabled']&&_0x276ad2[_0x20ba74(0x181)](_0x20ba74(0x188),_0x276ad2[_0x20ba74(0x169)]()-_0x1459d,(this[_0x20ba74(0x9f)][_0x20ba74(0x87)]??'?')+_0x20ba74(0x90)+this['actions'][_0x20ba74(0x1d5)]);}catch(_0x276a53){for(const _0x7aab7 of this[_0x20ba74(0x1b4)]){try{_0x7aab7();}catch{}}this[_0x20ba74(0x13e)](),this[_0x20ba74(0x196)]=!![];if(_0x276a53 instanceof _0x2d2a29)throw _0x276a53;const _0x3001c4={'cause':_0x276a53,'env':this[_0x20ba74(0x9f)]?.[_0x20ba74(0x87)],'envPath':this['okdb']?.[_0x20ba74(0xd6)],'pid':process[_0x20ba74(0xa8)],'txnId':this['id'],'actionCount':this['actions'][_0x20ba74(0x1d5)],'actions':_0x1a2072(this[_0x20ba74(0x187)]),'nativeCode':_0x276a53?.[_0x20ba74(0x11d)],'nativeName':_0x276a53?.[_0x20ba74(0x87)]};try{this[_0x20ba74(0x9f)]?.['log']?.[_0x20ba74(0xa1)]?.(_0x20ba74(0x15f),{'env':_0x3001c4[_0x20ba74(0x177)],'envPath':_0x3001c4['envPath'],'pid':_0x3001c4['pid'],'txnId':_0x3001c4[_0x20ba74(0x194)],'actionCount':_0x3001c4[_0x20ba74(0x154)],'actions':_0x3001c4[_0x20ba74(0x187)],'nativeCode':_0x3001c4[_0x20ba74(0xe2)],'error':_0x276a53?.[_0x20ba74(0xe1)],'stack':_0x276a53?.['stack']});}catch{}throw new _0x2d2a29(_0x276a53?.[_0x20ba74(0xe1)]||_0x20ba74(0x92),_0x20ba74(0x17d),_0x3001c4);}this[_0x20ba74(0x9f)][_0x20ba74(0x14a)][_0x20ba74(0x145)](_0x51da5b[_0x20ba74(0x191)],_0xfd9ed9);for(const _0x193319 of this[_0x20ba74(0x13f)]){try{await _0x193319();}catch{}}this['actions']=[],this[_0x20ba74(0x13e)](),this[_0x20ba74(0x196)]=!![];}static[_0x34d3a6(0xca)](_0x3acf89){const _0x15f891=_0x34d3a6;return Object[_0x15f891(0x117)]({'id':_0x3acf89['id'],'put':_0x3acf89[_0x15f891(0xae)]['bind'](_0x3acf89),'update':_0x3acf89[_0x15f891(0x1c0)]['bind'](_0x3acf89),'patch':_0x3acf89[_0x15f891(0x1ae)][_0x15f891(0x1d2)](_0x3acf89),'create':_0x3acf89[_0x15f891(0x115)][_0x15f891(0x1d2)](_0x3acf89),'remove':_0x3acf89['remove']['bind'](_0x3acf89),'setTTL':_0x3acf89[_0x15f891(0xf1)][_0x15f891(0x1d2)](_0x3acf89),'clearTTL':_0x3acf89['clearTTL']['bind'](_0x3acf89),'commit':_0x3acf89[_0x15f891(0x190)][_0x15f891(0x1d2)](_0x3acf89),'rollback':_0x3acf89[_0x15f891(0x137)]['bind'](_0x3acf89),'get':_0x3acf89['get'][_0x15f891(0x1d2)](_0x3acf89),'getEntry':_0x3acf89[_0x15f891(0x110)][_0x15f891(0x1d2)](_0x3acf89),'getMany':_0x3acf89[_0x15f891(0x16a)][_0x15f891(0x1d2)](_0x3acf89),'getRange':_0x3acf89[_0x15f891(0x97)][_0x15f891(0x1d2)](_0x3acf89),'getValues':_0x3acf89[_0x15f891(0x135)]['bind'](_0x3acf89),'getKeys':_0x3acf89[_0x15f891(0x1a9)][_0x15f891(0x1d2)](_0x3acf89),'byIndex':_0x3acf89[_0x15f891(0x11f)][_0x15f891(0x1d2)](_0x3acf89),'query':_0x3acf89['query'][_0x15f891(0x1d2)](_0x3acf89),'getClock':_0x3acf89[_0x15f891(0xf8)][_0x15f891(0x1d2)](_0x3acf89),'getCount':_0x3acf89[_0x15f891(0x126)][_0x15f891(0x1d2)](_0x3acf89),'read':_0x3acf89,'raw':_0x3acf89});}static[_0x34d3a6(0x179)](_0x21e371,_0xd83fb=[]){const _0x35e979=_0x34d3a6;if(!Array[_0x35e979(0x140)](_0xd83fb))throw new _0x2d2a29(_0x35e979(0x120),_0x35e979(0x139));for(const _0x462a87 of _0xd83fb){if(Array[_0x35e979(0x140)](_0x462a87)){const [_0x24d30,..._0x387ad0]=_0x462a87;if(typeof _0x21e371[_0x24d30]!==_0x35e979(0x1a3))throw new _0x2d2a29(_0x35e979(0x101)+_0x24d30,'TXN_INVALID_ACTION',{'action':_0x24d30});_0x21e371[_0x24d30](..._0x387ad0);continue;}if(!_0x462a87||typeof _0x462a87!==_0x35e979(0x13c))throw new _0x2d2a29(_0x35e979(0x16e),_0x35e979(0xd5));const {action:_0x351895}=_0x462a87;if(typeof _0x351895!==_0x35e979(0x1bd)||typeof _0x21e371[_0x351895]!==_0x35e979(0x1a3))throw new _0x2d2a29(_0x35e979(0x101)+_0x351895,_0x35e979(0x198),{'action':_0x351895});switch(_0x351895){case _0x35e979(0xae):case _0x35e979(0x1c0):case'create':_0x21e371[_0x351895](_0x462a87['type'],_0x462a87[_0x35e979(0xcf)],_0x462a87[_0x35e979(0x1ca)],{..._0x462a87[_0x35e979(0xd4)],'ttl':_0x462a87[_0x35e979(0x1da)]??_0x462a87[_0x35e979(0xd4)]?.[_0x35e979(0x1da)]??null});break;case _0x35e979(0x1ae):_0x21e371[_0x35e979(0x1ae)](_0x462a87[_0x35e979(0x1dc)],_0x462a87['key'],_0x462a87['patch'],{..._0x462a87[_0x35e979(0xd4)],'ttl':_0x462a87[_0x35e979(0x1da)]??_0x462a87[_0x35e979(0xd4)]?.[_0x35e979(0x1da)]??null});break;case _0x35e979(0xb6):_0x21e371[_0x35e979(0xb6)](_0x462a87[_0x35e979(0x1dc)],_0x462a87[_0x35e979(0xcf)],_0x462a87[_0x35e979(0xd4)]||{});break;case _0x35e979(0xf1):_0x21e371[_0x35e979(0xf1)](_0x462a87[_0x35e979(0x1dc)],_0x462a87['key'],_0x462a87[_0x35e979(0x1da)]);break;case _0x35e979(0xb7):_0x21e371[_0x35e979(0xb7)](_0x462a87[_0x35e979(0x1dc)],_0x462a87[_0x35e979(0xcf)]);break;default:throw new _0x2d2a29(_0x35e979(0xaa)+_0x351895,_0x35e979(0x198),{'action':_0x351895});}}}static async['run'](_0x471713,_0x46a293,_0xc9ee3e={}){const _0x521eb5=_0x34d3a6,_0x1cafa4=new _0xed50cb(_0x471713,_0xc9ee3e),_0x53c676=_0xed50cb[_0x521eb5(0xca)](_0x1cafa4);try{typeof _0x46a293===_0x521eb5(0x1a3)?await _0x46a293(_0x53c676):_0xed50cb[_0x521eb5(0x179)](_0x1cafa4,_0x46a293||[]);const _0x5a53ed=_0x1cafa4[_0x521eb5(0x187)]['length'];return await _0x1cafa4['commit'](),{'id':_0x1cafa4['id'],'actions':_0x5a53ed};}catch(_0x4af2ed){try{_0x1cafa4[_0x521eb5(0x137)]();}catch(_0x2bf2a9){}throw _0x4af2ed;}}}return okdbTransaction=_0xed50cb,okdbTransaction;}var okdbFunctionsFacades,hasRequiredOkdbFunctionsFacades;function requireOkdbFunctionsFacades(){if(hasRequiredOkdbFunctionsFacades)return okdbFunctionsFacades;hasRequiredOkdbFunctionsFacades=0x1;const _0x13b68c=requireOkdbTransaction();function _0x310ee9(_0x4e065c){const _0x3b8887=_0x3a2b;return{'transaction':typeof _0x4e065c[_0x3b8887(0x1d8)]==='function'?_0x4e065c[_0x3b8887(0x1d8)][_0x3b8887(0x1d2)](_0x4e065c):_0x43233f=>new _0x13b68c(_0x4e065c,_0x43233f),'txn':typeof _0x4e065c[_0x3b8887(0x1cd)]==='function'?_0x4e065c[_0x3b8887(0x1cd)][_0x3b8887(0x1d2)](_0x4e065c):(_0x2cdda1,_0x428723)=>_0x13b68c['run'](_0x4e065c,_0x2cdda1,_0x428723)};}function _0x4414d2(_0x5a5de6){const _0x10dce1=_0x3a2b;return{'name':_0x5a5de6['name'],..._0x310ee9(_0x5a5de6),'put':_0x5a5de6[_0x10dce1(0xae)][_0x10dce1(0x1d2)](_0x5a5de6),'update':_0x5a5de6[_0x10dce1(0x1c0)]['bind'](_0x5a5de6),'patch':_0x5a5de6[_0x10dce1(0x1ae)][_0x10dce1(0x1d2)](_0x5a5de6),'create':_0x5a5de6[_0x10dce1(0x115)][_0x10dce1(0x1d2)](_0x5a5de6),'remove':_0x5a5de6[_0x10dce1(0xb6)][_0x10dce1(0x1d2)](_0x5a5de6),'get':_0x5a5de6[_0x10dce1(0x1b1)][_0x10dce1(0x1d2)](_0x5a5de6),'getMany':_0x5a5de6[_0x10dce1(0x16a)][_0x10dce1(0x1d2)](_0x5a5de6),'getEntry':_0x5a5de6[_0x10dce1(0x110)]['bind'](_0x5a5de6),'getRange':_0x5a5de6['getRange'][_0x10dce1(0x1d2)](_0x5a5de6),'getValues':_0x5a5de6[_0x10dce1(0x135)][_0x10dce1(0x1d2)](_0x5a5de6),'getKeys':_0x5a5de6[_0x10dce1(0x1a9)][_0x10dce1(0x1d2)](_0x5a5de6),'getCount':_0x5a5de6['getCount'][_0x10dce1(0x1d2)](_0x5a5de6),'getByPrefix':_0x5a5de6['getByPrefix'][_0x10dce1(0x1d2)](_0x5a5de6),'getIndex':_0x5a5de6['getIndex'][_0x10dce1(0x1d2)](_0x5a5de6),'byIndex':_0x5a5de6[_0x10dce1(0x11f)]['bind'](_0x5a5de6),'query':_0x5a5de6['query']['bind'](_0x5a5de6),'geoQuery':_0x5a5de6[_0x10dce1(0x9a)][_0x10dce1(0x1d2)](_0x5a5de6),'ftsQuery':_0x5a5de6[_0x10dce1(0x113)][_0x10dce1(0x1d2)](_0x5a5de6),'setTTL':_0x5a5de6['setTTL']['bind'](_0x5a5de6),'getTTL':_0x5a5de6[_0x10dce1(0x14e)][_0x10dce1(0x1d2)](_0x5a5de6),'clearTTL':_0x5a5de6[_0x10dce1(0xb7)]['bind'](_0x5a5de6),'sweepExpiredTTL':_0x5a5de6[_0x10dce1(0x1ac)][_0x10dce1(0x1d2)](_0x5a5de6),'listTTL':_0x5a5de6['listTTL'][_0x10dce1(0x1d2)](_0x5a5de6),'ttlStats':_0x5a5de6[_0x10dce1(0x17b)][_0x10dce1(0x1d2)](_0x5a5de6),'setDefaultTTL':_0x5a5de6[_0x10dce1(0x10a)][_0x10dce1(0x1d2)](_0x5a5de6),'getDefaultTTL':_0x5a5de6[_0x10dce1(0x81)][_0x10dce1(0x1d2)](_0x5a5de6),'clearDefaultTTL':_0x5a5de6[_0x10dce1(0xf9)][_0x10dce1(0x1d2)](_0x5a5de6),'registerType':_0x5a5de6[_0x10dce1(0x1e5)]['bind'](_0x5a5de6),'ensureType':_0x5a5de6[_0x10dce1(0x193)][_0x10dce1(0x1d2)](_0x5a5de6),'hasType':_0x5a5de6['hasType'][_0x10dce1(0x1d2)](_0x5a5de6),'dropType':_0x5a5de6[_0x10dce1(0x17f)][_0x10dce1(0x1d2)](_0x5a5de6),'registerIndex':_0x5a5de6[_0x10dce1(0x18e)][_0x10dce1(0x1d2)](_0x5a5de6),'hasIndex':_0x5a5de6['hasIndex']['bind'](_0x5a5de6),'dropIndex':_0x5a5de6['dropIndex'][_0x10dce1(0x1d2)](_0x5a5de6),'resetIndex':_0x5a5de6[_0x10dce1(0xeb)][_0x10dce1(0x1d2)](_0x5a5de6),'indexReady':_0x5a5de6[_0x10dce1(0x199)][_0x10dce1(0x1d2)](_0x5a5de6),'getIndexStatus':_0x5a5de6['getIndexStatus']['bind'](_0x5a5de6),'getClock':_0x5a5de6[_0x10dce1(0xf8)]['bind'](_0x5a5de6),'getChanges':_0x5a5de6[_0x10dce1(0x1b2)][_0x10dce1(0x1d2)](_0x5a5de6),'count':_0x5a5de6[_0x10dce1(0x16f)][_0x10dce1(0x1d2)](_0x5a5de6),'range':_0x5a5de6[_0x10dce1(0xc1)][_0x10dce1(0x1d2)](_0x5a5de6),'now':_0x5a5de6[_0x10dce1(0x169)]['bind'](_0x5a5de6)};}function _0x40eb3f(_0x244723){const _0x39f522=_0x3a2b;if(!_0x244723)return null;const _0x4493bf={};for(const _0x4b15d3 of[_0x39f522(0x104),_0x39f522(0x1a8),_0x39f522(0xad),_0x39f522(0x1d7),_0x39f522(0xfd),_0x39f522(0xcd),_0x39f522(0x96),_0x39f522(0x1af)]){if(typeof _0x244723[_0x4b15d3]===_0x39f522(0x1a3))_0x4493bf[_0x4b15d3]=_0x244723[_0x4b15d3][_0x39f522(0x1d2)](_0x244723);}return Object[_0x39f522(0x1e0)](_0x4493bf)['length']?_0x4493bf:null;}function _0x29c454(_0x5ca587){const _0x588a1a=_0x3a2b;if(!_0x5ca587)return null;const _0x2599ce={};for(const _0x5d1ce9 of[_0x588a1a(0x180),_0x588a1a(0xed),_0x588a1a(0xb6),'get',_0x588a1a(0xad),'getByPath']){if(typeof _0x5ca587[_0x5d1ce9]===_0x588a1a(0x1a3))_0x2599ce[_0x5d1ce9]=_0x5ca587[_0x5d1ce9][_0x588a1a(0x1d2)](_0x5ca587);}return Object[_0x588a1a(0x1e0)](_0x2599ce)['length']?_0x2599ce:null;}function _0x18546b(_0x58fcc9){const _0x25a159=_0x3a2b;return{'env':_0x58fcc9[_0x25a159(0x177)][_0x25a159(0x1d2)](_0x58fcc9),'createEnvironment':_0x58fcc9['createEnvironment'][_0x25a159(0x1d2)](_0x58fcc9),'removeEnvironment':_0x58fcc9['removeEnvironment'][_0x25a159(0x1d2)](_0x58fcc9),'info':_0x58fcc9[_0x25a159(0xbd)],..._0x310ee9(_0x58fcc9),'put':_0x58fcc9[_0x25a159(0xae)][_0x25a159(0x1d2)](_0x58fcc9),'update':_0x58fcc9['update']['bind'](_0x58fcc9),'patch':_0x58fcc9['patch'][_0x25a159(0x1d2)](_0x58fcc9),'create':_0x58fcc9[_0x25a159(0x115)]['bind'](_0x58fcc9),'remove':_0x58fcc9['remove']['bind'](_0x58fcc9),'get':_0x58fcc9[_0x25a159(0x1b1)]['bind'](_0x58fcc9),'getMany':_0x58fcc9[_0x25a159(0x16a)][_0x25a159(0x1d2)](_0x58fcc9),'getEntry':_0x58fcc9[_0x25a159(0x110)][_0x25a159(0x1d2)](_0x58fcc9),'getRange':_0x58fcc9[_0x25a159(0x97)]['bind'](_0x58fcc9),'getValues':_0x58fcc9['getValues'][_0x25a159(0x1d2)](_0x58fcc9),'getKeys':_0x58fcc9[_0x25a159(0x1a9)][_0x25a159(0x1d2)](_0x58fcc9),'getCount':_0x58fcc9[_0x25a159(0x126)][_0x25a159(0x1d2)](_0x58fcc9),'getByPrefix':_0x58fcc9[_0x25a159(0x185)][_0x25a159(0x1d2)](_0x58fcc9),'getIndex':_0x58fcc9[_0x25a159(0x189)][_0x25a159(0x1d2)](_0x58fcc9),'byIndex':_0x58fcc9[_0x25a159(0x11f)][_0x25a159(0x1d2)](_0x58fcc9),'query':_0x58fcc9[_0x25a159(0xfe)]['bind'](_0x58fcc9),'setTTL':_0x58fcc9[_0x25a159(0xf1)]['bind'](_0x58fcc9),'getTTL':_0x58fcc9[_0x25a159(0x14e)][_0x25a159(0x1d2)](_0x58fcc9),'clearTTL':_0x58fcc9[_0x25a159(0xb7)]['bind'](_0x58fcc9),'sweepExpiredTTL':_0x58fcc9[_0x25a159(0x1ac)]['bind'](_0x58fcc9),'listTTL':_0x58fcc9[_0x25a159(0x105)][_0x25a159(0x1d2)](_0x58fcc9),'ttlStats':_0x58fcc9[_0x25a159(0x17b)][_0x25a159(0x1d2)](_0x58fcc9),'setDefaultTTL':_0x58fcc9[_0x25a159(0x10a)][_0x25a159(0x1d2)](_0x58fcc9),'getDefaultTTL':_0x58fcc9[_0x25a159(0x81)][_0x25a159(0x1d2)](_0x58fcc9),'clearDefaultTTL':_0x58fcc9[_0x25a159(0xf9)][_0x25a159(0x1d2)](_0x58fcc9),'ensureType':_0x58fcc9[_0x25a159(0x193)][_0x25a159(0x1d2)](_0x58fcc9),'registerType':_0x58fcc9[_0x25a159(0x1e5)][_0x25a159(0x1d2)](_0x58fcc9),'hasType':_0x58fcc9[_0x25a159(0x9b)]['bind'](_0x58fcc9),'dropType':_0x58fcc9[_0x25a159(0x17f)][_0x25a159(0x1d2)](_0x58fcc9),'registerIndex':_0x58fcc9[_0x25a159(0x18e)][_0x25a159(0x1d2)](_0x58fcc9),'hasIndex':_0x58fcc9['hasIndex'][_0x25a159(0x1d2)](_0x58fcc9),'dropIndex':_0x58fcc9['dropIndex'][_0x25a159(0x1d2)](_0x58fcc9),'resetIndex':_0x58fcc9['resetIndex'][_0x25a159(0x1d2)](_0x58fcc9),'indexReady':_0x58fcc9[_0x25a159(0x199)][_0x25a159(0x1d2)](_0x58fcc9),'getIndexStatus':_0x58fcc9[_0x25a159(0xc9)][_0x25a159(0x1d2)](_0x58fcc9),'getClock':_0x58fcc9[_0x25a159(0xf8)][_0x25a159(0x1d2)](_0x58fcc9),'getChanges':_0x58fcc9['getChanges'][_0x25a159(0x1d2)](_0x58fcc9),'queue':_0x58fcc9[_0x25a159(0xdb)],'files':_0x58fcc9[_0x25a159(0x1ba)]};}return okdbFunctionsFacades={'createEnvFacade':_0x4414d2,'createQueueFacade':_0x40eb3f,'createFilesFacade':_0x29c454,'createGlobalFacade':_0x18546b},okdbFunctionsFacades;}var okdbFunctionsDryrun,hasRequiredOkdbFunctionsDryrun;function requireOkdbFunctionsDryrun(){const _0x4b5c6d=_0x25c30f;if(hasRequiredOkdbFunctionsDryrun)return okdbFunctionsDryrun;hasRequiredOkdbFunctionsDryrun=0x1;const _0x18f66c=new Set([_0x4b5c6d(0xae),_0x4b5c6d(0x1ae),_0x4b5c6d(0x115),'remove',_0x4b5c6d(0x1c0),_0x4b5c6d(0xf1),_0x4b5c6d(0xb7),_0x4b5c6d(0x1ac),'setDefaultTTL',_0x4b5c6d(0xf9),'dropType','dropIndex',_0x4b5c6d(0xeb)]),_0x34bb3e=new Set([_0x4b5c6d(0x104),_0x4b5c6d(0x1d7),_0x4b5c6d(0xfd),'addBucket']),_0x10d62e=new Set([_0x4b5c6d(0x180),_0x4b5c6d(0xb6)]);function _0x2e73a8(_0x44ac6a,_0x36a3b8){const _0x3e32d6=_0x4b5c6d;if(_0x44ac6a===_0x3e32d6(0x177)||_0x44ac6a===_0x3e32d6(0x136))return _0x18f66c[_0x3e32d6(0x7c)](_0x36a3b8);if(_0x44ac6a===_0x3e32d6(0xdb))return _0x34bb3e[_0x3e32d6(0x7c)](_0x36a3b8);if(_0x44ac6a===_0x3e32d6(0x1ba))return _0x10d62e[_0x3e32d6(0x7c)](_0x36a3b8);return![];}function _0x490ccd(_0x3861bd,_0x146b02,_0x13fc2f,_0x35c110){if(!_0x3861bd)return _0x3861bd;return new Proxy(_0x3861bd,{'get'(_0x37ba1b,_0x221c07,_0x39372c){const _0x264447=_0x3a2b,_0x59eaf9=Reflect[_0x264447(0x1b1)](_0x37ba1b,_0x221c07,_0x39372c);if(typeof _0x59eaf9!==_0x264447(0x1a3))return _0x59eaf9;if(!_0x2e73a8(_0x146b02,_0x221c07))return _0x59eaf9['bind'](_0x37ba1b);return function(..._0x2f33de){const _0x58cb70=_0x264447;return _0x35c110[_0x58cb70(0x85)]({'scope':_0x146b02,'method':_0x221c07,'envName':_0x13fc2f,'args':_0x2f33de}),null;};}});}function _0x4831e2(_0xa6eaae,_0x44aeae,_0x292d91,_0x9446d){const _0x535678={};for(const _0x4c0bc1 of _0x292d91){_0x535678[_0x4c0bc1]=(..._0x15fa9d)=>{return _0x2e73a8(_0xa6eaae,_0x4c0bc1)&&_0x9446d['push']({'scope':_0xa6eaae,'method':_0x4c0bc1,'envName':_0x44aeae,'args':_0x15fa9d}),null;};}return _0x535678;}return okdbFunctionsDryrun={'isWriteMethod':_0x2e73a8,'wrapForDryRun':_0x490ccd,'syntheticDryRunFacade':_0x4831e2,'ENV_WRITE_METHODS':_0x18f66c,'QUEUE_WRITE_METHODS':_0x34bb3e,'FILES_WRITE_METHODS':_0x10d62e},okdbFunctionsDryrun;}var okdbFunctionsContext,hasRequiredOkdbFunctionsContext;function _0x3a2b(_0x1a084d,_0x4b41a9){_0x1a084d=_0x1a084d-0x7a;const _0x3762fc=_0x3762();let _0x3a2b43=_0x3762fc[_0x1a084d];return _0x3a2b43;}function requireOkdbFunctionsContext(){const _0x3dbf73=_0x25c30f;if(hasRequiredOkdbFunctionsContext)return okdbFunctionsContext;hasRequiredOkdbFunctionsContext=0x1;const {createEnvFacade:_0x43e7b4,createQueueFacade:_0x1c9ac9,createFilesFacade:_0x1f45b1,createGlobalFacade:_0x11d551}=requireOkdbFunctionsFacades(),{wrapForDryRun:_0x381e32,syntheticDryRunFacade:_0x295375}=requireOkdbFunctionsDryrun(),_0x3f4058=[_0x3dbf73(0x104),_0x3dbf73(0x1a8),_0x3dbf73(0xad),_0x3dbf73(0x1d7),_0x3dbf73(0xfd),_0x3dbf73(0xcd),_0x3dbf73(0x96),_0x3dbf73(0x1af)],_0x21457b=[_0x3dbf73(0x180),_0x3dbf73(0xed),_0x3dbf73(0xb6),'get',_0x3dbf73(0xad),_0x3dbf73(0x14f)];function _0x5005b2(_0x518f64,_0x3f71b5){const _0x45e542=_0x3dbf73,_0x3a607a=(_0x11e1a2,_0x2eb687,_0x11ee2d)=>_0x3f71b5({'type':_0x45e542(0x10b),'requestId':_0x518f64[_0x45e542(0x1e2)],'runId':_0x518f64[_0x45e542(0x12e)],'entry':{'level':_0x11e1a2,'msg':_0x2eb687,'context':_0x11ee2d,'ts':Date[_0x45e542(0x169)]()}}),_0x3a2ab1=(_0x433b15,_0x3bb8bd)=>_0x3a607a(_0x45e542(0xbd),_0x433b15,_0x3bb8bd);return _0x3a2ab1[_0x45e542(0xbd)]=(_0x219372,_0x237bd0)=>_0x3a607a(_0x45e542(0xbd),_0x219372,_0x237bd0),_0x3a2ab1[_0x45e542(0x151)]=(_0x8cfb87,_0x43e783)=>_0x3a607a(_0x45e542(0x151),_0x8cfb87,_0x43e783),_0x3a2ab1['error']=(_0x229856,_0x2b109a)=>_0x3a607a('error',_0x229856,_0x2b109a),_0x3a2ab1[_0x45e542(0x1b6)]=(_0x1e0506,_0x34a817)=>_0x3a607a('debug',_0x1e0506,_0x34a817),_0x3a2ab1;}function _0x41529d(_0x4fc327,_0x3446a1,_0x491258){const _0x5b72da=_0x3dbf73;if(!_0x4fc327)return null;return{'id':_0x4fc327['id']??null,'type':_0x4fc327[_0x5b72da(0x1dc)]??null,'tries':_0x4fc327[_0x5b72da(0x1c7)]??null,'created':_0x4fc327[_0x5b72da(0x159)]??null,'tags':_0x4fc327[_0x5b72da(0x168)]??null,'priority':_0x4fc327[_0x5b72da(0x1b9)]??null,'bucket':_0x4fc327['bucket']??null,'cron':_0x4fc327['cron']??null,'heartbeat'(){const _0x21041c=_0x5b72da;_0x491258({'type':_0x21041c(0x124),'requestId':_0x3446a1[_0x21041c(0x1e2)],'runId':_0x3446a1['runId'],'jobId':_0x4fc327['id'],'claimId':_0x4fc327['claimId']});},'markProgress'(_0x493adf){const _0x27f91d=_0x5b72da;_0x491258({'type':_0x27f91d(0xdc),'requestId':_0x3446a1['requestId'],'runId':_0x3446a1[_0x27f91d(0x12e)],'jobId':_0x4fc327['id'],'claimId':_0x4fc327['claimId'],'message':_0x493adf});}};}function _0x164456(_0x3798b8){const _0x4eb29e=_0x3dbf73;if(!_0x3798b8)return null;return{'mode':_0x3798b8[_0x4eb29e(0x1c6)]??null,'sourceType':_0x3798b8['sourceType']??null,'sourceEnv':_0x3798b8[_0x4eb29e(0x155)]??null,'processor':_0x3798b8[_0x4eb29e(0x158)]??null,'engineKey':_0x3798b8[_0x4eb29e(0x1a4)]??null,'cursorKey':_0x3798b8[_0x4eb29e(0x1aa)]??null};}function _0x9762e3(_0x2c5412){const _0x4bbddf=_0x3dbf73;if(!_0x2c5412)return null;return{'mode':_0x2c5412[_0x4bbddf(0x1c6)]??null,'sourceType':_0x2c5412[_0x4bbddf(0xda)]??null,'targetType':_0x2c5412[_0x4bbddf(0x8d)]??null,'sourceEnv':_0x2c5412[_0x4bbddf(0x155)]??null,'targetEnv':_0x2c5412[_0x4bbddf(0x165)]??null,'engineKey':_0x2c5412['engineKey']??null,'cursorKey':_0x2c5412['cursorKey']??null};}function _0xb69b93(_0x2f314c,_0x2608b1,_0x4f17d2,_0x587bb7=null,_0x1029c0=null){const _0x2b9948=_0x3dbf73,_0x205597={'runId':_0x2608b1['runId'],'scope':'env','env':_0x2608b1[_0x2b9948(0x131)]??null,'functionName':_0x2608b1['functionName'],'trigger':_0x2608b1[_0x2b9948(0xbd)]?.[_0x2b9948(0x13b)]??_0x2b9948(0xa9),'requestedAt':_0x2608b1[_0x2b9948(0xbd)]?.[_0x2b9948(0x182)]??Date['now']()},_0x5dbb6c=_0x5005b2(_0x2608b1,_0x4f17d2),_0x2dfc11=AbortSignal['timeout'](Math[_0x2b9948(0x147)](0x1,_0x2608b1[_0x2b9948(0x1b3)]?.[_0x2b9948(0x9e)]??0x3e8)),_0x1c5fb1=_0x1029c0?AbortSignal[_0x2b9948(0xb5)]([_0x2dfc11,_0x1029c0]):_0x2dfc11,_0x29be03=_0x2f314c[_0x2b9948(0x177)](_0x2608b1[_0x2b9948(0x131)]),_0x4f31f9=_0x587bb7?_0x381e32(_0x29be03,'env',_0x2608b1[_0x2b9948(0x131)],_0x587bb7):_0x29be03,_0x28222f=_0x587bb7?_0x29be03[_0x2b9948(0xdb)]?_0x381e32(_0x29be03[_0x2b9948(0xdb)],_0x2b9948(0xdb),_0x2608b1[_0x2b9948(0x131)],_0x587bb7):_0x295375(_0x2b9948(0xdb),_0x2608b1['envName'],_0x3f4058,_0x587bb7):_0x29be03[_0x2b9948(0xdb)],_0x4c343a=_0x587bb7?_0x29be03[_0x2b9948(0x1ba)]?_0x381e32(_0x29be03['files'],_0x2b9948(0x1ba),_0x2608b1[_0x2b9948(0x131)],_0x587bb7):_0x295375('files',_0x2608b1['envName'],_0x21457b,_0x587bb7):_0x29be03[_0x2b9948(0x1ba)],_0x48ab1b=_0x43e7b4(_0x4f31f9),_0x2066ee=_0x1c9ac9(_0x28222f),_0xa4dce1=_0x1f45b1(_0x4c343a);if(_0x2066ee)_0x48ab1b['queue']=_0x2066ee;if(_0xa4dce1)_0x48ab1b[_0x2b9948(0x1ba)]=_0xa4dce1;const _0x5c6ade={'payload':_0x2608b1[_0x2b9948(0x112)]??null,'info':_0x205597,'signal':_0x1c5fb1,'log':_0x5dbb6c,'env':_0x48ab1b},_0x1cdbff=_0x41529d(_0x2608b1[_0x2b9948(0xb0)],_0x2608b1,_0x4f17d2);if(_0x1cdbff)_0x5c6ade[_0x2b9948(0x12d)]=_0x1cdbff;const _0x1a992e=_0x164456(_0x2608b1[_0x2b9948(0x9c)]);if(_0x1a992e)_0x5c6ade[_0x2b9948(0x158)]=_0x1a992e;const _0x2488cc=_0x9762e3(_0x2608b1[_0x2b9948(0x7f)]);if(_0x2488cc)_0x5c6ade[_0x2b9948(0x157)]=_0x2488cc;if(_0x2608b1[_0x2b9948(0x14c)]){const _0x178ed7=_0x587bb7?_0x381e32(_0x2f314c,_0x2b9948(0x136),null,_0x587bb7):_0x2f314c;_0x5c6ade[_0x2b9948(0x9f)]=_0x11d551(_0x178ed7);}return _0x5c6ade;}return okdbFunctionsContext={'createExecutionContext':_0xb69b93,'createScriptLogger':_0x5005b2},okdbFunctionsContext;}var hasRequiredOkdbFunctionsSandboxWorker;function requireOkdbFunctionsSandboxWorker(){const _0x4ce4c6=_0x25c30f;if(hasRequiredOkdbFunctionsSandboxWorker)return okdbFunctionsSandboxWorker$1;hasRequiredOkdbFunctionsSandboxWorker=0x1;const {parentPort:_0x19d7a2,workerData:_0x265110}=require$$0$3;requireOkdbFatalReport()['enableFatalReport'](_0x4ce4c6(0x121));const _0x4a14ca=require$$2,{compileFunctionExpression:_0x14556f}=requireOkdbFunctionsSandbox(),{serializeError:_0x45df66}=requireOkdbFunctionsIpc(),{createExecutionContext:_0x2b7a0c}=requireOkdbFunctionsContext(),_0x2d8a4d=require$$6;let _0x1aca09=null,_0x527292=![];const _0x15067d=new Map(),_0x134d06=new Map();function _0x2c74e0(_0x5d6479){const _0x509dcd=_0x4ce4c6;try{_0x19d7a2[_0x509dcd(0x176)](_0x5d6479);}catch{}}function _0xc6faea(_0x37148b){const _0x5227f1=_0x4ce4c6,_0x4e35bd=(_0x37148b[_0x5227f1(0x131)]||_0x5227f1(0x18c))+':'+_0x37148b['functionName']+':'+_0x37148b[_0x5227f1(0x86)]+':'+_0x37148b[_0x5227f1(0x16c)];let _0x1a6dcc=_0x15067d[_0x5227f1(0x1b1)](_0x4e35bd);return!_0x1a6dcc&&(_0x1a6dcc=_0x14556f(_0x37148b[_0x5227f1(0xe8)],{'allowFetch':_0x37148b['runtime']?.['allowFetch']!==![],'allowedFetchDomains':_0x37148b[_0x5227f1(0x1b3)]?.[_0x5227f1(0xb3)],'filename':_0x37148b[_0x5227f1(0x125)]+_0x5227f1(0x12a)}),_0x15067d[_0x5227f1(0x11a)](_0x4e35bd,_0x1a6dcc)),_0x1a6dcc;}async function _0x1428dc(_0x18ed59){const _0x41d299=_0x4ce4c6,_0x418e26=Date[_0x41d299(0x169)](),_0x481f0b=new AbortController();_0x134d06[_0x41d299(0x11a)](_0x18ed59[_0x41d299(0x1e2)],_0x481f0b);try{const _0x1fa5bf=_0xc6faea(_0x18ed59);if(_0x18ed59[_0x41d299(0x131)])await _0x1aca09[_0x41d299(0x11e)](_0x18ed59[_0x41d299(0x131)]);const _0x39b33d=_0x18ed59['dryRun']?[]:null,_0x110516=_0x2b7a0c(_0x1aca09,_0x18ed59,_0x2c74e0,_0x39b33d,_0x481f0b['signal']),_0x327910=await _0x1fa5bf(_0x110516),_0x369d24={'type':_0x41d299(0x119),'requestId':_0x18ed59['requestId'],'runId':_0x18ed59['runId'],'result':_0x327910,'meta':{'runnerId':'sandbox-'+process['pid'],'startedAt':_0x418e26,'finishedAt':Date[_0x41d299(0x169)](),'durationMs':Date[_0x41d299(0x169)]()-_0x418e26}};if(_0x39b33d)_0x369d24[_0x41d299(0x8a)]=_0x39b33d;_0x2c74e0(_0x369d24);}catch(_0x1ee088){_0x2c74e0({'type':'error','requestId':_0x18ed59[_0x41d299(0x1e2)],'runId':_0x18ed59[_0x41d299(0x12e)],'error':_0x45df66(_0x1ee088),'meta':{'runnerId':_0x41d299(0x93)+process[_0x41d299(0xa8)],'startedAt':_0x418e26,'finishedAt':Date[_0x41d299(0x169)](),'durationMs':Date['now']()-_0x418e26}});}finally{_0x134d06[_0x41d299(0xbb)](_0x18ed59[_0x41d299(0x1e2)]);}}async function _0x41b018(){const _0x1af931=_0x4ce4c6;if(_0x527292)return;_0x527292=!![];try{await _0x1aca09?.[_0x1af931(0x1e6)]?.();}catch{}process[_0x1af931(0x132)](0x0);}async function _0x37cfc1(){const _0x390ac0=_0x4ce4c6,{rootPath:_0x52eceb}=_0x265110??{};if(!_0x52eceb)throw new Error(_0x390ac0(0x1bf));_0x1aca09=new _0x2d8a4d(_0x52eceb,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]},'processes':![]}),await _0x1aca09[_0x390ac0(0xc2)]();const _0x2ab9e5=setInterval(()=>{const _0x1714ea=_0x390ac0;if(_0x527292)return;for(const [,_0x2a2ed3]of _0x1aca09[_0x1714ea(0x171)]){try{_0x2a2ed3[_0x1714ea(0x84)]?.();}catch{}}},0xc8);if(typeof _0x2ab9e5[_0x390ac0(0xe5)]===_0x390ac0(0x1a3))_0x2ab9e5['unref']();_0x19d7a2['on'](_0x390ac0(0xe1),_0x56cbfd=>{const _0x54ea9d=_0x390ac0;if(!_0x56cbfd||typeof _0x56cbfd!==_0x54ea9d(0x13c))return;if(_0x56cbfd['type']===_0x54ea9d(0xce))return void _0x41b018();if(_0x56cbfd[_0x54ea9d(0x1dc)]===_0x54ea9d(0xec)){_0x134d06[_0x54ea9d(0x1b1)](_0x56cbfd[_0x54ea9d(0x1e2)])?.['abort'](new Error(_0x54ea9d(0xa7)));return;}_0x56cbfd[_0x54ea9d(0x1dc)]===_0x54ea9d(0x184)&&void _0x1428dc(_0x56cbfd[_0x54ea9d(0x12d)]);});const _0x334658=Math[_0x390ac0(0x147)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x5511dc=setInterval(()=>{const _0x4c926d=_0x390ac0;try{_0x2c74e0({'type':_0x4c926d(0x12f),'heapUsed':_0x4a14ca[_0x4c926d(0x178)]()[_0x4c926d(0x1e4)]});}catch{}},_0x334658);if(typeof _0x5511dc[_0x390ac0(0xe5)]===_0x390ac0(0x1a3))_0x5511dc['unref']();_0x2c74e0({'type':_0x390ac0(0x8c)});}return _0x37cfc1()[_0x4ce4c6(0xee)](_0x591ad6=>{const _0x59a68f=_0x4ce4c6;_0x2c74e0({'type':_0x59a68f(0x192),'error':_0x45df66(_0x591ad6)}),process[_0x59a68f(0x132)](0x1);}),okdbFunctionsSandboxWorker$1;}var okdbFunctionsSandboxWorkerExports=requireOkdbFunctionsSandboxWorker(),okdbFunctionsSandboxWorker=getDefaultExportFromCjs(okdbFunctionsSandboxWorkerExports);module['exports']=okdbFunctionsSandboxWorker;