@kedem/okdb 2.0.3 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) 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/index.md +1 -0
  6. package/docs/manifest.json +2 -1
  7. package/docs/pipelines.md +12 -0
  8. package/docs/upgrade-2.1.md +74 -0
  9. package/okdb-functions-sandbox-worker.js +1 -1
  10. package/okdb-http-worker-child.js +1 -1
  11. package/okdb-views-bootstrap-worker.js +1 -1
  12. package/okdb.js +1 -1
  13. package/package.json +1 -1
  14. package/public/layouts/_default.ok.html +3 -1
  15. package/public/sections/db/parts/db-overview.ok.js +1 -1
  16. package/public/sections/embeddings/modals/edit-pipeline-modal.ok.js +1 -0
  17. package/public/sections/embeddings/modals/replace-embedder-modal.ok.js +1 -0
  18. package/public/sections/embeddings/parts/embed-create-panel.ok.js +1 -1
  19. package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +1 -1
  20. package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +1 -1
  21. package/public/sections/embeddings/parts/embed-search-panel.ok.js +1 -1
  22. package/public/sections/embeddings/parts/embed-worker-panel.ok.js +1 -1
  23. package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
  24. package/public/sections/embeddings/parts/pipeline-flow-strip.ok.js +1 -0
  25. package/public/sections/embeddings/parts/pipeline-try-search.ok.js +1 -0
  26. package/public/sections/engines/engine-ui-utils.js +1 -1
  27. package/public/sections/engines/index.ok.html +1 -1
  28. package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -1
  29. package/public/sections/engines/parts/engine-lifecycle-actions.ok.js +1 -1
  30. package/public/sections/engines/parts/engine-panel-shell.ok.js +1 -1
  31. package/public/sections/engines/parts/engine-resource-card.ok.js +1 -1
  32. package/public/sections/functions/index.ok.html +1 -1
  33. package/public/sections/system/index.ok.html +1 -1
  34. package/public/sections/system/parts/system-locks-panel.ok.js +1 -1
  35. package/public/sections/system/parts/system-storage-panel.ok.js +1 -0
  36. package/public/sections/views/index.ok.html +1 -1
  37. package/public/stores/auth-store.js +1 -1
  38. package/public/stores/events-store.js +1 -1
  39. package/public/styles.css +1 -1
  40. package/public/vendor/okjs/ok.esm.min.js +1 -1
  41. package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
  42. package/public/vendor/okjs/toolkit/components/ok-marked.ok.js +1 -1
  43. package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
  44. package/public/vendor/okjs/toolkit/core/ok-layer-service.ok.js +1 -1
  45. package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
  46. package/public/vendor/okjs/toolkit/devtools/ok-console.ok.js +1 -1
  47. package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor-service.ok.js +1 -1
  48. package/public/vendor/okjs/toolkit/errors/ok-crash-info.ok.js +1 -1
  49. package/public/vendor/okjs/toolkit/interaction/ok-contextmenu.ok.js +1 -1
  50. package/public/vendor/okjs/toolkit/interaction/ok-flyover-panel.ok.js +1 -1
  51. package/public/vendor/okjs/toolkit/interaction/ok-hotkeys-service.ok.js +1 -1
  52. package/public/vendor/okjs/toolkit/interaction/ok-popout-service.ok.js +1 -1
  53. package/public/vendor/okjs/toolkit/interaction/ok-submenu.ok.js +1 -1
  54. package/public/vendor/okjs/toolkit/layout/ok-resizer.ok.js +1 -1
  55. package/public/vendor/okjs/toolkit/manifest.js +1 -1
  56. package/public/vendor/okjs/toolkit/modals/ok-modal-service.ok.js +1 -1
  57. package/public/vendor/okjs/toolkit/modals/ok-modal.ok.js +1 -1
  58. package/public/vendor/okjs/toolkit/modals/ok-toast-service.ok.js +1 -1
  59. package/public/vendor/okjs/toolkit/theming/ok-design-style.js +1 -1
  60. package/public/vendor/okjs/toolkit/theming/ok-theme.ok.js +1 -1
  61. 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/index.md CHANGED
@@ -127,3 +127,4 @@ await okdb.close();
127
127
  - [Plugins](./plugins.md) — extending OKDB before open
128
128
  - [Migration](./migration.md) — export, import, backup, blob integrity
129
129
  - [Upgrading to 2.0](./upgrade-2.0.md) — the node-model runtime redesign: constructor changes, workers dissolved, claimed responsibilities
130
+ - [Upgrading to 2.1](./upgrade-2.1.md) — the safe-range contract: range iterators are synchronous, `READER_HELD_ACROSS_AWAIT`, the env-balloon fix
@@ -42,7 +42,8 @@
42
42
  { "file": "logging.md", "label": "Logging" },
43
43
  { "file": "diagnostics.md", "label": "Diagnostics" },
44
44
  { "file": "migration.md", "label": "Migration" },
45
- { "file": "upgrade-2.0.md", "label": "Upgrading to 2.0" }
45
+ { "file": "upgrade-2.0.md", "label": "Upgrading to 2.0" },
46
+ { "file": "upgrade-2.1.md", "label": "Upgrading to 2.1" }
46
47
  ]
47
48
  }
48
49
  ]
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
 
