@kedem/okdb 2.5.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +90 -0
- package/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/docs/auth-permissions.md +31 -5
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/public/admin-app.js +1 -1
- package/public/components/schema-edit-modal.ok.js +1 -0
- package/public/core/db/db-section.ok.html +1 -0
- package/public/core/db/modals/add-item-modal.ok.js +1 -0
- package/public/core/db/modals/create-fts-modal.ok.js +1 -0
- package/public/core/db/modals/create-index-modal.ok.js +1 -0
- package/public/core/db/parts/db-overview.ok.js +1 -0
- package/public/core/db/parts/edit-row.ok.js +1 -0
- package/public/core/db/parts/type-changelog.ok.js +1 -0
- package/public/core/db/parts/type-data-tab.ok.js +1 -0
- package/public/core/db/parts/type-list.ok.js +1 -0
- package/public/core/db/parts/type-manage-tab.ok.js +1 -0
- package/public/core/db/parts/type-schema-tab.ok.js +1 -0
- package/public/core/db/parts/type-viewer.ok.js +1 -0
- package/public/core/db/type-ops.js +1 -0
- package/public/core/docs/docs-page.ok.html +1 -0
- package/public/core/license/license-panel.ok.js +1 -0
- package/public/core/system/parts/system-log.ok.js +1 -0
- package/public/core/system/parts/system-processing-panel.ok.js +1 -0
- package/public/core/system/parts/system-storage-panel.ok.js +1 -0
- package/public/core/system/system-events-page.ok.js +1 -0
- package/public/core/system/system-logs-page.ok.js +1 -0
- package/public/core/system/system-overview-page.ok.html +1 -0
- package/public/core/system/system-runtime-page.ok.js +1 -0
- package/public/core/system/system-section.ok.html +1 -0
- package/public/features/api/api-panel.ok.js +1 -0
- package/public/features/api/index.js +1 -0
- package/public/features/auth/auth-panel.ok.js +1 -0
- package/public/features/auth/index.js +1 -0
- package/public/features/files/files-section.ok.html +1 -0
- package/public/features/files/index.js +1 -0
- package/public/features/files/parts/files-file-list.ok.js +1 -0
- package/public/features/files/parts/files-path-browser.ok.js +1 -0
- package/public/features/files/parts/files-preview.ok.js +1 -0
- package/public/features/files/parts/files-upload-panel.ok.js +1 -0
- package/public/features/functions/exports.js +1 -0
- package/public/features/functions/functions-section.ok.html +1 -0
- package/public/features/functions/functions-store.js +1 -0
- package/public/features/functions/index.js +1 -0
- package/public/features/functions/modals/function-modal.ok.js +1 -0
- package/public/features/functions/parts/function-detail.ok.js +1 -0
- package/public/features/functions/parts/function-logs.ok.js +1 -0
- package/public/features/functions/parts/function-runner.ok.js +1 -0
- package/public/features/pipelines/engine-ui-utils.js +1 -0
- package/public/features/pipelines/exports.js +1 -0
- package/public/features/pipelines/index.js +1 -0
- package/public/features/pipelines/modals/create-pipeline-modal.ok.js +1 -0
- package/public/features/pipelines/modals/edit-pipeline-modal.ok.js +1 -0
- package/public/features/pipelines/modals/engine-modal.ok.js +1 -0
- package/public/features/pipelines/parts/embed-create-panel.ok.js +1 -0
- package/public/features/pipelines/parts/embed-embedder-panel.ok.js +1 -0
- package/public/features/pipelines/parts/embed-indexer-panel.ok.js +1 -0
- package/public/features/pipelines/parts/embed-search-panel.ok.js +1 -0
- package/public/features/pipelines/parts/embed-worker-panel.ok.js +1 -0
- package/public/features/pipelines/parts/embeddings-engine-panel.ok.js +1 -0
- package/public/features/pipelines/parts/engine-declaration-editor.ok.js +1 -0
- package/public/features/pipelines/parts/engines-overview.ok.js +1 -0
- package/public/features/pipelines/parts/generic-engine-panel.ok.js +1 -0
- package/public/features/pipelines/parts/pipeline-create-panel.ok.js +1 -0
- package/public/features/pipelines/parts/pipeline-flow-strip.ok.js +1 -0
- package/public/features/pipelines/parts/type-pipelines-tab.ok.js +1 -0
- package/public/features/pipelines/pipelines-section.ok.html +1 -0
- package/public/features/queue/index.js +1 -0
- package/public/features/queue/modals/create-bucket-modal.ok.js +1 -0
- package/public/features/queue/modals/edit-bucket-modal.ok.js +1 -0
- package/public/features/queue/modals/edit-job-modal.ok.js +1 -0
- package/public/features/queue/modals/enqueue-job-modal.ok.js +1 -0
- package/public/features/queue/modals/job-type-modal.ok.js +1 -0
- package/public/features/queue/parts/job-log-panel.ok.js +1 -0
- package/public/features/queue/parts/queue-buckets.ok.js +1 -0
- package/public/features/queue/parts/queue-job-types.ok.js +1 -0
- package/public/features/queue/parts/queue-jobs.ok.js +1 -0
- package/public/features/queue/parts/queue-types.ok.js +1 -0
- package/public/features/queue/parts/queue-workers.ok.js +1 -0
- package/public/features/queue/queue-section.ok.html +1 -0
- package/public/features/sync/index.js +1 -0
- package/public/features/sync/sync-panel.ok.js +1 -0
- package/public/features/views/index.js +1 -0
- package/public/features/views/modals/create-view-modal.ok.js +1 -0
- package/public/features/views/parts/views-list.ok.js +1 -0
- package/public/features/views/parts/views-overview.ok.js +1 -0
- package/public/features/views/views-section.ok.html +1 -0
- package/public/features/views/views-store.js +1 -0
- package/public/index.html +9 -3
- package/public/modules/ok.js +1 -1
- package/public/shell/admin-shell.ok.html +3 -0
- package/public/shell/core-manifest.js +1 -0
- package/public/shell/shell-piece.ok.js +1 -0
- package/public/shell/shell-section-host.ok.js +1 -0
- package/public/shell/shell-section.ok.js +1 -0
- package/public/shell/shell-store.js +1 -0
- package/public/stores/auth-store.js +1 -1
- package/public/stores/okdb-store.js +1 -1
- package/public/stores/storage-store.js +1 -0
- package/public/styles.css +1 -1
- package/public/vendor/okjs/ok.esm.min.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-doc-viewer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-marked.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
- package/public/vendor/okjs/toolkit/editor/ok-live-shell.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-select.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-table.ok.js +1 -1
- package/public/components/admin-route-host.ok.js +0 -1
- package/public/components/field.html +0 -158
- package/public/layouts/_default.ok.html +0 -3
- package/public/sections/api/index.ok.html +0 -1
- package/public/sections/auth/index.ok.html +0 -1
- package/public/sections/auth/modals/perm-info-popover.ok.js +0 -1
- package/public/sections/db/index.ok.html +0 -1
- package/public/sections/db/modals/add-item-modal.ok.js +0 -1
- package/public/sections/db/modals/create-fts-modal.ok.js +0 -1
- package/public/sections/db/modals/create-index-modal.ok.js +0 -1
- package/public/sections/db/modals/create-pipeline-modal.ok.js +0 -1
- package/public/sections/db/modals/schema-edit-modal.ok.js +0 -1
- package/public/sections/db/parts/db-overview.ok.js +0 -1
- package/public/sections/db/parts/edit-row.ok.js +0 -1
- package/public/sections/db/parts/type-changelog.ok.js +0 -1
- package/public/sections/db/parts/type-list.ok.js +0 -1
- package/public/sections/db/parts/type-pipelines-tab.ok.js +0 -1
- package/public/sections/db/parts/type-schema-tab.ok.js +0 -1
- package/public/sections/db/parts/type-viewer.ok.js +0 -1
- package/public/sections/db/parts/type-violations-tab.ok.js +0 -1
- package/public/sections/docs/index.ok.html +0 -1
- package/public/sections/embeddings/index.ok.html +0 -1
- package/public/sections/embeddings/modals/edit-pipeline-modal.ok.js +0 -1
- package/public/sections/embeddings/parts/embed-create-panel.ok.js +0 -1
- package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +0 -1
- package/public/sections/embeddings/parts/embed-engine-declaration-editor.ok.js +0 -1
- package/public/sections/embeddings/parts/embed-engine-list.ok.js +0 -1
- package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +0 -1
- package/public/sections/embeddings/parts/embed-lifecycle-bar.ok.js +0 -1
- package/public/sections/embeddings/parts/embed-overview.ok.js +0 -1
- package/public/sections/embeddings/parts/embed-search-panel.ok.js +0 -1
- package/public/sections/embeddings/parts/embed-worker-panel.ok.js +0 -1
- package/public/sections/embeddings/parts/embeddings-engine-panel.ok.js +0 -1
- package/public/sections/embeddings/parts/engines-overview.ok.js +0 -1
- package/public/sections/embeddings/parts/pipeline-create-panel.ok.js +0 -1
- package/public/sections/embeddings/parts/pipeline-flow-strip.ok.js +0 -1
- package/public/sections/engines/engine-ui-utils.js +0 -1
- package/public/sections/engines/index.ok.html +0 -1
- package/public/sections/engines/modals/engine-modal.ok.js +0 -1
- package/public/sections/engines/parts/engine-declaration-editor.ok.js +0 -1
- package/public/sections/engines/parts/generic-engine-panel.ok.js +0 -1
- package/public/sections/files/index.ok.html +0 -1
- package/public/sections/files/parts/files-collection-list.ok.js +0 -1
- package/public/sections/files/parts/files-collection-panel.ok.js +0 -1
- package/public/sections/files/parts/files-file-list.ok.js +0 -1
- package/public/sections/files/parts/files-path-browser.ok.js +0 -1
- package/public/sections/files/parts/files-preview.ok.js +0 -1
- package/public/sections/files/parts/files-upload-panel.ok.js +0 -1
- package/public/sections/functions/index.ok.html +0 -1
- package/public/sections/functions/modals/function-modal.ok.js +0 -1
- package/public/sections/functions/parts/function-detail.ok.js +0 -1
- package/public/sections/functions/parts/function-logs.ok.js +0 -1
- package/public/sections/functions/parts/function-runner.ok.js +0 -1
- package/public/sections/license/index.ok.html +0 -1
- package/public/sections/license/parts/license-panel.ok.js +0 -1
- package/public/sections/queue/index.ok.html +0 -1
- package/public/sections/queue/modals/create-bucket-modal.ok.js +0 -1
- package/public/sections/queue/modals/edit-bucket-modal.ok.js +0 -1
- package/public/sections/queue/modals/edit-job-modal.ok.js +0 -1
- package/public/sections/queue/modals/enqueue-job-modal.ok.js +0 -1
- package/public/sections/queue/modals/job-type-modal.ok.js +0 -1
- package/public/sections/queue/parts/job-log-panel.ok.js +0 -1
- package/public/sections/queue/parts/ok-job-form.ok.js +0 -1
- package/public/sections/queue/parts/queue-buckets.ok.js +0 -1
- package/public/sections/queue/parts/queue-job-types.ok.js +0 -1
- package/public/sections/queue/parts/queue-jobs.ok.js +0 -1
- package/public/sections/queue/parts/queue-types.ok.js +0 -1
- package/public/sections/queue/parts/queue-workers.ok.js +0 -1
- package/public/sections/sync/index.ok.html +0 -5
- package/public/sections/sync/parts/sync-node-detail.ok.js +0 -1
- package/public/sections/system/index.ok.html +0 -1
- package/public/sections/system/parts/system-api-panel.ok.js +0 -1
- package/public/sections/system/parts/system-auth-panel.ok.js +0 -1
- package/public/sections/system/parts/system-log.ok.js +0 -1
- package/public/sections/system/parts/system-processing-panel.ok.js +0 -1
- package/public/sections/system/parts/system-status.ok.js +0 -1
- package/public/sections/system/parts/system-storage-panel.ok.js +0 -1
- package/public/sections/system/parts/system-sync-panel.ok.js +0 -1
- package/public/sections/views/index.ok.html +0 -1
- package/public/sections/views/modals/create-view-modal.ok.js +0 -1
- package/public/sections/views/parts/views-list.ok.js +0 -1
- package/public/sections/views/parts/views-overview.ok.js +0 -1
- package/public/stores/functions-store.js +0 -1
- /package/public/{sections → core}/db/parts/tm-timeline.ok.js +0 -0
- /package/public/{util → core/db}/sift-schema.js +0 -0
- /package/public/{view-models → core/db}/type-query-vm.js +0 -0
- /package/public/{sections → core}/system/modals/data-ops-modal.ok.js +0 -0
- /package/public/{sections → core}/system/parts/system-locks-panel.ok.js +0 -0
- /package/public/{sections → core}/system/parts/system-log-history.ok.js +0 -0
- /package/public/{sections → core}/system/parts/system-process-panel.ok.js +0 -0
- /package/public/{sections → core}/system/parts/system-runtime-overview.ok.js +0 -0
- /package/public/{sections → features}/api/parts/api-endpoint.ok.js +0 -0
- /package/public/{sections → features}/auth/modals/create-token-modal.ok.js +0 -0
- /package/public/{sections → features}/auth/modals/edit-token-modal.ok.js +0 -0
- /package/public/{sections → features}/auth/parts/token-detail.ok.js +0 -0
- /package/public/{sections → features}/auth/parts/token-list.ok.js +0 -0
- /package/public/{sections → features}/files/parts/files-blob-status.ok.js +0 -0
- /package/public/{sections → features}/files/parts/files-overview.ok.js +0 -0
- /package/public/{sections → features}/functions/parts/functions-list.ok.js +0 -0
- /package/public/{sections/engines → features/pipelines}/engine-panel-shared-style.js +0 -0
- /package/public/{sections/embeddings → features/pipelines}/modals/register-model-modal.ok.js +0 -0
- /package/public/{sections/embeddings → features/pipelines}/modals/replace-embedder-modal.ok.js +0 -0
- /package/public/{sections/embeddings → features/pipelines}/parts/embed-model-catalog.ok.js +0 -0
- /package/public/{sections/engines → features/pipelines}/parts/engine-lifecycle-actions.ok.js +0 -0
- /package/public/{sections/engines → features/pipelines}/parts/engine-panel-shell.ok.js +0 -0
- /package/public/{sections/engines → features/pipelines}/parts/engine-resource-card.ok.js +0 -0
- /package/public/{sections/engines → features/pipelines}/parts/engine-row-item.ok.js +0 -0
- /package/public/{sections/embeddings → features/pipelines}/parts/pipeline-try-search.ok.js +0 -0
- /package/public/{sections → features}/queue/parts/code-panel.ok.js +0 -0
- /package/public/{sections → features}/sync/modals/connect-peer-modal.ok.js +0 -0
- /package/public/{sections → features}/sync/parts/sync-retention.ok.js +0 -0
- /package/public/{sections → features}/sync/parts/sync-topology.ok.js +0 -0
- /package/public/{sections → features}/views/parts/view-detail.ok.js +0 -0
- /package/public/{sections/db → shell}/modals/create-env-modal.ok.js +0 -0
- /package/public/{sections/db → shell}/modals/demo-env-modal.ok.js +0 -0
- /package/public/{sections/db → shell}/modals/remove-env-modal.ok.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,96 @@ All notable changes to `@kedem/okdb` are documented here. Format loosely follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/); versions follow [SemVer](https://semver.org/).
|
|
5
5
|
Dates are release dates.
|
|
6
6
|
|
|
7
|
+
## [2.6.1] - 2026-09-28
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Depends on `@kedem/okjs` `^1.4.0` (was `~1.3.3`, which kept okdb on okjs 1.3.x). okjs 1.4.0 calls a
|
|
12
|
+
function-valued attr `default` once per instance; the admin has no callback defaults, so nothing
|
|
13
|
+
else changes. The `^` range follows future okjs 1.x minors.
|
|
14
|
+
|
|
15
|
+
## [2.6.0] - 2026-09-28
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **Admin UI rebuilt as a shell with feature-contributed sections** (`design/admin-shell.md`). The
|
|
20
|
+
chrome (env picker, nav, notices, live/security pills) mounts once and sections swap inside it —
|
|
21
|
+
switching sections no longer tears the page down or flashes a full-page "Loading…". Each feature
|
|
22
|
+
ships its own UI under `src/features/<f>/admin/` (a manifest contributing nav sections, DB
|
|
23
|
+
type-viewer tabs and System pages); the server lists them, UI-agnostically, at
|
|
24
|
+
`GET /admin/api/features` (licence + permissions per feature). Nav items, DB tabs and System pages
|
|
25
|
+
go through one gate: a feature without a licence shows **locked** with "Requires a license with …",
|
|
26
|
+
one the token may not see shows locked with the permission it needs, and opening it by URL shows the
|
|
27
|
+
reason instead of loading it. Views is now gated on `views:read` like every other section.
|
|
28
|
+
- `#/api`, `#/auth`, `#/sync`, `#/license`, `#/docs` (and `/docs`) open the matching System page;
|
|
29
|
+
`#/processes`, `#/processing` open the Runtime page's Processes / Processors tab.
|
|
30
|
+
- Admin: the License page hides/disables Add, Activate and Remove for tokens without
|
|
31
|
+
`system:write`, matching the server-side gate.
|
|
32
|
+
- Admin: the DB overview's Time Machine card now needs `schema:read` to load at all (no 403 in
|
|
33
|
+
the console without it) and disables Enable/Disable All and per-type Enable/Disable without
|
|
34
|
+
`schema:write`, matching the server-side gate.
|
|
35
|
+
|
|
36
|
+
### Security
|
|
37
|
+
|
|
38
|
+
- **Time-machine routes checked no permission.** The `/api/env/:env/time-machine…` routes declared
|
|
39
|
+
no access, so any authenticated token — one holding only `env:read`, or a grant for another env —
|
|
40
|
+
could read every document's field-level history (`…/:type/:key/history`, `…/at/:clock`,
|
|
41
|
+
`…/changes`) and enable, disable or drop tracking. They now need `data:read` for history, state
|
|
42
|
+
and diffs, `schema:read` for status (`/time-machine`, `/types`, `/types/:type`, `/status`) and
|
|
43
|
+
`schema:write` to enable/disable/drop/flush (incl. the deprecated `POST`/`DELETE …/enable`); all
|
|
44
|
+
are env-scoped, so per-env grants and the protected `~` env gate apply.
|
|
45
|
+
- **Any authenticated token could manage licences or join the node to a cluster.**
|
|
46
|
+
`GET /admin/license/status` now needs `system:read`; `POST /admin/license`,
|
|
47
|
+
`POST /admin/license/:id/activate` and `DELETE /admin/license/:id` need `system:write`;
|
|
48
|
+
`POST /admin/setup/join` (joining starts replicating this node's data) needs `sync:write`.
|
|
49
|
+
First-run setup in open/bootstrap mode is unaffected.
|
|
50
|
+
- A route-table test (`tests/auth-routes-have-permissions.test.js`) now fails for any route that
|
|
51
|
+
declares no permission unless it is allow-listed as public / authenticated-only with a reason,
|
|
52
|
+
and for any `:env` route with an env-scoped permission that lacks `scope: 'env'`.
|
|
53
|
+
- **`/api/env/:env/engines…` (12 routes) skipped the protected `~` env gate.** They declared
|
|
54
|
+
`system:*` without `scope: 'env'`, so a token holding `system:write` alone — no
|
|
55
|
+
`protected:write` — could create, patch, delete, restart, pause/resume/retry/reset-cursor or
|
|
56
|
+
rebuild an engine directly in `~system` (or any other `~` env), unlike every other route that
|
|
57
|
+
touches a `~` env. They now declare `scope: 'env'`, like the `ttl` routes already did.
|
|
58
|
+
- `tests/auth-routes-have-permissions.test.js`'s `:env`-scope check no longer exempts
|
|
59
|
+
`system:*`/`auth:*`/`sync:*` permissions from needing `scope: 'env'` — that blanket exemption
|
|
60
|
+
is what let the engines routes above go unnoticed. The rule is now uniform (every `:env` route
|
|
61
|
+
with a permission declares the scope), with `ENV_SCOPE_EXCEPTIONS` reserved for genuine
|
|
62
|
+
one-offs, and a new test locks in `~system` engines needing `protected:*`.
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
|
|
66
|
+
- **Per-env grants were refused on the embeddings type-pipeline routes.** The 19
|
|
67
|
+
`/api/env/:env/type/:type/pipelines…` routes (list/create, stop/start/restart/delete, stats,
|
|
68
|
+
flush, query/nearest, snapshot/rebuild, docs and their markDone/markFail/markDelete/retry,
|
|
69
|
+
retry-failed) did not declare their env scope, so a per-env grant got 403 there. They now honour
|
|
70
|
+
per-env grants and the protected `~` env gate, like their `/api/env/:env/pipelines…` siblings.
|
|
71
|
+
- **Per-env grants were refused on the schema, violation and pipeline routes.**
|
|
72
|
+
`/api/env/:env/type/:type/schema`, `/api/env/:env/violations[/:type]`,
|
|
73
|
+
`/api/env/:env/type/:type/violations/:key`, `/api/env/:env/ref-violations[/:type]` and
|
|
74
|
+
`/api/env/:env/pipelines…` did not declare their env scope, so a token whose `schema:read` (or
|
|
75
|
+
`schema:write`) was granted for one env got 403 there (the admin DB section's Schema tab and
|
|
76
|
+
violation badges failed for such tokens). They now honour per-env grants — and, like the other env
|
|
77
|
+
routes, the protected `~` env gate.
|
|
78
|
+
- Admin: links inside the admin (`#/…`) reloaded the whole page (`<base href>` made them point at
|
|
79
|
+
another document); they now navigate in place. After login the admin returns to the page you
|
|
80
|
+
opened.
|
|
81
|
+
- Admin: a deep link with `?env=` loaded the default env first; the URL's env is now selected before
|
|
82
|
+
anything loads. DB keeps `?type=` across env switches when the new env has that type.
|
|
83
|
+
- Admin: duplicate requests removed — Views loaded its list and every view's meta/definition twice,
|
|
84
|
+
`/api/system/storage` was fetched by the version badge and again by each overview (now once,
|
|
85
|
+
shared), `/admin/login/config` twice at boot, a function was loaded two or three times when opened
|
|
86
|
+
and the function list twice after create; DB entry and deep links make each call once.
|
|
87
|
+
- Admin: tokens without `system:read` no longer get 403s from the storage badge, the event stream or
|
|
88
|
+
DB's system-wide cards; the TTL and schema buttons check the permissions their routes require.
|
|
89
|
+
- Admin: a newly created view now opens; the Pipelines "↗ Type" button opens the type in DB; Files
|
|
90
|
+
honours `?collection=`; Auth's `?token=` deep link works again; queue job types show before their
|
|
91
|
+
first job; the queue job-type schema editor no longer requests `/admin/undefined/types`; System
|
|
92
|
+
works with no env selected; System → Overview's 10 s refresh stops when you leave it and its
|
|
93
|
+
styles no longer leak into DB and Pipelines.
|
|
94
|
+
- Admin static files: path containment is separator-aware (a sibling directory whose name starts
|
|
95
|
+
with the served directory's name could be read).
|
|
96
|
+
|
|
7
97
|
## [2.5.0] - 2026-09-28
|
|
8
98
|
|
|
9
99
|
### Added
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x591ed2=_0x50b8;(function(_0xd8bed7,_0x1156b2){const _0x3276d0=_0x50b8,_0x45bedf=_0xd8bed7();while(!![]){try{const _0x24db1b=parseInt(_0x3276d0(0x25c))/0x1*(parseInt(_0x3276d0(0x296))/0x2)+-parseInt(_0x3276d0(0x269))/0x3*(-parseInt(_0x3276d0(0x289))/0x4)+-parseInt(_0x3276d0(0x1f0))/0x5+parseInt(_0x3276d0(0x23c))/0x6*(parseInt(_0x3276d0(0x248))/0x7)+parseInt(_0x3276d0(0x28b))/0x8*(parseInt(_0x3276d0(0x240))/0x9)+-parseInt(_0x3276d0(0x203))/0xa*(-parseInt(_0x3276d0(0x29f))/0xb)+parseInt(_0x3276d0(0x28a))/0xc*(-parseInt(_0x3276d0(0x224))/0xd);if(_0x24db1b===_0x1156b2)break;else _0x45bedf['push'](_0x45bedf['shift']());}catch(_0x49cbe4){_0x45bedf['push'](_0x45bedf['shift']());}}}(_0x414d,0x98ea6));var require$$0$1=require('worker_threads'),require$$0=require('fs'),require$$1=require(_0x591ed2(0x279)),require$$2=require('os'),require$$3=require(_0x591ed2(0x1ed));function getDefaultExportFromCjs(_0x2c2cee){const _0x2ba976=_0x591ed2;return _0x2c2cee&&_0x2c2cee[_0x2ba976(0x23a)]&&Object['prototype']['hasOwnProperty']['call'](_0x2c2cee,_0x2ba976(0x242))?_0x2c2cee[_0x2ba976(0x242)]:_0x2c2cee;}var algorithmWorkerThread$1={},snapshotStore,hasRequiredSnapshotStore;function requireSnapshotStore(){const _0x4219bf=_0x591ed2;if(hasRequiredSnapshotStore)return snapshotStore;hasRequiredSnapshotStore=0x1;const _0x5b79ed=require$$0,_0x3ac559=require$$1,_0x28fe05=require$$2,_0xa6e0a4=require$$3;function _0x1dd6b0(){const _0x1eb075=_0x50b8;return Date[_0x1eb075(0x20b)]();}function _0x231d4a(_0x5c4808){const _0x79ba30=_0x50b8;try{return _0x5b79ed[_0x79ba30(0x25f)](_0x5c4808);}catch{return![];}}function _0x3f6acd(_0x1608aa){const _0x985920=_0x50b8;try{return _0x5b79ed[_0x985920(0x1e2)](_0x1608aa,_0x985920(0x21e));}catch{return null;}}function _0x1cc405(_0x2f71c2,_0x1b23db){const _0x3ddb21=_0x50b8,_0x25d72e=_0x2f71c2+_0x3ddb21(0x2a7)+_0xa6e0a4['randomBytes'](0x6)[_0x3ddb21(0x1ff)]('hex');_0x5b79ed[_0x3ddb21(0x21b)](_0x25d72e,_0x1b23db),_0x5b79ed[_0x3ddb21(0x27d)](_0x25d72e,_0x2f71c2);}function _0x13c78f(_0x599921,_0x1c64e2=0x10){const _0xa846f=_0x50b8,_0x120618=String(Math[_0xa846f(0x251)](0x0,Math[_0xa846f(0x24e)](_0x599921||0x0)));return _0x120618[_0xa846f(0x295)]>=_0x1c64e2?_0x120618:'0'[_0xa846f(0x1e8)](_0x1c64e2-_0x120618[_0xa846f(0x295)])+_0x120618;}return snapshotStore=class _0x10dcec{constructor({dir:_0x1ef318,keepSnapshots:keepSnapshots=0x3,log:log=null}={}){const _0x34c42c=_0x50b8;if(!_0x1ef318)throw new Error('SnapshotStore\x20requires\x20dir');this[_0x34c42c(0x270)]=_0x1ef318,this[_0x34c42c(0x266)]=_0x3ac559['join'](_0x1ef318,'snapshots'),this[_0x34c42c(0x28e)]=_0x3ac559[_0x34c42c(0x200)](_0x1ef318,_0x34c42c(0x2a1)),this[_0x34c42c(0x204)]=_0x3ac559[_0x34c42c(0x200)](_0x1ef318,_0x34c42c(0x2ac)),this[_0x34c42c(0x229)]=keepSnapshots,this[_0x34c42c(0x286)]=log,_0x5b79ed[_0x34c42c(0x262)](this[_0x34c42c(0x270)],{'recursive':!![]}),_0x5b79ed[_0x34c42c(0x262)](this[_0x34c42c(0x266)],{'recursive':!![]});}[_0x4219bf(0x1fc)](_0x42d5e9){const _0x5885f5=_0x4219bf;return _0x3ac559[_0x5885f5(0x200)](this[_0x5885f5(0x266)],_0x42d5e9);}[_0x4219bf(0x298)](_0x488ea9){const _0x52e686=_0x4219bf,_0x5d632f=this['_snapshotDir'](_0x488ea9);return{'dir':_0x5d632f,'index':_0x3ac559['join'](_0x5d632f,_0x52e686(0x28c)),'labels':_0x3ac559[_0x52e686(0x200)](_0x5d632f,_0x52e686(0x268)),'state':_0x3ac559['join'](_0x5d632f,_0x52e686(0x201))};}[_0x4219bf(0x2ad)](){const _0x627a1e=_0x4219bf;if(!_0x231d4a(this[_0x627a1e(0x28e)]))return null;const _0x33632d=_0x3f6acd(this[_0x627a1e(0x28e)]);if(!_0x33632d)return null;const _0x2fba3a=String(_0x33632d)[_0x627a1e(0x25b)]();return _0x2fba3a||null;}[_0x4219bf(0x1fa)](){const _0x37f2eb=_0x4219bf,_0x24f395=this[_0x37f2eb(0x2ad)]();if(!_0x24f395)return 0x0;const _0x440bb4=Number(_0x24f395);return Number[_0x37f2eb(0x257)](_0x440bb4)?_0x440bb4:0x0;}[_0x4219bf(0x213)](){const _0x44c281=_0x4219bf;try{return _0x5b79ed[_0x44c281(0x21c)](this['snapshotsDir'],{'withFileTypes':!![]})[_0x44c281(0x2ab)](_0x3c5ea5=>_0x3c5ea5['isDirectory']())['map'](_0x940c3b=>_0x940c3b[_0x44c281(0x23d)])[_0x44c281(0x2ab)](_0x5a6a5e=>!_0x5a6a5e[_0x44c281(0x22b)](_0x44c281(0x2a7)))['filter'](_0x558be5=>!_0x558be5[_0x44c281(0x22b)]('_tmp-'))[_0x44c281(0x226)]();}catch{return[];}}[_0x4219bf(0x2a9)](){const _0x4821d7=_0x4219bf,_0x95b033=this[_0x4821d7(0x2ad)]();if(_0x95b033)return _0x95b033;const _0x5ad5c3=this['listSnapshotIds']();if(!_0x5ad5c3[_0x4821d7(0x295)])return null;return _0x5ad5c3[_0x5ad5c3[_0x4821d7(0x295)]-0x1];}[_0x4219bf(0x265)]({maxAgeMs:maxAgeMs=0x6*0x36ee80}={}){const _0xb5ad91=_0x4219bf;let _0x19feaa;try{_0x19feaa=_0x5b79ed[_0xb5ad91(0x21c)](this[_0xb5ad91(0x266)],{'withFileTypes':!![]});}catch{return;}const _0xd3f62f=_0x1dd6b0()-maxAgeMs;for(const _0x41d8c4 of _0x19feaa){if(!_0x41d8c4['isDirectory']())continue;const _0x301dda=_0x41d8c4[_0xb5ad91(0x23d)];if(!_0x301dda['startsWith']('.tmp-')&&!_0x301dda[_0xb5ad91(0x22b)](_0xb5ad91(0x23f)))continue;const _0x5d0da5=_0x3ac559['join'](this[_0xb5ad91(0x266)],_0x301dda);try{const _0x165138=_0x5b79ed['statSync'](_0x5d0da5);if(_0x165138[_0xb5ad91(0x23e)]>_0xd3f62f)continue;}catch{}try{_0x5b79ed[_0xb5ad91(0x280)](_0x5d0da5,{'recursive':!![],'force':!![]});}catch{}}}[_0x4219bf(0x250)]({keep:keep=null}={}){const _0x42fa8f=_0x4219bf,_0x5cc530=Math[_0x42fa8f(0x251)](0x1,Math[_0x42fa8f(0x24e)](keep??this['keepSnapshots']??0x3)),_0x267878=this[_0x42fa8f(0x213)]();if(_0x267878['length']<=_0x5cc530)return;const _0x1eb236=this[_0x42fa8f(0x2ad)](),_0x1cf8ab=_0x267878[_0x42fa8f(0x283)](0x0,Math[_0x42fa8f(0x251)](0x0,_0x267878[_0x42fa8f(0x295)]-_0x5cc530));for(const _0x11b65d of _0x1cf8ab){if(_0x1eb236&&_0x11b65d===_0x1eb236)continue;const _0x11f2e6=this[_0x42fa8f(0x1fc)](_0x11b65d);try{_0x5b79ed[_0x42fa8f(0x280)](_0x11f2e6,{'recursive':!![],'force':!![]});}catch{}}}async[_0x4219bf(0x27c)](_0x1e51e4,_0x46bf57){const _0x4d329d=_0x4219bf;if(!_0x1e51e4)throw new Error(_0x4d329d(0x22c));const _0x845c27=this[_0x4d329d(0x298)](_0x1e51e4);if(!_0x231d4a(_0x845c27[_0x4d329d(0x254)])||!_0x231d4a(_0x845c27['labels'])||!_0x231d4a(_0x845c27[_0x4d329d(0x221)]))throw new Error(_0x4d329d(0x244)+_0x1e51e4);const _0x28d433=await _0x46bf57(_0x845c27);return _0x28d433||{};}async[_0x4219bf(0x272)](_0x1f7ffb,_0x9c1593,{keep:keep=null,lockTimeoutMs:lockTimeoutMs=0x0,staleLockMaxAgeMs:staleLockMaxAgeMs=0xea60}={}){const _0x41a103=_0x4219bf,_0x3960aa=Number(_0x1f7ffb);if(!Number['isFinite'](_0x3960aa)||_0x3960aa<0x0)throw new Error(_0x41a103(0x2a8));const _0x9ecb27=_0x13c78f(_0x3960aa),_0x4275ad=this[_0x41a103(0x1fc)](_0x9ecb27),_0x5afa14=_0x3ac559[_0x41a103(0x200)](this[_0x41a103(0x266)],_0x41a103(0x2a7)+_0x9ecb27+'-'+_0xa6e0a4[_0x41a103(0x263)](0x6)[_0x41a103(0x1ff)](_0x41a103(0x1ee)));_0x5b79ed[_0x41a103(0x262)](_0x5afa14,{'recursive':!![]});const _0x504996={'dir':_0x5afa14,'index':_0x3ac559['join'](_0x5afa14,_0x41a103(0x28c)),'labels':_0x3ac559[_0x41a103(0x200)](_0x5afa14,_0x41a103(0x268)),'state':_0x3ac559[_0x41a103(0x200)](_0x5afa14,_0x41a103(0x201))};await _0x9c1593(_0x504996,{'id':_0x9ecb27,'clock':_0x3960aa});const _0x368c42=JSON[_0x41a103(0x24d)]({'pid':process['pid'],'host':_0x28fe05[_0x41a103(0x253)](),'at':_0x1dd6b0()}),_0x2d08fc=_0x1dd6b0();let _0x522fd0=null;const _0x488086=()=>{const _0x17c29a=_0x41a103;try{const _0x27cc4a=JSON[_0x17c29a(0x217)](_0x5b79ed[_0x17c29a(0x1e2)](this[_0x17c29a(0x204)],_0x17c29a(0x21e)));if(_0x27cc4a['at']&&_0x1dd6b0()-_0x27cc4a['at']>staleLockMaxAgeMs){const _0x245ddc=_0x1dd6b0()-_0x27cc4a['at'],_0x44a08d=_0x17c29a(0x2b1)+Math[_0x17c29a(0x20e)](_0x245ddc/0x3e8)+'s,\x20pid:\x20'+_0x27cc4a[_0x17c29a(0x26e)]+_0x17c29a(0x2a4)+_0x27cc4a[_0x17c29a(0x1e5)]+_0x17c29a(0x2af)+_0x17c29a(0x27a);this[_0x17c29a(0x286)]?.['warn']?this['log']['warn'](_0x44a08d):console[_0x17c29a(0x1ef)](_0x17c29a(0x222),_0x44a08d);try{_0x5b79ed[_0x17c29a(0x1e1)](this[_0x17c29a(0x204)]);}catch{}return!![];}}catch{try{_0x5b79ed[_0x17c29a(0x1e1)](this[_0x17c29a(0x204)]);}catch{}}return![];},_0x36d95f=()=>{const _0x25e020=_0x41a103;try{return _0x522fd0=_0x5b79ed[_0x25e020(0x29b)](this['lockPath'],'wx'),_0x5b79ed[_0x25e020(0x21b)](_0x522fd0,_0x368c42),!![];}catch(_0x34064d){if(_0x34064d&&_0x34064d[_0x25e020(0x1f6)]==='EEXIST')return![];throw _0x34064d;}};if(!_0x36d95f()){_0x488086(),_0x36d95f();if(_0x522fd0==null&&lockTimeoutMs>0x0)while(_0x1dd6b0()-_0x2d08fc<lockTimeoutMs){await new Promise(_0x4c8288=>setTimeout(_0x4c8288,0x19));if(_0x36d95f())break;_0x488086();}}if(_0x522fd0==null){try{_0x5b79ed[_0x41a103(0x280)](_0x5afa14,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':'lock_busy'};}try{const _0x440cb8=this[_0x41a103(0x1fa)]();if(_0x3960aa<=_0x440cb8){try{_0x5b79ed[_0x41a103(0x280)](_0x5afa14,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':'stale','currentClock':_0x440cb8};}if(!_0x231d4a(_0x4275ad))_0x5b79ed[_0x41a103(0x27d)](_0x5afa14,_0x4275ad);else try{_0x5b79ed['rmSync'](_0x5afa14,{'recursive':!![],'force':!![]});}catch{}return _0x1cc405(this[_0x41a103(0x28e)],_0x9ecb27+'\x0a'),this[_0x41a103(0x250)]({'keep':keep}),{'published':!![],'currentClock':_0x3960aa};}finally{try{_0x5b79ed['closeSync'](_0x522fd0);}catch{}try{_0x5b79ed[_0x41a103(0x1e1)](this[_0x41a103(0x204)]);}catch{}}}},snapshotStore;}var labelMap,hasRequiredLabelMap;function requireLabelMap(){const _0x4941de=_0x591ed2;if(hasRequiredLabelMap)return labelMap;hasRequiredLabelMap=0x1;const _0x5276d1=require$$0;class _0x456752{constructor(){const _0x4f93fb=_0x50b8;this[_0x4f93fb(0x22f)]=new Map(),this['labelToKey']=new Map(),this[_0x4f93fb(0x2b3)]=0x0,this[_0x4f93fb(0x233)]=0x0,this['keyToFp']=new Map(),this[_0x4f93fb(0x223)]=!![];}async[_0x4941de(0x20c)](){const _0xae16a6=_0x4941de;this[_0xae16a6(0x22f)]=new Map(),this['labelToKey']=new Map(),this[_0xae16a6(0x239)]=new Map(),this[_0xae16a6(0x223)]=!![],this[_0xae16a6(0x2b3)]=0x0,this[_0xae16a6(0x233)]=0x0;}async['loadFrom'](_0x1b8690){const _0x488398=_0x4941de;if(!_0x1b8690||!_0x5276d1[_0x488398(0x25f)](_0x1b8690))return await this[_0x488398(0x20c)](),!![];let _0xddb22e;try{_0xddb22e=_0x5276d1[_0x488398(0x1e2)](_0x1b8690,_0x488398(0x21e));}catch{return await this[_0x488398(0x20c)](),!![];}let _0x42a9fc;try{_0x42a9fc=JSON['parse'](_0xddb22e);}catch{return await this['reset'](),!![];}const _0x2bddc6=Array['isArray'](_0x42a9fc?.[_0x488398(0x22d)])?_0x42a9fc[_0x488398(0x22d)]:[],_0x2721ab=Number['isInteger'](_0x42a9fc?.[_0x488398(0x2b3)])?_0x42a9fc[_0x488398(0x2b3)]:0x0,_0x31129e=new Map(),_0x2c99e4=new Map(),_0x294603=new Map(),_0x45c2a9=_0x42a9fc?.['version']>=0x2;let _0x941949=-0x1;for(const _0x56f217 of _0x2bddc6){if(!Array[_0x488398(0x1eb)](_0x56f217)||_0x56f217[_0x488398(0x295)]<0x2)continue;const _0x33e7db=Number(_0x56f217[0x0]),_0x41e181=String(_0x56f217[0x1]??'');if(!Number['isInteger'](_0x33e7db)||_0x33e7db<0x0)continue;if(!_0x41e181)continue;_0x31129e[_0x488398(0x24c)](_0x41e181,_0x33e7db),_0x2c99e4['set'](_0x33e7db,_0x41e181);if(_0x45c2a9&&typeof _0x56f217[0x2]===_0x488398(0x249))_0x294603['set'](_0x41e181,_0x56f217[0x2]);if(_0x33e7db>_0x941949)_0x941949=_0x33e7db;}return this['keyToLabel']=_0x31129e,this[_0x488398(0x252)]=_0x2c99e4,this[_0x488398(0x239)]=_0x294603,this[_0x488398(0x223)]=_0x45c2a9,this[_0x488398(0x2b3)]=Math['max'](_0x2721ab,_0x941949+0x1,0x0),this['_tombstoneCount']=0x0,!![];}[_0x4941de(0x22a)](_0xd45a50){const _0x55099a=_0x4941de;return this[_0x55099a(0x22f)][_0x55099a(0x245)](_0xd45a50);}[_0x4941de(0x1f7)](_0x3fa8f2){const _0x48c21c=_0x4941de;let _0x310aaa=this[_0x48c21c(0x22f)][_0x48c21c(0x245)](_0x3fa8f2);if(_0x310aaa!==undefined)return _0x310aaa;return _0x310aaa=this[_0x48c21c(0x2b3)]++,this[_0x48c21c(0x22f)][_0x48c21c(0x24c)](_0x3fa8f2,_0x310aaa),this[_0x48c21c(0x252)][_0x48c21c(0x24c)](_0x310aaa,_0x3fa8f2),_0x310aaa;}[_0x4941de(0x2b0)](_0x9481b6,_0x5a59e8){const _0x1f09fb=_0x4941de;if(_0x5a59e8==null)this['keyToFp'][_0x1f09fb(0x1ea)](_0x9481b6);else this[_0x1f09fb(0x239)][_0x1f09fb(0x24c)](_0x9481b6,_0x5a59e8);}['fingerprintOf'](_0x2f50f1){const _0x315938=_0x4941de;return this[_0x315938(0x239)]['get'](_0x2f50f1);}[_0x4941de(0x23b)](){const _0x42bb2e=_0x4941de;return this['keyToLabel'][_0x42bb2e(0x23b)]();}['tombstone'](_0x3e580b){const _0x219895=_0x4941de,_0xf1908b=this['keyToLabel'][_0x219895(0x245)](_0x3e580b);if(_0xf1908b===undefined)return;this[_0x219895(0x239)][_0x219895(0x1ea)](_0x3e580b),this['keyToLabel'][_0x219895(0x1ea)](_0x3e580b),this[_0x219895(0x252)]['delete'](_0xf1908b),this[_0x219895(0x233)]++;}[_0x4941de(0x1f5)](_0x3de0e9){const _0x4089d8=_0x4941de;return this[_0x4089d8(0x252)]['get'](_0x3de0e9)??null;}[_0x4941de(0x25e)](){const _0x295344=_0x4941de;return this[_0x295344(0x22f)][_0x295344(0x25e)];}['tombstoneCount'](){return this['_tombstoneCount'];}async['snapshotTo'](_0x558950){const _0x46a81d=_0x4941de,_0x5b0dde=_0x558950+_0x46a81d(0x243),_0x4abc5e=[];for(const [_0x3eec80,_0x59d533]of this['labelToKey'][_0x46a81d(0x22d)]()){const _0x559c27=this['keyToFp'][_0x46a81d(0x245)](_0x59d533);_0x4abc5e['push'](_0x559c27==null?[_0x3eec80,_0x59d533]:[_0x3eec80,_0x59d533,_0x559c27]);}_0x4abc5e[_0x46a81d(0x226)]((_0x499b21,_0x53725f)=>_0x499b21[0x0]-_0x53725f[0x0]);const _0x934722={'version':0x2,'nextLabel':this[_0x46a81d(0x2b3)],'entries':_0x4abc5e};_0x5276d1['writeFileSync'](_0x5b0dde,JSON[_0x46a81d(0x24d)](_0x934722)),_0x5276d1[_0x46a81d(0x27d)](_0x5b0dde,_0x558950);}}return labelMap=_0x456752,labelMap;}var indexConvergence,hasRequiredIndexConvergence;function requireIndexConvergence(){if(hasRequiredIndexConvergence)return indexConvergence;hasRequiredIndexConvergence=0x1;function _0x579d3c(_0x2c4e01){const _0x135aac=_0x50b8,_0x1992f4=new Uint32Array(_0x2c4e01[_0x135aac(0x1e3)],_0x2c4e01[_0x135aac(0x1e6)],_0x2c4e01[_0x135aac(0x295)]);let _0x1ff7bf=0x811c9dc5,_0x142cfa=0x9747b28c;for(let _0x1b0ca6=0x0;_0x1b0ca6<_0x1992f4[_0x135aac(0x295)];_0x1b0ca6++){const _0x58b5d1=_0x1992f4[_0x1b0ca6];_0x1ff7bf=Math['imul'](_0x1ff7bf^_0x58b5d1,0x1000193)>>>0x0;let _0x51b280=Math[_0x135aac(0x264)](_0x58b5d1,0xcc9e2d51);_0x51b280=_0x51b280<<0xf|_0x51b280>>>0x11,_0x142cfa=Math[_0x135aac(0x264)](_0x142cfa^Math[_0x135aac(0x264)](_0x51b280,0x1b873593),0x5)+0xe6546b64,_0x142cfa>>>=0x0;}return _0x142cfa=Math[_0x135aac(0x264)](_0x142cfa^_0x142cfa>>>0x10,0x85ebca6b)>>>0x0,(_0x1ff7bf>>>0x0)*0x100000+(_0x142cfa&0xfffff);}function _0xb1b5c5(_0x4bdeaf,_0x2d6455,_0x61f798,{upsert:_0x57d0c9,remove:_0x400d9f}){const _0x1b32e7=_0x50b8,_0x12f3ba=new Set();let _0x2bb2e0=0x0,_0x2627f9=0x0,_0x5c57dc=0x0;for(const {key:_0x2b4ace,vector:_0x81c7bf}of _0x2d6455){if(!(_0x81c7bf instanceof Float32Array)||_0x81c7bf['length']!==_0x61f798)continue;_0x12f3ba[_0x1b32e7(0x281)](_0x2b4ace);const _0x29eb8b=_0x579d3c(_0x81c7bf),_0x488ba5=_0x4bdeaf['labelForExisting'](_0x2b4ace)!==undefined;if(_0x488ba5&&_0x4bdeaf['fingerprintOf'](_0x2b4ace)===_0x29eb8b)continue;_0x57d0c9(_0x2b4ace,_0x81c7bf,_0x29eb8b);if(_0x488ba5)_0x2627f9++;else _0x2bb2e0++;}for(const _0x4e17a4 of[..._0x4bdeaf['keys']()]){if(_0x12f3ba[_0x1b32e7(0x1ec)](_0x4e17a4))continue;_0x400d9f(_0x4e17a4),_0x5c57dc++;}return{'added':_0x2bb2e0,'changed':_0x2627f9,'removed':_0x5c57dc};}return indexConvergence={'fingerprint':_0x579d3c,'reconcileIndex':_0xb1b5c5},indexConvergence;}function _0x414d(){const _0x5b9c6b=['error','filter','SNAPSHOT.LOCK','readCurrentId','writeIndexSync',').\x20','setFingerprint','Breaking\x20stale\x20snapshot\x20lock\x20(age:\x20','resizeIndex','nextLabel','ceil','ScalarKind','platform','changed','isFree','reject','Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22/\x22hnsw\x22\x20instead.\x20','unreadable','unlinkSync','readFileSync','buffer','usearch\x20algorithm\x20unavailable:\x20the\x20native\x20\x22usearch\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','host','byteOffset','then','repeat','memoryUsage','delete','isArray','has','crypto','hex','warn','4034235NlMwiu','fid','rebuild','efSearch','manifestVersion','keyForLabel','code','labelForEphemeral','efConstruction','getMaxElements','readCurrentClock','hnsw\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','_snapshotDir','count','usearch\x20algorithm\x20requires\x20dims\x20>\x200','toString','join','state.json','tombstone','10070luNPIP','lockPath','metric','HNSW_BINDINGS_UNAVAILABLE','capacity','usearch\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','vector','exports','now','reset','stop','round','postMessage','message','key','info','listSnapshotIds','writerLockMaxAgeMs','fingerprintOf','Index','parse','loadFrom','snapshotMaxLagMs','fetchAll','writeFileSync','readdirSync','F32','utf8','token','usearch','state','[SnapshotStore]','hasFingerprints','46215jccTNO','expansionSearch','sort','cause','hnsw\x20algorithm\x20requires\x20dims\x20>\x200','keepSnapshots','labelForExisting','startsWith','snapshot\x20id\x20required','entries','search','keyToLabel','reader','distances','Original\x20error:\x20','_tombstoneCount','sync','searchKnn','HNSW\x20algorithm\x20unavailable:\x20the\x20native\x20\x22hnswlib-node\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','growFactor','release','keyToFp','__esModule','keys','457842FUxJPu','name','mtimeMs','_tmp-','2556ZeTfOe','sqrt','default','.tmp','snapshot\x20incomplete:\x20','get','hnsw','hnswlib-node','7EIrdLL','number','load','vectors','set','stringify','trunc','removed','prune','max','labelToKey','hostname','index','node','score','isFinite','MetricKind','ENOENT','maxElements','trim','491CGDwDK','viewRefreshMs','size','existsSync','catch','unref','mkdirSync','randomBytes','imul','cleanupTmpDirs','snapshotsDir','flat','labels.json','2793117jpFhar','readIndexSync','HierarchicalNSW','acquire','dims','pid','heartbeatIntervalMs','dir','writer','publishSnapshot','snapshot','markDelete','connectivity','queryVec','cosine','closeSync','path','This\x20is\x20risky\x20on\x20slow\x20disks\x20or\x20overloaded\x20machines.\x20Consider\x20increasing\x20staleLockMaxAgeMs\x20if\x20this\x20happens\x20frequently.','remove','loadSnapshot','renameSync','labels','isInteger','rmSync','add','snapshotTo','slice','from','\x20on\x20','log','hasRows','tmpMaxAgeMs','4jiTQke','4716sCiBYW','4288uTsrnr','index.hnsw','setEf','currentPath','Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22\x20instead.\x20','ready','L2sq','fetchAllResult','clear','USEARCH_BINDINGS_UNAVAILABLE','length','2478GWdLVq','clock','_snapshotPaths','expansionAdd','finally','openSync','resolve','arch','push','11605tpnhxw','save','CURRENT','snapshotEveryChanges','published',',\x20host:\x20','versions','Cos','.tmp-','candidateClock\x20must\x20be\x20finite\x20>=\x200','latestSnapshotId'];_0x414d=function(){return _0x5b9c6b;};return _0x414d();}var hnsw,hasRequiredHnsw;function requireHnsw(){if(hasRequiredHnsw)return hnsw;hasRequiredHnsw=0x1;const _0x4f6e78=requireSnapshotStore(),_0x3579aa=requireLabelMap(),{fingerprint:_0x4edf74,reconcileIndex:_0x572340}=requireIndexConvergence(),_0x15f4fe=0x1;let _0x7e80ad=null;function _0x468691(){const _0x41f0df=_0x50b8;if(_0x7e80ad)return _0x7e80ad;try{return _0x7e80ad=require(_0x41f0df(0x247)),_0x7e80ad;}catch(_0x511198){const _0x2dc947=new Error(_0x41f0df(0x236)+('for\x20Node\x20'+process[_0x41f0df(0x2a5)][_0x41f0df(0x255)]+_0x41f0df(0x285)+process[_0x41f0df(0x1db)]+'/'+process[_0x41f0df(0x29d)]+'.\x20')+_0x41f0df(0x28f)+(_0x41f0df(0x232)+(_0x511198?.['message']||String(_0x511198))));_0x2dc947[_0x41f0df(0x1f6)]=_0x41f0df(0x206),_0x2dc947[_0x41f0df(0x227)]=_0x511198;throw _0x2dc947;}}return hnsw=function _0xfd0508(_0x1ec33d={},{dims:_0x288671,dir:_0x5a53d7}){const _0x3bfa97=_0x50b8,_0x21833b=_0x468691();if(!_0x288671||_0x288671<=0x0)throw new Error(_0x3bfa97(0x228));if(!_0x5a53d7)throw new Error(_0x3bfa97(0x1fb));const _0x509141={'metric':_0x1ec33d['metric']??'cosine','M':_0x1ec33d['M']??0x10,'efConstruction':_0x1ec33d[_0x3bfa97(0x1f8)]??0xc8,'efSearch':_0x1ec33d[_0x3bfa97(0x1f3)]??0x40,'maxElements':_0x1ec33d['maxElements']??0x400,'growFactor':_0x1ec33d['growFactor']??0x2,'snapshotEveryChanges':_0x1ec33d['snapshotEveryChanges']??0xc350,'keepSnapshots':_0x1ec33d[_0x3bfa97(0x229)]??0x2,'tmpMaxAgeMs':_0x1ec33d[_0x3bfa97(0x288)]??0x6*0x36ee80},_0x417cf4=new _0x4f6e78({'dir':_0x5a53d7,'keepSnapshots':_0x509141[_0x3bfa97(0x229)]}),_0x3a3c31=new _0x3579aa();let _0x39f3fe=null,_0x2c8029=0x0,_0x205e9e=null,_0x35cc52=Promise[_0x3bfa97(0x29c)]();const _0x14e6d0=_0x4a5e0c=>{const _0x2d9d70=_0x3bfa97,_0x172077=_0x35cc52[_0x2d9d70(0x1e7)](_0x4a5e0c);return _0x35cc52=_0x172077[_0x2d9d70(0x260)](()=>{}),_0x172077;};async function _0x2e5242(_0x295103){const _0x50299f=_0x3bfa97;await _0x3a3c31[_0x50299f(0x20c)](),_0x295103=_0x295103??[];const _0x32d82e=Math[_0x50299f(0x251)](_0x509141[_0x50299f(0x25a)],Math['ceil'](_0x295103['length']*(_0x509141['growFactor']||1.2)),0x1);_0x39f3fe=new _0x21833b[(_0x50299f(0x26b))](_0x509141[_0x50299f(0x205)],_0x288671),_0x39f3fe['initIndex']({'maxElements':_0x32d82e,'efConstruction':_0x509141[_0x50299f(0x1f8)],'M':_0x509141['M']});for(const {key:_0x4824b2,vector:_0x1fe8d1}of _0x295103){if(!(_0x1fe8d1 instanceof Float32Array)||_0x1fe8d1[_0x50299f(0x295)]!==_0x288671)continue;_0x4379c1(_0x4824b2,_0x1fe8d1);}_0x39f3fe[_0x50299f(0x28d)](_0x509141[_0x50299f(0x1f3)]),_0x2c8029=0x0;}async function _0x4dcc76(_0x4ca356){return _0x2e5242(_0x4ca356?await _0x4ca356():[]);}function _0xd7aab1(){const _0x31b8e7=_0x3bfa97;if(_0x39f3fe['getCurrentCount']()<_0x39f3fe[_0x31b8e7(0x1f9)]())return;const _0x166d11=Math[_0x31b8e7(0x2b4)](_0x39f3fe[_0x31b8e7(0x1f9)]()*(_0x509141[_0x31b8e7(0x237)]||0x2));_0x39f3fe[_0x31b8e7(0x2b2)](_0x166d11),_0x509141[_0x31b8e7(0x25a)]=_0x166d11;}function _0x4379c1(_0x534d29,_0x4ebb3b,_0x42bda3){const _0x421ebc=_0x3bfa97,_0x186861=_0x3a3c31[_0x421ebc(0x1f7)](_0x534d29);try{_0x39f3fe[_0x421ebc(0x274)](_0x186861);}catch{}_0xd7aab1(),_0x39f3fe['addPoint'](Array[_0x421ebc(0x284)](_0x4ebb3b),_0x186861),_0x3a3c31[_0x421ebc(0x2b0)](_0x534d29,_0x42bda3??_0x4edf74(_0x4ebb3b));}function _0x309d9f(_0x4fe483){const _0x5624ec=_0x3bfa97,_0x3431c4=_0x3a3c31[_0x5624ec(0x22a)](_0x4fe483);if(_0x3431c4===undefined)return![];try{_0x39f3fe[_0x5624ec(0x274)](_0x3431c4);}catch{}return _0x3a3c31[_0x5624ec(0x202)](_0x4fe483),!![];}function _0xf83da(){const _0x1a9718=_0x3bfa97;return Math[_0x1a9718(0x251)](Date[_0x1a9718(0x20b)](),_0x417cf4[_0x1a9718(0x1fa)]()+0x1);}async function _0x574d9b(_0x4022a7){const _0x535c93=_0x3bfa97;if(!_0x39f3fe||!_0x4022a7)return![];const _0x3f8e33=await _0x417cf4['publishSnapshot'](_0x4022a7,async _0x56043a=>{const _0x41975b=_0x50b8;_0x39f3fe[_0x41975b(0x2ae)](_0x56043a[_0x41975b(0x254)]),await _0x3a3c31[_0x41975b(0x282)](_0x56043a[_0x41975b(0x27e)]);const _0x36b13d=require$$0;_0x36b13d['writeFileSync'](_0x56043a[_0x41975b(0x221)],JSON[_0x41975b(0x24d)]({'manifestVersion':_0x15f4fe,'dims':_0x288671,'metric':_0x509141[_0x41975b(0x205)],'clock':_0x4022a7,'snapshotAt':Date[_0x41975b(0x20b)]()},null,0x2));},{'keep':_0x509141[_0x535c93(0x229)]});if(_0x3f8e33?.[_0x535c93(0x2a3)])_0x2c8029=0x0;return _0x3f8e33?.[_0x535c93(0x2a3)]??![];}async function _0x1fbffc(){const _0x4b7338=_0x3bfa97,_0x51f152=_0x417cf4['readCurrentId']()||_0x417cf4[_0x4b7338(0x2a9)]();if(!_0x51f152)return null;let _0x58327d,_0x3c48cc=![];return await _0x417cf4[_0x4b7338(0x27c)](_0x51f152,async _0x250bc8=>{const _0x418b98=_0x4b7338,_0x3f598b=require$$0;_0x58327d=JSON[_0x418b98(0x217)](_0x3f598b['readFileSync'](_0x250bc8[_0x418b98(0x221)],_0x418b98(0x21e)));if(_0x58327d[_0x418b98(0x1f4)]!==_0x15f4fe||_0x58327d['dims']!==_0x288671||_0x58327d[_0x418b98(0x205)]!==_0x509141[_0x418b98(0x205)]){_0x58327d=null;return;}await _0x3a3c31[_0x418b98(0x218)](_0x250bc8[_0x418b98(0x27e)]),_0x39f3fe=new _0x21833b[(_0x418b98(0x26b))](_0x509141[_0x418b98(0x205)],_0x288671),_0x39f3fe[_0x418b98(0x26a)](_0x250bc8['index']),_0x39f3fe[_0x418b98(0x28d)](_0x509141[_0x418b98(0x1f3)]),_0x3c48cc=!![];}),_0x3c48cc?_0x58327d?.[_0x4b7338(0x297)]??0x0:null;}return{async 'load'(_0x24f3b2){return _0x14e6d0(async()=>{const _0x1bd7fc=_0x50b8;_0x417cf4['cleanupTmpDirs']({'maxAgeMs':_0x509141[_0x1bd7fc(0x288)]}),_0x205e9e=_0x24f3b2??null;const _0x388b32=await _0x1fbffc(),_0x34e4e9=_0x24f3b2?await _0x24f3b2():null;if(_0x388b32!=null){if(_0x34e4e9){if(!_0x3a3c31[_0x1bd7fc(0x223)])return await _0x2e5242(_0x34e4e9),null;const _0x110683=_0x572340(_0x3a3c31,_0x34e4e9,_0x288671,{'upsert':_0x4379c1,'remove':_0x309d9f});_0x2c8029+=_0x110683['added']+_0x110683[_0x1bd7fc(0x1dc)]+_0x110683['removed'];}return _0x388b32;}return await _0x2e5242(_0x34e4e9),null;});},async 'add'(_0x4b28b0,_0x5025e4,_0x117951){return _0x14e6d0(async()=>{if(!_0x39f3fe)return;const _0x1b2ebd=_0x5025e4 instanceof Float32Array?_0x5025e4:new Float32Array(_0x5025e4),_0x809c6e=_0x4edf74(_0x1b2ebd);if(_0x3a3c31['fingerprintOf'](_0x4b28b0)===_0x809c6e)return;_0x4379c1(_0x4b28b0,_0x1b2ebd,_0x809c6e),_0x2c8029++,_0x2c8029>=_0x509141['snapshotEveryChanges']&&await _0x574d9b(_0xf83da());});},async 'remove'(_0x26be97){return _0x14e6d0(async()=>{if(!_0x39f3fe)return;if(_0x309d9f(_0x26be97))_0x2c8029++;});},'search'(_0x502aae,{limit:limit=0xa,efSearch:_0xec151f}={}){const _0x37dd84=_0x3bfa97;if(!_0x39f3fe)return[];if(Number[_0x37dd84(0x27f)](_0xec151f))_0x39f3fe[_0x37dd84(0x28d)](_0xec151f);const _0x4c33c2=Math['min'](limit,_0x39f3fe['getCurrentCount']()||0x1),{neighbors:_0x3850a4,distances:_0x3b7f45}=_0x39f3fe[_0x37dd84(0x235)](Array[_0x37dd84(0x284)](_0x502aae),_0x4c33c2),_0x4dfde3=[];for(let _0x1c043a=0x0;_0x1c043a<_0x3850a4['length'];_0x1c043a++){const _0x1175ef=_0x3a3c31[_0x37dd84(0x1f5)](_0x3850a4[_0x1c043a]);if(!_0x1175ef)continue;const _0x331b32=_0x509141[_0x37dd84(0x205)]===_0x37dd84(0x277)?Math[_0x37dd84(0x251)](0x0,0x1-_0x3b7f45[_0x1c043a]):0x1/(0x1+_0x3b7f45[_0x1c043a]);_0x4dfde3[_0x37dd84(0x29e)]({'key':_0x1175ef,'score':_0x331b32});}return _0x4dfde3;},async 'snapshot'(_0x37c56c){return _0x14e6d0(()=>_0x574d9b(_0x37c56c??_0xf83da()));},async 'rebuild'(_0x3ec4b7){return _0x14e6d0(()=>{if(_0x3ec4b7!=null)_0x205e9e=_0x3ec4b7;return _0x4dcc76(_0x3ec4b7??_0x205e9e);});},async 'stop'(){const _0x465c58=_0x3bfa97;return _0x14e6d0(()=>_0x2c8029>0x0||!_0x417cf4[_0x465c58(0x2ad)]()?_0x574d9b(_0xf83da()):![]);},'count'(){const _0x3fef7b=_0x3bfa97;return _0x3a3c31[_0x3fef7b(0x25e)]();},'info'(){const _0x5afe99=_0x3bfa97;return{'algorithm':_0x5afe99(0x246),'metric':_0x509141[_0x5afe99(0x205)],'M':_0x509141['M'],'efConstruction':_0x509141[_0x5afe99(0x1f8)],'efSearch':_0x509141[_0x5afe99(0x1f3)],'maxElements':_0x39f3fe?.[_0x5afe99(0x1f9)]()??_0x509141[_0x5afe99(0x25a)],'count':_0x3a3c31[_0x5afe99(0x25e)](),'changesSince':_0x2c8029,'snapshotDir':_0x5a53d7,'latestSnapshot':_0x417cf4[_0x5afe99(0x2ad)]()??null};}};},hnsw;}var flat,hasRequiredFlat;function requireFlat(){if(hasRequiredFlat)return flat;hasRequiredFlat=0x1,flat=function _0x3b336a(_0x10fbe2={}){const _0x42b571=new Map();return{async 'load'(_0x392d14){const _0xe2b6c8=_0x50b8;_0x42b571[_0xe2b6c8(0x293)]();if(_0x392d14)for(const {key:_0x1b3c77,vector:_0x110d38}of await _0x392d14()){_0x42b571[_0xe2b6c8(0x24c)](_0x1b3c77,_0x110d38);}},async 'add'(_0x1d6e58,_0x4d818b,_0x6f74f2){const _0x29c8b9=_0x50b8;_0x42b571[_0x29c8b9(0x24c)](_0x1d6e58,_0x4d818b);},async 'remove'(_0x2728b4){_0x42b571['delete'](_0x2728b4);},'search'(_0x2b03b5,{limit:limit=0xa,threshold:threshold=0x0}={}){const _0x5d221a=_0x50b8,_0x312d02=[];for(const [_0x1d5313,_0x64008b]of _0x42b571){const _0x2252a7=_0x38cc90(_0x2b03b5,_0x64008b);if(_0x2252a7>=threshold)_0x312d02[_0x5d221a(0x29e)]({'key':_0x1d5313,'score':_0x2252a7});}return _0x312d02[_0x5d221a(0x226)]((_0x45e002,_0x4149d6)=>_0x4149d6['score']-_0x45e002[_0x5d221a(0x256)]),_0x312d02[_0x5d221a(0x283)](0x0,limit);},async 'snapshot'(){return![];},async 'rebuild'(_0x3921ca){const _0xda79ad=_0x50b8;await this[_0xda79ad(0x24a)](_0x3921ca);},async 'stop'(){},'count'(){return _0x42b571['size'];},'info'(){return{'algorithm':'flat','count':_0x42b571['size']};}};};function _0x38cc90(_0x385f9f,_0x56b118){const _0x2ac5c0=_0x50b8;let _0x345996=0x0,_0x57162d=0x0,_0x1786bc=0x0;for(let _0x5b1846=0x0;_0x5b1846<_0x385f9f['length'];_0x5b1846++){_0x345996+=_0x385f9f[_0x5b1846]*_0x56b118[_0x5b1846],_0x57162d+=_0x385f9f[_0x5b1846]*_0x385f9f[_0x5b1846],_0x1786bc+=_0x56b118[_0x5b1846]*_0x56b118[_0x5b1846];}const _0x58d09e=Math['sqrt'](_0x57162d)*Math[_0x2ac5c0(0x241)](_0x1786bc);return _0x58d09e===0x0?0x0:_0x345996/_0x58d09e;}return flat;}var writerLock,hasRequiredWriterLock;function requireWriterLock(){if(hasRequiredWriterLock)return writerLock;hasRequiredWriterLock=0x1;const _0x2a68c0=require$$0,_0x3b7ab4=require$$1,_0x2726d6=require$$3;return writerLock=function _0xf94222(_0x1c92f5,{maxAgeMs:maxAgeMs=0x3a98,heartbeatMs:heartbeatMs=0x1388,onLost:onLost=null}={}){const _0x3f839c=_0x50b8,_0x118596=_0x3b7ab4[_0x3f839c(0x200)](_0x1c92f5,'WRITER.LOCK'),_0x41431e=_0x2726d6['randomBytes'](0x8)['toString'](_0x3f839c(0x1ee));let _0x2015bf=![],_0x1d5fab=null;const _0x4efd33=()=>JSON[_0x3f839c(0x24d)]({'pid':process[_0x3f839c(0x26e)],'token':_0x41431e,'at':Date[_0x3f839c(0x20b)]()});function _0x3b2504(){const _0x149887=_0x3f839c;try{return JSON[_0x149887(0x217)](_0x2a68c0[_0x149887(0x1e2)](_0x118596,_0x149887(0x21e)));}catch(_0x49fcc1){return _0x49fcc1?.[_0x149887(0x1f6)]===_0x149887(0x259)?null:{'unreadable':!![]};}}function _0x23d7ca(){const _0x2a9a7d=_0x3f839c;try{const _0x41516e=_0x2a68c0[_0x2a9a7d(0x29b)](_0x118596,'wx');try{_0x2a68c0[_0x2a9a7d(0x21b)](_0x41516e,_0x4efd33());}finally{_0x2a68c0[_0x2a9a7d(0x278)](_0x41516e);}return!![];}catch(_0x7a2202){if(_0x7a2202?.[_0x2a9a7d(0x1f6)]==='EEXIST')return![];throw _0x7a2202;}}function _0x77a0e6(_0x2742ae){const _0x58a09b=_0x3f839c;if(!_0x2742ae)return!![];if(_0x2742ae[_0x58a09b(0x1e0)])return!![];return Date[_0x58a09b(0x20b)]()-(_0x2742ae['at']??0x0)>=maxAgeMs;}function _0x33c37b(){if(_0x1d5fab)clearInterval(_0x1d5fab);_0x1d5fab=null;}function _0x572b56(){const _0x47237f=_0x3f839c;_0x33c37b(),_0x1d5fab=setInterval(()=>{const _0x36cf76=_0x50b8,_0x4010de=_0x3b2504();if(_0x4010de&&!_0x4010de[_0x36cf76(0x1e0)]&&_0x4010de[_0x36cf76(0x21f)]!==_0x41431e){_0x2015bf=![],_0x33c37b();try{onLost?.();}catch{}return;}try{_0x2a68c0[_0x36cf76(0x21b)](_0x118596,_0x4efd33());}catch{}},heartbeatMs),_0x1d5fab[_0x47237f(0x261)]?.();}function _0x265332(){const _0x17ac6a=_0x3f839c,_0x2019d4=_0x3b2504();return!!_0x2019d4&&_0x2019d4[_0x17ac6a(0x21f)]===_0x41431e;}return{'path':_0x118596,'token':_0x41431e,'acquire'(){const _0x20c007=_0x3b2504();if(_0x20c007&&_0x20c007['token']===_0x41431e){_0x2015bf=!![];if(!_0x1d5fab)_0x572b56();return!![];}let _0x452c1a=_0x23d7ca();if(!_0x452c1a&&_0x77a0e6(_0x3b2504())){try{_0x2a68c0['unlinkSync'](_0x118596);}catch{}_0x452c1a=_0x23d7ca();}if(_0x452c1a&&!_0x265332())_0x452c1a=![];_0x2015bf=_0x452c1a;if(_0x452c1a)_0x572b56();return _0x452c1a;},'held'(){return _0x2015bf;},'isFree'(){const _0x2d864b=_0x3f839c,_0x25eb35=_0x3b2504();if(_0x25eb35&&_0x25eb35[_0x2d864b(0x21f)]===_0x41431e)return![];return _0x77a0e6(_0x25eb35);},'release'(){const _0x3c1940=_0x3f839c;_0x33c37b();if(!_0x2015bf)return;_0x2015bf=![];if(_0x265332())try{_0x2a68c0[_0x3c1940(0x1e1)](_0x118596);}catch{}}};},writerLock;}var usearch,hasRequiredUsearch;function requireUsearch(){if(hasRequiredUsearch)return usearch;hasRequiredUsearch=0x1;const _0x3374ff=require$$0,_0x218df2=requireSnapshotStore(),_0x32f9d5=requireLabelMap(),_0x5ed3e1=requireWriterLock(),{fingerprint:_0x266e98,reconcileIndex:_0x1ba238}=requireIndexConvergence(),_0xe956c9=0x1;let _0x29f4b3=null;function _0x2d8a48(){const _0x17cc12=_0x50b8;if(_0x29f4b3)return _0x29f4b3;try{return _0x29f4b3=require(_0x17cc12(0x220)),_0x29f4b3;}catch(_0x40e2d9){const _0x2d9e43=new Error(_0x17cc12(0x1e4)+('for\x20Node\x20'+process[_0x17cc12(0x2a5)][_0x17cc12(0x255)]+'\x20on\x20'+process[_0x17cc12(0x1db)]+'/'+process[_0x17cc12(0x29d)]+'.\x20')+_0x17cc12(0x1df)+(_0x17cc12(0x232)+(_0x40e2d9?.['message']||String(_0x40e2d9))));_0x2d9e43[_0x17cc12(0x1f6)]=_0x17cc12(0x294),_0x2d9e43[_0x17cc12(0x227)]=_0x40e2d9;throw _0x2d9e43;}}function _0x17ca5a(_0x23ff3d,_0xf1efda){const _0xe90921=_0x50b8;switch(_0x23ff3d){case _0xe90921(0x277):return _0xf1efda[_0xe90921(0x258)][_0xe90921(0x2a6)];case'l2':return _0xf1efda['MetricKind'][_0xe90921(0x291)];case'ip':return _0xf1efda[_0xe90921(0x258)]['IP'];default:return _0xf1efda[_0xe90921(0x258)][_0xe90921(0x2a6)];}}return usearch=function _0x259933(_0x2e053c={},{dims:_0x3a6dc1,dir:_0x98f1ee,fetchAll:fetchAll=null,onChange:onChange=null}={}){const _0x5db65d=_0x50b8,_0x39e59f=_0x2d8a48();if(!_0x3a6dc1||_0x3a6dc1<=0x0)throw new Error(_0x5db65d(0x1fe));if(!_0x98f1ee)throw new Error(_0x5db65d(0x208));const _0x540ae0={'metric':_0x2e053c[_0x5db65d(0x205)]??_0x5db65d(0x277),'connectivity':_0x2e053c[_0x5db65d(0x275)]??0x10,'expansionAdd':_0x2e053c[_0x5db65d(0x299)]??0x80,'expansionSearch':_0x2e053c['expansionSearch']??0x40,'snapshotEveryChanges':_0x2e053c[_0x5db65d(0x2a2)]??0xc350,'snapshotMaxLagMs':_0x2e053c[_0x5db65d(0x219)]??0x2710,'keepSnapshots':_0x2e053c[_0x5db65d(0x229)]??0x2,'tmpMaxAgeMs':_0x2e053c[_0x5db65d(0x288)]??0x6*0x36ee80,'heartbeatIntervalMs':_0x2e053c['heartbeatIntervalMs']??0x1388,'writerLockMaxAgeMs':_0x2e053c['writerLockMaxAgeMs']??0x3a98,'viewRefreshMs':_0x2e053c['viewRefreshMs']??0x3e8},_0x5e4936=new _0x218df2({'dir':_0x98f1ee,'keepSnapshots':_0x540ae0['keepSnapshots']}),_0x35fd2a=_0x5ed3e1(_0x98f1ee,{'maxAgeMs':_0x540ae0[_0x5db65d(0x214)],'heartbeatMs':_0x540ae0[_0x5db65d(0x26f)],'onLost':()=>{const _0x3aacbc=_0x5db65d;_0x230451(_0x13dc07)[_0x3aacbc(0x260)](()=>{});}});let _0x20d05c=new _0x32f9d5(),_0x34c785=null,_0xbf36eb=0x0,_0x2e3056=null,_0x2a9c7f=![],_0xfcee39=![],_0x529504=null,_0x2f5881=0x0,_0x51ae7c=null,_0x30b9d1=0x0,_0x525ea5=![],_0x305720=Promise[_0x5db65d(0x29c)]();const _0x230451=_0x4cbe0d=>{const _0x1a7c6b=_0x5db65d,_0x52e17d=_0x305720[_0x1a7c6b(0x1e7)](_0x4cbe0d);return _0x305720=_0x52e17d[_0x1a7c6b(0x260)](()=>{}),_0x52e17d;},_0x794152=()=>{try{onChange?.();}catch{}};function _0x15b766(){const _0xf73a94=_0x5db65d;return new _0x39e59f[(_0xf73a94(0x216))]({'dimensions':_0x3a6dc1,'metric':_0x17ca5a(_0x540ae0[_0xf73a94(0x205)],_0x39e59f),'quantization':_0x39e59f[_0xf73a94(0x2b5)][_0xf73a94(0x21d)],'connectivity':_0x540ae0[_0xf73a94(0x275)],'expansion_add':_0x540ae0[_0xf73a94(0x299)],'expansion_search':_0x540ae0[_0xf73a94(0x225)],'multi':![]});}function _0x5e4767(_0x575a53){return _0x575a53 instanceof Float32Array?_0x575a53:new Float32Array(_0x575a53);}function _0x258b26(){const _0x399fcb=_0x5db65d;if(fetchAll)return fetchAll();if(_0x2e3056)return _0x2e3056();return Promise[_0x399fcb(0x29c)](null);}function _0x349ed9(_0x58fc92,_0x5dba45,_0x400494){const _0xc59a0b=_0x5db65d,_0x1de454=_0x20d05c[_0xc59a0b(0x22a)](_0x58fc92);if(_0x1de454!==undefined)try{_0x34c785['remove'](BigInt(_0x1de454));}catch{}const _0x5ec3be=_0x20d05c[_0xc59a0b(0x1f7)](_0x58fc92);_0x34c785['add'](BigInt(_0x5ec3be),_0x5dba45),_0x20d05c[_0xc59a0b(0x2b0)](_0x58fc92,_0x400494??_0x266e98(_0x5dba45));}function _0x5da14f(_0x219fc2){const _0x1c0ddf=_0x5db65d,_0x517c51=_0x20d05c[_0x1c0ddf(0x22a)](_0x219fc2);if(_0x517c51===undefined)return![];try{_0x34c785['remove'](BigInt(_0x517c51));}catch{}return _0x20d05c[_0x1c0ddf(0x202)](_0x219fc2),!![];}function _0x2f5bf1(_0x48cf49){const _0x126689=_0x5db65d;_0x20d05c=new _0x32f9d5(),_0x34c785=_0x15b766();for(const {key:_0x12852d,vector:_0x1c1a44}of _0x48cf49??[]){if(!(_0x1c1a44 instanceof Float32Array)||_0x1c1a44[_0x126689(0x295)]!==_0x3a6dc1)continue;_0x349ed9(_0x12852d,_0x1c1a44);}_0xbf36eb=0x0;}function _0x477824(){const _0xe2a356=_0x5db65d;return Math[_0xe2a356(0x251)](Date[_0xe2a356(0x20b)](),_0x5e4936[_0xe2a356(0x1fa)]()+0x1);}function _0x3e1b9b(){if(_0x529504)clearTimeout(_0x529504);_0x529504=null;}function _0x2ec900(){const _0x5e18ee=_0x5db65d;if(!_0x540ae0[_0x5e18ee(0x219)]||_0x529504||!_0xfcee39||_0xbf36eb<=0x0)return;const _0x380258=Math[_0x5e18ee(0x251)](_0x540ae0[_0x5e18ee(0x219)],0xa*_0x2f5881);_0x529504=setTimeout(()=>{const _0x45826e=_0x5e18ee;_0x529504=null,_0x230451(async()=>{if(_0xfcee39&&_0xbf36eb>0x0)await _0x384486();_0x2ec900(),_0x794152();})[_0x45826e(0x260)](()=>{});},_0x380258),_0x529504['unref']?.();}async function _0x384486(_0x48bd16){const _0x14127b=_0x5db65d;if(!_0x34c785)return![];const _0x5d1a8c=_0x48bd16??_0x477824(),_0x382589=Date[_0x14127b(0x20b)](),_0x1bd733=await _0x5e4936[_0x14127b(0x272)](_0x5d1a8c,async _0x41334c=>{const _0x58381b=_0x14127b;_0x34c785[_0x58381b(0x2a0)](_0x41334c['index']),await _0x20d05c[_0x58381b(0x282)](_0x41334c['labels']),_0x3374ff[_0x58381b(0x21b)](_0x41334c[_0x58381b(0x221)],JSON[_0x58381b(0x24d)]({'manifestVersion':_0xe956c9,'algorithm':_0x58381b(0x220),'dims':_0x3a6dc1,'metric':_0x540ae0[_0x58381b(0x205)],'clock':_0x5d1a8c,'snapshotAt':Date[_0x58381b(0x20b)]()},null,0x2));},{'keep':_0x540ae0[_0x14127b(0x229)]});return _0x2f5881=Date[_0x14127b(0x20b)]()-_0x382589,_0x1bd733?.[_0x14127b(0x2a3)]&&(_0xbf36eb=0x0,_0x3e1b9b()),_0x1bd733?.['published']??![];}function _0x1dcac8(){const _0x1eb0f9=_0x5db65d;_0xbf36eb++;if(_0xbf36eb>=_0x540ae0[_0x1eb0f9(0x2a2)])return _0x384486();return _0x2ec900(),null;}async function _0x279073(){const _0x53da4a=_0x5db65d,_0x23dcd7=_0x5e4936[_0x53da4a(0x2ad)]()||_0x5e4936[_0x53da4a(0x2a9)]();if(!_0x23dcd7)return null;let _0x1e7e76,_0x553e46=![];try{await _0x5e4936[_0x53da4a(0x27c)](_0x23dcd7,async _0x561183=>{const _0x3c923b=_0x53da4a;_0x1e7e76=JSON[_0x3c923b(0x217)](_0x3374ff[_0x3c923b(0x1e2)](_0x561183[_0x3c923b(0x221)],_0x3c923b(0x21e)));if(_0x1e7e76[_0x3c923b(0x1f4)]!==_0xe956c9||_0x1e7e76['algorithm']!=='usearch'||_0x1e7e76[_0x3c923b(0x26d)]!==_0x3a6dc1||_0x1e7e76[_0x3c923b(0x205)]!==_0x540ae0[_0x3c923b(0x205)]){_0x1e7e76=null;return;}const _0x50b230=new _0x32f9d5();await _0x50b230[_0x3c923b(0x218)](_0x561183[_0x3c923b(0x27e)]);const _0x214991=_0x15b766();_0x214991['load'](_0x561183[_0x3c923b(0x254)]),_0x20d05c=_0x50b230,_0x34c785=_0x214991,_0x553e46=!![];});}catch{return null;}return _0x553e46?_0x1e7e76?.[_0x53da4a(0x297)]??0x0:null;}async function _0x28f28e(_0x365c6b){const _0x487d4a=_0x5db65d;_0x51ae7c=null;const _0x356345=await _0x279073();if(_0x356345!=null){_0xbf36eb=0x0;if(_0x365c6b){if(!_0x20d05c[_0x487d4a(0x223)])return _0x2f5bf1(_0x365c6b),await _0x384486(),null;const _0x596ab3=_0x1ba238(_0x20d05c,_0x365c6b,_0x3a6dc1,{'upsert':_0x349ed9,'remove':_0x5da14f}),_0x123c95=_0x596ab3['added']+_0x596ab3[_0x487d4a(0x1dc)]+_0x596ab3[_0x487d4a(0x24f)];_0x123c95>0x0&&(_0xbf36eb+=_0x123c95,await _0x384486());}return _0x356345;}_0x2f5bf1(_0x365c6b??[]);if(_0x34c785[_0x487d4a(0x25e)]()>0x0)await _0x384486();return null;}async function _0x70d99a(){_0xfcee39=!![],await _0x28f28e(await _0x258b26());}async function _0x13dc07(){const _0x2fb72a=_0x5db65d;if(!_0xfcee39)return;_0xfcee39=![],_0x3e1b9b(),_0xbf36eb=0x0;const _0x50b6bf=_0x5e4936[_0x2fb72a(0x2ad)]()||_0x5e4936[_0x2fb72a(0x2a9)]();await _0xd64041(_0x50b6bf),_0x794152();}async function _0xd64041(_0x206c9a){const _0x36dad6=_0x5db65d;if(!_0x206c9a)return![];let _0x1aa3c2=![];try{await _0x5e4936[_0x36dad6(0x27c)](_0x206c9a,async _0x5dd8ab=>{const _0x372c4f=_0x36dad6,_0x3c0168=JSON[_0x372c4f(0x217)](_0x3374ff['readFileSync'](_0x5dd8ab[_0x372c4f(0x221)],'utf8'));if(_0x3c0168[_0x372c4f(0x1f4)]!==_0xe956c9||_0x3c0168['algorithm']!=='usearch'||_0x3c0168['dims']!==_0x3a6dc1||_0x3c0168[_0x372c4f(0x205)]!==_0x540ae0['metric'])return;const _0x190185=new _0x32f9d5();await _0x190185['loadFrom'](_0x5dd8ab[_0x372c4f(0x27e)]);const _0xc822f=_0x15b766();_0xc822f['view'](_0x5dd8ab['index']),_0x34c785=_0xc822f,_0x20d05c=_0x190185,_0x51ae7c=_0x206c9a,_0x1aa3c2=!![];});}catch{}return _0x1aa3c2;}function _0x5aedb2(){const _0x79dc06=_0x5db65d,_0x275ced=Date[_0x79dc06(0x20b)]();if(_0x275ced-_0x30b9d1<_0x540ae0[_0x79dc06(0x25d)])return;_0x30b9d1=_0x275ced;if(_0x525ea5)return;if(_0x35fd2a[_0x79dc06(0x1dd)]()){_0x525ea5=!![],_0x230451(async()=>{!_0xfcee39&&_0x2a9c7f&&_0x35fd2a['acquire']()&&(await _0x70d99a(),_0x794152());})[_0x79dc06(0x260)](()=>{})[_0x79dc06(0x29a)](()=>{_0x525ea5=![];});return;}const _0x3c286c=_0x5e4936[_0x79dc06(0x2ad)]()||_0x5e4936[_0x79dc06(0x2a9)]();if(!_0x3c286c||_0x3c286c===_0x51ae7c)return;_0x525ea5=!![],_0x230451(async()=>{if(!_0xfcee39&&await _0xd64041(_0x3c286c))_0x794152();})[_0x79dc06(0x260)](()=>{})[_0x79dc06(0x29a)](()=>{_0x525ea5=![];});}return{async 'load'(_0x36da0a){return _0x230451(async()=>{const _0x38575=_0x50b8;_0x5e4936['cleanupTmpDirs']({'maxAgeMs':_0x540ae0[_0x38575(0x288)]}),_0x2e3056=_0x36da0a??null,_0xfcee39=_0x35fd2a[_0x38575(0x26c)]();let _0x433127=null;if(_0xfcee39)_0x433127=await _0x28f28e(_0x36da0a?await _0x36da0a():null);else{const _0x25ef16=_0x5e4936[_0x38575(0x2ad)]()||_0x5e4936[_0x38575(0x2a9)]();await _0xd64041(_0x25ef16);}return _0x2a9c7f=!![],_0x433127;});},async 'add'(_0x2c611f,_0x1ebacc,_0x15eb7a){return _0x230451(async()=>{const _0x5b4ae9=_0x50b8;if(!_0x2a9c7f)return;const _0x29de08=_0x5e4767(_0x1ebacc);if(!_0xfcee39){if(!_0x35fd2a['acquire']())return;await _0x70d99a();}if(!_0x34c785)return;const _0x387283=_0x266e98(_0x29de08);if(_0x20d05c[_0x5b4ae9(0x215)](_0x2c611f)===_0x387283)return;_0x349ed9(_0x2c611f,_0x29de08,_0x387283),await _0x1dcac8();});},async 'remove'(_0x584824){return _0x230451(async()=>{const _0x4896be=_0x50b8;if(!_0x2a9c7f)return;if(!_0xfcee39){if(!_0x35fd2a[_0x4896be(0x26c)]())return;await _0x70d99a();}if(!_0x34c785)return;if(_0x5da14f(_0x584824))await _0x1dcac8();});},'search'(_0x38c315,{limit:limit=0xa}={}){const _0x59893e=_0x5db65d;if(!_0xfcee39&&_0x2a9c7f)_0x5aedb2();if(!_0x34c785)return[];const _0x1f52fc=_0x34c785['size']();if(_0x1f52fc===0x0)return[];const _0x411bb0=Math['min'](limit,_0x1f52fc),_0x57c396=_0x34c785[_0x59893e(0x22e)](_0x5e4767(_0x38c315),_0x411bb0,0x0),_0x9c1ab8=[],_0x14e148=_0x57c396[_0x59893e(0x23b)],_0xe61382=_0x57c396[_0x59893e(0x231)];for(let _0x1b7135=0x0;_0x1b7135<_0x14e148['length'];_0x1b7135++){const _0x3da41f=_0x14e148[_0x1b7135];if(_0x3da41f===0xffffffffffffffffn)continue;const _0x59f833=Number(_0x3da41f),_0x36aa6f=_0x20d05c[_0x59893e(0x1f5)](_0x59f833);if(!_0x36aa6f)continue;const _0x48909c=_0xe61382[_0x1b7135];let _0x489390;if(_0x540ae0[_0x59893e(0x205)]===_0x59893e(0x277))_0x489390=Math[_0x59893e(0x251)](0x0,0x1-_0x48909c);else{if(_0x540ae0[_0x59893e(0x205)]==='ip')_0x489390=-_0x48909c;else _0x489390=0x1/(0x1+_0x48909c);}_0x9c1ab8['push']({'key':_0x36aa6f,'score':_0x489390});}return _0x9c1ab8;},async 'snapshot'(_0x404407){return _0x230451(()=>_0xfcee39?_0x384486(_0x404407??undefined):![]);},async 'rebuild'(_0x53e364){return _0x230451(async()=>{const _0x3c8253=_0x50b8;if(_0x53e364!=null)_0x2e3056=_0x53e364;if(!_0xfcee39){if(!_0x35fd2a[_0x3c8253(0x26c)]())return;_0xfcee39=!![];}const _0x3ee31d=_0x53e364?await _0x53e364():await _0x258b26();_0x2f5bf1(_0x3ee31d??[]),_0x2a9c7f=!![],await _0x384486();});},async 'stop'(){return _0x230451(async()=>{const _0x288d26=_0x50b8;_0x3e1b9b();if(_0xfcee39){if(_0xbf36eb>0x0||!_0x5e4936['readCurrentId']())await _0x384486();_0x35fd2a[_0x288d26(0x238)]();}_0xfcee39=![],_0x2a9c7f=![];});},'count'(){const _0x509572=_0x5db65d;return _0x20d05c[_0x509572(0x25e)]();},'info'(){const _0x112a60=_0x5db65d;return{'algorithm':_0x112a60(0x220),'role':_0xfcee39?_0x112a60(0x271):_0x112a60(0x230),'metric':_0x540ae0[_0x112a60(0x205)],'connectivity':_0x540ae0['connectivity'],'expansionAdd':_0x540ae0[_0x112a60(0x299)],'expansionSearch':_0x540ae0['expansionSearch'],'snapshotEveryChanges':_0x540ae0[_0x112a60(0x2a2)],'snapshotMaxLagMs':_0x540ae0[_0x112a60(0x219)],'count':_0x20d05c[_0x112a60(0x25e)](),'size':_0x34c785?.[_0x112a60(0x25e)]?.()??0x0,'capacity':_0x34c785?.[_0x112a60(0x207)]?.()??0x0,'changesSince':_0xfcee39?_0xbf36eb:null,'viewedSnapshot':_0x51ae7c??null,'snapshotDir':_0x98f1ee,'latestSnapshot':_0x5e4936[_0x112a60(0x2ad)]()??null};}};},usearch;}var hasRequiredAlgorithmWorkerThread;function requireAlgorithmWorkerThread(){const _0x20025b=_0x591ed2;if(hasRequiredAlgorithmWorkerThread)return algorithmWorkerThread$1;hasRequiredAlgorithmWorkerThread=0x1;const {parentPort:_0x3069b3,workerData:_0x4a649a}=require$$0$1,{algorithmName:_0x3cbdb1,algorithmConfig:_0x275e15,dims:_0x43d43e,dir:_0x4a60a1}=_0x4a649a;let _0x148ab0=0x1;const _0x2b3dc8=new Map();function _0x1d325c(){const _0x368f81=_0x148ab0++;return new Promise((_0xca5c49,_0x1fd646)=>{const _0x38f228=_0x50b8;_0x2b3dc8[_0x38f228(0x24c)](_0x368f81,{'resolve':_0xca5c49,'reject':_0x1fd646}),_0x3069b3['postMessage']({'op':_0x38f228(0x21a),'fid':_0x368f81});});}const _0x1583a7={'dims':_0x43d43e,'dir':_0x4a60a1,'fetchAll':_0x1d325c,'onChange':()=>_0x4a7d3e()};let _0x4519ab;if(_0x3cbdb1===_0x20025b(0x246))_0x4519ab=requireHnsw()(_0x275e15,_0x1583a7);else{if(_0x3cbdb1===_0x20025b(0x267))_0x4519ab=requireFlat()(_0x275e15,_0x1583a7);else{if(_0x3cbdb1===_0x20025b(0x220))_0x4519ab=requireUsearch()(_0x275e15,_0x1583a7);else throw new Error('Unknown\x20algorithm:\x20\x22'+_0x3cbdb1+'\x22');}}function _0x4a7d3e(){const _0x48bad7=_0x20025b;try{_0x3069b3['postMessage']({'op':_0x48bad7(0x234),'count':_0x4519ab[_0x48bad7(0x1fd)](),'info':_0x4519ab[_0x48bad7(0x212)](),'memory':process[_0x48bad7(0x1e9)]()});}catch{}}function _0x6abc85(_0x1cf28f){const _0x181738=_0x20025b;return(_0x1cf28f||[])['map'](_0x57f732=>({'key':_0x57f732[_0x181738(0x211)],'vector':_0x57f732['vector']instanceof Float32Array?_0x57f732['vector']:new Float32Array(_0x57f732[_0x181738(0x209)])}));}return _0x3069b3['on'](_0x20025b(0x210),async _0x2fb4db=>{const _0x57db9c=_0x20025b;if(_0x2fb4db['op']===_0x57db9c(0x292)){const _0x4fb94b=_0x2b3dc8[_0x57db9c(0x245)](_0x2fb4db[_0x57db9c(0x1f1)]);if(!_0x4fb94b)return;_0x2b3dc8[_0x57db9c(0x1ea)](_0x2fb4db[_0x57db9c(0x1f1)]);if(_0x2fb4db[_0x57db9c(0x2aa)])_0x4fb94b[_0x57db9c(0x1de)](new Error(_0x2fb4db[_0x57db9c(0x2aa)]));else _0x4fb94b['resolve'](_0x6abc85(_0x2fb4db[_0x57db9c(0x24b)]));return;}const {id:_0x27d5ec,op:_0x53e2bd,args:_0x551960}=_0x2fb4db;try{let _0x47c907;switch(_0x53e2bd){case _0x57db9c(0x24a):{_0x47c907=await _0x4519ab[_0x57db9c(0x24a)](_0x551960[_0x57db9c(0x287)]?_0x1d325c:null),_0x4a7d3e();break;}case _0x57db9c(0x281):{const _0x5e1123=_0x551960[_0x57db9c(0x209)]instanceof Float32Array?_0x551960[_0x57db9c(0x209)]:new Float32Array(_0x551960[_0x57db9c(0x209)]);await _0x4519ab[_0x57db9c(0x281)](_0x551960[_0x57db9c(0x211)],_0x5e1123,_0x551960['clock']??undefined),_0x4a7d3e(),_0x47c907=null;break;}case'remove':{await _0x4519ab[_0x57db9c(0x27b)](_0x551960[_0x57db9c(0x211)]),_0x4a7d3e(),_0x47c907=null;break;}case'search':{const _0xb6fc90=_0x551960[_0x57db9c(0x276)]instanceof Float32Array?_0x551960[_0x57db9c(0x276)]:new Float32Array(_0x551960['queryVec']);_0x47c907=_0x4519ab[_0x57db9c(0x22e)](_0xb6fc90,_0x551960['opts']||{});break;}case _0x57db9c(0x273):{_0x47c907=await _0x4519ab[_0x57db9c(0x273)](_0x551960[_0x57db9c(0x297)]),_0x4a7d3e();break;}case _0x57db9c(0x1f2):{const _0xd9692f=_0x6abc85(_0x551960[_0x57db9c(0x24b)]);await _0x4519ab[_0x57db9c(0x1f2)](async()=>_0xd9692f),_0x4a7d3e(),_0x47c907=null;break;}case _0x57db9c(0x20d):{await _0x4519ab['stop'](),_0x4a7d3e(),_0x47c907=null;break;}case _0x57db9c(0x1fd):{_0x47c907=_0x4519ab[_0x57db9c(0x1fd)]();break;}case _0x57db9c(0x212):{_0x47c907=_0x4519ab[_0x57db9c(0x212)]();break;}default:throw new Error('Unknown\x20op:\x20\x22'+_0x53e2bd+'\x22');}_0x3069b3[_0x57db9c(0x20f)]({'id':_0x27d5ec,'result':_0x47c907});}catch(_0x1a9e64){_0x3069b3['postMessage']({'id':_0x27d5ec,'error':{'message':_0x1a9e64?.[_0x57db9c(0x210)]||String(_0x1a9e64),'code':_0x1a9e64?.['code']}});}}),_0x3069b3[_0x20025b(0x20f)]({'op':_0x20025b(0x290)}),algorithmWorkerThread$1;}function _0x50b8(_0x4252fb,_0x45b4cf){_0x4252fb=_0x4252fb-0x1db;const _0x414d6c=_0x414d();let _0x50b861=_0x414d6c[_0x4252fb];return _0x50b861;}var algorithmWorkerThreadExports=requireAlgorithmWorkerThread(),algorithmWorkerThread=getDefaultExportFromCjs(algorithmWorkerThreadExports);module[_0x591ed2(0x20a)]=algorithmWorkerThread;
|
|
1
|
+
'use strict';const _0x32915a=_0x2ae3;(function(_0x1df81f,_0x3ebcb9){const _0x41de4d=_0x2ae3,_0x451717=_0x1df81f();while(!![]){try{const _0x52d290=-parseInt(_0x41de4d(0x213))/0x1*(parseInt(_0x41de4d(0x20e))/0x2)+-parseInt(_0x41de4d(0x205))/0x3*(-parseInt(_0x41de4d(0x1ec))/0x4)+-parseInt(_0x41de4d(0x1dd))/0x5*(-parseInt(_0x41de4d(0x1e8))/0x6)+parseInt(_0x41de4d(0x1f2))/0x7+parseInt(_0x41de4d(0x15e))/0x8*(-parseInt(_0x41de4d(0x1ef))/0x9)+-parseInt(_0x41de4d(0x182))/0xa+parseInt(_0x41de4d(0x1f0))/0xb;if(_0x52d290===_0x3ebcb9)break;else _0x451717['push'](_0x451717['shift']());}catch(_0x3cf8b4){_0x451717['push'](_0x451717['shift']());}}}(_0x45b2,0x9696f));var require$$0$1=require('worker_threads'),require$$0=require('fs'),require$$1=require(_0x32915a(0x1d7)),require$$2=require('os'),require$$3=require(_0x32915a(0x184));function getDefaultExportFromCjs(_0x18e4fc){const _0x5b95c8=_0x32915a;return _0x18e4fc&&_0x18e4fc[_0x5b95c8(0x226)]&&Object[_0x5b95c8(0x1ee)]['hasOwnProperty'][_0x5b95c8(0x1db)](_0x18e4fc,'default')?_0x18e4fc['default']:_0x18e4fc;}var algorithmWorkerThread$1={},snapshotStore,hasRequiredSnapshotStore;function requireSnapshotStore(){const _0x548126=_0x32915a;if(hasRequiredSnapshotStore)return snapshotStore;hasRequiredSnapshotStore=0x1;const _0x1ed5eb=require$$0,_0x4920a1=require$$1,_0x245f8d=require$$2,_0x1eee95=require$$3;function _0x4a1110(){return Date['now']();}function _0x258fc3(_0x3c76af){try{return _0x1ed5eb['existsSync'](_0x3c76af);}catch{return![];}}function _0x718d27(_0x7659b6){const _0xf9e39f=_0x2ae3;try{return _0x1ed5eb[_0xf9e39f(0x1aa)](_0x7659b6,_0xf9e39f(0x1e7));}catch{return null;}}function _0x1ceb6a(_0x5d3a31,_0x3e1645){const _0x3abea1=_0x2ae3,_0x3a697f=_0x5d3a31+_0x3abea1(0x172)+_0x1eee95[_0x3abea1(0x1b8)](0x6)[_0x3abea1(0x1dc)]('hex');_0x1ed5eb[_0x3abea1(0x1e6)](_0x3a697f,_0x3e1645),_0x1ed5eb[_0x3abea1(0x1d1)](_0x3a697f,_0x5d3a31);}function _0x540748(_0x283935,_0x1238d3=0x10){const _0x2ff74d=_0x2ae3,_0x2e8055=String(Math[_0x2ff74d(0x1f3)](0x0,Math['trunc'](_0x283935||0x0)));return _0x2e8055['length']>=_0x1238d3?_0x2e8055:'0'[_0x2ff74d(0x1b4)](_0x1238d3-_0x2e8055[_0x2ff74d(0x220)])+_0x2e8055;}return snapshotStore=class _0xb17d2b{constructor({dir:_0x25ae81,keepSnapshots:keepSnapshots=0x3,log:log=null}={}){const _0x174605=_0x2ae3;if(!_0x25ae81)throw new Error('SnapshotStore\x20requires\x20dir');this[_0x174605(0x171)]=_0x25ae81,this['snapshotsDir']=_0x4920a1[_0x174605(0x1e9)](_0x25ae81,'snapshots'),this[_0x174605(0x1a3)]=_0x4920a1[_0x174605(0x1e9)](_0x25ae81,_0x174605(0x1fb)),this['lockPath']=_0x4920a1[_0x174605(0x1e9)](_0x25ae81,_0x174605(0x16d)),this[_0x174605(0x1f5)]=keepSnapshots,this[_0x174605(0x18e)]=log,_0x1ed5eb['mkdirSync'](this[_0x174605(0x171)],{'recursive':!![]}),_0x1ed5eb[_0x174605(0x203)](this[_0x174605(0x165)],{'recursive':!![]});}[_0x548126(0x1b0)](_0x184646){return _0x4920a1['join'](this['snapshotsDir'],_0x184646);}[_0x548126(0x212)](_0x596518){const _0x4507ea=_0x548126,_0x3e48f0=this[_0x4507ea(0x1b0)](_0x596518);return{'dir':_0x3e48f0,'index':_0x4920a1[_0x4507ea(0x1e9)](_0x3e48f0,_0x4507ea(0x17e)),'labels':_0x4920a1[_0x4507ea(0x1e9)](_0x3e48f0,'labels.json'),'state':_0x4920a1[_0x4507ea(0x1e9)](_0x3e48f0,_0x4507ea(0x187))};}[_0x548126(0x168)](){const _0x240ace=_0x548126;if(!_0x258fc3(this[_0x240ace(0x1a3)]))return null;const _0x5ad268=_0x718d27(this[_0x240ace(0x1a3)]);if(!_0x5ad268)return null;const _0x54bc46=String(_0x5ad268)['trim']();return _0x54bc46||null;}[_0x548126(0x217)](){const _0x46c819=_0x548126,_0x19c760=this[_0x46c819(0x168)]();if(!_0x19c760)return 0x0;const _0x4b5644=Number(_0x19c760);return Number[_0x46c819(0x1a0)](_0x4b5644)?_0x4b5644:0x0;}[_0x548126(0x21a)](){const _0xf3597b=_0x548126;try{return _0x1ed5eb[_0xf3597b(0x14d)](this[_0xf3597b(0x165)],{'withFileTypes':!![]})[_0xf3597b(0x1fd)](_0x2b38ce=>_0x2b38ce[_0xf3597b(0x1ab)]())[_0xf3597b(0x1c5)](_0x513e7b=>_0x513e7b[_0xf3597b(0x1c9)])[_0xf3597b(0x1fd)](_0x430e5e=>!_0x430e5e[_0xf3597b(0x189)](_0xf3597b(0x172)))[_0xf3597b(0x1fd)](_0x262422=>!_0x262422[_0xf3597b(0x189)](_0xf3597b(0x1e0)))[_0xf3597b(0x197)]();}catch{return[];}}['latestSnapshotId'](){const _0x4c3bc1=_0x548126,_0x5e3402=this['readCurrentId']();if(_0x5e3402)return _0x5e3402;const _0x52a6f0=this[_0x4c3bc1(0x21a)]();if(!_0x52a6f0[_0x4c3bc1(0x220)])return null;return _0x52a6f0[_0x52a6f0[_0x4c3bc1(0x220)]-0x1];}[_0x548126(0x209)]({maxAgeMs:maxAgeMs=0x6*0x36ee80}={}){const _0x56c5b5=_0x548126;let _0x4684cb;try{_0x4684cb=_0x1ed5eb[_0x56c5b5(0x14d)](this[_0x56c5b5(0x165)],{'withFileTypes':!![]});}catch{return;}const _0x447359=_0x4a1110()-maxAgeMs;for(const _0x2920d6 of _0x4684cb){if(!_0x2920d6[_0x56c5b5(0x1ab)]())continue;const _0x86aaba=_0x2920d6[_0x56c5b5(0x1c9)];if(!_0x86aaba[_0x56c5b5(0x189)](_0x56c5b5(0x172))&&!_0x86aaba['startsWith'](_0x56c5b5(0x1e0)))continue;const _0x151ea2=_0x4920a1[_0x56c5b5(0x1e9)](this['snapshotsDir'],_0x86aaba);try{const _0x1fea57=_0x1ed5eb[_0x56c5b5(0x21c)](_0x151ea2);if(_0x1fea57[_0x56c5b5(0x1c6)]>_0x447359)continue;}catch{}try{_0x1ed5eb[_0x56c5b5(0x198)](_0x151ea2,{'recursive':!![],'force':!![]});}catch{}}}[_0x548126(0x1d4)]({keep:keep=null}={}){const _0x15b35c=_0x548126,_0x19670e=Math['max'](0x1,Math[_0x15b35c(0x15d)](keep??this['keepSnapshots']??0x3)),_0x82d43c=this[_0x15b35c(0x21a)]();if(_0x82d43c[_0x15b35c(0x220)]<=_0x19670e)return;const _0x3dfd52=this[_0x15b35c(0x168)](),_0x39c399=_0x82d43c[_0x15b35c(0x166)](0x0,Math[_0x15b35c(0x1f3)](0x0,_0x82d43c[_0x15b35c(0x220)]-_0x19670e));for(const _0xdd249c of _0x39c399){if(_0x3dfd52&&_0xdd249c===_0x3dfd52)continue;const _0x2683f2=this[_0x15b35c(0x1b0)](_0xdd249c);try{_0x1ed5eb[_0x15b35c(0x198)](_0x2683f2,{'recursive':!![],'force':!![]});}catch{}}}async[_0x548126(0x17c)](_0x3927c2,_0x21045a){const _0x422f81=_0x548126;if(!_0x3927c2)throw new Error(_0x422f81(0x17a));const _0x24d778=this[_0x422f81(0x212)](_0x3927c2);if(!_0x258fc3(_0x24d778[_0x422f81(0x1de)])||!_0x258fc3(_0x24d778['labels'])||!_0x258fc3(_0x24d778[_0x422f81(0x188)]))throw new Error('snapshot\x20incomplete:\x20'+_0x3927c2);const _0x5bc28b=await _0x21045a(_0x24d778);return _0x5bc28b||{};}async['publishSnapshot'](_0xa201ff,_0x59c06a,{keep:keep=null,lockTimeoutMs:lockTimeoutMs=0x0,staleLockMaxAgeMs:staleLockMaxAgeMs=0xea60}={}){const _0x589530=_0x548126,_0x52106e=Number(_0xa201ff);if(!Number[_0x589530(0x1a0)](_0x52106e)||_0x52106e<0x0)throw new Error('candidateClock\x20must\x20be\x20finite\x20>=\x200');const _0x100918=_0x540748(_0x52106e),_0x1da536=this[_0x589530(0x1b0)](_0x100918),_0x13b842=_0x4920a1[_0x589530(0x1e9)](this[_0x589530(0x165)],_0x589530(0x172)+_0x100918+'-'+_0x1eee95[_0x589530(0x1b8)](0x6)[_0x589530(0x1dc)](_0x589530(0x216)));_0x1ed5eb[_0x589530(0x203)](_0x13b842,{'recursive':!![]});const _0xbab257={'dir':_0x13b842,'index':_0x4920a1[_0x589530(0x1e9)](_0x13b842,'index.hnsw'),'labels':_0x4920a1[_0x589530(0x1e9)](_0x13b842,_0x589530(0x1bd)),'state':_0x4920a1[_0x589530(0x1e9)](_0x13b842,_0x589530(0x187))};await _0x59c06a(_0xbab257,{'id':_0x100918,'clock':_0x52106e});const _0xbf6d05=JSON[_0x589530(0x18c)]({'pid':process[_0x589530(0x1c1)],'host':_0x245f8d[_0x589530(0x20b)](),'at':_0x4a1110()}),_0x34660f=_0x4a1110();let _0x7baf93=null;const _0x5117ce=()=>{const _0x3b8b19=_0x589530;try{const _0x107fae=JSON[_0x3b8b19(0x1ad)](_0x1ed5eb[_0x3b8b19(0x1aa)](this['lockPath'],'utf8'));if(_0x107fae['at']&&_0x4a1110()-_0x107fae['at']>staleLockMaxAgeMs){const _0x1fbf96=_0x4a1110()-_0x107fae['at'],_0x4f620e='Breaking\x20stale\x20snapshot\x20lock\x20(age:\x20'+Math[_0x3b8b19(0x158)](_0x1fbf96/0x3e8)+_0x3b8b19(0x1b7)+_0x107fae[_0x3b8b19(0x1c1)]+_0x3b8b19(0x194)+_0x107fae['host']+_0x3b8b19(0x185)+_0x3b8b19(0x207);this[_0x3b8b19(0x18e)]?.[_0x3b8b19(0x1f7)]?this['log'][_0x3b8b19(0x1f7)](_0x4f620e):console[_0x3b8b19(0x1f7)](_0x3b8b19(0x1f1),_0x4f620e);try{_0x1ed5eb['unlinkSync'](this['lockPath']);}catch{}return!![];}}catch{try{_0x1ed5eb[_0x3b8b19(0x1e4)](this[_0x3b8b19(0x191)]);}catch{}}return![];},_0x6cc1ae=()=>{const _0x5b8656=_0x589530;try{return _0x7baf93=_0x1ed5eb['openSync'](this[_0x5b8656(0x191)],'wx'),_0x1ed5eb['writeFileSync'](_0x7baf93,_0xbf6d05),!![];}catch(_0x3d3c6c){if(_0x3d3c6c&&_0x3d3c6c[_0x5b8656(0x1ba)]===_0x5b8656(0x21f))return![];throw _0x3d3c6c;}};if(!_0x6cc1ae()){_0x5117ce(),_0x6cc1ae();if(_0x7baf93==null&&lockTimeoutMs>0x0)while(_0x4a1110()-_0x34660f<lockTimeoutMs){await new Promise(_0x1c4cd4=>setTimeout(_0x1c4cd4,0x19));if(_0x6cc1ae())break;_0x5117ce();}}if(_0x7baf93==null){try{_0x1ed5eb['rmSync'](_0x13b842,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':'lock_busy'};}try{const _0x1f3c35=this['readCurrentClock']();if(_0x52106e<=_0x1f3c35){try{_0x1ed5eb[_0x589530(0x198)](_0x13b842,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':_0x589530(0x1df),'currentClock':_0x1f3c35};}if(!_0x258fc3(_0x1da536))_0x1ed5eb[_0x589530(0x1d1)](_0x13b842,_0x1da536);else try{_0x1ed5eb['rmSync'](_0x13b842,{'recursive':!![],'force':!![]});}catch{}return _0x1ceb6a(this[_0x589530(0x1a3)],_0x100918+'\x0a'),this[_0x589530(0x1d4)]({'keep':keep}),{'published':!![],'currentClock':_0x52106e};}finally{try{_0x1ed5eb[_0x589530(0x1d6)](_0x7baf93);}catch{}try{_0x1ed5eb['unlinkSync'](this[_0x589530(0x191)]);}catch{}}}},snapshotStore;}function _0x45b2(){const _0x3da40b=['mtimeMs','tombstone','isArray','name','reader','loadFrom','efConstruction','publishSnapshot','unreadable','Original\x20error:\x20','vectors','renameSync','MetricKind','imul','prune','get','closeSync','path','growFactor','efSearch','remove','call','toString','40905KgdwRb','index','stale','_tmp-','snapshotEveryChanges','metric','changed','unlinkSync','addPoint','writeFileSync','utf8','132YNefxC','join','usearch\x20algorithm\x20requires\x20dims\x20>\x200','vector','119108rudVqS','token','prototype','3159909WNaaMm','9421225NWXjSf','[SnapshotStore]','4660012eRqCKP','max','buffer','keepSnapshots','queryVec','warn','manifestVersion','fingerprintOf','reset','CURRENT','writer','filter','acquire','usearch','getMaxElements','finally','byteOffset','mkdirSync','exports','99DraHah','version','This\x20is\x20risky\x20on\x20slow\x20disks\x20or\x20overloaded\x20machines.\x20Consider\x20increasing\x20staleLockMaxAgeMs\x20if\x20this\x20happens\x20frequently.','F32','cleanupTmpDirs','key','hostname','labelForEphemeral','stop','994EGuEXQ','snapshotMaxLagMs','release','keys','_snapshotPaths','203TvBJbY','maxElements','initIndex','hex','readCurrentClock','tmpMaxAgeMs','.tmp','listSnapshotIds','clock','statSync','delete','labelToKey','EEXIST','length','published','arch','WRITER.LOCK','score','hasFingerprints','__esModule','expansionSearch','ceil','expansionAdd','readdirSync','catch','getCurrentCount','snapshotTo','message','USEARCH_BINDINGS_UNAVAILABLE','added','platform','hnsw','viewRefreshMs','sqrt','round','keyToLabel','heartbeatIntervalMs','latestSnapshotId','_tombstoneCount','trunc','24exclUt','setEf','cause','info','setFingerprint','labels','size','snapshotsDir','slice','resolve','readCurrentId','algorithm','rebuild','load','isFree','SNAPSHOT.LOCK','isInteger','node','keyForLabel','dir','.tmp-','save','tombstoneCount','dims','fid','count','HierarchicalNSW','nextLabel','snapshot\x20id\x20required','set','loadSnapshot','readIndexSync','index.hnsw','HNSW_BINDINGS_UNAVAILABLE','flat','cosine','9138050dSAoTg','existsSync','crypto',').\x20','error','state.json','state','startsWith','\x20on\x20','entries','stringify','Unknown\x20algorithm:\x20\x22','log','min','Index','lockPath','distances','HNSW\x20algorithm\x20unavailable:\x20the\x20native\x20\x22hnswlib-node\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20',',\x20host:\x20','fetchAllResult','searchKnn','sort','rmSync','removed','connectivity','Cos','postMessage','snapshot','push','L2sq','isFinite','now','clear','currentPath','unref','versions','Unknown\x20op:\x20\x22','from','keyToFp','hasRows','readFileSync','isDirectory','ENOENT','parse','usearch\x20algorithm\x20unavailable:\x20the\x20native\x20\x22usearch\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','has','_snapshotDir','opts','sync','view','repeat','then','labelForExisting','s,\x20pid:\x20','randomBytes','writerLockMaxAgeMs','code','openSync','search','labels.json','Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22\x20instead.\x20','hnsw\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','ScalarKind','pid','ready','markDelete','add','map'];_0x45b2=function(){return _0x3da40b;};return _0x45b2();}var labelMap,hasRequiredLabelMap;function requireLabelMap(){const _0x17acc9=_0x32915a;if(hasRequiredLabelMap)return labelMap;hasRequiredLabelMap=0x1;const _0x360809=require$$0;class _0x2fb9fb{constructor(){const _0x5c28fc=_0x2ae3;this[_0x5c28fc(0x159)]=new Map(),this[_0x5c28fc(0x21e)]=new Map(),this['nextLabel']=0x0,this[_0x5c28fc(0x15c)]=0x0,this['keyToFp']=new Map(),this[_0x5c28fc(0x225)]=!![];}async['reset'](){const _0x44dc5d=_0x2ae3;this['keyToLabel']=new Map(),this['labelToKey']=new Map(),this['keyToFp']=new Map(),this[_0x44dc5d(0x225)]=!![],this[_0x44dc5d(0x179)]=0x0,this['_tombstoneCount']=0x0;}async[_0x17acc9(0x1cb)](_0x50249b){const _0x11da58=_0x17acc9;if(!_0x50249b||!_0x360809[_0x11da58(0x183)](_0x50249b))return await this['reset'](),!![];let _0x1b4c7b;try{_0x1b4c7b=_0x360809[_0x11da58(0x1aa)](_0x50249b,_0x11da58(0x1e7));}catch{return await this['reset'](),!![];}let _0x11c2ab;try{_0x11c2ab=JSON[_0x11da58(0x1ad)](_0x1b4c7b);}catch{return await this[_0x11da58(0x1fa)](),!![];}const _0x5d33b2=Array['isArray'](_0x11c2ab?.[_0x11da58(0x18b)])?_0x11c2ab['entries']:[],_0x3c6c0c=Number[_0x11da58(0x16e)](_0x11c2ab?.['nextLabel'])?_0x11c2ab[_0x11da58(0x179)]:0x0,_0x26b5cc=new Map(),_0x101884=new Map(),_0xc2d1ee=new Map(),_0x5acf4d=_0x11c2ab?.[_0x11da58(0x206)]>=0x2;let _0x27ef7e=-0x1;for(const _0x225090 of _0x5d33b2){if(!Array[_0x11da58(0x1c8)](_0x225090)||_0x225090['length']<0x2)continue;const _0x5f4124=Number(_0x225090[0x0]),_0x4714bb=String(_0x225090[0x1]??'');if(!Number[_0x11da58(0x16e)](_0x5f4124)||_0x5f4124<0x0)continue;if(!_0x4714bb)continue;_0x26b5cc[_0x11da58(0x17b)](_0x4714bb,_0x5f4124),_0x101884[_0x11da58(0x17b)](_0x5f4124,_0x4714bb);if(_0x5acf4d&&typeof _0x225090[0x2]==='number')_0xc2d1ee[_0x11da58(0x17b)](_0x4714bb,_0x225090[0x2]);if(_0x5f4124>_0x27ef7e)_0x27ef7e=_0x5f4124;}return this['keyToLabel']=_0x26b5cc,this['labelToKey']=_0x101884,this['keyToFp']=_0xc2d1ee,this[_0x11da58(0x225)]=_0x5acf4d,this[_0x11da58(0x179)]=Math[_0x11da58(0x1f3)](_0x3c6c0c,_0x27ef7e+0x1,0x0),this[_0x11da58(0x15c)]=0x0,!![];}[_0x17acc9(0x1b6)](_0x598f68){const _0x16021a=_0x17acc9;return this[_0x16021a(0x159)]['get'](_0x598f68);}['labelForEphemeral'](_0x8e8e81){const _0x24168b=_0x17acc9;let _0x3965cb=this[_0x24168b(0x159)]['get'](_0x8e8e81);if(_0x3965cb!==undefined)return _0x3965cb;return _0x3965cb=this['nextLabel']++,this[_0x24168b(0x159)][_0x24168b(0x17b)](_0x8e8e81,_0x3965cb),this[_0x24168b(0x21e)][_0x24168b(0x17b)](_0x3965cb,_0x8e8e81),_0x3965cb;}[_0x17acc9(0x162)](_0x354d3f,_0x7e954c){const _0x174b88=_0x17acc9;if(_0x7e954c==null)this[_0x174b88(0x1a8)][_0x174b88(0x21d)](_0x354d3f);else this[_0x174b88(0x1a8)]['set'](_0x354d3f,_0x7e954c);}[_0x17acc9(0x1f9)](_0x273804){const _0x59794a=_0x17acc9;return this['keyToFp'][_0x59794a(0x1d5)](_0x273804);}[_0x17acc9(0x211)](){const _0x3bdc3a=_0x17acc9;return this[_0x3bdc3a(0x159)][_0x3bdc3a(0x211)]();}[_0x17acc9(0x1c7)](_0x495b72){const _0x1a554d=_0x17acc9,_0x5b9dc7=this[_0x1a554d(0x159)][_0x1a554d(0x1d5)](_0x495b72);if(_0x5b9dc7===undefined)return;this[_0x1a554d(0x1a8)]['delete'](_0x495b72),this[_0x1a554d(0x159)][_0x1a554d(0x21d)](_0x495b72),this['labelToKey']['delete'](_0x5b9dc7),this['_tombstoneCount']++;}['keyForLabel'](_0x42de17){const _0x187518=_0x17acc9;return this['labelToKey'][_0x187518(0x1d5)](_0x42de17)??null;}[_0x17acc9(0x164)](){const _0x11a848=_0x17acc9;return this['keyToLabel'][_0x11a848(0x164)];}[_0x17acc9(0x174)](){const _0x1da980=_0x17acc9;return this[_0x1da980(0x15c)];}async[_0x17acc9(0x150)](_0x2a4d5e){const _0xde470d=_0x17acc9,_0x4da0a0=_0x2a4d5e+_0xde470d(0x219),_0x44e6f2=[];for(const [_0x32e9f7,_0x318bba]of this[_0xde470d(0x21e)]['entries']()){const _0x2c5ea9=this['keyToFp'][_0xde470d(0x1d5)](_0x318bba);_0x44e6f2['push'](_0x2c5ea9==null?[_0x32e9f7,_0x318bba]:[_0x32e9f7,_0x318bba,_0x2c5ea9]);}_0x44e6f2[_0xde470d(0x197)]((_0x5a450b,_0x2e6e7c)=>_0x5a450b[0x0]-_0x2e6e7c[0x0]);const _0x1ca6ee={'version':0x2,'nextLabel':this[_0xde470d(0x179)],'entries':_0x44e6f2};_0x360809['writeFileSync'](_0x4da0a0,JSON['stringify'](_0x1ca6ee)),_0x360809['renameSync'](_0x4da0a0,_0x2a4d5e);}}return labelMap=_0x2fb9fb,labelMap;}var indexConvergence,hasRequiredIndexConvergence;function requireIndexConvergence(){if(hasRequiredIndexConvergence)return indexConvergence;hasRequiredIndexConvergence=0x1;function _0x5a804f(_0x4d1333){const _0x41408c=_0x2ae3,_0x4416cc=new Uint32Array(_0x4d1333[_0x41408c(0x1f4)],_0x4d1333[_0x41408c(0x202)],_0x4d1333[_0x41408c(0x220)]);let _0x3dd85e=0x811c9dc5,_0x2e6cc0=0x9747b28c;for(let _0x1d24f3=0x0;_0x1d24f3<_0x4416cc[_0x41408c(0x220)];_0x1d24f3++){const _0x237df1=_0x4416cc[_0x1d24f3];_0x3dd85e=Math['imul'](_0x3dd85e^_0x237df1,0x1000193)>>>0x0;let _0x7b0e2f=Math[_0x41408c(0x1d3)](_0x237df1,0xcc9e2d51);_0x7b0e2f=_0x7b0e2f<<0xf|_0x7b0e2f>>>0x11,_0x2e6cc0=Math[_0x41408c(0x1d3)](_0x2e6cc0^Math[_0x41408c(0x1d3)](_0x7b0e2f,0x1b873593),0x5)+0xe6546b64,_0x2e6cc0>>>=0x0;}return _0x2e6cc0=Math[_0x41408c(0x1d3)](_0x2e6cc0^_0x2e6cc0>>>0x10,0x85ebca6b)>>>0x0,(_0x3dd85e>>>0x0)*0x100000+(_0x2e6cc0&0xfffff);}function _0x337c54(_0x5aac3b,_0x54c115,_0x4a0401,{upsert:_0x3bc055,remove:_0x10b731}){const _0x3c858e=_0x2ae3,_0x6491f3=new Set();let _0x1d78fd=0x0,_0x41b551=0x0,_0x590fa7=0x0;for(const {key:_0x5d4e39,vector:_0x1ccb57}of _0x54c115){if(!(_0x1ccb57 instanceof Float32Array)||_0x1ccb57[_0x3c858e(0x220)]!==_0x4a0401)continue;_0x6491f3['add'](_0x5d4e39);const _0xd574a0=_0x5a804f(_0x1ccb57),_0x6fac46=_0x5aac3b[_0x3c858e(0x1b6)](_0x5d4e39)!==undefined;if(_0x6fac46&&_0x5aac3b['fingerprintOf'](_0x5d4e39)===_0xd574a0)continue;_0x3bc055(_0x5d4e39,_0x1ccb57,_0xd574a0);if(_0x6fac46)_0x41b551++;else _0x1d78fd++;}for(const _0x225e10 of[..._0x5aac3b[_0x3c858e(0x211)]()]){if(_0x6491f3[_0x3c858e(0x1af)](_0x225e10))continue;_0x10b731(_0x225e10),_0x590fa7++;}return{'added':_0x1d78fd,'changed':_0x41b551,'removed':_0x590fa7};}return indexConvergence={'fingerprint':_0x5a804f,'reconcileIndex':_0x337c54},indexConvergence;}var hnsw,hasRequiredHnsw;function requireHnsw(){if(hasRequiredHnsw)return hnsw;hasRequiredHnsw=0x1;const _0x53101e=requireSnapshotStore(),_0x279357=requireLabelMap(),{fingerprint:_0x27d122,reconcileIndex:_0x5df7d9}=requireIndexConvergence(),_0x5e55ff=0x1;let _0x1dc935=null;function _0x4ffab2(){const _0x4fc9f4=_0x2ae3;if(_0x1dc935)return _0x1dc935;try{return _0x1dc935=require('hnswlib-node'),_0x1dc935;}catch(_0x15fc06){const _0x944bcb=new Error(_0x4fc9f4(0x193)+('for\x20Node\x20'+process['versions'][_0x4fc9f4(0x16f)]+'\x20on\x20'+process[_0x4fc9f4(0x154)]+'/'+process['arch']+'.\x20')+_0x4fc9f4(0x1be)+(_0x4fc9f4(0x1cf)+(_0x15fc06?.[_0x4fc9f4(0x151)]||String(_0x15fc06))));_0x944bcb[_0x4fc9f4(0x1ba)]=_0x4fc9f4(0x17f),_0x944bcb[_0x4fc9f4(0x160)]=_0x15fc06;throw _0x944bcb;}}return hnsw=function _0x2ec8e6(_0x125cb8={},{dims:_0x426e9c,dir:_0x1756b2}){const _0x3c51e6=_0x2ae3,_0x178c4d=_0x4ffab2();if(!_0x426e9c||_0x426e9c<=0x0)throw new Error('hnsw\x20algorithm\x20requires\x20dims\x20>\x200');if(!_0x1756b2)throw new Error(_0x3c51e6(0x1bf));const _0x8200e5={'metric':_0x125cb8[_0x3c51e6(0x1e2)]??_0x3c51e6(0x181),'M':_0x125cb8['M']??0x10,'efConstruction':_0x125cb8[_0x3c51e6(0x1cc)]??0xc8,'efSearch':_0x125cb8[_0x3c51e6(0x1d9)]??0x40,'maxElements':_0x125cb8[_0x3c51e6(0x214)]??0x400,'growFactor':_0x125cb8[_0x3c51e6(0x1d8)]??0x2,'snapshotEveryChanges':_0x125cb8['snapshotEveryChanges']??0xc350,'keepSnapshots':_0x125cb8['keepSnapshots']??0x2,'tmpMaxAgeMs':_0x125cb8[_0x3c51e6(0x218)]??0x6*0x36ee80},_0x2231b5=new _0x53101e({'dir':_0x1756b2,'keepSnapshots':_0x8200e5[_0x3c51e6(0x1f5)]}),_0x4c605f=new _0x279357();let _0x1f3350=null,_0x1efaaa=0x0,_0x5d6ce4=null,_0x4908a1=Promise[_0x3c51e6(0x167)]();const _0x3e9f4f=_0x53514e=>{const _0x56fe34=_0x3c51e6,_0x2c20f9=_0x4908a1[_0x56fe34(0x1b5)](_0x53514e);return _0x4908a1=_0x2c20f9[_0x56fe34(0x14e)](()=>{}),_0x2c20f9;};async function _0x494d2d(_0x229e1c){const _0x15d26d=_0x3c51e6;await _0x4c605f['reset'](),_0x229e1c=_0x229e1c??[];const _0xd56b3=Math['max'](_0x8200e5['maxElements'],Math[_0x15d26d(0x14b)](_0x229e1c[_0x15d26d(0x220)]*(_0x8200e5[_0x15d26d(0x1d8)]||1.2)),0x1);_0x1f3350=new _0x178c4d[(_0x15d26d(0x178))](_0x8200e5[_0x15d26d(0x1e2)],_0x426e9c),_0x1f3350[_0x15d26d(0x215)]({'maxElements':_0xd56b3,'efConstruction':_0x8200e5[_0x15d26d(0x1cc)],'M':_0x8200e5['M']});for(const {key:_0x288827,vector:_0x1006ff}of _0x229e1c){if(!(_0x1006ff instanceof Float32Array)||_0x1006ff[_0x15d26d(0x220)]!==_0x426e9c)continue;_0x38664a(_0x288827,_0x1006ff);}_0x1f3350[_0x15d26d(0x15f)](_0x8200e5[_0x15d26d(0x1d9)]),_0x1efaaa=0x0;}async function _0x2427ce(_0x1a3ebd){return _0x494d2d(_0x1a3ebd?await _0x1a3ebd():[]);}function _0x902404(){const _0x622bd2=_0x3c51e6;if(_0x1f3350['getCurrentCount']()<_0x1f3350['getMaxElements']())return;const _0x9e64c=Math['ceil'](_0x1f3350[_0x622bd2(0x200)]()*(_0x8200e5[_0x622bd2(0x1d8)]||0x2));_0x1f3350['resizeIndex'](_0x9e64c),_0x8200e5[_0x622bd2(0x214)]=_0x9e64c;}function _0x38664a(_0x383195,_0x580eed,_0x13dd4c){const _0x22dedd=_0x3c51e6,_0x5c89c1=_0x4c605f[_0x22dedd(0x20c)](_0x383195);try{_0x1f3350[_0x22dedd(0x1c3)](_0x5c89c1);}catch{}_0x902404(),_0x1f3350[_0x22dedd(0x1e5)](Array[_0x22dedd(0x1a7)](_0x580eed),_0x5c89c1),_0x4c605f['setFingerprint'](_0x383195,_0x13dd4c??_0x27d122(_0x580eed));}function _0x78e5f8(_0x4c916d){const _0x22d756=_0x3c51e6,_0x2c9185=_0x4c605f[_0x22d756(0x1b6)](_0x4c916d);if(_0x2c9185===undefined)return![];try{_0x1f3350[_0x22d756(0x1c3)](_0x2c9185);}catch{}return _0x4c605f[_0x22d756(0x1c7)](_0x4c916d),!![];}function _0x47d220(){const _0x2ce7db=_0x3c51e6;return Math[_0x2ce7db(0x1f3)](Date[_0x2ce7db(0x1a1)](),_0x2231b5['readCurrentClock']()+0x1);}async function _0x41d1ec(_0x1a75fb){const _0x5bf9a4=_0x3c51e6;if(!_0x1f3350||!_0x1a75fb)return![];const _0x37a5c5=await _0x2231b5[_0x5bf9a4(0x1cd)](_0x1a75fb,async _0x3f4c6b=>{const _0x1f5e8e=_0x5bf9a4;_0x1f3350['writeIndexSync'](_0x3f4c6b[_0x1f5e8e(0x1de)]),await _0x4c605f[_0x1f5e8e(0x150)](_0x3f4c6b['labels']);const _0x1444e7=require$$0;_0x1444e7[_0x1f5e8e(0x1e6)](_0x3f4c6b[_0x1f5e8e(0x188)],JSON['stringify']({'manifestVersion':_0x5e55ff,'dims':_0x426e9c,'metric':_0x8200e5[_0x1f5e8e(0x1e2)],'clock':_0x1a75fb,'snapshotAt':Date[_0x1f5e8e(0x1a1)]()},null,0x2));},{'keep':_0x8200e5[_0x5bf9a4(0x1f5)]});if(_0x37a5c5?.[_0x5bf9a4(0x221)])_0x1efaaa=0x0;return _0x37a5c5?.[_0x5bf9a4(0x221)]??![];}async function _0x35c75d(){const _0x4043e7=_0x3c51e6,_0x3eeb7=_0x2231b5[_0x4043e7(0x168)]()||_0x2231b5[_0x4043e7(0x15b)]();if(!_0x3eeb7)return null;let _0x548a18,_0x5487ab=![];return await _0x2231b5['loadSnapshot'](_0x3eeb7,async _0x5b510b=>{const _0x8663b4=_0x4043e7,_0x79508a=require$$0;_0x548a18=JSON[_0x8663b4(0x1ad)](_0x79508a[_0x8663b4(0x1aa)](_0x5b510b[_0x8663b4(0x188)],'utf8'));if(_0x548a18[_0x8663b4(0x1f8)]!==_0x5e55ff||_0x548a18['dims']!==_0x426e9c||_0x548a18[_0x8663b4(0x1e2)]!==_0x8200e5[_0x8663b4(0x1e2)]){_0x548a18=null;return;}await _0x4c605f['loadFrom'](_0x5b510b[_0x8663b4(0x163)]),_0x1f3350=new _0x178c4d[(_0x8663b4(0x178))](_0x8200e5['metric'],_0x426e9c),_0x1f3350[_0x8663b4(0x17d)](_0x5b510b[_0x8663b4(0x1de)]),_0x1f3350['setEf'](_0x8200e5[_0x8663b4(0x1d9)]),_0x5487ab=!![];}),_0x5487ab?_0x548a18?.[_0x4043e7(0x21b)]??0x0:null;}return{async 'load'(_0xfc1a92){return _0x3e9f4f(async()=>{const _0x4c7da7=_0x2ae3;_0x2231b5[_0x4c7da7(0x209)]({'maxAgeMs':_0x8200e5[_0x4c7da7(0x218)]}),_0x5d6ce4=_0xfc1a92??null;const _0x1a4887=await _0x35c75d(),_0x3c5eb1=_0xfc1a92?await _0xfc1a92():null;if(_0x1a4887!=null){if(_0x3c5eb1){if(!_0x4c605f[_0x4c7da7(0x225)])return await _0x494d2d(_0x3c5eb1),null;const _0x4202ad=_0x5df7d9(_0x4c605f,_0x3c5eb1,_0x426e9c,{'upsert':_0x38664a,'remove':_0x78e5f8});_0x1efaaa+=_0x4202ad['added']+_0x4202ad[_0x4c7da7(0x1e3)]+_0x4202ad[_0x4c7da7(0x199)];}return _0x1a4887;}return await _0x494d2d(_0x3c5eb1),null;});},async 'add'(_0x7dfe03,_0x2aaecb,_0x3b0aab){return _0x3e9f4f(async()=>{const _0x1c7b8c=_0x2ae3;if(!_0x1f3350)return;const _0x7e0b6b=_0x2aaecb instanceof Float32Array?_0x2aaecb:new Float32Array(_0x2aaecb),_0x47535e=_0x27d122(_0x7e0b6b);if(_0x4c605f[_0x1c7b8c(0x1f9)](_0x7dfe03)===_0x47535e)return;_0x38664a(_0x7dfe03,_0x7e0b6b,_0x47535e),_0x1efaaa++,_0x1efaaa>=_0x8200e5['snapshotEveryChanges']&&await _0x41d1ec(_0x47d220());});},async 'remove'(_0x2f7eba){return _0x3e9f4f(async()=>{if(!_0x1f3350)return;if(_0x78e5f8(_0x2f7eba))_0x1efaaa++;});},'search'(_0x537d8e,{limit:limit=0xa,efSearch:_0x4e8e6b}={}){const _0xfc0c53=_0x3c51e6;if(!_0x1f3350)return[];if(Number[_0xfc0c53(0x16e)](_0x4e8e6b))_0x1f3350[_0xfc0c53(0x15f)](_0x4e8e6b);const _0x14ea70=Math[_0xfc0c53(0x18f)](limit,_0x1f3350[_0xfc0c53(0x14f)]()||0x1),{neighbors:_0x5c66c2,distances:_0x4bfe06}=_0x1f3350[_0xfc0c53(0x196)](Array[_0xfc0c53(0x1a7)](_0x537d8e),_0x14ea70),_0x3c9568=[];for(let _0x260286=0x0;_0x260286<_0x5c66c2[_0xfc0c53(0x220)];_0x260286++){const _0x572dab=_0x4c605f[_0xfc0c53(0x170)](_0x5c66c2[_0x260286]);if(!_0x572dab)continue;const _0x53ae12=_0x8200e5['metric']==='cosine'?Math[_0xfc0c53(0x1f3)](0x0,0x1-_0x4bfe06[_0x260286]):0x1/(0x1+_0x4bfe06[_0x260286]);_0x3c9568[_0xfc0c53(0x19e)]({'key':_0x572dab,'score':_0x53ae12});}return _0x3c9568;},async 'snapshot'(_0x336c5d){return _0x3e9f4f(()=>_0x41d1ec(_0x336c5d??_0x47d220()));},async 'rebuild'(_0x544a45){return _0x3e9f4f(()=>{if(_0x544a45!=null)_0x5d6ce4=_0x544a45;return _0x2427ce(_0x544a45??_0x5d6ce4);});},async 'stop'(){return _0x3e9f4f(()=>_0x1efaaa>0x0||!_0x2231b5['readCurrentId']()?_0x41d1ec(_0x47d220()):![]);},'count'(){const _0x22388f=_0x3c51e6;return _0x4c605f[_0x22388f(0x164)]();},'info'(){const _0x1de7b4=_0x3c51e6;return{'algorithm':_0x1de7b4(0x155),'metric':_0x8200e5[_0x1de7b4(0x1e2)],'M':_0x8200e5['M'],'efConstruction':_0x8200e5[_0x1de7b4(0x1cc)],'efSearch':_0x8200e5['efSearch'],'maxElements':_0x1f3350?.[_0x1de7b4(0x200)]()??_0x8200e5[_0x1de7b4(0x214)],'count':_0x4c605f[_0x1de7b4(0x164)](),'changesSince':_0x1efaaa,'snapshotDir':_0x1756b2,'latestSnapshot':_0x2231b5[_0x1de7b4(0x168)]()??null};}};},hnsw;}var flat,hasRequiredFlat;function _0x2ae3(_0x20a140,_0x36cdf4){_0x20a140=_0x20a140-0x14b;const _0x45b2bb=_0x45b2();let _0x2ae303=_0x45b2bb[_0x20a140];return _0x2ae303;}function requireFlat(){if(hasRequiredFlat)return flat;hasRequiredFlat=0x1,flat=function _0x23b635(_0x46f692={}){const _0x1c85d6=new Map();return{async 'load'(_0xbc5441){const _0x4f6f2e=_0x2ae3;_0x1c85d6[_0x4f6f2e(0x1a2)]();if(_0xbc5441)for(const {key:_0x9c0e61,vector:_0x44e736}of await _0xbc5441()){_0x1c85d6['set'](_0x9c0e61,_0x44e736);}},async 'add'(_0x5cdfdc,_0x4248f0,_0x3b90ce){_0x1c85d6['set'](_0x5cdfdc,_0x4248f0);},async 'remove'(_0x3cbbfa){const _0x5a5d0f=_0x2ae3;_0x1c85d6[_0x5a5d0f(0x21d)](_0x3cbbfa);},'search'(_0x310c00,{limit:limit=0xa,threshold:threshold=0x0}={}){const _0x333a7e=_0x2ae3,_0x1550c2=[];for(const [_0x3e83a1,_0xa0b248]of _0x1c85d6){const _0xfae984=_0x19c989(_0x310c00,_0xa0b248);if(_0xfae984>=threshold)_0x1550c2[_0x333a7e(0x19e)]({'key':_0x3e83a1,'score':_0xfae984});}return _0x1550c2[_0x333a7e(0x197)]((_0x7a0ca1,_0x443dbc)=>_0x443dbc['score']-_0x7a0ca1[_0x333a7e(0x224)]),_0x1550c2[_0x333a7e(0x166)](0x0,limit);},async 'snapshot'(){return![];},async 'rebuild'(_0xeb912b){const _0x5c4c4b=_0x2ae3;await this[_0x5c4c4b(0x16b)](_0xeb912b);},async 'stop'(){},'count'(){return _0x1c85d6['size'];},'info'(){const _0x545930=_0x2ae3;return{'algorithm':_0x545930(0x180),'count':_0x1c85d6[_0x545930(0x164)]};}};};function _0x19c989(_0x5abefc,_0x7160bc){const _0x53305f=_0x2ae3;let _0x46b7bb=0x0,_0x586a7d=0x0,_0x258e0b=0x0;for(let _0x47661f=0x0;_0x47661f<_0x5abefc[_0x53305f(0x220)];_0x47661f++){_0x46b7bb+=_0x5abefc[_0x47661f]*_0x7160bc[_0x47661f],_0x586a7d+=_0x5abefc[_0x47661f]*_0x5abefc[_0x47661f],_0x258e0b+=_0x7160bc[_0x47661f]*_0x7160bc[_0x47661f];}const _0x10699e=Math[_0x53305f(0x157)](_0x586a7d)*Math[_0x53305f(0x157)](_0x258e0b);return _0x10699e===0x0?0x0:_0x46b7bb/_0x10699e;}return flat;}var writerLock,hasRequiredWriterLock;function requireWriterLock(){if(hasRequiredWriterLock)return writerLock;hasRequiredWriterLock=0x1;const _0x116da4=require$$0,_0x364306=require$$1,_0x3a86ca=require$$3;return writerLock=function _0x29b072(_0xf21bfb,{maxAgeMs:maxAgeMs=0x3a98,heartbeatMs:heartbeatMs=0x1388,onLost:onLost=null}={}){const _0x4700c0=_0x2ae3,_0x59bebb=_0x364306['join'](_0xf21bfb,_0x4700c0(0x223)),_0x9f1274=_0x3a86ca[_0x4700c0(0x1b8)](0x8)['toString'](_0x4700c0(0x216));let _0x49550f=![],_0x2f4384=null;const _0x32d6ef=()=>JSON[_0x4700c0(0x18c)]({'pid':process[_0x4700c0(0x1c1)],'token':_0x9f1274,'at':Date[_0x4700c0(0x1a1)]()});function _0x1f671a(){const _0x2729a1=_0x4700c0;try{return JSON[_0x2729a1(0x1ad)](_0x116da4[_0x2729a1(0x1aa)](_0x59bebb,'utf8'));}catch(_0x1e4aa3){return _0x1e4aa3?.[_0x2729a1(0x1ba)]===_0x2729a1(0x1ac)?null:{'unreadable':!![]};}}function _0x955afd(){const _0x383ff4=_0x4700c0;try{const _0x15f9e0=_0x116da4[_0x383ff4(0x1bb)](_0x59bebb,'wx');try{_0x116da4[_0x383ff4(0x1e6)](_0x15f9e0,_0x32d6ef());}finally{_0x116da4[_0x383ff4(0x1d6)](_0x15f9e0);}return!![];}catch(_0x58550a){if(_0x58550a?.[_0x383ff4(0x1ba)]===_0x383ff4(0x21f))return![];throw _0x58550a;}}function _0x25d031(_0x2d771f){const _0x56add3=_0x4700c0;if(!_0x2d771f)return!![];if(_0x2d771f[_0x56add3(0x1ce)])return!![];return Date[_0x56add3(0x1a1)]()-(_0x2d771f['at']??0x0)>=maxAgeMs;}function _0x3342f4(){if(_0x2f4384)clearInterval(_0x2f4384);_0x2f4384=null;}function _0x39e34f(){const _0x45a533=_0x4700c0;_0x3342f4(),_0x2f4384=setInterval(()=>{const _0x25230c=_0x2ae3,_0x5958e4=_0x1f671a();if(_0x5958e4&&!_0x5958e4[_0x25230c(0x1ce)]&&_0x5958e4[_0x25230c(0x1ed)]!==_0x9f1274){_0x49550f=![],_0x3342f4();try{onLost?.();}catch{}return;}try{_0x116da4[_0x25230c(0x1e6)](_0x59bebb,_0x32d6ef());}catch{}},heartbeatMs),_0x2f4384[_0x45a533(0x1a4)]?.();}function _0x167835(){const _0x365dc5=_0x4700c0,_0x4d363b=_0x1f671a();return!!_0x4d363b&&_0x4d363b[_0x365dc5(0x1ed)]===_0x9f1274;}return{'path':_0x59bebb,'token':_0x9f1274,'acquire'(){const _0x3c772e=_0x4700c0,_0x1214af=_0x1f671a();if(_0x1214af&&_0x1214af[_0x3c772e(0x1ed)]===_0x9f1274){_0x49550f=!![];if(!_0x2f4384)_0x39e34f();return!![];}let _0x34b409=_0x955afd();if(!_0x34b409&&_0x25d031(_0x1f671a())){try{_0x116da4[_0x3c772e(0x1e4)](_0x59bebb);}catch{}_0x34b409=_0x955afd();}if(_0x34b409&&!_0x167835())_0x34b409=![];_0x49550f=_0x34b409;if(_0x34b409)_0x39e34f();return _0x34b409;},'held'(){return _0x49550f;},'isFree'(){const _0x3a8795=_0x1f671a();if(_0x3a8795&&_0x3a8795['token']===_0x9f1274)return![];return _0x25d031(_0x3a8795);},'release'(){const _0x541f36=_0x4700c0;_0x3342f4();if(!_0x49550f)return;_0x49550f=![];if(_0x167835())try{_0x116da4[_0x541f36(0x1e4)](_0x59bebb);}catch{}}};},writerLock;}var usearch,hasRequiredUsearch;function requireUsearch(){if(hasRequiredUsearch)return usearch;hasRequiredUsearch=0x1;const _0x5a43de=require$$0,_0x2a16a7=requireSnapshotStore(),_0x523c2e=requireLabelMap(),_0x1c0792=requireWriterLock(),{fingerprint:_0x3ede1e,reconcileIndex:_0x191cf8}=requireIndexConvergence(),_0x559b58=0x1;let _0xfe5fb3=null;function _0x1cd05b(){const _0x3863c7=_0x2ae3;if(_0xfe5fb3)return _0xfe5fb3;try{return _0xfe5fb3=require(_0x3863c7(0x1ff)),_0xfe5fb3;}catch(_0x23cb08){const _0x5c92eb=new Error(_0x3863c7(0x1ae)+('for\x20Node\x20'+process[_0x3863c7(0x1a5)]['node']+_0x3863c7(0x18a)+process[_0x3863c7(0x154)]+'/'+process[_0x3863c7(0x222)]+'.\x20')+'Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22/\x22hnsw\x22\x20instead.\x20'+(_0x3863c7(0x1cf)+(_0x23cb08?.[_0x3863c7(0x151)]||String(_0x23cb08))));_0x5c92eb[_0x3863c7(0x1ba)]=_0x3863c7(0x152),_0x5c92eb['cause']=_0x23cb08;throw _0x5c92eb;}}function _0x13bb08(_0x28ede8,_0xaec556){const _0x3ca4b4=_0x2ae3;switch(_0x28ede8){case _0x3ca4b4(0x181):return _0xaec556[_0x3ca4b4(0x1d2)][_0x3ca4b4(0x19b)];case'l2':return _0xaec556[_0x3ca4b4(0x1d2)][_0x3ca4b4(0x19f)];case'ip':return _0xaec556[_0x3ca4b4(0x1d2)]['IP'];default:return _0xaec556[_0x3ca4b4(0x1d2)][_0x3ca4b4(0x19b)];}}return usearch=function _0x457858(_0x1116ff={},{dims:_0x2e7d8f,dir:_0xa7b5e7,fetchAll:fetchAll=null,onChange:onChange=null}={}){const _0x1a2e9f=_0x2ae3,_0x4851ee=_0x1cd05b();if(!_0x2e7d8f||_0x2e7d8f<=0x0)throw new Error(_0x1a2e9f(0x1ea));if(!_0xa7b5e7)throw new Error('usearch\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage');const _0x463dff={'metric':_0x1116ff[_0x1a2e9f(0x1e2)]??_0x1a2e9f(0x181),'connectivity':_0x1116ff[_0x1a2e9f(0x19a)]??0x10,'expansionAdd':_0x1116ff['expansionAdd']??0x80,'expansionSearch':_0x1116ff[_0x1a2e9f(0x227)]??0x40,'snapshotEveryChanges':_0x1116ff['snapshotEveryChanges']??0xc350,'snapshotMaxLagMs':_0x1116ff[_0x1a2e9f(0x20f)]??0x2710,'keepSnapshots':_0x1116ff[_0x1a2e9f(0x1f5)]??0x2,'tmpMaxAgeMs':_0x1116ff[_0x1a2e9f(0x218)]??0x6*0x36ee80,'heartbeatIntervalMs':_0x1116ff['heartbeatIntervalMs']??0x1388,'writerLockMaxAgeMs':_0x1116ff[_0x1a2e9f(0x1b9)]??0x3a98,'viewRefreshMs':_0x1116ff[_0x1a2e9f(0x156)]??0x3e8},_0x57ab0b=new _0x2a16a7({'dir':_0xa7b5e7,'keepSnapshots':_0x463dff[_0x1a2e9f(0x1f5)]}),_0x5c3b98=_0x1c0792(_0xa7b5e7,{'maxAgeMs':_0x463dff[_0x1a2e9f(0x1b9)],'heartbeatMs':_0x463dff[_0x1a2e9f(0x15a)],'onLost':()=>{_0x547400(_0x10cf55)['catch'](()=>{});}});let _0x5f53c0=new _0x523c2e(),_0x386485=null,_0x1f36f3=0x0,_0x46522c=null,_0x759f25=![],_0x552ccc=![],_0x5d2ce8=null,_0x79d82f=0x0,_0x3575fc=null,_0x2902cf=0x0,_0x1286f5=![],_0x428ddf=Promise[_0x1a2e9f(0x167)]();const _0x547400=_0x49cc14=>{const _0x357178=_0x1a2e9f,_0x553ca=_0x428ddf[_0x357178(0x1b5)](_0x49cc14);return _0x428ddf=_0x553ca[_0x357178(0x14e)](()=>{}),_0x553ca;},_0x2f6144=()=>{try{onChange?.();}catch{}};function _0x259fd7(){const _0x546b78=_0x1a2e9f;return new _0x4851ee[(_0x546b78(0x190))]({'dimensions':_0x2e7d8f,'metric':_0x13bb08(_0x463dff[_0x546b78(0x1e2)],_0x4851ee),'quantization':_0x4851ee[_0x546b78(0x1c0)][_0x546b78(0x208)],'connectivity':_0x463dff[_0x546b78(0x19a)],'expansion_add':_0x463dff[_0x546b78(0x14c)],'expansion_search':_0x463dff['expansionSearch'],'multi':![]});}function _0x347006(_0x403957){return _0x403957 instanceof Float32Array?_0x403957:new Float32Array(_0x403957);}function _0x22e641(){const _0x1591eb=_0x1a2e9f;if(fetchAll)return fetchAll();if(_0x46522c)return _0x46522c();return Promise[_0x1591eb(0x167)](null);}function _0x2e200b(_0xa882d0,_0x49f550,_0x47ce42){const _0x4175d9=_0x1a2e9f,_0x379bf6=_0x5f53c0['labelForExisting'](_0xa882d0);if(_0x379bf6!==undefined)try{_0x386485[_0x4175d9(0x1da)](BigInt(_0x379bf6));}catch{}const _0x5e7ccd=_0x5f53c0[_0x4175d9(0x20c)](_0xa882d0);_0x386485[_0x4175d9(0x1c4)](BigInt(_0x5e7ccd),_0x49f550),_0x5f53c0[_0x4175d9(0x162)](_0xa882d0,_0x47ce42??_0x3ede1e(_0x49f550));}function _0x2607fe(_0x4c51e9){const _0x5a0cf5=_0x1a2e9f,_0x3bb70f=_0x5f53c0['labelForExisting'](_0x4c51e9);if(_0x3bb70f===undefined)return![];try{_0x386485[_0x5a0cf5(0x1da)](BigInt(_0x3bb70f));}catch{}return _0x5f53c0[_0x5a0cf5(0x1c7)](_0x4c51e9),!![];}function _0x14b688(_0x237bb2){_0x5f53c0=new _0x523c2e(),_0x386485=_0x259fd7();for(const {key:_0xb9ba2e,vector:_0x454c67}of _0x237bb2??[]){if(!(_0x454c67 instanceof Float32Array)||_0x454c67['length']!==_0x2e7d8f)continue;_0x2e200b(_0xb9ba2e,_0x454c67);}_0x1f36f3=0x0;}function _0xdb7604(){const _0x3fbae1=_0x1a2e9f;return Math[_0x3fbae1(0x1f3)](Date[_0x3fbae1(0x1a1)](),_0x57ab0b['readCurrentClock']()+0x1);}function _0x23b9f1(){if(_0x5d2ce8)clearTimeout(_0x5d2ce8);_0x5d2ce8=null;}function _0x56c481(){const _0x4f2a65=_0x1a2e9f;if(!_0x463dff[_0x4f2a65(0x20f)]||_0x5d2ce8||!_0x552ccc||_0x1f36f3<=0x0)return;const _0x572541=Math[_0x4f2a65(0x1f3)](_0x463dff[_0x4f2a65(0x20f)],0xa*_0x79d82f);_0x5d2ce8=setTimeout(()=>{const _0x1adc57=_0x4f2a65;_0x5d2ce8=null,_0x547400(async()=>{if(_0x552ccc&&_0x1f36f3>0x0)await _0x3725c7();_0x56c481(),_0x2f6144();})[_0x1adc57(0x14e)](()=>{});},_0x572541),_0x5d2ce8[_0x4f2a65(0x1a4)]?.();}async function _0x3725c7(_0xfc37a2){const _0x488233=_0x1a2e9f;if(!_0x386485)return![];const _0x30aeba=_0xfc37a2??_0xdb7604(),_0x2d93a5=Date['now'](),_0x546fbb=await _0x57ab0b[_0x488233(0x1cd)](_0x30aeba,async _0x1a7544=>{const _0x58288a=_0x488233;_0x386485[_0x58288a(0x173)](_0x1a7544[_0x58288a(0x1de)]),await _0x5f53c0['snapshotTo'](_0x1a7544[_0x58288a(0x163)]),_0x5a43de['writeFileSync'](_0x1a7544['state'],JSON[_0x58288a(0x18c)]({'manifestVersion':_0x559b58,'algorithm':_0x58288a(0x1ff),'dims':_0x2e7d8f,'metric':_0x463dff[_0x58288a(0x1e2)],'clock':_0x30aeba,'snapshotAt':Date['now']()},null,0x2));},{'keep':_0x463dff[_0x488233(0x1f5)]});return _0x79d82f=Date[_0x488233(0x1a1)]()-_0x2d93a5,_0x546fbb?.[_0x488233(0x221)]&&(_0x1f36f3=0x0,_0x23b9f1()),_0x546fbb?.[_0x488233(0x221)]??![];}function _0x1c8484(){const _0x57ce5d=_0x1a2e9f;_0x1f36f3++;if(_0x1f36f3>=_0x463dff[_0x57ce5d(0x1e1)])return _0x3725c7();return _0x56c481(),null;}async function _0x388689(){const _0x7a981d=_0x1a2e9f,_0xa9ff37=_0x57ab0b[_0x7a981d(0x168)]()||_0x57ab0b[_0x7a981d(0x15b)]();if(!_0xa9ff37)return null;let _0x1bc35b,_0x42bbf0=![];try{await _0x57ab0b[_0x7a981d(0x17c)](_0xa9ff37,async _0x6c0321=>{const _0xdcfd52=_0x7a981d;_0x1bc35b=JSON[_0xdcfd52(0x1ad)](_0x5a43de[_0xdcfd52(0x1aa)](_0x6c0321[_0xdcfd52(0x188)],_0xdcfd52(0x1e7)));if(_0x1bc35b['manifestVersion']!==_0x559b58||_0x1bc35b[_0xdcfd52(0x169)]!==_0xdcfd52(0x1ff)||_0x1bc35b[_0xdcfd52(0x175)]!==_0x2e7d8f||_0x1bc35b[_0xdcfd52(0x1e2)]!==_0x463dff['metric']){_0x1bc35b=null;return;}const _0x4c75de=new _0x523c2e();await _0x4c75de['loadFrom'](_0x6c0321[_0xdcfd52(0x163)]);const _0x56e2a6=_0x259fd7();_0x56e2a6['load'](_0x6c0321[_0xdcfd52(0x1de)]),_0x5f53c0=_0x4c75de,_0x386485=_0x56e2a6,_0x42bbf0=!![];});}catch{return null;}return _0x42bbf0?_0x1bc35b?.[_0x7a981d(0x21b)]??0x0:null;}async function _0x31f902(_0x395e79){const _0x38888b=_0x1a2e9f;_0x3575fc=null;const _0x2bad56=await _0x388689();if(_0x2bad56!=null){_0x1f36f3=0x0;if(_0x395e79){if(!_0x5f53c0['hasFingerprints'])return _0x14b688(_0x395e79),await _0x3725c7(),null;const _0x3257fc=_0x191cf8(_0x5f53c0,_0x395e79,_0x2e7d8f,{'upsert':_0x2e200b,'remove':_0x2607fe}),_0x88c38a=_0x3257fc[_0x38888b(0x153)]+_0x3257fc[_0x38888b(0x1e3)]+_0x3257fc[_0x38888b(0x199)];_0x88c38a>0x0&&(_0x1f36f3+=_0x88c38a,await _0x3725c7());}return _0x2bad56;}_0x14b688(_0x395e79??[]);if(_0x386485[_0x38888b(0x164)]()>0x0)await _0x3725c7();return null;}async function _0x3fa17b(){_0x552ccc=!![],await _0x31f902(await _0x22e641());}async function _0x10cf55(){const _0x2ba427=_0x1a2e9f;if(!_0x552ccc)return;_0x552ccc=![],_0x23b9f1(),_0x1f36f3=0x0;const _0x302639=_0x57ab0b[_0x2ba427(0x168)]()||_0x57ab0b['latestSnapshotId']();await _0x4deb4b(_0x302639),_0x2f6144();}async function _0x4deb4b(_0x100711){if(!_0x100711)return![];let _0x348ba7=![];try{await _0x57ab0b['loadSnapshot'](_0x100711,async _0x52d3c5=>{const _0x1a9f05=_0x2ae3,_0x2a72a4=JSON[_0x1a9f05(0x1ad)](_0x5a43de[_0x1a9f05(0x1aa)](_0x52d3c5['state'],_0x1a9f05(0x1e7)));if(_0x2a72a4[_0x1a9f05(0x1f8)]!==_0x559b58||_0x2a72a4[_0x1a9f05(0x169)]!==_0x1a9f05(0x1ff)||_0x2a72a4[_0x1a9f05(0x175)]!==_0x2e7d8f||_0x2a72a4['metric']!==_0x463dff[_0x1a9f05(0x1e2)])return;const _0x14afbb=new _0x523c2e();await _0x14afbb['loadFrom'](_0x52d3c5[_0x1a9f05(0x163)]);const _0x22d821=_0x259fd7();_0x22d821[_0x1a9f05(0x1b3)](_0x52d3c5[_0x1a9f05(0x1de)]),_0x386485=_0x22d821,_0x5f53c0=_0x14afbb,_0x3575fc=_0x100711,_0x348ba7=!![];});}catch{}return _0x348ba7;}function _0xf6a125(){const _0x31f720=_0x1a2e9f,_0x39cb76=Date[_0x31f720(0x1a1)]();if(_0x39cb76-_0x2902cf<_0x463dff[_0x31f720(0x156)])return;_0x2902cf=_0x39cb76;if(_0x1286f5)return;if(_0x5c3b98[_0x31f720(0x16c)]()){_0x1286f5=!![],_0x547400(async()=>{const _0x1586b5=_0x31f720;!_0x552ccc&&_0x759f25&&_0x5c3b98[_0x1586b5(0x1fe)]()&&(await _0x3fa17b(),_0x2f6144());})[_0x31f720(0x14e)](()=>{})['finally'](()=>{_0x1286f5=![];});return;}const _0x1c0409=_0x57ab0b[_0x31f720(0x168)]()||_0x57ab0b[_0x31f720(0x15b)]();if(!_0x1c0409||_0x1c0409===_0x3575fc)return;_0x1286f5=!![],_0x547400(async()=>{if(!_0x552ccc&&await _0x4deb4b(_0x1c0409))_0x2f6144();})[_0x31f720(0x14e)](()=>{})[_0x31f720(0x201)](()=>{_0x1286f5=![];});}return{async 'load'(_0x3317d1){return _0x547400(async()=>{const _0x5e060f=_0x2ae3;_0x57ab0b[_0x5e060f(0x209)]({'maxAgeMs':_0x463dff[_0x5e060f(0x218)]}),_0x46522c=_0x3317d1??null,_0x552ccc=_0x5c3b98[_0x5e060f(0x1fe)]();let _0x5d2601=null;if(_0x552ccc)_0x5d2601=await _0x31f902(_0x3317d1?await _0x3317d1():null);else{const _0x13d8fb=_0x57ab0b[_0x5e060f(0x168)]()||_0x57ab0b[_0x5e060f(0x15b)]();await _0x4deb4b(_0x13d8fb);}return _0x759f25=!![],_0x5d2601;});},async 'add'(_0x1a5f8c,_0x46a731,_0x27811f){return _0x547400(async()=>{const _0x556928=_0x2ae3;if(!_0x759f25)return;const _0x7ff633=_0x347006(_0x46a731);if(!_0x552ccc){if(!_0x5c3b98[_0x556928(0x1fe)]())return;await _0x3fa17b();}if(!_0x386485)return;const _0xc5cea3=_0x3ede1e(_0x7ff633);if(_0x5f53c0['fingerprintOf'](_0x1a5f8c)===_0xc5cea3)return;_0x2e200b(_0x1a5f8c,_0x7ff633,_0xc5cea3),await _0x1c8484();});},async 'remove'(_0x2a580c){return _0x547400(async()=>{if(!_0x759f25)return;if(!_0x552ccc){if(!_0x5c3b98['acquire']())return;await _0x3fa17b();}if(!_0x386485)return;if(_0x2607fe(_0x2a580c))await _0x1c8484();});},'search'(_0xe4cbf5,{limit:limit=0xa}={}){const _0xf7d16c=_0x1a2e9f;if(!_0x552ccc&&_0x759f25)_0xf6a125();if(!_0x386485)return[];const _0x56b693=_0x386485[_0xf7d16c(0x164)]();if(_0x56b693===0x0)return[];const _0x276d00=Math['min'](limit,_0x56b693),_0x51c4b9=_0x386485[_0xf7d16c(0x1bc)](_0x347006(_0xe4cbf5),_0x276d00,0x0),_0x38ec94=[],_0x58ebff=_0x51c4b9[_0xf7d16c(0x211)],_0x562ce0=_0x51c4b9[_0xf7d16c(0x192)];for(let _0x6f74d0=0x0;_0x6f74d0<_0x58ebff[_0xf7d16c(0x220)];_0x6f74d0++){const _0x4b6263=_0x58ebff[_0x6f74d0];if(_0x4b6263===0xffffffffffffffffn)continue;const _0xe48fde=Number(_0x4b6263),_0x15b1c1=_0x5f53c0[_0xf7d16c(0x170)](_0xe48fde);if(!_0x15b1c1)continue;const _0x27ac6f=_0x562ce0[_0x6f74d0];let _0x4c6c36;if(_0x463dff[_0xf7d16c(0x1e2)]===_0xf7d16c(0x181))_0x4c6c36=Math[_0xf7d16c(0x1f3)](0x0,0x1-_0x27ac6f);else{if(_0x463dff['metric']==='ip')_0x4c6c36=-_0x27ac6f;else _0x4c6c36=0x1/(0x1+_0x27ac6f);}_0x38ec94[_0xf7d16c(0x19e)]({'key':_0x15b1c1,'score':_0x4c6c36});}return _0x38ec94;},async 'snapshot'(_0x5dcd1e){return _0x547400(()=>_0x552ccc?_0x3725c7(_0x5dcd1e??undefined):![]);},async 'rebuild'(_0x87f41e){return _0x547400(async()=>{if(_0x87f41e!=null)_0x46522c=_0x87f41e;if(!_0x552ccc){if(!_0x5c3b98['acquire']())return;_0x552ccc=!![];}const _0x4baf96=_0x87f41e?await _0x87f41e():await _0x22e641();_0x14b688(_0x4baf96??[]),_0x759f25=!![],await _0x3725c7();});},async 'stop'(){return _0x547400(async()=>{const _0x27660a=_0x2ae3;_0x23b9f1();if(_0x552ccc){if(_0x1f36f3>0x0||!_0x57ab0b[_0x27660a(0x168)]())await _0x3725c7();_0x5c3b98[_0x27660a(0x210)]();}_0x552ccc=![],_0x759f25=![];});},'count'(){return _0x5f53c0['size']();},'info'(){const _0x20f966=_0x1a2e9f;return{'algorithm':'usearch','role':_0x552ccc?_0x20f966(0x1fc):_0x20f966(0x1ca),'metric':_0x463dff[_0x20f966(0x1e2)],'connectivity':_0x463dff[_0x20f966(0x19a)],'expansionAdd':_0x463dff[_0x20f966(0x14c)],'expansionSearch':_0x463dff[_0x20f966(0x227)],'snapshotEveryChanges':_0x463dff[_0x20f966(0x1e1)],'snapshotMaxLagMs':_0x463dff[_0x20f966(0x20f)],'count':_0x5f53c0['size'](),'size':_0x386485?.['size']?.()??0x0,'capacity':_0x386485?.['capacity']?.()??0x0,'changesSince':_0x552ccc?_0x1f36f3:null,'viewedSnapshot':_0x3575fc??null,'snapshotDir':_0xa7b5e7,'latestSnapshot':_0x57ab0b[_0x20f966(0x168)]()??null};}};},usearch;}var hasRequiredAlgorithmWorkerThread;function requireAlgorithmWorkerThread(){const _0x3254b8=_0x32915a;if(hasRequiredAlgorithmWorkerThread)return algorithmWorkerThread$1;hasRequiredAlgorithmWorkerThread=0x1;const {parentPort:_0x5a9f04,workerData:_0x5dd5c2}=require$$0$1,{algorithmName:_0x5b8e3b,algorithmConfig:_0x503a97,dims:_0x568561,dir:_0x31a30a}=_0x5dd5c2;let _0x3bbd46=0x1;const _0x12fde1=new Map();function _0x1407aa(){const _0x497fa3=_0x3bbd46++;return new Promise((_0x1b7008,_0x36a10c)=>{const _0x4a3053=_0x2ae3;_0x12fde1[_0x4a3053(0x17b)](_0x497fa3,{'resolve':_0x1b7008,'reject':_0x36a10c}),_0x5a9f04['postMessage']({'op':'fetchAll','fid':_0x497fa3});});}const _0x1fbf2c={'dims':_0x568561,'dir':_0x31a30a,'fetchAll':_0x1407aa,'onChange':()=>_0x192b04()};let _0x424660;if(_0x5b8e3b===_0x3254b8(0x155))_0x424660=requireHnsw()(_0x503a97,_0x1fbf2c);else{if(_0x5b8e3b==='flat')_0x424660=requireFlat()(_0x503a97,_0x1fbf2c);else{if(_0x5b8e3b===_0x3254b8(0x1ff))_0x424660=requireUsearch()(_0x503a97,_0x1fbf2c);else throw new Error(_0x3254b8(0x18d)+_0x5b8e3b+'\x22');}}function _0x192b04(){const _0x59ffd4=_0x3254b8;try{_0x5a9f04[_0x59ffd4(0x19c)]({'op':_0x59ffd4(0x1b2),'count':_0x424660[_0x59ffd4(0x177)](),'info':_0x424660[_0x59ffd4(0x161)](),'memory':process['memoryUsage']()});}catch{}}function _0x1a519e(_0x1a52d6){const _0x401a38=_0x3254b8;return(_0x1a52d6||[])[_0x401a38(0x1c5)](_0x2c1a64=>({'key':_0x2c1a64[_0x401a38(0x20a)],'vector':_0x2c1a64['vector']instanceof Float32Array?_0x2c1a64[_0x401a38(0x1eb)]:new Float32Array(_0x2c1a64[_0x401a38(0x1eb)])}));}return _0x5a9f04['on'](_0x3254b8(0x151),async _0x2e98ff=>{const _0x2c0033=_0x3254b8;if(_0x2e98ff['op']===_0x2c0033(0x195)){const _0x45a615=_0x12fde1[_0x2c0033(0x1d5)](_0x2e98ff[_0x2c0033(0x176)]);if(!_0x45a615)return;_0x12fde1['delete'](_0x2e98ff[_0x2c0033(0x176)]);if(_0x2e98ff[_0x2c0033(0x186)])_0x45a615['reject'](new Error(_0x2e98ff['error']));else _0x45a615[_0x2c0033(0x167)](_0x1a519e(_0x2e98ff[_0x2c0033(0x1d0)]));return;}const {id:_0x3c93a6,op:_0x3dab34,args:_0x34f973}=_0x2e98ff;try{let _0x185be2;switch(_0x3dab34){case _0x2c0033(0x16b):{_0x185be2=await _0x424660[_0x2c0033(0x16b)](_0x34f973[_0x2c0033(0x1a9)]?_0x1407aa:null),_0x192b04();break;}case _0x2c0033(0x1c4):{const _0x355003=_0x34f973[_0x2c0033(0x1eb)]instanceof Float32Array?_0x34f973[_0x2c0033(0x1eb)]:new Float32Array(_0x34f973[_0x2c0033(0x1eb)]);await _0x424660[_0x2c0033(0x1c4)](_0x34f973[_0x2c0033(0x20a)],_0x355003,_0x34f973[_0x2c0033(0x21b)]??undefined),_0x192b04(),_0x185be2=null;break;}case _0x2c0033(0x1da):{await _0x424660[_0x2c0033(0x1da)](_0x34f973[_0x2c0033(0x20a)]),_0x192b04(),_0x185be2=null;break;}case'search':{const _0x5d2adf=_0x34f973[_0x2c0033(0x1f6)]instanceof Float32Array?_0x34f973[_0x2c0033(0x1f6)]:new Float32Array(_0x34f973[_0x2c0033(0x1f6)]);_0x185be2=_0x424660[_0x2c0033(0x1bc)](_0x5d2adf,_0x34f973[_0x2c0033(0x1b1)]||{});break;}case _0x2c0033(0x19d):{_0x185be2=await _0x424660[_0x2c0033(0x19d)](_0x34f973['clock']),_0x192b04();break;}case _0x2c0033(0x16a):{const _0x2df0ff=_0x1a519e(_0x34f973[_0x2c0033(0x1d0)]);await _0x424660[_0x2c0033(0x16a)](async()=>_0x2df0ff),_0x192b04(),_0x185be2=null;break;}case _0x2c0033(0x20d):{await _0x424660[_0x2c0033(0x20d)](),_0x192b04(),_0x185be2=null;break;}case _0x2c0033(0x177):{_0x185be2=_0x424660[_0x2c0033(0x177)]();break;}case _0x2c0033(0x161):{_0x185be2=_0x424660[_0x2c0033(0x161)]();break;}default:throw new Error(_0x2c0033(0x1a6)+_0x3dab34+'\x22');}_0x5a9f04[_0x2c0033(0x19c)]({'id':_0x3c93a6,'result':_0x185be2});}catch(_0x5cf521){_0x5a9f04[_0x2c0033(0x19c)]({'id':_0x3c93a6,'error':{'message':_0x5cf521?.['message']||String(_0x5cf521),'code':_0x5cf521?.[_0x2c0033(0x1ba)]}});}}),_0x5a9f04[_0x3254b8(0x19c)]({'op':_0x3254b8(0x1c2)}),algorithmWorkerThread$1;}var algorithmWorkerThreadExports=requireAlgorithmWorkerThread(),algorithmWorkerThread=getDefaultExportFromCjs(algorithmWorkerThreadExports);module[_0x32915a(0x204)]=algorithmWorkerThread;
|