@@ -0,0 +1,74 @@
1
+ # Upgrading to okdb 2.1 — the safe-range contract
2
+
3
+ okdb 2.1 fixes the **env-size balloon**: LMDB data files growing far past their live data
4
+ until a compaction rescued them. Storage formats, the document model, and all APIs are
5
+ **unchanged**, and **default-path code needs no changes at all** — including loops that
6
+ `await` while iterating a range.
7
+
8
+ > **The one-sentence contract.** Default range reads can no longer pin the database:
9
+ > `getRange` / `getKeys` / `getValues` / `getByPrefix` use a renewable read transaction, so
10
+ > an iterator held across an `await` neither balloons the file nor breaks. The explicitly
11
+ > **pinned** surfaces (`snapshot: true`, `byIndex` / `getIndex`, `getChanges`) release
12
+ > their cursor at any suspension and throw **`READER_HELD_ACROSS_AWAIT`** —
13
+ > deterministically; `'tolerant'` mode opts into resume-while-quiet.
14
+
15
+ ## Why
16
+
17
+ LMDB is copy-on-write: every commit frees the pages it replaces, and a freed page can be
18
+ recycled only when **no reader in any process** still holds an older snapshot. A pinned
19
+ range cursor held across an `await` blocks free-page reuse for the _entire_ env while
20
+ writes churn, and the file grows by _pages-dirtied-per-commit × commit count_ (≈24 KB
21
+ floor per commit) — completely decoupled from ingestion volume. One parked iterator plus
22
+ background churn = gigabytes. Reproduced and measured in `repro/reader-balloon.js` and
23
+ `repro/reader-balloon-amplify.js`.
24
+
25
+ ## What each surface does now
26
+
27
+ | Surface | Default behavior |
28
+ | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
+ | `getRange` / `getKeys` / `getValues` / `getByPrefix` | **Renewable** — iterate however you like, `await` freely mid-loop; per-row consistency (a resumed iterator sees writes that landed ahead of it); nothing pins. |
30
+ | `getRange(type, { snapshot: true })`, `getKeys(..., { snapshot: true })` | **Pinned + strict guard** — one frozen view that must be consumed in one synchronous block. On suspension the cursor is released (nothing pins past one synchronous block, abandoned iterators included) and the next `next()` throws `READER_HELD_ACROSS_AWAIT` — **deterministically**, quiet env or busy: the violation fails on first run at your desk, never intermittently under production write traffic. |
31
+ | `{ snapshot: 'tolerant' }` | Opt-in park-and-resume: same release-at-suspension, but the next `next()` resumes transparently **iff no commit of any kind landed meanwhile** (LMDB's env-wide `lastTxnId` unchanged — cross-process accurate) and throws only when the frozen view is genuinely unkeepable. Note this makes the error load-dependent — opt in only when that is what you want. |
32
+ | `getChanges` | Pinned + strict guard (renewal is not supported on the clock sub-DBs). `{ snapshot: 'tolerant' }` opts into the resume rule. |
33
+ | `byIndex` / `getIndex` | Pinned + strict guard — dupSort stores have no unambiguous resume bookmark, so any suspension throws. Materialize (`Array.from`) before awaiting. |
34
+ | explicit `{ transaction }` / `OKDBTransaction` | Bypasses the guards — the pin is caller-scoped (see below). |
35
+
36
+ If you hit the error, the fix is one line — materialize before the `await`:
37
+
38
+ ```js
39
+ for (const { value } of Array.from(env.byIndex('orders', ['status'], { values: ['open'] }))) {
40
+ await handle(value);
41
+ }
42
+ ```
43
+
44
+ or chunk large scans with keyed continuation (`{ limit, start, exclusiveStart }` per batch).
45
+
46
+ ## `useReadTransaction` — same rule, transaction-shaped
47
+
48
+ `env.transaction({ useReadTransaction: true })`'s consistent read view is released at the
49
+ first turn boundary after creation (so a transaction that is never committed can no longer
50
+ leak its pin). Reads after that throw `READER_HELD_ACROSS_AWAIT` — deterministically: do
51
+ all consistent reads before any `await`. `useReadTransaction: 'tolerant'` opts into the
52
+ resume rule instead (reads stay valid while nothing has been committed; the first
53
+ interleaved commit makes them throw). Writes are unaffected either way: they are buffered
54
+ intents, applied atomically at `commit()` with `ifVersion` checked against current state,
55
+ exactly as before.
56
+
57
+ Note the guard checks are **env-wide and conservative**: any commit — including internal
58
+ bookkeeping — counts as "the env was written."
59
+
60
+ ## Rolling upgrades
61
+
62
+ The renewable default and the guards live in the upgraded process. A **2.0.x peer sharing
63
+ the same store path can still pin** shared envs the old way until it is upgraded — the
64
+ process-registry mixed-build warning tells you when a fleet is split. Upgrade all
65
+ processes on a path.
66
+
67
+ ## History worth keeping (internal)
68
+
69
+ An earlier build shipped the renewable default and **segfaulted** — root cause was okdb's
70
+ _own_ boot loops holding renewable cursors across awaits into env close/rebuild windows.
71
+ Seven internal sites were fixed (materialized or chunked; the boot env-registry loop had
72
+ been pinning `~system` for the entire multi-env open). Internal scans must stay
73
+ synchronous or chunked; `tests/getrange-snapshot-default.test.js` keeps the crash shape
74
+ (env close with a held renewable iterator) permanently covered.
@@ -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';function _0x4c6d(_0x34a457,_0x2066a5){_0x34a457=_0x34a457-0xbb;const _0x3bbce9=_0x3bbc();let _0x4c6de3=_0x3bbce9[_0x34a457];return _0x4c6de3;}const _0x318de2=_0x4c6d;(function(_0x319965,_0x506557){const _0x3010d7=_0x4c6d,_0xb703bd=_0x319965();while(!![]){try{const _0x74a86d=-parseInt(_0x3010d7(0xcd))/0x1+parseInt(_0x3010d7(0x10a))/0x2*(parseInt(_0x3010d7(0x219))/0x3)+-parseInt(_0x3010d7(0x189))/0x4*(parseInt(_0x3010d7(0xf3))/0x5)+parseInt(_0x3010d7(0x134))/0x6+-parseInt(_0x3010d7(0x202))/0x7+parseInt(_0x3010d7(0x1a6))/0x8*(parseInt(_0x3010d7(0x10f))/0x9)+parseInt(_0x3010d7(0x1f3))/0xa*(parseInt(_0x3010d7(0x220))/0xb);if(_0x74a86d===_0x506557)break;else _0xb703bd['push'](_0xb703bd['shift']());}catch(_0x4ec047){_0xb703bd['push'](_0xb703bd['shift']());}}}(_0x3bbc,0x6ddb8));var require$$0$4=require(_0x318de2(0x1dd)),require$$2=require('v8'),require$$0=require(_0x318de2(0x174)),require$$0$3=require(_0x318de2(0x132)),require$$0$1=require(_0x318de2(0x106)),require$$0$2=require('node:perf_hooks'),require$$6=require(_0x318de2(0x204));function getDefaultExportFromCjs(_0x5b69d4){const _0x5ccf8d=_0x318de2;return _0x5b69d4&&_0x5b69d4[_0x5ccf8d(0x127)]&&Object[_0x5ccf8d(0x216)][_0x5ccf8d(0x225)][_0x5ccf8d(0x1ea)](_0x5b69d4,_0x5ccf8d(0x13c))?_0x5b69d4[_0x5ccf8d(0x13c)]:_0x5b69d4;}var okdbFunctionsSandboxWorker$1={},okdbFatalReport,hasRequiredOkdbFatalReport;function requireOkdbFatalReport(){if(hasRequiredOkdbFatalReport)return okdbFatalReport;hasRequiredOkdbFatalReport=0x1;function _0x2fc551(_0x11cea6){const _0x5c62a8=_0x4c6d;if(process.env.OKDB_FATAL_REPORT!=='1')return;try{if(!process[_0x5c62a8(0x1c3)])return;process['report']['reportOnFatalError']=!![];try{if(_0x5c62a8(0x16c)in process[_0x5c62a8(0x1c3)])process[_0x5c62a8(0x1c3)]['excludeEnv']=process.env.OKDB_FATAL_REPORT_ENV!=='1';}catch{}if(process[_0x5c62a8(0x12d)]!=='win32')try{process['report'][_0x5c62a8(0x1c5)]=!![];if(typeof process[_0x5c62a8(0x1c3)]['signal']===_0x5c62a8(0x22b))process[_0x5c62a8(0x1c3)]['signal']='SIGSEGV';}catch{}if(process.env.OKDB_REPORT_DIR)try{require('fs')['mkdirSync'](process.env.OKDB_REPORT_DIR,{'recursive':!![]}),process[_0x5c62a8(0x1c3)][_0x5c62a8(0x206)]=process.env.OKDB_REPORT_DIR;}catch{}try{process[_0x5c62a8(0x1c3)][_0x5c62a8(0x1c0)]='';}catch{}if(_0x11cea6)process.env.OKDB_REPORT_TAG=String(_0x11cea6);}catch{}}return okdbFatalReport={'enableFatalReport':_0x2fc551},okdbFatalReport;}var okdbFunctionsSandbox,hasRequiredOkdbFunctionsSandbox;function requireOkdbFunctionsSandbox(){if(hasRequiredOkdbFunctionsSandbox)return okdbFunctionsSandbox;hasRequiredOkdbFunctionsSandbox=0x1;const _0x5f5112=require$$0;function _0x30edc5(_0x18381d){const _0x273860=_0x4c6d,_0x49f41e=_0x18381d==='*',_0x237223=_0x49f41e?null:new Set(Array[_0x273860(0x164)](_0x18381d)?_0x18381d:[]);return function _0x57b326(_0x22c320,_0x36fbd7){const _0x2b346b=_0x273860;if(!_0x49f41e){let _0x1d3760;try{const _0x4b06f9=new URL(typeof _0x22c320===_0x2b346b(0x22b)?_0x22c320:_0x22c320?.[_0x2b346b(0x105)]??String(_0x22c320));_0x1d3760=_0x4b06f9[_0x2b346b(0xd6)];}catch{const _0x2e7a1b=new Error(_0x2b346b(0x13b));return _0x2e7a1b['code']='FETCH_NOT_ALLOWED',Promise[_0x2b346b(0xe4)](_0x2e7a1b);}if(!_0x237223[_0x2b346b(0x1f0)](_0x1d3760)){const _0x3200d5=new Error(_0x237223[_0x2b346b(0x23b)]===0x0?'fetch\x20is\x20not\x20allowed\x20in\x20this\x20function\x20sandbox\x20(no\x20allowedFetchDomains\x20configured)':'fetch\x20blocked:\x20hostname\x20\x22'+_0x1d3760+_0x2b346b(0xd9));return _0x3200d5[_0x2b346b(0x146)]=_0x2b346b(0x22a),Promise[_0x2b346b(0xe4)](_0x3200d5);}}return fetch(_0x22c320,_0x36fbd7);};}function _0xfea15b(_0x43b500={}){const _0x1965c1=_0x4c6d,_0x277556=_0x43b500['allowFetch']!==![],_0x4fe3c9=_0x43b500[_0x1965c1(0x16e)]??[],_0x57d274={'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['crypto']};return _0x277556&&typeof fetch===_0x1965c1(0x233)&&(_0x57d274[_0x1965c1(0x1d1)]=_0x30edc5(_0x4fe3c9)),_0x57d274['globalThis']=_0x57d274,_0x57d274;}function _0x4793cd(_0x256b85,_0x1a5afb={}){const _0x3b0f5e=_0x4c6d,_0x265126=_0xfea15b(_0x1a5afb),_0x435a7e=_0x5f5112['createContext'](_0x265126,{'name':'okdb-function-sandbox','codeGeneration':{'strings':![],'wasm':![]}});let _0x1fded8;try{_0x1fded8=new _0x5f5112[(_0x3b0f5e(0x168))]('('+_0x256b85+')',{'filename':_0x1a5afb[_0x3b0f5e(0x1c0)]??_0x3b0f5e(0x1d2)});}catch(_0x273d9d){const _0x4d166c=new Error(_0x273d9d?.[_0x3b0f5e(0x147)]||_0x3b0f5e(0x23f));_0x4d166c[_0x3b0f5e(0x146)]=_0x3b0f5e(0x201),_0x4d166c[_0x3b0f5e(0xff)]=_0x273d9d;throw _0x4d166c;}let _0x4914df;try{_0x4914df=_0x1fded8[_0x3b0f5e(0x21e)](_0x435a7e,{'timeout':_0x1a5afb['compileTimeoutMs']??0x64});}catch(_0x53e2ff){const _0x29c0a2=new Error(_0x53e2ff?.['message']||_0x3b0f5e(0x18e));_0x29c0a2[_0x3b0f5e(0x146)]=_0x3b0f5e(0x201),_0x29c0a2[_0x3b0f5e(0xff)]=_0x53e2ff;throw _0x29c0a2;}if(typeof _0x4914df!==_0x3b0f5e(0x233)){const _0x167c80=new Error(_0x3b0f5e(0x1f6));_0x167c80['code']='FUNCTION_SCRIPT_INVALID_SHAPE';throw _0x167c80;}return _0x4914df;}return okdbFunctionsSandbox={'createSandboxGlobals':_0xfea15b,'compileFunctionExpression':_0x4793cd,'_buildRestrictedFetch':_0x30edc5},okdbFunctionsSandbox;}var okdbFunctionsIpc,hasRequiredOkdbFunctionsIpc;function requireOkdbFunctionsIpc(){if(hasRequiredOkdbFunctionsIpc)return okdbFunctionsIpc;hasRequiredOkdbFunctionsIpc=0x1;function _0x2fe4db(_0x11c7b0){const _0x219c9e=_0x4c6d;if(!_0x11c7b0)return null;return{'message':_0x11c7b0[_0x219c9e(0x147)]||String(_0x11c7b0),'stack':_0x11c7b0[_0x219c9e(0x172)]||null,'code':_0x11c7b0[_0x219c9e(0x146)]||null,'details':_0x11c7b0[_0x219c9e(0xf2)]||null};}function _0x190b18(_0x4061e9){const _0x406e6c=_0x4c6d;if(!_0x4061e9)return new Error(_0x406e6c(0x1cf));const _0x1c7a3e=new Error(_0x4061e9['message']||String(_0x4061e9));if(_0x4061e9[_0x406e6c(0x172)])_0x1c7a3e[_0x406e6c(0x172)]=_0x4061e9['stack'];if(_0x4061e9[_0x406e6c(0x146)])_0x1c7a3e['code']=_0x4061e9['code'];if(_0x4061e9['details'])_0x1c7a3e['details']=_0x4061e9['details'];return _0x1c7a3e;}return okdbFunctionsIpc={'serializeError':_0x2fe4db,'deserializeError':_0x190b18},okdbFunctionsIpc;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x281568=_0x318de2;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5203fe={'PUT':_0x281568(0x13e),'REMOVE':_0x281568(0x19c),'INDEX_DROP':_0x281568(0xf1),'INDEX_REGISTER':_0x281568(0x1ec),'INDEX_RESET':_0x281568(0xc4),'TYPE_REGISTER':'registerType','TYPE_DROP':_0x281568(0xe9),'FTS_REGISTER':_0x281568(0x190),'FTS_DROP':_0x281568(0x1b7),'FTS_RESET':_0x281568(0x15b),'SCHEMA_SET':_0x281568(0xfd),'SCHEMA_DROP':_0x281568(0x1ce),'TTL_SET':_0x281568(0x117),'TTL_CLEAR':'clearTtl'},_0x43c635={'SYSTEM_READY':_0x281568(0x1c9),'SYSTEM_STOPPED':_0x281568(0x20a),'SYSTEM_CLOCK_CHANGE':_0x281568(0x16a),'SYSTEM_POKE':_0x281568(0x210),'SYSTEM_DRAIN':_0x281568(0x199),'SYSTEM_TYPE_DROP':_0x281568(0xef),'SYSTEM_PROC':_0x281568(0x1d5),'SYSTEM_BUS_STATE_CHANGE':_0x281568(0x211),'ITEM_CREATE':_0x281568(0x175),'ITEM_UPDATE':_0x281568(0x229),'ITEM_REMOVE':'item:remove','INDEX_RESET':'index:reset','INDEX_READY':_0x281568(0x11a),'INDEX_PROGRESS':_0x281568(0x1be),'VIEW_PROGRESS':_0x281568(0x176),'INDEX_DROP':_0x281568(0x17a),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':'fts:registered','FTS_DROP':_0x281568(0x1b3),'FTS_RESET':_0x281568(0x15d),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x281568(0x1b4),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x281568(0x1bb),'REF_VIOLATION_RESOLVED':_0x281568(0x1ab),'SYNC_APPLY':'sync:apply','TXN_START':_0x281568(0xde),'TXN_END':_0x281568(0x1fa),'TXN_ROLLBACK':_0x281568(0x11d),'TYPE_REGISTERED':_0x281568(0x1f7),'TYPE_DROP':'type:drop','ENV_OPENED':_0x281568(0x20d),'ENV_REMOVED':_0x281568(0x109),'SYSTEM_ENV_RELEASE':_0x281568(0x23d),'TTL_EXPIRED':_0x281568(0x193),'TTL_SET':_0x281568(0x207),'TTL_CLEAR':_0x281568(0x133),'LICENSE_INVALID':_0x281568(0x144),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x281568(0x138)},_0x4422a0={'CREATING':_0x281568(0x224),'RESETTING':_0x281568(0xed),'READY':'ready','DROPPING':_0x281568(0x1d9),'WAITING':_0x281568(0xc7)},_0x523c08={'CREATED':'created','STARTING':_0x281568(0x228),'STARTED':'started','STOPPING':_0x281568(0x13f),'STOPPED':_0x281568(0x14c)},_0x498562={'CREATING':'creating','READY':'ready','HALTED':'halted','STOPPED':_0x281568(0x14c),'RESETTING':_0x281568(0xed)},_0x3f91f7=Object[_0x281568(0xbb)]({'POKE':_0x281568(0xda),'DRAIN':_0x281568(0x10c),'TYPE_DROP':'bus:type_drop','PROC':_0x281568(0xca),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x3f91f7,'CHANGE_ACTIONS':_0x5203fe,'EVENTS':_0x43c635,'INDEX_STATE':_0x4422a0,'OKDB_STATE':_0x523c08,'VIEW_STATE':_0x498562},okdbEnums;}var okdbError,hasRequiredOkdbError;function _0x3bbc(){const _0x4f5f20=['openEnv','enqueue','getByPrefix','push','_windowCbs','signal','setSchema','geoQuery','cause','_doHooks','unsafe','cursorKey','cron','list','url','lmdb','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','map','env:removed','32czmokz','global','bus:drain','targetEnv','ms/','479610VyTCTp','ms\x20busy=','materialize\x20them\x20(Array.from)\x20while\x20the\x20view\x20is\x20live.','Transaction\x20already\x20closed','env','ms\x20p99=','key','enabled','setTtl','\x20documents\x20fail\x20validation','postMessage','index:ready','mode','clearTTL','txn:rollback','SCHEMA_VALIDATION_FAILED','options','mean','_assertOpen','txn\x20op\x20must\x20be\x20an\x20object\x20or\x20tuple','transaction\x20commit\x20failed','_started','Index\x20\x27','no\x20write\x20has\x20landed.\x20Writes/commit\x20are\x20unaffected.','__esModule','Unique\x20constraint\x20violated\x20on\x20','before\x20any\x20await,\x20chunk\x20with\x20{limit,\x20start,\x20exclusiveStart},\x20or\x20drop\x20snapshot:true.','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','sourceType','okdb','platform','timeoutMs','Unsupported\x20transaction\x20action:\x20','count','flatMap','uuid','ttl:clear','756282PwkQxd','byLabel','concat','actions','license:removed','sdk','Schema\x20validation\x20failed\x20for\x20','fetch\x20blocked:\x20invalid\x20URL','default','Foreign\x20key\x20violation:\x20','put','stopping','ftsQuery','_report','now','OKDBInvalidIndexKeyError','license:invalid','FOREIGN_KEY_VIOLATION','code','message','_readViewExpired','setDefaultTTL','(no\x20unambiguous\x20bookmark)\x20—\x20consume\x20it\x20in\x20one\x20synchronous\x20block:\x20materialize\x20(e.g.\x20','OKDBInvalidValueError','stopped','job','Unknown\x20transaction\x20action:\x20','shift','last','runId','total','\x27\x20doesn\x27t\x20exist','sandbox-','offWindow','FOREIGN_KEY_DELETE_RESTRICTED','.okdb-function.js','exports','unref',':txnRange','resetFts','getEntry','fts:reset','info','useReadTransaction\x20read\x20view\x20expired:\x20the\x20snapshot\x20was\x20released\x20at\x20the\x20first\x20await/turn\x20','jobContext','TXN_CLOSED','note','true','isArray','\x27\x20is\x20already\x20registered','listTTL','nativeCode','Script','constructor','system:clock_change','getRange','excludeEnv','OKDBVersionMismatchError','allowedFetchDomains','hasIndex','_log','patch','stack','released\x20at\x20the\x20first\x20await/turn\x20boundary.\x20Consume\x20ranges\x20before\x20any\x20await,\x20or\x20','node:vm','item:create','view:progress','getStats','then','catch','index:drop','forEach','version','ensureType','OKDBNotFoundError','onDo','maxExtra','max','OKDBSchemaValidationError','OKDBInvalidPrimaryKeyError','script','DONE','created','hash','OKDBIndexNotRegisteredError','64ZYtToT','processor','fieldPath','before\x20any\x20await\x20—\x20or\x20opt\x20into\x20useReadTransaction:\x27tolerant\x27\x20to\x20keep\x20reading\x20while\x20','applyOps','Function\x20script\x20failed\x20to\x20initialize','iterator','registerFts','envPath','OKDBAlreadyExistsError','ttl:expired','requestId','registerType','loop-lag\x20','SKIP','_range','system:drain','INVALID_PRIMARY_KEY','job_progress','remove','enable','priority','OKDBUniqueConstraintError','slice','_envs','txn','NOT_FOUND','OKDBTypeNotRegisteredError','events','24GqeRBz','Index\x20\x22','keys','txnId','onUndo','ref:violation_resolved','references','sandbox\x20worker:\x20rootPath\x20missing\x20from\x20workerData','trigger','UNIQUE_CONSTRAINT','requestedAt','updateJob','OKDBTypeAlreadyRegisteredError','fts:drop','schema:drop','range','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','dropFts','transaction','\x22\x20is\x20used\x20by:\x20','error','ref:violation','runtime','targetType','index:progress','update','filename','files','object','report','from','reportOnSignal','_startAdmission','commit','listBuckets','system:ready','getTTL','rollback','OKDBForeignKeyDeleteError','Type\x20\x27','dropSchema','Unknown\x20custom\x20function\x20error','claimId','fetch','okdb-function.js','_admissionTimer','_timer','system:proc','_closed','delete','return','dropping',':\x20key\x20[','_writer','TXN_ROLLBACK','worker_threads','exit','start','stringify','getDefaultTTL','indexReady','\x27\x20already\x20registered','tolerant','disable','getMany','create','bucket','pid','call','\x20which\x20does\x20not\x20exist','registerIndex','getIndexStatus','stream','toFixed','has',':\x20expected\x20','actionCount','2466130fANRCj','add','setTTL','Function\x20script\x20must\x20evaluate\x20to\x20a\x20callable\x20function','type:registered','tags','percentile','txn:end','args','envName','query','functionName','errors','ttl','FUNCTION_SCRIPT_COMPILE_FAILED','29022HRFiCE','sweepExpiredTTL','./okdb','getChanges','directory','ttl:set','engineKey','\x20does\x20not\x20exist','system:stopped','next','get','env:opened','readTransaction','abort','system:poke','system:bus_state_change','close','getKeys','allowFetch','bind','prototype','asArray','meanwhile\x20—\x20the\x20frozen\x20view\x20cannot\x20be\x20kept.\x20Materialize\x20synchronously\x20(e.g.\x20Array.from)\x20','139731VwBHXQ','cancelled\x20by\x20caller','dryRun','lastTxnId','getClock','runInContext','path','22UTWVol','removeEnvironment','createEnvironment','stats','creating','hasOwnProperty','TXN_INVALID_OP','_closeReadTransaction','starting','item:update','FETCH_NOT_ALLOWED','string','sandbox',':useReadTransaction','warn','\x22\x20on\x20\x22','addBucket','SCHEMA_COLLECTION_INVALID','getIndex','function','OKDBIndexAlreadyRegisteredError','enableFatalReport','_drainHandler','emit','name','READER_HELD_ACROSS_AWAIT','Array.from)\x20before\x20any\x20await.','size','OKDBError','system:env_release','join','Function\x20script\x20failed\x20to\x20compile','hasType','debug','freeze','\x27:\x20','cancel','clear','_undoHooks','(worst\x20','action','_admissionStarted',',\x20got\x20','resetIndex','fatal','used_heap_size','waiting','byIndex','materializer','bus:proc','TXN_INVALID_ACTION','getValues','231437bPSbGd','type','run','captureStackTrace','OKDBForeignKeyError','clearDefaultTTL','maxMs','ALREADY_EXISTS','onWindow','hostname','upload','TXN_END','\x22\x20is\x20not\x20in\x20the\x20allowedFetchDomains\x20list','bus:poke','TYPE_NOT_REGISTERED','queue','done','txn:start','length','sourceKey','set','useReadTransaction','TXN_START','reject','stop','txn-commit','OKDBSchemaCollectionError','getBucket','dropType','_buckets','getCount','value','resetting','_txnIdAtSnapshot','system:type_drop','_makeIterator','dropIndex','details','262130eidtyh','kind','Invalid\x20primary\x20key\x20type:\x20','createWriteFacade'];_0x3bbc=function(){return _0x4f5f20;};return _0x3bbc();}function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x203a9d extends Error{constructor(_0x5636a4,_0x3eaa15,_0x5ab1c4={}){const _0x237a8e=_0x4c6d;super(_0x5636a4),this[_0x237a8e(0x238)]=_0x237a8e(0x23c),this['code']=_0x3eaa15,this['details']=_0x5ab1c4,_0x5ab1c4[_0x237a8e(0xff)]&&(this['cause']=_0x5ab1c4[_0x237a8e(0xff)]),Error[_0x237a8e(0xd0)](this,this[_0x237a8e(0x169)]);}}class _0x4a17f6 extends _0x203a9d{constructor(_0xc78d52,_0x532396,_0x7b5e7c,_0x59f8a9){const _0x2d0e47=_0x4c6d;super('Version\x20mismatch\x20for\x20'+_0xc78d52+'@'+_0x532396+_0x2d0e47(0x1f1)+_0x7b5e7c+_0x2d0e47(0xc3)+_0x59f8a9,'VERSION_MISMATCH',{'type':_0xc78d52,'key':_0x532396,'expectedVersion':_0x7b5e7c,'actualVersion':_0x59f8a9}),this[_0x2d0e47(0x238)]=_0x2d0e47(0x16d);}}class _0x167ae3 extends _0x203a9d{constructor(_0x27113a,_0x2e1cb7){const _0x689883=_0x4c6d;super(_0x27113a+'@'+_0x2e1cb7+_0x689883(0x209),_0x689883(0x1a3),{'type':_0x27113a,'key':_0x2e1cb7}),this['name']=_0x689883(0x17e);}}class _0x583042 extends _0x203a9d{constructor(_0x1250bb,_0x482b1c){const _0x1bd1a2=_0x4c6d;super(_0x1250bb+'@'+_0x482b1c+'\x20already\x20exists',_0x1bd1a2(0xd4),{'type':_0x1250bb,'key':_0x482b1c}),this[_0x1bd1a2(0x238)]=_0x1bd1a2(0x192);}}class _0x19b0a2 extends _0x203a9d{constructor(_0x454804,_0x3a450d){const _0x453f87=_0x4c6d,_0x4a8ff0=typeof _0x3a450d;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x454804+_0x453f87(0xbc)+_0x4a8ff0+_0x453f87(0x12a)+_0x3a450d,'INVALID_INDEX_KEY',{'index':_0x454804,'key':_0x3a450d,'keyType':_0x4a8ff0}),this[_0x453f87(0x238)]=_0x453f87(0x143);}}class _0x121194 extends _0x203a9d{constructor(_0x64e092){const _0x3dbe1c=_0x4c6d,_0xd626ae=typeof _0x64e092;super(_0x3dbe1c(0xf5)+_0xd626ae+_0x3dbe1c(0x1b6)+_0x64e092,_0x3dbe1c(0x19a),{'key':_0x64e092,'keyType':_0xd626ae}),this['name']=_0x3dbe1c(0x183);}}class _0xc0bf81 extends _0x203a9d{constructor(_0x180dc0){const _0x437012=_0x4c6d;super(_0x437012(0x1cd)+_0x180dc0+_0x437012(0x153),_0x437012(0xdb),{'type':_0x180dc0}),this[_0x437012(0x238)]=_0x437012(0x1a4);}}class _0x4aa039 extends _0x203a9d{constructor(_0x3db3ef){const _0xb4d52e=_0x4c6d;super(_0xb4d52e(0x1cd)+_0x3db3ef+_0xb4d52e(0x1e3),'TYPE_ALREADY_REGISTERED',{'type':_0x3db3ef}),this[_0xb4d52e(0x238)]=_0xb4d52e(0x1b2);}}class _0x298234 extends _0x203a9d{constructor(_0x4a5676,_0x8f66c7){const _0x4d2cd0=_0x4c6d;super(_0x4d2cd0(0x125)+_0x8f66c7+'\x27\x20on\x20type\x20\x27'+_0x4a5676+_0x4d2cd0(0x153),'INDEX_NOT_REGISTERED',{'type':_0x4a5676,'index':_0x8f66c7}),this[_0x4d2cd0(0x238)]=_0x4d2cd0(0x188);}}class _0x1f2ecc extends _0x203a9d{constructor(_0x1e4a3d,_0x445726){const _0x572361=_0x4c6d;super('Index\x20\x27'+_0x445726+'\x27\x20on\x20type\x20\x27'+_0x1e4a3d+_0x572361(0x165),'INDEX_ALREADY_REGISTERED',{'type':_0x1e4a3d,'index':_0x445726}),this[_0x572361(0x238)]=_0x572361(0x234);}}class _0x390f07 extends _0x203a9d{constructor(_0xd232d1,_0x5071bd={}){const _0x4b0e81=_0x4c6d;super(_0xd232d1,'INVALID_VALUE',_0x5071bd),this[_0x4b0e81(0x238)]=_0x4b0e81(0x14b);}}class _0x16a88b extends _0x203a9d{constructor(_0x48dc6c,_0x4d35fe,_0x1f28bf,_0x5831fe,_0x515388){const _0x422eda=_0x4c6d;super(_0x422eda(0x128)+_0x48dc6c+'@'+_0x4d35fe+_0x422eda(0x1da)+_0x1f28bf+']\x20already\x20maps\x20to\x20\x27'+_0x5831fe+'\x27,\x20cannot\x20map\x20to\x20\x27'+_0x515388+'\x27',_0x422eda(0x1af),{'type':_0x48dc6c,'index':_0x4d35fe,'indexKey':_0x1f28bf,'existingKey':_0x5831fe,'conflictingKey':_0x515388}),this[_0x422eda(0x238)]=_0x422eda(0x19f);}}class _0x370252 extends _0x203a9d{constructor(_0x435633,_0x4238df,_0x200d5f){const _0x54c11a=_0x4c6d;super(_0x54c11a(0x13a)+_0x435633+'@'+_0x4238df,_0x54c11a(0x11e),{'type':_0x435633,'key':_0x4238df,'errors':_0x200d5f}),this[_0x54c11a(0x238)]=_0x54c11a(0x182),this[_0x54c11a(0xce)]=_0x435633,this['key']=_0x4238df,this[_0x54c11a(0x1ff)]=_0x200d5f;}}class _0x1de4dd extends _0x203a9d{constructor(_0x463f2e,_0x5becb3){const _0x5812d8=_0x4c6d;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x463f2e+':\x20'+_0x5becb3[_0x5812d8(0xdf)]+_0x5812d8(0x118),_0x5812d8(0x231),{'type':_0x463f2e,'failures':_0x5becb3}),this[_0x5812d8(0x238)]=_0x5812d8(0xe7),this[_0x5812d8(0xce)]=_0x463f2e,this['failures']=_0x5becb3;}}class _0x8c1a1a extends _0x203a9d{constructor(_0x1ece65,_0x25664c,_0x5f520f,_0x1d619a,_0x36a0ca){const _0x2fbfb=_0x4c6d;super(_0x2fbfb(0x13d)+_0x1ece65+'@'+_0x25664c+'.'+_0x5f520f+'\x20references\x20'+_0x1d619a+'@'+_0x36a0ca+_0x2fbfb(0x1eb),_0x2fbfb(0x145),{'sourceType':_0x1ece65,'sourceKey':_0x25664c,'fieldPath':_0x5f520f,'targetType':_0x1d619a,'targetKey':_0x36a0ca}),this[_0x2fbfb(0x238)]=_0x2fbfb(0xd1),this[_0x2fbfb(0x12b)]=_0x1ece65,this[_0x2fbfb(0xe0)]=_0x25664c,this[_0x2fbfb(0x18b)]=_0x5f520f,this[_0x2fbfb(0x1bd)]=_0x1d619a,this['targetKey']=_0x36a0ca;}}class _0x38ffc9 extends _0x203a9d{constructor(_0x4ce87c,_0x5009fb,_0xdf4231){const _0x14d96b=_0x4c6d;super('Cannot\x20delete\x20'+_0x4ce87c+'@'+_0x5009fb+':\x20'+_0xdf4231['length']+_0x14d96b(0x107),_0x14d96b(0x156),{'targetType':_0x4ce87c,'targetKey':_0x5009fb,'references':_0xdf4231}),this[_0x14d96b(0x238)]=_0x14d96b(0x1cc),this['targetType']=_0x4ce87c,this['targetKey']=_0x5009fb,this[_0x14d96b(0x1ac)]=_0xdf4231;}}class _0x2129ea extends _0x203a9d{constructor(_0x124ccc,_0x372554,_0x5dd4e3){const _0xe43f0d=_0x4c6d;super(_0xe43f0d(0x1a7)+_0x372554+_0xe43f0d(0x22f)+_0x124ccc+_0xe43f0d(0x1b9)+_0x5dd4e3['map'](_0x3c48e0=>_0x3c48e0[_0xe43f0d(0xf4)]+':'+_0x3c48e0[_0xe43f0d(0x238)])['join'](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0x124ccc,'index':_0x372554,'usedBy':_0x5dd4e3}),this[_0xe43f0d(0x238)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x203a9d,'OKDBVersionMismatchError':_0x4a17f6,'OKDBNotFoundError':_0x167ae3,'OKDBAlreadyExistsError':_0x583042,'OKDBInvalidIndexKeyError':_0x19b0a2,'OKDBInvalidPrimaryKeyError':_0x121194,'OKDBTypeNotRegisteredError':_0xc0bf81,'OKDBTypeAlreadyRegisteredError':_0x4aa039,'OKDBIndexNotRegisteredError':_0x298234,'OKDBIndexAlreadyRegisteredError':_0x1f2ecc,'OKDBInvalidValueError':_0x390f07,'OKDBUniqueConstraintError':_0x16a88b,'OKDBSchemaValidationError':_0x370252,'OKDBSchemaCollectionError':_0x1de4dd,'OKDBForeignKeyError':_0x8c1a1a,'OKDBForeignKeyDeleteError':_0x38ffc9,'OKDBIndexHasConsumersError':_0x2129ea},okdbError;}var okdbGuardedRange,hasRequiredOkdbGuardedRange;function requireOkdbGuardedRange(){const _0x42bee2=_0x318de2;if(hasRequiredOkdbGuardedRange)return okdbGuardedRange;hasRequiredOkdbGuardedRange=0x1;const _0x4cbcef=require$$0$1,{OKDBError:_0x3642ff}=requireOkdbError(),_0x29469b={'value':null,'done':!![]};class _0x1fa0bb{constructor(_0x349bd6){const _0x378caf=_0x4c6d;this[_0x378caf(0xf0)]=_0x349bd6;}get[_0x42bee2(0x185)](){return _0x29469b;}[Symbol[_0x42bee2(0x18f)]](){const _0x4867ef=_0x42bee2;return this[_0x4867ef(0xf0)]();}[_0x42bee2(0x108)](_0x326120){const _0x21881d=this;return new _0x1fa0bb(()=>{const _0x2f9aa9=_0x4c6d,_0x2664d4=_0x21881d[Symbol[_0x2f9aa9(0x18f)]]();return{'next'(){const _0x3c4330=_0x2f9aa9;for(;;){const _0x24ff7a=_0x2664d4['next']();if(_0x24ff7a[_0x3c4330(0xdd)])return{'done':!![],'value':undefined};const _0x2e7393=_0x326120(_0x24ff7a[_0x3c4330(0xec)]);if(_0x2e7393===_0x4cbcef[_0x3c4330(0x197)])continue;if(_0x2e7393===_0x29469b)return _0x2664d4['return']?.(),{'done':!![],'value':undefined};return{'done':![],'value':_0x2e7393};}},'return'(){const _0x3ec7ba=_0x2f9aa9;return _0x2664d4[_0x3ec7ba(0x1d8)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x2f9aa9(0x18f)]](){return this;}};});}['filter'](_0x128467){const _0x1bff88=_0x42bee2;return this[_0x1bff88(0x108)](_0x186a20=>_0x128467(_0x186a20)?_0x186a20:_0x4cbcef[_0x1bff88(0x197)]);}[_0x42bee2(0x17b)](_0x5983b7){for(const _0x3738dc of this)_0x5983b7(_0x3738dc);}[_0x42bee2(0x1a0)](_0x4577ca=0x0,_0x17db19=Infinity){const _0x419f52=this;return new _0x1fa0bb(()=>{const _0x1bb92b=_0x419f52[Symbol['iterator']]();let _0x560d73=0x0;return{'next'(){const _0x117920=_0x4c6d;for(;;){const _0x263d5c=_0x1bb92b['next']();if(_0x263d5c[_0x117920(0xdd)])return{'done':!![],'value':undefined};const _0x3af381=_0x560d73++;if(_0x3af381<_0x4577ca)continue;if(_0x3af381>=_0x17db19)return _0x1bb92b[_0x117920(0x1d8)]?.(),{'done':!![],'value':undefined};return _0x263d5c;}},'return'(){return _0x1bb92b['return']?.(),{'done':!![],'value':undefined};},[Symbol['iterator']](){return this;}};});}['at'](_0x3052e3){let _0x446315=0x0;for(const _0x4116fe of this)if(_0x446315++===_0x3052e3)return _0x4116fe;return undefined;}[_0x42bee2(0x131)](_0x5bc8a8){const _0x2bc1ff=this;return new _0x1fa0bb(()=>{const _0x3475d0=_0x4c6d,_0x1ddd94=_0x2bc1ff[Symbol[_0x3475d0(0x18f)]]();let _0x3a9bfa=[];return{'next'(){const _0x168987=_0x3475d0;for(;;){if(_0x3a9bfa[_0x168987(0xdf)])return{'done':![],'value':_0x3a9bfa[_0x168987(0x14f)]()};const _0x348cd9=_0x1ddd94[_0x168987(0x20b)]();if(_0x348cd9[_0x168987(0xdd)])return{'done':!![],'value':undefined};const _0x558a6b=_0x5bc8a8(_0x348cd9[_0x168987(0xec)]);if(Array[_0x168987(0x164)](_0x558a6b))_0x3a9bfa=_0x3a9bfa['concat'](_0x558a6b);else{if(_0x558a6b!=null&&(_0x558a6b instanceof _0x1fa0bb||typeof _0x558a6b[Symbol[_0x168987(0x18f)]]==='function'&&'asArray'in _0x558a6b))_0x3a9bfa=_0x3a9bfa[_0x168987(0x136)](Array['from'](_0x558a6b));else{if(_0x558a6b!==_0x4cbcef[_0x168987(0x197)])return{'done':![],'value':_0x558a6b};}}}},'return'(){const _0x3d5b03=_0x3475d0;return _0x1ddd94[_0x3d5b03(0x1d8)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x3475d0(0x18f)]](){return this;}};});}[_0x42bee2(0x136)](_0x3c16ac){const _0x3d90ba=this;return new _0x1fa0bb(()=>{const _0x427928=_0x4c6d;let _0x24d749=_0x3d90ba[Symbol[_0x427928(0x18f)]](),_0x3e90e0=![];return{'next'(){const _0x1c64f4=_0x427928;for(;;){const _0x5e0806=_0x24d749[_0x1c64f4(0x20b)]();if(!_0x5e0806[_0x1c64f4(0xdd)])return _0x5e0806;if(_0x3e90e0)return{'done':!![],'value':undefined};_0x3e90e0=!![],_0x24d749=_0x3c16ac[Symbol[_0x1c64f4(0x18f)]]();}},'return'(){return _0x24d749['return']?.(),{'done':!![],'value':undefined};},[Symbol[_0x427928(0x18f)]](){return this;}};});}['mapError'](_0x33b2a1){const _0xbb9e9a=this;return new _0x1fa0bb(()=>{const _0x4434d8=_0x4c6d,_0x1d6f28=_0xbb9e9a[Symbol[_0x4434d8(0x18f)]]();return{'next'(){const _0x500ce3=_0x4434d8;for(;;){try{return _0x1d6f28[_0x500ce3(0x20b)]();}catch(_0x52d3e7){const _0x45547f=_0x33b2a1(_0x52d3e7);if(_0x45547f===_0x4cbcef[_0x500ce3(0x197)]||_0x45547f===undefined)continue;return{'done':![],'value':_0x45547f};}}},'return'(){const _0x212938=_0x4434d8;return _0x1d6f28[_0x212938(0x1d8)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x4434d8(0x18f)]](){return this;}};});}['toJSON'](){const _0x3b1494=_0x42bee2;return Array[_0x3b1494(0x1c4)](this);}get[_0x42bee2(0x217)](){const _0x563e90=_0x42bee2;return Array[_0x563e90(0x1c4)](this);}}const _0x319588={'total':0x0,'byLabel':{},'last':null};function _0x6b9532(_0x19f233){const _0x4f76d7=_0x42bee2;_0x319588[_0x4f76d7(0x152)]++;if(_0x19f233)_0x319588[_0x4f76d7(0x135)][_0x19f233]=(_0x319588[_0x4f76d7(0x135)][_0x19f233]??0x0)+0x1;_0x319588[_0x4f76d7(0x150)]={'label':_0x19f233??null,'at':Date[_0x4f76d7(0x142)]()};}function _0x184755(){const _0x9af9dc=_0x42bee2;return{'total':_0x319588[_0x9af9dc(0x152)],'byLabel':{..._0x319588[_0x9af9dc(0x135)]},'last':_0x319588['last']};}function _0x47b343(_0x1885e4,_0x14f7ff={}){const {getTxnId:_0x4b8546,resume:_0x3e8f31,label:_0x387679,baseline:_0x29b4c0}=_0x14f7ff;return new _0x1fa0bb(()=>{let _0x31b79d=null,_0x2c1028=![],_0x15f2ef=![],_0xe96fc2=![],_0x37fda3,_0x53b96a=0x0,_0x3782ef;return{'next'(){const _0x2fd9d4=_0x4c6d;if(_0xe96fc2)return{'done':!![],'value':undefined};if(_0x15f2ef){let _0x1ab065=![];if(_0x3e8f31&&_0x4b8546)try{_0x1ab065=_0x4b8546()===_0x3782ef;}catch{}if(!_0x1ab065){_0xe96fc2=!![],_0x6b9532(_0x387679);throw new _0x3642ff(_0x3e8f31?'pinned\x20range\x20iterator\x20parked\x20across\x20an\x20await/turn\x20boundary\x20and\x20the\x20env\x20was\x20written\x20'+_0x2fd9d4(0x218)+_0x2fd9d4(0x129):'pinned\x20range\x20iterator\x20held\x20across\x20an\x20await/turn\x20boundary.\x20This\x20surface\x20cannot\x20resume\x20'+_0x2fd9d4(0x14a)+_0x2fd9d4(0x23a),'READER_HELD_ACROSS_AWAIT');}_0x31b79d=_0x3e8f31(_0x37fda3,_0x53b96a)[Symbol[_0x2fd9d4(0x18f)]](),_0x15f2ef=![];}if(!_0x31b79d){if(_0x29b4c0!==undefined)_0x3782ef=_0x29b4c0;else try{_0x3782ef=_0x4b8546?_0x4b8546():undefined;}catch{_0x3782ef=undefined;}try{_0x31b79d=_0x1885e4()[Symbol['iterator']]();}catch(_0x277263){_0xe96fc2=!![];throw _0x277263;}}!_0x2c1028&&(_0x2c1028=!![],queueMicrotask(()=>{const _0x1e3baa=_0x2fd9d4;_0x2c1028=![];if(_0xe96fc2||_0x15f2ef)return;try{_0x31b79d?.[_0x1e3baa(0x1d8)]?.();}catch{}_0x31b79d=null,_0x15f2ef=!![];}));const _0x1b3164=_0x31b79d[_0x2fd9d4(0x20b)]();if(_0x1b3164[_0x2fd9d4(0xdd)])return _0xe96fc2=!![],{'done':!![],'value':undefined};return _0x37fda3=_0x1b3164[_0x2fd9d4(0xec)],_0x53b96a++,_0x1b3164;},'return'(){_0xe96fc2=!![];try{_0x31b79d?.['return']?.();}catch{}return{'done':!![],'value':undefined};},[Symbol['iterator']](){return this;}};});}return okdbGuardedRange={'guardSnapshotIterable':_0x47b343,'OKDBGuardedRange':_0x1fa0bb,'recordGuardTrip':_0x6b9532,'getGuardTripStats':_0x184755},okdbGuardedRange;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3291e4=_0x318de2;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x352acc,performance:_0x1513e4}=require$$0$2,_0x198e45=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3291e4(0x163),_0x49744e=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4afb22=process.env.OKDB_LOOP_LAG_ALL==='1',_0x30fe3a=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x577159{constructor(){const _0x4b954f=_0x3291e4;this['enabled']=_0x198e45,this[_0x4b954f(0xea)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x4b954f(0x124)]=![],this[_0x4b954f(0x170)]=(_0x529ff2,_0x6e2ea3)=>process['stderr']['write'](_0x529ff2+(_0x6e2ea3?'\x20'+JSON[_0x4b954f(0x1e0)](_0x6e2ea3):'')+'\x0a');}[_0x3291e4(0x142)](){const _0x3ac580=_0x3291e4;return _0x1513e4[_0x3ac580(0x142)]();}['setLogger'](_0x737234){if(typeof _0x737234==='function')this['_log']=_0x737234;}[_0x3291e4(0x162)](_0x1586fd,_0x4cdcc4,_0x34c2aa){const _0x597df7=_0x3291e4;if(!this[_0x597df7(0x116)])return;let _0x3ff4eb=this[_0x597df7(0xea)][_0x597df7(0x20c)](_0x1586fd);!_0x3ff4eb&&(_0x3ff4eb={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x597df7(0xea)][_0x597df7(0xe1)](_0x1586fd,_0x3ff4eb)),_0x3ff4eb['ms']+=_0x4cdcc4,_0x3ff4eb['count']+=0x1,_0x4cdcc4>_0x3ff4eb[_0x597df7(0xd3)]&&(_0x3ff4eb[_0x597df7(0xd3)]=_0x4cdcc4,_0x3ff4eb['maxExtra']=_0x34c2aa||'');}[_0x3291e4(0x1df)](_0x450110){const _0x175746=_0x3291e4;if(!this[_0x175746(0x116)]||this[_0x175746(0x124)])return;this[_0x175746(0x124)]=!![];if(_0x450110)this['_log']=_0x450110;this['_h']=_0x352acc({'resolution':0xa}),this['_h'][_0x175746(0x19d)](),this['_timer']=setInterval(()=>this['_report'](),_0x49744e);if(this[_0x175746(0x1d4)][_0x175746(0x159)])this[_0x175746(0x1d4)][_0x175746(0x159)]();}[_0x3291e4(0xd5)](_0x50059a){const _0x15999b=_0x3291e4;if(!this[_0x15999b(0xfb)])this[_0x15999b(0xfb)]=new Set();this[_0x15999b(0xfb)][_0x15999b(0x1f4)](_0x50059a);if(!this[_0x15999b(0x124)])this[_0x15999b(0x1c6)]();}[_0x3291e4(0x155)](_0x24b885){const _0x1cda7e=_0x3291e4;this[_0x1cda7e(0xfb)]?.[_0x1cda7e(0x1d7)](_0x24b885);}['_startAdmission'](){const _0x52feca=_0x3291e4;if(this[_0x52feca(0xc2)])return;this[_0x52feca(0xc2)]=!![];!this['_h']&&(this['_h']=_0x352acc({'resolution':0xa}),this['_h'][_0x52feca(0x19d)]());const _0x3db64d=_0x49744e;this[_0x52feca(0x1d3)]=setInterval(()=>{const _0x494d5e=_0x52feca,_0x52eaf8=this['_h'];if(!_0x52eaf8)return;const _0x3cdac4=_0x52eaf8[_0x494d5e(0x1f9)](0x63)/0xf4240,_0x161e35=_0x52eaf8[_0x494d5e(0x181)]/0xf4240,_0x39191a=_0x52eaf8['mean']/0xf4240;_0x52eaf8['reset']();if(this[_0x494d5e(0xfb)])for(const _0x28945a of this[_0x494d5e(0xfb)]){try{_0x28945a({'p99Ms':_0x3cdac4,'maxMs':_0x161e35,'meanMs':_0x39191a,'reportMs':_0x3db64d});}catch{}}},_0x3db64d);if(this[_0x52feca(0x1d3)]['unref'])this['_admissionTimer'][_0x52feca(0x159)]();}[_0x3291e4(0x141)](){const _0x3eb397=_0x3291e4,_0x38d54a=this['_h'],_0x1b59fe=_0x38d54a[_0x3eb397(0x181)]/0xf4240,_0x2f1faa=_0x38d54a['percentile'](0x63)/0xf4240,_0x4e87a2=_0x38d54a[_0x3eb397(0x120)]/0xf4240;_0x38d54a['reset']();const _0x543541=[...this['_buckets']['entries']()]['map'](([_0x3af0b2,_0x59ab1a])=>({'label':_0x3af0b2,..._0x59ab1a}))['sort']((_0x2520a2,_0x5e8afb)=>_0x5e8afb['ms']-_0x2520a2['ms'])[_0x3eb397(0x1a0)](0x0,0x8);this[_0x3eb397(0xea)][_0x3eb397(0xbe)]();const _0x38f4a2=_0x543541['reduce']((_0x26710d,_0x2b1a8e)=>_0x26710d+_0x2b1a8e['ms'],0x0),_0x4c0287=_0x543541['map'](_0x2f3b52=>_0x2f3b52['label']+'='+_0x2f3b52['ms'][_0x3eb397(0x1ef)](0x0)+_0x3eb397(0x10e)+_0x2f3b52[_0x3eb397(0x130)]+(_0x2f3b52[_0x3eb397(0xd3)]>0x5?_0x3eb397(0xc0)+_0x2f3b52[_0x3eb397(0xd3)][_0x3eb397(0x1ef)](0x0)+'ms'+(_0x2f3b52[_0x3eb397(0x180)]?'\x20'+_0x2f3b52[_0x3eb397(0x180)]:'')+')':''));(_0x4afb22||_0x1b59fe>=_0x30fe3a)&&this[_0x3eb397(0x170)](_0x3eb397(0x196)+_0x49744e+'ms\x20max='+_0x1b59fe[_0x3eb397(0x1ef)](0x0)+_0x3eb397(0x114)+_0x2f1faa[_0x3eb397(0x1ef)](0x0)+'ms\x20mean='+_0x4e87a2[_0x3eb397(0x1ef)](0x0)+_0x3eb397(0x110)+_0x38f4a2[_0x3eb397(0x1ef)](0x0)+'ms'+(_0x4c0287[_0x3eb397(0xdf)]?'\x20│\x20'+_0x4c0287[_0x3eb397(0x23e)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x3eb397(0xfb)])for(const _0x1de070 of this[_0x3eb397(0xfb)]){try{_0x1de070({'p99Ms':_0x2f1faa,'maxMs':_0x1b59fe,'meanMs':_0x4e87a2,'reportMs':_0x49744e});}catch{}}}[_0x3291e4(0xe5)](){const _0x5b9e08=_0x3291e4;if(this['_timer'])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x5b9e08(0x1e5)]();this[_0x5b9e08(0x1d4)]=null,this['_h']=null,this[_0x5b9e08(0x124)]=![];}}const _0x498857=new _0x577159();if(_0x498857['enabled'])_0x498857[_0x3291e4(0x1df)]();return okdbLoopMonitor={'LOOP':_0x498857},okdbLoopMonitor;}var okdbTransaction,hasRequiredOkdbTransaction;function requireOkdbTransaction(){const _0x2b08db=_0x318de2;if(hasRequiredOkdbTransaction)return okdbTransaction;hasRequiredOkdbTransaction=0x1;const _0x1b5781=require$$0$3,{EVENTS:_0x7fa1ac}=requireOkdbEnums(),{OKDBError:_0x2d2371}=requireOkdbError(),{recordGuardTrip:_0x2b3568,guardSnapshotIterable:_0x4752d3}=requireOkdbGuardedRange(),{LOOP:_0x1790f7}=requireOkdbLoopMonitor();function _0x38c289(_0x2bc424){return _0x2bc424['map'](_0x13dcf3=>{const _0x53a329=_0x4c6d,[_0x753ee3,_0x491b29]=_0x13dcf3[_0x53a329(0x1fb)]||[];return{'action':_0x13dcf3[_0x53a329(0xc1)],'type':_0x753ee3,'key':_0x491b29};});}class _0x3885cb{['okdb'];['actions']=[];[_0x2b08db(0x100)]=[];['_undoHooks']=[];constructor(_0x51b746,_0x1b8992={'useReadTransaction':![]}){const _0x3df870=_0x2b08db;this['okdb']=_0x51b746,this['options']=_0x1b8992,this['id']=_0x1b5781['v4']();if(this[_0x3df870(0x11f)][_0x3df870(0xe2)])try{this[_0x3df870(0xee)]=this['okdb']['db'][_0x3df870(0x177)]()[_0x3df870(0x21c)];}catch{this['_txnIdAtSnapshot']=undefined;}this[_0x3df870(0x20e)]=this[_0x3df870(0x11f)][_0x3df870(0xe2)]?this['okdb']['db']['useReadTransaction']():null,this[_0x3df870(0x1d6)]=![],this[_0x3df870(0x148)]=![],this[_0x3df870(0x20e)]&&queueMicrotask(()=>{const _0x450892=_0x3df870;this['readTransaction']&&(this[_0x450892(0x227)](),this[_0x450892(0x148)]=!![]);});}[_0x2b08db(0x17f)](_0xa947b7){const _0x1f63e4=_0x2b08db;this[_0x1f63e4(0x100)]['push'](_0xa947b7);}[_0x2b08db(0x1aa)](_0x3bbbdd){const _0x502aa9=_0x2b08db;this[_0x502aa9(0xbf)]['push'](_0x3bbbdd);}['_closeReadTransaction'](){const _0x46e18f=_0x2b08db;if(!this[_0x46e18f(0x20e)])return;try{this[_0x46e18f(0x20e)][_0x46e18f(0xdd)]();}catch(_0x5d25fa){}this[_0x46e18f(0x20e)]=null;}[_0x2b08db(0x121)](){const _0x7d41bf=_0x2b08db;if(this['_closed'])throw new _0x2d2371('Transaction\x20already\x20closed',_0x7d41bf(0x161));if(this['_readViewExpired']){let _0x2a03a4=![];if(this['options']['useReadTransaction']===_0x7d41bf(0x1e4)&&this[_0x7d41bf(0xee)]!==undefined)try{_0x2a03a4=this[_0x7d41bf(0x12c)]['db'][_0x7d41bf(0x177)]()[_0x7d41bf(0x21c)]===this[_0x7d41bf(0xee)];}catch{}if(!_0x2a03a4){_0x2b3568((this[_0x7d41bf(0x12c)]?.['name']??'?')+_0x7d41bf(0x22d));throw new _0x2d2371(_0x7d41bf(0x15f)+'boundary\x20(a\x20pinned\x20read\x20txn\x20blocks\x20LMDB\x20free-page\x20reuse).\x20Do\x20all\x20consistent\x20reads\x20'+_0x7d41bf(0x18c)+_0x7d41bf(0x126),_0x7d41bf(0x239));}}}[_0x2b08db(0x20c)](_0x17a43e,_0x32da70){const _0x1deeb3=_0x2b08db;return this['_assertOpen'](),this[_0x1deeb3(0x12c)][_0x1deeb3(0x20c)](_0x17a43e,_0x32da70,{'transaction':this[_0x1deeb3(0x20e)]});}[_0x2b08db(0x15c)](_0x4a4350,_0x4a4c8d){const _0x4831cc=_0x2b08db;return this['_assertOpen'](),this[_0x4831cc(0x12c)][_0x4831cc(0x15c)](_0x4a4350,_0x4a4c8d,{'transaction':this[_0x4831cc(0x20e)]});}[_0x2b08db(0x1e6)](_0x50b7d8,_0x4067e3){const _0x1d76a1=_0x2b08db;return this[_0x1d76a1(0x121)](),this[_0x1d76a1(0x12c)][_0x1d76a1(0x1e6)](_0x50b7d8,_0x4067e3,{'transaction':this['readTransaction']});}[_0x2b08db(0x198)](_0x5094ae){const _0xe8edcd=_0x2b08db;if(!this[_0xe8edcd(0x11f)][_0xe8edcd(0xe2)])return _0x5094ae;if(_0x5094ae&&typeof _0x5094ae[_0xe8edcd(0x178)]===_0xe8edcd(0x233))return _0x5094ae;if(Array[_0xe8edcd(0x164)](_0x5094ae))return _0x5094ae;const _0x572960=this,_0x540ba3=_0x572960[_0xe8edcd(0x11f)][_0xe8edcd(0xe2)]===_0xe8edcd(0x1e4),_0x6bbb0f=()=>{const _0x24ca18=_0xe8edcd;if(!_0x572960['_readViewExpired'])return![];if(!_0x540ba3)return!![];if(_0x572960[_0x24ca18(0xee)]===undefined)return!![];try{return _0x572960[_0x24ca18(0x12c)]['db']['getStats']()[_0x24ca18(0x21c)]!==_0x572960[_0x24ca18(0xee)];}catch{return!![];}};return _0x4752d3(()=>{const _0x358eeb=_0xe8edcd;if(_0x572960[_0x358eeb(0x1d6)])throw new _0x2d2371(_0x358eeb(0x112),_0x358eeb(0x161));if(_0x6bbb0f()){_0x2b3568((_0x572960['okdb']?.[_0x358eeb(0x238)]??'?')+':txnRange');throw new _0x2d2371('useReadTransaction\x20range\x20consumed\x20after\x20the\x20creation\x20turn\x20—\x20the\x20consistent\x20view\x20was\x20'+_0x358eeb(0x173)+_0x358eeb(0x111),'READER_HELD_ACROSS_AWAIT');}return _0x5094ae;},{'label':(_0x572960['okdb']?.['name']??'?')+_0xe8edcd(0x15a),..._0x540ba3?{'baseline':_0x572960[_0xe8edcd(0xee)],'getTxnId':()=>_0x572960[_0xe8edcd(0x12c)]['db']['getStats']()['lastTxnId'],'resume':(_0x53394d,_0x524664)=>_0x5094ae[_0xe8edcd(0x1a0)](_0x524664)}:{}});}['getRange'](_0x2e01c2,_0x2f716e={}){const _0x245c2f=_0x2b08db;return this['_assertOpen'](),this[_0x245c2f(0x198)](this[_0x245c2f(0x12c)][_0x245c2f(0x16b)](_0x2e01c2,{'transaction':this[_0x245c2f(0x20e)],..._0x2f716e}));}[_0x2b08db(0xcc)](_0x361083,_0x11351e={}){const _0x480748=_0x2b08db;return this[_0x480748(0x121)](),this[_0x480748(0x198)](this[_0x480748(0x12c)][_0x480748(0xcc)](_0x361083,{'transaction':this[_0x480748(0x20e)],..._0x11351e}));}[_0x2b08db(0x213)](_0x2eb8e6,_0x5bd5c6={}){const _0x569c6b=_0x2b08db;return this[_0x569c6b(0x121)](),this['_range'](this[_0x569c6b(0x12c)][_0x569c6b(0x213)](_0x2eb8e6,{'transaction':this[_0x569c6b(0x20e)],..._0x5bd5c6}));}[_0x2b08db(0xc8)](_0x2acf56,_0x2aecbd,_0x5e0e52={}){const _0x125c4c=_0x2b08db;return this['_assertOpen'](),this[_0x125c4c(0x198)](this[_0x125c4c(0x12c)][_0x125c4c(0xc8)](_0x2acf56,_0x2aecbd,{'transaction':this[_0x125c4c(0x20e)],..._0x5e0e52}));}[_0x2b08db(0x1fd)](_0x184f7d,_0x1b9b87,_0x5af1b2={}){const _0x2b9bb2=_0x2b08db;return this[_0x2b9bb2(0x121)](),this['_range'](this[_0x2b9bb2(0x12c)][_0x2b9bb2(0x1fd)](_0x184f7d,_0x1b9b87,{'transaction':this[_0x2b9bb2(0x20e)],..._0x5af1b2}));}[_0x2b08db(0x21d)](_0x21f7bb=null){const _0x20c8df=_0x2b08db;return this[_0x20c8df(0x121)](),this[_0x20c8df(0x12c)]['getClock'](_0x21f7bb,{'transaction':this[_0x20c8df(0x20e)]});}[_0x2b08db(0xeb)](_0xf3288c){const _0x26fcb7=_0x2b08db;return this[_0x26fcb7(0x121)](),this[_0x26fcb7(0x12c)][_0x26fcb7(0xeb)](_0xf3288c,{'transaction':this[_0x26fcb7(0x20e)]});}[_0x2b08db(0x13e)](_0x5ed333,_0x5cb06a,_0x37cb7c,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x2b08db(0x142)](),origin:origin=null,ttl:ttl=null}={}){const _0x3b11ed=_0x2b08db;this[_0x3b11ed(0x137)][_0x3b11ed(0xfa)]({'action':'put','args':[_0x5ed333,_0x5cb06a,_0x37cb7c,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x2b08db(0x1bf)](_0xb8e36a,_0x4d6165,_0x340087,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x2b08db(0x142)](),origin:origin=null,ttl:ttl=null}={}){const _0xa8803b=_0x2b08db;this[_0xa8803b(0x137)][_0xa8803b(0xfa)]({'action':'update','args':[_0xb8e36a,_0x4d6165,_0x340087,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}['patch'](_0x3a51ad,_0x3be4d1,_0x466e4c,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x2b08db(0x142)](),origin:origin=null,ttl:ttl=null}={}){const _0x44a585=_0x2b08db;this[_0x44a585(0x137)][_0x44a585(0xfa)]({'action':_0x44a585(0x171),'args':[_0x3a51ad,_0x3be4d1,_0x466e4c,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x2b08db(0x1e7)](_0x307b7e,_0x5d246f,_0x58f5fa,{version:version=null,timestamp:timestamp=Date[_0x2b08db(0x142)](),origin:origin=null,ttl:ttl=null}={}){const _0x30aa9b=_0x2b08db;this[_0x30aa9b(0x137)][_0x30aa9b(0xfa)]({'action':'create','args':[_0x307b7e,_0x5d246f,_0x58f5fa,{'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}['remove'](_0x8f4d71,_0x562139,{ifVersion:ifVersion=null,timestamp:timestamp=Date['now'](),origin:origin=null}={}){const _0x3ba61b=_0x2b08db;this['actions'][_0x3ba61b(0xfa)]({'action':_0x3ba61b(0x19c),'args':[_0x8f4d71,_0x562139,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin}]});}[_0x2b08db(0x1f5)](_0x2310c1,_0x539f22,_0x203c2b){const _0x17b748=_0x2b08db;this[_0x17b748(0x137)][_0x17b748(0xfa)]({'action':'setTTL','args':[_0x2310c1,_0x539f22,_0x203c2b]});}['clearTTL'](_0x2dbf5e,_0x2b83ee){const _0x120ee2=_0x2b08db;this['actions'][_0x120ee2(0xfa)]({'action':'clearTTL','args':[_0x2dbf5e,_0x2b83ee]});}[_0x2b08db(0x1cb)](){const _0x44b693=_0x2b08db;if(this[_0x44b693(0x1d6)])return;for(const _0x56fd77 of this[_0x44b693(0xbf)]){try{_0x56fd77();}catch{}}this[_0x44b693(0x12c)][_0x44b693(0x1a5)][_0x44b693(0x237)](_0x7fa1ac[_0x44b693(0x1dc)],{'id':this['id']}),this[_0x44b693(0x137)]=[],this['_closeReadTransaction'](),this[_0x44b693(0x1d6)]=!![];}async[_0x2b08db(0x1c7)](){const _0x254b9a=_0x2b08db;if(this['_closed'])throw new Error(_0x254b9a(0x112));const _0x29c17e={'id':this['id'],'timestamp':Date['now'](),'actions':this['actions']};this[_0x254b9a(0x12c)]['events'][_0x254b9a(0x237)](_0x7fa1ac[_0x254b9a(0xe3)],_0x29c17e);try{const _0x308cd3=_0x1790f7[_0x254b9a(0x116)]?_0x1790f7[_0x254b9a(0x142)]():0x0;await this['okdb'][_0x254b9a(0x1db)][_0x254b9a(0x1b8)](()=>{const _0x184a2c=_0x254b9a;for(const _0x4ce5bf of this['actions']){const _0xbf65a3=this[_0x184a2c(0x12c)]['_'+_0x4ce5bf[_0x184a2c(0xc1)]];if(typeof _0xbf65a3!==_0x184a2c(0x233))throw new Error(_0x184a2c(0x14e)+_0x4ce5bf[_0x184a2c(0xc1)]);_0xbf65a3[_0x184a2c(0x1ea)](this[_0x184a2c(0x12c)],this,..._0x4ce5bf[_0x184a2c(0x1fb)]);}}),_0x1790f7['enabled']&&_0x1790f7[_0x254b9a(0x162)](_0x254b9a(0xe6),_0x1790f7[_0x254b9a(0x142)]()-_0x308cd3,(this[_0x254b9a(0x12c)][_0x254b9a(0x238)]??'?')+'\x20actions='+this[_0x254b9a(0x137)][_0x254b9a(0xdf)]);}catch(_0x479123){for(const _0x211897 of this[_0x254b9a(0xbf)]){try{_0x211897();}catch{}}this[_0x254b9a(0x227)](),this[_0x254b9a(0x1d6)]=!![];if(_0x479123 instanceof _0x2d2371)throw _0x479123;const _0x3426ea={'cause':_0x479123,'env':this['okdb']?.[_0x254b9a(0x238)],'envPath':this['okdb']?.[_0x254b9a(0x21f)],'pid':process[_0x254b9a(0x1e9)],'txnId':this['id'],'actionCount':this[_0x254b9a(0x137)][_0x254b9a(0xdf)],'actions':_0x38c289(this[_0x254b9a(0x137)]),'nativeCode':_0x479123?.[_0x254b9a(0x146)],'nativeName':_0x479123?.[_0x254b9a(0x238)]};try{this['okdb']?.['log']?.[_0x254b9a(0x1ba)]?.(_0x254b9a(0x123),{'env':_0x3426ea[_0x254b9a(0x113)],'envPath':_0x3426ea[_0x254b9a(0x191)],'pid':_0x3426ea[_0x254b9a(0x1e9)],'txnId':_0x3426ea[_0x254b9a(0x1a9)],'actionCount':_0x3426ea[_0x254b9a(0x1f2)],'actions':_0x3426ea[_0x254b9a(0x137)],'nativeCode':_0x3426ea[_0x254b9a(0x167)],'error':_0x479123?.[_0x254b9a(0x147)],'stack':_0x479123?.[_0x254b9a(0x172)]});}catch{}throw new _0x2d2371(_0x479123?.[_0x254b9a(0x147)]||'Unknown\x20OKDB\x20transaction\x20error','TXN_ERROR',_0x3426ea);}this[_0x254b9a(0x12c)]['events'][_0x254b9a(0x237)](_0x7fa1ac[_0x254b9a(0xd8)],_0x29c17e);for(const _0x4b2f63 of this[_0x254b9a(0x100)]){try{await _0x4b2f63();}catch{}}this['actions']=[],this[_0x254b9a(0x227)](),this['_closed']=!![];}static[_0x2b08db(0xf6)](_0x1a435f){const _0x1c03f2=_0x2b08db;return Object[_0x1c03f2(0xbb)]({'id':_0x1a435f['id'],'put':_0x1a435f['put']['bind'](_0x1a435f),'update':_0x1a435f[_0x1c03f2(0x1bf)][_0x1c03f2(0x215)](_0x1a435f),'patch':_0x1a435f['patch'][_0x1c03f2(0x215)](_0x1a435f),'create':_0x1a435f[_0x1c03f2(0x1e7)][_0x1c03f2(0x215)](_0x1a435f),'remove':_0x1a435f[_0x1c03f2(0x19c)][_0x1c03f2(0x215)](_0x1a435f),'setTTL':_0x1a435f[_0x1c03f2(0x1f5)][_0x1c03f2(0x215)](_0x1a435f),'clearTTL':_0x1a435f[_0x1c03f2(0x11c)][_0x1c03f2(0x215)](_0x1a435f),'commit':_0x1a435f[_0x1c03f2(0x1c7)][_0x1c03f2(0x215)](_0x1a435f),'rollback':_0x1a435f[_0x1c03f2(0x1cb)][_0x1c03f2(0x215)](_0x1a435f),'get':_0x1a435f[_0x1c03f2(0x20c)][_0x1c03f2(0x215)](_0x1a435f),'getEntry':_0x1a435f[_0x1c03f2(0x15c)][_0x1c03f2(0x215)](_0x1a435f),'getMany':_0x1a435f['getMany'][_0x1c03f2(0x215)](_0x1a435f),'getRange':_0x1a435f[_0x1c03f2(0x16b)][_0x1c03f2(0x215)](_0x1a435f),'getValues':_0x1a435f[_0x1c03f2(0xcc)]['bind'](_0x1a435f),'getKeys':_0x1a435f[_0x1c03f2(0x213)]['bind'](_0x1a435f),'byIndex':_0x1a435f[_0x1c03f2(0xc8)][_0x1c03f2(0x215)](_0x1a435f),'query':_0x1a435f[_0x1c03f2(0x1fd)][_0x1c03f2(0x215)](_0x1a435f),'getClock':_0x1a435f[_0x1c03f2(0x21d)][_0x1c03f2(0x215)](_0x1a435f),'getCount':_0x1a435f[_0x1c03f2(0xeb)][_0x1c03f2(0x215)](_0x1a435f),'read':_0x1a435f,'raw':_0x1a435f});}static[_0x2b08db(0x18d)](_0x4a9cde,_0x5ee762=[]){const _0x50899b=_0x2b08db;if(!Array[_0x50899b(0x164)](_0x5ee762))throw new _0x2d2371('txn\x20ops\x20must\x20be\x20an\x20array','TXN_INVALID_OPS');for(const _0x3d940b of _0x5ee762){if(Array[_0x50899b(0x164)](_0x3d940b)){const [_0x5c9e9c,..._0x1119bd]=_0x3d940b;if(typeof _0x4a9cde[_0x5c9e9c]!==_0x50899b(0x233))throw new _0x2d2371(_0x50899b(0x14e)+_0x5c9e9c,_0x50899b(0xcb),{'action':_0x5c9e9c});_0x4a9cde[_0x5c9e9c](..._0x1119bd);continue;}if(!_0x3d940b||typeof _0x3d940b!==_0x50899b(0x1c2))throw new _0x2d2371(_0x50899b(0x122),_0x50899b(0x226));const {action:_0x928efd}=_0x3d940b;if(typeof _0x928efd!=='string'||typeof _0x4a9cde[_0x928efd]!=='function')throw new _0x2d2371(_0x50899b(0x14e)+_0x928efd,'TXN_INVALID_ACTION',{'action':_0x928efd});switch(_0x928efd){case _0x50899b(0x13e):case _0x50899b(0x1bf):case _0x50899b(0x1e7):_0x4a9cde[_0x928efd](_0x3d940b[_0x50899b(0xce)],_0x3d940b[_0x50899b(0x115)],_0x3d940b[_0x50899b(0xec)],{..._0x3d940b[_0x50899b(0x11f)],'ttl':_0x3d940b[_0x50899b(0x200)]??_0x3d940b[_0x50899b(0x11f)]?.[_0x50899b(0x200)]??null});break;case _0x50899b(0x171):_0x4a9cde[_0x50899b(0x171)](_0x3d940b[_0x50899b(0xce)],_0x3d940b['key'],_0x3d940b[_0x50899b(0x171)],{..._0x3d940b['options'],'ttl':_0x3d940b['ttl']??_0x3d940b[_0x50899b(0x11f)]?.[_0x50899b(0x200)]??null});break;case _0x50899b(0x19c):_0x4a9cde[_0x50899b(0x19c)](_0x3d940b[_0x50899b(0xce)],_0x3d940b['key'],_0x3d940b['options']||{});break;case'setTTL':_0x4a9cde[_0x50899b(0x1f5)](_0x3d940b[_0x50899b(0xce)],_0x3d940b['key'],_0x3d940b[_0x50899b(0x200)]);break;case _0x50899b(0x11c):_0x4a9cde['clearTTL'](_0x3d940b[_0x50899b(0xce)],_0x3d940b[_0x50899b(0x115)]);break;default:throw new _0x2d2371(_0x50899b(0x12f)+_0x928efd,_0x50899b(0xcb),{'action':_0x928efd});}}}static async['run'](_0x1a0957,_0x51d866,_0x3017f7={}){const _0xc5577a=_0x2b08db,_0x142539=new _0x3885cb(_0x1a0957,_0x3017f7),_0x583443=_0x3885cb[_0xc5577a(0xf6)](_0x142539);try{typeof _0x51d866===_0xc5577a(0x233)?await _0x51d866(_0x583443):_0x3885cb['applyOps'](_0x142539,_0x51d866||[]);const _0x88546e=_0x142539[_0xc5577a(0x137)]['length'];return await _0x142539[_0xc5577a(0x1c7)](),{'id':_0x142539['id'],'actions':_0x88546e};}catch(_0x3868c5){try{_0x142539[_0xc5577a(0x1cb)]();}catch(_0x26df3f){}throw _0x3868c5;}}}return okdbTransaction=_0x3885cb,okdbTransaction;}var okdbFunctionsFacades,hasRequiredOkdbFunctionsFacades;function requireOkdbFunctionsFacades(){if(hasRequiredOkdbFunctionsFacades)return okdbFunctionsFacades;hasRequiredOkdbFunctionsFacades=0x1;const _0x5370f9=requireOkdbTransaction();function _0x4312c0(_0x2b7c7b){const _0x405c74=_0x4c6d;return{'transaction':typeof _0x2b7c7b[_0x405c74(0x1b8)]===_0x405c74(0x233)?_0x2b7c7b['transaction'][_0x405c74(0x215)](_0x2b7c7b):_0x27f51a=>new _0x5370f9(_0x2b7c7b,_0x27f51a),'txn':typeof _0x2b7c7b[_0x405c74(0x1a2)]===_0x405c74(0x233)?_0x2b7c7b['txn'][_0x405c74(0x215)](_0x2b7c7b):(_0x43b555,_0x2c717f)=>_0x5370f9[_0x405c74(0xcf)](_0x2b7c7b,_0x43b555,_0x2c717f)};}function _0x227427(_0x31a8df){const _0x58711c=_0x4c6d;return{'name':_0x31a8df[_0x58711c(0x238)],..._0x4312c0(_0x31a8df),'put':_0x31a8df['put'][_0x58711c(0x215)](_0x31a8df),'update':_0x31a8df[_0x58711c(0x1bf)]['bind'](_0x31a8df),'patch':_0x31a8df[_0x58711c(0x171)][_0x58711c(0x215)](_0x31a8df),'create':_0x31a8df['create'][_0x58711c(0x215)](_0x31a8df),'remove':_0x31a8df[_0x58711c(0x19c)]['bind'](_0x31a8df),'get':_0x31a8df[_0x58711c(0x20c)][_0x58711c(0x215)](_0x31a8df),'getMany':_0x31a8df[_0x58711c(0x1e6)][_0x58711c(0x215)](_0x31a8df),'getEntry':_0x31a8df['getEntry']['bind'](_0x31a8df),'getRange':_0x31a8df[_0x58711c(0x16b)]['bind'](_0x31a8df),'getValues':_0x31a8df[_0x58711c(0xcc)]['bind'](_0x31a8df),'getKeys':_0x31a8df[_0x58711c(0x213)][_0x58711c(0x215)](_0x31a8df),'getCount':_0x31a8df[_0x58711c(0xeb)][_0x58711c(0x215)](_0x31a8df),'getByPrefix':_0x31a8df[_0x58711c(0xf9)]['bind'](_0x31a8df),'getIndex':_0x31a8df[_0x58711c(0x232)][_0x58711c(0x215)](_0x31a8df),'byIndex':_0x31a8df[_0x58711c(0xc8)][_0x58711c(0x215)](_0x31a8df),'query':_0x31a8df['query'][_0x58711c(0x215)](_0x31a8df),'geoQuery':_0x31a8df[_0x58711c(0xfe)][_0x58711c(0x215)](_0x31a8df),'ftsQuery':_0x31a8df[_0x58711c(0x140)][_0x58711c(0x215)](_0x31a8df),'setTTL':_0x31a8df['setTTL']['bind'](_0x31a8df),'getTTL':_0x31a8df[_0x58711c(0x1ca)][_0x58711c(0x215)](_0x31a8df),'clearTTL':_0x31a8df[_0x58711c(0x11c)][_0x58711c(0x215)](_0x31a8df),'sweepExpiredTTL':_0x31a8df['sweepExpiredTTL'][_0x58711c(0x215)](_0x31a8df),'listTTL':_0x31a8df[_0x58711c(0x166)][_0x58711c(0x215)](_0x31a8df),'ttlStats':_0x31a8df['ttlStats'][_0x58711c(0x215)](_0x31a8df),'setDefaultTTL':_0x31a8df[_0x58711c(0x149)][_0x58711c(0x215)](_0x31a8df),'getDefaultTTL':_0x31a8df[_0x58711c(0x1e1)][_0x58711c(0x215)](_0x31a8df),'clearDefaultTTL':_0x31a8df[_0x58711c(0xd2)][_0x58711c(0x215)](_0x31a8df),'registerType':_0x31a8df[_0x58711c(0x195)][_0x58711c(0x215)](_0x31a8df),'ensureType':_0x31a8df[_0x58711c(0x17d)][_0x58711c(0x215)](_0x31a8df),'hasType':_0x31a8df[_0x58711c(0x240)][_0x58711c(0x215)](_0x31a8df),'dropType':_0x31a8df['dropType'][_0x58711c(0x215)](_0x31a8df),'registerIndex':_0x31a8df['registerIndex']['bind'](_0x31a8df),'hasIndex':_0x31a8df['hasIndex'][_0x58711c(0x215)](_0x31a8df),'dropIndex':_0x31a8df['dropIndex'][_0x58711c(0x215)](_0x31a8df),'resetIndex':_0x31a8df[_0x58711c(0xc4)]['bind'](_0x31a8df),'indexReady':_0x31a8df[_0x58711c(0x1e2)][_0x58711c(0x215)](_0x31a8df),'getIndexStatus':_0x31a8df[_0x58711c(0x1ed)][_0x58711c(0x215)](_0x31a8df),'getClock':_0x31a8df[_0x58711c(0x21d)]['bind'](_0x31a8df),'getChanges':_0x31a8df['getChanges'][_0x58711c(0x215)](_0x31a8df),'count':_0x31a8df['count'][_0x58711c(0x215)](_0x31a8df),'range':_0x31a8df[_0x58711c(0x1b5)][_0x58711c(0x215)](_0x31a8df),'now':_0x31a8df[_0x58711c(0x142)][_0x58711c(0x215)](_0x31a8df)};}function _0x2683ba(_0x380768){const _0x1779bd=_0x4c6d;if(!_0x380768)return null;const _0xf555e5={};for(const _0x5bd1a1 of[_0x1779bd(0xf8),'getJob',_0x1779bd(0x104),'updateJob','removeJob',_0x1779bd(0x230),_0x1779bd(0xe8),_0x1779bd(0x1c8)]){if(typeof _0x380768[_0x5bd1a1]===_0x1779bd(0x233))_0xf555e5[_0x5bd1a1]=_0x380768[_0x5bd1a1][_0x1779bd(0x215)](_0x380768);}return Object[_0x1779bd(0x1a8)](_0xf555e5)[_0x1779bd(0xdf)]?_0xf555e5:null;}function _0x5c668c(_0x1557e7){const _0x10375a=_0x4c6d;if(!_0x1557e7)return null;const _0xa1fd76={};for(const _0x5706f3 of[_0x10375a(0xd7),'stream',_0x10375a(0x19c),_0x10375a(0x20c),_0x10375a(0x104),'getByPath']){if(typeof _0x1557e7[_0x5706f3]===_0x10375a(0x233))_0xa1fd76[_0x5706f3]=_0x1557e7[_0x5706f3]['bind'](_0x1557e7);}return Object[_0x10375a(0x1a8)](_0xa1fd76)['length']?_0xa1fd76:null;}function _0x2d9054(_0x95cb6b){const _0x4a332d=_0x4c6d;return{'env':_0x95cb6b[_0x4a332d(0x113)][_0x4a332d(0x215)](_0x95cb6b),'createEnvironment':_0x95cb6b[_0x4a332d(0x222)][_0x4a332d(0x215)](_0x95cb6b),'removeEnvironment':_0x95cb6b[_0x4a332d(0x221)]['bind'](_0x95cb6b),'info':_0x95cb6b[_0x4a332d(0x15e)],..._0x4312c0(_0x95cb6b),'put':_0x95cb6b['put'][_0x4a332d(0x215)](_0x95cb6b),'update':_0x95cb6b[_0x4a332d(0x1bf)][_0x4a332d(0x215)](_0x95cb6b),'patch':_0x95cb6b[_0x4a332d(0x171)]['bind'](_0x95cb6b),'create':_0x95cb6b[_0x4a332d(0x1e7)][_0x4a332d(0x215)](_0x95cb6b),'remove':_0x95cb6b['remove'][_0x4a332d(0x215)](_0x95cb6b),'get':_0x95cb6b['get'][_0x4a332d(0x215)](_0x95cb6b),'getMany':_0x95cb6b['getMany'][_0x4a332d(0x215)](_0x95cb6b),'getEntry':_0x95cb6b[_0x4a332d(0x15c)][_0x4a332d(0x215)](_0x95cb6b),'getRange':_0x95cb6b[_0x4a332d(0x16b)][_0x4a332d(0x215)](_0x95cb6b),'getValues':_0x95cb6b[_0x4a332d(0xcc)][_0x4a332d(0x215)](_0x95cb6b),'getKeys':_0x95cb6b['getKeys']['bind'](_0x95cb6b),'getCount':_0x95cb6b['getCount'][_0x4a332d(0x215)](_0x95cb6b),'getByPrefix':_0x95cb6b['getByPrefix'][_0x4a332d(0x215)](_0x95cb6b),'getIndex':_0x95cb6b[_0x4a332d(0x232)]['bind'](_0x95cb6b),'byIndex':_0x95cb6b[_0x4a332d(0xc8)][_0x4a332d(0x215)](_0x95cb6b),'query':_0x95cb6b[_0x4a332d(0x1fd)][_0x4a332d(0x215)](_0x95cb6b),'setTTL':_0x95cb6b[_0x4a332d(0x1f5)][_0x4a332d(0x215)](_0x95cb6b),'getTTL':_0x95cb6b['getTTL'][_0x4a332d(0x215)](_0x95cb6b),'clearTTL':_0x95cb6b[_0x4a332d(0x11c)]['bind'](_0x95cb6b),'sweepExpiredTTL':_0x95cb6b['sweepExpiredTTL']['bind'](_0x95cb6b),'listTTL':_0x95cb6b[_0x4a332d(0x166)]['bind'](_0x95cb6b),'ttlStats':_0x95cb6b['ttlStats'][_0x4a332d(0x215)](_0x95cb6b),'setDefaultTTL':_0x95cb6b[_0x4a332d(0x149)][_0x4a332d(0x215)](_0x95cb6b),'getDefaultTTL':_0x95cb6b[_0x4a332d(0x1e1)][_0x4a332d(0x215)](_0x95cb6b),'clearDefaultTTL':_0x95cb6b['clearDefaultTTL']['bind'](_0x95cb6b),'ensureType':_0x95cb6b[_0x4a332d(0x17d)]['bind'](_0x95cb6b),'registerType':_0x95cb6b['registerType'][_0x4a332d(0x215)](_0x95cb6b),'hasType':_0x95cb6b[_0x4a332d(0x240)][_0x4a332d(0x215)](_0x95cb6b),'dropType':_0x95cb6b[_0x4a332d(0xe9)][_0x4a332d(0x215)](_0x95cb6b),'registerIndex':_0x95cb6b[_0x4a332d(0x1ec)][_0x4a332d(0x215)](_0x95cb6b),'hasIndex':_0x95cb6b[_0x4a332d(0x16f)][_0x4a332d(0x215)](_0x95cb6b),'dropIndex':_0x95cb6b[_0x4a332d(0xf1)][_0x4a332d(0x215)](_0x95cb6b),'resetIndex':_0x95cb6b[_0x4a332d(0xc4)][_0x4a332d(0x215)](_0x95cb6b),'indexReady':_0x95cb6b['indexReady'][_0x4a332d(0x215)](_0x95cb6b),'getIndexStatus':_0x95cb6b[_0x4a332d(0x1ed)][_0x4a332d(0x215)](_0x95cb6b),'getClock':_0x95cb6b['getClock']['bind'](_0x95cb6b),'getChanges':_0x95cb6b[_0x4a332d(0x205)]['bind'](_0x95cb6b),'queue':_0x95cb6b[_0x4a332d(0xdc)],'files':_0x95cb6b[_0x4a332d(0x1c1)]};}return okdbFunctionsFacades={'createEnvFacade':_0x227427,'createQueueFacade':_0x2683ba,'createFilesFacade':_0x5c668c,'createGlobalFacade':_0x2d9054},okdbFunctionsFacades;}var okdbFunctionsDryrun,hasRequiredOkdbFunctionsDryrun;function requireOkdbFunctionsDryrun(){const _0x36218c=_0x318de2;if(hasRequiredOkdbFunctionsDryrun)return okdbFunctionsDryrun;hasRequiredOkdbFunctionsDryrun=0x1;const _0x304195=new Set([_0x36218c(0x13e),_0x36218c(0x171),'create',_0x36218c(0x19c),'update',_0x36218c(0x1f5),_0x36218c(0x11c),_0x36218c(0x203),'setDefaultTTL',_0x36218c(0xd2),_0x36218c(0xe9),_0x36218c(0xf1),'resetIndex']),_0x2e57b5=new Set(['enqueue','updateJob','removeJob',_0x36218c(0x230)]),_0x4dad90=new Set(['upload',_0x36218c(0x19c)]);function _0x551e13(_0x3aa5ee,_0x132888){const _0x34a3e0=_0x36218c;if(_0x3aa5ee===_0x34a3e0(0x113)||_0x3aa5ee===_0x34a3e0(0x10b))return _0x304195[_0x34a3e0(0x1f0)](_0x132888);if(_0x3aa5ee==='queue')return _0x2e57b5[_0x34a3e0(0x1f0)](_0x132888);if(_0x3aa5ee===_0x34a3e0(0x1c1))return _0x4dad90[_0x34a3e0(0x1f0)](_0x132888);return![];}function _0xc921bc(_0x2ec08f,_0x2bf063,_0x4d83b8,_0x4c80cc){if(!_0x2ec08f)return _0x2ec08f;return new Proxy(_0x2ec08f,{'get'(_0x5ba698,_0x31fd94,_0x103356){const _0x5c9a6c=_0x4c6d,_0x4e1530=Reflect[_0x5c9a6c(0x20c)](_0x5ba698,_0x31fd94,_0x103356);if(typeof _0x4e1530!==_0x5c9a6c(0x233))return _0x4e1530;if(!_0x551e13(_0x2bf063,_0x31fd94))return _0x4e1530[_0x5c9a6c(0x215)](_0x5ba698);return function(..._0x46d513){return _0x4c80cc['push']({'scope':_0x2bf063,'method':_0x31fd94,'envName':_0x4d83b8,'args':_0x46d513}),null;};}});}function _0xa03eed(_0x4f2d84,_0x198412,_0x3e8535,_0x4ad321){const _0x250e8e={};for(const _0x3d6e5f of _0x3e8535){_0x250e8e[_0x3d6e5f]=(..._0x5d8e15)=>{const _0x4789f4=_0x4c6d;return _0x551e13(_0x4f2d84,_0x3d6e5f)&&_0x4ad321[_0x4789f4(0xfa)]({'scope':_0x4f2d84,'method':_0x3d6e5f,'envName':_0x198412,'args':_0x5d8e15}),null;};}return _0x250e8e;}return okdbFunctionsDryrun={'isWriteMethod':_0x551e13,'wrapForDryRun':_0xc921bc,'syntheticDryRunFacade':_0xa03eed,'ENV_WRITE_METHODS':_0x304195,'QUEUE_WRITE_METHODS':_0x2e57b5,'FILES_WRITE_METHODS':_0x4dad90},okdbFunctionsDryrun;}var okdbFunctionsContext,hasRequiredOkdbFunctionsContext;function requireOkdbFunctionsContext(){const _0x2607eb=_0x318de2;if(hasRequiredOkdbFunctionsContext)return okdbFunctionsContext;hasRequiredOkdbFunctionsContext=0x1;const {createEnvFacade:_0x2e89b2,createQueueFacade:_0x3a0522,createFilesFacade:_0x429b9f,createGlobalFacade:_0x53e3bc}=requireOkdbFunctionsFacades(),{wrapForDryRun:_0x554acb,syntheticDryRunFacade:_0x532477}=requireOkdbFunctionsDryrun(),_0x4cbc66=['enqueue','getJob','list',_0x2607eb(0x1b1),'removeJob',_0x2607eb(0x230),'getBucket',_0x2607eb(0x1c8)],_0x23f164=[_0x2607eb(0xd7),_0x2607eb(0x1ee),'remove',_0x2607eb(0x20c),_0x2607eb(0x104),'getByPath'];function _0xcd02ff(_0x3b50ab,_0x3ad7e4){const _0x1bb5f4=_0x2607eb,_0x4fe367=(_0x52a288,_0x49a015,_0x17a02e)=>_0x3ad7e4({'type':'log','requestId':_0x3b50ab[_0x1bb5f4(0x194)],'runId':_0x3b50ab[_0x1bb5f4(0x151)],'entry':{'level':_0x52a288,'msg':_0x49a015,'context':_0x17a02e,'ts':Date[_0x1bb5f4(0x142)]()}}),_0x28635f=(_0x54214f,_0x1f0848)=>_0x4fe367(_0x1bb5f4(0x15e),_0x54214f,_0x1f0848);return _0x28635f[_0x1bb5f4(0x15e)]=(_0x20d047,_0x3399f6)=>_0x4fe367('info',_0x20d047,_0x3399f6),_0x28635f['warn']=(_0x33fc74,_0x181c32)=>_0x4fe367(_0x1bb5f4(0x22e),_0x33fc74,_0x181c32),_0x28635f[_0x1bb5f4(0x1ba)]=(_0xda61d1,_0x27ec2a)=>_0x4fe367(_0x1bb5f4(0x1ba),_0xda61d1,_0x27ec2a),_0x28635f['debug']=(_0x1e677e,_0x5b2627)=>_0x4fe367(_0x1bb5f4(0x241),_0x1e677e,_0x5b2627),_0x28635f;}function _0x2d9794(_0x5f1aec,_0x19db93,_0x2b7e65){const _0x14681f=_0x2607eb;if(!_0x5f1aec)return null;return{'id':_0x5f1aec['id']??null,'type':_0x5f1aec[_0x14681f(0xce)]??null,'tries':_0x5f1aec['tries']??null,'created':_0x5f1aec[_0x14681f(0x186)]??null,'tags':_0x5f1aec[_0x14681f(0x1f8)]??null,'priority':_0x5f1aec[_0x14681f(0x19e)]??null,'bucket':_0x5f1aec[_0x14681f(0x1e8)]??null,'cron':_0x5f1aec[_0x14681f(0x103)]??null,'heartbeat'(){const _0x4f5105=_0x14681f;_0x2b7e65({'type':'job_heartbeat','requestId':_0x19db93[_0x4f5105(0x194)],'runId':_0x19db93[_0x4f5105(0x151)],'jobId':_0x5f1aec['id'],'claimId':_0x5f1aec[_0x4f5105(0x1d0)]});},'markProgress'(_0x293254){const _0x375c23=_0x14681f;_0x2b7e65({'type':_0x375c23(0x19b),'requestId':_0x19db93[_0x375c23(0x194)],'runId':_0x19db93['runId'],'jobId':_0x5f1aec['id'],'claimId':_0x5f1aec[_0x375c23(0x1d0)],'message':_0x293254});}};}function _0x13328a(_0x44534f){const _0x73b1e=_0x2607eb;if(!_0x44534f)return null;return{'mode':_0x44534f[_0x73b1e(0x11b)]??null,'sourceType':_0x44534f[_0x73b1e(0x12b)]??null,'sourceEnv':_0x44534f['sourceEnv']??null,'processor':_0x44534f[_0x73b1e(0x18a)]??null,'engineKey':_0x44534f[_0x73b1e(0x208)]??null,'cursorKey':_0x44534f[_0x73b1e(0x102)]??null};}function _0x20cd2d(_0x4db963){const _0x1f95c4=_0x2607eb;if(!_0x4db963)return null;return{'mode':_0x4db963['mode']??null,'sourceType':_0x4db963[_0x1f95c4(0x12b)]??null,'targetType':_0x4db963[_0x1f95c4(0x1bd)]??null,'sourceEnv':_0x4db963['sourceEnv']??null,'targetEnv':_0x4db963[_0x1f95c4(0x10d)]??null,'engineKey':_0x4db963[_0x1f95c4(0x208)]??null,'cursorKey':_0x4db963[_0x1f95c4(0x102)]??null};}function _0x2f444e(_0x1237c5,_0x345d39,_0x4e22ad,_0x2f0f56=null,_0x1815f0=null){const _0x47d4c8=_0x2607eb,_0x26dc2c={'runId':_0x345d39[_0x47d4c8(0x151)],'scope':_0x47d4c8(0x113),'env':_0x345d39[_0x47d4c8(0x1fc)]??null,'functionName':_0x345d39[_0x47d4c8(0x1fe)],'trigger':_0x345d39[_0x47d4c8(0x15e)]?.[_0x47d4c8(0x1ae)]??_0x47d4c8(0x139),'requestedAt':_0x345d39[_0x47d4c8(0x15e)]?.[_0x47d4c8(0x1b0)]??Date[_0x47d4c8(0x142)]()},_0xaa0700=_0xcd02ff(_0x345d39,_0x4e22ad),_0x494afc=AbortSignal['timeout'](Math[_0x47d4c8(0x181)](0x1,_0x345d39[_0x47d4c8(0x1bc)]?.[_0x47d4c8(0x12e)]??0x3e8)),_0x2ec9c2=_0x1815f0?AbortSignal['any']([_0x494afc,_0x1815f0]):_0x494afc,_0x1ee88a=_0x1237c5[_0x47d4c8(0x113)](_0x345d39[_0x47d4c8(0x1fc)]),_0x354590=_0x2f0f56?_0x554acb(_0x1ee88a,_0x47d4c8(0x113),_0x345d39[_0x47d4c8(0x1fc)],_0x2f0f56):_0x1ee88a,_0x480961=_0x2f0f56?_0x1ee88a['queue']?_0x554acb(_0x1ee88a[_0x47d4c8(0xdc)],_0x47d4c8(0xdc),_0x345d39[_0x47d4c8(0x1fc)],_0x2f0f56):_0x532477(_0x47d4c8(0xdc),_0x345d39['envName'],_0x4cbc66,_0x2f0f56):_0x1ee88a[_0x47d4c8(0xdc)],_0x2abaf1=_0x2f0f56?_0x1ee88a['files']?_0x554acb(_0x1ee88a[_0x47d4c8(0x1c1)],_0x47d4c8(0x1c1),_0x345d39['envName'],_0x2f0f56):_0x532477(_0x47d4c8(0x1c1),_0x345d39[_0x47d4c8(0x1fc)],_0x23f164,_0x2f0f56):_0x1ee88a[_0x47d4c8(0x1c1)],_0x1a0e51=_0x2e89b2(_0x354590),_0x4f3b3c=_0x3a0522(_0x480961),_0x1c6a3a=_0x429b9f(_0x2abaf1);if(_0x4f3b3c)_0x1a0e51['queue']=_0x4f3b3c;if(_0x1c6a3a)_0x1a0e51['files']=_0x1c6a3a;const _0xce061f={'payload':_0x345d39['payload']??null,'info':_0x26dc2c,'signal':_0x2ec9c2,'log':_0xaa0700,'env':_0x1a0e51},_0x227c59=_0x2d9794(_0x345d39[_0x47d4c8(0x160)],_0x345d39,_0x4e22ad);if(_0x227c59)_0xce061f[_0x47d4c8(0x14d)]=_0x227c59;const _0x44c502=_0x13328a(_0x345d39['processorContext']);if(_0x44c502)_0xce061f[_0x47d4c8(0x18a)]=_0x44c502;const _0x5ee461=_0x20cd2d(_0x345d39['materializerContext']);if(_0x5ee461)_0xce061f[_0x47d4c8(0xc9)]=_0x5ee461;if(_0x345d39[_0x47d4c8(0x101)]){const _0x3a42ff=_0x2f0f56?_0x554acb(_0x1237c5,'global',null,_0x2f0f56):_0x1237c5;_0xce061f['okdb']=_0x53e3bc(_0x3a42ff);}return _0xce061f;}return okdbFunctionsContext={'createExecutionContext':_0x2f444e,'createScriptLogger':_0xcd02ff},okdbFunctionsContext;}var hasRequiredOkdbFunctionsSandboxWorker;function requireOkdbFunctionsSandboxWorker(){const _0x333329=_0x318de2;if(hasRequiredOkdbFunctionsSandboxWorker)return okdbFunctionsSandboxWorker$1;hasRequiredOkdbFunctionsSandboxWorker=0x1;const {parentPort:_0x5a145b,workerData:_0x1369df}=require$$0$4;requireOkdbFatalReport()[_0x333329(0x235)](_0x333329(0x22c));const _0x2fc2a2=require$$2,{compileFunctionExpression:_0x3c0e56}=requireOkdbFunctionsSandbox(),{serializeError:_0x3c4976}=requireOkdbFunctionsIpc(),{createExecutionContext:_0x2ba9f6}=requireOkdbFunctionsContext(),_0x238aef=require$$6;let _0x2dbfce=null,_0x237788=![];const _0x4000cb=new Map(),_0x5cd73e=new Map();function _0x526fc3(_0x1de1b7){const _0x128f4f=_0x333329;try{_0x5a145b[_0x128f4f(0x119)](_0x1de1b7);}catch{}}function _0x2af85b(_0x47261c){const _0x8e3329=_0x333329,_0x44705a=(_0x47261c[_0x8e3329(0x1fc)]||'~system')+':'+_0x47261c[_0x8e3329(0x1fe)]+':'+_0x47261c[_0x8e3329(0x17c)]+':'+_0x47261c[_0x8e3329(0x187)];let _0x54a10c=_0x4000cb['get'](_0x44705a);return!_0x54a10c&&(_0x54a10c=_0x3c0e56(_0x47261c[_0x8e3329(0x184)],{'allowFetch':_0x47261c[_0x8e3329(0x1bc)]?.[_0x8e3329(0x214)]!==![],'allowedFetchDomains':_0x47261c[_0x8e3329(0x1bc)]?.['allowedFetchDomains'],'filename':_0x47261c[_0x8e3329(0x1fe)]+_0x8e3329(0x157)}),_0x4000cb['set'](_0x44705a,_0x54a10c)),_0x54a10c;}async function _0x25bdf2(_0x1815de){const _0x5dbf26=_0x333329,_0x450924=Date[_0x5dbf26(0x142)](),_0x5a4bcd=new AbortController();_0x5cd73e[_0x5dbf26(0xe1)](_0x1815de['requestId'],_0x5a4bcd);try{const _0x4c6f5a=_0x2af85b(_0x1815de);if(_0x1815de[_0x5dbf26(0x1fc)])await _0x2dbfce[_0x5dbf26(0xf7)](_0x1815de[_0x5dbf26(0x1fc)]);const _0xa5cd80=_0x1815de[_0x5dbf26(0x21b)]?[]:null,_0x2fab5e=_0x2ba9f6(_0x2dbfce,_0x1815de,_0x526fc3,_0xa5cd80,_0x5a4bcd[_0x5dbf26(0xfc)]),_0x3a04be=await _0x4c6f5a(_0x2fab5e),_0x333f47={'type':'result','requestId':_0x1815de[_0x5dbf26(0x194)],'runId':_0x1815de[_0x5dbf26(0x151)],'result':_0x3a04be,'meta':{'runnerId':'sandbox-'+process[_0x5dbf26(0x1e9)],'startedAt':_0x450924,'finishedAt':Date[_0x5dbf26(0x142)](),'durationMs':Date[_0x5dbf26(0x142)]()-_0x450924}};if(_0xa5cd80)_0x333f47['dryRunActions']=_0xa5cd80;_0x526fc3(_0x333f47);}catch(_0x4d008c){_0x526fc3({'type':_0x5dbf26(0x1ba),'requestId':_0x1815de[_0x5dbf26(0x194)],'runId':_0x1815de[_0x5dbf26(0x151)],'error':_0x3c4976(_0x4d008c),'meta':{'runnerId':_0x5dbf26(0x154)+process[_0x5dbf26(0x1e9)],'startedAt':_0x450924,'finishedAt':Date['now'](),'durationMs':Date[_0x5dbf26(0x142)]()-_0x450924}});}finally{_0x5cd73e['delete'](_0x1815de[_0x5dbf26(0x194)]);}}async function _0x163298(){const _0x53329a=_0x333329;if(_0x237788)return;_0x237788=!![];try{await _0x2dbfce?.[_0x53329a(0x212)]?.();}catch{}process['exit'](0x0);}async function _0xf7fc3(){const _0x5f51af=_0x333329,{rootPath:_0x5d0d0f}=_0x1369df??{};if(!_0x5d0d0f)throw new Error(_0x5f51af(0x1ad));_0x2dbfce=new _0x238aef(_0x5d0d0f,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]},'processes':![]}),await _0x2dbfce['open']();const _0x3949e4=setInterval(()=>{const _0x3d2711=_0x5f51af;if(_0x237788)return;for(const [,_0x5f05ac]of _0x2dbfce[_0x3d2711(0x1a1)]){try{_0x5f05ac[_0x3d2711(0x236)]?.();}catch{}}},0xc8);if(typeof _0x3949e4['unref']===_0x5f51af(0x233))_0x3949e4[_0x5f51af(0x159)]();_0x5a145b['on'](_0x5f51af(0x147),_0x43d77a=>{const _0x4fdda7=_0x5f51af;if(!_0x43d77a||typeof _0x43d77a!==_0x4fdda7(0x1c2))return;if(_0x43d77a['type']===_0x4fdda7(0xe5))return void _0x163298();if(_0x43d77a[_0x4fdda7(0xce)]===_0x4fdda7(0xbd)){_0x5cd73e['get'](_0x43d77a['requestId'])?.[_0x4fdda7(0x20f)](new Error(_0x4fdda7(0x21a)));return;}_0x43d77a[_0x4fdda7(0xce)]===_0x4fdda7(0xcf)&&void _0x25bdf2(_0x43d77a['job']);});const _0x3c2f93=Math[_0x5f51af(0x181)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x4fd124=setInterval(()=>{const _0x39c1fd=_0x5f51af;try{_0x526fc3({'type':_0x39c1fd(0x223),'heapUsed':_0x2fc2a2['getHeapStatistics']()[_0x39c1fd(0xc6)]});}catch{}},_0x3c2f93);if(typeof _0x4fd124['unref']===_0x5f51af(0x233))_0x4fd124['unref']();_0x526fc3({'type':'ready'});}return _0xf7fc3()[_0x333329(0x179)](_0x430b1d=>{const _0x32491a=_0x333329;_0x526fc3({'type':_0x32491a(0xc5),'error':_0x3c4976(_0x430b1d)}),process[_0x32491a(0x1de)](0x1);}),okdbFunctionsSandboxWorker$1;}var okdbFunctionsSandboxWorkerExports=requireOkdbFunctionsSandboxWorker(),okdbFunctionsSandboxWorker=getDefaultExportFromCjs(okdbFunctionsSandboxWorkerExports);module[_0x318de2(0x158)]=okdbFunctionsSandboxWorker;